summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2023-09-02 19:12:47 -0400
committersowgro <tpoke.ferrari@gmail.com>2023-09-02 19:12:47 -0400
commite4450c8417624b71d779cb4f41692538f9165e10 (patch)
treeb70826542223ecdf8a7a259f61b0a1abb8a217d8
downloadsowbot3-e4450c8417624b71d779cb4f41692538f9165e10.tar.gz
sowbot3-e4450c8417624b71d779cb4f41692538f9165e10.tar.bz2
sowbot3-e4450c8417624b71d779cb4f41692538f9165e10.zip
first commit
-rw-r--r--commands/add.js26
-rw-r--r--commands/delete.js17
-rw-r--r--commands/help.js11
-rw-r--r--commands/preview.js16
-rw-r--r--commands/use.js16
-rw-r--r--config.json4
-rw-r--r--data.js71
-rwxr-xr-xdata.json3
-rw-r--r--help.md8
-rw-r--r--index.js52
-rw-r--r--node_modules/.package-lock.json251
-rw-r--r--node_modules/@discordjs/builders/CHANGELOG.md327
-rw-r--r--node_modules/@discordjs/builders/LICENSE191
-rw-r--r--node_modules/@discordjs/builders/README.md72
-rw-r--r--node_modules/@discordjs/builders/dist/index.d.mts1948
-rw-r--r--node_modules/@discordjs/builders/dist/index.d.ts1948
-rw-r--r--node_modules/@discordjs/builders/dist/index.js2612
-rw-r--r--node_modules/@discordjs/builders/dist/index.js.map1
-rw-r--r--node_modules/@discordjs/builders/dist/index.mjs2540
-rw-r--r--node_modules/@discordjs/builders/dist/index.mjs.map1
-rw-r--r--node_modules/@discordjs/builders/package.json90
-rw-r--r--node_modules/@discordjs/collection/CHANGELOG.md190
-rw-r--r--node_modules/@discordjs/collection/LICENSE191
-rw-r--r--node_modules/@discordjs/collection/README.md67
-rw-r--r--node_modules/@discordjs/collection/dist/index.d.mts457
-rw-r--r--node_modules/@discordjs/collection/dist/index.d.ts457
-rw-r--r--node_modules/@discordjs/collection/dist/index.js543
-rw-r--r--node_modules/@discordjs/collection/dist/index.js.map1
-rw-r--r--node_modules/@discordjs/collection/dist/index.mjs517
-rw-r--r--node_modules/@discordjs/collection/dist/index.mjs.map1
-rw-r--r--node_modules/@discordjs/collection/package.json76
-rw-r--r--node_modules/@discordjs/formatters/CHANGELOG.md55
-rw-r--r--node_modules/@discordjs/formatters/LICENSE191
-rw-r--r--node_modules/@discordjs/formatters/README.md81
-rw-r--r--node_modules/@discordjs/formatters/dist/index.d.mts511
-rw-r--r--node_modules/@discordjs/formatters/dist/index.d.ts511
-rw-r--r--node_modules/@discordjs/formatters/dist/index.js393
-rw-r--r--node_modules/@discordjs/formatters/dist/index.js.map1
-rw-r--r--node_modules/@discordjs/formatters/dist/index.mjs335
-rw-r--r--node_modules/@discordjs/formatters/dist/index.mjs.map1
-rw-r--r--node_modules/@discordjs/formatters/package.json72
-rw-r--r--node_modules/@discordjs/rest/CHANGELOG.md302
-rw-r--r--node_modules/@discordjs/rest/LICENSE192
-rw-r--r--node_modules/@discordjs/rest/README.md137
-rw-r--r--node_modules/@discordjs/rest/dist/index.d.mts510
-rw-r--r--node_modules/@discordjs/rest/dist/index.d.ts510
-rw-r--r--node_modules/@discordjs/rest/dist/index.js1423
-rw-r--r--node_modules/@discordjs/rest/dist/index.js.map1
-rw-r--r--node_modules/@discordjs/rest/dist/index.mjs1382
-rw-r--r--node_modules/@discordjs/rest/dist/index.mjs.map1
-rw-r--r--node_modules/@discordjs/rest/dist/strategies/undiciRequest.d.mts11
-rw-r--r--node_modules/@discordjs/rest/dist/strategies/undiciRequest.d.ts11
-rw-r--r--node_modules/@discordjs/rest/dist/strategies/undiciRequest.js94
-rw-r--r--node_modules/@discordjs/rest/dist/strategies/undiciRequest.js.map1
-rw-r--r--node_modules/@discordjs/rest/dist/strategies/undiciRequest.mjs70
-rw-r--r--node_modules/@discordjs/rest/dist/strategies/undiciRequest.mjs.map1
-rw-r--r--node_modules/@discordjs/rest/dist/types-65527f29.d.ts363
-rw-r--r--node_modules/@discordjs/rest/dist/web.d.mts9
-rw-r--r--node_modules/@discordjs/rest/dist/web.d.ts9
-rw-r--r--node_modules/@discordjs/rest/dist/web.js1355
-rw-r--r--node_modules/@discordjs/rest/dist/web.js.map1
-rw-r--r--node_modules/@discordjs/rest/dist/web.mjs1312
-rw-r--r--node_modules/@discordjs/rest/dist/web.mjs.map1
-rw-r--r--node_modules/@discordjs/rest/package.json101
-rw-r--r--node_modules/@discordjs/util/CHANGELOG.md137
-rw-r--r--node_modules/@discordjs/util/LICENSE190
-rw-r--r--node_modules/@discordjs/util/README.md64
-rw-r--r--node_modules/@discordjs/util/dist/index.d.mts117
-rw-r--r--node_modules/@discordjs/util/dist/index.d.ts117
-rw-r--r--node_modules/@discordjs/util/dist/index.js130
-rw-r--r--node_modules/@discordjs/util/dist/index.js.map1
-rw-r--r--node_modules/@discordjs/util/dist/index.mjs99
-rw-r--r--node_modules/@discordjs/util/dist/index.mjs.map1
-rw-r--r--node_modules/@discordjs/util/package.json80
-rw-r--r--node_modules/@discordjs/ws/CHANGELOG.md317
-rw-r--r--node_modules/@discordjs/ws/LICENSE191
-rw-r--r--node_modules/@discordjs/ws/README.md196
-rw-r--r--node_modules/@discordjs/ws/dist/defaultWorker.d.mts2
-rw-r--r--node_modules/@discordjs/ws/dist/defaultWorker.d.ts2
-rw-r--r--node_modules/@discordjs/ws/dist/defaultWorker.js1051
-rw-r--r--node_modules/@discordjs/ws/dist/defaultWorker.js.map1
-rw-r--r--node_modules/@discordjs/ws/dist/defaultWorker.mjs1033
-rw-r--r--node_modules/@discordjs/ws/dist/defaultWorker.mjs.map1
-rw-r--r--node_modules/@discordjs/ws/dist/index.d.mts669
-rw-r--r--node_modules/@discordjs/ws/dist/index.d.ts669
-rw-r--r--node_modules/@discordjs/ws/dist/index.js1482
-rw-r--r--node_modules/@discordjs/ws/dist/index.js.map1
-rw-r--r--node_modules/@discordjs/ws/dist/index.mjs1446
-rw-r--r--node_modules/@discordjs/ws/dist/index.mjs.map1
-rw-r--r--node_modules/@discordjs/ws/package.json99
-rw-r--r--node_modules/@sapphire/async-queue/CHANGELOG.md148
-rw-r--r--node_modules/@sapphire/async-queue/README.md116
-rw-r--r--node_modules/@sapphire/async-queue/dist/index.d.ts55
-rw-r--r--node_modules/@sapphire/async-queue/dist/index.global.js125
-rw-r--r--node_modules/@sapphire/async-queue/dist/index.global.js.map1
-rw-r--r--node_modules/@sapphire/async-queue/dist/index.js128
-rw-r--r--node_modules/@sapphire/async-queue/dist/index.js.map1
-rw-r--r--node_modules/@sapphire/async-queue/dist/index.mjs102
-rw-r--r--node_modules/@sapphire/async-queue/dist/index.mjs.map1
-rw-r--r--node_modules/@sapphire/async-queue/package.json65
-rw-r--r--node_modules/@sapphire/shapeshift/CHANGELOG.md292
-rw-r--r--node_modules/@sapphire/shapeshift/LICENSE.md24
-rw-r--r--node_modules/@sapphire/shapeshift/README.md934
-rw-r--r--node_modules/@sapphire/shapeshift/dist/index.d.ts715
-rw-r--r--node_modules/@sapphire/shapeshift/dist/index.global.js4174
-rw-r--r--node_modules/@sapphire/shapeshift/dist/index.global.js.map1
-rw-r--r--node_modules/@sapphire/shapeshift/dist/index.js2242
-rw-r--r--node_modules/@sapphire/shapeshift/dist/index.js.map1
-rw-r--r--node_modules/@sapphire/shapeshift/dist/index.mjs2219
-rw-r--r--node_modules/@sapphire/shapeshift/dist/index.mjs.map1
-rw-r--r--node_modules/@sapphire/shapeshift/package.json125
-rw-r--r--node_modules/@sapphire/snowflake/CHANGELOG.md294
-rw-r--r--node_modules/@sapphire/snowflake/README.md170
-rw-r--r--node_modules/@sapphire/snowflake/dist/index.d.ts202
-rw-r--r--node_modules/@sapphire/snowflake/dist/index.global.js198
-rw-r--r--node_modules/@sapphire/snowflake/dist/index.global.js.map1
-rw-r--r--node_modules/@sapphire/snowflake/dist/index.js193
-rw-r--r--node_modules/@sapphire/snowflake/dist/index.js.map1
-rw-r--r--node_modules/@sapphire/snowflake/dist/index.mjs186
-rw-r--r--node_modules/@sapphire/snowflake/dist/index.mjs.map1
-rw-r--r--node_modules/@sapphire/snowflake/package.json67
-rwxr-xr-xnode_modules/@types/node/LICENSE21
-rwxr-xr-xnode_modules/@types/node/README.md16
-rwxr-xr-xnode_modules/@types/node/assert.d.ts972
-rwxr-xr-xnode_modules/@types/node/assert/strict.d.ts8
-rwxr-xr-xnode_modules/@types/node/async_hooks.d.ts530
-rwxr-xr-xnode_modules/@types/node/buffer.d.ts2354
-rwxr-xr-xnode_modules/@types/node/child_process.d.ts1400
-rwxr-xr-xnode_modules/@types/node/cluster.d.ts414
-rwxr-xr-xnode_modules/@types/node/console.d.ts412
-rwxr-xr-xnode_modules/@types/node/constants.d.ts18
-rwxr-xr-xnode_modules/@types/node/crypto.d.ts3978
-rwxr-xr-xnode_modules/@types/node/dgram.d.ts550
-rwxr-xr-xnode_modules/@types/node/diagnostics_channel.d.ts191
-rwxr-xr-xnode_modules/@types/node/dns.d.ts668
-rwxr-xr-xnode_modules/@types/node/dns/promises.d.ts414
-rwxr-xr-xnode_modules/@types/node/dom-events.d.ts126
-rwxr-xr-xnode_modules/@types/node/domain.d.ts170
-rwxr-xr-xnode_modules/@types/node/events.d.ts788
-rwxr-xr-xnode_modules/@types/node/fs.d.ts4082
-rwxr-xr-xnode_modules/@types/node/fs/promises.d.ts1202
-rwxr-xr-xnode_modules/@types/node/globals.d.ts325
-rwxr-xr-xnode_modules/@types/node/globals.global.d.ts1
-rwxr-xr-xnode_modules/@types/node/http.d.ts1724
-rwxr-xr-xnode_modules/@types/node/http2.d.ts2129
-rwxr-xr-xnode_modules/@types/node/https.d.ts441
-rwxr-xr-xnode_modules/@types/node/index.d.ts133
-rwxr-xr-xnode_modules/@types/node/inspector.d.ts2747
-rwxr-xr-xnode_modules/@types/node/module.d.ts232
-rwxr-xr-xnode_modules/@types/node/net.d.ts893
-rwxr-xr-xnode_modules/@types/node/os.d.ts477
-rwxr-xr-xnode_modules/@types/node/package.json232
-rwxr-xr-xnode_modules/@types/node/path.d.ts191
-rwxr-xr-xnode_modules/@types/node/perf_hooks.d.ts638
-rwxr-xr-xnode_modules/@types/node/process.d.ts1494
-rwxr-xr-xnode_modules/@types/node/punycode.d.ts117
-rwxr-xr-xnode_modules/@types/node/querystring.d.ts131
-rwxr-xr-xnode_modules/@types/node/readline.d.ts526
-rwxr-xr-xnode_modules/@types/node/readline/promises.d.ts145
-rwxr-xr-xnode_modules/@types/node/repl.d.ts424
-rwxr-xr-xnode_modules/@types/node/stream.d.ts1568
-rwxr-xr-xnode_modules/@types/node/stream/consumers.d.ts12
-rwxr-xr-xnode_modules/@types/node/stream/promises.d.ts42
-rwxr-xr-xnode_modules/@types/node/stream/web.d.ts330
-rwxr-xr-xnode_modules/@types/node/string_decoder.d.ts67
-rwxr-xr-xnode_modules/@types/node/test.d.ts1461
-rwxr-xr-xnode_modules/@types/node/timers.d.ts225
-rwxr-xr-xnode_modules/@types/node/timers/promises.d.ts93
-rwxr-xr-xnode_modules/@types/node/tls.d.ts1130
-rwxr-xr-xnode_modules/@types/node/trace_events.d.ts182
-rwxr-xr-xnode_modules/@types/node/ts4.8/assert.d.ts972
-rwxr-xr-xnode_modules/@types/node/ts4.8/assert/strict.d.ts8
-rwxr-xr-xnode_modules/@types/node/ts4.8/async_hooks.d.ts530
-rwxr-xr-xnode_modules/@types/node/ts4.8/buffer.d.ts2354
-rwxr-xr-xnode_modules/@types/node/ts4.8/child_process.d.ts1400
-rwxr-xr-xnode_modules/@types/node/ts4.8/cluster.d.ts414
-rwxr-xr-xnode_modules/@types/node/ts4.8/console.d.ts412
-rwxr-xr-xnode_modules/@types/node/ts4.8/constants.d.ts18
-rwxr-xr-xnode_modules/@types/node/ts4.8/crypto.d.ts3977
-rwxr-xr-xnode_modules/@types/node/ts4.8/dgram.d.ts550
-rwxr-xr-xnode_modules/@types/node/ts4.8/diagnostics_channel.d.ts191
-rwxr-xr-xnode_modules/@types/node/ts4.8/dns.d.ts668
-rwxr-xr-xnode_modules/@types/node/ts4.8/dns/promises.d.ts414
-rwxr-xr-xnode_modules/@types/node/ts4.8/dom-events.d.ts126
-rwxr-xr-xnode_modules/@types/node/ts4.8/domain.d.ts170
-rwxr-xr-xnode_modules/@types/node/ts4.8/events.d.ts788
-rwxr-xr-xnode_modules/@types/node/ts4.8/fs.d.ts4082
-rwxr-xr-xnode_modules/@types/node/ts4.8/fs/promises.d.ts1202
-rwxr-xr-xnode_modules/@types/node/ts4.8/globals.d.ts325
-rwxr-xr-xnode_modules/@types/node/ts4.8/globals.global.d.ts1
-rwxr-xr-xnode_modules/@types/node/ts4.8/http.d.ts1724
-rwxr-xr-xnode_modules/@types/node/ts4.8/http2.d.ts2129
-rwxr-xr-xnode_modules/@types/node/ts4.8/https.d.ts441
-rwxr-xr-xnode_modules/@types/node/ts4.8/index.d.ts88
-rwxr-xr-xnode_modules/@types/node/ts4.8/inspector.d.ts2747
-rwxr-xr-xnode_modules/@types/node/ts4.8/module.d.ts232
-rwxr-xr-xnode_modules/@types/node/ts4.8/net.d.ts893
-rwxr-xr-xnode_modules/@types/node/ts4.8/os.d.ts477
-rwxr-xr-xnode_modules/@types/node/ts4.8/path.d.ts191
-rwxr-xr-xnode_modules/@types/node/ts4.8/perf_hooks.d.ts638
-rwxr-xr-xnode_modules/@types/node/ts4.8/process.d.ts1494
-rwxr-xr-xnode_modules/@types/node/ts4.8/punycode.d.ts117
-rwxr-xr-xnode_modules/@types/node/ts4.8/querystring.d.ts131
-rwxr-xr-xnode_modules/@types/node/ts4.8/readline.d.ts526
-rwxr-xr-xnode_modules/@types/node/ts4.8/readline/promises.d.ts145
-rwxr-xr-xnode_modules/@types/node/ts4.8/repl.d.ts424
-rwxr-xr-xnode_modules/@types/node/ts4.8/stream.d.ts1430
-rwxr-xr-xnode_modules/@types/node/ts4.8/stream/consumers.d.ts12
-rwxr-xr-xnode_modules/@types/node/ts4.8/stream/promises.d.ts42
-rwxr-xr-xnode_modules/@types/node/ts4.8/stream/web.d.ts330
-rwxr-xr-xnode_modules/@types/node/ts4.8/string_decoder.d.ts67
-rwxr-xr-xnode_modules/@types/node/ts4.8/test.d.ts1461
-rwxr-xr-xnode_modules/@types/node/ts4.8/timers.d.ts225
-rwxr-xr-xnode_modules/@types/node/ts4.8/timers/promises.d.ts93
-rwxr-xr-xnode_modules/@types/node/ts4.8/tls.d.ts1130
-rwxr-xr-xnode_modules/@types/node/ts4.8/trace_events.d.ts182
-rwxr-xr-xnode_modules/@types/node/ts4.8/tty.d.ts208
-rwxr-xr-xnode_modules/@types/node/ts4.8/url.d.ts915
-rwxr-xr-xnode_modules/@types/node/ts4.8/util.d.ts2116
-rwxr-xr-xnode_modules/@types/node/ts4.8/v8.d.ts635
-rwxr-xr-xnode_modules/@types/node/ts4.8/vm.d.ts895
-rwxr-xr-xnode_modules/@types/node/ts4.8/wasi.d.ts152
-rwxr-xr-xnode_modules/@types/node/ts4.8/worker_threads.d.ts693
-rwxr-xr-xnode_modules/@types/node/ts4.8/zlib.d.ts517
-rwxr-xr-xnode_modules/@types/node/tty.d.ts208
-rwxr-xr-xnode_modules/@types/node/url.d.ts915
-rwxr-xr-xnode_modules/@types/node/util.d.ts2116
-rwxr-xr-xnode_modules/@types/node/v8.d.ts635
-rwxr-xr-xnode_modules/@types/node/vm.d.ts895
-rwxr-xr-xnode_modules/@types/node/wasi.d.ts152
-rwxr-xr-xnode_modules/@types/node/worker_threads.d.ts693
-rwxr-xr-xnode_modules/@types/node/zlib.d.ts517
-rwxr-xr-xnode_modules/@types/ws/LICENSE21
-rwxr-xr-xnode_modules/@types/ws/README.md16
-rwxr-xr-xnode_modules/@types/ws/index.d.mts3
-rwxr-xr-xnode_modules/@types/ws/index.d.ts411
-rwxr-xr-xnode_modules/@types/ws/package.json71
-rw-r--r--node_modules/@vladfrangu/async_event_emitter/CHANGELOG.md63
-rw-r--r--node_modules/@vladfrangu/async_event_emitter/LICENSE.md24
-rw-r--r--node_modules/@vladfrangu/async_event_emitter/README.md51
-rw-r--r--node_modules/@vladfrangu/async_event_emitter/THIRD_PARTY_LICENSE.md23
-rw-r--r--node_modules/@vladfrangu/async_event_emitter/dist/index.d.ts57
-rw-r--r--node_modules/@vladfrangu/async_event_emitter/dist/index.global.js568
-rw-r--r--node_modules/@vladfrangu/async_event_emitter/dist/index.global.js.map1
-rw-r--r--node_modules/@vladfrangu/async_event_emitter/dist/index.js571
-rw-r--r--node_modules/@vladfrangu/async_event_emitter/dist/index.js.map1
-rw-r--r--node_modules/@vladfrangu/async_event_emitter/dist/index.mjs547
-rw-r--r--node_modules/@vladfrangu/async_event_emitter/dist/index.mjs.map1
-rw-r--r--node_modules/@vladfrangu/async_event_emitter/package.json107
-rw-r--r--node_modules/busboy/.eslintrc.js5
-rw-r--r--node_modules/busboy/.github/workflows/ci.yml24
-rw-r--r--node_modules/busboy/.github/workflows/lint.yml23
-rw-r--r--node_modules/busboy/LICENSE19
-rw-r--r--node_modules/busboy/README.md191
-rw-r--r--node_modules/busboy/bench/bench-multipart-fields-100mb-big.js149
-rw-r--r--node_modules/busboy/bench/bench-multipart-fields-100mb-small.js143
-rw-r--r--node_modules/busboy/bench/bench-multipart-files-100mb-big.js154
-rw-r--r--node_modules/busboy/bench/bench-multipart-files-100mb-small.js148
-rw-r--r--node_modules/busboy/bench/bench-urlencoded-fields-100pairs-small.js101
-rw-r--r--node_modules/busboy/bench/bench-urlencoded-fields-900pairs-small-alt.js84
-rw-r--r--node_modules/busboy/lib/index.js57
-rw-r--r--node_modules/busboy/lib/types/multipart.js653
-rw-r--r--node_modules/busboy/lib/types/urlencoded.js350
-rw-r--r--node_modules/busboy/lib/utils.js596
-rw-r--r--node_modules/busboy/package.json22
-rw-r--r--node_modules/busboy/test/common.js109
-rw-r--r--node_modules/busboy/test/test-types-multipart-charsets.js94
-rw-r--r--node_modules/busboy/test/test-types-multipart-stream-pause.js102
-rw-r--r--node_modules/busboy/test/test-types-multipart.js1053
-rw-r--r--node_modules/busboy/test/test-types-urlencoded.js488
-rw-r--r--node_modules/busboy/test/test.js20
-rw-r--r--node_modules/discord-api-types/LICENSE21
-rw-r--r--node_modules/discord-api-types/README.md105
-rw-r--r--node_modules/discord-api-types/gateway/common.d.ts9
-rw-r--r--node_modules/discord-api-types/gateway/common.d.ts.map1
-rw-r--r--node_modules/discord-api-types/gateway/common.js3
-rw-r--r--node_modules/discord-api-types/gateway/common.js.map1
-rw-r--r--node_modules/discord-api-types/gateway/index.d.ts2
-rw-r--r--node_modules/discord-api-types/gateway/index.d.ts.map1
-rw-r--r--node_modules/discord-api-types/gateway/index.js20
-rw-r--r--node_modules/discord-api-types/gateway/index.js.map1
-rw-r--r--node_modules/discord-api-types/gateway/index.mjs8
-rw-r--r--node_modules/discord-api-types/gateway/v10.d.ts1634
-rw-r--r--node_modules/discord-api-types/gateway/v10.d.ts.map1
-rw-r--r--node_modules/discord-api-types/gateway/v10.js254
-rw-r--r--node_modules/discord-api-types/gateway/v10.js.map1
-rw-r--r--node_modules/discord-api-types/gateway/v10.mjs8
-rw-r--r--node_modules/discord-api-types/gateway/v6.d.ts658
-rw-r--r--node_modules/discord-api-types/gateway/v6.d.ts.map1
-rw-r--r--node_modules/discord-api-types/gateway/v6.js173
-rw-r--r--node_modules/discord-api-types/gateway/v6.js.map1
-rw-r--r--node_modules/discord-api-types/gateway/v6.mjs10
-rw-r--r--node_modules/discord-api-types/gateway/v8.d.ts1575
-rw-r--r--node_modules/discord-api-types/gateway/v8.d.ts.map1
-rw-r--r--node_modules/discord-api-types/gateway/v8.js246
-rw-r--r--node_modules/discord-api-types/gateway/v8.js.map1
-rw-r--r--node_modules/discord-api-types/gateway/v8.mjs8
-rw-r--r--node_modules/discord-api-types/gateway/v9.d.ts1633
-rw-r--r--node_modules/discord-api-types/gateway/v9.d.ts.map1
-rw-r--r--node_modules/discord-api-types/gateway/v9.js253
-rw-r--r--node_modules/discord-api-types/gateway/v9.js.map1
-rw-r--r--node_modules/discord-api-types/gateway/v9.mjs8
-rw-r--r--node_modules/discord-api-types/globals.d.ts92
-rw-r--r--node_modules/discord-api-types/globals.d.ts.map1
-rw-r--r--node_modules/discord-api-types/globals.js94
-rw-r--r--node_modules/discord-api-types/globals.js.map1
-rw-r--r--node_modules/discord-api-types/globals.mjs4
-rw-r--r--node_modules/discord-api-types/package.json202
-rw-r--r--node_modules/discord-api-types/payloads/common.d.ts310
-rw-r--r--node_modules/discord-api-types/payloads/common.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/common.js277
-rw-r--r--node_modules/discord-api-types/payloads/common.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/index.d.ts2
-rw-r--r--node_modules/discord-api-types/payloads/index.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/index.js20
-rw-r--r--node_modules/discord-api-types/payloads/index.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/index.mjs69
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.d.ts6
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts23
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.d.ts5
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.d.ts9
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.d.ts18
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.d.ts6
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.d.ts18
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.d.ts6
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.d.ts26
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.js21
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.d.ts18
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.d.ts12
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts12
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.d.ts6
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.d.ts61
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.js30
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.d.ts66
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.d.ts9
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.d.ts55
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.js21
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.d.ts111
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.js30
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.d.ts11
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/base.d.ts147
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/base.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/base.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/base.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.d.ts42
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.d.ts36
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/ping.d.ts4
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/ping.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/ping.js3
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/ping.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/responses.d.ts104
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/responses.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/responses.js49
-rw-r--r--node_modules/discord-api-types/payloads/v10/_interactions/responses.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/application.d.ts264
-rw-r--r--node_modules/discord-api-types/payloads/v10/application.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/application.js118
-rw-r--r--node_modules/discord-api-types/payloads/v10/application.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/auditLog.d.ts597
-rw-r--r--node_modules/discord-api-types/payloads/v10/auditLog.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/auditLog.js74
-rw-r--r--node_modules/discord-api-types/payloads/v10/auditLog.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/autoModeration.d.ts208
-rw-r--r--node_modules/discord-api-types/payloads/v10/autoModeration.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/autoModeration.js76
-rw-r--r--node_modules/discord-api-types/payloads/v10/autoModeration.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/channel.d.ts1631
-rw-r--r--node_modules/discord-api-types/payloads/v10/channel.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/channel.js445
-rw-r--r--node_modules/discord-api-types/payloads/v10/channel.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/emoji.d.ts49
-rw-r--r--node_modules/discord-api-types/payloads/v10/emoji.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/emoji.js6
-rw-r--r--node_modules/discord-api-types/payloads/v10/emoji.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/gateway.d.ts370
-rw-r--r--node_modules/discord-api-types/payloads/v10/gateway.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/gateway.js80
-rw-r--r--node_modules/discord-api-types/payloads/v10/gateway.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/guild.d.ts1083
-rw-r--r--node_modules/discord-api-types/payloads/v10/guild.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/guild.js363
-rw-r--r--node_modules/discord-api-types/payloads/v10/guild.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/guildScheduledEvent.d.ts139
-rw-r--r--node_modules/discord-api-types/payloads/v10/guildScheduledEvent.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/guildScheduledEvent.js33
-rw-r--r--node_modules/discord-api-types/payloads/v10/guildScheduledEvent.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/index.d.ts21
-rw-r--r--node_modules/discord-api-types/payloads/v10/index.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/index.js37
-rw-r--r--node_modules/discord-api-types/payloads/v10/index.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/index.mjs69
-rw-r--r--node_modules/discord-api-types/payloads/v10/interactions.d.ts25
-rw-r--r--node_modules/discord-api-types/payloads/v10/interactions.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/interactions.js24
-rw-r--r--node_modules/discord-api-types/payloads/v10/interactions.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/invite.d.ts110
-rw-r--r--node_modules/discord-api-types/payloads/v10/invite.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/invite.js15
-rw-r--r--node_modules/discord-api-types/payloads/v10/invite.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/oauth2.d.ts132
-rw-r--r--node_modules/discord-api-types/payloads/v10/oauth2.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/oauth2.js136
-rw-r--r--node_modules/discord-api-types/payloads/v10/oauth2.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/permissions.d.ts95
-rw-r--r--node_modules/discord-api-types/payloads/v10/permissions.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/permissions.js14
-rw-r--r--node_modules/discord-api-types/payloads/v10/permissions.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/stageInstance.d.ts76
-rw-r--r--node_modules/discord-api-types/payloads/v10/stageInstance.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/stageInstance.js18
-rw-r--r--node_modules/discord-api-types/payloads/v10/stageInstance.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/sticker.d.ts124
-rw-r--r--node_modules/discord-api-types/payloads/v10/sticker.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/sticker.js31
-rw-r--r--node_modules/discord-api-types/payloads/v10/sticker.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/teams.d.ts63
-rw-r--r--node_modules/discord-api-types/payloads/v10/teams.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/teams.js15
-rw-r--r--node_modules/discord-api-types/payloads/v10/teams.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/template.d.ts63
-rw-r--r--node_modules/discord-api-types/payloads/v10/template.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/template.js6
-rw-r--r--node_modules/discord-api-types/payloads/v10/template.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/user.d.ts309
-rw-r--r--node_modules/discord-api-types/payloads/v10/user.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/user.js161
-rw-r--r--node_modules/discord-api-types/payloads/v10/user.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/voice.d.ts90
-rw-r--r--node_modules/discord-api-types/payloads/v10/voice.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/voice.js6
-rw-r--r--node_modules/discord-api-types/payloads/v10/voice.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/webhook.d.ts77
-rw-r--r--node_modules/discord-api-types/payloads/v10/webhook.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v10/webhook.js22
-rw-r--r--node_modules/discord-api-types/payloads/v10/webhook.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/auditLog.d.ts469
-rw-r--r--node_modules/discord-api-types/payloads/v6/auditLog.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/auditLog.js58
-rw-r--r--node_modules/discord-api-types/payloads/v6/auditLog.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/channel.d.ts343
-rw-r--r--node_modules/discord-api-types/payloads/v6/channel.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/channel.js95
-rw-r--r--node_modules/discord-api-types/payloads/v6/channel.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/emoji.d.ts27
-rw-r--r--node_modules/discord-api-types/payloads/v6/emoji.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/emoji.js6
-rw-r--r--node_modules/discord-api-types/payloads/v6/emoji.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/gateway.d.ts149
-rw-r--r--node_modules/discord-api-types/payloads/v6/gateway.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/gateway.js45
-rw-r--r--node_modules/discord-api-types/payloads/v6/gateway.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/guild.d.ts310
-rw-r--r--node_modules/discord-api-types/payloads/v6/guild.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/guild.js118
-rw-r--r--node_modules/discord-api-types/payloads/v6/guild.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/index.d.ts13
-rw-r--r--node_modules/discord-api-types/payloads/v6/index.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/index.js29
-rw-r--r--node_modules/discord-api-types/payloads/v6/index.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/index.mjs30
-rw-r--r--node_modules/discord-api-types/payloads/v6/invite.d.ts42
-rw-r--r--node_modules/discord-api-types/payloads/v6/invite.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/invite.js16
-rw-r--r--node_modules/discord-api-types/payloads/v6/invite.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/oauth2.d.ts28
-rw-r--r--node_modules/discord-api-types/payloads/v6/oauth2.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/oauth2.js6
-rw-r--r--node_modules/discord-api-types/payloads/v6/oauth2.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/permissions.d.ts75
-rw-r--r--node_modules/discord-api-types/payloads/v6/permissions.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/permissions.js56
-rw-r--r--node_modules/discord-api-types/payloads/v6/permissions.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/teams.d.ts36
-rw-r--r--node_modules/discord-api-types/payloads/v6/teams.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/teams.js17
-rw-r--r--node_modules/discord-api-types/payloads/v6/teams.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/user.d.ts79
-rw-r--r--node_modules/discord-api-types/payloads/v6/user.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/user.js48
-rw-r--r--node_modules/discord-api-types/payloads/v6/user.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/voice.d.ts37
-rw-r--r--node_modules/discord-api-types/payloads/v6/voice.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/voice.js6
-rw-r--r--node_modules/discord-api-types/payloads/v6/voice.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/webhook.d.ts32
-rw-r--r--node_modules/discord-api-types/payloads/v6/webhook.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v6/webhook.js15
-rw-r--r--node_modules/discord-api-types/payloads/v6/webhook.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.d.ts12
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.d.ts28
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.d.ts11
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.d.ts15
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.d.ts27
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.d.ts12
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.d.ts27
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.d.ts12
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.d.ts28
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.js23
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.d.ts13
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.d.ts18
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts18
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.d.ts12
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.d.ts90
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.js29
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.d.ts102
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.d.ts11
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.d.ts53
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.js14
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.d.ts112
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.js32
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.d.ts18
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/base.d.ts116
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/base.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/base.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/base.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.d.ts43
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.d.ts48
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/ping.d.ts7
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/ping.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/ping.js3
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/ping.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/responses.d.ts138
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/responses.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/responses.js53
-rw-r--r--node_modules/discord-api-types/payloads/v8/_interactions/responses.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/application.d.ts134
-rw-r--r--node_modules/discord-api-types/payloads/v8/application.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/application.js28
-rw-r--r--node_modules/discord-api-types/payloads/v8/application.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/auditLog.d.ts637
-rw-r--r--node_modules/discord-api-types/payloads/v8/auditLog.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/auditLog.js67
-rw-r--r--node_modules/discord-api-types/payloads/v8/auditLog.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/channel.d.ts1273
-rw-r--r--node_modules/discord-api-types/payloads/v8/channel.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/channel.js254
-rw-r--r--node_modules/discord-api-types/payloads/v8/channel.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/emoji.d.ts53
-rw-r--r--node_modules/discord-api-types/payloads/v8/emoji.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/emoji.js6
-rw-r--r--node_modules/discord-api-types/payloads/v8/emoji.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/gateway.d.ts332
-rw-r--r--node_modules/discord-api-types/payloads/v8/gateway.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/gateway.js79
-rw-r--r--node_modules/discord-api-types/payloads/v8/gateway.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/guild.d.ts1001
-rw-r--r--node_modules/discord-api-types/payloads/v8/guild.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/guild.js264
-rw-r--r--node_modules/discord-api-types/payloads/v8/guild.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/guildScheduledEvent.d.ts163
-rw-r--r--node_modules/discord-api-types/payloads/v8/guildScheduledEvent.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/guildScheduledEvent.js39
-rw-r--r--node_modules/discord-api-types/payloads/v8/guildScheduledEvent.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/index.d.ts20
-rw-r--r--node_modules/discord-api-types/payloads/v8/index.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/index.js36
-rw-r--r--node_modules/discord-api-types/payloads/v8/index.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/index.mjs51
-rw-r--r--node_modules/discord-api-types/payloads/v8/interactions.d.ts31
-rw-r--r--node_modules/discord-api-types/payloads/v8/interactions.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/interactions.js24
-rw-r--r--node_modules/discord-api-types/payloads/v8/interactions.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/invite.d.ts114
-rw-r--r--node_modules/discord-api-types/payloads/v8/invite.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/invite.js17
-rw-r--r--node_modules/discord-api-types/payloads/v8/invite.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/oauth2.d.ts117
-rw-r--r--node_modules/discord-api-types/payloads/v8/oauth2.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/oauth2.js121
-rw-r--r--node_modules/discord-api-types/payloads/v8/oauth2.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/permissions.d.ts77
-rw-r--r--node_modules/discord-api-types/payloads/v8/permissions.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/permissions.js6
-rw-r--r--node_modules/discord-api-types/payloads/v8/permissions.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/stageInstance.d.ts76
-rw-r--r--node_modules/discord-api-types/payloads/v8/stageInstance.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/stageInstance.js20
-rw-r--r--node_modules/discord-api-types/payloads/v8/stageInstance.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/sticker.d.ts133
-rw-r--r--node_modules/discord-api-types/payloads/v8/sticker.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/sticker.js34
-rw-r--r--node_modules/discord-api-types/payloads/v8/sticker.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/teams.d.ts69
-rw-r--r--node_modules/discord-api-types/payloads/v8/teams.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/teams.js17
-rw-r--r--node_modules/discord-api-types/payloads/v8/teams.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/template.d.ts68
-rw-r--r--node_modules/discord-api-types/payloads/v8/template.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/template.js6
-rw-r--r--node_modules/discord-api-types/payloads/v8/template.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/user.d.ts228
-rw-r--r--node_modules/discord-api-types/payloads/v8/user.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/user.js108
-rw-r--r--node_modules/discord-api-types/payloads/v8/user.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/voice.d.ts94
-rw-r--r--node_modules/discord-api-types/payloads/v8/voice.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/voice.js6
-rw-r--r--node_modules/discord-api-types/payloads/v8/voice.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/webhook.d.ts82
-rw-r--r--node_modules/discord-api-types/payloads/v8/webhook.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v8/webhook.js25
-rw-r--r--node_modules/discord-api-types/payloads/v8/webhook.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.d.ts6
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.d.ts23
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.d.ts5
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.d.ts9
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.d.ts18
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.d.ts6
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.d.ts18
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.d.ts6
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.d.ts26
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.js21
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.d.ts18
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.d.ts12
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts12
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.d.ts6
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.d.ts61
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.js30
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.d.ts66
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.d.ts9
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.d.ts55
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.js21
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.d.ts111
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.js30
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.d.ts11
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/base.d.ts147
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/base.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/base.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/base.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.d.ts42
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.d.ts36
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/ping.d.ts4
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/ping.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/ping.js3
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/ping.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/responses.d.ts104
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/responses.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/responses.js49
-rw-r--r--node_modules/discord-api-types/payloads/v9/_interactions/responses.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/application.d.ts265
-rw-r--r--node_modules/discord-api-types/payloads/v9/application.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/application.js118
-rw-r--r--node_modules/discord-api-types/payloads/v9/application.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/auditLog.d.ts597
-rw-r--r--node_modules/discord-api-types/payloads/v9/auditLog.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/auditLog.js74
-rw-r--r--node_modules/discord-api-types/payloads/v9/auditLog.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/autoModeration.d.ts208
-rw-r--r--node_modules/discord-api-types/payloads/v9/autoModeration.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/autoModeration.js76
-rw-r--r--node_modules/discord-api-types/payloads/v9/autoModeration.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/channel.d.ts1602
-rw-r--r--node_modules/discord-api-types/payloads/v9/channel.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/channel.js445
-rw-r--r--node_modules/discord-api-types/payloads/v9/channel.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/emoji.d.ts49
-rw-r--r--node_modules/discord-api-types/payloads/v9/emoji.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/emoji.js6
-rw-r--r--node_modules/discord-api-types/payloads/v9/emoji.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/gateway.d.ts358
-rw-r--r--node_modules/discord-api-types/payloads/v9/gateway.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/gateway.js80
-rw-r--r--node_modules/discord-api-types/payloads/v9/gateway.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/guild.d.ts1075
-rw-r--r--node_modules/discord-api-types/payloads/v9/guild.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/guild.js355
-rw-r--r--node_modules/discord-api-types/payloads/v9/guild.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/guildScheduledEvent.d.ts139
-rw-r--r--node_modules/discord-api-types/payloads/v9/guildScheduledEvent.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/guildScheduledEvent.js33
-rw-r--r--node_modules/discord-api-types/payloads/v9/guildScheduledEvent.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/index.d.ts21
-rw-r--r--node_modules/discord-api-types/payloads/v9/index.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/index.js37
-rw-r--r--node_modules/discord-api-types/payloads/v9/index.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/index.mjs69
-rw-r--r--node_modules/discord-api-types/payloads/v9/interactions.d.ts25
-rw-r--r--node_modules/discord-api-types/payloads/v9/interactions.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/interactions.js24
-rw-r--r--node_modules/discord-api-types/payloads/v9/interactions.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/invite.d.ts110
-rw-r--r--node_modules/discord-api-types/payloads/v9/invite.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/invite.js15
-rw-r--r--node_modules/discord-api-types/payloads/v9/invite.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/oauth2.d.ts132
-rw-r--r--node_modules/discord-api-types/payloads/v9/oauth2.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/oauth2.js136
-rw-r--r--node_modules/discord-api-types/payloads/v9/oauth2.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/permissions.d.ts95
-rw-r--r--node_modules/discord-api-types/payloads/v9/permissions.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/permissions.js14
-rw-r--r--node_modules/discord-api-types/payloads/v9/permissions.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/stageInstance.d.ts80
-rw-r--r--node_modules/discord-api-types/payloads/v9/stageInstance.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/stageInstance.js20
-rw-r--r--node_modules/discord-api-types/payloads/v9/stageInstance.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/sticker.d.ts124
-rw-r--r--node_modules/discord-api-types/payloads/v9/sticker.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/sticker.js31
-rw-r--r--node_modules/discord-api-types/payloads/v9/sticker.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/teams.d.ts63
-rw-r--r--node_modules/discord-api-types/payloads/v9/teams.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/teams.js15
-rw-r--r--node_modules/discord-api-types/payloads/v9/teams.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/template.d.ts63
-rw-r--r--node_modules/discord-api-types/payloads/v9/template.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/template.js6
-rw-r--r--node_modules/discord-api-types/payloads/v9/template.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/user.d.ts309
-rw-r--r--node_modules/discord-api-types/payloads/v9/user.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/user.js161
-rw-r--r--node_modules/discord-api-types/payloads/v9/user.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/voice.d.ts90
-rw-r--r--node_modules/discord-api-types/payloads/v9/voice.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/voice.js6
-rw-r--r--node_modules/discord-api-types/payloads/v9/voice.js.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/webhook.d.ts77
-rw-r--r--node_modules/discord-api-types/payloads/v9/webhook.d.ts.map1
-rw-r--r--node_modules/discord-api-types/payloads/v9/webhook.js22
-rw-r--r--node_modules/discord-api-types/payloads/v9/webhook.js.map1
-rw-r--r--node_modules/discord-api-types/rest/common.d.ts244
-rw-r--r--node_modules/discord-api-types/rest/common.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/common.js248
-rw-r--r--node_modules/discord-api-types/rest/common.js.map1
-rw-r--r--node_modules/discord-api-types/rest/index.d.ts2
-rw-r--r--node_modules/discord-api-types/rest/index.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/index.js20
-rw-r--r--node_modules/discord-api-types/rest/index.js.map1
-rw-r--r--node_modules/discord-api-types/rest/index.mjs12
-rw-r--r--node_modules/discord-api-types/rest/v10/application.d.ts18
-rw-r--r--node_modules/discord-api-types/rest/v10/application.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/application.js3
-rw-r--r--node_modules/discord-api-types/rest/v10/application.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/auditLog.d.ts31
-rw-r--r--node_modules/discord-api-types/rest/v10/auditLog.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/auditLog.js3
-rw-r--r--node_modules/discord-api-types/rest/v10/auditLog.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/autoModeration.d.ts68
-rw-r--r--node_modules/discord-api-types/rest/v10/autoModeration.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/autoModeration.js3
-rw-r--r--node_modules/discord-api-types/rest/v10/autoModeration.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/channel.d.ts659
-rw-r--r--node_modules/discord-api-types/rest/v10/channel.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/channel.js3
-rw-r--r--node_modules/discord-api-types/rest/v10/channel.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/emoji.d.ts55
-rw-r--r--node_modules/discord-api-types/rest/v10/emoji.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/emoji.js3
-rw-r--r--node_modules/discord-api-types/rest/v10/emoji.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/gateway.d.ts10
-rw-r--r--node_modules/discord-api-types/rest/v10/gateway.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/gateway.js3
-rw-r--r--node_modules/discord-api-types/rest/v10/gateway.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/guild.d.ts811
-rw-r--r--node_modules/discord-api-types/rest/v10/guild.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/guild.js3
-rw-r--r--node_modules/discord-api-types/rest/v10/guild.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/guildScheduledEvent.d.ts127
-rw-r--r--node_modules/discord-api-types/rest/v10/guildScheduledEvent.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/guildScheduledEvent.js3
-rw-r--r--node_modules/discord-api-types/rest/v10/guildScheduledEvent.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/index.d.ts815
-rw-r--r--node_modules/discord-api-types/rest/v10/index.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/index.js1050
-rw-r--r--node_modules/discord-api-types/rest/v10/index.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/index.mjs12
-rw-r--r--node_modules/discord-api-types/rest/v10/interactions.d.ts195
-rw-r--r--node_modules/discord-api-types/rest/v10/interactions.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/interactions.js3
-rw-r--r--node_modules/discord-api-types/rest/v10/interactions.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/invite.d.ts25
-rw-r--r--node_modules/discord-api-types/rest/v10/invite.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/invite.js3
-rw-r--r--node_modules/discord-api-types/rest/v10/invite.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/oauth2.d.ts173
-rw-r--r--node_modules/discord-api-types/rest/v10/oauth2.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/oauth2.js3
-rw-r--r--node_modules/discord-api-types/rest/v10/oauth2.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/stageInstance.d.ts55
-rw-r--r--node_modules/discord-api-types/rest/v10/stageInstance.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/stageInstance.js3
-rw-r--r--node_modules/discord-api-types/rest/v10/stageInstance.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/sticker.d.ts72
-rw-r--r--node_modules/discord-api-types/rest/v10/sticker.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/sticker.js3
-rw-r--r--node_modules/discord-api-types/rest/v10/sticker.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/template.d.ts63
-rw-r--r--node_modules/discord-api-types/rest/v10/template.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/template.js3
-rw-r--r--node_modules/discord-api-types/rest/v10/template.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/user.d.ts117
-rw-r--r--node_modules/discord-api-types/rest/v10/user.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/user.js3
-rw-r--r--node_modules/discord-api-types/rest/v10/user.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/voice.d.ts10
-rw-r--r--node_modules/discord-api-types/rest/v10/voice.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/voice.js3
-rw-r--r--node_modules/discord-api-types/rest/v10/voice.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/webhook.d.ts241
-rw-r--r--node_modules/discord-api-types/rest/v10/webhook.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v10/webhook.js3
-rw-r--r--node_modules/discord-api-types/rest/v10/webhook.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/auditLog.d.ts17
-rw-r--r--node_modules/discord-api-types/rest/v6/auditLog.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/auditLog.js3
-rw-r--r--node_modules/discord-api-types/rest/v6/auditLog.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/channel.d.ts268
-rw-r--r--node_modules/discord-api-types/rest/v6/channel.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/channel.js15
-rw-r--r--node_modules/discord-api-types/rest/v6/channel.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/emoji.d.ts50
-rw-r--r--node_modules/discord-api-types/rest/v6/emoji.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/emoji.js3
-rw-r--r--node_modules/discord-api-types/rest/v6/emoji.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/gateway.d.ts14
-rw-r--r--node_modules/discord-api-types/rest/v6/gateway.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/gateway.js3
-rw-r--r--node_modules/discord-api-types/rest/v6/gateway.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/guild.d.ts465
-rw-r--r--node_modules/discord-api-types/rest/v6/guild.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/guild.js3
-rw-r--r--node_modules/discord-api-types/rest/v6/guild.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/index.d.ts348
-rw-r--r--node_modules/discord-api-types/rest/v6/index.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/index.js480
-rw-r--r--node_modules/discord-api-types/rest/v6/index.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/index.mjs8
-rw-r--r--node_modules/discord-api-types/rest/v6/invite.d.ts20
-rw-r--r--node_modules/discord-api-types/rest/v6/invite.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/invite.js3
-rw-r--r--node_modules/discord-api-types/rest/v6/invite.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/oauth2.d.ts177
-rw-r--r--node_modules/discord-api-types/rest/v6/oauth2.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/oauth2.js3
-rw-r--r--node_modules/discord-api-types/rest/v6/oauth2.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/user.d.ts80
-rw-r--r--node_modules/discord-api-types/rest/v6/user.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/user.js3
-rw-r--r--node_modules/discord-api-types/rest/v6/user.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/voice.d.ts8
-rw-r--r--node_modules/discord-api-types/rest/v6/voice.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/voice.js3
-rw-r--r--node_modules/discord-api-types/rest/v6/voice.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/webhook.d.ts139
-rw-r--r--node_modules/discord-api-types/rest/v6/webhook.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v6/webhook.js3
-rw-r--r--node_modules/discord-api-types/rest/v6/webhook.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/auditLog.d.ts32
-rw-r--r--node_modules/discord-api-types/rest/v8/auditLog.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/auditLog.js3
-rw-r--r--node_modules/discord-api-types/rest/v8/auditLog.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/channel.d.ts564
-rw-r--r--node_modules/discord-api-types/rest/v8/channel.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/channel.js3
-rw-r--r--node_modules/discord-api-types/rest/v8/channel.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/emoji.d.ts69
-rw-r--r--node_modules/discord-api-types/rest/v8/emoji.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/emoji.js3
-rw-r--r--node_modules/discord-api-types/rest/v8/emoji.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/gateway.d.ts14
-rw-r--r--node_modules/discord-api-types/rest/v8/gateway.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/gateway.js3
-rw-r--r--node_modules/discord-api-types/rest/v8/gateway.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/guild.d.ts882
-rw-r--r--node_modules/discord-api-types/rest/v8/guild.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/guild.js3
-rw-r--r--node_modules/discord-api-types/rest/v8/guild.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/guildScheduledEvent.d.ts141
-rw-r--r--node_modules/discord-api-types/rest/v8/guildScheduledEvent.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/guildScheduledEvent.js3
-rw-r--r--node_modules/discord-api-types/rest/v8/guildScheduledEvent.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/index.d.ts539
-rw-r--r--node_modules/discord-api-types/rest/v8/index.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/index.js728
-rw-r--r--node_modules/discord-api-types/rest/v8/index.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/index.mjs9
-rw-r--r--node_modules/discord-api-types/rest/v8/interactions.d.ts257
-rw-r--r--node_modules/discord-api-types/rest/v8/interactions.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/interactions.js3
-rw-r--r--node_modules/discord-api-types/rest/v8/interactions.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/invite.d.ts32
-rw-r--r--node_modules/discord-api-types/rest/v8/invite.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/invite.js3
-rw-r--r--node_modules/discord-api-types/rest/v8/invite.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/oauth2.d.ts213
-rw-r--r--node_modules/discord-api-types/rest/v8/oauth2.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/oauth2.js3
-rw-r--r--node_modules/discord-api-types/rest/v8/oauth2.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/stageInstance.d.ts63
-rw-r--r--node_modules/discord-api-types/rest/v8/stageInstance.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/stageInstance.js3
-rw-r--r--node_modules/discord-api-types/rest/v8/stageInstance.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/sticker.d.ts70
-rw-r--r--node_modules/discord-api-types/rest/v8/sticker.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/sticker.js3
-rw-r--r--node_modules/discord-api-types/rest/v8/sticker.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/template.d.ts83
-rw-r--r--node_modules/discord-api-types/rest/v8/template.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/template.js3
-rw-r--r--node_modules/discord-api-types/rest/v8/template.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/user.d.ts109
-rw-r--r--node_modules/discord-api-types/rest/v8/user.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/user.js3
-rw-r--r--node_modules/discord-api-types/rest/v8/user.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/voice.d.ts8
-rw-r--r--node_modules/discord-api-types/rest/v8/voice.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/voice.js3
-rw-r--r--node_modules/discord-api-types/rest/v8/voice.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/webhook.d.ts283
-rw-r--r--node_modules/discord-api-types/rest/v8/webhook.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v8/webhook.js3
-rw-r--r--node_modules/discord-api-types/rest/v8/webhook.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/application.d.ts18
-rw-r--r--node_modules/discord-api-types/rest/v9/application.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/application.js3
-rw-r--r--node_modules/discord-api-types/rest/v9/application.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/auditLog.d.ts31
-rw-r--r--node_modules/discord-api-types/rest/v9/auditLog.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/auditLog.js3
-rw-r--r--node_modules/discord-api-types/rest/v9/auditLog.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/autoModeration.d.ts68
-rw-r--r--node_modules/discord-api-types/rest/v9/autoModeration.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/autoModeration.js3
-rw-r--r--node_modules/discord-api-types/rest/v9/autoModeration.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/channel.d.ts676
-rw-r--r--node_modules/discord-api-types/rest/v9/channel.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/channel.js3
-rw-r--r--node_modules/discord-api-types/rest/v9/channel.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/emoji.d.ts55
-rw-r--r--node_modules/discord-api-types/rest/v9/emoji.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/emoji.js3
-rw-r--r--node_modules/discord-api-types/rest/v9/emoji.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/gateway.d.ts10
-rw-r--r--node_modules/discord-api-types/rest/v9/gateway.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/gateway.js3
-rw-r--r--node_modules/discord-api-types/rest/v9/gateway.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/guild.d.ts817
-rw-r--r--node_modules/discord-api-types/rest/v9/guild.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/guild.js3
-rw-r--r--node_modules/discord-api-types/rest/v9/guild.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/guildScheduledEvent.d.ts127
-rw-r--r--node_modules/discord-api-types/rest/v9/guildScheduledEvent.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/guildScheduledEvent.js3
-rw-r--r--node_modules/discord-api-types/rest/v9/guildScheduledEvent.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/index.d.ts817
-rw-r--r--node_modules/discord-api-types/rest/v9/index.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/index.js1057
-rw-r--r--node_modules/discord-api-types/rest/v9/index.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/index.mjs12
-rw-r--r--node_modules/discord-api-types/rest/v9/interactions.d.ts195
-rw-r--r--node_modules/discord-api-types/rest/v9/interactions.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/interactions.js3
-rw-r--r--node_modules/discord-api-types/rest/v9/interactions.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/invite.d.ts25
-rw-r--r--node_modules/discord-api-types/rest/v9/invite.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/invite.js3
-rw-r--r--node_modules/discord-api-types/rest/v9/invite.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/oauth2.d.ts173
-rw-r--r--node_modules/discord-api-types/rest/v9/oauth2.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/oauth2.js3
-rw-r--r--node_modules/discord-api-types/rest/v9/oauth2.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/stageInstance.d.ts55
-rw-r--r--node_modules/discord-api-types/rest/v9/stageInstance.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/stageInstance.js3
-rw-r--r--node_modules/discord-api-types/rest/v9/stageInstance.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/sticker.d.ts72
-rw-r--r--node_modules/discord-api-types/rest/v9/sticker.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/sticker.js3
-rw-r--r--node_modules/discord-api-types/rest/v9/sticker.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/template.d.ts63
-rw-r--r--node_modules/discord-api-types/rest/v9/template.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/template.js3
-rw-r--r--node_modules/discord-api-types/rest/v9/template.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/user.d.ts117
-rw-r--r--node_modules/discord-api-types/rest/v9/user.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/user.js3
-rw-r--r--node_modules/discord-api-types/rest/v9/user.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/voice.d.ts10
-rw-r--r--node_modules/discord-api-types/rest/v9/voice.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/voice.js3
-rw-r--r--node_modules/discord-api-types/rest/v9/voice.js.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/webhook.d.ts241
-rw-r--r--node_modules/discord-api-types/rest/v9/webhook.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rest/v9/webhook.js3
-rw-r--r--node_modules/discord-api-types/rest/v9/webhook.js.map1
-rw-r--r--node_modules/discord-api-types/rpc/common.d.ts33
-rw-r--r--node_modules/discord-api-types/rpc/common.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rpc/common.js38
-rw-r--r--node_modules/discord-api-types/rpc/common.js.map1
-rw-r--r--node_modules/discord-api-types/rpc/index.d.ts2
-rw-r--r--node_modules/discord-api-types/rpc/index.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rpc/index.js20
-rw-r--r--node_modules/discord-api-types/rpc/index.js.map1
-rw-r--r--node_modules/discord-api-types/rpc/index.mjs5
-rw-r--r--node_modules/discord-api-types/rpc/v10.d.ts2
-rw-r--r--node_modules/discord-api-types/rpc/v10.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rpc/v10.js18
-rw-r--r--node_modules/discord-api-types/rpc/v10.js.map1
-rw-r--r--node_modules/discord-api-types/rpc/v10.mjs5
-rw-r--r--node_modules/discord-api-types/rpc/v8.d.ts2
-rw-r--r--node_modules/discord-api-types/rpc/v8.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rpc/v8.js18
-rw-r--r--node_modules/discord-api-types/rpc/v8.js.map1
-rw-r--r--node_modules/discord-api-types/rpc/v8.mjs5
-rw-r--r--node_modules/discord-api-types/rpc/v9.d.ts2
-rw-r--r--node_modules/discord-api-types/rpc/v9.d.ts.map1
-rw-r--r--node_modules/discord-api-types/rpc/v9.js18
-rw-r--r--node_modules/discord-api-types/rpc/v9.js.map1
-rw-r--r--node_modules/discord-api-types/rpc/v9.mjs5
-rw-r--r--node_modules/discord-api-types/utils/index.d.ts2
-rw-r--r--node_modules/discord-api-types/utils/index.d.ts.map1
-rw-r--r--node_modules/discord-api-types/utils/index.js20
-rw-r--r--node_modules/discord-api-types/utils/index.js.map1
-rw-r--r--node_modules/discord-api-types/utils/index.mjs16
-rw-r--r--node_modules/discord-api-types/utils/internals.d.ts29
-rw-r--r--node_modules/discord-api-types/utils/internals.d.ts.map1
-rw-r--r--node_modules/discord-api-types/utils/internals.js3
-rw-r--r--node_modules/discord-api-types/utils/internals.js.map1
-rw-r--r--node_modules/discord-api-types/utils/v10.d.ts93
-rw-r--r--node_modules/discord-api-types/utils/v10.d.ts.map1
-rw-r--r--node_modules/discord-api-types/utils/v10.js147
-rw-r--r--node_modules/discord-api-types/utils/v10.js.map1
-rw-r--r--node_modules/discord-api-types/utils/v10.mjs16
-rw-r--r--node_modules/discord-api-types/utils/v8.d.ts66
-rw-r--r--node_modules/discord-api-types/utils/v8.d.ts.map1
-rw-r--r--node_modules/discord-api-types/utils/v8.js97
-rw-r--r--node_modules/discord-api-types/utils/v8.js.map1
-rw-r--r--node_modules/discord-api-types/utils/v8.mjs11
-rw-r--r--node_modules/discord-api-types/utils/v9.d.ts93
-rw-r--r--node_modules/discord-api-types/utils/v9.d.ts.map1
-rw-r--r--node_modules/discord-api-types/utils/v9.js147
-rw-r--r--node_modules/discord-api-types/utils/v9.js.map1
-rw-r--r--node_modules/discord-api-types/utils/v9.mjs16
-rw-r--r--node_modules/discord-api-types/v10.d.ts7
-rw-r--r--node_modules/discord-api-types/v10.d.ts.map1
-rw-r--r--node_modules/discord-api-types/v10.js24
-rw-r--r--node_modules/discord-api-types/v10.js.map1
-rw-r--r--node_modules/discord-api-types/v10.mjs87
-rw-r--r--node_modules/discord-api-types/v6.d.ts5
-rw-r--r--node_modules/discord-api-types/v6.d.ts.map1
-rw-r--r--node_modules/discord-api-types/v6.js21
-rw-r--r--node_modules/discord-api-types/v6.js.map1
-rw-r--r--node_modules/discord-api-types/v6.mjs43
-rw-r--r--node_modules/discord-api-types/v8.d.ts7
-rw-r--r--node_modules/discord-api-types/v8.d.ts.map1
-rw-r--r--node_modules/discord-api-types/v8.js24
-rw-r--r--node_modules/discord-api-types/v8.js.map1
-rw-r--r--node_modules/discord-api-types/v8.mjs66
-rw-r--r--node_modules/discord-api-types/v9.d.ts7
-rw-r--r--node_modules/discord-api-types/v9.d.ts.map1
-rw-r--r--node_modules/discord-api-types/v9.js24
-rw-r--r--node_modules/discord-api-types/v9.js.map1
-rw-r--r--node_modules/discord-api-types/v9.mjs87
-rw-r--r--node_modules/discord-api-types/voice/index.d.ts2
-rw-r--r--node_modules/discord-api-types/voice/index.d.ts.map1
-rw-r--r--node_modules/discord-api-types/voice/index.js20
-rw-r--r--node_modules/discord-api-types/voice/index.js.map1
-rw-r--r--node_modules/discord-api-types/voice/index.mjs6
-rw-r--r--node_modules/discord-api-types/voice/v4.d.ts108
-rw-r--r--node_modules/discord-api-types/voice/v4.d.ts.map1
-rw-r--r--node_modules/discord-api-types/voice/v4.js113
-rw-r--r--node_modules/discord-api-types/voice/v4.js.map1
-rw-r--r--node_modules/discord-api-types/voice/v4.mjs6
-rw-r--r--node_modules/discord.js/CHANGELOG.md4899
-rw-r--r--node_modules/discord.js/LICENSE191
-rw-r--r--node_modules/discord.js/README.md142
-rw-r--r--node_modules/discord.js/package.json85
-rw-r--r--node_modules/discord.js/src/client/BaseClient.js83
-rw-r--r--node_modules/discord.js/src/client/Client.js608
-rw-r--r--node_modules/discord.js/src/client/WebhookClient.js103
-rw-r--r--node_modules/discord.js/src/client/actions/Action.js120
-rw-r--r--node_modules/discord.js/src/client/actions/ActionsManager.js79
-rw-r--r--node_modules/discord.js/src/client/actions/ApplicationCommandPermissionsUpdate.js34
-rw-r--r--node_modules/discord.js/src/client/actions/AutoModerationActionExecution.js26
-rw-r--r--node_modules/discord.js/src/client/actions/AutoModerationRuleCreate.js27
-rw-r--r--node_modules/discord.js/src/client/actions/AutoModerationRuleDelete.js31
-rw-r--r--node_modules/discord.js/src/client/actions/AutoModerationRuleUpdate.js29
-rw-r--r--node_modules/discord.js/src/client/actions/ChannelCreate.js23
-rw-r--r--node_modules/discord.js/src/client/actions/ChannelDelete.js23
-rw-r--r--node_modules/discord.js/src/client/actions/ChannelUpdate.js42
-rw-r--r--node_modules/discord.js/src/client/actions/GuildAuditLogEntryCreate.js29
-rw-r--r--node_modules/discord.js/src/client/actions/GuildBanAdd.js20
-rw-r--r--node_modules/discord.js/src/client/actions/GuildBanRemove.js25
-rw-r--r--node_modules/discord.js/src/client/actions/GuildChannelsPositionUpdate.js21
-rw-r--r--node_modules/discord.js/src/client/actions/GuildDelete.js44
-rw-r--r--node_modules/discord.js/src/client/actions/GuildEmojiCreate.js20
-rw-r--r--node_modules/discord.js/src/client/actions/GuildEmojiDelete.js19
-rw-r--r--node_modules/discord.js/src/client/actions/GuildEmojiUpdate.js20
-rw-r--r--node_modules/discord.js/src/client/actions/GuildEmojisUpdate.js34
-rw-r--r--node_modules/discord.js/src/client/actions/GuildIntegrationsUpdate.js19
-rw-r--r--node_modules/discord.js/src/client/actions/GuildMemberRemove.js31
-rw-r--r--node_modules/discord.js/src/client/actions/GuildMemberUpdate.js44
-rw-r--r--node_modules/discord.js/src/client/actions/GuildRoleCreate.js25
-rw-r--r--node_modules/discord.js/src/client/actions/GuildRoleDelete.js29
-rw-r--r--node_modules/discord.js/src/client/actions/GuildRoleUpdate.js39
-rw-r--r--node_modules/discord.js/src/client/actions/GuildRolesPositionUpdate.js21
-rw-r--r--node_modules/discord.js/src/client/actions/GuildScheduledEventCreate.js27
-rw-r--r--node_modules/discord.js/src/client/actions/GuildScheduledEventDelete.js31
-rw-r--r--node_modules/discord.js/src/client/actions/GuildScheduledEventUpdate.js30
-rw-r--r--node_modules/discord.js/src/client/actions/GuildScheduledEventUserAdd.js32
-rw-r--r--node_modules/discord.js/src/client/actions/GuildScheduledEventUserRemove.js32
-rw-r--r--node_modules/discord.js/src/client/actions/GuildStickerCreate.js20
-rw-r--r--node_modules/discord.js/src/client/actions/GuildStickerDelete.js19
-rw-r--r--node_modules/discord.js/src/client/actions/GuildStickerUpdate.js20
-rw-r--r--node_modules/discord.js/src/client/actions/GuildStickersUpdate.js34
-rw-r--r--node_modules/discord.js/src/client/actions/GuildUpdate.js33
-rw-r--r--node_modules/discord.js/src/client/actions/InteractionCreate.js101
-rw-r--r--node_modules/discord.js/src/client/actions/InviteCreate.js27
-rw-r--r--node_modules/discord.js/src/client/actions/InviteDelete.js29
-rw-r--r--node_modules/discord.js/src/client/actions/MessageCreate.js37
-rw-r--r--node_modules/discord.js/src/client/actions/MessageDelete.js32
-rw-r--r--node_modules/discord.js/src/client/actions/MessageDeleteBulk.js47
-rw-r--r--node_modules/discord.js/src/client/actions/MessageReactionAdd.js55
-rw-r--r--node_modules/discord.js/src/client/actions/MessageReactionRemove.js45
-rw-r--r--node_modules/discord.js/src/client/actions/MessageReactionRemoveAll.js33
-rw-r--r--node_modules/discord.js/src/client/actions/MessageReactionRemoveEmoji.js28
-rw-r--r--node_modules/discord.js/src/client/actions/MessageUpdate.js26
-rw-r--r--node_modules/discord.js/src/client/actions/PresenceUpdate.js42
-rw-r--r--node_modules/discord.js/src/client/actions/StageInstanceCreate.js28
-rw-r--r--node_modules/discord.js/src/client/actions/StageInstanceDelete.js31
-rw-r--r--node_modules/discord.js/src/client/actions/StageInstanceUpdate.js30
-rw-r--r--node_modules/discord.js/src/client/actions/ThreadCreate.js24
-rw-r--r--node_modules/discord.js/src/client/actions/ThreadDelete.js26
-rw-r--r--node_modules/discord.js/src/client/actions/ThreadListSync.js60
-rw-r--r--node_modules/discord.js/src/client/actions/ThreadMemberUpdate.js30
-rw-r--r--node_modules/discord.js/src/client/actions/ThreadMembersUpdate.js47
-rw-r--r--node_modules/discord.js/src/client/actions/TypingStart.js29
-rw-r--r--node_modules/discord.js/src/client/actions/UserUpdate.js36
-rw-r--r--node_modules/discord.js/src/client/actions/VoiceStateUpdate.js43
-rw-r--r--node_modules/discord.js/src/client/actions/WebhooksUpdate.js37
-rw-r--r--node_modules/discord.js/src/client/voice/ClientVoiceManager.js44
-rw-r--r--node_modules/discord.js/src/client/websocket/WebSocketManager.js394
-rw-r--r--node_modules/discord.js/src/client/websocket/WebSocketShard.js231
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/APPLICATION_COMMAND_PERMISSIONS_UPDATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_ACTION_EXECUTION.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_CREATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_DELETE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_UPDATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/CHANNEL_CREATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/CHANNEL_DELETE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/CHANNEL_PINS_UPDATE.js22
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/CHANNEL_UPDATE.js16
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_AUDIT_LOG_ENTRY_CREATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_BAN_ADD.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_BAN_REMOVE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_CREATE.js33
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_DELETE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_EMOJIS_UPDATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_INTEGRATIONS_UPDATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBERS_CHUNK.js39
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_ADD.js20
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_REMOVE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_UPDATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_CREATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_DELETE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_UPDATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_CREATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_DELETE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_UPDATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_USER_ADD.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_USER_REMOVE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_STICKERS_UPDATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/GUILD_UPDATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/INVITE_CREATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/INVITE_DELETE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/MESSAGE_DELETE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/MESSAGE_DELETE_BULK.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_ADD.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE_ALL.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE_EMOJI.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/MESSAGE_UPDATE.js16
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/PRESENCE_UPDATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/READY.js27
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/RESUMED.js14
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_CREATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_DELETE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_UPDATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/THREAD_CREATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/THREAD_DELETE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/THREAD_LIST_SYNC.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/THREAD_MEMBERS_UPDATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/THREAD_MEMBER_UPDATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/THREAD_UPDATE.js16
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/TYPING_START.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/USER_UPDATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/VOICE_SERVER_UPDATE.js6
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/VOICE_STATE_UPDATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/WEBHOOKS_UPDATE.js5
-rw-r--r--node_modules/discord.js/src/client/websocket/handlers/index.js64
-rw-r--r--node_modules/discord.js/src/errors/DJSError.js48
-rw-r--r--node_modules/discord.js/src/errors/ErrorCodes.js319
-rw-r--r--node_modules/discord.js/src/errors/Messages.js170
-rw-r--r--node_modules/discord.js/src/errors/index.js5
-rw-r--r--node_modules/discord.js/src/index.js220
-rw-r--r--node_modules/discord.js/src/managers/ApplicationCommandManager.js263
-rw-r--r--node_modules/discord.js/src/managers/ApplicationCommandPermissionsManager.js434
-rw-r--r--node_modules/discord.js/src/managers/AutoModerationRuleManager.js288
-rw-r--r--node_modules/discord.js/src/managers/BaseGuildEmojiManager.js80
-rw-r--r--node_modules/discord.js/src/managers/BaseManager.js19
-rw-r--r--node_modules/discord.js/src/managers/CachedManager.js64
-rw-r--r--node_modules/discord.js/src/managers/CategoryChannelChildManager.js77
-rw-r--r--node_modules/discord.js/src/managers/ChannelManager.js128
-rw-r--r--node_modules/discord.js/src/managers/DMMessageManager.js17
-rw-r--r--node_modules/discord.js/src/managers/DataManager.js61
-rw-r--r--node_modules/discord.js/src/managers/GuildApplicationCommandManager.js28
-rw-r--r--node_modules/discord.js/src/managers/GuildBanManager.js204
-rw-r--r--node_modules/discord.js/src/managers/GuildChannelManager.js503
-rw-r--r--node_modules/discord.js/src/managers/GuildEmojiManager.js174
-rw-r--r--node_modules/discord.js/src/managers/GuildEmojiRoleManager.js118
-rw-r--r--node_modules/discord.js/src/managers/GuildForumThreadManager.js83
-rw-r--r--node_modules/discord.js/src/managers/GuildInviteManager.js214
-rw-r--r--node_modules/discord.js/src/managers/GuildManager.js283
-rw-r--r--node_modules/discord.js/src/managers/GuildMemberManager.js540
-rw-r--r--node_modules/discord.js/src/managers/GuildMemberRoleManager.js204
-rw-r--r--node_modules/discord.js/src/managers/GuildMessageManager.js17
-rw-r--r--node_modules/discord.js/src/managers/GuildScheduledEventManager.js297
-rw-r--r--node_modules/discord.js/src/managers/GuildStickerManager.js182
-rw-r--r--node_modules/discord.js/src/managers/GuildTextThreadManager.js91
-rw-r--r--node_modules/discord.js/src/managers/MessageManager.js263
-rw-r--r--node_modules/discord.js/src/managers/PermissionOverwriteManager.js168
-rw-r--r--node_modules/discord.js/src/managers/PresenceManager.js58
-rw-r--r--node_modules/discord.js/src/managers/ReactionManager.js68
-rw-r--r--node_modules/discord.js/src/managers/ReactionUserManager.js77
-rw-r--r--node_modules/discord.js/src/managers/RoleManager.js360
-rw-r--r--node_modules/discord.js/src/managers/StageInstanceManager.js154
-rw-r--r--node_modules/discord.js/src/managers/ThreadManager.js207
-rw-r--r--node_modules/discord.js/src/managers/ThreadMemberManager.js182
-rw-r--r--node_modules/discord.js/src/managers/UserManager.js139
-rw-r--r--node_modules/discord.js/src/managers/VoiceStateManager.js37
-rw-r--r--node_modules/discord.js/src/sharding/Shard.js475
-rw-r--r--node_modules/discord.js/src/sharding/ShardClientUtil.js291
-rw-r--r--node_modules/discord.js/src/sharding/ShardingManager.js335
-rw-r--r--node_modules/discord.js/src/structures/ActionRow.js46
-rw-r--r--node_modules/discord.js/src/structures/ActionRowBuilder.js35
-rw-r--r--node_modules/discord.js/src/structures/AnonymousGuild.js97
-rw-r--r--node_modules/discord.js/src/structures/ApplicationCommand.js606
-rw-r--r--node_modules/discord.js/src/structures/ApplicationRoleConnectionMetadata.js46
-rw-r--r--node_modules/discord.js/src/structures/Attachment.js151
-rw-r--r--node_modules/discord.js/src/structures/AttachmentBuilder.js116
-rw-r--r--node_modules/discord.js/src/structures/AutoModerationActionExecution.js116
-rw-r--r--node_modules/discord.js/src/structures/AutoModerationRule.js284
-rw-r--r--node_modules/discord.js/src/structures/AutocompleteInteraction.js102
-rw-r--r--node_modules/discord.js/src/structures/Base.js43
-rw-r--r--node_modules/discord.js/src/structures/BaseChannel.js155
-rw-r--r--node_modules/discord.js/src/structures/BaseGuild.js119
-rw-r--r--node_modules/discord.js/src/structures/BaseGuildEmoji.js56
-rw-r--r--node_modules/discord.js/src/structures/BaseGuildTextChannel.js186
-rw-r--r--node_modules/discord.js/src/structures/BaseGuildVoiceChannel.js234
-rw-r--r--node_modules/discord.js/src/structures/BaseInteraction.js344
-rw-r--r--node_modules/discord.js/src/structures/BaseSelectMenuComponent.js56
-rw-r--r--node_modules/discord.js/src/structures/ButtonBuilder.js44
-rw-r--r--node_modules/discord.js/src/structures/ButtonComponent.js65
-rw-r--r--node_modules/discord.js/src/structures/ButtonInteraction.js11
-rw-r--r--node_modules/discord.js/src/structures/CategoryChannel.js45
-rw-r--r--node_modules/discord.js/src/structures/ChannelSelectMenuBuilder.js31
-rw-r--r--node_modules/discord.js/src/structures/ChannelSelectMenuComponent.js20
-rw-r--r--node_modules/discord.js/src/structures/ChannelSelectMenuInteraction.js33
-rw-r--r--node_modules/discord.js/src/structures/ChatInputCommandInteraction.js41
-rw-r--r--node_modules/discord.js/src/structures/ClientApplication.js222
-rw-r--r--node_modules/discord.js/src/structures/ClientPresence.js90
-rw-r--r--node_modules/discord.js/src/structures/ClientUser.js187
-rw-r--r--node_modules/discord.js/src/structures/CommandInteraction.js224
-rw-r--r--node_modules/discord.js/src/structures/CommandInteractionOptionResolver.js308
-rw-r--r--node_modules/discord.js/src/structures/Component.js47
-rw-r--r--node_modules/discord.js/src/structures/ContextMenuCommandInteraction.js64
-rw-r--r--node_modules/discord.js/src/structures/DMChannel.js129
-rw-r--r--node_modules/discord.js/src/structures/DirectoryChannel.js36
-rw-r--r--node_modules/discord.js/src/structures/Embed.js220
-rw-r--r--node_modules/discord.js/src/structures/EmbedBuilder.js50
-rw-r--r--node_modules/discord.js/src/structures/Emoji.js108
-rw-r--r--node_modules/discord.js/src/structures/ForumChannel.js264
-rw-r--r--node_modules/discord.js/src/structures/Guild.js1367
-rw-r--r--node_modules/discord.js/src/structures/GuildAuditLogs.js91
-rw-r--r--node_modules/discord.js/src/structures/GuildAuditLogsEntry.js528
-rw-r--r--node_modules/discord.js/src/structures/GuildBan.js59
-rw-r--r--node_modules/discord.js/src/structures/GuildChannel.js472
-rw-r--r--node_modules/discord.js/src/structures/GuildEmoji.js148
-rw-r--r--node_modules/discord.js/src/structures/GuildMember.js520
-rw-r--r--node_modules/discord.js/src/structures/GuildOnboarding.js58
-rw-r--r--node_modules/discord.js/src/structures/GuildOnboardingPrompt.js78
-rw-r--r--node_modules/discord.js/src/structures/GuildOnboardingPromptOption.js84
-rw-r--r--node_modules/discord.js/src/structures/GuildPreview.js193
-rw-r--r--node_modules/discord.js/src/structures/GuildPreviewEmoji.js27
-rw-r--r--node_modules/discord.js/src/structures/GuildScheduledEvent.js439
-rw-r--r--node_modules/discord.js/src/structures/GuildTemplate.js241
-rw-r--r--node_modules/discord.js/src/structures/Integration.js220
-rw-r--r--node_modules/discord.js/src/structures/IntegrationApplication.js85
-rw-r--r--node_modules/discord.js/src/structures/InteractionCollector.js269
-rw-r--r--node_modules/discord.js/src/structures/InteractionResponse.js102
-rw-r--r--node_modules/discord.js/src/structures/InteractionWebhook.js59
-rw-r--r--node_modules/discord.js/src/structures/Invite.js322
-rw-r--r--node_modules/discord.js/src/structures/InviteGuild.js22
-rw-r--r--node_modules/discord.js/src/structures/InviteStageInstance.js87
-rw-r--r--node_modules/discord.js/src/structures/MentionableSelectMenuBuilder.js32
-rw-r--r--node_modules/discord.js/src/structures/MentionableSelectMenuComponent.js11
-rw-r--r--node_modules/discord.js/src/structures/MentionableSelectMenuInteraction.js71
-rw-r--r--node_modules/discord.js/src/structures/Message.js997
-rw-r--r--node_modules/discord.js/src/structures/MessageCollector.js146
-rw-r--r--node_modules/discord.js/src/structures/MessageComponentInteraction.js107
-rw-r--r--node_modules/discord.js/src/structures/MessageContextMenuCommandInteraction.js20
-rw-r--r--node_modules/discord.js/src/structures/MessageMentions.js297
-rw-r--r--node_modules/discord.js/src/structures/MessagePayload.js299
-rw-r--r--node_modules/discord.js/src/structures/MessageReaction.js142
-rw-r--r--node_modules/discord.js/src/structures/ModalBuilder.js34
-rw-r--r--node_modules/discord.js/src/structures/ModalSubmitFields.js55
-rw-r--r--node_modules/discord.js/src/structures/ModalSubmitInteraction.js122
-rw-r--r--node_modules/discord.js/src/structures/NewsChannel.js32
-rw-r--r--node_modules/discord.js/src/structures/OAuth2Guild.js28
-rw-r--r--node_modules/discord.js/src/structures/PartialGroupDMChannel.js60
-rw-r--r--node_modules/discord.js/src/structures/PermissionOverwrites.js196
-rw-r--r--node_modules/discord.js/src/structures/Presence.js378
-rw-r--r--node_modules/discord.js/src/structures/ReactionCollector.js229
-rw-r--r--node_modules/discord.js/src/structures/ReactionEmoji.js31
-rw-r--r--node_modules/discord.js/src/structures/Role.js471
-rw-r--r--node_modules/discord.js/src/structures/RoleSelectMenuBuilder.js31
-rw-r--r--node_modules/discord.js/src/structures/RoleSelectMenuComponent.js11
-rw-r--r--node_modules/discord.js/src/structures/RoleSelectMenuInteraction.js33
-rw-r--r--node_modules/discord.js/src/structures/SelectMenuBuilder.js26
-rw-r--r--node_modules/discord.js/src/structures/SelectMenuComponent.js26
-rw-r--r--node_modules/discord.js/src/structures/SelectMenuInteraction.js26
-rw-r--r--node_modules/discord.js/src/structures/SelectMenuOptionBuilder.js26
-rw-r--r--node_modules/discord.js/src/structures/StageChannel.js112
-rw-r--r--node_modules/discord.js/src/structures/StageInstance.js167
-rw-r--r--node_modules/discord.js/src/structures/Sticker.js272
-rw-r--r--node_modules/discord.js/src/structures/StickerPack.js95
-rw-r--r--node_modules/discord.js/src/structures/StringSelectMenuBuilder.js79
-rw-r--r--node_modules/discord.js/src/structures/StringSelectMenuComponent.js20
-rw-r--r--node_modules/discord.js/src/structures/StringSelectMenuInteraction.js21
-rw-r--r--node_modules/discord.js/src/structures/StringSelectMenuOptionBuilder.js49
-rw-r--r--node_modules/discord.js/src/structures/Team.js117
-rw-r--r--node_modules/discord.js/src/structures/TeamMember.js70
-rw-r--r--node_modules/discord.js/src/structures/TextChannel.js33
-rw-r--r--node_modules/discord.js/src/structures/TextInputBuilder.js31
-rw-r--r--node_modules/discord.js/src/structures/TextInputComponent.js29
-rw-r--r--node_modules/discord.js/src/structures/ThreadChannel.js606
-rw-r--r--node_modules/discord.js/src/structures/ThreadMember.js113
-rw-r--r--node_modules/discord.js/src/structures/Typing.js74
-rw-r--r--node_modules/discord.js/src/structures/User.js380
-rw-r--r--node_modules/discord.js/src/structures/UserContextMenuCommandInteraction.js29
-rw-r--r--node_modules/discord.js/src/structures/UserSelectMenuBuilder.js31
-rw-r--r--node_modules/discord.js/src/structures/UserSelectMenuComponent.js11
-rw-r--r--node_modules/discord.js/src/structures/UserSelectMenuInteraction.js51
-rw-r--r--node_modules/discord.js/src/structures/VoiceChannel.js96
-rw-r--r--node_modules/discord.js/src/structures/VoiceRegion.js46
-rw-r--r--node_modules/discord.js/src/structures/VoiceState.js303
-rw-r--r--node_modules/discord.js/src/structures/Webhook.js479
-rw-r--r--node_modules/discord.js/src/structures/WelcomeChannel.js60
-rw-r--r--node_modules/discord.js/src/structures/WelcomeScreen.js49
-rw-r--r--node_modules/discord.js/src/structures/Widget.js88
-rw-r--r--node_modules/discord.js/src/structures/WidgetMember.js99
-rw-r--r--node_modules/discord.js/src/structures/interfaces/Application.js108
-rw-r--r--node_modules/discord.js/src/structures/interfaces/Collector.js335
-rw-r--r--node_modules/discord.js/src/structures/interfaces/InteractionResponses.js320
-rw-r--r--node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js413
-rw-r--r--node_modules/discord.js/src/util/APITypes.js476
-rw-r--r--node_modules/discord.js/src/util/ActivityFlagsBitField.js26
-rw-r--r--node_modules/discord.js/src/util/ApplicationFlagsBitField.js26
-rw-r--r--node_modules/discord.js/src/util/AttachmentFlagsBitField.js26
-rw-r--r--node_modules/discord.js/src/util/BitField.js176
-rw-r--r--node_modules/discord.js/src/util/ChannelFlagsBitField.js41
-rw-r--r--node_modules/discord.js/src/util/Channels.js150
-rw-r--r--node_modules/discord.js/src/util/Colors.js73
-rw-r--r--node_modules/discord.js/src/util/Components.js152
-rw-r--r--node_modules/discord.js/src/util/Constants.js230
-rw-r--r--node_modules/discord.js/src/util/DataResolver.js140
-rw-r--r--node_modules/discord.js/src/util/Enums.js13
-rw-r--r--node_modules/discord.js/src/util/Events.js162
-rw-r--r--node_modules/discord.js/src/util/Formatters.js413
-rw-r--r--node_modules/discord.js/src/util/GuildMemberFlagsBitField.js41
-rw-r--r--node_modules/discord.js/src/util/IntentsBitField.js34
-rw-r--r--node_modules/discord.js/src/util/LimitedCollection.js68
-rw-r--r--node_modules/discord.js/src/util/MessageFlagsBitField.js32
-rw-r--r--node_modules/discord.js/src/util/Options.js237
-rw-r--r--node_modules/discord.js/src/util/Partials.js44
-rw-r--r--node_modules/discord.js/src/util/PermissionsBitField.js104
-rw-r--r--node_modules/discord.js/src/util/RoleFlagsBitField.js26
-rw-r--r--node_modules/discord.js/src/util/ShardEvents.js29
-rw-r--r--node_modules/discord.js/src/util/Status.js33
-rw-r--r--node_modules/discord.js/src/util/Sweepers.js467
-rw-r--r--node_modules/discord.js/src/util/Symbols.js3
-rw-r--r--node_modules/discord.js/src/util/SystemChannelFlagsBitField.js43
-rw-r--r--node_modules/discord.js/src/util/ThreadMemberFlagsBitField.js31
-rw-r--r--node_modules/discord.js/src/util/Transformers.js36
-rw-r--r--node_modules/discord.js/src/util/UserFlagsBitField.js32
-rw-r--r--node_modules/discord.js/src/util/Util.js424
-rw-r--r--node_modules/discord.js/src/util/WebSocketShardEvents.js25
-rw-r--r--node_modules/discord.js/typings/index.d.ts6520
-rw-r--r--node_modules/discord.js/typings/index.test-d.ts2311
-rw-r--r--node_modules/discord.js/typings/rawDataTypes.d.ts210
-rw-r--r--node_modules/fast-deep-equal/LICENSE21
-rw-r--r--node_modules/fast-deep-equal/README.md96
-rw-r--r--node_modules/fast-deep-equal/es6/index.d.ts2
-rw-r--r--node_modules/fast-deep-equal/es6/index.js72
-rw-r--r--node_modules/fast-deep-equal/es6/react.d.ts2
-rw-r--r--node_modules/fast-deep-equal/es6/react.js79
-rw-r--r--node_modules/fast-deep-equal/index.d.ts4
-rw-r--r--node_modules/fast-deep-equal/index.js46
-rw-r--r--node_modules/fast-deep-equal/package.json61
-rw-r--r--node_modules/fast-deep-equal/react.d.ts2
-rw-r--r--node_modules/fast-deep-equal/react.js53
-rw-r--r--node_modules/lodash.snakecase/LICENSE47
-rw-r--r--node_modules/lodash.snakecase/README.md18
-rw-r--r--node_modules/lodash.snakecase/index.js435
-rw-r--r--node_modules/lodash.snakecase/package.json17
-rw-r--r--node_modules/lodash/LICENSE47
-rw-r--r--node_modules/lodash/README.md39
-rw-r--r--node_modules/lodash/_DataView.js7
-rw-r--r--node_modules/lodash/_Hash.js32
-rw-r--r--node_modules/lodash/_LazyWrapper.js28
-rw-r--r--node_modules/lodash/_ListCache.js32
-rw-r--r--node_modules/lodash/_LodashWrapper.js22
-rw-r--r--node_modules/lodash/_Map.js7
-rw-r--r--node_modules/lodash/_MapCache.js32
-rw-r--r--node_modules/lodash/_Promise.js7
-rw-r--r--node_modules/lodash/_Set.js7
-rw-r--r--node_modules/lodash/_SetCache.js27
-rw-r--r--node_modules/lodash/_Stack.js27
-rw-r--r--node_modules/lodash/_Symbol.js6
-rw-r--r--node_modules/lodash/_Uint8Array.js6
-rw-r--r--node_modules/lodash/_WeakMap.js7
-rw-r--r--node_modules/lodash/_apply.js21
-rw-r--r--node_modules/lodash/_arrayAggregator.js22
-rw-r--r--node_modules/lodash/_arrayEach.js22
-rw-r--r--node_modules/lodash/_arrayEachRight.js21
-rw-r--r--node_modules/lodash/_arrayEvery.js23
-rw-r--r--node_modules/lodash/_arrayFilter.js25
-rw-r--r--node_modules/lodash/_arrayIncludes.js17
-rw-r--r--node_modules/lodash/_arrayIncludesWith.js22
-rw-r--r--node_modules/lodash/_arrayLikeKeys.js49
-rw-r--r--node_modules/lodash/_arrayMap.js21
-rw-r--r--node_modules/lodash/_arrayPush.js20
-rw-r--r--node_modules/lodash/_arrayReduce.js26
-rw-r--r--node_modules/lodash/_arrayReduceRight.js24
-rw-r--r--node_modules/lodash/_arraySample.js15
-rw-r--r--node_modules/lodash/_arraySampleSize.js17
-rw-r--r--node_modules/lodash/_arrayShuffle.js15
-rw-r--r--node_modules/lodash/_arraySome.js23
-rw-r--r--node_modules/lodash/_asciiSize.js12
-rw-r--r--node_modules/lodash/_asciiToArray.js12
-rw-r--r--node_modules/lodash/_asciiWords.js15
-rw-r--r--node_modules/lodash/_assignMergeValue.js20
-rw-r--r--node_modules/lodash/_assignValue.js28
-rw-r--r--node_modules/lodash/_assocIndexOf.js21
-rw-r--r--node_modules/lodash/_baseAggregator.js21
-rw-r--r--node_modules/lodash/_baseAssign.js17
-rw-r--r--node_modules/lodash/_baseAssignIn.js17
-rw-r--r--node_modules/lodash/_baseAssignValue.js25
-rw-r--r--node_modules/lodash/_baseAt.js23
-rw-r--r--node_modules/lodash/_baseClamp.js22
-rw-r--r--node_modules/lodash/_baseClone.js166
-rw-r--r--node_modules/lodash/_baseConforms.js18
-rw-r--r--node_modules/lodash/_baseConformsTo.js27
-rw-r--r--node_modules/lodash/_baseCreate.js30
-rw-r--r--node_modules/lodash/_baseDelay.js21
-rw-r--r--node_modules/lodash/_baseDifference.js67
-rw-r--r--node_modules/lodash/_baseEach.js14
-rw-r--r--node_modules/lodash/_baseEachRight.js14
-rw-r--r--node_modules/lodash/_baseEvery.js21
-rw-r--r--node_modules/lodash/_baseExtremum.js32
-rw-r--r--node_modules/lodash/_baseFill.js32
-rw-r--r--node_modules/lodash/_baseFilter.js21
-rw-r--r--node_modules/lodash/_baseFindIndex.js24
-rw-r--r--node_modules/lodash/_baseFindKey.js23
-rw-r--r--node_modules/lodash/_baseFlatten.js38
-rw-r--r--node_modules/lodash/_baseFor.js16
-rw-r--r--node_modules/lodash/_baseForOwn.js16
-rw-r--r--node_modules/lodash/_baseForOwnRight.js16
-rw-r--r--node_modules/lodash/_baseForRight.js15
-rw-r--r--node_modules/lodash/_baseFunctions.js19
-rw-r--r--node_modules/lodash/_baseGet.js24
-rw-r--r--node_modules/lodash/_baseGetAllKeys.js20
-rw-r--r--node_modules/lodash/_baseGetTag.js28
-rw-r--r--node_modules/lodash/_baseGt.js14
-rw-r--r--node_modules/lodash/_baseHas.js19
-rw-r--r--node_modules/lodash/_baseHasIn.js13
-rw-r--r--node_modules/lodash/_baseInRange.js18
-rw-r--r--node_modules/lodash/_baseIndexOf.js20
-rw-r--r--node_modules/lodash/_baseIndexOfWith.js23
-rw-r--r--node_modules/lodash/_baseIntersection.js74
-rw-r--r--node_modules/lodash/_baseInverter.js21
-rw-r--r--node_modules/lodash/_baseInvoke.js24
-rw-r--r--node_modules/lodash/_baseIsArguments.js18
-rw-r--r--node_modules/lodash/_baseIsArrayBuffer.js17
-rw-r--r--node_modules/lodash/_baseIsDate.js18
-rw-r--r--node_modules/lodash/_baseIsEqual.js28
-rw-r--r--node_modules/lodash/_baseIsEqualDeep.js83
-rw-r--r--node_modules/lodash/_baseIsMap.js18
-rw-r--r--node_modules/lodash/_baseIsMatch.js62
-rw-r--r--node_modules/lodash/_baseIsNaN.js12
-rw-r--r--node_modules/lodash/_baseIsNative.js47
-rw-r--r--node_modules/lodash/_baseIsRegExp.js18
-rw-r--r--node_modules/lodash/_baseIsSet.js18
-rw-r--r--node_modules/lodash/_baseIsTypedArray.js60
-rw-r--r--node_modules/lodash/_baseIteratee.js31
-rw-r--r--node_modules/lodash/_baseKeys.js30
-rw-r--r--node_modules/lodash/_baseKeysIn.js33
-rw-r--r--node_modules/lodash/_baseLodash.js10
-rw-r--r--node_modules/lodash/_baseLt.js14
-rw-r--r--node_modules/lodash/_baseMap.js22
-rw-r--r--node_modules/lodash/_baseMatches.js22
-rw-r--r--node_modules/lodash/_baseMatchesProperty.js33
-rw-r--r--node_modules/lodash/_baseMean.js20
-rw-r--r--node_modules/lodash/_baseMerge.js42
-rw-r--r--node_modules/lodash/_baseMergeDeep.js94
-rw-r--r--node_modules/lodash/_baseNth.js20
-rw-r--r--node_modules/lodash/_baseOrderBy.js49
-rw-r--r--node_modules/lodash/_basePick.js19
-rw-r--r--node_modules/lodash/_basePickBy.js30
-rw-r--r--node_modules/lodash/_baseProperty.js14
-rw-r--r--node_modules/lodash/_basePropertyDeep.js16
-rw-r--r--node_modules/lodash/_basePropertyOf.js14
-rw-r--r--node_modules/lodash/_basePullAll.js51
-rw-r--r--node_modules/lodash/_basePullAt.js37
-rw-r--r--node_modules/lodash/_baseRandom.js18
-rw-r--r--node_modules/lodash/_baseRange.js28
-rw-r--r--node_modules/lodash/_baseReduce.js23
-rw-r--r--node_modules/lodash/_baseRepeat.js35
-rw-r--r--node_modules/lodash/_baseRest.js17
-rw-r--r--node_modules/lodash/_baseSample.js15
-rw-r--r--node_modules/lodash/_baseSampleSize.js18
-rw-r--r--node_modules/lodash/_baseSet.js51
-rw-r--r--node_modules/lodash/_baseSetData.js17
-rw-r--r--node_modules/lodash/_baseSetToString.js22
-rw-r--r--node_modules/lodash/_baseShuffle.js15
-rw-r--r--node_modules/lodash/_baseSlice.js31
-rw-r--r--node_modules/lodash/_baseSome.js22
-rw-r--r--node_modules/lodash/_baseSortBy.js21
-rw-r--r--node_modules/lodash/_baseSortedIndex.js42
-rw-r--r--node_modules/lodash/_baseSortedIndexBy.js67
-rw-r--r--node_modules/lodash/_baseSortedUniq.js30
-rw-r--r--node_modules/lodash/_baseSum.js24
-rw-r--r--node_modules/lodash/_baseTimes.js20
-rw-r--r--node_modules/lodash/_baseToNumber.js24
-rw-r--r--node_modules/lodash/_baseToPairs.js18
-rw-r--r--node_modules/lodash/_baseToString.js37
-rw-r--r--node_modules/lodash/_baseTrim.js19
-rw-r--r--node_modules/lodash/_baseUnary.js14
-rw-r--r--node_modules/lodash/_baseUniq.js72
-rw-r--r--node_modules/lodash/_baseUnset.js20
-rw-r--r--node_modules/lodash/_baseUpdate.js18
-rw-r--r--node_modules/lodash/_baseValues.js19
-rw-r--r--node_modules/lodash/_baseWhile.js26
-rw-r--r--node_modules/lodash/_baseWrapperValue.js25
-rw-r--r--node_modules/lodash/_baseXor.js36
-rw-r--r--node_modules/lodash/_baseZipObject.js23
-rw-r--r--node_modules/lodash/_cacheHas.js13
-rw-r--r--node_modules/lodash/_castArrayLikeObject.js14
-rw-r--r--node_modules/lodash/_castFunction.js14
-rw-r--r--node_modules/lodash/_castPath.js21
-rw-r--r--node_modules/lodash/_castRest.js14
-rw-r--r--node_modules/lodash/_castSlice.js18
-rw-r--r--node_modules/lodash/_charsEndIndex.js19
-rw-r--r--node_modules/lodash/_charsStartIndex.js20
-rw-r--r--node_modules/lodash/_cloneArrayBuffer.js16
-rw-r--r--node_modules/lodash/_cloneBuffer.js35
-rw-r--r--node_modules/lodash/_cloneDataView.js16
-rw-r--r--node_modules/lodash/_cloneRegExp.js17
-rw-r--r--node_modules/lodash/_cloneSymbol.js18
-rw-r--r--node_modules/lodash/_cloneTypedArray.js16
-rw-r--r--node_modules/lodash/_compareAscending.js41
-rw-r--r--node_modules/lodash/_compareMultiple.js44
-rw-r--r--node_modules/lodash/_composeArgs.js39
-rw-r--r--node_modules/lodash/_composeArgsRight.js41
-rw-r--r--node_modules/lodash/_copyArray.js20
-rw-r--r--node_modules/lodash/_copyObject.js40
-rw-r--r--node_modules/lodash/_copySymbols.js16
-rw-r--r--node_modules/lodash/_copySymbolsIn.js16
-rw-r--r--node_modules/lodash/_coreJsData.js6
-rw-r--r--node_modules/lodash/_countHolders.js21
-rw-r--r--node_modules/lodash/_createAggregator.js23
-rw-r--r--node_modules/lodash/_createAssigner.js37
-rw-r--r--node_modules/lodash/_createBaseEach.js32
-rw-r--r--node_modules/lodash/_createBaseFor.js25
-rw-r--r--node_modules/lodash/_createBind.js28
-rw-r--r--node_modules/lodash/_createCaseFirst.js33
-rw-r--r--node_modules/lodash/_createCompounder.js24
-rw-r--r--node_modules/lodash/_createCtor.js37
-rw-r--r--node_modules/lodash/_createCurry.js46
-rw-r--r--node_modules/lodash/_createFind.js25
-rw-r--r--node_modules/lodash/_createFlow.js78
-rw-r--r--node_modules/lodash/_createHybrid.js92
-rw-r--r--node_modules/lodash/_createInverter.js17
-rw-r--r--node_modules/lodash/_createMathOperation.js38
-rw-r--r--node_modules/lodash/_createOver.js27
-rw-r--r--node_modules/lodash/_createPadding.js33
-rw-r--r--node_modules/lodash/_createPartial.js43
-rw-r--r--node_modules/lodash/_createRange.js30
-rw-r--r--node_modules/lodash/_createRecurry.js56
-rw-r--r--node_modules/lodash/_createRelationalOperation.js20
-rw-r--r--node_modules/lodash/_createRound.js35
-rw-r--r--node_modules/lodash/_createSet.js19
-rw-r--r--node_modules/lodash/_createToPairs.js30
-rw-r--r--node_modules/lodash/_createWrap.js106
-rw-r--r--node_modules/lodash/_customDefaultsAssignIn.js29
-rw-r--r--node_modules/lodash/_customDefaultsMerge.js28
-rw-r--r--node_modules/lodash/_customOmitClone.js16
-rw-r--r--node_modules/lodash/_deburrLetter.js71
-rw-r--r--node_modules/lodash/_defineProperty.js11
-rw-r--r--node_modules/lodash/_equalArrays.js84
-rw-r--r--node_modules/lodash/_equalByTag.js112
-rw-r--r--node_modules/lodash/_equalObjects.js90
-rw-r--r--node_modules/lodash/_escapeHtmlChar.js21
-rw-r--r--node_modules/lodash/_escapeStringChar.js22
-rw-r--r--node_modules/lodash/_flatRest.js16
-rw-r--r--node_modules/lodash/_freeGlobal.js4
-rw-r--r--node_modules/lodash/_getAllKeys.js16
-rw-r--r--node_modules/lodash/_getAllKeysIn.js17
-rw-r--r--node_modules/lodash/_getData.js15
-rw-r--r--node_modules/lodash/_getFuncName.js31
-rw-r--r--node_modules/lodash/_getHolder.js13
-rw-r--r--node_modules/lodash/_getMapData.js18
-rw-r--r--node_modules/lodash/_getMatchData.js24
-rw-r--r--node_modules/lodash/_getNative.js17
-rw-r--r--node_modules/lodash/_getPrototype.js6
-rw-r--r--node_modules/lodash/_getRawTag.js46
-rw-r--r--node_modules/lodash/_getSymbols.js30
-rw-r--r--node_modules/lodash/_getSymbolsIn.js25
-rw-r--r--node_modules/lodash/_getTag.js58
-rw-r--r--node_modules/lodash/_getValue.js13
-rw-r--r--node_modules/lodash/_getView.js33
-rw-r--r--node_modules/lodash/_getWrapDetails.js17
-rw-r--r--node_modules/lodash/_hasPath.js39
-rw-r--r--node_modules/lodash/_hasUnicode.js26
-rw-r--r--node_modules/lodash/_hasUnicodeWord.js15
-rw-r--r--node_modules/lodash/_hashClear.js15
-rw-r--r--node_modules/lodash/_hashDelete.js17
-rw-r--r--node_modules/lodash/_hashGet.js30
-rw-r--r--node_modules/lodash/_hashHas.js23
-rw-r--r--node_modules/lodash/_hashSet.js23
-rw-r--r--node_modules/lodash/_initCloneArray.js26
-rw-r--r--node_modules/lodash/_initCloneByTag.js77
-rw-r--r--node_modules/lodash/_initCloneObject.js18
-rw-r--r--node_modules/lodash/_insertWrapDetails.js23
-rw-r--r--node_modules/lodash/_isFlattenable.js20
-rw-r--r--node_modules/lodash/_isIndex.js25
-rw-r--r--node_modules/lodash/_isIterateeCall.js30
-rw-r--r--node_modules/lodash/_isKey.js29
-rw-r--r--node_modules/lodash/_isKeyable.js15
-rw-r--r--node_modules/lodash/_isLaziable.js28
-rw-r--r--node_modules/lodash/_isMaskable.js14
-rw-r--r--node_modules/lodash/_isMasked.js20
-rw-r--r--node_modules/lodash/_isPrototype.js18
-rw-r--r--node_modules/lodash/_isStrictComparable.js15
-rw-r--r--node_modules/lodash/_iteratorToArray.js18
-rw-r--r--node_modules/lodash/_lazyClone.js23
-rw-r--r--node_modules/lodash/_lazyReverse.js23
-rw-r--r--node_modules/lodash/_lazyValue.js69
-rw-r--r--node_modules/lodash/_listCacheClear.js13
-rw-r--r--node_modules/lodash/_listCacheDelete.js35
-rw-r--r--node_modules/lodash/_listCacheGet.js19
-rw-r--r--node_modules/lodash/_listCacheHas.js16
-rw-r--r--node_modules/lodash/_listCacheSet.js26
-rw-r--r--node_modules/lodash/_mapCacheClear.js21
-rw-r--r--node_modules/lodash/_mapCacheDelete.js18
-rw-r--r--node_modules/lodash/_mapCacheGet.js16
-rw-r--r--node_modules/lodash/_mapCacheHas.js16
-rw-r--r--node_modules/lodash/_mapCacheSet.js22
-rw-r--r--node_modules/lodash/_mapToArray.js18
-rw-r--r--node_modules/lodash/_matchesStrictComparable.js20
-rw-r--r--node_modules/lodash/_memoizeCapped.js26
-rw-r--r--node_modules/lodash/_mergeData.js90
-rw-r--r--node_modules/lodash/_metaMap.js6
-rw-r--r--node_modules/lodash/_nativeCreate.js6
-rw-r--r--node_modules/lodash/_nativeKeys.js6
-rw-r--r--node_modules/lodash/_nativeKeysIn.js20
-rw-r--r--node_modules/lodash/_nodeUtil.js30
-rw-r--r--node_modules/lodash/_objectToString.js22
-rw-r--r--node_modules/lodash/_overArg.js15
-rw-r--r--node_modules/lodash/_overRest.js36
-rw-r--r--node_modules/lodash/_parent.js16
-rw-r--r--node_modules/lodash/_reEscape.js4
-rw-r--r--node_modules/lodash/_reEvaluate.js4
-rw-r--r--node_modules/lodash/_reInterpolate.js4
-rw-r--r--node_modules/lodash/_realNames.js4
-rw-r--r--node_modules/lodash/_reorder.js29
-rw-r--r--node_modules/lodash/_replaceHolders.js29
-rw-r--r--node_modules/lodash/_root.js9
-rw-r--r--node_modules/lodash/_safeGet.js21
-rw-r--r--node_modules/lodash/_setCacheAdd.js19
-rw-r--r--node_modules/lodash/_setCacheHas.js14
-rw-r--r--node_modules/lodash/_setData.js20
-rw-r--r--node_modules/lodash/_setToArray.js18
-rw-r--r--node_modules/lodash/_setToPairs.js18
-rw-r--r--node_modules/lodash/_setToString.js14
-rw-r--r--node_modules/lodash/_setWrapToString.js21
-rw-r--r--node_modules/lodash/_shortOut.js37
-rw-r--r--node_modules/lodash/_shuffleSelf.js28
-rw-r--r--node_modules/lodash/_stackClear.js15
-rw-r--r--node_modules/lodash/_stackDelete.js18
-rw-r--r--node_modules/lodash/_stackGet.js14
-rw-r--r--node_modules/lodash/_stackHas.js14
-rw-r--r--node_modules/lodash/_stackSet.js34
-rw-r--r--node_modules/lodash/_strictIndexOf.js23
-rw-r--r--node_modules/lodash/_strictLastIndexOf.js21
-rw-r--r--node_modules/lodash/_stringSize.js18
-rw-r--r--node_modules/lodash/_stringToArray.js18
-rw-r--r--node_modules/lodash/_stringToPath.js27
-rw-r--r--node_modules/lodash/_toKey.js21
-rw-r--r--node_modules/lodash/_toSource.js26
-rw-r--r--node_modules/lodash/_trimmedEndIndex.js19
-rw-r--r--node_modules/lodash/_unescapeHtmlChar.js21
-rw-r--r--node_modules/lodash/_unicodeSize.js44
-rw-r--r--node_modules/lodash/_unicodeToArray.js40
-rw-r--r--node_modules/lodash/_unicodeWords.js69
-rw-r--r--node_modules/lodash/_updateWrapDetails.js46
-rw-r--r--node_modules/lodash/_wrapperClone.js23
-rw-r--r--node_modules/lodash/add.js22
-rw-r--r--node_modules/lodash/after.js42
-rw-r--r--node_modules/lodash/array.js67
-rw-r--r--node_modules/lodash/ary.js29
-rw-r--r--node_modules/lodash/assign.js58
-rw-r--r--node_modules/lodash/assignIn.js40
-rw-r--r--node_modules/lodash/assignInWith.js38
-rw-r--r--node_modules/lodash/assignWith.js37
-rw-r--r--node_modules/lodash/at.js23
-rw-r--r--node_modules/lodash/attempt.js35
-rw-r--r--node_modules/lodash/before.js40
-rw-r--r--node_modules/lodash/bind.js57
-rw-r--r--node_modules/lodash/bindAll.js41
-rw-r--r--node_modules/lodash/bindKey.js68
-rw-r--r--node_modules/lodash/camelCase.js29
-rw-r--r--node_modules/lodash/capitalize.js23
-rw-r--r--node_modules/lodash/castArray.js44
-rw-r--r--node_modules/lodash/ceil.js26
-rw-r--r--node_modules/lodash/chain.js38
-rw-r--r--node_modules/lodash/chunk.js50
-rw-r--r--node_modules/lodash/clamp.js39
-rw-r--r--node_modules/lodash/clone.js36
-rw-r--r--node_modules/lodash/cloneDeep.js29
-rw-r--r--node_modules/lodash/cloneDeepWith.js40
-rw-r--r--node_modules/lodash/cloneWith.js42
-rw-r--r--node_modules/lodash/collection.js30
-rw-r--r--node_modules/lodash/commit.js33
-rw-r--r--node_modules/lodash/compact.js31
-rw-r--r--node_modules/lodash/concat.js43
-rw-r--r--node_modules/lodash/cond.js60
-rw-r--r--node_modules/lodash/conforms.js35
-rw-r--r--node_modules/lodash/conformsTo.js32
-rw-r--r--node_modules/lodash/constant.js26
-rw-r--r--node_modules/lodash/core.js3877
-rw-r--r--node_modules/lodash/core.min.js29
-rw-r--r--node_modules/lodash/countBy.js40
-rw-r--r--node_modules/lodash/create.js43
-rw-r--r--node_modules/lodash/curry.js57
-rw-r--r--node_modules/lodash/curryRight.js54
-rw-r--r--node_modules/lodash/date.js3
-rw-r--r--node_modules/lodash/debounce.js191
-rw-r--r--node_modules/lodash/deburr.js45
-rw-r--r--node_modules/lodash/defaultTo.js25
-rw-r--r--node_modules/lodash/defaults.js64
-rw-r--r--node_modules/lodash/defaultsDeep.js30
-rw-r--r--node_modules/lodash/defer.js26
-rw-r--r--node_modules/lodash/delay.js28
-rw-r--r--node_modules/lodash/difference.js33
-rw-r--r--node_modules/lodash/differenceBy.js44
-rw-r--r--node_modules/lodash/differenceWith.js40
-rw-r--r--node_modules/lodash/divide.js22
-rw-r--r--node_modules/lodash/drop.js38
-rw-r--r--node_modules/lodash/dropRight.js39
-rw-r--r--node_modules/lodash/dropRightWhile.js45
-rw-r--r--node_modules/lodash/dropWhile.js45
-rw-r--r--node_modules/lodash/each.js1
-rw-r--r--node_modules/lodash/eachRight.js1
-rw-r--r--node_modules/lodash/endsWith.js43
-rw-r--r--node_modules/lodash/entries.js1
-rw-r--r--node_modules/lodash/entriesIn.js1
-rw-r--r--node_modules/lodash/eq.js37
-rw-r--r--node_modules/lodash/escape.js43
-rw-r--r--node_modules/lodash/escapeRegExp.js32
-rw-r--r--node_modules/lodash/every.js56
-rw-r--r--node_modules/lodash/extend.js1
-rw-r--r--node_modules/lodash/extendWith.js1
-rw-r--r--node_modules/lodash/fill.js45
-rw-r--r--node_modules/lodash/filter.js52
-rw-r--r--node_modules/lodash/find.js42
-rw-r--r--node_modules/lodash/findIndex.js55
-rw-r--r--node_modules/lodash/findKey.js44
-rw-r--r--node_modules/lodash/findLast.js25
-rw-r--r--node_modules/lodash/findLastIndex.js59
-rw-r--r--node_modules/lodash/findLastKey.js44
-rw-r--r--node_modules/lodash/first.js1
-rw-r--r--node_modules/lodash/flake.lock40
-rw-r--r--node_modules/lodash/flake.nix20
-rw-r--r--node_modules/lodash/flatMap.js29
-rw-r--r--node_modules/lodash/flatMapDeep.js31
-rw-r--r--node_modules/lodash/flatMapDepth.js31
-rw-r--r--node_modules/lodash/flatten.js22
-rw-r--r--node_modules/lodash/flattenDeep.js25
-rw-r--r--node_modules/lodash/flattenDepth.js33
-rw-r--r--node_modules/lodash/flip.js28
-rw-r--r--node_modules/lodash/floor.js26
-rw-r--r--node_modules/lodash/flow.js27
-rw-r--r--node_modules/lodash/flowRight.js26
-rw-r--r--node_modules/lodash/forEach.js41
-rw-r--r--node_modules/lodash/forEachRight.js31
-rw-r--r--node_modules/lodash/forIn.js39
-rw-r--r--node_modules/lodash/forInRight.js37
-rw-r--r--node_modules/lodash/forOwn.js36
-rw-r--r--node_modules/lodash/forOwnRight.js34
-rw-r--r--node_modules/lodash/fp.js2
-rw-r--r--node_modules/lodash/fp/F.js1
-rw-r--r--node_modules/lodash/fp/T.js1
-rw-r--r--node_modules/lodash/fp/__.js1
-rw-r--r--node_modules/lodash/fp/_baseConvert.js569
-rw-r--r--node_modules/lodash/fp/_convertBrowser.js18
-rw-r--r--node_modules/lodash/fp/_falseOptions.js7
-rw-r--r--node_modules/lodash/fp/_mapping.js358
-rw-r--r--node_modules/lodash/fp/_util.js16
-rw-r--r--node_modules/lodash/fp/add.js5
-rw-r--r--node_modules/lodash/fp/after.js5
-rw-r--r--node_modules/lodash/fp/all.js1
-rw-r--r--node_modules/lodash/fp/allPass.js1
-rw-r--r--node_modules/lodash/fp/always.js1
-rw-r--r--node_modules/lodash/fp/any.js1
-rw-r--r--node_modules/lodash/fp/anyPass.js1
-rw-r--r--node_modules/lodash/fp/apply.js1
-rw-r--r--node_modules/lodash/fp/array.js2
-rw-r--r--node_modules/lodash/fp/ary.js5
-rw-r--r--node_modules/lodash/fp/assign.js5
-rw-r--r--node_modules/lodash/fp/assignAll.js5
-rw-r--r--node_modules/lodash/fp/assignAllWith.js5
-rw-r--r--node_modules/lodash/fp/assignIn.js5
-rw-r--r--node_modules/lodash/fp/assignInAll.js5
-rw-r--r--node_modules/lodash/fp/assignInAllWith.js5
-rw-r--r--node_modules/lodash/fp/assignInWith.js5
-rw-r--r--node_modules/lodash/fp/assignWith.js5
-rw-r--r--node_modules/lodash/fp/assoc.js1
-rw-r--r--node_modules/lodash/fp/assocPath.js1
-rw-r--r--node_modules/lodash/fp/at.js5
-rw-r--r--node_modules/lodash/fp/attempt.js5
-rw-r--r--node_modules/lodash/fp/before.js5
-rw-r--r--node_modules/lodash/fp/bind.js5
-rw-r--r--node_modules/lodash/fp/bindAll.js5
-rw-r--r--node_modules/lodash/fp/bindKey.js5
-rw-r--r--node_modules/lodash/fp/camelCase.js5
-rw-r--r--node_modules/lodash/fp/capitalize.js5
-rw-r--r--node_modules/lodash/fp/castArray.js5
-rw-r--r--node_modules/lodash/fp/ceil.js5
-rw-r--r--node_modules/lodash/fp/chain.js5
-rw-r--r--node_modules/lodash/fp/chunk.js5
-rw-r--r--node_modules/lodash/fp/clamp.js5
-rw-r--r--node_modules/lodash/fp/clone.js5
-rw-r--r--node_modules/lodash/fp/cloneDeep.js5
-rw-r--r--node_modules/lodash/fp/cloneDeepWith.js5
-rw-r--r--node_modules/lodash/fp/cloneWith.js5
-rw-r--r--node_modules/lodash/fp/collection.js2
-rw-r--r--node_modules/lodash/fp/commit.js5
-rw-r--r--node_modules/lodash/fp/compact.js5
-rw-r--r--node_modules/lodash/fp/complement.js1
-rw-r--r--node_modules/lodash/fp/compose.js1
-rw-r--r--node_modules/lodash/fp/concat.js5
-rw-r--r--node_modules/lodash/fp/cond.js5
-rw-r--r--node_modules/lodash/fp/conforms.js1
-rw-r--r--node_modules/lodash/fp/conformsTo.js5
-rw-r--r--node_modules/lodash/fp/constant.js5
-rw-r--r--node_modules/lodash/fp/contains.js1
-rw-r--r--node_modules/lodash/fp/convert.js18
-rw-r--r--node_modules/lodash/fp/countBy.js5
-rw-r--r--node_modules/lodash/fp/create.js5
-rw-r--r--node_modules/lodash/fp/curry.js5
-rw-r--r--node_modules/lodash/fp/curryN.js5
-rw-r--r--node_modules/lodash/fp/curryRight.js5
-rw-r--r--node_modules/lodash/fp/curryRightN.js5
-rw-r--r--node_modules/lodash/fp/date.js2
-rw-r--r--node_modules/lodash/fp/debounce.js5
-rw-r--r--node_modules/lodash/fp/deburr.js5
-rw-r--r--node_modules/lodash/fp/defaultTo.js5
-rw-r--r--node_modules/lodash/fp/defaults.js5
-rw-r--r--node_modules/lodash/fp/defaultsAll.js5
-rw-r--r--node_modules/lodash/fp/defaultsDeep.js5
-rw-r--r--node_modules/lodash/fp/defaultsDeepAll.js5
-rw-r--r--node_modules/lodash/fp/defer.js5
-rw-r--r--node_modules/lodash/fp/delay.js5
-rw-r--r--node_modules/lodash/fp/difference.js5
-rw-r--r--node_modules/lodash/fp/differenceBy.js5
-rw-r--r--node_modules/lodash/fp/differenceWith.js5
-rw-r--r--node_modules/lodash/fp/dissoc.js1
-rw-r--r--node_modules/lodash/fp/dissocPath.js1
-rw-r--r--node_modules/lodash/fp/divide.js5
-rw-r--r--node_modules/lodash/fp/drop.js5
-rw-r--r--node_modules/lodash/fp/dropLast.js1
-rw-r--r--node_modules/lodash/fp/dropLastWhile.js1
-rw-r--r--node_modules/lodash/fp/dropRight.js5
-rw-r--r--node_modules/lodash/fp/dropRightWhile.js5
-rw-r--r--node_modules/lodash/fp/dropWhile.js5
-rw-r--r--node_modules/lodash/fp/each.js1
-rw-r--r--node_modules/lodash/fp/eachRight.js1
-rw-r--r--node_modules/lodash/fp/endsWith.js5
-rw-r--r--node_modules/lodash/fp/entries.js1
-rw-r--r--node_modules/lodash/fp/entriesIn.js1
-rw-r--r--node_modules/lodash/fp/eq.js5
-rw-r--r--node_modules/lodash/fp/equals.js1
-rw-r--r--node_modules/lodash/fp/escape.js5
-rw-r--r--node_modules/lodash/fp/escapeRegExp.js5
-rw-r--r--node_modules/lodash/fp/every.js5
-rw-r--r--node_modules/lodash/fp/extend.js1
-rw-r--r--node_modules/lodash/fp/extendAll.js1
-rw-r--r--node_modules/lodash/fp/extendAllWith.js1
-rw-r--r--node_modules/lodash/fp/extendWith.js1
-rw-r--r--node_modules/lodash/fp/fill.js5
-rw-r--r--node_modules/lodash/fp/filter.js5
-rw-r--r--node_modules/lodash/fp/find.js5
-rw-r--r--node_modules/lodash/fp/findFrom.js5
-rw-r--r--node_modules/lodash/fp/findIndex.js5
-rw-r--r--node_modules/lodash/fp/findIndexFrom.js5
-rw-r--r--node_modules/lodash/fp/findKey.js5
-rw-r--r--node_modules/lodash/fp/findLast.js5
-rw-r--r--node_modules/lodash/fp/findLastFrom.js5
-rw-r--r--node_modules/lodash/fp/findLastIndex.js5
-rw-r--r--node_modules/lodash/fp/findLastIndexFrom.js5
-rw-r--r--node_modules/lodash/fp/findLastKey.js5
-rw-r--r--node_modules/lodash/fp/first.js1
-rw-r--r--node_modules/lodash/fp/flatMap.js5
-rw-r--r--node_modules/lodash/fp/flatMapDeep.js5
-rw-r--r--node_modules/lodash/fp/flatMapDepth.js5
-rw-r--r--node_modules/lodash/fp/flatten.js5
-rw-r--r--node_modules/lodash/fp/flattenDeep.js5
-rw-r--r--node_modules/lodash/fp/flattenDepth.js5
-rw-r--r--node_modules/lodash/fp/flip.js5
-rw-r--r--node_modules/lodash/fp/floor.js5
-rw-r--r--node_modules/lodash/fp/flow.js5
-rw-r--r--node_modules/lodash/fp/flowRight.js5
-rw-r--r--node_modules/lodash/fp/forEach.js5
-rw-r--r--node_modules/lodash/fp/forEachRight.js5
-rw-r--r--node_modules/lodash/fp/forIn.js5
-rw-r--r--node_modules/lodash/fp/forInRight.js5
-rw-r--r--node_modules/lodash/fp/forOwn.js5
-rw-r--r--node_modules/lodash/fp/forOwnRight.js5
-rw-r--r--node_modules/lodash/fp/fromPairs.js5
-rw-r--r--node_modules/lodash/fp/function.js2
-rw-r--r--node_modules/lodash/fp/functions.js5
-rw-r--r--node_modules/lodash/fp/functionsIn.js5
-rw-r--r--node_modules/lodash/fp/get.js5
-rw-r--r--node_modules/lodash/fp/getOr.js5
-rw-r--r--node_modules/lodash/fp/groupBy.js5
-rw-r--r--node_modules/lodash/fp/gt.js5
-rw-r--r--node_modules/lodash/fp/gte.js5
-rw-r--r--node_modules/lodash/fp/has.js5
-rw-r--r--node_modules/lodash/fp/hasIn.js5
-rw-r--r--node_modules/lodash/fp/head.js5
-rw-r--r--node_modules/lodash/fp/identical.js1
-rw-r--r--node_modules/lodash/fp/identity.js5
-rw-r--r--node_modules/lodash/fp/inRange.js5
-rw-r--r--node_modules/lodash/fp/includes.js5
-rw-r--r--node_modules/lodash/fp/includesFrom.js5
-rw-r--r--node_modules/lodash/fp/indexBy.js1
-rw-r--r--node_modules/lodash/fp/indexOf.js5
-rw-r--r--node_modules/lodash/fp/indexOfFrom.js5
-rw-r--r--node_modules/lodash/fp/init.js1
-rw-r--r--node_modules/lodash/fp/initial.js5
-rw-r--r--node_modules/lodash/fp/intersection.js5
-rw-r--r--node_modules/lodash/fp/intersectionBy.js5
-rw-r--r--node_modules/lodash/fp/intersectionWith.js5
-rw-r--r--node_modules/lodash/fp/invert.js5
-rw-r--r--node_modules/lodash/fp/invertBy.js5
-rw-r--r--node_modules/lodash/fp/invertObj.js1
-rw-r--r--node_modules/lodash/fp/invoke.js5
-rw-r--r--node_modules/lodash/fp/invokeArgs.js5
-rw-r--r--node_modules/lodash/fp/invokeArgsMap.js5
-rw-r--r--node_modules/lodash/fp/invokeMap.js5
-rw-r--r--node_modules/lodash/fp/isArguments.js5
-rw-r--r--node_modules/lodash/fp/isArray.js5
-rw-r--r--node_modules/lodash/fp/isArrayBuffer.js5
-rw-r--r--node_modules/lodash/fp/isArrayLike.js5
-rw-r--r--node_modules/lodash/fp/isArrayLikeObject.js5
-rw-r--r--node_modules/lodash/fp/isBoolean.js5
-rw-r--r--node_modules/lodash/fp/isBuffer.js5
-rw-r--r--node_modules/lodash/fp/isDate.js5
-rw-r--r--node_modules/lodash/fp/isElement.js5
-rw-r--r--node_modules/lodash/fp/isEmpty.js5
-rw-r--r--node_modules/lodash/fp/isEqual.js5
-rw-r--r--node_modules/lodash/fp/isEqualWith.js5
-rw-r--r--node_modules/lodash/fp/isError.js5
-rw-r--r--node_modules/lodash/fp/isFinite.js5
-rw-r--r--node_modules/lodash/fp/isFunction.js5
-rw-r--r--node_modules/lodash/fp/isInteger.js5
-rw-r--r--node_modules/lodash/fp/isLength.js5
-rw-r--r--node_modules/lodash/fp/isMap.js5
-rw-r--r--node_modules/lodash/fp/isMatch.js5
-rw-r--r--node_modules/lodash/fp/isMatchWith.js5
-rw-r--r--node_modules/lodash/fp/isNaN.js5
-rw-r--r--node_modules/lodash/fp/isNative.js5
-rw-r--r--node_modules/lodash/fp/isNil.js5
-rw-r--r--node_modules/lodash/fp/isNull.js5
-rw-r--r--node_modules/lodash/fp/isNumber.js5
-rw-r--r--node_modules/lodash/fp/isObject.js5
-rw-r--r--node_modules/lodash/fp/isObjectLike.js5
-rw-r--r--node_modules/lodash/fp/isPlainObject.js5
-rw-r--r--node_modules/lodash/fp/isRegExp.js5
-rw-r--r--node_modules/lodash/fp/isSafeInteger.js5
-rw-r--r--node_modules/lodash/fp/isSet.js5
-rw-r--r--node_modules/lodash/fp/isString.js5
-rw-r--r--node_modules/lodash/fp/isSymbol.js5
-rw-r--r--node_modules/lodash/fp/isTypedArray.js5
-rw-r--r--node_modules/lodash/fp/isUndefined.js5
-rw-r--r--node_modules/lodash/fp/isWeakMap.js5
-rw-r--r--node_modules/lodash/fp/isWeakSet.js5
-rw-r--r--node_modules/lodash/fp/iteratee.js5
-rw-r--r--node_modules/lodash/fp/join.js5
-rw-r--r--node_modules/lodash/fp/juxt.js1
-rw-r--r--node_modules/lodash/fp/kebabCase.js5
-rw-r--r--node_modules/lodash/fp/keyBy.js5
-rw-r--r--node_modules/lodash/fp/keys.js5
-rw-r--r--node_modules/lodash/fp/keysIn.js5
-rw-r--r--node_modules/lodash/fp/lang.js2
-rw-r--r--node_modules/lodash/fp/last.js5
-rw-r--r--node_modules/lodash/fp/lastIndexOf.js5
-rw-r--r--node_modules/lodash/fp/lastIndexOfFrom.js5
-rw-r--r--node_modules/lodash/fp/lowerCase.js5
-rw-r--r--node_modules/lodash/fp/lowerFirst.js5
-rw-r--r--node_modules/lodash/fp/lt.js5
-rw-r--r--node_modules/lodash/fp/lte.js5
-rw-r--r--node_modules/lodash/fp/map.js5
-rw-r--r--node_modules/lodash/fp/mapKeys.js5
-rw-r--r--node_modules/lodash/fp/mapValues.js5
-rw-r--r--node_modules/lodash/fp/matches.js1
-rw-r--r--node_modules/lodash/fp/matchesProperty.js5
-rw-r--r--node_modules/lodash/fp/math.js2
-rw-r--r--node_modules/lodash/fp/max.js5
-rw-r--r--node_modules/lodash/fp/maxBy.js5
-rw-r--r--node_modules/lodash/fp/mean.js5
-rw-r--r--node_modules/lodash/fp/meanBy.js5
-rw-r--r--node_modules/lodash/fp/memoize.js5
-rw-r--r--node_modules/lodash/fp/merge.js5
-rw-r--r--node_modules/lodash/fp/mergeAll.js5
-rw-r--r--node_modules/lodash/fp/mergeAllWith.js5
-rw-r--r--node_modules/lodash/fp/mergeWith.js5
-rw-r--r--node_modules/lodash/fp/method.js5
-rw-r--r--node_modules/lodash/fp/methodOf.js5
-rw-r--r--node_modules/lodash/fp/min.js5
-rw-r--r--node_modules/lodash/fp/minBy.js5
-rw-r--r--node_modules/lodash/fp/mixin.js5
-rw-r--r--node_modules/lodash/fp/multiply.js5
-rw-r--r--node_modules/lodash/fp/nAry.js1
-rw-r--r--node_modules/lodash/fp/negate.js5
-rw-r--r--node_modules/lodash/fp/next.js5
-rw-r--r--node_modules/lodash/fp/noop.js5
-rw-r--r--node_modules/lodash/fp/now.js5
-rw-r--r--node_modules/lodash/fp/nth.js5
-rw-r--r--node_modules/lodash/fp/nthArg.js5
-rw-r--r--node_modules/lodash/fp/number.js2
-rw-r--r--node_modules/lodash/fp/object.js2
-rw-r--r--node_modules/lodash/fp/omit.js5
-rw-r--r--node_modules/lodash/fp/omitAll.js1
-rw-r--r--node_modules/lodash/fp/omitBy.js5
-rw-r--r--node_modules/lodash/fp/once.js5
-rw-r--r--node_modules/lodash/fp/orderBy.js5
-rw-r--r--node_modules/lodash/fp/over.js5
-rw-r--r--node_modules/lodash/fp/overArgs.js5
-rw-r--r--node_modules/lodash/fp/overEvery.js5
-rw-r--r--node_modules/lodash/fp/overSome.js5
-rw-r--r--node_modules/lodash/fp/pad.js5
-rw-r--r--node_modules/lodash/fp/padChars.js5
-rw-r--r--node_modules/lodash/fp/padCharsEnd.js5
-rw-r--r--node_modules/lodash/fp/padCharsStart.js5
-rw-r--r--node_modules/lodash/fp/padEnd.js5
-rw-r--r--node_modules/lodash/fp/padStart.js5
-rw-r--r--node_modules/lodash/fp/parseInt.js5
-rw-r--r--node_modules/lodash/fp/partial.js5
-rw-r--r--node_modules/lodash/fp/partialRight.js5
-rw-r--r--node_modules/lodash/fp/partition.js5
-rw-r--r--node_modules/lodash/fp/path.js1
-rw-r--r--node_modules/lodash/fp/pathEq.js1
-rw-r--r--node_modules/lodash/fp/pathOr.js1
-rw-r--r--node_modules/lodash/fp/paths.js1
-rw-r--r--node_modules/lodash/fp/pick.js5
-rw-r--r--node_modules/lodash/fp/pickAll.js1
-rw-r--r--node_modules/lodash/fp/pickBy.js5
-rw-r--r--node_modules/lodash/fp/pipe.js1
-rw-r--r--node_modules/lodash/fp/placeholder.js6
-rw-r--r--node_modules/lodash/fp/plant.js5
-rw-r--r--node_modules/lodash/fp/pluck.js1
-rw-r--r--node_modules/lodash/fp/prop.js1
-rw-r--r--node_modules/lodash/fp/propEq.js1
-rw-r--r--node_modules/lodash/fp/propOr.js1
-rw-r--r--node_modules/lodash/fp/property.js1
-rw-r--r--node_modules/lodash/fp/propertyOf.js5
-rw-r--r--node_modules/lodash/fp/props.js1
-rw-r--r--node_modules/lodash/fp/pull.js5
-rw-r--r--node_modules/lodash/fp/pullAll.js5
-rw-r--r--node_modules/lodash/fp/pullAllBy.js5
-rw-r--r--node_modules/lodash/fp/pullAllWith.js5
-rw-r--r--node_modules/lodash/fp/pullAt.js5
-rw-r--r--node_modules/lodash/fp/random.js5
-rw-r--r--node_modules/lodash/fp/range.js5
-rw-r--r--node_modules/lodash/fp/rangeRight.js5
-rw-r--r--node_modules/lodash/fp/rangeStep.js5
-rw-r--r--node_modules/lodash/fp/rangeStepRight.js5
-rw-r--r--node_modules/lodash/fp/rearg.js5
-rw-r--r--node_modules/lodash/fp/reduce.js5
-rw-r--r--node_modules/lodash/fp/reduceRight.js5
-rw-r--r--node_modules/lodash/fp/reject.js5
-rw-r--r--node_modules/lodash/fp/remove.js5
-rw-r--r--node_modules/lodash/fp/repeat.js5
-rw-r--r--node_modules/lodash/fp/replace.js5
-rw-r--r--node_modules/lodash/fp/rest.js5
-rw-r--r--node_modules/lodash/fp/restFrom.js5
-rw-r--r--node_modules/lodash/fp/result.js5
-rw-r--r--node_modules/lodash/fp/reverse.js5
-rw-r--r--node_modules/lodash/fp/round.js5
-rw-r--r--node_modules/lodash/fp/sample.js5
-rw-r--r--node_modules/lodash/fp/sampleSize.js5
-rw-r--r--node_modules/lodash/fp/seq.js2
-rw-r--r--node_modules/lodash/fp/set.js5
-rw-r--r--node_modules/lodash/fp/setWith.js5
-rw-r--r--node_modules/lodash/fp/shuffle.js5
-rw-r--r--node_modules/lodash/fp/size.js5
-rw-r--r--node_modules/lodash/fp/slice.js5
-rw-r--r--node_modules/lodash/fp/snakeCase.js5
-rw-r--r--node_modules/lodash/fp/some.js5
-rw-r--r--node_modules/lodash/fp/sortBy.js5
-rw-r--r--node_modules/lodash/fp/sortedIndex.js5
-rw-r--r--node_modules/lodash/fp/sortedIndexBy.js5
-rw-r--r--node_modules/lodash/fp/sortedIndexOf.js5
-rw-r--r--node_modules/lodash/fp/sortedLastIndex.js5
-rw-r--r--node_modules/lodash/fp/sortedLastIndexBy.js5
-rw-r--r--node_modules/lodash/fp/sortedLastIndexOf.js5
-rw-r--r--node_modules/lodash/fp/sortedUniq.js5
-rw-r--r--node_modules/lodash/fp/sortedUniqBy.js5
-rw-r--r--node_modules/lodash/fp/split.js5
-rw-r--r--node_modules/lodash/fp/spread.js5
-rw-r--r--node_modules/lodash/fp/spreadFrom.js5
-rw-r--r--node_modules/lodash/fp/startCase.js5
-rw-r--r--node_modules/lodash/fp/startsWith.js5
-rw-r--r--node_modules/lodash/fp/string.js2
-rw-r--r--node_modules/lodash/fp/stubArray.js5
-rw-r--r--node_modules/lodash/fp/stubFalse.js5
-rw-r--r--node_modules/lodash/fp/stubObject.js5
-rw-r--r--node_modules/lodash/fp/stubString.js5
-rw-r--r--node_modules/lodash/fp/stubTrue.js5
-rw-r--r--node_modules/lodash/fp/subtract.js5
-rw-r--r--node_modules/lodash/fp/sum.js5
-rw-r--r--node_modules/lodash/fp/sumBy.js5
-rw-r--r--node_modules/lodash/fp/symmetricDifference.js1
-rw-r--r--node_modules/lodash/fp/symmetricDifferenceBy.js1
-rw-r--r--node_modules/lodash/fp/symmetricDifferenceWith.js1
-rw-r--r--node_modules/lodash/fp/tail.js5
-rw-r--r--node_modules/lodash/fp/take.js5
-rw-r--r--node_modules/lodash/fp/takeLast.js1
-rw-r--r--node_modules/lodash/fp/takeLastWhile.js1
-rw-r--r--node_modules/lodash/fp/takeRight.js5
-rw-r--r--node_modules/lodash/fp/takeRightWhile.js5
-rw-r--r--node_modules/lodash/fp/takeWhile.js5
-rw-r--r--node_modules/lodash/fp/tap.js5
-rw-r--r--node_modules/lodash/fp/template.js5
-rw-r--r--node_modules/lodash/fp/templateSettings.js5
-rw-r--r--node_modules/lodash/fp/throttle.js5
-rw-r--r--node_modules/lodash/fp/thru.js5
-rw-r--r--node_modules/lodash/fp/times.js5
-rw-r--r--node_modules/lodash/fp/toArray.js5
-rw-r--r--node_modules/lodash/fp/toFinite.js5
-rw-r--r--node_modules/lodash/fp/toInteger.js5
-rw-r--r--node_modules/lodash/fp/toIterator.js5
-rw-r--r--node_modules/lodash/fp/toJSON.js5
-rw-r--r--node_modules/lodash/fp/toLength.js5
-rw-r--r--node_modules/lodash/fp/toLower.js5
-rw-r--r--node_modules/lodash/fp/toNumber.js5
-rw-r--r--node_modules/lodash/fp/toPairs.js5
-rw-r--r--node_modules/lodash/fp/toPairsIn.js5
-rw-r--r--node_modules/lodash/fp/toPath.js5
-rw-r--r--node_modules/lodash/fp/toPlainObject.js5
-rw-r--r--node_modules/lodash/fp/toSafeInteger.js5
-rw-r--r--node_modules/lodash/fp/toString.js5
-rw-r--r--node_modules/lodash/fp/toUpper.js5
-rw-r--r--node_modules/lodash/fp/transform.js5
-rw-r--r--node_modules/lodash/fp/trim.js5
-rw-r--r--node_modules/lodash/fp/trimChars.js5
-rw-r--r--node_modules/lodash/fp/trimCharsEnd.js5
-rw-r--r--node_modules/lodash/fp/trimCharsStart.js5
-rw-r--r--node_modules/lodash/fp/trimEnd.js5
-rw-r--r--node_modules/lodash/fp/trimStart.js5
-rw-r--r--node_modules/lodash/fp/truncate.js5
-rw-r--r--node_modules/lodash/fp/unapply.js1
-rw-r--r--node_modules/lodash/fp/unary.js5
-rw-r--r--node_modules/lodash/fp/unescape.js5
-rw-r--r--node_modules/lodash/fp/union.js5
-rw-r--r--node_modules/lodash/fp/unionBy.js5
-rw-r--r--node_modules/lodash/fp/unionWith.js5
-rw-r--r--node_modules/lodash/fp/uniq.js5
-rw-r--r--node_modules/lodash/fp/uniqBy.js5
-rw-r--r--node_modules/lodash/fp/uniqWith.js5
-rw-r--r--node_modules/lodash/fp/uniqueId.js5
-rw-r--r--node_modules/lodash/fp/unnest.js1
-rw-r--r--node_modules/lodash/fp/unset.js5
-rw-r--r--node_modules/lodash/fp/unzip.js5
-rw-r--r--node_modules/lodash/fp/unzipWith.js5
-rw-r--r--node_modules/lodash/fp/update.js5
-rw-r--r--node_modules/lodash/fp/updateWith.js5
-rw-r--r--node_modules/lodash/fp/upperCase.js5
-rw-r--r--node_modules/lodash/fp/upperFirst.js5
-rw-r--r--node_modules/lodash/fp/useWith.js1
-rw-r--r--node_modules/lodash/fp/util.js2
-rw-r--r--node_modules/lodash/fp/value.js5
-rw-r--r--node_modules/lodash/fp/valueOf.js5
-rw-r--r--node_modules/lodash/fp/values.js5
-rw-r--r--node_modules/lodash/fp/valuesIn.js5
-rw-r--r--node_modules/lodash/fp/where.js1
-rw-r--r--node_modules/lodash/fp/whereEq.js1
-rw-r--r--node_modules/lodash/fp/without.js5
-rw-r--r--node_modules/lodash/fp/words.js5
-rw-r--r--node_modules/lodash/fp/wrap.js5
-rw-r--r--node_modules/lodash/fp/wrapperAt.js5
-rw-r--r--node_modules/lodash/fp/wrapperChain.js5
-rw-r--r--node_modules/lodash/fp/wrapperLodash.js5
-rw-r--r--node_modules/lodash/fp/wrapperReverse.js5
-rw-r--r--node_modules/lodash/fp/wrapperValue.js5
-rw-r--r--node_modules/lodash/fp/xor.js5
-rw-r--r--node_modules/lodash/fp/xorBy.js5
-rw-r--r--node_modules/lodash/fp/xorWith.js5
-rw-r--r--node_modules/lodash/fp/zip.js5
-rw-r--r--node_modules/lodash/fp/zipAll.js5
-rw-r--r--node_modules/lodash/fp/zipObj.js1
-rw-r--r--node_modules/lodash/fp/zipObject.js5
-rw-r--r--node_modules/lodash/fp/zipObjectDeep.js5
-rw-r--r--node_modules/lodash/fp/zipWith.js5
-rw-r--r--node_modules/lodash/fromPairs.js28
-rw-r--r--node_modules/lodash/function.js25
-rw-r--r--node_modules/lodash/functions.js31
-rw-r--r--node_modules/lodash/functionsIn.js31
-rw-r--r--node_modules/lodash/get.js33
-rw-r--r--node_modules/lodash/groupBy.js41
-rw-r--r--node_modules/lodash/gt.js29
-rw-r--r--node_modules/lodash/gte.js30
-rw-r--r--node_modules/lodash/has.js35
-rw-r--r--node_modules/lodash/hasIn.js34
-rw-r--r--node_modules/lodash/head.js23
-rw-r--r--node_modules/lodash/identity.js21
-rw-r--r--node_modules/lodash/inRange.js55
-rw-r--r--node_modules/lodash/includes.js53
-rw-r--r--node_modules/lodash/index.js1
-rw-r--r--node_modules/lodash/indexOf.js42
-rw-r--r--node_modules/lodash/initial.js22
-rw-r--r--node_modules/lodash/intersection.js30
-rw-r--r--node_modules/lodash/intersectionBy.js45
-rw-r--r--node_modules/lodash/intersectionWith.js41
-rw-r--r--node_modules/lodash/invert.js42
-rw-r--r--node_modules/lodash/invertBy.js56
-rw-r--r--node_modules/lodash/invoke.js24
-rw-r--r--node_modules/lodash/invokeMap.js41
-rw-r--r--node_modules/lodash/isArguments.js36
-rw-r--r--node_modules/lodash/isArray.js26
-rw-r--r--node_modules/lodash/isArrayBuffer.js27
-rw-r--r--node_modules/lodash/isArrayLike.js33
-rw-r--r--node_modules/lodash/isArrayLikeObject.js33
-rw-r--r--node_modules/lodash/isBoolean.js29
-rw-r--r--node_modules/lodash/isBuffer.js38
-rw-r--r--node_modules/lodash/isDate.js27
-rw-r--r--node_modules/lodash/isElement.js25
-rw-r--r--node_modules/lodash/isEmpty.js77
-rw-r--r--node_modules/lodash/isEqual.js35
-rw-r--r--node_modules/lodash/isEqualWith.js41
-rw-r--r--node_modules/lodash/isError.js36
-rw-r--r--node_modules/lodash/isFinite.js36
-rw-r--r--node_modules/lodash/isFunction.js37
-rw-r--r--node_modules/lodash/isInteger.js33
-rw-r--r--node_modules/lodash/isLength.js35
-rw-r--r--node_modules/lodash/isMap.js27
-rw-r--r--node_modules/lodash/isMatch.js36
-rw-r--r--node_modules/lodash/isMatchWith.js41
-rw-r--r--node_modules/lodash/isNaN.js38
-rw-r--r--node_modules/lodash/isNative.js40
-rw-r--r--node_modules/lodash/isNil.js25
-rw-r--r--node_modules/lodash/isNull.js22
-rw-r--r--node_modules/lodash/isNumber.js38
-rw-r--r--node_modules/lodash/isObject.js31
-rw-r--r--node_modules/lodash/isObjectLike.js29
-rw-r--r--node_modules/lodash/isPlainObject.js62
-rw-r--r--node_modules/lodash/isRegExp.js27
-rw-r--r--node_modules/lodash/isSafeInteger.js37
-rw-r--r--node_modules/lodash/isSet.js27
-rw-r--r--node_modules/lodash/isString.js30
-rw-r--r--node_modules/lodash/isSymbol.js29
-rw-r--r--node_modules/lodash/isTypedArray.js27
-rw-r--r--node_modules/lodash/isUndefined.js22
-rw-r--r--node_modules/lodash/isWeakMap.js28
-rw-r--r--node_modules/lodash/isWeakSet.js28
-rw-r--r--node_modules/lodash/iteratee.js53
-rw-r--r--node_modules/lodash/join.js26
-rw-r--r--node_modules/lodash/kebabCase.js28
-rw-r--r--node_modules/lodash/keyBy.js36
-rw-r--r--node_modules/lodash/keys.js37
-rw-r--r--node_modules/lodash/keysIn.js32
-rw-r--r--node_modules/lodash/lang.js58
-rw-r--r--node_modules/lodash/last.js20
-rw-r--r--node_modules/lodash/lastIndexOf.js46
-rw-r--r--node_modules/lodash/lodash.js17209
-rw-r--r--node_modules/lodash/lodash.min.js140
-rw-r--r--node_modules/lodash/lowerCase.js27
-rw-r--r--node_modules/lodash/lowerFirst.js22
-rw-r--r--node_modules/lodash/lt.js29
-rw-r--r--node_modules/lodash/lte.js30
-rw-r--r--node_modules/lodash/map.js53
-rw-r--r--node_modules/lodash/mapKeys.js36
-rw-r--r--node_modules/lodash/mapValues.js43
-rw-r--r--node_modules/lodash/matches.js46
-rw-r--r--node_modules/lodash/matchesProperty.js44
-rw-r--r--node_modules/lodash/math.js17
-rw-r--r--node_modules/lodash/max.js29
-rw-r--r--node_modules/lodash/maxBy.js34
-rw-r--r--node_modules/lodash/mean.js22
-rw-r--r--node_modules/lodash/meanBy.js31
-rw-r--r--node_modules/lodash/memoize.js73
-rw-r--r--node_modules/lodash/merge.js39
-rw-r--r--node_modules/lodash/mergeWith.js39
-rw-r--r--node_modules/lodash/method.js34
-rw-r--r--node_modules/lodash/methodOf.js33
-rw-r--r--node_modules/lodash/min.js29
-rw-r--r--node_modules/lodash/minBy.js34
-rw-r--r--node_modules/lodash/mixin.js74
-rw-r--r--node_modules/lodash/multiply.js22
-rw-r--r--node_modules/lodash/negate.js40
-rw-r--r--node_modules/lodash/next.js35
-rw-r--r--node_modules/lodash/noop.js17
-rw-r--r--node_modules/lodash/now.js23
-rw-r--r--node_modules/lodash/nth.js29
-rw-r--r--node_modules/lodash/nthArg.js32
-rw-r--r--node_modules/lodash/number.js5
-rw-r--r--node_modules/lodash/object.js49
-rw-r--r--node_modules/lodash/omit.js57
-rw-r--r--node_modules/lodash/omitBy.js29
-rw-r--r--node_modules/lodash/once.js25
-rw-r--r--node_modules/lodash/orderBy.js47
-rw-r--r--node_modules/lodash/over.js24
-rw-r--r--node_modules/lodash/overArgs.js61
-rw-r--r--node_modules/lodash/overEvery.js34
-rw-r--r--node_modules/lodash/overSome.js37
-rw-r--r--node_modules/lodash/package.json17
-rw-r--r--node_modules/lodash/pad.js49
-rw-r--r--node_modules/lodash/padEnd.js39
-rw-r--r--node_modules/lodash/padStart.js39
-rw-r--r--node_modules/lodash/parseInt.js43
-rw-r--r--node_modules/lodash/partial.js50
-rw-r--r--node_modules/lodash/partialRight.js49
-rw-r--r--node_modules/lodash/partition.js43
-rw-r--r--node_modules/lodash/pick.js25
-rw-r--r--node_modules/lodash/pickBy.js37
-rw-r--r--node_modules/lodash/plant.js48
-rw-r--r--node_modules/lodash/property.js32
-rw-r--r--node_modules/lodash/propertyOf.js30
-rw-r--r--node_modules/lodash/pull.js29
-rw-r--r--node_modules/lodash/pullAll.js29
-rw-r--r--node_modules/lodash/pullAllBy.js33
-rw-r--r--node_modules/lodash/pullAllWith.js32
-rw-r--r--node_modules/lodash/pullAt.js43
-rw-r--r--node_modules/lodash/random.js82
-rw-r--r--node_modules/lodash/range.js46
-rw-r--r--node_modules/lodash/rangeRight.js41
-rw-r--r--node_modules/lodash/rearg.js33
-rw-r--r--node_modules/lodash/reduce.js51
-rw-r--r--node_modules/lodash/reduceRight.js36
-rw-r--r--node_modules/lodash/reject.js46
-rw-r--r--node_modules/lodash/release.md48
-rw-r--r--node_modules/lodash/remove.js53
-rw-r--r--node_modules/lodash/repeat.js37
-rw-r--r--node_modules/lodash/replace.js29
-rw-r--r--node_modules/lodash/rest.js40
-rw-r--r--node_modules/lodash/result.js56
-rw-r--r--node_modules/lodash/reverse.js34
-rw-r--r--node_modules/lodash/round.js26
-rw-r--r--node_modules/lodash/sample.js24
-rw-r--r--node_modules/lodash/sampleSize.js37
-rw-r--r--node_modules/lodash/seq.js16
-rw-r--r--node_modules/lodash/set.js35
-rw-r--r--node_modules/lodash/setWith.js32
-rw-r--r--node_modules/lodash/shuffle.js25
-rw-r--r--node_modules/lodash/size.js46
-rw-r--r--node_modules/lodash/slice.js37
-rw-r--r--node_modules/lodash/snakeCase.js28
-rw-r--r--node_modules/lodash/some.js51
-rw-r--r--node_modules/lodash/sortBy.js48
-rw-r--r--node_modules/lodash/sortedIndex.js24
-rw-r--r--node_modules/lodash/sortedIndexBy.js33
-rw-r--r--node_modules/lodash/sortedIndexOf.js31
-rw-r--r--node_modules/lodash/sortedLastIndex.js25
-rw-r--r--node_modules/lodash/sortedLastIndexBy.js33
-rw-r--r--node_modules/lodash/sortedLastIndexOf.js31
-rw-r--r--node_modules/lodash/sortedUniq.js24
-rw-r--r--node_modules/lodash/sortedUniqBy.js26
-rw-r--r--node_modules/lodash/split.js52
-rw-r--r--node_modules/lodash/spread.js63
-rw-r--r--node_modules/lodash/startCase.js29
-rw-r--r--node_modules/lodash/startsWith.js39
-rw-r--r--node_modules/lodash/string.js33
-rw-r--r--node_modules/lodash/stubArray.js23
-rw-r--r--node_modules/lodash/stubFalse.js18
-rw-r--r--node_modules/lodash/stubObject.js23
-rw-r--r--node_modules/lodash/stubString.js18
-rw-r--r--node_modules/lodash/stubTrue.js18
-rw-r--r--node_modules/lodash/subtract.js22
-rw-r--r--node_modules/lodash/sum.js24
-rw-r--r--node_modules/lodash/sumBy.js33
-rw-r--r--node_modules/lodash/tail.js22
-rw-r--r--node_modules/lodash/take.js37
-rw-r--r--node_modules/lodash/takeRight.js39
-rw-r--r--node_modules/lodash/takeRightWhile.js45
-rw-r--r--node_modules/lodash/takeWhile.js45
-rw-r--r--node_modules/lodash/tap.js29
-rw-r--r--node_modules/lodash/template.js272
-rw-r--r--node_modules/lodash/templateSettings.js67
-rw-r--r--node_modules/lodash/throttle.js69
-rw-r--r--node_modules/lodash/thru.js28
-rw-r--r--node_modules/lodash/times.js51
-rw-r--r--node_modules/lodash/toArray.js58
-rw-r--r--node_modules/lodash/toFinite.js42
-rw-r--r--node_modules/lodash/toInteger.js36
-rw-r--r--node_modules/lodash/toIterator.js23
-rw-r--r--node_modules/lodash/toJSON.js1
-rw-r--r--node_modules/lodash/toLength.js38
-rw-r--r--node_modules/lodash/toLower.js28
-rw-r--r--node_modules/lodash/toNumber.js64
-rw-r--r--node_modules/lodash/toPairs.js30
-rw-r--r--node_modules/lodash/toPairsIn.js30
-rw-r--r--node_modules/lodash/toPath.js33
-rw-r--r--node_modules/lodash/toPlainObject.js32
-rw-r--r--node_modules/lodash/toSafeInteger.js37
-rw-r--r--node_modules/lodash/toString.js28
-rw-r--r--node_modules/lodash/toUpper.js28
-rw-r--r--node_modules/lodash/transform.js65
-rw-r--r--node_modules/lodash/trim.js47
-rw-r--r--node_modules/lodash/trimEnd.js41
-rw-r--r--node_modules/lodash/trimStart.js43
-rw-r--r--node_modules/lodash/truncate.js111
-rw-r--r--node_modules/lodash/unary.js22
-rw-r--r--node_modules/lodash/unescape.js34
-rw-r--r--node_modules/lodash/union.js26
-rw-r--r--node_modules/lodash/unionBy.js39
-rw-r--r--node_modules/lodash/unionWith.js34
-rw-r--r--node_modules/lodash/uniq.js25
-rw-r--r--node_modules/lodash/uniqBy.js31
-rw-r--r--node_modules/lodash/uniqWith.js28
-rw-r--r--node_modules/lodash/uniqueId.js28
-rw-r--r--node_modules/lodash/unset.js34
-rw-r--r--node_modules/lodash/unzip.js45
-rw-r--r--node_modules/lodash/unzipWith.js39
-rw-r--r--node_modules/lodash/update.js35
-rw-r--r--node_modules/lodash/updateWith.js33
-rw-r--r--node_modules/lodash/upperCase.js27
-rw-r--r--node_modules/lodash/upperFirst.js22
-rw-r--r--node_modules/lodash/util.js34
-rw-r--r--node_modules/lodash/value.js1
-rw-r--r--node_modules/lodash/valueOf.js1
-rw-r--r--node_modules/lodash/values.js34
-rw-r--r--node_modules/lodash/valuesIn.js32
-rw-r--r--node_modules/lodash/without.js31
-rw-r--r--node_modules/lodash/words.js35
-rw-r--r--node_modules/lodash/wrap.js30
-rw-r--r--node_modules/lodash/wrapperAt.js48
-rw-r--r--node_modules/lodash/wrapperChain.js34
-rw-r--r--node_modules/lodash/wrapperLodash.js147
-rw-r--r--node_modules/lodash/wrapperReverse.js44
-rw-r--r--node_modules/lodash/wrapperValue.js21
-rw-r--r--node_modules/lodash/xor.js28
-rw-r--r--node_modules/lodash/xorBy.js39
-rw-r--r--node_modules/lodash/xorWith.js34
-rw-r--r--node_modules/lodash/zip.js22
-rw-r--r--node_modules/lodash/zipObject.js24
-rw-r--r--node_modules/lodash/zipObjectDeep.js23
-rw-r--r--node_modules/lodash/zipWith.js32
-rw-r--r--node_modules/magic-bytes.js/.github/workflows/build-and-test.yml29
-rw-r--r--node_modules/magic-bytes.js/.prettierignore1
-rw-r--r--node_modules/magic-bytes.js/LICENSE21
-rw-r--r--node_modules/magic-bytes.js/README.md92
-rw-r--r--node_modules/magic-bytes.js/dist/create-snapshot.d.ts2
-rw-r--r--node_modules/magic-bytes.js/dist/create-snapshot.d.ts.map1
-rw-r--r--node_modules/magic-bytes.js/dist/create-snapshot.js11
-rw-r--r--node_modules/magic-bytes.js/dist/index.d.ts7
-rw-r--r--node_modules/magic-bytes.js/dist/index.d.ts.map1
-rw-r--r--node_modules/magic-bytes.js/dist/index.js56
-rw-r--r--node_modules/magic-bytes.js/dist/index.spec.d.ts2
-rw-r--r--node_modules/magic-bytes.js/dist/index.spec.d.ts.map1
-rw-r--r--node_modules/magic-bytes.js/dist/model/pattern-tree.d.ts4
-rw-r--r--node_modules/magic-bytes.js/dist/model/pattern-tree.d.ts.map1
-rw-r--r--node_modules/magic-bytes.js/dist/model/pattern-tree.js764
-rw-r--r--node_modules/magic-bytes.js/dist/model/toHex.d.ts3
-rw-r--r--node_modules/magic-bytes.js/dist/model/toHex.d.ts.map1
-rw-r--r--node_modules/magic-bytes.js/dist/model/toHex.js8
-rw-r--r--node_modules/magic-bytes.js/dist/model/tree.d.ts30
-rw-r--r--node_modules/magic-bytes.js/dist/model/tree.d.ts.map1
-rw-r--r--node_modules/magic-bytes.js/dist/model/tree.js70
-rw-r--r--node_modules/magic-bytes.js/dist/model/tree.spec.d.ts2
-rw-r--r--node_modules/magic-bytes.js/dist/model/tree.spec.d.ts.map1
-rw-r--r--node_modules/magic-bytes.js/jest.config.js5
-rw-r--r--node_modules/magic-bytes.js/package.json48
-rw-r--r--node_modules/magic-bytes.js/tsconfig.json78
-rw-r--r--node_modules/streamsearch/.eslintrc.js5
-rw-r--r--node_modules/streamsearch/.github/workflows/ci.yml24
-rw-r--r--node_modules/streamsearch/.github/workflows/lint.yml23
-rw-r--r--node_modules/streamsearch/LICENSE19
-rw-r--r--node_modules/streamsearch/README.md95
-rw-r--r--node_modules/streamsearch/lib/sbmh.js267
-rw-r--r--node_modules/streamsearch/package.json34
-rw-r--r--node_modules/streamsearch/test/test.js70
-rw-r--r--node_modules/ts-mixer/CHANGELOG.md113
-rw-r--r--node_modules/ts-mixer/LICENSE21
-rw-r--r--node_modules/ts-mixer/README.md270
-rw-r--r--node_modules/ts-mixer/dist/cjs/decorator.js109
-rw-r--r--node_modules/ts-mixer/dist/cjs/index.js12
-rw-r--r--node_modules/ts-mixer/dist/cjs/mixin-tracking.js40
-rw-r--r--node_modules/ts-mixer/dist/cjs/mixins.js82
-rw-r--r--node_modules/ts-mixer/dist/cjs/proxy.js82
-rw-r--r--node_modules/ts-mixer/dist/cjs/settings.js9
-rw-r--r--node_modules/ts-mixer/dist/cjs/types.js2
-rw-r--r--node_modules/ts-mixer/dist/cjs/util.js85
-rw-r--r--node_modules/ts-mixer/dist/esm/decorator.d.ts18
-rw-r--r--node_modules/ts-mixer/dist/esm/index.d.ts4
-rw-r--r--node_modules/ts-mixer/dist/esm/index.js364
-rw-r--r--node_modules/ts-mixer/dist/esm/index.min.js1
-rw-r--r--node_modules/ts-mixer/dist/esm/mixin-tracking.d.ts4
-rw-r--r--node_modules/ts-mixer/dist/esm/mixins.d.ts16
-rw-r--r--node_modules/ts-mixer/dist/esm/proxy.d.ts16
-rw-r--r--node_modules/ts-mixer/dist/esm/settings.d.ts7
-rw-r--r--node_modules/ts-mixer/dist/esm/types.d.ts13
-rw-r--r--node_modules/ts-mixer/dist/esm/util.d.ts27
-rw-r--r--node_modules/ts-mixer/dist/types/decorator.d.ts18
-rw-r--r--node_modules/ts-mixer/dist/types/index.d.ts4
-rw-r--r--node_modules/ts-mixer/dist/types/mixin-tracking.d.ts4
-rw-r--r--node_modules/ts-mixer/dist/types/mixins.d.ts16
-rw-r--r--node_modules/ts-mixer/dist/types/proxy.d.ts16
-rw-r--r--node_modules/ts-mixer/dist/types/settings.d.ts7
-rw-r--r--node_modules/ts-mixer/dist/types/types.d.ts13
-rw-r--r--node_modules/ts-mixer/dist/types/util.d.ts27
-rw-r--r--node_modules/ts-mixer/package.json63
-rw-r--r--node_modules/tslib/CopyrightNotice.txt15
-rw-r--r--node_modules/tslib/LICENSE.txt12
-rw-r--r--node_modules/tslib/README.md164
-rw-r--r--node_modules/tslib/SECURITY.md41
-rw-r--r--node_modules/tslib/modules/index.d.ts37
-rw-r--r--node_modules/tslib/modules/index.js68
-rw-r--r--node_modules/tslib/modules/package.json3
-rw-r--r--node_modules/tslib/package.json47
-rw-r--r--node_modules/tslib/tslib.d.ts453
-rw-r--r--node_modules/tslib/tslib.es6.html1
-rw-r--r--node_modules/tslib/tslib.es6.js370
-rw-r--r--node_modules/tslib/tslib.es6.mjs370
-rw-r--r--node_modules/tslib/tslib.html1
-rw-r--r--node_modules/tslib/tslib.js421
-rw-r--r--node_modules/undici/LICENSE21
-rw-r--r--node_modules/undici/README.md438
-rw-r--r--node_modules/undici/docs/api/Agent.md80
-rw-r--r--node_modules/undici/docs/api/BalancedPool.md99
-rw-r--r--node_modules/undici/docs/api/CacheStorage.md30
-rw-r--r--node_modules/undici/docs/api/Client.md269
-rw-r--r--node_modules/undici/docs/api/Connector.md115
-rw-r--r--node_modules/undici/docs/api/ContentType.md57
-rw-r--r--node_modules/undici/docs/api/Cookies.md101
-rw-r--r--node_modules/undici/docs/api/DiagnosticsChannel.md204
-rw-r--r--node_modules/undici/docs/api/DispatchInterceptor.md60
-rw-r--r--node_modules/undici/docs/api/Dispatcher.md886
-rw-r--r--node_modules/undici/docs/api/Errors.md47
-rw-r--r--node_modules/undici/docs/api/Fetch.md27
-rw-r--r--node_modules/undici/docs/api/MockAgent.md540
-rw-r--r--node_modules/undici/docs/api/MockClient.md77
-rw-r--r--node_modules/undici/docs/api/MockErrors.md12
-rw-r--r--node_modules/undici/docs/api/MockPool.md512
-rw-r--r--node_modules/undici/docs/api/Pool.md84
-rw-r--r--node_modules/undici/docs/api/PoolStats.md35
-rw-r--r--node_modules/undici/docs/api/ProxyAgent.md124
-rw-r--r--node_modules/undici/docs/api/WebSocket.md43
-rw-r--r--node_modules/undici/docs/api/api-lifecycle.md62
-rw-r--r--node_modules/undici/docs/assets/lifecycle-diagram.pngbin0 -> 47090 bytes
-rw-r--r--node_modules/undici/docs/best-practices/client-certificate.md64
-rw-r--r--node_modules/undici/docs/best-practices/mocking-request.md136
-rw-r--r--node_modules/undici/docs/best-practices/proxy.md127
-rw-r--r--node_modules/undici/docs/best-practices/writing-tests.md20
-rw-r--r--node_modules/undici/index-fetch.js16
-rw-r--r--node_modules/undici/index.d.ts57
-rw-r--r--node_modules/undici/index.js162
-rw-r--r--node_modules/undici/lib/agent.js148
-rw-r--r--node_modules/undici/lib/api/abort-signal.js57
-rw-r--r--node_modules/undici/lib/api/api-connect.js98
-rw-r--r--node_modules/undici/lib/api/api-pipeline.js249
-rw-r--r--node_modules/undici/lib/api/api-request.js180
-rw-r--r--node_modules/undici/lib/api/api-stream.js212
-rw-r--r--node_modules/undici/lib/api/api-upgrade.js105
-rw-r--r--node_modules/undici/lib/api/index.js7
-rw-r--r--node_modules/undici/lib/api/readable.js304
-rw-r--r--node_modules/undici/lib/api/util.js46
-rw-r--r--node_modules/undici/lib/balanced-pool.js190
-rw-r--r--node_modules/undici/lib/cache/cache.js842
-rw-r--r--node_modules/undici/lib/cache/cachestorage.js144
-rw-r--r--node_modules/undici/lib/cache/symbols.js5
-rw-r--r--node_modules/undici/lib/cache/util.js49
-rw-r--r--node_modules/undici/lib/client.js1796
-rw-r--r--node_modules/undici/lib/compat/dispatcher-weakref.js38
-rw-r--r--node_modules/undici/lib/cookies/constants.js12
-rw-r--r--node_modules/undici/lib/cookies/index.js184
-rw-r--r--node_modules/undici/lib/cookies/parse.js317
-rw-r--r--node_modules/undici/lib/cookies/util.js291
-rw-r--r--node_modules/undici/lib/core/connect.js185
-rw-r--r--node_modules/undici/lib/core/errors.js216
-rw-r--r--node_modules/undici/lib/core/request.js368
-rw-r--r--node_modules/undici/lib/core/symbols.js55
-rw-r--r--node_modules/undici/lib/core/util.js475
-rw-r--r--node_modules/undici/lib/dispatcher-base.js192
-rw-r--r--node_modules/undici/lib/dispatcher.js19
-rw-r--r--node_modules/undici/lib/fetch/LICENSE21
-rw-r--r--node_modules/undici/lib/fetch/body.js603
-rw-r--r--node_modules/undici/lib/fetch/constants.js136
-rw-r--r--node_modules/undici/lib/fetch/dataURL.js630
-rw-r--r--node_modules/undici/lib/fetch/file.js343
-rw-r--r--node_modules/undici/lib/fetch/formdata.js265
-rw-r--r--node_modules/undici/lib/fetch/global.js48
-rw-r--r--node_modules/undici/lib/fetch/headers.js552
-rw-r--r--node_modules/undici/lib/fetch/index.js2112
-rw-r--r--node_modules/undici/lib/fetch/request.js939
-rw-r--r--node_modules/undici/lib/fetch/response.js574
-rw-r--r--node_modules/undici/lib/fetch/symbols.js10
-rw-r--r--node_modules/undici/lib/fetch/util.js1033
-rw-r--r--node_modules/undici/lib/fetch/webidl.js648
-rw-r--r--node_modules/undici/lib/fileapi/encoding.js290
-rw-r--r--node_modules/undici/lib/fileapi/filereader.js344
-rw-r--r--node_modules/undici/lib/fileapi/progressevent.js78
-rw-r--r--node_modules/undici/lib/fileapi/symbols.js10
-rw-r--r--node_modules/undici/lib/fileapi/util.js392
-rw-r--r--node_modules/undici/lib/global.js32
-rw-r--r--node_modules/undici/lib/handler/DecoratorHandler.js35
-rw-r--r--node_modules/undici/lib/handler/RedirectHandler.js216
-rw-r--r--node_modules/undici/lib/interceptor/redirectInterceptor.js21
-rw-r--r--node_modules/undici/lib/llhttp/constants.d.ts199
-rw-r--r--node_modules/undici/lib/llhttp/constants.js278
-rw-r--r--node_modules/undici/lib/llhttp/constants.js.map1
-rw-r--r--node_modules/undici/lib/llhttp/llhttp-wasm.js1
-rwxr-xr-xnode_modules/undici/lib/llhttp/llhttp.wasmbin0 -> 56001 bytes
-rw-r--r--node_modules/undici/lib/llhttp/llhttp_simd-wasm.js1
-rwxr-xr-xnode_modules/undici/lib/llhttp/llhttp_simd.wasmbin0 -> 55985 bytes
-rw-r--r--node_modules/undici/lib/llhttp/utils.d.ts4
-rw-r--r--node_modules/undici/lib/llhttp/utils.js15
-rw-r--r--node_modules/undici/lib/llhttp/utils.js.map1
-rw-r--r--node_modules/undici/lib/mock/mock-agent.js171
-rw-r--r--node_modules/undici/lib/mock/mock-client.js59
-rw-r--r--node_modules/undici/lib/mock/mock-errors.js17
-rw-r--r--node_modules/undici/lib/mock/mock-interceptor.js206
-rw-r--r--node_modules/undici/lib/mock/mock-pool.js59
-rw-r--r--node_modules/undici/lib/mock/mock-symbols.js23
-rw-r--r--node_modules/undici/lib/mock/mock-utils.js351
-rw-r--r--node_modules/undici/lib/mock/pending-interceptors-formatter.js40
-rw-r--r--node_modules/undici/lib/mock/pluralizer.js29
-rw-r--r--node_modules/undici/lib/node/fixed-queue.js117
-rw-r--r--node_modules/undici/lib/pool-base.js194
-rw-r--r--node_modules/undici/lib/pool-stats.js34
-rw-r--r--node_modules/undici/lib/pool.js92
-rw-r--r--node_modules/undici/lib/proxy-agent.js187
-rw-r--r--node_modules/undici/lib/timers.js97
-rw-r--r--node_modules/undici/lib/websocket/connection.js284
-rw-r--r--node_modules/undici/lib/websocket/constants.js51
-rw-r--r--node_modules/undici/lib/websocket/events.js303
-rw-r--r--node_modules/undici/lib/websocket/frame.js66
-rw-r--r--node_modules/undici/lib/websocket/receiver.js344
-rw-r--r--node_modules/undici/lib/websocket/symbols.js12
-rw-r--r--node_modules/undici/lib/websocket/util.js200
-rw-r--r--node_modules/undici/lib/websocket/websocket.js630
-rw-r--r--node_modules/undici/package.json136
-rw-r--r--node_modules/undici/types/agent.d.ts31
-rw-r--r--node_modules/undici/types/api.d.ts43
-rw-r--r--node_modules/undici/types/balanced-pool.d.ts18
-rw-r--r--node_modules/undici/types/cache.d.ts36
-rw-r--r--node_modules/undici/types/client.d.ts88
-rw-r--r--node_modules/undici/types/connector.d.ts33
-rw-r--r--node_modules/undici/types/content-type.d.ts21
-rw-r--r--node_modules/undici/types/cookies.d.ts28
-rw-r--r--node_modules/undici/types/diagnostics-channel.d.ts67
-rw-r--r--node_modules/undici/types/dispatcher.d.ts239
-rw-r--r--node_modules/undici/types/errors.d.ts128
-rw-r--r--node_modules/undici/types/fetch.d.ts209
-rw-r--r--node_modules/undici/types/file.d.ts39
-rw-r--r--node_modules/undici/types/filereader.d.ts54
-rw-r--r--node_modules/undici/types/formdata.d.ts108
-rw-r--r--node_modules/undici/types/global-dispatcher.d.ts9
-rw-r--r--node_modules/undici/types/global-origin.d.ts7
-rw-r--r--node_modules/undici/types/handlers.d.ts9
-rw-r--r--node_modules/undici/types/header.d.ts4
-rw-r--r--node_modules/undici/types/interceptors.d.ts5
-rw-r--r--node_modules/undici/types/mock-agent.d.ts50
-rw-r--r--node_modules/undici/types/mock-client.d.ts25
-rw-r--r--node_modules/undici/types/mock-errors.d.ts12
-rw-r--r--node_modules/undici/types/mock-interceptor.d.ts93
-rw-r--r--node_modules/undici/types/mock-pool.d.ts25
-rw-r--r--node_modules/undici/types/patch.d.ts71
-rw-r--r--node_modules/undici/types/pool-stats.d.ts19
-rw-r--r--node_modules/undici/types/pool.d.ts28
-rw-r--r--node_modules/undici/types/proxy-agent.d.ts30
-rw-r--r--node_modules/undici/types/readable.d.ts61
-rw-r--r--node_modules/undici/types/webidl.d.ts220
-rw-r--r--node_modules/undici/types/websocket.d.ts131
-rw-r--r--node_modules/ws/LICENSE20
-rw-r--r--node_modules/ws/README.md536
-rw-r--r--node_modules/ws/browser.js8
-rw-r--r--node_modules/ws/index.js13
-rw-r--r--node_modules/ws/lib/buffer-util.js131
-rw-r--r--node_modules/ws/lib/constants.js12
-rw-r--r--node_modules/ws/lib/event-target.js292
-rw-r--r--node_modules/ws/lib/extension.js203
-rw-r--r--node_modules/ws/lib/limiter.js55
-rw-r--r--node_modules/ws/lib/permessage-deflate.js514
-rw-r--r--node_modules/ws/lib/receiver.js627
-rw-r--r--node_modules/ws/lib/sender.js478
-rw-r--r--node_modules/ws/lib/stream.js159
-rw-r--r--node_modules/ws/lib/subprotocol.js62
-rw-r--r--node_modules/ws/lib/validation.js130
-rw-r--r--node_modules/ws/lib/websocket-server.js535
-rw-r--r--node_modules/ws/lib/websocket.js1311
-rw-r--r--node_modules/ws/package.json65
-rw-r--r--node_modules/ws/wrapper.mjs8
-rw-r--r--package-lock.json256
-rw-r--r--package.json15
-rw-r--r--regcmd.js53
2886 files changed, 319108 insertions, 0 deletions
diff --git a/commands/add.js b/commands/add.js
new file mode 100644
index 0000000..5d74b6a
--- /dev/null
+++ b/commands/add.js
@@ -0,0 +1,26 @@
+const { SlashCommandBuilder } = require('discord.js');
+
+module.exports = {
+ data: new SlashCommandBuilder()
+ .setName('add')
+ .setDescription('Add a Command')
+ .addStringOption(option =>
+ option.setName('command')
+ .setDescription('The name of the command `/use THIS`')
+ .setRequired(true))
+ .addStringOption(option =>
+ option.setName('content')
+ .setDescription('What the bot will send')
+ .setRequired(true)),
+ async execute(interaction) {
+ if (global.data.getList().length <= 25)
+ {
+ global.data.add(interaction.options.getString('command'),interaction.options.getString('content'));
+ await interaction.reply('Added `'+interaction.options.getString('command')+'`.');
+ }
+ else
+ {
+ await interaction.reply('Failed to add command. There is a hard limit of 25 commands!');
+ }
+ },
+}; \ No newline at end of file
diff --git a/commands/delete.js b/commands/delete.js
new file mode 100644
index 0000000..60c541f
--- /dev/null
+++ b/commands/delete.js
@@ -0,0 +1,17 @@
+const { SlashCommandBuilder } = require('discord.js');
+
+module.exports = {
+ data: new SlashCommandBuilder()
+ .setName('remove')
+ .setDescription('Remove a Command')
+ .addStringOption(option =>
+ option.setName('command')
+ .setDescription('Name of the command to remove')
+ .setRequired(true)
+ .setChoices(...global.data.getList())
+ ),
+ async execute(interaction) {
+ global.data.remove(interaction.options.getString('command'))
+ await interaction.reply('Removed `'+interaction.options.getString('command')+'`.');
+ },
+}; \ No newline at end of file
diff --git a/commands/help.js b/commands/help.js
new file mode 100644
index 0000000..92d3e89
--- /dev/null
+++ b/commands/help.js
@@ -0,0 +1,11 @@
+const { SlashCommandBuilder } = require('discord.js');
+const fs = require('fs');
+
+module.exports = {
+ data: new SlashCommandBuilder()
+ .setName('help')
+ .setDescription('Shows the manual'),
+ async execute(interaction) {
+ await interaction.reply({content: fs.readFileSync('help.md', 'utf-8'), ephemeral: true});
+ },
+}; \ No newline at end of file
diff --git a/commands/preview.js b/commands/preview.js
new file mode 100644
index 0000000..013f650
--- /dev/null
+++ b/commands/preview.js
@@ -0,0 +1,16 @@
+const { SlashCommandBuilder } = require('discord.js');
+
+module.exports = {
+ data: new SlashCommandBuilder()
+ .setName('preview')
+ .setDescription('Only you can see this!')
+ .addStringOption(option =>
+ option.setName('command')
+ .setDescription('Name of the command to display')
+ .setRequired(true)
+ .addChoices(...global.data.getList())
+ ),
+ async execute(interaction) {
+ await interaction.reply({content: global.data.get(interaction.options.getString('command')), ephemeral: true});
+ },
+}; \ No newline at end of file
diff --git a/commands/use.js b/commands/use.js
new file mode 100644
index 0000000..dc9897b
--- /dev/null
+++ b/commands/use.js
@@ -0,0 +1,16 @@
+const { SlashCommandBuilder } = require('discord.js');
+
+module.exports = {
+ data: new SlashCommandBuilder()
+ .setName('use')
+ .setDescription('Use a Command')
+ .addStringOption(option =>
+ option.setName('command')
+ .setDescription('What the bot will send')
+ .setRequired(true)
+ .addChoices(...global.data.getList())
+ ),
+ async execute(interaction) {
+ await interaction.reply(global.data.get(interaction.options.getString('command')));
+ },
+}; \ No newline at end of file
diff --git a/config.json b/config.json
new file mode 100644
index 0000000..076170b
--- /dev/null
+++ b/config.json
@@ -0,0 +1,4 @@
+{
+ "token": "",
+ "clientId": ""
+}
diff --git a/data.js b/data.js
new file mode 100644
index 0000000..5eacfb9
--- /dev/null
+++ b/data.js
@@ -0,0 +1,71 @@
+const fs = require('fs')
+var exec = require('child_process').exec, child;
+
+// file stuff
+let contentlist = new Map()
+const dataFilePath = "data.json"
+contentlist = readDataFromFile()
+// require('./regcmd.js')
+
+//saved data is restored
+function readDataFromFile() {
+ console.log('restoreing saved data...')
+ mapData = new Map()
+ let rawData = fs.readFileSync(dataFilePath);
+ var jsonData = JSON.parse(rawData);
+ for( key in jsonData ){
+ mapData.set(key,jsonData[key])
+ }
+ return mapData
+ console.log("done")
+ }
+
+//data is saved to json
+function writeDataToFile(jsonData) {
+ let data = JSON.stringify(jsonData);
+ fs.writeFileSync(dataFilePath, data);
+ }
+
+function saveData() {
+ console.log('saving...')
+ let jsonObject = {};
+ contentlist.forEach((value, key) => {
+ jsonObject[key] = value
+ });
+ writeDataToFile(jsonObject)
+ regcmd();
+ console.log('saved')
+ }
+
+function regcmd() {
+ child = exec('node regcmd.js {{args}}',
+ function (error, stdout, stderr) {
+ console.log('stdout: ' + stdout);
+ console.log('stderr: ' + stderr);
+ if (error !== null) {
+ console.log('exec error: ' + error);
+ }
+});
+}
+
+this.add = function(key, value) {
+ contentlist.set(key, value);
+ saveData();
+}
+
+this.remove = function(key) {
+ contentlist.delete(key);
+ saveData();
+}
+
+this.get = function(key) {
+ return contentlist.get(key);
+}
+
+this.getList = function() {
+ var list = [];
+ for (entry of contentlist.keys()) {
+ list.push({name: entry, value: entry});
+ }
+ return list
+}
diff --git a/data.json b/data.json
new file mode 100755
index 0000000..4c0f3b8
--- /dev/null
+++ b/data.json
@@ -0,0 +1,3 @@
+{
+ "hello": "Hey!"
+}
diff --git a/help.md b/help.md
new file mode 100644
index 0000000..f824c1c
--- /dev/null
+++ b/help.md
@@ -0,0 +1,8 @@
+# welcome to sowbot 3!
+- To use a command, type `/use` then the name of the command. A list of available commands should appear.
+- To preview a command (only you see it) run `/preview` then the name of the command. A list of available commands should appear.
+- To add a command type `/add`. In the name field, put the name of the command. In the content field put the image link or whatever else you want the bot to send.
+- To remove a command type `/remove` then the name of the command. A list of available commands should appear.
+- To view the manual again type `/help`
+
+Note: There is a hard limit of 25 commands due to Discords limit on command choices. \ No newline at end of file
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..aff07a0
--- /dev/null
+++ b/index.js
@@ -0,0 +1,52 @@
+const fs = require('node:fs');
+const path = require('node:path');
+const { Client, Collection, Events, GatewayIntentBits } = require('discord.js');
+const { token } = require('./config.json');
+const client = new Client({ intents: [GatewayIntentBits.Guilds] });
+global.data = require('./data.js');
+
+client.once(Events.ClientReady, c => {
+ console.log(`Ready! Logged in as ${c.user.tag}`);
+});
+
+client.login(token);
+
+client.commands = new Collection();
+
+//some file reading action to scan for everything in commands/*.js and add them to the collection
+const commandsPath = path.join(__dirname, 'commands');
+const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js'));
+for (const file of commandFiles) {
+ const filePath = path.join(commandsPath, file);
+ const command = require(filePath);
+ // Set a new item in the Collection with the key as the command name and the value as the exported module
+ if ('data' in command && 'execute' in command) {
+ client.commands.set(command.data.name, command);
+ } else {
+ console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`);
+ }
+}
+
+//listens for the command and directs the action to the corresponding file
+client.on(Events.InteractionCreate, async interaction => {
+ if (!interaction.isChatInputCommand()) return;
+
+ const command = interaction.client.commands.get(interaction.commandName);
+ // console.log(interaction.client.commands);
+
+ if (!command) {
+ console.error(`No command matching ${interaction.commandName} was found.`);
+ return;
+ }
+
+ try {
+ await command.execute(interaction);
+ } catch (error) {
+ console.error(error);
+ if (interaction.replied || interaction.deferred) {
+ await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
+ } else {
+ await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
+ }
+ }
+}); \ 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..39f6449
--- /dev/null
+++ b/node_modules/.package-lock.json
@@ -0,0 +1,251 @@
+{
+ "name": "sowbot3",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "node_modules/@discordjs/builders": {
+ "version": "1.6.5",
+ "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.6.5.tgz",
+ "integrity": "sha512-SdweyCs/+mHj+PNhGLLle7RrRFX9ZAhzynHahMCLqp5Zeq7np7XC6/mgzHc79QoVlQ1zZtOkTTiJpOZu5V8Ufg==",
+ "dependencies": {
+ "@discordjs/formatters": "^0.3.2",
+ "@discordjs/util": "^1.0.1",
+ "@sapphire/shapeshift": "^3.9.2",
+ "discord-api-types": "0.37.50",
+ "fast-deep-equal": "^3.1.3",
+ "ts-mixer": "^6.0.3",
+ "tslib": "^2.6.1"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ }
+ },
+ "node_modules/@discordjs/collection": {
+ "version": "1.5.3",
+ "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz",
+ "integrity": "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==",
+ "engines": {
+ "node": ">=16.11.0"
+ }
+ },
+ "node_modules/@discordjs/formatters": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.2.tgz",
+ "integrity": "sha512-lE++JZK8LSSDRM5nLjhuvWhGuKiXqu+JZ/DsOR89DVVia3z9fdCJVcHF2W/1Zxgq0re7kCzmAJlCMMX3tetKpA==",
+ "dependencies": {
+ "discord-api-types": "0.37.50"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ }
+ },
+ "node_modules/@discordjs/rest": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.0.1.tgz",
+ "integrity": "sha512-/eWAdDRvwX/rIE2tuQUmKaxmWeHmGealttIzGzlYfI4+a7y9b6ZoMp8BG/jaohs8D8iEnCNYaZiOFLVFLQb8Zg==",
+ "dependencies": {
+ "@discordjs/collection": "^1.5.3",
+ "@discordjs/util": "^1.0.1",
+ "@sapphire/async-queue": "^1.5.0",
+ "@sapphire/snowflake": "^3.5.1",
+ "@vladfrangu/async_event_emitter": "^2.2.2",
+ "discord-api-types": "0.37.50",
+ "magic-bytes.js": "^1.0.15",
+ "tslib": "^2.6.1",
+ "undici": "5.22.1"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ }
+ },
+ "node_modules/@discordjs/util": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.0.1.tgz",
+ "integrity": "sha512-d0N2yCxB8r4bn00/hvFZwM7goDcUhtViC5un4hPj73Ba4yrChLSJD8fy7Ps5jpTLg1fE9n4K0xBLc1y9WGwSsA==",
+ "engines": {
+ "node": ">=16.11.0"
+ }
+ },
+ "node_modules/@discordjs/ws": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.0.1.tgz",
+ "integrity": "sha512-avvAolBqN3yrSvdBPcJ/0j2g42ABzrv3PEL76e3YTp2WYMGH7cuspkjfSyNWaqYl1J+669dlLp+YFMxSVQyS5g==",
+ "dependencies": {
+ "@discordjs/collection": "^1.5.3",
+ "@discordjs/rest": "^2.0.1",
+ "@discordjs/util": "^1.0.1",
+ "@sapphire/async-queue": "^1.5.0",
+ "@types/ws": "^8.5.5",
+ "@vladfrangu/async_event_emitter": "^2.2.2",
+ "discord-api-types": "0.37.50",
+ "tslib": "^2.6.1",
+ "ws": "^8.13.0"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ }
+ },
+ "node_modules/@sapphire/async-queue": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz",
+ "integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==",
+ "engines": {
+ "node": ">=v14.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/@sapphire/shapeshift": {
+ "version": "3.9.2",
+ "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.2.tgz",
+ "integrity": "sha512-YRbCXWy969oGIdqR/wha62eX8GNHsvyYi0Rfd4rNW6tSVVa8p0ELiMEuOH/k8rgtvRoM+EMV7Csqz77YdwiDpA==",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.3",
+ "lodash": "^4.17.21"
+ },
+ "engines": {
+ "node": ">=v14.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/@sapphire/snowflake": {
+ "version": "3.5.1",
+ "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.1.tgz",
+ "integrity": "sha512-BxcYGzgEsdlG0dKAyOm0ehLGm2CafIrfQTZGWgkfKYbj+pNNsorZ7EotuZukc2MT70E0UbppVbtpBrqpzVzjNA==",
+ "engines": {
+ "node": ">=v14.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "20.5.8",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.8.tgz",
+ "integrity": "sha512-eajsR9aeljqNhK028VG0Wuw+OaY5LLxYmxeoXynIoE6jannr9/Ucd1LL0hSSoafk5LTYG+FfqsyGt81Q6Zkybw=="
+ },
+ "node_modules/@types/ws": {
+ "version": "8.5.5",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.5.tgz",
+ "integrity": "sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@vladfrangu/async_event_emitter": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.2.tgz",
+ "integrity": "sha512-HIzRG7sy88UZjBJamssEczH5q7t5+axva19UbZLO6u0ySbYPrwzWiXBcC0WuHyhKKoeCyneH+FvYzKQq/zTtkQ==",
+ "engines": {
+ "node": ">=v14.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/busboy": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
+ "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
+ "dependencies": {
+ "streamsearch": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=10.16.0"
+ }
+ },
+ "node_modules/discord-api-types": {
+ "version": "0.37.50",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.50.tgz",
+ "integrity": "sha512-X4CDiMnDbA3s3RaUXWXmgAIbY1uxab3fqe3qwzg5XutR3wjqi7M3IkgQbsIBzpqBN2YWr/Qdv7JrFRqSgb4TFg=="
+ },
+ "node_modules/discord.js": {
+ "version": "14.13.0",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.13.0.tgz",
+ "integrity": "sha512-Kufdvg7fpyTEwANGy9x7i4od4yu5c6gVddGi5CKm4Y5a6sF0VBODObI3o0Bh7TGCj0LfNT8Qp8z04wnLFzgnbA==",
+ "dependencies": {
+ "@discordjs/builders": "^1.6.5",
+ "@discordjs/collection": "^1.5.3",
+ "@discordjs/formatters": "^0.3.2",
+ "@discordjs/rest": "^2.0.1",
+ "@discordjs/util": "^1.0.1",
+ "@discordjs/ws": "^1.0.1",
+ "@sapphire/snowflake": "^3.5.1",
+ "@types/ws": "^8.5.5",
+ "discord-api-types": "0.37.50",
+ "fast-deep-equal": "^3.1.3",
+ "lodash.snakecase": "^4.1.1",
+ "tslib": "^2.6.1",
+ "undici": "5.22.1",
+ "ws": "^8.13.0"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ }
+ },
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
+ },
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
+ },
+ "node_modules/lodash.snakecase": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz",
+ "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw=="
+ },
+ "node_modules/magic-bytes.js": {
+ "version": "1.0.15",
+ "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.0.15.tgz",
+ "integrity": "sha512-bpRmwbRHqongRhA+mXzbLWjVy7ylqmfMBYaQkSs6pac0z6hBTvsgrH0r4FBYd/UYVJBmS6Rp/O+oCCQVLzKV1g=="
+ },
+ "node_modules/streamsearch": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
+ "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/ts-mixer": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz",
+ "integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ=="
+ },
+ "node_modules/tslib": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
+ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
+ },
+ "node_modules/undici": {
+ "version": "5.22.1",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-5.22.1.tgz",
+ "integrity": "sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==",
+ "dependencies": {
+ "busboy": "^1.6.0"
+ },
+ "engines": {
+ "node": ">=14.0"
+ }
+ },
+ "node_modules/ws": {
+ "version": "8.13.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz",
+ "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ }
+ }
+}
diff --git a/node_modules/@discordjs/builders/CHANGELOG.md b/node_modules/@discordjs/builders/CHANGELOG.md
new file mode 100644
index 0000000..b6bbea4
--- /dev/null
+++ b/node_modules/@discordjs/builders/CHANGELOG.md
@@ -0,0 +1,327 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+# [@discordjs/builders@1.6.5](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.6.4...@discordjs/builders@1.6.5) - (2023-08-17)
+
+## Documentation
+
+- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6))
+
+# [@discordjs/builders@1.6.3](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.6.2...@discordjs/builders@1.6.3) - (2023-05-01)
+
+## Refactor
+
+- Remove `@discordjs/util` re-export (#9488) ([54ceedf](https://github.com/discordjs/discord.js/commit/54ceedf6c535d4641643d4106b6286cbef09de4a))
+
+# [@discordjs/builders@1.6.2](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.6.1...@discordjs/builders@1.6.2) - (2023-05-01)
+
+## Bug Fixes
+
+- **BaseSelectMenuBuilder:** Modify class to be `abstract` (#9358) ([ca4de2d](https://github.com/discordjs/discord.js/commit/ca4de2d9c6bc204e85d1b7eae7eabd23dbeb4475))
+- Correct `@link` tags that involve parents (#9351) ([fbbce3e](https://github.com/discordjs/discord.js/commit/fbbce3eb4ba20bc0c4806ca2259d1f86001594be))
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Documentation
+
+- Reference package names properly (#9426) ([d6bca9b](https://github.com/discordjs/discord.js/commit/d6bca9bb4d976dc069a5039250db7d5b3e9142ef))
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+- **builders:** Add some basic documentation (#9359) ([8073561](https://github.com/discordjs/discord.js/commit/8073561824f911d1a18d0b4f1de39f452bc69fa9))
+- Use `@link` in `@see` (#9348) ([d66d113](https://github.com/discordjs/discord.js/commit/d66d1133331b81563588db4500c63a18c3c3dfae))
+
+# [@discordjs/builders@1.6.3](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.6.2...@discordjs/builders@1.6.3) - (2023-05-01)
+
+## Refactor
+
+- Remove `@discordjs/util` re-export (#9488) ([54ceedf](https://github.com/discordjs/discord.js/commit/54ceedf6c535d4641643d4106b6286cbef09de4a))
+
+# [@discordjs/builders@1.6.2](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.6.1...@discordjs/builders@1.6.2) - (2023-05-01)
+
+## Bug Fixes
+
+- **BaseSelectMenuBuilder:** Modify class to be `abstract` (#9358) ([ca4de2d](https://github.com/discordjs/discord.js/commit/ca4de2d9c6bc204e85d1b7eae7eabd23dbeb4475))
+- Correct `@link` tags that involve parents (#9351) ([fbbce3e](https://github.com/discordjs/discord.js/commit/fbbce3eb4ba20bc0c4806ca2259d1f86001594be))
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Documentation
+
+- Reference package names properly (#9426) ([d6bca9b](https://github.com/discordjs/discord.js/commit/d6bca9bb4d976dc069a5039250db7d5b3e9142ef))
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+- **builders:** Add some basic documentation (#9359) ([8073561](https://github.com/discordjs/discord.js/commit/8073561824f911d1a18d0b4f1de39f452bc69fa9))
+- Use `@link` in `@see` (#9348) ([d66d113](https://github.com/discordjs/discord.js/commit/d66d1133331b81563588db4500c63a18c3c3dfae))
+
+# [@discordjs/builders@1.6.3](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.6.2...@discordjs/builders@1.6.3) - (2023-05-01)
+
+## Refactor
+
+- Remove `@discordjs/util` re-export (#9488) ([54ceedf](https://github.com/discordjs/discord.js/commit/54ceedf6c535d4641643d4106b6286cbef09de4a))
+
+# [@discordjs/builders@1.6.2](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.6.1...@discordjs/builders@1.6.2) - (2023-05-01)
+
+## Bug Fixes
+
+- **BaseSelectMenuBuilder:** Modify class to be `abstract` (#9358) ([ca4de2d](https://github.com/discordjs/discord.js/commit/ca4de2d9c6bc204e85d1b7eae7eabd23dbeb4475))
+- Correct `@link` tags that involve parents (#9351) ([fbbce3e](https://github.com/discordjs/discord.js/commit/fbbce3eb4ba20bc0c4806ca2259d1f86001594be))
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Documentation
+
+- Reference package names properly (#9426) ([d6bca9b](https://github.com/discordjs/discord.js/commit/d6bca9bb4d976dc069a5039250db7d5b3e9142ef))
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+- **builders:** Add some basic documentation (#9359) ([8073561](https://github.com/discordjs/discord.js/commit/8073561824f911d1a18d0b4f1de39f452bc69fa9))
+- Use `@link` in `@see` (#9348) ([d66d113](https://github.com/discordjs/discord.js/commit/d66d1133331b81563588db4500c63a18c3c3dfae))
+
+# [@discordjs/builders@1.6.2](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.6.1...@discordjs/builders@1.6.2) - (2023-05-01)
+
+## Bug Fixes
+
+- **BaseSelectMenuBuilder:** Modify class to be `abstract` (#9358) ([ca4de2d](https://github.com/discordjs/discord.js/commit/ca4de2d9c6bc204e85d1b7eae7eabd23dbeb4475))
+- Correct `@link` tags that involve parents (#9351) ([fbbce3e](https://github.com/discordjs/discord.js/commit/fbbce3eb4ba20bc0c4806ca2259d1f86001594be))
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Documentation
+
+- Reference package names properly (#9426) ([d6bca9b](https://github.com/discordjs/discord.js/commit/d6bca9bb4d976dc069a5039250db7d5b3e9142ef))
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+- **builders:** Add some basic documentation (#9359) ([8073561](https://github.com/discordjs/discord.js/commit/8073561824f911d1a18d0b4f1de39f452bc69fa9))
+- Use `@link` in `@see` (#9348) ([d66d113](https://github.com/discordjs/discord.js/commit/d66d1133331b81563588db4500c63a18c3c3dfae))
+
+# [@discordjs/builders@1.6.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.5.0...@discordjs/builders@1.6.0) - (2023-04-01)
+
+## Bug Fixes
+
+- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b))
+
+## Features
+
+- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b))
+
+# [@discordjs/builders@1.5.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.4.0...@discordjs/builders@1.5.0) - (2023-03-12)
+
+## Documentation
+
+- **EmbedBuilder#spliceFields:** Fix a typo (#9159) ([4367ab9](https://github.com/discordjs/discord.js/commit/4367ab930227048868db3ed8437f6c4507ff32e1))
+- Fix version export (#9049) ([8b70f49](https://github.com/discordjs/discord.js/commit/8b70f497a1207e30edebdecd12b926c981c13d28))
+
+## Features
+
+- **website:** Add support for source file links (#9048) ([f6506e9](https://github.com/discordjs/discord.js/commit/f6506e99c496683ee0ab67db0726b105b929af38))
+- **StringSelectMenu:** Add `spliceOptions()` (#8937) ([a6941d5](https://github.com/discordjs/discord.js/commit/a6941d536ce24ed2b5446a154cbc886b2b97c63a))
+- Add support for nsfw commands (#7976) ([7a51344](https://github.com/discordjs/discord.js/commit/7a5134459c5f06864bf74631d83b96d9c21b72d8))
+- Add `@discordjs/formatters` (#8889) ([3fca638](https://github.com/discordjs/discord.js/commit/3fca638a8470dcea2f79ddb9f18526dbc0017c88))
+
+## Styling
+
+- Run prettier (#9041) ([2798ba1](https://github.com/discordjs/discord.js/commit/2798ba1eb3d734f0cf2eeccd2e16cfba6804873b))
+
+# [@discordjs/builders@1.4.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.3.0...@discordjs/builders@1.4.0) - (2022-11-28)
+
+## Bug Fixes
+
+- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4))
+
+## Features
+
+- New select menus (#8793) ([5152abf](https://github.com/discordjs/discord.js/commit/5152abf7285581abf7689e9050fdc56c4abb1e2b))
+- Allow punctuation characters in context menus (#8783) ([b521366](https://github.com/discordjs/discord.js/commit/b5213664fa66746daab1673ebe2adf2db3d1522c))
+
+## Typings
+
+- **Formatters:** Allow boolean in `formatEmoji` (#8823) ([ec37f13](https://github.com/discordjs/discord.js/commit/ec37f137fd4fca0fdbdb8a5c83abf32362a8f285))
+
+# [@discordjs/builders@1.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.2.0...@discordjs/builders@1.3.0) - (2022-10-08)
+
+## Bug Fixes
+
+- Allow adding forums to `channelTypes` (#8658) ([b1e190c](https://github.com/discordjs/discord.js/commit/b1e190c4f0773a1a739625f5b41026f593515370))
+- **SlashCommandBuilder:** Missing methods in subcommand builder (#8583) ([1c5b78f](https://github.com/discordjs/discord.js/commit/1c5b78fd2130f09c951459cf4c2d637f46c3c2c9))
+- Footer / sidebar / deprecation alert ([ba3e0ed](https://github.com/discordjs/discord.js/commit/ba3e0ed348258fe8e51eefb4aa7379a1230616a9))
+
+## Documentation
+
+- **builders/components:** Document constructors (#8636) ([8444576](https://github.com/discordjs/discord.js/commit/8444576f45da5fdddbf8ba2d91b4cb31a3b51c04))
+- Change name (#8604) ([dd5a089](https://github.com/discordjs/discord.js/commit/dd5a08944c258a847fc4377f1d5e953264ab47d0))
+- Use remarks instead of `Note` in descriptions (#8597) ([f3ce4a7](https://github.com/discordjs/discord.js/commit/f3ce4a75d0c4eafc89a1f0ce9f4964bcbcdae6da))
+
+## Features
+
+- Web-components (#8715) ([0ac3e76](https://github.com/discordjs/discord.js/commit/0ac3e766bd9dbdeb106483fa4bb085d74de346a2))
+- Add `@discordjs/util` (#8591) ([b2ec865](https://github.com/discordjs/discord.js/commit/b2ec865765bf94181473864a627fb63ea8173fd3))
+- Add `chatInputApplicationCommandMention` formatter (#8546) ([d08a57c](https://github.com/discordjs/discord.js/commit/d08a57cadd9d69a734077cc1902d931ab10336db))
+
+## Refactor
+
+- Replace usage of deprecated `ChannelType`s (#8625) ([669c3cd](https://github.com/discordjs/discord.js/commit/669c3cd2566eac68ef38ab522dd6378ba761e8b3))
+- Website components (#8600) ([c334157](https://github.com/discordjs/discord.js/commit/c3341570d983aea9ecc419979d5a01de658c9d67))
+- Use `eslint-config-neon` for packages. (#8579) ([edadb9f](https://github.com/discordjs/discord.js/commit/edadb9fe5dfd9ff51a3cfc9b25cb242d3f9f5241))
+
+## Testing
+
+- Rename incorrect test (#8596) ([ce991dd](https://github.com/discordjs/discord.js/commit/ce991dd1d883f6785b5f4b4b3ac80ef21cb304e7))
+
+## Typings
+
+- **interactions:** Fix `{Slash,ContextMenu}CommandBuilder#toJSON` (#8568) ([b7eb96d](https://github.com/discordjs/discord.js/commit/b7eb96d45670616521fbcca28a657793d91605c7))
+
+# [@discordjs/builders@1.2.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.1.0...@discordjs/builders@1.2.0) - (2022-08-22)
+
+## Features
+
+- **website:** Show `constructor` information (#8540) ([e42fd16](https://github.com/discordjs/discord.js/commit/e42fd1636973b10dd7ed6fb4280ee1a4a8f82007))
+- **website:** Show descriptions for `@typeParam` blocks (#8523) ([e475b63](https://github.com/discordjs/discord.js/commit/e475b63f257f6261d73cb89fee9ecbcdd84e2a6b))
+- **website:** Show parameter descriptions (#8519) ([7f415a2](https://github.com/discordjs/discord.js/commit/7f415a2502bf7ce2025dbcfed9017b0635a19966))
+- **WebSocketShard:** Support new resume url (#8480) ([bc06cc6](https://github.com/discordjs/discord.js/commit/bc06cc638d2f57ab5c600e8cdb6afc8eb2180166))
+
+## Refactor
+
+- Docs design (#8487) ([4ab1d09](https://github.com/discordjs/discord.js/commit/4ab1d09997a18879a9eb9bda39df6f15aa22557e))
+
+# [@discordjs/builders@1.1.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@0.16.0...@discordjs/builders@1.1.0) - (2022-07-29)
+
+## Bug Fixes
+
+- Use proper format for `@link` text (#8384) ([2655639](https://github.com/discordjs/discord.js/commit/26556390a3800e954974a00c1328ff47d3e67e9a))
+- **Formatters:** Add newline in `codeBlock` (#8369) ([5d8bd03](https://github.com/discordjs/discord.js/commit/5d8bd030d60ef364de3ef5f9963da8bda5c4efd4))
+- **selectMenu:** Allow json to be used for select menu options (#8322) ([6a2d0d8](https://github.com/discordjs/discord.js/commit/6a2d0d8e96d157d5b85cee7f17bffdfff4240074))
+
+## Documentation
+
+- Use link tags (#8382) ([5494791](https://github.com/discordjs/discord.js/commit/549479131318c659f86f0eb18578d597e22522d3))
+
+## Features
+
+- Add channel & message URL formatters (#8371) ([a7deb8f](https://github.com/discordjs/discord.js/commit/a7deb8f89830ead6185c5fb46a49688b6d209ed1))
+
+## Testing
+
+- **builders:** Improve coverage (#8274) ([b7e6238](https://github.com/discordjs/discord.js/commit/b7e62380f2e6b9324d6bba9b9eaa5315080bf66a))
+
+# [@discordjs/builders@0.16.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@0.15.0...@discordjs/builders@0.16.0) - (2022-07-17)
+
+## Bug Fixes
+
+- Slash command name regex (#8265) ([32f9056](https://github.com/discordjs/discord.js/commit/32f9056b15edede3bab07de96afb4b56d3a9ecca))
+- **TextInputBuilder:** Parse `custom_id`, `label`, and `style` (#8216) ([2d9dfa3](https://github.com/discordjs/discord.js/commit/2d9dfa3c6ea4bb972da2f7e088d148b798c866d9))
+
+## Documentation
+
+- Add codecov coverage badge to readmes (#8226) ([f6db285](https://github.com/discordjs/discord.js/commit/f6db285c073898a749fe4591cbd4463d1896daf5))
+
+## Features
+
+- **builder:** Add max min length in string option (#8214) ([96c8d21](https://github.com/discordjs/discord.js/commit/96c8d21f95eb366c46ae23505ba9054f44821b25))
+- Codecov (#8219) ([f10f4cd](https://github.com/discordjs/discord.js/commit/f10f4cdcd88ca6be7ec735ed3a415ba13da83db0))
+- **docgen:** Update typedoc ([b3346f4](https://github.com/discordjs/discord.js/commit/b3346f4b9b3d4f96443506643d4631dc1c6d7b21))
+- Website (#8043) ([127931d](https://github.com/discordjs/discord.js/commit/127931d1df7a2a5c27923c2f2151dbf3824e50cc))
+- **docgen:** Typescript support ([3279b40](https://github.com/discordjs/discord.js/commit/3279b40912e6aa61507bedb7db15a2b8668de44b))
+- Docgen package (#8029) ([8b979c0](https://github.com/discordjs/discord.js/commit/8b979c0245c42fd824d8e98745ee869f5360fc86))
+
+## Refactor
+
+- **builder:** Remove `unsafe*Builder`s (#8074) ([a4d1862](https://github.com/discordjs/discord.js/commit/a4d18629828234f43f03d1bd4851d4b727c6903b))
+- Remove @sindresorhus/is as it's now esm only (#8133) ([c6f285b](https://github.com/discordjs/discord.js/commit/c6f285b7b089b004776fbeb444fe973a68d158d8))
+- Move all the config files to root (#8033) ([769ea0b](https://github.com/discordjs/discord.js/commit/769ea0bfe78c4f1d413c6b397c604ffe91e39c6a))
+
+## Typings
+
+- Remove expect error (#8242) ([7e6dbaa](https://github.com/discordjs/discord.js/commit/7e6dbaaed900c07d1a04e23bbbf9cd0d1b0501c5))
+- **builder:** Remove casting (#8241) ([8198da5](https://github.com/discordjs/discord.js/commit/8198da5cd0898e06954615a2287853321e7ebbd4))
+
+# [@discordjs/builders@0.15.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@0.14.0...@discordjs/builders@0.15.0) - (2022-06-06)
+
+## Features
+
+- Allow builders to accept rest params and arrays (#7874) ([ad75be9](https://github.com/discordjs/discord.js/commit/ad75be9a9cf90c8624495df99b75177e6c24022f))
+- Use vitest instead of jest for more speed ([8d8e6c0](https://github.com/discordjs/discord.js/commit/8d8e6c03decd7352a2aa180f6e5bc1a13602539b))
+- Add scripts package for locally used scripts ([f2ae1f9](https://github.com/discordjs/discord.js/commit/f2ae1f9348bfd893332a9060f71a8a5f272a1b8b))
+
+# [@discordjs/builders@0.14.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@0.13.0...@discordjs/builders@0.14.0) - (2022-06-04)
+
+## Bug Fixes
+
+- **builders:** Leftover invalid null type ([8a7cd10](https://github.com/discordjs/discord.js/commit/8a7cd10554a2a71cd2fe7f6a177b5f4f43464348))
+- **SlashCommandBuilder:** Import `Permissions` correctly (#7921) ([7ce641d](https://github.com/discordjs/discord.js/commit/7ce641d33a4af6586d5e7beffbe7d38619dcf1a2))
+- Add localizations for subcommand builders and option choices (#7862) ([c1b5e73](https://github.com/discordjs/discord.js/commit/c1b5e731daa9cbbfca03a046e47cb1221ee1ed7c))
+
+## Features
+
+- Export types from `interactions/slashCommands/mixins` (#7942) ([68d5169](https://github.com/discordjs/discord.js/commit/68d5169f66c96f8fe5be17a1c01cdd5155607ab2))
+- **builders:** Add new command permissions v2 (#7861) ([de3f157](https://github.com/discordjs/discord.js/commit/de3f1573f07dda294cc0fbb1ca4b659eb2388a12))
+- **builders:** Improve embed errors and predicates (#7795) ([ec8d87f](https://github.com/discordjs/discord.js/commit/ec8d87f93272cc9987f9613735c0361680c4ed1e))
+
+## Refactor
+
+- Use arrays instead of rest parameters for builders (#7759) ([29293d7](https://github.com/discordjs/discord.js/commit/29293d7bbb5ed463e52e5a5853817e5a09cf265b))
+
+## Styling
+
+- Cleanup tests and tsup configs ([6b8ef20](https://github.com/discordjs/discord.js/commit/6b8ef20cb3af5b5cfd176dd0aa0a1a1e98551629))
+
+# [@discordjs/builders@0.13.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@0.12.0...@discordjs/builders@0.13.0) - (2022-04-17)
+
+## Bug Fixes
+
+- Validate select menu options (#7566) ([b1d63d9](https://github.com/discordjs/discord.js/commit/b1d63d919a61f309ac89f27016b0f148678dac2b))
+- **SelectMenu:** Set `placeholder` max to 150 (#7538) ([dcd4797](https://github.com/discordjs/discord.js/commit/dcd479767b6ec980a373f2ea1f22754f41661c1e))
+- Only check `instanceof Component` once (#7546) ([0aa4851](https://github.com/discordjs/discord.js/commit/0aa48516a4e33497e8e8dc50da164a57cdee09d3))
+- **builders:** Allow negative min/max value of number/integer option (#7484) ([3baa340](https://github.com/discordjs/discord.js/commit/3baa340821b8ecf8a16253bc0917a1033250d7c9))
+- **components:** SetX should take rest parameters (#7461) ([3617359](https://github.com/discordjs/discord.js/commit/36173590a712f041b087b7882054805a8bd42dae))
+- Unsafe embed builder field normalization (#7418) ([b936103](https://github.com/discordjs/discord.js/commit/b936103395121cb21a8c616f669ddab1d2efb0f1))
+- Fix some typos (#7393) ([92a04f4](https://github.com/discordjs/discord.js/commit/92a04f4d98f6c6760214034cc8f5a1eaa78893c7))
+- **builders:** Make type optional in constructor (#7391) ([4abb28c](https://github.com/discordjs/discord.js/commit/4abb28c0a1256c57a60369a6b8ec9e98c265b489))
+- Don't create new instances of builders classes (#7343) ([d6b56d0](https://github.com/discordjs/discord.js/commit/d6b56d0080c4c5f8ace731f1e8bcae0c9d3fb5a5))
+
+## Documentation
+
+- Completely fix builders example link (#7543) ([1a14c0c](https://github.com/discordjs/discord.js/commit/1a14c0ca562ea173d363a770a0437209f461fd23))
+- Add slash command builders example, fixes #7338 (#7339) ([3ae6f3c](https://github.com/discordjs/discord.js/commit/3ae6f3c313091151245d6e6b52337b459ecfc765))
+
+## Features
+
+- Slash command localization for builders (#7683) ([40b9a1d](https://github.com/discordjs/discord.js/commit/40b9a1d67d0b508ec593e030913acd8161cd17f8))
+- Add API v10 support (#7477) ([72577c4](https://github.com/discordjs/discord.js/commit/72577c4bfd02524a27afb6ff4aebba9301a690d3))
+- Add support for module: NodeNext in TS and ESM (#7598) ([8f1986a](https://github.com/discordjs/discord.js/commit/8f1986a6aa98365e09b00e84ad5f9f354ab61f3d))
+- Add Modals and Text Inputs (#7023) ([ed92015](https://github.com/discordjs/discord.js/commit/ed920156344233241a21b0c0b99736a3a855c23c))
+- Add missing `v13` component methods (#7466) ([f7257f0](https://github.com/discordjs/discord.js/commit/f7257f07655076eabfe355cb6a53260b39ca9670))
+- **builders:** Add attachment command option type (#7203) ([ae0f35f](https://github.com/discordjs/discord.js/commit/ae0f35f51d68dfa5a7dc43d161ef9365171debdb))
+- **components:** Add unsafe message component builders (#7387) ([6b6222b](https://github.com/discordjs/discord.js/commit/6b6222bf513d1ee8cd98fba0ad313def560b864f))
+- **embed:** Add setFields (#7322) ([bcc5cda](https://github.com/discordjs/discord.js/commit/bcc5cda8a902ddb28c7e3578e0f29b4272832624))
+
+## Refactor
+
+- Remove nickname parsing (#7736) ([78a3afc](https://github.com/discordjs/discord.js/commit/78a3afcd7fdac358e06764cc0d675e1215c785f3))
+- Replace zod with shapeshift (#7547) ([3c0bbac](https://github.com/discordjs/discord.js/commit/3c0bbac82fa9988af4a62ff00c66d149fbe6b921))
+- Remove store channels (#7634) ([aedddb8](https://github.com/discordjs/discord.js/commit/aedddb875e740e1f1bd77f06ce1b361fd3b7bc36))
+- Allow builders to accept emoji strings (#7616) ([fb9a9c2](https://github.com/discordjs/discord.js/commit/fb9a9c221121ee1c7986f9c775b77b9691a0ae15))
+- Don't return builders from API data (#7584) ([549716e](https://github.com/discordjs/discord.js/commit/549716e4fcec89ca81216a6d22aa8e623175e37a))
+- Remove obsolete builder methods (#7590) ([10607db](https://github.com/discordjs/discord.js/commit/10607dbdafe257c5cbf5b952b7eecec4919e8b4a))
+- **Embed:** Remove add field (#7522) ([8478d2f](https://github.com/discordjs/discord.js/commit/8478d2f4de9ac013733850cbbc67902f7c5abc55))
+- Make `data` public in builders (#7486) ([ba31203](https://github.com/discordjs/discord.js/commit/ba31203a0ad96e0a00f8312c397889351e4c5cfd))
+- **embed:** Remove array support in favor of rest params (#7498) ([b3fa2ec](https://github.com/discordjs/discord.js/commit/b3fa2ece402839008738ad3adce3db958445838d))
+- **components:** Default set boolean methods to true (#7502) ([b122149](https://github.com/discordjs/discord.js/commit/b12214922cea2f43afbe6b1555a74a3c8e16f798))
+- Make public builder props getters (#7422) ([e8252ed](https://github.com/discordjs/discord.js/commit/e8252ed3b981a4b7e4013f12efadd2f5d9318d3e))
+- **builders-methods:** Make methods consistent (#7395) ([f495364](https://github.com/discordjs/discord.js/commit/f4953647ff9f39127978c73bf8a62c08462802ca))
+- Remove conditional autocomplete option return types (#7396) ([0909824](https://github.com/discordjs/discord.js/commit/09098240bfb13b8afafa4ab549f06d236e0ff1c9))
+- **embed:** Mark properties as readonly (#7332) ([31768fc](https://github.com/discordjs/discord.js/commit/31768fcd69ed5b4566a340bda89ce881418e8272))
+
+## Typings
+
+- Fix regressions (#7649) ([5748dbe](https://github.com/discordjs/discord.js/commit/5748dbe08783beb80c526de38ccd105eb0e82664))
+
+# [@discordjs/builders@0.12.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@0.11.0...@discordjs/builders@0.12.0) - (2022-01-24)
+
+## Bug Fixes
+
+- **builders:** Dont export `Button` component stuff twice (#7289) ([86d9d06](https://github.com/discordjs/discord.js/commit/86d9d0674347c08d056cd054cb4ce4253195bf94))
+
+## Documentation
+
+- **SlashCommandSubcommands:** Updating old links from Discord developer portal (#7224) ([bd7a6f2](https://github.com/discordjs/discord.js/commit/bd7a6f265212624199fb0b2ddc8ece39759c63de))
+
+## Features
+
+- Add components to /builders (#7195) ([2bb40fd](https://github.com/discordjs/discord.js/commit/2bb40fd767cf5918e3ba422ff73082734bfa05b0))
+
+## Typings
+
+- Make `required` a boolean (#7307) ([c10afea](https://github.com/discordjs/discord.js/commit/c10afeadc702ab98bec5e077b3b92494a9596f9c))
diff --git a/node_modules/@discordjs/builders/LICENSE b/node_modules/@discordjs/builders/LICENSE
new file mode 100644
index 0000000..cbe9c65
--- /dev/null
+++ b/node_modules/@discordjs/builders/LICENSE
@@ -0,0 +1,191 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright 2021 Noel Buechler
+ Copyright 2021 Vlad Frangu
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/node_modules/@discordjs/builders/README.md b/node_modules/@discordjs/builders/README.md
new file mode 100644
index 0000000..dc88b7f
--- /dev/null
+++ b/node_modules/@discordjs/builders/README.md
@@ -0,0 +1,72 @@
+<div align="center">
+ <br />
+ <p>
+ <a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
+ </p>
+ <br />
+ <p>
+ <a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
+ <a href="https://www.npmjs.com/package/@discordjs/builders"><img src="https://img.shields.io/npm/v/@discordjs/builders.svg?maxAge=3600" alt="npm version" /></a>
+ <a href="https://www.npmjs.com/package/@discordjs/builders"><img src="https://img.shields.io/npm/dt/@discordjs/builders.svg?maxAge=3600" alt="npm downloads" /></a>
+ <a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Build status" /></a>
+ <a href="https://codecov.io/gh/discordjs/discord.js" ><img src="https://codecov.io/gh/discordjs/discord.js/branch/main/graph/badge.svg?precision=2&flag=builders" alt="Code coverage" /></a>
+ </p>
+ <p>
+ <a href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-vercel.svg" alt="Vercel" /></a>
+ <a href="https://www.cloudflare.com"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-workers.png" alt="Cloudflare Workers" height="44" /></a>
+ </p>
+</div>
+
+## About
+
+`@discordjs/builders` is a utility package for easily building Discord API payloads.
+
+## Installation
+
+**Node.js 16.11.0 or newer is required.**
+
+```sh
+npm install @discordjs/builders
+yarn add @discordjs/builders
+pnpm add @discordjs/builders
+```
+
+## Examples
+
+You can find examples of how to use the builders in the [Slash Command Builders][example] examples.
+
+## Links
+
+- [Website][website] ([source][website-source])
+- [Documentation][documentation]
+- [Guide][guide] ([source][guide-source])
+ Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library.
+- [discord.js Discord server][discord]
+- [Discord API Discord server][discord-api]
+- [GitHub][source]
+- [npm][npm]
+- [Related libraries][related-libs]
+
+## Contributing
+
+Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
+[documentation][documentation].
+See [the contribution guide][contributing] if you'd like to submit a PR.
+
+## Help
+
+If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord].
+
+[example]: https://github.com/discordjs/discord.js/blob/main/packages/builders/docs/examples/Slash%20Command%20Builders.md
+[website]: https://discord.js.org
+[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
+[documentation]: https://discord.js.org/docs/packages/builders/stable
+[guide]: https://discordjs.guide/
+[guide-source]: https://github.com/discordjs/guide
+[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
+[discord]: https://discord.gg/djs
+[discord-api]: https://discord.gg/discord-api
+[source]: https://github.com/discordjs/discord.js/tree/main/packages/builders
+[npm]: https://www.npmjs.com/package/@discordjs/builders
+[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries
+[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md
diff --git a/node_modules/@discordjs/builders/dist/index.d.mts b/node_modules/@discordjs/builders/dist/index.d.mts
new file mode 100644
index 0000000..ffa1792
--- /dev/null
+++ b/node_modules/@discordjs/builders/dist/index.d.mts
@@ -0,0 +1,1948 @@
+import * as _sapphire_shapeshift from '@sapphire/shapeshift';
+import { APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, APIEmbed, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIActionRowComponent, APIActionRowComponentTypes, APIBaseComponent, ComponentType, APIButtonComponent, APISelectMenuComponent, APIChannelSelectComponent, APIMentionableSelectComponent, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIMessageActionRowComponent, APIModalActionRowComponent, APIModalComponent, APIMessageComponent, APIModalInteractionResponseCallbackData, LocalizationMap, LocaleString, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandAttachmentOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandOptionChoice, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandUserOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, Permissions, RESTPostAPIChatInputApplicationCommandsJSONBody, APIApplicationCommandOption, Locale, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody } from 'discord-api-types/v10';
+export * from '@discordjs/formatters';
+import { JSONEncodable, Equatable } from '@discordjs/util';
+
+declare const fieldNamePredicate: _sapphire_shapeshift.StringValidator<string>;
+declare const fieldValuePredicate: _sapphire_shapeshift.StringValidator<string>;
+declare const fieldInlinePredicate: _sapphire_shapeshift.UnionValidator<boolean | undefined>;
+declare const embedFieldPredicate: _sapphire_shapeshift.ObjectValidator<{
+ name: string;
+ value: string;
+ inline: boolean | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ name: string;
+ value: string;
+ inline: boolean | undefined;
+}>>;
+declare const embedFieldsArrayPredicate: _sapphire_shapeshift.ArrayValidator<_sapphire_shapeshift.UndefinedToOptional<{
+ name: string;
+ value: string;
+ inline: boolean | undefined;
+}>[], _sapphire_shapeshift.UndefinedToOptional<{
+ name: string;
+ value: string;
+ inline: boolean | undefined;
+}>>;
+declare const fieldLengthPredicate: _sapphire_shapeshift.NumberValidator<number>;
+declare function validateFieldLength(amountAdding: number, fields?: APIEmbedField[]): void;
+declare const authorNamePredicate: _sapphire_shapeshift.UnionValidator<string | null>;
+declare const imageURLPredicate: _sapphire_shapeshift.UnionValidator<string | null | undefined>;
+declare const urlPredicate: _sapphire_shapeshift.UnionValidator<string | null | undefined>;
+declare const embedAuthorPredicate: _sapphire_shapeshift.ObjectValidator<{
+ name: string | null;
+ iconURL: string | null | undefined;
+ url: string | null | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ name: string | null;
+ iconURL: string | null | undefined;
+ url: string | null | undefined;
+}>>;
+declare const RGBPredicate: _sapphire_shapeshift.NumberValidator<number>;
+declare const colorPredicate: _sapphire_shapeshift.UnionValidator<number | [number, number, number] | null>;
+declare const descriptionPredicate: _sapphire_shapeshift.UnionValidator<string | null>;
+declare const footerTextPredicate: _sapphire_shapeshift.UnionValidator<string | null>;
+declare const embedFooterPredicate: _sapphire_shapeshift.ObjectValidator<{
+ text: string | null;
+ iconURL: string | null | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ text: string | null;
+ iconURL: string | null | undefined;
+}>>;
+declare const timestampPredicate: _sapphire_shapeshift.UnionValidator<number | Date | null>;
+declare const titlePredicate: _sapphire_shapeshift.UnionValidator<string | null>;
+
+declare const Assertions$5_RGBPredicate: typeof RGBPredicate;
+declare const Assertions$5_authorNamePredicate: typeof authorNamePredicate;
+declare const Assertions$5_colorPredicate: typeof colorPredicate;
+declare const Assertions$5_descriptionPredicate: typeof descriptionPredicate;
+declare const Assertions$5_embedAuthorPredicate: typeof embedAuthorPredicate;
+declare const Assertions$5_embedFieldPredicate: typeof embedFieldPredicate;
+declare const Assertions$5_embedFieldsArrayPredicate: typeof embedFieldsArrayPredicate;
+declare const Assertions$5_embedFooterPredicate: typeof embedFooterPredicate;
+declare const Assertions$5_fieldInlinePredicate: typeof fieldInlinePredicate;
+declare const Assertions$5_fieldLengthPredicate: typeof fieldLengthPredicate;
+declare const Assertions$5_fieldNamePredicate: typeof fieldNamePredicate;
+declare const Assertions$5_fieldValuePredicate: typeof fieldValuePredicate;
+declare const Assertions$5_footerTextPredicate: typeof footerTextPredicate;
+declare const Assertions$5_imageURLPredicate: typeof imageURLPredicate;
+declare const Assertions$5_timestampPredicate: typeof timestampPredicate;
+declare const Assertions$5_titlePredicate: typeof titlePredicate;
+declare const Assertions$5_urlPredicate: typeof urlPredicate;
+declare const Assertions$5_validateFieldLength: typeof validateFieldLength;
+declare namespace Assertions$5 {
+ export {
+ Assertions$5_RGBPredicate as RGBPredicate,
+ Assertions$5_authorNamePredicate as authorNamePredicate,
+ Assertions$5_colorPredicate as colorPredicate,
+ Assertions$5_descriptionPredicate as descriptionPredicate,
+ Assertions$5_embedAuthorPredicate as embedAuthorPredicate,
+ Assertions$5_embedFieldPredicate as embedFieldPredicate,
+ Assertions$5_embedFieldsArrayPredicate as embedFieldsArrayPredicate,
+ Assertions$5_embedFooterPredicate as embedFooterPredicate,
+ Assertions$5_fieldInlinePredicate as fieldInlinePredicate,
+ Assertions$5_fieldLengthPredicate as fieldLengthPredicate,
+ Assertions$5_fieldNamePredicate as fieldNamePredicate,
+ Assertions$5_fieldValuePredicate as fieldValuePredicate,
+ Assertions$5_footerTextPredicate as footerTextPredicate,
+ Assertions$5_imageURLPredicate as imageURLPredicate,
+ Assertions$5_timestampPredicate as timestampPredicate,
+ Assertions$5_titlePredicate as titlePredicate,
+ Assertions$5_urlPredicate as urlPredicate,
+ Assertions$5_validateFieldLength as validateFieldLength,
+ };
+}
+
+/**
+ * Normalizes data that is a rest parameter or an array into an array with a depth of 1.
+ *
+ * @typeParam T - The data that must satisfy {@link RestOrArray}.
+ * @param arr - The (possibly variadic) data to normalize
+ */
+declare function normalizeArray<T>(arr: RestOrArray<T>): T[];
+/**
+ * Represents data that may be an array or came from a rest parameter.
+ *
+ * @remarks
+ * This type is used throughout builders to ensure both an array and variadic arguments
+ * may be used. It is normalized with {@link normalizeArray}.
+ */
+type RestOrArray<T> = T[] | [T[]];
+
+/**
+ * A tuple satisfying the RGB color model.
+ *
+ * @see {@link https://developer.mozilla.org/docs/Glossary/RGB}
+ */
+type RGBTuple = [red: number, green: number, blue: number];
+/**
+ * The base icon data typically used in payloads.
+ */
+interface IconData {
+ /**
+ * The URL of the icon.
+ */
+ iconURL?: string;
+ /**
+ * The proxy URL of the icon.
+ */
+ proxyIconURL?: string;
+}
+/**
+ * Represents the author data of an embed.
+ */
+type EmbedAuthorData = IconData & Omit<APIEmbedAuthor, 'icon_url' | 'proxy_icon_url'>;
+/**
+ * Represents the author options of an embed.
+ */
+type EmbedAuthorOptions = Omit<EmbedAuthorData, 'proxyIconURL'>;
+/**
+ * Represents the footer data of an embed.
+ */
+type EmbedFooterData = IconData & Omit<APIEmbedFooter, 'icon_url' | 'proxy_icon_url'>;
+/**
+ * Represents the footer options of an embed.
+ */
+type EmbedFooterOptions = Omit<EmbedFooterData, 'proxyIconURL'>;
+/**
+ * Represents the image data of an embed.
+ */
+interface EmbedImageData extends Omit<APIEmbedImage, 'proxy_url'> {
+ /**
+ * The proxy URL for the image.
+ */
+ proxyURL?: string;
+}
+/**
+ * A builder that creates API-compatible JSON data for embeds.
+ */
+declare class EmbedBuilder {
+ /**
+ * The API data associated with this embed.
+ */
+ readonly data: APIEmbed;
+ /**
+ * Creates a new embed from API data.
+ *
+ * @param data - The API data to create this embed with
+ */
+ constructor(data?: APIEmbed);
+ /**
+ * Appends fields to the embed.
+ *
+ * @remarks
+ * This method accepts either an array of fields or a variable number of field parameters.
+ * The maximum amount of fields that can be added is 25.
+ * @example
+ * Using an array:
+ * ```ts
+ * const fields: APIEmbedField[] = ...;
+ * const embed = new EmbedBuilder()
+ * .addFields(fields);
+ * ```
+ * @example
+ * Using rest parameters (variadic):
+ * ```ts
+ * const embed = new EmbedBuilder()
+ * .addFields(
+ * { name: 'Field 1', value: 'Value 1' },
+ * { name: 'Field 2', value: 'Value 2' },
+ * );
+ * ```
+ * @param fields - The fields to add
+ */
+ addFields(...fields: RestOrArray<APIEmbedField>): this;
+ /**
+ * Removes, replaces, or inserts fields for this embed.
+ *
+ * @remarks
+ * This method behaves similarly
+ * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
+ * The maximum amount of fields that can be added is 25.
+ *
+ * It's useful for modifying and adjusting order of the already-existing fields of an embed.
+ * @example
+ * Remove the first field:
+ * ```ts
+ * embed.spliceFields(0, 1);
+ * ```
+ * @example
+ * Remove the first n fields:
+ * ```ts
+ * const n = 4;
+ * embed.spliceFields(0, n);
+ * ```
+ * @example
+ * Remove the last field:
+ * ```ts
+ * embed.spliceFields(-1, 1);
+ * ```
+ * @param index - The index to start at
+ * @param deleteCount - The number of fields to remove
+ * @param fields - The replacing field objects
+ */
+ spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this;
+ /**
+ * Sets the fields for this embed.
+ *
+ * @remarks
+ * This method is an alias for {@link EmbedBuilder.spliceFields}. More specifically,
+ * it splices the entire array of fields, replacing them with the provided fields.
+ *
+ * You can set a maximum of 25 fields.
+ * @param fields - The fields to set
+ */
+ setFields(...fields: RestOrArray<APIEmbedField>): this;
+ /**
+ * Sets the author of this embed.
+ *
+ * @param options - The options to use
+ */
+ setAuthor(options: EmbedAuthorOptions | null): this;
+ /**
+ * Sets the color of this embed.
+ *
+ * @param color - The color to use
+ */
+ setColor(color: RGBTuple | number | null): this;
+ /**
+ * Sets the description of this embed.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description: string | null): this;
+ /**
+ * Sets the footer of this embed.
+ *
+ * @param options - The footer to use
+ */
+ setFooter(options: EmbedFooterOptions | null): this;
+ /**
+ * Sets the image of this embed.
+ *
+ * @param url - The image URL to use
+ */
+ setImage(url: string | null): this;
+ /**
+ * Sets the thumbnail of this embed.
+ *
+ * @param url - The thumbnail URL to use
+ */
+ setThumbnail(url: string | null): this;
+ /**
+ * Sets the timestamp of this embed.
+ *
+ * @param timestamp - The timestamp or date to use
+ */
+ setTimestamp(timestamp?: Date | number | null): this;
+ /**
+ * Sets the title for this embed.
+ *
+ * @param title - The title to use
+ */
+ setTitle(title: string | null): this;
+ /**
+ * Sets the URL of this embed.
+ *
+ * @param url - The URL to use
+ */
+ setURL(url: string | null): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): APIEmbed;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for string select menu options.
+ */
+declare class StringSelectMenuOptionBuilder implements JSONEncodable<APISelectMenuOption> {
+ data: Partial<APISelectMenuOption>;
+ /**
+ * Creates a new string select menu option from API data.
+ *
+ * @param data - The API data to create this string select menu option with
+ * @example
+ * Creating a string select menu option from an API data object:
+ * ```ts
+ * const selectMenuOption = new SelectMenuOptionBuilder({
+ * label: 'catchy label',
+ * value: '1',
+ * });
+ * ```
+ * @example
+ * Creating a string select menu option using setters and API data:
+ * ```ts
+ * const selectMenuOption = new SelectMenuOptionBuilder({
+ * default: true,
+ * value: '1',
+ * })
+ * .setLabel('woah');
+ * ```
+ */
+ constructor(data?: Partial<APISelectMenuOption>);
+ /**
+ * Sets the label for this option.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label: string): this;
+ /**
+ * Sets the value for this option.
+ *
+ * @param value - The value to use
+ */
+ setValue(value: string): this;
+ /**
+ * Sets the description for this option.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description: string): this;
+ /**
+ * Sets whether this option is selected by default.
+ *
+ * @param isDefault - Whether this option is selected by default
+ */
+ setDefault(isDefault?: boolean): this;
+ /**
+ * Sets the emoji to display for this option.
+ *
+ * @param emoji - The emoji to use
+ */
+ setEmoji(emoji: APIMessageComponentEmoji): this;
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON(): APISelectMenuOption;
+}
+
+declare const customIdValidator: _sapphire_shapeshift.StringValidator<string>;
+declare const emojiValidator: _sapphire_shapeshift.ObjectValidator<{
+ name?: string | undefined;
+ id?: string | undefined;
+ animated?: boolean | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ name?: string | undefined;
+ id?: string | undefined;
+ animated?: boolean | undefined;
+}>>;
+declare const disabledValidator: _sapphire_shapeshift.BooleanValidator<boolean>;
+declare const buttonLabelValidator: _sapphire_shapeshift.StringValidator<string>;
+declare const buttonStyleValidator: _sapphire_shapeshift.NativeEnumValidator<typeof ButtonStyle>;
+declare const placeholderValidator$1: _sapphire_shapeshift.StringValidator<string>;
+declare const minMaxValidator: _sapphire_shapeshift.NumberValidator<number>;
+declare const labelValueDescriptionValidator: _sapphire_shapeshift.StringValidator<string>;
+declare const jsonOptionValidator: _sapphire_shapeshift.ObjectValidator<{
+ label: string;
+ value: string;
+ description: string | undefined;
+ emoji: _sapphire_shapeshift.UndefinedToOptional<{
+ name?: string | undefined;
+ id?: string | undefined;
+ animated?: boolean | undefined;
+ }> | undefined;
+ default: boolean | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ label: string;
+ value: string;
+ description: string | undefined;
+ emoji: _sapphire_shapeshift.UndefinedToOptional<{
+ name?: string | undefined;
+ id?: string | undefined;
+ animated?: boolean | undefined;
+ }> | undefined;
+ default: boolean | undefined;
+}>>;
+declare const optionValidator: _sapphire_shapeshift.InstanceValidator<StringSelectMenuOptionBuilder>;
+declare const optionsValidator: _sapphire_shapeshift.ArrayValidator<StringSelectMenuOptionBuilder[], StringSelectMenuOptionBuilder>;
+declare const optionsLengthValidator: _sapphire_shapeshift.NumberValidator<number>;
+declare function validateRequiredSelectMenuParameters(options: StringSelectMenuOptionBuilder[], customId?: string): void;
+declare const defaultValidator: _sapphire_shapeshift.BooleanValidator<boolean>;
+declare function validateRequiredSelectMenuOptionParameters(label?: string, value?: string): void;
+declare const channelTypesValidator: _sapphire_shapeshift.ArrayValidator<ChannelType[], ChannelType>;
+declare const urlValidator: _sapphire_shapeshift.StringValidator<string>;
+declare function validateRequiredButtonParameters(style?: ButtonStyle, label?: string, emoji?: APIMessageComponentEmoji, customId?: string, url?: string): void;
+
+declare const Assertions$4_buttonLabelValidator: typeof buttonLabelValidator;
+declare const Assertions$4_buttonStyleValidator: typeof buttonStyleValidator;
+declare const Assertions$4_channelTypesValidator: typeof channelTypesValidator;
+declare const Assertions$4_customIdValidator: typeof customIdValidator;
+declare const Assertions$4_defaultValidator: typeof defaultValidator;
+declare const Assertions$4_disabledValidator: typeof disabledValidator;
+declare const Assertions$4_emojiValidator: typeof emojiValidator;
+declare const Assertions$4_jsonOptionValidator: typeof jsonOptionValidator;
+declare const Assertions$4_labelValueDescriptionValidator: typeof labelValueDescriptionValidator;
+declare const Assertions$4_minMaxValidator: typeof minMaxValidator;
+declare const Assertions$4_optionValidator: typeof optionValidator;
+declare const Assertions$4_optionsLengthValidator: typeof optionsLengthValidator;
+declare const Assertions$4_optionsValidator: typeof optionsValidator;
+declare const Assertions$4_urlValidator: typeof urlValidator;
+declare const Assertions$4_validateRequiredButtonParameters: typeof validateRequiredButtonParameters;
+declare const Assertions$4_validateRequiredSelectMenuOptionParameters: typeof validateRequiredSelectMenuOptionParameters;
+declare const Assertions$4_validateRequiredSelectMenuParameters: typeof validateRequiredSelectMenuParameters;
+declare namespace Assertions$4 {
+ export {
+ Assertions$4_buttonLabelValidator as buttonLabelValidator,
+ Assertions$4_buttonStyleValidator as buttonStyleValidator,
+ Assertions$4_channelTypesValidator as channelTypesValidator,
+ Assertions$4_customIdValidator as customIdValidator,
+ Assertions$4_defaultValidator as defaultValidator,
+ Assertions$4_disabledValidator as disabledValidator,
+ Assertions$4_emojiValidator as emojiValidator,
+ Assertions$4_jsonOptionValidator as jsonOptionValidator,
+ Assertions$4_labelValueDescriptionValidator as labelValueDescriptionValidator,
+ Assertions$4_minMaxValidator as minMaxValidator,
+ Assertions$4_optionValidator as optionValidator,
+ Assertions$4_optionsLengthValidator as optionsLengthValidator,
+ Assertions$4_optionsValidator as optionsValidator,
+ placeholderValidator$1 as placeholderValidator,
+ Assertions$4_urlValidator as urlValidator,
+ Assertions$4_validateRequiredButtonParameters as validateRequiredButtonParameters,
+ Assertions$4_validateRequiredSelectMenuOptionParameters as validateRequiredSelectMenuOptionParameters,
+ Assertions$4_validateRequiredSelectMenuParameters as validateRequiredSelectMenuParameters,
+ };
+}
+
+/**
+ * Any action row component data represented as an object.
+ */
+type AnyAPIActionRowComponent = APIActionRowComponent<APIActionRowComponentTypes> | APIActionRowComponentTypes;
+/**
+ * The base component builder that contains common symbols for all sorts of components.
+ *
+ * @typeParam DataType - The type of internal API data that is stored within the component
+ */
+declare abstract class ComponentBuilder<DataType extends Partial<APIBaseComponent<ComponentType>> = APIBaseComponent<ComponentType>> implements JSONEncodable<AnyAPIActionRowComponent> {
+ /**
+ * The API data associated with this component.
+ */
+ readonly data: Partial<DataType>;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ abstract toJSON(): AnyAPIActionRowComponent;
+ /**
+ * Constructs a new kind of component.
+ *
+ * @param data - The data to construct a component out of
+ */
+ constructor(data: Partial<DataType>);
+}
+
+/**
+ * A builder that creates API-compatible JSON data for buttons.
+ */
+declare class ButtonBuilder extends ComponentBuilder<APIButtonComponent> {
+ /**
+ * Creates a new button from API data.
+ *
+ * @param data - The API data to create this button with
+ * @example
+ * Creating a button from an API data object:
+ * ```ts
+ * const button = new ButtonBuilder({
+ * custom_id: 'a cool button',
+ * style: ButtonStyle.Primary,
+ * label: 'Click Me',
+ * emoji: {
+ * name: 'smile',
+ * id: '123456789012345678',
+ * },
+ * });
+ * ```
+ * @example
+ * Creating a button using setters and API data:
+ * ```ts
+ * const button = new ButtonBuilder({
+ * style: ButtonStyle.Secondary,
+ * label: 'Click Me',
+ * })
+ * .setEmoji({ name: '🙂' })
+ * .setCustomId('another cool button');
+ * ```
+ */
+ constructor(data?: Partial<APIButtonComponent>);
+ /**
+ * Sets the style of this button.
+ *
+ * @param style - The style to use
+ */
+ setStyle(style: ButtonStyle): this;
+ /**
+ * Sets the URL for this button.
+ *
+ * @remarks
+ * This method is only available to buttons using the `Link` button style.
+ * Only three types of URL schemes are currently supported: `https://`, `http://`, and `discord://`.
+ * @param url - The URL to use
+ */
+ setURL(url: string): this;
+ /**
+ * Sets the custom id for this button.
+ *
+ * @remarks
+ * This method is only applicable to buttons that are not using the `Link` button style.
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId: string): this;
+ /**
+ * Sets the emoji to display on this button.
+ *
+ * @param emoji - The emoji to use
+ */
+ setEmoji(emoji: APIMessageComponentEmoji): this;
+ /**
+ * Sets whether this button is disabled.
+ *
+ * @param disabled - Whether to disable this button
+ */
+ setDisabled(disabled?: boolean): this;
+ /**
+ * Sets the label for this button.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label: string): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): APIButtonComponent;
+}
+
+/**
+ * The base select menu builder that contains common symbols for select menu builders.
+ *
+ * @typeParam SelectMenuType - The type of select menu this would be instantiated for.
+ */
+declare abstract class BaseSelectMenuBuilder<SelectMenuType extends APISelectMenuComponent> extends ComponentBuilder<SelectMenuType> {
+ /**
+ * Sets the placeholder for this select menu.
+ *
+ * @param placeholder - The placeholder to use
+ */
+ setPlaceholder(placeholder: string): this;
+ /**
+ * Sets the minimum values that must be selected in the select menu.
+ *
+ * @param minValues - The minimum values that must be selected
+ */
+ setMinValues(minValues: number): this;
+ /**
+ * Sets the maximum values that must be selected in the select menu.
+ *
+ * @param maxValues - The maximum values that must be selected
+ */
+ setMaxValues(maxValues: number): this;
+ /**
+ * Sets the custom id for this select menu.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId: string): this;
+ /**
+ * Sets whether this select menu is disabled.
+ *
+ * @param disabled - Whether this select menu is disabled
+ */
+ setDisabled(disabled?: boolean): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): SelectMenuType;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for channel select menus.
+ */
+declare class ChannelSelectMenuBuilder extends BaseSelectMenuBuilder<APIChannelSelectComponent> {
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new ChannelSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new ChannelSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)
+ * .setMinValues(2);
+ * ```
+ */
+ constructor(data?: Partial<APIChannelSelectComponent>);
+ /**
+ * Adds channel types to this select menu.
+ *
+ * @param types - The channel types to use
+ */
+ addChannelTypes(...types: RestOrArray<ChannelType>): this;
+ /**
+ * Sets channel types for this select menu.
+ *
+ * @param types - The channel types to use
+ */
+ setChannelTypes(...types: RestOrArray<ChannelType>): this;
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON(): APIChannelSelectComponent;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for mentionable select menus.
+ */
+declare class MentionableSelectMenuBuilder extends BaseSelectMenuBuilder<APIMentionableSelectComponent> {
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new MentionableSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new MentionableSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data?: Partial<APIMentionableSelectComponent>);
+}
+
+/**
+ * A builder that creates API-compatible JSON data for role select menus.
+ */
+declare class RoleSelectMenuBuilder extends BaseSelectMenuBuilder<APIRoleSelectComponent> {
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new RoleSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new RoleSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data?: Partial<APIRoleSelectComponent>);
+}
+
+/**
+ * A builder that creates API-compatible JSON data for string select menus.
+ */
+declare class StringSelectMenuBuilder extends BaseSelectMenuBuilder<APIStringSelectComponent> {
+ /**
+ * The options within this select menu.
+ */
+ readonly options: StringSelectMenuOptionBuilder[];
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new StringSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * options: [
+ * { label: 'option 1', value: '1' },
+ * { label: 'option 2', value: '2' },
+ * { label: 'option 3', value: '3' },
+ * ],
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new StringSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1)
+ * .addOptions({
+ * label: 'Catchy',
+ * value: 'catch',
+ * });
+ * ```
+ */
+ constructor(data?: Partial<APIStringSelectComponent>);
+ /**
+ * Adds options to this select menu.
+ *
+ * @param options - The options to add
+ */
+ addOptions(...options: RestOrArray<APISelectMenuOption | StringSelectMenuOptionBuilder>): this;
+ /**
+ * Sets the options for this select menu.
+ *
+ * @param options - The options to set
+ */
+ setOptions(...options: RestOrArray<APISelectMenuOption | StringSelectMenuOptionBuilder>): this;
+ /**
+ * Removes, replaces, or inserts options for this select menu.
+ *
+ * @remarks
+ * This method behaves similarly
+ * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}.
+ * It's useful for modifying and adjusting the order of existing options.
+ * @example
+ * Remove the first option:
+ * ```ts
+ * selectMenu.spliceOptions(0, 1);
+ * ```
+ * @example
+ * Remove the first n option:
+ * ```ts
+ * const n = 4;
+ * selectMenu.spliceOptions(0, n);
+ * ```
+ * @example
+ * Remove the last option:
+ * ```ts
+ * selectMenu.spliceOptions(-1, 1);
+ * ```
+ * @param index - The index to start at
+ * @param deleteCount - The number of options to remove
+ * @param options - The replacing option objects or builders
+ */
+ spliceOptions(index: number, deleteCount: number, ...options: RestOrArray<APISelectMenuOption | StringSelectMenuOptionBuilder>): this;
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON(): APIStringSelectComponent;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for user select menus.
+ */
+declare class UserSelectMenuBuilder extends BaseSelectMenuBuilder<APIUserSelectComponent> {
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new UserSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new UserSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data?: Partial<APIUserSelectComponent>);
+}
+
+/**
+ * A builder that creates API-compatible JSON data for text inputs.
+ */
+declare class TextInputBuilder extends ComponentBuilder<APITextInputComponent> implements Equatable<APITextInputComponent | JSONEncodable<APITextInputComponent>> {
+ /**
+ * Creates a new text input from API data.
+ *
+ * @param data - The API data to create this text input with
+ * @example
+ * Creating a select menu option from an API data object:
+ * ```ts
+ * const textInput = new TextInputBuilder({
+ * custom_id: 'a cool select menu',
+ * label: 'Type something',
+ * style: TextInputStyle.Short,
+ * });
+ * ```
+ * @example
+ * Creating a select menu option using setters and API data:
+ * ```ts
+ * const textInput = new TextInputBuilder({
+ * label: 'Type something else',
+ * })
+ * .setCustomId('woah')
+ * .setStyle(TextInputStyle.Paragraph);
+ * ```
+ */
+ constructor(data?: APITextInputComponent & {
+ type?: ComponentType.TextInput;
+ });
+ /**
+ * Sets the custom id for this text input.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId: string): this;
+ /**
+ * Sets the label for this text input.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label: string): this;
+ /**
+ * Sets the style for this text input.
+ *
+ * @param style - The style to use
+ */
+ setStyle(style: TextInputStyle): this;
+ /**
+ * Sets the minimum length of text for this text input.
+ *
+ * @param minLength - The minimum length of text for this text input
+ */
+ setMinLength(minLength: number): this;
+ /**
+ * Sets the maximum length of text for this text input.
+ *
+ * @param maxLength - The maximum length of text for this text input
+ */
+ setMaxLength(maxLength: number): this;
+ /**
+ * Sets the placeholder for this text input.
+ *
+ * @param placeholder - The placeholder to use
+ */
+ setPlaceholder(placeholder: string): this;
+ /**
+ * Sets the value for this text input.
+ *
+ * @param value - The value to use
+ */
+ setValue(value: string): this;
+ /**
+ * Sets whether this text input is required.
+ *
+ * @param required - Whether this text input is required
+ */
+ setRequired(required?: boolean): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): APITextInputComponent;
+ /**
+ * {@inheritDoc Equatable.equals}
+ */
+ equals(other: APITextInputComponent | JSONEncodable<APITextInputComponent>): boolean;
+}
+
+/**
+ * The builders that may be used for messages.
+ */
+type MessageComponentBuilder = ActionRowBuilder<MessageActionRowComponentBuilder> | MessageActionRowComponentBuilder;
+/**
+ * The builders that may be used for modals.
+ */
+type ModalComponentBuilder = ActionRowBuilder<ModalActionRowComponentBuilder> | ModalActionRowComponentBuilder;
+/**
+ * The builders that may be used within an action row for messages.
+ */
+type MessageActionRowComponentBuilder = ButtonBuilder | ChannelSelectMenuBuilder | MentionableSelectMenuBuilder | RoleSelectMenuBuilder | StringSelectMenuBuilder | UserSelectMenuBuilder;
+/**
+ * The builders that may be used within an action row for modals.
+ */
+type ModalActionRowComponentBuilder = TextInputBuilder;
+/**
+ * Any builder.
+ */
+type AnyComponentBuilder = MessageActionRowComponentBuilder | ModalActionRowComponentBuilder;
+/**
+ * A builder that creates API-compatible JSON data for action rows.
+ *
+ * @typeParam T - The types of components this action row holds
+ */
+declare class ActionRowBuilder<T extends AnyComponentBuilder> extends ComponentBuilder<APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>> {
+ /**
+ * The components within this action row.
+ */
+ readonly components: T[];
+ /**
+ * Creates a new action row from API data.
+ *
+ * @param data - The API data to create this action row with
+ * @example
+ * Creating an action row from an API data object:
+ * ```ts
+ * const actionRow = new ActionRowBuilder({
+ * components: [
+ * {
+ * custom_id: "custom id",
+ * label: "Type something",
+ * style: TextInputStyle.Short,
+ * type: ComponentType.TextInput,
+ * },
+ * ],
+ * });
+ * ```
+ * @example
+ * Creating an action row using setters and API data:
+ * ```ts
+ * const actionRow = new ActionRowBuilder({
+ * components: [
+ * {
+ * custom_id: "custom id",
+ * label: "Click me",
+ * style: ButtonStyle.Primary,
+ * type: ComponentType.Button,
+ * },
+ * ],
+ * })
+ * .addComponents(button2, button3);
+ * ```
+ */
+ constructor({ components, ...data }?: Partial<APIActionRowComponent<APIActionRowComponentTypes>>);
+ /**
+ * Adds components to this action row.
+ *
+ * @param components - The components to add
+ */
+ addComponents(...components: RestOrArray<T>): this;
+ /**
+ * Sets components for this action row.
+ *
+ * @param components - The components to set
+ */
+ setComponents(...components: RestOrArray<T>): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): APIActionRowComponent<ReturnType<T['toJSON']>>;
+}
+
+/**
+ * Components here are mapped to their respective builder.
+ */
+interface MappedComponentTypes {
+ /**
+ * The action row component type is associated with an {@link ActionRowBuilder}.
+ */
+ [ComponentType.ActionRow]: ActionRowBuilder<AnyComponentBuilder>;
+ /**
+ * The button component type is associated with an {@link ButtonBuilder}.
+ */
+ [ComponentType.Button]: ButtonBuilder;
+ /**
+ * The string select component type is associated with an {@link StringSelectMenuBuilder}.
+ */
+ [ComponentType.StringSelect]: StringSelectMenuBuilder;
+ /**
+ * The text inpiut component type is associated with an {@link TextInputBuilder}.
+ */
+ [ComponentType.TextInput]: TextInputBuilder;
+ /**
+ * The user select component type is associated with an {@link UserSelectMenuBuilder}.
+ */
+ [ComponentType.UserSelect]: UserSelectMenuBuilder;
+ /**
+ * The role select component type is associated with an {@link RoleSelectMenuBuilder}.
+ */
+ [ComponentType.RoleSelect]: RoleSelectMenuBuilder;
+ /**
+ * The mentionable select component type is associated with an {@link MentionableSelectMenuBuilder}.
+ */
+ [ComponentType.MentionableSelect]: MentionableSelectMenuBuilder;
+ /**
+ * The channel select component type is associated with an {@link ChannelSelectMenuBuilder}.
+ */
+ [ComponentType.ChannelSelect]: ChannelSelectMenuBuilder;
+}
+/**
+ * Factory for creating components from API data.
+ *
+ * @typeParam T - The type of component to use
+ * @param data - The API data to transform to a component class
+ */
+declare function createComponentBuilder<T extends keyof MappedComponentTypes>(data: (APIModalComponent | APIMessageComponent) & {
+ type: T;
+}): MappedComponentTypes[T];
+/**
+ * Factory for creating components from API data.
+ *
+ * @typeParam C - The type of component to use
+ * @param data - The API data to transform to a component class
+ */
+declare function createComponentBuilder<C extends MessageComponentBuilder | ModalComponentBuilder>(data: C): C;
+
+declare const textInputStyleValidator: _sapphire_shapeshift.NativeEnumValidator<typeof TextInputStyle>;
+declare const minLengthValidator: _sapphire_shapeshift.NumberValidator<number>;
+declare const maxLengthValidator: _sapphire_shapeshift.NumberValidator<number>;
+declare const requiredValidator: _sapphire_shapeshift.BooleanValidator<boolean>;
+declare const valueValidator: _sapphire_shapeshift.StringValidator<string>;
+declare const placeholderValidator: _sapphire_shapeshift.StringValidator<string>;
+declare const labelValidator: _sapphire_shapeshift.StringValidator<string>;
+declare function validateRequiredParameters$3(customId?: string, style?: TextInputStyle, label?: string): void;
+
+declare const Assertions$3_labelValidator: typeof labelValidator;
+declare const Assertions$3_maxLengthValidator: typeof maxLengthValidator;
+declare const Assertions$3_minLengthValidator: typeof minLengthValidator;
+declare const Assertions$3_placeholderValidator: typeof placeholderValidator;
+declare const Assertions$3_requiredValidator: typeof requiredValidator;
+declare const Assertions$3_textInputStyleValidator: typeof textInputStyleValidator;
+declare const Assertions$3_valueValidator: typeof valueValidator;
+declare namespace Assertions$3 {
+ export {
+ Assertions$3_labelValidator as labelValidator,
+ Assertions$3_maxLengthValidator as maxLengthValidator,
+ Assertions$3_minLengthValidator as minLengthValidator,
+ Assertions$3_placeholderValidator as placeholderValidator,
+ Assertions$3_requiredValidator as requiredValidator,
+ Assertions$3_textInputStyleValidator as textInputStyleValidator,
+ validateRequiredParameters$3 as validateRequiredParameters,
+ Assertions$3_valueValidator as valueValidator,
+ };
+}
+
+/**
+ * A builder that creates API-compatible JSON data for modals.
+ */
+declare class ModalBuilder implements JSONEncodable<APIModalInteractionResponseCallbackData> {
+ /**
+ * The API data associated with this modal.
+ */
+ readonly data: Partial<APIModalInteractionResponseCallbackData>;
+ /**
+ * The components within this modal.
+ */
+ readonly components: ActionRowBuilder<ModalActionRowComponentBuilder>[];
+ /**
+ * Creates a new modal from API data.
+ *
+ * @param data - The API data to create this modal with
+ */
+ constructor({ components, ...data }?: Partial<APIModalInteractionResponseCallbackData>);
+ /**
+ * Sets the title of this modal.
+ *
+ * @param title - The title to use
+ */
+ setTitle(title: string): this;
+ /**
+ * Sets the custom id of this modal.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId: string): this;
+ /**
+ * Adds components to this modal.
+ *
+ * @param components - The components to add
+ */
+ addComponents(...components: RestOrArray<ActionRowBuilder<ModalActionRowComponentBuilder> | APIActionRowComponent<APIModalActionRowComponent>>): this;
+ /**
+ * Sets components for this modal.
+ *
+ * @param components - The components to set
+ */
+ setComponents(...components: RestOrArray<ActionRowBuilder<ModalActionRowComponentBuilder>>): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): APIModalInteractionResponseCallbackData;
+}
+
+declare const titleValidator: _sapphire_shapeshift.StringValidator<string>;
+declare const componentsValidator: _sapphire_shapeshift.ArrayValidator<[ActionRowBuilder<AnyComponentBuilder>, ...ActionRowBuilder<AnyComponentBuilder>[]], ActionRowBuilder<AnyComponentBuilder>>;
+declare function validateRequiredParameters$2(customId?: string, title?: string, components?: ActionRowBuilder<ModalActionRowComponentBuilder>[]): void;
+
+declare const Assertions$2_componentsValidator: typeof componentsValidator;
+declare const Assertions$2_titleValidator: typeof titleValidator;
+declare namespace Assertions$2 {
+ export {
+ Assertions$2_componentsValidator as componentsValidator,
+ Assertions$2_titleValidator as titleValidator,
+ validateRequiredParameters$2 as validateRequiredParameters,
+ };
+}
+
+/**
+ * This mixin holds name and description symbols for slash commands.
+ */
+declare class SharedNameAndDescription {
+ /**
+ * The name of this command.
+ */
+ readonly name: string;
+ /**
+ * The name localizations of this command.
+ */
+ readonly name_localizations?: LocalizationMap;
+ /**
+ * The description of this command.
+ */
+ readonly description: string;
+ /**
+ * The description localizations of this command.
+ */
+ readonly description_localizations?: LocalizationMap;
+ /**
+ * Sets the name of this command.
+ *
+ * @param name - The name to use
+ */
+ setName(name: string): this;
+ /**
+ * Sets the description of this command.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description: string): this;
+ /**
+ * Sets a name localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedName - The localized name for the given `locale`
+ */
+ setNameLocalization(locale: LocaleString, localizedName: string | null): this;
+ /**
+ * Sets the name localizations for this command.
+ *
+ * @param localizedNames - The object of localized names to set
+ */
+ setNameLocalizations(localizedNames: LocalizationMap | null): this;
+ /**
+ * Sets a description localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedDescription - The localized description for the given locale
+ */
+ setDescriptionLocalization(locale: LocaleString, localizedDescription: string | null): this;
+ /**
+ * Sets the description localizations for this command.
+ *
+ * @param localizedDescriptions - The object of localized descriptions to set
+ */
+ setDescriptionLocalizations(localizedDescriptions: LocalizationMap | null): this;
+}
+
+/**
+ * The base application command option builder that contains common symbols for application command builders.
+ */
+declare abstract class ApplicationCommandOptionBase extends SharedNameAndDescription {
+ /**
+ * The type of this option.
+ */
+ abstract readonly type: ApplicationCommandOptionType;
+ /**
+ * Whether this option is required.
+ *
+ * @defaultValue `false`
+ */
+ readonly required: boolean;
+ /**
+ * Sets whether this option is required.
+ *
+ * @param required - Whether this option should be required
+ */
+ setRequired(required: boolean): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ abstract toJSON(): APIApplicationCommandBasicOption;
+ /**
+ * This method runs required validators on this builder.
+ */
+ protected runRequiredValidations(): void;
+}
+
+/**
+ * A slash command attachment option.
+ */
+declare class SlashCommandAttachmentOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Attachment;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandAttachmentOption;
+}
+
+/**
+ * A slash command boolean option.
+ */
+declare class SlashCommandBooleanOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Boolean;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandBooleanOption;
+}
+
+/**
+ * The allowed channel types used for a channel option in a slash command builder.
+ *
+ * @privateRemarks This can't be dynamic because const enums are erased at runtime.
+ * @internal
+ */
+declare const allowedChannelTypes: readonly [ChannelType.GuildText, ChannelType.GuildVoice, ChannelType.GuildCategory, ChannelType.GuildAnnouncement, ChannelType.AnnouncementThread, ChannelType.PublicThread, ChannelType.PrivateThread, ChannelType.GuildStageVoice, ChannelType.GuildForum];
+/**
+ * The type of allowed channel types used for a channel option.
+ */
+type ApplicationCommandOptionAllowedChannelTypes = (typeof allowedChannelTypes)[number];
+/**
+ * This mixin holds channel type symbols used for options.
+ */
+declare class ApplicationCommandOptionChannelTypesMixin {
+ /**
+ * The channel types of this option.
+ */
+ readonly channel_types?: ApplicationCommandOptionAllowedChannelTypes[];
+ /**
+ * Adds channel types to this option.
+ *
+ * @param channelTypes - The channel types
+ */
+ addChannelTypes(...channelTypes: ApplicationCommandOptionAllowedChannelTypes[]): this;
+}
+
+/**
+ * A slash command channel option.
+ */
+declare class SlashCommandChannelOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Channel;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandChannelOption;
+}
+interface SlashCommandChannelOption extends ApplicationCommandOptionChannelTypesMixin {
+}
+
+/**
+ * This mixin holds minimum and maximum symbols used for options.
+ */
+declare abstract class ApplicationCommandNumericOptionMinMaxValueMixin {
+ /**
+ * The maximum value of this option.
+ */
+ readonly max_value?: number;
+ /**
+ * The minimum value of this option.
+ */
+ readonly min_value?: number;
+ /**
+ * Sets the maximum number value of this option.
+ *
+ * @param max - The maximum value this option can be
+ */
+ abstract setMaxValue(max: number): this;
+ /**
+ * Sets the minimum number value of this option.
+ *
+ * @param min - The minimum value this option can be
+ */
+ abstract setMinValue(min: number): this;
+}
+
+/**
+ * This mixin holds choices and autocomplete symbols used for options.
+ */
+declare class ApplicationCommandOptionWithChoicesAndAutocompleteMixin<T extends number | string> {
+ /**
+ * The choices of this option.
+ */
+ readonly choices?: APIApplicationCommandOptionChoice<T>[];
+ /**
+ * Whether this option utilizes autocomplete.
+ */
+ readonly autocomplete?: boolean;
+ /**
+ * The type of this option.
+ *
+ * @privateRemarks Since this is present and this is a mixin, this is needed.
+ */
+ readonly type: ApplicationCommandOptionType;
+ /**
+ * Adds multiple choices to this option.
+ *
+ * @param choices - The choices to add
+ */
+ addChoices(...choices: APIApplicationCommandOptionChoice<T>[]): this;
+ /**
+ * Sets multiple choices for this option.
+ *
+ * @param choices - The choices to set
+ */
+ setChoices<Input extends APIApplicationCommandOptionChoice<T>[]>(...choices: Input): this;
+ /**
+ * Whether this option uses autocomplete.
+ *
+ * @param autocomplete - Whether this option should use autocomplete
+ */
+ setAutocomplete(autocomplete: boolean): this;
+}
+
+/**
+ * A slash command integer option.
+ */
+declare class SlashCommandIntegerOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Integer;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
+ */
+ setMaxValue(max: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}
+ */
+ setMinValue(min: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandIntegerOption;
+}
+interface SlashCommandIntegerOption extends ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {
+}
+
+/**
+ * A slash command mentionable option.
+ */
+declare class SlashCommandMentionableOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Mentionable;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandMentionableOption;
+}
+
+/**
+ * A slash command number option.
+ */
+declare class SlashCommandNumberOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Number;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
+ */
+ setMaxValue(max: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}
+ */
+ setMinValue(min: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandNumberOption;
+}
+interface SlashCommandNumberOption extends ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {
+}
+
+/**
+ * A slash command role option.
+ */
+declare class SlashCommandRoleOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Role;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandRoleOption;
+}
+
+/**
+ * A slash command string option.
+ */
+declare class SlashCommandStringOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.String;
+ /**
+ * The maximum length of this option.
+ */
+ readonly max_length?: number;
+ /**
+ * The minimum length of this option.
+ */
+ readonly min_length?: number;
+ /**
+ * Sets the maximum length of this string option.
+ *
+ * @param max - The maximum length this option can be
+ */
+ setMaxLength(max: number): this;
+ /**
+ * Sets the minimum length of this string option.
+ *
+ * @param min - The minimum length this option can be
+ */
+ setMinLength(min: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandStringOption;
+}
+interface SlashCommandStringOption extends ApplicationCommandOptionWithChoicesAndAutocompleteMixin<string> {
+}
+
+/**
+ * A slash command user option.
+ */
+declare class SlashCommandUserOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.User;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandUserOption;
+}
+
+/**
+ * This mixin holds symbols that can be shared in slash command options.
+ *
+ * @typeParam ShouldOmitSubcommandFunctions - Whether to omit subcommand functions.
+ */
+declare class SharedSlashCommandOptions<ShouldOmitSubcommandFunctions = true> {
+ readonly options: ToAPIApplicationCommandOptions[];
+ /**
+ * Adds a boolean option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addBooleanOption(input: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Adds a user option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Adds a channel option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addChannelOption(input: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Adds a role option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Adds an attachment option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addAttachmentOption(input: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Adds a mentionable option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addMentionableOption(input: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Adds a string option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addStringOption(input: Omit<SlashCommandStringOption, 'addChoices'> | Omit<SlashCommandStringOption, 'setAutocomplete'> | SlashCommandStringOption | ((builder: SlashCommandStringOption) => Omit<SlashCommandStringOption, 'addChoices'> | Omit<SlashCommandStringOption, 'setAutocomplete'> | SlashCommandStringOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Adds an integer option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addIntegerOption(input: Omit<SlashCommandIntegerOption, 'addChoices'> | Omit<SlashCommandIntegerOption, 'setAutocomplete'> | SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => Omit<SlashCommandIntegerOption, 'addChoices'> | Omit<SlashCommandIntegerOption, 'setAutocomplete'> | SlashCommandIntegerOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Adds a number option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addNumberOption(input: Omit<SlashCommandNumberOption, 'addChoices'> | Omit<SlashCommandNumberOption, 'setAutocomplete'> | SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => Omit<SlashCommandNumberOption, 'addChoices'> | Omit<SlashCommandNumberOption, 'setAutocomplete'> | SlashCommandNumberOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Where the actual adding magic happens. ✨
+ *
+ * @param input - The input. What else?
+ * @param Instance - The instance of whatever is being added
+ * @internal
+ */
+ private _sharedAddOptionMethod;
+}
+
+/**
+ * Represents a folder for subcommands.
+ *
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups}
+ */
+declare class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions {
+ /**
+ * The name of this subcommand group.
+ */
+ readonly name: string;
+ /**
+ * The description of this subcommand group.
+ */
+ readonly description: string;
+ /**
+ * The subcommands within this subcommand group.
+ */
+ readonly options: SlashCommandSubcommandBuilder[];
+ /**
+ * Adds a new subcommand to this group.
+ *
+ * @param input - A function that returns a subcommand builder or an already built builder
+ */
+ addSubcommand(input: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): APIApplicationCommandSubcommandGroupOption;
+}
+interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription {
+}
+/**
+ * A builder that creates API-compatible JSON data for slash command subcommands.
+ *
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups}
+ */
+declare class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions {
+ /**
+ * The name of this subcommand.
+ */
+ readonly name: string;
+ /**
+ * The description of this subcommand.
+ */
+ readonly description: string;
+ /**
+ * The options within this subcommand.
+ */
+ readonly options: ApplicationCommandOptionBase[];
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): APIApplicationCommandSubcommandOption;
+}
+interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions<false> {
+}
+
+/**
+ * A builder that creates API-compatible JSON data for slash commands.
+ */
+declare class SlashCommandBuilder {
+ /**
+ * The name of this command.
+ */
+ readonly name: string;
+ /**
+ * The name localizations of this command.
+ */
+ readonly name_localizations?: LocalizationMap;
+ /**
+ * The description of this command.
+ */
+ readonly description: string;
+ /**
+ * The description localizations of this command.
+ */
+ readonly description_localizations?: LocalizationMap;
+ /**
+ * The options of this command.
+ */
+ readonly options: ToAPIApplicationCommandOptions[];
+ /**
+ * Whether this command is enabled by default when the application is added to a guild.
+ *
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ readonly default_permission: boolean | undefined;
+ /**
+ * The set of permissions represented as a bit set for the command.
+ */
+ readonly default_member_permissions: Permissions | null | undefined;
+ /**
+ * Indicates whether the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This property is only for global commands.
+ */
+ readonly dm_permission: boolean | undefined;
+ /**
+ * Whether this command is NSFW.
+ */
+ readonly nsfw: boolean | undefined;
+ /**
+ * Sets whether the command is enabled by default when the application is added to a guild.
+ *
+ * @remarks
+ * If set to `false`, you will have to later `PUT` the permissions for this command.
+ * @param value - Whether or not to enable this command by default
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ * @deprecated Use {@link SlashCommandBuilder.setDefaultMemberPermissions} or {@link SlashCommandBuilder.setDMPermission} instead.
+ */
+ setDefaultPermission(value: boolean): this;
+ /**
+ * Sets the default permissions a member should have in order to run the command.
+ *
+ * @remarks
+ * You can set this to `'0'` to disable the command by default.
+ * @param permissions - The permissions bit field to set
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined): this;
+ /**
+ * Sets if the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This method is only for global commands.
+ * @param enabled - Whether the command should be enabled in direct messages
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDMPermission(enabled: boolean | null | undefined): this;
+ /**
+ * Sets whether this command is NSFW.
+ *
+ * @param nsfw - Whether this command is NSFW
+ */
+ setNSFW(nsfw?: boolean): this;
+ /**
+ * Adds a new subcommand group to this command.
+ *
+ * @param input - A function that returns a subcommand group builder or an already built builder
+ */
+ addSubcommandGroup(input: SlashCommandSubcommandGroupBuilder | ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder)): SlashCommandSubcommandsOnlyBuilder;
+ /**
+ * Adds a new subcommand to this command.
+ *
+ * @param input - A function that returns a subcommand builder or an already built builder
+ */
+ addSubcommand(input: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)): SlashCommandSubcommandsOnlyBuilder;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody;
+}
+interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {
+}
+/**
+ * An interface specifically for slash command subcommands.
+ */
+interface SlashCommandSubcommandsOnlyBuilder extends Omit<SlashCommandBuilder, Exclude<keyof SharedSlashCommandOptions, 'options'>> {
+}
+/**
+ * An interface specifically for slash command options.
+ */
+interface SlashCommandOptionsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandOptions, Pick<SlashCommandBuilder, 'toJSON'> {
+}
+/**
+ * An interface that ensures the `toJSON()` call will return something
+ * that can be serialized into API-compatible data.
+ */
+interface ToAPIApplicationCommandOptions {
+ toJSON(): APIApplicationCommandOption;
+}
+
+declare function validateName$1(name: unknown): asserts name is string;
+declare function validateDescription(description: unknown): asserts description is string;
+declare function validateLocale(locale: unknown): Locale;
+declare function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[];
+declare function validateRequiredParameters$1(name: string, description: string, options: ToAPIApplicationCommandOptions[]): void;
+declare function validateDefaultPermission$1(value: unknown): asserts value is boolean;
+declare function validateRequired(required: unknown): asserts required is boolean;
+declare function validateChoicesLength(amountAdding: number, choices?: APIApplicationCommandOptionChoice[]): void;
+declare function assertReturnOfBuilder<T extends ApplicationCommandOptionBase | SlashCommandSubcommandBuilder | SlashCommandSubcommandGroupBuilder>(input: unknown, ExpectedInstanceOf: new () => T): asserts input is T;
+declare const localizationMapPredicate: _sapphire_shapeshift.UnionValidator<_sapphire_shapeshift.UndefinedToOptional<Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string | null>>> | null | undefined>;
+declare function validateLocalizationMap(value: unknown): asserts value is LocalizationMap;
+declare function validateDMPermission$1(value: unknown): asserts value is boolean | null | undefined;
+declare function validateDefaultMemberPermissions$1(permissions: unknown): string | null | undefined;
+declare function validateNSFW(value: unknown): asserts value is boolean;
+
+declare const Assertions$1_assertReturnOfBuilder: typeof assertReturnOfBuilder;
+declare const Assertions$1_localizationMapPredicate: typeof localizationMapPredicate;
+declare const Assertions$1_validateChoicesLength: typeof validateChoicesLength;
+declare const Assertions$1_validateDescription: typeof validateDescription;
+declare const Assertions$1_validateLocale: typeof validateLocale;
+declare const Assertions$1_validateLocalizationMap: typeof validateLocalizationMap;
+declare const Assertions$1_validateMaxOptionsLength: typeof validateMaxOptionsLength;
+declare const Assertions$1_validateNSFW: typeof validateNSFW;
+declare const Assertions$1_validateRequired: typeof validateRequired;
+declare namespace Assertions$1 {
+ export {
+ Assertions$1_assertReturnOfBuilder as assertReturnOfBuilder,
+ Assertions$1_localizationMapPredicate as localizationMapPredicate,
+ Assertions$1_validateChoicesLength as validateChoicesLength,
+ validateDMPermission$1 as validateDMPermission,
+ validateDefaultMemberPermissions$1 as validateDefaultMemberPermissions,
+ validateDefaultPermission$1 as validateDefaultPermission,
+ Assertions$1_validateDescription as validateDescription,
+ Assertions$1_validateLocale as validateLocale,
+ Assertions$1_validateLocalizationMap as validateLocalizationMap,
+ Assertions$1_validateMaxOptionsLength as validateMaxOptionsLength,
+ Assertions$1_validateNSFW as validateNSFW,
+ validateName$1 as validateName,
+ Assertions$1_validateRequired as validateRequired,
+ validateRequiredParameters$1 as validateRequiredParameters,
+ };
+}
+
+/**
+ * The type a context menu command can be.
+ */
+type ContextMenuCommandType = ApplicationCommandType.Message | ApplicationCommandType.User;
+/**
+ * A builder that creates API-compatible JSON data for context menu commands.
+ */
+declare class ContextMenuCommandBuilder {
+ /**
+ * The name of this command.
+ */
+ readonly name: string;
+ /**
+ * The name localizations of this command.
+ */
+ readonly name_localizations?: LocalizationMap;
+ /**
+ * The type of this command.
+ */
+ readonly type: ContextMenuCommandType;
+ /**
+ * Whether this command is enabled by default when the application is added to a guild.
+ *
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ readonly default_permission: boolean | undefined;
+ /**
+ * The set of permissions represented as a bit set for the command.
+ */
+ readonly default_member_permissions: Permissions | null | undefined;
+ /**
+ * Indicates whether the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This property is only for global commands.
+ */
+ readonly dm_permission: boolean | undefined;
+ /**
+ * Sets the name of this command.
+ *
+ * @param name - The name to use
+ */
+ setName(name: string): this;
+ /**
+ * Sets the type of this command.
+ *
+ * @param type - The type to use
+ */
+ setType(type: ContextMenuCommandType): this;
+ /**
+ * Sets whether the command is enabled by default when the application is added to a guild.
+ *
+ * @remarks
+ * If set to `false`, you will have to later `PUT` the permissions for this command.
+ * @param value - Whether to enable this command by default
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ setDefaultPermission(value: boolean): this;
+ /**
+ * Sets the default permissions a member should have in order to run this command.
+ *
+ * @remarks
+ * You can set this to `'0'` to disable the command by default.
+ * @param permissions - The permissions bit field to set
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined): this;
+ /**
+ * Sets if the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This method is only for global commands.
+ * @param enabled - Whether the command should be enabled in direct messages
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDMPermission(enabled: boolean | null | undefined): this;
+ /**
+ * Sets a name localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedName - The localized name for the given `locale`
+ */
+ setNameLocalization(locale: LocaleString, localizedName: string | null): this;
+ /**
+ * Sets the name localizations for this command.
+ *
+ * @param localizedNames - The object of localized names to set
+ */
+ setNameLocalizations(localizedNames: LocalizationMap | null): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): RESTPostAPIContextMenuApplicationCommandsJSONBody;
+}
+
+declare function validateDefaultPermission(value: unknown): asserts value is boolean;
+declare function validateName(name: unknown): asserts name is string;
+declare function validateType(type: unknown): asserts type is ContextMenuCommandType;
+declare function validateRequiredParameters(name: string, type: number): void;
+declare function validateDMPermission(value: unknown): asserts value is boolean | null | undefined;
+declare function validateDefaultMemberPermissions(permissions: unknown): string | null | undefined;
+
+declare const Assertions_validateDMPermission: typeof validateDMPermission;
+declare const Assertions_validateDefaultMemberPermissions: typeof validateDefaultMemberPermissions;
+declare const Assertions_validateDefaultPermission: typeof validateDefaultPermission;
+declare const Assertions_validateName: typeof validateName;
+declare const Assertions_validateRequiredParameters: typeof validateRequiredParameters;
+declare const Assertions_validateType: typeof validateType;
+declare namespace Assertions {
+ export {
+ Assertions_validateDMPermission as validateDMPermission,
+ Assertions_validateDefaultMemberPermissions as validateDefaultMemberPermissions,
+ Assertions_validateDefaultPermission as validateDefaultPermission,
+ Assertions_validateName as validateName,
+ Assertions_validateRequiredParameters as validateRequiredParameters,
+ Assertions_validateType as validateType,
+ };
+}
+
+/**
+ * Calculates the length of the embed.
+ *
+ * @param data - The embed data to check
+ */
+declare function embedLength(data: APIEmbed): number;
+
+/**
+ * Enables validators.
+ *
+ * @returns Whether validation is occurring.
+ */
+declare function enableValidators(): boolean;
+/**
+ * Disables validators.
+ *
+ * @returns Whether validation is occurring.
+ */
+declare function disableValidators(): boolean;
+/**
+ * Checks whether validation is occurring.
+ */
+declare function isValidationEnabled(): boolean;
+
+/**
+ * The {@link https://github.com/discordjs/discord.js/blob/main/packages/builders#readme | @discordjs/builders} version
+ * that you are currently using.
+ *
+ * @privateRemarks This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild.
+ */
+declare const version: string;
+
+export { ActionRowBuilder, AnyAPIActionRowComponent, AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$4 as ComponentAssertions, ComponentBuilder, Assertions as ContextMenuCommandAssertions, ContextMenuCommandBuilder, ContextMenuCommandType, Assertions$5 as EmbedAssertions, EmbedAuthorData, EmbedAuthorOptions, EmbedBuilder, EmbedFooterData, EmbedFooterOptions, EmbedImageData, IconData, MappedComponentTypes, MentionableSelectMenuBuilder, MessageActionRowComponentBuilder, MessageComponentBuilder, ModalActionRowComponentBuilder, Assertions$2 as ModalAssertions, ModalBuilder, ModalComponentBuilder, RGBTuple, RestOrArray, RoleSelectMenuBuilder, StringSelectMenuBuilder as SelectMenuBuilder, StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, SharedNameAndDescription, SharedSlashCommandOptions, Assertions$1 as SlashCommandAssertions, SlashCommandAttachmentOption, SlashCommandBooleanOption, SlashCommandBuilder, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, SlashCommandOptionsOnlyBuilder, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, SlashCommandSubcommandsOnlyBuilder, SlashCommandUserOption, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, Assertions$3 as TextInputAssertions, TextInputBuilder, ToAPIApplicationCommandOptions, UserSelectMenuBuilder, createComponentBuilder, disableValidators, embedLength, enableValidators, isValidationEnabled, normalizeArray, version };
diff --git a/node_modules/@discordjs/builders/dist/index.d.ts b/node_modules/@discordjs/builders/dist/index.d.ts
new file mode 100644
index 0000000..ffa1792
--- /dev/null
+++ b/node_modules/@discordjs/builders/dist/index.d.ts
@@ -0,0 +1,1948 @@
+import * as _sapphire_shapeshift from '@sapphire/shapeshift';
+import { APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, APIEmbed, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIActionRowComponent, APIActionRowComponentTypes, APIBaseComponent, ComponentType, APIButtonComponent, APISelectMenuComponent, APIChannelSelectComponent, APIMentionableSelectComponent, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIMessageActionRowComponent, APIModalActionRowComponent, APIModalComponent, APIMessageComponent, APIModalInteractionResponseCallbackData, LocalizationMap, LocaleString, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandAttachmentOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandOptionChoice, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandUserOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, Permissions, RESTPostAPIChatInputApplicationCommandsJSONBody, APIApplicationCommandOption, Locale, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody } from 'discord-api-types/v10';
+export * from '@discordjs/formatters';
+import { JSONEncodable, Equatable } from '@discordjs/util';
+
+declare const fieldNamePredicate: _sapphire_shapeshift.StringValidator<string>;
+declare const fieldValuePredicate: _sapphire_shapeshift.StringValidator<string>;
+declare const fieldInlinePredicate: _sapphire_shapeshift.UnionValidator<boolean | undefined>;
+declare const embedFieldPredicate: _sapphire_shapeshift.ObjectValidator<{
+ name: string;
+ value: string;
+ inline: boolean | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ name: string;
+ value: string;
+ inline: boolean | undefined;
+}>>;
+declare const embedFieldsArrayPredicate: _sapphire_shapeshift.ArrayValidator<_sapphire_shapeshift.UndefinedToOptional<{
+ name: string;
+ value: string;
+ inline: boolean | undefined;
+}>[], _sapphire_shapeshift.UndefinedToOptional<{
+ name: string;
+ value: string;
+ inline: boolean | undefined;
+}>>;
+declare const fieldLengthPredicate: _sapphire_shapeshift.NumberValidator<number>;
+declare function validateFieldLength(amountAdding: number, fields?: APIEmbedField[]): void;
+declare const authorNamePredicate: _sapphire_shapeshift.UnionValidator<string | null>;
+declare const imageURLPredicate: _sapphire_shapeshift.UnionValidator<string | null | undefined>;
+declare const urlPredicate: _sapphire_shapeshift.UnionValidator<string | null | undefined>;
+declare const embedAuthorPredicate: _sapphire_shapeshift.ObjectValidator<{
+ name: string | null;
+ iconURL: string | null | undefined;
+ url: string | null | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ name: string | null;
+ iconURL: string | null | undefined;
+ url: string | null | undefined;
+}>>;
+declare const RGBPredicate: _sapphire_shapeshift.NumberValidator<number>;
+declare const colorPredicate: _sapphire_shapeshift.UnionValidator<number | [number, number, number] | null>;
+declare const descriptionPredicate: _sapphire_shapeshift.UnionValidator<string | null>;
+declare const footerTextPredicate: _sapphire_shapeshift.UnionValidator<string | null>;
+declare const embedFooterPredicate: _sapphire_shapeshift.ObjectValidator<{
+ text: string | null;
+ iconURL: string | null | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ text: string | null;
+ iconURL: string | null | undefined;
+}>>;
+declare const timestampPredicate: _sapphire_shapeshift.UnionValidator<number | Date | null>;
+declare const titlePredicate: _sapphire_shapeshift.UnionValidator<string | null>;
+
+declare const Assertions$5_RGBPredicate: typeof RGBPredicate;
+declare const Assertions$5_authorNamePredicate: typeof authorNamePredicate;
+declare const Assertions$5_colorPredicate: typeof colorPredicate;
+declare const Assertions$5_descriptionPredicate: typeof descriptionPredicate;
+declare const Assertions$5_embedAuthorPredicate: typeof embedAuthorPredicate;
+declare const Assertions$5_embedFieldPredicate: typeof embedFieldPredicate;
+declare const Assertions$5_embedFieldsArrayPredicate: typeof embedFieldsArrayPredicate;
+declare const Assertions$5_embedFooterPredicate: typeof embedFooterPredicate;
+declare const Assertions$5_fieldInlinePredicate: typeof fieldInlinePredicate;
+declare const Assertions$5_fieldLengthPredicate: typeof fieldLengthPredicate;
+declare const Assertions$5_fieldNamePredicate: typeof fieldNamePredicate;
+declare const Assertions$5_fieldValuePredicate: typeof fieldValuePredicate;
+declare const Assertions$5_footerTextPredicate: typeof footerTextPredicate;
+declare const Assertions$5_imageURLPredicate: typeof imageURLPredicate;
+declare const Assertions$5_timestampPredicate: typeof timestampPredicate;
+declare const Assertions$5_titlePredicate: typeof titlePredicate;
+declare const Assertions$5_urlPredicate: typeof urlPredicate;
+declare const Assertions$5_validateFieldLength: typeof validateFieldLength;
+declare namespace Assertions$5 {
+ export {
+ Assertions$5_RGBPredicate as RGBPredicate,
+ Assertions$5_authorNamePredicate as authorNamePredicate,
+ Assertions$5_colorPredicate as colorPredicate,
+ Assertions$5_descriptionPredicate as descriptionPredicate,
+ Assertions$5_embedAuthorPredicate as embedAuthorPredicate,
+ Assertions$5_embedFieldPredicate as embedFieldPredicate,
+ Assertions$5_embedFieldsArrayPredicate as embedFieldsArrayPredicate,
+ Assertions$5_embedFooterPredicate as embedFooterPredicate,
+ Assertions$5_fieldInlinePredicate as fieldInlinePredicate,
+ Assertions$5_fieldLengthPredicate as fieldLengthPredicate,
+ Assertions$5_fieldNamePredicate as fieldNamePredicate,
+ Assertions$5_fieldValuePredicate as fieldValuePredicate,
+ Assertions$5_footerTextPredicate as footerTextPredicate,
+ Assertions$5_imageURLPredicate as imageURLPredicate,
+ Assertions$5_timestampPredicate as timestampPredicate,
+ Assertions$5_titlePredicate as titlePredicate,
+ Assertions$5_urlPredicate as urlPredicate,
+ Assertions$5_validateFieldLength as validateFieldLength,
+ };
+}
+
+/**
+ * Normalizes data that is a rest parameter or an array into an array with a depth of 1.
+ *
+ * @typeParam T - The data that must satisfy {@link RestOrArray}.
+ * @param arr - The (possibly variadic) data to normalize
+ */
+declare function normalizeArray<T>(arr: RestOrArray<T>): T[];
+/**
+ * Represents data that may be an array or came from a rest parameter.
+ *
+ * @remarks
+ * This type is used throughout builders to ensure both an array and variadic arguments
+ * may be used. It is normalized with {@link normalizeArray}.
+ */
+type RestOrArray<T> = T[] | [T[]];
+
+/**
+ * A tuple satisfying the RGB color model.
+ *
+ * @see {@link https://developer.mozilla.org/docs/Glossary/RGB}
+ */
+type RGBTuple = [red: number, green: number, blue: number];
+/**
+ * The base icon data typically used in payloads.
+ */
+interface IconData {
+ /**
+ * The URL of the icon.
+ */
+ iconURL?: string;
+ /**
+ * The proxy URL of the icon.
+ */
+ proxyIconURL?: string;
+}
+/**
+ * Represents the author data of an embed.
+ */
+type EmbedAuthorData = IconData & Omit<APIEmbedAuthor, 'icon_url' | 'proxy_icon_url'>;
+/**
+ * Represents the author options of an embed.
+ */
+type EmbedAuthorOptions = Omit<EmbedAuthorData, 'proxyIconURL'>;
+/**
+ * Represents the footer data of an embed.
+ */
+type EmbedFooterData = IconData & Omit<APIEmbedFooter, 'icon_url' | 'proxy_icon_url'>;
+/**
+ * Represents the footer options of an embed.
+ */
+type EmbedFooterOptions = Omit<EmbedFooterData, 'proxyIconURL'>;
+/**
+ * Represents the image data of an embed.
+ */
+interface EmbedImageData extends Omit<APIEmbedImage, 'proxy_url'> {
+ /**
+ * The proxy URL for the image.
+ */
+ proxyURL?: string;
+}
+/**
+ * A builder that creates API-compatible JSON data for embeds.
+ */
+declare class EmbedBuilder {
+ /**
+ * The API data associated with this embed.
+ */
+ readonly data: APIEmbed;
+ /**
+ * Creates a new embed from API data.
+ *
+ * @param data - The API data to create this embed with
+ */
+ constructor(data?: APIEmbed);
+ /**
+ * Appends fields to the embed.
+ *
+ * @remarks
+ * This method accepts either an array of fields or a variable number of field parameters.
+ * The maximum amount of fields that can be added is 25.
+ * @example
+ * Using an array:
+ * ```ts
+ * const fields: APIEmbedField[] = ...;
+ * const embed = new EmbedBuilder()
+ * .addFields(fields);
+ * ```
+ * @example
+ * Using rest parameters (variadic):
+ * ```ts
+ * const embed = new EmbedBuilder()
+ * .addFields(
+ * { name: 'Field 1', value: 'Value 1' },
+ * { name: 'Field 2', value: 'Value 2' },
+ * );
+ * ```
+ * @param fields - The fields to add
+ */
+ addFields(...fields: RestOrArray<APIEmbedField>): this;
+ /**
+ * Removes, replaces, or inserts fields for this embed.
+ *
+ * @remarks
+ * This method behaves similarly
+ * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
+ * The maximum amount of fields that can be added is 25.
+ *
+ * It's useful for modifying and adjusting order of the already-existing fields of an embed.
+ * @example
+ * Remove the first field:
+ * ```ts
+ * embed.spliceFields(0, 1);
+ * ```
+ * @example
+ * Remove the first n fields:
+ * ```ts
+ * const n = 4;
+ * embed.spliceFields(0, n);
+ * ```
+ * @example
+ * Remove the last field:
+ * ```ts
+ * embed.spliceFields(-1, 1);
+ * ```
+ * @param index - The index to start at
+ * @param deleteCount - The number of fields to remove
+ * @param fields - The replacing field objects
+ */
+ spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this;
+ /**
+ * Sets the fields for this embed.
+ *
+ * @remarks
+ * This method is an alias for {@link EmbedBuilder.spliceFields}. More specifically,
+ * it splices the entire array of fields, replacing them with the provided fields.
+ *
+ * You can set a maximum of 25 fields.
+ * @param fields - The fields to set
+ */
+ setFields(...fields: RestOrArray<APIEmbedField>): this;
+ /**
+ * Sets the author of this embed.
+ *
+ * @param options - The options to use
+ */
+ setAuthor(options: EmbedAuthorOptions | null): this;
+ /**
+ * Sets the color of this embed.
+ *
+ * @param color - The color to use
+ */
+ setColor(color: RGBTuple | number | null): this;
+ /**
+ * Sets the description of this embed.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description: string | null): this;
+ /**
+ * Sets the footer of this embed.
+ *
+ * @param options - The footer to use
+ */
+ setFooter(options: EmbedFooterOptions | null): this;
+ /**
+ * Sets the image of this embed.
+ *
+ * @param url - The image URL to use
+ */
+ setImage(url: string | null): this;
+ /**
+ * Sets the thumbnail of this embed.
+ *
+ * @param url - The thumbnail URL to use
+ */
+ setThumbnail(url: string | null): this;
+ /**
+ * Sets the timestamp of this embed.
+ *
+ * @param timestamp - The timestamp or date to use
+ */
+ setTimestamp(timestamp?: Date | number | null): this;
+ /**
+ * Sets the title for this embed.
+ *
+ * @param title - The title to use
+ */
+ setTitle(title: string | null): this;
+ /**
+ * Sets the URL of this embed.
+ *
+ * @param url - The URL to use
+ */
+ setURL(url: string | null): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): APIEmbed;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for string select menu options.
+ */
+declare class StringSelectMenuOptionBuilder implements JSONEncodable<APISelectMenuOption> {
+ data: Partial<APISelectMenuOption>;
+ /**
+ * Creates a new string select menu option from API data.
+ *
+ * @param data - The API data to create this string select menu option with
+ * @example
+ * Creating a string select menu option from an API data object:
+ * ```ts
+ * const selectMenuOption = new SelectMenuOptionBuilder({
+ * label: 'catchy label',
+ * value: '1',
+ * });
+ * ```
+ * @example
+ * Creating a string select menu option using setters and API data:
+ * ```ts
+ * const selectMenuOption = new SelectMenuOptionBuilder({
+ * default: true,
+ * value: '1',
+ * })
+ * .setLabel('woah');
+ * ```
+ */
+ constructor(data?: Partial<APISelectMenuOption>);
+ /**
+ * Sets the label for this option.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label: string): this;
+ /**
+ * Sets the value for this option.
+ *
+ * @param value - The value to use
+ */
+ setValue(value: string): this;
+ /**
+ * Sets the description for this option.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description: string): this;
+ /**
+ * Sets whether this option is selected by default.
+ *
+ * @param isDefault - Whether this option is selected by default
+ */
+ setDefault(isDefault?: boolean): this;
+ /**
+ * Sets the emoji to display for this option.
+ *
+ * @param emoji - The emoji to use
+ */
+ setEmoji(emoji: APIMessageComponentEmoji): this;
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON(): APISelectMenuOption;
+}
+
+declare const customIdValidator: _sapphire_shapeshift.StringValidator<string>;
+declare const emojiValidator: _sapphire_shapeshift.ObjectValidator<{
+ name?: string | undefined;
+ id?: string | undefined;
+ animated?: boolean | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ name?: string | undefined;
+ id?: string | undefined;
+ animated?: boolean | undefined;
+}>>;
+declare const disabledValidator: _sapphire_shapeshift.BooleanValidator<boolean>;
+declare const buttonLabelValidator: _sapphire_shapeshift.StringValidator<string>;
+declare const buttonStyleValidator: _sapphire_shapeshift.NativeEnumValidator<typeof ButtonStyle>;
+declare const placeholderValidator$1: _sapphire_shapeshift.StringValidator<string>;
+declare const minMaxValidator: _sapphire_shapeshift.NumberValidator<number>;
+declare const labelValueDescriptionValidator: _sapphire_shapeshift.StringValidator<string>;
+declare const jsonOptionValidator: _sapphire_shapeshift.ObjectValidator<{
+ label: string;
+ value: string;
+ description: string | undefined;
+ emoji: _sapphire_shapeshift.UndefinedToOptional<{
+ name?: string | undefined;
+ id?: string | undefined;
+ animated?: boolean | undefined;
+ }> | undefined;
+ default: boolean | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ label: string;
+ value: string;
+ description: string | undefined;
+ emoji: _sapphire_shapeshift.UndefinedToOptional<{
+ name?: string | undefined;
+ id?: string | undefined;
+ animated?: boolean | undefined;
+ }> | undefined;
+ default: boolean | undefined;
+}>>;
+declare const optionValidator: _sapphire_shapeshift.InstanceValidator<StringSelectMenuOptionBuilder>;
+declare const optionsValidator: _sapphire_shapeshift.ArrayValidator<StringSelectMenuOptionBuilder[], StringSelectMenuOptionBuilder>;
+declare const optionsLengthValidator: _sapphire_shapeshift.NumberValidator<number>;
+declare function validateRequiredSelectMenuParameters(options: StringSelectMenuOptionBuilder[], customId?: string): void;
+declare const defaultValidator: _sapphire_shapeshift.BooleanValidator<boolean>;
+declare function validateRequiredSelectMenuOptionParameters(label?: string, value?: string): void;
+declare const channelTypesValidator: _sapphire_shapeshift.ArrayValidator<ChannelType[], ChannelType>;
+declare const urlValidator: _sapphire_shapeshift.StringValidator<string>;
+declare function validateRequiredButtonParameters(style?: ButtonStyle, label?: string, emoji?: APIMessageComponentEmoji, customId?: string, url?: string): void;
+
+declare const Assertions$4_buttonLabelValidator: typeof buttonLabelValidator;
+declare const Assertions$4_buttonStyleValidator: typeof buttonStyleValidator;
+declare const Assertions$4_channelTypesValidator: typeof channelTypesValidator;
+declare const Assertions$4_customIdValidator: typeof customIdValidator;
+declare const Assertions$4_defaultValidator: typeof defaultValidator;
+declare const Assertions$4_disabledValidator: typeof disabledValidator;
+declare const Assertions$4_emojiValidator: typeof emojiValidator;
+declare const Assertions$4_jsonOptionValidator: typeof jsonOptionValidator;
+declare const Assertions$4_labelValueDescriptionValidator: typeof labelValueDescriptionValidator;
+declare const Assertions$4_minMaxValidator: typeof minMaxValidator;
+declare const Assertions$4_optionValidator: typeof optionValidator;
+declare const Assertions$4_optionsLengthValidator: typeof optionsLengthValidator;
+declare const Assertions$4_optionsValidator: typeof optionsValidator;
+declare const Assertions$4_urlValidator: typeof urlValidator;
+declare const Assertions$4_validateRequiredButtonParameters: typeof validateRequiredButtonParameters;
+declare const Assertions$4_validateRequiredSelectMenuOptionParameters: typeof validateRequiredSelectMenuOptionParameters;
+declare const Assertions$4_validateRequiredSelectMenuParameters: typeof validateRequiredSelectMenuParameters;
+declare namespace Assertions$4 {
+ export {
+ Assertions$4_buttonLabelValidator as buttonLabelValidator,
+ Assertions$4_buttonStyleValidator as buttonStyleValidator,
+ Assertions$4_channelTypesValidator as channelTypesValidator,
+ Assertions$4_customIdValidator as customIdValidator,
+ Assertions$4_defaultValidator as defaultValidator,
+ Assertions$4_disabledValidator as disabledValidator,
+ Assertions$4_emojiValidator as emojiValidator,
+ Assertions$4_jsonOptionValidator as jsonOptionValidator,
+ Assertions$4_labelValueDescriptionValidator as labelValueDescriptionValidator,
+ Assertions$4_minMaxValidator as minMaxValidator,
+ Assertions$4_optionValidator as optionValidator,
+ Assertions$4_optionsLengthValidator as optionsLengthValidator,
+ Assertions$4_optionsValidator as optionsValidator,
+ placeholderValidator$1 as placeholderValidator,
+ Assertions$4_urlValidator as urlValidator,
+ Assertions$4_validateRequiredButtonParameters as validateRequiredButtonParameters,
+ Assertions$4_validateRequiredSelectMenuOptionParameters as validateRequiredSelectMenuOptionParameters,
+ Assertions$4_validateRequiredSelectMenuParameters as validateRequiredSelectMenuParameters,
+ };
+}
+
+/**
+ * Any action row component data represented as an object.
+ */
+type AnyAPIActionRowComponent = APIActionRowComponent<APIActionRowComponentTypes> | APIActionRowComponentTypes;
+/**
+ * The base component builder that contains common symbols for all sorts of components.
+ *
+ * @typeParam DataType - The type of internal API data that is stored within the component
+ */
+declare abstract class ComponentBuilder<DataType extends Partial<APIBaseComponent<ComponentType>> = APIBaseComponent<ComponentType>> implements JSONEncodable<AnyAPIActionRowComponent> {
+ /**
+ * The API data associated with this component.
+ */
+ readonly data: Partial<DataType>;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ abstract toJSON(): AnyAPIActionRowComponent;
+ /**
+ * Constructs a new kind of component.
+ *
+ * @param data - The data to construct a component out of
+ */
+ constructor(data: Partial<DataType>);
+}
+
+/**
+ * A builder that creates API-compatible JSON data for buttons.
+ */
+declare class ButtonBuilder extends ComponentBuilder<APIButtonComponent> {
+ /**
+ * Creates a new button from API data.
+ *
+ * @param data - The API data to create this button with
+ * @example
+ * Creating a button from an API data object:
+ * ```ts
+ * const button = new ButtonBuilder({
+ * custom_id: 'a cool button',
+ * style: ButtonStyle.Primary,
+ * label: 'Click Me',
+ * emoji: {
+ * name: 'smile',
+ * id: '123456789012345678',
+ * },
+ * });
+ * ```
+ * @example
+ * Creating a button using setters and API data:
+ * ```ts
+ * const button = new ButtonBuilder({
+ * style: ButtonStyle.Secondary,
+ * label: 'Click Me',
+ * })
+ * .setEmoji({ name: '🙂' })
+ * .setCustomId('another cool button');
+ * ```
+ */
+ constructor(data?: Partial<APIButtonComponent>);
+ /**
+ * Sets the style of this button.
+ *
+ * @param style - The style to use
+ */
+ setStyle(style: ButtonStyle): this;
+ /**
+ * Sets the URL for this button.
+ *
+ * @remarks
+ * This method is only available to buttons using the `Link` button style.
+ * Only three types of URL schemes are currently supported: `https://`, `http://`, and `discord://`.
+ * @param url - The URL to use
+ */
+ setURL(url: string): this;
+ /**
+ * Sets the custom id for this button.
+ *
+ * @remarks
+ * This method is only applicable to buttons that are not using the `Link` button style.
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId: string): this;
+ /**
+ * Sets the emoji to display on this button.
+ *
+ * @param emoji - The emoji to use
+ */
+ setEmoji(emoji: APIMessageComponentEmoji): this;
+ /**
+ * Sets whether this button is disabled.
+ *
+ * @param disabled - Whether to disable this button
+ */
+ setDisabled(disabled?: boolean): this;
+ /**
+ * Sets the label for this button.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label: string): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): APIButtonComponent;
+}
+
+/**
+ * The base select menu builder that contains common symbols for select menu builders.
+ *
+ * @typeParam SelectMenuType - The type of select menu this would be instantiated for.
+ */
+declare abstract class BaseSelectMenuBuilder<SelectMenuType extends APISelectMenuComponent> extends ComponentBuilder<SelectMenuType> {
+ /**
+ * Sets the placeholder for this select menu.
+ *
+ * @param placeholder - The placeholder to use
+ */
+ setPlaceholder(placeholder: string): this;
+ /**
+ * Sets the minimum values that must be selected in the select menu.
+ *
+ * @param minValues - The minimum values that must be selected
+ */
+ setMinValues(minValues: number): this;
+ /**
+ * Sets the maximum values that must be selected in the select menu.
+ *
+ * @param maxValues - The maximum values that must be selected
+ */
+ setMaxValues(maxValues: number): this;
+ /**
+ * Sets the custom id for this select menu.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId: string): this;
+ /**
+ * Sets whether this select menu is disabled.
+ *
+ * @param disabled - Whether this select menu is disabled
+ */
+ setDisabled(disabled?: boolean): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): SelectMenuType;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for channel select menus.
+ */
+declare class ChannelSelectMenuBuilder extends BaseSelectMenuBuilder<APIChannelSelectComponent> {
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new ChannelSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new ChannelSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)
+ * .setMinValues(2);
+ * ```
+ */
+ constructor(data?: Partial<APIChannelSelectComponent>);
+ /**
+ * Adds channel types to this select menu.
+ *
+ * @param types - The channel types to use
+ */
+ addChannelTypes(...types: RestOrArray<ChannelType>): this;
+ /**
+ * Sets channel types for this select menu.
+ *
+ * @param types - The channel types to use
+ */
+ setChannelTypes(...types: RestOrArray<ChannelType>): this;
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON(): APIChannelSelectComponent;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for mentionable select menus.
+ */
+declare class MentionableSelectMenuBuilder extends BaseSelectMenuBuilder<APIMentionableSelectComponent> {
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new MentionableSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new MentionableSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data?: Partial<APIMentionableSelectComponent>);
+}
+
+/**
+ * A builder that creates API-compatible JSON data for role select menus.
+ */
+declare class RoleSelectMenuBuilder extends BaseSelectMenuBuilder<APIRoleSelectComponent> {
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new RoleSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new RoleSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data?: Partial<APIRoleSelectComponent>);
+}
+
+/**
+ * A builder that creates API-compatible JSON data for string select menus.
+ */
+declare class StringSelectMenuBuilder extends BaseSelectMenuBuilder<APIStringSelectComponent> {
+ /**
+ * The options within this select menu.
+ */
+ readonly options: StringSelectMenuOptionBuilder[];
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new StringSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * options: [
+ * { label: 'option 1', value: '1' },
+ * { label: 'option 2', value: '2' },
+ * { label: 'option 3', value: '3' },
+ * ],
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new StringSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1)
+ * .addOptions({
+ * label: 'Catchy',
+ * value: 'catch',
+ * });
+ * ```
+ */
+ constructor(data?: Partial<APIStringSelectComponent>);
+ /**
+ * Adds options to this select menu.
+ *
+ * @param options - The options to add
+ */
+ addOptions(...options: RestOrArray<APISelectMenuOption | StringSelectMenuOptionBuilder>): this;
+ /**
+ * Sets the options for this select menu.
+ *
+ * @param options - The options to set
+ */
+ setOptions(...options: RestOrArray<APISelectMenuOption | StringSelectMenuOptionBuilder>): this;
+ /**
+ * Removes, replaces, or inserts options for this select menu.
+ *
+ * @remarks
+ * This method behaves similarly
+ * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}.
+ * It's useful for modifying and adjusting the order of existing options.
+ * @example
+ * Remove the first option:
+ * ```ts
+ * selectMenu.spliceOptions(0, 1);
+ * ```
+ * @example
+ * Remove the first n option:
+ * ```ts
+ * const n = 4;
+ * selectMenu.spliceOptions(0, n);
+ * ```
+ * @example
+ * Remove the last option:
+ * ```ts
+ * selectMenu.spliceOptions(-1, 1);
+ * ```
+ * @param index - The index to start at
+ * @param deleteCount - The number of options to remove
+ * @param options - The replacing option objects or builders
+ */
+ spliceOptions(index: number, deleteCount: number, ...options: RestOrArray<APISelectMenuOption | StringSelectMenuOptionBuilder>): this;
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON(): APIStringSelectComponent;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for user select menus.
+ */
+declare class UserSelectMenuBuilder extends BaseSelectMenuBuilder<APIUserSelectComponent> {
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new UserSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new UserSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data?: Partial<APIUserSelectComponent>);
+}
+
+/**
+ * A builder that creates API-compatible JSON data for text inputs.
+ */
+declare class TextInputBuilder extends ComponentBuilder<APITextInputComponent> implements Equatable<APITextInputComponent | JSONEncodable<APITextInputComponent>> {
+ /**
+ * Creates a new text input from API data.
+ *
+ * @param data - The API data to create this text input with
+ * @example
+ * Creating a select menu option from an API data object:
+ * ```ts
+ * const textInput = new TextInputBuilder({
+ * custom_id: 'a cool select menu',
+ * label: 'Type something',
+ * style: TextInputStyle.Short,
+ * });
+ * ```
+ * @example
+ * Creating a select menu option using setters and API data:
+ * ```ts
+ * const textInput = new TextInputBuilder({
+ * label: 'Type something else',
+ * })
+ * .setCustomId('woah')
+ * .setStyle(TextInputStyle.Paragraph);
+ * ```
+ */
+ constructor(data?: APITextInputComponent & {
+ type?: ComponentType.TextInput;
+ });
+ /**
+ * Sets the custom id for this text input.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId: string): this;
+ /**
+ * Sets the label for this text input.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label: string): this;
+ /**
+ * Sets the style for this text input.
+ *
+ * @param style - The style to use
+ */
+ setStyle(style: TextInputStyle): this;
+ /**
+ * Sets the minimum length of text for this text input.
+ *
+ * @param minLength - The minimum length of text for this text input
+ */
+ setMinLength(minLength: number): this;
+ /**
+ * Sets the maximum length of text for this text input.
+ *
+ * @param maxLength - The maximum length of text for this text input
+ */
+ setMaxLength(maxLength: number): this;
+ /**
+ * Sets the placeholder for this text input.
+ *
+ * @param placeholder - The placeholder to use
+ */
+ setPlaceholder(placeholder: string): this;
+ /**
+ * Sets the value for this text input.
+ *
+ * @param value - The value to use
+ */
+ setValue(value: string): this;
+ /**
+ * Sets whether this text input is required.
+ *
+ * @param required - Whether this text input is required
+ */
+ setRequired(required?: boolean): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): APITextInputComponent;
+ /**
+ * {@inheritDoc Equatable.equals}
+ */
+ equals(other: APITextInputComponent | JSONEncodable<APITextInputComponent>): boolean;
+}
+
+/**
+ * The builders that may be used for messages.
+ */
+type MessageComponentBuilder = ActionRowBuilder<MessageActionRowComponentBuilder> | MessageActionRowComponentBuilder;
+/**
+ * The builders that may be used for modals.
+ */
+type ModalComponentBuilder = ActionRowBuilder<ModalActionRowComponentBuilder> | ModalActionRowComponentBuilder;
+/**
+ * The builders that may be used within an action row for messages.
+ */
+type MessageActionRowComponentBuilder = ButtonBuilder | ChannelSelectMenuBuilder | MentionableSelectMenuBuilder | RoleSelectMenuBuilder | StringSelectMenuBuilder | UserSelectMenuBuilder;
+/**
+ * The builders that may be used within an action row for modals.
+ */
+type ModalActionRowComponentBuilder = TextInputBuilder;
+/**
+ * Any builder.
+ */
+type AnyComponentBuilder = MessageActionRowComponentBuilder | ModalActionRowComponentBuilder;
+/**
+ * A builder that creates API-compatible JSON data for action rows.
+ *
+ * @typeParam T - The types of components this action row holds
+ */
+declare class ActionRowBuilder<T extends AnyComponentBuilder> extends ComponentBuilder<APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>> {
+ /**
+ * The components within this action row.
+ */
+ readonly components: T[];
+ /**
+ * Creates a new action row from API data.
+ *
+ * @param data - The API data to create this action row with
+ * @example
+ * Creating an action row from an API data object:
+ * ```ts
+ * const actionRow = new ActionRowBuilder({
+ * components: [
+ * {
+ * custom_id: "custom id",
+ * label: "Type something",
+ * style: TextInputStyle.Short,
+ * type: ComponentType.TextInput,
+ * },
+ * ],
+ * });
+ * ```
+ * @example
+ * Creating an action row using setters and API data:
+ * ```ts
+ * const actionRow = new ActionRowBuilder({
+ * components: [
+ * {
+ * custom_id: "custom id",
+ * label: "Click me",
+ * style: ButtonStyle.Primary,
+ * type: ComponentType.Button,
+ * },
+ * ],
+ * })
+ * .addComponents(button2, button3);
+ * ```
+ */
+ constructor({ components, ...data }?: Partial<APIActionRowComponent<APIActionRowComponentTypes>>);
+ /**
+ * Adds components to this action row.
+ *
+ * @param components - The components to add
+ */
+ addComponents(...components: RestOrArray<T>): this;
+ /**
+ * Sets components for this action row.
+ *
+ * @param components - The components to set
+ */
+ setComponents(...components: RestOrArray<T>): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): APIActionRowComponent<ReturnType<T['toJSON']>>;
+}
+
+/**
+ * Components here are mapped to their respective builder.
+ */
+interface MappedComponentTypes {
+ /**
+ * The action row component type is associated with an {@link ActionRowBuilder}.
+ */
+ [ComponentType.ActionRow]: ActionRowBuilder<AnyComponentBuilder>;
+ /**
+ * The button component type is associated with an {@link ButtonBuilder}.
+ */
+ [ComponentType.Button]: ButtonBuilder;
+ /**
+ * The string select component type is associated with an {@link StringSelectMenuBuilder}.
+ */
+ [ComponentType.StringSelect]: StringSelectMenuBuilder;
+ /**
+ * The text inpiut component type is associated with an {@link TextInputBuilder}.
+ */
+ [ComponentType.TextInput]: TextInputBuilder;
+ /**
+ * The user select component type is associated with an {@link UserSelectMenuBuilder}.
+ */
+ [ComponentType.UserSelect]: UserSelectMenuBuilder;
+ /**
+ * The role select component type is associated with an {@link RoleSelectMenuBuilder}.
+ */
+ [ComponentType.RoleSelect]: RoleSelectMenuBuilder;
+ /**
+ * The mentionable select component type is associated with an {@link MentionableSelectMenuBuilder}.
+ */
+ [ComponentType.MentionableSelect]: MentionableSelectMenuBuilder;
+ /**
+ * The channel select component type is associated with an {@link ChannelSelectMenuBuilder}.
+ */
+ [ComponentType.ChannelSelect]: ChannelSelectMenuBuilder;
+}
+/**
+ * Factory for creating components from API data.
+ *
+ * @typeParam T - The type of component to use
+ * @param data - The API data to transform to a component class
+ */
+declare function createComponentBuilder<T extends keyof MappedComponentTypes>(data: (APIModalComponent | APIMessageComponent) & {
+ type: T;
+}): MappedComponentTypes[T];
+/**
+ * Factory for creating components from API data.
+ *
+ * @typeParam C - The type of component to use
+ * @param data - The API data to transform to a component class
+ */
+declare function createComponentBuilder<C extends MessageComponentBuilder | ModalComponentBuilder>(data: C): C;
+
+declare const textInputStyleValidator: _sapphire_shapeshift.NativeEnumValidator<typeof TextInputStyle>;
+declare const minLengthValidator: _sapphire_shapeshift.NumberValidator<number>;
+declare const maxLengthValidator: _sapphire_shapeshift.NumberValidator<number>;
+declare const requiredValidator: _sapphire_shapeshift.BooleanValidator<boolean>;
+declare const valueValidator: _sapphire_shapeshift.StringValidator<string>;
+declare const placeholderValidator: _sapphire_shapeshift.StringValidator<string>;
+declare const labelValidator: _sapphire_shapeshift.StringValidator<string>;
+declare function validateRequiredParameters$3(customId?: string, style?: TextInputStyle, label?: string): void;
+
+declare const Assertions$3_labelValidator: typeof labelValidator;
+declare const Assertions$3_maxLengthValidator: typeof maxLengthValidator;
+declare const Assertions$3_minLengthValidator: typeof minLengthValidator;
+declare const Assertions$3_placeholderValidator: typeof placeholderValidator;
+declare const Assertions$3_requiredValidator: typeof requiredValidator;
+declare const Assertions$3_textInputStyleValidator: typeof textInputStyleValidator;
+declare const Assertions$3_valueValidator: typeof valueValidator;
+declare namespace Assertions$3 {
+ export {
+ Assertions$3_labelValidator as labelValidator,
+ Assertions$3_maxLengthValidator as maxLengthValidator,
+ Assertions$3_minLengthValidator as minLengthValidator,
+ Assertions$3_placeholderValidator as placeholderValidator,
+ Assertions$3_requiredValidator as requiredValidator,
+ Assertions$3_textInputStyleValidator as textInputStyleValidator,
+ validateRequiredParameters$3 as validateRequiredParameters,
+ Assertions$3_valueValidator as valueValidator,
+ };
+}
+
+/**
+ * A builder that creates API-compatible JSON data for modals.
+ */
+declare class ModalBuilder implements JSONEncodable<APIModalInteractionResponseCallbackData> {
+ /**
+ * The API data associated with this modal.
+ */
+ readonly data: Partial<APIModalInteractionResponseCallbackData>;
+ /**
+ * The components within this modal.
+ */
+ readonly components: ActionRowBuilder<ModalActionRowComponentBuilder>[];
+ /**
+ * Creates a new modal from API data.
+ *
+ * @param data - The API data to create this modal with
+ */
+ constructor({ components, ...data }?: Partial<APIModalInteractionResponseCallbackData>);
+ /**
+ * Sets the title of this modal.
+ *
+ * @param title - The title to use
+ */
+ setTitle(title: string): this;
+ /**
+ * Sets the custom id of this modal.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId: string): this;
+ /**
+ * Adds components to this modal.
+ *
+ * @param components - The components to add
+ */
+ addComponents(...components: RestOrArray<ActionRowBuilder<ModalActionRowComponentBuilder> | APIActionRowComponent<APIModalActionRowComponent>>): this;
+ /**
+ * Sets components for this modal.
+ *
+ * @param components - The components to set
+ */
+ setComponents(...components: RestOrArray<ActionRowBuilder<ModalActionRowComponentBuilder>>): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): APIModalInteractionResponseCallbackData;
+}
+
+declare const titleValidator: _sapphire_shapeshift.StringValidator<string>;
+declare const componentsValidator: _sapphire_shapeshift.ArrayValidator<[ActionRowBuilder<AnyComponentBuilder>, ...ActionRowBuilder<AnyComponentBuilder>[]], ActionRowBuilder<AnyComponentBuilder>>;
+declare function validateRequiredParameters$2(customId?: string, title?: string, components?: ActionRowBuilder<ModalActionRowComponentBuilder>[]): void;
+
+declare const Assertions$2_componentsValidator: typeof componentsValidator;
+declare const Assertions$2_titleValidator: typeof titleValidator;
+declare namespace Assertions$2 {
+ export {
+ Assertions$2_componentsValidator as componentsValidator,
+ Assertions$2_titleValidator as titleValidator,
+ validateRequiredParameters$2 as validateRequiredParameters,
+ };
+}
+
+/**
+ * This mixin holds name and description symbols for slash commands.
+ */
+declare class SharedNameAndDescription {
+ /**
+ * The name of this command.
+ */
+ readonly name: string;
+ /**
+ * The name localizations of this command.
+ */
+ readonly name_localizations?: LocalizationMap;
+ /**
+ * The description of this command.
+ */
+ readonly description: string;
+ /**
+ * The description localizations of this command.
+ */
+ readonly description_localizations?: LocalizationMap;
+ /**
+ * Sets the name of this command.
+ *
+ * @param name - The name to use
+ */
+ setName(name: string): this;
+ /**
+ * Sets the description of this command.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description: string): this;
+ /**
+ * Sets a name localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedName - The localized name for the given `locale`
+ */
+ setNameLocalization(locale: LocaleString, localizedName: string | null): this;
+ /**
+ * Sets the name localizations for this command.
+ *
+ * @param localizedNames - The object of localized names to set
+ */
+ setNameLocalizations(localizedNames: LocalizationMap | null): this;
+ /**
+ * Sets a description localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedDescription - The localized description for the given locale
+ */
+ setDescriptionLocalization(locale: LocaleString, localizedDescription: string | null): this;
+ /**
+ * Sets the description localizations for this command.
+ *
+ * @param localizedDescriptions - The object of localized descriptions to set
+ */
+ setDescriptionLocalizations(localizedDescriptions: LocalizationMap | null): this;
+}
+
+/**
+ * The base application command option builder that contains common symbols for application command builders.
+ */
+declare abstract class ApplicationCommandOptionBase extends SharedNameAndDescription {
+ /**
+ * The type of this option.
+ */
+ abstract readonly type: ApplicationCommandOptionType;
+ /**
+ * Whether this option is required.
+ *
+ * @defaultValue `false`
+ */
+ readonly required: boolean;
+ /**
+ * Sets whether this option is required.
+ *
+ * @param required - Whether this option should be required
+ */
+ setRequired(required: boolean): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ abstract toJSON(): APIApplicationCommandBasicOption;
+ /**
+ * This method runs required validators on this builder.
+ */
+ protected runRequiredValidations(): void;
+}
+
+/**
+ * A slash command attachment option.
+ */
+declare class SlashCommandAttachmentOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Attachment;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandAttachmentOption;
+}
+
+/**
+ * A slash command boolean option.
+ */
+declare class SlashCommandBooleanOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Boolean;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandBooleanOption;
+}
+
+/**
+ * The allowed channel types used for a channel option in a slash command builder.
+ *
+ * @privateRemarks This can't be dynamic because const enums are erased at runtime.
+ * @internal
+ */
+declare const allowedChannelTypes: readonly [ChannelType.GuildText, ChannelType.GuildVoice, ChannelType.GuildCategory, ChannelType.GuildAnnouncement, ChannelType.AnnouncementThread, ChannelType.PublicThread, ChannelType.PrivateThread, ChannelType.GuildStageVoice, ChannelType.GuildForum];
+/**
+ * The type of allowed channel types used for a channel option.
+ */
+type ApplicationCommandOptionAllowedChannelTypes = (typeof allowedChannelTypes)[number];
+/**
+ * This mixin holds channel type symbols used for options.
+ */
+declare class ApplicationCommandOptionChannelTypesMixin {
+ /**
+ * The channel types of this option.
+ */
+ readonly channel_types?: ApplicationCommandOptionAllowedChannelTypes[];
+ /**
+ * Adds channel types to this option.
+ *
+ * @param channelTypes - The channel types
+ */
+ addChannelTypes(...channelTypes: ApplicationCommandOptionAllowedChannelTypes[]): this;
+}
+
+/**
+ * A slash command channel option.
+ */
+declare class SlashCommandChannelOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Channel;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandChannelOption;
+}
+interface SlashCommandChannelOption extends ApplicationCommandOptionChannelTypesMixin {
+}
+
+/**
+ * This mixin holds minimum and maximum symbols used for options.
+ */
+declare abstract class ApplicationCommandNumericOptionMinMaxValueMixin {
+ /**
+ * The maximum value of this option.
+ */
+ readonly max_value?: number;
+ /**
+ * The minimum value of this option.
+ */
+ readonly min_value?: number;
+ /**
+ * Sets the maximum number value of this option.
+ *
+ * @param max - The maximum value this option can be
+ */
+ abstract setMaxValue(max: number): this;
+ /**
+ * Sets the minimum number value of this option.
+ *
+ * @param min - The minimum value this option can be
+ */
+ abstract setMinValue(min: number): this;
+}
+
+/**
+ * This mixin holds choices and autocomplete symbols used for options.
+ */
+declare class ApplicationCommandOptionWithChoicesAndAutocompleteMixin<T extends number | string> {
+ /**
+ * The choices of this option.
+ */
+ readonly choices?: APIApplicationCommandOptionChoice<T>[];
+ /**
+ * Whether this option utilizes autocomplete.
+ */
+ readonly autocomplete?: boolean;
+ /**
+ * The type of this option.
+ *
+ * @privateRemarks Since this is present and this is a mixin, this is needed.
+ */
+ readonly type: ApplicationCommandOptionType;
+ /**
+ * Adds multiple choices to this option.
+ *
+ * @param choices - The choices to add
+ */
+ addChoices(...choices: APIApplicationCommandOptionChoice<T>[]): this;
+ /**
+ * Sets multiple choices for this option.
+ *
+ * @param choices - The choices to set
+ */
+ setChoices<Input extends APIApplicationCommandOptionChoice<T>[]>(...choices: Input): this;
+ /**
+ * Whether this option uses autocomplete.
+ *
+ * @param autocomplete - Whether this option should use autocomplete
+ */
+ setAutocomplete(autocomplete: boolean): this;
+}
+
+/**
+ * A slash command integer option.
+ */
+declare class SlashCommandIntegerOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Integer;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
+ */
+ setMaxValue(max: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}
+ */
+ setMinValue(min: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandIntegerOption;
+}
+interface SlashCommandIntegerOption extends ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {
+}
+
+/**
+ * A slash command mentionable option.
+ */
+declare class SlashCommandMentionableOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Mentionable;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandMentionableOption;
+}
+
+/**
+ * A slash command number option.
+ */
+declare class SlashCommandNumberOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Number;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
+ */
+ setMaxValue(max: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}
+ */
+ setMinValue(min: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandNumberOption;
+}
+interface SlashCommandNumberOption extends ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {
+}
+
+/**
+ * A slash command role option.
+ */
+declare class SlashCommandRoleOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Role;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandRoleOption;
+}
+
+/**
+ * A slash command string option.
+ */
+declare class SlashCommandStringOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.String;
+ /**
+ * The maximum length of this option.
+ */
+ readonly max_length?: number;
+ /**
+ * The minimum length of this option.
+ */
+ readonly min_length?: number;
+ /**
+ * Sets the maximum length of this string option.
+ *
+ * @param max - The maximum length this option can be
+ */
+ setMaxLength(max: number): this;
+ /**
+ * Sets the minimum length of this string option.
+ *
+ * @param min - The minimum length this option can be
+ */
+ setMinLength(min: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandStringOption;
+}
+interface SlashCommandStringOption extends ApplicationCommandOptionWithChoicesAndAutocompleteMixin<string> {
+}
+
+/**
+ * A slash command user option.
+ */
+declare class SlashCommandUserOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.User;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandUserOption;
+}
+
+/**
+ * This mixin holds symbols that can be shared in slash command options.
+ *
+ * @typeParam ShouldOmitSubcommandFunctions - Whether to omit subcommand functions.
+ */
+declare class SharedSlashCommandOptions<ShouldOmitSubcommandFunctions = true> {
+ readonly options: ToAPIApplicationCommandOptions[];
+ /**
+ * Adds a boolean option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addBooleanOption(input: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Adds a user option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Adds a channel option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addChannelOption(input: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Adds a role option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Adds an attachment option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addAttachmentOption(input: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Adds a mentionable option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addMentionableOption(input: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Adds a string option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addStringOption(input: Omit<SlashCommandStringOption, 'addChoices'> | Omit<SlashCommandStringOption, 'setAutocomplete'> | SlashCommandStringOption | ((builder: SlashCommandStringOption) => Omit<SlashCommandStringOption, 'addChoices'> | Omit<SlashCommandStringOption, 'setAutocomplete'> | SlashCommandStringOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Adds an integer option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addIntegerOption(input: Omit<SlashCommandIntegerOption, 'addChoices'> | Omit<SlashCommandIntegerOption, 'setAutocomplete'> | SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => Omit<SlashCommandIntegerOption, 'addChoices'> | Omit<SlashCommandIntegerOption, 'setAutocomplete'> | SlashCommandIntegerOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Adds a number option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addNumberOption(input: Omit<SlashCommandNumberOption, 'addChoices'> | Omit<SlashCommandNumberOption, 'setAutocomplete'> | SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => Omit<SlashCommandNumberOption, 'addChoices'> | Omit<SlashCommandNumberOption, 'setAutocomplete'> | SlashCommandNumberOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
+ /**
+ * Where the actual adding magic happens. ✨
+ *
+ * @param input - The input. What else?
+ * @param Instance - The instance of whatever is being added
+ * @internal
+ */
+ private _sharedAddOptionMethod;
+}
+
+/**
+ * Represents a folder for subcommands.
+ *
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups}
+ */
+declare class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions {
+ /**
+ * The name of this subcommand group.
+ */
+ readonly name: string;
+ /**
+ * The description of this subcommand group.
+ */
+ readonly description: string;
+ /**
+ * The subcommands within this subcommand group.
+ */
+ readonly options: SlashCommandSubcommandBuilder[];
+ /**
+ * Adds a new subcommand to this group.
+ *
+ * @param input - A function that returns a subcommand builder or an already built builder
+ */
+ addSubcommand(input: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): APIApplicationCommandSubcommandGroupOption;
+}
+interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription {
+}
+/**
+ * A builder that creates API-compatible JSON data for slash command subcommands.
+ *
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups}
+ */
+declare class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions {
+ /**
+ * The name of this subcommand.
+ */
+ readonly name: string;
+ /**
+ * The description of this subcommand.
+ */
+ readonly description: string;
+ /**
+ * The options within this subcommand.
+ */
+ readonly options: ApplicationCommandOptionBase[];
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): APIApplicationCommandSubcommandOption;
+}
+interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions<false> {
+}
+
+/**
+ * A builder that creates API-compatible JSON data for slash commands.
+ */
+declare class SlashCommandBuilder {
+ /**
+ * The name of this command.
+ */
+ readonly name: string;
+ /**
+ * The name localizations of this command.
+ */
+ readonly name_localizations?: LocalizationMap;
+ /**
+ * The description of this command.
+ */
+ readonly description: string;
+ /**
+ * The description localizations of this command.
+ */
+ readonly description_localizations?: LocalizationMap;
+ /**
+ * The options of this command.
+ */
+ readonly options: ToAPIApplicationCommandOptions[];
+ /**
+ * Whether this command is enabled by default when the application is added to a guild.
+ *
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ readonly default_permission: boolean | undefined;
+ /**
+ * The set of permissions represented as a bit set for the command.
+ */
+ readonly default_member_permissions: Permissions | null | undefined;
+ /**
+ * Indicates whether the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This property is only for global commands.
+ */
+ readonly dm_permission: boolean | undefined;
+ /**
+ * Whether this command is NSFW.
+ */
+ readonly nsfw: boolean | undefined;
+ /**
+ * Sets whether the command is enabled by default when the application is added to a guild.
+ *
+ * @remarks
+ * If set to `false`, you will have to later `PUT` the permissions for this command.
+ * @param value - Whether or not to enable this command by default
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ * @deprecated Use {@link SlashCommandBuilder.setDefaultMemberPermissions} or {@link SlashCommandBuilder.setDMPermission} instead.
+ */
+ setDefaultPermission(value: boolean): this;
+ /**
+ * Sets the default permissions a member should have in order to run the command.
+ *
+ * @remarks
+ * You can set this to `'0'` to disable the command by default.
+ * @param permissions - The permissions bit field to set
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined): this;
+ /**
+ * Sets if the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This method is only for global commands.
+ * @param enabled - Whether the command should be enabled in direct messages
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDMPermission(enabled: boolean | null | undefined): this;
+ /**
+ * Sets whether this command is NSFW.
+ *
+ * @param nsfw - Whether this command is NSFW
+ */
+ setNSFW(nsfw?: boolean): this;
+ /**
+ * Adds a new subcommand group to this command.
+ *
+ * @param input - A function that returns a subcommand group builder or an already built builder
+ */
+ addSubcommandGroup(input: SlashCommandSubcommandGroupBuilder | ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder)): SlashCommandSubcommandsOnlyBuilder;
+ /**
+ * Adds a new subcommand to this command.
+ *
+ * @param input - A function that returns a subcommand builder or an already built builder
+ */
+ addSubcommand(input: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)): SlashCommandSubcommandsOnlyBuilder;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody;
+}
+interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {
+}
+/**
+ * An interface specifically for slash command subcommands.
+ */
+interface SlashCommandSubcommandsOnlyBuilder extends Omit<SlashCommandBuilder, Exclude<keyof SharedSlashCommandOptions, 'options'>> {
+}
+/**
+ * An interface specifically for slash command options.
+ */
+interface SlashCommandOptionsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandOptions, Pick<SlashCommandBuilder, 'toJSON'> {
+}
+/**
+ * An interface that ensures the `toJSON()` call will return something
+ * that can be serialized into API-compatible data.
+ */
+interface ToAPIApplicationCommandOptions {
+ toJSON(): APIApplicationCommandOption;
+}
+
+declare function validateName$1(name: unknown): asserts name is string;
+declare function validateDescription(description: unknown): asserts description is string;
+declare function validateLocale(locale: unknown): Locale;
+declare function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[];
+declare function validateRequiredParameters$1(name: string, description: string, options: ToAPIApplicationCommandOptions[]): void;
+declare function validateDefaultPermission$1(value: unknown): asserts value is boolean;
+declare function validateRequired(required: unknown): asserts required is boolean;
+declare function validateChoicesLength(amountAdding: number, choices?: APIApplicationCommandOptionChoice[]): void;
+declare function assertReturnOfBuilder<T extends ApplicationCommandOptionBase | SlashCommandSubcommandBuilder | SlashCommandSubcommandGroupBuilder>(input: unknown, ExpectedInstanceOf: new () => T): asserts input is T;
+declare const localizationMapPredicate: _sapphire_shapeshift.UnionValidator<_sapphire_shapeshift.UndefinedToOptional<Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "sv-SE" | "th" | "tr" | "uk" | "vi", string | null>>> | null | undefined>;
+declare function validateLocalizationMap(value: unknown): asserts value is LocalizationMap;
+declare function validateDMPermission$1(value: unknown): asserts value is boolean | null | undefined;
+declare function validateDefaultMemberPermissions$1(permissions: unknown): string | null | undefined;
+declare function validateNSFW(value: unknown): asserts value is boolean;
+
+declare const Assertions$1_assertReturnOfBuilder: typeof assertReturnOfBuilder;
+declare const Assertions$1_localizationMapPredicate: typeof localizationMapPredicate;
+declare const Assertions$1_validateChoicesLength: typeof validateChoicesLength;
+declare const Assertions$1_validateDescription: typeof validateDescription;
+declare const Assertions$1_validateLocale: typeof validateLocale;
+declare const Assertions$1_validateLocalizationMap: typeof validateLocalizationMap;
+declare const Assertions$1_validateMaxOptionsLength: typeof validateMaxOptionsLength;
+declare const Assertions$1_validateNSFW: typeof validateNSFW;
+declare const Assertions$1_validateRequired: typeof validateRequired;
+declare namespace Assertions$1 {
+ export {
+ Assertions$1_assertReturnOfBuilder as assertReturnOfBuilder,
+ Assertions$1_localizationMapPredicate as localizationMapPredicate,
+ Assertions$1_validateChoicesLength as validateChoicesLength,
+ validateDMPermission$1 as validateDMPermission,
+ validateDefaultMemberPermissions$1 as validateDefaultMemberPermissions,
+ validateDefaultPermission$1 as validateDefaultPermission,
+ Assertions$1_validateDescription as validateDescription,
+ Assertions$1_validateLocale as validateLocale,
+ Assertions$1_validateLocalizationMap as validateLocalizationMap,
+ Assertions$1_validateMaxOptionsLength as validateMaxOptionsLength,
+ Assertions$1_validateNSFW as validateNSFW,
+ validateName$1 as validateName,
+ Assertions$1_validateRequired as validateRequired,
+ validateRequiredParameters$1 as validateRequiredParameters,
+ };
+}
+
+/**
+ * The type a context menu command can be.
+ */
+type ContextMenuCommandType = ApplicationCommandType.Message | ApplicationCommandType.User;
+/**
+ * A builder that creates API-compatible JSON data for context menu commands.
+ */
+declare class ContextMenuCommandBuilder {
+ /**
+ * The name of this command.
+ */
+ readonly name: string;
+ /**
+ * The name localizations of this command.
+ */
+ readonly name_localizations?: LocalizationMap;
+ /**
+ * The type of this command.
+ */
+ readonly type: ContextMenuCommandType;
+ /**
+ * Whether this command is enabled by default when the application is added to a guild.
+ *
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ readonly default_permission: boolean | undefined;
+ /**
+ * The set of permissions represented as a bit set for the command.
+ */
+ readonly default_member_permissions: Permissions | null | undefined;
+ /**
+ * Indicates whether the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This property is only for global commands.
+ */
+ readonly dm_permission: boolean | undefined;
+ /**
+ * Sets the name of this command.
+ *
+ * @param name - The name to use
+ */
+ setName(name: string): this;
+ /**
+ * Sets the type of this command.
+ *
+ * @param type - The type to use
+ */
+ setType(type: ContextMenuCommandType): this;
+ /**
+ * Sets whether the command is enabled by default when the application is added to a guild.
+ *
+ * @remarks
+ * If set to `false`, you will have to later `PUT` the permissions for this command.
+ * @param value - Whether to enable this command by default
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ setDefaultPermission(value: boolean): this;
+ /**
+ * Sets the default permissions a member should have in order to run this command.
+ *
+ * @remarks
+ * You can set this to `'0'` to disable the command by default.
+ * @param permissions - The permissions bit field to set
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined): this;
+ /**
+ * Sets if the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This method is only for global commands.
+ * @param enabled - Whether the command should be enabled in direct messages
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDMPermission(enabled: boolean | null | undefined): this;
+ /**
+ * Sets a name localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedName - The localized name for the given `locale`
+ */
+ setNameLocalization(locale: LocaleString, localizedName: string | null): this;
+ /**
+ * Sets the name localizations for this command.
+ *
+ * @param localizedNames - The object of localized names to set
+ */
+ setNameLocalizations(localizedNames: LocalizationMap | null): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): RESTPostAPIContextMenuApplicationCommandsJSONBody;
+}
+
+declare function validateDefaultPermission(value: unknown): asserts value is boolean;
+declare function validateName(name: unknown): asserts name is string;
+declare function validateType(type: unknown): asserts type is ContextMenuCommandType;
+declare function validateRequiredParameters(name: string, type: number): void;
+declare function validateDMPermission(value: unknown): asserts value is boolean | null | undefined;
+declare function validateDefaultMemberPermissions(permissions: unknown): string | null | undefined;
+
+declare const Assertions_validateDMPermission: typeof validateDMPermission;
+declare const Assertions_validateDefaultMemberPermissions: typeof validateDefaultMemberPermissions;
+declare const Assertions_validateDefaultPermission: typeof validateDefaultPermission;
+declare const Assertions_validateName: typeof validateName;
+declare const Assertions_validateRequiredParameters: typeof validateRequiredParameters;
+declare const Assertions_validateType: typeof validateType;
+declare namespace Assertions {
+ export {
+ Assertions_validateDMPermission as validateDMPermission,
+ Assertions_validateDefaultMemberPermissions as validateDefaultMemberPermissions,
+ Assertions_validateDefaultPermission as validateDefaultPermission,
+ Assertions_validateName as validateName,
+ Assertions_validateRequiredParameters as validateRequiredParameters,
+ Assertions_validateType as validateType,
+ };
+}
+
+/**
+ * Calculates the length of the embed.
+ *
+ * @param data - The embed data to check
+ */
+declare function embedLength(data: APIEmbed): number;
+
+/**
+ * Enables validators.
+ *
+ * @returns Whether validation is occurring.
+ */
+declare function enableValidators(): boolean;
+/**
+ * Disables validators.
+ *
+ * @returns Whether validation is occurring.
+ */
+declare function disableValidators(): boolean;
+/**
+ * Checks whether validation is occurring.
+ */
+declare function isValidationEnabled(): boolean;
+
+/**
+ * The {@link https://github.com/discordjs/discord.js/blob/main/packages/builders#readme | @discordjs/builders} version
+ * that you are currently using.
+ *
+ * @privateRemarks This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild.
+ */
+declare const version: string;
+
+export { ActionRowBuilder, AnyAPIActionRowComponent, AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$4 as ComponentAssertions, ComponentBuilder, Assertions as ContextMenuCommandAssertions, ContextMenuCommandBuilder, ContextMenuCommandType, Assertions$5 as EmbedAssertions, EmbedAuthorData, EmbedAuthorOptions, EmbedBuilder, EmbedFooterData, EmbedFooterOptions, EmbedImageData, IconData, MappedComponentTypes, MentionableSelectMenuBuilder, MessageActionRowComponentBuilder, MessageComponentBuilder, ModalActionRowComponentBuilder, Assertions$2 as ModalAssertions, ModalBuilder, ModalComponentBuilder, RGBTuple, RestOrArray, RoleSelectMenuBuilder, StringSelectMenuBuilder as SelectMenuBuilder, StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, SharedNameAndDescription, SharedSlashCommandOptions, Assertions$1 as SlashCommandAssertions, SlashCommandAttachmentOption, SlashCommandBooleanOption, SlashCommandBuilder, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, SlashCommandOptionsOnlyBuilder, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, SlashCommandSubcommandsOnlyBuilder, SlashCommandUserOption, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, Assertions$3 as TextInputAssertions, TextInputBuilder, ToAPIApplicationCommandOptions, UserSelectMenuBuilder, createComponentBuilder, disableValidators, embedLength, enableValidators, isValidationEnabled, normalizeArray, version };
diff --git a/node_modules/@discordjs/builders/dist/index.js b/node_modules/@discordjs/builders/dist/index.js
new file mode 100644
index 0000000..4a8f89c
--- /dev/null
+++ b/node_modules/@discordjs/builders/dist/index.js
@@ -0,0 +1,2612 @@
+"use strict";
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ // If the importer is in node compatibility mode or this is not an ESM
+ // file that has been converted to a CommonJS file using a Babel-
+ // compatible transform (i.e. "__esModule" has not been set), then set
+ // "default" to the CommonJS "module.exports" for node compatibility.
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+ mod
+));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+var __decorateClass = (decorators, target, key, kind) => {
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
+ if (decorator = decorators[i])
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
+ if (kind && result)
+ __defProp(target, key, result);
+ return result;
+};
+
+// src/index.ts
+var src_exports = {};
+__export(src_exports, {
+ ActionRowBuilder: () => ActionRowBuilder,
+ ApplicationCommandNumericOptionMinMaxValueMixin: () => ApplicationCommandNumericOptionMinMaxValueMixin,
+ ApplicationCommandOptionBase: () => ApplicationCommandOptionBase,
+ ApplicationCommandOptionChannelTypesMixin: () => ApplicationCommandOptionChannelTypesMixin,
+ ApplicationCommandOptionWithChoicesAndAutocompleteMixin: () => ApplicationCommandOptionWithChoicesAndAutocompleteMixin,
+ BaseSelectMenuBuilder: () => BaseSelectMenuBuilder,
+ ButtonBuilder: () => ButtonBuilder,
+ ChannelSelectMenuBuilder: () => ChannelSelectMenuBuilder,
+ ComponentAssertions: () => Assertions_exports2,
+ ComponentBuilder: () => ComponentBuilder,
+ ContextMenuCommandAssertions: () => Assertions_exports6,
+ ContextMenuCommandBuilder: () => ContextMenuCommandBuilder,
+ EmbedAssertions: () => Assertions_exports,
+ EmbedBuilder: () => EmbedBuilder,
+ MentionableSelectMenuBuilder: () => MentionableSelectMenuBuilder,
+ ModalAssertions: () => Assertions_exports4,
+ ModalBuilder: () => ModalBuilder,
+ RoleSelectMenuBuilder: () => RoleSelectMenuBuilder,
+ SelectMenuBuilder: () => StringSelectMenuBuilder,
+ SelectMenuOptionBuilder: () => StringSelectMenuOptionBuilder,
+ SharedNameAndDescription: () => SharedNameAndDescription,
+ SharedSlashCommandOptions: () => SharedSlashCommandOptions,
+ SlashCommandAssertions: () => Assertions_exports5,
+ SlashCommandAttachmentOption: () => SlashCommandAttachmentOption,
+ SlashCommandBooleanOption: () => SlashCommandBooleanOption,
+ SlashCommandBuilder: () => SlashCommandBuilder,
+ SlashCommandChannelOption: () => SlashCommandChannelOption,
+ SlashCommandIntegerOption: () => SlashCommandIntegerOption,
+ SlashCommandMentionableOption: () => SlashCommandMentionableOption,
+ SlashCommandNumberOption: () => SlashCommandNumberOption,
+ SlashCommandRoleOption: () => SlashCommandRoleOption,
+ SlashCommandStringOption: () => SlashCommandStringOption,
+ SlashCommandSubcommandBuilder: () => SlashCommandSubcommandBuilder,
+ SlashCommandSubcommandGroupBuilder: () => SlashCommandSubcommandGroupBuilder,
+ SlashCommandUserOption: () => SlashCommandUserOption,
+ StringSelectMenuBuilder: () => StringSelectMenuBuilder,
+ StringSelectMenuOptionBuilder: () => StringSelectMenuOptionBuilder,
+ TextInputAssertions: () => Assertions_exports3,
+ TextInputBuilder: () => TextInputBuilder,
+ UserSelectMenuBuilder: () => UserSelectMenuBuilder,
+ createComponentBuilder: () => createComponentBuilder,
+ disableValidators: () => disableValidators,
+ embedLength: () => embedLength,
+ enableValidators: () => enableValidators,
+ isValidationEnabled: () => isValidationEnabled,
+ normalizeArray: () => normalizeArray,
+ version: () => version
+});
+module.exports = __toCommonJS(src_exports);
+
+// src/messages/embed/Assertions.ts
+var Assertions_exports = {};
+__export(Assertions_exports, {
+ RGBPredicate: () => RGBPredicate,
+ authorNamePredicate: () => authorNamePredicate,
+ colorPredicate: () => colorPredicate,
+ descriptionPredicate: () => descriptionPredicate,
+ embedAuthorPredicate: () => embedAuthorPredicate,
+ embedFieldPredicate: () => embedFieldPredicate,
+ embedFieldsArrayPredicate: () => embedFieldsArrayPredicate,
+ embedFooterPredicate: () => embedFooterPredicate,
+ fieldInlinePredicate: () => fieldInlinePredicate,
+ fieldLengthPredicate: () => fieldLengthPredicate,
+ fieldNamePredicate: () => fieldNamePredicate,
+ fieldValuePredicate: () => fieldValuePredicate,
+ footerTextPredicate: () => footerTextPredicate,
+ imageURLPredicate: () => imageURLPredicate,
+ timestampPredicate: () => timestampPredicate,
+ titlePredicate: () => titlePredicate,
+ urlPredicate: () => urlPredicate,
+ validateFieldLength: () => validateFieldLength
+});
+var import_shapeshift = require("@sapphire/shapeshift");
+
+// src/util/validation.ts
+var validate = true;
+function enableValidators() {
+ return validate = true;
+}
+__name(enableValidators, "enableValidators");
+function disableValidators() {
+ return validate = false;
+}
+__name(disableValidators, "disableValidators");
+function isValidationEnabled() {
+ return validate;
+}
+__name(isValidationEnabled, "isValidationEnabled");
+
+// src/messages/embed/Assertions.ts
+var fieldNamePredicate = import_shapeshift.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(256).setValidationEnabled(isValidationEnabled);
+var fieldValuePredicate = import_shapeshift.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(1024).setValidationEnabled(isValidationEnabled);
+var fieldInlinePredicate = import_shapeshift.s.boolean.optional;
+var embedFieldPredicate = import_shapeshift.s.object({
+ name: fieldNamePredicate,
+ value: fieldValuePredicate,
+ inline: fieldInlinePredicate
+}).setValidationEnabled(isValidationEnabled);
+var embedFieldsArrayPredicate = embedFieldPredicate.array.setValidationEnabled(isValidationEnabled);
+var fieldLengthPredicate = import_shapeshift.s.number.lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
+function validateFieldLength(amountAdding, fields) {
+ fieldLengthPredicate.parse((fields?.length ?? 0) + amountAdding);
+}
+__name(validateFieldLength, "validateFieldLength");
+var authorNamePredicate = fieldNamePredicate.nullable.setValidationEnabled(isValidationEnabled);
+var imageURLPredicate = import_shapeshift.s.string.url({
+ allowedProtocols: ["http:", "https:", "attachment:"]
+}).nullish.setValidationEnabled(isValidationEnabled);
+var urlPredicate = import_shapeshift.s.string.url({
+ allowedProtocols: ["http:", "https:"]
+}).nullish.setValidationEnabled(isValidationEnabled);
+var embedAuthorPredicate = import_shapeshift.s.object({
+ name: authorNamePredicate,
+ iconURL: imageURLPredicate,
+ url: urlPredicate
+}).setValidationEnabled(isValidationEnabled);
+var RGBPredicate = import_shapeshift.s.number.int.greaterThanOrEqual(0).lessThanOrEqual(255).setValidationEnabled(isValidationEnabled);
+var colorPredicate = import_shapeshift.s.number.int.greaterThanOrEqual(0).lessThanOrEqual(16777215).or(import_shapeshift.s.tuple([RGBPredicate, RGBPredicate, RGBPredicate])).nullable.setValidationEnabled(isValidationEnabled);
+var descriptionPredicate = import_shapeshift.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(4096).nullable.setValidationEnabled(isValidationEnabled);
+var footerTextPredicate = import_shapeshift.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(2048).nullable.setValidationEnabled(isValidationEnabled);
+var embedFooterPredicate = import_shapeshift.s.object({
+ text: footerTextPredicate,
+ iconURL: imageURLPredicate
+}).setValidationEnabled(isValidationEnabled);
+var timestampPredicate = import_shapeshift.s.union(import_shapeshift.s.number, import_shapeshift.s.date).nullable.setValidationEnabled(isValidationEnabled);
+var titlePredicate = fieldNamePredicate.nullable.setValidationEnabled(isValidationEnabled);
+
+// src/util/normalizeArray.ts
+function normalizeArray(arr) {
+ if (Array.isArray(arr[0]))
+ return arr[0];
+ return arr;
+}
+__name(normalizeArray, "normalizeArray");
+
+// src/messages/embed/Embed.ts
+var EmbedBuilder = class {
+ static {
+ __name(this, "EmbedBuilder");
+ }
+ /**
+ * The API data associated with this embed.
+ */
+ data;
+ /**
+ * Creates a new embed from API data.
+ *
+ * @param data - The API data to create this embed with
+ */
+ constructor(data = {}) {
+ this.data = { ...data };
+ if (data.timestamp)
+ this.data.timestamp = new Date(data.timestamp).toISOString();
+ }
+ /**
+ * Appends fields to the embed.
+ *
+ * @remarks
+ * This method accepts either an array of fields or a variable number of field parameters.
+ * The maximum amount of fields that can be added is 25.
+ * @example
+ * Using an array:
+ * ```ts
+ * const fields: APIEmbedField[] = ...;
+ * const embed = new EmbedBuilder()
+ * .addFields(fields);
+ * ```
+ * @example
+ * Using rest parameters (variadic):
+ * ```ts
+ * const embed = new EmbedBuilder()
+ * .addFields(
+ * { name: 'Field 1', value: 'Value 1' },
+ * { name: 'Field 2', value: 'Value 2' },
+ * );
+ * ```
+ * @param fields - The fields to add
+ */
+ addFields(...fields) {
+ const normalizedFields = normalizeArray(fields);
+ validateFieldLength(normalizedFields.length, this.data.fields);
+ embedFieldsArrayPredicate.parse(normalizedFields);
+ if (this.data.fields)
+ this.data.fields.push(...normalizedFields);
+ else
+ this.data.fields = normalizedFields;
+ return this;
+ }
+ /**
+ * Removes, replaces, or inserts fields for this embed.
+ *
+ * @remarks
+ * This method behaves similarly
+ * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
+ * The maximum amount of fields that can be added is 25.
+ *
+ * It's useful for modifying and adjusting order of the already-existing fields of an embed.
+ * @example
+ * Remove the first field:
+ * ```ts
+ * embed.spliceFields(0, 1);
+ * ```
+ * @example
+ * Remove the first n fields:
+ * ```ts
+ * const n = 4;
+ * embed.spliceFields(0, n);
+ * ```
+ * @example
+ * Remove the last field:
+ * ```ts
+ * embed.spliceFields(-1, 1);
+ * ```
+ * @param index - The index to start at
+ * @param deleteCount - The number of fields to remove
+ * @param fields - The replacing field objects
+ */
+ spliceFields(index, deleteCount, ...fields) {
+ validateFieldLength(fields.length - deleteCount, this.data.fields);
+ embedFieldsArrayPredicate.parse(fields);
+ if (this.data.fields)
+ this.data.fields.splice(index, deleteCount, ...fields);
+ else
+ this.data.fields = fields;
+ return this;
+ }
+ /**
+ * Sets the fields for this embed.
+ *
+ * @remarks
+ * This method is an alias for {@link EmbedBuilder.spliceFields}. More specifically,
+ * it splices the entire array of fields, replacing them with the provided fields.
+ *
+ * You can set a maximum of 25 fields.
+ * @param fields - The fields to set
+ */
+ setFields(...fields) {
+ this.spliceFields(0, this.data.fields?.length ?? 0, ...normalizeArray(fields));
+ return this;
+ }
+ /**
+ * Sets the author of this embed.
+ *
+ * @param options - The options to use
+ */
+ setAuthor(options) {
+ if (options === null) {
+ this.data.author = void 0;
+ return this;
+ }
+ embedAuthorPredicate.parse(options);
+ this.data.author = { name: options.name, url: options.url, icon_url: options.iconURL };
+ return this;
+ }
+ /**
+ * Sets the color of this embed.
+ *
+ * @param color - The color to use
+ */
+ setColor(color) {
+ colorPredicate.parse(color);
+ if (Array.isArray(color)) {
+ const [red, green, blue] = color;
+ this.data.color = (red << 16) + (green << 8) + blue;
+ return this;
+ }
+ this.data.color = color ?? void 0;
+ return this;
+ }
+ /**
+ * Sets the description of this embed.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description) {
+ descriptionPredicate.parse(description);
+ this.data.description = description ?? void 0;
+ return this;
+ }
+ /**
+ * Sets the footer of this embed.
+ *
+ * @param options - The footer to use
+ */
+ setFooter(options) {
+ if (options === null) {
+ this.data.footer = void 0;
+ return this;
+ }
+ embedFooterPredicate.parse(options);
+ this.data.footer = { text: options.text, icon_url: options.iconURL };
+ return this;
+ }
+ /**
+ * Sets the image of this embed.
+ *
+ * @param url - The image URL to use
+ */
+ setImage(url) {
+ imageURLPredicate.parse(url);
+ this.data.image = url ? { url } : void 0;
+ return this;
+ }
+ /**
+ * Sets the thumbnail of this embed.
+ *
+ * @param url - The thumbnail URL to use
+ */
+ setThumbnail(url) {
+ imageURLPredicate.parse(url);
+ this.data.thumbnail = url ? { url } : void 0;
+ return this;
+ }
+ /**
+ * Sets the timestamp of this embed.
+ *
+ * @param timestamp - The timestamp or date to use
+ */
+ setTimestamp(timestamp = Date.now()) {
+ timestampPredicate.parse(timestamp);
+ this.data.timestamp = timestamp ? new Date(timestamp).toISOString() : void 0;
+ return this;
+ }
+ /**
+ * Sets the title for this embed.
+ *
+ * @param title - The title to use
+ */
+ setTitle(title) {
+ titlePredicate.parse(title);
+ this.data.title = title ?? void 0;
+ return this;
+ }
+ /**
+ * Sets the URL of this embed.
+ *
+ * @param url - The URL to use
+ */
+ setURL(url) {
+ urlPredicate.parse(url);
+ this.data.url = url ?? void 0;
+ return this;
+ }
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON() {
+ return { ...this.data };
+ }
+};
+
+// src/index.ts
+__reExport(src_exports, require("@discordjs/formatters"), module.exports);
+
+// src/components/Assertions.ts
+var Assertions_exports2 = {};
+__export(Assertions_exports2, {
+ buttonLabelValidator: () => buttonLabelValidator,
+ buttonStyleValidator: () => buttonStyleValidator,
+ channelTypesValidator: () => channelTypesValidator,
+ customIdValidator: () => customIdValidator,
+ defaultValidator: () => defaultValidator,
+ disabledValidator: () => disabledValidator,
+ emojiValidator: () => emojiValidator,
+ jsonOptionValidator: () => jsonOptionValidator,
+ labelValueDescriptionValidator: () => labelValueDescriptionValidator,
+ minMaxValidator: () => minMaxValidator,
+ optionValidator: () => optionValidator,
+ optionsLengthValidator: () => optionsLengthValidator,
+ optionsValidator: () => optionsValidator,
+ placeholderValidator: () => placeholderValidator,
+ urlValidator: () => urlValidator,
+ validateRequiredButtonParameters: () => validateRequiredButtonParameters,
+ validateRequiredSelectMenuOptionParameters: () => validateRequiredSelectMenuOptionParameters,
+ validateRequiredSelectMenuParameters: () => validateRequiredSelectMenuParameters
+});
+var import_shapeshift2 = require("@sapphire/shapeshift");
+var import_v10 = require("discord-api-types/v10");
+
+// src/components/selectMenu/StringSelectMenuOption.ts
+var StringSelectMenuOptionBuilder = class {
+ /**
+ * Creates a new string select menu option from API data.
+ *
+ * @param data - The API data to create this string select menu option with
+ * @example
+ * Creating a string select menu option from an API data object:
+ * ```ts
+ * const selectMenuOption = new SelectMenuOptionBuilder({
+ * label: 'catchy label',
+ * value: '1',
+ * });
+ * ```
+ * @example
+ * Creating a string select menu option using setters and API data:
+ * ```ts
+ * const selectMenuOption = new SelectMenuOptionBuilder({
+ * default: true,
+ * value: '1',
+ * })
+ * .setLabel('woah');
+ * ```
+ */
+ constructor(data = {}) {
+ this.data = data;
+ }
+ static {
+ __name(this, "StringSelectMenuOptionBuilder");
+ }
+ /**
+ * Sets the label for this option.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label) {
+ this.data.label = labelValueDescriptionValidator.parse(label);
+ return this;
+ }
+ /**
+ * Sets the value for this option.
+ *
+ * @param value - The value to use
+ */
+ setValue(value) {
+ this.data.value = labelValueDescriptionValidator.parse(value);
+ return this;
+ }
+ /**
+ * Sets the description for this option.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description) {
+ this.data.description = labelValueDescriptionValidator.parse(description);
+ return this;
+ }
+ /**
+ * Sets whether this option is selected by default.
+ *
+ * @param isDefault - Whether this option is selected by default
+ */
+ setDefault(isDefault = true) {
+ this.data.default = defaultValidator.parse(isDefault);
+ return this;
+ }
+ /**
+ * Sets the emoji to display for this option.
+ *
+ * @param emoji - The emoji to use
+ */
+ setEmoji(emoji) {
+ this.data.emoji = emojiValidator.parse(emoji);
+ return this;
+ }
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON() {
+ validateRequiredSelectMenuOptionParameters(this.data.label, this.data.value);
+ return {
+ ...this.data
+ };
+ }
+};
+
+// src/components/Assertions.ts
+var customIdValidator = import_shapeshift2.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
+var emojiValidator = import_shapeshift2.s.object({
+ id: import_shapeshift2.s.string,
+ name: import_shapeshift2.s.string,
+ animated: import_shapeshift2.s.boolean
+}).partial.strict.setValidationEnabled(isValidationEnabled);
+var disabledValidator = import_shapeshift2.s.boolean;
+var buttonLabelValidator = import_shapeshift2.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(80).setValidationEnabled(isValidationEnabled);
+var buttonStyleValidator = import_shapeshift2.s.nativeEnum(import_v10.ButtonStyle);
+var placeholderValidator = import_shapeshift2.s.string.lengthLessThanOrEqual(150).setValidationEnabled(isValidationEnabled);
+var minMaxValidator = import_shapeshift2.s.number.int.greaterThanOrEqual(0).lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
+var labelValueDescriptionValidator = import_shapeshift2.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
+var jsonOptionValidator = import_shapeshift2.s.object({
+ label: labelValueDescriptionValidator,
+ value: labelValueDescriptionValidator,
+ description: labelValueDescriptionValidator.optional,
+ emoji: emojiValidator.optional,
+ default: import_shapeshift2.s.boolean.optional
+}).setValidationEnabled(isValidationEnabled);
+var optionValidator = import_shapeshift2.s.instance(StringSelectMenuOptionBuilder).setValidationEnabled(isValidationEnabled);
+var optionsValidator = optionValidator.array.lengthGreaterThanOrEqual(0).setValidationEnabled(isValidationEnabled);
+var optionsLengthValidator = import_shapeshift2.s.number.int.greaterThanOrEqual(0).lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
+function validateRequiredSelectMenuParameters(options, customId) {
+ customIdValidator.parse(customId);
+ optionsValidator.parse(options);
+}
+__name(validateRequiredSelectMenuParameters, "validateRequiredSelectMenuParameters");
+var defaultValidator = import_shapeshift2.s.boolean;
+function validateRequiredSelectMenuOptionParameters(label, value) {
+ labelValueDescriptionValidator.parse(label);
+ labelValueDescriptionValidator.parse(value);
+}
+__name(validateRequiredSelectMenuOptionParameters, "validateRequiredSelectMenuOptionParameters");
+var channelTypesValidator = import_shapeshift2.s.nativeEnum(import_v10.ChannelType).array.setValidationEnabled(isValidationEnabled);
+var urlValidator = import_shapeshift2.s.string.url({
+ allowedProtocols: ["http:", "https:", "discord:"]
+}).setValidationEnabled(isValidationEnabled);
+function validateRequiredButtonParameters(style, label, emoji, customId, url) {
+ if (url && customId) {
+ throw new RangeError("URL and custom id are mutually exclusive");
+ }
+ if (!label && !emoji) {
+ throw new RangeError("Buttons must have a label and/or an emoji");
+ }
+ if (style === import_v10.ButtonStyle.Link) {
+ if (!url) {
+ throw new RangeError("Link buttons must have a url");
+ }
+ } else if (url) {
+ throw new RangeError("Non-link buttons cannot have a url");
+ }
+}
+__name(validateRequiredButtonParameters, "validateRequiredButtonParameters");
+
+// src/components/ActionRow.ts
+var import_v1011 = require("discord-api-types/v10");
+
+// src/components/Component.ts
+var ComponentBuilder = class {
+ static {
+ __name(this, "ComponentBuilder");
+ }
+ /**
+ * The API data associated with this component.
+ */
+ data;
+ /**
+ * Constructs a new kind of component.
+ *
+ * @param data - The data to construct a component out of
+ */
+ constructor(data) {
+ this.data = data;
+ }
+};
+
+// src/components/Components.ts
+var import_v1010 = require("discord-api-types/v10");
+
+// src/components/button/Button.ts
+var import_v102 = require("discord-api-types/v10");
+var ButtonBuilder = class extends ComponentBuilder {
+ static {
+ __name(this, "ButtonBuilder");
+ }
+ /**
+ * Creates a new button from API data.
+ *
+ * @param data - The API data to create this button with
+ * @example
+ * Creating a button from an API data object:
+ * ```ts
+ * const button = new ButtonBuilder({
+ * custom_id: 'a cool button',
+ * style: ButtonStyle.Primary,
+ * label: 'Click Me',
+ * emoji: {
+ * name: 'smile',
+ * id: '123456789012345678',
+ * },
+ * });
+ * ```
+ * @example
+ * Creating a button using setters and API data:
+ * ```ts
+ * const button = new ButtonBuilder({
+ * style: ButtonStyle.Secondary,
+ * label: 'Click Me',
+ * })
+ * .setEmoji({ name: '🙂' })
+ * .setCustomId('another cool button');
+ * ```
+ */
+ constructor(data) {
+ super({ type: import_v102.ComponentType.Button, ...data });
+ }
+ /**
+ * Sets the style of this button.
+ *
+ * @param style - The style to use
+ */
+ setStyle(style) {
+ this.data.style = buttonStyleValidator.parse(style);
+ return this;
+ }
+ /**
+ * Sets the URL for this button.
+ *
+ * @remarks
+ * This method is only available to buttons using the `Link` button style.
+ * Only three types of URL schemes are currently supported: `https://`, `http://`, and `discord://`.
+ * @param url - The URL to use
+ */
+ setURL(url) {
+ this.data.url = urlValidator.parse(url);
+ return this;
+ }
+ /**
+ * Sets the custom id for this button.
+ *
+ * @remarks
+ * This method is only applicable to buttons that are not using the `Link` button style.
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId) {
+ this.data.custom_id = customIdValidator.parse(customId);
+ return this;
+ }
+ /**
+ * Sets the emoji to display on this button.
+ *
+ * @param emoji - The emoji to use
+ */
+ setEmoji(emoji) {
+ this.data.emoji = emojiValidator.parse(emoji);
+ return this;
+ }
+ /**
+ * Sets whether this button is disabled.
+ *
+ * @param disabled - Whether to disable this button
+ */
+ setDisabled(disabled = true) {
+ this.data.disabled = disabledValidator.parse(disabled);
+ return this;
+ }
+ /**
+ * Sets the label for this button.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label) {
+ this.data.label = buttonLabelValidator.parse(label);
+ return this;
+ }
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON() {
+ validateRequiredButtonParameters(
+ this.data.style,
+ this.data.label,
+ this.data.emoji,
+ this.data.custom_id,
+ this.data.url
+ );
+ return {
+ ...this.data
+ };
+ }
+};
+
+// src/components/selectMenu/ChannelSelectMenu.ts
+var import_v103 = require("discord-api-types/v10");
+
+// src/components/selectMenu/BaseSelectMenu.ts
+var BaseSelectMenuBuilder = class extends ComponentBuilder {
+ static {
+ __name(this, "BaseSelectMenuBuilder");
+ }
+ /**
+ * Sets the placeholder for this select menu.
+ *
+ * @param placeholder - The placeholder to use
+ */
+ setPlaceholder(placeholder) {
+ this.data.placeholder = placeholderValidator.parse(placeholder);
+ return this;
+ }
+ /**
+ * Sets the minimum values that must be selected in the select menu.
+ *
+ * @param minValues - The minimum values that must be selected
+ */
+ setMinValues(minValues) {
+ this.data.min_values = minMaxValidator.parse(minValues);
+ return this;
+ }
+ /**
+ * Sets the maximum values that must be selected in the select menu.
+ *
+ * @param maxValues - The maximum values that must be selected
+ */
+ setMaxValues(maxValues) {
+ this.data.max_values = minMaxValidator.parse(maxValues);
+ return this;
+ }
+ /**
+ * Sets the custom id for this select menu.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId) {
+ this.data.custom_id = customIdValidator.parse(customId);
+ return this;
+ }
+ /**
+ * Sets whether this select menu is disabled.
+ *
+ * @param disabled - Whether this select menu is disabled
+ */
+ setDisabled(disabled = true) {
+ this.data.disabled = disabledValidator.parse(disabled);
+ return this;
+ }
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON() {
+ customIdValidator.parse(this.data.custom_id);
+ return {
+ ...this.data
+ };
+ }
+};
+
+// src/components/selectMenu/ChannelSelectMenu.ts
+var ChannelSelectMenuBuilder = class extends BaseSelectMenuBuilder {
+ static {
+ __name(this, "ChannelSelectMenuBuilder");
+ }
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new ChannelSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new ChannelSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)
+ * .setMinValues(2);
+ * ```
+ */
+ constructor(data) {
+ super({ ...data, type: import_v103.ComponentType.ChannelSelect });
+ }
+ /**
+ * Adds channel types to this select menu.
+ *
+ * @param types - The channel types to use
+ */
+ addChannelTypes(...types) {
+ const normalizedTypes = normalizeArray(types);
+ this.data.channel_types ??= [];
+ this.data.channel_types.push(...channelTypesValidator.parse(normalizedTypes));
+ return this;
+ }
+ /**
+ * Sets channel types for this select menu.
+ *
+ * @param types - The channel types to use
+ */
+ setChannelTypes(...types) {
+ const normalizedTypes = normalizeArray(types);
+ this.data.channel_types ??= [];
+ this.data.channel_types.splice(0, this.data.channel_types.length, ...channelTypesValidator.parse(normalizedTypes));
+ return this;
+ }
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON() {
+ customIdValidator.parse(this.data.custom_id);
+ return {
+ ...this.data
+ };
+ }
+};
+
+// src/components/selectMenu/MentionableSelectMenu.ts
+var import_v104 = require("discord-api-types/v10");
+var MentionableSelectMenuBuilder = class extends BaseSelectMenuBuilder {
+ static {
+ __name(this, "MentionableSelectMenuBuilder");
+ }
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new MentionableSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new MentionableSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data) {
+ super({ ...data, type: import_v104.ComponentType.MentionableSelect });
+ }
+};
+
+// src/components/selectMenu/RoleSelectMenu.ts
+var import_v105 = require("discord-api-types/v10");
+var RoleSelectMenuBuilder = class extends BaseSelectMenuBuilder {
+ static {
+ __name(this, "RoleSelectMenuBuilder");
+ }
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new RoleSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new RoleSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data) {
+ super({ ...data, type: import_v105.ComponentType.RoleSelect });
+ }
+};
+
+// src/components/selectMenu/StringSelectMenu.ts
+var import_v106 = require("discord-api-types/v10");
+var StringSelectMenuBuilder = class extends BaseSelectMenuBuilder {
+ static {
+ __name(this, "StringSelectMenuBuilder");
+ }
+ /**
+ * The options within this select menu.
+ */
+ options;
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new StringSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * options: [
+ * { label: 'option 1', value: '1' },
+ * { label: 'option 2', value: '2' },
+ * { label: 'option 3', value: '3' },
+ * ],
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new StringSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1)
+ * .addOptions({
+ * label: 'Catchy',
+ * value: 'catch',
+ * });
+ * ```
+ */
+ constructor(data) {
+ const { options, ...initData } = data ?? {};
+ super({ ...initData, type: import_v106.ComponentType.StringSelect });
+ this.options = options?.map((option) => new StringSelectMenuOptionBuilder(option)) ?? [];
+ }
+ /**
+ * Adds options to this select menu.
+ *
+ * @param options - The options to add
+ */
+ addOptions(...options) {
+ const normalizedOptions = normalizeArray(options);
+ optionsLengthValidator.parse(this.options.length + normalizedOptions.length);
+ this.options.push(
+ ...normalizedOptions.map(
+ (normalizedOption) => normalizedOption instanceof StringSelectMenuOptionBuilder ? normalizedOption : new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption))
+ )
+ );
+ return this;
+ }
+ /**
+ * Sets the options for this select menu.
+ *
+ * @param options - The options to set
+ */
+ setOptions(...options) {
+ return this.spliceOptions(0, this.options.length, ...options);
+ }
+ /**
+ * Removes, replaces, or inserts options for this select menu.
+ *
+ * @remarks
+ * This method behaves similarly
+ * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}.
+ * It's useful for modifying and adjusting the order of existing options.
+ * @example
+ * Remove the first option:
+ * ```ts
+ * selectMenu.spliceOptions(0, 1);
+ * ```
+ * @example
+ * Remove the first n option:
+ * ```ts
+ * const n = 4;
+ * selectMenu.spliceOptions(0, n);
+ * ```
+ * @example
+ * Remove the last option:
+ * ```ts
+ * selectMenu.spliceOptions(-1, 1);
+ * ```
+ * @param index - The index to start at
+ * @param deleteCount - The number of options to remove
+ * @param options - The replacing option objects or builders
+ */
+ spliceOptions(index, deleteCount, ...options) {
+ const normalizedOptions = normalizeArray(options);
+ const clone = [...this.options];
+ clone.splice(
+ index,
+ deleteCount,
+ ...normalizedOptions.map(
+ (normalizedOption) => normalizedOption instanceof StringSelectMenuOptionBuilder ? normalizedOption : new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption))
+ )
+ );
+ optionsLengthValidator.parse(clone.length);
+ this.options.splice(0, this.options.length, ...clone);
+ return this;
+ }
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON() {
+ validateRequiredSelectMenuParameters(this.options, this.data.custom_id);
+ return {
+ ...this.data,
+ options: this.options.map((option) => option.toJSON())
+ };
+ }
+};
+
+// src/components/selectMenu/UserSelectMenu.ts
+var import_v107 = require("discord-api-types/v10");
+var UserSelectMenuBuilder = class extends BaseSelectMenuBuilder {
+ static {
+ __name(this, "UserSelectMenuBuilder");
+ }
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new UserSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new UserSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data) {
+ super({ ...data, type: import_v107.ComponentType.UserSelect });
+ }
+};
+
+// src/components/textInput/TextInput.ts
+var import_util = require("@discordjs/util");
+var import_v109 = require("discord-api-types/v10");
+var import_fast_deep_equal = __toESM(require("fast-deep-equal"));
+
+// src/components/textInput/Assertions.ts
+var Assertions_exports3 = {};
+__export(Assertions_exports3, {
+ labelValidator: () => labelValidator,
+ maxLengthValidator: () => maxLengthValidator,
+ minLengthValidator: () => minLengthValidator,
+ placeholderValidator: () => placeholderValidator2,
+ requiredValidator: () => requiredValidator,
+ textInputStyleValidator: () => textInputStyleValidator,
+ validateRequiredParameters: () => validateRequiredParameters,
+ valueValidator: () => valueValidator
+});
+var import_shapeshift3 = require("@sapphire/shapeshift");
+var import_v108 = require("discord-api-types/v10");
+var textInputStyleValidator = import_shapeshift3.s.nativeEnum(import_v108.TextInputStyle);
+var minLengthValidator = import_shapeshift3.s.number.int.greaterThanOrEqual(0).lessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled);
+var maxLengthValidator = import_shapeshift3.s.number.int.greaterThanOrEqual(1).lessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled);
+var requiredValidator = import_shapeshift3.s.boolean;
+var valueValidator = import_shapeshift3.s.string.lengthLessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled);
+var placeholderValidator2 = import_shapeshift3.s.string.lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
+var labelValidator = import_shapeshift3.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45).setValidationEnabled(isValidationEnabled);
+function validateRequiredParameters(customId, style, label) {
+ customIdValidator.parse(customId);
+ textInputStyleValidator.parse(style);
+ labelValidator.parse(label);
+}
+__name(validateRequiredParameters, "validateRequiredParameters");
+
+// src/components/textInput/TextInput.ts
+var TextInputBuilder = class extends ComponentBuilder {
+ static {
+ __name(this, "TextInputBuilder");
+ }
+ /**
+ * Creates a new text input from API data.
+ *
+ * @param data - The API data to create this text input with
+ * @example
+ * Creating a select menu option from an API data object:
+ * ```ts
+ * const textInput = new TextInputBuilder({
+ * custom_id: 'a cool select menu',
+ * label: 'Type something',
+ * style: TextInputStyle.Short,
+ * });
+ * ```
+ * @example
+ * Creating a select menu option using setters and API data:
+ * ```ts
+ * const textInput = new TextInputBuilder({
+ * label: 'Type something else',
+ * })
+ * .setCustomId('woah')
+ * .setStyle(TextInputStyle.Paragraph);
+ * ```
+ */
+ constructor(data) {
+ super({ type: import_v109.ComponentType.TextInput, ...data });
+ }
+ /**
+ * Sets the custom id for this text input.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId) {
+ this.data.custom_id = customIdValidator.parse(customId);
+ return this;
+ }
+ /**
+ * Sets the label for this text input.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label) {
+ this.data.label = labelValidator.parse(label);
+ return this;
+ }
+ /**
+ * Sets the style for this text input.
+ *
+ * @param style - The style to use
+ */
+ setStyle(style) {
+ this.data.style = textInputStyleValidator.parse(style);
+ return this;
+ }
+ /**
+ * Sets the minimum length of text for this text input.
+ *
+ * @param minLength - The minimum length of text for this text input
+ */
+ setMinLength(minLength) {
+ this.data.min_length = minLengthValidator.parse(minLength);
+ return this;
+ }
+ /**
+ * Sets the maximum length of text for this text input.
+ *
+ * @param maxLength - The maximum length of text for this text input
+ */
+ setMaxLength(maxLength) {
+ this.data.max_length = maxLengthValidator.parse(maxLength);
+ return this;
+ }
+ /**
+ * Sets the placeholder for this text input.
+ *
+ * @param placeholder - The placeholder to use
+ */
+ setPlaceholder(placeholder) {
+ this.data.placeholder = placeholderValidator2.parse(placeholder);
+ return this;
+ }
+ /**
+ * Sets the value for this text input.
+ *
+ * @param value - The value to use
+ */
+ setValue(value) {
+ this.data.value = valueValidator.parse(value);
+ return this;
+ }
+ /**
+ * Sets whether this text input is required.
+ *
+ * @param required - Whether this text input is required
+ */
+ setRequired(required = true) {
+ this.data.required = requiredValidator.parse(required);
+ return this;
+ }
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON() {
+ validateRequiredParameters(this.data.custom_id, this.data.style, this.data.label);
+ return {
+ ...this.data
+ };
+ }
+ /**
+ * {@inheritDoc Equatable.equals}
+ */
+ equals(other) {
+ if ((0, import_util.isJSONEncodable)(other)) {
+ return (0, import_fast_deep_equal.default)(other.toJSON(), this.data);
+ }
+ return (0, import_fast_deep_equal.default)(other, this.data);
+ }
+};
+
+// src/components/Components.ts
+function createComponentBuilder(data) {
+ if (data instanceof ComponentBuilder) {
+ return data;
+ }
+ switch (data.type) {
+ case import_v1010.ComponentType.ActionRow:
+ return new ActionRowBuilder(data);
+ case import_v1010.ComponentType.Button:
+ return new ButtonBuilder(data);
+ case import_v1010.ComponentType.StringSelect:
+ return new StringSelectMenuBuilder(data);
+ case import_v1010.ComponentType.TextInput:
+ return new TextInputBuilder(data);
+ case import_v1010.ComponentType.UserSelect:
+ return new UserSelectMenuBuilder(data);
+ case import_v1010.ComponentType.RoleSelect:
+ return new RoleSelectMenuBuilder(data);
+ case import_v1010.ComponentType.MentionableSelect:
+ return new MentionableSelectMenuBuilder(data);
+ case import_v1010.ComponentType.ChannelSelect:
+ return new ChannelSelectMenuBuilder(data);
+ default:
+ throw new Error(`Cannot properly serialize component type: ${data.type}`);
+ }
+}
+__name(createComponentBuilder, "createComponentBuilder");
+
+// src/components/ActionRow.ts
+var ActionRowBuilder = class extends ComponentBuilder {
+ static {
+ __name(this, "ActionRowBuilder");
+ }
+ /**
+ * The components within this action row.
+ */
+ components;
+ /**
+ * Creates a new action row from API data.
+ *
+ * @param data - The API data to create this action row with
+ * @example
+ * Creating an action row from an API data object:
+ * ```ts
+ * const actionRow = new ActionRowBuilder({
+ * components: [
+ * {
+ * custom_id: "custom id",
+ * label: "Type something",
+ * style: TextInputStyle.Short,
+ * type: ComponentType.TextInput,
+ * },
+ * ],
+ * });
+ * ```
+ * @example
+ * Creating an action row using setters and API data:
+ * ```ts
+ * const actionRow = new ActionRowBuilder({
+ * components: [
+ * {
+ * custom_id: "custom id",
+ * label: "Click me",
+ * style: ButtonStyle.Primary,
+ * type: ComponentType.Button,
+ * },
+ * ],
+ * })
+ * .addComponents(button2, button3);
+ * ```
+ */
+ constructor({ components, ...data } = {}) {
+ super({ type: import_v1011.ComponentType.ActionRow, ...data });
+ this.components = components?.map((component) => createComponentBuilder(component)) ?? [];
+ }
+ /**
+ * Adds components to this action row.
+ *
+ * @param components - The components to add
+ */
+ addComponents(...components) {
+ this.components.push(...normalizeArray(components));
+ return this;
+ }
+ /**
+ * Sets components for this action row.
+ *
+ * @param components - The components to set
+ */
+ setComponents(...components) {
+ this.components.splice(0, this.components.length, ...normalizeArray(components));
+ return this;
+ }
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON() {
+ return {
+ ...this.data,
+ components: this.components.map((component) => component.toJSON())
+ };
+ }
+};
+
+// src/interactions/modals/Assertions.ts
+var Assertions_exports4 = {};
+__export(Assertions_exports4, {
+ componentsValidator: () => componentsValidator,
+ titleValidator: () => titleValidator,
+ validateRequiredParameters: () => validateRequiredParameters2
+});
+var import_shapeshift4 = require("@sapphire/shapeshift");
+var titleValidator = import_shapeshift4.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45).setValidationEnabled(isValidationEnabled);
+var componentsValidator = import_shapeshift4.s.instance(ActionRowBuilder).array.lengthGreaterThanOrEqual(1).setValidationEnabled(isValidationEnabled);
+function validateRequiredParameters2(customId, title, components) {
+ customIdValidator.parse(customId);
+ titleValidator.parse(title);
+ componentsValidator.parse(components);
+}
+__name(validateRequiredParameters2, "validateRequiredParameters");
+
+// src/interactions/modals/Modal.ts
+var ModalBuilder = class {
+ static {
+ __name(this, "ModalBuilder");
+ }
+ /**
+ * The API data associated with this modal.
+ */
+ data;
+ /**
+ * The components within this modal.
+ */
+ components = [];
+ /**
+ * Creates a new modal from API data.
+ *
+ * @param data - The API data to create this modal with
+ */
+ constructor({ components, ...data } = {}) {
+ this.data = { ...data };
+ this.components = components?.map((component) => createComponentBuilder(component)) ?? [];
+ }
+ /**
+ * Sets the title of this modal.
+ *
+ * @param title - The title to use
+ */
+ setTitle(title) {
+ this.data.title = titleValidator.parse(title);
+ return this;
+ }
+ /**
+ * Sets the custom id of this modal.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId) {
+ this.data.custom_id = customIdValidator.parse(customId);
+ return this;
+ }
+ /**
+ * Adds components to this modal.
+ *
+ * @param components - The components to add
+ */
+ addComponents(...components) {
+ this.components.push(
+ ...normalizeArray(components).map(
+ (component) => component instanceof ActionRowBuilder ? component : new ActionRowBuilder(component)
+ )
+ );
+ return this;
+ }
+ /**
+ * Sets components for this modal.
+ *
+ * @param components - The components to set
+ */
+ setComponents(...components) {
+ this.components.splice(0, this.components.length, ...normalizeArray(components));
+ return this;
+ }
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON() {
+ validateRequiredParameters2(this.data.custom_id, this.data.title, this.components);
+ return {
+ ...this.data,
+ components: this.components.map((component) => component.toJSON())
+ };
+ }
+};
+
+// src/interactions/slashCommands/Assertions.ts
+var Assertions_exports5 = {};
+__export(Assertions_exports5, {
+ assertReturnOfBuilder: () => assertReturnOfBuilder,
+ localizationMapPredicate: () => localizationMapPredicate,
+ validateChoicesLength: () => validateChoicesLength,
+ validateDMPermission: () => validateDMPermission,
+ validateDefaultMemberPermissions: () => validateDefaultMemberPermissions,
+ validateDefaultPermission: () => validateDefaultPermission,
+ validateDescription: () => validateDescription,
+ validateLocale: () => validateLocale,
+ validateLocalizationMap: () => validateLocalizationMap,
+ validateMaxOptionsLength: () => validateMaxOptionsLength,
+ validateNSFW: () => validateNSFW,
+ validateName: () => validateName,
+ validateRequired: () => validateRequired,
+ validateRequiredParameters: () => validateRequiredParameters3
+});
+var import_shapeshift5 = require("@sapphire/shapeshift");
+var import_v1012 = require("discord-api-types/v10");
+var namePredicate = import_shapeshift5.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^[\p{Ll}\p{Lm}\p{Lo}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u).setValidationEnabled(isValidationEnabled);
+function validateName(name) {
+ namePredicate.parse(name);
+}
+__name(validateName, "validateName");
+var descriptionPredicate2 = import_shapeshift5.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
+var localePredicate = import_shapeshift5.s.nativeEnum(import_v1012.Locale);
+function validateDescription(description) {
+ descriptionPredicate2.parse(description);
+}
+__name(validateDescription, "validateDescription");
+var maxArrayLengthPredicate = import_shapeshift5.s.unknown.array.lengthLessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
+function validateLocale(locale) {
+ return localePredicate.parse(locale);
+}
+__name(validateLocale, "validateLocale");
+function validateMaxOptionsLength(options) {
+ maxArrayLengthPredicate.parse(options);
+}
+__name(validateMaxOptionsLength, "validateMaxOptionsLength");
+function validateRequiredParameters3(name, description, options) {
+ validateName(name);
+ validateDescription(description);
+ validateMaxOptionsLength(options);
+}
+__name(validateRequiredParameters3, "validateRequiredParameters");
+var booleanPredicate = import_shapeshift5.s.boolean;
+function validateDefaultPermission(value) {
+ booleanPredicate.parse(value);
+}
+__name(validateDefaultPermission, "validateDefaultPermission");
+function validateRequired(required) {
+ booleanPredicate.parse(required);
+}
+__name(validateRequired, "validateRequired");
+var choicesLengthPredicate = import_shapeshift5.s.number.lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
+function validateChoicesLength(amountAdding, choices) {
+ choicesLengthPredicate.parse((choices?.length ?? 0) + amountAdding);
+}
+__name(validateChoicesLength, "validateChoicesLength");
+function assertReturnOfBuilder(input, ExpectedInstanceOf) {
+ import_shapeshift5.s.instance(ExpectedInstanceOf).parse(input);
+}
+__name(assertReturnOfBuilder, "assertReturnOfBuilder");
+var localizationMapPredicate = import_shapeshift5.s.object(Object.fromEntries(Object.values(import_v1012.Locale).map((locale) => [locale, import_shapeshift5.s.string.nullish]))).strict.nullish.setValidationEnabled(isValidationEnabled);
+function validateLocalizationMap(value) {
+ localizationMapPredicate.parse(value);
+}
+__name(validateLocalizationMap, "validateLocalizationMap");
+var dmPermissionPredicate = import_shapeshift5.s.boolean.nullish;
+function validateDMPermission(value) {
+ dmPermissionPredicate.parse(value);
+}
+__name(validateDMPermission, "validateDMPermission");
+var memberPermissionPredicate = import_shapeshift5.s.union(
+ import_shapeshift5.s.bigint.transform((value) => value.toString()),
+ import_shapeshift5.s.number.safeInt.transform((value) => value.toString()),
+ import_shapeshift5.s.string.regex(/^\d+$/)
+).nullish;
+function validateDefaultMemberPermissions(permissions) {
+ return memberPermissionPredicate.parse(permissions);
+}
+__name(validateDefaultMemberPermissions, "validateDefaultMemberPermissions");
+function validateNSFW(value) {
+ booleanPredicate.parse(value);
+}
+__name(validateNSFW, "validateNSFW");
+
+// src/interactions/slashCommands/SlashCommandBuilder.ts
+var import_ts_mixer6 = require("ts-mixer");
+
+// src/interactions/slashCommands/SlashCommandSubcommands.ts
+var import_v1024 = require("discord-api-types/v10");
+var import_ts_mixer5 = require("ts-mixer");
+
+// src/interactions/slashCommands/mixins/NameAndDescription.ts
+var SharedNameAndDescription = class {
+ static {
+ __name(this, "SharedNameAndDescription");
+ }
+ /**
+ * The name of this command.
+ */
+ name;
+ /**
+ * The name localizations of this command.
+ */
+ name_localizations;
+ /**
+ * The description of this command.
+ */
+ description;
+ /**
+ * The description localizations of this command.
+ */
+ description_localizations;
+ /**
+ * Sets the name of this command.
+ *
+ * @param name - The name to use
+ */
+ setName(name) {
+ validateName(name);
+ Reflect.set(this, "name", name);
+ return this;
+ }
+ /**
+ * Sets the description of this command.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description) {
+ validateDescription(description);
+ Reflect.set(this, "description", description);
+ return this;
+ }
+ /**
+ * Sets a name localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedName - The localized name for the given `locale`
+ */
+ setNameLocalization(locale, localizedName) {
+ if (!this.name_localizations) {
+ Reflect.set(this, "name_localizations", {});
+ }
+ const parsedLocale = validateLocale(locale);
+ if (localizedName === null) {
+ this.name_localizations[parsedLocale] = null;
+ return this;
+ }
+ validateName(localizedName);
+ this.name_localizations[parsedLocale] = localizedName;
+ return this;
+ }
+ /**
+ * Sets the name localizations for this command.
+ *
+ * @param localizedNames - The object of localized names to set
+ */
+ setNameLocalizations(localizedNames) {
+ if (localizedNames === null) {
+ Reflect.set(this, "name_localizations", null);
+ return this;
+ }
+ Reflect.set(this, "name_localizations", {});
+ for (const args of Object.entries(localizedNames)) {
+ this.setNameLocalization(...args);
+ }
+ return this;
+ }
+ /**
+ * Sets a description localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedDescription - The localized description for the given locale
+ */
+ setDescriptionLocalization(locale, localizedDescription) {
+ if (!this.description_localizations) {
+ Reflect.set(this, "description_localizations", {});
+ }
+ const parsedLocale = validateLocale(locale);
+ if (localizedDescription === null) {
+ this.description_localizations[parsedLocale] = null;
+ return this;
+ }
+ validateDescription(localizedDescription);
+ this.description_localizations[parsedLocale] = localizedDescription;
+ return this;
+ }
+ /**
+ * Sets the description localizations for this command.
+ *
+ * @param localizedDescriptions - The object of localized descriptions to set
+ */
+ setDescriptionLocalizations(localizedDescriptions) {
+ if (localizedDescriptions === null) {
+ Reflect.set(this, "description_localizations", null);
+ return this;
+ }
+ Reflect.set(this, "description_localizations", {});
+ for (const args of Object.entries(localizedDescriptions)) {
+ this.setDescriptionLocalization(...args);
+ }
+ return this;
+ }
+};
+
+// src/interactions/slashCommands/options/attachment.ts
+var import_v1013 = require("discord-api-types/v10");
+
+// src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts
+var ApplicationCommandOptionBase = class extends SharedNameAndDescription {
+ static {
+ __name(this, "ApplicationCommandOptionBase");
+ }
+ /**
+ * Whether this option is required.
+ *
+ * @defaultValue `false`
+ */
+ required = false;
+ /**
+ * Sets whether this option is required.
+ *
+ * @param required - Whether this option should be required
+ */
+ setRequired(required) {
+ validateRequired(required);
+ Reflect.set(this, "required", required);
+ return this;
+ }
+ /**
+ * This method runs required validators on this builder.
+ */
+ runRequiredValidations() {
+ validateRequiredParameters3(this.name, this.description, []);
+ validateLocalizationMap(this.name_localizations);
+ validateLocalizationMap(this.description_localizations);
+ validateRequired(this.required);
+ }
+};
+
+// src/interactions/slashCommands/options/attachment.ts
+var SlashCommandAttachmentOption = class extends ApplicationCommandOptionBase {
+ static {
+ __name(this, "SlashCommandAttachmentOption");
+ }
+ /**
+ * The type of this option.
+ */
+ type = import_v1013.ApplicationCommandOptionType.Attachment;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+
+// src/interactions/slashCommands/options/boolean.ts
+var import_v1014 = require("discord-api-types/v10");
+var SlashCommandBooleanOption = class extends ApplicationCommandOptionBase {
+ static {
+ __name(this, "SlashCommandBooleanOption");
+ }
+ /**
+ * The type of this option.
+ */
+ type = import_v1014.ApplicationCommandOptionType.Boolean;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+
+// src/interactions/slashCommands/options/channel.ts
+var import_v1016 = require("discord-api-types/v10");
+var import_ts_mixer = require("ts-mixer");
+
+// src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts
+var import_shapeshift6 = require("@sapphire/shapeshift");
+var import_v1015 = require("discord-api-types/v10");
+var allowedChannelTypes = [
+ import_v1015.ChannelType.GuildText,
+ import_v1015.ChannelType.GuildVoice,
+ import_v1015.ChannelType.GuildCategory,
+ import_v1015.ChannelType.GuildAnnouncement,
+ import_v1015.ChannelType.AnnouncementThread,
+ import_v1015.ChannelType.PublicThread,
+ import_v1015.ChannelType.PrivateThread,
+ import_v1015.ChannelType.GuildStageVoice,
+ import_v1015.ChannelType.GuildForum
+];
+var channelTypesPredicate = import_shapeshift6.s.array(import_shapeshift6.s.union(...allowedChannelTypes.map((type) => import_shapeshift6.s.literal(type))));
+var ApplicationCommandOptionChannelTypesMixin = class {
+ static {
+ __name(this, "ApplicationCommandOptionChannelTypesMixin");
+ }
+ /**
+ * The channel types of this option.
+ */
+ channel_types;
+ /**
+ * Adds channel types to this option.
+ *
+ * @param channelTypes - The channel types
+ */
+ addChannelTypes(...channelTypes) {
+ if (this.channel_types === void 0) {
+ Reflect.set(this, "channel_types", []);
+ }
+ this.channel_types.push(...channelTypesPredicate.parse(channelTypes));
+ return this;
+ }
+};
+
+// src/interactions/slashCommands/options/channel.ts
+var SlashCommandChannelOption = class extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ type = import_v1016.ApplicationCommandOptionType.Channel;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+__name(SlashCommandChannelOption, "SlashCommandChannelOption");
+SlashCommandChannelOption = __decorateClass([
+ (0, import_ts_mixer.mix)(ApplicationCommandOptionChannelTypesMixin)
+], SlashCommandChannelOption);
+
+// src/interactions/slashCommands/options/integer.ts
+var import_shapeshift8 = require("@sapphire/shapeshift");
+var import_v1018 = require("discord-api-types/v10");
+var import_ts_mixer2 = require("ts-mixer");
+
+// src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts
+var ApplicationCommandNumericOptionMinMaxValueMixin = class {
+ static {
+ __name(this, "ApplicationCommandNumericOptionMinMaxValueMixin");
+ }
+ /**
+ * The maximum value of this option.
+ */
+ max_value;
+ /**
+ * The minimum value of this option.
+ */
+ min_value;
+};
+
+// src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts
+var import_shapeshift7 = require("@sapphire/shapeshift");
+var import_v1017 = require("discord-api-types/v10");
+var stringPredicate = import_shapeshift7.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100);
+var numberPredicate = import_shapeshift7.s.number.greaterThan(Number.NEGATIVE_INFINITY).lessThan(Number.POSITIVE_INFINITY);
+var choicesPredicate = import_shapeshift7.s.object({
+ name: stringPredicate,
+ name_localizations: localizationMapPredicate,
+ value: import_shapeshift7.s.union(stringPredicate, numberPredicate)
+}).array;
+var booleanPredicate2 = import_shapeshift7.s.boolean;
+var ApplicationCommandOptionWithChoicesAndAutocompleteMixin = class {
+ static {
+ __name(this, "ApplicationCommandOptionWithChoicesAndAutocompleteMixin");
+ }
+ /**
+ * The choices of this option.
+ */
+ choices;
+ /**
+ * Whether this option utilizes autocomplete.
+ */
+ autocomplete;
+ /**
+ * The type of this option.
+ *
+ * @privateRemarks Since this is present and this is a mixin, this is needed.
+ */
+ type;
+ /**
+ * Adds multiple choices to this option.
+ *
+ * @param choices - The choices to add
+ */
+ addChoices(...choices) {
+ if (choices.length > 0 && this.autocomplete) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ choicesPredicate.parse(choices);
+ if (this.choices === void 0) {
+ Reflect.set(this, "choices", []);
+ }
+ validateChoicesLength(choices.length, this.choices);
+ for (const { name, name_localizations, value } of choices) {
+ if (this.type === import_v1017.ApplicationCommandOptionType.String) {
+ stringPredicate.parse(value);
+ } else {
+ numberPredicate.parse(value);
+ }
+ this.choices.push({ name, name_localizations, value });
+ }
+ return this;
+ }
+ /**
+ * Sets multiple choices for this option.
+ *
+ * @param choices - The choices to set
+ */
+ setChoices(...choices) {
+ if (choices.length > 0 && this.autocomplete) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ choicesPredicate.parse(choices);
+ Reflect.set(this, "choices", []);
+ this.addChoices(...choices);
+ return this;
+ }
+ /**
+ * Whether this option uses autocomplete.
+ *
+ * @param autocomplete - Whether this option should use autocomplete
+ */
+ setAutocomplete(autocomplete) {
+ booleanPredicate2.parse(autocomplete);
+ if (autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ Reflect.set(this, "autocomplete", autocomplete);
+ return this;
+ }
+};
+
+// src/interactions/slashCommands/options/integer.ts
+var numberValidator = import_shapeshift8.s.number.int;
+var SlashCommandIntegerOption = class extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ type = import_v1018.ApplicationCommandOptionType.Integer;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
+ */
+ setMaxValue(max) {
+ numberValidator.parse(max);
+ Reflect.set(this, "max_value", max);
+ return this;
+ }
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}
+ */
+ setMinValue(min) {
+ numberValidator.parse(min);
+ Reflect.set(this, "min_value", min);
+ return this;
+ }
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ return { ...this };
+ }
+};
+__name(SlashCommandIntegerOption, "SlashCommandIntegerOption");
+SlashCommandIntegerOption = __decorateClass([
+ (0, import_ts_mixer2.mix)(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)
+], SlashCommandIntegerOption);
+
+// src/interactions/slashCommands/options/mentionable.ts
+var import_v1019 = require("discord-api-types/v10");
+var SlashCommandMentionableOption = class extends ApplicationCommandOptionBase {
+ static {
+ __name(this, "SlashCommandMentionableOption");
+ }
+ /**
+ * The type of this option.
+ */
+ type = import_v1019.ApplicationCommandOptionType.Mentionable;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+
+// src/interactions/slashCommands/options/number.ts
+var import_shapeshift9 = require("@sapphire/shapeshift");
+var import_v1020 = require("discord-api-types/v10");
+var import_ts_mixer3 = require("ts-mixer");
+var numberValidator2 = import_shapeshift9.s.number;
+var SlashCommandNumberOption = class extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ type = import_v1020.ApplicationCommandOptionType.Number;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
+ */
+ setMaxValue(max) {
+ numberValidator2.parse(max);
+ Reflect.set(this, "max_value", max);
+ return this;
+ }
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}
+ */
+ setMinValue(min) {
+ numberValidator2.parse(min);
+ Reflect.set(this, "min_value", min);
+ return this;
+ }
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ return { ...this };
+ }
+};
+__name(SlashCommandNumberOption, "SlashCommandNumberOption");
+SlashCommandNumberOption = __decorateClass([
+ (0, import_ts_mixer3.mix)(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)
+], SlashCommandNumberOption);
+
+// src/interactions/slashCommands/options/role.ts
+var import_v1021 = require("discord-api-types/v10");
+var SlashCommandRoleOption = class extends ApplicationCommandOptionBase {
+ static {
+ __name(this, "SlashCommandRoleOption");
+ }
+ /**
+ * The type of this option.
+ */
+ type = import_v1021.ApplicationCommandOptionType.Role;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+
+// src/interactions/slashCommands/options/string.ts
+var import_shapeshift10 = require("@sapphire/shapeshift");
+var import_v1022 = require("discord-api-types/v10");
+var import_ts_mixer4 = require("ts-mixer");
+var minLengthValidator2 = import_shapeshift10.s.number.greaterThanOrEqual(0).lessThanOrEqual(6e3);
+var maxLengthValidator2 = import_shapeshift10.s.number.greaterThanOrEqual(1).lessThanOrEqual(6e3);
+var SlashCommandStringOption = class extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ type = import_v1022.ApplicationCommandOptionType.String;
+ /**
+ * The maximum length of this option.
+ */
+ max_length;
+ /**
+ * The minimum length of this option.
+ */
+ min_length;
+ /**
+ * Sets the maximum length of this string option.
+ *
+ * @param max - The maximum length this option can be
+ */
+ setMaxLength(max) {
+ maxLengthValidator2.parse(max);
+ Reflect.set(this, "max_length", max);
+ return this;
+ }
+ /**
+ * Sets the minimum length of this string option.
+ *
+ * @param min - The minimum length this option can be
+ */
+ setMinLength(min) {
+ minLengthValidator2.parse(min);
+ Reflect.set(this, "min_length", min);
+ return this;
+ }
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ return { ...this };
+ }
+};
+__name(SlashCommandStringOption, "SlashCommandStringOption");
+SlashCommandStringOption = __decorateClass([
+ (0, import_ts_mixer4.mix)(ApplicationCommandOptionWithChoicesAndAutocompleteMixin)
+], SlashCommandStringOption);
+
+// src/interactions/slashCommands/options/user.ts
+var import_v1023 = require("discord-api-types/v10");
+var SlashCommandUserOption = class extends ApplicationCommandOptionBase {
+ static {
+ __name(this, "SlashCommandUserOption");
+ }
+ /**
+ * The type of this option.
+ */
+ type = import_v1023.ApplicationCommandOptionType.User;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+
+// src/interactions/slashCommands/mixins/SharedSlashCommandOptions.ts
+var SharedSlashCommandOptions = class {
+ static {
+ __name(this, "SharedSlashCommandOptions");
+ }
+ options;
+ /**
+ * Adds a boolean option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addBooleanOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandBooleanOption);
+ }
+ /**
+ * Adds a user option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addUserOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandUserOption);
+ }
+ /**
+ * Adds a channel option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addChannelOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandChannelOption);
+ }
+ /**
+ * Adds a role option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addRoleOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandRoleOption);
+ }
+ /**
+ * Adds an attachment option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addAttachmentOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandAttachmentOption);
+ }
+ /**
+ * Adds a mentionable option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addMentionableOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandMentionableOption);
+ }
+ /**
+ * Adds a string option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addStringOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandStringOption);
+ }
+ /**
+ * Adds an integer option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addIntegerOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandIntegerOption);
+ }
+ /**
+ * Adds a number option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addNumberOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandNumberOption);
+ }
+ /**
+ * Where the actual adding magic happens. ✨
+ *
+ * @param input - The input. What else?
+ * @param Instance - The instance of whatever is being added
+ * @internal
+ */
+ _sharedAddOptionMethod(input, Instance) {
+ const { options } = this;
+ validateMaxOptionsLength(options);
+ const result = typeof input === "function" ? input(new Instance()) : input;
+ assertReturnOfBuilder(result, Instance);
+ options.push(result);
+ return this;
+ }
+};
+
+// src/interactions/slashCommands/SlashCommandSubcommands.ts
+var SlashCommandSubcommandGroupBuilder = class {
+ /**
+ * The name of this subcommand group.
+ */
+ name = void 0;
+ /**
+ * The description of this subcommand group.
+ */
+ description = void 0;
+ /**
+ * The subcommands within this subcommand group.
+ */
+ options = [];
+ /**
+ * Adds a new subcommand to this group.
+ *
+ * @param input - A function that returns a subcommand builder or an already built builder
+ */
+ addSubcommand(input) {
+ const { options } = this;
+ validateMaxOptionsLength(options);
+ const result = typeof input === "function" ? input(new SlashCommandSubcommandBuilder()) : input;
+ assertReturnOfBuilder(result, SlashCommandSubcommandBuilder);
+ options.push(result);
+ return this;
+ }
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON() {
+ validateRequiredParameters3(this.name, this.description, this.options);
+ return {
+ type: import_v1024.ApplicationCommandOptionType.SubcommandGroup,
+ name: this.name,
+ name_localizations: this.name_localizations,
+ description: this.description,
+ description_localizations: this.description_localizations,
+ options: this.options.map((option) => option.toJSON())
+ };
+ }
+};
+__name(SlashCommandSubcommandGroupBuilder, "SlashCommandSubcommandGroupBuilder");
+SlashCommandSubcommandGroupBuilder = __decorateClass([
+ (0, import_ts_mixer5.mix)(SharedNameAndDescription)
+], SlashCommandSubcommandGroupBuilder);
+var SlashCommandSubcommandBuilder = class {
+ /**
+ * The name of this subcommand.
+ */
+ name = void 0;
+ /**
+ * The description of this subcommand.
+ */
+ description = void 0;
+ /**
+ * The options within this subcommand.
+ */
+ options = [];
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON() {
+ validateRequiredParameters3(this.name, this.description, this.options);
+ return {
+ type: import_v1024.ApplicationCommandOptionType.Subcommand,
+ name: this.name,
+ name_localizations: this.name_localizations,
+ description: this.description,
+ description_localizations: this.description_localizations,
+ options: this.options.map((option) => option.toJSON())
+ };
+ }
+};
+__name(SlashCommandSubcommandBuilder, "SlashCommandSubcommandBuilder");
+SlashCommandSubcommandBuilder = __decorateClass([
+ (0, import_ts_mixer5.mix)(SharedNameAndDescription, SharedSlashCommandOptions)
+], SlashCommandSubcommandBuilder);
+
+// src/interactions/slashCommands/SlashCommandBuilder.ts
+var SlashCommandBuilder = class {
+ /**
+ * The name of this command.
+ */
+ name = void 0;
+ /**
+ * The name localizations of this command.
+ */
+ name_localizations;
+ /**
+ * The description of this command.
+ */
+ description = void 0;
+ /**
+ * The description localizations of this command.
+ */
+ description_localizations;
+ /**
+ * The options of this command.
+ */
+ options = [];
+ /**
+ * Whether this command is enabled by default when the application is added to a guild.
+ *
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ default_permission = void 0;
+ /**
+ * The set of permissions represented as a bit set for the command.
+ */
+ default_member_permissions = void 0;
+ /**
+ * Indicates whether the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This property is only for global commands.
+ */
+ dm_permission = void 0;
+ /**
+ * Whether this command is NSFW.
+ */
+ nsfw = void 0;
+ /**
+ * Sets whether the command is enabled by default when the application is added to a guild.
+ *
+ * @remarks
+ * If set to `false`, you will have to later `PUT` the permissions for this command.
+ * @param value - Whether or not to enable this command by default
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ * @deprecated Use {@link SlashCommandBuilder.setDefaultMemberPermissions} or {@link SlashCommandBuilder.setDMPermission} instead.
+ */
+ setDefaultPermission(value) {
+ validateDefaultPermission(value);
+ Reflect.set(this, "default_permission", value);
+ return this;
+ }
+ /**
+ * Sets the default permissions a member should have in order to run the command.
+ *
+ * @remarks
+ * You can set this to `'0'` to disable the command by default.
+ * @param permissions - The permissions bit field to set
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDefaultMemberPermissions(permissions) {
+ const permissionValue = validateDefaultMemberPermissions(permissions);
+ Reflect.set(this, "default_member_permissions", permissionValue);
+ return this;
+ }
+ /**
+ * Sets if the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This method is only for global commands.
+ * @param enabled - Whether the command should be enabled in direct messages
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDMPermission(enabled) {
+ validateDMPermission(enabled);
+ Reflect.set(this, "dm_permission", enabled);
+ return this;
+ }
+ /**
+ * Sets whether this command is NSFW.
+ *
+ * @param nsfw - Whether this command is NSFW
+ */
+ setNSFW(nsfw = true) {
+ validateNSFW(nsfw);
+ Reflect.set(this, "nsfw", nsfw);
+ return this;
+ }
+ /**
+ * Adds a new subcommand group to this command.
+ *
+ * @param input - A function that returns a subcommand group builder or an already built builder
+ */
+ addSubcommandGroup(input) {
+ const { options } = this;
+ validateMaxOptionsLength(options);
+ const result = typeof input === "function" ? input(new SlashCommandSubcommandGroupBuilder()) : input;
+ assertReturnOfBuilder(result, SlashCommandSubcommandGroupBuilder);
+ options.push(result);
+ return this;
+ }
+ /**
+ * Adds a new subcommand to this command.
+ *
+ * @param input - A function that returns a subcommand builder or an already built builder
+ */
+ addSubcommand(input) {
+ const { options } = this;
+ validateMaxOptionsLength(options);
+ const result = typeof input === "function" ? input(new SlashCommandSubcommandBuilder()) : input;
+ assertReturnOfBuilder(result, SlashCommandSubcommandBuilder);
+ options.push(result);
+ return this;
+ }
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON() {
+ validateRequiredParameters3(this.name, this.description, this.options);
+ validateLocalizationMap(this.name_localizations);
+ validateLocalizationMap(this.description_localizations);
+ return {
+ ...this,
+ options: this.options.map((option) => option.toJSON())
+ };
+ }
+};
+__name(SlashCommandBuilder, "SlashCommandBuilder");
+SlashCommandBuilder = __decorateClass([
+ (0, import_ts_mixer6.mix)(SharedSlashCommandOptions, SharedNameAndDescription)
+], SlashCommandBuilder);
+
+// src/interactions/contextMenuCommands/Assertions.ts
+var Assertions_exports6 = {};
+__export(Assertions_exports6, {
+ validateDMPermission: () => validateDMPermission2,
+ validateDefaultMemberPermissions: () => validateDefaultMemberPermissions2,
+ validateDefaultPermission: () => validateDefaultPermission2,
+ validateName: () => validateName2,
+ validateRequiredParameters: () => validateRequiredParameters4,
+ validateType: () => validateType
+});
+var import_shapeshift11 = require("@sapphire/shapeshift");
+var import_v1025 = require("discord-api-types/v10");
+var namePredicate2 = import_shapeshift11.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^( *[\p{P}\p{L}\p{N}\p{sc=Devanagari}\p{sc=Thai}]+ *)+$/u).setValidationEnabled(isValidationEnabled);
+var typePredicate = import_shapeshift11.s.union(import_shapeshift11.s.literal(import_v1025.ApplicationCommandType.User), import_shapeshift11.s.literal(import_v1025.ApplicationCommandType.Message)).setValidationEnabled(isValidationEnabled);
+var booleanPredicate3 = import_shapeshift11.s.boolean;
+function validateDefaultPermission2(value) {
+ booleanPredicate3.parse(value);
+}
+__name(validateDefaultPermission2, "validateDefaultPermission");
+function validateName2(name) {
+ namePredicate2.parse(name);
+}
+__name(validateName2, "validateName");
+function validateType(type) {
+ typePredicate.parse(type);
+}
+__name(validateType, "validateType");
+function validateRequiredParameters4(name, type) {
+ validateName2(name);
+ validateType(type);
+}
+__name(validateRequiredParameters4, "validateRequiredParameters");
+var dmPermissionPredicate2 = import_shapeshift11.s.boolean.nullish;
+function validateDMPermission2(value) {
+ dmPermissionPredicate2.parse(value);
+}
+__name(validateDMPermission2, "validateDMPermission");
+var memberPermissionPredicate2 = import_shapeshift11.s.union(
+ import_shapeshift11.s.bigint.transform((value) => value.toString()),
+ import_shapeshift11.s.number.safeInt.transform((value) => value.toString()),
+ import_shapeshift11.s.string.regex(/^\d+$/)
+).nullish;
+function validateDefaultMemberPermissions2(permissions) {
+ return memberPermissionPredicate2.parse(permissions);
+}
+__name(validateDefaultMemberPermissions2, "validateDefaultMemberPermissions");
+
+// src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts
+var ContextMenuCommandBuilder = class {
+ static {
+ __name(this, "ContextMenuCommandBuilder");
+ }
+ /**
+ * The name of this command.
+ */
+ name = void 0;
+ /**
+ * The name localizations of this command.
+ */
+ name_localizations;
+ /**
+ * The type of this command.
+ */
+ type = void 0;
+ /**
+ * Whether this command is enabled by default when the application is added to a guild.
+ *
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ default_permission = void 0;
+ /**
+ * The set of permissions represented as a bit set for the command.
+ */
+ default_member_permissions = void 0;
+ /**
+ * Indicates whether the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This property is only for global commands.
+ */
+ dm_permission = void 0;
+ /**
+ * Sets the name of this command.
+ *
+ * @param name - The name to use
+ */
+ setName(name) {
+ validateName2(name);
+ Reflect.set(this, "name", name);
+ return this;
+ }
+ /**
+ * Sets the type of this command.
+ *
+ * @param type - The type to use
+ */
+ setType(type) {
+ validateType(type);
+ Reflect.set(this, "type", type);
+ return this;
+ }
+ /**
+ * Sets whether the command is enabled by default when the application is added to a guild.
+ *
+ * @remarks
+ * If set to `false`, you will have to later `PUT` the permissions for this command.
+ * @param value - Whether to enable this command by default
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ setDefaultPermission(value) {
+ validateDefaultPermission2(value);
+ Reflect.set(this, "default_permission", value);
+ return this;
+ }
+ /**
+ * Sets the default permissions a member should have in order to run this command.
+ *
+ * @remarks
+ * You can set this to `'0'` to disable the command by default.
+ * @param permissions - The permissions bit field to set
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDefaultMemberPermissions(permissions) {
+ const permissionValue = validateDefaultMemberPermissions2(permissions);
+ Reflect.set(this, "default_member_permissions", permissionValue);
+ return this;
+ }
+ /**
+ * Sets if the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This method is only for global commands.
+ * @param enabled - Whether the command should be enabled in direct messages
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDMPermission(enabled) {
+ validateDMPermission2(enabled);
+ Reflect.set(this, "dm_permission", enabled);
+ return this;
+ }
+ /**
+ * Sets a name localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedName - The localized name for the given `locale`
+ */
+ setNameLocalization(locale, localizedName) {
+ if (!this.name_localizations) {
+ Reflect.set(this, "name_localizations", {});
+ }
+ const parsedLocale = validateLocale(locale);
+ if (localizedName === null) {
+ this.name_localizations[parsedLocale] = null;
+ return this;
+ }
+ validateName2(localizedName);
+ this.name_localizations[parsedLocale] = localizedName;
+ return this;
+ }
+ /**
+ * Sets the name localizations for this command.
+ *
+ * @param localizedNames - The object of localized names to set
+ */
+ setNameLocalizations(localizedNames) {
+ if (localizedNames === null) {
+ Reflect.set(this, "name_localizations", null);
+ return this;
+ }
+ Reflect.set(this, "name_localizations", {});
+ for (const args of Object.entries(localizedNames))
+ this.setNameLocalization(...args);
+ return this;
+ }
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON() {
+ validateRequiredParameters4(this.name, this.type);
+ validateLocalizationMap(this.name_localizations);
+ return { ...this };
+ }
+};
+
+// src/util/componentUtil.ts
+function embedLength(data) {
+ return (data.title?.length ?? 0) + (data.description?.length ?? 0) + (data.fields?.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) ?? 0) + (data.footer?.text.length ?? 0) + (data.author?.name.length ?? 0);
+}
+__name(embedLength, "embedLength");
+
+// src/index.ts
+var version = "1.6.5";
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ ActionRowBuilder,
+ ApplicationCommandNumericOptionMinMaxValueMixin,
+ ApplicationCommandOptionBase,
+ ApplicationCommandOptionChannelTypesMixin,
+ ApplicationCommandOptionWithChoicesAndAutocompleteMixin,
+ BaseSelectMenuBuilder,
+ ButtonBuilder,
+ ChannelSelectMenuBuilder,
+ ComponentAssertions,
+ ComponentBuilder,
+ ContextMenuCommandAssertions,
+ ContextMenuCommandBuilder,
+ EmbedAssertions,
+ EmbedBuilder,
+ MentionableSelectMenuBuilder,
+ ModalAssertions,
+ ModalBuilder,
+ RoleSelectMenuBuilder,
+ SelectMenuBuilder,
+ SelectMenuOptionBuilder,
+ SharedNameAndDescription,
+ SharedSlashCommandOptions,
+ SlashCommandAssertions,
+ SlashCommandAttachmentOption,
+ SlashCommandBooleanOption,
+ SlashCommandBuilder,
+ SlashCommandChannelOption,
+ SlashCommandIntegerOption,
+ SlashCommandMentionableOption,
+ SlashCommandNumberOption,
+ SlashCommandRoleOption,
+ SlashCommandStringOption,
+ SlashCommandSubcommandBuilder,
+ SlashCommandSubcommandGroupBuilder,
+ SlashCommandUserOption,
+ StringSelectMenuBuilder,
+ StringSelectMenuOptionBuilder,
+ TextInputAssertions,
+ TextInputBuilder,
+ UserSelectMenuBuilder,
+ createComponentBuilder,
+ disableValidators,
+ embedLength,
+ enableValidators,
+ isValidationEnabled,
+ normalizeArray,
+ version,
+ ...require("@discordjs/formatters")
+});
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/@discordjs/builders/dist/index.js.map b/node_modules/@discordjs/builders/dist/index.js.map
new file mode 100644
index 0000000..53cf1bf
--- /dev/null
+++ b/node_modules/@discordjs/builders/dist/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/index.ts","../src/messages/embed/Assertions.ts","../src/util/validation.ts","../src/util/normalizeArray.ts","../src/messages/embed/Embed.ts","../src/components/Assertions.ts","../src/components/selectMenu/StringSelectMenuOption.ts","../src/components/ActionRow.ts","../src/components/Component.ts","../src/components/Components.ts","../src/components/button/Button.ts","../src/components/selectMenu/ChannelSelectMenu.ts","../src/components/selectMenu/BaseSelectMenu.ts","../src/components/selectMenu/MentionableSelectMenu.ts","../src/components/selectMenu/RoleSelectMenu.ts","../src/components/selectMenu/StringSelectMenu.ts","../src/components/selectMenu/UserSelectMenu.ts","../src/components/textInput/TextInput.ts","../src/components/textInput/Assertions.ts","../src/interactions/modals/Assertions.ts","../src/interactions/modals/Modal.ts","../src/interactions/slashCommands/Assertions.ts","../src/interactions/slashCommands/SlashCommandBuilder.ts","../src/interactions/slashCommands/SlashCommandSubcommands.ts","../src/interactions/slashCommands/mixins/NameAndDescription.ts","../src/interactions/slashCommands/options/attachment.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts","../src/interactions/slashCommands/options/boolean.ts","../src/interactions/slashCommands/options/channel.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts","../src/interactions/slashCommands/options/integer.ts","../src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts","../src/interactions/slashCommands/options/mentionable.ts","../src/interactions/slashCommands/options/number.ts","../src/interactions/slashCommands/options/role.ts","../src/interactions/slashCommands/options/string.ts","../src/interactions/slashCommands/options/user.ts","../src/interactions/slashCommands/mixins/SharedSlashCommandOptions.ts","../src/interactions/contextMenuCommands/Assertions.ts","../src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts","../src/util/componentUtil.ts"],"sourcesContent":["export * as EmbedAssertions from './messages/embed/Assertions.js';\nexport * from './messages/embed/Embed.js';\n// TODO: Consider removing this dep in the next major version\nexport * from '@discordjs/formatters';\n\nexport * as ComponentAssertions from './components/Assertions.js';\nexport * from './components/ActionRow.js';\nexport * from './components/button/Button.js';\nexport * from './components/Component.js';\nexport * from './components/Components.js';\nexport * from './components/textInput/TextInput.js';\nexport * as TextInputAssertions from './components/textInput/Assertions.js';\nexport * from './interactions/modals/Modal.js';\nexport * as ModalAssertions from './interactions/modals/Assertions.js';\n\nexport * from './components/selectMenu/BaseSelectMenu.js';\nexport * from './components/selectMenu/ChannelSelectMenu.js';\nexport * from './components/selectMenu/MentionableSelectMenu.js';\nexport * from './components/selectMenu/RoleSelectMenu.js';\nexport * from './components/selectMenu/StringSelectMenu.js';\n// TODO: Remove those aliases in v2\nexport {\n\t/**\n\t * @deprecated Will be removed in the next major version, use {@link StringSelectMenuBuilder} instead.\n\t */\n\tStringSelectMenuBuilder as SelectMenuBuilder,\n} from './components/selectMenu/StringSelectMenu.js';\nexport {\n\t/**\n\t * @deprecated Will be removed in the next major version, use {@link StringSelectMenuOptionBuilder} instead.\n\t */\n\tStringSelectMenuOptionBuilder as SelectMenuOptionBuilder,\n} from './components/selectMenu/StringSelectMenuOption.js';\nexport * from './components/selectMenu/StringSelectMenuOption.js';\nexport * from './components/selectMenu/UserSelectMenu.js';\n\nexport * as SlashCommandAssertions from './interactions/slashCommands/Assertions.js';\nexport * from './interactions/slashCommands/SlashCommandBuilder.js';\nexport * from './interactions/slashCommands/SlashCommandSubcommands.js';\nexport * from './interactions/slashCommands/options/boolean.js';\nexport * from './interactions/slashCommands/options/channel.js';\nexport * from './interactions/slashCommands/options/integer.js';\nexport * from './interactions/slashCommands/options/mentionable.js';\nexport * from './interactions/slashCommands/options/number.js';\nexport * from './interactions/slashCommands/options/role.js';\nexport * from './interactions/slashCommands/options/attachment.js';\nexport * from './interactions/slashCommands/options/string.js';\nexport * from './interactions/slashCommands/options/user.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionBase.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.js';\nexport * from './interactions/slashCommands/mixins/NameAndDescription.js';\nexport * from './interactions/slashCommands/mixins/SharedSlashCommandOptions.js';\n\nexport * as ContextMenuCommandAssertions from './interactions/contextMenuCommands/Assertions.js';\nexport * from './interactions/contextMenuCommands/ContextMenuCommandBuilder.js';\n\nexport * from './util/componentUtil.js';\nexport * from './util/normalizeArray.js';\nexport * from './util/validation.js';\n\n/**\n * The {@link https://github.com/discordjs/discord.js/blob/main/packages/builders#readme | @discordjs/builders} version\n * that you are currently using.\n *\n * @privateRemarks This needs to explicitly be `string` so it is not typed as a \"const string\" that gets injected by esbuild.\n */\nexport const version = '1.6.5' as string;\n","import { s } from '@sapphire/shapeshift';\nimport type { APIEmbedField } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../../util/validation.js';\n\nexport const fieldNamePredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(256)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const fieldValuePredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(1_024)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const fieldInlinePredicate = s.boolean.optional;\n\nexport const embedFieldPredicate = s\n\t.object({\n\t\tname: fieldNamePredicate,\n\t\tvalue: fieldValuePredicate,\n\t\tinline: fieldInlinePredicate,\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const embedFieldsArrayPredicate = embedFieldPredicate.array.setValidationEnabled(isValidationEnabled);\n\nexport const fieldLengthPredicate = s.number.lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);\n\nexport function validateFieldLength(amountAdding: number, fields?: APIEmbedField[]): void {\n\tfieldLengthPredicate.parse((fields?.length ?? 0) + amountAdding);\n}\n\nexport const authorNamePredicate = fieldNamePredicate.nullable.setValidationEnabled(isValidationEnabled);\n\nexport const imageURLPredicate = s.string\n\t.url({\n\t\tallowedProtocols: ['http:', 'https:', 'attachment:'],\n\t})\n\t.nullish.setValidationEnabled(isValidationEnabled);\n\nexport const urlPredicate = s.string\n\t.url({\n\t\tallowedProtocols: ['http:', 'https:'],\n\t})\n\t.nullish.setValidationEnabled(isValidationEnabled);\n\nexport const embedAuthorPredicate = s\n\t.object({\n\t\tname: authorNamePredicate,\n\t\ticonURL: imageURLPredicate,\n\t\turl: urlPredicate,\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const RGBPredicate = s.number.int\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(255)\n\t.setValidationEnabled(isValidationEnabled);\nexport const colorPredicate = s.number.int\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(0xffffff)\n\t.or(s.tuple([RGBPredicate, RGBPredicate, RGBPredicate]))\n\t.nullable.setValidationEnabled(isValidationEnabled);\n\nexport const descriptionPredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(4_096)\n\t.nullable.setValidationEnabled(isValidationEnabled);\n\nexport const footerTextPredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(2_048)\n\t.nullable.setValidationEnabled(isValidationEnabled);\n\nexport const embedFooterPredicate = s\n\t.object({\n\t\ttext: footerTextPredicate,\n\t\ticonURL: imageURLPredicate,\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const timestampPredicate = s.union(s.number, s.date).nullable.setValidationEnabled(isValidationEnabled);\n\nexport const titlePredicate = fieldNamePredicate.nullable.setValidationEnabled(isValidationEnabled);\n","let validate = true;\n\n/**\n * Enables validators.\n *\n * @returns Whether validation is occurring.\n */\nexport function enableValidators() {\n\treturn (validate = true);\n}\n\n/**\n * Disables validators.\n *\n * @returns Whether validation is occurring.\n */\nexport function disableValidators() {\n\treturn (validate = false);\n}\n\n/**\n * Checks whether validation is occurring.\n */\nexport function isValidationEnabled() {\n\treturn validate;\n}\n","/**\n * Normalizes data that is a rest parameter or an array into an array with a depth of 1.\n *\n * @typeParam T - The data that must satisfy {@link RestOrArray}.\n * @param arr - The (possibly variadic) data to normalize\n */\nexport function normalizeArray<T>(arr: RestOrArray<T>): T[] {\n\tif (Array.isArray(arr[0])) return arr[0];\n\treturn arr as T[];\n}\n\n/**\n * Represents data that may be an array or came from a rest parameter.\n *\n * @remarks\n * This type is used throughout builders to ensure both an array and variadic arguments\n * may be used. It is normalized with {@link normalizeArray}.\n */\nexport type RestOrArray<T> = T[] | [T[]];\n","import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage } from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js';\nimport {\n\tcolorPredicate,\n\tdescriptionPredicate,\n\tembedAuthorPredicate,\n\tembedFieldsArrayPredicate,\n\tembedFooterPredicate,\n\timageURLPredicate,\n\ttimestampPredicate,\n\ttitlePredicate,\n\turlPredicate,\n\tvalidateFieldLength,\n} from './Assertions.js';\n\n/**\n * A tuple satisfying the RGB color model.\n *\n * @see {@link https://developer.mozilla.org/docs/Glossary/RGB}\n */\nexport type RGBTuple = [red: number, green: number, blue: number];\n\n/**\n * The base icon data typically used in payloads.\n */\nexport interface IconData {\n\t/**\n\t * The URL of the icon.\n\t */\n\ticonURL?: string;\n\t/**\n\t * The proxy URL of the icon.\n\t */\n\tproxyIconURL?: string;\n}\n\n/**\n * Represents the author data of an embed.\n */\nexport type EmbedAuthorData = IconData & Omit<APIEmbedAuthor, 'icon_url' | 'proxy_icon_url'>;\n\n/**\n * Represents the author options of an embed.\n */\nexport type EmbedAuthorOptions = Omit<EmbedAuthorData, 'proxyIconURL'>;\n\n/**\n * Represents the footer data of an embed.\n */\nexport type EmbedFooterData = IconData & Omit<APIEmbedFooter, 'icon_url' | 'proxy_icon_url'>;\n\n/**\n * Represents the footer options of an embed.\n */\nexport type EmbedFooterOptions = Omit<EmbedFooterData, 'proxyIconURL'>;\n\n/**\n * Represents the image data of an embed.\n */\nexport interface EmbedImageData extends Omit<APIEmbedImage, 'proxy_url'> {\n\t/**\n\t * The proxy URL for the image.\n\t */\n\tproxyURL?: string;\n}\n\n/**\n * A builder that creates API-compatible JSON data for embeds.\n */\nexport class EmbedBuilder {\n\t/**\n\t * The API data associated with this embed.\n\t */\n\tpublic readonly data: APIEmbed;\n\n\t/**\n\t * Creates a new embed from API data.\n\t *\n\t * @param data - The API data to create this embed with\n\t */\n\tpublic constructor(data: APIEmbed = {}) {\n\t\tthis.data = { ...data };\n\t\tif (data.timestamp) this.data.timestamp = new Date(data.timestamp).toISOString();\n\t}\n\n\t/**\n\t * Appends fields to the embed.\n\t *\n\t * @remarks\n\t * This method accepts either an array of fields or a variable number of field parameters.\n\t * The maximum amount of fields that can be added is 25.\n\t * @example\n\t * Using an array:\n\t * ```ts\n\t * const fields: APIEmbedField[] = ...;\n\t * const embed = new EmbedBuilder()\n\t * \t.addFields(fields);\n\t * ```\n\t * @example\n\t * Using rest parameters (variadic):\n\t * ```ts\n\t * const embed = new EmbedBuilder()\n\t * \t.addFields(\n\t * \t\t{ name: 'Field 1', value: 'Value 1' },\n\t * \t\t{ name: 'Field 2', value: 'Value 2' },\n\t * \t);\n\t * ```\n\t * @param fields - The fields to add\n\t */\n\tpublic addFields(...fields: RestOrArray<APIEmbedField>): this {\n\t\tconst normalizedFields = normalizeArray(fields);\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(normalizedFields.length, this.data.fields);\n\n\t\t// Data assertions\n\t\tembedFieldsArrayPredicate.parse(normalizedFields);\n\n\t\tif (this.data.fields) this.data.fields.push(...normalizedFields);\n\t\telse this.data.fields = normalizedFields;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes, replaces, or inserts fields for this embed.\n\t *\n\t * @remarks\n\t * This method behaves similarly\n\t * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.\n\t * The maximum amount of fields that can be added is 25.\n\t *\n\t * It's useful for modifying and adjusting order of the already-existing fields of an embed.\n\t * @example\n\t * Remove the first field:\n\t * ```ts\n\t * embed.spliceFields(0, 1);\n\t * ```\n\t * @example\n\t * Remove the first n fields:\n\t * ```ts\n\t * const n = 4;\n\t * embed.spliceFields(0, n);\n\t * ```\n\t * @example\n\t * Remove the last field:\n\t * ```ts\n\t * embed.spliceFields(-1, 1);\n\t * ```\n\t * @param index - The index to start at\n\t * @param deleteCount - The number of fields to remove\n\t * @param fields - The replacing field objects\n\t */\n\tpublic spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this {\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(fields.length - deleteCount, this.data.fields);\n\n\t\t// Data assertions\n\t\tembedFieldsArrayPredicate.parse(fields);\n\t\tif (this.data.fields) this.data.fields.splice(index, deleteCount, ...fields);\n\t\telse this.data.fields = fields;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the fields for this embed.\n\t *\n\t * @remarks\n\t * This method is an alias for {@link EmbedBuilder.spliceFields}. More specifically,\n\t * it splices the entire array of fields, replacing them with the provided fields.\n\t *\n\t * You can set a maximum of 25 fields.\n\t * @param fields - The fields to set\n\t */\n\tpublic setFields(...fields: RestOrArray<APIEmbedField>) {\n\t\tthis.spliceFields(0, this.data.fields?.length ?? 0, ...normalizeArray(fields));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the author of this embed.\n\t *\n\t * @param options - The options to use\n\t */\n\n\tpublic setAuthor(options: EmbedAuthorOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.data.author = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\t// Data assertions\n\t\tembedAuthorPredicate.parse(options);\n\n\t\tthis.data.author = { name: options.name, url: options.url, icon_url: options.iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the color of this embed.\n\t *\n\t * @param color - The color to use\n\t */\n\tpublic setColor(color: RGBTuple | number | null): this {\n\t\t// Data assertions\n\t\tcolorPredicate.parse(color);\n\n\t\tif (Array.isArray(color)) {\n\t\t\tconst [red, green, blue] = color;\n\t\t\tthis.data.color = (red << 16) + (green << 8) + blue;\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.data.color = color ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this embed.\n\t *\n\t * @param description - The description to use\n\t */\n\tpublic setDescription(description: string | null): this {\n\t\t// Data assertions\n\t\tdescriptionPredicate.parse(description);\n\n\t\tthis.data.description = description ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the footer of this embed.\n\t *\n\t * @param options - The footer to use\n\t */\n\tpublic setFooter(options: EmbedFooterOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.data.footer = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\t// Data assertions\n\t\tembedFooterPredicate.parse(options);\n\n\t\tthis.data.footer = { text: options.text, icon_url: options.iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the image of this embed.\n\t *\n\t * @param url - The image URL to use\n\t */\n\tpublic setImage(url: string | null): this {\n\t\t// Data assertions\n\t\timageURLPredicate.parse(url);\n\n\t\tthis.data.image = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the thumbnail of this embed.\n\t *\n\t * @param url - The thumbnail URL to use\n\t */\n\tpublic setThumbnail(url: string | null): this {\n\t\t// Data assertions\n\t\timageURLPredicate.parse(url);\n\n\t\tthis.data.thumbnail = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the timestamp of this embed.\n\t *\n\t * @param timestamp - The timestamp or date to use\n\t */\n\tpublic setTimestamp(timestamp: Date | number | null = Date.now()): this {\n\t\t// Data assertions\n\t\ttimestampPredicate.parse(timestamp);\n\n\t\tthis.data.timestamp = timestamp ? new Date(timestamp).toISOString() : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the title for this embed.\n\t *\n\t * @param title - The title to use\n\t */\n\tpublic setTitle(title: string | null): this {\n\t\t// Data assertions\n\t\ttitlePredicate.parse(title);\n\n\t\tthis.data.title = title ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL of this embed.\n\t *\n\t * @param url - The URL to use\n\t */\n\tpublic setURL(url: string | null): this {\n\t\t// Data assertions\n\t\turlPredicate.parse(url);\n\n\t\tthis.data.url = url ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): APIEmbed {\n\t\treturn { ...this.data };\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ButtonStyle, ChannelType, type APIMessageComponentEmoji } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../util/validation.js';\nimport { StringSelectMenuOptionBuilder } from './selectMenu/StringSelectMenuOption.js';\n\nexport const customIdValidator = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(100)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const emojiValidator = s\n\t.object({\n\t\tid: s.string,\n\t\tname: s.string,\n\t\tanimated: s.boolean,\n\t})\n\t.partial.strict.setValidationEnabled(isValidationEnabled);\n\nexport const disabledValidator = s.boolean;\n\nexport const buttonLabelValidator = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(80)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const buttonStyleValidator = s.nativeEnum(ButtonStyle);\n\nexport const placeholderValidator = s.string.lengthLessThanOrEqual(150).setValidationEnabled(isValidationEnabled);\nexport const minMaxValidator = s.number.int\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(25)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const labelValueDescriptionValidator = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(100)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const jsonOptionValidator = s\n\t.object({\n\t\tlabel: labelValueDescriptionValidator,\n\t\tvalue: labelValueDescriptionValidator,\n\t\tdescription: labelValueDescriptionValidator.optional,\n\t\temoji: emojiValidator.optional,\n\t\tdefault: s.boolean.optional,\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const optionValidator = s.instance(StringSelectMenuOptionBuilder).setValidationEnabled(isValidationEnabled);\n\nexport const optionsValidator = optionValidator.array\n\t.lengthGreaterThanOrEqual(0)\n\t.setValidationEnabled(isValidationEnabled);\nexport const optionsLengthValidator = s.number.int\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(25)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateRequiredSelectMenuParameters(options: StringSelectMenuOptionBuilder[], customId?: string) {\n\tcustomIdValidator.parse(customId);\n\toptionsValidator.parse(options);\n}\n\nexport const defaultValidator = s.boolean;\n\nexport function validateRequiredSelectMenuOptionParameters(label?: string, value?: string) {\n\tlabelValueDescriptionValidator.parse(label);\n\tlabelValueDescriptionValidator.parse(value);\n}\n\nexport const channelTypesValidator = s.nativeEnum(ChannelType).array.setValidationEnabled(isValidationEnabled);\n\nexport const urlValidator = s.string\n\t.url({\n\t\tallowedProtocols: ['http:', 'https:', 'discord:'],\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateRequiredButtonParameters(\n\tstyle?: ButtonStyle,\n\tlabel?: string,\n\temoji?: APIMessageComponentEmoji,\n\tcustomId?: string,\n\turl?: string,\n) {\n\tif (url && customId) {\n\t\tthrow new RangeError('URL and custom id are mutually exclusive');\n\t}\n\n\tif (!label && !emoji) {\n\t\tthrow new RangeError('Buttons must have a label and/or an emoji');\n\t}\n\n\tif (style === ButtonStyle.Link) {\n\t\tif (!url) {\n\t\t\tthrow new RangeError('Link buttons must have a url');\n\t\t}\n\t} else if (url) {\n\t\tthrow new RangeError('Non-link buttons cannot have a url');\n\t}\n}\n","import type { JSONEncodable } from '@discordjs/util';\nimport type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v10';\nimport {\n\tdefaultValidator,\n\temojiValidator,\n\tlabelValueDescriptionValidator,\n\tvalidateRequiredSelectMenuOptionParameters,\n} from '../Assertions.js';\n\n/**\n * A builder that creates API-compatible JSON data for string select menu options.\n */\nexport class StringSelectMenuOptionBuilder implements JSONEncodable<APISelectMenuOption> {\n\t/**\n\t * Creates a new string select menu option from API data.\n\t *\n\t * @param data - The API data to create this string select menu option with\n\t * @example\n\t * Creating a string select menu option from an API data object:\n\t * ```ts\n\t * const selectMenuOption = new SelectMenuOptionBuilder({\n\t * \tlabel: 'catchy label',\n\t * \tvalue: '1',\n\t * });\n\t * ```\n\t * @example\n\t * Creating a string select menu option using setters and API data:\n\t * ```ts\n\t * const selectMenuOption = new SelectMenuOptionBuilder({\n\t * \tdefault: true,\n\t * \tvalue: '1',\n\t * })\n\t * \t.setLabel('woah');\n\t * ```\n\t */\n\tpublic constructor(public data: Partial<APISelectMenuOption> = {}) {}\n\n\t/**\n\t * Sets the label for this option.\n\t *\n\t * @param label - The label to use\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = labelValueDescriptionValidator.parse(label);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the value for this option.\n\t *\n\t * @param value - The value to use\n\t */\n\tpublic setValue(value: string) {\n\t\tthis.data.value = labelValueDescriptionValidator.parse(value);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description for this option.\n\t *\n\t * @param description - The description to use\n\t */\n\tpublic setDescription(description: string) {\n\t\tthis.data.description = labelValueDescriptionValidator.parse(description);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this option is selected by default.\n\t *\n\t * @param isDefault - Whether this option is selected by default\n\t */\n\tpublic setDefault(isDefault = true) {\n\t\tthis.data.default = defaultValidator.parse(isDefault);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the emoji to display for this option.\n\t *\n\t * @param emoji - The emoji to use\n\t */\n\tpublic setEmoji(emoji: APIMessageComponentEmoji) {\n\t\tthis.data.emoji = emojiValidator.parse(emoji);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc BaseSelectMenuBuilder.toJSON}\n\t */\n\tpublic toJSON(): APISelectMenuOption {\n\t\tvalidateRequiredSelectMenuOptionParameters(this.data.label, this.data.value);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APISelectMenuOption;\n\t}\n}\n","/* eslint-disable jsdoc/check-param-names */\n\nimport {\n\ttype APIActionRowComponent,\n\tComponentType,\n\ttype APIMessageActionRowComponent,\n\ttype APIModalActionRowComponent,\n\ttype APIActionRowComponentTypes,\n} from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../util/normalizeArray.js';\nimport { ComponentBuilder } from './Component.js';\nimport { createComponentBuilder } from './Components.js';\nimport type { ButtonBuilder } from './button/Button.js';\nimport type { ChannelSelectMenuBuilder } from './selectMenu/ChannelSelectMenu.js';\nimport type { MentionableSelectMenuBuilder } from './selectMenu/MentionableSelectMenu.js';\nimport type { RoleSelectMenuBuilder } from './selectMenu/RoleSelectMenu.js';\nimport type { StringSelectMenuBuilder } from './selectMenu/StringSelectMenu.js';\nimport type { UserSelectMenuBuilder } from './selectMenu/UserSelectMenu.js';\nimport type { TextInputBuilder } from './textInput/TextInput.js';\n\n/**\n * The builders that may be used for messages.\n */\nexport type MessageComponentBuilder =\n\t| ActionRowBuilder<MessageActionRowComponentBuilder>\n\t| MessageActionRowComponentBuilder;\n\n/**\n * The builders that may be used for modals.\n */\nexport type ModalComponentBuilder = ActionRowBuilder<ModalActionRowComponentBuilder> | ModalActionRowComponentBuilder;\n\n/**\n * The builders that may be used within an action row for messages.\n */\nexport type MessageActionRowComponentBuilder =\n\t| ButtonBuilder\n\t| ChannelSelectMenuBuilder\n\t| MentionableSelectMenuBuilder\n\t| RoleSelectMenuBuilder\n\t| StringSelectMenuBuilder\n\t| UserSelectMenuBuilder;\n\n/**\n * The builders that may be used within an action row for modals.\n */\nexport type ModalActionRowComponentBuilder = TextInputBuilder;\n\n/**\n * Any builder.\n */\nexport type AnyComponentBuilder = MessageActionRowComponentBuilder | ModalActionRowComponentBuilder;\n\n/**\n * A builder that creates API-compatible JSON data for action rows.\n *\n * @typeParam T - The types of components this action row holds\n */\nexport class ActionRowBuilder<T extends AnyComponentBuilder> extends ComponentBuilder<\n\tAPIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>\n> {\n\t/**\n\t * The components within this action row.\n\t */\n\tpublic readonly components: T[];\n\n\t/**\n\t * Creates a new action row from API data.\n\t *\n\t * @param data - The API data to create this action row with\n\t * @example\n\t * Creating an action row from an API data object:\n\t * ```ts\n\t * const actionRow = new ActionRowBuilder({\n\t * \tcomponents: [\n\t * \t\t{\n\t * \t\t\tcustom_id: \"custom id\",\n\t * \t\t\tlabel: \"Type something\",\n\t * \t\t\tstyle: TextInputStyle.Short,\n\t * \t\t\ttype: ComponentType.TextInput,\n\t * \t\t},\n\t * \t],\n\t * });\n\t * ```\n\t * @example\n\t * Creating an action row using setters and API data:\n\t * ```ts\n\t * const actionRow = new ActionRowBuilder({\n\t * \tcomponents: [\n\t * \t\t{\n\t * \t\t\tcustom_id: \"custom id\",\n\t * \t\t\tlabel: \"Click me\",\n\t * \t\t\tstyle: ButtonStyle.Primary,\n\t * \t\t\ttype: ComponentType.Button,\n\t * \t\t},\n\t * \t],\n\t * })\n\t * \t.addComponents(button2, button3);\n\t * ```\n\t */\n\tpublic constructor({ components, ...data }: Partial<APIActionRowComponent<APIActionRowComponentTypes>> = {}) {\n\t\tsuper({ type: ComponentType.ActionRow, ...data });\n\t\tthis.components = (components?.map((component) => createComponentBuilder(component)) ?? []) as T[];\n\t}\n\n\t/**\n\t * Adds components to this action row.\n\t *\n\t * @param components - The components to add\n\t */\n\tpublic addComponents(...components: RestOrArray<T>) {\n\t\tthis.components.push(...normalizeArray(components));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets components for this action row.\n\t *\n\t * @param components - The components to set\n\t */\n\tpublic setComponents(...components: RestOrArray<T>) {\n\t\tthis.components.splice(0, this.components.length, ...normalizeArray(components));\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): APIActionRowComponent<ReturnType<T['toJSON']>> {\n\t\treturn {\n\t\t\t...this.data,\n\t\t\tcomponents: this.components.map((component) => component.toJSON()),\n\t\t} as APIActionRowComponent<ReturnType<T['toJSON']>>;\n\t}\n}\n","import type { JSONEncodable } from '@discordjs/util';\nimport type {\n\tAPIActionRowComponent,\n\tAPIActionRowComponentTypes,\n\tAPIBaseComponent,\n\tComponentType,\n} from 'discord-api-types/v10';\n\n/**\n * Any action row component data represented as an object.\n */\nexport type AnyAPIActionRowComponent = APIActionRowComponent<APIActionRowComponentTypes> | APIActionRowComponentTypes;\n\n/**\n * The base component builder that contains common symbols for all sorts of components.\n *\n * @typeParam DataType - The type of internal API data that is stored within the component\n */\nexport abstract class ComponentBuilder<\n\tDataType extends Partial<APIBaseComponent<ComponentType>> = APIBaseComponent<ComponentType>,\n> implements JSONEncodable<AnyAPIActionRowComponent>\n{\n\t/**\n\t * The API data associated with this component.\n\t */\n\tpublic readonly data: Partial<DataType>;\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic abstract toJSON(): AnyAPIActionRowComponent;\n\n\t/**\n\t * Constructs a new kind of component.\n\t *\n\t * @param data - The data to construct a component out of\n\t */\n\tpublic constructor(data: Partial<DataType>) {\n\t\tthis.data = data;\n\t}\n}\n","import { ComponentType, type APIMessageComponent, type APIModalComponent } from 'discord-api-types/v10';\nimport {\n\tActionRowBuilder,\n\ttype AnyComponentBuilder,\n\ttype MessageComponentBuilder,\n\ttype ModalComponentBuilder,\n} from './ActionRow.js';\nimport { ComponentBuilder } from './Component.js';\nimport { ButtonBuilder } from './button/Button.js';\nimport { ChannelSelectMenuBuilder } from './selectMenu/ChannelSelectMenu.js';\nimport { MentionableSelectMenuBuilder } from './selectMenu/MentionableSelectMenu.js';\nimport { RoleSelectMenuBuilder } from './selectMenu/RoleSelectMenu.js';\nimport { StringSelectMenuBuilder } from './selectMenu/StringSelectMenu.js';\nimport { UserSelectMenuBuilder } from './selectMenu/UserSelectMenu.js';\nimport { TextInputBuilder } from './textInput/TextInput.js';\n\n/**\n * Components here are mapped to their respective builder.\n */\nexport interface MappedComponentTypes {\n\t/**\n\t * The action row component type is associated with an {@link ActionRowBuilder}.\n\t */\n\t[ComponentType.ActionRow]: ActionRowBuilder<AnyComponentBuilder>;\n\t/**\n\t * The button component type is associated with an {@link ButtonBuilder}.\n\t */\n\t[ComponentType.Button]: ButtonBuilder;\n\t/**\n\t * The string select component type is associated with an {@link StringSelectMenuBuilder}.\n\t */\n\t[ComponentType.StringSelect]: StringSelectMenuBuilder;\n\t/**\n\t * The text inpiut component type is associated with an {@link TextInputBuilder}.\n\t */\n\t[ComponentType.TextInput]: TextInputBuilder;\n\t/**\n\t * The user select component type is associated with an {@link UserSelectMenuBuilder}.\n\t */\n\t[ComponentType.UserSelect]: UserSelectMenuBuilder;\n\t/**\n\t * The role select component type is associated with an {@link RoleSelectMenuBuilder}.\n\t */\n\t[ComponentType.RoleSelect]: RoleSelectMenuBuilder;\n\t/**\n\t * The mentionable select component type is associated with an {@link MentionableSelectMenuBuilder}.\n\t */\n\t[ComponentType.MentionableSelect]: MentionableSelectMenuBuilder;\n\t/**\n\t * The channel select component type is associated with an {@link ChannelSelectMenuBuilder}.\n\t */\n\t[ComponentType.ChannelSelect]: ChannelSelectMenuBuilder;\n}\n\n/**\n * Factory for creating components from API data.\n *\n * @typeParam T - The type of component to use\n * @param data - The API data to transform to a component class\n */\nexport function createComponentBuilder<T extends keyof MappedComponentTypes>(\n\t// eslint-disable-next-line @typescript-eslint/sort-type-union-intersection-members\n\tdata: (APIModalComponent | APIMessageComponent) & { type: T },\n): MappedComponentTypes[T];\n\n/**\n * Factory for creating components from API data.\n *\n * @typeParam C - The type of component to use\n * @param data - The API data to transform to a component class\n */\nexport function createComponentBuilder<C extends MessageComponentBuilder | ModalComponentBuilder>(data: C): C;\n\nexport function createComponentBuilder(\n\tdata: APIMessageComponent | APIModalComponent | MessageComponentBuilder,\n): ComponentBuilder {\n\tif (data instanceof ComponentBuilder) {\n\t\treturn data;\n\t}\n\n\tswitch (data.type) {\n\t\tcase ComponentType.ActionRow:\n\t\t\treturn new ActionRowBuilder(data);\n\t\tcase ComponentType.Button:\n\t\t\treturn new ButtonBuilder(data);\n\t\tcase ComponentType.StringSelect:\n\t\t\treturn new StringSelectMenuBuilder(data);\n\t\tcase ComponentType.TextInput:\n\t\t\treturn new TextInputBuilder(data);\n\t\tcase ComponentType.UserSelect:\n\t\t\treturn new UserSelectMenuBuilder(data);\n\t\tcase ComponentType.RoleSelect:\n\t\t\treturn new RoleSelectMenuBuilder(data);\n\t\tcase ComponentType.MentionableSelect:\n\t\t\treturn new MentionableSelectMenuBuilder(data);\n\t\tcase ComponentType.ChannelSelect:\n\t\t\treturn new ChannelSelectMenuBuilder(data);\n\t\tdefault:\n\t\t\t// @ts-expect-error This case can still occur if we get a newer unsupported component type\n\t\t\tthrow new Error(`Cannot properly serialize component type: ${data.type}`);\n\t}\n}\n","import {\n\tComponentType,\n\ttype APIMessageComponentEmoji,\n\ttype APIButtonComponent,\n\ttype APIButtonComponentWithURL,\n\ttype APIButtonComponentWithCustomId,\n\ttype ButtonStyle,\n} from 'discord-api-types/v10';\nimport {\n\tbuttonLabelValidator,\n\tbuttonStyleValidator,\n\tcustomIdValidator,\n\tdisabledValidator,\n\temojiValidator,\n\turlValidator,\n\tvalidateRequiredButtonParameters,\n} from '../Assertions.js';\nimport { ComponentBuilder } from '../Component.js';\n\n/**\n * A builder that creates API-compatible JSON data for buttons.\n */\nexport class ButtonBuilder extends ComponentBuilder<APIButtonComponent> {\n\t/**\n\t * Creates a new button from API data.\n\t *\n\t * @param data - The API data to create this button with\n\t * @example\n\t * Creating a button from an API data object:\n\t * ```ts\n\t * const button = new ButtonBuilder({\n\t * \tcustom_id: 'a cool button',\n\t * \tstyle: ButtonStyle.Primary,\n\t * \tlabel: 'Click Me',\n\t * \temoji: {\n\t * \t\tname: 'smile',\n\t * \t\tid: '123456789012345678',\n\t * \t},\n\t * });\n\t * ```\n\t * @example\n\t * Creating a button using setters and API data:\n\t * ```ts\n\t * const button = new ButtonBuilder({\n\t * \tstyle: ButtonStyle.Secondary,\n\t * \tlabel: 'Click Me',\n\t * })\n\t * \t.setEmoji({ name: '🙂' })\n\t * \t.setCustomId('another cool button');\n\t * ```\n\t */\n\tpublic constructor(data?: Partial<APIButtonComponent>) {\n\t\tsuper({ type: ComponentType.Button, ...data });\n\t}\n\n\t/**\n\t * Sets the style of this button.\n\t *\n\t * @param style - The style to use\n\t */\n\tpublic setStyle(style: ButtonStyle) {\n\t\tthis.data.style = buttonStyleValidator.parse(style);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL for this button.\n\t *\n\t * @remarks\n\t * This method is only available to buttons using the `Link` button style.\n\t * Only three types of URL schemes are currently supported: `https://`, `http://`, and `discord://`.\n\t * @param url - The URL to use\n\t */\n\tpublic setURL(url: string) {\n\t\t(this.data as APIButtonComponentWithURL).url = urlValidator.parse(url);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom id for this button.\n\t *\n\t * @remarks\n\t * This method is only applicable to buttons that are not using the `Link` button style.\n\t * @param customId - The custom id to use\n\t */\n\tpublic setCustomId(customId: string) {\n\t\t(this.data as APIButtonComponentWithCustomId).custom_id = customIdValidator.parse(customId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the emoji to display on this button.\n\t *\n\t * @param emoji - The emoji to use\n\t */\n\tpublic setEmoji(emoji: APIMessageComponentEmoji) {\n\t\tthis.data.emoji = emojiValidator.parse(emoji);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this button is disabled.\n\t *\n\t * @param disabled - Whether to disable this button\n\t */\n\tpublic setDisabled(disabled = true) {\n\t\tthis.data.disabled = disabledValidator.parse(disabled);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the label for this button.\n\t *\n\t * @param label - The label to use\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = buttonLabelValidator.parse(label);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): APIButtonComponent {\n\t\tvalidateRequiredButtonParameters(\n\t\t\tthis.data.style,\n\t\t\tthis.data.label,\n\t\t\tthis.data.emoji,\n\t\t\t(this.data as APIButtonComponentWithCustomId).custom_id,\n\t\t\t(this.data as APIButtonComponentWithURL).url,\n\t\t);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APIButtonComponent;\n\t}\n}\n","import type { APIChannelSelectComponent, ChannelType } from 'discord-api-types/v10';\nimport { ComponentType } from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js';\nimport { channelTypesValidator, customIdValidator } from '../Assertions.js';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\n\n/**\n * A builder that creates API-compatible JSON data for channel select menus.\n */\nexport class ChannelSelectMenuBuilder extends BaseSelectMenuBuilder<APIChannelSelectComponent> {\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new ChannelSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new ChannelSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)\n\t * \t.setMinValues(2);\n\t * ```\n\t */\n\tpublic constructor(data?: Partial<APIChannelSelectComponent>) {\n\t\tsuper({ ...data, type: ComponentType.ChannelSelect });\n\t}\n\n\t/**\n\t * Adds channel types to this select menu.\n\t *\n\t * @param types - The channel types to use\n\t */\n\tpublic addChannelTypes(...types: RestOrArray<ChannelType>) {\n\t\tconst normalizedTypes = normalizeArray(types);\n\t\tthis.data.channel_types ??= [];\n\t\tthis.data.channel_types.push(...channelTypesValidator.parse(normalizedTypes));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets channel types for this select menu.\n\t *\n\t * @param types - The channel types to use\n\t */\n\tpublic setChannelTypes(...types: RestOrArray<ChannelType>) {\n\t\tconst normalizedTypes = normalizeArray(types);\n\t\tthis.data.channel_types ??= [];\n\t\tthis.data.channel_types.splice(0, this.data.channel_types.length, ...channelTypesValidator.parse(normalizedTypes));\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc BaseSelectMenuBuilder.toJSON}\n\t */\n\tpublic override toJSON(): APIChannelSelectComponent {\n\t\tcustomIdValidator.parse(this.data.custom_id);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APIChannelSelectComponent;\n\t}\n}\n","import type { APISelectMenuComponent } from 'discord-api-types/v10';\nimport { customIdValidator, disabledValidator, minMaxValidator, placeholderValidator } from '../Assertions.js';\nimport { ComponentBuilder } from '../Component.js';\n\n/**\n * The base select menu builder that contains common symbols for select menu builders.\n *\n * @typeParam SelectMenuType - The type of select menu this would be instantiated for.\n */\nexport abstract class BaseSelectMenuBuilder<\n\tSelectMenuType extends APISelectMenuComponent,\n> extends ComponentBuilder<SelectMenuType> {\n\t/**\n\t * Sets the placeholder for this select menu.\n\t *\n\t * @param placeholder - The placeholder to use\n\t */\n\tpublic setPlaceholder(placeholder: string) {\n\t\tthis.data.placeholder = placeholderValidator.parse(placeholder);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum values that must be selected in the select menu.\n\t *\n\t * @param minValues - The minimum values that must be selected\n\t */\n\tpublic setMinValues(minValues: number) {\n\t\tthis.data.min_values = minMaxValidator.parse(minValues);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the maximum values that must be selected in the select menu.\n\t *\n\t * @param maxValues - The maximum values that must be selected\n\t */\n\tpublic setMaxValues(maxValues: number) {\n\t\tthis.data.max_values = minMaxValidator.parse(maxValues);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom id for this select menu.\n\t *\n\t * @param customId - The custom id to use\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customIdValidator.parse(customId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this select menu is disabled.\n\t *\n\t * @param disabled - Whether this select menu is disabled\n\t */\n\tpublic setDisabled(disabled = true) {\n\t\tthis.data.disabled = disabledValidator.parse(disabled);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): SelectMenuType {\n\t\tcustomIdValidator.parse(this.data.custom_id);\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as SelectMenuType;\n\t}\n}\n","import type { APIMentionableSelectComponent } from 'discord-api-types/v10';\nimport { ComponentType } from 'discord-api-types/v10';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\n\n/**\n * A builder that creates API-compatible JSON data for mentionable select menus.\n */\nexport class MentionableSelectMenuBuilder extends BaseSelectMenuBuilder<APIMentionableSelectComponent> {\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new MentionableSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new MentionableSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.setMinValues(1);\n\t * ```\n\t */\n\tpublic constructor(data?: Partial<APIMentionableSelectComponent>) {\n\t\tsuper({ ...data, type: ComponentType.MentionableSelect });\n\t}\n}\n","import type { APIRoleSelectComponent } from 'discord-api-types/v10';\nimport { ComponentType } from 'discord-api-types/v10';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\n\n/**\n * A builder that creates API-compatible JSON data for role select menus.\n */\nexport class RoleSelectMenuBuilder extends BaseSelectMenuBuilder<APIRoleSelectComponent> {\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new RoleSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new RoleSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.setMinValues(1);\n\t * ```\n\t */\n\tpublic constructor(data?: Partial<APIRoleSelectComponent>) {\n\t\tsuper({ ...data, type: ComponentType.RoleSelect });\n\t}\n}\n","import { ComponentType } from 'discord-api-types/v10';\nimport type { APIStringSelectComponent, APISelectMenuOption } from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js';\nimport { jsonOptionValidator, optionsLengthValidator, validateRequiredSelectMenuParameters } from '../Assertions.js';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\nimport { StringSelectMenuOptionBuilder } from './StringSelectMenuOption.js';\n\n/**\n * A builder that creates API-compatible JSON data for string select menus.\n */\nexport class StringSelectMenuBuilder extends BaseSelectMenuBuilder<APIStringSelectComponent> {\n\t/**\n\t * The options within this select menu.\n\t */\n\tpublic readonly options: StringSelectMenuOptionBuilder[];\n\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new StringSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * \toptions: [\n\t * \t\t{ label: 'option 1', value: '1' },\n\t * \t\t{ label: 'option 2', value: '2' },\n\t * \t\t{ label: 'option 3', value: '3' },\n\t * \t],\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new StringSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.setMinValues(1)\n\t * \t.addOptions({\n\t * \t\tlabel: 'Catchy',\n\t * \t\tvalue: 'catch',\n\t * \t});\n\t * ```\n\t */\n\tpublic constructor(data?: Partial<APIStringSelectComponent>) {\n\t\tconst { options, ...initData } = data ?? {};\n\t\tsuper({ ...initData, type: ComponentType.StringSelect });\n\t\tthis.options = options?.map((option: APISelectMenuOption) => new StringSelectMenuOptionBuilder(option)) ?? [];\n\t}\n\n\t/**\n\t * Adds options to this select menu.\n\t *\n\t * @param options - The options to add\n\t */\n\tpublic addOptions(...options: RestOrArray<APISelectMenuOption | StringSelectMenuOptionBuilder>) {\n\t\tconst normalizedOptions = normalizeArray(options);\n\t\toptionsLengthValidator.parse(this.options.length + normalizedOptions.length);\n\t\tthis.options.push(\n\t\t\t...normalizedOptions.map((normalizedOption) =>\n\t\t\t\tnormalizedOption instanceof StringSelectMenuOptionBuilder\n\t\t\t\t\t? normalizedOption\n\t\t\t\t\t: new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption)),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the options for this select menu.\n\t *\n\t * @param options - The options to set\n\t */\n\tpublic setOptions(...options: RestOrArray<APISelectMenuOption | StringSelectMenuOptionBuilder>) {\n\t\treturn this.spliceOptions(0, this.options.length, ...options);\n\t}\n\n\t/**\n\t * Removes, replaces, or inserts options for this select menu.\n\t *\n\t * @remarks\n\t * This method behaves similarly\n\t * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}.\n\t * It's useful for modifying and adjusting the order of existing options.\n\t * @example\n\t * Remove the first option:\n\t * ```ts\n\t * selectMenu.spliceOptions(0, 1);\n\t * ```\n\t * @example\n\t * Remove the first n option:\n\t * ```ts\n\t * const n = 4;\n\t * selectMenu.spliceOptions(0, n);\n\t * ```\n\t * @example\n\t * Remove the last option:\n\t * ```ts\n\t * selectMenu.spliceOptions(-1, 1);\n\t * ```\n\t * @param index - The index to start at\n\t * @param deleteCount - The number of options to remove\n\t * @param options - The replacing option objects or builders\n\t */\n\tpublic spliceOptions(\n\t\tindex: number,\n\t\tdeleteCount: number,\n\t\t...options: RestOrArray<APISelectMenuOption | StringSelectMenuOptionBuilder>\n\t) {\n\t\tconst normalizedOptions = normalizeArray(options);\n\n\t\tconst clone = [...this.options];\n\n\t\tclone.splice(\n\t\t\tindex,\n\t\t\tdeleteCount,\n\t\t\t...normalizedOptions.map((normalizedOption) =>\n\t\t\t\tnormalizedOption instanceof StringSelectMenuOptionBuilder\n\t\t\t\t\t? normalizedOption\n\t\t\t\t\t: new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption)),\n\t\t\t),\n\t\t);\n\n\t\toptionsLengthValidator.parse(clone.length);\n\t\tthis.options.splice(0, this.options.length, ...clone);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc BaseSelectMenuBuilder.toJSON}\n\t */\n\tpublic override toJSON(): APIStringSelectComponent {\n\t\tvalidateRequiredSelectMenuParameters(this.options, this.data.custom_id);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t} as APIStringSelectComponent;\n\t}\n}\n","import type { APIUserSelectComponent } from 'discord-api-types/v10';\nimport { ComponentType } from 'discord-api-types/v10';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\n\n/**\n * A builder that creates API-compatible JSON data for user select menus.\n */\nexport class UserSelectMenuBuilder extends BaseSelectMenuBuilder<APIUserSelectComponent> {\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new UserSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new UserSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.setMinValues(1);\n\t * ```\n\t */\n\tpublic constructor(data?: Partial<APIUserSelectComponent>) {\n\t\tsuper({ ...data, type: ComponentType.UserSelect });\n\t}\n}\n","import { isJSONEncodable, type Equatable, type JSONEncodable } from '@discordjs/util';\nimport { ComponentType, type TextInputStyle, type APITextInputComponent } from 'discord-api-types/v10';\nimport isEqual from 'fast-deep-equal';\nimport { customIdValidator } from '../Assertions.js';\nimport { ComponentBuilder } from '../Component.js';\nimport {\n\tmaxLengthValidator,\n\tminLengthValidator,\n\tplaceholderValidator,\n\trequiredValidator,\n\tvalueValidator,\n\tvalidateRequiredParameters,\n\tlabelValidator,\n\ttextInputStyleValidator,\n} from './Assertions.js';\n\n/**\n * A builder that creates API-compatible JSON data for text inputs.\n */\nexport class TextInputBuilder\n\textends ComponentBuilder<APITextInputComponent>\n\timplements Equatable<APITextInputComponent | JSONEncodable<APITextInputComponent>>\n{\n\t/**\n\t * Creates a new text input from API data.\n\t *\n\t * @param data - The API data to create this text input with\n\t * @example\n\t * Creating a select menu option from an API data object:\n\t * ```ts\n\t * const textInput = new TextInputBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tlabel: 'Type something',\n\t * \tstyle: TextInputStyle.Short,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu option using setters and API data:\n\t * ```ts\n\t * const textInput = new TextInputBuilder({\n\t * \tlabel: 'Type something else',\n\t * })\n\t * \t.setCustomId('woah')\n\t * \t.setStyle(TextInputStyle.Paragraph);\n\t * ```\n\t */\n\tpublic constructor(data?: APITextInputComponent & { type?: ComponentType.TextInput }) {\n\t\tsuper({ type: ComponentType.TextInput, ...data });\n\t}\n\n\t/**\n\t * Sets the custom id for this text input.\n\t *\n\t * @param customId - The custom id to use\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customIdValidator.parse(customId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the label for this text input.\n\t *\n\t * @param label - The label to use\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = labelValidator.parse(label);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the style for this text input.\n\t *\n\t * @param style - The style to use\n\t */\n\tpublic setStyle(style: TextInputStyle) {\n\t\tthis.data.style = textInputStyleValidator.parse(style);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum length of text for this text input.\n\t *\n\t * @param minLength - The minimum length of text for this text input\n\t */\n\tpublic setMinLength(minLength: number) {\n\t\tthis.data.min_length = minLengthValidator.parse(minLength);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the maximum length of text for this text input.\n\t *\n\t * @param maxLength - The maximum length of text for this text input\n\t */\n\tpublic setMaxLength(maxLength: number) {\n\t\tthis.data.max_length = maxLengthValidator.parse(maxLength);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the placeholder for this text input.\n\t *\n\t * @param placeholder - The placeholder to use\n\t */\n\tpublic setPlaceholder(placeholder: string) {\n\t\tthis.data.placeholder = placeholderValidator.parse(placeholder);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the value for this text input.\n\t *\n\t * @param value - The value to use\n\t */\n\tpublic setValue(value: string) {\n\t\tthis.data.value = valueValidator.parse(value);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this text input is required.\n\t *\n\t * @param required - Whether this text input is required\n\t */\n\tpublic setRequired(required = true) {\n\t\tthis.data.required = requiredValidator.parse(required);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): APITextInputComponent {\n\t\tvalidateRequiredParameters(this.data.custom_id, this.data.style, this.data.label);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APITextInputComponent;\n\t}\n\n\t/**\n\t * {@inheritDoc Equatable.equals}\n\t */\n\tpublic equals(other: APITextInputComponent | JSONEncodable<APITextInputComponent>): boolean {\n\t\tif (isJSONEncodable(other)) {\n\t\t\treturn isEqual(other.toJSON(), this.data);\n\t\t}\n\n\t\treturn isEqual(other, this.data);\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { TextInputStyle } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../../util/validation.js';\nimport { customIdValidator } from '../Assertions.js';\n\nexport const textInputStyleValidator = s.nativeEnum(TextInputStyle);\nexport const minLengthValidator = s.number.int\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(4_000)\n\t.setValidationEnabled(isValidationEnabled);\nexport const maxLengthValidator = s.number.int\n\t.greaterThanOrEqual(1)\n\t.lessThanOrEqual(4_000)\n\t.setValidationEnabled(isValidationEnabled);\nexport const requiredValidator = s.boolean;\nexport const valueValidator = s.string.lengthLessThanOrEqual(4_000).setValidationEnabled(isValidationEnabled);\nexport const placeholderValidator = s.string.lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);\nexport const labelValidator = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(45)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateRequiredParameters(customId?: string, style?: TextInputStyle, label?: string) {\n\tcustomIdValidator.parse(customId);\n\ttextInputStyleValidator.parse(style);\n\tlabelValidator.parse(label);\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ActionRowBuilder, type ModalActionRowComponentBuilder } from '../../components/ActionRow.js';\nimport { customIdValidator } from '../../components/Assertions.js';\nimport { isValidationEnabled } from '../../util/validation.js';\n\nexport const titleValidator = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(45)\n\t.setValidationEnabled(isValidationEnabled);\nexport const componentsValidator = s\n\t.instance(ActionRowBuilder)\n\t.array.lengthGreaterThanOrEqual(1)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateRequiredParameters(\n\tcustomId?: string,\n\ttitle?: string,\n\tcomponents?: ActionRowBuilder<ModalActionRowComponentBuilder>[],\n) {\n\tcustomIdValidator.parse(customId);\n\ttitleValidator.parse(title);\n\tcomponentsValidator.parse(components);\n}\n","/* eslint-disable jsdoc/check-param-names */\n\nimport type { JSONEncodable } from '@discordjs/util';\nimport type {\n\tAPIActionRowComponent,\n\tAPIModalActionRowComponent,\n\tAPIModalInteractionResponseCallbackData,\n} from 'discord-api-types/v10';\nimport { ActionRowBuilder, type ModalActionRowComponentBuilder } from '../../components/ActionRow.js';\nimport { customIdValidator } from '../../components/Assertions.js';\nimport { createComponentBuilder } from '../../components/Components.js';\nimport { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js';\nimport { titleValidator, validateRequiredParameters } from './Assertions.js';\n\n/**\n * A builder that creates API-compatible JSON data for modals.\n */\nexport class ModalBuilder implements JSONEncodable<APIModalInteractionResponseCallbackData> {\n\t/**\n\t * The API data associated with this modal.\n\t */\n\tpublic readonly data: Partial<APIModalInteractionResponseCallbackData>;\n\n\t/**\n\t * The components within this modal.\n\t */\n\tpublic readonly components: ActionRowBuilder<ModalActionRowComponentBuilder>[] = [];\n\n\t/**\n\t * Creates a new modal from API data.\n\t *\n\t * @param data - The API data to create this modal with\n\t */\n\tpublic constructor({ components, ...data }: Partial<APIModalInteractionResponseCallbackData> = {}) {\n\t\tthis.data = { ...data };\n\t\tthis.components = (components?.map((component) => createComponentBuilder(component)) ??\n\t\t\t[]) as ActionRowBuilder<ModalActionRowComponentBuilder>[];\n\t}\n\n\t/**\n\t * Sets the title of this modal.\n\t *\n\t * @param title - The title to use\n\t */\n\tpublic setTitle(title: string) {\n\t\tthis.data.title = titleValidator.parse(title);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom id of this modal.\n\t *\n\t * @param customId - The custom id to use\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customIdValidator.parse(customId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds components to this modal.\n\t *\n\t * @param components - The components to add\n\t */\n\tpublic addComponents(\n\t\t...components: RestOrArray<\n\t\t\tActionRowBuilder<ModalActionRowComponentBuilder> | APIActionRowComponent<APIModalActionRowComponent>\n\t\t>\n\t) {\n\t\tthis.components.push(\n\t\t\t...normalizeArray(components).map((component) =>\n\t\t\t\tcomponent instanceof ActionRowBuilder\n\t\t\t\t\t? component\n\t\t\t\t\t: new ActionRowBuilder<ModalActionRowComponentBuilder>(component),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets components for this modal.\n\t *\n\t * @param components - The components to set\n\t */\n\tpublic setComponents(...components: RestOrArray<ActionRowBuilder<ModalActionRowComponentBuilder>>) {\n\t\tthis.components.splice(0, this.components.length, ...normalizeArray(components));\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): APIModalInteractionResponseCallbackData {\n\t\tvalidateRequiredParameters(this.data.custom_id, this.data.title, this.components);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t\tcomponents: this.components.map((component) => component.toJSON()),\n\t\t} as APIModalInteractionResponseCallbackData;\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { Locale, type APIApplicationCommandOptionChoice, type LocalizationMap } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../../util/validation.js';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder.js';\nimport type { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands.js';\nimport type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase.js';\n\nconst namePredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(32)\n\t.regex(/^[\\p{Ll}\\p{Lm}\\p{Lo}\\p{N}\\p{sc=Devanagari}\\p{sc=Thai}_-]+$/u)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateName(name: unknown): asserts name is string {\n\tnamePredicate.parse(name);\n}\n\nconst descriptionPredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(100)\n\t.setValidationEnabled(isValidationEnabled);\nconst localePredicate = s.nativeEnum(Locale);\n\nexport function validateDescription(description: unknown): asserts description is string {\n\tdescriptionPredicate.parse(description);\n}\n\nconst maxArrayLengthPredicate = s.unknown.array.lengthLessThanOrEqual(25).setValidationEnabled(isValidationEnabled);\nexport function validateLocale(locale: unknown) {\n\treturn localePredicate.parse(locale);\n}\n\nexport function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[] {\n\tmaxArrayLengthPredicate.parse(options);\n}\n\nexport function validateRequiredParameters(\n\tname: string,\n\tdescription: string,\n\toptions: ToAPIApplicationCommandOptions[],\n) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert description conditions\n\tvalidateDescription(description);\n\n\t// Assert options conditions\n\tvalidateMaxOptionsLength(options);\n}\n\nconst booleanPredicate = s.boolean;\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport function validateRequired(required: unknown): asserts required is boolean {\n\tbooleanPredicate.parse(required);\n}\n\nconst choicesLengthPredicate = s.number.lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);\n\nexport function validateChoicesLength(amountAdding: number, choices?: APIApplicationCommandOptionChoice[]): void {\n\tchoicesLengthPredicate.parse((choices?.length ?? 0) + amountAdding);\n}\n\nexport function assertReturnOfBuilder<\n\tT extends ApplicationCommandOptionBase | SlashCommandSubcommandBuilder | SlashCommandSubcommandGroupBuilder,\n>(input: unknown, ExpectedInstanceOf: new () => T): asserts input is T {\n\ts.instance(ExpectedInstanceOf).parse(input);\n}\n\nexport const localizationMapPredicate = s\n\t.object<LocalizationMap>(Object.fromEntries(Object.values(Locale).map((locale) => [locale, s.string.nullish])))\n\t.strict.nullish.setValidationEnabled(isValidationEnabled);\n\nexport function validateLocalizationMap(value: unknown): asserts value is LocalizationMap {\n\tlocalizationMapPredicate.parse(value);\n}\n\nconst dmPermissionPredicate = s.boolean.nullish;\n\nexport function validateDMPermission(value: unknown): asserts value is boolean | null | undefined {\n\tdmPermissionPredicate.parse(value);\n}\n\nconst memberPermissionPredicate = s.union(\n\ts.bigint.transform((value) => value.toString()),\n\ts.number.safeInt.transform((value) => value.toString()),\n\ts.string.regex(/^\\d+$/),\n).nullish;\n\nexport function validateDefaultMemberPermissions(permissions: unknown) {\n\treturn memberPermissionPredicate.parse(permissions);\n}\n\nexport function validateNSFW(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n","import type {\n\tAPIApplicationCommandOption,\n\tLocalizationMap,\n\tPermissions,\n\tRESTPostAPIChatInputApplicationCommandsJSONBody,\n} from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport {\n\tassertReturnOfBuilder,\n\tvalidateDefaultMemberPermissions,\n\tvalidateDefaultPermission,\n\tvalidateLocalizationMap,\n\tvalidateDMPermission,\n\tvalidateMaxOptionsLength,\n\tvalidateRequiredParameters,\n\tvalidateNSFW,\n} from './Assertions.js';\nimport { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands.js';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription.js';\nimport { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions.js';\n\n/**\n * A builder that creates API-compatible JSON data for slash commands.\n */\n@mix(SharedSlashCommandOptions, SharedNameAndDescription)\nexport class SlashCommandBuilder {\n\t/**\n\t * The name of this command.\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The name localizations of this command.\n\t */\n\tpublic readonly name_localizations?: LocalizationMap;\n\n\t/**\n\t * The description of this command.\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The description localizations of this command.\n\t */\n\tpublic readonly description_localizations?: LocalizationMap;\n\n\t/**\n\t * The options of this command.\n\t */\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\t/**\n\t * Whether this command is enabled by default when the application is added to a guild.\n\t *\n\t * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.\n\t */\n\tpublic readonly default_permission: boolean | undefined = undefined;\n\n\t/**\n\t * The set of permissions represented as a bit set for the command.\n\t */\n\tpublic readonly default_member_permissions: Permissions | null | undefined = undefined;\n\n\t/**\n\t * Indicates whether the command is available in direct messages with the application.\n\t *\n\t * @remarks\n\t * By default, commands are visible. This property is only for global commands.\n\t */\n\tpublic readonly dm_permission: boolean | undefined = undefined;\n\n\t/**\n\t * Whether this command is NSFW.\n\t */\n\tpublic readonly nsfw: boolean | undefined = undefined;\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * @remarks\n\t * If set to `false`, you will have to later `PUT` the permissions for this command.\n\t * @param value - Whether or not to enable this command by default\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t * @deprecated Use {@link SlashCommandBuilder.setDefaultMemberPermissions} or {@link SlashCommandBuilder.setDMPermission} instead.\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'default_permission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the default permissions a member should have in order to run the command.\n\t *\n\t * @remarks\n\t * You can set this to `'0'` to disable the command by default.\n\t * @param permissions - The permissions bit field to set\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t */\n\tpublic setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined) {\n\t\t// Assert the value and parse it\n\t\tconst permissionValue = validateDefaultMemberPermissions(permissions);\n\n\t\tReflect.set(this, 'default_member_permissions', permissionValue);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets if the command is available in direct messages with the application.\n\t *\n\t * @remarks\n\t * By default, commands are visible. This method is only for global commands.\n\t * @param enabled - Whether the command should be enabled in direct messages\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t */\n\tpublic setDMPermission(enabled: boolean | null | undefined) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDMPermission(enabled);\n\n\t\tReflect.set(this, 'dm_permission', enabled);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this command is NSFW.\n\t *\n\t * @param nsfw - Whether this command is NSFW\n\t */\n\tpublic setNSFW(nsfw = true) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateNSFW(nsfw);\n\t\tReflect.set(this, 'nsfw', nsfw);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand group to this command.\n\t *\n\t * @param input - A function that returns a subcommand group builder or an already built builder\n\t */\n\tpublic addSubcommandGroup(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandGroupBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandGroupBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandGroupBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand to this command.\n\t *\n\t * @param input - A function that returns a subcommand builder or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\tvalidateLocalizationMap(this.name_localizations);\n\t\tvalidateLocalizationMap(this.description_localizations);\n\n\t\treturn {\n\t\t\t...this,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {}\n\n/**\n * An interface specifically for slash command subcommands.\n */\nexport interface SlashCommandSubcommandsOnlyBuilder\n\textends Omit<SlashCommandBuilder, Exclude<keyof SharedSlashCommandOptions, 'options'>> {}\n\n/**\n * An interface specifically for slash command options.\n */\nexport interface SlashCommandOptionsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tSharedSlashCommandOptions,\n\t\tPick<SlashCommandBuilder, 'toJSON'> {}\n\n/**\n * An interface that ensures the `toJSON()` call will return something\n * that can be serialized into API-compatible data.\n */\nexport interface ToAPIApplicationCommandOptions {\n\ttoJSON(): APIApplicationCommandOption;\n}\n","import {\n\tApplicationCommandOptionType,\n\ttype APIApplicationCommandSubcommandGroupOption,\n\ttype APIApplicationCommandSubcommandOption,\n} from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { assertReturnOfBuilder, validateMaxOptionsLength, validateRequiredParameters } from './Assertions.js';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder.js';\nimport type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase.js';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription.js';\nimport { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions.js';\n\n/**\n * Represents a folder for subcommands.\n *\n * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups}\n */\n@mix(SharedNameAndDescription)\nexport class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand group.\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand group.\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The subcommands within this subcommand group.\n\t */\n\tpublic readonly options: SlashCommandSubcommandBuilder[] = [];\n\n\t/**\n\t * Adds a new subcommand to this group.\n\t *\n\t * @param input - A function that returns a subcommand builder or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t) {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): APIApplicationCommandSubcommandGroupOption {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.SubcommandGroup,\n\t\t\tname: this.name,\n\t\t\tname_localizations: this.name_localizations,\n\t\t\tdescription: this.description,\n\t\t\tdescription_localizations: this.description_localizations,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription {}\n\n/**\n * A builder that creates API-compatible JSON data for slash command subcommands.\n *\n * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups}\n */\n@mix(SharedNameAndDescription, SharedSlashCommandOptions)\nexport class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand.\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand.\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options within this subcommand.\n\t */\n\tpublic readonly options: ApplicationCommandOptionBase[] = [];\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): APIApplicationCommandSubcommandOption {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.Subcommand,\n\t\t\tname: this.name,\n\t\t\tname_localizations: this.name_localizations,\n\t\t\tdescription: this.description,\n\t\t\tdescription_localizations: this.description_localizations,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions<false> {}\n","import type { LocaleString, LocalizationMap } from 'discord-api-types/v10';\nimport { validateDescription, validateLocale, validateName } from '../Assertions.js';\n\n/**\n * This mixin holds name and description symbols for slash commands.\n */\nexport class SharedNameAndDescription {\n\t/**\n\t * The name of this command.\n\t */\n\tpublic readonly name!: string;\n\n\t/**\n\t * The name localizations of this command.\n\t */\n\tpublic readonly name_localizations?: LocalizationMap;\n\n\t/**\n\t * The description of this command.\n\t */\n\tpublic readonly description!: string;\n\n\t/**\n\t * The description localizations of this command.\n\t */\n\tpublic readonly description_localizations?: LocalizationMap;\n\n\t/**\n\t * Sets the name of this command.\n\t *\n\t * @param name - The name to use\n\t */\n\tpublic setName(name: string): this {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this command.\n\t *\n\t * @param description - The description to use\n\t */\n\tpublic setDescription(description: string) {\n\t\t// Assert the description matches the conditions\n\t\tvalidateDescription(description);\n\n\t\tReflect.set(this, 'description', description);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets a name localization for this command.\n\t *\n\t * @param locale - The locale to set\n\t * @param localizedName - The localized name for the given `locale`\n\t */\n\tpublic setNameLocalization(locale: LocaleString, localizedName: string | null) {\n\t\tif (!this.name_localizations) {\n\t\t\tReflect.set(this, 'name_localizations', {});\n\t\t}\n\n\t\tconst parsedLocale = validateLocale(locale);\n\n\t\tif (localizedName === null) {\n\t\t\tthis.name_localizations![parsedLocale] = null;\n\t\t\treturn this;\n\t\t}\n\n\t\tvalidateName(localizedName);\n\n\t\tthis.name_localizations![parsedLocale] = localizedName;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the name localizations for this command.\n\t *\n\t * @param localizedNames - The object of localized names to set\n\t */\n\tpublic setNameLocalizations(localizedNames: LocalizationMap | null) {\n\t\tif (localizedNames === null) {\n\t\t\tReflect.set(this, 'name_localizations', null);\n\t\t\treturn this;\n\t\t}\n\n\t\tReflect.set(this, 'name_localizations', {});\n\n\t\tfor (const args of Object.entries(localizedNames)) {\n\t\t\tthis.setNameLocalization(...(args as [LocaleString, string | null]));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets a description localization for this command.\n\t *\n\t * @param locale - The locale to set\n\t * @param localizedDescription - The localized description for the given locale\n\t */\n\tpublic setDescriptionLocalization(locale: LocaleString, localizedDescription: string | null) {\n\t\tif (!this.description_localizations) {\n\t\t\tReflect.set(this, 'description_localizations', {});\n\t\t}\n\n\t\tconst parsedLocale = validateLocale(locale);\n\n\t\tif (localizedDescription === null) {\n\t\t\tthis.description_localizations![parsedLocale] = null;\n\t\t\treturn this;\n\t\t}\n\n\t\tvalidateDescription(localizedDescription);\n\n\t\tthis.description_localizations![parsedLocale] = localizedDescription;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description localizations for this command.\n\t *\n\t * @param localizedDescriptions - The object of localized descriptions to set\n\t */\n\tpublic setDescriptionLocalizations(localizedDescriptions: LocalizationMap | null) {\n\t\tif (localizedDescriptions === null) {\n\t\t\tReflect.set(this, 'description_localizations', null);\n\t\t\treturn this;\n\t\t}\n\n\t\tReflect.set(this, 'description_localizations', {});\n\t\tfor (const args of Object.entries(localizedDescriptions)) {\n\t\t\tthis.setDescriptionLocalization(...(args as [LocaleString, string | null]));\n\t\t}\n\n\t\treturn this;\n\t}\n}\n","import { ApplicationCommandOptionType, type APIApplicationCommandAttachmentOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command attachment option.\n */\nexport class SlashCommandAttachmentOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic override readonly type = ApplicationCommandOptionType.Attachment as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandAttachmentOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import type { APIApplicationCommandBasicOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { validateRequiredParameters, validateRequired, validateLocalizationMap } from '../Assertions.js';\nimport { SharedNameAndDescription } from './NameAndDescription.js';\n\n/**\n * The base application command option builder that contains common symbols for application command builders.\n */\nexport abstract class ApplicationCommandOptionBase extends SharedNameAndDescription {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic abstract readonly type: ApplicationCommandOptionType;\n\n\t/**\n\t * Whether this option is required.\n\t *\n\t * @defaultValue `false`\n\t */\n\tpublic readonly required: boolean = false;\n\n\t/**\n\t * Sets whether this option is required.\n\t *\n\t * @param required - Whether this option should be required\n\t */\n\tpublic setRequired(required: boolean) {\n\t\t// Assert that you actually passed a boolean\n\t\tvalidateRequired(required);\n\n\t\tReflect.set(this, 'required', required);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic abstract toJSON(): APIApplicationCommandBasicOption;\n\n\t/**\n\t * This method runs required validators on this builder.\n\t */\n\tprotected runRequiredValidations() {\n\t\tvalidateRequiredParameters(this.name, this.description, []);\n\n\t\t// Validate localizations\n\t\tvalidateLocalizationMap(this.name_localizations);\n\t\tvalidateLocalizationMap(this.description_localizations);\n\n\t\t// Assert that you actually passed a boolean\n\t\tvalidateRequired(this.required);\n\t}\n}\n","import { ApplicationCommandOptionType, type APIApplicationCommandBooleanOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command boolean option.\n */\nexport class SlashCommandBooleanOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.Boolean as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandBooleanOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { ApplicationCommandOptionType, type APIApplicationCommandChannelOption } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\nimport { ApplicationCommandOptionChannelTypesMixin } from '../mixins/ApplicationCommandOptionChannelTypesMixin.js';\n\n/**\n * A slash command channel option.\n */\n@mix(ApplicationCommandOptionChannelTypesMixin)\nexport class SlashCommandChannelOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic override readonly type = ApplicationCommandOptionType.Channel as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandChannelOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandChannelOption extends ApplicationCommandOptionChannelTypesMixin {}\n","import { s } from '@sapphire/shapeshift';\nimport { ChannelType } from 'discord-api-types/v10';\n\n/**\n * The allowed channel types used for a channel option in a slash command builder.\n *\n * @privateRemarks This can't be dynamic because const enums are erased at runtime.\n * @internal\n */\nconst allowedChannelTypes = [\n\tChannelType.GuildText,\n\tChannelType.GuildVoice,\n\tChannelType.GuildCategory,\n\tChannelType.GuildAnnouncement,\n\tChannelType.AnnouncementThread,\n\tChannelType.PublicThread,\n\tChannelType.PrivateThread,\n\tChannelType.GuildStageVoice,\n\tChannelType.GuildForum,\n] as const;\n\n/**\n * The type of allowed channel types used for a channel option.\n */\nexport type ApplicationCommandOptionAllowedChannelTypes = (typeof allowedChannelTypes)[number];\n\nconst channelTypesPredicate = s.array(s.union(...allowedChannelTypes.map((type) => s.literal(type))));\n\n/**\n * This mixin holds channel type symbols used for options.\n */\nexport class ApplicationCommandOptionChannelTypesMixin {\n\t/**\n\t * The channel types of this option.\n\t */\n\tpublic readonly channel_types?: ApplicationCommandOptionAllowedChannelTypes[];\n\n\t/**\n\t * Adds channel types to this option.\n\t *\n\t * @param channelTypes - The channel types\n\t */\n\tpublic addChannelTypes(...channelTypes: ApplicationCommandOptionAllowedChannelTypes[]) {\n\t\tif (this.channel_types === undefined) {\n\t\t\tReflect.set(this, 'channel_types', []);\n\t\t}\n\n\t\tthis.channel_types!.push(...channelTypesPredicate.parse(channelTypes));\n\n\t\treturn this;\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandOptionType, type APIApplicationCommandIntegerOption } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin.js';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.js';\n\nconst numberValidator = s.number.int;\n\n/**\n * A slash command integer option.\n */\n@mix(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandIntegerOption\n\textends ApplicationCommandOptionBase\n\timplements ApplicationCommandNumericOptionMinMaxValueMixin\n{\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.Integer as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}\n\t */\n\tpublic setMaxValue(max: number): this {\n\t\tnumberValidator.parse(max);\n\n\t\tReflect.set(this, 'max_value', max);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}\n\t */\n\tpublic setMinValue(min: number): this {\n\t\tnumberValidator.parse(min);\n\n\t\tReflect.set(this, 'min_value', min);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandIntegerOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this } as APIApplicationCommandIntegerOption;\n\t}\n}\n\nexport interface SlashCommandIntegerOption\n\textends ApplicationCommandNumericOptionMinMaxValueMixin,\n\t\tApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {}\n","/**\n * This mixin holds minimum and maximum symbols used for options.\n */\nexport abstract class ApplicationCommandNumericOptionMinMaxValueMixin {\n\t/**\n\t * The maximum value of this option.\n\t */\n\tpublic readonly max_value?: number;\n\n\t/**\n\t * The minimum value of this option.\n\t */\n\tpublic readonly min_value?: number;\n\n\t/**\n\t * Sets the maximum number value of this option.\n\t *\n\t * @param max - The maximum value this option can be\n\t */\n\tpublic abstract setMaxValue(max: number): this;\n\n\t/**\n\t * Sets the minimum number value of this option.\n\t *\n\t * @param min - The minimum value this option can be\n\t */\n\tpublic abstract setMinValue(min: number): this;\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandOptionType, type APIApplicationCommandOptionChoice } from 'discord-api-types/v10';\nimport { localizationMapPredicate, validateChoicesLength } from '../Assertions.js';\n\nconst stringPredicate = s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100);\nconst numberPredicate = s.number.greaterThan(Number.NEGATIVE_INFINITY).lessThan(Number.POSITIVE_INFINITY);\nconst choicesPredicate = s.object({\n\tname: stringPredicate,\n\tname_localizations: localizationMapPredicate,\n\tvalue: s.union(stringPredicate, numberPredicate),\n}).array;\nconst booleanPredicate = s.boolean;\n\n/**\n * This mixin holds choices and autocomplete symbols used for options.\n */\nexport class ApplicationCommandOptionWithChoicesAndAutocompleteMixin<T extends number | string> {\n\t/**\n\t * The choices of this option.\n\t */\n\tpublic readonly choices?: APIApplicationCommandOptionChoice<T>[];\n\n\t/**\n\t * Whether this option utilizes autocomplete.\n\t */\n\tpublic readonly autocomplete?: boolean;\n\n\t/**\n\t * The type of this option.\n\t *\n\t * @privateRemarks Since this is present and this is a mixin, this is needed.\n\t */\n\tpublic readonly type!: ApplicationCommandOptionType;\n\n\t/**\n\t * Adds multiple choices to this option.\n\t *\n\t * @param choices - The choices to add\n\t */\n\tpublic addChoices(...choices: APIApplicationCommandOptionChoice<T>[]): this {\n\t\tif (choices.length > 0 && this.autocomplete) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tchoicesPredicate.parse(choices);\n\n\t\tif (this.choices === undefined) {\n\t\t\tReflect.set(this, 'choices', []);\n\t\t}\n\n\t\tvalidateChoicesLength(choices.length, this.choices);\n\n\t\tfor (const { name, name_localizations, value } of choices) {\n\t\t\t// Validate the value\n\t\t\tif (this.type === ApplicationCommandOptionType.String) {\n\t\t\t\tstringPredicate.parse(value);\n\t\t\t} else {\n\t\t\t\tnumberPredicate.parse(value);\n\t\t\t}\n\n\t\t\tthis.choices!.push({ name, name_localizations, value });\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets multiple choices for this option.\n\t *\n\t * @param choices - The choices to set\n\t */\n\tpublic setChoices<Input extends APIApplicationCommandOptionChoice<T>[]>(...choices: Input): this {\n\t\tif (choices.length > 0 && this.autocomplete) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tchoicesPredicate.parse(choices);\n\n\t\tReflect.set(this, 'choices', []);\n\t\tthis.addChoices(...choices);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Whether this option uses autocomplete.\n\t *\n\t * @param autocomplete - Whether this option should use autocomplete\n\t */\n\tpublic setAutocomplete(autocomplete: boolean): this {\n\t\t// Assert that you actually passed a boolean\n\t\tbooleanPredicate.parse(autocomplete);\n\n\t\tif (autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tReflect.set(this, 'autocomplete', autocomplete);\n\n\t\treturn this;\n\t}\n}\n","import { ApplicationCommandOptionType, type APIApplicationCommandMentionableOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command mentionable option.\n */\nexport class SlashCommandMentionableOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.Mentionable as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandMentionableOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandOptionType, type APIApplicationCommandNumberOption } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin.js';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.js';\n\nconst numberValidator = s.number;\n\n/**\n * A slash command number option.\n */\n@mix(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandNumberOption\n\textends ApplicationCommandOptionBase\n\timplements ApplicationCommandNumericOptionMinMaxValueMixin\n{\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.Number as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}\n\t */\n\tpublic setMaxValue(max: number): this {\n\t\tnumberValidator.parse(max);\n\n\t\tReflect.set(this, 'max_value', max);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}\n\t */\n\tpublic setMinValue(min: number): this {\n\t\tnumberValidator.parse(min);\n\n\t\tReflect.set(this, 'min_value', min);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandNumberOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this } as APIApplicationCommandNumberOption;\n\t}\n}\n\nexport interface SlashCommandNumberOption\n\textends ApplicationCommandNumericOptionMinMaxValueMixin,\n\t\tApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {}\n","import { ApplicationCommandOptionType, type APIApplicationCommandRoleOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command role option.\n */\nexport class SlashCommandRoleOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic override readonly type = ApplicationCommandOptionType.Role as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandRoleOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandOptionType, type APIApplicationCommandStringOption } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.js';\n\nconst minLengthValidator = s.number.greaterThanOrEqual(0).lessThanOrEqual(6_000);\nconst maxLengthValidator = s.number.greaterThanOrEqual(1).lessThanOrEqual(6_000);\n\n/**\n * A slash command string option.\n */\n@mix(ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandStringOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.String as const;\n\n\t/**\n\t * The maximum length of this option.\n\t */\n\tpublic readonly max_length?: number;\n\n\t/**\n\t * The minimum length of this option.\n\t */\n\tpublic readonly min_length?: number;\n\n\t/**\n\t * Sets the maximum length of this string option.\n\t *\n\t * @param max - The maximum length this option can be\n\t */\n\tpublic setMaxLength(max: number): this {\n\t\tmaxLengthValidator.parse(max);\n\n\t\tReflect.set(this, 'max_length', max);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum length of this string option.\n\t *\n\t * @param min - The minimum length this option can be\n\t */\n\tpublic setMinLength(min: number): this {\n\t\tminLengthValidator.parse(min);\n\n\t\tReflect.set(this, 'min_length', min);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandStringOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this } as APIApplicationCommandStringOption;\n\t}\n}\n\nexport interface SlashCommandStringOption extends ApplicationCommandOptionWithChoicesAndAutocompleteMixin<string> {}\n","import { ApplicationCommandOptionType, type APIApplicationCommandUserOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command user option.\n */\nexport class SlashCommandUserOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.User as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandUserOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { assertReturnOfBuilder, validateMaxOptionsLength } from '../Assertions.js';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\nimport { SlashCommandAttachmentOption } from '../options/attachment.js';\nimport { SlashCommandBooleanOption } from '../options/boolean.js';\nimport { SlashCommandChannelOption } from '../options/channel.js';\nimport { SlashCommandIntegerOption } from '../options/integer.js';\nimport { SlashCommandMentionableOption } from '../options/mentionable.js';\nimport { SlashCommandNumberOption } from '../options/number.js';\nimport { SlashCommandRoleOption } from '../options/role.js';\nimport { SlashCommandStringOption } from '../options/string.js';\nimport { SlashCommandUserOption } from '../options/user.js';\nimport type { ApplicationCommandOptionBase } from './ApplicationCommandOptionBase.js';\n\n/**\n * This mixin holds symbols that can be shared in slash command options.\n *\n * @typeParam ShouldOmitSubcommandFunctions - Whether to omit subcommand functions.\n */\nexport class SharedSlashCommandOptions<ShouldOmitSubcommandFunctions = true> {\n\tpublic readonly options!: ToAPIApplicationCommandOptions[];\n\n\t/**\n\t * Adds a boolean option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addBooleanOption(\n\t\tinput: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandBooleanOption);\n\t}\n\n\t/**\n\t * Adds a user option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandUserOption);\n\t}\n\n\t/**\n\t * Adds a channel option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addChannelOption(\n\t\tinput: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandChannelOption);\n\t}\n\n\t/**\n\t * Adds a role option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandRoleOption);\n\t}\n\n\t/**\n\t * Adds an attachment option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addAttachmentOption(\n\t\tinput: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandAttachmentOption);\n\t}\n\n\t/**\n\t * Adds a mentionable option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addMentionableOption(\n\t\tinput: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandMentionableOption);\n\t}\n\n\t/**\n\t * Adds a string option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addStringOption(\n\t\tinput:\n\t\t\t| Omit<SlashCommandStringOption, 'addChoices'>\n\t\t\t| Omit<SlashCommandStringOption, 'setAutocomplete'>\n\t\t\t| SlashCommandStringOption\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandStringOption,\n\t\t\t ) =>\n\t\t\t\t\t| Omit<SlashCommandStringOption, 'addChoices'>\n\t\t\t\t\t| Omit<SlashCommandStringOption, 'setAutocomplete'>\n\t\t\t\t\t| SlashCommandStringOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandStringOption);\n\t}\n\n\t/**\n\t * Adds an integer option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addIntegerOption(\n\t\tinput:\n\t\t\t| Omit<SlashCommandIntegerOption, 'addChoices'>\n\t\t\t| Omit<SlashCommandIntegerOption, 'setAutocomplete'>\n\t\t\t| SlashCommandIntegerOption\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandIntegerOption,\n\t\t\t ) =>\n\t\t\t\t\t| Omit<SlashCommandIntegerOption, 'addChoices'>\n\t\t\t\t\t| Omit<SlashCommandIntegerOption, 'setAutocomplete'>\n\t\t\t\t\t| SlashCommandIntegerOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandIntegerOption);\n\t}\n\n\t/**\n\t * Adds a number option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addNumberOption(\n\t\tinput:\n\t\t\t| Omit<SlashCommandNumberOption, 'addChoices'>\n\t\t\t| Omit<SlashCommandNumberOption, 'setAutocomplete'>\n\t\t\t| SlashCommandNumberOption\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandNumberOption,\n\t\t\t ) =>\n\t\t\t\t\t| Omit<SlashCommandNumberOption, 'addChoices'>\n\t\t\t\t\t| Omit<SlashCommandNumberOption, 'setAutocomplete'>\n\t\t\t\t\t| SlashCommandNumberOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandNumberOption);\n\t}\n\n\t/**\n\t * Where the actual adding magic happens. ✨\n\t *\n\t * @param input - The input. What else?\n\t * @param Instance - The instance of whatever is being added\n\t * @internal\n\t */\n\tprivate _sharedAddOptionMethod<T extends ApplicationCommandOptionBase>(\n\t\tinput:\n\t\t\t| Omit<T, 'addChoices'>\n\t\t\t| Omit<T, 'setAutocomplete'>\n\t\t\t| T\n\t\t\t| ((builder: T) => Omit<T, 'addChoices'> | Omit<T, 'setAutocomplete'> | T),\n\t\tInstance: new () => T,\n\t): ShouldOmitSubcommandFunctions extends true ? Omit<this, 'addSubcommand' | 'addSubcommandGroup'> : this {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new Instance()) : input;\n\n\t\tassertReturnOfBuilder(result, Instance);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandType } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../../util/validation.js';\nimport type { ContextMenuCommandType } from './ContextMenuCommandBuilder.js';\n\nconst namePredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(32)\n\t// eslint-disable-next-line prefer-named-capture-group, unicorn/no-unsafe-regex\n\t.regex(/^( *[\\p{P}\\p{L}\\p{N}\\p{sc=Devanagari}\\p{sc=Thai}]+ *)+$/u)\n\t.setValidationEnabled(isValidationEnabled);\nconst typePredicate = s\n\t.union(s.literal(ApplicationCommandType.User), s.literal(ApplicationCommandType.Message))\n\t.setValidationEnabled(isValidationEnabled);\nconst booleanPredicate = s.boolean;\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport function validateName(name: unknown): asserts name is string {\n\tnamePredicate.parse(name);\n}\n\nexport function validateType(type: unknown): asserts type is ContextMenuCommandType {\n\ttypePredicate.parse(type);\n}\n\nexport function validateRequiredParameters(name: string, type: number) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert type is valid\n\tvalidateType(type);\n}\n\nconst dmPermissionPredicate = s.boolean.nullish;\n\nexport function validateDMPermission(value: unknown): asserts value is boolean | null | undefined {\n\tdmPermissionPredicate.parse(value);\n}\n\nconst memberPermissionPredicate = s.union(\n\ts.bigint.transform((value) => value.toString()),\n\ts.number.safeInt.transform((value) => value.toString()),\n\ts.string.regex(/^\\d+$/),\n).nullish;\n\nexport function validateDefaultMemberPermissions(permissions: unknown) {\n\treturn memberPermissionPredicate.parse(permissions);\n}\n","import type {\n\tApplicationCommandType,\n\tLocaleString,\n\tLocalizationMap,\n\tPermissions,\n\tRESTPostAPIContextMenuApplicationCommandsJSONBody,\n} from 'discord-api-types/v10';\nimport { validateLocale, validateLocalizationMap } from '../slashCommands/Assertions.js';\nimport {\n\tvalidateRequiredParameters,\n\tvalidateName,\n\tvalidateType,\n\tvalidateDefaultPermission,\n\tvalidateDefaultMemberPermissions,\n\tvalidateDMPermission,\n} from './Assertions.js';\n\n/**\n * The type a context menu command can be.\n */\nexport type ContextMenuCommandType = ApplicationCommandType.Message | ApplicationCommandType.User;\n\n/**\n * A builder that creates API-compatible JSON data for context menu commands.\n */\nexport class ContextMenuCommandBuilder {\n\t/**\n\t * The name of this command.\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The name localizations of this command.\n\t */\n\tpublic readonly name_localizations?: LocalizationMap;\n\n\t/**\n\t * The type of this command.\n\t */\n\tpublic readonly type: ContextMenuCommandType = undefined!;\n\n\t/**\n\t * Whether this command is enabled by default when the application is added to a guild.\n\t *\n\t * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.\n\t */\n\tpublic readonly default_permission: boolean | undefined = undefined;\n\n\t/**\n\t * The set of permissions represented as a bit set for the command.\n\t */\n\tpublic readonly default_member_permissions: Permissions | null | undefined = undefined;\n\n\t/**\n\t * Indicates whether the command is available in direct messages with the application.\n\t *\n\t * @remarks\n\t * By default, commands are visible. This property is only for global commands.\n\t */\n\tpublic readonly dm_permission: boolean | undefined = undefined;\n\n\t/**\n\t * Sets the name of this command.\n\t *\n\t * @param name - The name to use\n\t */\n\tpublic setName(name: string) {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the type of this command.\n\t *\n\t * @param type - The type to use\n\t */\n\tpublic setType(type: ContextMenuCommandType) {\n\t\t// Assert the type is valid\n\t\tvalidateType(type);\n\n\t\tReflect.set(this, 'type', type);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * @remarks\n\t * If set to `false`, you will have to later `PUT` the permissions for this command.\n\t * @param value - Whether to enable this command by default\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'default_permission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the default permissions a member should have in order to run this command.\n\t *\n\t * @remarks\n\t * You can set this to `'0'` to disable the command by default.\n\t * @param permissions - The permissions bit field to set\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t */\n\tpublic setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined) {\n\t\t// Assert the value and parse it\n\t\tconst permissionValue = validateDefaultMemberPermissions(permissions);\n\n\t\tReflect.set(this, 'default_member_permissions', permissionValue);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets if the command is available in direct messages with the application.\n\t *\n\t * @remarks\n\t * By default, commands are visible. This method is only for global commands.\n\t * @param enabled - Whether the command should be enabled in direct messages\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t */\n\tpublic setDMPermission(enabled: boolean | null | undefined) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDMPermission(enabled);\n\n\t\tReflect.set(this, 'dm_permission', enabled);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets a name localization for this command.\n\t *\n\t * @param locale - The locale to set\n\t * @param localizedName - The localized name for the given `locale`\n\t */\n\tpublic setNameLocalization(locale: LocaleString, localizedName: string | null) {\n\t\tif (!this.name_localizations) {\n\t\t\tReflect.set(this, 'name_localizations', {});\n\t\t}\n\n\t\tconst parsedLocale = validateLocale(locale);\n\n\t\tif (localizedName === null) {\n\t\t\tthis.name_localizations![parsedLocale] = null;\n\t\t\treturn this;\n\t\t}\n\n\t\tvalidateName(localizedName);\n\n\t\tthis.name_localizations![parsedLocale] = localizedName;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the name localizations for this command.\n\t *\n\t * @param localizedNames - The object of localized names to set\n\t */\n\tpublic setNameLocalizations(localizedNames: LocalizationMap | null) {\n\t\tif (localizedNames === null) {\n\t\t\tReflect.set(this, 'name_localizations', null);\n\t\t\treturn this;\n\t\t}\n\n\t\tReflect.set(this, 'name_localizations', {});\n\n\t\tfor (const args of Object.entries(localizedNames))\n\t\t\tthis.setNameLocalization(...(args as [LocaleString, string | null]));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): RESTPostAPIContextMenuApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.type);\n\n\t\tvalidateLocalizationMap(this.name_localizations);\n\n\t\treturn { ...this };\n\t}\n}\n","import type { APIEmbed } from 'discord-api-types/v10';\n\n/**\n * Calculates the length of the embed.\n *\n * @param data - The embed data to check\n */\nexport function embedLength(data: APIEmbed) {\n\treturn (\n\t\t(data.title?.length ?? 0) +\n\t\t(data.description?.length ?? 0) +\n\t\t(data.fields?.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) ?? 0) +\n\t\t(data.footer?.text.length ?? 0) +\n\t\t(data.author?.name.length ?? 0)\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA,EAAA;AAAA,sCAAAA;AAAA,EAAA;AA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K,MACvF,KAAK,QAAQ,KAAK,UAAU,MAC5B,KAAK,QAAQ,KAAK,UAAU;AAE/B;AARgB;;;AzC6DT,IAAM,UAAU;","names":["Assertions_exports","Assertions_exports","import_shapeshift","import_v10","import_v10","import_v10","import_v10","import_v10","import_v10","import_v10","import_v10","import_v10","Assertions_exports","placeholderValidator","import_shapeshift","import_v10","placeholderValidator","placeholderValidator","isEqual","Assertions_exports","validateRequiredParameters","import_shapeshift","validateRequiredParameters","validateRequiredParameters","Assertions_exports","validateRequiredParameters","import_shapeshift","import_v10","descriptionPredicate","validateRequiredParameters","import_ts_mixer","import_v10","import_ts_mixer","import_v10","validateRequiredParameters","import_v10","import_v10","import_shapeshift","import_v10","import_shapeshift","import_v10","import_ts_mixer","import_shapeshift","import_v10","booleanPredicate","import_v10","import_shapeshift","import_v10","import_ts_mixer","numberValidator","import_v10","import_shapeshift","import_v10","import_ts_mixer","minLengthValidator","maxLengthValidator","import_v10","validateRequiredParameters","validateRequiredParameters","Assertions_exports","validateDMPermission","validateDefaultMemberPermissions","validateDefaultPermission","validateName","validateRequiredParameters","import_shapeshift","import_v10","namePredicate","booleanPredicate","validateDefaultPermission","validateName","validateRequiredParameters","dmPermissionPredicate","validateDMPermission","memberPermissionPredicate","validateDefaultMemberPermissions","validateName","validateDefaultPermission","validateDefaultMemberPermissions","validateDMPermission","validateRequiredParameters"]} \ No newline at end of file
diff --git a/node_modules/@discordjs/builders/dist/index.mjs b/node_modules/@discordjs/builders/dist/index.mjs
new file mode 100644
index 0000000..6577d9b
--- /dev/null
+++ b/node_modules/@discordjs/builders/dist/index.mjs
@@ -0,0 +1,2540 @@
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __decorateClass = (decorators, target, key, kind) => {
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
+ if (decorator = decorators[i])
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
+ if (kind && result)
+ __defProp(target, key, result);
+ return result;
+};
+
+// src/messages/embed/Assertions.ts
+var Assertions_exports = {};
+__export(Assertions_exports, {
+ RGBPredicate: () => RGBPredicate,
+ authorNamePredicate: () => authorNamePredicate,
+ colorPredicate: () => colorPredicate,
+ descriptionPredicate: () => descriptionPredicate,
+ embedAuthorPredicate: () => embedAuthorPredicate,
+ embedFieldPredicate: () => embedFieldPredicate,
+ embedFieldsArrayPredicate: () => embedFieldsArrayPredicate,
+ embedFooterPredicate: () => embedFooterPredicate,
+ fieldInlinePredicate: () => fieldInlinePredicate,
+ fieldLengthPredicate: () => fieldLengthPredicate,
+ fieldNamePredicate: () => fieldNamePredicate,
+ fieldValuePredicate: () => fieldValuePredicate,
+ footerTextPredicate: () => footerTextPredicate,
+ imageURLPredicate: () => imageURLPredicate,
+ timestampPredicate: () => timestampPredicate,
+ titlePredicate: () => titlePredicate,
+ urlPredicate: () => urlPredicate,
+ validateFieldLength: () => validateFieldLength
+});
+import { s } from "@sapphire/shapeshift";
+
+// src/util/validation.ts
+var validate = true;
+function enableValidators() {
+ return validate = true;
+}
+__name(enableValidators, "enableValidators");
+function disableValidators() {
+ return validate = false;
+}
+__name(disableValidators, "disableValidators");
+function isValidationEnabled() {
+ return validate;
+}
+__name(isValidationEnabled, "isValidationEnabled");
+
+// src/messages/embed/Assertions.ts
+var fieldNamePredicate = s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(256).setValidationEnabled(isValidationEnabled);
+var fieldValuePredicate = s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(1024).setValidationEnabled(isValidationEnabled);
+var fieldInlinePredicate = s.boolean.optional;
+var embedFieldPredicate = s.object({
+ name: fieldNamePredicate,
+ value: fieldValuePredicate,
+ inline: fieldInlinePredicate
+}).setValidationEnabled(isValidationEnabled);
+var embedFieldsArrayPredicate = embedFieldPredicate.array.setValidationEnabled(isValidationEnabled);
+var fieldLengthPredicate = s.number.lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
+function validateFieldLength(amountAdding, fields) {
+ fieldLengthPredicate.parse((fields?.length ?? 0) + amountAdding);
+}
+__name(validateFieldLength, "validateFieldLength");
+var authorNamePredicate = fieldNamePredicate.nullable.setValidationEnabled(isValidationEnabled);
+var imageURLPredicate = s.string.url({
+ allowedProtocols: ["http:", "https:", "attachment:"]
+}).nullish.setValidationEnabled(isValidationEnabled);
+var urlPredicate = s.string.url({
+ allowedProtocols: ["http:", "https:"]
+}).nullish.setValidationEnabled(isValidationEnabled);
+var embedAuthorPredicate = s.object({
+ name: authorNamePredicate,
+ iconURL: imageURLPredicate,
+ url: urlPredicate
+}).setValidationEnabled(isValidationEnabled);
+var RGBPredicate = s.number.int.greaterThanOrEqual(0).lessThanOrEqual(255).setValidationEnabled(isValidationEnabled);
+var colorPredicate = s.number.int.greaterThanOrEqual(0).lessThanOrEqual(16777215).or(s.tuple([RGBPredicate, RGBPredicate, RGBPredicate])).nullable.setValidationEnabled(isValidationEnabled);
+var descriptionPredicate = s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(4096).nullable.setValidationEnabled(isValidationEnabled);
+var footerTextPredicate = s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(2048).nullable.setValidationEnabled(isValidationEnabled);
+var embedFooterPredicate = s.object({
+ text: footerTextPredicate,
+ iconURL: imageURLPredicate
+}).setValidationEnabled(isValidationEnabled);
+var timestampPredicate = s.union(s.number, s.date).nullable.setValidationEnabled(isValidationEnabled);
+var titlePredicate = fieldNamePredicate.nullable.setValidationEnabled(isValidationEnabled);
+
+// src/util/normalizeArray.ts
+function normalizeArray(arr) {
+ if (Array.isArray(arr[0]))
+ return arr[0];
+ return arr;
+}
+__name(normalizeArray, "normalizeArray");
+
+// src/messages/embed/Embed.ts
+var EmbedBuilder = class {
+ static {
+ __name(this, "EmbedBuilder");
+ }
+ /**
+ * The API data associated with this embed.
+ */
+ data;
+ /**
+ * Creates a new embed from API data.
+ *
+ * @param data - The API data to create this embed with
+ */
+ constructor(data = {}) {
+ this.data = { ...data };
+ if (data.timestamp)
+ this.data.timestamp = new Date(data.timestamp).toISOString();
+ }
+ /**
+ * Appends fields to the embed.
+ *
+ * @remarks
+ * This method accepts either an array of fields or a variable number of field parameters.
+ * The maximum amount of fields that can be added is 25.
+ * @example
+ * Using an array:
+ * ```ts
+ * const fields: APIEmbedField[] = ...;
+ * const embed = new EmbedBuilder()
+ * .addFields(fields);
+ * ```
+ * @example
+ * Using rest parameters (variadic):
+ * ```ts
+ * const embed = new EmbedBuilder()
+ * .addFields(
+ * { name: 'Field 1', value: 'Value 1' },
+ * { name: 'Field 2', value: 'Value 2' },
+ * );
+ * ```
+ * @param fields - The fields to add
+ */
+ addFields(...fields) {
+ const normalizedFields = normalizeArray(fields);
+ validateFieldLength(normalizedFields.length, this.data.fields);
+ embedFieldsArrayPredicate.parse(normalizedFields);
+ if (this.data.fields)
+ this.data.fields.push(...normalizedFields);
+ else
+ this.data.fields = normalizedFields;
+ return this;
+ }
+ /**
+ * Removes, replaces, or inserts fields for this embed.
+ *
+ * @remarks
+ * This method behaves similarly
+ * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
+ * The maximum amount of fields that can be added is 25.
+ *
+ * It's useful for modifying and adjusting order of the already-existing fields of an embed.
+ * @example
+ * Remove the first field:
+ * ```ts
+ * embed.spliceFields(0, 1);
+ * ```
+ * @example
+ * Remove the first n fields:
+ * ```ts
+ * const n = 4;
+ * embed.spliceFields(0, n);
+ * ```
+ * @example
+ * Remove the last field:
+ * ```ts
+ * embed.spliceFields(-1, 1);
+ * ```
+ * @param index - The index to start at
+ * @param deleteCount - The number of fields to remove
+ * @param fields - The replacing field objects
+ */
+ spliceFields(index, deleteCount, ...fields) {
+ validateFieldLength(fields.length - deleteCount, this.data.fields);
+ embedFieldsArrayPredicate.parse(fields);
+ if (this.data.fields)
+ this.data.fields.splice(index, deleteCount, ...fields);
+ else
+ this.data.fields = fields;
+ return this;
+ }
+ /**
+ * Sets the fields for this embed.
+ *
+ * @remarks
+ * This method is an alias for {@link EmbedBuilder.spliceFields}. More specifically,
+ * it splices the entire array of fields, replacing them with the provided fields.
+ *
+ * You can set a maximum of 25 fields.
+ * @param fields - The fields to set
+ */
+ setFields(...fields) {
+ this.spliceFields(0, this.data.fields?.length ?? 0, ...normalizeArray(fields));
+ return this;
+ }
+ /**
+ * Sets the author of this embed.
+ *
+ * @param options - The options to use
+ */
+ setAuthor(options) {
+ if (options === null) {
+ this.data.author = void 0;
+ return this;
+ }
+ embedAuthorPredicate.parse(options);
+ this.data.author = { name: options.name, url: options.url, icon_url: options.iconURL };
+ return this;
+ }
+ /**
+ * Sets the color of this embed.
+ *
+ * @param color - The color to use
+ */
+ setColor(color) {
+ colorPredicate.parse(color);
+ if (Array.isArray(color)) {
+ const [red, green, blue] = color;
+ this.data.color = (red << 16) + (green << 8) + blue;
+ return this;
+ }
+ this.data.color = color ?? void 0;
+ return this;
+ }
+ /**
+ * Sets the description of this embed.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description) {
+ descriptionPredicate.parse(description);
+ this.data.description = description ?? void 0;
+ return this;
+ }
+ /**
+ * Sets the footer of this embed.
+ *
+ * @param options - The footer to use
+ */
+ setFooter(options) {
+ if (options === null) {
+ this.data.footer = void 0;
+ return this;
+ }
+ embedFooterPredicate.parse(options);
+ this.data.footer = { text: options.text, icon_url: options.iconURL };
+ return this;
+ }
+ /**
+ * Sets the image of this embed.
+ *
+ * @param url - The image URL to use
+ */
+ setImage(url) {
+ imageURLPredicate.parse(url);
+ this.data.image = url ? { url } : void 0;
+ return this;
+ }
+ /**
+ * Sets the thumbnail of this embed.
+ *
+ * @param url - The thumbnail URL to use
+ */
+ setThumbnail(url) {
+ imageURLPredicate.parse(url);
+ this.data.thumbnail = url ? { url } : void 0;
+ return this;
+ }
+ /**
+ * Sets the timestamp of this embed.
+ *
+ * @param timestamp - The timestamp or date to use
+ */
+ setTimestamp(timestamp = Date.now()) {
+ timestampPredicate.parse(timestamp);
+ this.data.timestamp = timestamp ? new Date(timestamp).toISOString() : void 0;
+ return this;
+ }
+ /**
+ * Sets the title for this embed.
+ *
+ * @param title - The title to use
+ */
+ setTitle(title) {
+ titlePredicate.parse(title);
+ this.data.title = title ?? void 0;
+ return this;
+ }
+ /**
+ * Sets the URL of this embed.
+ *
+ * @param url - The URL to use
+ */
+ setURL(url) {
+ urlPredicate.parse(url);
+ this.data.url = url ?? void 0;
+ return this;
+ }
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON() {
+ return { ...this.data };
+ }
+};
+
+// src/index.ts
+export * from "@discordjs/formatters";
+
+// src/components/Assertions.ts
+var Assertions_exports2 = {};
+__export(Assertions_exports2, {
+ buttonLabelValidator: () => buttonLabelValidator,
+ buttonStyleValidator: () => buttonStyleValidator,
+ channelTypesValidator: () => channelTypesValidator,
+ customIdValidator: () => customIdValidator,
+ defaultValidator: () => defaultValidator,
+ disabledValidator: () => disabledValidator,
+ emojiValidator: () => emojiValidator,
+ jsonOptionValidator: () => jsonOptionValidator,
+ labelValueDescriptionValidator: () => labelValueDescriptionValidator,
+ minMaxValidator: () => minMaxValidator,
+ optionValidator: () => optionValidator,
+ optionsLengthValidator: () => optionsLengthValidator,
+ optionsValidator: () => optionsValidator,
+ placeholderValidator: () => placeholderValidator,
+ urlValidator: () => urlValidator,
+ validateRequiredButtonParameters: () => validateRequiredButtonParameters,
+ validateRequiredSelectMenuOptionParameters: () => validateRequiredSelectMenuOptionParameters,
+ validateRequiredSelectMenuParameters: () => validateRequiredSelectMenuParameters
+});
+import { s as s2 } from "@sapphire/shapeshift";
+import { ButtonStyle, ChannelType } from "discord-api-types/v10";
+
+// src/components/selectMenu/StringSelectMenuOption.ts
+var StringSelectMenuOptionBuilder = class {
+ /**
+ * Creates a new string select menu option from API data.
+ *
+ * @param data - The API data to create this string select menu option with
+ * @example
+ * Creating a string select menu option from an API data object:
+ * ```ts
+ * const selectMenuOption = new SelectMenuOptionBuilder({
+ * label: 'catchy label',
+ * value: '1',
+ * });
+ * ```
+ * @example
+ * Creating a string select menu option using setters and API data:
+ * ```ts
+ * const selectMenuOption = new SelectMenuOptionBuilder({
+ * default: true,
+ * value: '1',
+ * })
+ * .setLabel('woah');
+ * ```
+ */
+ constructor(data = {}) {
+ this.data = data;
+ }
+ static {
+ __name(this, "StringSelectMenuOptionBuilder");
+ }
+ /**
+ * Sets the label for this option.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label) {
+ this.data.label = labelValueDescriptionValidator.parse(label);
+ return this;
+ }
+ /**
+ * Sets the value for this option.
+ *
+ * @param value - The value to use
+ */
+ setValue(value) {
+ this.data.value = labelValueDescriptionValidator.parse(value);
+ return this;
+ }
+ /**
+ * Sets the description for this option.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description) {
+ this.data.description = labelValueDescriptionValidator.parse(description);
+ return this;
+ }
+ /**
+ * Sets whether this option is selected by default.
+ *
+ * @param isDefault - Whether this option is selected by default
+ */
+ setDefault(isDefault = true) {
+ this.data.default = defaultValidator.parse(isDefault);
+ return this;
+ }
+ /**
+ * Sets the emoji to display for this option.
+ *
+ * @param emoji - The emoji to use
+ */
+ setEmoji(emoji) {
+ this.data.emoji = emojiValidator.parse(emoji);
+ return this;
+ }
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON() {
+ validateRequiredSelectMenuOptionParameters(this.data.label, this.data.value);
+ return {
+ ...this.data
+ };
+ }
+};
+
+// src/components/Assertions.ts
+var customIdValidator = s2.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
+var emojiValidator = s2.object({
+ id: s2.string,
+ name: s2.string,
+ animated: s2.boolean
+}).partial.strict.setValidationEnabled(isValidationEnabled);
+var disabledValidator = s2.boolean;
+var buttonLabelValidator = s2.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(80).setValidationEnabled(isValidationEnabled);
+var buttonStyleValidator = s2.nativeEnum(ButtonStyle);
+var placeholderValidator = s2.string.lengthLessThanOrEqual(150).setValidationEnabled(isValidationEnabled);
+var minMaxValidator = s2.number.int.greaterThanOrEqual(0).lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
+var labelValueDescriptionValidator = s2.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
+var jsonOptionValidator = s2.object({
+ label: labelValueDescriptionValidator,
+ value: labelValueDescriptionValidator,
+ description: labelValueDescriptionValidator.optional,
+ emoji: emojiValidator.optional,
+ default: s2.boolean.optional
+}).setValidationEnabled(isValidationEnabled);
+var optionValidator = s2.instance(StringSelectMenuOptionBuilder).setValidationEnabled(isValidationEnabled);
+var optionsValidator = optionValidator.array.lengthGreaterThanOrEqual(0).setValidationEnabled(isValidationEnabled);
+var optionsLengthValidator = s2.number.int.greaterThanOrEqual(0).lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
+function validateRequiredSelectMenuParameters(options, customId) {
+ customIdValidator.parse(customId);
+ optionsValidator.parse(options);
+}
+__name(validateRequiredSelectMenuParameters, "validateRequiredSelectMenuParameters");
+var defaultValidator = s2.boolean;
+function validateRequiredSelectMenuOptionParameters(label, value) {
+ labelValueDescriptionValidator.parse(label);
+ labelValueDescriptionValidator.parse(value);
+}
+__name(validateRequiredSelectMenuOptionParameters, "validateRequiredSelectMenuOptionParameters");
+var channelTypesValidator = s2.nativeEnum(ChannelType).array.setValidationEnabled(isValidationEnabled);
+var urlValidator = s2.string.url({
+ allowedProtocols: ["http:", "https:", "discord:"]
+}).setValidationEnabled(isValidationEnabled);
+function validateRequiredButtonParameters(style, label, emoji, customId, url) {
+ if (url && customId) {
+ throw new RangeError("URL and custom id are mutually exclusive");
+ }
+ if (!label && !emoji) {
+ throw new RangeError("Buttons must have a label and/or an emoji");
+ }
+ if (style === ButtonStyle.Link) {
+ if (!url) {
+ throw new RangeError("Link buttons must have a url");
+ }
+ } else if (url) {
+ throw new RangeError("Non-link buttons cannot have a url");
+ }
+}
+__name(validateRequiredButtonParameters, "validateRequiredButtonParameters");
+
+// src/components/ActionRow.ts
+import {
+ ComponentType as ComponentType9
+} from "discord-api-types/v10";
+
+// src/components/Component.ts
+var ComponentBuilder = class {
+ static {
+ __name(this, "ComponentBuilder");
+ }
+ /**
+ * The API data associated with this component.
+ */
+ data;
+ /**
+ * Constructs a new kind of component.
+ *
+ * @param data - The data to construct a component out of
+ */
+ constructor(data) {
+ this.data = data;
+ }
+};
+
+// src/components/Components.ts
+import { ComponentType as ComponentType8 } from "discord-api-types/v10";
+
+// src/components/button/Button.ts
+import {
+ ComponentType
+} from "discord-api-types/v10";
+var ButtonBuilder = class extends ComponentBuilder {
+ static {
+ __name(this, "ButtonBuilder");
+ }
+ /**
+ * Creates a new button from API data.
+ *
+ * @param data - The API data to create this button with
+ * @example
+ * Creating a button from an API data object:
+ * ```ts
+ * const button = new ButtonBuilder({
+ * custom_id: 'a cool button',
+ * style: ButtonStyle.Primary,
+ * label: 'Click Me',
+ * emoji: {
+ * name: 'smile',
+ * id: '123456789012345678',
+ * },
+ * });
+ * ```
+ * @example
+ * Creating a button using setters and API data:
+ * ```ts
+ * const button = new ButtonBuilder({
+ * style: ButtonStyle.Secondary,
+ * label: 'Click Me',
+ * })
+ * .setEmoji({ name: '🙂' })
+ * .setCustomId('another cool button');
+ * ```
+ */
+ constructor(data) {
+ super({ type: ComponentType.Button, ...data });
+ }
+ /**
+ * Sets the style of this button.
+ *
+ * @param style - The style to use
+ */
+ setStyle(style) {
+ this.data.style = buttonStyleValidator.parse(style);
+ return this;
+ }
+ /**
+ * Sets the URL for this button.
+ *
+ * @remarks
+ * This method is only available to buttons using the `Link` button style.
+ * Only three types of URL schemes are currently supported: `https://`, `http://`, and `discord://`.
+ * @param url - The URL to use
+ */
+ setURL(url) {
+ this.data.url = urlValidator.parse(url);
+ return this;
+ }
+ /**
+ * Sets the custom id for this button.
+ *
+ * @remarks
+ * This method is only applicable to buttons that are not using the `Link` button style.
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId) {
+ this.data.custom_id = customIdValidator.parse(customId);
+ return this;
+ }
+ /**
+ * Sets the emoji to display on this button.
+ *
+ * @param emoji - The emoji to use
+ */
+ setEmoji(emoji) {
+ this.data.emoji = emojiValidator.parse(emoji);
+ return this;
+ }
+ /**
+ * Sets whether this button is disabled.
+ *
+ * @param disabled - Whether to disable this button
+ */
+ setDisabled(disabled = true) {
+ this.data.disabled = disabledValidator.parse(disabled);
+ return this;
+ }
+ /**
+ * Sets the label for this button.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label) {
+ this.data.label = buttonLabelValidator.parse(label);
+ return this;
+ }
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON() {
+ validateRequiredButtonParameters(
+ this.data.style,
+ this.data.label,
+ this.data.emoji,
+ this.data.custom_id,
+ this.data.url
+ );
+ return {
+ ...this.data
+ };
+ }
+};
+
+// src/components/selectMenu/ChannelSelectMenu.ts
+import { ComponentType as ComponentType2 } from "discord-api-types/v10";
+
+// src/components/selectMenu/BaseSelectMenu.ts
+var BaseSelectMenuBuilder = class extends ComponentBuilder {
+ static {
+ __name(this, "BaseSelectMenuBuilder");
+ }
+ /**
+ * Sets the placeholder for this select menu.
+ *
+ * @param placeholder - The placeholder to use
+ */
+ setPlaceholder(placeholder) {
+ this.data.placeholder = placeholderValidator.parse(placeholder);
+ return this;
+ }
+ /**
+ * Sets the minimum values that must be selected in the select menu.
+ *
+ * @param minValues - The minimum values that must be selected
+ */
+ setMinValues(minValues) {
+ this.data.min_values = minMaxValidator.parse(minValues);
+ return this;
+ }
+ /**
+ * Sets the maximum values that must be selected in the select menu.
+ *
+ * @param maxValues - The maximum values that must be selected
+ */
+ setMaxValues(maxValues) {
+ this.data.max_values = minMaxValidator.parse(maxValues);
+ return this;
+ }
+ /**
+ * Sets the custom id for this select menu.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId) {
+ this.data.custom_id = customIdValidator.parse(customId);
+ return this;
+ }
+ /**
+ * Sets whether this select menu is disabled.
+ *
+ * @param disabled - Whether this select menu is disabled
+ */
+ setDisabled(disabled = true) {
+ this.data.disabled = disabledValidator.parse(disabled);
+ return this;
+ }
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON() {
+ customIdValidator.parse(this.data.custom_id);
+ return {
+ ...this.data
+ };
+ }
+};
+
+// src/components/selectMenu/ChannelSelectMenu.ts
+var ChannelSelectMenuBuilder = class extends BaseSelectMenuBuilder {
+ static {
+ __name(this, "ChannelSelectMenuBuilder");
+ }
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new ChannelSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new ChannelSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)
+ * .setMinValues(2);
+ * ```
+ */
+ constructor(data) {
+ super({ ...data, type: ComponentType2.ChannelSelect });
+ }
+ /**
+ * Adds channel types to this select menu.
+ *
+ * @param types - The channel types to use
+ */
+ addChannelTypes(...types) {
+ const normalizedTypes = normalizeArray(types);
+ this.data.channel_types ??= [];
+ this.data.channel_types.push(...channelTypesValidator.parse(normalizedTypes));
+ return this;
+ }
+ /**
+ * Sets channel types for this select menu.
+ *
+ * @param types - The channel types to use
+ */
+ setChannelTypes(...types) {
+ const normalizedTypes = normalizeArray(types);
+ this.data.channel_types ??= [];
+ this.data.channel_types.splice(0, this.data.channel_types.length, ...channelTypesValidator.parse(normalizedTypes));
+ return this;
+ }
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON() {
+ customIdValidator.parse(this.data.custom_id);
+ return {
+ ...this.data
+ };
+ }
+};
+
+// src/components/selectMenu/MentionableSelectMenu.ts
+import { ComponentType as ComponentType3 } from "discord-api-types/v10";
+var MentionableSelectMenuBuilder = class extends BaseSelectMenuBuilder {
+ static {
+ __name(this, "MentionableSelectMenuBuilder");
+ }
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new MentionableSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new MentionableSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data) {
+ super({ ...data, type: ComponentType3.MentionableSelect });
+ }
+};
+
+// src/components/selectMenu/RoleSelectMenu.ts
+import { ComponentType as ComponentType4 } from "discord-api-types/v10";
+var RoleSelectMenuBuilder = class extends BaseSelectMenuBuilder {
+ static {
+ __name(this, "RoleSelectMenuBuilder");
+ }
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new RoleSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new RoleSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data) {
+ super({ ...data, type: ComponentType4.RoleSelect });
+ }
+};
+
+// src/components/selectMenu/StringSelectMenu.ts
+import { ComponentType as ComponentType5 } from "discord-api-types/v10";
+var StringSelectMenuBuilder = class extends BaseSelectMenuBuilder {
+ static {
+ __name(this, "StringSelectMenuBuilder");
+ }
+ /**
+ * The options within this select menu.
+ */
+ options;
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new StringSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * options: [
+ * { label: 'option 1', value: '1' },
+ * { label: 'option 2', value: '2' },
+ * { label: 'option 3', value: '3' },
+ * ],
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new StringSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1)
+ * .addOptions({
+ * label: 'Catchy',
+ * value: 'catch',
+ * });
+ * ```
+ */
+ constructor(data) {
+ const { options, ...initData } = data ?? {};
+ super({ ...initData, type: ComponentType5.StringSelect });
+ this.options = options?.map((option) => new StringSelectMenuOptionBuilder(option)) ?? [];
+ }
+ /**
+ * Adds options to this select menu.
+ *
+ * @param options - The options to add
+ */
+ addOptions(...options) {
+ const normalizedOptions = normalizeArray(options);
+ optionsLengthValidator.parse(this.options.length + normalizedOptions.length);
+ this.options.push(
+ ...normalizedOptions.map(
+ (normalizedOption) => normalizedOption instanceof StringSelectMenuOptionBuilder ? normalizedOption : new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption))
+ )
+ );
+ return this;
+ }
+ /**
+ * Sets the options for this select menu.
+ *
+ * @param options - The options to set
+ */
+ setOptions(...options) {
+ return this.spliceOptions(0, this.options.length, ...options);
+ }
+ /**
+ * Removes, replaces, or inserts options for this select menu.
+ *
+ * @remarks
+ * This method behaves similarly
+ * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}.
+ * It's useful for modifying and adjusting the order of existing options.
+ * @example
+ * Remove the first option:
+ * ```ts
+ * selectMenu.spliceOptions(0, 1);
+ * ```
+ * @example
+ * Remove the first n option:
+ * ```ts
+ * const n = 4;
+ * selectMenu.spliceOptions(0, n);
+ * ```
+ * @example
+ * Remove the last option:
+ * ```ts
+ * selectMenu.spliceOptions(-1, 1);
+ * ```
+ * @param index - The index to start at
+ * @param deleteCount - The number of options to remove
+ * @param options - The replacing option objects or builders
+ */
+ spliceOptions(index, deleteCount, ...options) {
+ const normalizedOptions = normalizeArray(options);
+ const clone = [...this.options];
+ clone.splice(
+ index,
+ deleteCount,
+ ...normalizedOptions.map(
+ (normalizedOption) => normalizedOption instanceof StringSelectMenuOptionBuilder ? normalizedOption : new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption))
+ )
+ );
+ optionsLengthValidator.parse(clone.length);
+ this.options.splice(0, this.options.length, ...clone);
+ return this;
+ }
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON() {
+ validateRequiredSelectMenuParameters(this.options, this.data.custom_id);
+ return {
+ ...this.data,
+ options: this.options.map((option) => option.toJSON())
+ };
+ }
+};
+
+// src/components/selectMenu/UserSelectMenu.ts
+import { ComponentType as ComponentType6 } from "discord-api-types/v10";
+var UserSelectMenuBuilder = class extends BaseSelectMenuBuilder {
+ static {
+ __name(this, "UserSelectMenuBuilder");
+ }
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new UserSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new UserSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data) {
+ super({ ...data, type: ComponentType6.UserSelect });
+ }
+};
+
+// src/components/textInput/TextInput.ts
+import { isJSONEncodable } from "@discordjs/util";
+import { ComponentType as ComponentType7 } from "discord-api-types/v10";
+import isEqual from "fast-deep-equal";
+
+// src/components/textInput/Assertions.ts
+var Assertions_exports3 = {};
+__export(Assertions_exports3, {
+ labelValidator: () => labelValidator,
+ maxLengthValidator: () => maxLengthValidator,
+ minLengthValidator: () => minLengthValidator,
+ placeholderValidator: () => placeholderValidator2,
+ requiredValidator: () => requiredValidator,
+ textInputStyleValidator: () => textInputStyleValidator,
+ validateRequiredParameters: () => validateRequiredParameters,
+ valueValidator: () => valueValidator
+});
+import { s as s3 } from "@sapphire/shapeshift";
+import { TextInputStyle } from "discord-api-types/v10";
+var textInputStyleValidator = s3.nativeEnum(TextInputStyle);
+var minLengthValidator = s3.number.int.greaterThanOrEqual(0).lessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled);
+var maxLengthValidator = s3.number.int.greaterThanOrEqual(1).lessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled);
+var requiredValidator = s3.boolean;
+var valueValidator = s3.string.lengthLessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled);
+var placeholderValidator2 = s3.string.lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
+var labelValidator = s3.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45).setValidationEnabled(isValidationEnabled);
+function validateRequiredParameters(customId, style, label) {
+ customIdValidator.parse(customId);
+ textInputStyleValidator.parse(style);
+ labelValidator.parse(label);
+}
+__name(validateRequiredParameters, "validateRequiredParameters");
+
+// src/components/textInput/TextInput.ts
+var TextInputBuilder = class extends ComponentBuilder {
+ static {
+ __name(this, "TextInputBuilder");
+ }
+ /**
+ * Creates a new text input from API data.
+ *
+ * @param data - The API data to create this text input with
+ * @example
+ * Creating a select menu option from an API data object:
+ * ```ts
+ * const textInput = new TextInputBuilder({
+ * custom_id: 'a cool select menu',
+ * label: 'Type something',
+ * style: TextInputStyle.Short,
+ * });
+ * ```
+ * @example
+ * Creating a select menu option using setters and API data:
+ * ```ts
+ * const textInput = new TextInputBuilder({
+ * label: 'Type something else',
+ * })
+ * .setCustomId('woah')
+ * .setStyle(TextInputStyle.Paragraph);
+ * ```
+ */
+ constructor(data) {
+ super({ type: ComponentType7.TextInput, ...data });
+ }
+ /**
+ * Sets the custom id for this text input.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId) {
+ this.data.custom_id = customIdValidator.parse(customId);
+ return this;
+ }
+ /**
+ * Sets the label for this text input.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label) {
+ this.data.label = labelValidator.parse(label);
+ return this;
+ }
+ /**
+ * Sets the style for this text input.
+ *
+ * @param style - The style to use
+ */
+ setStyle(style) {
+ this.data.style = textInputStyleValidator.parse(style);
+ return this;
+ }
+ /**
+ * Sets the minimum length of text for this text input.
+ *
+ * @param minLength - The minimum length of text for this text input
+ */
+ setMinLength(minLength) {
+ this.data.min_length = minLengthValidator.parse(minLength);
+ return this;
+ }
+ /**
+ * Sets the maximum length of text for this text input.
+ *
+ * @param maxLength - The maximum length of text for this text input
+ */
+ setMaxLength(maxLength) {
+ this.data.max_length = maxLengthValidator.parse(maxLength);
+ return this;
+ }
+ /**
+ * Sets the placeholder for this text input.
+ *
+ * @param placeholder - The placeholder to use
+ */
+ setPlaceholder(placeholder) {
+ this.data.placeholder = placeholderValidator2.parse(placeholder);
+ return this;
+ }
+ /**
+ * Sets the value for this text input.
+ *
+ * @param value - The value to use
+ */
+ setValue(value) {
+ this.data.value = valueValidator.parse(value);
+ return this;
+ }
+ /**
+ * Sets whether this text input is required.
+ *
+ * @param required - Whether this text input is required
+ */
+ setRequired(required = true) {
+ this.data.required = requiredValidator.parse(required);
+ return this;
+ }
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON() {
+ validateRequiredParameters(this.data.custom_id, this.data.style, this.data.label);
+ return {
+ ...this.data
+ };
+ }
+ /**
+ * {@inheritDoc Equatable.equals}
+ */
+ equals(other) {
+ if (isJSONEncodable(other)) {
+ return isEqual(other.toJSON(), this.data);
+ }
+ return isEqual(other, this.data);
+ }
+};
+
+// src/components/Components.ts
+function createComponentBuilder(data) {
+ if (data instanceof ComponentBuilder) {
+ return data;
+ }
+ switch (data.type) {
+ case ComponentType8.ActionRow:
+ return new ActionRowBuilder(data);
+ case ComponentType8.Button:
+ return new ButtonBuilder(data);
+ case ComponentType8.StringSelect:
+ return new StringSelectMenuBuilder(data);
+ case ComponentType8.TextInput:
+ return new TextInputBuilder(data);
+ case ComponentType8.UserSelect:
+ return new UserSelectMenuBuilder(data);
+ case ComponentType8.RoleSelect:
+ return new RoleSelectMenuBuilder(data);
+ case ComponentType8.MentionableSelect:
+ return new MentionableSelectMenuBuilder(data);
+ case ComponentType8.ChannelSelect:
+ return new ChannelSelectMenuBuilder(data);
+ default:
+ throw new Error(`Cannot properly serialize component type: ${data.type}`);
+ }
+}
+__name(createComponentBuilder, "createComponentBuilder");
+
+// src/components/ActionRow.ts
+var ActionRowBuilder = class extends ComponentBuilder {
+ static {
+ __name(this, "ActionRowBuilder");
+ }
+ /**
+ * The components within this action row.
+ */
+ components;
+ /**
+ * Creates a new action row from API data.
+ *
+ * @param data - The API data to create this action row with
+ * @example
+ * Creating an action row from an API data object:
+ * ```ts
+ * const actionRow = new ActionRowBuilder({
+ * components: [
+ * {
+ * custom_id: "custom id",
+ * label: "Type something",
+ * style: TextInputStyle.Short,
+ * type: ComponentType.TextInput,
+ * },
+ * ],
+ * });
+ * ```
+ * @example
+ * Creating an action row using setters and API data:
+ * ```ts
+ * const actionRow = new ActionRowBuilder({
+ * components: [
+ * {
+ * custom_id: "custom id",
+ * label: "Click me",
+ * style: ButtonStyle.Primary,
+ * type: ComponentType.Button,
+ * },
+ * ],
+ * })
+ * .addComponents(button2, button3);
+ * ```
+ */
+ constructor({ components, ...data } = {}) {
+ super({ type: ComponentType9.ActionRow, ...data });
+ this.components = components?.map((component) => createComponentBuilder(component)) ?? [];
+ }
+ /**
+ * Adds components to this action row.
+ *
+ * @param components - The components to add
+ */
+ addComponents(...components) {
+ this.components.push(...normalizeArray(components));
+ return this;
+ }
+ /**
+ * Sets components for this action row.
+ *
+ * @param components - The components to set
+ */
+ setComponents(...components) {
+ this.components.splice(0, this.components.length, ...normalizeArray(components));
+ return this;
+ }
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON() {
+ return {
+ ...this.data,
+ components: this.components.map((component) => component.toJSON())
+ };
+ }
+};
+
+// src/interactions/modals/Assertions.ts
+var Assertions_exports4 = {};
+__export(Assertions_exports4, {
+ componentsValidator: () => componentsValidator,
+ titleValidator: () => titleValidator,
+ validateRequiredParameters: () => validateRequiredParameters2
+});
+import { s as s4 } from "@sapphire/shapeshift";
+var titleValidator = s4.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45).setValidationEnabled(isValidationEnabled);
+var componentsValidator = s4.instance(ActionRowBuilder).array.lengthGreaterThanOrEqual(1).setValidationEnabled(isValidationEnabled);
+function validateRequiredParameters2(customId, title, components) {
+ customIdValidator.parse(customId);
+ titleValidator.parse(title);
+ componentsValidator.parse(components);
+}
+__name(validateRequiredParameters2, "validateRequiredParameters");
+
+// src/interactions/modals/Modal.ts
+var ModalBuilder = class {
+ static {
+ __name(this, "ModalBuilder");
+ }
+ /**
+ * The API data associated with this modal.
+ */
+ data;
+ /**
+ * The components within this modal.
+ */
+ components = [];
+ /**
+ * Creates a new modal from API data.
+ *
+ * @param data - The API data to create this modal with
+ */
+ constructor({ components, ...data } = {}) {
+ this.data = { ...data };
+ this.components = components?.map((component) => createComponentBuilder(component)) ?? [];
+ }
+ /**
+ * Sets the title of this modal.
+ *
+ * @param title - The title to use
+ */
+ setTitle(title) {
+ this.data.title = titleValidator.parse(title);
+ return this;
+ }
+ /**
+ * Sets the custom id of this modal.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId) {
+ this.data.custom_id = customIdValidator.parse(customId);
+ return this;
+ }
+ /**
+ * Adds components to this modal.
+ *
+ * @param components - The components to add
+ */
+ addComponents(...components) {
+ this.components.push(
+ ...normalizeArray(components).map(
+ (component) => component instanceof ActionRowBuilder ? component : new ActionRowBuilder(component)
+ )
+ );
+ return this;
+ }
+ /**
+ * Sets components for this modal.
+ *
+ * @param components - The components to set
+ */
+ setComponents(...components) {
+ this.components.splice(0, this.components.length, ...normalizeArray(components));
+ return this;
+ }
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON() {
+ validateRequiredParameters2(this.data.custom_id, this.data.title, this.components);
+ return {
+ ...this.data,
+ components: this.components.map((component) => component.toJSON())
+ };
+ }
+};
+
+// src/interactions/slashCommands/Assertions.ts
+var Assertions_exports5 = {};
+__export(Assertions_exports5, {
+ assertReturnOfBuilder: () => assertReturnOfBuilder,
+ localizationMapPredicate: () => localizationMapPredicate,
+ validateChoicesLength: () => validateChoicesLength,
+ validateDMPermission: () => validateDMPermission,
+ validateDefaultMemberPermissions: () => validateDefaultMemberPermissions,
+ validateDefaultPermission: () => validateDefaultPermission,
+ validateDescription: () => validateDescription,
+ validateLocale: () => validateLocale,
+ validateLocalizationMap: () => validateLocalizationMap,
+ validateMaxOptionsLength: () => validateMaxOptionsLength,
+ validateNSFW: () => validateNSFW,
+ validateName: () => validateName,
+ validateRequired: () => validateRequired,
+ validateRequiredParameters: () => validateRequiredParameters3
+});
+import { s as s5 } from "@sapphire/shapeshift";
+import { Locale } from "discord-api-types/v10";
+var namePredicate = s5.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^[\p{Ll}\p{Lm}\p{Lo}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u).setValidationEnabled(isValidationEnabled);
+function validateName(name) {
+ namePredicate.parse(name);
+}
+__name(validateName, "validateName");
+var descriptionPredicate2 = s5.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
+var localePredicate = s5.nativeEnum(Locale);
+function validateDescription(description) {
+ descriptionPredicate2.parse(description);
+}
+__name(validateDescription, "validateDescription");
+var maxArrayLengthPredicate = s5.unknown.array.lengthLessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
+function validateLocale(locale) {
+ return localePredicate.parse(locale);
+}
+__name(validateLocale, "validateLocale");
+function validateMaxOptionsLength(options) {
+ maxArrayLengthPredicate.parse(options);
+}
+__name(validateMaxOptionsLength, "validateMaxOptionsLength");
+function validateRequiredParameters3(name, description, options) {
+ validateName(name);
+ validateDescription(description);
+ validateMaxOptionsLength(options);
+}
+__name(validateRequiredParameters3, "validateRequiredParameters");
+var booleanPredicate = s5.boolean;
+function validateDefaultPermission(value) {
+ booleanPredicate.parse(value);
+}
+__name(validateDefaultPermission, "validateDefaultPermission");
+function validateRequired(required) {
+ booleanPredicate.parse(required);
+}
+__name(validateRequired, "validateRequired");
+var choicesLengthPredicate = s5.number.lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
+function validateChoicesLength(amountAdding, choices) {
+ choicesLengthPredicate.parse((choices?.length ?? 0) + amountAdding);
+}
+__name(validateChoicesLength, "validateChoicesLength");
+function assertReturnOfBuilder(input, ExpectedInstanceOf) {
+ s5.instance(ExpectedInstanceOf).parse(input);
+}
+__name(assertReturnOfBuilder, "assertReturnOfBuilder");
+var localizationMapPredicate = s5.object(Object.fromEntries(Object.values(Locale).map((locale) => [locale, s5.string.nullish]))).strict.nullish.setValidationEnabled(isValidationEnabled);
+function validateLocalizationMap(value) {
+ localizationMapPredicate.parse(value);
+}
+__name(validateLocalizationMap, "validateLocalizationMap");
+var dmPermissionPredicate = s5.boolean.nullish;
+function validateDMPermission(value) {
+ dmPermissionPredicate.parse(value);
+}
+__name(validateDMPermission, "validateDMPermission");
+var memberPermissionPredicate = s5.union(
+ s5.bigint.transform((value) => value.toString()),
+ s5.number.safeInt.transform((value) => value.toString()),
+ s5.string.regex(/^\d+$/)
+).nullish;
+function validateDefaultMemberPermissions(permissions) {
+ return memberPermissionPredicate.parse(permissions);
+}
+__name(validateDefaultMemberPermissions, "validateDefaultMemberPermissions");
+function validateNSFW(value) {
+ booleanPredicate.parse(value);
+}
+__name(validateNSFW, "validateNSFW");
+
+// src/interactions/slashCommands/SlashCommandBuilder.ts
+import { mix as mix6 } from "ts-mixer";
+
+// src/interactions/slashCommands/SlashCommandSubcommands.ts
+import {
+ ApplicationCommandOptionType as ApplicationCommandOptionType11
+} from "discord-api-types/v10";
+import { mix as mix5 } from "ts-mixer";
+
+// src/interactions/slashCommands/mixins/NameAndDescription.ts
+var SharedNameAndDescription = class {
+ static {
+ __name(this, "SharedNameAndDescription");
+ }
+ /**
+ * The name of this command.
+ */
+ name;
+ /**
+ * The name localizations of this command.
+ */
+ name_localizations;
+ /**
+ * The description of this command.
+ */
+ description;
+ /**
+ * The description localizations of this command.
+ */
+ description_localizations;
+ /**
+ * Sets the name of this command.
+ *
+ * @param name - The name to use
+ */
+ setName(name) {
+ validateName(name);
+ Reflect.set(this, "name", name);
+ return this;
+ }
+ /**
+ * Sets the description of this command.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description) {
+ validateDescription(description);
+ Reflect.set(this, "description", description);
+ return this;
+ }
+ /**
+ * Sets a name localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedName - The localized name for the given `locale`
+ */
+ setNameLocalization(locale, localizedName) {
+ if (!this.name_localizations) {
+ Reflect.set(this, "name_localizations", {});
+ }
+ const parsedLocale = validateLocale(locale);
+ if (localizedName === null) {
+ this.name_localizations[parsedLocale] = null;
+ return this;
+ }
+ validateName(localizedName);
+ this.name_localizations[parsedLocale] = localizedName;
+ return this;
+ }
+ /**
+ * Sets the name localizations for this command.
+ *
+ * @param localizedNames - The object of localized names to set
+ */
+ setNameLocalizations(localizedNames) {
+ if (localizedNames === null) {
+ Reflect.set(this, "name_localizations", null);
+ return this;
+ }
+ Reflect.set(this, "name_localizations", {});
+ for (const args of Object.entries(localizedNames)) {
+ this.setNameLocalization(...args);
+ }
+ return this;
+ }
+ /**
+ * Sets a description localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedDescription - The localized description for the given locale
+ */
+ setDescriptionLocalization(locale, localizedDescription) {
+ if (!this.description_localizations) {
+ Reflect.set(this, "description_localizations", {});
+ }
+ const parsedLocale = validateLocale(locale);
+ if (localizedDescription === null) {
+ this.description_localizations[parsedLocale] = null;
+ return this;
+ }
+ validateDescription(localizedDescription);
+ this.description_localizations[parsedLocale] = localizedDescription;
+ return this;
+ }
+ /**
+ * Sets the description localizations for this command.
+ *
+ * @param localizedDescriptions - The object of localized descriptions to set
+ */
+ setDescriptionLocalizations(localizedDescriptions) {
+ if (localizedDescriptions === null) {
+ Reflect.set(this, "description_localizations", null);
+ return this;
+ }
+ Reflect.set(this, "description_localizations", {});
+ for (const args of Object.entries(localizedDescriptions)) {
+ this.setDescriptionLocalization(...args);
+ }
+ return this;
+ }
+};
+
+// src/interactions/slashCommands/options/attachment.ts
+import { ApplicationCommandOptionType } from "discord-api-types/v10";
+
+// src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts
+var ApplicationCommandOptionBase = class extends SharedNameAndDescription {
+ static {
+ __name(this, "ApplicationCommandOptionBase");
+ }
+ /**
+ * Whether this option is required.
+ *
+ * @defaultValue `false`
+ */
+ required = false;
+ /**
+ * Sets whether this option is required.
+ *
+ * @param required - Whether this option should be required
+ */
+ setRequired(required) {
+ validateRequired(required);
+ Reflect.set(this, "required", required);
+ return this;
+ }
+ /**
+ * This method runs required validators on this builder.
+ */
+ runRequiredValidations() {
+ validateRequiredParameters3(this.name, this.description, []);
+ validateLocalizationMap(this.name_localizations);
+ validateLocalizationMap(this.description_localizations);
+ validateRequired(this.required);
+ }
+};
+
+// src/interactions/slashCommands/options/attachment.ts
+var SlashCommandAttachmentOption = class extends ApplicationCommandOptionBase {
+ static {
+ __name(this, "SlashCommandAttachmentOption");
+ }
+ /**
+ * The type of this option.
+ */
+ type = ApplicationCommandOptionType.Attachment;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+
+// src/interactions/slashCommands/options/boolean.ts
+import { ApplicationCommandOptionType as ApplicationCommandOptionType2 } from "discord-api-types/v10";
+var SlashCommandBooleanOption = class extends ApplicationCommandOptionBase {
+ static {
+ __name(this, "SlashCommandBooleanOption");
+ }
+ /**
+ * The type of this option.
+ */
+ type = ApplicationCommandOptionType2.Boolean;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+
+// src/interactions/slashCommands/options/channel.ts
+import { ApplicationCommandOptionType as ApplicationCommandOptionType3 } from "discord-api-types/v10";
+import { mix } from "ts-mixer";
+
+// src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts
+import { s as s6 } from "@sapphire/shapeshift";
+import { ChannelType as ChannelType2 } from "discord-api-types/v10";
+var allowedChannelTypes = [
+ ChannelType2.GuildText,
+ ChannelType2.GuildVoice,
+ ChannelType2.GuildCategory,
+ ChannelType2.GuildAnnouncement,
+ ChannelType2.AnnouncementThread,
+ ChannelType2.PublicThread,
+ ChannelType2.PrivateThread,
+ ChannelType2.GuildStageVoice,
+ ChannelType2.GuildForum
+];
+var channelTypesPredicate = s6.array(s6.union(...allowedChannelTypes.map((type) => s6.literal(type))));
+var ApplicationCommandOptionChannelTypesMixin = class {
+ static {
+ __name(this, "ApplicationCommandOptionChannelTypesMixin");
+ }
+ /**
+ * The channel types of this option.
+ */
+ channel_types;
+ /**
+ * Adds channel types to this option.
+ *
+ * @param channelTypes - The channel types
+ */
+ addChannelTypes(...channelTypes) {
+ if (this.channel_types === void 0) {
+ Reflect.set(this, "channel_types", []);
+ }
+ this.channel_types.push(...channelTypesPredicate.parse(channelTypes));
+ return this;
+ }
+};
+
+// src/interactions/slashCommands/options/channel.ts
+var SlashCommandChannelOption = class extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ type = ApplicationCommandOptionType3.Channel;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+__name(SlashCommandChannelOption, "SlashCommandChannelOption");
+SlashCommandChannelOption = __decorateClass([
+ mix(ApplicationCommandOptionChannelTypesMixin)
+], SlashCommandChannelOption);
+
+// src/interactions/slashCommands/options/integer.ts
+import { s as s8 } from "@sapphire/shapeshift";
+import { ApplicationCommandOptionType as ApplicationCommandOptionType5 } from "discord-api-types/v10";
+import { mix as mix2 } from "ts-mixer";
+
+// src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts
+var ApplicationCommandNumericOptionMinMaxValueMixin = class {
+ static {
+ __name(this, "ApplicationCommandNumericOptionMinMaxValueMixin");
+ }
+ /**
+ * The maximum value of this option.
+ */
+ max_value;
+ /**
+ * The minimum value of this option.
+ */
+ min_value;
+};
+
+// src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts
+import { s as s7 } from "@sapphire/shapeshift";
+import { ApplicationCommandOptionType as ApplicationCommandOptionType4 } from "discord-api-types/v10";
+var stringPredicate = s7.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100);
+var numberPredicate = s7.number.greaterThan(Number.NEGATIVE_INFINITY).lessThan(Number.POSITIVE_INFINITY);
+var choicesPredicate = s7.object({
+ name: stringPredicate,
+ name_localizations: localizationMapPredicate,
+ value: s7.union(stringPredicate, numberPredicate)
+}).array;
+var booleanPredicate2 = s7.boolean;
+var ApplicationCommandOptionWithChoicesAndAutocompleteMixin = class {
+ static {
+ __name(this, "ApplicationCommandOptionWithChoicesAndAutocompleteMixin");
+ }
+ /**
+ * The choices of this option.
+ */
+ choices;
+ /**
+ * Whether this option utilizes autocomplete.
+ */
+ autocomplete;
+ /**
+ * The type of this option.
+ *
+ * @privateRemarks Since this is present and this is a mixin, this is needed.
+ */
+ type;
+ /**
+ * Adds multiple choices to this option.
+ *
+ * @param choices - The choices to add
+ */
+ addChoices(...choices) {
+ if (choices.length > 0 && this.autocomplete) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ choicesPredicate.parse(choices);
+ if (this.choices === void 0) {
+ Reflect.set(this, "choices", []);
+ }
+ validateChoicesLength(choices.length, this.choices);
+ for (const { name, name_localizations, value } of choices) {
+ if (this.type === ApplicationCommandOptionType4.String) {
+ stringPredicate.parse(value);
+ } else {
+ numberPredicate.parse(value);
+ }
+ this.choices.push({ name, name_localizations, value });
+ }
+ return this;
+ }
+ /**
+ * Sets multiple choices for this option.
+ *
+ * @param choices - The choices to set
+ */
+ setChoices(...choices) {
+ if (choices.length > 0 && this.autocomplete) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ choicesPredicate.parse(choices);
+ Reflect.set(this, "choices", []);
+ this.addChoices(...choices);
+ return this;
+ }
+ /**
+ * Whether this option uses autocomplete.
+ *
+ * @param autocomplete - Whether this option should use autocomplete
+ */
+ setAutocomplete(autocomplete) {
+ booleanPredicate2.parse(autocomplete);
+ if (autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ Reflect.set(this, "autocomplete", autocomplete);
+ return this;
+ }
+};
+
+// src/interactions/slashCommands/options/integer.ts
+var numberValidator = s8.number.int;
+var SlashCommandIntegerOption = class extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ type = ApplicationCommandOptionType5.Integer;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
+ */
+ setMaxValue(max) {
+ numberValidator.parse(max);
+ Reflect.set(this, "max_value", max);
+ return this;
+ }
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}
+ */
+ setMinValue(min) {
+ numberValidator.parse(min);
+ Reflect.set(this, "min_value", min);
+ return this;
+ }
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ return { ...this };
+ }
+};
+__name(SlashCommandIntegerOption, "SlashCommandIntegerOption");
+SlashCommandIntegerOption = __decorateClass([
+ mix2(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)
+], SlashCommandIntegerOption);
+
+// src/interactions/slashCommands/options/mentionable.ts
+import { ApplicationCommandOptionType as ApplicationCommandOptionType6 } from "discord-api-types/v10";
+var SlashCommandMentionableOption = class extends ApplicationCommandOptionBase {
+ static {
+ __name(this, "SlashCommandMentionableOption");
+ }
+ /**
+ * The type of this option.
+ */
+ type = ApplicationCommandOptionType6.Mentionable;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+
+// src/interactions/slashCommands/options/number.ts
+import { s as s9 } from "@sapphire/shapeshift";
+import { ApplicationCommandOptionType as ApplicationCommandOptionType7 } from "discord-api-types/v10";
+import { mix as mix3 } from "ts-mixer";
+var numberValidator2 = s9.number;
+var SlashCommandNumberOption = class extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ type = ApplicationCommandOptionType7.Number;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
+ */
+ setMaxValue(max) {
+ numberValidator2.parse(max);
+ Reflect.set(this, "max_value", max);
+ return this;
+ }
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}
+ */
+ setMinValue(min) {
+ numberValidator2.parse(min);
+ Reflect.set(this, "min_value", min);
+ return this;
+ }
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ return { ...this };
+ }
+};
+__name(SlashCommandNumberOption, "SlashCommandNumberOption");
+SlashCommandNumberOption = __decorateClass([
+ mix3(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)
+], SlashCommandNumberOption);
+
+// src/interactions/slashCommands/options/role.ts
+import { ApplicationCommandOptionType as ApplicationCommandOptionType8 } from "discord-api-types/v10";
+var SlashCommandRoleOption = class extends ApplicationCommandOptionBase {
+ static {
+ __name(this, "SlashCommandRoleOption");
+ }
+ /**
+ * The type of this option.
+ */
+ type = ApplicationCommandOptionType8.Role;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+
+// src/interactions/slashCommands/options/string.ts
+import { s as s10 } from "@sapphire/shapeshift";
+import { ApplicationCommandOptionType as ApplicationCommandOptionType9 } from "discord-api-types/v10";
+import { mix as mix4 } from "ts-mixer";
+var minLengthValidator2 = s10.number.greaterThanOrEqual(0).lessThanOrEqual(6e3);
+var maxLengthValidator2 = s10.number.greaterThanOrEqual(1).lessThanOrEqual(6e3);
+var SlashCommandStringOption = class extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ type = ApplicationCommandOptionType9.String;
+ /**
+ * The maximum length of this option.
+ */
+ max_length;
+ /**
+ * The minimum length of this option.
+ */
+ min_length;
+ /**
+ * Sets the maximum length of this string option.
+ *
+ * @param max - The maximum length this option can be
+ */
+ setMaxLength(max) {
+ maxLengthValidator2.parse(max);
+ Reflect.set(this, "max_length", max);
+ return this;
+ }
+ /**
+ * Sets the minimum length of this string option.
+ *
+ * @param min - The minimum length this option can be
+ */
+ setMinLength(min) {
+ minLengthValidator2.parse(min);
+ Reflect.set(this, "min_length", min);
+ return this;
+ }
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ return { ...this };
+ }
+};
+__name(SlashCommandStringOption, "SlashCommandStringOption");
+SlashCommandStringOption = __decorateClass([
+ mix4(ApplicationCommandOptionWithChoicesAndAutocompleteMixin)
+], SlashCommandStringOption);
+
+// src/interactions/slashCommands/options/user.ts
+import { ApplicationCommandOptionType as ApplicationCommandOptionType10 } from "discord-api-types/v10";
+var SlashCommandUserOption = class extends ApplicationCommandOptionBase {
+ static {
+ __name(this, "SlashCommandUserOption");
+ }
+ /**
+ * The type of this option.
+ */
+ type = ApplicationCommandOptionType10.User;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+
+// src/interactions/slashCommands/mixins/SharedSlashCommandOptions.ts
+var SharedSlashCommandOptions = class {
+ static {
+ __name(this, "SharedSlashCommandOptions");
+ }
+ options;
+ /**
+ * Adds a boolean option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addBooleanOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandBooleanOption);
+ }
+ /**
+ * Adds a user option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addUserOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandUserOption);
+ }
+ /**
+ * Adds a channel option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addChannelOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandChannelOption);
+ }
+ /**
+ * Adds a role option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addRoleOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandRoleOption);
+ }
+ /**
+ * Adds an attachment option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addAttachmentOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandAttachmentOption);
+ }
+ /**
+ * Adds a mentionable option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addMentionableOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandMentionableOption);
+ }
+ /**
+ * Adds a string option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addStringOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandStringOption);
+ }
+ /**
+ * Adds an integer option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addIntegerOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandIntegerOption);
+ }
+ /**
+ * Adds a number option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addNumberOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandNumberOption);
+ }
+ /**
+ * Where the actual adding magic happens. ✨
+ *
+ * @param input - The input. What else?
+ * @param Instance - The instance of whatever is being added
+ * @internal
+ */
+ _sharedAddOptionMethod(input, Instance) {
+ const { options } = this;
+ validateMaxOptionsLength(options);
+ const result = typeof input === "function" ? input(new Instance()) : input;
+ assertReturnOfBuilder(result, Instance);
+ options.push(result);
+ return this;
+ }
+};
+
+// src/interactions/slashCommands/SlashCommandSubcommands.ts
+var SlashCommandSubcommandGroupBuilder = class {
+ /**
+ * The name of this subcommand group.
+ */
+ name = void 0;
+ /**
+ * The description of this subcommand group.
+ */
+ description = void 0;
+ /**
+ * The subcommands within this subcommand group.
+ */
+ options = [];
+ /**
+ * Adds a new subcommand to this group.
+ *
+ * @param input - A function that returns a subcommand builder or an already built builder
+ */
+ addSubcommand(input) {
+ const { options } = this;
+ validateMaxOptionsLength(options);
+ const result = typeof input === "function" ? input(new SlashCommandSubcommandBuilder()) : input;
+ assertReturnOfBuilder(result, SlashCommandSubcommandBuilder);
+ options.push(result);
+ return this;
+ }
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON() {
+ validateRequiredParameters3(this.name, this.description, this.options);
+ return {
+ type: ApplicationCommandOptionType11.SubcommandGroup,
+ name: this.name,
+ name_localizations: this.name_localizations,
+ description: this.description,
+ description_localizations: this.description_localizations,
+ options: this.options.map((option) => option.toJSON())
+ };
+ }
+};
+__name(SlashCommandSubcommandGroupBuilder, "SlashCommandSubcommandGroupBuilder");
+SlashCommandSubcommandGroupBuilder = __decorateClass([
+ mix5(SharedNameAndDescription)
+], SlashCommandSubcommandGroupBuilder);
+var SlashCommandSubcommandBuilder = class {
+ /**
+ * The name of this subcommand.
+ */
+ name = void 0;
+ /**
+ * The description of this subcommand.
+ */
+ description = void 0;
+ /**
+ * The options within this subcommand.
+ */
+ options = [];
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON() {
+ validateRequiredParameters3(this.name, this.description, this.options);
+ return {
+ type: ApplicationCommandOptionType11.Subcommand,
+ name: this.name,
+ name_localizations: this.name_localizations,
+ description: this.description,
+ description_localizations: this.description_localizations,
+ options: this.options.map((option) => option.toJSON())
+ };
+ }
+};
+__name(SlashCommandSubcommandBuilder, "SlashCommandSubcommandBuilder");
+SlashCommandSubcommandBuilder = __decorateClass([
+ mix5(SharedNameAndDescription, SharedSlashCommandOptions)
+], SlashCommandSubcommandBuilder);
+
+// src/interactions/slashCommands/SlashCommandBuilder.ts
+var SlashCommandBuilder = class {
+ /**
+ * The name of this command.
+ */
+ name = void 0;
+ /**
+ * The name localizations of this command.
+ */
+ name_localizations;
+ /**
+ * The description of this command.
+ */
+ description = void 0;
+ /**
+ * The description localizations of this command.
+ */
+ description_localizations;
+ /**
+ * The options of this command.
+ */
+ options = [];
+ /**
+ * Whether this command is enabled by default when the application is added to a guild.
+ *
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ default_permission = void 0;
+ /**
+ * The set of permissions represented as a bit set for the command.
+ */
+ default_member_permissions = void 0;
+ /**
+ * Indicates whether the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This property is only for global commands.
+ */
+ dm_permission = void 0;
+ /**
+ * Whether this command is NSFW.
+ */
+ nsfw = void 0;
+ /**
+ * Sets whether the command is enabled by default when the application is added to a guild.
+ *
+ * @remarks
+ * If set to `false`, you will have to later `PUT` the permissions for this command.
+ * @param value - Whether or not to enable this command by default
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ * @deprecated Use {@link SlashCommandBuilder.setDefaultMemberPermissions} or {@link SlashCommandBuilder.setDMPermission} instead.
+ */
+ setDefaultPermission(value) {
+ validateDefaultPermission(value);
+ Reflect.set(this, "default_permission", value);
+ return this;
+ }
+ /**
+ * Sets the default permissions a member should have in order to run the command.
+ *
+ * @remarks
+ * You can set this to `'0'` to disable the command by default.
+ * @param permissions - The permissions bit field to set
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDefaultMemberPermissions(permissions) {
+ const permissionValue = validateDefaultMemberPermissions(permissions);
+ Reflect.set(this, "default_member_permissions", permissionValue);
+ return this;
+ }
+ /**
+ * Sets if the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This method is only for global commands.
+ * @param enabled - Whether the command should be enabled in direct messages
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDMPermission(enabled) {
+ validateDMPermission(enabled);
+ Reflect.set(this, "dm_permission", enabled);
+ return this;
+ }
+ /**
+ * Sets whether this command is NSFW.
+ *
+ * @param nsfw - Whether this command is NSFW
+ */
+ setNSFW(nsfw = true) {
+ validateNSFW(nsfw);
+ Reflect.set(this, "nsfw", nsfw);
+ return this;
+ }
+ /**
+ * Adds a new subcommand group to this command.
+ *
+ * @param input - A function that returns a subcommand group builder or an already built builder
+ */
+ addSubcommandGroup(input) {
+ const { options } = this;
+ validateMaxOptionsLength(options);
+ const result = typeof input === "function" ? input(new SlashCommandSubcommandGroupBuilder()) : input;
+ assertReturnOfBuilder(result, SlashCommandSubcommandGroupBuilder);
+ options.push(result);
+ return this;
+ }
+ /**
+ * Adds a new subcommand to this command.
+ *
+ * @param input - A function that returns a subcommand builder or an already built builder
+ */
+ addSubcommand(input) {
+ const { options } = this;
+ validateMaxOptionsLength(options);
+ const result = typeof input === "function" ? input(new SlashCommandSubcommandBuilder()) : input;
+ assertReturnOfBuilder(result, SlashCommandSubcommandBuilder);
+ options.push(result);
+ return this;
+ }
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON() {
+ validateRequiredParameters3(this.name, this.description, this.options);
+ validateLocalizationMap(this.name_localizations);
+ validateLocalizationMap(this.description_localizations);
+ return {
+ ...this,
+ options: this.options.map((option) => option.toJSON())
+ };
+ }
+};
+__name(SlashCommandBuilder, "SlashCommandBuilder");
+SlashCommandBuilder = __decorateClass([
+ mix6(SharedSlashCommandOptions, SharedNameAndDescription)
+], SlashCommandBuilder);
+
+// src/interactions/contextMenuCommands/Assertions.ts
+var Assertions_exports6 = {};
+__export(Assertions_exports6, {
+ validateDMPermission: () => validateDMPermission2,
+ validateDefaultMemberPermissions: () => validateDefaultMemberPermissions2,
+ validateDefaultPermission: () => validateDefaultPermission2,
+ validateName: () => validateName2,
+ validateRequiredParameters: () => validateRequiredParameters4,
+ validateType: () => validateType
+});
+import { s as s11 } from "@sapphire/shapeshift";
+import { ApplicationCommandType } from "discord-api-types/v10";
+var namePredicate2 = s11.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^( *[\p{P}\p{L}\p{N}\p{sc=Devanagari}\p{sc=Thai}]+ *)+$/u).setValidationEnabled(isValidationEnabled);
+var typePredicate = s11.union(s11.literal(ApplicationCommandType.User), s11.literal(ApplicationCommandType.Message)).setValidationEnabled(isValidationEnabled);
+var booleanPredicate3 = s11.boolean;
+function validateDefaultPermission2(value) {
+ booleanPredicate3.parse(value);
+}
+__name(validateDefaultPermission2, "validateDefaultPermission");
+function validateName2(name) {
+ namePredicate2.parse(name);
+}
+__name(validateName2, "validateName");
+function validateType(type) {
+ typePredicate.parse(type);
+}
+__name(validateType, "validateType");
+function validateRequiredParameters4(name, type) {
+ validateName2(name);
+ validateType(type);
+}
+__name(validateRequiredParameters4, "validateRequiredParameters");
+var dmPermissionPredicate2 = s11.boolean.nullish;
+function validateDMPermission2(value) {
+ dmPermissionPredicate2.parse(value);
+}
+__name(validateDMPermission2, "validateDMPermission");
+var memberPermissionPredicate2 = s11.union(
+ s11.bigint.transform((value) => value.toString()),
+ s11.number.safeInt.transform((value) => value.toString()),
+ s11.string.regex(/^\d+$/)
+).nullish;
+function validateDefaultMemberPermissions2(permissions) {
+ return memberPermissionPredicate2.parse(permissions);
+}
+__name(validateDefaultMemberPermissions2, "validateDefaultMemberPermissions");
+
+// src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts
+var ContextMenuCommandBuilder = class {
+ static {
+ __name(this, "ContextMenuCommandBuilder");
+ }
+ /**
+ * The name of this command.
+ */
+ name = void 0;
+ /**
+ * The name localizations of this command.
+ */
+ name_localizations;
+ /**
+ * The type of this command.
+ */
+ type = void 0;
+ /**
+ * Whether this command is enabled by default when the application is added to a guild.
+ *
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ default_permission = void 0;
+ /**
+ * The set of permissions represented as a bit set for the command.
+ */
+ default_member_permissions = void 0;
+ /**
+ * Indicates whether the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This property is only for global commands.
+ */
+ dm_permission = void 0;
+ /**
+ * Sets the name of this command.
+ *
+ * @param name - The name to use
+ */
+ setName(name) {
+ validateName2(name);
+ Reflect.set(this, "name", name);
+ return this;
+ }
+ /**
+ * Sets the type of this command.
+ *
+ * @param type - The type to use
+ */
+ setType(type) {
+ validateType(type);
+ Reflect.set(this, "type", type);
+ return this;
+ }
+ /**
+ * Sets whether the command is enabled by default when the application is added to a guild.
+ *
+ * @remarks
+ * If set to `false`, you will have to later `PUT` the permissions for this command.
+ * @param value - Whether to enable this command by default
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ setDefaultPermission(value) {
+ validateDefaultPermission2(value);
+ Reflect.set(this, "default_permission", value);
+ return this;
+ }
+ /**
+ * Sets the default permissions a member should have in order to run this command.
+ *
+ * @remarks
+ * You can set this to `'0'` to disable the command by default.
+ * @param permissions - The permissions bit field to set
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDefaultMemberPermissions(permissions) {
+ const permissionValue = validateDefaultMemberPermissions2(permissions);
+ Reflect.set(this, "default_member_permissions", permissionValue);
+ return this;
+ }
+ /**
+ * Sets if the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This method is only for global commands.
+ * @param enabled - Whether the command should be enabled in direct messages
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDMPermission(enabled) {
+ validateDMPermission2(enabled);
+ Reflect.set(this, "dm_permission", enabled);
+ return this;
+ }
+ /**
+ * Sets a name localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedName - The localized name for the given `locale`
+ */
+ setNameLocalization(locale, localizedName) {
+ if (!this.name_localizations) {
+ Reflect.set(this, "name_localizations", {});
+ }
+ const parsedLocale = validateLocale(locale);
+ if (localizedName === null) {
+ this.name_localizations[parsedLocale] = null;
+ return this;
+ }
+ validateName2(localizedName);
+ this.name_localizations[parsedLocale] = localizedName;
+ return this;
+ }
+ /**
+ * Sets the name localizations for this command.
+ *
+ * @param localizedNames - The object of localized names to set
+ */
+ setNameLocalizations(localizedNames) {
+ if (localizedNames === null) {
+ Reflect.set(this, "name_localizations", null);
+ return this;
+ }
+ Reflect.set(this, "name_localizations", {});
+ for (const args of Object.entries(localizedNames))
+ this.setNameLocalization(...args);
+ return this;
+ }
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON() {
+ validateRequiredParameters4(this.name, this.type);
+ validateLocalizationMap(this.name_localizations);
+ return { ...this };
+ }
+};
+
+// src/util/componentUtil.ts
+function embedLength(data) {
+ return (data.title?.length ?? 0) + (data.description?.length ?? 0) + (data.fields?.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) ?? 0) + (data.footer?.text.length ?? 0) + (data.author?.name.length ?? 0);
+}
+__name(embedLength, "embedLength");
+
+// src/index.ts
+var version = "1.6.5";
+export {
+ ActionRowBuilder,
+ ApplicationCommandNumericOptionMinMaxValueMixin,
+ ApplicationCommandOptionBase,
+ ApplicationCommandOptionChannelTypesMixin,
+ ApplicationCommandOptionWithChoicesAndAutocompleteMixin,
+ BaseSelectMenuBuilder,
+ ButtonBuilder,
+ ChannelSelectMenuBuilder,
+ Assertions_exports2 as ComponentAssertions,
+ ComponentBuilder,
+ Assertions_exports6 as ContextMenuCommandAssertions,
+ ContextMenuCommandBuilder,
+ Assertions_exports as EmbedAssertions,
+ EmbedBuilder,
+ MentionableSelectMenuBuilder,
+ Assertions_exports4 as ModalAssertions,
+ ModalBuilder,
+ RoleSelectMenuBuilder,
+ StringSelectMenuBuilder as SelectMenuBuilder,
+ StringSelectMenuOptionBuilder as SelectMenuOptionBuilder,
+ SharedNameAndDescription,
+ SharedSlashCommandOptions,
+ Assertions_exports5 as SlashCommandAssertions,
+ SlashCommandAttachmentOption,
+ SlashCommandBooleanOption,
+ SlashCommandBuilder,
+ SlashCommandChannelOption,
+ SlashCommandIntegerOption,
+ SlashCommandMentionableOption,
+ SlashCommandNumberOption,
+ SlashCommandRoleOption,
+ SlashCommandStringOption,
+ SlashCommandSubcommandBuilder,
+ SlashCommandSubcommandGroupBuilder,
+ SlashCommandUserOption,
+ StringSelectMenuBuilder,
+ StringSelectMenuOptionBuilder,
+ Assertions_exports3 as TextInputAssertions,
+ TextInputBuilder,
+ UserSelectMenuBuilder,
+ createComponentBuilder,
+ disableValidators,
+ embedLength,
+ enableValidators,
+ isValidationEnabled,
+ normalizeArray,
+ version
+};
+//# sourceMappingURL=index.mjs.map \ No newline at end of file
diff --git a/node_modules/@discordjs/builders/dist/index.mjs.map b/node_modules/@discordjs/builders/dist/index.mjs.map
new file mode 100644
index 0000000..2907da1
--- /dev/null
+++ b/node_modules/@discordjs/builders/dist/index.mjs.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/messages/embed/Assertions.ts","../src/util/validation.ts","../src/util/normalizeArray.ts","../src/messages/embed/Embed.ts","../src/index.ts","../src/components/Assertions.ts","../src/components/selectMenu/StringSelectMenuOption.ts","../src/components/ActionRow.ts","../src/components/Component.ts","../src/components/Components.ts","../src/components/button/Button.ts","../src/components/selectMenu/ChannelSelectMenu.ts","../src/components/selectMenu/BaseSelectMenu.ts","../src/components/selectMenu/MentionableSelectMenu.ts","../src/components/selectMenu/RoleSelectMenu.ts","../src/components/selectMenu/StringSelectMenu.ts","../src/components/selectMenu/UserSelectMenu.ts","../src/components/textInput/TextInput.ts","../src/components/textInput/Assertions.ts","../src/interactions/modals/Assertions.ts","../src/interactions/modals/Modal.ts","../src/interactions/slashCommands/Assertions.ts","../src/interactions/slashCommands/SlashCommandBuilder.ts","../src/interactions/slashCommands/SlashCommandSubcommands.ts","../src/interactions/slashCommands/mixins/NameAndDescription.ts","../src/interactions/slashCommands/options/attachment.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts","../src/interactions/slashCommands/options/boolean.ts","../src/interactions/slashCommands/options/channel.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts","../src/interactions/slashCommands/options/integer.ts","../src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts","../src/interactions/slashCommands/options/mentionable.ts","../src/interactions/slashCommands/options/number.ts","../src/interactions/slashCommands/options/role.ts","../src/interactions/slashCommands/options/string.ts","../src/interactions/slashCommands/options/user.ts","../src/interactions/slashCommands/mixins/SharedSlashCommandOptions.ts","../src/interactions/contextMenuCommands/Assertions.ts","../src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts","../src/util/componentUtil.ts"],"sourcesContent":["import { s } from '@sapphire/shapeshift';\nimport type { APIEmbedField } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../../util/validation.js';\n\nexport const fieldNamePredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(256)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const fieldValuePredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(1_024)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const fieldInlinePredicate = s.boolean.optional;\n\nexport const embedFieldPredicate = s\n\t.object({\n\t\tname: fieldNamePredicate,\n\t\tvalue: fieldValuePredicate,\n\t\tinline: fieldInlinePredicate,\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const embedFieldsArrayPredicate = embedFieldPredicate.array.setValidationEnabled(isValidationEnabled);\n\nexport const fieldLengthPredicate = s.number.lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);\n\nexport function validateFieldLength(amountAdding: number, fields?: APIEmbedField[]): void {\n\tfieldLengthPredicate.parse((fields?.length ?? 0) + amountAdding);\n}\n\nexport const authorNamePredicate = fieldNamePredicate.nullable.setValidationEnabled(isValidationEnabled);\n\nexport const imageURLPredicate = s.string\n\t.url({\n\t\tallowedProtocols: ['http:', 'https:', 'attachment:'],\n\t})\n\t.nullish.setValidationEnabled(isValidationEnabled);\n\nexport const urlPredicate = s.string\n\t.url({\n\t\tallowedProtocols: ['http:', 'https:'],\n\t})\n\t.nullish.setValidationEnabled(isValidationEnabled);\n\nexport const embedAuthorPredicate = s\n\t.object({\n\t\tname: authorNamePredicate,\n\t\ticonURL: imageURLPredicate,\n\t\turl: urlPredicate,\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const RGBPredicate = s.number.int\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(255)\n\t.setValidationEnabled(isValidationEnabled);\nexport const colorPredicate = s.number.int\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(0xffffff)\n\t.or(s.tuple([RGBPredicate, RGBPredicate, RGBPredicate]))\n\t.nullable.setValidationEnabled(isValidationEnabled);\n\nexport const descriptionPredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(4_096)\n\t.nullable.setValidationEnabled(isValidationEnabled);\n\nexport const footerTextPredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(2_048)\n\t.nullable.setValidationEnabled(isValidationEnabled);\n\nexport const embedFooterPredicate = s\n\t.object({\n\t\ttext: footerTextPredicate,\n\t\ticonURL: imageURLPredicate,\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const timestampPredicate = s.union(s.number, s.date).nullable.setValidationEnabled(isValidationEnabled);\n\nexport const titlePredicate = fieldNamePredicate.nullable.setValidationEnabled(isValidationEnabled);\n","let validate = true;\n\n/**\n * Enables validators.\n *\n * @returns Whether validation is occurring.\n */\nexport function enableValidators() {\n\treturn (validate = true);\n}\n\n/**\n * Disables validators.\n *\n * @returns Whether validation is occurring.\n */\nexport function disableValidators() {\n\treturn (validate = false);\n}\n\n/**\n * Checks whether validation is occurring.\n */\nexport function isValidationEnabled() {\n\treturn validate;\n}\n","/**\n * Normalizes data that is a rest parameter or an array into an array with a depth of 1.\n *\n * @typeParam T - The data that must satisfy {@link RestOrArray}.\n * @param arr - The (possibly variadic) data to normalize\n */\nexport function normalizeArray<T>(arr: RestOrArray<T>): T[] {\n\tif (Array.isArray(arr[0])) return arr[0];\n\treturn arr as T[];\n}\n\n/**\n * Represents data that may be an array or came from a rest parameter.\n *\n * @remarks\n * This type is used throughout builders to ensure both an array and variadic arguments\n * may be used. It is normalized with {@link normalizeArray}.\n */\nexport type RestOrArray<T> = T[] | [T[]];\n","import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage } from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js';\nimport {\n\tcolorPredicate,\n\tdescriptionPredicate,\n\tembedAuthorPredicate,\n\tembedFieldsArrayPredicate,\n\tembedFooterPredicate,\n\timageURLPredicate,\n\ttimestampPredicate,\n\ttitlePredicate,\n\turlPredicate,\n\tvalidateFieldLength,\n} from './Assertions.js';\n\n/**\n * A tuple satisfying the RGB color model.\n *\n * @see {@link https://developer.mozilla.org/docs/Glossary/RGB}\n */\nexport type RGBTuple = [red: number, green: number, blue: number];\n\n/**\n * The base icon data typically used in payloads.\n */\nexport interface IconData {\n\t/**\n\t * The URL of the icon.\n\t */\n\ticonURL?: string;\n\t/**\n\t * The proxy URL of the icon.\n\t */\n\tproxyIconURL?: string;\n}\n\n/**\n * Represents the author data of an embed.\n */\nexport type EmbedAuthorData = IconData & Omit<APIEmbedAuthor, 'icon_url' | 'proxy_icon_url'>;\n\n/**\n * Represents the author options of an embed.\n */\nexport type EmbedAuthorOptions = Omit<EmbedAuthorData, 'proxyIconURL'>;\n\n/**\n * Represents the footer data of an embed.\n */\nexport type EmbedFooterData = IconData & Omit<APIEmbedFooter, 'icon_url' | 'proxy_icon_url'>;\n\n/**\n * Represents the footer options of an embed.\n */\nexport type EmbedFooterOptions = Omit<EmbedFooterData, 'proxyIconURL'>;\n\n/**\n * Represents the image data of an embed.\n */\nexport interface EmbedImageData extends Omit<APIEmbedImage, 'proxy_url'> {\n\t/**\n\t * The proxy URL for the image.\n\t */\n\tproxyURL?: string;\n}\n\n/**\n * A builder that creates API-compatible JSON data for embeds.\n */\nexport class EmbedBuilder {\n\t/**\n\t * The API data associated with this embed.\n\t */\n\tpublic readonly data: APIEmbed;\n\n\t/**\n\t * Creates a new embed from API data.\n\t *\n\t * @param data - The API data to create this embed with\n\t */\n\tpublic constructor(data: APIEmbed = {}) {\n\t\tthis.data = { ...data };\n\t\tif (data.timestamp) this.data.timestamp = new Date(data.timestamp).toISOString();\n\t}\n\n\t/**\n\t * Appends fields to the embed.\n\t *\n\t * @remarks\n\t * This method accepts either an array of fields or a variable number of field parameters.\n\t * The maximum amount of fields that can be added is 25.\n\t * @example\n\t * Using an array:\n\t * ```ts\n\t * const fields: APIEmbedField[] = ...;\n\t * const embed = new EmbedBuilder()\n\t * \t.addFields(fields);\n\t * ```\n\t * @example\n\t * Using rest parameters (variadic):\n\t * ```ts\n\t * const embed = new EmbedBuilder()\n\t * \t.addFields(\n\t * \t\t{ name: 'Field 1', value: 'Value 1' },\n\t * \t\t{ name: 'Field 2', value: 'Value 2' },\n\t * \t);\n\t * ```\n\t * @param fields - The fields to add\n\t */\n\tpublic addFields(...fields: RestOrArray<APIEmbedField>): this {\n\t\tconst normalizedFields = normalizeArray(fields);\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(normalizedFields.length, this.data.fields);\n\n\t\t// Data assertions\n\t\tembedFieldsArrayPredicate.parse(normalizedFields);\n\n\t\tif (this.data.fields) this.data.fields.push(...normalizedFields);\n\t\telse this.data.fields = normalizedFields;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes, replaces, or inserts fields for this embed.\n\t *\n\t * @remarks\n\t * This method behaves similarly\n\t * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.\n\t * The maximum amount of fields that can be added is 25.\n\t *\n\t * It's useful for modifying and adjusting order of the already-existing fields of an embed.\n\t * @example\n\t * Remove the first field:\n\t * ```ts\n\t * embed.spliceFields(0, 1);\n\t * ```\n\t * @example\n\t * Remove the first n fields:\n\t * ```ts\n\t * const n = 4;\n\t * embed.spliceFields(0, n);\n\t * ```\n\t * @example\n\t * Remove the last field:\n\t * ```ts\n\t * embed.spliceFields(-1, 1);\n\t * ```\n\t * @param index - The index to start at\n\t * @param deleteCount - The number of fields to remove\n\t * @param fields - The replacing field objects\n\t */\n\tpublic spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this {\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(fields.length - deleteCount, this.data.fields);\n\n\t\t// Data assertions\n\t\tembedFieldsArrayPredicate.parse(fields);\n\t\tif (this.data.fields) this.data.fields.splice(index, deleteCount, ...fields);\n\t\telse this.data.fields = fields;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the fields for this embed.\n\t *\n\t * @remarks\n\t * This method is an alias for {@link EmbedBuilder.spliceFields}. More specifically,\n\t * it splices the entire array of fields, replacing them with the provided fields.\n\t *\n\t * You can set a maximum of 25 fields.\n\t * @param fields - The fields to set\n\t */\n\tpublic setFields(...fields: RestOrArray<APIEmbedField>) {\n\t\tthis.spliceFields(0, this.data.fields?.length ?? 0, ...normalizeArray(fields));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the author of this embed.\n\t *\n\t * @param options - The options to use\n\t */\n\n\tpublic setAuthor(options: EmbedAuthorOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.data.author = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\t// Data assertions\n\t\tembedAuthorPredicate.parse(options);\n\n\t\tthis.data.author = { name: options.name, url: options.url, icon_url: options.iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the color of this embed.\n\t *\n\t * @param color - The color to use\n\t */\n\tpublic setColor(color: RGBTuple | number | null): this {\n\t\t// Data assertions\n\t\tcolorPredicate.parse(color);\n\n\t\tif (Array.isArray(color)) {\n\t\t\tconst [red, green, blue] = color;\n\t\t\tthis.data.color = (red << 16) + (green << 8) + blue;\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.data.color = color ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this embed.\n\t *\n\t * @param description - The description to use\n\t */\n\tpublic setDescription(description: string | null): this {\n\t\t// Data assertions\n\t\tdescriptionPredicate.parse(description);\n\n\t\tthis.data.description = description ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the footer of this embed.\n\t *\n\t * @param options - The footer to use\n\t */\n\tpublic setFooter(options: EmbedFooterOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.data.footer = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\t// Data assertions\n\t\tembedFooterPredicate.parse(options);\n\n\t\tthis.data.footer = { text: options.text, icon_url: options.iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the image of this embed.\n\t *\n\t * @param url - The image URL to use\n\t */\n\tpublic setImage(url: string | null): this {\n\t\t// Data assertions\n\t\timageURLPredicate.parse(url);\n\n\t\tthis.data.image = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the thumbnail of this embed.\n\t *\n\t * @param url - The thumbnail URL to use\n\t */\n\tpublic setThumbnail(url: string | null): this {\n\t\t// Data assertions\n\t\timageURLPredicate.parse(url);\n\n\t\tthis.data.thumbnail = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the timestamp of this embed.\n\t *\n\t * @param timestamp - The timestamp or date to use\n\t */\n\tpublic setTimestamp(timestamp: Date | number | null = Date.now()): this {\n\t\t// Data assertions\n\t\ttimestampPredicate.parse(timestamp);\n\n\t\tthis.data.timestamp = timestamp ? new Date(timestamp).toISOString() : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the title for this embed.\n\t *\n\t * @param title - The title to use\n\t */\n\tpublic setTitle(title: string | null): this {\n\t\t// Data assertions\n\t\ttitlePredicate.parse(title);\n\n\t\tthis.data.title = title ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL of this embed.\n\t *\n\t * @param url - The URL to use\n\t */\n\tpublic setURL(url: string | null): this {\n\t\t// Data assertions\n\t\turlPredicate.parse(url);\n\n\t\tthis.data.url = url ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): APIEmbed {\n\t\treturn { ...this.data };\n\t}\n}\n","export * as EmbedAssertions from './messages/embed/Assertions.js';\nexport * from './messages/embed/Embed.js';\n// TODO: Consider removing this dep in the next major version\nexport * from '@discordjs/formatters';\n\nexport * as ComponentAssertions from './components/Assertions.js';\nexport * from './components/ActionRow.js';\nexport * from './components/button/Button.js';\nexport * from './components/Component.js';\nexport * from './components/Components.js';\nexport * from './components/textInput/TextInput.js';\nexport * as TextInputAssertions from './components/textInput/Assertions.js';\nexport * from './interactions/modals/Modal.js';\nexport * as ModalAssertions from './interactions/modals/Assertions.js';\n\nexport * from './components/selectMenu/BaseSelectMenu.js';\nexport * from './components/selectMenu/ChannelSelectMenu.js';\nexport * from './components/selectMenu/MentionableSelectMenu.js';\nexport * from './components/selectMenu/RoleSelectMenu.js';\nexport * from './components/selectMenu/StringSelectMenu.js';\n// TODO: Remove those aliases in v2\nexport {\n\t/**\n\t * @deprecated Will be removed in the next major version, use {@link StringSelectMenuBuilder} instead.\n\t */\n\tStringSelectMenuBuilder as SelectMenuBuilder,\n} from './components/selectMenu/StringSelectMenu.js';\nexport {\n\t/**\n\t * @deprecated Will be removed in the next major version, use {@link StringSelectMenuOptionBuilder} instead.\n\t */\n\tStringSelectMenuOptionBuilder as SelectMenuOptionBuilder,\n} from './components/selectMenu/StringSelectMenuOption.js';\nexport * from './components/selectMenu/StringSelectMenuOption.js';\nexport * from './components/selectMenu/UserSelectMenu.js';\n\nexport * as SlashCommandAssertions from './interactions/slashCommands/Assertions.js';\nexport * from './interactions/slashCommands/SlashCommandBuilder.js';\nexport * from './interactions/slashCommands/SlashCommandSubcommands.js';\nexport * from './interactions/slashCommands/options/boolean.js';\nexport * from './interactions/slashCommands/options/channel.js';\nexport * from './interactions/slashCommands/options/integer.js';\nexport * from './interactions/slashCommands/options/mentionable.js';\nexport * from './interactions/slashCommands/options/number.js';\nexport * from './interactions/slashCommands/options/role.js';\nexport * from './interactions/slashCommands/options/attachment.js';\nexport * from './interactions/slashCommands/options/string.js';\nexport * from './interactions/slashCommands/options/user.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionBase.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.js';\nexport * from './interactions/slashCommands/mixins/NameAndDescription.js';\nexport * from './interactions/slashCommands/mixins/SharedSlashCommandOptions.js';\n\nexport * as ContextMenuCommandAssertions from './interactions/contextMenuCommands/Assertions.js';\nexport * from './interactions/contextMenuCommands/ContextMenuCommandBuilder.js';\n\nexport * from './util/componentUtil.js';\nexport * from './util/normalizeArray.js';\nexport * from './util/validation.js';\n\n/**\n * The {@link https://github.com/discordjs/discord.js/blob/main/packages/builders#readme | @discordjs/builders} version\n * that you are currently using.\n *\n * @privateRemarks This needs to explicitly be `string` so it is not typed as a \"const string\" that gets injected by esbuild.\n */\nexport const version = '1.6.5' as string;\n","import { s } from '@sapphire/shapeshift';\nimport { ButtonStyle, ChannelType, type APIMessageComponentEmoji } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../util/validation.js';\nimport { StringSelectMenuOptionBuilder } from './selectMenu/StringSelectMenuOption.js';\n\nexport const customIdValidator = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(100)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const emojiValidator = s\n\t.object({\n\t\tid: s.string,\n\t\tname: s.string,\n\t\tanimated: s.boolean,\n\t})\n\t.partial.strict.setValidationEnabled(isValidationEnabled);\n\nexport const disabledValidator = s.boolean;\n\nexport const buttonLabelValidator = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(80)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const buttonStyleValidator = s.nativeEnum(ButtonStyle);\n\nexport const placeholderValidator = s.string.lengthLessThanOrEqual(150).setValidationEnabled(isValidationEnabled);\nexport const minMaxValidator = s.number.int\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(25)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const labelValueDescriptionValidator = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(100)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const jsonOptionValidator = s\n\t.object({\n\t\tlabel: labelValueDescriptionValidator,\n\t\tvalue: labelValueDescriptionValidator,\n\t\tdescription: labelValueDescriptionValidator.optional,\n\t\temoji: emojiValidator.optional,\n\t\tdefault: s.boolean.optional,\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const optionValidator = s.instance(StringSelectMenuOptionBuilder).setValidationEnabled(isValidationEnabled);\n\nexport const optionsValidator = optionValidator.array\n\t.lengthGreaterThanOrEqual(0)\n\t.setValidationEnabled(isValidationEnabled);\nexport const optionsLengthValidator = s.number.int\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(25)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateRequiredSelectMenuParameters(options: StringSelectMenuOptionBuilder[], customId?: string) {\n\tcustomIdValidator.parse(customId);\n\toptionsValidator.parse(options);\n}\n\nexport const defaultValidator = s.boolean;\n\nexport function validateRequiredSelectMenuOptionParameters(label?: string, value?: string) {\n\tlabelValueDescriptionValidator.parse(label);\n\tlabelValueDescriptionValidator.parse(value);\n}\n\nexport const channelTypesValidator = s.nativeEnum(ChannelType).array.setValidationEnabled(isValidationEnabled);\n\nexport const urlValidator = s.string\n\t.url({\n\t\tallowedProtocols: ['http:', 'https:', 'discord:'],\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateRequiredButtonParameters(\n\tstyle?: ButtonStyle,\n\tlabel?: string,\n\temoji?: APIMessageComponentEmoji,\n\tcustomId?: string,\n\turl?: string,\n) {\n\tif (url && customId) {\n\t\tthrow new RangeError('URL and custom id are mutually exclusive');\n\t}\n\n\tif (!label && !emoji) {\n\t\tthrow new RangeError('Buttons must have a label and/or an emoji');\n\t}\n\n\tif (style === ButtonStyle.Link) {\n\t\tif (!url) {\n\t\t\tthrow new RangeError('Link buttons must have a url');\n\t\t}\n\t} else if (url) {\n\t\tthrow new RangeError('Non-link buttons cannot have a url');\n\t}\n}\n","import type { JSONEncodable } from '@discordjs/util';\nimport type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v10';\nimport {\n\tdefaultValidator,\n\temojiValidator,\n\tlabelValueDescriptionValidator,\n\tvalidateRequiredSelectMenuOptionParameters,\n} from '../Assertions.js';\n\n/**\n * A builder that creates API-compatible JSON data for string select menu options.\n */\nexport class StringSelectMenuOptionBuilder implements JSONEncodable<APISelectMenuOption> {\n\t/**\n\t * Creates a new string select menu option from API data.\n\t *\n\t * @param data - The API data to create this string select menu option with\n\t * @example\n\t * Creating a string select menu option from an API data object:\n\t * ```ts\n\t * const selectMenuOption = new SelectMenuOptionBuilder({\n\t * \tlabel: 'catchy label',\n\t * \tvalue: '1',\n\t * });\n\t * ```\n\t * @example\n\t * Creating a string select menu option using setters and API data:\n\t * ```ts\n\t * const selectMenuOption = new SelectMenuOptionBuilder({\n\t * \tdefault: true,\n\t * \tvalue: '1',\n\t * })\n\t * \t.setLabel('woah');\n\t * ```\n\t */\n\tpublic constructor(public data: Partial<APISelectMenuOption> = {}) {}\n\n\t/**\n\t * Sets the label for this option.\n\t *\n\t * @param label - The label to use\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = labelValueDescriptionValidator.parse(label);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the value for this option.\n\t *\n\t * @param value - The value to use\n\t */\n\tpublic setValue(value: string) {\n\t\tthis.data.value = labelValueDescriptionValidator.parse(value);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description for this option.\n\t *\n\t * @param description - The description to use\n\t */\n\tpublic setDescription(description: string) {\n\t\tthis.data.description = labelValueDescriptionValidator.parse(description);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this option is selected by default.\n\t *\n\t * @param isDefault - Whether this option is selected by default\n\t */\n\tpublic setDefault(isDefault = true) {\n\t\tthis.data.default = defaultValidator.parse(isDefault);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the emoji to display for this option.\n\t *\n\t * @param emoji - The emoji to use\n\t */\n\tpublic setEmoji(emoji: APIMessageComponentEmoji) {\n\t\tthis.data.emoji = emojiValidator.parse(emoji);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc BaseSelectMenuBuilder.toJSON}\n\t */\n\tpublic toJSON(): APISelectMenuOption {\n\t\tvalidateRequiredSelectMenuOptionParameters(this.data.label, this.data.value);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APISelectMenuOption;\n\t}\n}\n","/* eslint-disable jsdoc/check-param-names */\n\nimport {\n\ttype APIActionRowComponent,\n\tComponentType,\n\ttype APIMessageActionRowComponent,\n\ttype APIModalActionRowComponent,\n\ttype APIActionRowComponentTypes,\n} from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../util/normalizeArray.js';\nimport { ComponentBuilder } from './Component.js';\nimport { createComponentBuilder } from './Components.js';\nimport type { ButtonBuilder } from './button/Button.js';\nimport type { ChannelSelectMenuBuilder } from './selectMenu/ChannelSelectMenu.js';\nimport type { MentionableSelectMenuBuilder } from './selectMenu/MentionableSelectMenu.js';\nimport type { RoleSelectMenuBuilder } from './selectMenu/RoleSelectMenu.js';\nimport type { StringSelectMenuBuilder } from './selectMenu/StringSelectMenu.js';\nimport type { UserSelectMenuBuilder } from './selectMenu/UserSelectMenu.js';\nimport type { TextInputBuilder } from './textInput/TextInput.js';\n\n/**\n * The builders that may be used for messages.\n */\nexport type MessageComponentBuilder =\n\t| ActionRowBuilder<MessageActionRowComponentBuilder>\n\t| MessageActionRowComponentBuilder;\n\n/**\n * The builders that may be used for modals.\n */\nexport type ModalComponentBuilder = ActionRowBuilder<ModalActionRowComponentBuilder> | ModalActionRowComponentBuilder;\n\n/**\n * The builders that may be used within an action row for messages.\n */\nexport type MessageActionRowComponentBuilder =\n\t| ButtonBuilder\n\t| ChannelSelectMenuBuilder\n\t| MentionableSelectMenuBuilder\n\t| RoleSelectMenuBuilder\n\t| StringSelectMenuBuilder\n\t| UserSelectMenuBuilder;\n\n/**\n * The builders that may be used within an action row for modals.\n */\nexport type ModalActionRowComponentBuilder = TextInputBuilder;\n\n/**\n * Any builder.\n */\nexport type AnyComponentBuilder = MessageActionRowComponentBuilder | ModalActionRowComponentBuilder;\n\n/**\n * A builder that creates API-compatible JSON data for action rows.\n *\n * @typeParam T - The types of components this action row holds\n */\nexport class ActionRowBuilder<T extends AnyComponentBuilder> extends ComponentBuilder<\n\tAPIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>\n> {\n\t/**\n\t * The components within this action row.\n\t */\n\tpublic readonly components: T[];\n\n\t/**\n\t * Creates a new action row from API data.\n\t *\n\t * @param data - The API data to create this action row with\n\t * @example\n\t * Creating an action row from an API data object:\n\t * ```ts\n\t * const actionRow = new ActionRowBuilder({\n\t * \tcomponents: [\n\t * \t\t{\n\t * \t\t\tcustom_id: \"custom id\",\n\t * \t\t\tlabel: \"Type something\",\n\t * \t\t\tstyle: TextInputStyle.Short,\n\t * \t\t\ttype: ComponentType.TextInput,\n\t * \t\t},\n\t * \t],\n\t * });\n\t * ```\n\t * @example\n\t * Creating an action row using setters and API data:\n\t * ```ts\n\t * const actionRow = new ActionRowBuilder({\n\t * \tcomponents: [\n\t * \t\t{\n\t * \t\t\tcustom_id: \"custom id\",\n\t * \t\t\tlabel: \"Click me\",\n\t * \t\t\tstyle: ButtonStyle.Primary,\n\t * \t\t\ttype: ComponentType.Button,\n\t * \t\t},\n\t * \t],\n\t * })\n\t * \t.addComponents(button2, button3);\n\t * ```\n\t */\n\tpublic constructor({ components, ...data }: Partial<APIActionRowComponent<APIActionRowComponentTypes>> = {}) {\n\t\tsuper({ type: ComponentType.ActionRow, ...data });\n\t\tthis.components = (components?.map((component) => createComponentBuilder(component)) ?? []) as T[];\n\t}\n\n\t/**\n\t * Adds components to this action row.\n\t *\n\t * @param components - The components to add\n\t */\n\tpublic addComponents(...components: RestOrArray<T>) {\n\t\tthis.components.push(...normalizeArray(components));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets components for this action row.\n\t *\n\t * @param components - The components to set\n\t */\n\tpublic setComponents(...components: RestOrArray<T>) {\n\t\tthis.components.splice(0, this.components.length, ...normalizeArray(components));\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): APIActionRowComponent<ReturnType<T['toJSON']>> {\n\t\treturn {\n\t\t\t...this.data,\n\t\t\tcomponents: this.components.map((component) => component.toJSON()),\n\t\t} as APIActionRowComponent<ReturnType<T['toJSON']>>;\n\t}\n}\n","import type { JSONEncodable } from '@discordjs/util';\nimport type {\n\tAPIActionRowComponent,\n\tAPIActionRowComponentTypes,\n\tAPIBaseComponent,\n\tComponentType,\n} from 'discord-api-types/v10';\n\n/**\n * Any action row component data represented as an object.\n */\nexport type AnyAPIActionRowComponent = APIActionRowComponent<APIActionRowComponentTypes> | APIActionRowComponentTypes;\n\n/**\n * The base component builder that contains common symbols for all sorts of components.\n *\n * @typeParam DataType - The type of internal API data that is stored within the component\n */\nexport abstract class ComponentBuilder<\n\tDataType extends Partial<APIBaseComponent<ComponentType>> = APIBaseComponent<ComponentType>,\n> implements JSONEncodable<AnyAPIActionRowComponent>\n{\n\t/**\n\t * The API data associated with this component.\n\t */\n\tpublic readonly data: Partial<DataType>;\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic abstract toJSON(): AnyAPIActionRowComponent;\n\n\t/**\n\t * Constructs a new kind of component.\n\t *\n\t * @param data - The data to construct a component out of\n\t */\n\tpublic constructor(data: Partial<DataType>) {\n\t\tthis.data = data;\n\t}\n}\n","import { ComponentType, type APIMessageComponent, type APIModalComponent } from 'discord-api-types/v10';\nimport {\n\tActionRowBuilder,\n\ttype AnyComponentBuilder,\n\ttype MessageComponentBuilder,\n\ttype ModalComponentBuilder,\n} from './ActionRow.js';\nimport { ComponentBuilder } from './Component.js';\nimport { ButtonBuilder } from './button/Button.js';\nimport { ChannelSelectMenuBuilder } from './selectMenu/ChannelSelectMenu.js';\nimport { MentionableSelectMenuBuilder } from './selectMenu/MentionableSelectMenu.js';\nimport { RoleSelectMenuBuilder } from './selectMenu/RoleSelectMenu.js';\nimport { StringSelectMenuBuilder } from './selectMenu/StringSelectMenu.js';\nimport { UserSelectMenuBuilder } from './selectMenu/UserSelectMenu.js';\nimport { TextInputBuilder } from './textInput/TextInput.js';\n\n/**\n * Components here are mapped to their respective builder.\n */\nexport interface MappedComponentTypes {\n\t/**\n\t * The action row component type is associated with an {@link ActionRowBuilder}.\n\t */\n\t[ComponentType.ActionRow]: ActionRowBuilder<AnyComponentBuilder>;\n\t/**\n\t * The button component type is associated with an {@link ButtonBuilder}.\n\t */\n\t[ComponentType.Button]: ButtonBuilder;\n\t/**\n\t * The string select component type is associated with an {@link StringSelectMenuBuilder}.\n\t */\n\t[ComponentType.StringSelect]: StringSelectMenuBuilder;\n\t/**\n\t * The text inpiut component type is associated with an {@link TextInputBuilder}.\n\t */\n\t[ComponentType.TextInput]: TextInputBuilder;\n\t/**\n\t * The user select component type is associated with an {@link UserSelectMenuBuilder}.\n\t */\n\t[ComponentType.UserSelect]: UserSelectMenuBuilder;\n\t/**\n\t * The role select component type is associated with an {@link RoleSelectMenuBuilder}.\n\t */\n\t[ComponentType.RoleSelect]: RoleSelectMenuBuilder;\n\t/**\n\t * The mentionable select component type is associated with an {@link MentionableSelectMenuBuilder}.\n\t */\n\t[ComponentType.MentionableSelect]: MentionableSelectMenuBuilder;\n\t/**\n\t * The channel select component type is associated with an {@link ChannelSelectMenuBuilder}.\n\t */\n\t[ComponentType.ChannelSelect]: ChannelSelectMenuBuilder;\n}\n\n/**\n * Factory for creating components from API data.\n *\n * @typeParam T - The type of component to use\n * @param data - The API data to transform to a component class\n */\nexport function createComponentBuilder<T extends keyof MappedComponentTypes>(\n\t// eslint-disable-next-line @typescript-eslint/sort-type-union-intersection-members\n\tdata: (APIModalComponent | APIMessageComponent) & { type: T },\n): MappedComponentTypes[T];\n\n/**\n * Factory for creating components from API data.\n *\n * @typeParam C - The type of component to use\n * @param data - The API data to transform to a component class\n */\nexport function createComponentBuilder<C extends MessageComponentBuilder | ModalComponentBuilder>(data: C): C;\n\nexport function createComponentBuilder(\n\tdata: APIMessageComponent | APIModalComponent | MessageComponentBuilder,\n): ComponentBuilder {\n\tif (data instanceof ComponentBuilder) {\n\t\treturn data;\n\t}\n\n\tswitch (data.type) {\n\t\tcase ComponentType.ActionRow:\n\t\t\treturn new ActionRowBuilder(data);\n\t\tcase ComponentType.Button:\n\t\t\treturn new ButtonBuilder(data);\n\t\tcase ComponentType.StringSelect:\n\t\t\treturn new StringSelectMenuBuilder(data);\n\t\tcase ComponentType.TextInput:\n\t\t\treturn new TextInputBuilder(data);\n\t\tcase ComponentType.UserSelect:\n\t\t\treturn new UserSelectMenuBuilder(data);\n\t\tcase ComponentType.RoleSelect:\n\t\t\treturn new RoleSelectMenuBuilder(data);\n\t\tcase ComponentType.MentionableSelect:\n\t\t\treturn new MentionableSelectMenuBuilder(data);\n\t\tcase ComponentType.ChannelSelect:\n\t\t\treturn new ChannelSelectMenuBuilder(data);\n\t\tdefault:\n\t\t\t// @ts-expect-error This case can still occur if we get a newer unsupported component type\n\t\t\tthrow new Error(`Cannot properly serialize component type: ${data.type}`);\n\t}\n}\n","import {\n\tComponentType,\n\ttype APIMessageComponentEmoji,\n\ttype APIButtonComponent,\n\ttype APIButtonComponentWithURL,\n\ttype APIButtonComponentWithCustomId,\n\ttype ButtonStyle,\n} from 'discord-api-types/v10';\nimport {\n\tbuttonLabelValidator,\n\tbuttonStyleValidator,\n\tcustomIdValidator,\n\tdisabledValidator,\n\temojiValidator,\n\turlValidator,\n\tvalidateRequiredButtonParameters,\n} from '../Assertions.js';\nimport { ComponentBuilder } from '../Component.js';\n\n/**\n * A builder that creates API-compatible JSON data for buttons.\n */\nexport class ButtonBuilder extends ComponentBuilder<APIButtonComponent> {\n\t/**\n\t * Creates a new button from API data.\n\t *\n\t * @param data - The API data to create this button with\n\t * @example\n\t * Creating a button from an API data object:\n\t * ```ts\n\t * const button = new ButtonBuilder({\n\t * \tcustom_id: 'a cool button',\n\t * \tstyle: ButtonStyle.Primary,\n\t * \tlabel: 'Click Me',\n\t * \temoji: {\n\t * \t\tname: 'smile',\n\t * \t\tid: '123456789012345678',\n\t * \t},\n\t * });\n\t * ```\n\t * @example\n\t * Creating a button using setters and API data:\n\t * ```ts\n\t * const button = new ButtonBuilder({\n\t * \tstyle: ButtonStyle.Secondary,\n\t * \tlabel: 'Click Me',\n\t * })\n\t * \t.setEmoji({ name: '🙂' })\n\t * \t.setCustomId('another cool button');\n\t * ```\n\t */\n\tpublic constructor(data?: Partial<APIButtonComponent>) {\n\t\tsuper({ type: ComponentType.Button, ...data });\n\t}\n\n\t/**\n\t * Sets the style of this button.\n\t *\n\t * @param style - The style to use\n\t */\n\tpublic setStyle(style: ButtonStyle) {\n\t\tthis.data.style = buttonStyleValidator.parse(style);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL for this button.\n\t *\n\t * @remarks\n\t * This method is only available to buttons using the `Link` button style.\n\t * Only three types of URL schemes are currently supported: `https://`, `http://`, and `discord://`.\n\t * @param url - The URL to use\n\t */\n\tpublic setURL(url: string) {\n\t\t(this.data as APIButtonComponentWithURL).url = urlValidator.parse(url);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom id for this button.\n\t *\n\t * @remarks\n\t * This method is only applicable to buttons that are not using the `Link` button style.\n\t * @param customId - The custom id to use\n\t */\n\tpublic setCustomId(customId: string) {\n\t\t(this.data as APIButtonComponentWithCustomId).custom_id = customIdValidator.parse(customId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the emoji to display on this button.\n\t *\n\t * @param emoji - The emoji to use\n\t */\n\tpublic setEmoji(emoji: APIMessageComponentEmoji) {\n\t\tthis.data.emoji = emojiValidator.parse(emoji);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this button is disabled.\n\t *\n\t * @param disabled - Whether to disable this button\n\t */\n\tpublic setDisabled(disabled = true) {\n\t\tthis.data.disabled = disabledValidator.parse(disabled);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the label for this button.\n\t *\n\t * @param label - The label to use\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = buttonLabelValidator.parse(label);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): APIButtonComponent {\n\t\tvalidateRequiredButtonParameters(\n\t\t\tthis.data.style,\n\t\t\tthis.data.label,\n\t\t\tthis.data.emoji,\n\t\t\t(this.data as APIButtonComponentWithCustomId).custom_id,\n\t\t\t(this.data as APIButtonComponentWithURL).url,\n\t\t);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APIButtonComponent;\n\t}\n}\n","import type { APIChannelSelectComponent, ChannelType } from 'discord-api-types/v10';\nimport { ComponentType } from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js';\nimport { channelTypesValidator, customIdValidator } from '../Assertions.js';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\n\n/**\n * A builder that creates API-compatible JSON data for channel select menus.\n */\nexport class ChannelSelectMenuBuilder extends BaseSelectMenuBuilder<APIChannelSelectComponent> {\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new ChannelSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new ChannelSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)\n\t * \t.setMinValues(2);\n\t * ```\n\t */\n\tpublic constructor(data?: Partial<APIChannelSelectComponent>) {\n\t\tsuper({ ...data, type: ComponentType.ChannelSelect });\n\t}\n\n\t/**\n\t * Adds channel types to this select menu.\n\t *\n\t * @param types - The channel types to use\n\t */\n\tpublic addChannelTypes(...types: RestOrArray<ChannelType>) {\n\t\tconst normalizedTypes = normalizeArray(types);\n\t\tthis.data.channel_types ??= [];\n\t\tthis.data.channel_types.push(...channelTypesValidator.parse(normalizedTypes));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets channel types for this select menu.\n\t *\n\t * @param types - The channel types to use\n\t */\n\tpublic setChannelTypes(...types: RestOrArray<ChannelType>) {\n\t\tconst normalizedTypes = normalizeArray(types);\n\t\tthis.data.channel_types ??= [];\n\t\tthis.data.channel_types.splice(0, this.data.channel_types.length, ...channelTypesValidator.parse(normalizedTypes));\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc BaseSelectMenuBuilder.toJSON}\n\t */\n\tpublic override toJSON(): APIChannelSelectComponent {\n\t\tcustomIdValidator.parse(this.data.custom_id);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APIChannelSelectComponent;\n\t}\n}\n","import type { APISelectMenuComponent } from 'discord-api-types/v10';\nimport { customIdValidator, disabledValidator, minMaxValidator, placeholderValidator } from '../Assertions.js';\nimport { ComponentBuilder } from '../Component.js';\n\n/**\n * The base select menu builder that contains common symbols for select menu builders.\n *\n * @typeParam SelectMenuType - The type of select menu this would be instantiated for.\n */\nexport abstract class BaseSelectMenuBuilder<\n\tSelectMenuType extends APISelectMenuComponent,\n> extends ComponentBuilder<SelectMenuType> {\n\t/**\n\t * Sets the placeholder for this select menu.\n\t *\n\t * @param placeholder - The placeholder to use\n\t */\n\tpublic setPlaceholder(placeholder: string) {\n\t\tthis.data.placeholder = placeholderValidator.parse(placeholder);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum values that must be selected in the select menu.\n\t *\n\t * @param minValues - The minimum values that must be selected\n\t */\n\tpublic setMinValues(minValues: number) {\n\t\tthis.data.min_values = minMaxValidator.parse(minValues);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the maximum values that must be selected in the select menu.\n\t *\n\t * @param maxValues - The maximum values that must be selected\n\t */\n\tpublic setMaxValues(maxValues: number) {\n\t\tthis.data.max_values = minMaxValidator.parse(maxValues);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom id for this select menu.\n\t *\n\t * @param customId - The custom id to use\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customIdValidator.parse(customId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this select menu is disabled.\n\t *\n\t * @param disabled - Whether this select menu is disabled\n\t */\n\tpublic setDisabled(disabled = true) {\n\t\tthis.data.disabled = disabledValidator.parse(disabled);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): SelectMenuType {\n\t\tcustomIdValidator.parse(this.data.custom_id);\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as SelectMenuType;\n\t}\n}\n","import type { APIMentionableSelectComponent } from 'discord-api-types/v10';\nimport { ComponentType } from 'discord-api-types/v10';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\n\n/**\n * A builder that creates API-compatible JSON data for mentionable select menus.\n */\nexport class MentionableSelectMenuBuilder extends BaseSelectMenuBuilder<APIMentionableSelectComponent> {\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new MentionableSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new MentionableSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.setMinValues(1);\n\t * ```\n\t */\n\tpublic constructor(data?: Partial<APIMentionableSelectComponent>) {\n\t\tsuper({ ...data, type: ComponentType.MentionableSelect });\n\t}\n}\n","import type { APIRoleSelectComponent } from 'discord-api-types/v10';\nimport { ComponentType } from 'discord-api-types/v10';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\n\n/**\n * A builder that creates API-compatible JSON data for role select menus.\n */\nexport class RoleSelectMenuBuilder extends BaseSelectMenuBuilder<APIRoleSelectComponent> {\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new RoleSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new RoleSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.setMinValues(1);\n\t * ```\n\t */\n\tpublic constructor(data?: Partial<APIRoleSelectComponent>) {\n\t\tsuper({ ...data, type: ComponentType.RoleSelect });\n\t}\n}\n","import { ComponentType } from 'discord-api-types/v10';\nimport type { APIStringSelectComponent, APISelectMenuOption } from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js';\nimport { jsonOptionValidator, optionsLengthValidator, validateRequiredSelectMenuParameters } from '../Assertions.js';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\nimport { StringSelectMenuOptionBuilder } from './StringSelectMenuOption.js';\n\n/**\n * A builder that creates API-compatible JSON data for string select menus.\n */\nexport class StringSelectMenuBuilder extends BaseSelectMenuBuilder<APIStringSelectComponent> {\n\t/**\n\t * The options within this select menu.\n\t */\n\tpublic readonly options: StringSelectMenuOptionBuilder[];\n\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new StringSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * \toptions: [\n\t * \t\t{ label: 'option 1', value: '1' },\n\t * \t\t{ label: 'option 2', value: '2' },\n\t * \t\t{ label: 'option 3', value: '3' },\n\t * \t],\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new StringSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.setMinValues(1)\n\t * \t.addOptions({\n\t * \t\tlabel: 'Catchy',\n\t * \t\tvalue: 'catch',\n\t * \t});\n\t * ```\n\t */\n\tpublic constructor(data?: Partial<APIStringSelectComponent>) {\n\t\tconst { options, ...initData } = data ?? {};\n\t\tsuper({ ...initData, type: ComponentType.StringSelect });\n\t\tthis.options = options?.map((option: APISelectMenuOption) => new StringSelectMenuOptionBuilder(option)) ?? [];\n\t}\n\n\t/**\n\t * Adds options to this select menu.\n\t *\n\t * @param options - The options to add\n\t */\n\tpublic addOptions(...options: RestOrArray<APISelectMenuOption | StringSelectMenuOptionBuilder>) {\n\t\tconst normalizedOptions = normalizeArray(options);\n\t\toptionsLengthValidator.parse(this.options.length + normalizedOptions.length);\n\t\tthis.options.push(\n\t\t\t...normalizedOptions.map((normalizedOption) =>\n\t\t\t\tnormalizedOption instanceof StringSelectMenuOptionBuilder\n\t\t\t\t\t? normalizedOption\n\t\t\t\t\t: new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption)),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the options for this select menu.\n\t *\n\t * @param options - The options to set\n\t */\n\tpublic setOptions(...options: RestOrArray<APISelectMenuOption | StringSelectMenuOptionBuilder>) {\n\t\treturn this.spliceOptions(0, this.options.length, ...options);\n\t}\n\n\t/**\n\t * Removes, replaces, or inserts options for this select menu.\n\t *\n\t * @remarks\n\t * This method behaves similarly\n\t * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}.\n\t * It's useful for modifying and adjusting the order of existing options.\n\t * @example\n\t * Remove the first option:\n\t * ```ts\n\t * selectMenu.spliceOptions(0, 1);\n\t * ```\n\t * @example\n\t * Remove the first n option:\n\t * ```ts\n\t * const n = 4;\n\t * selectMenu.spliceOptions(0, n);\n\t * ```\n\t * @example\n\t * Remove the last option:\n\t * ```ts\n\t * selectMenu.spliceOptions(-1, 1);\n\t * ```\n\t * @param index - The index to start at\n\t * @param deleteCount - The number of options to remove\n\t * @param options - The replacing option objects or builders\n\t */\n\tpublic spliceOptions(\n\t\tindex: number,\n\t\tdeleteCount: number,\n\t\t...options: RestOrArray<APISelectMenuOption | StringSelectMenuOptionBuilder>\n\t) {\n\t\tconst normalizedOptions = normalizeArray(options);\n\n\t\tconst clone = [...this.options];\n\n\t\tclone.splice(\n\t\t\tindex,\n\t\t\tdeleteCount,\n\t\t\t...normalizedOptions.map((normalizedOption) =>\n\t\t\t\tnormalizedOption instanceof StringSelectMenuOptionBuilder\n\t\t\t\t\t? normalizedOption\n\t\t\t\t\t: new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption)),\n\t\t\t),\n\t\t);\n\n\t\toptionsLengthValidator.parse(clone.length);\n\t\tthis.options.splice(0, this.options.length, ...clone);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc BaseSelectMenuBuilder.toJSON}\n\t */\n\tpublic override toJSON(): APIStringSelectComponent {\n\t\tvalidateRequiredSelectMenuParameters(this.options, this.data.custom_id);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t} as APIStringSelectComponent;\n\t}\n}\n","import type { APIUserSelectComponent } from 'discord-api-types/v10';\nimport { ComponentType } from 'discord-api-types/v10';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\n\n/**\n * A builder that creates API-compatible JSON data for user select menus.\n */\nexport class UserSelectMenuBuilder extends BaseSelectMenuBuilder<APIUserSelectComponent> {\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new UserSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new UserSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.setMinValues(1);\n\t * ```\n\t */\n\tpublic constructor(data?: Partial<APIUserSelectComponent>) {\n\t\tsuper({ ...data, type: ComponentType.UserSelect });\n\t}\n}\n","import { isJSONEncodable, type Equatable, type JSONEncodable } from '@discordjs/util';\nimport { ComponentType, type TextInputStyle, type APITextInputComponent } from 'discord-api-types/v10';\nimport isEqual from 'fast-deep-equal';\nimport { customIdValidator } from '../Assertions.js';\nimport { ComponentBuilder } from '../Component.js';\nimport {\n\tmaxLengthValidator,\n\tminLengthValidator,\n\tplaceholderValidator,\n\trequiredValidator,\n\tvalueValidator,\n\tvalidateRequiredParameters,\n\tlabelValidator,\n\ttextInputStyleValidator,\n} from './Assertions.js';\n\n/**\n * A builder that creates API-compatible JSON data for text inputs.\n */\nexport class TextInputBuilder\n\textends ComponentBuilder<APITextInputComponent>\n\timplements Equatable<APITextInputComponent | JSONEncodable<APITextInputComponent>>\n{\n\t/**\n\t * Creates a new text input from API data.\n\t *\n\t * @param data - The API data to create this text input with\n\t * @example\n\t * Creating a select menu option from an API data object:\n\t * ```ts\n\t * const textInput = new TextInputBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tlabel: 'Type something',\n\t * \tstyle: TextInputStyle.Short,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu option using setters and API data:\n\t * ```ts\n\t * const textInput = new TextInputBuilder({\n\t * \tlabel: 'Type something else',\n\t * })\n\t * \t.setCustomId('woah')\n\t * \t.setStyle(TextInputStyle.Paragraph);\n\t * ```\n\t */\n\tpublic constructor(data?: APITextInputComponent & { type?: ComponentType.TextInput }) {\n\t\tsuper({ type: ComponentType.TextInput, ...data });\n\t}\n\n\t/**\n\t * Sets the custom id for this text input.\n\t *\n\t * @param customId - The custom id to use\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customIdValidator.parse(customId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the label for this text input.\n\t *\n\t * @param label - The label to use\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = labelValidator.parse(label);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the style for this text input.\n\t *\n\t * @param style - The style to use\n\t */\n\tpublic setStyle(style: TextInputStyle) {\n\t\tthis.data.style = textInputStyleValidator.parse(style);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum length of text for this text input.\n\t *\n\t * @param minLength - The minimum length of text for this text input\n\t */\n\tpublic setMinLength(minLength: number) {\n\t\tthis.data.min_length = minLengthValidator.parse(minLength);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the maximum length of text for this text input.\n\t *\n\t * @param maxLength - The maximum length of text for this text input\n\t */\n\tpublic setMaxLength(maxLength: number) {\n\t\tthis.data.max_length = maxLengthValidator.parse(maxLength);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the placeholder for this text input.\n\t *\n\t * @param placeholder - The placeholder to use\n\t */\n\tpublic setPlaceholder(placeholder: string) {\n\t\tthis.data.placeholder = placeholderValidator.parse(placeholder);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the value for this text input.\n\t *\n\t * @param value - The value to use\n\t */\n\tpublic setValue(value: string) {\n\t\tthis.data.value = valueValidator.parse(value);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this text input is required.\n\t *\n\t * @param required - Whether this text input is required\n\t */\n\tpublic setRequired(required = true) {\n\t\tthis.data.required = requiredValidator.parse(required);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): APITextInputComponent {\n\t\tvalidateRequiredParameters(this.data.custom_id, this.data.style, this.data.label);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APITextInputComponent;\n\t}\n\n\t/**\n\t * {@inheritDoc Equatable.equals}\n\t */\n\tpublic equals(other: APITextInputComponent | JSONEncodable<APITextInputComponent>): boolean {\n\t\tif (isJSONEncodable(other)) {\n\t\t\treturn isEqual(other.toJSON(), this.data);\n\t\t}\n\n\t\treturn isEqual(other, this.data);\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { TextInputStyle } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../../util/validation.js';\nimport { customIdValidator } from '../Assertions.js';\n\nexport const textInputStyleValidator = s.nativeEnum(TextInputStyle);\nexport const minLengthValidator = s.number.int\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(4_000)\n\t.setValidationEnabled(isValidationEnabled);\nexport const maxLengthValidator = s.number.int\n\t.greaterThanOrEqual(1)\n\t.lessThanOrEqual(4_000)\n\t.setValidationEnabled(isValidationEnabled);\nexport const requiredValidator = s.boolean;\nexport const valueValidator = s.string.lengthLessThanOrEqual(4_000).setValidationEnabled(isValidationEnabled);\nexport const placeholderValidator = s.string.lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);\nexport const labelValidator = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(45)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateRequiredParameters(customId?: string, style?: TextInputStyle, label?: string) {\n\tcustomIdValidator.parse(customId);\n\ttextInputStyleValidator.parse(style);\n\tlabelValidator.parse(label);\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ActionRowBuilder, type ModalActionRowComponentBuilder } from '../../components/ActionRow.js';\nimport { customIdValidator } from '../../components/Assertions.js';\nimport { isValidationEnabled } from '../../util/validation.js';\n\nexport const titleValidator = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(45)\n\t.setValidationEnabled(isValidationEnabled);\nexport const componentsValidator = s\n\t.instance(ActionRowBuilder)\n\t.array.lengthGreaterThanOrEqual(1)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateRequiredParameters(\n\tcustomId?: string,\n\ttitle?: string,\n\tcomponents?: ActionRowBuilder<ModalActionRowComponentBuilder>[],\n) {\n\tcustomIdValidator.parse(customId);\n\ttitleValidator.parse(title);\n\tcomponentsValidator.parse(components);\n}\n","/* eslint-disable jsdoc/check-param-names */\n\nimport type { JSONEncodable } from '@discordjs/util';\nimport type {\n\tAPIActionRowComponent,\n\tAPIModalActionRowComponent,\n\tAPIModalInteractionResponseCallbackData,\n} from 'discord-api-types/v10';\nimport { ActionRowBuilder, type ModalActionRowComponentBuilder } from '../../components/ActionRow.js';\nimport { customIdValidator } from '../../components/Assertions.js';\nimport { createComponentBuilder } from '../../components/Components.js';\nimport { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js';\nimport { titleValidator, validateRequiredParameters } from './Assertions.js';\n\n/**\n * A builder that creates API-compatible JSON data for modals.\n */\nexport class ModalBuilder implements JSONEncodable<APIModalInteractionResponseCallbackData> {\n\t/**\n\t * The API data associated with this modal.\n\t */\n\tpublic readonly data: Partial<APIModalInteractionResponseCallbackData>;\n\n\t/**\n\t * The components within this modal.\n\t */\n\tpublic readonly components: ActionRowBuilder<ModalActionRowComponentBuilder>[] = [];\n\n\t/**\n\t * Creates a new modal from API data.\n\t *\n\t * @param data - The API data to create this modal with\n\t */\n\tpublic constructor({ components, ...data }: Partial<APIModalInteractionResponseCallbackData> = {}) {\n\t\tthis.data = { ...data };\n\t\tthis.components = (components?.map((component) => createComponentBuilder(component)) ??\n\t\t\t[]) as ActionRowBuilder<ModalActionRowComponentBuilder>[];\n\t}\n\n\t/**\n\t * Sets the title of this modal.\n\t *\n\t * @param title - The title to use\n\t */\n\tpublic setTitle(title: string) {\n\t\tthis.data.title = titleValidator.parse(title);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom id of this modal.\n\t *\n\t * @param customId - The custom id to use\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customIdValidator.parse(customId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds components to this modal.\n\t *\n\t * @param components - The components to add\n\t */\n\tpublic addComponents(\n\t\t...components: RestOrArray<\n\t\t\tActionRowBuilder<ModalActionRowComponentBuilder> | APIActionRowComponent<APIModalActionRowComponent>\n\t\t>\n\t) {\n\t\tthis.components.push(\n\t\t\t...normalizeArray(components).map((component) =>\n\t\t\t\tcomponent instanceof ActionRowBuilder\n\t\t\t\t\t? component\n\t\t\t\t\t: new ActionRowBuilder<ModalActionRowComponentBuilder>(component),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets components for this modal.\n\t *\n\t * @param components - The components to set\n\t */\n\tpublic setComponents(...components: RestOrArray<ActionRowBuilder<ModalActionRowComponentBuilder>>) {\n\t\tthis.components.splice(0, this.components.length, ...normalizeArray(components));\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): APIModalInteractionResponseCallbackData {\n\t\tvalidateRequiredParameters(this.data.custom_id, this.data.title, this.components);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t\tcomponents: this.components.map((component) => component.toJSON()),\n\t\t} as APIModalInteractionResponseCallbackData;\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { Locale, type APIApplicationCommandOptionChoice, type LocalizationMap } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../../util/validation.js';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder.js';\nimport type { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands.js';\nimport type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase.js';\n\nconst namePredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(32)\n\t.regex(/^[\\p{Ll}\\p{Lm}\\p{Lo}\\p{N}\\p{sc=Devanagari}\\p{sc=Thai}_-]+$/u)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateName(name: unknown): asserts name is string {\n\tnamePredicate.parse(name);\n}\n\nconst descriptionPredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(100)\n\t.setValidationEnabled(isValidationEnabled);\nconst localePredicate = s.nativeEnum(Locale);\n\nexport function validateDescription(description: unknown): asserts description is string {\n\tdescriptionPredicate.parse(description);\n}\n\nconst maxArrayLengthPredicate = s.unknown.array.lengthLessThanOrEqual(25).setValidationEnabled(isValidationEnabled);\nexport function validateLocale(locale: unknown) {\n\treturn localePredicate.parse(locale);\n}\n\nexport function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[] {\n\tmaxArrayLengthPredicate.parse(options);\n}\n\nexport function validateRequiredParameters(\n\tname: string,\n\tdescription: string,\n\toptions: ToAPIApplicationCommandOptions[],\n) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert description conditions\n\tvalidateDescription(description);\n\n\t// Assert options conditions\n\tvalidateMaxOptionsLength(options);\n}\n\nconst booleanPredicate = s.boolean;\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport function validateRequired(required: unknown): asserts required is boolean {\n\tbooleanPredicate.parse(required);\n}\n\nconst choicesLengthPredicate = s.number.lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);\n\nexport function validateChoicesLength(amountAdding: number, choices?: APIApplicationCommandOptionChoice[]): void {\n\tchoicesLengthPredicate.parse((choices?.length ?? 0) + amountAdding);\n}\n\nexport function assertReturnOfBuilder<\n\tT extends ApplicationCommandOptionBase | SlashCommandSubcommandBuilder | SlashCommandSubcommandGroupBuilder,\n>(input: unknown, ExpectedInstanceOf: new () => T): asserts input is T {\n\ts.instance(ExpectedInstanceOf).parse(input);\n}\n\nexport const localizationMapPredicate = s\n\t.object<LocalizationMap>(Object.fromEntries(Object.values(Locale).map((locale) => [locale, s.string.nullish])))\n\t.strict.nullish.setValidationEnabled(isValidationEnabled);\n\nexport function validateLocalizationMap(value: unknown): asserts value is LocalizationMap {\n\tlocalizationMapPredicate.parse(value);\n}\n\nconst dmPermissionPredicate = s.boolean.nullish;\n\nexport function validateDMPermission(value: unknown): asserts value is boolean | null | undefined {\n\tdmPermissionPredicate.parse(value);\n}\n\nconst memberPermissionPredicate = s.union(\n\ts.bigint.transform((value) => value.toString()),\n\ts.number.safeInt.transform((value) => value.toString()),\n\ts.string.regex(/^\\d+$/),\n).nullish;\n\nexport function validateDefaultMemberPermissions(permissions: unknown) {\n\treturn memberPermissionPredicate.parse(permissions);\n}\n\nexport function validateNSFW(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n","import type {\n\tAPIApplicationCommandOption,\n\tLocalizationMap,\n\tPermissions,\n\tRESTPostAPIChatInputApplicationCommandsJSONBody,\n} from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport {\n\tassertReturnOfBuilder,\n\tvalidateDefaultMemberPermissions,\n\tvalidateDefaultPermission,\n\tvalidateLocalizationMap,\n\tvalidateDMPermission,\n\tvalidateMaxOptionsLength,\n\tvalidateRequiredParameters,\n\tvalidateNSFW,\n} from './Assertions.js';\nimport { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands.js';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription.js';\nimport { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions.js';\n\n/**\n * A builder that creates API-compatible JSON data for slash commands.\n */\n@mix(SharedSlashCommandOptions, SharedNameAndDescription)\nexport class SlashCommandBuilder {\n\t/**\n\t * The name of this command.\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The name localizations of this command.\n\t */\n\tpublic readonly name_localizations?: LocalizationMap;\n\n\t/**\n\t * The description of this command.\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The description localizations of this command.\n\t */\n\tpublic readonly description_localizations?: LocalizationMap;\n\n\t/**\n\t * The options of this command.\n\t */\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\t/**\n\t * Whether this command is enabled by default when the application is added to a guild.\n\t *\n\t * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.\n\t */\n\tpublic readonly default_permission: boolean | undefined = undefined;\n\n\t/**\n\t * The set of permissions represented as a bit set for the command.\n\t */\n\tpublic readonly default_member_permissions: Permissions | null | undefined = undefined;\n\n\t/**\n\t * Indicates whether the command is available in direct messages with the application.\n\t *\n\t * @remarks\n\t * By default, commands are visible. This property is only for global commands.\n\t */\n\tpublic readonly dm_permission: boolean | undefined = undefined;\n\n\t/**\n\t * Whether this command is NSFW.\n\t */\n\tpublic readonly nsfw: boolean | undefined = undefined;\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * @remarks\n\t * If set to `false`, you will have to later `PUT` the permissions for this command.\n\t * @param value - Whether or not to enable this command by default\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t * @deprecated Use {@link SlashCommandBuilder.setDefaultMemberPermissions} or {@link SlashCommandBuilder.setDMPermission} instead.\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'default_permission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the default permissions a member should have in order to run the command.\n\t *\n\t * @remarks\n\t * You can set this to `'0'` to disable the command by default.\n\t * @param permissions - The permissions bit field to set\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t */\n\tpublic setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined) {\n\t\t// Assert the value and parse it\n\t\tconst permissionValue = validateDefaultMemberPermissions(permissions);\n\n\t\tReflect.set(this, 'default_member_permissions', permissionValue);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets if the command is available in direct messages with the application.\n\t *\n\t * @remarks\n\t * By default, commands are visible. This method is only for global commands.\n\t * @param enabled - Whether the command should be enabled in direct messages\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t */\n\tpublic setDMPermission(enabled: boolean | null | undefined) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDMPermission(enabled);\n\n\t\tReflect.set(this, 'dm_permission', enabled);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this command is NSFW.\n\t *\n\t * @param nsfw - Whether this command is NSFW\n\t */\n\tpublic setNSFW(nsfw = true) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateNSFW(nsfw);\n\t\tReflect.set(this, 'nsfw', nsfw);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand group to this command.\n\t *\n\t * @param input - A function that returns a subcommand group builder or an already built builder\n\t */\n\tpublic addSubcommandGroup(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandGroupBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandGroupBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandGroupBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand to this command.\n\t *\n\t * @param input - A function that returns a subcommand builder or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\tvalidateLocalizationMap(this.name_localizations);\n\t\tvalidateLocalizationMap(this.description_localizations);\n\n\t\treturn {\n\t\t\t...this,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {}\n\n/**\n * An interface specifically for slash command subcommands.\n */\nexport interface SlashCommandSubcommandsOnlyBuilder\n\textends Omit<SlashCommandBuilder, Exclude<keyof SharedSlashCommandOptions, 'options'>> {}\n\n/**\n * An interface specifically for slash command options.\n */\nexport interface SlashCommandOptionsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tSharedSlashCommandOptions,\n\t\tPick<SlashCommandBuilder, 'toJSON'> {}\n\n/**\n * An interface that ensures the `toJSON()` call will return something\n * that can be serialized into API-compatible data.\n */\nexport interface ToAPIApplicationCommandOptions {\n\ttoJSON(): APIApplicationCommandOption;\n}\n","import {\n\tApplicationCommandOptionType,\n\ttype APIApplicationCommandSubcommandGroupOption,\n\ttype APIApplicationCommandSubcommandOption,\n} from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { assertReturnOfBuilder, validateMaxOptionsLength, validateRequiredParameters } from './Assertions.js';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder.js';\nimport type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase.js';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription.js';\nimport { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions.js';\n\n/**\n * Represents a folder for subcommands.\n *\n * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups}\n */\n@mix(SharedNameAndDescription)\nexport class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand group.\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand group.\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The subcommands within this subcommand group.\n\t */\n\tpublic readonly options: SlashCommandSubcommandBuilder[] = [];\n\n\t/**\n\t * Adds a new subcommand to this group.\n\t *\n\t * @param input - A function that returns a subcommand builder or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t) {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): APIApplicationCommandSubcommandGroupOption {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.SubcommandGroup,\n\t\t\tname: this.name,\n\t\t\tname_localizations: this.name_localizations,\n\t\t\tdescription: this.description,\n\t\t\tdescription_localizations: this.description_localizations,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription {}\n\n/**\n * A builder that creates API-compatible JSON data for slash command subcommands.\n *\n * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups}\n */\n@mix(SharedNameAndDescription, SharedSlashCommandOptions)\nexport class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand.\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand.\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options within this subcommand.\n\t */\n\tpublic readonly options: ApplicationCommandOptionBase[] = [];\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): APIApplicationCommandSubcommandOption {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.Subcommand,\n\t\t\tname: this.name,\n\t\t\tname_localizations: this.name_localizations,\n\t\t\tdescription: this.description,\n\t\t\tdescription_localizations: this.description_localizations,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions<false> {}\n","import type { LocaleString, LocalizationMap } from 'discord-api-types/v10';\nimport { validateDescription, validateLocale, validateName } from '../Assertions.js';\n\n/**\n * This mixin holds name and description symbols for slash commands.\n */\nexport class SharedNameAndDescription {\n\t/**\n\t * The name of this command.\n\t */\n\tpublic readonly name!: string;\n\n\t/**\n\t * The name localizations of this command.\n\t */\n\tpublic readonly name_localizations?: LocalizationMap;\n\n\t/**\n\t * The description of this command.\n\t */\n\tpublic readonly description!: string;\n\n\t/**\n\t * The description localizations of this command.\n\t */\n\tpublic readonly description_localizations?: LocalizationMap;\n\n\t/**\n\t * Sets the name of this command.\n\t *\n\t * @param name - The name to use\n\t */\n\tpublic setName(name: string): this {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this command.\n\t *\n\t * @param description - The description to use\n\t */\n\tpublic setDescription(description: string) {\n\t\t// Assert the description matches the conditions\n\t\tvalidateDescription(description);\n\n\t\tReflect.set(this, 'description', description);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets a name localization for this command.\n\t *\n\t * @param locale - The locale to set\n\t * @param localizedName - The localized name for the given `locale`\n\t */\n\tpublic setNameLocalization(locale: LocaleString, localizedName: string | null) {\n\t\tif (!this.name_localizations) {\n\t\t\tReflect.set(this, 'name_localizations', {});\n\t\t}\n\n\t\tconst parsedLocale = validateLocale(locale);\n\n\t\tif (localizedName === null) {\n\t\t\tthis.name_localizations![parsedLocale] = null;\n\t\t\treturn this;\n\t\t}\n\n\t\tvalidateName(localizedName);\n\n\t\tthis.name_localizations![parsedLocale] = localizedName;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the name localizations for this command.\n\t *\n\t * @param localizedNames - The object of localized names to set\n\t */\n\tpublic setNameLocalizations(localizedNames: LocalizationMap | null) {\n\t\tif (localizedNames === null) {\n\t\t\tReflect.set(this, 'name_localizations', null);\n\t\t\treturn this;\n\t\t}\n\n\t\tReflect.set(this, 'name_localizations', {});\n\n\t\tfor (const args of Object.entries(localizedNames)) {\n\t\t\tthis.setNameLocalization(...(args as [LocaleString, string | null]));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets a description localization for this command.\n\t *\n\t * @param locale - The locale to set\n\t * @param localizedDescription - The localized description for the given locale\n\t */\n\tpublic setDescriptionLocalization(locale: LocaleString, localizedDescription: string | null) {\n\t\tif (!this.description_localizations) {\n\t\t\tReflect.set(this, 'description_localizations', {});\n\t\t}\n\n\t\tconst parsedLocale = validateLocale(locale);\n\n\t\tif (localizedDescription === null) {\n\t\t\tthis.description_localizations![parsedLocale] = null;\n\t\t\treturn this;\n\t\t}\n\n\t\tvalidateDescription(localizedDescription);\n\n\t\tthis.description_localizations![parsedLocale] = localizedDescription;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description localizations for this command.\n\t *\n\t * @param localizedDescriptions - The object of localized descriptions to set\n\t */\n\tpublic setDescriptionLocalizations(localizedDescriptions: LocalizationMap | null) {\n\t\tif (localizedDescriptions === null) {\n\t\t\tReflect.set(this, 'description_localizations', null);\n\t\t\treturn this;\n\t\t}\n\n\t\tReflect.set(this, 'description_localizations', {});\n\t\tfor (const args of Object.entries(localizedDescriptions)) {\n\t\t\tthis.setDescriptionLocalization(...(args as [LocaleString, string | null]));\n\t\t}\n\n\t\treturn this;\n\t}\n}\n","import { ApplicationCommandOptionType, type APIApplicationCommandAttachmentOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command attachment option.\n */\nexport class SlashCommandAttachmentOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic override readonly type = ApplicationCommandOptionType.Attachment as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandAttachmentOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import type { APIApplicationCommandBasicOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { validateRequiredParameters, validateRequired, validateLocalizationMap } from '../Assertions.js';\nimport { SharedNameAndDescription } from './NameAndDescription.js';\n\n/**\n * The base application command option builder that contains common symbols for application command builders.\n */\nexport abstract class ApplicationCommandOptionBase extends SharedNameAndDescription {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic abstract readonly type: ApplicationCommandOptionType;\n\n\t/**\n\t * Whether this option is required.\n\t *\n\t * @defaultValue `false`\n\t */\n\tpublic readonly required: boolean = false;\n\n\t/**\n\t * Sets whether this option is required.\n\t *\n\t * @param required - Whether this option should be required\n\t */\n\tpublic setRequired(required: boolean) {\n\t\t// Assert that you actually passed a boolean\n\t\tvalidateRequired(required);\n\n\t\tReflect.set(this, 'required', required);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic abstract toJSON(): APIApplicationCommandBasicOption;\n\n\t/**\n\t * This method runs required validators on this builder.\n\t */\n\tprotected runRequiredValidations() {\n\t\tvalidateRequiredParameters(this.name, this.description, []);\n\n\t\t// Validate localizations\n\t\tvalidateLocalizationMap(this.name_localizations);\n\t\tvalidateLocalizationMap(this.description_localizations);\n\n\t\t// Assert that you actually passed a boolean\n\t\tvalidateRequired(this.required);\n\t}\n}\n","import { ApplicationCommandOptionType, type APIApplicationCommandBooleanOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command boolean option.\n */\nexport class SlashCommandBooleanOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.Boolean as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandBooleanOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { ApplicationCommandOptionType, type APIApplicationCommandChannelOption } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\nimport { ApplicationCommandOptionChannelTypesMixin } from '../mixins/ApplicationCommandOptionChannelTypesMixin.js';\n\n/**\n * A slash command channel option.\n */\n@mix(ApplicationCommandOptionChannelTypesMixin)\nexport class SlashCommandChannelOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic override readonly type = ApplicationCommandOptionType.Channel as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandChannelOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandChannelOption extends ApplicationCommandOptionChannelTypesMixin {}\n","import { s } from '@sapphire/shapeshift';\nimport { ChannelType } from 'discord-api-types/v10';\n\n/**\n * The allowed channel types used for a channel option in a slash command builder.\n *\n * @privateRemarks This can't be dynamic because const enums are erased at runtime.\n * @internal\n */\nconst allowedChannelTypes = [\n\tChannelType.GuildText,\n\tChannelType.GuildVoice,\n\tChannelType.GuildCategory,\n\tChannelType.GuildAnnouncement,\n\tChannelType.AnnouncementThread,\n\tChannelType.PublicThread,\n\tChannelType.PrivateThread,\n\tChannelType.GuildStageVoice,\n\tChannelType.GuildForum,\n] as const;\n\n/**\n * The type of allowed channel types used for a channel option.\n */\nexport type ApplicationCommandOptionAllowedChannelTypes = (typeof allowedChannelTypes)[number];\n\nconst channelTypesPredicate = s.array(s.union(...allowedChannelTypes.map((type) => s.literal(type))));\n\n/**\n * This mixin holds channel type symbols used for options.\n */\nexport class ApplicationCommandOptionChannelTypesMixin {\n\t/**\n\t * The channel types of this option.\n\t */\n\tpublic readonly channel_types?: ApplicationCommandOptionAllowedChannelTypes[];\n\n\t/**\n\t * Adds channel types to this option.\n\t *\n\t * @param channelTypes - The channel types\n\t */\n\tpublic addChannelTypes(...channelTypes: ApplicationCommandOptionAllowedChannelTypes[]) {\n\t\tif (this.channel_types === undefined) {\n\t\t\tReflect.set(this, 'channel_types', []);\n\t\t}\n\n\t\tthis.channel_types!.push(...channelTypesPredicate.parse(channelTypes));\n\n\t\treturn this;\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandOptionType, type APIApplicationCommandIntegerOption } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin.js';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.js';\n\nconst numberValidator = s.number.int;\n\n/**\n * A slash command integer option.\n */\n@mix(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandIntegerOption\n\textends ApplicationCommandOptionBase\n\timplements ApplicationCommandNumericOptionMinMaxValueMixin\n{\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.Integer as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}\n\t */\n\tpublic setMaxValue(max: number): this {\n\t\tnumberValidator.parse(max);\n\n\t\tReflect.set(this, 'max_value', max);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}\n\t */\n\tpublic setMinValue(min: number): this {\n\t\tnumberValidator.parse(min);\n\n\t\tReflect.set(this, 'min_value', min);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandIntegerOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this } as APIApplicationCommandIntegerOption;\n\t}\n}\n\nexport interface SlashCommandIntegerOption\n\textends ApplicationCommandNumericOptionMinMaxValueMixin,\n\t\tApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {}\n","/**\n * This mixin holds minimum and maximum symbols used for options.\n */\nexport abstract class ApplicationCommandNumericOptionMinMaxValueMixin {\n\t/**\n\t * The maximum value of this option.\n\t */\n\tpublic readonly max_value?: number;\n\n\t/**\n\t * The minimum value of this option.\n\t */\n\tpublic readonly min_value?: number;\n\n\t/**\n\t * Sets the maximum number value of this option.\n\t *\n\t * @param max - The maximum value this option can be\n\t */\n\tpublic abstract setMaxValue(max: number): this;\n\n\t/**\n\t * Sets the minimum number value of this option.\n\t *\n\t * @param min - The minimum value this option can be\n\t */\n\tpublic abstract setMinValue(min: number): this;\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandOptionType, type APIApplicationCommandOptionChoice } from 'discord-api-types/v10';\nimport { localizationMapPredicate, validateChoicesLength } from '../Assertions.js';\n\nconst stringPredicate = s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100);\nconst numberPredicate = s.number.greaterThan(Number.NEGATIVE_INFINITY).lessThan(Number.POSITIVE_INFINITY);\nconst choicesPredicate = s.object({\n\tname: stringPredicate,\n\tname_localizations: localizationMapPredicate,\n\tvalue: s.union(stringPredicate, numberPredicate),\n}).array;\nconst booleanPredicate = s.boolean;\n\n/**\n * This mixin holds choices and autocomplete symbols used for options.\n */\nexport class ApplicationCommandOptionWithChoicesAndAutocompleteMixin<T extends number | string> {\n\t/**\n\t * The choices of this option.\n\t */\n\tpublic readonly choices?: APIApplicationCommandOptionChoice<T>[];\n\n\t/**\n\t * Whether this option utilizes autocomplete.\n\t */\n\tpublic readonly autocomplete?: boolean;\n\n\t/**\n\t * The type of this option.\n\t *\n\t * @privateRemarks Since this is present and this is a mixin, this is needed.\n\t */\n\tpublic readonly type!: ApplicationCommandOptionType;\n\n\t/**\n\t * Adds multiple choices to this option.\n\t *\n\t * @param choices - The choices to add\n\t */\n\tpublic addChoices(...choices: APIApplicationCommandOptionChoice<T>[]): this {\n\t\tif (choices.length > 0 && this.autocomplete) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tchoicesPredicate.parse(choices);\n\n\t\tif (this.choices === undefined) {\n\t\t\tReflect.set(this, 'choices', []);\n\t\t}\n\n\t\tvalidateChoicesLength(choices.length, this.choices);\n\n\t\tfor (const { name, name_localizations, value } of choices) {\n\t\t\t// Validate the value\n\t\t\tif (this.type === ApplicationCommandOptionType.String) {\n\t\t\t\tstringPredicate.parse(value);\n\t\t\t} else {\n\t\t\t\tnumberPredicate.parse(value);\n\t\t\t}\n\n\t\t\tthis.choices!.push({ name, name_localizations, value });\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets multiple choices for this option.\n\t *\n\t * @param choices - The choices to set\n\t */\n\tpublic setChoices<Input extends APIApplicationCommandOptionChoice<T>[]>(...choices: Input): this {\n\t\tif (choices.length > 0 && this.autocomplete) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tchoicesPredicate.parse(choices);\n\n\t\tReflect.set(this, 'choices', []);\n\t\tthis.addChoices(...choices);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Whether this option uses autocomplete.\n\t *\n\t * @param autocomplete - Whether this option should use autocomplete\n\t */\n\tpublic setAutocomplete(autocomplete: boolean): this {\n\t\t// Assert that you actually passed a boolean\n\t\tbooleanPredicate.parse(autocomplete);\n\n\t\tif (autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tReflect.set(this, 'autocomplete', autocomplete);\n\n\t\treturn this;\n\t}\n}\n","import { ApplicationCommandOptionType, type APIApplicationCommandMentionableOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command mentionable option.\n */\nexport class SlashCommandMentionableOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.Mentionable as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandMentionableOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandOptionType, type APIApplicationCommandNumberOption } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin.js';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.js';\n\nconst numberValidator = s.number;\n\n/**\n * A slash command number option.\n */\n@mix(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandNumberOption\n\textends ApplicationCommandOptionBase\n\timplements ApplicationCommandNumericOptionMinMaxValueMixin\n{\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.Number as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}\n\t */\n\tpublic setMaxValue(max: number): this {\n\t\tnumberValidator.parse(max);\n\n\t\tReflect.set(this, 'max_value', max);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}\n\t */\n\tpublic setMinValue(min: number): this {\n\t\tnumberValidator.parse(min);\n\n\t\tReflect.set(this, 'min_value', min);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandNumberOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this } as APIApplicationCommandNumberOption;\n\t}\n}\n\nexport interface SlashCommandNumberOption\n\textends ApplicationCommandNumericOptionMinMaxValueMixin,\n\t\tApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {}\n","import { ApplicationCommandOptionType, type APIApplicationCommandRoleOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command role option.\n */\nexport class SlashCommandRoleOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic override readonly type = ApplicationCommandOptionType.Role as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandRoleOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandOptionType, type APIApplicationCommandStringOption } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.js';\n\nconst minLengthValidator = s.number.greaterThanOrEqual(0).lessThanOrEqual(6_000);\nconst maxLengthValidator = s.number.greaterThanOrEqual(1).lessThanOrEqual(6_000);\n\n/**\n * A slash command string option.\n */\n@mix(ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandStringOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.String as const;\n\n\t/**\n\t * The maximum length of this option.\n\t */\n\tpublic readonly max_length?: number;\n\n\t/**\n\t * The minimum length of this option.\n\t */\n\tpublic readonly min_length?: number;\n\n\t/**\n\t * Sets the maximum length of this string option.\n\t *\n\t * @param max - The maximum length this option can be\n\t */\n\tpublic setMaxLength(max: number): this {\n\t\tmaxLengthValidator.parse(max);\n\n\t\tReflect.set(this, 'max_length', max);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum length of this string option.\n\t *\n\t * @param min - The minimum length this option can be\n\t */\n\tpublic setMinLength(min: number): this {\n\t\tminLengthValidator.parse(min);\n\n\t\tReflect.set(this, 'min_length', min);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandStringOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this } as APIApplicationCommandStringOption;\n\t}\n}\n\nexport interface SlashCommandStringOption extends ApplicationCommandOptionWithChoicesAndAutocompleteMixin<string> {}\n","import { ApplicationCommandOptionType, type APIApplicationCommandUserOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command user option.\n */\nexport class SlashCommandUserOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.User as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandUserOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { assertReturnOfBuilder, validateMaxOptionsLength } from '../Assertions.js';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\nimport { SlashCommandAttachmentOption } from '../options/attachment.js';\nimport { SlashCommandBooleanOption } from '../options/boolean.js';\nimport { SlashCommandChannelOption } from '../options/channel.js';\nimport { SlashCommandIntegerOption } from '../options/integer.js';\nimport { SlashCommandMentionableOption } from '../options/mentionable.js';\nimport { SlashCommandNumberOption } from '../options/number.js';\nimport { SlashCommandRoleOption } from '../options/role.js';\nimport { SlashCommandStringOption } from '../options/string.js';\nimport { SlashCommandUserOption } from '../options/user.js';\nimport type { ApplicationCommandOptionBase } from './ApplicationCommandOptionBase.js';\n\n/**\n * This mixin holds symbols that can be shared in slash command options.\n *\n * @typeParam ShouldOmitSubcommandFunctions - Whether to omit subcommand functions.\n */\nexport class SharedSlashCommandOptions<ShouldOmitSubcommandFunctions = true> {\n\tpublic readonly options!: ToAPIApplicationCommandOptions[];\n\n\t/**\n\t * Adds a boolean option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addBooleanOption(\n\t\tinput: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandBooleanOption);\n\t}\n\n\t/**\n\t * Adds a user option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandUserOption);\n\t}\n\n\t/**\n\t * Adds a channel option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addChannelOption(\n\t\tinput: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandChannelOption);\n\t}\n\n\t/**\n\t * Adds a role option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandRoleOption);\n\t}\n\n\t/**\n\t * Adds an attachment option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addAttachmentOption(\n\t\tinput: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandAttachmentOption);\n\t}\n\n\t/**\n\t * Adds a mentionable option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addMentionableOption(\n\t\tinput: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandMentionableOption);\n\t}\n\n\t/**\n\t * Adds a string option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addStringOption(\n\t\tinput:\n\t\t\t| Omit<SlashCommandStringOption, 'addChoices'>\n\t\t\t| Omit<SlashCommandStringOption, 'setAutocomplete'>\n\t\t\t| SlashCommandStringOption\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandStringOption,\n\t\t\t ) =>\n\t\t\t\t\t| Omit<SlashCommandStringOption, 'addChoices'>\n\t\t\t\t\t| Omit<SlashCommandStringOption, 'setAutocomplete'>\n\t\t\t\t\t| SlashCommandStringOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandStringOption);\n\t}\n\n\t/**\n\t * Adds an integer option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addIntegerOption(\n\t\tinput:\n\t\t\t| Omit<SlashCommandIntegerOption, 'addChoices'>\n\t\t\t| Omit<SlashCommandIntegerOption, 'setAutocomplete'>\n\t\t\t| SlashCommandIntegerOption\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandIntegerOption,\n\t\t\t ) =>\n\t\t\t\t\t| Omit<SlashCommandIntegerOption, 'addChoices'>\n\t\t\t\t\t| Omit<SlashCommandIntegerOption, 'setAutocomplete'>\n\t\t\t\t\t| SlashCommandIntegerOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandIntegerOption);\n\t}\n\n\t/**\n\t * Adds a number option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addNumberOption(\n\t\tinput:\n\t\t\t| Omit<SlashCommandNumberOption, 'addChoices'>\n\t\t\t| Omit<SlashCommandNumberOption, 'setAutocomplete'>\n\t\t\t| SlashCommandNumberOption\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandNumberOption,\n\t\t\t ) =>\n\t\t\t\t\t| Omit<SlashCommandNumberOption, 'addChoices'>\n\t\t\t\t\t| Omit<SlashCommandNumberOption, 'setAutocomplete'>\n\t\t\t\t\t| SlashCommandNumberOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandNumberOption);\n\t}\n\n\t/**\n\t * Where the actual adding magic happens. ✨\n\t *\n\t * @param input - The input. What else?\n\t * @param Instance - The instance of whatever is being added\n\t * @internal\n\t */\n\tprivate _sharedAddOptionMethod<T extends ApplicationCommandOptionBase>(\n\t\tinput:\n\t\t\t| Omit<T, 'addChoices'>\n\t\t\t| Omit<T, 'setAutocomplete'>\n\t\t\t| T\n\t\t\t| ((builder: T) => Omit<T, 'addChoices'> | Omit<T, 'setAutocomplete'> | T),\n\t\tInstance: new () => T,\n\t): ShouldOmitSubcommandFunctions extends true ? Omit<this, 'addSubcommand' | 'addSubcommandGroup'> : this {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new Instance()) : input;\n\n\t\tassertReturnOfBuilder(result, Instance);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandType } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../../util/validation.js';\nimport type { ContextMenuCommandType } from './ContextMenuCommandBuilder.js';\n\nconst namePredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(32)\n\t// eslint-disable-next-line prefer-named-capture-group, unicorn/no-unsafe-regex\n\t.regex(/^( *[\\p{P}\\p{L}\\p{N}\\p{sc=Devanagari}\\p{sc=Thai}]+ *)+$/u)\n\t.setValidationEnabled(isValidationEnabled);\nconst typePredicate = s\n\t.union(s.literal(ApplicationCommandType.User), s.literal(ApplicationCommandType.Message))\n\t.setValidationEnabled(isValidationEnabled);\nconst booleanPredicate = s.boolean;\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport function validateName(name: unknown): asserts name is string {\n\tnamePredicate.parse(name);\n}\n\nexport function validateType(type: unknown): asserts type is ContextMenuCommandType {\n\ttypePredicate.parse(type);\n}\n\nexport function validateRequiredParameters(name: string, type: number) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert type is valid\n\tvalidateType(type);\n}\n\nconst dmPermissionPredicate = s.boolean.nullish;\n\nexport function validateDMPermission(value: unknown): asserts value is boolean | null | undefined {\n\tdmPermissionPredicate.parse(value);\n}\n\nconst memberPermissionPredicate = s.union(\n\ts.bigint.transform((value) => value.toString()),\n\ts.number.safeInt.transform((value) => value.toString()),\n\ts.string.regex(/^\\d+$/),\n).nullish;\n\nexport function validateDefaultMemberPermissions(permissions: unknown) {\n\treturn memberPermissionPredicate.parse(permissions);\n}\n","import type {\n\tApplicationCommandType,\n\tLocaleString,\n\tLocalizationMap,\n\tPermissions,\n\tRESTPostAPIContextMenuApplicationCommandsJSONBody,\n} from 'discord-api-types/v10';\nimport { validateLocale, validateLocalizationMap } from '../slashCommands/Assertions.js';\nimport {\n\tvalidateRequiredParameters,\n\tvalidateName,\n\tvalidateType,\n\tvalidateDefaultPermission,\n\tvalidateDefaultMemberPermissions,\n\tvalidateDMPermission,\n} from './Assertions.js';\n\n/**\n * The type a context menu command can be.\n */\nexport type ContextMenuCommandType = ApplicationCommandType.Message | ApplicationCommandType.User;\n\n/**\n * A builder that creates API-compatible JSON data for context menu commands.\n */\nexport class ContextMenuCommandBuilder {\n\t/**\n\t * The name of this command.\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The name localizations of this command.\n\t */\n\tpublic readonly name_localizations?: LocalizationMap;\n\n\t/**\n\t * The type of this command.\n\t */\n\tpublic readonly type: ContextMenuCommandType = undefined!;\n\n\t/**\n\t * Whether this command is enabled by default when the application is added to a guild.\n\t *\n\t * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.\n\t */\n\tpublic readonly default_permission: boolean | undefined = undefined;\n\n\t/**\n\t * The set of permissions represented as a bit set for the command.\n\t */\n\tpublic readonly default_member_permissions: Permissions | null | undefined = undefined;\n\n\t/**\n\t * Indicates whether the command is available in direct messages with the application.\n\t *\n\t * @remarks\n\t * By default, commands are visible. This property is only for global commands.\n\t */\n\tpublic readonly dm_permission: boolean | undefined = undefined;\n\n\t/**\n\t * Sets the name of this command.\n\t *\n\t * @param name - The name to use\n\t */\n\tpublic setName(name: string) {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the type of this command.\n\t *\n\t * @param type - The type to use\n\t */\n\tpublic setType(type: ContextMenuCommandType) {\n\t\t// Assert the type is valid\n\t\tvalidateType(type);\n\n\t\tReflect.set(this, 'type', type);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * @remarks\n\t * If set to `false`, you will have to later `PUT` the permissions for this command.\n\t * @param value - Whether to enable this command by default\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'default_permission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the default permissions a member should have in order to run this command.\n\t *\n\t * @remarks\n\t * You can set this to `'0'` to disable the command by default.\n\t * @param permissions - The permissions bit field to set\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t */\n\tpublic setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined) {\n\t\t// Assert the value and parse it\n\t\tconst permissionValue = validateDefaultMemberPermissions(permissions);\n\n\t\tReflect.set(this, 'default_member_permissions', permissionValue);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets if the command is available in direct messages with the application.\n\t *\n\t * @remarks\n\t * By default, commands are visible. This method is only for global commands.\n\t * @param enabled - Whether the command should be enabled in direct messages\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t */\n\tpublic setDMPermission(enabled: boolean | null | undefined) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDMPermission(enabled);\n\n\t\tReflect.set(this, 'dm_permission', enabled);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets a name localization for this command.\n\t *\n\t * @param locale - The locale to set\n\t * @param localizedName - The localized name for the given `locale`\n\t */\n\tpublic setNameLocalization(locale: LocaleString, localizedName: string | null) {\n\t\tif (!this.name_localizations) {\n\t\t\tReflect.set(this, 'name_localizations', {});\n\t\t}\n\n\t\tconst parsedLocale = validateLocale(locale);\n\n\t\tif (localizedName === null) {\n\t\t\tthis.name_localizations![parsedLocale] = null;\n\t\t\treturn this;\n\t\t}\n\n\t\tvalidateName(localizedName);\n\n\t\tthis.name_localizations![parsedLocale] = localizedName;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the name localizations for this command.\n\t *\n\t * @param localizedNames - The object of localized names to set\n\t */\n\tpublic setNameLocalizations(localizedNames: LocalizationMap | null) {\n\t\tif (localizedNames === null) {\n\t\t\tReflect.set(this, 'name_localizations', null);\n\t\t\treturn this;\n\t\t}\n\n\t\tReflect.set(this, 'name_localizations', {});\n\n\t\tfor (const args of Object.entries(localizedNames))\n\t\t\tthis.setNameLocalization(...(args as [LocaleString, string | null]));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): RESTPostAPIContextMenuApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.type);\n\n\t\tvalidateLocalizationMap(this.name_localizations);\n\n\t\treturn { ...this };\n\t}\n}\n","import type { APIEmbed } from 'discord-api-types/v10';\n\n/**\n * Calculates the length of the embed.\n *\n * @param data - The embed data to check\n */\nexport function embedLength(data: APIEmbed) {\n\treturn (\n\t\t(data.title?.length ?? 0) +\n\t\t(data.description?.length ?? 0) +\n\t\t(data.fields?.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) ?? 0) +\n\t\t(data.footer?.text.length ?? 0) +\n\t\t(data.author?.name.length ?? 0)\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAS,SAAS;;;ACAlB,IAAI,WAAW;AAOR,SAAS,mBAAmB;AAClC,SAAQ,WAAW;AACpB;AAFgB;AAST,SAAS,oBAAoB;AACnC,SAAQ,WAAW;AACpB;AAFgB;AAOT,SAAS,sBAAsB;AACrC,SAAO;AACR;AAFgB;;;ADnBT,IAAM,qBAAqB,EAAE,OAClC,yBAAyB,CAAC,EAC1B,sBAAsB,GAAG,EACzB,qBAAqB,mBAAmB;AAEnC,IAAM,sBAAsB,EAAE,OACnC,yBAAyB,CAAC,EAC1B,sBAAsB,IAAK,EAC3B,qBAAqB,mBAAmB;AAEnC,IAAM,uBAAuB,EAAE,QAAQ;AAEvC,IAAM,sBAAsB,EACjC,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AACT,CAAC,EACA,qBAAqB,mBAAmB;AAEnC,IAAM,4BAA4B,oBAAoB,MAAM,qBAAqB,mBAAmB;AAEpG,IAAM,uBAAuB,EAAE,OAAO,gBAAgB,EAAE,EAAE,qBAAqB,mBAAmB;AAElG,SAAS,oBAAoB,cAAsB,QAAgC;AACzF,uBAAqB,OAAO,QAAQ,UAAU,KAAK,YAAY;AAChE;AAFgB;AAIT,IAAM,sBAAsB,mBAAmB,SAAS,qBAAqB,mBAAmB;AAEhG,IAAM,oBAAoB,EAAE,OACjC,IAAI;AAAA,EACJ,kBAAkB,CAAC,SAAS,UAAU,aAAa;AACpD,CAAC,EACA,QAAQ,qBAAqB,mBAAmB;AAE3C,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AAU,MACtB,KAAK,aAAa,UAAU,MAC5B,KAAK,QAAQ,OAAO,CAAC,MAAM,SAAS,OAAO,KAAK,KAAK,SAAS,KAAK,MAAM,QAAQ,CAAC,KAAK,MACvF,KAAK,QAAQ,KAAK,UAAU,MAC5B,KAAK,QAAQ,KAAK,UAAU;AAE/B;AARgB;;;ArC6DT,IAAM,UAAU;","names":["Assertions_exports","s","s","ComponentType","ComponentType","ComponentType","ComponentType","ComponentType","ComponentType","ComponentType","ComponentType","ComponentType","ComponentType","ComponentType","ComponentType","ComponentType","Assertions_exports","placeholderValidator","s","s","placeholderValidator","ComponentType","placeholderValidator","ComponentType","ComponentType","Assertions_exports","validateRequiredParameters","s","s","validateRequiredParameters","validateRequiredParameters","Assertions_exports","validateRequiredParameters","s","s","descriptionPredicate","validateRequiredParameters","mix","ApplicationCommandOptionType","mix","validateRequiredParameters","ApplicationCommandOptionType","ApplicationCommandOptionType","ApplicationCommandOptionType","s","ChannelType","ChannelType","s","ApplicationCommandOptionType","s","ApplicationCommandOptionType","mix","s","ApplicationCommandOptionType","s","booleanPredicate","ApplicationCommandOptionType","s","ApplicationCommandOptionType","mix","ApplicationCommandOptionType","ApplicationCommandOptionType","s","ApplicationCommandOptionType","mix","numberValidator","s","ApplicationCommandOptionType","mix","ApplicationCommandOptionType","ApplicationCommandOptionType","s","ApplicationCommandOptionType","mix","minLengthValidator","s","maxLengthValidator","ApplicationCommandOptionType","mix","ApplicationCommandOptionType","ApplicationCommandOptionType","validateRequiredParameters","ApplicationCommandOptionType","mix","validateRequiredParameters","mix","Assertions_exports","validateDMPermission","validateDefaultMemberPermissions","validateDefaultPermission","validateName","validateRequiredParameters","s","namePredicate","s","booleanPredicate","validateDefaultPermission","validateName","validateRequiredParameters","dmPermissionPredicate","validateDMPermission","memberPermissionPredicate","validateDefaultMemberPermissions","validateName","validateDefaultPermission","validateDefaultMemberPermissions","validateDMPermission","validateRequiredParameters"]} \ No newline at end of file
diff --git a/node_modules/@discordjs/builders/package.json b/node_modules/@discordjs/builders/package.json
new file mode 100644
index 0000000..acec7e3
--- /dev/null
+++ b/node_modules/@discordjs/builders/package.json
@@ -0,0 +1,90 @@
+{
+ "name": "@discordjs/builders",
+ "version": "1.6.5",
+ "description": "A set of builders that you can use when creating your bot",
+ "scripts": {
+ "test": "vitest run",
+ "build": "tsup",
+ "build:docs": "tsc -p tsconfig.docs.json && yarn downlevel-dts ./dist-docs ./dist-docs",
+ "lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --format=pretty",
+ "format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty",
+ "fmt": "yarn format",
+ "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json",
+ "prepack": "yarn lint && yarn test && yarn build",
+ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/builders/*'",
+ "release": "cliff-jumper"
+ },
+ "main": "./dist/index.js",
+ "module": "./dist/index.mjs",
+ "types": "./dist/index.d.ts",
+ "exports": {
+ "types": "./dist/index.d.ts",
+ "import": "./dist/index.mjs",
+ "require": "./dist/index.js"
+ },
+ "directories": {
+ "lib": "src",
+ "test": "__tests__"
+ },
+ "files": [
+ "dist"
+ ],
+ "contributors": [
+ "Vlad Frangu <kingdgrizzle@gmail.com>",
+ "Crawl <icrawltogo@gmail.com>",
+ "Amish Shah <amishshah.2k@gmail.com>",
+ "SpaceEEC <spaceeec@yahoo.com>",
+ "Aura Román <kyradiscord@gmail.com>"
+ ],
+ "license": "Apache-2.0",
+ "keywords": [
+ "discord",
+ "api",
+ "bot",
+ "client",
+ "node",
+ "discordapp",
+ "discordjs"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/discordjs/discord.js.git",
+ "directory": "packages/builders"
+ },
+ "bugs": {
+ "url": "https://github.com/discordjs/discord.js/issues"
+ },
+ "homepage": "https://discord.js.org",
+ "dependencies": {
+ "@discordjs/formatters": "^0.3.2",
+ "@discordjs/util": "^1.0.1",
+ "@sapphire/shapeshift": "^3.9.2",
+ "discord-api-types": "0.37.50",
+ "fast-deep-equal": "^3.1.3",
+ "ts-mixer": "^6.0.3",
+ "tslib": "^2.6.1"
+ },
+ "devDependencies": {
+ "@favware/cliff-jumper": "^2.1.1",
+ "@microsoft/api-extractor": "^7.36.4",
+ "@types/node": "16.18.40",
+ "@vitest/coverage-v8": "^0.34.2",
+ "cross-env": "^7.0.3",
+ "downlevel-dts": "^0.11.0",
+ "esbuild-plugin-version-injector": "^1.2.0",
+ "eslint": "^8.47.0",
+ "eslint-config-neon": "^0.1.47",
+ "eslint-formatter-pretty": "^5.0.0",
+ "prettier": "^2.8.8",
+ "tsup": "^7.2.0",
+ "turbo": "^1.10.12",
+ "typescript": "^5.1.6",
+ "vitest": "^0.34.2"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ },
+ "publishConfig": {
+ "access": "public"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@discordjs/collection/CHANGELOG.md b/node_modules/@discordjs/collection/CHANGELOG.md
new file mode 100644
index 0000000..2c43057
--- /dev/null
+++ b/node_modules/@discordjs/collection/CHANGELOG.md
@@ -0,0 +1,190 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+# [@discordjs/collection@1.5.3](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.5.2...@discordjs/collection@1.5.3) - (2023-08-17)
+
+## Documentation
+
+- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6))
+
+# [@discordjs/collection@1.5.2](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.5.1...@discordjs/collection@1.5.2) - (2023-07-31)
+
+## Refactor
+
+- **collection:** Reduce `reduce`'s code (#9581) ([b85a3f2](https://github.com/discordjs/discord.js/commit/b85a3f2ddee8fc5974749b95fc07389a03093df2))
+
+# [@discordjs/collection@1.5.1](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.5.0...@discordjs/collection@1.5.1) - (2023-05-01)
+
+## Bug Fixes
+
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Documentation
+
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+
+# [@discordjs/collection@1.5.2](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.5.1...@discordjs/collection@1.5.2) - (2023-07-31)
+
+## Refactor
+
+- **collection:** Reduce `reduce`'s code (#9581) ([b85a3f2](https://github.com/discordjs/discord.js/commit/b85a3f2ddee8fc5974749b95fc07389a03093df2))
+
+# [@discordjs/collection@1.5.1](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.5.0...@discordjs/collection@1.5.1) - (2023-05-01)
+
+## Bug Fixes
+
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Documentation
+
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+
+# [@discordjs/collection@1.5.1](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.5.0...@discordjs/collection@1.5.1) - (2023-05-01)
+
+## Bug Fixes
+
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Documentation
+
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+
+# [@discordjs/collection@1.5.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.4.0...@discordjs/collection@1.5.0) - (2023-04-01)
+
+## Bug Fixes
+
+- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b))
+
+## Features
+
+- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b))
+
+## Refactor
+
+- **collection:** Fix/silence linter warnings (#9266) ([d6f4e60](https://github.com/discordjs/discord.js/commit/d6f4e60efd1a1796fc84dbbfbac4f9790e480a1c))
+
+# [@discordjs/collection@1.4.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.3.0...@discordjs/collection@1.4.0) - (2023-03-12)
+
+## Documentation
+
+- Fix version export (#9049) ([8b70f49](https://github.com/discordjs/discord.js/commit/8b70f497a1207e30edebdecd12b926c981c13d28))
+
+## Features
+
+- **website:** Add support for source file links (#9048) ([f6506e9](https://github.com/discordjs/discord.js/commit/f6506e99c496683ee0ab67db0726b105b929af38))
+
+## Refactor
+
+- Compare with `undefined` directly (#9191) ([869153c](https://github.com/discordjs/discord.js/commit/869153c3fdf155783e7c0ecebd3627b087c3a026))
+
+# [@discordjs/collection@1.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.2.0...@discordjs/collection@1.3.0) - (2022-11-28)
+
+## Bug Fixes
+
+- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4))
+
+## Features
+
+- Add `Collection#subtract()` (#8393) ([291f36c](https://github.com/discordjs/discord.js/commit/291f36cd736b5dea058145a1335bf7c78ec1d81d))
+
+# [@discordjs/collection@1.2.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.1.0...@discordjs/collection@1.2.0) - (2022-10-08)
+
+## Bug Fixes
+
+- Footer / sidebar / deprecation alert ([ba3e0ed](https://github.com/discordjs/discord.js/commit/ba3e0ed348258fe8e51eefb4aa7379a1230616a9))
+
+## Documentation
+
+- Change name (#8604) ([dd5a089](https://github.com/discordjs/discord.js/commit/dd5a08944c258a847fc4377f1d5e953264ab47d0))
+- Remove xml tag from collection#find (#8550) ([4032457](https://github.com/discordjs/discord.js/commit/40324574ebea9894cadcc967e0db0e4e21d62768))
+
+## Features
+
+- Web-components (#8715) ([0ac3e76](https://github.com/discordjs/discord.js/commit/0ac3e766bd9dbdeb106483fa4bb085d74de346a2))
+
+## Refactor
+
+- Website components (#8600) ([c334157](https://github.com/discordjs/discord.js/commit/c3341570d983aea9ecc419979d5a01de658c9d67))
+- Use `eslint-config-neon` for packages. (#8579) ([edadb9f](https://github.com/discordjs/discord.js/commit/edadb9fe5dfd9ff51a3cfc9b25cb242d3f9f5241))
+
+## Typings
+
+- **Collection:** Make fn return type unknown (#8676) ([822b7f2](https://github.com/discordjs/discord.js/commit/822b7f234af053c8f917b0a998b82abfccd33801))
+
+# [@discordjs/collection@1.1.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.0.1...@discordjs/collection@1.1.0) - (2022-08-22)
+
+## Bug Fixes
+
+- Use proper format for `@link` text (#8384) ([2655639](https://github.com/discordjs/discord.js/commit/26556390a3800e954974a00c1328ff47d3e67e9a))
+
+## Documentation
+
+- Fence examples in codeblocks ([193b252](https://github.com/discordjs/discord.js/commit/193b252672440a860318d3c2968aedd9cb88e0ce))
+- Use link tags (#8382) ([5494791](https://github.com/discordjs/discord.js/commit/549479131318c659f86f0eb18578d597e22522d3))
+
+## Features
+
+- **website:** Show `constructor` information (#8540) ([e42fd16](https://github.com/discordjs/discord.js/commit/e42fd1636973b10dd7ed6fb4280ee1a4a8f82007))
+- **website:** Show descriptions for `@typeParam` blocks (#8523) ([e475b63](https://github.com/discordjs/discord.js/commit/e475b63f257f6261d73cb89fee9ecbcdd84e2a6b))
+
+## Refactor
+
+- **website:** Adjust typography (#8503) ([0f83402](https://github.com/discordjs/discord.js/commit/0f834029850d2448981596cf082ff59917018d66))
+- Docs design (#8487) ([4ab1d09](https://github.com/discordjs/discord.js/commit/4ab1d09997a18879a9eb9bda39df6f15aa22557e))
+
+# [@discordjs/collection@0.8.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@0.7.0...@discordjs/collection@0.8.0) - (2022-07-17)
+
+## Bug Fixes
+
+- **Collection:** Make error messages consistent (#8224) ([5bd6b28](https://github.com/discordjs/discord.js/commit/5bd6b28b3ebfced1cb9d23e83bd7c0def7a12404))
+- Check for function type (#8064) ([3bb9c0e](https://github.com/discordjs/discord.js/commit/3bb9c0e5c37311044ff41761b572ac4f91cda57c))
+
+## Documentation
+
+- Add codecov coverage badge to readmes (#8226) ([f6db285](https://github.com/discordjs/discord.js/commit/f6db285c073898a749fe4591cbd4463d1896daf5))
+
+## Features
+
+- Codecov (#8219) ([f10f4cd](https://github.com/discordjs/discord.js/commit/f10f4cdcd88ca6be7ec735ed3a415ba13da83db0))
+- **docgen:** Update typedoc ([b3346f4](https://github.com/discordjs/discord.js/commit/b3346f4b9b3d4f96443506643d4631dc1c6d7b21))
+- Website (#8043) ([127931d](https://github.com/discordjs/discord.js/commit/127931d1df7a2a5c27923c2f2151dbf3824e50cc))
+- **docgen:** Typescript support ([3279b40](https://github.com/discordjs/discord.js/commit/3279b40912e6aa61507bedb7db15a2b8668de44b))
+- Docgen package (#8029) ([8b979c0](https://github.com/discordjs/discord.js/commit/8b979c0245c42fd824d8e98745ee869f5360fc86))
+- Use vitest instead of jest for more speed ([8d8e6c0](https://github.com/discordjs/discord.js/commit/8d8e6c03decd7352a2aa180f6e5bc1a13602539b))
+- Add scripts package for locally used scripts ([f2ae1f9](https://github.com/discordjs/discord.js/commit/f2ae1f9348bfd893332a9060f71a8a5f272a1b8b))
+
+## Refactor
+
+- **collection:** Remove `default` property (#8055) ([c8f1690](https://github.com/discordjs/discord.js/commit/c8f1690896f55f06e05a83704262783cfc2bb91d))
+- **collection:** Remove default export (#8053) ([16810f3](https://github.com/discordjs/discord.js/commit/16810f3e410bf35ed7e6e7412d517ea74c792c5d))
+- Move all the config files to root (#8033) ([769ea0b](https://github.com/discordjs/discord.js/commit/769ea0bfe78c4f1d413c6b397c604ffe91e39c6a))
+
+## Testing
+
+- **collection:** Improve coverage (#8222) ([a51f721](https://github.com/discordjs/discord.js/commit/a51f7215eca67a0f46fba8b2d706f7ec6f6dc228))
+
+# [@discordjs/collection@0.7.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@0.6.0...@discordjs/collection@0.7.0) - (2022-06-04)
+
+## Styling
+
+- Cleanup tests and tsup configs ([6b8ef20](https://github.com/discordjs/discord.js/commit/6b8ef20cb3af5b5cfd176dd0aa0a1a1e98551629))
+
+# [@discordjs/collection@0.6.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@0.5.0...@discordjs/collection@0.6.0) - (2022-04-17)
+
+## Features
+
+- Add support for module: NodeNext in TS and ESM (#7598) ([8f1986a](https://github.com/discordjs/discord.js/commit/8f1986a6aa98365e09b00e84ad5f9f354ab61f3d))
+- **builders:** Add attachment command option type (#7203) ([ae0f35f](https://github.com/discordjs/discord.js/commit/ae0f35f51d68dfa5a7dc43d161ef9365171debdb))
+- **Collection:** Add merging functions (#7299) ([e4bd07b](https://github.com/discordjs/discord.js/commit/e4bd07b2394f227ea06b72eb6999de9ab3127b25))
+
+# [@discordjs/collection@0.5.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@0.4.0...@discordjs/collection@0.5.0) - (2022-01-24)
+
+## Refactor
+
+- Make `intersect` perform a true intersection (#7211) ([d8efba2](https://github.com/discordjs/discord.js/commit/d8efba24e09aa2a8dbf028fc57a561a56e7833fd))
+
+## Typings
+
+- Add `ReadonlyCollection` (#7245) ([db25f52](https://github.com/discordjs/discord.js/commit/db25f529b26d7c819c1c42ad3e26c2263ea2da0e))
+- **Collection:** Union types on `intersect` and `difference` (#7196) ([1f9b922](https://github.com/discordjs/discord.js/commit/1f9b9225f2066e9cc66c3355417139fd25cc403c))
diff --git a/node_modules/@discordjs/collection/LICENSE b/node_modules/@discordjs/collection/LICENSE
new file mode 100644
index 0000000..d21f37a
--- /dev/null
+++ b/node_modules/@discordjs/collection/LICENSE
@@ -0,0 +1,191 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright 2021 Noel Buechler
+ Copyright 2015 Amish Shah
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/node_modules/@discordjs/collection/README.md b/node_modules/@discordjs/collection/README.md
new file mode 100644
index 0000000..4ddde14
--- /dev/null
+++ b/node_modules/@discordjs/collection/README.md
@@ -0,0 +1,67 @@
+<div align="center">
+ <br />
+ <p>
+ <a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
+ </p>
+ <br />
+ <p>
+ <a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
+ <a href="https://www.npmjs.com/package/@discordjs/collection"><img src="https://img.shields.io/npm/v/@discordjs/collection.svg?maxAge=3600" alt="npm version" /></a>
+ <a href="https://www.npmjs.com/package/@discordjs/collection"><img src="https://img.shields.io/npm/dt/@discordjs/collection.svg?maxAge=3600" alt="npm downloads" /></a>
+ <a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Build status" /></a>
+ <a href="https://codecov.io/gh/discordjs/discord.js" ><img src="https://codecov.io/gh/discordjs/discord.js/branch/main/graph/badge.svg?precision=2&flag=collection" alt="Code coverage" /></a>
+ </p>
+ <p>
+ <a href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-vercel.svg" alt="Vercel" /></a>
+ <a href="https://www.cloudflare.com"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-workers.png" alt="Cloudflare Workers" height="44" /></a>
+ </p>
+</div>
+
+## About
+
+`@discordjs/collection` is a powerful utility data structure used in discord.js.
+
+## Installation
+
+**Node.js 16.11.0 or newer is required.**
+
+```sh
+npm install @discordjs/collection
+yarn add @discordjs/collection
+pnpm add @discordjs/collection
+```
+
+## Links
+
+- [Website][website] ([source][website-source])
+- [Documentation][documentation]
+- [Guide][guide] ([source][guide-source])
+ Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library.
+- [discord.js Discord server][discord]
+- [Discord API Discord server][discord-api]
+- [GitHub][source]
+- [npm][npm]
+- [Related libraries][related-libs]
+
+## Contributing
+
+Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
+[documentation][documentation].
+See [the contribution guide][contributing] if you'd like to submit a PR.
+
+## Help
+
+If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord].
+
+[website]: https://discord.js.org
+[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
+[documentation]: https://discord.js.org/docs/packages/collection/stable
+[guide]: https://discordjs.guide/
+[guide-source]: https://github.com/discordjs/guide
+[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
+[discord]: https://discord.gg/djs
+[discord-api]: https://discord.gg/discord-api
+[source]: https://github.com/discordjs/discord.js/tree/main/packages/collection
+[npm]: https://www.npmjs.com/package/@discordjs/collection
+[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries
+[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md
diff --git a/node_modules/@discordjs/collection/dist/index.d.mts b/node_modules/@discordjs/collection/dist/index.d.mts
new file mode 100644
index 0000000..5990c61
--- /dev/null
+++ b/node_modules/@discordjs/collection/dist/index.d.mts
@@ -0,0 +1,457 @@
+/**
+ * @internal
+ */
+interface CollectionConstructor {
+ new (): Collection<unknown, unknown>;
+ new <K, V>(entries?: readonly (readonly [K, V])[] | null): Collection<K, V>;
+ new <K, V>(iterable: Iterable<readonly [K, V]>): Collection<K, V>;
+ readonly prototype: Collection<unknown, unknown>;
+ readonly [Symbol.species]: CollectionConstructor;
+}
+/**
+ * Represents an immutable version of a collection
+ */
+type ReadonlyCollection<K, V> = Omit<Collection<K, V>, 'delete' | 'ensure' | 'forEach' | 'get' | 'reverse' | 'set' | 'sort' | 'sweep'> & ReadonlyMap<K, V>;
+/**
+ * Separate interface for the constructor so that emitted js does not have a constructor that overwrites itself
+ *
+ * @internal
+ */
+interface Collection<K, V> extends Map<K, V> {
+ constructor: CollectionConstructor;
+}
+/**
+ * A Map with additional utility methods. This is used throughout discord.js rather than Arrays for anything that has
+ * an ID, for significantly improved performance and ease-of-use.
+ *
+ * @typeParam K - The key type this collection holds
+ * @typeParam V - The value type this collection holds
+ */
+declare class Collection<K, V> extends Map<K, V> {
+ /**
+ * Obtains the value of the given key if it exists, otherwise sets and returns the value provided by the default value generator.
+ *
+ * @param key - The key to get if it exists, or set otherwise
+ * @param defaultValueGenerator - A function that generates the default value
+ * @example
+ * ```ts
+ * collection.ensure(guildId, () => defaultGuildConfig);
+ * ```
+ */
+ ensure(key: K, defaultValueGenerator: (key: K, collection: this) => V): V;
+ /**
+ * Checks if all of the elements exist in the collection.
+ *
+ * @param keys - The keys of the elements to check for
+ * @returns `true` if all of the elements exist, `false` if at least one does not exist.
+ */
+ hasAll(...keys: K[]): boolean;
+ /**
+ * Checks if any of the elements exist in the collection.
+ *
+ * @param keys - The keys of the elements to check for
+ * @returns `true` if any of the elements exist, `false` if none exist.
+ */
+ hasAny(...keys: K[]): boolean;
+ /**
+ * Obtains the first value(s) in this collection.
+ *
+ * @param amount - Amount of values to obtain from the beginning
+ * @returns A single value if no amount is provided or an array of values, starting from the end if amount is negative
+ */
+ first(): V | undefined;
+ first(amount: number): V[];
+ /**
+ * Obtains the first key(s) in this collection.
+ *
+ * @param amount - Amount of keys to obtain from the beginning
+ * @returns A single key if no amount is provided or an array of keys, starting from the end if
+ * amount is negative
+ */
+ firstKey(): K | undefined;
+ firstKey(amount: number): K[];
+ /**
+ * Obtains the last value(s) in this collection.
+ *
+ * @param amount - Amount of values to obtain from the end
+ * @returns A single value if no amount is provided or an array of values, starting from the start if
+ * amount is negative
+ */
+ last(): V | undefined;
+ last(amount: number): V[];
+ /**
+ * Obtains the last key(s) in this collection.
+ *
+ * @param amount - Amount of keys to obtain from the end
+ * @returns A single key if no amount is provided or an array of keys, starting from the start if
+ * amount is negative
+ */
+ lastKey(): K | undefined;
+ lastKey(amount: number): K[];
+ /**
+ * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}.
+ * Returns the item at a given index, allowing for positive and negative integers.
+ * Negative integers count back from the last item in the collection.
+ *
+ * @param index - The index of the element to obtain
+ */
+ at(index: number): V | undefined;
+ /**
+ * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}.
+ * Returns the key at a given index, allowing for positive and negative integers.
+ * Negative integers count back from the last item in the collection.
+ *
+ * @param index - The index of the key to obtain
+ */
+ keyAt(index: number): K | undefined;
+ /**
+ * Obtains unique random value(s) from this collection.
+ *
+ * @param amount - Amount of values to obtain randomly
+ * @returns A single value if no amount is provided or an array of values
+ */
+ random(): V | undefined;
+ random(amount: number): V[];
+ /**
+ * Obtains unique random key(s) from this collection.
+ *
+ * @param amount - Amount of keys to obtain randomly
+ * @returns A single key if no amount is provided or an array
+ */
+ randomKey(): K | undefined;
+ randomKey(amount: number): K[];
+ /**
+ * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse | Array.reverse()}
+ * but returns a Collection instead of an Array.
+ */
+ reverse(): this;
+ /**
+ * Searches for a single item where the given function returns a truthy value. This behaves like
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find | Array.find()}.
+ * All collections used in Discord.js are mapped using their `id` property, and if you want to find by id you
+ * should use the `get` method. See
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get | MDN} for details.
+ *
+ * @param fn - The function to test with (should return boolean)
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection.find(user => user.username === 'Bob');
+ * ```
+ */
+ find<V2 extends V>(fn: (value: V, key: K, collection: this) => value is V2): V2 | undefined;
+ find(fn: (value: V, key: K, collection: this) => unknown): V | undefined;
+ find<This, V2 extends V>(fn: (this: This, value: V, key: K, collection: this) => value is V2, thisArg: This): V2 | undefined;
+ find<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): V | undefined;
+ /**
+ * Searches for the key of a single item where the given function returns a truthy value. This behaves like
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex | Array.findIndex()},
+ * but returns the key rather than the positional index.
+ *
+ * @param fn - The function to test with (should return boolean)
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection.findKey(user => user.username === 'Bob');
+ * ```
+ */
+ findKey<K2 extends K>(fn: (value: V, key: K, collection: this) => key is K2): K2 | undefined;
+ findKey(fn: (value: V, key: K, collection: this) => unknown): K | undefined;
+ findKey<This, K2 extends K>(fn: (this: This, value: V, key: K, collection: this) => key is K2, thisArg: This): K2 | undefined;
+ findKey<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): K | undefined;
+ /**
+ * Removes items that satisfy the provided filter function.
+ *
+ * @param fn - Function used to test (should return a boolean)
+ * @param thisArg - Value to use as `this` when executing function
+ * @returns The number of removed entries
+ */
+ sweep(fn: (value: V, key: K, collection: this) => unknown): number;
+ sweep<T>(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): number;
+ /**
+ * Identical to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter | Array.filter()},
+ * but returns a Collection instead of an Array.
+ *
+ * @param fn - The function to test with (should return boolean)
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection.filter(user => user.username === 'Bob');
+ * ```
+ */
+ filter<K2 extends K>(fn: (value: V, key: K, collection: this) => key is K2): Collection<K2, V>;
+ filter<V2 extends V>(fn: (value: V, key: K, collection: this) => value is V2): Collection<K, V2>;
+ filter(fn: (value: V, key: K, collection: this) => unknown): Collection<K, V>;
+ filter<This, K2 extends K>(fn: (this: This, value: V, key: K, collection: this) => key is K2, thisArg: This): Collection<K2, V>;
+ filter<This, V2 extends V>(fn: (this: This, value: V, key: K, collection: this) => value is V2, thisArg: This): Collection<K, V2>;
+ filter<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): Collection<K, V>;
+ /**
+ * Partitions the collection into two collections where the first collection
+ * contains the items that passed and the second contains the items that failed.
+ *
+ * @param fn - Function used to test (should return a boolean)
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * const [big, small] = collection.partition(guild => guild.memberCount > 250);
+ * ```
+ */
+ partition<K2 extends K>(fn: (value: V, key: K, collection: this) => key is K2): [Collection<K2, V>, Collection<Exclude<K, K2>, V>];
+ partition<V2 extends V>(fn: (value: V, key: K, collection: this) => value is V2): [Collection<K, V2>, Collection<K, Exclude<V, V2>>];
+ partition(fn: (value: V, key: K, collection: this) => unknown): [Collection<K, V>, Collection<K, V>];
+ partition<This, K2 extends K>(fn: (this: This, value: V, key: K, collection: this) => key is K2, thisArg: This): [Collection<K2, V>, Collection<Exclude<K, K2>, V>];
+ partition<This, V2 extends V>(fn: (this: This, value: V, key: K, collection: this) => value is V2, thisArg: This): [Collection<K, V2>, Collection<K, Exclude<V, V2>>];
+ partition<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): [Collection<K, V>, Collection<K, V>];
+ /**
+ * Maps each item into a Collection, then joins the results into a single Collection. Identical in behavior to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap | Array.flatMap()}.
+ *
+ * @param fn - Function that produces a new Collection
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection.flatMap(guild => guild.members.cache);
+ * ```
+ */
+ flatMap<T>(fn: (value: V, key: K, collection: this) => Collection<K, T>): Collection<K, T>;
+ flatMap<T, This>(fn: (this: This, value: V, key: K, collection: this) => Collection<K, T>, thisArg: This): Collection<K, T>;
+ /**
+ * Maps each item to another value into an array. Identical in behavior to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}.
+ *
+ * @param fn - Function that produces an element of the new array, taking three arguments
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection.map(user => user.tag);
+ * ```
+ */
+ map<T>(fn: (value: V, key: K, collection: this) => T): T[];
+ map<This, T>(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): T[];
+ /**
+ * Maps each item to another value into a collection. Identical in behavior to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}.
+ *
+ * @param fn - Function that produces an element of the new collection, taking three arguments
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection.mapValues(user => user.tag);
+ * ```
+ */
+ mapValues<T>(fn: (value: V, key: K, collection: this) => T): Collection<K, T>;
+ mapValues<This, T>(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): Collection<K, T>;
+ /**
+ * Checks if there exists an item that passes a test. Identical in behavior to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some | Array.some()}.
+ *
+ * @param fn - Function used to test (should return a boolean)
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection.some(user => user.discriminator === '0000');
+ * ```
+ */
+ some(fn: (value: V, key: K, collection: this) => unknown): boolean;
+ some<T>(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): boolean;
+ /**
+ * Checks if all items passes a test. Identical in behavior to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every | Array.every()}.
+ *
+ * @param fn - Function used to test (should return a boolean)
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection.every(user => !user.bot);
+ * ```
+ */
+ every<K2 extends K>(fn: (value: V, key: K, collection: this) => key is K2): this is Collection<K2, V>;
+ every<V2 extends V>(fn: (value: V, key: K, collection: this) => value is V2): this is Collection<K, V2>;
+ every(fn: (value: V, key: K, collection: this) => unknown): boolean;
+ every<This, K2 extends K>(fn: (this: This, value: V, key: K, collection: this) => key is K2, thisArg: This): this is Collection<K2, V>;
+ every<This, V2 extends V>(fn: (this: This, value: V, key: K, collection: this) => value is V2, thisArg: This): this is Collection<K, V2>;
+ every<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): boolean;
+ /**
+ * Applies a function to produce a single value. Identical in behavior to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce | Array.reduce()}.
+ *
+ * @param fn - Function used to reduce, taking four arguments; `accumulator`, `currentValue`, `currentKey`,
+ * and `collection`
+ * @param initialValue - Starting value for the accumulator
+ * @example
+ * ```ts
+ * collection.reduce((acc, guild) => acc + guild.memberCount, 0);
+ * ```
+ */
+ reduce<T = V>(fn: (accumulator: T, value: V, key: K, collection: this) => T, initialValue?: T): T;
+ /**
+ * Identical to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach | Map.forEach()},
+ * but returns the collection instead of undefined.
+ *
+ * @param fn - Function to execute for each element
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection
+ * .each(user => console.log(user.username))
+ * .filter(user => user.bot)
+ * .each(user => console.log(user.username));
+ * ```
+ */
+ each(fn: (value: V, key: K, collection: this) => void): this;
+ each<T>(fn: (this: T, value: V, key: K, collection: this) => void, thisArg: T): this;
+ /**
+ * Runs a function on the collection and returns the collection.
+ *
+ * @param fn - Function to execute
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection
+ * .tap(coll => console.log(coll.size))
+ * .filter(user => user.bot)
+ * .tap(coll => console.log(coll.size))
+ * ```
+ */
+ tap(fn: (collection: this) => void): this;
+ tap<T>(fn: (this: T, collection: this) => void, thisArg: T): this;
+ /**
+ * Creates an identical shallow copy of this collection.
+ *
+ * @example
+ * ```ts
+ * const newColl = someColl.clone();
+ * ```
+ */
+ clone(): Collection<K, V>;
+ /**
+ * Combines this collection with others into a new collection. None of the source collections are modified.
+ *
+ * @param collections - Collections to merge
+ * @example
+ * ```ts
+ * const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);
+ * ```
+ */
+ concat(...collections: ReadonlyCollection<K, V>[]): Collection<K, V>;
+ /**
+ * Checks if this collection shares identical items with another.
+ * This is different to checking for equality using equal-signs, because
+ * the collections may be different objects, but contain the same data.
+ *
+ * @param collection - Collection to compare with
+ * @returns Whether the collections have identical contents
+ */
+ equals(collection: ReadonlyCollection<K, V>): boolean;
+ /**
+ * The sort method sorts the items of a collection in place and returns it.
+ * The sort is not necessarily stable in Node 10 or older.
+ * The default sort order is according to string Unicode code points.
+ *
+ * @param compareFunction - Specifies a function that defines the sort order.
+ * If omitted, the collection is sorted according to each character's Unicode code point value, according to the string conversion of each element.
+ * @example
+ * ```ts
+ * collection.sort((userA, userB) => userA.createdTimestamp - userB.createdTimestamp);
+ * ```
+ */
+ sort(compareFunction?: Comparator<K, V>): this;
+ /**
+ * The intersect method returns a new structure containing items where the keys and values are present in both original structures.
+ *
+ * @param other - The other Collection to filter against
+ */
+ intersect<T>(other: ReadonlyCollection<K, T>): Collection<K, T>;
+ /**
+ * The subtract method returns a new structure containing items where the keys and values of the original structure are not present in the other.
+ *
+ * @param other - The other Collection to filter against
+ */
+ subtract<T>(other: ReadonlyCollection<K, T>): Collection<K, V>;
+ /**
+ * The difference method returns a new structure containing items where the key is present in one of the original structures but not the other.
+ *
+ * @param other - The other Collection to filter against
+ */
+ difference<T>(other: ReadonlyCollection<K, T>): Collection<K, T | V>;
+ /**
+ * Merges two Collections together into a new Collection.
+ *
+ * @param other - The other Collection to merge with
+ * @param whenInSelf - Function getting the result if the entry only exists in this Collection
+ * @param whenInOther - Function getting the result if the entry only exists in the other Collection
+ * @param whenInBoth - Function getting the result if the entry exists in both Collections
+ * @example
+ * ```ts
+ * // Sums up the entries in two collections.
+ * coll.merge(
+ * other,
+ * x => ({ keep: true, value: x }),
+ * y => ({ keep: true, value: y }),
+ * (x, y) => ({ keep: true, value: x + y }),
+ * );
+ * ```
+ * @example
+ * ```ts
+ * // Intersects two collections in a left-biased manner.
+ * coll.merge(
+ * other,
+ * x => ({ keep: false }),
+ * y => ({ keep: false }),
+ * (x, _) => ({ keep: true, value: x }),
+ * );
+ * ```
+ */
+ merge<T, R>(other: ReadonlyCollection<K, T>, whenInSelf: (value: V, key: K) => Keep<R>, whenInOther: (valueOther: T, key: K) => Keep<R>, whenInBoth: (value: V, valueOther: T, key: K) => Keep<R>): Collection<K, R>;
+ /**
+ * The sorted method sorts the items of a collection and returns it.
+ * The sort is not necessarily stable in Node 10 or older.
+ * The default sort order is according to string Unicode code points.
+ *
+ * @param compareFunction - Specifies a function that defines the sort order.
+ * If omitted, the collection is sorted according to each character's Unicode code point value,
+ * according to the string conversion of each element.
+ * @example
+ * ```ts
+ * collection.sorted((userA, userB) => userA.createdTimestamp - userB.createdTimestamp);
+ * ```
+ */
+ sorted(compareFunction?: Comparator<K, V>): Collection<K, V>;
+ toJSON(): V[];
+ private static defaultSort;
+ /**
+ * Creates a Collection from a list of entries.
+ *
+ * @param entries - The list of entries
+ * @param combine - Function to combine an existing entry with a new one
+ * @example
+ * ```ts
+ * Collection.combineEntries([["a", 1], ["b", 2], ["a", 2]], (x, y) => x + y);
+ * // returns Collection { "a" => 3, "b" => 2 }
+ * ```
+ */
+ static combineEntries<K, V>(entries: Iterable<[K, V]>, combine: (firstValue: V, secondValue: V, key: K) => V): Collection<K, V>;
+}
+/**
+ * @internal
+ */
+type Keep<V> = {
+ keep: false;
+} | {
+ keep: true;
+ value: V;
+};
+/**
+ * @internal
+ */
+type Comparator<K, V> = (firstValue: V, secondValue: V, firstKey: K, secondKey: K) => number;
+
+/**
+ * The {@link https://github.com/discordjs/discord.js/blob/main/packages/collection/#readme | @discordjs/collection} version
+ * that you are currently using.
+ */
+declare const version: string;
+
+export { Collection, CollectionConstructor, Comparator, Keep, ReadonlyCollection, version };
diff --git a/node_modules/@discordjs/collection/dist/index.d.ts b/node_modules/@discordjs/collection/dist/index.d.ts
new file mode 100644
index 0000000..5990c61
--- /dev/null
+++ b/node_modules/@discordjs/collection/dist/index.d.ts
@@ -0,0 +1,457 @@
+/**
+ * @internal
+ */
+interface CollectionConstructor {
+ new (): Collection<unknown, unknown>;
+ new <K, V>(entries?: readonly (readonly [K, V])[] | null): Collection<K, V>;
+ new <K, V>(iterable: Iterable<readonly [K, V]>): Collection<K, V>;
+ readonly prototype: Collection<unknown, unknown>;
+ readonly [Symbol.species]: CollectionConstructor;
+}
+/**
+ * Represents an immutable version of a collection
+ */
+type ReadonlyCollection<K, V> = Omit<Collection<K, V>, 'delete' | 'ensure' | 'forEach' | 'get' | 'reverse' | 'set' | 'sort' | 'sweep'> & ReadonlyMap<K, V>;
+/**
+ * Separate interface for the constructor so that emitted js does not have a constructor that overwrites itself
+ *
+ * @internal
+ */
+interface Collection<K, V> extends Map<K, V> {
+ constructor: CollectionConstructor;
+}
+/**
+ * A Map with additional utility methods. This is used throughout discord.js rather than Arrays for anything that has
+ * an ID, for significantly improved performance and ease-of-use.
+ *
+ * @typeParam K - The key type this collection holds
+ * @typeParam V - The value type this collection holds
+ */
+declare class Collection<K, V> extends Map<K, V> {
+ /**
+ * Obtains the value of the given key if it exists, otherwise sets and returns the value provided by the default value generator.
+ *
+ * @param key - The key to get if it exists, or set otherwise
+ * @param defaultValueGenerator - A function that generates the default value
+ * @example
+ * ```ts
+ * collection.ensure(guildId, () => defaultGuildConfig);
+ * ```
+ */
+ ensure(key: K, defaultValueGenerator: (key: K, collection: this) => V): V;
+ /**
+ * Checks if all of the elements exist in the collection.
+ *
+ * @param keys - The keys of the elements to check for
+ * @returns `true` if all of the elements exist, `false` if at least one does not exist.
+ */
+ hasAll(...keys: K[]): boolean;
+ /**
+ * Checks if any of the elements exist in the collection.
+ *
+ * @param keys - The keys of the elements to check for
+ * @returns `true` if any of the elements exist, `false` if none exist.
+ */
+ hasAny(...keys: K[]): boolean;
+ /**
+ * Obtains the first value(s) in this collection.
+ *
+ * @param amount - Amount of values to obtain from the beginning
+ * @returns A single value if no amount is provided or an array of values, starting from the end if amount is negative
+ */
+ first(): V | undefined;
+ first(amount: number): V[];
+ /**
+ * Obtains the first key(s) in this collection.
+ *
+ * @param amount - Amount of keys to obtain from the beginning
+ * @returns A single key if no amount is provided or an array of keys, starting from the end if
+ * amount is negative
+ */
+ firstKey(): K | undefined;
+ firstKey(amount: number): K[];
+ /**
+ * Obtains the last value(s) in this collection.
+ *
+ * @param amount - Amount of values to obtain from the end
+ * @returns A single value if no amount is provided or an array of values, starting from the start if
+ * amount is negative
+ */
+ last(): V | undefined;
+ last(amount: number): V[];
+ /**
+ * Obtains the last key(s) in this collection.
+ *
+ * @param amount - Amount of keys to obtain from the end
+ * @returns A single key if no amount is provided or an array of keys, starting from the start if
+ * amount is negative
+ */
+ lastKey(): K | undefined;
+ lastKey(amount: number): K[];
+ /**
+ * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}.
+ * Returns the item at a given index, allowing for positive and negative integers.
+ * Negative integers count back from the last item in the collection.
+ *
+ * @param index - The index of the element to obtain
+ */
+ at(index: number): V | undefined;
+ /**
+ * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}.
+ * Returns the key at a given index, allowing for positive and negative integers.
+ * Negative integers count back from the last item in the collection.
+ *
+ * @param index - The index of the key to obtain
+ */
+ keyAt(index: number): K | undefined;
+ /**
+ * Obtains unique random value(s) from this collection.
+ *
+ * @param amount - Amount of values to obtain randomly
+ * @returns A single value if no amount is provided or an array of values
+ */
+ random(): V | undefined;
+ random(amount: number): V[];
+ /**
+ * Obtains unique random key(s) from this collection.
+ *
+ * @param amount - Amount of keys to obtain randomly
+ * @returns A single key if no amount is provided or an array
+ */
+ randomKey(): K | undefined;
+ randomKey(amount: number): K[];
+ /**
+ * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse | Array.reverse()}
+ * but returns a Collection instead of an Array.
+ */
+ reverse(): this;
+ /**
+ * Searches for a single item where the given function returns a truthy value. This behaves like
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find | Array.find()}.
+ * All collections used in Discord.js are mapped using their `id` property, and if you want to find by id you
+ * should use the `get` method. See
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get | MDN} for details.
+ *
+ * @param fn - The function to test with (should return boolean)
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection.find(user => user.username === 'Bob');
+ * ```
+ */
+ find<V2 extends V>(fn: (value: V, key: K, collection: this) => value is V2): V2 | undefined;
+ find(fn: (value: V, key: K, collection: this) => unknown): V | undefined;
+ find<This, V2 extends V>(fn: (this: This, value: V, key: K, collection: this) => value is V2, thisArg: This): V2 | undefined;
+ find<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): V | undefined;
+ /**
+ * Searches for the key of a single item where the given function returns a truthy value. This behaves like
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex | Array.findIndex()},
+ * but returns the key rather than the positional index.
+ *
+ * @param fn - The function to test with (should return boolean)
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection.findKey(user => user.username === 'Bob');
+ * ```
+ */
+ findKey<K2 extends K>(fn: (value: V, key: K, collection: this) => key is K2): K2 | undefined;
+ findKey(fn: (value: V, key: K, collection: this) => unknown): K | undefined;
+ findKey<This, K2 extends K>(fn: (this: This, value: V, key: K, collection: this) => key is K2, thisArg: This): K2 | undefined;
+ findKey<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): K | undefined;
+ /**
+ * Removes items that satisfy the provided filter function.
+ *
+ * @param fn - Function used to test (should return a boolean)
+ * @param thisArg - Value to use as `this` when executing function
+ * @returns The number of removed entries
+ */
+ sweep(fn: (value: V, key: K, collection: this) => unknown): number;
+ sweep<T>(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): number;
+ /**
+ * Identical to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter | Array.filter()},
+ * but returns a Collection instead of an Array.
+ *
+ * @param fn - The function to test with (should return boolean)
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection.filter(user => user.username === 'Bob');
+ * ```
+ */
+ filter<K2 extends K>(fn: (value: V, key: K, collection: this) => key is K2): Collection<K2, V>;
+ filter<V2 extends V>(fn: (value: V, key: K, collection: this) => value is V2): Collection<K, V2>;
+ filter(fn: (value: V, key: K, collection: this) => unknown): Collection<K, V>;
+ filter<This, K2 extends K>(fn: (this: This, value: V, key: K, collection: this) => key is K2, thisArg: This): Collection<K2, V>;
+ filter<This, V2 extends V>(fn: (this: This, value: V, key: K, collection: this) => value is V2, thisArg: This): Collection<K, V2>;
+ filter<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): Collection<K, V>;
+ /**
+ * Partitions the collection into two collections where the first collection
+ * contains the items that passed and the second contains the items that failed.
+ *
+ * @param fn - Function used to test (should return a boolean)
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * const [big, small] = collection.partition(guild => guild.memberCount > 250);
+ * ```
+ */
+ partition<K2 extends K>(fn: (value: V, key: K, collection: this) => key is K2): [Collection<K2, V>, Collection<Exclude<K, K2>, V>];
+ partition<V2 extends V>(fn: (value: V, key: K, collection: this) => value is V2): [Collection<K, V2>, Collection<K, Exclude<V, V2>>];
+ partition(fn: (value: V, key: K, collection: this) => unknown): [Collection<K, V>, Collection<K, V>];
+ partition<This, K2 extends K>(fn: (this: This, value: V, key: K, collection: this) => key is K2, thisArg: This): [Collection<K2, V>, Collection<Exclude<K, K2>, V>];
+ partition<This, V2 extends V>(fn: (this: This, value: V, key: K, collection: this) => value is V2, thisArg: This): [Collection<K, V2>, Collection<K, Exclude<V, V2>>];
+ partition<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): [Collection<K, V>, Collection<K, V>];
+ /**
+ * Maps each item into a Collection, then joins the results into a single Collection. Identical in behavior to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap | Array.flatMap()}.
+ *
+ * @param fn - Function that produces a new Collection
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection.flatMap(guild => guild.members.cache);
+ * ```
+ */
+ flatMap<T>(fn: (value: V, key: K, collection: this) => Collection<K, T>): Collection<K, T>;
+ flatMap<T, This>(fn: (this: This, value: V, key: K, collection: this) => Collection<K, T>, thisArg: This): Collection<K, T>;
+ /**
+ * Maps each item to another value into an array. Identical in behavior to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}.
+ *
+ * @param fn - Function that produces an element of the new array, taking three arguments
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection.map(user => user.tag);
+ * ```
+ */
+ map<T>(fn: (value: V, key: K, collection: this) => T): T[];
+ map<This, T>(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): T[];
+ /**
+ * Maps each item to another value into a collection. Identical in behavior to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}.
+ *
+ * @param fn - Function that produces an element of the new collection, taking three arguments
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection.mapValues(user => user.tag);
+ * ```
+ */
+ mapValues<T>(fn: (value: V, key: K, collection: this) => T): Collection<K, T>;
+ mapValues<This, T>(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): Collection<K, T>;
+ /**
+ * Checks if there exists an item that passes a test. Identical in behavior to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some | Array.some()}.
+ *
+ * @param fn - Function used to test (should return a boolean)
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection.some(user => user.discriminator === '0000');
+ * ```
+ */
+ some(fn: (value: V, key: K, collection: this) => unknown): boolean;
+ some<T>(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): boolean;
+ /**
+ * Checks if all items passes a test. Identical in behavior to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every | Array.every()}.
+ *
+ * @param fn - Function used to test (should return a boolean)
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection.every(user => !user.bot);
+ * ```
+ */
+ every<K2 extends K>(fn: (value: V, key: K, collection: this) => key is K2): this is Collection<K2, V>;
+ every<V2 extends V>(fn: (value: V, key: K, collection: this) => value is V2): this is Collection<K, V2>;
+ every(fn: (value: V, key: K, collection: this) => unknown): boolean;
+ every<This, K2 extends K>(fn: (this: This, value: V, key: K, collection: this) => key is K2, thisArg: This): this is Collection<K2, V>;
+ every<This, V2 extends V>(fn: (this: This, value: V, key: K, collection: this) => value is V2, thisArg: This): this is Collection<K, V2>;
+ every<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): boolean;
+ /**
+ * Applies a function to produce a single value. Identical in behavior to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce | Array.reduce()}.
+ *
+ * @param fn - Function used to reduce, taking four arguments; `accumulator`, `currentValue`, `currentKey`,
+ * and `collection`
+ * @param initialValue - Starting value for the accumulator
+ * @example
+ * ```ts
+ * collection.reduce((acc, guild) => acc + guild.memberCount, 0);
+ * ```
+ */
+ reduce<T = V>(fn: (accumulator: T, value: V, key: K, collection: this) => T, initialValue?: T): T;
+ /**
+ * Identical to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach | Map.forEach()},
+ * but returns the collection instead of undefined.
+ *
+ * @param fn - Function to execute for each element
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection
+ * .each(user => console.log(user.username))
+ * .filter(user => user.bot)
+ * .each(user => console.log(user.username));
+ * ```
+ */
+ each(fn: (value: V, key: K, collection: this) => void): this;
+ each<T>(fn: (this: T, value: V, key: K, collection: this) => void, thisArg: T): this;
+ /**
+ * Runs a function on the collection and returns the collection.
+ *
+ * @param fn - Function to execute
+ * @param thisArg - Value to use as `this` when executing function
+ * @example
+ * ```ts
+ * collection
+ * .tap(coll => console.log(coll.size))
+ * .filter(user => user.bot)
+ * .tap(coll => console.log(coll.size))
+ * ```
+ */
+ tap(fn: (collection: this) => void): this;
+ tap<T>(fn: (this: T, collection: this) => void, thisArg: T): this;
+ /**
+ * Creates an identical shallow copy of this collection.
+ *
+ * @example
+ * ```ts
+ * const newColl = someColl.clone();
+ * ```
+ */
+ clone(): Collection<K, V>;
+ /**
+ * Combines this collection with others into a new collection. None of the source collections are modified.
+ *
+ * @param collections - Collections to merge
+ * @example
+ * ```ts
+ * const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);
+ * ```
+ */
+ concat(...collections: ReadonlyCollection<K, V>[]): Collection<K, V>;
+ /**
+ * Checks if this collection shares identical items with another.
+ * This is different to checking for equality using equal-signs, because
+ * the collections may be different objects, but contain the same data.
+ *
+ * @param collection - Collection to compare with
+ * @returns Whether the collections have identical contents
+ */
+ equals(collection: ReadonlyCollection<K, V>): boolean;
+ /**
+ * The sort method sorts the items of a collection in place and returns it.
+ * The sort is not necessarily stable in Node 10 or older.
+ * The default sort order is according to string Unicode code points.
+ *
+ * @param compareFunction - Specifies a function that defines the sort order.
+ * If omitted, the collection is sorted according to each character's Unicode code point value, according to the string conversion of each element.
+ * @example
+ * ```ts
+ * collection.sort((userA, userB) => userA.createdTimestamp - userB.createdTimestamp);
+ * ```
+ */
+ sort(compareFunction?: Comparator<K, V>): this;
+ /**
+ * The intersect method returns a new structure containing items where the keys and values are present in both original structures.
+ *
+ * @param other - The other Collection to filter against
+ */
+ intersect<T>(other: ReadonlyCollection<K, T>): Collection<K, T>;
+ /**
+ * The subtract method returns a new structure containing items where the keys and values of the original structure are not present in the other.
+ *
+ * @param other - The other Collection to filter against
+ */
+ subtract<T>(other: ReadonlyCollection<K, T>): Collection<K, V>;
+ /**
+ * The difference method returns a new structure containing items where the key is present in one of the original structures but not the other.
+ *
+ * @param other - The other Collection to filter against
+ */
+ difference<T>(other: ReadonlyCollection<K, T>): Collection<K, T | V>;
+ /**
+ * Merges two Collections together into a new Collection.
+ *
+ * @param other - The other Collection to merge with
+ * @param whenInSelf - Function getting the result if the entry only exists in this Collection
+ * @param whenInOther - Function getting the result if the entry only exists in the other Collection
+ * @param whenInBoth - Function getting the result if the entry exists in both Collections
+ * @example
+ * ```ts
+ * // Sums up the entries in two collections.
+ * coll.merge(
+ * other,
+ * x => ({ keep: true, value: x }),
+ * y => ({ keep: true, value: y }),
+ * (x, y) => ({ keep: true, value: x + y }),
+ * );
+ * ```
+ * @example
+ * ```ts
+ * // Intersects two collections in a left-biased manner.
+ * coll.merge(
+ * other,
+ * x => ({ keep: false }),
+ * y => ({ keep: false }),
+ * (x, _) => ({ keep: true, value: x }),
+ * );
+ * ```
+ */
+ merge<T, R>(other: ReadonlyCollection<K, T>, whenInSelf: (value: V, key: K) => Keep<R>, whenInOther: (valueOther: T, key: K) => Keep<R>, whenInBoth: (value: V, valueOther: T, key: K) => Keep<R>): Collection<K, R>;
+ /**
+ * The sorted method sorts the items of a collection and returns it.
+ * The sort is not necessarily stable in Node 10 or older.
+ * The default sort order is according to string Unicode code points.
+ *
+ * @param compareFunction - Specifies a function that defines the sort order.
+ * If omitted, the collection is sorted according to each character's Unicode code point value,
+ * according to the string conversion of each element.
+ * @example
+ * ```ts
+ * collection.sorted((userA, userB) => userA.createdTimestamp - userB.createdTimestamp);
+ * ```
+ */
+ sorted(compareFunction?: Comparator<K, V>): Collection<K, V>;
+ toJSON(): V[];
+ private static defaultSort;
+ /**
+ * Creates a Collection from a list of entries.
+ *
+ * @param entries - The list of entries
+ * @param combine - Function to combine an existing entry with a new one
+ * @example
+ * ```ts
+ * Collection.combineEntries([["a", 1], ["b", 2], ["a", 2]], (x, y) => x + y);
+ * // returns Collection { "a" => 3, "b" => 2 }
+ * ```
+ */
+ static combineEntries<K, V>(entries: Iterable<[K, V]>, combine: (firstValue: V, secondValue: V, key: K) => V): Collection<K, V>;
+}
+/**
+ * @internal
+ */
+type Keep<V> = {
+ keep: false;
+} | {
+ keep: true;
+ value: V;
+};
+/**
+ * @internal
+ */
+type Comparator<K, V> = (firstValue: V, secondValue: V, firstKey: K, secondKey: K) => number;
+
+/**
+ * The {@link https://github.com/discordjs/discord.js/blob/main/packages/collection/#readme | @discordjs/collection} version
+ * that you are currently using.
+ */
+declare const version: string;
+
+export { Collection, CollectionConstructor, Comparator, Keep, ReadonlyCollection, version };
diff --git a/node_modules/@discordjs/collection/dist/index.js b/node_modules/@discordjs/collection/dist/index.js
new file mode 100644
index 0000000..d9379ea
--- /dev/null
+++ b/node_modules/@discordjs/collection/dist/index.js
@@ -0,0 +1,543 @@
+"use strict";
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/index.ts
+var src_exports = {};
+__export(src_exports, {
+ Collection: () => Collection,
+ version: () => version
+});
+module.exports = __toCommonJS(src_exports);
+
+// src/collection.ts
+var Collection = class _Collection extends Map {
+ static {
+ __name(this, "Collection");
+ }
+ /**
+ * Obtains the value of the given key if it exists, otherwise sets and returns the value provided by the default value generator.
+ *
+ * @param key - The key to get if it exists, or set otherwise
+ * @param defaultValueGenerator - A function that generates the default value
+ * @example
+ * ```ts
+ * collection.ensure(guildId, () => defaultGuildConfig);
+ * ```
+ */
+ ensure(key, defaultValueGenerator) {
+ if (this.has(key))
+ return this.get(key);
+ if (typeof defaultValueGenerator !== "function")
+ throw new TypeError(`${defaultValueGenerator} is not a function`);
+ const defaultValue = defaultValueGenerator(key, this);
+ this.set(key, defaultValue);
+ return defaultValue;
+ }
+ /**
+ * Checks if all of the elements exist in the collection.
+ *
+ * @param keys - The keys of the elements to check for
+ * @returns `true` if all of the elements exist, `false` if at least one does not exist.
+ */
+ hasAll(...keys) {
+ return keys.every((key) => super.has(key));
+ }
+ /**
+ * Checks if any of the elements exist in the collection.
+ *
+ * @param keys - The keys of the elements to check for
+ * @returns `true` if any of the elements exist, `false` if none exist.
+ */
+ hasAny(...keys) {
+ return keys.some((key) => super.has(key));
+ }
+ first(amount) {
+ if (amount === void 0)
+ return this.values().next().value;
+ if (amount < 0)
+ return this.last(amount * -1);
+ amount = Math.min(this.size, amount);
+ const iter = this.values();
+ return Array.from({ length: amount }, () => iter.next().value);
+ }
+ firstKey(amount) {
+ if (amount === void 0)
+ return this.keys().next().value;
+ if (amount < 0)
+ return this.lastKey(amount * -1);
+ amount = Math.min(this.size, amount);
+ const iter = this.keys();
+ return Array.from({ length: amount }, () => iter.next().value);
+ }
+ last(amount) {
+ const arr = [...this.values()];
+ if (amount === void 0)
+ return arr[arr.length - 1];
+ if (amount < 0)
+ return this.first(amount * -1);
+ if (!amount)
+ return [];
+ return arr.slice(-amount);
+ }
+ lastKey(amount) {
+ const arr = [...this.keys()];
+ if (amount === void 0)
+ return arr[arr.length - 1];
+ if (amount < 0)
+ return this.firstKey(amount * -1);
+ if (!amount)
+ return [];
+ return arr.slice(-amount);
+ }
+ /**
+ * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}.
+ * Returns the item at a given index, allowing for positive and negative integers.
+ * Negative integers count back from the last item in the collection.
+ *
+ * @param index - The index of the element to obtain
+ */
+ at(index) {
+ index = Math.floor(index);
+ const arr = [...this.values()];
+ return arr.at(index);
+ }
+ /**
+ * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}.
+ * Returns the key at a given index, allowing for positive and negative integers.
+ * Negative integers count back from the last item in the collection.
+ *
+ * @param index - The index of the key to obtain
+ */
+ keyAt(index) {
+ index = Math.floor(index);
+ const arr = [...this.keys()];
+ return arr.at(index);
+ }
+ random(amount) {
+ const arr = [...this.values()];
+ if (amount === void 0)
+ return arr[Math.floor(Math.random() * arr.length)];
+ if (!arr.length || !amount)
+ return [];
+ return Array.from(
+ { length: Math.min(amount, arr.length) },
+ () => arr.splice(Math.floor(Math.random() * arr.length), 1)[0]
+ );
+ }
+ randomKey(amount) {
+ const arr = [...this.keys()];
+ if (amount === void 0)
+ return arr[Math.floor(Math.random() * arr.length)];
+ if (!arr.length || !amount)
+ return [];
+ return Array.from(
+ { length: Math.min(amount, arr.length) },
+ () => arr.splice(Math.floor(Math.random() * arr.length), 1)[0]
+ );
+ }
+ /**
+ * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse | Array.reverse()}
+ * but returns a Collection instead of an Array.
+ */
+ reverse() {
+ const entries = [...this.entries()].reverse();
+ this.clear();
+ for (const [key, value] of entries)
+ this.set(key, value);
+ return this;
+ }
+ find(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ for (const [key, val] of this) {
+ if (fn(val, key, this))
+ return val;
+ }
+ return void 0;
+ }
+ findKey(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ for (const [key, val] of this) {
+ if (fn(val, key, this))
+ return key;
+ }
+ return void 0;
+ }
+ sweep(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ const previousSize = this.size;
+ for (const [key, val] of this) {
+ if (fn(val, key, this))
+ this.delete(key);
+ }
+ return previousSize - this.size;
+ }
+ filter(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ const results = new this.constructor[Symbol.species]();
+ for (const [key, val] of this) {
+ if (fn(val, key, this))
+ results.set(key, val);
+ }
+ return results;
+ }
+ partition(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ const results = [
+ new this.constructor[Symbol.species](),
+ new this.constructor[Symbol.species]()
+ ];
+ for (const [key, val] of this) {
+ if (fn(val, key, this)) {
+ results[0].set(key, val);
+ } else {
+ results[1].set(key, val);
+ }
+ }
+ return results;
+ }
+ flatMap(fn, thisArg) {
+ const collections = this.map(fn, thisArg);
+ return new this.constructor[Symbol.species]().concat(...collections);
+ }
+ map(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ const iter = this.entries();
+ return Array.from({ length: this.size }, () => {
+ const [key, value] = iter.next().value;
+ return fn(value, key, this);
+ });
+ }
+ mapValues(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ const coll = new this.constructor[Symbol.species]();
+ for (const [key, val] of this)
+ coll.set(key, fn(val, key, this));
+ return coll;
+ }
+ some(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ for (const [key, val] of this) {
+ if (fn(val, key, this))
+ return true;
+ }
+ return false;
+ }
+ every(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ for (const [key, val] of this) {
+ if (!fn(val, key, this))
+ return false;
+ }
+ return true;
+ }
+ /**
+ * Applies a function to produce a single value. Identical in behavior to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce | Array.reduce()}.
+ *
+ * @param fn - Function used to reduce, taking four arguments; `accumulator`, `currentValue`, `currentKey`,
+ * and `collection`
+ * @param initialValue - Starting value for the accumulator
+ * @example
+ * ```ts
+ * collection.reduce((acc, guild) => acc + guild.memberCount, 0);
+ * ```
+ */
+ reduce(fn, initialValue) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ let accumulator;
+ const iterator = this.entries();
+ if (initialValue === void 0) {
+ if (this.size === 0)
+ throw new TypeError("Reduce of empty collection with no initial value");
+ accumulator = iterator.next().value[1];
+ } else {
+ accumulator = initialValue;
+ }
+ for (const [key, value] of iterator) {
+ accumulator = fn(accumulator, value, key, this);
+ }
+ return accumulator;
+ }
+ each(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ for (const [key, value] of this) {
+ fn(value, key, this);
+ }
+ return this;
+ }
+ tap(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ fn(this);
+ return this;
+ }
+ /**
+ * Creates an identical shallow copy of this collection.
+ *
+ * @example
+ * ```ts
+ * const newColl = someColl.clone();
+ * ```
+ */
+ clone() {
+ return new this.constructor[Symbol.species](this);
+ }
+ /**
+ * Combines this collection with others into a new collection. None of the source collections are modified.
+ *
+ * @param collections - Collections to merge
+ * @example
+ * ```ts
+ * const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);
+ * ```
+ */
+ concat(...collections) {
+ const newColl = this.clone();
+ for (const coll of collections) {
+ for (const [key, val] of coll)
+ newColl.set(key, val);
+ }
+ return newColl;
+ }
+ /**
+ * Checks if this collection shares identical items with another.
+ * This is different to checking for equality using equal-signs, because
+ * the collections may be different objects, but contain the same data.
+ *
+ * @param collection - Collection to compare with
+ * @returns Whether the collections have identical contents
+ */
+ equals(collection) {
+ if (!collection)
+ return false;
+ if (this === collection)
+ return true;
+ if (this.size !== collection.size)
+ return false;
+ for (const [key, value] of this) {
+ if (!collection.has(key) || value !== collection.get(key)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ /**
+ * The sort method sorts the items of a collection in place and returns it.
+ * The sort is not necessarily stable in Node 10 or older.
+ * The default sort order is according to string Unicode code points.
+ *
+ * @param compareFunction - Specifies a function that defines the sort order.
+ * If omitted, the collection is sorted according to each character's Unicode code point value, according to the string conversion of each element.
+ * @example
+ * ```ts
+ * collection.sort((userA, userB) => userA.createdTimestamp - userB.createdTimestamp);
+ * ```
+ */
+ sort(compareFunction = _Collection.defaultSort) {
+ const entries = [...this.entries()];
+ entries.sort((a, b) => compareFunction(a[1], b[1], a[0], b[0]));
+ super.clear();
+ for (const [key, value] of entries) {
+ super.set(key, value);
+ }
+ return this;
+ }
+ /**
+ * The intersect method returns a new structure containing items where the keys and values are present in both original structures.
+ *
+ * @param other - The other Collection to filter against
+ */
+ intersect(other) {
+ const coll = new this.constructor[Symbol.species]();
+ for (const [key, value] of other) {
+ if (this.has(key) && Object.is(value, this.get(key))) {
+ coll.set(key, value);
+ }
+ }
+ return coll;
+ }
+ /**
+ * The subtract method returns a new structure containing items where the keys and values of the original structure are not present in the other.
+ *
+ * @param other - The other Collection to filter against
+ */
+ subtract(other) {
+ const coll = new this.constructor[Symbol.species]();
+ for (const [key, value] of this) {
+ if (!other.has(key) || !Object.is(value, other.get(key))) {
+ coll.set(key, value);
+ }
+ }
+ return coll;
+ }
+ /**
+ * The difference method returns a new structure containing items where the key is present in one of the original structures but not the other.
+ *
+ * @param other - The other Collection to filter against
+ */
+ difference(other) {
+ const coll = new this.constructor[Symbol.species]();
+ for (const [key, value] of other) {
+ if (!this.has(key))
+ coll.set(key, value);
+ }
+ for (const [key, value] of this) {
+ if (!other.has(key))
+ coll.set(key, value);
+ }
+ return coll;
+ }
+ /**
+ * Merges two Collections together into a new Collection.
+ *
+ * @param other - The other Collection to merge with
+ * @param whenInSelf - Function getting the result if the entry only exists in this Collection
+ * @param whenInOther - Function getting the result if the entry only exists in the other Collection
+ * @param whenInBoth - Function getting the result if the entry exists in both Collections
+ * @example
+ * ```ts
+ * // Sums up the entries in two collections.
+ * coll.merge(
+ * other,
+ * x => ({ keep: true, value: x }),
+ * y => ({ keep: true, value: y }),
+ * (x, y) => ({ keep: true, value: x + y }),
+ * );
+ * ```
+ * @example
+ * ```ts
+ * // Intersects two collections in a left-biased manner.
+ * coll.merge(
+ * other,
+ * x => ({ keep: false }),
+ * y => ({ keep: false }),
+ * (x, _) => ({ keep: true, value: x }),
+ * );
+ * ```
+ */
+ merge(other, whenInSelf, whenInOther, whenInBoth) {
+ const coll = new this.constructor[Symbol.species]();
+ const keys = /* @__PURE__ */ new Set([...this.keys(), ...other.keys()]);
+ for (const key of keys) {
+ const hasInSelf = this.has(key);
+ const hasInOther = other.has(key);
+ if (hasInSelf && hasInOther) {
+ const result = whenInBoth(this.get(key), other.get(key), key);
+ if (result.keep)
+ coll.set(key, result.value);
+ } else if (hasInSelf) {
+ const result = whenInSelf(this.get(key), key);
+ if (result.keep)
+ coll.set(key, result.value);
+ } else if (hasInOther) {
+ const result = whenInOther(other.get(key), key);
+ if (result.keep)
+ coll.set(key, result.value);
+ }
+ }
+ return coll;
+ }
+ /**
+ * The sorted method sorts the items of a collection and returns it.
+ * The sort is not necessarily stable in Node 10 or older.
+ * The default sort order is according to string Unicode code points.
+ *
+ * @param compareFunction - Specifies a function that defines the sort order.
+ * If omitted, the collection is sorted according to each character's Unicode code point value,
+ * according to the string conversion of each element.
+ * @example
+ * ```ts
+ * collection.sorted((userA, userB) => userA.createdTimestamp - userB.createdTimestamp);
+ * ```
+ */
+ sorted(compareFunction = _Collection.defaultSort) {
+ return new this.constructor[Symbol.species](this).sort((av, bv, ak, bk) => compareFunction(av, bv, ak, bk));
+ }
+ toJSON() {
+ return [...this.values()];
+ }
+ static defaultSort(firstValue, secondValue) {
+ return Number(firstValue > secondValue) || Number(firstValue === secondValue) - 1;
+ }
+ /**
+ * Creates a Collection from a list of entries.
+ *
+ * @param entries - The list of entries
+ * @param combine - Function to combine an existing entry with a new one
+ * @example
+ * ```ts
+ * Collection.combineEntries([["a", 1], ["b", 2], ["a", 2]], (x, y) => x + y);
+ * // returns Collection { "a" => 3, "b" => 2 }
+ * ```
+ */
+ static combineEntries(entries, combine) {
+ const coll = new _Collection();
+ for (const [key, value] of entries) {
+ if (coll.has(key)) {
+ coll.set(key, combine(coll.get(key), value, key));
+ } else {
+ coll.set(key, value);
+ }
+ }
+ return coll;
+ }
+};
+
+// src/index.ts
+var version = "1.5.3";
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ Collection,
+ version
+});
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/@discordjs/collection/dist/index.js.map b/node_modules/@discordjs/collection/dist/index.js.map
new file mode 100644
index 0000000..247240c
--- /dev/null
+++ b/node_modules/@discordjs/collection/dist/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/index.ts","../src/collection.ts"],"sourcesContent":["export * from './collection.js';\n\n/**\n * The {@link https://github.com/discordjs/discord.js/blob/main/packages/collection/#readme | @discordjs/collection} version\n * that you are currently using.\n */\n// This needs to explicitly be `string` so it is not typed as a \"const string\" that gets injected by esbuild\nexport const version = '1.5.3' as string;\n","/* eslint-disable no-param-reassign */\n/**\n * @internal\n */\nexport interface CollectionConstructor {\n\tnew (): Collection<unknown, unknown>;\n\tnew <K, V>(entries?: readonly (readonly [K, V])[] | null): Collection<K, V>;\n\tnew <K, V>(iterable: Iterable<readonly [K, V]>): Collection<K, V>;\n\treadonly prototype: Collection<unknown, unknown>;\n\treadonly [Symbol.species]: CollectionConstructor;\n}\n\n/**\n * Represents an immutable version of a collection\n */\nexport type ReadonlyCollection<K, V> = Omit<\n\tCollection<K, V>,\n\t'delete' | 'ensure' | 'forEach' | 'get' | 'reverse' | 'set' | 'sort' | 'sweep'\n> &\n\tReadonlyMap<K, V>;\n\n/**\n * Separate interface for the constructor so that emitted js does not have a constructor that overwrites itself\n *\n * @internal\n */\nexport interface Collection<K, V> extends Map<K, V> {\n\tconstructor: CollectionConstructor;\n}\n\n/**\n * A Map with additional utility methods. This is used throughout discord.js rather than Arrays for anything that has\n * an ID, for significantly improved performance and ease-of-use.\n *\n * @typeParam K - The key type this collection holds\n * @typeParam V - The value type this collection holds\n */\nexport class Collection<K, V> extends Map<K, V> {\n\t/**\n\t * Obtains the value of the given key if it exists, otherwise sets and returns the value provided by the default value generator.\n\t *\n\t * @param key - The key to get if it exists, or set otherwise\n\t * @param defaultValueGenerator - A function that generates the default value\n\t * @example\n\t * ```ts\n\t * collection.ensure(guildId, () => defaultGuildConfig);\n\t * ```\n\t */\n\tpublic ensure(key: K, defaultValueGenerator: (key: K, collection: this) => V): V {\n\t\tif (this.has(key)) return this.get(key)!;\n\t\tif (typeof defaultValueGenerator !== 'function') throw new TypeError(`${defaultValueGenerator} is not a function`);\n\t\tconst defaultValue = defaultValueGenerator(key, this);\n\t\tthis.set(key, defaultValue);\n\t\treturn defaultValue;\n\t}\n\n\t/**\n\t * Checks if all of the elements exist in the collection.\n\t *\n\t * @param keys - The keys of the elements to check for\n\t * @returns `true` if all of the elements exist, `false` if at least one does not exist.\n\t */\n\tpublic hasAll(...keys: K[]) {\n\t\treturn keys.every((key) => super.has(key));\n\t}\n\n\t/**\n\t * Checks if any of the elements exist in the collection.\n\t *\n\t * @param keys - The keys of the elements to check for\n\t * @returns `true` if any of the elements exist, `false` if none exist.\n\t */\n\tpublic hasAny(...keys: K[]) {\n\t\treturn keys.some((key) => super.has(key));\n\t}\n\n\t/**\n\t * Obtains the first value(s) in this collection.\n\t *\n\t * @param amount - Amount of values to obtain from the beginning\n\t * @returns A single value if no amount is provided or an array of values, starting from the end if amount is negative\n\t */\n\tpublic first(): V | undefined;\n\tpublic first(amount: number): V[];\n\tpublic first(amount?: number): V | V[] | undefined {\n\t\tif (amount === undefined) return this.values().next().value;\n\t\tif (amount < 0) return this.last(amount * -1);\n\t\tamount = Math.min(this.size, amount);\n\t\tconst iter = this.values();\n\t\treturn Array.from({ length: amount }, (): V => iter.next().value);\n\t}\n\n\t/**\n\t * Obtains the first key(s) in this collection.\n\t *\n\t * @param amount - Amount of keys to obtain from the beginning\n\t * @returns A single key if no amount is provided or an array of keys, starting from the end if\n\t * amount is negative\n\t */\n\tpublic firstKey(): K | undefined;\n\tpublic firstKey(amount: number): K[];\n\tpublic firstKey(amount?: number): K | K[] | undefined {\n\t\tif (amount === undefined) return this.keys().next().value;\n\t\tif (amount < 0) return this.lastKey(amount * -1);\n\t\tamount = Math.min(this.size, amount);\n\t\tconst iter = this.keys();\n\t\treturn Array.from({ length: amount }, (): K => iter.next().value);\n\t}\n\n\t/**\n\t * Obtains the last value(s) in this collection.\n\t *\n\t * @param amount - Amount of values to obtain from the end\n\t * @returns A single value if no amount is provided or an array of values, starting from the start if\n\t * amount is negative\n\t */\n\tpublic last(): V | undefined;\n\tpublic last(amount: number): V[];\n\tpublic last(amount?: number): V | V[] | undefined {\n\t\tconst arr = [...this.values()];\n\t\tif (amount === undefined) return arr[arr.length - 1];\n\t\tif (amount < 0) return this.first(amount * -1);\n\t\tif (!amount) return [];\n\t\treturn arr.slice(-amount);\n\t}\n\n\t/**\n\t * Obtains the last key(s) in this collection.\n\t *\n\t * @param amount - Amount of keys to obtain from the end\n\t * @returns A single key if no amount is provided or an array of keys, starting from the start if\n\t * amount is negative\n\t */\n\tpublic lastKey(): K | undefined;\n\tpublic lastKey(amount: number): K[];\n\tpublic lastKey(amount?: number): K | K[] | undefined {\n\t\tconst arr = [...this.keys()];\n\t\tif (amount === undefined) return arr[arr.length - 1];\n\t\tif (amount < 0) return this.firstKey(amount * -1);\n\t\tif (!amount) return [];\n\t\treturn arr.slice(-amount);\n\t}\n\n\t/**\n\t * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}.\n\t * Returns the item at a given index, allowing for positive and negative integers.\n\t * Negative integers count back from the last item in the collection.\n\t *\n\t * @param index - The index of the element to obtain\n\t */\n\tpublic at(index: number) {\n\t\tindex = Math.floor(index);\n\t\tconst arr = [...this.values()];\n\t\treturn arr.at(index);\n\t}\n\n\t/**\n\t * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}.\n\t * Returns the key at a given index, allowing for positive and negative integers.\n\t * Negative integers count back from the last item in the collection.\n\t *\n\t * @param index - The index of the key to obtain\n\t */\n\tpublic keyAt(index: number) {\n\t\tindex = Math.floor(index);\n\t\tconst arr = [...this.keys()];\n\t\treturn arr.at(index);\n\t}\n\n\t/**\n\t * Obtains unique random value(s) from this collection.\n\t *\n\t * @param amount - Amount of values to obtain randomly\n\t * @returns A single value if no amount is provided or an array of values\n\t */\n\tpublic random(): V | undefined;\n\tpublic random(amount: number): V[];\n\tpublic random(amount?: number): V | V[] | undefined {\n\t\tconst arr = [...this.values()];\n\t\tif (amount === undefined) return arr[Math.floor(Math.random() * arr.length)];\n\t\tif (!arr.length || !amount) return [];\n\t\treturn Array.from(\n\t\t\t{ length: Math.min(amount, arr.length) },\n\t\t\t(): V => arr.splice(Math.floor(Math.random() * arr.length), 1)[0]!,\n\t\t);\n\t}\n\n\t/**\n\t * Obtains unique random key(s) from this collection.\n\t *\n\t * @param amount - Amount of keys to obtain randomly\n\t * @returns A single key if no amount is provided or an array\n\t */\n\tpublic randomKey(): K | undefined;\n\tpublic randomKey(amount: number): K[];\n\tpublic randomKey(amount?: number): K | K[] | undefined {\n\t\tconst arr = [...this.keys()];\n\t\tif (amount === undefined) return arr[Math.floor(Math.random() * arr.length)];\n\t\tif (!arr.length || !amount) return [];\n\t\treturn Array.from(\n\t\t\t{ length: Math.min(amount, arr.length) },\n\t\t\t(): K => arr.splice(Math.floor(Math.random() * arr.length), 1)[0]!,\n\t\t);\n\t}\n\n\t/**\n\t * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse | Array.reverse()}\n\t * but returns a Collection instead of an Array.\n\t */\n\tpublic reverse() {\n\t\tconst entries = [...this.entries()].reverse();\n\t\tthis.clear();\n\t\tfor (const [key, value] of entries) this.set(key, value);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Searches for a single item where the given function returns a truthy value. This behaves like\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find | Array.find()}.\n\t * All collections used in Discord.js are mapped using their `id` property, and if you want to find by id you\n\t * should use the `get` method. See\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get | MDN} for details.\n\t *\n\t * @param fn - The function to test with (should return boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.find(user => user.username === 'Bob');\n\t * ```\n\t */\n\tpublic find<V2 extends V>(fn: (value: V, key: K, collection: this) => value is V2): V2 | undefined;\n\tpublic find(fn: (value: V, key: K, collection: this) => unknown): V | undefined;\n\tpublic find<This, V2 extends V>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => value is V2,\n\t\tthisArg: This,\n\t): V2 | undefined;\n\tpublic find<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): V | undefined;\n\tpublic find(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): V | undefined {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) return val;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Searches for the key of a single item where the given function returns a truthy value. This behaves like\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex | Array.findIndex()},\n\t * but returns the key rather than the positional index.\n\t *\n\t * @param fn - The function to test with (should return boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.findKey(user => user.username === 'Bob');\n\t * ```\n\t */\n\tpublic findKey<K2 extends K>(fn: (value: V, key: K, collection: this) => key is K2): K2 | undefined;\n\tpublic findKey(fn: (value: V, key: K, collection: this) => unknown): K | undefined;\n\tpublic findKey<This, K2 extends K>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => key is K2,\n\t\tthisArg: This,\n\t): K2 | undefined;\n\tpublic findKey<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): K | undefined;\n\tpublic findKey(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): K | undefined {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) return key;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Removes items that satisfy the provided filter function.\n\t *\n\t * @param fn - Function used to test (should return a boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @returns The number of removed entries\n\t */\n\tpublic sweep(fn: (value: V, key: K, collection: this) => unknown): number;\n\tpublic sweep<T>(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): number;\n\tpublic sweep(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): number {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst previousSize = this.size;\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) this.delete(key);\n\t\t}\n\n\t\treturn previousSize - this.size;\n\t}\n\n\t/**\n\t * Identical to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter | Array.filter()},\n\t * but returns a Collection instead of an Array.\n\t *\n\t * @param fn - The function to test with (should return boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.filter(user => user.username === 'Bob');\n\t * ```\n\t */\n\tpublic filter<K2 extends K>(fn: (value: V, key: K, collection: this) => key is K2): Collection<K2, V>;\n\tpublic filter<V2 extends V>(fn: (value: V, key: K, collection: this) => value is V2): Collection<K, V2>;\n\tpublic filter(fn: (value: V, key: K, collection: this) => unknown): Collection<K, V>;\n\tpublic filter<This, K2 extends K>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => key is K2,\n\t\tthisArg: This,\n\t): Collection<K2, V>;\n\tpublic filter<This, V2 extends V>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => value is V2,\n\t\tthisArg: This,\n\t): Collection<K, V2>;\n\tpublic filter<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): Collection<K, V>;\n\tpublic filter(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): Collection<K, V> {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst results = new this.constructor[Symbol.species]<K, V>();\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) results.set(key, val);\n\t\t}\n\n\t\treturn results;\n\t}\n\n\t/**\n\t * Partitions the collection into two collections where the first collection\n\t * contains the items that passed and the second contains the items that failed.\n\t *\n\t * @param fn - Function used to test (should return a boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * const [big, small] = collection.partition(guild => guild.memberCount > 250);\n\t * ```\n\t */\n\tpublic partition<K2 extends K>(\n\t\tfn: (value: V, key: K, collection: this) => key is K2,\n\t): [Collection<K2, V>, Collection<Exclude<K, K2>, V>];\n\tpublic partition<V2 extends V>(\n\t\tfn: (value: V, key: K, collection: this) => value is V2,\n\t): [Collection<K, V2>, Collection<K, Exclude<V, V2>>];\n\tpublic partition(fn: (value: V, key: K, collection: this) => unknown): [Collection<K, V>, Collection<K, V>];\n\tpublic partition<This, K2 extends K>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => key is K2,\n\t\tthisArg: This,\n\t): [Collection<K2, V>, Collection<Exclude<K, K2>, V>];\n\tpublic partition<This, V2 extends V>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => value is V2,\n\t\tthisArg: This,\n\t): [Collection<K, V2>, Collection<K, Exclude<V, V2>>];\n\tpublic partition<This>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => unknown,\n\t\tthisArg: This,\n\t): [Collection<K, V>, Collection<K, V>];\n\tpublic partition(\n\t\tfn: (value: V, key: K, collection: this) => unknown,\n\t\tthisArg?: unknown,\n\t): [Collection<K, V>, Collection<K, V>] {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst results: [Collection<K, V>, Collection<K, V>] = [\n\t\t\tnew this.constructor[Symbol.species]<K, V>(),\n\t\t\tnew this.constructor[Symbol.species]<K, V>(),\n\t\t];\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) {\n\t\t\t\tresults[0].set(key, val);\n\t\t\t} else {\n\t\t\t\tresults[1].set(key, val);\n\t\t\t}\n\t\t}\n\n\t\treturn results;\n\t}\n\n\t/**\n\t * Maps each item into a Collection, then joins the results into a single Collection. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap | Array.flatMap()}.\n\t *\n\t * @param fn - Function that produces a new Collection\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.flatMap(guild => guild.members.cache);\n\t * ```\n\t */\n\tpublic flatMap<T>(fn: (value: V, key: K, collection: this) => Collection<K, T>): Collection<K, T>;\n\tpublic flatMap<T, This>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => Collection<K, T>,\n\t\tthisArg: This,\n\t): Collection<K, T>;\n\tpublic flatMap<T>(fn: (value: V, key: K, collection: this) => Collection<K, T>, thisArg?: unknown): Collection<K, T> {\n\t\t// eslint-disable-next-line unicorn/no-array-method-this-argument\n\t\tconst collections = this.map(fn, thisArg);\n\t\treturn new this.constructor[Symbol.species]<K, T>().concat(...collections);\n\t}\n\n\t/**\n\t * Maps each item to another value into an array. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}.\n\t *\n\t * @param fn - Function that produces an element of the new array, taking three arguments\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.map(user => user.tag);\n\t * ```\n\t */\n\tpublic map<T>(fn: (value: V, key: K, collection: this) => T): T[];\n\tpublic map<This, T>(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): T[];\n\tpublic map<T>(fn: (value: V, key: K, collection: this) => T, thisArg?: unknown): T[] {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst iter = this.entries();\n\t\treturn Array.from({ length: this.size }, (): T => {\n\t\t\tconst [key, value] = iter.next().value;\n\t\t\treturn fn(value, key, this);\n\t\t});\n\t}\n\n\t/**\n\t * Maps each item to another value into a collection. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}.\n\t *\n\t * @param fn - Function that produces an element of the new collection, taking three arguments\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.mapValues(user => user.tag);\n\t * ```\n\t */\n\tpublic mapValues<T>(fn: (value: V, key: K, collection: this) => T): Collection<K, T>;\n\tpublic mapValues<This, T>(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): Collection<K, T>;\n\tpublic mapValues<T>(fn: (value: V, key: K, collection: this) => T, thisArg?: unknown): Collection<K, T> {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst coll = new this.constructor[Symbol.species]<K, T>();\n\t\tfor (const [key, val] of this) coll.set(key, fn(val, key, this));\n\t\treturn coll;\n\t}\n\n\t/**\n\t * Checks if there exists an item that passes a test. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some | Array.some()}.\n\t *\n\t * @param fn - Function used to test (should return a boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.some(user => user.discriminator === '0000');\n\t * ```\n\t */\n\tpublic some(fn: (value: V, key: K, collection: this) => unknown): boolean;\n\tpublic some<T>(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): boolean;\n\tpublic some(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): boolean {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) return true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Checks if all items passes a test. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every | Array.every()}.\n\t *\n\t * @param fn - Function used to test (should return a boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.every(user => !user.bot);\n\t * ```\n\t */\n\tpublic every<K2 extends K>(fn: (value: V, key: K, collection: this) => key is K2): this is Collection<K2, V>;\n\tpublic every<V2 extends V>(fn: (value: V, key: K, collection: this) => value is V2): this is Collection<K, V2>;\n\tpublic every(fn: (value: V, key: K, collection: this) => unknown): boolean;\n\tpublic every<This, K2 extends K>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => key is K2,\n\t\tthisArg: This,\n\t): this is Collection<K2, V>;\n\tpublic every<This, V2 extends V>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => value is V2,\n\t\tthisArg: This,\n\t): this is Collection<K, V2>;\n\tpublic every<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): boolean;\n\tpublic every(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): boolean {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfor (const [key, val] of this) {\n\t\t\tif (!fn(val, key, this)) return false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Applies a function to produce a single value. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce | Array.reduce()}.\n\t *\n\t * @param fn - Function used to reduce, taking four arguments; `accumulator`, `currentValue`, `currentKey`,\n\t * and `collection`\n\t * @param initialValue - Starting value for the accumulator\n\t * @example\n\t * ```ts\n\t * collection.reduce((acc, guild) => acc + guild.memberCount, 0);\n\t * ```\n\t */\n\tpublic reduce<T = V>(fn: (accumulator: T, value: V, key: K, collection: this) => T, initialValue?: T): T {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tlet accumulator!: T;\n\n\t\tconst iterator = this.entries();\n\t\tif (initialValue === undefined) {\n\t\t\tif (this.size === 0) throw new TypeError('Reduce of empty collection with no initial value');\n\t\t\taccumulator = iterator.next().value[1];\n\t\t} else {\n\t\t\taccumulator = initialValue;\n\t\t}\n\n\t\tfor (const [key, value] of iterator) {\n\t\t\taccumulator = fn(accumulator, value, key, this);\n\t\t}\n\n\t\treturn accumulator;\n\t}\n\n\t/**\n\t * Identical to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach | Map.forEach()},\n\t * but returns the collection instead of undefined.\n\t *\n\t * @param fn - Function to execute for each element\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection\n\t * .each(user => console.log(user.username))\n\t * .filter(user => user.bot)\n\t * .each(user => console.log(user.username));\n\t * ```\n\t */\n\tpublic each(fn: (value: V, key: K, collection: this) => void): this;\n\tpublic each<T>(fn: (this: T, value: V, key: K, collection: this) => void, thisArg: T): this;\n\tpublic each(fn: (value: V, key: K, collection: this) => void, thisArg?: unknown): this {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\n\t\tfor (const [key, value] of this) {\n\t\t\tfn(value, key, this);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Runs a function on the collection and returns the collection.\n\t *\n\t * @param fn - Function to execute\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection\n\t * .tap(coll => console.log(coll.size))\n\t * .filter(user => user.bot)\n\t * .tap(coll => console.log(coll.size))\n\t * ```\n\t */\n\tpublic tap(fn: (collection: this) => void): this;\n\tpublic tap<T>(fn: (this: T, collection: this) => void, thisArg: T): this;\n\tpublic tap(fn: (collection: this) => void, thisArg?: unknown): this {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfn(this);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Creates an identical shallow copy of this collection.\n\t *\n\t * @example\n\t * ```ts\n\t * const newColl = someColl.clone();\n\t * ```\n\t */\n\tpublic clone(): Collection<K, V> {\n\t\treturn new this.constructor[Symbol.species](this);\n\t}\n\n\t/**\n\t * Combines this collection with others into a new collection. None of the source collections are modified.\n\t *\n\t * @param collections - Collections to merge\n\t * @example\n\t * ```ts\n\t * const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);\n\t * ```\n\t */\n\tpublic concat(...collections: ReadonlyCollection<K, V>[]) {\n\t\tconst newColl = this.clone();\n\t\tfor (const coll of collections) {\n\t\t\tfor (const [key, val] of coll) newColl.set(key, val);\n\t\t}\n\n\t\treturn newColl;\n\t}\n\n\t/**\n\t * Checks if this collection shares identical items with another.\n\t * This is different to checking for equality using equal-signs, because\n\t * the collections may be different objects, but contain the same data.\n\t *\n\t * @param collection - Collection to compare with\n\t * @returns Whether the collections have identical contents\n\t */\n\tpublic equals(collection: ReadonlyCollection<K, V>) {\n\t\tif (!collection) return false; // runtime check\n\t\tif (this === collection) return true;\n\t\tif (this.size !== collection.size) return false;\n\t\tfor (const [key, value] of this) {\n\t\t\tif (!collection.has(key) || value !== collection.get(key)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * The sort method sorts the items of a collection in place and returns it.\n\t * The sort is not necessarily stable in Node 10 or older.\n\t * The default sort order is according to string Unicode code points.\n\t *\n\t * @param compareFunction - Specifies a function that defines the sort order.\n\t * If omitted, the collection is sorted according to each character's Unicode code point value, according to the string conversion of each element.\n\t * @example\n\t * ```ts\n\t * collection.sort((userA, userB) => userA.createdTimestamp - userB.createdTimestamp);\n\t * ```\n\t */\n\tpublic sort(compareFunction: Comparator<K, V> = Collection.defaultSort) {\n\t\tconst entries = [...this.entries()];\n\t\tentries.sort((a, b): number => compareFunction(a[1], b[1], a[0], b[0]));\n\n\t\t// Perform clean-up\n\t\tsuper.clear();\n\n\t\t// Set the new entries\n\t\tfor (const [key, value] of entries) {\n\t\t\tsuper.set(key, value);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * The intersect method returns a new structure containing items where the keys and values are present in both original structures.\n\t *\n\t * @param other - The other Collection to filter against\n\t */\n\tpublic intersect<T>(other: ReadonlyCollection<K, T>): Collection<K, T> {\n\t\tconst coll = new this.constructor[Symbol.species]<K, T>();\n\t\tfor (const [key, value] of other) {\n\t\t\tif (this.has(key) && Object.is(value, this.get(key))) {\n\t\t\t\tcoll.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\treturn coll;\n\t}\n\n\t/**\n\t * The subtract method returns a new structure containing items where the keys and values of the original structure are not present in the other.\n\t *\n\t * @param other - The other Collection to filter against\n\t */\n\tpublic subtract<T>(other: ReadonlyCollection<K, T>): Collection<K, V> {\n\t\tconst coll = new this.constructor[Symbol.species]<K, V>();\n\t\tfor (const [key, value] of this) {\n\t\t\tif (!other.has(key) || !Object.is(value, other.get(key))) {\n\t\t\t\tcoll.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\treturn coll;\n\t}\n\n\t/**\n\t * The difference method returns a new structure containing items where the key is present in one of the original structures but not the other.\n\t *\n\t * @param other - The other Collection to filter against\n\t */\n\tpublic difference<T>(other: ReadonlyCollection<K, T>): Collection<K, T | V> {\n\t\tconst coll = new this.constructor[Symbol.species]<K, T | V>();\n\t\tfor (const [key, value] of other) {\n\t\t\tif (!this.has(key)) coll.set(key, value);\n\t\t}\n\n\t\tfor (const [key, value] of this) {\n\t\t\tif (!other.has(key)) coll.set(key, value);\n\t\t}\n\n\t\treturn coll;\n\t}\n\n\t/**\n\t * Merges two Collections together into a new Collection.\n\t *\n\t * @param other - The other Collection to merge with\n\t * @param whenInSelf - Function getting the result if the entry only exists in this Collection\n\t * @param whenInOther - Function getting the result if the entry only exists in the other Collection\n\t * @param whenInBoth - Function getting the result if the entry exists in both Collections\n\t * @example\n\t * ```ts\n\t * // Sums up the entries in two collections.\n\t * coll.merge(\n\t * other,\n\t * x => ({ keep: true, value: x }),\n\t * y => ({ keep: true, value: y }),\n\t * (x, y) => ({ keep: true, value: x + y }),\n\t * );\n\t * ```\n\t * @example\n\t * ```ts\n\t * // Intersects two collections in a left-biased manner.\n\t * coll.merge(\n\t * other,\n\t * x => ({ keep: false }),\n\t * y => ({ keep: false }),\n\t * (x, _) => ({ keep: true, value: x }),\n\t * );\n\t * ```\n\t */\n\tpublic merge<T, R>(\n\t\tother: ReadonlyCollection<K, T>,\n\t\twhenInSelf: (value: V, key: K) => Keep<R>,\n\t\twhenInOther: (valueOther: T, key: K) => Keep<R>,\n\t\twhenInBoth: (value: V, valueOther: T, key: K) => Keep<R>,\n\t): Collection<K, R> {\n\t\tconst coll = new this.constructor[Symbol.species]<K, R>();\n\t\tconst keys = new Set([...this.keys(), ...other.keys()]);\n\n\t\tfor (const key of keys) {\n\t\t\tconst hasInSelf = this.has(key);\n\t\t\tconst hasInOther = other.has(key);\n\n\t\t\tif (hasInSelf && hasInOther) {\n\t\t\t\tconst result = whenInBoth(this.get(key)!, other.get(key)!, key);\n\t\t\t\tif (result.keep) coll.set(key, result.value);\n\t\t\t} else if (hasInSelf) {\n\t\t\t\tconst result = whenInSelf(this.get(key)!, key);\n\t\t\t\tif (result.keep) coll.set(key, result.value);\n\t\t\t} else if (hasInOther) {\n\t\t\t\tconst result = whenInOther(other.get(key)!, key);\n\t\t\t\tif (result.keep) coll.set(key, result.value);\n\t\t\t}\n\t\t}\n\n\t\treturn coll;\n\t}\n\n\t/**\n\t * The sorted method sorts the items of a collection and returns it.\n\t * The sort is not necessarily stable in Node 10 or older.\n\t * The default sort order is according to string Unicode code points.\n\t *\n\t * @param compareFunction - Specifies a function that defines the sort order.\n\t * If omitted, the collection is sorted according to each character's Unicode code point value,\n\t * according to the string conversion of each element.\n\t * @example\n\t * ```ts\n\t * collection.sorted((userA, userB) => userA.createdTimestamp - userB.createdTimestamp);\n\t * ```\n\t */\n\tpublic sorted(compareFunction: Comparator<K, V> = Collection.defaultSort) {\n\t\treturn new this.constructor[Symbol.species](this).sort((av, bv, ak, bk) => compareFunction(av, bv, ak, bk));\n\t}\n\n\tpublic toJSON() {\n\t\t// toJSON is called recursively by JSON.stringify.\n\t\treturn [...this.values()];\n\t}\n\n\tprivate static defaultSort<V>(firstValue: V, secondValue: V): number {\n\t\treturn Number(firstValue > secondValue) || Number(firstValue === secondValue) - 1;\n\t}\n\n\t/**\n\t * Creates a Collection from a list of entries.\n\t *\n\t * @param entries - The list of entries\n\t * @param combine - Function to combine an existing entry with a new one\n\t * @example\n\t * ```ts\n\t * Collection.combineEntries([[\"a\", 1], [\"b\", 2], [\"a\", 2]], (x, y) => x + y);\n\t * // returns Collection { \"a\" => 3, \"b\" => 2 }\n\t * ```\n\t */\n\tpublic static combineEntries<K, V>(\n\t\tentries: Iterable<[K, V]>,\n\t\tcombine: (firstValue: V, secondValue: V, key: K) => V,\n\t): Collection<K, V> {\n\t\tconst coll = new Collection<K, V>();\n\t\tfor (const [key, value] of entries) {\n\t\t\tif (coll.has(key)) {\n\t\t\t\tcoll.set(key, combine(coll.get(key)!, value, key));\n\t\t\t} else {\n\t\t\t\tcoll.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\treturn coll;\n\t}\n}\n\n/**\n * @internal\n */\nexport type Keep<V> = { keep: false } | { keep: true; value: V };\n\n/**\n * @internal\n */\nexport type Comparator<K, V> = (firstValue: V, secondValue: V, firstKey: K, secondKey: K) => number;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACqCO,IAAM,aAAN,MAAM,oBAAyB,IAAU;AAAA,EArChD,OAqCgD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWxC,OAAO,KAAQ,uBAA2D;AAChF,QAAI,KAAK,IAAI,GAAG;AAAG,aAAO,KAAK,IAAI,GAAG;AACtC,QAAI,OAAO,0BAA0B;AAAY,YAAM,IAAI,UAAU,GAAG,qBAAqB,oBAAoB;AACjH,UAAM,eAAe,sBAAsB,KAAK,IAAI;AACpD,SAAK,IAAI,KAAK,YAAY;AAC1B,WAAO;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,UAAU,MAAW;AAC3B,WAAO,KAAK,MAAM,CAAC,QAAQ,MAAM,IAAI,GAAG,CAAC;AAAA,EAC1C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,UAAU,MAAW;AAC3B,WAAO,KAAK,KAAK,CAAC,QAAQ,MAAM,IAAI,GAAG,CAAC;AAAA,EACzC;AAAA,EAUO,MAAM,QAAsC;AAClD,QAAI,WAAW;AAAW,aAAO,KAAK,OAAO,EAAE,KAAK,EAAE;AACtD,QAAI,SAAS;AAAG,aAAO,KAAK,KAAK,SAAS,EAAE;AAC5C,aAAS,KAAK,IAAI,KAAK,MAAM,MAAM;AACnC,UAAM,OAAO,KAAK,OAAO;AACzB,WAAO,MAAM,KAAK,EAAE,QAAQ,OAAO,GAAG,MAAS,KAAK,KAAK,EAAE,KAAK;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,YAAe,aAAwB;AACpE,WAAO,OAAO,aAAa,WAAW,KAAK,OAAO,eAAe,WAAW,IAAI;AAAA,EACjF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,OAAc,eACb,SACA,SACmB;AACnB,UAAM,OAAO,IAAI,YAAiB;AAClC,eAAW,CAAC,KAAK,KAAK,KAAK,SAAS;AACnC,UAAI,KAAK,IAAI,GAAG,GAAG;AAClB,aAAK,IAAI,KAAK,QAAQ,KAAK,IAAI,GAAG,GAAI,OAAO,GAAG,CAAC;AAAA,MAClD,OAAO;AACN,aAAK,IAAI,KAAK,KAAK;AAAA,MACpB;AAAA,IACD;AAEA,WAAO;AAAA,EACR;AACD;;;AD9yBO,IAAM,UAAU;","names":[]} \ No newline at end of file
diff --git a/node_modules/@discordjs/collection/dist/index.mjs b/node_modules/@discordjs/collection/dist/index.mjs
new file mode 100644
index 0000000..c31c9ee
--- /dev/null
+++ b/node_modules/@discordjs/collection/dist/index.mjs
@@ -0,0 +1,517 @@
+var __defProp = Object.defineProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+
+// src/collection.ts
+var Collection = class _Collection extends Map {
+ static {
+ __name(this, "Collection");
+ }
+ /**
+ * Obtains the value of the given key if it exists, otherwise sets and returns the value provided by the default value generator.
+ *
+ * @param key - The key to get if it exists, or set otherwise
+ * @param defaultValueGenerator - A function that generates the default value
+ * @example
+ * ```ts
+ * collection.ensure(guildId, () => defaultGuildConfig);
+ * ```
+ */
+ ensure(key, defaultValueGenerator) {
+ if (this.has(key))
+ return this.get(key);
+ if (typeof defaultValueGenerator !== "function")
+ throw new TypeError(`${defaultValueGenerator} is not a function`);
+ const defaultValue = defaultValueGenerator(key, this);
+ this.set(key, defaultValue);
+ return defaultValue;
+ }
+ /**
+ * Checks if all of the elements exist in the collection.
+ *
+ * @param keys - The keys of the elements to check for
+ * @returns `true` if all of the elements exist, `false` if at least one does not exist.
+ */
+ hasAll(...keys) {
+ return keys.every((key) => super.has(key));
+ }
+ /**
+ * Checks if any of the elements exist in the collection.
+ *
+ * @param keys - The keys of the elements to check for
+ * @returns `true` if any of the elements exist, `false` if none exist.
+ */
+ hasAny(...keys) {
+ return keys.some((key) => super.has(key));
+ }
+ first(amount) {
+ if (amount === void 0)
+ return this.values().next().value;
+ if (amount < 0)
+ return this.last(amount * -1);
+ amount = Math.min(this.size, amount);
+ const iter = this.values();
+ return Array.from({ length: amount }, () => iter.next().value);
+ }
+ firstKey(amount) {
+ if (amount === void 0)
+ return this.keys().next().value;
+ if (amount < 0)
+ return this.lastKey(amount * -1);
+ amount = Math.min(this.size, amount);
+ const iter = this.keys();
+ return Array.from({ length: amount }, () => iter.next().value);
+ }
+ last(amount) {
+ const arr = [...this.values()];
+ if (amount === void 0)
+ return arr[arr.length - 1];
+ if (amount < 0)
+ return this.first(amount * -1);
+ if (!amount)
+ return [];
+ return arr.slice(-amount);
+ }
+ lastKey(amount) {
+ const arr = [...this.keys()];
+ if (amount === void 0)
+ return arr[arr.length - 1];
+ if (amount < 0)
+ return this.firstKey(amount * -1);
+ if (!amount)
+ return [];
+ return arr.slice(-amount);
+ }
+ /**
+ * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}.
+ * Returns the item at a given index, allowing for positive and negative integers.
+ * Negative integers count back from the last item in the collection.
+ *
+ * @param index - The index of the element to obtain
+ */
+ at(index) {
+ index = Math.floor(index);
+ const arr = [...this.values()];
+ return arr.at(index);
+ }
+ /**
+ * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}.
+ * Returns the key at a given index, allowing for positive and negative integers.
+ * Negative integers count back from the last item in the collection.
+ *
+ * @param index - The index of the key to obtain
+ */
+ keyAt(index) {
+ index = Math.floor(index);
+ const arr = [...this.keys()];
+ return arr.at(index);
+ }
+ random(amount) {
+ const arr = [...this.values()];
+ if (amount === void 0)
+ return arr[Math.floor(Math.random() * arr.length)];
+ if (!arr.length || !amount)
+ return [];
+ return Array.from(
+ { length: Math.min(amount, arr.length) },
+ () => arr.splice(Math.floor(Math.random() * arr.length), 1)[0]
+ );
+ }
+ randomKey(amount) {
+ const arr = [...this.keys()];
+ if (amount === void 0)
+ return arr[Math.floor(Math.random() * arr.length)];
+ if (!arr.length || !amount)
+ return [];
+ return Array.from(
+ { length: Math.min(amount, arr.length) },
+ () => arr.splice(Math.floor(Math.random() * arr.length), 1)[0]
+ );
+ }
+ /**
+ * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse | Array.reverse()}
+ * but returns a Collection instead of an Array.
+ */
+ reverse() {
+ const entries = [...this.entries()].reverse();
+ this.clear();
+ for (const [key, value] of entries)
+ this.set(key, value);
+ return this;
+ }
+ find(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ for (const [key, val] of this) {
+ if (fn(val, key, this))
+ return val;
+ }
+ return void 0;
+ }
+ findKey(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ for (const [key, val] of this) {
+ if (fn(val, key, this))
+ return key;
+ }
+ return void 0;
+ }
+ sweep(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ const previousSize = this.size;
+ for (const [key, val] of this) {
+ if (fn(val, key, this))
+ this.delete(key);
+ }
+ return previousSize - this.size;
+ }
+ filter(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ const results = new this.constructor[Symbol.species]();
+ for (const [key, val] of this) {
+ if (fn(val, key, this))
+ results.set(key, val);
+ }
+ return results;
+ }
+ partition(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ const results = [
+ new this.constructor[Symbol.species](),
+ new this.constructor[Symbol.species]()
+ ];
+ for (const [key, val] of this) {
+ if (fn(val, key, this)) {
+ results[0].set(key, val);
+ } else {
+ results[1].set(key, val);
+ }
+ }
+ return results;
+ }
+ flatMap(fn, thisArg) {
+ const collections = this.map(fn, thisArg);
+ return new this.constructor[Symbol.species]().concat(...collections);
+ }
+ map(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ const iter = this.entries();
+ return Array.from({ length: this.size }, () => {
+ const [key, value] = iter.next().value;
+ return fn(value, key, this);
+ });
+ }
+ mapValues(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ const coll = new this.constructor[Symbol.species]();
+ for (const [key, val] of this)
+ coll.set(key, fn(val, key, this));
+ return coll;
+ }
+ some(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ for (const [key, val] of this) {
+ if (fn(val, key, this))
+ return true;
+ }
+ return false;
+ }
+ every(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ for (const [key, val] of this) {
+ if (!fn(val, key, this))
+ return false;
+ }
+ return true;
+ }
+ /**
+ * Applies a function to produce a single value. Identical in behavior to
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce | Array.reduce()}.
+ *
+ * @param fn - Function used to reduce, taking four arguments; `accumulator`, `currentValue`, `currentKey`,
+ * and `collection`
+ * @param initialValue - Starting value for the accumulator
+ * @example
+ * ```ts
+ * collection.reduce((acc, guild) => acc + guild.memberCount, 0);
+ * ```
+ */
+ reduce(fn, initialValue) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ let accumulator;
+ const iterator = this.entries();
+ if (initialValue === void 0) {
+ if (this.size === 0)
+ throw new TypeError("Reduce of empty collection with no initial value");
+ accumulator = iterator.next().value[1];
+ } else {
+ accumulator = initialValue;
+ }
+ for (const [key, value] of iterator) {
+ accumulator = fn(accumulator, value, key, this);
+ }
+ return accumulator;
+ }
+ each(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ for (const [key, value] of this) {
+ fn(value, key, this);
+ }
+ return this;
+ }
+ tap(fn, thisArg) {
+ if (typeof fn !== "function")
+ throw new TypeError(`${fn} is not a function`);
+ if (thisArg !== void 0)
+ fn = fn.bind(thisArg);
+ fn(this);
+ return this;
+ }
+ /**
+ * Creates an identical shallow copy of this collection.
+ *
+ * @example
+ * ```ts
+ * const newColl = someColl.clone();
+ * ```
+ */
+ clone() {
+ return new this.constructor[Symbol.species](this);
+ }
+ /**
+ * Combines this collection with others into a new collection. None of the source collections are modified.
+ *
+ * @param collections - Collections to merge
+ * @example
+ * ```ts
+ * const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);
+ * ```
+ */
+ concat(...collections) {
+ const newColl = this.clone();
+ for (const coll of collections) {
+ for (const [key, val] of coll)
+ newColl.set(key, val);
+ }
+ return newColl;
+ }
+ /**
+ * Checks if this collection shares identical items with another.
+ * This is different to checking for equality using equal-signs, because
+ * the collections may be different objects, but contain the same data.
+ *
+ * @param collection - Collection to compare with
+ * @returns Whether the collections have identical contents
+ */
+ equals(collection) {
+ if (!collection)
+ return false;
+ if (this === collection)
+ return true;
+ if (this.size !== collection.size)
+ return false;
+ for (const [key, value] of this) {
+ if (!collection.has(key) || value !== collection.get(key)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ /**
+ * The sort method sorts the items of a collection in place and returns it.
+ * The sort is not necessarily stable in Node 10 or older.
+ * The default sort order is according to string Unicode code points.
+ *
+ * @param compareFunction - Specifies a function that defines the sort order.
+ * If omitted, the collection is sorted according to each character's Unicode code point value, according to the string conversion of each element.
+ * @example
+ * ```ts
+ * collection.sort((userA, userB) => userA.createdTimestamp - userB.createdTimestamp);
+ * ```
+ */
+ sort(compareFunction = _Collection.defaultSort) {
+ const entries = [...this.entries()];
+ entries.sort((a, b) => compareFunction(a[1], b[1], a[0], b[0]));
+ super.clear();
+ for (const [key, value] of entries) {
+ super.set(key, value);
+ }
+ return this;
+ }
+ /**
+ * The intersect method returns a new structure containing items where the keys and values are present in both original structures.
+ *
+ * @param other - The other Collection to filter against
+ */
+ intersect(other) {
+ const coll = new this.constructor[Symbol.species]();
+ for (const [key, value] of other) {
+ if (this.has(key) && Object.is(value, this.get(key))) {
+ coll.set(key, value);
+ }
+ }
+ return coll;
+ }
+ /**
+ * The subtract method returns a new structure containing items where the keys and values of the original structure are not present in the other.
+ *
+ * @param other - The other Collection to filter against
+ */
+ subtract(other) {
+ const coll = new this.constructor[Symbol.species]();
+ for (const [key, value] of this) {
+ if (!other.has(key) || !Object.is(value, other.get(key))) {
+ coll.set(key, value);
+ }
+ }
+ return coll;
+ }
+ /**
+ * The difference method returns a new structure containing items where the key is present in one of the original structures but not the other.
+ *
+ * @param other - The other Collection to filter against
+ */
+ difference(other) {
+ const coll = new this.constructor[Symbol.species]();
+ for (const [key, value] of other) {
+ if (!this.has(key))
+ coll.set(key, value);
+ }
+ for (const [key, value] of this) {
+ if (!other.has(key))
+ coll.set(key, value);
+ }
+ return coll;
+ }
+ /**
+ * Merges two Collections together into a new Collection.
+ *
+ * @param other - The other Collection to merge with
+ * @param whenInSelf - Function getting the result if the entry only exists in this Collection
+ * @param whenInOther - Function getting the result if the entry only exists in the other Collection
+ * @param whenInBoth - Function getting the result if the entry exists in both Collections
+ * @example
+ * ```ts
+ * // Sums up the entries in two collections.
+ * coll.merge(
+ * other,
+ * x => ({ keep: true, value: x }),
+ * y => ({ keep: true, value: y }),
+ * (x, y) => ({ keep: true, value: x + y }),
+ * );
+ * ```
+ * @example
+ * ```ts
+ * // Intersects two collections in a left-biased manner.
+ * coll.merge(
+ * other,
+ * x => ({ keep: false }),
+ * y => ({ keep: false }),
+ * (x, _) => ({ keep: true, value: x }),
+ * );
+ * ```
+ */
+ merge(other, whenInSelf, whenInOther, whenInBoth) {
+ const coll = new this.constructor[Symbol.species]();
+ const keys = /* @__PURE__ */ new Set([...this.keys(), ...other.keys()]);
+ for (const key of keys) {
+ const hasInSelf = this.has(key);
+ const hasInOther = other.has(key);
+ if (hasInSelf && hasInOther) {
+ const result = whenInBoth(this.get(key), other.get(key), key);
+ if (result.keep)
+ coll.set(key, result.value);
+ } else if (hasInSelf) {
+ const result = whenInSelf(this.get(key), key);
+ if (result.keep)
+ coll.set(key, result.value);
+ } else if (hasInOther) {
+ const result = whenInOther(other.get(key), key);
+ if (result.keep)
+ coll.set(key, result.value);
+ }
+ }
+ return coll;
+ }
+ /**
+ * The sorted method sorts the items of a collection and returns it.
+ * The sort is not necessarily stable in Node 10 or older.
+ * The default sort order is according to string Unicode code points.
+ *
+ * @param compareFunction - Specifies a function that defines the sort order.
+ * If omitted, the collection is sorted according to each character's Unicode code point value,
+ * according to the string conversion of each element.
+ * @example
+ * ```ts
+ * collection.sorted((userA, userB) => userA.createdTimestamp - userB.createdTimestamp);
+ * ```
+ */
+ sorted(compareFunction = _Collection.defaultSort) {
+ return new this.constructor[Symbol.species](this).sort((av, bv, ak, bk) => compareFunction(av, bv, ak, bk));
+ }
+ toJSON() {
+ return [...this.values()];
+ }
+ static defaultSort(firstValue, secondValue) {
+ return Number(firstValue > secondValue) || Number(firstValue === secondValue) - 1;
+ }
+ /**
+ * Creates a Collection from a list of entries.
+ *
+ * @param entries - The list of entries
+ * @param combine - Function to combine an existing entry with a new one
+ * @example
+ * ```ts
+ * Collection.combineEntries([["a", 1], ["b", 2], ["a", 2]], (x, y) => x + y);
+ * // returns Collection { "a" => 3, "b" => 2 }
+ * ```
+ */
+ static combineEntries(entries, combine) {
+ const coll = new _Collection();
+ for (const [key, value] of entries) {
+ if (coll.has(key)) {
+ coll.set(key, combine(coll.get(key), value, key));
+ } else {
+ coll.set(key, value);
+ }
+ }
+ return coll;
+ }
+};
+
+// src/index.ts
+var version = "1.5.3";
+export {
+ Collection,
+ version
+};
+//# sourceMappingURL=index.mjs.map \ No newline at end of file
diff --git a/node_modules/@discordjs/collection/dist/index.mjs.map b/node_modules/@discordjs/collection/dist/index.mjs.map
new file mode 100644
index 0000000..fcf72ab
--- /dev/null
+++ b/node_modules/@discordjs/collection/dist/index.mjs.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/collection.ts","../src/index.ts"],"sourcesContent":["/* eslint-disable no-param-reassign */\n/**\n * @internal\n */\nexport interface CollectionConstructor {\n\tnew (): Collection<unknown, unknown>;\n\tnew <K, V>(entries?: readonly (readonly [K, V])[] | null): Collection<K, V>;\n\tnew <K, V>(iterable: Iterable<readonly [K, V]>): Collection<K, V>;\n\treadonly prototype: Collection<unknown, unknown>;\n\treadonly [Symbol.species]: CollectionConstructor;\n}\n\n/**\n * Represents an immutable version of a collection\n */\nexport type ReadonlyCollection<K, V> = Omit<\n\tCollection<K, V>,\n\t'delete' | 'ensure' | 'forEach' | 'get' | 'reverse' | 'set' | 'sort' | 'sweep'\n> &\n\tReadonlyMap<K, V>;\n\n/**\n * Separate interface for the constructor so that emitted js does not have a constructor that overwrites itself\n *\n * @internal\n */\nexport interface Collection<K, V> extends Map<K, V> {\n\tconstructor: CollectionConstructor;\n}\n\n/**\n * A Map with additional utility methods. This is used throughout discord.js rather than Arrays for anything that has\n * an ID, for significantly improved performance and ease-of-use.\n *\n * @typeParam K - The key type this collection holds\n * @typeParam V - The value type this collection holds\n */\nexport class Collection<K, V> extends Map<K, V> {\n\t/**\n\t * Obtains the value of the given key if it exists, otherwise sets and returns the value provided by the default value generator.\n\t *\n\t * @param key - The key to get if it exists, or set otherwise\n\t * @param defaultValueGenerator - A function that generates the default value\n\t * @example\n\t * ```ts\n\t * collection.ensure(guildId, () => defaultGuildConfig);\n\t * ```\n\t */\n\tpublic ensure(key: K, defaultValueGenerator: (key: K, collection: this) => V): V {\n\t\tif (this.has(key)) return this.get(key)!;\n\t\tif (typeof defaultValueGenerator !== 'function') throw new TypeError(`${defaultValueGenerator} is not a function`);\n\t\tconst defaultValue = defaultValueGenerator(key, this);\n\t\tthis.set(key, defaultValue);\n\t\treturn defaultValue;\n\t}\n\n\t/**\n\t * Checks if all of the elements exist in the collection.\n\t *\n\t * @param keys - The keys of the elements to check for\n\t * @returns `true` if all of the elements exist, `false` if at least one does not exist.\n\t */\n\tpublic hasAll(...keys: K[]) {\n\t\treturn keys.every((key) => super.has(key));\n\t}\n\n\t/**\n\t * Checks if any of the elements exist in the collection.\n\t *\n\t * @param keys - The keys of the elements to check for\n\t * @returns `true` if any of the elements exist, `false` if none exist.\n\t */\n\tpublic hasAny(...keys: K[]) {\n\t\treturn keys.some((key) => super.has(key));\n\t}\n\n\t/**\n\t * Obtains the first value(s) in this collection.\n\t *\n\t * @param amount - Amount of values to obtain from the beginning\n\t * @returns A single value if no amount is provided or an array of values, starting from the end if amount is negative\n\t */\n\tpublic first(): V | undefined;\n\tpublic first(amount: number): V[];\n\tpublic first(amount?: number): V | V[] | undefined {\n\t\tif (amount === undefined) return this.values().next().value;\n\t\tif (amount < 0) return this.last(amount * -1);\n\t\tamount = Math.min(this.size, amount);\n\t\tconst iter = this.values();\n\t\treturn Array.from({ length: amount }, (): V => iter.next().value);\n\t}\n\n\t/**\n\t * Obtains the first key(s) in this collection.\n\t *\n\t * @param amount - Amount of keys to obtain from the beginning\n\t * @returns A single key if no amount is provided or an array of keys, starting from the end if\n\t * amount is negative\n\t */\n\tpublic firstKey(): K | undefined;\n\tpublic firstKey(amount: number): K[];\n\tpublic firstKey(amount?: number): K | K[] | undefined {\n\t\tif (amount === undefined) return this.keys().next().value;\n\t\tif (amount < 0) return this.lastKey(amount * -1);\n\t\tamount = Math.min(this.size, amount);\n\t\tconst iter = this.keys();\n\t\treturn Array.from({ length: amount }, (): K => iter.next().value);\n\t}\n\n\t/**\n\t * Obtains the last value(s) in this collection.\n\t *\n\t * @param amount - Amount of values to obtain from the end\n\t * @returns A single value if no amount is provided or an array of values, starting from the start if\n\t * amount is negative\n\t */\n\tpublic last(): V | undefined;\n\tpublic last(amount: number): V[];\n\tpublic last(amount?: number): V | V[] | undefined {\n\t\tconst arr = [...this.values()];\n\t\tif (amount === undefined) return arr[arr.length - 1];\n\t\tif (amount < 0) return this.first(amount * -1);\n\t\tif (!amount) return [];\n\t\treturn arr.slice(-amount);\n\t}\n\n\t/**\n\t * Obtains the last key(s) in this collection.\n\t *\n\t * @param amount - Amount of keys to obtain from the end\n\t * @returns A single key if no amount is provided or an array of keys, starting from the start if\n\t * amount is negative\n\t */\n\tpublic lastKey(): K | undefined;\n\tpublic lastKey(amount: number): K[];\n\tpublic lastKey(amount?: number): K | K[] | undefined {\n\t\tconst arr = [...this.keys()];\n\t\tif (amount === undefined) return arr[arr.length - 1];\n\t\tif (amount < 0) return this.firstKey(amount * -1);\n\t\tif (!amount) return [];\n\t\treturn arr.slice(-amount);\n\t}\n\n\t/**\n\t * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}.\n\t * Returns the item at a given index, allowing for positive and negative integers.\n\t * Negative integers count back from the last item in the collection.\n\t *\n\t * @param index - The index of the element to obtain\n\t */\n\tpublic at(index: number) {\n\t\tindex = Math.floor(index);\n\t\tconst arr = [...this.values()];\n\t\treturn arr.at(index);\n\t}\n\n\t/**\n\t * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}.\n\t * Returns the key at a given index, allowing for positive and negative integers.\n\t * Negative integers count back from the last item in the collection.\n\t *\n\t * @param index - The index of the key to obtain\n\t */\n\tpublic keyAt(index: number) {\n\t\tindex = Math.floor(index);\n\t\tconst arr = [...this.keys()];\n\t\treturn arr.at(index);\n\t}\n\n\t/**\n\t * Obtains unique random value(s) from this collection.\n\t *\n\t * @param amount - Amount of values to obtain randomly\n\t * @returns A single value if no amount is provided or an array of values\n\t */\n\tpublic random(): V | undefined;\n\tpublic random(amount: number): V[];\n\tpublic random(amount?: number): V | V[] | undefined {\n\t\tconst arr = [...this.values()];\n\t\tif (amount === undefined) return arr[Math.floor(Math.random() * arr.length)];\n\t\tif (!arr.length || !amount) return [];\n\t\treturn Array.from(\n\t\t\t{ length: Math.min(amount, arr.length) },\n\t\t\t(): V => arr.splice(Math.floor(Math.random() * arr.length), 1)[0]!,\n\t\t);\n\t}\n\n\t/**\n\t * Obtains unique random key(s) from this collection.\n\t *\n\t * @param amount - Amount of keys to obtain randomly\n\t * @returns A single key if no amount is provided or an array\n\t */\n\tpublic randomKey(): K | undefined;\n\tpublic randomKey(amount: number): K[];\n\tpublic randomKey(amount?: number): K | K[] | undefined {\n\t\tconst arr = [...this.keys()];\n\t\tif (amount === undefined) return arr[Math.floor(Math.random() * arr.length)];\n\t\tif (!arr.length || !amount) return [];\n\t\treturn Array.from(\n\t\t\t{ length: Math.min(amount, arr.length) },\n\t\t\t(): K => arr.splice(Math.floor(Math.random() * arr.length), 1)[0]!,\n\t\t);\n\t}\n\n\t/**\n\t * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse | Array.reverse()}\n\t * but returns a Collection instead of an Array.\n\t */\n\tpublic reverse() {\n\t\tconst entries = [...this.entries()].reverse();\n\t\tthis.clear();\n\t\tfor (const [key, value] of entries) this.set(key, value);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Searches for a single item where the given function returns a truthy value. This behaves like\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find | Array.find()}.\n\t * All collections used in Discord.js are mapped using their `id` property, and if you want to find by id you\n\t * should use the `get` method. See\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get | MDN} for details.\n\t *\n\t * @param fn - The function to test with (should return boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.find(user => user.username === 'Bob');\n\t * ```\n\t */\n\tpublic find<V2 extends V>(fn: (value: V, key: K, collection: this) => value is V2): V2 | undefined;\n\tpublic find(fn: (value: V, key: K, collection: this) => unknown): V | undefined;\n\tpublic find<This, V2 extends V>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => value is V2,\n\t\tthisArg: This,\n\t): V2 | undefined;\n\tpublic find<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): V | undefined;\n\tpublic find(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): V | undefined {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) return val;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Searches for the key of a single item where the given function returns a truthy value. This behaves like\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex | Array.findIndex()},\n\t * but returns the key rather than the positional index.\n\t *\n\t * @param fn - The function to test with (should return boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.findKey(user => user.username === 'Bob');\n\t * ```\n\t */\n\tpublic findKey<K2 extends K>(fn: (value: V, key: K, collection: this) => key is K2): K2 | undefined;\n\tpublic findKey(fn: (value: V, key: K, collection: this) => unknown): K | undefined;\n\tpublic findKey<This, K2 extends K>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => key is K2,\n\t\tthisArg: This,\n\t): K2 | undefined;\n\tpublic findKey<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): K | undefined;\n\tpublic findKey(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): K | undefined {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) return key;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Removes items that satisfy the provided filter function.\n\t *\n\t * @param fn - Function used to test (should return a boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @returns The number of removed entries\n\t */\n\tpublic sweep(fn: (value: V, key: K, collection: this) => unknown): number;\n\tpublic sweep<T>(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): number;\n\tpublic sweep(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): number {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst previousSize = this.size;\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) this.delete(key);\n\t\t}\n\n\t\treturn previousSize - this.size;\n\t}\n\n\t/**\n\t * Identical to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter | Array.filter()},\n\t * but returns a Collection instead of an Array.\n\t *\n\t * @param fn - The function to test with (should return boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.filter(user => user.username === 'Bob');\n\t * ```\n\t */\n\tpublic filter<K2 extends K>(fn: (value: V, key: K, collection: this) => key is K2): Collection<K2, V>;\n\tpublic filter<V2 extends V>(fn: (value: V, key: K, collection: this) => value is V2): Collection<K, V2>;\n\tpublic filter(fn: (value: V, key: K, collection: this) => unknown): Collection<K, V>;\n\tpublic filter<This, K2 extends K>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => key is K2,\n\t\tthisArg: This,\n\t): Collection<K2, V>;\n\tpublic filter<This, V2 extends V>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => value is V2,\n\t\tthisArg: This,\n\t): Collection<K, V2>;\n\tpublic filter<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): Collection<K, V>;\n\tpublic filter(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): Collection<K, V> {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst results = new this.constructor[Symbol.species]<K, V>();\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) results.set(key, val);\n\t\t}\n\n\t\treturn results;\n\t}\n\n\t/**\n\t * Partitions the collection into two collections where the first collection\n\t * contains the items that passed and the second contains the items that failed.\n\t *\n\t * @param fn - Function used to test (should return a boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * const [big, small] = collection.partition(guild => guild.memberCount > 250);\n\t * ```\n\t */\n\tpublic partition<K2 extends K>(\n\t\tfn: (value: V, key: K, collection: this) => key is K2,\n\t): [Collection<K2, V>, Collection<Exclude<K, K2>, V>];\n\tpublic partition<V2 extends V>(\n\t\tfn: (value: V, key: K, collection: this) => value is V2,\n\t): [Collection<K, V2>, Collection<K, Exclude<V, V2>>];\n\tpublic partition(fn: (value: V, key: K, collection: this) => unknown): [Collection<K, V>, Collection<K, V>];\n\tpublic partition<This, K2 extends K>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => key is K2,\n\t\tthisArg: This,\n\t): [Collection<K2, V>, Collection<Exclude<K, K2>, V>];\n\tpublic partition<This, V2 extends V>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => value is V2,\n\t\tthisArg: This,\n\t): [Collection<K, V2>, Collection<K, Exclude<V, V2>>];\n\tpublic partition<This>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => unknown,\n\t\tthisArg: This,\n\t): [Collection<K, V>, Collection<K, V>];\n\tpublic partition(\n\t\tfn: (value: V, key: K, collection: this) => unknown,\n\t\tthisArg?: unknown,\n\t): [Collection<K, V>, Collection<K, V>] {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst results: [Collection<K, V>, Collection<K, V>] = [\n\t\t\tnew this.constructor[Symbol.species]<K, V>(),\n\t\t\tnew this.constructor[Symbol.species]<K, V>(),\n\t\t];\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) {\n\t\t\t\tresults[0].set(key, val);\n\t\t\t} else {\n\t\t\t\tresults[1].set(key, val);\n\t\t\t}\n\t\t}\n\n\t\treturn results;\n\t}\n\n\t/**\n\t * Maps each item into a Collection, then joins the results into a single Collection. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap | Array.flatMap()}.\n\t *\n\t * @param fn - Function that produces a new Collection\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.flatMap(guild => guild.members.cache);\n\t * ```\n\t */\n\tpublic flatMap<T>(fn: (value: V, key: K, collection: this) => Collection<K, T>): Collection<K, T>;\n\tpublic flatMap<T, This>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => Collection<K, T>,\n\t\tthisArg: This,\n\t): Collection<K, T>;\n\tpublic flatMap<T>(fn: (value: V, key: K, collection: this) => Collection<K, T>, thisArg?: unknown): Collection<K, T> {\n\t\t// eslint-disable-next-line unicorn/no-array-method-this-argument\n\t\tconst collections = this.map(fn, thisArg);\n\t\treturn new this.constructor[Symbol.species]<K, T>().concat(...collections);\n\t}\n\n\t/**\n\t * Maps each item to another value into an array. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}.\n\t *\n\t * @param fn - Function that produces an element of the new array, taking three arguments\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.map(user => user.tag);\n\t * ```\n\t */\n\tpublic map<T>(fn: (value: V, key: K, collection: this) => T): T[];\n\tpublic map<This, T>(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): T[];\n\tpublic map<T>(fn: (value: V, key: K, collection: this) => T, thisArg?: unknown): T[] {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst iter = this.entries();\n\t\treturn Array.from({ length: this.size }, (): T => {\n\t\t\tconst [key, value] = iter.next().value;\n\t\t\treturn fn(value, key, this);\n\t\t});\n\t}\n\n\t/**\n\t * Maps each item to another value into a collection. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}.\n\t *\n\t * @param fn - Function that produces an element of the new collection, taking three arguments\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.mapValues(user => user.tag);\n\t * ```\n\t */\n\tpublic mapValues<T>(fn: (value: V, key: K, collection: this) => T): Collection<K, T>;\n\tpublic mapValues<This, T>(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): Collection<K, T>;\n\tpublic mapValues<T>(fn: (value: V, key: K, collection: this) => T, thisArg?: unknown): Collection<K, T> {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst coll = new this.constructor[Symbol.species]<K, T>();\n\t\tfor (const [key, val] of this) coll.set(key, fn(val, key, this));\n\t\treturn coll;\n\t}\n\n\t/**\n\t * Checks if there exists an item that passes a test. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some | Array.some()}.\n\t *\n\t * @param fn - Function used to test (should return a boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.some(user => user.discriminator === '0000');\n\t * ```\n\t */\n\tpublic some(fn: (value: V, key: K, collection: this) => unknown): boolean;\n\tpublic some<T>(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): boolean;\n\tpublic some(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): boolean {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) return true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Checks if all items passes a test. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every | Array.every()}.\n\t *\n\t * @param fn - Function used to test (should return a boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.every(user => !user.bot);\n\t * ```\n\t */\n\tpublic every<K2 extends K>(fn: (value: V, key: K, collection: this) => key is K2): this is Collection<K2, V>;\n\tpublic every<V2 extends V>(fn: (value: V, key: K, collection: this) => value is V2): this is Collection<K, V2>;\n\tpublic every(fn: (value: V, key: K, collection: this) => unknown): boolean;\n\tpublic every<This, K2 extends K>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => key is K2,\n\t\tthisArg: This,\n\t): this is Collection<K2, V>;\n\tpublic every<This, V2 extends V>(\n\t\tfn: (this: This, value: V, key: K, collection: this) => value is V2,\n\t\tthisArg: This,\n\t): this is Collection<K, V2>;\n\tpublic every<This>(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): boolean;\n\tpublic every(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): boolean {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfor (const [key, val] of this) {\n\t\t\tif (!fn(val, key, this)) return false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Applies a function to produce a single value. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce | Array.reduce()}.\n\t *\n\t * @param fn - Function used to reduce, taking four arguments; `accumulator`, `currentValue`, `currentKey`,\n\t * and `collection`\n\t * @param initialValue - Starting value for the accumulator\n\t * @example\n\t * ```ts\n\t * collection.reduce((acc, guild) => acc + guild.memberCount, 0);\n\t * ```\n\t */\n\tpublic reduce<T = V>(fn: (accumulator: T, value: V, key: K, collection: this) => T, initialValue?: T): T {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tlet accumulator!: T;\n\n\t\tconst iterator = this.entries();\n\t\tif (initialValue === undefined) {\n\t\t\tif (this.size === 0) throw new TypeError('Reduce of empty collection with no initial value');\n\t\t\taccumulator = iterator.next().value[1];\n\t\t} else {\n\t\t\taccumulator = initialValue;\n\t\t}\n\n\t\tfor (const [key, value] of iterator) {\n\t\t\taccumulator = fn(accumulator, value, key, this);\n\t\t}\n\n\t\treturn accumulator;\n\t}\n\n\t/**\n\t * Identical to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach | Map.forEach()},\n\t * but returns the collection instead of undefined.\n\t *\n\t * @param fn - Function to execute for each element\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection\n\t * .each(user => console.log(user.username))\n\t * .filter(user => user.bot)\n\t * .each(user => console.log(user.username));\n\t * ```\n\t */\n\tpublic each(fn: (value: V, key: K, collection: this) => void): this;\n\tpublic each<T>(fn: (this: T, value: V, key: K, collection: this) => void, thisArg: T): this;\n\tpublic each(fn: (value: V, key: K, collection: this) => void, thisArg?: unknown): this {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\n\t\tfor (const [key, value] of this) {\n\t\t\tfn(value, key, this);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Runs a function on the collection and returns the collection.\n\t *\n\t * @param fn - Function to execute\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection\n\t * .tap(coll => console.log(coll.size))\n\t * .filter(user => user.bot)\n\t * .tap(coll => console.log(coll.size))\n\t * ```\n\t */\n\tpublic tap(fn: (collection: this) => void): this;\n\tpublic tap<T>(fn: (this: T, collection: this) => void, thisArg: T): this;\n\tpublic tap(fn: (collection: this) => void, thisArg?: unknown): this {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfn(this);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Creates an identical shallow copy of this collection.\n\t *\n\t * @example\n\t * ```ts\n\t * const newColl = someColl.clone();\n\t * ```\n\t */\n\tpublic clone(): Collection<K, V> {\n\t\treturn new this.constructor[Symbol.species](this);\n\t}\n\n\t/**\n\t * Combines this collection with others into a new collection. None of the source collections are modified.\n\t *\n\t * @param collections - Collections to merge\n\t * @example\n\t * ```ts\n\t * const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);\n\t * ```\n\t */\n\tpublic concat(...collections: ReadonlyCollection<K, V>[]) {\n\t\tconst newColl = this.clone();\n\t\tfor (const coll of collections) {\n\t\t\tfor (const [key, val] of coll) newColl.set(key, val);\n\t\t}\n\n\t\treturn newColl;\n\t}\n\n\t/**\n\t * Checks if this collection shares identical items with another.\n\t * This is different to checking for equality using equal-signs, because\n\t * the collections may be different objects, but contain the same data.\n\t *\n\t * @param collection - Collection to compare with\n\t * @returns Whether the collections have identical contents\n\t */\n\tpublic equals(collection: ReadonlyCollection<K, V>) {\n\t\tif (!collection) return false; // runtime check\n\t\tif (this === collection) return true;\n\t\tif (this.size !== collection.size) return false;\n\t\tfor (const [key, value] of this) {\n\t\t\tif (!collection.has(key) || value !== collection.get(key)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * The sort method sorts the items of a collection in place and returns it.\n\t * The sort is not necessarily stable in Node 10 or older.\n\t * The default sort order is according to string Unicode code points.\n\t *\n\t * @param compareFunction - Specifies a function that defines the sort order.\n\t * If omitted, the collection is sorted according to each character's Unicode code point value, according to the string conversion of each element.\n\t * @example\n\t * ```ts\n\t * collection.sort((userA, userB) => userA.createdTimestamp - userB.createdTimestamp);\n\t * ```\n\t */\n\tpublic sort(compareFunction: Comparator<K, V> = Collection.defaultSort) {\n\t\tconst entries = [...this.entries()];\n\t\tentries.sort((a, b): number => compareFunction(a[1], b[1], a[0], b[0]));\n\n\t\t// Perform clean-up\n\t\tsuper.clear();\n\n\t\t// Set the new entries\n\t\tfor (const [key, value] of entries) {\n\t\t\tsuper.set(key, value);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * The intersect method returns a new structure containing items where the keys and values are present in both original structures.\n\t *\n\t * @param other - The other Collection to filter against\n\t */\n\tpublic intersect<T>(other: ReadonlyCollection<K, T>): Collection<K, T> {\n\t\tconst coll = new this.constructor[Symbol.species]<K, T>();\n\t\tfor (const [key, value] of other) {\n\t\t\tif (this.has(key) && Object.is(value, this.get(key))) {\n\t\t\t\tcoll.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\treturn coll;\n\t}\n\n\t/**\n\t * The subtract method returns a new structure containing items where the keys and values of the original structure are not present in the other.\n\t *\n\t * @param other - The other Collection to filter against\n\t */\n\tpublic subtract<T>(other: ReadonlyCollection<K, T>): Collection<K, V> {\n\t\tconst coll = new this.constructor[Symbol.species]<K, V>();\n\t\tfor (const [key, value] of this) {\n\t\t\tif (!other.has(key) || !Object.is(value, other.get(key))) {\n\t\t\t\tcoll.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\treturn coll;\n\t}\n\n\t/**\n\t * The difference method returns a new structure containing items where the key is present in one of the original structures but not the other.\n\t *\n\t * @param other - The other Collection to filter against\n\t */\n\tpublic difference<T>(other: ReadonlyCollection<K, T>): Collection<K, T | V> {\n\t\tconst coll = new this.constructor[Symbol.species]<K, T | V>();\n\t\tfor (const [key, value] of other) {\n\t\t\tif (!this.has(key)) coll.set(key, value);\n\t\t}\n\n\t\tfor (const [key, value] of this) {\n\t\t\tif (!other.has(key)) coll.set(key, value);\n\t\t}\n\n\t\treturn coll;\n\t}\n\n\t/**\n\t * Merges two Collections together into a new Collection.\n\t *\n\t * @param other - The other Collection to merge with\n\t * @param whenInSelf - Function getting the result if the entry only exists in this Collection\n\t * @param whenInOther - Function getting the result if the entry only exists in the other Collection\n\t * @param whenInBoth - Function getting the result if the entry exists in both Collections\n\t * @example\n\t * ```ts\n\t * // Sums up the entries in two collections.\n\t * coll.merge(\n\t * other,\n\t * x => ({ keep: true, value: x }),\n\t * y => ({ keep: true, value: y }),\n\t * (x, y) => ({ keep: true, value: x + y }),\n\t * );\n\t * ```\n\t * @example\n\t * ```ts\n\t * // Intersects two collections in a left-biased manner.\n\t * coll.merge(\n\t * other,\n\t * x => ({ keep: false }),\n\t * y => ({ keep: false }),\n\t * (x, _) => ({ keep: true, value: x }),\n\t * );\n\t * ```\n\t */\n\tpublic merge<T, R>(\n\t\tother: ReadonlyCollection<K, T>,\n\t\twhenInSelf: (value: V, key: K) => Keep<R>,\n\t\twhenInOther: (valueOther: T, key: K) => Keep<R>,\n\t\twhenInBoth: (value: V, valueOther: T, key: K) => Keep<R>,\n\t): Collection<K, R> {\n\t\tconst coll = new this.constructor[Symbol.species]<K, R>();\n\t\tconst keys = new Set([...this.keys(), ...other.keys()]);\n\n\t\tfor (const key of keys) {\n\t\t\tconst hasInSelf = this.has(key);\n\t\t\tconst hasInOther = other.has(key);\n\n\t\t\tif (hasInSelf && hasInOther) {\n\t\t\t\tconst result = whenInBoth(this.get(key)!, other.get(key)!, key);\n\t\t\t\tif (result.keep) coll.set(key, result.value);\n\t\t\t} else if (hasInSelf) {\n\t\t\t\tconst result = whenInSelf(this.get(key)!, key);\n\t\t\t\tif (result.keep) coll.set(key, result.value);\n\t\t\t} else if (hasInOther) {\n\t\t\t\tconst result = whenInOther(other.get(key)!, key);\n\t\t\t\tif (result.keep) coll.set(key, result.value);\n\t\t\t}\n\t\t}\n\n\t\treturn coll;\n\t}\n\n\t/**\n\t * The sorted method sorts the items of a collection and returns it.\n\t * The sort is not necessarily stable in Node 10 or older.\n\t * The default sort order is according to string Unicode code points.\n\t *\n\t * @param compareFunction - Specifies a function that defines the sort order.\n\t * If omitted, the collection is sorted according to each character's Unicode code point value,\n\t * according to the string conversion of each element.\n\t * @example\n\t * ```ts\n\t * collection.sorted((userA, userB) => userA.createdTimestamp - userB.createdTimestamp);\n\t * ```\n\t */\n\tpublic sorted(compareFunction: Comparator<K, V> = Collection.defaultSort) {\n\t\treturn new this.constructor[Symbol.species](this).sort((av, bv, ak, bk) => compareFunction(av, bv, ak, bk));\n\t}\n\n\tpublic toJSON() {\n\t\t// toJSON is called recursively by JSON.stringify.\n\t\treturn [...this.values()];\n\t}\n\n\tprivate static defaultSort<V>(firstValue: V, secondValue: V): number {\n\t\treturn Number(firstValue > secondValue) || Number(firstValue === secondValue) - 1;\n\t}\n\n\t/**\n\t * Creates a Collection from a list of entries.\n\t *\n\t * @param entries - The list of entries\n\t * @param combine - Function to combine an existing entry with a new one\n\t * @example\n\t * ```ts\n\t * Collection.combineEntries([[\"a\", 1], [\"b\", 2], [\"a\", 2]], (x, y) => x + y);\n\t * // returns Collection { \"a\" => 3, \"b\" => 2 }\n\t * ```\n\t */\n\tpublic static combineEntries<K, V>(\n\t\tentries: Iterable<[K, V]>,\n\t\tcombine: (firstValue: V, secondValue: V, key: K) => V,\n\t): Collection<K, V> {\n\t\tconst coll = new Collection<K, V>();\n\t\tfor (const [key, value] of entries) {\n\t\t\tif (coll.has(key)) {\n\t\t\t\tcoll.set(key, combine(coll.get(key)!, value, key));\n\t\t\t} else {\n\t\t\t\tcoll.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\treturn coll;\n\t}\n}\n\n/**\n * @internal\n */\nexport type Keep<V> = { keep: false } | { keep: true; value: V };\n\n/**\n * @internal\n */\nexport type Comparator<K, V> = (firstValue: V, secondValue: V, firstKey: K, secondKey: K) => number;\n","export * from './collection.js';\n\n/**\n * The {@link https://github.com/discordjs/discord.js/blob/main/packages/collection/#readme | @discordjs/collection} version\n * that you are currently using.\n */\n// This needs to explicitly be `string` so it is not typed as a \"const string\" that gets injected by esbuild\nexport const version = '1.5.3' as string;\n"],"mappings":";;;;AAqCO,IAAM,aAAN,MAAM,oBAAyB,IAAU;AAAA,EArChD,OAqCgD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWxC,OAAO,KAAQ,uBAA2D;AAChF,QAAI,KAAK,IAAI,GAAG;AAAG,aAAO,KAAK,IAAI,GAAG;AACtC,QAAI,OAAO,0BAA0B;AAAY,YAAM,IAAI,UAAU,GAAG,qBAAqB,oBAAoB;AACjH,UAAM,eAAe,sBAAsB,KAAK,IAAI;AACpD,SAAK,IAAI,KAAK,YAAY;AAC1B,WAAO;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,UAAU,MAAW;AAC3B,WAAO,KAAK,MAAM,CAAC,QAAQ,MAAM,IAAI,GAAG,CAAC;AAAA,EAC1C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,UAAU,MAAW;AAC3B,WAAO,KAAK,KAAK,CAAC,QAAQ,MAAM,IAAI,GAAG,CAAC;AAAA,EACzC;AAAA,EAUO,MAAM,QAAsC;AAClD,QAAI,WAAW;AAAW,aAAO,KAAK,OAAO,EAAE,KAAK,EAAE;AACtD,QAAI,SAAS;AAAG,aAAO,KAAK,KAAK,SAAS,EAAE;AAC5C,aAAS,KAAK,IAAI,KAAK,MAAM,MAAM;AACnC,UAAM,OAAO,KAAK,OAAO;AACzB,WAAO,MAAM,KAAK,EAAE,QAAQ,OAAO,GAAG,MAAS,KAAK,KAAK,EAAE,KAAK;AAAA,EAC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AAwB;AACpE,WAAO,OAAO,aAAa,WAAW,KAAK,OAAO,eAAe,WAAW,IAAI;AAAA,EACjF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,OAAc,eACb,SACA,SACmB;AACnB,UAAM,OAAO,IAAI,YAAiB;AAClC,eAAW,CAAC,KAAK,KAAK,KAAK,SAAS;AACnC,UAAI,KAAK,IAAI,GAAG,GAAG;AAClB,aAAK,IAAI,KAAK,QAAQ,KAAK,IAAI,GAAG,GAAI,OAAO,GAAG,CAAC;AAAA,MAClD,OAAO;AACN,aAAK,IAAI,KAAK,KAAK;AAAA,MACpB;AAAA,IACD;AAEA,WAAO;AAAA,EACR;AACD;;;AC9yBO,IAAM,UAAU;","names":[]} \ No newline at end of file
diff --git a/node_modules/@discordjs/collection/package.json b/node_modules/@discordjs/collection/package.json
new file mode 100644
index 0000000..81e2418
--- /dev/null
+++ b/node_modules/@discordjs/collection/package.json
@@ -0,0 +1,76 @@
+{
+ "name": "@discordjs/collection",
+ "version": "1.5.3",
+ "description": "Utility data structure used in discord.js",
+ "scripts": {
+ "test": "vitest run",
+ "build": "tsup",
+ "build:docs": "tsc -p tsconfig.docs.json",
+ "lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --format=pretty",
+ "format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty",
+ "fmt": "yarn format",
+ "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json",
+ "prepack": "yarn lint && yarn test && yarn build",
+ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/collection/*'",
+ "release": "cliff-jumper"
+ },
+ "main": "./dist/index.js",
+ "module": "./dist/index.mjs",
+ "types": "./dist/index.d.ts",
+ "exports": {
+ "types": "./dist/index.d.ts",
+ "import": "./dist/index.mjs",
+ "require": "./dist/index.js"
+ },
+ "directories": {
+ "lib": "src",
+ "test": "__tests__"
+ },
+ "files": [
+ "dist"
+ ],
+ "contributors": [
+ "Crawl <icrawltogo@gmail.com>",
+ "Amish Shah <amishshah.2k@gmail.com>",
+ "SpaceEEC <spaceeec@yahoo.com>",
+ "Vlad Frangu <kingdgrizzle@gmail.com>",
+ "Aura Román <kyradiscord@gmail.com>"
+ ],
+ "license": "Apache-2.0",
+ "keywords": [
+ "map",
+ "collection",
+ "utility"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/discordjs/discord.js.git",
+ "directory": "packages/collection"
+ },
+ "bugs": {
+ "url": "https://github.com/discordjs/discord.js/issues"
+ },
+ "homepage": "https://discord.js.org",
+ "devDependencies": {
+ "@favware/cliff-jumper": "^2.1.1",
+ "@microsoft/api-extractor": "^7.36.4",
+ "@types/node": "16.18.40",
+ "@vitest/coverage-v8": "^0.34.2",
+ "cross-env": "^7.0.3",
+ "esbuild-plugin-version-injector": "^1.2.0",
+ "eslint": "^8.47.0",
+ "eslint-config-neon": "^0.1.47",
+ "eslint-formatter-pretty": "^5.0.0",
+ "prettier": "^2.8.8",
+ "tsup": "^7.2.0",
+ "turbo": "^1.10.12",
+ "typescript": "^5.1.6",
+ "vitest": "^0.34.2"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ },
+ "publishConfig": {
+ "access": "public"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@discordjs/formatters/CHANGELOG.md b/node_modules/@discordjs/formatters/CHANGELOG.md
new file mode 100644
index 0000000..93381bb
--- /dev/null
+++ b/node_modules/@discordjs/formatters/CHANGELOG.md
@@ -0,0 +1,55 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+# [@discordjs/formatters@0.3.2](https://github.com/discordjs/discord.js/compare/@discordjs/formatters@0.3.1...@discordjs/formatters@0.3.2) - (2023-08-17)
+
+## Documentation
+
+- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6))
+
+# [@discordjs/formatters@0.3.1](https://github.com/discordjs/discord.js/compare/@discordjs/formatters@0.3.0...@discordjs/formatters@0.3.1) - (2023-05-01)
+
+## Documentation
+
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+- **formatters:** Enhance the documentation (#9364) ([23e0ac5](https://github.com/discordjs/discord.js/commit/23e0ac56f456c39d925e2644ec3ca209d4410a99))
+
+# [@discordjs/formatters@0.3.1](https://github.com/discordjs/discord.js/compare/@discordjs/formatters@0.3.0...@discordjs/formatters@0.3.1) - (2023-05-01)
+
+## Documentation
+
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+- **formatters:** Enhance the documentation (#9364) ([23e0ac5](https://github.com/discordjs/discord.js/commit/23e0ac56f456c39d925e2644ec3ca209d4410a99))
+
+# [@discordjs/formatters@0.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/formatters@0.2.0...@discordjs/formatters@0.3.0) - (2023-04-01)
+
+## Bug Fixes
+
+- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b))
+
+## Features
+
+- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b))
+
+# [@discordjs/formatters@0.2.0](https://github.com/discordjs/discord.js/compare/@discordjs/formatters@0.1.0...@discordjs/formatters@0.2.0) - (2023-03-12)
+
+## Features
+
+- **website:** Add support for source file links (#9048) ([f6506e9](https://github.com/discordjs/discord.js/commit/f6506e99c496683ee0ab67db0726b105b929af38))
+
+## Refactor
+
+- Compare with `undefined` directly (#9191) ([869153c](https://github.com/discordjs/discord.js/commit/869153c3fdf155783e7c0ecebd3627b087c3a026))
+- Moved the escapeX functions from discord.js to @discord.js/formatters (#8957) ([13ce78a](https://github.com/discordjs/discord.js/commit/13ce78af6e3aedc793f53a099a6a615df44311f7))
+
+## Styling
+
+- Run prettier (#9041) ([2798ba1](https://github.com/discordjs/discord.js/commit/2798ba1eb3d734f0cf2eeccd2e16cfba6804873b))
+
+# [@discordjs/formatters@0.1.0](https://github.com/discordjs/discord.js/tree/@discordjs/formatters@0.1.0) - (2022-12-16)
+
+## Features
+
+- Add `@discordjs/formatters` (#8889) ([3fca638](https://github.com/discordjs/discord.js/commit/3fca638a8470dcea2f79ddb9f18526dbc0017c88))
+
diff --git a/node_modules/@discordjs/formatters/LICENSE b/node_modules/@discordjs/formatters/LICENSE
new file mode 100644
index 0000000..e2baac1
--- /dev/null
+++ b/node_modules/@discordjs/formatters/LICENSE
@@ -0,0 +1,191 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright 2021 Noel Buechler
+ Copyright 2021 Vlad Frangu
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/node_modules/@discordjs/formatters/README.md b/node_modules/@discordjs/formatters/README.md
new file mode 100644
index 0000000..b846625
--- /dev/null
+++ b/node_modules/@discordjs/formatters/README.md
@@ -0,0 +1,81 @@
+<div align="center">
+ <br />
+ <p>
+ <a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
+ </p>
+ <br />
+ <p>
+ <a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
+ <a href="https://www.npmjs.com/package/@discordjs/formatters"><img src="https://img.shields.io/npm/v/@discordjs/formatters.svg?maxAge=3600" alt="npm version" /></a>
+ <a href="https://www.npmjs.com/package/@discordjs/formatters"><img src="https://img.shields.io/npm/dt/@discordjs/formatters.svg?maxAge=3600" alt="npm downloads" /></a>
+ <a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Build status" /></a>
+ <a href="https://codecov.io/gh/discordjs/discord.js" ><img src="https://codecov.io/gh/discordjs/discord.js/branch/main/graph/badge.svg?precision=2&flag=formatters" alt="Code coverage" /></a>
+ </p>
+ <p>
+ <a href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-vercel.svg" alt="Vercel" /></a>
+ <a href="https://www.cloudflare.com"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-workers.png" alt="Cloudflare Workers" height="44" /></a>
+ </p>
+</div>
+
+## About
+
+`@discordjs/formatters` is a collection of functions for formatting strings to be used on Discord.
+
+## Installation
+
+**Node.js 16.11.0 or newer is required.**
+
+```sh
+npm install @discordjs/formatters
+yarn add @discordjs/formatters
+pnpm add @discordjs/formatters
+```
+
+## Example usage
+
+````ts
+import { codeBlock } from '@discordjs/formatters';
+
+const formattedCode = codeBlock('hello world!');
+console.log(formattedCode);
+
+// Prints:
+// ```
+// hello world!
+// ```
+````
+
+## Links
+
+- [Website][website] ([source][website-source])
+- [Documentation][documentation]
+- [Guide][guide] ([source][guide-source])
+ Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library.
+- [discord.js Discord server][discord]
+- [Discord API Discord server][discord-api]
+- [GitHub][source]
+- [npm][npm]
+- [Related libraries][related-libs]
+
+## Contributing
+
+Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
+[documentation][documentation].
+See [the contribution guide][contributing] if you'd like to submit a PR.
+
+## Help
+
+If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord].
+
+[website]: https://discord.js.org
+[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
+[documentation]: https://discord.js.org/docs/packages/formatters/stable
+[guide]: https://discordjs.guide/
+[guide-source]: https://github.com/discordjs/guide
+[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
+[discord]: https://discord.gg/djs
+[discord-api]: https://discord.gg/discord-api
+[source]: https://github.com/discordjs/discord.js/tree/main/packages/formatters
+[npm]: https://www.npmjs.com/package/@discordjs/formatters
+[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries
+[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md
diff --git a/node_modules/@discordjs/formatters/dist/index.d.mts b/node_modules/@discordjs/formatters/dist/index.d.mts
new file mode 100644
index 0000000..383d71a
--- /dev/null
+++ b/node_modules/@discordjs/formatters/dist/index.d.mts
@@ -0,0 +1,511 @@
+import { URL } from 'node:url';
+import { Snowflake } from 'discord-api-types/globals';
+
+/**
+ * The options that affect what will be escaped.
+ */
+interface EscapeMarkdownOptions {
+ /**
+ * Whether to escape bold text.
+ *
+ * @defaultValue `true`
+ */
+ bold?: boolean;
+ /**
+ * Whether to escape bulleted lists.
+ *
+ * @defaultValue `false`
+ */
+ bulletedList?: boolean;
+ /**
+ * Whether to escape code blocks.
+ *
+ * @defaultValue `true`
+ */
+ codeBlock?: boolean;
+ /**
+ * Whether to escape text inside code blocks.
+ *
+ * @defaultValue `true`
+ */
+ codeBlockContent?: boolean;
+ /**
+ * Whether to escape `\`.
+ *
+ * @defaultValue `true`
+ */
+ escape?: boolean;
+ /**
+ * Whether to escape headings.
+ *
+ * @defaultValue `false`
+ */
+ heading?: boolean;
+ /**
+ * Whether to escape inline code.
+ *
+ * @defaultValue `true`
+ */
+ inlineCode?: boolean;
+ /**
+ * Whether to escape text inside inline code.
+ *
+ * @defaultValue `true`
+ */
+ inlineCodeContent?: boolean;
+ /**
+ * Whether to escape italics.
+ *
+ * @defaultValue `true`
+ */
+ italic?: boolean;
+ /**
+ * Whether to escape masked links.
+ *
+ * @defaultValue `false`
+ */
+ maskedLink?: boolean;
+ /**
+ * Whether to escape numbered lists.
+ *
+ * @defaultValue `false`
+ */
+ numberedList?: boolean;
+ /**
+ * Whether to escape spoilers.
+ *
+ * @defaultValue `true`
+ */
+ spoiler?: boolean;
+ /**
+ * Whether to escape strikethroughs.
+ *
+ * @defaultValue `true`
+ */
+ strikethrough?: boolean;
+ /**
+ * Whether to escape underlines.
+ *
+ * @defaultValue `true`
+ */
+ underline?: boolean;
+}
+/**
+ * Escapes any Discord-flavored markdown in a string.
+ *
+ * @param text - Content to escape
+ * @param options - Options for escaping the markdown
+ */
+declare function escapeMarkdown(text: string, options?: EscapeMarkdownOptions): string;
+/**
+ * Escapes code block markdown in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeCodeBlock(text: string): string;
+/**
+ * Escapes inline code markdown in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeInlineCode(text: string): string;
+/**
+ * Escapes italic markdown in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeItalic(text: string): string;
+/**
+ * Escapes bold markdown in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeBold(text: string): string;
+/**
+ * Escapes underline markdown in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeUnderline(text: string): string;
+/**
+ * Escapes strikethrough markdown in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeStrikethrough(text: string): string;
+/**
+ * Escapes spoiler markdown in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeSpoiler(text: string): string;
+/**
+ * Escapes escape characters in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeEscape(text: string): string;
+/**
+ * Escapes heading characters in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeHeading(text: string): string;
+/**
+ * Escapes bulleted list characters in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeBulletedList(text: string): string;
+/**
+ * Escapes numbered list characters in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeNumberedList(text: string): string;
+/**
+ * Escapes masked link characters in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeMaskedLink(text: string): string;
+
+/**
+ * Wraps the content inside a code block with no language.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function codeBlock<C extends string>(content: C): `\`\`\`\n${C}\n\`\`\``;
+/**
+ * Wraps the content inside a code block with the specified language.
+ *
+ * @typeParam L - This is inferred by the supplied language
+ * @typeParam C - This is inferred by the supplied content
+ * @param language - The language for the code block
+ * @param content - The content to wrap
+ */
+declare function codeBlock<L extends string, C extends string>(language: L, content: C): `\`\`\`${L}\n${C}\n\`\`\``;
+/**
+ * Wraps the content inside \`backticks\` which formats it as inline code.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function inlineCode<C extends string>(content: C): `\`${C}\``;
+/**
+ * Formats the content into italic text.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function italic<C extends string>(content: C): `_${C}_`;
+/**
+ * Formats the content into bold text.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function bold<C extends string>(content: C): `**${C}**`;
+/**
+ * Formats the content into underscored text.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function underscore<C extends string>(content: C): `__${C}__`;
+/**
+ * Formats the content into strike-through text.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function strikethrough<C extends string>(content: C): `~~${C}~~`;
+/**
+ * Formats the content into a quote.
+ *
+ * @remarks This needs to be at the start of the line for Discord to format it.
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function quote<C extends string>(content: C): `> ${C}`;
+/**
+ * Formats the content into a block quote.
+ *
+ * @remarks This needs to be at the start of the line for Discord to format it.
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function blockQuote<C extends string>(content: C): `>>> ${C}`;
+/**
+ * Wraps the URL into `<>` which stops it from embedding.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param url - The URL to wrap
+ */
+declare function hideLinkEmbed<C extends string>(url: C): `<${C}>`;
+/**
+ * Wraps the URL into `<>` which stops it from embedding.
+ *
+ * @param url - The URL to wrap
+ */
+declare function hideLinkEmbed(url: URL): `<${string}>`;
+/**
+ * Formats the content and the URL into a masked URL.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to display
+ * @param url - The URL the content links to
+ */
+declare function hyperlink<C extends string>(content: C, url: URL): `[${C}](${string})`;
+/**
+ * Formats the content and the URL into a masked URL.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @typeParam U - This is inferred by the supplied URL
+ * @param content - The content to display
+ * @param url - The URL the content links to
+ */
+declare function hyperlink<C extends string, U extends string>(content: C, url: U): `[${C}](${U})`;
+/**
+ * Formats the content and the URL into a masked URL with a custom tooltip.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @typeParam T - This is inferred by the supplied title
+ * @param content - The content to display
+ * @param url - The URL the content links to
+ * @param title - The title shown when hovering on the masked link
+ */
+declare function hyperlink<C extends string, T extends string>(content: C, url: URL, title: T): `[${C}](${string} "${T}")`;
+/**
+ * Formats the content and the URL into a masked URL with a custom tooltip.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @typeParam U - This is inferred by the supplied URL
+ * @typeParam T - This is inferred by the supplied title
+ * @param content - The content to display
+ * @param url - The URL the content links to
+ * @param title - The title shown when hovering on the masked link
+ */
+declare function hyperlink<C extends string, U extends string, T extends string>(content: C, url: U, title: T): `[${C}](${U} "${T}")`;
+/**
+ * Formats the content into a spoiler.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function spoiler<C extends string>(content: C): `||${C}||`;
+/**
+ * Formats a user id into a user mention.
+ *
+ * @typeParam C - This is inferred by the supplied user id
+ * @param userId - The user id to format
+ */
+declare function userMention<C extends Snowflake>(userId: C): `<@${C}>`;
+/**
+ * Formats a channel id into a channel mention.
+ *
+ * @typeParam C - This is inferred by the supplied channel id
+ * @param channelId - The channel id to format
+ */
+declare function channelMention<C extends Snowflake>(channelId: C): `<#${C}>`;
+/**
+ * Formats a role id into a role mention.
+ *
+ * @typeParam C - This is inferred by the supplied role id
+ * @param roleId - The role id to format
+ */
+declare function roleMention<C extends Snowflake>(roleId: C): `<@&${C}>`;
+/**
+ * Formats an application command name, subcommand group name, subcommand name, and id into an application command mention.
+ *
+ * @typeParam N - This is inferred by the supplied command name
+ * @typeParam G - This is inferred by the supplied subcommand group name
+ * @typeParam S - This is inferred by the supplied subcommand name
+ * @typeParam I - This is inferred by the supplied command id
+ * @param commandName - The application command name to format
+ * @param subcommandGroupName - The subcommand group name to format
+ * @param subcommandName - The subcommand name to format
+ * @param commandId - The application command id to format
+ */
+declare function chatInputApplicationCommandMention<N extends string, G extends string, S extends string, I extends Snowflake>(commandName: N, subcommandGroupName: G, subcommandName: S, commandId: I): `</${N} ${G} ${S}:${I}>`;
+/**
+ * Formats an application command name, subcommand name, and id into an application command mention.
+ *
+ * @typeParam N - This is inferred by the supplied command name
+ * @typeParam S - This is inferred by the supplied subcommand name
+ * @typeParam I - This is inferred by the supplied command id
+ * @param commandName - The application command name to format
+ * @param subcommandName - The subcommand name to format
+ * @param commandId - The application command id to format
+ */
+declare function chatInputApplicationCommandMention<N extends string, S extends string, I extends Snowflake>(commandName: N, subcommandName: S, commandId: I): `</${N} ${S}:${I}>`;
+/**
+ * Formats an application command name and id into an application command mention.
+ *
+ * @typeParam N - This is inferred by the supplied command name
+ * @typeParam I - This is inferred by the supplied command id
+ * @param commandName - The application command name to format
+ * @param commandId - The application command id to format
+ */
+declare function chatInputApplicationCommandMention<N extends string, I extends Snowflake>(commandName: N, commandId: I): `</${N}:${I}>`;
+/**
+ * Formats a non-animated emoji id into a fully qualified emoji identifier.
+ *
+ * @typeParam C - This is inferred by the supplied emoji id
+ * @param emojiId - The emoji id to format
+ */
+declare function formatEmoji<C extends Snowflake>(emojiId: C, animated?: false): `<:_:${C}>`;
+/**
+ * Formats an animated emoji id into a fully qualified emoji identifier.
+ *
+ * @typeParam C - This is inferred by the supplied emoji id
+ * @param emojiId - The emoji id to format
+ * @param animated - Whether the emoji is animated
+ */
+declare function formatEmoji<C extends Snowflake>(emojiId: C, animated?: true): `<a:_:${C}>`;
+/**
+ * Formats an emoji id into a fully qualified emoji identifier.
+ *
+ * @typeParam C - This is inferred by the supplied emoji id
+ * @param emojiId - The emoji id to format
+ * @param animated - Whether the emoji is animated
+ */
+declare function formatEmoji<C extends Snowflake>(emojiId: C, animated?: boolean): `<:_:${C}>` | `<a:_:${C}>`;
+/**
+ * Formats a channel link for a direct message channel.
+ *
+ * @typeParam C - This is inferred by the supplied channel id
+ * @param channelId - The channel's id
+ */
+declare function channelLink<C extends Snowflake>(channelId: C): `https://discord.com/channels/@me/${C}`;
+/**
+ * Formats a channel link for a guild channel.
+ *
+ * @typeParam C - This is inferred by the supplied channel id
+ * @typeParam G - This is inferred by the supplied guild id
+ * @param channelId - The channel's id
+ * @param guildId - The guild's id
+ */
+declare function channelLink<C extends Snowflake, G extends Snowflake>(channelId: C, guildId: G): `https://discord.com/channels/${G}/${C}`;
+/**
+ * Formats a message link for a direct message channel.
+ *
+ * @typeParam C - This is inferred by the supplied channel id
+ * @typeParam M - This is inferred by the supplied message id
+ * @param channelId - The channel's id
+ * @param messageId - The message's id
+ */
+declare function messageLink<C extends Snowflake, M extends Snowflake>(channelId: C, messageId: M): `https://discord.com/channels/@me/${C}/${M}`;
+/**
+ * Formats a message link for a guild channel.
+ *
+ * @typeParam C - This is inferred by the supplied channel id
+ * @typeParam M - This is inferred by the supplied message id
+ * @typeParam G - This is inferred by the supplied guild id
+ * @param channelId - The channel's id
+ * @param messageId - The message's id
+ * @param guildId - The guild's id
+ */
+declare function messageLink<C extends Snowflake, M extends Snowflake, G extends Snowflake>(channelId: C, messageId: M, guildId: G): `https://discord.com/channels/${G}/${C}/${M}`;
+/**
+ * Formats a date into a short date-time string.
+ *
+ * @param date - The date to format. Defaults to the current time
+ */
+declare function time(date?: Date): `<t:${bigint}>`;
+/**
+ * Formats a date given a format style.
+ *
+ * @typeParam S - This is inferred by the supplied {@link TimestampStylesString}
+ * @param date - The date to format
+ * @param style - The style to use
+ */
+declare function time<S extends TimestampStylesString>(date: Date, style: S): `<t:${bigint}:${S}>`;
+/**
+ * Formats the given timestamp into a short date-time string.
+ *
+ * @typeParam C - This is inferred by the supplied timestamp
+ * @param seconds - A Unix timestamp in seconds
+ */
+declare function time<C extends number>(seconds: C): `<t:${C}>`;
+/**
+ * Formats the given timestamp into a short date-time string.
+ *
+ * @typeParam C - This is inferred by the supplied timestamp
+ * @typeParam S - This is inferred by the supplied {@link TimestampStylesString}
+ * @param seconds - A Unix timestamp in seconds
+ * @param style - The style to use
+ */
+declare function time<C extends number, S extends TimestampStylesString>(seconds: C, style: S): `<t:${C}:${S}>`;
+/**
+ * The {@link https://discord.com/developers/docs/reference#message-formatting-timestamp-styles | message formatting timestamp styles}
+ * supported by Discord.
+ */
+declare const TimestampStyles: {
+ /**
+ * Short time format, consisting of hours and minutes.
+ *
+ * @example `16:20`
+ */
+ readonly ShortTime: "t";
+ /**
+ * Long time format, consisting of hours, minutes, and seconds.
+ *
+ * @example `16:20:30`
+ */
+ readonly LongTime: "T";
+ /**
+ * Short date format, consisting of day, month, and year.
+ *
+ * @example `20/04/2021`
+ */
+ readonly ShortDate: "d";
+ /**
+ * Long date format, consisting of day, month, and year.
+ *
+ * @example `20 April 2021`
+ */
+ readonly LongDate: "D";
+ /**
+ * Short date-time format, consisting of short date and short time formats.
+ *
+ * @example `20 April 2021 16:20`
+ */
+ readonly ShortDateTime: "f";
+ /**
+ * Long date-time format, consisting of long date and short time formats.
+ *
+ * @example `Tuesday, 20 April 2021 16:20`
+ */
+ readonly LongDateTime: "F";
+ /**
+ * Relative time format, consisting of a relative duration format.
+ *
+ * @example `2 months ago`
+ */
+ readonly RelativeTime: "R";
+};
+/**
+ * The possible {@link TimestampStyles} values.
+ */
+type TimestampStylesString = (typeof TimestampStyles)[keyof typeof TimestampStyles];
+/**
+ * All the available faces from Discord's native slash commands.
+ */
+declare enum Faces {
+ /**
+ * `¯\_(ツ)_/¯`
+ */
+ Shrug = "\u00AF_(\u30C4)_/\u00AF",
+ /**
+ * `(╯°□°)╯︵ ┻━┻`
+ */
+ Tableflip = "(\u256F\u00B0\u25A1\u00B0)\u256F\uFE35 \u253B\u2501\u253B",
+ /**
+ * `┬─┬ノ( º _ ºノ)`
+ */
+ Unflip = "\u252C\u2500\u252C\u30CE( \u00BA _ \u00BA\u30CE)"
+}
+
+export { EscapeMarkdownOptions, Faces, TimestampStyles, TimestampStylesString, blockQuote, bold, channelLink, channelMention, chatInputApplicationCommandMention, codeBlock, escapeBold, escapeBulletedList, escapeCodeBlock, escapeEscape, escapeHeading, escapeInlineCode, escapeItalic, escapeMarkdown, escapeMaskedLink, escapeNumberedList, escapeSpoiler, escapeStrikethrough, escapeUnderline, formatEmoji, hideLinkEmbed, hyperlink, inlineCode, italic, messageLink, quote, roleMention, spoiler, strikethrough, time, underscore, userMention };
diff --git a/node_modules/@discordjs/formatters/dist/index.d.ts b/node_modules/@discordjs/formatters/dist/index.d.ts
new file mode 100644
index 0000000..383d71a
--- /dev/null
+++ b/node_modules/@discordjs/formatters/dist/index.d.ts
@@ -0,0 +1,511 @@
+import { URL } from 'node:url';
+import { Snowflake } from 'discord-api-types/globals';
+
+/**
+ * The options that affect what will be escaped.
+ */
+interface EscapeMarkdownOptions {
+ /**
+ * Whether to escape bold text.
+ *
+ * @defaultValue `true`
+ */
+ bold?: boolean;
+ /**
+ * Whether to escape bulleted lists.
+ *
+ * @defaultValue `false`
+ */
+ bulletedList?: boolean;
+ /**
+ * Whether to escape code blocks.
+ *
+ * @defaultValue `true`
+ */
+ codeBlock?: boolean;
+ /**
+ * Whether to escape text inside code blocks.
+ *
+ * @defaultValue `true`
+ */
+ codeBlockContent?: boolean;
+ /**
+ * Whether to escape `\`.
+ *
+ * @defaultValue `true`
+ */
+ escape?: boolean;
+ /**
+ * Whether to escape headings.
+ *
+ * @defaultValue `false`
+ */
+ heading?: boolean;
+ /**
+ * Whether to escape inline code.
+ *
+ * @defaultValue `true`
+ */
+ inlineCode?: boolean;
+ /**
+ * Whether to escape text inside inline code.
+ *
+ * @defaultValue `true`
+ */
+ inlineCodeContent?: boolean;
+ /**
+ * Whether to escape italics.
+ *
+ * @defaultValue `true`
+ */
+ italic?: boolean;
+ /**
+ * Whether to escape masked links.
+ *
+ * @defaultValue `false`
+ */
+ maskedLink?: boolean;
+ /**
+ * Whether to escape numbered lists.
+ *
+ * @defaultValue `false`
+ */
+ numberedList?: boolean;
+ /**
+ * Whether to escape spoilers.
+ *
+ * @defaultValue `true`
+ */
+ spoiler?: boolean;
+ /**
+ * Whether to escape strikethroughs.
+ *
+ * @defaultValue `true`
+ */
+ strikethrough?: boolean;
+ /**
+ * Whether to escape underlines.
+ *
+ * @defaultValue `true`
+ */
+ underline?: boolean;
+}
+/**
+ * Escapes any Discord-flavored markdown in a string.
+ *
+ * @param text - Content to escape
+ * @param options - Options for escaping the markdown
+ */
+declare function escapeMarkdown(text: string, options?: EscapeMarkdownOptions): string;
+/**
+ * Escapes code block markdown in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeCodeBlock(text: string): string;
+/**
+ * Escapes inline code markdown in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeInlineCode(text: string): string;
+/**
+ * Escapes italic markdown in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeItalic(text: string): string;
+/**
+ * Escapes bold markdown in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeBold(text: string): string;
+/**
+ * Escapes underline markdown in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeUnderline(text: string): string;
+/**
+ * Escapes strikethrough markdown in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeStrikethrough(text: string): string;
+/**
+ * Escapes spoiler markdown in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeSpoiler(text: string): string;
+/**
+ * Escapes escape characters in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeEscape(text: string): string;
+/**
+ * Escapes heading characters in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeHeading(text: string): string;
+/**
+ * Escapes bulleted list characters in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeBulletedList(text: string): string;
+/**
+ * Escapes numbered list characters in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeNumberedList(text: string): string;
+/**
+ * Escapes masked link characters in a string.
+ *
+ * @param text - Content to escape
+ */
+declare function escapeMaskedLink(text: string): string;
+
+/**
+ * Wraps the content inside a code block with no language.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function codeBlock<C extends string>(content: C): `\`\`\`\n${C}\n\`\`\``;
+/**
+ * Wraps the content inside a code block with the specified language.
+ *
+ * @typeParam L - This is inferred by the supplied language
+ * @typeParam C - This is inferred by the supplied content
+ * @param language - The language for the code block
+ * @param content - The content to wrap
+ */
+declare function codeBlock<L extends string, C extends string>(language: L, content: C): `\`\`\`${L}\n${C}\n\`\`\``;
+/**
+ * Wraps the content inside \`backticks\` which formats it as inline code.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function inlineCode<C extends string>(content: C): `\`${C}\``;
+/**
+ * Formats the content into italic text.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function italic<C extends string>(content: C): `_${C}_`;
+/**
+ * Formats the content into bold text.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function bold<C extends string>(content: C): `**${C}**`;
+/**
+ * Formats the content into underscored text.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function underscore<C extends string>(content: C): `__${C}__`;
+/**
+ * Formats the content into strike-through text.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function strikethrough<C extends string>(content: C): `~~${C}~~`;
+/**
+ * Formats the content into a quote.
+ *
+ * @remarks This needs to be at the start of the line for Discord to format it.
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function quote<C extends string>(content: C): `> ${C}`;
+/**
+ * Formats the content into a block quote.
+ *
+ * @remarks This needs to be at the start of the line for Discord to format it.
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function blockQuote<C extends string>(content: C): `>>> ${C}`;
+/**
+ * Wraps the URL into `<>` which stops it from embedding.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param url - The URL to wrap
+ */
+declare function hideLinkEmbed<C extends string>(url: C): `<${C}>`;
+/**
+ * Wraps the URL into `<>` which stops it from embedding.
+ *
+ * @param url - The URL to wrap
+ */
+declare function hideLinkEmbed(url: URL): `<${string}>`;
+/**
+ * Formats the content and the URL into a masked URL.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to display
+ * @param url - The URL the content links to
+ */
+declare function hyperlink<C extends string>(content: C, url: URL): `[${C}](${string})`;
+/**
+ * Formats the content and the URL into a masked URL.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @typeParam U - This is inferred by the supplied URL
+ * @param content - The content to display
+ * @param url - The URL the content links to
+ */
+declare function hyperlink<C extends string, U extends string>(content: C, url: U): `[${C}](${U})`;
+/**
+ * Formats the content and the URL into a masked URL with a custom tooltip.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @typeParam T - This is inferred by the supplied title
+ * @param content - The content to display
+ * @param url - The URL the content links to
+ * @param title - The title shown when hovering on the masked link
+ */
+declare function hyperlink<C extends string, T extends string>(content: C, url: URL, title: T): `[${C}](${string} "${T}")`;
+/**
+ * Formats the content and the URL into a masked URL with a custom tooltip.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @typeParam U - This is inferred by the supplied URL
+ * @typeParam T - This is inferred by the supplied title
+ * @param content - The content to display
+ * @param url - The URL the content links to
+ * @param title - The title shown when hovering on the masked link
+ */
+declare function hyperlink<C extends string, U extends string, T extends string>(content: C, url: U, title: T): `[${C}](${U} "${T}")`;
+/**
+ * Formats the content into a spoiler.
+ *
+ * @typeParam C - This is inferred by the supplied content
+ * @param content - The content to wrap
+ */
+declare function spoiler<C extends string>(content: C): `||${C}||`;
+/**
+ * Formats a user id into a user mention.
+ *
+ * @typeParam C - This is inferred by the supplied user id
+ * @param userId - The user id to format
+ */
+declare function userMention<C extends Snowflake>(userId: C): `<@${C}>`;
+/**
+ * Formats a channel id into a channel mention.
+ *
+ * @typeParam C - This is inferred by the supplied channel id
+ * @param channelId - The channel id to format
+ */
+declare function channelMention<C extends Snowflake>(channelId: C): `<#${C}>`;
+/**
+ * Formats a role id into a role mention.
+ *
+ * @typeParam C - This is inferred by the supplied role id
+ * @param roleId - The role id to format
+ */
+declare function roleMention<C extends Snowflake>(roleId: C): `<@&${C}>`;
+/**
+ * Formats an application command name, subcommand group name, subcommand name, and id into an application command mention.
+ *
+ * @typeParam N - This is inferred by the supplied command name
+ * @typeParam G - This is inferred by the supplied subcommand group name
+ * @typeParam S - This is inferred by the supplied subcommand name
+ * @typeParam I - This is inferred by the supplied command id
+ * @param commandName - The application command name to format
+ * @param subcommandGroupName - The subcommand group name to format
+ * @param subcommandName - The subcommand name to format
+ * @param commandId - The application command id to format
+ */
+declare function chatInputApplicationCommandMention<N extends string, G extends string, S extends string, I extends Snowflake>(commandName: N, subcommandGroupName: G, subcommandName: S, commandId: I): `</${N} ${G} ${S}:${I}>`;
+/**
+ * Formats an application command name, subcommand name, and id into an application command mention.
+ *
+ * @typeParam N - This is inferred by the supplied command name
+ * @typeParam S - This is inferred by the supplied subcommand name
+ * @typeParam I - This is inferred by the supplied command id
+ * @param commandName - The application command name to format
+ * @param subcommandName - The subcommand name to format
+ * @param commandId - The application command id to format
+ */
+declare function chatInputApplicationCommandMention<N extends string, S extends string, I extends Snowflake>(commandName: N, subcommandName: S, commandId: I): `</${N} ${S}:${I}>`;
+/**
+ * Formats an application command name and id into an application command mention.
+ *
+ * @typeParam N - This is inferred by the supplied command name
+ * @typeParam I - This is inferred by the supplied command id
+ * @param commandName - The application command name to format
+ * @param commandId - The application command id to format
+ */
+declare function chatInputApplicationCommandMention<N extends string, I extends Snowflake>(commandName: N, commandId: I): `</${N}:${I}>`;
+/**
+ * Formats a non-animated emoji id into a fully qualified emoji identifier.
+ *
+ * @typeParam C - This is inferred by the supplied emoji id
+ * @param emojiId - The emoji id to format
+ */
+declare function formatEmoji<C extends Snowflake>(emojiId: C, animated?: false): `<:_:${C}>`;
+/**
+ * Formats an animated emoji id into a fully qualified emoji identifier.
+ *
+ * @typeParam C - This is inferred by the supplied emoji id
+ * @param emojiId - The emoji id to format
+ * @param animated - Whether the emoji is animated
+ */
+declare function formatEmoji<C extends Snowflake>(emojiId: C, animated?: true): `<a:_:${C}>`;
+/**
+ * Formats an emoji id into a fully qualified emoji identifier.
+ *
+ * @typeParam C - This is inferred by the supplied emoji id
+ * @param emojiId - The emoji id to format
+ * @param animated - Whether the emoji is animated
+ */
+declare function formatEmoji<C extends Snowflake>(emojiId: C, animated?: boolean): `<:_:${C}>` | `<a:_:${C}>`;
+/**
+ * Formats a channel link for a direct message channel.
+ *
+ * @typeParam C - This is inferred by the supplied channel id
+ * @param channelId - The channel's id
+ */
+declare function channelLink<C extends Snowflake>(channelId: C): `https://discord.com/channels/@me/${C}`;
+/**
+ * Formats a channel link for a guild channel.
+ *
+ * @typeParam C - This is inferred by the supplied channel id
+ * @typeParam G - This is inferred by the supplied guild id
+ * @param channelId - The channel's id
+ * @param guildId - The guild's id
+ */
+declare function channelLink<C extends Snowflake, G extends Snowflake>(channelId: C, guildId: G): `https://discord.com/channels/${G}/${C}`;
+/**
+ * Formats a message link for a direct message channel.
+ *
+ * @typeParam C - This is inferred by the supplied channel id
+ * @typeParam M - This is inferred by the supplied message id
+ * @param channelId - The channel's id
+ * @param messageId - The message's id
+ */
+declare function messageLink<C extends Snowflake, M extends Snowflake>(channelId: C, messageId: M): `https://discord.com/channels/@me/${C}/${M}`;
+/**
+ * Formats a message link for a guild channel.
+ *
+ * @typeParam C - This is inferred by the supplied channel id
+ * @typeParam M - This is inferred by the supplied message id
+ * @typeParam G - This is inferred by the supplied guild id
+ * @param channelId - The channel's id
+ * @param messageId - The message's id
+ * @param guildId - The guild's id
+ */
+declare function messageLink<C extends Snowflake, M extends Snowflake, G extends Snowflake>(channelId: C, messageId: M, guildId: G): `https://discord.com/channels/${G}/${C}/${M}`;
+/**
+ * Formats a date into a short date-time string.
+ *
+ * @param date - The date to format. Defaults to the current time
+ */
+declare function time(date?: Date): `<t:${bigint}>`;
+/**
+ * Formats a date given a format style.
+ *
+ * @typeParam S - This is inferred by the supplied {@link TimestampStylesString}
+ * @param date - The date to format
+ * @param style - The style to use
+ */
+declare function time<S extends TimestampStylesString>(date: Date, style: S): `<t:${bigint}:${S}>`;
+/**
+ * Formats the given timestamp into a short date-time string.
+ *
+ * @typeParam C - This is inferred by the supplied timestamp
+ * @param seconds - A Unix timestamp in seconds
+ */
+declare function time<C extends number>(seconds: C): `<t:${C}>`;
+/**
+ * Formats the given timestamp into a short date-time string.
+ *
+ * @typeParam C - This is inferred by the supplied timestamp
+ * @typeParam S - This is inferred by the supplied {@link TimestampStylesString}
+ * @param seconds - A Unix timestamp in seconds
+ * @param style - The style to use
+ */
+declare function time<C extends number, S extends TimestampStylesString>(seconds: C, style: S): `<t:${C}:${S}>`;
+/**
+ * The {@link https://discord.com/developers/docs/reference#message-formatting-timestamp-styles | message formatting timestamp styles}
+ * supported by Discord.
+ */
+declare const TimestampStyles: {
+ /**
+ * Short time format, consisting of hours and minutes.
+ *
+ * @example `16:20`
+ */
+ readonly ShortTime: "t";
+ /**
+ * Long time format, consisting of hours, minutes, and seconds.
+ *
+ * @example `16:20:30`
+ */
+ readonly LongTime: "T";
+ /**
+ * Short date format, consisting of day, month, and year.
+ *
+ * @example `20/04/2021`
+ */
+ readonly ShortDate: "d";
+ /**
+ * Long date format, consisting of day, month, and year.
+ *
+ * @example `20 April 2021`
+ */
+ readonly LongDate: "D";
+ /**
+ * Short date-time format, consisting of short date and short time formats.
+ *
+ * @example `20 April 2021 16:20`
+ */
+ readonly ShortDateTime: "f";
+ /**
+ * Long date-time format, consisting of long date and short time formats.
+ *
+ * @example `Tuesday, 20 April 2021 16:20`
+ */
+ readonly LongDateTime: "F";
+ /**
+ * Relative time format, consisting of a relative duration format.
+ *
+ * @example `2 months ago`
+ */
+ readonly RelativeTime: "R";
+};
+/**
+ * The possible {@link TimestampStyles} values.
+ */
+type TimestampStylesString = (typeof TimestampStyles)[keyof typeof TimestampStyles];
+/**
+ * All the available faces from Discord's native slash commands.
+ */
+declare enum Faces {
+ /**
+ * `¯\_(ツ)_/¯`
+ */
+ Shrug = "\u00AF_(\u30C4)_/\u00AF",
+ /**
+ * `(╯°□°)╯︵ ┻━┻`
+ */
+ Tableflip = "(\u256F\u00B0\u25A1\u00B0)\u256F\uFE35 \u253B\u2501\u253B",
+ /**
+ * `┬─┬ノ( º _ ºノ)`
+ */
+ Unflip = "\u252C\u2500\u252C\u30CE( \u00BA _ \u00BA\u30CE)"
+}
+
+export { EscapeMarkdownOptions, Faces, TimestampStyles, TimestampStylesString, blockQuote, bold, channelLink, channelMention, chatInputApplicationCommandMention, codeBlock, escapeBold, escapeBulletedList, escapeCodeBlock, escapeEscape, escapeHeading, escapeInlineCode, escapeItalic, escapeMarkdown, escapeMaskedLink, escapeNumberedList, escapeSpoiler, escapeStrikethrough, escapeUnderline, formatEmoji, hideLinkEmbed, hyperlink, inlineCode, italic, messageLink, quote, roleMention, spoiler, strikethrough, time, underscore, userMention };
diff --git a/node_modules/@discordjs/formatters/dist/index.js b/node_modules/@discordjs/formatters/dist/index.js
new file mode 100644
index 0000000..6fd2653
--- /dev/null
+++ b/node_modules/@discordjs/formatters/dist/index.js
@@ -0,0 +1,393 @@
+"use strict";
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/index.ts
+var src_exports = {};
+__export(src_exports, {
+ Faces: () => Faces,
+ TimestampStyles: () => TimestampStyles,
+ blockQuote: () => blockQuote,
+ bold: () => bold,
+ channelLink: () => channelLink,
+ channelMention: () => channelMention,
+ chatInputApplicationCommandMention: () => chatInputApplicationCommandMention,
+ codeBlock: () => codeBlock,
+ escapeBold: () => escapeBold,
+ escapeBulletedList: () => escapeBulletedList,
+ escapeCodeBlock: () => escapeCodeBlock,
+ escapeEscape: () => escapeEscape,
+ escapeHeading: () => escapeHeading,
+ escapeInlineCode: () => escapeInlineCode,
+ escapeItalic: () => escapeItalic,
+ escapeMarkdown: () => escapeMarkdown,
+ escapeMaskedLink: () => escapeMaskedLink,
+ escapeNumberedList: () => escapeNumberedList,
+ escapeSpoiler: () => escapeSpoiler,
+ escapeStrikethrough: () => escapeStrikethrough,
+ escapeUnderline: () => escapeUnderline,
+ formatEmoji: () => formatEmoji,
+ hideLinkEmbed: () => hideLinkEmbed,
+ hyperlink: () => hyperlink,
+ inlineCode: () => inlineCode,
+ italic: () => italic,
+ messageLink: () => messageLink,
+ quote: () => quote,
+ roleMention: () => roleMention,
+ spoiler: () => spoiler,
+ strikethrough: () => strikethrough,
+ time: () => time,
+ underscore: () => underscore,
+ userMention: () => userMention
+});
+module.exports = __toCommonJS(src_exports);
+
+// src/escapers.ts
+function escapeMarkdown(text, options = {}) {
+ const {
+ codeBlock: codeBlock2 = true,
+ inlineCode: inlineCode2 = true,
+ bold: bold2 = true,
+ italic: italic2 = true,
+ underline = true,
+ strikethrough: strikethrough2 = true,
+ spoiler: spoiler2 = true,
+ codeBlockContent = true,
+ inlineCodeContent = true,
+ escape = true,
+ heading = false,
+ bulletedList = false,
+ numberedList = false,
+ maskedLink = false
+ } = options;
+ if (!codeBlockContent) {
+ return text.split("```").map((subString, index, array) => {
+ if (index % 2 && index !== array.length - 1)
+ return subString;
+ return escapeMarkdown(subString, {
+ inlineCode: inlineCode2,
+ bold: bold2,
+ italic: italic2,
+ underline,
+ strikethrough: strikethrough2,
+ spoiler: spoiler2,
+ inlineCodeContent,
+ escape,
+ heading,
+ bulletedList,
+ numberedList,
+ maskedLink
+ });
+ }).join(codeBlock2 ? "\\`\\`\\`" : "```");
+ }
+ if (!inlineCodeContent) {
+ return text.split(/(?<=^|[^`])`(?=[^`]|$)/g).map((subString, index, array) => {
+ if (index % 2 && index !== array.length - 1)
+ return subString;
+ return escapeMarkdown(subString, {
+ codeBlock: codeBlock2,
+ bold: bold2,
+ italic: italic2,
+ underline,
+ strikethrough: strikethrough2,
+ spoiler: spoiler2,
+ escape,
+ heading,
+ bulletedList,
+ numberedList,
+ maskedLink
+ });
+ }).join(inlineCode2 ? "\\`" : "`");
+ }
+ let res = text;
+ if (escape)
+ res = escapeEscape(res);
+ if (inlineCode2)
+ res = escapeInlineCode(res);
+ if (codeBlock2)
+ res = escapeCodeBlock(res);
+ if (italic2)
+ res = escapeItalic(res);
+ if (bold2)
+ res = escapeBold(res);
+ if (underline)
+ res = escapeUnderline(res);
+ if (strikethrough2)
+ res = escapeStrikethrough(res);
+ if (spoiler2)
+ res = escapeSpoiler(res);
+ if (heading)
+ res = escapeHeading(res);
+ if (bulletedList)
+ res = escapeBulletedList(res);
+ if (numberedList)
+ res = escapeNumberedList(res);
+ if (maskedLink)
+ res = escapeMaskedLink(res);
+ return res;
+}
+__name(escapeMarkdown, "escapeMarkdown");
+function escapeCodeBlock(text) {
+ return text.replaceAll("```", "\\`\\`\\`");
+}
+__name(escapeCodeBlock, "escapeCodeBlock");
+function escapeInlineCode(text) {
+ return text.replaceAll(/(?<=^|[^`])``?(?=[^`]|$)/g, (match) => match.length === 2 ? "\\`\\`" : "\\`");
+}
+__name(escapeInlineCode, "escapeInlineCode");
+function escapeItalic(text) {
+ let idx = 0;
+ const newText = text.replaceAll(/(?<=^|[^*])\*([^*]|\*\*|$)/g, (_, match) => {
+ if (match === "**")
+ return ++idx % 2 ? `\\*${match}` : `${match}\\*`;
+ return `\\*${match}`;
+ });
+ idx = 0;
+ return newText.replaceAll(/(?<=^|[^_])(?<!<a?:.+)_(?!:\d+>)([^_]|__|$)/g, (_, match) => {
+ if (match === "__")
+ return ++idx % 2 ? `\\_${match}` : `${match}\\_`;
+ return `\\_${match}`;
+ });
+}
+__name(escapeItalic, "escapeItalic");
+function escapeBold(text) {
+ let idx = 0;
+ return text.replaceAll(/\*\*(\*)?/g, (_, match) => {
+ if (match)
+ return ++idx % 2 ? `${match}\\*\\*` : `\\*\\*${match}`;
+ return "\\*\\*";
+ });
+}
+__name(escapeBold, "escapeBold");
+function escapeUnderline(text) {
+ let idx = 0;
+ return text.replaceAll(/(?<!<a?:.+)__(_)?(?!:\d+>)/g, (_, match) => {
+ if (match)
+ return ++idx % 2 ? `${match}\\_\\_` : `\\_\\_${match}`;
+ return "\\_\\_";
+ });
+}
+__name(escapeUnderline, "escapeUnderline");
+function escapeStrikethrough(text) {
+ return text.replaceAll("~~", "\\~\\~");
+}
+__name(escapeStrikethrough, "escapeStrikethrough");
+function escapeSpoiler(text) {
+ return text.replaceAll("||", "\\|\\|");
+}
+__name(escapeSpoiler, "escapeSpoiler");
+function escapeEscape(text) {
+ return text.replaceAll("\\", "\\\\");
+}
+__name(escapeEscape, "escapeEscape");
+function escapeHeading(text) {
+ return text.replaceAll(/^( {0,2})([*-] )?( *)(#{1,3} )/gm, "$1$2$3\\$4");
+}
+__name(escapeHeading, "escapeHeading");
+function escapeBulletedList(text) {
+ return text.replaceAll(/^( *)([*-])( +)/gm, "$1\\$2$3");
+}
+__name(escapeBulletedList, "escapeBulletedList");
+function escapeNumberedList(text) {
+ return text.replaceAll(/^( *\d+)\./gm, "$1\\.");
+}
+__name(escapeNumberedList, "escapeNumberedList");
+function escapeMaskedLink(text) {
+ return text.replaceAll(/\[.+]\(.+\)/gm, "\\$&");
+}
+__name(escapeMaskedLink, "escapeMaskedLink");
+
+// src/formatters.ts
+function codeBlock(language, content) {
+ return content === void 0 ? `\`\`\`
+${language}
+\`\`\`` : `\`\`\`${language}
+${content}
+\`\`\``;
+}
+__name(codeBlock, "codeBlock");
+function inlineCode(content) {
+ return `\`${content}\``;
+}
+__name(inlineCode, "inlineCode");
+function italic(content) {
+ return `_${content}_`;
+}
+__name(italic, "italic");
+function bold(content) {
+ return `**${content}**`;
+}
+__name(bold, "bold");
+function underscore(content) {
+ return `__${content}__`;
+}
+__name(underscore, "underscore");
+function strikethrough(content) {
+ return `~~${content}~~`;
+}
+__name(strikethrough, "strikethrough");
+function quote(content) {
+ return `> ${content}`;
+}
+__name(quote, "quote");
+function blockQuote(content) {
+ return `>>> ${content}`;
+}
+__name(blockQuote, "blockQuote");
+function hideLinkEmbed(url) {
+ return `<${url}>`;
+}
+__name(hideLinkEmbed, "hideLinkEmbed");
+function hyperlink(content, url, title) {
+ return title ? `[${content}](${url} "${title}")` : `[${content}](${url})`;
+}
+__name(hyperlink, "hyperlink");
+function spoiler(content) {
+ return `||${content}||`;
+}
+__name(spoiler, "spoiler");
+function userMention(userId) {
+ return `<@${userId}>`;
+}
+__name(userMention, "userMention");
+function channelMention(channelId) {
+ return `<#${channelId}>`;
+}
+__name(channelMention, "channelMention");
+function roleMention(roleId) {
+ return `<@&${roleId}>`;
+}
+__name(roleMention, "roleMention");
+function chatInputApplicationCommandMention(commandName, subcommandGroupName, subcommandName, commandId) {
+ if (commandId !== void 0) {
+ return `</${commandName} ${subcommandGroupName} ${subcommandName}:${commandId}>`;
+ }
+ if (subcommandName !== void 0) {
+ return `</${commandName} ${subcommandGroupName}:${subcommandName}>`;
+ }
+ return `</${commandName}:${subcommandGroupName}>`;
+}
+__name(chatInputApplicationCommandMention, "chatInputApplicationCommandMention");
+function formatEmoji(emojiId, animated = false) {
+ return `<${animated ? "a" : ""}:_:${emojiId}>`;
+}
+__name(formatEmoji, "formatEmoji");
+function channelLink(channelId, guildId) {
+ return `https://discord.com/channels/${guildId ?? "@me"}/${channelId}`;
+}
+__name(channelLink, "channelLink");
+function messageLink(channelId, messageId, guildId) {
+ return `${guildId === void 0 ? channelLink(channelId) : channelLink(channelId, guildId)}/${messageId}`;
+}
+__name(messageLink, "messageLink");
+function time(timeOrSeconds, style) {
+ if (typeof timeOrSeconds !== "number") {
+ timeOrSeconds = Math.floor((timeOrSeconds?.getTime() ?? Date.now()) / 1e3);
+ }
+ return typeof style === "string" ? `<t:${timeOrSeconds}:${style}>` : `<t:${timeOrSeconds}>`;
+}
+__name(time, "time");
+var TimestampStyles = {
+ /**
+ * Short time format, consisting of hours and minutes.
+ *
+ * @example `16:20`
+ */
+ ShortTime: "t",
+ /**
+ * Long time format, consisting of hours, minutes, and seconds.
+ *
+ * @example `16:20:30`
+ */
+ LongTime: "T",
+ /**
+ * Short date format, consisting of day, month, and year.
+ *
+ * @example `20/04/2021`
+ */
+ ShortDate: "d",
+ /**
+ * Long date format, consisting of day, month, and year.
+ *
+ * @example `20 April 2021`
+ */
+ LongDate: "D",
+ /**
+ * Short date-time format, consisting of short date and short time formats.
+ *
+ * @example `20 April 2021 16:20`
+ */
+ ShortDateTime: "f",
+ /**
+ * Long date-time format, consisting of long date and short time formats.
+ *
+ * @example `Tuesday, 20 April 2021 16:20`
+ */
+ LongDateTime: "F",
+ /**
+ * Relative time format, consisting of a relative duration format.
+ *
+ * @example `2 months ago`
+ */
+ RelativeTime: "R"
+};
+var Faces = /* @__PURE__ */ ((Faces2) => {
+ Faces2["Shrug"] = "\xAF_(\u30C4)_/\xAF";
+ Faces2["Tableflip"] = "(\u256F\xB0\u25A1\xB0)\u256F\uFE35 \u253B\u2501\u253B";
+ Faces2["Unflip"] = "\u252C\u2500\u252C\u30CE( \xBA _ \xBA\u30CE)";
+ return Faces2;
+})(Faces || {});
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ Faces,
+ TimestampStyles,
+ blockQuote,
+ bold,
+ channelLink,
+ channelMention,
+ chatInputApplicationCommandMention,
+ codeBlock,
+ escapeBold,
+ escapeBulletedList,
+ escapeCodeBlock,
+ escapeEscape,
+ escapeHeading,
+ escapeInlineCode,
+ escapeItalic,
+ escapeMarkdown,
+ escapeMaskedLink,
+ escapeNumberedList,
+ escapeSpoiler,
+ escapeStrikethrough,
+ escapeUnderline,
+ formatEmoji,
+ hideLinkEmbed,
+ hyperlink,
+ inlineCode,
+ italic,
+ messageLink,
+ quote,
+ roleMention,
+ spoiler,
+ strikethrough,
+ time,
+ underscore,
+ userMention
+});
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/@discordjs/formatters/dist/index.js.map b/node_modules/@discordjs/formatters/dist/index.js.map
new file mode 100644
index 0000000..6b7c19a
--- /dev/null
+++ b/node_modules/@discordjs/formatters/dist/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/index.ts","../src/escapers.ts","../src/formatters.ts"],"sourcesContent":["export * from './escapers.js';\nexport * from './formatters.js';\n","/* eslint-disable prefer-named-capture-group */\n\n/**\n * The options that affect what will be escaped.\n */\nexport interface EscapeMarkdownOptions {\n\t/**\n\t * Whether to escape bold text.\n\t *\n\t * @defaultValue `true`\n\t */\n\tbold?: boolean;\n\n\t/**\n\t * Whether to escape bulleted lists.\n\t *\n\t * @defaultValue `false`\n\t */\n\tbulletedList?: boolean;\n\n\t/**\n\t * Whether to escape code blocks.\n\t *\n\t * @defaultValue `true`\n\t */\n\tcodeBlock?: boolean;\n\n\t/**\n\t * Whether to escape text inside code blocks.\n\t *\n\t * @defaultValue `true`\n\t */\n\tcodeBlockContent?: boolean;\n\n\t/**\n\t * Whether to escape `\\`.\n\t *\n\t * @defaultValue `true`\n\t */\n\tescape?: boolean;\n\n\t/**\n\t * Whether to escape headings.\n\t *\n\t * @defaultValue `false`\n\t */\n\theading?: boolean;\n\n\t/**\n\t * Whether to escape inline code.\n\t *\n\t * @defaultValue `true`\n\t */\n\tinlineCode?: boolean;\n\n\t/**\n\t * Whether to escape text inside inline code.\n\t *\n\t * @defaultValue `true`\n\t */\n\tinlineCodeContent?: boolean;\n\t/**\n\t * Whether to escape italics.\n\t *\n\t * @defaultValue `true`\n\t */\n\titalic?: boolean;\n\n\t/**\n\t * Whether to escape masked links.\n\t *\n\t * @defaultValue `false`\n\t */\n\tmaskedLink?: boolean;\n\n\t/**\n\t * Whether to escape numbered lists.\n\t *\n\t * @defaultValue `false`\n\t */\n\tnumberedList?: boolean;\n\n\t/**\n\t * Whether to escape spoilers.\n\t *\n\t * @defaultValue `true`\n\t */\n\tspoiler?: boolean;\n\n\t/**\n\t * Whether to escape strikethroughs.\n\t *\n\t * @defaultValue `true`\n\t */\n\tstrikethrough?: boolean;\n\n\t/**\n\t * Whether to escape underlines.\n\t *\n\t * @defaultValue `true`\n\t */\n\tunderline?: boolean;\n}\n\n/**\n * Escapes any Discord-flavored markdown in a string.\n *\n * @param text - Content to escape\n * @param options - Options for escaping the markdown\n */\nexport function escapeMarkdown(text: string, options: EscapeMarkdownOptions = {}): string {\n\tconst {\n\t\tcodeBlock = true,\n\t\tinlineCode = true,\n\t\tbold = true,\n\t\titalic = true,\n\t\tunderline = true,\n\t\tstrikethrough = true,\n\t\tspoiler = true,\n\t\tcodeBlockContent = true,\n\t\tinlineCodeContent = true,\n\t\tescape = true,\n\t\theading = false,\n\t\tbulletedList = false,\n\t\tnumberedList = false,\n\t\tmaskedLink = false,\n\t} = options;\n\n\tif (!codeBlockContent) {\n\t\treturn text\n\t\t\t.split('```')\n\t\t\t.map((subString, index, array) => {\n\t\t\t\tif (index % 2 && index !== array.length - 1) return subString;\n\t\t\t\treturn escapeMarkdown(subString, {\n\t\t\t\t\tinlineCode,\n\t\t\t\t\tbold,\n\t\t\t\t\titalic,\n\t\t\t\t\tunderline,\n\t\t\t\t\tstrikethrough,\n\t\t\t\t\tspoiler,\n\t\t\t\t\tinlineCodeContent,\n\t\t\t\t\tescape,\n\t\t\t\t\theading,\n\t\t\t\t\tbulletedList,\n\t\t\t\t\tnumberedList,\n\t\t\t\t\tmaskedLink,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.join(codeBlock ? '\\\\`\\\\`\\\\`' : '```');\n\t}\n\n\tif (!inlineCodeContent) {\n\t\treturn text\n\t\t\t.split(/(?<=^|[^`])`(?=[^`]|$)/g)\n\t\t\t.map((subString, index, array) => {\n\t\t\t\tif (index % 2 && index !== array.length - 1) return subString;\n\t\t\t\treturn escapeMarkdown(subString, {\n\t\t\t\t\tcodeBlock,\n\t\t\t\t\tbold,\n\t\t\t\t\titalic,\n\t\t\t\t\tunderline,\n\t\t\t\t\tstrikethrough,\n\t\t\t\t\tspoiler,\n\t\t\t\t\tescape,\n\t\t\t\t\theading,\n\t\t\t\t\tbulletedList,\n\t\t\t\t\tnumberedList,\n\t\t\t\t\tmaskedLink,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.join(inlineCode ? '\\\\`' : '`');\n\t}\n\n\tlet res = text;\n\tif (escape) res = escapeEscape(res);\n\tif (inlineCode) res = escapeInlineCode(res);\n\tif (codeBlock) res = escapeCodeBlock(res);\n\tif (italic) res = escapeItalic(res);\n\tif (bold) res = escapeBold(res);\n\tif (underline) res = escapeUnderline(res);\n\tif (strikethrough) res = escapeStrikethrough(res);\n\tif (spoiler) res = escapeSpoiler(res);\n\tif (heading) res = escapeHeading(res);\n\tif (bulletedList) res = escapeBulletedList(res);\n\tif (numberedList) res = escapeNumberedList(res);\n\tif (maskedLink) res = escapeMaskedLink(res);\n\treturn res;\n}\n\n/**\n * Escapes code block markdown in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeCodeBlock(text: string): string {\n\treturn text.replaceAll('```', '\\\\`\\\\`\\\\`');\n}\n\n/**\n * Escapes inline code markdown in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeInlineCode(text: string): string {\n\treturn text.replaceAll(/(?<=^|[^`])``?(?=[^`]|$)/g, (match) => (match.length === 2 ? '\\\\`\\\\`' : '\\\\`'));\n}\n\n/**\n * Escapes italic markdown in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeItalic(text: string): string {\n\tlet idx = 0;\n\tconst newText = text.replaceAll(/(?<=^|[^*])\\*([^*]|\\*\\*|$)/g, (_, match) => {\n\t\tif (match === '**') return ++idx % 2 ? `\\\\*${match}` : `${match}\\\\*`;\n\t\treturn `\\\\*${match}`;\n\t});\n\tidx = 0;\n\treturn newText.replaceAll(/(?<=^|[^_])(?<!<a?:.+)_(?!:\\d+>)([^_]|__|$)/g, (_, match) => {\n\t\tif (match === '__') return ++idx % 2 ? `\\\\_${match}` : `${match}\\\\_`;\n\t\treturn `\\\\_${match}`;\n\t});\n}\n\n/**\n * Escapes bold markdown in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeBold(text: string): string {\n\tlet idx = 0;\n\treturn text.replaceAll(/\\*\\*(\\*)?/g, (_, match) => {\n\t\tif (match) return ++idx % 2 ? `${match}\\\\*\\\\*` : `\\\\*\\\\*${match}`;\n\t\treturn '\\\\*\\\\*';\n\t});\n}\n\n/**\n * Escapes underline markdown in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeUnderline(text: string): string {\n\tlet idx = 0;\n\treturn text.replaceAll(/(?<!<a?:.+)__(_)?(?!:\\d+>)/g, (_, match) => {\n\t\tif (match) return ++idx % 2 ? `${match}\\\\_\\\\_` : `\\\\_\\\\_${match}`;\n\t\treturn '\\\\_\\\\_';\n\t});\n}\n\n/**\n * Escapes strikethrough markdown in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeStrikethrough(text: string): string {\n\treturn text.replaceAll('~~', '\\\\~\\\\~');\n}\n\n/**\n * Escapes spoiler markdown in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeSpoiler(text: string): string {\n\treturn text.replaceAll('||', '\\\\|\\\\|');\n}\n\n/**\n * Escapes escape characters in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeEscape(text: string): string {\n\treturn text.replaceAll('\\\\', '\\\\\\\\');\n}\n\n/**\n * Escapes heading characters in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeHeading(text: string): string {\n\treturn text.replaceAll(/^( {0,2})([*-] )?( *)(#{1,3} )/gm, '$1$2$3\\\\$4');\n}\n\n/**\n * Escapes bulleted list characters in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeBulletedList(text: string): string {\n\treturn text.replaceAll(/^( *)([*-])( +)/gm, '$1\\\\$2$3');\n}\n\n/**\n * Escapes numbered list characters in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeNumberedList(text: string): string {\n\treturn text.replaceAll(/^( *\\d+)\\./gm, '$1\\\\.');\n}\n\n/**\n * Escapes masked link characters in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeMaskedLink(text: string): string {\n\treturn text.replaceAll(/\\[.+]\\(.+\\)/gm, '\\\\$&');\n}\n","import type { URL } from 'node:url';\nimport type { Snowflake } from 'discord-api-types/globals';\n\n/**\n * Wraps the content inside a code block with no language.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function codeBlock<C extends string>(content: C): `\\`\\`\\`\\n${C}\\n\\`\\`\\``;\n\n/**\n * Wraps the content inside a code block with the specified language.\n *\n * @typeParam L - This is inferred by the supplied language\n * @typeParam C - This is inferred by the supplied content\n * @param language - The language for the code block\n * @param content - The content to wrap\n */\nexport function codeBlock<L extends string, C extends string>(language: L, content: C): `\\`\\`\\`${L}\\n${C}\\n\\`\\`\\``;\n\nexport function codeBlock(language: string, content?: string): string {\n\treturn content === undefined ? `\\`\\`\\`\\n${language}\\n\\`\\`\\`` : `\\`\\`\\`${language}\\n${content}\\n\\`\\`\\``;\n}\n\n/**\n * Wraps the content inside \\`backticks\\` which formats it as inline code.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function inlineCode<C extends string>(content: C): `\\`${C}\\`` {\n\treturn `\\`${content}\\``;\n}\n\n/**\n * Formats the content into italic text.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function italic<C extends string>(content: C): `_${C}_` {\n\treturn `_${content}_`;\n}\n\n/**\n * Formats the content into bold text.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function bold<C extends string>(content: C): `**${C}**` {\n\treturn `**${content}**`;\n}\n\n/**\n * Formats the content into underscored text.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function underscore<C extends string>(content: C): `__${C}__` {\n\treturn `__${content}__`;\n}\n\n/**\n * Formats the content into strike-through text.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function strikethrough<C extends string>(content: C): `~~${C}~~` {\n\treturn `~~${content}~~`;\n}\n\n/**\n * Formats the content into a quote.\n *\n * @remarks This needs to be at the start of the line for Discord to format it.\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function quote<C extends string>(content: C): `> ${C}` {\n\treturn `> ${content}`;\n}\n\n/**\n * Formats the content into a block quote.\n *\n * @remarks This needs to be at the start of the line for Discord to format it.\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function blockQuote<C extends string>(content: C): `>>> ${C}` {\n\treturn `>>> ${content}`;\n}\n\n/**\n * Wraps the URL into `<>` which stops it from embedding.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param url - The URL to wrap\n */\nexport function hideLinkEmbed<C extends string>(url: C): `<${C}>`;\n\n/**\n * Wraps the URL into `<>` which stops it from embedding.\n *\n * @param url - The URL to wrap\n */\nexport function hideLinkEmbed(url: URL): `<${string}>`;\n\nexport function hideLinkEmbed(url: URL | string) {\n\treturn `<${url}>`;\n}\n\n/**\n * Formats the content and the URL into a masked URL.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to display\n * @param url - The URL the content links to\n */\nexport function hyperlink<C extends string>(content: C, url: URL): `[${C}](${string})`;\n\n/**\n * Formats the content and the URL into a masked URL.\n *\n * @typeParam C - This is inferred by the supplied content\n * @typeParam U - This is inferred by the supplied URL\n * @param content - The content to display\n * @param url - The URL the content links to\n */\nexport function hyperlink<C extends string, U extends string>(content: C, url: U): `[${C}](${U})`;\n\n/**\n * Formats the content and the URL into a masked URL with a custom tooltip.\n *\n * @typeParam C - This is inferred by the supplied content\n * @typeParam T - This is inferred by the supplied title\n * @param content - The content to display\n * @param url - The URL the content links to\n * @param title - The title shown when hovering on the masked link\n */\nexport function hyperlink<C extends string, T extends string>(\n\tcontent: C,\n\turl: URL,\n\ttitle: T,\n): `[${C}](${string} \"${T}\")`;\n\n/**\n * Formats the content and the URL into a masked URL with a custom tooltip.\n *\n * @typeParam C - This is inferred by the supplied content\n * @typeParam U - This is inferred by the supplied URL\n * @typeParam T - This is inferred by the supplied title\n * @param content - The content to display\n * @param url - The URL the content links to\n * @param title - The title shown when hovering on the masked link\n */\nexport function hyperlink<C extends string, U extends string, T extends string>(\n\tcontent: C,\n\turl: U,\n\ttitle: T,\n): `[${C}](${U} \"${T}\")`;\n\nexport function hyperlink(content: string, url: URL | string, title?: string) {\n\treturn title ? `[${content}](${url} \"${title}\")` : `[${content}](${url})`;\n}\n\n/**\n * Formats the content into a spoiler.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function spoiler<C extends string>(content: C): `||${C}||` {\n\treturn `||${content}||`;\n}\n\n/**\n * Formats a user id into a user mention.\n *\n * @typeParam C - This is inferred by the supplied user id\n * @param userId - The user id to format\n */\nexport function userMention<C extends Snowflake>(userId: C): `<@${C}>` {\n\treturn `<@${userId}>`;\n}\n\n/**\n * Formats a channel id into a channel mention.\n *\n * @typeParam C - This is inferred by the supplied channel id\n * @param channelId - The channel id to format\n */\nexport function channelMention<C extends Snowflake>(channelId: C): `<#${C}>` {\n\treturn `<#${channelId}>`;\n}\n\n/**\n * Formats a role id into a role mention.\n *\n * @typeParam C - This is inferred by the supplied role id\n * @param roleId - The role id to format\n */\nexport function roleMention<C extends Snowflake>(roleId: C): `<@&${C}>` {\n\treturn `<@&${roleId}>`;\n}\n\n/**\n * Formats an application command name, subcommand group name, subcommand name, and id into an application command mention.\n *\n * @typeParam N - This is inferred by the supplied command name\n * @typeParam G - This is inferred by the supplied subcommand group name\n * @typeParam S - This is inferred by the supplied subcommand name\n * @typeParam I - This is inferred by the supplied command id\n * @param commandName - The application command name to format\n * @param subcommandGroupName - The subcommand group name to format\n * @param subcommandName - The subcommand name to format\n * @param commandId - The application command id to format\n */\nexport function chatInputApplicationCommandMention<\n\tN extends string,\n\tG extends string,\n\tS extends string,\n\tI extends Snowflake,\n>(commandName: N, subcommandGroupName: G, subcommandName: S, commandId: I): `</${N} ${G} ${S}:${I}>`;\n\n/**\n * Formats an application command name, subcommand name, and id into an application command mention.\n *\n * @typeParam N - This is inferred by the supplied command name\n * @typeParam S - This is inferred by the supplied subcommand name\n * @typeParam I - This is inferred by the supplied command id\n * @param commandName - The application command name to format\n * @param subcommandName - The subcommand name to format\n * @param commandId - The application command id to format\n */\nexport function chatInputApplicationCommandMention<N extends string, S extends string, I extends Snowflake>(\n\tcommandName: N,\n\tsubcommandName: S,\n\tcommandId: I,\n): `</${N} ${S}:${I}>`;\n\n/**\n * Formats an application command name and id into an application command mention.\n *\n * @typeParam N - This is inferred by the supplied command name\n * @typeParam I - This is inferred by the supplied command id\n * @param commandName - The application command name to format\n * @param commandId - The application command id to format\n */\nexport function chatInputApplicationCommandMention<N extends string, I extends Snowflake>(\n\tcommandName: N,\n\tcommandId: I,\n): `</${N}:${I}>`;\n\nexport function chatInputApplicationCommandMention<\n\tN extends string,\n\tG extends Snowflake | string,\n\tS extends Snowflake | string,\n\tI extends Snowflake,\n>(\n\tcommandName: N,\n\tsubcommandGroupName: G,\n\tsubcommandName?: S,\n\tcommandId?: I,\n): `</${N} ${G} ${S}:${I}>` | `</${N} ${G}:${S}>` | `</${N}:${G}>` {\n\tif (commandId !== undefined) {\n\t\treturn `</${commandName} ${subcommandGroupName} ${subcommandName!}:${commandId}>`;\n\t}\n\n\tif (subcommandName !== undefined) {\n\t\treturn `</${commandName} ${subcommandGroupName}:${subcommandName}>`;\n\t}\n\n\treturn `</${commandName}:${subcommandGroupName}>`;\n}\n\n/**\n * Formats a non-animated emoji id into a fully qualified emoji identifier.\n *\n * @typeParam C - This is inferred by the supplied emoji id\n * @param emojiId - The emoji id to format\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated?: false): `<:_:${C}>`;\n\n/**\n * Formats an animated emoji id into a fully qualified emoji identifier.\n *\n * @typeParam C - This is inferred by the supplied emoji id\n * @param emojiId - The emoji id to format\n * @param animated - Whether the emoji is animated\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated?: true): `<a:_:${C}>`;\n\n/**\n * Formats an emoji id into a fully qualified emoji identifier.\n *\n * @typeParam C - This is inferred by the supplied emoji id\n * @param emojiId - The emoji id to format\n * @param animated - Whether the emoji is animated\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated?: boolean): `<:_:${C}>` | `<a:_:${C}>`;\n\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated = false): `<:_:${C}>` | `<a:_:${C}>` {\n\treturn `<${animated ? 'a' : ''}:_:${emojiId}>`;\n}\n\n/**\n * Formats a channel link for a direct message channel.\n *\n * @typeParam C - This is inferred by the supplied channel id\n * @param channelId - The channel's id\n */\nexport function channelLink<C extends Snowflake>(channelId: C): `https://discord.com/channels/@me/${C}`;\n\n/**\n * Formats a channel link for a guild channel.\n *\n * @typeParam C - This is inferred by the supplied channel id\n * @typeParam G - This is inferred by the supplied guild id\n * @param channelId - The channel's id\n * @param guildId - The guild's id\n */\nexport function channelLink<C extends Snowflake, G extends Snowflake>(\n\tchannelId: C,\n\tguildId: G,\n): `https://discord.com/channels/${G}/${C}`;\n\nexport function channelLink<C extends Snowflake, G extends Snowflake>(\n\tchannelId: C,\n\tguildId?: G,\n): `https://discord.com/channels/@me/${C}` | `https://discord.com/channels/${G}/${C}` {\n\treturn `https://discord.com/channels/${guildId ?? '@me'}/${channelId}`;\n}\n\n/**\n * Formats a message link for a direct message channel.\n *\n * @typeParam C - This is inferred by the supplied channel id\n * @typeParam M - This is inferred by the supplied message id\n * @param channelId - The channel's id\n * @param messageId - The message's id\n */\nexport function messageLink<C extends Snowflake, M extends Snowflake>(\n\tchannelId: C,\n\tmessageId: M,\n): `https://discord.com/channels/@me/${C}/${M}`;\n\n/**\n * Formats a message link for a guild channel.\n *\n * @typeParam C - This is inferred by the supplied channel id\n * @typeParam M - This is inferred by the supplied message id\n * @typeParam G - This is inferred by the supplied guild id\n * @param channelId - The channel's id\n * @param messageId - The message's id\n * @param guildId - The guild's id\n */\nexport function messageLink<C extends Snowflake, M extends Snowflake, G extends Snowflake>(\n\tchannelId: C,\n\tmessageId: M,\n\tguildId: G,\n): `https://discord.com/channels/${G}/${C}/${M}`;\n\nexport function messageLink<C extends Snowflake, M extends Snowflake, G extends Snowflake>(\n\tchannelId: C,\n\tmessageId: M,\n\tguildId?: G,\n): `https://discord.com/channels/@me/${C}/${M}` | `https://discord.com/channels/${G}/${C}/${M}` {\n\treturn `${guildId === undefined ? channelLink(channelId) : channelLink(channelId, guildId)}/${messageId}`;\n}\n\n/**\n * Formats a date into a short date-time string.\n *\n * @param date - The date to format. Defaults to the current time\n */\nexport function time(date?: Date): `<t:${bigint}>`;\n\n/**\n * Formats a date given a format style.\n *\n * @typeParam S - This is inferred by the supplied {@link TimestampStylesString}\n * @param date - The date to format\n * @param style - The style to use\n */\nexport function time<S extends TimestampStylesString>(date: Date, style: S): `<t:${bigint}:${S}>`;\n\n/**\n * Formats the given timestamp into a short date-time string.\n *\n * @typeParam C - This is inferred by the supplied timestamp\n * @param seconds - A Unix timestamp in seconds\n */\nexport function time<C extends number>(seconds: C): `<t:${C}>`;\n\n/**\n * Formats the given timestamp into a short date-time string.\n *\n * @typeParam C - This is inferred by the supplied timestamp\n * @typeParam S - This is inferred by the supplied {@link TimestampStylesString}\n * @param seconds - A Unix timestamp in seconds\n * @param style - The style to use\n */\nexport function time<C extends number, S extends TimestampStylesString>(seconds: C, style: S): `<t:${C}:${S}>`;\n\nexport function time(timeOrSeconds?: Date | number, style?: TimestampStylesString): string {\n\tif (typeof timeOrSeconds !== 'number') {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\ttimeOrSeconds = Math.floor((timeOrSeconds?.getTime() ?? Date.now()) / 1_000);\n\t}\n\n\treturn typeof style === 'string' ? `<t:${timeOrSeconds}:${style}>` : `<t:${timeOrSeconds}>`;\n}\n\n/**\n * The {@link https://discord.com/developers/docs/reference#message-formatting-timestamp-styles | message formatting timestamp styles}\n * supported by Discord.\n */\nexport const TimestampStyles = {\n\t/**\n\t * Short time format, consisting of hours and minutes.\n\t *\n\t * @example `16:20`\n\t */\n\tShortTime: 't',\n\n\t/**\n\t * Long time format, consisting of hours, minutes, and seconds.\n\t *\n\t * @example `16:20:30`\n\t */\n\tLongTime: 'T',\n\n\t/**\n\t * Short date format, consisting of day, month, and year.\n\t *\n\t * @example `20/04/2021`\n\t */\n\tShortDate: 'd',\n\n\t/**\n\t * Long date format, consisting of day, month, and year.\n\t *\n\t * @example `20 April 2021`\n\t */\n\tLongDate: 'D',\n\n\t/**\n\t * Short date-time format, consisting of short date and short time formats.\n\t *\n\t * @example `20 April 2021 16:20`\n\t */\n\tShortDateTime: 'f',\n\n\t/**\n\t * Long date-time format, consisting of long date and short time formats.\n\t *\n\t * @example `Tuesday, 20 April 2021 16:20`\n\t */\n\tLongDateTime: 'F',\n\n\t/**\n\t * Relative time format, consisting of a relative duration format.\n\t *\n\t * @example `2 months ago`\n\t */\n\tRelativeTime: 'R',\n} as const satisfies Record<string, string>;\n\n/**\n * The possible {@link TimestampStyles} values.\n */\nexport type TimestampStylesString = (typeof TimestampStyles)[keyof typeof TimestampStyles];\n\n// prettier-ignore\n/**\n * All the available faces from Discord's native slash commands.\n */\nexport enum Faces {\n\t/**\n\t * `¯\\_(ツ)_/¯`\n\t */\n\t// eslint-disable-next-line no-useless-escape\n\tShrug = '¯\\_(ツ)_/¯',\n\n\t/**\n\t * `(╯°□°)╯︵ ┻━┻`\n\t */\n\tTableflip = '(╯°□°)╯︵ ┻━┻',\n\n\t/**\n\t * `┬─┬ノ( º _ ºノ)`\n\t */\n\tUnflip = '┬─┬ノ( º _ ºノ)',\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC8GO,SAAS,eAAe,MAAc,UAAiC,CAAC,GAAW;AACzF,QAAM;AAAA,IACL,WAAAA,aAAY;AAA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Ae,QAAQ,KAAK,KAAK,IAAI,KAAK,GAAK;AAAA,EAC5E;AAEA,SAAO,OAAO,UAAU,WAAW,MAAM,aAAa,IAAI,KAAK,MAAM,MAAM,aAAa;AACzF;AAPgB;AAaT,IAAM,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM9B,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOX,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOV,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOX,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOV,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOf,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOd,cAAc;AACf;AAWO,IAAK,QAAL,kBAAKC,WAAL;AAKN,EAAAA,OAAA,WAAQ;AAKR,EAAAA,OAAA,eAAY;AAKZ,EAAAA,OAAA,YAAS;AAfE,SAAAA;AAAA,GAAA;","names":["codeBlock","inlineCode","bold","italic","strikethrough","spoiler","Faces"]} \ No newline at end of file
diff --git a/node_modules/@discordjs/formatters/dist/index.mjs b/node_modules/@discordjs/formatters/dist/index.mjs
new file mode 100644
index 0000000..82a6f65
--- /dev/null
+++ b/node_modules/@discordjs/formatters/dist/index.mjs
@@ -0,0 +1,335 @@
+var __defProp = Object.defineProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+
+// src/escapers.ts
+function escapeMarkdown(text, options = {}) {
+ const {
+ codeBlock: codeBlock2 = true,
+ inlineCode: inlineCode2 = true,
+ bold: bold2 = true,
+ italic: italic2 = true,
+ underline = true,
+ strikethrough: strikethrough2 = true,
+ spoiler: spoiler2 = true,
+ codeBlockContent = true,
+ inlineCodeContent = true,
+ escape = true,
+ heading = false,
+ bulletedList = false,
+ numberedList = false,
+ maskedLink = false
+ } = options;
+ if (!codeBlockContent) {
+ return text.split("```").map((subString, index, array) => {
+ if (index % 2 && index !== array.length - 1)
+ return subString;
+ return escapeMarkdown(subString, {
+ inlineCode: inlineCode2,
+ bold: bold2,
+ italic: italic2,
+ underline,
+ strikethrough: strikethrough2,
+ spoiler: spoiler2,
+ inlineCodeContent,
+ escape,
+ heading,
+ bulletedList,
+ numberedList,
+ maskedLink
+ });
+ }).join(codeBlock2 ? "\\`\\`\\`" : "```");
+ }
+ if (!inlineCodeContent) {
+ return text.split(/(?<=^|[^`])`(?=[^`]|$)/g).map((subString, index, array) => {
+ if (index % 2 && index !== array.length - 1)
+ return subString;
+ return escapeMarkdown(subString, {
+ codeBlock: codeBlock2,
+ bold: bold2,
+ italic: italic2,
+ underline,
+ strikethrough: strikethrough2,
+ spoiler: spoiler2,
+ escape,
+ heading,
+ bulletedList,
+ numberedList,
+ maskedLink
+ });
+ }).join(inlineCode2 ? "\\`" : "`");
+ }
+ let res = text;
+ if (escape)
+ res = escapeEscape(res);
+ if (inlineCode2)
+ res = escapeInlineCode(res);
+ if (codeBlock2)
+ res = escapeCodeBlock(res);
+ if (italic2)
+ res = escapeItalic(res);
+ if (bold2)
+ res = escapeBold(res);
+ if (underline)
+ res = escapeUnderline(res);
+ if (strikethrough2)
+ res = escapeStrikethrough(res);
+ if (spoiler2)
+ res = escapeSpoiler(res);
+ if (heading)
+ res = escapeHeading(res);
+ if (bulletedList)
+ res = escapeBulletedList(res);
+ if (numberedList)
+ res = escapeNumberedList(res);
+ if (maskedLink)
+ res = escapeMaskedLink(res);
+ return res;
+}
+__name(escapeMarkdown, "escapeMarkdown");
+function escapeCodeBlock(text) {
+ return text.replaceAll("```", "\\`\\`\\`");
+}
+__name(escapeCodeBlock, "escapeCodeBlock");
+function escapeInlineCode(text) {
+ return text.replaceAll(/(?<=^|[^`])``?(?=[^`]|$)/g, (match) => match.length === 2 ? "\\`\\`" : "\\`");
+}
+__name(escapeInlineCode, "escapeInlineCode");
+function escapeItalic(text) {
+ let idx = 0;
+ const newText = text.replaceAll(/(?<=^|[^*])\*([^*]|\*\*|$)/g, (_, match) => {
+ if (match === "**")
+ return ++idx % 2 ? `\\*${match}` : `${match}\\*`;
+ return `\\*${match}`;
+ });
+ idx = 0;
+ return newText.replaceAll(/(?<=^|[^_])(?<!<a?:.+)_(?!:\d+>)([^_]|__|$)/g, (_, match) => {
+ if (match === "__")
+ return ++idx % 2 ? `\\_${match}` : `${match}\\_`;
+ return `\\_${match}`;
+ });
+}
+__name(escapeItalic, "escapeItalic");
+function escapeBold(text) {
+ let idx = 0;
+ return text.replaceAll(/\*\*(\*)?/g, (_, match) => {
+ if (match)
+ return ++idx % 2 ? `${match}\\*\\*` : `\\*\\*${match}`;
+ return "\\*\\*";
+ });
+}
+__name(escapeBold, "escapeBold");
+function escapeUnderline(text) {
+ let idx = 0;
+ return text.replaceAll(/(?<!<a?:.+)__(_)?(?!:\d+>)/g, (_, match) => {
+ if (match)
+ return ++idx % 2 ? `${match}\\_\\_` : `\\_\\_${match}`;
+ return "\\_\\_";
+ });
+}
+__name(escapeUnderline, "escapeUnderline");
+function escapeStrikethrough(text) {
+ return text.replaceAll("~~", "\\~\\~");
+}
+__name(escapeStrikethrough, "escapeStrikethrough");
+function escapeSpoiler(text) {
+ return text.replaceAll("||", "\\|\\|");
+}
+__name(escapeSpoiler, "escapeSpoiler");
+function escapeEscape(text) {
+ return text.replaceAll("\\", "\\\\");
+}
+__name(escapeEscape, "escapeEscape");
+function escapeHeading(text) {
+ return text.replaceAll(/^( {0,2})([*-] )?( *)(#{1,3} )/gm, "$1$2$3\\$4");
+}
+__name(escapeHeading, "escapeHeading");
+function escapeBulletedList(text) {
+ return text.replaceAll(/^( *)([*-])( +)/gm, "$1\\$2$3");
+}
+__name(escapeBulletedList, "escapeBulletedList");
+function escapeNumberedList(text) {
+ return text.replaceAll(/^( *\d+)\./gm, "$1\\.");
+}
+__name(escapeNumberedList, "escapeNumberedList");
+function escapeMaskedLink(text) {
+ return text.replaceAll(/\[.+]\(.+\)/gm, "\\$&");
+}
+__name(escapeMaskedLink, "escapeMaskedLink");
+
+// src/formatters.ts
+function codeBlock(language, content) {
+ return content === void 0 ? `\`\`\`
+${language}
+\`\`\`` : `\`\`\`${language}
+${content}
+\`\`\``;
+}
+__name(codeBlock, "codeBlock");
+function inlineCode(content) {
+ return `\`${content}\``;
+}
+__name(inlineCode, "inlineCode");
+function italic(content) {
+ return `_${content}_`;
+}
+__name(italic, "italic");
+function bold(content) {
+ return `**${content}**`;
+}
+__name(bold, "bold");
+function underscore(content) {
+ return `__${content}__`;
+}
+__name(underscore, "underscore");
+function strikethrough(content) {
+ return `~~${content}~~`;
+}
+__name(strikethrough, "strikethrough");
+function quote(content) {
+ return `> ${content}`;
+}
+__name(quote, "quote");
+function blockQuote(content) {
+ return `>>> ${content}`;
+}
+__name(blockQuote, "blockQuote");
+function hideLinkEmbed(url) {
+ return `<${url}>`;
+}
+__name(hideLinkEmbed, "hideLinkEmbed");
+function hyperlink(content, url, title) {
+ return title ? `[${content}](${url} "${title}")` : `[${content}](${url})`;
+}
+__name(hyperlink, "hyperlink");
+function spoiler(content) {
+ return `||${content}||`;
+}
+__name(spoiler, "spoiler");
+function userMention(userId) {
+ return `<@${userId}>`;
+}
+__name(userMention, "userMention");
+function channelMention(channelId) {
+ return `<#${channelId}>`;
+}
+__name(channelMention, "channelMention");
+function roleMention(roleId) {
+ return `<@&${roleId}>`;
+}
+__name(roleMention, "roleMention");
+function chatInputApplicationCommandMention(commandName, subcommandGroupName, subcommandName, commandId) {
+ if (commandId !== void 0) {
+ return `</${commandName} ${subcommandGroupName} ${subcommandName}:${commandId}>`;
+ }
+ if (subcommandName !== void 0) {
+ return `</${commandName} ${subcommandGroupName}:${subcommandName}>`;
+ }
+ return `</${commandName}:${subcommandGroupName}>`;
+}
+__name(chatInputApplicationCommandMention, "chatInputApplicationCommandMention");
+function formatEmoji(emojiId, animated = false) {
+ return `<${animated ? "a" : ""}:_:${emojiId}>`;
+}
+__name(formatEmoji, "formatEmoji");
+function channelLink(channelId, guildId) {
+ return `https://discord.com/channels/${guildId ?? "@me"}/${channelId}`;
+}
+__name(channelLink, "channelLink");
+function messageLink(channelId, messageId, guildId) {
+ return `${guildId === void 0 ? channelLink(channelId) : channelLink(channelId, guildId)}/${messageId}`;
+}
+__name(messageLink, "messageLink");
+function time(timeOrSeconds, style) {
+ if (typeof timeOrSeconds !== "number") {
+ timeOrSeconds = Math.floor((timeOrSeconds?.getTime() ?? Date.now()) / 1e3);
+ }
+ return typeof style === "string" ? `<t:${timeOrSeconds}:${style}>` : `<t:${timeOrSeconds}>`;
+}
+__name(time, "time");
+var TimestampStyles = {
+ /**
+ * Short time format, consisting of hours and minutes.
+ *
+ * @example `16:20`
+ */
+ ShortTime: "t",
+ /**
+ * Long time format, consisting of hours, minutes, and seconds.
+ *
+ * @example `16:20:30`
+ */
+ LongTime: "T",
+ /**
+ * Short date format, consisting of day, month, and year.
+ *
+ * @example `20/04/2021`
+ */
+ ShortDate: "d",
+ /**
+ * Long date format, consisting of day, month, and year.
+ *
+ * @example `20 April 2021`
+ */
+ LongDate: "D",
+ /**
+ * Short date-time format, consisting of short date and short time formats.
+ *
+ * @example `20 April 2021 16:20`
+ */
+ ShortDateTime: "f",
+ /**
+ * Long date-time format, consisting of long date and short time formats.
+ *
+ * @example `Tuesday, 20 April 2021 16:20`
+ */
+ LongDateTime: "F",
+ /**
+ * Relative time format, consisting of a relative duration format.
+ *
+ * @example `2 months ago`
+ */
+ RelativeTime: "R"
+};
+var Faces = /* @__PURE__ */ ((Faces2) => {
+ Faces2["Shrug"] = "\xAF_(\u30C4)_/\xAF";
+ Faces2["Tableflip"] = "(\u256F\xB0\u25A1\xB0)\u256F\uFE35 \u253B\u2501\u253B";
+ Faces2["Unflip"] = "\u252C\u2500\u252C\u30CE( \xBA _ \xBA\u30CE)";
+ return Faces2;
+})(Faces || {});
+export {
+ Faces,
+ TimestampStyles,
+ blockQuote,
+ bold,
+ channelLink,
+ channelMention,
+ chatInputApplicationCommandMention,
+ codeBlock,
+ escapeBold,
+ escapeBulletedList,
+ escapeCodeBlock,
+ escapeEscape,
+ escapeHeading,
+ escapeInlineCode,
+ escapeItalic,
+ escapeMarkdown,
+ escapeMaskedLink,
+ escapeNumberedList,
+ escapeSpoiler,
+ escapeStrikethrough,
+ escapeUnderline,
+ formatEmoji,
+ hideLinkEmbed,
+ hyperlink,
+ inlineCode,
+ italic,
+ messageLink,
+ quote,
+ roleMention,
+ spoiler,
+ strikethrough,
+ time,
+ underscore,
+ userMention
+};
+//# sourceMappingURL=index.mjs.map \ No newline at end of file
diff --git a/node_modules/@discordjs/formatters/dist/index.mjs.map b/node_modules/@discordjs/formatters/dist/index.mjs.map
new file mode 100644
index 0000000..ca8202d
--- /dev/null
+++ b/node_modules/@discordjs/formatters/dist/index.mjs.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/escapers.ts","../src/formatters.ts"],"sourcesContent":["/* eslint-disable prefer-named-capture-group */\n\n/**\n * The options that affect what will be escaped.\n */\nexport interface EscapeMarkdownOptions {\n\t/**\n\t * Whether to escape bold text.\n\t *\n\t * @defaultValue `true`\n\t */\n\tbold?: boolean;\n\n\t/**\n\t * Whether to escape bulleted lists.\n\t *\n\t * @defaultValue `false`\n\t */\n\tbulletedList?: boolean;\n\n\t/**\n\t * Whether to escape code blocks.\n\t *\n\t * @defaultValue `true`\n\t */\n\tcodeBlock?: boolean;\n\n\t/**\n\t * Whether to escape text inside code blocks.\n\t *\n\t * @defaultValue `true`\n\t */\n\tcodeBlockContent?: boolean;\n\n\t/**\n\t * Whether to escape `\\`.\n\t *\n\t * @defaultValue `true`\n\t */\n\tescape?: boolean;\n\n\t/**\n\t * Whether to escape headings.\n\t *\n\t * @defaultValue `false`\n\t */\n\theading?: boolean;\n\n\t/**\n\t * Whether to escape inline code.\n\t *\n\t * @defaultValue `true`\n\t */\n\tinlineCode?: boolean;\n\n\t/**\n\t * Whether to escape text inside inline code.\n\t *\n\t * @defaultValue `true`\n\t */\n\tinlineCodeContent?: boolean;\n\t/**\n\t * Whether to escape italics.\n\t *\n\t * @defaultValue `true`\n\t */\n\titalic?: boolean;\n\n\t/**\n\t * Whether to escape masked links.\n\t *\n\t * @defaultValue `false`\n\t */\n\tmaskedLink?: boolean;\n\n\t/**\n\t * Whether to escape numbered lists.\n\t *\n\t * @defaultValue `false`\n\t */\n\tnumberedList?: boolean;\n\n\t/**\n\t * Whether to escape spoilers.\n\t *\n\t * @defaultValue `true`\n\t */\n\tspoiler?: boolean;\n\n\t/**\n\t * Whether to escape strikethroughs.\n\t *\n\t * @defaultValue `true`\n\t */\n\tstrikethrough?: boolean;\n\n\t/**\n\t * Whether to escape underlines.\n\t *\n\t * @defaultValue `true`\n\t */\n\tunderline?: boolean;\n}\n\n/**\n * Escapes any Discord-flavored markdown in a string.\n *\n * @param text - Content to escape\n * @param options - Options for escaping the markdown\n */\nexport function escapeMarkdown(text: string, options: EscapeMarkdownOptions = {}): string {\n\tconst {\n\t\tcodeBlock = true,\n\t\tinlineCode = true,\n\t\tbold = true,\n\t\titalic = true,\n\t\tunderline = true,\n\t\tstrikethrough = true,\n\t\tspoiler = true,\n\t\tcodeBlockContent = true,\n\t\tinlineCodeContent = true,\n\t\tescape = true,\n\t\theading = false,\n\t\tbulletedList = false,\n\t\tnumberedList = false,\n\t\tmaskedLink = false,\n\t} = options;\n\n\tif (!codeBlockContent) {\n\t\treturn text\n\t\t\t.split('```')\n\t\t\t.map((subString, index, array) => {\n\t\t\t\tif (index % 2 && index !== array.length - 1) return subString;\n\t\t\t\treturn escapeMarkdown(subString, {\n\t\t\t\t\tinlineCode,\n\t\t\t\t\tbold,\n\t\t\t\t\titalic,\n\t\t\t\t\tunderline,\n\t\t\t\t\tstrikethrough,\n\t\t\t\t\tspoiler,\n\t\t\t\t\tinlineCodeContent,\n\t\t\t\t\tescape,\n\t\t\t\t\theading,\n\t\t\t\t\tbulletedList,\n\t\t\t\t\tnumberedList,\n\t\t\t\t\tmaskedLink,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.join(codeBlock ? '\\\\`\\\\`\\\\`' : '```');\n\t}\n\n\tif (!inlineCodeContent) {\n\t\treturn text\n\t\t\t.split(/(?<=^|[^`])`(?=[^`]|$)/g)\n\t\t\t.map((subString, index, array) => {\n\t\t\t\tif (index % 2 && index !== array.length - 1) return subString;\n\t\t\t\treturn escapeMarkdown(subString, {\n\t\t\t\t\tcodeBlock,\n\t\t\t\t\tbold,\n\t\t\t\t\titalic,\n\t\t\t\t\tunderline,\n\t\t\t\t\tstrikethrough,\n\t\t\t\t\tspoiler,\n\t\t\t\t\tescape,\n\t\t\t\t\theading,\n\t\t\t\t\tbulletedList,\n\t\t\t\t\tnumberedList,\n\t\t\t\t\tmaskedLink,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.join(inlineCode ? '\\\\`' : '`');\n\t}\n\n\tlet res = text;\n\tif (escape) res = escapeEscape(res);\n\tif (inlineCode) res = escapeInlineCode(res);\n\tif (codeBlock) res = escapeCodeBlock(res);\n\tif (italic) res = escapeItalic(res);\n\tif (bold) res = escapeBold(res);\n\tif (underline) res = escapeUnderline(res);\n\tif (strikethrough) res = escapeStrikethrough(res);\n\tif (spoiler) res = escapeSpoiler(res);\n\tif (heading) res = escapeHeading(res);\n\tif (bulletedList) res = escapeBulletedList(res);\n\tif (numberedList) res = escapeNumberedList(res);\n\tif (maskedLink) res = escapeMaskedLink(res);\n\treturn res;\n}\n\n/**\n * Escapes code block markdown in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeCodeBlock(text: string): string {\n\treturn text.replaceAll('```', '\\\\`\\\\`\\\\`');\n}\n\n/**\n * Escapes inline code markdown in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeInlineCode(text: string): string {\n\treturn text.replaceAll(/(?<=^|[^`])``?(?=[^`]|$)/g, (match) => (match.length === 2 ? '\\\\`\\\\`' : '\\\\`'));\n}\n\n/**\n * Escapes italic markdown in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeItalic(text: string): string {\n\tlet idx = 0;\n\tconst newText = text.replaceAll(/(?<=^|[^*])\\*([^*]|\\*\\*|$)/g, (_, match) => {\n\t\tif (match === '**') return ++idx % 2 ? `\\\\*${match}` : `${match}\\\\*`;\n\t\treturn `\\\\*${match}`;\n\t});\n\tidx = 0;\n\treturn newText.replaceAll(/(?<=^|[^_])(?<!<a?:.+)_(?!:\\d+>)([^_]|__|$)/g, (_, match) => {\n\t\tif (match === '__') return ++idx % 2 ? `\\\\_${match}` : `${match}\\\\_`;\n\t\treturn `\\\\_${match}`;\n\t});\n}\n\n/**\n * Escapes bold markdown in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeBold(text: string): string {\n\tlet idx = 0;\n\treturn text.replaceAll(/\\*\\*(\\*)?/g, (_, match) => {\n\t\tif (match) return ++idx % 2 ? `${match}\\\\*\\\\*` : `\\\\*\\\\*${match}`;\n\t\treturn '\\\\*\\\\*';\n\t});\n}\n\n/**\n * Escapes underline markdown in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeUnderline(text: string): string {\n\tlet idx = 0;\n\treturn text.replaceAll(/(?<!<a?:.+)__(_)?(?!:\\d+>)/g, (_, match) => {\n\t\tif (match) return ++idx % 2 ? `${match}\\\\_\\\\_` : `\\\\_\\\\_${match}`;\n\t\treturn '\\\\_\\\\_';\n\t});\n}\n\n/**\n * Escapes strikethrough markdown in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeStrikethrough(text: string): string {\n\treturn text.replaceAll('~~', '\\\\~\\\\~');\n}\n\n/**\n * Escapes spoiler markdown in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeSpoiler(text: string): string {\n\treturn text.replaceAll('||', '\\\\|\\\\|');\n}\n\n/**\n * Escapes escape characters in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeEscape(text: string): string {\n\treturn text.replaceAll('\\\\', '\\\\\\\\');\n}\n\n/**\n * Escapes heading characters in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeHeading(text: string): string {\n\treturn text.replaceAll(/^( {0,2})([*-] )?( *)(#{1,3} )/gm, '$1$2$3\\\\$4');\n}\n\n/**\n * Escapes bulleted list characters in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeBulletedList(text: string): string {\n\treturn text.replaceAll(/^( *)([*-])( +)/gm, '$1\\\\$2$3');\n}\n\n/**\n * Escapes numbered list characters in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeNumberedList(text: string): string {\n\treturn text.replaceAll(/^( *\\d+)\\./gm, '$1\\\\.');\n}\n\n/**\n * Escapes masked link characters in a string.\n *\n * @param text - Content to escape\n */\nexport function escapeMaskedLink(text: string): string {\n\treturn text.replaceAll(/\\[.+]\\(.+\\)/gm, '\\\\$&');\n}\n","import type { URL } from 'node:url';\nimport type { Snowflake } from 'discord-api-types/globals';\n\n/**\n * Wraps the content inside a code block with no language.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function codeBlock<C extends string>(content: C): `\\`\\`\\`\\n${C}\\n\\`\\`\\``;\n\n/**\n * Wraps the content inside a code block with the specified language.\n *\n * @typeParam L - This is inferred by the supplied language\n * @typeParam C - This is inferred by the supplied content\n * @param language - The language for the code block\n * @param content - The content to wrap\n */\nexport function codeBlock<L extends string, C extends string>(language: L, content: C): `\\`\\`\\`${L}\\n${C}\\n\\`\\`\\``;\n\nexport function codeBlock(language: string, content?: string): string {\n\treturn content === undefined ? `\\`\\`\\`\\n${language}\\n\\`\\`\\`` : `\\`\\`\\`${language}\\n${content}\\n\\`\\`\\``;\n}\n\n/**\n * Wraps the content inside \\`backticks\\` which formats it as inline code.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function inlineCode<C extends string>(content: C): `\\`${C}\\`` {\n\treturn `\\`${content}\\``;\n}\n\n/**\n * Formats the content into italic text.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function italic<C extends string>(content: C): `_${C}_` {\n\treturn `_${content}_`;\n}\n\n/**\n * Formats the content into bold text.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function bold<C extends string>(content: C): `**${C}**` {\n\treturn `**${content}**`;\n}\n\n/**\n * Formats the content into underscored text.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function underscore<C extends string>(content: C): `__${C}__` {\n\treturn `__${content}__`;\n}\n\n/**\n * Formats the content into strike-through text.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function strikethrough<C extends string>(content: C): `~~${C}~~` {\n\treturn `~~${content}~~`;\n}\n\n/**\n * Formats the content into a quote.\n *\n * @remarks This needs to be at the start of the line for Discord to format it.\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function quote<C extends string>(content: C): `> ${C}` {\n\treturn `> ${content}`;\n}\n\n/**\n * Formats the content into a block quote.\n *\n * @remarks This needs to be at the start of the line for Discord to format it.\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function blockQuote<C extends string>(content: C): `>>> ${C}` {\n\treturn `>>> ${content}`;\n}\n\n/**\n * Wraps the URL into `<>` which stops it from embedding.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param url - The URL to wrap\n */\nexport function hideLinkEmbed<C extends string>(url: C): `<${C}>`;\n\n/**\n * Wraps the URL into `<>` which stops it from embedding.\n *\n * @param url - The URL to wrap\n */\nexport function hideLinkEmbed(url: URL): `<${string}>`;\n\nexport function hideLinkEmbed(url: URL | string) {\n\treturn `<${url}>`;\n}\n\n/**\n * Formats the content and the URL into a masked URL.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to display\n * @param url - The URL the content links to\n */\nexport function hyperlink<C extends string>(content: C, url: URL): `[${C}](${string})`;\n\n/**\n * Formats the content and the URL into a masked URL.\n *\n * @typeParam C - This is inferred by the supplied content\n * @typeParam U - This is inferred by the supplied URL\n * @param content - The content to display\n * @param url - The URL the content links to\n */\nexport function hyperlink<C extends string, U extends string>(content: C, url: U): `[${C}](${U})`;\n\n/**\n * Formats the content and the URL into a masked URL with a custom tooltip.\n *\n * @typeParam C - This is inferred by the supplied content\n * @typeParam T - This is inferred by the supplied title\n * @param content - The content to display\n * @param url - The URL the content links to\n * @param title - The title shown when hovering on the masked link\n */\nexport function hyperlink<C extends string, T extends string>(\n\tcontent: C,\n\turl: URL,\n\ttitle: T,\n): `[${C}](${string} \"${T}\")`;\n\n/**\n * Formats the content and the URL into a masked URL with a custom tooltip.\n *\n * @typeParam C - This is inferred by the supplied content\n * @typeParam U - This is inferred by the supplied URL\n * @typeParam T - This is inferred by the supplied title\n * @param content - The content to display\n * @param url - The URL the content links to\n * @param title - The title shown when hovering on the masked link\n */\nexport function hyperlink<C extends string, U extends string, T extends string>(\n\tcontent: C,\n\turl: U,\n\ttitle: T,\n): `[${C}](${U} \"${T}\")`;\n\nexport function hyperlink(content: string, url: URL | string, title?: string) {\n\treturn title ? `[${content}](${url} \"${title}\")` : `[${content}](${url})`;\n}\n\n/**\n * Formats the content into a spoiler.\n *\n * @typeParam C - This is inferred by the supplied content\n * @param content - The content to wrap\n */\nexport function spoiler<C extends string>(content: C): `||${C}||` {\n\treturn `||${content}||`;\n}\n\n/**\n * Formats a user id into a user mention.\n *\n * @typeParam C - This is inferred by the supplied user id\n * @param userId - The user id to format\n */\nexport function userMention<C extends Snowflake>(userId: C): `<@${C}>` {\n\treturn `<@${userId}>`;\n}\n\n/**\n * Formats a channel id into a channel mention.\n *\n * @typeParam C - This is inferred by the supplied channel id\n * @param channelId - The channel id to format\n */\nexport function channelMention<C extends Snowflake>(channelId: C): `<#${C}>` {\n\treturn `<#${channelId}>`;\n}\n\n/**\n * Formats a role id into a role mention.\n *\n * @typeParam C - This is inferred by the supplied role id\n * @param roleId - The role id to format\n */\nexport function roleMention<C extends Snowflake>(roleId: C): `<@&${C}>` {\n\treturn `<@&${roleId}>`;\n}\n\n/**\n * Formats an application command name, subcommand group name, subcommand name, and id into an application command mention.\n *\n * @typeParam N - This is inferred by the supplied command name\n * @typeParam G - This is inferred by the supplied subcommand group name\n * @typeParam S - This is inferred by the supplied subcommand name\n * @typeParam I - This is inferred by the supplied command id\n * @param commandName - The application command name to format\n * @param subcommandGroupName - The subcommand group name to format\n * @param subcommandName - The subcommand name to format\n * @param commandId - The application command id to format\n */\nexport function chatInputApplicationCommandMention<\n\tN extends string,\n\tG extends string,\n\tS extends string,\n\tI extends Snowflake,\n>(commandName: N, subcommandGroupName: G, subcommandName: S, commandId: I): `</${N} ${G} ${S}:${I}>`;\n\n/**\n * Formats an application command name, subcommand name, and id into an application command mention.\n *\n * @typeParam N - This is inferred by the supplied command name\n * @typeParam S - This is inferred by the supplied subcommand name\n * @typeParam I - This is inferred by the supplied command id\n * @param commandName - The application command name to format\n * @param subcommandName - The subcommand name to format\n * @param commandId - The application command id to format\n */\nexport function chatInputApplicationCommandMention<N extends string, S extends string, I extends Snowflake>(\n\tcommandName: N,\n\tsubcommandName: S,\n\tcommandId: I,\n): `</${N} ${S}:${I}>`;\n\n/**\n * Formats an application command name and id into an application command mention.\n *\n * @typeParam N - This is inferred by the supplied command name\n * @typeParam I - This is inferred by the supplied command id\n * @param commandName - The application command name to format\n * @param commandId - The application command id to format\n */\nexport function chatInputApplicationCommandMention<N extends string, I extends Snowflake>(\n\tcommandName: N,\n\tcommandId: I,\n): `</${N}:${I}>`;\n\nexport function chatInputApplicationCommandMention<\n\tN extends string,\n\tG extends Snowflake | string,\n\tS extends Snowflake | string,\n\tI extends Snowflake,\n>(\n\tcommandName: N,\n\tsubcommandGroupName: G,\n\tsubcommandName?: S,\n\tcommandId?: I,\n): `</${N} ${G} ${S}:${I}>` | `</${N} ${G}:${S}>` | `</${N}:${G}>` {\n\tif (commandId !== undefined) {\n\t\treturn `</${commandName} ${subcommandGroupName} ${subcommandName!}:${commandId}>`;\n\t}\n\n\tif (subcommandName !== undefined) {\n\t\treturn `</${commandName} ${subcommandGroupName}:${subcommandName}>`;\n\t}\n\n\treturn `</${commandName}:${subcommandGroupName}>`;\n}\n\n/**\n * Formats a non-animated emoji id into a fully qualified emoji identifier.\n *\n * @typeParam C - This is inferred by the supplied emoji id\n * @param emojiId - The emoji id to format\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated?: false): `<:_:${C}>`;\n\n/**\n * Formats an animated emoji id into a fully qualified emoji identifier.\n *\n * @typeParam C - This is inferred by the supplied emoji id\n * @param emojiId - The emoji id to format\n * @param animated - Whether the emoji is animated\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated?: true): `<a:_:${C}>`;\n\n/**\n * Formats an emoji id into a fully qualified emoji identifier.\n *\n * @typeParam C - This is inferred by the supplied emoji id\n * @param emojiId - The emoji id to format\n * @param animated - Whether the emoji is animated\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated?: boolean): `<:_:${C}>` | `<a:_:${C}>`;\n\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated = false): `<:_:${C}>` | `<a:_:${C}>` {\n\treturn `<${animated ? 'a' : ''}:_:${emojiId}>`;\n}\n\n/**\n * Formats a channel link for a direct message channel.\n *\n * @typeParam C - This is inferred by the supplied channel id\n * @param channelId - The channel's id\n */\nexport function channelLink<C extends Snowflake>(channelId: C): `https://discord.com/channels/@me/${C}`;\n\n/**\n * Formats a channel link for a guild channel.\n *\n * @typeParam C - This is inferred by the supplied channel id\n * @typeParam G - This is inferred by the supplied guild id\n * @param channelId - The channel's id\n * @param guildId - The guild's id\n */\nexport function channelLink<C extends Snowflake, G extends Snowflake>(\n\tchannelId: C,\n\tguildId: G,\n): `https://discord.com/channels/${G}/${C}`;\n\nexport function channelLink<C extends Snowflake, G extends Snowflake>(\n\tchannelId: C,\n\tguildId?: G,\n): `https://discord.com/channels/@me/${C}` | `https://discord.com/channels/${G}/${C}` {\n\treturn `https://discord.com/channels/${guildId ?? '@me'}/${channelId}`;\n}\n\n/**\n * Formats a message link for a direct message channel.\n *\n * @typeParam C - This is inferred by the supplied channel id\n * @typeParam M - This is inferred by the supplied message id\n * @param channelId - The channel's id\n * @param messageId - The message's id\n */\nexport function messageLink<C extends Snowflake, M extends Snowflake>(\n\tchannelId: C,\n\tmessageId: M,\n): `https://discord.com/channels/@me/${C}/${M}`;\n\n/**\n * Formats a message link for a guild channel.\n *\n * @typeParam C - This is inferred by the supplied channel id\n * @typeParam M - This is inferred by the supplied message id\n * @typeParam G - This is inferred by the supplied guild id\n * @param channelId - The channel's id\n * @param messageId - The message's id\n * @param guildId - The guild's id\n */\nexport function messageLink<C extends Snowflake, M extends Snowflake, G extends Snowflake>(\n\tchannelId: C,\n\tmessageId: M,\n\tguildId: G,\n): `https://discord.com/channels/${G}/${C}/${M}`;\n\nexport function messageLink<C extends Snowflake, M extends Snowflake, G extends Snowflake>(\n\tchannelId: C,\n\tmessageId: M,\n\tguildId?: G,\n): `https://discord.com/channels/@me/${C}/${M}` | `https://discord.com/channels/${G}/${C}/${M}` {\n\treturn `${guildId === undefined ? channelLink(channelId) : channelLink(channelId, guildId)}/${messageId}`;\n}\n\n/**\n * Formats a date into a short date-time string.\n *\n * @param date - The date to format. Defaults to the current time\n */\nexport function time(date?: Date): `<t:${bigint}>`;\n\n/**\n * Formats a date given a format style.\n *\n * @typeParam S - This is inferred by the supplied {@link TimestampStylesString}\n * @param date - The date to format\n * @param style - The style to use\n */\nexport function time<S extends TimestampStylesString>(date: Date, style: S): `<t:${bigint}:${S}>`;\n\n/**\n * Formats the given timestamp into a short date-time string.\n *\n * @typeParam C - This is inferred by the supplied timestamp\n * @param seconds - A Unix timestamp in seconds\n */\nexport function time<C extends number>(seconds: C): `<t:${C}>`;\n\n/**\n * Formats the given timestamp into a short date-time string.\n *\n * @typeParam C - This is inferred by the supplied timestamp\n * @typeParam S - This is inferred by the supplied {@link TimestampStylesString}\n * @param seconds - A Unix timestamp in seconds\n * @param style - The style to use\n */\nexport function time<C extends number, S extends TimestampStylesString>(seconds: C, style: S): `<t:${C}:${S}>`;\n\nexport function time(timeOrSeconds?: Date | number, style?: TimestampStylesString): string {\n\tif (typeof timeOrSeconds !== 'number') {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\ttimeOrSeconds = Math.floor((timeOrSeconds?.getTime() ?? Date.now()) / 1_000);\n\t}\n\n\treturn typeof style === 'string' ? `<t:${timeOrSeconds}:${style}>` : `<t:${timeOrSeconds}>`;\n}\n\n/**\n * The {@link https://discord.com/developers/docs/reference#message-formatting-timestamp-styles | message formatting timestamp styles}\n * supported by Discord.\n */\nexport const TimestampStyles = {\n\t/**\n\t * Short time format, consisting of hours and minutes.\n\t *\n\t * @example `16:20`\n\t */\n\tShortTime: 't',\n\n\t/**\n\t * Long time format, consisting of hours, minutes, and seconds.\n\t *\n\t * @example `16:20:30`\n\t */\n\tLongTime: 'T',\n\n\t/**\n\t * Short date format, consisting of day, month, and year.\n\t *\n\t * @example `20/04/2021`\n\t */\n\tShortDate: 'd',\n\n\t/**\n\t * Long date format, consisting of day, month, and year.\n\t *\n\t * @example `20 April 2021`\n\t */\n\tLongDate: 'D',\n\n\t/**\n\t * Short date-time format, consisting of short date and short time formats.\n\t *\n\t * @example `20 April 2021 16:20`\n\t */\n\tShortDateTime: 'f',\n\n\t/**\n\t * Long date-time format, consisting of long date and short time formats.\n\t *\n\t * @example `Tuesday, 20 April 2021 16:20`\n\t */\n\tLongDateTime: 'F',\n\n\t/**\n\t * Relative time format, consisting of a relative duration format.\n\t *\n\t * @example `2 months ago`\n\t */\n\tRelativeTime: 'R',\n} as const satisfies Record<string, string>;\n\n/**\n * The possible {@link TimestampStyles} values.\n */\nexport type TimestampStylesString = (typeof TimestampStyles)[keyof typeof TimestampStyles];\n\n// prettier-ignore\n/**\n * All the available faces from Discord's native slash commands.\n */\nexport enum Faces {\n\t/**\n\t * `¯\\_(ツ)_/¯`\n\t */\n\t// eslint-disable-next-line no-useless-escape\n\tShrug = '¯\\_(ツ)_/¯',\n\n\t/**\n\t * `(╯°□°)╯︵ ┻━┻`\n\t */\n\tTableflip = '(╯°□°)╯︵ ┻━┻',\n\n\t/**\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,SAAY,YAAY,SAAS,IAAI,YAAY,WAAW,OAAO,CAAC,IAAI,SAAS;AACxG;AANgB;AA0CT,SAAS,KAAK,eAA+B,OAAuC;AAC1F,MAAI,OAAO,kBAAkB,UAAU;AAEtC,oBAAgB,KAAK,OAAO,eAAe,QAAQ,KAAK,KAAK,IAAI,KAAK,GAAK;AAAA,EAC5E;AAEA,SAAO,OAAO,UAAU,WAAW,MAAM,aAAa,IAAI,KAAK,MAAM,MAAM,aAAa;AACzF;AAPgB;AAaT,IAAM,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM9B,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOX,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOV,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOX,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOV,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOf,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOd,cAAc;AACf;AAWO,IAAK,QAAL,kBAAKC,WAAL;AAKN,EAAAA,OAAA,WAAQ;AAKR,EAAAA,OAAA,eAAY;AAKZ,EAAAA,OAAA,YAAS;AAfE,SAAAA;AAAA,GAAA;","names":["codeBlock","inlineCode","bold","italic","strikethrough","spoiler","Faces"]} \ No newline at end of file
diff --git a/node_modules/@discordjs/formatters/package.json b/node_modules/@discordjs/formatters/package.json
new file mode 100644
index 0000000..3f63f9e
--- /dev/null
+++ b/node_modules/@discordjs/formatters/package.json
@@ -0,0 +1,72 @@
+{
+ "name": "@discordjs/formatters",
+ "version": "0.3.2",
+ "description": "A set of functions to format strings for Discord.",
+ "scripts": {
+ "test": "vitest run",
+ "build": "tsup",
+ "build:docs": "tsc -p tsconfig.docs.json",
+ "lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --format=pretty",
+ "format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty",
+ "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json",
+ "prepack": "yarn build && yarn lint",
+ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/formatters/*'",
+ "release": "cliff-jumper"
+ },
+ "main": "./dist/index.js",
+ "module": "./dist/index.mjs",
+ "typings": "./dist/index.d.ts",
+ "exports": {
+ "types": "./dist/index.d.ts",
+ "import": "./dist/index.mjs",
+ "require": "./dist/index.js"
+ },
+ "directories": {
+ "lib": "src",
+ "test": "__tests__"
+ },
+ "files": [
+ "dist"
+ ],
+ "contributors": [
+ "Crawl <icrawltogo@gmail.com>",
+ "SpaceEEC <spaceeec@yahoo.com>",
+ "Vlad Frangu <kingdgrizzle@gmail.com>",
+ "Aura Román <kyradiscord@gmail.com>"
+ ],
+ "license": "Apache-2.0",
+ "keywords": [],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/discordjs/discord.js.git",
+ "directory": "packages/formatters"
+ },
+ "bugs": {
+ "url": "https://github.com/discordjs/discord.js/issues"
+ },
+ "homepage": "https://discord.js.org",
+ "dependencies": {
+ "discord-api-types": "0.37.50"
+ },
+ "devDependencies": {
+ "@favware/cliff-jumper": "^2.1.1",
+ "@microsoft/api-extractor": "^7.36.4",
+ "@types/node": "16.18.40",
+ "@vitest/coverage-v8": "^0.34.2",
+ "cross-env": "^7.0.3",
+ "eslint": "^8.47.0",
+ "eslint-config-neon": "^0.1.47",
+ "eslint-formatter-pretty": "^5.0.0",
+ "prettier": "^2.8.8",
+ "tsup": "^7.2.0",
+ "turbo": "^1.10.12",
+ "typescript": "^5.1.6",
+ "vitest": "^0.34.2"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ },
+ "publishConfig": {
+ "access": "public"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@discordjs/rest/CHANGELOG.md b/node_modules/@discordjs/rest/CHANGELOG.md
new file mode 100644
index 0000000..aa5311f
--- /dev/null
+++ b/node_modules/@discordjs/rest/CHANGELOG.md
@@ -0,0 +1,302 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+# [@discordjs/rest@2.0.1](https://github.com/discordjs/discord.js/compare/@discordjs/rest@2.0.0...@discordjs/rest@2.0.1) - (2023-08-17)
+
+## Documentation
+
+- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6))
+
+# [@discordjs/rest@2.0.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.7.1...@discordjs/rest@2.0.0) - (2023-07-31)
+
+## Features
+
+- No-de-no-de, now with extra buns (#9683) ([386f206](https://github.com/discordjs/discord.js/commit/386f206caf74a04c426799af9796ca96dcb37056))
+ - **BREAKING CHANGE:** The REST and RequestManager classes now extend AsyncEventEmitter
+from `@vladfrangu/async_event_emitter`, which aids in cross-compatibility
+between Node, Deno, Bun, CF Workers, Vercel Functions, etc.
+ - **BREAKING CHANGE:** DefaultUserAgentAppendix has been adapted to support multiple
+different platforms (previously mentioned Deno, Bun, CF Workers, etc)
+ - **BREAKING CHANGE:** the entry point for `@discordjs/rest` will now differ
+in non-node-like environments (CF Workers, etc.)
+ - **Co-authored-by:** Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
+ - **Co-authored-by:** Jiralite <33201955+Jiralite@users.noreply.github.com>
+ - **Co-authored-by:** suneettipirneni <suneettipirneni@icloud.com>
+- User avatar decorations (#8914) ([8d97017](https://github.com/discordjs/discord.js/commit/8d9701745840e23854e8f0b057d21cb10e7d1d54))
+- Support new username system (#9512) ([1ab60f9](https://github.com/discordjs/discord.js/commit/1ab60f9da4d6b7ea144fa05b97b029a4bfaeede2))
+
+## Refactor
+
+- **REST:** Remove double classing (#9722) ([8f4256d](https://github.com/discordjs/discord.js/commit/8f4256db8a52ac08359d0b3436f41b641ac4e382))
+ - **BREAKING CHANGE:** `REST` and `RequestManager` have been combined, most of the properties, methods, and events from both classes can now be found on `REST`
+ - **BREAKING CHANGE:** `REST#raw` has been removed in favor of `REST#queueRequest`
+ - **BREAKING CHANGE:** `REST#getAgent` has been removed in favor of `REST#agent`
+
+* chore: update for /rest changes
+- **rest:** Switch api to fetch-like and provide strategies (#9416) ([cdaa0a3](https://github.com/discordjs/discord.js/commit/cdaa0a36f586459f1e5ede868c4250c7da90455c))
+ - **BREAKING CHANGE:** NodeJS v18+ is required when using node due to the use of global `fetch`
+ - **BREAKING CHANGE:** The raw method of REST now returns a web compatible `Respone` object.
+ - **BREAKING CHANGE:** The `parseResponse` utility method has been updated to operate on a web compatible `Response` object.
+ - **BREAKING CHANGE:** Many underlying internals have changed, some of which were exported.
+ - **BREAKING CHANGE:** `DefaultRestOptions` used to contain a default `agent`, which is now set to `null` instead.
+
+# [@discordjs/rest@1.7.1](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.7.0...@discordjs/rest@1.7.1) - (2023-05-01)
+
+## Bug Fixes
+
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Documentation
+
+- Reference package names properly (#9426) ([d6bca9b](https://github.com/discordjs/discord.js/commit/d6bca9bb4d976dc069a5039250db7d5b3e9142ef))
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+
+# [@discordjs/rest@2.0.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.7.1...@discordjs/rest@2.0.0) - (2023-07-31)
+
+## Features
+
+- No-de-no-de, now with extra buns (#9683) ([386f206](https://github.com/discordjs/discord.js/commit/386f206caf74a04c426799af9796ca96dcb37056))
+ - **BREAKING CHANGE:** The REST and RequestManager classes now extend AsyncEventEmitter
+from `@vladfrangu/async_event_emitter`, which aids in cross-compatibility
+between Node, Deno, Bun, CF Workers, Vercel Functions, etc.
+ - **BREAKING CHANGE:** DefaultUserAgentAppendix has been adapted to support multiple
+different platforms (previously mentioned Deno, Bun, CF Workers, etc)
+ - **BREAKING CHANGE:** the entry point for `@discordjs/rest` will now differ
+in non-node-like environments (CF Workers, etc.)
+ - **Co-authored-by:** Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
+ - **Co-authored-by:** Jiralite <33201955+Jiralite@users.noreply.github.com>
+ - **Co-authored-by:** suneettipirneni <suneettipirneni@icloud.com>
+- User avatar decorations (#8914) ([8d97017](https://github.com/discordjs/discord.js/commit/8d9701745840e23854e8f0b057d21cb10e7d1d54))
+- Support new username system (#9512) ([1ab60f9](https://github.com/discordjs/discord.js/commit/1ab60f9da4d6b7ea144fa05b97b029a4bfaeede2))
+
+## Refactor
+
+- **REST:** Remove double classing (#9722) ([8f4256d](https://github.com/discordjs/discord.js/commit/8f4256db8a52ac08359d0b3436f41b641ac4e382))
+ - **BREAKING CHANGE:** `REST` and `RequestManager` have been combined, most of the properties, methods, and events from both classes can now be found on `REST`
+ - **BREAKING CHANGE:** `REST#raw` has been removed in favor of `REST#queueRequest`
+ - **BREAKING CHANGE:** `REST#getAgent` has been removed in favor of `REST#agent`
+
+* chore: update for /rest changes
+- **rest:** Switch api to fetch-like and provide strategies (#9416) ([cdaa0a3](https://github.com/discordjs/discord.js/commit/cdaa0a36f586459f1e5ede868c4250c7da90455c))
+ - **BREAKING CHANGE:** NodeJS v18+ is required when using node due to the use of global `fetch`
+ - **BREAKING CHANGE:** The raw method of REST now returns a web compatible `Respone` object.
+ - **BREAKING CHANGE:** The `parseResponse` utility method has been updated to operate on a web compatible `Response` object.
+ - **BREAKING CHANGE:** Many underlying internals have changed, some of which were exported.
+ - **BREAKING CHANGE:** `DefaultRestOptions` used to contain a default `agent`, which is now set to `null` instead.
+
+# [@discordjs/rest@1.7.1](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.7.0...@discordjs/rest@1.7.1) - (2023-05-01)
+
+## Bug Fixes
+
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Documentation
+
+- Reference package names properly (#9426) ([d6bca9b](https://github.com/discordjs/discord.js/commit/d6bca9bb4d976dc069a5039250db7d5b3e9142ef))
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+
+# [@discordjs/rest@1.7.1](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.7.0...@discordjs/rest@1.7.1) - (2023-05-01)
+
+## Bug Fixes
+
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Documentation
+
+- Reference package names properly (#9426) ([d6bca9b](https://github.com/discordjs/discord.js/commit/d6bca9bb4d976dc069a5039250db7d5b3e9142ef))
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+
+# [@discordjs/rest@1.7.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.6.0...@discordjs/rest@1.7.0) - (2023-04-01)
+
+## Bug Fixes
+
+- **handlers:** Create burst handler for interaction callbacks (#8996) ([db8df10](https://github.com/discordjs/discord.js/commit/db8df104c5e70a12f35b54e5f3f7c897068dde6f))
+- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b))
+- **rest:** Remove `const enum`s in favour of regular enums (#9243) ([229ad07](https://github.com/discordjs/discord.js/commit/229ad077ff52d8706d68ed4d31983619a32eba45))
+
+## Features
+
+- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b))
+
+# [@discordjs/rest@1.6.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.5.0...@discordjs/rest@1.6.0) - (2023-03-12)
+
+## Bug Fixes
+
+- **snowflake:** Snowflakes length (#9144) ([955e8fe](https://github.com/discordjs/discord.js/commit/955e8fe312c42ad4937cc1994d1d81e517c413c8))
+- **RequestManager:** Inference of image/apng (#9014) ([ecb4281](https://github.com/discordjs/discord.js/commit/ecb4281d1e2d9a0a427605f75352cbf74ffb2d7c))
+
+## Documentation
+
+- Fix typos (#9127) ([1ba1f23](https://github.com/discordjs/discord.js/commit/1ba1f238f04221ec890fc921678909b5b7d92c26))
+- Fix version export (#9049) ([8b70f49](https://github.com/discordjs/discord.js/commit/8b70f497a1207e30edebdecd12b926c981c13d28))
+
+## Features
+
+- **Sticker:** Add support for gif stickers (#9038) ([6a9875d](https://github.com/discordjs/discord.js/commit/6a9875da054a875a4711394547d47439bbe66fb6))
+- **website:** Add support for source file links (#9048) ([f6506e9](https://github.com/discordjs/discord.js/commit/f6506e99c496683ee0ab67db0726b105b929af38))
+
+## Styling
+
+- Run prettier (#9041) ([2798ba1](https://github.com/discordjs/discord.js/commit/2798ba1eb3d734f0cf2eeccd2e16cfba6804873b))
+
+# [@discordjs/rest@1.5.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.4.0...@discordjs/rest@1.5.0) - (2022-12-16)
+
+## Features
+
+- **core:** Add support for role connections (#8930) ([3d6fa24](https://github.com/discordjs/discord.js/commit/3d6fa248c07b2278504bbe8bafa17a3294971fd9))
+
+# [@discordjs/rest@1.4.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.3.0...@discordjs/rest@1.4.0) - (2022-11-28)
+
+## Bug Fixes
+
+- **SequentialHandler:** Downlevel ECONNRESET errors (#8785) ([5a70057](https://github.com/discordjs/discord.js/commit/5a70057826b47fb8251f3d836a536de689444ca1))
+- Make ratelimit timeout require event loop to be active (#8779) ([68d5712](https://github.com/discordjs/discord.js/commit/68d5712deae85532604d93b4505f0953d664cde7))
+- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4))
+
+## Features
+
+- Add `@discordjs/core` (#8736) ([2127b32](https://github.com/discordjs/discord.js/commit/2127b32d26dedeb44ec43d16ec2e2046919f9bb0))
+- New select menus (#8793) ([5152abf](https://github.com/discordjs/discord.js/commit/5152abf7285581abf7689e9050fdc56c4abb1e2b))
+
+## Refactor
+
+- Update `makeURLSearchParams` to accept readonly non-`Record`s (#8868) ([8376e2d](https://github.com/discordjs/discord.js/commit/8376e2dbcd38697ce62615d9a539fd198fbc4713))
+
+# [@discordjs/rest@1.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.2.0...@discordjs/rest@1.3.0) - (2022-10-08)
+
+## Bug Fixes
+
+- **SequentialHandler:** Throw http error with proper name and more useful message (#8694) ([3f86561](https://github.com/discordjs/discord.js/commit/3f8656115bf9df0dbf8391de68a3401535325895))
+
+## Features
+
+- Web-components (#8715) ([0ac3e76](https://github.com/discordjs/discord.js/commit/0ac3e766bd9dbdeb106483fa4bb085d74de346a2))
+- Add `@discordjs/util` (#8591) ([b2ec865](https://github.com/discordjs/discord.js/commit/b2ec865765bf94181473864a627fb63ea8173fd3))
+- Add `AbortSignal` support (#8672) ([3c231ae](https://github.com/discordjs/discord.js/commit/3c231ae81a52b66940ba495f35fd59a76c65e306))
+
+# [@discordjs/rest@1.2.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.1.0...@discordjs/rest@1.2.0) - (2022-09-25)
+
+## Bug Fixes
+
+- Footer / sidebar / deprecation alert ([ba3e0ed](https://github.com/discordjs/discord.js/commit/ba3e0ed348258fe8e51eefb4aa7379a1230616a9))
+
+## Documentation
+
+- Change name (#8604) ([dd5a089](https://github.com/discordjs/discord.js/commit/dd5a08944c258a847fc4377f1d5e953264ab47d0))
+
+## Features
+
+- **rest:** Use Agent with higher connect timeout (#8679) ([64cd53c](https://github.com/discordjs/discord.js/commit/64cd53c4c23dd9c9503fd0887ac5c542137c57e8))
+
+## Refactor
+
+- Website components (#8600) ([c334157](https://github.com/discordjs/discord.js/commit/c3341570d983aea9ecc419979d5a01de658c9d67))
+- Use `eslint-config-neon` for packages. (#8579) ([edadb9f](https://github.com/discordjs/discord.js/commit/edadb9fe5dfd9ff51a3cfc9b25cb242d3f9f5241))
+
+# [@discordjs/rest@1.1.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.0.1...@discordjs/rest@1.1.0) - (2022-08-22)
+
+## Features
+
+- **website:** Show `constructor` information (#8540) ([e42fd16](https://github.com/discordjs/discord.js/commit/e42fd1636973b10dd7ed6fb4280ee1a4a8f82007))
+- **website:** Render `@defaultValue` blocks (#8527) ([8028813](https://github.com/discordjs/discord.js/commit/8028813825e7708915ea892760c1003afd60df2f))
+- **WebSocketShard:** Support new resume url (#8480) ([bc06cc6](https://github.com/discordjs/discord.js/commit/bc06cc638d2f57ab5c600e8cdb6afc8eb2180166))
+
+## Refactor
+
+- Docs design (#8487) ([4ab1d09](https://github.com/discordjs/discord.js/commit/4ab1d09997a18879a9eb9bda39df6f15aa22557e))
+
+# [@discordjs/rest@0.6.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@0.5.0...@discordjs/rest@0.6.0) - (2022-07-17)
+
+## Documentation
+
+- Add codecov coverage badge to readmes (#8226) ([f6db285](https://github.com/discordjs/discord.js/commit/f6db285c073898a749fe4591cbd4463d1896daf5))
+
+## Features
+
+- **builder:** Add max min length in string option (#8214) ([96c8d21](https://github.com/discordjs/discord.js/commit/96c8d21f95eb366c46ae23505ba9054f44821b25))
+- Codecov (#8219) ([f10f4cd](https://github.com/discordjs/discord.js/commit/f10f4cdcd88ca6be7ec735ed3a415ba13da83db0))
+- **docgen:** Update typedoc ([b3346f4](https://github.com/discordjs/discord.js/commit/b3346f4b9b3d4f96443506643d4631dc1c6d7b21))
+- Website (#8043) ([127931d](https://github.com/discordjs/discord.js/commit/127931d1df7a2a5c27923c2f2151dbf3824e50cc))
+- **docgen:** Typescript support ([3279b40](https://github.com/discordjs/discord.js/commit/3279b40912e6aa61507bedb7db15a2b8668de44b))
+- Docgen package (#8029) ([8b979c0](https://github.com/discordjs/discord.js/commit/8b979c0245c42fd824d8e98745ee869f5360fc86))
+- Use vitest instead of jest for more speed ([8d8e6c0](https://github.com/discordjs/discord.js/commit/8d8e6c03decd7352a2aa180f6e5bc1a13602539b))
+- Add scripts package for locally used scripts ([f2ae1f9](https://github.com/discordjs/discord.js/commit/f2ae1f9348bfd893332a9060f71a8a5f272a1b8b))
+
+## Refactor
+
+- **rest:** Add content-type(s) to uploads (#8290) ([103a358](https://github.com/discordjs/discord.js/commit/103a3584c95a7b7f57fa62d47b86520d5ec32303))
+- **collection:** Remove default export (#8053) ([16810f3](https://github.com/discordjs/discord.js/commit/16810f3e410bf35ed7e6e7412d517ea74c792c5d))
+- Move all the config files to root (#8033) ([769ea0b](https://github.com/discordjs/discord.js/commit/769ea0bfe78c4f1d413c6b397c604ffe91e39c6a))
+
+# [@discordjs/rest@0.5.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@0.4.0...@discordjs/rest@0.5.0) - (2022-06-04)
+
+## Bug Fixes
+
+- **REST:** Remove dom types (#7922) ([e92b17d](https://github.com/discordjs/discord.js/commit/e92b17d8555164ff259e524efc6a26675660e5c2))
+- Ok statusCode can be 200..299 (#7919) ([d1504f2](https://github.com/discordjs/discord.js/commit/d1504f2ae19816b3fadcdb3ad17facc863ed7529))
+
+## Features
+
+- **rest:** Add guild member banner cdn url (#7973) ([97eaab3](https://github.com/discordjs/discord.js/commit/97eaab35d7383ecbbd93dc623ceda969286c1554))
+- REST#raw (#7929) ([dfe449c](https://github.com/discordjs/discord.js/commit/dfe449c253b617e8f92c720a2f71135aa1601a65))
+- **rest:** Use undici (#7747) ([d1ec8c3](https://github.com/discordjs/discord.js/commit/d1ec8c37ffb7fe3b63eaa8c382f22ca1fb348c9b))
+- **REST:** Enable setting default authPrefix (#7853) ([679dcda](https://github.com/discordjs/discord.js/commit/679dcda9709376f37cc58a60f74d12d324d93e4e))
+
+## Styling
+
+- Cleanup tests and tsup configs ([6b8ef20](https://github.com/discordjs/discord.js/commit/6b8ef20cb3af5b5cfd176dd0aa0a1a1e98551629))
+
+# [@discordjs/rest@0.4.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@0.3.0...@discordjs/rest@0.4.0) - (2022-04-17)
+
+## Bug Fixes
+
+- **gateway:** Use version 10 (#7689) ([8880de0](https://github.com/discordjs/discord.js/commit/8880de0cecdf273fd6df23988e4cb77774a75390))
+- **RequestHandler:** Only reset tokens for authenticated 401s (#7508) ([b9ff7b0](https://github.com/discordjs/discord.js/commit/b9ff7b057379a47ce13265f78e21bf0d55feaf0a))
+- **ci:** Ci error (#7454) ([0af9bc8](https://github.com/discordjs/discord.js/commit/0af9bc841ffe1a297d308500d696bad4b85abda9))
+- Use png as extension for defaultAvatarURL (#7414) ([538e9ce](https://github.com/discordjs/discord.js/commit/538e9cef459d00d74b9bd6852da3ce2acac9bae5))
+- **rest:** Sublimit all requests on unhandled routes (#7366) ([733ac82](https://github.com/discordjs/discord.js/commit/733ac82d5dffabc622fb59e06d06e83396734dc6))
+- Fix some typos (#7393) ([92a04f4](https://github.com/discordjs/discord.js/commit/92a04f4d98f6c6760214034cc8f5a1eaa78893c7))
+
+## Documentation
+
+- Enhance /rest README (#7757) ([a1329bd](https://github.com/discordjs/discord.js/commit/a1329bd3ebafc6d5b5e2788ff082674f01b726f3))
+
+## Features
+
+- Add `makeURLSearchParams` utility function (#7744) ([8eaec11](https://github.com/discordjs/discord.js/commit/8eaec114a98026024c21545988860c123948c55d))
+- Add API v10 support (#7477) ([72577c4](https://github.com/discordjs/discord.js/commit/72577c4bfd02524a27afb6ff4aebba9301a690d3))
+- Add support for module: NodeNext in TS and ESM (#7598) ([8f1986a](https://github.com/discordjs/discord.js/commit/8f1986a6aa98365e09b00e84ad5f9f354ab61f3d))
+- **builders:** Add attachment command option type (#7203) ([ae0f35f](https://github.com/discordjs/discord.js/commit/ae0f35f51d68dfa5a7dc43d161ef9365171debdb))
+- **cdn:** Add support for scheduled event image covers (#7335) ([ac26d9b](https://github.com/discordjs/discord.js/commit/ac26d9b1307d63e116b043505e5f925db7ed01aa))
+
+## Refactor
+
+- **requestmanager:** Use timestampfrom (#7459) ([3298510](https://github.com/discordjs/discord.js/commit/32985109c3b7614d364007608f8c5af4bed753ae))
+- **files:** Remove redundant file property names (#7340) ([6725038](https://github.com/discordjs/discord.js/commit/67250382f99872a9edff99ebaa482ffa895b0c37))
+
+# [@discordjs/rest@0.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@0.2.0...@discordjs/rest@0.3.0) - (2022-01-24)
+
+## Bug Fixes
+
+- **rest:** Don't add empty query (#7308) ([d0fa5aa](https://github.com/discordjs/discord.js/commit/d0fa5aaa26d316608120bca3050e14eefbe2f93b))
+- **rest:** Use http agent when protocol is not https (#7309) ([d8ea572](https://github.com/discordjs/discord.js/commit/d8ea572fb8a51f2f6a902c4926e814017d115708))
+- `ref` delay for rate limited requests (#7239) ([ed0cfd9](https://github.com/discordjs/discord.js/commit/ed0cfd91edc3a2b23a34a8ecd9db38baa12b52fa))
+
+## Documentation
+
+- Fix a typo and use milliseconds instead of ms (#7251) ([0dd56af](https://github.com/discordjs/discord.js/commit/0dd56afe1cdf16f1e7d9afe1f8c29c31d1833a25))
+
+## Features
+
+- Rest hash and handler sweeping (#7255) ([3bb4829](https://github.com/discordjs/discord.js/commit/3bb48298004d292214c6cb8f927c2fea78a42952))
+- Rest docs (#7281) ([9054f2f](https://github.com/discordjs/discord.js/commit/9054f2f7ad7f246431e5f53403535bf301c27a80))
+
+## Refactor
+
+- **files:** File data can be much more than buffer (#7238) ([86ab526](https://github.com/discordjs/discord.js/commit/86ab526d493415b14b79b51d08c3677897d219ee))
+- **rest:** Rename attachment to file (#7199) ([c969cbf](https://github.com/discordjs/discord.js/commit/c969cbf6524093757d47108b6a55e62dcb210e8b))
+
+## Testing
+
+- **voice:** Fix tests ([62c74b8](https://github.com/discordjs/discord.js/commit/62c74b8333066465e5bd295b8b102b35a506751d))
diff --git a/node_modules/@discordjs/rest/LICENSE b/node_modules/@discordjs/rest/LICENSE
new file mode 100644
index 0000000..f9d970e
--- /dev/null
+++ b/node_modules/@discordjs/rest/LICENSE
@@ -0,0 +1,192 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+Copyright 2021 Noel Buechler
+Copyright 2021 Vlad Frangu
+Copyright 2021 Aura Román
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/node_modules/@discordjs/rest/README.md b/node_modules/@discordjs/rest/README.md
new file mode 100644
index 0000000..243b28c
--- /dev/null
+++ b/node_modules/@discordjs/rest/README.md
@@ -0,0 +1,137 @@
+<div align="center">
+ <br />
+ <p>
+ <a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
+ </p>
+ <br />
+ <p>
+ <a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
+ <a href="https://www.npmjs.com/package/@discordjs/rest"><img src="https://img.shields.io/npm/v/@discordjs/rest.svg?maxAge=3600" alt="npm version" /></a>
+ <a href="https://www.npmjs.com/package/@discordjs/rest"><img src="https://img.shields.io/npm/dt/@discordjs/rest.svg?maxAge=3600" alt="npm downloads" /></a>
+ <a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Tests status" /></a>
+ <a href="https://codecov.io/gh/discordjs/discord.js" ><img src="https://codecov.io/gh/discordjs/discord.js/branch/main/graph/badge.svg?precision=2&flag=rest" alt="Code coverage" /></a>
+ </p>
+ <p>
+ <a href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-vercel.svg" alt="Vercel" /></a>
+ <a href="https://www.cloudflare.com"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-workers.png" alt="Cloudflare Workers" height="44" /></a>
+ </p>
+</div>
+
+## About
+
+`@discordjs/rest` is a module that allows you to easily make REST requests to the Discord API.
+
+## Installation
+
+**Node.js 16.11.0 or newer is required.**
+
+Note: native fetch (not recommended) is unavailable in this node version, either use a newer node version or use the more performant `undiciRequest` strategy (default)
+
+```sh
+npm install @discordjs/rest
+yarn add @discordjs/rest
+pnpm add @discordjs/rest
+```
+
+## Examples
+
+Install all required dependencies:
+
+```sh
+npm install @discordjs/rest discord-api-types
+yarn add @discordjs/rest discord-api-types
+pnpm add @discordjs/rest discord-api-types
+```
+
+Send a basic message:
+
+```js
+import { REST } from '@discordjs/rest';
+import { Routes } from 'discord-api-types/v10';
+
+const rest = new REST({ version: '10' }).setToken(TOKEN);
+
+try {
+ await rest.post(Routes.channelMessages(CHANNEL_ID), {
+ body: {
+ content: 'A message via REST!',
+ },
+ });
+} catch (error) {
+ console.error(error);
+}
+```
+
+Create a thread from an existing message to be archived after 60 minutes of inactivity:
+
+```js
+import { REST } from '@discordjs/rest';
+import { Routes } from 'discord-api-types/v10';
+
+const rest = new REST({ version: '10' }).setToken(TOKEN);
+
+try {
+ await rest.post(Routes.threads(CHANNEL_ID, MESSAGE_ID), {
+ body: {
+ name: 'Thread',
+ auto_archive_duration: 60,
+ },
+ });
+} catch (error) {
+ console.error(error);
+}
+```
+
+Send a basic message in an edge environment:
+
+```js
+import { REST } from '@discordjs/rest';
+import { Routes } from 'discord-api-types/v10';
+
+const rest = new REST({ version: '10', makeRequest: fetch }).setToken(TOKEN);
+
+try {
+ await rest.post(Routes.channelMessages(CHANNEL_ID), {
+ body: {
+ content: 'A message via REST from the edge!',
+ },
+ });
+} catch (error) {
+ console.error(error);
+}
+```
+
+## Links
+
+- [Website][website] ([source][website-source])
+- [Documentation][documentation]
+- [Guide][guide] ([source][guide-source])
+ Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library.
+- [discord.js Discord server][discord]
+- [Discord API Discord server][discord-api]
+- [GitHub][source]
+- [npm][npm]
+- [Related libraries][related-libs]
+
+## Contributing
+
+Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
+[documentation][documentation].
+See [the contribution guide][contributing] if you'd like to submit a PR.
+
+## Help
+
+If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord].
+
+[website]: https://discord.js.org
+[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
+[documentation]: https://discord.js.org/docs/packages/rest/stable
+[guide]: https://discordjs.guide/
+[guide-source]: https://github.com/discordjs/guide
+[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
+[discord]: https://discord.gg/djs
+[discord-api]: https://discord.gg/discord-api
+[source]: https://github.com/discordjs/discord.js/tree/main/packages/rest
+[npm]: https://www.npmjs.com/package/@discordjs/rest
+[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries
+[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md
diff --git a/node_modules/@discordjs/rest/dist/index.d.mts b/node_modules/@discordjs/rest/dist/index.d.mts
new file mode 100644
index 0000000..2417e2e
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/index.d.mts
@@ -0,0 +1,510 @@
+import { R as ResponseLike, a as RawFile, I as InternalRequest, b as RateLimitData, c as RestEventsMap, H as HashData, d as IHandler, e as RESTOptions, f as RouteLike, g as RequestData } from './types-65527f29.js';
+export { A as APIRequest, m as HandlerRequestData, j as InvalidRequestWarningData, i as RateLimitQueueFilter, k as RequestHeaders, l as RequestMethod, h as RestEvents, n as RouteData } from './types-65527f29.js';
+import * as url from 'url';
+import { Snowflake } from 'discord-api-types/v10';
+import * as undici from 'undici';
+import { Dispatcher } from 'undici';
+import { Collection } from '@discordjs/collection';
+import { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';
+import 'node:stream';
+import 'node:stream/web';
+
+declare const DefaultUserAgent: `DiscordBot (https://discord.js.org, ${string})`;
+/**
+ * The default string to append onto the user agent.
+ */
+declare const DefaultUserAgentAppendix: string;
+declare const DefaultRestOptions: {
+ readonly agent: null;
+ readonly api: "https://discord.com/api";
+ readonly authPrefix: "Bot";
+ readonly cdn: "https://cdn.discordapp.com";
+ readonly headers: {};
+ readonly invalidRequestWarningInterval: 0;
+ readonly globalRequestsPerSecond: 50;
+ readonly offset: 50;
+ readonly rejectOnRateLimit: null;
+ readonly retries: 3;
+ readonly timeout: 15000;
+ readonly userAgentAppendix: string;
+ readonly version: "10";
+ readonly hashSweepInterval: 14400000;
+ readonly hashLifetime: 86400000;
+ readonly handlerSweepInterval: 3600000;
+ readonly makeRequest: (url: string, init: undici.RequestInit) => Promise<ResponseLike>;
+};
+/**
+ * The events that the REST manager emits
+ */
+declare enum RESTEvents {
+ Debug = "restDebug",
+ HandlerSweep = "handlerSweep",
+ HashSweep = "hashSweep",
+ InvalidRequestWarning = "invalidRequestWarning",
+ RateLimited = "rateLimited",
+ Response = "response"
+}
+declare const ALLOWED_EXTENSIONS: readonly ["webp", "png", "jpg", "jpeg", "gif"];
+declare const ALLOWED_STICKER_EXTENSIONS: readonly ["png", "json", "gif"];
+declare const ALLOWED_SIZES: readonly [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
+type ImageExtension = (typeof ALLOWED_EXTENSIONS)[number];
+type StickerExtension = (typeof ALLOWED_STICKER_EXTENSIONS)[number];
+type ImageSize = (typeof ALLOWED_SIZES)[number];
+declare const OverwrittenMimeTypes: {
+ readonly 'image/apng': "image/png";
+};
+declare const BurstHandlerMajorIdKey = "burst";
+
+/**
+ * The options used for image URLs
+ */
+interface BaseImageURLOptions {
+ /**
+ * The extension to use for the image URL
+ *
+ * @defaultValue `'webp'`
+ */
+ extension?: ImageExtension;
+ /**
+ * The size specified in the image URL
+ */
+ size?: ImageSize;
+}
+/**
+ * The options used for image URLs with animated content
+ */
+interface ImageURLOptions extends BaseImageURLOptions {
+ /**
+ * Whether or not to prefer the static version of an image asset.
+ */
+ forceStatic?: boolean;
+}
+/**
+ * The options to use when making a CDN URL
+ */
+interface MakeURLOptions {
+ /**
+ * The allowed extensions that can be used
+ */
+ allowedExtensions?: readonly string[];
+ /**
+ * The extension to use for the image URL
+ *
+ * @defaultValue `'webp'`
+ */
+ extension?: string | undefined;
+ /**
+ * The size specified in the image URL
+ */
+ size?: ImageSize;
+}
+/**
+ * The CDN link builder
+ */
+declare class CDN {
+ private readonly base;
+ constructor(base?: string);
+ /**
+ * Generates an app asset URL for a client's asset.
+ *
+ * @param clientId - The client id that has the asset
+ * @param assetHash - The hash provided by Discord for this asset
+ * @param options - Optional options for the asset
+ */
+ appAsset(clientId: string, assetHash: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates an app icon URL for a client's icon.
+ *
+ * @param clientId - The client id that has the icon
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ appIcon(clientId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates an avatar URL, e.g. for a user or a webhook.
+ *
+ * @param id - The id that has the icon
+ * @param avatarHash - The hash provided by Discord for this avatar
+ * @param options - Optional options for the avatar
+ */
+ avatar(id: string, avatarHash: string, options?: Readonly<ImageURLOptions>): string;
+ /**
+ * Generates a user avatar decoration URL.
+ *
+ * @param userId - The id of the user
+ * @param userAvatarDecoration - The hash provided by Discord for this avatar decoration
+ * @param options - Optional options for the avatar decoration
+ */
+ avatarDecoration(userId: string, userAvatarDecoration: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates a banner URL, e.g. for a user or a guild.
+ *
+ * @param id - The id that has the banner splash
+ * @param bannerHash - The hash provided by Discord for this banner
+ * @param options - Optional options for the banner
+ */
+ banner(id: string, bannerHash: string, options?: Readonly<ImageURLOptions>): string;
+ /**
+ * Generates an icon URL for a channel, e.g. a group DM.
+ *
+ * @param channelId - The channel id that has the icon
+ * @param iconHash - The hash provided by Discord for this channel
+ * @param options - Optional options for the icon
+ */
+ channelIcon(channelId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates a default avatar URL
+ *
+ * @param index - The default avatar index
+ * @remarks
+ * To calculate the index for a user do `(userId >> 22) % 6`,
+ * or `discriminator % 5` if they're using the legacy username system.
+ */
+ defaultAvatar(index: number): string;
+ /**
+ * Generates a discovery splash URL for a guild's discovery splash.
+ *
+ * @param guildId - The guild id that has the discovery splash
+ * @param splashHash - The hash provided by Discord for this splash
+ * @param options - Optional options for the splash
+ */
+ discoverySplash(guildId: string, splashHash: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates an emoji's URL for an emoji.
+ *
+ * @param emojiId - The emoji id
+ * @param extension - The extension of the emoji
+ */
+ emoji(emojiId: string, extension?: ImageExtension): string;
+ /**
+ * Generates a guild member avatar URL.
+ *
+ * @param guildId - The id of the guild
+ * @param userId - The id of the user
+ * @param avatarHash - The hash provided by Discord for this avatar
+ * @param options - Optional options for the avatar
+ */
+ guildMemberAvatar(guildId: string, userId: string, avatarHash: string, options?: Readonly<ImageURLOptions>): string;
+ /**
+ * Generates a guild member banner URL.
+ *
+ * @param guildId - The id of the guild
+ * @param userId - The id of the user
+ * @param bannerHash - The hash provided by Discord for this banner
+ * @param options - Optional options for the banner
+ */
+ guildMemberBanner(guildId: string, userId: string, bannerHash: string, options?: Readonly<ImageURLOptions>): string;
+ /**
+ * Generates an icon URL, e.g. for a guild.
+ *
+ * @param id - The id that has the icon splash
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ icon(id: string, iconHash: string, options?: Readonly<ImageURLOptions>): string;
+ /**
+ * Generates a URL for the icon of a role
+ *
+ * @param roleId - The id of the role that has the icon
+ * @param roleIconHash - The hash provided by Discord for this role icon
+ * @param options - Optional options for the role icon
+ */
+ roleIcon(roleId: string, roleIconHash: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates a guild invite splash URL for a guild's invite splash.
+ *
+ * @param guildId - The guild id that has the invite splash
+ * @param splashHash - The hash provided by Discord for this splash
+ * @param options - Optional options for the splash
+ */
+ splash(guildId: string, splashHash: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates a sticker URL.
+ *
+ * @param stickerId - The sticker id
+ * @param extension - The extension of the sticker
+ * @privateRemarks
+ * Stickers cannot have a `.webp` extension, so we default to a `.png`
+ */
+ sticker(stickerId: string, extension?: StickerExtension): string;
+ /**
+ * Generates a sticker pack banner URL.
+ *
+ * @param bannerId - The banner id
+ * @param options - Optional options for the banner
+ */
+ stickerPackBanner(bannerId: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates a team icon URL for a team's icon.
+ *
+ * @param teamId - The team id that has the icon
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ teamIcon(teamId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates a cover image for a guild scheduled event.
+ *
+ * @param scheduledEventId - The scheduled event id
+ * @param coverHash - The hash provided by discord for this cover image
+ * @param options - Optional options for the cover image
+ */
+ guildScheduledEventCover(scheduledEventId: string, coverHash: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.
+ *
+ * @param route - The base cdn route
+ * @param hash - The hash provided by Discord for this icon
+ * @param options - Optional options for the link
+ */
+ private dynamicMakeURL;
+ /**
+ * Constructs the URL for the resource
+ *
+ * @param route - The base cdn route
+ * @param options - The extension/size options for the link
+ */
+ private makeURL;
+}
+
+interface DiscordErrorFieldInformation {
+ code: string;
+ message: string;
+}
+interface DiscordErrorGroupWrapper {
+ _errors: DiscordError[];
+}
+type DiscordError = DiscordErrorFieldInformation | DiscordErrorGroupWrapper | string | {
+ [k: string]: DiscordError;
+};
+interface DiscordErrorData {
+ code: number;
+ errors?: DiscordError;
+ message: string;
+}
+interface OAuthErrorData {
+ error: string;
+ error_description?: string;
+}
+interface RequestBody {
+ files: RawFile[] | undefined;
+ json: unknown | undefined;
+}
+/**
+ * Represents an API error returned by Discord
+ */
+declare class DiscordAPIError extends Error {
+ rawError: DiscordErrorData | OAuthErrorData;
+ code: number | string;
+ status: number;
+ method: string;
+ url: string;
+ requestBody: RequestBody;
+ /**
+ * @param rawError - The error reported by Discord
+ * @param code - The error code reported by Discord
+ * @param status - The status code of the response
+ * @param method - The method of the request that erred
+ * @param url - The url of the request that erred
+ * @param bodyData - The unparsed data for the request that errored
+ */
+ constructor(rawError: DiscordErrorData | OAuthErrorData, code: number | string, status: number, method: string, url: string, bodyData: Pick<InternalRequest, 'body' | 'files'>);
+ /**
+ * The name of the error
+ */
+ get name(): string;
+ private static getMessage;
+ private static flattenDiscordError;
+}
+
+/**
+ * Represents a HTTP error
+ */
+declare class HTTPError extends Error {
+ status: number;
+ method: string;
+ url: string;
+ requestBody: RequestBody;
+ name: string;
+ /**
+ * @param status - The status code of the response
+ * @param statusText - The status text of the response
+ * @param method - The method of the request that erred
+ * @param url - The url of the request that erred
+ * @param bodyData - The unparsed data for the request that errored
+ */
+ constructor(status: number, statusText: string, method: string, url: string, bodyData: Pick<InternalRequest, 'body' | 'files'>);
+}
+
+declare class RateLimitError extends Error implements RateLimitData {
+ timeToReset: number;
+ limit: number;
+ method: string;
+ hash: string;
+ url: string;
+ route: string;
+ majorParameter: string;
+ global: boolean;
+ constructor({ timeToReset, limit, method, hash, url, route, majorParameter, global }: RateLimitData);
+ /**
+ * The name of the error
+ */
+ get name(): string;
+}
+
+/**
+ * Represents the class that manages handlers for endpoints
+ */
+declare class REST extends AsyncEventEmitter<RestEventsMap> {
+ #private;
+ /**
+ * The {@link https://undici.nodejs.org/#/docs/api/Agent | Agent} for all requests
+ * performed by this manager.
+ */
+ agent: Dispatcher | null;
+ readonly cdn: CDN;
+ /**
+ * The number of requests remaining in the global bucket
+ */
+ globalRemaining: number;
+ /**
+ * The promise used to wait out the global rate limit
+ */
+ globalDelay: Promise<void> | null;
+ /**
+ * The timestamp at which the global bucket resets
+ */
+ globalReset: number;
+ /**
+ * API bucket hashes that are cached from provided routes
+ */
+ readonly hashes: Collection<string, HashData>;
+ /**
+ * Request handlers created from the bucket hash and the major parameters
+ */
+ readonly handlers: Collection<string, IHandler>;
+ private hashTimer;
+ private handlerTimer;
+ readonly options: RESTOptions;
+ constructor(options?: Partial<RESTOptions>);
+ private setupSweepers;
+ /**
+ * Runs a get request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ get(fullRoute: RouteLike, options?: RequestData): Promise<unknown>;
+ /**
+ * Runs a delete request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ delete(fullRoute: RouteLike, options?: RequestData): Promise<unknown>;
+ /**
+ * Runs a post request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ post(fullRoute: RouteLike, options?: RequestData): Promise<unknown>;
+ /**
+ * Runs a put request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ put(fullRoute: RouteLike, options?: RequestData): Promise<unknown>;
+ /**
+ * Runs a patch request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ patch(fullRoute: RouteLike, options?: RequestData): Promise<unknown>;
+ /**
+ * Runs a request from the api
+ *
+ * @param options - Request options
+ */
+ request(options: InternalRequest): Promise<unknown>;
+ /**
+ * Sets the default agent to use for requests performed by this manager
+ *
+ * @param agent - The agent to use
+ */
+ setAgent(agent: Dispatcher): this;
+ /**
+ * Sets the authorization token that should be used for requests
+ *
+ * @param token - The authorization token to use
+ */
+ setToken(token: string): this;
+ /**
+ * Queues a request to be sent
+ *
+ * @param request - All the information needed to make a request
+ * @returns The response from the api request
+ */
+ queueRequest(request: InternalRequest): Promise<ResponseLike>;
+ /**
+ * Creates a new rate limit handler from a hash, based on the hash and the major parameter
+ *
+ * @param hash - The hash for the route
+ * @param majorParameter - The major parameter for this handler
+ * @internal
+ */
+ private createHandler;
+ /**
+ * Formats the request data to a usable format for fetch
+ *
+ * @param request - The request data
+ */
+ private resolveRequest;
+ /**
+ * Stops the hash sweeping interval
+ */
+ clearHashSweeper(): void;
+ /**
+ * Stops the request handler sweeping interval
+ */
+ clearHandlerSweeper(): void;
+ /**
+ * Generates route data for an endpoint:method
+ *
+ * @param endpoint - The raw endpoint to generalize
+ * @param method - The HTTP method this endpoint is called without
+ * @internal
+ */
+ private static generateRouteData;
+}
+
+/**
+ * Creates and populates an URLSearchParams instance from an object, stripping
+ * out null and undefined values, while also coercing non-strings to strings.
+ *
+ * @param options - The options to use
+ * @returns A populated URLSearchParams instance
+ */
+declare function makeURLSearchParams<T extends object>(options?: Readonly<T>): url.URLSearchParams;
+/**
+ * Converts the response to usable data
+ *
+ * @param res - The fetch response
+ */
+declare function parseResponse(res: ResponseLike): Promise<unknown>;
+/**
+ * Calculates the default avatar index for a given user id.
+ *
+ * @param userId - The user id to calculate the default avatar index for
+ */
+declare function calculateUserDefaultAvatarIndex(userId: Snowflake): number;
+
+/**
+ * The {@link https://github.com/discordjs/discord.js/blob/main/packages/rest/#readme | @discordjs/rest} version
+ * that you are currently using.
+ */
+declare const version: string;
+
+export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, DiscordErrorData, HTTPError, HashData, ImageExtension, ImageSize, ImageURLOptions, InternalRequest, MakeURLOptions, OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, RESTOptions, RateLimitData, RateLimitError, RawFile, RequestBody, RequestData, ResponseLike, RestEventsMap, RouteLike, StickerExtension, calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse, version };
diff --git a/node_modules/@discordjs/rest/dist/index.d.ts b/node_modules/@discordjs/rest/dist/index.d.ts
new file mode 100644
index 0000000..2417e2e
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/index.d.ts
@@ -0,0 +1,510 @@
+import { R as ResponseLike, a as RawFile, I as InternalRequest, b as RateLimitData, c as RestEventsMap, H as HashData, d as IHandler, e as RESTOptions, f as RouteLike, g as RequestData } from './types-65527f29.js';
+export { A as APIRequest, m as HandlerRequestData, j as InvalidRequestWarningData, i as RateLimitQueueFilter, k as RequestHeaders, l as RequestMethod, h as RestEvents, n as RouteData } from './types-65527f29.js';
+import * as url from 'url';
+import { Snowflake } from 'discord-api-types/v10';
+import * as undici from 'undici';
+import { Dispatcher } from 'undici';
+import { Collection } from '@discordjs/collection';
+import { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';
+import 'node:stream';
+import 'node:stream/web';
+
+declare const DefaultUserAgent: `DiscordBot (https://discord.js.org, ${string})`;
+/**
+ * The default string to append onto the user agent.
+ */
+declare const DefaultUserAgentAppendix: string;
+declare const DefaultRestOptions: {
+ readonly agent: null;
+ readonly api: "https://discord.com/api";
+ readonly authPrefix: "Bot";
+ readonly cdn: "https://cdn.discordapp.com";
+ readonly headers: {};
+ readonly invalidRequestWarningInterval: 0;
+ readonly globalRequestsPerSecond: 50;
+ readonly offset: 50;
+ readonly rejectOnRateLimit: null;
+ readonly retries: 3;
+ readonly timeout: 15000;
+ readonly userAgentAppendix: string;
+ readonly version: "10";
+ readonly hashSweepInterval: 14400000;
+ readonly hashLifetime: 86400000;
+ readonly handlerSweepInterval: 3600000;
+ readonly makeRequest: (url: string, init: undici.RequestInit) => Promise<ResponseLike>;
+};
+/**
+ * The events that the REST manager emits
+ */
+declare enum RESTEvents {
+ Debug = "restDebug",
+ HandlerSweep = "handlerSweep",
+ HashSweep = "hashSweep",
+ InvalidRequestWarning = "invalidRequestWarning",
+ RateLimited = "rateLimited",
+ Response = "response"
+}
+declare const ALLOWED_EXTENSIONS: readonly ["webp", "png", "jpg", "jpeg", "gif"];
+declare const ALLOWED_STICKER_EXTENSIONS: readonly ["png", "json", "gif"];
+declare const ALLOWED_SIZES: readonly [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
+type ImageExtension = (typeof ALLOWED_EXTENSIONS)[number];
+type StickerExtension = (typeof ALLOWED_STICKER_EXTENSIONS)[number];
+type ImageSize = (typeof ALLOWED_SIZES)[number];
+declare const OverwrittenMimeTypes: {
+ readonly 'image/apng': "image/png";
+};
+declare const BurstHandlerMajorIdKey = "burst";
+
+/**
+ * The options used for image URLs
+ */
+interface BaseImageURLOptions {
+ /**
+ * The extension to use for the image URL
+ *
+ * @defaultValue `'webp'`
+ */
+ extension?: ImageExtension;
+ /**
+ * The size specified in the image URL
+ */
+ size?: ImageSize;
+}
+/**
+ * The options used for image URLs with animated content
+ */
+interface ImageURLOptions extends BaseImageURLOptions {
+ /**
+ * Whether or not to prefer the static version of an image asset.
+ */
+ forceStatic?: boolean;
+}
+/**
+ * The options to use when making a CDN URL
+ */
+interface MakeURLOptions {
+ /**
+ * The allowed extensions that can be used
+ */
+ allowedExtensions?: readonly string[];
+ /**
+ * The extension to use for the image URL
+ *
+ * @defaultValue `'webp'`
+ */
+ extension?: string | undefined;
+ /**
+ * The size specified in the image URL
+ */
+ size?: ImageSize;
+}
+/**
+ * The CDN link builder
+ */
+declare class CDN {
+ private readonly base;
+ constructor(base?: string);
+ /**
+ * Generates an app asset URL for a client's asset.
+ *
+ * @param clientId - The client id that has the asset
+ * @param assetHash - The hash provided by Discord for this asset
+ * @param options - Optional options for the asset
+ */
+ appAsset(clientId: string, assetHash: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates an app icon URL for a client's icon.
+ *
+ * @param clientId - The client id that has the icon
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ appIcon(clientId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates an avatar URL, e.g. for a user or a webhook.
+ *
+ * @param id - The id that has the icon
+ * @param avatarHash - The hash provided by Discord for this avatar
+ * @param options - Optional options for the avatar
+ */
+ avatar(id: string, avatarHash: string, options?: Readonly<ImageURLOptions>): string;
+ /**
+ * Generates a user avatar decoration URL.
+ *
+ * @param userId - The id of the user
+ * @param userAvatarDecoration - The hash provided by Discord for this avatar decoration
+ * @param options - Optional options for the avatar decoration
+ */
+ avatarDecoration(userId: string, userAvatarDecoration: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates a banner URL, e.g. for a user or a guild.
+ *
+ * @param id - The id that has the banner splash
+ * @param bannerHash - The hash provided by Discord for this banner
+ * @param options - Optional options for the banner
+ */
+ banner(id: string, bannerHash: string, options?: Readonly<ImageURLOptions>): string;
+ /**
+ * Generates an icon URL for a channel, e.g. a group DM.
+ *
+ * @param channelId - The channel id that has the icon
+ * @param iconHash - The hash provided by Discord for this channel
+ * @param options - Optional options for the icon
+ */
+ channelIcon(channelId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates a default avatar URL
+ *
+ * @param index - The default avatar index
+ * @remarks
+ * To calculate the index for a user do `(userId >> 22) % 6`,
+ * or `discriminator % 5` if they're using the legacy username system.
+ */
+ defaultAvatar(index: number): string;
+ /**
+ * Generates a discovery splash URL for a guild's discovery splash.
+ *
+ * @param guildId - The guild id that has the discovery splash
+ * @param splashHash - The hash provided by Discord for this splash
+ * @param options - Optional options for the splash
+ */
+ discoverySplash(guildId: string, splashHash: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates an emoji's URL for an emoji.
+ *
+ * @param emojiId - The emoji id
+ * @param extension - The extension of the emoji
+ */
+ emoji(emojiId: string, extension?: ImageExtension): string;
+ /**
+ * Generates a guild member avatar URL.
+ *
+ * @param guildId - The id of the guild
+ * @param userId - The id of the user
+ * @param avatarHash - The hash provided by Discord for this avatar
+ * @param options - Optional options for the avatar
+ */
+ guildMemberAvatar(guildId: string, userId: string, avatarHash: string, options?: Readonly<ImageURLOptions>): string;
+ /**
+ * Generates a guild member banner URL.
+ *
+ * @param guildId - The id of the guild
+ * @param userId - The id of the user
+ * @param bannerHash - The hash provided by Discord for this banner
+ * @param options - Optional options for the banner
+ */
+ guildMemberBanner(guildId: string, userId: string, bannerHash: string, options?: Readonly<ImageURLOptions>): string;
+ /**
+ * Generates an icon URL, e.g. for a guild.
+ *
+ * @param id - The id that has the icon splash
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ icon(id: string, iconHash: string, options?: Readonly<ImageURLOptions>): string;
+ /**
+ * Generates a URL for the icon of a role
+ *
+ * @param roleId - The id of the role that has the icon
+ * @param roleIconHash - The hash provided by Discord for this role icon
+ * @param options - Optional options for the role icon
+ */
+ roleIcon(roleId: string, roleIconHash: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates a guild invite splash URL for a guild's invite splash.
+ *
+ * @param guildId - The guild id that has the invite splash
+ * @param splashHash - The hash provided by Discord for this splash
+ * @param options - Optional options for the splash
+ */
+ splash(guildId: string, splashHash: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates a sticker URL.
+ *
+ * @param stickerId - The sticker id
+ * @param extension - The extension of the sticker
+ * @privateRemarks
+ * Stickers cannot have a `.webp` extension, so we default to a `.png`
+ */
+ sticker(stickerId: string, extension?: StickerExtension): string;
+ /**
+ * Generates a sticker pack banner URL.
+ *
+ * @param bannerId - The banner id
+ * @param options - Optional options for the banner
+ */
+ stickerPackBanner(bannerId: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates a team icon URL for a team's icon.
+ *
+ * @param teamId - The team id that has the icon
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ teamIcon(teamId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Generates a cover image for a guild scheduled event.
+ *
+ * @param scheduledEventId - The scheduled event id
+ * @param coverHash - The hash provided by discord for this cover image
+ * @param options - Optional options for the cover image
+ */
+ guildScheduledEventCover(scheduledEventId: string, coverHash: string, options?: Readonly<BaseImageURLOptions>): string;
+ /**
+ * Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.
+ *
+ * @param route - The base cdn route
+ * @param hash - The hash provided by Discord for this icon
+ * @param options - Optional options for the link
+ */
+ private dynamicMakeURL;
+ /**
+ * Constructs the URL for the resource
+ *
+ * @param route - The base cdn route
+ * @param options - The extension/size options for the link
+ */
+ private makeURL;
+}
+
+interface DiscordErrorFieldInformation {
+ code: string;
+ message: string;
+}
+interface DiscordErrorGroupWrapper {
+ _errors: DiscordError[];
+}
+type DiscordError = DiscordErrorFieldInformation | DiscordErrorGroupWrapper | string | {
+ [k: string]: DiscordError;
+};
+interface DiscordErrorData {
+ code: number;
+ errors?: DiscordError;
+ message: string;
+}
+interface OAuthErrorData {
+ error: string;
+ error_description?: string;
+}
+interface RequestBody {
+ files: RawFile[] | undefined;
+ json: unknown | undefined;
+}
+/**
+ * Represents an API error returned by Discord
+ */
+declare class DiscordAPIError extends Error {
+ rawError: DiscordErrorData | OAuthErrorData;
+ code: number | string;
+ status: number;
+ method: string;
+ url: string;
+ requestBody: RequestBody;
+ /**
+ * @param rawError - The error reported by Discord
+ * @param code - The error code reported by Discord
+ * @param status - The status code of the response
+ * @param method - The method of the request that erred
+ * @param url - The url of the request that erred
+ * @param bodyData - The unparsed data for the request that errored
+ */
+ constructor(rawError: DiscordErrorData | OAuthErrorData, code: number | string, status: number, method: string, url: string, bodyData: Pick<InternalRequest, 'body' | 'files'>);
+ /**
+ * The name of the error
+ */
+ get name(): string;
+ private static getMessage;
+ private static flattenDiscordError;
+}
+
+/**
+ * Represents a HTTP error
+ */
+declare class HTTPError extends Error {
+ status: number;
+ method: string;
+ url: string;
+ requestBody: RequestBody;
+ name: string;
+ /**
+ * @param status - The status code of the response
+ * @param statusText - The status text of the response
+ * @param method - The method of the request that erred
+ * @param url - The url of the request that erred
+ * @param bodyData - The unparsed data for the request that errored
+ */
+ constructor(status: number, statusText: string, method: string, url: string, bodyData: Pick<InternalRequest, 'body' | 'files'>);
+}
+
+declare class RateLimitError extends Error implements RateLimitData {
+ timeToReset: number;
+ limit: number;
+ method: string;
+ hash: string;
+ url: string;
+ route: string;
+ majorParameter: string;
+ global: boolean;
+ constructor({ timeToReset, limit, method, hash, url, route, majorParameter, global }: RateLimitData);
+ /**
+ * The name of the error
+ */
+ get name(): string;
+}
+
+/**
+ * Represents the class that manages handlers for endpoints
+ */
+declare class REST extends AsyncEventEmitter<RestEventsMap> {
+ #private;
+ /**
+ * The {@link https://undici.nodejs.org/#/docs/api/Agent | Agent} for all requests
+ * performed by this manager.
+ */
+ agent: Dispatcher | null;
+ readonly cdn: CDN;
+ /**
+ * The number of requests remaining in the global bucket
+ */
+ globalRemaining: number;
+ /**
+ * The promise used to wait out the global rate limit
+ */
+ globalDelay: Promise<void> | null;
+ /**
+ * The timestamp at which the global bucket resets
+ */
+ globalReset: number;
+ /**
+ * API bucket hashes that are cached from provided routes
+ */
+ readonly hashes: Collection<string, HashData>;
+ /**
+ * Request handlers created from the bucket hash and the major parameters
+ */
+ readonly handlers: Collection<string, IHandler>;
+ private hashTimer;
+ private handlerTimer;
+ readonly options: RESTOptions;
+ constructor(options?: Partial<RESTOptions>);
+ private setupSweepers;
+ /**
+ * Runs a get request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ get(fullRoute: RouteLike, options?: RequestData): Promise<unknown>;
+ /**
+ * Runs a delete request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ delete(fullRoute: RouteLike, options?: RequestData): Promise<unknown>;
+ /**
+ * Runs a post request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ post(fullRoute: RouteLike, options?: RequestData): Promise<unknown>;
+ /**
+ * Runs a put request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ put(fullRoute: RouteLike, options?: RequestData): Promise<unknown>;
+ /**
+ * Runs a patch request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ patch(fullRoute: RouteLike, options?: RequestData): Promise<unknown>;
+ /**
+ * Runs a request from the api
+ *
+ * @param options - Request options
+ */
+ request(options: InternalRequest): Promise<unknown>;
+ /**
+ * Sets the default agent to use for requests performed by this manager
+ *
+ * @param agent - The agent to use
+ */
+ setAgent(agent: Dispatcher): this;
+ /**
+ * Sets the authorization token that should be used for requests
+ *
+ * @param token - The authorization token to use
+ */
+ setToken(token: string): this;
+ /**
+ * Queues a request to be sent
+ *
+ * @param request - All the information needed to make a request
+ * @returns The response from the api request
+ */
+ queueRequest(request: InternalRequest): Promise<ResponseLike>;
+ /**
+ * Creates a new rate limit handler from a hash, based on the hash and the major parameter
+ *
+ * @param hash - The hash for the route
+ * @param majorParameter - The major parameter for this handler
+ * @internal
+ */
+ private createHandler;
+ /**
+ * Formats the request data to a usable format for fetch
+ *
+ * @param request - The request data
+ */
+ private resolveRequest;
+ /**
+ * Stops the hash sweeping interval
+ */
+ clearHashSweeper(): void;
+ /**
+ * Stops the request handler sweeping interval
+ */
+ clearHandlerSweeper(): void;
+ /**
+ * Generates route data for an endpoint:method
+ *
+ * @param endpoint - The raw endpoint to generalize
+ * @param method - The HTTP method this endpoint is called without
+ * @internal
+ */
+ private static generateRouteData;
+}
+
+/**
+ * Creates and populates an URLSearchParams instance from an object, stripping
+ * out null and undefined values, while also coercing non-strings to strings.
+ *
+ * @param options - The options to use
+ * @returns A populated URLSearchParams instance
+ */
+declare function makeURLSearchParams<T extends object>(options?: Readonly<T>): url.URLSearchParams;
+/**
+ * Converts the response to usable data
+ *
+ * @param res - The fetch response
+ */
+declare function parseResponse(res: ResponseLike): Promise<unknown>;
+/**
+ * Calculates the default avatar index for a given user id.
+ *
+ * @param userId - The user id to calculate the default avatar index for
+ */
+declare function calculateUserDefaultAvatarIndex(userId: Snowflake): number;
+
+/**
+ * The {@link https://github.com/discordjs/discord.js/blob/main/packages/rest/#readme | @discordjs/rest} version
+ * that you are currently using.
+ */
+declare const version: string;
+
+export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, DiscordErrorData, HTTPError, HashData, ImageExtension, ImageSize, ImageURLOptions, InternalRequest, MakeURLOptions, OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, RESTOptions, RateLimitData, RateLimitError, RawFile, RequestBody, RequestData, ResponseLike, RestEventsMap, RouteLike, StickerExtension, calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse, version };
diff --git a/node_modules/@discordjs/rest/dist/index.js b/node_modules/@discordjs/rest/dist/index.js
new file mode 100644
index 0000000..16a6d46
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/index.js
@@ -0,0 +1,1423 @@
+"use strict";
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/index.ts
+var src_exports = {};
+__export(src_exports, {
+ ALLOWED_EXTENSIONS: () => ALLOWED_EXTENSIONS,
+ ALLOWED_SIZES: () => ALLOWED_SIZES,
+ ALLOWED_STICKER_EXTENSIONS: () => ALLOWED_STICKER_EXTENSIONS,
+ BurstHandlerMajorIdKey: () => BurstHandlerMajorIdKey,
+ CDN: () => CDN,
+ DefaultRestOptions: () => DefaultRestOptions,
+ DefaultUserAgent: () => DefaultUserAgent,
+ DefaultUserAgentAppendix: () => DefaultUserAgentAppendix,
+ DiscordAPIError: () => DiscordAPIError,
+ HTTPError: () => HTTPError,
+ OverwrittenMimeTypes: () => OverwrittenMimeTypes,
+ REST: () => REST,
+ RESTEvents: () => RESTEvents,
+ RateLimitError: () => RateLimitError,
+ RequestMethod: () => RequestMethod,
+ calculateUserDefaultAvatarIndex: () => calculateUserDefaultAvatarIndex,
+ makeURLSearchParams: () => makeURLSearchParams,
+ parseResponse: () => parseResponse,
+ version: () => version
+});
+module.exports = __toCommonJS(src_exports);
+var import_node_buffer = require("buffer");
+var import_util2 = require("@discordjs/util");
+var import_undici2 = require("undici");
+
+// src/environment.ts
+var defaultStrategy;
+function setDefaultStrategy(newStrategy) {
+ defaultStrategy = newStrategy;
+}
+__name(setDefaultStrategy, "setDefaultStrategy");
+function getDefaultStrategy() {
+ return defaultStrategy;
+}
+__name(getDefaultStrategy, "getDefaultStrategy");
+
+// src/strategies/undiciRequest.ts
+var import_node_http = require("http");
+var import_node_url = require("url");
+var import_node_util = require("util");
+var import_undici = require("undici");
+async function makeRequest(url, init) {
+ const options = {
+ ...init,
+ body: await resolveBody(init.body)
+ };
+ const res = await (0, import_undici.request)(url, options);
+ return {
+ body: res.body,
+ async arrayBuffer() {
+ return res.body.arrayBuffer();
+ },
+ async json() {
+ return res.body.json();
+ },
+ async text() {
+ return res.body.text();
+ },
+ get bodyUsed() {
+ return res.body.bodyUsed;
+ },
+ headers: new import_undici.Headers(res.headers),
+ status: res.statusCode,
+ statusText: import_node_http.STATUS_CODES[res.statusCode],
+ ok: res.statusCode >= 200 && res.statusCode < 300
+ };
+}
+__name(makeRequest, "makeRequest");
+async function resolveBody(body) {
+ if (body == null) {
+ return null;
+ } else if (typeof body === "string") {
+ return body;
+ } else if (import_node_util.types.isUint8Array(body)) {
+ return body;
+ } else if (import_node_util.types.isArrayBuffer(body)) {
+ return new Uint8Array(body);
+ } else if (body instanceof import_node_url.URLSearchParams) {
+ return body.toString();
+ } else if (body instanceof DataView) {
+ return new Uint8Array(body.buffer);
+ } else if (body instanceof Blob) {
+ return new Uint8Array(await body.arrayBuffer());
+ } else if (body instanceof FormData) {
+ return body;
+ } else if (body[Symbol.iterator]) {
+ const chunks = [...body];
+ return Buffer.concat(chunks);
+ } else if (body[Symbol.asyncIterator]) {
+ const chunks = [];
+ for await (const chunk of body) {
+ chunks.push(chunk);
+ }
+ return Buffer.concat(chunks);
+ }
+ throw new TypeError(`Unable to resolve body.`);
+}
+__name(resolveBody, "resolveBody");
+
+// src/lib/utils/constants.ts
+var import_util = require("@discordjs/util");
+var import_v10 = require("discord-api-types/v10");
+var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.0.1)`;
+var DefaultUserAgentAppendix = (0, import_util.getUserAgentAppendix)();
+var DefaultRestOptions = {
+ agent: null,
+ api: "https://discord.com/api",
+ authPrefix: "Bot",
+ cdn: "https://cdn.discordapp.com",
+ headers: {},
+ invalidRequestWarningInterval: 0,
+ globalRequestsPerSecond: 50,
+ offset: 50,
+ rejectOnRateLimit: null,
+ retries: 3,
+ timeout: 15e3,
+ userAgentAppendix: DefaultUserAgentAppendix,
+ version: import_v10.APIVersion,
+ hashSweepInterval: 144e5,
+ // 4 Hours
+ hashLifetime: 864e5,
+ // 24 Hours
+ handlerSweepInterval: 36e5,
+ // 1 Hour
+ async makeRequest(...args) {
+ return getDefaultStrategy()(...args);
+ }
+};
+var RESTEvents = /* @__PURE__ */ ((RESTEvents2) => {
+ RESTEvents2["Debug"] = "restDebug";
+ RESTEvents2["HandlerSweep"] = "handlerSweep";
+ RESTEvents2["HashSweep"] = "hashSweep";
+ RESTEvents2["InvalidRequestWarning"] = "invalidRequestWarning";
+ RESTEvents2["RateLimited"] = "rateLimited";
+ RESTEvents2["Response"] = "response";
+ return RESTEvents2;
+})(RESTEvents || {});
+var ALLOWED_EXTENSIONS = ["webp", "png", "jpg", "jpeg", "gif"];
+var ALLOWED_STICKER_EXTENSIONS = ["png", "json", "gif"];
+var ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
+var OverwrittenMimeTypes = {
+ // https://github.com/discordjs/discord.js/issues/8557
+ "image/apng": "image/png"
+};
+var BurstHandlerMajorIdKey = "burst";
+
+// src/lib/CDN.ts
+var CDN = class {
+ constructor(base = DefaultRestOptions.cdn) {
+ this.base = base;
+ }
+ static {
+ __name(this, "CDN");
+ }
+ /**
+ * Generates an app asset URL for a client's asset.
+ *
+ * @param clientId - The client id that has the asset
+ * @param assetHash - The hash provided by Discord for this asset
+ * @param options - Optional options for the asset
+ */
+ appAsset(clientId, assetHash, options) {
+ return this.makeURL(`/app-assets/${clientId}/${assetHash}`, options);
+ }
+ /**
+ * Generates an app icon URL for a client's icon.
+ *
+ * @param clientId - The client id that has the icon
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ appIcon(clientId, iconHash, options) {
+ return this.makeURL(`/app-icons/${clientId}/${iconHash}`, options);
+ }
+ /**
+ * Generates an avatar URL, e.g. for a user or a webhook.
+ *
+ * @param id - The id that has the icon
+ * @param avatarHash - The hash provided by Discord for this avatar
+ * @param options - Optional options for the avatar
+ */
+ avatar(id, avatarHash, options) {
+ return this.dynamicMakeURL(`/avatars/${id}/${avatarHash}`, avatarHash, options);
+ }
+ /**
+ * Generates a user avatar decoration URL.
+ *
+ * @param userId - The id of the user
+ * @param userAvatarDecoration - The hash provided by Discord for this avatar decoration
+ * @param options - Optional options for the avatar decoration
+ */
+ avatarDecoration(userId, userAvatarDecoration, options) {
+ return this.makeURL(`/avatar-decorations/${userId}/${userAvatarDecoration}`, options);
+ }
+ /**
+ * Generates a banner URL, e.g. for a user or a guild.
+ *
+ * @param id - The id that has the banner splash
+ * @param bannerHash - The hash provided by Discord for this banner
+ * @param options - Optional options for the banner
+ */
+ banner(id, bannerHash, options) {
+ return this.dynamicMakeURL(`/banners/${id}/${bannerHash}`, bannerHash, options);
+ }
+ /**
+ * Generates an icon URL for a channel, e.g. a group DM.
+ *
+ * @param channelId - The channel id that has the icon
+ * @param iconHash - The hash provided by Discord for this channel
+ * @param options - Optional options for the icon
+ */
+ channelIcon(channelId, iconHash, options) {
+ return this.makeURL(`/channel-icons/${channelId}/${iconHash}`, options);
+ }
+ /**
+ * Generates a default avatar URL
+ *
+ * @param index - The default avatar index
+ * @remarks
+ * To calculate the index for a user do `(userId >> 22) % 6`,
+ * or `discriminator % 5` if they're using the legacy username system.
+ */
+ defaultAvatar(index) {
+ return this.makeURL(`/embed/avatars/${index}`, { extension: "png" });
+ }
+ /**
+ * Generates a discovery splash URL for a guild's discovery splash.
+ *
+ * @param guildId - The guild id that has the discovery splash
+ * @param splashHash - The hash provided by Discord for this splash
+ * @param options - Optional options for the splash
+ */
+ discoverySplash(guildId, splashHash, options) {
+ return this.makeURL(`/discovery-splashes/${guildId}/${splashHash}`, options);
+ }
+ /**
+ * Generates an emoji's URL for an emoji.
+ *
+ * @param emojiId - The emoji id
+ * @param extension - The extension of the emoji
+ */
+ emoji(emojiId, extension) {
+ return this.makeURL(`/emojis/${emojiId}`, { extension });
+ }
+ /**
+ * Generates a guild member avatar URL.
+ *
+ * @param guildId - The id of the guild
+ * @param userId - The id of the user
+ * @param avatarHash - The hash provided by Discord for this avatar
+ * @param options - Optional options for the avatar
+ */
+ guildMemberAvatar(guildId, userId, avatarHash, options) {
+ return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/avatars/${avatarHash}`, avatarHash, options);
+ }
+ /**
+ * Generates a guild member banner URL.
+ *
+ * @param guildId - The id of the guild
+ * @param userId - The id of the user
+ * @param bannerHash - The hash provided by Discord for this banner
+ * @param options - Optional options for the banner
+ */
+ guildMemberBanner(guildId, userId, bannerHash, options) {
+ return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banner`, bannerHash, options);
+ }
+ /**
+ * Generates an icon URL, e.g. for a guild.
+ *
+ * @param id - The id that has the icon splash
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ icon(id, iconHash, options) {
+ return this.dynamicMakeURL(`/icons/${id}/${iconHash}`, iconHash, options);
+ }
+ /**
+ * Generates a URL for the icon of a role
+ *
+ * @param roleId - The id of the role that has the icon
+ * @param roleIconHash - The hash provided by Discord for this role icon
+ * @param options - Optional options for the role icon
+ */
+ roleIcon(roleId, roleIconHash, options) {
+ return this.makeURL(`/role-icons/${roleId}/${roleIconHash}`, options);
+ }
+ /**
+ * Generates a guild invite splash URL for a guild's invite splash.
+ *
+ * @param guildId - The guild id that has the invite splash
+ * @param splashHash - The hash provided by Discord for this splash
+ * @param options - Optional options for the splash
+ */
+ splash(guildId, splashHash, options) {
+ return this.makeURL(`/splashes/${guildId}/${splashHash}`, options);
+ }
+ /**
+ * Generates a sticker URL.
+ *
+ * @param stickerId - The sticker id
+ * @param extension - The extension of the sticker
+ * @privateRemarks
+ * Stickers cannot have a `.webp` extension, so we default to a `.png`
+ */
+ sticker(stickerId, extension = "png") {
+ return this.makeURL(`/stickers/${stickerId}`, { allowedExtensions: ALLOWED_STICKER_EXTENSIONS, extension });
+ }
+ /**
+ * Generates a sticker pack banner URL.
+ *
+ * @param bannerId - The banner id
+ * @param options - Optional options for the banner
+ */
+ stickerPackBanner(bannerId, options) {
+ return this.makeURL(`/app-assets/710982414301790216/store/${bannerId}`, options);
+ }
+ /**
+ * Generates a team icon URL for a team's icon.
+ *
+ * @param teamId - The team id that has the icon
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ teamIcon(teamId, iconHash, options) {
+ return this.makeURL(`/team-icons/${teamId}/${iconHash}`, options);
+ }
+ /**
+ * Generates a cover image for a guild scheduled event.
+ *
+ * @param scheduledEventId - The scheduled event id
+ * @param coverHash - The hash provided by discord for this cover image
+ * @param options - Optional options for the cover image
+ */
+ guildScheduledEventCover(scheduledEventId, coverHash, options) {
+ return this.makeURL(`/guild-events/${scheduledEventId}/${coverHash}`, options);
+ }
+ /**
+ * Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.
+ *
+ * @param route - The base cdn route
+ * @param hash - The hash provided by Discord for this icon
+ * @param options - Optional options for the link
+ */
+ dynamicMakeURL(route, hash, { forceStatic = false, ...options } = {}) {
+ return this.makeURL(route, !forceStatic && hash.startsWith("a_") ? { ...options, extension: "gif" } : options);
+ }
+ /**
+ * Constructs the URL for the resource
+ *
+ * @param route - The base cdn route
+ * @param options - The extension/size options for the link
+ */
+ makeURL(route, { allowedExtensions = ALLOWED_EXTENSIONS, extension = "webp", size } = {}) {
+ extension = String(extension).toLowerCase();
+ if (!allowedExtensions.includes(extension)) {
+ throw new RangeError(`Invalid extension provided: ${extension}
+Must be one of: ${allowedExtensions.join(", ")}`);
+ }
+ if (size && !ALLOWED_SIZES.includes(size)) {
+ throw new RangeError(`Invalid size provided: ${size}
+Must be one of: ${ALLOWED_SIZES.join(", ")}`);
+ }
+ const url = new URL(`${this.base}${route}.${extension}`);
+ if (size) {
+ url.searchParams.set("size", String(size));
+ }
+ return url.toString();
+ }
+};
+
+// src/lib/errors/DiscordAPIError.ts
+function isErrorGroupWrapper(error) {
+ return Reflect.has(error, "_errors");
+}
+__name(isErrorGroupWrapper, "isErrorGroupWrapper");
+function isErrorResponse(error) {
+ return typeof Reflect.get(error, "message") === "string";
+}
+__name(isErrorResponse, "isErrorResponse");
+var DiscordAPIError = class _DiscordAPIError extends Error {
+ /**
+ * @param rawError - The error reported by Discord
+ * @param code - The error code reported by Discord
+ * @param status - The status code of the response
+ * @param method - The method of the request that erred
+ * @param url - The url of the request that erred
+ * @param bodyData - The unparsed data for the request that errored
+ */
+ constructor(rawError, code, status, method, url, bodyData) {
+ super(_DiscordAPIError.getMessage(rawError));
+ this.rawError = rawError;
+ this.code = code;
+ this.status = status;
+ this.method = method;
+ this.url = url;
+ this.requestBody = { files: bodyData.files, json: bodyData.body };
+ }
+ static {
+ __name(this, "DiscordAPIError");
+ }
+ requestBody;
+ /**
+ * The name of the error
+ */
+ get name() {
+ return `${_DiscordAPIError.name}[${this.code}]`;
+ }
+ static getMessage(error) {
+ let flattened = "";
+ if ("code" in error) {
+ if (error.errors) {
+ flattened = [...this.flattenDiscordError(error.errors)].join("\n");
+ }
+ return error.message && flattened ? `${error.message}
+${flattened}` : error.message || flattened || "Unknown Error";
+ }
+ return error.error_description ?? "No Description";
+ }
+ static *flattenDiscordError(obj, key = "") {
+ if (isErrorResponse(obj)) {
+ return yield `${key.length ? `${key}[${obj.code}]` : `${obj.code}`}: ${obj.message}`.trim();
+ }
+ for (const [otherKey, val] of Object.entries(obj)) {
+ const nextKey = otherKey.startsWith("_") ? key : key ? Number.isNaN(Number(otherKey)) ? `${key}.${otherKey}` : `${key}[${otherKey}]` : otherKey;
+ if (typeof val === "string") {
+ yield val;
+ } else if (isErrorGroupWrapper(val)) {
+ for (const error of val._errors) {
+ yield* this.flattenDiscordError(error, nextKey);
+ }
+ } else {
+ yield* this.flattenDiscordError(val, nextKey);
+ }
+ }
+ }
+};
+
+// src/lib/errors/HTTPError.ts
+var HTTPError = class _HTTPError extends Error {
+ /**
+ * @param status - The status code of the response
+ * @param statusText - The status text of the response
+ * @param method - The method of the request that erred
+ * @param url - The url of the request that erred
+ * @param bodyData - The unparsed data for the request that errored
+ */
+ constructor(status, statusText, method, url, bodyData) {
+ super(statusText);
+ this.status = status;
+ this.method = method;
+ this.url = url;
+ this.requestBody = { files: bodyData.files, json: bodyData.body };
+ }
+ static {
+ __name(this, "HTTPError");
+ }
+ requestBody;
+ name = _HTTPError.name;
+};
+
+// src/lib/errors/RateLimitError.ts
+var RateLimitError = class _RateLimitError extends Error {
+ static {
+ __name(this, "RateLimitError");
+ }
+ timeToReset;
+ limit;
+ method;
+ hash;
+ url;
+ route;
+ majorParameter;
+ global;
+ constructor({ timeToReset, limit, method, hash, url, route, majorParameter, global }) {
+ super();
+ this.timeToReset = timeToReset;
+ this.limit = limit;
+ this.method = method;
+ this.hash = hash;
+ this.url = url;
+ this.route = route;
+ this.majorParameter = majorParameter;
+ this.global = global;
+ }
+ /**
+ * The name of the error
+ */
+ get name() {
+ return `${_RateLimitError.name}[${this.route}]`;
+ }
+};
+
+// src/lib/REST.ts
+var import_collection = require("@discordjs/collection");
+var import_snowflake = require("@sapphire/snowflake");
+var import_async_event_emitter = require("@vladfrangu/async_event_emitter");
+var import_magic_bytes = require("magic-bytes.js");
+
+// src/lib/utils/types.ts
+var RequestMethod = /* @__PURE__ */ ((RequestMethod2) => {
+ RequestMethod2["Delete"] = "DELETE";
+ RequestMethod2["Get"] = "GET";
+ RequestMethod2["Patch"] = "PATCH";
+ RequestMethod2["Post"] = "POST";
+ RequestMethod2["Put"] = "PUT";
+ return RequestMethod2;
+})(RequestMethod || {});
+
+// src/lib/utils/utils.ts
+function serializeSearchParam(value) {
+ switch (typeof value) {
+ case "string":
+ return value;
+ case "number":
+ case "bigint":
+ case "boolean":
+ return value.toString();
+ case "object":
+ if (value === null)
+ return null;
+ if (value instanceof Date) {
+ return Number.isNaN(value.getTime()) ? null : value.toISOString();
+ }
+ if (typeof value.toString === "function" && value.toString !== Object.prototype.toString)
+ return value.toString();
+ return null;
+ default:
+ return null;
+ }
+}
+__name(serializeSearchParam, "serializeSearchParam");
+function makeURLSearchParams(options) {
+ const params = new URLSearchParams();
+ if (!options)
+ return params;
+ for (const [key, value] of Object.entries(options)) {
+ const serialized = serializeSearchParam(value);
+ if (serialized !== null)
+ params.append(key, serialized);
+ }
+ return params;
+}
+__name(makeURLSearchParams, "makeURLSearchParams");
+async function parseResponse(res) {
+ if (res.headers.get("Content-Type")?.startsWith("application/json")) {
+ return res.json();
+ }
+ return res.arrayBuffer();
+}
+__name(parseResponse, "parseResponse");
+function hasSublimit(bucketRoute, body, method) {
+ if (bucketRoute === "/channels/:id") {
+ if (typeof body !== "object" || body === null)
+ return false;
+ if (method !== "PATCH" /* Patch */)
+ return false;
+ const castedBody = body;
+ return ["name", "topic"].some((key) => Reflect.has(castedBody, key));
+ }
+ return true;
+}
+__name(hasSublimit, "hasSublimit");
+function shouldRetry(error) {
+ if (error.name === "AbortError")
+ return true;
+ return "code" in error && error.code === "ECONNRESET" || error.message.includes("ECONNRESET");
+}
+__name(shouldRetry, "shouldRetry");
+async function onRateLimit(manager, rateLimitData) {
+ const { options } = manager;
+ if (!options.rejectOnRateLimit)
+ return;
+ const shouldThrow = typeof options.rejectOnRateLimit === "function" ? await options.rejectOnRateLimit(rateLimitData) : options.rejectOnRateLimit.some((route) => rateLimitData.route.startsWith(route.toLowerCase()));
+ if (shouldThrow) {
+ throw new RateLimitError(rateLimitData);
+ }
+}
+__name(onRateLimit, "onRateLimit");
+function calculateUserDefaultAvatarIndex(userId) {
+ return Number(BigInt(userId) >> 22n) % 6;
+}
+__name(calculateUserDefaultAvatarIndex, "calculateUserDefaultAvatarIndex");
+async function sleep(ms) {
+ return new Promise((resolve) => {
+ setTimeout(() => resolve(), ms);
+ });
+}
+__name(sleep, "sleep");
+function isBufferLike(value) {
+ return value instanceof ArrayBuffer || value instanceof Uint8Array || value instanceof Uint8ClampedArray;
+}
+__name(isBufferLike, "isBufferLike");
+
+// src/lib/handlers/Shared.ts
+var invalidCount = 0;
+var invalidCountResetTime = null;
+function incrementInvalidCount(manager) {
+ if (!invalidCountResetTime || invalidCountResetTime < Date.now()) {
+ invalidCountResetTime = Date.now() + 1e3 * 60 * 10;
+ invalidCount = 0;
+ }
+ invalidCount++;
+ const emitInvalid = manager.options.invalidRequestWarningInterval > 0 && invalidCount % manager.options.invalidRequestWarningInterval === 0;
+ if (emitInvalid) {
+ manager.emit("invalidRequestWarning" /* InvalidRequestWarning */, {
+ count: invalidCount,
+ remainingTime: invalidCountResetTime - Date.now()
+ });
+ }
+}
+__name(incrementInvalidCount, "incrementInvalidCount");
+async function makeNetworkRequest(manager, routeId, url, options, requestData, retries) {
+ const controller = new AbortController();
+ const timeout = setTimeout(() => controller.abort(), manager.options.timeout);
+ if (requestData.signal) {
+ if (requestData.signal.aborted)
+ controller.abort();
+ else
+ requestData.signal.addEventListener("abort", () => controller.abort());
+ }
+ let res;
+ try {
+ res = await manager.options.makeRequest(url, { ...options, signal: controller.signal });
+ } catch (error) {
+ if (!(error instanceof Error))
+ throw error;
+ if (shouldRetry(error) && retries !== manager.options.retries) {
+ return null;
+ }
+ throw error;
+ } finally {
+ clearTimeout(timeout);
+ }
+ if (manager.listenerCount("response" /* Response */)) {
+ manager.emit(
+ "response" /* Response */,
+ {
+ method: options.method ?? "get",
+ path: routeId.original,
+ route: routeId.bucketRoute,
+ options,
+ data: requestData,
+ retries
+ },
+ res instanceof Response ? res.clone() : { ...res }
+ );
+ }
+ return res;
+}
+__name(makeNetworkRequest, "makeNetworkRequest");
+async function handleErrors(manager, res, method, url, requestData, retries) {
+ const status = res.status;
+ if (status >= 500 && status < 600) {
+ if (retries !== manager.options.retries) {
+ return null;
+ }
+ throw new HTTPError(status, res.statusText, method, url, requestData);
+ } else {
+ if (status >= 400 && status < 500) {
+ if (status === 401 && requestData.auth) {
+ manager.setToken(null);
+ }
+ const data = await parseResponse(res);
+ throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
+ }
+ return res;
+ }
+}
+__name(handleErrors, "handleErrors");
+
+// src/lib/handlers/BurstHandler.ts
+var BurstHandler = class {
+ /**
+ * @param manager - The request manager
+ * @param hash - The hash that this RequestHandler handles
+ * @param majorParameter - The major parameter for this handler
+ */
+ constructor(manager, hash, majorParameter) {
+ this.manager = manager;
+ this.hash = hash;
+ this.majorParameter = majorParameter;
+ this.id = `${hash}:${majorParameter}`;
+ }
+ static {
+ __name(this, "BurstHandler");
+ }
+ /**
+ * {@inheritdoc IHandler.id}
+ */
+ id;
+ /**
+ * {@inheritDoc IHandler.inactive}
+ */
+ inactive = false;
+ /**
+ * Emits a debug message
+ *
+ * @param message - The message to debug
+ */
+ debug(message) {
+ this.manager.emit("restDebug" /* Debug */, `[REST ${this.id}] ${message}`);
+ }
+ /**
+ * {@inheritDoc IHandler.queueRequest}
+ */
+ async queueRequest(routeId, url, options, requestData) {
+ return this.runRequest(routeId, url, options, requestData);
+ }
+ /**
+ * The method that actually makes the request to the API, and updates info about the bucket accordingly
+ *
+ * @param routeId - The generalized API route with literal ids for major parameters
+ * @param url - The fully resolved URL to make the request to
+ * @param options - The fetch options needed to make the request
+ * @param requestData - Extra data from the user's request needed for errors and additional processing
+ * @param retries - The number of retries this request has already attempted (recursion)
+ */
+ async runRequest(routeId, url, options, requestData, retries = 0) {
+ const method = options.method ?? "get";
+ const res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries);
+ if (res === null) {
+ return this.runRequest(routeId, url, options, requestData, ++retries);
+ }
+ const status = res.status;
+ let retryAfter = 0;
+ const retry = res.headers.get("Retry-After");
+ if (retry)
+ retryAfter = Number(retry) * 1e3 + this.manager.options.offset;
+ if (status === 401 || status === 403 || status === 429) {
+ incrementInvalidCount(this.manager);
+ }
+ if (status >= 200 && status < 300) {
+ return res;
+ } else if (status === 429) {
+ const isGlobal = res.headers.has("X-RateLimit-Global");
+ await onRateLimit(this.manager, {
+ timeToReset: retryAfter,
+ limit: Number.POSITIVE_INFINITY,
+ method,
+ hash: this.hash,
+ url,
+ route: routeId.bucketRoute,
+ majorParameter: this.majorParameter,
+ global: isGlobal
+ });
+ this.debug(
+ [
+ "Encountered unexpected 429 rate limit",
+ ` Global : ${isGlobal}`,
+ ` Method : ${method}`,
+ ` URL : ${url}`,
+ ` Bucket : ${routeId.bucketRoute}`,
+ ` Major parameter: ${routeId.majorParameter}`,
+ ` Hash : ${this.hash}`,
+ ` Limit : ${Number.POSITIVE_INFINITY}`,
+ ` Retry After : ${retryAfter}ms`,
+ ` Sublimit : None`
+ ].join("\n")
+ );
+ await sleep(retryAfter);
+ return this.runRequest(routeId, url, options, requestData, retries);
+ } else {
+ const handled = await handleErrors(this.manager, res, method, url, requestData, retries);
+ if (handled === null) {
+ return this.runRequest(routeId, url, options, requestData, ++retries);
+ }
+ return handled;
+ }
+ }
+};
+
+// src/lib/handlers/SequentialHandler.ts
+var import_async_queue = require("@sapphire/async-queue");
+var SequentialHandler = class {
+ /**
+ * @param manager - The request manager
+ * @param hash - The hash that this RequestHandler handles
+ * @param majorParameter - The major parameter for this handler
+ */
+ constructor(manager, hash, majorParameter) {
+ this.manager = manager;
+ this.hash = hash;
+ this.majorParameter = majorParameter;
+ this.id = `${hash}:${majorParameter}`;
+ }
+ static {
+ __name(this, "SequentialHandler");
+ }
+ /**
+ * {@inheritDoc IHandler.id}
+ */
+ id;
+ /**
+ * The time this rate limit bucket will reset
+ */
+ reset = -1;
+ /**
+ * The remaining requests that can be made before we are rate limited
+ */
+ remaining = 1;
+ /**
+ * The total number of requests that can be made before we are rate limited
+ */
+ limit = Number.POSITIVE_INFINITY;
+ /**
+ * The interface used to sequence async requests sequentially
+ */
+ #asyncQueue = new import_async_queue.AsyncQueue();
+ /**
+ * The interface used to sequence sublimited async requests sequentially
+ */
+ #sublimitedQueue = null;
+ /**
+ * A promise wrapper for when the sublimited queue is finished being processed or null when not being processed
+ */
+ #sublimitPromise = null;
+ /**
+ * Whether the sublimit queue needs to be shifted in the finally block
+ */
+ #shiftSublimit = false;
+ /**
+ * {@inheritDoc IHandler.inactive}
+ */
+ get inactive() {
+ return this.#asyncQueue.remaining === 0 && (this.#sublimitedQueue === null || this.#sublimitedQueue.remaining === 0) && !this.limited;
+ }
+ /**
+ * If the rate limit bucket is currently limited by the global limit
+ */
+ get globalLimited() {
+ return this.manager.globalRemaining <= 0 && Date.now() < this.manager.globalReset;
+ }
+ /**
+ * If the rate limit bucket is currently limited by its limit
+ */
+ get localLimited() {
+ return this.remaining <= 0 && Date.now() < this.reset;
+ }
+ /**
+ * If the rate limit bucket is currently limited
+ */
+ get limited() {
+ return this.globalLimited || this.localLimited;
+ }
+ /**
+ * The time until queued requests can continue
+ */
+ get timeToReset() {
+ return this.reset + this.manager.options.offset - Date.now();
+ }
+ /**
+ * Emits a debug message
+ *
+ * @param message - The message to debug
+ */
+ debug(message) {
+ this.manager.emit("restDebug" /* Debug */, `[REST ${this.id}] ${message}`);
+ }
+ /**
+ * Delay all requests for the specified amount of time, handling global rate limits
+ *
+ * @param time - The amount of time to delay all requests for
+ */
+ async globalDelayFor(time) {
+ await sleep(time);
+ this.manager.globalDelay = null;
+ }
+ /**
+ * {@inheritDoc IHandler.queueRequest}
+ */
+ async queueRequest(routeId, url, options, requestData) {
+ let queue = this.#asyncQueue;
+ let queueType = 0 /* Standard */;
+ if (this.#sublimitedQueue && hasSublimit(routeId.bucketRoute, requestData.body, options.method)) {
+ queue = this.#sublimitedQueue;
+ queueType = 1 /* Sublimit */;
+ }
+ await queue.wait({ signal: requestData.signal });
+ if (queueType === 0 /* Standard */) {
+ if (this.#sublimitedQueue && hasSublimit(routeId.bucketRoute, requestData.body, options.method)) {
+ queue = this.#sublimitedQueue;
+ const wait = queue.wait();
+ this.#asyncQueue.shift();
+ await wait;
+ } else if (this.#sublimitPromise) {
+ await this.#sublimitPromise.promise;
+ }
+ }
+ try {
+ return await this.runRequest(routeId, url, options, requestData);
+ } finally {
+ queue.shift();
+ if (this.#shiftSublimit) {
+ this.#shiftSublimit = false;
+ this.#sublimitedQueue?.shift();
+ }
+ if (this.#sublimitedQueue?.remaining === 0) {
+ this.#sublimitPromise?.resolve();
+ this.#sublimitedQueue = null;
+ }
+ }
+ }
+ /**
+ * The method that actually makes the request to the api, and updates info about the bucket accordingly
+ *
+ * @param routeId - The generalized api route with literal ids for major parameters
+ * @param url - The fully resolved url to make the request to
+ * @param options - The fetch options needed to make the request
+ * @param requestData - Extra data from the user's request needed for errors and additional processing
+ * @param retries - The number of retries this request has already attempted (recursion)
+ */
+ async runRequest(routeId, url, options, requestData, retries = 0) {
+ while (this.limited) {
+ const isGlobal = this.globalLimited;
+ let limit2;
+ let timeout;
+ let delay;
+ if (isGlobal) {
+ limit2 = this.manager.options.globalRequestsPerSecond;
+ timeout = this.manager.globalReset + this.manager.options.offset - Date.now();
+ if (!this.manager.globalDelay) {
+ this.manager.globalDelay = this.globalDelayFor(timeout);
+ }
+ delay = this.manager.globalDelay;
+ } else {
+ limit2 = this.limit;
+ timeout = this.timeToReset;
+ delay = sleep(timeout);
+ }
+ const rateLimitData = {
+ timeToReset: timeout,
+ limit: limit2,
+ method: options.method ?? "get",
+ hash: this.hash,
+ url,
+ route: routeId.bucketRoute,
+ majorParameter: this.majorParameter,
+ global: isGlobal
+ };
+ this.manager.emit("rateLimited" /* RateLimited */, rateLimitData);
+ await onRateLimit(this.manager, rateLimitData);
+ if (isGlobal) {
+ this.debug(`Global rate limit hit, blocking all requests for ${timeout}ms`);
+ } else {
+ this.debug(`Waiting ${timeout}ms for rate limit to pass`);
+ }
+ await delay;
+ }
+ if (!this.manager.globalReset || this.manager.globalReset < Date.now()) {
+ this.manager.globalReset = Date.now() + 1e3;
+ this.manager.globalRemaining = this.manager.options.globalRequestsPerSecond;
+ }
+ this.manager.globalRemaining--;
+ const method = options.method ?? "get";
+ const res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries);
+ if (res === null) {
+ return this.runRequest(routeId, url, options, requestData, ++retries);
+ }
+ const status = res.status;
+ let retryAfter = 0;
+ const limit = res.headers.get("X-RateLimit-Limit");
+ const remaining = res.headers.get("X-RateLimit-Remaining");
+ const reset = res.headers.get("X-RateLimit-Reset-After");
+ const hash = res.headers.get("X-RateLimit-Bucket");
+ const retry = res.headers.get("Retry-After");
+ this.limit = limit ? Number(limit) : Number.POSITIVE_INFINITY;
+ this.remaining = remaining ? Number(remaining) : 1;
+ this.reset = reset ? Number(reset) * 1e3 + Date.now() + this.manager.options.offset : Date.now();
+ if (retry)
+ retryAfter = Number(retry) * 1e3 + this.manager.options.offset;
+ if (hash && hash !== this.hash) {
+ this.debug(["Received bucket hash update", ` Old Hash : ${this.hash}`, ` New Hash : ${hash}`].join("\n"));
+ this.manager.hashes.set(`${method}:${routeId.bucketRoute}`, { value: hash, lastAccess: Date.now() });
+ } else if (hash) {
+ const hashData = this.manager.hashes.get(`${method}:${routeId.bucketRoute}`);
+ if (hashData) {
+ hashData.lastAccess = Date.now();
+ }
+ }
+ let sublimitTimeout = null;
+ if (retryAfter > 0) {
+ if (res.headers.has("X-RateLimit-Global")) {
+ this.manager.globalRemaining = 0;
+ this.manager.globalReset = Date.now() + retryAfter;
+ } else if (!this.localLimited) {
+ sublimitTimeout = retryAfter;
+ }
+ }
+ if (status === 401 || status === 403 || status === 429) {
+ incrementInvalidCount(this.manager);
+ }
+ if (res.ok) {
+ return res;
+ } else if (status === 429) {
+ const isGlobal = this.globalLimited;
+ let limit2;
+ let timeout;
+ if (isGlobal) {
+ limit2 = this.manager.options.globalRequestsPerSecond;
+ timeout = this.manager.globalReset + this.manager.options.offset - Date.now();
+ } else {
+ limit2 = this.limit;
+ timeout = this.timeToReset;
+ }
+ await onRateLimit(this.manager, {
+ timeToReset: timeout,
+ limit: limit2,
+ method,
+ hash: this.hash,
+ url,
+ route: routeId.bucketRoute,
+ majorParameter: this.majorParameter,
+ global: isGlobal
+ });
+ this.debug(
+ [
+ "Encountered unexpected 429 rate limit",
+ ` Global : ${isGlobal.toString()}`,
+ ` Method : ${method}`,
+ ` URL : ${url}`,
+ ` Bucket : ${routeId.bucketRoute}`,
+ ` Major parameter: ${routeId.majorParameter}`,
+ ` Hash : ${this.hash}`,
+ ` Limit : ${limit2}`,
+ ` Retry After : ${retryAfter}ms`,
+ ` Sublimit : ${sublimitTimeout ? `${sublimitTimeout}ms` : "None"}`
+ ].join("\n")
+ );
+ if (sublimitTimeout) {
+ const firstSublimit = !this.#sublimitedQueue;
+ if (firstSublimit) {
+ this.#sublimitedQueue = new import_async_queue.AsyncQueue();
+ void this.#sublimitedQueue.wait();
+ this.#asyncQueue.shift();
+ }
+ this.#sublimitPromise?.resolve();
+ this.#sublimitPromise = null;
+ await sleep(sublimitTimeout);
+ let resolve;
+ const promise = new Promise((res2) => resolve = res2);
+ this.#sublimitPromise = { promise, resolve };
+ if (firstSublimit) {
+ await this.#asyncQueue.wait();
+ this.#shiftSublimit = true;
+ }
+ }
+ return this.runRequest(routeId, url, options, requestData, retries);
+ } else {
+ const handled = await handleErrors(this.manager, res, method, url, requestData, retries);
+ if (handled === null) {
+ return this.runRequest(routeId, url, options, requestData, ++retries);
+ }
+ return handled;
+ }
+ }
+};
+
+// src/lib/REST.ts
+var REST = class _REST extends import_async_event_emitter.AsyncEventEmitter {
+ static {
+ __name(this, "REST");
+ }
+ /**
+ * The {@link https://undici.nodejs.org/#/docs/api/Agent | Agent} for all requests
+ * performed by this manager.
+ */
+ agent = null;
+ cdn;
+ /**
+ * The number of requests remaining in the global bucket
+ */
+ globalRemaining;
+ /**
+ * The promise used to wait out the global rate limit
+ */
+ globalDelay = null;
+ /**
+ * The timestamp at which the global bucket resets
+ */
+ globalReset = -1;
+ /**
+ * API bucket hashes that are cached from provided routes
+ */
+ hashes = new import_collection.Collection();
+ /**
+ * Request handlers created from the bucket hash and the major parameters
+ */
+ handlers = new import_collection.Collection();
+ #token = null;
+ hashTimer;
+ handlerTimer;
+ options;
+ constructor(options = {}) {
+ super();
+ this.cdn = new CDN(options.cdn ?? DefaultRestOptions.cdn);
+ this.options = { ...DefaultRestOptions, ...options };
+ this.options.offset = Math.max(0, this.options.offset);
+ this.globalRemaining = Math.max(1, this.options.globalRequestsPerSecond);
+ this.agent = options.agent ?? null;
+ this.setupSweepers();
+ }
+ setupSweepers() {
+ const validateMaxInterval = /* @__PURE__ */ __name((interval) => {
+ if (interval > 144e5) {
+ throw new Error("Cannot set an interval greater than 4 hours");
+ }
+ }, "validateMaxInterval");
+ if (this.options.hashSweepInterval !== 0 && this.options.hashSweepInterval !== Number.POSITIVE_INFINITY) {
+ validateMaxInterval(this.options.hashSweepInterval);
+ this.hashTimer = setInterval(() => {
+ const sweptHashes = new import_collection.Collection();
+ const currentDate = Date.now();
+ this.hashes.sweep((val, key) => {
+ if (val.lastAccess === -1)
+ return false;
+ const shouldSweep = Math.floor(currentDate - val.lastAccess) > this.options.hashLifetime;
+ if (shouldSweep) {
+ sweptHashes.set(key, val);
+ this.emit("restDebug" /* Debug */, `Hash ${val.value} for ${key} swept due to lifetime being exceeded`);
+ }
+ return shouldSweep;
+ });
+ this.emit("hashSweep" /* HashSweep */, sweptHashes);
+ }, this.options.hashSweepInterval);
+ this.hashTimer.unref?.();
+ }
+ if (this.options.handlerSweepInterval !== 0 && this.options.handlerSweepInterval !== Number.POSITIVE_INFINITY) {
+ validateMaxInterval(this.options.handlerSweepInterval);
+ this.handlerTimer = setInterval(() => {
+ const sweptHandlers = new import_collection.Collection();
+ this.handlers.sweep((val, key) => {
+ const { inactive } = val;
+ if (inactive) {
+ sweptHandlers.set(key, val);
+ this.emit("restDebug" /* Debug */, `Handler ${val.id} for ${key} swept due to being inactive`);
+ }
+ return inactive;
+ });
+ this.emit("handlerSweep" /* HandlerSweep */, sweptHandlers);
+ }, this.options.handlerSweepInterval);
+ this.handlerTimer.unref?.();
+ }
+ }
+ /**
+ * Runs a get request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async get(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "GET" /* Get */ });
+ }
+ /**
+ * Runs a delete request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async delete(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "DELETE" /* Delete */ });
+ }
+ /**
+ * Runs a post request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async post(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "POST" /* Post */ });
+ }
+ /**
+ * Runs a put request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async put(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "PUT" /* Put */ });
+ }
+ /**
+ * Runs a patch request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async patch(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "PATCH" /* Patch */ });
+ }
+ /**
+ * Runs a request from the api
+ *
+ * @param options - Request options
+ */
+ async request(options) {
+ const response = await this.queueRequest(options);
+ return parseResponse(response);
+ }
+ /**
+ * Sets the default agent to use for requests performed by this manager
+ *
+ * @param agent - The agent to use
+ */
+ setAgent(agent) {
+ this.agent = agent;
+ return this;
+ }
+ /**
+ * Sets the authorization token that should be used for requests
+ *
+ * @param token - The authorization token to use
+ */
+ setToken(token) {
+ this.#token = token;
+ return this;
+ }
+ /**
+ * Queues a request to be sent
+ *
+ * @param request - All the information needed to make a request
+ * @returns The response from the api request
+ */
+ async queueRequest(request2) {
+ const routeId = _REST.generateRouteData(request2.fullRoute, request2.method);
+ const hash = this.hashes.get(`${request2.method}:${routeId.bucketRoute}`) ?? {
+ value: `Global(${request2.method}:${routeId.bucketRoute})`,
+ lastAccess: -1
+ };
+ const handler = this.handlers.get(`${hash.value}:${routeId.majorParameter}`) ?? this.createHandler(hash.value, routeId.majorParameter);
+ const { url, fetchOptions } = await this.resolveRequest(request2);
+ return handler.queueRequest(routeId, url, fetchOptions, {
+ body: request2.body,
+ files: request2.files,
+ auth: request2.auth !== false,
+ signal: request2.signal
+ });
+ }
+ /**
+ * Creates a new rate limit handler from a hash, based on the hash and the major parameter
+ *
+ * @param hash - The hash for the route
+ * @param majorParameter - The major parameter for this handler
+ * @internal
+ */
+ createHandler(hash, majorParameter) {
+ const queue = majorParameter === BurstHandlerMajorIdKey ? new BurstHandler(this, hash, majorParameter) : new SequentialHandler(this, hash, majorParameter);
+ this.handlers.set(queue.id, queue);
+ return queue;
+ }
+ /**
+ * Formats the request data to a usable format for fetch
+ *
+ * @param request - The request data
+ */
+ async resolveRequest(request2) {
+ const { options } = this;
+ let query = "";
+ if (request2.query) {
+ const resolvedQuery = request2.query.toString();
+ if (resolvedQuery !== "") {
+ query = `?${resolvedQuery}`;
+ }
+ }
+ const headers = {
+ ...this.options.headers,
+ "User-Agent": `${DefaultUserAgent} ${options.userAgentAppendix}`.trim()
+ };
+ if (request2.auth !== false) {
+ if (!this.#token) {
+ throw new Error("Expected token to be set for this request, but none was present");
+ }
+ headers.Authorization = `${request2.authPrefix ?? this.options.authPrefix} ${this.#token}`;
+ }
+ if (request2.reason?.length) {
+ headers["X-Audit-Log-Reason"] = encodeURIComponent(request2.reason);
+ }
+ const url = `${options.api}${request2.versioned === false ? "" : `/v${options.version}`}${request2.fullRoute}${query}`;
+ let finalBody;
+ let additionalHeaders = {};
+ if (request2.files?.length) {
+ const formData = new FormData();
+ for (const [index, file] of request2.files.entries()) {
+ const fileKey = file.key ?? `files[${index}]`;
+ if (isBufferLike(file.data)) {
+ let contentType = file.contentType;
+ if (!contentType) {
+ const [parsedType] = (0, import_magic_bytes.filetypeinfo)(file.data);
+ if (parsedType) {
+ contentType = OverwrittenMimeTypes[parsedType.mime] ?? parsedType.mime ?? "application/octet-stream";
+ }
+ }
+ formData.append(fileKey, new Blob([file.data], { type: contentType }), file.name);
+ } else {
+ formData.append(fileKey, new Blob([`${file.data}`], { type: file.contentType }), file.name);
+ }
+ }
+ if (request2.body != null) {
+ if (request2.appendToFormData) {
+ for (const [key, value] of Object.entries(request2.body)) {
+ formData.append(key, value);
+ }
+ } else {
+ formData.append("payload_json", JSON.stringify(request2.body));
+ }
+ }
+ finalBody = formData;
+ } else if (request2.body != null) {
+ if (request2.passThroughBody) {
+ finalBody = request2.body;
+ } else {
+ finalBody = JSON.stringify(request2.body);
+ additionalHeaders = { "Content-Type": "application/json" };
+ }
+ }
+ const method = request2.method.toUpperCase();
+ const fetchOptions = {
+ // Set body to null on get / head requests. This does not follow fetch spec (likely because it causes subtle bugs) but is aligned with what request was doing
+ body: ["GET", "HEAD"].includes(method) ? null : finalBody,
+ headers: { ...request2.headers, ...additionalHeaders, ...headers },
+ method,
+ // Prioritize setting an agent per request, use the agent for this instance otherwise.
+ dispatcher: request2.dispatcher ?? this.agent ?? void 0
+ };
+ return { url, fetchOptions };
+ }
+ /**
+ * Stops the hash sweeping interval
+ */
+ clearHashSweeper() {
+ clearInterval(this.hashTimer);
+ }
+ /**
+ * Stops the request handler sweeping interval
+ */
+ clearHandlerSweeper() {
+ clearInterval(this.handlerTimer);
+ }
+ /**
+ * Generates route data for an endpoint:method
+ *
+ * @param endpoint - The raw endpoint to generalize
+ * @param method - The HTTP method this endpoint is called without
+ * @internal
+ */
+ static generateRouteData(endpoint, method) {
+ if (endpoint.startsWith("/interactions/") && endpoint.endsWith("/callback")) {
+ return {
+ majorParameter: BurstHandlerMajorIdKey,
+ bucketRoute: "/interactions/:id/:token/callback",
+ original: endpoint
+ };
+ }
+ const majorIdMatch = /^\/(?:channels|guilds|webhooks)\/(\d{17,19})/.exec(endpoint);
+ const majorId = majorIdMatch?.[1] ?? "global";
+ const baseRoute = endpoint.replaceAll(/\d{17,19}/g, ":id").replace(/\/reactions\/(.*)/, "/reactions/:reaction");
+ let exceptions = "";
+ if (method === "DELETE" /* Delete */ && baseRoute === "/channels/:id/messages/:id") {
+ const id = /\d{17,19}$/.exec(endpoint)[0];
+ const timestamp = import_snowflake.DiscordSnowflake.timestampFrom(id);
+ if (Date.now() - timestamp > 1e3 * 60 * 60 * 24 * 14) {
+ exceptions += "/Delete Old Message";
+ }
+ }
+ return {
+ majorParameter: majorId,
+ bucketRoute: baseRoute + exceptions,
+ original: endpoint
+ };
+ }
+};
+
+// src/shared.ts
+var version = "2.0.1";
+
+// src/index.ts
+globalThis.FormData ??= import_undici2.FormData;
+globalThis.Blob ??= import_node_buffer.Blob;
+setDefaultStrategy((0, import_util2.shouldUseGlobalFetchAndWebSocket)() ? fetch : makeRequest);
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ ALLOWED_EXTENSIONS,
+ ALLOWED_SIZES,
+ ALLOWED_STICKER_EXTENSIONS,
+ BurstHandlerMajorIdKey,
+ CDN,
+ DefaultRestOptions,
+ DefaultUserAgent,
+ DefaultUserAgentAppendix,
+ DiscordAPIError,
+ HTTPError,
+ OverwrittenMimeTypes,
+ REST,
+ RESTEvents,
+ RateLimitError,
+ RequestMethod,
+ calculateUserDefaultAvatarIndex,
+ makeURLSearchParams,
+ parseResponse,
+ version
+});
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/@discordjs/rest/dist/index.js.map b/node_modules/@discordjs/rest/dist/index.js.map
new file mode 100644
index 0000000..b57aca4
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/index.ts","../src/environment.ts","../src/strategies/undiciRequest.ts","../src/lib/utils/constants.ts","../src/lib/CDN.ts","../src/lib/errors/DiscordAPIError.ts","../src/lib/errors/HTTPError.ts","../src/lib/errors/RateLimitError.ts","../src/lib/REST.ts","../src/lib/utils/types.ts","../src/lib/utils/utils.ts","../src/lib/handlers/Shared.ts","../src/lib/handlers/BurstHandler.ts","../src/lib/handlers/SequentialHandler.ts","../src/shared.ts"],"sourcesContent":["import { Blob } from 'node:buffer';\nimport { shouldUseGlobalFetchAndWebSocket } from '@discordjs/util';\nimport { FormData } from 'undici';\nimport { setDefaultStrategy } from './environment.js';\nimport { makeRequest } from './strategies/undiciRequest.js';\n\n// TODO(ckohen): remove once node engine req is bumped to > v18\n(globalThis as any).FormData ??= FormData;\nglobalThis.Blob ??= Blob;\n\nsetDefaultStrategy(shouldUseGlobalFetchAndWebSocket() ? fetch : makeRequest);\n\nexport * from './shared.js';\n","import type { RESTOptions } from './shared.js';\n\nlet defaultStrategy: RESTOptions['makeRequest'];\n\nexport function setDefaultStrategy(newStrategy: RESTOptions['makeRequest']) {\n\tdefaultStrategy = newStrategy;\n}\n\nexport function getDefaultStrategy() {\n\treturn defaultStrategy;\n}\n","import { STATUS_CODES } from 'node:http';\nimport { URLSearchParams } from 'node:url';\nimport { types } from 'node:util';\nimport { type RequestInit, request, Headers } from 'undici';\nimport type { ResponseLike } from '../shared.js';\n\nexport type RequestOptions = Exclude<Parameters<typeof request>[1], undefined>;\n\nexport async function makeRequest(url: string, init: RequestInit): Promise<ResponseLike> {\n\t// The cast is necessary because `headers` and `method` are narrower types in `undici.request`\n\t// our request path guarantees they are of acceptable type for `undici.request`\n\tconst options = {\n\t\t...init,\n\t\tbody: await resolveBody(init.body),\n\t} as RequestOptions;\n\tconst res = await request(url, options);\n\treturn {\n\t\tbody: res.body,\n\t\tasync arrayBuffer() {\n\t\t\treturn res.body.arrayBuffer();\n\t\t},\n\t\tasync json() {\n\t\t\treturn res.body.json();\n\t\t},\n\t\tasync text() {\n\t\t\treturn res.body.text();\n\t\t},\n\t\tget bodyUsed() {\n\t\t\treturn res.body.bodyUsed;\n\t\t},\n\t\theaders: new Headers(res.headers as Record<string, string[] | string>),\n\t\tstatus: res.statusCode,\n\t\tstatusText: STATUS_CODES[res.statusCode]!,\n\t\tok: res.statusCode >= 200 && res.statusCode < 300,\n\t};\n}\n\nexport async function resolveBody(body: RequestInit['body']): Promise<Exclude<RequestOptions['body'], undefined>> {\n\t// eslint-disable-next-line no-eq-null, eqeqeq\n\tif (body == null) {\n\t\treturn null;\n\t} else if (typeof body === 'string') {\n\t\treturn body;\n\t} else if (types.isUint8Array(body)) {\n\t\treturn body;\n\t} else if (types.isArrayBuffer(body)) {\n\t\treturn new Uint8Array(body);\n\t} else if (body instanceof URLSearchParams) {\n\t\treturn body.toString();\n\t} else if (body instanceof DataView) {\n\t\treturn new Uint8Array(body.buffer);\n\t} else if (body instanceof Blob) {\n\t\treturn new Uint8Array(await body.arrayBuffer());\n\t} else if (body instanceof FormData) {\n\t\treturn body;\n\t} else if ((body as Iterable<Uint8Array>)[Symbol.iterator]) {\n\t\tconst chunks = [...(body as Iterable<Uint8Array>)];\n\n\t\treturn Buffer.concat(chunks);\n\t} else if ((body as AsyncIterable<Uint8Array>)[Symbol.asyncIterator]) {\n\t\tconst chunks: Uint8Array[] = [];\n\n\t\tfor await (const chunk of body as AsyncIterable<Uint8Array>) {\n\t\t\tchunks.push(chunk);\n\t\t}\n\n\t\treturn Buffer.concat(chunks);\n\t}\n\n\tthrow new TypeError(`Unable to resolve body.`);\n}\n","import { getUserAgentAppendix } from '@discordjs/util';\nimport { APIVersion } from 'discord-api-types/v10';\nimport { getDefaultStrategy } from '../../environment.js';\nimport type { RESTOptions, ResponseLike } from './types.js';\n\nexport const DefaultUserAgent =\n\t`DiscordBot (https://discord.js.org, 2.0.1)` as `DiscordBot (https://discord.js.org, ${string})`;\n\n/**\n * The default string to append onto the user agent.\n */\nexport const DefaultUserAgentAppendix = getUserAgentAppendix();\n\nexport const DefaultRestOptions = {\n\tagent: null,\n\tapi: 'https://discord.com/api',\n\tauthPrefix: 'Bot',\n\tcdn: 'https://cdn.discordapp.com',\n\theaders: {},\n\tinvalidRequestWarningInterval: 0,\n\tglobalRequestsPerSecond: 50,\n\toffset: 50,\n\trejectOnRateLimit: null,\n\tretries: 3,\n\ttimeout: 15_000,\n\tuserAgentAppendix: DefaultUserAgentAppendix,\n\tversion: APIVersion,\n\thashSweepInterval: 14_400_000, // 4 Hours\n\thashLifetime: 86_400_000, // 24 Hours\n\thandlerSweepInterval: 3_600_000, // 1 Hour\n\tasync makeRequest(...args): Promise<ResponseLike> {\n\t\treturn getDefaultStrategy()(...args);\n\t},\n} as const satisfies Required<RESTOptions>;\n\n/**\n * The events that the REST manager emits\n */\nexport enum RESTEvents {\n\tDebug = 'restDebug',\n\tHandlerSweep = 'handlerSweep',\n\tHashSweep = 'hashSweep',\n\tInvalidRequestWarning = 'invalidRequestWarning',\n\tRateLimited = 'rateLimited',\n\tResponse = 'response',\n}\n\nexport const ALLOWED_EXTENSIONS = ['webp', 'png', 'jpg', 'jpeg', 'gif'] as const satisfies readonly string[];\nexport const ALLOWED_STICKER_EXTENSIONS = ['png', 'json', 'gif'] as const satisfies readonly string[];\nexport const ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1_024, 2_048, 4_096] as const satisfies readonly number[];\n\nexport type ImageExtension = (typeof ALLOWED_EXTENSIONS)[number];\nexport type StickerExtension = (typeof ALLOWED_STICKER_EXTENSIONS)[number];\nexport type ImageSize = (typeof ALLOWED_SIZES)[number];\n\nexport const OverwrittenMimeTypes = {\n\t// https://github.com/discordjs/discord.js/issues/8557\n\t'image/apng': 'image/png',\n} as const satisfies Readonly<Record<string, string>>;\n\nexport const BurstHandlerMajorIdKey = 'burst';\n","/* eslint-disable jsdoc/check-param-names */\nimport {\n\tALLOWED_EXTENSIONS,\n\tALLOWED_SIZES,\n\tALLOWED_STICKER_EXTENSIONS,\n\tDefaultRestOptions,\n\ttype ImageExtension,\n\ttype ImageSize,\n\ttype StickerExtension,\n} from './utils/constants.js';\n\n/**\n * The options used for image URLs\n */\nexport interface BaseImageURLOptions {\n\t/**\n\t * The extension to use for the image URL\n\t *\n\t * @defaultValue `'webp'`\n\t */\n\textension?: ImageExtension;\n\t/**\n\t * The size specified in the image URL\n\t */\n\tsize?: ImageSize;\n}\n\n/**\n * The options used for image URLs with animated content\n */\nexport interface ImageURLOptions extends BaseImageURLOptions {\n\t/**\n\t * Whether or not to prefer the static version of an image asset.\n\t */\n\tforceStatic?: boolean;\n}\n\n/**\n * The options to use when making a CDN URL\n */\nexport interface MakeURLOptions {\n\t/**\n\t * The allowed extensions that can be used\n\t */\n\tallowedExtensions?: readonly string[];\n\t/**\n\t * The extension to use for the image URL\n\t *\n\t * @defaultValue `'webp'`\n\t */\n\textension?: string | undefined;\n\t/**\n\t * The size specified in the image URL\n\t */\n\tsize?: ImageSize;\n}\n\n/**\n * The CDN link builder\n */\nexport class CDN {\n\tpublic constructor(private readonly base: string = DefaultRestOptions.cdn) {}\n\n\t/**\n\t * Generates an app asset URL for a client's asset.\n\t *\n\t * @param clientId - The client id that has the asset\n\t * @param assetHash - The hash provided by Discord for this asset\n\t * @param options - Optional options for the asset\n\t */\n\tpublic appAsset(clientId: string, assetHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/app-assets/${clientId}/${assetHash}`, options);\n\t}\n\n\t/**\n\t * Generates an app icon URL for a client's icon.\n\t *\n\t * @param clientId - The client id that has the icon\n\t * @param iconHash - The hash provided by Discord for this icon\n\t * @param options - Optional options for the icon\n\t */\n\tpublic appIcon(clientId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/app-icons/${clientId}/${iconHash}`, options);\n\t}\n\n\t/**\n\t * Generates an avatar URL, e.g. for a user or a webhook.\n\t *\n\t * @param id - The id that has the icon\n\t * @param avatarHash - The hash provided by Discord for this avatar\n\t * @param options - Optional options for the avatar\n\t */\n\tpublic avatar(id: string, avatarHash: string, options?: Readonly<ImageURLOptions>): string {\n\t\treturn this.dynamicMakeURL(`/avatars/${id}/${avatarHash}`, avatarHash, options);\n\t}\n\n\t/**\n\t * Generates a user avatar decoration URL.\n\t *\n\t * @param userId - The id of the user\n\t * @param userAvatarDecoration - The hash provided by Discord for this avatar decoration\n\t * @param options - Optional options for the avatar decoration\n\t */\n\tpublic avatarDecoration(\n\t\tuserId: string,\n\t\tuserAvatarDecoration: string,\n\t\toptions?: Readonly<BaseImageURLOptions>,\n\t): string {\n\t\treturn this.makeURL(`/avatar-decorations/${userId}/${userAvatarDecoration}`, options);\n\t}\n\n\t/**\n\t * Generates a banner URL, e.g. for a user or a guild.\n\t *\n\t * @param id - The id that has the banner splash\n\t * @param bannerHash - The hash provided by Discord for this banner\n\t * @param options - Optional options for the banner\n\t */\n\tpublic banner(id: string, bannerHash: string, options?: Readonly<ImageURLOptions>): string {\n\t\treturn this.dynamicMakeURL(`/banners/${id}/${bannerHash}`, bannerHash, options);\n\t}\n\n\t/**\n\t * Generates an icon URL for a channel, e.g. a group DM.\n\t *\n\t * @param channelId - The channel id that has the icon\n\t * @param iconHash - The hash provided by Discord for this channel\n\t * @param options - Optional options for the icon\n\t */\n\tpublic channelIcon(channelId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/channel-icons/${channelId}/${iconHash}`, options);\n\t}\n\n\t/**\n\t * Generates a default avatar URL\n\t *\n\t * @param index - The default avatar index\n\t * @remarks\n\t * To calculate the index for a user do `(userId >> 22) % 6`,\n\t * or `discriminator % 5` if they're using the legacy username system.\n\t */\n\tpublic defaultAvatar(index: number): string {\n\t\treturn this.makeURL(`/embed/avatars/${index}`, { extension: 'png' });\n\t}\n\n\t/**\n\t * Generates a discovery splash URL for a guild's discovery splash.\n\t *\n\t * @param guildId - The guild id that has the discovery splash\n\t * @param splashHash - The hash provided by Discord for this splash\n\t * @param options - Optional options for the splash\n\t */\n\tpublic discoverySplash(guildId: string, splashHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/discovery-splashes/${guildId}/${splashHash}`, options);\n\t}\n\n\t/**\n\t * Generates an emoji's URL for an emoji.\n\t *\n\t * @param emojiId - The emoji id\n\t * @param extension - The extension of the emoji\n\t */\n\tpublic emoji(emojiId: string, extension?: ImageExtension): string {\n\t\treturn this.makeURL(`/emojis/${emojiId}`, { extension });\n\t}\n\n\t/**\n\t * Generates a guild member avatar URL.\n\t *\n\t * @param guildId - The id of the guild\n\t * @param userId - The id of the user\n\t * @param avatarHash - The hash provided by Discord for this avatar\n\t * @param options - Optional options for the avatar\n\t */\n\tpublic guildMemberAvatar(\n\t\tguildId: string,\n\t\tuserId: string,\n\t\tavatarHash: string,\n\t\toptions?: Readonly<ImageURLOptions>,\n\t): string {\n\t\treturn this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/avatars/${avatarHash}`, avatarHash, options);\n\t}\n\n\t/**\n\t * Generates a guild member banner URL.\n\t *\n\t * @param guildId - The id of the guild\n\t * @param userId - The id of the user\n\t * @param bannerHash - The hash provided by Discord for this banner\n\t * @param options - Optional options for the banner\n\t */\n\tpublic guildMemberBanner(\n\t\tguildId: string,\n\t\tuserId: string,\n\t\tbannerHash: string,\n\t\toptions?: Readonly<ImageURLOptions>,\n\t): string {\n\t\treturn this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banner`, bannerHash, options);\n\t}\n\n\t/**\n\t * Generates an icon URL, e.g. for a guild.\n\t *\n\t * @param id - The id that has the icon splash\n\t * @param iconHash - The hash provided by Discord for this icon\n\t * @param options - Optional options for the icon\n\t */\n\tpublic icon(id: string, iconHash: string, options?: Readonly<ImageURLOptions>): string {\n\t\treturn this.dynamicMakeURL(`/icons/${id}/${iconHash}`, iconHash, options);\n\t}\n\n\t/**\n\t * Generates a URL for the icon of a role\n\t *\n\t * @param roleId - The id of the role that has the icon\n\t * @param roleIconHash - The hash provided by Discord for this role icon\n\t * @param options - Optional options for the role icon\n\t */\n\tpublic roleIcon(roleId: string, roleIconHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/role-icons/${roleId}/${roleIconHash}`, options);\n\t}\n\n\t/**\n\t * Generates a guild invite splash URL for a guild's invite splash.\n\t *\n\t * @param guildId - The guild id that has the invite splash\n\t * @param splashHash - The hash provided by Discord for this splash\n\t * @param options - Optional options for the splash\n\t */\n\tpublic splash(guildId: string, splashHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/splashes/${guildId}/${splashHash}`, options);\n\t}\n\n\t/**\n\t * Generates a sticker URL.\n\t *\n\t * @param stickerId - The sticker id\n\t * @param extension - The extension of the sticker\n\t * @privateRemarks\n\t * Stickers cannot have a `.webp` extension, so we default to a `.png`\n\t */\n\tpublic sticker(stickerId: string, extension: StickerExtension = 'png'): string {\n\t\treturn this.makeURL(`/stickers/${stickerId}`, { allowedExtensions: ALLOWED_STICKER_EXTENSIONS, extension });\n\t}\n\n\t/**\n\t * Generates a sticker pack banner URL.\n\t *\n\t * @param bannerId - The banner id\n\t * @param options - Optional options for the banner\n\t */\n\tpublic stickerPackBanner(bannerId: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/app-assets/710982414301790216/store/${bannerId}`, options);\n\t}\n\n\t/**\n\t * Generates a team icon URL for a team's icon.\n\t *\n\t * @param teamId - The team id that has the icon\n\t * @param iconHash - The hash provided by Discord for this icon\n\t * @param options - Optional options for the icon\n\t */\n\tpublic teamIcon(teamId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/team-icons/${teamId}/${iconHash}`, options);\n\t}\n\n\t/**\n\t * Generates a cover image for a guild scheduled event.\n\t *\n\t * @param scheduledEventId - The scheduled event id\n\t * @param coverHash - The hash provided by discord for this cover image\n\t * @param options - Optional options for the cover image\n\t */\n\tpublic guildScheduledEventCover(\n\t\tscheduledEventId: string,\n\t\tcoverHash: string,\n\t\toptions?: Readonly<BaseImageURLOptions>,\n\t): string {\n\t\treturn this.makeURL(`/guild-events/${scheduledEventId}/${coverHash}`, options);\n\t}\n\n\t/**\n\t * Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.\n\t *\n\t * @param route - The base cdn route\n\t * @param hash - The hash provided by Discord for this icon\n\t * @param options - Optional options for the link\n\t */\n\tprivate dynamicMakeURL(\n\t\troute: string,\n\t\thash: string,\n\t\t{ forceStatic = false, ...options }: Readonly<ImageURLOptions> = {},\n\t): string {\n\t\treturn this.makeURL(route, !forceStatic && hash.startsWith('a_') ? { ...options, extension: 'gif' } : options);\n\t}\n\n\t/**\n\t * Constructs the URL for the resource\n\t *\n\t * @param route - The base cdn route\n\t * @param options - The extension/size options for the link\n\t */\n\tprivate makeURL(\n\t\troute: string,\n\t\t{ allowedExtensions = ALLOWED_EXTENSIONS, extension = 'webp', size }: Readonly<MakeURLOptions> = {},\n\t): string {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\textension = String(extension).toLowerCase();\n\n\t\tif (!allowedExtensions.includes(extension)) {\n\t\t\tthrow new RangeError(`Invalid extension provided: ${extension}\\nMust be one of: ${allowedExtensions.join(', ')}`);\n\t\t}\n\n\t\tif (size && !ALLOWED_SIZES.includes(size)) {\n\t\t\tthrow new RangeError(`Invalid size provided: ${size}\\nMust be one of: ${ALLOWED_SIZES.join(', ')}`);\n\t\t}\n\n\t\tconst url = new URL(`${this.base}${route}.${extension}`);\n\n\t\tif (size) {\n\t\t\turl.searchParams.set('size', String(size));\n\t\t}\n\n\t\treturn url.toString();\n\t}\n}\n","import type { InternalRequest, RawFile } from '../utils/types.js';\n\ninterface DiscordErrorFieldInformation {\n\tcode: string;\n\tmessage: string;\n}\n\ninterface DiscordErrorGroupWrapper {\n\t_errors: DiscordError[];\n}\n\ntype DiscordError = DiscordErrorFieldInformation | DiscordErrorGroupWrapper | string | { [k: string]: DiscordError };\n\nexport interface DiscordErrorData {\n\tcode: number;\n\terrors?: DiscordError;\n\tmessage: string;\n}\n\nexport interface OAuthErrorData {\n\terror: string;\n\terror_description?: string;\n}\n\nexport interface RequestBody {\n\tfiles: RawFile[] | undefined;\n\tjson: unknown | undefined;\n}\n\nfunction isErrorGroupWrapper(error: DiscordError): error is DiscordErrorGroupWrapper {\n\treturn Reflect.has(error as Record<string, unknown>, '_errors');\n}\n\nfunction isErrorResponse(error: DiscordError): error is DiscordErrorFieldInformation {\n\treturn typeof Reflect.get(error as Record<string, unknown>, 'message') === 'string';\n}\n\n/**\n * Represents an API error returned by Discord\n */\nexport class DiscordAPIError extends Error {\n\tpublic requestBody: RequestBody;\n\n\t/**\n\t * @param rawError - The error reported by Discord\n\t * @param code - The error code reported by Discord\n\t * @param status - The status code of the response\n\t * @param method - The method of the request that erred\n\t * @param url - The url of the request that erred\n\t * @param bodyData - The unparsed data for the request that errored\n\t */\n\tpublic constructor(\n\t\tpublic rawError: DiscordErrorData | OAuthErrorData,\n\t\tpublic code: number | string,\n\t\tpublic status: number,\n\t\tpublic method: string,\n\t\tpublic url: string,\n\t\tbodyData: Pick<InternalRequest, 'body' | 'files'>,\n\t) {\n\t\tsuper(DiscordAPIError.getMessage(rawError));\n\n\t\tthis.requestBody = { files: bodyData.files, json: bodyData.body };\n\t}\n\n\t/**\n\t * The name of the error\n\t */\n\tpublic override get name(): string {\n\t\treturn `${DiscordAPIError.name}[${this.code}]`;\n\t}\n\n\tprivate static getMessage(error: DiscordErrorData | OAuthErrorData) {\n\t\tlet flattened = '';\n\t\tif ('code' in error) {\n\t\t\tif (error.errors) {\n\t\t\t\tflattened = [...this.flattenDiscordError(error.errors)].join('\\n');\n\t\t\t}\n\n\t\t\treturn error.message && flattened\n\t\t\t\t? `${error.message}\\n${flattened}`\n\t\t\t\t: error.message || flattened || 'Unknown Error';\n\t\t}\n\n\t\treturn error.error_description ?? 'No Description';\n\t}\n\n\tprivate static *flattenDiscordError(obj: DiscordError, key = ''): IterableIterator<string> {\n\t\tif (isErrorResponse(obj)) {\n\t\t\treturn yield `${key.length ? `${key}[${obj.code}]` : `${obj.code}`}: ${obj.message}`.trim();\n\t\t}\n\n\t\tfor (const [otherKey, val] of Object.entries(obj)) {\n\t\t\tconst nextKey = otherKey.startsWith('_')\n\t\t\t\t? key\n\t\t\t\t: key\n\t\t\t\t? Number.isNaN(Number(otherKey))\n\t\t\t\t\t? `${key}.${otherKey}`\n\t\t\t\t\t: `${key}[${otherKey}]`\n\t\t\t\t: otherKey;\n\n\t\t\tif (typeof val === 'string') {\n\t\t\t\tyield val;\n\t\t\t} else if (isErrorGroupWrapper(val)) {\n\t\t\t\tfor (const error of val._errors) {\n\t\t\t\t\tyield* this.flattenDiscordError(error, nextKey);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tyield* this.flattenDiscordError(val, nextKey);\n\t\t\t}\n\t\t}\n\t}\n}\n","import type { InternalRequest } from '../utils/types.js';\nimport type { RequestBody } from './DiscordAPIError.js';\n\n/**\n * Represents a HTTP error\n */\nexport class HTTPError extends Error {\n\tpublic requestBody: RequestBody;\n\n\tpublic override name = HTTPError.name;\n\n\t/**\n\t * @param status - The status code of the response\n\t * @param statusText - The status text of the response\n\t * @param method - The method of the request that erred\n\t * @param url - The url of the request that erred\n\t * @param bodyData - The unparsed data for the request that errored\n\t */\n\tpublic constructor(\n\t\tpublic status: number,\n\t\tstatusText: string,\n\t\tpublic method: string,\n\t\tpublic url: string,\n\t\tbodyData: Pick<InternalRequest, 'body' | 'files'>,\n\t) {\n\t\tsuper(statusText);\n\t\tthis.requestBody = { files: bodyData.files, json: bodyData.body };\n\t}\n}\n","import type { RateLimitData } from '../utils/types.js';\n\nexport class RateLimitError extends Error implements RateLimitData {\n\tpublic timeToReset: number;\n\n\tpublic limit: number;\n\n\tpublic method: string;\n\n\tpublic hash: string;\n\n\tpublic url: string;\n\n\tpublic route: string;\n\n\tpublic majorParameter: string;\n\n\tpublic global: boolean;\n\n\tpublic constructor({ timeToReset, limit, method, hash, url, route, majorParameter, global }: RateLimitData) {\n\t\tsuper();\n\t\tthis.timeToReset = timeToReset;\n\t\tthis.limit = limit;\n\t\tthis.method = method;\n\t\tthis.hash = hash;\n\t\tthis.url = url;\n\t\tthis.route = route;\n\t\tthis.majorParameter = majorParameter;\n\t\tthis.global = global;\n\t}\n\n\t/**\n\t * The name of the error\n\t */\n\tpublic override get name(): string {\n\t\treturn `${RateLimitError.name}[${this.route}]`;\n\t}\n}\n","import { Collection } from '@discordjs/collection';\nimport { DiscordSnowflake } from '@sapphire/snowflake';\nimport { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';\nimport { filetypeinfo } from 'magic-bytes.js';\nimport type { RequestInit, BodyInit, Dispatcher } from 'undici';\nimport { CDN } from './CDN.js';\nimport { BurstHandler } from './handlers/BurstHandler.js';\nimport { SequentialHandler } from './handlers/SequentialHandler.js';\nimport type { IHandler } from './interfaces/Handler.js';\nimport {\n\tBurstHandlerMajorIdKey,\n\tDefaultRestOptions,\n\tDefaultUserAgent,\n\tOverwrittenMimeTypes,\n\tRESTEvents,\n} from './utils/constants.js';\nimport { RequestMethod } from './utils/types.js';\nimport type {\n\tRESTOptions,\n\tResponseLike,\n\tRestEventsMap,\n\tHashData,\n\tInternalRequest,\n\tRouteLike,\n\tRequestHeaders,\n\tRouteData,\n\tRequestData,\n} from './utils/types.js';\nimport { isBufferLike, parseResponse } from './utils/utils.js';\n\n/**\n * Represents the class that manages handlers for endpoints\n */\nexport class REST extends AsyncEventEmitter<RestEventsMap> {\n\t/**\n\t * The {@link https://undici.nodejs.org/#/docs/api/Agent | Agent} for all requests\n\t * performed by this manager.\n\t */\n\tpublic agent: Dispatcher | null = null;\n\n\tpublic readonly cdn: CDN;\n\n\t/**\n\t * The number of requests remaining in the global bucket\n\t */\n\tpublic globalRemaining: number;\n\n\t/**\n\t * The promise used to wait out the global rate limit\n\t */\n\tpublic globalDelay: Promise<void> | null = null;\n\n\t/**\n\t * The timestamp at which the global bucket resets\n\t */\n\tpublic globalReset = -1;\n\n\t/**\n\t * API bucket hashes that are cached from provided routes\n\t */\n\tpublic readonly hashes = new Collection<string, HashData>();\n\n\t/**\n\t * Request handlers created from the bucket hash and the major parameters\n\t */\n\tpublic readonly handlers = new Collection<string, IHandler>();\n\n\t#token: string | null = null;\n\n\tprivate hashTimer!: NodeJS.Timer | number;\n\n\tprivate handlerTimer!: NodeJS.Timer | number;\n\n\tpublic readonly options: RESTOptions;\n\n\tpublic constructor(options: Partial<RESTOptions> = {}) {\n\t\tsuper();\n\t\tthis.cdn = new CDN(options.cdn ?? DefaultRestOptions.cdn);\n\t\tthis.options = { ...DefaultRestOptions, ...options };\n\t\tthis.options.offset = Math.max(0, this.options.offset);\n\t\tthis.globalRemaining = Math.max(1, this.options.globalRequestsPerSecond);\n\t\tthis.agent = options.agent ?? null;\n\n\t\t// Start sweepers\n\t\tthis.setupSweepers();\n\t}\n\n\tprivate setupSweepers() {\n\t\t// eslint-disable-next-line unicorn/consistent-function-scoping\n\t\tconst validateMaxInterval = (interval: number) => {\n\t\t\tif (interval > 14_400_000) {\n\t\t\t\tthrow new Error('Cannot set an interval greater than 4 hours');\n\t\t\t}\n\t\t};\n\n\t\tif (this.options.hashSweepInterval !== 0 && this.options.hashSweepInterval !== Number.POSITIVE_INFINITY) {\n\t\t\tvalidateMaxInterval(this.options.hashSweepInterval);\n\t\t\tthis.hashTimer = setInterval(() => {\n\t\t\t\tconst sweptHashes = new Collection<string, HashData>();\n\t\t\t\tconst currentDate = Date.now();\n\n\t\t\t\t// Begin sweeping hash based on lifetimes\n\t\t\t\tthis.hashes.sweep((val, key) => {\n\t\t\t\t\t// `-1` indicates a global hash\n\t\t\t\t\tif (val.lastAccess === -1) return false;\n\n\t\t\t\t\t// Check if lifetime has been exceeded\n\t\t\t\t\tconst shouldSweep = Math.floor(currentDate - val.lastAccess) > this.options.hashLifetime;\n\n\t\t\t\t\t// Add hash to collection of swept hashes\n\t\t\t\t\tif (shouldSweep) {\n\t\t\t\t\t\t// Add to swept hashes\n\t\t\t\t\t\tsweptHashes.set(key, val);\n\n\t\t\t\t\t\t// Emit debug information\n\t\t\t\t\t\tthis.emit(RESTEvents.Debug, `Hash ${val.value} for ${key} swept due to lifetime being exceeded`);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn shouldSweep;\n\t\t\t\t});\n\n\t\t\t\t// Fire event\n\t\t\t\tthis.emit(RESTEvents.HashSweep, sweptHashes);\n\t\t\t}, this.options.hashSweepInterval);\n\n\t\t\tthis.hashTimer.unref?.();\n\t\t}\n\n\t\tif (this.options.handlerSweepInterval !== 0 && this.options.handlerSweepInterval !== Number.POSITIVE_INFINITY) {\n\t\t\tvalidateMaxInterval(this.options.handlerSweepInterval);\n\t\t\tthis.handlerTimer = setInterval(() => {\n\t\t\t\tconst sweptHandlers = new Collection<string, IHandler>();\n\n\t\t\t\t// Begin sweeping handlers based on activity\n\t\t\t\tthis.handlers.sweep((val, key) => {\n\t\t\t\t\tconst { inactive } = val;\n\n\t\t\t\t\t// Collect inactive handlers\n\t\t\t\t\tif (inactive) {\n\t\t\t\t\t\tsweptHandlers.set(key, val);\n\t\t\t\t\t\tthis.emit(RESTEvents.Debug, `Handler ${val.id} for ${key} swept due to being inactive`);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn inactive;\n\t\t\t\t});\n\n\t\t\t\t// Fire event\n\t\t\t\tthis.emit(RESTEvents.HandlerSweep, sweptHandlers);\n\t\t\t}, this.options.handlerSweepInterval);\n\n\t\t\tthis.handlerTimer.unref?.();\n\t\t}\n\t}\n\n\t/**\n\t * Runs a get request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async get(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Get });\n\t}\n\n\t/**\n\t * Runs a delete request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async delete(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Delete });\n\t}\n\n\t/**\n\t * Runs a post request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async post(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Post });\n\t}\n\n\t/**\n\t * Runs a put request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async put(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Put });\n\t}\n\n\t/**\n\t * Runs a patch request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async patch(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Patch });\n\t}\n\n\t/**\n\t * Runs a request from the api\n\t *\n\t * @param options - Request options\n\t */\n\tpublic async request(options: InternalRequest) {\n\t\tconst response = await this.queueRequest(options);\n\t\treturn parseResponse(response);\n\t}\n\n\t/**\n\t * Sets the default agent to use for requests performed by this manager\n\t *\n\t * @param agent - The agent to use\n\t */\n\tpublic setAgent(agent: Dispatcher) {\n\t\tthis.agent = agent;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the authorization token that should be used for requests\n\t *\n\t * @param token - The authorization token to use\n\t */\n\tpublic setToken(token: string) {\n\t\tthis.#token = token;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Queues a request to be sent\n\t *\n\t * @param request - All the information needed to make a request\n\t * @returns The response from the api request\n\t */\n\tpublic async queueRequest(request: InternalRequest): Promise<ResponseLike> {\n\t\t// Generalize the endpoint to its route data\n\t\tconst routeId = REST.generateRouteData(request.fullRoute, request.method);\n\t\t// Get the bucket hash for the generic route, or point to a global route otherwise\n\t\tconst hash = this.hashes.get(`${request.method}:${routeId.bucketRoute}`) ?? {\n\t\t\tvalue: `Global(${request.method}:${routeId.bucketRoute})`,\n\t\t\tlastAccess: -1,\n\t\t};\n\n\t\t// Get the request handler for the obtained hash, with its major parameter\n\t\tconst handler =\n\t\t\tthis.handlers.get(`${hash.value}:${routeId.majorParameter}`) ??\n\t\t\tthis.createHandler(hash.value, routeId.majorParameter);\n\n\t\t// Resolve the request into usable fetch options\n\t\tconst { url, fetchOptions } = await this.resolveRequest(request);\n\n\t\t// Queue the request\n\t\treturn handler.queueRequest(routeId, url, fetchOptions, {\n\t\t\tbody: request.body,\n\t\t\tfiles: request.files,\n\t\t\tauth: request.auth !== false,\n\t\t\tsignal: request.signal,\n\t\t});\n\t}\n\n\t/**\n\t * Creates a new rate limit handler from a hash, based on the hash and the major parameter\n\t *\n\t * @param hash - The hash for the route\n\t * @param majorParameter - The major parameter for this handler\n\t * @internal\n\t */\n\tprivate createHandler(hash: string, majorParameter: string) {\n\t\t// Create the async request queue to handle requests\n\t\tconst queue =\n\t\t\tmajorParameter === BurstHandlerMajorIdKey\n\t\t\t\t? new BurstHandler(this, hash, majorParameter)\n\t\t\t\t: new SequentialHandler(this, hash, majorParameter);\n\t\t// Save the queue based on its id\n\t\tthis.handlers.set(queue.id, queue);\n\n\t\treturn queue;\n\t}\n\n\t/**\n\t * Formats the request data to a usable format for fetch\n\t *\n\t * @param request - The request data\n\t */\n\tprivate async resolveRequest(request: InternalRequest): Promise<{ fetchOptions: RequestInit; url: string }> {\n\t\tconst { options } = this;\n\n\t\tlet query = '';\n\n\t\t// If a query option is passed, use it\n\t\tif (request.query) {\n\t\t\tconst resolvedQuery = request.query.toString();\n\t\t\tif (resolvedQuery !== '') {\n\t\t\t\tquery = `?${resolvedQuery}`;\n\t\t\t}\n\t\t}\n\n\t\t// Create the required headers\n\t\tconst headers: RequestHeaders = {\n\t\t\t...this.options.headers,\n\t\t\t'User-Agent': `${DefaultUserAgent} ${options.userAgentAppendix}`.trim(),\n\t\t};\n\n\t\t// If this request requires authorization (allowing non-\"authorized\" requests for webhooks)\n\t\tif (request.auth !== false) {\n\t\t\t// If we haven't received a token, throw an error\n\t\t\tif (!this.#token) {\n\t\t\t\tthrow new Error('Expected token to be set for this request, but none was present');\n\t\t\t}\n\n\t\t\theaders.Authorization = `${request.authPrefix ?? this.options.authPrefix} ${this.#token}`;\n\t\t}\n\n\t\t// If a reason was set, set it's appropriate header\n\t\tif (request.reason?.length) {\n\t\t\theaders['X-Audit-Log-Reason'] = encodeURIComponent(request.reason);\n\t\t}\n\n\t\t// Format the full request URL (api base, optional version, endpoint, optional querystring)\n\t\tconst url = `${options.api}${request.versioned === false ? '' : `/v${options.version}`}${\n\t\t\trequest.fullRoute\n\t\t}${query}`;\n\n\t\tlet finalBody: RequestInit['body'];\n\t\tlet additionalHeaders: Record<string, string> = {};\n\n\t\tif (request.files?.length) {\n\t\t\tconst formData = new FormData();\n\n\t\t\t// Attach all files to the request\n\t\t\tfor (const [index, file] of request.files.entries()) {\n\t\t\t\tconst fileKey = file.key ?? `files[${index}]`;\n\n\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/FormData/append#parameters\n\t\t\t\t// FormData.append only accepts a string or Blob.\n\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob#parameters\n\t\t\t\t// The Blob constructor accepts TypedArray/ArrayBuffer, strings, and Blobs.\n\t\t\t\tif (isBufferLike(file.data)) {\n\t\t\t\t\t// Try to infer the content type from the buffer if one isn't passed\n\t\t\t\t\tlet contentType = file.contentType;\n\n\t\t\t\t\tif (!contentType) {\n\t\t\t\t\t\tconst [parsedType] = filetypeinfo(file.data);\n\n\t\t\t\t\t\tif (parsedType) {\n\t\t\t\t\t\t\tcontentType =\n\t\t\t\t\t\t\t\tOverwrittenMimeTypes[parsedType.mime as keyof typeof OverwrittenMimeTypes] ??\n\t\t\t\t\t\t\t\tparsedType.mime ??\n\t\t\t\t\t\t\t\t'application/octet-stream';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tformData.append(fileKey, new Blob([file.data], { type: contentType }), file.name);\n\t\t\t\t} else {\n\t\t\t\t\tformData.append(fileKey, new Blob([`${file.data}`], { type: file.contentType }), file.name);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If a JSON body was added as well, attach it to the form data, using payload_json unless otherwise specified\n\t\t\t// eslint-disable-next-line no-eq-null, eqeqeq\n\t\t\tif (request.body != null) {\n\t\t\t\tif (request.appendToFormData) {\n\t\t\t\t\tfor (const [key, value] of Object.entries(request.body as Record<string, unknown>)) {\n\t\t\t\t\t\tformData.append(key, value);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tformData.append('payload_json', JSON.stringify(request.body));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set the final body to the form data\n\t\t\tfinalBody = formData;\n\n\t\t\t// eslint-disable-next-line no-eq-null, eqeqeq\n\t\t} else if (request.body != null) {\n\t\t\tif (request.passThroughBody) {\n\t\t\t\tfinalBody = request.body as BodyInit;\n\t\t\t} else {\n\t\t\t\t// Stringify the JSON data\n\t\t\t\tfinalBody = JSON.stringify(request.body);\n\t\t\t\t// Set the additional headers to specify the content-type\n\t\t\t\tadditionalHeaders = { 'Content-Type': 'application/json' };\n\t\t\t}\n\t\t}\n\n\t\tconst method = request.method.toUpperCase();\n\n\t\t// The non null assertions in the following block are due to exactOptionalPropertyTypes, they have been tested to work with undefined\n\t\tconst fetchOptions: RequestInit = {\n\t\t\t// Set body to null on get / head requests. This does not follow fetch spec (likely because it causes subtle bugs) but is aligned with what request was doing\n\t\t\tbody: ['GET', 'HEAD'].includes(method) ? null : finalBody!,\n\t\t\theaders: { ...request.headers, ...additionalHeaders, ...headers } as Record<string, string>,\n\t\t\tmethod,\n\t\t\t// Prioritize setting an agent per request, use the agent for this instance otherwise.\n\t\t\tdispatcher: request.dispatcher ?? this.agent ?? undefined!,\n\t\t};\n\n\t\treturn { url, fetchOptions };\n\t}\n\n\t/**\n\t * Stops the hash sweeping interval\n\t */\n\tpublic clearHashSweeper() {\n\t\tclearInterval(this.hashTimer);\n\t}\n\n\t/**\n\t * Stops the request handler sweeping interval\n\t */\n\tpublic clearHandlerSweeper() {\n\t\tclearInterval(this.handlerTimer);\n\t}\n\n\t/**\n\t * Generates route data for an endpoint:method\n\t *\n\t * @param endpoint - The raw endpoint to generalize\n\t * @param method - The HTTP method this endpoint is called without\n\t * @internal\n\t */\n\tprivate static generateRouteData(endpoint: RouteLike, method: RequestMethod): RouteData {\n\t\tif (endpoint.startsWith('/interactions/') && endpoint.endsWith('/callback')) {\n\t\t\treturn {\n\t\t\t\tmajorParameter: BurstHandlerMajorIdKey,\n\t\t\t\tbucketRoute: '/interactions/:id/:token/callback',\n\t\t\t\toriginal: endpoint,\n\t\t\t};\n\t\t}\n\n\t\tconst majorIdMatch = /^\\/(?:channels|guilds|webhooks)\\/(\\d{17,19})/.exec(endpoint);\n\n\t\t// Get the major id for this route - global otherwise\n\t\tconst majorId = majorIdMatch?.[1] ?? 'global';\n\n\t\tconst baseRoute = endpoint\n\t\t\t// Strip out all ids\n\t\t\t.replaceAll(/\\d{17,19}/g, ':id')\n\t\t\t// Strip out reaction as they fall under the same bucket\n\t\t\t.replace(/\\/reactions\\/(.*)/, '/reactions/:reaction');\n\n\t\tlet exceptions = '';\n\n\t\t// Hard-Code Old Message Deletion Exception (2 week+ old messages are a different bucket)\n\t\t// https://github.com/discord/discord-api-docs/issues/1295\n\t\tif (method === RequestMethod.Delete && baseRoute === '/channels/:id/messages/:id') {\n\t\t\tconst id = /\\d{17,19}$/.exec(endpoint)![0]!;\n\t\t\tconst timestamp = DiscordSnowflake.timestampFrom(id);\n\t\t\tif (Date.now() - timestamp > 1_000 * 60 * 60 * 24 * 14) {\n\t\t\t\texceptions += '/Delete Old Message';\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tmajorParameter: majorId,\n\t\t\tbucketRoute: baseRoute + exceptions,\n\t\t\toriginal: endpoint,\n\t\t};\n\t}\n}\n","import type { Readable } from 'node:stream';\nimport type { ReadableStream } from 'node:stream/web';\nimport type { Collection } from '@discordjs/collection';\nimport type { Agent, Dispatcher, RequestInit, BodyInit, Response } from 'undici';\nimport type { IHandler } from '../interfaces/Handler.js';\n\nexport interface RestEvents {\n\thandlerSweep: [sweptHandlers: Collection<string, IHandler>];\n\thashSweep: [sweptHashes: Collection<string, HashData>];\n\tinvalidRequestWarning: [invalidRequestInfo: InvalidRequestWarningData];\n\trateLimited: [rateLimitInfo: RateLimitData];\n\tresponse: [request: APIRequest, response: ResponseLike];\n\trestDebug: [info: string];\n}\n\nexport type RestEventsMap = {\n\t[K in keyof RestEvents]: RestEvents[K];\n};\n\n/**\n * Options to be passed when creating the REST instance\n */\nexport interface RESTOptions {\n\t/**\n\t * The agent to set globally\n\t */\n\tagent: Dispatcher | null;\n\t/**\n\t * The base api path, without version\n\t *\n\t * @defaultValue `'https://discord.com/api'`\n\t */\n\tapi: string;\n\t/**\n\t * The authorization prefix to use for requests, useful if you want to use\n\t * bearer tokens\n\t *\n\t * @defaultValue `'Bot'`\n\t */\n\tauthPrefix: 'Bearer' | 'Bot';\n\t/**\n\t * The cdn path\n\t *\n\t * @defaultValue `'https://cdn.discordapp.com'`\n\t */\n\tcdn: string;\n\t/**\n\t * How many requests to allow sending per second (Infinity for unlimited, 50 for the standard global limit used by Discord)\n\t *\n\t * @defaultValue `50`\n\t */\n\tglobalRequestsPerSecond: number;\n\t/**\n\t * The amount of time in milliseconds that passes between each hash sweep. (defaults to 1h)\n\t *\n\t * @defaultValue `3_600_000`\n\t */\n\thandlerSweepInterval: number;\n\t/**\n\t * The maximum amount of time a hash can exist in milliseconds without being hit with a request (defaults to 24h)\n\t *\n\t * @defaultValue `86_400_000`\n\t */\n\thashLifetime: number;\n\t/**\n\t * The amount of time in milliseconds that passes between each hash sweep. (defaults to 4h)\n\t *\n\t * @defaultValue `14_400_000`\n\t */\n\thashSweepInterval: number;\n\t/**\n\t * Additional headers to send for all API requests\n\t *\n\t * @defaultValue `{}`\n\t */\n\theaders: Record<string, string>;\n\t/**\n\t * The number of invalid REST requests (those that return 401, 403, or 429) in a 10 minute window between emitted warnings (0 for no warnings).\n\t * That is, if set to 500, warnings will be emitted at invalid request number 500, 1000, 1500, and so on.\n\t *\n\t * @defaultValue `0`\n\t */\n\tinvalidRequestWarningInterval: number;\n\t/**\n\t * The method called to perform the actual HTTP request given a url and web `fetch` options\n\t * For example, to use global fetch, simply provide `makeRequest: fetch`\n\t */\n\tmakeRequest(url: string, init: RequestInit): Promise<ResponseLike>;\n\t/**\n\t * The extra offset to add to rate limits in milliseconds\n\t *\n\t * @defaultValue `50`\n\t */\n\toffset: number;\n\t/**\n\t * Determines how rate limiting and pre-emptive throttling should be handled.\n\t * When an array of strings, each element is treated as a prefix for the request route\n\t * (e.g. `/channels` to match any route starting with `/channels` such as `/channels/:id/messages`)\n\t * for which to throw {@link RateLimitError}s. All other request routes will be queued normally\n\t *\n\t * @defaultValue `null`\n\t */\n\trejectOnRateLimit: RateLimitQueueFilter | string[] | null;\n\t/**\n\t * The number of retries for errors with the 500 code, or errors\n\t * that timeout\n\t *\n\t * @defaultValue `3`\n\t */\n\tretries: number;\n\t/**\n\t * The time to wait in milliseconds before a request is aborted\n\t *\n\t * @defaultValue `15_000`\n\t */\n\ttimeout: number;\n\t/**\n\t * Extra information to add to the user agent\n\t *\n\t * @defaultValue DefaultUserAgentAppendix\n\t */\n\tuserAgentAppendix: string;\n\t/**\n\t * The version of the API to use\n\t *\n\t * @defaultValue `'10'`\n\t */\n\tversion: string;\n}\n\n/**\n * Data emitted on `RESTEvents.RateLimited`\n */\nexport interface RateLimitData {\n\t/**\n\t * Whether the rate limit that was reached was the global limit\n\t */\n\tglobal: boolean;\n\t/**\n\t * The bucket hash for this request\n\t */\n\thash: string;\n\t/**\n\t * The amount of requests we can perform before locking requests\n\t */\n\tlimit: number;\n\t/**\n\t * The major parameter of the route\n\t *\n\t * For example, in `/channels/x`, this will be `x`.\n\t * If there is no major parameter (e.g: `/bot/gateway`) this will be `global`.\n\t */\n\tmajorParameter: string;\n\t/**\n\t * The HTTP method being performed\n\t */\n\tmethod: string;\n\t/**\n\t * The route being hit in this request\n\t */\n\troute: string;\n\t/**\n\t * The time, in milliseconds, until the request-lock is reset\n\t */\n\ttimeToReset: number;\n\t/**\n\t * The full URL for this request\n\t */\n\turl: string;\n}\n\n/**\n * A function that determines whether the rate limit hit should throw an Error\n */\nexport type RateLimitQueueFilter = (rateLimitData: RateLimitData) => Promise<boolean> | boolean;\n\nexport interface APIRequest {\n\t/**\n\t * The data that was used to form the body of this request\n\t */\n\tdata: HandlerRequestData;\n\t/**\n\t * The HTTP method used in this request\n\t */\n\tmethod: string;\n\t/**\n\t * Additional HTTP options for this request\n\t */\n\toptions: RequestInit;\n\t/**\n\t * The full path used to make the request\n\t */\n\tpath: RouteLike;\n\t/**\n\t * The number of times this request has been attempted\n\t */\n\tretries: number;\n\t/**\n\t * The API route identifying the ratelimit for this request\n\t */\n\troute: string;\n}\n\nexport interface ResponseLike\n\textends Pick<Response, 'arrayBuffer' | 'bodyUsed' | 'headers' | 'json' | 'ok' | 'status' | 'statusText' | 'text'> {\n\tbody: Readable | ReadableStream | null;\n}\n\nexport interface InvalidRequestWarningData {\n\t/**\n\t * Number of invalid requests that have been made in the window\n\t */\n\tcount: number;\n\t/**\n\t * Time in milliseconds remaining before the count resets\n\t */\n\tremainingTime: number;\n}\n\n/**\n * Represents a file to be added to the request\n */\nexport interface RawFile {\n\t/**\n\t * Content-Type of the file\n\t */\n\tcontentType?: string;\n\t/**\n\t * The actual data for the file\n\t */\n\tdata: Buffer | Uint8Array | boolean | number | string;\n\t/**\n\t * An explicit key to use for key of the formdata field for this file.\n\t * When not provided, the index of the file in the files array is used in the form `files[${index}]`.\n\t * If you wish to alter the placeholder snowflake, you must provide this property in the same form (`files[${placeholder}]`)\n\t */\n\tkey?: string;\n\t/**\n\t * The name of the file\n\t */\n\tname: string;\n}\n\n/**\n * Represents possible data to be given to an endpoint\n */\nexport interface RequestData {\n\t/**\n\t * Whether to append JSON data to form data instead of `payload_json` when sending files\n\t */\n\tappendToFormData?: boolean;\n\t/**\n\t * If this request needs the `Authorization` header\n\t *\n\t * @defaultValue `true`\n\t */\n\tauth?: boolean;\n\t/**\n\t * The authorization prefix to use for this request, useful if you use this with bearer tokens\n\t *\n\t * @defaultValue `'Bot'`\n\t */\n\tauthPrefix?: 'Bearer' | 'Bot';\n\t/**\n\t * The body to send to this request.\n\t * If providing as BodyInit, set `passThroughBody: true`\n\t */\n\tbody?: BodyInit | unknown;\n\t/**\n\t * The {@link https://undici.nodejs.org/#/docs/api/Agent | Agent} to use for the request.\n\t */\n\tdispatcher?: Agent;\n\t/**\n\t * Files to be attached to this request\n\t */\n\tfiles?: RawFile[] | undefined;\n\t/**\n\t * Additional headers to add to this request\n\t */\n\theaders?: Record<string, string>;\n\t/**\n\t * Whether to pass-through the body property directly to `fetch()`.\n\t * <warn>This only applies when files is NOT present</warn>\n\t */\n\tpassThroughBody?: boolean;\n\t/**\n\t * Query string parameters to append to the called endpoint\n\t */\n\tquery?: URLSearchParams;\n\t/**\n\t * Reason to show in the audit logs\n\t */\n\treason?: string | undefined;\n\t/**\n\t * The signal to abort the queue entry or the REST call, where applicable\n\t */\n\tsignal?: AbortSignal | undefined;\n\t/**\n\t * If this request should be versioned\n\t *\n\t * @defaultValue `true`\n\t */\n\tversioned?: boolean;\n}\n\n/**\n * Possible headers for an API call\n */\nexport interface RequestHeaders {\n\tAuthorization?: string;\n\t'User-Agent': string;\n\t'X-Audit-Log-Reason'?: string;\n}\n\n/**\n * Possible API methods to be used when doing requests\n */\nexport enum RequestMethod {\n\tDelete = 'DELETE',\n\tGet = 'GET',\n\tPatch = 'PATCH',\n\tPost = 'POST',\n\tPut = 'PUT',\n}\n\nexport type RouteLike = `/${string}`;\n\n/**\n * Internal request options\n *\n * @internal\n */\nexport interface InternalRequest extends RequestData {\n\tfullRoute: RouteLike;\n\tmethod: RequestMethod;\n}\n\nexport type HandlerRequestData = Pick<InternalRequest, 'auth' | 'body' | 'files' | 'signal'>;\n\n/**\n * Parsed route data for an endpoint\n *\n * @internal\n */\nexport interface RouteData {\n\tbucketRoute: string;\n\tmajorParameter: string;\n\toriginal: RouteLike;\n}\n\n/**\n * Represents a hash and its associated fields\n *\n * @internal\n */\nexport interface HashData {\n\tlastAccess: number;\n\tvalue: string;\n}\n","import type { RESTPatchAPIChannelJSONBody, Snowflake } from 'discord-api-types/v10';\nimport type { REST } from '../REST.js';\nimport { RateLimitError } from '../errors/RateLimitError.js';\nimport { RequestMethod, type RateLimitData, type ResponseLike } from './types.js';\n\nfunction serializeSearchParam(value: unknown): string | null {\n\tswitch (typeof value) {\n\t\tcase 'string':\n\t\t\treturn value;\n\t\tcase 'number':\n\t\tcase 'bigint':\n\t\tcase 'boolean':\n\t\t\treturn value.toString();\n\t\tcase 'object':\n\t\t\tif (value === null) return null;\n\t\t\tif (value instanceof Date) {\n\t\t\t\treturn Number.isNaN(value.getTime()) ? null : value.toISOString();\n\t\t\t}\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-base-to-string\n\t\t\tif (typeof value.toString === 'function' && value.toString !== Object.prototype.toString) return value.toString();\n\t\t\treturn null;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\n/**\n * Creates and populates an URLSearchParams instance from an object, stripping\n * out null and undefined values, while also coercing non-strings to strings.\n *\n * @param options - The options to use\n * @returns A populated URLSearchParams instance\n */\nexport function makeURLSearchParams<T extends object>(options?: Readonly<T>) {\n\tconst params = new URLSearchParams();\n\tif (!options) return params;\n\n\tfor (const [key, value] of Object.entries(options)) {\n\t\tconst serialized = serializeSearchParam(value);\n\t\tif (serialized !== null) params.append(key, serialized);\n\t}\n\n\treturn params;\n}\n\n/**\n * Converts the response to usable data\n *\n * @param res - The fetch response\n */\nexport async function parseResponse(res: ResponseLike): Promise<unknown> {\n\tif (res.headers.get('Content-Type')?.startsWith('application/json')) {\n\t\treturn res.json();\n\t}\n\n\treturn res.arrayBuffer();\n}\n\n/**\n * Check whether a request falls under a sublimit\n *\n * @param bucketRoute - The buckets route identifier\n * @param body - The options provided as JSON data\n * @param method - The HTTP method that will be used to make the request\n * @returns Whether the request falls under a sublimit\n */\nexport function hasSublimit(bucketRoute: string, body?: unknown, method?: string): boolean {\n\t// TODO: Update for new sublimits\n\t// Currently known sublimits:\n\t// Editing channel `name` or `topic`\n\tif (bucketRoute === '/channels/:id') {\n\t\tif (typeof body !== 'object' || body === null) return false;\n\t\t// This should never be a POST body, but just in case\n\t\tif (method !== RequestMethod.Patch) return false;\n\t\tconst castedBody = body as RESTPatchAPIChannelJSONBody;\n\t\treturn ['name', 'topic'].some((key) => Reflect.has(castedBody, key));\n\t}\n\n\t// If we are checking if a request has a sublimit on a route not checked above, sublimit all requests to avoid a flood of 429s\n\treturn true;\n}\n\n/**\n * Check whether an error indicates that a retry can be attempted\n *\n * @param error - The error thrown by the network request\n * @returns Whether the error indicates a retry should be attempted\n */\nexport function shouldRetry(error: Error | NodeJS.ErrnoException) {\n\t// Retry for possible timed out requests\n\tif (error.name === 'AbortError') return true;\n\t// Downlevel ECONNRESET to retry as it may be recoverable\n\treturn ('code' in error && error.code === 'ECONNRESET') || error.message.includes('ECONNRESET');\n}\n\n/**\n * Determines whether the request should be queued or whether a RateLimitError should be thrown\n *\n * @internal\n */\nexport async function onRateLimit(manager: REST, rateLimitData: RateLimitData) {\n\tconst { options } = manager;\n\tif (!options.rejectOnRateLimit) return;\n\n\tconst shouldThrow =\n\t\ttypeof options.rejectOnRateLimit === 'function'\n\t\t\t? await options.rejectOnRateLimit(rateLimitData)\n\t\t\t: options.rejectOnRateLimit.some((route) => rateLimitData.route.startsWith(route.toLowerCase()));\n\tif (shouldThrow) {\n\t\tthrow new RateLimitError(rateLimitData);\n\t}\n}\n\n/**\n * Calculates the default avatar index for a given user id.\n *\n * @param userId - The user id to calculate the default avatar index for\n */\nexport function calculateUserDefaultAvatarIndex(userId: Snowflake) {\n\treturn Number(BigInt(userId) >> 22n) % 6;\n}\n\n/**\n * Sleeps for a given amount of time.\n *\n * @param ms - The amount of time (in milliseconds) to sleep for\n */\nexport async function sleep(ms: number): Promise<void> {\n\treturn new Promise<void>((resolve) => {\n\t\tsetTimeout(() => resolve(), ms);\n\t});\n}\n\n/**\n * Verifies that a value is a buffer-like object.\n *\n * @param value - The value to check\n */\nexport function isBufferLike(value: unknown): value is ArrayBuffer | Buffer | Uint8Array | Uint8ClampedArray {\n\treturn value instanceof ArrayBuffer || value instanceof Uint8Array || value instanceof Uint8ClampedArray;\n}\n","import type { RequestInit } from 'undici';\nimport type { REST } from '../REST.js';\nimport type { DiscordErrorData, OAuthErrorData } from '../errors/DiscordAPIError.js';\nimport { DiscordAPIError } from '../errors/DiscordAPIError.js';\nimport { HTTPError } from '../errors/HTTPError.js';\nimport { RESTEvents } from '../utils/constants.js';\nimport type { ResponseLike, HandlerRequestData, RouteData } from '../utils/types.js';\nimport { parseResponse, shouldRetry } from '../utils/utils.js';\n\n/**\n * Invalid request limiting is done on a per-IP basis, not a per-token basis.\n * The best we can do is track invalid counts process-wide (on the theory that\n * users could have multiple bots run from one process) rather than per-bot.\n * Therefore, store these at file scope here rather than in the client's\n * RESTManager object.\n */\nlet invalidCount = 0;\nlet invalidCountResetTime: number | null = null;\n\n/**\n * Increment the invalid request count and emit warning if necessary\n *\n * @internal\n */\nexport function incrementInvalidCount(manager: REST) {\n\tif (!invalidCountResetTime || invalidCountResetTime < Date.now()) {\n\t\tinvalidCountResetTime = Date.now() + 1_000 * 60 * 10;\n\t\tinvalidCount = 0;\n\t}\n\n\tinvalidCount++;\n\n\tconst emitInvalid =\n\t\tmanager.options.invalidRequestWarningInterval > 0 &&\n\t\tinvalidCount % manager.options.invalidRequestWarningInterval === 0;\n\tif (emitInvalid) {\n\t\t// Let library users know periodically about invalid requests\n\t\tmanager.emit(RESTEvents.InvalidRequestWarning, {\n\t\t\tcount: invalidCount,\n\t\t\tremainingTime: invalidCountResetTime - Date.now(),\n\t\t});\n\t}\n}\n\n/**\n * Performs the actual network request for a request handler\n *\n * @param manager - The manager that holds options and emits informational events\n * @param routeId - The generalized api route with literal ids for major parameters\n * @param url - The fully resolved url to make the request to\n * @param options - The fetch options needed to make the request\n * @param requestData - Extra data from the user's request needed for errors and additional processing\n * @param retries - The number of retries this request has already attempted (recursion occurs on the handler)\n * @returns The respond from the network or `null` when the request should be retried\n * @internal\n */\nexport async function makeNetworkRequest(\n\tmanager: REST,\n\trouteId: RouteData,\n\turl: string,\n\toptions: RequestInit,\n\trequestData: HandlerRequestData,\n\tretries: number,\n) {\n\tconst controller = new AbortController();\n\tconst timeout = setTimeout(() => controller.abort(), manager.options.timeout);\n\tif (requestData.signal) {\n\t\t// If the user signal was aborted, abort the controller, else abort the local signal.\n\t\t// The reason why we don't re-use the user's signal, is because users may use the same signal for multiple\n\t\t// requests, and we do not want to cause unexpected side-effects.\n\t\tif (requestData.signal.aborted) controller.abort();\n\t\telse requestData.signal.addEventListener('abort', () => controller.abort());\n\t}\n\n\tlet res: ResponseLike;\n\ttry {\n\t\tres = await manager.options.makeRequest(url, { ...options, signal: controller.signal });\n\t} catch (error: unknown) {\n\t\tif (!(error instanceof Error)) throw error;\n\t\t// Retry the specified number of times if needed\n\t\tif (shouldRetry(error) && retries !== manager.options.retries) {\n\t\t\t// Retry is handled by the handler upon receiving null\n\t\t\treturn null;\n\t\t}\n\n\t\tthrow error;\n\t} finally {\n\t\tclearTimeout(timeout);\n\t}\n\n\tif (manager.listenerCount(RESTEvents.Response)) {\n\t\tmanager.emit(\n\t\t\tRESTEvents.Response,\n\t\t\t{\n\t\t\t\tmethod: options.method ?? 'get',\n\t\t\t\tpath: routeId.original,\n\t\t\t\troute: routeId.bucketRoute,\n\t\t\t\toptions,\n\t\t\t\tdata: requestData,\n\t\t\t\tretries,\n\t\t\t},\n\t\t\tres instanceof Response ? res.clone() : { ...res },\n\t\t);\n\t}\n\n\treturn res;\n}\n\n/**\n * Handles 5xx and 4xx errors (not 429's) conventionally. 429's should be handled before calling this function\n *\n * @param manager - The manager that holds options and emits informational events\n * @param res - The response received from {@link makeNetworkRequest}\n * @param method - The method used to make the request\n * @param url - The fully resolved url to make the request to\n * @param requestData - Extra data from the user's request needed for errors and additional processing\n * @param retries - The number of retries this request has already attempted (recursion occurs on the handler)\n * @returns - The response if the status code is not handled or null to request a retry\n */\nexport async function handleErrors(\n\tmanager: REST,\n\tres: ResponseLike,\n\tmethod: string,\n\turl: string,\n\trequestData: HandlerRequestData,\n\tretries: number,\n) {\n\tconst status = res.status;\n\tif (status >= 500 && status < 600) {\n\t\t// Retry the specified number of times for possible server side issues\n\t\tif (retries !== manager.options.retries) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// We are out of retries, throw an error\n\t\tthrow new HTTPError(status, res.statusText, method, url, requestData);\n\t} else {\n\t\t// Handle possible malformed requests\n\t\tif (status >= 400 && status < 500) {\n\t\t\t// If we receive this status code, it means the token we had is no longer valid.\n\t\t\tif (status === 401 && requestData.auth) {\n\t\t\t\tmanager.setToken(null!);\n\t\t\t}\n\n\t\t\t// The request will not succeed for some reason, parse the error returned from the api\n\t\t\tconst data = (await parseResponse(res)) as DiscordErrorData | OAuthErrorData;\n\t\t\t// throw the API error\n\t\t\tthrow new DiscordAPIError(data, 'code' in data ? data.code : data.error, status, method, url, requestData);\n\t\t}\n\n\t\treturn res;\n\t}\n}\n","import type { RequestInit } from 'undici';\nimport type { REST } from '../REST.js';\nimport type { IHandler } from '../interfaces/Handler.js';\nimport { RESTEvents } from '../utils/constants.js';\nimport type { ResponseLike, HandlerRequestData, RouteData } from '../utils/types.js';\nimport { onRateLimit, sleep } from '../utils/utils.js';\nimport { handleErrors, incrementInvalidCount, makeNetworkRequest } from './Shared.js';\n\n/**\n * The structure used to handle burst requests for a given bucket.\n * Burst requests have no ratelimit handling but allow for pre- and post-processing\n * of data in the same manner as sequentially queued requests.\n *\n * @remarks\n * This queue may still emit a rate limit error if an unexpected 429 is hit\n */\nexport class BurstHandler implements IHandler {\n\t/**\n\t * {@inheritdoc IHandler.id}\n\t */\n\tpublic readonly id: string;\n\n\t/**\n\t * {@inheritDoc IHandler.inactive}\n\t */\n\tpublic inactive = false;\n\n\t/**\n\t * @param manager - The request manager\n\t * @param hash - The hash that this RequestHandler handles\n\t * @param majorParameter - The major parameter for this handler\n\t */\n\tpublic constructor(\n\t\tprivate readonly manager: REST,\n\t\tprivate readonly hash: string,\n\t\tprivate readonly majorParameter: string,\n\t) {\n\t\tthis.id = `${hash}:${majorParameter}`;\n\t}\n\n\t/**\n\t * Emits a debug message\n\t *\n\t * @param message - The message to debug\n\t */\n\tprivate debug(message: string) {\n\t\tthis.manager.emit(RESTEvents.Debug, `[REST ${this.id}] ${message}`);\n\t}\n\n\t/**\n\t * {@inheritDoc IHandler.queueRequest}\n\t */\n\tpublic async queueRequest(\n\t\trouteId: RouteData,\n\t\turl: string,\n\t\toptions: RequestInit,\n\t\trequestData: HandlerRequestData,\n\t): Promise<ResponseLike> {\n\t\treturn this.runRequest(routeId, url, options, requestData);\n\t}\n\n\t/**\n\t * The method that actually makes the request to the API, and updates info about the bucket accordingly\n\t *\n\t * @param routeId - The generalized API route with literal ids for major parameters\n\t * @param url - The fully resolved URL to make the request to\n\t * @param options - The fetch options needed to make the request\n\t * @param requestData - Extra data from the user's request needed for errors and additional processing\n\t * @param retries - The number of retries this request has already attempted (recursion)\n\t */\n\tprivate async runRequest(\n\t\trouteId: RouteData,\n\t\turl: string,\n\t\toptions: RequestInit,\n\t\trequestData: HandlerRequestData,\n\t\tretries = 0,\n\t): Promise<ResponseLike> {\n\t\tconst method = options.method ?? 'get';\n\n\t\tconst res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries);\n\n\t\t// Retry requested\n\t\tif (res === null) {\n\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\treturn this.runRequest(routeId, url, options, requestData, ++retries);\n\t\t}\n\n\t\tconst status = res.status;\n\t\tlet retryAfter = 0;\n\t\tconst retry = res.headers.get('Retry-After');\n\n\t\t// Amount of time in milliseconds until we should retry if rate limited (globally or otherwise)\n\t\tif (retry) retryAfter = Number(retry) * 1_000 + this.manager.options.offset;\n\n\t\t// Count the invalid requests\n\t\tif (status === 401 || status === 403 || status === 429) {\n\t\t\tincrementInvalidCount(this.manager);\n\t\t}\n\n\t\tif (status >= 200 && status < 300) {\n\t\t\treturn res;\n\t\t} else if (status === 429) {\n\t\t\t// Unexpected ratelimit\n\t\t\tconst isGlobal = res.headers.has('X-RateLimit-Global');\n\t\t\tawait onRateLimit(this.manager, {\n\t\t\t\ttimeToReset: retryAfter,\n\t\t\t\tlimit: Number.POSITIVE_INFINITY,\n\t\t\t\tmethod,\n\t\t\t\thash: this.hash,\n\t\t\t\turl,\n\t\t\t\troute: routeId.bucketRoute,\n\t\t\t\tmajorParameter: this.majorParameter,\n\t\t\t\tglobal: isGlobal,\n\t\t\t});\n\t\t\tthis.debug(\n\t\t\t\t[\n\t\t\t\t\t'Encountered unexpected 429 rate limit',\n\t\t\t\t\t` Global : ${isGlobal}`,\n\t\t\t\t\t` Method : ${method}`,\n\t\t\t\t\t` URL : ${url}`,\n\t\t\t\t\t` Bucket : ${routeId.bucketRoute}`,\n\t\t\t\t\t` Major parameter: ${routeId.majorParameter}`,\n\t\t\t\t\t` Hash : ${this.hash}`,\n\t\t\t\t\t` Limit : ${Number.POSITIVE_INFINITY}`,\n\t\t\t\t\t` Retry After : ${retryAfter}ms`,\n\t\t\t\t\t` Sublimit : None`,\n\t\t\t\t].join('\\n'),\n\t\t\t);\n\n\t\t\t// We are bypassing all other limits, but an encountered limit should be respected (it's probably a non-punished rate limit anyways)\n\t\t\tawait sleep(retryAfter);\n\n\t\t\t// Since this is not a server side issue, the next request should pass, so we don't bump the retries counter\n\t\t\treturn this.runRequest(routeId, url, options, requestData, retries);\n\t\t} else {\n\t\t\tconst handled = await handleErrors(this.manager, res, method, url, requestData, retries);\n\t\t\tif (handled === null) {\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\treturn this.runRequest(routeId, url, options, requestData, ++retries);\n\t\t\t}\n\n\t\t\treturn handled;\n\t\t}\n\t}\n}\n","import { AsyncQueue } from '@sapphire/async-queue';\nimport type { RequestInit } from 'undici';\nimport type { REST } from '../REST.js';\nimport type { IHandler } from '../interfaces/Handler.js';\nimport { RESTEvents } from '../utils/constants.js';\nimport type { RateLimitData, ResponseLike, HandlerRequestData, RouteData } from '../utils/types.js';\nimport { hasSublimit, onRateLimit, sleep } from '../utils/utils.js';\nimport { handleErrors, incrementInvalidCount, makeNetworkRequest } from './Shared.js';\n\nconst enum QueueType {\n\tStandard,\n\tSublimit,\n}\n\n/**\n * The structure used to handle sequential requests for a given bucket\n */\nexport class SequentialHandler implements IHandler {\n\t/**\n\t * {@inheritDoc IHandler.id}\n\t */\n\tpublic readonly id: string;\n\n\t/**\n\t * The time this rate limit bucket will reset\n\t */\n\tprivate reset = -1;\n\n\t/**\n\t * The remaining requests that can be made before we are rate limited\n\t */\n\tprivate remaining = 1;\n\n\t/**\n\t * The total number of requests that can be made before we are rate limited\n\t */\n\tprivate limit = Number.POSITIVE_INFINITY;\n\n\t/**\n\t * The interface used to sequence async requests sequentially\n\t */\n\t#asyncQueue = new AsyncQueue();\n\n\t/**\n\t * The interface used to sequence sublimited async requests sequentially\n\t */\n\t#sublimitedQueue: AsyncQueue | null = null;\n\n\t/**\n\t * A promise wrapper for when the sublimited queue is finished being processed or null when not being processed\n\t */\n\t#sublimitPromise: { promise: Promise<void>; resolve(): void } | null = null;\n\n\t/**\n\t * Whether the sublimit queue needs to be shifted in the finally block\n\t */\n\t#shiftSublimit = false;\n\n\t/**\n\t * @param manager - The request manager\n\t * @param hash - The hash that this RequestHandler handles\n\t * @param majorParameter - The major parameter for this handler\n\t */\n\tpublic constructor(\n\t\tprivate readonly manager: REST,\n\t\tprivate readonly hash: string,\n\t\tprivate readonly majorParameter: string,\n\t) {\n\t\tthis.id = `${hash}:${majorParameter}`;\n\t}\n\n\t/**\n\t * {@inheritDoc IHandler.inactive}\n\t */\n\tpublic get inactive(): boolean {\n\t\treturn (\n\t\t\tthis.#asyncQueue.remaining === 0 &&\n\t\t\t(this.#sublimitedQueue === null || this.#sublimitedQueue.remaining === 0) &&\n\t\t\t!this.limited\n\t\t);\n\t}\n\n\t/**\n\t * If the rate limit bucket is currently limited by the global limit\n\t */\n\tprivate get globalLimited(): boolean {\n\t\treturn this.manager.globalRemaining <= 0 && Date.now() < this.manager.globalReset;\n\t}\n\n\t/**\n\t * If the rate limit bucket is currently limited by its limit\n\t */\n\tprivate get localLimited(): boolean {\n\t\treturn this.remaining <= 0 && Date.now() < this.reset;\n\t}\n\n\t/**\n\t * If the rate limit bucket is currently limited\n\t */\n\tprivate get limited(): boolean {\n\t\treturn this.globalLimited || this.localLimited;\n\t}\n\n\t/**\n\t * The time until queued requests can continue\n\t */\n\tprivate get timeToReset(): number {\n\t\treturn this.reset + this.manager.options.offset - Date.now();\n\t}\n\n\t/**\n\t * Emits a debug message\n\t *\n\t * @param message - The message to debug\n\t */\n\tprivate debug(message: string) {\n\t\tthis.manager.emit(RESTEvents.Debug, `[REST ${this.id}] ${message}`);\n\t}\n\n\t/**\n\t * Delay all requests for the specified amount of time, handling global rate limits\n\t *\n\t * @param time - The amount of time to delay all requests for\n\t */\n\tprivate async globalDelayFor(time: number): Promise<void> {\n\t\tawait sleep(time);\n\t\tthis.manager.globalDelay = null;\n\t}\n\n\t/**\n\t * {@inheritDoc IHandler.queueRequest}\n\t */\n\tpublic async queueRequest(\n\t\trouteId: RouteData,\n\t\turl: string,\n\t\toptions: RequestInit,\n\t\trequestData: HandlerRequestData,\n\t): Promise<ResponseLike> {\n\t\tlet queue = this.#asyncQueue;\n\t\tlet queueType = QueueType.Standard;\n\t\t// Separate sublimited requests when already sublimited\n\t\tif (this.#sublimitedQueue && hasSublimit(routeId.bucketRoute, requestData.body, options.method)) {\n\t\t\tqueue = this.#sublimitedQueue!;\n\t\t\tqueueType = QueueType.Sublimit;\n\t\t}\n\n\t\t// Wait for any previous requests to be completed before this one is run\n\t\tawait queue.wait({ signal: requestData.signal });\n\t\t// This set handles retroactively sublimiting requests\n\t\tif (queueType === QueueType.Standard) {\n\t\t\tif (this.#sublimitedQueue && hasSublimit(routeId.bucketRoute, requestData.body, options.method)) {\n\t\t\t\t/**\n\t\t\t\t * Remove the request from the standard queue, it should never be possible to get here while processing the\n\t\t\t\t * sublimit queue so there is no need to worry about shifting the wrong request\n\t\t\t\t */\n\t\t\t\tqueue = this.#sublimitedQueue!;\n\t\t\t\tconst wait = queue.wait();\n\t\t\t\tthis.#asyncQueue.shift();\n\t\t\t\tawait wait;\n\t\t\t} else if (this.#sublimitPromise) {\n\t\t\t\t// Stall requests while the sublimit queue gets processed\n\t\t\t\tawait this.#sublimitPromise.promise;\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\t// Make the request, and return the results\n\t\t\treturn await this.runRequest(routeId, url, options, requestData);\n\t\t} finally {\n\t\t\t// Allow the next request to fire\n\t\t\tqueue.shift();\n\t\t\tif (this.#shiftSublimit) {\n\t\t\t\tthis.#shiftSublimit = false;\n\t\t\t\tthis.#sublimitedQueue?.shift();\n\t\t\t}\n\n\t\t\t// If this request is the last request in a sublimit\n\t\t\tif (this.#sublimitedQueue?.remaining === 0) {\n\t\t\t\tthis.#sublimitPromise?.resolve();\n\t\t\t\tthis.#sublimitedQueue = null;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * The method that actually makes the request to the api, and updates info about the bucket accordingly\n\t *\n\t * @param routeId - The generalized api route with literal ids for major parameters\n\t * @param url - The fully resolved url to make the request to\n\t * @param options - The fetch options needed to make the request\n\t * @param requestData - Extra data from the user's request needed for errors and additional processing\n\t * @param retries - The number of retries this request has already attempted (recursion)\n\t */\n\tprivate async runRequest(\n\t\trouteId: RouteData,\n\t\turl: string,\n\t\toptions: RequestInit,\n\t\trequestData: HandlerRequestData,\n\t\tretries = 0,\n\t): Promise<ResponseLike> {\n\t\t/*\n\t\t * After calculations have been done, pre-emptively stop further requests\n\t\t * Potentially loop until this task can run if e.g. the global rate limit is hit twice\n\t\t */\n\t\twhile (this.limited) {\n\t\t\tconst isGlobal = this.globalLimited;\n\t\t\tlet limit: number;\n\t\t\tlet timeout: number;\n\t\t\tlet delay: Promise<void>;\n\n\t\t\tif (isGlobal) {\n\t\t\t\t// Set RateLimitData based on the global limit\n\t\t\t\tlimit = this.manager.options.globalRequestsPerSecond;\n\t\t\t\ttimeout = this.manager.globalReset + this.manager.options.offset - Date.now();\n\t\t\t\t// If this is the first task to reach the global timeout, set the global delay\n\t\t\t\tif (!this.manager.globalDelay) {\n\t\t\t\t\t// The global delay function clears the global delay state when it is resolved\n\t\t\t\t\tthis.manager.globalDelay = this.globalDelayFor(timeout);\n\t\t\t\t}\n\n\t\t\t\tdelay = this.manager.globalDelay;\n\t\t\t} else {\n\t\t\t\t// Set RateLimitData based on the route-specific limit\n\t\t\t\tlimit = this.limit;\n\t\t\t\ttimeout = this.timeToReset;\n\t\t\t\tdelay = sleep(timeout);\n\t\t\t}\n\n\t\t\tconst rateLimitData: RateLimitData = {\n\t\t\t\ttimeToReset: timeout,\n\t\t\t\tlimit,\n\t\t\t\tmethod: options.method ?? 'get',\n\t\t\t\thash: this.hash,\n\t\t\t\turl,\n\t\t\t\troute: routeId.bucketRoute,\n\t\t\t\tmajorParameter: this.majorParameter,\n\t\t\t\tglobal: isGlobal,\n\t\t\t};\n\t\t\t// Let library users know they have hit a rate limit\n\t\t\tthis.manager.emit(RESTEvents.RateLimited, rateLimitData);\n\t\t\t// Determine whether a RateLimitError should be thrown\n\t\t\tawait onRateLimit(this.manager, rateLimitData);\n\t\t\t// When not erroring, emit debug for what is happening\n\t\t\tif (isGlobal) {\n\t\t\t\tthis.debug(`Global rate limit hit, blocking all requests for ${timeout}ms`);\n\t\t\t} else {\n\t\t\t\tthis.debug(`Waiting ${timeout}ms for rate limit to pass`);\n\t\t\t}\n\n\t\t\t// Wait the remaining time left before the rate limit resets\n\t\t\tawait delay;\n\t\t}\n\n\t\t// As the request goes out, update the global usage information\n\t\tif (!this.manager.globalReset || this.manager.globalReset < Date.now()) {\n\t\t\tthis.manager.globalReset = Date.now() + 1_000;\n\t\t\tthis.manager.globalRemaining = this.manager.options.globalRequestsPerSecond;\n\t\t}\n\n\t\tthis.manager.globalRemaining--;\n\n\t\tconst method = options.method ?? 'get';\n\n\t\tconst res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries);\n\n\t\t// Retry requested\n\t\tif (res === null) {\n\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\treturn this.runRequest(routeId, url, options, requestData, ++retries);\n\t\t}\n\n\t\tconst status = res.status;\n\t\tlet retryAfter = 0;\n\n\t\tconst limit = res.headers.get('X-RateLimit-Limit');\n\t\tconst remaining = res.headers.get('X-RateLimit-Remaining');\n\t\tconst reset = res.headers.get('X-RateLimit-Reset-After');\n\t\tconst hash = res.headers.get('X-RateLimit-Bucket');\n\t\tconst retry = res.headers.get('Retry-After');\n\n\t\t// Update the total number of requests that can be made before the rate limit resets\n\t\tthis.limit = limit ? Number(limit) : Number.POSITIVE_INFINITY;\n\t\t// Update the number of remaining requests that can be made before the rate limit resets\n\t\tthis.remaining = remaining ? Number(remaining) : 1;\n\t\t// Update the time when this rate limit resets (reset-after is in seconds)\n\t\tthis.reset = reset ? Number(reset) * 1_000 + Date.now() + this.manager.options.offset : Date.now();\n\n\t\t// Amount of time in milliseconds until we should retry if rate limited (globally or otherwise)\n\t\tif (retry) retryAfter = Number(retry) * 1_000 + this.manager.options.offset;\n\n\t\t// Handle buckets via the hash header retroactively\n\t\tif (hash && hash !== this.hash) {\n\t\t\t// Let library users know when rate limit buckets have been updated\n\t\t\tthis.debug(['Received bucket hash update', ` Old Hash : ${this.hash}`, ` New Hash : ${hash}`].join('\\n'));\n\t\t\t// This queue will eventually be eliminated via attrition\n\t\t\tthis.manager.hashes.set(`${method}:${routeId.bucketRoute}`, { value: hash, lastAccess: Date.now() });\n\t\t} else if (hash) {\n\t\t\t// Handle the case where hash value doesn't change\n\t\t\t// Fetch the hash data from the manager\n\t\t\tconst hashData = this.manager.hashes.get(`${method}:${routeId.bucketRoute}`);\n\n\t\t\t// When fetched, update the last access of the hash\n\t\t\tif (hashData) {\n\t\t\t\thashData.lastAccess = Date.now();\n\t\t\t}\n\t\t}\n\n\t\t// Handle retryAfter, which means we have actually hit a rate limit\n\t\tlet sublimitTimeout: number | null = null;\n\t\tif (retryAfter > 0) {\n\t\t\tif (res.headers.has('X-RateLimit-Global')) {\n\t\t\t\tthis.manager.globalRemaining = 0;\n\t\t\t\tthis.manager.globalReset = Date.now() + retryAfter;\n\t\t\t} else if (!this.localLimited) {\n\t\t\t\t/*\n\t\t\t\t * This is a sublimit (e.g. 2 channel name changes/10 minutes) since the headers don't indicate a\n\t\t\t\t * route-wide rate limit. Don't update remaining or reset to avoid rate limiting the whole\n\t\t\t\t * endpoint, just set a reset time on the request itself to avoid retrying too soon.\n\t\t\t\t */\n\t\t\t\tsublimitTimeout = retryAfter;\n\t\t\t}\n\t\t}\n\n\t\t// Count the invalid requests\n\t\tif (status === 401 || status === 403 || status === 429) {\n\t\t\tincrementInvalidCount(this.manager);\n\t\t}\n\n\t\tif (res.ok) {\n\t\t\treturn res;\n\t\t} else if (status === 429) {\n\t\t\t// A rate limit was hit - this may happen if the route isn't associated with an official bucket hash yet, or when first globally rate limited\n\t\t\tconst isGlobal = this.globalLimited;\n\t\t\tlet limit: number;\n\t\t\tlet timeout: number;\n\n\t\t\tif (isGlobal) {\n\t\t\t\t// Set RateLimitData based on the global limit\n\t\t\t\tlimit = this.manager.options.globalRequestsPerSecond;\n\t\t\t\ttimeout = this.manager.globalReset + this.manager.options.offset - Date.now();\n\t\t\t} else {\n\t\t\t\t// Set RateLimitData based on the route-specific limit\n\t\t\t\tlimit = this.limit;\n\t\t\t\ttimeout = this.timeToReset;\n\t\t\t}\n\n\t\t\tawait onRateLimit(this.manager, {\n\t\t\t\ttimeToReset: timeout,\n\t\t\t\tlimit,\n\t\t\t\tmethod,\n\t\t\t\thash: this.hash,\n\t\t\t\turl,\n\t\t\t\troute: routeId.bucketRoute,\n\t\t\t\tmajorParameter: this.majorParameter,\n\t\t\t\tglobal: isGlobal,\n\t\t\t});\n\t\t\tthis.debug(\n\t\t\t\t[\n\t\t\t\t\t'Encountered unexpected 429 rate limit',\n\t\t\t\t\t` Global : ${isGlobal.toString()}`,\n\t\t\t\t\t` Method : ${method}`,\n\t\t\t\t\t` URL : ${url}`,\n\t\t\t\t\t` Bucket : ${routeId.bucketRoute}`,\n\t\t\t\t\t` Major parameter: ${routeId.majorParameter}`,\n\t\t\t\t\t` Hash : ${this.hash}`,\n\t\t\t\t\t` Limit : ${limit}`,\n\t\t\t\t\t` Retry After : ${retryAfter}ms`,\n\t\t\t\t\t` Sublimit : ${sublimitTimeout ? `${sublimitTimeout}ms` : 'None'}`,\n\t\t\t\t].join('\\n'),\n\t\t\t);\n\t\t\t// If caused by a sublimit, wait it out here so other requests on the route can be handled\n\t\t\tif (sublimitTimeout) {\n\t\t\t\t// Normally the sublimit queue will not exist, however, if a sublimit is hit while in the sublimit queue, it will\n\t\t\t\tconst firstSublimit = !this.#sublimitedQueue;\n\t\t\t\tif (firstSublimit) {\n\t\t\t\t\tthis.#sublimitedQueue = new AsyncQueue();\n\t\t\t\t\tvoid this.#sublimitedQueue.wait();\n\t\t\t\t\tthis.#asyncQueue.shift();\n\t\t\t\t}\n\n\t\t\t\tthis.#sublimitPromise?.resolve();\n\t\t\t\tthis.#sublimitPromise = null;\n\t\t\t\tawait sleep(sublimitTimeout);\n\t\t\t\tlet resolve: () => void;\n\t\t\t\t// eslint-disable-next-line promise/param-names, no-promise-executor-return\n\t\t\t\tconst promise = new Promise<void>((res) => (resolve = res));\n\t\t\t\tthis.#sublimitPromise = { promise, resolve: resolve! };\n\t\t\t\tif (firstSublimit) {\n\t\t\t\t\t// Re-queue this request so it can be shifted by the finally\n\t\t\t\t\tawait this.#asyncQueue.wait();\n\t\t\t\t\tthis.#shiftSublimit = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Since this is not a server side issue, the next request should pass, so we don't bump the retries counter\n\t\t\treturn this.runRequest(routeId, url, options, requestData, retries);\n\t\t} else {\n\t\t\tconst handled = await handleErrors(this.manager, res, method, url, requestData, retries);\n\t\t\tif (handled === null) {\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\treturn this.runRequest(routeId, url, options, requestData, ++retries);\n\t\t\t}\n\n\t\t\treturn handled;\n\t\t}\n\t}\n}\n","export * from './lib/CDN.js';\nexport * from './lib/errors/DiscordAPIError.js';\nexport * from './lib/errors/HTTPError.js';\nexport * from './lib/errors/RateLimitError.js';\nexport * from './lib/REST.js';\nexport * from './lib/utils/constants.js';\nexport * from './lib/utils/types.js';\nexport { calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse } from './lib/utils/utils.js';\n\n/**\n * The {@link https://github.com/discordjs/discord.js/blob/main/packages/rest/#readme | @discordjs/rest} version\n * that you are currently using.\n */\n// This needs to explicitly be `string` so it is not typed as a \"const string\" that gets injected by esbuild\nexport const version = '2.0.1' as string;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAqB;AACrB,IAAAA,eAAiD;AACjD,IAAAC,iBAAyB;;;ACAzB,IAAI;AAEG,SAAS,mBAAmB,aAAyC;AAC3E,oBAAkB;AACnB;AAFgB;AAIT,SAAS,qBAAqB;AACpC,SAAO;AACR;AAFgB;;;ACRhB,uBAA6B;AAC7B,sBAAgC;AAChC,uBAAsB;AACtB,oBAAmD;AAKnD,eAAsB,YAAY,KAAa,MAA0C;AAGxF,QAAM,UAAU;AAAA,IACf,GAAG;AAAA,IACH,MAAM,MAAM,YAAY,KAAK,IAAI;AAAA,EAClC;AACA,QAAM,MAAM,UAAM,uBAAQ,KAAK,OAAO;AACtC,SAAO;AAAA,IACN,MAAM,IAAI;AAAA,IACV,MAAM,cAAc;AACnB,aAAO,IAAI,KAAK,YAAY;AAAA,IAC7B;AAAA,IACA,MAAM,OAAO;AACZ,aAAO,IAAI,KAAK,KAAK;AAAA,IACtB;AAAA,IACA,MAAM,OAAO;AACZ,aAAO,IAAI,KAAK,KAAK;AAAA,IACtB;AAAA,IACA,IAAI,WAAW;AACd,aAAO,IAAI,KAAK;AAAA,IACjB;AAAA,IACA,SAAS,IAAI,sBAAQ,IAAI,OAA4C;AAAA,IACrE,QAAQ,IAAI;AAAA,IACZ,YAAY,8BAAa,IAAI,UAAU;AAAA,IACvC,IAAI,IAAI,cAAc,OAAO,IAAI,aAAa;AAAA,EAC/C;AACD;AA3BsB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res","request"]} \ No newline at end of file
diff --git a/node_modules/@discordjs/rest/dist/index.mjs b/node_modules/@discordjs/rest/dist/index.mjs
new file mode 100644
index 0000000..476da37
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/index.mjs
@@ -0,0 +1,1382 @@
+var __defProp = Object.defineProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+
+// src/index.ts
+import { Blob as Blob2 } from "node:buffer";
+import { shouldUseGlobalFetchAndWebSocket } from "@discordjs/util";
+import { FormData as FormData2 } from "undici";
+
+// src/environment.ts
+var defaultStrategy;
+function setDefaultStrategy(newStrategy) {
+ defaultStrategy = newStrategy;
+}
+__name(setDefaultStrategy, "setDefaultStrategy");
+function getDefaultStrategy() {
+ return defaultStrategy;
+}
+__name(getDefaultStrategy, "getDefaultStrategy");
+
+// src/strategies/undiciRequest.ts
+import { STATUS_CODES } from "node:http";
+import { URLSearchParams as URLSearchParams2 } from "node:url";
+import { types } from "node:util";
+import { request, Headers } from "undici";
+async function makeRequest(url, init) {
+ const options = {
+ ...init,
+ body: await resolveBody(init.body)
+ };
+ const res = await request(url, options);
+ return {
+ body: res.body,
+ async arrayBuffer() {
+ return res.body.arrayBuffer();
+ },
+ async json() {
+ return res.body.json();
+ },
+ async text() {
+ return res.body.text();
+ },
+ get bodyUsed() {
+ return res.body.bodyUsed;
+ },
+ headers: new Headers(res.headers),
+ status: res.statusCode,
+ statusText: STATUS_CODES[res.statusCode],
+ ok: res.statusCode >= 200 && res.statusCode < 300
+ };
+}
+__name(makeRequest, "makeRequest");
+async function resolveBody(body) {
+ if (body == null) {
+ return null;
+ } else if (typeof body === "string") {
+ return body;
+ } else if (types.isUint8Array(body)) {
+ return body;
+ } else if (types.isArrayBuffer(body)) {
+ return new Uint8Array(body);
+ } else if (body instanceof URLSearchParams2) {
+ return body.toString();
+ } else if (body instanceof DataView) {
+ return new Uint8Array(body.buffer);
+ } else if (body instanceof Blob) {
+ return new Uint8Array(await body.arrayBuffer());
+ } else if (body instanceof FormData) {
+ return body;
+ } else if (body[Symbol.iterator]) {
+ const chunks = [...body];
+ return Buffer.concat(chunks);
+ } else if (body[Symbol.asyncIterator]) {
+ const chunks = [];
+ for await (const chunk of body) {
+ chunks.push(chunk);
+ }
+ return Buffer.concat(chunks);
+ }
+ throw new TypeError(`Unable to resolve body.`);
+}
+__name(resolveBody, "resolveBody");
+
+// src/lib/utils/constants.ts
+import { getUserAgentAppendix } from "@discordjs/util";
+import { APIVersion } from "discord-api-types/v10";
+var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.0.1)`;
+var DefaultUserAgentAppendix = getUserAgentAppendix();
+var DefaultRestOptions = {
+ agent: null,
+ api: "https://discord.com/api",
+ authPrefix: "Bot",
+ cdn: "https://cdn.discordapp.com",
+ headers: {},
+ invalidRequestWarningInterval: 0,
+ globalRequestsPerSecond: 50,
+ offset: 50,
+ rejectOnRateLimit: null,
+ retries: 3,
+ timeout: 15e3,
+ userAgentAppendix: DefaultUserAgentAppendix,
+ version: APIVersion,
+ hashSweepInterval: 144e5,
+ // 4 Hours
+ hashLifetime: 864e5,
+ // 24 Hours
+ handlerSweepInterval: 36e5,
+ // 1 Hour
+ async makeRequest(...args) {
+ return getDefaultStrategy()(...args);
+ }
+};
+var RESTEvents = /* @__PURE__ */ ((RESTEvents2) => {
+ RESTEvents2["Debug"] = "restDebug";
+ RESTEvents2["HandlerSweep"] = "handlerSweep";
+ RESTEvents2["HashSweep"] = "hashSweep";
+ RESTEvents2["InvalidRequestWarning"] = "invalidRequestWarning";
+ RESTEvents2["RateLimited"] = "rateLimited";
+ RESTEvents2["Response"] = "response";
+ return RESTEvents2;
+})(RESTEvents || {});
+var ALLOWED_EXTENSIONS = ["webp", "png", "jpg", "jpeg", "gif"];
+var ALLOWED_STICKER_EXTENSIONS = ["png", "json", "gif"];
+var ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
+var OverwrittenMimeTypes = {
+ // https://github.com/discordjs/discord.js/issues/8557
+ "image/apng": "image/png"
+};
+var BurstHandlerMajorIdKey = "burst";
+
+// src/lib/CDN.ts
+var CDN = class {
+ constructor(base = DefaultRestOptions.cdn) {
+ this.base = base;
+ }
+ static {
+ __name(this, "CDN");
+ }
+ /**
+ * Generates an app asset URL for a client's asset.
+ *
+ * @param clientId - The client id that has the asset
+ * @param assetHash - The hash provided by Discord for this asset
+ * @param options - Optional options for the asset
+ */
+ appAsset(clientId, assetHash, options) {
+ return this.makeURL(`/app-assets/${clientId}/${assetHash}`, options);
+ }
+ /**
+ * Generates an app icon URL for a client's icon.
+ *
+ * @param clientId - The client id that has the icon
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ appIcon(clientId, iconHash, options) {
+ return this.makeURL(`/app-icons/${clientId}/${iconHash}`, options);
+ }
+ /**
+ * Generates an avatar URL, e.g. for a user or a webhook.
+ *
+ * @param id - The id that has the icon
+ * @param avatarHash - The hash provided by Discord for this avatar
+ * @param options - Optional options for the avatar
+ */
+ avatar(id, avatarHash, options) {
+ return this.dynamicMakeURL(`/avatars/${id}/${avatarHash}`, avatarHash, options);
+ }
+ /**
+ * Generates a user avatar decoration URL.
+ *
+ * @param userId - The id of the user
+ * @param userAvatarDecoration - The hash provided by Discord for this avatar decoration
+ * @param options - Optional options for the avatar decoration
+ */
+ avatarDecoration(userId, userAvatarDecoration, options) {
+ return this.makeURL(`/avatar-decorations/${userId}/${userAvatarDecoration}`, options);
+ }
+ /**
+ * Generates a banner URL, e.g. for a user or a guild.
+ *
+ * @param id - The id that has the banner splash
+ * @param bannerHash - The hash provided by Discord for this banner
+ * @param options - Optional options for the banner
+ */
+ banner(id, bannerHash, options) {
+ return this.dynamicMakeURL(`/banners/${id}/${bannerHash}`, bannerHash, options);
+ }
+ /**
+ * Generates an icon URL for a channel, e.g. a group DM.
+ *
+ * @param channelId - The channel id that has the icon
+ * @param iconHash - The hash provided by Discord for this channel
+ * @param options - Optional options for the icon
+ */
+ channelIcon(channelId, iconHash, options) {
+ return this.makeURL(`/channel-icons/${channelId}/${iconHash}`, options);
+ }
+ /**
+ * Generates a default avatar URL
+ *
+ * @param index - The default avatar index
+ * @remarks
+ * To calculate the index for a user do `(userId >> 22) % 6`,
+ * or `discriminator % 5` if they're using the legacy username system.
+ */
+ defaultAvatar(index) {
+ return this.makeURL(`/embed/avatars/${index}`, { extension: "png" });
+ }
+ /**
+ * Generates a discovery splash URL for a guild's discovery splash.
+ *
+ * @param guildId - The guild id that has the discovery splash
+ * @param splashHash - The hash provided by Discord for this splash
+ * @param options - Optional options for the splash
+ */
+ discoverySplash(guildId, splashHash, options) {
+ return this.makeURL(`/discovery-splashes/${guildId}/${splashHash}`, options);
+ }
+ /**
+ * Generates an emoji's URL for an emoji.
+ *
+ * @param emojiId - The emoji id
+ * @param extension - The extension of the emoji
+ */
+ emoji(emojiId, extension) {
+ return this.makeURL(`/emojis/${emojiId}`, { extension });
+ }
+ /**
+ * Generates a guild member avatar URL.
+ *
+ * @param guildId - The id of the guild
+ * @param userId - The id of the user
+ * @param avatarHash - The hash provided by Discord for this avatar
+ * @param options - Optional options for the avatar
+ */
+ guildMemberAvatar(guildId, userId, avatarHash, options) {
+ return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/avatars/${avatarHash}`, avatarHash, options);
+ }
+ /**
+ * Generates a guild member banner URL.
+ *
+ * @param guildId - The id of the guild
+ * @param userId - The id of the user
+ * @param bannerHash - The hash provided by Discord for this banner
+ * @param options - Optional options for the banner
+ */
+ guildMemberBanner(guildId, userId, bannerHash, options) {
+ return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banner`, bannerHash, options);
+ }
+ /**
+ * Generates an icon URL, e.g. for a guild.
+ *
+ * @param id - The id that has the icon splash
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ icon(id, iconHash, options) {
+ return this.dynamicMakeURL(`/icons/${id}/${iconHash}`, iconHash, options);
+ }
+ /**
+ * Generates a URL for the icon of a role
+ *
+ * @param roleId - The id of the role that has the icon
+ * @param roleIconHash - The hash provided by Discord for this role icon
+ * @param options - Optional options for the role icon
+ */
+ roleIcon(roleId, roleIconHash, options) {
+ return this.makeURL(`/role-icons/${roleId}/${roleIconHash}`, options);
+ }
+ /**
+ * Generates a guild invite splash URL for a guild's invite splash.
+ *
+ * @param guildId - The guild id that has the invite splash
+ * @param splashHash - The hash provided by Discord for this splash
+ * @param options - Optional options for the splash
+ */
+ splash(guildId, splashHash, options) {
+ return this.makeURL(`/splashes/${guildId}/${splashHash}`, options);
+ }
+ /**
+ * Generates a sticker URL.
+ *
+ * @param stickerId - The sticker id
+ * @param extension - The extension of the sticker
+ * @privateRemarks
+ * Stickers cannot have a `.webp` extension, so we default to a `.png`
+ */
+ sticker(stickerId, extension = "png") {
+ return this.makeURL(`/stickers/${stickerId}`, { allowedExtensions: ALLOWED_STICKER_EXTENSIONS, extension });
+ }
+ /**
+ * Generates a sticker pack banner URL.
+ *
+ * @param bannerId - The banner id
+ * @param options - Optional options for the banner
+ */
+ stickerPackBanner(bannerId, options) {
+ return this.makeURL(`/app-assets/710982414301790216/store/${bannerId}`, options);
+ }
+ /**
+ * Generates a team icon URL for a team's icon.
+ *
+ * @param teamId - The team id that has the icon
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ teamIcon(teamId, iconHash, options) {
+ return this.makeURL(`/team-icons/${teamId}/${iconHash}`, options);
+ }
+ /**
+ * Generates a cover image for a guild scheduled event.
+ *
+ * @param scheduledEventId - The scheduled event id
+ * @param coverHash - The hash provided by discord for this cover image
+ * @param options - Optional options for the cover image
+ */
+ guildScheduledEventCover(scheduledEventId, coverHash, options) {
+ return this.makeURL(`/guild-events/${scheduledEventId}/${coverHash}`, options);
+ }
+ /**
+ * Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.
+ *
+ * @param route - The base cdn route
+ * @param hash - The hash provided by Discord for this icon
+ * @param options - Optional options for the link
+ */
+ dynamicMakeURL(route, hash, { forceStatic = false, ...options } = {}) {
+ return this.makeURL(route, !forceStatic && hash.startsWith("a_") ? { ...options, extension: "gif" } : options);
+ }
+ /**
+ * Constructs the URL for the resource
+ *
+ * @param route - The base cdn route
+ * @param options - The extension/size options for the link
+ */
+ makeURL(route, { allowedExtensions = ALLOWED_EXTENSIONS, extension = "webp", size } = {}) {
+ extension = String(extension).toLowerCase();
+ if (!allowedExtensions.includes(extension)) {
+ throw new RangeError(`Invalid extension provided: ${extension}
+Must be one of: ${allowedExtensions.join(", ")}`);
+ }
+ if (size && !ALLOWED_SIZES.includes(size)) {
+ throw new RangeError(`Invalid size provided: ${size}
+Must be one of: ${ALLOWED_SIZES.join(", ")}`);
+ }
+ const url = new URL(`${this.base}${route}.${extension}`);
+ if (size) {
+ url.searchParams.set("size", String(size));
+ }
+ return url.toString();
+ }
+};
+
+// src/lib/errors/DiscordAPIError.ts
+function isErrorGroupWrapper(error) {
+ return Reflect.has(error, "_errors");
+}
+__name(isErrorGroupWrapper, "isErrorGroupWrapper");
+function isErrorResponse(error) {
+ return typeof Reflect.get(error, "message") === "string";
+}
+__name(isErrorResponse, "isErrorResponse");
+var DiscordAPIError = class _DiscordAPIError extends Error {
+ /**
+ * @param rawError - The error reported by Discord
+ * @param code - The error code reported by Discord
+ * @param status - The status code of the response
+ * @param method - The method of the request that erred
+ * @param url - The url of the request that erred
+ * @param bodyData - The unparsed data for the request that errored
+ */
+ constructor(rawError, code, status, method, url, bodyData) {
+ super(_DiscordAPIError.getMessage(rawError));
+ this.rawError = rawError;
+ this.code = code;
+ this.status = status;
+ this.method = method;
+ this.url = url;
+ this.requestBody = { files: bodyData.files, json: bodyData.body };
+ }
+ static {
+ __name(this, "DiscordAPIError");
+ }
+ requestBody;
+ /**
+ * The name of the error
+ */
+ get name() {
+ return `${_DiscordAPIError.name}[${this.code}]`;
+ }
+ static getMessage(error) {
+ let flattened = "";
+ if ("code" in error) {
+ if (error.errors) {
+ flattened = [...this.flattenDiscordError(error.errors)].join("\n");
+ }
+ return error.message && flattened ? `${error.message}
+${flattened}` : error.message || flattened || "Unknown Error";
+ }
+ return error.error_description ?? "No Description";
+ }
+ static *flattenDiscordError(obj, key = "") {
+ if (isErrorResponse(obj)) {
+ return yield `${key.length ? `${key}[${obj.code}]` : `${obj.code}`}: ${obj.message}`.trim();
+ }
+ for (const [otherKey, val] of Object.entries(obj)) {
+ const nextKey = otherKey.startsWith("_") ? key : key ? Number.isNaN(Number(otherKey)) ? `${key}.${otherKey}` : `${key}[${otherKey}]` : otherKey;
+ if (typeof val === "string") {
+ yield val;
+ } else if (isErrorGroupWrapper(val)) {
+ for (const error of val._errors) {
+ yield* this.flattenDiscordError(error, nextKey);
+ }
+ } else {
+ yield* this.flattenDiscordError(val, nextKey);
+ }
+ }
+ }
+};
+
+// src/lib/errors/HTTPError.ts
+var HTTPError = class _HTTPError extends Error {
+ /**
+ * @param status - The status code of the response
+ * @param statusText - The status text of the response
+ * @param method - The method of the request that erred
+ * @param url - The url of the request that erred
+ * @param bodyData - The unparsed data for the request that errored
+ */
+ constructor(status, statusText, method, url, bodyData) {
+ super(statusText);
+ this.status = status;
+ this.method = method;
+ this.url = url;
+ this.requestBody = { files: bodyData.files, json: bodyData.body };
+ }
+ static {
+ __name(this, "HTTPError");
+ }
+ requestBody;
+ name = _HTTPError.name;
+};
+
+// src/lib/errors/RateLimitError.ts
+var RateLimitError = class _RateLimitError extends Error {
+ static {
+ __name(this, "RateLimitError");
+ }
+ timeToReset;
+ limit;
+ method;
+ hash;
+ url;
+ route;
+ majorParameter;
+ global;
+ constructor({ timeToReset, limit, method, hash, url, route, majorParameter, global }) {
+ super();
+ this.timeToReset = timeToReset;
+ this.limit = limit;
+ this.method = method;
+ this.hash = hash;
+ this.url = url;
+ this.route = route;
+ this.majorParameter = majorParameter;
+ this.global = global;
+ }
+ /**
+ * The name of the error
+ */
+ get name() {
+ return `${_RateLimitError.name}[${this.route}]`;
+ }
+};
+
+// src/lib/REST.ts
+import { Collection } from "@discordjs/collection";
+import { DiscordSnowflake } from "@sapphire/snowflake";
+import { AsyncEventEmitter } from "@vladfrangu/async_event_emitter";
+import { filetypeinfo } from "magic-bytes.js";
+
+// src/lib/utils/types.ts
+var RequestMethod = /* @__PURE__ */ ((RequestMethod2) => {
+ RequestMethod2["Delete"] = "DELETE";
+ RequestMethod2["Get"] = "GET";
+ RequestMethod2["Patch"] = "PATCH";
+ RequestMethod2["Post"] = "POST";
+ RequestMethod2["Put"] = "PUT";
+ return RequestMethod2;
+})(RequestMethod || {});
+
+// src/lib/utils/utils.ts
+function serializeSearchParam(value) {
+ switch (typeof value) {
+ case "string":
+ return value;
+ case "number":
+ case "bigint":
+ case "boolean":
+ return value.toString();
+ case "object":
+ if (value === null)
+ return null;
+ if (value instanceof Date) {
+ return Number.isNaN(value.getTime()) ? null : value.toISOString();
+ }
+ if (typeof value.toString === "function" && value.toString !== Object.prototype.toString)
+ return value.toString();
+ return null;
+ default:
+ return null;
+ }
+}
+__name(serializeSearchParam, "serializeSearchParam");
+function makeURLSearchParams(options) {
+ const params = new URLSearchParams();
+ if (!options)
+ return params;
+ for (const [key, value] of Object.entries(options)) {
+ const serialized = serializeSearchParam(value);
+ if (serialized !== null)
+ params.append(key, serialized);
+ }
+ return params;
+}
+__name(makeURLSearchParams, "makeURLSearchParams");
+async function parseResponse(res) {
+ if (res.headers.get("Content-Type")?.startsWith("application/json")) {
+ return res.json();
+ }
+ return res.arrayBuffer();
+}
+__name(parseResponse, "parseResponse");
+function hasSublimit(bucketRoute, body, method) {
+ if (bucketRoute === "/channels/:id") {
+ if (typeof body !== "object" || body === null)
+ return false;
+ if (method !== "PATCH" /* Patch */)
+ return false;
+ const castedBody = body;
+ return ["name", "topic"].some((key) => Reflect.has(castedBody, key));
+ }
+ return true;
+}
+__name(hasSublimit, "hasSublimit");
+function shouldRetry(error) {
+ if (error.name === "AbortError")
+ return true;
+ return "code" in error && error.code === "ECONNRESET" || error.message.includes("ECONNRESET");
+}
+__name(shouldRetry, "shouldRetry");
+async function onRateLimit(manager, rateLimitData) {
+ const { options } = manager;
+ if (!options.rejectOnRateLimit)
+ return;
+ const shouldThrow = typeof options.rejectOnRateLimit === "function" ? await options.rejectOnRateLimit(rateLimitData) : options.rejectOnRateLimit.some((route) => rateLimitData.route.startsWith(route.toLowerCase()));
+ if (shouldThrow) {
+ throw new RateLimitError(rateLimitData);
+ }
+}
+__name(onRateLimit, "onRateLimit");
+function calculateUserDefaultAvatarIndex(userId) {
+ return Number(BigInt(userId) >> 22n) % 6;
+}
+__name(calculateUserDefaultAvatarIndex, "calculateUserDefaultAvatarIndex");
+async function sleep(ms) {
+ return new Promise((resolve) => {
+ setTimeout(() => resolve(), ms);
+ });
+}
+__name(sleep, "sleep");
+function isBufferLike(value) {
+ return value instanceof ArrayBuffer || value instanceof Uint8Array || value instanceof Uint8ClampedArray;
+}
+__name(isBufferLike, "isBufferLike");
+
+// src/lib/handlers/Shared.ts
+var invalidCount = 0;
+var invalidCountResetTime = null;
+function incrementInvalidCount(manager) {
+ if (!invalidCountResetTime || invalidCountResetTime < Date.now()) {
+ invalidCountResetTime = Date.now() + 1e3 * 60 * 10;
+ invalidCount = 0;
+ }
+ invalidCount++;
+ const emitInvalid = manager.options.invalidRequestWarningInterval > 0 && invalidCount % manager.options.invalidRequestWarningInterval === 0;
+ if (emitInvalid) {
+ manager.emit("invalidRequestWarning" /* InvalidRequestWarning */, {
+ count: invalidCount,
+ remainingTime: invalidCountResetTime - Date.now()
+ });
+ }
+}
+__name(incrementInvalidCount, "incrementInvalidCount");
+async function makeNetworkRequest(manager, routeId, url, options, requestData, retries) {
+ const controller = new AbortController();
+ const timeout = setTimeout(() => controller.abort(), manager.options.timeout);
+ if (requestData.signal) {
+ if (requestData.signal.aborted)
+ controller.abort();
+ else
+ requestData.signal.addEventListener("abort", () => controller.abort());
+ }
+ let res;
+ try {
+ res = await manager.options.makeRequest(url, { ...options, signal: controller.signal });
+ } catch (error) {
+ if (!(error instanceof Error))
+ throw error;
+ if (shouldRetry(error) && retries !== manager.options.retries) {
+ return null;
+ }
+ throw error;
+ } finally {
+ clearTimeout(timeout);
+ }
+ if (manager.listenerCount("response" /* Response */)) {
+ manager.emit(
+ "response" /* Response */,
+ {
+ method: options.method ?? "get",
+ path: routeId.original,
+ route: routeId.bucketRoute,
+ options,
+ data: requestData,
+ retries
+ },
+ res instanceof Response ? res.clone() : { ...res }
+ );
+ }
+ return res;
+}
+__name(makeNetworkRequest, "makeNetworkRequest");
+async function handleErrors(manager, res, method, url, requestData, retries) {
+ const status = res.status;
+ if (status >= 500 && status < 600) {
+ if (retries !== manager.options.retries) {
+ return null;
+ }
+ throw new HTTPError(status, res.statusText, method, url, requestData);
+ } else {
+ if (status >= 400 && status < 500) {
+ if (status === 401 && requestData.auth) {
+ manager.setToken(null);
+ }
+ const data = await parseResponse(res);
+ throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
+ }
+ return res;
+ }
+}
+__name(handleErrors, "handleErrors");
+
+// src/lib/handlers/BurstHandler.ts
+var BurstHandler = class {
+ /**
+ * @param manager - The request manager
+ * @param hash - The hash that this RequestHandler handles
+ * @param majorParameter - The major parameter for this handler
+ */
+ constructor(manager, hash, majorParameter) {
+ this.manager = manager;
+ this.hash = hash;
+ this.majorParameter = majorParameter;
+ this.id = `${hash}:${majorParameter}`;
+ }
+ static {
+ __name(this, "BurstHandler");
+ }
+ /**
+ * {@inheritdoc IHandler.id}
+ */
+ id;
+ /**
+ * {@inheritDoc IHandler.inactive}
+ */
+ inactive = false;
+ /**
+ * Emits a debug message
+ *
+ * @param message - The message to debug
+ */
+ debug(message) {
+ this.manager.emit("restDebug" /* Debug */, `[REST ${this.id}] ${message}`);
+ }
+ /**
+ * {@inheritDoc IHandler.queueRequest}
+ */
+ async queueRequest(routeId, url, options, requestData) {
+ return this.runRequest(routeId, url, options, requestData);
+ }
+ /**
+ * The method that actually makes the request to the API, and updates info about the bucket accordingly
+ *
+ * @param routeId - The generalized API route with literal ids for major parameters
+ * @param url - The fully resolved URL to make the request to
+ * @param options - The fetch options needed to make the request
+ * @param requestData - Extra data from the user's request needed for errors and additional processing
+ * @param retries - The number of retries this request has already attempted (recursion)
+ */
+ async runRequest(routeId, url, options, requestData, retries = 0) {
+ const method = options.method ?? "get";
+ const res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries);
+ if (res === null) {
+ return this.runRequest(routeId, url, options, requestData, ++retries);
+ }
+ const status = res.status;
+ let retryAfter = 0;
+ const retry = res.headers.get("Retry-After");
+ if (retry)
+ retryAfter = Number(retry) * 1e3 + this.manager.options.offset;
+ if (status === 401 || status === 403 || status === 429) {
+ incrementInvalidCount(this.manager);
+ }
+ if (status >= 200 && status < 300) {
+ return res;
+ } else if (status === 429) {
+ const isGlobal = res.headers.has("X-RateLimit-Global");
+ await onRateLimit(this.manager, {
+ timeToReset: retryAfter,
+ limit: Number.POSITIVE_INFINITY,
+ method,
+ hash: this.hash,
+ url,
+ route: routeId.bucketRoute,
+ majorParameter: this.majorParameter,
+ global: isGlobal
+ });
+ this.debug(
+ [
+ "Encountered unexpected 429 rate limit",
+ ` Global : ${isGlobal}`,
+ ` Method : ${method}`,
+ ` URL : ${url}`,
+ ` Bucket : ${routeId.bucketRoute}`,
+ ` Major parameter: ${routeId.majorParameter}`,
+ ` Hash : ${this.hash}`,
+ ` Limit : ${Number.POSITIVE_INFINITY}`,
+ ` Retry After : ${retryAfter}ms`,
+ ` Sublimit : None`
+ ].join("\n")
+ );
+ await sleep(retryAfter);
+ return this.runRequest(routeId, url, options, requestData, retries);
+ } else {
+ const handled = await handleErrors(this.manager, res, method, url, requestData, retries);
+ if (handled === null) {
+ return this.runRequest(routeId, url, options, requestData, ++retries);
+ }
+ return handled;
+ }
+ }
+};
+
+// src/lib/handlers/SequentialHandler.ts
+import { AsyncQueue } from "@sapphire/async-queue";
+var SequentialHandler = class {
+ /**
+ * @param manager - The request manager
+ * @param hash - The hash that this RequestHandler handles
+ * @param majorParameter - The major parameter for this handler
+ */
+ constructor(manager, hash, majorParameter) {
+ this.manager = manager;
+ this.hash = hash;
+ this.majorParameter = majorParameter;
+ this.id = `${hash}:${majorParameter}`;
+ }
+ static {
+ __name(this, "SequentialHandler");
+ }
+ /**
+ * {@inheritDoc IHandler.id}
+ */
+ id;
+ /**
+ * The time this rate limit bucket will reset
+ */
+ reset = -1;
+ /**
+ * The remaining requests that can be made before we are rate limited
+ */
+ remaining = 1;
+ /**
+ * The total number of requests that can be made before we are rate limited
+ */
+ limit = Number.POSITIVE_INFINITY;
+ /**
+ * The interface used to sequence async requests sequentially
+ */
+ #asyncQueue = new AsyncQueue();
+ /**
+ * The interface used to sequence sublimited async requests sequentially
+ */
+ #sublimitedQueue = null;
+ /**
+ * A promise wrapper for when the sublimited queue is finished being processed or null when not being processed
+ */
+ #sublimitPromise = null;
+ /**
+ * Whether the sublimit queue needs to be shifted in the finally block
+ */
+ #shiftSublimit = false;
+ /**
+ * {@inheritDoc IHandler.inactive}
+ */
+ get inactive() {
+ return this.#asyncQueue.remaining === 0 && (this.#sublimitedQueue === null || this.#sublimitedQueue.remaining === 0) && !this.limited;
+ }
+ /**
+ * If the rate limit bucket is currently limited by the global limit
+ */
+ get globalLimited() {
+ return this.manager.globalRemaining <= 0 && Date.now() < this.manager.globalReset;
+ }
+ /**
+ * If the rate limit bucket is currently limited by its limit
+ */
+ get localLimited() {
+ return this.remaining <= 0 && Date.now() < this.reset;
+ }
+ /**
+ * If the rate limit bucket is currently limited
+ */
+ get limited() {
+ return this.globalLimited || this.localLimited;
+ }
+ /**
+ * The time until queued requests can continue
+ */
+ get timeToReset() {
+ return this.reset + this.manager.options.offset - Date.now();
+ }
+ /**
+ * Emits a debug message
+ *
+ * @param message - The message to debug
+ */
+ debug(message) {
+ this.manager.emit("restDebug" /* Debug */, `[REST ${this.id}] ${message}`);
+ }
+ /**
+ * Delay all requests for the specified amount of time, handling global rate limits
+ *
+ * @param time - The amount of time to delay all requests for
+ */
+ async globalDelayFor(time) {
+ await sleep(time);
+ this.manager.globalDelay = null;
+ }
+ /**
+ * {@inheritDoc IHandler.queueRequest}
+ */
+ async queueRequest(routeId, url, options, requestData) {
+ let queue = this.#asyncQueue;
+ let queueType = 0 /* Standard */;
+ if (this.#sublimitedQueue && hasSublimit(routeId.bucketRoute, requestData.body, options.method)) {
+ queue = this.#sublimitedQueue;
+ queueType = 1 /* Sublimit */;
+ }
+ await queue.wait({ signal: requestData.signal });
+ if (queueType === 0 /* Standard */) {
+ if (this.#sublimitedQueue && hasSublimit(routeId.bucketRoute, requestData.body, options.method)) {
+ queue = this.#sublimitedQueue;
+ const wait = queue.wait();
+ this.#asyncQueue.shift();
+ await wait;
+ } else if (this.#sublimitPromise) {
+ await this.#sublimitPromise.promise;
+ }
+ }
+ try {
+ return await this.runRequest(routeId, url, options, requestData);
+ } finally {
+ queue.shift();
+ if (this.#shiftSublimit) {
+ this.#shiftSublimit = false;
+ this.#sublimitedQueue?.shift();
+ }
+ if (this.#sublimitedQueue?.remaining === 0) {
+ this.#sublimitPromise?.resolve();
+ this.#sublimitedQueue = null;
+ }
+ }
+ }
+ /**
+ * The method that actually makes the request to the api, and updates info about the bucket accordingly
+ *
+ * @param routeId - The generalized api route with literal ids for major parameters
+ * @param url - The fully resolved url to make the request to
+ * @param options - The fetch options needed to make the request
+ * @param requestData - Extra data from the user's request needed for errors and additional processing
+ * @param retries - The number of retries this request has already attempted (recursion)
+ */
+ async runRequest(routeId, url, options, requestData, retries = 0) {
+ while (this.limited) {
+ const isGlobal = this.globalLimited;
+ let limit2;
+ let timeout;
+ let delay;
+ if (isGlobal) {
+ limit2 = this.manager.options.globalRequestsPerSecond;
+ timeout = this.manager.globalReset + this.manager.options.offset - Date.now();
+ if (!this.manager.globalDelay) {
+ this.manager.globalDelay = this.globalDelayFor(timeout);
+ }
+ delay = this.manager.globalDelay;
+ } else {
+ limit2 = this.limit;
+ timeout = this.timeToReset;
+ delay = sleep(timeout);
+ }
+ const rateLimitData = {
+ timeToReset: timeout,
+ limit: limit2,
+ method: options.method ?? "get",
+ hash: this.hash,
+ url,
+ route: routeId.bucketRoute,
+ majorParameter: this.majorParameter,
+ global: isGlobal
+ };
+ this.manager.emit("rateLimited" /* RateLimited */, rateLimitData);
+ await onRateLimit(this.manager, rateLimitData);
+ if (isGlobal) {
+ this.debug(`Global rate limit hit, blocking all requests for ${timeout}ms`);
+ } else {
+ this.debug(`Waiting ${timeout}ms for rate limit to pass`);
+ }
+ await delay;
+ }
+ if (!this.manager.globalReset || this.manager.globalReset < Date.now()) {
+ this.manager.globalReset = Date.now() + 1e3;
+ this.manager.globalRemaining = this.manager.options.globalRequestsPerSecond;
+ }
+ this.manager.globalRemaining--;
+ const method = options.method ?? "get";
+ const res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries);
+ if (res === null) {
+ return this.runRequest(routeId, url, options, requestData, ++retries);
+ }
+ const status = res.status;
+ let retryAfter = 0;
+ const limit = res.headers.get("X-RateLimit-Limit");
+ const remaining = res.headers.get("X-RateLimit-Remaining");
+ const reset = res.headers.get("X-RateLimit-Reset-After");
+ const hash = res.headers.get("X-RateLimit-Bucket");
+ const retry = res.headers.get("Retry-After");
+ this.limit = limit ? Number(limit) : Number.POSITIVE_INFINITY;
+ this.remaining = remaining ? Number(remaining) : 1;
+ this.reset = reset ? Number(reset) * 1e3 + Date.now() + this.manager.options.offset : Date.now();
+ if (retry)
+ retryAfter = Number(retry) * 1e3 + this.manager.options.offset;
+ if (hash && hash !== this.hash) {
+ this.debug(["Received bucket hash update", ` Old Hash : ${this.hash}`, ` New Hash : ${hash}`].join("\n"));
+ this.manager.hashes.set(`${method}:${routeId.bucketRoute}`, { value: hash, lastAccess: Date.now() });
+ } else if (hash) {
+ const hashData = this.manager.hashes.get(`${method}:${routeId.bucketRoute}`);
+ if (hashData) {
+ hashData.lastAccess = Date.now();
+ }
+ }
+ let sublimitTimeout = null;
+ if (retryAfter > 0) {
+ if (res.headers.has("X-RateLimit-Global")) {
+ this.manager.globalRemaining = 0;
+ this.manager.globalReset = Date.now() + retryAfter;
+ } else if (!this.localLimited) {
+ sublimitTimeout = retryAfter;
+ }
+ }
+ if (status === 401 || status === 403 || status === 429) {
+ incrementInvalidCount(this.manager);
+ }
+ if (res.ok) {
+ return res;
+ } else if (status === 429) {
+ const isGlobal = this.globalLimited;
+ let limit2;
+ let timeout;
+ if (isGlobal) {
+ limit2 = this.manager.options.globalRequestsPerSecond;
+ timeout = this.manager.globalReset + this.manager.options.offset - Date.now();
+ } else {
+ limit2 = this.limit;
+ timeout = this.timeToReset;
+ }
+ await onRateLimit(this.manager, {
+ timeToReset: timeout,
+ limit: limit2,
+ method,
+ hash: this.hash,
+ url,
+ route: routeId.bucketRoute,
+ majorParameter: this.majorParameter,
+ global: isGlobal
+ });
+ this.debug(
+ [
+ "Encountered unexpected 429 rate limit",
+ ` Global : ${isGlobal.toString()}`,
+ ` Method : ${method}`,
+ ` URL : ${url}`,
+ ` Bucket : ${routeId.bucketRoute}`,
+ ` Major parameter: ${routeId.majorParameter}`,
+ ` Hash : ${this.hash}`,
+ ` Limit : ${limit2}`,
+ ` Retry After : ${retryAfter}ms`,
+ ` Sublimit : ${sublimitTimeout ? `${sublimitTimeout}ms` : "None"}`
+ ].join("\n")
+ );
+ if (sublimitTimeout) {
+ const firstSublimit = !this.#sublimitedQueue;
+ if (firstSublimit) {
+ this.#sublimitedQueue = new AsyncQueue();
+ void this.#sublimitedQueue.wait();
+ this.#asyncQueue.shift();
+ }
+ this.#sublimitPromise?.resolve();
+ this.#sublimitPromise = null;
+ await sleep(sublimitTimeout);
+ let resolve;
+ const promise = new Promise((res2) => resolve = res2);
+ this.#sublimitPromise = { promise, resolve };
+ if (firstSublimit) {
+ await this.#asyncQueue.wait();
+ this.#shiftSublimit = true;
+ }
+ }
+ return this.runRequest(routeId, url, options, requestData, retries);
+ } else {
+ const handled = await handleErrors(this.manager, res, method, url, requestData, retries);
+ if (handled === null) {
+ return this.runRequest(routeId, url, options, requestData, ++retries);
+ }
+ return handled;
+ }
+ }
+};
+
+// src/lib/REST.ts
+var REST = class _REST extends AsyncEventEmitter {
+ static {
+ __name(this, "REST");
+ }
+ /**
+ * The {@link https://undici.nodejs.org/#/docs/api/Agent | Agent} for all requests
+ * performed by this manager.
+ */
+ agent = null;
+ cdn;
+ /**
+ * The number of requests remaining in the global bucket
+ */
+ globalRemaining;
+ /**
+ * The promise used to wait out the global rate limit
+ */
+ globalDelay = null;
+ /**
+ * The timestamp at which the global bucket resets
+ */
+ globalReset = -1;
+ /**
+ * API bucket hashes that are cached from provided routes
+ */
+ hashes = new Collection();
+ /**
+ * Request handlers created from the bucket hash and the major parameters
+ */
+ handlers = new Collection();
+ #token = null;
+ hashTimer;
+ handlerTimer;
+ options;
+ constructor(options = {}) {
+ super();
+ this.cdn = new CDN(options.cdn ?? DefaultRestOptions.cdn);
+ this.options = { ...DefaultRestOptions, ...options };
+ this.options.offset = Math.max(0, this.options.offset);
+ this.globalRemaining = Math.max(1, this.options.globalRequestsPerSecond);
+ this.agent = options.agent ?? null;
+ this.setupSweepers();
+ }
+ setupSweepers() {
+ const validateMaxInterval = /* @__PURE__ */ __name((interval) => {
+ if (interval > 144e5) {
+ throw new Error("Cannot set an interval greater than 4 hours");
+ }
+ }, "validateMaxInterval");
+ if (this.options.hashSweepInterval !== 0 && this.options.hashSweepInterval !== Number.POSITIVE_INFINITY) {
+ validateMaxInterval(this.options.hashSweepInterval);
+ this.hashTimer = setInterval(() => {
+ const sweptHashes = new Collection();
+ const currentDate = Date.now();
+ this.hashes.sweep((val, key) => {
+ if (val.lastAccess === -1)
+ return false;
+ const shouldSweep = Math.floor(currentDate - val.lastAccess) > this.options.hashLifetime;
+ if (shouldSweep) {
+ sweptHashes.set(key, val);
+ this.emit("restDebug" /* Debug */, `Hash ${val.value} for ${key} swept due to lifetime being exceeded`);
+ }
+ return shouldSweep;
+ });
+ this.emit("hashSweep" /* HashSweep */, sweptHashes);
+ }, this.options.hashSweepInterval);
+ this.hashTimer.unref?.();
+ }
+ if (this.options.handlerSweepInterval !== 0 && this.options.handlerSweepInterval !== Number.POSITIVE_INFINITY) {
+ validateMaxInterval(this.options.handlerSweepInterval);
+ this.handlerTimer = setInterval(() => {
+ const sweptHandlers = new Collection();
+ this.handlers.sweep((val, key) => {
+ const { inactive } = val;
+ if (inactive) {
+ sweptHandlers.set(key, val);
+ this.emit("restDebug" /* Debug */, `Handler ${val.id} for ${key} swept due to being inactive`);
+ }
+ return inactive;
+ });
+ this.emit("handlerSweep" /* HandlerSweep */, sweptHandlers);
+ }, this.options.handlerSweepInterval);
+ this.handlerTimer.unref?.();
+ }
+ }
+ /**
+ * Runs a get request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async get(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "GET" /* Get */ });
+ }
+ /**
+ * Runs a delete request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async delete(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "DELETE" /* Delete */ });
+ }
+ /**
+ * Runs a post request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async post(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "POST" /* Post */ });
+ }
+ /**
+ * Runs a put request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async put(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "PUT" /* Put */ });
+ }
+ /**
+ * Runs a patch request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async patch(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "PATCH" /* Patch */ });
+ }
+ /**
+ * Runs a request from the api
+ *
+ * @param options - Request options
+ */
+ async request(options) {
+ const response = await this.queueRequest(options);
+ return parseResponse(response);
+ }
+ /**
+ * Sets the default agent to use for requests performed by this manager
+ *
+ * @param agent - The agent to use
+ */
+ setAgent(agent) {
+ this.agent = agent;
+ return this;
+ }
+ /**
+ * Sets the authorization token that should be used for requests
+ *
+ * @param token - The authorization token to use
+ */
+ setToken(token) {
+ this.#token = token;
+ return this;
+ }
+ /**
+ * Queues a request to be sent
+ *
+ * @param request - All the information needed to make a request
+ * @returns The response from the api request
+ */
+ async queueRequest(request2) {
+ const routeId = _REST.generateRouteData(request2.fullRoute, request2.method);
+ const hash = this.hashes.get(`${request2.method}:${routeId.bucketRoute}`) ?? {
+ value: `Global(${request2.method}:${routeId.bucketRoute})`,
+ lastAccess: -1
+ };
+ const handler = this.handlers.get(`${hash.value}:${routeId.majorParameter}`) ?? this.createHandler(hash.value, routeId.majorParameter);
+ const { url, fetchOptions } = await this.resolveRequest(request2);
+ return handler.queueRequest(routeId, url, fetchOptions, {
+ body: request2.body,
+ files: request2.files,
+ auth: request2.auth !== false,
+ signal: request2.signal
+ });
+ }
+ /**
+ * Creates a new rate limit handler from a hash, based on the hash and the major parameter
+ *
+ * @param hash - The hash for the route
+ * @param majorParameter - The major parameter for this handler
+ * @internal
+ */
+ createHandler(hash, majorParameter) {
+ const queue = majorParameter === BurstHandlerMajorIdKey ? new BurstHandler(this, hash, majorParameter) : new SequentialHandler(this, hash, majorParameter);
+ this.handlers.set(queue.id, queue);
+ return queue;
+ }
+ /**
+ * Formats the request data to a usable format for fetch
+ *
+ * @param request - The request data
+ */
+ async resolveRequest(request2) {
+ const { options } = this;
+ let query = "";
+ if (request2.query) {
+ const resolvedQuery = request2.query.toString();
+ if (resolvedQuery !== "") {
+ query = `?${resolvedQuery}`;
+ }
+ }
+ const headers = {
+ ...this.options.headers,
+ "User-Agent": `${DefaultUserAgent} ${options.userAgentAppendix}`.trim()
+ };
+ if (request2.auth !== false) {
+ if (!this.#token) {
+ throw new Error("Expected token to be set for this request, but none was present");
+ }
+ headers.Authorization = `${request2.authPrefix ?? this.options.authPrefix} ${this.#token}`;
+ }
+ if (request2.reason?.length) {
+ headers["X-Audit-Log-Reason"] = encodeURIComponent(request2.reason);
+ }
+ const url = `${options.api}${request2.versioned === false ? "" : `/v${options.version}`}${request2.fullRoute}${query}`;
+ let finalBody;
+ let additionalHeaders = {};
+ if (request2.files?.length) {
+ const formData = new FormData();
+ for (const [index, file] of request2.files.entries()) {
+ const fileKey = file.key ?? `files[${index}]`;
+ if (isBufferLike(file.data)) {
+ let contentType = file.contentType;
+ if (!contentType) {
+ const [parsedType] = filetypeinfo(file.data);
+ if (parsedType) {
+ contentType = OverwrittenMimeTypes[parsedType.mime] ?? parsedType.mime ?? "application/octet-stream";
+ }
+ }
+ formData.append(fileKey, new Blob([file.data], { type: contentType }), file.name);
+ } else {
+ formData.append(fileKey, new Blob([`${file.data}`], { type: file.contentType }), file.name);
+ }
+ }
+ if (request2.body != null) {
+ if (request2.appendToFormData) {
+ for (const [key, value] of Object.entries(request2.body)) {
+ formData.append(key, value);
+ }
+ } else {
+ formData.append("payload_json", JSON.stringify(request2.body));
+ }
+ }
+ finalBody = formData;
+ } else if (request2.body != null) {
+ if (request2.passThroughBody) {
+ finalBody = request2.body;
+ } else {
+ finalBody = JSON.stringify(request2.body);
+ additionalHeaders = { "Content-Type": "application/json" };
+ }
+ }
+ const method = request2.method.toUpperCase();
+ const fetchOptions = {
+ // Set body to null on get / head requests. This does not follow fetch spec (likely because it causes subtle bugs) but is aligned with what request was doing
+ body: ["GET", "HEAD"].includes(method) ? null : finalBody,
+ headers: { ...request2.headers, ...additionalHeaders, ...headers },
+ method,
+ // Prioritize setting an agent per request, use the agent for this instance otherwise.
+ dispatcher: request2.dispatcher ?? this.agent ?? void 0
+ };
+ return { url, fetchOptions };
+ }
+ /**
+ * Stops the hash sweeping interval
+ */
+ clearHashSweeper() {
+ clearInterval(this.hashTimer);
+ }
+ /**
+ * Stops the request handler sweeping interval
+ */
+ clearHandlerSweeper() {
+ clearInterval(this.handlerTimer);
+ }
+ /**
+ * Generates route data for an endpoint:method
+ *
+ * @param endpoint - The raw endpoint to generalize
+ * @param method - The HTTP method this endpoint is called without
+ * @internal
+ */
+ static generateRouteData(endpoint, method) {
+ if (endpoint.startsWith("/interactions/") && endpoint.endsWith("/callback")) {
+ return {
+ majorParameter: BurstHandlerMajorIdKey,
+ bucketRoute: "/interactions/:id/:token/callback",
+ original: endpoint
+ };
+ }
+ const majorIdMatch = /^\/(?:channels|guilds|webhooks)\/(\d{17,19})/.exec(endpoint);
+ const majorId = majorIdMatch?.[1] ?? "global";
+ const baseRoute = endpoint.replaceAll(/\d{17,19}/g, ":id").replace(/\/reactions\/(.*)/, "/reactions/:reaction");
+ let exceptions = "";
+ if (method === "DELETE" /* Delete */ && baseRoute === "/channels/:id/messages/:id") {
+ const id = /\d{17,19}$/.exec(endpoint)[0];
+ const timestamp = DiscordSnowflake.timestampFrom(id);
+ if (Date.now() - timestamp > 1e3 * 60 * 60 * 24 * 14) {
+ exceptions += "/Delete Old Message";
+ }
+ }
+ return {
+ majorParameter: majorId,
+ bucketRoute: baseRoute + exceptions,
+ original: endpoint
+ };
+ }
+};
+
+// src/shared.ts
+var version = "2.0.1";
+
+// src/index.ts
+globalThis.FormData ??= FormData2;
+globalThis.Blob ??= Blob2;
+setDefaultStrategy(shouldUseGlobalFetchAndWebSocket() ? fetch : makeRequest);
+export {
+ ALLOWED_EXTENSIONS,
+ ALLOWED_SIZES,
+ ALLOWED_STICKER_EXTENSIONS,
+ BurstHandlerMajorIdKey,
+ CDN,
+ DefaultRestOptions,
+ DefaultUserAgent,
+ DefaultUserAgentAppendix,
+ DiscordAPIError,
+ HTTPError,
+ OverwrittenMimeTypes,
+ REST,
+ RESTEvents,
+ RateLimitError,
+ RequestMethod,
+ calculateUserDefaultAvatarIndex,
+ makeURLSearchParams,
+ parseResponse,
+ version
+};
+//# sourceMappingURL=index.mjs.map \ No newline at end of file
diff --git a/node_modules/@discordjs/rest/dist/index.mjs.map b/node_modules/@discordjs/rest/dist/index.mjs.map
new file mode 100644
index 0000000..51a8dfd
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/index.mjs.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/index.ts","../src/environment.ts","../src/strategies/undiciRequest.ts","../src/lib/utils/constants.ts","../src/lib/CDN.ts","../src/lib/errors/DiscordAPIError.ts","../src/lib/errors/HTTPError.ts","../src/lib/errors/RateLimitError.ts","../src/lib/REST.ts","../src/lib/utils/types.ts","../src/lib/utils/utils.ts","../src/lib/handlers/Shared.ts","../src/lib/handlers/BurstHandler.ts","../src/lib/handlers/SequentialHandler.ts","../src/shared.ts"],"sourcesContent":["import { Blob } from 'node:buffer';\nimport { shouldUseGlobalFetchAndWebSocket } from '@discordjs/util';\nimport { FormData } from 'undici';\nimport { setDefaultStrategy } from './environment.js';\nimport { makeRequest } from './strategies/undiciRequest.js';\n\n// TODO(ckohen): remove once node engine req is bumped to > v18\n(globalThis as any).FormData ??= FormData;\nglobalThis.Blob ??= Blob;\n\nsetDefaultStrategy(shouldUseGlobalFetchAndWebSocket() ? fetch : makeRequest);\n\nexport * from './shared.js';\n","import type { RESTOptions } from './shared.js';\n\nlet defaultStrategy: RESTOptions['makeRequest'];\n\nexport function setDefaultStrategy(newStrategy: RESTOptions['makeRequest']) {\n\tdefaultStrategy = newStrategy;\n}\n\nexport function getDefaultStrategy() {\n\treturn defaultStrategy;\n}\n","import { STATUS_CODES } from 'node:http';\nimport { URLSearchParams } from 'node:url';\nimport { types } from 'node:util';\nimport { type RequestInit, request, Headers } from 'undici';\nimport type { ResponseLike } from '../shared.js';\n\nexport type RequestOptions = Exclude<Parameters<typeof request>[1], undefined>;\n\nexport async function makeRequest(url: string, init: RequestInit): Promise<ResponseLike> {\n\t// The cast is necessary because `headers` and `method` are narrower types in `undici.request`\n\t// our request path guarantees they are of acceptable type for `undici.request`\n\tconst options = {\n\t\t...init,\n\t\tbody: await resolveBody(init.body),\n\t} as RequestOptions;\n\tconst res = await request(url, options);\n\treturn {\n\t\tbody: res.body,\n\t\tasync arrayBuffer() {\n\t\t\treturn res.body.arrayBuffer();\n\t\t},\n\t\tasync json() {\n\t\t\treturn res.body.json();\n\t\t},\n\t\tasync text() {\n\t\t\treturn res.body.text();\n\t\t},\n\t\tget bodyUsed() {\n\t\t\treturn res.body.bodyUsed;\n\t\t},\n\t\theaders: new Headers(res.headers as Record<string, string[] | string>),\n\t\tstatus: res.statusCode,\n\t\tstatusText: STATUS_CODES[res.statusCode]!,\n\t\tok: res.statusCode >= 200 && res.statusCode < 300,\n\t};\n}\n\nexport async function resolveBody(body: RequestInit['body']): Promise<Exclude<RequestOptions['body'], undefined>> {\n\t// eslint-disable-next-line no-eq-null, eqeqeq\n\tif (body == null) {\n\t\treturn null;\n\t} else if (typeof body === 'string') {\n\t\treturn body;\n\t} else if (types.isUint8Array(body)) {\n\t\treturn body;\n\t} else if (types.isArrayBuffer(body)) {\n\t\treturn new Uint8Array(body);\n\t} else if (body instanceof URLSearchParams) {\n\t\treturn body.toString();\n\t} else if (body instanceof DataView) {\n\t\treturn new Uint8Array(body.buffer);\n\t} else if (body instanceof Blob) {\n\t\treturn new Uint8Array(await body.arrayBuffer());\n\t} else if (body instanceof FormData) {\n\t\treturn body;\n\t} else if ((body as Iterable<Uint8Array>)[Symbol.iterator]) {\n\t\tconst chunks = [...(body as Iterable<Uint8Array>)];\n\n\t\treturn Buffer.concat(chunks);\n\t} else if ((body as AsyncIterable<Uint8Array>)[Symbol.asyncIterator]) {\n\t\tconst chunks: Uint8Array[] = [];\n\n\t\tfor await (const chunk of body as AsyncIterable<Uint8Array>) {\n\t\t\tchunks.push(chunk);\n\t\t}\n\n\t\treturn Buffer.concat(chunks);\n\t}\n\n\tthrow new TypeError(`Unable to resolve body.`);\n}\n","import { getUserAgentAppendix } from '@discordjs/util';\nimport { APIVersion } from 'discord-api-types/v10';\nimport { getDefaultStrategy } from '../../environment.js';\nimport type { RESTOptions, ResponseLike } from './types.js';\n\nexport const DefaultUserAgent =\n\t`DiscordBot (https://discord.js.org, 2.0.1)` as `DiscordBot (https://discord.js.org, ${string})`;\n\n/**\n * The default string to append onto the user agent.\n */\nexport const DefaultUserAgentAppendix = getUserAgentAppendix();\n\nexport const DefaultRestOptions = {\n\tagent: null,\n\tapi: 'https://discord.com/api',\n\tauthPrefix: 'Bot',\n\tcdn: 'https://cdn.discordapp.com',\n\theaders: {},\n\tinvalidRequestWarningInterval: 0,\n\tglobalRequestsPerSecond: 50,\n\toffset: 50,\n\trejectOnRateLimit: null,\n\tretries: 3,\n\ttimeout: 15_000,\n\tuserAgentAppendix: DefaultUserAgentAppendix,\n\tversion: APIVersion,\n\thashSweepInterval: 14_400_000, // 4 Hours\n\thashLifetime: 86_400_000, // 24 Hours\n\thandlerSweepInterval: 3_600_000, // 1 Hour\n\tasync makeRequest(...args): Promise<ResponseLike> {\n\t\treturn getDefaultStrategy()(...args);\n\t},\n} as const satisfies Required<RESTOptions>;\n\n/**\n * The events that the REST manager emits\n */\nexport enum RESTEvents {\n\tDebug = 'restDebug',\n\tHandlerSweep = 'handlerSweep',\n\tHashSweep = 'hashSweep',\n\tInvalidRequestWarning = 'invalidRequestWarning',\n\tRateLimited = 'rateLimited',\n\tResponse = 'response',\n}\n\nexport const ALLOWED_EXTENSIONS = ['webp', 'png', 'jpg', 'jpeg', 'gif'] as const satisfies readonly string[];\nexport const ALLOWED_STICKER_EXTENSIONS = ['png', 'json', 'gif'] as const satisfies readonly string[];\nexport const ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1_024, 2_048, 4_096] as const satisfies readonly number[];\n\nexport type ImageExtension = (typeof ALLOWED_EXTENSIONS)[number];\nexport type StickerExtension = (typeof ALLOWED_STICKER_EXTENSIONS)[number];\nexport type ImageSize = (typeof ALLOWED_SIZES)[number];\n\nexport const OverwrittenMimeTypes = {\n\t// https://github.com/discordjs/discord.js/issues/8557\n\t'image/apng': 'image/png',\n} as const satisfies Readonly<Record<string, string>>;\n\nexport const BurstHandlerMajorIdKey = 'burst';\n","/* eslint-disable jsdoc/check-param-names */\nimport {\n\tALLOWED_EXTENSIONS,\n\tALLOWED_SIZES,\n\tALLOWED_STICKER_EXTENSIONS,\n\tDefaultRestOptions,\n\ttype ImageExtension,\n\ttype ImageSize,\n\ttype StickerExtension,\n} from './utils/constants.js';\n\n/**\n * The options used for image URLs\n */\nexport interface BaseImageURLOptions {\n\t/**\n\t * The extension to use for the image URL\n\t *\n\t * @defaultValue `'webp'`\n\t */\n\textension?: ImageExtension;\n\t/**\n\t * The size specified in the image URL\n\t */\n\tsize?: ImageSize;\n}\n\n/**\n * The options used for image URLs with animated content\n */\nexport interface ImageURLOptions extends BaseImageURLOptions {\n\t/**\n\t * Whether or not to prefer the static version of an image asset.\n\t */\n\tforceStatic?: boolean;\n}\n\n/**\n * The options to use when making a CDN URL\n */\nexport interface MakeURLOptions {\n\t/**\n\t * The allowed extensions that can be used\n\t */\n\tallowedExtensions?: readonly string[];\n\t/**\n\t * The extension to use for the image URL\n\t *\n\t * @defaultValue `'webp'`\n\t */\n\textension?: string | undefined;\n\t/**\n\t * The size specified in the image URL\n\t */\n\tsize?: ImageSize;\n}\n\n/**\n * The CDN link builder\n */\nexport class CDN {\n\tpublic constructor(private readonly base: string = DefaultRestOptions.cdn) {}\n\n\t/**\n\t * Generates an app asset URL for a client's asset.\n\t *\n\t * @param clientId - The client id that has the asset\n\t * @param assetHash - The hash provided by Discord for this asset\n\t * @param options - Optional options for the asset\n\t */\n\tpublic appAsset(clientId: string, assetHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/app-assets/${clientId}/${assetHash}`, options);\n\t}\n\n\t/**\n\t * Generates an app icon URL for a client's icon.\n\t *\n\t * @param clientId - The client id that has the icon\n\t * @param iconHash - The hash provided by Discord for this icon\n\t * @param options - Optional options for the icon\n\t */\n\tpublic appIcon(clientId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/app-icons/${clientId}/${iconHash}`, options);\n\t}\n\n\t/**\n\t * Generates an avatar URL, e.g. for a user or a webhook.\n\t *\n\t * @param id - The id that has the icon\n\t * @param avatarHash - The hash provided by Discord for this avatar\n\t * @param options - Optional options for the avatar\n\t */\n\tpublic avatar(id: string, avatarHash: string, options?: Readonly<ImageURLOptions>): string {\n\t\treturn this.dynamicMakeURL(`/avatars/${id}/${avatarHash}`, avatarHash, options);\n\t}\n\n\t/**\n\t * Generates a user avatar decoration URL.\n\t *\n\t * @param userId - The id of the user\n\t * @param userAvatarDecoration - The hash provided by Discord for this avatar decoration\n\t * @param options - Optional options for the avatar decoration\n\t */\n\tpublic avatarDecoration(\n\t\tuserId: string,\n\t\tuserAvatarDecoration: string,\n\t\toptions?: Readonly<BaseImageURLOptions>,\n\t): string {\n\t\treturn this.makeURL(`/avatar-decorations/${userId}/${userAvatarDecoration}`, options);\n\t}\n\n\t/**\n\t * Generates a banner URL, e.g. for a user or a guild.\n\t *\n\t * @param id - The id that has the banner splash\n\t * @param bannerHash - The hash provided by Discord for this banner\n\t * @param options - Optional options for the banner\n\t */\n\tpublic banner(id: string, bannerHash: string, options?: Readonly<ImageURLOptions>): string {\n\t\treturn this.dynamicMakeURL(`/banners/${id}/${bannerHash}`, bannerHash, options);\n\t}\n\n\t/**\n\t * Generates an icon URL for a channel, e.g. a group DM.\n\t *\n\t * @param channelId - The channel id that has the icon\n\t * @param iconHash - The hash provided by Discord for this channel\n\t * @param options - Optional options for the icon\n\t */\n\tpublic channelIcon(channelId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/channel-icons/${channelId}/${iconHash}`, options);\n\t}\n\n\t/**\n\t * Generates a default avatar URL\n\t *\n\t * @param index - The default avatar index\n\t * @remarks\n\t * To calculate the index for a user do `(userId >> 22) % 6`,\n\t * or `discriminator % 5` if they're using the legacy username system.\n\t */\n\tpublic defaultAvatar(index: number): string {\n\t\treturn this.makeURL(`/embed/avatars/${index}`, { extension: 'png' });\n\t}\n\n\t/**\n\t * Generates a discovery splash URL for a guild's discovery splash.\n\t *\n\t * @param guildId - The guild id that has the discovery splash\n\t * @param splashHash - The hash provided by Discord for this splash\n\t * @param options - Optional options for the splash\n\t */\n\tpublic discoverySplash(guildId: string, splashHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/discovery-splashes/${guildId}/${splashHash}`, options);\n\t}\n\n\t/**\n\t * Generates an emoji's URL for an emoji.\n\t *\n\t * @param emojiId - The emoji id\n\t * @param extension - The extension of the emoji\n\t */\n\tpublic emoji(emojiId: string, extension?: ImageExtension): string {\n\t\treturn this.makeURL(`/emojis/${emojiId}`, { extension });\n\t}\n\n\t/**\n\t * Generates a guild member avatar URL.\n\t *\n\t * @param guildId - The id of the guild\n\t * @param userId - The id of the user\n\t * @param avatarHash - The hash provided by Discord for this avatar\n\t * @param options - Optional options for the avatar\n\t */\n\tpublic guildMemberAvatar(\n\t\tguildId: string,\n\t\tuserId: string,\n\t\tavatarHash: string,\n\t\toptions?: Readonly<ImageURLOptions>,\n\t): string {\n\t\treturn this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/avatars/${avatarHash}`, avatarHash, options);\n\t}\n\n\t/**\n\t * Generates a guild member banner URL.\n\t *\n\t * @param guildId - The id of the guild\n\t * @param userId - The id of the user\n\t * @param bannerHash - The hash provided by Discord for this banner\n\t * @param options - Optional options for the banner\n\t */\n\tpublic guildMemberBanner(\n\t\tguildId: string,\n\t\tuserId: string,\n\t\tbannerHash: string,\n\t\toptions?: Readonly<ImageURLOptions>,\n\t): string {\n\t\treturn this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banner`, bannerHash, options);\n\t}\n\n\t/**\n\t * Generates an icon URL, e.g. for a guild.\n\t *\n\t * @param id - The id that has the icon splash\n\t * @param iconHash - The hash provided by Discord for this icon\n\t * @param options - Optional options for the icon\n\t */\n\tpublic icon(id: string, iconHash: string, options?: Readonly<ImageURLOptions>): string {\n\t\treturn this.dynamicMakeURL(`/icons/${id}/${iconHash}`, iconHash, options);\n\t}\n\n\t/**\n\t * Generates a URL for the icon of a role\n\t *\n\t * @param roleId - The id of the role that has the icon\n\t * @param roleIconHash - The hash provided by Discord for this role icon\n\t * @param options - Optional options for the role icon\n\t */\n\tpublic roleIcon(roleId: string, roleIconHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/role-icons/${roleId}/${roleIconHash}`, options);\n\t}\n\n\t/**\n\t * Generates a guild invite splash URL for a guild's invite splash.\n\t *\n\t * @param guildId - The guild id that has the invite splash\n\t * @param splashHash - The hash provided by Discord for this splash\n\t * @param options - Optional options for the splash\n\t */\n\tpublic splash(guildId: string, splashHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/splashes/${guildId}/${splashHash}`, options);\n\t}\n\n\t/**\n\t * Generates a sticker URL.\n\t *\n\t * @param stickerId - The sticker id\n\t * @param extension - The extension of the sticker\n\t * @privateRemarks\n\t * Stickers cannot have a `.webp` extension, so we default to a `.png`\n\t */\n\tpublic sticker(stickerId: string, extension: StickerExtension = 'png'): string {\n\t\treturn this.makeURL(`/stickers/${stickerId}`, { allowedExtensions: ALLOWED_STICKER_EXTENSIONS, extension });\n\t}\n\n\t/**\n\t * Generates a sticker pack banner URL.\n\t *\n\t * @param bannerId - The banner id\n\t * @param options - Optional options for the banner\n\t */\n\tpublic stickerPackBanner(bannerId: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/app-assets/710982414301790216/store/${bannerId}`, options);\n\t}\n\n\t/**\n\t * Generates a team icon URL for a team's icon.\n\t *\n\t * @param teamId - The team id that has the icon\n\t * @param iconHash - The hash provided by Discord for this icon\n\t * @param options - Optional options for the icon\n\t */\n\tpublic teamIcon(teamId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/team-icons/${teamId}/${iconHash}`, options);\n\t}\n\n\t/**\n\t * Generates a cover image for a guild scheduled event.\n\t *\n\t * @param scheduledEventId - The scheduled event id\n\t * @param coverHash - The hash provided by discord for this cover image\n\t * @param options - Optional options for the cover image\n\t */\n\tpublic guildScheduledEventCover(\n\t\tscheduledEventId: string,\n\t\tcoverHash: string,\n\t\toptions?: Readonly<BaseImageURLOptions>,\n\t): string {\n\t\treturn this.makeURL(`/guild-events/${scheduledEventId}/${coverHash}`, options);\n\t}\n\n\t/**\n\t * Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.\n\t *\n\t * @param route - The base cdn route\n\t * @param hash - The hash provided by Discord for this icon\n\t * @param options - Optional options for the link\n\t */\n\tprivate dynamicMakeURL(\n\t\troute: string,\n\t\thash: string,\n\t\t{ forceStatic = false, ...options }: Readonly<ImageURLOptions> = {},\n\t): string {\n\t\treturn this.makeURL(route, !forceStatic && hash.startsWith('a_') ? { ...options, extension: 'gif' } : options);\n\t}\n\n\t/**\n\t * Constructs the URL for the resource\n\t *\n\t * @param route - The base cdn route\n\t * @param options - The extension/size options for the link\n\t */\n\tprivate makeURL(\n\t\troute: string,\n\t\t{ allowedExtensions = ALLOWED_EXTENSIONS, extension = 'webp', size }: Readonly<MakeURLOptions> = {},\n\t): string {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\textension = String(extension).toLowerCase();\n\n\t\tif (!allowedExtensions.includes(extension)) {\n\t\t\tthrow new RangeError(`Invalid extension provided: ${extension}\\nMust be one of: ${allowedExtensions.join(', ')}`);\n\t\t}\n\n\t\tif (size && !ALLOWED_SIZES.includes(size)) {\n\t\t\tthrow new RangeError(`Invalid size provided: ${size}\\nMust be one of: ${ALLOWED_SIZES.join(', ')}`);\n\t\t}\n\n\t\tconst url = new URL(`${this.base}${route}.${extension}`);\n\n\t\tif (size) {\n\t\t\turl.searchParams.set('size', String(size));\n\t\t}\n\n\t\treturn url.toString();\n\t}\n}\n","import type { InternalRequest, RawFile } from '../utils/types.js';\n\ninterface DiscordErrorFieldInformation {\n\tcode: string;\n\tmessage: string;\n}\n\ninterface DiscordErrorGroupWrapper {\n\t_errors: DiscordError[];\n}\n\ntype DiscordError = DiscordErrorFieldInformation | DiscordErrorGroupWrapper | string | { [k: string]: DiscordError };\n\nexport interface DiscordErrorData {\n\tcode: number;\n\terrors?: DiscordError;\n\tmessage: string;\n}\n\nexport interface OAuthErrorData {\n\terror: string;\n\terror_description?: string;\n}\n\nexport interface RequestBody {\n\tfiles: RawFile[] | undefined;\n\tjson: unknown | undefined;\n}\n\nfunction isErrorGroupWrapper(error: DiscordError): error is DiscordErrorGroupWrapper {\n\treturn Reflect.has(error as Record<string, unknown>, '_errors');\n}\n\nfunction isErrorResponse(error: DiscordError): error is DiscordErrorFieldInformation {\n\treturn typeof Reflect.get(error as Record<string, unknown>, 'message') === 'string';\n}\n\n/**\n * Represents an API error returned by Discord\n */\nexport class DiscordAPIError extends Error {\n\tpublic requestBody: RequestBody;\n\n\t/**\n\t * @param rawError - The error reported by Discord\n\t * @param code - The error code reported by Discord\n\t * @param status - The status code of the response\n\t * @param method - The method of the request that erred\n\t * @param url - The url of the request that erred\n\t * @param bodyData - The unparsed data for the request that errored\n\t */\n\tpublic constructor(\n\t\tpublic rawError: DiscordErrorData | OAuthErrorData,\n\t\tpublic code: number | string,\n\t\tpublic status: number,\n\t\tpublic method: string,\n\t\tpublic url: string,\n\t\tbodyData: Pick<InternalRequest, 'body' | 'files'>,\n\t) {\n\t\tsuper(DiscordAPIError.getMessage(rawError));\n\n\t\tthis.requestBody = { files: bodyData.files, json: bodyData.body };\n\t}\n\n\t/**\n\t * The name of the error\n\t */\n\tpublic override get name(): string {\n\t\treturn `${DiscordAPIError.name}[${this.code}]`;\n\t}\n\n\tprivate static getMessage(error: DiscordErrorData | OAuthErrorData) {\n\t\tlet flattened = '';\n\t\tif ('code' in error) {\n\t\t\tif (error.errors) {\n\t\t\t\tflattened = [...this.flattenDiscordError(error.errors)].join('\\n');\n\t\t\t}\n\n\t\t\treturn error.message && flattened\n\t\t\t\t? `${error.message}\\n${flattened}`\n\t\t\t\t: error.message || flattened || 'Unknown Error';\n\t\t}\n\n\t\treturn error.error_description ?? 'No Description';\n\t}\n\n\tprivate static *flattenDiscordError(obj: DiscordError, key = ''): IterableIterator<string> {\n\t\tif (isErrorResponse(obj)) {\n\t\t\treturn yield `${key.length ? `${key}[${obj.code}]` : `${obj.code}`}: ${obj.message}`.trim();\n\t\t}\n\n\t\tfor (const [otherKey, val] of Object.entries(obj)) {\n\t\t\tconst nextKey = otherKey.startsWith('_')\n\t\t\t\t? key\n\t\t\t\t: key\n\t\t\t\t? Number.isNaN(Number(otherKey))\n\t\t\t\t\t? `${key}.${otherKey}`\n\t\t\t\t\t: `${key}[${otherKey}]`\n\t\t\t\t: otherKey;\n\n\t\t\tif (typeof val === 'string') {\n\t\t\t\tyield val;\n\t\t\t} else if (isErrorGroupWrapper(val)) {\n\t\t\t\tfor (const error of val._errors) {\n\t\t\t\t\tyield* this.flattenDiscordError(error, nextKey);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tyield* this.flattenDiscordError(val, nextKey);\n\t\t\t}\n\t\t}\n\t}\n}\n","import type { InternalRequest } from '../utils/types.js';\nimport type { RequestBody } from './DiscordAPIError.js';\n\n/**\n * Represents a HTTP error\n */\nexport class HTTPError extends Error {\n\tpublic requestBody: RequestBody;\n\n\tpublic override name = HTTPError.name;\n\n\t/**\n\t * @param status - The status code of the response\n\t * @param statusText - The status text of the response\n\t * @param method - The method of the request that erred\n\t * @param url - The url of the request that erred\n\t * @param bodyData - The unparsed data for the request that errored\n\t */\n\tpublic constructor(\n\t\tpublic status: number,\n\t\tstatusText: string,\n\t\tpublic method: string,\n\t\tpublic url: string,\n\t\tbodyData: Pick<InternalRequest, 'body' | 'files'>,\n\t) {\n\t\tsuper(statusText);\n\t\tthis.requestBody = { files: bodyData.files, json: bodyData.body };\n\t}\n}\n","import type { RateLimitData } from '../utils/types.js';\n\nexport class RateLimitError extends Error implements RateLimitData {\n\tpublic timeToReset: number;\n\n\tpublic limit: number;\n\n\tpublic method: string;\n\n\tpublic hash: string;\n\n\tpublic url: string;\n\n\tpublic route: string;\n\n\tpublic majorParameter: string;\n\n\tpublic global: boolean;\n\n\tpublic constructor({ timeToReset, limit, method, hash, url, route, majorParameter, global }: RateLimitData) {\n\t\tsuper();\n\t\tthis.timeToReset = timeToReset;\n\t\tthis.limit = limit;\n\t\tthis.method = method;\n\t\tthis.hash = hash;\n\t\tthis.url = url;\n\t\tthis.route = route;\n\t\tthis.majorParameter = majorParameter;\n\t\tthis.global = global;\n\t}\n\n\t/**\n\t * The name of the error\n\t */\n\tpublic override get name(): string {\n\t\treturn `${RateLimitError.name}[${this.route}]`;\n\t}\n}\n","import { Collection } from '@discordjs/collection';\nimport { DiscordSnowflake } from '@sapphire/snowflake';\nimport { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';\nimport { filetypeinfo } from 'magic-bytes.js';\nimport type { RequestInit, BodyInit, Dispatcher } from 'undici';\nimport { CDN } from './CDN.js';\nimport { BurstHandler } from './handlers/BurstHandler.js';\nimport { SequentialHandler } from './handlers/SequentialHandler.js';\nimport type { IHandler } from './interfaces/Handler.js';\nimport {\n\tBurstHandlerMajorIdKey,\n\tDefaultRestOptions,\n\tDefaultUserAgent,\n\tOverwrittenMimeTypes,\n\tRESTEvents,\n} from './utils/constants.js';\nimport { RequestMethod } from './utils/types.js';\nimport type {\n\tRESTOptions,\n\tResponseLike,\n\tRestEventsMap,\n\tHashData,\n\tInternalRequest,\n\tRouteLike,\n\tRequestHeaders,\n\tRouteData,\n\tRequestData,\n} from './utils/types.js';\nimport { isBufferLike, parseResponse } from './utils/utils.js';\n\n/**\n * Represents the class that manages handlers for endpoints\n */\nexport class REST extends AsyncEventEmitter<RestEventsMap> {\n\t/**\n\t * The {@link https://undici.nodejs.org/#/docs/api/Agent | Agent} for all requests\n\t * performed by this manager.\n\t */\n\tpublic agent: Dispatcher | null = null;\n\n\tpublic readonly cdn: CDN;\n\n\t/**\n\t * The number of requests remaining in the global bucket\n\t */\n\tpublic globalRemaining: number;\n\n\t/**\n\t * The promise used to wait out the global rate limit\n\t */\n\tpublic globalDelay: Promise<void> | null = null;\n\n\t/**\n\t * The timestamp at which the global bucket resets\n\t */\n\tpublic globalReset = -1;\n\n\t/**\n\t * API bucket hashes that are cached from provided routes\n\t */\n\tpublic readonly hashes = new Collection<string, HashData>();\n\n\t/**\n\t * Request handlers created from the bucket hash and the major parameters\n\t */\n\tpublic readonly handlers = new Collection<string, IHandler>();\n\n\t#token: string | null = null;\n\n\tprivate hashTimer!: NodeJS.Timer | number;\n\n\tprivate handlerTimer!: NodeJS.Timer | number;\n\n\tpublic readonly options: RESTOptions;\n\n\tpublic constructor(options: Partial<RESTOptions> = {}) {\n\t\tsuper();\n\t\tthis.cdn = new CDN(options.cdn ?? DefaultRestOptions.cdn);\n\t\tthis.options = { ...DefaultRestOptions, ...options };\n\t\tthis.options.offset = Math.max(0, this.options.offset);\n\t\tthis.globalRemaining = Math.max(1, this.options.globalRequestsPerSecond);\n\t\tthis.agent = options.agent ?? null;\n\n\t\t// Start sweepers\n\t\tthis.setupSweepers();\n\t}\n\n\tprivate setupSweepers() {\n\t\t// eslint-disable-next-line unicorn/consistent-function-scoping\n\t\tconst validateMaxInterval = (interval: number) => {\n\t\t\tif (interval > 14_400_000) {\n\t\t\t\tthrow new Error('Cannot set an interval greater than 4 hours');\n\t\t\t}\n\t\t};\n\n\t\tif (this.options.hashSweepInterval !== 0 && this.options.hashSweepInterval !== Number.POSITIVE_INFINITY) {\n\t\t\tvalidateMaxInterval(this.options.hashSweepInterval);\n\t\t\tthis.hashTimer = setInterval(() => {\n\t\t\t\tconst sweptHashes = new Collection<string, HashData>();\n\t\t\t\tconst currentDate = Date.now();\n\n\t\t\t\t// Begin sweeping hash based on lifetimes\n\t\t\t\tthis.hashes.sweep((val, key) => {\n\t\t\t\t\t// `-1` indicates a global hash\n\t\t\t\t\tif (val.lastAccess === -1) return false;\n\n\t\t\t\t\t// Check if lifetime has been exceeded\n\t\t\t\t\tconst shouldSweep = Math.floor(currentDate - val.lastAccess) > this.options.hashLifetime;\n\n\t\t\t\t\t// Add hash to collection of swept hashes\n\t\t\t\t\tif (shouldSweep) {\n\t\t\t\t\t\t// Add to swept hashes\n\t\t\t\t\t\tsweptHashes.set(key, val);\n\n\t\t\t\t\t\t// Emit debug information\n\t\t\t\t\t\tthis.emit(RESTEvents.Debug, `Hash ${val.value} for ${key} swept due to lifetime being exceeded`);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn shouldSweep;\n\t\t\t\t});\n\n\t\t\t\t// Fire event\n\t\t\t\tthis.emit(RESTEvents.HashSweep, sweptHashes);\n\t\t\t}, this.options.hashSweepInterval);\n\n\t\t\tthis.hashTimer.unref?.();\n\t\t}\n\n\t\tif (this.options.handlerSweepInterval !== 0 && this.options.handlerSweepInterval !== Number.POSITIVE_INFINITY) {\n\t\t\tvalidateMaxInterval(this.options.handlerSweepInterval);\n\t\t\tthis.handlerTimer = setInterval(() => {\n\t\t\t\tconst sweptHandlers = new Collection<string, IHandler>();\n\n\t\t\t\t// Begin sweeping handlers based on activity\n\t\t\t\tthis.handlers.sweep((val, key) => {\n\t\t\t\t\tconst { inactive } = val;\n\n\t\t\t\t\t// Collect inactive handlers\n\t\t\t\t\tif (inactive) {\n\t\t\t\t\t\tsweptHandlers.set(key, val);\n\t\t\t\t\t\tthis.emit(RESTEvents.Debug, `Handler ${val.id} for ${key} swept due to being inactive`);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn inactive;\n\t\t\t\t});\n\n\t\t\t\t// Fire event\n\t\t\t\tthis.emit(RESTEvents.HandlerSweep, sweptHandlers);\n\t\t\t}, this.options.handlerSweepInterval);\n\n\t\t\tthis.handlerTimer.unref?.();\n\t\t}\n\t}\n\n\t/**\n\t * Runs a get request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async get(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Get });\n\t}\n\n\t/**\n\t * Runs a delete request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async delete(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Delete });\n\t}\n\n\t/**\n\t * Runs a post request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async post(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Post });\n\t}\n\n\t/**\n\t * Runs a put request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async put(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Put });\n\t}\n\n\t/**\n\t * Runs a patch request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async patch(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Patch });\n\t}\n\n\t/**\n\t * Runs a request from the api\n\t *\n\t * @param options - Request options\n\t */\n\tpublic async request(options: InternalRequest) {\n\t\tconst response = await this.queueRequest(options);\n\t\treturn parseResponse(response);\n\t}\n\n\t/**\n\t * Sets the default agent to use for requests performed by this manager\n\t *\n\t * @param agent - The agent to use\n\t */\n\tpublic setAgent(agent: Dispatcher) {\n\t\tthis.agent = agent;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the authorization token that should be used for requests\n\t *\n\t * @param token - The authorization token to use\n\t */\n\tpublic setToken(token: string) {\n\t\tthis.#token = token;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Queues a request to be sent\n\t *\n\t * @param request - All the information needed to make a request\n\t * @returns The response from the api request\n\t */\n\tpublic async queueRequest(request: InternalRequest): Promise<ResponseLike> {\n\t\t// Generalize the endpoint to its route data\n\t\tconst routeId = REST.generateRouteData(request.fullRoute, request.method);\n\t\t// Get the bucket hash for the generic route, or point to a global route otherwise\n\t\tconst hash = this.hashes.get(`${request.method}:${routeId.bucketRoute}`) ?? {\n\t\t\tvalue: `Global(${request.method}:${routeId.bucketRoute})`,\n\t\t\tlastAccess: -1,\n\t\t};\n\n\t\t// Get the request handler for the obtained hash, with its major parameter\n\t\tconst handler =\n\t\t\tthis.handlers.get(`${hash.value}:${routeId.majorParameter}`) ??\n\t\t\tthis.createHandler(hash.value, routeId.majorParameter);\n\n\t\t// Resolve the request into usable fetch options\n\t\tconst { url, fetchOptions } = await this.resolveRequest(request);\n\n\t\t// Queue the request\n\t\treturn handler.queueRequest(routeId, url, fetchOptions, {\n\t\t\tbody: request.body,\n\t\t\tfiles: request.files,\n\t\t\tauth: request.auth !== false,\n\t\t\tsignal: request.signal,\n\t\t});\n\t}\n\n\t/**\n\t * Creates a new rate limit handler from a hash, based on the hash and the major parameter\n\t *\n\t * @param hash - The hash for the route\n\t * @param majorParameter - The major parameter for this handler\n\t * @internal\n\t */\n\tprivate createHandler(hash: string, majorParameter: string) {\n\t\t// Create the async request queue to handle requests\n\t\tconst queue =\n\t\t\tmajorParameter === BurstHandlerMajorIdKey\n\t\t\t\t? new BurstHandler(this, hash, majorParameter)\n\t\t\t\t: new SequentialHandler(this, hash, majorParameter);\n\t\t// Save the queue based on its id\n\t\tthis.handlers.set(queue.id, queue);\n\n\t\treturn queue;\n\t}\n\n\t/**\n\t * Formats the request data to a usable format for fetch\n\t *\n\t * @param request - The request data\n\t */\n\tprivate async resolveRequest(request: InternalRequest): Promise<{ fetchOptions: RequestInit; url: string }> {\n\t\tconst { options } = this;\n\n\t\tlet query = '';\n\n\t\t// If a query option is passed, use it\n\t\tif (request.query) {\n\t\t\tconst resolvedQuery = request.query.toString();\n\t\t\tif (resolvedQuery !== '') {\n\t\t\t\tquery = `?${resolvedQuery}`;\n\t\t\t}\n\t\t}\n\n\t\t// Create the required headers\n\t\tconst headers: RequestHeaders = {\n\t\t\t...this.options.headers,\n\t\t\t'User-Agent': `${DefaultUserAgent} ${options.userAgentAppendix}`.trim(),\n\t\t};\n\n\t\t// If this request requires authorization (allowing non-\"authorized\" requests for webhooks)\n\t\tif (request.auth !== false) {\n\t\t\t// If we haven't received a token, throw an error\n\t\t\tif (!this.#token) {\n\t\t\t\tthrow new Error('Expected token to be set for this request, but none was present');\n\t\t\t}\n\n\t\t\theaders.Authorization = `${request.authPrefix ?? this.options.authPrefix} ${this.#token}`;\n\t\t}\n\n\t\t// If a reason was set, set it's appropriate header\n\t\tif (request.reason?.length) {\n\t\t\theaders['X-Audit-Log-Reason'] = encodeURIComponent(request.reason);\n\t\t}\n\n\t\t// Format the full request URL (api base, optional version, endpoint, optional querystring)\n\t\tconst url = `${options.api}${request.versioned === false ? '' : `/v${options.version}`}${\n\t\t\trequest.fullRoute\n\t\t}${query}`;\n\n\t\tlet finalBody: RequestInit['body'];\n\t\tlet additionalHeaders: Record<string, string> = {};\n\n\t\tif (request.files?.length) {\n\t\t\tconst formData = new FormData();\n\n\t\t\t// Attach all files to the request\n\t\t\tfor (const [index, file] of request.files.entries()) {\n\t\t\t\tconst fileKey = file.key ?? `files[${index}]`;\n\n\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/FormData/append#parameters\n\t\t\t\t// FormData.append only accepts a string or Blob.\n\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob#parameters\n\t\t\t\t// The Blob constructor accepts TypedArray/ArrayBuffer, strings, and Blobs.\n\t\t\t\tif (isBufferLike(file.data)) {\n\t\t\t\t\t// Try to infer the content type from the buffer if one isn't passed\n\t\t\t\t\tlet contentType = file.contentType;\n\n\t\t\t\t\tif (!contentType) {\n\t\t\t\t\t\tconst [parsedType] = filetypeinfo(file.data);\n\n\t\t\t\t\t\tif (parsedType) {\n\t\t\t\t\t\t\tcontentType =\n\t\t\t\t\t\t\t\tOverwrittenMimeTypes[parsedType.mime as keyof typeof OverwrittenMimeTypes] ??\n\t\t\t\t\t\t\t\tparsedType.mime ??\n\t\t\t\t\t\t\t\t'application/octet-stream';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tformData.append(fileKey, new Blob([file.data], { type: contentType }), file.name);\n\t\t\t\t} else {\n\t\t\t\t\tformData.append(fileKey, new Blob([`${file.data}`], { type: file.contentType }), file.name);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If a JSON body was added as well, attach it to the form data, using payload_json unless otherwise specified\n\t\t\t// eslint-disable-next-line no-eq-null, eqeqeq\n\t\t\tif (request.body != null) {\n\t\t\t\tif (request.appendToFormData) {\n\t\t\t\t\tfor (const [key, value] of Object.entries(request.body as Record<string, unknown>)) {\n\t\t\t\t\t\tformData.append(key, value);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tformData.append('payload_json', JSON.stringify(request.body));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set the final body to the form data\n\t\t\tfinalBody = formData;\n\n\t\t\t// eslint-disable-next-line no-eq-null, eqeqeq\n\t\t} else if (request.body != null) {\n\t\t\tif (request.passThroughBody) {\n\t\t\t\tfinalBody = request.body as BodyInit;\n\t\t\t} else {\n\t\t\t\t// Stringify the JSON data\n\t\t\t\tfinalBody = JSON.stringify(request.body);\n\t\t\t\t// Set the additional headers to specify the content-type\n\t\t\t\tadditionalHeaders = { 'Content-Type': 'application/json' };\n\t\t\t}\n\t\t}\n\n\t\tconst method = request.method.toUpperCase();\n\n\t\t// The non null assertions in the following block are due to exactOptionalPropertyTypes, they have been tested to work with undefined\n\t\tconst fetchOptions: RequestInit = {\n\t\t\t// Set body to null on get / head requests. This does not follow fetch spec (likely because it causes subtle bugs) but is aligned with what request was doing\n\t\t\tbody: ['GET', 'HEAD'].includes(method) ? null : finalBody!,\n\t\t\theaders: { ...request.headers, ...additionalHeaders, ...headers } as Record<string, string>,\n\t\t\tmethod,\n\t\t\t// Prioritize setting an agent per request, use the agent for this instance otherwise.\n\t\t\tdispatcher: request.dispatcher ?? this.agent ?? undefined!,\n\t\t};\n\n\t\treturn { url, fetchOptions };\n\t}\n\n\t/**\n\t * Stops the hash sweeping interval\n\t */\n\tpublic clearHashSweeper() {\n\t\tclearInterval(this.hashTimer);\n\t}\n\n\t/**\n\t * Stops the request handler sweeping interval\n\t */\n\tpublic clearHandlerSweeper() {\n\t\tclearInterval(this.handlerTimer);\n\t}\n\n\t/**\n\t * Generates route data for an endpoint:method\n\t *\n\t * @param endpoint - The raw endpoint to generalize\n\t * @param method - The HTTP method this endpoint is called without\n\t * @internal\n\t */\n\tprivate static generateRouteData(endpoint: RouteLike, method: RequestMethod): RouteData {\n\t\tif (endpoint.startsWith('/interactions/') && endpoint.endsWith('/callback')) {\n\t\t\treturn {\n\t\t\t\tmajorParameter: BurstHandlerMajorIdKey,\n\t\t\t\tbucketRoute: '/interactions/:id/:token/callback',\n\t\t\t\toriginal: endpoint,\n\t\t\t};\n\t\t}\n\n\t\tconst majorIdMatch = /^\\/(?:channels|guilds|webhooks)\\/(\\d{17,19})/.exec(endpoint);\n\n\t\t// Get the major id for this route - global otherwise\n\t\tconst majorId = majorIdMatch?.[1] ?? 'global';\n\n\t\tconst baseRoute = endpoint\n\t\t\t// Strip out all ids\n\t\t\t.replaceAll(/\\d{17,19}/g, ':id')\n\t\t\t// Strip out reaction as they fall under the same bucket\n\t\t\t.replace(/\\/reactions\\/(.*)/, '/reactions/:reaction');\n\n\t\tlet exceptions = '';\n\n\t\t// Hard-Code Old Message Deletion Exception (2 week+ old messages are a different bucket)\n\t\t// https://github.com/discord/discord-api-docs/issues/1295\n\t\tif (method === RequestMethod.Delete && baseRoute === '/channels/:id/messages/:id') {\n\t\t\tconst id = /\\d{17,19}$/.exec(endpoint)![0]!;\n\t\t\tconst timestamp = DiscordSnowflake.timestampFrom(id);\n\t\t\tif (Date.now() - timestamp > 1_000 * 60 * 60 * 24 * 14) {\n\t\t\t\texceptions += '/Delete Old Message';\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tmajorParameter: majorId,\n\t\t\tbucketRoute: baseRoute + exceptions,\n\t\t\toriginal: endpoint,\n\t\t};\n\t}\n}\n","import type { Readable } from 'node:stream';\nimport type { ReadableStream } from 'node:stream/web';\nimport type { Collection } from '@discordjs/collection';\nimport type { Agent, Dispatcher, RequestInit, BodyInit, Response } from 'undici';\nimport type { IHandler } from '../interfaces/Handler.js';\n\nexport interface RestEvents {\n\thandlerSweep: [sweptHandlers: Collection<string, IHandler>];\n\thashSweep: [sweptHashes: Collection<string, HashData>];\n\tinvalidRequestWarning: [invalidRequestInfo: InvalidRequestWarningData];\n\trateLimited: [rateLimitInfo: RateLimitData];\n\tresponse: [request: APIRequest, response: ResponseLike];\n\trestDebug: [info: string];\n}\n\nexport type RestEventsMap = {\n\t[K in keyof RestEvents]: RestEvents[K];\n};\n\n/**\n * Options to be passed when creating the REST instance\n */\nexport interface RESTOptions {\n\t/**\n\t * The agent to set globally\n\t */\n\tagent: Dispatcher | null;\n\t/**\n\t * The base api path, without version\n\t *\n\t * @defaultValue `'https://discord.com/api'`\n\t */\n\tapi: string;\n\t/**\n\t * The authorization prefix to use for requests, useful if you want to use\n\t * bearer tokens\n\t *\n\t * @defaultValue `'Bot'`\n\t */\n\tauthPrefix: 'Bearer' | 'Bot';\n\t/**\n\t * The cdn path\n\t *\n\t * @defaultValue `'https://cdn.discordapp.com'`\n\t */\n\tcdn: string;\n\t/**\n\t * How many requests to allow sending per second (Infinity for unlimited, 50 for the standard global limit used by Discord)\n\t *\n\t * @defaultValue `50`\n\t */\n\tglobalRequestsPerSecond: number;\n\t/**\n\t * The amount of time in milliseconds that passes between each hash sweep. (defaults to 1h)\n\t *\n\t * @defaultValue `3_600_000`\n\t */\n\thandlerSweepInterval: number;\n\t/**\n\t * The maximum amount of time a hash can exist in milliseconds without being hit with a request (defaults to 24h)\n\t *\n\t * @defaultValue `86_400_000`\n\t */\n\thashLifetime: number;\n\t/**\n\t * The amount of time in milliseconds that passes between each hash sweep. (defaults to 4h)\n\t *\n\t * @defaultValue `14_400_000`\n\t */\n\thashSweepInterval: number;\n\t/**\n\t * Additional headers to send for all API requests\n\t *\n\t * @defaultValue `{}`\n\t */\n\theaders: Record<string, string>;\n\t/**\n\t * The number of invalid REST requests (those that return 401, 403, or 429) in a 10 minute window between emitted warnings (0 for no warnings).\n\t * That is, if set to 500, warnings will be emitted at invalid request number 500, 1000, 1500, and so on.\n\t *\n\t * @defaultValue `0`\n\t */\n\tinvalidRequestWarningInterval: number;\n\t/**\n\t * The method called to perform the actual HTTP request given a url and web `fetch` options\n\t * For example, to use global fetch, simply provide `makeRequest: fetch`\n\t */\n\tmakeRequest(url: string, init: RequestInit): Promise<ResponseLike>;\n\t/**\n\t * The extra offset to add to rate limits in milliseconds\n\t *\n\t * @defaultValue `50`\n\t */\n\toffset: number;\n\t/**\n\t * Determines how rate limiting and pre-emptive throttling should be handled.\n\t * When an array of strings, each element is treated as a prefix for the request route\n\t * (e.g. `/channels` to match any route starting with `/channels` such as `/channels/:id/messages`)\n\t * for which to throw {@link RateLimitError}s. All other request routes will be queued normally\n\t *\n\t * @defaultValue `null`\n\t */\n\trejectOnRateLimit: RateLimitQueueFilter | string[] | null;\n\t/**\n\t * The number of retries for errors with the 500 code, or errors\n\t * that timeout\n\t *\n\t * @defaultValue `3`\n\t */\n\tretries: number;\n\t/**\n\t * The time to wait in milliseconds before a request is aborted\n\t *\n\t * @defaultValue `15_000`\n\t */\n\ttimeout: number;\n\t/**\n\t * Extra information to add to the user agent\n\t *\n\t * @defaultValue DefaultUserAgentAppendix\n\t */\n\tuserAgentAppendix: string;\n\t/**\n\t * The version of the API to use\n\t *\n\t * @defaultValue `'10'`\n\t */\n\tversion: string;\n}\n\n/**\n * Data emitted on `RESTEvents.RateLimited`\n */\nexport interface RateLimitData {\n\t/**\n\t * Whether the rate limit that was reached was the global limit\n\t */\n\tglobal: boolean;\n\t/**\n\t * The bucket hash for this request\n\t */\n\thash: string;\n\t/**\n\t * The amount of requests we can perform before locking requests\n\t */\n\tlimit: number;\n\t/**\n\t * The major parameter of the route\n\t *\n\t * For example, in `/channels/x`, this will be `x`.\n\t * If there is no major parameter (e.g: `/bot/gateway`) this will be `global`.\n\t */\n\tmajorParameter: string;\n\t/**\n\t * The HTTP method being performed\n\t */\n\tmethod: string;\n\t/**\n\t * The route being hit in this request\n\t */\n\troute: string;\n\t/**\n\t * The time, in milliseconds, until the request-lock is reset\n\t */\n\ttimeToReset: number;\n\t/**\n\t * The full URL for this request\n\t */\n\turl: string;\n}\n\n/**\n * A function that determines whether the rate limit hit should throw an Error\n */\nexport type RateLimitQueueFilter = (rateLimitData: RateLimitData) => Promise<boolean> | boolean;\n\nexport interface APIRequest {\n\t/**\n\t * The data that was used to form the body of this request\n\t */\n\tdata: HandlerRequestData;\n\t/**\n\t * The HTTP method used in this request\n\t */\n\tmethod: string;\n\t/**\n\t * Additional HTTP options for this request\n\t */\n\toptions: RequestInit;\n\t/**\n\t * The full path used to make the request\n\t */\n\tpath: RouteLike;\n\t/**\n\t * The number of times this request has been attempted\n\t */\n\tretries: number;\n\t/**\n\t * The API route identifying the ratelimit for this request\n\t */\n\troute: string;\n}\n\nexport interface ResponseLike\n\textends Pick<Response, 'arrayBuffer' | 'bodyUsed' | 'headers' | 'json' | 'ok' | 'status' | 'statusText' | 'text'> {\n\tbody: Readable | ReadableStream | null;\n}\n\nexport interface InvalidRequestWarningData {\n\t/**\n\t * Number of invalid requests that have been made in the window\n\t */\n\tcount: number;\n\t/**\n\t * Time in milliseconds remaining before the count resets\n\t */\n\tremainingTime: number;\n}\n\n/**\n * Represents a file to be added to the request\n */\nexport interface RawFile {\n\t/**\n\t * Content-Type of the file\n\t */\n\tcontentType?: string;\n\t/**\n\t * The actual data for the file\n\t */\n\tdata: Buffer | Uint8Array | boolean | number | string;\n\t/**\n\t * An explicit key to use for key of the formdata field for this file.\n\t * When not provided, the index of the file in the files array is used in the form `files[${index}]`.\n\t * If you wish to alter the placeholder snowflake, you must provide this property in the same form (`files[${placeholder}]`)\n\t */\n\tkey?: string;\n\t/**\n\t * The name of the file\n\t */\n\tname: string;\n}\n\n/**\n * Represents possible data to be given to an endpoint\n */\nexport interface RequestData {\n\t/**\n\t * Whether to append JSON data to form data instead of `payload_json` when sending files\n\t */\n\tappendToFormData?: boolean;\n\t/**\n\t * If this request needs the `Authorization` header\n\t *\n\t * @defaultValue `true`\n\t */\n\tauth?: boolean;\n\t/**\n\t * The authorization prefix to use for this request, useful if you use this with bearer tokens\n\t *\n\t * @defaultValue `'Bot'`\n\t */\n\tauthPrefix?: 'Bearer' | 'Bot';\n\t/**\n\t * The body to send to this request.\n\t * If providing as BodyInit, set `passThroughBody: true`\n\t */\n\tbody?: BodyInit | unknown;\n\t/**\n\t * The {@link https://undici.nodejs.org/#/docs/api/Agent | Agent} to use for the request.\n\t */\n\tdispatcher?: Agent;\n\t/**\n\t * Files to be attached to this request\n\t */\n\tfiles?: RawFile[] | undefined;\n\t/**\n\t * Additional headers to add to this request\n\t */\n\theaders?: Record<string, string>;\n\t/**\n\t * Whether to pass-through the body property directly to `fetch()`.\n\t * <warn>This only applies when files is NOT present</warn>\n\t */\n\tpassThroughBody?: boolean;\n\t/**\n\t * Query string parameters to append to the called endpoint\n\t */\n\tquery?: URLSearchParams;\n\t/**\n\t * Reason to show in the audit logs\n\t */\n\treason?: string | undefined;\n\t/**\n\t * The signal to abort the queue entry or the REST call, where applicable\n\t */\n\tsignal?: AbortSignal | undefined;\n\t/**\n\t * If this request should be versioned\n\t *\n\t * @defaultValue `true`\n\t */\n\tversioned?: boolean;\n}\n\n/**\n * Possible headers for an API call\n */\nexport interface RequestHeaders {\n\tAuthorization?: string;\n\t'User-Agent': string;\n\t'X-Audit-Log-Reason'?: string;\n}\n\n/**\n * Possible API methods to be used when doing requests\n */\nexport enum RequestMethod {\n\tDelete = 'DELETE',\n\tGet = 'GET',\n\tPatch = 'PATCH',\n\tPost = 'POST',\n\tPut = 'PUT',\n}\n\nexport type RouteLike = `/${string}`;\n\n/**\n * Internal request options\n *\n * @internal\n */\nexport interface InternalRequest extends RequestData {\n\tfullRoute: RouteLike;\n\tmethod: RequestMethod;\n}\n\nexport type HandlerRequestData = Pick<InternalRequest, 'auth' | 'body' | 'files' | 'signal'>;\n\n/**\n * Parsed route data for an endpoint\n *\n * @internal\n */\nexport interface RouteData {\n\tbucketRoute: string;\n\tmajorParameter: string;\n\toriginal: RouteLike;\n}\n\n/**\n * Represents a hash and its associated fields\n *\n * @internal\n */\nexport interface HashData {\n\tlastAccess: number;\n\tvalue: string;\n}\n","import type { RESTPatchAPIChannelJSONBody, Snowflake } from 'discord-api-types/v10';\nimport type { REST } from '../REST.js';\nimport { RateLimitError } from '../errors/RateLimitError.js';\nimport { RequestMethod, type RateLimitData, type ResponseLike } from './types.js';\n\nfunction serializeSearchParam(value: unknown): string | null {\n\tswitch (typeof value) {\n\t\tcase 'string':\n\t\t\treturn value;\n\t\tcase 'number':\n\t\tcase 'bigint':\n\t\tcase 'boolean':\n\t\t\treturn value.toString();\n\t\tcase 'object':\n\t\t\tif (value === null) return null;\n\t\t\tif (value instanceof Date) {\n\t\t\t\treturn Number.isNaN(value.getTime()) ? null : value.toISOString();\n\t\t\t}\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-base-to-string\n\t\t\tif (typeof value.toString === 'function' && value.toString !== Object.prototype.toString) return value.toString();\n\t\t\treturn null;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\n/**\n * Creates and populates an URLSearchParams instance from an object, stripping\n * out null and undefined values, while also coercing non-strings to strings.\n *\n * @param options - The options to use\n * @returns A populated URLSearchParams instance\n */\nexport function makeURLSearchParams<T extends object>(options?: Readonly<T>) {\n\tconst params = new URLSearchParams();\n\tif (!options) return params;\n\n\tfor (const [key, value] of Object.entries(options)) {\n\t\tconst serialized = serializeSearchParam(value);\n\t\tif (serialized !== null) params.append(key, serialized);\n\t}\n\n\treturn params;\n}\n\n/**\n * Converts the response to usable data\n *\n * @param res - The fetch response\n */\nexport async function parseResponse(res: ResponseLike): Promise<unknown> {\n\tif (res.headers.get('Content-Type')?.startsWith('application/json')) {\n\t\treturn res.json();\n\t}\n\n\treturn res.arrayBuffer();\n}\n\n/**\n * Check whether a request falls under a sublimit\n *\n * @param bucketRoute - The buckets route identifier\n * @param body - The options provided as JSON data\n * @param method - The HTTP method that will be used to make the request\n * @returns Whether the request falls under a sublimit\n */\nexport function hasSublimit(bucketRoute: string, body?: unknown, method?: string): boolean {\n\t// TODO: Update for new sublimits\n\t// Currently known sublimits:\n\t// Editing channel `name` or `topic`\n\tif (bucketRoute === '/channels/:id') {\n\t\tif (typeof body !== 'object' || body === null) return false;\n\t\t// This should never be a POST body, but just in case\n\t\tif (method !== RequestMethod.Patch) return false;\n\t\tconst castedBody = body as RESTPatchAPIChannelJSONBody;\n\t\treturn ['name', 'topic'].some((key) => Reflect.has(castedBody, key));\n\t}\n\n\t// If we are checking if a request has a sublimit on a route not checked above, sublimit all requests to avoid a flood of 429s\n\treturn true;\n}\n\n/**\n * Check whether an error indicates that a retry can be attempted\n *\n * @param error - The error thrown by the network request\n * @returns Whether the error indicates a retry should be attempted\n */\nexport function shouldRetry(error: Error | NodeJS.ErrnoException) {\n\t// Retry for possible timed out requests\n\tif (error.name === 'AbortError') return true;\n\t// Downlevel ECONNRESET to retry as it may be recoverable\n\treturn ('code' in error && error.code === 'ECONNRESET') || error.message.includes('ECONNRESET');\n}\n\n/**\n * Determines whether the request should be queued or whether a RateLimitError should be thrown\n *\n * @internal\n */\nexport async function onRateLimit(manager: REST, rateLimitData: RateLimitData) {\n\tconst { options } = manager;\n\tif (!options.rejectOnRateLimit) return;\n\n\tconst shouldThrow =\n\t\ttypeof options.rejectOnRateLimit === 'function'\n\t\t\t? await options.rejectOnRateLimit(rateLimitData)\n\t\t\t: options.rejectOnRateLimit.some((route) => rateLimitData.route.startsWith(route.toLowerCase()));\n\tif (shouldThrow) {\n\t\tthrow new RateLimitError(rateLimitData);\n\t}\n}\n\n/**\n * Calculates the default avatar index for a given user id.\n *\n * @param userId - The user id to calculate the default avatar index for\n */\nexport function calculateUserDefaultAvatarIndex(userId: Snowflake) {\n\treturn Number(BigInt(userId) >> 22n) % 6;\n}\n\n/**\n * Sleeps for a given amount of time.\n *\n * @param ms - The amount of time (in milliseconds) to sleep for\n */\nexport async function sleep(ms: number): Promise<void> {\n\treturn new Promise<void>((resolve) => {\n\t\tsetTimeout(() => resolve(), ms);\n\t});\n}\n\n/**\n * Verifies that a value is a buffer-like object.\n *\n * @param value - The value to check\n */\nexport function isBufferLike(value: unknown): value is ArrayBuffer | Buffer | Uint8Array | Uint8ClampedArray {\n\treturn value instanceof ArrayBuffer || value instanceof Uint8Array || value instanceof Uint8ClampedArray;\n}\n","import type { RequestInit } from 'undici';\nimport type { REST } from '../REST.js';\nimport type { DiscordErrorData, OAuthErrorData } from '../errors/DiscordAPIError.js';\nimport { DiscordAPIError } from '../errors/DiscordAPIError.js';\nimport { HTTPError } from '../errors/HTTPError.js';\nimport { RESTEvents } from '../utils/constants.js';\nimport type { ResponseLike, HandlerRequestData, RouteData } from '../utils/types.js';\nimport { parseResponse, shouldRetry } from '../utils/utils.js';\n\n/**\n * Invalid request limiting is done on a per-IP basis, not a per-token basis.\n * The best we can do is track invalid counts process-wide (on the theory that\n * users could have multiple bots run from one process) rather than per-bot.\n * Therefore, store these at file scope here rather than in the client's\n * RESTManager object.\n */\nlet invalidCount = 0;\nlet invalidCountResetTime: number | null = null;\n\n/**\n * Increment the invalid request count and emit warning if necessary\n *\n * @internal\n */\nexport function incrementInvalidCount(manager: REST) {\n\tif (!invalidCountResetTime || invalidCountResetTime < Date.now()) {\n\t\tinvalidCountResetTime = Date.now() + 1_000 * 60 * 10;\n\t\tinvalidCount = 0;\n\t}\n\n\tinvalidCount++;\n\n\tconst emitInvalid =\n\t\tmanager.options.invalidRequestWarningInterval > 0 &&\n\t\tinvalidCount % manager.options.invalidRequestWarningInterval === 0;\n\tif (emitInvalid) {\n\t\t// Let library users know periodically about invalid requests\n\t\tmanager.emit(RESTEvents.InvalidRequestWarning, {\n\t\t\tcount: invalidCount,\n\t\t\tremainingTime: invalidCountResetTime - Date.now(),\n\t\t});\n\t}\n}\n\n/**\n * Performs the actual network request for a request handler\n *\n * @param manager - The manager that holds options and emits informational events\n * @param routeId - The generalized api route with literal ids for major parameters\n * @param url - The fully resolved url to make the request to\n * @param options - The fetch options needed to make the request\n * @param requestData - Extra data from the user's request needed for errors and additional processing\n * @param retries - The number of retries this request has already attempted (recursion occurs on the handler)\n * @returns The respond from the network or `null` when the request should be retried\n * @internal\n */\nexport async function makeNetworkRequest(\n\tmanager: REST,\n\trouteId: RouteData,\n\turl: string,\n\toptions: RequestInit,\n\trequestData: HandlerRequestData,\n\tretries: number,\n) {\n\tconst controller = new AbortController();\n\tconst timeout = setTimeout(() => controller.abort(), manager.options.timeout);\n\tif (requestData.signal) {\n\t\t// If the user signal was aborted, abort the controller, else abort the local signal.\n\t\t// The reason why we don't re-use the user's signal, is because users may use the same signal for multiple\n\t\t// requests, and we do not want to cause unexpected side-effects.\n\t\tif (requestData.signal.aborted) controller.abort();\n\t\telse requestData.signal.addEventListener('abort', () => controller.abort());\n\t}\n\n\tlet res: ResponseLike;\n\ttry {\n\t\tres = await manager.options.makeRequest(url, { ...options, signal: controller.signal });\n\t} catch (error: unknown) {\n\t\tif (!(error instanceof Error)) throw error;\n\t\t// Retry the specified number of times if needed\n\t\tif (shouldRetry(error) && retries !== manager.options.retries) {\n\t\t\t// Retry is handled by the handler upon receiving null\n\t\t\treturn null;\n\t\t}\n\n\t\tthrow error;\n\t} finally {\n\t\tclearTimeout(timeout);\n\t}\n\n\tif (manager.listenerCount(RESTEvents.Response)) {\n\t\tmanager.emit(\n\t\t\tRESTEvents.Response,\n\t\t\t{\n\t\t\t\tmethod: options.method ?? 'get',\n\t\t\t\tpath: routeId.original,\n\t\t\t\troute: routeId.bucketRoute,\n\t\t\t\toptions,\n\t\t\t\tdata: requestData,\n\t\t\t\tretries,\n\t\t\t},\n\t\t\tres instanceof Response ? res.clone() : { ...res },\n\t\t);\n\t}\n\n\treturn res;\n}\n\n/**\n * Handles 5xx and 4xx errors (not 429's) conventionally. 429's should be handled before calling this function\n *\n * @param manager - The manager that holds options and emits informational events\n * @param res - The response received from {@link makeNetworkRequest}\n * @param method - The method used to make the request\n * @param url - The fully resolved url to make the request to\n * @param requestData - Extra data from the user's request needed for errors and additional processing\n * @param retries - The number of retries this request has already attempted (recursion occurs on the handler)\n * @returns - The response if the status code is not handled or null to request a retry\n */\nexport async function handleErrors(\n\tmanager: REST,\n\tres: ResponseLike,\n\tmethod: string,\n\turl: string,\n\trequestData: HandlerRequestData,\n\tretries: number,\n) {\n\tconst status = res.status;\n\tif (status >= 500 && status < 600) {\n\t\t// Retry the specified number of times for possible server side issues\n\t\tif (retries !== manager.options.retries) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// We are out of retries, throw an error\n\t\tthrow new HTTPError(status, res.statusText, method, url, requestData);\n\t} else {\n\t\t// Handle possible malformed requests\n\t\tif (status >= 400 && status < 500) {\n\t\t\t// If we receive this status code, it means the token we had is no longer valid.\n\t\t\tif (status === 401 && requestData.auth) {\n\t\t\t\tmanager.setToken(null!);\n\t\t\t}\n\n\t\t\t// The request will not succeed for some reason, parse the error returned from the api\n\t\t\tconst data = (await parseResponse(res)) as DiscordErrorData | OAuthErrorData;\n\t\t\t// throw the API error\n\t\t\tthrow new DiscordAPIError(data, 'code' in data ? data.code : data.error, status, method, url, requestData);\n\t\t}\n\n\t\treturn res;\n\t}\n}\n","import type { RequestInit } from 'undici';\nimport type { REST } from '../REST.js';\nimport type { IHandler } from '../interfaces/Handler.js';\nimport { RESTEvents } from '../utils/constants.js';\nimport type { ResponseLike, HandlerRequestData, RouteData } from '../utils/types.js';\nimport { onRateLimit, sleep } from '../utils/utils.js';\nimport { handleErrors, incrementInvalidCount, makeNetworkRequest } from './Shared.js';\n\n/**\n * The structure used to handle burst requests for a given bucket.\n * Burst requests have no ratelimit handling but allow for pre- and post-processing\n * of data in the same manner as sequentially queued requests.\n *\n * @remarks\n * This queue may still emit a rate limit error if an unexpected 429 is hit\n */\nexport class BurstHandler implements IHandler {\n\t/**\n\t * {@inheritdoc IHandler.id}\n\t */\n\tpublic readonly id: string;\n\n\t/**\n\t * {@inheritDoc IHandler.inactive}\n\t */\n\tpublic inactive = false;\n\n\t/**\n\t * @param manager - The request manager\n\t * @param hash - The hash that this RequestHandler handles\n\t * @param majorParameter - The major parameter for this handler\n\t */\n\tpublic constructor(\n\t\tprivate readonly manager: REST,\n\t\tprivate readonly hash: string,\n\t\tprivate readonly majorParameter: string,\n\t) {\n\t\tthis.id = `${hash}:${majorParameter}`;\n\t}\n\n\t/**\n\t * Emits a debug message\n\t *\n\t * @param message - The message to debug\n\t */\n\tprivate debug(message: string) {\n\t\tthis.manager.emit(RESTEvents.Debug, `[REST ${this.id}] ${message}`);\n\t}\n\n\t/**\n\t * {@inheritDoc IHandler.queueRequest}\n\t */\n\tpublic async queueRequest(\n\t\trouteId: RouteData,\n\t\turl: string,\n\t\toptions: RequestInit,\n\t\trequestData: HandlerRequestData,\n\t): Promise<ResponseLike> {\n\t\treturn this.runRequest(routeId, url, options, requestData);\n\t}\n\n\t/**\n\t * The method that actually makes the request to the API, and updates info about the bucket accordingly\n\t *\n\t * @param routeId - The generalized API route with literal ids for major parameters\n\t * @param url - The fully resolved URL to make the request to\n\t * @param options - The fetch options needed to make the request\n\t * @param requestData - Extra data from the user's request needed for errors and additional processing\n\t * @param retries - The number of retries this request has already attempted (recursion)\n\t */\n\tprivate async runRequest(\n\t\trouteId: RouteData,\n\t\turl: string,\n\t\toptions: RequestInit,\n\t\trequestData: HandlerRequestData,\n\t\tretries = 0,\n\t): Promise<ResponseLike> {\n\t\tconst method = options.method ?? 'get';\n\n\t\tconst res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries);\n\n\t\t// Retry requested\n\t\tif (res === null) {\n\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\treturn this.runRequest(routeId, url, options, requestData, ++retries);\n\t\t}\n\n\t\tconst status = res.status;\n\t\tlet retryAfter = 0;\n\t\tconst retry = res.headers.get('Retry-After');\n\n\t\t// Amount of time in milliseconds until we should retry if rate limited (globally or otherwise)\n\t\tif (retry) retryAfter = Number(retry) * 1_000 + this.manager.options.offset;\n\n\t\t// Count the invalid requests\n\t\tif (status === 401 || status === 403 || status === 429) {\n\t\t\tincrementInvalidCount(this.manager);\n\t\t}\n\n\t\tif (status >= 200 && status < 300) {\n\t\t\treturn res;\n\t\t} else if (status === 429) {\n\t\t\t// Unexpected ratelimit\n\t\t\tconst isGlobal = res.headers.has('X-RateLimit-Global');\n\t\t\tawait onRateLimit(this.manager, {\n\t\t\t\ttimeToReset: retryAfter,\n\t\t\t\tlimit: Number.POSITIVE_INFINITY,\n\t\t\t\tmethod,\n\t\t\t\thash: this.hash,\n\t\t\t\turl,\n\t\t\t\troute: routeId.bucketRoute,\n\t\t\t\tmajorParameter: this.majorParameter,\n\t\t\t\tglobal: isGlobal,\n\t\t\t});\n\t\t\tthis.debug(\n\t\t\t\t[\n\t\t\t\t\t'Encountered unexpected 429 rate limit',\n\t\t\t\t\t` Global : ${isGlobal}`,\n\t\t\t\t\t` Method : ${method}`,\n\t\t\t\t\t` URL : ${url}`,\n\t\t\t\t\t` Bucket : ${routeId.bucketRoute}`,\n\t\t\t\t\t` Major parameter: ${routeId.majorParameter}`,\n\t\t\t\t\t` Hash : ${this.hash}`,\n\t\t\t\t\t` Limit : ${Number.POSITIVE_INFINITY}`,\n\t\t\t\t\t` Retry After : ${retryAfter}ms`,\n\t\t\t\t\t` Sublimit : None`,\n\t\t\t\t].join('\\n'),\n\t\t\t);\n\n\t\t\t// We are bypassing all other limits, but an encountered limit should be respected (it's probably a non-punished rate limit anyways)\n\t\t\tawait sleep(retryAfter);\n\n\t\t\t// Since this is not a server side issue, the next request should pass, so we don't bump the retries counter\n\t\t\treturn this.runRequest(routeId, url, options, requestData, retries);\n\t\t} else {\n\t\t\tconst handled = await handleErrors(this.manager, res, method, url, requestData, retries);\n\t\t\tif (handled === null) {\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\treturn this.runRequest(routeId, url, options, requestData, ++retries);\n\t\t\t}\n\n\t\t\treturn handled;\n\t\t}\n\t}\n}\n","import { AsyncQueue } from '@sapphire/async-queue';\nimport type { RequestInit } from 'undici';\nimport type { REST } from '../REST.js';\nimport type { IHandler } from '../interfaces/Handler.js';\nimport { RESTEvents } from '../utils/constants.js';\nimport type { RateLimitData, ResponseLike, HandlerRequestData, RouteData } from '../utils/types.js';\nimport { hasSublimit, onRateLimit, sleep } from '../utils/utils.js';\nimport { handleErrors, incrementInvalidCount, makeNetworkRequest } from './Shared.js';\n\nconst enum QueueType {\n\tStandard,\n\tSublimit,\n}\n\n/**\n * The structure used to handle sequential requests for a given bucket\n */\nexport class SequentialHandler implements IHandler {\n\t/**\n\t * {@inheritDoc IHandler.id}\n\t */\n\tpublic readonly id: string;\n\n\t/**\n\t * The time this rate limit bucket will reset\n\t */\n\tprivate reset = -1;\n\n\t/**\n\t * The remaining requests that can be made before we are rate limited\n\t */\n\tprivate remaining = 1;\n\n\t/**\n\t * The total number of requests that can be made before we are rate limited\n\t */\n\tprivate limit = Number.POSITIVE_INFINITY;\n\n\t/**\n\t * The interface used to sequence async requests sequentially\n\t */\n\t#asyncQueue = new AsyncQueue();\n\n\t/**\n\t * The interface used to sequence sublimited async requests sequentially\n\t */\n\t#sublimitedQueue: AsyncQueue | null = null;\n\n\t/**\n\t * A promise wrapper for when the sublimited queue is finished being processed or null when not being processed\n\t */\n\t#sublimitPromise: { promise: Promise<void>; resolve(): void } | null = null;\n\n\t/**\n\t * Whether the sublimit queue needs to be shifted in the finally block\n\t */\n\t#shiftSublimit = false;\n\n\t/**\n\t * @param manager - The request manager\n\t * @param hash - The hash that this RequestHandler handles\n\t * @param majorParameter - The major parameter for this handler\n\t */\n\tpublic constructor(\n\t\tprivate readonly manager: REST,\n\t\tprivate readonly hash: string,\n\t\tprivate readonly majorParameter: string,\n\t) {\n\t\tthis.id = `${hash}:${majorParameter}`;\n\t}\n\n\t/**\n\t * {@inheritDoc IHandler.inactive}\n\t */\n\tpublic get inactive(): boolean {\n\t\treturn (\n\t\t\tthis.#asyncQueue.remaining === 0 &&\n\t\t\t(this.#sublimitedQueue === null || this.#sublimitedQueue.remaining === 0) &&\n\t\t\t!this.limited\n\t\t);\n\t}\n\n\t/**\n\t * If the rate limit bucket is currently limited by the global limit\n\t */\n\tprivate get globalLimited(): boolean {\n\t\treturn this.manager.globalRemaining <= 0 && Date.now() < this.manager.globalReset;\n\t}\n\n\t/**\n\t * If the rate limit bucket is currently limited by its limit\n\t */\n\tprivate get localLimited(): boolean {\n\t\treturn this.remaining <= 0 && Date.now() < this.reset;\n\t}\n\n\t/**\n\t * If the rate limit bucket is currently limited\n\t */\n\tprivate get limited(): boolean {\n\t\treturn this.globalLimited || this.localLimited;\n\t}\n\n\t/**\n\t * The time until queued requests can continue\n\t */\n\tprivate get timeToReset(): number {\n\t\treturn this.reset + this.manager.options.offset - Date.now();\n\t}\n\n\t/**\n\t * Emits a debug message\n\t *\n\t * @param message - The message to debug\n\t */\n\tprivate debug(message: string) {\n\t\tthis.manager.emit(RESTEvents.Debug, `[REST ${this.id}] ${message}`);\n\t}\n\n\t/**\n\t * Delay all requests for the specified amount of time, handling global rate limits\n\t *\n\t * @param time - The amount of time to delay all requests for\n\t */\n\tprivate async globalDelayFor(time: number): Promise<void> {\n\t\tawait sleep(time);\n\t\tthis.manager.globalDelay = null;\n\t}\n\n\t/**\n\t * {@inheritDoc IHandler.queueRequest}\n\t */\n\tpublic async queueRequest(\n\t\trouteId: RouteData,\n\t\turl: string,\n\t\toptions: RequestInit,\n\t\trequestData: HandlerRequestData,\n\t): Promise<ResponseLike> {\n\t\tlet queue = this.#asyncQueue;\n\t\tlet queueType = QueueType.Standard;\n\t\t// Separate sublimited requests when already sublimited\n\t\tif (this.#sublimitedQueue && hasSublimit(routeId.bucketRoute, requestData.body, options.method)) {\n\t\t\tqueue = this.#sublimitedQueue!;\n\t\t\tqueueType = QueueType.Sublimit;\n\t\t}\n\n\t\t// Wait for any previous requests to be completed before this one is run\n\t\tawait queue.wait({ signal: requestData.signal });\n\t\t// This set handles retroactively sublimiting requests\n\t\tif (queueType === QueueType.Standard) {\n\t\t\tif (this.#sublimitedQueue && hasSublimit(routeId.bucketRoute, requestData.body, options.method)) {\n\t\t\t\t/**\n\t\t\t\t * Remove the request from the standard queue, it should never be possible to get here while processing the\n\t\t\t\t * sublimit queue so there is no need to worry about shifting the wrong request\n\t\t\t\t */\n\t\t\t\tqueue = this.#sublimitedQueue!;\n\t\t\t\tconst wait = queue.wait();\n\t\t\t\tthis.#asyncQueue.shift();\n\t\t\t\tawait wait;\n\t\t\t} else if (this.#sublimitPromise) {\n\t\t\t\t// Stall requests while the sublimit queue gets processed\n\t\t\t\tawait this.#sublimitPromise.promise;\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\t// Make the request, and return the results\n\t\t\treturn await this.runRequest(routeId, url, options, requestData);\n\t\t} finally {\n\t\t\t// Allow the next request to fire\n\t\t\tqueue.shift();\n\t\t\tif (this.#shiftSublimit) {\n\t\t\t\tthis.#shiftSublimit = false;\n\t\t\t\tthis.#sublimitedQueue?.shift();\n\t\t\t}\n\n\t\t\t// If this request is the last request in a sublimit\n\t\t\tif (this.#sublimitedQueue?.remaining === 0) {\n\t\t\t\tthis.#sublimitPromise?.resolve();\n\t\t\t\tthis.#sublimitedQueue = null;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * The method that actually makes the request to the api, and updates info about the bucket accordingly\n\t *\n\t * @param routeId - The generalized api route with literal ids for major parameters\n\t * @param url - The fully resolved url to make the request to\n\t * @param options - The fetch options needed to make the request\n\t * @param requestData - Extra data from the user's request needed for errors and additional processing\n\t * @param retries - The number of retries this request has already attempted (recursion)\n\t */\n\tprivate async runRequest(\n\t\trouteId: RouteData,\n\t\turl: string,\n\t\toptions: RequestInit,\n\t\trequestData: HandlerRequestData,\n\t\tretries = 0,\n\t): Promise<ResponseLike> {\n\t\t/*\n\t\t * After calculations have been done, pre-emptively stop further requests\n\t\t * Potentially loop until this task can run if e.g. the global rate limit is hit twice\n\t\t */\n\t\twhile (this.limited) {\n\t\t\tconst isGlobal = this.globalLimited;\n\t\t\tlet limit: number;\n\t\t\tlet timeout: number;\n\t\t\tlet delay: Promise<void>;\n\n\t\t\tif (isGlobal) {\n\t\t\t\t// Set RateLimitData based on the global limit\n\t\t\t\tlimit = this.manager.options.globalRequestsPerSecond;\n\t\t\t\ttimeout = this.manager.globalReset + this.manager.options.offset - Date.now();\n\t\t\t\t// If this is the first task to reach the global timeout, set the global delay\n\t\t\t\tif (!this.manager.globalDelay) {\n\t\t\t\t\t// The global delay function clears the global delay state when it is resolved\n\t\t\t\t\tthis.manager.globalDelay = this.globalDelayFor(timeout);\n\t\t\t\t}\n\n\t\t\t\tdelay = this.manager.globalDelay;\n\t\t\t} else {\n\t\t\t\t// Set RateLimitData based on the route-specific limit\n\t\t\t\tlimit = this.limit;\n\t\t\t\ttimeout = this.timeToReset;\n\t\t\t\tdelay = sleep(timeout);\n\t\t\t}\n\n\t\t\tconst rateLimitData: RateLimitData = {\n\t\t\t\ttimeToReset: timeout,\n\t\t\t\tlimit,\n\t\t\t\tmethod: options.method ?? 'get',\n\t\t\t\thash: this.hash,\n\t\t\t\turl,\n\t\t\t\troute: routeId.bucketRoute,\n\t\t\t\tmajorParameter: this.majorParameter,\n\t\t\t\tglobal: isGlobal,\n\t\t\t};\n\t\t\t// Let library users know they have hit a rate limit\n\t\t\tthis.manager.emit(RESTEvents.RateLimited, rateLimitData);\n\t\t\t// Determine whether a RateLimitError should be thrown\n\t\t\tawait onRateLimit(this.manager, rateLimitData);\n\t\t\t// When not erroring, emit debug for what is happening\n\t\t\tif (isGlobal) {\n\t\t\t\tthis.debug(`Global rate limit hit, blocking all requests for ${timeout}ms`);\n\t\t\t} else {\n\t\t\t\tthis.debug(`Waiting ${timeout}ms for rate limit to pass`);\n\t\t\t}\n\n\t\t\t// Wait the remaining time left before the rate limit resets\n\t\t\tawait delay;\n\t\t}\n\n\t\t// As the request goes out, update the global usage information\n\t\tif (!this.manager.globalReset || this.manager.globalReset < Date.now()) {\n\t\t\tthis.manager.globalReset = Date.now() + 1_000;\n\t\t\tthis.manager.globalRemaining = this.manager.options.globalRequestsPerSecond;\n\t\t}\n\n\t\tthis.manager.globalRemaining--;\n\n\t\tconst method = options.method ?? 'get';\n\n\t\tconst res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries);\n\n\t\t// Retry requested\n\t\tif (res === null) {\n\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\treturn this.runRequest(routeId, url, options, requestData, ++retries);\n\t\t}\n\n\t\tconst status = res.status;\n\t\tlet retryAfter = 0;\n\n\t\tconst limit = res.headers.get('X-RateLimit-Limit');\n\t\tconst remaining = res.headers.get('X-RateLimit-Remaining');\n\t\tconst reset = res.headers.get('X-RateLimit-Reset-After');\n\t\tconst hash = res.headers.get('X-RateLimit-Bucket');\n\t\tconst retry = res.headers.get('Retry-After');\n\n\t\t// Update the total number of requests that can be made before the rate limit resets\n\t\tthis.limit = limit ? Number(limit) : Number.POSITIVE_INFINITY;\n\t\t// Update the number of remaining requests that can be made before the rate limit resets\n\t\tthis.remaining = remaining ? Number(remaining) : 1;\n\t\t// Update the time when this rate limit resets (reset-after is in seconds)\n\t\tthis.reset = reset ? Number(reset) * 1_000 + Date.now() + this.manager.options.offset : Date.now();\n\n\t\t// Amount of time in milliseconds until we should retry if rate limited (globally or otherwise)\n\t\tif (retry) retryAfter = Number(retry) * 1_000 + this.manager.options.offset;\n\n\t\t// Handle buckets via the hash header retroactively\n\t\tif (hash && hash !== this.hash) {\n\t\t\t// Let library users know when rate limit buckets have been updated\n\t\t\tthis.debug(['Received bucket hash update', ` Old Hash : ${this.hash}`, ` New Hash : ${hash}`].join('\\n'));\n\t\t\t// This queue will eventually be eliminated via attrition\n\t\t\tthis.manager.hashes.set(`${method}:${routeId.bucketRoute}`, { value: hash, lastAccess: Date.now() });\n\t\t} else if (hash) {\n\t\t\t// Handle the case where hash value doesn't change\n\t\t\t// Fetch the hash data from the manager\n\t\t\tconst hashData = this.manager.hashes.get(`${method}:${routeId.bucketRoute}`);\n\n\t\t\t// When fetched, update the last access of the hash\n\t\t\tif (hashData) {\n\t\t\t\thashData.lastAccess = Date.now();\n\t\t\t}\n\t\t}\n\n\t\t// Handle retryAfter, which means we have actually hit a rate limit\n\t\tlet sublimitTimeout: number | null = null;\n\t\tif (retryAfter > 0) {\n\t\t\tif (res.headers.has('X-RateLimit-Global')) {\n\t\t\t\tthis.manager.globalRemaining = 0;\n\t\t\t\tthis.manager.globalReset = Date.now() + retryAfter;\n\t\t\t} else if (!this.localLimited) {\n\t\t\t\t/*\n\t\t\t\t * This is a sublimit (e.g. 2 channel name changes/10 minutes) since the headers don't indicate a\n\t\t\t\t * route-wide rate limit. Don't update remaining or reset to avoid rate limiting the whole\n\t\t\t\t * endpoint, just set a reset time on the request itself to avoid retrying too soon.\n\t\t\t\t */\n\t\t\t\tsublimitTimeout = retryAfter;\n\t\t\t}\n\t\t}\n\n\t\t// Count the invalid requests\n\t\tif (status === 401 || status === 403 || status === 429) {\n\t\t\tincrementInvalidCount(this.manager);\n\t\t}\n\n\t\tif (res.ok) {\n\t\t\treturn res;\n\t\t} else if (status === 429) {\n\t\t\t// A rate limit was hit - this may happen if the route isn't associated with an official bucket hash yet, or when first globally rate limited\n\t\t\tconst isGlobal = this.globalLimited;\n\t\t\tlet limit: number;\n\t\t\tlet timeout: number;\n\n\t\t\tif (isGlobal) {\n\t\t\t\t// Set RateLimitData based on the global limit\n\t\t\t\tlimit = this.manager.options.globalRequestsPerSecond;\n\t\t\t\ttimeout = this.manager.globalReset + this.manager.options.offset - Date.now();\n\t\t\t} else {\n\t\t\t\t// Set RateLimitData based on the route-specific limit\n\t\t\t\tlimit = this.limit;\n\t\t\t\ttimeout = this.timeToReset;\n\t\t\t}\n\n\t\t\tawait onRateLimit(this.manager, {\n\t\t\t\ttimeToReset: timeout,\n\t\t\t\tlimit,\n\t\t\t\tmethod,\n\t\t\t\thash: this.hash,\n\t\t\t\turl,\n\t\t\t\troute: routeId.bucketRoute,\n\t\t\t\tmajorParameter: this.majorParameter,\n\t\t\t\tglobal: isGlobal,\n\t\t\t});\n\t\t\tthis.debug(\n\t\t\t\t[\n\t\t\t\t\t'Encountered unexpected 429 rate limit',\n\t\t\t\t\t` Global : ${isGlobal.toString()}`,\n\t\t\t\t\t` Method : ${method}`,\n\t\t\t\t\t` URL : ${url}`,\n\t\t\t\t\t` Bucket : ${routeId.bucketRoute}`,\n\t\t\t\t\t` Major parameter: ${routeId.majorParameter}`,\n\t\t\t\t\t` Hash : ${this.hash}`,\n\t\t\t\t\t` Limit : ${limit}`,\n\t\t\t\t\t` Retry After : ${retryAfter}ms`,\n\t\t\t\t\t` Sublimit : ${sublimitTimeout ? `${sublimitTimeout}ms` : 'None'}`,\n\t\t\t\t].join('\\n'),\n\t\t\t);\n\t\t\t// If caused by a sublimit, wait it out here so other requests on the route can be handled\n\t\t\tif (sublimitTimeout) {\n\t\t\t\t// Normally the sublimit queue will not exist, however, if a sublimit is hit while in the sublimit queue, it will\n\t\t\t\tconst firstSublimit = !this.#sublimitedQueue;\n\t\t\t\tif (firstSublimit) {\n\t\t\t\t\tthis.#sublimitedQueue = new AsyncQueue();\n\t\t\t\t\tvoid this.#sublimitedQueue.wait();\n\t\t\t\t\tthis.#asyncQueue.shift();\n\t\t\t\t}\n\n\t\t\t\tthis.#sublimitPromise?.resolve();\n\t\t\t\tthis.#sublimitPromise = null;\n\t\t\t\tawait sleep(sublimitTimeout);\n\t\t\t\tlet resolve: () => void;\n\t\t\t\t// eslint-disable-next-line promise/param-names, no-promise-executor-return\n\t\t\t\tconst promise = new Promise<void>((res) => (resolve = res));\n\t\t\t\tthis.#sublimitPromise = { promise, resolve: resolve! };\n\t\t\t\tif (firstSublimit) {\n\t\t\t\t\t// Re-queue this request so it can be shifted by the finally\n\t\t\t\t\tawait this.#asyncQueue.wait();\n\t\t\t\t\tthis.#shiftSublimit = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Since this is not a server side issue, the next request should pass, so we don't bump the retries counter\n\t\t\treturn this.runRequest(routeId, url, options, requestData, retries);\n\t\t} else {\n\t\t\tconst handled = await handleErrors(this.manager, res, method, url, requestData, retries);\n\t\t\tif (handled === null) {\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\treturn this.runRequest(routeId, url, options, requestData, ++retries);\n\t\t\t}\n\n\t\t\treturn handled;\n\t\t}\n\t}\n}\n","export * from './lib/CDN.js';\nexport * from './lib/errors/DiscordAPIError.js';\nexport * from './lib/errors/HTTPError.js';\nexport * from './lib/errors/RateLimitError.js';\nexport * from './lib/REST.js';\nexport * from './lib/utils/constants.js';\nexport * from './lib/utils/types.js';\nexport { calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse } from './lib/utils/utils.js';\n\n/**\n * The {@link https://github.com/discordjs/discord.js/blob/main/packages/rest/#readme | @discordjs/rest} version\n * that you are currently using.\n */\n// This needs to explicitly be `string` so it is not typed as a \"const string\" that gets injected by esbuild\nexport const version = '2.0.1' as string;\n"],"mappings":";;;;AAAA,SAAS,QAAAA,aAAY;AACrB,SAAS,wCAAwC;AACjD,SAAS,YAAAC,iBAAgB;;;ACAzB,IAAI;AAEG,SAAS,mBAAmB,aAAyC;AAC3E,oBAAkB;AACnB;AAFgB;AAIT,SAAS,qBAAqB;AACpC,SAAO;AACR;AAFgB;;;ACRhB,SAAS,oBAAoB;AAC7B,SAAS,mBAAAC,wBAAuB;AAChC,SAAS,aAAa;AACtB,SAA2B,SAAS,eAAe;AAKnD,eAAsB,YAAY,KAAa,MAA0C;AAGxF,QAAM,UAAU;AAAA,IACf,GAAG;AAAA,IACH,MAAM,MAAM,YAAY,KAAK,IAAI;AAAA,EAClC;AACA,QAAM,MAAM,MAAM,QAAQ,KAAK,OAAO;AACtC,SA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AAsB;AAErD,QAAI,aAAa;AAIjB,QAAI,oCAAmC,cAAc,8BAA8B;AAClF,YAAM,KAAK,aAAa,KAAK,QAAQ,EAAG,CAAC;AACzC,YAAM,YAAY,iBAAiB,cAAc,EAAE;AACnD,UAAI,KAAK,IAAI,IAAI,YAAY,MAAQ,KAAK,KAAK,KAAK,IAAI;AACvD,sBAAc;AAAA,MACf;AAAA,IACD;AAEA,WAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa,YAAY;AAAA,MACzB,UAAU;AAAA,IACX;AAAA,EACD;AACD;;;AMncO,IAAM,UAAU;;;AdPtB,WAAmB,aAAaC;AACjC,WAAW,SAASC;AAEpB,mBAAmB,iCAAiC,IAAI,QAAQ,WAAW;","names":["Blob","FormData","URLSearchParams","URLSearchParams","RESTEvents","RequestMethod","limit","res","request","FormData","Blob"]} \ No newline at end of file
diff --git a/node_modules/@discordjs/rest/dist/strategies/undiciRequest.d.mts b/node_modules/@discordjs/rest/dist/strategies/undiciRequest.d.mts
new file mode 100644
index 0000000..4e38977
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/strategies/undiciRequest.d.mts
@@ -0,0 +1,11 @@
+import { request, RequestInit } from 'undici';
+import { R as ResponseLike } from '../types-65527f29.js';
+import 'node:stream';
+import 'node:stream/web';
+import '@discordjs/collection';
+
+type RequestOptions = Exclude<Parameters<typeof request>[1], undefined>;
+declare function makeRequest(url: string, init: RequestInit): Promise<ResponseLike>;
+declare function resolveBody(body: RequestInit['body']): Promise<Exclude<RequestOptions['body'], undefined>>;
+
+export { RequestOptions, makeRequest, resolveBody };
diff --git a/node_modules/@discordjs/rest/dist/strategies/undiciRequest.d.ts b/node_modules/@discordjs/rest/dist/strategies/undiciRequest.d.ts
new file mode 100644
index 0000000..4e38977
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/strategies/undiciRequest.d.ts
@@ -0,0 +1,11 @@
+import { request, RequestInit } from 'undici';
+import { R as ResponseLike } from '../types-65527f29.js';
+import 'node:stream';
+import 'node:stream/web';
+import '@discordjs/collection';
+
+type RequestOptions = Exclude<Parameters<typeof request>[1], undefined>;
+declare function makeRequest(url: string, init: RequestInit): Promise<ResponseLike>;
+declare function resolveBody(body: RequestInit['body']): Promise<Exclude<RequestOptions['body'], undefined>>;
+
+export { RequestOptions, makeRequest, resolveBody };
diff --git a/node_modules/@discordjs/rest/dist/strategies/undiciRequest.js b/node_modules/@discordjs/rest/dist/strategies/undiciRequest.js
new file mode 100644
index 0000000..640fe1d
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/strategies/undiciRequest.js
@@ -0,0 +1,94 @@
+"use strict";
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/strategies/undiciRequest.ts
+var undiciRequest_exports = {};
+__export(undiciRequest_exports, {
+ makeRequest: () => makeRequest,
+ resolveBody: () => resolveBody
+});
+module.exports = __toCommonJS(undiciRequest_exports);
+var import_node_http = require("http");
+var import_node_url = require("url");
+var import_node_util = require("util");
+var import_undici = require("undici");
+async function makeRequest(url, init) {
+ const options = {
+ ...init,
+ body: await resolveBody(init.body)
+ };
+ const res = await (0, import_undici.request)(url, options);
+ return {
+ body: res.body,
+ async arrayBuffer() {
+ return res.body.arrayBuffer();
+ },
+ async json() {
+ return res.body.json();
+ },
+ async text() {
+ return res.body.text();
+ },
+ get bodyUsed() {
+ return res.body.bodyUsed;
+ },
+ headers: new import_undici.Headers(res.headers),
+ status: res.statusCode,
+ statusText: import_node_http.STATUS_CODES[res.statusCode],
+ ok: res.statusCode >= 200 && res.statusCode < 300
+ };
+}
+__name(makeRequest, "makeRequest");
+async function resolveBody(body) {
+ if (body == null) {
+ return null;
+ } else if (typeof body === "string") {
+ return body;
+ } else if (import_node_util.types.isUint8Array(body)) {
+ return body;
+ } else if (import_node_util.types.isArrayBuffer(body)) {
+ return new Uint8Array(body);
+ } else if (body instanceof import_node_url.URLSearchParams) {
+ return body.toString();
+ } else if (body instanceof DataView) {
+ return new Uint8Array(body.buffer);
+ } else if (body instanceof Blob) {
+ return new Uint8Array(await body.arrayBuffer());
+ } else if (body instanceof FormData) {
+ return body;
+ } else if (body[Symbol.iterator]) {
+ const chunks = [...body];
+ return Buffer.concat(chunks);
+ } else if (body[Symbol.asyncIterator]) {
+ const chunks = [];
+ for await (const chunk of body) {
+ chunks.push(chunk);
+ }
+ return Buffer.concat(chunks);
+ }
+ throw new TypeError(`Unable to resolve body.`);
+}
+__name(resolveBody, "resolveBody");
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ makeRequest,
+ resolveBody
+});
+//# sourceMappingURL=undiciRequest.js.map \ No newline at end of file
diff --git a/node_modules/@discordjs/rest/dist/strategies/undiciRequest.js.map b/node_modules/@discordjs/rest/dist/strategies/undiciRequest.js.map
new file mode 100644
index 0000000..e3c49ee
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/strategies/undiciRequest.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/strategies/undiciRequest.ts"],"sourcesContent":["import { STATUS_CODES } from 'node:http';\nimport { URLSearchParams } from 'node:url';\nimport { types } from 'node:util';\nimport { type RequestInit, request, Headers } from 'undici';\nimport type { ResponseLike } from '../shared.js';\n\nexport type RequestOptions = Exclude<Parameters<typeof request>[1], undefined>;\n\nexport async function makeRequest(url: string, init: RequestInit): Promise<ResponseLike> {\n\t// The cast is necessary because `headers` and `method` are narrower types in `undici.request`\n\t// our request path guarantees they are of acceptable type for `undici.request`\n\tconst options = {\n\t\t...init,\n\t\tbody: await resolveBody(init.body),\n\t} as RequestOptions;\n\tconst res = await request(url, options);\n\treturn {\n\t\tbody: res.body,\n\t\tasync arrayBuffer() {\n\t\t\treturn res.body.arrayBuffer();\n\t\t},\n\t\tasync json() {\n\t\t\treturn res.body.json();\n\t\t},\n\t\tasync text() {\n\t\t\treturn res.body.text();\n\t\t},\n\t\tget bodyUsed() {\n\t\t\treturn res.body.bodyUsed;\n\t\t},\n\t\theaders: new Headers(res.headers as Record<string, string[] | string>),\n\t\tstatus: res.statusCode,\n\t\tstatusText: STATUS_CODES[res.statusCode]!,\n\t\tok: res.statusCode >= 200 && res.statusCode < 300,\n\t};\n}\n\nexport async function resolveBody(body: RequestInit['body']): Promise<Exclude<RequestOptions['body'], undefined>> {\n\t// eslint-disable-next-line no-eq-null, eqeqeq\n\tif (body == null) {\n\t\treturn null;\n\t} else if (typeof body === 'string') {\n\t\treturn body;\n\t} else if (types.isUint8Array(body)) {\n\t\treturn body;\n\t} else if (types.isArrayBuffer(body)) {\n\t\treturn new Uint8Array(body);\n\t} else if (body instanceof URLSearchParams) {\n\t\treturn body.toString();\n\t} else if (body instanceof DataView) {\n\t\treturn new Uint8Array(body.buffer);\n\t} else if (body instanceof Blob) {\n\t\treturn new Uint8Array(await body.arrayBuffer());\n\t} else if (body instanceof FormData) {\n\t\treturn body;\n\t} else if ((body as Iterable<Uint8Array>)[Symbol.iterator]) {\n\t\tconst chunks = [...(body as Iterable<Uint8Array>)];\n\n\t\treturn Buffer.concat(chunks);\n\t} else if ((body as AsyncIterable<Uint8Array>)[Symbol.asyncIterator]) {\n\t\tconst chunks: Uint8Array[] = [];\n\n\t\tfor await (const chunk of body as AsyncIterable<Uint8Array>) {\n\t\t\tchunks.push(chunk);\n\t\t}\n\n\t\treturn Buffer.concat(chunks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WAAW,MAAM,KAAK,YAAY,CAAC;AAAA,EAC/C,WAAW,gBAAgB,UAAU;AACpC,WAAO;AAAA,EACR,WAAY,KAA8B,OAAO,QAAQ,GAAG;AAC3D,UAAM,SAAS,CAAC,GAAI,IAA6B;AAEjD,WAAO,OAAO,OAAO,MAAM;AAAA,EAC5B,WAAY,KAAmC,OAAO,aAAa,GAAG;AACrE,UAAM,SAAuB,CAAC;AAE9B,qBAAiB,SAAS,MAAmC;AAC5D,aAAO,KAAK,KAAK;AAAA,IAClB;AAEA,WAAO,OAAO,OAAO,MAAM;AAAA,EAC5B;AAEA,QAAM,IAAI,UAAU,yBAAyB;AAC9C;AAjCsB;","names":[]} \ No newline at end of file
diff --git a/node_modules/@discordjs/rest/dist/strategies/undiciRequest.mjs b/node_modules/@discordjs/rest/dist/strategies/undiciRequest.mjs
new file mode 100644
index 0000000..0e6ce0a
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/strategies/undiciRequest.mjs
@@ -0,0 +1,70 @@
+var __defProp = Object.defineProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+
+// src/strategies/undiciRequest.ts
+import { STATUS_CODES } from "node:http";
+import { URLSearchParams } from "node:url";
+import { types } from "node:util";
+import { request, Headers } from "undici";
+async function makeRequest(url, init) {
+ const options = {
+ ...init,
+ body: await resolveBody(init.body)
+ };
+ const res = await request(url, options);
+ return {
+ body: res.body,
+ async arrayBuffer() {
+ return res.body.arrayBuffer();
+ },
+ async json() {
+ return res.body.json();
+ },
+ async text() {
+ return res.body.text();
+ },
+ get bodyUsed() {
+ return res.body.bodyUsed;
+ },
+ headers: new Headers(res.headers),
+ status: res.statusCode,
+ statusText: STATUS_CODES[res.statusCode],
+ ok: res.statusCode >= 200 && res.statusCode < 300
+ };
+}
+__name(makeRequest, "makeRequest");
+async function resolveBody(body) {
+ if (body == null) {
+ return null;
+ } else if (typeof body === "string") {
+ return body;
+ } else if (types.isUint8Array(body)) {
+ return body;
+ } else if (types.isArrayBuffer(body)) {
+ return new Uint8Array(body);
+ } else if (body instanceof URLSearchParams) {
+ return body.toString();
+ } else if (body instanceof DataView) {
+ return new Uint8Array(body.buffer);
+ } else if (body instanceof Blob) {
+ return new Uint8Array(await body.arrayBuffer());
+ } else if (body instanceof FormData) {
+ return body;
+ } else if (body[Symbol.iterator]) {
+ const chunks = [...body];
+ return Buffer.concat(chunks);
+ } else if (body[Symbol.asyncIterator]) {
+ const chunks = [];
+ for await (const chunk of body) {
+ chunks.push(chunk);
+ }
+ return Buffer.concat(chunks);
+ }
+ throw new TypeError(`Unable to resolve body.`);
+}
+__name(resolveBody, "resolveBody");
+export {
+ makeRequest,
+ resolveBody
+};
+//# sourceMappingURL=undiciRequest.mjs.map \ No newline at end of file
diff --git a/node_modules/@discordjs/rest/dist/strategies/undiciRequest.mjs.map b/node_modules/@discordjs/rest/dist/strategies/undiciRequest.mjs.map
new file mode 100644
index 0000000..e238a9c
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/strategies/undiciRequest.mjs.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/strategies/undiciRequest.ts"],"sourcesContent":["import { STATUS_CODES } from 'node:http';\nimport { URLSearchParams } from 'node:url';\nimport { types } from 'node:util';\nimport { type RequestInit, request, Headers } from 'undici';\nimport type { ResponseLike } from '../shared.js';\n\nexport type RequestOptions = Exclude<Parameters<typeof request>[1], undefined>;\n\nexport async function makeRequest(url: string, init: RequestInit): Promise<ResponseLike> {\n\t// The cast is necessary because `headers` and `method` are narrower types in `undici.request`\n\t// our request path guarantees they are of acceptable type for `undici.request`\n\tconst options = {\n\t\t...init,\n\t\tbody: await resolveBody(init.body),\n\t} as RequestOptions;\n\tconst res = await request(url, options);\n\treturn {\n\t\tbody: res.body,\n\t\tasync arrayBuffer() {\n\t\t\treturn res.body.arrayBuffer();\n\t\t},\n\t\tasync json() {\n\t\t\treturn res.body.json();\n\t\t},\n\t\tasync text() {\n\t\t\treturn res.body.text();\n\t\t},\n\t\tget bodyUsed() {\n\t\t\treturn res.body.bodyUsed;\n\t\t},\n\t\theaders: new Headers(res.headers as Record<string, string[] | string>),\n\t\tstatus: res.statusCode,\n\t\tstatusText: STATUS_CODES[res.statusCode]!,\n\t\tok: res.statusCode >= 200 && res.statusCode < 300,\n\t};\n}\n\nexport async function resolveBody(body: RequestInit['body']): Promise<Exclude<RequestOptions['body'], undefined>> {\n\t// eslint-disable-next-line no-eq-null, eqeqeq\n\tif (body == null) {\n\t\treturn null;\n\t} else if (typeof body === 'string') {\n\t\treturn body;\n\t} else if (types.isUint8Array(body)) {\n\t\treturn body;\n\t} else if (types.isArrayBuffer(body)) {\n\t\treturn new Uint8Array(body);\n\t} else if (body instanceof URLSearchParams) {\n\t\treturn body.toString();\n\t} else if (body instanceof DataView) {\n\t\treturn new Uint8Array(body.buffer);\n\t} else if (body instanceof Blob) {\n\t\treturn new Uint8Array(await body.arrayBuffer());\n\t} else if (body instanceof FormData) {\n\t\treturn body;\n\t} else if ((body as Iterable<Uint8Array>)[Symbol.iterator]) {\n\t\tconst chunks = [...(body as Iterable<Uint8Array>)];\n\n\t\treturn Buffer.concat(chunks);\n\t} else if ((body as AsyncIterable<Uint8Array>)[Symbol.asyncIterator]) {\n\t\tconst chunks: Uint8Array[] = [];\n\n\t\tfor await (const chunk of body as AsyncIterable<Uint8Array>) {\n\t\t\tchunks.push(chunk);\n\t\t}\n\n\t\treturn Buffer.concat(chunks);\n\t}\n\n\tthrow new TypeError(`Unable to resolve body.`);\n}\n"],"mappings":";;;;AAAA,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,aAAa;AACtB,SAA2B,SAAS,eAAe;AAKnD,eAAsB,YAAY,KAAa,MAA0C;AAGxF,QAAM,UAAU;AAAA,IACf,GAAG;AAAA,IACH,MAAM,MAAM,YAAY,KAAK,IAAI;AAAA,EAClC;AACA,QAAM,MAAM,MAAM,QAAQ,KAAK,OAAO;AACtC,SAAO;AAAA,IACN,MAAM,IAAI;AAAA,IACV,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,yBAAyB;AAC9C;AAjCsB;","names":[]} \ No newline at end of file
diff --git a/node_modules/@discordjs/rest/dist/types-65527f29.d.ts b/node_modules/@discordjs/rest/dist/types-65527f29.d.ts
new file mode 100644
index 0000000..16c9e8b
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/types-65527f29.d.ts
@@ -0,0 +1,363 @@
+import { Readable } from 'node:stream';
+import { ReadableStream } from 'node:stream/web';
+import { Collection } from '@discordjs/collection';
+import { RequestInit, Dispatcher, Response, BodyInit, Agent } from 'undici';
+
+interface IHandler {
+ /**
+ * The unique id of the handler
+ */
+ readonly id: string;
+ /**
+ * If the bucket is currently inactive (no pending requests)
+ */
+ get inactive(): boolean;
+ /**
+ * Queues a request to be sent
+ *
+ * @param routeId - The generalized api route with literal ids for major parameters
+ * @param url - The url to do the request on
+ * @param options - All the information needed to make a request
+ * @param requestData - Extra data from the user's request needed for errors and additional processing
+ */
+ queueRequest(routeId: RouteData, url: string, options: RequestInit, requestData: HandlerRequestData): Promise<ResponseLike>;
+}
+
+interface RestEvents {
+ handlerSweep: [sweptHandlers: Collection<string, IHandler>];
+ hashSweep: [sweptHashes: Collection<string, HashData>];
+ invalidRequestWarning: [invalidRequestInfo: InvalidRequestWarningData];
+ rateLimited: [rateLimitInfo: RateLimitData];
+ response: [request: APIRequest, response: ResponseLike];
+ restDebug: [info: string];
+}
+type RestEventsMap = {
+ [K in keyof RestEvents]: RestEvents[K];
+};
+/**
+ * Options to be passed when creating the REST instance
+ */
+interface RESTOptions {
+ /**
+ * The agent to set globally
+ */
+ agent: Dispatcher | null;
+ /**
+ * The base api path, without version
+ *
+ * @defaultValue `'https://discord.com/api'`
+ */
+ api: string;
+ /**
+ * The authorization prefix to use for requests, useful if you want to use
+ * bearer tokens
+ *
+ * @defaultValue `'Bot'`
+ */
+ authPrefix: 'Bearer' | 'Bot';
+ /**
+ * The cdn path
+ *
+ * @defaultValue `'https://cdn.discordapp.com'`
+ */
+ cdn: string;
+ /**
+ * How many requests to allow sending per second (Infinity for unlimited, 50 for the standard global limit used by Discord)
+ *
+ * @defaultValue `50`
+ */
+ globalRequestsPerSecond: number;
+ /**
+ * The amount of time in milliseconds that passes between each hash sweep. (defaults to 1h)
+ *
+ * @defaultValue `3_600_000`
+ */
+ handlerSweepInterval: number;
+ /**
+ * The maximum amount of time a hash can exist in milliseconds without being hit with a request (defaults to 24h)
+ *
+ * @defaultValue `86_400_000`
+ */
+ hashLifetime: number;
+ /**
+ * The amount of time in milliseconds that passes between each hash sweep. (defaults to 4h)
+ *
+ * @defaultValue `14_400_000`
+ */
+ hashSweepInterval: number;
+ /**
+ * Additional headers to send for all API requests
+ *
+ * @defaultValue `{}`
+ */
+ headers: Record<string, string>;
+ /**
+ * The number of invalid REST requests (those that return 401, 403, or 429) in a 10 minute window between emitted warnings (0 for no warnings).
+ * That is, if set to 500, warnings will be emitted at invalid request number 500, 1000, 1500, and so on.
+ *
+ * @defaultValue `0`
+ */
+ invalidRequestWarningInterval: number;
+ /**
+ * The method called to perform the actual HTTP request given a url and web `fetch` options
+ * For example, to use global fetch, simply provide `makeRequest: fetch`
+ */
+ makeRequest(url: string, init: RequestInit): Promise<ResponseLike>;
+ /**
+ * The extra offset to add to rate limits in milliseconds
+ *
+ * @defaultValue `50`
+ */
+ offset: number;
+ /**
+ * Determines how rate limiting and pre-emptive throttling should be handled.
+ * When an array of strings, each element is treated as a prefix for the request route
+ * (e.g. `/channels` to match any route starting with `/channels` such as `/channels/:id/messages`)
+ * for which to throw {@link RateLimitError}s. All other request routes will be queued normally
+ *
+ * @defaultValue `null`
+ */
+ rejectOnRateLimit: RateLimitQueueFilter | string[] | null;
+ /**
+ * The number of retries for errors with the 500 code, or errors
+ * that timeout
+ *
+ * @defaultValue `3`
+ */
+ retries: number;
+ /**
+ * The time to wait in milliseconds before a request is aborted
+ *
+ * @defaultValue `15_000`
+ */
+ timeout: number;
+ /**
+ * Extra information to add to the user agent
+ *
+ * @defaultValue DefaultUserAgentAppendix
+ */
+ userAgentAppendix: string;
+ /**
+ * The version of the API to use
+ *
+ * @defaultValue `'10'`
+ */
+ version: string;
+}
+/**
+ * Data emitted on `RESTEvents.RateLimited`
+ */
+interface RateLimitData {
+ /**
+ * Whether the rate limit that was reached was the global limit
+ */
+ global: boolean;
+ /**
+ * The bucket hash for this request
+ */
+ hash: string;
+ /**
+ * The amount of requests we can perform before locking requests
+ */
+ limit: number;
+ /**
+ * The major parameter of the route
+ *
+ * For example, in `/channels/x`, this will be `x`.
+ * If there is no major parameter (e.g: `/bot/gateway`) this will be `global`.
+ */
+ majorParameter: string;
+ /**
+ * The HTTP method being performed
+ */
+ method: string;
+ /**
+ * The route being hit in this request
+ */
+ route: string;
+ /**
+ * The time, in milliseconds, until the request-lock is reset
+ */
+ timeToReset: number;
+ /**
+ * The full URL for this request
+ */
+ url: string;
+}
+/**
+ * A function that determines whether the rate limit hit should throw an Error
+ */
+type RateLimitQueueFilter = (rateLimitData: RateLimitData) => Promise<boolean> | boolean;
+interface APIRequest {
+ /**
+ * The data that was used to form the body of this request
+ */
+ data: HandlerRequestData;
+ /**
+ * The HTTP method used in this request
+ */
+ method: string;
+ /**
+ * Additional HTTP options for this request
+ */
+ options: RequestInit;
+ /**
+ * The full path used to make the request
+ */
+ path: RouteLike;
+ /**
+ * The number of times this request has been attempted
+ */
+ retries: number;
+ /**
+ * The API route identifying the ratelimit for this request
+ */
+ route: string;
+}
+interface ResponseLike extends Pick<Response, 'arrayBuffer' | 'bodyUsed' | 'headers' | 'json' | 'ok' | 'status' | 'statusText' | 'text'> {
+ body: Readable | ReadableStream | null;
+}
+interface InvalidRequestWarningData {
+ /**
+ * Number of invalid requests that have been made in the window
+ */
+ count: number;
+ /**
+ * Time in milliseconds remaining before the count resets
+ */
+ remainingTime: number;
+}
+/**
+ * Represents a file to be added to the request
+ */
+interface RawFile {
+ /**
+ * Content-Type of the file
+ */
+ contentType?: string;
+ /**
+ * The actual data for the file
+ */
+ data: Buffer | Uint8Array | boolean | number | string;
+ /**
+ * An explicit key to use for key of the formdata field for this file.
+ * When not provided, the index of the file in the files array is used in the form `files[${index}]`.
+ * If you wish to alter the placeholder snowflake, you must provide this property in the same form (`files[${placeholder}]`)
+ */
+ key?: string;
+ /**
+ * The name of the file
+ */
+ name: string;
+}
+/**
+ * Represents possible data to be given to an endpoint
+ */
+interface RequestData {
+ /**
+ * Whether to append JSON data to form data instead of `payload_json` when sending files
+ */
+ appendToFormData?: boolean;
+ /**
+ * If this request needs the `Authorization` header
+ *
+ * @defaultValue `true`
+ */
+ auth?: boolean;
+ /**
+ * The authorization prefix to use for this request, useful if you use this with bearer tokens
+ *
+ * @defaultValue `'Bot'`
+ */
+ authPrefix?: 'Bearer' | 'Bot';
+ /**
+ * The body to send to this request.
+ * If providing as BodyInit, set `passThroughBody: true`
+ */
+ body?: BodyInit | unknown;
+ /**
+ * The {@link https://undici.nodejs.org/#/docs/api/Agent | Agent} to use for the request.
+ */
+ dispatcher?: Agent;
+ /**
+ * Files to be attached to this request
+ */
+ files?: RawFile[] | undefined;
+ /**
+ * Additional headers to add to this request
+ */
+ headers?: Record<string, string>;
+ /**
+ * Whether to pass-through the body property directly to `fetch()`.
+ * <warn>This only applies when files is NOT present</warn>
+ */
+ passThroughBody?: boolean;
+ /**
+ * Query string parameters to append to the called endpoint
+ */
+ query?: URLSearchParams;
+ /**
+ * Reason to show in the audit logs
+ */
+ reason?: string | undefined;
+ /**
+ * The signal to abort the queue entry or the REST call, where applicable
+ */
+ signal?: AbortSignal | undefined;
+ /**
+ * If this request should be versioned
+ *
+ * @defaultValue `true`
+ */
+ versioned?: boolean;
+}
+/**
+ * Possible headers for an API call
+ */
+interface RequestHeaders {
+ Authorization?: string;
+ 'User-Agent': string;
+ 'X-Audit-Log-Reason'?: string;
+}
+/**
+ * Possible API methods to be used when doing requests
+ */
+declare enum RequestMethod {
+ Delete = "DELETE",
+ Get = "GET",
+ Patch = "PATCH",
+ Post = "POST",
+ Put = "PUT"
+}
+type RouteLike = `/${string}`;
+/**
+ * Internal request options
+ *
+ * @internal
+ */
+interface InternalRequest extends RequestData {
+ fullRoute: RouteLike;
+ method: RequestMethod;
+}
+type HandlerRequestData = Pick<InternalRequest, 'auth' | 'body' | 'files' | 'signal'>;
+/**
+ * Parsed route data for an endpoint
+ *
+ * @internal
+ */
+interface RouteData {
+ bucketRoute: string;
+ majorParameter: string;
+ original: RouteLike;
+}
+/**
+ * Represents a hash and its associated fields
+ *
+ * @internal
+ */
+interface HashData {
+ lastAccess: number;
+ value: string;
+}
+
+export { APIRequest as A, HashData as H, InternalRequest as I, ResponseLike as R, RawFile as a, RateLimitData as b, RestEventsMap as c, IHandler as d, RESTOptions as e, RouteLike as f, RequestData as g, RestEvents as h, RateLimitQueueFilter as i, InvalidRequestWarningData as j, RequestHeaders as k, RequestMethod as l, HandlerRequestData as m, RouteData as n };
diff --git a/node_modules/@discordjs/rest/dist/web.d.mts b/node_modules/@discordjs/rest/dist/web.d.mts
new file mode 100644
index 0000000..4a4ce8a
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/web.d.mts
@@ -0,0 +1,9 @@
+export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, DiscordErrorData, HTTPError, ImageExtension, ImageSize, ImageURLOptions, MakeURLOptions, OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, RateLimitError, RequestBody, StickerExtension, calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse, version } from './index.mjs';
+export { A as APIRequest, m as HandlerRequestData, H as HashData, I as InternalRequest, j as InvalidRequestWarningData, e as RESTOptions, b as RateLimitData, i as RateLimitQueueFilter, a as RawFile, g as RequestData, k as RequestHeaders, l as RequestMethod, R as ResponseLike, h as RestEvents, c as RestEventsMap, n as RouteData, f as RouteLike } from './types-65527f29.js';
+import 'url';
+import 'discord-api-types/v10';
+import 'undici';
+import '@discordjs/collection';
+import '@vladfrangu/async_event_emitter';
+import 'node:stream';
+import 'node:stream/web';
diff --git a/node_modules/@discordjs/rest/dist/web.d.ts b/node_modules/@discordjs/rest/dist/web.d.ts
new file mode 100644
index 0000000..98e05e9
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/web.d.ts
@@ -0,0 +1,9 @@
+export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, DiscordErrorData, HTTPError, ImageExtension, ImageSize, ImageURLOptions, MakeURLOptions, OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, RateLimitError, RequestBody, StickerExtension, calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse, version } from './index.js';
+export { A as APIRequest, m as HandlerRequestData, H as HashData, I as InternalRequest, j as InvalidRequestWarningData, e as RESTOptions, b as RateLimitData, i as RateLimitQueueFilter, a as RawFile, g as RequestData, k as RequestHeaders, l as RequestMethod, R as ResponseLike, h as RestEvents, c as RestEventsMap, n as RouteData, f as RouteLike } from './types-65527f29.js';
+import 'url';
+import 'discord-api-types/v10';
+import 'undici';
+import '@discordjs/collection';
+import '@vladfrangu/async_event_emitter';
+import 'node:stream';
+import 'node:stream/web';
diff --git a/node_modules/@discordjs/rest/dist/web.js b/node_modules/@discordjs/rest/dist/web.js
new file mode 100644
index 0000000..191975b
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/web.js
@@ -0,0 +1,1355 @@
+"use strict";
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/web.ts
+var web_exports = {};
+__export(web_exports, {
+ ALLOWED_EXTENSIONS: () => ALLOWED_EXTENSIONS,
+ ALLOWED_SIZES: () => ALLOWED_SIZES,
+ ALLOWED_STICKER_EXTENSIONS: () => ALLOWED_STICKER_EXTENSIONS,
+ BurstHandlerMajorIdKey: () => BurstHandlerMajorIdKey,
+ CDN: () => CDN,
+ DefaultRestOptions: () => DefaultRestOptions,
+ DefaultUserAgent: () => DefaultUserAgent,
+ DefaultUserAgentAppendix: () => DefaultUserAgentAppendix,
+ DiscordAPIError: () => DiscordAPIError,
+ HTTPError: () => HTTPError,
+ OverwrittenMimeTypes: () => OverwrittenMimeTypes,
+ REST: () => REST,
+ RESTEvents: () => RESTEvents,
+ RateLimitError: () => RateLimitError,
+ RequestMethod: () => RequestMethod,
+ calculateUserDefaultAvatarIndex: () => calculateUserDefaultAvatarIndex,
+ makeURLSearchParams: () => makeURLSearchParams,
+ parseResponse: () => parseResponse,
+ version: () => version
+});
+module.exports = __toCommonJS(web_exports);
+
+// src/environment.ts
+var defaultStrategy;
+function setDefaultStrategy(newStrategy) {
+ defaultStrategy = newStrategy;
+}
+__name(setDefaultStrategy, "setDefaultStrategy");
+function getDefaultStrategy() {
+ return defaultStrategy;
+}
+__name(getDefaultStrategy, "getDefaultStrategy");
+
+// src/lib/utils/constants.ts
+var import_util = require("@discordjs/util");
+var import_v10 = require("discord-api-types/v10");
+var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.0.1)`;
+var DefaultUserAgentAppendix = (0, import_util.getUserAgentAppendix)();
+var DefaultRestOptions = {
+ agent: null,
+ api: "https://discord.com/api",
+ authPrefix: "Bot",
+ cdn: "https://cdn.discordapp.com",
+ headers: {},
+ invalidRequestWarningInterval: 0,
+ globalRequestsPerSecond: 50,
+ offset: 50,
+ rejectOnRateLimit: null,
+ retries: 3,
+ timeout: 15e3,
+ userAgentAppendix: DefaultUserAgentAppendix,
+ version: import_v10.APIVersion,
+ hashSweepInterval: 144e5,
+ // 4 Hours
+ hashLifetime: 864e5,
+ // 24 Hours
+ handlerSweepInterval: 36e5,
+ // 1 Hour
+ async makeRequest(...args) {
+ return getDefaultStrategy()(...args);
+ }
+};
+var RESTEvents = /* @__PURE__ */ ((RESTEvents2) => {
+ RESTEvents2["Debug"] = "restDebug";
+ RESTEvents2["HandlerSweep"] = "handlerSweep";
+ RESTEvents2["HashSweep"] = "hashSweep";
+ RESTEvents2["InvalidRequestWarning"] = "invalidRequestWarning";
+ RESTEvents2["RateLimited"] = "rateLimited";
+ RESTEvents2["Response"] = "response";
+ return RESTEvents2;
+})(RESTEvents || {});
+var ALLOWED_EXTENSIONS = ["webp", "png", "jpg", "jpeg", "gif"];
+var ALLOWED_STICKER_EXTENSIONS = ["png", "json", "gif"];
+var ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
+var OverwrittenMimeTypes = {
+ // https://github.com/discordjs/discord.js/issues/8557
+ "image/apng": "image/png"
+};
+var BurstHandlerMajorIdKey = "burst";
+
+// src/lib/CDN.ts
+var CDN = class {
+ constructor(base = DefaultRestOptions.cdn) {
+ this.base = base;
+ }
+ static {
+ __name(this, "CDN");
+ }
+ /**
+ * Generates an app asset URL for a client's asset.
+ *
+ * @param clientId - The client id that has the asset
+ * @param assetHash - The hash provided by Discord for this asset
+ * @param options - Optional options for the asset
+ */
+ appAsset(clientId, assetHash, options) {
+ return this.makeURL(`/app-assets/${clientId}/${assetHash}`, options);
+ }
+ /**
+ * Generates an app icon URL for a client's icon.
+ *
+ * @param clientId - The client id that has the icon
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ appIcon(clientId, iconHash, options) {
+ return this.makeURL(`/app-icons/${clientId}/${iconHash}`, options);
+ }
+ /**
+ * Generates an avatar URL, e.g. for a user or a webhook.
+ *
+ * @param id - The id that has the icon
+ * @param avatarHash - The hash provided by Discord for this avatar
+ * @param options - Optional options for the avatar
+ */
+ avatar(id, avatarHash, options) {
+ return this.dynamicMakeURL(`/avatars/${id}/${avatarHash}`, avatarHash, options);
+ }
+ /**
+ * Generates a user avatar decoration URL.
+ *
+ * @param userId - The id of the user
+ * @param userAvatarDecoration - The hash provided by Discord for this avatar decoration
+ * @param options - Optional options for the avatar decoration
+ */
+ avatarDecoration(userId, userAvatarDecoration, options) {
+ return this.makeURL(`/avatar-decorations/${userId}/${userAvatarDecoration}`, options);
+ }
+ /**
+ * Generates a banner URL, e.g. for a user or a guild.
+ *
+ * @param id - The id that has the banner splash
+ * @param bannerHash - The hash provided by Discord for this banner
+ * @param options - Optional options for the banner
+ */
+ banner(id, bannerHash, options) {
+ return this.dynamicMakeURL(`/banners/${id}/${bannerHash}`, bannerHash, options);
+ }
+ /**
+ * Generates an icon URL for a channel, e.g. a group DM.
+ *
+ * @param channelId - The channel id that has the icon
+ * @param iconHash - The hash provided by Discord for this channel
+ * @param options - Optional options for the icon
+ */
+ channelIcon(channelId, iconHash, options) {
+ return this.makeURL(`/channel-icons/${channelId}/${iconHash}`, options);
+ }
+ /**
+ * Generates a default avatar URL
+ *
+ * @param index - The default avatar index
+ * @remarks
+ * To calculate the index for a user do `(userId >> 22) % 6`,
+ * or `discriminator % 5` if they're using the legacy username system.
+ */
+ defaultAvatar(index) {
+ return this.makeURL(`/embed/avatars/${index}`, { extension: "png" });
+ }
+ /**
+ * Generates a discovery splash URL for a guild's discovery splash.
+ *
+ * @param guildId - The guild id that has the discovery splash
+ * @param splashHash - The hash provided by Discord for this splash
+ * @param options - Optional options for the splash
+ */
+ discoverySplash(guildId, splashHash, options) {
+ return this.makeURL(`/discovery-splashes/${guildId}/${splashHash}`, options);
+ }
+ /**
+ * Generates an emoji's URL for an emoji.
+ *
+ * @param emojiId - The emoji id
+ * @param extension - The extension of the emoji
+ */
+ emoji(emojiId, extension) {
+ return this.makeURL(`/emojis/${emojiId}`, { extension });
+ }
+ /**
+ * Generates a guild member avatar URL.
+ *
+ * @param guildId - The id of the guild
+ * @param userId - The id of the user
+ * @param avatarHash - The hash provided by Discord for this avatar
+ * @param options - Optional options for the avatar
+ */
+ guildMemberAvatar(guildId, userId, avatarHash, options) {
+ return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/avatars/${avatarHash}`, avatarHash, options);
+ }
+ /**
+ * Generates a guild member banner URL.
+ *
+ * @param guildId - The id of the guild
+ * @param userId - The id of the user
+ * @param bannerHash - The hash provided by Discord for this banner
+ * @param options - Optional options for the banner
+ */
+ guildMemberBanner(guildId, userId, bannerHash, options) {
+ return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banner`, bannerHash, options);
+ }
+ /**
+ * Generates an icon URL, e.g. for a guild.
+ *
+ * @param id - The id that has the icon splash
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ icon(id, iconHash, options) {
+ return this.dynamicMakeURL(`/icons/${id}/${iconHash}`, iconHash, options);
+ }
+ /**
+ * Generates a URL for the icon of a role
+ *
+ * @param roleId - The id of the role that has the icon
+ * @param roleIconHash - The hash provided by Discord for this role icon
+ * @param options - Optional options for the role icon
+ */
+ roleIcon(roleId, roleIconHash, options) {
+ return this.makeURL(`/role-icons/${roleId}/${roleIconHash}`, options);
+ }
+ /**
+ * Generates a guild invite splash URL for a guild's invite splash.
+ *
+ * @param guildId - The guild id that has the invite splash
+ * @param splashHash - The hash provided by Discord for this splash
+ * @param options - Optional options for the splash
+ */
+ splash(guildId, splashHash, options) {
+ return this.makeURL(`/splashes/${guildId}/${splashHash}`, options);
+ }
+ /**
+ * Generates a sticker URL.
+ *
+ * @param stickerId - The sticker id
+ * @param extension - The extension of the sticker
+ * @privateRemarks
+ * Stickers cannot have a `.webp` extension, so we default to a `.png`
+ */
+ sticker(stickerId, extension = "png") {
+ return this.makeURL(`/stickers/${stickerId}`, { allowedExtensions: ALLOWED_STICKER_EXTENSIONS, extension });
+ }
+ /**
+ * Generates a sticker pack banner URL.
+ *
+ * @param bannerId - The banner id
+ * @param options - Optional options for the banner
+ */
+ stickerPackBanner(bannerId, options) {
+ return this.makeURL(`/app-assets/710982414301790216/store/${bannerId}`, options);
+ }
+ /**
+ * Generates a team icon URL for a team's icon.
+ *
+ * @param teamId - The team id that has the icon
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ teamIcon(teamId, iconHash, options) {
+ return this.makeURL(`/team-icons/${teamId}/${iconHash}`, options);
+ }
+ /**
+ * Generates a cover image for a guild scheduled event.
+ *
+ * @param scheduledEventId - The scheduled event id
+ * @param coverHash - The hash provided by discord for this cover image
+ * @param options - Optional options for the cover image
+ */
+ guildScheduledEventCover(scheduledEventId, coverHash, options) {
+ return this.makeURL(`/guild-events/${scheduledEventId}/${coverHash}`, options);
+ }
+ /**
+ * Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.
+ *
+ * @param route - The base cdn route
+ * @param hash - The hash provided by Discord for this icon
+ * @param options - Optional options for the link
+ */
+ dynamicMakeURL(route, hash, { forceStatic = false, ...options } = {}) {
+ return this.makeURL(route, !forceStatic && hash.startsWith("a_") ? { ...options, extension: "gif" } : options);
+ }
+ /**
+ * Constructs the URL for the resource
+ *
+ * @param route - The base cdn route
+ * @param options - The extension/size options for the link
+ */
+ makeURL(route, { allowedExtensions = ALLOWED_EXTENSIONS, extension = "webp", size } = {}) {
+ extension = String(extension).toLowerCase();
+ if (!allowedExtensions.includes(extension)) {
+ throw new RangeError(`Invalid extension provided: ${extension}
+Must be one of: ${allowedExtensions.join(", ")}`);
+ }
+ if (size && !ALLOWED_SIZES.includes(size)) {
+ throw new RangeError(`Invalid size provided: ${size}
+Must be one of: ${ALLOWED_SIZES.join(", ")}`);
+ }
+ const url = new URL(`${this.base}${route}.${extension}`);
+ if (size) {
+ url.searchParams.set("size", String(size));
+ }
+ return url.toString();
+ }
+};
+
+// src/lib/errors/DiscordAPIError.ts
+function isErrorGroupWrapper(error) {
+ return Reflect.has(error, "_errors");
+}
+__name(isErrorGroupWrapper, "isErrorGroupWrapper");
+function isErrorResponse(error) {
+ return typeof Reflect.get(error, "message") === "string";
+}
+__name(isErrorResponse, "isErrorResponse");
+var DiscordAPIError = class _DiscordAPIError extends Error {
+ /**
+ * @param rawError - The error reported by Discord
+ * @param code - The error code reported by Discord
+ * @param status - The status code of the response
+ * @param method - The method of the request that erred
+ * @param url - The url of the request that erred
+ * @param bodyData - The unparsed data for the request that errored
+ */
+ constructor(rawError, code, status, method, url, bodyData) {
+ super(_DiscordAPIError.getMessage(rawError));
+ this.rawError = rawError;
+ this.code = code;
+ this.status = status;
+ this.method = method;
+ this.url = url;
+ this.requestBody = { files: bodyData.files, json: bodyData.body };
+ }
+ static {
+ __name(this, "DiscordAPIError");
+ }
+ requestBody;
+ /**
+ * The name of the error
+ */
+ get name() {
+ return `${_DiscordAPIError.name}[${this.code}]`;
+ }
+ static getMessage(error) {
+ let flattened = "";
+ if ("code" in error) {
+ if (error.errors) {
+ flattened = [...this.flattenDiscordError(error.errors)].join("\n");
+ }
+ return error.message && flattened ? `${error.message}
+${flattened}` : error.message || flattened || "Unknown Error";
+ }
+ return error.error_description ?? "No Description";
+ }
+ static *flattenDiscordError(obj, key = "") {
+ if (isErrorResponse(obj)) {
+ return yield `${key.length ? `${key}[${obj.code}]` : `${obj.code}`}: ${obj.message}`.trim();
+ }
+ for (const [otherKey, val] of Object.entries(obj)) {
+ const nextKey = otherKey.startsWith("_") ? key : key ? Number.isNaN(Number(otherKey)) ? `${key}.${otherKey}` : `${key}[${otherKey}]` : otherKey;
+ if (typeof val === "string") {
+ yield val;
+ } else if (isErrorGroupWrapper(val)) {
+ for (const error of val._errors) {
+ yield* this.flattenDiscordError(error, nextKey);
+ }
+ } else {
+ yield* this.flattenDiscordError(val, nextKey);
+ }
+ }
+ }
+};
+
+// src/lib/errors/HTTPError.ts
+var HTTPError = class _HTTPError extends Error {
+ /**
+ * @param status - The status code of the response
+ * @param statusText - The status text of the response
+ * @param method - The method of the request that erred
+ * @param url - The url of the request that erred
+ * @param bodyData - The unparsed data for the request that errored
+ */
+ constructor(status, statusText, method, url, bodyData) {
+ super(statusText);
+ this.status = status;
+ this.method = method;
+ this.url = url;
+ this.requestBody = { files: bodyData.files, json: bodyData.body };
+ }
+ static {
+ __name(this, "HTTPError");
+ }
+ requestBody;
+ name = _HTTPError.name;
+};
+
+// src/lib/errors/RateLimitError.ts
+var RateLimitError = class _RateLimitError extends Error {
+ static {
+ __name(this, "RateLimitError");
+ }
+ timeToReset;
+ limit;
+ method;
+ hash;
+ url;
+ route;
+ majorParameter;
+ global;
+ constructor({ timeToReset, limit, method, hash, url, route, majorParameter, global }) {
+ super();
+ this.timeToReset = timeToReset;
+ this.limit = limit;
+ this.method = method;
+ this.hash = hash;
+ this.url = url;
+ this.route = route;
+ this.majorParameter = majorParameter;
+ this.global = global;
+ }
+ /**
+ * The name of the error
+ */
+ get name() {
+ return `${_RateLimitError.name}[${this.route}]`;
+ }
+};
+
+// src/lib/REST.ts
+var import_collection = require("@discordjs/collection");
+var import_snowflake = require("@sapphire/snowflake");
+var import_async_event_emitter = require("@vladfrangu/async_event_emitter");
+var import_magic_bytes = require("magic-bytes.js");
+
+// src/lib/utils/types.ts
+var RequestMethod = /* @__PURE__ */ ((RequestMethod2) => {
+ RequestMethod2["Delete"] = "DELETE";
+ RequestMethod2["Get"] = "GET";
+ RequestMethod2["Patch"] = "PATCH";
+ RequestMethod2["Post"] = "POST";
+ RequestMethod2["Put"] = "PUT";
+ return RequestMethod2;
+})(RequestMethod || {});
+
+// src/lib/utils/utils.ts
+function serializeSearchParam(value) {
+ switch (typeof value) {
+ case "string":
+ return value;
+ case "number":
+ case "bigint":
+ case "boolean":
+ return value.toString();
+ case "object":
+ if (value === null)
+ return null;
+ if (value instanceof Date) {
+ return Number.isNaN(value.getTime()) ? null : value.toISOString();
+ }
+ if (typeof value.toString === "function" && value.toString !== Object.prototype.toString)
+ return value.toString();
+ return null;
+ default:
+ return null;
+ }
+}
+__name(serializeSearchParam, "serializeSearchParam");
+function makeURLSearchParams(options) {
+ const params = new URLSearchParams();
+ if (!options)
+ return params;
+ for (const [key, value] of Object.entries(options)) {
+ const serialized = serializeSearchParam(value);
+ if (serialized !== null)
+ params.append(key, serialized);
+ }
+ return params;
+}
+__name(makeURLSearchParams, "makeURLSearchParams");
+async function parseResponse(res) {
+ if (res.headers.get("Content-Type")?.startsWith("application/json")) {
+ return res.json();
+ }
+ return res.arrayBuffer();
+}
+__name(parseResponse, "parseResponse");
+function hasSublimit(bucketRoute, body, method) {
+ if (bucketRoute === "/channels/:id") {
+ if (typeof body !== "object" || body === null)
+ return false;
+ if (method !== "PATCH" /* Patch */)
+ return false;
+ const castedBody = body;
+ return ["name", "topic"].some((key) => Reflect.has(castedBody, key));
+ }
+ return true;
+}
+__name(hasSublimit, "hasSublimit");
+function shouldRetry(error) {
+ if (error.name === "AbortError")
+ return true;
+ return "code" in error && error.code === "ECONNRESET" || error.message.includes("ECONNRESET");
+}
+__name(shouldRetry, "shouldRetry");
+async function onRateLimit(manager, rateLimitData) {
+ const { options } = manager;
+ if (!options.rejectOnRateLimit)
+ return;
+ const shouldThrow = typeof options.rejectOnRateLimit === "function" ? await options.rejectOnRateLimit(rateLimitData) : options.rejectOnRateLimit.some((route) => rateLimitData.route.startsWith(route.toLowerCase()));
+ if (shouldThrow) {
+ throw new RateLimitError(rateLimitData);
+ }
+}
+__name(onRateLimit, "onRateLimit");
+function calculateUserDefaultAvatarIndex(userId) {
+ return Number(BigInt(userId) >> 22n) % 6;
+}
+__name(calculateUserDefaultAvatarIndex, "calculateUserDefaultAvatarIndex");
+async function sleep(ms) {
+ return new Promise((resolve) => {
+ setTimeout(() => resolve(), ms);
+ });
+}
+__name(sleep, "sleep");
+function isBufferLike(value) {
+ return value instanceof ArrayBuffer || value instanceof Uint8Array || value instanceof Uint8ClampedArray;
+}
+__name(isBufferLike, "isBufferLike");
+
+// src/lib/handlers/Shared.ts
+var invalidCount = 0;
+var invalidCountResetTime = null;
+function incrementInvalidCount(manager) {
+ if (!invalidCountResetTime || invalidCountResetTime < Date.now()) {
+ invalidCountResetTime = Date.now() + 1e3 * 60 * 10;
+ invalidCount = 0;
+ }
+ invalidCount++;
+ const emitInvalid = manager.options.invalidRequestWarningInterval > 0 && invalidCount % manager.options.invalidRequestWarningInterval === 0;
+ if (emitInvalid) {
+ manager.emit("invalidRequestWarning" /* InvalidRequestWarning */, {
+ count: invalidCount,
+ remainingTime: invalidCountResetTime - Date.now()
+ });
+ }
+}
+__name(incrementInvalidCount, "incrementInvalidCount");
+async function makeNetworkRequest(manager, routeId, url, options, requestData, retries) {
+ const controller = new AbortController();
+ const timeout = setTimeout(() => controller.abort(), manager.options.timeout);
+ if (requestData.signal) {
+ if (requestData.signal.aborted)
+ controller.abort();
+ else
+ requestData.signal.addEventListener("abort", () => controller.abort());
+ }
+ let res;
+ try {
+ res = await manager.options.makeRequest(url, { ...options, signal: controller.signal });
+ } catch (error) {
+ if (!(error instanceof Error))
+ throw error;
+ if (shouldRetry(error) && retries !== manager.options.retries) {
+ return null;
+ }
+ throw error;
+ } finally {
+ clearTimeout(timeout);
+ }
+ if (manager.listenerCount("response" /* Response */)) {
+ manager.emit(
+ "response" /* Response */,
+ {
+ method: options.method ?? "get",
+ path: routeId.original,
+ route: routeId.bucketRoute,
+ options,
+ data: requestData,
+ retries
+ },
+ res instanceof Response ? res.clone() : { ...res }
+ );
+ }
+ return res;
+}
+__name(makeNetworkRequest, "makeNetworkRequest");
+async function handleErrors(manager, res, method, url, requestData, retries) {
+ const status = res.status;
+ if (status >= 500 && status < 600) {
+ if (retries !== manager.options.retries) {
+ return null;
+ }
+ throw new HTTPError(status, res.statusText, method, url, requestData);
+ } else {
+ if (status >= 400 && status < 500) {
+ if (status === 401 && requestData.auth) {
+ manager.setToken(null);
+ }
+ const data = await parseResponse(res);
+ throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
+ }
+ return res;
+ }
+}
+__name(handleErrors, "handleErrors");
+
+// src/lib/handlers/BurstHandler.ts
+var BurstHandler = class {
+ /**
+ * @param manager - The request manager
+ * @param hash - The hash that this RequestHandler handles
+ * @param majorParameter - The major parameter for this handler
+ */
+ constructor(manager, hash, majorParameter) {
+ this.manager = manager;
+ this.hash = hash;
+ this.majorParameter = majorParameter;
+ this.id = `${hash}:${majorParameter}`;
+ }
+ static {
+ __name(this, "BurstHandler");
+ }
+ /**
+ * {@inheritdoc IHandler.id}
+ */
+ id;
+ /**
+ * {@inheritDoc IHandler.inactive}
+ */
+ inactive = false;
+ /**
+ * Emits a debug message
+ *
+ * @param message - The message to debug
+ */
+ debug(message) {
+ this.manager.emit("restDebug" /* Debug */, `[REST ${this.id}] ${message}`);
+ }
+ /**
+ * {@inheritDoc IHandler.queueRequest}
+ */
+ async queueRequest(routeId, url, options, requestData) {
+ return this.runRequest(routeId, url, options, requestData);
+ }
+ /**
+ * The method that actually makes the request to the API, and updates info about the bucket accordingly
+ *
+ * @param routeId - The generalized API route with literal ids for major parameters
+ * @param url - The fully resolved URL to make the request to
+ * @param options - The fetch options needed to make the request
+ * @param requestData - Extra data from the user's request needed for errors and additional processing
+ * @param retries - The number of retries this request has already attempted (recursion)
+ */
+ async runRequest(routeId, url, options, requestData, retries = 0) {
+ const method = options.method ?? "get";
+ const res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries);
+ if (res === null) {
+ return this.runRequest(routeId, url, options, requestData, ++retries);
+ }
+ const status = res.status;
+ let retryAfter = 0;
+ const retry = res.headers.get("Retry-After");
+ if (retry)
+ retryAfter = Number(retry) * 1e3 + this.manager.options.offset;
+ if (status === 401 || status === 403 || status === 429) {
+ incrementInvalidCount(this.manager);
+ }
+ if (status >= 200 && status < 300) {
+ return res;
+ } else if (status === 429) {
+ const isGlobal = res.headers.has("X-RateLimit-Global");
+ await onRateLimit(this.manager, {
+ timeToReset: retryAfter,
+ limit: Number.POSITIVE_INFINITY,
+ method,
+ hash: this.hash,
+ url,
+ route: routeId.bucketRoute,
+ majorParameter: this.majorParameter,
+ global: isGlobal
+ });
+ this.debug(
+ [
+ "Encountered unexpected 429 rate limit",
+ ` Global : ${isGlobal}`,
+ ` Method : ${method}`,
+ ` URL : ${url}`,
+ ` Bucket : ${routeId.bucketRoute}`,
+ ` Major parameter: ${routeId.majorParameter}`,
+ ` Hash : ${this.hash}`,
+ ` Limit : ${Number.POSITIVE_INFINITY}`,
+ ` Retry After : ${retryAfter}ms`,
+ ` Sublimit : None`
+ ].join("\n")
+ );
+ await sleep(retryAfter);
+ return this.runRequest(routeId, url, options, requestData, retries);
+ } else {
+ const handled = await handleErrors(this.manager, res, method, url, requestData, retries);
+ if (handled === null) {
+ return this.runRequest(routeId, url, options, requestData, ++retries);
+ }
+ return handled;
+ }
+ }
+};
+
+// src/lib/handlers/SequentialHandler.ts
+var import_async_queue = require("@sapphire/async-queue");
+var SequentialHandler = class {
+ /**
+ * @param manager - The request manager
+ * @param hash - The hash that this RequestHandler handles
+ * @param majorParameter - The major parameter for this handler
+ */
+ constructor(manager, hash, majorParameter) {
+ this.manager = manager;
+ this.hash = hash;
+ this.majorParameter = majorParameter;
+ this.id = `${hash}:${majorParameter}`;
+ }
+ static {
+ __name(this, "SequentialHandler");
+ }
+ /**
+ * {@inheritDoc IHandler.id}
+ */
+ id;
+ /**
+ * The time this rate limit bucket will reset
+ */
+ reset = -1;
+ /**
+ * The remaining requests that can be made before we are rate limited
+ */
+ remaining = 1;
+ /**
+ * The total number of requests that can be made before we are rate limited
+ */
+ limit = Number.POSITIVE_INFINITY;
+ /**
+ * The interface used to sequence async requests sequentially
+ */
+ #asyncQueue = new import_async_queue.AsyncQueue();
+ /**
+ * The interface used to sequence sublimited async requests sequentially
+ */
+ #sublimitedQueue = null;
+ /**
+ * A promise wrapper for when the sublimited queue is finished being processed or null when not being processed
+ */
+ #sublimitPromise = null;
+ /**
+ * Whether the sublimit queue needs to be shifted in the finally block
+ */
+ #shiftSublimit = false;
+ /**
+ * {@inheritDoc IHandler.inactive}
+ */
+ get inactive() {
+ return this.#asyncQueue.remaining === 0 && (this.#sublimitedQueue === null || this.#sublimitedQueue.remaining === 0) && !this.limited;
+ }
+ /**
+ * If the rate limit bucket is currently limited by the global limit
+ */
+ get globalLimited() {
+ return this.manager.globalRemaining <= 0 && Date.now() < this.manager.globalReset;
+ }
+ /**
+ * If the rate limit bucket is currently limited by its limit
+ */
+ get localLimited() {
+ return this.remaining <= 0 && Date.now() < this.reset;
+ }
+ /**
+ * If the rate limit bucket is currently limited
+ */
+ get limited() {
+ return this.globalLimited || this.localLimited;
+ }
+ /**
+ * The time until queued requests can continue
+ */
+ get timeToReset() {
+ return this.reset + this.manager.options.offset - Date.now();
+ }
+ /**
+ * Emits a debug message
+ *
+ * @param message - The message to debug
+ */
+ debug(message) {
+ this.manager.emit("restDebug" /* Debug */, `[REST ${this.id}] ${message}`);
+ }
+ /**
+ * Delay all requests for the specified amount of time, handling global rate limits
+ *
+ * @param time - The amount of time to delay all requests for
+ */
+ async globalDelayFor(time) {
+ await sleep(time);
+ this.manager.globalDelay = null;
+ }
+ /**
+ * {@inheritDoc IHandler.queueRequest}
+ */
+ async queueRequest(routeId, url, options, requestData) {
+ let queue = this.#asyncQueue;
+ let queueType = 0 /* Standard */;
+ if (this.#sublimitedQueue && hasSublimit(routeId.bucketRoute, requestData.body, options.method)) {
+ queue = this.#sublimitedQueue;
+ queueType = 1 /* Sublimit */;
+ }
+ await queue.wait({ signal: requestData.signal });
+ if (queueType === 0 /* Standard */) {
+ if (this.#sublimitedQueue && hasSublimit(routeId.bucketRoute, requestData.body, options.method)) {
+ queue = this.#sublimitedQueue;
+ const wait = queue.wait();
+ this.#asyncQueue.shift();
+ await wait;
+ } else if (this.#sublimitPromise) {
+ await this.#sublimitPromise.promise;
+ }
+ }
+ try {
+ return await this.runRequest(routeId, url, options, requestData);
+ } finally {
+ queue.shift();
+ if (this.#shiftSublimit) {
+ this.#shiftSublimit = false;
+ this.#sublimitedQueue?.shift();
+ }
+ if (this.#sublimitedQueue?.remaining === 0) {
+ this.#sublimitPromise?.resolve();
+ this.#sublimitedQueue = null;
+ }
+ }
+ }
+ /**
+ * The method that actually makes the request to the api, and updates info about the bucket accordingly
+ *
+ * @param routeId - The generalized api route with literal ids for major parameters
+ * @param url - The fully resolved url to make the request to
+ * @param options - The fetch options needed to make the request
+ * @param requestData - Extra data from the user's request needed for errors and additional processing
+ * @param retries - The number of retries this request has already attempted (recursion)
+ */
+ async runRequest(routeId, url, options, requestData, retries = 0) {
+ while (this.limited) {
+ const isGlobal = this.globalLimited;
+ let limit2;
+ let timeout;
+ let delay;
+ if (isGlobal) {
+ limit2 = this.manager.options.globalRequestsPerSecond;
+ timeout = this.manager.globalReset + this.manager.options.offset - Date.now();
+ if (!this.manager.globalDelay) {
+ this.manager.globalDelay = this.globalDelayFor(timeout);
+ }
+ delay = this.manager.globalDelay;
+ } else {
+ limit2 = this.limit;
+ timeout = this.timeToReset;
+ delay = sleep(timeout);
+ }
+ const rateLimitData = {
+ timeToReset: timeout,
+ limit: limit2,
+ method: options.method ?? "get",
+ hash: this.hash,
+ url,
+ route: routeId.bucketRoute,
+ majorParameter: this.majorParameter,
+ global: isGlobal
+ };
+ this.manager.emit("rateLimited" /* RateLimited */, rateLimitData);
+ await onRateLimit(this.manager, rateLimitData);
+ if (isGlobal) {
+ this.debug(`Global rate limit hit, blocking all requests for ${timeout}ms`);
+ } else {
+ this.debug(`Waiting ${timeout}ms for rate limit to pass`);
+ }
+ await delay;
+ }
+ if (!this.manager.globalReset || this.manager.globalReset < Date.now()) {
+ this.manager.globalReset = Date.now() + 1e3;
+ this.manager.globalRemaining = this.manager.options.globalRequestsPerSecond;
+ }
+ this.manager.globalRemaining--;
+ const method = options.method ?? "get";
+ const res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries);
+ if (res === null) {
+ return this.runRequest(routeId, url, options, requestData, ++retries);
+ }
+ const status = res.status;
+ let retryAfter = 0;
+ const limit = res.headers.get("X-RateLimit-Limit");
+ const remaining = res.headers.get("X-RateLimit-Remaining");
+ const reset = res.headers.get("X-RateLimit-Reset-After");
+ const hash = res.headers.get("X-RateLimit-Bucket");
+ const retry = res.headers.get("Retry-After");
+ this.limit = limit ? Number(limit) : Number.POSITIVE_INFINITY;
+ this.remaining = remaining ? Number(remaining) : 1;
+ this.reset = reset ? Number(reset) * 1e3 + Date.now() + this.manager.options.offset : Date.now();
+ if (retry)
+ retryAfter = Number(retry) * 1e3 + this.manager.options.offset;
+ if (hash && hash !== this.hash) {
+ this.debug(["Received bucket hash update", ` Old Hash : ${this.hash}`, ` New Hash : ${hash}`].join("\n"));
+ this.manager.hashes.set(`${method}:${routeId.bucketRoute}`, { value: hash, lastAccess: Date.now() });
+ } else if (hash) {
+ const hashData = this.manager.hashes.get(`${method}:${routeId.bucketRoute}`);
+ if (hashData) {
+ hashData.lastAccess = Date.now();
+ }
+ }
+ let sublimitTimeout = null;
+ if (retryAfter > 0) {
+ if (res.headers.has("X-RateLimit-Global")) {
+ this.manager.globalRemaining = 0;
+ this.manager.globalReset = Date.now() + retryAfter;
+ } else if (!this.localLimited) {
+ sublimitTimeout = retryAfter;
+ }
+ }
+ if (status === 401 || status === 403 || status === 429) {
+ incrementInvalidCount(this.manager);
+ }
+ if (res.ok) {
+ return res;
+ } else if (status === 429) {
+ const isGlobal = this.globalLimited;
+ let limit2;
+ let timeout;
+ if (isGlobal) {
+ limit2 = this.manager.options.globalRequestsPerSecond;
+ timeout = this.manager.globalReset + this.manager.options.offset - Date.now();
+ } else {
+ limit2 = this.limit;
+ timeout = this.timeToReset;
+ }
+ await onRateLimit(this.manager, {
+ timeToReset: timeout,
+ limit: limit2,
+ method,
+ hash: this.hash,
+ url,
+ route: routeId.bucketRoute,
+ majorParameter: this.majorParameter,
+ global: isGlobal
+ });
+ this.debug(
+ [
+ "Encountered unexpected 429 rate limit",
+ ` Global : ${isGlobal.toString()}`,
+ ` Method : ${method}`,
+ ` URL : ${url}`,
+ ` Bucket : ${routeId.bucketRoute}`,
+ ` Major parameter: ${routeId.majorParameter}`,
+ ` Hash : ${this.hash}`,
+ ` Limit : ${limit2}`,
+ ` Retry After : ${retryAfter}ms`,
+ ` Sublimit : ${sublimitTimeout ? `${sublimitTimeout}ms` : "None"}`
+ ].join("\n")
+ );
+ if (sublimitTimeout) {
+ const firstSublimit = !this.#sublimitedQueue;
+ if (firstSublimit) {
+ this.#sublimitedQueue = new import_async_queue.AsyncQueue();
+ void this.#sublimitedQueue.wait();
+ this.#asyncQueue.shift();
+ }
+ this.#sublimitPromise?.resolve();
+ this.#sublimitPromise = null;
+ await sleep(sublimitTimeout);
+ let resolve;
+ const promise = new Promise((res2) => resolve = res2);
+ this.#sublimitPromise = { promise, resolve };
+ if (firstSublimit) {
+ await this.#asyncQueue.wait();
+ this.#shiftSublimit = true;
+ }
+ }
+ return this.runRequest(routeId, url, options, requestData, retries);
+ } else {
+ const handled = await handleErrors(this.manager, res, method, url, requestData, retries);
+ if (handled === null) {
+ return this.runRequest(routeId, url, options, requestData, ++retries);
+ }
+ return handled;
+ }
+ }
+};
+
+// src/lib/REST.ts
+var REST = class _REST extends import_async_event_emitter.AsyncEventEmitter {
+ static {
+ __name(this, "REST");
+ }
+ /**
+ * The {@link https://undici.nodejs.org/#/docs/api/Agent | Agent} for all requests
+ * performed by this manager.
+ */
+ agent = null;
+ cdn;
+ /**
+ * The number of requests remaining in the global bucket
+ */
+ globalRemaining;
+ /**
+ * The promise used to wait out the global rate limit
+ */
+ globalDelay = null;
+ /**
+ * The timestamp at which the global bucket resets
+ */
+ globalReset = -1;
+ /**
+ * API bucket hashes that are cached from provided routes
+ */
+ hashes = new import_collection.Collection();
+ /**
+ * Request handlers created from the bucket hash and the major parameters
+ */
+ handlers = new import_collection.Collection();
+ #token = null;
+ hashTimer;
+ handlerTimer;
+ options;
+ constructor(options = {}) {
+ super();
+ this.cdn = new CDN(options.cdn ?? DefaultRestOptions.cdn);
+ this.options = { ...DefaultRestOptions, ...options };
+ this.options.offset = Math.max(0, this.options.offset);
+ this.globalRemaining = Math.max(1, this.options.globalRequestsPerSecond);
+ this.agent = options.agent ?? null;
+ this.setupSweepers();
+ }
+ setupSweepers() {
+ const validateMaxInterval = /* @__PURE__ */ __name((interval) => {
+ if (interval > 144e5) {
+ throw new Error("Cannot set an interval greater than 4 hours");
+ }
+ }, "validateMaxInterval");
+ if (this.options.hashSweepInterval !== 0 && this.options.hashSweepInterval !== Number.POSITIVE_INFINITY) {
+ validateMaxInterval(this.options.hashSweepInterval);
+ this.hashTimer = setInterval(() => {
+ const sweptHashes = new import_collection.Collection();
+ const currentDate = Date.now();
+ this.hashes.sweep((val, key) => {
+ if (val.lastAccess === -1)
+ return false;
+ const shouldSweep = Math.floor(currentDate - val.lastAccess) > this.options.hashLifetime;
+ if (shouldSweep) {
+ sweptHashes.set(key, val);
+ this.emit("restDebug" /* Debug */, `Hash ${val.value} for ${key} swept due to lifetime being exceeded`);
+ }
+ return shouldSweep;
+ });
+ this.emit("hashSweep" /* HashSweep */, sweptHashes);
+ }, this.options.hashSweepInterval);
+ this.hashTimer.unref?.();
+ }
+ if (this.options.handlerSweepInterval !== 0 && this.options.handlerSweepInterval !== Number.POSITIVE_INFINITY) {
+ validateMaxInterval(this.options.handlerSweepInterval);
+ this.handlerTimer = setInterval(() => {
+ const sweptHandlers = new import_collection.Collection();
+ this.handlers.sweep((val, key) => {
+ const { inactive } = val;
+ if (inactive) {
+ sweptHandlers.set(key, val);
+ this.emit("restDebug" /* Debug */, `Handler ${val.id} for ${key} swept due to being inactive`);
+ }
+ return inactive;
+ });
+ this.emit("handlerSweep" /* HandlerSweep */, sweptHandlers);
+ }, this.options.handlerSweepInterval);
+ this.handlerTimer.unref?.();
+ }
+ }
+ /**
+ * Runs a get request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async get(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "GET" /* Get */ });
+ }
+ /**
+ * Runs a delete request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async delete(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "DELETE" /* Delete */ });
+ }
+ /**
+ * Runs a post request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async post(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "POST" /* Post */ });
+ }
+ /**
+ * Runs a put request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async put(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "PUT" /* Put */ });
+ }
+ /**
+ * Runs a patch request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async patch(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "PATCH" /* Patch */ });
+ }
+ /**
+ * Runs a request from the api
+ *
+ * @param options - Request options
+ */
+ async request(options) {
+ const response = await this.queueRequest(options);
+ return parseResponse(response);
+ }
+ /**
+ * Sets the default agent to use for requests performed by this manager
+ *
+ * @param agent - The agent to use
+ */
+ setAgent(agent) {
+ this.agent = agent;
+ return this;
+ }
+ /**
+ * Sets the authorization token that should be used for requests
+ *
+ * @param token - The authorization token to use
+ */
+ setToken(token) {
+ this.#token = token;
+ return this;
+ }
+ /**
+ * Queues a request to be sent
+ *
+ * @param request - All the information needed to make a request
+ * @returns The response from the api request
+ */
+ async queueRequest(request) {
+ const routeId = _REST.generateRouteData(request.fullRoute, request.method);
+ const hash = this.hashes.get(`${request.method}:${routeId.bucketRoute}`) ?? {
+ value: `Global(${request.method}:${routeId.bucketRoute})`,
+ lastAccess: -1
+ };
+ const handler = this.handlers.get(`${hash.value}:${routeId.majorParameter}`) ?? this.createHandler(hash.value, routeId.majorParameter);
+ const { url, fetchOptions } = await this.resolveRequest(request);
+ return handler.queueRequest(routeId, url, fetchOptions, {
+ body: request.body,
+ files: request.files,
+ auth: request.auth !== false,
+ signal: request.signal
+ });
+ }
+ /**
+ * Creates a new rate limit handler from a hash, based on the hash and the major parameter
+ *
+ * @param hash - The hash for the route
+ * @param majorParameter - The major parameter for this handler
+ * @internal
+ */
+ createHandler(hash, majorParameter) {
+ const queue = majorParameter === BurstHandlerMajorIdKey ? new BurstHandler(this, hash, majorParameter) : new SequentialHandler(this, hash, majorParameter);
+ this.handlers.set(queue.id, queue);
+ return queue;
+ }
+ /**
+ * Formats the request data to a usable format for fetch
+ *
+ * @param request - The request data
+ */
+ async resolveRequest(request) {
+ const { options } = this;
+ let query = "";
+ if (request.query) {
+ const resolvedQuery = request.query.toString();
+ if (resolvedQuery !== "") {
+ query = `?${resolvedQuery}`;
+ }
+ }
+ const headers = {
+ ...this.options.headers,
+ "User-Agent": `${DefaultUserAgent} ${options.userAgentAppendix}`.trim()
+ };
+ if (request.auth !== false) {
+ if (!this.#token) {
+ throw new Error("Expected token to be set for this request, but none was present");
+ }
+ headers.Authorization = `${request.authPrefix ?? this.options.authPrefix} ${this.#token}`;
+ }
+ if (request.reason?.length) {
+ headers["X-Audit-Log-Reason"] = encodeURIComponent(request.reason);
+ }
+ const url = `${options.api}${request.versioned === false ? "" : `/v${options.version}`}${request.fullRoute}${query}`;
+ let finalBody;
+ let additionalHeaders = {};
+ if (request.files?.length) {
+ const formData = new FormData();
+ for (const [index, file] of request.files.entries()) {
+ const fileKey = file.key ?? `files[${index}]`;
+ if (isBufferLike(file.data)) {
+ let contentType = file.contentType;
+ if (!contentType) {
+ const [parsedType] = (0, import_magic_bytes.filetypeinfo)(file.data);
+ if (parsedType) {
+ contentType = OverwrittenMimeTypes[parsedType.mime] ?? parsedType.mime ?? "application/octet-stream";
+ }
+ }
+ formData.append(fileKey, new Blob([file.data], { type: contentType }), file.name);
+ } else {
+ formData.append(fileKey, new Blob([`${file.data}`], { type: file.contentType }), file.name);
+ }
+ }
+ if (request.body != null) {
+ if (request.appendToFormData) {
+ for (const [key, value] of Object.entries(request.body)) {
+ formData.append(key, value);
+ }
+ } else {
+ formData.append("payload_json", JSON.stringify(request.body));
+ }
+ }
+ finalBody = formData;
+ } else if (request.body != null) {
+ if (request.passThroughBody) {
+ finalBody = request.body;
+ } else {
+ finalBody = JSON.stringify(request.body);
+ additionalHeaders = { "Content-Type": "application/json" };
+ }
+ }
+ const method = request.method.toUpperCase();
+ const fetchOptions = {
+ // Set body to null on get / head requests. This does not follow fetch spec (likely because it causes subtle bugs) but is aligned with what request was doing
+ body: ["GET", "HEAD"].includes(method) ? null : finalBody,
+ headers: { ...request.headers, ...additionalHeaders, ...headers },
+ method,
+ // Prioritize setting an agent per request, use the agent for this instance otherwise.
+ dispatcher: request.dispatcher ?? this.agent ?? void 0
+ };
+ return { url, fetchOptions };
+ }
+ /**
+ * Stops the hash sweeping interval
+ */
+ clearHashSweeper() {
+ clearInterval(this.hashTimer);
+ }
+ /**
+ * Stops the request handler sweeping interval
+ */
+ clearHandlerSweeper() {
+ clearInterval(this.handlerTimer);
+ }
+ /**
+ * Generates route data for an endpoint:method
+ *
+ * @param endpoint - The raw endpoint to generalize
+ * @param method - The HTTP method this endpoint is called without
+ * @internal
+ */
+ static generateRouteData(endpoint, method) {
+ if (endpoint.startsWith("/interactions/") && endpoint.endsWith("/callback")) {
+ return {
+ majorParameter: BurstHandlerMajorIdKey,
+ bucketRoute: "/interactions/:id/:token/callback",
+ original: endpoint
+ };
+ }
+ const majorIdMatch = /^\/(?:channels|guilds|webhooks)\/(\d{17,19})/.exec(endpoint);
+ const majorId = majorIdMatch?.[1] ?? "global";
+ const baseRoute = endpoint.replaceAll(/\d{17,19}/g, ":id").replace(/\/reactions\/(.*)/, "/reactions/:reaction");
+ let exceptions = "";
+ if (method === "DELETE" /* Delete */ && baseRoute === "/channels/:id/messages/:id") {
+ const id = /\d{17,19}$/.exec(endpoint)[0];
+ const timestamp = import_snowflake.DiscordSnowflake.timestampFrom(id);
+ if (Date.now() - timestamp > 1e3 * 60 * 60 * 24 * 14) {
+ exceptions += "/Delete Old Message";
+ }
+ }
+ return {
+ majorParameter: majorId,
+ bucketRoute: baseRoute + exceptions,
+ original: endpoint
+ };
+ }
+};
+
+// src/shared.ts
+var version = "2.0.1";
+
+// src/web.ts
+setDefaultStrategy(fetch);
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ ALLOWED_EXTENSIONS,
+ ALLOWED_SIZES,
+ ALLOWED_STICKER_EXTENSIONS,
+ BurstHandlerMajorIdKey,
+ CDN,
+ DefaultRestOptions,
+ DefaultUserAgent,
+ DefaultUserAgentAppendix,
+ DiscordAPIError,
+ HTTPError,
+ OverwrittenMimeTypes,
+ REST,
+ RESTEvents,
+ RateLimitError,
+ RequestMethod,
+ calculateUserDefaultAvatarIndex,
+ makeURLSearchParams,
+ parseResponse,
+ version
+});
+//# sourceMappingURL=web.js.map \ No newline at end of file
diff --git a/node_modules/@discordjs/rest/dist/web.js.map b/node_modules/@discordjs/rest/dist/web.js.map
new file mode 100644
index 0000000..69abc89
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/web.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/web.ts","../src/environment.ts","../src/lib/utils/constants.ts","../src/lib/CDN.ts","../src/lib/errors/DiscordAPIError.ts","../src/lib/errors/HTTPError.ts","../src/lib/errors/RateLimitError.ts","../src/lib/REST.ts","../src/lib/utils/types.ts","../src/lib/utils/utils.ts","../src/lib/handlers/Shared.ts","../src/lib/handlers/BurstHandler.ts","../src/lib/handlers/SequentialHandler.ts","../src/shared.ts"],"sourcesContent":["import { setDefaultStrategy } from './environment.js';\n\nsetDefaultStrategy(fetch);\n\nexport * from './shared.js';\n","import type { RESTOptions } from './shared.js';\n\nlet defaultStrategy: RESTOptions['makeRequest'];\n\nexport function setDefaultStrategy(newStrategy: RESTOptions['makeRequest']) {\n\tdefaultStrategy = newStrategy;\n}\n\nexport function getDefaultStrategy() {\n\treturn defaultStrategy;\n}\n","import { getUserAgentAppendix } from '@discordjs/util';\nimport { APIVersion } from 'discord-api-types/v10';\nimport { getDefaultStrategy } from '../../environment.js';\nimport type { RESTOptions, ResponseLike } from './types.js';\n\nexport const DefaultUserAgent =\n\t`DiscordBot (https://discord.js.org, 2.0.1)` as `DiscordBot (https://discord.js.org, ${string})`;\n\n/**\n * The default string to append onto the user agent.\n */\nexport const DefaultUserAgentAppendix = getUserAgentAppendix();\n\nexport const DefaultRestOptions = {\n\tagent: null,\n\tapi: 'https://discord.com/api',\n\tauthPrefix: 'Bot',\n\tcdn: 'https://cdn.discordapp.com',\n\theaders: {},\n\tinvalidRequestWarningInterval: 0,\n\tglobalRequestsPerSecond: 50,\n\toffset: 50,\n\trejectOnRateLimit: null,\n\tretries: 3,\n\ttimeout: 15_000,\n\tuserAgentAppendix: DefaultUserAgentAppendix,\n\tversion: APIVersion,\n\thashSweepInterval: 14_400_000, // 4 Hours\n\thashLifetime: 86_400_000, // 24 Hours\n\thandlerSweepInterval: 3_600_000, // 1 Hour\n\tasync makeRequest(...args): Promise<ResponseLike> {\n\t\treturn getDefaultStrategy()(...args);\n\t},\n} as const satisfies Required<RESTOptions>;\n\n/**\n * The events that the REST manager emits\n */\nexport enum RESTEvents {\n\tDebug = 'restDebug',\n\tHandlerSweep = 'handlerSweep',\n\tHashSweep = 'hashSweep',\n\tInvalidRequestWarning = 'invalidRequestWarning',\n\tRateLimited = 'rateLimited',\n\tResponse = 'response',\n}\n\nexport const ALLOWED_EXTENSIONS = ['webp', 'png', 'jpg', 'jpeg', 'gif'] as const satisfies readonly string[];\nexport const ALLOWED_STICKER_EXTENSIONS = ['png', 'json', 'gif'] as const satisfies readonly string[];\nexport const ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1_024, 2_048, 4_096] as const satisfies readonly number[];\n\nexport type ImageExtension = (typeof ALLOWED_EXTENSIONS)[number];\nexport type StickerExtension = (typeof ALLOWED_STICKER_EXTENSIONS)[number];\nexport type ImageSize = (typeof ALLOWED_SIZES)[number];\n\nexport const OverwrittenMimeTypes = {\n\t// https://github.com/discordjs/discord.js/issues/8557\n\t'image/apng': 'image/png',\n} as const satisfies Readonly<Record<string, string>>;\n\nexport const BurstHandlerMajorIdKey = 'burst';\n","/* eslint-disable jsdoc/check-param-names */\nimport {\n\tALLOWED_EXTENSIONS,\n\tALLOWED_SIZES,\n\tALLOWED_STICKER_EXTENSIONS,\n\tDefaultRestOptions,\n\ttype ImageExtension,\n\ttype ImageSize,\n\ttype StickerExtension,\n} from './utils/constants.js';\n\n/**\n * The options used for image URLs\n */\nexport interface BaseImageURLOptions {\n\t/**\n\t * The extension to use for the image URL\n\t *\n\t * @defaultValue `'webp'`\n\t */\n\textension?: ImageExtension;\n\t/**\n\t * The size specified in the image URL\n\t */\n\tsize?: ImageSize;\n}\n\n/**\n * The options used for image URLs with animated content\n */\nexport interface ImageURLOptions extends BaseImageURLOptions {\n\t/**\n\t * Whether or not to prefer the static version of an image asset.\n\t */\n\tforceStatic?: boolean;\n}\n\n/**\n * The options to use when making a CDN URL\n */\nexport interface MakeURLOptions {\n\t/**\n\t * The allowed extensions that can be used\n\t */\n\tallowedExtensions?: readonly string[];\n\t/**\n\t * The extension to use for the image URL\n\t *\n\t * @defaultValue `'webp'`\n\t */\n\textension?: string | undefined;\n\t/**\n\t * The size specified in the image URL\n\t */\n\tsize?: ImageSize;\n}\n\n/**\n * The CDN link builder\n */\nexport class CDN {\n\tpublic constructor(private readonly base: string = DefaultRestOptions.cdn) {}\n\n\t/**\n\t * Generates an app asset URL for a client's asset.\n\t *\n\t * @param clientId - The client id that has the asset\n\t * @param assetHash - The hash provided by Discord for this asset\n\t * @param options - Optional options for the asset\n\t */\n\tpublic appAsset(clientId: string, assetHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/app-assets/${clientId}/${assetHash}`, options);\n\t}\n\n\t/**\n\t * Generates an app icon URL for a client's icon.\n\t *\n\t * @param clientId - The client id that has the icon\n\t * @param iconHash - The hash provided by Discord for this icon\n\t * @param options - Optional options for the icon\n\t */\n\tpublic appIcon(clientId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/app-icons/${clientId}/${iconHash}`, options);\n\t}\n\n\t/**\n\t * Generates an avatar URL, e.g. for a user or a webhook.\n\t *\n\t * @param id - The id that has the icon\n\t * @param avatarHash - The hash provided by Discord for this avatar\n\t * @param options - Optional options for the avatar\n\t */\n\tpublic avatar(id: string, avatarHash: string, options?: Readonly<ImageURLOptions>): string {\n\t\treturn this.dynamicMakeURL(`/avatars/${id}/${avatarHash}`, avatarHash, options);\n\t}\n\n\t/**\n\t * Generates a user avatar decoration URL.\n\t *\n\t * @param userId - The id of the user\n\t * @param userAvatarDecoration - The hash provided by Discord for this avatar decoration\n\t * @param options - Optional options for the avatar decoration\n\t */\n\tpublic avatarDecoration(\n\t\tuserId: string,\n\t\tuserAvatarDecoration: string,\n\t\toptions?: Readonly<BaseImageURLOptions>,\n\t): string {\n\t\treturn this.makeURL(`/avatar-decorations/${userId}/${userAvatarDecoration}`, options);\n\t}\n\n\t/**\n\t * Generates a banner URL, e.g. for a user or a guild.\n\t *\n\t * @param id - The id that has the banner splash\n\t * @param bannerHash - The hash provided by Discord for this banner\n\t * @param options - Optional options for the banner\n\t */\n\tpublic banner(id: string, bannerHash: string, options?: Readonly<ImageURLOptions>): string {\n\t\treturn this.dynamicMakeURL(`/banners/${id}/${bannerHash}`, bannerHash, options);\n\t}\n\n\t/**\n\t * Generates an icon URL for a channel, e.g. a group DM.\n\t *\n\t * @param channelId - The channel id that has the icon\n\t * @param iconHash - The hash provided by Discord for this channel\n\t * @param options - Optional options for the icon\n\t */\n\tpublic channelIcon(channelId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/channel-icons/${channelId}/${iconHash}`, options);\n\t}\n\n\t/**\n\t * Generates a default avatar URL\n\t *\n\t * @param index - The default avatar index\n\t * @remarks\n\t * To calculate the index for a user do `(userId >> 22) % 6`,\n\t * or `discriminator % 5` if they're using the legacy username system.\n\t */\n\tpublic defaultAvatar(index: number): string {\n\t\treturn this.makeURL(`/embed/avatars/${index}`, { extension: 'png' });\n\t}\n\n\t/**\n\t * Generates a discovery splash URL for a guild's discovery splash.\n\t *\n\t * @param guildId - The guild id that has the discovery splash\n\t * @param splashHash - The hash provided by Discord for this splash\n\t * @param options - Optional options for the splash\n\t */\n\tpublic discoverySplash(guildId: string, splashHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/discovery-splashes/${guildId}/${splashHash}`, options);\n\t}\n\n\t/**\n\t * Generates an emoji's URL for an emoji.\n\t *\n\t * @param emojiId - The emoji id\n\t * @param extension - The extension of the emoji\n\t */\n\tpublic emoji(emojiId: string, extension?: ImageExtension): string {\n\t\treturn this.makeURL(`/emojis/${emojiId}`, { extension });\n\t}\n\n\t/**\n\t * Generates a guild member avatar URL.\n\t *\n\t * @param guildId - The id of the guild\n\t * @param userId - The id of the user\n\t * @param avatarHash - The hash provided by Discord for this avatar\n\t * @param options - Optional options for the avatar\n\t */\n\tpublic guildMemberAvatar(\n\t\tguildId: string,\n\t\tuserId: string,\n\t\tavatarHash: string,\n\t\toptions?: Readonly<ImageURLOptions>,\n\t): string {\n\t\treturn this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/avatars/${avatarHash}`, avatarHash, options);\n\t}\n\n\t/**\n\t * Generates a guild member banner URL.\n\t *\n\t * @param guildId - The id of the guild\n\t * @param userId - The id of the user\n\t * @param bannerHash - The hash provided by Discord for this banner\n\t * @param options - Optional options for the banner\n\t */\n\tpublic guildMemberBanner(\n\t\tguildId: string,\n\t\tuserId: string,\n\t\tbannerHash: string,\n\t\toptions?: Readonly<ImageURLOptions>,\n\t): string {\n\t\treturn this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banner`, bannerHash, options);\n\t}\n\n\t/**\n\t * Generates an icon URL, e.g. for a guild.\n\t *\n\t * @param id - The id that has the icon splash\n\t * @param iconHash - The hash provided by Discord for this icon\n\t * @param options - Optional options for the icon\n\t */\n\tpublic icon(id: string, iconHash: string, options?: Readonly<ImageURLOptions>): string {\n\t\treturn this.dynamicMakeURL(`/icons/${id}/${iconHash}`, iconHash, options);\n\t}\n\n\t/**\n\t * Generates a URL for the icon of a role\n\t *\n\t * @param roleId - The id of the role that has the icon\n\t * @param roleIconHash - The hash provided by Discord for this role icon\n\t * @param options - Optional options for the role icon\n\t */\n\tpublic roleIcon(roleId: string, roleIconHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/role-icons/${roleId}/${roleIconHash}`, options);\n\t}\n\n\t/**\n\t * Generates a guild invite splash URL for a guild's invite splash.\n\t *\n\t * @param guildId - The guild id that has the invite splash\n\t * @param splashHash - The hash provided by Discord for this splash\n\t * @param options - Optional options for the splash\n\t */\n\tpublic splash(guildId: string, splashHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/splashes/${guildId}/${splashHash}`, options);\n\t}\n\n\t/**\n\t * Generates a sticker URL.\n\t *\n\t * @param stickerId - The sticker id\n\t * @param extension - The extension of the sticker\n\t * @privateRemarks\n\t * Stickers cannot have a `.webp` extension, so we default to a `.png`\n\t */\n\tpublic sticker(stickerId: string, extension: StickerExtension = 'png'): string {\n\t\treturn this.makeURL(`/stickers/${stickerId}`, { allowedExtensions: ALLOWED_STICKER_EXTENSIONS, extension });\n\t}\n\n\t/**\n\t * Generates a sticker pack banner URL.\n\t *\n\t * @param bannerId - The banner id\n\t * @param options - Optional options for the banner\n\t */\n\tpublic stickerPackBanner(bannerId: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/app-assets/710982414301790216/store/${bannerId}`, options);\n\t}\n\n\t/**\n\t * Generates a team icon URL for a team's icon.\n\t *\n\t * @param teamId - The team id that has the icon\n\t * @param iconHash - The hash provided by Discord for this icon\n\t * @param options - Optional options for the icon\n\t */\n\tpublic teamIcon(teamId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/team-icons/${teamId}/${iconHash}`, options);\n\t}\n\n\t/**\n\t * Generates a cover image for a guild scheduled event.\n\t *\n\t * @param scheduledEventId - The scheduled event id\n\t * @param coverHash - The hash provided by discord for this cover image\n\t * @param options - Optional options for the cover image\n\t */\n\tpublic guildScheduledEventCover(\n\t\tscheduledEventId: string,\n\t\tcoverHash: string,\n\t\toptions?: Readonly<BaseImageURLOptions>,\n\t): string {\n\t\treturn this.makeURL(`/guild-events/${scheduledEventId}/${coverHash}`, options);\n\t}\n\n\t/**\n\t * Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.\n\t *\n\t * @param route - The base cdn route\n\t * @param hash - The hash provided by Discord for this icon\n\t * @param options - Optional options for the link\n\t */\n\tprivate dynamicMakeURL(\n\t\troute: string,\n\t\thash: string,\n\t\t{ forceStatic = false, ...options }: Readonly<ImageURLOptions> = {},\n\t): string {\n\t\treturn this.makeURL(route, !forceStatic && hash.startsWith('a_') ? { ...options, extension: 'gif' } : options);\n\t}\n\n\t/**\n\t * Constructs the URL for the resource\n\t *\n\t * @param route - The base cdn route\n\t * @param options - The extension/size options for the link\n\t */\n\tprivate makeURL(\n\t\troute: string,\n\t\t{ allowedExtensions = ALLOWED_EXTENSIONS, extension = 'webp', size }: Readonly<MakeURLOptions> = {},\n\t): string {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\textension = String(extension).toLowerCase();\n\n\t\tif (!allowedExtensions.includes(extension)) {\n\t\t\tthrow new RangeError(`Invalid extension provided: ${extension}\\nMust be one of: ${allowedExtensions.join(', ')}`);\n\t\t}\n\n\t\tif (size && !ALLOWED_SIZES.includes(size)) {\n\t\t\tthrow new RangeError(`Invalid size provided: ${size}\\nMust be one of: ${ALLOWED_SIZES.join(', ')}`);\n\t\t}\n\n\t\tconst url = new URL(`${this.base}${route}.${extension}`);\n\n\t\tif (size) {\n\t\t\turl.searchParams.set('size', String(size));\n\t\t}\n\n\t\treturn url.toString();\n\t}\n}\n","import type { InternalRequest, RawFile } from '../utils/types.js';\n\ninterface DiscordErrorFieldInformation {\n\tcode: string;\n\tmessage: string;\n}\n\ninterface DiscordErrorGroupWrapper {\n\t_errors: DiscordError[];\n}\n\ntype DiscordError = DiscordErrorFieldInformation | DiscordErrorGroupWrapper | string | { [k: string]: DiscordError };\n\nexport interface DiscordErrorData {\n\tcode: number;\n\terrors?: DiscordError;\n\tmessage: string;\n}\n\nexport interface OAuthErrorData {\n\terror: string;\n\terror_description?: string;\n}\n\nexport interface RequestBody {\n\tfiles: RawFile[] | undefined;\n\tjson: unknown | undefined;\n}\n\nfunction isErrorGroupWrapper(error: DiscordError): error is DiscordErrorGroupWrapper {\n\treturn Reflect.has(error as Record<string, unknown>, '_errors');\n}\n\nfunction isErrorResponse(error: DiscordError): error is DiscordErrorFieldInformation {\n\treturn typeof Reflect.get(error as Record<string, unknown>, 'message') === 'string';\n}\n\n/**\n * Represents an API error returned by Discord\n */\nexport class DiscordAPIError extends Error {\n\tpublic requestBody: RequestBody;\n\n\t/**\n\t * @param rawError - The error reported by Discord\n\t * @param code - The error code reported by Discord\n\t * @param status - The status code of the response\n\t * @param method - The method of the request that erred\n\t * @param url - The url of the request that erred\n\t * @param bodyData - The unparsed data for the request that errored\n\t */\n\tpublic constructor(\n\t\tpublic rawError: DiscordErrorData | OAuthErrorData,\n\t\tpublic code: number | string,\n\t\tpublic status: number,\n\t\tpublic method: string,\n\t\tpublic url: string,\n\t\tbodyData: Pick<InternalRequest, 'body' | 'files'>,\n\t) {\n\t\tsuper(DiscordAPIError.getMessage(rawError));\n\n\t\tthis.requestBody = { files: bodyData.files, json: bodyData.body };\n\t}\n\n\t/**\n\t * The name of the error\n\t */\n\tpublic override get name(): string {\n\t\treturn `${DiscordAPIError.name}[${this.code}]`;\n\t}\n\n\tprivate static getMessage(error: DiscordErrorData | OAuthErrorData) {\n\t\tlet flattened = '';\n\t\tif ('code' in error) {\n\t\t\tif (error.errors) {\n\t\t\t\tflattened = [...this.flattenDiscordError(error.errors)].join('\\n');\n\t\t\t}\n\n\t\t\treturn error.message && flattened\n\t\t\t\t? `${error.message}\\n${flattened}`\n\t\t\t\t: error.message || flattened || 'Unknown Error';\n\t\t}\n\n\t\treturn error.error_description ?? 'No Description';\n\t}\n\n\tprivate static *flattenDiscordError(obj: DiscordError, key = ''): IterableIterator<string> {\n\t\tif (isErrorResponse(obj)) {\n\t\t\treturn yield `${key.length ? `${key}[${obj.code}]` : `${obj.code}`}: ${obj.message}`.trim();\n\t\t}\n\n\t\tfor (const [otherKey, val] of Object.entries(obj)) {\n\t\t\tconst nextKey = otherKey.startsWith('_')\n\t\t\t\t? key\n\t\t\t\t: key\n\t\t\t\t? Number.isNaN(Number(otherKey))\n\t\t\t\t\t? `${key}.${otherKey}`\n\t\t\t\t\t: `${key}[${otherKey}]`\n\t\t\t\t: otherKey;\n\n\t\t\tif (typeof val === 'string') {\n\t\t\t\tyield val;\n\t\t\t} else if (isErrorGroupWrapper(val)) {\n\t\t\t\tfor (const error of val._errors) {\n\t\t\t\t\tyield* this.flattenDiscordError(error, nextKey);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tyield* this.flattenDiscordError(val, nextKey);\n\t\t\t}\n\t\t}\n\t}\n}\n","import type { InternalRequest } from '../utils/types.js';\nimport type { RequestBody } from './DiscordAPIError.js';\n\n/**\n * Represents a HTTP error\n */\nexport class HTTPError extends Error {\n\tpublic requestBody: RequestBody;\n\n\tpublic override name = HTTPError.name;\n\n\t/**\n\t * @param status - The status code of the response\n\t * @param statusText - The status text of the response\n\t * @param method - The method of the request that erred\n\t * @param url - The url of the request that erred\n\t * @param bodyData - The unparsed data for the request that errored\n\t */\n\tpublic constructor(\n\t\tpublic status: number,\n\t\tstatusText: string,\n\t\tpublic method: string,\n\t\tpublic url: string,\n\t\tbodyData: Pick<InternalRequest, 'body' | 'files'>,\n\t) {\n\t\tsuper(statusText);\n\t\tthis.requestBody = { files: bodyData.files, json: bodyData.body };\n\t}\n}\n","import type { RateLimitData } from '../utils/types.js';\n\nexport class RateLimitError extends Error implements RateLimitData {\n\tpublic timeToReset: number;\n\n\tpublic limit: number;\n\n\tpublic method: string;\n\n\tpublic hash: string;\n\n\tpublic url: string;\n\n\tpublic route: string;\n\n\tpublic majorParameter: string;\n\n\tpublic global: boolean;\n\n\tpublic constructor({ timeToReset, limit, method, hash, url, route, majorParameter, global }: RateLimitData) {\n\t\tsuper();\n\t\tthis.timeToReset = timeToReset;\n\t\tthis.limit = limit;\n\t\tthis.method = method;\n\t\tthis.hash = hash;\n\t\tthis.url = url;\n\t\tthis.route = route;\n\t\tthis.majorParameter = majorParameter;\n\t\tthis.global = global;\n\t}\n\n\t/**\n\t * The name of the error\n\t */\n\tpublic override get name(): string {\n\t\treturn `${RateLimitError.name}[${this.route}]`;\n\t}\n}\n","import { Collection } from '@discordjs/collection';\nimport { DiscordSnowflake } from '@sapphire/snowflake';\nimport { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';\nimport { filetypeinfo } from 'magic-bytes.js';\nimport type { RequestInit, BodyInit, Dispatcher } from 'undici';\nimport { CDN } from './CDN.js';\nimport { BurstHandler } from './handlers/BurstHandler.js';\nimport { SequentialHandler } from './handlers/SequentialHandler.js';\nimport type { IHandler } from './interfaces/Handler.js';\nimport {\n\tBurstHandlerMajorIdKey,\n\tDefaultRestOptions,\n\tDefaultUserAgent,\n\tOverwrittenMimeTypes,\n\tRESTEvents,\n} from './utils/constants.js';\nimport { RequestMethod } from './utils/types.js';\nimport type {\n\tRESTOptions,\n\tResponseLike,\n\tRestEventsMap,\n\tHashData,\n\tInternalRequest,\n\tRouteLike,\n\tRequestHeaders,\n\tRouteData,\n\tRequestData,\n} from './utils/types.js';\nimport { isBufferLike, parseResponse } from './utils/utils.js';\n\n/**\n * Represents the class that manages handlers for endpoints\n */\nexport class REST extends AsyncEventEmitter<RestEventsMap> {\n\t/**\n\t * The {@link https://undici.nodejs.org/#/docs/api/Agent | Agent} for all requests\n\t * performed by this manager.\n\t */\n\tpublic agent: Dispatcher | null = null;\n\n\tpublic readonly cdn: CDN;\n\n\t/**\n\t * The number of requests remaining in the global bucket\n\t */\n\tpublic globalRemaining: number;\n\n\t/**\n\t * The promise used to wait out the global rate limit\n\t */\n\tpublic globalDelay: Promise<void> | null = null;\n\n\t/**\n\t * The timestamp at which the global bucket resets\n\t */\n\tpublic globalReset = -1;\n\n\t/**\n\t * API bucket hashes that are cached from provided routes\n\t */\n\tpublic readonly hashes = new Collection<string, HashData>();\n\n\t/**\n\t * Request handlers created from the bucket hash and the major parameters\n\t */\n\tpublic readonly handlers = new Collection<string, IHandler>();\n\n\t#token: string | null = null;\n\n\tprivate hashTimer!: NodeJS.Timer | number;\n\n\tprivate handlerTimer!: NodeJS.Timer | number;\n\n\tpublic readonly options: RESTOptions;\n\n\tpublic constructor(options: Partial<RESTOptions> = {}) {\n\t\tsuper();\n\t\tthis.cdn = new CDN(options.cdn ?? DefaultRestOptions.cdn);\n\t\tthis.options = { ...DefaultRestOptions, ...options };\n\t\tthis.options.offset = Math.max(0, this.options.offset);\n\t\tthis.globalRemaining = Math.max(1, this.options.globalRequestsPerSecond);\n\t\tthis.agent = options.agent ?? null;\n\n\t\t// Start sweepers\n\t\tthis.setupSweepers();\n\t}\n\n\tprivate setupSweepers() {\n\t\t// eslint-disable-next-line unicorn/consistent-function-scoping\n\t\tconst validateMaxInterval = (interval: number) => {\n\t\t\tif (interval > 14_400_000) {\n\t\t\t\tthrow new Error('Cannot set an interval greater than 4 hours');\n\t\t\t}\n\t\t};\n\n\t\tif (this.options.hashSweepInterval !== 0 && this.options.hashSweepInterval !== Number.POSITIVE_INFINITY) {\n\t\t\tvalidateMaxInterval(this.options.hashSweepInterval);\n\t\t\tthis.hashTimer = setInterval(() => {\n\t\t\t\tconst sweptHashes = new Collection<string, HashData>();\n\t\t\t\tconst currentDate = Date.now();\n\n\t\t\t\t// Begin sweeping hash based on lifetimes\n\t\t\t\tthis.hashes.sweep((val, key) => {\n\t\t\t\t\t// `-1` indicates a global hash\n\t\t\t\t\tif (val.lastAccess === -1) return false;\n\n\t\t\t\t\t// Check if lifetime has been exceeded\n\t\t\t\t\tconst shouldSweep = Math.floor(currentDate - val.lastAccess) > this.options.hashLifetime;\n\n\t\t\t\t\t// Add hash to collection of swept hashes\n\t\t\t\t\tif (shouldSweep) {\n\t\t\t\t\t\t// Add to swept hashes\n\t\t\t\t\t\tsweptHashes.set(key, val);\n\n\t\t\t\t\t\t// Emit debug information\n\t\t\t\t\t\tthis.emit(RESTEvents.Debug, `Hash ${val.value} for ${key} swept due to lifetime being exceeded`);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn shouldSweep;\n\t\t\t\t});\n\n\t\t\t\t// Fire event\n\t\t\t\tthis.emit(RESTEvents.HashSweep, sweptHashes);\n\t\t\t}, this.options.hashSweepInterval);\n\n\t\t\tthis.hashTimer.unref?.();\n\t\t}\n\n\t\tif (this.options.handlerSweepInterval !== 0 && this.options.handlerSweepInterval !== Number.POSITIVE_INFINITY) {\n\t\t\tvalidateMaxInterval(this.options.handlerSweepInterval);\n\t\t\tthis.handlerTimer = setInterval(() => {\n\t\t\t\tconst sweptHandlers = new Collection<string, IHandler>();\n\n\t\t\t\t// Begin sweeping handlers based on activity\n\t\t\t\tthis.handlers.sweep((val, key) => {\n\t\t\t\t\tconst { inactive } = val;\n\n\t\t\t\t\t// Collect inactive handlers\n\t\t\t\t\tif (inactive) {\n\t\t\t\t\t\tsweptHandlers.set(key, val);\n\t\t\t\t\t\tthis.emit(RESTEvents.Debug, `Handler ${val.id} for ${key} swept due to being inactive`);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn inactive;\n\t\t\t\t});\n\n\t\t\t\t// Fire event\n\t\t\t\tthis.emit(RESTEvents.HandlerSweep, sweptHandlers);\n\t\t\t}, this.options.handlerSweepInterval);\n\n\t\t\tthis.handlerTimer.unref?.();\n\t\t}\n\t}\n\n\t/**\n\t * Runs a get request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async get(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Get });\n\t}\n\n\t/**\n\t * Runs a delete request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async delete(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Delete });\n\t}\n\n\t/**\n\t * Runs a post request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async post(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Post });\n\t}\n\n\t/**\n\t * Runs a put request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async put(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Put });\n\t}\n\n\t/**\n\t * Runs a patch request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async patch(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Patch });\n\t}\n\n\t/**\n\t * Runs a request from the api\n\t *\n\t * @param options - Request options\n\t */\n\tpublic async request(options: InternalRequest) {\n\t\tconst response = await this.queueRequest(options);\n\t\treturn parseResponse(response);\n\t}\n\n\t/**\n\t * Sets the default agent to use for requests performed by this manager\n\t *\n\t * @param agent - The agent to use\n\t */\n\tpublic setAgent(agent: Dispatcher) {\n\t\tthis.agent = agent;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the authorization token that should be used for requests\n\t *\n\t * @param token - The authorization token to use\n\t */\n\tpublic setToken(token: string) {\n\t\tthis.#token = token;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Queues a request to be sent\n\t *\n\t * @param request - All the information needed to make a request\n\t * @returns The response from the api request\n\t */\n\tpublic async queueRequest(request: InternalRequest): Promise<ResponseLike> {\n\t\t// Generalize the endpoint to its route data\n\t\tconst routeId = REST.generateRouteData(request.fullRoute, request.method);\n\t\t// Get the bucket hash for the generic route, or point to a global route otherwise\n\t\tconst hash = this.hashes.get(`${request.method}:${routeId.bucketRoute}`) ?? {\n\t\t\tvalue: `Global(${request.method}:${routeId.bucketRoute})`,\n\t\t\tlastAccess: -1,\n\t\t};\n\n\t\t// Get the request handler for the obtained hash, with its major parameter\n\t\tconst handler =\n\t\t\tthis.handlers.get(`${hash.value}:${routeId.majorParameter}`) ??\n\t\t\tthis.createHandler(hash.value, routeId.majorParameter);\n\n\t\t// Resolve the request into usable fetch options\n\t\tconst { url, fetchOptions } = await this.resolveRequest(request);\n\n\t\t// Queue the request\n\t\treturn handler.queueRequest(routeId, url, fetchOptions, {\n\t\t\tbody: request.body,\n\t\t\tfiles: request.files,\n\t\t\tauth: request.auth !== false,\n\t\t\tsignal: request.signal,\n\t\t});\n\t}\n\n\t/**\n\t * Creates a new rate limit handler from a hash, based on the hash and the major parameter\n\t *\n\t * @param hash - The hash for the route\n\t * @param majorParameter - The major parameter for this handler\n\t * @internal\n\t */\n\tprivate createHandler(hash: string, majorParameter: string) {\n\t\t// Create the async request queue to handle requests\n\t\tconst queue =\n\t\t\tmajorParameter === BurstHandlerMajorIdKey\n\t\t\t\t? new BurstHandler(this, hash, majorParameter)\n\t\t\t\t: new SequentialHandler(this, hash, majorParameter);\n\t\t// Save the queue based on its id\n\t\tthis.handlers.set(queue.id, queue);\n\n\t\treturn queue;\n\t}\n\n\t/**\n\t * Formats the request data to a usable format for fetch\n\t *\n\t * @param request - The request data\n\t */\n\tprivate async resolveRequest(request: InternalRequest): Promise<{ fetchOptions: RequestInit; url: string }> {\n\t\tconst { options } = this;\n\n\t\tlet query = '';\n\n\t\t// If a query option is passed, use it\n\t\tif (request.query) {\n\t\t\tconst resolvedQuery = request.query.toString();\n\t\t\tif (resolvedQuery !== '') {\n\t\t\t\tquery = `?${resolvedQuery}`;\n\t\t\t}\n\t\t}\n\n\t\t// Create the required headers\n\t\tconst headers: RequestHeaders = {\n\t\t\t...this.options.headers,\n\t\t\t'User-Agent': `${DefaultUserAgent} ${options.userAgentAppendix}`.trim(),\n\t\t};\n\n\t\t// If this request requires authorization (allowing non-\"authorized\" requests for webhooks)\n\t\tif (request.auth !== false) {\n\t\t\t// If we haven't received a token, throw an error\n\t\t\tif (!this.#token) {\n\t\t\t\tthrow new Error('Expected token to be set for this request, but none was present');\n\t\t\t}\n\n\t\t\theaders.Authorization = `${request.authPrefix ?? this.options.authPrefix} ${this.#token}`;\n\t\t}\n\n\t\t// If a reason was set, set it's appropriate header\n\t\tif (request.reason?.length) {\n\t\t\theaders['X-Audit-Log-Reason'] = encodeURIComponent(request.reason);\n\t\t}\n\n\t\t// Format the full request URL (api base, optional version, endpoint, optional querystring)\n\t\tconst url = `${options.api}${request.versioned === false ? '' : `/v${options.version}`}${\n\t\t\trequest.fullRoute\n\t\t}${query}`;\n\n\t\tlet finalBody: RequestInit['body'];\n\t\tlet additionalHeaders: Record<string, string> = {};\n\n\t\tif (request.files?.length) {\n\t\t\tconst formData = new FormData();\n\n\t\t\t// Attach all files to the request\n\t\t\tfor (const [index, file] of request.files.entries()) {\n\t\t\t\tconst fileKey = file.key ?? `files[${index}]`;\n\n\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/FormData/append#parameters\n\t\t\t\t// FormData.append only accepts a string or Blob.\n\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob#parameters\n\t\t\t\t// The Blob constructor accepts TypedArray/ArrayBuffer, strings, and Blobs.\n\t\t\t\tif (isBufferLike(file.data)) {\n\t\t\t\t\t// Try to infer the content type from the buffer if one isn't passed\n\t\t\t\t\tlet contentType = file.contentType;\n\n\t\t\t\t\tif (!contentType) {\n\t\t\t\t\t\tconst [parsedType] = filetypeinfo(file.data);\n\n\t\t\t\t\t\tif (parsedType) {\n\t\t\t\t\t\t\tcontentType =\n\t\t\t\t\t\t\t\tOverwrittenMimeTypes[parsedType.mime as keyof typeof OverwrittenMimeTypes] ??\n\t\t\t\t\t\t\t\tparsedType.mime ??\n\t\t\t\t\t\t\t\t'application/octet-stream';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tformData.append(fileKey, new Blob([file.data], { type: contentType }), file.name);\n\t\t\t\t} else {\n\t\t\t\t\tformData.append(fileKey, new Blob([`${file.data}`], { type: file.contentType }), file.name);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If a JSON body was added as well, attach it to the form data, using payload_json unless otherwise specified\n\t\t\t// eslint-disable-next-line no-eq-null, eqeqeq\n\t\t\tif (request.body != null) {\n\t\t\t\tif (request.appendToFormData) {\n\t\t\t\t\tfor (const [key, value] of Object.entries(request.body as Record<string, unknown>)) {\n\t\t\t\t\t\tformData.append(key, value);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tformData.append('payload_json', JSON.stringify(request.body));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set the final body to the form data\n\t\t\tfinalBody = formData;\n\n\t\t\t// eslint-disable-next-line no-eq-null, eqeqeq\n\t\t} else if (request.body != null) {\n\t\t\tif (request.passThroughBody) {\n\t\t\t\tfinalBody = request.body as BodyInit;\n\t\t\t} else {\n\t\t\t\t// Stringify the JSON data\n\t\t\t\tfinalBody = JSON.stringify(request.body);\n\t\t\t\t// Set the additional headers to specify the content-type\n\t\t\t\tadditionalHeaders = { 'Content-Type': 'application/json' };\n\t\t\t}\n\t\t}\n\n\t\tconst method = request.method.toUpperCase();\n\n\t\t// The non null assertions in the following block are due to exactOptionalPropertyTypes, they have been tested to work with undefined\n\t\tconst fetchOptions: RequestInit = {\n\t\t\t// Set body to null on get / head requests. This does not follow fetch spec (likely because it causes subtle bugs) but is aligned with what request was doing\n\t\t\tbody: ['GET', 'HEAD'].includes(method) ? null : finalBody!,\n\t\t\theaders: { ...request.headers, ...additionalHeaders, ...headers } as Record<string, string>,\n\t\t\tmethod,\n\t\t\t// Prioritize setting an agent per request, use the agent for this instance otherwise.\n\t\t\tdispatcher: request.dispatcher ?? this.agent ?? undefined!,\n\t\t};\n\n\t\treturn { url, fetchOptions };\n\t}\n\n\t/**\n\t * Stops the hash sweeping interval\n\t */\n\tpublic clearHashSweeper() {\n\t\tclearInterval(this.hashTimer);\n\t}\n\n\t/**\n\t * Stops the request handler sweeping interval\n\t */\n\tpublic clearHandlerSweeper() {\n\t\tclearInterval(this.handlerTimer);\n\t}\n\n\t/**\n\t * Generates route data for an endpoint:method\n\t *\n\t * @param endpoint - The raw endpoint to generalize\n\t * @param method - The HTTP method this endpoint is called without\n\t * @internal\n\t */\n\tprivate static generateRouteData(endpoint: RouteLike, method: RequestMethod): RouteData {\n\t\tif (endpoint.startsWith('/interactions/') && endpoint.endsWith('/callback')) {\n\t\t\treturn {\n\t\t\t\tmajorParameter: BurstHandlerMajorIdKey,\n\t\t\t\tbucketRoute: '/interactions/:id/:token/callback',\n\t\t\t\toriginal: endpoint,\n\t\t\t};\n\t\t}\n\n\t\tconst majorIdMatch = /^\\/(?:channels|guilds|webhooks)\\/(\\d{17,19})/.exec(endpoint);\n\n\t\t// Get the major id for this route - global otherwise\n\t\tconst majorId = majorIdMatch?.[1] ?? 'global';\n\n\t\tconst baseRoute = endpoint\n\t\t\t// Strip out all ids\n\t\t\t.replaceAll(/\\d{17,19}/g, ':id')\n\t\t\t// Strip out reaction as they fall under the same bucket\n\t\t\t.replace(/\\/reactions\\/(.*)/, '/reactions/:reaction');\n\n\t\tlet exceptions = '';\n\n\t\t// Hard-Code Old Message Deletion Exception (2 week+ old messages are a different bucket)\n\t\t// https://github.com/discord/discord-api-docs/issues/1295\n\t\tif (method === RequestMethod.Delete && baseRoute === '/channels/:id/messages/:id') {\n\t\t\tconst id = /\\d{17,19}$/.exec(endpoint)![0]!;\n\t\t\tconst timestamp = DiscordSnowflake.timestampFrom(id);\n\t\t\tif (Date.now() - timestamp > 1_000 * 60 * 60 * 24 * 14) {\n\t\t\t\texceptions += '/Delete Old Message';\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tmajorParameter: majorId,\n\t\t\tbucketRoute: baseRoute + exceptions,\n\t\t\toriginal: endpoint,\n\t\t};\n\t}\n}\n","import type { Readable } from 'node:stream';\nimport type { ReadableStream } from 'node:stream/web';\nimport type { Collection } from '@discordjs/collection';\nimport type { Agent, Dispatcher, RequestInit, BodyInit, Response } from 'undici';\nimport type { IHandler } from '../interfaces/Handler.js';\n\nexport interface RestEvents {\n\thandlerSweep: [sweptHandlers: Collection<string, IHandler>];\n\thashSweep: [sweptHashes: Collection<string, HashData>];\n\tinvalidRequestWarning: [invalidRequestInfo: InvalidRequestWarningData];\n\trateLimited: [rateLimitInfo: RateLimitData];\n\tresponse: [request: APIRequest, response: ResponseLike];\n\trestDebug: [info: string];\n}\n\nexport type RestEventsMap = {\n\t[K in keyof RestEvents]: RestEvents[K];\n};\n\n/**\n * Options to be passed when creating the REST instance\n */\nexport interface RESTOptions {\n\t/**\n\t * The agent to set globally\n\t */\n\tagent: Dispatcher | null;\n\t/**\n\t * The base api path, without version\n\t *\n\t * @defaultValue `'https://discord.com/api'`\n\t */\n\tapi: string;\n\t/**\n\t * The authorization prefix to use for requests, useful if you want to use\n\t * bearer tokens\n\t *\n\t * @defaultValue `'Bot'`\n\t */\n\tauthPrefix: 'Bearer' | 'Bot';\n\t/**\n\t * The cdn path\n\t *\n\t * @defaultValue `'https://cdn.discordapp.com'`\n\t */\n\tcdn: string;\n\t/**\n\t * How many requests to allow sending per second (Infinity for unlimited, 50 for the standard global limit used by Discord)\n\t *\n\t * @defaultValue `50`\n\t */\n\tglobalRequestsPerSecond: number;\n\t/**\n\t * The amount of time in milliseconds that passes between each hash sweep. (defaults to 1h)\n\t *\n\t * @defaultValue `3_600_000`\n\t */\n\thandlerSweepInterval: number;\n\t/**\n\t * The maximum amount of time a hash can exist in milliseconds without being hit with a request (defaults to 24h)\n\t *\n\t * @defaultValue `86_400_000`\n\t */\n\thashLifetime: number;\n\t/**\n\t * The amount of time in milliseconds that passes between each hash sweep. (defaults to 4h)\n\t *\n\t * @defaultValue `14_400_000`\n\t */\n\thashSweepInterval: number;\n\t/**\n\t * Additional headers to send for all API requests\n\t *\n\t * @defaultValue `{}`\n\t */\n\theaders: Record<string, string>;\n\t/**\n\t * The number of invalid REST requests (those that return 401, 403, or 429) in a 10 minute window between emitted warnings (0 for no warnings).\n\t * That is, if set to 500, warnings will be emitted at invalid request number 500, 1000, 1500, and so on.\n\t *\n\t * @defaultValue `0`\n\t */\n\tinvalidRequestWarningInterval: number;\n\t/**\n\t * The method called to perform the actual HTTP request given a url and web `fetch` options\n\t * For example, to use global fetch, simply provide `makeRequest: fetch`\n\t */\n\tmakeRequest(url: string, init: RequestInit): Promise<ResponseLike>;\n\t/**\n\t * The extra offset to add to rate limits in milliseconds\n\t *\n\t * @defaultValue `50`\n\t */\n\toffset: number;\n\t/**\n\t * Determines how rate limiting and pre-emptive throttling should be handled.\n\t * When an array of strings, each element is treated as a prefix for the request route\n\t * (e.g. `/channels` to match any route starting with `/channels` such as `/channels/:id/messages`)\n\t * for which to throw {@link RateLimitError}s. All other request routes will be queued normally\n\t *\n\t * @defaultValue `null`\n\t */\n\trejectOnRateLimit: RateLimitQueueFilter | string[] | null;\n\t/**\n\t * The number of retries for errors with the 500 code, or errors\n\t * that timeout\n\t *\n\t * @defaultValue `3`\n\t */\n\tretries: number;\n\t/**\n\t * The time to wait in milliseconds before a request is aborted\n\t *\n\t * @defaultValue `15_000`\n\t */\n\ttimeout: number;\n\t/**\n\t * Extra information to add to the user agent\n\t *\n\t * @defaultValue DefaultUserAgentAppendix\n\t */\n\tuserAgentAppendix: string;\n\t/**\n\t * The version of the API to use\n\t *\n\t * @defaultValue `'10'`\n\t */\n\tversion: string;\n}\n\n/**\n * Data emitted on `RESTEvents.RateLimited`\n */\nexport interface RateLimitData {\n\t/**\n\t * Whether the rate limit that was reached was the global limit\n\t */\n\tglobal: boolean;\n\t/**\n\t * The bucket hash for this request\n\t */\n\thash: string;\n\t/**\n\t * The amount of requests we can perform before locking requests\n\t */\n\tlimit: number;\n\t/**\n\t * The major parameter of the route\n\t *\n\t * For example, in `/channels/x`, this will be `x`.\n\t * If there is no major parameter (e.g: `/bot/gateway`) this will be `global`.\n\t */\n\tmajorParameter: string;\n\t/**\n\t * The HTTP method being performed\n\t */\n\tmethod: string;\n\t/**\n\t * The route being hit in this request\n\t */\n\troute: string;\n\t/**\n\t * The time, in milliseconds, until the request-lock is reset\n\t */\n\ttimeToReset: number;\n\t/**\n\t * The full URL for this request\n\t */\n\turl: string;\n}\n\n/**\n * A function that determines whether the rate limit hit should throw an Error\n */\nexport type RateLimitQueueFilter = (rateLimitData: RateLimitData) => Promise<boolean> | boolean;\n\nexport interface APIRequest {\n\t/**\n\t * The data that was used to form the body of this request\n\t */\n\tdata: HandlerRequestData;\n\t/**\n\t * The HTTP method used in this request\n\t */\n\tmethod: string;\n\t/**\n\t * Additional HTTP options for this request\n\t */\n\toptions: RequestInit;\n\t/**\n\t * The full path used to make the request\n\t */\n\tpath: RouteLike;\n\t/**\n\t * The number of times this request has been attempted\n\t */\n\tretries: number;\n\t/**\n\t * The API route identifying the ratelimit for this request\n\t */\n\troute: string;\n}\n\nexport interface ResponseLike\n\textends Pick<Response, 'arrayBuffer' | 'bodyUsed' | 'headers' | 'json' | 'ok' | 'status' | 'statusText' | 'text'> {\n\tbody: Readable | ReadableStream | null;\n}\n\nexport interface InvalidRequestWarningData {\n\t/**\n\t * Number of invalid requests that have been made in the window\n\t */\n\tcount: number;\n\t/**\n\t * Time in milliseconds remaining before the count resets\n\t */\n\tremainingTime: number;\n}\n\n/**\n * Represents a file to be added to the request\n */\nexport interface RawFile {\n\t/**\n\t * Content-Type of the file\n\t */\n\tcontentType?: string;\n\t/**\n\t * The actual data for the file\n\t */\n\tdata: Buffer | Uint8Array | boolean | number | string;\n\t/**\n\t * An explicit key to use for key of the formdata field for this file.\n\t * When not provided, the index of the file in the files array is used in the form `files[${index}]`.\n\t * If you wish to alter the placeholder snowflake, you must provide this property in the same form (`files[${placeholder}]`)\n\t */\n\tkey?: string;\n\t/**\n\t * The name of the file\n\t */\n\tname: string;\n}\n\n/**\n * Represents possible data to be given to an endpoint\n */\nexport interface RequestData {\n\t/**\n\t * Whether to append JSON data to form data instead of `payload_json` when sending files\n\t */\n\tappendToFormData?: boolean;\n\t/**\n\t * If this request needs the `Authorization` header\n\t *\n\t * @defaultValue `true`\n\t */\n\tauth?: boolean;\n\t/**\n\t * The authorization prefix to use for this request, useful if you use this with bearer tokens\n\t *\n\t * @defaultValue `'Bot'`\n\t */\n\tauthPrefix?: 'Bearer' | 'Bot';\n\t/**\n\t * The body to send to this request.\n\t * If providing as BodyInit, set `passThroughBody: true`\n\t */\n\tbody?: BodyInit | unknown;\n\t/**\n\t * The {@link https://undici.nodejs.org/#/docs/api/Agent | Agent} to use for the request.\n\t */\n\tdispatcher?: Agent;\n\t/**\n\t * Files to be attached to this request\n\t */\n\tfiles?: RawFile[] | undefined;\n\t/**\n\t * Additional headers to add to this request\n\t */\n\theaders?: Record<string, string>;\n\t/**\n\t * Whether to pass-through the body property directly to `fetch()`.\n\t * <warn>This only applies when files is NOT present</warn>\n\t */\n\tpassThroughBody?: boolean;\n\t/**\n\t * Query string parameters to append to the called endpoint\n\t */\n\tquery?: URLSearchParams;\n\t/**\n\t * Reason to show in the audit logs\n\t */\n\treason?: string | undefined;\n\t/**\n\t * The signal to abort the queue entry or the REST call, where applicable\n\t */\n\tsignal?: AbortSignal | undefined;\n\t/**\n\t * If this request should be versioned\n\t *\n\t * @defaultValue `true`\n\t */\n\tversioned?: boolean;\n}\n\n/**\n * Possible headers for an API call\n */\nexport interface RequestHeaders {\n\tAuthorization?: string;\n\t'User-Agent': string;\n\t'X-Audit-Log-Reason'?: string;\n}\n\n/**\n * Possible API methods to be used when doing requests\n */\nexport enum RequestMethod {\n\tDelete = 'DELETE',\n\tGet = 'GET',\n\tPatch = 'PATCH',\n\tPost = 'POST',\n\tPut = 'PUT',\n}\n\nexport type RouteLike = `/${string}`;\n\n/**\n * Internal request options\n *\n * @internal\n */\nexport interface InternalRequest extends RequestData {\n\tfullRoute: RouteLike;\n\tmethod: RequestMethod;\n}\n\nexport type HandlerRequestData = Pick<InternalRequest, 'auth' | 'body' | 'files' | 'signal'>;\n\n/**\n * Parsed route data for an endpoint\n *\n * @internal\n */\nexport interface RouteData {\n\tbucketRoute: string;\n\tmajorParameter: string;\n\toriginal: RouteLike;\n}\n\n/**\n * Represents a hash and its associated fields\n *\n * @internal\n */\nexport interface HashData {\n\tlastAccess: number;\n\tvalue: string;\n}\n","import type { RESTPatchAPIChannelJSONBody, Snowflake } from 'discord-api-types/v10';\nimport type { REST } from '../REST.js';\nimport { RateLimitError } from '../errors/RateLimitError.js';\nimport { RequestMethod, type RateLimitData, type ResponseLike } from './types.js';\n\nfunction serializeSearchParam(value: unknown): string | null {\n\tswitch (typeof value) {\n\t\tcase 'string':\n\t\t\treturn value;\n\t\tcase 'number':\n\t\tcase 'bigint':\n\t\tcase 'boolean':\n\t\t\treturn value.toString();\n\t\tcase 'object':\n\t\t\tif (value === null) return null;\n\t\t\tif (value instanceof Date) {\n\t\t\t\treturn Number.isNaN(value.getTime()) ? null : value.toISOString();\n\t\t\t}\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-base-to-string\n\t\t\tif (typeof value.toString === 'function' && value.toString !== Object.prototype.toString) return value.toString();\n\t\t\treturn null;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\n/**\n * Creates and populates an URLSearchParams instance from an object, stripping\n * out null and undefined values, while also coercing non-strings to strings.\n *\n * @param options - The options to use\n * @returns A populated URLSearchParams instance\n */\nexport function makeURLSearchParams<T extends object>(options?: Readonly<T>) {\n\tconst params = new URLSearchParams();\n\tif (!options) return params;\n\n\tfor (const [key, value] of Object.entries(options)) {\n\t\tconst serialized = serializeSearchParam(value);\n\t\tif (serialized !== null) params.append(key, serialized);\n\t}\n\n\treturn params;\n}\n\n/**\n * Converts the response to usable data\n *\n * @param res - The fetch response\n */\nexport async function parseResponse(res: ResponseLike): Promise<unknown> {\n\tif (res.headers.get('Content-Type')?.startsWith('application/json')) {\n\t\treturn res.json();\n\t}\n\n\treturn res.arrayBuffer();\n}\n\n/**\n * Check whether a request falls under a sublimit\n *\n * @param bucketRoute - The buckets route identifier\n * @param body - The options provided as JSON data\n * @param method - The HTTP method that will be used to make the request\n * @returns Whether the request falls under a sublimit\n */\nexport function hasSublimit(bucketRoute: string, body?: unknown, method?: string): boolean {\n\t// TODO: Update for new sublimits\n\t// Currently known sublimits:\n\t// Editing channel `name` or `topic`\n\tif (bucketRoute === '/channels/:id') {\n\t\tif (typeof body !== 'object' || body === null) return false;\n\t\t// This should never be a POST body, but just in case\n\t\tif (method !== RequestMethod.Patch) return false;\n\t\tconst castedBody = body as RESTPatchAPIChannelJSONBody;\n\t\treturn ['name', 'topic'].some((key) => Reflect.has(castedBody, key));\n\t}\n\n\t// If we are checking if a request has a sublimit on a route not checked above, sublimit all requests to avoid a flood of 429s\n\treturn true;\n}\n\n/**\n * Check whether an error indicates that a retry can be attempted\n *\n * @param error - The error thrown by the network request\n * @returns Whether the error indicates a retry should be attempted\n */\nexport function shouldRetry(error: Error | NodeJS.ErrnoException) {\n\t// Retry for possible timed out requests\n\tif (error.name === 'AbortError') return true;\n\t// Downlevel ECONNRESET to retry as it may be recoverable\n\treturn ('code' in error && error.code === 'ECONNRESET') || error.message.includes('ECONNRESET');\n}\n\n/**\n * Determines whether the request should be queued or whether a RateLimitError should be thrown\n *\n * @internal\n */\nexport async function onRateLimit(manager: REST, rateLimitData: RateLimitData) {\n\tconst { options } = manager;\n\tif (!options.rejectOnRateLimit) return;\n\n\tconst shouldThrow =\n\t\ttypeof options.rejectOnRateLimit === 'function'\n\t\t\t? await options.rejectOnRateLimit(rateLimitData)\n\t\t\t: options.rejectOnRateLimit.some((route) => rateLimitData.route.startsWith(route.toLowerCase()));\n\tif (shouldThrow) {\n\t\tthrow new RateLimitError(rateLimitData);\n\t}\n}\n\n/**\n * Calculates the default avatar index for a given user id.\n *\n * @param userId - The user id to calculate the default avatar index for\n */\nexport function calculateUserDefaultAvatarIndex(userId: Snowflake) {\n\treturn Number(BigInt(userId) >> 22n) % 6;\n}\n\n/**\n * Sleeps for a given amount of time.\n *\n * @param ms - The amount of time (in milliseconds) to sleep for\n */\nexport async function sleep(ms: number): Promise<void> {\n\treturn new Promise<void>((resolve) => {\n\t\tsetTimeout(() => resolve(), ms);\n\t});\n}\n\n/**\n * Verifies that a value is a buffer-like object.\n *\n * @param value - The value to check\n */\nexport function isBufferLike(value: unknown): value is ArrayBuffer | Buffer | Uint8Array | Uint8ClampedArray {\n\treturn value instanceof ArrayBuffer || value instanceof Uint8Array || value instanceof Uint8ClampedArray;\n}\n","import type { RequestInit } from 'undici';\nimport type { REST } from '../REST.js';\nimport type { DiscordErrorData, OAuthErrorData } from '../errors/DiscordAPIError.js';\nimport { DiscordAPIError } from '../errors/DiscordAPIError.js';\nimport { HTTPError } from '../errors/HTTPError.js';\nimport { RESTEvents } from '../utils/constants.js';\nimport type { ResponseLike, HandlerRequestData, RouteData } from '../utils/types.js';\nimport { parseResponse, shouldRetry } from '../utils/utils.js';\n\n/**\n * Invalid request limiting is done on a per-IP basis, not a per-token basis.\n * The best we can do is track invalid counts process-wide (on the theory that\n * users could have multiple bots run from one process) rather than per-bot.\n * Therefore, store these at file scope here rather than in the client's\n * RESTManager object.\n */\nlet invalidCount = 0;\nlet invalidCountResetTime: number | null = null;\n\n/**\n * Increment the invalid request count and emit warning if necessary\n *\n * @internal\n */\nexport function incrementInvalidCount(manager: REST) {\n\tif (!invalidCountResetTime || invalidCountResetTime < Date.now()) {\n\t\tinvalidCountResetTime = Date.now() + 1_000 * 60 * 10;\n\t\tinvalidCount = 0;\n\t}\n\n\tinvalidCount++;\n\n\tconst emitInvalid =\n\t\tmanager.options.invalidRequestWarningInterval > 0 &&\n\t\tinvalidCount % manager.options.invalidRequestWarningInterval === 0;\n\tif (emitInvalid) {\n\t\t// Let library users know periodically about invalid requests\n\t\tmanager.emit(RESTEvents.InvalidRequestWarning, {\n\t\t\tcount: invalidCount,\n\t\t\tremainingTime: invalidCountResetTime - Date.now(),\n\t\t});\n\t}\n}\n\n/**\n * Performs the actual network request for a request handler\n *\n * @param manager - The manager that holds options and emits informational events\n * @param routeId - The generalized api route with literal ids for major parameters\n * @param url - The fully resolved url to make the request to\n * @param options - The fetch options needed to make the request\n * @param requestData - Extra data from the user's request needed for errors and additional processing\n * @param retries - The number of retries this request has already attempted (recursion occurs on the handler)\n * @returns The respond from the network or `null` when the request should be retried\n * @internal\n */\nexport async function makeNetworkRequest(\n\tmanager: REST,\n\trouteId: RouteData,\n\turl: string,\n\toptions: RequestInit,\n\trequestData: HandlerRequestData,\n\tretries: number,\n) {\n\tconst controller = new AbortController();\n\tconst timeout = setTimeout(() => controller.abort(), manager.options.timeout);\n\tif (requestData.signal) {\n\t\t// If the user signal was aborted, abort the controller, else abort the local signal.\n\t\t// The reason why we don't re-use the user's signal, is because users may use the same signal for multiple\n\t\t// requests, and we do not want to cause unexpected side-effects.\n\t\tif (requestData.signal.aborted) controller.abort();\n\t\telse requestData.signal.addEventListener('abort', () => controller.abort());\n\t}\n\n\tlet res: ResponseLike;\n\ttry {\n\t\tres = await manager.options.makeRequest(url, { ...options, signal: controller.signal });\n\t} catch (error: unknown) {\n\t\tif (!(error instanceof Error)) throw error;\n\t\t// Retry the specified number of times if needed\n\t\tif (shouldRetry(error) && retries !== manager.options.retries) {\n\t\t\t// Retry is handled by the handler upon receiving null\n\t\t\treturn null;\n\t\t}\n\n\t\tthrow error;\n\t} finally {\n\t\tclearTimeout(timeout);\n\t}\n\n\tif (manager.listenerCount(RESTEvents.Response)) {\n\t\tmanager.emit(\n\t\t\tRESTEvents.Response,\n\t\t\t{\n\t\t\t\tmethod: options.method ?? 'get',\n\t\t\t\tpath: routeId.original,\n\t\t\t\troute: routeId.bucketRoute,\n\t\t\t\toptions,\n\t\t\t\tdata: requestData,\n\t\t\t\tretries,\n\t\t\t},\n\t\t\tres instanceof Response ? res.clone() : { ...res },\n\t\t);\n\t}\n\n\treturn res;\n}\n\n/**\n * Handles 5xx and 4xx errors (not 429's) conventionally. 429's should be handled before calling this function\n *\n * @param manager - The manager that holds options and emits informational events\n * @param res - The response received from {@link makeNetworkRequest}\n * @param method - The method used to make the request\n * @param url - The fully resolved url to make the request to\n * @param requestData - Extra data from the user's request needed for errors and additional processing\n * @param retries - The number of retries this request has already attempted (recursion occurs on the handler)\n * @returns - The response if the status code is not handled or null to request a retry\n */\nexport async function handleErrors(\n\tmanager: REST,\n\tres: ResponseLike,\n\tmethod: string,\n\turl: string,\n\trequestData: HandlerRequestData,\n\tretries: number,\n) {\n\tconst status = res.status;\n\tif (status >= 500 && status < 600) {\n\t\t// Retry the specified number of times for possible server side issues\n\t\tif (retries !== manager.options.retries) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// We are out of retries, throw an error\n\t\tthrow new HTTPError(status, res.statusText, method, url, requestData);\n\t} else {\n\t\t// Handle possible malformed requests\n\t\tif (status >= 400 && status < 500) {\n\t\t\t// If we receive this status code, it means the token we had is no longer valid.\n\t\t\tif (status === 401 && requestData.auth) {\n\t\t\t\tmanager.setToken(null!);\n\t\t\t}\n\n\t\t\t// The request will not succeed for some reason, parse the error returned from the api\n\t\t\tconst data = (await parseResponse(res)) as DiscordErrorData | OAuthErrorData;\n\t\t\t// throw the API error\n\t\t\tthrow new DiscordAPIError(data, 'code' in data ? data.code : data.error, status, method, url, requestData);\n\t\t}\n\n\t\treturn res;\n\t}\n}\n","import type { RequestInit } from 'undici';\nimport type { REST } from '../REST.js';\nimport type { IHandler } from '../interfaces/Handler.js';\nimport { RESTEvents } from '../utils/constants.js';\nimport type { ResponseLike, HandlerRequestData, RouteData } from '../utils/types.js';\nimport { onRateLimit, sleep } from '../utils/utils.js';\nimport { handleErrors, incrementInvalidCount, makeNetworkRequest } from './Shared.js';\n\n/**\n * The structure used to handle burst requests for a given bucket.\n * Burst requests have no ratelimit handling but allow for pre- and post-processing\n * of data in the same manner as sequentially queued requests.\n *\n * @remarks\n * This queue may still emit a rate limit error if an unexpected 429 is hit\n */\nexport class BurstHandler implements IHandler {\n\t/**\n\t * {@inheritdoc IHandler.id}\n\t */\n\tpublic readonly id: string;\n\n\t/**\n\t * {@inheritDoc IHandler.inactive}\n\t */\n\tpublic inactive = false;\n\n\t/**\n\t * @param manager - The request manager\n\t * @param hash - The hash that this RequestHandler handles\n\t * @param majorParameter - The major parameter for this handler\n\t */\n\tpublic constructor(\n\t\tprivate readonly manager: REST,\n\t\tprivate readonly hash: string,\n\t\tprivate readonly majorParameter: string,\n\t) {\n\t\tthis.id = `${hash}:${majorParameter}`;\n\t}\n\n\t/**\n\t * Emits a debug message\n\t *\n\t * @param message - The message to debug\n\t */\n\tprivate debug(message: string) {\n\t\tthis.manager.emit(RESTEvents.Debug, `[REST ${this.id}] ${message}`);\n\t}\n\n\t/**\n\t * {@inheritDoc IHandler.queueRequest}\n\t */\n\tpublic async queueRequest(\n\t\trouteId: RouteData,\n\t\turl: string,\n\t\toptions: RequestInit,\n\t\trequestData: HandlerRequestData,\n\t): Promise<ResponseLike> {\n\t\treturn this.runRequest(routeId, url, options, requestData);\n\t}\n\n\t/**\n\t * The method that actually makes the request to the API, and updates info about the bucket accordingly\n\t *\n\t * @param routeId - The generalized API route with literal ids for major parameters\n\t * @param url - The fully resolved URL to make the request to\n\t * @param options - The fetch options needed to make the request\n\t * @param requestData - Extra data from the user's request needed for errors and additional processing\n\t * @param retries - The number of retries this request has already attempted (recursion)\n\t */\n\tprivate async runRequest(\n\t\trouteId: RouteData,\n\t\turl: string,\n\t\toptions: RequestInit,\n\t\trequestData: HandlerRequestData,\n\t\tretries = 0,\n\t): Promise<ResponseLike> {\n\t\tconst method = options.method ?? 'get';\n\n\t\tconst res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries);\n\n\t\t// Retry requested\n\t\tif (res === null) {\n\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\treturn this.runRequest(routeId, url, options, requestData, ++retries);\n\t\t}\n\n\t\tconst status = res.status;\n\t\tlet retryAfter = 0;\n\t\tconst retry = res.headers.get('Retry-After');\n\n\t\t// Amount of time in milliseconds until we should retry if rate limited (globally or otherwise)\n\t\tif (retry) retryAfter = Number(retry) * 1_000 + this.manager.options.offset;\n\n\t\t// Count the invalid requests\n\t\tif (status === 401 || status === 403 || status === 429) {\n\t\t\tincrementInvalidCount(this.manager);\n\t\t}\n\n\t\tif (status >= 200 && status < 300) {\n\t\t\treturn res;\n\t\t} else if (status === 429) {\n\t\t\t// Unexpected ratelimit\n\t\t\tconst isGlobal = res.headers.has('X-RateLimit-Global');\n\t\t\tawait onRateLimit(this.manager, {\n\t\t\t\ttimeToReset: retryAfter,\n\t\t\t\tlimit: Number.POSITIVE_INFINITY,\n\t\t\t\tmethod,\n\t\t\t\thash: this.hash,\n\t\t\t\turl,\n\t\t\t\troute: routeId.bucketRoute,\n\t\t\t\tmajorParameter: this.majorParameter,\n\t\t\t\tglobal: isGlobal,\n\t\t\t});\n\t\t\tthis.debug(\n\t\t\t\t[\n\t\t\t\t\t'Encountered unexpected 429 rate limit',\n\t\t\t\t\t` Global : ${isGlobal}`,\n\t\t\t\t\t` Method : ${method}`,\n\t\t\t\t\t` URL : ${url}`,\n\t\t\t\t\t` Bucket : ${routeId.bucketRoute}`,\n\t\t\t\t\t` Major parameter: ${routeId.majorParameter}`,\n\t\t\t\t\t` Hash : ${this.hash}`,\n\t\t\t\t\t` Limit : ${Number.POSITIVE_INFINITY}`,\n\t\t\t\t\t` Retry After : ${retryAfter}ms`,\n\t\t\t\t\t` Sublimit : None`,\n\t\t\t\t].join('\\n'),\n\t\t\t);\n\n\t\t\t// We are bypassing all other limits, but an encountered limit should be respected (it's probably a non-punished rate limit anyways)\n\t\t\tawait sleep(retryAfter);\n\n\t\t\t// Since this is not a server side issue, the next request should pass, so we don't bump the retries counter\n\t\t\treturn this.runRequest(routeId, url, options, requestData, retries);\n\t\t} else {\n\t\t\tconst handled = await handleErrors(this.manager, res, method, url, requestData, retries);\n\t\t\tif (handled === null) {\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\treturn this.runRequest(routeId, url, options, requestData, ++retries);\n\t\t\t}\n\n\t\t\treturn handled;\n\t\t}\n\t}\n}\n","import { AsyncQueue } from '@sapphire/async-queue';\nimport type { RequestInit } from 'undici';\nimport type { REST } from '../REST.js';\nimport type { IHandler } from '../interfaces/Handler.js';\nimport { RESTEvents } from '../utils/constants.js';\nimport type { RateLimitData, ResponseLike, HandlerRequestData, RouteData } from '../utils/types.js';\nimport { hasSublimit, onRateLimit, sleep } from '../utils/utils.js';\nimport { handleErrors, incrementInvalidCount, makeNetworkRequest } from './Shared.js';\n\nconst enum QueueType {\n\tStandard,\n\tSublimit,\n}\n\n/**\n * The structure used to handle sequential requests for a given bucket\n */\nexport class SequentialHandler implements IHandler {\n\t/**\n\t * {@inheritDoc IHandler.id}\n\t */\n\tpublic readonly id: string;\n\n\t/**\n\t * The time this rate limit bucket will reset\n\t */\n\tprivate reset = -1;\n\n\t/**\n\t * The remaining requests that can be made before we are rate limited\n\t */\n\tprivate remaining = 1;\n\n\t/**\n\t * The total number of requests that can be made before we are rate limited\n\t */\n\tprivate limit = Number.POSITIVE_INFINITY;\n\n\t/**\n\t * The interface used to sequence async requests sequentially\n\t */\n\t#asyncQueue = new AsyncQueue();\n\n\t/**\n\t * The interface used to sequence sublimited async requests sequentially\n\t */\n\t#sublimitedQueue: AsyncQueue | null = null;\n\n\t/**\n\t * A promise wrapper for when the sublimited queue is finished being processed or null when not being processed\n\t */\n\t#sublimitPromise: { promise: Promise<void>; resolve(): void } | null = null;\n\n\t/**\n\t * Whether the sublimit queue needs to be shifted in the finally block\n\t */\n\t#shiftSublimit = false;\n\n\t/**\n\t * @param manager - The request manager\n\t * @param hash - The hash that this RequestHandler handles\n\t * @param majorParameter - The major parameter for this handler\n\t */\n\tpublic constructor(\n\t\tprivate readonly manager: REST,\n\t\tprivate readonly hash: string,\n\t\tprivate readonly majorParameter: string,\n\t) {\n\t\tthis.id = `${hash}:${majorParameter}`;\n\t}\n\n\t/**\n\t * {@inheritDoc IHandler.inactive}\n\t */\n\tpublic get inactive(): boolean {\n\t\treturn (\n\t\t\tthis.#asyncQueue.remaining === 0 &&\n\t\t\t(this.#sublimitedQueue === null || this.#sublimitedQueue.remaining === 0) &&\n\t\t\t!this.limited\n\t\t);\n\t}\n\n\t/**\n\t * If the rate limit bucket is currently limited by the global limit\n\t */\n\tprivate get globalLimited(): boolean {\n\t\treturn this.manager.globalRemaining <= 0 && Date.now() < this.manager.globalReset;\n\t}\n\n\t/**\n\t * If the rate limit bucket is currently limited by its limit\n\t */\n\tprivate get localLimited(): boolean {\n\t\treturn this.remaining <= 0 && Date.now() < this.reset;\n\t}\n\n\t/**\n\t * If the rate limit bucket is currently limited\n\t */\n\tprivate get limited(): boolean {\n\t\treturn this.globalLimited || this.localLimited;\n\t}\n\n\t/**\n\t * The time until queued requests can continue\n\t */\n\tprivate get timeToReset(): number {\n\t\treturn this.reset + this.manager.options.offset - Date.now();\n\t}\n\n\t/**\n\t * Emits a debug message\n\t *\n\t * @param message - The message to debug\n\t */\n\tprivate debug(message: string) {\n\t\tthis.manager.emit(RESTEvents.Debug, `[REST ${this.id}] ${message}`);\n\t}\n\n\t/**\n\t * Delay all requests for the specified amount of time, handling global rate limits\n\t *\n\t * @param time - The amount of time to delay all requests for\n\t */\n\tprivate async globalDelayFor(time: number): Promise<void> {\n\t\tawait sleep(time);\n\t\tthis.manager.globalDelay = null;\n\t}\n\n\t/**\n\t * {@inheritDoc IHandler.queueRequest}\n\t */\n\tpublic async queueRequest(\n\t\trouteId: RouteData,\n\t\turl: string,\n\t\toptions: RequestInit,\n\t\trequestData: HandlerRequestData,\n\t): Promise<ResponseLike> {\n\t\tlet queue = this.#asyncQueue;\n\t\tlet queueType = QueueType.Standard;\n\t\t// Separate sublimited requests when already sublimited\n\t\tif (this.#sublimitedQueue && hasSublimit(routeId.bucketRoute, requestData.body, options.method)) {\n\t\t\tqueue = this.#sublimitedQueue!;\n\t\t\tqueueType = QueueType.Sublimit;\n\t\t}\n\n\t\t// Wait for any previous requests to be completed before this one is run\n\t\tawait queue.wait({ signal: requestData.signal });\n\t\t// This set handles retroactively sublimiting requests\n\t\tif (queueType === QueueType.Standard) {\n\t\t\tif (this.#sublimitedQueue && hasSublimit(routeId.bucketRoute, requestData.body, options.method)) {\n\t\t\t\t/**\n\t\t\t\t * Remove the request from the standard queue, it should never be possible to get here while processing the\n\t\t\t\t * sublimit queue so there is no need to worry about shifting the wrong request\n\t\t\t\t */\n\t\t\t\tqueue = this.#sublimitedQueue!;\n\t\t\t\tconst wait = queue.wait();\n\t\t\t\tthis.#asyncQueue.shift();\n\t\t\t\tawait wait;\n\t\t\t} else if (this.#sublimitPromise) {\n\t\t\t\t// Stall requests while the sublimit queue gets processed\n\t\t\t\tawait this.#sublimitPromise.promise;\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\t// Make the request, and return the results\n\t\t\treturn await this.runRequest(routeId, url, options, requestData);\n\t\t} finally {\n\t\t\t// Allow the next request to fire\n\t\t\tqueue.shift();\n\t\t\tif (this.#shiftSublimit) {\n\t\t\t\tthis.#shiftSublimit = false;\n\t\t\t\tthis.#sublimitedQueue?.shift();\n\t\t\t}\n\n\t\t\t// If this request is the last request in a sublimit\n\t\t\tif (this.#sublimitedQueue?.remaining === 0) {\n\t\t\t\tthis.#sublimitPromise?.resolve();\n\t\t\t\tthis.#sublimitedQueue = null;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * The method that actually makes the request to the api, and updates info about the bucket accordingly\n\t *\n\t * @param routeId - The generalized api route with literal ids for major parameters\n\t * @param url - The fully resolved url to make the request to\n\t * @param options - The fetch options needed to make the request\n\t * @param requestData - Extra data from the user's request needed for errors and additional processing\n\t * @param retries - The number of retries this request has already attempted (recursion)\n\t */\n\tprivate async runRequest(\n\t\trouteId: RouteData,\n\t\turl: string,\n\t\toptions: RequestInit,\n\t\trequestData: HandlerRequestData,\n\t\tretries = 0,\n\t): Promise<ResponseLike> {\n\t\t/*\n\t\t * After calculations have been done, pre-emptively stop further requests\n\t\t * Potentially loop until this task can run if e.g. the global rate limit is hit twice\n\t\t */\n\t\twhile (this.limited) {\n\t\t\tconst isGlobal = this.globalLimited;\n\t\t\tlet limit: number;\n\t\t\tlet timeout: number;\n\t\t\tlet delay: Promise<void>;\n\n\t\t\tif (isGlobal) {\n\t\t\t\t// Set RateLimitData based on the global limit\n\t\t\t\tlimit = this.manager.options.globalRequestsPerSecond;\n\t\t\t\ttimeout = this.manager.globalReset + this.manager.options.offset - Date.now();\n\t\t\t\t// If this is the first task to reach the global timeout, set the global delay\n\t\t\t\tif (!this.manager.globalDelay) {\n\t\t\t\t\t// The global delay function clears the global delay state when it is resolved\n\t\t\t\t\tthis.manager.globalDelay = this.globalDelayFor(timeout);\n\t\t\t\t}\n\n\t\t\t\tdelay = this.manager.globalDelay;\n\t\t\t} else {\n\t\t\t\t// Set RateLimitData based on the route-specific limit\n\t\t\t\tlimit = this.limit;\n\t\t\t\ttimeout = this.timeToReset;\n\t\t\t\tdelay = sleep(timeout);\n\t\t\t}\n\n\t\t\tconst rateLimitData: RateLimitData = {\n\t\t\t\ttimeToReset: timeout,\n\t\t\t\tlimit,\n\t\t\t\tmethod: options.method ?? 'get',\n\t\t\t\thash: this.hash,\n\t\t\t\turl,\n\t\t\t\troute: routeId.bucketRoute,\n\t\t\t\tmajorParameter: this.majorParameter,\n\t\t\t\tglobal: isGlobal,\n\t\t\t};\n\t\t\t// Let library users know they have hit a rate limit\n\t\t\tthis.manager.emit(RESTEvents.RateLimited, rateLimitData);\n\t\t\t// Determine whether a RateLimitError should be thrown\n\t\t\tawait onRateLimit(this.manager, rateLimitData);\n\t\t\t// When not erroring, emit debug for what is happening\n\t\t\tif (isGlobal) {\n\t\t\t\tthis.debug(`Global rate limit hit, blocking all requests for ${timeout}ms`);\n\t\t\t} else {\n\t\t\t\tthis.debug(`Waiting ${timeout}ms for rate limit to pass`);\n\t\t\t}\n\n\t\t\t// Wait the remaining time left before the rate limit resets\n\t\t\tawait delay;\n\t\t}\n\n\t\t// As the request goes out, update the global usage information\n\t\tif (!this.manager.globalReset || this.manager.globalReset < Date.now()) {\n\t\t\tthis.manager.globalReset = Date.now() + 1_000;\n\t\t\tthis.manager.globalRemaining = this.manager.options.globalRequestsPerSecond;\n\t\t}\n\n\t\tthis.manager.globalRemaining--;\n\n\t\tconst method = options.method ?? 'get';\n\n\t\tconst res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries);\n\n\t\t// Retry requested\n\t\tif (res === null) {\n\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\treturn this.runRequest(routeId, url, options, requestData, ++retries);\n\t\t}\n\n\t\tconst status = res.status;\n\t\tlet retryAfter = 0;\n\n\t\tconst limit = res.headers.get('X-RateLimit-Limit');\n\t\tconst remaining = res.headers.get('X-RateLimit-Remaining');\n\t\tconst reset = res.headers.get('X-RateLimit-Reset-After');\n\t\tconst hash = res.headers.get('X-RateLimit-Bucket');\n\t\tconst retry = res.headers.get('Retry-After');\n\n\t\t// Update the total number of requests that can be made before the rate limit resets\n\t\tthis.limit = limit ? Number(limit) : Number.POSITIVE_INFINITY;\n\t\t// Update the number of remaining requests that can be made before the rate limit resets\n\t\tthis.remaining = remaining ? Number(remaining) : 1;\n\t\t// Update the time when this rate limit resets (reset-after is in seconds)\n\t\tthis.reset = reset ? Number(reset) * 1_000 + Date.now() + this.manager.options.offset : Date.now();\n\n\t\t// Amount of time in milliseconds until we should retry if rate limited (globally or otherwise)\n\t\tif (retry) retryAfter = Number(retry) * 1_000 + this.manager.options.offset;\n\n\t\t// Handle buckets via the hash header retroactively\n\t\tif (hash && hash !== this.hash) {\n\t\t\t// Let library users know when rate limit buckets have been updated\n\t\t\tthis.debug(['Received bucket hash update', ` Old Hash : ${this.hash}`, ` New Hash : ${hash}`].join('\\n'));\n\t\t\t// This queue will eventually be eliminated via attrition\n\t\t\tthis.manager.hashes.set(`${method}:${routeId.bucketRoute}`, { value: hash, lastAccess: Date.now() });\n\t\t} else if (hash) {\n\t\t\t// Handle the case where hash value doesn't change\n\t\t\t// Fetch the hash data from the manager\n\t\t\tconst hashData = this.manager.hashes.get(`${method}:${routeId.bucketRoute}`);\n\n\t\t\t// When fetched, update the last access of the hash\n\t\t\tif (hashData) {\n\t\t\t\thashData.lastAccess = Date.now();\n\t\t\t}\n\t\t}\n\n\t\t// Handle retryAfter, which means we have actually hit a rate limit\n\t\tlet sublimitTimeout: number | null = null;\n\t\tif (retryAfter > 0) {\n\t\t\tif (res.headers.has('X-RateLimit-Global')) {\n\t\t\t\tthis.manager.globalRemaining = 0;\n\t\t\t\tthis.manager.globalReset = Date.now() + retryAfter;\n\t\t\t} else if (!this.localLimited) {\n\t\t\t\t/*\n\t\t\t\t * This is a sublimit (e.g. 2 channel name changes/10 minutes) since the headers don't indicate a\n\t\t\t\t * route-wide rate limit. Don't update remaining or reset to avoid rate limiting the whole\n\t\t\t\t * endpoint, just set a reset time on the request itself to avoid retrying too soon.\n\t\t\t\t */\n\t\t\t\tsublimitTimeout = retryAfter;\n\t\t\t}\n\t\t}\n\n\t\t// Count the invalid requests\n\t\tif (status === 401 || status === 403 || status === 429) {\n\t\t\tincrementInvalidCount(this.manager);\n\t\t}\n\n\t\tif (res.ok) {\n\t\t\treturn res;\n\t\t} else if (status === 429) {\n\t\t\t// A rate limit was hit - this may happen if the route isn't associated with an official bucket hash yet, or when first globally rate limited\n\t\t\tconst isGlobal = this.globalLimited;\n\t\t\tlet limit: number;\n\t\t\tlet timeout: number;\n\n\t\t\tif (isGlobal) {\n\t\t\t\t// Set RateLimitData based on the global limit\n\t\t\t\tlimit = this.manager.options.globalRequestsPerSecond;\n\t\t\t\ttimeout = this.manager.globalReset + this.manager.options.offset - Date.now();\n\t\t\t} else {\n\t\t\t\t// Set RateLimitData based on the route-specific limit\n\t\t\t\tlimit = this.limit;\n\t\t\t\ttimeout = this.timeToReset;\n\t\t\t}\n\n\t\t\tawait onRateLimit(this.manager, {\n\t\t\t\ttimeToReset: timeout,\n\t\t\t\tlimit,\n\t\t\t\tmethod,\n\t\t\t\thash: this.hash,\n\t\t\t\turl,\n\t\t\t\troute: routeId.bucketRoute,\n\t\t\t\tmajorParameter: this.majorParameter,\n\t\t\t\tglobal: isGlobal,\n\t\t\t});\n\t\t\tthis.debug(\n\t\t\t\t[\n\t\t\t\t\t'Encountered unexpected 429 rate limit',\n\t\t\t\t\t` Global : ${isGlobal.toString()}`,\n\t\t\t\t\t` Method : ${method}`,\n\t\t\t\t\t` URL : ${url}`,\n\t\t\t\t\t` Bucket : ${routeId.bucketRoute}`,\n\t\t\t\t\t` Major parameter: ${routeId.majorParameter}`,\n\t\t\t\t\t` Hash : ${this.hash}`,\n\t\t\t\t\t` Limit : ${limit}`,\n\t\t\t\t\t` Retry After : ${retryAfter}ms`,\n\t\t\t\t\t` Sublimit : ${sublimitTimeout ? `${sublimitTimeout}ms` : 'None'}`,\n\t\t\t\t].join('\\n'),\n\t\t\t);\n\t\t\t// If caused by a sublimit, wait it out here so other requests on the route can be handled\n\t\t\tif (sublimitTimeout) {\n\t\t\t\t// Normally the sublimit queue will not exist, however, if a sublimit is hit while in the sublimit queue, it will\n\t\t\t\tconst firstSublimit = !this.#sublimitedQueue;\n\t\t\t\tif (firstSublimit) {\n\t\t\t\t\tthis.#sublimitedQueue = new AsyncQueue();\n\t\t\t\t\tvoid this.#sublimitedQueue.wait();\n\t\t\t\t\tthis.#asyncQueue.shift();\n\t\t\t\t}\n\n\t\t\t\tthis.#sublimitPromise?.resolve();\n\t\t\t\tthis.#sublimitPromise = null;\n\t\t\t\tawait sleep(sublimitTimeout);\n\t\t\t\tlet resolve: () => void;\n\t\t\t\t// eslint-disable-next-line promise/param-names, no-promise-executor-return\n\t\t\t\tconst promise = new Promise<void>((res) => (resolve = res));\n\t\t\t\tthis.#sublimitPromise = { promise, resolve: resolve! };\n\t\t\t\tif (firstSublimit) {\n\t\t\t\t\t// Re-queue this request so it can be shifted by the finally\n\t\t\t\t\tawait this.#asyncQueue.wait();\n\t\t\t\t\tthis.#shiftSublimit = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Since this is not a server side issue, the next request should pass, so we don't bump the retries counter\n\t\t\treturn this.runRequest(routeId, url, options, requestData, retries);\n\t\t} else {\n\t\t\tconst handled = await handleErrors(this.manager, res, method, url, requestData, retries);\n\t\t\tif (handled === null) {\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\treturn this.runRequest(routeId, url, options, requestData, ++retries);\n\t\t\t}\n\n\t\t\treturn handled;\n\t\t}\n\t}\n}\n","export * from './lib/CDN.js';\nexport * from './lib/errors/DiscordAPIError.js';\nexport * from './lib/errors/HTTPError.js';\nexport * from './lib/errors/RateLimitError.js';\nexport * from './lib/REST.js';\nexport * from './lib/utils/constants.js';\nexport * from './lib/utils/types.js';\nexport { calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse } from './lib/utils/utils.js';\n\n/**\n * The {@link https://github.com/discordjs/discord.js/blob/main/packages/rest/#readme | @discordjs/rest} version\n * that you are currently using.\n */\n// This needs to explicitly be `string` so it is not typed as a \"const string\" that gets injected by esbuild\nexport const version = '2.0.1' as string;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AAqB,sBAAsB;AAErD,QAAI,aAAa;AAIjB,QAAI,oCAAmC,cAAc,8BAA8B;AAClF,YAAM,KAAK,aAAa,KAAK,QAAQ,EAAG,CAAC;AACzC,YAAM,YAAY,kCAAiB,cAAc,EAAE;AACnD,UAAI,KAAK,IAAI,IAAI,YAAY,MAAQ,KAAK,KAAK,KAAK,IAAI;AACvD,sBAAc;AAAA,MACf;AAAA,IACD;AAEA,WAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa,YAAY;AAAA,MACzB,UAAU;AAAA,IACX;AAAA,EACD;AACD;;;AMncO,IAAM,UAAU;;;AbZvB,mBAAmB,KAAK;","names":["RESTEvents","RequestMethod","limit","res"]} \ No newline at end of file
diff --git a/node_modules/@discordjs/rest/dist/web.mjs b/node_modules/@discordjs/rest/dist/web.mjs
new file mode 100644
index 0000000..8c70b4f
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/web.mjs
@@ -0,0 +1,1312 @@
+var __defProp = Object.defineProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+
+// src/environment.ts
+var defaultStrategy;
+function setDefaultStrategy(newStrategy) {
+ defaultStrategy = newStrategy;
+}
+__name(setDefaultStrategy, "setDefaultStrategy");
+function getDefaultStrategy() {
+ return defaultStrategy;
+}
+__name(getDefaultStrategy, "getDefaultStrategy");
+
+// src/lib/utils/constants.ts
+import { getUserAgentAppendix } from "@discordjs/util";
+import { APIVersion } from "discord-api-types/v10";
+var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.0.1)`;
+var DefaultUserAgentAppendix = getUserAgentAppendix();
+var DefaultRestOptions = {
+ agent: null,
+ api: "https://discord.com/api",
+ authPrefix: "Bot",
+ cdn: "https://cdn.discordapp.com",
+ headers: {},
+ invalidRequestWarningInterval: 0,
+ globalRequestsPerSecond: 50,
+ offset: 50,
+ rejectOnRateLimit: null,
+ retries: 3,
+ timeout: 15e3,
+ userAgentAppendix: DefaultUserAgentAppendix,
+ version: APIVersion,
+ hashSweepInterval: 144e5,
+ // 4 Hours
+ hashLifetime: 864e5,
+ // 24 Hours
+ handlerSweepInterval: 36e5,
+ // 1 Hour
+ async makeRequest(...args) {
+ return getDefaultStrategy()(...args);
+ }
+};
+var RESTEvents = /* @__PURE__ */ ((RESTEvents2) => {
+ RESTEvents2["Debug"] = "restDebug";
+ RESTEvents2["HandlerSweep"] = "handlerSweep";
+ RESTEvents2["HashSweep"] = "hashSweep";
+ RESTEvents2["InvalidRequestWarning"] = "invalidRequestWarning";
+ RESTEvents2["RateLimited"] = "rateLimited";
+ RESTEvents2["Response"] = "response";
+ return RESTEvents2;
+})(RESTEvents || {});
+var ALLOWED_EXTENSIONS = ["webp", "png", "jpg", "jpeg", "gif"];
+var ALLOWED_STICKER_EXTENSIONS = ["png", "json", "gif"];
+var ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
+var OverwrittenMimeTypes = {
+ // https://github.com/discordjs/discord.js/issues/8557
+ "image/apng": "image/png"
+};
+var BurstHandlerMajorIdKey = "burst";
+
+// src/lib/CDN.ts
+var CDN = class {
+ constructor(base = DefaultRestOptions.cdn) {
+ this.base = base;
+ }
+ static {
+ __name(this, "CDN");
+ }
+ /**
+ * Generates an app asset URL for a client's asset.
+ *
+ * @param clientId - The client id that has the asset
+ * @param assetHash - The hash provided by Discord for this asset
+ * @param options - Optional options for the asset
+ */
+ appAsset(clientId, assetHash, options) {
+ return this.makeURL(`/app-assets/${clientId}/${assetHash}`, options);
+ }
+ /**
+ * Generates an app icon URL for a client's icon.
+ *
+ * @param clientId - The client id that has the icon
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ appIcon(clientId, iconHash, options) {
+ return this.makeURL(`/app-icons/${clientId}/${iconHash}`, options);
+ }
+ /**
+ * Generates an avatar URL, e.g. for a user or a webhook.
+ *
+ * @param id - The id that has the icon
+ * @param avatarHash - The hash provided by Discord for this avatar
+ * @param options - Optional options for the avatar
+ */
+ avatar(id, avatarHash, options) {
+ return this.dynamicMakeURL(`/avatars/${id}/${avatarHash}`, avatarHash, options);
+ }
+ /**
+ * Generates a user avatar decoration URL.
+ *
+ * @param userId - The id of the user
+ * @param userAvatarDecoration - The hash provided by Discord for this avatar decoration
+ * @param options - Optional options for the avatar decoration
+ */
+ avatarDecoration(userId, userAvatarDecoration, options) {
+ return this.makeURL(`/avatar-decorations/${userId}/${userAvatarDecoration}`, options);
+ }
+ /**
+ * Generates a banner URL, e.g. for a user or a guild.
+ *
+ * @param id - The id that has the banner splash
+ * @param bannerHash - The hash provided by Discord for this banner
+ * @param options - Optional options for the banner
+ */
+ banner(id, bannerHash, options) {
+ return this.dynamicMakeURL(`/banners/${id}/${bannerHash}`, bannerHash, options);
+ }
+ /**
+ * Generates an icon URL for a channel, e.g. a group DM.
+ *
+ * @param channelId - The channel id that has the icon
+ * @param iconHash - The hash provided by Discord for this channel
+ * @param options - Optional options for the icon
+ */
+ channelIcon(channelId, iconHash, options) {
+ return this.makeURL(`/channel-icons/${channelId}/${iconHash}`, options);
+ }
+ /**
+ * Generates a default avatar URL
+ *
+ * @param index - The default avatar index
+ * @remarks
+ * To calculate the index for a user do `(userId >> 22) % 6`,
+ * or `discriminator % 5` if they're using the legacy username system.
+ */
+ defaultAvatar(index) {
+ return this.makeURL(`/embed/avatars/${index}`, { extension: "png" });
+ }
+ /**
+ * Generates a discovery splash URL for a guild's discovery splash.
+ *
+ * @param guildId - The guild id that has the discovery splash
+ * @param splashHash - The hash provided by Discord for this splash
+ * @param options - Optional options for the splash
+ */
+ discoverySplash(guildId, splashHash, options) {
+ return this.makeURL(`/discovery-splashes/${guildId}/${splashHash}`, options);
+ }
+ /**
+ * Generates an emoji's URL for an emoji.
+ *
+ * @param emojiId - The emoji id
+ * @param extension - The extension of the emoji
+ */
+ emoji(emojiId, extension) {
+ return this.makeURL(`/emojis/${emojiId}`, { extension });
+ }
+ /**
+ * Generates a guild member avatar URL.
+ *
+ * @param guildId - The id of the guild
+ * @param userId - The id of the user
+ * @param avatarHash - The hash provided by Discord for this avatar
+ * @param options - Optional options for the avatar
+ */
+ guildMemberAvatar(guildId, userId, avatarHash, options) {
+ return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/avatars/${avatarHash}`, avatarHash, options);
+ }
+ /**
+ * Generates a guild member banner URL.
+ *
+ * @param guildId - The id of the guild
+ * @param userId - The id of the user
+ * @param bannerHash - The hash provided by Discord for this banner
+ * @param options - Optional options for the banner
+ */
+ guildMemberBanner(guildId, userId, bannerHash, options) {
+ return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banner`, bannerHash, options);
+ }
+ /**
+ * Generates an icon URL, e.g. for a guild.
+ *
+ * @param id - The id that has the icon splash
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ icon(id, iconHash, options) {
+ return this.dynamicMakeURL(`/icons/${id}/${iconHash}`, iconHash, options);
+ }
+ /**
+ * Generates a URL for the icon of a role
+ *
+ * @param roleId - The id of the role that has the icon
+ * @param roleIconHash - The hash provided by Discord for this role icon
+ * @param options - Optional options for the role icon
+ */
+ roleIcon(roleId, roleIconHash, options) {
+ return this.makeURL(`/role-icons/${roleId}/${roleIconHash}`, options);
+ }
+ /**
+ * Generates a guild invite splash URL for a guild's invite splash.
+ *
+ * @param guildId - The guild id that has the invite splash
+ * @param splashHash - The hash provided by Discord for this splash
+ * @param options - Optional options for the splash
+ */
+ splash(guildId, splashHash, options) {
+ return this.makeURL(`/splashes/${guildId}/${splashHash}`, options);
+ }
+ /**
+ * Generates a sticker URL.
+ *
+ * @param stickerId - The sticker id
+ * @param extension - The extension of the sticker
+ * @privateRemarks
+ * Stickers cannot have a `.webp` extension, so we default to a `.png`
+ */
+ sticker(stickerId, extension = "png") {
+ return this.makeURL(`/stickers/${stickerId}`, { allowedExtensions: ALLOWED_STICKER_EXTENSIONS, extension });
+ }
+ /**
+ * Generates a sticker pack banner URL.
+ *
+ * @param bannerId - The banner id
+ * @param options - Optional options for the banner
+ */
+ stickerPackBanner(bannerId, options) {
+ return this.makeURL(`/app-assets/710982414301790216/store/${bannerId}`, options);
+ }
+ /**
+ * Generates a team icon URL for a team's icon.
+ *
+ * @param teamId - The team id that has the icon
+ * @param iconHash - The hash provided by Discord for this icon
+ * @param options - Optional options for the icon
+ */
+ teamIcon(teamId, iconHash, options) {
+ return this.makeURL(`/team-icons/${teamId}/${iconHash}`, options);
+ }
+ /**
+ * Generates a cover image for a guild scheduled event.
+ *
+ * @param scheduledEventId - The scheduled event id
+ * @param coverHash - The hash provided by discord for this cover image
+ * @param options - Optional options for the cover image
+ */
+ guildScheduledEventCover(scheduledEventId, coverHash, options) {
+ return this.makeURL(`/guild-events/${scheduledEventId}/${coverHash}`, options);
+ }
+ /**
+ * Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.
+ *
+ * @param route - The base cdn route
+ * @param hash - The hash provided by Discord for this icon
+ * @param options - Optional options for the link
+ */
+ dynamicMakeURL(route, hash, { forceStatic = false, ...options } = {}) {
+ return this.makeURL(route, !forceStatic && hash.startsWith("a_") ? { ...options, extension: "gif" } : options);
+ }
+ /**
+ * Constructs the URL for the resource
+ *
+ * @param route - The base cdn route
+ * @param options - The extension/size options for the link
+ */
+ makeURL(route, { allowedExtensions = ALLOWED_EXTENSIONS, extension = "webp", size } = {}) {
+ extension = String(extension).toLowerCase();
+ if (!allowedExtensions.includes(extension)) {
+ throw new RangeError(`Invalid extension provided: ${extension}
+Must be one of: ${allowedExtensions.join(", ")}`);
+ }
+ if (size && !ALLOWED_SIZES.includes(size)) {
+ throw new RangeError(`Invalid size provided: ${size}
+Must be one of: ${ALLOWED_SIZES.join(", ")}`);
+ }
+ const url = new URL(`${this.base}${route}.${extension}`);
+ if (size) {
+ url.searchParams.set("size", String(size));
+ }
+ return url.toString();
+ }
+};
+
+// src/lib/errors/DiscordAPIError.ts
+function isErrorGroupWrapper(error) {
+ return Reflect.has(error, "_errors");
+}
+__name(isErrorGroupWrapper, "isErrorGroupWrapper");
+function isErrorResponse(error) {
+ return typeof Reflect.get(error, "message") === "string";
+}
+__name(isErrorResponse, "isErrorResponse");
+var DiscordAPIError = class _DiscordAPIError extends Error {
+ /**
+ * @param rawError - The error reported by Discord
+ * @param code - The error code reported by Discord
+ * @param status - The status code of the response
+ * @param method - The method of the request that erred
+ * @param url - The url of the request that erred
+ * @param bodyData - The unparsed data for the request that errored
+ */
+ constructor(rawError, code, status, method, url, bodyData) {
+ super(_DiscordAPIError.getMessage(rawError));
+ this.rawError = rawError;
+ this.code = code;
+ this.status = status;
+ this.method = method;
+ this.url = url;
+ this.requestBody = { files: bodyData.files, json: bodyData.body };
+ }
+ static {
+ __name(this, "DiscordAPIError");
+ }
+ requestBody;
+ /**
+ * The name of the error
+ */
+ get name() {
+ return `${_DiscordAPIError.name}[${this.code}]`;
+ }
+ static getMessage(error) {
+ let flattened = "";
+ if ("code" in error) {
+ if (error.errors) {
+ flattened = [...this.flattenDiscordError(error.errors)].join("\n");
+ }
+ return error.message && flattened ? `${error.message}
+${flattened}` : error.message || flattened || "Unknown Error";
+ }
+ return error.error_description ?? "No Description";
+ }
+ static *flattenDiscordError(obj, key = "") {
+ if (isErrorResponse(obj)) {
+ return yield `${key.length ? `${key}[${obj.code}]` : `${obj.code}`}: ${obj.message}`.trim();
+ }
+ for (const [otherKey, val] of Object.entries(obj)) {
+ const nextKey = otherKey.startsWith("_") ? key : key ? Number.isNaN(Number(otherKey)) ? `${key}.${otherKey}` : `${key}[${otherKey}]` : otherKey;
+ if (typeof val === "string") {
+ yield val;
+ } else if (isErrorGroupWrapper(val)) {
+ for (const error of val._errors) {
+ yield* this.flattenDiscordError(error, nextKey);
+ }
+ } else {
+ yield* this.flattenDiscordError(val, nextKey);
+ }
+ }
+ }
+};
+
+// src/lib/errors/HTTPError.ts
+var HTTPError = class _HTTPError extends Error {
+ /**
+ * @param status - The status code of the response
+ * @param statusText - The status text of the response
+ * @param method - The method of the request that erred
+ * @param url - The url of the request that erred
+ * @param bodyData - The unparsed data for the request that errored
+ */
+ constructor(status, statusText, method, url, bodyData) {
+ super(statusText);
+ this.status = status;
+ this.method = method;
+ this.url = url;
+ this.requestBody = { files: bodyData.files, json: bodyData.body };
+ }
+ static {
+ __name(this, "HTTPError");
+ }
+ requestBody;
+ name = _HTTPError.name;
+};
+
+// src/lib/errors/RateLimitError.ts
+var RateLimitError = class _RateLimitError extends Error {
+ static {
+ __name(this, "RateLimitError");
+ }
+ timeToReset;
+ limit;
+ method;
+ hash;
+ url;
+ route;
+ majorParameter;
+ global;
+ constructor({ timeToReset, limit, method, hash, url, route, majorParameter, global }) {
+ super();
+ this.timeToReset = timeToReset;
+ this.limit = limit;
+ this.method = method;
+ this.hash = hash;
+ this.url = url;
+ this.route = route;
+ this.majorParameter = majorParameter;
+ this.global = global;
+ }
+ /**
+ * The name of the error
+ */
+ get name() {
+ return `${_RateLimitError.name}[${this.route}]`;
+ }
+};
+
+// src/lib/REST.ts
+import { Collection } from "@discordjs/collection";
+import { DiscordSnowflake } from "@sapphire/snowflake";
+import { AsyncEventEmitter } from "@vladfrangu/async_event_emitter";
+import { filetypeinfo } from "magic-bytes.js";
+
+// src/lib/utils/types.ts
+var RequestMethod = /* @__PURE__ */ ((RequestMethod2) => {
+ RequestMethod2["Delete"] = "DELETE";
+ RequestMethod2["Get"] = "GET";
+ RequestMethod2["Patch"] = "PATCH";
+ RequestMethod2["Post"] = "POST";
+ RequestMethod2["Put"] = "PUT";
+ return RequestMethod2;
+})(RequestMethod || {});
+
+// src/lib/utils/utils.ts
+function serializeSearchParam(value) {
+ switch (typeof value) {
+ case "string":
+ return value;
+ case "number":
+ case "bigint":
+ case "boolean":
+ return value.toString();
+ case "object":
+ if (value === null)
+ return null;
+ if (value instanceof Date) {
+ return Number.isNaN(value.getTime()) ? null : value.toISOString();
+ }
+ if (typeof value.toString === "function" && value.toString !== Object.prototype.toString)
+ return value.toString();
+ return null;
+ default:
+ return null;
+ }
+}
+__name(serializeSearchParam, "serializeSearchParam");
+function makeURLSearchParams(options) {
+ const params = new URLSearchParams();
+ if (!options)
+ return params;
+ for (const [key, value] of Object.entries(options)) {
+ const serialized = serializeSearchParam(value);
+ if (serialized !== null)
+ params.append(key, serialized);
+ }
+ return params;
+}
+__name(makeURLSearchParams, "makeURLSearchParams");
+async function parseResponse(res) {
+ if (res.headers.get("Content-Type")?.startsWith("application/json")) {
+ return res.json();
+ }
+ return res.arrayBuffer();
+}
+__name(parseResponse, "parseResponse");
+function hasSublimit(bucketRoute, body, method) {
+ if (bucketRoute === "/channels/:id") {
+ if (typeof body !== "object" || body === null)
+ return false;
+ if (method !== "PATCH" /* Patch */)
+ return false;
+ const castedBody = body;
+ return ["name", "topic"].some((key) => Reflect.has(castedBody, key));
+ }
+ return true;
+}
+__name(hasSublimit, "hasSublimit");
+function shouldRetry(error) {
+ if (error.name === "AbortError")
+ return true;
+ return "code" in error && error.code === "ECONNRESET" || error.message.includes("ECONNRESET");
+}
+__name(shouldRetry, "shouldRetry");
+async function onRateLimit(manager, rateLimitData) {
+ const { options } = manager;
+ if (!options.rejectOnRateLimit)
+ return;
+ const shouldThrow = typeof options.rejectOnRateLimit === "function" ? await options.rejectOnRateLimit(rateLimitData) : options.rejectOnRateLimit.some((route) => rateLimitData.route.startsWith(route.toLowerCase()));
+ if (shouldThrow) {
+ throw new RateLimitError(rateLimitData);
+ }
+}
+__name(onRateLimit, "onRateLimit");
+function calculateUserDefaultAvatarIndex(userId) {
+ return Number(BigInt(userId) >> 22n) % 6;
+}
+__name(calculateUserDefaultAvatarIndex, "calculateUserDefaultAvatarIndex");
+async function sleep(ms) {
+ return new Promise((resolve) => {
+ setTimeout(() => resolve(), ms);
+ });
+}
+__name(sleep, "sleep");
+function isBufferLike(value) {
+ return value instanceof ArrayBuffer || value instanceof Uint8Array || value instanceof Uint8ClampedArray;
+}
+__name(isBufferLike, "isBufferLike");
+
+// src/lib/handlers/Shared.ts
+var invalidCount = 0;
+var invalidCountResetTime = null;
+function incrementInvalidCount(manager) {
+ if (!invalidCountResetTime || invalidCountResetTime < Date.now()) {
+ invalidCountResetTime = Date.now() + 1e3 * 60 * 10;
+ invalidCount = 0;
+ }
+ invalidCount++;
+ const emitInvalid = manager.options.invalidRequestWarningInterval > 0 && invalidCount % manager.options.invalidRequestWarningInterval === 0;
+ if (emitInvalid) {
+ manager.emit("invalidRequestWarning" /* InvalidRequestWarning */, {
+ count: invalidCount,
+ remainingTime: invalidCountResetTime - Date.now()
+ });
+ }
+}
+__name(incrementInvalidCount, "incrementInvalidCount");
+async function makeNetworkRequest(manager, routeId, url, options, requestData, retries) {
+ const controller = new AbortController();
+ const timeout = setTimeout(() => controller.abort(), manager.options.timeout);
+ if (requestData.signal) {
+ if (requestData.signal.aborted)
+ controller.abort();
+ else
+ requestData.signal.addEventListener("abort", () => controller.abort());
+ }
+ let res;
+ try {
+ res = await manager.options.makeRequest(url, { ...options, signal: controller.signal });
+ } catch (error) {
+ if (!(error instanceof Error))
+ throw error;
+ if (shouldRetry(error) && retries !== manager.options.retries) {
+ return null;
+ }
+ throw error;
+ } finally {
+ clearTimeout(timeout);
+ }
+ if (manager.listenerCount("response" /* Response */)) {
+ manager.emit(
+ "response" /* Response */,
+ {
+ method: options.method ?? "get",
+ path: routeId.original,
+ route: routeId.bucketRoute,
+ options,
+ data: requestData,
+ retries
+ },
+ res instanceof Response ? res.clone() : { ...res }
+ );
+ }
+ return res;
+}
+__name(makeNetworkRequest, "makeNetworkRequest");
+async function handleErrors(manager, res, method, url, requestData, retries) {
+ const status = res.status;
+ if (status >= 500 && status < 600) {
+ if (retries !== manager.options.retries) {
+ return null;
+ }
+ throw new HTTPError(status, res.statusText, method, url, requestData);
+ } else {
+ if (status >= 400 && status < 500) {
+ if (status === 401 && requestData.auth) {
+ manager.setToken(null);
+ }
+ const data = await parseResponse(res);
+ throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
+ }
+ return res;
+ }
+}
+__name(handleErrors, "handleErrors");
+
+// src/lib/handlers/BurstHandler.ts
+var BurstHandler = class {
+ /**
+ * @param manager - The request manager
+ * @param hash - The hash that this RequestHandler handles
+ * @param majorParameter - The major parameter for this handler
+ */
+ constructor(manager, hash, majorParameter) {
+ this.manager = manager;
+ this.hash = hash;
+ this.majorParameter = majorParameter;
+ this.id = `${hash}:${majorParameter}`;
+ }
+ static {
+ __name(this, "BurstHandler");
+ }
+ /**
+ * {@inheritdoc IHandler.id}
+ */
+ id;
+ /**
+ * {@inheritDoc IHandler.inactive}
+ */
+ inactive = false;
+ /**
+ * Emits a debug message
+ *
+ * @param message - The message to debug
+ */
+ debug(message) {
+ this.manager.emit("restDebug" /* Debug */, `[REST ${this.id}] ${message}`);
+ }
+ /**
+ * {@inheritDoc IHandler.queueRequest}
+ */
+ async queueRequest(routeId, url, options, requestData) {
+ return this.runRequest(routeId, url, options, requestData);
+ }
+ /**
+ * The method that actually makes the request to the API, and updates info about the bucket accordingly
+ *
+ * @param routeId - The generalized API route with literal ids for major parameters
+ * @param url - The fully resolved URL to make the request to
+ * @param options - The fetch options needed to make the request
+ * @param requestData - Extra data from the user's request needed for errors and additional processing
+ * @param retries - The number of retries this request has already attempted (recursion)
+ */
+ async runRequest(routeId, url, options, requestData, retries = 0) {
+ const method = options.method ?? "get";
+ const res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries);
+ if (res === null) {
+ return this.runRequest(routeId, url, options, requestData, ++retries);
+ }
+ const status = res.status;
+ let retryAfter = 0;
+ const retry = res.headers.get("Retry-After");
+ if (retry)
+ retryAfter = Number(retry) * 1e3 + this.manager.options.offset;
+ if (status === 401 || status === 403 || status === 429) {
+ incrementInvalidCount(this.manager);
+ }
+ if (status >= 200 && status < 300) {
+ return res;
+ } else if (status === 429) {
+ const isGlobal = res.headers.has("X-RateLimit-Global");
+ await onRateLimit(this.manager, {
+ timeToReset: retryAfter,
+ limit: Number.POSITIVE_INFINITY,
+ method,
+ hash: this.hash,
+ url,
+ route: routeId.bucketRoute,
+ majorParameter: this.majorParameter,
+ global: isGlobal
+ });
+ this.debug(
+ [
+ "Encountered unexpected 429 rate limit",
+ ` Global : ${isGlobal}`,
+ ` Method : ${method}`,
+ ` URL : ${url}`,
+ ` Bucket : ${routeId.bucketRoute}`,
+ ` Major parameter: ${routeId.majorParameter}`,
+ ` Hash : ${this.hash}`,
+ ` Limit : ${Number.POSITIVE_INFINITY}`,
+ ` Retry After : ${retryAfter}ms`,
+ ` Sublimit : None`
+ ].join("\n")
+ );
+ await sleep(retryAfter);
+ return this.runRequest(routeId, url, options, requestData, retries);
+ } else {
+ const handled = await handleErrors(this.manager, res, method, url, requestData, retries);
+ if (handled === null) {
+ return this.runRequest(routeId, url, options, requestData, ++retries);
+ }
+ return handled;
+ }
+ }
+};
+
+// src/lib/handlers/SequentialHandler.ts
+import { AsyncQueue } from "@sapphire/async-queue";
+var SequentialHandler = class {
+ /**
+ * @param manager - The request manager
+ * @param hash - The hash that this RequestHandler handles
+ * @param majorParameter - The major parameter for this handler
+ */
+ constructor(manager, hash, majorParameter) {
+ this.manager = manager;
+ this.hash = hash;
+ this.majorParameter = majorParameter;
+ this.id = `${hash}:${majorParameter}`;
+ }
+ static {
+ __name(this, "SequentialHandler");
+ }
+ /**
+ * {@inheritDoc IHandler.id}
+ */
+ id;
+ /**
+ * The time this rate limit bucket will reset
+ */
+ reset = -1;
+ /**
+ * The remaining requests that can be made before we are rate limited
+ */
+ remaining = 1;
+ /**
+ * The total number of requests that can be made before we are rate limited
+ */
+ limit = Number.POSITIVE_INFINITY;
+ /**
+ * The interface used to sequence async requests sequentially
+ */
+ #asyncQueue = new AsyncQueue();
+ /**
+ * The interface used to sequence sublimited async requests sequentially
+ */
+ #sublimitedQueue = null;
+ /**
+ * A promise wrapper for when the sublimited queue is finished being processed or null when not being processed
+ */
+ #sublimitPromise = null;
+ /**
+ * Whether the sublimit queue needs to be shifted in the finally block
+ */
+ #shiftSublimit = false;
+ /**
+ * {@inheritDoc IHandler.inactive}
+ */
+ get inactive() {
+ return this.#asyncQueue.remaining === 0 && (this.#sublimitedQueue === null || this.#sublimitedQueue.remaining === 0) && !this.limited;
+ }
+ /**
+ * If the rate limit bucket is currently limited by the global limit
+ */
+ get globalLimited() {
+ return this.manager.globalRemaining <= 0 && Date.now() < this.manager.globalReset;
+ }
+ /**
+ * If the rate limit bucket is currently limited by its limit
+ */
+ get localLimited() {
+ return this.remaining <= 0 && Date.now() < this.reset;
+ }
+ /**
+ * If the rate limit bucket is currently limited
+ */
+ get limited() {
+ return this.globalLimited || this.localLimited;
+ }
+ /**
+ * The time until queued requests can continue
+ */
+ get timeToReset() {
+ return this.reset + this.manager.options.offset - Date.now();
+ }
+ /**
+ * Emits a debug message
+ *
+ * @param message - The message to debug
+ */
+ debug(message) {
+ this.manager.emit("restDebug" /* Debug */, `[REST ${this.id}] ${message}`);
+ }
+ /**
+ * Delay all requests for the specified amount of time, handling global rate limits
+ *
+ * @param time - The amount of time to delay all requests for
+ */
+ async globalDelayFor(time) {
+ await sleep(time);
+ this.manager.globalDelay = null;
+ }
+ /**
+ * {@inheritDoc IHandler.queueRequest}
+ */
+ async queueRequest(routeId, url, options, requestData) {
+ let queue = this.#asyncQueue;
+ let queueType = 0 /* Standard */;
+ if (this.#sublimitedQueue && hasSublimit(routeId.bucketRoute, requestData.body, options.method)) {
+ queue = this.#sublimitedQueue;
+ queueType = 1 /* Sublimit */;
+ }
+ await queue.wait({ signal: requestData.signal });
+ if (queueType === 0 /* Standard */) {
+ if (this.#sublimitedQueue && hasSublimit(routeId.bucketRoute, requestData.body, options.method)) {
+ queue = this.#sublimitedQueue;
+ const wait = queue.wait();
+ this.#asyncQueue.shift();
+ await wait;
+ } else if (this.#sublimitPromise) {
+ await this.#sublimitPromise.promise;
+ }
+ }
+ try {
+ return await this.runRequest(routeId, url, options, requestData);
+ } finally {
+ queue.shift();
+ if (this.#shiftSublimit) {
+ this.#shiftSublimit = false;
+ this.#sublimitedQueue?.shift();
+ }
+ if (this.#sublimitedQueue?.remaining === 0) {
+ this.#sublimitPromise?.resolve();
+ this.#sublimitedQueue = null;
+ }
+ }
+ }
+ /**
+ * The method that actually makes the request to the api, and updates info about the bucket accordingly
+ *
+ * @param routeId - The generalized api route with literal ids for major parameters
+ * @param url - The fully resolved url to make the request to
+ * @param options - The fetch options needed to make the request
+ * @param requestData - Extra data from the user's request needed for errors and additional processing
+ * @param retries - The number of retries this request has already attempted (recursion)
+ */
+ async runRequest(routeId, url, options, requestData, retries = 0) {
+ while (this.limited) {
+ const isGlobal = this.globalLimited;
+ let limit2;
+ let timeout;
+ let delay;
+ if (isGlobal) {
+ limit2 = this.manager.options.globalRequestsPerSecond;
+ timeout = this.manager.globalReset + this.manager.options.offset - Date.now();
+ if (!this.manager.globalDelay) {
+ this.manager.globalDelay = this.globalDelayFor(timeout);
+ }
+ delay = this.manager.globalDelay;
+ } else {
+ limit2 = this.limit;
+ timeout = this.timeToReset;
+ delay = sleep(timeout);
+ }
+ const rateLimitData = {
+ timeToReset: timeout,
+ limit: limit2,
+ method: options.method ?? "get",
+ hash: this.hash,
+ url,
+ route: routeId.bucketRoute,
+ majorParameter: this.majorParameter,
+ global: isGlobal
+ };
+ this.manager.emit("rateLimited" /* RateLimited */, rateLimitData);
+ await onRateLimit(this.manager, rateLimitData);
+ if (isGlobal) {
+ this.debug(`Global rate limit hit, blocking all requests for ${timeout}ms`);
+ } else {
+ this.debug(`Waiting ${timeout}ms for rate limit to pass`);
+ }
+ await delay;
+ }
+ if (!this.manager.globalReset || this.manager.globalReset < Date.now()) {
+ this.manager.globalReset = Date.now() + 1e3;
+ this.manager.globalRemaining = this.manager.options.globalRequestsPerSecond;
+ }
+ this.manager.globalRemaining--;
+ const method = options.method ?? "get";
+ const res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries);
+ if (res === null) {
+ return this.runRequest(routeId, url, options, requestData, ++retries);
+ }
+ const status = res.status;
+ let retryAfter = 0;
+ const limit = res.headers.get("X-RateLimit-Limit");
+ const remaining = res.headers.get("X-RateLimit-Remaining");
+ const reset = res.headers.get("X-RateLimit-Reset-After");
+ const hash = res.headers.get("X-RateLimit-Bucket");
+ const retry = res.headers.get("Retry-After");
+ this.limit = limit ? Number(limit) : Number.POSITIVE_INFINITY;
+ this.remaining = remaining ? Number(remaining) : 1;
+ this.reset = reset ? Number(reset) * 1e3 + Date.now() + this.manager.options.offset : Date.now();
+ if (retry)
+ retryAfter = Number(retry) * 1e3 + this.manager.options.offset;
+ if (hash && hash !== this.hash) {
+ this.debug(["Received bucket hash update", ` Old Hash : ${this.hash}`, ` New Hash : ${hash}`].join("\n"));
+ this.manager.hashes.set(`${method}:${routeId.bucketRoute}`, { value: hash, lastAccess: Date.now() });
+ } else if (hash) {
+ const hashData = this.manager.hashes.get(`${method}:${routeId.bucketRoute}`);
+ if (hashData) {
+ hashData.lastAccess = Date.now();
+ }
+ }
+ let sublimitTimeout = null;
+ if (retryAfter > 0) {
+ if (res.headers.has("X-RateLimit-Global")) {
+ this.manager.globalRemaining = 0;
+ this.manager.globalReset = Date.now() + retryAfter;
+ } else if (!this.localLimited) {
+ sublimitTimeout = retryAfter;
+ }
+ }
+ if (status === 401 || status === 403 || status === 429) {
+ incrementInvalidCount(this.manager);
+ }
+ if (res.ok) {
+ return res;
+ } else if (status === 429) {
+ const isGlobal = this.globalLimited;
+ let limit2;
+ let timeout;
+ if (isGlobal) {
+ limit2 = this.manager.options.globalRequestsPerSecond;
+ timeout = this.manager.globalReset + this.manager.options.offset - Date.now();
+ } else {
+ limit2 = this.limit;
+ timeout = this.timeToReset;
+ }
+ await onRateLimit(this.manager, {
+ timeToReset: timeout,
+ limit: limit2,
+ method,
+ hash: this.hash,
+ url,
+ route: routeId.bucketRoute,
+ majorParameter: this.majorParameter,
+ global: isGlobal
+ });
+ this.debug(
+ [
+ "Encountered unexpected 429 rate limit",
+ ` Global : ${isGlobal.toString()}`,
+ ` Method : ${method}`,
+ ` URL : ${url}`,
+ ` Bucket : ${routeId.bucketRoute}`,
+ ` Major parameter: ${routeId.majorParameter}`,
+ ` Hash : ${this.hash}`,
+ ` Limit : ${limit2}`,
+ ` Retry After : ${retryAfter}ms`,
+ ` Sublimit : ${sublimitTimeout ? `${sublimitTimeout}ms` : "None"}`
+ ].join("\n")
+ );
+ if (sublimitTimeout) {
+ const firstSublimit = !this.#sublimitedQueue;
+ if (firstSublimit) {
+ this.#sublimitedQueue = new AsyncQueue();
+ void this.#sublimitedQueue.wait();
+ this.#asyncQueue.shift();
+ }
+ this.#sublimitPromise?.resolve();
+ this.#sublimitPromise = null;
+ await sleep(sublimitTimeout);
+ let resolve;
+ const promise = new Promise((res2) => resolve = res2);
+ this.#sublimitPromise = { promise, resolve };
+ if (firstSublimit) {
+ await this.#asyncQueue.wait();
+ this.#shiftSublimit = true;
+ }
+ }
+ return this.runRequest(routeId, url, options, requestData, retries);
+ } else {
+ const handled = await handleErrors(this.manager, res, method, url, requestData, retries);
+ if (handled === null) {
+ return this.runRequest(routeId, url, options, requestData, ++retries);
+ }
+ return handled;
+ }
+ }
+};
+
+// src/lib/REST.ts
+var REST = class _REST extends AsyncEventEmitter {
+ static {
+ __name(this, "REST");
+ }
+ /**
+ * The {@link https://undici.nodejs.org/#/docs/api/Agent | Agent} for all requests
+ * performed by this manager.
+ */
+ agent = null;
+ cdn;
+ /**
+ * The number of requests remaining in the global bucket
+ */
+ globalRemaining;
+ /**
+ * The promise used to wait out the global rate limit
+ */
+ globalDelay = null;
+ /**
+ * The timestamp at which the global bucket resets
+ */
+ globalReset = -1;
+ /**
+ * API bucket hashes that are cached from provided routes
+ */
+ hashes = new Collection();
+ /**
+ * Request handlers created from the bucket hash and the major parameters
+ */
+ handlers = new Collection();
+ #token = null;
+ hashTimer;
+ handlerTimer;
+ options;
+ constructor(options = {}) {
+ super();
+ this.cdn = new CDN(options.cdn ?? DefaultRestOptions.cdn);
+ this.options = { ...DefaultRestOptions, ...options };
+ this.options.offset = Math.max(0, this.options.offset);
+ this.globalRemaining = Math.max(1, this.options.globalRequestsPerSecond);
+ this.agent = options.agent ?? null;
+ this.setupSweepers();
+ }
+ setupSweepers() {
+ const validateMaxInterval = /* @__PURE__ */ __name((interval) => {
+ if (interval > 144e5) {
+ throw new Error("Cannot set an interval greater than 4 hours");
+ }
+ }, "validateMaxInterval");
+ if (this.options.hashSweepInterval !== 0 && this.options.hashSweepInterval !== Number.POSITIVE_INFINITY) {
+ validateMaxInterval(this.options.hashSweepInterval);
+ this.hashTimer = setInterval(() => {
+ const sweptHashes = new Collection();
+ const currentDate = Date.now();
+ this.hashes.sweep((val, key) => {
+ if (val.lastAccess === -1)
+ return false;
+ const shouldSweep = Math.floor(currentDate - val.lastAccess) > this.options.hashLifetime;
+ if (shouldSweep) {
+ sweptHashes.set(key, val);
+ this.emit("restDebug" /* Debug */, `Hash ${val.value} for ${key} swept due to lifetime being exceeded`);
+ }
+ return shouldSweep;
+ });
+ this.emit("hashSweep" /* HashSweep */, sweptHashes);
+ }, this.options.hashSweepInterval);
+ this.hashTimer.unref?.();
+ }
+ if (this.options.handlerSweepInterval !== 0 && this.options.handlerSweepInterval !== Number.POSITIVE_INFINITY) {
+ validateMaxInterval(this.options.handlerSweepInterval);
+ this.handlerTimer = setInterval(() => {
+ const sweptHandlers = new Collection();
+ this.handlers.sweep((val, key) => {
+ const { inactive } = val;
+ if (inactive) {
+ sweptHandlers.set(key, val);
+ this.emit("restDebug" /* Debug */, `Handler ${val.id} for ${key} swept due to being inactive`);
+ }
+ return inactive;
+ });
+ this.emit("handlerSweep" /* HandlerSweep */, sweptHandlers);
+ }, this.options.handlerSweepInterval);
+ this.handlerTimer.unref?.();
+ }
+ }
+ /**
+ * Runs a get request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async get(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "GET" /* Get */ });
+ }
+ /**
+ * Runs a delete request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async delete(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "DELETE" /* Delete */ });
+ }
+ /**
+ * Runs a post request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async post(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "POST" /* Post */ });
+ }
+ /**
+ * Runs a put request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async put(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "PUT" /* Put */ });
+ }
+ /**
+ * Runs a patch request from the api
+ *
+ * @param fullRoute - The full route to query
+ * @param options - Optional request options
+ */
+ async patch(fullRoute, options = {}) {
+ return this.request({ ...options, fullRoute, method: "PATCH" /* Patch */ });
+ }
+ /**
+ * Runs a request from the api
+ *
+ * @param options - Request options
+ */
+ async request(options) {
+ const response = await this.queueRequest(options);
+ return parseResponse(response);
+ }
+ /**
+ * Sets the default agent to use for requests performed by this manager
+ *
+ * @param agent - The agent to use
+ */
+ setAgent(agent) {
+ this.agent = agent;
+ return this;
+ }
+ /**
+ * Sets the authorization token that should be used for requests
+ *
+ * @param token - The authorization token to use
+ */
+ setToken(token) {
+ this.#token = token;
+ return this;
+ }
+ /**
+ * Queues a request to be sent
+ *
+ * @param request - All the information needed to make a request
+ * @returns The response from the api request
+ */
+ async queueRequest(request) {
+ const routeId = _REST.generateRouteData(request.fullRoute, request.method);
+ const hash = this.hashes.get(`${request.method}:${routeId.bucketRoute}`) ?? {
+ value: `Global(${request.method}:${routeId.bucketRoute})`,
+ lastAccess: -1
+ };
+ const handler = this.handlers.get(`${hash.value}:${routeId.majorParameter}`) ?? this.createHandler(hash.value, routeId.majorParameter);
+ const { url, fetchOptions } = await this.resolveRequest(request);
+ return handler.queueRequest(routeId, url, fetchOptions, {
+ body: request.body,
+ files: request.files,
+ auth: request.auth !== false,
+ signal: request.signal
+ });
+ }
+ /**
+ * Creates a new rate limit handler from a hash, based on the hash and the major parameter
+ *
+ * @param hash - The hash for the route
+ * @param majorParameter - The major parameter for this handler
+ * @internal
+ */
+ createHandler(hash, majorParameter) {
+ const queue = majorParameter === BurstHandlerMajorIdKey ? new BurstHandler(this, hash, majorParameter) : new SequentialHandler(this, hash, majorParameter);
+ this.handlers.set(queue.id, queue);
+ return queue;
+ }
+ /**
+ * Formats the request data to a usable format for fetch
+ *
+ * @param request - The request data
+ */
+ async resolveRequest(request) {
+ const { options } = this;
+ let query = "";
+ if (request.query) {
+ const resolvedQuery = request.query.toString();
+ if (resolvedQuery !== "") {
+ query = `?${resolvedQuery}`;
+ }
+ }
+ const headers = {
+ ...this.options.headers,
+ "User-Agent": `${DefaultUserAgent} ${options.userAgentAppendix}`.trim()
+ };
+ if (request.auth !== false) {
+ if (!this.#token) {
+ throw new Error("Expected token to be set for this request, but none was present");
+ }
+ headers.Authorization = `${request.authPrefix ?? this.options.authPrefix} ${this.#token}`;
+ }
+ if (request.reason?.length) {
+ headers["X-Audit-Log-Reason"] = encodeURIComponent(request.reason);
+ }
+ const url = `${options.api}${request.versioned === false ? "" : `/v${options.version}`}${request.fullRoute}${query}`;
+ let finalBody;
+ let additionalHeaders = {};
+ if (request.files?.length) {
+ const formData = new FormData();
+ for (const [index, file] of request.files.entries()) {
+ const fileKey = file.key ?? `files[${index}]`;
+ if (isBufferLike(file.data)) {
+ let contentType = file.contentType;
+ if (!contentType) {
+ const [parsedType] = filetypeinfo(file.data);
+ if (parsedType) {
+ contentType = OverwrittenMimeTypes[parsedType.mime] ?? parsedType.mime ?? "application/octet-stream";
+ }
+ }
+ formData.append(fileKey, new Blob([file.data], { type: contentType }), file.name);
+ } else {
+ formData.append(fileKey, new Blob([`${file.data}`], { type: file.contentType }), file.name);
+ }
+ }
+ if (request.body != null) {
+ if (request.appendToFormData) {
+ for (const [key, value] of Object.entries(request.body)) {
+ formData.append(key, value);
+ }
+ } else {
+ formData.append("payload_json", JSON.stringify(request.body));
+ }
+ }
+ finalBody = formData;
+ } else if (request.body != null) {
+ if (request.passThroughBody) {
+ finalBody = request.body;
+ } else {
+ finalBody = JSON.stringify(request.body);
+ additionalHeaders = { "Content-Type": "application/json" };
+ }
+ }
+ const method = request.method.toUpperCase();
+ const fetchOptions = {
+ // Set body to null on get / head requests. This does not follow fetch spec (likely because it causes subtle bugs) but is aligned with what request was doing
+ body: ["GET", "HEAD"].includes(method) ? null : finalBody,
+ headers: { ...request.headers, ...additionalHeaders, ...headers },
+ method,
+ // Prioritize setting an agent per request, use the agent for this instance otherwise.
+ dispatcher: request.dispatcher ?? this.agent ?? void 0
+ };
+ return { url, fetchOptions };
+ }
+ /**
+ * Stops the hash sweeping interval
+ */
+ clearHashSweeper() {
+ clearInterval(this.hashTimer);
+ }
+ /**
+ * Stops the request handler sweeping interval
+ */
+ clearHandlerSweeper() {
+ clearInterval(this.handlerTimer);
+ }
+ /**
+ * Generates route data for an endpoint:method
+ *
+ * @param endpoint - The raw endpoint to generalize
+ * @param method - The HTTP method this endpoint is called without
+ * @internal
+ */
+ static generateRouteData(endpoint, method) {
+ if (endpoint.startsWith("/interactions/") && endpoint.endsWith("/callback")) {
+ return {
+ majorParameter: BurstHandlerMajorIdKey,
+ bucketRoute: "/interactions/:id/:token/callback",
+ original: endpoint
+ };
+ }
+ const majorIdMatch = /^\/(?:channels|guilds|webhooks)\/(\d{17,19})/.exec(endpoint);
+ const majorId = majorIdMatch?.[1] ?? "global";
+ const baseRoute = endpoint.replaceAll(/\d{17,19}/g, ":id").replace(/\/reactions\/(.*)/, "/reactions/:reaction");
+ let exceptions = "";
+ if (method === "DELETE" /* Delete */ && baseRoute === "/channels/:id/messages/:id") {
+ const id = /\d{17,19}$/.exec(endpoint)[0];
+ const timestamp = DiscordSnowflake.timestampFrom(id);
+ if (Date.now() - timestamp > 1e3 * 60 * 60 * 24 * 14) {
+ exceptions += "/Delete Old Message";
+ }
+ }
+ return {
+ majorParameter: majorId,
+ bucketRoute: baseRoute + exceptions,
+ original: endpoint
+ };
+ }
+};
+
+// src/shared.ts
+var version = "2.0.1";
+
+// src/web.ts
+setDefaultStrategy(fetch);
+export {
+ ALLOWED_EXTENSIONS,
+ ALLOWED_SIZES,
+ ALLOWED_STICKER_EXTENSIONS,
+ BurstHandlerMajorIdKey,
+ CDN,
+ DefaultRestOptions,
+ DefaultUserAgent,
+ DefaultUserAgentAppendix,
+ DiscordAPIError,
+ HTTPError,
+ OverwrittenMimeTypes,
+ REST,
+ RESTEvents,
+ RateLimitError,
+ RequestMethod,
+ calculateUserDefaultAvatarIndex,
+ makeURLSearchParams,
+ parseResponse,
+ version
+};
+//# sourceMappingURL=web.mjs.map \ No newline at end of file
diff --git a/node_modules/@discordjs/rest/dist/web.mjs.map b/node_modules/@discordjs/rest/dist/web.mjs.map
new file mode 100644
index 0000000..e0459eb
--- /dev/null
+++ b/node_modules/@discordjs/rest/dist/web.mjs.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/environment.ts","../src/lib/utils/constants.ts","../src/lib/CDN.ts","../src/lib/errors/DiscordAPIError.ts","../src/lib/errors/HTTPError.ts","../src/lib/errors/RateLimitError.ts","../src/lib/REST.ts","../src/lib/utils/types.ts","../src/lib/utils/utils.ts","../src/lib/handlers/Shared.ts","../src/lib/handlers/BurstHandler.ts","../src/lib/handlers/SequentialHandler.ts","../src/shared.ts","../src/web.ts"],"sourcesContent":["import type { RESTOptions } from './shared.js';\n\nlet defaultStrategy: RESTOptions['makeRequest'];\n\nexport function setDefaultStrategy(newStrategy: RESTOptions['makeRequest']) {\n\tdefaultStrategy = newStrategy;\n}\n\nexport function getDefaultStrategy() {\n\treturn defaultStrategy;\n}\n","import { getUserAgentAppendix } from '@discordjs/util';\nimport { APIVersion } from 'discord-api-types/v10';\nimport { getDefaultStrategy } from '../../environment.js';\nimport type { RESTOptions, ResponseLike } from './types.js';\n\nexport const DefaultUserAgent =\n\t`DiscordBot (https://discord.js.org, 2.0.1)` as `DiscordBot (https://discord.js.org, ${string})`;\n\n/**\n * The default string to append onto the user agent.\n */\nexport const DefaultUserAgentAppendix = getUserAgentAppendix();\n\nexport const DefaultRestOptions = {\n\tagent: null,\n\tapi: 'https://discord.com/api',\n\tauthPrefix: 'Bot',\n\tcdn: 'https://cdn.discordapp.com',\n\theaders: {},\n\tinvalidRequestWarningInterval: 0,\n\tglobalRequestsPerSecond: 50,\n\toffset: 50,\n\trejectOnRateLimit: null,\n\tretries: 3,\n\ttimeout: 15_000,\n\tuserAgentAppendix: DefaultUserAgentAppendix,\n\tversion: APIVersion,\n\thashSweepInterval: 14_400_000, // 4 Hours\n\thashLifetime: 86_400_000, // 24 Hours\n\thandlerSweepInterval: 3_600_000, // 1 Hour\n\tasync makeRequest(...args): Promise<ResponseLike> {\n\t\treturn getDefaultStrategy()(...args);\n\t},\n} as const satisfies Required<RESTOptions>;\n\n/**\n * The events that the REST manager emits\n */\nexport enum RESTEvents {\n\tDebug = 'restDebug',\n\tHandlerSweep = 'handlerSweep',\n\tHashSweep = 'hashSweep',\n\tInvalidRequestWarning = 'invalidRequestWarning',\n\tRateLimited = 'rateLimited',\n\tResponse = 'response',\n}\n\nexport const ALLOWED_EXTENSIONS = ['webp', 'png', 'jpg', 'jpeg', 'gif'] as const satisfies readonly string[];\nexport const ALLOWED_STICKER_EXTENSIONS = ['png', 'json', 'gif'] as const satisfies readonly string[];\nexport const ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1_024, 2_048, 4_096] as const satisfies readonly number[];\n\nexport type ImageExtension = (typeof ALLOWED_EXTENSIONS)[number];\nexport type StickerExtension = (typeof ALLOWED_STICKER_EXTENSIONS)[number];\nexport type ImageSize = (typeof ALLOWED_SIZES)[number];\n\nexport const OverwrittenMimeTypes = {\n\t// https://github.com/discordjs/discord.js/issues/8557\n\t'image/apng': 'image/png',\n} as const satisfies Readonly<Record<string, string>>;\n\nexport const BurstHandlerMajorIdKey = 'burst';\n","/* eslint-disable jsdoc/check-param-names */\nimport {\n\tALLOWED_EXTENSIONS,\n\tALLOWED_SIZES,\n\tALLOWED_STICKER_EXTENSIONS,\n\tDefaultRestOptions,\n\ttype ImageExtension,\n\ttype ImageSize,\n\ttype StickerExtension,\n} from './utils/constants.js';\n\n/**\n * The options used for image URLs\n */\nexport interface BaseImageURLOptions {\n\t/**\n\t * The extension to use for the image URL\n\t *\n\t * @defaultValue `'webp'`\n\t */\n\textension?: ImageExtension;\n\t/**\n\t * The size specified in the image URL\n\t */\n\tsize?: ImageSize;\n}\n\n/**\n * The options used for image URLs with animated content\n */\nexport interface ImageURLOptions extends BaseImageURLOptions {\n\t/**\n\t * Whether or not to prefer the static version of an image asset.\n\t */\n\tforceStatic?: boolean;\n}\n\n/**\n * The options to use when making a CDN URL\n */\nexport interface MakeURLOptions {\n\t/**\n\t * The allowed extensions that can be used\n\t */\n\tallowedExtensions?: readonly string[];\n\t/**\n\t * The extension to use for the image URL\n\t *\n\t * @defaultValue `'webp'`\n\t */\n\textension?: string | undefined;\n\t/**\n\t * The size specified in the image URL\n\t */\n\tsize?: ImageSize;\n}\n\n/**\n * The CDN link builder\n */\nexport class CDN {\n\tpublic constructor(private readonly base: string = DefaultRestOptions.cdn) {}\n\n\t/**\n\t * Generates an app asset URL for a client's asset.\n\t *\n\t * @param clientId - The client id that has the asset\n\t * @param assetHash - The hash provided by Discord for this asset\n\t * @param options - Optional options for the asset\n\t */\n\tpublic appAsset(clientId: string, assetHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/app-assets/${clientId}/${assetHash}`, options);\n\t}\n\n\t/**\n\t * Generates an app icon URL for a client's icon.\n\t *\n\t * @param clientId - The client id that has the icon\n\t * @param iconHash - The hash provided by Discord for this icon\n\t * @param options - Optional options for the icon\n\t */\n\tpublic appIcon(clientId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/app-icons/${clientId}/${iconHash}`, options);\n\t}\n\n\t/**\n\t * Generates an avatar URL, e.g. for a user or a webhook.\n\t *\n\t * @param id - The id that has the icon\n\t * @param avatarHash - The hash provided by Discord for this avatar\n\t * @param options - Optional options for the avatar\n\t */\n\tpublic avatar(id: string, avatarHash: string, options?: Readonly<ImageURLOptions>): string {\n\t\treturn this.dynamicMakeURL(`/avatars/${id}/${avatarHash}`, avatarHash, options);\n\t}\n\n\t/**\n\t * Generates a user avatar decoration URL.\n\t *\n\t * @param userId - The id of the user\n\t * @param userAvatarDecoration - The hash provided by Discord for this avatar decoration\n\t * @param options - Optional options for the avatar decoration\n\t */\n\tpublic avatarDecoration(\n\t\tuserId: string,\n\t\tuserAvatarDecoration: string,\n\t\toptions?: Readonly<BaseImageURLOptions>,\n\t): string {\n\t\treturn this.makeURL(`/avatar-decorations/${userId}/${userAvatarDecoration}`, options);\n\t}\n\n\t/**\n\t * Generates a banner URL, e.g. for a user or a guild.\n\t *\n\t * @param id - The id that has the banner splash\n\t * @param bannerHash - The hash provided by Discord for this banner\n\t * @param options - Optional options for the banner\n\t */\n\tpublic banner(id: string, bannerHash: string, options?: Readonly<ImageURLOptions>): string {\n\t\treturn this.dynamicMakeURL(`/banners/${id}/${bannerHash}`, bannerHash, options);\n\t}\n\n\t/**\n\t * Generates an icon URL for a channel, e.g. a group DM.\n\t *\n\t * @param channelId - The channel id that has the icon\n\t * @param iconHash - The hash provided by Discord for this channel\n\t * @param options - Optional options for the icon\n\t */\n\tpublic channelIcon(channelId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/channel-icons/${channelId}/${iconHash}`, options);\n\t}\n\n\t/**\n\t * Generates a default avatar URL\n\t *\n\t * @param index - The default avatar index\n\t * @remarks\n\t * To calculate the index for a user do `(userId >> 22) % 6`,\n\t * or `discriminator % 5` if they're using the legacy username system.\n\t */\n\tpublic defaultAvatar(index: number): string {\n\t\treturn this.makeURL(`/embed/avatars/${index}`, { extension: 'png' });\n\t}\n\n\t/**\n\t * Generates a discovery splash URL for a guild's discovery splash.\n\t *\n\t * @param guildId - The guild id that has the discovery splash\n\t * @param splashHash - The hash provided by Discord for this splash\n\t * @param options - Optional options for the splash\n\t */\n\tpublic discoverySplash(guildId: string, splashHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/discovery-splashes/${guildId}/${splashHash}`, options);\n\t}\n\n\t/**\n\t * Generates an emoji's URL for an emoji.\n\t *\n\t * @param emojiId - The emoji id\n\t * @param extension - The extension of the emoji\n\t */\n\tpublic emoji(emojiId: string, extension?: ImageExtension): string {\n\t\treturn this.makeURL(`/emojis/${emojiId}`, { extension });\n\t}\n\n\t/**\n\t * Generates a guild member avatar URL.\n\t *\n\t * @param guildId - The id of the guild\n\t * @param userId - The id of the user\n\t * @param avatarHash - The hash provided by Discord for this avatar\n\t * @param options - Optional options for the avatar\n\t */\n\tpublic guildMemberAvatar(\n\t\tguildId: string,\n\t\tuserId: string,\n\t\tavatarHash: string,\n\t\toptions?: Readonly<ImageURLOptions>,\n\t): string {\n\t\treturn this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/avatars/${avatarHash}`, avatarHash, options);\n\t}\n\n\t/**\n\t * Generates a guild member banner URL.\n\t *\n\t * @param guildId - The id of the guild\n\t * @param userId - The id of the user\n\t * @param bannerHash - The hash provided by Discord for this banner\n\t * @param options - Optional options for the banner\n\t */\n\tpublic guildMemberBanner(\n\t\tguildId: string,\n\t\tuserId: string,\n\t\tbannerHash: string,\n\t\toptions?: Readonly<ImageURLOptions>,\n\t): string {\n\t\treturn this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banner`, bannerHash, options);\n\t}\n\n\t/**\n\t * Generates an icon URL, e.g. for a guild.\n\t *\n\t * @param id - The id that has the icon splash\n\t * @param iconHash - The hash provided by Discord for this icon\n\t * @param options - Optional options for the icon\n\t */\n\tpublic icon(id: string, iconHash: string, options?: Readonly<ImageURLOptions>): string {\n\t\treturn this.dynamicMakeURL(`/icons/${id}/${iconHash}`, iconHash, options);\n\t}\n\n\t/**\n\t * Generates a URL for the icon of a role\n\t *\n\t * @param roleId - The id of the role that has the icon\n\t * @param roleIconHash - The hash provided by Discord for this role icon\n\t * @param options - Optional options for the role icon\n\t */\n\tpublic roleIcon(roleId: string, roleIconHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/role-icons/${roleId}/${roleIconHash}`, options);\n\t}\n\n\t/**\n\t * Generates a guild invite splash URL for a guild's invite splash.\n\t *\n\t * @param guildId - The guild id that has the invite splash\n\t * @param splashHash - The hash provided by Discord for this splash\n\t * @param options - Optional options for the splash\n\t */\n\tpublic splash(guildId: string, splashHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/splashes/${guildId}/${splashHash}`, options);\n\t}\n\n\t/**\n\t * Generates a sticker URL.\n\t *\n\t * @param stickerId - The sticker id\n\t * @param extension - The extension of the sticker\n\t * @privateRemarks\n\t * Stickers cannot have a `.webp` extension, so we default to a `.png`\n\t */\n\tpublic sticker(stickerId: string, extension: StickerExtension = 'png'): string {\n\t\treturn this.makeURL(`/stickers/${stickerId}`, { allowedExtensions: ALLOWED_STICKER_EXTENSIONS, extension });\n\t}\n\n\t/**\n\t * Generates a sticker pack banner URL.\n\t *\n\t * @param bannerId - The banner id\n\t * @param options - Optional options for the banner\n\t */\n\tpublic stickerPackBanner(bannerId: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/app-assets/710982414301790216/store/${bannerId}`, options);\n\t}\n\n\t/**\n\t * Generates a team icon URL for a team's icon.\n\t *\n\t * @param teamId - The team id that has the icon\n\t * @param iconHash - The hash provided by Discord for this icon\n\t * @param options - Optional options for the icon\n\t */\n\tpublic teamIcon(teamId: string, iconHash: string, options?: Readonly<BaseImageURLOptions>): string {\n\t\treturn this.makeURL(`/team-icons/${teamId}/${iconHash}`, options);\n\t}\n\n\t/**\n\t * Generates a cover image for a guild scheduled event.\n\t *\n\t * @param scheduledEventId - The scheduled event id\n\t * @param coverHash - The hash provided by discord for this cover image\n\t * @param options - Optional options for the cover image\n\t */\n\tpublic guildScheduledEventCover(\n\t\tscheduledEventId: string,\n\t\tcoverHash: string,\n\t\toptions?: Readonly<BaseImageURLOptions>,\n\t): string {\n\t\treturn this.makeURL(`/guild-events/${scheduledEventId}/${coverHash}`, options);\n\t}\n\n\t/**\n\t * Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.\n\t *\n\t * @param route - The base cdn route\n\t * @param hash - The hash provided by Discord for this icon\n\t * @param options - Optional options for the link\n\t */\n\tprivate dynamicMakeURL(\n\t\troute: string,\n\t\thash: string,\n\t\t{ forceStatic = false, ...options }: Readonly<ImageURLOptions> = {},\n\t): string {\n\t\treturn this.makeURL(route, !forceStatic && hash.startsWith('a_') ? { ...options, extension: 'gif' } : options);\n\t}\n\n\t/**\n\t * Constructs the URL for the resource\n\t *\n\t * @param route - The base cdn route\n\t * @param options - The extension/size options for the link\n\t */\n\tprivate makeURL(\n\t\troute: string,\n\t\t{ allowedExtensions = ALLOWED_EXTENSIONS, extension = 'webp', size }: Readonly<MakeURLOptions> = {},\n\t): string {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\textension = String(extension).toLowerCase();\n\n\t\tif (!allowedExtensions.includes(extension)) {\n\t\t\tthrow new RangeError(`Invalid extension provided: ${extension}\\nMust be one of: ${allowedExtensions.join(', ')}`);\n\t\t}\n\n\t\tif (size && !ALLOWED_SIZES.includes(size)) {\n\t\t\tthrow new RangeError(`Invalid size provided: ${size}\\nMust be one of: ${ALLOWED_SIZES.join(', ')}`);\n\t\t}\n\n\t\tconst url = new URL(`${this.base}${route}.${extension}`);\n\n\t\tif (size) {\n\t\t\turl.searchParams.set('size', String(size));\n\t\t}\n\n\t\treturn url.toString();\n\t}\n}\n","import type { InternalRequest, RawFile } from '../utils/types.js';\n\ninterface DiscordErrorFieldInformation {\n\tcode: string;\n\tmessage: string;\n}\n\ninterface DiscordErrorGroupWrapper {\n\t_errors: DiscordError[];\n}\n\ntype DiscordError = DiscordErrorFieldInformation | DiscordErrorGroupWrapper | string | { [k: string]: DiscordError };\n\nexport interface DiscordErrorData {\n\tcode: number;\n\terrors?: DiscordError;\n\tmessage: string;\n}\n\nexport interface OAuthErrorData {\n\terror: string;\n\terror_description?: string;\n}\n\nexport interface RequestBody {\n\tfiles: RawFile[] | undefined;\n\tjson: unknown | undefined;\n}\n\nfunction isErrorGroupWrapper(error: DiscordError): error is DiscordErrorGroupWrapper {\n\treturn Reflect.has(error as Record<string, unknown>, '_errors');\n}\n\nfunction isErrorResponse(error: DiscordError): error is DiscordErrorFieldInformation {\n\treturn typeof Reflect.get(error as Record<string, unknown>, 'message') === 'string';\n}\n\n/**\n * Represents an API error returned by Discord\n */\nexport class DiscordAPIError extends Error {\n\tpublic requestBody: RequestBody;\n\n\t/**\n\t * @param rawError - The error reported by Discord\n\t * @param code - The error code reported by Discord\n\t * @param status - The status code of the response\n\t * @param method - The method of the request that erred\n\t * @param url - The url of the request that erred\n\t * @param bodyData - The unparsed data for the request that errored\n\t */\n\tpublic constructor(\n\t\tpublic rawError: DiscordErrorData | OAuthErrorData,\n\t\tpublic code: number | string,\n\t\tpublic status: number,\n\t\tpublic method: string,\n\t\tpublic url: string,\n\t\tbodyData: Pick<InternalRequest, 'body' | 'files'>,\n\t) {\n\t\tsuper(DiscordAPIError.getMessage(rawError));\n\n\t\tthis.requestBody = { files: bodyData.files, json: bodyData.body };\n\t}\n\n\t/**\n\t * The name of the error\n\t */\n\tpublic override get name(): string {\n\t\treturn `${DiscordAPIError.name}[${this.code}]`;\n\t}\n\n\tprivate static getMessage(error: DiscordErrorData | OAuthErrorData) {\n\t\tlet flattened = '';\n\t\tif ('code' in error) {\n\t\t\tif (error.errors) {\n\t\t\t\tflattened = [...this.flattenDiscordError(error.errors)].join('\\n');\n\t\t\t}\n\n\t\t\treturn error.message && flattened\n\t\t\t\t? `${error.message}\\n${flattened}`\n\t\t\t\t: error.message || flattened || 'Unknown Error';\n\t\t}\n\n\t\treturn error.error_description ?? 'No Description';\n\t}\n\n\tprivate static *flattenDiscordError(obj: DiscordError, key = ''): IterableIterator<string> {\n\t\tif (isErrorResponse(obj)) {\n\t\t\treturn yield `${key.length ? `${key}[${obj.code}]` : `${obj.code}`}: ${obj.message}`.trim();\n\t\t}\n\n\t\tfor (const [otherKey, val] of Object.entries(obj)) {\n\t\t\tconst nextKey = otherKey.startsWith('_')\n\t\t\t\t? key\n\t\t\t\t: key\n\t\t\t\t? Number.isNaN(Number(otherKey))\n\t\t\t\t\t? `${key}.${otherKey}`\n\t\t\t\t\t: `${key}[${otherKey}]`\n\t\t\t\t: otherKey;\n\n\t\t\tif (typeof val === 'string') {\n\t\t\t\tyield val;\n\t\t\t} else if (isErrorGroupWrapper(val)) {\n\t\t\t\tfor (const error of val._errors) {\n\t\t\t\t\tyield* this.flattenDiscordError(error, nextKey);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tyield* this.flattenDiscordError(val, nextKey);\n\t\t\t}\n\t\t}\n\t}\n}\n","import type { InternalRequest } from '../utils/types.js';\nimport type { RequestBody } from './DiscordAPIError.js';\n\n/**\n * Represents a HTTP error\n */\nexport class HTTPError extends Error {\n\tpublic requestBody: RequestBody;\n\n\tpublic override name = HTTPError.name;\n\n\t/**\n\t * @param status - The status code of the response\n\t * @param statusText - The status text of the response\n\t * @param method - The method of the request that erred\n\t * @param url - The url of the request that erred\n\t * @param bodyData - The unparsed data for the request that errored\n\t */\n\tpublic constructor(\n\t\tpublic status: number,\n\t\tstatusText: string,\n\t\tpublic method: string,\n\t\tpublic url: string,\n\t\tbodyData: Pick<InternalRequest, 'body' | 'files'>,\n\t) {\n\t\tsuper(statusText);\n\t\tthis.requestBody = { files: bodyData.files, json: bodyData.body };\n\t}\n}\n","import type { RateLimitData } from '../utils/types.js';\n\nexport class RateLimitError extends Error implements RateLimitData {\n\tpublic timeToReset: number;\n\n\tpublic limit: number;\n\n\tpublic method: string;\n\n\tpublic hash: string;\n\n\tpublic url: string;\n\n\tpublic route: string;\n\n\tpublic majorParameter: string;\n\n\tpublic global: boolean;\n\n\tpublic constructor({ timeToReset, limit, method, hash, url, route, majorParameter, global }: RateLimitData) {\n\t\tsuper();\n\t\tthis.timeToReset = timeToReset;\n\t\tthis.limit = limit;\n\t\tthis.method = method;\n\t\tthis.hash = hash;\n\t\tthis.url = url;\n\t\tthis.route = route;\n\t\tthis.majorParameter = majorParameter;\n\t\tthis.global = global;\n\t}\n\n\t/**\n\t * The name of the error\n\t */\n\tpublic override get name(): string {\n\t\treturn `${RateLimitError.name}[${this.route}]`;\n\t}\n}\n","import { Collection } from '@discordjs/collection';\nimport { DiscordSnowflake } from '@sapphire/snowflake';\nimport { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';\nimport { filetypeinfo } from 'magic-bytes.js';\nimport type { RequestInit, BodyInit, Dispatcher } from 'undici';\nimport { CDN } from './CDN.js';\nimport { BurstHandler } from './handlers/BurstHandler.js';\nimport { SequentialHandler } from './handlers/SequentialHandler.js';\nimport type { IHandler } from './interfaces/Handler.js';\nimport {\n\tBurstHandlerMajorIdKey,\n\tDefaultRestOptions,\n\tDefaultUserAgent,\n\tOverwrittenMimeTypes,\n\tRESTEvents,\n} from './utils/constants.js';\nimport { RequestMethod } from './utils/types.js';\nimport type {\n\tRESTOptions,\n\tResponseLike,\n\tRestEventsMap,\n\tHashData,\n\tInternalRequest,\n\tRouteLike,\n\tRequestHeaders,\n\tRouteData,\n\tRequestData,\n} from './utils/types.js';\nimport { isBufferLike, parseResponse } from './utils/utils.js';\n\n/**\n * Represents the class that manages handlers for endpoints\n */\nexport class REST extends AsyncEventEmitter<RestEventsMap> {\n\t/**\n\t * The {@link https://undici.nodejs.org/#/docs/api/Agent | Agent} for all requests\n\t * performed by this manager.\n\t */\n\tpublic agent: Dispatcher | null = null;\n\n\tpublic readonly cdn: CDN;\n\n\t/**\n\t * The number of requests remaining in the global bucket\n\t */\n\tpublic globalRemaining: number;\n\n\t/**\n\t * The promise used to wait out the global rate limit\n\t */\n\tpublic globalDelay: Promise<void> | null = null;\n\n\t/**\n\t * The timestamp at which the global bucket resets\n\t */\n\tpublic globalReset = -1;\n\n\t/**\n\t * API bucket hashes that are cached from provided routes\n\t */\n\tpublic readonly hashes = new Collection<string, HashData>();\n\n\t/**\n\t * Request handlers created from the bucket hash and the major parameters\n\t */\n\tpublic readonly handlers = new Collection<string, IHandler>();\n\n\t#token: string | null = null;\n\n\tprivate hashTimer!: NodeJS.Timer | number;\n\n\tprivate handlerTimer!: NodeJS.Timer | number;\n\n\tpublic readonly options: RESTOptions;\n\n\tpublic constructor(options: Partial<RESTOptions> = {}) {\n\t\tsuper();\n\t\tthis.cdn = new CDN(options.cdn ?? DefaultRestOptions.cdn);\n\t\tthis.options = { ...DefaultRestOptions, ...options };\n\t\tthis.options.offset = Math.max(0, this.options.offset);\n\t\tthis.globalRemaining = Math.max(1, this.options.globalRequestsPerSecond);\n\t\tthis.agent = options.agent ?? null;\n\n\t\t// Start sweepers\n\t\tthis.setupSweepers();\n\t}\n\n\tprivate setupSweepers() {\n\t\t// eslint-disable-next-line unicorn/consistent-function-scoping\n\t\tconst validateMaxInterval = (interval: number) => {\n\t\t\tif (interval > 14_400_000) {\n\t\t\t\tthrow new Error('Cannot set an interval greater than 4 hours');\n\t\t\t}\n\t\t};\n\n\t\tif (this.options.hashSweepInterval !== 0 && this.options.hashSweepInterval !== Number.POSITIVE_INFINITY) {\n\t\t\tvalidateMaxInterval(this.options.hashSweepInterval);\n\t\t\tthis.hashTimer = setInterval(() => {\n\t\t\t\tconst sweptHashes = new Collection<string, HashData>();\n\t\t\t\tconst currentDate = Date.now();\n\n\t\t\t\t// Begin sweeping hash based on lifetimes\n\t\t\t\tthis.hashes.sweep((val, key) => {\n\t\t\t\t\t// `-1` indicates a global hash\n\t\t\t\t\tif (val.lastAccess === -1) return false;\n\n\t\t\t\t\t// Check if lifetime has been exceeded\n\t\t\t\t\tconst shouldSweep = Math.floor(currentDate - val.lastAccess) > this.options.hashLifetime;\n\n\t\t\t\t\t// Add hash to collection of swept hashes\n\t\t\t\t\tif (shouldSweep) {\n\t\t\t\t\t\t// Add to swept hashes\n\t\t\t\t\t\tsweptHashes.set(key, val);\n\n\t\t\t\t\t\t// Emit debug information\n\t\t\t\t\t\tthis.emit(RESTEvents.Debug, `Hash ${val.value} for ${key} swept due to lifetime being exceeded`);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn shouldSweep;\n\t\t\t\t});\n\n\t\t\t\t// Fire event\n\t\t\t\tthis.emit(RESTEvents.HashSweep, sweptHashes);\n\t\t\t}, this.options.hashSweepInterval);\n\n\t\t\tthis.hashTimer.unref?.();\n\t\t}\n\n\t\tif (this.options.handlerSweepInterval !== 0 && this.options.handlerSweepInterval !== Number.POSITIVE_INFINITY) {\n\t\t\tvalidateMaxInterval(this.options.handlerSweepInterval);\n\t\t\tthis.handlerTimer = setInterval(() => {\n\t\t\t\tconst sweptHandlers = new Collection<string, IHandler>();\n\n\t\t\t\t// Begin sweeping handlers based on activity\n\t\t\t\tthis.handlers.sweep((val, key) => {\n\t\t\t\t\tconst { inactive } = val;\n\n\t\t\t\t\t// Collect inactive handlers\n\t\t\t\t\tif (inactive) {\n\t\t\t\t\t\tsweptHandlers.set(key, val);\n\t\t\t\t\t\tthis.emit(RESTEvents.Debug, `Handler ${val.id} for ${key} swept due to being inactive`);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn inactive;\n\t\t\t\t});\n\n\t\t\t\t// Fire event\n\t\t\t\tthis.emit(RESTEvents.HandlerSweep, sweptHandlers);\n\t\t\t}, this.options.handlerSweepInterval);\n\n\t\t\tthis.handlerTimer.unref?.();\n\t\t}\n\t}\n\n\t/**\n\t * Runs a get request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async get(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Get });\n\t}\n\n\t/**\n\t * Runs a delete request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async delete(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Delete });\n\t}\n\n\t/**\n\t * Runs a post request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async post(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Post });\n\t}\n\n\t/**\n\t * Runs a put request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async put(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Put });\n\t}\n\n\t/**\n\t * Runs a patch request from the api\n\t *\n\t * @param fullRoute - The full route to query\n\t * @param options - Optional request options\n\t */\n\tpublic async patch(fullRoute: RouteLike, options: RequestData = {}) {\n\t\treturn this.request({ ...options, fullRoute, method: RequestMethod.Patch });\n\t}\n\n\t/**\n\t * Runs a request from the api\n\t *\n\t * @param options - Request options\n\t */\n\tpublic async request(options: InternalRequest) {\n\t\tconst response = await this.queueRequest(options);\n\t\treturn parseResponse(response);\n\t}\n\n\t/**\n\t * Sets the default agent to use for requests performed by this manager\n\t *\n\t * @param agent - The agent to use\n\t */\n\tpublic setAgent(agent: Dispatcher) {\n\t\tthis.agent = agent;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the authorization token that should be used for requests\n\t *\n\t * @param token - The authorization token to use\n\t */\n\tpublic setToken(token: string) {\n\t\tthis.#token = token;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Queues a request to be sent\n\t *\n\t * @param request - All the information needed to make a request\n\t * @returns The response from the api request\n\t */\n\tpublic async queueRequest(request: InternalRequest): Promise<ResponseLike> {\n\t\t// Generalize the endpoint to its route data\n\t\tconst routeId = REST.generateRouteData(request.fullRoute, request.method);\n\t\t// Get the bucket hash for the generic route, or point to a global route otherwise\n\t\tconst hash = this.hashes.get(`${request.method}:${routeId.bucketRoute}`) ?? {\n\t\t\tvalue: `Global(${request.method}:${routeId.bucketRoute})`,\n\t\t\tlastAccess: -1,\n\t\t};\n\n\t\t// Get the request handler for the obtained hash, with its major parameter\n\t\tconst handler =\n\t\t\tthis.handlers.get(`${hash.value}:${routeId.majorParameter}`) ??\n\t\t\tthis.createHandler(hash.value, routeId.majorParameter);\n\n\t\t// Resolve the request into usable fetch options\n\t\tconst { url, fetchOptions } = await this.resolveRequest(request);\n\n\t\t// Queue the request\n\t\treturn handler.queueRequest(routeId, url, fetchOptions, {\n\t\t\tbody: request.body,\n\t\t\tfiles: request.files,\n\t\t\tauth: request.auth !== false,\n\t\t\tsignal: request.signal,\n\t\t});\n\t}\n\n\t/**\n\t * Creates a new rate limit handler from a hash, based on the hash and the major parameter\n\t *\n\t * @param hash - The hash for the route\n\t * @param majorParameter - The major parameter for this handler\n\t * @internal\n\t */\n\tprivate createHandler(hash: string, majorParameter: string) {\n\t\t// Create the async request queue to handle requests\n\t\tconst queue =\n\t\t\tmajorParameter === BurstHandlerMajorIdKey\n\t\t\t\t? new BurstHandler(this, hash, majorParameter)\n\t\t\t\t: new SequentialHandler(this, hash, majorParameter);\n\t\t// Save the queue based on its id\n\t\tthis.handlers.set(queue.id, queue);\n\n\t\treturn queue;\n\t}\n\n\t/**\n\t * Formats the request data to a usable format for fetch\n\t *\n\t * @param request - The request data\n\t */\n\tprivate async resolveRequest(request: InternalRequest): Promise<{ fetchOptions: RequestInit; url: string }> {\n\t\tconst { options } = this;\n\n\t\tlet query = '';\n\n\t\t// If a query option is passed, use it\n\t\tif (request.query) {\n\t\t\tconst resolvedQuery = request.query.toString();\n\t\t\tif (resolvedQuery !== '') {\n\t\t\t\tquery = `?${resolvedQuery}`;\n\t\t\t}\n\t\t}\n\n\t\t// Create the required headers\n\t\tconst headers: RequestHeaders = {\n\t\t\t...this.options.headers,\n\t\t\t'User-Agent': `${DefaultUserAgent} ${options.userAgentAppendix}`.trim(),\n\t\t};\n\n\t\t// If this request requires authorization (allowing non-\"authorized\" requests for webhooks)\n\t\tif (request.auth !== false) {\n\t\t\t// If we haven't received a token, throw an error\n\t\t\tif (!this.#token) {\n\t\t\t\tthrow new Error('Expected token to be set for this request, but none was present');\n\t\t\t}\n\n\t\t\theaders.Authorization = `${request.authPrefix ?? this.options.authPrefix} ${this.#token}`;\n\t\t}\n\n\t\t// If a reason was set, set it's appropriate header\n\t\tif (request.reason?.length) {\n\t\t\theaders['X-Audit-Log-Reason'] = encodeURIComponent(request.reason);\n\t\t}\n\n\t\t// Format the full request URL (api base, optional version, endpoint, optional querystring)\n\t\tconst url = `${options.api}${request.versioned === false ? '' : `/v${options.version}`}${\n\t\t\trequest.fullRoute\n\t\t}${query}`;\n\n\t\tlet finalBody: RequestInit['body'];\n\t\tlet additionalHeaders: Record<string, string> = {};\n\n\t\tif (request.files?.length) {\n\t\t\tconst formData = new FormData();\n\n\t\t\t// Attach all files to the request\n\t\t\tfor (const [index, file] of request.files.entries()) {\n\t\t\t\tconst fileKey = file.key ?? `files[${index}]`;\n\n\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/FormData/append#parameters\n\t\t\t\t// FormData.append only accepts a string or Blob.\n\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob#parameters\n\t\t\t\t// The Blob constructor accepts TypedArray/ArrayBuffer, strings, and Blobs.\n\t\t\t\tif (isBufferLike(file.data)) {\n\t\t\t\t\t// Try to infer the content type from the buffer if one isn't passed\n\t\t\t\t\tlet contentType = file.contentType;\n\n\t\t\t\t\tif (!contentType) {\n\t\t\t\t\t\tconst [parsedType] = filetypeinfo(file.data);\n\n\t\t\t\t\t\tif (parsedType) {\n\t\t\t\t\t\t\tcontentType =\n\t\t\t\t\t\t\t\tOverwrittenMimeTypes[parsedType.mime as keyof typeof OverwrittenMimeTypes] ??\n\t\t\t\t\t\t\t\tparsedType.mime ??\n\t\t\t\t\t\t\t\t'application/octet-stream';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tformData.append(fileKey, new Blob([file.data], { type: contentType }), file.name);\n\t\t\t\t} else {\n\t\t\t\t\tformData.append(fileKey, new Blob([`${file.data}`], { type: file.contentType }), file.name);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If a JSON body was added as well, attach it to the form data, using payload_json unless otherwise specified\n\t\t\t// eslint-disable-next-line no-eq-null, eqeqeq\n\t\t\tif (request.body != null) {\n\t\t\t\tif (request.appendToFormData) {\n\t\t\t\t\tfor (const [key, value] of Object.entries(request.body as Record<string, unknown>)) {\n\t\t\t\t\t\tformData.append(key, value);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tformData.append('payload_json', JSON.stringify(request.body));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set the final body to the form data\n\t\t\tfinalBody = formData;\n\n\t\t\t// eslint-disable-next-line no-eq-null, eqeqeq\n\t\t} else if (request.body != null) {\n\t\t\tif (request.passThroughBody) {\n\t\t\t\tfinalBody = request.body as BodyInit;\n\t\t\t} else {\n\t\t\t\t// Stringify the JSON data\n\t\t\t\tfinalBody = JSON.stringify(request.body);\n\t\t\t\t// Set the additional headers to specify the content-type\n\t\t\t\tadditionalHeaders = { 'Content-Type': 'application/json' };\n\t\t\t}\n\t\t}\n\n\t\tconst method = request.method.toUpperCase();\n\n\t\t// The non null assertions in the following block are due to exactOptionalPropertyTypes, they have been tested to work with undefined\n\t\tconst fetchOptions: RequestInit = {\n\t\t\t// Set body to null on get / head requests. This does not follow fetch spec (likely because it causes subtle bugs) but is aligned with what request was doing\n\t\t\tbody: ['GET', 'HEAD'].includes(method) ? null : finalBody!,\n\t\t\theaders: { ...request.headers, ...additionalHeaders, ...headers } as Record<string, string>,\n\t\t\tmethod,\n\t\t\t// Prioritize setting an agent per request, use the agent for this instance otherwise.\n\t\t\tdispatcher: request.dispatcher ?? this.agent ?? undefined!,\n\t\t};\n\n\t\treturn { url, fetchOptions };\n\t}\n\n\t/**\n\t * Stops the hash sweeping interval\n\t */\n\tpublic clearHashSweeper() {\n\t\tclearInterval(this.hashTimer);\n\t}\n\n\t/**\n\t * Stops the request handler sweeping interval\n\t */\n\tpublic clearHandlerSweeper() {\n\t\tclearInterval(this.handlerTimer);\n\t}\n\n\t/**\n\t * Generates route data for an endpoint:method\n\t *\n\t * @param endpoint - The raw endpoint to generalize\n\t * @param method - The HTTP method this endpoint is called without\n\t * @internal\n\t */\n\tprivate static generateRouteData(endpoint: RouteLike, method: RequestMethod): RouteData {\n\t\tif (endpoint.startsWith('/interactions/') && endpoint.endsWith('/callback')) {\n\t\t\treturn {\n\t\t\t\tmajorParameter: BurstHandlerMajorIdKey,\n\t\t\t\tbucketRoute: '/interactions/:id/:token/callback',\n\t\t\t\toriginal: endpoint,\n\t\t\t};\n\t\t}\n\n\t\tconst majorIdMatch = /^\\/(?:channels|guilds|webhooks)\\/(\\d{17,19})/.exec(endpoint);\n\n\t\t// Get the major id for this route - global otherwise\n\t\tconst majorId = majorIdMatch?.[1] ?? 'global';\n\n\t\tconst baseRoute = endpoint\n\t\t\t// Strip out all ids\n\t\t\t.replaceAll(/\\d{17,19}/g, ':id')\n\t\t\t// Strip out reaction as they fall under the same bucket\n\t\t\t.replace(/\\/reactions\\/(.*)/, '/reactions/:reaction');\n\n\t\tlet exceptions = '';\n\n\t\t// Hard-Code Old Message Deletion Exception (2 week+ old messages are a different bucket)\n\t\t// https://github.com/discord/discord-api-docs/issues/1295\n\t\tif (method === RequestMethod.Delete && baseRoute === '/channels/:id/messages/:id') {\n\t\t\tconst id = /\\d{17,19}$/.exec(endpoint)![0]!;\n\t\t\tconst timestamp = DiscordSnowflake.timestampFrom(id);\n\t\t\tif (Date.now() - timestamp > 1_000 * 60 * 60 * 24 * 14) {\n\t\t\t\texceptions += '/Delete Old Message';\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tmajorParameter: majorId,\n\t\t\tbucketRoute: baseRoute + exceptions,\n\t\t\toriginal: endpoint,\n\t\t};\n\t}\n}\n","import type { Readable } from 'node:stream';\nimport type { ReadableStream } from 'node:stream/web';\nimport type { Collection } from '@discordjs/collection';\nimport type { Agent, Dispatcher, RequestInit, BodyInit, Response } from 'undici';\nimport type { IHandler } from '../interfaces/Handler.js';\n\nexport interface RestEvents {\n\thandlerSweep: [sweptHandlers: Collection<string, IHandler>];\n\thashSweep: [sweptHashes: Collection<string, HashData>];\n\tinvalidRequestWarning: [invalidRequestInfo: InvalidRequestWarningData];\n\trateLimited: [rateLimitInfo: RateLimitData];\n\tresponse: [request: APIRequest, response: ResponseLike];\n\trestDebug: [info: string];\n}\n\nexport type RestEventsMap = {\n\t[K in keyof RestEvents]: RestEvents[K];\n};\n\n/**\n * Options to be passed when creating the REST instance\n */\nexport interface RESTOptions {\n\t/**\n\t * The agent to set globally\n\t */\n\tagent: Dispatcher | null;\n\t/**\n\t * The base api path, without version\n\t *\n\t * @defaultValue `'https://discord.com/api'`\n\t */\n\tapi: string;\n\t/**\n\t * The authorization prefix to use for requests, useful if you want to use\n\t * bearer tokens\n\t *\n\t * @defaultValue `'Bot'`\n\t */\n\tauthPrefix: 'Bearer' | 'Bot';\n\t/**\n\t * The cdn path\n\t *\n\t * @defaultValue `'https://cdn.discordapp.com'`\n\t */\n\tcdn: string;\n\t/**\n\t * How many requests to allow sending per second (Infinity for unlimited, 50 for the standard global limit used by Discord)\n\t *\n\t * @defaultValue `50`\n\t */\n\tglobalRequestsPerSecond: number;\n\t/**\n\t * The amount of time in milliseconds that passes between each hash sweep. (defaults to 1h)\n\t *\n\t * @defaultValue `3_600_000`\n\t */\n\thandlerSweepInterval: number;\n\t/**\n\t * The maximum amount of time a hash can exist in milliseconds without being hit with a request (defaults to 24h)\n\t *\n\t * @defaultValue `86_400_000`\n\t */\n\thashLifetime: number;\n\t/**\n\t * The amount of time in milliseconds that passes between each hash sweep. (defaults to 4h)\n\t *\n\t * @defaultValue `14_400_000`\n\t */\n\thashSweepInterval: number;\n\t/**\n\t * Additional headers to send for all API requests\n\t *\n\t * @defaultValue `{}`\n\t */\n\theaders: Record<string, string>;\n\t/**\n\t * The number of invalid REST requests (those that return 401, 403, or 429) in a 10 minute window between emitted warnings (0 for no warnings).\n\t * That is, if set to 500, warnings will be emitted at invalid request number 500, 1000, 1500, and so on.\n\t *\n\t * @defaultValue `0`\n\t */\n\tinvalidRequestWarningInterval: number;\n\t/**\n\t * The method called to perform the actual HTTP request given a url and web `fetch` options\n\t * For example, to use global fetch, simply provide `makeRequest: fetch`\n\t */\n\tmakeRequest(url: string, init: RequestInit): Promise<ResponseLike>;\n\t/**\n\t * The extra offset to add to rate limits in milliseconds\n\t *\n\t * @defaultValue `50`\n\t */\n\toffset: number;\n\t/**\n\t * Determines how rate limiting and pre-emptive throttling should be handled.\n\t * When an array of strings, each element is treated as a prefix for the request route\n\t * (e.g. `/channels` to match any route starting with `/channels` such as `/channels/:id/messages`)\n\t * for which to throw {@link RateLimitError}s. All other request routes will be queued normally\n\t *\n\t * @defaultValue `null`\n\t */\n\trejectOnRateLimit: RateLimitQueueFilter | string[] | null;\n\t/**\n\t * The number of retries for errors with the 500 code, or errors\n\t * that timeout\n\t *\n\t * @defaultValue `3`\n\t */\n\tretries: number;\n\t/**\n\t * The time to wait in milliseconds before a request is aborted\n\t *\n\t * @defaultValue `15_000`\n\t */\n\ttimeout: number;\n\t/**\n\t * Extra information to add to the user agent\n\t *\n\t * @defaultValue DefaultUserAgentAppendix\n\t */\n\tuserAgentAppendix: string;\n\t/**\n\t * The version of the API to use\n\t *\n\t * @defaultValue `'10'`\n\t */\n\tversion: string;\n}\n\n/**\n * Data emitted on `RESTEvents.RateLimited`\n */\nexport interface RateLimitData {\n\t/**\n\t * Whether the rate limit that was reached was the global limit\n\t */\n\tglobal: boolean;\n\t/**\n\t * The bucket hash for this request\n\t */\n\thash: string;\n\t/**\n\t * The amount of requests we can perform before locking requests\n\t */\n\tlimit: number;\n\t/**\n\t * The major parameter of the route\n\t *\n\t * For example, in `/channels/x`, this will be `x`.\n\t * If there is no major parameter (e.g: `/bot/gateway`) this will be `global`.\n\t */\n\tmajorParameter: string;\n\t/**\n\t * The HTTP method being performed\n\t */\n\tmethod: string;\n\t/**\n\t * The route being hit in this request\n\t */\n\troute: string;\n\t/**\n\t * The time, in milliseconds, until the request-lock is reset\n\t */\n\ttimeToReset: number;\n\t/**\n\t * The full URL for this request\n\t */\n\turl: string;\n}\n\n/**\n * A function that determines whether the rate limit hit should throw an Error\n */\nexport type RateLimitQueueFilter = (rateLimitData: RateLimitData) => Promise<boolean> | boolean;\n\nexport interface APIRequest {\n\t/**\n\t * The data that was used to form the body of this request\n\t */\n\tdata: HandlerRequestData;\n\t/**\n\t * The HTTP method used in this request\n\t */\n\tmethod: string;\n\t/**\n\t * Additional HTTP options for this request\n\t */\n\toptions: RequestInit;\n\t/**\n\t * The full path used to make the request\n\t */\n\tpath: RouteLike;\n\t/**\n\t * The number of times this request has been attempted\n\t */\n\tretries: number;\n\t/**\n\t * The API route identifying the ratelimit for this request\n\t */\n\troute: string;\n}\n\nexport interface ResponseLike\n\textends Pick<Response, 'arrayBuffer' | 'bodyUsed' | 'headers' | 'json' | 'ok' | 'status' | 'statusText' | 'text'> {\n\tbody: Readable | ReadableStream | null;\n}\n\nexport interface InvalidRequestWarningData {\n\t/**\n\t * Number of invalid requests that have been made in the window\n\t */\n\tcount: number;\n\t/**\n\t * Time in milliseconds remaining before the count resets\n\t */\n\tremainingTime: number;\n}\n\n/**\n * Represents a file to be added to the request\n */\nexport interface RawFile {\n\t/**\n\t * Content-Type of the file\n\t */\n\tcontentType?: string;\n\t/**\n\t * The actual data for the file\n\t */\n\tdata: Buffer | Uint8Array | boolean | number | string;\n\t/**\n\t * An explicit key to use for key of the formdata field for this file.\n\t * When not provided, the index of the file in the files array is used in the form `files[${index}]`.\n\t * If you wish to alter the placeholder snowflake, you must provide this property in the same form (`files[${placeholder}]`)\n\t */\n\tkey?: string;\n\t/**\n\t * The name of the file\n\t */\n\tname: string;\n}\n\n/**\n * Represents possible data to be given to an endpoint\n */\nexport interface RequestData {\n\t/**\n\t * Whether to append JSON data to form data instead of `payload_json` when sending files\n\t */\n\tappendToFormData?: boolean;\n\t/**\n\t * If this request needs the `Authorization` header\n\t *\n\t * @defaultValue `true`\n\t */\n\tauth?: boolean;\n\t/**\n\t * The authorization prefix to use for this request, useful if you use this with bearer tokens\n\t *\n\t * @defaultValue `'Bot'`\n\t */\n\tauthPrefix?: 'Bearer' | 'Bot';\n\t/**\n\t * The body to send to this request.\n\t * If providing as BodyInit, set `passThroughBody: true`\n\t */\n\tbody?: BodyInit | unknown;\n\t/**\n\t * The {@link https://undici.nodejs.org/#/docs/api/Agent | Agent} to use for the request.\n\t */\n\tdispatcher?: Agent;\n\t/**\n\t * Files to be attached to this request\n\t */\n\tfiles?: RawFile[] | undefined;\n\t/**\n\t * Additional headers to add to this request\n\t */\n\theaders?: Record<string, string>;\n\t/**\n\t * Whether to pass-through the body property directly to `fetch()`.\n\t * <warn>This only applies when files is NOT present</warn>\n\t */\n\tpassThroughBody?: boolean;\n\t/**\n\t * Query string parameters to append to the called endpoint\n\t */\n\tquery?: URLSearchParams;\n\t/**\n\t * Reason to show in the audit logs\n\t */\n\treason?: string | undefined;\n\t/**\n\t * The signal to abort the queue entry or the REST call, where applicable\n\t */\n\tsignal?: AbortSignal | undefined;\n\t/**\n\t * If this request should be versioned\n\t *\n\t * @defaultValue `true`\n\t */\n\tversioned?: boolean;\n}\n\n/**\n * Possible headers for an API call\n */\nexport interface RequestHeaders {\n\tAuthorization?: string;\n\t'User-Agent': string;\n\t'X-Audit-Log-Reason'?: string;\n}\n\n/**\n * Possible API methods to be used when doing requests\n */\nexport enum RequestMethod {\n\tDelete = 'DELETE',\n\tGet = 'GET',\n\tPatch = 'PATCH',\n\tPost = 'POST',\n\tPut = 'PUT',\n}\n\nexport type RouteLike = `/${string}`;\n\n/**\n * Internal request options\n *\n * @internal\n */\nexport interface InternalRequest extends RequestData {\n\tfullRoute: RouteLike;\n\tmethod: RequestMethod;\n}\n\nexport type HandlerRequestData = Pick<InternalRequest, 'auth' | 'body' | 'files' | 'signal'>;\n\n/**\n * Parsed route data for an endpoint\n *\n * @internal\n */\nexport interface RouteData {\n\tbucketRoute: string;\n\tmajorParameter: string;\n\toriginal: RouteLike;\n}\n\n/**\n * Represents a hash and its associated fields\n *\n * @internal\n */\nexport interface HashData {\n\tlastAccess: number;\n\tvalue: string;\n}\n","import type { RESTPatchAPIChannelJSONBody, Snowflake } from 'discord-api-types/v10';\nimport type { REST } from '../REST.js';\nimport { RateLimitError } from '../errors/RateLimitError.js';\nimport { RequestMethod, type RateLimitData, type ResponseLike } from './types.js';\n\nfunction serializeSearchParam(value: unknown): string | null {\n\tswitch (typeof value) {\n\t\tcase 'string':\n\t\t\treturn value;\n\t\tcase 'number':\n\t\tcase 'bigint':\n\t\tcase 'boolean':\n\t\t\treturn value.toString();\n\t\tcase 'object':\n\t\t\tif (value === null) return null;\n\t\t\tif (value instanceof Date) {\n\t\t\t\treturn Number.isNaN(value.getTime()) ? null : value.toISOString();\n\t\t\t}\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-base-to-string\n\t\t\tif (typeof value.toString === 'function' && value.toString !== Object.prototype.toString) return value.toString();\n\t\t\treturn null;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\n/**\n * Creates and populates an URLSearchParams instance from an object, stripping\n * out null and undefined values, while also coercing non-strings to strings.\n *\n * @param options - The options to use\n * @returns A populated URLSearchParams instance\n */\nexport function makeURLSearchParams<T extends object>(options?: Readonly<T>) {\n\tconst params = new URLSearchParams();\n\tif (!options) return params;\n\n\tfor (const [key, value] of Object.entries(options)) {\n\t\tconst serialized = serializeSearchParam(value);\n\t\tif (serialized !== null) params.append(key, serialized);\n\t}\n\n\treturn params;\n}\n\n/**\n * Converts the response to usable data\n *\n * @param res - The fetch response\n */\nexport async function parseResponse(res: ResponseLike): Promise<unknown> {\n\tif (res.headers.get('Content-Type')?.startsWith('application/json')) {\n\t\treturn res.json();\n\t}\n\n\treturn res.arrayBuffer();\n}\n\n/**\n * Check whether a request falls under a sublimit\n *\n * @param bucketRoute - The buckets route identifier\n * @param body - The options provided as JSON data\n * @param method - The HTTP method that will be used to make the request\n * @returns Whether the request falls under a sublimit\n */\nexport function hasSublimit(bucketRoute: string, body?: unknown, method?: string): boolean {\n\t// TODO: Update for new sublimits\n\t// Currently known sublimits:\n\t// Editing channel `name` or `topic`\n\tif (bucketRoute === '/channels/:id') {\n\t\tif (typeof body !== 'object' || body === null) return false;\n\t\t// This should never be a POST body, but just in case\n\t\tif (method !== RequestMethod.Patch) return false;\n\t\tconst castedBody = body as RESTPatchAPIChannelJSONBody;\n\t\treturn ['name', 'topic'].some((key) => Reflect.has(castedBody, key));\n\t}\n\n\t// If we are checking if a request has a sublimit on a route not checked above, sublimit all requests to avoid a flood of 429s\n\treturn true;\n}\n\n/**\n * Check whether an error indicates that a retry can be attempted\n *\n * @param error - The error thrown by the network request\n * @returns Whether the error indicates a retry should be attempted\n */\nexport function shouldRetry(error: Error | NodeJS.ErrnoException) {\n\t// Retry for possible timed out requests\n\tif (error.name === 'AbortError') return true;\n\t// Downlevel ECONNRESET to retry as it may be recoverable\n\treturn ('code' in error && error.code === 'ECONNRESET') || error.message.includes('ECONNRESET');\n}\n\n/**\n * Determines whether the request should be queued or whether a RateLimitError should be thrown\n *\n * @internal\n */\nexport async function onRateLimit(manager: REST, rateLimitData: RateLimitData) {\n\tconst { options } = manager;\n\tif (!options.rejectOnRateLimit) return;\n\n\tconst shouldThrow =\n\t\ttypeof options.rejectOnRateLimit === 'function'\n\t\t\t? await options.rejectOnRateLimit(rateLimitData)\n\t\t\t: options.rejectOnRateLimit.some((route) => rateLimitData.route.startsWith(route.toLowerCase()));\n\tif (shouldThrow) {\n\t\tthrow new RateLimitError(rateLimitData);\n\t}\n}\n\n/**\n * Calculates the default avatar index for a given user id.\n *\n * @param userId - The user id to calculate the default avatar index for\n */\nexport function calculateUserDefaultAvatarIndex(userId: Snowflake) {\n\treturn Number(BigInt(userId) >> 22n) % 6;\n}\n\n/**\n * Sleeps for a given amount of time.\n *\n * @param ms - The amount of time (in milliseconds) to sleep for\n */\nexport async function sleep(ms: number): Promise<void> {\n\treturn new Promise<void>((resolve) => {\n\t\tsetTimeout(() => resolve(), ms);\n\t});\n}\n\n/**\n * Verifies that a value is a buffer-like object.\n *\n * @param value - The value to check\n */\nexport function isBufferLike(value: unknown): value is ArrayBuffer | Buffer | Uint8Array | Uint8ClampedArray {\n\treturn value instanceof ArrayBuffer || value instanceof Uint8Array || value instanceof Uint8ClampedArray;\n}\n","import type { RequestInit } from 'undici';\nimport type { REST } from '../REST.js';\nimport type { DiscordErrorData, OAuthErrorData } from '../errors/DiscordAPIError.js';\nimport { DiscordAPIError } from '../errors/DiscordAPIError.js';\nimport { HTTPError } from '../errors/HTTPError.js';\nimport { RESTEvents } from '../utils/constants.js';\nimport type { ResponseLike, HandlerRequestData, RouteData } from '../utils/types.js';\nimport { parseResponse, shouldRetry } from '../utils/utils.js';\n\n/**\n * Invalid request limiting is done on a per-IP basis, not a per-token basis.\n * The best we can do is track invalid counts process-wide (on the theory that\n * users could have multiple bots run from one process) rather than per-bot.\n * Therefore, store these at file scope here rather than in the client's\n * RESTManager object.\n */\nlet invalidCount = 0;\nlet invalidCountResetTime: number | null = null;\n\n/**\n * Increment the invalid request count and emit warning if necessary\n *\n * @internal\n */\nexport function incrementInvalidCount(manager: REST) {\n\tif (!invalidCountResetTime || invalidCountResetTime < Date.now()) {\n\t\tinvalidCountResetTime = Date.now() + 1_000 * 60 * 10;\n\t\tinvalidCount = 0;\n\t}\n\n\tinvalidCount++;\n\n\tconst emitInvalid =\n\t\tmanager.options.invalidRequestWarningInterval > 0 &&\n\t\tinvalidCount % manager.options.invalidRequestWarningInterval === 0;\n\tif (emitInvalid) {\n\t\t// Let library users know periodically about invalid requests\n\t\tmanager.emit(RESTEvents.InvalidRequestWarning, {\n\t\t\tcount: invalidCount,\n\t\t\tremainingTime: invalidCountResetTime - Date.now(),\n\t\t});\n\t}\n}\n\n/**\n * Performs the actual network request for a request handler\n *\n * @param manager - The manager that holds options and emits informational events\n * @param routeId - The generalized api route with literal ids for major parameters\n * @param url - The fully resolved url to make the request to\n * @param options - The fetch options needed to make the request\n * @param requestData - Extra data from the user's request needed for errors and additional processing\n * @param retries - The number of retries this request has already attempted (recursion occurs on the handler)\n * @returns The respond from the network or `null` when the request should be retried\n * @internal\n */\nexport async function makeNetworkRequest(\n\tmanager: REST,\n\trouteId: RouteData,\n\turl: string,\n\toptions: RequestInit,\n\trequestData: HandlerRequestData,\n\tretries: number,\n) {\n\tconst controller = new AbortController();\n\tconst timeout = setTimeout(() => controller.abort(), manager.options.timeout);\n\tif (requestData.signal) {\n\t\t// If the user signal was aborted, abort the controller, else abort the local signal.\n\t\t// The reason why we don't re-use the user's signal, is because users may use the same signal for multiple\n\t\t// requests, and we do not want to cause unexpected side-effects.\n\t\tif (requestData.signal.aborted) controller.abort();\n\t\telse requestData.signal.addEventListener('abort', () => controller.abort());\n\t}\n\n\tlet res: ResponseLike;\n\ttry {\n\t\tres = await manager.options.makeRequest(url, { ...options, signal: controller.signal });\n\t} catch (error: unknown) {\n\t\tif (!(error instanceof Error)) throw error;\n\t\t// Retry the specified number of times if needed\n\t\tif (shouldRetry(error) && retries !== manager.options.retries) {\n\t\t\t// Retry is handled by the handler upon receiving null\n\t\t\treturn null;\n\t\t}\n\n\t\tthrow error;\n\t} finally {\n\t\tclearTimeout(timeout);\n\t}\n\n\tif (manager.listenerCount(RESTEvents.Response)) {\n\t\tmanager.emit(\n\t\t\tRESTEvents.Response,\n\t\t\t{\n\t\t\t\tmethod: options.method ?? 'get',\n\t\t\t\tpath: routeId.original,\n\t\t\t\troute: routeId.bucketRoute,\n\t\t\t\toptions,\n\t\t\t\tdata: requestData,\n\t\t\t\tretries,\n\t\t\t},\n\t\t\tres instanceof Response ? res.clone() : { ...res },\n\t\t);\n\t}\n\n\treturn res;\n}\n\n/**\n * Handles 5xx and 4xx errors (not 429's) conventionally. 429's should be handled before calling this function\n *\n * @param manager - The manager that holds options and emits informational events\n * @param res - The response received from {@link makeNetworkRequest}\n * @param method - The method used to make the request\n * @param url - The fully resolved url to make the request to\n * @param requestData - Extra data from the user's request needed for errors and additional processing\n * @param retries - The number of retries this request has already attempted (recursion occurs on the handler)\n * @returns - The response if the status code is not handled or null to request a retry\n */\nexport async function handleErrors(\n\tmanager: REST,\n\tres: ResponseLike,\n\tmethod: string,\n\turl: string,\n\trequestData: HandlerRequestData,\n\tretries: number,\n) {\n\tconst status = res.status;\n\tif (status >= 500 && status < 600) {\n\t\t// Retry the specified number of times for possible server side issues\n\t\tif (retries !== manager.options.retries) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// We are out of retries, throw an error\n\t\tthrow new HTTPError(status, res.statusText, method, url, requestData);\n\t} else {\n\t\t// Handle possible malformed requests\n\t\tif (status >= 400 && status < 500) {\n\t\t\t// If we receive this status code, it means the token we had is no longer valid.\n\t\t\tif (status === 401 && requestData.auth) {\n\t\t\t\tmanager.setToken(null!);\n\t\t\t}\n\n\t\t\t// The request will not succeed for some reason, parse the error returned from the api\n\t\t\tconst data = (await parseResponse(res)) as DiscordErrorData | OAuthErrorData;\n\t\t\t// throw the API error\n\t\t\tthrow new DiscordAPIError(data, 'code' in data ? data.code : data.error, status, method, url, requestData);\n\t\t}\n\n\t\treturn res;\n\t}\n}\n","import type { RequestInit } from 'undici';\nimport type { REST } from '../REST.js';\nimport type { IHandler } from '../interfaces/Handler.js';\nimport { RESTEvents } from '../utils/constants.js';\nimport type { ResponseLike, HandlerRequestData, RouteData } from '../utils/types.js';\nimport { onRateLimit, sleep } from '../utils/utils.js';\nimport { handleErrors, incrementInvalidCount, makeNetworkRequest } from './Shared.js';\n\n/**\n * The structure used to handle burst requests for a given bucket.\n * Burst requests have no ratelimit handling but allow for pre- and post-processing\n * of data in the same manner as sequentially queued requests.\n *\n * @remarks\n * This queue may still emit a rate limit error if an unexpected 429 is hit\n */\nexport class BurstHandler implements IHandler {\n\t/**\n\t * {@inheritdoc IHandler.id}\n\t */\n\tpublic readonly id: string;\n\n\t/**\n\t * {@inheritDoc IHandler.inactive}\n\t */\n\tpublic inactive = false;\n\n\t/**\n\t * @param manager - The request manager\n\t * @param hash - The hash that this RequestHandler handles\n\t * @param majorParameter - The major parameter for this handler\n\t */\n\tpublic constructor(\n\t\tprivate readonly manager: REST,\n\t\tprivate readonly hash: string,\n\t\tprivate readonly majorParameter: string,\n\t) {\n\t\tthis.id = `${hash}:${majorParameter}`;\n\t}\n\n\t/**\n\t * Emits a debug message\n\t *\n\t * @param message - The message to debug\n\t */\n\tprivate debug(message: string) {\n\t\tthis.manager.emit(RESTEvents.Debug, `[REST ${this.id}] ${message}`);\n\t}\n\n\t/**\n\t * {@inheritDoc IHandler.queueRequest}\n\t */\n\tpublic async queueRequest(\n\t\trouteId: RouteData,\n\t\turl: string,\n\t\toptions: RequestInit,\n\t\trequestData: HandlerRequestData,\n\t): Promise<ResponseLike> {\n\t\treturn this.runRequest(routeId, url, options, requestData);\n\t}\n\n\t/**\n\t * The method that actually makes the request to the API, and updates info about the bucket accordingly\n\t *\n\t * @param routeId - The generalized API route with literal ids for major parameters\n\t * @param url - The fully resolved URL to make the request to\n\t * @param options - The fetch options needed to make the request\n\t * @param requestData - Extra data from the user's request needed for errors and additional processing\n\t * @param retries - The number of retries this request has already attempted (recursion)\n\t */\n\tprivate async runRequest(\n\t\trouteId: RouteData,\n\t\turl: string,\n\t\toptions: RequestInit,\n\t\trequestData: HandlerRequestData,\n\t\tretries = 0,\n\t): Promise<ResponseLike> {\n\t\tconst method = options.method ?? 'get';\n\n\t\tconst res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries);\n\n\t\t// Retry requested\n\t\tif (res === null) {\n\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\treturn this.runRequest(routeId, url, options, requestData, ++retries);\n\t\t}\n\n\t\tconst status = res.status;\n\t\tlet retryAfter = 0;\n\t\tconst retry = res.headers.get('Retry-After');\n\n\t\t// Amount of time in milliseconds until we should retry if rate limited (globally or otherwise)\n\t\tif (retry) retryAfter = Number(retry) * 1_000 + this.manager.options.offset;\n\n\t\t// Count the invalid requests\n\t\tif (status === 401 || status === 403 || status === 429) {\n\t\t\tincrementInvalidCount(this.manager);\n\t\t}\n\n\t\tif (status >= 200 && status < 300) {\n\t\t\treturn res;\n\t\t} else if (status === 429) {\n\t\t\t// Unexpected ratelimit\n\t\t\tconst isGlobal = res.headers.has('X-RateLimit-Global');\n\t\t\tawait onRateLimit(this.manager, {\n\t\t\t\ttimeToReset: retryAfter,\n\t\t\t\tlimit: Number.POSITIVE_INFINITY,\n\t\t\t\tmethod,\n\t\t\t\thash: this.hash,\n\t\t\t\turl,\n\t\t\t\troute: routeId.bucketRoute,\n\t\t\t\tmajorParameter: this.majorParameter,\n\t\t\t\tglobal: isGlobal,\n\t\t\t});\n\t\t\tthis.debug(\n\t\t\t\t[\n\t\t\t\t\t'Encountered unexpected 429 rate limit',\n\t\t\t\t\t` Global : ${isGlobal}`,\n\t\t\t\t\t` Method : ${method}`,\n\t\t\t\t\t` URL : ${url}`,\n\t\t\t\t\t` Bucket : ${routeId.bucketRoute}`,\n\t\t\t\t\t` Major parameter: ${routeId.majorParameter}`,\n\t\t\t\t\t` Hash : ${this.hash}`,\n\t\t\t\t\t` Limit : ${Number.POSITIVE_INFINITY}`,\n\t\t\t\t\t` Retry After : ${retryAfter}ms`,\n\t\t\t\t\t` Sublimit : None`,\n\t\t\t\t].join('\\n'),\n\t\t\t);\n\n\t\t\t// We are bypassing all other limits, but an encountered limit should be respected (it's probably a non-punished rate limit anyways)\n\t\t\tawait sleep(retryAfter);\n\n\t\t\t// Since this is not a server side issue, the next request should pass, so we don't bump the retries counter\n\t\t\treturn this.runRequest(routeId, url, options, requestData, retries);\n\t\t} else {\n\t\t\tconst handled = await handleErrors(this.manager, res, method, url, requestData, retries);\n\t\t\tif (handled === null) {\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\treturn this.runRequest(routeId, url, options, requestData, ++retries);\n\t\t\t}\n\n\t\t\treturn handled;\n\t\t}\n\t}\n}\n","import { AsyncQueue } from '@sapphire/async-queue';\nimport type { RequestInit } from 'undici';\nimport type { REST } from '../REST.js';\nimport type { IHandler } from '../interfaces/Handler.js';\nimport { RESTEvents } from '../utils/constants.js';\nimport type { RateLimitData, ResponseLike, HandlerRequestData, RouteData } from '../utils/types.js';\nimport { hasSublimit, onRateLimit, sleep } from '../utils/utils.js';\nimport { handleErrors, incrementInvalidCount, makeNetworkRequest } from './Shared.js';\n\nconst enum QueueType {\n\tStandard,\n\tSublimit,\n}\n\n/**\n * The structure used to handle sequential requests for a given bucket\n */\nexport class SequentialHandler implements IHandler {\n\t/**\n\t * {@inheritDoc IHandler.id}\n\t */\n\tpublic readonly id: string;\n\n\t/**\n\t * The time this rate limit bucket will reset\n\t */\n\tprivate reset = -1;\n\n\t/**\n\t * The remaining requests that can be made before we are rate limited\n\t */\n\tprivate remaining = 1;\n\n\t/**\n\t * The total number of requests that can be made before we are rate limited\n\t */\n\tprivate limit = Number.POSITIVE_INFINITY;\n\n\t/**\n\t * The interface used to sequence async requests sequentially\n\t */\n\t#asyncQueue = new AsyncQueue();\n\n\t/**\n\t * The interface used to sequence sublimited async requests sequentially\n\t */\n\t#sublimitedQueue: AsyncQueue | null = null;\n\n\t/**\n\t * A promise wrapper for when the sublimited queue is finished being processed or null when not being processed\n\t */\n\t#sublimitPromise: { promise: Promise<void>; resolve(): void } | null = null;\n\n\t/**\n\t * Whether the sublimit queue needs to be shifted in the finally block\n\t */\n\t#shiftSublimit = false;\n\n\t/**\n\t * @param manager - The request manager\n\t * @param hash - The hash that this RequestHandler handles\n\t * @param majorParameter - The major parameter for this handler\n\t */\n\tpublic constructor(\n\t\tprivate readonly manager: REST,\n\t\tprivate readonly hash: string,\n\t\tprivate readonly majorParameter: string,\n\t) {\n\t\tthis.id = `${hash}:${majorParameter}`;\n\t}\n\n\t/**\n\t * {@inheritDoc IHandler.inactive}\n\t */\n\tpublic get inactive(): boolean {\n\t\treturn (\n\t\t\tthis.#asyncQueue.remaining === 0 &&\n\t\t\t(this.#sublimitedQueue === null || this.#sublimitedQueue.remaining === 0) &&\n\t\t\t!this.limited\n\t\t);\n\t}\n\n\t/**\n\t * If the rate limit bucket is currently limited by the global limit\n\t */\n\tprivate get globalLimited(): boolean {\n\t\treturn this.manager.globalRemaining <= 0 && Date.now() < this.manager.globalReset;\n\t}\n\n\t/**\n\t * If the rate limit bucket is currently limited by its limit\n\t */\n\tprivate get localLimited(): boolean {\n\t\treturn this.remaining <= 0 && Date.now() < this.reset;\n\t}\n\n\t/**\n\t * If the rate limit bucket is currently limited\n\t */\n\tprivate get limited(): boolean {\n\t\treturn this.globalLimited || this.localLimited;\n\t}\n\n\t/**\n\t * The time until queued requests can continue\n\t */\n\tprivate get timeToReset(): number {\n\t\treturn this.reset + this.manager.options.offset - Date.now();\n\t}\n\n\t/**\n\t * Emits a debug message\n\t *\n\t * @param message - The message to debug\n\t */\n\tprivate debug(message: string) {\n\t\tthis.manager.emit(RESTEvents.Debug, `[REST ${this.id}] ${message}`);\n\t}\n\n\t/**\n\t * Delay all requests for the specified amount of time, handling global rate limits\n\t *\n\t * @param time - The amount of time to delay all requests for\n\t */\n\tprivate async globalDelayFor(time: number): Promise<void> {\n\t\tawait sleep(time);\n\t\tthis.manager.globalDelay = null;\n\t}\n\n\t/**\n\t * {@inheritDoc IHandler.queueRequest}\n\t */\n\tpublic async queueRequest(\n\t\trouteId: RouteData,\n\t\turl: string,\n\t\toptions: RequestInit,\n\t\trequestData: HandlerRequestData,\n\t): Promise<ResponseLike> {\n\t\tlet queue = this.#asyncQueue;\n\t\tlet queueType = QueueType.Standard;\n\t\t// Separate sublimited requests when already sublimited\n\t\tif (this.#sublimitedQueue && hasSublimit(routeId.bucketRoute, requestData.body, options.method)) {\n\t\t\tqueue = this.#sublimitedQueue!;\n\t\t\tqueueType = QueueType.Sublimit;\n\t\t}\n\n\t\t// Wait for any previous requests to be completed before this one is run\n\t\tawait queue.wait({ signal: requestData.signal });\n\t\t// This set handles retroactively sublimiting requests\n\t\tif (queueType === QueueType.Standard) {\n\t\t\tif (this.#sublimitedQueue && hasSublimit(routeId.bucketRoute, requestData.body, options.method)) {\n\t\t\t\t/**\n\t\t\t\t * Remove the request from the standard queue, it should never be possible to get here while processing the\n\t\t\t\t * sublimit queue so there is no need to worry about shifting the wrong request\n\t\t\t\t */\n\t\t\t\tqueue = this.#sublimitedQueue!;\n\t\t\t\tconst wait = queue.wait();\n\t\t\t\tthis.#asyncQueue.shift();\n\t\t\t\tawait wait;\n\t\t\t} else if (this.#sublimitPromise) {\n\t\t\t\t// Stall requests while the sublimit queue gets processed\n\t\t\t\tawait this.#sublimitPromise.promise;\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\t// Make the request, and return the results\n\t\t\treturn await this.runRequest(routeId, url, options, requestData);\n\t\t} finally {\n\t\t\t// Allow the next request to fire\n\t\t\tqueue.shift();\n\t\t\tif (this.#shiftSublimit) {\n\t\t\t\tthis.#shiftSublimit = false;\n\t\t\t\tthis.#sublimitedQueue?.shift();\n\t\t\t}\n\n\t\t\t// If this request is the last request in a sublimit\n\t\t\tif (this.#sublimitedQueue?.remaining === 0) {\n\t\t\t\tthis.#sublimitPromise?.resolve();\n\t\t\t\tthis.#sublimitedQueue = null;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * The method that actually makes the request to the api, and updates info about the bucket accordingly\n\t *\n\t * @param routeId - The generalized api route with literal ids for major parameters\n\t * @param url - The fully resolved url to make the request to\n\t * @param options - The fetch options needed to make the request\n\t * @param requestData - Extra data from the user's request needed for errors and additional processing\n\t * @param retries - The number of retries this request has already attempted (recursion)\n\t */\n\tprivate async runRequest(\n\t\trouteId: RouteData,\n\t\turl: string,\n\t\toptions: RequestInit,\n\t\trequestData: HandlerRequestData,\n\t\tretries = 0,\n\t): Promise<ResponseLike> {\n\t\t/*\n\t\t * After calculations have been done, pre-emptively stop further requests\n\t\t * Potentially loop until this task can run if e.g. the global rate limit is hit twice\n\t\t */\n\t\twhile (this.limited) {\n\t\t\tconst isGlobal = this.globalLimited;\n\t\t\tlet limit: number;\n\t\t\tlet timeout: number;\n\t\t\tlet delay: Promise<void>;\n\n\t\t\tif (isGlobal) {\n\t\t\t\t// Set RateLimitData based on the global limit\n\t\t\t\tlimit = this.manager.options.globalRequestsPerSecond;\n\t\t\t\ttimeout = this.manager.globalReset + this.manager.options.offset - Date.now();\n\t\t\t\t// If this is the first task to reach the global timeout, set the global delay\n\t\t\t\tif (!this.manager.globalDelay) {\n\t\t\t\t\t// The global delay function clears the global delay state when it is resolved\n\t\t\t\t\tthis.manager.globalDelay = this.globalDelayFor(timeout);\n\t\t\t\t}\n\n\t\t\t\tdelay = this.manager.globalDelay;\n\t\t\t} else {\n\t\t\t\t// Set RateLimitData based on the route-specific limit\n\t\t\t\tlimit = this.limit;\n\t\t\t\ttimeout = this.timeToReset;\n\t\t\t\tdelay = sleep(timeout);\n\t\t\t}\n\n\t\t\tconst rateLimitData: RateLimitData = {\n\t\t\t\ttimeToReset: timeout,\n\t\t\t\tlimit,\n\t\t\t\tmethod: options.method ?? 'get',\n\t\t\t\thash: this.hash,\n\t\t\t\turl,\n\t\t\t\troute: routeId.bucketRoute,\n\t\t\t\tmajorParameter: this.majorParameter,\n\t\t\t\tglobal: isGlobal,\n\t\t\t};\n\t\t\t// Let library users know they have hit a rate limit\n\t\t\tthis.manager.emit(RESTEvents.RateLimited, rateLimitData);\n\t\t\t// Determine whether a RateLimitError should be thrown\n\t\t\tawait onRateLimit(this.manager, rateLimitData);\n\t\t\t// When not erroring, emit debug for what is happening\n\t\t\tif (isGlobal) {\n\t\t\t\tthis.debug(`Global rate limit hit, blocking all requests for ${timeout}ms`);\n\t\t\t} else {\n\t\t\t\tthis.debug(`Waiting ${timeout}ms for rate limit to pass`);\n\t\t\t}\n\n\t\t\t// Wait the remaining time left before the rate limit resets\n\t\t\tawait delay;\n\t\t}\n\n\t\t// As the request goes out, update the global usage information\n\t\tif (!this.manager.globalReset || this.manager.globalReset < Date.now()) {\n\t\t\tthis.manager.globalReset = Date.now() + 1_000;\n\t\t\tthis.manager.globalRemaining = this.manager.options.globalRequestsPerSecond;\n\t\t}\n\n\t\tthis.manager.globalRemaining--;\n\n\t\tconst method = options.method ?? 'get';\n\n\t\tconst res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries);\n\n\t\t// Retry requested\n\t\tif (res === null) {\n\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\treturn this.runRequest(routeId, url, options, requestData, ++retries);\n\t\t}\n\n\t\tconst status = res.status;\n\t\tlet retryAfter = 0;\n\n\t\tconst limit = res.headers.get('X-RateLimit-Limit');\n\t\tconst remaining = res.headers.get('X-RateLimit-Remaining');\n\t\tconst reset = res.headers.get('X-RateLimit-Reset-After');\n\t\tconst hash = res.headers.get('X-RateLimit-Bucket');\n\t\tconst retry = res.headers.get('Retry-After');\n\n\t\t// Update the total number of requests that can be made before the rate limit resets\n\t\tthis.limit = limit ? Number(limit) : Number.POSITIVE_INFINITY;\n\t\t// Update the number of remaining requests that can be made before the rate limit resets\n\t\tthis.remaining = remaining ? Number(remaining) : 1;\n\t\t// Update the time when this rate limit resets (reset-after is in seconds)\n\t\tthis.reset = reset ? Number(reset) * 1_000 + Date.now() + this.manager.options.offset : Date.now();\n\n\t\t// Amount of time in milliseconds until we should retry if rate limited (globally or otherwise)\n\t\tif (retry) retryAfter = Number(retry) * 1_000 + this.manager.options.offset;\n\n\t\t// Handle buckets via the hash header retroactively\n\t\tif (hash && hash !== this.hash) {\n\t\t\t// Let library users know when rate limit buckets have been updated\n\t\t\tthis.debug(['Received bucket hash update', ` Old Hash : ${this.hash}`, ` New Hash : ${hash}`].join('\\n'));\n\t\t\t// This queue will eventually be eliminated via attrition\n\t\t\tthis.manager.hashes.set(`${method}:${routeId.bucketRoute}`, { value: hash, lastAccess: Date.now() });\n\t\t} else if (hash) {\n\t\t\t// Handle the case where hash value doesn't change\n\t\t\t// Fetch the hash data from the manager\n\t\t\tconst hashData = this.manager.hashes.get(`${method}:${routeId.bucketRoute}`);\n\n\t\t\t// When fetched, update the last access of the hash\n\t\t\tif (hashData) {\n\t\t\t\thashData.lastAccess = Date.now();\n\t\t\t}\n\t\t}\n\n\t\t// Handle retryAfter, which means we have actually hit a rate limit\n\t\tlet sublimitTimeout: number | null = null;\n\t\tif (retryAfter > 0) {\n\t\t\tif (res.headers.has('X-RateLimit-Global')) {\n\t\t\t\tthis.manager.globalRemaining = 0;\n\t\t\t\tthis.manager.globalReset = Date.now() + retryAfter;\n\t\t\t} else if (!this.localLimited) {\n\t\t\t\t/*\n\t\t\t\t * This is a sublimit (e.g. 2 channel name changes/10 minutes) since the headers don't indicate a\n\t\t\t\t * route-wide rate limit. Don't update remaining or reset to avoid rate limiting the whole\n\t\t\t\t * endpoint, just set a reset time on the request itself to avoid retrying too soon.\n\t\t\t\t */\n\t\t\t\tsublimitTimeout = retryAfter;\n\t\t\t}\n\t\t}\n\n\t\t// Count the invalid requests\n\t\tif (status === 401 || status === 403 || status === 429) {\n\t\t\tincrementInvalidCount(this.manager);\n\t\t}\n\n\t\tif (res.ok) {\n\t\t\treturn res;\n\t\t} else if (status === 429) {\n\t\t\t// A rate limit was hit - this may happen if the route isn't associated with an official bucket hash yet, or when first globally rate limited\n\t\t\tconst isGlobal = this.globalLimited;\n\t\t\tlet limit: number;\n\t\t\tlet timeout: number;\n\n\t\t\tif (isGlobal) {\n\t\t\t\t// Set RateLimitData based on the global limit\n\t\t\t\tlimit = this.manager.options.globalRequestsPerSecond;\n\t\t\t\ttimeout = this.manager.globalReset + this.manager.options.offset - Date.now();\n\t\t\t} else {\n\t\t\t\t// Set RateLimitData based on the route-specific limit\n\t\t\t\tlimit = this.limit;\n\t\t\t\ttimeout = this.timeToReset;\n\t\t\t}\n\n\t\t\tawait onRateLimit(this.manager, {\n\t\t\t\ttimeToReset: timeout,\n\t\t\t\tlimit,\n\t\t\t\tmethod,\n\t\t\t\thash: this.hash,\n\t\t\t\turl,\n\t\t\t\troute: routeId.bucketRoute,\n\t\t\t\tmajorParameter: this.majorParameter,\n\t\t\t\tglobal: isGlobal,\n\t\t\t});\n\t\t\tthis.debug(\n\t\t\t\t[\n\t\t\t\t\t'Encountered unexpected 429 rate limit',\n\t\t\t\t\t` Global : ${isGlobal.toString()}`,\n\t\t\t\t\t` Method : ${method}`,\n\t\t\t\t\t` URL : ${url}`,\n\t\t\t\t\t` Bucket : ${routeId.bucketRoute}`,\n\t\t\t\t\t` Major parameter: ${routeId.majorParameter}`,\n\t\t\t\t\t` Hash : ${this.hash}`,\n\t\t\t\t\t` Limit : ${limit}`,\n\t\t\t\t\t` Retry After : ${retryAfter}ms`,\n\t\t\t\t\t` Sublimit : ${sublimitTimeout ? `${sublimitTimeout}ms` : 'None'}`,\n\t\t\t\t].join('\\n'),\n\t\t\t);\n\t\t\t// If caused by a sublimit, wait it out here so other requests on the route can be handled\n\t\t\tif (sublimitTimeout) {\n\t\t\t\t// Normally the sublimit queue will not exist, however, if a sublimit is hit while in the sublimit queue, it will\n\t\t\t\tconst firstSublimit = !this.#sublimitedQueue;\n\t\t\t\tif (firstSublimit) {\n\t\t\t\t\tthis.#sublimitedQueue = new AsyncQueue();\n\t\t\t\t\tvoid this.#sublimitedQueue.wait();\n\t\t\t\t\tthis.#asyncQueue.shift();\n\t\t\t\t}\n\n\t\t\t\tthis.#sublimitPromise?.resolve();\n\t\t\t\tthis.#sublimitPromise = null;\n\t\t\t\tawait sleep(sublimitTimeout);\n\t\t\t\tlet resolve: () => void;\n\t\t\t\t// eslint-disable-next-line promise/param-names, no-promise-executor-return\n\t\t\t\tconst promise = new Promise<void>((res) => (resolve = res));\n\t\t\t\tthis.#sublimitPromise = { promise, resolve: resolve! };\n\t\t\t\tif (firstSublimit) {\n\t\t\t\t\t// Re-queue this request so it can be shifted by the finally\n\t\t\t\t\tawait this.#asyncQueue.wait();\n\t\t\t\t\tthis.#shiftSublimit = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Since this is not a server side issue, the next request should pass, so we don't bump the retries counter\n\t\t\treturn this.runRequest(routeId, url, options, requestData, retries);\n\t\t} else {\n\t\t\tconst handled = await handleErrors(this.manager, res, method, url, requestData, retries);\n\t\t\tif (handled === null) {\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\treturn this.runRequest(routeId, url, options, requestData, ++retries);\n\t\t\t}\n\n\t\t\treturn handled;\n\t\t}\n\t}\n}\n","export * from './lib/CDN.js';\nexport * from './lib/errors/DiscordAPIError.js';\nexport * from './lib/errors/HTTPError.js';\nexport * from './lib/errors/RateLimitError.js';\nexport * from './lib/REST.js';\nexport * from './lib/utils/constants.js';\nexport * from './lib/utils/types.js';\nexport { calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse } from './lib/utils/utils.js';\n\n/**\n * The {@link https://github.com/discordjs/discord.js/blob/main/packages/rest/#readme | @discordjs/rest} version\n * that you are currently using.\n */\n// This needs to explicitly be `string` so it is not typed as a \"const string\" that gets injected by esbuild\nexport const version = '2.0.1' as string;\n","import { setDefaultStrategy } from './environment.js';\n\nsetDefaultStrategy(fetch);\n\nexport * from './shared.js';\n"],"mappings":";;;;AAEA,IAAI;AAEG,SAAS,mBAAmB,aAAyC;AAC3E,oBAAkB;AACnB;AAFgB;AAIT,SAAS,qBAAqB;AACpC,SAAO;AACR;AAFgB;;;ACRhB,SAAS,4BAA4B;AACrC,SAAS,kBAAkB;AAIpB,IAAM,mBACZ;AAKM,IAAM,2BAA2B,qBAAqB;AAEtD,IAAM,qBAAqB;AAAA,EACjC,OAAO;AAAA,EACP,KAAK;AAAA,EACL,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,SAAS,CAAC;AAAA,EACV,+BAA+B;AAAA,EAC/B,yBAAyB;AAAA,EACzB,QAAQ;AAAA,EACR,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT,SAAS;AAAA,EACT,mBAAm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--git a/node_modules/@discordjs/rest/package.json b/node_modules/@discordjs/rest/package.json
new file mode 100644
index 0000000..00092f5
--- /dev/null
+++ b/node_modules/@discordjs/rest/package.json
@@ -0,0 +1,101 @@
+{
+ "name": "@discordjs/rest",
+ "version": "2.0.1",
+ "description": "The REST API for discord.js",
+ "scripts": {
+ "test": "vitest run",
+ "build": "tsup",
+ "build:docs": "tsc -p tsconfig.docs.json",
+ "lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --format=pretty",
+ "format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty",
+ "fmt": "yarn format",
+ "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json",
+ "prepack": "yarn lint && yarn test && yarn build",
+ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/rest/*'",
+ "release": "cliff-jumper"
+ },
+ "types": "./dist/index.d.ts",
+ "exports": {
+ ".": {
+ "node": {
+ "types": "./dist/index.d.ts",
+ "import": "./dist/index.mjs",
+ "require": "./dist/index.js"
+ },
+ "default": {
+ "types": "./dist/web.d.ts",
+ "import": "./dist/web.mjs",
+ "require": "./dist/web.js"
+ }
+ },
+ "./*": {
+ "types": "./dist/strategies/*.d.ts",
+ "import": "./dist/strategies/*.mjs",
+ "require": "./dist/strategies/*.js"
+ }
+ },
+ "directories": {
+ "lib": "src",
+ "test": "__tests__"
+ },
+ "files": [
+ "dist"
+ ],
+ "contributors": [
+ "Crawl <icrawltogo@gmail.com>",
+ "Amish Shah <amishshah.2k@gmail.com>",
+ "SpaceEEC <spaceeec@yahoo.com>",
+ "Vlad Frangu <kingdgrizzle@gmail.com>",
+ "Aura Román <kyradiscord@gmail.com>"
+ ],
+ "license": "Apache-2.0",
+ "keywords": [
+ "discord",
+ "api",
+ "rest",
+ "discordapp",
+ "discordjs"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/discordjs/discord.js.git",
+ "directory": "packages/rest"
+ },
+ "bugs": {
+ "url": "https://github.com/discordjs/discord.js/issues"
+ },
+ "homepage": "https://discord.js.org",
+ "dependencies": {
+ "@discordjs/collection": "^1.5.3",
+ "@discordjs/util": "^1.0.1",
+ "@sapphire/async-queue": "^1.5.0",
+ "@sapphire/snowflake": "^3.5.1",
+ "@vladfrangu/async_event_emitter": "^2.2.2",
+ "discord-api-types": "0.37.50",
+ "magic-bytes.js": "^1.0.15",
+ "tslib": "^2.6.1",
+ "undici": "5.22.1"
+ },
+ "devDependencies": {
+ "@favware/cliff-jumper": "^2.1.1",
+ "@microsoft/api-extractor": "^7.36.4",
+ "@types/node": "18.17.5",
+ "@vitest/coverage-v8": "^0.34.2",
+ "cross-env": "^7.0.3",
+ "esbuild-plugin-version-injector": "^1.2.0",
+ "eslint": "^8.47.0",
+ "eslint-config-neon": "^0.1.47",
+ "eslint-formatter-pretty": "^5.0.0",
+ "prettier": "^2.8.8",
+ "tsup": "^7.2.0",
+ "turbo": "^1.10.12",
+ "typescript": "^5.1.6",
+ "vitest": "^0.34.2"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ },
+ "publishConfig": {
+ "access": "public"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@discordjs/util/CHANGELOG.md b/node_modules/@discordjs/util/CHANGELOG.md
new file mode 100644
index 0000000..93756ea
--- /dev/null
+++ b/node_modules/@discordjs/util/CHANGELOG.md
@@ -0,0 +1,137 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+# [@discordjs/util@1.0.1](https://github.com/discordjs/discord.js/compare/@discordjs/util@1.0.0...@discordjs/util@1.0.1) - (2023-08-17)
+
+## Documentation
+
+- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6))
+
+# [@discordjs/util@1.0.0](https://github.com/discordjs/discord.js/compare/@discordjs/util@0.3.1...@discordjs/util@1.0.0) - (2023-07-31)
+
+## Features
+
+- No-de-no-de, now with extra buns (#9683) ([386f206](https://github.com/discordjs/discord.js/commit/386f206caf74a04c426799af9796ca96dcb37056))
+ - **BREAKING CHANGE:** The REST and RequestManager classes now extend AsyncEventEmitter
+from `@vladfrangu/async_event_emitter`, which aids in cross-compatibility
+between Node, Deno, Bun, CF Workers, Vercel Functions, etc.
+ - **BREAKING CHANGE:** DefaultUserAgentAppendix has been adapted to support multiple
+different platforms (previously mentioned Deno, Bun, CF Workers, etc)
+ - **BREAKING CHANGE:** the entry point for `@discordjs/rest` will now differ
+in non-node-like environments (CF Workers, etc.)
+ - **Co-authored-by:** Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
+ - **Co-authored-by:** Jiralite <33201955+Jiralite@users.noreply.github.com>
+ - **Co-authored-by:** suneettipirneni <suneettipirneni@icloud.com>
+
+# [@discordjs/util@0.3.1](https://github.com/discordjs/discord.js/compare/@discordjs/util@0.3.0...@discordjs/util@0.3.1) - (2023-05-01)
+
+## Refactor
+
+- **ShardClientUtil:** Logic de-duplication (#9491) ([a9f2bff](https://github.com/discordjs/discord.js/commit/a9f2bff82a18c6a3afdee99e5830e1d7b4da65dc))
+
+# [@discordjs/util@0.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/util@0.2.0...@discordjs/util@0.3.0) - (2023-05-01)
+
+## Bug Fixes
+
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b))
+
+## Documentation
+
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+
+## Features
+
+- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b))
+
+# [@discordjs/util@1.0.0](https://github.com/discordjs/discord.js/compare/@discordjs/util@0.3.1...@discordjs/util@1.0.0) - (2023-07-31)
+
+## Features
+
+- No-de-no-de, now with extra buns (#9683) ([386f206](https://github.com/discordjs/discord.js/commit/386f206caf74a04c426799af9796ca96dcb37056))
+ - **BREAKING CHANGE:** The REST and RequestManager classes now extend AsyncEventEmitter
+from `@vladfrangu/async_event_emitter`, which aids in cross-compatibility
+between Node, Deno, Bun, CF Workers, Vercel Functions, etc.
+ - **BREAKING CHANGE:** DefaultUserAgentAppendix has been adapted to support multiple
+different platforms (previously mentioned Deno, Bun, CF Workers, etc)
+ - **BREAKING CHANGE:** the entry point for `@discordjs/rest` will now differ
+in non-node-like environments (CF Workers, etc.)
+ - **Co-authored-by:** Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
+ - **Co-authored-by:** Jiralite <33201955+Jiralite@users.noreply.github.com>
+ - **Co-authored-by:** suneettipirneni <suneettipirneni@icloud.com>
+
+# [@discordjs/util@0.3.1](https://github.com/discordjs/discord.js/compare/@discordjs/util@0.3.0...@discordjs/util@0.3.1) - (2023-05-01)
+
+## Refactor
+
+- **ShardClientUtil:** Logic de-duplication (#9491) ([a9f2bff](https://github.com/discordjs/discord.js/commit/a9f2bff82a18c6a3afdee99e5830e1d7b4da65dc))
+
+# [@discordjs/util@0.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/util@0.2.0...@discordjs/util@0.3.0) - (2023-05-01)
+
+## Bug Fixes
+
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b))
+
+## Documentation
+
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+
+## Features
+
+- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b))
+
+# [@discordjs/util@0.3.1](https://github.com/discordjs/discord.js/compare/@discordjs/util@0.3.0...@discordjs/util@0.3.1) - (2023-05-01)
+
+## Refactor
+
+- **ShardClientUtil:** Logic de-duplication (#9491) ([a9f2bff](https://github.com/discordjs/discord.js/commit/a9f2bff82a18c6a3afdee99e5830e1d7b4da65dc))
+
+# [@discordjs/util@0.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/util@0.2.0...@discordjs/util@0.3.0) - (2023-05-01)
+
+## Bug Fixes
+
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b))
+
+## Documentation
+
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+
+## Features
+
+- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b))
+
+# [@discordjs/util@0.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/util@0.2.0...@discordjs/util@0.3.0) - (2023-05-01)
+
+## Bug Fixes
+
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b))
+
+## Documentation
+
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+
+## Features
+
+- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b))
+
+# [@discordjs/util@0.2.0](https://github.com/discordjs/discord.js/compare/@discordjs/util@0.1.0...@discordjs/util@0.2.0) - (2023-03-12)
+
+## Bug Fixes
+
+- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4))
+
+## Features
+
+- **website:** Add support for source file links (#9048) ([f6506e9](https://github.com/discordjs/discord.js/commit/f6506e99c496683ee0ab67db0726b105b929af38))
+- **core:** Implement some ws send events (#8941) ([816aed4](https://github.com/discordjs/discord.js/commit/816aed478e3035060697092d52ad2b58106be0ee))
+- Web-components (#8715) ([0ac3e76](https://github.com/discordjs/discord.js/commit/0ac3e766bd9dbdeb106483fa4bb085d74de346a2))
+
+# [@discordjs/util@0.1.0](https://github.com/discordjs/discord.js/tree/@discordjs/util@0.1.0) - (2022-10-03)
+
+## Features
+
+- Add `@discordjs/util` (#8591) ([b2ec865](https://github.com/discordjs/discord.js/commit/b2ec865765bf94181473864a627fb63ea8173fd3))
diff --git a/node_modules/@discordjs/util/LICENSE b/node_modules/@discordjs/util/LICENSE
new file mode 100644
index 0000000..e2822e9
--- /dev/null
+++ b/node_modules/@discordjs/util/LICENSE
@@ -0,0 +1,190 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright 2022 Noel Buechler
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/node_modules/@discordjs/util/README.md b/node_modules/@discordjs/util/README.md
new file mode 100644
index 0000000..999ae89
--- /dev/null
+++ b/node_modules/@discordjs/util/README.md
@@ -0,0 +1,64 @@
+<div align="center">
+ <br />
+ <p>
+ <a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
+ </p>
+ <br />
+ <p>
+ <a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
+ <a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Build status" /></a>
+ </p>
+ <p>
+ <a href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-vercel.svg" alt="Vercel" /></a>
+ <a href="https://www.cloudflare.com"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-workers.png" alt="Cloudflare Workers" height="44" /></a>
+ </p>
+</div>
+
+## About
+
+`@discordjs/util` is a collection of utility functions for use with discord.js.
+
+## Installation
+
+**Node.js 16.11.0 or newer is required.**
+
+```sh
+npm install @discordjs/util
+yarn add @discordjs/util
+pnpm add @discordjs/util
+```
+
+## Links
+
+- [Website][website] ([source][website-source])
+- [Documentation][documentation]
+- [Guide][guide] ([source][guide-source])
+ Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library.
+- [discord.js Discord server][discord]
+- [Discord API Discord server][discord-api]
+- [GitHub][source]
+- [npm][npm]
+- [Related libraries][related-libs]
+
+## Contributing
+
+Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
+[documentation][documentation].
+See [the contribution guide][contributing] if you'd like to submit a PR.
+
+## Help
+
+If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord].
+
+[website]: https://discord.js.org
+[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
+[documentation]: https://discord.js.org/docs/packages/util/stable
+[guide]: https://discordjs.guide/
+[guide-source]: https://github.com/discordjs/guide
+[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
+[discord]: https://discord.gg/djs
+[discord-api]: https://discord.gg/discord-api
+[source]: https://github.com/discordjs/discord.js/tree/main/packages/util
+[npm]: https://www.npmjs.com/package/@discordjs/util
+[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries
+[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md
diff --git a/node_modules/@discordjs/util/dist/index.d.mts b/node_modules/@discordjs/util/dist/index.d.mts
new file mode 100644
index 0000000..cef642f
--- /dev/null
+++ b/node_modules/@discordjs/util/dist/index.d.mts
@@ -0,0 +1,117 @@
+/**
+ * Represents a type that may or may not be a promise
+ */
+type Awaitable<T> = PromiseLike<T> | T;
+
+/**
+ * Lazy is a wrapper around a value that is computed lazily. It is useful for
+ * cases where the value is expensive to compute and the computation may not
+ * be needed at all.
+ *
+ * @param cb - The callback to lazily evaluate
+ * @typeParam T - The type of the value
+ * @example
+ * ```ts
+ * const value = lazy(() => computeExpensiveValue());
+ * ```
+ */
+declare function lazy<T>(cb: () => T): () => T;
+
+/**
+ * Options for creating a range
+ */
+interface RangeOptions {
+ /**
+ * The end of the range (exclusive)
+ */
+ end: number;
+ /**
+ * The start of the range (inclusive)
+ */
+ start: number;
+ /**
+ * The amount to increment by
+ *
+ * @defaultValue `1`
+ */
+ step?: number;
+}
+/**
+ * A generator to yield numbers in a given range
+ *
+ * @remarks
+ * This method is end-exclusive, for example the last number yielded by `range(5)` is 4. If you
+ * prefer for the end to be included add 1 to the range or `end` option.
+ * @param range - A number representing the the range to yield (exclusive) or an object with start, end and step
+ * @example
+ * Basic range
+ * ```ts
+ * for (const number of range(5)) {
+ * console.log(number);
+ * }
+ * // Prints 0, 1, 2, 3, 4
+ * ```
+ * @example
+ * Range with a step
+ * ```ts
+ * for (const number of range({ start: 3, end: 10, step: 2 })) {
+ * console.log(number);
+ * }
+ * // Prints 3, 5, 7, 9
+ * ```
+ */
+declare function range(range: RangeOptions | number): Generator<number, void, unknown>;
+
+/**
+ * Calculates the shard id for a given guild id.
+ *
+ * @param guildId - The guild id to calculate the shard id for
+ * @param shardCount - The total number of shards
+ */
+declare function calculateShardId(guildId: string, shardCount: number): number;
+
+declare function shouldUseGlobalFetchAndWebSocket(): boolean;
+
+/**
+ * Resolves the user agent appendix string for the current environment.
+ */
+declare function getUserAgentAppendix(): string;
+
+/**
+ * Represents an object capable of representing itself as a JSON object
+ *
+ * @typeParam T - The JSON type corresponding to {@link JSONEncodable.toJSON} outputs.
+ */
+interface JSONEncodable<T> {
+ /**
+ * Transforms this object to its JSON format
+ */
+ toJSON(): T;
+}
+/**
+ * Indicates if an object is encodable or not.
+ *
+ * @param maybeEncodable - The object to check against
+ */
+declare function isJSONEncodable(maybeEncodable: unknown): maybeEncodable is JSONEncodable<unknown>;
+
+/**
+ * Represents a structure that can be checked against another
+ * given structure for equality
+ *
+ * @typeParam T - The type of object to compare the current object to
+ */
+interface Equatable<T> {
+ /**
+ * Whether or not this is equal to another structure
+ */
+ equals(other: T): boolean;
+}
+/**
+ * Indicates if an object is equatable or not.
+ *
+ * @param maybeEquatable - The object to check against
+ */
+declare function isEquatable(maybeEquatable: unknown): maybeEquatable is Equatable<unknown>;
+
+export { Awaitable, Equatable, JSONEncodable, RangeOptions, calculateShardId, getUserAgentAppendix, isEquatable, isJSONEncodable, lazy, range, shouldUseGlobalFetchAndWebSocket };
diff --git a/node_modules/@discordjs/util/dist/index.d.ts b/node_modules/@discordjs/util/dist/index.d.ts
new file mode 100644
index 0000000..cef642f
--- /dev/null
+++ b/node_modules/@discordjs/util/dist/index.d.ts
@@ -0,0 +1,117 @@
+/**
+ * Represents a type that may or may not be a promise
+ */
+type Awaitable<T> = PromiseLike<T> | T;
+
+/**
+ * Lazy is a wrapper around a value that is computed lazily. It is useful for
+ * cases where the value is expensive to compute and the computation may not
+ * be needed at all.
+ *
+ * @param cb - The callback to lazily evaluate
+ * @typeParam T - The type of the value
+ * @example
+ * ```ts
+ * const value = lazy(() => computeExpensiveValue());
+ * ```
+ */
+declare function lazy<T>(cb: () => T): () => T;
+
+/**
+ * Options for creating a range
+ */
+interface RangeOptions {
+ /**
+ * The end of the range (exclusive)
+ */
+ end: number;
+ /**
+ * The start of the range (inclusive)
+ */
+ start: number;
+ /**
+ * The amount to increment by
+ *
+ * @defaultValue `1`
+ */
+ step?: number;
+}
+/**
+ * A generator to yield numbers in a given range
+ *
+ * @remarks
+ * This method is end-exclusive, for example the last number yielded by `range(5)` is 4. If you
+ * prefer for the end to be included add 1 to the range or `end` option.
+ * @param range - A number representing the the range to yield (exclusive) or an object with start, end and step
+ * @example
+ * Basic range
+ * ```ts
+ * for (const number of range(5)) {
+ * console.log(number);
+ * }
+ * // Prints 0, 1, 2, 3, 4
+ * ```
+ * @example
+ * Range with a step
+ * ```ts
+ * for (const number of range({ start: 3, end: 10, step: 2 })) {
+ * console.log(number);
+ * }
+ * // Prints 3, 5, 7, 9
+ * ```
+ */
+declare function range(range: RangeOptions | number): Generator<number, void, unknown>;
+
+/**
+ * Calculates the shard id for a given guild id.
+ *
+ * @param guildId - The guild id to calculate the shard id for
+ * @param shardCount - The total number of shards
+ */
+declare function calculateShardId(guildId: string, shardCount: number): number;
+
+declare function shouldUseGlobalFetchAndWebSocket(): boolean;
+
+/**
+ * Resolves the user agent appendix string for the current environment.
+ */
+declare function getUserAgentAppendix(): string;
+
+/**
+ * Represents an object capable of representing itself as a JSON object
+ *
+ * @typeParam T - The JSON type corresponding to {@link JSONEncodable.toJSON} outputs.
+ */
+interface JSONEncodable<T> {
+ /**
+ * Transforms this object to its JSON format
+ */
+ toJSON(): T;
+}
+/**
+ * Indicates if an object is encodable or not.
+ *
+ * @param maybeEncodable - The object to check against
+ */
+declare function isJSONEncodable(maybeEncodable: unknown): maybeEncodable is JSONEncodable<unknown>;
+
+/**
+ * Represents a structure that can be checked against another
+ * given structure for equality
+ *
+ * @typeParam T - The type of object to compare the current object to
+ */
+interface Equatable<T> {
+ /**
+ * Whether or not this is equal to another structure
+ */
+ equals(other: T): boolean;
+}
+/**
+ * Indicates if an object is equatable or not.
+ *
+ * @param maybeEquatable - The object to check against
+ */
+declare function isEquatable(maybeEquatable: unknown): maybeEquatable is Equatable<unknown>;
+
+export { Awaitable, Equatable, JSONEncodable, RangeOptions, calculateShardId, getUserAgentAppendix, isEquatable, isJSONEncodable, lazy, range, shouldUseGlobalFetchAndWebSocket };
diff --git a/node_modules/@discordjs/util/dist/index.js b/node_modules/@discordjs/util/dist/index.js
new file mode 100644
index 0000000..ce50bf1
--- /dev/null
+++ b/node_modules/@discordjs/util/dist/index.js
@@ -0,0 +1,130 @@
+"use strict";
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/index.ts
+var src_exports = {};
+__export(src_exports, {
+ calculateShardId: () => calculateShardId,
+ getUserAgentAppendix: () => getUserAgentAppendix,
+ isEquatable: () => isEquatable,
+ isJSONEncodable: () => isJSONEncodable,
+ lazy: () => lazy,
+ range: () => range,
+ shouldUseGlobalFetchAndWebSocket: () => shouldUseGlobalFetchAndWebSocket
+});
+module.exports = __toCommonJS(src_exports);
+
+// src/functions/lazy.ts
+function lazy(cb) {
+ let defaultValue;
+ return () => defaultValue ??= cb();
+}
+__name(lazy, "lazy");
+
+// src/functions/range.ts
+function* range(range2) {
+ let rangeEnd;
+ let start = 0;
+ let step = 1;
+ if (typeof range2 === "number") {
+ rangeEnd = range2;
+ } else {
+ start = range2.start;
+ rangeEnd = range2.end;
+ step = range2.step ?? 1;
+ }
+ for (let index = start; index < rangeEnd; index += step) {
+ yield index;
+ }
+}
+__name(range, "range");
+
+// src/functions/calculateShardId.ts
+function calculateShardId(guildId, shardCount) {
+ return Number(BigInt(guildId) >> 22n) % shardCount;
+}
+__name(calculateShardId, "calculateShardId");
+
+// src/functions/runtime.ts
+function shouldUseGlobalFetchAndWebSocket() {
+ if (typeof globalThis.process === "undefined") {
+ return "fetch" in globalThis && "WebSocket" in globalThis;
+ }
+ if ("versions" in globalThis.process) {
+ return "deno" in globalThis.process.versions || "bun" in globalThis.process.versions;
+ }
+ return false;
+}
+__name(shouldUseGlobalFetchAndWebSocket, "shouldUseGlobalFetchAndWebSocket");
+
+// src/functions/userAgentAppendix.ts
+function getUserAgentAppendix() {
+ if (typeof globalThis.EdgeRuntime !== "undefined") {
+ return "Vercel-Edge-Functions";
+ }
+ if (typeof globalThis.R2 !== "undefined" && typeof globalThis.WebSocketPair !== "undefined") {
+ return "Cloudflare-Workers";
+ }
+ if (typeof globalThis.Netlify !== "undefined") {
+ return "Netlify-Edge-Functions";
+ }
+ if (typeof globalThis.process !== "object") {
+ if (typeof globalThis.navigator === "object") {
+ return globalThis.navigator.userAgent;
+ }
+ return "UnknownEnvironment";
+ }
+ if ("versions" in globalThis.process) {
+ if ("deno" in globalThis.process.versions) {
+ return `Deno/${globalThis.process.versions.deno}`;
+ }
+ if ("bun" in globalThis.process.versions) {
+ return `Bun/${globalThis.process.versions.bun}`;
+ }
+ if ("node" in globalThis.process.versions) {
+ return `Node.js/${globalThis.process.versions.node}`;
+ }
+ }
+ return "UnknownEnvironment";
+}
+__name(getUserAgentAppendix, "getUserAgentAppendix");
+
+// src/JSONEncodable.ts
+function isJSONEncodable(maybeEncodable) {
+ return maybeEncodable !== null && typeof maybeEncodable === "object" && "toJSON" in maybeEncodable;
+}
+__name(isJSONEncodable, "isJSONEncodable");
+
+// src/Equatable.ts
+function isEquatable(maybeEquatable) {
+ return maybeEquatable !== null && typeof maybeEquatable === "object" && "equals" in maybeEquatable;
+}
+__name(isEquatable, "isEquatable");
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ calculateShardId,
+ getUserAgentAppendix,
+ isEquatable,
+ isJSONEncodable,
+ lazy,
+ range,
+ shouldUseGlobalFetchAndWebSocket
+});
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/@discordjs/util/dist/index.js.map b/node_modules/@discordjs/util/dist/index.js.map
new file mode 100644
index 0000000..14f7b9f
--- /dev/null
+++ b/node_modules/@discordjs/util/dist/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/index.ts","../src/functions/lazy.ts","../src/functions/range.ts","../src/functions/calculateShardId.ts","../src/functions/runtime.ts","../src/functions/userAgentAppendix.ts","../src/JSONEncodable.ts","../src/Equatable.ts"],"sourcesContent":["export * from './types.js';\nexport * from './functions/index.js';\nexport * from './JSONEncodable.js';\nexport * from './Equatable.js';\n","/**\n * Lazy is a wrapper around a value that is computed lazily. It is useful for\n * cases where the value is expensive to compute and the computation may not\n * be needed at all.\n *\n * @param cb - The callback to lazily evaluate\n * @typeParam T - The type of the value\n * @example\n * ```ts\n * const value = lazy(() => computeExpensiveValue());\n * ```\n */\n// eslint-disable-next-line promise/prefer-await-to-callbacks\nexport function lazy<T>(cb: () => T): () => T {\n\tlet defaultValue: T;\n\t// eslint-disable-next-line promise/prefer-await-to-callbacks\n\treturn () => (defaultValue ??= cb());\n}\n","/**\n * Options for creating a range\n */\nexport interface RangeOptions {\n\t/**\n\t * The end of the range (exclusive)\n\t */\n\tend: number;\n\t/**\n\t * The start of the range (inclusive)\n\t */\n\tstart: number;\n\t/**\n\t * The amount to increment by\n\t *\n\t * @defaultValue `1`\n\t */\n\tstep?: number;\n}\n\n/**\n * A generator to yield numbers in a given range\n *\n * @remarks\n * This method is end-exclusive, for example the last number yielded by `range(5)` is 4. If you\n * prefer for the end to be included add 1 to the range or `end` option.\n * @param range - A number representing the the range to yield (exclusive) or an object with start, end and step\n * @example\n * Basic range\n * ```ts\n * for (const number of range(5)) {\n * console.log(number);\n * }\n * // Prints 0, 1, 2, 3, 4\n * ```\n * @example\n * Range with a step\n * ```ts\n * for (const number of range({ start: 3, end: 10, step: 2 })) {\n * \tconsole.log(number);\n * }\n * // Prints 3, 5, 7, 9\n * ```\n */\nexport function* range(range: RangeOptions | number) {\n\tlet rangeEnd: number;\n\tlet start = 0;\n\tlet step = 1;\n\n\tif (typeof range === 'number') {\n\t\trangeEnd = range;\n\t} else {\n\t\tstart = range.start;\n\t\trangeEnd = range.end;\n\t\tstep = range.step ?? 1;\n\t}\n\n\tfor (let index = start; index < rangeEnd; index += step) {\n\t\tyield index;\n\t}\n}\n","/**\n * Calculates the shard id for a given guild id.\n *\n * @param guildId - The guild id to calculate the shard id for\n * @param shardCount - The total number of shards\n */\nexport function calculateShardId(guildId: string, shardCount: number) {\n\treturn Number(BigInt(guildId) >> 22n) % shardCount;\n}\n","export function shouldUseGlobalFetchAndWebSocket() {\n\t// Browser env and deno when ran directly\n\tif (typeof globalThis.process === 'undefined') {\n\t\treturn 'fetch' in globalThis && 'WebSocket' in globalThis;\n\t}\n\n\tif ('versions' in globalThis.process) {\n\t\treturn 'deno' in globalThis.process.versions || 'bun' in globalThis.process.versions;\n\t}\n\n\treturn false;\n}\n","/* eslint-disable n/prefer-global/process */\n/* eslint-disable no-restricted-globals */\n\n/**\n * Resolves the user agent appendix string for the current environment.\n */\nexport function getUserAgentAppendix(): string {\n\t// https://vercel.com/docs/concepts/functions/edge-functions/edge-runtime#check-if-you're-running-on-the-edge-runtime\n\t// @ts-expect-error Vercel Edge functions\n\tif (typeof globalThis.EdgeRuntime !== 'undefined') {\n\t\treturn 'Vercel-Edge-Functions';\n\t}\n\n\t// @ts-expect-error Cloudflare Workers\n\tif (typeof globalThis.R2 !== 'undefined' && typeof globalThis.WebSocketPair !== 'undefined') {\n\t\t// https://developers.cloudflare.com/workers/runtime-apis/web-standards/#navigatoruseragent\n\t\treturn 'Cloudflare-Workers';\n\t}\n\n\t// https://docs.netlify.com/edge-functions/api/#netlify-global-object\n\t// @ts-expect-error Netlify Edge functions\n\tif (typeof globalThis.Netlify !== 'undefined') {\n\t\treturn 'Netlify-Edge-Functions';\n\t}\n\n\t// Most (if not all) edge environments will have `process` defined. Within a web browser we'll extract it using `navigator.userAgent`.\n\tif (typeof globalThis.process !== 'object') {\n\t\t// @ts-expect-error web env\n\t\tif (typeof globalThis.navigator === 'object') {\n\t\t\t// @ts-expect-error web env\n\t\t\treturn globalThis.navigator.userAgent;\n\t\t}\n\n\t\treturn 'UnknownEnvironment';\n\t}\n\n\tif ('versions' in globalThis.process) {\n\t\tif ('deno' in globalThis.process.versions) {\n\t\t\treturn `Deno/${globalThis.process.versions.deno}`;\n\t\t}\n\n\t\tif ('bun' in globalThis.process.versions) {\n\t\t\treturn `Bun/${globalThis.process.versions.bun}`;\n\t\t}\n\n\t\tif ('node' in globalThis.process.versions) {\n\t\t\treturn `Node.js/${globalThis.process.versions.node}`;\n\t\t}\n\t}\n\n\treturn 'UnknownEnvironment';\n}\n","/**\n * Represents an object capable of representing itself as a JSON object\n *\n * @typeParam T - The JSON type corresponding to {@link JSONEncodable.toJSON} outputs.\n */\nexport interface JSONEncodable<T> {\n\t/**\n\t * Transforms this object to its JSON format\n\t */\n\ttoJSON(): T;\n}\n\n/**\n * Indicates if an object is encodable or not.\n *\n * @param maybeEncodable - The object to check against\n */\nexport function isJSONEncodable(maybeEncodable: unknown): maybeEncodable is JSONEncodable<unknown> {\n\treturn maybeEncodable !== null && typeof maybeEncodable === 'object' && 'toJSON' in maybeEncodable;\n}\n","/**\n * Represents a structure that can be checked against another\n * given structure for equality\n *\n * @typeParam T - The type of object to compare the current object to\n */\nexport interface Equatable<T> {\n\t/**\n\t * Whether or not this is equal to another structure\n\t */\n\tequals(other: T): boolean;\n}\n\n/**\n * Indicates if an object is equatable or not.\n *\n * @param maybeEquatable - The object to check against\n */\nexport function isEquatable(maybeEquatable: unknown): maybeEquatable is Equatable<unknown> {\n\treturn maybeEquatable !== null && typeof maybeEquatable === 'object' && 'equals' in maybeEquatable;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACaO,SAAS,KAAQ,IAAsB;AAC7C,MAAI;AAEJ,SAAO,MAAO,iBAAiB,GAAG;AACnC;AAJgB;;;AC+BT,UAAU,MAAMA,QAA8B;AACpD,MAAI;AACJ,MAAI,QAAQ;AACZ,MAAI,OAAO;AAEX,MAAI,OAAOA,WAAU,UAAU;AAC9B,eAAWA;AAAA,EACZ,OAAO;AACN,YAAQA,OAAM;AACd,eAAWA,OAAM;AACjB,WAAOA,OAAM,QAAQ;AAAA,EACtB;AAEA,WAAS,QAAQ,OAAO,QAAQ,UAAU,SAAS,MAAM;AACxD,UAAM;AAAA,EACP;AACD;AAhBiB;;;ACtCV,SAAS,iBAAiB,SAAiB,YAAoB;AACrE,SAAO,OAAO,OAAO,OAAO,KAAK,GAAG,IAAI;AACzC;AAFgB;;;ACNT,SAAS,mCAAmC;AAElD,MAAI,OAAO,WAAW,YAAY,aAAa;AAC9C,WAAO,WAAW,cAAc,eAAe;AAAA,EAChD;AAEA,MAAI,cAAc,WAAW,SAAS;AACrC,WAAO,UAAU,WAAW,QAAQ,YAAY,SAAS,WAAW,QAAQ;AAAA,EAC7E;AAEA,SAAO;AACR;AAXgB;;;ACMT,SAAS,uBAA+B;AAG9C,MAAI,OAAO,WAAW,gBAAgB,aAAa;AAClD,WAAO;AAAA,EACR;AAGA,MAAI,OAAO,WAAW,OAAO,eAAe,OAAO,WAAW,kBAAkB,aAAa;AAE5F,WAAO;AAAA,EACR;AAIA,MAAI,OAAO,WAAW,YAAY,aAAa;AAC9C,WAAO;AAAA,EACR;AAGA,MAAI,OAAO,WAAW,YAAY,UAAU;AAE3C,QAAI,OAAO,WAAW,cAAc,UAAU;AAE7C,aAAO,WAAW,UAAU;AAAA,IAC7B;AAEA,WAAO;AAAA,EACR;AAEA,MAAI,cAAc,WAAW,SAAS;AACrC,QAAI,UAAU,WAAW,QAAQ,UAAU;AAC1C,aAAO,QAAQ,WAAW,QAAQ,SAAS,IAAI;AAAA,IAChD;AAEA,QAAI,SAAS,WAAW,QAAQ,UAAU;AACzC,aAAO,OAAO,WAAW,QAAQ,SAAS,GAAG;AAAA,IAC9C;AAEA,QAAI,UAAU,WAAW,QAAQ,UAAU;AAC1C,aAAO,WAAW,WAAW,QAAQ,SAAS,IAAI;AAAA,IACnD;AAAA,EACD;AAEA,SAAO;AACR;AA7CgB;;;ACWT,SAAS,gBAAgB,gBAAmE;AAClG,SAAO,mBAAmB,QAAQ,OAAO,mBAAmB,YAAY,YAAY;AACrF;AAFgB;;;ACCT,SAAS,YAAY,gBAA+D;AAC1F,SAAO,mBAAmB,QAAQ,OAAO,mBAAmB,YAAY,YAAY;AACrF;AAFgB;","names":["range"]} \ No newline at end of file
diff --git a/node_modules/@discordjs/util/dist/index.mjs b/node_modules/@discordjs/util/dist/index.mjs
new file mode 100644
index 0000000..6030649
--- /dev/null
+++ b/node_modules/@discordjs/util/dist/index.mjs
@@ -0,0 +1,99 @@
+var __defProp = Object.defineProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+
+// src/functions/lazy.ts
+function lazy(cb) {
+ let defaultValue;
+ return () => defaultValue ??= cb();
+}
+__name(lazy, "lazy");
+
+// src/functions/range.ts
+function* range(range2) {
+ let rangeEnd;
+ let start = 0;
+ let step = 1;
+ if (typeof range2 === "number") {
+ rangeEnd = range2;
+ } else {
+ start = range2.start;
+ rangeEnd = range2.end;
+ step = range2.step ?? 1;
+ }
+ for (let index = start; index < rangeEnd; index += step) {
+ yield index;
+ }
+}
+__name(range, "range");
+
+// src/functions/calculateShardId.ts
+function calculateShardId(guildId, shardCount) {
+ return Number(BigInt(guildId) >> 22n) % shardCount;
+}
+__name(calculateShardId, "calculateShardId");
+
+// src/functions/runtime.ts
+function shouldUseGlobalFetchAndWebSocket() {
+ if (typeof globalThis.process === "undefined") {
+ return "fetch" in globalThis && "WebSocket" in globalThis;
+ }
+ if ("versions" in globalThis.process) {
+ return "deno" in globalThis.process.versions || "bun" in globalThis.process.versions;
+ }
+ return false;
+}
+__name(shouldUseGlobalFetchAndWebSocket, "shouldUseGlobalFetchAndWebSocket");
+
+// src/functions/userAgentAppendix.ts
+function getUserAgentAppendix() {
+ if (typeof globalThis.EdgeRuntime !== "undefined") {
+ return "Vercel-Edge-Functions";
+ }
+ if (typeof globalThis.R2 !== "undefined" && typeof globalThis.WebSocketPair !== "undefined") {
+ return "Cloudflare-Workers";
+ }
+ if (typeof globalThis.Netlify !== "undefined") {
+ return "Netlify-Edge-Functions";
+ }
+ if (typeof globalThis.process !== "object") {
+ if (typeof globalThis.navigator === "object") {
+ return globalThis.navigator.userAgent;
+ }
+ return "UnknownEnvironment";
+ }
+ if ("versions" in globalThis.process) {
+ if ("deno" in globalThis.process.versions) {
+ return `Deno/${globalThis.process.versions.deno}`;
+ }
+ if ("bun" in globalThis.process.versions) {
+ return `Bun/${globalThis.process.versions.bun}`;
+ }
+ if ("node" in globalThis.process.versions) {
+ return `Node.js/${globalThis.process.versions.node}`;
+ }
+ }
+ return "UnknownEnvironment";
+}
+__name(getUserAgentAppendix, "getUserAgentAppendix");
+
+// src/JSONEncodable.ts
+function isJSONEncodable(maybeEncodable) {
+ return maybeEncodable !== null && typeof maybeEncodable === "object" && "toJSON" in maybeEncodable;
+}
+__name(isJSONEncodable, "isJSONEncodable");
+
+// src/Equatable.ts
+function isEquatable(maybeEquatable) {
+ return maybeEquatable !== null && typeof maybeEquatable === "object" && "equals" in maybeEquatable;
+}
+__name(isEquatable, "isEquatable");
+export {
+ calculateShardId,
+ getUserAgentAppendix,
+ isEquatable,
+ isJSONEncodable,
+ lazy,
+ range,
+ shouldUseGlobalFetchAndWebSocket
+};
+//# sourceMappingURL=index.mjs.map \ No newline at end of file
diff --git a/node_modules/@discordjs/util/dist/index.mjs.map b/node_modules/@discordjs/util/dist/index.mjs.map
new file mode 100644
index 0000000..482f14f
--- /dev/null
+++ b/node_modules/@discordjs/util/dist/index.mjs.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/functions/lazy.ts","../src/functions/range.ts","../src/functions/calculateShardId.ts","../src/functions/runtime.ts","../src/functions/userAgentAppendix.ts","../src/JSONEncodable.ts","../src/Equatable.ts"],"sourcesContent":["/**\n * Lazy is a wrapper around a value that is computed lazily. It is useful for\n * cases where the value is expensive to compute and the computation may not\n * be needed at all.\n *\n * @param cb - The callback to lazily evaluate\n * @typeParam T - The type of the value\n * @example\n * ```ts\n * const value = lazy(() => computeExpensiveValue());\n * ```\n */\n// eslint-disable-next-line promise/prefer-await-to-callbacks\nexport function lazy<T>(cb: () => T): () => T {\n\tlet defaultValue: T;\n\t// eslint-disable-next-line promise/prefer-await-to-callbacks\n\treturn () => (defaultValue ??= cb());\n}\n","/**\n * Options for creating a range\n */\nexport interface RangeOptions {\n\t/**\n\t * The end of the range (exclusive)\n\t */\n\tend: number;\n\t/**\n\t * The start of the range (inclusive)\n\t */\n\tstart: number;\n\t/**\n\t * The amount to increment by\n\t *\n\t * @defaultValue `1`\n\t */\n\tstep?: number;\n}\n\n/**\n * A generator to yield numbers in a given range\n *\n * @remarks\n * This method is end-exclusive, for example the last number yielded by `range(5)` is 4. If you\n * prefer for the end to be included add 1 to the range or `end` option.\n * @param range - A number representing the the range to yield (exclusive) or an object with start, end and step\n * @example\n * Basic range\n * ```ts\n * for (const number of range(5)) {\n * console.log(number);\n * }\n * // Prints 0, 1, 2, 3, 4\n * ```\n * @example\n * Range with a step\n * ```ts\n * for (const number of range({ start: 3, end: 10, step: 2 })) {\n * \tconsole.log(number);\n * }\n * // Prints 3, 5, 7, 9\n * ```\n */\nexport function* range(range: RangeOptions | number) {\n\tlet rangeEnd: number;\n\tlet start = 0;\n\tlet step = 1;\n\n\tif (typeof range === 'number') {\n\t\trangeEnd = range;\n\t} else {\n\t\tstart = range.start;\n\t\trangeEnd = range.end;\n\t\tstep = range.step ?? 1;\n\t}\n\n\tfor (let index = start; index < rangeEnd; index += step) {\n\t\tyield index;\n\t}\n}\n","/**\n * Calculates the shard id for a given guild id.\n *\n * @param guildId - The guild id to calculate the shard id for\n * @param shardCount - The total number of shards\n */\nexport function calculateShardId(guildId: string, shardCount: number) {\n\treturn Number(BigInt(guildId) >> 22n) % shardCount;\n}\n","export function shouldUseGlobalFetchAndWebSocket() {\n\t// Browser env and deno when ran directly\n\tif (typeof globalThis.process === 'undefined') {\n\t\treturn 'fetch' in globalThis && 'WebSocket' in globalThis;\n\t}\n\n\tif ('versions' in globalThis.process) {\n\t\treturn 'deno' in globalThis.process.versions || 'bun' in globalThis.process.versions;\n\t}\n\n\treturn false;\n}\n","/* eslint-disable n/prefer-global/process */\n/* eslint-disable no-restricted-globals */\n\n/**\n * Resolves the user agent appendix string for the current environment.\n */\nexport function getUserAgentAppendix(): string {\n\t// https://vercel.com/docs/concepts/functions/edge-functions/edge-runtime#check-if-you're-running-on-the-edge-runtime\n\t// @ts-expect-error Vercel Edge functions\n\tif (typeof globalThis.EdgeRuntime !== 'undefined') {\n\t\treturn 'Vercel-Edge-Functions';\n\t}\n\n\t// @ts-expect-error Cloudflare Workers\n\tif (typeof globalThis.R2 !== 'undefined' && typeof globalThis.WebSocketPair !== 'undefined') {\n\t\t// https://developers.cloudflare.com/workers/runtime-apis/web-standards/#navigatoruseragent\n\t\treturn 'Cloudflare-Workers';\n\t}\n\n\t// https://docs.netlify.com/edge-functions/api/#netlify-global-object\n\t// @ts-expect-error Netlify Edge functions\n\tif (typeof globalThis.Netlify !== 'undefined') {\n\t\treturn 'Netlify-Edge-Functions';\n\t}\n\n\t// Most (if not all) edge environments will have `process` defined. Within a web browser we'll extract it using `navigator.userAgent`.\n\tif (typeof globalThis.process !== 'object') {\n\t\t// @ts-expect-error web env\n\t\tif (typeof globalThis.navigator === 'object') {\n\t\t\t// @ts-expect-error web env\n\t\t\treturn globalThis.navigator.userAgent;\n\t\t}\n\n\t\treturn 'UnknownEnvironment';\n\t}\n\n\tif ('versions' in globalThis.process) {\n\t\tif ('deno' in globalThis.process.versions) {\n\t\t\treturn `Deno/${globalThis.process.versions.deno}`;\n\t\t}\n\n\t\tif ('bun' in globalThis.process.versions) {\n\t\t\treturn `Bun/${globalThis.process.versions.bun}`;\n\t\t}\n\n\t\tif ('node' in globalThis.process.versions) {\n\t\t\treturn `Node.js/${globalThis.process.versions.node}`;\n\t\t}\n\t}\n\n\treturn 'UnknownEnvironment';\n}\n","/**\n * Represents an object capable of representing itself as a JSON object\n *\n * @typeParam T - The JSON type corresponding to {@link JSONEncodable.toJSON} outputs.\n */\nexport interface JSONEncodable<T> {\n\t/**\n\t * Transforms this object to its JSON format\n\t */\n\ttoJSON(): T;\n}\n\n/**\n * Indicates if an object is encodable or not.\n *\n * @param maybeEncodable - The object to check against\n */\nexport function isJSONEncodable(maybeEncodable: unknown): maybeEncodable is JSONEncodable<unknown> {\n\treturn maybeEncodable !== null && typeof maybeEncodable === 'object' && 'toJSON' in maybeEncodable;\n}\n","/**\n * Represents a structure that can be checked against another\n * given structure for equality\n *\n * @typeParam T - The type of object to compare the current object to\n */\nexport interface Equatable<T> {\n\t/**\n\t * Whether or not this is equal to another structure\n\t */\n\tequals(other: T): boolean;\n}\n\n/**\n * Indicates if an object is equatable or not.\n *\n * @param maybeEquatable - The object to check against\n */\nexport function isEquatable(maybeEquatable: unknown): maybeEquatable is Equatable<unknown> {\n\treturn maybeEquatable !== null && typeof maybeEquatable === 'object' && 'equals' in maybeEquatable;\n}\n"],"mappings":";;;;AAaO,SAAS,KAAQ,IAAsB;AAC7C,MAAI;AAEJ,SAAO,MAAO,iBAAiB,GAAG;AACnC;AAJgB;;;AC+BT,UAAU,MAAMA,QAA8B;AACpD,MAAI;AACJ,MAAI,QAAQ;AACZ,MAAI,OAAO;AAEX,MAAI,OAAOA,WAAU,UAAU;AAC9B,eAAWA;AAAA,EACZ,OAAO;AACN,YAAQA,OAAM;AACd,eAAWA,OAAM;AACjB,WAAOA,OAAM,QAAQ;AAAA,EACtB;AAEA,WAAS,QAAQ,OAAO,QAAQ,UAAU,SAAS,MAAM;AACxD,UAAM;AAAA,EACP;AACD;AAhBiB;;;ACtCV,SAAS,iBAAiB,SAAiB,YAAoB;AACrE,SAAO,OAAO,OAAO,OAAO,KAAK,GAAG,IAAI;AACzC;AAFgB;;;ACNT,SAAS,mCAAmC;AAElD,MAAI,OAAO,WAAW,YAAY,aAAa;AAC9C,WAAO,WAAW,cAAc,eAAe;AAAA,EAChD;AAEA,MAAI,cAAc,WAAW,SAAS;AACrC,WAAO,UAAU,WAAW,QAAQ,YAAY,SAAS,WAAW,QAAQ;AAAA,EAC7E;AAEA,SAAO;AACR;AAXgB;;;ACMT,SAAS,uBAA+B;AAG9C,MAAI,OAAO,WAAW,gBAAgB,aAAa;AAClD,WAAO;AAAA,EACR;AAGA,MAAI,OAAO,WAAW,OAAO,eAAe,OAAO,WAAW,kBAAkB,aAAa;AAE5F,WAAO;AAAA,EACR;AAIA,MAAI,OAAO,WAAW,YAAY,aAAa;AAC9C,WAAO;AAAA,EACR;AAGA,MAAI,OAAO,WAAW,YAAY,UAAU;AAE3C,QAAI,OAAO,WAAW,cAAc,UAAU;AAE7C,aAAO,WAAW,UAAU;AAAA,IAC7B;AAEA,WAAO;AAAA,EACR;AAEA,MAAI,cAAc,WAAW,SAAS;AACrC,QAAI,UAAU,WAAW,QAAQ,UAAU;AAC1C,aAAO,QAAQ,WAAW,QAAQ,SAAS,IAAI;AAAA,IAChD;AAEA,QAAI,SAAS,WAAW,QAAQ,UAAU;AACzC,aAAO,OAAO,WAAW,QAAQ,SAAS,GAAG;AAAA,IAC9C;AAEA,QAAI,UAAU,WAAW,QAAQ,UAAU;AAC1C,aAAO,WAAW,WAAW,QAAQ,SAAS,IAAI;AAAA,IACnD;AAAA,EACD;AAEA,SAAO;AACR;AA7CgB;;;ACWT,SAAS,gBAAgB,gBAAmE;AAClG,SAAO,mBAAmB,QAAQ,OAAO,mBAAmB,YAAY,YAAY;AACrF;AAFgB;;;ACCT,SAAS,YAAY,gBAA+D;AAC1F,SAAO,mBAAmB,QAAQ,OAAO,mBAAmB,YAAY,YAAY;AACrF;AAFgB;","names":["range"]} \ No newline at end of file
diff --git a/node_modules/@discordjs/util/package.json b/node_modules/@discordjs/util/package.json
new file mode 100644
index 0000000..85e258a
--- /dev/null
+++ b/node_modules/@discordjs/util/package.json
@@ -0,0 +1,80 @@
+{
+ "name": "@discordjs/util",
+ "version": "1.0.1",
+ "description": "Utilities shared across Discord.js packages",
+ "scripts": {
+ "build": "tsup",
+ "build:docs": "tsc -p tsconfig.docs.json",
+ "test": "vitest run && tsd",
+ "lint": "prettier --check . && TIMING=1 eslint src --ext .mjs,.js,.ts --format=pretty",
+ "format": "prettier --write . && TIMING=1 eslint src --ext .mjs,.js,.ts --fix --format=pretty",
+ "fmt": "yarn format",
+ "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json",
+ "prepack": "yarn lint && yarn test && yarn build",
+ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/util/*'",
+ "release": "cliff-jumper"
+ },
+ "main": "./dist/index.js",
+ "module": "./dist/index.mjs",
+ "types": "./dist/index.d.ts",
+ "exports": {
+ "types": "./dist/index.d.ts",
+ "import": "./dist/index.mjs",
+ "require": "./dist/index.js"
+ },
+ "directories": {
+ "lib": "src"
+ },
+ "files": [
+ "dist"
+ ],
+ "contributors": [
+ "Crawl <icrawltogo@gmail.com>",
+ "Amish Shah <amishshah.2k@gmail.com>",
+ "Vlad Frangu <kingdgrizzle@gmail.com>",
+ "SpaceEEC <spaceeec@yahoo.com>",
+ "Aura Román <kyradiscord@gmail.com>"
+ ],
+ "license": "Apache-2.0",
+ "keywords": [
+ "api",
+ "bot",
+ "client",
+ "node",
+ "discordjs"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/discordjs/discord.js.git",
+ "directory": "packages/util"
+ },
+ "bugs": {
+ "url": "https://github.com/discordjs/discord.js/issues"
+ },
+ "homepage": "https://discord.js.org",
+ "devDependencies": {
+ "@favware/cliff-jumper": "^2.1.1",
+ "@microsoft/api-extractor": "^7.36.4",
+ "@types/node": "16.18.40",
+ "@vitest/coverage-v8": "^0.34.2",
+ "cross-env": "^7.0.3",
+ "eslint": "^8.47.0",
+ "eslint-config-neon": "^0.1.47",
+ "eslint-formatter-pretty": "^5.0.0",
+ "prettier": "^2.8.8",
+ "tsd": "^0.28.1",
+ "tsup": "^7.2.0",
+ "turbo": "^1.10.12",
+ "typescript": "^5.1.6",
+ "vitest": "^0.34.2"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "tsd": {
+ "directory": "__tests__/types"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@discordjs/ws/CHANGELOG.md b/node_modules/@discordjs/ws/CHANGELOG.md
new file mode 100644
index 0000000..f7e4442
--- /dev/null
+++ b/node_modules/@discordjs/ws/CHANGELOG.md
@@ -0,0 +1,317 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+# [@discordjs/ws@1.0.1](https://github.com/discordjs/discord.js/compare/@discordjs/ws@1.0.0...@discordjs/ws@1.0.1) - (2023-08-17)
+
+## Documentation
+
+- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6))
+
+# [@discordjs/ws@1.0.0](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.3...@discordjs/ws@1.0.0) - (2023-07-31)
+
+## Bug Fixes
+
+- **WebSocketShard:** Close errors not being catchable (#9704) ([8c782bf](https://github.com/discordjs/discord.js/commit/8c782bfd52b1d7bbfbf1dfd39d0c45828298e285))
+- **WebSocketManager:** Always cache result of fetchGatewayInformation (#9611) ([df8b6e9](https://github.com/discordjs/discord.js/commit/df8b6e9934af5b21aa2701ce54244c38a5f133e0))
+- **WebSocketShard:** Handle initial connect being a resume (#9549) ([4dcc9c5](https://github.com/discordjs/discord.js/commit/4dcc9c50f83cd234cb2c2ede47fb505ffb75eef2))
+
+## Features
+
+- No-de-no-de, now with extra buns (#9683) ([386f206](https://github.com/discordjs/discord.js/commit/386f206caf74a04c426799af9796ca96dcb37056))
+ - **BREAKING CHANGE:** The REST and RequestManager classes now extend AsyncEventEmitter
+from `@vladfrangu/async_event_emitter`, which aids in cross-compatibility
+between Node, Deno, Bun, CF Workers, Vercel Functions, etc.
+ - **BREAKING CHANGE:** DefaultUserAgentAppendix has been adapted to support multiple
+different platforms (previously mentioned Deno, Bun, CF Workers, etc)
+ - **BREAKING CHANGE:** the entry point for `@discordjs/rest` will now differ
+in non-node-like environments (CF Workers, etc.)
+ - **Co-authored-by:** Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
+ - **Co-authored-by:** Jiralite <33201955+Jiralite@users.noreply.github.com>
+ - **Co-authored-by:** suneettipirneni <suneettipirneni@icloud.com>
+
+## Refactor
+
+- **WebSocketShard:** Throttling error handling (#9701) ([ceab07b](https://github.com/discordjs/discord.js/commit/ceab07bec85c8d678958b8023a9c1902136f9f83))
+- **rest:** Switch api to fetch-like and provide strategies (#9416) ([cdaa0a3](https://github.com/discordjs/discord.js/commit/cdaa0a36f586459f1e5ede868c4250c7da90455c))
+ - **BREAKING CHANGE:** NodeJS v18+ is required when using node due to the use of global `fetch`
+ - **BREAKING CHANGE:** The raw method of REST now returns a web compatible `Respone` object.
+ - **BREAKING CHANGE:** The `parseResponse` utility method has been updated to operate on a web compatible `Response` object.
+ - **BREAKING CHANGE:** Many underlying internals have changed, some of which were exported.
+ - **BREAKING CHANGE:** `DefaultRestOptions` used to contain a default `agent`, which is now set to `null` instead.
+
+# [@discordjs/ws@0.8.3](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.2...@discordjs/ws@0.8.3) - (2023-05-06)
+
+## Bug Fixes
+
+- **WebSocketShard:** Wait a little before reconnecting (#9517) ([00da44a](https://github.com/discordjs/discord.js/commit/00da44a120fb0eeb2bdc3a03670836a544dc5418))
+
+## Testing
+
+- **ws:** Fix tests (#9520) ([3e80f0b](https://github.com/discordjs/discord.js/commit/3e80f0b384ea2dc14c1b60b5897e90040cab9a24))
+
+# [@discordjs/ws@0.8.2](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.1...@discordjs/ws@0.8.2) - (2023-05-01)
+
+## Documentation
+
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+
+# [@discordjs/ws@0.8.1](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.0...@discordjs/ws@0.8.1) - (2023-04-16)
+
+## Bug Fixes
+
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Refactor
+
+- Abstract identify throttling and correct max_concurrency handling (#9375) ([02dfaf1](https://github.com/discordjs/discord.js/commit/02dfaf1aa2c798315d0dd7f809cc469771b36ffc))
+- **WebSocketShard:** WaitForEvent and its error handling (#9282) ([dcf58d8](https://github.com/discordjs/discord.js/commit/dcf58d81401387a5e157b20829aa56638e106e9d))
+
+# [@discordjs/ws@1.0.0](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.3...@discordjs/ws@1.0.0) - (2023-07-31)
+
+## Bug Fixes
+
+- **WebSocketShard:** Close errors not being catchable (#9704) ([8c782bf](https://github.com/discordjs/discord.js/commit/8c782bfd52b1d7bbfbf1dfd39d0c45828298e285))
+- **WebSocketManager:** Always cache result of fetchGatewayInformation (#9611) ([df8b6e9](https://github.com/discordjs/discord.js/commit/df8b6e9934af5b21aa2701ce54244c38a5f133e0))
+- **WebSocketShard:** Handle initial connect being a resume (#9549) ([4dcc9c5](https://github.com/discordjs/discord.js/commit/4dcc9c50f83cd234cb2c2ede47fb505ffb75eef2))
+
+## Features
+
+- No-de-no-de, now with extra buns (#9683) ([386f206](https://github.com/discordjs/discord.js/commit/386f206caf74a04c426799af9796ca96dcb37056))
+ - **BREAKING CHANGE:** The REST and RequestManager classes now extend AsyncEventEmitter
+from `@vladfrangu/async_event_emitter`, which aids in cross-compatibility
+between Node, Deno, Bun, CF Workers, Vercel Functions, etc.
+ - **BREAKING CHANGE:** DefaultUserAgentAppendix has been adapted to support multiple
+different platforms (previously mentioned Deno, Bun, CF Workers, etc)
+ - **BREAKING CHANGE:** the entry point for `@discordjs/rest` will now differ
+in non-node-like environments (CF Workers, etc.)
+ - **Co-authored-by:** Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
+ - **Co-authored-by:** Jiralite <33201955+Jiralite@users.noreply.github.com>
+ - **Co-authored-by:** suneettipirneni <suneettipirneni@icloud.com>
+
+## Refactor
+
+- **WebSocketShard:** Throttling error handling (#9701) ([ceab07b](https://github.com/discordjs/discord.js/commit/ceab07bec85c8d678958b8023a9c1902136f9f83))
+- **rest:** Switch api to fetch-like and provide strategies (#9416) ([cdaa0a3](https://github.com/discordjs/discord.js/commit/cdaa0a36f586459f1e5ede868c4250c7da90455c))
+ - **BREAKING CHANGE:** NodeJS v18+ is required when using node due to the use of global `fetch`
+ - **BREAKING CHANGE:** The raw method of REST now returns a web compatible `Respone` object.
+ - **BREAKING CHANGE:** The `parseResponse` utility method has been updated to operate on a web compatible `Response` object.
+ - **BREAKING CHANGE:** Many underlying internals have changed, some of which were exported.
+ - **BREAKING CHANGE:** `DefaultRestOptions` used to contain a default `agent`, which is now set to `null` instead.
+
+# [@discordjs/ws@0.8.3](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.2...@discordjs/ws@0.8.3) - (2023-05-06)
+
+## Bug Fixes
+
+- **WebSocketShard:** Wait a little before reconnecting (#9517) ([00da44a](https://github.com/discordjs/discord.js/commit/00da44a120fb0eeb2bdc3a03670836a544dc5418))
+
+## Testing
+
+- **ws:** Fix tests (#9520) ([3e80f0b](https://github.com/discordjs/discord.js/commit/3e80f0b384ea2dc14c1b60b5897e90040cab9a24))
+
+# [@discordjs/ws@0.8.2](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.1...@discordjs/ws@0.8.2) - (2023-05-01)
+
+## Documentation
+
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+
+# [@discordjs/ws@0.8.1](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.0...@discordjs/ws@0.8.1) - (2023-04-16)
+
+## Bug Fixes
+
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Refactor
+
+- Abstract identify throttling and correct max_concurrency handling (#9375) ([02dfaf1](https://github.com/discordjs/discord.js/commit/02dfaf1aa2c798315d0dd7f809cc469771b36ffc))
+- **WebSocketShard:** WaitForEvent and its error handling (#9282) ([dcf58d8](https://github.com/discordjs/discord.js/commit/dcf58d81401387a5e157b20829aa56638e106e9d))
+
+# [@discordjs/ws@0.8.3](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.2...@discordjs/ws@0.8.3) - (2023-05-06)
+
+## Bug Fixes
+
+- **WebSocketShard:** Wait a little before reconnecting (#9517) ([00da44a](https://github.com/discordjs/discord.js/commit/00da44a120fb0eeb2bdc3a03670836a544dc5418))
+
+## Testing
+
+- **ws:** Fix tests (#9520) ([3e80f0b](https://github.com/discordjs/discord.js/commit/3e80f0b384ea2dc14c1b60b5897e90040cab9a24))
+
+# [@discordjs/ws@0.8.2](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.1...@discordjs/ws@0.8.2) - (2023-05-01)
+
+## Documentation
+
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+
+# [@discordjs/ws@0.8.1](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.0...@discordjs/ws@0.8.1) - (2023-04-16)
+
+## Bug Fixes
+
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Refactor
+
+- Abstract identify throttling and correct max_concurrency handling (#9375) ([02dfaf1](https://github.com/discordjs/discord.js/commit/02dfaf1aa2c798315d0dd7f809cc469771b36ffc))
+- **WebSocketShard:** WaitForEvent and its error handling (#9282) ([dcf58d8](https://github.com/discordjs/discord.js/commit/dcf58d81401387a5e157b20829aa56638e106e9d))
+
+# [@discordjs/ws@0.8.2](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.1...@discordjs/ws@0.8.2) - (2023-05-01)
+
+## Documentation
+
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+
+# [@discordjs/ws@0.8.1](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.0...@discordjs/ws@0.8.1) - (2023-04-16)
+
+## Bug Fixes
+
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Refactor
+
+- Abstract identify throttling and correct max_concurrency handling (#9375) ([02dfaf1](https://github.com/discordjs/discord.js/commit/02dfaf1aa2c798315d0dd7f809cc469771b36ffc))
+- **WebSocketShard:** WaitForEvent and its error handling (#9282) ([dcf58d8](https://github.com/discordjs/discord.js/commit/dcf58d81401387a5e157b20829aa56638e106e9d))
+
+# [@discordjs/ws@0.8.1](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.0...@discordjs/ws@0.8.1) - (2023-04-16)
+
+## Bug Fixes
+
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Refactor
+
+- Abstract identify throttling and correct max_concurrency handling (#9375) ([02dfaf1](https://github.com/discordjs/discord.js/commit/02dfaf1aa2c798315d0dd7f809cc469771b36ffc))
+- **WebSocketShard:** WaitForEvent and its error handling (#9282) ([dcf58d8](https://github.com/discordjs/discord.js/commit/dcf58d81401387a5e157b20829aa56638e106e9d))
+
+# [@discordjs/ws@0.8.0](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.7.0...@discordjs/ws@0.8.0) - (2023-04-01)
+
+## Bug Fixes
+
+- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b))
+- **WebSocketShard:** Don't await #destroy in error bubbling logic (#9276) ([519825a](https://github.com/discordjs/discord.js/commit/519825a651fe22042a73046824d12f03f56ca9e2))
+- **WebSocketShard:** Don't close in #destroy when status is connecting (#9254) ([c76b17d](https://github.com/discordjs/discord.js/commit/c76b17d3b327fb55ef76770d4825e02ab8f26ad1))
+- **WebSocketShard:** Cancel initial heartbeat in destroy (#9244) ([9842082](https://github.com/discordjs/discord.js/commit/98420826bc2296fc392f17e8254cf4ad743ff5af))
+
+## Features
+
+- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b))
+
+# [@discordjs/ws@0.7.0](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.6.0...@discordjs/ws@0.7.0) - (2023-03-12)
+
+## Bug Fixes
+
+- **WebSocketShard:** #send race condition due to ready state (#9226) ([a99fc64](https://github.com/discordjs/discord.js/commit/a99fc64e3f73c3976617a7ed825fa7d6e9fb3b53))
+- **WebSocketShard:** Wait for hello rather than ready in connect (#9178) ([27e0b32](https://github.com/discordjs/discord.js/commit/27e0b32c5f0fe605f152e6ba67ce3f596137ff01))
+- **WebSocketShard:** Proper error bubbling (#9119) ([9681f34](https://github.com/discordjs/discord.js/commit/9681f348770b0e2ff9b7c96b1c30575dd950e2ed))
+- Ws typo (#9056) ([05a1cbf](https://github.com/discordjs/discord.js/commit/05a1cbfe5479195b0bc9b6f0971fe39f6af6fd77))
+
+## Documentation
+
+- Fix typos (#9127) ([1ba1f23](https://github.com/discordjs/discord.js/commit/1ba1f238f04221ec890fc921678909b5b7d92c26))
+- Fix version export (#9049) ([8b70f49](https://github.com/discordjs/discord.js/commit/8b70f497a1207e30edebdecd12b926c981c13d28))
+- Updated @discordjs/ws README.md to include optional packages (#8973) ([4ee00b6](https://github.com/discordjs/discord.js/commit/4ee00b6534fad39da1fe54fb2c1766b264a020ca))
+
+## Features
+
+- **WebSocketShard:** Heartbeat jitter (#9223) ([6ecff26](https://github.com/discordjs/discord.js/commit/6ecff26ec65ce1d559a3406b396b3190868b1961))
+- **website:** Add support for source file links (#9048) ([f6506e9](https://github.com/discordjs/discord.js/commit/f6506e99c496683ee0ab67db0726b105b929af38))
+- **ws:** Custom workers (#9004) ([828a13b](https://github.com/discordjs/discord.js/commit/828a13b526dde1334e8879e76e664584bdb5db73))
+- **ws:** Metrics (#9005) ([0ff67d8](https://github.com/discordjs/discord.js/commit/0ff67d8e7adee43ff82bbf072dac9a4c7c9fe8c2))
+
+## Refactor
+
+- **WebSocketManager:** Passing in strategy (#9122) ([5c5a583](https://github.com/discordjs/discord.js/commit/5c5a5832b94cd4d371cc99c4f9c3384523dabeeb))
+
+## Styling
+
+- Run prettier (#9041) ([2798ba1](https://github.com/discordjs/discord.js/commit/2798ba1eb3d734f0cf2eeccd2e16cfba6804873b))
+
+# [@discordjs/ws@0.6.0](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.5.0...@discordjs/ws@0.6.0) - (2022-12-16)
+
+## Bug Fixes
+
+- **WebSocketShard:** Send ratelimit handling (#8887) ([40b504a](https://github.com/discordjs/discord.js/commit/40b504a2088effc6a467f40ac3cf2a6d736ab209))
+
+## Features
+
+- **core:** Add support for role connections (#8930) ([3d6fa24](https://github.com/discordjs/discord.js/commit/3d6fa248c07b2278504bbe8bafa17a3294971fd9))
+
+## Refactor
+
+- **WebSocketShard:** Identify throttling (#8888) ([8f552a0](https://github.com/discordjs/discord.js/commit/8f552a0e17c0eca71063e7a4353b9b351bcdf9fd))
+
+# [@discordjs/ws@0.5.0](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.4.1...@discordjs/ws@0.5.0) - (2022-11-28)
+
+## Bug Fixes
+
+- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4))
+
+## Documentation
+
+- Remove unused imports (#8744) ([179392d](https://github.com/discordjs/discord.js/commit/179392d6d7d634c6d10f6abb20c072516c1c1d43))
+
+## Features
+
+- New select menus (#8793) ([5152abf](https://github.com/discordjs/discord.js/commit/5152abf7285581abf7689e9050fdc56c4abb1e2b))
+
+# [@discordjs/ws@0.4.1](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.4.0...@discordjs/ws@0.4.1) - (2022-10-10)
+
+## Bug Fixes
+
+- **WebSocketShard:** Dispatch race condition (#8731) ([c2b6777](https://github.com/discordjs/discord.js/commit/c2b677759b905d6eb3ebcefcec2cb04eb38436bb))
+
+# [@discordjs/ws@0.4.0](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.3.0...@discordjs/ws@0.4.0) - (2022-10-08)
+
+## Bug Fixes
+
+- Ws package.json path (#8720) ([7af3c3b](https://github.com/discordjs/discord.js/commit/7af3c3b6f1517a5d14372b5aa0ef3a2ed8633f6f))
+- **WebSocketShard:** Add ready data parameter to ready event (#8705) ([a7eab50](https://github.com/discordjs/discord.js/commit/a7eab50ee3e286ca10e37107d695385251bd044d))
+- Footer / sidebar / deprecation alert ([ba3e0ed](https://github.com/discordjs/discord.js/commit/ba3e0ed348258fe8e51eefb4aa7379a1230616a9))
+
+## Documentation
+
+- Change name (#8604) ([dd5a089](https://github.com/discordjs/discord.js/commit/dd5a08944c258a847fc4377f1d5e953264ab47d0))
+
+## Features
+
+- Web-components (#8715) ([0ac3e76](https://github.com/discordjs/discord.js/commit/0ac3e766bd9dbdeb106483fa4bb085d74de346a2))
+- Add `@discordjs/util` (#8591) ([b2ec865](https://github.com/discordjs/discord.js/commit/b2ec865765bf94181473864a627fb63ea8173fd3))
+
+## Refactor
+
+- Website components (#8600) ([c334157](https://github.com/discordjs/discord.js/commit/c3341570d983aea9ecc419979d5a01de658c9d67))
+- Use `eslint-config-neon` for packages. (#8579) ([edadb9f](https://github.com/discordjs/discord.js/commit/edadb9fe5dfd9ff51a3cfc9b25cb242d3f9f5241))
+
+# [@discordjs/ws@0.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.2.0...@discordjs/ws@0.3.0) - (2022-08-22)
+
+## Bug Fixes
+
+- **WebSocketShard#destroy:** Wait for close and cleanup listeners (#8479) ([acdafe6](https://github.com/discordjs/discord.js/commit/acdafe60c7aa1ac5a3d358934c055c297080a944))
+- **WebSocketManager#connect:** Check if we have enough sessions (#8481) ([4fd4252](https://github.com/discordjs/discord.js/commit/4fd42528fea6127e6468a651f9544913c19ade4d))
+- **WebSocketShard:** Always reconnect on disconnected with 1000 (#8405) ([359f688](https://github.com/discordjs/discord.js/commit/359f6885558fcfb3151971ab589077a89ee71a01))
+- **WebSocketShard:** Emit errors directly instead of objects (#8406) ([3161e1a](https://github.com/discordjs/discord.js/commit/3161e1a1acfbf929ecf33958fa1657553dd9bc1e))
+
+## Documentation
+
+- Fence examples in codeblocks ([193b252](https://github.com/discordjs/discord.js/commit/193b252672440a860318d3c2968aedd9cb88e0ce))
+
+## Features
+
+- **website:** Show `constructor` information (#8540) ([e42fd16](https://github.com/discordjs/discord.js/commit/e42fd1636973b10dd7ed6fb4280ee1a4a8f82007))
+- **website:** Render `@defaultValue` blocks (#8527) ([8028813](https://github.com/discordjs/discord.js/commit/8028813825e7708915ea892760c1003afd60df2f))
+- **website:** Render tsdoc examples (#8494) ([7116647](https://github.com/discordjs/discord.js/commit/7116647947e413da59fbf493ed5251ddcd710ce7))
+- **WebSocketShard:** Support new resume url (#8480) ([bc06cc6](https://github.com/discordjs/discord.js/commit/bc06cc638d2f57ab5c600e8cdb6afc8eb2180166))
+
+## Refactor
+
+- **website:** Adjust typography (#8503) ([0f83402](https://github.com/discordjs/discord.js/commit/0f834029850d2448981596cf082ff59917018d66))
+- Docs design (#8487) ([4ab1d09](https://github.com/discordjs/discord.js/commit/4ab1d09997a18879a9eb9bda39df6f15aa22557e))
+
+# [@discordjs/ws@0.2.0](https://github.com/discordjs/discord.js/tree/@discordjs/ws@0.2.0) - (2022-07-30)
+
+## Bug Fixes
+
+- **WebSocketShard:** Account code 1000 with no prior indication (#8399) ([5137bfc](https://github.com/discordjs/discord.js/commit/5137bfc17d763488083b76ee9008611df333272a))
+- **WebSocketShard:** Use correct import (#8357) ([78d4295](https://github.com/discordjs/discord.js/commit/78d4295a40b83ea4f7cc830ff81927cba2d1d3f0))
+
+## Features
+
+- @discordjs/ws (#8260) ([748d727](https://github.com/discordjs/discord.js/commit/748d7271c45796479a29d8ed3101421de09ef867))
diff --git a/node_modules/@discordjs/ws/LICENSE b/node_modules/@discordjs/ws/LICENSE
new file mode 100644
index 0000000..f9786ff
--- /dev/null
+++ b/node_modules/@discordjs/ws/LICENSE
@@ -0,0 +1,191 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright 2022 Noel Buechler
+ Copyright 2022 Charlotte Cristea
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/node_modules/@discordjs/ws/README.md b/node_modules/@discordjs/ws/README.md
new file mode 100644
index 0000000..b75c1b2
--- /dev/null
+++ b/node_modules/@discordjs/ws/README.md
@@ -0,0 +1,196 @@
+<div align="center">
+ <br />
+ <p>
+ <a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
+ </p>
+ <br />
+ <p>
+ <a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
+ <a href="https://www.npmjs.com/package/@discordjs/ws"><img src="https://img.shields.io/npm/v/@discordjs/ws.svg?maxAge=3600" alt="npm version" /></a>
+ <a href="https://www.npmjs.com/package/@discordjs/ws"><img src="https://img.shields.io/npm/dt/@discordjs/ws.svg?maxAge=3600" alt="npm downloads" /></a>
+ <a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Build status" /></a>
+ <a href="https://codecov.io/gh/discordjs/discord.js" ><img src="https://codecov.io/gh/discordjs/discord.js/branch/main/graph/badge.svg?precision=2&flag=ws" alt="Code coverage" /></a>
+ </p>
+ <p>
+ <a href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-vercel.svg" alt="Vercel" /></a>
+ <a href="https://www.cloudflare.com"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-workers.png" alt="Cloudflare Workers" height="44" /></a>
+ </p>
+</div>
+
+## About
+
+`@discordjs/ws` is a powerful wrapper around Discord's gateway.
+
+## Installation
+
+**Node.js 16.11.0 or newer is required.**
+
+```sh
+npm install @discordjs/ws
+yarn add @discordjs/ws
+pnpm add @discordjs/ws
+```
+
+### Optional packages
+
+- [zlib-sync](https://www.npmjs.com/package/zlib-sync) for WebSocket data compression and inflation (`npm install zlib-sync`)
+- [bufferutil](https://www.npmjs.com/package/bufferutil) for a much faster WebSocket connection (`npm install bufferutil`)
+- [utf-8-validate](https://www.npmjs.com/package/utf-8-validate) in combination with `bufferutil` for much faster WebSocket processing (`npm install utf-8-validate`)
+
+## Example usage
+
+```ts
+import { WebSocketManager, WebSocketShardEvents, CompressionMethod } from '@discordjs/ws';
+import { REST } from '@discordjs/rest';
+
+const rest = new REST().setToken(process.env.DISCORD_TOKEN);
+// This example will spawn Discord's recommended shard count, all under the current process.
+const manager = new WebSocketManager({
+ token: process.env.DISCORD_TOKEN,
+ intents: 0, // for no intents
+ rest,
+ // uncomment if you have zlib-sync installed and want to use compression
+ // compression: CompressionMethod.ZlibStream,
+});
+
+manager.on(WebSocketShardEvents.Dispatch, (event) => {
+ // Process gateway events here.
+});
+
+await manager.connect();
+```
+
+### Specify shards
+
+```ts
+// Spawn 4 shards
+const manager = new WebSocketManager({
+ token: process.env.DISCORD_TOKEN,
+ intents: 0,
+ rest,
+ shardCount: 4,
+});
+
+// The manager also supports being responsible for only a subset of your shards:
+
+// Your bot will run 8 shards overall
+// This manager will only take care of 0, 2, 4, and 6
+const manager = new WebSocketManager({
+ token: process.env.DISCORD_TOKEN,
+ intents: 0,
+ rest,
+ shardCount: 8,
+ shardIds: [0, 2, 4, 6],
+});
+
+// Alternatively, if your shards are consecutive, you can pass in a range
+const manager = new WebSocketManager({
+ token: process.env.DISCORD_TOKEN,
+ intents: 0,
+ rest,
+ shardCount: 8,
+ shardIds: {
+ start: 0,
+ end: 4,
+ },
+});
+```
+
+### Specify `worker_threads`
+
+You can also have the shards spawn in worker threads:
+
+```ts
+import { WebSocketManager, WorkerShardingStrategy } from '@discordjs/ws';
+import { REST } from '@discordjs/rest';
+
+const rest = new REST().setToken(process.env.DISCORD_TOKEN);
+const manager = new WebSocketManager({
+ token: process.env.DISCORD_TOKEN,
+ intents: 0,
+ rest,
+ shardCount: 6,
+ // This will cause 3 workers to spawn, 2 shards per each
+ buildStrategy: (manager) => new WorkerShardingStrategy(manager, { shardsPerWorker: 2 }),
+ // Or maybe you want all your shards under a single worker
+ buildStrategy: (manager) => new WorkerShardingStrategy(manager, { shardsPerWorker: 'all' }),
+});
+```
+
+**Note**: By default, this will cause the workers to effectively only be responsible for the WebSocket connection, they simply pass up all the events back to the main process for the manager to emit. If you want to have the workers handle events as well, you can pass in a `workerPath` option to the `WorkerShardingStrategy` constructor:
+
+```ts
+import { WebSocketManager, WorkerShardingStrategy } from '@discordjs/ws';
+import { REST } from '@discordjs/rest';
+
+const rest = new REST().setToken(process.env.DISCORD_TOKEN);
+const manager = new WebSocketManager({
+ token: process.env.DISCORD_TOKEN,
+ intents: 0,
+ rest,
+ buildStrategy: (manager) =>
+ new WorkerShardingStrategy(manager, {
+ shardsPerWorker: 2,
+ workerPath: './worker.js',
+ }),
+});
+```
+
+And your `worker.ts` file:
+
+```ts
+import { WorkerBootstrapper, WebSocketShardEvents } from '@discordjs/ws';
+
+const bootstrapper = new WorkerBootstrapper();
+void bootstrapper.bootstrap({
+ // Those will be sent to the main thread for the manager to emit
+ forwardEvents: [
+ WebSocketShardEvents.Closed,
+ WebSocketShardEvents.Debug,
+ WebSocketShardEvents.Hello,
+ WebSocketShardEvents.Ready,
+ WebSocketShardEvents.Resumed,
+ ],
+ shardCallback: (shard) => {
+ shard.on(WebSocketShardEvents.Dispatch, (event) => {
+ // Process gateway events here however you want (e.g. send them through a message broker)
+ // You also have access to shard.id if you need it
+ });
+ },
+});
+```
+
+## Links
+
+- [Website][website] ([source][website-source])
+- [Documentation][documentation]
+- [Guide][guide] ([source][guide-source])
+ Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library.
+- [discord.js Discord server][discord]
+- [Discord API Discord server][discord-api]
+- [GitHub][source]
+- [npm][npm]
+- [Related libraries][related-libs]
+
+## Contributing
+
+Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
+[documentation][documentation].
+See [the contribution guide][contributing] if you'd like to submit a PR.
+
+## Help
+
+If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord].
+
+[website]: https://discord.js.org
+[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
+[documentation]: https://discord.js.org/docs/packages/ws/stable
+[guide]: https://discordjs.guide/
+[guide-source]: https://github.com/discordjs/guide
+[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
+[discord]: https://discord.gg/djs
+[discord-api]: https://discord.gg/discord-api
+[source]: https://github.com/discordjs/discord.js/tree/main/packages/ws
+[npm]: https://www.npmjs.com/package/@discordjs/ws
+[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries
+[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md
diff --git a/node_modules/@discordjs/ws/dist/defaultWorker.d.mts b/node_modules/@discordjs/ws/dist/defaultWorker.d.mts
new file mode 100644
index 0000000..c9247d4
--- /dev/null
+++ b/node_modules/@discordjs/ws/dist/defaultWorker.d.mts
@@ -0,0 +1,2 @@
+
+export { }
diff --git a/node_modules/@discordjs/ws/dist/defaultWorker.d.ts b/node_modules/@discordjs/ws/dist/defaultWorker.d.ts
new file mode 100644
index 0000000..c9247d4
--- /dev/null
+++ b/node_modules/@discordjs/ws/dist/defaultWorker.d.ts
@@ -0,0 +1,2 @@
+
+export { }
diff --git a/node_modules/@discordjs/ws/dist/defaultWorker.js b/node_modules/@discordjs/ws/dist/defaultWorker.js
new file mode 100644
index 0000000..4e19dff
--- /dev/null
+++ b/node_modules/@discordjs/ws/dist/defaultWorker.js
@@ -0,0 +1,1051 @@
+"use strict";
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ // If the importer is in node compatibility mode or this is not an ESM
+ // file that has been converted to a CommonJS file using a Babel-
+ // compatible transform (i.e. "__esModule" has not been set), then set
+ // "default" to the CommonJS "module.exports" for node compatibility.
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+ mod
+));
+
+// src/utils/WorkerBootstrapper.ts
+var import_node_worker_threads3 = require("worker_threads");
+var import_collection7 = require("@discordjs/collection");
+
+// src/strategies/context/WorkerContextFetchingStrategy.ts
+var import_node_worker_threads2 = require("worker_threads");
+var import_collection2 = require("@discordjs/collection");
+
+// src/strategies/sharding/WorkerShardingStrategy.ts
+var import_node_events = require("events");
+var import_node_path = require("path");
+var import_node_worker_threads = require("worker_threads");
+var import_collection = require("@discordjs/collection");
+
+// src/strategies/context/IContextFetchingStrategy.ts
+async function managerToFetchingStrategyOptions(manager) {
+ const {
+ buildIdentifyThrottler,
+ buildStrategy,
+ retrieveSessionInfo,
+ updateSessionInfo,
+ shardCount,
+ shardIds,
+ rest,
+ ...managerOptions
+ } = manager.options;
+ return {
+ ...managerOptions,
+ gatewayInformation: await manager.fetchGatewayInformation(),
+ shardCount: await manager.getShardCount()
+ };
+}
+__name(managerToFetchingStrategyOptions, "managerToFetchingStrategyOptions");
+
+// src/strategies/context/WorkerContextFetchingStrategy.ts
+var WorkerContextFetchingStrategy = class {
+ constructor(options) {
+ this.options = options;
+ if (import_node_worker_threads2.isMainThread) {
+ throw new Error("Cannot instantiate WorkerContextFetchingStrategy on the main thread");
+ }
+ import_node_worker_threads2.parentPort.on("message", (payload) => {
+ if (payload.op === 3 /* SessionInfoResponse */) {
+ this.sessionPromises.get(payload.nonce)?.(payload.session);
+ this.sessionPromises.delete(payload.nonce);
+ }
+ if (payload.op === 4 /* ShardIdentifyResponse */) {
+ const promise = this.waitForIdentifyPromises.get(payload.nonce);
+ if (payload.ok) {
+ promise?.resolve();
+ } else {
+ promise?.reject(promise.signal.reason);
+ }
+ this.waitForIdentifyPromises.delete(payload.nonce);
+ }
+ });
+ }
+ static {
+ __name(this, "WorkerContextFetchingStrategy");
+ }
+ sessionPromises = new import_collection2.Collection();
+ waitForIdentifyPromises = new import_collection2.Collection();
+ async retrieveSessionInfo(shardId) {
+ const nonce = Math.random();
+ const payload = {
+ op: 3 /* RetrieveSessionInfo */,
+ shardId,
+ nonce
+ };
+ const promise = new Promise((resolve2) => this.sessionPromises.set(nonce, resolve2));
+ import_node_worker_threads2.parentPort.postMessage(payload);
+ return promise;
+ }
+ updateSessionInfo(shardId, sessionInfo) {
+ const payload = {
+ op: 4 /* UpdateSessionInfo */,
+ shardId,
+ session: sessionInfo
+ };
+ import_node_worker_threads2.parentPort.postMessage(payload);
+ }
+ async waitForIdentify(shardId, signal) {
+ const nonce = Math.random();
+ const payload = {
+ op: 5 /* WaitForIdentify */,
+ nonce,
+ shardId
+ };
+ const promise = new Promise(
+ (resolve2, reject) => (
+ // eslint-disable-next-line no-promise-executor-return
+ this.waitForIdentifyPromises.set(nonce, { signal, resolve: resolve2, reject })
+ )
+ );
+ import_node_worker_threads2.parentPort.postMessage(payload);
+ const listener = /* @__PURE__ */ __name(() => {
+ const payload2 = {
+ op: 8 /* CancelIdentify */,
+ nonce
+ };
+ import_node_worker_threads2.parentPort.postMessage(payload2);
+ }, "listener");
+ signal.addEventListener("abort", listener);
+ try {
+ await promise;
+ } finally {
+ signal.removeEventListener("abort", listener);
+ }
+ }
+};
+
+// src/ws/WebSocketShard.ts
+var import_node_buffer = require("buffer");
+var import_node_events2 = require("events");
+var import_node_timers = require("timers");
+var import_promises2 = require("timers/promises");
+var import_node_url = require("url");
+var import_node_util = require("util");
+var import_node_zlib = require("zlib");
+var import_collection6 = require("@discordjs/collection");
+var import_util2 = require("@discordjs/util");
+var import_async_queue2 = require("@sapphire/async-queue");
+var import_async_event_emitter = require("@vladfrangu/async_event_emitter");
+var import_v102 = require("discord-api-types/v10");
+var import_ws = require("ws");
+
+// src/utils/constants.ts
+var import_node_process = __toESM(require("process"));
+var import_collection5 = require("@discordjs/collection");
+var import_util = require("@discordjs/util");
+var import_v10 = require("discord-api-types/v10");
+
+// src/strategies/sharding/SimpleShardingStrategy.ts
+var import_collection3 = require("@discordjs/collection");
+
+// src/strategies/context/SimpleContextFetchingStrategy.ts
+var SimpleContextFetchingStrategy = class _SimpleContextFetchingStrategy {
+ constructor(manager, options) {
+ this.manager = manager;
+ this.options = options;
+ }
+ static {
+ __name(this, "SimpleContextFetchingStrategy");
+ }
+ // This strategy assumes every shard is running under the same process - therefore we need a single
+ // IdentifyThrottler per manager.
+ static throttlerCache = /* @__PURE__ */ new WeakMap();
+ static async ensureThrottler(manager) {
+ const throttler = _SimpleContextFetchingStrategy.throttlerCache.get(manager);
+ if (throttler) {
+ return throttler;
+ }
+ const newThrottler = await manager.options.buildIdentifyThrottler(manager);
+ _SimpleContextFetchingStrategy.throttlerCache.set(manager, newThrottler);
+ return newThrottler;
+ }
+ async retrieveSessionInfo(shardId) {
+ return this.manager.options.retrieveSessionInfo(shardId);
+ }
+ updateSessionInfo(shardId, sessionInfo) {
+ return this.manager.options.updateSessionInfo(shardId, sessionInfo);
+ }
+ async waitForIdentify(shardId, signal) {
+ const throttler = await _SimpleContextFetchingStrategy.ensureThrottler(this.manager);
+ await throttler.waitForIdentify(shardId, signal);
+ }
+};
+
+// src/strategies/sharding/SimpleShardingStrategy.ts
+var SimpleShardingStrategy = class {
+ static {
+ __name(this, "SimpleShardingStrategy");
+ }
+ manager;
+ shards = new import_collection3.Collection();
+ constructor(manager) {
+ this.manager = manager;
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.spawn}
+ */
+ async spawn(shardIds) {
+ const strategyOptions = await managerToFetchingStrategyOptions(this.manager);
+ for (const shardId of shardIds) {
+ const strategy = new SimpleContextFetchingStrategy(this.manager, strategyOptions);
+ const shard = new WebSocketShard(strategy, shardId);
+ for (const event of Object.values(WebSocketShardEvents)) {
+ shard.on(event, (payload) => this.manager.emit(event, { ...payload, shardId }));
+ }
+ this.shards.set(shardId, shard);
+ }
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.connect}
+ */
+ async connect() {
+ const promises = [];
+ for (const shard of this.shards.values()) {
+ promises.push(shard.connect());
+ }
+ await Promise.all(promises);
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.destroy}
+ */
+ async destroy(options) {
+ const promises = [];
+ for (const shard of this.shards.values()) {
+ promises.push(shard.destroy(options));
+ }
+ await Promise.all(promises);
+ this.shards.clear();
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.send}
+ */
+ async send(shardId, payload) {
+ const shard = this.shards.get(shardId);
+ if (!shard) {
+ throw new RangeError(`Shard ${shardId} not found`);
+ }
+ return shard.send(payload);
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.fetchStatus}
+ */
+ async fetchStatus() {
+ return this.shards.mapValues((shard) => shard.status);
+ }
+};
+
+// src/throttling/SimpleIdentifyThrottler.ts
+var import_promises = require("timers/promises");
+var import_collection4 = require("@discordjs/collection");
+var import_async_queue = require("@sapphire/async-queue");
+var SimpleIdentifyThrottler = class {
+ constructor(maxConcurrency) {
+ this.maxConcurrency = maxConcurrency;
+ }
+ static {
+ __name(this, "SimpleIdentifyThrottler");
+ }
+ states = new import_collection4.Collection();
+ /**
+ * {@inheritDoc IIdentifyThrottler.waitForIdentify}
+ */
+ async waitForIdentify(shardId, signal) {
+ const key = shardId % this.maxConcurrency;
+ const state = this.states.ensure(key, () => {
+ return {
+ queue: new import_async_queue.AsyncQueue(),
+ resetsAt: Number.POSITIVE_INFINITY
+ };
+ });
+ await state.queue.wait({ signal });
+ try {
+ const diff = state.resetsAt - Date.now();
+ if (diff <= 5e3) {
+ const time = diff + Math.random() * 1500;
+ await (0, import_promises.setTimeout)(time);
+ }
+ state.resetsAt = Date.now() + 5e3;
+ } finally {
+ state.queue.shift();
+ }
+ }
+};
+
+// src/utils/constants.ts
+var DefaultDeviceProperty = `@discordjs/ws 1.0.1`;
+var getDefaultSessionStore = (0, import_util.lazy)(() => new import_collection5.Collection());
+var DefaultWebSocketManagerOptions = {
+ async buildIdentifyThrottler(manager) {
+ const info = await manager.fetchGatewayInformation();
+ return new SimpleIdentifyThrottler(info.session_start_limit.max_concurrency);
+ },
+ buildStrategy: (manager) => new SimpleShardingStrategy(manager),
+ shardCount: null,
+ shardIds: null,
+ largeThreshold: null,
+ initialPresence: null,
+ identifyProperties: {
+ browser: DefaultDeviceProperty,
+ device: DefaultDeviceProperty,
+ os: import_node_process.default.platform
+ },
+ version: import_v10.APIVersion,
+ encoding: "json" /* JSON */,
+ compression: null,
+ retrieveSessionInfo(shardId) {
+ const store = getDefaultSessionStore();
+ return store.get(shardId) ?? null;
+ },
+ updateSessionInfo(shardId, info) {
+ const store = getDefaultSessionStore();
+ if (info) {
+ store.set(shardId, info);
+ } else {
+ store.delete(shardId);
+ }
+ },
+ handshakeTimeout: 3e4,
+ helloTimeout: 6e4,
+ readyTimeout: 15e3
+};
+var ImportantGatewayOpcodes = /* @__PURE__ */ new Set([
+ import_v10.GatewayOpcodes.Heartbeat,
+ import_v10.GatewayOpcodes.Identify,
+ import_v10.GatewayOpcodes.Resume
+]);
+function getInitialSendRateLimitState() {
+ return {
+ remaining: 120,
+ resetAt: Date.now() + 6e4
+ };
+}
+__name(getInitialSendRateLimitState, "getInitialSendRateLimitState");
+
+// src/ws/WebSocketShard.ts
+var getZlibSync = (0, import_util2.lazy)(async () => import("zlib-sync").then((mod) => mod.default).catch(() => null));
+var WebSocketShardEvents = /* @__PURE__ */ ((WebSocketShardEvents2) => {
+ WebSocketShardEvents2["Closed"] = "closed";
+ WebSocketShardEvents2["Debug"] = "debug";
+ WebSocketShardEvents2["Dispatch"] = "dispatch";
+ WebSocketShardEvents2["Error"] = "error";
+ WebSocketShardEvents2["HeartbeatComplete"] = "heartbeat";
+ WebSocketShardEvents2["Hello"] = "hello";
+ WebSocketShardEvents2["Ready"] = "ready";
+ WebSocketShardEvents2["Resumed"] = "resumed";
+ return WebSocketShardEvents2;
+})(WebSocketShardEvents || {});
+var WebSocketShardDestroyRecovery = /* @__PURE__ */ ((WebSocketShardDestroyRecovery2) => {
+ WebSocketShardDestroyRecovery2[WebSocketShardDestroyRecovery2["Reconnect"] = 0] = "Reconnect";
+ WebSocketShardDestroyRecovery2[WebSocketShardDestroyRecovery2["Resume"] = 1] = "Resume";
+ return WebSocketShardDestroyRecovery2;
+})(WebSocketShardDestroyRecovery || {});
+var WebSocketConstructor = import_ws.WebSocket;
+var WebSocketShard = class extends import_async_event_emitter.AsyncEventEmitter {
+ static {
+ __name(this, "WebSocketShard");
+ }
+ connection = null;
+ useIdentifyCompress = false;
+ inflate = null;
+ textDecoder = new import_node_util.TextDecoder();
+ replayedEvents = 0;
+ isAck = true;
+ sendRateLimitState = getInitialSendRateLimitState();
+ initialHeartbeatTimeoutController = null;
+ heartbeatInterval = null;
+ lastHeartbeatAt = -1;
+ // Indicates whether the shard has already resolved its original connect() call
+ initialConnectResolved = false;
+ // Indicates if we failed to connect to the ws url (ECONNREFUSED/ECONNRESET)
+ failedToConnectDueToNetworkError = false;
+ sendQueue = new import_async_queue2.AsyncQueue();
+ timeoutAbortControllers = new import_collection6.Collection();
+ strategy;
+ id;
+ #status = 0 /* Idle */;
+ get status() {
+ return this.#status;
+ }
+ constructor(strategy, id) {
+ super();
+ this.strategy = strategy;
+ this.id = id;
+ }
+ async connect() {
+ const controller = new AbortController();
+ let promise;
+ if (!this.initialConnectResolved) {
+ promise = Promise.race([
+ (0, import_node_events2.once)(this, "ready" /* Ready */, { signal: controller.signal }),
+ (0, import_node_events2.once)(this, "resumed" /* Resumed */, { signal: controller.signal })
+ ]);
+ }
+ void this.internalConnect();
+ try {
+ await promise;
+ } catch ({ error }) {
+ throw error;
+ } finally {
+ controller.abort();
+ }
+ this.initialConnectResolved = true;
+ }
+ async internalConnect() {
+ if (this.#status !== 0 /* Idle */) {
+ throw new Error("Tried to connect a shard that wasn't idle");
+ }
+ const { version, encoding, compression } = this.strategy.options;
+ const params = new import_node_url.URLSearchParams({ v: version, encoding });
+ if (compression) {
+ const zlib = await getZlibSync();
+ if (zlib) {
+ params.append("compress", compression);
+ this.inflate = new zlib.Inflate({
+ chunkSize: 65535,
+ to: "string"
+ });
+ } else if (!this.useIdentifyCompress) {
+ this.useIdentifyCompress = true;
+ console.warn(
+ "WebSocketShard: Compression is enabled but zlib-sync is not installed, falling back to identify compress"
+ );
+ }
+ }
+ const session = await this.strategy.retrieveSessionInfo(this.id);
+ const url = `${session?.resumeURL ?? this.strategy.options.gatewayInformation.url}?${params.toString()}`;
+ this.debug([`Connecting to ${url}`]);
+ const connection = new WebSocketConstructor(url, {
+ handshakeTimeout: this.strategy.options.handshakeTimeout ?? void 0
+ });
+ connection.binaryType = "arraybuffer";
+ connection.onmessage = (event) => {
+ void this.onMessage(event.data, event.data instanceof ArrayBuffer);
+ };
+ connection.onerror = (event) => {
+ this.onError(event.error);
+ };
+ connection.onclose = (event) => {
+ void this.onClose(event.code);
+ };
+ this.connection = connection;
+ this.#status = 1 /* Connecting */;
+ this.sendRateLimitState = getInitialSendRateLimitState();
+ const { ok } = await this.waitForEvent("hello" /* Hello */, this.strategy.options.helloTimeout);
+ if (!ok) {
+ return;
+ }
+ if (session?.shardCount === this.strategy.options.shardCount) {
+ await this.resume(session);
+ } else {
+ await this.identify();
+ }
+ }
+ async destroy(options = {}) {
+ if (this.#status === 0 /* Idle */) {
+ this.debug(["Tried to destroy a shard that was idle"]);
+ return;
+ }
+ if (!options.code) {
+ options.code = options.recover === 1 /* Resume */ ? 4200 /* Resuming */ : 1e3 /* Normal */;
+ }
+ this.debug([
+ "Destroying shard",
+ `Reason: ${options.reason ?? "none"}`,
+ `Code: ${options.code}`,
+ `Recover: ${options.recover === void 0 ? "none" : WebSocketShardDestroyRecovery[options.recover]}`
+ ]);
+ this.isAck = true;
+ if (this.heartbeatInterval) {
+ (0, import_node_timers.clearInterval)(this.heartbeatInterval);
+ }
+ if (this.initialHeartbeatTimeoutController) {
+ this.initialHeartbeatTimeoutController.abort();
+ this.initialHeartbeatTimeoutController = null;
+ }
+ this.lastHeartbeatAt = -1;
+ for (const controller of this.timeoutAbortControllers.values()) {
+ controller.abort();
+ }
+ this.timeoutAbortControllers.clear();
+ this.failedToConnectDueToNetworkError = false;
+ if (options.recover !== 1 /* Resume */) {
+ await this.strategy.updateSessionInfo(this.id, null);
+ }
+ if (this.connection) {
+ this.connection.onmessage = null;
+ this.connection.onclose = null;
+ const shouldClose = this.connection.readyState === import_ws.WebSocket.OPEN;
+ this.debug([
+ "Connection status during destroy",
+ `Needs closing: ${shouldClose}`,
+ `Ready state: ${this.connection.readyState}`
+ ]);
+ if (shouldClose) {
+ let outerResolve;
+ const promise = new Promise((resolve2) => {
+ outerResolve = resolve2;
+ });
+ this.connection.onclose = outerResolve;
+ this.connection.close(options.code, options.reason);
+ await promise;
+ this.emit("closed" /* Closed */, { code: options.code });
+ }
+ this.connection.onerror = null;
+ } else {
+ this.debug(["Destroying a shard that has no connection; please open an issue on GitHub"]);
+ }
+ this.#status = 0 /* Idle */;
+ if (options.recover !== void 0) {
+ await (0, import_promises2.setTimeout)(500);
+ return this.internalConnect();
+ }
+ }
+ async waitForEvent(event, timeoutDuration) {
+ this.debug([`Waiting for event ${event} ${timeoutDuration ? `for ${timeoutDuration}ms` : "indefinitely"}`]);
+ const timeoutController = new AbortController();
+ const timeout = timeoutDuration ? (0, import_node_timers.setTimeout)(() => timeoutController.abort(), timeoutDuration).unref() : null;
+ this.timeoutAbortControllers.set(event, timeoutController);
+ const closeController = new AbortController();
+ try {
+ const closed = await Promise.race([
+ (0, import_node_events2.once)(this, event, { signal: timeoutController.signal }).then(() => false),
+ (0, import_node_events2.once)(this, "closed" /* Closed */, { signal: closeController.signal }).then(() => true)
+ ]);
+ return { ok: !closed };
+ } catch {
+ void this.destroy({
+ code: 1e3 /* Normal */,
+ reason: "Something timed out or went wrong while waiting for an event",
+ recover: 0 /* Reconnect */
+ });
+ return { ok: false };
+ } finally {
+ if (timeout) {
+ (0, import_node_timers.clearTimeout)(timeout);
+ }
+ this.timeoutAbortControllers.delete(event);
+ if (!closeController.signal.aborted) {
+ closeController.abort();
+ }
+ }
+ }
+ async send(payload) {
+ if (!this.connection) {
+ throw new Error("WebSocketShard wasn't connected");
+ }
+ if (this.#status !== 3 /* Ready */ && !ImportantGatewayOpcodes.has(payload.op)) {
+ this.debug(["Tried to send a non-crucial payload before the shard was ready, waiting"]);
+ try {
+ await (0, import_node_events2.once)(this, "ready" /* Ready */);
+ } catch {
+ return this.send(payload);
+ }
+ }
+ await this.sendQueue.wait();
+ if (--this.sendRateLimitState.remaining <= 0) {
+ const now = Date.now();
+ if (this.sendRateLimitState.resetAt > now) {
+ const sleepFor = this.sendRateLimitState.resetAt - now;
+ this.debug([`Was about to hit the send rate limit, sleeping for ${sleepFor}ms`]);
+ const controller = new AbortController();
+ const interrupted = await Promise.race([
+ (0, import_promises2.setTimeout)(sleepFor).then(() => false),
+ (0, import_node_events2.once)(this, "closed" /* Closed */, { signal: controller.signal }).then(() => true)
+ ]);
+ if (interrupted) {
+ this.debug(["Connection closed while waiting for the send rate limit to reset, re-queueing payload"]);
+ this.sendQueue.shift();
+ return this.send(payload);
+ }
+ controller.abort();
+ }
+ this.sendRateLimitState = getInitialSendRateLimitState();
+ }
+ this.sendQueue.shift();
+ this.connection.send(JSON.stringify(payload));
+ }
+ async identify() {
+ this.debug(["Waiting for identify throttle"]);
+ const controller = new AbortController();
+ const closeHandler = /* @__PURE__ */ __name(() => {
+ controller.abort();
+ }, "closeHandler");
+ this.on("closed" /* Closed */, closeHandler);
+ try {
+ await this.strategy.waitForIdentify(this.id, controller.signal);
+ } catch {
+ if (controller.signal.aborted) {
+ this.debug(["Was waiting for an identify, but the shard closed in the meantime"]);
+ return;
+ }
+ this.debug([
+ "IContextFetchingStrategy#waitForIdentify threw an unknown error.",
+ "If you're using a custom strategy, this is probably nothing to worry about.",
+ "If you're not, please open an issue on GitHub."
+ ]);
+ await this.destroy({
+ reason: "Identify throttling logic failed",
+ recover: 1 /* Resume */
+ });
+ } finally {
+ this.off("closed" /* Closed */, closeHandler);
+ }
+ this.debug([
+ "Identifying",
+ `shard id: ${this.id.toString()}`,
+ `shard count: ${this.strategy.options.shardCount}`,
+ `intents: ${this.strategy.options.intents}`,
+ `compression: ${this.inflate ? "zlib-stream" : this.useIdentifyCompress ? "identify" : "none"}`
+ ]);
+ const d = {
+ token: this.strategy.options.token,
+ properties: this.strategy.options.identifyProperties,
+ intents: this.strategy.options.intents,
+ compress: this.useIdentifyCompress,
+ shard: [this.id, this.strategy.options.shardCount]
+ };
+ if (this.strategy.options.largeThreshold) {
+ d.large_threshold = this.strategy.options.largeThreshold;
+ }
+ if (this.strategy.options.initialPresence) {
+ d.presence = this.strategy.options.initialPresence;
+ }
+ await this.send({
+ op: import_v102.GatewayOpcodes.Identify,
+ d
+ });
+ await this.waitForEvent("ready" /* Ready */, this.strategy.options.readyTimeout);
+ }
+ async resume(session) {
+ this.debug([
+ "Resuming session",
+ `resume url: ${session.resumeURL}`,
+ `sequence: ${session.sequence}`,
+ `shard id: ${this.id.toString()}`
+ ]);
+ this.#status = 2 /* Resuming */;
+ this.replayedEvents = 0;
+ return this.send({
+ op: import_v102.GatewayOpcodes.Resume,
+ d: {
+ token: this.strategy.options.token,
+ seq: session.sequence,
+ session_id: session.sessionId
+ }
+ });
+ }
+ async heartbeat(requested = false) {
+ if (!this.isAck && !requested) {
+ return this.destroy({ reason: "Zombie connection", recover: 1 /* Resume */ });
+ }
+ const session = await this.strategy.retrieveSessionInfo(this.id);
+ await this.send({
+ op: import_v102.GatewayOpcodes.Heartbeat,
+ d: session?.sequence ?? null
+ });
+ this.lastHeartbeatAt = Date.now();
+ this.isAck = false;
+ }
+ async unpackMessage(data, isBinary) {
+ if (!isBinary) {
+ try {
+ return JSON.parse(data);
+ } catch {
+ return null;
+ }
+ }
+ const decompressable = new Uint8Array(data);
+ if (this.useIdentifyCompress) {
+ return new Promise((resolve2, reject) => {
+ (0, import_node_zlib.inflate)(decompressable, { chunkSize: 65535 }, (err, result) => {
+ if (err) {
+ reject(err);
+ return;
+ }
+ resolve2(JSON.parse(this.textDecoder.decode(result)));
+ });
+ });
+ }
+ if (this.inflate) {
+ const l = decompressable.length;
+ const flush = l >= 4 && decompressable[l - 4] === 0 && decompressable[l - 3] === 0 && decompressable[l - 2] === 255 && decompressable[l - 1] === 255;
+ const zlib = await getZlibSync();
+ this.inflate.push(import_node_buffer.Buffer.from(decompressable), flush ? zlib.Z_SYNC_FLUSH : zlib.Z_NO_FLUSH);
+ if (this.inflate.err) {
+ this.emit("error" /* Error */, {
+ error: new Error(`${this.inflate.err}${this.inflate.msg ? `: ${this.inflate.msg}` : ""}`)
+ });
+ }
+ if (!flush) {
+ return null;
+ }
+ const { result } = this.inflate;
+ if (!result) {
+ return null;
+ }
+ return JSON.parse(typeof result === "string" ? result : this.textDecoder.decode(result));
+ }
+ this.debug([
+ "Received a message we were unable to decompress",
+ `isBinary: ${isBinary.toString()}`,
+ `useIdentifyCompress: ${this.useIdentifyCompress.toString()}`,
+ `inflate: ${Boolean(this.inflate).toString()}`
+ ]);
+ return null;
+ }
+ async onMessage(data, isBinary) {
+ const payload = await this.unpackMessage(data, isBinary);
+ if (!payload) {
+ return;
+ }
+ switch (payload.op) {
+ case import_v102.GatewayOpcodes.Dispatch: {
+ if (this.#status === 2 /* Resuming */) {
+ this.replayedEvents++;
+ }
+ switch (payload.t) {
+ case import_v102.GatewayDispatchEvents.Ready: {
+ this.#status = 3 /* Ready */;
+ const session2 = {
+ sequence: payload.s,
+ sessionId: payload.d.session_id,
+ shardId: this.id,
+ shardCount: this.strategy.options.shardCount,
+ resumeURL: payload.d.resume_gateway_url
+ };
+ await this.strategy.updateSessionInfo(this.id, session2);
+ this.emit("ready" /* Ready */, { data: payload.d });
+ break;
+ }
+ case import_v102.GatewayDispatchEvents.Resumed: {
+ this.#status = 3 /* Ready */;
+ this.debug([`Resumed and replayed ${this.replayedEvents} events`]);
+ this.emit("resumed" /* Resumed */);
+ break;
+ }
+ default: {
+ break;
+ }
+ }
+ const session = await this.strategy.retrieveSessionInfo(this.id);
+ if (session) {
+ if (payload.s > session.sequence) {
+ await this.strategy.updateSessionInfo(this.id, { ...session, sequence: payload.s });
+ }
+ } else {
+ this.debug([
+ `Received a ${payload.t} event but no session is available. Session information cannot be re-constructed in this state without a full reconnect`
+ ]);
+ }
+ this.emit("dispatch" /* Dispatch */, { data: payload });
+ break;
+ }
+ case import_v102.GatewayOpcodes.Heartbeat: {
+ await this.heartbeat(true);
+ break;
+ }
+ case import_v102.GatewayOpcodes.Reconnect: {
+ await this.destroy({
+ reason: "Told to reconnect by Discord",
+ recover: 1 /* Resume */
+ });
+ break;
+ }
+ case import_v102.GatewayOpcodes.InvalidSession: {
+ this.debug([`Invalid session; will attempt to resume: ${payload.d.toString()}`]);
+ const session = await this.strategy.retrieveSessionInfo(this.id);
+ if (payload.d && session) {
+ await this.resume(session);
+ } else {
+ await this.destroy({
+ reason: "Invalid session",
+ recover: 0 /* Reconnect */
+ });
+ }
+ break;
+ }
+ case import_v102.GatewayOpcodes.Hello: {
+ this.emit("hello" /* Hello */);
+ const jitter = Math.random();
+ const firstWait = Math.floor(payload.d.heartbeat_interval * jitter);
+ this.debug([`Preparing first heartbeat of the connection with a jitter of ${jitter}; waiting ${firstWait}ms`]);
+ try {
+ const controller = new AbortController();
+ this.initialHeartbeatTimeoutController = controller;
+ await (0, import_promises2.setTimeout)(firstWait, void 0, { signal: controller.signal });
+ } catch {
+ this.debug(["Cancelled initial heartbeat due to #destroy being called"]);
+ return;
+ } finally {
+ this.initialHeartbeatTimeoutController = null;
+ }
+ await this.heartbeat();
+ this.debug([`First heartbeat sent, starting to beat every ${payload.d.heartbeat_interval}ms`]);
+ this.heartbeatInterval = (0, import_node_timers.setInterval)(() => void this.heartbeat(), payload.d.heartbeat_interval);
+ break;
+ }
+ case import_v102.GatewayOpcodes.HeartbeatAck: {
+ this.isAck = true;
+ const ackAt = Date.now();
+ this.emit("heartbeat" /* HeartbeatComplete */, {
+ ackAt,
+ heartbeatAt: this.lastHeartbeatAt,
+ latency: ackAt - this.lastHeartbeatAt
+ });
+ break;
+ }
+ }
+ }
+ onError(error) {
+ if ("code" in error && ["ECONNRESET", "ECONNREFUSED"].includes(error.code)) {
+ this.debug(["Failed to connect to the gateway URL specified due to a network error"]);
+ this.failedToConnectDueToNetworkError = true;
+ return;
+ }
+ this.emit("error" /* Error */, { error });
+ }
+ async onClose(code) {
+ this.emit("closed" /* Closed */, { code });
+ switch (code) {
+ case 1e3 /* Normal */: {
+ return this.destroy({
+ code,
+ reason: "Got disconnected by Discord",
+ recover: 0 /* Reconnect */
+ });
+ }
+ case 4200 /* Resuming */: {
+ break;
+ }
+ case import_v102.GatewayCloseCodes.UnknownError: {
+ this.debug([`An unknown error occurred: ${code}`]);
+ return this.destroy({ code, recover: 1 /* Resume */ });
+ }
+ case import_v102.GatewayCloseCodes.UnknownOpcode: {
+ this.debug(["An invalid opcode was sent to Discord."]);
+ return this.destroy({ code, recover: 1 /* Resume */ });
+ }
+ case import_v102.GatewayCloseCodes.DecodeError: {
+ this.debug(["An invalid payload was sent to Discord."]);
+ return this.destroy({ code, recover: 1 /* Resume */ });
+ }
+ case import_v102.GatewayCloseCodes.NotAuthenticated: {
+ this.debug(["A request was somehow sent before the identify/resume payload."]);
+ return this.destroy({ code, recover: 0 /* Reconnect */ });
+ }
+ case import_v102.GatewayCloseCodes.AuthenticationFailed: {
+ this.emit("error" /* Error */, {
+ error: new Error("Authentication failed")
+ });
+ return this.destroy({ code });
+ }
+ case import_v102.GatewayCloseCodes.AlreadyAuthenticated: {
+ this.debug(["More than one auth payload was sent."]);
+ return this.destroy({ code, recover: 0 /* Reconnect */ });
+ }
+ case import_v102.GatewayCloseCodes.InvalidSeq: {
+ this.debug(["An invalid sequence was sent."]);
+ return this.destroy({ code, recover: 0 /* Reconnect */ });
+ }
+ case import_v102.GatewayCloseCodes.RateLimited: {
+ this.debug(["The WebSocket rate limit has been hit, this should never happen"]);
+ return this.destroy({ code, recover: 0 /* Reconnect */ });
+ }
+ case import_v102.GatewayCloseCodes.SessionTimedOut: {
+ this.debug(["Session timed out."]);
+ return this.destroy({ code, recover: 1 /* Resume */ });
+ }
+ case import_v102.GatewayCloseCodes.InvalidShard: {
+ this.emit("error" /* Error */, {
+ error: new Error("Invalid shard")
+ });
+ return this.destroy({ code });
+ }
+ case import_v102.GatewayCloseCodes.ShardingRequired: {
+ this.emit("error" /* Error */, {
+ error: new Error("Sharding is required")
+ });
+ return this.destroy({ code });
+ }
+ case import_v102.GatewayCloseCodes.InvalidAPIVersion: {
+ this.emit("error" /* Error */, {
+ error: new Error("Used an invalid API version")
+ });
+ return this.destroy({ code });
+ }
+ case import_v102.GatewayCloseCodes.InvalidIntents: {
+ this.emit("error" /* Error */, {
+ error: new Error("Used invalid intents")
+ });
+ return this.destroy({ code });
+ }
+ case import_v102.GatewayCloseCodes.DisallowedIntents: {
+ this.emit("error" /* Error */, {
+ error: new Error("Used disallowed intents")
+ });
+ return this.destroy({ code });
+ }
+ default: {
+ this.debug([
+ `The gateway closed with an unexpected code ${code}, attempting to ${this.failedToConnectDueToNetworkError ? "reconnect" : "resume"}.`
+ ]);
+ return this.destroy({
+ code,
+ recover: this.failedToConnectDueToNetworkError ? 0 /* Reconnect */ : 1 /* Resume */
+ });
+ }
+ }
+ }
+ debug(messages) {
+ const message = `${messages[0]}${messages.length > 1 ? `
+${messages.slice(1).map((m) => ` ${m}`).join("\n")}` : ""}`;
+ this.emit("debug" /* Debug */, { message });
+ }
+};
+
+// src/utils/WorkerBootstrapper.ts
+var WorkerBootstrapper = class {
+ static {
+ __name(this, "WorkerBootstrapper");
+ }
+ /**
+ * The data passed to the worker thread
+ */
+ data = import_node_worker_threads3.workerData;
+ /**
+ * The shards that are managed by this worker
+ */
+ shards = new import_collection7.Collection();
+ constructor() {
+ if (import_node_worker_threads3.isMainThread) {
+ throw new Error("Expected WorkerBootstrap to not be used within the main thread");
+ }
+ }
+ /**
+ * Helper method to initiate a shard's connection process
+ */
+ async connect(shardId) {
+ const shard = this.shards.get(shardId);
+ if (!shard) {
+ throw new RangeError(`Shard ${shardId} does not exist`);
+ }
+ await shard.connect();
+ }
+ /**
+ * Helper method to destroy a shard
+ */
+ async destroy(shardId, options) {
+ const shard = this.shards.get(shardId);
+ if (!shard) {
+ throw new RangeError(`Shard ${shardId} does not exist`);
+ }
+ await shard.destroy(options);
+ }
+ /**
+ * Helper method to attach event listeners to the parentPort
+ */
+ setupThreadEvents() {
+ import_node_worker_threads3.parentPort.on("messageerror", (err) => {
+ throw err;
+ }).on("message", async (payload) => {
+ switch (payload.op) {
+ case 0 /* Connect */: {
+ await this.connect(payload.shardId);
+ const response = {
+ op: 0 /* Connected */,
+ shardId: payload.shardId
+ };
+ import_node_worker_threads3.parentPort.postMessage(response);
+ break;
+ }
+ case 1 /* Destroy */: {
+ await this.destroy(payload.shardId, payload.options);
+ const response = {
+ op: 1 /* Destroyed */,
+ shardId: payload.shardId
+ };
+ import_node_worker_threads3.parentPort.postMessage(response);
+ break;
+ }
+ case 2 /* Send */: {
+ const shard = this.shards.get(payload.shardId);
+ if (!shard) {
+ throw new RangeError(`Shard ${payload.shardId} does not exist`);
+ }
+ await shard.send(payload.payload);
+ break;
+ }
+ case 3 /* SessionInfoResponse */: {
+ break;
+ }
+ case 4 /* ShardIdentifyResponse */: {
+ break;
+ }
+ case 5 /* FetchStatus */: {
+ const shard = this.shards.get(payload.shardId);
+ if (!shard) {
+ throw new Error(`Shard ${payload.shardId} does not exist`);
+ }
+ const response = {
+ op: 6 /* FetchStatusResponse */,
+ status: shard.status,
+ nonce: payload.nonce
+ };
+ import_node_worker_threads3.parentPort.postMessage(response);
+ break;
+ }
+ }
+ });
+ }
+ /**
+ * Bootstraps the worker thread with the provided options
+ */
+ async bootstrap(options = {}) {
+ for (const shardId of this.data.shardIds) {
+ const shard = new WebSocketShard(new WorkerContextFetchingStrategy(this.data), shardId);
+ for (const event of options.forwardEvents ?? Object.values(WebSocketShardEvents)) {
+ shard.on(event, (data) => {
+ const payload = {
+ op: 2 /* Event */,
+ event,
+ data,
+ shardId
+ };
+ import_node_worker_threads3.parentPort.postMessage(payload);
+ });
+ }
+ await options.shardCallback?.(shard);
+ this.shards.set(shardId, shard);
+ }
+ this.setupThreadEvents();
+ const message = {
+ op: 7 /* WorkerReady */
+ };
+ import_node_worker_threads3.parentPort.postMessage(message);
+ }
+};
+
+// src/strategies/sharding/defaultWorker.ts
+var bootstrapper = new WorkerBootstrapper();
+void bootstrapper.bootstrap();
+//# sourceMappingURL=defaultWorker.js.map \ No newline at end of file
diff --git a/node_modules/@discordjs/ws/dist/defaultWorker.js.map b/node_modules/@discordjs/ws/dist/defaultWorker.js.map
new file mode 100644
index 0000000..1daa8d6
--- /dev/null
+++ b/node_modules/@discordjs/ws/dist/defaultWorker.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/utils/WorkerBootstrapper.ts","../src/strategies/context/WorkerContextFetchingStrategy.ts","../src/strategies/sharding/WorkerShardingStrategy.ts","../src/strategies/context/IContextFetchingStrategy.ts","../src/ws/WebSocketShard.ts","../src/utils/constants.ts","../src/strategies/sharding/SimpleShardingStrategy.ts","../src/strategies/context/SimpleContextFetchingStrategy.ts","../src/throttling/SimpleIdentifyThrottler.ts","../src/strategies/sharding/defaultWorker.ts"],"sourcesContent":["import { isMainThread, parentPort, workerData } from 'node:worker_threads';\nimport { Collection } from '@discordjs/collection';\nimport type { Awaitable } from '@discordjs/util';\nimport { WorkerContextFetchingStrategy } from '../strategies/context/WorkerContextFetchingStrategy.js';\nimport {\n\tWorkerReceivePayloadOp,\n\tWorkerSendPayloadOp,\n\ttype WorkerData,\n\ttype WorkerReceivePayload,\n\ttype WorkerSendPayload,\n} from '../strategies/sharding/WorkerShardingStrategy.js';\nimport type { WebSocketShardDestroyOptions } from '../ws/WebSocketShard.js';\nimport { WebSocketShardEvents, WebSocketShard } from '../ws/WebSocketShard.js';\n\n/**\n * Options for bootstrapping the worker\n */\nexport interface BootstrapOptions {\n\t/**\n\t * Shard events to just arbitrarily forward to the parent thread for the manager to emit\n\t * Note: By default, this will include ALL events\n\t * you most likely want to handle dispatch within the worker itself\n\t */\n\tforwardEvents?: WebSocketShardEvents[];\n\t/**\n\t * Function to call when a shard is created for additional setup\n\t */\n\tshardCallback?(shard: WebSocketShard): Awaitable<void>;\n}\n\n/**\n * Utility class for bootstrapping a worker thread to be used for sharding\n */\nexport class WorkerBootstrapper {\n\t/**\n\t * The data passed to the worker thread\n\t */\n\tprotected readonly data = workerData as WorkerData;\n\n\t/**\n\t * The shards that are managed by this worker\n\t */\n\tprotected readonly shards = new Collection<number, WebSocketShard>();\n\n\tpublic constructor() {\n\t\tif (isMainThread) {\n\t\t\tthrow new Error('Expected WorkerBootstrap to not be used within the main thread');\n\t\t}\n\t}\n\n\t/**\n\t * Helper method to initiate a shard's connection process\n\t */\n\tprotected async connect(shardId: number): Promise<void> {\n\t\tconst shard = this.shards.get(shardId);\n\t\tif (!shard) {\n\t\t\tthrow new RangeError(`Shard ${shardId} does not exist`);\n\t\t}\n\n\t\tawait shard.connect();\n\t}\n\n\t/**\n\t * Helper method to destroy a shard\n\t */\n\tprotected async destroy(shardId: number, options?: WebSocketShardDestroyOptions): Promise<void> {\n\t\tconst shard = this.shards.get(shardId);\n\t\tif (!shard) {\n\t\t\tthrow new RangeError(`Shard ${shardId} does not exist`);\n\t\t}\n\n\t\tawait shard.destroy(options);\n\t}\n\n\t/**\n\t * Helper method to attach event listeners to the parentPort\n\t */\n\tprotected setupThreadEvents(): void {\n\t\tparentPort!\n\t\t\t.on('messageerror', (err) => {\n\t\t\t\tthrow err;\n\t\t\t})\n\t\t\t.on('message', async (payload: WorkerSendPayload) => {\n\t\t\t\tswitch (payload.op) {\n\t\t\t\t\tcase WorkerSendPayloadOp.Connect: {\n\t\t\t\t\t\tawait this.connect(payload.shardId);\n\t\t\t\t\t\tconst response: WorkerReceivePayload = {\n\t\t\t\t\t\t\top: WorkerReceivePayloadOp.Connected,\n\t\t\t\t\t\t\tshardId: payload.shardId,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tparentPort!.postMessage(response);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.Destroy: {\n\t\t\t\t\t\tawait this.destroy(payload.shardId, payload.options);\n\t\t\t\t\t\tconst response: WorkerReceivePayload = {\n\t\t\t\t\t\t\top: WorkerReceivePayloadOp.Destroyed,\n\t\t\t\t\t\t\tshardId: payload.shardId,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tparentPort!.postMessage(response);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.Send: {\n\t\t\t\t\t\tconst shard = this.shards.get(payload.shardId);\n\t\t\t\t\t\tif (!shard) {\n\t\t\t\t\t\t\tthrow new RangeError(`Shard ${payload.shardId} does not exist`);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tawait shard.send(payload.payload);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.SessionInfoResponse: {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.ShardIdentifyResponse: {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.FetchStatus: {\n\t\t\t\t\t\tconst shard = this.shards.get(payload.shardId);\n\t\t\t\t\t\tif (!shard) {\n\t\t\t\t\t\t\tthrow new Error(`Shard ${payload.shardId} does not exist`);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst response: WorkerReceivePayload = {\n\t\t\t\t\t\t\top: WorkerReceivePayloadOp.FetchStatusResponse,\n\t\t\t\t\t\t\tstatus: shard.status,\n\t\t\t\t\t\t\tnonce: payload.nonce,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tparentPort!.postMessage(response);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\t/**\n\t * Bootstraps the worker thread with the provided options\n\t */\n\tpublic async bootstrap(options: Readonly<BootstrapOptions> = {}): Promise<void> {\n\t\t// Start by initializing the shards\n\t\tfor (const shardId of this.data.shardIds) {\n\t\t\tconst shard = new WebSocketShard(new WorkerContextFetchingStrategy(this.data), shardId);\n\t\t\tfor (const event of options.forwardEvents ?? Object.values(WebSocketShardEvents)) {\n\t\t\t\t// @ts-expect-error: Event types incompatible\n\t\t\t\tshard.on(event, (data) => {\n\t\t\t\t\tconst payload: WorkerReceivePayload = {\n\t\t\t\t\t\top: WorkerReceivePayloadOp.Event,\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\tdata,\n\t\t\t\t\t\tshardId,\n\t\t\t\t\t};\n\t\t\t\t\tparentPort!.postMessage(payload);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Any additional setup the user might want to do\n\t\t\tawait options.shardCallback?.(shard);\n\t\t\tthis.shards.set(shardId, shard);\n\t\t}\n\n\t\t// Lastly, start listening to messages from the parent thread\n\t\tthis.setupThreadEvents();\n\n\t\tconst message: WorkerReceivePayload = {\n\t\t\top: WorkerReceivePayloadOp.WorkerReady,\n\t\t};\n\t\tparentPort!.postMessage(message);\n\t}\n}\n","import { isMainThread, parentPort } from 'node:worker_threads';\nimport { Collection } from '@discordjs/collection';\nimport type { SessionInfo } from '../../ws/WebSocketManager.js';\nimport {\n\tWorkerReceivePayloadOp,\n\tWorkerSendPayloadOp,\n\ttype WorkerReceivePayload,\n\ttype WorkerSendPayload,\n} from '../sharding/WorkerShardingStrategy.js';\nimport type { FetchingStrategyOptions, IContextFetchingStrategy } from './IContextFetchingStrategy.js';\n\nexport class WorkerContextFetchingStrategy implements IContextFetchingStrategy {\n\tprivate readonly sessionPromises = new Collection<number, (session: SessionInfo | null) => void>();\n\n\tprivate readonly waitForIdentifyPromises = new Collection<\n\t\tnumber,\n\t\t{ reject(error: unknown): void; resolve(): void; signal: AbortSignal }\n\t>();\n\n\tpublic constructor(public readonly options: FetchingStrategyOptions) {\n\t\tif (isMainThread) {\n\t\t\tthrow new Error('Cannot instantiate WorkerContextFetchingStrategy on the main thread');\n\t\t}\n\n\t\tparentPort!.on('message', (payload: WorkerSendPayload) => {\n\t\t\tif (payload.op === WorkerSendPayloadOp.SessionInfoResponse) {\n\t\t\t\tthis.sessionPromises.get(payload.nonce)?.(payload.session);\n\t\t\t\tthis.sessionPromises.delete(payload.nonce);\n\t\t\t}\n\n\t\t\tif (payload.op === WorkerSendPayloadOp.ShardIdentifyResponse) {\n\t\t\t\tconst promise = this.waitForIdentifyPromises.get(payload.nonce);\n\t\t\t\tif (payload.ok) {\n\t\t\t\t\tpromise?.resolve();\n\t\t\t\t} else {\n\t\t\t\t\t// We need to make sure we reject with an abort error\n\t\t\t\t\tpromise?.reject(promise.signal.reason);\n\t\t\t\t}\n\n\t\t\t\tthis.waitForIdentifyPromises.delete(payload.nonce);\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic async retrieveSessionInfo(shardId: number): Promise<SessionInfo | null> {\n\t\tconst nonce = Math.random();\n\t\tconst payload: WorkerReceivePayload = {\n\t\t\top: WorkerReceivePayloadOp.RetrieveSessionInfo,\n\t\t\tshardId,\n\t\t\tnonce,\n\t\t};\n\t\t// eslint-disable-next-line no-promise-executor-return\n\t\tconst promise = new Promise<SessionInfo | null>((resolve) => this.sessionPromises.set(nonce, resolve));\n\t\tparentPort!.postMessage(payload);\n\t\treturn promise;\n\t}\n\n\tpublic updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null) {\n\t\tconst payload: WorkerReceivePayload = {\n\t\t\top: WorkerReceivePayloadOp.UpdateSessionInfo,\n\t\t\tshardId,\n\t\t\tsession: sessionInfo,\n\t\t};\n\t\tparentPort!.postMessage(payload);\n\t}\n\n\tpublic async waitForIdentify(shardId: number, signal: AbortSignal): Promise<void> {\n\t\tconst nonce = Math.random();\n\n\t\tconst payload: WorkerReceivePayload = {\n\t\t\top: WorkerReceivePayloadOp.WaitForIdentify,\n\t\t\tnonce,\n\t\t\tshardId,\n\t\t};\n\t\tconst promise = new Promise<void>((resolve, reject) =>\n\t\t\t// eslint-disable-next-line no-promise-executor-return\n\t\t\tthis.waitForIdentifyPromises.set(nonce, { signal, resolve, reject }),\n\t\t);\n\n\t\tparentPort!.postMessage(payload);\n\n\t\tconst listener = () => {\n\t\t\tconst payload: WorkerReceivePayload = {\n\t\t\t\top: WorkerReceivePayloadOp.CancelIdentify,\n\t\t\t\tnonce,\n\t\t\t};\n\n\t\t\tparentPort!.postMessage(payload);\n\t\t};\n\n\t\tsignal.addEventListener('abort', listener);\n\n\t\ttry {\n\t\t\tawait promise;\n\t\t} finally {\n\t\t\tsignal.removeEventListener('abort', listener);\n\t\t}\n\t}\n}\n","import { once } from 'node:events';\nimport { join, isAbsolute, resolve } from 'node:path';\nimport { Worker } from 'node:worker_threads';\nimport { Collection } from '@discordjs/collection';\nimport type { GatewaySendPayload } from 'discord-api-types/v10';\nimport type { IIdentifyThrottler } from '../../throttling/IIdentifyThrottler.js';\nimport type { SessionInfo, WebSocketManager } from '../../ws/WebSocketManager.js';\nimport type {\n\tWebSocketShardDestroyOptions,\n\tWebSocketShardEvents,\n\tWebSocketShardStatus,\n} from '../../ws/WebSocketShard.js';\nimport { managerToFetchingStrategyOptions, type FetchingStrategyOptions } from '../context/IContextFetchingStrategy.js';\nimport type { IShardingStrategy } from './IShardingStrategy.js';\n\nexport interface WorkerData extends FetchingStrategyOptions {\n\tshardIds: number[];\n}\n\nexport enum WorkerSendPayloadOp {\n\tConnect,\n\tDestroy,\n\tSend,\n\tSessionInfoResponse,\n\tShardIdentifyResponse,\n\tFetchStatus,\n}\n\nexport type WorkerSendPayload =\n\t| { nonce: number; ok: boolean; op: WorkerSendPayloadOp.ShardIdentifyResponse }\n\t| { nonce: number; op: WorkerSendPayloadOp.FetchStatus; shardId: number }\n\t| { nonce: number; op: WorkerSendPayloadOp.SessionInfoResponse; session: SessionInfo | null }\n\t| { op: WorkerSendPayloadOp.Connect; shardId: number }\n\t| { op: WorkerSendPayloadOp.Destroy; options?: WebSocketShardDestroyOptions; shardId: number }\n\t| { op: WorkerSendPayloadOp.Send; payload: GatewaySendPayload; shardId: number };\n\nexport enum WorkerReceivePayloadOp {\n\tConnected,\n\tDestroyed,\n\tEvent,\n\tRetrieveSessionInfo,\n\tUpdateSessionInfo,\n\tWaitForIdentify,\n\tFetchStatusResponse,\n\tWorkerReady,\n\tCancelIdentify,\n}\n\nexport type WorkerReceivePayload =\n\t// Can't seem to get a type-safe union based off of the event, so I'm sadly leaving data as any for now\n\t| { data: any; event: WebSocketShardEvents; op: WorkerReceivePayloadOp.Event; shardId: number }\n\t| { nonce: number; op: WorkerReceivePayloadOp.CancelIdentify }\n\t| { nonce: number; op: WorkerReceivePayloadOp.FetchStatusResponse; status: WebSocketShardStatus }\n\t| { nonce: number; op: WorkerReceivePayloadOp.RetrieveSessionInfo; shardId: number }\n\t| { nonce: number; op: WorkerReceivePayloadOp.WaitForIdentify; shardId: number }\n\t| { op: WorkerReceivePayloadOp.Connected; shardId: number }\n\t| { op: WorkerReceivePayloadOp.Destroyed; shardId: number }\n\t| { op: WorkerReceivePayloadOp.UpdateSessionInfo; session: SessionInfo | null; shardId: number }\n\t| { op: WorkerReceivePayloadOp.WorkerReady };\n\n/**\n * Options for a {@link WorkerShardingStrategy}\n */\nexport interface WorkerShardingStrategyOptions {\n\t/**\n\t * Dictates how many shards should be spawned per worker thread.\n\t */\n\tshardsPerWorker: number | 'all';\n\t/**\n\t * Path to the worker file to use. The worker requires quite a bit of setup, it is recommended you leverage the {@link WorkerBootstrapper} class.\n\t */\n\tworkerPath?: string;\n}\n\n/**\n * Strategy used to spawn threads in worker_threads\n */\nexport class WorkerShardingStrategy implements IShardingStrategy {\n\tprivate readonly manager: WebSocketManager;\n\n\tprivate readonly options: WorkerShardingStrategyOptions;\n\n\t#workers: Worker[] = [];\n\n\treadonly #workerByShardId = new Collection<number, Worker>();\n\n\tprivate readonly connectPromises = new Collection<number, () => void>();\n\n\tprivate readonly destroyPromises = new Collection<number, () => void>();\n\n\tprivate readonly fetchStatusPromises = new Collection<number, (status: WebSocketShardStatus) => void>();\n\n\tprivate readonly waitForIdentifyControllers = new Collection<number, AbortController>();\n\n\tprivate throttler?: IIdentifyThrottler;\n\n\tpublic constructor(manager: WebSocketManager, options: WorkerShardingStrategyOptions) {\n\t\tthis.manager = manager;\n\t\tthis.options = options;\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.spawn}\n\t */\n\tpublic async spawn(shardIds: number[]) {\n\t\tconst shardsPerWorker = this.options.shardsPerWorker === 'all' ? shardIds.length : this.options.shardsPerWorker;\n\t\tconst strategyOptions = await managerToFetchingStrategyOptions(this.manager);\n\n\t\tconst loops = Math.ceil(shardIds.length / shardsPerWorker);\n\t\tconst promises: Promise<void>[] = [];\n\n\t\tfor (let idx = 0; idx < loops; idx++) {\n\t\t\tconst slice = shardIds.slice(idx * shardsPerWorker, (idx + 1) * shardsPerWorker);\n\t\t\tconst workerData: WorkerData = {\n\t\t\t\t...strategyOptions,\n\t\t\t\tshardIds: slice,\n\t\t\t};\n\n\t\t\tpromises.push(this.setupWorker(workerData));\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.connect}\n\t */\n\tpublic async connect() {\n\t\tconst promises = [];\n\n\t\tfor (const [shardId, worker] of this.#workerByShardId.entries()) {\n\t\t\tconst payload: WorkerSendPayload = {\n\t\t\t\top: WorkerSendPayloadOp.Connect,\n\t\t\t\tshardId,\n\t\t\t};\n\n\t\t\t// eslint-disable-next-line no-promise-executor-return\n\t\t\tconst promise = new Promise<void>((resolve) => this.connectPromises.set(shardId, resolve));\n\t\t\tworker.postMessage(payload);\n\t\t\tpromises.push(promise);\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.destroy}\n\t */\n\tpublic async destroy(options: Omit<WebSocketShardDestroyOptions, 'recover'> = {}) {\n\t\tconst promises = [];\n\n\t\tfor (const [shardId, worker] of this.#workerByShardId.entries()) {\n\t\t\tconst payload: WorkerSendPayload = {\n\t\t\t\top: WorkerSendPayloadOp.Destroy,\n\t\t\t\tshardId,\n\t\t\t\toptions,\n\t\t\t};\n\n\t\t\tpromises.push(\n\t\t\t\t// eslint-disable-next-line no-promise-executor-return, promise/prefer-await-to-then\n\t\t\t\tnew Promise<void>((resolve) => this.destroyPromises.set(shardId, resolve)).then(async () => worker.terminate()),\n\t\t\t);\n\t\t\tworker.postMessage(payload);\n\t\t}\n\n\t\tthis.#workers = [];\n\t\tthis.#workerByShardId.clear();\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.send}\n\t */\n\tpublic send(shardId: number, data: GatewaySendPayload) {\n\t\tconst worker = this.#workerByShardId.get(shardId);\n\t\tif (!worker) {\n\t\t\tthrow new Error(`No worker found for shard ${shardId}`);\n\t\t}\n\n\t\tconst payload: WorkerSendPayload = {\n\t\t\top: WorkerSendPayloadOp.Send,\n\t\t\tshardId,\n\t\t\tpayload: data,\n\t\t};\n\t\tworker.postMessage(payload);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.fetchStatus}\n\t */\n\tpublic async fetchStatus() {\n\t\tconst statuses = new Collection<number, WebSocketShardStatus>();\n\n\t\tfor (const [shardId, worker] of this.#workerByShardId.entries()) {\n\t\t\tconst nonce = Math.random();\n\t\t\tconst payload: WorkerSendPayload = {\n\t\t\t\top: WorkerSendPayloadOp.FetchStatus,\n\t\t\t\tshardId,\n\t\t\t\tnonce,\n\t\t\t};\n\n\t\t\t// eslint-disable-next-line no-promise-executor-return\n\t\t\tconst promise = new Promise<WebSocketShardStatus>((resolve) => this.fetchStatusPromises.set(nonce, resolve));\n\t\t\tworker.postMessage(payload);\n\n\t\t\tconst status = await promise;\n\t\t\tstatuses.set(shardId, status);\n\t\t}\n\n\t\treturn statuses;\n\t}\n\n\tprivate async setupWorker(workerData: WorkerData) {\n\t\tconst worker = new Worker(this.resolveWorkerPath(), { workerData });\n\n\t\tawait once(worker, 'online');\n\t\t// We do this in case the user has any potentially long running code in their worker\n\t\tawait this.waitForWorkerReady(worker);\n\n\t\tworker\n\t\t\t.on('error', (err) => {\n\t\t\t\tthrow err;\n\t\t\t})\n\t\t\t.on('messageerror', (err) => {\n\t\t\t\tthrow err;\n\t\t\t})\n\t\t\t.on('message', async (payload: WorkerReceivePayload) => this.onMessage(worker, payload));\n\n\t\tthis.#workers.push(worker);\n\t\tfor (const shardId of workerData.shardIds) {\n\t\t\tthis.#workerByShardId.set(shardId, worker);\n\t\t}\n\t}\n\n\tprivate resolveWorkerPath(): string {\n\t\tconst path = this.options.workerPath;\n\n\t\tif (!path) {\n\t\t\treturn join(__dirname, 'defaultWorker.js');\n\t\t}\n\n\t\tif (isAbsolute(path)) {\n\t\t\treturn path;\n\t\t}\n\n\t\tif (/^\\.\\.?[/\\\\]/.test(path)) {\n\t\t\treturn resolve(path);\n\t\t}\n\n\t\ttry {\n\t\t\treturn require.resolve(path);\n\t\t} catch {\n\t\t\treturn resolve(path);\n\t\t}\n\t}\n\n\tprivate async waitForWorkerReady(worker: Worker): Promise<void> {\n\t\treturn new Promise((resolve) => {\n\t\t\tconst handler = (payload: WorkerReceivePayload) => {\n\t\t\t\tif (payload.op === WorkerReceivePayloadOp.WorkerReady) {\n\t\t\t\t\tresolve();\n\t\t\t\t\tworker.off('message', handler);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tworker.on('message', handler);\n\t\t});\n\t}\n\n\tprivate async onMessage(worker: Worker, payload: WorkerReceivePayload) {\n\t\tswitch (payload.op) {\n\t\t\tcase WorkerReceivePayloadOp.Connected: {\n\t\t\t\tthis.connectPromises.get(payload.shardId)?.();\n\t\t\t\tthis.connectPromises.delete(payload.shardId);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.Destroyed: {\n\t\t\t\tthis.destroyPromises.get(payload.shardId)?.();\n\t\t\t\tthis.destroyPromises.delete(payload.shardId);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.Event: {\n\t\t\t\tthis.manager.emit(payload.event, { ...payload.data, shardId: payload.shardId });\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.RetrieveSessionInfo: {\n\t\t\t\tconst session = await this.manager.options.retrieveSessionInfo(payload.shardId);\n\t\t\t\tconst response: WorkerSendPayload = {\n\t\t\t\t\top: WorkerSendPayloadOp.SessionInfoResponse,\n\t\t\t\t\tnonce: payload.nonce,\n\t\t\t\t\tsession,\n\t\t\t\t};\n\t\t\t\tworker.postMessage(response);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.UpdateSessionInfo: {\n\t\t\t\tawait this.manager.options.updateSessionInfo(payload.shardId, payload.session);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.WaitForIdentify: {\n\t\t\t\tconst throttler = await this.ensureThrottler();\n\n\t\t\t\t// If this rejects it means we aborted, in which case we reply elsewhere.\n\t\t\t\ttry {\n\t\t\t\t\tconst controller = new AbortController();\n\t\t\t\t\tthis.waitForIdentifyControllers.set(payload.nonce, controller);\n\t\t\t\t\tawait throttler.waitForIdentify(payload.shardId, controller.signal);\n\t\t\t\t} catch {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst response: WorkerSendPayload = {\n\t\t\t\t\top: WorkerSendPayloadOp.ShardIdentifyResponse,\n\t\t\t\t\tnonce: payload.nonce,\n\t\t\t\t\tok: true,\n\t\t\t\t};\n\t\t\t\tworker.postMessage(response);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.FetchStatusResponse: {\n\t\t\t\tthis.fetchStatusPromises.get(payload.nonce)?.(payload.status);\n\t\t\t\tthis.fetchStatusPromises.delete(payload.nonce);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.WorkerReady: {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.CancelIdentify: {\n\t\t\t\tthis.waitForIdentifyControllers.get(payload.nonce)?.abort();\n\t\t\t\tthis.waitForIdentifyControllers.delete(payload.nonce);\n\n\t\t\t\tconst response: WorkerSendPayload = {\n\t\t\t\t\top: WorkerSendPayloadOp.ShardIdentifyResponse,\n\t\t\t\t\tnonce: payload.nonce,\n\t\t\t\t\tok: false,\n\t\t\t\t};\n\t\t\t\tworker.postMessage(response);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate async ensureThrottler(): Promise<IIdentifyThrottler> {\n\t\tthis.throttler ??= await this.manager.options.buildIdentifyThrottler(this.manager);\n\t\treturn this.throttler;\n\t}\n}\n","import type { Awaitable } from '@discordjs/util';\nimport type { APIGatewayBotInfo } from 'discord-api-types/v10';\nimport type { SessionInfo, WebSocketManager, WebSocketManagerOptions } from '../../ws/WebSocketManager.js';\n\nexport interface FetchingStrategyOptions\n\textends Omit<\n\t\tWebSocketManagerOptions,\n\t\t| 'buildIdentifyThrottler'\n\t\t| 'buildStrategy'\n\t\t| 'rest'\n\t\t| 'retrieveSessionInfo'\n\t\t| 'shardCount'\n\t\t| 'shardIds'\n\t\t| 'updateSessionInfo'\n\t> {\n\treadonly gatewayInformation: APIGatewayBotInfo;\n\treadonly shardCount: number;\n}\n\n/**\n * Strategies responsible solely for making manager information accessible\n */\nexport interface IContextFetchingStrategy {\n\treadonly options: FetchingStrategyOptions;\n\tretrieveSessionInfo(shardId: number): Awaitable<SessionInfo | null>;\n\tupdateSessionInfo(shardId: number, sessionInfo: SessionInfo | null): Awaitable<void>;\n\t/**\n\t * Resolves once the given shard should be allowed to identify\n\t * This should correctly handle the signal and reject with an abort error if the operation is aborted.\n\t * Other errors will cause the shard to reconnect.\n\t */\n\twaitForIdentify(shardId: number, signal: AbortSignal): Promise<void>;\n}\n\nexport async function managerToFetchingStrategyOptions(manager: WebSocketManager): Promise<FetchingStrategyOptions> {\n\t/* eslint-disable @typescript-eslint/unbound-method */\n\tconst {\n\t\tbuildIdentifyThrottler,\n\t\tbuildStrategy,\n\t\tretrieveSessionInfo,\n\t\tupdateSessionInfo,\n\t\tshardCount,\n\t\tshardIds,\n\t\trest,\n\t\t...managerOptions\n\t} = manager.options;\n\t/* eslint-enable @typescript-eslint/unbound-method */\n\n\treturn {\n\t\t...managerOptions,\n\t\tgatewayInformation: await manager.fetchGatewayInformation(),\n\t\tshardCount: await manager.getShardCount(),\n\t};\n}\n","/* eslint-disable id-length */\nimport { Buffer } from 'node:buffer';\nimport { once } from 'node:events';\nimport { clearInterval, clearTimeout, setInterval, setTimeout } from 'node:timers';\nimport { setTimeout as sleep } from 'node:timers/promises';\nimport { URLSearchParams } from 'node:url';\nimport { TextDecoder } from 'node:util';\nimport { inflate } from 'node:zlib';\nimport { Collection } from '@discordjs/collection';\nimport { lazy } from '@discordjs/util';\nimport { AsyncQueue } from '@sapphire/async-queue';\nimport { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';\nimport {\n\tGatewayCloseCodes,\n\tGatewayDispatchEvents,\n\tGatewayOpcodes,\n\ttype GatewayDispatchPayload,\n\ttype GatewayIdentifyData,\n\ttype GatewayReadyDispatchData,\n\ttype GatewayReceivePayload,\n\ttype GatewaySendPayload,\n} from 'discord-api-types/v10';\nimport { WebSocket, type Data } from 'ws';\nimport type { Inflate } from 'zlib-sync';\nimport type { IContextFetchingStrategy } from '../strategies/context/IContextFetchingStrategy.js';\nimport { ImportantGatewayOpcodes, getInitialSendRateLimitState } from '../utils/constants.js';\nimport type { SessionInfo } from './WebSocketManager.js';\n\n// eslint-disable-next-line promise/prefer-await-to-then\nconst getZlibSync = lazy(async () => import('zlib-sync').then((mod) => mod.default).catch(() => null));\n\nexport enum WebSocketShardEvents {\n\tClosed = 'closed',\n\tDebug = 'debug',\n\tDispatch = 'dispatch',\n\tError = 'error',\n\tHeartbeatComplete = 'heartbeat',\n\tHello = 'hello',\n\tReady = 'ready',\n\tResumed = 'resumed',\n}\n\nexport enum WebSocketShardStatus {\n\tIdle,\n\tConnecting,\n\tResuming,\n\tReady,\n}\n\nexport enum WebSocketShardDestroyRecovery {\n\tReconnect,\n\tResume,\n}\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type WebSocketShardEventsMap = {\n\t[WebSocketShardEvents.Closed]: [{ code: number }];\n\t[WebSocketShardEvents.Debug]: [payload: { message: string }];\n\t[WebSocketShardEvents.Dispatch]: [payload: { data: GatewayDispatchPayload }];\n\t[WebSocketShardEvents.Error]: [payload: { error: Error }];\n\t[WebSocketShardEvents.Hello]: [];\n\t[WebSocketShardEvents.Ready]: [payload: { data: GatewayReadyDispatchData }];\n\t[WebSocketShardEvents.Resumed]: [];\n\t[WebSocketShardEvents.HeartbeatComplete]: [payload: { ackAt: number; heartbeatAt: number; latency: number }];\n};\n\nexport interface WebSocketShardDestroyOptions {\n\tcode?: number;\n\treason?: string;\n\trecover?: WebSocketShardDestroyRecovery;\n}\n\nexport enum CloseCodes {\n\tNormal = 1_000,\n\tResuming = 4_200,\n}\n\nexport interface SendRateLimitState {\n\tremaining: number;\n\tresetAt: number;\n}\n\n// TODO(vladfrangu): enable this once https://github.com/oven-sh/bun/issues/3392 is solved\n// const WebSocketConstructor: typeof WebSocket = shouldUseGlobalFetchAndWebSocket()\n// \t? (globalThis as any).WebSocket\n// \t: WebSocket;\nconst WebSocketConstructor: typeof WebSocket = WebSocket;\n\nexport class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {\n\tprivate connection: WebSocket | null = null;\n\n\tprivate useIdentifyCompress = false;\n\n\tprivate inflate: Inflate | null = null;\n\n\tprivate readonly textDecoder = new TextDecoder();\n\n\tprivate replayedEvents = 0;\n\n\tprivate isAck = true;\n\n\tprivate sendRateLimitState: SendRateLimitState = getInitialSendRateLimitState();\n\n\tprivate initialHeartbeatTimeoutController: AbortController | null = null;\n\n\tprivate heartbeatInterval: NodeJS.Timer | null = null;\n\n\tprivate lastHeartbeatAt = -1;\n\n\t// Indicates whether the shard has already resolved its original connect() call\n\tprivate initialConnectResolved = false;\n\n\t// Indicates if we failed to connect to the ws url (ECONNREFUSED/ECONNRESET)\n\tprivate failedToConnectDueToNetworkError = false;\n\n\tprivate readonly sendQueue = new AsyncQueue();\n\n\tprivate readonly timeoutAbortControllers = new Collection<WebSocketShardEvents, AbortController>();\n\n\tprivate readonly strategy: IContextFetchingStrategy;\n\n\tpublic readonly id: number;\n\n\t#status: WebSocketShardStatus = WebSocketShardStatus.Idle;\n\n\tpublic get status(): WebSocketShardStatus {\n\t\treturn this.#status;\n\t}\n\n\tpublic constructor(strategy: IContextFetchingStrategy, id: number) {\n\t\tsuper();\n\t\tthis.strategy = strategy;\n\t\tthis.id = id;\n\t}\n\n\tpublic async connect() {\n\t\tconst controller = new AbortController();\n\t\tlet promise;\n\n\t\tif (!this.initialConnectResolved) {\n\t\t\t// Sleep for the remaining time, but if the connection closes in the meantime, we shouldn't wait the remainder to avoid blocking the new conn\n\t\t\tpromise = Promise.race([\n\t\t\t\tonce(this, WebSocketShardEvents.Ready, { signal: controller.signal }),\n\t\t\t\tonce(this, WebSocketShardEvents.Resumed, { signal: controller.signal }),\n\t\t\t]);\n\t\t}\n\n\t\tvoid this.internalConnect();\n\n\t\ttry {\n\t\t\tawait promise;\n\t\t} catch ({ error }: any) {\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\t// cleanup hanging listeners\n\t\t\tcontroller.abort();\n\t\t}\n\n\t\tthis.initialConnectResolved = true;\n\t}\n\n\tprivate async internalConnect() {\n\t\tif (this.#status !== WebSocketShardStatus.Idle) {\n\t\t\tthrow new Error(\"Tried to connect a shard that wasn't idle\");\n\t\t}\n\n\t\tconst { version, encoding, compression } = this.strategy.options;\n\t\tconst params = new URLSearchParams({ v: version, encoding });\n\t\tif (compression) {\n\t\t\tconst zlib = await getZlibSync();\n\t\t\tif (zlib) {\n\t\t\t\tparams.append('compress', compression);\n\t\t\t\tthis.inflate = new zlib.Inflate({\n\t\t\t\t\tchunkSize: 65_535,\n\t\t\t\t\tto: 'string',\n\t\t\t\t});\n\t\t\t} else if (!this.useIdentifyCompress) {\n\t\t\t\tthis.useIdentifyCompress = true;\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'WebSocketShard: Compression is enabled but zlib-sync is not installed, falling back to identify compress',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst session = await this.strategy.retrieveSessionInfo(this.id);\n\n\t\tconst url = `${session?.resumeURL ?? this.strategy.options.gatewayInformation.url}?${params.toString()}`;\n\n\t\tthis.debug([`Connecting to ${url}`]);\n\n\t\tconst connection = new WebSocketConstructor(url, {\n\t\t\thandshakeTimeout: this.strategy.options.handshakeTimeout ?? undefined,\n\t\t});\n\n\t\tconnection.binaryType = 'arraybuffer';\n\n\t\tconnection.onmessage = (event) => {\n\t\t\tvoid this.onMessage(event.data, event.data instanceof ArrayBuffer);\n\t\t};\n\n\t\tconnection.onerror = (event) => {\n\t\t\tthis.onError(event.error);\n\t\t};\n\n\t\tconnection.onclose = (event) => {\n\t\t\tvoid this.onClose(event.code);\n\t\t};\n\n\t\tthis.connection = connection;\n\n\t\tthis.#status = WebSocketShardStatus.Connecting;\n\n\t\tthis.sendRateLimitState = getInitialSendRateLimitState();\n\n\t\tconst { ok } = await this.waitForEvent(WebSocketShardEvents.Hello, this.strategy.options.helloTimeout);\n\t\tif (!ok) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (session?.shardCount === this.strategy.options.shardCount) {\n\t\t\tawait this.resume(session);\n\t\t} else {\n\t\t\tawait this.identify();\n\t\t}\n\t}\n\n\tpublic async destroy(options: WebSocketShardDestroyOptions = {}) {\n\t\tif (this.#status === WebSocketShardStatus.Idle) {\n\t\t\tthis.debug(['Tried to destroy a shard that was idle']);\n\t\t\treturn;\n\t\t}\n\n\t\tif (!options.code) {\n\t\t\toptions.code = options.recover === WebSocketShardDestroyRecovery.Resume ? CloseCodes.Resuming : CloseCodes.Normal;\n\t\t}\n\n\t\tthis.debug([\n\t\t\t'Destroying shard',\n\t\t\t`Reason: ${options.reason ?? 'none'}`,\n\t\t\t`Code: ${options.code}`,\n\t\t\t`Recover: ${options.recover === undefined ? 'none' : WebSocketShardDestroyRecovery[options.recover]!}`,\n\t\t]);\n\n\t\t// Reset state\n\t\tthis.isAck = true;\n\t\tif (this.heartbeatInterval) {\n\t\t\tclearInterval(this.heartbeatInterval);\n\t\t}\n\n\t\tif (this.initialHeartbeatTimeoutController) {\n\t\t\tthis.initialHeartbeatTimeoutController.abort();\n\t\t\tthis.initialHeartbeatTimeoutController = null;\n\t\t}\n\n\t\tthis.lastHeartbeatAt = -1;\n\n\t\tfor (const controller of this.timeoutAbortControllers.values()) {\n\t\t\tcontroller.abort();\n\t\t}\n\n\t\tthis.timeoutAbortControllers.clear();\n\n\t\tthis.failedToConnectDueToNetworkError = false;\n\n\t\t// Clear session state if applicable\n\t\tif (options.recover !== WebSocketShardDestroyRecovery.Resume) {\n\t\t\tawait this.strategy.updateSessionInfo(this.id, null);\n\t\t}\n\n\t\tif (this.connection) {\n\t\t\t// No longer need to listen to messages\n\t\t\tthis.connection.onmessage = null;\n\t\t\t// Prevent a reconnection loop by unbinding the main close event\n\t\t\tthis.connection.onclose = null;\n\n\t\t\tconst shouldClose = this.connection.readyState === WebSocket.OPEN;\n\n\t\t\tthis.debug([\n\t\t\t\t'Connection status during destroy',\n\t\t\t\t`Needs closing: ${shouldClose}`,\n\t\t\t\t`Ready state: ${this.connection.readyState}`,\n\t\t\t]);\n\n\t\t\tif (shouldClose) {\n\t\t\t\tlet outerResolve: () => void;\n\t\t\t\tconst promise = new Promise<void>((resolve) => {\n\t\t\t\t\touterResolve = resolve;\n\t\t\t\t});\n\n\t\t\t\tthis.connection.onclose = outerResolve!;\n\n\t\t\t\tthis.connection.close(options.code, options.reason);\n\n\t\t\t\tawait promise;\n\t\t\t\tthis.emit(WebSocketShardEvents.Closed, { code: options.code });\n\t\t\t}\n\n\t\t\t// Lastly, remove the error event.\n\t\t\t// Doing this earlier would cause a hard crash in case an error event fired on our `close` call\n\t\t\tthis.connection.onerror = null;\n\t\t} else {\n\t\t\tthis.debug(['Destroying a shard that has no connection; please open an issue on GitHub']);\n\t\t}\n\n\t\tthis.#status = WebSocketShardStatus.Idle;\n\n\t\tif (options.recover !== undefined) {\n\t\t\t// There's cases (like no internet connection) where we immediately fail to connect,\n\t\t\t// causing a very fast and draining reconnection loop.\n\t\t\tawait sleep(500);\n\t\t\treturn this.internalConnect();\n\t\t}\n\t}\n\n\tprivate async waitForEvent(event: WebSocketShardEvents, timeoutDuration?: number | null): Promise<{ ok: boolean }> {\n\t\tthis.debug([`Waiting for event ${event} ${timeoutDuration ? `for ${timeoutDuration}ms` : 'indefinitely'}`]);\n\t\tconst timeoutController = new AbortController();\n\t\tconst timeout = timeoutDuration ? setTimeout(() => timeoutController.abort(), timeoutDuration).unref() : null;\n\n\t\tthis.timeoutAbortControllers.set(event, timeoutController);\n\n\t\tconst closeController = new AbortController();\n\n\t\ttry {\n\t\t\t// If the first promise resolves, all is well. If the 2nd promise resolves,\n\t\t\t// the shard has meanwhile closed. In that case, a destroy is already ongoing, so we just need to\n\t\t\t// return false. Meanwhile, if something rejects (error event) or the first controller is aborted,\n\t\t\t// we enter the catch block and trigger a destroy there.\n\t\t\tconst closed = await Promise.race<boolean>([\n\t\t\t\tonce(this, event, { signal: timeoutController.signal }).then(() => false),\n\t\t\t\tonce(this, WebSocketShardEvents.Closed, { signal: closeController.signal }).then(() => true),\n\t\t\t]);\n\n\t\t\treturn { ok: !closed };\n\t\t} catch {\n\t\t\t// If we're here because of other reasons, we need to destroy the shard\n\t\t\tvoid this.destroy({\n\t\t\t\tcode: CloseCodes.Normal,\n\t\t\t\treason: 'Something timed out or went wrong while waiting for an event',\n\t\t\t\trecover: WebSocketShardDestroyRecovery.Reconnect,\n\t\t\t});\n\n\t\t\treturn { ok: false };\n\t\t} finally {\n\t\t\tif (timeout) {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t}\n\n\t\t\tthis.timeoutAbortControllers.delete(event);\n\n\t\t\t// Clean up the close listener to not leak memory\n\t\t\tif (!closeController.signal.aborted) {\n\t\t\t\tcloseController.abort();\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic async send(payload: GatewaySendPayload): Promise<void> {\n\t\tif (!this.connection) {\n\t\t\tthrow new Error(\"WebSocketShard wasn't connected\");\n\t\t}\n\n\t\tif (this.#status !== WebSocketShardStatus.Ready && !ImportantGatewayOpcodes.has(payload.op)) {\n\t\t\tthis.debug(['Tried to send a non-crucial payload before the shard was ready, waiting']);\n\t\t\t// This will throw if the shard throws an error event in the meantime, just requeue the payload\n\t\t\ttry {\n\t\t\t\tawait once(this, WebSocketShardEvents.Ready);\n\t\t\t} catch {\n\t\t\t\treturn this.send(payload);\n\t\t\t}\n\t\t}\n\n\t\tawait this.sendQueue.wait();\n\n\t\tif (--this.sendRateLimitState.remaining <= 0) {\n\t\t\tconst now = Date.now();\n\n\t\t\tif (this.sendRateLimitState.resetAt > now) {\n\t\t\t\tconst sleepFor = this.sendRateLimitState.resetAt - now;\n\n\t\t\t\tthis.debug([`Was about to hit the send rate limit, sleeping for ${sleepFor}ms`]);\n\t\t\t\tconst controller = new AbortController();\n\n\t\t\t\t// Sleep for the remaining time, but if the connection closes in the meantime, we shouldn't wait the remainder to avoid blocking the new conn\n\t\t\t\tconst interrupted = await Promise.race([\n\t\t\t\t\tsleep(sleepFor).then(() => false),\n\t\t\t\t\tonce(this, WebSocketShardEvents.Closed, { signal: controller.signal }).then(() => true),\n\t\t\t\t]);\n\n\t\t\t\tif (interrupted) {\n\t\t\t\t\tthis.debug(['Connection closed while waiting for the send rate limit to reset, re-queueing payload']);\n\t\t\t\t\tthis.sendQueue.shift();\n\t\t\t\t\treturn this.send(payload);\n\t\t\t\t}\n\n\t\t\t\t// This is so the listener from the `once` call is removed\n\t\t\t\tcontroller.abort();\n\t\t\t}\n\n\t\t\tthis.sendRateLimitState = getInitialSendRateLimitState();\n\t\t}\n\n\t\tthis.sendQueue.shift();\n\t\tthis.connection.send(JSON.stringify(payload));\n\t}\n\n\tprivate async identify() {\n\t\tthis.debug(['Waiting for identify throttle']);\n\n\t\tconst controller = new AbortController();\n\t\tconst closeHandler = () => {\n\t\t\tcontroller.abort();\n\t\t};\n\n\t\tthis.on(WebSocketShardEvents.Closed, closeHandler);\n\n\t\ttry {\n\t\t\tawait this.strategy.waitForIdentify(this.id, controller.signal);\n\t\t} catch {\n\t\t\tif (controller.signal.aborted) {\n\t\t\t\tthis.debug(['Was waiting for an identify, but the shard closed in the meantime']);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.debug([\n\t\t\t\t'IContextFetchingStrategy#waitForIdentify threw an unknown error.',\n\t\t\t\t\"If you're using a custom strategy, this is probably nothing to worry about.\",\n\t\t\t\t\"If you're not, please open an issue on GitHub.\",\n\t\t\t]);\n\n\t\t\tawait this.destroy({\n\t\t\t\treason: 'Identify throttling logic failed',\n\t\t\t\trecover: WebSocketShardDestroyRecovery.Resume,\n\t\t\t});\n\t\t} finally {\n\t\t\tthis.off(WebSocketShardEvents.Closed, closeHandler);\n\t\t}\n\n\t\tthis.debug([\n\t\t\t'Identifying',\n\t\t\t`shard id: ${this.id.toString()}`,\n\t\t\t`shard count: ${this.strategy.options.shardCount}`,\n\t\t\t`intents: ${this.strategy.options.intents}`,\n\t\t\t`compression: ${this.inflate ? 'zlib-stream' : this.useIdentifyCompress ? 'identify' : 'none'}`,\n\t\t]);\n\n\t\tconst d: GatewayIdentifyData = {\n\t\t\ttoken: this.strategy.options.token,\n\t\t\tproperties: this.strategy.options.identifyProperties,\n\t\t\tintents: this.strategy.options.intents,\n\t\t\tcompress: this.useIdentifyCompress,\n\t\t\tshard: [this.id, this.strategy.options.shardCount],\n\t\t};\n\n\t\tif (this.strategy.options.largeThreshold) {\n\t\t\td.large_threshold = this.strategy.options.largeThreshold;\n\t\t}\n\n\t\tif (this.strategy.options.initialPresence) {\n\t\t\td.presence = this.strategy.options.initialPresence;\n\t\t}\n\n\t\tawait this.send({\n\t\t\top: GatewayOpcodes.Identify,\n\t\t\td,\n\t\t});\n\n\t\tawait this.waitForEvent(WebSocketShardEvents.Ready, this.strategy.options.readyTimeout);\n\t}\n\n\tprivate async resume(session: SessionInfo) {\n\t\tthis.debug([\n\t\t\t'Resuming session',\n\t\t\t`resume url: ${session.resumeURL}`,\n\t\t\t`sequence: ${session.sequence}`,\n\t\t\t`shard id: ${this.id.toString()}`,\n\t\t]);\n\n\t\tthis.#status = WebSocketShardStatus.Resuming;\n\t\tthis.replayedEvents = 0;\n\t\treturn this.send({\n\t\t\top: GatewayOpcodes.Resume,\n\t\t\td: {\n\t\t\t\ttoken: this.strategy.options.token,\n\t\t\t\tseq: session.sequence,\n\t\t\t\tsession_id: session.sessionId,\n\t\t\t},\n\t\t});\n\t}\n\n\tprivate async heartbeat(requested = false) {\n\t\tif (!this.isAck && !requested) {\n\t\t\treturn this.destroy({ reason: 'Zombie connection', recover: WebSocketShardDestroyRecovery.Resume });\n\t\t}\n\n\t\tconst session = await this.strategy.retrieveSessionInfo(this.id);\n\n\t\tawait this.send({\n\t\t\top: GatewayOpcodes.Heartbeat,\n\t\t\td: session?.sequence ?? null,\n\t\t});\n\n\t\tthis.lastHeartbeatAt = Date.now();\n\t\tthis.isAck = false;\n\t}\n\n\tprivate async unpackMessage(data: Data, isBinary: boolean): Promise<GatewayReceivePayload | null> {\n\t\t// Deal with no compression\n\t\tif (!isBinary) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(data as string) as GatewayReceivePayload;\n\t\t\t} catch {\n\t\t\t\t// This is a non-JSON payload / (at the time of writing this comment) emitted by bun wrongly interpreting custom close codes https://github.com/oven-sh/bun/issues/3392\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\tconst decompressable = new Uint8Array(data as ArrayBuffer);\n\n\t\t// Deal with identify compress\n\t\tif (this.useIdentifyCompress) {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t// eslint-disable-next-line promise/prefer-await-to-callbacks\n\t\t\t\tinflate(decompressable, { chunkSize: 65_535 }, (err, result) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(JSON.parse(this.textDecoder.decode(result)) as GatewayReceivePayload);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\t// Deal with gw wide zlib-stream compression\n\t\tif (this.inflate) {\n\t\t\tconst l = decompressable.length;\n\t\t\tconst flush =\n\t\t\t\tl >= 4 &&\n\t\t\t\tdecompressable[l - 4] === 0x00 &&\n\t\t\t\tdecompressable[l - 3] === 0x00 &&\n\t\t\t\tdecompressable[l - 2] === 0xff &&\n\t\t\t\tdecompressable[l - 1] === 0xff;\n\n\t\t\tconst zlib = (await getZlibSync())!;\n\t\t\tthis.inflate.push(Buffer.from(decompressable), flush ? zlib.Z_SYNC_FLUSH : zlib.Z_NO_FLUSH);\n\n\t\t\tif (this.inflate.err) {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error(`${this.inflate.err}${this.inflate.msg ? `: ${this.inflate.msg}` : ''}`),\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!flush) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst { result } = this.inflate;\n\t\t\tif (!result) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn JSON.parse(typeof result === 'string' ? result : this.textDecoder.decode(result)) as GatewayReceivePayload;\n\t\t}\n\n\t\tthis.debug([\n\t\t\t'Received a message we were unable to decompress',\n\t\t\t`isBinary: ${isBinary.toString()}`,\n\t\t\t`useIdentifyCompress: ${this.useIdentifyCompress.toString()}`,\n\t\t\t`inflate: ${Boolean(this.inflate).toString()}`,\n\t\t]);\n\n\t\treturn null;\n\t}\n\n\tprivate async onMessage(data: Data, isBinary: boolean) {\n\t\tconst payload = await this.unpackMessage(data, isBinary);\n\t\tif (!payload) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (payload.op) {\n\t\t\tcase GatewayOpcodes.Dispatch: {\n\t\t\t\tif (this.#status === WebSocketShardStatus.Resuming) {\n\t\t\t\t\tthis.replayedEvents++;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line sonarjs/no-nested-switch\n\t\t\t\tswitch (payload.t) {\n\t\t\t\t\tcase GatewayDispatchEvents.Ready: {\n\t\t\t\t\t\tthis.#status = WebSocketShardStatus.Ready;\n\n\t\t\t\t\t\tconst session = {\n\t\t\t\t\t\t\tsequence: payload.s,\n\t\t\t\t\t\t\tsessionId: payload.d.session_id,\n\t\t\t\t\t\t\tshardId: this.id,\n\t\t\t\t\t\t\tshardCount: this.strategy.options.shardCount,\n\t\t\t\t\t\t\tresumeURL: payload.d.resume_gateway_url,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tawait this.strategy.updateSessionInfo(this.id, session);\n\n\t\t\t\t\t\tthis.emit(WebSocketShardEvents.Ready, { data: payload.d });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase GatewayDispatchEvents.Resumed: {\n\t\t\t\t\t\tthis.#status = WebSocketShardStatus.Ready;\n\t\t\t\t\t\tthis.debug([`Resumed and replayed ${this.replayedEvents} events`]);\n\t\t\t\t\t\tthis.emit(WebSocketShardEvents.Resumed);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst session = await this.strategy.retrieveSessionInfo(this.id);\n\t\t\t\tif (session) {\n\t\t\t\t\tif (payload.s > session.sequence) {\n\t\t\t\t\t\tawait this.strategy.updateSessionInfo(this.id, { ...session, sequence: payload.s });\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.debug([\n\t\t\t\t\t\t`Received a ${payload.t} event but no session is available. Session information cannot be re-constructed in this state without a full reconnect`,\n\t\t\t\t\t]);\n\t\t\t\t}\n\n\t\t\t\tthis.emit(WebSocketShardEvents.Dispatch, { data: payload });\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.Heartbeat: {\n\t\t\t\tawait this.heartbeat(true);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.Reconnect: {\n\t\t\t\tawait this.destroy({\n\t\t\t\t\treason: 'Told to reconnect by Discord',\n\t\t\t\t\trecover: WebSocketShardDestroyRecovery.Resume,\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.InvalidSession: {\n\t\t\t\tthis.debug([`Invalid session; will attempt to resume: ${payload.d.toString()}`]);\n\t\t\t\tconst session = await this.strategy.retrieveSessionInfo(this.id);\n\t\t\t\tif (payload.d && session) {\n\t\t\t\t\tawait this.resume(session);\n\t\t\t\t} else {\n\t\t\t\t\tawait this.destroy({\n\t\t\t\t\t\treason: 'Invalid session',\n\t\t\t\t\t\trecover: WebSocketShardDestroyRecovery.Reconnect,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.Hello: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Hello);\n\t\t\t\tconst jitter = Math.random();\n\t\t\t\tconst firstWait = Math.floor(payload.d.heartbeat_interval * jitter);\n\t\t\t\tthis.debug([`Preparing first heartbeat of the connection with a jitter of ${jitter}; waiting ${firstWait}ms`]);\n\n\t\t\t\ttry {\n\t\t\t\t\tconst controller = new AbortController();\n\t\t\t\t\tthis.initialHeartbeatTimeoutController = controller;\n\t\t\t\t\tawait sleep(firstWait, undefined, { signal: controller.signal });\n\t\t\t\t} catch {\n\t\t\t\t\tthis.debug(['Cancelled initial heartbeat due to #destroy being called']);\n\t\t\t\t\treturn;\n\t\t\t\t} finally {\n\t\t\t\t\tthis.initialHeartbeatTimeoutController = null;\n\t\t\t\t}\n\n\t\t\t\tawait this.heartbeat();\n\n\t\t\t\tthis.debug([`First heartbeat sent, starting to beat every ${payload.d.heartbeat_interval}ms`]);\n\t\t\t\tthis.heartbeatInterval = setInterval(() => void this.heartbeat(), payload.d.heartbeat_interval);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.HeartbeatAck: {\n\t\t\t\tthis.isAck = true;\n\n\t\t\t\tconst ackAt = Date.now();\n\t\t\t\tthis.emit(WebSocketShardEvents.HeartbeatComplete, {\n\t\t\t\t\tackAt,\n\t\t\t\t\theartbeatAt: this.lastHeartbeatAt,\n\t\t\t\t\tlatency: ackAt - this.lastHeartbeatAt,\n\t\t\t\t});\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate onError(error: Error) {\n\t\tif ('code' in error && ['ECONNRESET', 'ECONNREFUSED'].includes(error.code as string)) {\n\t\t\tthis.debug(['Failed to connect to the gateway URL specified due to a network error']);\n\t\t\tthis.failedToConnectDueToNetworkError = true;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.emit(WebSocketShardEvents.Error, { error });\n\t}\n\n\tprivate async onClose(code: number) {\n\t\tthis.emit(WebSocketShardEvents.Closed, { code });\n\n\t\tswitch (code) {\n\t\t\tcase CloseCodes.Normal: {\n\t\t\t\treturn this.destroy({\n\t\t\t\t\tcode,\n\t\t\t\t\treason: 'Got disconnected by Discord',\n\t\t\t\t\trecover: WebSocketShardDestroyRecovery.Reconnect,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tcase CloseCodes.Resuming: {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.UnknownError: {\n\t\t\t\tthis.debug([`An unknown error occurred: ${code}`]);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.UnknownOpcode: {\n\t\t\t\tthis.debug(['An invalid opcode was sent to Discord.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.DecodeError: {\n\t\t\t\tthis.debug(['An invalid payload was sent to Discord.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.NotAuthenticated: {\n\t\t\t\tthis.debug(['A request was somehow sent before the identify/resume payload.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Reconnect });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.AuthenticationFailed: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Authentication failed'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.AlreadyAuthenticated: {\n\t\t\t\tthis.debug(['More than one auth payload was sent.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Reconnect });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.InvalidSeq: {\n\t\t\t\tthis.debug(['An invalid sequence was sent.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Reconnect });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.RateLimited: {\n\t\t\t\tthis.debug(['The WebSocket rate limit has been hit, this should never happen']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Reconnect });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.SessionTimedOut: {\n\t\t\t\tthis.debug(['Session timed out.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.InvalidShard: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Invalid shard'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.ShardingRequired: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Sharding is required'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.InvalidAPIVersion: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Used an invalid API version'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.InvalidIntents: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Used invalid intents'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.DisallowedIntents: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Used disallowed intents'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\tthis.debug([\n\t\t\t\t\t`The gateway closed with an unexpected code ${code}, attempting to ${\n\t\t\t\t\t\tthis.failedToConnectDueToNetworkError ? 'reconnect' : 'resume'\n\t\t\t\t\t}.`,\n\t\t\t\t]);\n\t\t\t\treturn this.destroy({\n\t\t\t\t\tcode,\n\t\t\t\t\trecover: this.failedToConnectDueToNetworkError\n\t\t\t\t\t\t? WebSocketShardDestroyRecovery.Reconnect\n\t\t\t\t\t\t: WebSocketShardDestroyRecovery.Resume,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate debug(messages: [string, ...string[]]) {\n\t\tconst message = `${messages[0]}${\n\t\t\tmessages.length > 1\n\t\t\t\t? `\\n${messages\n\t\t\t\t\t\t.slice(1)\n\t\t\t\t\t\t.map((m) => `\t${m}`)\n\t\t\t\t\t\t.join('\\n')}`\n\t\t\t\t: ''\n\t\t}`;\n\n\t\tthis.emit(WebSocketShardEvents.Debug, { message });\n\t}\n}\n","import process from 'node:process';\nimport { Collection } from '@discordjs/collection';\nimport { lazy } from '@discordjs/util';\nimport { APIVersion, GatewayOpcodes } from 'discord-api-types/v10';\nimport { SimpleShardingStrategy } from '../strategies/sharding/SimpleShardingStrategy.js';\nimport { SimpleIdentifyThrottler } from '../throttling/SimpleIdentifyThrottler.js';\nimport type { SessionInfo, OptionalWebSocketManagerOptions, WebSocketManager } from '../ws/WebSocketManager.js';\nimport type { SendRateLimitState } from '../ws/WebSocketShard.js';\n\n/**\n * Valid encoding types\n */\nexport enum Encoding {\n\tJSON = 'json',\n}\n\n/**\n * Valid compression methods\n */\nexport enum CompressionMethod {\n\tZlibStream = 'zlib-stream',\n}\n\nexport const DefaultDeviceProperty = `@discordjs/ws 1.0.1` as `@discordjs/ws ${string}`;\n\nconst getDefaultSessionStore = lazy(() => new Collection<number, SessionInfo | null>());\n\n/**\n * Default options used by the manager\n */\nexport const DefaultWebSocketManagerOptions = {\n\tasync buildIdentifyThrottler(manager: WebSocketManager) {\n\t\tconst info = await manager.fetchGatewayInformation();\n\t\treturn new SimpleIdentifyThrottler(info.session_start_limit.max_concurrency);\n\t},\n\tbuildStrategy: (manager) => new SimpleShardingStrategy(manager),\n\tshardCount: null,\n\tshardIds: null,\n\tlargeThreshold: null,\n\tinitialPresence: null,\n\tidentifyProperties: {\n\t\tbrowser: DefaultDeviceProperty,\n\t\tdevice: DefaultDeviceProperty,\n\t\tos: process.platform,\n\t},\n\tversion: APIVersion,\n\tencoding: Encoding.JSON,\n\tcompression: null,\n\tretrieveSessionInfo(shardId) {\n\t\tconst store = getDefaultSessionStore();\n\t\treturn store.get(shardId) ?? null;\n\t},\n\tupdateSessionInfo(shardId: number, info: SessionInfo | null) {\n\t\tconst store = getDefaultSessionStore();\n\t\tif (info) {\n\t\t\tstore.set(shardId, info);\n\t\t} else {\n\t\t\tstore.delete(shardId);\n\t\t}\n\t},\n\thandshakeTimeout: 30_000,\n\thelloTimeout: 60_000,\n\treadyTimeout: 15_000,\n} as const satisfies OptionalWebSocketManagerOptions;\n\nexport const ImportantGatewayOpcodes = new Set([\n\tGatewayOpcodes.Heartbeat,\n\tGatewayOpcodes.Identify,\n\tGatewayOpcodes.Resume,\n]);\n\nexport function getInitialSendRateLimitState(): SendRateLimitState {\n\treturn {\n\t\tremaining: 120,\n\t\tresetAt: Date.now() + 60_000,\n\t};\n}\n","import { Collection } from '@discordjs/collection';\nimport type { GatewaySendPayload } from 'discord-api-types/v10';\nimport type { WebSocketManager } from '../../ws/WebSocketManager.js';\nimport { WebSocketShard, WebSocketShardEvents, type WebSocketShardDestroyOptions } from '../../ws/WebSocketShard.js';\nimport { managerToFetchingStrategyOptions } from '../context/IContextFetchingStrategy.js';\nimport { SimpleContextFetchingStrategy } from '../context/SimpleContextFetchingStrategy.js';\nimport type { IShardingStrategy } from './IShardingStrategy.js';\n\n/**\n * Simple strategy that just spawns shards in the current process\n */\nexport class SimpleShardingStrategy implements IShardingStrategy {\n\tprivate readonly manager: WebSocketManager;\n\n\tprivate readonly shards = new Collection<number, WebSocketShard>();\n\n\tpublic constructor(manager: WebSocketManager) {\n\t\tthis.manager = manager;\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.spawn}\n\t */\n\tpublic async spawn(shardIds: number[]) {\n\t\tconst strategyOptions = await managerToFetchingStrategyOptions(this.manager);\n\n\t\tfor (const shardId of shardIds) {\n\t\t\tconst strategy = new SimpleContextFetchingStrategy(this.manager, strategyOptions);\n\t\t\tconst shard = new WebSocketShard(strategy, shardId);\n\t\t\tfor (const event of Object.values(WebSocketShardEvents)) {\n\t\t\t\t// @ts-expect-error: Intentional\n\t\t\t\tshard.on(event, (payload) => this.manager.emit(event, { ...payload, shardId }));\n\t\t\t}\n\n\t\t\tthis.shards.set(shardId, shard);\n\t\t}\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.connect}\n\t */\n\tpublic async connect() {\n\t\tconst promises = [];\n\n\t\tfor (const shard of this.shards.values()) {\n\t\t\tpromises.push(shard.connect());\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.destroy}\n\t */\n\tpublic async destroy(options?: Omit<WebSocketShardDestroyOptions, 'recover'>) {\n\t\tconst promises = [];\n\n\t\tfor (const shard of this.shards.values()) {\n\t\t\tpromises.push(shard.destroy(options));\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t\tthis.shards.clear();\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.send}\n\t */\n\tpublic async send(shardId: number, payload: GatewaySendPayload) {\n\t\tconst shard = this.shards.get(shardId);\n\t\tif (!shard) {\n\t\t\tthrow new RangeError(`Shard ${shardId} not found`);\n\t\t}\n\n\t\treturn shard.send(payload);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.fetchStatus}\n\t */\n\tpublic async fetchStatus() {\n\t\treturn this.shards.mapValues((shard) => shard.status);\n\t}\n}\n","import type { IIdentifyThrottler } from '../../throttling/IIdentifyThrottler.js';\nimport type { SessionInfo, WebSocketManager } from '../../ws/WebSocketManager.js';\nimport type { FetchingStrategyOptions, IContextFetchingStrategy } from './IContextFetchingStrategy.js';\n\nexport class SimpleContextFetchingStrategy implements IContextFetchingStrategy {\n\t// This strategy assumes every shard is running under the same process - therefore we need a single\n\t// IdentifyThrottler per manager.\n\tprivate static throttlerCache = new WeakMap<WebSocketManager, IIdentifyThrottler>();\n\n\tprivate static async ensureThrottler(manager: WebSocketManager): Promise<IIdentifyThrottler> {\n\t\tconst throttler = SimpleContextFetchingStrategy.throttlerCache.get(manager);\n\t\tif (throttler) {\n\t\t\treturn throttler;\n\t\t}\n\n\t\tconst newThrottler = await manager.options.buildIdentifyThrottler(manager);\n\t\tSimpleContextFetchingStrategy.throttlerCache.set(manager, newThrottler);\n\n\t\treturn newThrottler;\n\t}\n\n\tpublic constructor(private readonly manager: WebSocketManager, public readonly options: FetchingStrategyOptions) {}\n\n\tpublic async retrieveSessionInfo(shardId: number): Promise<SessionInfo | null> {\n\t\treturn this.manager.options.retrieveSessionInfo(shardId);\n\t}\n\n\tpublic updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null) {\n\t\treturn this.manager.options.updateSessionInfo(shardId, sessionInfo);\n\t}\n\n\tpublic async waitForIdentify(shardId: number, signal: AbortSignal): Promise<void> {\n\t\tconst throttler = await SimpleContextFetchingStrategy.ensureThrottler(this.manager);\n\t\tawait throttler.waitForIdentify(shardId, signal);\n\t}\n}\n","import { setTimeout as sleep } from 'node:timers/promises';\nimport { Collection } from '@discordjs/collection';\nimport { AsyncQueue } from '@sapphire/async-queue';\nimport type { IIdentifyThrottler } from './IIdentifyThrottler.js';\n\n/**\n * The state of a rate limit key's identify queue.\n */\nexport interface IdentifyState {\n\tqueue: AsyncQueue;\n\tresetsAt: number;\n}\n\n/**\n * Local, in-memory identify throttler.\n */\nexport class SimpleIdentifyThrottler implements IIdentifyThrottler {\n\tprivate readonly states = new Collection<number, IdentifyState>();\n\n\tpublic constructor(private readonly maxConcurrency: number) {}\n\n\t/**\n\t * {@inheritDoc IIdentifyThrottler.waitForIdentify}\n\t */\n\tpublic async waitForIdentify(shardId: number, signal: AbortSignal): Promise<void> {\n\t\tconst key = shardId % this.maxConcurrency;\n\n\t\tconst state = this.states.ensure(key, () => {\n\t\t\treturn {\n\t\t\t\tqueue: new AsyncQueue(),\n\t\t\t\tresetsAt: Number.POSITIVE_INFINITY,\n\t\t\t};\n\t\t});\n\n\t\tawait state.queue.wait({ signal });\n\n\t\ttry {\n\t\t\tconst diff = state.resetsAt - Date.now();\n\t\t\tif (diff <= 5_000) {\n\t\t\t\t// To account for the latency the IDENTIFY payload goes through, we add a bit more wait time\n\t\t\t\tconst time = diff + Math.random() * 1_500;\n\t\t\t\tawait sleep(time);\n\t\t\t}\n\n\t\t\tstate.resetsAt = Date.now() + 5_000;\n\t\t} finally {\n\t\t\tstate.queue.shift();\n\t\t}\n\t}\n}\n","import { WorkerBootstrapper } from '../../utils/WorkerBootstrapper.js';\n\nconst bootstrapper = new WorkerBootstrapper();\nvoid bootstrapper.bootstrap();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,8BAAqD;AACrD,IAAAC,qBAA2B;;;ACD3B,IAAAC,8BAAyC;AACzC,IAAAC,qBAA2B;;;ACD3B,yBAAqB;AACrB,uBAA0C;AAC1C,iCAAuB;AACvB,wBAA2B;;;AC+B3B,eAAsB,iCAAiC,SAA6D;AAEnH,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAA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AS7KA,IAAM,eAAe,IAAI,mBAAmB;AAC5C,KAAK,aAAa,UAAU;","names":["import_node_worker_threads","import_collection","import_node_worker_threads","import_collection","resolve","payload","import_node_events","import_promises","import_collection","import_util","import_async_queue","import_v10","import_collection","import_collection","import_collection","sleep","process","WebSocketShardEvents","WebSocketShardDestroyRecovery","resolve","sleep","session"]} \ No newline at end of file
diff --git a/node_modules/@discordjs/ws/dist/defaultWorker.mjs b/node_modules/@discordjs/ws/dist/defaultWorker.mjs
new file mode 100644
index 0000000..9f90978
--- /dev/null
+++ b/node_modules/@discordjs/ws/dist/defaultWorker.mjs
@@ -0,0 +1,1033 @@
+var __defProp = Object.defineProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+
+// src/utils/WorkerBootstrapper.ts
+import { isMainThread as isMainThread2, parentPort as parentPort2, workerData } from "node:worker_threads";
+import { Collection as Collection7 } from "@discordjs/collection";
+
+// src/strategies/context/WorkerContextFetchingStrategy.ts
+import { isMainThread, parentPort } from "node:worker_threads";
+import { Collection as Collection2 } from "@discordjs/collection";
+
+// src/strategies/sharding/WorkerShardingStrategy.ts
+import { once } from "node:events";
+import { join, isAbsolute, resolve } from "node:path";
+import { Worker } from "node:worker_threads";
+import { Collection } from "@discordjs/collection";
+
+// src/strategies/context/IContextFetchingStrategy.ts
+async function managerToFetchingStrategyOptions(manager) {
+ const {
+ buildIdentifyThrottler,
+ buildStrategy,
+ retrieveSessionInfo,
+ updateSessionInfo,
+ shardCount,
+ shardIds,
+ rest,
+ ...managerOptions
+ } = manager.options;
+ return {
+ ...managerOptions,
+ gatewayInformation: await manager.fetchGatewayInformation(),
+ shardCount: await manager.getShardCount()
+ };
+}
+__name(managerToFetchingStrategyOptions, "managerToFetchingStrategyOptions");
+
+// src/strategies/context/WorkerContextFetchingStrategy.ts
+var WorkerContextFetchingStrategy = class {
+ constructor(options) {
+ this.options = options;
+ if (isMainThread) {
+ throw new Error("Cannot instantiate WorkerContextFetchingStrategy on the main thread");
+ }
+ parentPort.on("message", (payload) => {
+ if (payload.op === 3 /* SessionInfoResponse */) {
+ this.sessionPromises.get(payload.nonce)?.(payload.session);
+ this.sessionPromises.delete(payload.nonce);
+ }
+ if (payload.op === 4 /* ShardIdentifyResponse */) {
+ const promise = this.waitForIdentifyPromises.get(payload.nonce);
+ if (payload.ok) {
+ promise?.resolve();
+ } else {
+ promise?.reject(promise.signal.reason);
+ }
+ this.waitForIdentifyPromises.delete(payload.nonce);
+ }
+ });
+ }
+ static {
+ __name(this, "WorkerContextFetchingStrategy");
+ }
+ sessionPromises = new Collection2();
+ waitForIdentifyPromises = new Collection2();
+ async retrieveSessionInfo(shardId) {
+ const nonce = Math.random();
+ const payload = {
+ op: 3 /* RetrieveSessionInfo */,
+ shardId,
+ nonce
+ };
+ const promise = new Promise((resolve2) => this.sessionPromises.set(nonce, resolve2));
+ parentPort.postMessage(payload);
+ return promise;
+ }
+ updateSessionInfo(shardId, sessionInfo) {
+ const payload = {
+ op: 4 /* UpdateSessionInfo */,
+ shardId,
+ session: sessionInfo
+ };
+ parentPort.postMessage(payload);
+ }
+ async waitForIdentify(shardId, signal) {
+ const nonce = Math.random();
+ const payload = {
+ op: 5 /* WaitForIdentify */,
+ nonce,
+ shardId
+ };
+ const promise = new Promise(
+ (resolve2, reject) => (
+ // eslint-disable-next-line no-promise-executor-return
+ this.waitForIdentifyPromises.set(nonce, { signal, resolve: resolve2, reject })
+ )
+ );
+ parentPort.postMessage(payload);
+ const listener = /* @__PURE__ */ __name(() => {
+ const payload2 = {
+ op: 8 /* CancelIdentify */,
+ nonce
+ };
+ parentPort.postMessage(payload2);
+ }, "listener");
+ signal.addEventListener("abort", listener);
+ try {
+ await promise;
+ } finally {
+ signal.removeEventListener("abort", listener);
+ }
+ }
+};
+
+// src/ws/WebSocketShard.ts
+import { Buffer as Buffer2 } from "node:buffer";
+import { once as once2 } from "node:events";
+import { clearInterval, clearTimeout, setInterval, setTimeout } from "node:timers";
+import { setTimeout as sleep2 } from "node:timers/promises";
+import { URLSearchParams } from "node:url";
+import { TextDecoder } from "node:util";
+import { inflate } from "node:zlib";
+import { Collection as Collection6 } from "@discordjs/collection";
+import { lazy as lazy2 } from "@discordjs/util";
+import { AsyncQueue as AsyncQueue2 } from "@sapphire/async-queue";
+import { AsyncEventEmitter } from "@vladfrangu/async_event_emitter";
+import {
+ GatewayCloseCodes,
+ GatewayDispatchEvents,
+ GatewayOpcodes as GatewayOpcodes2
+} from "discord-api-types/v10";
+import { WebSocket } from "ws";
+
+// src/utils/constants.ts
+import process from "node:process";
+import { Collection as Collection5 } from "@discordjs/collection";
+import { lazy } from "@discordjs/util";
+import { APIVersion, GatewayOpcodes } from "discord-api-types/v10";
+
+// src/strategies/sharding/SimpleShardingStrategy.ts
+import { Collection as Collection3 } from "@discordjs/collection";
+
+// src/strategies/context/SimpleContextFetchingStrategy.ts
+var SimpleContextFetchingStrategy = class _SimpleContextFetchingStrategy {
+ constructor(manager, options) {
+ this.manager = manager;
+ this.options = options;
+ }
+ static {
+ __name(this, "SimpleContextFetchingStrategy");
+ }
+ // This strategy assumes every shard is running under the same process - therefore we need a single
+ // IdentifyThrottler per manager.
+ static throttlerCache = /* @__PURE__ */ new WeakMap();
+ static async ensureThrottler(manager) {
+ const throttler = _SimpleContextFetchingStrategy.throttlerCache.get(manager);
+ if (throttler) {
+ return throttler;
+ }
+ const newThrottler = await manager.options.buildIdentifyThrottler(manager);
+ _SimpleContextFetchingStrategy.throttlerCache.set(manager, newThrottler);
+ return newThrottler;
+ }
+ async retrieveSessionInfo(shardId) {
+ return this.manager.options.retrieveSessionInfo(shardId);
+ }
+ updateSessionInfo(shardId, sessionInfo) {
+ return this.manager.options.updateSessionInfo(shardId, sessionInfo);
+ }
+ async waitForIdentify(shardId, signal) {
+ const throttler = await _SimpleContextFetchingStrategy.ensureThrottler(this.manager);
+ await throttler.waitForIdentify(shardId, signal);
+ }
+};
+
+// src/strategies/sharding/SimpleShardingStrategy.ts
+var SimpleShardingStrategy = class {
+ static {
+ __name(this, "SimpleShardingStrategy");
+ }
+ manager;
+ shards = new Collection3();
+ constructor(manager) {
+ this.manager = manager;
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.spawn}
+ */
+ async spawn(shardIds) {
+ const strategyOptions = await managerToFetchingStrategyOptions(this.manager);
+ for (const shardId of shardIds) {
+ const strategy = new SimpleContextFetchingStrategy(this.manager, strategyOptions);
+ const shard = new WebSocketShard(strategy, shardId);
+ for (const event of Object.values(WebSocketShardEvents)) {
+ shard.on(event, (payload) => this.manager.emit(event, { ...payload, shardId }));
+ }
+ this.shards.set(shardId, shard);
+ }
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.connect}
+ */
+ async connect() {
+ const promises = [];
+ for (const shard of this.shards.values()) {
+ promises.push(shard.connect());
+ }
+ await Promise.all(promises);
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.destroy}
+ */
+ async destroy(options) {
+ const promises = [];
+ for (const shard of this.shards.values()) {
+ promises.push(shard.destroy(options));
+ }
+ await Promise.all(promises);
+ this.shards.clear();
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.send}
+ */
+ async send(shardId, payload) {
+ const shard = this.shards.get(shardId);
+ if (!shard) {
+ throw new RangeError(`Shard ${shardId} not found`);
+ }
+ return shard.send(payload);
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.fetchStatus}
+ */
+ async fetchStatus() {
+ return this.shards.mapValues((shard) => shard.status);
+ }
+};
+
+// src/throttling/SimpleIdentifyThrottler.ts
+import { setTimeout as sleep } from "node:timers/promises";
+import { Collection as Collection4 } from "@discordjs/collection";
+import { AsyncQueue } from "@sapphire/async-queue";
+var SimpleIdentifyThrottler = class {
+ constructor(maxConcurrency) {
+ this.maxConcurrency = maxConcurrency;
+ }
+ static {
+ __name(this, "SimpleIdentifyThrottler");
+ }
+ states = new Collection4();
+ /**
+ * {@inheritDoc IIdentifyThrottler.waitForIdentify}
+ */
+ async waitForIdentify(shardId, signal) {
+ const key = shardId % this.maxConcurrency;
+ const state = this.states.ensure(key, () => {
+ return {
+ queue: new AsyncQueue(),
+ resetsAt: Number.POSITIVE_INFINITY
+ };
+ });
+ await state.queue.wait({ signal });
+ try {
+ const diff = state.resetsAt - Date.now();
+ if (diff <= 5e3) {
+ const time = diff + Math.random() * 1500;
+ await sleep(time);
+ }
+ state.resetsAt = Date.now() + 5e3;
+ } finally {
+ state.queue.shift();
+ }
+ }
+};
+
+// src/utils/constants.ts
+var DefaultDeviceProperty = `@discordjs/ws 1.0.1`;
+var getDefaultSessionStore = lazy(() => new Collection5());
+var DefaultWebSocketManagerOptions = {
+ async buildIdentifyThrottler(manager) {
+ const info = await manager.fetchGatewayInformation();
+ return new SimpleIdentifyThrottler(info.session_start_limit.max_concurrency);
+ },
+ buildStrategy: (manager) => new SimpleShardingStrategy(manager),
+ shardCount: null,
+ shardIds: null,
+ largeThreshold: null,
+ initialPresence: null,
+ identifyProperties: {
+ browser: DefaultDeviceProperty,
+ device: DefaultDeviceProperty,
+ os: process.platform
+ },
+ version: APIVersion,
+ encoding: "json" /* JSON */,
+ compression: null,
+ retrieveSessionInfo(shardId) {
+ const store = getDefaultSessionStore();
+ return store.get(shardId) ?? null;
+ },
+ updateSessionInfo(shardId, info) {
+ const store = getDefaultSessionStore();
+ if (info) {
+ store.set(shardId, info);
+ } else {
+ store.delete(shardId);
+ }
+ },
+ handshakeTimeout: 3e4,
+ helloTimeout: 6e4,
+ readyTimeout: 15e3
+};
+var ImportantGatewayOpcodes = /* @__PURE__ */ new Set([
+ GatewayOpcodes.Heartbeat,
+ GatewayOpcodes.Identify,
+ GatewayOpcodes.Resume
+]);
+function getInitialSendRateLimitState() {
+ return {
+ remaining: 120,
+ resetAt: Date.now() + 6e4
+ };
+}
+__name(getInitialSendRateLimitState, "getInitialSendRateLimitState");
+
+// src/ws/WebSocketShard.ts
+var getZlibSync = lazy2(async () => import("zlib-sync").then((mod) => mod.default).catch(() => null));
+var WebSocketShardEvents = /* @__PURE__ */ ((WebSocketShardEvents2) => {
+ WebSocketShardEvents2["Closed"] = "closed";
+ WebSocketShardEvents2["Debug"] = "debug";
+ WebSocketShardEvents2["Dispatch"] = "dispatch";
+ WebSocketShardEvents2["Error"] = "error";
+ WebSocketShardEvents2["HeartbeatComplete"] = "heartbeat";
+ WebSocketShardEvents2["Hello"] = "hello";
+ WebSocketShardEvents2["Ready"] = "ready";
+ WebSocketShardEvents2["Resumed"] = "resumed";
+ return WebSocketShardEvents2;
+})(WebSocketShardEvents || {});
+var WebSocketShardDestroyRecovery = /* @__PURE__ */ ((WebSocketShardDestroyRecovery2) => {
+ WebSocketShardDestroyRecovery2[WebSocketShardDestroyRecovery2["Reconnect"] = 0] = "Reconnect";
+ WebSocketShardDestroyRecovery2[WebSocketShardDestroyRecovery2["Resume"] = 1] = "Resume";
+ return WebSocketShardDestroyRecovery2;
+})(WebSocketShardDestroyRecovery || {});
+var WebSocketConstructor = WebSocket;
+var WebSocketShard = class extends AsyncEventEmitter {
+ static {
+ __name(this, "WebSocketShard");
+ }
+ connection = null;
+ useIdentifyCompress = false;
+ inflate = null;
+ textDecoder = new TextDecoder();
+ replayedEvents = 0;
+ isAck = true;
+ sendRateLimitState = getInitialSendRateLimitState();
+ initialHeartbeatTimeoutController = null;
+ heartbeatInterval = null;
+ lastHeartbeatAt = -1;
+ // Indicates whether the shard has already resolved its original connect() call
+ initialConnectResolved = false;
+ // Indicates if we failed to connect to the ws url (ECONNREFUSED/ECONNRESET)
+ failedToConnectDueToNetworkError = false;
+ sendQueue = new AsyncQueue2();
+ timeoutAbortControllers = new Collection6();
+ strategy;
+ id;
+ #status = 0 /* Idle */;
+ get status() {
+ return this.#status;
+ }
+ constructor(strategy, id) {
+ super();
+ this.strategy = strategy;
+ this.id = id;
+ }
+ async connect() {
+ const controller = new AbortController();
+ let promise;
+ if (!this.initialConnectResolved) {
+ promise = Promise.race([
+ once2(this, "ready" /* Ready */, { signal: controller.signal }),
+ once2(this, "resumed" /* Resumed */, { signal: controller.signal })
+ ]);
+ }
+ void this.internalConnect();
+ try {
+ await promise;
+ } catch ({ error }) {
+ throw error;
+ } finally {
+ controller.abort();
+ }
+ this.initialConnectResolved = true;
+ }
+ async internalConnect() {
+ if (this.#status !== 0 /* Idle */) {
+ throw new Error("Tried to connect a shard that wasn't idle");
+ }
+ const { version, encoding, compression } = this.strategy.options;
+ const params = new URLSearchParams({ v: version, encoding });
+ if (compression) {
+ const zlib = await getZlibSync();
+ if (zlib) {
+ params.append("compress", compression);
+ this.inflate = new zlib.Inflate({
+ chunkSize: 65535,
+ to: "string"
+ });
+ } else if (!this.useIdentifyCompress) {
+ this.useIdentifyCompress = true;
+ console.warn(
+ "WebSocketShard: Compression is enabled but zlib-sync is not installed, falling back to identify compress"
+ );
+ }
+ }
+ const session = await this.strategy.retrieveSessionInfo(this.id);
+ const url = `${session?.resumeURL ?? this.strategy.options.gatewayInformation.url}?${params.toString()}`;
+ this.debug([`Connecting to ${url}`]);
+ const connection = new WebSocketConstructor(url, {
+ handshakeTimeout: this.strategy.options.handshakeTimeout ?? void 0
+ });
+ connection.binaryType = "arraybuffer";
+ connection.onmessage = (event) => {
+ void this.onMessage(event.data, event.data instanceof ArrayBuffer);
+ };
+ connection.onerror = (event) => {
+ this.onError(event.error);
+ };
+ connection.onclose = (event) => {
+ void this.onClose(event.code);
+ };
+ this.connection = connection;
+ this.#status = 1 /* Connecting */;
+ this.sendRateLimitState = getInitialSendRateLimitState();
+ const { ok } = await this.waitForEvent("hello" /* Hello */, this.strategy.options.helloTimeout);
+ if (!ok) {
+ return;
+ }
+ if (session?.shardCount === this.strategy.options.shardCount) {
+ await this.resume(session);
+ } else {
+ await this.identify();
+ }
+ }
+ async destroy(options = {}) {
+ if (this.#status === 0 /* Idle */) {
+ this.debug(["Tried to destroy a shard that was idle"]);
+ return;
+ }
+ if (!options.code) {
+ options.code = options.recover === 1 /* Resume */ ? 4200 /* Resuming */ : 1e3 /* Normal */;
+ }
+ this.debug([
+ "Destroying shard",
+ `Reason: ${options.reason ?? "none"}`,
+ `Code: ${options.code}`,
+ `Recover: ${options.recover === void 0 ? "none" : WebSocketShardDestroyRecovery[options.recover]}`
+ ]);
+ this.isAck = true;
+ if (this.heartbeatInterval) {
+ clearInterval(this.heartbeatInterval);
+ }
+ if (this.initialHeartbeatTimeoutController) {
+ this.initialHeartbeatTimeoutController.abort();
+ this.initialHeartbeatTimeoutController = null;
+ }
+ this.lastHeartbeatAt = -1;
+ for (const controller of this.timeoutAbortControllers.values()) {
+ controller.abort();
+ }
+ this.timeoutAbortControllers.clear();
+ this.failedToConnectDueToNetworkError = false;
+ if (options.recover !== 1 /* Resume */) {
+ await this.strategy.updateSessionInfo(this.id, null);
+ }
+ if (this.connection) {
+ this.connection.onmessage = null;
+ this.connection.onclose = null;
+ const shouldClose = this.connection.readyState === WebSocket.OPEN;
+ this.debug([
+ "Connection status during destroy",
+ `Needs closing: ${shouldClose}`,
+ `Ready state: ${this.connection.readyState}`
+ ]);
+ if (shouldClose) {
+ let outerResolve;
+ const promise = new Promise((resolve2) => {
+ outerResolve = resolve2;
+ });
+ this.connection.onclose = outerResolve;
+ this.connection.close(options.code, options.reason);
+ await promise;
+ this.emit("closed" /* Closed */, { code: options.code });
+ }
+ this.connection.onerror = null;
+ } else {
+ this.debug(["Destroying a shard that has no connection; please open an issue on GitHub"]);
+ }
+ this.#status = 0 /* Idle */;
+ if (options.recover !== void 0) {
+ await sleep2(500);
+ return this.internalConnect();
+ }
+ }
+ async waitForEvent(event, timeoutDuration) {
+ this.debug([`Waiting for event ${event} ${timeoutDuration ? `for ${timeoutDuration}ms` : "indefinitely"}`]);
+ const timeoutController = new AbortController();
+ const timeout = timeoutDuration ? setTimeout(() => timeoutController.abort(), timeoutDuration).unref() : null;
+ this.timeoutAbortControllers.set(event, timeoutController);
+ const closeController = new AbortController();
+ try {
+ const closed = await Promise.race([
+ once2(this, event, { signal: timeoutController.signal }).then(() => false),
+ once2(this, "closed" /* Closed */, { signal: closeController.signal }).then(() => true)
+ ]);
+ return { ok: !closed };
+ } catch {
+ void this.destroy({
+ code: 1e3 /* Normal */,
+ reason: "Something timed out or went wrong while waiting for an event",
+ recover: 0 /* Reconnect */
+ });
+ return { ok: false };
+ } finally {
+ if (timeout) {
+ clearTimeout(timeout);
+ }
+ this.timeoutAbortControllers.delete(event);
+ if (!closeController.signal.aborted) {
+ closeController.abort();
+ }
+ }
+ }
+ async send(payload) {
+ if (!this.connection) {
+ throw new Error("WebSocketShard wasn't connected");
+ }
+ if (this.#status !== 3 /* Ready */ && !ImportantGatewayOpcodes.has(payload.op)) {
+ this.debug(["Tried to send a non-crucial payload before the shard was ready, waiting"]);
+ try {
+ await once2(this, "ready" /* Ready */);
+ } catch {
+ return this.send(payload);
+ }
+ }
+ await this.sendQueue.wait();
+ if (--this.sendRateLimitState.remaining <= 0) {
+ const now = Date.now();
+ if (this.sendRateLimitState.resetAt > now) {
+ const sleepFor = this.sendRateLimitState.resetAt - now;
+ this.debug([`Was about to hit the send rate limit, sleeping for ${sleepFor}ms`]);
+ const controller = new AbortController();
+ const interrupted = await Promise.race([
+ sleep2(sleepFor).then(() => false),
+ once2(this, "closed" /* Closed */, { signal: controller.signal }).then(() => true)
+ ]);
+ if (interrupted) {
+ this.debug(["Connection closed while waiting for the send rate limit to reset, re-queueing payload"]);
+ this.sendQueue.shift();
+ return this.send(payload);
+ }
+ controller.abort();
+ }
+ this.sendRateLimitState = getInitialSendRateLimitState();
+ }
+ this.sendQueue.shift();
+ this.connection.send(JSON.stringify(payload));
+ }
+ async identify() {
+ this.debug(["Waiting for identify throttle"]);
+ const controller = new AbortController();
+ const closeHandler = /* @__PURE__ */ __name(() => {
+ controller.abort();
+ }, "closeHandler");
+ this.on("closed" /* Closed */, closeHandler);
+ try {
+ await this.strategy.waitForIdentify(this.id, controller.signal);
+ } catch {
+ if (controller.signal.aborted) {
+ this.debug(["Was waiting for an identify, but the shard closed in the meantime"]);
+ return;
+ }
+ this.debug([
+ "IContextFetchingStrategy#waitForIdentify threw an unknown error.",
+ "If you're using a custom strategy, this is probably nothing to worry about.",
+ "If you're not, please open an issue on GitHub."
+ ]);
+ await this.destroy({
+ reason: "Identify throttling logic failed",
+ recover: 1 /* Resume */
+ });
+ } finally {
+ this.off("closed" /* Closed */, closeHandler);
+ }
+ this.debug([
+ "Identifying",
+ `shard id: ${this.id.toString()}`,
+ `shard count: ${this.strategy.options.shardCount}`,
+ `intents: ${this.strategy.options.intents}`,
+ `compression: ${this.inflate ? "zlib-stream" : this.useIdentifyCompress ? "identify" : "none"}`
+ ]);
+ const d = {
+ token: this.strategy.options.token,
+ properties: this.strategy.options.identifyProperties,
+ intents: this.strategy.options.intents,
+ compress: this.useIdentifyCompress,
+ shard: [this.id, this.strategy.options.shardCount]
+ };
+ if (this.strategy.options.largeThreshold) {
+ d.large_threshold = this.strategy.options.largeThreshold;
+ }
+ if (this.strategy.options.initialPresence) {
+ d.presence = this.strategy.options.initialPresence;
+ }
+ await this.send({
+ op: GatewayOpcodes2.Identify,
+ d
+ });
+ await this.waitForEvent("ready" /* Ready */, this.strategy.options.readyTimeout);
+ }
+ async resume(session) {
+ this.debug([
+ "Resuming session",
+ `resume url: ${session.resumeURL}`,
+ `sequence: ${session.sequence}`,
+ `shard id: ${this.id.toString()}`
+ ]);
+ this.#status = 2 /* Resuming */;
+ this.replayedEvents = 0;
+ return this.send({
+ op: GatewayOpcodes2.Resume,
+ d: {
+ token: this.strategy.options.token,
+ seq: session.sequence,
+ session_id: session.sessionId
+ }
+ });
+ }
+ async heartbeat(requested = false) {
+ if (!this.isAck && !requested) {
+ return this.destroy({ reason: "Zombie connection", recover: 1 /* Resume */ });
+ }
+ const session = await this.strategy.retrieveSessionInfo(this.id);
+ await this.send({
+ op: GatewayOpcodes2.Heartbeat,
+ d: session?.sequence ?? null
+ });
+ this.lastHeartbeatAt = Date.now();
+ this.isAck = false;
+ }
+ async unpackMessage(data, isBinary) {
+ if (!isBinary) {
+ try {
+ return JSON.parse(data);
+ } catch {
+ return null;
+ }
+ }
+ const decompressable = new Uint8Array(data);
+ if (this.useIdentifyCompress) {
+ return new Promise((resolve2, reject) => {
+ inflate(decompressable, { chunkSize: 65535 }, (err, result) => {
+ if (err) {
+ reject(err);
+ return;
+ }
+ resolve2(JSON.parse(this.textDecoder.decode(result)));
+ });
+ });
+ }
+ if (this.inflate) {
+ const l = decompressable.length;
+ const flush = l >= 4 && decompressable[l - 4] === 0 && decompressable[l - 3] === 0 && decompressable[l - 2] === 255 && decompressable[l - 1] === 255;
+ const zlib = await getZlibSync();
+ this.inflate.push(Buffer2.from(decompressable), flush ? zlib.Z_SYNC_FLUSH : zlib.Z_NO_FLUSH);
+ if (this.inflate.err) {
+ this.emit("error" /* Error */, {
+ error: new Error(`${this.inflate.err}${this.inflate.msg ? `: ${this.inflate.msg}` : ""}`)
+ });
+ }
+ if (!flush) {
+ return null;
+ }
+ const { result } = this.inflate;
+ if (!result) {
+ return null;
+ }
+ return JSON.parse(typeof result === "string" ? result : this.textDecoder.decode(result));
+ }
+ this.debug([
+ "Received a message we were unable to decompress",
+ `isBinary: ${isBinary.toString()}`,
+ `useIdentifyCompress: ${this.useIdentifyCompress.toString()}`,
+ `inflate: ${Boolean(this.inflate).toString()}`
+ ]);
+ return null;
+ }
+ async onMessage(data, isBinary) {
+ const payload = await this.unpackMessage(data, isBinary);
+ if (!payload) {
+ return;
+ }
+ switch (payload.op) {
+ case GatewayOpcodes2.Dispatch: {
+ if (this.#status === 2 /* Resuming */) {
+ this.replayedEvents++;
+ }
+ switch (payload.t) {
+ case GatewayDispatchEvents.Ready: {
+ this.#status = 3 /* Ready */;
+ const session2 = {
+ sequence: payload.s,
+ sessionId: payload.d.session_id,
+ shardId: this.id,
+ shardCount: this.strategy.options.shardCount,
+ resumeURL: payload.d.resume_gateway_url
+ };
+ await this.strategy.updateSessionInfo(this.id, session2);
+ this.emit("ready" /* Ready */, { data: payload.d });
+ break;
+ }
+ case GatewayDispatchEvents.Resumed: {
+ this.#status = 3 /* Ready */;
+ this.debug([`Resumed and replayed ${this.replayedEvents} events`]);
+ this.emit("resumed" /* Resumed */);
+ break;
+ }
+ default: {
+ break;
+ }
+ }
+ const session = await this.strategy.retrieveSessionInfo(this.id);
+ if (session) {
+ if (payload.s > session.sequence) {
+ await this.strategy.updateSessionInfo(this.id, { ...session, sequence: payload.s });
+ }
+ } else {
+ this.debug([
+ `Received a ${payload.t} event but no session is available. Session information cannot be re-constructed in this state without a full reconnect`
+ ]);
+ }
+ this.emit("dispatch" /* Dispatch */, { data: payload });
+ break;
+ }
+ case GatewayOpcodes2.Heartbeat: {
+ await this.heartbeat(true);
+ break;
+ }
+ case GatewayOpcodes2.Reconnect: {
+ await this.destroy({
+ reason: "Told to reconnect by Discord",
+ recover: 1 /* Resume */
+ });
+ break;
+ }
+ case GatewayOpcodes2.InvalidSession: {
+ this.debug([`Invalid session; will attempt to resume: ${payload.d.toString()}`]);
+ const session = await this.strategy.retrieveSessionInfo(this.id);
+ if (payload.d && session) {
+ await this.resume(session);
+ } else {
+ await this.destroy({
+ reason: "Invalid session",
+ recover: 0 /* Reconnect */
+ });
+ }
+ break;
+ }
+ case GatewayOpcodes2.Hello: {
+ this.emit("hello" /* Hello */);
+ const jitter = Math.random();
+ const firstWait = Math.floor(payload.d.heartbeat_interval * jitter);
+ this.debug([`Preparing first heartbeat of the connection with a jitter of ${jitter}; waiting ${firstWait}ms`]);
+ try {
+ const controller = new AbortController();
+ this.initialHeartbeatTimeoutController = controller;
+ await sleep2(firstWait, void 0, { signal: controller.signal });
+ } catch {
+ this.debug(["Cancelled initial heartbeat due to #destroy being called"]);
+ return;
+ } finally {
+ this.initialHeartbeatTimeoutController = null;
+ }
+ await this.heartbeat();
+ this.debug([`First heartbeat sent, starting to beat every ${payload.d.heartbeat_interval}ms`]);
+ this.heartbeatInterval = setInterval(() => void this.heartbeat(), payload.d.heartbeat_interval);
+ break;
+ }
+ case GatewayOpcodes2.HeartbeatAck: {
+ this.isAck = true;
+ const ackAt = Date.now();
+ this.emit("heartbeat" /* HeartbeatComplete */, {
+ ackAt,
+ heartbeatAt: this.lastHeartbeatAt,
+ latency: ackAt - this.lastHeartbeatAt
+ });
+ break;
+ }
+ }
+ }
+ onError(error) {
+ if ("code" in error && ["ECONNRESET", "ECONNREFUSED"].includes(error.code)) {
+ this.debug(["Failed to connect to the gateway URL specified due to a network error"]);
+ this.failedToConnectDueToNetworkError = true;
+ return;
+ }
+ this.emit("error" /* Error */, { error });
+ }
+ async onClose(code) {
+ this.emit("closed" /* Closed */, { code });
+ switch (code) {
+ case 1e3 /* Normal */: {
+ return this.destroy({
+ code,
+ reason: "Got disconnected by Discord",
+ recover: 0 /* Reconnect */
+ });
+ }
+ case 4200 /* Resuming */: {
+ break;
+ }
+ case GatewayCloseCodes.UnknownError: {
+ this.debug([`An unknown error occurred: ${code}`]);
+ return this.destroy({ code, recover: 1 /* Resume */ });
+ }
+ case GatewayCloseCodes.UnknownOpcode: {
+ this.debug(["An invalid opcode was sent to Discord."]);
+ return this.destroy({ code, recover: 1 /* Resume */ });
+ }
+ case GatewayCloseCodes.DecodeError: {
+ this.debug(["An invalid payload was sent to Discord."]);
+ return this.destroy({ code, recover: 1 /* Resume */ });
+ }
+ case GatewayCloseCodes.NotAuthenticated: {
+ this.debug(["A request was somehow sent before the identify/resume payload."]);
+ return this.destroy({ code, recover: 0 /* Reconnect */ });
+ }
+ case GatewayCloseCodes.AuthenticationFailed: {
+ this.emit("error" /* Error */, {
+ error: new Error("Authentication failed")
+ });
+ return this.destroy({ code });
+ }
+ case GatewayCloseCodes.AlreadyAuthenticated: {
+ this.debug(["More than one auth payload was sent."]);
+ return this.destroy({ code, recover: 0 /* Reconnect */ });
+ }
+ case GatewayCloseCodes.InvalidSeq: {
+ this.debug(["An invalid sequence was sent."]);
+ return this.destroy({ code, recover: 0 /* Reconnect */ });
+ }
+ case GatewayCloseCodes.RateLimited: {
+ this.debug(["The WebSocket rate limit has been hit, this should never happen"]);
+ return this.destroy({ code, recover: 0 /* Reconnect */ });
+ }
+ case GatewayCloseCodes.SessionTimedOut: {
+ this.debug(["Session timed out."]);
+ return this.destroy({ code, recover: 1 /* Resume */ });
+ }
+ case GatewayCloseCodes.InvalidShard: {
+ this.emit("error" /* Error */, {
+ error: new Error("Invalid shard")
+ });
+ return this.destroy({ code });
+ }
+ case GatewayCloseCodes.ShardingRequired: {
+ this.emit("error" /* Error */, {
+ error: new Error("Sharding is required")
+ });
+ return this.destroy({ code });
+ }
+ case GatewayCloseCodes.InvalidAPIVersion: {
+ this.emit("error" /* Error */, {
+ error: new Error("Used an invalid API version")
+ });
+ return this.destroy({ code });
+ }
+ case GatewayCloseCodes.InvalidIntents: {
+ this.emit("error" /* Error */, {
+ error: new Error("Used invalid intents")
+ });
+ return this.destroy({ code });
+ }
+ case GatewayCloseCodes.DisallowedIntents: {
+ this.emit("error" /* Error */, {
+ error: new Error("Used disallowed intents")
+ });
+ return this.destroy({ code });
+ }
+ default: {
+ this.debug([
+ `The gateway closed with an unexpected code ${code}, attempting to ${this.failedToConnectDueToNetworkError ? "reconnect" : "resume"}.`
+ ]);
+ return this.destroy({
+ code,
+ recover: this.failedToConnectDueToNetworkError ? 0 /* Reconnect */ : 1 /* Resume */
+ });
+ }
+ }
+ }
+ debug(messages) {
+ const message = `${messages[0]}${messages.length > 1 ? `
+${messages.slice(1).map((m) => ` ${m}`).join("\n")}` : ""}`;
+ this.emit("debug" /* Debug */, { message });
+ }
+};
+
+// src/utils/WorkerBootstrapper.ts
+var WorkerBootstrapper = class {
+ static {
+ __name(this, "WorkerBootstrapper");
+ }
+ /**
+ * The data passed to the worker thread
+ */
+ data = workerData;
+ /**
+ * The shards that are managed by this worker
+ */
+ shards = new Collection7();
+ constructor() {
+ if (isMainThread2) {
+ throw new Error("Expected WorkerBootstrap to not be used within the main thread");
+ }
+ }
+ /**
+ * Helper method to initiate a shard's connection process
+ */
+ async connect(shardId) {
+ const shard = this.shards.get(shardId);
+ if (!shard) {
+ throw new RangeError(`Shard ${shardId} does not exist`);
+ }
+ await shard.connect();
+ }
+ /**
+ * Helper method to destroy a shard
+ */
+ async destroy(shardId, options) {
+ const shard = this.shards.get(shardId);
+ if (!shard) {
+ throw new RangeError(`Shard ${shardId} does not exist`);
+ }
+ await shard.destroy(options);
+ }
+ /**
+ * Helper method to attach event listeners to the parentPort
+ */
+ setupThreadEvents() {
+ parentPort2.on("messageerror", (err) => {
+ throw err;
+ }).on("message", async (payload) => {
+ switch (payload.op) {
+ case 0 /* Connect */: {
+ await this.connect(payload.shardId);
+ const response = {
+ op: 0 /* Connected */,
+ shardId: payload.shardId
+ };
+ parentPort2.postMessage(response);
+ break;
+ }
+ case 1 /* Destroy */: {
+ await this.destroy(payload.shardId, payload.options);
+ const response = {
+ op: 1 /* Destroyed */,
+ shardId: payload.shardId
+ };
+ parentPort2.postMessage(response);
+ break;
+ }
+ case 2 /* Send */: {
+ const shard = this.shards.get(payload.shardId);
+ if (!shard) {
+ throw new RangeError(`Shard ${payload.shardId} does not exist`);
+ }
+ await shard.send(payload.payload);
+ break;
+ }
+ case 3 /* SessionInfoResponse */: {
+ break;
+ }
+ case 4 /* ShardIdentifyResponse */: {
+ break;
+ }
+ case 5 /* FetchStatus */: {
+ const shard = this.shards.get(payload.shardId);
+ if (!shard) {
+ throw new Error(`Shard ${payload.shardId} does not exist`);
+ }
+ const response = {
+ op: 6 /* FetchStatusResponse */,
+ status: shard.status,
+ nonce: payload.nonce
+ };
+ parentPort2.postMessage(response);
+ break;
+ }
+ }
+ });
+ }
+ /**
+ * Bootstraps the worker thread with the provided options
+ */
+ async bootstrap(options = {}) {
+ for (const shardId of this.data.shardIds) {
+ const shard = new WebSocketShard(new WorkerContextFetchingStrategy(this.data), shardId);
+ for (const event of options.forwardEvents ?? Object.values(WebSocketShardEvents)) {
+ shard.on(event, (data) => {
+ const payload = {
+ op: 2 /* Event */,
+ event,
+ data,
+ shardId
+ };
+ parentPort2.postMessage(payload);
+ });
+ }
+ await options.shardCallback?.(shard);
+ this.shards.set(shardId, shard);
+ }
+ this.setupThreadEvents();
+ const message = {
+ op: 7 /* WorkerReady */
+ };
+ parentPort2.postMessage(message);
+ }
+};
+
+// src/strategies/sharding/defaultWorker.ts
+var bootstrapper = new WorkerBootstrapper();
+void bootstrapper.bootstrap();
+//# sourceMappingURL=defaultWorker.mjs.map \ No newline at end of file
diff --git a/node_modules/@discordjs/ws/dist/defaultWorker.mjs.map b/node_modules/@discordjs/ws/dist/defaultWorker.mjs.map
new file mode 100644
index 0000000..8ef3f02
--- /dev/null
+++ b/node_modules/@discordjs/ws/dist/defaultWorker.mjs.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/utils/WorkerBootstrapper.ts","../src/strategies/context/WorkerContextFetchingStrategy.ts","../src/strategies/sharding/WorkerShardingStrategy.ts","../src/strategies/context/IContextFetchingStrategy.ts","../src/ws/WebSocketShard.ts","../src/utils/constants.ts","../src/strategies/sharding/SimpleShardingStrategy.ts","../src/strategies/context/SimpleContextFetchingStrategy.ts","../src/throttling/SimpleIdentifyThrottler.ts","../src/strategies/sharding/defaultWorker.ts"],"sourcesContent":["import { isMainThread, parentPort, workerData } from 'node:worker_threads';\nimport { Collection } from '@discordjs/collection';\nimport type { Awaitable } from '@discordjs/util';\nimport { WorkerContextFetchingStrategy } from '../strategies/context/WorkerContextFetchingStrategy.js';\nimport {\n\tWorkerReceivePayloadOp,\n\tWorkerSendPayloadOp,\n\ttype WorkerData,\n\ttype WorkerReceivePayload,\n\ttype WorkerSendPayload,\n} from '../strategies/sharding/WorkerShardingStrategy.js';\nimport type { WebSocketShardDestroyOptions } from '../ws/WebSocketShard.js';\nimport { WebSocketShardEvents, WebSocketShard } from '../ws/WebSocketShard.js';\n\n/**\n * Options for bootstrapping the worker\n */\nexport interface BootstrapOptions {\n\t/**\n\t * Shard events to just arbitrarily forward to the parent thread for the manager to emit\n\t * Note: By default, this will include ALL events\n\t * you most likely want to handle dispatch within the worker itself\n\t */\n\tforwardEvents?: WebSocketShardEvents[];\n\t/**\n\t * Function to call when a shard is created for additional setup\n\t */\n\tshardCallback?(shard: WebSocketShard): Awaitable<void>;\n}\n\n/**\n * Utility class for bootstrapping a worker thread to be used for sharding\n */\nexport class WorkerBootstrapper {\n\t/**\n\t * The data passed to the worker thread\n\t */\n\tprotected readonly data = workerData as WorkerData;\n\n\t/**\n\t * The shards that are managed by this worker\n\t */\n\tprotected readonly shards = new Collection<number, WebSocketShard>();\n\n\tpublic constructor() {\n\t\tif (isMainThread) {\n\t\t\tthrow new Error('Expected WorkerBootstrap to not be used within the main thread');\n\t\t}\n\t}\n\n\t/**\n\t * Helper method to initiate a shard's connection process\n\t */\n\tprotected async connect(shardId: number): Promise<void> {\n\t\tconst shard = this.shards.get(shardId);\n\t\tif (!shard) {\n\t\t\tthrow new RangeError(`Shard ${shardId} does not exist`);\n\t\t}\n\n\t\tawait shard.connect();\n\t}\n\n\t/**\n\t * Helper method to destroy a shard\n\t */\n\tprotected async destroy(shardId: number, options?: WebSocketShardDestroyOptions): Promise<void> {\n\t\tconst shard = this.shards.get(shardId);\n\t\tif (!shard) {\n\t\t\tthrow new RangeError(`Shard ${shardId} does not exist`);\n\t\t}\n\n\t\tawait shard.destroy(options);\n\t}\n\n\t/**\n\t * Helper method to attach event listeners to the parentPort\n\t */\n\tprotected setupThreadEvents(): void {\n\t\tparentPort!\n\t\t\t.on('messageerror', (err) => {\n\t\t\t\tthrow err;\n\t\t\t})\n\t\t\t.on('message', async (payload: WorkerSendPayload) => {\n\t\t\t\tswitch (payload.op) {\n\t\t\t\t\tcase WorkerSendPayloadOp.Connect: {\n\t\t\t\t\t\tawait this.connect(payload.shardId);\n\t\t\t\t\t\tconst response: WorkerReceivePayload = {\n\t\t\t\t\t\t\top: WorkerReceivePayloadOp.Connected,\n\t\t\t\t\t\t\tshardId: payload.shardId,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tparentPort!.postMessage(response);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.Destroy: {\n\t\t\t\t\t\tawait this.destroy(payload.shardId, payload.options);\n\t\t\t\t\t\tconst response: WorkerReceivePayload = {\n\t\t\t\t\t\t\top: WorkerReceivePayloadOp.Destroyed,\n\t\t\t\t\t\t\tshardId: payload.shardId,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tparentPort!.postMessage(response);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.Send: {\n\t\t\t\t\t\tconst shard = this.shards.get(payload.shardId);\n\t\t\t\t\t\tif (!shard) {\n\t\t\t\t\t\t\tthrow new RangeError(`Shard ${payload.shardId} does not exist`);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tawait shard.send(payload.payload);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.SessionInfoResponse: {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.ShardIdentifyResponse: {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.FetchStatus: {\n\t\t\t\t\t\tconst shard = this.shards.get(payload.shardId);\n\t\t\t\t\t\tif (!shard) {\n\t\t\t\t\t\t\tthrow new Error(`Shard ${payload.shardId} does not exist`);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst response: WorkerReceivePayload = {\n\t\t\t\t\t\t\top: WorkerReceivePayloadOp.FetchStatusResponse,\n\t\t\t\t\t\t\tstatus: shard.status,\n\t\t\t\t\t\t\tnonce: payload.nonce,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tparentPort!.postMessage(response);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\t/**\n\t * Bootstraps the worker thread with the provided options\n\t */\n\tpublic async bootstrap(options: Readonly<BootstrapOptions> = {}): Promise<void> {\n\t\t// Start by initializing the shards\n\t\tfor (const shardId of this.data.shardIds) {\n\t\t\tconst shard = new WebSocketShard(new WorkerContextFetchingStrategy(this.data), shardId);\n\t\t\tfor (const event of options.forwardEvents ?? Object.values(WebSocketShardEvents)) {\n\t\t\t\t// @ts-expect-error: Event types incompatible\n\t\t\t\tshard.on(event, (data) => {\n\t\t\t\t\tconst payload: WorkerReceivePayload = {\n\t\t\t\t\t\top: WorkerReceivePayloadOp.Event,\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\tdata,\n\t\t\t\t\t\tshardId,\n\t\t\t\t\t};\n\t\t\t\t\tparentPort!.postMessage(payload);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Any additional setup the user might want to do\n\t\t\tawait options.shardCallback?.(shard);\n\t\t\tthis.shards.set(shardId, shard);\n\t\t}\n\n\t\t// Lastly, start listening to messages from the parent thread\n\t\tthis.setupThreadEvents();\n\n\t\tconst message: WorkerReceivePayload = {\n\t\t\top: WorkerReceivePayloadOp.WorkerReady,\n\t\t};\n\t\tparentPort!.postMessage(message);\n\t}\n}\n","import { isMainThread, parentPort } from 'node:worker_threads';\nimport { Collection } from '@discordjs/collection';\nimport type { SessionInfo } from '../../ws/WebSocketManager.js';\nimport {\n\tWorkerReceivePayloadOp,\n\tWorkerSendPayloadOp,\n\ttype WorkerReceivePayload,\n\ttype WorkerSendPayload,\n} from '../sharding/WorkerShardingStrategy.js';\nimport type { FetchingStrategyOptions, IContextFetchingStrategy } from './IContextFetchingStrategy.js';\n\nexport class WorkerContextFetchingStrategy implements IContextFetchingStrategy {\n\tprivate readonly sessionPromises = new Collection<number, (session: SessionInfo | null) => void>();\n\n\tprivate readonly waitForIdentifyPromises = new Collection<\n\t\tnumber,\n\t\t{ reject(error: unknown): void; resolve(): void; signal: AbortSignal }\n\t>();\n\n\tpublic constructor(public readonly options: FetchingStrategyOptions) {\n\t\tif (isMainThread) {\n\t\t\tthrow new Error('Cannot instantiate WorkerContextFetchingStrategy on the main thread');\n\t\t}\n\n\t\tparentPort!.on('message', (payload: WorkerSendPayload) => {\n\t\t\tif (payload.op === WorkerSendPayloadOp.SessionInfoResponse) {\n\t\t\t\tthis.sessionPromises.get(payload.nonce)?.(payload.session);\n\t\t\t\tthis.sessionPromises.delete(payload.nonce);\n\t\t\t}\n\n\t\t\tif (payload.op === WorkerSendPayloadOp.ShardIdentifyResponse) {\n\t\t\t\tconst promise = this.waitForIdentifyPromises.get(payload.nonce);\n\t\t\t\tif (payload.ok) {\n\t\t\t\t\tpromise?.resolve();\n\t\t\t\t} else {\n\t\t\t\t\t// We need to make sure we reject with an abort error\n\t\t\t\t\tpromise?.reject(promise.signal.reason);\n\t\t\t\t}\n\n\t\t\t\tthis.waitForIdentifyPromises.delete(payload.nonce);\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic async retrieveSessionInfo(shardId: number): Promise<SessionInfo | null> {\n\t\tconst nonce = Math.random();\n\t\tconst payload: WorkerReceivePayload = {\n\t\t\top: WorkerReceivePayloadOp.RetrieveSessionInfo,\n\t\t\tshardId,\n\t\t\tnonce,\n\t\t};\n\t\t// eslint-disable-next-line no-promise-executor-return\n\t\tconst promise = new Promise<SessionInfo | null>((resolve) => this.sessionPromises.set(nonce, resolve));\n\t\tparentPort!.postMessage(payload);\n\t\treturn promise;\n\t}\n\n\tpublic updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null) {\n\t\tconst payload: WorkerReceivePayload = {\n\t\t\top: WorkerReceivePayloadOp.UpdateSessionInfo,\n\t\t\tshardId,\n\t\t\tsession: sessionInfo,\n\t\t};\n\t\tparentPort!.postMessage(payload);\n\t}\n\n\tpublic async waitForIdentify(shardId: number, signal: AbortSignal): Promise<void> {\n\t\tconst nonce = Math.random();\n\n\t\tconst payload: WorkerReceivePayload = {\n\t\t\top: WorkerReceivePayloadOp.WaitForIdentify,\n\t\t\tnonce,\n\t\t\tshardId,\n\t\t};\n\t\tconst promise = new Promise<void>((resolve, reject) =>\n\t\t\t// eslint-disable-next-line no-promise-executor-return\n\t\t\tthis.waitForIdentifyPromises.set(nonce, { signal, resolve, reject }),\n\t\t);\n\n\t\tparentPort!.postMessage(payload);\n\n\t\tconst listener = () => {\n\t\t\tconst payload: WorkerReceivePayload = {\n\t\t\t\top: WorkerReceivePayloadOp.CancelIdentify,\n\t\t\t\tnonce,\n\t\t\t};\n\n\t\t\tparentPort!.postMessage(payload);\n\t\t};\n\n\t\tsignal.addEventListener('abort', listener);\n\n\t\ttry {\n\t\t\tawait promise;\n\t\t} finally {\n\t\t\tsignal.removeEventListener('abort', listener);\n\t\t}\n\t}\n}\n","import { once } from 'node:events';\nimport { join, isAbsolute, resolve } from 'node:path';\nimport { Worker } from 'node:worker_threads';\nimport { Collection } from '@discordjs/collection';\nimport type { GatewaySendPayload } from 'discord-api-types/v10';\nimport type { IIdentifyThrottler } from '../../throttling/IIdentifyThrottler.js';\nimport type { SessionInfo, WebSocketManager } from '../../ws/WebSocketManager.js';\nimport type {\n\tWebSocketShardDestroyOptions,\n\tWebSocketShardEvents,\n\tWebSocketShardStatus,\n} from '../../ws/WebSocketShard.js';\nimport { managerToFetchingStrategyOptions, type FetchingStrategyOptions } from '../context/IContextFetchingStrategy.js';\nimport type { IShardingStrategy } from './IShardingStrategy.js';\n\nexport interface WorkerData extends FetchingStrategyOptions {\n\tshardIds: number[];\n}\n\nexport enum WorkerSendPayloadOp {\n\tConnect,\n\tDestroy,\n\tSend,\n\tSessionInfoResponse,\n\tShardIdentifyResponse,\n\tFetchStatus,\n}\n\nexport type WorkerSendPayload =\n\t| { nonce: number; ok: boolean; op: WorkerSendPayloadOp.ShardIdentifyResponse }\n\t| { nonce: number; op: WorkerSendPayloadOp.FetchStatus; shardId: number }\n\t| { nonce: number; op: WorkerSendPayloadOp.SessionInfoResponse; session: SessionInfo | null }\n\t| { op: WorkerSendPayloadOp.Connect; shardId: number }\n\t| { op: WorkerSendPayloadOp.Destroy; options?: WebSocketShardDestroyOptions; shardId: number }\n\t| { op: WorkerSendPayloadOp.Send; payload: GatewaySendPayload; shardId: number };\n\nexport enum WorkerReceivePayloadOp {\n\tConnected,\n\tDestroyed,\n\tEvent,\n\tRetrieveSessionInfo,\n\tUpdateSessionInfo,\n\tWaitForIdentify,\n\tFetchStatusResponse,\n\tWorkerReady,\n\tCancelIdentify,\n}\n\nexport type WorkerReceivePayload =\n\t// Can't seem to get a type-safe union based off of the event, so I'm sadly leaving data as any for now\n\t| { data: any; event: WebSocketShardEvents; op: WorkerReceivePayloadOp.Event; shardId: number }\n\t| { nonce: number; op: WorkerReceivePayloadOp.CancelIdentify }\n\t| { nonce: number; op: WorkerReceivePayloadOp.FetchStatusResponse; status: WebSocketShardStatus }\n\t| { nonce: number; op: WorkerReceivePayloadOp.RetrieveSessionInfo; shardId: number }\n\t| { nonce: number; op: WorkerReceivePayloadOp.WaitForIdentify; shardId: number }\n\t| { op: WorkerReceivePayloadOp.Connected; shardId: number }\n\t| { op: WorkerReceivePayloadOp.Destroyed; shardId: number }\n\t| { op: WorkerReceivePayloadOp.UpdateSessionInfo; session: SessionInfo | null; shardId: number }\n\t| { op: WorkerReceivePayloadOp.WorkerReady };\n\n/**\n * Options for a {@link WorkerShardingStrategy}\n */\nexport interface WorkerShardingStrategyOptions {\n\t/**\n\t * Dictates how many shards should be spawned per worker thread.\n\t */\n\tshardsPerWorker: number | 'all';\n\t/**\n\t * Path to the worker file to use. The worker requires quite a bit of setup, it is recommended you leverage the {@link WorkerBootstrapper} class.\n\t */\n\tworkerPath?: string;\n}\n\n/**\n * Strategy used to spawn threads in worker_threads\n */\nexport class WorkerShardingStrategy implements IShardingStrategy {\n\tprivate readonly manager: WebSocketManager;\n\n\tprivate readonly options: WorkerShardingStrategyOptions;\n\n\t#workers: Worker[] = [];\n\n\treadonly #workerByShardId = new Collection<number, Worker>();\n\n\tprivate readonly connectPromises = new Collection<number, () => void>();\n\n\tprivate readonly destroyPromises = new Collection<number, () => void>();\n\n\tprivate readonly fetchStatusPromises = new Collection<number, (status: WebSocketShardStatus) => void>();\n\n\tprivate readonly waitForIdentifyControllers = new Collection<number, AbortController>();\n\n\tprivate throttler?: IIdentifyThrottler;\n\n\tpublic constructor(manager: WebSocketManager, options: WorkerShardingStrategyOptions) {\n\t\tthis.manager = manager;\n\t\tthis.options = options;\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.spawn}\n\t */\n\tpublic async spawn(shardIds: number[]) {\n\t\tconst shardsPerWorker = this.options.shardsPerWorker === 'all' ? shardIds.length : this.options.shardsPerWorker;\n\t\tconst strategyOptions = await managerToFetchingStrategyOptions(this.manager);\n\n\t\tconst loops = Math.ceil(shardIds.length / shardsPerWorker);\n\t\tconst promises: Promise<void>[] = [];\n\n\t\tfor (let idx = 0; idx < loops; idx++) {\n\t\t\tconst slice = shardIds.slice(idx * shardsPerWorker, (idx + 1) * shardsPerWorker);\n\t\t\tconst workerData: WorkerData = {\n\t\t\t\t...strategyOptions,\n\t\t\t\tshardIds: slice,\n\t\t\t};\n\n\t\t\tpromises.push(this.setupWorker(workerData));\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.connect}\n\t */\n\tpublic async connect() {\n\t\tconst promises = [];\n\n\t\tfor (const [shardId, worker] of this.#workerByShardId.entries()) {\n\t\t\tconst payload: WorkerSendPayload = {\n\t\t\t\top: WorkerSendPayloadOp.Connect,\n\t\t\t\tshardId,\n\t\t\t};\n\n\t\t\t// eslint-disable-next-line no-promise-executor-return\n\t\t\tconst promise = new Promise<void>((resolve) => this.connectPromises.set(shardId, resolve));\n\t\t\tworker.postMessage(payload);\n\t\t\tpromises.push(promise);\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.destroy}\n\t */\n\tpublic async destroy(options: Omit<WebSocketShardDestroyOptions, 'recover'> = {}) {\n\t\tconst promises = [];\n\n\t\tfor (const [shardId, worker] of this.#workerByShardId.entries()) {\n\t\t\tconst payload: WorkerSendPayload = {\n\t\t\t\top: WorkerSendPayloadOp.Destroy,\n\t\t\t\tshardId,\n\t\t\t\toptions,\n\t\t\t};\n\n\t\t\tpromises.push(\n\t\t\t\t// eslint-disable-next-line no-promise-executor-return, promise/prefer-await-to-then\n\t\t\t\tnew Promise<void>((resolve) => this.destroyPromises.set(shardId, resolve)).then(async () => worker.terminate()),\n\t\t\t);\n\t\t\tworker.postMessage(payload);\n\t\t}\n\n\t\tthis.#workers = [];\n\t\tthis.#workerByShardId.clear();\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.send}\n\t */\n\tpublic send(shardId: number, data: GatewaySendPayload) {\n\t\tconst worker = this.#workerByShardId.get(shardId);\n\t\tif (!worker) {\n\t\t\tthrow new Error(`No worker found for shard ${shardId}`);\n\t\t}\n\n\t\tconst payload: WorkerSendPayload = {\n\t\t\top: WorkerSendPayloadOp.Send,\n\t\t\tshardId,\n\t\t\tpayload: data,\n\t\t};\n\t\tworker.postMessage(payload);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.fetchStatus}\n\t */\n\tpublic async fetchStatus() {\n\t\tconst statuses = new Collection<number, WebSocketShardStatus>();\n\n\t\tfor (const [shardId, worker] of this.#workerByShardId.entries()) {\n\t\t\tconst nonce = Math.random();\n\t\t\tconst payload: WorkerSendPayload = {\n\t\t\t\top: WorkerSendPayloadOp.FetchStatus,\n\t\t\t\tshardId,\n\t\t\t\tnonce,\n\t\t\t};\n\n\t\t\t// eslint-disable-next-line no-promise-executor-return\n\t\t\tconst promise = new Promise<WebSocketShardStatus>((resolve) => this.fetchStatusPromises.set(nonce, resolve));\n\t\t\tworker.postMessage(payload);\n\n\t\t\tconst status = await promise;\n\t\t\tstatuses.set(shardId, status);\n\t\t}\n\n\t\treturn statuses;\n\t}\n\n\tprivate async setupWorker(workerData: WorkerData) {\n\t\tconst worker = new Worker(this.resolveWorkerPath(), { workerData });\n\n\t\tawait once(worker, 'online');\n\t\t// We do this in case the user has any potentially long running code in their worker\n\t\tawait this.waitForWorkerReady(worker);\n\n\t\tworker\n\t\t\t.on('error', (err) => {\n\t\t\t\tthrow err;\n\t\t\t})\n\t\t\t.on('messageerror', (err) => {\n\t\t\t\tthrow err;\n\t\t\t})\n\t\t\t.on('message', async (payload: WorkerReceivePayload) => this.onMessage(worker, payload));\n\n\t\tthis.#workers.push(worker);\n\t\tfor (const shardId of workerData.shardIds) {\n\t\t\tthis.#workerByShardId.set(shardId, worker);\n\t\t}\n\t}\n\n\tprivate resolveWorkerPath(): string {\n\t\tconst path = this.options.workerPath;\n\n\t\tif (!path) {\n\t\t\treturn join(__dirname, 'defaultWorker.js');\n\t\t}\n\n\t\tif (isAbsolute(path)) {\n\t\t\treturn path;\n\t\t}\n\n\t\tif (/^\\.\\.?[/\\\\]/.test(path)) {\n\t\t\treturn resolve(path);\n\t\t}\n\n\t\ttry {\n\t\t\treturn require.resolve(path);\n\t\t} catch {\n\t\t\treturn resolve(path);\n\t\t}\n\t}\n\n\tprivate async waitForWorkerReady(worker: Worker): Promise<void> {\n\t\treturn new Promise((resolve) => {\n\t\t\tconst handler = (payload: WorkerReceivePayload) => {\n\t\t\t\tif (payload.op === WorkerReceivePayloadOp.WorkerReady) {\n\t\t\t\t\tresolve();\n\t\t\t\t\tworker.off('message', handler);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tworker.on('message', handler);\n\t\t});\n\t}\n\n\tprivate async onMessage(worker: Worker, payload: WorkerReceivePayload) {\n\t\tswitch (payload.op) {\n\t\t\tcase WorkerReceivePayloadOp.Connected: {\n\t\t\t\tthis.connectPromises.get(payload.shardId)?.();\n\t\t\t\tthis.connectPromises.delete(payload.shardId);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.Destroyed: {\n\t\t\t\tthis.destroyPromises.get(payload.shardId)?.();\n\t\t\t\tthis.destroyPromises.delete(payload.shardId);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.Event: {\n\t\t\t\tthis.manager.emit(payload.event, { ...payload.data, shardId: payload.shardId });\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.RetrieveSessionInfo: {\n\t\t\t\tconst session = await this.manager.options.retrieveSessionInfo(payload.shardId);\n\t\t\t\tconst response: WorkerSendPayload = {\n\t\t\t\t\top: WorkerSendPayloadOp.SessionInfoResponse,\n\t\t\t\t\tnonce: payload.nonce,\n\t\t\t\t\tsession,\n\t\t\t\t};\n\t\t\t\tworker.postMessage(response);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.UpdateSessionInfo: {\n\t\t\t\tawait this.manager.options.updateSessionInfo(payload.shardId, payload.session);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.WaitForIdentify: {\n\t\t\t\tconst throttler = await this.ensureThrottler();\n\n\t\t\t\t// If this rejects it means we aborted, in which case we reply elsewhere.\n\t\t\t\ttry {\n\t\t\t\t\tconst controller = new AbortController();\n\t\t\t\t\tthis.waitForIdentifyControllers.set(payload.nonce, controller);\n\t\t\t\t\tawait throttler.waitForIdentify(payload.shardId, controller.signal);\n\t\t\t\t} catch {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst response: WorkerSendPayload = {\n\t\t\t\t\top: WorkerSendPayloadOp.ShardIdentifyResponse,\n\t\t\t\t\tnonce: payload.nonce,\n\t\t\t\t\tok: true,\n\t\t\t\t};\n\t\t\t\tworker.postMessage(response);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.FetchStatusResponse: {\n\t\t\t\tthis.fetchStatusPromises.get(payload.nonce)?.(payload.status);\n\t\t\t\tthis.fetchStatusPromises.delete(payload.nonce);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.WorkerReady: {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.CancelIdentify: {\n\t\t\t\tthis.waitForIdentifyControllers.get(payload.nonce)?.abort();\n\t\t\t\tthis.waitForIdentifyControllers.delete(payload.nonce);\n\n\t\t\t\tconst response: WorkerSendPayload = {\n\t\t\t\t\top: WorkerSendPayloadOp.ShardIdentifyResponse,\n\t\t\t\t\tnonce: payload.nonce,\n\t\t\t\t\tok: false,\n\t\t\t\t};\n\t\t\t\tworker.postMessage(response);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate async ensureThrottler(): Promise<IIdentifyThrottler> {\n\t\tthis.throttler ??= await this.manager.options.buildIdentifyThrottler(this.manager);\n\t\treturn this.throttler;\n\t}\n}\n","import type { Awaitable } from '@discordjs/util';\nimport type { APIGatewayBotInfo } from 'discord-api-types/v10';\nimport type { SessionInfo, WebSocketManager, WebSocketManagerOptions } from '../../ws/WebSocketManager.js';\n\nexport interface FetchingStrategyOptions\n\textends Omit<\n\t\tWebSocketManagerOptions,\n\t\t| 'buildIdentifyThrottler'\n\t\t| 'buildStrategy'\n\t\t| 'rest'\n\t\t| 'retrieveSessionInfo'\n\t\t| 'shardCount'\n\t\t| 'shardIds'\n\t\t| 'updateSessionInfo'\n\t> {\n\treadonly gatewayInformation: APIGatewayBotInfo;\n\treadonly shardCount: number;\n}\n\n/**\n * Strategies responsible solely for making manager information accessible\n */\nexport interface IContextFetchingStrategy {\n\treadonly options: FetchingStrategyOptions;\n\tretrieveSessionInfo(shardId: number): Awaitable<SessionInfo | null>;\n\tupdateSessionInfo(shardId: number, sessionInfo: SessionInfo | null): Awaitable<void>;\n\t/**\n\t * Resolves once the given shard should be allowed to identify\n\t * This should correctly handle the signal and reject with an abort error if the operation is aborted.\n\t * Other errors will cause the shard to reconnect.\n\t */\n\twaitForIdentify(shardId: number, signal: AbortSignal): Promise<void>;\n}\n\nexport async function managerToFetchingStrategyOptions(manager: WebSocketManager): Promise<FetchingStrategyOptions> {\n\t/* eslint-disable @typescript-eslint/unbound-method */\n\tconst {\n\t\tbuildIdentifyThrottler,\n\t\tbuildStrategy,\n\t\tretrieveSessionInfo,\n\t\tupdateSessionInfo,\n\t\tshardCount,\n\t\tshardIds,\n\t\trest,\n\t\t...managerOptions\n\t} = manager.options;\n\t/* eslint-enable @typescript-eslint/unbound-method */\n\n\treturn {\n\t\t...managerOptions,\n\t\tgatewayInformation: await manager.fetchGatewayInformation(),\n\t\tshardCount: await manager.getShardCount(),\n\t};\n}\n","/* eslint-disable id-length */\nimport { Buffer } from 'node:buffer';\nimport { once } from 'node:events';\nimport { clearInterval, clearTimeout, setInterval, setTimeout } from 'node:timers';\nimport { setTimeout as sleep } from 'node:timers/promises';\nimport { URLSearchParams } from 'node:url';\nimport { TextDecoder } from 'node:util';\nimport { inflate } from 'node:zlib';\nimport { Collection } from '@discordjs/collection';\nimport { lazy } from '@discordjs/util';\nimport { AsyncQueue } from '@sapphire/async-queue';\nimport { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';\nimport {\n\tGatewayCloseCodes,\n\tGatewayDispatchEvents,\n\tGatewayOpcodes,\n\ttype GatewayDispatchPayload,\n\ttype GatewayIdentifyData,\n\ttype GatewayReadyDispatchData,\n\ttype GatewayReceivePayload,\n\ttype GatewaySendPayload,\n} from 'discord-api-types/v10';\nimport { WebSocket, type Data } from 'ws';\nimport type { Inflate } from 'zlib-sync';\nimport type { IContextFetchingStrategy } from '../strategies/context/IContextFetchingStrategy.js';\nimport { ImportantGatewayOpcodes, getInitialSendRateLimitState } from '../utils/constants.js';\nimport type { SessionInfo } from './WebSocketManager.js';\n\n// eslint-disable-next-line promise/prefer-await-to-then\nconst getZlibSync = lazy(async () => import('zlib-sync').then((mod) => mod.default).catch(() => null));\n\nexport enum WebSocketShardEvents {\n\tClosed = 'closed',\n\tDebug = 'debug',\n\tDispatch = 'dispatch',\n\tError = 'error',\n\tHeartbeatComplete = 'heartbeat',\n\tHello = 'hello',\n\tReady = 'ready',\n\tResumed = 'resumed',\n}\n\nexport enum WebSocketShardStatus {\n\tIdle,\n\tConnecting,\n\tResuming,\n\tReady,\n}\n\nexport enum WebSocketShardDestroyRecovery {\n\tReconnect,\n\tResume,\n}\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type WebSocketShardEventsMap = {\n\t[WebSocketShardEvents.Closed]: [{ code: number }];\n\t[WebSocketShardEvents.Debug]: [payload: { message: string }];\n\t[WebSocketShardEvents.Dispatch]: [payload: { data: GatewayDispatchPayload }];\n\t[WebSocketShardEvents.Error]: [payload: { error: Error }];\n\t[WebSocketShardEvents.Hello]: [];\n\t[WebSocketShardEvents.Ready]: [payload: { data: GatewayReadyDispatchData }];\n\t[WebSocketShardEvents.Resumed]: [];\n\t[WebSocketShardEvents.HeartbeatComplete]: [payload: { ackAt: number; heartbeatAt: number; latency: number }];\n};\n\nexport interface WebSocketShardDestroyOptions {\n\tcode?: number;\n\treason?: string;\n\trecover?: WebSocketShardDestroyRecovery;\n}\n\nexport enum CloseCodes {\n\tNormal = 1_000,\n\tResuming = 4_200,\n}\n\nexport interface SendRateLimitState {\n\tremaining: number;\n\tresetAt: number;\n}\n\n// TODO(vladfrangu): enable this once https://github.com/oven-sh/bun/issues/3392 is solved\n// const WebSocketConstructor: typeof WebSocket = shouldUseGlobalFetchAndWebSocket()\n// \t? (globalThis as any).WebSocket\n// \t: WebSocket;\nconst WebSocketConstructor: typeof WebSocket = WebSocket;\n\nexport class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {\n\tprivate connection: WebSocket | null = null;\n\n\tprivate useIdentifyCompress = false;\n\n\tprivate inflate: Inflate | null = null;\n\n\tprivate readonly textDecoder = new TextDecoder();\n\n\tprivate replayedEvents = 0;\n\n\tprivate isAck = true;\n\n\tprivate sendRateLimitState: SendRateLimitState = getInitialSendRateLimitState();\n\n\tprivate initialHeartbeatTimeoutController: AbortController | null = null;\n\n\tprivate heartbeatInterval: NodeJS.Timer | null = null;\n\n\tprivate lastHeartbeatAt = -1;\n\n\t// Indicates whether the shard has already resolved its original connect() call\n\tprivate initialConnectResolved = false;\n\n\t// Indicates if we failed to connect to the ws url (ECONNREFUSED/ECONNRESET)\n\tprivate failedToConnectDueToNetworkError = false;\n\n\tprivate readonly sendQueue = new AsyncQueue();\n\n\tprivate readonly timeoutAbortControllers = new Collection<WebSocketShardEvents, AbortController>();\n\n\tprivate readonly strategy: IContextFetchingStrategy;\n\n\tpublic readonly id: number;\n\n\t#status: WebSocketShardStatus = WebSocketShardStatus.Idle;\n\n\tpublic get status(): WebSocketShardStatus {\n\t\treturn this.#status;\n\t}\n\n\tpublic constructor(strategy: IContextFetchingStrategy, id: number) {\n\t\tsuper();\n\t\tthis.strategy = strategy;\n\t\tthis.id = id;\n\t}\n\n\tpublic async connect() {\n\t\tconst controller = new AbortController();\n\t\tlet promise;\n\n\t\tif (!this.initialConnectResolved) {\n\t\t\t// Sleep for the remaining time, but if the connection closes in the meantime, we shouldn't wait the remainder to avoid blocking the new conn\n\t\t\tpromise = Promise.race([\n\t\t\t\tonce(this, WebSocketShardEvents.Ready, { signal: controller.signal }),\n\t\t\t\tonce(this, WebSocketShardEvents.Resumed, { signal: controller.signal }),\n\t\t\t]);\n\t\t}\n\n\t\tvoid this.internalConnect();\n\n\t\ttry {\n\t\t\tawait promise;\n\t\t} catch ({ error }: any) {\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\t// cleanup hanging listeners\n\t\t\tcontroller.abort();\n\t\t}\n\n\t\tthis.initialConnectResolved = true;\n\t}\n\n\tprivate async internalConnect() {\n\t\tif (this.#status !== WebSocketShardStatus.Idle) {\n\t\t\tthrow new Error(\"Tried to connect a shard that wasn't idle\");\n\t\t}\n\n\t\tconst { version, encoding, compression } = this.strategy.options;\n\t\tconst params = new URLSearchParams({ v: version, encoding });\n\t\tif (compression) {\n\t\t\tconst zlib = await getZlibSync();\n\t\t\tif (zlib) {\n\t\t\t\tparams.append('compress', compression);\n\t\t\t\tthis.inflate = new zlib.Inflate({\n\t\t\t\t\tchunkSize: 65_535,\n\t\t\t\t\tto: 'string',\n\t\t\t\t});\n\t\t\t} else if (!this.useIdentifyCompress) {\n\t\t\t\tthis.useIdentifyCompress = true;\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'WebSocketShard: Compression is enabled but zlib-sync is not installed, falling back to identify compress',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst session = await this.strategy.retrieveSessionInfo(this.id);\n\n\t\tconst url = `${session?.resumeURL ?? this.strategy.options.gatewayInformation.url}?${params.toString()}`;\n\n\t\tthis.debug([`Connecting to ${url}`]);\n\n\t\tconst connection = new WebSocketConstructor(url, {\n\t\t\thandshakeTimeout: this.strategy.options.handshakeTimeout ?? undefined,\n\t\t});\n\n\t\tconnection.binaryType = 'arraybuffer';\n\n\t\tconnection.onmessage = (event) => {\n\t\t\tvoid this.onMessage(event.data, event.data instanceof ArrayBuffer);\n\t\t};\n\n\t\tconnection.onerror = (event) => {\n\t\t\tthis.onError(event.error);\n\t\t};\n\n\t\tconnection.onclose = (event) => {\n\t\t\tvoid this.onClose(event.code);\n\t\t};\n\n\t\tthis.connection = connection;\n\n\t\tthis.#status = WebSocketShardStatus.Connecting;\n\n\t\tthis.sendRateLimitState = getInitialSendRateLimitState();\n\n\t\tconst { ok } = await this.waitForEvent(WebSocketShardEvents.Hello, this.strategy.options.helloTimeout);\n\t\tif (!ok) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (session?.shardCount === this.strategy.options.shardCount) {\n\t\t\tawait this.resume(session);\n\t\t} else {\n\t\t\tawait this.identify();\n\t\t}\n\t}\n\n\tpublic async destroy(options: WebSocketShardDestroyOptions = {}) {\n\t\tif (this.#status === WebSocketShardStatus.Idle) {\n\t\t\tthis.debug(['Tried to destroy a shard that was idle']);\n\t\t\treturn;\n\t\t}\n\n\t\tif (!options.code) {\n\t\t\toptions.code = options.recover === WebSocketShardDestroyRecovery.Resume ? CloseCodes.Resuming : CloseCodes.Normal;\n\t\t}\n\n\t\tthis.debug([\n\t\t\t'Destroying shard',\n\t\t\t`Reason: ${options.reason ?? 'none'}`,\n\t\t\t`Code: ${options.code}`,\n\t\t\t`Recover: ${options.recover === undefined ? 'none' : WebSocketShardDestroyRecovery[options.recover]!}`,\n\t\t]);\n\n\t\t// Reset state\n\t\tthis.isAck = true;\n\t\tif (this.heartbeatInterval) {\n\t\t\tclearInterval(this.heartbeatInterval);\n\t\t}\n\n\t\tif (this.initialHeartbeatTimeoutController) {\n\t\t\tthis.initialHeartbeatTimeoutController.abort();\n\t\t\tthis.initialHeartbeatTimeoutController = null;\n\t\t}\n\n\t\tthis.lastHeartbeatAt = -1;\n\n\t\tfor (const controller of this.timeoutAbortControllers.values()) {\n\t\t\tcontroller.abort();\n\t\t}\n\n\t\tthis.timeoutAbortControllers.clear();\n\n\t\tthis.failedToConnectDueToNetworkError = false;\n\n\t\t// Clear session state if applicable\n\t\tif (options.recover !== WebSocketShardDestroyRecovery.Resume) {\n\t\t\tawait this.strategy.updateSessionInfo(this.id, null);\n\t\t}\n\n\t\tif (this.connection) {\n\t\t\t// No longer need to listen to messages\n\t\t\tthis.connection.onmessage = null;\n\t\t\t// Prevent a reconnection loop by unbinding the main close event\n\t\t\tthis.connection.onclose = null;\n\n\t\t\tconst shouldClose = this.connection.readyState === WebSocket.OPEN;\n\n\t\t\tthis.debug([\n\t\t\t\t'Connection status during destroy',\n\t\t\t\t`Needs closing: ${shouldClose}`,\n\t\t\t\t`Ready state: ${this.connection.readyState}`,\n\t\t\t]);\n\n\t\t\tif (shouldClose) {\n\t\t\t\tlet outerResolve: () => void;\n\t\t\t\tconst promise = new Promise<void>((resolve) => {\n\t\t\t\t\touterResolve = resolve;\n\t\t\t\t});\n\n\t\t\t\tthis.connection.onclose = outerResolve!;\n\n\t\t\t\tthis.connection.close(options.code, options.reason);\n\n\t\t\t\tawait promise;\n\t\t\t\tthis.emit(WebSocketShardEvents.Closed, { code: options.code });\n\t\t\t}\n\n\t\t\t// Lastly, remove the error event.\n\t\t\t// Doing this earlier would cause a hard crash in case an error event fired on our `close` call\n\t\t\tthis.connection.onerror = null;\n\t\t} else {\n\t\t\tthis.debug(['Destroying a shard that has no connection; please open an issue on GitHub']);\n\t\t}\n\n\t\tthis.#status = WebSocketShardStatus.Idle;\n\n\t\tif (options.recover !== undefined) {\n\t\t\t// There's cases (like no internet connection) where we immediately fail to connect,\n\t\t\t// causing a very fast and draining reconnection loop.\n\t\t\tawait sleep(500);\n\t\t\treturn this.internalConnect();\n\t\t}\n\t}\n\n\tprivate async waitForEvent(event: WebSocketShardEvents, timeoutDuration?: number | null): Promise<{ ok: boolean }> {\n\t\tthis.debug([`Waiting for event ${event} ${timeoutDuration ? `for ${timeoutDuration}ms` : 'indefinitely'}`]);\n\t\tconst timeoutController = new AbortController();\n\t\tconst timeout = timeoutDuration ? setTimeout(() => timeoutController.abort(), timeoutDuration).unref() : null;\n\n\t\tthis.timeoutAbortControllers.set(event, timeoutController);\n\n\t\tconst closeController = new AbortController();\n\n\t\ttry {\n\t\t\t// If the first promise resolves, all is well. If the 2nd promise resolves,\n\t\t\t// the shard has meanwhile closed. In that case, a destroy is already ongoing, so we just need to\n\t\t\t// return false. Meanwhile, if something rejects (error event) or the first controller is aborted,\n\t\t\t// we enter the catch block and trigger a destroy there.\n\t\t\tconst closed = await Promise.race<boolean>([\n\t\t\t\tonce(this, event, { signal: timeoutController.signal }).then(() => false),\n\t\t\t\tonce(this, WebSocketShardEvents.Closed, { signal: closeController.signal }).then(() => true),\n\t\t\t]);\n\n\t\t\treturn { ok: !closed };\n\t\t} catch {\n\t\t\t// If we're here because of other reasons, we need to destroy the shard\n\t\t\tvoid this.destroy({\n\t\t\t\tcode: CloseCodes.Normal,\n\t\t\t\treason: 'Something timed out or went wrong while waiting for an event',\n\t\t\t\trecover: WebSocketShardDestroyRecovery.Reconnect,\n\t\t\t});\n\n\t\t\treturn { ok: false };\n\t\t} finally {\n\t\t\tif (timeout) {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t}\n\n\t\t\tthis.timeoutAbortControllers.delete(event);\n\n\t\t\t// Clean up the close listener to not leak memory\n\t\t\tif (!closeController.signal.aborted) {\n\t\t\t\tcloseController.abort();\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic async send(payload: GatewaySendPayload): Promise<void> {\n\t\tif (!this.connection) {\n\t\t\tthrow new Error(\"WebSocketShard wasn't connected\");\n\t\t}\n\n\t\tif (this.#status !== WebSocketShardStatus.Ready && !ImportantGatewayOpcodes.has(payload.op)) {\n\t\t\tthis.debug(['Tried to send a non-crucial payload before the shard was ready, waiting']);\n\t\t\t// This will throw if the shard throws an error event in the meantime, just requeue the payload\n\t\t\ttry {\n\t\t\t\tawait once(this, WebSocketShardEvents.Ready);\n\t\t\t} catch {\n\t\t\t\treturn this.send(payload);\n\t\t\t}\n\t\t}\n\n\t\tawait this.sendQueue.wait();\n\n\t\tif (--this.sendRateLimitState.remaining <= 0) {\n\t\t\tconst now = Date.now();\n\n\t\t\tif (this.sendRateLimitState.resetAt > now) {\n\t\t\t\tconst sleepFor = this.sendRateLimitState.resetAt - now;\n\n\t\t\t\tthis.debug([`Was about to hit the send rate limit, sleeping for ${sleepFor}ms`]);\n\t\t\t\tconst controller = new AbortController();\n\n\t\t\t\t// Sleep for the remaining time, but if the connection closes in the meantime, we shouldn't wait the remainder to avoid blocking the new conn\n\t\t\t\tconst interrupted = await Promise.race([\n\t\t\t\t\tsleep(sleepFor).then(() => false),\n\t\t\t\t\tonce(this, WebSocketShardEvents.Closed, { signal: controller.signal }).then(() => true),\n\t\t\t\t]);\n\n\t\t\t\tif (interrupted) {\n\t\t\t\t\tthis.debug(['Connection closed while waiting for the send rate limit to reset, re-queueing payload']);\n\t\t\t\t\tthis.sendQueue.shift();\n\t\t\t\t\treturn this.send(payload);\n\t\t\t\t}\n\n\t\t\t\t// This is so the listener from the `once` call is removed\n\t\t\t\tcontroller.abort();\n\t\t\t}\n\n\t\t\tthis.sendRateLimitState = getInitialSendRateLimitState();\n\t\t}\n\n\t\tthis.sendQueue.shift();\n\t\tthis.connection.send(JSON.stringify(payload));\n\t}\n\n\tprivate async identify() {\n\t\tthis.debug(['Waiting for identify throttle']);\n\n\t\tconst controller = new AbortController();\n\t\tconst closeHandler = () => {\n\t\t\tcontroller.abort();\n\t\t};\n\n\t\tthis.on(WebSocketShardEvents.Closed, closeHandler);\n\n\t\ttry {\n\t\t\tawait this.strategy.waitForIdentify(this.id, controller.signal);\n\t\t} catch {\n\t\t\tif (controller.signal.aborted) {\n\t\t\t\tthis.debug(['Was waiting for an identify, but the shard closed in the meantime']);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.debug([\n\t\t\t\t'IContextFetchingStrategy#waitForIdentify threw an unknown error.',\n\t\t\t\t\"If you're using a custom strategy, this is probably nothing to worry about.\",\n\t\t\t\t\"If you're not, please open an issue on GitHub.\",\n\t\t\t]);\n\n\t\t\tawait this.destroy({\n\t\t\t\treason: 'Identify throttling logic failed',\n\t\t\t\trecover: WebSocketShardDestroyRecovery.Resume,\n\t\t\t});\n\t\t} finally {\n\t\t\tthis.off(WebSocketShardEvents.Closed, closeHandler);\n\t\t}\n\n\t\tthis.debug([\n\t\t\t'Identifying',\n\t\t\t`shard id: ${this.id.toString()}`,\n\t\t\t`shard count: ${this.strategy.options.shardCount}`,\n\t\t\t`intents: ${this.strategy.options.intents}`,\n\t\t\t`compression: ${this.inflate ? 'zlib-stream' : this.useIdentifyCompress ? 'identify' : 'none'}`,\n\t\t]);\n\n\t\tconst d: GatewayIdentifyData = {\n\t\t\ttoken: this.strategy.options.token,\n\t\t\tproperties: this.strategy.options.identifyProperties,\n\t\t\tintents: this.strategy.options.intents,\n\t\t\tcompress: this.useIdentifyCompress,\n\t\t\tshard: [this.id, this.strategy.options.shardCount],\n\t\t};\n\n\t\tif (this.strategy.options.largeThreshold) {\n\t\t\td.large_threshold = this.strategy.options.largeThreshold;\n\t\t}\n\n\t\tif (this.strategy.options.initialPresence) {\n\t\t\td.presence = this.strategy.options.initialPresence;\n\t\t}\n\n\t\tawait this.send({\n\t\t\top: GatewayOpcodes.Identify,\n\t\t\td,\n\t\t});\n\n\t\tawait this.waitForEvent(WebSocketShardEvents.Ready, this.strategy.options.readyTimeout);\n\t}\n\n\tprivate async resume(session: SessionInfo) {\n\t\tthis.debug([\n\t\t\t'Resuming session',\n\t\t\t`resume url: ${session.resumeURL}`,\n\t\t\t`sequence: ${session.sequence}`,\n\t\t\t`shard id: ${this.id.toString()}`,\n\t\t]);\n\n\t\tthis.#status = WebSocketShardStatus.Resuming;\n\t\tthis.replayedEvents = 0;\n\t\treturn this.send({\n\t\t\top: GatewayOpcodes.Resume,\n\t\t\td: {\n\t\t\t\ttoken: this.strategy.options.token,\n\t\t\t\tseq: session.sequence,\n\t\t\t\tsession_id: session.sessionId,\n\t\t\t},\n\t\t});\n\t}\n\n\tprivate async heartbeat(requested = false) {\n\t\tif (!this.isAck && !requested) {\n\t\t\treturn this.destroy({ reason: 'Zombie connection', recover: WebSocketShardDestroyRecovery.Resume });\n\t\t}\n\n\t\tconst session = await this.strategy.retrieveSessionInfo(this.id);\n\n\t\tawait this.send({\n\t\t\top: GatewayOpcodes.Heartbeat,\n\t\t\td: session?.sequence ?? null,\n\t\t});\n\n\t\tthis.lastHeartbeatAt = Date.now();\n\t\tthis.isAck = false;\n\t}\n\n\tprivate async unpackMessage(data: Data, isBinary: boolean): Promise<GatewayReceivePayload | null> {\n\t\t// Deal with no compression\n\t\tif (!isBinary) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(data as string) as GatewayReceivePayload;\n\t\t\t} catch {\n\t\t\t\t// This is a non-JSON payload / (at the time of writing this comment) emitted by bun wrongly interpreting custom close codes https://github.com/oven-sh/bun/issues/3392\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\tconst decompressable = new Uint8Array(data as ArrayBuffer);\n\n\t\t// Deal with identify compress\n\t\tif (this.useIdentifyCompress) {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t// eslint-disable-next-line promise/prefer-await-to-callbacks\n\t\t\t\tinflate(decompressable, { chunkSize: 65_535 }, (err, result) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(JSON.parse(this.textDecoder.decode(result)) as GatewayReceivePayload);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\t// Deal with gw wide zlib-stream compression\n\t\tif (this.inflate) {\n\t\t\tconst l = decompressable.length;\n\t\t\tconst flush =\n\t\t\t\tl >= 4 &&\n\t\t\t\tdecompressable[l - 4] === 0x00 &&\n\t\t\t\tdecompressable[l - 3] === 0x00 &&\n\t\t\t\tdecompressable[l - 2] === 0xff &&\n\t\t\t\tdecompressable[l - 1] === 0xff;\n\n\t\t\tconst zlib = (await getZlibSync())!;\n\t\t\tthis.inflate.push(Buffer.from(decompressable), flush ? zlib.Z_SYNC_FLUSH : zlib.Z_NO_FLUSH);\n\n\t\t\tif (this.inflate.err) {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error(`${this.inflate.err}${this.inflate.msg ? `: ${this.inflate.msg}` : ''}`),\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!flush) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst { result } = this.inflate;\n\t\t\tif (!result) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn JSON.parse(typeof result === 'string' ? result : this.textDecoder.decode(result)) as GatewayReceivePayload;\n\t\t}\n\n\t\tthis.debug([\n\t\t\t'Received a message we were unable to decompress',\n\t\t\t`isBinary: ${isBinary.toString()}`,\n\t\t\t`useIdentifyCompress: ${this.useIdentifyCompress.toString()}`,\n\t\t\t`inflate: ${Boolean(this.inflate).toString()}`,\n\t\t]);\n\n\t\treturn null;\n\t}\n\n\tprivate async onMessage(data: Data, isBinary: boolean) {\n\t\tconst payload = await this.unpackMessage(data, isBinary);\n\t\tif (!payload) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (payload.op) {\n\t\t\tcase GatewayOpcodes.Dispatch: {\n\t\t\t\tif (this.#status === WebSocketShardStatus.Resuming) {\n\t\t\t\t\tthis.replayedEvents++;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line sonarjs/no-nested-switch\n\t\t\t\tswitch (payload.t) {\n\t\t\t\t\tcase GatewayDispatchEvents.Ready: {\n\t\t\t\t\t\tthis.#status = WebSocketShardStatus.Ready;\n\n\t\t\t\t\t\tconst session = {\n\t\t\t\t\t\t\tsequence: payload.s,\n\t\t\t\t\t\t\tsessionId: payload.d.session_id,\n\t\t\t\t\t\t\tshardId: this.id,\n\t\t\t\t\t\t\tshardCount: this.strategy.options.shardCount,\n\t\t\t\t\t\t\tresumeURL: payload.d.resume_gateway_url,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tawait this.strategy.updateSessionInfo(this.id, session);\n\n\t\t\t\t\t\tthis.emit(WebSocketShardEvents.Ready, { data: payload.d });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase GatewayDispatchEvents.Resumed: {\n\t\t\t\t\t\tthis.#status = WebSocketShardStatus.Ready;\n\t\t\t\t\t\tthis.debug([`Resumed and replayed ${this.replayedEvents} events`]);\n\t\t\t\t\t\tthis.emit(WebSocketShardEvents.Resumed);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst session = await this.strategy.retrieveSessionInfo(this.id);\n\t\t\t\tif (session) {\n\t\t\t\t\tif (payload.s > session.sequence) {\n\t\t\t\t\t\tawait this.strategy.updateSessionInfo(this.id, { ...session, sequence: payload.s });\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.debug([\n\t\t\t\t\t\t`Received a ${payload.t} event but no session is available. Session information cannot be re-constructed in this state without a full reconnect`,\n\t\t\t\t\t]);\n\t\t\t\t}\n\n\t\t\t\tthis.emit(WebSocketShardEvents.Dispatch, { data: payload });\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.Heartbeat: {\n\t\t\t\tawait this.heartbeat(true);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.Reconnect: {\n\t\t\t\tawait this.destroy({\n\t\t\t\t\treason: 'Told to reconnect by Discord',\n\t\t\t\t\trecover: WebSocketShardDestroyRecovery.Resume,\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.InvalidSession: {\n\t\t\t\tthis.debug([`Invalid session; will attempt to resume: ${payload.d.toString()}`]);\n\t\t\t\tconst session = await this.strategy.retrieveSessionInfo(this.id);\n\t\t\t\tif (payload.d && session) {\n\t\t\t\t\tawait this.resume(session);\n\t\t\t\t} else {\n\t\t\t\t\tawait this.destroy({\n\t\t\t\t\t\treason: 'Invalid session',\n\t\t\t\t\t\trecover: WebSocketShardDestroyRecovery.Reconnect,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.Hello: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Hello);\n\t\t\t\tconst jitter = Math.random();\n\t\t\t\tconst firstWait = Math.floor(payload.d.heartbeat_interval * jitter);\n\t\t\t\tthis.debug([`Preparing first heartbeat of the connection with a jitter of ${jitter}; waiting ${firstWait}ms`]);\n\n\t\t\t\ttry {\n\t\t\t\t\tconst controller = new AbortController();\n\t\t\t\t\tthis.initialHeartbeatTimeoutController = controller;\n\t\t\t\t\tawait sleep(firstWait, undefined, { signal: controller.signal });\n\t\t\t\t} catch {\n\t\t\t\t\tthis.debug(['Cancelled initial heartbeat due to #destroy being called']);\n\t\t\t\t\treturn;\n\t\t\t\t} finally {\n\t\t\t\t\tthis.initialHeartbeatTimeoutController = null;\n\t\t\t\t}\n\n\t\t\t\tawait this.heartbeat();\n\n\t\t\t\tthis.debug([`First heartbeat sent, starting to beat every ${payload.d.heartbeat_interval}ms`]);\n\t\t\t\tthis.heartbeatInterval = setInterval(() => void this.heartbeat(), payload.d.heartbeat_interval);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.HeartbeatAck: {\n\t\t\t\tthis.isAck = true;\n\n\t\t\t\tconst ackAt = Date.now();\n\t\t\t\tthis.emit(WebSocketShardEvents.HeartbeatComplete, {\n\t\t\t\t\tackAt,\n\t\t\t\t\theartbeatAt: this.lastHeartbeatAt,\n\t\t\t\t\tlatency: ackAt - this.lastHeartbeatAt,\n\t\t\t\t});\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate onError(error: Error) {\n\t\tif ('code' in error && ['ECONNRESET', 'ECONNREFUSED'].includes(error.code as string)) {\n\t\t\tthis.debug(['Failed to connect to the gateway URL specified due to a network error']);\n\t\t\tthis.failedToConnectDueToNetworkError = true;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.emit(WebSocketShardEvents.Error, { error });\n\t}\n\n\tprivate async onClose(code: number) {\n\t\tthis.emit(WebSocketShardEvents.Closed, { code });\n\n\t\tswitch (code) {\n\t\t\tcase CloseCodes.Normal: {\n\t\t\t\treturn this.destroy({\n\t\t\t\t\tcode,\n\t\t\t\t\treason: 'Got disconnected by Discord',\n\t\t\t\t\trecover: WebSocketShardDestroyRecovery.Reconnect,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tcase CloseCodes.Resuming: {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.UnknownError: {\n\t\t\t\tthis.debug([`An unknown error occurred: ${code}`]);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.UnknownOpcode: {\n\t\t\t\tthis.debug(['An invalid opcode was sent to Discord.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.DecodeError: {\n\t\t\t\tthis.debug(['An invalid payload was sent to Discord.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.NotAuthenticated: {\n\t\t\t\tthis.debug(['A request was somehow sent before the identify/resume payload.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Reconnect });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.AuthenticationFailed: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Authentication failed'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.AlreadyAuthenticated: {\n\t\t\t\tthis.debug(['More than one auth payload was sent.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Reconnect });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.InvalidSeq: {\n\t\t\t\tthis.debug(['An invalid sequence was sent.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Reconnect });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.RateLimited: {\n\t\t\t\tthis.debug(['The WebSocket rate limit has been hit, this should never happen']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Reconnect });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.SessionTimedOut: {\n\t\t\t\tthis.debug(['Session timed out.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.InvalidShard: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Invalid shard'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.ShardingRequired: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Sharding is required'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.InvalidAPIVersion: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Used an invalid API version'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.InvalidIntents: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Used invalid intents'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.DisallowedIntents: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Used disallowed intents'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\tthis.debug([\n\t\t\t\t\t`The gateway closed with an unexpected code ${code}, attempting to ${\n\t\t\t\t\t\tthis.failedToConnectDueToNetworkError ? 'reconnect' : 'resume'\n\t\t\t\t\t}.`,\n\t\t\t\t]);\n\t\t\t\treturn this.destroy({\n\t\t\t\t\tcode,\n\t\t\t\t\trecover: this.failedToConnectDueToNetworkError\n\t\t\t\t\t\t? WebSocketShardDestroyRecovery.Reconnect\n\t\t\t\t\t\t: WebSocketShardDestroyRecovery.Resume,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate debug(messages: [string, ...string[]]) {\n\t\tconst message = `${messages[0]}${\n\t\t\tmessages.length > 1\n\t\t\t\t? `\\n${messages\n\t\t\t\t\t\t.slice(1)\n\t\t\t\t\t\t.map((m) => `\t${m}`)\n\t\t\t\t\t\t.join('\\n')}`\n\t\t\t\t: ''\n\t\t}`;\n\n\t\tthis.emit(WebSocketShardEvents.Debug, { message });\n\t}\n}\n","import process from 'node:process';\nimport { Collection } from '@discordjs/collection';\nimport { lazy } from '@discordjs/util';\nimport { APIVersion, GatewayOpcodes } from 'discord-api-types/v10';\nimport { SimpleShardingStrategy } from '../strategies/sharding/SimpleShardingStrategy.js';\nimport { SimpleIdentifyThrottler } from '../throttling/SimpleIdentifyThrottler.js';\nimport type { SessionInfo, OptionalWebSocketManagerOptions, WebSocketManager } from '../ws/WebSocketManager.js';\nimport type { SendRateLimitState } from '../ws/WebSocketShard.js';\n\n/**\n * Valid encoding types\n */\nexport enum Encoding {\n\tJSON = 'json',\n}\n\n/**\n * Valid compression methods\n */\nexport enum CompressionMethod {\n\tZlibStream = 'zlib-stream',\n}\n\nexport const DefaultDeviceProperty = `@discordjs/ws 1.0.1` as `@discordjs/ws ${string}`;\n\nconst getDefaultSessionStore = lazy(() => new Collection<number, SessionInfo | null>());\n\n/**\n * Default options used by the manager\n */\nexport const DefaultWebSocketManagerOptions = {\n\tasync buildIdentifyThrottler(manager: WebSocketManager) {\n\t\tconst info = await manager.fetchGatewayInformation();\n\t\treturn new SimpleIdentifyThrottler(info.session_start_limit.max_concurrency);\n\t},\n\tbuildStrategy: (manager) => new SimpleShardingStrategy(manager),\n\tshardCount: null,\n\tshardIds: null,\n\tlargeThreshold: null,\n\tinitialPresence: null,\n\tidentifyProperties: {\n\t\tbrowser: DefaultDeviceProperty,\n\t\tdevice: DefaultDeviceProperty,\n\t\tos: process.platform,\n\t},\n\tversion: APIVersion,\n\tencoding: Encoding.JSON,\n\tcompression: null,\n\tretrieveSessionInfo(shardId) {\n\t\tconst store = getDefaultSessionStore();\n\t\treturn store.get(shardId) ?? null;\n\t},\n\tupdateSessionInfo(shardId: number, info: SessionInfo | null) {\n\t\tconst store = getDefaultSessionStore();\n\t\tif (info) {\n\t\t\tstore.set(shardId, info);\n\t\t} else {\n\t\t\tstore.delete(shardId);\n\t\t}\n\t},\n\thandshakeTimeout: 30_000,\n\thelloTimeout: 60_000,\n\treadyTimeout: 15_000,\n} as const satisfies OptionalWebSocketManagerOptions;\n\nexport const ImportantGatewayOpcodes = new Set([\n\tGatewayOpcodes.Heartbeat,\n\tGatewayOpcodes.Identify,\n\tGatewayOpcodes.Resume,\n]);\n\nexport function getInitialSendRateLimitState(): SendRateLimitState {\n\treturn {\n\t\tremaining: 120,\n\t\tresetAt: Date.now() + 60_000,\n\t};\n}\n","import { Collection } from '@discordjs/collection';\nimport type { GatewaySendPayload } from 'discord-api-types/v10';\nimport type { WebSocketManager } from '../../ws/WebSocketManager.js';\nimport { WebSocketShard, WebSocketShardEvents, type WebSocketShardDestroyOptions } from '../../ws/WebSocketShard.js';\nimport { managerToFetchingStrategyOptions } from '../context/IContextFetchingStrategy.js';\nimport { SimpleContextFetchingStrategy } from '../context/SimpleContextFetchingStrategy.js';\nimport type { IShardingStrategy } from './IShardingStrategy.js';\n\n/**\n * Simple strategy that just spawns shards in the current process\n */\nexport class SimpleShardingStrategy implements IShardingStrategy {\n\tprivate readonly manager: WebSocketManager;\n\n\tprivate readonly shards = new Collection<number, WebSocketShard>();\n\n\tpublic constructor(manager: WebSocketManager) {\n\t\tthis.manager = manager;\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.spawn}\n\t */\n\tpublic async spawn(shardIds: number[]) {\n\t\tconst strategyOptions = await managerToFetchingStrategyOptions(this.manager);\n\n\t\tfor (const shardId of shardIds) {\n\t\t\tconst strategy = new SimpleContextFetchingStrategy(this.manager, strategyOptions);\n\t\t\tconst shard = new WebSocketShard(strategy, shardId);\n\t\t\tfor (const event of Object.values(WebSocketShardEvents)) {\n\t\t\t\t// @ts-expect-error: Intentional\n\t\t\t\tshard.on(event, (payload) => this.manager.emit(event, { ...payload, shardId }));\n\t\t\t}\n\n\t\t\tthis.shards.set(shardId, shard);\n\t\t}\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.connect}\n\t */\n\tpublic async connect() {\n\t\tconst promises = [];\n\n\t\tfor (const shard of this.shards.values()) {\n\t\t\tpromises.push(shard.connect());\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.destroy}\n\t */\n\tpublic async destroy(options?: Omit<WebSocketShardDestroyOptions, 'recover'>) {\n\t\tconst promises = [];\n\n\t\tfor (const shard of this.shards.values()) {\n\t\t\tpromises.push(shard.destroy(options));\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t\tthis.shards.clear();\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.send}\n\t */\n\tpublic async send(shardId: number, payload: GatewaySendPayload) {\n\t\tconst shard = this.shards.get(shardId);\n\t\tif (!shard) {\n\t\t\tthrow new RangeError(`Shard ${shardId} not found`);\n\t\t}\n\n\t\treturn shard.send(payload);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.fetchStatus}\n\t */\n\tpublic async fetchStatus() {\n\t\treturn this.shards.mapValues((shard) => shard.status);\n\t}\n}\n","import type { IIdentifyThrottler } from '../../throttling/IIdentifyThrottler.js';\nimport type { SessionInfo, WebSocketManager } from '../../ws/WebSocketManager.js';\nimport type { FetchingStrategyOptions, IContextFetchingStrategy } from './IContextFetchingStrategy.js';\n\nexport class SimpleContextFetchingStrategy implements IContextFetchingStrategy {\n\t// This strategy assumes every shard is running under the same process - therefore we need a single\n\t// IdentifyThrottler per manager.\n\tprivate static throttlerCache = new WeakMap<WebSocketManager, IIdentifyThrottler>();\n\n\tprivate static async ensureThrottler(manager: WebSocketManager): Promise<IIdentifyThrottler> {\n\t\tconst throttler = SimpleContextFetchingStrategy.throttlerCache.get(manager);\n\t\tif (throttler) {\n\t\t\treturn throttler;\n\t\t}\n\n\t\tconst newThrottler = await manager.options.buildIdentifyThrottler(manager);\n\t\tSimpleContextFetchingStrategy.throttlerCache.set(manager, newThrottler);\n\n\t\treturn newThrottler;\n\t}\n\n\tpublic constructor(private readonly manager: WebSocketManager, public readonly options: FetchingStrategyOptions) {}\n\n\tpublic async retrieveSessionInfo(shardId: number): Promise<SessionInfo | null> {\n\t\treturn this.manager.options.retrieveSessionInfo(shardId);\n\t}\n\n\tpublic updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null) {\n\t\treturn this.manager.options.updateSessionInfo(shardId, sessionInfo);\n\t}\n\n\tpublic async waitForIdentify(shardId: number, signal: AbortSignal): Promise<void> {\n\t\tconst throttler = await SimpleContextFetchingStrategy.ensureThrottler(this.manager);\n\t\tawait throttler.waitForIdentify(shardId, signal);\n\t}\n}\n","import { setTimeout as sleep } from 'node:timers/promises';\nimport { Collection } from '@discordjs/collection';\nimport { AsyncQueue } from '@sapphire/async-queue';\nimport type { IIdentifyThrottler } from './IIdentifyThrottler.js';\n\n/**\n * The state of a rate limit key's identify queue.\n */\nexport interface IdentifyState {\n\tqueue: AsyncQueue;\n\tresetsAt: number;\n}\n\n/**\n * Local, in-memory identify throttler.\n */\nexport class SimpleIdentifyThrottler implements IIdentifyThrottler {\n\tprivate readonly states = new Collection<number, IdentifyState>();\n\n\tpublic constructor(private readonly maxConcurrency: number) {}\n\n\t/**\n\t * {@inheritDoc IIdentifyThrottler.waitForIdentify}\n\t */\n\tpublic async waitForIdentify(shardId: number, signal: AbortSignal): Promise<void> {\n\t\tconst key = shardId % this.maxConcurrency;\n\n\t\tconst state = this.states.ensure(key, () => {\n\t\t\treturn {\n\t\t\t\tqueue: new AsyncQueue(),\n\t\t\t\tresetsAt: Number.POSITIVE_INFINITY,\n\t\t\t};\n\t\t});\n\n\t\tawait state.queue.wait({ signal });\n\n\t\ttry {\n\t\t\tconst diff = state.resetsAt - Date.now();\n\t\t\tif (diff <= 5_000) {\n\t\t\t\t// To account for the latency the IDENTIFY payload goes through, we add a bit more wait time\n\t\t\t\tconst time = diff + Math.random() * 1_500;\n\t\t\t\tawait sleep(time);\n\t\t\t}\n\n\t\t\tstate.resetsAt = Date.now() + 5_000;\n\t\t} finally {\n\t\t\tstate.queue.shift();\n\t\t}\n\t}\n}\n","import { WorkerBootstrap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H;AAAA;AAAA;AAAA;AAAA,EAKA,MAAa,UAAU,UAAsC,CAAC,GAAkB;AAE/E,eAAW,WAAW,KAAK,KAAK,UAAU;AACzC,YAAM,QAAQ,IAAI,eAAe,IAAI,8BAA8B,KAAK,IAAI,GAAG,OAAO;AACtF,iBAAW,SAAS,QAAQ,iBAAiB,OAAO,OAAO,oBAAoB,GAAG;AAEjF,cAAM,GAAG,OAAO,CAAC,SAAS;AACzB,gBAAM,UAAgC;AAAA,YACrC;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UACD;AACA,UAAAA,YAAY,YAAY,OAAO;AAAA,QAChC,CAAC;AAAA,MACF;AAGA,YAAM,QAAQ,gBAAgB,KAAK;AACnC,WAAK,OAAO,IAAI,SAAS,KAAK;AAAA,IAC/B;AAGA,SAAK,kBAAkB;AAEvB,UAAM,UAAgC;AAAA,MACrC;AAAA,IACD;AACA,IAAAA,YAAY,YAAY,OAAO;AAAA,EAChC;AACD;;;AS7KA,IAAM,eAAe,IAAI,mBAAmB;AAC5C,KAAK,aAAa,UAAU;","names":["isMainThread","parentPort","Collection","Collection","Collection","resolve","payload","Buffer","once","sleep","Collection","lazy","AsyncQueue","GatewayOpcodes","Collection","Collection","Collection","Collection","Collection","Collection","lazy","WebSocketShardEvents","WebSocketShardDestroyRecovery","AsyncQueue","Collection","once","resolve","sleep","GatewayOpcodes","Buffer","session","Collection","isMainThread","parentPort"]} \ No newline at end of file
diff --git a/node_modules/@discordjs/ws/dist/index.d.mts b/node_modules/@discordjs/ws/dist/index.d.mts
new file mode 100644
index 0000000..cf7bb7c
--- /dev/null
+++ b/node_modules/@discordjs/ws/dist/index.d.mts
@@ -0,0 +1,669 @@
+import * as _discordjs_util from '@discordjs/util';
+import { Awaitable } from '@discordjs/util';
+import { GatewayDispatchPayload, GatewayReadyDispatchData, GatewaySendPayload, GatewayOpcodes, GatewayIntentBits, GatewayIdentifyProperties, GatewayPresenceUpdateData, APIGatewayBotInfo } from 'discord-api-types/v10';
+import * as _discordjs_collection from '@discordjs/collection';
+import { Collection } from '@discordjs/collection';
+import { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';
+import { REST } from '@discordjs/rest';
+import { AsyncQueue } from '@sapphire/async-queue';
+
+declare enum WebSocketShardEvents {
+ Closed = "closed",
+ Debug = "debug",
+ Dispatch = "dispatch",
+ Error = "error",
+ HeartbeatComplete = "heartbeat",
+ Hello = "hello",
+ Ready = "ready",
+ Resumed = "resumed"
+}
+declare enum WebSocketShardStatus {
+ Idle = 0,
+ Connecting = 1,
+ Resuming = 2,
+ Ready = 3
+}
+declare enum WebSocketShardDestroyRecovery {
+ Reconnect = 0,
+ Resume = 1
+}
+type WebSocketShardEventsMap = {
+ [WebSocketShardEvents.Closed]: [{
+ code: number;
+ }];
+ [WebSocketShardEvents.Debug]: [payload: {
+ message: string;
+ }];
+ [WebSocketShardEvents.Dispatch]: [payload: {
+ data: GatewayDispatchPayload;
+ }];
+ [WebSocketShardEvents.Error]: [payload: {
+ error: Error;
+ }];
+ [WebSocketShardEvents.Hello]: [];
+ [WebSocketShardEvents.Ready]: [payload: {
+ data: GatewayReadyDispatchData;
+ }];
+ [WebSocketShardEvents.Resumed]: [];
+ [WebSocketShardEvents.HeartbeatComplete]: [payload: {
+ ackAt: number;
+ heartbeatAt: number;
+ latency: number;
+ }];
+};
+interface WebSocketShardDestroyOptions {
+ code?: number;
+ reason?: string;
+ recover?: WebSocketShardDestroyRecovery;
+}
+declare enum CloseCodes {
+ Normal = 1000,
+ Resuming = 4200
+}
+interface SendRateLimitState {
+ remaining: number;
+ resetAt: number;
+}
+declare class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {
+ #private;
+ private connection;
+ private useIdentifyCompress;
+ private inflate;
+ private readonly textDecoder;
+ private replayedEvents;
+ private isAck;
+ private sendRateLimitState;
+ private initialHeartbeatTimeoutController;
+ private heartbeatInterval;
+ private lastHeartbeatAt;
+ private initialConnectResolved;
+ private failedToConnectDueToNetworkError;
+ private readonly sendQueue;
+ private readonly timeoutAbortControllers;
+ private readonly strategy;
+ readonly id: number;
+ get status(): WebSocketShardStatus;
+ constructor(strategy: IContextFetchingStrategy, id: number);
+ connect(): Promise<void>;
+ private internalConnect;
+ destroy(options?: WebSocketShardDestroyOptions): Promise<void>;
+ private waitForEvent;
+ send(payload: GatewaySendPayload): Promise<void>;
+ private identify;
+ private resume;
+ private heartbeat;
+ private unpackMessage;
+ private onMessage;
+ private onError;
+ private onClose;
+ private debug;
+}
+
+/**
+ * Strategies responsible for spawning, initializing connections, destroying shards, and relaying events
+ */
+interface IShardingStrategy {
+ /**
+ * Initializes all the shards
+ */
+ connect(): Awaitable<void>;
+ /**
+ * Destroys all the shards
+ */
+ destroy(options?: Omit<WebSocketShardDestroyOptions, 'recover'>): Awaitable<void>;
+ /**
+ * Fetches the status of all the shards
+ */
+ fetchStatus(): Awaitable<Collection<number, WebSocketShardStatus>>;
+ /**
+ * Sends a payload to a shard
+ */
+ send(shardId: number, payload: GatewaySendPayload): Awaitable<void>;
+ /**
+ * Spawns all the shards
+ */
+ spawn(shardIds: number[]): Awaitable<void>;
+}
+
+/**
+ * IdentifyThrottlers are responsible for dictating when a shard is allowed to identify.
+ *
+ * @see {@link https://discord.com/developers/docs/topics/gateway#sharding-max-concurrency}
+ */
+interface IIdentifyThrottler {
+ /**
+ * Resolves once the given shard should be allowed to identify, or rejects if the operation was aborted.
+ */
+ waitForIdentify(shardId: number, signal: AbortSignal): Promise<void>;
+}
+
+/**
+ * Simple strategy that just spawns shards in the current process
+ */
+declare class SimpleShardingStrategy implements IShardingStrategy {
+ private readonly manager;
+ private readonly shards;
+ constructor(manager: WebSocketManager);
+ /**
+ * {@inheritDoc IShardingStrategy.spawn}
+ */
+ spawn(shardIds: number[]): Promise<void>;
+ /**
+ * {@inheritDoc IShardingStrategy.connect}
+ */
+ connect(): Promise<void>;
+ /**
+ * {@inheritDoc IShardingStrategy.destroy}
+ */
+ destroy(options?: Omit<WebSocketShardDestroyOptions, 'recover'>): Promise<void>;
+ /**
+ * {@inheritDoc IShardingStrategy.send}
+ */
+ send(shardId: number, payload: GatewaySendPayload): Promise<void>;
+ /**
+ * {@inheritDoc IShardingStrategy.fetchStatus}
+ */
+ fetchStatus(): Promise<Collection<number, WebSocketShardStatus>>;
+}
+
+/**
+ * The state of a rate limit key's identify queue.
+ */
+interface IdentifyState {
+ queue: AsyncQueue;
+ resetsAt: number;
+}
+/**
+ * Local, in-memory identify throttler.
+ */
+declare class SimpleIdentifyThrottler implements IIdentifyThrottler {
+ private readonly maxConcurrency;
+ private readonly states;
+ constructor(maxConcurrency: number);
+ /**
+ * {@inheritDoc IIdentifyThrottler.waitForIdentify}
+ */
+ waitForIdentify(shardId: number, signal: AbortSignal): Promise<void>;
+}
+
+/**
+ * Valid encoding types
+ */
+declare enum Encoding {
+ JSON = "json"
+}
+/**
+ * Valid compression methods
+ */
+declare enum CompressionMethod {
+ ZlibStream = "zlib-stream"
+}
+declare const DefaultDeviceProperty: `@discordjs/ws ${string}`;
+/**
+ * Default options used by the manager
+ */
+declare const DefaultWebSocketManagerOptions: {
+ readonly buildIdentifyThrottler: (manager: WebSocketManager) => Promise<SimpleIdentifyThrottler>;
+ readonly buildStrategy: (manager: WebSocketManager) => SimpleShardingStrategy;
+ readonly shardCount: null;
+ readonly shardIds: null;
+ readonly largeThreshold: null;
+ readonly initialPresence: null;
+ readonly identifyProperties: {
+ readonly browser: `@discordjs/ws ${string}`;
+ readonly device: `@discordjs/ws ${string}`;
+ readonly os: NodeJS.Platform;
+ };
+ readonly version: "10";
+ readonly encoding: Encoding;
+ readonly compression: null;
+ readonly retrieveSessionInfo: (shardId: number) => SessionInfo | null;
+ readonly updateSessionInfo: (shardId: number, info: SessionInfo | null) => void;
+ readonly handshakeTimeout: 30000;
+ readonly helloTimeout: 60000;
+ readonly readyTimeout: 15000;
+};
+declare const ImportantGatewayOpcodes: Set<GatewayOpcodes>;
+declare function getInitialSendRateLimitState(): SendRateLimitState;
+
+/**
+ * Represents a range of shard ids
+ */
+interface ShardRange {
+ end: number;
+ start: number;
+}
+/**
+ * Session information for a given shard, used to resume a session
+ */
+interface SessionInfo {
+ /**
+ * URL to use when resuming
+ */
+ resumeURL: string;
+ /**
+ * The sequence number of the last message sent by the shard
+ */
+ sequence: number;
+ /**
+ * Session id for this shard
+ */
+ sessionId: string;
+ /**
+ * The total number of shards at the time of this shard identifying
+ */
+ shardCount: number;
+ /**
+ * The id of the shard
+ */
+ shardId: number;
+}
+/**
+ * Required options for the WebSocketManager
+ */
+interface RequiredWebSocketManagerOptions {
+ /**
+ * The intents to request
+ */
+ intents: GatewayIntentBits | 0;
+ /**
+ * The REST instance to use for fetching gateway information
+ */
+ rest: REST;
+ /**
+ * The token to use for identifying with the gateway
+ */
+ token: string;
+}
+/**
+ * Optional additional configuration for the WebSocketManager
+ */
+interface OptionalWebSocketManagerOptions {
+ /**
+ * Builds an identify throttler to use for this manager's shards
+ */
+ buildIdentifyThrottler(manager: WebSocketManager): Awaitable<IIdentifyThrottler>;
+ /**
+ * Builds the strategy to use for sharding
+ *
+ * @example
+ * ```ts
+ * const manager = new WebSocketManager({
+ * token: process.env.DISCORD_TOKEN,
+ * intents: 0, // for no intents
+ * rest,
+ * buildStrategy: (manager) => new WorkerShardingStrategy(manager, { shardsPerWorker: 2 }),
+ * });
+ * ```
+ */
+ buildStrategy(manager: WebSocketManager): IShardingStrategy;
+ /**
+ * The compression method to use
+ *
+ * @defaultValue `null` (no compression)
+ */
+ compression: CompressionMethod | null;
+ /**
+ * The encoding to use
+ *
+ * @defaultValue `'json'`
+ */
+ encoding: Encoding;
+ /**
+ * How long to wait for a shard to connect before giving up
+ */
+ handshakeTimeout: number | null;
+ /**
+ * How long to wait for a shard's HELLO packet before giving up
+ */
+ helloTimeout: number | null;
+ /**
+ * Properties to send to the gateway when identifying
+ */
+ identifyProperties: GatewayIdentifyProperties;
+ /**
+ * Initial presence data to send to the gateway when identifying
+ */
+ initialPresence: GatewayPresenceUpdateData | null;
+ /**
+ * Value between 50 and 250, total number of members where the gateway will stop sending offline members in the guild member list
+ */
+ largeThreshold: number | null;
+ /**
+ * How long to wait for a shard's READY packet before giving up
+ */
+ readyTimeout: number | null;
+ /**
+ * Function used to retrieve session information (and attempt to resume) for a given shard
+ *
+ * @example
+ * ```ts
+ * const manager = new WebSocketManager({
+ * async retrieveSessionInfo(shardId): Awaitable<SessionInfo | null> {
+ * // Fetch this info from redis or similar
+ * return { sessionId: string, sequence: number };
+ * // Return null if no information is found
+ * },
+ * });
+ * ```
+ */
+ retrieveSessionInfo(shardId: number): Awaitable<SessionInfo | null>;
+ /**
+ * The total number of shards across all WebsocketManagers you intend to instantiate.
+ * Use `null` to use Discord's recommended shard count
+ */
+ shardCount: number | null;
+ /**
+ * The ids of the shards this WebSocketManager should manage.
+ * Use `null` to simply spawn 0 through `shardCount - 1`
+ *
+ * @example
+ * ```ts
+ * const manager = new WebSocketManager({
+ * shardIds: [1, 3, 7], // spawns shard 1, 3, and 7, nothing else
+ * });
+ * ```
+ * @example
+ * ```ts
+ * const manager = new WebSocketManager({
+ * shardIds: {
+ * start: 3,
+ * end: 6,
+ * }, // spawns shards 3, 4, 5, and 6
+ * });
+ * ```
+ */
+ shardIds: number[] | ShardRange | null;
+ /**
+ * Function used to store session information for a given shard
+ */
+ updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null): Awaitable<void>;
+ /**
+ * The gateway version to use
+ *
+ * @defaultValue `'10'`
+ */
+ version: string;
+}
+type WebSocketManagerOptions = OptionalWebSocketManagerOptions & RequiredWebSocketManagerOptions;
+type ManagerShardEventsMap = {
+ [K in keyof WebSocketShardEventsMap]: [
+ WebSocketShardEventsMap[K] extends [] ? {
+ shardId: number;
+ } : WebSocketShardEventsMap[K][0] & {
+ shardId: number;
+ }
+ ];
+};
+declare class WebSocketManager extends AsyncEventEmitter<ManagerShardEventsMap> {
+ /**
+ * The options being used by this manager
+ */
+ readonly options: WebSocketManagerOptions;
+ /**
+ * Internal cache for a GET /gateway/bot result
+ */
+ private gatewayInformation;
+ /**
+ * Internal cache for the shard ids
+ */
+ private shardIds;
+ /**
+ * Strategy used to manage shards
+ *
+ * @defaultValue `SimpleShardingStrategy`
+ */
+ private readonly strategy;
+ constructor(options: Partial<OptionalWebSocketManagerOptions> & RequiredWebSocketManagerOptions);
+ /**
+ * Fetches the gateway information from Discord - or returns it from cache if available
+ *
+ * @param force - Whether to ignore the cache and force a fresh fetch
+ */
+ fetchGatewayInformation(force?: boolean): Promise<APIGatewayBotInfo>;
+ /**
+ * Updates your total shard count on-the-fly, spawning shards as needed
+ *
+ * @param shardCount - The new shard count to use
+ */
+ updateShardCount(shardCount: number | null): Promise<this>;
+ /**
+ * Yields the total number of shards across for your bot, accounting for Discord recommendations
+ */
+ getShardCount(): Promise<number>;
+ /**
+ * Yields the ids of the shards this manager should manage
+ */
+ getShardIds(force?: boolean): Promise<number[]>;
+ connect(): Promise<void>;
+ destroy(options?: Omit<WebSocketShardDestroyOptions, 'recover'>): Awaitable<void>;
+ send(shardId: number, payload: GatewaySendPayload): Awaitable<void>;
+ fetchStatus(): Awaitable<_discordjs_collection.Collection<number, WebSocketShardStatus>>;
+}
+
+interface FetchingStrategyOptions extends Omit<WebSocketManagerOptions, 'buildIdentifyThrottler' | 'buildStrategy' | 'rest' | 'retrieveSessionInfo' | 'shardCount' | 'shardIds' | 'updateSessionInfo'> {
+ readonly gatewayInformation: APIGatewayBotInfo;
+ readonly shardCount: number;
+}
+/**
+ * Strategies responsible solely for making manager information accessible
+ */
+interface IContextFetchingStrategy {
+ readonly options: FetchingStrategyOptions;
+ retrieveSessionInfo(shardId: number): Awaitable<SessionInfo | null>;
+ updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null): Awaitable<void>;
+ /**
+ * Resolves once the given shard should be allowed to identify
+ * This should correctly handle the signal and reject with an abort error if the operation is aborted.
+ * Other errors will cause the shard to reconnect.
+ */
+ waitForIdentify(shardId: number, signal: AbortSignal): Promise<void>;
+}
+declare function managerToFetchingStrategyOptions(manager: WebSocketManager): Promise<FetchingStrategyOptions>;
+
+declare class SimpleContextFetchingStrategy implements IContextFetchingStrategy {
+ private readonly manager;
+ readonly options: FetchingStrategyOptions;
+ private static throttlerCache;
+ private static ensureThrottler;
+ constructor(manager: WebSocketManager, options: FetchingStrategyOptions);
+ retrieveSessionInfo(shardId: number): Promise<SessionInfo | null>;
+ updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null): _discordjs_util.Awaitable<void>;
+ waitForIdentify(shardId: number, signal: AbortSignal): Promise<void>;
+}
+
+declare class WorkerContextFetchingStrategy implements IContextFetchingStrategy {
+ readonly options: FetchingStrategyOptions;
+ private readonly sessionPromises;
+ private readonly waitForIdentifyPromises;
+ constructor(options: FetchingStrategyOptions);
+ retrieveSessionInfo(shardId: number): Promise<SessionInfo | null>;
+ updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null): void;
+ waitForIdentify(shardId: number, signal: AbortSignal): Promise<void>;
+}
+
+interface WorkerData extends FetchingStrategyOptions {
+ shardIds: number[];
+}
+declare enum WorkerSendPayloadOp {
+ Connect = 0,
+ Destroy = 1,
+ Send = 2,
+ SessionInfoResponse = 3,
+ ShardIdentifyResponse = 4,
+ FetchStatus = 5
+}
+type WorkerSendPayload = {
+ nonce: number;
+ ok: boolean;
+ op: WorkerSendPayloadOp.ShardIdentifyResponse;
+} | {
+ nonce: number;
+ op: WorkerSendPayloadOp.FetchStatus;
+ shardId: number;
+} | {
+ nonce: number;
+ op: WorkerSendPayloadOp.SessionInfoResponse;
+ session: SessionInfo | null;
+} | {
+ op: WorkerSendPayloadOp.Connect;
+ shardId: number;
+} | {
+ op: WorkerSendPayloadOp.Destroy;
+ options?: WebSocketShardDestroyOptions;
+ shardId: number;
+} | {
+ op: WorkerSendPayloadOp.Send;
+ payload: GatewaySendPayload;
+ shardId: number;
+};
+declare enum WorkerReceivePayloadOp {
+ Connected = 0,
+ Destroyed = 1,
+ Event = 2,
+ RetrieveSessionInfo = 3,
+ UpdateSessionInfo = 4,
+ WaitForIdentify = 5,
+ FetchStatusResponse = 6,
+ WorkerReady = 7,
+ CancelIdentify = 8
+}
+type WorkerReceivePayload = {
+ data: any;
+ event: WebSocketShardEvents;
+ op: WorkerReceivePayloadOp.Event;
+ shardId: number;
+} | {
+ nonce: number;
+ op: WorkerReceivePayloadOp.CancelIdentify;
+} | {
+ nonce: number;
+ op: WorkerReceivePayloadOp.FetchStatusResponse;
+ status: WebSocketShardStatus;
+} | {
+ nonce: number;
+ op: WorkerReceivePayloadOp.RetrieveSessionInfo;
+ shardId: number;
+} | {
+ nonce: number;
+ op: WorkerReceivePayloadOp.WaitForIdentify;
+ shardId: number;
+} | {
+ op: WorkerReceivePayloadOp.Connected;
+ shardId: number;
+} | {
+ op: WorkerReceivePayloadOp.Destroyed;
+ shardId: number;
+} | {
+ op: WorkerReceivePayloadOp.UpdateSessionInfo;
+ session: SessionInfo | null;
+ shardId: number;
+} | {
+ op: WorkerReceivePayloadOp.WorkerReady;
+};
+/**
+ * Options for a {@link WorkerShardingStrategy}
+ */
+interface WorkerShardingStrategyOptions {
+ /**
+ * Dictates how many shards should be spawned per worker thread.
+ */
+ shardsPerWorker: number | 'all';
+ /**
+ * Path to the worker file to use. The worker requires quite a bit of setup, it is recommended you leverage the {@link WorkerBootstrapper} class.
+ */
+ workerPath?: string;
+}
+/**
+ * Strategy used to spawn threads in worker_threads
+ */
+declare class WorkerShardingStrategy implements IShardingStrategy {
+ #private;
+ private readonly manager;
+ private readonly options;
+ private readonly connectPromises;
+ private readonly destroyPromises;
+ private readonly fetchStatusPromises;
+ private readonly waitForIdentifyControllers;
+ private throttler?;
+ constructor(manager: WebSocketManager, options: WorkerShardingStrategyOptions);
+ /**
+ * {@inheritDoc IShardingStrategy.spawn}
+ */
+ spawn(shardIds: number[]): Promise<void>;
+ /**
+ * {@inheritDoc IShardingStrategy.connect}
+ */
+ connect(): Promise<void>;
+ /**
+ * {@inheritDoc IShardingStrategy.destroy}
+ */
+ destroy(options?: Omit<WebSocketShardDestroyOptions, 'recover'>): Promise<void>;
+ /**
+ * {@inheritDoc IShardingStrategy.send}
+ */
+ send(shardId: number, data: GatewaySendPayload): void;
+ /**
+ * {@inheritDoc IShardingStrategy.fetchStatus}
+ */
+ fetchStatus(): Promise<Collection<number, WebSocketShardStatus>>;
+ private setupWorker;
+ private resolveWorkerPath;
+ private waitForWorkerReady;
+ private onMessage;
+ private ensureThrottler;
+}
+
+/**
+ * Options for bootstrapping the worker
+ */
+interface BootstrapOptions {
+ /**
+ * Shard events to just arbitrarily forward to the parent thread for the manager to emit
+ * Note: By default, this will include ALL events
+ * you most likely want to handle dispatch within the worker itself
+ */
+ forwardEvents?: WebSocketShardEvents[];
+ /**
+ * Function to call when a shard is created for additional setup
+ */
+ shardCallback?(shard: WebSocketShard): Awaitable<void>;
+}
+/**
+ * Utility class for bootstrapping a worker thread to be used for sharding
+ */
+declare class WorkerBootstrapper {
+ /**
+ * The data passed to the worker thread
+ */
+ protected readonly data: WorkerData;
+ /**
+ * The shards that are managed by this worker
+ */
+ protected readonly shards: Collection<number, WebSocketShard>;
+ constructor();
+ /**
+ * Helper method to initiate a shard's connection process
+ */
+ protected connect(shardId: number): Promise<void>;
+ /**
+ * Helper method to destroy a shard
+ */
+ protected destroy(shardId: number, options?: WebSocketShardDestroyOptions): Promise<void>;
+ /**
+ * Helper method to attach event listeners to the parentPort
+ */
+ protected setupThreadEvents(): void;
+ /**
+ * Bootstraps the worker thread with the provided options
+ */
+ bootstrap(options?: Readonly<BootstrapOptions>): Promise<void>;
+}
+
+/**
+ * The {@link https://github.com/discordjs/discord.js/blob/main/packages/ws/#readme | @discordjs/ws} version
+ * that you are currently using.
+ */
+declare const version: string;
+
+export { BootstrapOptions, CloseCodes, CompressionMethod, DefaultDeviceProperty, DefaultWebSocketManagerOptions, Encoding, FetchingStrategyOptions, IContextFetchingStrategy, IIdentifyThrottler, IShardingStrategy, IdentifyState, ImportantGatewayOpcodes, ManagerShardEventsMap, OptionalWebSocketManagerOptions, RequiredWebSocketManagerOptions, SendRateLimitState, SessionInfo, ShardRange, SimpleContextFetchingStrategy, SimpleIdentifyThrottler, SimpleShardingStrategy, WebSocketManager, WebSocketManagerOptions, WebSocketShard, WebSocketShardDestroyOptions, WebSocketShardDestroyRecovery, WebSocketShardEvents, WebSocketShardEventsMap, WebSocketShardStatus, WorkerBootstrapper, WorkerContextFetchingStrategy, WorkerData, WorkerReceivePayload, WorkerReceivePayloadOp, WorkerSendPayload, WorkerSendPayloadOp, WorkerShardingStrategy, WorkerShardingStrategyOptions, getInitialSendRateLimitState, managerToFetchingStrategyOptions, version };
diff --git a/node_modules/@discordjs/ws/dist/index.d.ts b/node_modules/@discordjs/ws/dist/index.d.ts
new file mode 100644
index 0000000..cf7bb7c
--- /dev/null
+++ b/node_modules/@discordjs/ws/dist/index.d.ts
@@ -0,0 +1,669 @@
+import * as _discordjs_util from '@discordjs/util';
+import { Awaitable } from '@discordjs/util';
+import { GatewayDispatchPayload, GatewayReadyDispatchData, GatewaySendPayload, GatewayOpcodes, GatewayIntentBits, GatewayIdentifyProperties, GatewayPresenceUpdateData, APIGatewayBotInfo } from 'discord-api-types/v10';
+import * as _discordjs_collection from '@discordjs/collection';
+import { Collection } from '@discordjs/collection';
+import { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';
+import { REST } from '@discordjs/rest';
+import { AsyncQueue } from '@sapphire/async-queue';
+
+declare enum WebSocketShardEvents {
+ Closed = "closed",
+ Debug = "debug",
+ Dispatch = "dispatch",
+ Error = "error",
+ HeartbeatComplete = "heartbeat",
+ Hello = "hello",
+ Ready = "ready",
+ Resumed = "resumed"
+}
+declare enum WebSocketShardStatus {
+ Idle = 0,
+ Connecting = 1,
+ Resuming = 2,
+ Ready = 3
+}
+declare enum WebSocketShardDestroyRecovery {
+ Reconnect = 0,
+ Resume = 1
+}
+type WebSocketShardEventsMap = {
+ [WebSocketShardEvents.Closed]: [{
+ code: number;
+ }];
+ [WebSocketShardEvents.Debug]: [payload: {
+ message: string;
+ }];
+ [WebSocketShardEvents.Dispatch]: [payload: {
+ data: GatewayDispatchPayload;
+ }];
+ [WebSocketShardEvents.Error]: [payload: {
+ error: Error;
+ }];
+ [WebSocketShardEvents.Hello]: [];
+ [WebSocketShardEvents.Ready]: [payload: {
+ data: GatewayReadyDispatchData;
+ }];
+ [WebSocketShardEvents.Resumed]: [];
+ [WebSocketShardEvents.HeartbeatComplete]: [payload: {
+ ackAt: number;
+ heartbeatAt: number;
+ latency: number;
+ }];
+};
+interface WebSocketShardDestroyOptions {
+ code?: number;
+ reason?: string;
+ recover?: WebSocketShardDestroyRecovery;
+}
+declare enum CloseCodes {
+ Normal = 1000,
+ Resuming = 4200
+}
+interface SendRateLimitState {
+ remaining: number;
+ resetAt: number;
+}
+declare class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {
+ #private;
+ private connection;
+ private useIdentifyCompress;
+ private inflate;
+ private readonly textDecoder;
+ private replayedEvents;
+ private isAck;
+ private sendRateLimitState;
+ private initialHeartbeatTimeoutController;
+ private heartbeatInterval;
+ private lastHeartbeatAt;
+ private initialConnectResolved;
+ private failedToConnectDueToNetworkError;
+ private readonly sendQueue;
+ private readonly timeoutAbortControllers;
+ private readonly strategy;
+ readonly id: number;
+ get status(): WebSocketShardStatus;
+ constructor(strategy: IContextFetchingStrategy, id: number);
+ connect(): Promise<void>;
+ private internalConnect;
+ destroy(options?: WebSocketShardDestroyOptions): Promise<void>;
+ private waitForEvent;
+ send(payload: GatewaySendPayload): Promise<void>;
+ private identify;
+ private resume;
+ private heartbeat;
+ private unpackMessage;
+ private onMessage;
+ private onError;
+ private onClose;
+ private debug;
+}
+
+/**
+ * Strategies responsible for spawning, initializing connections, destroying shards, and relaying events
+ */
+interface IShardingStrategy {
+ /**
+ * Initializes all the shards
+ */
+ connect(): Awaitable<void>;
+ /**
+ * Destroys all the shards
+ */
+ destroy(options?: Omit<WebSocketShardDestroyOptions, 'recover'>): Awaitable<void>;
+ /**
+ * Fetches the status of all the shards
+ */
+ fetchStatus(): Awaitable<Collection<number, WebSocketShardStatus>>;
+ /**
+ * Sends a payload to a shard
+ */
+ send(shardId: number, payload: GatewaySendPayload): Awaitable<void>;
+ /**
+ * Spawns all the shards
+ */
+ spawn(shardIds: number[]): Awaitable<void>;
+}
+
+/**
+ * IdentifyThrottlers are responsible for dictating when a shard is allowed to identify.
+ *
+ * @see {@link https://discord.com/developers/docs/topics/gateway#sharding-max-concurrency}
+ */
+interface IIdentifyThrottler {
+ /**
+ * Resolves once the given shard should be allowed to identify, or rejects if the operation was aborted.
+ */
+ waitForIdentify(shardId: number, signal: AbortSignal): Promise<void>;
+}
+
+/**
+ * Simple strategy that just spawns shards in the current process
+ */
+declare class SimpleShardingStrategy implements IShardingStrategy {
+ private readonly manager;
+ private readonly shards;
+ constructor(manager: WebSocketManager);
+ /**
+ * {@inheritDoc IShardingStrategy.spawn}
+ */
+ spawn(shardIds: number[]): Promise<void>;
+ /**
+ * {@inheritDoc IShardingStrategy.connect}
+ */
+ connect(): Promise<void>;
+ /**
+ * {@inheritDoc IShardingStrategy.destroy}
+ */
+ destroy(options?: Omit<WebSocketShardDestroyOptions, 'recover'>): Promise<void>;
+ /**
+ * {@inheritDoc IShardingStrategy.send}
+ */
+ send(shardId: number, payload: GatewaySendPayload): Promise<void>;
+ /**
+ * {@inheritDoc IShardingStrategy.fetchStatus}
+ */
+ fetchStatus(): Promise<Collection<number, WebSocketShardStatus>>;
+}
+
+/**
+ * The state of a rate limit key's identify queue.
+ */
+interface IdentifyState {
+ queue: AsyncQueue;
+ resetsAt: number;
+}
+/**
+ * Local, in-memory identify throttler.
+ */
+declare class SimpleIdentifyThrottler implements IIdentifyThrottler {
+ private readonly maxConcurrency;
+ private readonly states;
+ constructor(maxConcurrency: number);
+ /**
+ * {@inheritDoc IIdentifyThrottler.waitForIdentify}
+ */
+ waitForIdentify(shardId: number, signal: AbortSignal): Promise<void>;
+}
+
+/**
+ * Valid encoding types
+ */
+declare enum Encoding {
+ JSON = "json"
+}
+/**
+ * Valid compression methods
+ */
+declare enum CompressionMethod {
+ ZlibStream = "zlib-stream"
+}
+declare const DefaultDeviceProperty: `@discordjs/ws ${string}`;
+/**
+ * Default options used by the manager
+ */
+declare const DefaultWebSocketManagerOptions: {
+ readonly buildIdentifyThrottler: (manager: WebSocketManager) => Promise<SimpleIdentifyThrottler>;
+ readonly buildStrategy: (manager: WebSocketManager) => SimpleShardingStrategy;
+ readonly shardCount: null;
+ readonly shardIds: null;
+ readonly largeThreshold: null;
+ readonly initialPresence: null;
+ readonly identifyProperties: {
+ readonly browser: `@discordjs/ws ${string}`;
+ readonly device: `@discordjs/ws ${string}`;
+ readonly os: NodeJS.Platform;
+ };
+ readonly version: "10";
+ readonly encoding: Encoding;
+ readonly compression: null;
+ readonly retrieveSessionInfo: (shardId: number) => SessionInfo | null;
+ readonly updateSessionInfo: (shardId: number, info: SessionInfo | null) => void;
+ readonly handshakeTimeout: 30000;
+ readonly helloTimeout: 60000;
+ readonly readyTimeout: 15000;
+};
+declare const ImportantGatewayOpcodes: Set<GatewayOpcodes>;
+declare function getInitialSendRateLimitState(): SendRateLimitState;
+
+/**
+ * Represents a range of shard ids
+ */
+interface ShardRange {
+ end: number;
+ start: number;
+}
+/**
+ * Session information for a given shard, used to resume a session
+ */
+interface SessionInfo {
+ /**
+ * URL to use when resuming
+ */
+ resumeURL: string;
+ /**
+ * The sequence number of the last message sent by the shard
+ */
+ sequence: number;
+ /**
+ * Session id for this shard
+ */
+ sessionId: string;
+ /**
+ * The total number of shards at the time of this shard identifying
+ */
+ shardCount: number;
+ /**
+ * The id of the shard
+ */
+ shardId: number;
+}
+/**
+ * Required options for the WebSocketManager
+ */
+interface RequiredWebSocketManagerOptions {
+ /**
+ * The intents to request
+ */
+ intents: GatewayIntentBits | 0;
+ /**
+ * The REST instance to use for fetching gateway information
+ */
+ rest: REST;
+ /**
+ * The token to use for identifying with the gateway
+ */
+ token: string;
+}
+/**
+ * Optional additional configuration for the WebSocketManager
+ */
+interface OptionalWebSocketManagerOptions {
+ /**
+ * Builds an identify throttler to use for this manager's shards
+ */
+ buildIdentifyThrottler(manager: WebSocketManager): Awaitable<IIdentifyThrottler>;
+ /**
+ * Builds the strategy to use for sharding
+ *
+ * @example
+ * ```ts
+ * const manager = new WebSocketManager({
+ * token: process.env.DISCORD_TOKEN,
+ * intents: 0, // for no intents
+ * rest,
+ * buildStrategy: (manager) => new WorkerShardingStrategy(manager, { shardsPerWorker: 2 }),
+ * });
+ * ```
+ */
+ buildStrategy(manager: WebSocketManager): IShardingStrategy;
+ /**
+ * The compression method to use
+ *
+ * @defaultValue `null` (no compression)
+ */
+ compression: CompressionMethod | null;
+ /**
+ * The encoding to use
+ *
+ * @defaultValue `'json'`
+ */
+ encoding: Encoding;
+ /**
+ * How long to wait for a shard to connect before giving up
+ */
+ handshakeTimeout: number | null;
+ /**
+ * How long to wait for a shard's HELLO packet before giving up
+ */
+ helloTimeout: number | null;
+ /**
+ * Properties to send to the gateway when identifying
+ */
+ identifyProperties: GatewayIdentifyProperties;
+ /**
+ * Initial presence data to send to the gateway when identifying
+ */
+ initialPresence: GatewayPresenceUpdateData | null;
+ /**
+ * Value between 50 and 250, total number of members where the gateway will stop sending offline members in the guild member list
+ */
+ largeThreshold: number | null;
+ /**
+ * How long to wait for a shard's READY packet before giving up
+ */
+ readyTimeout: number | null;
+ /**
+ * Function used to retrieve session information (and attempt to resume) for a given shard
+ *
+ * @example
+ * ```ts
+ * const manager = new WebSocketManager({
+ * async retrieveSessionInfo(shardId): Awaitable<SessionInfo | null> {
+ * // Fetch this info from redis or similar
+ * return { sessionId: string, sequence: number };
+ * // Return null if no information is found
+ * },
+ * });
+ * ```
+ */
+ retrieveSessionInfo(shardId: number): Awaitable<SessionInfo | null>;
+ /**
+ * The total number of shards across all WebsocketManagers you intend to instantiate.
+ * Use `null` to use Discord's recommended shard count
+ */
+ shardCount: number | null;
+ /**
+ * The ids of the shards this WebSocketManager should manage.
+ * Use `null` to simply spawn 0 through `shardCount - 1`
+ *
+ * @example
+ * ```ts
+ * const manager = new WebSocketManager({
+ * shardIds: [1, 3, 7], // spawns shard 1, 3, and 7, nothing else
+ * });
+ * ```
+ * @example
+ * ```ts
+ * const manager = new WebSocketManager({
+ * shardIds: {
+ * start: 3,
+ * end: 6,
+ * }, // spawns shards 3, 4, 5, and 6
+ * });
+ * ```
+ */
+ shardIds: number[] | ShardRange | null;
+ /**
+ * Function used to store session information for a given shard
+ */
+ updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null): Awaitable<void>;
+ /**
+ * The gateway version to use
+ *
+ * @defaultValue `'10'`
+ */
+ version: string;
+}
+type WebSocketManagerOptions = OptionalWebSocketManagerOptions & RequiredWebSocketManagerOptions;
+type ManagerShardEventsMap = {
+ [K in keyof WebSocketShardEventsMap]: [
+ WebSocketShardEventsMap[K] extends [] ? {
+ shardId: number;
+ } : WebSocketShardEventsMap[K][0] & {
+ shardId: number;
+ }
+ ];
+};
+declare class WebSocketManager extends AsyncEventEmitter<ManagerShardEventsMap> {
+ /**
+ * The options being used by this manager
+ */
+ readonly options: WebSocketManagerOptions;
+ /**
+ * Internal cache for a GET /gateway/bot result
+ */
+ private gatewayInformation;
+ /**
+ * Internal cache for the shard ids
+ */
+ private shardIds;
+ /**
+ * Strategy used to manage shards
+ *
+ * @defaultValue `SimpleShardingStrategy`
+ */
+ private readonly strategy;
+ constructor(options: Partial<OptionalWebSocketManagerOptions> & RequiredWebSocketManagerOptions);
+ /**
+ * Fetches the gateway information from Discord - or returns it from cache if available
+ *
+ * @param force - Whether to ignore the cache and force a fresh fetch
+ */
+ fetchGatewayInformation(force?: boolean): Promise<APIGatewayBotInfo>;
+ /**
+ * Updates your total shard count on-the-fly, spawning shards as needed
+ *
+ * @param shardCount - The new shard count to use
+ */
+ updateShardCount(shardCount: number | null): Promise<this>;
+ /**
+ * Yields the total number of shards across for your bot, accounting for Discord recommendations
+ */
+ getShardCount(): Promise<number>;
+ /**
+ * Yields the ids of the shards this manager should manage
+ */
+ getShardIds(force?: boolean): Promise<number[]>;
+ connect(): Promise<void>;
+ destroy(options?: Omit<WebSocketShardDestroyOptions, 'recover'>): Awaitable<void>;
+ send(shardId: number, payload: GatewaySendPayload): Awaitable<void>;
+ fetchStatus(): Awaitable<_discordjs_collection.Collection<number, WebSocketShardStatus>>;
+}
+
+interface FetchingStrategyOptions extends Omit<WebSocketManagerOptions, 'buildIdentifyThrottler' | 'buildStrategy' | 'rest' | 'retrieveSessionInfo' | 'shardCount' | 'shardIds' | 'updateSessionInfo'> {
+ readonly gatewayInformation: APIGatewayBotInfo;
+ readonly shardCount: number;
+}
+/**
+ * Strategies responsible solely for making manager information accessible
+ */
+interface IContextFetchingStrategy {
+ readonly options: FetchingStrategyOptions;
+ retrieveSessionInfo(shardId: number): Awaitable<SessionInfo | null>;
+ updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null): Awaitable<void>;
+ /**
+ * Resolves once the given shard should be allowed to identify
+ * This should correctly handle the signal and reject with an abort error if the operation is aborted.
+ * Other errors will cause the shard to reconnect.
+ */
+ waitForIdentify(shardId: number, signal: AbortSignal): Promise<void>;
+}
+declare function managerToFetchingStrategyOptions(manager: WebSocketManager): Promise<FetchingStrategyOptions>;
+
+declare class SimpleContextFetchingStrategy implements IContextFetchingStrategy {
+ private readonly manager;
+ readonly options: FetchingStrategyOptions;
+ private static throttlerCache;
+ private static ensureThrottler;
+ constructor(manager: WebSocketManager, options: FetchingStrategyOptions);
+ retrieveSessionInfo(shardId: number): Promise<SessionInfo | null>;
+ updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null): _discordjs_util.Awaitable<void>;
+ waitForIdentify(shardId: number, signal: AbortSignal): Promise<void>;
+}
+
+declare class WorkerContextFetchingStrategy implements IContextFetchingStrategy {
+ readonly options: FetchingStrategyOptions;
+ private readonly sessionPromises;
+ private readonly waitForIdentifyPromises;
+ constructor(options: FetchingStrategyOptions);
+ retrieveSessionInfo(shardId: number): Promise<SessionInfo | null>;
+ updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null): void;
+ waitForIdentify(shardId: number, signal: AbortSignal): Promise<void>;
+}
+
+interface WorkerData extends FetchingStrategyOptions {
+ shardIds: number[];
+}
+declare enum WorkerSendPayloadOp {
+ Connect = 0,
+ Destroy = 1,
+ Send = 2,
+ SessionInfoResponse = 3,
+ ShardIdentifyResponse = 4,
+ FetchStatus = 5
+}
+type WorkerSendPayload = {
+ nonce: number;
+ ok: boolean;
+ op: WorkerSendPayloadOp.ShardIdentifyResponse;
+} | {
+ nonce: number;
+ op: WorkerSendPayloadOp.FetchStatus;
+ shardId: number;
+} | {
+ nonce: number;
+ op: WorkerSendPayloadOp.SessionInfoResponse;
+ session: SessionInfo | null;
+} | {
+ op: WorkerSendPayloadOp.Connect;
+ shardId: number;
+} | {
+ op: WorkerSendPayloadOp.Destroy;
+ options?: WebSocketShardDestroyOptions;
+ shardId: number;
+} | {
+ op: WorkerSendPayloadOp.Send;
+ payload: GatewaySendPayload;
+ shardId: number;
+};
+declare enum WorkerReceivePayloadOp {
+ Connected = 0,
+ Destroyed = 1,
+ Event = 2,
+ RetrieveSessionInfo = 3,
+ UpdateSessionInfo = 4,
+ WaitForIdentify = 5,
+ FetchStatusResponse = 6,
+ WorkerReady = 7,
+ CancelIdentify = 8
+}
+type WorkerReceivePayload = {
+ data: any;
+ event: WebSocketShardEvents;
+ op: WorkerReceivePayloadOp.Event;
+ shardId: number;
+} | {
+ nonce: number;
+ op: WorkerReceivePayloadOp.CancelIdentify;
+} | {
+ nonce: number;
+ op: WorkerReceivePayloadOp.FetchStatusResponse;
+ status: WebSocketShardStatus;
+} | {
+ nonce: number;
+ op: WorkerReceivePayloadOp.RetrieveSessionInfo;
+ shardId: number;
+} | {
+ nonce: number;
+ op: WorkerReceivePayloadOp.WaitForIdentify;
+ shardId: number;
+} | {
+ op: WorkerReceivePayloadOp.Connected;
+ shardId: number;
+} | {
+ op: WorkerReceivePayloadOp.Destroyed;
+ shardId: number;
+} | {
+ op: WorkerReceivePayloadOp.UpdateSessionInfo;
+ session: SessionInfo | null;
+ shardId: number;
+} | {
+ op: WorkerReceivePayloadOp.WorkerReady;
+};
+/**
+ * Options for a {@link WorkerShardingStrategy}
+ */
+interface WorkerShardingStrategyOptions {
+ /**
+ * Dictates how many shards should be spawned per worker thread.
+ */
+ shardsPerWorker: number | 'all';
+ /**
+ * Path to the worker file to use. The worker requires quite a bit of setup, it is recommended you leverage the {@link WorkerBootstrapper} class.
+ */
+ workerPath?: string;
+}
+/**
+ * Strategy used to spawn threads in worker_threads
+ */
+declare class WorkerShardingStrategy implements IShardingStrategy {
+ #private;
+ private readonly manager;
+ private readonly options;
+ private readonly connectPromises;
+ private readonly destroyPromises;
+ private readonly fetchStatusPromises;
+ private readonly waitForIdentifyControllers;
+ private throttler?;
+ constructor(manager: WebSocketManager, options: WorkerShardingStrategyOptions);
+ /**
+ * {@inheritDoc IShardingStrategy.spawn}
+ */
+ spawn(shardIds: number[]): Promise<void>;
+ /**
+ * {@inheritDoc IShardingStrategy.connect}
+ */
+ connect(): Promise<void>;
+ /**
+ * {@inheritDoc IShardingStrategy.destroy}
+ */
+ destroy(options?: Omit<WebSocketShardDestroyOptions, 'recover'>): Promise<void>;
+ /**
+ * {@inheritDoc IShardingStrategy.send}
+ */
+ send(shardId: number, data: GatewaySendPayload): void;
+ /**
+ * {@inheritDoc IShardingStrategy.fetchStatus}
+ */
+ fetchStatus(): Promise<Collection<number, WebSocketShardStatus>>;
+ private setupWorker;
+ private resolveWorkerPath;
+ private waitForWorkerReady;
+ private onMessage;
+ private ensureThrottler;
+}
+
+/**
+ * Options for bootstrapping the worker
+ */
+interface BootstrapOptions {
+ /**
+ * Shard events to just arbitrarily forward to the parent thread for the manager to emit
+ * Note: By default, this will include ALL events
+ * you most likely want to handle dispatch within the worker itself
+ */
+ forwardEvents?: WebSocketShardEvents[];
+ /**
+ * Function to call when a shard is created for additional setup
+ */
+ shardCallback?(shard: WebSocketShard): Awaitable<void>;
+}
+/**
+ * Utility class for bootstrapping a worker thread to be used for sharding
+ */
+declare class WorkerBootstrapper {
+ /**
+ * The data passed to the worker thread
+ */
+ protected readonly data: WorkerData;
+ /**
+ * The shards that are managed by this worker
+ */
+ protected readonly shards: Collection<number, WebSocketShard>;
+ constructor();
+ /**
+ * Helper method to initiate a shard's connection process
+ */
+ protected connect(shardId: number): Promise<void>;
+ /**
+ * Helper method to destroy a shard
+ */
+ protected destroy(shardId: number, options?: WebSocketShardDestroyOptions): Promise<void>;
+ /**
+ * Helper method to attach event listeners to the parentPort
+ */
+ protected setupThreadEvents(): void;
+ /**
+ * Bootstraps the worker thread with the provided options
+ */
+ bootstrap(options?: Readonly<BootstrapOptions>): Promise<void>;
+}
+
+/**
+ * The {@link https://github.com/discordjs/discord.js/blob/main/packages/ws/#readme | @discordjs/ws} version
+ * that you are currently using.
+ */
+declare const version: string;
+
+export { BootstrapOptions, CloseCodes, CompressionMethod, DefaultDeviceProperty, DefaultWebSocketManagerOptions, Encoding, FetchingStrategyOptions, IContextFetchingStrategy, IIdentifyThrottler, IShardingStrategy, IdentifyState, ImportantGatewayOpcodes, ManagerShardEventsMap, OptionalWebSocketManagerOptions, RequiredWebSocketManagerOptions, SendRateLimitState, SessionInfo, ShardRange, SimpleContextFetchingStrategy, SimpleIdentifyThrottler, SimpleShardingStrategy, WebSocketManager, WebSocketManagerOptions, WebSocketShard, WebSocketShardDestroyOptions, WebSocketShardDestroyRecovery, WebSocketShardEvents, WebSocketShardEventsMap, WebSocketShardStatus, WorkerBootstrapper, WorkerContextFetchingStrategy, WorkerData, WorkerReceivePayload, WorkerReceivePayloadOp, WorkerSendPayload, WorkerSendPayloadOp, WorkerShardingStrategy, WorkerShardingStrategyOptions, getInitialSendRateLimitState, managerToFetchingStrategyOptions, version };
diff --git a/node_modules/@discordjs/ws/dist/index.js b/node_modules/@discordjs/ws/dist/index.js
new file mode 100644
index 0000000..9931550
--- /dev/null
+++ b/node_modules/@discordjs/ws/dist/index.js
@@ -0,0 +1,1482 @@
+"use strict";
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ // If the importer is in node compatibility mode or this is not an ESM
+ // file that has been converted to a CommonJS file using a Babel-
+ // compatible transform (i.e. "__esModule" has not been set), then set
+ // "default" to the CommonJS "module.exports" for node compatibility.
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+ mod
+));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/index.ts
+var src_exports = {};
+__export(src_exports, {
+ CloseCodes: () => CloseCodes,
+ CompressionMethod: () => CompressionMethod,
+ DefaultDeviceProperty: () => DefaultDeviceProperty,
+ DefaultWebSocketManagerOptions: () => DefaultWebSocketManagerOptions,
+ Encoding: () => Encoding,
+ ImportantGatewayOpcodes: () => ImportantGatewayOpcodes,
+ SimpleContextFetchingStrategy: () => SimpleContextFetchingStrategy,
+ SimpleIdentifyThrottler: () => SimpleIdentifyThrottler,
+ SimpleShardingStrategy: () => SimpleShardingStrategy,
+ WebSocketManager: () => WebSocketManager,
+ WebSocketShard: () => WebSocketShard,
+ WebSocketShardDestroyRecovery: () => WebSocketShardDestroyRecovery,
+ WebSocketShardEvents: () => WebSocketShardEvents,
+ WebSocketShardStatus: () => WebSocketShardStatus,
+ WorkerBootstrapper: () => WorkerBootstrapper,
+ WorkerContextFetchingStrategy: () => WorkerContextFetchingStrategy,
+ WorkerReceivePayloadOp: () => WorkerReceivePayloadOp,
+ WorkerSendPayloadOp: () => WorkerSendPayloadOp,
+ WorkerShardingStrategy: () => WorkerShardingStrategy,
+ getInitialSendRateLimitState: () => getInitialSendRateLimitState,
+ managerToFetchingStrategyOptions: () => managerToFetchingStrategyOptions,
+ version: () => version
+});
+module.exports = __toCommonJS(src_exports);
+
+// src/strategies/context/IContextFetchingStrategy.ts
+async function managerToFetchingStrategyOptions(manager) {
+ const {
+ buildIdentifyThrottler,
+ buildStrategy,
+ retrieveSessionInfo,
+ updateSessionInfo,
+ shardCount,
+ shardIds,
+ rest,
+ ...managerOptions
+ } = manager.options;
+ return {
+ ...managerOptions,
+ gatewayInformation: await manager.fetchGatewayInformation(),
+ shardCount: await manager.getShardCount()
+ };
+}
+__name(managerToFetchingStrategyOptions, "managerToFetchingStrategyOptions");
+
+// src/strategies/context/SimpleContextFetchingStrategy.ts
+var SimpleContextFetchingStrategy = class _SimpleContextFetchingStrategy {
+ constructor(manager, options) {
+ this.manager = manager;
+ this.options = options;
+ }
+ static {
+ __name(this, "SimpleContextFetchingStrategy");
+ }
+ // This strategy assumes every shard is running under the same process - therefore we need a single
+ // IdentifyThrottler per manager.
+ static throttlerCache = /* @__PURE__ */ new WeakMap();
+ static async ensureThrottler(manager) {
+ const throttler = _SimpleContextFetchingStrategy.throttlerCache.get(manager);
+ if (throttler) {
+ return throttler;
+ }
+ const newThrottler = await manager.options.buildIdentifyThrottler(manager);
+ _SimpleContextFetchingStrategy.throttlerCache.set(manager, newThrottler);
+ return newThrottler;
+ }
+ async retrieveSessionInfo(shardId) {
+ return this.manager.options.retrieveSessionInfo(shardId);
+ }
+ updateSessionInfo(shardId, sessionInfo) {
+ return this.manager.options.updateSessionInfo(shardId, sessionInfo);
+ }
+ async waitForIdentify(shardId, signal) {
+ const throttler = await _SimpleContextFetchingStrategy.ensureThrottler(this.manager);
+ await throttler.waitForIdentify(shardId, signal);
+ }
+};
+
+// src/strategies/context/WorkerContextFetchingStrategy.ts
+var import_node_worker_threads2 = require("worker_threads");
+var import_collection2 = require("@discordjs/collection");
+
+// src/strategies/sharding/WorkerShardingStrategy.ts
+var import_node_events = require("events");
+var import_node_path = require("path");
+var import_node_worker_threads = require("worker_threads");
+var import_collection = require("@discordjs/collection");
+var WorkerSendPayloadOp = /* @__PURE__ */ ((WorkerSendPayloadOp2) => {
+ WorkerSendPayloadOp2[WorkerSendPayloadOp2["Connect"] = 0] = "Connect";
+ WorkerSendPayloadOp2[WorkerSendPayloadOp2["Destroy"] = 1] = "Destroy";
+ WorkerSendPayloadOp2[WorkerSendPayloadOp2["Send"] = 2] = "Send";
+ WorkerSendPayloadOp2[WorkerSendPayloadOp2["SessionInfoResponse"] = 3] = "SessionInfoResponse";
+ WorkerSendPayloadOp2[WorkerSendPayloadOp2["ShardIdentifyResponse"] = 4] = "ShardIdentifyResponse";
+ WorkerSendPayloadOp2[WorkerSendPayloadOp2["FetchStatus"] = 5] = "FetchStatus";
+ return WorkerSendPayloadOp2;
+})(WorkerSendPayloadOp || {});
+var WorkerReceivePayloadOp = /* @__PURE__ */ ((WorkerReceivePayloadOp2) => {
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["Connected"] = 0] = "Connected";
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["Destroyed"] = 1] = "Destroyed";
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["Event"] = 2] = "Event";
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["RetrieveSessionInfo"] = 3] = "RetrieveSessionInfo";
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["UpdateSessionInfo"] = 4] = "UpdateSessionInfo";
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["WaitForIdentify"] = 5] = "WaitForIdentify";
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["FetchStatusResponse"] = 6] = "FetchStatusResponse";
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["WorkerReady"] = 7] = "WorkerReady";
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["CancelIdentify"] = 8] = "CancelIdentify";
+ return WorkerReceivePayloadOp2;
+})(WorkerReceivePayloadOp || {});
+var WorkerShardingStrategy = class {
+ static {
+ __name(this, "WorkerShardingStrategy");
+ }
+ manager;
+ options;
+ #workers = [];
+ #workerByShardId = new import_collection.Collection();
+ connectPromises = new import_collection.Collection();
+ destroyPromises = new import_collection.Collection();
+ fetchStatusPromises = new import_collection.Collection();
+ waitForIdentifyControllers = new import_collection.Collection();
+ throttler;
+ constructor(manager, options) {
+ this.manager = manager;
+ this.options = options;
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.spawn}
+ */
+ async spawn(shardIds) {
+ const shardsPerWorker = this.options.shardsPerWorker === "all" ? shardIds.length : this.options.shardsPerWorker;
+ const strategyOptions = await managerToFetchingStrategyOptions(this.manager);
+ const loops = Math.ceil(shardIds.length / shardsPerWorker);
+ const promises = [];
+ for (let idx = 0; idx < loops; idx++) {
+ const slice = shardIds.slice(idx * shardsPerWorker, (idx + 1) * shardsPerWorker);
+ const workerData2 = {
+ ...strategyOptions,
+ shardIds: slice
+ };
+ promises.push(this.setupWorker(workerData2));
+ }
+ await Promise.all(promises);
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.connect}
+ */
+ async connect() {
+ const promises = [];
+ for (const [shardId, worker] of this.#workerByShardId.entries()) {
+ const payload = {
+ op: 0 /* Connect */,
+ shardId
+ };
+ const promise = new Promise((resolve2) => this.connectPromises.set(shardId, resolve2));
+ worker.postMessage(payload);
+ promises.push(promise);
+ }
+ await Promise.all(promises);
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.destroy}
+ */
+ async destroy(options = {}) {
+ const promises = [];
+ for (const [shardId, worker] of this.#workerByShardId.entries()) {
+ const payload = {
+ op: 1 /* Destroy */,
+ shardId,
+ options
+ };
+ promises.push(
+ // eslint-disable-next-line no-promise-executor-return, promise/prefer-await-to-then
+ new Promise((resolve2) => this.destroyPromises.set(shardId, resolve2)).then(async () => worker.terminate())
+ );
+ worker.postMessage(payload);
+ }
+ this.#workers = [];
+ this.#workerByShardId.clear();
+ await Promise.all(promises);
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.send}
+ */
+ send(shardId, data) {
+ const worker = this.#workerByShardId.get(shardId);
+ if (!worker) {
+ throw new Error(`No worker found for shard ${shardId}`);
+ }
+ const payload = {
+ op: 2 /* Send */,
+ shardId,
+ payload: data
+ };
+ worker.postMessage(payload);
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.fetchStatus}
+ */
+ async fetchStatus() {
+ const statuses = new import_collection.Collection();
+ for (const [shardId, worker] of this.#workerByShardId.entries()) {
+ const nonce = Math.random();
+ const payload = {
+ op: 5 /* FetchStatus */,
+ shardId,
+ nonce
+ };
+ const promise = new Promise((resolve2) => this.fetchStatusPromises.set(nonce, resolve2));
+ worker.postMessage(payload);
+ const status = await promise;
+ statuses.set(shardId, status);
+ }
+ return statuses;
+ }
+ async setupWorker(workerData2) {
+ const worker = new import_node_worker_threads.Worker(this.resolveWorkerPath(), { workerData: workerData2 });
+ await (0, import_node_events.once)(worker, "online");
+ await this.waitForWorkerReady(worker);
+ worker.on("error", (err) => {
+ throw err;
+ }).on("messageerror", (err) => {
+ throw err;
+ }).on("message", async (payload) => this.onMessage(worker, payload));
+ this.#workers.push(worker);
+ for (const shardId of workerData2.shardIds) {
+ this.#workerByShardId.set(shardId, worker);
+ }
+ }
+ resolveWorkerPath() {
+ const path = this.options.workerPath;
+ if (!path) {
+ return (0, import_node_path.join)(__dirname, "defaultWorker.js");
+ }
+ if ((0, import_node_path.isAbsolute)(path)) {
+ return path;
+ }
+ if (/^\.\.?[/\\]/.test(path)) {
+ return (0, import_node_path.resolve)(path);
+ }
+ try {
+ return require.resolve(path);
+ } catch {
+ return (0, import_node_path.resolve)(path);
+ }
+ }
+ async waitForWorkerReady(worker) {
+ return new Promise((resolve2) => {
+ const handler = /* @__PURE__ */ __name((payload) => {
+ if (payload.op === 7 /* WorkerReady */) {
+ resolve2();
+ worker.off("message", handler);
+ }
+ }, "handler");
+ worker.on("message", handler);
+ });
+ }
+ async onMessage(worker, payload) {
+ switch (payload.op) {
+ case 0 /* Connected */: {
+ this.connectPromises.get(payload.shardId)?.();
+ this.connectPromises.delete(payload.shardId);
+ break;
+ }
+ case 1 /* Destroyed */: {
+ this.destroyPromises.get(payload.shardId)?.();
+ this.destroyPromises.delete(payload.shardId);
+ break;
+ }
+ case 2 /* Event */: {
+ this.manager.emit(payload.event, { ...payload.data, shardId: payload.shardId });
+ break;
+ }
+ case 3 /* RetrieveSessionInfo */: {
+ const session = await this.manager.options.retrieveSessionInfo(payload.shardId);
+ const response = {
+ op: 3 /* SessionInfoResponse */,
+ nonce: payload.nonce,
+ session
+ };
+ worker.postMessage(response);
+ break;
+ }
+ case 4 /* UpdateSessionInfo */: {
+ await this.manager.options.updateSessionInfo(payload.shardId, payload.session);
+ break;
+ }
+ case 5 /* WaitForIdentify */: {
+ const throttler = await this.ensureThrottler();
+ try {
+ const controller = new AbortController();
+ this.waitForIdentifyControllers.set(payload.nonce, controller);
+ await throttler.waitForIdentify(payload.shardId, controller.signal);
+ } catch {
+ return;
+ }
+ const response = {
+ op: 4 /* ShardIdentifyResponse */,
+ nonce: payload.nonce,
+ ok: true
+ };
+ worker.postMessage(response);
+ break;
+ }
+ case 6 /* FetchStatusResponse */: {
+ this.fetchStatusPromises.get(payload.nonce)?.(payload.status);
+ this.fetchStatusPromises.delete(payload.nonce);
+ break;
+ }
+ case 7 /* WorkerReady */: {
+ break;
+ }
+ case 8 /* CancelIdentify */: {
+ this.waitForIdentifyControllers.get(payload.nonce)?.abort();
+ this.waitForIdentifyControllers.delete(payload.nonce);
+ const response = {
+ op: 4 /* ShardIdentifyResponse */,
+ nonce: payload.nonce,
+ ok: false
+ };
+ worker.postMessage(response);
+ break;
+ }
+ }
+ }
+ async ensureThrottler() {
+ this.throttler ??= await this.manager.options.buildIdentifyThrottler(this.manager);
+ return this.throttler;
+ }
+};
+
+// src/strategies/context/WorkerContextFetchingStrategy.ts
+var WorkerContextFetchingStrategy = class {
+ constructor(options) {
+ this.options = options;
+ if (import_node_worker_threads2.isMainThread) {
+ throw new Error("Cannot instantiate WorkerContextFetchingStrategy on the main thread");
+ }
+ import_node_worker_threads2.parentPort.on("message", (payload) => {
+ if (payload.op === 3 /* SessionInfoResponse */) {
+ this.sessionPromises.get(payload.nonce)?.(payload.session);
+ this.sessionPromises.delete(payload.nonce);
+ }
+ if (payload.op === 4 /* ShardIdentifyResponse */) {
+ const promise = this.waitForIdentifyPromises.get(payload.nonce);
+ if (payload.ok) {
+ promise?.resolve();
+ } else {
+ promise?.reject(promise.signal.reason);
+ }
+ this.waitForIdentifyPromises.delete(payload.nonce);
+ }
+ });
+ }
+ static {
+ __name(this, "WorkerContextFetchingStrategy");
+ }
+ sessionPromises = new import_collection2.Collection();
+ waitForIdentifyPromises = new import_collection2.Collection();
+ async retrieveSessionInfo(shardId) {
+ const nonce = Math.random();
+ const payload = {
+ op: 3 /* RetrieveSessionInfo */,
+ shardId,
+ nonce
+ };
+ const promise = new Promise((resolve2) => this.sessionPromises.set(nonce, resolve2));
+ import_node_worker_threads2.parentPort.postMessage(payload);
+ return promise;
+ }
+ updateSessionInfo(shardId, sessionInfo) {
+ const payload = {
+ op: 4 /* UpdateSessionInfo */,
+ shardId,
+ session: sessionInfo
+ };
+ import_node_worker_threads2.parentPort.postMessage(payload);
+ }
+ async waitForIdentify(shardId, signal) {
+ const nonce = Math.random();
+ const payload = {
+ op: 5 /* WaitForIdentify */,
+ nonce,
+ shardId
+ };
+ const promise = new Promise(
+ (resolve2, reject) => (
+ // eslint-disable-next-line no-promise-executor-return
+ this.waitForIdentifyPromises.set(nonce, { signal, resolve: resolve2, reject })
+ )
+ );
+ import_node_worker_threads2.parentPort.postMessage(payload);
+ const listener = /* @__PURE__ */ __name(() => {
+ const payload2 = {
+ op: 8 /* CancelIdentify */,
+ nonce
+ };
+ import_node_worker_threads2.parentPort.postMessage(payload2);
+ }, "listener");
+ signal.addEventListener("abort", listener);
+ try {
+ await promise;
+ } finally {
+ signal.removeEventListener("abort", listener);
+ }
+ }
+};
+
+// src/strategies/sharding/SimpleShardingStrategy.ts
+var import_collection6 = require("@discordjs/collection");
+
+// src/ws/WebSocketShard.ts
+var import_node_buffer = require("buffer");
+var import_node_events2 = require("events");
+var import_node_timers = require("timers");
+var import_promises2 = require("timers/promises");
+var import_node_url = require("url");
+var import_node_util = require("util");
+var import_node_zlib = require("zlib");
+var import_collection5 = require("@discordjs/collection");
+var import_util2 = require("@discordjs/util");
+var import_async_queue2 = require("@sapphire/async-queue");
+var import_async_event_emitter = require("@vladfrangu/async_event_emitter");
+var import_v102 = require("discord-api-types/v10");
+var import_ws = require("ws");
+
+// src/utils/constants.ts
+var import_node_process = __toESM(require("process"));
+var import_collection4 = require("@discordjs/collection");
+var import_util = require("@discordjs/util");
+var import_v10 = require("discord-api-types/v10");
+
+// src/throttling/SimpleIdentifyThrottler.ts
+var import_promises = require("timers/promises");
+var import_collection3 = require("@discordjs/collection");
+var import_async_queue = require("@sapphire/async-queue");
+var SimpleIdentifyThrottler = class {
+ constructor(maxConcurrency) {
+ this.maxConcurrency = maxConcurrency;
+ }
+ static {
+ __name(this, "SimpleIdentifyThrottler");
+ }
+ states = new import_collection3.Collection();
+ /**
+ * {@inheritDoc IIdentifyThrottler.waitForIdentify}
+ */
+ async waitForIdentify(shardId, signal) {
+ const key = shardId % this.maxConcurrency;
+ const state = this.states.ensure(key, () => {
+ return {
+ queue: new import_async_queue.AsyncQueue(),
+ resetsAt: Number.POSITIVE_INFINITY
+ };
+ });
+ await state.queue.wait({ signal });
+ try {
+ const diff = state.resetsAt - Date.now();
+ if (diff <= 5e3) {
+ const time = diff + Math.random() * 1500;
+ await (0, import_promises.setTimeout)(time);
+ }
+ state.resetsAt = Date.now() + 5e3;
+ } finally {
+ state.queue.shift();
+ }
+ }
+};
+
+// src/utils/constants.ts
+var Encoding = /* @__PURE__ */ ((Encoding2) => {
+ Encoding2["JSON"] = "json";
+ return Encoding2;
+})(Encoding || {});
+var CompressionMethod = /* @__PURE__ */ ((CompressionMethod2) => {
+ CompressionMethod2["ZlibStream"] = "zlib-stream";
+ return CompressionMethod2;
+})(CompressionMethod || {});
+var DefaultDeviceProperty = `@discordjs/ws 1.0.1`;
+var getDefaultSessionStore = (0, import_util.lazy)(() => new import_collection4.Collection());
+var DefaultWebSocketManagerOptions = {
+ async buildIdentifyThrottler(manager) {
+ const info = await manager.fetchGatewayInformation();
+ return new SimpleIdentifyThrottler(info.session_start_limit.max_concurrency);
+ },
+ buildStrategy: (manager) => new SimpleShardingStrategy(manager),
+ shardCount: null,
+ shardIds: null,
+ largeThreshold: null,
+ initialPresence: null,
+ identifyProperties: {
+ browser: DefaultDeviceProperty,
+ device: DefaultDeviceProperty,
+ os: import_node_process.default.platform
+ },
+ version: import_v10.APIVersion,
+ encoding: "json" /* JSON */,
+ compression: null,
+ retrieveSessionInfo(shardId) {
+ const store = getDefaultSessionStore();
+ return store.get(shardId) ?? null;
+ },
+ updateSessionInfo(shardId, info) {
+ const store = getDefaultSessionStore();
+ if (info) {
+ store.set(shardId, info);
+ } else {
+ store.delete(shardId);
+ }
+ },
+ handshakeTimeout: 3e4,
+ helloTimeout: 6e4,
+ readyTimeout: 15e3
+};
+var ImportantGatewayOpcodes = /* @__PURE__ */ new Set([
+ import_v10.GatewayOpcodes.Heartbeat,
+ import_v10.GatewayOpcodes.Identify,
+ import_v10.GatewayOpcodes.Resume
+]);
+function getInitialSendRateLimitState() {
+ return {
+ remaining: 120,
+ resetAt: Date.now() + 6e4
+ };
+}
+__name(getInitialSendRateLimitState, "getInitialSendRateLimitState");
+
+// src/ws/WebSocketShard.ts
+var getZlibSync = (0, import_util2.lazy)(async () => import("zlib-sync").then((mod) => mod.default).catch(() => null));
+var WebSocketShardEvents = /* @__PURE__ */ ((WebSocketShardEvents2) => {
+ WebSocketShardEvents2["Closed"] = "closed";
+ WebSocketShardEvents2["Debug"] = "debug";
+ WebSocketShardEvents2["Dispatch"] = "dispatch";
+ WebSocketShardEvents2["Error"] = "error";
+ WebSocketShardEvents2["HeartbeatComplete"] = "heartbeat";
+ WebSocketShardEvents2["Hello"] = "hello";
+ WebSocketShardEvents2["Ready"] = "ready";
+ WebSocketShardEvents2["Resumed"] = "resumed";
+ return WebSocketShardEvents2;
+})(WebSocketShardEvents || {});
+var WebSocketShardStatus = /* @__PURE__ */ ((WebSocketShardStatus2) => {
+ WebSocketShardStatus2[WebSocketShardStatus2["Idle"] = 0] = "Idle";
+ WebSocketShardStatus2[WebSocketShardStatus2["Connecting"] = 1] = "Connecting";
+ WebSocketShardStatus2[WebSocketShardStatus2["Resuming"] = 2] = "Resuming";
+ WebSocketShardStatus2[WebSocketShardStatus2["Ready"] = 3] = "Ready";
+ return WebSocketShardStatus2;
+})(WebSocketShardStatus || {});
+var WebSocketShardDestroyRecovery = /* @__PURE__ */ ((WebSocketShardDestroyRecovery2) => {
+ WebSocketShardDestroyRecovery2[WebSocketShardDestroyRecovery2["Reconnect"] = 0] = "Reconnect";
+ WebSocketShardDestroyRecovery2[WebSocketShardDestroyRecovery2["Resume"] = 1] = "Resume";
+ return WebSocketShardDestroyRecovery2;
+})(WebSocketShardDestroyRecovery || {});
+var CloseCodes = /* @__PURE__ */ ((CloseCodes2) => {
+ CloseCodes2[CloseCodes2["Normal"] = 1e3] = "Normal";
+ CloseCodes2[CloseCodes2["Resuming"] = 4200] = "Resuming";
+ return CloseCodes2;
+})(CloseCodes || {});
+var WebSocketConstructor = import_ws.WebSocket;
+var WebSocketShard = class extends import_async_event_emitter.AsyncEventEmitter {
+ static {
+ __name(this, "WebSocketShard");
+ }
+ connection = null;
+ useIdentifyCompress = false;
+ inflate = null;
+ textDecoder = new import_node_util.TextDecoder();
+ replayedEvents = 0;
+ isAck = true;
+ sendRateLimitState = getInitialSendRateLimitState();
+ initialHeartbeatTimeoutController = null;
+ heartbeatInterval = null;
+ lastHeartbeatAt = -1;
+ // Indicates whether the shard has already resolved its original connect() call
+ initialConnectResolved = false;
+ // Indicates if we failed to connect to the ws url (ECONNREFUSED/ECONNRESET)
+ failedToConnectDueToNetworkError = false;
+ sendQueue = new import_async_queue2.AsyncQueue();
+ timeoutAbortControllers = new import_collection5.Collection();
+ strategy;
+ id;
+ #status = 0 /* Idle */;
+ get status() {
+ return this.#status;
+ }
+ constructor(strategy, id) {
+ super();
+ this.strategy = strategy;
+ this.id = id;
+ }
+ async connect() {
+ const controller = new AbortController();
+ let promise;
+ if (!this.initialConnectResolved) {
+ promise = Promise.race([
+ (0, import_node_events2.once)(this, "ready" /* Ready */, { signal: controller.signal }),
+ (0, import_node_events2.once)(this, "resumed" /* Resumed */, { signal: controller.signal })
+ ]);
+ }
+ void this.internalConnect();
+ try {
+ await promise;
+ } catch ({ error }) {
+ throw error;
+ } finally {
+ controller.abort();
+ }
+ this.initialConnectResolved = true;
+ }
+ async internalConnect() {
+ if (this.#status !== 0 /* Idle */) {
+ throw new Error("Tried to connect a shard that wasn't idle");
+ }
+ const { version: version2, encoding, compression } = this.strategy.options;
+ const params = new import_node_url.URLSearchParams({ v: version2, encoding });
+ if (compression) {
+ const zlib = await getZlibSync();
+ if (zlib) {
+ params.append("compress", compression);
+ this.inflate = new zlib.Inflate({
+ chunkSize: 65535,
+ to: "string"
+ });
+ } else if (!this.useIdentifyCompress) {
+ this.useIdentifyCompress = true;
+ console.warn(
+ "WebSocketShard: Compression is enabled but zlib-sync is not installed, falling back to identify compress"
+ );
+ }
+ }
+ const session = await this.strategy.retrieveSessionInfo(this.id);
+ const url = `${session?.resumeURL ?? this.strategy.options.gatewayInformation.url}?${params.toString()}`;
+ this.debug([`Connecting to ${url}`]);
+ const connection = new WebSocketConstructor(url, {
+ handshakeTimeout: this.strategy.options.handshakeTimeout ?? void 0
+ });
+ connection.binaryType = "arraybuffer";
+ connection.onmessage = (event) => {
+ void this.onMessage(event.data, event.data instanceof ArrayBuffer);
+ };
+ connection.onerror = (event) => {
+ this.onError(event.error);
+ };
+ connection.onclose = (event) => {
+ void this.onClose(event.code);
+ };
+ this.connection = connection;
+ this.#status = 1 /* Connecting */;
+ this.sendRateLimitState = getInitialSendRateLimitState();
+ const { ok } = await this.waitForEvent("hello" /* Hello */, this.strategy.options.helloTimeout);
+ if (!ok) {
+ return;
+ }
+ if (session?.shardCount === this.strategy.options.shardCount) {
+ await this.resume(session);
+ } else {
+ await this.identify();
+ }
+ }
+ async destroy(options = {}) {
+ if (this.#status === 0 /* Idle */) {
+ this.debug(["Tried to destroy a shard that was idle"]);
+ return;
+ }
+ if (!options.code) {
+ options.code = options.recover === 1 /* Resume */ ? 4200 /* Resuming */ : 1e3 /* Normal */;
+ }
+ this.debug([
+ "Destroying shard",
+ `Reason: ${options.reason ?? "none"}`,
+ `Code: ${options.code}`,
+ `Recover: ${options.recover === void 0 ? "none" : WebSocketShardDestroyRecovery[options.recover]}`
+ ]);
+ this.isAck = true;
+ if (this.heartbeatInterval) {
+ (0, import_node_timers.clearInterval)(this.heartbeatInterval);
+ }
+ if (this.initialHeartbeatTimeoutController) {
+ this.initialHeartbeatTimeoutController.abort();
+ this.initialHeartbeatTimeoutController = null;
+ }
+ this.lastHeartbeatAt = -1;
+ for (const controller of this.timeoutAbortControllers.values()) {
+ controller.abort();
+ }
+ this.timeoutAbortControllers.clear();
+ this.failedToConnectDueToNetworkError = false;
+ if (options.recover !== 1 /* Resume */) {
+ await this.strategy.updateSessionInfo(this.id, null);
+ }
+ if (this.connection) {
+ this.connection.onmessage = null;
+ this.connection.onclose = null;
+ const shouldClose = this.connection.readyState === import_ws.WebSocket.OPEN;
+ this.debug([
+ "Connection status during destroy",
+ `Needs closing: ${shouldClose}`,
+ `Ready state: ${this.connection.readyState}`
+ ]);
+ if (shouldClose) {
+ let outerResolve;
+ const promise = new Promise((resolve2) => {
+ outerResolve = resolve2;
+ });
+ this.connection.onclose = outerResolve;
+ this.connection.close(options.code, options.reason);
+ await promise;
+ this.emit("closed" /* Closed */, { code: options.code });
+ }
+ this.connection.onerror = null;
+ } else {
+ this.debug(["Destroying a shard that has no connection; please open an issue on GitHub"]);
+ }
+ this.#status = 0 /* Idle */;
+ if (options.recover !== void 0) {
+ await (0, import_promises2.setTimeout)(500);
+ return this.internalConnect();
+ }
+ }
+ async waitForEvent(event, timeoutDuration) {
+ this.debug([`Waiting for event ${event} ${timeoutDuration ? `for ${timeoutDuration}ms` : "indefinitely"}`]);
+ const timeoutController = new AbortController();
+ const timeout = timeoutDuration ? (0, import_node_timers.setTimeout)(() => timeoutController.abort(), timeoutDuration).unref() : null;
+ this.timeoutAbortControllers.set(event, timeoutController);
+ const closeController = new AbortController();
+ try {
+ const closed = await Promise.race([
+ (0, import_node_events2.once)(this, event, { signal: timeoutController.signal }).then(() => false),
+ (0, import_node_events2.once)(this, "closed" /* Closed */, { signal: closeController.signal }).then(() => true)
+ ]);
+ return { ok: !closed };
+ } catch {
+ void this.destroy({
+ code: 1e3 /* Normal */,
+ reason: "Something timed out or went wrong while waiting for an event",
+ recover: 0 /* Reconnect */
+ });
+ return { ok: false };
+ } finally {
+ if (timeout) {
+ (0, import_node_timers.clearTimeout)(timeout);
+ }
+ this.timeoutAbortControllers.delete(event);
+ if (!closeController.signal.aborted) {
+ closeController.abort();
+ }
+ }
+ }
+ async send(payload) {
+ if (!this.connection) {
+ throw new Error("WebSocketShard wasn't connected");
+ }
+ if (this.#status !== 3 /* Ready */ && !ImportantGatewayOpcodes.has(payload.op)) {
+ this.debug(["Tried to send a non-crucial payload before the shard was ready, waiting"]);
+ try {
+ await (0, import_node_events2.once)(this, "ready" /* Ready */);
+ } catch {
+ return this.send(payload);
+ }
+ }
+ await this.sendQueue.wait();
+ if (--this.sendRateLimitState.remaining <= 0) {
+ const now = Date.now();
+ if (this.sendRateLimitState.resetAt > now) {
+ const sleepFor = this.sendRateLimitState.resetAt - now;
+ this.debug([`Was about to hit the send rate limit, sleeping for ${sleepFor}ms`]);
+ const controller = new AbortController();
+ const interrupted = await Promise.race([
+ (0, import_promises2.setTimeout)(sleepFor).then(() => false),
+ (0, import_node_events2.once)(this, "closed" /* Closed */, { signal: controller.signal }).then(() => true)
+ ]);
+ if (interrupted) {
+ this.debug(["Connection closed while waiting for the send rate limit to reset, re-queueing payload"]);
+ this.sendQueue.shift();
+ return this.send(payload);
+ }
+ controller.abort();
+ }
+ this.sendRateLimitState = getInitialSendRateLimitState();
+ }
+ this.sendQueue.shift();
+ this.connection.send(JSON.stringify(payload));
+ }
+ async identify() {
+ this.debug(["Waiting for identify throttle"]);
+ const controller = new AbortController();
+ const closeHandler = /* @__PURE__ */ __name(() => {
+ controller.abort();
+ }, "closeHandler");
+ this.on("closed" /* Closed */, closeHandler);
+ try {
+ await this.strategy.waitForIdentify(this.id, controller.signal);
+ } catch {
+ if (controller.signal.aborted) {
+ this.debug(["Was waiting for an identify, but the shard closed in the meantime"]);
+ return;
+ }
+ this.debug([
+ "IContextFetchingStrategy#waitForIdentify threw an unknown error.",
+ "If you're using a custom strategy, this is probably nothing to worry about.",
+ "If you're not, please open an issue on GitHub."
+ ]);
+ await this.destroy({
+ reason: "Identify throttling logic failed",
+ recover: 1 /* Resume */
+ });
+ } finally {
+ this.off("closed" /* Closed */, closeHandler);
+ }
+ this.debug([
+ "Identifying",
+ `shard id: ${this.id.toString()}`,
+ `shard count: ${this.strategy.options.shardCount}`,
+ `intents: ${this.strategy.options.intents}`,
+ `compression: ${this.inflate ? "zlib-stream" : this.useIdentifyCompress ? "identify" : "none"}`
+ ]);
+ const d = {
+ token: this.strategy.options.token,
+ properties: this.strategy.options.identifyProperties,
+ intents: this.strategy.options.intents,
+ compress: this.useIdentifyCompress,
+ shard: [this.id, this.strategy.options.shardCount]
+ };
+ if (this.strategy.options.largeThreshold) {
+ d.large_threshold = this.strategy.options.largeThreshold;
+ }
+ if (this.strategy.options.initialPresence) {
+ d.presence = this.strategy.options.initialPresence;
+ }
+ await this.send({
+ op: import_v102.GatewayOpcodes.Identify,
+ d
+ });
+ await this.waitForEvent("ready" /* Ready */, this.strategy.options.readyTimeout);
+ }
+ async resume(session) {
+ this.debug([
+ "Resuming session",
+ `resume url: ${session.resumeURL}`,
+ `sequence: ${session.sequence}`,
+ `shard id: ${this.id.toString()}`
+ ]);
+ this.#status = 2 /* Resuming */;
+ this.replayedEvents = 0;
+ return this.send({
+ op: import_v102.GatewayOpcodes.Resume,
+ d: {
+ token: this.strategy.options.token,
+ seq: session.sequence,
+ session_id: session.sessionId
+ }
+ });
+ }
+ async heartbeat(requested = false) {
+ if (!this.isAck && !requested) {
+ return this.destroy({ reason: "Zombie connection", recover: 1 /* Resume */ });
+ }
+ const session = await this.strategy.retrieveSessionInfo(this.id);
+ await this.send({
+ op: import_v102.GatewayOpcodes.Heartbeat,
+ d: session?.sequence ?? null
+ });
+ this.lastHeartbeatAt = Date.now();
+ this.isAck = false;
+ }
+ async unpackMessage(data, isBinary) {
+ if (!isBinary) {
+ try {
+ return JSON.parse(data);
+ } catch {
+ return null;
+ }
+ }
+ const decompressable = new Uint8Array(data);
+ if (this.useIdentifyCompress) {
+ return new Promise((resolve2, reject) => {
+ (0, import_node_zlib.inflate)(decompressable, { chunkSize: 65535 }, (err, result) => {
+ if (err) {
+ reject(err);
+ return;
+ }
+ resolve2(JSON.parse(this.textDecoder.decode(result)));
+ });
+ });
+ }
+ if (this.inflate) {
+ const l = decompressable.length;
+ const flush = l >= 4 && decompressable[l - 4] === 0 && decompressable[l - 3] === 0 && decompressable[l - 2] === 255 && decompressable[l - 1] === 255;
+ const zlib = await getZlibSync();
+ this.inflate.push(import_node_buffer.Buffer.from(decompressable), flush ? zlib.Z_SYNC_FLUSH : zlib.Z_NO_FLUSH);
+ if (this.inflate.err) {
+ this.emit("error" /* Error */, {
+ error: new Error(`${this.inflate.err}${this.inflate.msg ? `: ${this.inflate.msg}` : ""}`)
+ });
+ }
+ if (!flush) {
+ return null;
+ }
+ const { result } = this.inflate;
+ if (!result) {
+ return null;
+ }
+ return JSON.parse(typeof result === "string" ? result : this.textDecoder.decode(result));
+ }
+ this.debug([
+ "Received a message we were unable to decompress",
+ `isBinary: ${isBinary.toString()}`,
+ `useIdentifyCompress: ${this.useIdentifyCompress.toString()}`,
+ `inflate: ${Boolean(this.inflate).toString()}`
+ ]);
+ return null;
+ }
+ async onMessage(data, isBinary) {
+ const payload = await this.unpackMessage(data, isBinary);
+ if (!payload) {
+ return;
+ }
+ switch (payload.op) {
+ case import_v102.GatewayOpcodes.Dispatch: {
+ if (this.#status === 2 /* Resuming */) {
+ this.replayedEvents++;
+ }
+ switch (payload.t) {
+ case import_v102.GatewayDispatchEvents.Ready: {
+ this.#status = 3 /* Ready */;
+ const session2 = {
+ sequence: payload.s,
+ sessionId: payload.d.session_id,
+ shardId: this.id,
+ shardCount: this.strategy.options.shardCount,
+ resumeURL: payload.d.resume_gateway_url
+ };
+ await this.strategy.updateSessionInfo(this.id, session2);
+ this.emit("ready" /* Ready */, { data: payload.d });
+ break;
+ }
+ case import_v102.GatewayDispatchEvents.Resumed: {
+ this.#status = 3 /* Ready */;
+ this.debug([`Resumed and replayed ${this.replayedEvents} events`]);
+ this.emit("resumed" /* Resumed */);
+ break;
+ }
+ default: {
+ break;
+ }
+ }
+ const session = await this.strategy.retrieveSessionInfo(this.id);
+ if (session) {
+ if (payload.s > session.sequence) {
+ await this.strategy.updateSessionInfo(this.id, { ...session, sequence: payload.s });
+ }
+ } else {
+ this.debug([
+ `Received a ${payload.t} event but no session is available. Session information cannot be re-constructed in this state without a full reconnect`
+ ]);
+ }
+ this.emit("dispatch" /* Dispatch */, { data: payload });
+ break;
+ }
+ case import_v102.GatewayOpcodes.Heartbeat: {
+ await this.heartbeat(true);
+ break;
+ }
+ case import_v102.GatewayOpcodes.Reconnect: {
+ await this.destroy({
+ reason: "Told to reconnect by Discord",
+ recover: 1 /* Resume */
+ });
+ break;
+ }
+ case import_v102.GatewayOpcodes.InvalidSession: {
+ this.debug([`Invalid session; will attempt to resume: ${payload.d.toString()}`]);
+ const session = await this.strategy.retrieveSessionInfo(this.id);
+ if (payload.d && session) {
+ await this.resume(session);
+ } else {
+ await this.destroy({
+ reason: "Invalid session",
+ recover: 0 /* Reconnect */
+ });
+ }
+ break;
+ }
+ case import_v102.GatewayOpcodes.Hello: {
+ this.emit("hello" /* Hello */);
+ const jitter = Math.random();
+ const firstWait = Math.floor(payload.d.heartbeat_interval * jitter);
+ this.debug([`Preparing first heartbeat of the connection with a jitter of ${jitter}; waiting ${firstWait}ms`]);
+ try {
+ const controller = new AbortController();
+ this.initialHeartbeatTimeoutController = controller;
+ await (0, import_promises2.setTimeout)(firstWait, void 0, { signal: controller.signal });
+ } catch {
+ this.debug(["Cancelled initial heartbeat due to #destroy being called"]);
+ return;
+ } finally {
+ this.initialHeartbeatTimeoutController = null;
+ }
+ await this.heartbeat();
+ this.debug([`First heartbeat sent, starting to beat every ${payload.d.heartbeat_interval}ms`]);
+ this.heartbeatInterval = (0, import_node_timers.setInterval)(() => void this.heartbeat(), payload.d.heartbeat_interval);
+ break;
+ }
+ case import_v102.GatewayOpcodes.HeartbeatAck: {
+ this.isAck = true;
+ const ackAt = Date.now();
+ this.emit("heartbeat" /* HeartbeatComplete */, {
+ ackAt,
+ heartbeatAt: this.lastHeartbeatAt,
+ latency: ackAt - this.lastHeartbeatAt
+ });
+ break;
+ }
+ }
+ }
+ onError(error) {
+ if ("code" in error && ["ECONNRESET", "ECONNREFUSED"].includes(error.code)) {
+ this.debug(["Failed to connect to the gateway URL specified due to a network error"]);
+ this.failedToConnectDueToNetworkError = true;
+ return;
+ }
+ this.emit("error" /* Error */, { error });
+ }
+ async onClose(code) {
+ this.emit("closed" /* Closed */, { code });
+ switch (code) {
+ case 1e3 /* Normal */: {
+ return this.destroy({
+ code,
+ reason: "Got disconnected by Discord",
+ recover: 0 /* Reconnect */
+ });
+ }
+ case 4200 /* Resuming */: {
+ break;
+ }
+ case import_v102.GatewayCloseCodes.UnknownError: {
+ this.debug([`An unknown error occurred: ${code}`]);
+ return this.destroy({ code, recover: 1 /* Resume */ });
+ }
+ case import_v102.GatewayCloseCodes.UnknownOpcode: {
+ this.debug(["An invalid opcode was sent to Discord."]);
+ return this.destroy({ code, recover: 1 /* Resume */ });
+ }
+ case import_v102.GatewayCloseCodes.DecodeError: {
+ this.debug(["An invalid payload was sent to Discord."]);
+ return this.destroy({ code, recover: 1 /* Resume */ });
+ }
+ case import_v102.GatewayCloseCodes.NotAuthenticated: {
+ this.debug(["A request was somehow sent before the identify/resume payload."]);
+ return this.destroy({ code, recover: 0 /* Reconnect */ });
+ }
+ case import_v102.GatewayCloseCodes.AuthenticationFailed: {
+ this.emit("error" /* Error */, {
+ error: new Error("Authentication failed")
+ });
+ return this.destroy({ code });
+ }
+ case import_v102.GatewayCloseCodes.AlreadyAuthenticated: {
+ this.debug(["More than one auth payload was sent."]);
+ return this.destroy({ code, recover: 0 /* Reconnect */ });
+ }
+ case import_v102.GatewayCloseCodes.InvalidSeq: {
+ this.debug(["An invalid sequence was sent."]);
+ return this.destroy({ code, recover: 0 /* Reconnect */ });
+ }
+ case import_v102.GatewayCloseCodes.RateLimited: {
+ this.debug(["The WebSocket rate limit has been hit, this should never happen"]);
+ return this.destroy({ code, recover: 0 /* Reconnect */ });
+ }
+ case import_v102.GatewayCloseCodes.SessionTimedOut: {
+ this.debug(["Session timed out."]);
+ return this.destroy({ code, recover: 1 /* Resume */ });
+ }
+ case import_v102.GatewayCloseCodes.InvalidShard: {
+ this.emit("error" /* Error */, {
+ error: new Error("Invalid shard")
+ });
+ return this.destroy({ code });
+ }
+ case import_v102.GatewayCloseCodes.ShardingRequired: {
+ this.emit("error" /* Error */, {
+ error: new Error("Sharding is required")
+ });
+ return this.destroy({ code });
+ }
+ case import_v102.GatewayCloseCodes.InvalidAPIVersion: {
+ this.emit("error" /* Error */, {
+ error: new Error("Used an invalid API version")
+ });
+ return this.destroy({ code });
+ }
+ case import_v102.GatewayCloseCodes.InvalidIntents: {
+ this.emit("error" /* Error */, {
+ error: new Error("Used invalid intents")
+ });
+ return this.destroy({ code });
+ }
+ case import_v102.GatewayCloseCodes.DisallowedIntents: {
+ this.emit("error" /* Error */, {
+ error: new Error("Used disallowed intents")
+ });
+ return this.destroy({ code });
+ }
+ default: {
+ this.debug([
+ `The gateway closed with an unexpected code ${code}, attempting to ${this.failedToConnectDueToNetworkError ? "reconnect" : "resume"}.`
+ ]);
+ return this.destroy({
+ code,
+ recover: this.failedToConnectDueToNetworkError ? 0 /* Reconnect */ : 1 /* Resume */
+ });
+ }
+ }
+ }
+ debug(messages) {
+ const message = `${messages[0]}${messages.length > 1 ? `
+${messages.slice(1).map((m) => ` ${m}`).join("\n")}` : ""}`;
+ this.emit("debug" /* Debug */, { message });
+ }
+};
+
+// src/strategies/sharding/SimpleShardingStrategy.ts
+var SimpleShardingStrategy = class {
+ static {
+ __name(this, "SimpleShardingStrategy");
+ }
+ manager;
+ shards = new import_collection6.Collection();
+ constructor(manager) {
+ this.manager = manager;
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.spawn}
+ */
+ async spawn(shardIds) {
+ const strategyOptions = await managerToFetchingStrategyOptions(this.manager);
+ for (const shardId of shardIds) {
+ const strategy = new SimpleContextFetchingStrategy(this.manager, strategyOptions);
+ const shard = new WebSocketShard(strategy, shardId);
+ for (const event of Object.values(WebSocketShardEvents)) {
+ shard.on(event, (payload) => this.manager.emit(event, { ...payload, shardId }));
+ }
+ this.shards.set(shardId, shard);
+ }
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.connect}
+ */
+ async connect() {
+ const promises = [];
+ for (const shard of this.shards.values()) {
+ promises.push(shard.connect());
+ }
+ await Promise.all(promises);
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.destroy}
+ */
+ async destroy(options) {
+ const promises = [];
+ for (const shard of this.shards.values()) {
+ promises.push(shard.destroy(options));
+ }
+ await Promise.all(promises);
+ this.shards.clear();
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.send}
+ */
+ async send(shardId, payload) {
+ const shard = this.shards.get(shardId);
+ if (!shard) {
+ throw new RangeError(`Shard ${shardId} not found`);
+ }
+ return shard.send(payload);
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.fetchStatus}
+ */
+ async fetchStatus() {
+ return this.shards.mapValues((shard) => shard.status);
+ }
+};
+
+// src/utils/WorkerBootstrapper.ts
+var import_node_worker_threads3 = require("worker_threads");
+var import_collection7 = require("@discordjs/collection");
+var WorkerBootstrapper = class {
+ static {
+ __name(this, "WorkerBootstrapper");
+ }
+ /**
+ * The data passed to the worker thread
+ */
+ data = import_node_worker_threads3.workerData;
+ /**
+ * The shards that are managed by this worker
+ */
+ shards = new import_collection7.Collection();
+ constructor() {
+ if (import_node_worker_threads3.isMainThread) {
+ throw new Error("Expected WorkerBootstrap to not be used within the main thread");
+ }
+ }
+ /**
+ * Helper method to initiate a shard's connection process
+ */
+ async connect(shardId) {
+ const shard = this.shards.get(shardId);
+ if (!shard) {
+ throw new RangeError(`Shard ${shardId} does not exist`);
+ }
+ await shard.connect();
+ }
+ /**
+ * Helper method to destroy a shard
+ */
+ async destroy(shardId, options) {
+ const shard = this.shards.get(shardId);
+ if (!shard) {
+ throw new RangeError(`Shard ${shardId} does not exist`);
+ }
+ await shard.destroy(options);
+ }
+ /**
+ * Helper method to attach event listeners to the parentPort
+ */
+ setupThreadEvents() {
+ import_node_worker_threads3.parentPort.on("messageerror", (err) => {
+ throw err;
+ }).on("message", async (payload) => {
+ switch (payload.op) {
+ case 0 /* Connect */: {
+ await this.connect(payload.shardId);
+ const response = {
+ op: 0 /* Connected */,
+ shardId: payload.shardId
+ };
+ import_node_worker_threads3.parentPort.postMessage(response);
+ break;
+ }
+ case 1 /* Destroy */: {
+ await this.destroy(payload.shardId, payload.options);
+ const response = {
+ op: 1 /* Destroyed */,
+ shardId: payload.shardId
+ };
+ import_node_worker_threads3.parentPort.postMessage(response);
+ break;
+ }
+ case 2 /* Send */: {
+ const shard = this.shards.get(payload.shardId);
+ if (!shard) {
+ throw new RangeError(`Shard ${payload.shardId} does not exist`);
+ }
+ await shard.send(payload.payload);
+ break;
+ }
+ case 3 /* SessionInfoResponse */: {
+ break;
+ }
+ case 4 /* ShardIdentifyResponse */: {
+ break;
+ }
+ case 5 /* FetchStatus */: {
+ const shard = this.shards.get(payload.shardId);
+ if (!shard) {
+ throw new Error(`Shard ${payload.shardId} does not exist`);
+ }
+ const response = {
+ op: 6 /* FetchStatusResponse */,
+ status: shard.status,
+ nonce: payload.nonce
+ };
+ import_node_worker_threads3.parentPort.postMessage(response);
+ break;
+ }
+ }
+ });
+ }
+ /**
+ * Bootstraps the worker thread with the provided options
+ */
+ async bootstrap(options = {}) {
+ for (const shardId of this.data.shardIds) {
+ const shard = new WebSocketShard(new WorkerContextFetchingStrategy(this.data), shardId);
+ for (const event of options.forwardEvents ?? Object.values(WebSocketShardEvents)) {
+ shard.on(event, (data) => {
+ const payload = {
+ op: 2 /* Event */,
+ event,
+ data,
+ shardId
+ };
+ import_node_worker_threads3.parentPort.postMessage(payload);
+ });
+ }
+ await options.shardCallback?.(shard);
+ this.shards.set(shardId, shard);
+ }
+ this.setupThreadEvents();
+ const message = {
+ op: 7 /* WorkerReady */
+ };
+ import_node_worker_threads3.parentPort.postMessage(message);
+ }
+};
+
+// src/ws/WebSocketManager.ts
+var import_util3 = require("@discordjs/util");
+var import_async_event_emitter2 = require("@vladfrangu/async_event_emitter");
+var import_v103 = require("discord-api-types/v10");
+var WebSocketManager = class extends import_async_event_emitter2.AsyncEventEmitter {
+ static {
+ __name(this, "WebSocketManager");
+ }
+ /**
+ * The options being used by this manager
+ */
+ options;
+ /**
+ * Internal cache for a GET /gateway/bot result
+ */
+ gatewayInformation = null;
+ /**
+ * Internal cache for the shard ids
+ */
+ shardIds = null;
+ /**
+ * Strategy used to manage shards
+ *
+ * @defaultValue `SimpleShardingStrategy`
+ */
+ strategy;
+ constructor(options) {
+ super();
+ this.options = { ...DefaultWebSocketManagerOptions, ...options };
+ this.strategy = this.options.buildStrategy(this);
+ }
+ /**
+ * Fetches the gateway information from Discord - or returns it from cache if available
+ *
+ * @param force - Whether to ignore the cache and force a fresh fetch
+ */
+ async fetchGatewayInformation(force = false) {
+ if (this.gatewayInformation) {
+ if (this.gatewayInformation.expiresAt <= Date.now()) {
+ this.gatewayInformation = null;
+ } else if (!force) {
+ return this.gatewayInformation.data;
+ }
+ }
+ const data = await this.options.rest.get(import_v103.Routes.gatewayBot());
+ this.gatewayInformation = { data, expiresAt: Date.now() + (data.session_start_limit.reset_after || 5e3) };
+ return this.gatewayInformation.data;
+ }
+ /**
+ * Updates your total shard count on-the-fly, spawning shards as needed
+ *
+ * @param shardCount - The new shard count to use
+ */
+ async updateShardCount(shardCount) {
+ await this.strategy.destroy({ reason: "User is adjusting their shards" });
+ this.options.shardCount = shardCount;
+ const shardIds = await this.getShardIds(true);
+ await this.strategy.spawn(shardIds);
+ return this;
+ }
+ /**
+ * Yields the total number of shards across for your bot, accounting for Discord recommendations
+ */
+ async getShardCount() {
+ if (this.options.shardCount) {
+ return this.options.shardCount;
+ }
+ const shardIds = await this.getShardIds();
+ return Math.max(...shardIds) + 1;
+ }
+ /**
+ * Yields the ids of the shards this manager should manage
+ */
+ async getShardIds(force = false) {
+ if (this.shardIds && !force) {
+ return this.shardIds;
+ }
+ let shardIds;
+ if (this.options.shardIds) {
+ if (Array.isArray(this.options.shardIds)) {
+ shardIds = this.options.shardIds;
+ } else {
+ const { start, end } = this.options.shardIds;
+ shardIds = [...(0, import_util3.range)({ start, end: end + 1 })];
+ }
+ } else {
+ const data = await this.fetchGatewayInformation();
+ shardIds = [...(0, import_util3.range)(this.options.shardCount ?? data.shards)];
+ }
+ this.shardIds = shardIds;
+ return shardIds;
+ }
+ async connect() {
+ const shardCount = await this.getShardCount();
+ const data = await this.fetchGatewayInformation();
+ if (data.session_start_limit.remaining < shardCount) {
+ throw new Error(
+ `Not enough sessions remaining to spawn ${shardCount} shards; only ${data.session_start_limit.remaining} remaining; resets at ${new Date(Date.now() + data.session_start_limit.reset_after).toISOString()}`
+ );
+ }
+ await this.updateShardCount(shardCount);
+ await this.strategy.connect();
+ }
+ destroy(options) {
+ return this.strategy.destroy(options);
+ }
+ send(shardId, payload) {
+ return this.strategy.send(shardId, payload);
+ }
+ fetchStatus() {
+ return this.strategy.fetchStatus();
+ }
+};
+
+// src/index.ts
+var version = "1.0.1";
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ CloseCodes,
+ CompressionMethod,
+ DefaultDeviceProperty,
+ DefaultWebSocketManagerOptions,
+ Encoding,
+ ImportantGatewayOpcodes,
+ SimpleContextFetchingStrategy,
+ SimpleIdentifyThrottler,
+ SimpleShardingStrategy,
+ WebSocketManager,
+ WebSocketShard,
+ WebSocketShardDestroyRecovery,
+ WebSocketShardEvents,
+ WebSocketShardStatus,
+ WorkerBootstrapper,
+ WorkerContextFetchingStrategy,
+ WorkerReceivePayloadOp,
+ WorkerSendPayloadOp,
+ WorkerShardingStrategy,
+ getInitialSendRateLimitState,
+ managerToFetchingStrategyOptions,
+ version
+});
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/@discordjs/ws/dist/index.js.map b/node_modules/@discordjs/ws/dist/index.js.map
new file mode 100644
index 0000000..b89bb50
--- /dev/null
+++ b/node_modules/@discordjs/ws/dist/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/index.ts","../src/strategies/context/IContextFetchingStrategy.ts","../src/strategies/context/SimpleContextFetchingStrategy.ts","../src/strategies/context/WorkerContextFetchingStrategy.ts","../src/strategies/sharding/WorkerShardingStrategy.ts","../src/strategies/sharding/SimpleShardingStrategy.ts","../src/ws/WebSocketShard.ts","../src/utils/constants.ts","../src/throttling/SimpleIdentifyThrottler.ts","../src/utils/WorkerBootstrapper.ts","../src/ws/WebSocketManager.ts"],"sourcesContent":["export * from './strategies/context/IContextFetchingStrategy.js';\nexport * from './strategies/context/SimpleContextFetchingStrategy.js';\nexport * from './strategies/context/WorkerContextFetchingStrategy.js';\n\nexport * from './strategies/sharding/IShardingStrategy.js';\nexport * from './strategies/sharding/SimpleShardingStrategy.js';\nexport * from './strategies/sharding/WorkerShardingStrategy.js';\n\nexport * from './throttling/IIdentifyThrottler.js';\nexport * from './throttling/SimpleIdentifyThrottler.js';\n\nexport * from './utils/constants.js';\nexport * from './utils/WorkerBootstrapper.js';\n\nexport * from './ws/WebSocketManager.js';\nexport * from './ws/WebSocketShard.js';\n\n/**\n * The {@link https://github.com/discordjs/discord.js/blob/main/packages/ws/#readme | @discordjs/ws} version\n * that you are currently using.\n */\n// This needs to explicitly be `string` so it is not typed as a \"const string\" that gets injected by esbuild\nexport const version = '1.0.1' as string;\n","import type { Awaitable } from '@discordjs/util';\nimport type { APIGatewayBotInfo } from 'discord-api-types/v10';\nimport type { SessionInfo, WebSocketManager, WebSocketManagerOptions } from '../../ws/WebSocketManager.js';\n\nexport interface FetchingStrategyOptions\n\textends Omit<\n\t\tWebSocketManagerOptions,\n\t\t| 'buildIdentifyThrottler'\n\t\t| 'buildStrategy'\n\t\t| 'rest'\n\t\t| 'retrieveSessionInfo'\n\t\t| 'shardCount'\n\t\t| 'shardIds'\n\t\t| 'updateSessionInfo'\n\t> {\n\treadonly gatewayInformation: APIGatewayBotInfo;\n\treadonly shardCount: number;\n}\n\n/**\n * Strategies responsible solely for making manager information accessible\n */\nexport interface IContextFetchingStrategy {\n\treadonly options: FetchingStrategyOptions;\n\tretrieveSessionInfo(shardId: number): Awaitable<SessionInfo | null>;\n\tupdateSessionInfo(shardId: number, sessionInfo: SessionInfo | null): Awaitable<void>;\n\t/**\n\t * Resolves once the given shard should be allowed to identify\n\t * This should correctly handle the signal and reject with an abort error if the operation is aborted.\n\t * Other errors will cause the shard to reconnect.\n\t */\n\twaitForIdentify(shardId: number, signal: AbortSignal): Promise<void>;\n}\n\nexport async function managerToFetchingStrategyOptions(manager: WebSocketManager): Promise<FetchingStrategyOptions> {\n\t/* eslint-disable @typescript-eslint/unbound-method */\n\tconst {\n\t\tbuildIdentifyThrottler,\n\t\tbuildStrategy,\n\t\tretrieveSessionInfo,\n\t\tupdateSessionInfo,\n\t\tshardCount,\n\t\tshardIds,\n\t\trest,\n\t\t...managerOptions\n\t} = manager.options;\n\t/* eslint-enable @typescript-eslint/unbound-method */\n\n\treturn {\n\t\t...managerOptions,\n\t\tgatewayInformation: await manager.fetchGatewayInformation(),\n\t\tshardCount: await manager.getShardCount(),\n\t};\n}\n","import type { IIdentifyThrottler } from '../../throttling/IIdentifyThrottler.js';\nimport type { SessionInfo, WebSocketManager } from '../../ws/WebSocketManager.js';\nimport type { FetchingStrategyOptions, IContextFetchingStrategy } from './IContextFetchingStrategy.js';\n\nexport class SimpleContextFetchingStrategy implements IContextFetchingStrategy {\n\t// This strategy assumes every shard is running under the same process - therefore we need a single\n\t// IdentifyThrottler per manager.\n\tprivate static throttlerCache = new WeakMap<WebSocketManager, IIdentifyThrottler>();\n\n\tprivate static async ensureThrottler(manager: WebSocketManager): Promise<IIdentifyThrottler> {\n\t\tconst throttler = SimpleContextFetchingStrategy.throttlerCache.get(manager);\n\t\tif (throttler) {\n\t\t\treturn throttler;\n\t\t}\n\n\t\tconst newThrottler = await manager.options.buildIdentifyThrottler(manager);\n\t\tSimpleContextFetchingStrategy.throttlerCache.set(manager, newThrottler);\n\n\t\treturn newThrottler;\n\t}\n\n\tpublic constructor(private readonly manager: WebSocketManager, public readonly options: FetchingStrategyOptions) {}\n\n\tpublic async retrieveSessionInfo(shardId: number): Promise<SessionInfo | null> {\n\t\treturn this.manager.options.retrieveSessionInfo(shardId);\n\t}\n\n\tpublic updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null) {\n\t\treturn this.manager.options.updateSessionInfo(shardId, sessionInfo);\n\t}\n\n\tpublic async waitForIdentify(shardId: number, signal: AbortSignal): Promise<void> {\n\t\tconst throttler = await SimpleContextFetchingStrategy.ensureThrottler(this.manager);\n\t\tawait throttler.waitForIdentify(shardId, signal);\n\t}\n}\n","import { isMainThread, parentPort } from 'node:worker_threads';\nimport { Collection } from '@discordjs/collection';\nimport type { SessionInfo } from '../../ws/WebSocketManager.js';\nimport {\n\tWorkerReceivePayloadOp,\n\tWorkerSendPayloadOp,\n\ttype WorkerReceivePayload,\n\ttype WorkerSendPayload,\n} from '../sharding/WorkerShardingStrategy.js';\nimport type { FetchingStrategyOptions, IContextFetchingStrategy } from './IContextFetchingStrategy.js';\n\nexport class WorkerContextFetchingStrategy implements IContextFetchingStrategy {\n\tprivate readonly sessionPromises = new Collection<number, (session: SessionInfo | null) => void>();\n\n\tprivate readonly waitForIdentifyPromises = new Collection<\n\t\tnumber,\n\t\t{ reject(error: unknown): void; resolve(): void; signal: AbortSignal }\n\t>();\n\n\tpublic constructor(public readonly options: FetchingStrategyOptions) {\n\t\tif (isMainThread) {\n\t\t\tthrow new Error('Cannot instantiate WorkerContextFetchingStrategy on the main thread');\n\t\t}\n\n\t\tparentPort!.on('message', (payload: WorkerSendPayload) => {\n\t\t\tif (payload.op === WorkerSendPayloadOp.SessionInfoResponse) {\n\t\t\t\tthis.sessionPromises.get(payload.nonce)?.(payload.session);\n\t\t\t\tthis.sessionPromises.delete(payload.nonce);\n\t\t\t}\n\n\t\t\tif (payload.op === WorkerSendPayloadOp.ShardIdentifyResponse) {\n\t\t\t\tconst promise = this.waitForIdentifyPromises.get(payload.nonce);\n\t\t\t\tif (payload.ok) {\n\t\t\t\t\tpromise?.resolve();\n\t\t\t\t} else {\n\t\t\t\t\t// We need to make sure we reject with an abort error\n\t\t\t\t\tpromise?.reject(promise.signal.reason);\n\t\t\t\t}\n\n\t\t\t\tthis.waitForIdentifyPromises.delete(payload.nonce);\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic async retrieveSessionInfo(shardId: number): Promise<SessionInfo | null> {\n\t\tconst nonce = Math.random();\n\t\tconst payload: WorkerReceivePayload = {\n\t\t\top: WorkerReceivePayloadOp.RetrieveSessionInfo,\n\t\t\tshardId,\n\t\t\tnonce,\n\t\t};\n\t\t// eslint-disable-next-line no-promise-executor-return\n\t\tconst promise = new Promise<SessionInfo | null>((resolve) => this.sessionPromises.set(nonce, resolve));\n\t\tparentPort!.postMessage(payload);\n\t\treturn promise;\n\t}\n\n\tpublic updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null) {\n\t\tconst payload: WorkerReceivePayload = {\n\t\t\top: WorkerReceivePayloadOp.UpdateSessionInfo,\n\t\t\tshardId,\n\t\t\tsession: sessionInfo,\n\t\t};\n\t\tparentPort!.postMessage(payload);\n\t}\n\n\tpublic async waitForIdentify(shardId: number, signal: AbortSignal): Promise<void> {\n\t\tconst nonce = Math.random();\n\n\t\tconst payload: WorkerReceivePayload = {\n\t\t\top: WorkerReceivePayloadOp.WaitForIdentify,\n\t\t\tnonce,\n\t\t\tshardId,\n\t\t};\n\t\tconst promise = new Promise<void>((resolve, reject) =>\n\t\t\t// eslint-disable-next-line no-promise-executor-return\n\t\t\tthis.waitForIdentifyPromises.set(nonce, { signal, resolve, reject }),\n\t\t);\n\n\t\tparentPort!.postMessage(payload);\n\n\t\tconst listener = () => {\n\t\t\tconst payload: WorkerReceivePayload = {\n\t\t\t\top: WorkerReceivePayloadOp.CancelIdentify,\n\t\t\t\tnonce,\n\t\t\t};\n\n\t\t\tparentPort!.postMessage(payload);\n\t\t};\n\n\t\tsignal.addEventListener('abort', listener);\n\n\t\ttry {\n\t\t\tawait promise;\n\t\t} finally {\n\t\t\tsignal.removeEventListener('abort', listener);\n\t\t}\n\t}\n}\n","import { once } from 'node:events';\nimport { join, isAbsolute, resolve } from 'node:path';\nimport { Worker } from 'node:worker_threads';\nimport { Collection } from '@discordjs/collection';\nimport type { GatewaySendPayload } from 'discord-api-types/v10';\nimport type { IIdentifyThrottler } from '../../throttling/IIdentifyThrottler.js';\nimport type { SessionInfo, WebSocketManager } from '../../ws/WebSocketManager.js';\nimport type {\n\tWebSocketShardDestroyOptions,\n\tWebSocketShardEvents,\n\tWebSocketShardStatus,\n} from '../../ws/WebSocketShard.js';\nimport { managerToFetchingStrategyOptions, type FetchingStrategyOptions } from '../context/IContextFetchingStrategy.js';\nimport type { IShardingStrategy } from './IShardingStrategy.js';\n\nexport interface WorkerData extends FetchingStrategyOptions {\n\tshardIds: number[];\n}\n\nexport enum WorkerSendPayloadOp {\n\tConnect,\n\tDestroy,\n\tSend,\n\tSessionInfoResponse,\n\tShardIdentifyResponse,\n\tFetchStatus,\n}\n\nexport type WorkerSendPayload =\n\t| { nonce: number; ok: boolean; op: WorkerSendPayloadOp.ShardIdentifyResponse }\n\t| { nonce: number; op: WorkerSendPayloadOp.FetchStatus; shardId: number }\n\t| { nonce: number; op: WorkerSendPayloadOp.SessionInfoResponse; session: SessionInfo | null }\n\t| { op: WorkerSendPayloadOp.Connect; shardId: number }\n\t| { op: WorkerSendPayloadOp.Destroy; options?: WebSocketShardDestroyOptions; shardId: number }\n\t| { op: WorkerSendPayloadOp.Send; payload: GatewaySendPayload; shardId: number };\n\nexport enum WorkerReceivePayloadOp {\n\tConnected,\n\tDestroyed,\n\tEvent,\n\tRetrieveSessionInfo,\n\tUpdateSessionInfo,\n\tWaitForIdentify,\n\tFetchStatusResponse,\n\tWorkerReady,\n\tCancelIdentify,\n}\n\nexport type WorkerReceivePayload =\n\t// Can't seem to get a type-safe union based off of the event, so I'm sadly leaving data as any for now\n\t| { data: any; event: WebSocketShardEvents; op: WorkerReceivePayloadOp.Event; shardId: number }\n\t| { nonce: number; op: WorkerReceivePayloadOp.CancelIdentify }\n\t| { nonce: number; op: WorkerReceivePayloadOp.FetchStatusResponse; status: WebSocketShardStatus }\n\t| { nonce: number; op: WorkerReceivePayloadOp.RetrieveSessionInfo; shardId: number }\n\t| { nonce: number; op: WorkerReceivePayloadOp.WaitForIdentify; shardId: number }\n\t| { op: WorkerReceivePayloadOp.Connected; shardId: number }\n\t| { op: WorkerReceivePayloadOp.Destroyed; shardId: number }\n\t| { op: WorkerReceivePayloadOp.UpdateSessionInfo; session: SessionInfo | null; shardId: number }\n\t| { op: WorkerReceivePayloadOp.WorkerReady };\n\n/**\n * Options for a {@link WorkerShardingStrategy}\n */\nexport interface WorkerShardingStrategyOptions {\n\t/**\n\t * Dictates how many shards should be spawned per worker thread.\n\t */\n\tshardsPerWorker: number | 'all';\n\t/**\n\t * Path to the worker file to use. The worker requires quite a bit of setup, it is recommended you leverage the {@link WorkerBootstrapper} class.\n\t */\n\tworkerPath?: string;\n}\n\n/**\n * Strategy used to spawn threads in worker_threads\n */\nexport class WorkerShardingStrategy implements IShardingStrategy {\n\tprivate readonly manager: WebSocketManager;\n\n\tprivate readonly options: WorkerShardingStrategyOptions;\n\n\t#workers: Worker[] = [];\n\n\treadonly #workerByShardId = new Collection<number, Worker>();\n\n\tprivate readonly connectPromises = new Collection<number, () => void>();\n\n\tprivate readonly destroyPromises = new Collection<number, () => void>();\n\n\tprivate readonly fetchStatusPromises = new Collection<number, (status: WebSocketShardStatus) => void>();\n\n\tprivate readonly waitForIdentifyControllers = new Collection<number, AbortController>();\n\n\tprivate throttler?: IIdentifyThrottler;\n\n\tpublic constructor(manager: WebSocketManager, options: WorkerShardingStrategyOptions) {\n\t\tthis.manager = manager;\n\t\tthis.options = options;\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.spawn}\n\t */\n\tpublic async spawn(shardIds: number[]) {\n\t\tconst shardsPerWorker = this.options.shardsPerWorker === 'all' ? shardIds.length : this.options.shardsPerWorker;\n\t\tconst strategyOptions = await managerToFetchingStrategyOptions(this.manager);\n\n\t\tconst loops = Math.ceil(shardIds.length / shardsPerWorker);\n\t\tconst promises: Promise<void>[] = [];\n\n\t\tfor (let idx = 0; idx < loops; idx++) {\n\t\t\tconst slice = shardIds.slice(idx * shardsPerWorker, (idx + 1) * shardsPerWorker);\n\t\t\tconst workerData: WorkerData = {\n\t\t\t\t...strategyOptions,\n\t\t\t\tshardIds: slice,\n\t\t\t};\n\n\t\t\tpromises.push(this.setupWorker(workerData));\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.connect}\n\t */\n\tpublic async connect() {\n\t\tconst promises = [];\n\n\t\tfor (const [shardId, worker] of this.#workerByShardId.entries()) {\n\t\t\tconst payload: WorkerSendPayload = {\n\t\t\t\top: WorkerSendPayloadOp.Connect,\n\t\t\t\tshardId,\n\t\t\t};\n\n\t\t\t// eslint-disable-next-line no-promise-executor-return\n\t\t\tconst promise = new Promise<void>((resolve) => this.connectPromises.set(shardId, resolve));\n\t\t\tworker.postMessage(payload);\n\t\t\tpromises.push(promise);\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.destroy}\n\t */\n\tpublic async destroy(options: Omit<WebSocketShardDestroyOptions, 'recover'> = {}) {\n\t\tconst promises = [];\n\n\t\tfor (const [shardId, worker] of this.#workerByShardId.entries()) {\n\t\t\tconst payload: WorkerSendPayload = {\n\t\t\t\top: WorkerSendPayloadOp.Destroy,\n\t\t\t\tshardId,\n\t\t\t\toptions,\n\t\t\t};\n\n\t\t\tpromises.push(\n\t\t\t\t// eslint-disable-next-line no-promise-executor-return, promise/prefer-await-to-then\n\t\t\t\tnew Promise<void>((resolve) => this.destroyPromises.set(shardId, resolve)).then(async () => worker.terminate()),\n\t\t\t);\n\t\t\tworker.postMessage(payload);\n\t\t}\n\n\t\tthis.#workers = [];\n\t\tthis.#workerByShardId.clear();\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.send}\n\t */\n\tpublic send(shardId: number, data: GatewaySendPayload) {\n\t\tconst worker = this.#workerByShardId.get(shardId);\n\t\tif (!worker) {\n\t\t\tthrow new Error(`No worker found for shard ${shardId}`);\n\t\t}\n\n\t\tconst payload: WorkerSendPayload = {\n\t\t\top: WorkerSendPayloadOp.Send,\n\t\t\tshardId,\n\t\t\tpayload: data,\n\t\t};\n\t\tworker.postMessage(payload);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.fetchStatus}\n\t */\n\tpublic async fetchStatus() {\n\t\tconst statuses = new Collection<number, WebSocketShardStatus>();\n\n\t\tfor (const [shardId, worker] of this.#workerByShardId.entries()) {\n\t\t\tconst nonce = Math.random();\n\t\t\tconst payload: WorkerSendPayload = {\n\t\t\t\top: WorkerSendPayloadOp.FetchStatus,\n\t\t\t\tshardId,\n\t\t\t\tnonce,\n\t\t\t};\n\n\t\t\t// eslint-disable-next-line no-promise-executor-return\n\t\t\tconst promise = new Promise<WebSocketShardStatus>((resolve) => this.fetchStatusPromises.set(nonce, resolve));\n\t\t\tworker.postMessage(payload);\n\n\t\t\tconst status = await promise;\n\t\t\tstatuses.set(shardId, status);\n\t\t}\n\n\t\treturn statuses;\n\t}\n\n\tprivate async setupWorker(workerData: WorkerData) {\n\t\tconst worker = new Worker(this.resolveWorkerPath(), { workerData });\n\n\t\tawait once(worker, 'online');\n\t\t// We do this in case the user has any potentially long running code in their worker\n\t\tawait this.waitForWorkerReady(worker);\n\n\t\tworker\n\t\t\t.on('error', (err) => {\n\t\t\t\tthrow err;\n\t\t\t})\n\t\t\t.on('messageerror', (err) => {\n\t\t\t\tthrow err;\n\t\t\t})\n\t\t\t.on('message', async (payload: WorkerReceivePayload) => this.onMessage(worker, payload));\n\n\t\tthis.#workers.push(worker);\n\t\tfor (const shardId of workerData.shardIds) {\n\t\t\tthis.#workerByShardId.set(shardId, worker);\n\t\t}\n\t}\n\n\tprivate resolveWorkerPath(): string {\n\t\tconst path = this.options.workerPath;\n\n\t\tif (!path) {\n\t\t\treturn join(__dirname, 'defaultWorker.js');\n\t\t}\n\n\t\tif (isAbsolute(path)) {\n\t\t\treturn path;\n\t\t}\n\n\t\tif (/^\\.\\.?[/\\\\]/.test(path)) {\n\t\t\treturn resolve(path);\n\t\t}\n\n\t\ttry {\n\t\t\treturn require.resolve(path);\n\t\t} catch {\n\t\t\treturn resolve(path);\n\t\t}\n\t}\n\n\tprivate async waitForWorkerReady(worker: Worker): Promise<void> {\n\t\treturn new Promise((resolve) => {\n\t\t\tconst handler = (payload: WorkerReceivePayload) => {\n\t\t\t\tif (payload.op === WorkerReceivePayloadOp.WorkerReady) {\n\t\t\t\t\tresolve();\n\t\t\t\t\tworker.off('message', handler);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tworker.on('message', handler);\n\t\t});\n\t}\n\n\tprivate async onMessage(worker: Worker, payload: WorkerReceivePayload) {\n\t\tswitch (payload.op) {\n\t\t\tcase WorkerReceivePayloadOp.Connected: {\n\t\t\t\tthis.connectPromises.get(payload.shardId)?.();\n\t\t\t\tthis.connectPromises.delete(payload.shardId);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.Destroyed: {\n\t\t\t\tthis.destroyPromises.get(payload.shardId)?.();\n\t\t\t\tthis.destroyPromises.delete(payload.shardId);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.Event: {\n\t\t\t\tthis.manager.emit(payload.event, { ...payload.data, shardId: payload.shardId });\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.RetrieveSessionInfo: {\n\t\t\t\tconst session = await this.manager.options.retrieveSessionInfo(payload.shardId);\n\t\t\t\tconst response: WorkerSendPayload = {\n\t\t\t\t\top: WorkerSendPayloadOp.SessionInfoResponse,\n\t\t\t\t\tnonce: payload.nonce,\n\t\t\t\t\tsession,\n\t\t\t\t};\n\t\t\t\tworker.postMessage(response);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.UpdateSessionInfo: {\n\t\t\t\tawait this.manager.options.updateSessionInfo(payload.shardId, payload.session);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.WaitForIdentify: {\n\t\t\t\tconst throttler = await this.ensureThrottler();\n\n\t\t\t\t// If this rejects it means we aborted, in which case we reply elsewhere.\n\t\t\t\ttry {\n\t\t\t\t\tconst controller = new AbortController();\n\t\t\t\t\tthis.waitForIdentifyControllers.set(payload.nonce, controller);\n\t\t\t\t\tawait throttler.waitForIdentify(payload.shardId, controller.signal);\n\t\t\t\t} catch {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst response: WorkerSendPayload = {\n\t\t\t\t\top: WorkerSendPayloadOp.ShardIdentifyResponse,\n\t\t\t\t\tnonce: payload.nonce,\n\t\t\t\t\tok: true,\n\t\t\t\t};\n\t\t\t\tworker.postMessage(response);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.FetchStatusResponse: {\n\t\t\t\tthis.fetchStatusPromises.get(payload.nonce)?.(payload.status);\n\t\t\t\tthis.fetchStatusPromises.delete(payload.nonce);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.WorkerReady: {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.CancelIdentify: {\n\t\t\t\tthis.waitForIdentifyControllers.get(payload.nonce)?.abort();\n\t\t\t\tthis.waitForIdentifyControllers.delete(payload.nonce);\n\n\t\t\t\tconst response: WorkerSendPayload = {\n\t\t\t\t\top: WorkerSendPayloadOp.ShardIdentifyResponse,\n\t\t\t\t\tnonce: payload.nonce,\n\t\t\t\t\tok: false,\n\t\t\t\t};\n\t\t\t\tworker.postMessage(response);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate async ensureThrottler(): Promise<IIdentifyThrottler> {\n\t\tthis.throttler ??= await this.manager.options.buildIdentifyThrottler(this.manager);\n\t\treturn this.throttler;\n\t}\n}\n","import { Collection } from '@discordjs/collection';\nimport type { GatewaySendPayload } from 'discord-api-types/v10';\nimport type { WebSocketManager } from '../../ws/WebSocketManager.js';\nimport { WebSocketShard, WebSocketShardEvents, type WebSocketShardDestroyOptions } from '../../ws/WebSocketShard.js';\nimport { managerToFetchingStrategyOptions } from '../context/IContextFetchingStrategy.js';\nimport { SimpleContextFetchingStrategy } from '../context/SimpleContextFetchingStrategy.js';\nimport type { IShardingStrategy } from './IShardingStrategy.js';\n\n/**\n * Simple strategy that just spawns shards in the current process\n */\nexport class SimpleShardingStrategy implements IShardingStrategy {\n\tprivate readonly manager: WebSocketManager;\n\n\tprivate readonly shards = new Collection<number, WebSocketShard>();\n\n\tpublic constructor(manager: WebSocketManager) {\n\t\tthis.manager = manager;\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.spawn}\n\t */\n\tpublic async spawn(shardIds: number[]) {\n\t\tconst strategyOptions = await managerToFetchingStrategyOptions(this.manager);\n\n\t\tfor (const shardId of shardIds) {\n\t\t\tconst strategy = new SimpleContextFetchingStrategy(this.manager, strategyOptions);\n\t\t\tconst shard = new WebSocketShard(strategy, shardId);\n\t\t\tfor (const event of Object.values(WebSocketShardEvents)) {\n\t\t\t\t// @ts-expect-error: Intentional\n\t\t\t\tshard.on(event, (payload) => this.manager.emit(event, { ...payload, shardId }));\n\t\t\t}\n\n\t\t\tthis.shards.set(shardId, shard);\n\t\t}\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.connect}\n\t */\n\tpublic async connect() {\n\t\tconst promises = [];\n\n\t\tfor (const shard of this.shards.values()) {\n\t\t\tpromises.push(shard.connect());\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.destroy}\n\t */\n\tpublic async destroy(options?: Omit<WebSocketShardDestroyOptions, 'recover'>) {\n\t\tconst promises = [];\n\n\t\tfor (const shard of this.shards.values()) {\n\t\t\tpromises.push(shard.destroy(options));\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t\tthis.shards.clear();\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.send}\n\t */\n\tpublic async send(shardId: number, payload: GatewaySendPayload) {\n\t\tconst shard = this.shards.get(shardId);\n\t\tif (!shard) {\n\t\t\tthrow new RangeError(`Shard ${shardId} not found`);\n\t\t}\n\n\t\treturn shard.send(payload);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.fetchStatus}\n\t */\n\tpublic async fetchStatus() {\n\t\treturn this.shards.mapValues((shard) => shard.status);\n\t}\n}\n","/* eslint-disable id-length */\nimport { Buffer } from 'node:buffer';\nimport { once } from 'node:events';\nimport { clearInterval, clearTimeout, setInterval, setTimeout } from 'node:timers';\nimport { setTimeout as sleep } from 'node:timers/promises';\nimport { URLSearchParams } from 'node:url';\nimport { TextDecoder } from 'node:util';\nimport { inflate } from 'node:zlib';\nimport { Collection } from '@discordjs/collection';\nimport { lazy } from '@discordjs/util';\nimport { AsyncQueue } from '@sapphire/async-queue';\nimport { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';\nimport {\n\tGatewayCloseCodes,\n\tGatewayDispatchEvents,\n\tGatewayOpcodes,\n\ttype GatewayDispatchPayload,\n\ttype GatewayIdentifyData,\n\ttype GatewayReadyDispatchData,\n\ttype GatewayReceivePayload,\n\ttype GatewaySendPayload,\n} from 'discord-api-types/v10';\nimport { WebSocket, type Data } from 'ws';\nimport type { Inflate } from 'zlib-sync';\nimport type { IContextFetchingStrategy } from '../strategies/context/IContextFetchingStrategy.js';\nimport { ImportantGatewayOpcodes, getInitialSendRateLimitState } from '../utils/constants.js';\nimport type { SessionInfo } from './WebSocketManager.js';\n\n// eslint-disable-next-line promise/prefer-await-to-then\nconst getZlibSync = lazy(async () => import('zlib-sync').then((mod) => mod.default).catch(() => null));\n\nexport enum WebSocketShardEvents {\n\tClosed = 'closed',\n\tDebug = 'debug',\n\tDispatch = 'dispatch',\n\tError = 'error',\n\tHeartbeatComplete = 'heartbeat',\n\tHello = 'hello',\n\tReady = 'ready',\n\tResumed = 'resumed',\n}\n\nexport enum WebSocketShardStatus {\n\tIdle,\n\tConnecting,\n\tResuming,\n\tReady,\n}\n\nexport enum WebSocketShardDestroyRecovery {\n\tReconnect,\n\tResume,\n}\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type WebSocketShardEventsMap = {\n\t[WebSocketShardEvents.Closed]: [{ code: number }];\n\t[WebSocketShardEvents.Debug]: [payload: { message: string }];\n\t[WebSocketShardEvents.Dispatch]: [payload: { data: GatewayDispatchPayload }];\n\t[WebSocketShardEvents.Error]: [payload: { error: Error }];\n\t[WebSocketShardEvents.Hello]: [];\n\t[WebSocketShardEvents.Ready]: [payload: { data: GatewayReadyDispatchData }];\n\t[WebSocketShardEvents.Resumed]: [];\n\t[WebSocketShardEvents.HeartbeatComplete]: [payload: { ackAt: number; heartbeatAt: number; latency: number }];\n};\n\nexport interface WebSocketShardDestroyOptions {\n\tcode?: number;\n\treason?: string;\n\trecover?: WebSocketShardDestroyRecovery;\n}\n\nexport enum CloseCodes {\n\tNormal = 1_000,\n\tResuming = 4_200,\n}\n\nexport interface SendRateLimitState {\n\tremaining: number;\n\tresetAt: number;\n}\n\n// TODO(vladfrangu): enable this once https://github.com/oven-sh/bun/issues/3392 is solved\n// const WebSocketConstructor: typeof WebSocket = shouldUseGlobalFetchAndWebSocket()\n// \t? (globalThis as any).WebSocket\n// \t: WebSocket;\nconst WebSocketConstructor: typeof WebSocket = WebSocket;\n\nexport class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {\n\tprivate connection: WebSocket | null = null;\n\n\tprivate useIdentifyCompress = false;\n\n\tprivate inflate: Inflate | null = null;\n\n\tprivate readonly textDecoder = new TextDecoder();\n\n\tprivate replayedEvents = 0;\n\n\tprivate isAck = true;\n\n\tprivate sendRateLimitState: SendRateLimitState = getInitialSendRateLimitState();\n\n\tprivate initialHeartbeatTimeoutController: AbortController | null = null;\n\n\tprivate heartbeatInterval: NodeJS.Timer | null = null;\n\n\tprivate lastHeartbeatAt = -1;\n\n\t// Indicates whether the shard has already resolved its original connect() call\n\tprivate initialConnectResolved = false;\n\n\t// Indicates if we failed to connect to the ws url (ECONNREFUSED/ECONNRESET)\n\tprivate failedToConnectDueToNetworkError = false;\n\n\tprivate readonly sendQueue = new AsyncQueue();\n\n\tprivate readonly timeoutAbortControllers = new Collection<WebSocketShardEvents, AbortController>();\n\n\tprivate readonly strategy: IContextFetchingStrategy;\n\n\tpublic readonly id: number;\n\n\t#status: WebSocketShardStatus = WebSocketShardStatus.Idle;\n\n\tpublic get status(): WebSocketShardStatus {\n\t\treturn this.#status;\n\t}\n\n\tpublic constructor(strategy: IContextFetchingStrategy, id: number) {\n\t\tsuper();\n\t\tthis.strategy = strategy;\n\t\tthis.id = id;\n\t}\n\n\tpublic async connect() {\n\t\tconst controller = new AbortController();\n\t\tlet promise;\n\n\t\tif (!this.initialConnectResolved) {\n\t\t\t// Sleep for the remaining time, but if the connection closes in the meantime, we shouldn't wait the remainder to avoid blocking the new conn\n\t\t\tpromise = Promise.race([\n\t\t\t\tonce(this, WebSocketShardEvents.Ready, { signal: controller.signal }),\n\t\t\t\tonce(this, WebSocketShardEvents.Resumed, { signal: controller.signal }),\n\t\t\t]);\n\t\t}\n\n\t\tvoid this.internalConnect();\n\n\t\ttry {\n\t\t\tawait promise;\n\t\t} catch ({ error }: any) {\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\t// cleanup hanging listeners\n\t\t\tcontroller.abort();\n\t\t}\n\n\t\tthis.initialConnectResolved = true;\n\t}\n\n\tprivate async internalConnect() {\n\t\tif (this.#status !== WebSocketShardStatus.Idle) {\n\t\t\tthrow new Error(\"Tried to connect a shard that wasn't idle\");\n\t\t}\n\n\t\tconst { version, encoding, compression } = this.strategy.options;\n\t\tconst params = new URLSearchParams({ v: version, encoding });\n\t\tif (compression) {\n\t\t\tconst zlib = await getZlibSync();\n\t\t\tif (zlib) {\n\t\t\t\tparams.append('compress', compression);\n\t\t\t\tthis.inflate = new zlib.Inflate({\n\t\t\t\t\tchunkSize: 65_535,\n\t\t\t\t\tto: 'string',\n\t\t\t\t});\n\t\t\t} else if (!this.useIdentifyCompress) {\n\t\t\t\tthis.useIdentifyCompress = true;\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'WebSocketShard: Compression is enabled but zlib-sync is not installed, falling back to identify compress',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst session = await this.strategy.retrieveSessionInfo(this.id);\n\n\t\tconst url = `${session?.resumeURL ?? this.strategy.options.gatewayInformation.url}?${params.toString()}`;\n\n\t\tthis.debug([`Connecting to ${url}`]);\n\n\t\tconst connection = new WebSocketConstructor(url, {\n\t\t\thandshakeTimeout: this.strategy.options.handshakeTimeout ?? undefined,\n\t\t});\n\n\t\tconnection.binaryType = 'arraybuffer';\n\n\t\tconnection.onmessage = (event) => {\n\t\t\tvoid this.onMessage(event.data, event.data instanceof ArrayBuffer);\n\t\t};\n\n\t\tconnection.onerror = (event) => {\n\t\t\tthis.onError(event.error);\n\t\t};\n\n\t\tconnection.onclose = (event) => {\n\t\t\tvoid this.onClose(event.code);\n\t\t};\n\n\t\tthis.connection = connection;\n\n\t\tthis.#status = WebSocketShardStatus.Connecting;\n\n\t\tthis.sendRateLimitState = getInitialSendRateLimitState();\n\n\t\tconst { ok } = await this.waitForEvent(WebSocketShardEvents.Hello, this.strategy.options.helloTimeout);\n\t\tif (!ok) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (session?.shardCount === this.strategy.options.shardCount) {\n\t\t\tawait this.resume(session);\n\t\t} else {\n\t\t\tawait this.identify();\n\t\t}\n\t}\n\n\tpublic async destroy(options: WebSocketShardDestroyOptions = {}) {\n\t\tif (this.#status === WebSocketShardStatus.Idle) {\n\t\t\tthis.debug(['Tried to destroy a shard that was idle']);\n\t\t\treturn;\n\t\t}\n\n\t\tif (!options.code) {\n\t\t\toptions.code = options.recover === WebSocketShardDestroyRecovery.Resume ? CloseCodes.Resuming : CloseCodes.Normal;\n\t\t}\n\n\t\tthis.debug([\n\t\t\t'Destroying shard',\n\t\t\t`Reason: ${options.reason ?? 'none'}`,\n\t\t\t`Code: ${options.code}`,\n\t\t\t`Recover: ${options.recover === undefined ? 'none' : WebSocketShardDestroyRecovery[options.recover]!}`,\n\t\t]);\n\n\t\t// Reset state\n\t\tthis.isAck = true;\n\t\tif (this.heartbeatInterval) {\n\t\t\tclearInterval(this.heartbeatInterval);\n\t\t}\n\n\t\tif (this.initialHeartbeatTimeoutController) {\n\t\t\tthis.initialHeartbeatTimeoutController.abort();\n\t\t\tthis.initialHeartbeatTimeoutController = null;\n\t\t}\n\n\t\tthis.lastHeartbeatAt = -1;\n\n\t\tfor (const controller of this.timeoutAbortControllers.values()) {\n\t\t\tcontroller.abort();\n\t\t}\n\n\t\tthis.timeoutAbortControllers.clear();\n\n\t\tthis.failedToConnectDueToNetworkError = false;\n\n\t\t// Clear session state if applicable\n\t\tif (options.recover !== WebSocketShardDestroyRecovery.Resume) {\n\t\t\tawait this.strategy.updateSessionInfo(this.id, null);\n\t\t}\n\n\t\tif (this.connection) {\n\t\t\t// No longer need to listen to messages\n\t\t\tthis.connection.onmessage = null;\n\t\t\t// Prevent a reconnection loop by unbinding the main close event\n\t\t\tthis.connection.onclose = null;\n\n\t\t\tconst shouldClose = this.connection.readyState === WebSocket.OPEN;\n\n\t\t\tthis.debug([\n\t\t\t\t'Connection status during destroy',\n\t\t\t\t`Needs closing: ${shouldClose}`,\n\t\t\t\t`Ready state: ${this.connection.readyState}`,\n\t\t\t]);\n\n\t\t\tif (shouldClose) {\n\t\t\t\tlet outerResolve: () => void;\n\t\t\t\tconst promise = new Promise<void>((resolve) => {\n\t\t\t\t\touterResolve = resolve;\n\t\t\t\t});\n\n\t\t\t\tthis.connection.onclose = outerResolve!;\n\n\t\t\t\tthis.connection.close(options.code, options.reason);\n\n\t\t\t\tawait promise;\n\t\t\t\tthis.emit(WebSocketShardEvents.Closed, { code: options.code });\n\t\t\t}\n\n\t\t\t// Lastly, remove the error event.\n\t\t\t// Doing this earlier would cause a hard crash in case an error event fired on our `close` call\n\t\t\tthis.connection.onerror = null;\n\t\t} else {\n\t\t\tthis.debug(['Destroying a shard that has no connection; please open an issue on GitHub']);\n\t\t}\n\n\t\tthis.#status = WebSocketShardStatus.Idle;\n\n\t\tif (options.recover !== undefined) {\n\t\t\t// There's cases (like no internet connection) where we immediately fail to connect,\n\t\t\t// causing a very fast and draining reconnection loop.\n\t\t\tawait sleep(500);\n\t\t\treturn this.internalConnect();\n\t\t}\n\t}\n\n\tprivate async waitForEvent(event: WebSocketShardEvents, timeoutDuration?: number | null): Promise<{ ok: boolean }> {\n\t\tthis.debug([`Waiting for event ${event} ${timeoutDuration ? `for ${timeoutDuration}ms` : 'indefinitely'}`]);\n\t\tconst timeoutController = new AbortController();\n\t\tconst timeout = timeoutDuration ? setTimeout(() => timeoutController.abort(), timeoutDuration).unref() : null;\n\n\t\tthis.timeoutAbortControllers.set(event, timeoutController);\n\n\t\tconst closeController = new AbortController();\n\n\t\ttry {\n\t\t\t// If the first promise resolves, all is well. If the 2nd promise resolves,\n\t\t\t// the shard has meanwhile closed. In that case, a destroy is already ongoing, so we just need to\n\t\t\t// return false. Meanwhile, if something rejects (error event) or the first controller is aborted,\n\t\t\t// we enter the catch block and trigger a destroy there.\n\t\t\tconst closed = await Promise.race<boolean>([\n\t\t\t\tonce(this, event, { signal: timeoutController.signal }).then(() => false),\n\t\t\t\tonce(this, WebSocketShardEvents.Closed, { signal: closeController.signal }).then(() => true),\n\t\t\t]);\n\n\t\t\treturn { ok: !closed };\n\t\t} catch {\n\t\t\t// If we're here because of other reasons, we need to destroy the shard\n\t\t\tvoid this.destroy({\n\t\t\t\tcode: CloseCodes.Normal,\n\t\t\t\treason: 'Something timed out or went wrong while waiting for an event',\n\t\t\t\trecover: WebSocketShardDestroyRecovery.Reconnect,\n\t\t\t});\n\n\t\t\treturn { ok: false };\n\t\t} finally {\n\t\t\tif (timeout) {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t}\n\n\t\t\tthis.timeoutAbortControllers.delete(event);\n\n\t\t\t// Clean up the close listener to not leak memory\n\t\t\tif (!closeController.signal.aborted) {\n\t\t\t\tcloseController.abort();\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic async send(payload: GatewaySendPayload): Promise<void> {\n\t\tif (!this.connection) {\n\t\t\tthrow new Error(\"WebSocketShard wasn't connected\");\n\t\t}\n\n\t\tif (this.#status !== WebSocketShardStatus.Ready && !ImportantGatewayOpcodes.has(payload.op)) {\n\t\t\tthis.debug(['Tried to send a non-crucial payload before the shard was ready, waiting']);\n\t\t\t// This will throw if the shard throws an error event in the meantime, just requeue the payload\n\t\t\ttry {\n\t\t\t\tawait once(this, WebSocketShardEvents.Ready);\n\t\t\t} catch {\n\t\t\t\treturn this.send(payload);\n\t\t\t}\n\t\t}\n\n\t\tawait this.sendQueue.wait();\n\n\t\tif (--this.sendRateLimitState.remaining <= 0) {\n\t\t\tconst now = Date.now();\n\n\t\t\tif (this.sendRateLimitState.resetAt > now) {\n\t\t\t\tconst sleepFor = this.sendRateLimitState.resetAt - now;\n\n\t\t\t\tthis.debug([`Was about to hit the send rate limit, sleeping for ${sleepFor}ms`]);\n\t\t\t\tconst controller = new AbortController();\n\n\t\t\t\t// Sleep for the remaining time, but if the connection closes in the meantime, we shouldn't wait the remainder to avoid blocking the new conn\n\t\t\t\tconst interrupted = await Promise.race([\n\t\t\t\t\tsleep(sleepFor).then(() => false),\n\t\t\t\t\tonce(this, WebSocketShardEvents.Closed, { signal: controller.signal }).then(() => true),\n\t\t\t\t]);\n\n\t\t\t\tif (interrupted) {\n\t\t\t\t\tthis.debug(['Connection closed while waiting for the send rate limit to reset, re-queueing payload']);\n\t\t\t\t\tthis.sendQueue.shift();\n\t\t\t\t\treturn this.send(payload);\n\t\t\t\t}\n\n\t\t\t\t// This is so the listener from the `once` call is removed\n\t\t\t\tcontroller.abort();\n\t\t\t}\n\n\t\t\tthis.sendRateLimitState = getInitialSendRateLimitState();\n\t\t}\n\n\t\tthis.sendQueue.shift();\n\t\tthis.connection.send(JSON.stringify(payload));\n\t}\n\n\tprivate async identify() {\n\t\tthis.debug(['Waiting for identify throttle']);\n\n\t\tconst controller = new AbortController();\n\t\tconst closeHandler = () => {\n\t\t\tcontroller.abort();\n\t\t};\n\n\t\tthis.on(WebSocketShardEvents.Closed, closeHandler);\n\n\t\ttry {\n\t\t\tawait this.strategy.waitForIdentify(this.id, controller.signal);\n\t\t} catch {\n\t\t\tif (controller.signal.aborted) {\n\t\t\t\tthis.debug(['Was waiting for an identify, but the shard closed in the meantime']);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.debug([\n\t\t\t\t'IContextFetchingStrategy#waitForIdentify threw an unknown error.',\n\t\t\t\t\"If you're using a custom strategy, this is probably nothing to worry about.\",\n\t\t\t\t\"If you're not, please open an issue on GitHub.\",\n\t\t\t]);\n\n\t\t\tawait this.destroy({\n\t\t\t\treason: 'Identify throttling logic failed',\n\t\t\t\trecover: WebSocketShardDestroyRecovery.Resume,\n\t\t\t});\n\t\t} finally {\n\t\t\tthis.off(WebSocketShardEvents.Closed, closeHandler);\n\t\t}\n\n\t\tthis.debug([\n\t\t\t'Identifying',\n\t\t\t`shard id: ${this.id.toString()}`,\n\t\t\t`shard count: ${this.strategy.options.shardCount}`,\n\t\t\t`intents: ${this.strategy.options.intents}`,\n\t\t\t`compression: ${this.inflate ? 'zlib-stream' : this.useIdentifyCompress ? 'identify' : 'none'}`,\n\t\t]);\n\n\t\tconst d: GatewayIdentifyData = {\n\t\t\ttoken: this.strategy.options.token,\n\t\t\tproperties: this.strategy.options.identifyProperties,\n\t\t\tintents: this.strategy.options.intents,\n\t\t\tcompress: this.useIdentifyCompress,\n\t\t\tshard: [this.id, this.strategy.options.shardCount],\n\t\t};\n\n\t\tif (this.strategy.options.largeThreshold) {\n\t\t\td.large_threshold = this.strategy.options.largeThreshold;\n\t\t}\n\n\t\tif (this.strategy.options.initialPresence) {\n\t\t\td.presence = this.strategy.options.initialPresence;\n\t\t}\n\n\t\tawait this.send({\n\t\t\top: GatewayOpcodes.Identify,\n\t\t\td,\n\t\t});\n\n\t\tawait this.waitForEvent(WebSocketShardEvents.Ready, this.strategy.options.readyTimeout);\n\t}\n\n\tprivate async resume(session: SessionInfo) {\n\t\tthis.debug([\n\t\t\t'Resuming session',\n\t\t\t`resume url: ${session.resumeURL}`,\n\t\t\t`sequence: ${session.sequence}`,\n\t\t\t`shard id: ${this.id.toString()}`,\n\t\t]);\n\n\t\tthis.#status = WebSocketShardStatus.Resuming;\n\t\tthis.replayedEvents = 0;\n\t\treturn this.send({\n\t\t\top: GatewayOpcodes.Resume,\n\t\t\td: {\n\t\t\t\ttoken: this.strategy.options.token,\n\t\t\t\tseq: session.sequence,\n\t\t\t\tsession_id: session.sessionId,\n\t\t\t},\n\t\t});\n\t}\n\n\tprivate async heartbeat(requested = false) {\n\t\tif (!this.isAck && !requested) {\n\t\t\treturn this.destroy({ reason: 'Zombie connection', recover: WebSocketShardDestroyRecovery.Resume });\n\t\t}\n\n\t\tconst session = await this.strategy.retrieveSessionInfo(this.id);\n\n\t\tawait this.send({\n\t\t\top: GatewayOpcodes.Heartbeat,\n\t\t\td: session?.sequence ?? null,\n\t\t});\n\n\t\tthis.lastHeartbeatAt = Date.now();\n\t\tthis.isAck = false;\n\t}\n\n\tprivate async unpackMessage(data: Data, isBinary: boolean): Promise<GatewayReceivePayload | null> {\n\t\t// Deal with no compression\n\t\tif (!isBinary) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(data as string) as GatewayReceivePayload;\n\t\t\t} catch {\n\t\t\t\t// This is a non-JSON payload / (at the time of writing this comment) emitted by bun wrongly interpreting custom close codes https://github.com/oven-sh/bun/issues/3392\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\tconst decompressable = new Uint8Array(data as ArrayBuffer);\n\n\t\t// Deal with identify compress\n\t\tif (this.useIdentifyCompress) {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t// eslint-disable-next-line promise/prefer-await-to-callbacks\n\t\t\t\tinflate(decompressable, { chunkSize: 65_535 }, (err, result) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(JSON.parse(this.textDecoder.decode(result)) as GatewayReceivePayload);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\t// Deal with gw wide zlib-stream compression\n\t\tif (this.inflate) {\n\t\t\tconst l = decompressable.length;\n\t\t\tconst flush =\n\t\t\t\tl >= 4 &&\n\t\t\t\tdecompressable[l - 4] === 0x00 &&\n\t\t\t\tdecompressable[l - 3] === 0x00 &&\n\t\t\t\tdecompressable[l - 2] === 0xff &&\n\t\t\t\tdecompressable[l - 1] === 0xff;\n\n\t\t\tconst zlib = (await getZlibSync())!;\n\t\t\tthis.inflate.push(Buffer.from(decompressable), flush ? zlib.Z_SYNC_FLUSH : zlib.Z_NO_FLUSH);\n\n\t\t\tif (this.inflate.err) {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error(`${this.inflate.err}${this.inflate.msg ? `: ${this.inflate.msg}` : ''}`),\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!flush) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst { result } = this.inflate;\n\t\t\tif (!result) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn JSON.parse(typeof result === 'string' ? result : this.textDecoder.decode(result)) as GatewayReceivePayload;\n\t\t}\n\n\t\tthis.debug([\n\t\t\t'Received a message we were unable to decompress',\n\t\t\t`isBinary: ${isBinary.toString()}`,\n\t\t\t`useIdentifyCompress: ${this.useIdentifyCompress.toString()}`,\n\t\t\t`inflate: ${Boolean(this.inflate).toString()}`,\n\t\t]);\n\n\t\treturn null;\n\t}\n\n\tprivate async onMessage(data: Data, isBinary: boolean) {\n\t\tconst payload = await this.unpackMessage(data, isBinary);\n\t\tif (!payload) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (payload.op) {\n\t\t\tcase GatewayOpcodes.Dispatch: {\n\t\t\t\tif (this.#status === WebSocketShardStatus.Resuming) {\n\t\t\t\t\tthis.replayedEvents++;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line sonarjs/no-nested-switch\n\t\t\t\tswitch (payload.t) {\n\t\t\t\t\tcase GatewayDispatchEvents.Ready: {\n\t\t\t\t\t\tthis.#status = WebSocketShardStatus.Ready;\n\n\t\t\t\t\t\tconst session = {\n\t\t\t\t\t\t\tsequence: payload.s,\n\t\t\t\t\t\t\tsessionId: payload.d.session_id,\n\t\t\t\t\t\t\tshardId: this.id,\n\t\t\t\t\t\t\tshardCount: this.strategy.options.shardCount,\n\t\t\t\t\t\t\tresumeURL: payload.d.resume_gateway_url,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tawait this.strategy.updateSessionInfo(this.id, session);\n\n\t\t\t\t\t\tthis.emit(WebSocketShardEvents.Ready, { data: payload.d });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase GatewayDispatchEvents.Resumed: {\n\t\t\t\t\t\tthis.#status = WebSocketShardStatus.Ready;\n\t\t\t\t\t\tthis.debug([`Resumed and replayed ${this.replayedEvents} events`]);\n\t\t\t\t\t\tthis.emit(WebSocketShardEvents.Resumed);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst session = await this.strategy.retrieveSessionInfo(this.id);\n\t\t\t\tif (session) {\n\t\t\t\t\tif (payload.s > session.sequence) {\n\t\t\t\t\t\tawait this.strategy.updateSessionInfo(this.id, { ...session, sequence: payload.s });\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.debug([\n\t\t\t\t\t\t`Received a ${payload.t} event but no session is available. Session information cannot be re-constructed in this state without a full reconnect`,\n\t\t\t\t\t]);\n\t\t\t\t}\n\n\t\t\t\tthis.emit(WebSocketShardEvents.Dispatch, { data: payload });\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.Heartbeat: {\n\t\t\t\tawait this.heartbeat(true);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.Reconnect: {\n\t\t\t\tawait this.destroy({\n\t\t\t\t\treason: 'Told to reconnect by Discord',\n\t\t\t\t\trecover: WebSocketShardDestroyRecovery.Resume,\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.InvalidSession: {\n\t\t\t\tthis.debug([`Invalid session; will attempt to resume: ${payload.d.toString()}`]);\n\t\t\t\tconst session = await this.strategy.retrieveSessionInfo(this.id);\n\t\t\t\tif (payload.d && session) {\n\t\t\t\t\tawait this.resume(session);\n\t\t\t\t} else {\n\t\t\t\t\tawait this.destroy({\n\t\t\t\t\t\treason: 'Invalid session',\n\t\t\t\t\t\trecover: WebSocketShardDestroyRecovery.Reconnect,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.Hello: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Hello);\n\t\t\t\tconst jitter = Math.random();\n\t\t\t\tconst firstWait = Math.floor(payload.d.heartbeat_interval * jitter);\n\t\t\t\tthis.debug([`Preparing first heartbeat of the connection with a jitter of ${jitter}; waiting ${firstWait}ms`]);\n\n\t\t\t\ttry {\n\t\t\t\t\tconst controller = new AbortController();\n\t\t\t\t\tthis.initialHeartbeatTimeoutController = controller;\n\t\t\t\t\tawait sleep(firstWait, undefined, { signal: controller.signal });\n\t\t\t\t} catch {\n\t\t\t\t\tthis.debug(['Cancelled initial heartbeat due to #destroy being called']);\n\t\t\t\t\treturn;\n\t\t\t\t} finally {\n\t\t\t\t\tthis.initialHeartbeatTimeoutController = null;\n\t\t\t\t}\n\n\t\t\t\tawait this.heartbeat();\n\n\t\t\t\tthis.debug([`First heartbeat sent, starting to beat every ${payload.d.heartbeat_interval}ms`]);\n\t\t\t\tthis.heartbeatInterval = setInterval(() => void this.heartbeat(), payload.d.heartbeat_interval);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.HeartbeatAck: {\n\t\t\t\tthis.isAck = true;\n\n\t\t\t\tconst ackAt = Date.now();\n\t\t\t\tthis.emit(WebSocketShardEvents.HeartbeatComplete, {\n\t\t\t\t\tackAt,\n\t\t\t\t\theartbeatAt: this.lastHeartbeatAt,\n\t\t\t\t\tlatency: ackAt - this.lastHeartbeatAt,\n\t\t\t\t});\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate onError(error: Error) {\n\t\tif ('code' in error && ['ECONNRESET', 'ECONNREFUSED'].includes(error.code as string)) {\n\t\t\tthis.debug(['Failed to connect to the gateway URL specified due to a network error']);\n\t\t\tthis.failedToConnectDueToNetworkError = true;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.emit(WebSocketShardEvents.Error, { error });\n\t}\n\n\tprivate async onClose(code: number) {\n\t\tthis.emit(WebSocketShardEvents.Closed, { code });\n\n\t\tswitch (code) {\n\t\t\tcase CloseCodes.Normal: {\n\t\t\t\treturn this.destroy({\n\t\t\t\t\tcode,\n\t\t\t\t\treason: 'Got disconnected by Discord',\n\t\t\t\t\trecover: WebSocketShardDestroyRecovery.Reconnect,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tcase CloseCodes.Resuming: {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.UnknownError: {\n\t\t\t\tthis.debug([`An unknown error occurred: ${code}`]);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.UnknownOpcode: {\n\t\t\t\tthis.debug(['An invalid opcode was sent to Discord.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.DecodeError: {\n\t\t\t\tthis.debug(['An invalid payload was sent to Discord.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.NotAuthenticated: {\n\t\t\t\tthis.debug(['A request was somehow sent before the identify/resume payload.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Reconnect });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.AuthenticationFailed: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Authentication failed'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.AlreadyAuthenticated: {\n\t\t\t\tthis.debug(['More than one auth payload was sent.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Reconnect });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.InvalidSeq: {\n\t\t\t\tthis.debug(['An invalid sequence was sent.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Reconnect });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.RateLimited: {\n\t\t\t\tthis.debug(['The WebSocket rate limit has been hit, this should never happen']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Reconnect });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.SessionTimedOut: {\n\t\t\t\tthis.debug(['Session timed out.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.InvalidShard: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Invalid shard'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.ShardingRequired: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Sharding is required'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.InvalidAPIVersion: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Used an invalid API version'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.InvalidIntents: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Used invalid intents'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.DisallowedIntents: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Used disallowed intents'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\tthis.debug([\n\t\t\t\t\t`The gateway closed with an unexpected code ${code}, attempting to ${\n\t\t\t\t\t\tthis.failedToConnectDueToNetworkError ? 'reconnect' : 'resume'\n\t\t\t\t\t}.`,\n\t\t\t\t]);\n\t\t\t\treturn this.destroy({\n\t\t\t\t\tcode,\n\t\t\t\t\trecover: this.failedToConnectDueToNetworkError\n\t\t\t\t\t\t? WebSocketShardDestroyRecovery.Reconnect\n\t\t\t\t\t\t: WebSocketShardDestroyRecovery.Resume,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate debug(messages: [string, ...string[]]) {\n\t\tconst message = `${messages[0]}${\n\t\t\tmessages.length > 1\n\t\t\t\t? `\\n${messages\n\t\t\t\t\t\t.slice(1)\n\t\t\t\t\t\t.map((m) => `\t${m}`)\n\t\t\t\t\t\t.join('\\n')}`\n\t\t\t\t: ''\n\t\t}`;\n\n\t\tthis.emit(WebSocketShardEvents.Debug, { message });\n\t}\n}\n","import process from 'node:process';\nimport { Collection } from '@discordjs/collection';\nimport { lazy } from '@discordjs/util';\nimport { APIVersion, GatewayOpcodes } from 'discord-api-types/v10';\nimport { SimpleShardingStrategy } from '../strategies/sharding/SimpleShardingStrategy.js';\nimport { SimpleIdentifyThrottler } from '../throttling/SimpleIdentifyThrottler.js';\nimport type { SessionInfo, OptionalWebSocketManagerOptions, WebSocketManager } from '../ws/WebSocketManager.js';\nimport type { SendRateLimitState } from '../ws/WebSocketShard.js';\n\n/**\n * Valid encoding types\n */\nexport enum Encoding {\n\tJSON = 'json',\n}\n\n/**\n * Valid compression methods\n */\nexport enum CompressionMethod {\n\tZlibStream = 'zlib-stream',\n}\n\nexport const DefaultDeviceProperty = `@discordjs/ws 1.0.1` as `@discordjs/ws ${string}`;\n\nconst getDefaultSessionStore = lazy(() => new Collection<number, SessionInfo | null>());\n\n/**\n * Default options used by the manager\n */\nexport const DefaultWebSocketManagerOptions = {\n\tasync buildIdentifyThrottler(manager: WebSocketManager) {\n\t\tconst info = await manager.fetchGatewayInformation();\n\t\treturn new SimpleIdentifyThrottler(info.session_start_limit.max_concurrency);\n\t},\n\tbuildStrategy: (manager) => new SimpleShardingStrategy(manager),\n\tshardCount: null,\n\tshardIds: null,\n\tlargeThreshold: null,\n\tinitialPresence: null,\n\tidentifyProperties: {\n\t\tbrowser: DefaultDeviceProperty,\n\t\tdevice: DefaultDeviceProperty,\n\t\tos: process.platform,\n\t},\n\tversion: APIVersion,\n\tencoding: Encoding.JSON,\n\tcompression: null,\n\tretrieveSessionInfo(shardId) {\n\t\tconst store = getDefaultSessionStore();\n\t\treturn store.get(shardId) ?? null;\n\t},\n\tupdateSessionInfo(shardId: number, info: SessionInfo | null) {\n\t\tconst store = getDefaultSessionStore();\n\t\tif (info) {\n\t\t\tstore.set(shardId, info);\n\t\t} else {\n\t\t\tstore.delete(shardId);\n\t\t}\n\t},\n\thandshakeTimeout: 30_000,\n\thelloTimeout: 60_000,\n\treadyTimeout: 15_000,\n} as const satisfies OptionalWebSocketManagerOptions;\n\nexport const ImportantGatewayOpcodes = new Set([\n\tGatewayOpcodes.Heartbeat,\n\tGatewayOpcodes.Identify,\n\tGatewayOpcodes.Resume,\n]);\n\nexport function getInitialSendRateLimitState(): SendRateLimitState {\n\treturn {\n\t\tremaining: 120,\n\t\tresetAt: Date.now() + 60_000,\n\t};\n}\n","import { setTimeout as sleep } from 'node:timers/promises';\nimport { Collection } from '@discordjs/collection';\nimport { AsyncQueue } from '@sapphire/async-queue';\nimport type { IIdentifyThrottler } from './IIdentifyThrottler.js';\n\n/**\n * The state of a rate limit key's identify queue.\n */\nexport interface IdentifyState {\n\tqueue: AsyncQueue;\n\tresetsAt: number;\n}\n\n/**\n * Local, in-memory identify throttler.\n */\nexport class SimpleIdentifyThrottler implements IIdentifyThrottler {\n\tprivate readonly states = new Collection<number, IdentifyState>();\n\n\tpublic constructor(private readonly maxConcurrency: number) {}\n\n\t/**\n\t * {@inheritDoc IIdentifyThrottler.waitForIdentify}\n\t */\n\tpublic async waitForIdentify(shardId: number, signal: AbortSignal): Promise<void> {\n\t\tconst key = shardId % this.maxConcurrency;\n\n\t\tconst state = this.states.ensure(key, () => {\n\t\t\treturn {\n\t\t\t\tqueue: new AsyncQueue(),\n\t\t\t\tresetsAt: Number.POSITIVE_INFINITY,\n\t\t\t};\n\t\t});\n\n\t\tawait state.queue.wait({ signal });\n\n\t\ttry {\n\t\t\tconst diff = state.resetsAt - Date.now();\n\t\t\tif (diff <= 5_000) {\n\t\t\t\t// To account for the latency the IDENTIFY payload goes through, we add a bit more wait time\n\t\t\t\tconst time = diff + Math.random() * 1_500;\n\t\t\t\tawait sleep(time);\n\t\t\t}\n\n\t\t\tstate.resetsAt = Date.now() + 5_000;\n\t\t} finally {\n\t\t\tstate.queue.shift();\n\t\t}\n\t}\n}\n","import { isMainThread, parentPort, workerData } from 'node:worker_threads';\nimport { Collection } from '@discordjs/collection';\nimport type { Awaitable } from '@discordjs/util';\nimport { WorkerContextFetchingStrategy } from '../strategies/context/WorkerContextFetchingStrategy.js';\nimport {\n\tWorkerReceivePayloadOp,\n\tWorkerSendPayloadOp,\n\ttype WorkerData,\n\ttype WorkerReceivePayload,\n\ttype WorkerSendPayload,\n} from '../strategies/sharding/WorkerShardingStrategy.js';\nimport type { WebSocketShardDestroyOptions } from '../ws/WebSocketShard.js';\nimport { WebSocketShardEvents, WebSocketShard } from '../ws/WebSocketShard.js';\n\n/**\n * Options for bootstrapping the worker\n */\nexport interface BootstrapOptions {\n\t/**\n\t * Shard events to just arbitrarily forward to the parent thread for the manager to emit\n\t * Note: By default, this will include ALL events\n\t * you most likely want to handle dispatch within the worker itself\n\t */\n\tforwardEvents?: WebSocketShardEvents[];\n\t/**\n\t * Function to call when a shard is created for additional setup\n\t */\n\tshardCallback?(shard: WebSocketShard): Awaitable<void>;\n}\n\n/**\n * Utility class for bootstrapping a worker thread to be used for sharding\n */\nexport class WorkerBootstrapper {\n\t/**\n\t * The data passed to the worker thread\n\t */\n\tprotected readonly data = workerData as WorkerData;\n\n\t/**\n\t * The shards that are managed by this worker\n\t */\n\tprotected readonly shards = new Collection<number, WebSocketShard>();\n\n\tpublic constructor() {\n\t\tif (isMainThread) {\n\t\t\tthrow new Error('Expected WorkerBootstrap to not be used within the main thread');\n\t\t}\n\t}\n\n\t/**\n\t * Helper method to initiate a shard's connection process\n\t */\n\tprotected async connect(shardId: number): Promise<void> {\n\t\tconst shard = this.shards.get(shardId);\n\t\tif (!shard) {\n\t\t\tthrow new RangeError(`Shard ${shardId} does not exist`);\n\t\t}\n\n\t\tawait shard.connect();\n\t}\n\n\t/**\n\t * Helper method to destroy a shard\n\t */\n\tprotected async destroy(shardId: number, options?: WebSocketShardDestroyOptions): Promise<void> {\n\t\tconst shard = this.shards.get(shardId);\n\t\tif (!shard) {\n\t\t\tthrow new RangeError(`Shard ${shardId} does not exist`);\n\t\t}\n\n\t\tawait shard.destroy(options);\n\t}\n\n\t/**\n\t * Helper method to attach event listeners to the parentPort\n\t */\n\tprotected setupThreadEvents(): void {\n\t\tparentPort!\n\t\t\t.on('messageerror', (err) => {\n\t\t\t\tthrow err;\n\t\t\t})\n\t\t\t.on('message', async (payload: WorkerSendPayload) => {\n\t\t\t\tswitch (payload.op) {\n\t\t\t\t\tcase WorkerSendPayloadOp.Connect: {\n\t\t\t\t\t\tawait this.connect(payload.shardId);\n\t\t\t\t\t\tconst response: WorkerReceivePayload = {\n\t\t\t\t\t\t\top: WorkerReceivePayloadOp.Connected,\n\t\t\t\t\t\t\tshardId: payload.shardId,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tparentPort!.postMessage(response);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.Destroy: {\n\t\t\t\t\t\tawait this.destroy(payload.shardId, payload.options);\n\t\t\t\t\t\tconst response: WorkerReceivePayload = {\n\t\t\t\t\t\t\top: WorkerReceivePayloadOp.Destroyed,\n\t\t\t\t\t\t\tshardId: payload.shardId,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tparentPort!.postMessage(response);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.Send: {\n\t\t\t\t\t\tconst shard = this.shards.get(payload.shardId);\n\t\t\t\t\t\tif (!shard) {\n\t\t\t\t\t\t\tthrow new RangeError(`Shard ${payload.shardId} does not exist`);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tawait shard.send(payload.payload);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.SessionInfoResponse: {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.ShardIdentifyResponse: {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.FetchStatus: {\n\t\t\t\t\t\tconst shard = this.shards.get(payload.shardId);\n\t\t\t\t\t\tif (!shard) {\n\t\t\t\t\t\t\tthrow new Error(`Shard ${payload.shardId} does not exist`);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst response: WorkerReceivePayload = {\n\t\t\t\t\t\t\top: WorkerReceivePayloadOp.FetchStatusResponse,\n\t\t\t\t\t\t\tstatus: shard.status,\n\t\t\t\t\t\t\tnonce: payload.nonce,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tparentPort!.postMessage(response);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\t/**\n\t * Bootstraps the worker thread with the provided options\n\t */\n\tpublic async bootstrap(options: Readonly<BootstrapOptions> = {}): Promise<void> {\n\t\t// Start by initializing the shards\n\t\tfor (const shardId of this.data.shardIds) {\n\t\t\tconst shard = new WebSocketShard(new WorkerContextFetchingStrategy(this.data), shardId);\n\t\t\tfor (const event of options.forwardEvents ?? Object.values(WebSocketShardEvents)) {\n\t\t\t\t// @ts-expect-error: Event types incompatible\n\t\t\t\tshard.on(event, (data) => {\n\t\t\t\t\tconst payload: WorkerReceivePayload = {\n\t\t\t\t\t\top: WorkerReceivePayloadOp.Event,\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\tdata,\n\t\t\t\t\t\tshardId,\n\t\t\t\t\t};\n\t\t\t\t\tparentPort!.postMessage(payload);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Any additional setup the user might want to do\n\t\t\tawait options.shardCallback?.(shard);\n\t\t\tthis.shards.set(shardId, shard);\n\t\t}\n\n\t\t// Lastly, start listening to messages from the parent thread\n\t\tthis.setupThreadEvents();\n\n\t\tconst message: WorkerReceivePayload = {\n\t\t\top: WorkerReceivePayloadOp.WorkerReady,\n\t\t};\n\t\tparentPort!.postMessage(message);\n\t}\n}\n","import type { REST } from '@discordjs/rest';\nimport { range, type Awaitable } from '@discordjs/util';\nimport { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';\nimport {\n\tRoutes,\n\ttype APIGatewayBotInfo,\n\ttype GatewayIdentifyProperties,\n\ttype GatewayPresenceUpdateData,\n\ttype RESTGetAPIGatewayBotResult,\n\ttype GatewayIntentBits,\n\ttype GatewaySendPayload,\n} from 'discord-api-types/v10';\nimport type { IShardingStrategy } from '../strategies/sharding/IShardingStrategy.js';\nimport type { IIdentifyThrottler } from '../throttling/IIdentifyThrottler.js';\nimport { DefaultWebSocketManagerOptions, type CompressionMethod, type Encoding } from '../utils/constants.js';\nimport type { WebSocketShardDestroyOptions, WebSocketShardEventsMap } from './WebSocketShard.js';\n\n/**\n * Represents a range of shard ids\n */\nexport interface ShardRange {\n\tend: number;\n\tstart: number;\n}\n\n/**\n * Session information for a given shard, used to resume a session\n */\nexport interface SessionInfo {\n\t/**\n\t * URL to use when resuming\n\t */\n\tresumeURL: string;\n\t/**\n\t * The sequence number of the last message sent by the shard\n\t */\n\tsequence: number;\n\t/**\n\t * Session id for this shard\n\t */\n\tsessionId: string;\n\t/**\n\t * The total number of shards at the time of this shard identifying\n\t */\n\tshardCount: number;\n\t/**\n\t * The id of the shard\n\t */\n\tshardId: number;\n}\n\n/**\n * Required options for the WebSocketManager\n */\nexport interface RequiredWebSocketManagerOptions {\n\t/**\n\t * The intents to request\n\t */\n\tintents: GatewayIntentBits | 0;\n\t/**\n\t * The REST instance to use for fetching gateway information\n\t */\n\trest: REST;\n\t/**\n\t * The token to use for identifying with the gateway\n\t */\n\ttoken: string;\n}\n\n/**\n * Optional additional configuration for the WebSocketManager\n */\nexport interface OptionalWebSocketManagerOptions {\n\t/**\n\t * Builds an identify throttler to use for this manager's shards\n\t */\n\tbuildIdentifyThrottler(manager: WebSocketManager): Awaitable<IIdentifyThrottler>;\n\t/**\n\t * Builds the strategy to use for sharding\n\t *\n\t * @example\n\t * ```ts\n\t * const manager = new WebSocketManager({\n\t * token: process.env.DISCORD_TOKEN,\n\t * intents: 0, // for no intents\n\t * rest,\n\t * buildStrategy: (manager) => new WorkerShardingStrategy(manager, { shardsPerWorker: 2 }),\n\t * });\n\t * ```\n\t */\n\tbuildStrategy(manager: WebSocketManager): IShardingStrategy;\n\t/**\n\t * The compression method to use\n\t *\n\t * @defaultValue `null` (no compression)\n\t */\n\tcompression: CompressionMethod | null;\n\t/**\n\t * The encoding to use\n\t *\n\t * @defaultValue `'json'`\n\t */\n\tencoding: Encoding;\n\t/**\n\t * How long to wait for a shard to connect before giving up\n\t */\n\thandshakeTimeout: number | null;\n\t/**\n\t * How long to wait for a shard's HELLO packet before giving up\n\t */\n\thelloTimeout: number | null;\n\t/**\n\t * Properties to send to the gateway when identifying\n\t */\n\tidentifyProperties: GatewayIdentifyProperties;\n\t/**\n\t * Initial presence data to send to the gateway when identifying\n\t */\n\tinitialPresence: GatewayPresenceUpdateData | null;\n\t/**\n\t * Value between 50 and 250, total number of members where the gateway will stop sending offline members in the guild member list\n\t */\n\tlargeThreshold: number | null;\n\t/**\n\t * How long to wait for a shard's READY packet before giving up\n\t */\n\treadyTimeout: number | null;\n\t/**\n\t * Function used to retrieve session information (and attempt to resume) for a given shard\n\t *\n\t * @example\n\t * ```ts\n\t * const manager = new WebSocketManager({\n\t * async retrieveSessionInfo(shardId): Awaitable<SessionInfo | null> {\n\t * // Fetch this info from redis or similar\n\t * return { sessionId: string, sequence: number };\n\t * // Return null if no information is found\n\t * },\n\t * });\n\t * ```\n\t */\n\tretrieveSessionInfo(shardId: number): Awaitable<SessionInfo | null>;\n\t/**\n\t * The total number of shards across all WebsocketManagers you intend to instantiate.\n\t * Use `null` to use Discord's recommended shard count\n\t */\n\tshardCount: number | null;\n\t/**\n\t * The ids of the shards this WebSocketManager should manage.\n\t * Use `null` to simply spawn 0 through `shardCount - 1`\n\t *\n\t * @example\n\t * ```ts\n\t * const manager = new WebSocketManager({\n\t * shardIds: [1, 3, 7], // spawns shard 1, 3, and 7, nothing else\n\t * });\n\t * ```\n\t * @example\n\t * ```ts\n\t * const manager = new WebSocketManager({\n\t * shardIds: {\n\t * start: 3,\n\t * end: 6,\n\t * }, // spawns shards 3, 4, 5, and 6\n\t * });\n\t * ```\n\t */\n\tshardIds: number[] | ShardRange | null;\n\t/**\n\t * Function used to store session information for a given shard\n\t */\n\tupdateSessionInfo(shardId: number, sessionInfo: SessionInfo | null): Awaitable<void>;\n\t/**\n\t * The gateway version to use\n\t *\n\t * @defaultValue `'10'`\n\t */\n\tversion: string;\n}\n\nexport type WebSocketManagerOptions = OptionalWebSocketManagerOptions & RequiredWebSocketManagerOptions;\n\nexport type ManagerShardEventsMap = {\n\t[K in keyof WebSocketShardEventsMap]: [\n\t\tWebSocketShardEventsMap[K] extends [] ? { shardId: number } : WebSocketShardEventsMap[K][0] & { shardId: number },\n\t];\n};\n\nexport class WebSocketManager extends AsyncEventEmitter<ManagerShardEventsMap> {\n\t/**\n\t * The options being used by this manager\n\t */\n\tpublic readonly options: WebSocketManagerOptions;\n\n\t/**\n\t * Internal cache for a GET /gateway/bot result\n\t */\n\tprivate gatewayInformation: {\n\t\tdata: APIGatewayBotInfo;\n\t\texpiresAt: number;\n\t} | null = null;\n\n\t/**\n\t * Internal cache for the shard ids\n\t */\n\tprivate shardIds: number[] | null = null;\n\n\t/**\n\t * Strategy used to manage shards\n\t *\n\t * @defaultValue `SimpleShardingStrategy`\n\t */\n\tprivate readonly strategy: IShardingStrategy;\n\n\tpublic constructor(options: Partial<OptionalWebSocketManagerOptions> & RequiredWebSocketManagerOptions) {\n\t\tsuper();\n\t\tthis.options = { ...DefaultWebSocketManagerOptions, ...options };\n\t\tthis.strategy = this.options.buildStrategy(this);\n\t}\n\n\t/**\n\t * Fetches the gateway information from Discord - or returns it from cache if available\n\t *\n\t * @param force - Whether to ignore the cache and force a fresh fetch\n\t */\n\tpublic async fetchGatewayInformation(force = false) {\n\t\tif (this.gatewayInformation) {\n\t\t\tif (this.gatewayInformation.expiresAt <= Date.now()) {\n\t\t\t\tthis.gatewayInformation = null;\n\t\t\t} else if (!force) {\n\t\t\t\treturn this.gatewayInformation.data;\n\t\t\t}\n\t\t}\n\n\t\tconst data = (await this.options.rest.get(Routes.gatewayBot())) as RESTGetAPIGatewayBotResult;\n\n\t\t// For single sharded bots session_start_limit.reset_after will be 0, use 5 seconds as a minimum expiration time\n\t\tthis.gatewayInformation = { data, expiresAt: Date.now() + (data.session_start_limit.reset_after || 5_000) };\n\t\treturn this.gatewayInformation.data;\n\t}\n\n\t/**\n\t * Updates your total shard count on-the-fly, spawning shards as needed\n\t *\n\t * @param shardCount - The new shard count to use\n\t */\n\tpublic async updateShardCount(shardCount: number | null) {\n\t\tawait this.strategy.destroy({ reason: 'User is adjusting their shards' });\n\t\tthis.options.shardCount = shardCount;\n\n\t\tconst shardIds = await this.getShardIds(true);\n\t\tawait this.strategy.spawn(shardIds);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Yields the total number of shards across for your bot, accounting for Discord recommendations\n\t */\n\tpublic async getShardCount(): Promise<number> {\n\t\tif (this.options.shardCount) {\n\t\t\treturn this.options.shardCount;\n\t\t}\n\n\t\tconst shardIds = await this.getShardIds();\n\t\treturn Math.max(...shardIds) + 1;\n\t}\n\n\t/**\n\t * Yields the ids of the shards this manager should manage\n\t */\n\tpublic async getShardIds(force = false): Promise<number[]> {\n\t\tif (this.shardIds && !force) {\n\t\t\treturn this.shardIds;\n\t\t}\n\n\t\tlet shardIds: number[];\n\t\tif (this.options.shardIds) {\n\t\t\tif (Array.isArray(this.options.shardIds)) {\n\t\t\t\tshardIds = this.options.shardIds;\n\t\t\t} else {\n\t\t\t\tconst { start, end } = this.options.shardIds;\n\t\t\t\tshardIds = [...range({ start, end: end + 1 })];\n\t\t\t}\n\t\t} else {\n\t\t\tconst data = await this.fetchGatewayInformation();\n\t\t\tshardIds = [...range(this.options.shardCount ?? data.shards)];\n\t\t}\n\n\t\tthis.shardIds = shardIds;\n\t\treturn shardIds;\n\t}\n\n\tpublic async connect() {\n\t\tconst shardCount = await this.getShardCount();\n\n\t\tconst data = await this.fetchGatewayInformation();\n\t\tif (data.session_start_limit.remaining < shardCount) {\n\t\t\tthrow new Error(\n\t\t\t\t`Not enough sessions remaining to spawn ${shardCount} shards; only ${\n\t\t\t\t\tdata.session_start_limit.remaining\n\t\t\t\t} remaining; resets at ${new Date(Date.now() + data.session_start_limit.reset_after).toISOString()}`,\n\t\t\t);\n\t\t}\n\n\t\t// First, make sure all our shards are spawned\n\t\tawait this.updateShardCount(shardCount);\n\t\tawait this.strategy.connect();\n\t}\n\n\tpublic destroy(options?: Omit<WebSocketShardDestroyOptions, 'recover'>) {\n\t\treturn this.strategy.destroy(options);\n\t}\n\n\tpublic send(shardId: number, payload: GatewaySendPayload) {\n\t\treturn this.strategy.send(shardId, payload);\n\t}\n\n\tpublic fetchStatus() {\n\t\treturn this.strategy.fetchStatus();\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACkCA,eAAsB,iCAAiC,SAA6D;AAEnH,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACJ,IAAI,QAAQ;AAGZ,SAAO;AAAA,IACN,GAAG;AAAA,IACH,oBAAoB,MAAM,QAAQ,wBAAwB;AAAA,IAC1D,YAAY,MAAM,QAAQ,cAAc;AAAA,EACzC;AACD;AAnBsB;;;AC9Bf,IAAM,gCAAN,MAAM,+BAAkE;AAAA,EAiBvE,YAA6B,SAA2C,SAAkC;AAA7E;AAA2C;AAAA,EAAmC;AAAA,EArBnH,OAI+E;AAAA;AAAA;AAAA;AAAA;AAAA,EAG9E,OAAe,iBAAiB,oBAAI,QAA8C;AAAA,EAElF,aAAqB,gBAAgB,SAAwD;AAC5F,UAAM,YAAY,+BAA8B,eAAe,IAAI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AAC5B,aAAO,KAAK;AAAA,IACb;AAEA,QAAI;AACJ,QAAI,KAAK,QAAQ,UAAU;AAC1B,UAAI,MAAM,QAAQ,KAAK,QAAQ,QAAQ,GAAG;AACzC,mBAAW,KAAK,QAAQ;AAAA,MACzB,OAAO;AACN,cAAM,EAAE,OAAO,IAAI,IAAI,KAAK,QAAQ;AACpC,mBAAW,CAAC,OAAG,oBAAM,EAAE,OAAO,KAAK,MAAM,EAAE,CAAC,CAAC;AAAA,MAC9C;AAAA,IACD,OAAO;AACN,YAAM,OAAO,MAAM,KAAK,wBAAwB;AAChD,iBAAW,CAAC,OAAG,oBAAM,KAAK,QAAQ,cAAc,KAAK,MAAM,CAAC;AAAA,IAC7D;AAEA,SAAK,WAAW;AAChB,WAAO;AAAA,EACR;AAAA,EAEA,MAAa,UAAU;AACtB,UAAM,aAAa,MAAM,KAAK,cAAc;AAE5C,UAAM,OAAO,MAAM,KAAK,wBAAwB;AAChD,QAAI,KAAK,oBAAoB,YAAY,YAAY;AACpD,YAAM,IAAI;AAAA,QACT,0CAA0C,UAAU,iBACnD,KAAK,oBAAoB,SAC1B,yBAAyB,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,oBAAoB,WAAW,EAAE,YAAY,CAAC;AAAA,MACnG;AAAA,IACD;AAGA,UAAM,KAAK,iBAAiB,UAAU;AACtC,UAAM,KAAK,SAAS,QAAQ;AAAA,EAC7B;AAAA,EAEO,QAAQ,SAAyD;AACvE,WAAO,KAAK,SAAS,QAAQ,OAAO;AAAA,EACrC;AAAA,EAEO,KAAK,SAAiB,SAA6B;AACzD,WAAO,KAAK,SAAS,KAAK,SAAS,OAAO;AAAA,EAC3C;AAAA,EAEO,cAAc;AACpB,WAAO,KAAK,SAAS,YAAY;AAAA,EAClC;AACD;;;AV3SO,IAAM,UAAU;","names":["import_node_worker_threads","import_collection","WorkerSendPayloadOp","WorkerReceivePayloadOp","workerData","resolve","resolve","payload","import_collection","import_node_events","import_promises","import_collection","import_util","import_async_queue","import_v10","import_collection","import_collection","sleep","Encoding","CompressionMethod","process","WebSocketShardEvents","WebSocketShardStatus","WebSocketShardDestroyRecovery","CloseCodes","version","resolve","sleep","session","import_node_worker_threads","import_collection","import_util","import_async_event_emitter","import_v10"]} \ No newline at end of file
diff --git a/node_modules/@discordjs/ws/dist/index.mjs b/node_modules/@discordjs/ws/dist/index.mjs
new file mode 100644
index 0000000..56e44e6
--- /dev/null
+++ b/node_modules/@discordjs/ws/dist/index.mjs
@@ -0,0 +1,1446 @@
+var __defProp = Object.defineProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
+}) : x)(function(x) {
+ if (typeof require !== "undefined")
+ return require.apply(this, arguments);
+ throw Error('Dynamic require of "' + x + '" is not supported');
+});
+
+// ../../node_modules/tsup/assets/esm_shims.js
+import { fileURLToPath } from "url";
+import path from "path";
+var getFilename = /* @__PURE__ */ __name(() => fileURLToPath(import.meta.url), "getFilename");
+var getDirname = /* @__PURE__ */ __name(() => path.dirname(getFilename()), "getDirname");
+var __dirname = /* @__PURE__ */ getDirname();
+
+// src/strategies/context/IContextFetchingStrategy.ts
+async function managerToFetchingStrategyOptions(manager) {
+ const {
+ buildIdentifyThrottler,
+ buildStrategy,
+ retrieveSessionInfo,
+ updateSessionInfo,
+ shardCount,
+ shardIds,
+ rest,
+ ...managerOptions
+ } = manager.options;
+ return {
+ ...managerOptions,
+ gatewayInformation: await manager.fetchGatewayInformation(),
+ shardCount: await manager.getShardCount()
+ };
+}
+__name(managerToFetchingStrategyOptions, "managerToFetchingStrategyOptions");
+
+// src/strategies/context/SimpleContextFetchingStrategy.ts
+var SimpleContextFetchingStrategy = class _SimpleContextFetchingStrategy {
+ constructor(manager, options) {
+ this.manager = manager;
+ this.options = options;
+ }
+ static {
+ __name(this, "SimpleContextFetchingStrategy");
+ }
+ // This strategy assumes every shard is running under the same process - therefore we need a single
+ // IdentifyThrottler per manager.
+ static throttlerCache = /* @__PURE__ */ new WeakMap();
+ static async ensureThrottler(manager) {
+ const throttler = _SimpleContextFetchingStrategy.throttlerCache.get(manager);
+ if (throttler) {
+ return throttler;
+ }
+ const newThrottler = await manager.options.buildIdentifyThrottler(manager);
+ _SimpleContextFetchingStrategy.throttlerCache.set(manager, newThrottler);
+ return newThrottler;
+ }
+ async retrieveSessionInfo(shardId) {
+ return this.manager.options.retrieveSessionInfo(shardId);
+ }
+ updateSessionInfo(shardId, sessionInfo) {
+ return this.manager.options.updateSessionInfo(shardId, sessionInfo);
+ }
+ async waitForIdentify(shardId, signal) {
+ const throttler = await _SimpleContextFetchingStrategy.ensureThrottler(this.manager);
+ await throttler.waitForIdentify(shardId, signal);
+ }
+};
+
+// src/strategies/context/WorkerContextFetchingStrategy.ts
+import { isMainThread, parentPort } from "node:worker_threads";
+import { Collection as Collection2 } from "@discordjs/collection";
+
+// src/strategies/sharding/WorkerShardingStrategy.ts
+import { once } from "node:events";
+import { join, isAbsolute, resolve } from "node:path";
+import { Worker } from "node:worker_threads";
+import { Collection } from "@discordjs/collection";
+var WorkerSendPayloadOp = /* @__PURE__ */ ((WorkerSendPayloadOp2) => {
+ WorkerSendPayloadOp2[WorkerSendPayloadOp2["Connect"] = 0] = "Connect";
+ WorkerSendPayloadOp2[WorkerSendPayloadOp2["Destroy"] = 1] = "Destroy";
+ WorkerSendPayloadOp2[WorkerSendPayloadOp2["Send"] = 2] = "Send";
+ WorkerSendPayloadOp2[WorkerSendPayloadOp2["SessionInfoResponse"] = 3] = "SessionInfoResponse";
+ WorkerSendPayloadOp2[WorkerSendPayloadOp2["ShardIdentifyResponse"] = 4] = "ShardIdentifyResponse";
+ WorkerSendPayloadOp2[WorkerSendPayloadOp2["FetchStatus"] = 5] = "FetchStatus";
+ return WorkerSendPayloadOp2;
+})(WorkerSendPayloadOp || {});
+var WorkerReceivePayloadOp = /* @__PURE__ */ ((WorkerReceivePayloadOp2) => {
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["Connected"] = 0] = "Connected";
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["Destroyed"] = 1] = "Destroyed";
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["Event"] = 2] = "Event";
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["RetrieveSessionInfo"] = 3] = "RetrieveSessionInfo";
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["UpdateSessionInfo"] = 4] = "UpdateSessionInfo";
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["WaitForIdentify"] = 5] = "WaitForIdentify";
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["FetchStatusResponse"] = 6] = "FetchStatusResponse";
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["WorkerReady"] = 7] = "WorkerReady";
+ WorkerReceivePayloadOp2[WorkerReceivePayloadOp2["CancelIdentify"] = 8] = "CancelIdentify";
+ return WorkerReceivePayloadOp2;
+})(WorkerReceivePayloadOp || {});
+var WorkerShardingStrategy = class {
+ static {
+ __name(this, "WorkerShardingStrategy");
+ }
+ manager;
+ options;
+ #workers = [];
+ #workerByShardId = new Collection();
+ connectPromises = new Collection();
+ destroyPromises = new Collection();
+ fetchStatusPromises = new Collection();
+ waitForIdentifyControllers = new Collection();
+ throttler;
+ constructor(manager, options) {
+ this.manager = manager;
+ this.options = options;
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.spawn}
+ */
+ async spawn(shardIds) {
+ const shardsPerWorker = this.options.shardsPerWorker === "all" ? shardIds.length : this.options.shardsPerWorker;
+ const strategyOptions = await managerToFetchingStrategyOptions(this.manager);
+ const loops = Math.ceil(shardIds.length / shardsPerWorker);
+ const promises = [];
+ for (let idx = 0; idx < loops; idx++) {
+ const slice = shardIds.slice(idx * shardsPerWorker, (idx + 1) * shardsPerWorker);
+ const workerData2 = {
+ ...strategyOptions,
+ shardIds: slice
+ };
+ promises.push(this.setupWorker(workerData2));
+ }
+ await Promise.all(promises);
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.connect}
+ */
+ async connect() {
+ const promises = [];
+ for (const [shardId, worker] of this.#workerByShardId.entries()) {
+ const payload = {
+ op: 0 /* Connect */,
+ shardId
+ };
+ const promise = new Promise((resolve2) => this.connectPromises.set(shardId, resolve2));
+ worker.postMessage(payload);
+ promises.push(promise);
+ }
+ await Promise.all(promises);
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.destroy}
+ */
+ async destroy(options = {}) {
+ const promises = [];
+ for (const [shardId, worker] of this.#workerByShardId.entries()) {
+ const payload = {
+ op: 1 /* Destroy */,
+ shardId,
+ options
+ };
+ promises.push(
+ // eslint-disable-next-line no-promise-executor-return, promise/prefer-await-to-then
+ new Promise((resolve2) => this.destroyPromises.set(shardId, resolve2)).then(async () => worker.terminate())
+ );
+ worker.postMessage(payload);
+ }
+ this.#workers = [];
+ this.#workerByShardId.clear();
+ await Promise.all(promises);
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.send}
+ */
+ send(shardId, data) {
+ const worker = this.#workerByShardId.get(shardId);
+ if (!worker) {
+ throw new Error(`No worker found for shard ${shardId}`);
+ }
+ const payload = {
+ op: 2 /* Send */,
+ shardId,
+ payload: data
+ };
+ worker.postMessage(payload);
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.fetchStatus}
+ */
+ async fetchStatus() {
+ const statuses = new Collection();
+ for (const [shardId, worker] of this.#workerByShardId.entries()) {
+ const nonce = Math.random();
+ const payload = {
+ op: 5 /* FetchStatus */,
+ shardId,
+ nonce
+ };
+ const promise = new Promise((resolve2) => this.fetchStatusPromises.set(nonce, resolve2));
+ worker.postMessage(payload);
+ const status = await promise;
+ statuses.set(shardId, status);
+ }
+ return statuses;
+ }
+ async setupWorker(workerData2) {
+ const worker = new Worker(this.resolveWorkerPath(), { workerData: workerData2 });
+ await once(worker, "online");
+ await this.waitForWorkerReady(worker);
+ worker.on("error", (err) => {
+ throw err;
+ }).on("messageerror", (err) => {
+ throw err;
+ }).on("message", async (payload) => this.onMessage(worker, payload));
+ this.#workers.push(worker);
+ for (const shardId of workerData2.shardIds) {
+ this.#workerByShardId.set(shardId, worker);
+ }
+ }
+ resolveWorkerPath() {
+ const path2 = this.options.workerPath;
+ if (!path2) {
+ return join(__dirname, "defaultWorker.js");
+ }
+ if (isAbsolute(path2)) {
+ return path2;
+ }
+ if (/^\.\.?[/\\]/.test(path2)) {
+ return resolve(path2);
+ }
+ try {
+ return __require.resolve(path2);
+ } catch {
+ return resolve(path2);
+ }
+ }
+ async waitForWorkerReady(worker) {
+ return new Promise((resolve2) => {
+ const handler = /* @__PURE__ */ __name((payload) => {
+ if (payload.op === 7 /* WorkerReady */) {
+ resolve2();
+ worker.off("message", handler);
+ }
+ }, "handler");
+ worker.on("message", handler);
+ });
+ }
+ async onMessage(worker, payload) {
+ switch (payload.op) {
+ case 0 /* Connected */: {
+ this.connectPromises.get(payload.shardId)?.();
+ this.connectPromises.delete(payload.shardId);
+ break;
+ }
+ case 1 /* Destroyed */: {
+ this.destroyPromises.get(payload.shardId)?.();
+ this.destroyPromises.delete(payload.shardId);
+ break;
+ }
+ case 2 /* Event */: {
+ this.manager.emit(payload.event, { ...payload.data, shardId: payload.shardId });
+ break;
+ }
+ case 3 /* RetrieveSessionInfo */: {
+ const session = await this.manager.options.retrieveSessionInfo(payload.shardId);
+ const response = {
+ op: 3 /* SessionInfoResponse */,
+ nonce: payload.nonce,
+ session
+ };
+ worker.postMessage(response);
+ break;
+ }
+ case 4 /* UpdateSessionInfo */: {
+ await this.manager.options.updateSessionInfo(payload.shardId, payload.session);
+ break;
+ }
+ case 5 /* WaitForIdentify */: {
+ const throttler = await this.ensureThrottler();
+ try {
+ const controller = new AbortController();
+ this.waitForIdentifyControllers.set(payload.nonce, controller);
+ await throttler.waitForIdentify(payload.shardId, controller.signal);
+ } catch {
+ return;
+ }
+ const response = {
+ op: 4 /* ShardIdentifyResponse */,
+ nonce: payload.nonce,
+ ok: true
+ };
+ worker.postMessage(response);
+ break;
+ }
+ case 6 /* FetchStatusResponse */: {
+ this.fetchStatusPromises.get(payload.nonce)?.(payload.status);
+ this.fetchStatusPromises.delete(payload.nonce);
+ break;
+ }
+ case 7 /* WorkerReady */: {
+ break;
+ }
+ case 8 /* CancelIdentify */: {
+ this.waitForIdentifyControllers.get(payload.nonce)?.abort();
+ this.waitForIdentifyControllers.delete(payload.nonce);
+ const response = {
+ op: 4 /* ShardIdentifyResponse */,
+ nonce: payload.nonce,
+ ok: false
+ };
+ worker.postMessage(response);
+ break;
+ }
+ }
+ }
+ async ensureThrottler() {
+ this.throttler ??= await this.manager.options.buildIdentifyThrottler(this.manager);
+ return this.throttler;
+ }
+};
+
+// src/strategies/context/WorkerContextFetchingStrategy.ts
+var WorkerContextFetchingStrategy = class {
+ constructor(options) {
+ this.options = options;
+ if (isMainThread) {
+ throw new Error("Cannot instantiate WorkerContextFetchingStrategy on the main thread");
+ }
+ parentPort.on("message", (payload) => {
+ if (payload.op === 3 /* SessionInfoResponse */) {
+ this.sessionPromises.get(payload.nonce)?.(payload.session);
+ this.sessionPromises.delete(payload.nonce);
+ }
+ if (payload.op === 4 /* ShardIdentifyResponse */) {
+ const promise = this.waitForIdentifyPromises.get(payload.nonce);
+ if (payload.ok) {
+ promise?.resolve();
+ } else {
+ promise?.reject(promise.signal.reason);
+ }
+ this.waitForIdentifyPromises.delete(payload.nonce);
+ }
+ });
+ }
+ static {
+ __name(this, "WorkerContextFetchingStrategy");
+ }
+ sessionPromises = new Collection2();
+ waitForIdentifyPromises = new Collection2();
+ async retrieveSessionInfo(shardId) {
+ const nonce = Math.random();
+ const payload = {
+ op: 3 /* RetrieveSessionInfo */,
+ shardId,
+ nonce
+ };
+ const promise = new Promise((resolve2) => this.sessionPromises.set(nonce, resolve2));
+ parentPort.postMessage(payload);
+ return promise;
+ }
+ updateSessionInfo(shardId, sessionInfo) {
+ const payload = {
+ op: 4 /* UpdateSessionInfo */,
+ shardId,
+ session: sessionInfo
+ };
+ parentPort.postMessage(payload);
+ }
+ async waitForIdentify(shardId, signal) {
+ const nonce = Math.random();
+ const payload = {
+ op: 5 /* WaitForIdentify */,
+ nonce,
+ shardId
+ };
+ const promise = new Promise(
+ (resolve2, reject) => (
+ // eslint-disable-next-line no-promise-executor-return
+ this.waitForIdentifyPromises.set(nonce, { signal, resolve: resolve2, reject })
+ )
+ );
+ parentPort.postMessage(payload);
+ const listener = /* @__PURE__ */ __name(() => {
+ const payload2 = {
+ op: 8 /* CancelIdentify */,
+ nonce
+ };
+ parentPort.postMessage(payload2);
+ }, "listener");
+ signal.addEventListener("abort", listener);
+ try {
+ await promise;
+ } finally {
+ signal.removeEventListener("abort", listener);
+ }
+ }
+};
+
+// src/strategies/sharding/SimpleShardingStrategy.ts
+import { Collection as Collection6 } from "@discordjs/collection";
+
+// src/ws/WebSocketShard.ts
+import { Buffer as Buffer2 } from "node:buffer";
+import { once as once2 } from "node:events";
+import { clearInterval, clearTimeout, setInterval, setTimeout } from "node:timers";
+import { setTimeout as sleep2 } from "node:timers/promises";
+import { URLSearchParams } from "node:url";
+import { TextDecoder } from "node:util";
+import { inflate } from "node:zlib";
+import { Collection as Collection5 } from "@discordjs/collection";
+import { lazy as lazy2 } from "@discordjs/util";
+import { AsyncQueue as AsyncQueue2 } from "@sapphire/async-queue";
+import { AsyncEventEmitter } from "@vladfrangu/async_event_emitter";
+import {
+ GatewayCloseCodes,
+ GatewayDispatchEvents,
+ GatewayOpcodes as GatewayOpcodes2
+} from "discord-api-types/v10";
+import { WebSocket } from "ws";
+
+// src/utils/constants.ts
+import process from "node:process";
+import { Collection as Collection4 } from "@discordjs/collection";
+import { lazy } from "@discordjs/util";
+import { APIVersion, GatewayOpcodes } from "discord-api-types/v10";
+
+// src/throttling/SimpleIdentifyThrottler.ts
+import { setTimeout as sleep } from "node:timers/promises";
+import { Collection as Collection3 } from "@discordjs/collection";
+import { AsyncQueue } from "@sapphire/async-queue";
+var SimpleIdentifyThrottler = class {
+ constructor(maxConcurrency) {
+ this.maxConcurrency = maxConcurrency;
+ }
+ static {
+ __name(this, "SimpleIdentifyThrottler");
+ }
+ states = new Collection3();
+ /**
+ * {@inheritDoc IIdentifyThrottler.waitForIdentify}
+ */
+ async waitForIdentify(shardId, signal) {
+ const key = shardId % this.maxConcurrency;
+ const state = this.states.ensure(key, () => {
+ return {
+ queue: new AsyncQueue(),
+ resetsAt: Number.POSITIVE_INFINITY
+ };
+ });
+ await state.queue.wait({ signal });
+ try {
+ const diff = state.resetsAt - Date.now();
+ if (diff <= 5e3) {
+ const time = diff + Math.random() * 1500;
+ await sleep(time);
+ }
+ state.resetsAt = Date.now() + 5e3;
+ } finally {
+ state.queue.shift();
+ }
+ }
+};
+
+// src/utils/constants.ts
+var Encoding = /* @__PURE__ */ ((Encoding2) => {
+ Encoding2["JSON"] = "json";
+ return Encoding2;
+})(Encoding || {});
+var CompressionMethod = /* @__PURE__ */ ((CompressionMethod2) => {
+ CompressionMethod2["ZlibStream"] = "zlib-stream";
+ return CompressionMethod2;
+})(CompressionMethod || {});
+var DefaultDeviceProperty = `@discordjs/ws 1.0.1`;
+var getDefaultSessionStore = lazy(() => new Collection4());
+var DefaultWebSocketManagerOptions = {
+ async buildIdentifyThrottler(manager) {
+ const info = await manager.fetchGatewayInformation();
+ return new SimpleIdentifyThrottler(info.session_start_limit.max_concurrency);
+ },
+ buildStrategy: (manager) => new SimpleShardingStrategy(manager),
+ shardCount: null,
+ shardIds: null,
+ largeThreshold: null,
+ initialPresence: null,
+ identifyProperties: {
+ browser: DefaultDeviceProperty,
+ device: DefaultDeviceProperty,
+ os: process.platform
+ },
+ version: APIVersion,
+ encoding: "json" /* JSON */,
+ compression: null,
+ retrieveSessionInfo(shardId) {
+ const store = getDefaultSessionStore();
+ return store.get(shardId) ?? null;
+ },
+ updateSessionInfo(shardId, info) {
+ const store = getDefaultSessionStore();
+ if (info) {
+ store.set(shardId, info);
+ } else {
+ store.delete(shardId);
+ }
+ },
+ handshakeTimeout: 3e4,
+ helloTimeout: 6e4,
+ readyTimeout: 15e3
+};
+var ImportantGatewayOpcodes = /* @__PURE__ */ new Set([
+ GatewayOpcodes.Heartbeat,
+ GatewayOpcodes.Identify,
+ GatewayOpcodes.Resume
+]);
+function getInitialSendRateLimitState() {
+ return {
+ remaining: 120,
+ resetAt: Date.now() + 6e4
+ };
+}
+__name(getInitialSendRateLimitState, "getInitialSendRateLimitState");
+
+// src/ws/WebSocketShard.ts
+var getZlibSync = lazy2(async () => import("zlib-sync").then((mod) => mod.default).catch(() => null));
+var WebSocketShardEvents = /* @__PURE__ */ ((WebSocketShardEvents2) => {
+ WebSocketShardEvents2["Closed"] = "closed";
+ WebSocketShardEvents2["Debug"] = "debug";
+ WebSocketShardEvents2["Dispatch"] = "dispatch";
+ WebSocketShardEvents2["Error"] = "error";
+ WebSocketShardEvents2["HeartbeatComplete"] = "heartbeat";
+ WebSocketShardEvents2["Hello"] = "hello";
+ WebSocketShardEvents2["Ready"] = "ready";
+ WebSocketShardEvents2["Resumed"] = "resumed";
+ return WebSocketShardEvents2;
+})(WebSocketShardEvents || {});
+var WebSocketShardStatus = /* @__PURE__ */ ((WebSocketShardStatus2) => {
+ WebSocketShardStatus2[WebSocketShardStatus2["Idle"] = 0] = "Idle";
+ WebSocketShardStatus2[WebSocketShardStatus2["Connecting"] = 1] = "Connecting";
+ WebSocketShardStatus2[WebSocketShardStatus2["Resuming"] = 2] = "Resuming";
+ WebSocketShardStatus2[WebSocketShardStatus2["Ready"] = 3] = "Ready";
+ return WebSocketShardStatus2;
+})(WebSocketShardStatus || {});
+var WebSocketShardDestroyRecovery = /* @__PURE__ */ ((WebSocketShardDestroyRecovery2) => {
+ WebSocketShardDestroyRecovery2[WebSocketShardDestroyRecovery2["Reconnect"] = 0] = "Reconnect";
+ WebSocketShardDestroyRecovery2[WebSocketShardDestroyRecovery2["Resume"] = 1] = "Resume";
+ return WebSocketShardDestroyRecovery2;
+})(WebSocketShardDestroyRecovery || {});
+var CloseCodes = /* @__PURE__ */ ((CloseCodes2) => {
+ CloseCodes2[CloseCodes2["Normal"] = 1e3] = "Normal";
+ CloseCodes2[CloseCodes2["Resuming"] = 4200] = "Resuming";
+ return CloseCodes2;
+})(CloseCodes || {});
+var WebSocketConstructor = WebSocket;
+var WebSocketShard = class extends AsyncEventEmitter {
+ static {
+ __name(this, "WebSocketShard");
+ }
+ connection = null;
+ useIdentifyCompress = false;
+ inflate = null;
+ textDecoder = new TextDecoder();
+ replayedEvents = 0;
+ isAck = true;
+ sendRateLimitState = getInitialSendRateLimitState();
+ initialHeartbeatTimeoutController = null;
+ heartbeatInterval = null;
+ lastHeartbeatAt = -1;
+ // Indicates whether the shard has already resolved its original connect() call
+ initialConnectResolved = false;
+ // Indicates if we failed to connect to the ws url (ECONNREFUSED/ECONNRESET)
+ failedToConnectDueToNetworkError = false;
+ sendQueue = new AsyncQueue2();
+ timeoutAbortControllers = new Collection5();
+ strategy;
+ id;
+ #status = 0 /* Idle */;
+ get status() {
+ return this.#status;
+ }
+ constructor(strategy, id) {
+ super();
+ this.strategy = strategy;
+ this.id = id;
+ }
+ async connect() {
+ const controller = new AbortController();
+ let promise;
+ if (!this.initialConnectResolved) {
+ promise = Promise.race([
+ once2(this, "ready" /* Ready */, { signal: controller.signal }),
+ once2(this, "resumed" /* Resumed */, { signal: controller.signal })
+ ]);
+ }
+ void this.internalConnect();
+ try {
+ await promise;
+ } catch ({ error }) {
+ throw error;
+ } finally {
+ controller.abort();
+ }
+ this.initialConnectResolved = true;
+ }
+ async internalConnect() {
+ if (this.#status !== 0 /* Idle */) {
+ throw new Error("Tried to connect a shard that wasn't idle");
+ }
+ const { version: version2, encoding, compression } = this.strategy.options;
+ const params = new URLSearchParams({ v: version2, encoding });
+ if (compression) {
+ const zlib = await getZlibSync();
+ if (zlib) {
+ params.append("compress", compression);
+ this.inflate = new zlib.Inflate({
+ chunkSize: 65535,
+ to: "string"
+ });
+ } else if (!this.useIdentifyCompress) {
+ this.useIdentifyCompress = true;
+ console.warn(
+ "WebSocketShard: Compression is enabled but zlib-sync is not installed, falling back to identify compress"
+ );
+ }
+ }
+ const session = await this.strategy.retrieveSessionInfo(this.id);
+ const url = `${session?.resumeURL ?? this.strategy.options.gatewayInformation.url}?${params.toString()}`;
+ this.debug([`Connecting to ${url}`]);
+ const connection = new WebSocketConstructor(url, {
+ handshakeTimeout: this.strategy.options.handshakeTimeout ?? void 0
+ });
+ connection.binaryType = "arraybuffer";
+ connection.onmessage = (event) => {
+ void this.onMessage(event.data, event.data instanceof ArrayBuffer);
+ };
+ connection.onerror = (event) => {
+ this.onError(event.error);
+ };
+ connection.onclose = (event) => {
+ void this.onClose(event.code);
+ };
+ this.connection = connection;
+ this.#status = 1 /* Connecting */;
+ this.sendRateLimitState = getInitialSendRateLimitState();
+ const { ok } = await this.waitForEvent("hello" /* Hello */, this.strategy.options.helloTimeout);
+ if (!ok) {
+ return;
+ }
+ if (session?.shardCount === this.strategy.options.shardCount) {
+ await this.resume(session);
+ } else {
+ await this.identify();
+ }
+ }
+ async destroy(options = {}) {
+ if (this.#status === 0 /* Idle */) {
+ this.debug(["Tried to destroy a shard that was idle"]);
+ return;
+ }
+ if (!options.code) {
+ options.code = options.recover === 1 /* Resume */ ? 4200 /* Resuming */ : 1e3 /* Normal */;
+ }
+ this.debug([
+ "Destroying shard",
+ `Reason: ${options.reason ?? "none"}`,
+ `Code: ${options.code}`,
+ `Recover: ${options.recover === void 0 ? "none" : WebSocketShardDestroyRecovery[options.recover]}`
+ ]);
+ this.isAck = true;
+ if (this.heartbeatInterval) {
+ clearInterval(this.heartbeatInterval);
+ }
+ if (this.initialHeartbeatTimeoutController) {
+ this.initialHeartbeatTimeoutController.abort();
+ this.initialHeartbeatTimeoutController = null;
+ }
+ this.lastHeartbeatAt = -1;
+ for (const controller of this.timeoutAbortControllers.values()) {
+ controller.abort();
+ }
+ this.timeoutAbortControllers.clear();
+ this.failedToConnectDueToNetworkError = false;
+ if (options.recover !== 1 /* Resume */) {
+ await this.strategy.updateSessionInfo(this.id, null);
+ }
+ if (this.connection) {
+ this.connection.onmessage = null;
+ this.connection.onclose = null;
+ const shouldClose = this.connection.readyState === WebSocket.OPEN;
+ this.debug([
+ "Connection status during destroy",
+ `Needs closing: ${shouldClose}`,
+ `Ready state: ${this.connection.readyState}`
+ ]);
+ if (shouldClose) {
+ let outerResolve;
+ const promise = new Promise((resolve2) => {
+ outerResolve = resolve2;
+ });
+ this.connection.onclose = outerResolve;
+ this.connection.close(options.code, options.reason);
+ await promise;
+ this.emit("closed" /* Closed */, { code: options.code });
+ }
+ this.connection.onerror = null;
+ } else {
+ this.debug(["Destroying a shard that has no connection; please open an issue on GitHub"]);
+ }
+ this.#status = 0 /* Idle */;
+ if (options.recover !== void 0) {
+ await sleep2(500);
+ return this.internalConnect();
+ }
+ }
+ async waitForEvent(event, timeoutDuration) {
+ this.debug([`Waiting for event ${event} ${timeoutDuration ? `for ${timeoutDuration}ms` : "indefinitely"}`]);
+ const timeoutController = new AbortController();
+ const timeout = timeoutDuration ? setTimeout(() => timeoutController.abort(), timeoutDuration).unref() : null;
+ this.timeoutAbortControllers.set(event, timeoutController);
+ const closeController = new AbortController();
+ try {
+ const closed = await Promise.race([
+ once2(this, event, { signal: timeoutController.signal }).then(() => false),
+ once2(this, "closed" /* Closed */, { signal: closeController.signal }).then(() => true)
+ ]);
+ return { ok: !closed };
+ } catch {
+ void this.destroy({
+ code: 1e3 /* Normal */,
+ reason: "Something timed out or went wrong while waiting for an event",
+ recover: 0 /* Reconnect */
+ });
+ return { ok: false };
+ } finally {
+ if (timeout) {
+ clearTimeout(timeout);
+ }
+ this.timeoutAbortControllers.delete(event);
+ if (!closeController.signal.aborted) {
+ closeController.abort();
+ }
+ }
+ }
+ async send(payload) {
+ if (!this.connection) {
+ throw new Error("WebSocketShard wasn't connected");
+ }
+ if (this.#status !== 3 /* Ready */ && !ImportantGatewayOpcodes.has(payload.op)) {
+ this.debug(["Tried to send a non-crucial payload before the shard was ready, waiting"]);
+ try {
+ await once2(this, "ready" /* Ready */);
+ } catch {
+ return this.send(payload);
+ }
+ }
+ await this.sendQueue.wait();
+ if (--this.sendRateLimitState.remaining <= 0) {
+ const now = Date.now();
+ if (this.sendRateLimitState.resetAt > now) {
+ const sleepFor = this.sendRateLimitState.resetAt - now;
+ this.debug([`Was about to hit the send rate limit, sleeping for ${sleepFor}ms`]);
+ const controller = new AbortController();
+ const interrupted = await Promise.race([
+ sleep2(sleepFor).then(() => false),
+ once2(this, "closed" /* Closed */, { signal: controller.signal }).then(() => true)
+ ]);
+ if (interrupted) {
+ this.debug(["Connection closed while waiting for the send rate limit to reset, re-queueing payload"]);
+ this.sendQueue.shift();
+ return this.send(payload);
+ }
+ controller.abort();
+ }
+ this.sendRateLimitState = getInitialSendRateLimitState();
+ }
+ this.sendQueue.shift();
+ this.connection.send(JSON.stringify(payload));
+ }
+ async identify() {
+ this.debug(["Waiting for identify throttle"]);
+ const controller = new AbortController();
+ const closeHandler = /* @__PURE__ */ __name(() => {
+ controller.abort();
+ }, "closeHandler");
+ this.on("closed" /* Closed */, closeHandler);
+ try {
+ await this.strategy.waitForIdentify(this.id, controller.signal);
+ } catch {
+ if (controller.signal.aborted) {
+ this.debug(["Was waiting for an identify, but the shard closed in the meantime"]);
+ return;
+ }
+ this.debug([
+ "IContextFetchingStrategy#waitForIdentify threw an unknown error.",
+ "If you're using a custom strategy, this is probably nothing to worry about.",
+ "If you're not, please open an issue on GitHub."
+ ]);
+ await this.destroy({
+ reason: "Identify throttling logic failed",
+ recover: 1 /* Resume */
+ });
+ } finally {
+ this.off("closed" /* Closed */, closeHandler);
+ }
+ this.debug([
+ "Identifying",
+ `shard id: ${this.id.toString()}`,
+ `shard count: ${this.strategy.options.shardCount}`,
+ `intents: ${this.strategy.options.intents}`,
+ `compression: ${this.inflate ? "zlib-stream" : this.useIdentifyCompress ? "identify" : "none"}`
+ ]);
+ const d = {
+ token: this.strategy.options.token,
+ properties: this.strategy.options.identifyProperties,
+ intents: this.strategy.options.intents,
+ compress: this.useIdentifyCompress,
+ shard: [this.id, this.strategy.options.shardCount]
+ };
+ if (this.strategy.options.largeThreshold) {
+ d.large_threshold = this.strategy.options.largeThreshold;
+ }
+ if (this.strategy.options.initialPresence) {
+ d.presence = this.strategy.options.initialPresence;
+ }
+ await this.send({
+ op: GatewayOpcodes2.Identify,
+ d
+ });
+ await this.waitForEvent("ready" /* Ready */, this.strategy.options.readyTimeout);
+ }
+ async resume(session) {
+ this.debug([
+ "Resuming session",
+ `resume url: ${session.resumeURL}`,
+ `sequence: ${session.sequence}`,
+ `shard id: ${this.id.toString()}`
+ ]);
+ this.#status = 2 /* Resuming */;
+ this.replayedEvents = 0;
+ return this.send({
+ op: GatewayOpcodes2.Resume,
+ d: {
+ token: this.strategy.options.token,
+ seq: session.sequence,
+ session_id: session.sessionId
+ }
+ });
+ }
+ async heartbeat(requested = false) {
+ if (!this.isAck && !requested) {
+ return this.destroy({ reason: "Zombie connection", recover: 1 /* Resume */ });
+ }
+ const session = await this.strategy.retrieveSessionInfo(this.id);
+ await this.send({
+ op: GatewayOpcodes2.Heartbeat,
+ d: session?.sequence ?? null
+ });
+ this.lastHeartbeatAt = Date.now();
+ this.isAck = false;
+ }
+ async unpackMessage(data, isBinary) {
+ if (!isBinary) {
+ try {
+ return JSON.parse(data);
+ } catch {
+ return null;
+ }
+ }
+ const decompressable = new Uint8Array(data);
+ if (this.useIdentifyCompress) {
+ return new Promise((resolve2, reject) => {
+ inflate(decompressable, { chunkSize: 65535 }, (err, result) => {
+ if (err) {
+ reject(err);
+ return;
+ }
+ resolve2(JSON.parse(this.textDecoder.decode(result)));
+ });
+ });
+ }
+ if (this.inflate) {
+ const l = decompressable.length;
+ const flush = l >= 4 && decompressable[l - 4] === 0 && decompressable[l - 3] === 0 && decompressable[l - 2] === 255 && decompressable[l - 1] === 255;
+ const zlib = await getZlibSync();
+ this.inflate.push(Buffer2.from(decompressable), flush ? zlib.Z_SYNC_FLUSH : zlib.Z_NO_FLUSH);
+ if (this.inflate.err) {
+ this.emit("error" /* Error */, {
+ error: new Error(`${this.inflate.err}${this.inflate.msg ? `: ${this.inflate.msg}` : ""}`)
+ });
+ }
+ if (!flush) {
+ return null;
+ }
+ const { result } = this.inflate;
+ if (!result) {
+ return null;
+ }
+ return JSON.parse(typeof result === "string" ? result : this.textDecoder.decode(result));
+ }
+ this.debug([
+ "Received a message we were unable to decompress",
+ `isBinary: ${isBinary.toString()}`,
+ `useIdentifyCompress: ${this.useIdentifyCompress.toString()}`,
+ `inflate: ${Boolean(this.inflate).toString()}`
+ ]);
+ return null;
+ }
+ async onMessage(data, isBinary) {
+ const payload = await this.unpackMessage(data, isBinary);
+ if (!payload) {
+ return;
+ }
+ switch (payload.op) {
+ case GatewayOpcodes2.Dispatch: {
+ if (this.#status === 2 /* Resuming */) {
+ this.replayedEvents++;
+ }
+ switch (payload.t) {
+ case GatewayDispatchEvents.Ready: {
+ this.#status = 3 /* Ready */;
+ const session2 = {
+ sequence: payload.s,
+ sessionId: payload.d.session_id,
+ shardId: this.id,
+ shardCount: this.strategy.options.shardCount,
+ resumeURL: payload.d.resume_gateway_url
+ };
+ await this.strategy.updateSessionInfo(this.id, session2);
+ this.emit("ready" /* Ready */, { data: payload.d });
+ break;
+ }
+ case GatewayDispatchEvents.Resumed: {
+ this.#status = 3 /* Ready */;
+ this.debug([`Resumed and replayed ${this.replayedEvents} events`]);
+ this.emit("resumed" /* Resumed */);
+ break;
+ }
+ default: {
+ break;
+ }
+ }
+ const session = await this.strategy.retrieveSessionInfo(this.id);
+ if (session) {
+ if (payload.s > session.sequence) {
+ await this.strategy.updateSessionInfo(this.id, { ...session, sequence: payload.s });
+ }
+ } else {
+ this.debug([
+ `Received a ${payload.t} event but no session is available. Session information cannot be re-constructed in this state without a full reconnect`
+ ]);
+ }
+ this.emit("dispatch" /* Dispatch */, { data: payload });
+ break;
+ }
+ case GatewayOpcodes2.Heartbeat: {
+ await this.heartbeat(true);
+ break;
+ }
+ case GatewayOpcodes2.Reconnect: {
+ await this.destroy({
+ reason: "Told to reconnect by Discord",
+ recover: 1 /* Resume */
+ });
+ break;
+ }
+ case GatewayOpcodes2.InvalidSession: {
+ this.debug([`Invalid session; will attempt to resume: ${payload.d.toString()}`]);
+ const session = await this.strategy.retrieveSessionInfo(this.id);
+ if (payload.d && session) {
+ await this.resume(session);
+ } else {
+ await this.destroy({
+ reason: "Invalid session",
+ recover: 0 /* Reconnect */
+ });
+ }
+ break;
+ }
+ case GatewayOpcodes2.Hello: {
+ this.emit("hello" /* Hello */);
+ const jitter = Math.random();
+ const firstWait = Math.floor(payload.d.heartbeat_interval * jitter);
+ this.debug([`Preparing first heartbeat of the connection with a jitter of ${jitter}; waiting ${firstWait}ms`]);
+ try {
+ const controller = new AbortController();
+ this.initialHeartbeatTimeoutController = controller;
+ await sleep2(firstWait, void 0, { signal: controller.signal });
+ } catch {
+ this.debug(["Cancelled initial heartbeat due to #destroy being called"]);
+ return;
+ } finally {
+ this.initialHeartbeatTimeoutController = null;
+ }
+ await this.heartbeat();
+ this.debug([`First heartbeat sent, starting to beat every ${payload.d.heartbeat_interval}ms`]);
+ this.heartbeatInterval = setInterval(() => void this.heartbeat(), payload.d.heartbeat_interval);
+ break;
+ }
+ case GatewayOpcodes2.HeartbeatAck: {
+ this.isAck = true;
+ const ackAt = Date.now();
+ this.emit("heartbeat" /* HeartbeatComplete */, {
+ ackAt,
+ heartbeatAt: this.lastHeartbeatAt,
+ latency: ackAt - this.lastHeartbeatAt
+ });
+ break;
+ }
+ }
+ }
+ onError(error) {
+ if ("code" in error && ["ECONNRESET", "ECONNREFUSED"].includes(error.code)) {
+ this.debug(["Failed to connect to the gateway URL specified due to a network error"]);
+ this.failedToConnectDueToNetworkError = true;
+ return;
+ }
+ this.emit("error" /* Error */, { error });
+ }
+ async onClose(code) {
+ this.emit("closed" /* Closed */, { code });
+ switch (code) {
+ case 1e3 /* Normal */: {
+ return this.destroy({
+ code,
+ reason: "Got disconnected by Discord",
+ recover: 0 /* Reconnect */
+ });
+ }
+ case 4200 /* Resuming */: {
+ break;
+ }
+ case GatewayCloseCodes.UnknownError: {
+ this.debug([`An unknown error occurred: ${code}`]);
+ return this.destroy({ code, recover: 1 /* Resume */ });
+ }
+ case GatewayCloseCodes.UnknownOpcode: {
+ this.debug(["An invalid opcode was sent to Discord."]);
+ return this.destroy({ code, recover: 1 /* Resume */ });
+ }
+ case GatewayCloseCodes.DecodeError: {
+ this.debug(["An invalid payload was sent to Discord."]);
+ return this.destroy({ code, recover: 1 /* Resume */ });
+ }
+ case GatewayCloseCodes.NotAuthenticated: {
+ this.debug(["A request was somehow sent before the identify/resume payload."]);
+ return this.destroy({ code, recover: 0 /* Reconnect */ });
+ }
+ case GatewayCloseCodes.AuthenticationFailed: {
+ this.emit("error" /* Error */, {
+ error: new Error("Authentication failed")
+ });
+ return this.destroy({ code });
+ }
+ case GatewayCloseCodes.AlreadyAuthenticated: {
+ this.debug(["More than one auth payload was sent."]);
+ return this.destroy({ code, recover: 0 /* Reconnect */ });
+ }
+ case GatewayCloseCodes.InvalidSeq: {
+ this.debug(["An invalid sequence was sent."]);
+ return this.destroy({ code, recover: 0 /* Reconnect */ });
+ }
+ case GatewayCloseCodes.RateLimited: {
+ this.debug(["The WebSocket rate limit has been hit, this should never happen"]);
+ return this.destroy({ code, recover: 0 /* Reconnect */ });
+ }
+ case GatewayCloseCodes.SessionTimedOut: {
+ this.debug(["Session timed out."]);
+ return this.destroy({ code, recover: 1 /* Resume */ });
+ }
+ case GatewayCloseCodes.InvalidShard: {
+ this.emit("error" /* Error */, {
+ error: new Error("Invalid shard")
+ });
+ return this.destroy({ code });
+ }
+ case GatewayCloseCodes.ShardingRequired: {
+ this.emit("error" /* Error */, {
+ error: new Error("Sharding is required")
+ });
+ return this.destroy({ code });
+ }
+ case GatewayCloseCodes.InvalidAPIVersion: {
+ this.emit("error" /* Error */, {
+ error: new Error("Used an invalid API version")
+ });
+ return this.destroy({ code });
+ }
+ case GatewayCloseCodes.InvalidIntents: {
+ this.emit("error" /* Error */, {
+ error: new Error("Used invalid intents")
+ });
+ return this.destroy({ code });
+ }
+ case GatewayCloseCodes.DisallowedIntents: {
+ this.emit("error" /* Error */, {
+ error: new Error("Used disallowed intents")
+ });
+ return this.destroy({ code });
+ }
+ default: {
+ this.debug([
+ `The gateway closed with an unexpected code ${code}, attempting to ${this.failedToConnectDueToNetworkError ? "reconnect" : "resume"}.`
+ ]);
+ return this.destroy({
+ code,
+ recover: this.failedToConnectDueToNetworkError ? 0 /* Reconnect */ : 1 /* Resume */
+ });
+ }
+ }
+ }
+ debug(messages) {
+ const message = `${messages[0]}${messages.length > 1 ? `
+${messages.slice(1).map((m) => ` ${m}`).join("\n")}` : ""}`;
+ this.emit("debug" /* Debug */, { message });
+ }
+};
+
+// src/strategies/sharding/SimpleShardingStrategy.ts
+var SimpleShardingStrategy = class {
+ static {
+ __name(this, "SimpleShardingStrategy");
+ }
+ manager;
+ shards = new Collection6();
+ constructor(manager) {
+ this.manager = manager;
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.spawn}
+ */
+ async spawn(shardIds) {
+ const strategyOptions = await managerToFetchingStrategyOptions(this.manager);
+ for (const shardId of shardIds) {
+ const strategy = new SimpleContextFetchingStrategy(this.manager, strategyOptions);
+ const shard = new WebSocketShard(strategy, shardId);
+ for (const event of Object.values(WebSocketShardEvents)) {
+ shard.on(event, (payload) => this.manager.emit(event, { ...payload, shardId }));
+ }
+ this.shards.set(shardId, shard);
+ }
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.connect}
+ */
+ async connect() {
+ const promises = [];
+ for (const shard of this.shards.values()) {
+ promises.push(shard.connect());
+ }
+ await Promise.all(promises);
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.destroy}
+ */
+ async destroy(options) {
+ const promises = [];
+ for (const shard of this.shards.values()) {
+ promises.push(shard.destroy(options));
+ }
+ await Promise.all(promises);
+ this.shards.clear();
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.send}
+ */
+ async send(shardId, payload) {
+ const shard = this.shards.get(shardId);
+ if (!shard) {
+ throw new RangeError(`Shard ${shardId} not found`);
+ }
+ return shard.send(payload);
+ }
+ /**
+ * {@inheritDoc IShardingStrategy.fetchStatus}
+ */
+ async fetchStatus() {
+ return this.shards.mapValues((shard) => shard.status);
+ }
+};
+
+// src/utils/WorkerBootstrapper.ts
+import { isMainThread as isMainThread2, parentPort as parentPort2, workerData } from "node:worker_threads";
+import { Collection as Collection7 } from "@discordjs/collection";
+var WorkerBootstrapper = class {
+ static {
+ __name(this, "WorkerBootstrapper");
+ }
+ /**
+ * The data passed to the worker thread
+ */
+ data = workerData;
+ /**
+ * The shards that are managed by this worker
+ */
+ shards = new Collection7();
+ constructor() {
+ if (isMainThread2) {
+ throw new Error("Expected WorkerBootstrap to not be used within the main thread");
+ }
+ }
+ /**
+ * Helper method to initiate a shard's connection process
+ */
+ async connect(shardId) {
+ const shard = this.shards.get(shardId);
+ if (!shard) {
+ throw new RangeError(`Shard ${shardId} does not exist`);
+ }
+ await shard.connect();
+ }
+ /**
+ * Helper method to destroy a shard
+ */
+ async destroy(shardId, options) {
+ const shard = this.shards.get(shardId);
+ if (!shard) {
+ throw new RangeError(`Shard ${shardId} does not exist`);
+ }
+ await shard.destroy(options);
+ }
+ /**
+ * Helper method to attach event listeners to the parentPort
+ */
+ setupThreadEvents() {
+ parentPort2.on("messageerror", (err) => {
+ throw err;
+ }).on("message", async (payload) => {
+ switch (payload.op) {
+ case 0 /* Connect */: {
+ await this.connect(payload.shardId);
+ const response = {
+ op: 0 /* Connected */,
+ shardId: payload.shardId
+ };
+ parentPort2.postMessage(response);
+ break;
+ }
+ case 1 /* Destroy */: {
+ await this.destroy(payload.shardId, payload.options);
+ const response = {
+ op: 1 /* Destroyed */,
+ shardId: payload.shardId
+ };
+ parentPort2.postMessage(response);
+ break;
+ }
+ case 2 /* Send */: {
+ const shard = this.shards.get(payload.shardId);
+ if (!shard) {
+ throw new RangeError(`Shard ${payload.shardId} does not exist`);
+ }
+ await shard.send(payload.payload);
+ break;
+ }
+ case 3 /* SessionInfoResponse */: {
+ break;
+ }
+ case 4 /* ShardIdentifyResponse */: {
+ break;
+ }
+ case 5 /* FetchStatus */: {
+ const shard = this.shards.get(payload.shardId);
+ if (!shard) {
+ throw new Error(`Shard ${payload.shardId} does not exist`);
+ }
+ const response = {
+ op: 6 /* FetchStatusResponse */,
+ status: shard.status,
+ nonce: payload.nonce
+ };
+ parentPort2.postMessage(response);
+ break;
+ }
+ }
+ });
+ }
+ /**
+ * Bootstraps the worker thread with the provided options
+ */
+ async bootstrap(options = {}) {
+ for (const shardId of this.data.shardIds) {
+ const shard = new WebSocketShard(new WorkerContextFetchingStrategy(this.data), shardId);
+ for (const event of options.forwardEvents ?? Object.values(WebSocketShardEvents)) {
+ shard.on(event, (data) => {
+ const payload = {
+ op: 2 /* Event */,
+ event,
+ data,
+ shardId
+ };
+ parentPort2.postMessage(payload);
+ });
+ }
+ await options.shardCallback?.(shard);
+ this.shards.set(shardId, shard);
+ }
+ this.setupThreadEvents();
+ const message = {
+ op: 7 /* WorkerReady */
+ };
+ parentPort2.postMessage(message);
+ }
+};
+
+// src/ws/WebSocketManager.ts
+import { range } from "@discordjs/util";
+import { AsyncEventEmitter as AsyncEventEmitter2 } from "@vladfrangu/async_event_emitter";
+import {
+ Routes
+} from "discord-api-types/v10";
+var WebSocketManager = class extends AsyncEventEmitter2 {
+ static {
+ __name(this, "WebSocketManager");
+ }
+ /**
+ * The options being used by this manager
+ */
+ options;
+ /**
+ * Internal cache for a GET /gateway/bot result
+ */
+ gatewayInformation = null;
+ /**
+ * Internal cache for the shard ids
+ */
+ shardIds = null;
+ /**
+ * Strategy used to manage shards
+ *
+ * @defaultValue `SimpleShardingStrategy`
+ */
+ strategy;
+ constructor(options) {
+ super();
+ this.options = { ...DefaultWebSocketManagerOptions, ...options };
+ this.strategy = this.options.buildStrategy(this);
+ }
+ /**
+ * Fetches the gateway information from Discord - or returns it from cache if available
+ *
+ * @param force - Whether to ignore the cache and force a fresh fetch
+ */
+ async fetchGatewayInformation(force = false) {
+ if (this.gatewayInformation) {
+ if (this.gatewayInformation.expiresAt <= Date.now()) {
+ this.gatewayInformation = null;
+ } else if (!force) {
+ return this.gatewayInformation.data;
+ }
+ }
+ const data = await this.options.rest.get(Routes.gatewayBot());
+ this.gatewayInformation = { data, expiresAt: Date.now() + (data.session_start_limit.reset_after || 5e3) };
+ return this.gatewayInformation.data;
+ }
+ /**
+ * Updates your total shard count on-the-fly, spawning shards as needed
+ *
+ * @param shardCount - The new shard count to use
+ */
+ async updateShardCount(shardCount) {
+ await this.strategy.destroy({ reason: "User is adjusting their shards" });
+ this.options.shardCount = shardCount;
+ const shardIds = await this.getShardIds(true);
+ await this.strategy.spawn(shardIds);
+ return this;
+ }
+ /**
+ * Yields the total number of shards across for your bot, accounting for Discord recommendations
+ */
+ async getShardCount() {
+ if (this.options.shardCount) {
+ return this.options.shardCount;
+ }
+ const shardIds = await this.getShardIds();
+ return Math.max(...shardIds) + 1;
+ }
+ /**
+ * Yields the ids of the shards this manager should manage
+ */
+ async getShardIds(force = false) {
+ if (this.shardIds && !force) {
+ return this.shardIds;
+ }
+ let shardIds;
+ if (this.options.shardIds) {
+ if (Array.isArray(this.options.shardIds)) {
+ shardIds = this.options.shardIds;
+ } else {
+ const { start, end } = this.options.shardIds;
+ shardIds = [...range({ start, end: end + 1 })];
+ }
+ } else {
+ const data = await this.fetchGatewayInformation();
+ shardIds = [...range(this.options.shardCount ?? data.shards)];
+ }
+ this.shardIds = shardIds;
+ return shardIds;
+ }
+ async connect() {
+ const shardCount = await this.getShardCount();
+ const data = await this.fetchGatewayInformation();
+ if (data.session_start_limit.remaining < shardCount) {
+ throw new Error(
+ `Not enough sessions remaining to spawn ${shardCount} shards; only ${data.session_start_limit.remaining} remaining; resets at ${new Date(Date.now() + data.session_start_limit.reset_after).toISOString()}`
+ );
+ }
+ await this.updateShardCount(shardCount);
+ await this.strategy.connect();
+ }
+ destroy(options) {
+ return this.strategy.destroy(options);
+ }
+ send(shardId, payload) {
+ return this.strategy.send(shardId, payload);
+ }
+ fetchStatus() {
+ return this.strategy.fetchStatus();
+ }
+};
+
+// src/index.ts
+var version = "1.0.1";
+export {
+ CloseCodes,
+ CompressionMethod,
+ DefaultDeviceProperty,
+ DefaultWebSocketManagerOptions,
+ Encoding,
+ ImportantGatewayOpcodes,
+ SimpleContextFetchingStrategy,
+ SimpleIdentifyThrottler,
+ SimpleShardingStrategy,
+ WebSocketManager,
+ WebSocketShard,
+ WebSocketShardDestroyRecovery,
+ WebSocketShardEvents,
+ WebSocketShardStatus,
+ WorkerBootstrapper,
+ WorkerContextFetchingStrategy,
+ WorkerReceivePayloadOp,
+ WorkerSendPayloadOp,
+ WorkerShardingStrategy,
+ getInitialSendRateLimitState,
+ managerToFetchingStrategyOptions,
+ version
+};
+//# sourceMappingURL=index.mjs.map \ No newline at end of file
diff --git a/node_modules/@discordjs/ws/dist/index.mjs.map b/node_modules/@discordjs/ws/dist/index.mjs.map
new file mode 100644
index 0000000..5c18bd5
--- /dev/null
+++ b/node_modules/@discordjs/ws/dist/index.mjs.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../node_modules/tsup/assets/esm_shims.js","../src/strategies/context/IContextFetchingStrategy.ts","../src/strategies/context/SimpleContextFetchingStrategy.ts","../src/strategies/context/WorkerContextFetchingStrategy.ts","../src/strategies/sharding/WorkerShardingStrategy.ts","../src/strategies/sharding/SimpleShardingStrategy.ts","../src/ws/WebSocketShard.ts","../src/utils/constants.ts","../src/throttling/SimpleIdentifyThrottler.ts","../src/utils/WorkerBootstrapper.ts","../src/ws/WebSocketManager.ts","../src/index.ts"],"sourcesContent":["// Shim globals in esm bundle\nimport { fileURLToPath } from 'url'\nimport path from 'path'\n\nconst getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n","import type { Awaitable } from '@discordjs/util';\nimport type { APIGatewayBotInfo } from 'discord-api-types/v10';\nimport type { SessionInfo, WebSocketManager, WebSocketManagerOptions } from '../../ws/WebSocketManager.js';\n\nexport interface FetchingStrategyOptions\n\textends Omit<\n\t\tWebSocketManagerOptions,\n\t\t| 'buildIdentifyThrottler'\n\t\t| 'buildStrategy'\n\t\t| 'rest'\n\t\t| 'retrieveSessionInfo'\n\t\t| 'shardCount'\n\t\t| 'shardIds'\n\t\t| 'updateSessionInfo'\n\t> {\n\treadonly gatewayInformation: APIGatewayBotInfo;\n\treadonly shardCount: number;\n}\n\n/**\n * Strategies responsible solely for making manager information accessible\n */\nexport interface IContextFetchingStrategy {\n\treadonly options: FetchingStrategyOptions;\n\tretrieveSessionInfo(shardId: number): Awaitable<SessionInfo | null>;\n\tupdateSessionInfo(shardId: number, sessionInfo: SessionInfo | null): Awaitable<void>;\n\t/**\n\t * Resolves once the given shard should be allowed to identify\n\t * This should correctly handle the signal and reject with an abort error if the operation is aborted.\n\t * Other errors will cause the shard to reconnect.\n\t */\n\twaitForIdentify(shardId: number, signal: AbortSignal): Promise<void>;\n}\n\nexport async function managerToFetchingStrategyOptions(manager: WebSocketManager): Promise<FetchingStrategyOptions> {\n\t/* eslint-disable @typescript-eslint/unbound-method */\n\tconst {\n\t\tbuildIdentifyThrottler,\n\t\tbuildStrategy,\n\t\tretrieveSessionInfo,\n\t\tupdateSessionInfo,\n\t\tshardCount,\n\t\tshardIds,\n\t\trest,\n\t\t...managerOptions\n\t} = manager.options;\n\t/* eslint-enable @typescript-eslint/unbound-method */\n\n\treturn {\n\t\t...managerOptions,\n\t\tgatewayInformation: await manager.fetchGatewayInformation(),\n\t\tshardCount: await manager.getShardCount(),\n\t};\n}\n","import type { IIdentifyThrottler } from '../../throttling/IIdentifyThrottler.js';\nimport type { SessionInfo, WebSocketManager } from '../../ws/WebSocketManager.js';\nimport type { FetchingStrategyOptions, IContextFetchingStrategy } from './IContextFetchingStrategy.js';\n\nexport class SimpleContextFetchingStrategy implements IContextFetchingStrategy {\n\t// This strategy assumes every shard is running under the same process - therefore we need a single\n\t// IdentifyThrottler per manager.\n\tprivate static throttlerCache = new WeakMap<WebSocketManager, IIdentifyThrottler>();\n\n\tprivate static async ensureThrottler(manager: WebSocketManager): Promise<IIdentifyThrottler> {\n\t\tconst throttler = SimpleContextFetchingStrategy.throttlerCache.get(manager);\n\t\tif (throttler) {\n\t\t\treturn throttler;\n\t\t}\n\n\t\tconst newThrottler = await manager.options.buildIdentifyThrottler(manager);\n\t\tSimpleContextFetchingStrategy.throttlerCache.set(manager, newThrottler);\n\n\t\treturn newThrottler;\n\t}\n\n\tpublic constructor(private readonly manager: WebSocketManager, public readonly options: FetchingStrategyOptions) {}\n\n\tpublic async retrieveSessionInfo(shardId: number): Promise<SessionInfo | null> {\n\t\treturn this.manager.options.retrieveSessionInfo(shardId);\n\t}\n\n\tpublic updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null) {\n\t\treturn this.manager.options.updateSessionInfo(shardId, sessionInfo);\n\t}\n\n\tpublic async waitForIdentify(shardId: number, signal: AbortSignal): Promise<void> {\n\t\tconst throttler = await SimpleContextFetchingStrategy.ensureThrottler(this.manager);\n\t\tawait throttler.waitForIdentify(shardId, signal);\n\t}\n}\n","import { isMainThread, parentPort } from 'node:worker_threads';\nimport { Collection } from '@discordjs/collection';\nimport type { SessionInfo } from '../../ws/WebSocketManager.js';\nimport {\n\tWorkerReceivePayloadOp,\n\tWorkerSendPayloadOp,\n\ttype WorkerReceivePayload,\n\ttype WorkerSendPayload,\n} from '../sharding/WorkerShardingStrategy.js';\nimport type { FetchingStrategyOptions, IContextFetchingStrategy } from './IContextFetchingStrategy.js';\n\nexport class WorkerContextFetchingStrategy implements IContextFetchingStrategy {\n\tprivate readonly sessionPromises = new Collection<number, (session: SessionInfo | null) => void>();\n\n\tprivate readonly waitForIdentifyPromises = new Collection<\n\t\tnumber,\n\t\t{ reject(error: unknown): void; resolve(): void; signal: AbortSignal }\n\t>();\n\n\tpublic constructor(public readonly options: FetchingStrategyOptions) {\n\t\tif (isMainThread) {\n\t\t\tthrow new Error('Cannot instantiate WorkerContextFetchingStrategy on the main thread');\n\t\t}\n\n\t\tparentPort!.on('message', (payload: WorkerSendPayload) => {\n\t\t\tif (payload.op === WorkerSendPayloadOp.SessionInfoResponse) {\n\t\t\t\tthis.sessionPromises.get(payload.nonce)?.(payload.session);\n\t\t\t\tthis.sessionPromises.delete(payload.nonce);\n\t\t\t}\n\n\t\t\tif (payload.op === WorkerSendPayloadOp.ShardIdentifyResponse) {\n\t\t\t\tconst promise = this.waitForIdentifyPromises.get(payload.nonce);\n\t\t\t\tif (payload.ok) {\n\t\t\t\t\tpromise?.resolve();\n\t\t\t\t} else {\n\t\t\t\t\t// We need to make sure we reject with an abort error\n\t\t\t\t\tpromise?.reject(promise.signal.reason);\n\t\t\t\t}\n\n\t\t\t\tthis.waitForIdentifyPromises.delete(payload.nonce);\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic async retrieveSessionInfo(shardId: number): Promise<SessionInfo | null> {\n\t\tconst nonce = Math.random();\n\t\tconst payload: WorkerReceivePayload = {\n\t\t\top: WorkerReceivePayloadOp.RetrieveSessionInfo,\n\t\t\tshardId,\n\t\t\tnonce,\n\t\t};\n\t\t// eslint-disable-next-line no-promise-executor-return\n\t\tconst promise = new Promise<SessionInfo | null>((resolve) => this.sessionPromises.set(nonce, resolve));\n\t\tparentPort!.postMessage(payload);\n\t\treturn promise;\n\t}\n\n\tpublic updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null) {\n\t\tconst payload: WorkerReceivePayload = {\n\t\t\top: WorkerReceivePayloadOp.UpdateSessionInfo,\n\t\t\tshardId,\n\t\t\tsession: sessionInfo,\n\t\t};\n\t\tparentPort!.postMessage(payload);\n\t}\n\n\tpublic async waitForIdentify(shardId: number, signal: AbortSignal): Promise<void> {\n\t\tconst nonce = Math.random();\n\n\t\tconst payload: WorkerReceivePayload = {\n\t\t\top: WorkerReceivePayloadOp.WaitForIdentify,\n\t\t\tnonce,\n\t\t\tshardId,\n\t\t};\n\t\tconst promise = new Promise<void>((resolve, reject) =>\n\t\t\t// eslint-disable-next-line no-promise-executor-return\n\t\t\tthis.waitForIdentifyPromises.set(nonce, { signal, resolve, reject }),\n\t\t);\n\n\t\tparentPort!.postMessage(payload);\n\n\t\tconst listener = () => {\n\t\t\tconst payload: WorkerReceivePayload = {\n\t\t\t\top: WorkerReceivePayloadOp.CancelIdentify,\n\t\t\t\tnonce,\n\t\t\t};\n\n\t\t\tparentPort!.postMessage(payload);\n\t\t};\n\n\t\tsignal.addEventListener('abort', listener);\n\n\t\ttry {\n\t\t\tawait promise;\n\t\t} finally {\n\t\t\tsignal.removeEventListener('abort', listener);\n\t\t}\n\t}\n}\n","import { once } from 'node:events';\nimport { join, isAbsolute, resolve } from 'node:path';\nimport { Worker } from 'node:worker_threads';\nimport { Collection } from '@discordjs/collection';\nimport type { GatewaySendPayload } from 'discord-api-types/v10';\nimport type { IIdentifyThrottler } from '../../throttling/IIdentifyThrottler.js';\nimport type { SessionInfo, WebSocketManager } from '../../ws/WebSocketManager.js';\nimport type {\n\tWebSocketShardDestroyOptions,\n\tWebSocketShardEvents,\n\tWebSocketShardStatus,\n} from '../../ws/WebSocketShard.js';\nimport { managerToFetchingStrategyOptions, type FetchingStrategyOptions } from '../context/IContextFetchingStrategy.js';\nimport type { IShardingStrategy } from './IShardingStrategy.js';\n\nexport interface WorkerData extends FetchingStrategyOptions {\n\tshardIds: number[];\n}\n\nexport enum WorkerSendPayloadOp {\n\tConnect,\n\tDestroy,\n\tSend,\n\tSessionInfoResponse,\n\tShardIdentifyResponse,\n\tFetchStatus,\n}\n\nexport type WorkerSendPayload =\n\t| { nonce: number; ok: boolean; op: WorkerSendPayloadOp.ShardIdentifyResponse }\n\t| { nonce: number; op: WorkerSendPayloadOp.FetchStatus; shardId: number }\n\t| { nonce: number; op: WorkerSendPayloadOp.SessionInfoResponse; session: SessionInfo | null }\n\t| { op: WorkerSendPayloadOp.Connect; shardId: number }\n\t| { op: WorkerSendPayloadOp.Destroy; options?: WebSocketShardDestroyOptions; shardId: number }\n\t| { op: WorkerSendPayloadOp.Send; payload: GatewaySendPayload; shardId: number };\n\nexport enum WorkerReceivePayloadOp {\n\tConnected,\n\tDestroyed,\n\tEvent,\n\tRetrieveSessionInfo,\n\tUpdateSessionInfo,\n\tWaitForIdentify,\n\tFetchStatusResponse,\n\tWorkerReady,\n\tCancelIdentify,\n}\n\nexport type WorkerReceivePayload =\n\t// Can't seem to get a type-safe union based off of the event, so I'm sadly leaving data as any for now\n\t| { data: any; event: WebSocketShardEvents; op: WorkerReceivePayloadOp.Event; shardId: number }\n\t| { nonce: number; op: WorkerReceivePayloadOp.CancelIdentify }\n\t| { nonce: number; op: WorkerReceivePayloadOp.FetchStatusResponse; status: WebSocketShardStatus }\n\t| { nonce: number; op: WorkerReceivePayloadOp.RetrieveSessionInfo; shardId: number }\n\t| { nonce: number; op: WorkerReceivePayloadOp.WaitForIdentify; shardId: number }\n\t| { op: WorkerReceivePayloadOp.Connected; shardId: number }\n\t| { op: WorkerReceivePayloadOp.Destroyed; shardId: number }\n\t| { op: WorkerReceivePayloadOp.UpdateSessionInfo; session: SessionInfo | null; shardId: number }\n\t| { op: WorkerReceivePayloadOp.WorkerReady };\n\n/**\n * Options for a {@link WorkerShardingStrategy}\n */\nexport interface WorkerShardingStrategyOptions {\n\t/**\n\t * Dictates how many shards should be spawned per worker thread.\n\t */\n\tshardsPerWorker: number | 'all';\n\t/**\n\t * Path to the worker file to use. The worker requires quite a bit of setup, it is recommended you leverage the {@link WorkerBootstrapper} class.\n\t */\n\tworkerPath?: string;\n}\n\n/**\n * Strategy used to spawn threads in worker_threads\n */\nexport class WorkerShardingStrategy implements IShardingStrategy {\n\tprivate readonly manager: WebSocketManager;\n\n\tprivate readonly options: WorkerShardingStrategyOptions;\n\n\t#workers: Worker[] = [];\n\n\treadonly #workerByShardId = new Collection<number, Worker>();\n\n\tprivate readonly connectPromises = new Collection<number, () => void>();\n\n\tprivate readonly destroyPromises = new Collection<number, () => void>();\n\n\tprivate readonly fetchStatusPromises = new Collection<number, (status: WebSocketShardStatus) => void>();\n\n\tprivate readonly waitForIdentifyControllers = new Collection<number, AbortController>();\n\n\tprivate throttler?: IIdentifyThrottler;\n\n\tpublic constructor(manager: WebSocketManager, options: WorkerShardingStrategyOptions) {\n\t\tthis.manager = manager;\n\t\tthis.options = options;\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.spawn}\n\t */\n\tpublic async spawn(shardIds: number[]) {\n\t\tconst shardsPerWorker = this.options.shardsPerWorker === 'all' ? shardIds.length : this.options.shardsPerWorker;\n\t\tconst strategyOptions = await managerToFetchingStrategyOptions(this.manager);\n\n\t\tconst loops = Math.ceil(shardIds.length / shardsPerWorker);\n\t\tconst promises: Promise<void>[] = [];\n\n\t\tfor (let idx = 0; idx < loops; idx++) {\n\t\t\tconst slice = shardIds.slice(idx * shardsPerWorker, (idx + 1) * shardsPerWorker);\n\t\t\tconst workerData: WorkerData = {\n\t\t\t\t...strategyOptions,\n\t\t\t\tshardIds: slice,\n\t\t\t};\n\n\t\t\tpromises.push(this.setupWorker(workerData));\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.connect}\n\t */\n\tpublic async connect() {\n\t\tconst promises = [];\n\n\t\tfor (const [shardId, worker] of this.#workerByShardId.entries()) {\n\t\t\tconst payload: WorkerSendPayload = {\n\t\t\t\top: WorkerSendPayloadOp.Connect,\n\t\t\t\tshardId,\n\t\t\t};\n\n\t\t\t// eslint-disable-next-line no-promise-executor-return\n\t\t\tconst promise = new Promise<void>((resolve) => this.connectPromises.set(shardId, resolve));\n\t\t\tworker.postMessage(payload);\n\t\t\tpromises.push(promise);\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.destroy}\n\t */\n\tpublic async destroy(options: Omit<WebSocketShardDestroyOptions, 'recover'> = {}) {\n\t\tconst promises = [];\n\n\t\tfor (const [shardId, worker] of this.#workerByShardId.entries()) {\n\t\t\tconst payload: WorkerSendPayload = {\n\t\t\t\top: WorkerSendPayloadOp.Destroy,\n\t\t\t\tshardId,\n\t\t\t\toptions,\n\t\t\t};\n\n\t\t\tpromises.push(\n\t\t\t\t// eslint-disable-next-line no-promise-executor-return, promise/prefer-await-to-then\n\t\t\t\tnew Promise<void>((resolve) => this.destroyPromises.set(shardId, resolve)).then(async () => worker.terminate()),\n\t\t\t);\n\t\t\tworker.postMessage(payload);\n\t\t}\n\n\t\tthis.#workers = [];\n\t\tthis.#workerByShardId.clear();\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.send}\n\t */\n\tpublic send(shardId: number, data: GatewaySendPayload) {\n\t\tconst worker = this.#workerByShardId.get(shardId);\n\t\tif (!worker) {\n\t\t\tthrow new Error(`No worker found for shard ${shardId}`);\n\t\t}\n\n\t\tconst payload: WorkerSendPayload = {\n\t\t\top: WorkerSendPayloadOp.Send,\n\t\t\tshardId,\n\t\t\tpayload: data,\n\t\t};\n\t\tworker.postMessage(payload);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.fetchStatus}\n\t */\n\tpublic async fetchStatus() {\n\t\tconst statuses = new Collection<number, WebSocketShardStatus>();\n\n\t\tfor (const [shardId, worker] of this.#workerByShardId.entries()) {\n\t\t\tconst nonce = Math.random();\n\t\t\tconst payload: WorkerSendPayload = {\n\t\t\t\top: WorkerSendPayloadOp.FetchStatus,\n\t\t\t\tshardId,\n\t\t\t\tnonce,\n\t\t\t};\n\n\t\t\t// eslint-disable-next-line no-promise-executor-return\n\t\t\tconst promise = new Promise<WebSocketShardStatus>((resolve) => this.fetchStatusPromises.set(nonce, resolve));\n\t\t\tworker.postMessage(payload);\n\n\t\t\tconst status = await promise;\n\t\t\tstatuses.set(shardId, status);\n\t\t}\n\n\t\treturn statuses;\n\t}\n\n\tprivate async setupWorker(workerData: WorkerData) {\n\t\tconst worker = new Worker(this.resolveWorkerPath(), { workerData });\n\n\t\tawait once(worker, 'online');\n\t\t// We do this in case the user has any potentially long running code in their worker\n\t\tawait this.waitForWorkerReady(worker);\n\n\t\tworker\n\t\t\t.on('error', (err) => {\n\t\t\t\tthrow err;\n\t\t\t})\n\t\t\t.on('messageerror', (err) => {\n\t\t\t\tthrow err;\n\t\t\t})\n\t\t\t.on('message', async (payload: WorkerReceivePayload) => this.onMessage(worker, payload));\n\n\t\tthis.#workers.push(worker);\n\t\tfor (const shardId of workerData.shardIds) {\n\t\t\tthis.#workerByShardId.set(shardId, worker);\n\t\t}\n\t}\n\n\tprivate resolveWorkerPath(): string {\n\t\tconst path = this.options.workerPath;\n\n\t\tif (!path) {\n\t\t\treturn join(__dirname, 'defaultWorker.js');\n\t\t}\n\n\t\tif (isAbsolute(path)) {\n\t\t\treturn path;\n\t\t}\n\n\t\tif (/^\\.\\.?[/\\\\]/.test(path)) {\n\t\t\treturn resolve(path);\n\t\t}\n\n\t\ttry {\n\t\t\treturn require.resolve(path);\n\t\t} catch {\n\t\t\treturn resolve(path);\n\t\t}\n\t}\n\n\tprivate async waitForWorkerReady(worker: Worker): Promise<void> {\n\t\treturn new Promise((resolve) => {\n\t\t\tconst handler = (payload: WorkerReceivePayload) => {\n\t\t\t\tif (payload.op === WorkerReceivePayloadOp.WorkerReady) {\n\t\t\t\t\tresolve();\n\t\t\t\t\tworker.off('message', handler);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tworker.on('message', handler);\n\t\t});\n\t}\n\n\tprivate async onMessage(worker: Worker, payload: WorkerReceivePayload) {\n\t\tswitch (payload.op) {\n\t\t\tcase WorkerReceivePayloadOp.Connected: {\n\t\t\t\tthis.connectPromises.get(payload.shardId)?.();\n\t\t\t\tthis.connectPromises.delete(payload.shardId);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.Destroyed: {\n\t\t\t\tthis.destroyPromises.get(payload.shardId)?.();\n\t\t\t\tthis.destroyPromises.delete(payload.shardId);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.Event: {\n\t\t\t\tthis.manager.emit(payload.event, { ...payload.data, shardId: payload.shardId });\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.RetrieveSessionInfo: {\n\t\t\t\tconst session = await this.manager.options.retrieveSessionInfo(payload.shardId);\n\t\t\t\tconst response: WorkerSendPayload = {\n\t\t\t\t\top: WorkerSendPayloadOp.SessionInfoResponse,\n\t\t\t\t\tnonce: payload.nonce,\n\t\t\t\t\tsession,\n\t\t\t\t};\n\t\t\t\tworker.postMessage(response);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.UpdateSessionInfo: {\n\t\t\t\tawait this.manager.options.updateSessionInfo(payload.shardId, payload.session);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.WaitForIdentify: {\n\t\t\t\tconst throttler = await this.ensureThrottler();\n\n\t\t\t\t// If this rejects it means we aborted, in which case we reply elsewhere.\n\t\t\t\ttry {\n\t\t\t\t\tconst controller = new AbortController();\n\t\t\t\t\tthis.waitForIdentifyControllers.set(payload.nonce, controller);\n\t\t\t\t\tawait throttler.waitForIdentify(payload.shardId, controller.signal);\n\t\t\t\t} catch {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst response: WorkerSendPayload = {\n\t\t\t\t\top: WorkerSendPayloadOp.ShardIdentifyResponse,\n\t\t\t\t\tnonce: payload.nonce,\n\t\t\t\t\tok: true,\n\t\t\t\t};\n\t\t\t\tworker.postMessage(response);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.FetchStatusResponse: {\n\t\t\t\tthis.fetchStatusPromises.get(payload.nonce)?.(payload.status);\n\t\t\t\tthis.fetchStatusPromises.delete(payload.nonce);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.WorkerReady: {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase WorkerReceivePayloadOp.CancelIdentify: {\n\t\t\t\tthis.waitForIdentifyControllers.get(payload.nonce)?.abort();\n\t\t\t\tthis.waitForIdentifyControllers.delete(payload.nonce);\n\n\t\t\t\tconst response: WorkerSendPayload = {\n\t\t\t\t\top: WorkerSendPayloadOp.ShardIdentifyResponse,\n\t\t\t\t\tnonce: payload.nonce,\n\t\t\t\t\tok: false,\n\t\t\t\t};\n\t\t\t\tworker.postMessage(response);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate async ensureThrottler(): Promise<IIdentifyThrottler> {\n\t\tthis.throttler ??= await this.manager.options.buildIdentifyThrottler(this.manager);\n\t\treturn this.throttler;\n\t}\n}\n","import { Collection } from '@discordjs/collection';\nimport type { GatewaySendPayload } from 'discord-api-types/v10';\nimport type { WebSocketManager } from '../../ws/WebSocketManager.js';\nimport { WebSocketShard, WebSocketShardEvents, type WebSocketShardDestroyOptions } from '../../ws/WebSocketShard.js';\nimport { managerToFetchingStrategyOptions } from '../context/IContextFetchingStrategy.js';\nimport { SimpleContextFetchingStrategy } from '../context/SimpleContextFetchingStrategy.js';\nimport type { IShardingStrategy } from './IShardingStrategy.js';\n\n/**\n * Simple strategy that just spawns shards in the current process\n */\nexport class SimpleShardingStrategy implements IShardingStrategy {\n\tprivate readonly manager: WebSocketManager;\n\n\tprivate readonly shards = new Collection<number, WebSocketShard>();\n\n\tpublic constructor(manager: WebSocketManager) {\n\t\tthis.manager = manager;\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.spawn}\n\t */\n\tpublic async spawn(shardIds: number[]) {\n\t\tconst strategyOptions = await managerToFetchingStrategyOptions(this.manager);\n\n\t\tfor (const shardId of shardIds) {\n\t\t\tconst strategy = new SimpleContextFetchingStrategy(this.manager, strategyOptions);\n\t\t\tconst shard = new WebSocketShard(strategy, shardId);\n\t\t\tfor (const event of Object.values(WebSocketShardEvents)) {\n\t\t\t\t// @ts-expect-error: Intentional\n\t\t\t\tshard.on(event, (payload) => this.manager.emit(event, { ...payload, shardId }));\n\t\t\t}\n\n\t\t\tthis.shards.set(shardId, shard);\n\t\t}\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.connect}\n\t */\n\tpublic async connect() {\n\t\tconst promises = [];\n\n\t\tfor (const shard of this.shards.values()) {\n\t\t\tpromises.push(shard.connect());\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.destroy}\n\t */\n\tpublic async destroy(options?: Omit<WebSocketShardDestroyOptions, 'recover'>) {\n\t\tconst promises = [];\n\n\t\tfor (const shard of this.shards.values()) {\n\t\t\tpromises.push(shard.destroy(options));\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t\tthis.shards.clear();\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.send}\n\t */\n\tpublic async send(shardId: number, payload: GatewaySendPayload) {\n\t\tconst shard = this.shards.get(shardId);\n\t\tif (!shard) {\n\t\t\tthrow new RangeError(`Shard ${shardId} not found`);\n\t\t}\n\n\t\treturn shard.send(payload);\n\t}\n\n\t/**\n\t * {@inheritDoc IShardingStrategy.fetchStatus}\n\t */\n\tpublic async fetchStatus() {\n\t\treturn this.shards.mapValues((shard) => shard.status);\n\t}\n}\n","/* eslint-disable id-length */\nimport { Buffer } from 'node:buffer';\nimport { once } from 'node:events';\nimport { clearInterval, clearTimeout, setInterval, setTimeout } from 'node:timers';\nimport { setTimeout as sleep } from 'node:timers/promises';\nimport { URLSearchParams } from 'node:url';\nimport { TextDecoder } from 'node:util';\nimport { inflate } from 'node:zlib';\nimport { Collection } from '@discordjs/collection';\nimport { lazy } from '@discordjs/util';\nimport { AsyncQueue } from '@sapphire/async-queue';\nimport { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';\nimport {\n\tGatewayCloseCodes,\n\tGatewayDispatchEvents,\n\tGatewayOpcodes,\n\ttype GatewayDispatchPayload,\n\ttype GatewayIdentifyData,\n\ttype GatewayReadyDispatchData,\n\ttype GatewayReceivePayload,\n\ttype GatewaySendPayload,\n} from 'discord-api-types/v10';\nimport { WebSocket, type Data } from 'ws';\nimport type { Inflate } from 'zlib-sync';\nimport type { IContextFetchingStrategy } from '../strategies/context/IContextFetchingStrategy.js';\nimport { ImportantGatewayOpcodes, getInitialSendRateLimitState } from '../utils/constants.js';\nimport type { SessionInfo } from './WebSocketManager.js';\n\n// eslint-disable-next-line promise/prefer-await-to-then\nconst getZlibSync = lazy(async () => import('zlib-sync').then((mod) => mod.default).catch(() => null));\n\nexport enum WebSocketShardEvents {\n\tClosed = 'closed',\n\tDebug = 'debug',\n\tDispatch = 'dispatch',\n\tError = 'error',\n\tHeartbeatComplete = 'heartbeat',\n\tHello = 'hello',\n\tReady = 'ready',\n\tResumed = 'resumed',\n}\n\nexport enum WebSocketShardStatus {\n\tIdle,\n\tConnecting,\n\tResuming,\n\tReady,\n}\n\nexport enum WebSocketShardDestroyRecovery {\n\tReconnect,\n\tResume,\n}\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type WebSocketShardEventsMap = {\n\t[WebSocketShardEvents.Closed]: [{ code: number }];\n\t[WebSocketShardEvents.Debug]: [payload: { message: string }];\n\t[WebSocketShardEvents.Dispatch]: [payload: { data: GatewayDispatchPayload }];\n\t[WebSocketShardEvents.Error]: [payload: { error: Error }];\n\t[WebSocketShardEvents.Hello]: [];\n\t[WebSocketShardEvents.Ready]: [payload: { data: GatewayReadyDispatchData }];\n\t[WebSocketShardEvents.Resumed]: [];\n\t[WebSocketShardEvents.HeartbeatComplete]: [payload: { ackAt: number; heartbeatAt: number; latency: number }];\n};\n\nexport interface WebSocketShardDestroyOptions {\n\tcode?: number;\n\treason?: string;\n\trecover?: WebSocketShardDestroyRecovery;\n}\n\nexport enum CloseCodes {\n\tNormal = 1_000,\n\tResuming = 4_200,\n}\n\nexport interface SendRateLimitState {\n\tremaining: number;\n\tresetAt: number;\n}\n\n// TODO(vladfrangu): enable this once https://github.com/oven-sh/bun/issues/3392 is solved\n// const WebSocketConstructor: typeof WebSocket = shouldUseGlobalFetchAndWebSocket()\n// \t? (globalThis as any).WebSocket\n// \t: WebSocket;\nconst WebSocketConstructor: typeof WebSocket = WebSocket;\n\nexport class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {\n\tprivate connection: WebSocket | null = null;\n\n\tprivate useIdentifyCompress = false;\n\n\tprivate inflate: Inflate | null = null;\n\n\tprivate readonly textDecoder = new TextDecoder();\n\n\tprivate replayedEvents = 0;\n\n\tprivate isAck = true;\n\n\tprivate sendRateLimitState: SendRateLimitState = getInitialSendRateLimitState();\n\n\tprivate initialHeartbeatTimeoutController: AbortController | null = null;\n\n\tprivate heartbeatInterval: NodeJS.Timer | null = null;\n\n\tprivate lastHeartbeatAt = -1;\n\n\t// Indicates whether the shard has already resolved its original connect() call\n\tprivate initialConnectResolved = false;\n\n\t// Indicates if we failed to connect to the ws url (ECONNREFUSED/ECONNRESET)\n\tprivate failedToConnectDueToNetworkError = false;\n\n\tprivate readonly sendQueue = new AsyncQueue();\n\n\tprivate readonly timeoutAbortControllers = new Collection<WebSocketShardEvents, AbortController>();\n\n\tprivate readonly strategy: IContextFetchingStrategy;\n\n\tpublic readonly id: number;\n\n\t#status: WebSocketShardStatus = WebSocketShardStatus.Idle;\n\n\tpublic get status(): WebSocketShardStatus {\n\t\treturn this.#status;\n\t}\n\n\tpublic constructor(strategy: IContextFetchingStrategy, id: number) {\n\t\tsuper();\n\t\tthis.strategy = strategy;\n\t\tthis.id = id;\n\t}\n\n\tpublic async connect() {\n\t\tconst controller = new AbortController();\n\t\tlet promise;\n\n\t\tif (!this.initialConnectResolved) {\n\t\t\t// Sleep for the remaining time, but if the connection closes in the meantime, we shouldn't wait the remainder to avoid blocking the new conn\n\t\t\tpromise = Promise.race([\n\t\t\t\tonce(this, WebSocketShardEvents.Ready, { signal: controller.signal }),\n\t\t\t\tonce(this, WebSocketShardEvents.Resumed, { signal: controller.signal }),\n\t\t\t]);\n\t\t}\n\n\t\tvoid this.internalConnect();\n\n\t\ttry {\n\t\t\tawait promise;\n\t\t} catch ({ error }: any) {\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\t// cleanup hanging listeners\n\t\t\tcontroller.abort();\n\t\t}\n\n\t\tthis.initialConnectResolved = true;\n\t}\n\n\tprivate async internalConnect() {\n\t\tif (this.#status !== WebSocketShardStatus.Idle) {\n\t\t\tthrow new Error(\"Tried to connect a shard that wasn't idle\");\n\t\t}\n\n\t\tconst { version, encoding, compression } = this.strategy.options;\n\t\tconst params = new URLSearchParams({ v: version, encoding });\n\t\tif (compression) {\n\t\t\tconst zlib = await getZlibSync();\n\t\t\tif (zlib) {\n\t\t\t\tparams.append('compress', compression);\n\t\t\t\tthis.inflate = new zlib.Inflate({\n\t\t\t\t\tchunkSize: 65_535,\n\t\t\t\t\tto: 'string',\n\t\t\t\t});\n\t\t\t} else if (!this.useIdentifyCompress) {\n\t\t\t\tthis.useIdentifyCompress = true;\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'WebSocketShard: Compression is enabled but zlib-sync is not installed, falling back to identify compress',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst session = await this.strategy.retrieveSessionInfo(this.id);\n\n\t\tconst url = `${session?.resumeURL ?? this.strategy.options.gatewayInformation.url}?${params.toString()}`;\n\n\t\tthis.debug([`Connecting to ${url}`]);\n\n\t\tconst connection = new WebSocketConstructor(url, {\n\t\t\thandshakeTimeout: this.strategy.options.handshakeTimeout ?? undefined,\n\t\t});\n\n\t\tconnection.binaryType = 'arraybuffer';\n\n\t\tconnection.onmessage = (event) => {\n\t\t\tvoid this.onMessage(event.data, event.data instanceof ArrayBuffer);\n\t\t};\n\n\t\tconnection.onerror = (event) => {\n\t\t\tthis.onError(event.error);\n\t\t};\n\n\t\tconnection.onclose = (event) => {\n\t\t\tvoid this.onClose(event.code);\n\t\t};\n\n\t\tthis.connection = connection;\n\n\t\tthis.#status = WebSocketShardStatus.Connecting;\n\n\t\tthis.sendRateLimitState = getInitialSendRateLimitState();\n\n\t\tconst { ok } = await this.waitForEvent(WebSocketShardEvents.Hello, this.strategy.options.helloTimeout);\n\t\tif (!ok) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (session?.shardCount === this.strategy.options.shardCount) {\n\t\t\tawait this.resume(session);\n\t\t} else {\n\t\t\tawait this.identify();\n\t\t}\n\t}\n\n\tpublic async destroy(options: WebSocketShardDestroyOptions = {}) {\n\t\tif (this.#status === WebSocketShardStatus.Idle) {\n\t\t\tthis.debug(['Tried to destroy a shard that was idle']);\n\t\t\treturn;\n\t\t}\n\n\t\tif (!options.code) {\n\t\t\toptions.code = options.recover === WebSocketShardDestroyRecovery.Resume ? CloseCodes.Resuming : CloseCodes.Normal;\n\t\t}\n\n\t\tthis.debug([\n\t\t\t'Destroying shard',\n\t\t\t`Reason: ${options.reason ?? 'none'}`,\n\t\t\t`Code: ${options.code}`,\n\t\t\t`Recover: ${options.recover === undefined ? 'none' : WebSocketShardDestroyRecovery[options.recover]!}`,\n\t\t]);\n\n\t\t// Reset state\n\t\tthis.isAck = true;\n\t\tif (this.heartbeatInterval) {\n\t\t\tclearInterval(this.heartbeatInterval);\n\t\t}\n\n\t\tif (this.initialHeartbeatTimeoutController) {\n\t\t\tthis.initialHeartbeatTimeoutController.abort();\n\t\t\tthis.initialHeartbeatTimeoutController = null;\n\t\t}\n\n\t\tthis.lastHeartbeatAt = -1;\n\n\t\tfor (const controller of this.timeoutAbortControllers.values()) {\n\t\t\tcontroller.abort();\n\t\t}\n\n\t\tthis.timeoutAbortControllers.clear();\n\n\t\tthis.failedToConnectDueToNetworkError = false;\n\n\t\t// Clear session state if applicable\n\t\tif (options.recover !== WebSocketShardDestroyRecovery.Resume) {\n\t\t\tawait this.strategy.updateSessionInfo(this.id, null);\n\t\t}\n\n\t\tif (this.connection) {\n\t\t\t// No longer need to listen to messages\n\t\t\tthis.connection.onmessage = null;\n\t\t\t// Prevent a reconnection loop by unbinding the main close event\n\t\t\tthis.connection.onclose = null;\n\n\t\t\tconst shouldClose = this.connection.readyState === WebSocket.OPEN;\n\n\t\t\tthis.debug([\n\t\t\t\t'Connection status during destroy',\n\t\t\t\t`Needs closing: ${shouldClose}`,\n\t\t\t\t`Ready state: ${this.connection.readyState}`,\n\t\t\t]);\n\n\t\t\tif (shouldClose) {\n\t\t\t\tlet outerResolve: () => void;\n\t\t\t\tconst promise = new Promise<void>((resolve) => {\n\t\t\t\t\touterResolve = resolve;\n\t\t\t\t});\n\n\t\t\t\tthis.connection.onclose = outerResolve!;\n\n\t\t\t\tthis.connection.close(options.code, options.reason);\n\n\t\t\t\tawait promise;\n\t\t\t\tthis.emit(WebSocketShardEvents.Closed, { code: options.code });\n\t\t\t}\n\n\t\t\t// Lastly, remove the error event.\n\t\t\t// Doing this earlier would cause a hard crash in case an error event fired on our `close` call\n\t\t\tthis.connection.onerror = null;\n\t\t} else {\n\t\t\tthis.debug(['Destroying a shard that has no connection; please open an issue on GitHub']);\n\t\t}\n\n\t\tthis.#status = WebSocketShardStatus.Idle;\n\n\t\tif (options.recover !== undefined) {\n\t\t\t// There's cases (like no internet connection) where we immediately fail to connect,\n\t\t\t// causing a very fast and draining reconnection loop.\n\t\t\tawait sleep(500);\n\t\t\treturn this.internalConnect();\n\t\t}\n\t}\n\n\tprivate async waitForEvent(event: WebSocketShardEvents, timeoutDuration?: number | null): Promise<{ ok: boolean }> {\n\t\tthis.debug([`Waiting for event ${event} ${timeoutDuration ? `for ${timeoutDuration}ms` : 'indefinitely'}`]);\n\t\tconst timeoutController = new AbortController();\n\t\tconst timeout = timeoutDuration ? setTimeout(() => timeoutController.abort(), timeoutDuration).unref() : null;\n\n\t\tthis.timeoutAbortControllers.set(event, timeoutController);\n\n\t\tconst closeController = new AbortController();\n\n\t\ttry {\n\t\t\t// If the first promise resolves, all is well. If the 2nd promise resolves,\n\t\t\t// the shard has meanwhile closed. In that case, a destroy is already ongoing, so we just need to\n\t\t\t// return false. Meanwhile, if something rejects (error event) or the first controller is aborted,\n\t\t\t// we enter the catch block and trigger a destroy there.\n\t\t\tconst closed = await Promise.race<boolean>([\n\t\t\t\tonce(this, event, { signal: timeoutController.signal }).then(() => false),\n\t\t\t\tonce(this, WebSocketShardEvents.Closed, { signal: closeController.signal }).then(() => true),\n\t\t\t]);\n\n\t\t\treturn { ok: !closed };\n\t\t} catch {\n\t\t\t// If we're here because of other reasons, we need to destroy the shard\n\t\t\tvoid this.destroy({\n\t\t\t\tcode: CloseCodes.Normal,\n\t\t\t\treason: 'Something timed out or went wrong while waiting for an event',\n\t\t\t\trecover: WebSocketShardDestroyRecovery.Reconnect,\n\t\t\t});\n\n\t\t\treturn { ok: false };\n\t\t} finally {\n\t\t\tif (timeout) {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t}\n\n\t\t\tthis.timeoutAbortControllers.delete(event);\n\n\t\t\t// Clean up the close listener to not leak memory\n\t\t\tif (!closeController.signal.aborted) {\n\t\t\t\tcloseController.abort();\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic async send(payload: GatewaySendPayload): Promise<void> {\n\t\tif (!this.connection) {\n\t\t\tthrow new Error(\"WebSocketShard wasn't connected\");\n\t\t}\n\n\t\tif (this.#status !== WebSocketShardStatus.Ready && !ImportantGatewayOpcodes.has(payload.op)) {\n\t\t\tthis.debug(['Tried to send a non-crucial payload before the shard was ready, waiting']);\n\t\t\t// This will throw if the shard throws an error event in the meantime, just requeue the payload\n\t\t\ttry {\n\t\t\t\tawait once(this, WebSocketShardEvents.Ready);\n\t\t\t} catch {\n\t\t\t\treturn this.send(payload);\n\t\t\t}\n\t\t}\n\n\t\tawait this.sendQueue.wait();\n\n\t\tif (--this.sendRateLimitState.remaining <= 0) {\n\t\t\tconst now = Date.now();\n\n\t\t\tif (this.sendRateLimitState.resetAt > now) {\n\t\t\t\tconst sleepFor = this.sendRateLimitState.resetAt - now;\n\n\t\t\t\tthis.debug([`Was about to hit the send rate limit, sleeping for ${sleepFor}ms`]);\n\t\t\t\tconst controller = new AbortController();\n\n\t\t\t\t// Sleep for the remaining time, but if the connection closes in the meantime, we shouldn't wait the remainder to avoid blocking the new conn\n\t\t\t\tconst interrupted = await Promise.race([\n\t\t\t\t\tsleep(sleepFor).then(() => false),\n\t\t\t\t\tonce(this, WebSocketShardEvents.Closed, { signal: controller.signal }).then(() => true),\n\t\t\t\t]);\n\n\t\t\t\tif (interrupted) {\n\t\t\t\t\tthis.debug(['Connection closed while waiting for the send rate limit to reset, re-queueing payload']);\n\t\t\t\t\tthis.sendQueue.shift();\n\t\t\t\t\treturn this.send(payload);\n\t\t\t\t}\n\n\t\t\t\t// This is so the listener from the `once` call is removed\n\t\t\t\tcontroller.abort();\n\t\t\t}\n\n\t\t\tthis.sendRateLimitState = getInitialSendRateLimitState();\n\t\t}\n\n\t\tthis.sendQueue.shift();\n\t\tthis.connection.send(JSON.stringify(payload));\n\t}\n\n\tprivate async identify() {\n\t\tthis.debug(['Waiting for identify throttle']);\n\n\t\tconst controller = new AbortController();\n\t\tconst closeHandler = () => {\n\t\t\tcontroller.abort();\n\t\t};\n\n\t\tthis.on(WebSocketShardEvents.Closed, closeHandler);\n\n\t\ttry {\n\t\t\tawait this.strategy.waitForIdentify(this.id, controller.signal);\n\t\t} catch {\n\t\t\tif (controller.signal.aborted) {\n\t\t\t\tthis.debug(['Was waiting for an identify, but the shard closed in the meantime']);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.debug([\n\t\t\t\t'IContextFetchingStrategy#waitForIdentify threw an unknown error.',\n\t\t\t\t\"If you're using a custom strategy, this is probably nothing to worry about.\",\n\t\t\t\t\"If you're not, please open an issue on GitHub.\",\n\t\t\t]);\n\n\t\t\tawait this.destroy({\n\t\t\t\treason: 'Identify throttling logic failed',\n\t\t\t\trecover: WebSocketShardDestroyRecovery.Resume,\n\t\t\t});\n\t\t} finally {\n\t\t\tthis.off(WebSocketShardEvents.Closed, closeHandler);\n\t\t}\n\n\t\tthis.debug([\n\t\t\t'Identifying',\n\t\t\t`shard id: ${this.id.toString()}`,\n\t\t\t`shard count: ${this.strategy.options.shardCount}`,\n\t\t\t`intents: ${this.strategy.options.intents}`,\n\t\t\t`compression: ${this.inflate ? 'zlib-stream' : this.useIdentifyCompress ? 'identify' : 'none'}`,\n\t\t]);\n\n\t\tconst d: GatewayIdentifyData = {\n\t\t\ttoken: this.strategy.options.token,\n\t\t\tproperties: this.strategy.options.identifyProperties,\n\t\t\tintents: this.strategy.options.intents,\n\t\t\tcompress: this.useIdentifyCompress,\n\t\t\tshard: [this.id, this.strategy.options.shardCount],\n\t\t};\n\n\t\tif (this.strategy.options.largeThreshold) {\n\t\t\td.large_threshold = this.strategy.options.largeThreshold;\n\t\t}\n\n\t\tif (this.strategy.options.initialPresence) {\n\t\t\td.presence = this.strategy.options.initialPresence;\n\t\t}\n\n\t\tawait this.send({\n\t\t\top: GatewayOpcodes.Identify,\n\t\t\td,\n\t\t});\n\n\t\tawait this.waitForEvent(WebSocketShardEvents.Ready, this.strategy.options.readyTimeout);\n\t}\n\n\tprivate async resume(session: SessionInfo) {\n\t\tthis.debug([\n\t\t\t'Resuming session',\n\t\t\t`resume url: ${session.resumeURL}`,\n\t\t\t`sequence: ${session.sequence}`,\n\t\t\t`shard id: ${this.id.toString()}`,\n\t\t]);\n\n\t\tthis.#status = WebSocketShardStatus.Resuming;\n\t\tthis.replayedEvents = 0;\n\t\treturn this.send({\n\t\t\top: GatewayOpcodes.Resume,\n\t\t\td: {\n\t\t\t\ttoken: this.strategy.options.token,\n\t\t\t\tseq: session.sequence,\n\t\t\t\tsession_id: session.sessionId,\n\t\t\t},\n\t\t});\n\t}\n\n\tprivate async heartbeat(requested = false) {\n\t\tif (!this.isAck && !requested) {\n\t\t\treturn this.destroy({ reason: 'Zombie connection', recover: WebSocketShardDestroyRecovery.Resume });\n\t\t}\n\n\t\tconst session = await this.strategy.retrieveSessionInfo(this.id);\n\n\t\tawait this.send({\n\t\t\top: GatewayOpcodes.Heartbeat,\n\t\t\td: session?.sequence ?? null,\n\t\t});\n\n\t\tthis.lastHeartbeatAt = Date.now();\n\t\tthis.isAck = false;\n\t}\n\n\tprivate async unpackMessage(data: Data, isBinary: boolean): Promise<GatewayReceivePayload | null> {\n\t\t// Deal with no compression\n\t\tif (!isBinary) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(data as string) as GatewayReceivePayload;\n\t\t\t} catch {\n\t\t\t\t// This is a non-JSON payload / (at the time of writing this comment) emitted by bun wrongly interpreting custom close codes https://github.com/oven-sh/bun/issues/3392\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\tconst decompressable = new Uint8Array(data as ArrayBuffer);\n\n\t\t// Deal with identify compress\n\t\tif (this.useIdentifyCompress) {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t// eslint-disable-next-line promise/prefer-await-to-callbacks\n\t\t\t\tinflate(decompressable, { chunkSize: 65_535 }, (err, result) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(JSON.parse(this.textDecoder.decode(result)) as GatewayReceivePayload);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\t// Deal with gw wide zlib-stream compression\n\t\tif (this.inflate) {\n\t\t\tconst l = decompressable.length;\n\t\t\tconst flush =\n\t\t\t\tl >= 4 &&\n\t\t\t\tdecompressable[l - 4] === 0x00 &&\n\t\t\t\tdecompressable[l - 3] === 0x00 &&\n\t\t\t\tdecompressable[l - 2] === 0xff &&\n\t\t\t\tdecompressable[l - 1] === 0xff;\n\n\t\t\tconst zlib = (await getZlibSync())!;\n\t\t\tthis.inflate.push(Buffer.from(decompressable), flush ? zlib.Z_SYNC_FLUSH : zlib.Z_NO_FLUSH);\n\n\t\t\tif (this.inflate.err) {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error(`${this.inflate.err}${this.inflate.msg ? `: ${this.inflate.msg}` : ''}`),\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!flush) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst { result } = this.inflate;\n\t\t\tif (!result) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn JSON.parse(typeof result === 'string' ? result : this.textDecoder.decode(result)) as GatewayReceivePayload;\n\t\t}\n\n\t\tthis.debug([\n\t\t\t'Received a message we were unable to decompress',\n\t\t\t`isBinary: ${isBinary.toString()}`,\n\t\t\t`useIdentifyCompress: ${this.useIdentifyCompress.toString()}`,\n\t\t\t`inflate: ${Boolean(this.inflate).toString()}`,\n\t\t]);\n\n\t\treturn null;\n\t}\n\n\tprivate async onMessage(data: Data, isBinary: boolean) {\n\t\tconst payload = await this.unpackMessage(data, isBinary);\n\t\tif (!payload) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (payload.op) {\n\t\t\tcase GatewayOpcodes.Dispatch: {\n\t\t\t\tif (this.#status === WebSocketShardStatus.Resuming) {\n\t\t\t\t\tthis.replayedEvents++;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line sonarjs/no-nested-switch\n\t\t\t\tswitch (payload.t) {\n\t\t\t\t\tcase GatewayDispatchEvents.Ready: {\n\t\t\t\t\t\tthis.#status = WebSocketShardStatus.Ready;\n\n\t\t\t\t\t\tconst session = {\n\t\t\t\t\t\t\tsequence: payload.s,\n\t\t\t\t\t\t\tsessionId: payload.d.session_id,\n\t\t\t\t\t\t\tshardId: this.id,\n\t\t\t\t\t\t\tshardCount: this.strategy.options.shardCount,\n\t\t\t\t\t\t\tresumeURL: payload.d.resume_gateway_url,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tawait this.strategy.updateSessionInfo(this.id, session);\n\n\t\t\t\t\t\tthis.emit(WebSocketShardEvents.Ready, { data: payload.d });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase GatewayDispatchEvents.Resumed: {\n\t\t\t\t\t\tthis.#status = WebSocketShardStatus.Ready;\n\t\t\t\t\t\tthis.debug([`Resumed and replayed ${this.replayedEvents} events`]);\n\t\t\t\t\t\tthis.emit(WebSocketShardEvents.Resumed);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst session = await this.strategy.retrieveSessionInfo(this.id);\n\t\t\t\tif (session) {\n\t\t\t\t\tif (payload.s > session.sequence) {\n\t\t\t\t\t\tawait this.strategy.updateSessionInfo(this.id, { ...session, sequence: payload.s });\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.debug([\n\t\t\t\t\t\t`Received a ${payload.t} event but no session is available. Session information cannot be re-constructed in this state without a full reconnect`,\n\t\t\t\t\t]);\n\t\t\t\t}\n\n\t\t\t\tthis.emit(WebSocketShardEvents.Dispatch, { data: payload });\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.Heartbeat: {\n\t\t\t\tawait this.heartbeat(true);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.Reconnect: {\n\t\t\t\tawait this.destroy({\n\t\t\t\t\treason: 'Told to reconnect by Discord',\n\t\t\t\t\trecover: WebSocketShardDestroyRecovery.Resume,\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.InvalidSession: {\n\t\t\t\tthis.debug([`Invalid session; will attempt to resume: ${payload.d.toString()}`]);\n\t\t\t\tconst session = await this.strategy.retrieveSessionInfo(this.id);\n\t\t\t\tif (payload.d && session) {\n\t\t\t\t\tawait this.resume(session);\n\t\t\t\t} else {\n\t\t\t\t\tawait this.destroy({\n\t\t\t\t\t\treason: 'Invalid session',\n\t\t\t\t\t\trecover: WebSocketShardDestroyRecovery.Reconnect,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.Hello: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Hello);\n\t\t\t\tconst jitter = Math.random();\n\t\t\t\tconst firstWait = Math.floor(payload.d.heartbeat_interval * jitter);\n\t\t\t\tthis.debug([`Preparing first heartbeat of the connection with a jitter of ${jitter}; waiting ${firstWait}ms`]);\n\n\t\t\t\ttry {\n\t\t\t\t\tconst controller = new AbortController();\n\t\t\t\t\tthis.initialHeartbeatTimeoutController = controller;\n\t\t\t\t\tawait sleep(firstWait, undefined, { signal: controller.signal });\n\t\t\t\t} catch {\n\t\t\t\t\tthis.debug(['Cancelled initial heartbeat due to #destroy being called']);\n\t\t\t\t\treturn;\n\t\t\t\t} finally {\n\t\t\t\t\tthis.initialHeartbeatTimeoutController = null;\n\t\t\t\t}\n\n\t\t\t\tawait this.heartbeat();\n\n\t\t\t\tthis.debug([`First heartbeat sent, starting to beat every ${payload.d.heartbeat_interval}ms`]);\n\t\t\t\tthis.heartbeatInterval = setInterval(() => void this.heartbeat(), payload.d.heartbeat_interval);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayOpcodes.HeartbeatAck: {\n\t\t\t\tthis.isAck = true;\n\n\t\t\t\tconst ackAt = Date.now();\n\t\t\t\tthis.emit(WebSocketShardEvents.HeartbeatComplete, {\n\t\t\t\t\tackAt,\n\t\t\t\t\theartbeatAt: this.lastHeartbeatAt,\n\t\t\t\t\tlatency: ackAt - this.lastHeartbeatAt,\n\t\t\t\t});\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate onError(error: Error) {\n\t\tif ('code' in error && ['ECONNRESET', 'ECONNREFUSED'].includes(error.code as string)) {\n\t\t\tthis.debug(['Failed to connect to the gateway URL specified due to a network error']);\n\t\t\tthis.failedToConnectDueToNetworkError = true;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.emit(WebSocketShardEvents.Error, { error });\n\t}\n\n\tprivate async onClose(code: number) {\n\t\tthis.emit(WebSocketShardEvents.Closed, { code });\n\n\t\tswitch (code) {\n\t\t\tcase CloseCodes.Normal: {\n\t\t\t\treturn this.destroy({\n\t\t\t\t\tcode,\n\t\t\t\t\treason: 'Got disconnected by Discord',\n\t\t\t\t\trecover: WebSocketShardDestroyRecovery.Reconnect,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tcase CloseCodes.Resuming: {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.UnknownError: {\n\t\t\t\tthis.debug([`An unknown error occurred: ${code}`]);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.UnknownOpcode: {\n\t\t\t\tthis.debug(['An invalid opcode was sent to Discord.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.DecodeError: {\n\t\t\t\tthis.debug(['An invalid payload was sent to Discord.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.NotAuthenticated: {\n\t\t\t\tthis.debug(['A request was somehow sent before the identify/resume payload.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Reconnect });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.AuthenticationFailed: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Authentication failed'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.AlreadyAuthenticated: {\n\t\t\t\tthis.debug(['More than one auth payload was sent.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Reconnect });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.InvalidSeq: {\n\t\t\t\tthis.debug(['An invalid sequence was sent.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Reconnect });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.RateLimited: {\n\t\t\t\tthis.debug(['The WebSocket rate limit has been hit, this should never happen']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Reconnect });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.SessionTimedOut: {\n\t\t\t\tthis.debug(['Session timed out.']);\n\t\t\t\treturn this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.InvalidShard: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Invalid shard'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.ShardingRequired: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Sharding is required'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.InvalidAPIVersion: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Used an invalid API version'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.InvalidIntents: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Used invalid intents'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tcase GatewayCloseCodes.DisallowedIntents: {\n\t\t\t\tthis.emit(WebSocketShardEvents.Error, {\n\t\t\t\t\terror: new Error('Used disallowed intents'),\n\t\t\t\t});\n\t\t\t\treturn this.destroy({ code });\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\tthis.debug([\n\t\t\t\t\t`The gateway closed with an unexpected code ${code}, attempting to ${\n\t\t\t\t\t\tthis.failedToConnectDueToNetworkError ? 'reconnect' : 'resume'\n\t\t\t\t\t}.`,\n\t\t\t\t]);\n\t\t\t\treturn this.destroy({\n\t\t\t\t\tcode,\n\t\t\t\t\trecover: this.failedToConnectDueToNetworkError\n\t\t\t\t\t\t? WebSocketShardDestroyRecovery.Reconnect\n\t\t\t\t\t\t: WebSocketShardDestroyRecovery.Resume,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate debug(messages: [string, ...string[]]) {\n\t\tconst message = `${messages[0]}${\n\t\t\tmessages.length > 1\n\t\t\t\t? `\\n${messages\n\t\t\t\t\t\t.slice(1)\n\t\t\t\t\t\t.map((m) => `\t${m}`)\n\t\t\t\t\t\t.join('\\n')}`\n\t\t\t\t: ''\n\t\t}`;\n\n\t\tthis.emit(WebSocketShardEvents.Debug, { message });\n\t}\n}\n","import process from 'node:process';\nimport { Collection } from '@discordjs/collection';\nimport { lazy } from '@discordjs/util';\nimport { APIVersion, GatewayOpcodes } from 'discord-api-types/v10';\nimport { SimpleShardingStrategy } from '../strategies/sharding/SimpleShardingStrategy.js';\nimport { SimpleIdentifyThrottler } from '../throttling/SimpleIdentifyThrottler.js';\nimport type { SessionInfo, OptionalWebSocketManagerOptions, WebSocketManager } from '../ws/WebSocketManager.js';\nimport type { SendRateLimitState } from '../ws/WebSocketShard.js';\n\n/**\n * Valid encoding types\n */\nexport enum Encoding {\n\tJSON = 'json',\n}\n\n/**\n * Valid compression methods\n */\nexport enum CompressionMethod {\n\tZlibStream = 'zlib-stream',\n}\n\nexport const DefaultDeviceProperty = `@discordjs/ws 1.0.1` as `@discordjs/ws ${string}`;\n\nconst getDefaultSessionStore = lazy(() => new Collection<number, SessionInfo | null>());\n\n/**\n * Default options used by the manager\n */\nexport const DefaultWebSocketManagerOptions = {\n\tasync buildIdentifyThrottler(manager: WebSocketManager) {\n\t\tconst info = await manager.fetchGatewayInformation();\n\t\treturn new SimpleIdentifyThrottler(info.session_start_limit.max_concurrency);\n\t},\n\tbuildStrategy: (manager) => new SimpleShardingStrategy(manager),\n\tshardCount: null,\n\tshardIds: null,\n\tlargeThreshold: null,\n\tinitialPresence: null,\n\tidentifyProperties: {\n\t\tbrowser: DefaultDeviceProperty,\n\t\tdevice: DefaultDeviceProperty,\n\t\tos: process.platform,\n\t},\n\tversion: APIVersion,\n\tencoding: Encoding.JSON,\n\tcompression: null,\n\tretrieveSessionInfo(shardId) {\n\t\tconst store = getDefaultSessionStore();\n\t\treturn store.get(shardId) ?? null;\n\t},\n\tupdateSessionInfo(shardId: number, info: SessionInfo | null) {\n\t\tconst store = getDefaultSessionStore();\n\t\tif (info) {\n\t\t\tstore.set(shardId, info);\n\t\t} else {\n\t\t\tstore.delete(shardId);\n\t\t}\n\t},\n\thandshakeTimeout: 30_000,\n\thelloTimeout: 60_000,\n\treadyTimeout: 15_000,\n} as const satisfies OptionalWebSocketManagerOptions;\n\nexport const ImportantGatewayOpcodes = new Set([\n\tGatewayOpcodes.Heartbeat,\n\tGatewayOpcodes.Identify,\n\tGatewayOpcodes.Resume,\n]);\n\nexport function getInitialSendRateLimitState(): SendRateLimitState {\n\treturn {\n\t\tremaining: 120,\n\t\tresetAt: Date.now() + 60_000,\n\t};\n}\n","import { setTimeout as sleep } from 'node:timers/promises';\nimport { Collection } from '@discordjs/collection';\nimport { AsyncQueue } from '@sapphire/async-queue';\nimport type { IIdentifyThrottler } from './IIdentifyThrottler.js';\n\n/**\n * The state of a rate limit key's identify queue.\n */\nexport interface IdentifyState {\n\tqueue: AsyncQueue;\n\tresetsAt: number;\n}\n\n/**\n * Local, in-memory identify throttler.\n */\nexport class SimpleIdentifyThrottler implements IIdentifyThrottler {\n\tprivate readonly states = new Collection<number, IdentifyState>();\n\n\tpublic constructor(private readonly maxConcurrency: number) {}\n\n\t/**\n\t * {@inheritDoc IIdentifyThrottler.waitForIdentify}\n\t */\n\tpublic async waitForIdentify(shardId: number, signal: AbortSignal): Promise<void> {\n\t\tconst key = shardId % this.maxConcurrency;\n\n\t\tconst state = this.states.ensure(key, () => {\n\t\t\treturn {\n\t\t\t\tqueue: new AsyncQueue(),\n\t\t\t\tresetsAt: Number.POSITIVE_INFINITY,\n\t\t\t};\n\t\t});\n\n\t\tawait state.queue.wait({ signal });\n\n\t\ttry {\n\t\t\tconst diff = state.resetsAt - Date.now();\n\t\t\tif (diff <= 5_000) {\n\t\t\t\t// To account for the latency the IDENTIFY payload goes through, we add a bit more wait time\n\t\t\t\tconst time = diff + Math.random() * 1_500;\n\t\t\t\tawait sleep(time);\n\t\t\t}\n\n\t\t\tstate.resetsAt = Date.now() + 5_000;\n\t\t} finally {\n\t\t\tstate.queue.shift();\n\t\t}\n\t}\n}\n","import { isMainThread, parentPort, workerData } from 'node:worker_threads';\nimport { Collection } from '@discordjs/collection';\nimport type { Awaitable } from '@discordjs/util';\nimport { WorkerContextFetchingStrategy } from '../strategies/context/WorkerContextFetchingStrategy.js';\nimport {\n\tWorkerReceivePayloadOp,\n\tWorkerSendPayloadOp,\n\ttype WorkerData,\n\ttype WorkerReceivePayload,\n\ttype WorkerSendPayload,\n} from '../strategies/sharding/WorkerShardingStrategy.js';\nimport type { WebSocketShardDestroyOptions } from '../ws/WebSocketShard.js';\nimport { WebSocketShardEvents, WebSocketShard } from '../ws/WebSocketShard.js';\n\n/**\n * Options for bootstrapping the worker\n */\nexport interface BootstrapOptions {\n\t/**\n\t * Shard events to just arbitrarily forward to the parent thread for the manager to emit\n\t * Note: By default, this will include ALL events\n\t * you most likely want to handle dispatch within the worker itself\n\t */\n\tforwardEvents?: WebSocketShardEvents[];\n\t/**\n\t * Function to call when a shard is created for additional setup\n\t */\n\tshardCallback?(shard: WebSocketShard): Awaitable<void>;\n}\n\n/**\n * Utility class for bootstrapping a worker thread to be used for sharding\n */\nexport class WorkerBootstrapper {\n\t/**\n\t * The data passed to the worker thread\n\t */\n\tprotected readonly data = workerData as WorkerData;\n\n\t/**\n\t * The shards that are managed by this worker\n\t */\n\tprotected readonly shards = new Collection<number, WebSocketShard>();\n\n\tpublic constructor() {\n\t\tif (isMainThread) {\n\t\t\tthrow new Error('Expected WorkerBootstrap to not be used within the main thread');\n\t\t}\n\t}\n\n\t/**\n\t * Helper method to initiate a shard's connection process\n\t */\n\tprotected async connect(shardId: number): Promise<void> {\n\t\tconst shard = this.shards.get(shardId);\n\t\tif (!shard) {\n\t\t\tthrow new RangeError(`Shard ${shardId} does not exist`);\n\t\t}\n\n\t\tawait shard.connect();\n\t}\n\n\t/**\n\t * Helper method to destroy a shard\n\t */\n\tprotected async destroy(shardId: number, options?: WebSocketShardDestroyOptions): Promise<void> {\n\t\tconst shard = this.shards.get(shardId);\n\t\tif (!shard) {\n\t\t\tthrow new RangeError(`Shard ${shardId} does not exist`);\n\t\t}\n\n\t\tawait shard.destroy(options);\n\t}\n\n\t/**\n\t * Helper method to attach event listeners to the parentPort\n\t */\n\tprotected setupThreadEvents(): void {\n\t\tparentPort!\n\t\t\t.on('messageerror', (err) => {\n\t\t\t\tthrow err;\n\t\t\t})\n\t\t\t.on('message', async (payload: WorkerSendPayload) => {\n\t\t\t\tswitch (payload.op) {\n\t\t\t\t\tcase WorkerSendPayloadOp.Connect: {\n\t\t\t\t\t\tawait this.connect(payload.shardId);\n\t\t\t\t\t\tconst response: WorkerReceivePayload = {\n\t\t\t\t\t\t\top: WorkerReceivePayloadOp.Connected,\n\t\t\t\t\t\t\tshardId: payload.shardId,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tparentPort!.postMessage(response);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.Destroy: {\n\t\t\t\t\t\tawait this.destroy(payload.shardId, payload.options);\n\t\t\t\t\t\tconst response: WorkerReceivePayload = {\n\t\t\t\t\t\t\top: WorkerReceivePayloadOp.Destroyed,\n\t\t\t\t\t\t\tshardId: payload.shardId,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tparentPort!.postMessage(response);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.Send: {\n\t\t\t\t\t\tconst shard = this.shards.get(payload.shardId);\n\t\t\t\t\t\tif (!shard) {\n\t\t\t\t\t\t\tthrow new RangeError(`Shard ${payload.shardId} does not exist`);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tawait shard.send(payload.payload);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.SessionInfoResponse: {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.ShardIdentifyResponse: {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase WorkerSendPayloadOp.FetchStatus: {\n\t\t\t\t\t\tconst shard = this.shards.get(payload.shardId);\n\t\t\t\t\t\tif (!shard) {\n\t\t\t\t\t\t\tthrow new Error(`Shard ${payload.shardId} does not exist`);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst response: WorkerReceivePayload = {\n\t\t\t\t\t\t\top: WorkerReceivePayloadOp.FetchStatusResponse,\n\t\t\t\t\t\t\tstatus: shard.status,\n\t\t\t\t\t\t\tnonce: payload.nonce,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tparentPort!.postMessage(response);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\t/**\n\t * Bootstraps the worker thread with the provided options\n\t */\n\tpublic async bootstrap(options: Readonly<BootstrapOptions> = {}): Promise<void> {\n\t\t// Start by initializing the shards\n\t\tfor (const shardId of this.data.shardIds) {\n\t\t\tconst shard = new WebSocketShard(new WorkerContextFetchingStrategy(this.data), shardId);\n\t\t\tfor (const event of options.forwardEvents ?? Object.values(WebSocketShardEvents)) {\n\t\t\t\t// @ts-expect-error: Event types incompatible\n\t\t\t\tshard.on(event, (data) => {\n\t\t\t\t\tconst payload: WorkerReceivePayload = {\n\t\t\t\t\t\top: WorkerReceivePayloadOp.Event,\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\tdata,\n\t\t\t\t\t\tshardId,\n\t\t\t\t\t};\n\t\t\t\t\tparentPort!.postMessage(payload);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Any additional setup the user might want to do\n\t\t\tawait options.shardCallback?.(shard);\n\t\t\tthis.shards.set(shardId, shard);\n\t\t}\n\n\t\t// Lastly, start listening to messages from the parent thread\n\t\tthis.setupThreadEvents();\n\n\t\tconst message: WorkerReceivePayload = {\n\t\t\top: WorkerReceivePayloadOp.WorkerReady,\n\t\t};\n\t\tparentPort!.postMessage(message);\n\t}\n}\n","import type { REST } from '@discordjs/rest';\nimport { range, type Awaitable } from '@discordjs/util';\nimport { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';\nimport {\n\tRoutes,\n\ttype APIGatewayBotInfo,\n\ttype GatewayIdentifyProperties,\n\ttype GatewayPresenceUpdateData,\n\ttype RESTGetAPIGatewayBotResult,\n\ttype GatewayIntentBits,\n\ttype GatewaySendPayload,\n} from 'discord-api-types/v10';\nimport type { IShardingStrategy } from '../strategies/sharding/IShardingStrategy.js';\nimport type { IIdentifyThrottler } from '../throttling/IIdentifyThrottler.js';\nimport { DefaultWebSocketManagerOptions, type CompressionMethod, type Encoding } from '../utils/constants.js';\nimport type { WebSocketShardDestroyOptions, WebSocketShardEventsMap } from './WebSocketShard.js';\n\n/**\n * Represents a range of shard ids\n */\nexport interface ShardRange {\n\tend: number;\n\tstart: number;\n}\n\n/**\n * Session information for a given shard, used to resume a session\n */\nexport interface SessionInfo {\n\t/**\n\t * URL to use when resuming\n\t */\n\tresumeURL: string;\n\t/**\n\t * The sequence number of the last message sent by the shard\n\t */\n\tsequence: number;\n\t/**\n\t * Session id for this shard\n\t */\n\tsessionId: string;\n\t/**\n\t * The total number of shards at the time of this shard identifying\n\t */\n\tshardCount: number;\n\t/**\n\t * The id of the shard\n\t */\n\tshardId: number;\n}\n\n/**\n * Required options for the WebSocketManager\n */\nexport interface RequiredWebSocketManagerOptions {\n\t/**\n\t * The intents to request\n\t */\n\tintents: GatewayIntentBits | 0;\n\t/**\n\t * The REST instance to use for fetching gateway information\n\t */\n\trest: REST;\n\t/**\n\t * The token to use for identifying with the gateway\n\t */\n\ttoken: string;\n}\n\n/**\n * Optional additional configuration for the WebSocketManager\n */\nexport interface OptionalWebSocketManagerOptions {\n\t/**\n\t * Builds an identify throttler to use for this manager's shards\n\t */\n\tbuildIdentifyThrottler(manager: WebSocketManager): Awaitable<IIdentifyThrottler>;\n\t/**\n\t * Builds the strategy to use for sharding\n\t *\n\t * @example\n\t * ```ts\n\t * const manager = new WebSocketManager({\n\t * token: process.env.DISCORD_TOKEN,\n\t * intents: 0, // for no intents\n\t * rest,\n\t * buildStrategy: (manager) => new WorkerShardingStrategy(manager, { shardsPerWorker: 2 }),\n\t * });\n\t * ```\n\t */\n\tbuildStrategy(manager: WebSocketManager): IShardingStrategy;\n\t/**\n\t * The compression method to use\n\t *\n\t * @defaultValue `null` (no compression)\n\t */\n\tcompression: CompressionMethod | null;\n\t/**\n\t * The encoding to use\n\t *\n\t * @defaultValue `'json'`\n\t */\n\tencoding: Encoding;\n\t/**\n\t * How long to wait for a shard to connect before giving up\n\t */\n\thandshakeTimeout: number | null;\n\t/**\n\t * How long to wait for a shard's HELLO packet before giving up\n\t */\n\thelloTimeout: number | null;\n\t/**\n\t * Properties to send to the gateway when identifying\n\t */\n\tidentifyProperties: GatewayIdentifyProperties;\n\t/**\n\t * Initial presence data to send to the gateway when identifying\n\t */\n\tinitialPresence: GatewayPresenceUpdateData | null;\n\t/**\n\t * Value between 50 and 250, total number of members where the gateway will stop sending offline members in the guild member list\n\t */\n\tlargeThreshold: number | null;\n\t/**\n\t * How long to wait for a shard's READY packet before giving up\n\t */\n\treadyTimeout: number | null;\n\t/**\n\t * Function used to retrieve session information (and attempt to resume) for a given shard\n\t *\n\t * @example\n\t * ```ts\n\t * const manager = new WebSocketManager({\n\t * async retrieveSessionInfo(shardId): Awaitable<SessionInfo | null> {\n\t * // Fetch this info from redis or similar\n\t * return { sessionId: string, sequence: number };\n\t * // Return null if no information is found\n\t * },\n\t * });\n\t * ```\n\t */\n\tretrieveSessionInfo(shardId: number): Awaitable<SessionInfo | null>;\n\t/**\n\t * The total number of shards across all WebsocketManagers you intend to instantiate.\n\t * Use `null` to use Discord's recommended shard count\n\t */\n\tshardCount: number | null;\n\t/**\n\t * The ids of the shards this WebSocketManager should manage.\n\t * Use `null` to simply spawn 0 through `shardCount - 1`\n\t *\n\t * @example\n\t * ```ts\n\t * const manager = new WebSocketManager({\n\t * shardIds: [1, 3, 7], // spawns shard 1, 3, and 7, nothing else\n\t * });\n\t * ```\n\t * @example\n\t * ```ts\n\t * const manager = new WebSocketManager({\n\t * shardIds: {\n\t * start: 3,\n\t * end: 6,\n\t * }, // spawns shards 3, 4, 5, and 6\n\t * });\n\t * ```\n\t */\n\tshardIds: number[] | ShardRange | null;\n\t/**\n\t * Function used to store session information for a given shard\n\t */\n\tupdateSessionInfo(shardId: number, sessionInfo: SessionInfo | null): Awaitable<void>;\n\t/**\n\t * The gateway version to use\n\t *\n\t * @defaultValue `'10'`\n\t */\n\tversion: string;\n}\n\nexport type WebSocketManagerOptions = OptionalWebSocketManagerOptions & RequiredWebSocketManagerOptions;\n\nexport type ManagerShardEventsMap = {\n\t[K in keyof WebSocketShardEventsMap]: [\n\t\tWebSocketShardEventsMap[K] extends [] ? { shardId: number } : WebSocketShardEventsMap[K][0] & { shardId: number },\n\t];\n};\n\nexport class WebSocketManager extends AsyncEventEmitter<ManagerShardEventsMap> {\n\t/**\n\t * The options being used by this manager\n\t */\n\tpublic readonly options: WebSocketManagerOptions;\n\n\t/**\n\t * Internal cache for a GET /gateway/bot result\n\t */\n\tprivate gatewayInformation: {\n\t\tdata: APIGatewayBotInfo;\n\t\texpiresAt: number;\n\t} | null = null;\n\n\t/**\n\t * Internal cache for the shard ids\n\t */\n\tprivate shardIds: number[] | null = null;\n\n\t/**\n\t * Strategy used to manage shards\n\t *\n\t * @defaultValue `SimpleShardingStrategy`\n\t */\n\tprivate readonly strategy: IShardingStrategy;\n\n\tpublic constructor(options: Partial<OptionalWebSocketManagerOptions> & RequiredWebSocketManagerOptions) {\n\t\tsuper();\n\t\tthis.options = { ...DefaultWebSocketManagerOptions, ...options };\n\t\tthis.strategy = this.options.buildStrategy(this);\n\t}\n\n\t/**\n\t * Fetches the gateway information from Discord - or returns it from cache if available\n\t *\n\t * @param force - Whether to ignore the cache and force a fresh fetch\n\t */\n\tpublic async fetchGatewayInformation(force = false) {\n\t\tif (this.gatewayInformation) {\n\t\t\tif (this.gatewayInformation.expiresAt <= Date.now()) {\n\t\t\t\tthis.gatewayInformation = null;\n\t\t\t} else if (!force) {\n\t\t\t\treturn this.gatewayInformation.data;\n\t\t\t}\n\t\t}\n\n\t\tconst data = (await this.options.rest.get(Routes.gatewayBot())) as RESTGetAPIGatewayBotResult;\n\n\t\t// For single sharded bots session_start_limit.reset_after will be 0, use 5 seconds as a minimum expiration time\n\t\tthis.gatewayInformation = { data, expiresAt: Date.now() + (data.session_start_limit.reset_after || 5_000) };\n\t\treturn this.gatewayInformation.data;\n\t}\n\n\t/**\n\t * Updates your total shard count on-the-fly, spawning shards as needed\n\t *\n\t * @param shardCount - The new shard count to use\n\t */\n\tpublic async updateShardCount(shardCount: number | null) {\n\t\tawait this.strategy.destroy({ reason: 'User is adjusting their shards' });\n\t\tthis.options.shardCount = shardCount;\n\n\t\tconst shardIds = await this.getShardIds(true);\n\t\tawait this.strategy.spawn(shardIds);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Yields the total number of shards across for your bot, accounting for Discord recommendations\n\t */\n\tpublic async getShardCount(): Promise<number> {\n\t\tif (this.options.shardCount) {\n\t\t\treturn this.options.shardCount;\n\t\t}\n\n\t\tconst shardIds = await this.getShardIds();\n\t\treturn Math.max(...shardIds) + 1;\n\t}\n\n\t/**\n\t * Yields the ids of the shards this manager should manage\n\t */\n\tpublic async getShardIds(force = false): Promise<number[]> {\n\t\tif (this.shardIds && !force) {\n\t\t\treturn this.shardIds;\n\t\t}\n\n\t\tlet shardIds: number[];\n\t\tif (this.options.shardIds) {\n\t\t\tif (Array.isArray(this.options.shardIds)) {\n\t\t\t\tshardIds = this.options.shardIds;\n\t\t\t} else {\n\t\t\t\tconst { start, end } = this.options.shardIds;\n\t\t\t\tshardIds = [...range({ start, end: end + 1 })];\n\t\t\t}\n\t\t} else {\n\t\t\tconst data = await this.fetchGatewayInformation();\n\t\t\tshardIds = [...range(this.options.shardCount ?? data.shards)];\n\t\t}\n\n\t\tthis.shardIds = shardIds;\n\t\treturn shardIds;\n\t}\n\n\tpublic async connect() {\n\t\tconst shardCount = await this.getShardCount();\n\n\t\tconst data = await this.fetchGatewayInformation();\n\t\tif (data.session_start_limit.remaining < shardCount) {\n\t\t\tthrow new Error(\n\t\t\t\t`Not enough sessions remaining to spawn ${shardCount} shards; only ${\n\t\t\t\t\tdata.session_start_limit.remaining\n\t\t\t\t} remaining; resets at ${new Date(Date.now() + data.session_start_limit.reset_after).toISOString()}`,\n\t\t\t);\n\t\t}\n\n\t\t// First, make sure all our shards are spawned\n\t\tawait this.updateShardCount(shardCount);\n\t\tawait this.strategy.connect();\n\t}\n\n\tpublic destroy(options?: Omit<WebSocketShardDestroyOptions, 'recover'>) {\n\t\treturn this.strategy.destroy(options);\n\t}\n\n\tpublic send(shardId: number, payload: GatewaySendPayload) {\n\t\treturn this.strategy.send(shardId, payload);\n\t}\n\n\tpublic fetchStatus() {\n\t\treturn this.strategy.fetchStatus();\n\t}\n}\n","export * from './strategies/context/IContextFetchingStrategy.js';\nexport * from './strategies/context/SimpleContextFetchingStrategy.js';\nexport * from './strategies/context/WorkerContextFetchingStrategy.js';\n\nexport * from './strategies/sharding/IShardingStrategy.js';\nexport * from './strategies/sharding/SimpleShardingStrategy.js';\nexport * from './strategies/sharding/WorkerShardingStrategy.js';\n\nexport * from './throttling/IIdentifyThrottler.js';\nexport * from './throttling/SimpleIdentifyThrottler.js';\n\nexport * from './utils/constants.js';\nexport * from './utils/WorkerBootstrapper.js';\n\nexport * from './ws/WebSocketManager.js';\nexport * from './ws/WebSocketShard.js';\n\n/**\n * The {@link https://github.com/discordjs/discord.js/blob/main/packages/ws/#readme | @discordjs/ws} version\n * that you are currently using.\n */\n// This needs to explicitly be `string` so it is not typed as a \"const string\" that gets injected by esbuild\nexport const version = '1.0.1' as string;\n"],"mappings":";;;;;;;;;;;AACA,SAAS,qBAAqB;AAC9B,OAAO,UAAU;AAEjB,IAAM,cAAc,6BAAM,cAAc,YAAY,GAAG,GAAnC;AACpB,IAAM,aAAa,6BAAM,KAAK,QAAQ,YAAY,CAAC,GAAhC;AAEZ,IAAM,YAA4B,2BAAW;;;AC2BpD,eAAsB,iCAAiC,SAA6D;AAEnH,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACJ,IAAI,QAAQ;AAGZ,SAAO;AAAA,IACN,GAAG;AAAA,IACH,oBAAoB,MAAM,QAAQ,wBAAwB;AAAA,IAC1D,YAAY,MAAM,QAAQ,cAAc;AAAA,EACzC;AACD;AAnBsB;;;AC9Bf,IAAM,gCAAN,MAAM,+BAAkE;AAAA,EAiBvE,YAA6B,SAA2C,SAAkC;AAA7E;AAA2C;AAAA,EAAmC;AAAA,EArBnH,OAI+E;AAAA;AAAA;AAAA;AAAA;AAAA,EAG9E,OAAe,iBAAiB,oBAAI,QAA8C;AAAA,EAElF,aAAqB,gBAAgB,SAAwD;AAC5F,UAAM,YAAY,+BAA8B,eAAe,IAAI,OAAO;A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,KAAK,SAAS,OAAO;AAAA,EAC3C;AAAA,EAEO,cAAc;AACpB,WAAO,KAAK,SAAS,YAAY;AAAA,EAClC;AACD;;;AC3SO,IAAM,UAAU;","names":["Collection","WorkerSendPayloadOp","WorkerReceivePayloadOp","workerData","resolve","path","Collection","resolve","payload","Collection","Buffer","once","sleep","Collection","lazy","AsyncQueue","GatewayOpcodes","Collection","Collection","Collection","Encoding","CompressionMethod","Collection","lazy","WebSocketShardEvents","WebSocketShardStatus","WebSocketShardDestroyRecovery","CloseCodes","AsyncQueue","Collection","once","version","resolve","sleep","GatewayOpcodes","Buffer","session","Collection","isMainThread","parentPort","Collection","Collection","isMainThread","parentPort","AsyncEventEmitter","AsyncEventEmitter"]} \ No newline at end of file
diff --git a/node_modules/@discordjs/ws/package.json b/node_modules/@discordjs/ws/package.json
new file mode 100644
index 0000000..46ba7d4
--- /dev/null
+++ b/node_modules/@discordjs/ws/package.json
@@ -0,0 +1,99 @@
+{
+ "name": "@discordjs/ws",
+ "version": "1.0.1",
+ "description": "Wrapper around Discord's gateway",
+ "scripts": {
+ "test": "vitest run",
+ "build": "tsup",
+ "build:docs": "tsc -p tsconfig.docs.json",
+ "lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --format=pretty",
+ "format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty",
+ "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json",
+ "prepack": "yarn build && yarn lint",
+ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/ws/*'",
+ "release": "cliff-jumper"
+ },
+ "main": "./dist/index.js",
+ "module": "./dist/index.mjs",
+ "typings": "./dist/index.d.ts",
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "import": "./dist/index.mjs",
+ "require": "./dist/index.js"
+ },
+ "./defaultWorker": {
+ "types": null,
+ "import": "./dist/defaultWorker.mjs",
+ "require": "./dist/defaultWorker.js"
+ }
+ },
+ "directories": {
+ "lib": "src",
+ "test": "__tests__"
+ },
+ "files": [
+ "dist"
+ ],
+ "contributors": [
+ "Crawl <icrawltogo@gmail.com>",
+ "Amish Shah <amishshah.2k@gmail.com>",
+ "SpaceEEC <spaceeec@yahoo.com>",
+ "Vlad Frangu <kingdgrizzle@gmail.com>",
+ "Aura Román <kyradiscord@gmail.com>",
+ "DD <didinele.dev@gmail.com>"
+ ],
+ "license": "Apache-2.0",
+ "keywords": [
+ "discord",
+ "api",
+ "gateway",
+ "discordapp",
+ "discordjs"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/discordjs/discord.js.git",
+ "directory": "packages/ws"
+ },
+ "bugs": {
+ "url": "https://github.com/discordjs/discord.js/issues"
+ },
+ "homepage": "https://discord.js.org",
+ "dependencies": {
+ "@discordjs/collection": "^1.5.3",
+ "@discordjs/rest": "^2.0.1",
+ "@discordjs/util": "^1.0.1",
+ "@sapphire/async-queue": "^1.5.0",
+ "@types/ws": "^8.5.5",
+ "@vladfrangu/async_event_emitter": "^2.2.2",
+ "discord-api-types": "0.37.50",
+ "tslib": "^2.6.1",
+ "ws": "^8.13.0"
+ },
+ "devDependencies": {
+ "@favware/cliff-jumper": "^2.1.1",
+ "@microsoft/api-extractor": "^7.36.4",
+ "@types/node": "18.17.5",
+ "@vitest/coverage-v8": "^0.34.2",
+ "cross-env": "^7.0.3",
+ "esbuild-plugin-version-injector": "^1.2.0",
+ "eslint": "^8.47.0",
+ "eslint-config-neon": "^0.1.47",
+ "eslint-formatter-pretty": "^5.0.0",
+ "mock-socket": "^9.2.1",
+ "prettier": "^2.8.8",
+ "tsup": "^7.2.0",
+ "turbo": "^1.10.12",
+ "typescript": "^5.1.6",
+ "undici": "5.22.1",
+ "vitest": "^0.34.2",
+ "zlib-sync": "^0.1.8"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ },
+ "publishConfig": {
+ "access": "public"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@sapphire/async-queue/CHANGELOG.md b/node_modules/@sapphire/async-queue/CHANGELOG.md
new file mode 100644
index 0000000..f2d02e0
--- /dev/null
+++ b/node_modules/@sapphire/async-queue/CHANGELOG.md
@@ -0,0 +1,148 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+# [@sapphire/async-queue@1.5.0](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.4.0...@sapphire/async-queue@1.5.0) - (2022-08-16)
+
+## 🐛 Bug Fixes
+
+- **deps:** Update all non-major dependencies ([2308bd7](https://github.com/sapphiredev/utilities/commit/2308bd74356b6b2e0c12995b25f4d8ade4803fe9))
+
+## 🚀 Features
+
+- Add `AsyncQueue#abortAll` (#429) ([b351e70](https://github.com/sapphiredev/utilities/commit/b351e70ebef329009daaebba89729ee84bb5704c))
+
+# [@sapphire/async-queue@1.4.0](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.3.1...@sapphire/async-queue@1.4.0) - (2022-08-07)
+
+## 🐛 Bug Fixes
+
+- **deps:** Update all non-major dependencies ([84af0db](https://github.com/sapphiredev/utilities/commit/84af0db2db749223b036aa99fe19a2e9af5681c6))
+- **deps:** Update all non-major dependencies ([50cd8de](https://github.com/sapphiredev/utilities/commit/50cd8dea593b6f5ae75571209456b3421e2ca59a))
+
+## 📝 Documentation
+
+- Add @muchnameless as a contributor ([a1221fe](https://github.com/sapphiredev/utilities/commit/a1221fea68506e99591d5d00ec552a07c26833f9))
+- Add @enxg as a contributor ([d2382f0](https://github.com/sapphiredev/utilities/commit/d2382f04e3909cb4ad11798a0a10e683f6cf5383))
+- Add @EvolutionX-10 as a contributor ([efc3a32](https://github.com/sapphiredev/utilities/commit/efc3a320a72ae258996dd62866d206c33f8d4961))
+- Add @MajesticString as a contributor ([295b3e9](https://github.com/sapphiredev/utilities/commit/295b3e9849a4b0fe64074bae02f6426378a303c3))
+- Add @Mzato0001 as a contributor ([c790ef2](https://github.com/sapphiredev/utilities/commit/c790ef25df2d7e22888fa9f8169167aa555e9e19))
+- Add @NotKaskus as a contributor ([00da8f1](https://github.com/sapphiredev/utilities/commit/00da8f199137b9277119823f322d1f2d168d928a))
+- Add @imranbarbhuiya as a contributor ([fb674c2](https://github.com/sapphiredev/utilities/commit/fb674c2c5594d41e71662263553dcb4bac9e37f4))
+- Add @axisiscool as a contributor ([ce1aa31](https://github.com/sapphiredev/utilities/commit/ce1aa316871a88d3663efbdf2a42d3d8dfe6a27f))
+- Add @dhruv-kaushikk as a contributor ([ebbf43f](https://github.com/sapphiredev/utilities/commit/ebbf43f63617daba96e72c50a234bf8b64f6ddc4))
+- Add @Commandtechno as a contributor ([f1d69fa](https://github.com/sapphiredev/utilities/commit/f1d69fabe1ee0abe4be08b19e63dbec03102f7ce))
+- Fix typedoc causing OOM crashes ([63ba41c](https://github.com/sapphiredev/utilities/commit/63ba41c4b6678554b1c7043a22d3296db4f59360))
+
+## 🚀 Features
+
+- **AsyncQueue:** Add AbortSignal support (#417) ([c0629e7](https://github.com/sapphiredev/utilities/commit/c0629e781ebc3f48e496a0851191b32e91f62fe9))
+
+## 🧪 Testing
+
+- Migrate to vitest (#380) ([075ec73](https://github.com/sapphiredev/utilities/commit/075ec73c7a8e3374fad3ada612d37eb4ac36ec8d))
+
+## [1.3.1](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.3.0...@sapphire/async-queue@1.3.1) (2022-04-01)
+
+**Note:** Version bump only for package @sapphire/async-queue
+
+# [1.3.0](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.2.0...@sapphire/async-queue@1.3.0) (2022-03-06)
+
+### Features
+
+- allow module: NodeNext ([#306](https://github.com/sapphiredev/utilities/issues/306)) ([9dc6dd6](https://github.com/sapphiredev/utilities/commit/9dc6dd619efab879bb2b0b3c9e64304e10a67ed6))
+- **ts-config:** add multi-config structure ([#281](https://github.com/sapphiredev/utilities/issues/281)) ([b5191d7](https://github.com/sapphiredev/utilities/commit/b5191d7f2416dc5838590c4ff221454925553e37))
+
+# [1.2.0](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.1.9...@sapphire/async-queue@1.2.0) (2022-01-28)
+
+### Features
+
+- change build system to tsup ([#270](https://github.com/sapphiredev/utilities/issues/270)) ([365a53a](https://github.com/sapphiredev/utilities/commit/365a53a5517a01a0926cf28a83c96b63f32ed9f8))
+
+## [1.1.9](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.1.8...@sapphire/async-queue@1.1.9) (2021-11-06)
+
+**Note:** Version bump only for package @sapphire/async-queue
+
+## [1.1.8](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.1.7...@sapphire/async-queue@1.1.8) (2021-10-26)
+
+**Note:** Version bump only for package @sapphire/async-queue
+
+## [1.1.7](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.1.6...@sapphire/async-queue@1.1.7) (2021-10-17)
+
+### Bug Fixes
+
+- allow more node & npm versions in engines field ([5977d2a](https://github.com/sapphiredev/utilities/commit/5977d2a30a4b2cfdf84aff3f33af03ffde1bbec5))
+
+## [1.1.6](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.1.5...@sapphire/async-queue@1.1.6) (2021-10-11)
+
+**Note:** Version bump only for package @sapphire/async-queue
+
+## [1.1.5](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.1.4...@sapphire/async-queue@1.1.5) (2021-10-04)
+
+**Note:** Version bump only for package @sapphire/async-queue
+
+## [1.1.4](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.1.3...@sapphire/async-queue@1.1.4) (2021-06-27)
+
+**Note:** Version bump only for package @sapphire/async-queue
+
+## [1.1.3](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.1.2...@sapphire/async-queue@1.1.3) (2021-06-06)
+
+### Bug Fixes
+
+- remove peer deps, update dev deps, update READMEs ([#124](https://github.com/sapphiredev/utilities/issues/124)) ([67256ed](https://github.com/sapphiredev/utilities/commit/67256ed43b915b02a8b5c68230ba82d6210c5032))
+
+## [1.1.2](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.1.1...@sapphire/async-queue@1.1.2) (2021-05-20)
+
+### Bug Fixes
+
+- **async-queue:** mark package as side effect free ([1c4b901](https://github.com/sapphiredev/utilities/commit/1c4b901cda3d14bd085c35cc74e160f844567ba7))
+
+## [1.1.1](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.1.0...@sapphire/async-queue@1.1.1) (2021-05-02)
+
+### Bug Fixes
+
+- drop the `www.` from the SapphireJS URL ([494d89f](https://github.com/sapphiredev/utilities/commit/494d89ffa04f78c195b93d7905b3232884f7d7e2))
+- update all the SapphireJS URLs from `.com` to `.dev` ([f59b46d](https://github.com/sapphiredev/utilities/commit/f59b46d1a0ebd39cad17b17d71cd3b9da808d5fd))
+
+# [1.1.0](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.0.7...@sapphire/async-queue@1.1.0) (2021-04-21)
+
+### Features
+
+- add @sapphire/embed-jsx ([#100](https://github.com/sapphiredev/utilities/issues/100)) ([7277a23](https://github.com/sapphiredev/utilities/commit/7277a236015236ed8e81b7882875410facc4ce17))
+
+## [1.0.7](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.0.6...@sapphire/async-queue@1.0.7) (2021-04-19)
+
+### Bug Fixes
+
+- change all Sapphire URLs from "project"->"community" & use our domain where applicable 👨‍🌾🚜 ([#102](https://github.com/sapphiredev/utilities/issues/102)) ([835b408](https://github.com/sapphiredev/utilities/commit/835b408e8e57130c3787aca2e32613346ff23e4d))
+
+## [1.0.6](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.0.5...@sapphire/async-queue@1.0.6) (2021-04-03)
+
+**Note:** Version bump only for package @sapphire/async-queue
+
+## [1.0.5](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.0.4...@sapphire/async-queue@1.0.5) (2021-03-16)
+
+### Bug Fixes
+
+- remove terser from all packages ([#79](https://github.com/sapphiredev/utilities/issues/79)) ([1cfe4e7](https://github.com/sapphiredev/utilities/commit/1cfe4e7c804e62c142495686d2b83b81d0026c02))
+
+## [1.0.4](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.0.3...@sapphire/async-queue@1.0.4) (2021-02-16)
+
+**Note:** Version bump only for package @sapphire/async-queue
+
+## [1.0.3](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.0.2...@sapphire/async-queue@1.0.3) (2021-02-13)
+
+**Note:** Version bump only for package @sapphire/async-queue
+
+## [1.0.2](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.0.1...@sapphire/async-queue@1.0.2) (2021-01-25)
+
+**Note:** Version bump only for package @sapphire/async-queue
+
+## [1.0.1](https://github.com/sapphiredev/utilities/compare/@sapphire/async-queue@1.0.0...@sapphire/async-queue@1.0.1) (2021-01-16)
+
+**Note:** Version bump only for package @sapphire/async-queue
+
+# 1.0.0 (2021-01-13)
+
+### Features
+
+- **async-queue:** add async-queue package ([#56](https://github.com/sapphiredev/utilities/issues/56)) ([ba81832](https://github.com/sapphiredev/utilities/commit/ba8183287dbbc3f3d7d79af6d5a2d3dd8d62f63e))
diff --git a/node_modules/@sapphire/async-queue/README.md b/node_modules/@sapphire/async-queue/README.md
new file mode 100644
index 0000000..40d1358
--- /dev/null
+++ b/node_modules/@sapphire/async-queue/README.md
@@ -0,0 +1,116 @@
+<div align="center">
+
+![Sapphire Logo](https://cdn.skyra.pw/gh-assets/sapphire-banner.png)
+
+# @sapphire/async-queue
+
+**Sequential asynchronous lock-based queue for promises.**
+
+[![GitHub](https://img.shields.io/github/license/sapphiredev/utilities)](https://github.com/sapphiredev/utilities/blob/main/LICENSE.md)
+[![codecov](https://codecov.io/gh/sapphiredev/utilities/branch/main/graph/badge.svg?token=OEGIV6RFDO)](https://codecov.io/gh/sapphiredev/utilities)
+[![npm bundle size](https://img.shields.io/bundlephobia/min/@sapphire/async-queue?logo=webpack&style=flat-square)](https://bundlephobia.com/result?p=@sapphire/async-queue)
+[![npm](https://img.shields.io/npm/v/@sapphire/async-queue?color=crimson&logo=npm&style=flat-square)](https://www.npmjs.com/package/@sapphire/async-queue)
+
+</div>
+
+## Description
+
+Ever needed a queue for a set of promises? This is the package for you.
+
+## Features
+
+- Written in TypeScript
+- Bundled with esbuild so it can be used in NodeJS and browsers
+- Offers CommonJS, ESM and UMD bundles
+- Fully tested
+
+## Installation
+
+You can use the following command to install this package, or replace `npm install` with your package manager of choice.
+
+```sh
+npm install @sapphire/async-queue
+```
+
+---
+
+## Buy us some doughnuts
+
+Sapphire Community is and always will be open source, even if we don't get donations. That being said, we know there are amazing people who may still want to donate just to show their appreciation. Thank you very much in advance!
+
+We accept donations through Open Collective, Ko-fi, PayPal, Patreon and GitHub Sponsorships. You can use the buttons below to donate through your method of choice.
+
+| Donate With | Address |
+| :-------------: | :-------------------------------------------------: |
+| Open Collective | [Click Here](https://sapphirejs.dev/opencollective) |
+| Ko-fi | [Click Here](https://sapphirejs.dev/kofi) |
+| Patreon | [Click Here](https://sapphirejs.dev/patreon) |
+| PayPal | [Click Here](https://sapphirejs.dev/paypal) |
+
+## Contributors ✨
+
+Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
+
+<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
+<!-- prettier-ignore-start -->
+<!-- markdownlint-disable -->
+<table>
+ <tr>
+ <td align="center"><a href="https://favware.tech/"><img src="https://avatars3.githubusercontent.com/u/4019718?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jeroen Claassens</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=favna" title="Code">💻</a> <a href="#infra-favna" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#projectManagement-favna" title="Project Management">📆</a> <a href="https://github.com/sapphiredev/utilities/commits?author=favna" title="Documentation">📖</a> <a href="https://github.com/sapphiredev/utilities/commits?author=favna" title="Tests">⚠️</a></td>
+ <td align="center"><a href="https://github.com/kyranet"><img src="https://avatars0.githubusercontent.com/u/24852502?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Antonio Román</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=kyranet" title="Code">💻</a> <a href="#projectManagement-kyranet" title="Project Management">📆</a> <a href="https://github.com/sapphiredev/utilities/pulls?q=is%3Apr+reviewed-by%3Akyranet" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/sapphiredev/utilities/commits?author=kyranet" title="Tests">⚠️</a></td>
+ <td align="center"><a href="https://github.com/PyroTechniac"><img src="https://avatars2.githubusercontent.com/u/39341355?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gryffon Bellish</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=PyroTechniac" title="Code">💻</a> <a href="https://github.com/sapphiredev/utilities/pulls?q=is%3Apr+reviewed-by%3APyroTechniac" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/sapphiredev/utilities/commits?author=PyroTechniac" title="Tests">⚠️</a></td>
+ <td align="center"><a href="https://github.com/vladfrangu"><img src="https://avatars3.githubusercontent.com/u/17960496?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vlad Frangu</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=vladfrangu" title="Code">💻</a> <a href="https://github.com/sapphiredev/utilities/issues?q=author%3Avladfrangu" title="Bug reports">🐛</a> <a href="https://github.com/sapphiredev/utilities/pulls?q=is%3Apr+reviewed-by%3Avladfrangu" title="Reviewed Pull Requests">👀</a> <a href="#userTesting-vladfrangu" title="User Testing">📓</a> <a href="https://github.com/sapphiredev/utilities/commits?author=vladfrangu" title="Tests">⚠️</a></td>
+ <td align="center"><a href="https://github.com/Stitch07"><img src="https://avatars0.githubusercontent.com/u/29275227?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stitch07</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Stitch07" title="Code">💻</a> <a href="#projectManagement-Stitch07" title="Project Management">📆</a> <a href="https://github.com/sapphiredev/utilities/commits?author=Stitch07" title="Tests">⚠️</a></td>
+ <td align="center"><a href="https://github.com/apps/depfu"><img src="https://avatars3.githubusercontent.com/in/715?v=4?s=100" width="100px;" alt=""/><br /><sub><b>depfu[bot]</b></sub></a><br /><a href="#maintenance-depfu[bot]" title="Maintenance">🚧</a></td>
+ <td align="center"><a href="https://github.com/apps/allcontributors"><img src="https://avatars0.githubusercontent.com/in/23186?v=4?s=100" width="100px;" alt=""/><br /><sub><b>allcontributors[bot]</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=allcontributors[bot]" title="Documentation">📖</a></td>
+ </tr>
+ <tr>
+ <td align="center"><a href="https://github.com/Nytelife26"><img src="https://avatars1.githubusercontent.com/u/22531310?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tyler J Russell</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Nytelife26" title="Documentation">📖</a></td>
+ <td align="center"><a href="https://github.com/Alcremie"><img src="https://avatars0.githubusercontent.com/u/54785334?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ivan Lieder</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Alcremie" title="Code">💻</a> <a href="https://github.com/sapphiredev/utilities/issues?q=author%3AAlcremie" title="Bug reports">🐛</a></td>
+ <td align="center"><a href="https://github.com/RealShadowNova"><img src="https://avatars3.githubusercontent.com/u/46537907?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hezekiah Hendry</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=RealShadowNova" title="Code">💻</a></td>
+ <td align="center"><a href="https://github.com/Vetlix"><img src="https://avatars.githubusercontent.com/u/31412314?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vetlix</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Vetlix" title="Code">💻</a></td>
+ <td align="center"><a href="https://github.com/ethamitc"><img src="https://avatars.githubusercontent.com/u/27776796?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ethan Mitchell</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=ethamitc" title="Documentation">📖</a></td>
+ <td align="center"><a href="https://github.com/noftaly"><img src="https://avatars.githubusercontent.com/u/34779161?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Elliot</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=noftaly" title="Code">💻</a></td>
+ <td align="center"><a href="https://jurien.dev"><img src="https://avatars.githubusercontent.com/u/5418114?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jurien Hamaker</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=jurienhamaker" title="Code">💻</a></td>
+ </tr>
+ <tr>
+ <td align="center"><a href="https://fanoulis.dev/"><img src="https://avatars.githubusercontent.com/u/38255093?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Charalampos Fanoulis</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=cfanoulis" title="Documentation">📖</a></td>
+ <td align="center"><a href="https://github.com/apps/dependabot"><img src="https://avatars.githubusercontent.com/in/29110?v=4?s=100" width="100px;" alt=""/><br /><sub><b>dependabot[bot]</b></sub></a><br /><a href="#maintenance-dependabot[bot]" title="Maintenance">🚧</a></td>
+ <td align="center"><a href="https://kaname.netlify.app/"><img src="https://avatars.githubusercontent.com/u/56084970?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kaname</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=kaname-png" title="Code">💻</a></td>
+ <td align="center"><a href="https://github.com/nandhagk"><img src="https://avatars.githubusercontent.com/u/62976649?v=4?s=100" width="100px;" alt=""/><br /><sub><b>nandhagk</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/issues?q=author%3Anandhagk" title="Bug reports">🐛</a></td>
+ <td align="center"><a href="https://megatank58.me/"><img src="https://avatars.githubusercontent.com/u/51410502?v=4?s=100" width="100px;" alt=""/><br /><sub><b>megatank58</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=megatank58" title="Code">💻</a></td>
+ <td align="center"><a href="https://github.com/UndiedGamer"><img src="https://avatars.githubusercontent.com/u/84702365?v=4?s=100" width="100px;" alt=""/><br /><sub><b>UndiedGamer</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=UndiedGamer" title="Code">💻</a></td>
+ <td align="center"><a href="https://github.com/Lioness100"><img src="https://avatars.githubusercontent.com/u/65814829?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Lioness100</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Lioness100" title="Documentation">📖</a> <a href="https://github.com/sapphiredev/utilities/commits?author=Lioness100" title="Code">💻</a></td>
+ </tr>
+ <tr>
+ <td align="center"><a href="https://gitlab.com/DavidPH/"><img src="https://avatars.githubusercontent.com/u/44669930?v=4?s=100" width="100px;" alt=""/><br /><sub><b>David</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=DavidPHH" title="Code">💻</a></td>
+ <td align="center"><a href="https://github.com/apps/renovate"><img src="https://avatars.githubusercontent.com/in/2740?v=4?s=100" width="100px;" alt=""/><br /><sub><b>renovate[bot]</b></sub></a><br /><a href="#maintenance-renovate[bot]" title="Maintenance">🚧</a></td>
+ <td align="center"><a href="https://renovate.whitesourcesoftware.com/"><img src="https://avatars.githubusercontent.com/u/25180681?v=4?s=100" width="100px;" alt=""/><br /><sub><b>WhiteSource Renovate</b></sub></a><br /><a href="#maintenance-renovate-bot" title="Maintenance">🚧</a></td>
+ <td align="center"><a href="https://fc5570.me/"><img src="https://avatars.githubusercontent.com/u/68158483?v=4?s=100" width="100px;" alt=""/><br /><sub><b>FC</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=FC5570" title="Code">💻</a></td>
+ <td align="center"><a href="https://github.com/Tokipudi"><img src="https://avatars.githubusercontent.com/u/29551076?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jérémy de Saint Denis</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Tokipudi" title="Code">💻</a></td>
+ <td align="center"><a href="https://github.com/ItsMrCube"><img src="https://avatars.githubusercontent.com/u/25201357?v=4?s=100" width="100px;" alt=""/><br /><sub><b>MrCube</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=ItsMrCube" title="Code">💻</a></td>
+ <td align="center"><a href="https://github.com/bitomic"><img src="https://avatars.githubusercontent.com/u/35199700?v=4?s=100" width="100px;" alt=""/><br /><sub><b>bitomic</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=bitomic" title="Code">💻</a></td>
+ </tr>
+ <tr>
+ <td align="center"><a href="https://c43721.dev/"><img src="https://avatars.githubusercontent.com/u/55610086?v=4?s=100" width="100px;" alt=""/><br /><sub><b>c43721</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=c43721" title="Code">💻</a></td>
+ <td align="center"><a href="https://commandtechno.com/"><img src="https://avatars.githubusercontent.com/u/68407783?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Commandtechno</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Commandtechno" title="Code">💻</a></td>
+ <td align="center"><a href="https://github.com/dhruv-kaushikk"><img src="https://avatars.githubusercontent.com/u/73697546?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aura</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=dhruv-kaushikk" title="Code">💻</a></td>
+ <td align="center"><a href="https://axis.moe/"><img src="https://avatars.githubusercontent.com/u/54381371?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jonathan</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=axisiscool" title="Code">💻</a></td>
+ <td align="center"><a href="https://github.com/imranbarbhuiya"><img src="https://avatars.githubusercontent.com/u/74945038?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Parbez</b></sub></a><br /><a href="#maintenance-imranbarbhuiya" title="Maintenance">🚧</a></td>
+ <td align="center"><a href="https://github.com/NotKaskus"><img src="https://avatars.githubusercontent.com/u/75168528?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Paul Andrew</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=NotKaskus" title="Documentation">📖</a></td>
+ <td align="center"><a href="https://linktr.ee/mzato0001"><img src="https://avatars.githubusercontent.com/u/62367547?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mzato</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Mzato0001" title="Code">💻</a> <a href="https://github.com/sapphiredev/utilities/issues?q=author%3AMzato0001" title="Bug reports">🐛</a></td>
+ </tr>
+ <tr>
+ <td align="center"><a href="https://github.com/MajesticString"><img src="https://avatars.githubusercontent.com/u/66224939?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Harry Allen</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=MajesticString" title="Documentation">📖</a></td>
+ <td align="center"><a href="https://github.com/EvolutionX-10"><img src="https://avatars.githubusercontent.com/u/85353424?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Evo</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=EvolutionX-10" title="Code">💻</a></td>
+ <td align="center"><a href="https://enes.ovh/"><img src="https://avatars.githubusercontent.com/u/61084101?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Enes Genç</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=enxg" title="Code">💻</a></td>
+ <td align="center"><a href="https://github.com/muchnameless"><img src="https://avatars.githubusercontent.com/u/12682826?v=4?s=100" width="100px;" alt=""/><br /><sub><b>muchnameless</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=muchnameless" title="Code">💻</a></td>
+ </tr>
+</table>
+
+<!-- markdownlint-restore -->
+<!-- prettier-ignore-end -->
+
+<!-- ALL-CONTRIBUTORS-LIST:END -->
+
+This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
diff --git a/node_modules/@sapphire/async-queue/dist/index.d.ts b/node_modules/@sapphire/async-queue/dist/index.d.ts
new file mode 100644
index 0000000..0ea062c
--- /dev/null
+++ b/node_modules/@sapphire/async-queue/dist/index.d.ts
@@ -0,0 +1,55 @@
+/**
+ * The AsyncQueue class used to sequentialize burst requests
+ */
+declare class AsyncQueue {
+ /**
+ * The amount of entries in the queue, including the head.
+ * @seealso {@link queued} for the queued count.
+ */
+ get remaining(): number;
+ /**
+ * The amount of queued entries.
+ * @seealso {@link remaining} for the count with the head.
+ */
+ get queued(): number;
+ /**
+ * The promises array
+ */
+ private promises;
+ /**
+ * Waits for last promise and queues a new one
+ * @example
+ * ```typescript
+ * const queue = new AsyncQueue();
+ * async function request(url, options) {
+ * await queue.wait({ signal: options.signal });
+ * try {
+ * const result = await fetch(url, options);
+ * // Do some operations with 'result'
+ * } finally {
+ * // Remove first entry from the queue and resolve for the next entry
+ * queue.shift();
+ * }
+ * }
+ *
+ * request(someUrl1, someOptions1); // Will call fetch() immediately
+ * request(someUrl2, someOptions2); // Will call fetch() after the first finished
+ * request(someUrl3, someOptions3); // Will call fetch() after the second finished
+ * ```
+ */
+ wait(options?: Readonly<AsyncQueueWaitOptions>): Promise<void>;
+ /**
+ * Unlocks the head lock and transfers the next lock (if any) to the head.
+ */
+ shift(): void;
+ /**
+ * Aborts all the pending promises.
+ * @note To avoid race conditions, this does **not** unlock the head lock.
+ */
+ abortAll(): void;
+}
+interface AsyncQueueWaitOptions {
+ signal?: AbortSignal | undefined | null;
+}
+
+export { AsyncQueue, AsyncQueueWaitOptions };
diff --git a/node_modules/@sapphire/async-queue/dist/index.global.js b/node_modules/@sapphire/async-queue/dist/index.global.js
new file mode 100644
index 0000000..8a8dadf
--- /dev/null
+++ b/node_modules/@sapphire/async-queue/dist/index.global.js
@@ -0,0 +1,125 @@
+"use strict";
+var SapphireAsyncQueue = (() => {
+ var __defProp = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames = Object.getOwnPropertyNames;
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+ var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+ var __publicField = (obj, key, value) => {
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
+ return value;
+ };
+
+ // src/index.ts
+ var src_exports = {};
+ __export(src_exports, {
+ AsyncQueue: () => AsyncQueue
+ });
+
+ // src/lib/AsyncQueueEntry.ts
+ var AsyncQueueEntry = class {
+ constructor(queue) {
+ __publicField(this, "promise");
+ __publicField(this, "resolve");
+ __publicField(this, "reject");
+ __publicField(this, "queue");
+ __publicField(this, "signal", null);
+ __publicField(this, "signalListener", null);
+ this.queue = queue;
+ this.promise = new Promise((resolve, reject) => {
+ this.resolve = resolve;
+ this.reject = reject;
+ });
+ }
+ setSignal(signal) {
+ if (signal.aborted)
+ return this;
+ this.signal = signal;
+ this.signalListener = () => {
+ const index = this.queue["promises"].indexOf(this);
+ if (index !== -1)
+ this.queue["promises"].splice(index, 1);
+ this.reject(new Error("Request aborted manually"));
+ };
+ this.signal.addEventListener("abort", this.signalListener);
+ return this;
+ }
+ use() {
+ this.dispose();
+ this.resolve();
+ return this;
+ }
+ abort() {
+ this.dispose();
+ this.reject(new Error("Request aborted manually"));
+ return this;
+ }
+ dispose() {
+ if (this.signal) {
+ this.signal.removeEventListener("abort", this.signalListener);
+ this.signal = null;
+ this.signalListener = null;
+ }
+ }
+ };
+ __name(AsyncQueueEntry, "AsyncQueueEntry");
+
+ // src/lib/AsyncQueue.ts
+ var AsyncQueue = class {
+ constructor() {
+ __publicField(this, "promises", []);
+ }
+ get remaining() {
+ return this.promises.length;
+ }
+ get queued() {
+ return this.remaining === 0 ? 0 : this.remaining - 1;
+ }
+ wait(options) {
+ const entry = new AsyncQueueEntry(this);
+ if (this.promises.length === 0) {
+ this.promises.push(entry);
+ return Promise.resolve();
+ }
+ this.promises.push(entry);
+ if (options?.signal)
+ entry.setSignal(options.signal);
+ return entry.promise;
+ }
+ shift() {
+ if (this.promises.length === 0)
+ return;
+ if (this.promises.length === 1) {
+ this.promises.shift();
+ return;
+ }
+ this.promises.shift();
+ this.promises[0].use();
+ }
+ abortAll() {
+ if (this.queued === 0)
+ return;
+ for (let i = 1; i < this.promises.length; ++i) {
+ this.promises[i].abort();
+ }
+ this.promises.length = 1;
+ }
+ };
+ __name(AsyncQueue, "AsyncQueue");
+ return __toCommonJS(src_exports);
+})();
+//# sourceMappingURL=index.global.js.map \ No newline at end of file
diff --git a/node_modules/@sapphire/async-queue/dist/index.global.js.map b/node_modules/@sapphire/async-queue/dist/index.global.js.map
new file mode 100644
index 0000000..54b6787
--- /dev/null
+++ b/node_modules/@sapphire/async-queue/dist/index.global.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/index.ts","../src/lib/AsyncQueueEntry.ts","../src/lib/AsyncQueue.ts"],"sourcesContent":["export * from './lib/AsyncQueue';\n","import type { AsyncQueue } from './AsyncQueue';\n\n/**\n * @internal\n */\nexport class AsyncQueueEntry {\n\tpublic readonly promise: Promise<void>;\n\tprivate resolve!: () => void;\n\tprivate reject!: (error: Error) => void;\n\tprivate readonly queue: AsyncQueue;\n\tprivate signal: PolyFillAbortSignal | null = null;\n\tprivate signalListener: (() => void) | null = null;\n\n\tpublic constructor(queue: AsyncQueue) {\n\t\tthis.queue = queue;\n\t\tthis.promise = new Promise((resolve, reject) => {\n\t\t\tthis.resolve = resolve;\n\t\t\tthis.reject = reject;\n\t\t});\n\t}\n\n\tpublic setSignal(signal: AbortSignal) {\n\t\tif (signal.aborted) return this;\n\n\t\tthis.signal = signal as PolyFillAbortSignal;\n\t\tthis.signalListener = () => {\n\t\t\tconst index = this.queue['promises'].indexOf(this);\n\t\t\tif (index !== -1) this.queue['promises'].splice(index, 1);\n\n\t\t\tthis.reject(new Error('Request aborted manually'));\n\t\t};\n\t\tthis.signal.addEventListener('abort', this.signalListener);\n\t\treturn this;\n\t}\n\n\tpublic use() {\n\t\tthis.dispose();\n\t\tthis.resolve();\n\t\treturn this;\n\t}\n\n\tpublic abort() {\n\t\tthis.dispose();\n\t\tthis.reject(new Error('Request aborted manually'));\n\t\treturn this;\n\t}\n\n\tprivate dispose() {\n\t\tif (this.signal) {\n\t\t\tthis.signal.removeEventListener('abort', this.signalListener!);\n\t\t\tthis.signal = null;\n\t\t\tthis.signalListener = null;\n\t\t}\n\t}\n}\n\ninterface PolyFillAbortSignal {\n\treadonly aborted: boolean;\n\taddEventListener(type: 'abort', listener: () => void): void;\n\tremoveEventListener(type: 'abort', listener: () => void): void;\n}\n","import { AsyncQueueEntry } from './AsyncQueueEntry';\n\n/**\n * The AsyncQueue class used to sequentialize burst requests\n */\nexport class AsyncQueue {\n\t/**\n\t * The amount of entries in the queue, including the head.\n\t * @seealso {@link queued} for the queued count.\n\t */\n\tpublic get remaining(): number {\n\t\treturn this.promises.length;\n\t}\n\n\t/**\n\t * The amount of queued entries.\n\t * @seealso {@link remaining} for the count with the head.\n\t */\n\tpublic get queued(): number {\n\t\treturn this.remaining === 0 ? 0 : this.remaining - 1;\n\t}\n\n\t/**\n\t * The promises array\n\t */\n\tprivate promises: AsyncQueueEntry[] = [];\n\n\t/**\n\t * Waits for last promise and queues a new one\n\t * @example\n\t * ```typescript\n\t * const queue = new AsyncQueue();\n\t * async function request(url, options) {\n\t * await queue.wait({ signal: options.signal });\n\t * try {\n\t * const result = await fetch(url, options);\n\t * // Do some operations with 'result'\n\t * } finally {\n\t * // Remove first entry from the queue and resolve for the next entry\n\t * queue.shift();\n\t * }\n\t * }\n\t *\n\t * request(someUrl1, someOptions1); // Will call fetch() immediately\n\t * request(someUrl2, someOptions2); // Will call fetch() after the first finished\n\t * request(someUrl3, someOptions3); // Will call fetch() after the second finished\n\t * ```\n\t */\n\tpublic wait(options?: Readonly<AsyncQueueWaitOptions>): Promise<void> {\n\t\tconst entry = new AsyncQueueEntry(this);\n\n\t\tif (this.promises.length === 0) {\n\t\t\tthis.promises.push(entry);\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\tthis.promises.push(entry);\n\t\tif (options?.signal) entry.setSignal(options.signal);\n\t\treturn entry.promise;\n\t}\n\n\t/**\n\t * Unlocks the head lock and transfers the next lock (if any) to the head.\n\t */\n\tpublic shift(): void {\n\t\tif (this.promises.length === 0) return;\n\t\tif (this.promises.length === 1) {\n\t\t\t// Remove the head entry.\n\t\t\tthis.promises.shift();\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove the head entry, making the 2nd entry the new one.\n\t\t// Then use the head entry, which will unlock the promise.\n\t\tthis.promises.shift();\n\t\tthis.promises[0].use();\n\t}\n\n\t/**\n\t * Aborts all the pending promises.\n\t * @note To avoid race conditions, this does **not** unlock the head lock.\n\t */\n\tpublic abortAll(): void {\n\t\t// If there are no queued entries, skip early.\n\t\tif (this.queued === 0) return;\n\n\t\t// Abort all the entries except the head, that is why the loop starts at\n\t\t// 1 and not at 0.\n\t\tfor (let i = 1; i < this.promises.length; ++i) {\n\t\t\tthis.promises[i].abort();\n\t\t}\n\n\t\tthis.promises.length = 1;\n\t}\n}\n\nexport interface AsyncQueueWaitOptions {\n\tsignal?: AbortSignal | undefined | null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;;;ACKO,MAAM,kBAAN,MAAsB;AAAA,IAQrB,YAAY,OAAmB;AAPtC,0B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GAAG;AAC/B,aAAK,SAAS,KAAK,KAAK;AACxB,eAAO,QAAQ,QAAQ;AAAA,MACxB;AAEA,WAAK,SAAS,KAAK,KAAK;AACxB,UAAI,SAAS;AAAQ,cAAM,UAAU,QAAQ,MAAM;AACnD,aAAO,MAAM;AAAA,IACd;AAAA,IAKO,QAAc;AACpB,UAAI,KAAK,SAAS,WAAW;AAAG;AAChC,UAAI,KAAK,SAAS,WAAW,GAAG;AAE/B,aAAK,SAAS,MAAM;AACpB;AAAA,MACD;AAIA,WAAK,SAAS,MAAM;AACpB,WAAK,SAAS,GAAG,IAAI;AAAA,IACtB;AAAA,IAMO,WAAiB;AAEvB,UAAI,KAAK,WAAW;AAAG;AAIvB,eAAS,IAAI,GAAG,IAAI,KAAK,SAAS,QAAQ,EAAE,GAAG;AAC9C,aAAK,SAAS,GAAG,MAAM;AAAA,MACxB;AAEA,WAAK,SAAS,SAAS;AAAA,IACxB;AAAA,EACD;AAzFa;","names":[]} \ No newline at end of file
diff --git a/node_modules/@sapphire/async-queue/dist/index.js b/node_modules/@sapphire/async-queue/dist/index.js
new file mode 100644
index 0000000..8cab616
--- /dev/null
+++ b/node_modules/@sapphire/async-queue/dist/index.js
@@ -0,0 +1,128 @@
+"use strict";
+"use strict";
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+var __publicField = (obj, key, value) => {
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
+ return value;
+};
+
+// src/index.ts
+var src_exports = {};
+__export(src_exports, {
+ AsyncQueue: () => AsyncQueue
+});
+module.exports = __toCommonJS(src_exports);
+
+// src/lib/AsyncQueueEntry.ts
+var AsyncQueueEntry = class {
+ constructor(queue) {
+ __publicField(this, "promise");
+ __publicField(this, "resolve");
+ __publicField(this, "reject");
+ __publicField(this, "queue");
+ __publicField(this, "signal", null);
+ __publicField(this, "signalListener", null);
+ this.queue = queue;
+ this.promise = new Promise((resolve, reject) => {
+ this.resolve = resolve;
+ this.reject = reject;
+ });
+ }
+ setSignal(signal) {
+ if (signal.aborted)
+ return this;
+ this.signal = signal;
+ this.signalListener = () => {
+ const index = this.queue["promises"].indexOf(this);
+ if (index !== -1)
+ this.queue["promises"].splice(index, 1);
+ this.reject(new Error("Request aborted manually"));
+ };
+ this.signal.addEventListener("abort", this.signalListener);
+ return this;
+ }
+ use() {
+ this.dispose();
+ this.resolve();
+ return this;
+ }
+ abort() {
+ this.dispose();
+ this.reject(new Error("Request aborted manually"));
+ return this;
+ }
+ dispose() {
+ if (this.signal) {
+ this.signal.removeEventListener("abort", this.signalListener);
+ this.signal = null;
+ this.signalListener = null;
+ }
+ }
+};
+__name(AsyncQueueEntry, "AsyncQueueEntry");
+
+// src/lib/AsyncQueue.ts
+var AsyncQueue = class {
+ constructor() {
+ __publicField(this, "promises", []);
+ }
+ get remaining() {
+ return this.promises.length;
+ }
+ get queued() {
+ return this.remaining === 0 ? 0 : this.remaining - 1;
+ }
+ wait(options) {
+ const entry = new AsyncQueueEntry(this);
+ if (this.promises.length === 0) {
+ this.promises.push(entry);
+ return Promise.resolve();
+ }
+ this.promises.push(entry);
+ if (options?.signal)
+ entry.setSignal(options.signal);
+ return entry.promise;
+ }
+ shift() {
+ if (this.promises.length === 0)
+ return;
+ if (this.promises.length === 1) {
+ this.promises.shift();
+ return;
+ }
+ this.promises.shift();
+ this.promises[0].use();
+ }
+ abortAll() {
+ if (this.queued === 0)
+ return;
+ for (let i = 1; i < this.promises.length; ++i) {
+ this.promises[i].abort();
+ }
+ this.promises.length = 1;
+ }
+};
+__name(AsyncQueue, "AsyncQueue");
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ AsyncQueue
+});
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/@sapphire/async-queue/dist/index.js.map b/node_modules/@sapphire/async-queue/dist/index.js.map
new file mode 100644
index 0000000..fc20d2d
--- /dev/null
+++ b/node_modules/@sapphire/async-queue/dist/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/index.ts","../src/lib/AsyncQueueEntry.ts","../src/lib/AsyncQueue.ts"],"sourcesContent":["export * from './lib/AsyncQueue';\n","import type { AsyncQueue } from './AsyncQueue';\n\n/**\n * @internal\n */\nexport class AsyncQueueEntry {\n\tpublic readonly promise: Promise<void>;\n\tprivate resolve!: () => void;\n\tprivate reject!: (error: Error) => void;\n\tprivate readonly queue: AsyncQueue;\n\tprivate signal: PolyFillAbortSignal | null = null;\n\tprivate signalListener: (() => void) | null = null;\n\n\tpublic constructor(queue: AsyncQueue) {\n\t\tthis.queue = queue;\n\t\tthis.promise = new Promise((resolve, reject) => {\n\t\t\tthis.resolve = resolve;\n\t\t\tthis.reject = reject;\n\t\t});\n\t}\n\n\tpublic setSignal(signal: AbortSignal) {\n\t\tif (signal.aborted) return this;\n\n\t\tthis.signal = signal as PolyFillAbortSignal;\n\t\tthis.signalListener = () => {\n\t\t\tconst index = this.queue['promises'].indexOf(this);\n\t\t\tif (index !== -1) this.queue['promises'].splice(index, 1);\n\n\t\t\tthis.reject(new Error('Request aborted manually'));\n\t\t};\n\t\tthis.signal.addEventListener('abort', this.signalListener);\n\t\treturn this;\n\t}\n\n\tpublic use() {\n\t\tthis.dispose();\n\t\tthis.resolve();\n\t\treturn this;\n\t}\n\n\tpublic abort() {\n\t\tthis.dispose();\n\t\tthis.reject(new Error('Request aborted manually'));\n\t\treturn this;\n\t}\n\n\tprivate dispose() {\n\t\tif (this.signal) {\n\t\t\tthis.signal.removeEventListener('abort', this.signalListener!);\n\t\t\tthis.signal = null;\n\t\t\tthis.signalListener = null;\n\t\t}\n\t}\n}\n\ninterface PolyFillAbortSignal {\n\treadonly aborted: boolean;\n\taddEventListener(type: 'abort', listener: () => void): void;\n\tremoveEventListener(type: 'abort', listener: () => void): void;\n}\n","import { AsyncQueueEntry } from './AsyncQueueEntry';\n\n/**\n * The AsyncQueue class used to sequentialize burst requests\n */\nexport class AsyncQueue {\n\t/**\n\t * The amount of entries in the queue, including the head.\n\t * @seealso {@link queued} for the queued count.\n\t */\n\tpublic get remaining(): number {\n\t\treturn this.promises.length;\n\t}\n\n\t/**\n\t * The amount of queued entries.\n\t * @seealso {@link remaining} for the count with the head.\n\t */\n\tpublic get queued(): number {\n\t\treturn this.remaining === 0 ? 0 : this.remaining - 1;\n\t}\n\n\t/**\n\t * The promises array\n\t */\n\tprivate promises: AsyncQueueEntry[] = [];\n\n\t/**\n\t * Waits for last promise and queues a new one\n\t * @example\n\t * ```typescript\n\t * const queue = new AsyncQueue();\n\t * async function request(url, options) {\n\t * await queue.wait({ signal: options.signal });\n\t * try {\n\t * const result = await fetch(url, options);\n\t * // Do some operations with 'result'\n\t * } finally {\n\t * // Remove first entry from the queue and resolve for the next entry\n\t * queue.shift();\n\t * }\n\t * }\n\t *\n\t * request(someUrl1, someOptions1); // Will call fetch() immediately\n\t * request(someUrl2, someOptions2); // Will call fetch() after the first finished\n\t * request(someUrl3, someOptions3); // Will call fetch() after the second finished\n\t * ```\n\t */\n\tpublic wait(options?: Readonly<AsyncQueueWaitOptions>): Promise<void> {\n\t\tconst entry = new AsyncQueueEntry(this);\n\n\t\tif (this.promises.length === 0) {\n\t\t\tthis.promises.push(entry);\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\tthis.promises.push(entry);\n\t\tif (options?.signal) entry.setSignal(options.signal);\n\t\treturn entry.promise;\n\t}\n\n\t/**\n\t * Unlocks the head lock and transfers the next lock (if any) to the head.\n\t */\n\tpublic shift(): void {\n\t\tif (this.promises.length === 0) return;\n\t\tif (this.promises.length === 1) {\n\t\t\t// Remove the head entry.\n\t\t\tthis.promises.shift();\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove the head entry, making the 2nd entry the new one.\n\t\t// Then use the head entry, which will unlock the promise.\n\t\tthis.promises.shift();\n\t\tthis.promises[0].use();\n\t}\n\n\t/**\n\t * Aborts all the pending promises.\n\t * @note To avoid race conditions, this does **not** unlock the head lock.\n\t */\n\tpublic abortAll(): void {\n\t\t// If there are no queued entries, skip early.\n\t\tif (this.queued === 0) return;\n\n\t\t// Abort all the entries except the head, that is why the loop starts at\n\t\t// 1 and not at 0.\n\t\tfor (let i = 1; i < this.promises.length; ++i) {\n\t\t\tthis.promises[i].abort();\n\t\t}\n\n\t\tthis.promises.length = 1;\n\t}\n}\n\nexport interface AsyncQueueWaitOptions {\n\tsignal?: AbortSignal | undefined | null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,kBAAN,MAAsB;AAAA,EAQrB,YAAY,OAAmB;AAPtC,wBAAgB;AAChB,wBAAQ;AACR,wBAAQ;AACR,wBAAiB;AACjB,wBAAQ,UAAqC;AAC7C,wBAAQ,kBAAsC;AAG7C,SAAK,QAAQ;AACb,SAAK,UAAU,IAAI,QAAQ,CAAC,SAAS,WAAW;AAC/C,WAAK,UAAU;AACf,WAAK,SAAS;AAAA,IACf,CAAC;AAAA,EACF;AAAA,EAEO,UAAU,QAAqB;AACrC,QAAI,OAAO;AAAS,aAAO;AAE3B,SAAK,SAAS;AACd,SAAK,iBAAiB,MAAM;AAC3B,YAAM,QAAQ,KA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SAAS,GAAG,IAAI;AAAA,EACtB;AAAA,EAMO,WAAiB;AAEvB,QAAI,KAAK,WAAW;AAAG;AAIvB,aAAS,IAAI,GAAG,IAAI,KAAK,SAAS,QAAQ,EAAE,GAAG;AAC9C,WAAK,SAAS,GAAG,MAAM;AAAA,IACxB;AAEA,SAAK,SAAS,SAAS;AAAA,EACxB;AACD;AAzFa;","names":[]} \ No newline at end of file
diff --git a/node_modules/@sapphire/async-queue/dist/index.mjs b/node_modules/@sapphire/async-queue/dist/index.mjs
new file mode 100644
index 0000000..b1ca52d
--- /dev/null
+++ b/node_modules/@sapphire/async-queue/dist/index.mjs
@@ -0,0 +1,102 @@
+var __defProp = Object.defineProperty;
+var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+var __publicField = (obj, key, value) => {
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
+ return value;
+};
+
+// src/lib/AsyncQueueEntry.ts
+var AsyncQueueEntry = class {
+ constructor(queue) {
+ __publicField(this, "promise");
+ __publicField(this, "resolve");
+ __publicField(this, "reject");
+ __publicField(this, "queue");
+ __publicField(this, "signal", null);
+ __publicField(this, "signalListener", null);
+ this.queue = queue;
+ this.promise = new Promise((resolve, reject) => {
+ this.resolve = resolve;
+ this.reject = reject;
+ });
+ }
+ setSignal(signal) {
+ if (signal.aborted)
+ return this;
+ this.signal = signal;
+ this.signalListener = () => {
+ const index = this.queue["promises"].indexOf(this);
+ if (index !== -1)
+ this.queue["promises"].splice(index, 1);
+ this.reject(new Error("Request aborted manually"));
+ };
+ this.signal.addEventListener("abort", this.signalListener);
+ return this;
+ }
+ use() {
+ this.dispose();
+ this.resolve();
+ return this;
+ }
+ abort() {
+ this.dispose();
+ this.reject(new Error("Request aborted manually"));
+ return this;
+ }
+ dispose() {
+ if (this.signal) {
+ this.signal.removeEventListener("abort", this.signalListener);
+ this.signal = null;
+ this.signalListener = null;
+ }
+ }
+};
+__name(AsyncQueueEntry, "AsyncQueueEntry");
+
+// src/lib/AsyncQueue.ts
+var AsyncQueue = class {
+ constructor() {
+ __publicField(this, "promises", []);
+ }
+ get remaining() {
+ return this.promises.length;
+ }
+ get queued() {
+ return this.remaining === 0 ? 0 : this.remaining - 1;
+ }
+ wait(options) {
+ const entry = new AsyncQueueEntry(this);
+ if (this.promises.length === 0) {
+ this.promises.push(entry);
+ return Promise.resolve();
+ }
+ this.promises.push(entry);
+ if (options?.signal)
+ entry.setSignal(options.signal);
+ return entry.promise;
+ }
+ shift() {
+ if (this.promises.length === 0)
+ return;
+ if (this.promises.length === 1) {
+ this.promises.shift();
+ return;
+ }
+ this.promises.shift();
+ this.promises[0].use();
+ }
+ abortAll() {
+ if (this.queued === 0)
+ return;
+ for (let i = 1; i < this.promises.length; ++i) {
+ this.promises[i].abort();
+ }
+ this.promises.length = 1;
+ }
+};
+__name(AsyncQueue, "AsyncQueue");
+export {
+ AsyncQueue
+};
+//# sourceMappingURL=index.mjs.map \ No newline at end of file
diff --git a/node_modules/@sapphire/async-queue/dist/index.mjs.map b/node_modules/@sapphire/async-queue/dist/index.mjs.map
new file mode 100644
index 0000000..26dfb53
--- /dev/null
+++ b/node_modules/@sapphire/async-queue/dist/index.mjs.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/lib/AsyncQueueEntry.ts","../src/lib/AsyncQueue.ts"],"sourcesContent":["import type { AsyncQueue } from './AsyncQueue';\n\n/**\n * @internal\n */\nexport class AsyncQueueEntry {\n\tpublic readonly promise: Promise<void>;\n\tprivate resolve!: () => void;\n\tprivate reject!: (error: Error) => void;\n\tprivate readonly queue: AsyncQueue;\n\tprivate signal: PolyFillAbortSignal | null = null;\n\tprivate signalListener: (() => void) | null = null;\n\n\tpublic constructor(queue: AsyncQueue) {\n\t\tthis.queue = queue;\n\t\tthis.promise = new Promise((resolve, reject) => {\n\t\t\tthis.resolve = resolve;\n\t\t\tthis.reject = reject;\n\t\t});\n\t}\n\n\tpublic setSignal(signal: AbortSignal) {\n\t\tif (signal.aborted) return this;\n\n\t\tthis.signal = signal as PolyFillAbortSignal;\n\t\tthis.signalListener = () => {\n\t\t\tconst index = this.queue['promises'].indexOf(this);\n\t\t\tif (index !== -1) this.queue['promises'].splice(index, 1);\n\n\t\t\tthis.reject(new Error('Request aborted manually'));\n\t\t};\n\t\tthis.signal.addEventListener('abort', this.signalListener);\n\t\treturn this;\n\t}\n\n\tpublic use() {\n\t\tthis.dispose();\n\t\tthis.resolve();\n\t\treturn this;\n\t}\n\n\tpublic abort() {\n\t\tthis.dispose();\n\t\tthis.reject(new Error('Request aborted manually'));\n\t\treturn this;\n\t}\n\n\tprivate dispose() {\n\t\tif (this.signal) {\n\t\t\tthis.signal.removeEventListener('abort', this.signalListener!);\n\t\t\tthis.signal = null;\n\t\t\tthis.signalListener = null;\n\t\t}\n\t}\n}\n\ninterface PolyFillAbortSignal {\n\treadonly aborted: boolean;\n\taddEventListener(type: 'abort', listener: () => void): void;\n\tremoveEventListener(type: 'abort', listener: () => void): void;\n}\n","import { AsyncQueueEntry } from './AsyncQueueEntry';\n\n/**\n * The AsyncQueue class used to sequentialize burst requests\n */\nexport class AsyncQueue {\n\t/**\n\t * The amount of entries in the queue, including the head.\n\t * @seealso {@link queued} for the queued count.\n\t */\n\tpublic get remaining(): number {\n\t\treturn this.promises.length;\n\t}\n\n\t/**\n\t * The amount of queued entries.\n\t * @seealso {@link remaining} for the count with the head.\n\t */\n\tpublic get queued(): number {\n\t\treturn this.remaining === 0 ? 0 : this.remaining - 1;\n\t}\n\n\t/**\n\t * The promises array\n\t */\n\tprivate promises: AsyncQueueEntry[] = [];\n\n\t/**\n\t * Waits for last promise and queues a new one\n\t * @example\n\t * ```typescript\n\t * const queue = new AsyncQueue();\n\t * async function request(url, options) {\n\t * await queue.wait({ signal: options.signal });\n\t * try {\n\t * const result = await fetch(url, options);\n\t * // Do some operations with 'result'\n\t * } finally {\n\t * // Remove first entry from the queue and resolve for the next entry\n\t * queue.shift();\n\t * }\n\t * }\n\t *\n\t * request(someUrl1, someOptions1); // Will call fetch() immediately\n\t * request(someUrl2, someOptions2); // Will call fetch() after the first finished\n\t * request(someUrl3, someOptions3); // Will call fetch() after the second finished\n\t * ```\n\t */\n\tpublic wait(options?: Readonly<AsyncQueueWaitOptions>): Promise<void> {\n\t\tconst entry = new AsyncQueueEntry(this);\n\n\t\tif (this.promises.length === 0) {\n\t\t\tthis.promises.push(entry);\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\tthis.promises.push(entry);\n\t\tif (options?.signal) entry.setSignal(options.signal);\n\t\treturn entry.promise;\n\t}\n\n\t/**\n\t * Unlocks the head lock and transfers the next lock (if any) to the head.\n\t */\n\tpublic shift(): void {\n\t\tif (this.promises.length === 0) return;\n\t\tif (this.promises.length === 1) {\n\t\t\t// Remove the head entry.\n\t\t\tthis.promises.shift();\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove the head entry, making the 2nd entry the new one.\n\t\t// Then use the head entry, which will unlock the promise.\n\t\tthis.promises.shift();\n\t\tthis.promises[0].use();\n\t}\n\n\t/**\n\t * Aborts all the pending promises.\n\t * @note To avoid race conditions, this does **not** unlock the head lock.\n\t */\n\tpublic abortAll(): void {\n\t\t// If there are no queued entries, skip early.\n\t\tif (this.queued === 0) return;\n\n\t\t// Abort all the entries except the head, that is why the loop starts at\n\t\t// 1 and not at 0.\n\t\tfor (let i = 1; i < this.promises.length; ++i) {\n\t\t\tthis.promises[i].abort();\n\t\t}\n\n\t\tthis.promises.length = 1;\n\t}\n}\n\nexport interface AsyncQueueWaitOptions {\n\tsignal?: AbortSignal | undefined | null;\n}\n"],"mappings":";;;;;;;;;AAKO,IAAM,kBAAN,MAAsB;AAAA,EAQrB,YAAY,OAAmB;AAPtC,wBAAgB;AAChB,wBAAQ;AACR,wBAAQ;AACR,wBAAiB;AACjB,wBAAQ,UAAqC;AAC7C,wBAAQ,kBAAsC;AAG7C,S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ACxB,QAAI,SAAS;AAAQ,YAAM,UAAU,QAAQ,MAAM;AACnD,WAAO,MAAM;AAAA,EACd;AAAA,EAKO,QAAc;AACpB,QAAI,KAAK,SAAS,WAAW;AAAG;AAChC,QAAI,KAAK,SAAS,WAAW,GAAG;AAE/B,WAAK,SAAS,MAAM;AACpB;AAAA,IACD;AAIA,SAAK,SAAS,MAAM;AACpB,SAAK,SAAS,GAAG,IAAI;AAAA,EACtB;AAAA,EAMO,WAAiB;AAEvB,QAAI,KAAK,WAAW;AAAG;AAIvB,aAAS,IAAI,GAAG,IAAI,KAAK,SAAS,QAAQ,EAAE,GAAG;AAC9C,WAAK,SAAS,GAAG,MAAM;AAAA,IACxB;AAEA,SAAK,SAAS,SAAS;AAAA,EACxB;AACD;AAzFa;","names":[]} \ No newline at end of file
diff --git a/node_modules/@sapphire/async-queue/package.json b/node_modules/@sapphire/async-queue/package.json
new file mode 100644
index 0000000..b1917fd
--- /dev/null
+++ b/node_modules/@sapphire/async-queue/package.json
@@ -0,0 +1,65 @@
+{
+ "name": "@sapphire/async-queue",
+ "version": "1.5.0",
+ "description": "Sequential asynchronous lock-based queue for promises",
+ "author": "@sapphire",
+ "license": "MIT",
+ "main": "dist/index.js",
+ "module": "dist/index.mjs",
+ "browser": "dist/index.global.js",
+ "unpkg": "dist/index.global.js",
+ "types": "dist/index.d.ts",
+ "exports": {
+ "import": "./dist/index.mjs",
+ "require": "./dist/index.js",
+ "types": "./dist/index.d.ts"
+ },
+ "sideEffects": false,
+ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/async-queue",
+ "scripts": {
+ "test": "vitest run",
+ "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc",
+ "build": "tsup",
+ "prepack": "yarn build",
+ "bump": "cliff-jumper",
+ "check-update": "cliff-jumper --dry-run"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sapphiredev/utilities.git",
+ "directory": "packages/async-queue"
+ },
+ "files": [
+ "dist/**/*.js*",
+ "dist/**/*.mjs*",
+ "dist/**/*.d*"
+ ],
+ "engines": {
+ "node": ">=v14.0.0",
+ "npm": ">=7.0.0"
+ },
+ "keywords": [
+ "@sapphire/async-queue",
+ "bot",
+ "typescript",
+ "ts",
+ "yarn",
+ "discord",
+ "sapphire",
+ "standalone"
+ ],
+ "bugs": {
+ "url": "https://github.com/sapphiredev/utilities/issues"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "devDependencies": {
+ "@favware/cliff-jumper": "^1.8.6",
+ "@vitest/coverage-c8": "^0.22.0",
+ "c8": "^7.12.0",
+ "tsup": "^6.2.2",
+ "typescript": "^4.7.4",
+ "vitest": "^0.22.0"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@sapphire/shapeshift/CHANGELOG.md b/node_modules/@sapphire/shapeshift/CHANGELOG.md
new file mode 100644
index 0000000..1d4b4a3
--- /dev/null
+++ b/node_modules/@sapphire/shapeshift/CHANGELOG.md
@@ -0,0 +1,292 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+# [3.9.2](https://github.com/sapphiredev/shapeshift/compare/v3.9.1...v3.9.2) - (2023-06-04)
+
+## 🐛 Bug Fixes
+
+- **arrayvalidator:** Fixed runaway type instantiation with TypeScript >=5.1 (#275) ([f59d901](https://github.com/sapphiredev/shapeshift/commit/f59d90112181e6625230c28e6a4f0f065ced6344))
+
+# [3.9.1](https://github.com/sapphiredev/shapeshift/compare/v3.9.0...v3.9.1) - (2023-06-02)
+
+## 🐛 Bug Fixes
+
+- **types:** Move the `types` condition to the front (#273) ([5a3e202](https://github.com/sapphiredev/shapeshift/commit/5a3e202e9ceafb3d330a568e93c060dd5aac1dde))
+
+# [3.9.0](https://github.com/sapphiredev/shapeshift/compare/v3.8.2...v3.9.0) - (2023-05-09)
+
+## 🐛 Bug Fixes
+
+- Resolve minor grammar mistake (#260) ([62df609](https://github.com/sapphiredev/shapeshift/commit/62df6094845ffa118aa93ea3c5f47f81f1c5d99f))
+
+## 🚀 Features
+
+- Add BaseValidator.describe (#267) ([d9e1a2d](https://github.com/sapphiredev/shapeshift/commit/d9e1a2d2f3c5e6378f0025becf8497138ee6d97c))
+
+# [3.8.2](https://github.com/sapphiredev/shapeshift/compare/v3.8.1...v3.8.2) - (2023-04-02)
+
+## 🐛 Bug Fixes
+
+- ***:** TypeScript 5.x compatibility (#253) ([eba2a88](https://github.com/sapphiredev/shapeshift/commit/eba2a88b91fb6631f431313753299ec7a70cf6ce))
+- Remove `node:` prefix (#249) ([af766b5](https://github.com/sapphiredev/shapeshift/commit/af766b504c1013f3cd24f7bf803ac9ff7442a8d7))
+
+# [3.8.1](https://github.com/sapphiredev/shapeshift/compare/v3.8.0...v3.8.1) - (2022-12-15)
+
+## 🐛 Bug Fixes
+
+- Fixed lodash esm import (#230) ([63def7b](https://github.com/sapphiredev/shapeshift/commit/63def7bcec6319b3792093945ba7ba9f871ced6f))
+
+# [3.8.0](https://github.com/sapphiredev/shapeshift/compare/v3.7.1...v3.8.0) - (2022-12-11)
+
+## 🏠 Refactor
+
+- Remove `NonNullObject` (#227) ([04d3934](https://github.com/sapphiredev/shapeshift/commit/04d39343f55a4e1571f54870a84d8b95447bd682))
+
+## 🚀 Features
+
+- Add `when` constraint (#223) ([8eade90](https://github.com/sapphiredev/shapeshift/commit/8eade90cd4c02b80746ecdcdc612829d7f765178))
+
+# [3.7.1](https://github.com/sapphiredev/shapeshift/compare/v3.7.0...v3.7.1) - (2022-11-27)
+
+## 🐛 Bug Fixes
+
+- Fixed "jump to definition" for `undefinedToOptional` going to wrong symbol (#226) ([6aab6d0](https://github.com/sapphiredev/shapeshift/commit/6aab6d01450fd7abbeaa95e91fb58568240e02ff))
+
+## 📝 Documentation
+
+- Add @legendhimslef as a contributor ([499522a](https://github.com/sapphiredev/shapeshift/commit/499522a782c3ecd4df80978d0811df1a75d08212))
+
+# [3.7.0](https://github.com/sapphiredev/shapeshift/compare/v3.6.0...v3.7.0) - (2022-10-02)
+
+## 📝 Documentation
+
+- Add phone in readme (#203) ([4ec9b7a](https://github.com/sapphiredev/shapeshift/commit/4ec9b7ab85124d84b3404cb548b17b9221a716c5))
+- Add RealShadowNova as a contributor for tool (#185) ([6dfc442](https://github.com/sapphiredev/shapeshift/commit/6dfc442af6ef26d6bbca39078eca5727257b6dab))
+
+## 🚀 Features
+
+- Add `s.string.phone` (#202) ([7d122d5](https://github.com/sapphiredev/shapeshift/commit/7d122d5dc0eaa63c639b9cde1514e63566a681bd))
+
+# [3.6.0](https://github.com/sapphiredev/shapeshift/compare/v3.5.1...v3.6.0) - (2022-08-29)
+
+## 🐛 Bug Fixes
+
+- Typescript 4.8 compatibility (#179) ([2281535](https://github.com/sapphiredev/shapeshift/commit/2281535f7589a987510828e46bf66accc8393c34))
+
+## 🚀 Features
+
+- Add `Validator#is` (#183) ([5114f95](https://github.com/sapphiredev/shapeshift/commit/5114f9516e5406cd1ca4a7ceb5ea5761158af1c6))
+
+# [3.5.1](https://github.com/sapphiredev/shapeshift/compare/v3.5.0...v3.5.1) - (2022-07-17)
+
+## 🐛 Bug Fixes
+
+- Fast deep equal import (#155) ([5ce8ff6](https://github.com/sapphiredev/shapeshift/commit/5ce8ff6803b70624af07c3e406bc1cdc9e3cdafe))
+
+# [3.5.0](https://github.com/sapphiredev/shapeshift/compare/v3.4.1...v3.5.0) - (2022-07-10)
+
+## 🏠 Refactor
+
+- Port net module (#149) ([5f26e32](https://github.com/sapphiredev/shapeshift/commit/5f26e32b0f87d2b100ca13471d5835c0067ddee8))
+
+## 🐛 Bug Fixes
+
+- Ensure browser compatibility (#150) ([92d05d8](https://github.com/sapphiredev/shapeshift/commit/92d05d83c1fbab53f98f61219fb01d49fc031bae))
+- Fixed `s.array` type inference (#153) ([a5948dc](https://github.com/sapphiredev/shapeshift/commit/a5948dc67ce6a0ea73986d32084898a4ce0b9c3a))
+- Fixed `shape#array` types (#146) ([43016a0](https://github.com/sapphiredev/shapeshift/commit/43016a025b04a676d906758ed065d26a17231888))
+
+## 🚀 Features
+
+- Lazy validator (#147) ([807666e](https://github.com/sapphiredev/shapeshift/commit/807666ef537c84d2e0f8bd9f4ce1a8060bfb3fb5))
+- Reshape finally (#148) ([d3751f6](https://github.com/sapphiredev/shapeshift/commit/d3751f6d3d99f415d797369f98158f932371e02c))
+- **arrays:** Add unique (#141) ([ad7af34](https://github.com/sapphiredev/shapeshift/commit/ad7af34eb811541253150b7ff0b58a6bd7200796))
+
+# [3.4.1](https://github.com/sapphiredev/shapeshift/compare/v3.4.0...v3.4.1) - (2022-07-03)
+
+## 🏠 Refactor
+
+- Move all type utilities to one file (#139) ([61cab3d](https://github.com/sapphiredev/shapeshift/commit/61cab3d0e486d9dc74c8f6160ff8c75c91b595b2))
+
+## 🐛 Bug Fixes
+
+- Return array-validator from length* methods (#140) ([75b1f9a](https://github.com/sapphiredev/shapeshift/commit/75b1f9a6efffb6c27dcfd48eb4ec6269a3614633))
+
+## 🧪 Testing
+
+- Typechecking for tests (#145) ([273cdc8](https://github.com/sapphiredev/shapeshift/commit/273cdc82c1cf65ba4111ca6e70b050e02cbdf485))
+
+# [3.4.0](https://github.com/sapphiredev/shapeshift/compare/v3.3.2...v3.4.0) - (2022-06-29)
+
+## 🚀 Features
+
+- Add `required` in object validation (#137) ([928f7be](https://github.com/sapphiredev/shapeshift/commit/928f7beb5e727b47868e9e46f2191f2def228080))
+
+# [3.3.2](https://github.com/sapphiredev/shapeshift/compare/v3.3.1...v3.3.2) - (2022-06-26)
+
+## 🐛 Bug Fixes
+
+- Make keys optional in object parsing (#134) ([57a3719](https://github.com/sapphiredev/shapeshift/commit/57a37193d64399aae1431b041012d582e8defecf))
+
+# [3.3.1](https://github.com/sapphiredev/shapeshift/compare/v3.3.0...v3.3.1) - (2022-06-22)
+
+## 🐛 Bug Fixes
+
+- Add generic type to parse (#133) ([90c91aa](https://github.com/sapphiredev/shapeshift/commit/90c91aad572d51a2bfbd1ed32a51e1d4201c5d4a))
+
+# [3.3.0](https://github.com/sapphiredev/shapeshift/compare/v3.2.0...v3.3.0) - (2022-06-19)
+
+## 🐛 Bug Fixes
+
+- Compile for es2020 instead of es2021 (#128) ([051344d](https://github.com/sapphiredev/shapeshift/commit/051344debe1cf423713d7fc64b8908353348f301))
+
+## 🚀 Features
+
+- Allow passing functions in `setValidationEnabled` (#131) ([e1991cf](https://github.com/sapphiredev/shapeshift/commit/e1991cfef1ffe92f9167d11d7f2ded65379df8d2))
+
+## 🧪 Testing
+
+- Migrate to vitest (#126) ([4d80969](https://github.com/sapphiredev/shapeshift/commit/4d80969b714c39768499569456405a73c1444da8))
+
+# [3.2.0](https://github.com/sapphiredev/shapeshift/compare/v3.1.0...v3.2.0) - (2022-06-11)
+
+## 🚀 Features
+
+- Add disabling of validators (#125) ([e17af95](https://github.com/sapphiredev/shapeshift/commit/e17af95d697be62796c57d03385b0c74b9d2d580))
+
+# [3.1.0](https://github.com/sapphiredev/shapeshift/compare/v3.0.0...v3.1.0) - (2022-06-04)
+
+## 🐛 Bug Fixes
+
+- **ObjectValidator:** Fix #121 (#122) ([ecfad7e](https://github.com/sapphiredev/shapeshift/commit/ecfad7ec2cdd9e0cee0b3e227e55a91b28c29c30))
+
+## 📝 Documentation
+
+- **readme:** Clarify the difference between validations and schemas and add table of contents (#108) ([dc492a3](https://github.com/sapphiredev/shapeshift/commit/dc492a395349cc5bc680f313146127ea510b4ada))
+
+## 🚀 Features
+
+- **StringValidator:** Add date string checks (#106) ([1b72907](https://github.com/sapphiredev/shapeshift/commit/1b729078be32a88aeddf574c9cff3098990d4f94))
+
+# [3.0.0](https://github.com/sapphiredev/shapeshift/compare/v2.2.0...v3.0.0) - (2022-05-06)
+
+## 🏃 Performance
+
+- Speed up object validation a LOT (#101) ([817278e](https://github.com/sapphiredev/shapeshift/commit/817278e6a3ac128ca342e5ae1737f40b98788c37))
+
+## 🐛 Bug Fixes
+
+- Expand method names (#100) ([741490f](https://github.com/sapphiredev/shapeshift/commit/741490fb6907f618fa25fe53808f7dcb5a59a96c))}
+
+ ### 💥 Breaking Changes:
+ - `date.eq` has been renamed to `date.equal`
+ - `string.lengthLt` has been renamed to `string.lengthLessThan`
+ - `string.lengthLe` has been renamed to `string.lengthLessThanOrEqual`
+ - `string.lengthGt` has been renamed to `string.lengthGreaterThan`
+ - `string.lengthGe` has been renamed to `string.lengthGreaterThanOrEqual`
+ - `string.lengthEq` has been renamed to `string.lengthEqual`
+ - `string.lengthNe` has been renamed to `string.lengthNotEqual`
+ - `number.gt` has been renamed to `number.greaterThan`
+ - `number.ge` has been renamed to `number.greaterThanOrEqual`
+ - `number.lt` has been renamed to `number.lessThan`
+ - `number.le` has been renamed to `number.lessThanOrEqual`
+ - `number.eq` has been renamed to `number.equal`
+ - `number.ne` has been renamed to `number.notEqual`
+ - `bigint.gt` has been renamed to `bigint.greaterThan`
+ - `bigint.ge` has been renamed to `bigint.greaterThanOrEqual`
+ - `bigint.lt` has been renamed to `bigint.lessThan`
+ - `bigint.le` has been renamed to `bigint.lessThanOrEqual`
+ - `bigint.eq` has been renamed to `bigint.equal`
+ - `bigint.ne` has been renamed to `bigint.notEqual`
+ - `boolean.eq` has been renamed to `boolean.equal`
+ - `boolean.ne` has been renamed to `boolean.notEqual`
+ - `array.lengthLt` has been renamed to `array.lengthLessThan`
+ - `array.lengthLe` has been renamed to `array.lengthLessThanOrEqual`
+ - `array.lengthGt` has been renamed to `array.lengthGreaterThan`
+ - `array.lengthGe` has been renamed to `array.lengthGreaterThanOrEqual`
+ - `array.lengthEq` has been renamed to `array.lengthEqual`
+ - `array.lengthNe` has been renamed to `array.lengthNotEqual`
+ - `typedArray.lengthLt` has been renamed to `typedArray.lengthLessThan`
+ - `typedArray.lengthLe` has been renamed to `typedArray.lengthLessThanOrEqual`
+ - `typedArray.lengthGt` has been renamed to `typedArray.lengthGreaterThan`
+ - `typedArray.lengthGe` has been renamed to `typedArray.lengthGreaterThanOrEqual`
+ - `typedArray.lengthEq` has been renamed to `typedArray.lengthEqual`
+ - `typedArray.lengthNe` has been renamed to `typedArray.lengthNotEqual`
+ - `typedArray.byteLengthLt` has been renamed to `typedArray.byteLengthLessThan`
+ - `typedArray.byteLengthLe` has been renamed to `typedArray.byteLengthLessThanOrEqual`
+ - `typedArray.byteLengthGt` has been renamed to `typedArray.byteLengthGreaterThan`
+ - `typedArray.byteLengthGe` has been renamed to `typedArray.byteLengthGreaterThanOrEqual`
+ - `typedArray.byteLengthEq` has been renamed to `typedArray.byteLengthEqual`
+ - `typedArray.byteLengthNe` has been renamed to `typedArray.byteLengthNotEqual`
+
+- **ObjectValidator:** Don't run validation on arrays (#99) ([c83b3d0](https://github.com/sapphiredev/shapeshift/commit/c83b3d03a201d38cc230d9c831ca1d9b66ca533b))
+
+## 🚀 Features
+
+- Add 2 utility types inspired by yup and co (#102) ([2fef902](https://github.com/sapphiredev/shapeshift/commit/2fef9026c30f2f1825aa55511d0ab088a3dd13ab))
+
+# [2.2.0](https://github.com/sapphiredev/shapeshift/compare/v2.0.0...v2.2.0) - (2022-04-29)
+
+## Bug Fixes
+
+- Ensure `BaseError` is exported as value (#95) ([335d799](https://github.com/sapphiredev/shapeshift/commit/335d799ef7a8c1a19a12e3eeec07e6d210db113d))
+
+## Documentation
+
+- **readme:** Add todo notice for `reshape` and `function` validations (#75) ([d5f16f6](https://github.com/sapphiredev/shapeshift/commit/d5f16f615de83503187dc834c6245fafbf138f5e))
+
+## Features
+
+- Add Typed Array (#78) ([ca5ea5f](https://github.com/sapphiredev/shapeshift/commit/ca5ea5f568084bd5d3aa004911d4ea64329e1a89))
+
+## Performance
+
+- Optimize `NativeEnum` (#79) ([e9ae280](https://github.com/sapphiredev/shapeshift/commit/e9ae280f73e9ea08239bd8bd22165fe0b2178f82))
+
+# [@sapphire/shapeshift@2.1.0](https://github.com/sapphiredev/shapeshift/compare/v2.0.0...@sapphire/shapeshift@2.1.0) - (2022-04-24)
+
+## Documentation
+
+- **readme:** Add todo notice for `reshape` and `function` validations (#75) ([d5f16f6](https://github.com/sapphiredev/shapeshift/commit/d5f16f615de83503187dc834c6245fafbf138f5e))
+
+## Performance
+
+- Optimize `NativeEnum` (#79) ([e9ae280](https://github.com/sapphiredev/shapeshift/commit/e9ae280f73e9ea08239bd8bd22165fe0b2178f82))
+
+## [2.0.0](https://github.com/sapphiredev/shapeshift/compare/v1.0.0...v2.0.0) (2022-03-13)
+
+### Features
+
+- add `default` ([#25](https://github.com/sapphiredev/shapeshift/issues/25)) ([378c51f](https://github.com/sapphiredev/shapeshift/commit/378c51fb4ba2c501fd782387169db888d6bfe662))
+- add bigint methods ([#32](https://github.com/sapphiredev/shapeshift/issues/32)) ([4c444c1](https://github.com/sapphiredev/shapeshift/commit/4c444c15657c4610b99481b6dec9812bd136d72b))
+- add MapValidator ([#21](https://github.com/sapphiredev/shapeshift/issues/21)) ([c4d1258](https://github.com/sapphiredev/shapeshift/commit/c4d12586762d446b858454077b66635d9d11e2d6))
+- add NativeEnum validator ([#54](https://github.com/sapphiredev/shapeshift/issues/54)) ([7359042](https://github.com/sapphiredev/shapeshift/commit/7359042843d1119f396ac2c038aaff89dbd90c8e))
+- add RecordValidator ([#20](https://github.com/sapphiredev/shapeshift/issues/20)) ([8727427](https://github.com/sapphiredev/shapeshift/commit/8727427be4656792eebcdc5bddf6bcd61bc7e846))
+- add remaining string validations ([#38](https://github.com/sapphiredev/shapeshift/issues/38)) ([1c2fd7b](https://github.com/sapphiredev/shapeshift/commit/1c2fd7bbb20463f09ac461b697c312bec6ae9195))
+- add tuple ([#39](https://github.com/sapphiredev/shapeshift/issues/39)) ([b7704bf](https://github.com/sapphiredev/shapeshift/commit/b7704bf87cf5225021408cf4a6b9ceff8cba25b3))
+- added number transformers ([#17](https://github.com/sapphiredev/shapeshift/issues/17)) ([89a8ddd](https://github.com/sapphiredev/shapeshift/commit/89a8ddd8583774e68c43260c28ee1589ef44516c))
+- allow the use of module: NodeNext ([#55](https://github.com/sapphiredev/shapeshift/issues/55)) ([e6827c5](https://github.com/sapphiredev/shapeshift/commit/e6827c5a12b6a2803a137b71fe4c21bd1c35034b))
+- **array:** add array length Comparators ([#40](https://github.com/sapphiredev/shapeshift/issues/40)) ([1e564c2](https://github.com/sapphiredev/shapeshift/commit/1e564c204b6c9b0a798b3121d31dd4cc99165f60))
+- **Array:** generate tuple types with given length ([#52](https://github.com/sapphiredev/shapeshift/issues/52)) ([793648b](https://github.com/sapphiredev/shapeshift/commit/793648b4cde1f72c5b735ceebb0c48272179be06))
+- **ArrayValidator:** add length ranges ([#53](https://github.com/sapphiredev/shapeshift/issues/53)) ([e431d62](https://github.com/sapphiredev/shapeshift/commit/e431d6218b86fc1480fce14c4466cb36567cad2f))
+- display the property that errored ([#35](https://github.com/sapphiredev/shapeshift/issues/35)) ([fe188b0](https://github.com/sapphiredev/shapeshift/commit/fe188b0d17eeaa5f73b08085562903e23e91717c))
+- improve how errors are returned ([#29](https://github.com/sapphiredev/shapeshift/issues/29)) ([8bc7669](https://github.com/sapphiredev/shapeshift/commit/8bc7669a1a66a10449b321cc4447e411383977d9))
+- **s.object:** add passthrough ([#66](https://github.com/sapphiredev/shapeshift/issues/66)) ([ee9f6f3](https://github.com/sapphiredev/shapeshift/commit/ee9f6f367e513c0120a04cfafe05057c7907c327))
+
+### Bug Fixes
+
+- copy/paste error and `ge` ([#22](https://github.com/sapphiredev/shapeshift/issues/22)) ([fe6505f](https://github.com/sapphiredev/shapeshift/commit/fe6505f8e698bcaf9f8024b2d8f012559827cbb0))
+- fix union type and add test ([#41](https://github.com/sapphiredev/shapeshift/issues/41)) ([fbcf8a9](https://github.com/sapphiredev/shapeshift/commit/fbcf8a9c617c16b33fdddb0a44aa0fe506164fd3))
+- **s.union:** fix union overrides ([#62](https://github.com/sapphiredev/shapeshift/issues/62)) ([56e9b19](https://github.com/sapphiredev/shapeshift/commit/56e9b1947d9b2b129dbed374671114b2242e6d35))
+
+## 1.0.0 (2022-01-16)
+
+### Features
+
+- added more primitives ([#2](https://github.com/sapphiredev/shapeshift/issues/2)) ([16af17b](https://github.com/sapphiredev/shapeshift/commit/16af17b5d9ee40dce284ee120e0b099f7b2cc0b8))
+- added more things ([7c73d82](https://github.com/sapphiredev/shapeshift/commit/7c73d82cf3740d5b2d4eebcac7767da9d3562437))
+- added ObjectValidator ([#3](https://github.com/sapphiredev/shapeshift/issues/3)) ([abe7ead](https://github.com/sapphiredev/shapeshift/commit/abe7eaddee981ef485713ff5e7b7f32ff97c645b))
+
+### Bug Fixes
+
+- resolved install error ([a5abe13](https://github.com/sapphiredev/shapeshift/commit/a5abe1362bb6d9ce6d6471bffa47fe8983b0d1a4))
diff --git a/node_modules/@sapphire/shapeshift/LICENSE.md b/node_modules/@sapphire/shapeshift/LICENSE.md
new file mode 100644
index 0000000..95a4396
--- /dev/null
+++ b/node_modules/@sapphire/shapeshift/LICENSE.md
@@ -0,0 +1,24 @@
+# The MIT License (MIT)
+
+Copyright © `2021` `The Sapphire Community and its 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/@sapphire/shapeshift/README.md b/node_modules/@sapphire/shapeshift/README.md
new file mode 100644
index 0000000..c9f113f
--- /dev/null
+++ b/node_modules/@sapphire/shapeshift/README.md
@@ -0,0 +1,934 @@
+<div align="center">
+
+![Sapphire Logo](https://raw.githubusercontent.com/sapphiredev/assets/main/banners/SapphireCommunity.png)
+
+# @sapphire/shapeshift
+
+**Shapeshift**
+
+Blazing fast input validation and transformation ⚡
+
+[![GitHub](https://img.shields.io/github/license/sapphiredev/shapeshift)](https://github.com/sapphiredev/shapeshift/blob/main/LICENSE.md)
+[![codecov](https://codecov.io/gh/sapphiredev/shapeshift/branch/main/graph/badge.svg?token=RF4mMKx6lL)](https://codecov.io/gh/sapphiredev/shapeshift)
+[![npm](https://img.shields.io/npm/v/@sapphire/shapeshift?color=crimson&logo=npm&style=flat-square)](https://www.npmjs.com/package/@sapphire/shapeshift)
+
+</div>
+
+## Table of Contents
+
+- [@sapphire/shapeshift](#sapphireshapeshift)
+ - [Table of Contents](#table-of-contents)
+ - [Description](#description)
+ - [Features](#features)
+ - [Usage](#usage)
+ - [Basic usage](#basic-usage)
+ - [Defining validations](#defining-validations)
+ - [Primitives](#primitives)
+ - [Literals](#literals)
+ - [Strings](#strings)
+ - [Numbers](#numbers)
+ - [BigInts](#bigints)
+ - [Booleans](#booleans)
+ - [Arrays](#arrays)
+ - [Tuples](#tuples)
+ - [Unions](#unions)
+ - [Enums](#enums)
+ - [Maps](#maps)
+ - [Sets](#sets)
+ - [Instances](#instances)
+ - [Records](#records)
+ - [Functions // TODO](#functions--todo)
+ - [TypedArray](#typedarray)
+ - [Defining schemas (objects)](#defining-schemas-objects)
+ - [Utility types for TypeScript](#utility-types-for-typescript)
+ - [Extracting an interface from a schema](#extracting-an-interface-from-a-schema)
+ - [Defining the structure of a schema through an interface](#defining-the-structure-of-a-schema-through-an-interface)
+ - [`.extend`:](#extend)
+ - [`.pick` / `.omit`:](#pick--omit)
+ - [`.partial`](#partial)
+ - [`.required`](#required)
+ - [Handling unrecognized keys](#handling-unrecognized-keys)
+ - [`.strict`](#strict)
+ - [`.ignore`](#ignore)
+ - [`.passthrough`](#passthrough)
+ - [BaseValidator: methods and properties](#basevalidator-methods-and-properties)
+ - [`.run`](#rundata-unknown-resultt-error-given-a-validation-you-can-call-this-method-to-check-whether-or-not-the)
+ - [`.parse`](#parsedata-unknown-t-given-a-validations-you-can-call-this-method-to-check-whether-or-not-the-input-is-valid)
+ - [`.transform`](#transformrvalue-t--r-nopvalidatorr-adds-a-constraint-that-modifies-the-input)
+ - [`.reshape`](#reshapervalue-t--resultr-error--iconstraint-nopvalidatorr-adds-a-constraint-able-to-both-validate)
+ - [`.default`](#defaultvalue-t----t-transform-undefined-into-the-given-value-or-the-callbacks-returned-value)
+ - [`.optional`](#optional-a-convenience-method-that-returns-a-union-of-the-type-with-sundefined)
+ - [`.nullable`](#nullable-a-convenience-method-that-returns-a-union-of-the-type-with-snullable)
+ - [`.nullish`](#nullish-a-convenience-method-that-returns-a-union-of-the-type-with-snullish)
+ - [`.array`](#array-a-convenience-method-that-returns-an-arrayvalidator-with-the-type)
+ - [`.or`](#or-a-convenience-method-that-returns-an-unionvalidator-with-the-type-this-method-is-also-overridden-in)
+ - [`.when`](#when-adjust-the-schema-based-on-a-sibling-or-sinbling-children-fields)
+ - [Available options for providing `is`](#available-options-for-providing-is)
+ - [Resolving of the `key` (first) parameter](#resolving-of-the-key-first-parameter)
+ - [Examples](#examples)
+ - [Enabling and disabling validation](#enabling-and-disabling-validation)
+ - [Buy us some doughnuts](#buy-us-some-doughnuts)
+ - [Contributors](#contributors)
+
+## Description
+
+[Back to top][toc]
+
+A very fast and lightweight input validation and transformation library for JavaScript.
+
+> **Note**: Shapeshift requires Node.js v14.0.0 or higher to work.
+
+## Features
+
+[Back to top][toc]
+
+- TypeScript friendly
+- Offers CJS, ESM and UMD builds
+- API similar to [`zod`]
+- Faster than ⚡
+
+## Usage
+
+[Back to top][toc]
+
+**_For complete usages, please dive into our [documentation]_**
+
+### Basic usage
+
+[Back to top][toc]
+
+Creating a simple string validation
+
+```typescript
+import { s } from '@sapphire/shapeshift';
+
+const myStringValidation = s.string;
+
+// Parse
+myStringValidation.parse('sapphire'); // => returns 'sapphire'
+myStringValidation.parse(12); // throws ValidationError
+```
+
+Creating an object schema
+
+```typescript
+import { s } from '@sapphire/shapeshift';
+
+const user = s.object({
+ username: s.string
+});
+
+user.parse({ username: 'Sapphire' });
+```
+
+### Defining validations
+
+[Back to top][toc]
+
+#### Primitives
+
+[Back to top][toc]
+
+```typescript
+import { s } from '@sapphire/shapeshift';
+
+// Primitives
+s.string;
+s.number;
+s.bigint;
+s.boolean;
+s.date;
+
+// Empty Types
+s.undefined;
+s.null;
+s.nullish; // Accepts undefined | null
+
+// Catch-all Types
+s.any;
+s.unknown;
+
+// Never Type
+s.never;
+```
+
+#### Literals
+
+[Back to top][toc]
+
+```typescript
+s.literal('sapphire');
+s.literal(12);
+s.literal(420n);
+s.literal(true);
+s.literal(new Date(1639278160000)); // s.date.equal(1639278160000);
+```
+
+#### Strings
+
+[Back to top][toc]
+
+Shapeshift includes a handful of string-specific validations:
+
+```typescript
+s.string.lengthLessThan(5);
+s.string.lengthLessThanOrEqual(5);
+s.string.lengthGreaterThan(5);
+s.string.lengthGreaterThanOrEqual(5);
+s.string.lengthEqual(5);
+s.string.lengthNotEqual(5);
+s.string.email;
+s.string.url();
+s.string.uuid();
+s.string.regex(regex);
+s.string.ip();
+s.string.ipv4;
+s.string.ipv6;
+s.string.phone();
+```
+
+#### Numbers
+
+[Back to top][toc]
+
+Shapeshift includes a handful of number-specific validations:
+
+```typescript
+s.number.greaterThan(5); // > 5
+s.number.greaterThanOrEqual(5); // >= 5
+s.number.lessThan(5); // < 5
+s.number.lessThanOrEqual(5); // <= 5
+s.number.equal(5); // === 5
+s.number.notEqual(5); // !== 5
+
+s.number.equal(NaN); // special case: Number.isNaN
+s.number.notEqual(NaN); // special case: !Number.isNaN
+
+s.number.int; // value must be an integer
+s.number.safeInt; // value must be a safe integer
+s.number.finite; // value must be finite
+
+s.number.positive; // .greaterThanOrEqual(0)
+s.number.negative; // .lessThan(0)
+
+s.number.divisibleBy(5); // Divisible by 5
+```
+
+And transformations:
+
+```typescript
+s.number.abs; // Transforms the number to an absolute number
+s.number.sign; // Gets the number's sign
+
+s.number.trunc; // Transforms the number to the result of `Math.trunc`
+s.number.floor; // Transforms the number to the result of `Math.floor`
+s.number.fround; // Transforms the number to the result of `Math.fround`
+s.number.round; // Transforms the number to the result of `Math.round`
+s.number.ceil; // Transforms the number to the result of `Math.ceil`
+```
+
+#### BigInts
+
+[Back to top][toc]
+
+Shapeshift includes a handful of number-specific validations:
+
+```typescript
+s.bigint.greaterThan(5n); // > 5n
+s.bigint.greaterThanOrEqual(5n); // >= 5n
+s.bigint.lessThan(5n); // < 5n
+s.bigint.lessThanOrEqual(5n); // <= 5n
+s.bigint.equal(5n); // === 5n
+s.bigint.notEqual(5n); // !== 5n
+
+s.bigint.positive; // .greaterThanOrEqual(0n)
+s.bigint.negative; // .lessThan(0n)
+
+s.bigint.divisibleBy(5n); // Divisible by 5n
+```
+
+And transformations:
+
+```typescript
+s.bigint.abs; // Transforms the bigint to an absolute bigint
+
+s.bigint.intN(5); // Clamps to a bigint to a signed bigint with 5 digits, see BigInt.asIntN
+s.bigint.uintN(5); // Clamps to a bigint to an unsigned bigint with 5 digits, see BigInt.asUintN
+```
+
+#### Booleans
+
+[Back to top][toc]
+
+Shapeshift includes a few boolean-specific validations:
+
+```typescript
+s.boolean.true; // value must be true
+s.boolean.false; // value must be false
+
+s.boolean.equal(true); // s.boolean.true
+s.boolean.equal(false); // s.boolean.false
+
+s.boolean.notEqual(true); // s.boolean.false
+s.boolean.notEqual(false); // s.boolean.true
+```
+
+#### Arrays
+
+[Back to top][toc]
+
+```typescript
+const stringArray = s.array(s.string);
+const stringArray = s.string.array;
+```
+
+Shapeshift includes a handful of array-specific validations:
+
+```typescript
+s.string.array.lengthLessThan(5); // Must have less than 5 elements
+s.string.array.lengthLessThanOrEqual(5); // Must have 5 or less elements
+s.string.array.lengthGreaterThan(5); // Must have more than 5 elements
+s.string.array.lengthGreaterThanOrEqual(5); // Must have 5 or more elements
+s.string.array.lengthEqual(5); // Must have exactly 5 elements
+s.string.array.lengthNotEqual(5); // Must not have exactly 5 elements
+s.string.array.lengthRange(0, 4); // Must have at least 0 elements and less than 4 elements (in math, that is [0, 4))
+s.string.array.lengthRangeInclusive(0, 4); // Must have at least 0 elements and at most 4 elements (in math, that is [0, 4])
+s.string.array.lengthRangeExclusive(0, 4); // Must have more than 0 element and less than 4 elements (in math, that is (0, 4))
+s.string.array.unique; // All elements must be unique. Deep equality is used to check for uniqueness.
+```
+
+> **Note**: All `.length` methods define tuple types with the given amount of elements. For example,
+> `s.string.array.lengthGreaterThanOrEqual(2)`'s inferred type is `[string, string, ...string[]]`
+
+#### Tuples
+
+[Back to top][toc]
+
+Unlike arrays, tuples have a fixed number of elements and each element can have a different type:
+
+```typescript
+const dish = s.tuple([
+ s.string, // Dish's name
+ s.number.int, // Table's number
+ s.date // Date the dish was ready for delivery
+]);
+
+dish.parse(['Iberian ham', 10, new Date()]);
+```
+
+#### Unions
+
+[Back to top][toc]
+
+Shapeshift includes a built-in method for composing OR types:
+
+```typescript
+const stringOrNumber = s.union(s.string, s.number);
+
+stringOrNumber.parse('Sapphire'); // => 'Sapphire'
+stringOrNumber.parse(42); // => 42
+stringOrNumber.parse({}); // => throws CombinedError
+```
+
+#### Enums
+
+[Back to top][toc]
+
+Enums are a convenience method that aliases `s.union(s.literal(a), s.literal(b), ...)`:
+
+```typescript
+s.enum('Red', 'Green', 'Blue');
+// s.union(s.literal('Red'), s.literal('Green'), s.literal('Blue'));
+```
+
+#### Maps
+
+[Back to top][toc]
+
+```typescript
+const map = s.map(s.string, s.number);
+// Map<string, number>
+```
+
+#### Sets
+
+[Back to top][toc]
+
+```typescript
+const set = s.set(s.number);
+// Set<number>
+```
+
+#### Instances
+
+[Back to top][toc]
+
+You can use `s.instance(Class)` to check that the input is an instance of a class. This is useful to validate inputs
+against classes:
+
+```typescript
+class User {
+ public constructor(public name: string) {}
+}
+
+const userInstanceValidation = s.instance(User);
+userInstanceValidation.parse(new User('Sapphire')); // => User { name: 'Sapphire' }
+userInstanceValidation.parse('oops'); // => throws ValidatorError
+```
+
+#### Records
+
+[Back to top][toc]
+
+Record validations are similar to objects, but validate `Record<string, T>` types. Keep in mind this does not check for
+the keys, and cannot support validation for specific ones:
+
+```typescript
+const tags = s.record(s.string);
+
+tags.parse({ foo: 'bar', hello: 'world' }); // => { foo: 'bar', hello: 'world' }
+tags.parse({ foo: 42 }); // => throws CombinedError
+tags.parse('Hello'); // => throws ValidateError
+```
+
+---
+
+_**Function validation is not yet implemented and will be made available starting v2.1.0**_
+
+#### Functions // TODO
+
+[Back to top][toc]
+
+You can define function validations. This checks for whether or not an input is a function:
+
+```typescript
+s.function; // () => unknown
+```
+
+You can define arguments by passing an array as the first argument, as well as the return type as the second:
+
+```typescript
+s.function([s.string]); // (arg0: string) => unknown
+s.function([s.string, s.number], s.string); // (arg0: string, arg1: number) => string
+```
+
+> **Note**: Shapeshift will transform the given function into one with validation on arguments and output. You can
+> access the `.raw` property of the function to get the unchecked function.
+
+---
+
+#### TypedArray
+
+[Back to top][toc]
+
+```ts
+const typedArray = s.typedArray();
+const int16Array = s.int16Array;
+const uint16Array = s.uint16Array;
+const uint8ClampedArray = s.uint8ClampedArray;
+const int16Array = s.int16Array;
+const uint16Array = s.uint16Array;
+const int32Array = s.int32Array;
+const uint32Array = s.uint32Array;
+const float32Array = s.float32Array;
+const float64Array = s.float64Array;
+const bigInt64Array = s.bigInt64Array;
+const bigUint64Array = s.bigUint64Array;
+```
+
+Shapeshift includes a handful of validations specific to typed arrays.
+
+```typescript
+s.typedArray().lengthLessThan(5); // Length must be less than 5
+s.typedArray().lengthLessThanOrEqual(5); // Length must be 5 or less
+s.typedArray().lengthGreaterThan(5); // Length must be more than 5
+s.typedArray().lengthGreaterThanOrEqual(5); // Length must be 5 or more
+s.typedArray().lengthEqual(5); // Length must be exactly 5
+s.typedArray().lengthNotEqual(5); // Length must not be 5
+s.typedArray().lengthRange(0, 4); // Length L must satisfy 0 <= L < 4
+s.typedArray().lengthRangeInclusive(0, 4); // Length L must satisfy 0 <= L <= 4
+s.typedArray().lengthRangeExclusive(0, 4); // Length L must satisfy 0 < L < 4
+```
+
+Note that all of these methods have analogous methods for working with the typed array's byte length,
+`s.typedArray().byteLengthX()` - for instance, `s.typedArray().byteLengthLessThan(5)` is the same as
+`s.typedArray().lengthLessThan(5)` but for the array's byte length.
+
+---
+
+### Defining schemas (objects)
+
+[Back to top][toc]
+
+```typescript
+// Properties are required by default:
+const animal = s.object({
+ name: s.string,
+ age: s.number
+});
+```
+
+#### Utility types for TypeScript
+
+[Back to top][toc]
+
+For object validation Shapeshift exports 2 utility types that can be used to extract interfaces from schemas and define
+the structure of a schema as an interface beforehand respectively.
+
+##### Extracting an interface from a schema
+
+[Back to top][toc]
+
+You can use the `InferType` type to extract the interface from a schema, for example:
+
+```typescript
+import { InferType, s } from '@sapphire/shapeshift';
+
+const schema = s.object({
+ foo: s.string,
+ bar: s.number,
+ baz: s.boolean,
+ qux: s.bigint,
+ quux: s.date
+});
+
+type Inferredtype = InferType<typeof schema>;
+
+// Expected type:
+type Inferredtype = {
+ foo: string;
+ bar: number;
+ baz: boolean;
+ qux: bigint;
+ quux: Date;
+};
+```
+
+##### Defining the structure of a schema through an interface
+
+[Back to top][toc]
+
+You can use the `SchemaOf` type to define the structure of a schema before defining the actual schema, for example:
+
+```typescript
+import { s, SchemaOf } from '@sapphire/shapeshift';
+
+interface IIngredient {
+ ingredientId: string | undefined;
+ name: string | undefined;
+}
+
+interface IInstruction {
+ instructionId: string | undefined;
+ message: string | undefined;
+}
+
+interface IRecipe {
+ recipeId: string | undefined;
+ title: string;
+ description: string;
+ instructions: IInstruction[];
+ ingredients: IIngredient[];
+}
+
+type InstructionSchemaType = SchemaOf<IInstruction>;
+// Expected Type: ObjectValidator<IInstruction>
+
+type IngredientSchemaType = SchemaOf<IIngredient>;
+// Expected Type: ObjectValidator<IIngredient>
+
+type RecipeSchemaType = SchemaOf<IRecipe>;
+// Expected Type: ObjectValidator<IRecipe>
+
+const instructionSchema: InstructionSchemaType = s.object({
+ instructionId: s.string.optional,
+ message: s.string
+});
+
+const ingredientSchema: IngredientSchemaType = s.object({
+ ingredientId: s.string.optional,
+ name: s.string
+});
+
+const recipeSchema: RecipeSchemaType = s.object({
+ recipeId: s.string.optional,
+ title: s.string,
+ description: s.string,
+ instructions: s.array(instructionSchema),
+ ingredients: s.array(ingredientSchema)
+});
+```
+
+#### `.extend`:
+
+[Back to top][toc]
+
+You can add additional fields using either an object or an ObjectValidator, in this case, you will get a new object
+validator with the merged properties:
+
+```typescript
+const animal = s.object({
+ name: s.string.optional,
+ age: s.number
+});
+
+const pet = animal.extend({
+ owner: s.string.nullish
+});
+
+const pet = animal.extend(
+ s.object({
+ owner: s.string.nullish
+ })
+);
+```
+
+> If both schemas share keys, an error will be thrown. Please use `.omit` on the first object if you desire this
+> behaviour.
+
+#### `.pick` / `.omit`:
+
+[Back to top][toc]
+
+Inspired by TypeScript's built-in `Pick` and `Omit` utility types, all object schemas have the aforementioned methods
+that return a modifier version:
+
+```typescript
+const pkg = s.object({
+ name: s.string,
+ description: s.string,
+ dependencies: s.string.array
+});
+
+const justTheName = pkg.pick(['name']);
+// s.object({ name: s.string });
+
+const noDependencies = pkg.omit(['dependencies']);
+// s.object({ name: s.string, description: s.string });
+```
+
+#### `.partial`
+
+[Back to top][toc]
+
+Inspired by TypeScript's built-in `Partial` utility type, all object schemas have the aforementioned method that makes
+all properties optional:
+
+```typescript
+const user = s.object({
+ username: s.string,
+ password: s.string
+}).partial;
+```
+
+Which is the same as doing:
+
+```typescript
+const user = s.object({
+ username: s.string.optional,
+ password: s.string.optional
+});
+```
+
+---
+
+#### `.required`
+
+[Back to top][toc]
+
+Inspired by TypeScript's built-in `Required` utility type, all object schemas have the aforementioned method that makes
+all properties required:
+
+```typescript
+const user = s.object({
+ username: s.string.optional,
+ password: s.string.optional
+}).required;
+```
+
+Which is the same as doing:
+
+```typescript
+const user = s.object({
+ username: s.string,
+ password: s.string
+});
+```
+
+---
+
+### Handling unrecognized keys
+
+[Back to top][toc]
+
+By default, Shapeshift will not include keys that are not defined by the schema during parsing:
+
+```typescript
+const person = s.object({
+ framework: s.string
+});
+
+person.parse({
+ framework: 'Sapphire',
+ awesome: true
+});
+// => { name: 'Sapphire' }
+```
+
+#### `.strict`
+
+[Back to top][toc]
+
+You can disallow unknown keys with `.strict`. If the input includes any unknown keys, an error will be thrown.
+
+```typescript
+const person = s.object({
+ framework: s.string
+}).strict;
+
+person.parse({
+ framework: 'Sapphire',
+ awesome: true
+});
+// => throws ValidationError
+```
+
+#### `.ignore`
+
+[Back to top][toc]
+
+You can use the `.ignore` getter to reset an object schema to the default behaviour (ignoring unrecognized keys).
+
+#### `.passthrough`
+
+[Back to top][toc]
+
+You can use the `.passthrough` getter to make the validator add the unrecognized properties the shape does not have,
+from the input.
+
+---
+
+### BaseValidator: methods and properties
+
+[Back to top][toc]
+
+All validations in Shapeshift contain certain methods.
+
+- #### `.run(data: unknown): Result<T, Error>`: given a validation, you can call this method to check whether or not the
+
+ input is valid. If it is, a `Result` with `success: true` and a deep-cloned value will be returned with the given
+ constraints and transformations. Otherwise, a `Result` with `success: false` and an error is returned.
+
+- #### `.parse(data: unknown): T`: given a validations, you can call this method to check whether or not the input is valid.
+
+ If it is, a deep-cloned value will be returned with the given constraints and transformations. Otherwise, an error is
+ thrown.
+
+- #### `.transform<R>((value: T) => R): NopValidator<R>`: adds a constraint that modifies the input:
+
+```typescript
+import { s } from '@sapphire/shapeshift';
+
+const getLength = s.string.transform((value) => value.length);
+getLength.parse('Hello There'); // => 11
+```
+
+> :warning: `.transform`'s functions **must not throw**. If a validation error is desired to be thrown, `.reshape`
+> instead.
+
+- #### `.reshape<R>((value: T) => Result<R, Error> | IConstraint): NopValidator<R>`: adds a constraint able to both validate
+ and modify the input:
+
+```typescript
+import { s, Result } from '@sapphire/shapeshift';
+
+const getLength = s.string.reshape((value) => Result.ok(value.length));
+getLength.parse('Hello There'); // => 11
+```
+
+> :warning: `.reshape`'s functions **must not throw**. If a validation error is desired to be thrown, use
+> `Result.err(error)` instead.
+
+- #### `.default(value: T | (() => T))`: transform `undefined` into the given value or the callback's returned value:
+
+```typescript
+const name = s.string.default('Sapphire');
+name.parse('Hello'); // => 'Hello'
+name.parse(undefined); // => 'Sapphire'
+```
+
+```typescript
+const number = s.number.default(Math.random);
+number.parse(12); // => 12
+number.parse(undefined); // => 0.989911985608602
+number.parse(undefined); // => 0.3224350185068794
+```
+
+> :warning: The default values are not validated.
+
+- #### `.optional`: a convenience method that returns a union of the type with `s.undefined`.
+
+```typescript
+s.string.optional; // s.union(s.string, s.undefined)
+```
+
+- #### `.nullable`: a convenience method that returns a union of the type with `s.nullable`.
+
+```typescript
+s.string.nullable; // s.union(s.string, s.nullable)
+```
+
+- #### `.nullish`: a convenience method that returns a union of the type with `s.nullish`.
+
+```typescript
+s.string.nullish; // s.union(s.string, s.nullish)
+```
+
+- #### `.array`: a convenience method that returns an ArrayValidator with the type.
+
+```typescript
+s.string.array; // s.array(s.string)
+```
+
+- #### `.or`: a convenience method that returns an UnionValidator with the type. This method is also overridden in
+ UnionValidator to just append one more entry.
+
+```typescript
+s.string.or(s.number);
+// => s.union(s.string, s.number)
+
+s.object({ name: s.string }).or(s.string, s.number);
+// => s.union(s.object({ name: s.string }), s.string, s.number)
+```
+
+- #### `.when`: Adjust the schema based on a sibling or sinbling children fields.
+
+For using when you provide an object literal where the key `is` is undefined, a value, or a matcher function; `then`
+provides the schema when `is` resolves truthy, and `otherwise` provides the schema when `is` resolves falsey.
+
+##### Available options for providing `is`
+
+When `is` is not provided (`=== undefined`) it is strictly resolved as `Boolean(value)` wherein `value` is the current
+value of the referenced sibling. Note that if multiple siblings are referenced then all the values of the array need to
+resolve truthy for the `is` to resolve truthy.
+
+When `is` is a primitive literal it is strictly compared (`===`) to the current value.
+
+If you want to use a different form of equality you can provide a function like: `is: (value) => value === true`.
+
+##### Resolving of the `key` (first) parameter
+
+For resolving the `key` parameter to its respective value we use [lodash/get](https://lodash.com/docs#get). This means
+that every way that Lodash supports resolving a key to its respective value is also supported by Shapeshift. This
+includes:
+
+- Simply providing a string or number like `'name'` or `1`.
+- Providing a string or number with a dot notation like `'name.first'` (representative of a nested object structure of
+ `{ 'name': { 'first': 'Sapphire' } }` => resolves to `Sapphire`).
+- Providing a string or number with a bracket notation like `'name[0]'` (representative of an array structure of
+ `{ 'name': ['Sapphire', 'Framework'] }` => resolves to `Sapphire`).
+- Providing a string or number with a dot and bracket notation like `'name[1].first'` (representative of a nested object
+ structure of `{ 'name': [{ 'first': 'Sapphire' }, { 'first': 'Framework' }] }` => resolves to `Framework`).
+
+##### Examples
+
+Let's start with a basic example:
+
+```typescript
+const whenPredicate = s.object({
+ booleanLike: s.boolean,
+ numberLike: s.number.when('booleanLike', {
+ then: (schema) => schema.greaterThanOrEqual(5),
+ otherwise: (schema) => schema.lessThanOrEqual(5)
+ })
+});
+
+whenPredicate.parse({ booleanLike: true, numberLike: 6 });
+// => { booleanLike: true, numberLike: 6 }
+
+whenPredicate.parse({ booleanLike: true, numberLike: 4 });
+// => ExpectedConstraintError('s.number.greaterThanOrEqual', 'Invalid number value', 4, 'expected >= 5')
+
+whenPredicate.parse({ booleanLike: false, numberLike: 4 });
+// => { booleanLike: false, numberLike: 4 }
+```
+
+The provided key can also be an array of sibling children:
+
+```typescript
+const whenPredicate = s.object({
+ booleanLike: s.boolean,
+ stringLike: s.string,
+ numberLike: s.number.when(['booleanLike', 'stringLike'], {
+ is: ([booleanLikeValue, stringLikeValue]) => booleanLikeValue === true && stringLikeValue === 'foobar',
+ then: (schema) => schema.greaterThanOrEqual(5),
+ otherwise: (schema) => schema.lessThanOrEqual(5)
+ })
+});
+
+whenPredicate.parse({ booleanLike: true, stringLike: 'foobar', numberLike: 6 });
+// => { booleanLike: true, numberLike: 6 }
+
+whenPredicate.parse({ booleanLike: true, stringLike: 'barfoo', numberLike: 4 });
+// => ExpectedConstraintError('s.number.greaterThanOrEqual', 'Invalid number value', 4, 'expected >= 5')
+
+whenPredicate.parse({ booleanLike: false, stringLike: 'foobar' numberLike: 4 });
+// => ExpectedConstraintError('s.number.greaterThanOrEqual', 'Invalid number value', 4, 'expected >= 5')
+```
+
+### Enabling and disabling validation
+
+[Back to top][toc]
+
+At times, you might want to have a consistent code base with validation, but would like to keep validation to the strict
+necessities instead of the in-depth constraints available in shapeshift. By calling `setGlobalValidationEnabled` you can
+disable validation at a global level, and by calling `setValidationEnabled` you can disable validation on a
+per-validator level.
+
+> When setting the validation enabled status per-validator, you can also set it to `null` to use the global setting.
+
+```typescript
+import { setGlobalValidationEnabled } from '@sapphire/shapeshift';
+
+setGlobalValidationEnabled(false);
+```
+
+```typescript
+import { s } from '@sapphire/shapeshift';
+
+const predicate = s.string.lengthGreaterThan(5).setValidationEnabled(false);
+```
+
+## Buy us some doughnuts
+
+[Back to top][toc]
+
+Sapphire Community is and always will be open source, even if we don't get donations. That being said, we know there are
+amazing people who may still want to donate just to show their appreciation. Thank you very much in advance!
+
+We accept donations through Open Collective, Ko-fi, Paypal, Patreon and GitHub Sponsorships. You can use the buttons
+below to donate through your method of choice.
+
+| Donate With | Address |
+| :-------------: | :-------------------------------------------------: |
+| Open Collective | [Click Here](https://sapphirejs.dev/opencollective) |
+| Ko-fi | [Click Here](https://sapphirejs.dev/kofi) |
+| Patreon | [Click Here](https://sapphirejs.dev/patreon) |
+| PayPal | [Click Here](https://sapphirejs.dev/paypal) |
+
+## Contributors
+
+[Back to top][toc]
+
+Please make sure to read the [Contributing Guide][contributing] before making a pull request.
+
+Thank you to all the people who already contributed to Sapphire!
+
+<a href="https://github.com/sapphiredev/shapeshift/graphs/contributors">
+ <img src="https://contrib.rocks/image?repo=sapphiredev/shapeshift" />
+</a>
+
+[contributing]: https://github.com/sapphiredev/.github/blob/main/.github/CONTRIBUTING.md
+[`zod`]: https://github.com/colinhacks/zod
+[documentation]: https://www.sapphirejs.dev/docs/Documentation/api-shapeshift/
+[toc]: #table-of-contents
diff --git a/node_modules/@sapphire/shapeshift/dist/index.d.ts b/node_modules/@sapphire/shapeshift/dist/index.d.ts
new file mode 100644
index 0000000..748451d
--- /dev/null
+++ b/node_modules/@sapphire/shapeshift/dist/index.d.ts
@@ -0,0 +1,715 @@
+import { InspectOptionsStylized } from 'util';
+
+declare class Result<T, E extends Error = Error> {
+ readonly success: boolean;
+ readonly value?: T;
+ readonly error?: E;
+ private constructor();
+ isOk(): this is {
+ success: true;
+ value: T;
+ };
+ isErr(): this is {
+ success: false;
+ error: E;
+ };
+ unwrap(): T;
+ static ok<T, E extends Error = Error>(value: T): Result<T, E>;
+ static err<T, E extends Error = Error>(error: E): Result<T, E>;
+}
+
+type ArrayConstraintName = `s.array(T).${'unique' | `length${'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'Equal' | 'NotEqual' | 'Range' | 'RangeInclusive' | 'RangeExclusive'}`}`;
+declare function arrayLengthLessThan<T>(value: number): IConstraint<T[]>;
+declare function arrayLengthLessThanOrEqual<T>(value: number): IConstraint<T[]>;
+declare function arrayLengthGreaterThan<T>(value: number): IConstraint<T[]>;
+declare function arrayLengthGreaterThanOrEqual<T>(value: number): IConstraint<T[]>;
+declare function arrayLengthEqual<T>(value: number): IConstraint<T[]>;
+declare function arrayLengthNotEqual<T>(value: number): IConstraint<T[]>;
+declare function arrayLengthRange<T>(start: number, endBefore: number): IConstraint<T[]>;
+declare function arrayLengthRangeInclusive<T>(start: number, end: number): IConstraint<T[]>;
+declare function arrayLengthRangeExclusive<T>(startAfter: number, endBefore: number): IConstraint<T[]>;
+
+type BigIntConstraintName = `s.bigint.${'lessThan' | 'lessThanOrEqual' | 'greaterThan' | 'greaterThanOrEqual' | 'equal' | 'notEqual' | 'divisibleBy'}`;
+declare function bigintLessThan(value: bigint): IConstraint<bigint>;
+declare function bigintLessThanOrEqual(value: bigint): IConstraint<bigint>;
+declare function bigintGreaterThan(value: bigint): IConstraint<bigint>;
+declare function bigintGreaterThanOrEqual(value: bigint): IConstraint<bigint>;
+declare function bigintEqual(value: bigint): IConstraint<bigint>;
+declare function bigintNotEqual(value: bigint): IConstraint<bigint>;
+declare function bigintDivisibleBy(divider: bigint): IConstraint<bigint>;
+
+type BooleanConstraintName = `s.boolean.${boolean}`;
+declare const booleanTrue: IConstraint<boolean, true>;
+declare const booleanFalse: IConstraint<boolean, false>;
+
+type DateConstraintName = `s.date.${'lessThan' | 'lessThanOrEqual' | 'greaterThan' | 'greaterThanOrEqual' | 'equal' | 'notEqual' | 'valid' | 'invalid'}`;
+declare function dateLessThan(value: Date): IConstraint<Date>;
+declare function dateLessThanOrEqual(value: Date): IConstraint<Date>;
+declare function dateGreaterThan(value: Date): IConstraint<Date>;
+declare function dateGreaterThanOrEqual(value: Date): IConstraint<Date>;
+declare function dateEqual(value: Date): IConstraint<Date>;
+declare function dateNotEqual(value: Date): IConstraint<Date>;
+declare const dateInvalid: IConstraint<Date>;
+declare const dateValid: IConstraint<Date>;
+
+type NumberConstraintName = `s.number.${'lessThan' | 'lessThanOrEqual' | 'greaterThan' | 'greaterThanOrEqual' | 'equal' | 'equal(NaN)' | 'notEqual' | 'notEqual(NaN)' | 'int' | 'safeInt' | 'finite' | 'divisibleBy'}`;
+declare function numberLessThan(value: number): IConstraint<number>;
+declare function numberLessThanOrEqual(value: number): IConstraint<number>;
+declare function numberGreaterThan(value: number): IConstraint<number>;
+declare function numberGreaterThanOrEqual(value: number): IConstraint<number>;
+declare function numberEqual(value: number): IConstraint<number>;
+declare function numberNotEqual(value: number): IConstraint<number>;
+declare const numberInt: IConstraint<number>;
+declare const numberSafeInt: IConstraint<number>;
+declare const numberFinite: IConstraint<number>;
+declare const numberNaN: IConstraint<number>;
+declare const numberNotNaN: IConstraint<number>;
+declare function numberDivisibleBy(divider: number): IConstraint<number>;
+
+declare const customInspectSymbol: unique symbol;
+declare const customInspectSymbolStackLess: unique symbol;
+declare abstract class BaseError extends Error {
+ protected [customInspectSymbol](depth: number, options: InspectOptionsStylized): string;
+ protected abstract [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string;
+}
+
+declare class CombinedError extends BaseError {
+ readonly errors: readonly BaseError[];
+ constructor(errors: readonly BaseError[]);
+ protected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string;
+}
+
+declare class ValidationError extends BaseError {
+ readonly validator: string;
+ readonly given: unknown;
+ constructor(validator: string, message: string, given: unknown);
+ toJSON(): {
+ name: string;
+ validator: string;
+ given: unknown;
+ };
+ protected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string;
+}
+
+declare class ExpectedValidationError<T> extends ValidationError {
+ readonly expected: T;
+ constructor(validator: string, message: string, given: unknown, expected: T);
+ toJSON(): {
+ name: string;
+ validator: string;
+ given: unknown;
+ expected: T;
+ };
+ protected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string;
+}
+
+declare class MissingPropertyError extends BaseError {
+ readonly property: PropertyKey;
+ constructor(property: PropertyKey);
+ toJSON(): {
+ name: string;
+ property: PropertyKey;
+ };
+ protected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string;
+}
+
+declare class MultiplePossibilitiesConstraintError<T = unknown> extends BaseConstraintError<T> {
+ readonly expected: readonly string[];
+ constructor(constraint: ConstraintErrorNames, message: string, given: T, expected: readonly string[]);
+ toJSON(): {
+ name: string;
+ constraint: ConstraintErrorNames;
+ given: T;
+ expected: readonly string[];
+ };
+ protected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string;
+}
+
+declare class UnknownEnumValueError extends BaseError {
+ readonly value: string | number;
+ readonly enumKeys: string[];
+ readonly enumMappings: Map<string | number, string | number>;
+ constructor(value: string | number, keys: string[], enumMappings: Map<string | number, string | number>);
+ toJSON(): {
+ name: string;
+ value: string | number;
+ enumKeys: string[];
+ enumMappings: [string | number, string | number][];
+ };
+ protected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string;
+}
+
+declare class UnknownPropertyError extends BaseError {
+ readonly property: PropertyKey;
+ readonly value: unknown;
+ constructor(property: PropertyKey, value: unknown);
+ toJSON(): {
+ name: string;
+ property: PropertyKey;
+ value: unknown;
+ };
+ protected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string;
+}
+
+declare class BigIntValidator<T extends bigint> extends BaseValidator<T> {
+ lessThan(number: bigint): this;
+ lessThanOrEqual(number: bigint): this;
+ greaterThan(number: bigint): this;
+ greaterThanOrEqual(number: bigint): this;
+ equal<N extends bigint>(number: N): BigIntValidator<N>;
+ notEqual(number: bigint): this;
+ get positive(): this;
+ get negative(): this;
+ divisibleBy(number: bigint): this;
+ get abs(): this;
+ intN(bits: number): this;
+ uintN(bits: number): this;
+ protected handle(value: unknown): Result<T, ValidationError>;
+}
+
+declare class BooleanValidator<T extends boolean = boolean> extends BaseValidator<T> {
+ get true(): BooleanValidator<true>;
+ get false(): BooleanValidator<false>;
+ equal<R extends true | false>(value: R): BooleanValidator<R>;
+ notEqual<R extends true | false>(value: R): BooleanValidator<R>;
+ protected handle(value: unknown): Result<T, ValidationError>;
+}
+
+declare class DateValidator extends BaseValidator<Date> {
+ lessThan(date: Date | number | string): this;
+ lessThanOrEqual(date: Date | number | string): this;
+ greaterThan(date: Date | number | string): this;
+ greaterThanOrEqual(date: Date | number | string): this;
+ equal(date: Date | number | string): this;
+ notEqual(date: Date | number | string): this;
+ get valid(): this;
+ get invalid(): this;
+ protected handle(value: unknown): Result<Date, ValidationError>;
+}
+
+declare class DefaultValidator<T> extends BaseValidator<T> {
+ private readonly validator;
+ private defaultValue;
+ constructor(validator: BaseValidator<T>, value: T | (() => T), constraints?: readonly IConstraint<T>[]);
+ default(value: Exclude<T, undefined> | (() => Exclude<T, undefined>)): DefaultValidator<Exclude<T, undefined>>;
+ protected handle(value: unknown): Result<T, ValidatorError>;
+ protected clone(): this;
+}
+
+declare class InstanceValidator<T> extends BaseValidator<T> {
+ readonly expected: Constructor<T>;
+ constructor(expected: Constructor<T>, constraints?: readonly IConstraint<T>[]);
+ protected handle(value: unknown): Result<T, ExpectedValidationError<Constructor<T>>>;
+ protected clone(): this;
+}
+
+declare class LiteralValidator<T> extends BaseValidator<T> {
+ readonly expected: T;
+ constructor(literal: T, constraints?: readonly IConstraint<T>[]);
+ protected handle(value: unknown): Result<T, ExpectedValidationError<T>>;
+ protected clone(): this;
+}
+
+declare class CombinedPropertyError extends BaseError {
+ readonly errors: [PropertyKey, BaseError][];
+ constructor(errors: [PropertyKey, BaseError][]);
+ protected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string;
+ private static formatProperty;
+}
+
+declare class MapValidator<K, V> extends BaseValidator<Map<K, V>> {
+ private readonly keyValidator;
+ private readonly valueValidator;
+ constructor(keyValidator: BaseValidator<K>, valueValidator: BaseValidator<V>, constraints?: readonly IConstraint<Map<K, V>>[]);
+ protected clone(): this;
+ protected handle(value: unknown): Result<Map<K, V>, ValidationError | CombinedPropertyError>;
+}
+
+declare class NativeEnumValidator<T extends NativeEnumLike> extends BaseValidator<T[keyof T]> {
+ readonly enumShape: T;
+ readonly hasNumericElements: boolean;
+ private readonly enumKeys;
+ private readonly enumMapping;
+ constructor(enumShape: T);
+ protected handle(value: unknown): Result<T[keyof T], ValidationError | UnknownEnumValueError>;
+ protected clone(): this;
+}
+interface NativeEnumLike {
+ [key: string]: string | number;
+ [key: number]: string;
+}
+
+declare class NeverValidator extends BaseValidator<never> {
+ protected handle(value: unknown): Result<never, ValidationError>;
+}
+
+declare class NullishValidator extends BaseValidator<undefined | null> {
+ protected handle(value: unknown): Result<undefined | null, ValidationError>;
+}
+
+declare class NumberValidator<T extends number> extends BaseValidator<T> {
+ lessThan(number: number): this;
+ lessThanOrEqual(number: number): this;
+ greaterThan(number: number): this;
+ greaterThanOrEqual(number: number): this;
+ equal<N extends number>(number: N): NumberValidator<N>;
+ notEqual(number: number): this;
+ get int(): this;
+ get safeInt(): this;
+ get finite(): this;
+ get positive(): this;
+ get negative(): this;
+ divisibleBy(divider: number): this;
+ get abs(): this;
+ get sign(): this;
+ get trunc(): this;
+ get floor(): this;
+ get fround(): this;
+ get round(): this;
+ get ceil(): this;
+ protected handle(value: unknown): Result<T, ValidationError>;
+}
+
+declare class ObjectValidator<T extends object, I = UndefinedToOptional<T>> extends BaseValidator<I> {
+ readonly shape: MappedObjectValidator<T>;
+ readonly strategy: ObjectValidatorStrategy;
+ private readonly keys;
+ private readonly handleStrategy;
+ private readonly requiredKeys;
+ private readonly possiblyUndefinedKeys;
+ private readonly possiblyUndefinedKeysWithDefaults;
+ constructor(shape: MappedObjectValidator<T>, strategy?: ObjectValidatorStrategy, constraints?: readonly IConstraint<I>[]);
+ get strict(): this;
+ get ignore(): this;
+ get passthrough(): this;
+ get partial(): ObjectValidator<{
+ [Key in keyof I]?: I[Key];
+ }>;
+ get required(): ObjectValidator<{
+ [Key in keyof I]-?: I[Key];
+ }>;
+ extend<ET extends object>(schema: ObjectValidator<ET> | MappedObjectValidator<ET>): ObjectValidator<T & ET>;
+ pick<K extends keyof I>(keys: readonly K[]): ObjectValidator<{
+ [Key in keyof Pick<I, K>]: I[Key];
+ }>;
+ omit<K extends keyof I>(keys: readonly K[]): ObjectValidator<{
+ [Key in keyof Omit<I, K>]: I[Key];
+ }>;
+ protected handle(value: unknown): Result<I, ValidationError | CombinedPropertyError>;
+ protected clone(): this;
+ private handleIgnoreStrategy;
+ private handleStrictStrategy;
+ private handlePassthroughStrategy;
+}
+declare enum ObjectValidatorStrategy {
+ Ignore = 0,
+ Strict = 1,
+ Passthrough = 2
+}
+
+declare class PassthroughValidator<T extends any | unknown> extends BaseValidator<T> {
+ protected handle(value: unknown): Result<T, ValidationError>;
+}
+
+declare class RecordValidator<T> extends BaseValidator<Record<string, T>> {
+ private readonly validator;
+ constructor(validator: BaseValidator<T>, constraints?: readonly IConstraint<Record<string, T>>[]);
+ protected clone(): this;
+ protected handle(value: unknown): Result<Record<string, T>, ValidationError | CombinedPropertyError>;
+}
+
+declare class SetValidator<T> extends BaseValidator<Set<T>> {
+ private readonly validator;
+ constructor(validator: BaseValidator<T>, constraints?: readonly IConstraint<Set<T>>[]);
+ protected clone(): this;
+ protected handle(values: unknown): Result<Set<T>, ValidationError | CombinedError>;
+}
+
+type StringConstraintName = `s.string.${`length${'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'Equal' | 'NotEqual'}` | 'regex' | 'url' | 'uuid' | 'email' | `ip${'v4' | 'v6' | ''}` | 'date' | 'phone'}`;
+type StringProtocol = `${string}:`;
+type StringDomain = `${string}.${string}`;
+interface UrlOptions {
+ allowedProtocols?: StringProtocol[];
+ allowedDomains?: StringDomain[];
+}
+type UUIDVersion = 1 | 3 | 4 | 5;
+interface StringUuidOptions {
+ version?: UUIDVersion | `${UUIDVersion}-${UUIDVersion}` | null;
+ nullable?: boolean;
+}
+declare function stringLengthLessThan(length: number): IConstraint<string>;
+declare function stringLengthLessThanOrEqual(length: number): IConstraint<string>;
+declare function stringLengthGreaterThan(length: number): IConstraint<string>;
+declare function stringLengthGreaterThanOrEqual(length: number): IConstraint<string>;
+declare function stringLengthEqual(length: number): IConstraint<string>;
+declare function stringLengthNotEqual(length: number): IConstraint<string>;
+declare function stringEmail(): IConstraint<string>;
+declare function stringUrl(options?: UrlOptions): IConstraint<string>;
+declare function stringIp(version?: 4 | 6): IConstraint<string>;
+declare function stringRegex(regex: RegExp): IConstraint<string, string>;
+declare function stringUuid({ version, nullable }?: StringUuidOptions): IConstraint<string, string>;
+
+declare class StringValidator<T extends string> extends BaseValidator<T> {
+ lengthLessThan(length: number): this;
+ lengthLessThanOrEqual(length: number): this;
+ lengthGreaterThan(length: number): this;
+ lengthGreaterThanOrEqual(length: number): this;
+ lengthEqual(length: number): this;
+ lengthNotEqual(length: number): this;
+ get email(): this;
+ url(options?: UrlOptions): this;
+ uuid(options?: StringUuidOptions): this;
+ regex(regex: RegExp): this;
+ get date(): this;
+ get ipv4(): this;
+ get ipv6(): this;
+ ip(version?: 4 | 6): this;
+ phone(): this;
+ protected handle(value: unknown): Result<T, ValidationError>;
+}
+
+declare class TupleValidator<T extends any[]> extends BaseValidator<[...T]> {
+ private readonly validators;
+ constructor(validators: BaseValidator<[...T]>[], constraints?: readonly IConstraint<[...T]>[]);
+ protected clone(): this;
+ protected handle(values: unknown): Result<[...T], ValidationError | CombinedPropertyError>;
+}
+
+type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
+declare const TypedArrays: {
+ readonly Int8Array: (x: unknown) => x is Int8Array;
+ readonly Uint8Array: (x: unknown) => x is Uint8Array;
+ readonly Uint8ClampedArray: (x: unknown) => x is Uint8ClampedArray;
+ readonly Int16Array: (x: unknown) => x is Int16Array;
+ readonly Uint16Array: (x: unknown) => x is Uint16Array;
+ readonly Int32Array: (x: unknown) => x is Int32Array;
+ readonly Uint32Array: (x: unknown) => x is Uint32Array;
+ readonly Float32Array: (x: unknown) => x is Float32Array;
+ readonly Float64Array: (x: unknown) => x is Float64Array;
+ readonly BigInt64Array: (x: unknown) => x is BigInt64Array;
+ readonly BigUint64Array: (x: unknown) => x is BigUint64Array;
+ readonly TypedArray: (x: unknown) => x is TypedArray;
+};
+type TypedArrayName = keyof typeof TypedArrays;
+
+declare class TypedArrayValidator<T extends TypedArray> extends BaseValidator<T> {
+ private readonly type;
+ constructor(type: TypedArrayName, constraints?: readonly IConstraint<T>[]);
+ byteLengthLessThan(length: number): this;
+ byteLengthLessThanOrEqual(length: number): this;
+ byteLengthGreaterThan(length: number): this;
+ byteLengthGreaterThanOrEqual(length: number): this;
+ byteLengthEqual(length: number): this;
+ byteLengthNotEqual(length: number): this;
+ byteLengthRange(start: number, endBefore: number): this;
+ byteLengthRangeInclusive(startAt: number, endAt: number): this;
+ byteLengthRangeExclusive(startAfter: number, endBefore: number): this;
+ lengthLessThan(length: number): this;
+ lengthLessThanOrEqual(length: number): this;
+ lengthGreaterThan(length: number): this;
+ lengthGreaterThanOrEqual(length: number): this;
+ lengthEqual(length: number): this;
+ lengthNotEqual(length: number): this;
+ lengthRange(start: number, endBefore: number): this;
+ lengthRangeInclusive(startAt: number, endAt: number): this;
+ lengthRangeExclusive(startAfter: number, endBefore: number): this;
+ protected clone(): this;
+ protected handle(value: unknown): Result<T, ValidationError>;
+}
+
+declare class UnionValidator<T> extends BaseValidator<T> {
+ private validators;
+ constructor(validators: readonly BaseValidator<T>[], constraints?: readonly IConstraint<T>[]);
+ get optional(): UnionValidator<T | undefined>;
+ get required(): UnionValidator<Exclude<T, undefined>>;
+ get nullable(): UnionValidator<T | null>;
+ get nullish(): UnionValidator<T | null | undefined>;
+ or<O>(...predicates: readonly BaseValidator<O>[]): UnionValidator<T | O>;
+ protected clone(): this;
+ protected handle(value: unknown): Result<T, ValidationError | CombinedError>;
+}
+
+type ObjectConstraintName = `s.object(T.when)`;
+type WhenKey = PropertyKey | PropertyKey[];
+interface WhenOptions<T extends BaseValidator<any>, Key extends WhenKey> {
+ is?: boolean | ((value: Key extends Array<any> ? any[] : any) => boolean);
+ then: (predicate: T) => T;
+ otherwise?: (predicate: T) => T;
+}
+
+declare class ExpectedConstraintError<T = unknown> extends BaseConstraintError<T> {
+ readonly expected: string;
+ constructor(constraint: ConstraintErrorNames, message: string, given: T, expected: string);
+ toJSON(): {
+ name: string;
+ constraint: ConstraintErrorNames;
+ given: T;
+ expected: string;
+ };
+ protected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string;
+}
+
+type TypedArrayConstraintName = `s.typedArray(T).${'byteLength' | 'length'}${'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'Equal' | 'NotEqual' | 'Range' | 'RangeInclusive' | 'RangeExclusive'}`;
+declare function typedArrayByteLengthLessThan<T extends TypedArray>(value: number): IConstraint<T>;
+declare function typedArrayByteLengthLessThanOrEqual<T extends TypedArray>(value: number): IConstraint<T>;
+declare function typedArrayByteLengthGreaterThan<T extends TypedArray>(value: number): IConstraint<T>;
+declare function typedArrayByteLengthGreaterThanOrEqual<T extends TypedArray>(value: number): IConstraint<T>;
+declare function typedArrayByteLengthEqual<T extends TypedArray>(value: number): IConstraint<T>;
+declare function typedArrayByteLengthNotEqual<T extends TypedArray>(value: number): IConstraint<T>;
+declare function typedArrayByteLengthRange<T extends TypedArray>(start: number, endBefore: number): IConstraint<T>;
+declare function typedArrayByteLengthRangeInclusive<T extends TypedArray>(start: number, end: number): {
+ run(input: T): Result<T, Error> | Result<unknown, ExpectedConstraintError<T>>;
+};
+declare function typedArrayByteLengthRangeExclusive<T extends TypedArray>(startAfter: number, endBefore: number): IConstraint<T>;
+declare function typedArrayLengthLessThan<T extends TypedArray>(value: number): IConstraint<T>;
+declare function typedArrayLengthLessThanOrEqual<T extends TypedArray>(value: number): IConstraint<T>;
+declare function typedArrayLengthGreaterThan<T extends TypedArray>(value: number): IConstraint<T>;
+declare function typedArrayLengthGreaterThanOrEqual<T extends TypedArray>(value: number): IConstraint<T>;
+declare function typedArrayLengthEqual<T extends TypedArray>(value: number): IConstraint<T>;
+declare function typedArrayLengthNotEqual<T extends TypedArray>(value: number): IConstraint<T>;
+declare function typedArrayLengthRange<T extends TypedArray>(start: number, endBefore: number): IConstraint<T>;
+declare function typedArrayLengthRangeInclusive<T extends TypedArray>(start: number, end: number): IConstraint<T>;
+declare function typedArrayLengthRangeExclusive<T extends TypedArray>(startAfter: number, endBefore: number): IConstraint<T>;
+
+type ConstraintErrorNames = TypedArrayConstraintName | ArrayConstraintName | BigIntConstraintName | BooleanConstraintName | DateConstraintName | NumberConstraintName | ObjectConstraintName | StringConstraintName;
+declare abstract class BaseConstraintError<T = unknown> extends BaseError {
+ readonly constraint: ConstraintErrorNames;
+ readonly given: T;
+ constructor(constraint: ConstraintErrorNames, message: string, given: T);
+}
+
+interface IConstraint<Input, Return extends Input = Input> {
+ run(input: Input, parent?: any): Result<Return, BaseConstraintError<Input>>;
+}
+
+declare class ArrayValidator<T extends unknown[], I = T[number]> extends BaseValidator<T> {
+ private readonly validator;
+ constructor(validator: BaseValidator<I>, constraints?: readonly IConstraint<T>[]);
+ lengthLessThan<N extends number>(length: N): ArrayValidator<ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, N>]>>>;
+ lengthLessThanOrEqual<N extends number>(length: N): ArrayValidator<ExpandSmallerTuples<[...Tuple<I, N>]>>;
+ lengthGreaterThan<N extends number>(length: N): ArrayValidator<[...Tuple<I, N>, I, ...T]>;
+ lengthGreaterThanOrEqual<N extends number>(length: N): ArrayValidator<[...Tuple<I, N>, ...T]>;
+ lengthEqual<N extends number>(length: N): ArrayValidator<[...Tuple<I, N>]>;
+ lengthNotEqual(length: number): ArrayValidator<[...T]>;
+ lengthRange<S extends number, E extends number>(start: S, endBefore: E): ArrayValidator<Exclude<ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, E>]>>, ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, S>]>>>>;
+ lengthRangeInclusive<S extends number, E extends number>(startAt: S, endAt: E): ArrayValidator<Exclude<ExpandSmallerTuples<[...Tuple<I, E>]>, ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, S>]>>>>;
+ lengthRangeExclusive<S extends number, E extends number>(startAfter: S, endBefore: E): ArrayValidator<Exclude<ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, E>]>>, ExpandSmallerTuples<[...Tuple<T, S>]>>>;
+ get unique(): this;
+ protected clone(): this;
+ protected handle(values: unknown): Result<T, ValidationError | CombinedPropertyError>;
+}
+
+declare abstract class BaseValidator<T> {
+ description?: string;
+ protected parent?: object;
+ protected constraints: readonly IConstraint<T>[];
+ protected isValidationEnabled: boolean | (() => boolean) | null;
+ constructor(constraints?: readonly IConstraint<T>[]);
+ setParent(parent: object): this;
+ get optional(): UnionValidator<T | undefined>;
+ get nullable(): UnionValidator<T | null>;
+ get nullish(): UnionValidator<T | null | undefined>;
+ get array(): ArrayValidator<T[]>;
+ get set(): SetValidator<T>;
+ or<O>(...predicates: readonly BaseValidator<O>[]): UnionValidator<T | O>;
+ transform(cb: (value: T) => T): this;
+ transform<O>(cb: (value: T) => O): BaseValidator<O>;
+ reshape(cb: (input: T) => Result<T>): this;
+ reshape<R extends Result<unknown>, O = InferResultType<R>>(cb: (input: T) => R): BaseValidator<O>;
+ default(value: Exclude<T, undefined> | (() => Exclude<T, undefined>)): DefaultValidator<Exclude<T, undefined>>;
+ when<Key extends WhenKey, This extends BaseValidator<any> = this>(key: Key, options: WhenOptions<This, Key>): this;
+ describe(description: string): this;
+ run(value: unknown): Result<T, BaseError>;
+ parse<R extends T = T>(value: unknown): R;
+ is<R extends T = T>(value: unknown): value is R;
+ /**
+ * Sets if the validator should also run constraints or just do basic checks.
+ * @param isValidationEnabled Whether this validator should be enabled or disabled. You can pass boolean or a function returning boolean which will be called just before parsing.
+ * Set to `null` to go off of the global configuration.
+ */
+ setValidationEnabled(isValidationEnabled: boolean | (() => boolean) | null): this;
+ getValidationEnabled(): boolean | null;
+ protected get shouldRunConstraints(): boolean;
+ protected clone(): this;
+ protected abstract handle(value: unknown): Result<T, ValidatorError>;
+ protected addConstraint(constraint: IConstraint<T>): this;
+}
+type ValidatorError = ValidationError | CombinedError | CombinedPropertyError | UnknownEnumValueError;
+
+type Constructor<T> = (new (...args: readonly any[]) => T) | (abstract new (...args: readonly any[]) => T);
+type Type<V> = V extends BaseValidator<infer T> ? T : never;
+/**
+ * @deprecated Use `object` instead.
+ */
+type NonNullObject = {} & object;
+/**
+ * @deprecated This type is no longer used and will be removed in the next major version.
+ */
+type PickDefined<T> = {
+ [K in keyof T as undefined extends T[K] ? never : K]: T[K];
+};
+/**
+ * @deprecated This type is no longer used and will be removed in the next major version.
+ */
+type PickUndefinedMakeOptional<T> = {
+ [K in keyof T as undefined extends T[K] ? K : never]+?: Exclude<T[K], undefined>;
+};
+type FilterDefinedKeys<TObj extends object> = Exclude<{
+ [TKey in keyof TObj]: undefined extends TObj[TKey] ? never : TKey;
+}[keyof TObj], undefined>;
+type UndefinedToOptional<T extends object> = Pick<T, FilterDefinedKeys<T>> & {
+ [k in keyof Omit<T, FilterDefinedKeys<T>>]?: Exclude<T[k], undefined>;
+};
+type MappedObjectValidator<T> = {
+ [key in keyof T]: BaseValidator<T[key]>;
+};
+/**
+ * An alias of {@link ObjectValidator} with a name more common among object validation libraries.
+ * This is the type of a schema after using `s.object({ ... })`
+ * @example
+ * ```typescript
+ * import { s, SchemaOf } from '@sapphire/shapeshift';
+ *
+ * interface IIngredient {
+ * ingredientId: string | undefined;
+ * name: string | undefined;
+ * }
+ *
+ * interface IInstruction {
+ * instructionId: string | undefined;
+ * message: string | undefined;
+ * }
+ *
+ * interface IRecipe {
+ * recipeId: string | undefined;
+ * title: string;
+ * description: string;
+ * instructions: IInstruction[];
+ * ingredients: IIngredient[];
+ * }
+ *
+ * type InstructionSchemaType = SchemaOf<IInstruction>;
+ * // Expected Type: ObjectValidator<IInstruction>
+ *
+ * type IngredientSchemaType = SchemaOf<IIngredient>;
+ * // Expected Type: ObjectValidator<IIngredient>
+ *
+ * type RecipeSchemaType = SchemaOf<IRecipe>;
+ * // Expected Type: ObjectValidator<IRecipe>
+ *
+ * const instructionSchema: InstructionSchemaType = s.object({
+ * instructionId: s.string.optional,
+ * message: s.string
+ * });
+ *
+ * const ingredientSchema: IngredientSchemaType = s.object({
+ * ingredientId: s.string.optional,
+ * name: s.string
+ * });
+ *
+ * const recipeSchema: RecipeSchemaType = s.object({
+ * recipeId: s.string.optional,
+ * title: s.string,
+ * description: s.string,
+ * instructions: s.array(instructionSchema),
+ * ingredients: s.array(ingredientSchema)
+ * });
+ * ```
+ */
+type SchemaOf<T extends object> = ObjectValidator<T>;
+/**
+ * Infers the type of a schema object given `typeof schema`.
+ * The schema has to extend {@link ObjectValidator}.
+ * @example
+ * ```typescript
+ * import { InferType, s } from '@sapphire/shapeshift';
+ *
+ * const schema = s.object({
+ * foo: s.string,
+ * bar: s.number,
+ * baz: s.boolean,
+ * qux: s.bigint,
+ * quux: s.date
+ * });
+ *
+ * type Inferredtype = InferType<typeof schema>;
+ * // Expected type:
+ * // type Inferredtype = {
+ * // foo: string;
+ * // bar: number;
+ * // baz: boolean;
+ * // qux: bigint;
+ * // quux: Date;
+ * // };
+ * ```
+ */
+type InferType<T extends ObjectValidator<any>> = T extends ObjectValidator<any, infer U> ? U : never;
+type InferResultType<T extends Result<any>> = T extends Result<infer U> ? U : never;
+type UnwrapTuple<T extends [...any[]]> = T extends [infer Head, ...infer Tail] ? [Unwrap<Head>, ...UnwrapTuple<Tail>] : [];
+type Unwrap<T> = T extends BaseValidator<infer V> ? V : never;
+type UnshiftTuple<T extends [...any[]]> = T extends [T[0], ...infer Tail] ? Tail : never;
+type ExpandSmallerTuples<T extends [...any[]]> = T extends [T[0], ...infer Tail] ? T | ExpandSmallerTuples<Tail> : [];
+type Shift<A extends Array<any>> = ((...args: A) => void) extends (...args: [A[0], ...infer R]) => void ? R : never;
+type GrowExpRev<A extends Array<any>, N extends number, P extends Array<Array<any>>> = A['length'] extends N ? A : GrowExpRev<[...A, ...P[0]][N] extends undefined ? [...A, ...P[0]] : A, N, Shift<P>>;
+type GrowExp<A extends Array<any>, N extends number, P extends Array<Array<any>>> = [...A, ...A][N] extends undefined ? GrowExp<[...A, ...A], N, [A, ...P]> : GrowExpRev<A, N, P>;
+type Tuple<T, N extends number> = N extends number ? number extends N ? Array<T> : N extends 0 ? [] : N extends 1 ? [T] : GrowExp<[T], N, [[]]> : never;
+
+declare class LazyValidator<T extends BaseValidator<unknown>, R = Unwrap<T>> extends BaseValidator<R> {
+ private readonly validator;
+ constructor(validator: (value: unknown) => T, constraints?: readonly IConstraint<R>[]);
+ protected clone(): this;
+ protected handle(values: unknown): Result<R, ValidatorError>;
+}
+
+declare class Shapes {
+ get string(): StringValidator<string>;
+ get number(): NumberValidator<number>;
+ get bigint(): BigIntValidator<bigint>;
+ get boolean(): BooleanValidator<boolean>;
+ get date(): DateValidator;
+ object<T extends object>(shape: MappedObjectValidator<T>): ObjectValidator<T, UndefinedToOptional<T>>;
+ get undefined(): BaseValidator<undefined>;
+ get null(): BaseValidator<null>;
+ get nullish(): NullishValidator;
+ get any(): PassthroughValidator<any>;
+ get unknown(): PassthroughValidator<unknown>;
+ get never(): NeverValidator;
+ enum<T>(...values: readonly T[]): UnionValidator<T>;
+ nativeEnum<T extends NativeEnumLike>(enumShape: T): NativeEnumValidator<T>;
+ literal<T>(value: T): BaseValidator<T>;
+ instance<T>(expected: Constructor<T>): InstanceValidator<T>;
+ union<T extends [...BaseValidator<any>[]]>(...validators: [...T]): UnionValidator<Unwrap<T[number]>>;
+ array<T>(validator: BaseValidator<T[][number]>): ArrayValidator<T[], T[][number]>;
+ array<T extends unknown[]>(validator: BaseValidator<T[number]>): ArrayValidator<T, T[number]>;
+ typedArray<T extends TypedArray>(type?: TypedArrayName): TypedArrayValidator<T>;
+ get int8Array(): TypedArrayValidator<Int8Array>;
+ get uint8Array(): TypedArrayValidator<Uint8Array>;
+ get uint8ClampedArray(): TypedArrayValidator<Uint8ClampedArray>;
+ get int16Array(): TypedArrayValidator<Int16Array>;
+ get uint16Array(): TypedArrayValidator<Uint16Array>;
+ get int32Array(): TypedArrayValidator<Int32Array>;
+ get uint32Array(): TypedArrayValidator<Uint32Array>;
+ get float32Array(): TypedArrayValidator<Float32Array>;
+ get float64Array(): TypedArrayValidator<Float64Array>;
+ get bigInt64Array(): TypedArrayValidator<BigInt64Array>;
+ get bigUint64Array(): TypedArrayValidator<BigUint64Array>;
+ tuple<T extends [...BaseValidator<any>[]]>(validators: [...T]): TupleValidator<UnwrapTuple<T>>;
+ set<T>(validator: BaseValidator<T>): SetValidator<T>;
+ record<T>(validator: BaseValidator<T>): RecordValidator<T>;
+ map<T, U>(keyValidator: BaseValidator<T>, valueValidator: BaseValidator<U>): MapValidator<T, U>;
+ lazy<T extends BaseValidator<unknown>>(validator: (value: unknown) => T): LazyValidator<T, Unwrap<T>>;
+}
+
+/**
+ * Sets whether validators should run on the input, or if the input should be passed through.
+ * @param enabled Whether validation should be done on inputs
+ */
+declare function setGlobalValidationEnabled(enabled: boolean): void;
+/**
+ * @returns Whether validation is enabled
+ */
+declare function getGlobalValidationEnabled(): boolean;
+
+declare const s: Shapes;
+
+export { ArrayConstraintName, ArrayValidator, BaseConstraintError, BaseError, BaseValidator, BigIntConstraintName, BigIntValidator, BooleanConstraintName, BooleanValidator, CombinedError, CombinedPropertyError, ConstraintErrorNames, Constructor, DateConstraintName, DateValidator, DefaultValidator, ExpandSmallerTuples, ExpectedConstraintError, ExpectedValidationError, GrowExp, GrowExpRev, IConstraint, InferResultType, InferType, InstanceValidator, LiteralValidator, MapValidator, MappedObjectValidator, MissingPropertyError, MultiplePossibilitiesConstraintError, NativeEnumLike, NativeEnumValidator, NeverValidator, NonNullObject, NullishValidator, NumberConstraintName, NumberValidator, ObjectValidator, ObjectValidatorStrategy, PassthroughValidator, PickDefined, PickUndefinedMakeOptional, RecordValidator, Result, SchemaOf, SetValidator, Shapes, Shift, StringConstraintName, StringDomain, StringProtocol, StringUuidOptions, StringValidator, Tuple, TupleValidator, Type, TypedArrayConstraintName, TypedArrayValidator, UUIDVersion, UndefinedToOptional, UnionValidator, UnknownEnumValueError, UnknownPropertyError, UnshiftTuple, Unwrap, UnwrapTuple, UrlOptions, ValidationError, ValidatorError, arrayLengthEqual, arrayLengthGreaterThan, arrayLengthGreaterThanOrEqual, arrayLengthLessThan, arrayLengthLessThanOrEqual, arrayLengthNotEqual, arrayLengthRange, arrayLengthRangeExclusive, arrayLengthRangeInclusive, bigintDivisibleBy, bigintEqual, bigintGreaterThan, bigintGreaterThanOrEqual, bigintLessThan, bigintLessThanOrEqual, bigintNotEqual, booleanFalse, booleanTrue, customInspectSymbol, customInspectSymbolStackLess, dateEqual, dateGreaterThan, dateGreaterThanOrEqual, dateInvalid, dateLessThan, dateLessThanOrEqual, dateNotEqual, dateValid, getGlobalValidationEnabled, numberDivisibleBy, numberEqual, numberFinite, numberGreaterThan, numberGreaterThanOrEqual, numberInt, numberLessThan, numberLessThanOrEqual, numberNaN, numberNotEqual, numberNotNaN, numberSafeInt, s, setGlobalValidationEnabled, stringEmail, stringIp, stringLengthEqual, stringLengthGreaterThan, stringLengthGreaterThanOrEqual, stringLengthLessThan, stringLengthLessThanOrEqual, stringLengthNotEqual, stringRegex, stringUrl, stringUuid, typedArrayByteLengthEqual, typedArrayByteLengthGreaterThan, typedArrayByteLengthGreaterThanOrEqual, typedArrayByteLengthLessThan, typedArrayByteLengthLessThanOrEqual, typedArrayByteLengthNotEqual, typedArrayByteLengthRange, typedArrayByteLengthRangeExclusive, typedArrayByteLengthRangeInclusive, typedArrayLengthEqual, typedArrayLengthGreaterThan, typedArrayLengthGreaterThanOrEqual, typedArrayLengthLessThan, typedArrayLengthLessThanOrEqual, typedArrayLengthNotEqual, typedArrayLengthRange, typedArrayLengthRangeExclusive, typedArrayLengthRangeInclusive };
diff --git a/node_modules/@sapphire/shapeshift/dist/index.global.js b/node_modules/@sapphire/shapeshift/dist/index.global.js
new file mode 100644
index 0000000..0f48b8a
--- /dev/null
+++ b/node_modules/@sapphire/shapeshift/dist/index.global.js
@@ -0,0 +1,4174 @@
+var SapphireShapeshift = (function (exports) {
+ 'use strict';
+
+ var __create = Object.create;
+ var __defProp = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames = Object.getOwnPropertyNames;
+ var __getProtoOf = Object.getPrototypeOf;
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+ var __commonJS = (cb, mod) => function __require() {
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
+ };
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ // If the importer is in node compatibility mode or this is not an ESM
+ // file that has been converted to a CommonJS file using a Babel-
+ // compatible transform (i.e. "__esModule" has not been set), then set
+ // "default" to the CommonJS "module.exports" for node compatibility.
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+ mod
+ ));
+
+ // node_modules/lodash/isArray.js
+ var require_isArray = __commonJS({
+ "node_modules/lodash/isArray.js"(exports, module) {
+ var isArray3 = Array.isArray;
+ module.exports = isArray3;
+ }
+ });
+
+ // node_modules/lodash/_freeGlobal.js
+ var require_freeGlobal = __commonJS({
+ "node_modules/lodash/_freeGlobal.js"(exports, module) {
+ var freeGlobal = typeof globalThis == "object" && globalThis && globalThis.Object === Object && globalThis;
+ module.exports = freeGlobal;
+ }
+ });
+
+ // node_modules/lodash/_root.js
+ var require_root = __commonJS({
+ "node_modules/lodash/_root.js"(exports, module) {
+ var freeGlobal = require_freeGlobal();
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
+ var root = freeGlobal || freeSelf || Function("return this")();
+ module.exports = root;
+ }
+ });
+
+ // node_modules/lodash/_Symbol.js
+ var require_Symbol = __commonJS({
+ "node_modules/lodash/_Symbol.js"(exports, module) {
+ var root = require_root();
+ var Symbol2 = root.Symbol;
+ module.exports = Symbol2;
+ }
+ });
+
+ // node_modules/lodash/_getRawTag.js
+ var require_getRawTag = __commonJS({
+ "node_modules/lodash/_getRawTag.js"(exports, module) {
+ var Symbol2 = require_Symbol();
+ var objectProto = Object.prototype;
+ var hasOwnProperty = objectProto.hasOwnProperty;
+ var nativeObjectToString = objectProto.toString;
+ var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
+ function getRawTag(value) {
+ var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
+ try {
+ value[symToStringTag] = void 0;
+ var unmasked = true;
+ } catch (e3) {
+ }
+ var result = nativeObjectToString.call(value);
+ if (unmasked) {
+ if (isOwn) {
+ value[symToStringTag] = tag;
+ } else {
+ delete value[symToStringTag];
+ }
+ }
+ return result;
+ }
+ __name(getRawTag, "getRawTag");
+ module.exports = getRawTag;
+ }
+ });
+
+ // node_modules/lodash/_objectToString.js
+ var require_objectToString = __commonJS({
+ "node_modules/lodash/_objectToString.js"(exports, module) {
+ var objectProto = Object.prototype;
+ var nativeObjectToString = objectProto.toString;
+ function objectToString(value) {
+ return nativeObjectToString.call(value);
+ }
+ __name(objectToString, "objectToString");
+ module.exports = objectToString;
+ }
+ });
+
+ // node_modules/lodash/_baseGetTag.js
+ var require_baseGetTag = __commonJS({
+ "node_modules/lodash/_baseGetTag.js"(exports, module) {
+ var Symbol2 = require_Symbol();
+ var getRawTag = require_getRawTag();
+ var objectToString = require_objectToString();
+ var nullTag = "[object Null]";
+ var undefinedTag = "[object Undefined]";
+ var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
+ function baseGetTag(value) {
+ if (value == null) {
+ return value === void 0 ? undefinedTag : nullTag;
+ }
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
+ }
+ __name(baseGetTag, "baseGetTag");
+ module.exports = baseGetTag;
+ }
+ });
+
+ // node_modules/lodash/isObjectLike.js
+ var require_isObjectLike = __commonJS({
+ "node_modules/lodash/isObjectLike.js"(exports, module) {
+ function isObjectLike(value) {
+ return value != null && typeof value == "object";
+ }
+ __name(isObjectLike, "isObjectLike");
+ module.exports = isObjectLike;
+ }
+ });
+
+ // node_modules/lodash/isSymbol.js
+ var require_isSymbol = __commonJS({
+ "node_modules/lodash/isSymbol.js"(exports, module) {
+ var baseGetTag = require_baseGetTag();
+ var isObjectLike = require_isObjectLike();
+ var symbolTag = "[object Symbol]";
+ function isSymbol3(value) {
+ return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
+ }
+ __name(isSymbol3, "isSymbol");
+ module.exports = isSymbol3;
+ }
+ });
+
+ // node_modules/lodash/_isKey.js
+ var require_isKey = __commonJS({
+ "node_modules/lodash/_isKey.js"(exports, module) {
+ var isArray3 = require_isArray();
+ var isSymbol3 = require_isSymbol();
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
+ var reIsPlainProp = /^\w*$/;
+ function isKey(value, object) {
+ if (isArray3(value)) {
+ return false;
+ }
+ var type = typeof value;
+ if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol3(value)) {
+ return true;
+ }
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
+ }
+ __name(isKey, "isKey");
+ module.exports = isKey;
+ }
+ });
+
+ // node_modules/lodash/isObject.js
+ var require_isObject = __commonJS({
+ "node_modules/lodash/isObject.js"(exports, module) {
+ function isObject3(value) {
+ var type = typeof value;
+ return value != null && (type == "object" || type == "function");
+ }
+ __name(isObject3, "isObject");
+ module.exports = isObject3;
+ }
+ });
+
+ // node_modules/lodash/isFunction.js
+ var require_isFunction = __commonJS({
+ "node_modules/lodash/isFunction.js"(exports, module) {
+ var baseGetTag = require_baseGetTag();
+ var isObject3 = require_isObject();
+ var asyncTag = "[object AsyncFunction]";
+ var funcTag = "[object Function]";
+ var genTag = "[object GeneratorFunction]";
+ var proxyTag = "[object Proxy]";
+ function isFunction3(value) {
+ if (!isObject3(value)) {
+ return false;
+ }
+ var tag = baseGetTag(value);
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
+ }
+ __name(isFunction3, "isFunction");
+ module.exports = isFunction3;
+ }
+ });
+
+ // node_modules/lodash/_coreJsData.js
+ var require_coreJsData = __commonJS({
+ "node_modules/lodash/_coreJsData.js"(exports, module) {
+ var root = require_root();
+ var coreJsData = root["__core-js_shared__"];
+ module.exports = coreJsData;
+ }
+ });
+
+ // node_modules/lodash/_isMasked.js
+ var require_isMasked = __commonJS({
+ "node_modules/lodash/_isMasked.js"(exports, module) {
+ var coreJsData = require_coreJsData();
+ var maskSrcKey = function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
+ return uid ? "Symbol(src)_1." + uid : "";
+ }();
+ function isMasked(func) {
+ return !!maskSrcKey && maskSrcKey in func;
+ }
+ __name(isMasked, "isMasked");
+ module.exports = isMasked;
+ }
+ });
+
+ // node_modules/lodash/_toSource.js
+ var require_toSource = __commonJS({
+ "node_modules/lodash/_toSource.js"(exports, module) {
+ var funcProto = Function.prototype;
+ var funcToString = funcProto.toString;
+ function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e3) {
+ }
+ try {
+ return func + "";
+ } catch (e3) {
+ }
+ }
+ return "";
+ }
+ __name(toSource, "toSource");
+ module.exports = toSource;
+ }
+ });
+
+ // node_modules/lodash/_baseIsNative.js
+ var require_baseIsNative = __commonJS({
+ "node_modules/lodash/_baseIsNative.js"(exports, module) {
+ var isFunction3 = require_isFunction();
+ var isMasked = require_isMasked();
+ var isObject3 = require_isObject();
+ var toSource = require_toSource();
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+ var funcProto = Function.prototype;
+ var objectProto = Object.prototype;
+ var funcToString = funcProto.toString;
+ var hasOwnProperty = objectProto.hasOwnProperty;
+ var reIsNative = RegExp(
+ "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
+ );
+ function baseIsNative(value) {
+ if (!isObject3(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = isFunction3(value) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+ }
+ __name(baseIsNative, "baseIsNative");
+ module.exports = baseIsNative;
+ }
+ });
+
+ // node_modules/lodash/_getValue.js
+ var require_getValue = __commonJS({
+ "node_modules/lodash/_getValue.js"(exports, module) {
+ function getValue2(object, key) {
+ return object == null ? void 0 : object[key];
+ }
+ __name(getValue2, "getValue");
+ module.exports = getValue2;
+ }
+ });
+
+ // node_modules/lodash/_getNative.js
+ var require_getNative = __commonJS({
+ "node_modules/lodash/_getNative.js"(exports, module) {
+ var baseIsNative = require_baseIsNative();
+ var getValue2 = require_getValue();
+ function getNative(object, key) {
+ var value = getValue2(object, key);
+ return baseIsNative(value) ? value : void 0;
+ }
+ __name(getNative, "getNative");
+ module.exports = getNative;
+ }
+ });
+
+ // node_modules/lodash/_nativeCreate.js
+ var require_nativeCreate = __commonJS({
+ "node_modules/lodash/_nativeCreate.js"(exports, module) {
+ var getNative = require_getNative();
+ var nativeCreate = getNative(Object, "create");
+ module.exports = nativeCreate;
+ }
+ });
+
+ // node_modules/lodash/_hashClear.js
+ var require_hashClear = __commonJS({
+ "node_modules/lodash/_hashClear.js"(exports, module) {
+ var nativeCreate = require_nativeCreate();
+ function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ this.size = 0;
+ }
+ __name(hashClear, "hashClear");
+ module.exports = hashClear;
+ }
+ });
+
+ // node_modules/lodash/_hashDelete.js
+ var require_hashDelete = __commonJS({
+ "node_modules/lodash/_hashDelete.js"(exports, module) {
+ function hashDelete(key) {
+ var result = this.has(key) && delete this.__data__[key];
+ this.size -= result ? 1 : 0;
+ return result;
+ }
+ __name(hashDelete, "hashDelete");
+ module.exports = hashDelete;
+ }
+ });
+
+ // node_modules/lodash/_hashGet.js
+ var require_hashGet = __commonJS({
+ "node_modules/lodash/_hashGet.js"(exports, module) {
+ var nativeCreate = require_nativeCreate();
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
+ var objectProto = Object.prototype;
+ var hasOwnProperty = objectProto.hasOwnProperty;
+ function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? void 0 : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : void 0;
+ }
+ __name(hashGet, "hashGet");
+ module.exports = hashGet;
+ }
+ });
+
+ // node_modules/lodash/_hashHas.js
+ var require_hashHas = __commonJS({
+ "node_modules/lodash/_hashHas.js"(exports, module) {
+ var nativeCreate = require_nativeCreate();
+ var objectProto = Object.prototype;
+ var hasOwnProperty = objectProto.hasOwnProperty;
+ function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
+ }
+ __name(hashHas, "hashHas");
+ module.exports = hashHas;
+ }
+ });
+
+ // node_modules/lodash/_hashSet.js
+ var require_hashSet = __commonJS({
+ "node_modules/lodash/_hashSet.js"(exports, module) {
+ var nativeCreate = require_nativeCreate();
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
+ function hashSet(key, value) {
+ var data = this.__data__;
+ this.size += this.has(key) ? 0 : 1;
+ data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
+ return this;
+ }
+ __name(hashSet, "hashSet");
+ module.exports = hashSet;
+ }
+ });
+
+ // node_modules/lodash/_Hash.js
+ var require_Hash = __commonJS({
+ "node_modules/lodash/_Hash.js"(exports, module) {
+ var hashClear = require_hashClear();
+ var hashDelete = require_hashDelete();
+ var hashGet = require_hashGet();
+ var hashHas = require_hashHas();
+ var hashSet = require_hashSet();
+ function Hash(entries) {
+ var index = -1, length = entries == null ? 0 : entries.length;
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+ __name(Hash, "Hash");
+ Hash.prototype.clear = hashClear;
+ Hash.prototype["delete"] = hashDelete;
+ Hash.prototype.get = hashGet;
+ Hash.prototype.has = hashHas;
+ Hash.prototype.set = hashSet;
+ module.exports = Hash;
+ }
+ });
+
+ // node_modules/lodash/_listCacheClear.js
+ var require_listCacheClear = __commonJS({
+ "node_modules/lodash/_listCacheClear.js"(exports, module) {
+ function listCacheClear() {
+ this.__data__ = [];
+ this.size = 0;
+ }
+ __name(listCacheClear, "listCacheClear");
+ module.exports = listCacheClear;
+ }
+ });
+
+ // node_modules/lodash/eq.js
+ var require_eq = __commonJS({
+ "node_modules/lodash/eq.js"(exports, module) {
+ function eq(value, other) {
+ return value === other || value !== value && other !== other;
+ }
+ __name(eq, "eq");
+ module.exports = eq;
+ }
+ });
+
+ // node_modules/lodash/_assocIndexOf.js
+ var require_assocIndexOf = __commonJS({
+ "node_modules/lodash/_assocIndexOf.js"(exports, module) {
+ var eq = require_eq();
+ function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+ }
+ __name(assocIndexOf, "assocIndexOf");
+ module.exports = assocIndexOf;
+ }
+ });
+
+ // node_modules/lodash/_listCacheDelete.js
+ var require_listCacheDelete = __commonJS({
+ "node_modules/lodash/_listCacheDelete.js"(exports, module) {
+ var assocIndexOf = require_assocIndexOf();
+ var arrayProto = Array.prototype;
+ var splice = arrayProto.splice;
+ function listCacheDelete(key) {
+ var data = this.__data__, index = assocIndexOf(data, key);
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ --this.size;
+ return true;
+ }
+ __name(listCacheDelete, "listCacheDelete");
+ module.exports = listCacheDelete;
+ }
+ });
+
+ // node_modules/lodash/_listCacheGet.js
+ var require_listCacheGet = __commonJS({
+ "node_modules/lodash/_listCacheGet.js"(exports, module) {
+ var assocIndexOf = require_assocIndexOf();
+ function listCacheGet(key) {
+ var data = this.__data__, index = assocIndexOf(data, key);
+ return index < 0 ? void 0 : data[index][1];
+ }
+ __name(listCacheGet, "listCacheGet");
+ module.exports = listCacheGet;
+ }
+ });
+
+ // node_modules/lodash/_listCacheHas.js
+ var require_listCacheHas = __commonJS({
+ "node_modules/lodash/_listCacheHas.js"(exports, module) {
+ var assocIndexOf = require_assocIndexOf();
+ function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+ }
+ __name(listCacheHas, "listCacheHas");
+ module.exports = listCacheHas;
+ }
+ });
+
+ // node_modules/lodash/_listCacheSet.js
+ var require_listCacheSet = __commonJS({
+ "node_modules/lodash/_listCacheSet.js"(exports, module) {
+ var assocIndexOf = require_assocIndexOf();
+ function listCacheSet(key, value) {
+ var data = this.__data__, index = assocIndexOf(data, key);
+ if (index < 0) {
+ ++this.size;
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+ }
+ __name(listCacheSet, "listCacheSet");
+ module.exports = listCacheSet;
+ }
+ });
+
+ // node_modules/lodash/_ListCache.js
+ var require_ListCache = __commonJS({
+ "node_modules/lodash/_ListCache.js"(exports, module) {
+ var listCacheClear = require_listCacheClear();
+ var listCacheDelete = require_listCacheDelete();
+ var listCacheGet = require_listCacheGet();
+ var listCacheHas = require_listCacheHas();
+ var listCacheSet = require_listCacheSet();
+ function ListCache(entries) {
+ var index = -1, length = entries == null ? 0 : entries.length;
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+ __name(ListCache, "ListCache");
+ ListCache.prototype.clear = listCacheClear;
+ ListCache.prototype["delete"] = listCacheDelete;
+ ListCache.prototype.get = listCacheGet;
+ ListCache.prototype.has = listCacheHas;
+ ListCache.prototype.set = listCacheSet;
+ module.exports = ListCache;
+ }
+ });
+
+ // node_modules/lodash/_Map.js
+ var require_Map = __commonJS({
+ "node_modules/lodash/_Map.js"(exports, module) {
+ var getNative = require_getNative();
+ var root = require_root();
+ var Map2 = getNative(root, "Map");
+ module.exports = Map2;
+ }
+ });
+
+ // node_modules/lodash/_mapCacheClear.js
+ var require_mapCacheClear = __commonJS({
+ "node_modules/lodash/_mapCacheClear.js"(exports, module) {
+ var Hash = require_Hash();
+ var ListCache = require_ListCache();
+ var Map2 = require_Map();
+ function mapCacheClear() {
+ this.size = 0;
+ this.__data__ = {
+ "hash": new Hash(),
+ "map": new (Map2 || ListCache)(),
+ "string": new Hash()
+ };
+ }
+ __name(mapCacheClear, "mapCacheClear");
+ module.exports = mapCacheClear;
+ }
+ });
+
+ // node_modules/lodash/_isKeyable.js
+ var require_isKeyable = __commonJS({
+ "node_modules/lodash/_isKeyable.js"(exports, module) {
+ function isKeyable(value) {
+ var type = typeof value;
+ return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
+ }
+ __name(isKeyable, "isKeyable");
+ module.exports = isKeyable;
+ }
+ });
+
+ // node_modules/lodash/_getMapData.js
+ var require_getMapData = __commonJS({
+ "node_modules/lodash/_getMapData.js"(exports, module) {
+ var isKeyable = require_isKeyable();
+ function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
+ }
+ __name(getMapData, "getMapData");
+ module.exports = getMapData;
+ }
+ });
+
+ // node_modules/lodash/_mapCacheDelete.js
+ var require_mapCacheDelete = __commonJS({
+ "node_modules/lodash/_mapCacheDelete.js"(exports, module) {
+ var getMapData = require_getMapData();
+ function mapCacheDelete(key) {
+ var result = getMapData(this, key)["delete"](key);
+ this.size -= result ? 1 : 0;
+ return result;
+ }
+ __name(mapCacheDelete, "mapCacheDelete");
+ module.exports = mapCacheDelete;
+ }
+ });
+
+ // node_modules/lodash/_mapCacheGet.js
+ var require_mapCacheGet = __commonJS({
+ "node_modules/lodash/_mapCacheGet.js"(exports, module) {
+ var getMapData = require_getMapData();
+ function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+ }
+ __name(mapCacheGet, "mapCacheGet");
+ module.exports = mapCacheGet;
+ }
+ });
+
+ // node_modules/lodash/_mapCacheHas.js
+ var require_mapCacheHas = __commonJS({
+ "node_modules/lodash/_mapCacheHas.js"(exports, module) {
+ var getMapData = require_getMapData();
+ function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+ }
+ __name(mapCacheHas, "mapCacheHas");
+ module.exports = mapCacheHas;
+ }
+ });
+
+ // node_modules/lodash/_mapCacheSet.js
+ var require_mapCacheSet = __commonJS({
+ "node_modules/lodash/_mapCacheSet.js"(exports, module) {
+ var getMapData = require_getMapData();
+ function mapCacheSet(key, value) {
+ var data = getMapData(this, key), size = data.size;
+ data.set(key, value);
+ this.size += data.size == size ? 0 : 1;
+ return this;
+ }
+ __name(mapCacheSet, "mapCacheSet");
+ module.exports = mapCacheSet;
+ }
+ });
+
+ // node_modules/lodash/_MapCache.js
+ var require_MapCache = __commonJS({
+ "node_modules/lodash/_MapCache.js"(exports, module) {
+ var mapCacheClear = require_mapCacheClear();
+ var mapCacheDelete = require_mapCacheDelete();
+ var mapCacheGet = require_mapCacheGet();
+ var mapCacheHas = require_mapCacheHas();
+ var mapCacheSet = require_mapCacheSet();
+ function MapCache(entries) {
+ var index = -1, length = entries == null ? 0 : entries.length;
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+ __name(MapCache, "MapCache");
+ MapCache.prototype.clear = mapCacheClear;
+ MapCache.prototype["delete"] = mapCacheDelete;
+ MapCache.prototype.get = mapCacheGet;
+ MapCache.prototype.has = mapCacheHas;
+ MapCache.prototype.set = mapCacheSet;
+ module.exports = MapCache;
+ }
+ });
+
+ // node_modules/lodash/memoize.js
+ var require_memoize = __commonJS({
+ "node_modules/lodash/memoize.js"(exports, module) {
+ var MapCache = require_MapCache();
+ var FUNC_ERROR_TEXT = "Expected a function";
+ function memoize(func, resolver) {
+ if (typeof func != "function" || resolver != null && typeof resolver != "function") {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = /* @__PURE__ */ __name(function() {
+ var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result) || cache;
+ return result;
+ }, "memoized");
+ memoized.cache = new (memoize.Cache || MapCache)();
+ return memoized;
+ }
+ __name(memoize, "memoize");
+ memoize.Cache = MapCache;
+ module.exports = memoize;
+ }
+ });
+
+ // node_modules/lodash/_memoizeCapped.js
+ var require_memoizeCapped = __commonJS({
+ "node_modules/lodash/_memoizeCapped.js"(exports, module) {
+ var memoize = require_memoize();
+ var MAX_MEMOIZE_SIZE = 500;
+ function memoizeCapped(func) {
+ var result = memoize(func, function(key) {
+ if (cache.size === MAX_MEMOIZE_SIZE) {
+ cache.clear();
+ }
+ return key;
+ });
+ var cache = result.cache;
+ return result;
+ }
+ __name(memoizeCapped, "memoizeCapped");
+ module.exports = memoizeCapped;
+ }
+ });
+
+ // node_modules/lodash/_stringToPath.js
+ var require_stringToPath = __commonJS({
+ "node_modules/lodash/_stringToPath.js"(exports, module) {
+ var memoizeCapped = require_memoizeCapped();
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+ var reEscapeChar = /\\(\\)?/g;
+ var stringToPath = memoizeCapped(function(string) {
+ var result = [];
+ if (string.charCodeAt(0) === 46) {
+ result.push("");
+ }
+ string.replace(rePropName, function(match, number, quote, subString) {
+ result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
+ });
+ return result;
+ });
+ module.exports = stringToPath;
+ }
+ });
+
+ // node_modules/lodash/_arrayMap.js
+ var require_arrayMap = __commonJS({
+ "node_modules/lodash/_arrayMap.js"(exports, module) {
+ function arrayMap(array, iteratee) {
+ var index = -1, length = array == null ? 0 : array.length, result = Array(length);
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+ }
+ __name(arrayMap, "arrayMap");
+ module.exports = arrayMap;
+ }
+ });
+
+ // node_modules/lodash/_baseToString.js
+ var require_baseToString = __commonJS({
+ "node_modules/lodash/_baseToString.js"(exports, module) {
+ var Symbol2 = require_Symbol();
+ var arrayMap = require_arrayMap();
+ var isArray3 = require_isArray();
+ var isSymbol3 = require_isSymbol();
+ var INFINITY = 1 / 0;
+ var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
+ var symbolToString = symbolProto ? symbolProto.toString : void 0;
+ function baseToString(value) {
+ if (typeof value == "string") {
+ return value;
+ }
+ if (isArray3(value)) {
+ return arrayMap(value, baseToString) + "";
+ }
+ if (isSymbol3(value)) {
+ return symbolToString ? symbolToString.call(value) : "";
+ }
+ var result = value + "";
+ return result == "0" && 1 / value == -INFINITY ? "-0" : result;
+ }
+ __name(baseToString, "baseToString");
+ module.exports = baseToString;
+ }
+ });
+
+ // node_modules/lodash/toString.js
+ var require_toString = __commonJS({
+ "node_modules/lodash/toString.js"(exports, module) {
+ var baseToString = require_baseToString();
+ function toString(value) {
+ return value == null ? "" : baseToString(value);
+ }
+ __name(toString, "toString");
+ module.exports = toString;
+ }
+ });
+
+ // node_modules/lodash/_castPath.js
+ var require_castPath = __commonJS({
+ "node_modules/lodash/_castPath.js"(exports, module) {
+ var isArray3 = require_isArray();
+ var isKey = require_isKey();
+ var stringToPath = require_stringToPath();
+ var toString = require_toString();
+ function castPath(value, object) {
+ if (isArray3(value)) {
+ return value;
+ }
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
+ }
+ __name(castPath, "castPath");
+ module.exports = castPath;
+ }
+ });
+
+ // node_modules/lodash/_toKey.js
+ var require_toKey = __commonJS({
+ "node_modules/lodash/_toKey.js"(exports, module) {
+ var isSymbol3 = require_isSymbol();
+ var INFINITY = 1 / 0;
+ function toKey(value) {
+ if (typeof value == "string" || isSymbol3(value)) {
+ return value;
+ }
+ var result = value + "";
+ return result == "0" && 1 / value == -INFINITY ? "-0" : result;
+ }
+ __name(toKey, "toKey");
+ module.exports = toKey;
+ }
+ });
+
+ // node_modules/lodash/_baseGet.js
+ var require_baseGet = __commonJS({
+ "node_modules/lodash/_baseGet.js"(exports, module) {
+ var castPath = require_castPath();
+ var toKey = require_toKey();
+ function baseGet(object, path) {
+ path = castPath(path, object);
+ var index = 0, length = path.length;
+ while (object != null && index < length) {
+ object = object[toKey(path[index++])];
+ }
+ return index && index == length ? object : void 0;
+ }
+ __name(baseGet, "baseGet");
+ module.exports = baseGet;
+ }
+ });
+
+ // node_modules/lodash/get.js
+ var require_get = __commonJS({
+ "node_modules/lodash/get.js"(exports, module) {
+ var baseGet = require_baseGet();
+ function get2(object, path, defaultValue) {
+ var result = object == null ? void 0 : baseGet(object, path);
+ return result === void 0 ? defaultValue : result;
+ }
+ __name(get2, "get");
+ module.exports = get2;
+ }
+ });
+
+ // node_modules/fast-deep-equal/es6/index.js
+ var require_es6 = __commonJS({
+ "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
+ module.exports = /* @__PURE__ */ __name(function equal2(a3, b2) {
+ if (a3 === b2)
+ return true;
+ if (a3 && b2 && typeof a3 == "object" && typeof b2 == "object") {
+ if (a3.constructor !== b2.constructor)
+ return false;
+ var length, i3, keys;
+ if (Array.isArray(a3)) {
+ length = a3.length;
+ if (length != b2.length)
+ return false;
+ for (i3 = length; i3-- !== 0; )
+ if (!equal2(a3[i3], b2[i3]))
+ return false;
+ return true;
+ }
+ if (a3 instanceof Map && b2 instanceof Map) {
+ if (a3.size !== b2.size)
+ return false;
+ for (i3 of a3.entries())
+ if (!b2.has(i3[0]))
+ return false;
+ for (i3 of a3.entries())
+ if (!equal2(i3[1], b2.get(i3[0])))
+ return false;
+ return true;
+ }
+ if (a3 instanceof Set && b2 instanceof Set) {
+ if (a3.size !== b2.size)
+ return false;
+ for (i3 of a3.entries())
+ if (!b2.has(i3[0]))
+ return false;
+ return true;
+ }
+ if (ArrayBuffer.isView(a3) && ArrayBuffer.isView(b2)) {
+ length = a3.length;
+ if (length != b2.length)
+ return false;
+ for (i3 = length; i3-- !== 0; )
+ if (a3[i3] !== b2[i3])
+ return false;
+ return true;
+ }
+ if (a3.constructor === RegExp)
+ return a3.source === b2.source && a3.flags === b2.flags;
+ if (a3.valueOf !== Object.prototype.valueOf)
+ return a3.valueOf() === b2.valueOf();
+ if (a3.toString !== Object.prototype.toString)
+ return a3.toString() === b2.toString();
+ keys = Object.keys(a3);
+ length = keys.length;
+ if (length !== Object.keys(b2).length)
+ return false;
+ for (i3 = length; i3-- !== 0; )
+ if (!Object.prototype.hasOwnProperty.call(b2, keys[i3]))
+ return false;
+ for (i3 = length; i3-- !== 0; ) {
+ var key = keys[i3];
+ if (!equal2(a3[key], b2[key]))
+ return false;
+ }
+ return true;
+ }
+ return a3 !== a3 && b2 !== b2;
+ }, "equal");
+ }
+ });
+
+ // node_modules/lodash/_setCacheAdd.js
+ var require_setCacheAdd = __commonJS({
+ "node_modules/lodash/_setCacheAdd.js"(exports, module) {
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
+ function setCacheAdd(value) {
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
+ }
+ __name(setCacheAdd, "setCacheAdd");
+ module.exports = setCacheAdd;
+ }
+ });
+
+ // node_modules/lodash/_setCacheHas.js
+ var require_setCacheHas = __commonJS({
+ "node_modules/lodash/_setCacheHas.js"(exports, module) {
+ function setCacheHas(value) {
+ return this.__data__.has(value);
+ }
+ __name(setCacheHas, "setCacheHas");
+ module.exports = setCacheHas;
+ }
+ });
+
+ // node_modules/lodash/_SetCache.js
+ var require_SetCache = __commonJS({
+ "node_modules/lodash/_SetCache.js"(exports, module) {
+ var MapCache = require_MapCache();
+ var setCacheAdd = require_setCacheAdd();
+ var setCacheHas = require_setCacheHas();
+ function SetCache(values) {
+ var index = -1, length = values == null ? 0 : values.length;
+ this.__data__ = new MapCache();
+ while (++index < length) {
+ this.add(values[index]);
+ }
+ }
+ __name(SetCache, "SetCache");
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+ SetCache.prototype.has = setCacheHas;
+ module.exports = SetCache;
+ }
+ });
+
+ // node_modules/lodash/_baseFindIndex.js
+ var require_baseFindIndex = __commonJS({
+ "node_modules/lodash/_baseFindIndex.js"(exports, module) {
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
+ while (fromRight ? index-- : ++index < length) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+ __name(baseFindIndex, "baseFindIndex");
+ module.exports = baseFindIndex;
+ }
+ });
+
+ // node_modules/lodash/_baseIsNaN.js
+ var require_baseIsNaN = __commonJS({
+ "node_modules/lodash/_baseIsNaN.js"(exports, module) {
+ function baseIsNaN(value) {
+ return value !== value;
+ }
+ __name(baseIsNaN, "baseIsNaN");
+ module.exports = baseIsNaN;
+ }
+ });
+
+ // node_modules/lodash/_strictIndexOf.js
+ var require_strictIndexOf = __commonJS({
+ "node_modules/lodash/_strictIndexOf.js"(exports, module) {
+ function strictIndexOf(array, value, fromIndex) {
+ var index = fromIndex - 1, length = array.length;
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+ }
+ __name(strictIndexOf, "strictIndexOf");
+ module.exports = strictIndexOf;
+ }
+ });
+
+ // node_modules/lodash/_baseIndexOf.js
+ var require_baseIndexOf = __commonJS({
+ "node_modules/lodash/_baseIndexOf.js"(exports, module) {
+ var baseFindIndex = require_baseFindIndex();
+ var baseIsNaN = require_baseIsNaN();
+ var strictIndexOf = require_strictIndexOf();
+ function baseIndexOf(array, value, fromIndex) {
+ return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
+ }
+ __name(baseIndexOf, "baseIndexOf");
+ module.exports = baseIndexOf;
+ }
+ });
+
+ // node_modules/lodash/_arrayIncludes.js
+ var require_arrayIncludes = __commonJS({
+ "node_modules/lodash/_arrayIncludes.js"(exports, module) {
+ var baseIndexOf = require_baseIndexOf();
+ function arrayIncludes(array, value) {
+ var length = array == null ? 0 : array.length;
+ return !!length && baseIndexOf(array, value, 0) > -1;
+ }
+ __name(arrayIncludes, "arrayIncludes");
+ module.exports = arrayIncludes;
+ }
+ });
+
+ // node_modules/lodash/_arrayIncludesWith.js
+ var require_arrayIncludesWith = __commonJS({
+ "node_modules/lodash/_arrayIncludesWith.js"(exports, module) {
+ function arrayIncludesWith(array, value, comparator) {
+ var index = -1, length = array == null ? 0 : array.length;
+ while (++index < length) {
+ if (comparator(value, array[index])) {
+ return true;
+ }
+ }
+ return false;
+ }
+ __name(arrayIncludesWith, "arrayIncludesWith");
+ module.exports = arrayIncludesWith;
+ }
+ });
+
+ // node_modules/lodash/_cacheHas.js
+ var require_cacheHas = __commonJS({
+ "node_modules/lodash/_cacheHas.js"(exports, module) {
+ function cacheHas(cache, key) {
+ return cache.has(key);
+ }
+ __name(cacheHas, "cacheHas");
+ module.exports = cacheHas;
+ }
+ });
+
+ // node_modules/lodash/_Set.js
+ var require_Set = __commonJS({
+ "node_modules/lodash/_Set.js"(exports, module) {
+ var getNative = require_getNative();
+ var root = require_root();
+ var Set2 = getNative(root, "Set");
+ module.exports = Set2;
+ }
+ });
+
+ // node_modules/lodash/noop.js
+ var require_noop = __commonJS({
+ "node_modules/lodash/noop.js"(exports, module) {
+ function noop() {
+ }
+ __name(noop, "noop");
+ module.exports = noop;
+ }
+ });
+
+ // node_modules/lodash/_setToArray.js
+ var require_setToArray = __commonJS({
+ "node_modules/lodash/_setToArray.js"(exports, module) {
+ function setToArray(set) {
+ var index = -1, result = Array(set.size);
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+ }
+ __name(setToArray, "setToArray");
+ module.exports = setToArray;
+ }
+ });
+
+ // node_modules/lodash/_createSet.js
+ var require_createSet = __commonJS({
+ "node_modules/lodash/_createSet.js"(exports, module) {
+ var Set2 = require_Set();
+ var noop = require_noop();
+ var setToArray = require_setToArray();
+ var INFINITY = 1 / 0;
+ var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values) {
+ return new Set2(values);
+ };
+ module.exports = createSet;
+ }
+ });
+
+ // node_modules/lodash/_baseUniq.js
+ var require_baseUniq = __commonJS({
+ "node_modules/lodash/_baseUniq.js"(exports, module) {
+ var SetCache = require_SetCache();
+ var arrayIncludes = require_arrayIncludes();
+ var arrayIncludesWith = require_arrayIncludesWith();
+ var cacheHas = require_cacheHas();
+ var createSet = require_createSet();
+ var setToArray = require_setToArray();
+ var LARGE_ARRAY_SIZE = 200;
+ function baseUniq(array, iteratee, comparator) {
+ var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result;
+ if (comparator) {
+ isCommon = false;
+ includes = arrayIncludesWith;
+ } else if (length >= LARGE_ARRAY_SIZE) {
+ var set = iteratee ? null : createSet(array);
+ if (set) {
+ return setToArray(set);
+ }
+ isCommon = false;
+ includes = cacheHas;
+ seen = new SetCache();
+ } else {
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index], computed = iteratee ? iteratee(value) : value;
+ value = comparator || value !== 0 ? value : 0;
+ if (isCommon && computed === computed) {
+ var seenIndex = seen.length;
+ while (seenIndex--) {
+ if (seen[seenIndex] === computed) {
+ continue outer;
+ }
+ }
+ if (iteratee) {
+ seen.push(computed);
+ }
+ result.push(value);
+ } else if (!includes(seen, computed, comparator)) {
+ if (seen !== result) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+ __name(baseUniq, "baseUniq");
+ module.exports = baseUniq;
+ }
+ });
+
+ // node_modules/lodash/uniqWith.js
+ var require_uniqWith = __commonJS({
+ "node_modules/lodash/uniqWith.js"(exports, module) {
+ var baseUniq = require_baseUniq();
+ function uniqWith2(array, comparator) {
+ comparator = typeof comparator == "function" ? comparator : void 0;
+ return array && array.length ? baseUniq(array, void 0, comparator) : [];
+ }
+ __name(uniqWith2, "uniqWith");
+ module.exports = uniqWith2;
+ }
+ });
+
+ // src/lib/configs.ts
+ var validationEnabled = true;
+ function setGlobalValidationEnabled(enabled) {
+ validationEnabled = enabled;
+ }
+ __name(setGlobalValidationEnabled, "setGlobalValidationEnabled");
+ function getGlobalValidationEnabled() {
+ return validationEnabled;
+ }
+ __name(getGlobalValidationEnabled, "getGlobalValidationEnabled");
+
+ // src/lib/Result.ts
+ var Result = class {
+ constructor(success, value, error) {
+ this.success = success;
+ if (success) {
+ this.value = value;
+ } else {
+ this.error = error;
+ }
+ }
+ isOk() {
+ return this.success;
+ }
+ isErr() {
+ return !this.success;
+ }
+ unwrap() {
+ if (this.isOk())
+ return this.value;
+ throw this.error;
+ }
+ static ok(value) {
+ return new Result(true, value);
+ }
+ static err(error) {
+ return new Result(false, void 0, error);
+ }
+ };
+ __name(Result, "Result");
+
+ // src/validators/util/getValue.ts
+ function getValue(valueOrFn) {
+ return typeof valueOrFn === "function" ? valueOrFn() : valueOrFn;
+ }
+ __name(getValue, "getValue");
+
+ // src/constraints/ObjectConstrains.ts
+ var import_get = __toESM(require_get());
+
+ // node-modules-polyfills:util
+ var e;
+ var t;
+ var n;
+ var r = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : globalThis;
+ var o = e = {};
+ function i() {
+ throw new Error("setTimeout has not been defined");
+ }
+ __name(i, "i");
+ function u() {
+ throw new Error("clearTimeout has not been defined");
+ }
+ __name(u, "u");
+ function c(e3) {
+ if (t === setTimeout)
+ return setTimeout(e3, 0);
+ if ((t === i || !t) && setTimeout)
+ return t = setTimeout, setTimeout(e3, 0);
+ try {
+ return t(e3, 0);
+ } catch (n3) {
+ try {
+ return t.call(null, e3, 0);
+ } catch (n4) {
+ return t.call(this || r, e3, 0);
+ }
+ }
+ }
+ __name(c, "c");
+ !function() {
+ try {
+ t = "function" == typeof setTimeout ? setTimeout : i;
+ } catch (e3) {
+ t = i;
+ }
+ try {
+ n = "function" == typeof clearTimeout ? clearTimeout : u;
+ } catch (e3) {
+ n = u;
+ }
+ }();
+ var l;
+ var s = [];
+ var f = false;
+ var a = -1;
+ function h() {
+ f && l && (f = false, l.length ? s = l.concat(s) : a = -1, s.length && d());
+ }
+ __name(h, "h");
+ function d() {
+ if (!f) {
+ var e3 = c(h);
+ f = true;
+ for (var t3 = s.length; t3; ) {
+ for (l = s, s = []; ++a < t3; )
+ l && l[a].run();
+ a = -1, t3 = s.length;
+ }
+ l = null, f = false, function(e4) {
+ if (n === clearTimeout)
+ return clearTimeout(e4);
+ if ((n === u || !n) && clearTimeout)
+ return n = clearTimeout, clearTimeout(e4);
+ try {
+ n(e4);
+ } catch (t4) {
+ try {
+ return n.call(null, e4);
+ } catch (t5) {
+ return n.call(this || r, e4);
+ }
+ }
+ }(e3);
+ }
+ }
+ __name(d, "d");
+ function m(e3, t3) {
+ (this || r).fun = e3, (this || r).array = t3;
+ }
+ __name(m, "m");
+ function p() {
+ }
+ __name(p, "p");
+ o.nextTick = function(e3) {
+ var t3 = new Array(arguments.length - 1);
+ if (arguments.length > 1)
+ for (var n3 = 1; n3 < arguments.length; n3++)
+ t3[n3 - 1] = arguments[n3];
+ s.push(new m(e3, t3)), 1 !== s.length || f || c(d);
+ }, m.prototype.run = function() {
+ (this || r).fun.apply(null, (this || r).array);
+ }, o.title = "browser", o.browser = true, o.env = {}, o.argv = [], o.version = "", o.versions = {}, o.on = p, o.addListener = p, o.once = p, o.off = p, o.removeListener = p, o.removeAllListeners = p, o.emit = p, o.prependListener = p, o.prependOnceListener = p, o.listeners = function(e3) {
+ return [];
+ }, o.binding = function(e3) {
+ throw new Error("process.binding is not supported");
+ }, o.cwd = function() {
+ return "/";
+ }, o.chdir = function(e3) {
+ throw new Error("process.chdir is not supported");
+ }, o.umask = function() {
+ return 0;
+ };
+ var T = e;
+ T.addListener;
+ T.argv;
+ T.binding;
+ T.browser;
+ T.chdir;
+ T.cwd;
+ T.emit;
+ T.env;
+ T.listeners;
+ T.nextTick;
+ T.off;
+ T.on;
+ T.once;
+ T.prependListener;
+ T.prependOnceListener;
+ T.removeAllListeners;
+ T.removeListener;
+ T.title;
+ T.umask;
+ T.version;
+ T.versions;
+ var t2 = "function" == typeof Symbol && "symbol" == typeof Symbol.toStringTag;
+ var e2 = Object.prototype.toString;
+ var o2 = /* @__PURE__ */ __name(function(o3) {
+ return !(t2 && o3 && "object" == typeof o3 && Symbol.toStringTag in o3) && "[object Arguments]" === e2.call(o3);
+ }, "o2");
+ var n2 = /* @__PURE__ */ __name(function(t3) {
+ return !!o2(t3) || null !== t3 && "object" == typeof t3 && "number" == typeof t3.length && t3.length >= 0 && "[object Array]" !== e2.call(t3) && "[object Function]" === e2.call(t3.callee);
+ }, "n2");
+ var r2 = function() {
+ return o2(arguments);
+ }();
+ o2.isLegacyArguments = n2;
+ var l2 = r2 ? o2 : n2;
+ var t$1 = Object.prototype.toString;
+ var o$1 = Function.prototype.toString;
+ var n$1 = /^\s*(?:function)?\*/;
+ var e$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.toStringTag;
+ var r$1 = Object.getPrototypeOf;
+ var c2 = function() {
+ if (!e$1)
+ return false;
+ try {
+ return Function("return function*() {}")();
+ } catch (t3) {
+ }
+ }();
+ var u2 = c2 ? r$1(c2) : {};
+ var i2 = /* @__PURE__ */ __name(function(c3) {
+ return "function" == typeof c3 && (!!n$1.test(o$1.call(c3)) || (e$1 ? r$1(c3) === u2 : "[object GeneratorFunction]" === t$1.call(c3)));
+ }, "i2");
+ var t$2 = "function" == typeof Object.create ? function(t3, e3) {
+ e3 && (t3.super_ = e3, t3.prototype = Object.create(e3.prototype, { constructor: { value: t3, enumerable: false, writable: true, configurable: true } }));
+ } : function(t3, e3) {
+ if (e3) {
+ t3.super_ = e3;
+ var o3 = /* @__PURE__ */ __name(function() {
+ }, "o3");
+ o3.prototype = e3.prototype, t3.prototype = new o3(), t3.prototype.constructor = t3;
+ }
+ };
+ var i$1 = /* @__PURE__ */ __name(function(e3) {
+ return e3 && "object" == typeof e3 && "function" == typeof e3.copy && "function" == typeof e3.fill && "function" == typeof e3.readUInt8;
+ }, "i$1");
+ var o$2 = {};
+ var u$1 = i$1;
+ var f2 = l2;
+ var a2 = i2;
+ function c$1(e3) {
+ return e3.call.bind(e3);
+ }
+ __name(c$1, "c$1");
+ var s2 = "undefined" != typeof BigInt;
+ var p2 = "undefined" != typeof Symbol;
+ var y = p2 && void 0 !== Symbol.toStringTag;
+ var l$1 = "undefined" != typeof Uint8Array;
+ var d2 = "undefined" != typeof ArrayBuffer;
+ if (l$1 && y)
+ var g = Object.getPrototypeOf(Uint8Array.prototype), b = c$1(Object.getOwnPropertyDescriptor(g, Symbol.toStringTag).get);
+ var m2 = c$1(Object.prototype.toString);
+ var h2 = c$1(Number.prototype.valueOf);
+ var j = c$1(String.prototype.valueOf);
+ var A = c$1(Boolean.prototype.valueOf);
+ if (s2)
+ var w = c$1(BigInt.prototype.valueOf);
+ if (p2)
+ var v = c$1(Symbol.prototype.valueOf);
+ function O(e3, t3) {
+ if ("object" != typeof e3)
+ return false;
+ try {
+ return t3(e3), true;
+ } catch (e4) {
+ return false;
+ }
+ }
+ __name(O, "O");
+ function S(e3) {
+ return l$1 && y ? void 0 !== b(e3) : B(e3) || k(e3) || E(e3) || D(e3) || U(e3) || P(e3) || x(e3) || I(e3) || M(e3) || z(e3) || F(e3);
+ }
+ __name(S, "S");
+ function B(e3) {
+ return l$1 && y ? "Uint8Array" === b(e3) : "[object Uint8Array]" === m2(e3) || u$1(e3) && void 0 !== e3.buffer;
+ }
+ __name(B, "B");
+ function k(e3) {
+ return l$1 && y ? "Uint8ClampedArray" === b(e3) : "[object Uint8ClampedArray]" === m2(e3);
+ }
+ __name(k, "k");
+ function E(e3) {
+ return l$1 && y ? "Uint16Array" === b(e3) : "[object Uint16Array]" === m2(e3);
+ }
+ __name(E, "E");
+ function D(e3) {
+ return l$1 && y ? "Uint32Array" === b(e3) : "[object Uint32Array]" === m2(e3);
+ }
+ __name(D, "D");
+ function U(e3) {
+ return l$1 && y ? "Int8Array" === b(e3) : "[object Int8Array]" === m2(e3);
+ }
+ __name(U, "U");
+ function P(e3) {
+ return l$1 && y ? "Int16Array" === b(e3) : "[object Int16Array]" === m2(e3);
+ }
+ __name(P, "P");
+ function x(e3) {
+ return l$1 && y ? "Int32Array" === b(e3) : "[object Int32Array]" === m2(e3);
+ }
+ __name(x, "x");
+ function I(e3) {
+ return l$1 && y ? "Float32Array" === b(e3) : "[object Float32Array]" === m2(e3);
+ }
+ __name(I, "I");
+ function M(e3) {
+ return l$1 && y ? "Float64Array" === b(e3) : "[object Float64Array]" === m2(e3);
+ }
+ __name(M, "M");
+ function z(e3) {
+ return l$1 && y ? "BigInt64Array" === b(e3) : "[object BigInt64Array]" === m2(e3);
+ }
+ __name(z, "z");
+ function F(e3) {
+ return l$1 && y ? "BigUint64Array" === b(e3) : "[object BigUint64Array]" === m2(e3);
+ }
+ __name(F, "F");
+ function T2(e3) {
+ return "[object Map]" === m2(e3);
+ }
+ __name(T2, "T2");
+ function N(e3) {
+ return "[object Set]" === m2(e3);
+ }
+ __name(N, "N");
+ function W(e3) {
+ return "[object WeakMap]" === m2(e3);
+ }
+ __name(W, "W");
+ function $(e3) {
+ return "[object WeakSet]" === m2(e3);
+ }
+ __name($, "$");
+ function C(e3) {
+ return "[object ArrayBuffer]" === m2(e3);
+ }
+ __name(C, "C");
+ function V(e3) {
+ return "undefined" != typeof ArrayBuffer && (C.working ? C(e3) : e3 instanceof ArrayBuffer);
+ }
+ __name(V, "V");
+ function G(e3) {
+ return "[object DataView]" === m2(e3);
+ }
+ __name(G, "G");
+ function R(e3) {
+ return "undefined" != typeof DataView && (G.working ? G(e3) : e3 instanceof DataView);
+ }
+ __name(R, "R");
+ function J(e3) {
+ return "[object SharedArrayBuffer]" === m2(e3);
+ }
+ __name(J, "J");
+ function _(e3) {
+ return "undefined" != typeof SharedArrayBuffer && (J.working ? J(e3) : e3 instanceof SharedArrayBuffer);
+ }
+ __name(_, "_");
+ function H(e3) {
+ return O(e3, h2);
+ }
+ __name(H, "H");
+ function Z(e3) {
+ return O(e3, j);
+ }
+ __name(Z, "Z");
+ function q(e3) {
+ return O(e3, A);
+ }
+ __name(q, "q");
+ function K(e3) {
+ return s2 && O(e3, w);
+ }
+ __name(K, "K");
+ function L(e3) {
+ return p2 && O(e3, v);
+ }
+ __name(L, "L");
+ o$2.isArgumentsObject = f2, o$2.isGeneratorFunction = a2, o$2.isPromise = function(e3) {
+ return "undefined" != typeof Promise && e3 instanceof Promise || null !== e3 && "object" == typeof e3 && "function" == typeof e3.then && "function" == typeof e3.catch;
+ }, o$2.isArrayBufferView = function(e3) {
+ return d2 && ArrayBuffer.isView ? ArrayBuffer.isView(e3) : S(e3) || R(e3);
+ }, o$2.isTypedArray = S, o$2.isUint8Array = B, o$2.isUint8ClampedArray = k, o$2.isUint16Array = E, o$2.isUint32Array = D, o$2.isInt8Array = U, o$2.isInt16Array = P, o$2.isInt32Array = x, o$2.isFloat32Array = I, o$2.isFloat64Array = M, o$2.isBigInt64Array = z, o$2.isBigUint64Array = F, T2.working = "undefined" != typeof Map && T2(/* @__PURE__ */ new Map()), o$2.isMap = function(e3) {
+ return "undefined" != typeof Map && (T2.working ? T2(e3) : e3 instanceof Map);
+ }, N.working = "undefined" != typeof Set && N(/* @__PURE__ */ new Set()), o$2.isSet = function(e3) {
+ return "undefined" != typeof Set && (N.working ? N(e3) : e3 instanceof Set);
+ }, W.working = "undefined" != typeof WeakMap && W(/* @__PURE__ */ new WeakMap()), o$2.isWeakMap = function(e3) {
+ return "undefined" != typeof WeakMap && (W.working ? W(e3) : e3 instanceof WeakMap);
+ }, $.working = "undefined" != typeof WeakSet && $(/* @__PURE__ */ new WeakSet()), o$2.isWeakSet = function(e3) {
+ return $(e3);
+ }, C.working = "undefined" != typeof ArrayBuffer && C(new ArrayBuffer()), o$2.isArrayBuffer = V, G.working = "undefined" != typeof ArrayBuffer && "undefined" != typeof DataView && G(new DataView(new ArrayBuffer(1), 0, 1)), o$2.isDataView = R, J.working = "undefined" != typeof SharedArrayBuffer && J(new SharedArrayBuffer()), o$2.isSharedArrayBuffer = _, o$2.isAsyncFunction = function(e3) {
+ return "[object AsyncFunction]" === m2(e3);
+ }, o$2.isMapIterator = function(e3) {
+ return "[object Map Iterator]" === m2(e3);
+ }, o$2.isSetIterator = function(e3) {
+ return "[object Set Iterator]" === m2(e3);
+ }, o$2.isGeneratorObject = function(e3) {
+ return "[object Generator]" === m2(e3);
+ }, o$2.isWebAssemblyCompiledModule = function(e3) {
+ return "[object WebAssembly.Module]" === m2(e3);
+ }, o$2.isNumberObject = H, o$2.isStringObject = Z, o$2.isBooleanObject = q, o$2.isBigIntObject = K, o$2.isSymbolObject = L, o$2.isBoxedPrimitive = function(e3) {
+ return H(e3) || Z(e3) || q(e3) || K(e3) || L(e3);
+ }, o$2.isAnyArrayBuffer = function(e3) {
+ return l$1 && (V(e3) || _(e3));
+ }, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(e3) {
+ Object.defineProperty(o$2, e3, { enumerable: false, value: function() {
+ throw new Error(e3 + " is not supported in userland");
+ } });
+ });
+ var Q = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : globalThis;
+ var X = {};
+ var Y = T;
+ var ee = Object.getOwnPropertyDescriptors || function(e3) {
+ for (var t3 = Object.keys(e3), r3 = {}, n3 = 0; n3 < t3.length; n3++)
+ r3[t3[n3]] = Object.getOwnPropertyDescriptor(e3, t3[n3]);
+ return r3;
+ };
+ var te = /%[sdj%]/g;
+ X.format = function(e3) {
+ if (!ge(e3)) {
+ for (var t3 = [], r3 = 0; r3 < arguments.length; r3++)
+ t3.push(oe(arguments[r3]));
+ return t3.join(" ");
+ }
+ r3 = 1;
+ for (var n3 = arguments, i3 = n3.length, o3 = String(e3).replace(te, function(e4) {
+ if ("%%" === e4)
+ return "%";
+ if (r3 >= i3)
+ return e4;
+ switch (e4) {
+ case "%s":
+ return String(n3[r3++]);
+ case "%d":
+ return Number(n3[r3++]);
+ case "%j":
+ try {
+ return JSON.stringify(n3[r3++]);
+ } catch (e5) {
+ return "[Circular]";
+ }
+ default:
+ return e4;
+ }
+ }), u3 = n3[r3]; r3 < i3; u3 = n3[++r3])
+ le(u3) || !he(u3) ? o3 += " " + u3 : o3 += " " + oe(u3);
+ return o3;
+ }, X.deprecate = function(e3, t3) {
+ if (void 0 !== Y && true === Y.noDeprecation)
+ return e3;
+ if (void 0 === Y)
+ return function() {
+ return X.deprecate(e3, t3).apply(this || Q, arguments);
+ };
+ var r3 = false;
+ return function() {
+ if (!r3) {
+ if (Y.throwDeprecation)
+ throw new Error(t3);
+ Y.traceDeprecation ? console.trace(t3) : console.error(t3), r3 = true;
+ }
+ return e3.apply(this || Q, arguments);
+ };
+ };
+ var re = {};
+ var ne = /^$/;
+ if (Y.env.NODE_DEBUG) {
+ ie = Y.env.NODE_DEBUG;
+ ie = ie.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), ne = new RegExp("^" + ie + "$", "i");
+ }
+ var ie;
+ function oe(e3, t3) {
+ var r3 = { seen: [], stylize: fe };
+ return arguments.length >= 3 && (r3.depth = arguments[2]), arguments.length >= 4 && (r3.colors = arguments[3]), ye(t3) ? r3.showHidden = t3 : t3 && X._extend(r3, t3), be(r3.showHidden) && (r3.showHidden = false), be(r3.depth) && (r3.depth = 2), be(r3.colors) && (r3.colors = false), be(r3.customInspect) && (r3.customInspect = true), r3.colors && (r3.stylize = ue), ae(r3, e3, r3.depth);
+ }
+ __name(oe, "oe");
+ function ue(e3, t3) {
+ var r3 = oe.styles[t3];
+ return r3 ? "\x1B[" + oe.colors[r3][0] + "m" + e3 + "\x1B[" + oe.colors[r3][1] + "m" : e3;
+ }
+ __name(ue, "ue");
+ function fe(e3, t3) {
+ return e3;
+ }
+ __name(fe, "fe");
+ function ae(e3, t3, r3) {
+ if (e3.customInspect && t3 && we(t3.inspect) && t3.inspect !== X.inspect && (!t3.constructor || t3.constructor.prototype !== t3)) {
+ var n3 = t3.inspect(r3, e3);
+ return ge(n3) || (n3 = ae(e3, n3, r3)), n3;
+ }
+ var i3 = function(e4, t4) {
+ if (be(t4))
+ return e4.stylize("undefined", "undefined");
+ if (ge(t4)) {
+ var r4 = "'" + JSON.stringify(t4).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
+ return e4.stylize(r4, "string");
+ }
+ if (de(t4))
+ return e4.stylize("" + t4, "number");
+ if (ye(t4))
+ return e4.stylize("" + t4, "boolean");
+ if (le(t4))
+ return e4.stylize("null", "null");
+ }(e3, t3);
+ if (i3)
+ return i3;
+ var o3 = Object.keys(t3), u3 = function(e4) {
+ var t4 = {};
+ return e4.forEach(function(e5, r4) {
+ t4[e5] = true;
+ }), t4;
+ }(o3);
+ if (e3.showHidden && (o3 = Object.getOwnPropertyNames(t3)), Ae(t3) && (o3.indexOf("message") >= 0 || o3.indexOf("description") >= 0))
+ return ce(t3);
+ if (0 === o3.length) {
+ if (we(t3)) {
+ var f3 = t3.name ? ": " + t3.name : "";
+ return e3.stylize("[Function" + f3 + "]", "special");
+ }
+ if (me(t3))
+ return e3.stylize(RegExp.prototype.toString.call(t3), "regexp");
+ if (je(t3))
+ return e3.stylize(Date.prototype.toString.call(t3), "date");
+ if (Ae(t3))
+ return ce(t3);
+ }
+ var a3, c3 = "", s32 = false, p3 = ["{", "}"];
+ (pe(t3) && (s32 = true, p3 = ["[", "]"]), we(t3)) && (c3 = " [Function" + (t3.name ? ": " + t3.name : "") + "]");
+ return me(t3) && (c3 = " " + RegExp.prototype.toString.call(t3)), je(t3) && (c3 = " " + Date.prototype.toUTCString.call(t3)), Ae(t3) && (c3 = " " + ce(t3)), 0 !== o3.length || s32 && 0 != t3.length ? r3 < 0 ? me(t3) ? e3.stylize(RegExp.prototype.toString.call(t3), "regexp") : e3.stylize("[Object]", "special") : (e3.seen.push(t3), a3 = s32 ? function(e4, t4, r4, n4, i4) {
+ for (var o4 = [], u4 = 0, f4 = t4.length; u4 < f4; ++u4)
+ ke(t4, String(u4)) ? o4.push(se(e4, t4, r4, n4, String(u4), true)) : o4.push("");
+ return i4.forEach(function(i5) {
+ i5.match(/^\d+$/) || o4.push(se(e4, t4, r4, n4, i5, true));
+ }), o4;
+ }(e3, t3, r3, u3, o3) : o3.map(function(n4) {
+ return se(e3, t3, r3, u3, n4, s32);
+ }), e3.seen.pop(), function(e4, t4, r4) {
+ var n4 = 0;
+ if (e4.reduce(function(e5, t5) {
+ return n4++, t5.indexOf("\n") >= 0 && n4++, e5 + t5.replace(/\u001b\[\d\d?m/g, "").length + 1;
+ }, 0) > 60)
+ return r4[0] + ("" === t4 ? "" : t4 + "\n ") + " " + e4.join(",\n ") + " " + r4[1];
+ return r4[0] + t4 + " " + e4.join(", ") + " " + r4[1];
+ }(a3, c3, p3)) : p3[0] + c3 + p3[1];
+ }
+ __name(ae, "ae");
+ function ce(e3) {
+ return "[" + Error.prototype.toString.call(e3) + "]";
+ }
+ __name(ce, "ce");
+ function se(e3, t3, r3, n3, i3, o3) {
+ var u3, f3, a3;
+ if ((a3 = Object.getOwnPropertyDescriptor(t3, i3) || { value: t3[i3] }).get ? f3 = a3.set ? e3.stylize("[Getter/Setter]", "special") : e3.stylize("[Getter]", "special") : a3.set && (f3 = e3.stylize("[Setter]", "special")), ke(n3, i3) || (u3 = "[" + i3 + "]"), f3 || (e3.seen.indexOf(a3.value) < 0 ? (f3 = le(r3) ? ae(e3, a3.value, null) : ae(e3, a3.value, r3 - 1)).indexOf("\n") > -1 && (f3 = o3 ? f3.split("\n").map(function(e4) {
+ return " " + e4;
+ }).join("\n").substr(2) : "\n" + f3.split("\n").map(function(e4) {
+ return " " + e4;
+ }).join("\n")) : f3 = e3.stylize("[Circular]", "special")), be(u3)) {
+ if (o3 && i3.match(/^\d+$/))
+ return f3;
+ (u3 = JSON.stringify("" + i3)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (u3 = u3.substr(1, u3.length - 2), u3 = e3.stylize(u3, "name")) : (u3 = u3.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), u3 = e3.stylize(u3, "string"));
+ }
+ return u3 + ": " + f3;
+ }
+ __name(se, "se");
+ function pe(e3) {
+ return Array.isArray(e3);
+ }
+ __name(pe, "pe");
+ function ye(e3) {
+ return "boolean" == typeof e3;
+ }
+ __name(ye, "ye");
+ function le(e3) {
+ return null === e3;
+ }
+ __name(le, "le");
+ function de(e3) {
+ return "number" == typeof e3;
+ }
+ __name(de, "de");
+ function ge(e3) {
+ return "string" == typeof e3;
+ }
+ __name(ge, "ge");
+ function be(e3) {
+ return void 0 === e3;
+ }
+ __name(be, "be");
+ function me(e3) {
+ return he(e3) && "[object RegExp]" === ve(e3);
+ }
+ __name(me, "me");
+ function he(e3) {
+ return "object" == typeof e3 && null !== e3;
+ }
+ __name(he, "he");
+ function je(e3) {
+ return he(e3) && "[object Date]" === ve(e3);
+ }
+ __name(je, "je");
+ function Ae(e3) {
+ return he(e3) && ("[object Error]" === ve(e3) || e3 instanceof Error);
+ }
+ __name(Ae, "Ae");
+ function we(e3) {
+ return "function" == typeof e3;
+ }
+ __name(we, "we");
+ function ve(e3) {
+ return Object.prototype.toString.call(e3);
+ }
+ __name(ve, "ve");
+ function Oe(e3) {
+ return e3 < 10 ? "0" + e3.toString(10) : e3.toString(10);
+ }
+ __name(Oe, "Oe");
+ X.debuglog = function(e3) {
+ if (e3 = e3.toUpperCase(), !re[e3])
+ if (ne.test(e3)) {
+ var t3 = Y.pid;
+ re[e3] = function() {
+ var r3 = X.format.apply(X, arguments);
+ console.error("%s %d: %s", e3, t3, r3);
+ };
+ } else
+ re[e3] = function() {
+ };
+ return re[e3];
+ }, X.inspect = oe, oe.colors = { bold: [1, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], white: [37, 39], grey: [90, 39], black: [30, 39], blue: [34, 39], cyan: [36, 39], green: [32, 39], magenta: [35, 39], red: [31, 39], yellow: [33, 39] }, oe.styles = { special: "cyan", number: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", date: "magenta", regexp: "red" }, X.types = o$2, X.isArray = pe, X.isBoolean = ye, X.isNull = le, X.isNullOrUndefined = function(e3) {
+ return null == e3;
+ }, X.isNumber = de, X.isString = ge, X.isSymbol = function(e3) {
+ return "symbol" == typeof e3;
+ }, X.isUndefined = be, X.isRegExp = me, X.types.isRegExp = me, X.isObject = he, X.isDate = je, X.types.isDate = je, X.isError = Ae, X.types.isNativeError = Ae, X.isFunction = we, X.isPrimitive = function(e3) {
+ return null === e3 || "boolean" == typeof e3 || "number" == typeof e3 || "string" == typeof e3 || "symbol" == typeof e3 || void 0 === e3;
+ }, X.isBuffer = i$1;
+ var Se = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
+ function Be() {
+ var e3 = /* @__PURE__ */ new Date(), t3 = [Oe(e3.getHours()), Oe(e3.getMinutes()), Oe(e3.getSeconds())].join(":");
+ return [e3.getDate(), Se[e3.getMonth()], t3].join(" ");
+ }
+ __name(Be, "Be");
+ function ke(e3, t3) {
+ return Object.prototype.hasOwnProperty.call(e3, t3);
+ }
+ __name(ke, "ke");
+ X.log = function() {
+ console.log("%s - %s", Be(), X.format.apply(X, arguments));
+ }, X.inherits = t$2, X._extend = function(e3, t3) {
+ if (!t3 || !he(t3))
+ return e3;
+ for (var r3 = Object.keys(t3), n3 = r3.length; n3--; )
+ e3[r3[n3]] = t3[r3[n3]];
+ return e3;
+ };
+ var Ee = "undefined" != typeof Symbol ? Symbol("util.promisify.custom") : void 0;
+ function De(e3, t3) {
+ if (!e3) {
+ var r3 = new Error("Promise was rejected with a falsy value");
+ r3.reason = e3, e3 = r3;
+ }
+ return t3(e3);
+ }
+ __name(De, "De");
+ X.promisify = function(e3) {
+ if ("function" != typeof e3)
+ throw new TypeError('The "original" argument must be of type Function');
+ if (Ee && e3[Ee]) {
+ var t3;
+ if ("function" != typeof (t3 = e3[Ee]))
+ throw new TypeError('The "util.promisify.custom" argument must be of type Function');
+ return Object.defineProperty(t3, Ee, { value: t3, enumerable: false, writable: false, configurable: true }), t3;
+ }
+ function t3() {
+ for (var t4, r3, n3 = new Promise(function(e4, n4) {
+ t4 = e4, r3 = n4;
+ }), i3 = [], o3 = 0; o3 < arguments.length; o3++)
+ i3.push(arguments[o3]);
+ i3.push(function(e4, n4) {
+ e4 ? r3(e4) : t4(n4);
+ });
+ try {
+ e3.apply(this || Q, i3);
+ } catch (e4) {
+ r3(e4);
+ }
+ return n3;
+ }
+ __name(t3, "t3");
+ return Object.setPrototypeOf(t3, Object.getPrototypeOf(e3)), Ee && Object.defineProperty(t3, Ee, { value: t3, enumerable: false, writable: false, configurable: true }), Object.defineProperties(t3, ee(e3));
+ }, X.promisify.custom = Ee, X.callbackify = function(e3) {
+ if ("function" != typeof e3)
+ throw new TypeError('The "original" argument must be of type Function');
+ function t3() {
+ for (var t4 = [], r3 = 0; r3 < arguments.length; r3++)
+ t4.push(arguments[r3]);
+ var n3 = t4.pop();
+ if ("function" != typeof n3)
+ throw new TypeError("The last argument must be of type Function");
+ var i3 = this || Q, o3 = /* @__PURE__ */ __name(function() {
+ return n3.apply(i3, arguments);
+ }, "o3");
+ e3.apply(this || Q, t4).then(function(e4) {
+ Y.nextTick(o3.bind(null, null, e4));
+ }, function(e4) {
+ Y.nextTick(De.bind(null, e4, o3));
+ });
+ }
+ __name(t3, "t3");
+ return Object.setPrototypeOf(t3, Object.getPrototypeOf(e3)), Object.defineProperties(t3, ee(e3)), t3;
+ };
+ X._extend;
+ X.callbackify;
+ X.debuglog;
+ X.deprecate;
+ X.format;
+ X.inherits;
+ X.inspect;
+ X.isArray;
+ X.isBoolean;
+ X.isBuffer;
+ X.isDate;
+ X.isError;
+ X.isFunction;
+ X.isNull;
+ X.isNullOrUndefined;
+ X.isNumber;
+ X.isObject;
+ X.isPrimitive;
+ X.isRegExp;
+ X.isString;
+ X.isSymbol;
+ X.isUndefined;
+ X.log;
+ X.promisify;
+ X._extend;
+ X.callbackify;
+ X.debuglog;
+ X.deprecate;
+ X.format;
+ X.inherits;
+ X.inspect;
+ X.isArray;
+ X.isBoolean;
+ X.isBuffer;
+ X.isDate;
+ X.isError;
+ X.isFunction;
+ X.isNull;
+ X.isNullOrUndefined;
+ X.isNumber;
+ X.isObject;
+ X.isPrimitive;
+ X.isRegExp;
+ X.isString;
+ X.isSymbol;
+ X.isUndefined;
+ X.log;
+ X.promisify;
+ X.types;
+ X._extend;
+ X.callbackify;
+ X.debuglog;
+ X.deprecate;
+ X.format;
+ X.inherits;
+ var inspect2 = X.inspect;
+ X.isArray;
+ X.isBoolean;
+ X.isBuffer;
+ X.isDate;
+ X.isError;
+ X.isFunction;
+ X.isNull;
+ X.isNullOrUndefined;
+ X.isNumber;
+ X.isObject;
+ X.isPrimitive;
+ X.isRegExp;
+ X.isString;
+ X.isSymbol;
+ X.isUndefined;
+ X.log;
+ X.promisify;
+ X.types;
+ X.TextEncoder = globalThis.TextEncoder;
+ X.TextDecoder = globalThis.TextDecoder;
+
+ // src/lib/errors/BaseError.ts
+ var customInspectSymbol = Symbol.for("nodejs.util.inspect.custom");
+ var customInspectSymbolStackLess = Symbol.for("nodejs.util.inspect.custom.stack-less");
+ var BaseError = class extends Error {
+ [customInspectSymbol](depth, options) {
+ return `${this[customInspectSymbolStackLess](depth, options)}
+${this.stack.slice(this.stack.indexOf("\n"))}`;
+ }
+ };
+ __name(BaseError, "BaseError");
+
+ // src/lib/errors/BaseConstraintError.ts
+ var BaseConstraintError = class extends BaseError {
+ constructor(constraint, message, given) {
+ super(message);
+ this.constraint = constraint;
+ this.given = given;
+ }
+ };
+ __name(BaseConstraintError, "BaseConstraintError");
+
+ // src/lib/errors/ExpectedConstraintError.ts
+ var ExpectedConstraintError = class extends BaseConstraintError {
+ constructor(constraint, message, given, expected) {
+ super(constraint, message, given);
+ this.expected = expected;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ constraint: this.constraint,
+ given: this.given,
+ expected: this.expected
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const constraint = options.stylize(this.constraint, "string");
+ if (depth < 0) {
+ return options.stylize(`[ExpectedConstraintError: ${constraint}]`, "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1 };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const given = inspect2(this.given, newOptions).replace(/\n/g, padding);
+ const header = `${options.stylize("ExpectedConstraintError", "special")} > ${constraint}`;
+ const message = options.stylize(this.message, "regexp");
+ const expectedBlock = `
+ ${options.stylize("Expected: ", "string")}${options.stylize(this.expected, "boolean")}`;
+ const givenBlock = `
+ ${options.stylize("Received:", "regexp")}${padding}${given}`;
+ return `${header}
+ ${message}
+${expectedBlock}
+${givenBlock}`;
+ }
+ };
+ __name(ExpectedConstraintError, "ExpectedConstraintError");
+
+ // src/constraints/ObjectConstrains.ts
+ function whenConstraint(key, options, validator) {
+ return {
+ run(input, parent) {
+ if (!parent) {
+ return Result.err(new ExpectedConstraintError("s.object(T.when)", "Validator has no parent", parent, "Validator to have a parent"));
+ }
+ const isKeyArray = Array.isArray(key);
+ const value = isKeyArray ? key.map((k2) => (0, import_get.default)(parent, k2)) : (0, import_get.default)(parent, key);
+ const predicate = resolveBooleanIs(options, value, isKeyArray) ? options.then : options.otherwise;
+ if (predicate) {
+ return predicate(validator).run(input);
+ }
+ return Result.ok(input);
+ }
+ };
+ }
+ __name(whenConstraint, "whenConstraint");
+ function resolveBooleanIs(options, value, isKeyArray) {
+ if (options.is === void 0) {
+ return isKeyArray ? !value.some((val) => !val) : Boolean(value);
+ }
+ if (typeof options.is === "function") {
+ return options.is(value);
+ }
+ return value === options.is;
+ }
+ __name(resolveBooleanIs, "resolveBooleanIs");
+
+ // src/validators/BaseValidator.ts
+ var BaseValidator = class {
+ constructor(constraints = []) {
+ this.constraints = [];
+ this.isValidationEnabled = null;
+ this.constraints = constraints;
+ }
+ setParent(parent) {
+ this.parent = parent;
+ return this;
+ }
+ get optional() {
+ return new UnionValidator([new LiteralValidator(void 0), this.clone()]);
+ }
+ get nullable() {
+ return new UnionValidator([new LiteralValidator(null), this.clone()]);
+ }
+ get nullish() {
+ return new UnionValidator([new NullishValidator(), this.clone()]);
+ }
+ get array() {
+ return new ArrayValidator(this.clone());
+ }
+ get set() {
+ return new SetValidator(this.clone());
+ }
+ or(...predicates) {
+ return new UnionValidator([this.clone(), ...predicates]);
+ }
+ transform(cb) {
+ return this.addConstraint({ run: (input) => Result.ok(cb(input)) });
+ }
+ reshape(cb) {
+ return this.addConstraint({ run: cb });
+ }
+ default(value) {
+ return new DefaultValidator(this.clone(), value);
+ }
+ when(key, options) {
+ return this.addConstraint(whenConstraint(key, options, this));
+ }
+ describe(description) {
+ const clone = this.clone();
+ clone.description = description;
+ return clone;
+ }
+ run(value) {
+ let result = this.handle(value);
+ if (result.isErr())
+ return result;
+ for (const constraint of this.constraints) {
+ result = constraint.run(result.value, this.parent);
+ if (result.isErr())
+ break;
+ }
+ return result;
+ }
+ parse(value) {
+ if (!this.shouldRunConstraints) {
+ return this.handle(value).unwrap();
+ }
+ return this.constraints.reduce((v2, constraint) => constraint.run(v2).unwrap(), this.handle(value).unwrap());
+ }
+ is(value) {
+ return this.run(value).isOk();
+ }
+ /**
+ * Sets if the validator should also run constraints or just do basic checks.
+ * @param isValidationEnabled Whether this validator should be enabled or disabled. You can pass boolean or a function returning boolean which will be called just before parsing.
+ * Set to `null` to go off of the global configuration.
+ */
+ setValidationEnabled(isValidationEnabled) {
+ const clone = this.clone();
+ clone.isValidationEnabled = isValidationEnabled;
+ return clone;
+ }
+ getValidationEnabled() {
+ return getValue(this.isValidationEnabled);
+ }
+ get shouldRunConstraints() {
+ return getValue(this.isValidationEnabled) ?? getGlobalValidationEnabled();
+ }
+ clone() {
+ const clone = Reflect.construct(this.constructor, [this.constraints]);
+ clone.isValidationEnabled = this.isValidationEnabled;
+ return clone;
+ }
+ addConstraint(constraint) {
+ const clone = this.clone();
+ clone.constraints = clone.constraints.concat(constraint);
+ return clone;
+ }
+ };
+ __name(BaseValidator, "BaseValidator");
+
+ // src/constraints/util/isUnique.ts
+ var import_es6 = __toESM(require_es6());
+ var import_uniqWith = __toESM(require_uniqWith());
+ function isUnique(input) {
+ if (input.length < 2)
+ return true;
+ const uniqueArray2 = (0, import_uniqWith.default)(input, import_es6.default);
+ return uniqueArray2.length === input.length;
+ }
+ __name(isUnique, "isUnique");
+
+ // src/constraints/util/operators.ts
+ function lessThan(a3, b2) {
+ return a3 < b2;
+ }
+ __name(lessThan, "lessThan");
+ function lessThanOrEqual(a3, b2) {
+ return a3 <= b2;
+ }
+ __name(lessThanOrEqual, "lessThanOrEqual");
+ function greaterThan(a3, b2) {
+ return a3 > b2;
+ }
+ __name(greaterThan, "greaterThan");
+ function greaterThanOrEqual(a3, b2) {
+ return a3 >= b2;
+ }
+ __name(greaterThanOrEqual, "greaterThanOrEqual");
+ function equal(a3, b2) {
+ return a3 === b2;
+ }
+ __name(equal, "equal");
+ function notEqual(a3, b2) {
+ return a3 !== b2;
+ }
+ __name(notEqual, "notEqual");
+
+ // src/constraints/ArrayConstraints.ts
+ function arrayLengthComparator(comparator, name, expected, length) {
+ return {
+ run(input) {
+ return comparator(input.length, length) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid Array length", input, expected));
+ }
+ };
+ }
+ __name(arrayLengthComparator, "arrayLengthComparator");
+ function arrayLengthLessThan(value) {
+ const expected = `expected.length < ${value}`;
+ return arrayLengthComparator(lessThan, "s.array(T).lengthLessThan", expected, value);
+ }
+ __name(arrayLengthLessThan, "arrayLengthLessThan");
+ function arrayLengthLessThanOrEqual(value) {
+ const expected = `expected.length <= ${value}`;
+ return arrayLengthComparator(lessThanOrEqual, "s.array(T).lengthLessThanOrEqual", expected, value);
+ }
+ __name(arrayLengthLessThanOrEqual, "arrayLengthLessThanOrEqual");
+ function arrayLengthGreaterThan(value) {
+ const expected = `expected.length > ${value}`;
+ return arrayLengthComparator(greaterThan, "s.array(T).lengthGreaterThan", expected, value);
+ }
+ __name(arrayLengthGreaterThan, "arrayLengthGreaterThan");
+ function arrayLengthGreaterThanOrEqual(value) {
+ const expected = `expected.length >= ${value}`;
+ return arrayLengthComparator(greaterThanOrEqual, "s.array(T).lengthGreaterThanOrEqual", expected, value);
+ }
+ __name(arrayLengthGreaterThanOrEqual, "arrayLengthGreaterThanOrEqual");
+ function arrayLengthEqual(value) {
+ const expected = `expected.length === ${value}`;
+ return arrayLengthComparator(equal, "s.array(T).lengthEqual", expected, value);
+ }
+ __name(arrayLengthEqual, "arrayLengthEqual");
+ function arrayLengthNotEqual(value) {
+ const expected = `expected.length !== ${value}`;
+ return arrayLengthComparator(notEqual, "s.array(T).lengthNotEqual", expected, value);
+ }
+ __name(arrayLengthNotEqual, "arrayLengthNotEqual");
+ function arrayLengthRange(start, endBefore) {
+ const expected = `expected.length >= ${start} && expected.length < ${endBefore}`;
+ return {
+ run(input) {
+ return input.length >= start && input.length < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.array(T).lengthRange", "Invalid Array length", input, expected));
+ }
+ };
+ }
+ __name(arrayLengthRange, "arrayLengthRange");
+ function arrayLengthRangeInclusive(start, end) {
+ const expected = `expected.length >= ${start} && expected.length <= ${end}`;
+ return {
+ run(input) {
+ return input.length >= start && input.length <= end ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.array(T).lengthRangeInclusive", "Invalid Array length", input, expected));
+ }
+ };
+ }
+ __name(arrayLengthRangeInclusive, "arrayLengthRangeInclusive");
+ function arrayLengthRangeExclusive(startAfter, endBefore) {
+ const expected = `expected.length > ${startAfter} && expected.length < ${endBefore}`;
+ return {
+ run(input) {
+ return input.length > startAfter && input.length < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.array(T).lengthRangeExclusive", "Invalid Array length", input, expected));
+ }
+ };
+ }
+ __name(arrayLengthRangeExclusive, "arrayLengthRangeExclusive");
+ var uniqueArray = {
+ run(input) {
+ return isUnique(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.array(T).unique", "Array values are not unique", input, "Expected all values to be unique"));
+ }
+ };
+
+ // src/lib/errors/CombinedPropertyError.ts
+ var CombinedPropertyError = class extends BaseError {
+ constructor(errors) {
+ super("Received one or more errors");
+ this.errors = errors;
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ if (depth < 0) {
+ return options.stylize("[CombinedPropertyError]", "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1, compact: true };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const header = `${options.stylize("CombinedPropertyError", "special")} (${options.stylize(this.errors.length.toString(), "number")})`;
+ const message = options.stylize(this.message, "regexp");
+ const errors = this.errors.map(([key, error]) => {
+ const property = CombinedPropertyError.formatProperty(key, options);
+ const body = error[customInspectSymbolStackLess](depth - 1, newOptions).replace(/\n/g, padding);
+ return ` input${property}${padding}${body}`;
+ }).join("\n\n");
+ return `${header}
+ ${message}
+
+${errors}`;
+ }
+ static formatProperty(key, options) {
+ if (typeof key === "string")
+ return options.stylize(`.${key}`, "symbol");
+ if (typeof key === "number")
+ return `[${options.stylize(key.toString(), "number")}]`;
+ return `[${options.stylize("Symbol", "symbol")}(${key.description})]`;
+ }
+ };
+ __name(CombinedPropertyError, "CombinedPropertyError");
+
+ // src/lib/errors/ValidationError.ts
+ var ValidationError = class extends BaseError {
+ constructor(validator, message, given) {
+ super(message);
+ this.validator = validator;
+ this.given = given;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ validator: this.validator,
+ given: this.given
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const validator = options.stylize(this.validator, "string");
+ if (depth < 0) {
+ return options.stylize(`[ValidationError: ${validator}]`, "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1, compact: true };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const given = inspect2(this.given, newOptions).replace(/\n/g, padding);
+ const header = `${options.stylize("ValidationError", "special")} > ${validator}`;
+ const message = options.stylize(this.message, "regexp");
+ const givenBlock = `
+ ${options.stylize("Received:", "regexp")}${padding}${given}`;
+ return `${header}
+ ${message}
+${givenBlock}`;
+ }
+ };
+ __name(ValidationError, "ValidationError");
+
+ // src/validators/ArrayValidator.ts
+ var ArrayValidator = class extends BaseValidator {
+ constructor(validator, constraints = []) {
+ super(constraints);
+ this.validator = validator;
+ }
+ lengthLessThan(length) {
+ return this.addConstraint(arrayLengthLessThan(length));
+ }
+ lengthLessThanOrEqual(length) {
+ return this.addConstraint(arrayLengthLessThanOrEqual(length));
+ }
+ lengthGreaterThan(length) {
+ return this.addConstraint(arrayLengthGreaterThan(length));
+ }
+ lengthGreaterThanOrEqual(length) {
+ return this.addConstraint(arrayLengthGreaterThanOrEqual(length));
+ }
+ lengthEqual(length) {
+ return this.addConstraint(arrayLengthEqual(length));
+ }
+ lengthNotEqual(length) {
+ return this.addConstraint(arrayLengthNotEqual(length));
+ }
+ lengthRange(start, endBefore) {
+ return this.addConstraint(arrayLengthRange(start, endBefore));
+ }
+ lengthRangeInclusive(startAt, endAt) {
+ return this.addConstraint(arrayLengthRangeInclusive(startAt, endAt));
+ }
+ lengthRangeExclusive(startAfter, endBefore) {
+ return this.addConstraint(arrayLengthRangeExclusive(startAfter, endBefore));
+ }
+ get unique() {
+ return this.addConstraint(uniqueArray);
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validator, this.constraints]);
+ }
+ handle(values) {
+ if (!Array.isArray(values)) {
+ return Result.err(new ValidationError("s.array(T)", "Expected an array", values));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(values);
+ }
+ const errors = [];
+ const transformed = [];
+ for (let i3 = 0; i3 < values.length; i3++) {
+ const result = this.validator.run(values[i3]);
+ if (result.isOk())
+ transformed.push(result.value);
+ else
+ errors.push([i3, result.error]);
+ }
+ return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedPropertyError(errors));
+ }
+ };
+ __name(ArrayValidator, "ArrayValidator");
+
+ // src/constraints/BigIntConstraints.ts
+ function bigintComparator(comparator, name, expected, number) {
+ return {
+ run(input) {
+ return comparator(input, number) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid bigint value", input, expected));
+ }
+ };
+ }
+ __name(bigintComparator, "bigintComparator");
+ function bigintLessThan(value) {
+ const expected = `expected < ${value}n`;
+ return bigintComparator(lessThan, "s.bigint.lessThan", expected, value);
+ }
+ __name(bigintLessThan, "bigintLessThan");
+ function bigintLessThanOrEqual(value) {
+ const expected = `expected <= ${value}n`;
+ return bigintComparator(lessThanOrEqual, "s.bigint.lessThanOrEqual", expected, value);
+ }
+ __name(bigintLessThanOrEqual, "bigintLessThanOrEqual");
+ function bigintGreaterThan(value) {
+ const expected = `expected > ${value}n`;
+ return bigintComparator(greaterThan, "s.bigint.greaterThan", expected, value);
+ }
+ __name(bigintGreaterThan, "bigintGreaterThan");
+ function bigintGreaterThanOrEqual(value) {
+ const expected = `expected >= ${value}n`;
+ return bigintComparator(greaterThanOrEqual, "s.bigint.greaterThanOrEqual", expected, value);
+ }
+ __name(bigintGreaterThanOrEqual, "bigintGreaterThanOrEqual");
+ function bigintEqual(value) {
+ const expected = `expected === ${value}n`;
+ return bigintComparator(equal, "s.bigint.equal", expected, value);
+ }
+ __name(bigintEqual, "bigintEqual");
+ function bigintNotEqual(value) {
+ const expected = `expected !== ${value}n`;
+ return bigintComparator(notEqual, "s.bigint.notEqual", expected, value);
+ }
+ __name(bigintNotEqual, "bigintNotEqual");
+ function bigintDivisibleBy(divider) {
+ const expected = `expected % ${divider}n === 0n`;
+ return {
+ run(input) {
+ return input % divider === 0n ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.bigint.divisibleBy", "BigInt is not divisible", input, expected));
+ }
+ };
+ }
+ __name(bigintDivisibleBy, "bigintDivisibleBy");
+
+ // src/validators/BigIntValidator.ts
+ var BigIntValidator = class extends BaseValidator {
+ lessThan(number) {
+ return this.addConstraint(bigintLessThan(number));
+ }
+ lessThanOrEqual(number) {
+ return this.addConstraint(bigintLessThanOrEqual(number));
+ }
+ greaterThan(number) {
+ return this.addConstraint(bigintGreaterThan(number));
+ }
+ greaterThanOrEqual(number) {
+ return this.addConstraint(bigintGreaterThanOrEqual(number));
+ }
+ equal(number) {
+ return this.addConstraint(bigintEqual(number));
+ }
+ notEqual(number) {
+ return this.addConstraint(bigintNotEqual(number));
+ }
+ get positive() {
+ return this.greaterThanOrEqual(0n);
+ }
+ get negative() {
+ return this.lessThan(0n);
+ }
+ divisibleBy(number) {
+ return this.addConstraint(bigintDivisibleBy(number));
+ }
+ get abs() {
+ return this.transform((value) => value < 0 ? -value : value);
+ }
+ intN(bits) {
+ return this.transform((value) => BigInt.asIntN(bits, value));
+ }
+ uintN(bits) {
+ return this.transform((value) => BigInt.asUintN(bits, value));
+ }
+ handle(value) {
+ return typeof value === "bigint" ? Result.ok(value) : Result.err(new ValidationError("s.bigint", "Expected a bigint primitive", value));
+ }
+ };
+ __name(BigIntValidator, "BigIntValidator");
+
+ // src/constraints/BooleanConstraints.ts
+ var booleanTrue = {
+ run(input) {
+ return input ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.boolean.true", "Invalid boolean value", input, "true"));
+ }
+ };
+ var booleanFalse = {
+ run(input) {
+ return input ? Result.err(new ExpectedConstraintError("s.boolean.false", "Invalid boolean value", input, "false")) : Result.ok(input);
+ }
+ };
+
+ // src/validators/BooleanValidator.ts
+ var BooleanValidator = class extends BaseValidator {
+ get true() {
+ return this.addConstraint(booleanTrue);
+ }
+ get false() {
+ return this.addConstraint(booleanFalse);
+ }
+ equal(value) {
+ return value ? this.true : this.false;
+ }
+ notEqual(value) {
+ return value ? this.false : this.true;
+ }
+ handle(value) {
+ return typeof value === "boolean" ? Result.ok(value) : Result.err(new ValidationError("s.boolean", "Expected a boolean primitive", value));
+ }
+ };
+ __name(BooleanValidator, "BooleanValidator");
+
+ // src/constraints/DateConstraints.ts
+ function dateComparator(comparator, name, expected, number) {
+ return {
+ run(input) {
+ return comparator(input.getTime(), number) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid Date value", input, expected));
+ }
+ };
+ }
+ __name(dateComparator, "dateComparator");
+ function dateLessThan(value) {
+ const expected = `expected < ${value.toISOString()}`;
+ return dateComparator(lessThan, "s.date.lessThan", expected, value.getTime());
+ }
+ __name(dateLessThan, "dateLessThan");
+ function dateLessThanOrEqual(value) {
+ const expected = `expected <= ${value.toISOString()}`;
+ return dateComparator(lessThanOrEqual, "s.date.lessThanOrEqual", expected, value.getTime());
+ }
+ __name(dateLessThanOrEqual, "dateLessThanOrEqual");
+ function dateGreaterThan(value) {
+ const expected = `expected > ${value.toISOString()}`;
+ return dateComparator(greaterThan, "s.date.greaterThan", expected, value.getTime());
+ }
+ __name(dateGreaterThan, "dateGreaterThan");
+ function dateGreaterThanOrEqual(value) {
+ const expected = `expected >= ${value.toISOString()}`;
+ return dateComparator(greaterThanOrEqual, "s.date.greaterThanOrEqual", expected, value.getTime());
+ }
+ __name(dateGreaterThanOrEqual, "dateGreaterThanOrEqual");
+ function dateEqual(value) {
+ const expected = `expected === ${value.toISOString()}`;
+ return dateComparator(equal, "s.date.equal", expected, value.getTime());
+ }
+ __name(dateEqual, "dateEqual");
+ function dateNotEqual(value) {
+ const expected = `expected !== ${value.toISOString()}`;
+ return dateComparator(notEqual, "s.date.notEqual", expected, value.getTime());
+ }
+ __name(dateNotEqual, "dateNotEqual");
+ var dateInvalid = {
+ run(input) {
+ return Number.isNaN(input.getTime()) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.date.invalid", "Invalid Date value", input, "expected === NaN"));
+ }
+ };
+ var dateValid = {
+ run(input) {
+ return Number.isNaN(input.getTime()) ? Result.err(new ExpectedConstraintError("s.date.valid", "Invalid Date value", input, "expected !== NaN")) : Result.ok(input);
+ }
+ };
+
+ // src/validators/DateValidator.ts
+ var DateValidator = class extends BaseValidator {
+ lessThan(date) {
+ return this.addConstraint(dateLessThan(new Date(date)));
+ }
+ lessThanOrEqual(date) {
+ return this.addConstraint(dateLessThanOrEqual(new Date(date)));
+ }
+ greaterThan(date) {
+ return this.addConstraint(dateGreaterThan(new Date(date)));
+ }
+ greaterThanOrEqual(date) {
+ return this.addConstraint(dateGreaterThanOrEqual(new Date(date)));
+ }
+ equal(date) {
+ const resolved = new Date(date);
+ return Number.isNaN(resolved.getTime()) ? this.invalid : this.addConstraint(dateEqual(resolved));
+ }
+ notEqual(date) {
+ const resolved = new Date(date);
+ return Number.isNaN(resolved.getTime()) ? this.valid : this.addConstraint(dateNotEqual(resolved));
+ }
+ get valid() {
+ return this.addConstraint(dateValid);
+ }
+ get invalid() {
+ return this.addConstraint(dateInvalid);
+ }
+ handle(value) {
+ return value instanceof Date ? Result.ok(value) : Result.err(new ValidationError("s.date", "Expected a Date", value));
+ }
+ };
+ __name(DateValidator, "DateValidator");
+
+ // src/lib/errors/ExpectedValidationError.ts
+ var ExpectedValidationError = class extends ValidationError {
+ constructor(validator, message, given, expected) {
+ super(validator, message, given);
+ this.expected = expected;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ validator: this.validator,
+ given: this.given,
+ expected: this.expected
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const validator = options.stylize(this.validator, "string");
+ if (depth < 0) {
+ return options.stylize(`[ExpectedValidationError: ${validator}]`, "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1 };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const expected = inspect2(this.expected, newOptions).replace(/\n/g, padding);
+ const given = inspect2(this.given, newOptions).replace(/\n/g, padding);
+ const header = `${options.stylize("ExpectedValidationError", "special")} > ${validator}`;
+ const message = options.stylize(this.message, "regexp");
+ const expectedBlock = `
+ ${options.stylize("Expected:", "string")}${padding}${expected}`;
+ const givenBlock = `
+ ${options.stylize("Received:", "regexp")}${padding}${given}`;
+ return `${header}
+ ${message}
+${expectedBlock}
+${givenBlock}`;
+ }
+ };
+ __name(ExpectedValidationError, "ExpectedValidationError");
+
+ // src/validators/InstanceValidator.ts
+ var InstanceValidator = class extends BaseValidator {
+ constructor(expected, constraints = []) {
+ super(constraints);
+ this.expected = expected;
+ }
+ handle(value) {
+ return value instanceof this.expected ? Result.ok(value) : Result.err(new ExpectedValidationError("s.instance(V)", "Expected", value, this.expected));
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.expected, this.constraints]);
+ }
+ };
+ __name(InstanceValidator, "InstanceValidator");
+
+ // src/validators/LiteralValidator.ts
+ var LiteralValidator = class extends BaseValidator {
+ constructor(literal, constraints = []) {
+ super(constraints);
+ this.expected = literal;
+ }
+ handle(value) {
+ return Object.is(value, this.expected) ? Result.ok(value) : Result.err(new ExpectedValidationError("s.literal(V)", "Expected values to be equals", value, this.expected));
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.expected, this.constraints]);
+ }
+ };
+ __name(LiteralValidator, "LiteralValidator");
+
+ // src/validators/NeverValidator.ts
+ var NeverValidator = class extends BaseValidator {
+ handle(value) {
+ return Result.err(new ValidationError("s.never", "Expected a value to not be passed", value));
+ }
+ };
+ __name(NeverValidator, "NeverValidator");
+
+ // src/validators/NullishValidator.ts
+ var NullishValidator = class extends BaseValidator {
+ handle(value) {
+ return value === void 0 || value === null ? Result.ok(value) : Result.err(new ValidationError("s.nullish", "Expected undefined or null", value));
+ }
+ };
+ __name(NullishValidator, "NullishValidator");
+
+ // src/constraints/NumberConstraints.ts
+ function numberComparator(comparator, name, expected, number) {
+ return {
+ run(input) {
+ return comparator(input, number) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid number value", input, expected));
+ }
+ };
+ }
+ __name(numberComparator, "numberComparator");
+ function numberLessThan(value) {
+ const expected = `expected < ${value}`;
+ return numberComparator(lessThan, "s.number.lessThan", expected, value);
+ }
+ __name(numberLessThan, "numberLessThan");
+ function numberLessThanOrEqual(value) {
+ const expected = `expected <= ${value}`;
+ return numberComparator(lessThanOrEqual, "s.number.lessThanOrEqual", expected, value);
+ }
+ __name(numberLessThanOrEqual, "numberLessThanOrEqual");
+ function numberGreaterThan(value) {
+ const expected = `expected > ${value}`;
+ return numberComparator(greaterThan, "s.number.greaterThan", expected, value);
+ }
+ __name(numberGreaterThan, "numberGreaterThan");
+ function numberGreaterThanOrEqual(value) {
+ const expected = `expected >= ${value}`;
+ return numberComparator(greaterThanOrEqual, "s.number.greaterThanOrEqual", expected, value);
+ }
+ __name(numberGreaterThanOrEqual, "numberGreaterThanOrEqual");
+ function numberEqual(value) {
+ const expected = `expected === ${value}`;
+ return numberComparator(equal, "s.number.equal", expected, value);
+ }
+ __name(numberEqual, "numberEqual");
+ function numberNotEqual(value) {
+ const expected = `expected !== ${value}`;
+ return numberComparator(notEqual, "s.number.notEqual", expected, value);
+ }
+ __name(numberNotEqual, "numberNotEqual");
+ var numberInt = {
+ run(input) {
+ return Number.isInteger(input) ? Result.ok(input) : Result.err(
+ new ExpectedConstraintError("s.number.int", "Given value is not an integer", input, "Number.isInteger(expected) to be true")
+ );
+ }
+ };
+ var numberSafeInt = {
+ run(input) {
+ return Number.isSafeInteger(input) ? Result.ok(input) : Result.err(
+ new ExpectedConstraintError(
+ "s.number.safeInt",
+ "Given value is not a safe integer",
+ input,
+ "Number.isSafeInteger(expected) to be true"
+ )
+ );
+ }
+ };
+ var numberFinite = {
+ run(input) {
+ return Number.isFinite(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.number.finite", "Given value is not finite", input, "Number.isFinite(expected) to be true"));
+ }
+ };
+ var numberNaN = {
+ run(input) {
+ return Number.isNaN(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.number.equal(NaN)", "Invalid number value", input, "expected === NaN"));
+ }
+ };
+ var numberNotNaN = {
+ run(input) {
+ return Number.isNaN(input) ? Result.err(new ExpectedConstraintError("s.number.notEqual(NaN)", "Invalid number value", input, "expected !== NaN")) : Result.ok(input);
+ }
+ };
+ function numberDivisibleBy(divider) {
+ const expected = `expected % ${divider} === 0`;
+ return {
+ run(input) {
+ return input % divider === 0 ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.number.divisibleBy", "Number is not divisible", input, expected));
+ }
+ };
+ }
+ __name(numberDivisibleBy, "numberDivisibleBy");
+
+ // src/validators/NumberValidator.ts
+ var NumberValidator = class extends BaseValidator {
+ lessThan(number) {
+ return this.addConstraint(numberLessThan(number));
+ }
+ lessThanOrEqual(number) {
+ return this.addConstraint(numberLessThanOrEqual(number));
+ }
+ greaterThan(number) {
+ return this.addConstraint(numberGreaterThan(number));
+ }
+ greaterThanOrEqual(number) {
+ return this.addConstraint(numberGreaterThanOrEqual(number));
+ }
+ equal(number) {
+ return Number.isNaN(number) ? this.addConstraint(numberNaN) : this.addConstraint(numberEqual(number));
+ }
+ notEqual(number) {
+ return Number.isNaN(number) ? this.addConstraint(numberNotNaN) : this.addConstraint(numberNotEqual(number));
+ }
+ get int() {
+ return this.addConstraint(numberInt);
+ }
+ get safeInt() {
+ return this.addConstraint(numberSafeInt);
+ }
+ get finite() {
+ return this.addConstraint(numberFinite);
+ }
+ get positive() {
+ return this.greaterThanOrEqual(0);
+ }
+ get negative() {
+ return this.lessThan(0);
+ }
+ divisibleBy(divider) {
+ return this.addConstraint(numberDivisibleBy(divider));
+ }
+ get abs() {
+ return this.transform(Math.abs);
+ }
+ get sign() {
+ return this.transform(Math.sign);
+ }
+ get trunc() {
+ return this.transform(Math.trunc);
+ }
+ get floor() {
+ return this.transform(Math.floor);
+ }
+ get fround() {
+ return this.transform(Math.fround);
+ }
+ get round() {
+ return this.transform(Math.round);
+ }
+ get ceil() {
+ return this.transform(Math.ceil);
+ }
+ handle(value) {
+ return typeof value === "number" ? Result.ok(value) : Result.err(new ValidationError("s.number", "Expected a number primitive", value));
+ }
+ };
+ __name(NumberValidator, "NumberValidator");
+
+ // src/lib/errors/MissingPropertyError.ts
+ var MissingPropertyError = class extends BaseError {
+ constructor(property) {
+ super("A required property is missing");
+ this.property = property;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ property: this.property
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const property = options.stylize(this.property.toString(), "string");
+ if (depth < 0) {
+ return options.stylize(`[MissingPropertyError: ${property}]`, "special");
+ }
+ const header = `${options.stylize("MissingPropertyError", "special")} > ${property}`;
+ const message = options.stylize(this.message, "regexp");
+ return `${header}
+ ${message}`;
+ }
+ };
+ __name(MissingPropertyError, "MissingPropertyError");
+
+ // src/lib/errors/UnknownPropertyError.ts
+ var UnknownPropertyError = class extends BaseError {
+ constructor(property, value) {
+ super("Received unexpected property");
+ this.property = property;
+ this.value = value;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ property: this.property,
+ value: this.value
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const property = options.stylize(this.property.toString(), "string");
+ if (depth < 0) {
+ return options.stylize(`[UnknownPropertyError: ${property}]`, "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1, compact: true };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const given = inspect2(this.value, newOptions).replace(/\n/g, padding);
+ const header = `${options.stylize("UnknownPropertyError", "special")} > ${property}`;
+ const message = options.stylize(this.message, "regexp");
+ const givenBlock = `
+ ${options.stylize("Received:", "regexp")}${padding}${given}`;
+ return `${header}
+ ${message}
+${givenBlock}`;
+ }
+ };
+ __name(UnknownPropertyError, "UnknownPropertyError");
+
+ // src/validators/DefaultValidator.ts
+ var DefaultValidator = class extends BaseValidator {
+ constructor(validator, value, constraints = []) {
+ super(constraints);
+ this.validator = validator;
+ this.defaultValue = value;
+ }
+ default(value) {
+ const clone = this.clone();
+ clone.defaultValue = value;
+ return clone;
+ }
+ handle(value) {
+ return typeof value === "undefined" ? Result.ok(getValue(this.defaultValue)) : this.validator["handle"](value);
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validator, this.defaultValue, this.constraints]);
+ }
+ };
+ __name(DefaultValidator, "DefaultValidator");
+
+ // src/lib/errors/CombinedError.ts
+ var CombinedError = class extends BaseError {
+ constructor(errors) {
+ super("Received one or more errors");
+ this.errors = errors;
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ if (depth < 0) {
+ return options.stylize("[CombinedError]", "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1, compact: true };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const header = `${options.stylize("CombinedError", "special")} (${options.stylize(this.errors.length.toString(), "number")})`;
+ const message = options.stylize(this.message, "regexp");
+ const errors = this.errors.map((error, i3) => {
+ const index = options.stylize((i3 + 1).toString(), "number");
+ const body = error[customInspectSymbolStackLess](depth - 1, newOptions).replace(/\n/g, padding);
+ return ` ${index} ${body}`;
+ }).join("\n\n");
+ return `${header}
+ ${message}
+
+${errors}`;
+ }
+ };
+ __name(CombinedError, "CombinedError");
+
+ // src/validators/UnionValidator.ts
+ var UnionValidator = class extends BaseValidator {
+ constructor(validators, constraints = []) {
+ super(constraints);
+ this.validators = validators;
+ }
+ get optional() {
+ if (this.validators.length === 0)
+ return new UnionValidator([new LiteralValidator(void 0)], this.constraints);
+ const [validator] = this.validators;
+ if (validator instanceof LiteralValidator) {
+ if (validator.expected === void 0)
+ return this.clone();
+ if (validator.expected === null) {
+ return new UnionValidator(
+ [new NullishValidator(), ...this.validators.slice(1)],
+ this.constraints
+ );
+ }
+ } else if (validator instanceof NullishValidator) {
+ return this.clone();
+ }
+ return new UnionValidator([new LiteralValidator(void 0), ...this.validators]);
+ }
+ get required() {
+ if (this.validators.length === 0)
+ return this.clone();
+ const [validator] = this.validators;
+ if (validator instanceof LiteralValidator) {
+ if (validator.expected === void 0)
+ return new UnionValidator(this.validators.slice(1), this.constraints);
+ } else if (validator instanceof NullishValidator) {
+ return new UnionValidator([new LiteralValidator(null), ...this.validators.slice(1)], this.constraints);
+ }
+ return this.clone();
+ }
+ get nullable() {
+ if (this.validators.length === 0)
+ return new UnionValidator([new LiteralValidator(null)], this.constraints);
+ const [validator] = this.validators;
+ if (validator instanceof LiteralValidator) {
+ if (validator.expected === null)
+ return this.clone();
+ if (validator.expected === void 0) {
+ return new UnionValidator(
+ [new NullishValidator(), ...this.validators.slice(1)],
+ this.constraints
+ );
+ }
+ } else if (validator instanceof NullishValidator) {
+ return this.clone();
+ }
+ return new UnionValidator([new LiteralValidator(null), ...this.validators]);
+ }
+ get nullish() {
+ if (this.validators.length === 0)
+ return new UnionValidator([new NullishValidator()], this.constraints);
+ const [validator] = this.validators;
+ if (validator instanceof LiteralValidator) {
+ if (validator.expected === null || validator.expected === void 0) {
+ return new UnionValidator([new NullishValidator(), ...this.validators.slice(1)], this.constraints);
+ }
+ } else if (validator instanceof NullishValidator) {
+ return this.clone();
+ }
+ return new UnionValidator([new NullishValidator(), ...this.validators]);
+ }
+ or(...predicates) {
+ return new UnionValidator([...this.validators, ...predicates]);
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validators, this.constraints]);
+ }
+ handle(value) {
+ const errors = [];
+ for (const validator of this.validators) {
+ const result = validator.run(value);
+ if (result.isOk())
+ return result;
+ errors.push(result.error);
+ }
+ return Result.err(new CombinedError(errors));
+ }
+ };
+ __name(UnionValidator, "UnionValidator");
+
+ // src/validators/ObjectValidator.ts
+ var ObjectValidator = class extends BaseValidator {
+ constructor(shape, strategy = 0 /* Ignore */, constraints = []) {
+ super(constraints);
+ this.keys = [];
+ this.requiredKeys = /* @__PURE__ */ new Map();
+ this.possiblyUndefinedKeys = /* @__PURE__ */ new Map();
+ this.possiblyUndefinedKeysWithDefaults = /* @__PURE__ */ new Map();
+ this.shape = shape;
+ this.strategy = strategy;
+ switch (this.strategy) {
+ case 0 /* Ignore */:
+ this.handleStrategy = (value) => this.handleIgnoreStrategy(value);
+ break;
+ case 1 /* Strict */: {
+ this.handleStrategy = (value) => this.handleStrictStrategy(value);
+ break;
+ }
+ case 2 /* Passthrough */:
+ this.handleStrategy = (value) => this.handlePassthroughStrategy(value);
+ break;
+ }
+ const shapeEntries = Object.entries(shape);
+ this.keys = shapeEntries.map(([key]) => key);
+ for (const [key, validator] of shapeEntries) {
+ if (validator instanceof UnionValidator) {
+ const [possiblyLiteralOrNullishPredicate] = validator["validators"];
+ if (possiblyLiteralOrNullishPredicate instanceof NullishValidator) {
+ this.possiblyUndefinedKeys.set(key, validator);
+ } else if (possiblyLiteralOrNullishPredicate instanceof LiteralValidator) {
+ if (possiblyLiteralOrNullishPredicate.expected === void 0) {
+ this.possiblyUndefinedKeys.set(key, validator);
+ } else {
+ this.requiredKeys.set(key, validator);
+ }
+ } else if (validator instanceof DefaultValidator) {
+ this.possiblyUndefinedKeysWithDefaults.set(key, validator);
+ } else {
+ this.requiredKeys.set(key, validator);
+ }
+ } else if (validator instanceof NullishValidator) {
+ this.possiblyUndefinedKeys.set(key, validator);
+ } else if (validator instanceof LiteralValidator) {
+ if (validator.expected === void 0) {
+ this.possiblyUndefinedKeys.set(key, validator);
+ } else {
+ this.requiredKeys.set(key, validator);
+ }
+ } else if (validator instanceof DefaultValidator) {
+ this.possiblyUndefinedKeysWithDefaults.set(key, validator);
+ } else {
+ this.requiredKeys.set(key, validator);
+ }
+ }
+ }
+ get strict() {
+ return Reflect.construct(this.constructor, [this.shape, 1 /* Strict */, this.constraints]);
+ }
+ get ignore() {
+ return Reflect.construct(this.constructor, [this.shape, 0 /* Ignore */, this.constraints]);
+ }
+ get passthrough() {
+ return Reflect.construct(this.constructor, [this.shape, 2 /* Passthrough */, this.constraints]);
+ }
+ get partial() {
+ const shape = Object.fromEntries(this.keys.map((key) => [key, this.shape[key].optional]));
+ return Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);
+ }
+ get required() {
+ const shape = Object.fromEntries(
+ this.keys.map((key) => {
+ let validator = this.shape[key];
+ if (validator instanceof UnionValidator)
+ validator = validator.required;
+ return [key, validator];
+ })
+ );
+ return Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);
+ }
+ extend(schema) {
+ const shape = { ...this.shape, ...schema instanceof ObjectValidator ? schema.shape : schema };
+ return Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);
+ }
+ pick(keys) {
+ const shape = Object.fromEntries(
+ keys.filter((key) => this.keys.includes(key)).map((key) => [key, this.shape[key]])
+ );
+ return Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);
+ }
+ omit(keys) {
+ const shape = Object.fromEntries(
+ this.keys.filter((key) => !keys.includes(key)).map((key) => [key, this.shape[key]])
+ );
+ return Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);
+ }
+ handle(value) {
+ const typeOfValue = typeof value;
+ if (typeOfValue !== "object") {
+ return Result.err(new ValidationError("s.object(T)", `Expected the value to be an object, but received ${typeOfValue} instead`, value));
+ }
+ if (value === null) {
+ return Result.err(new ValidationError("s.object(T)", "Expected the value to not be null", value));
+ }
+ if (Array.isArray(value)) {
+ return Result.err(new ValidationError("s.object(T)", "Expected the value to not be an array", value));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(value);
+ }
+ for (const predicate of Object.values(this.shape)) {
+ predicate.setParent(this.parent ?? value);
+ }
+ return this.handleStrategy(value);
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.shape, this.strategy, this.constraints]);
+ }
+ handleIgnoreStrategy(value) {
+ const errors = [];
+ const finalObject = {};
+ const inputEntries = new Map(Object.entries(value));
+ const runPredicate = /* @__PURE__ */ __name((key, predicate) => {
+ const result = predicate.run(value[key]);
+ if (result.isOk()) {
+ finalObject[key] = result.value;
+ } else {
+ const error = result.error;
+ errors.push([key, error]);
+ }
+ }, "runPredicate");
+ for (const [key, predicate] of this.requiredKeys) {
+ if (inputEntries.delete(key)) {
+ runPredicate(key, predicate);
+ } else {
+ errors.push([key, new MissingPropertyError(key)]);
+ }
+ }
+ for (const [key, validator] of this.possiblyUndefinedKeysWithDefaults) {
+ inputEntries.delete(key);
+ runPredicate(key, validator);
+ }
+ if (inputEntries.size === 0) {
+ return errors.length === 0 ? Result.ok(finalObject) : Result.err(new CombinedPropertyError(errors));
+ }
+ const checkInputEntriesInsteadOfSchemaKeys = this.possiblyUndefinedKeys.size > inputEntries.size;
+ if (checkInputEntriesInsteadOfSchemaKeys) {
+ for (const [key] of inputEntries) {
+ const predicate = this.possiblyUndefinedKeys.get(key);
+ if (predicate) {
+ runPredicate(key, predicate);
+ }
+ }
+ } else {
+ for (const [key, predicate] of this.possiblyUndefinedKeys) {
+ if (inputEntries.delete(key)) {
+ runPredicate(key, predicate);
+ }
+ }
+ }
+ return errors.length === 0 ? Result.ok(finalObject) : Result.err(new CombinedPropertyError(errors));
+ }
+ handleStrictStrategy(value) {
+ const errors = [];
+ const finalResult = {};
+ const inputEntries = new Map(Object.entries(value));
+ const runPredicate = /* @__PURE__ */ __name((key, predicate) => {
+ const result = predicate.run(value[key]);
+ if (result.isOk()) {
+ finalResult[key] = result.value;
+ } else {
+ const error = result.error;
+ errors.push([key, error]);
+ }
+ }, "runPredicate");
+ for (const [key, predicate] of this.requiredKeys) {
+ if (inputEntries.delete(key)) {
+ runPredicate(key, predicate);
+ } else {
+ errors.push([key, new MissingPropertyError(key)]);
+ }
+ }
+ for (const [key, validator] of this.possiblyUndefinedKeysWithDefaults) {
+ inputEntries.delete(key);
+ runPredicate(key, validator);
+ }
+ for (const [key, predicate] of this.possiblyUndefinedKeys) {
+ if (inputEntries.size === 0) {
+ break;
+ }
+ if (inputEntries.delete(key)) {
+ runPredicate(key, predicate);
+ }
+ }
+ if (inputEntries.size !== 0) {
+ for (const [key, value2] of inputEntries.entries()) {
+ errors.push([key, new UnknownPropertyError(key, value2)]);
+ }
+ }
+ return errors.length === 0 ? Result.ok(finalResult) : Result.err(new CombinedPropertyError(errors));
+ }
+ handlePassthroughStrategy(value) {
+ const result = this.handleIgnoreStrategy(value);
+ return result.isErr() ? result : Result.ok({ ...value, ...result.value });
+ }
+ };
+ __name(ObjectValidator, "ObjectValidator");
+
+ // src/validators/PassthroughValidator.ts
+ var PassthroughValidator = class extends BaseValidator {
+ handle(value) {
+ return Result.ok(value);
+ }
+ };
+ __name(PassthroughValidator, "PassthroughValidator");
+
+ // src/validators/RecordValidator.ts
+ var RecordValidator = class extends BaseValidator {
+ constructor(validator, constraints = []) {
+ super(constraints);
+ this.validator = validator;
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validator, this.constraints]);
+ }
+ handle(value) {
+ if (typeof value !== "object") {
+ return Result.err(new ValidationError("s.record(T)", "Expected an object", value));
+ }
+ if (value === null) {
+ return Result.err(new ValidationError("s.record(T)", "Expected the value to not be null", value));
+ }
+ if (Array.isArray(value)) {
+ return Result.err(new ValidationError("s.record(T)", "Expected the value to not be an array", value));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(value);
+ }
+ const errors = [];
+ const transformed = {};
+ for (const [key, val] of Object.entries(value)) {
+ const result = this.validator.run(val);
+ if (result.isOk())
+ transformed[key] = result.value;
+ else
+ errors.push([key, result.error]);
+ }
+ return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedPropertyError(errors));
+ }
+ };
+ __name(RecordValidator, "RecordValidator");
+
+ // src/validators/SetValidator.ts
+ var SetValidator = class extends BaseValidator {
+ constructor(validator, constraints = []) {
+ super(constraints);
+ this.validator = validator;
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validator, this.constraints]);
+ }
+ handle(values) {
+ if (!(values instanceof Set)) {
+ return Result.err(new ValidationError("s.set(T)", "Expected a set", values));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(values);
+ }
+ const errors = [];
+ const transformed = /* @__PURE__ */ new Set();
+ for (const value of values) {
+ const result = this.validator.run(value);
+ if (result.isOk())
+ transformed.add(result.value);
+ else
+ errors.push(result.error);
+ }
+ return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedError(errors));
+ }
+ };
+ __name(SetValidator, "SetValidator");
+
+ // src/constraints/util/emailValidator.ts
+ var accountRegex = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")$/;
+ function validateEmail(email) {
+ if (!email)
+ return false;
+ const atIndex = email.indexOf("@");
+ if (atIndex === -1)
+ return false;
+ if (atIndex > 64)
+ return false;
+ const domainIndex = atIndex + 1;
+ if (email.includes("@", domainIndex))
+ return false;
+ if (email.length - domainIndex > 255)
+ return false;
+ let dotIndex = email.indexOf(".", domainIndex);
+ if (dotIndex === -1)
+ return false;
+ let lastDotIndex = domainIndex;
+ do {
+ if (dotIndex - lastDotIndex > 63)
+ return false;
+ lastDotIndex = dotIndex + 1;
+ } while ((dotIndex = email.indexOf(".", lastDotIndex)) !== -1);
+ if (email.length - lastDotIndex > 63)
+ return false;
+ return accountRegex.test(email.slice(0, atIndex)) && validateEmailDomain(email.slice(domainIndex));
+ }
+ __name(validateEmail, "validateEmail");
+ function validateEmailDomain(domain) {
+ try {
+ return new URL(`http://${domain}`).hostname === domain;
+ } catch {
+ return false;
+ }
+ }
+ __name(validateEmailDomain, "validateEmailDomain");
+
+ // src/constraints/util/net.ts
+ var v4Seg = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])";
+ var v4Str = `(${v4Seg}[.]){3}${v4Seg}`;
+ var IPv4Reg = new RegExp(`^${v4Str}$`);
+ var v6Seg = "(?:[0-9a-fA-F]{1,4})";
+ var IPv6Reg = new RegExp(
+ `^((?:${v6Seg}:){7}(?:${v6Seg}|:)|(?:${v6Seg}:){6}(?:${v4Str}|:${v6Seg}|:)|(?:${v6Seg}:){5}(?::${v4Str}|(:${v6Seg}){1,2}|:)|(?:${v6Seg}:){4}(?:(:${v6Seg}){0,1}:${v4Str}|(:${v6Seg}){1,3}|:)|(?:${v6Seg}:){3}(?:(:${v6Seg}){0,2}:${v4Str}|(:${v6Seg}){1,4}|:)|(?:${v6Seg}:){2}(?:(:${v6Seg}){0,3}:${v4Str}|(:${v6Seg}){1,5}|:)|(?:${v6Seg}:){1}(?:(:${v6Seg}){0,4}:${v4Str}|(:${v6Seg}){1,6}|:)|(?::((?::${v6Seg}){0,5}:${v4Str}|(?::${v6Seg}){1,7}|:)))(%[0-9a-zA-Z-.:]{1,})?$`
+ );
+ function isIPv4(s4) {
+ return IPv4Reg.test(s4);
+ }
+ __name(isIPv4, "isIPv4");
+ function isIPv6(s4) {
+ return IPv6Reg.test(s4);
+ }
+ __name(isIPv6, "isIPv6");
+ function isIP(s4) {
+ if (isIPv4(s4))
+ return 4;
+ if (isIPv6(s4))
+ return 6;
+ return 0;
+ }
+ __name(isIP, "isIP");
+
+ // src/constraints/util/phoneValidator.ts
+ var phoneNumberRegex = /^((?:\+|0{0,2})\d{1,2}\s?)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$/;
+ function validatePhoneNumber(input) {
+ return phoneNumberRegex.test(input);
+ }
+ __name(validatePhoneNumber, "validatePhoneNumber");
+
+ // src/lib/errors/MultiplePossibilitiesConstraintError.ts
+ var MultiplePossibilitiesConstraintError = class extends BaseConstraintError {
+ constructor(constraint, message, given, expected) {
+ super(constraint, message, given);
+ this.expected = expected;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ constraint: this.constraint,
+ given: this.given,
+ expected: this.expected
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const constraint = options.stylize(this.constraint, "string");
+ if (depth < 0) {
+ return options.stylize(`[MultiplePossibilitiesConstraintError: ${constraint}]`, "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1 };
+ const verticalLine = options.stylize("|", "undefined");
+ const padding = `
+ ${verticalLine} `;
+ const given = inspect2(this.given, newOptions).replace(/\n/g, padding);
+ const header = `${options.stylize("MultiplePossibilitiesConstraintError", "special")} > ${constraint}`;
+ const message = options.stylize(this.message, "regexp");
+ const expectedPadding = `
+ ${verticalLine} - `;
+ const expectedBlock = `
+ ${options.stylize("Expected any of the following:", "string")}${expectedPadding}${this.expected.map((possible) => options.stylize(possible, "boolean")).join(expectedPadding)}`;
+ const givenBlock = `
+ ${options.stylize("Received:", "regexp")}${padding}${given}`;
+ return `${header}
+ ${message}
+${expectedBlock}
+${givenBlock}`;
+ }
+ };
+ __name(MultiplePossibilitiesConstraintError, "MultiplePossibilitiesConstraintError");
+
+ // src/constraints/util/common/combinedResultFn.ts
+ function combinedErrorFn(...fns) {
+ switch (fns.length) {
+ case 0:
+ return () => null;
+ case 1:
+ return fns[0];
+ case 2: {
+ const [fn0, fn1] = fns;
+ return (...params) => fn0(...params) || fn1(...params);
+ }
+ default: {
+ return (...params) => {
+ for (const fn of fns) {
+ const result = fn(...params);
+ if (result)
+ return result;
+ }
+ return null;
+ };
+ }
+ }
+ }
+ __name(combinedErrorFn, "combinedErrorFn");
+
+ // src/constraints/util/urlValidators.ts
+ function createUrlValidators(options) {
+ const fns = [];
+ if (options?.allowedProtocols?.length)
+ fns.push(allowedProtocolsFn(options.allowedProtocols));
+ if (options?.allowedDomains?.length)
+ fns.push(allowedDomainsFn(options.allowedDomains));
+ return combinedErrorFn(...fns);
+ }
+ __name(createUrlValidators, "createUrlValidators");
+ function allowedProtocolsFn(allowedProtocols) {
+ return (input, url) => allowedProtocols.includes(url.protocol) ? null : new MultiplePossibilitiesConstraintError("s.string.url", "Invalid URL protocol", input, allowedProtocols);
+ }
+ __name(allowedProtocolsFn, "allowedProtocolsFn");
+ function allowedDomainsFn(allowedDomains) {
+ return (input, url) => allowedDomains.includes(url.hostname) ? null : new MultiplePossibilitiesConstraintError("s.string.url", "Invalid URL domain", input, allowedDomains);
+ }
+ __name(allowedDomainsFn, "allowedDomainsFn");
+
+ // src/constraints/StringConstraints.ts
+ function stringLengthComparator(comparator, name, expected, length) {
+ return {
+ run(input) {
+ return comparator(input.length, length) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid string length", input, expected));
+ }
+ };
+ }
+ __name(stringLengthComparator, "stringLengthComparator");
+ function stringLengthLessThan(length) {
+ const expected = `expected.length < ${length}`;
+ return stringLengthComparator(lessThan, "s.string.lengthLessThan", expected, length);
+ }
+ __name(stringLengthLessThan, "stringLengthLessThan");
+ function stringLengthLessThanOrEqual(length) {
+ const expected = `expected.length <= ${length}`;
+ return stringLengthComparator(lessThanOrEqual, "s.string.lengthLessThanOrEqual", expected, length);
+ }
+ __name(stringLengthLessThanOrEqual, "stringLengthLessThanOrEqual");
+ function stringLengthGreaterThan(length) {
+ const expected = `expected.length > ${length}`;
+ return stringLengthComparator(greaterThan, "s.string.lengthGreaterThan", expected, length);
+ }
+ __name(stringLengthGreaterThan, "stringLengthGreaterThan");
+ function stringLengthGreaterThanOrEqual(length) {
+ const expected = `expected.length >= ${length}`;
+ return stringLengthComparator(greaterThanOrEqual, "s.string.lengthGreaterThanOrEqual", expected, length);
+ }
+ __name(stringLengthGreaterThanOrEqual, "stringLengthGreaterThanOrEqual");
+ function stringLengthEqual(length) {
+ const expected = `expected.length === ${length}`;
+ return stringLengthComparator(equal, "s.string.lengthEqual", expected, length);
+ }
+ __name(stringLengthEqual, "stringLengthEqual");
+ function stringLengthNotEqual(length) {
+ const expected = `expected.length !== ${length}`;
+ return stringLengthComparator(notEqual, "s.string.lengthNotEqual", expected, length);
+ }
+ __name(stringLengthNotEqual, "stringLengthNotEqual");
+ function stringEmail() {
+ return {
+ run(input) {
+ return validateEmail(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.string.email", "Invalid email address", input, "expected to be an email address"));
+ }
+ };
+ }
+ __name(stringEmail, "stringEmail");
+ function stringRegexValidator(type, expected, regex) {
+ return {
+ run(input) {
+ return regex.test(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError(type, "Invalid string format", input, expected));
+ }
+ };
+ }
+ __name(stringRegexValidator, "stringRegexValidator");
+ function stringUrl(options) {
+ const validatorFn = createUrlValidators(options);
+ return {
+ run(input) {
+ let url;
+ try {
+ url = new URL(input);
+ } catch {
+ return Result.err(new ExpectedConstraintError("s.string.url", "Invalid URL", input, "expected to match a URL"));
+ }
+ const validatorFnResult = validatorFn(input, url);
+ if (validatorFnResult === null)
+ return Result.ok(input);
+ return Result.err(validatorFnResult);
+ }
+ };
+ }
+ __name(stringUrl, "stringUrl");
+ function stringIp(version) {
+ const ipVersion = version ? `v${version}` : "";
+ const validatorFn = version === 4 ? isIPv4 : version === 6 ? isIPv6 : isIP;
+ const name = `s.string.ip${ipVersion}`;
+ const message = `Invalid IP${ipVersion} address`;
+ const expected = `expected to be an IP${ipVersion} address`;
+ return {
+ run(input) {
+ return validatorFn(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, message, input, expected));
+ }
+ };
+ }
+ __name(stringIp, "stringIp");
+ function stringRegex(regex) {
+ return stringRegexValidator("s.string.regex", `expected ${regex}.test(expected) to be true`, regex);
+ }
+ __name(stringRegex, "stringRegex");
+ function stringUuid({ version = 4, nullable = false } = {}) {
+ version ?? (version = "1-5");
+ const regex = new RegExp(
+ `^(?:[0-9A-F]{8}-[0-9A-F]{4}-[${version}][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}${nullable ? "|00000000-0000-0000-0000-000000000000" : ""})$`,
+ "i"
+ );
+ const expected = `expected to match UUID${typeof version === "number" ? `v${version}` : ` in range of ${version}`}`;
+ return stringRegexValidator("s.string.uuid", expected, regex);
+ }
+ __name(stringUuid, "stringUuid");
+ function stringDate() {
+ return {
+ run(input) {
+ const time = Date.parse(input);
+ return Number.isNaN(time) ? Result.err(
+ new ExpectedConstraintError(
+ "s.string.date",
+ "Invalid date string",
+ input,
+ "expected to be a valid date string (in the ISO 8601 or ECMA-262 format)"
+ )
+ ) : Result.ok(input);
+ }
+ };
+ }
+ __name(stringDate, "stringDate");
+ function stringPhone() {
+ return {
+ run(input) {
+ return validatePhoneNumber(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.string.phone", "Invalid phone number", input, "expected to be a phone number"));
+ }
+ };
+ }
+ __name(stringPhone, "stringPhone");
+
+ // src/validators/StringValidator.ts
+ var StringValidator = class extends BaseValidator {
+ lengthLessThan(length) {
+ return this.addConstraint(stringLengthLessThan(length));
+ }
+ lengthLessThanOrEqual(length) {
+ return this.addConstraint(stringLengthLessThanOrEqual(length));
+ }
+ lengthGreaterThan(length) {
+ return this.addConstraint(stringLengthGreaterThan(length));
+ }
+ lengthGreaterThanOrEqual(length) {
+ return this.addConstraint(stringLengthGreaterThanOrEqual(length));
+ }
+ lengthEqual(length) {
+ return this.addConstraint(stringLengthEqual(length));
+ }
+ lengthNotEqual(length) {
+ return this.addConstraint(stringLengthNotEqual(length));
+ }
+ get email() {
+ return this.addConstraint(stringEmail());
+ }
+ url(options) {
+ return this.addConstraint(stringUrl(options));
+ }
+ uuid(options) {
+ return this.addConstraint(stringUuid(options));
+ }
+ regex(regex) {
+ return this.addConstraint(stringRegex(regex));
+ }
+ get date() {
+ return this.addConstraint(stringDate());
+ }
+ get ipv4() {
+ return this.ip(4);
+ }
+ get ipv6() {
+ return this.ip(6);
+ }
+ ip(version) {
+ return this.addConstraint(stringIp(version));
+ }
+ phone() {
+ return this.addConstraint(stringPhone());
+ }
+ handle(value) {
+ return typeof value === "string" ? Result.ok(value) : Result.err(new ValidationError("s.string", "Expected a string primitive", value));
+ }
+ };
+ __name(StringValidator, "StringValidator");
+
+ // src/validators/TupleValidator.ts
+ var TupleValidator = class extends BaseValidator {
+ constructor(validators, constraints = []) {
+ super(constraints);
+ this.validators = [];
+ this.validators = validators;
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validators, this.constraints]);
+ }
+ handle(values) {
+ if (!Array.isArray(values)) {
+ return Result.err(new ValidationError("s.tuple(T)", "Expected an array", values));
+ }
+ if (values.length !== this.validators.length) {
+ return Result.err(new ValidationError("s.tuple(T)", `Expected an array of length ${this.validators.length}`, values));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(values);
+ }
+ const errors = [];
+ const transformed = [];
+ for (let i3 = 0; i3 < values.length; i3++) {
+ const result = this.validators[i3].run(values[i3]);
+ if (result.isOk())
+ transformed.push(result.value);
+ else
+ errors.push([i3, result.error]);
+ }
+ return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedPropertyError(errors));
+ }
+ };
+ __name(TupleValidator, "TupleValidator");
+
+ // src/validators/MapValidator.ts
+ var MapValidator = class extends BaseValidator {
+ constructor(keyValidator, valueValidator, constraints = []) {
+ super(constraints);
+ this.keyValidator = keyValidator;
+ this.valueValidator = valueValidator;
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.keyValidator, this.valueValidator, this.constraints]);
+ }
+ handle(value) {
+ if (!(value instanceof Map)) {
+ return Result.err(new ValidationError("s.map(K, V)", "Expected a map", value));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(value);
+ }
+ const errors = [];
+ const transformed = /* @__PURE__ */ new Map();
+ for (const [key, val] of value.entries()) {
+ const keyResult = this.keyValidator.run(key);
+ const valueResult = this.valueValidator.run(val);
+ const { length } = errors;
+ if (keyResult.isErr())
+ errors.push([key, keyResult.error]);
+ if (valueResult.isErr())
+ errors.push([key, valueResult.error]);
+ if (errors.length === length)
+ transformed.set(keyResult.value, valueResult.value);
+ }
+ return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedPropertyError(errors));
+ }
+ };
+ __name(MapValidator, "MapValidator");
+
+ // src/validators/LazyValidator.ts
+ var LazyValidator = class extends BaseValidator {
+ constructor(validator, constraints = []) {
+ super(constraints);
+ this.validator = validator;
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validator, this.constraints]);
+ }
+ handle(values) {
+ return this.validator(values).run(values);
+ }
+ };
+ __name(LazyValidator, "LazyValidator");
+
+ // src/lib/errors/UnknownEnumValueError.ts
+ var UnknownEnumValueError = class extends BaseError {
+ constructor(value, keys, enumMappings) {
+ super("Expected the value to be one of the following enum values:");
+ this.value = value;
+ this.enumKeys = keys;
+ this.enumMappings = enumMappings;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ value: this.value,
+ enumKeys: this.enumKeys,
+ enumMappings: [...this.enumMappings.entries()]
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const value = options.stylize(this.value.toString(), "string");
+ if (depth < 0) {
+ return options.stylize(`[UnknownEnumValueError: ${value}]`, "special");
+ }
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const pairs = this.enumKeys.map((key) => {
+ const enumValue = this.enumMappings.get(key);
+ return `${options.stylize(key, "string")} or ${options.stylize(
+ enumValue.toString(),
+ typeof enumValue === "number" ? "number" : "string"
+ )}`;
+ }).join(padding);
+ const header = `${options.stylize("UnknownEnumValueError", "special")} > ${value}`;
+ const message = options.stylize(this.message, "regexp");
+ const pairsBlock = `${padding}${pairs}`;
+ return `${header}
+ ${message}
+${pairsBlock}`;
+ }
+ };
+ __name(UnknownEnumValueError, "UnknownEnumValueError");
+
+ // src/validators/NativeEnumValidator.ts
+ var NativeEnumValidator = class extends BaseValidator {
+ constructor(enumShape) {
+ super();
+ this.hasNumericElements = false;
+ this.enumMapping = /* @__PURE__ */ new Map();
+ this.enumShape = enumShape;
+ this.enumKeys = Object.keys(enumShape).filter((key) => {
+ return typeof enumShape[enumShape[key]] !== "number";
+ });
+ for (const key of this.enumKeys) {
+ const enumValue = enumShape[key];
+ this.enumMapping.set(key, enumValue);
+ this.enumMapping.set(enumValue, enumValue);
+ if (typeof enumValue === "number") {
+ this.hasNumericElements = true;
+ this.enumMapping.set(`${enumValue}`, enumValue);
+ }
+ }
+ }
+ handle(value) {
+ const typeOfValue = typeof value;
+ if (typeOfValue === "number") {
+ if (!this.hasNumericElements) {
+ return Result.err(new ValidationError("s.nativeEnum(T)", "Expected the value to be a string", value));
+ }
+ } else if (typeOfValue !== "string") {
+ return Result.err(new ValidationError("s.nativeEnum(T)", "Expected the value to be a string or number", value));
+ }
+ const casted = value;
+ const possibleEnumValue = this.enumMapping.get(casted);
+ return typeof possibleEnumValue === "undefined" ? Result.err(new UnknownEnumValueError(casted, this.enumKeys, this.enumMapping)) : Result.ok(possibleEnumValue);
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.enumShape]);
+ }
+ };
+ __name(NativeEnumValidator, "NativeEnumValidator");
+
+ // src/constraints/TypedArrayLengthConstraints.ts
+ function typedArrayByteLengthComparator(comparator, name, expected, length) {
+ return {
+ run(input) {
+ return comparator(input.byteLength, length) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid Typed Array byte length", input, expected));
+ }
+ };
+ }
+ __name(typedArrayByteLengthComparator, "typedArrayByteLengthComparator");
+ function typedArrayByteLengthLessThan(value) {
+ const expected = `expected.byteLength < ${value}`;
+ return typedArrayByteLengthComparator(lessThan, "s.typedArray(T).byteLengthLessThan", expected, value);
+ }
+ __name(typedArrayByteLengthLessThan, "typedArrayByteLengthLessThan");
+ function typedArrayByteLengthLessThanOrEqual(value) {
+ const expected = `expected.byteLength <= ${value}`;
+ return typedArrayByteLengthComparator(lessThanOrEqual, "s.typedArray(T).byteLengthLessThanOrEqual", expected, value);
+ }
+ __name(typedArrayByteLengthLessThanOrEqual, "typedArrayByteLengthLessThanOrEqual");
+ function typedArrayByteLengthGreaterThan(value) {
+ const expected = `expected.byteLength > ${value}`;
+ return typedArrayByteLengthComparator(greaterThan, "s.typedArray(T).byteLengthGreaterThan", expected, value);
+ }
+ __name(typedArrayByteLengthGreaterThan, "typedArrayByteLengthGreaterThan");
+ function typedArrayByteLengthGreaterThanOrEqual(value) {
+ const expected = `expected.byteLength >= ${value}`;
+ return typedArrayByteLengthComparator(greaterThanOrEqual, "s.typedArray(T).byteLengthGreaterThanOrEqual", expected, value);
+ }
+ __name(typedArrayByteLengthGreaterThanOrEqual, "typedArrayByteLengthGreaterThanOrEqual");
+ function typedArrayByteLengthEqual(value) {
+ const expected = `expected.byteLength === ${value}`;
+ return typedArrayByteLengthComparator(equal, "s.typedArray(T).byteLengthEqual", expected, value);
+ }
+ __name(typedArrayByteLengthEqual, "typedArrayByteLengthEqual");
+ function typedArrayByteLengthNotEqual(value) {
+ const expected = `expected.byteLength !== ${value}`;
+ return typedArrayByteLengthComparator(notEqual, "s.typedArray(T).byteLengthNotEqual", expected, value);
+ }
+ __name(typedArrayByteLengthNotEqual, "typedArrayByteLengthNotEqual");
+ function typedArrayByteLengthRange(start, endBefore) {
+ const expected = `expected.byteLength >= ${start} && expected.byteLength < ${endBefore}`;
+ return {
+ run(input) {
+ return input.byteLength >= start && input.byteLength < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).byteLengthRange", "Invalid Typed Array byte length", input, expected));
+ }
+ };
+ }
+ __name(typedArrayByteLengthRange, "typedArrayByteLengthRange");
+ function typedArrayByteLengthRangeInclusive(start, end) {
+ const expected = `expected.byteLength >= ${start} && expected.byteLength <= ${end}`;
+ return {
+ run(input) {
+ return input.byteLength >= start && input.byteLength <= end ? Result.ok(input) : Result.err(
+ new ExpectedConstraintError("s.typedArray(T).byteLengthRangeInclusive", "Invalid Typed Array byte length", input, expected)
+ );
+ }
+ };
+ }
+ __name(typedArrayByteLengthRangeInclusive, "typedArrayByteLengthRangeInclusive");
+ function typedArrayByteLengthRangeExclusive(startAfter, endBefore) {
+ const expected = `expected.byteLength > ${startAfter} && expected.byteLength < ${endBefore}`;
+ return {
+ run(input) {
+ return input.byteLength > startAfter && input.byteLength < endBefore ? Result.ok(input) : Result.err(
+ new ExpectedConstraintError("s.typedArray(T).byteLengthRangeExclusive", "Invalid Typed Array byte length", input, expected)
+ );
+ }
+ };
+ }
+ __name(typedArrayByteLengthRangeExclusive, "typedArrayByteLengthRangeExclusive");
+ function typedArrayLengthComparator(comparator, name, expected, length) {
+ return {
+ run(input) {
+ return comparator(input.length, length) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid Typed Array length", input, expected));
+ }
+ };
+ }
+ __name(typedArrayLengthComparator, "typedArrayLengthComparator");
+ function typedArrayLengthLessThan(value) {
+ const expected = `expected.length < ${value}`;
+ return typedArrayLengthComparator(lessThan, "s.typedArray(T).lengthLessThan", expected, value);
+ }
+ __name(typedArrayLengthLessThan, "typedArrayLengthLessThan");
+ function typedArrayLengthLessThanOrEqual(value) {
+ const expected = `expected.length <= ${value}`;
+ return typedArrayLengthComparator(lessThanOrEqual, "s.typedArray(T).lengthLessThanOrEqual", expected, value);
+ }
+ __name(typedArrayLengthLessThanOrEqual, "typedArrayLengthLessThanOrEqual");
+ function typedArrayLengthGreaterThan(value) {
+ const expected = `expected.length > ${value}`;
+ return typedArrayLengthComparator(greaterThan, "s.typedArray(T).lengthGreaterThan", expected, value);
+ }
+ __name(typedArrayLengthGreaterThan, "typedArrayLengthGreaterThan");
+ function typedArrayLengthGreaterThanOrEqual(value) {
+ const expected = `expected.length >= ${value}`;
+ return typedArrayLengthComparator(greaterThanOrEqual, "s.typedArray(T).lengthGreaterThanOrEqual", expected, value);
+ }
+ __name(typedArrayLengthGreaterThanOrEqual, "typedArrayLengthGreaterThanOrEqual");
+ function typedArrayLengthEqual(value) {
+ const expected = `expected.length === ${value}`;
+ return typedArrayLengthComparator(equal, "s.typedArray(T).lengthEqual", expected, value);
+ }
+ __name(typedArrayLengthEqual, "typedArrayLengthEqual");
+ function typedArrayLengthNotEqual(value) {
+ const expected = `expected.length !== ${value}`;
+ return typedArrayLengthComparator(notEqual, "s.typedArray(T).lengthNotEqual", expected, value);
+ }
+ __name(typedArrayLengthNotEqual, "typedArrayLengthNotEqual");
+ function typedArrayLengthRange(start, endBefore) {
+ const expected = `expected.length >= ${start} && expected.length < ${endBefore}`;
+ return {
+ run(input) {
+ return input.length >= start && input.length < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).lengthRange", "Invalid Typed Array length", input, expected));
+ }
+ };
+ }
+ __name(typedArrayLengthRange, "typedArrayLengthRange");
+ function typedArrayLengthRangeInclusive(start, end) {
+ const expected = `expected.length >= ${start} && expected.length <= ${end}`;
+ return {
+ run(input) {
+ return input.length >= start && input.length <= end ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).lengthRangeInclusive", "Invalid Typed Array length", input, expected));
+ }
+ };
+ }
+ __name(typedArrayLengthRangeInclusive, "typedArrayLengthRangeInclusive");
+ function typedArrayLengthRangeExclusive(startAfter, endBefore) {
+ const expected = `expected.length > ${startAfter} && expected.length < ${endBefore}`;
+ return {
+ run(input) {
+ return input.length > startAfter && input.length < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).lengthRangeExclusive", "Invalid Typed Array length", input, expected));
+ }
+ };
+ }
+ __name(typedArrayLengthRangeExclusive, "typedArrayLengthRangeExclusive");
+
+ // src/constraints/util/common/vowels.ts
+ var vowels = ["a", "e", "i", "o", "u"];
+ var aOrAn = /* @__PURE__ */ __name((word) => {
+ return `${vowels.includes(word[0].toLowerCase()) ? "an" : "a"} ${word}`;
+ }, "aOrAn");
+
+ // src/constraints/util/typedArray.ts
+ var TypedArrays = {
+ Int8Array: (x2) => x2 instanceof Int8Array,
+ Uint8Array: (x2) => x2 instanceof Uint8Array,
+ Uint8ClampedArray: (x2) => x2 instanceof Uint8ClampedArray,
+ Int16Array: (x2) => x2 instanceof Int16Array,
+ Uint16Array: (x2) => x2 instanceof Uint16Array,
+ Int32Array: (x2) => x2 instanceof Int32Array,
+ Uint32Array: (x2) => x2 instanceof Uint32Array,
+ Float32Array: (x2) => x2 instanceof Float32Array,
+ Float64Array: (x2) => x2 instanceof Float64Array,
+ BigInt64Array: (x2) => x2 instanceof BigInt64Array,
+ BigUint64Array: (x2) => x2 instanceof BigUint64Array,
+ TypedArray: (x2) => ArrayBuffer.isView(x2) && !(x2 instanceof DataView)
+ };
+
+ // src/validators/TypedArrayValidator.ts
+ var TypedArrayValidator = class extends BaseValidator {
+ constructor(type, constraints = []) {
+ super(constraints);
+ this.type = type;
+ }
+ byteLengthLessThan(length) {
+ return this.addConstraint(typedArrayByteLengthLessThan(length));
+ }
+ byteLengthLessThanOrEqual(length) {
+ return this.addConstraint(typedArrayByteLengthLessThanOrEqual(length));
+ }
+ byteLengthGreaterThan(length) {
+ return this.addConstraint(typedArrayByteLengthGreaterThan(length));
+ }
+ byteLengthGreaterThanOrEqual(length) {
+ return this.addConstraint(typedArrayByteLengthGreaterThanOrEqual(length));
+ }
+ byteLengthEqual(length) {
+ return this.addConstraint(typedArrayByteLengthEqual(length));
+ }
+ byteLengthNotEqual(length) {
+ return this.addConstraint(typedArrayByteLengthNotEqual(length));
+ }
+ byteLengthRange(start, endBefore) {
+ return this.addConstraint(typedArrayByteLengthRange(start, endBefore));
+ }
+ byteLengthRangeInclusive(startAt, endAt) {
+ return this.addConstraint(typedArrayByteLengthRangeInclusive(startAt, endAt));
+ }
+ byteLengthRangeExclusive(startAfter, endBefore) {
+ return this.addConstraint(typedArrayByteLengthRangeExclusive(startAfter, endBefore));
+ }
+ lengthLessThan(length) {
+ return this.addConstraint(typedArrayLengthLessThan(length));
+ }
+ lengthLessThanOrEqual(length) {
+ return this.addConstraint(typedArrayLengthLessThanOrEqual(length));
+ }
+ lengthGreaterThan(length) {
+ return this.addConstraint(typedArrayLengthGreaterThan(length));
+ }
+ lengthGreaterThanOrEqual(length) {
+ return this.addConstraint(typedArrayLengthGreaterThanOrEqual(length));
+ }
+ lengthEqual(length) {
+ return this.addConstraint(typedArrayLengthEqual(length));
+ }
+ lengthNotEqual(length) {
+ return this.addConstraint(typedArrayLengthNotEqual(length));
+ }
+ lengthRange(start, endBefore) {
+ return this.addConstraint(typedArrayLengthRange(start, endBefore));
+ }
+ lengthRangeInclusive(startAt, endAt) {
+ return this.addConstraint(typedArrayLengthRangeInclusive(startAt, endAt));
+ }
+ lengthRangeExclusive(startAfter, endBefore) {
+ return this.addConstraint(typedArrayLengthRangeExclusive(startAfter, endBefore));
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.type, this.constraints]);
+ }
+ handle(value) {
+ return TypedArrays[this.type](value) ? Result.ok(value) : Result.err(new ValidationError("s.typedArray", `Expected ${aOrAn(this.type)}`, value));
+ }
+ };
+ __name(TypedArrayValidator, "TypedArrayValidator");
+
+ // src/lib/Shapes.ts
+ var Shapes = class {
+ get string() {
+ return new StringValidator();
+ }
+ get number() {
+ return new NumberValidator();
+ }
+ get bigint() {
+ return new BigIntValidator();
+ }
+ get boolean() {
+ return new BooleanValidator();
+ }
+ get date() {
+ return new DateValidator();
+ }
+ object(shape) {
+ return new ObjectValidator(shape);
+ }
+ get undefined() {
+ return this.literal(void 0);
+ }
+ get null() {
+ return this.literal(null);
+ }
+ get nullish() {
+ return new NullishValidator();
+ }
+ get any() {
+ return new PassthroughValidator();
+ }
+ get unknown() {
+ return new PassthroughValidator();
+ }
+ get never() {
+ return new NeverValidator();
+ }
+ enum(...values) {
+ return this.union(...values.map((value) => this.literal(value)));
+ }
+ nativeEnum(enumShape) {
+ return new NativeEnumValidator(enumShape);
+ }
+ literal(value) {
+ if (value instanceof Date)
+ return this.date.equal(value);
+ return new LiteralValidator(value);
+ }
+ instance(expected) {
+ return new InstanceValidator(expected);
+ }
+ union(...validators) {
+ return new UnionValidator(validators);
+ }
+ array(validator) {
+ return new ArrayValidator(validator);
+ }
+ typedArray(type = "TypedArray") {
+ return new TypedArrayValidator(type);
+ }
+ get int8Array() {
+ return this.typedArray("Int8Array");
+ }
+ get uint8Array() {
+ return this.typedArray("Uint8Array");
+ }
+ get uint8ClampedArray() {
+ return this.typedArray("Uint8ClampedArray");
+ }
+ get int16Array() {
+ return this.typedArray("Int16Array");
+ }
+ get uint16Array() {
+ return this.typedArray("Uint16Array");
+ }
+ get int32Array() {
+ return this.typedArray("Int32Array");
+ }
+ get uint32Array() {
+ return this.typedArray("Uint32Array");
+ }
+ get float32Array() {
+ return this.typedArray("Float32Array");
+ }
+ get float64Array() {
+ return this.typedArray("Float64Array");
+ }
+ get bigInt64Array() {
+ return this.typedArray("BigInt64Array");
+ }
+ get bigUint64Array() {
+ return this.typedArray("BigUint64Array");
+ }
+ tuple(validators) {
+ return new TupleValidator(validators);
+ }
+ set(validator) {
+ return new SetValidator(validator);
+ }
+ record(validator) {
+ return new RecordValidator(validator);
+ }
+ map(keyValidator, valueValidator) {
+ return new MapValidator(keyValidator, valueValidator);
+ }
+ lazy(validator) {
+ return new LazyValidator(validator);
+ }
+ };
+ __name(Shapes, "Shapes");
+
+ // src/index.ts
+ var s3 = new Shapes();
+
+ exports.BaseError = BaseError;
+ exports.CombinedError = CombinedError;
+ exports.CombinedPropertyError = CombinedPropertyError;
+ exports.ExpectedConstraintError = ExpectedConstraintError;
+ exports.ExpectedValidationError = ExpectedValidationError;
+ exports.MissingPropertyError = MissingPropertyError;
+ exports.MultiplePossibilitiesConstraintError = MultiplePossibilitiesConstraintError;
+ exports.Result = Result;
+ exports.UnknownEnumValueError = UnknownEnumValueError;
+ exports.UnknownPropertyError = UnknownPropertyError;
+ exports.ValidationError = ValidationError;
+ exports.customInspectSymbol = customInspectSymbol;
+ exports.customInspectSymbolStackLess = customInspectSymbolStackLess;
+ exports.getGlobalValidationEnabled = getGlobalValidationEnabled;
+ exports.s = s3;
+ exports.setGlobalValidationEnabled = setGlobalValidationEnabled;
+
+ return exports;
+
+})({});
+//# sourceMappingURL=out.js.map
+//# sourceMappingURL=index.global.js.map \ No newline at end of file
diff --git a/node_modules/@sapphire/shapeshift/dist/index.global.js.map b/node_modules/@sapphire/shapeshift/dist/index.global.js.map
new file mode 100644
index 0000000..566f0c9
--- /dev/null
+++ b/node_modules/@sapphire/shapeshift/dist/index.global.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../node_modules/lodash/isArray.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_root.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isSymbol.js","../node_modules/lodash/_isKey.js","../node_modules/lodash/isObject.js","../node_modules/lodash/isFunction.js","../node_modules/lodash/_coreJsData.js","../node_modules/lodash/_isMasked.js","../node_modules/lodash/_toSource.js","../node_modules/lodash/_baseIsNative.js","../node_modules/lodash/_getValue.js","../node_modules/lodash/_getNative.js","../node_modules/lodash/_nativeCreate.js","../node_modules/lodash/_hashClear.js","../node_modules/lodash/_hashDelete.js","../node_modules/lodash/_hashGet.js","../node_modules/lodash/_hashHas.js","../node_modules/lodash/_hashSet.js","../node_modules/lodash/_Hash.js","../node_modules/lodash/_listCacheClear.js","../node_modules/lodash/eq.js","../node_modules/lodash/_assocIndexOf.js","../node_modules/lodash/_listCacheDelete.js","../node_modules/lodash/_listCacheGet.js","../node_modules/lodash/_listCacheHas.js","../node_modules/lodash/_listCacheSet.js","../node_modules/lodash/_ListCache.js","../node_modules/lodash/_Map.js","../node_modules/lodash/_mapCacheClear.js","../node_modules/lodash/_isKeyable.js","../node_modules/lodash/_getMapData.js","../node_modules/lodash/_mapCacheDelete.js","../node_modules/lodash/_mapCacheGet.js","../node_modules/lodash/_mapCacheHas.js","../node_modules/lodash/_mapCacheSet.js","../node_modules/lodash/_MapCache.js","../node_modules/lodash/memoize.js","../node_modules/lodash/_memoizeCapped.js","../node_modules/lodash/_stringToPath.js","../node_modules/lodash/_arrayMap.js","../node_modules/lodash/_baseToString.js","../node_modules/lodash/toString.js","../node_modules/lodash/_castPath.js","../node_modules/lodash/_toKey.js","../node_modules/lodash/_baseGet.js","../node_modules/lodash/get.js","../node_modules/fast-deep-equal/es6/index.js","../node_modules/lodash/_setCacheAdd.js","../node_modules/lodash/_setCacheHas.js","../node_modules/lodash/_SetCache.js","../node_modules/lodash/_baseFindIndex.js","../node_modules/lodash/_baseIsNaN.js","../node_modules/lodash/_strictIndexOf.js","../node_modules/lodash/_baseIndexOf.js","../node_modules/lodash/_arrayIncludes.js","../node_modules/lodash/_arrayIncludesWith.js","../node_modules/lodash/_cacheHas.js","../node_modules/lodash/_Set.js","../node_modules/lodash/noop.js","../node_modules/lodash/_setToArray.js","../node_modules/lodash/_createSet.js","../node_modules/lodash/_baseUniq.js","../node_modules/lodash/uniqWith.js","../src/lib/configs.ts","../src/lib/Result.ts","../src/validators/util/getValue.ts","../src/constraints/ObjectConstrains.ts","node-modules-polyfills:util","../src/lib/errors/BaseError.ts","../src/lib/errors/BaseConstraintError.ts","../src/lib/errors/ExpectedConstraintError.ts","../src/validators/BaseValidator.ts","../src/constraints/util/isUnique.ts","../src/constraints/util/operators.ts","../src/constraints/ArrayConstraints.ts","../src/lib/errors/CombinedPropertyError.ts","../src/lib/errors/ValidationError.ts","../src/validators/ArrayValidator.ts","../src/constraints/BigIntConstraints.ts","../src/validators/BigIntValidator.ts","../src/constraints/BooleanConstraints.ts","../src/validators/BooleanValidator.ts","../src/constraints/DateConstraints.ts","../src/validators/DateValidator.ts","../src/lib/errors/ExpectedValidationError.ts","../src/validators/InstanceValidator.ts","../src/validators/LiteralValidator.ts","../src/validators/NeverValidator.ts","../src/validators/NullishValidator.ts","../src/constraints/NumberConstraints.ts","../src/validators/NumberValidator.ts","../src/lib/errors/MissingPropertyError.ts","../src/lib/errors/UnknownPropertyError.ts","../src/validators/DefaultValidator.ts","../src/lib/errors/CombinedError.ts","../src/validators/UnionValidator.ts","../src/validators/ObjectValidator.ts","../src/validators/PassthroughValidator.ts","../src/validators/RecordValidator.ts","../src/validators/SetValidator.ts","../src/constraints/util/emailValidator.ts","../src/constraints/util/net.ts","../src/constraints/util/phoneValidator.ts","../src/lib/errors/MultiplePossibilitiesConstraintError.ts","../src/constraints/util/common/combinedResultFn.ts","../src/constraints/util/urlValidators.ts","../src/constraints/StringConstraints.ts","../src/validators/StringValidator.ts","../src/validators/TupleValidator.ts","../src/validators/MapValidator.ts","../src/validators/LazyValidator.ts","../src/lib/errors/UnknownEnumValueError.ts","../src/validators/NativeEnumValidator.ts","../src/constraints/TypedArrayLengthConstraints.ts","../src/constraints/util/common/vowels.ts","../src/constraints/util/typedArray.ts","../src/validators/TypedArrayValidator.ts","../src/lib/Shapes.ts","../src/index.ts"],"names":["isArray","Symbol","e","isSymbol","isObject","isFunction","getValue","Map","get","equal","a","b","i","Set","uniqWith","s3","k","v","uniqueArray","fastDeepEqual","value","s","x"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAuBA,QAAIA,WAAU,MAAM;AAEpB,WAAO,UAAUA;AAAA;AAAA;;;ACzBjB;AAAA;AACA,QAAI,aAAa,OAAO,cAAU,YAAY,cAAU,WAAO,WAAW,UAAU;AAE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* @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n if ((a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n for (i of a.entries())\n if (!b.has(i[0])) return false;\n for (i of a.entries())\n if (!equal(i[1], b.get(i[0]))) return false;\n return true;\n }\n\n if ((a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n for (i of a.entries())\n if (!b.has(i[0])) return false;\n return true;\n }\n\n if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n","/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n","var baseUniq = require('./_baseUniq');\n\n/**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\nfunction uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n}\n\nmodule.exports = uniqWith;\n","let validationEnabled = true;\n\n/**\n * Sets whether validators should run on the input, or if the input should be passed through.\n * @param enabled Whether validation should be done on inputs\n */\nexport function setGlobalValidationEnabled(enabled: boolean) {\n\tvalidationEnabled = enabled;\n}\n\n/**\n * @returns Whether validation is enabled\n */\nexport function getGlobalValidationEnabled() {\n\treturn validationEnabled;\n}\n","export class Result<T, E extends Error = Error> {\n\tpublic readonly success: boolean;\n\tpublic readonly value?: T;\n\tpublic readonly error?: E;\n\n\tprivate constructor(success: boolean, value?: T, error?: E) {\n\t\tthis.success = success;\n\t\tif (success) {\n\t\t\tthis.value = value;\n\t\t} else {\n\t\t\tthis.error = error;\n\t\t}\n\t}\n\n\tpublic isOk(): this is { success: true; value: T } {\n\t\treturn this.success;\n\t}\n\n\tpublic isErr(): this is { success: false; error: E } {\n\t\treturn !this.success;\n\t}\n\n\tpublic unwrap(): T {\n\t\tif (this.isOk()) return this.value;\n\t\tthrow this.error as Error;\n\t}\n\n\tpublic static ok<T, E extends Error = Error>(value: T): Result<T, E> {\n\t\treturn new Result<T, E>(true, value);\n\t}\n\n\tpublic static err<T, E extends Error = Error>(error: E): Result<T, E> {\n\t\treturn new Result<T, E>(false, undefined, error);\n\t}\n}\n","// https://github.com/microsoft/TypeScript/issues/37663\ntype Fn = (...args: unknown[]) => unknown;\n\nexport function getValue<T, U = T extends Fn ? ReturnType<T> : T>(valueOrFn: T): U {\n\treturn typeof valueOrFn === 'function' ? valueOrFn() : valueOrFn;\n}\n","import get from 'lodash/get.js';\nimport { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { BaseValidator } from '../type-exports';\nimport type { IConstraint } from './type-exports';\n\nexport type ObjectConstraintName = `s.object(T.when)`;\n\nexport type WhenKey = PropertyKey | PropertyKey[];\n\nexport interface WhenOptions<T extends BaseValidator<any>, Key extends WhenKey> {\n\tis?: boolean | ((value: Key extends Array<any> ? any[] : any) => boolean);\n\tthen: (predicate: T) => T;\n\totherwise?: (predicate: T) => T;\n}\n\nexport function whenConstraint<T extends BaseValidator<any>, I, Key extends WhenKey>(\n\tkey: Key,\n\toptions: WhenOptions<T, Key>,\n\tvalidator: T\n): IConstraint<I> {\n\treturn {\n\t\trun(input: I, parent?: any) {\n\t\t\tif (!parent) {\n\t\t\t\treturn Result.err(new ExpectedConstraintError('s.object(T.when)', 'Validator has no parent', parent, 'Validator to have a parent'));\n\t\t\t}\n\n\t\t\tconst isKeyArray = Array.isArray(key);\n\n\t\t\tconst value = isKeyArray ? key.map((k) => get(parent, k)) : get(parent, key);\n\n\t\t\tconst predicate = resolveBooleanIs<T, Key>(options, value, isKeyArray) ? options.then : options.otherwise;\n\n\t\t\tif (predicate) {\n\t\t\t\treturn predicate(validator).run(input) as Result<I, ExpectedConstraintError<I>>;\n\t\t\t}\n\n\t\t\treturn Result.ok(input);\n\t\t}\n\t};\n}\n\nfunction resolveBooleanIs<T extends BaseValidator<any>, Key extends WhenKey>(options: WhenOptions<T, Key>, value: any, isKeyArray: boolean) {\n\tif (options.is === undefined) {\n\t\treturn isKeyArray ? !value.some((val: any) => !val) : Boolean(value);\n\t}\n\n\tif (typeof options.is === 'function') {\n\t\treturn options.is(value);\n\t}\n\n\treturn value === options.is;\n}\n","// node_modules/@jspm/core/nodelibs/browser/chunk-5decc758.js\nvar e;\nvar t;\nvar n;\nvar r = \"undefined\" != typeof globalThis ? globalThis : \"undefined\" != typeof self ? self : global;\nvar o = e = {};\nfunction i() {\n throw new Error(\"setTimeout has not been defined\");\n}\nfunction u() {\n throw new Error(\"clearTimeout has not been defined\");\n}\nfunction c(e3) {\n if (t === setTimeout)\n return setTimeout(e3, 0);\n if ((t === i || !t) && setTimeout)\n return t = setTimeout, setTimeout(e3, 0);\n try {\n return t(e3, 0);\n } catch (n3) {\n try {\n return t.call(null, e3, 0);\n } catch (n4) {\n return t.call(this || r, e3, 0);\n }\n }\n}\n!function() {\n try {\n t = \"function\" == typeof setTimeout ? setTimeout : i;\n } catch (e3) {\n t = i;\n }\n try {\n n = \"function\" == typeof clearTimeout ? clearTimeout : u;\n } catch (e3) {\n n = u;\n }\n}();\nvar l;\nvar s = [];\nvar f = false;\nvar a = -1;\nfunction h() {\n f && l && (f = false, l.length ? s = l.concat(s) : a = -1, s.length && d());\n}\nfunction d() {\n if (!f) {\n var e3 = c(h);\n f = true;\n for (var t3 = s.length; t3; ) {\n for (l = s, s = []; ++a < t3; )\n l && l[a].run();\n a = -1, t3 = s.length;\n }\n l = null, f = false, function(e4) {\n if (n === clearTimeout)\n return clearTimeout(e4);\n if ((n === u || !n) && clearTimeout)\n return n = clearTimeout, clearTimeout(e4);\n try {\n n(e4);\n } catch (t4) {\n try {\n return n.call(null, e4);\n } catch (t5) {\n return n.call(this || r, e4);\n }\n }\n }(e3);\n }\n}\nfunction m(e3, t3) {\n (this || r).fun = e3, (this || r).array = t3;\n}\nfunction p() {\n}\no.nextTick = function(e3) {\n var t3 = new Array(arguments.length - 1);\n if (arguments.length > 1)\n for (var n3 = 1; n3 < arguments.length; n3++)\n t3[n3 - 1] = arguments[n3];\n s.push(new m(e3, t3)), 1 !== s.length || f || c(d);\n}, m.prototype.run = function() {\n (this || r).fun.apply(null, (this || r).array);\n}, o.title = \"browser\", o.browser = true, o.env = {}, o.argv = [], o.version = \"\", o.versions = {}, o.on = p, o.addListener = p, o.once = p, o.off = p, o.removeListener = p, o.removeAllListeners = p, o.emit = p, o.prependListener = p, o.prependOnceListener = p, o.listeners = function(e3) {\n return [];\n}, o.binding = function(e3) {\n throw new Error(\"process.binding is not supported\");\n}, o.cwd = function() {\n return \"/\";\n}, o.chdir = function(e3) {\n throw new Error(\"process.chdir is not supported\");\n}, o.umask = function() {\n return 0;\n};\nvar T = e;\nT.addListener;\nT.argv;\nT.binding;\nT.browser;\nT.chdir;\nT.cwd;\nT.emit;\nT.env;\nT.listeners;\nT.nextTick;\nT.off;\nT.on;\nT.once;\nT.prependListener;\nT.prependOnceListener;\nT.removeAllListeners;\nT.removeListener;\nT.title;\nT.umask;\nT.version;\nT.versions;\n\n// node_modules/@jspm/core/nodelibs/browser/chunk-b4205b57.js\nvar t2 = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.toStringTag;\nvar e2 = Object.prototype.toString;\nvar o2 = function(o3) {\n return !(t2 && o3 && \"object\" == typeof o3 && Symbol.toStringTag in o3) && \"[object Arguments]\" === e2.call(o3);\n};\nvar n2 = function(t3) {\n return !!o2(t3) || null !== t3 && \"object\" == typeof t3 && \"number\" == typeof t3.length && t3.length >= 0 && \"[object Array]\" !== e2.call(t3) && \"[object Function]\" === e2.call(t3.callee);\n};\nvar r2 = function() {\n return o2(arguments);\n}();\no2.isLegacyArguments = n2;\nvar l2 = r2 ? o2 : n2;\nvar t$1 = Object.prototype.toString;\nvar o$1 = Function.prototype.toString;\nvar n$1 = /^\\s*(?:function)?\\*/;\nvar e$1 = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.toStringTag;\nvar r$1 = Object.getPrototypeOf;\nvar c2 = function() {\n if (!e$1)\n return false;\n try {\n return Function(\"return function*() {}\")();\n } catch (t3) {\n }\n}();\nvar u2 = c2 ? r$1(c2) : {};\nvar i2 = function(c3) {\n return \"function\" == typeof c3 && (!!n$1.test(o$1.call(c3)) || (e$1 ? r$1(c3) === u2 : \"[object GeneratorFunction]\" === t$1.call(c3)));\n};\nvar t$2 = \"function\" == typeof Object.create ? function(t3, e3) {\n e3 && (t3.super_ = e3, t3.prototype = Object.create(e3.prototype, { constructor: { value: t3, enumerable: false, writable: true, configurable: true } }));\n} : function(t3, e3) {\n if (e3) {\n t3.super_ = e3;\n var o3 = function() {\n };\n o3.prototype = e3.prototype, t3.prototype = new o3(), t3.prototype.constructor = t3;\n }\n};\nvar i$1 = function(e3) {\n return e3 && \"object\" == typeof e3 && \"function\" == typeof e3.copy && \"function\" == typeof e3.fill && \"function\" == typeof e3.readUInt8;\n};\nvar o$2 = {};\nvar u$1 = i$1;\nvar f2 = l2;\nvar a2 = i2;\nfunction c$1(e3) {\n return e3.call.bind(e3);\n}\nvar s2 = \"undefined\" != typeof BigInt;\nvar p2 = \"undefined\" != typeof Symbol;\nvar y = p2 && void 0 !== Symbol.toStringTag;\nvar l$1 = \"undefined\" != typeof Uint8Array;\nvar d2 = \"undefined\" != typeof ArrayBuffer;\nif (l$1 && y)\n var g = Object.getPrototypeOf(Uint8Array.prototype), b = c$1(Object.getOwnPropertyDescriptor(g, Symbol.toStringTag).get);\nvar m2 = c$1(Object.prototype.toString);\nvar h2 = c$1(Number.prototype.valueOf);\nvar j = c$1(String.prototype.valueOf);\nvar A = c$1(Boolean.prototype.valueOf);\nif (s2)\n var w = c$1(BigInt.prototype.valueOf);\nif (p2)\n var v = c$1(Symbol.prototype.valueOf);\nfunction O(e3, t3) {\n if (\"object\" != typeof e3)\n return false;\n try {\n return t3(e3), true;\n } catch (e4) {\n return false;\n }\n}\nfunction S(e3) {\n return l$1 && y ? void 0 !== b(e3) : B(e3) || k(e3) || E(e3) || D(e3) || U(e3) || P(e3) || x(e3) || I(e3) || M(e3) || z(e3) || F(e3);\n}\nfunction B(e3) {\n return l$1 && y ? \"Uint8Array\" === b(e3) : \"[object Uint8Array]\" === m2(e3) || u$1(e3) && void 0 !== e3.buffer;\n}\nfunction k(e3) {\n return l$1 && y ? \"Uint8ClampedArray\" === b(e3) : \"[object Uint8ClampedArray]\" === m2(e3);\n}\nfunction E(e3) {\n return l$1 && y ? \"Uint16Array\" === b(e3) : \"[object Uint16Array]\" === m2(e3);\n}\nfunction D(e3) {\n return l$1 && y ? \"Uint32Array\" === b(e3) : \"[object Uint32Array]\" === m2(e3);\n}\nfunction U(e3) {\n return l$1 && y ? \"Int8Array\" === b(e3) : \"[object Int8Array]\" === m2(e3);\n}\nfunction P(e3) {\n return l$1 && y ? \"Int16Array\" === b(e3) : \"[object Int16Array]\" === m2(e3);\n}\nfunction x(e3) {\n return l$1 && y ? \"Int32Array\" === b(e3) : \"[object Int32Array]\" === m2(e3);\n}\nfunction I(e3) {\n return l$1 && y ? \"Float32Array\" === b(e3) : \"[object Float32Array]\" === m2(e3);\n}\nfunction M(e3) {\n return l$1 && y ? \"Float64Array\" === b(e3) : \"[object Float64Array]\" === m2(e3);\n}\nfunction z(e3) {\n return l$1 && y ? \"BigInt64Array\" === b(e3) : \"[object BigInt64Array]\" === m2(e3);\n}\nfunction F(e3) {\n return l$1 && y ? \"BigUint64Array\" === b(e3) : \"[object BigUint64Array]\" === m2(e3);\n}\nfunction T2(e3) {\n return \"[object Map]\" === m2(e3);\n}\nfunction N(e3) {\n return \"[object Set]\" === m2(e3);\n}\nfunction W(e3) {\n return \"[object WeakMap]\" === m2(e3);\n}\nfunction $(e3) {\n return \"[object WeakSet]\" === m2(e3);\n}\nfunction C(e3) {\n return \"[object ArrayBuffer]\" === m2(e3);\n}\nfunction V(e3) {\n return \"undefined\" != typeof ArrayBuffer && (C.working ? C(e3) : e3 instanceof ArrayBuffer);\n}\nfunction G(e3) {\n return \"[object DataView]\" === m2(e3);\n}\nfunction R(e3) {\n return \"undefined\" != typeof DataView && (G.working ? G(e3) : e3 instanceof DataView);\n}\nfunction J(e3) {\n return \"[object SharedArrayBuffer]\" === m2(e3);\n}\nfunction _(e3) {\n return \"undefined\" != typeof SharedArrayBuffer && (J.working ? J(e3) : e3 instanceof SharedArrayBuffer);\n}\nfunction H(e3) {\n return O(e3, h2);\n}\nfunction Z(e3) {\n return O(e3, j);\n}\nfunction q(e3) {\n return O(e3, A);\n}\nfunction K(e3) {\n return s2 && O(e3, w);\n}\nfunction L(e3) {\n return p2 && O(e3, v);\n}\no$2.isArgumentsObject = f2, o$2.isGeneratorFunction = a2, o$2.isPromise = function(e3) {\n return \"undefined\" != typeof Promise && e3 instanceof Promise || null !== e3 && \"object\" == typeof e3 && \"function\" == typeof e3.then && \"function\" == typeof e3.catch;\n}, o$2.isArrayBufferView = function(e3) {\n return d2 && ArrayBuffer.isView ? ArrayBuffer.isView(e3) : S(e3) || R(e3);\n}, o$2.isTypedArray = S, o$2.isUint8Array = B, o$2.isUint8ClampedArray = k, o$2.isUint16Array = E, o$2.isUint32Array = D, o$2.isInt8Array = U, o$2.isInt16Array = P, o$2.isInt32Array = x, o$2.isFloat32Array = I, o$2.isFloat64Array = M, o$2.isBigInt64Array = z, o$2.isBigUint64Array = F, T2.working = \"undefined\" != typeof Map && T2(/* @__PURE__ */ new Map()), o$2.isMap = function(e3) {\n return \"undefined\" != typeof Map && (T2.working ? T2(e3) : e3 instanceof Map);\n}, N.working = \"undefined\" != typeof Set && N(/* @__PURE__ */ new Set()), o$2.isSet = function(e3) {\n return \"undefined\" != typeof Set && (N.working ? N(e3) : e3 instanceof Set);\n}, W.working = \"undefined\" != typeof WeakMap && W(/* @__PURE__ */ new WeakMap()), o$2.isWeakMap = function(e3) {\n return \"undefined\" != typeof WeakMap && (W.working ? W(e3) : e3 instanceof WeakMap);\n}, $.working = \"undefined\" != typeof WeakSet && $(/* @__PURE__ */ new WeakSet()), o$2.isWeakSet = function(e3) {\n return $(e3);\n}, C.working = \"undefined\" != typeof ArrayBuffer && C(new ArrayBuffer()), o$2.isArrayBuffer = V, G.working = \"undefined\" != typeof ArrayBuffer && \"undefined\" != typeof DataView && G(new DataView(new ArrayBuffer(1), 0, 1)), o$2.isDataView = R, J.working = \"undefined\" != typeof SharedArrayBuffer && J(new SharedArrayBuffer()), o$2.isSharedArrayBuffer = _, o$2.isAsyncFunction = function(e3) {\n return \"[object AsyncFunction]\" === m2(e3);\n}, o$2.isMapIterator = function(e3) {\n return \"[object Map Iterator]\" === m2(e3);\n}, o$2.isSetIterator = function(e3) {\n return \"[object Set Iterator]\" === m2(e3);\n}, o$2.isGeneratorObject = function(e3) {\n return \"[object Generator]\" === m2(e3);\n}, o$2.isWebAssemblyCompiledModule = function(e3) {\n return \"[object WebAssembly.Module]\" === m2(e3);\n}, o$2.isNumberObject = H, o$2.isStringObject = Z, o$2.isBooleanObject = q, o$2.isBigIntObject = K, o$2.isSymbolObject = L, o$2.isBoxedPrimitive = function(e3) {\n return H(e3) || Z(e3) || q(e3) || K(e3) || L(e3);\n}, o$2.isAnyArrayBuffer = function(e3) {\n return l$1 && (V(e3) || _(e3));\n}, [\"isProxy\", \"isExternal\", \"isModuleNamespaceObject\"].forEach(function(e3) {\n Object.defineProperty(o$2, e3, { enumerable: false, value: function() {\n throw new Error(e3 + \" is not supported in userland\");\n } });\n});\nvar Q = \"undefined\" != typeof globalThis ? globalThis : \"undefined\" != typeof self ? self : global;\nvar X = {};\nvar Y = T;\nvar ee = Object.getOwnPropertyDescriptors || function(e3) {\n for (var t3 = Object.keys(e3), r3 = {}, n3 = 0; n3 < t3.length; n3++)\n r3[t3[n3]] = Object.getOwnPropertyDescriptor(e3, t3[n3]);\n return r3;\n};\nvar te = /%[sdj%]/g;\nX.format = function(e3) {\n if (!ge(e3)) {\n for (var t3 = [], r3 = 0; r3 < arguments.length; r3++)\n t3.push(oe(arguments[r3]));\n return t3.join(\" \");\n }\n r3 = 1;\n for (var n3 = arguments, i3 = n3.length, o3 = String(e3).replace(te, function(e4) {\n if (\"%%\" === e4)\n return \"%\";\n if (r3 >= i3)\n return e4;\n switch (e4) {\n case \"%s\":\n return String(n3[r3++]);\n case \"%d\":\n return Number(n3[r3++]);\n case \"%j\":\n try {\n return JSON.stringify(n3[r3++]);\n } catch (e5) {\n return \"[Circular]\";\n }\n default:\n return e4;\n }\n }), u3 = n3[r3]; r3 < i3; u3 = n3[++r3])\n le(u3) || !he(u3) ? o3 += \" \" + u3 : o3 += \" \" + oe(u3);\n return o3;\n}, X.deprecate = function(e3, t3) {\n if (void 0 !== Y && true === Y.noDeprecation)\n return e3;\n if (void 0 === Y)\n return function() {\n return X.deprecate(e3, t3).apply(this || Q, arguments);\n };\n var r3 = false;\n return function() {\n if (!r3) {\n if (Y.throwDeprecation)\n throw new Error(t3);\n Y.traceDeprecation ? console.trace(t3) : console.error(t3), r3 = true;\n }\n return e3.apply(this || Q, arguments);\n };\n};\nvar re = {};\nvar ne = /^$/;\nif (Y.env.NODE_DEBUG) {\n ie = Y.env.NODE_DEBUG;\n ie = ie.replace(/[|\\\\{}()[\\]^$+?.]/g, \"\\\\$&\").replace(/\\*/g, \".*\").replace(/,/g, \"$|^\").toUpperCase(), ne = new RegExp(\"^\" + ie + \"$\", \"i\");\n}\nvar ie;\nfunction oe(e3, t3) {\n var r3 = { seen: [], stylize: fe };\n return arguments.length >= 3 && (r3.depth = arguments[2]), arguments.length >= 4 && (r3.colors = arguments[3]), ye(t3) ? r3.showHidden = t3 : t3 && X._extend(r3, t3), be(r3.showHidden) && (r3.showHidden = false), be(r3.depth) && (r3.depth = 2), be(r3.colors) && (r3.colors = false), be(r3.customInspect) && (r3.customInspect = true), r3.colors && (r3.stylize = ue), ae(r3, e3, r3.depth);\n}\nfunction ue(e3, t3) {\n var r3 = oe.styles[t3];\n return r3 ? \"\\x1B[\" + oe.colors[r3][0] + \"m\" + e3 + \"\\x1B[\" + oe.colors[r3][1] + \"m\" : e3;\n}\nfunction fe(e3, t3) {\n return e3;\n}\nfunction ae(e3, t3, r3) {\n if (e3.customInspect && t3 && we(t3.inspect) && t3.inspect !== X.inspect && (!t3.constructor || t3.constructor.prototype !== t3)) {\n var n3 = t3.inspect(r3, e3);\n return ge(n3) || (n3 = ae(e3, n3, r3)), n3;\n }\n var i3 = function(e4, t4) {\n if (be(t4))\n return e4.stylize(\"undefined\", \"undefined\");\n if (ge(t4)) {\n var r4 = \"'\" + JSON.stringify(t4).replace(/^\"|\"$/g, \"\").replace(/'/g, \"\\\\'\").replace(/\\\\\"/g, '\"') + \"'\";\n return e4.stylize(r4, \"string\");\n }\n if (de(t4))\n return e4.stylize(\"\" + t4, \"number\");\n if (ye(t4))\n return e4.stylize(\"\" + t4, \"boolean\");\n if (le(t4))\n return e4.stylize(\"null\", \"null\");\n }(e3, t3);\n if (i3)\n return i3;\n var o3 = Object.keys(t3), u3 = function(e4) {\n var t4 = {};\n return e4.forEach(function(e5, r4) {\n t4[e5] = true;\n }), t4;\n }(o3);\n if (e3.showHidden && (o3 = Object.getOwnPropertyNames(t3)), Ae(t3) && (o3.indexOf(\"message\") >= 0 || o3.indexOf(\"description\") >= 0))\n return ce(t3);\n if (0 === o3.length) {\n if (we(t3)) {\n var f3 = t3.name ? \": \" + t3.name : \"\";\n return e3.stylize(\"[Function\" + f3 + \"]\", \"special\");\n }\n if (me(t3))\n return e3.stylize(RegExp.prototype.toString.call(t3), \"regexp\");\n if (je(t3))\n return e3.stylize(Date.prototype.toString.call(t3), \"date\");\n if (Ae(t3))\n return ce(t3);\n }\n var a3, c3 = \"\", s3 = false, p3 = [\"{\", \"}\"];\n (pe(t3) && (s3 = true, p3 = [\"[\", \"]\"]), we(t3)) && (c3 = \" [Function\" + (t3.name ? \": \" + t3.name : \"\") + \"]\");\n return me(t3) && (c3 = \" \" + RegExp.prototype.toString.call(t3)), je(t3) && (c3 = \" \" + Date.prototype.toUTCString.call(t3)), Ae(t3) && (c3 = \" \" + ce(t3)), 0 !== o3.length || s3 && 0 != t3.length ? r3 < 0 ? me(t3) ? e3.stylize(RegExp.prototype.toString.call(t3), \"regexp\") : e3.stylize(\"[Object]\", \"special\") : (e3.seen.push(t3), a3 = s3 ? function(e4, t4, r4, n4, i4) {\n for (var o4 = [], u4 = 0, f4 = t4.length; u4 < f4; ++u4)\n ke(t4, String(u4)) ? o4.push(se(e4, t4, r4, n4, String(u4), true)) : o4.push(\"\");\n return i4.forEach(function(i5) {\n i5.match(/^\\d+$/) || o4.push(se(e4, t4, r4, n4, i5, true));\n }), o4;\n }(e3, t3, r3, u3, o3) : o3.map(function(n4) {\n return se(e3, t3, r3, u3, n4, s3);\n }), e3.seen.pop(), function(e4, t4, r4) {\n var n4 = 0;\n if (e4.reduce(function(e5, t5) {\n return n4++, t5.indexOf(\"\\n\") >= 0 && n4++, e5 + t5.replace(/\\u001b\\[\\d\\d?m/g, \"\").length + 1;\n }, 0) > 60)\n return r4[0] + (\"\" === t4 ? \"\" : t4 + \"\\n \") + \" \" + e4.join(\",\\n \") + \" \" + r4[1];\n return r4[0] + t4 + \" \" + e4.join(\", \") + \" \" + r4[1];\n }(a3, c3, p3)) : p3[0] + c3 + p3[1];\n}\nfunction ce(e3) {\n return \"[\" + Error.prototype.toString.call(e3) + \"]\";\n}\nfunction se(e3, t3, r3, n3, i3, o3) {\n var u3, f3, a3;\n if ((a3 = Object.getOwnPropertyDescriptor(t3, i3) || { value: t3[i3] }).get ? f3 = a3.set ? e3.stylize(\"[Getter/Setter]\", \"special\") : e3.stylize(\"[Getter]\", \"special\") : a3.set && (f3 = e3.stylize(\"[Setter]\", \"special\")), ke(n3, i3) || (u3 = \"[\" + i3 + \"]\"), f3 || (e3.seen.indexOf(a3.value) < 0 ? (f3 = le(r3) ? ae(e3, a3.value, null) : ae(e3, a3.value, r3 - 1)).indexOf(\"\\n\") > -1 && (f3 = o3 ? f3.split(\"\\n\").map(function(e4) {\n return \" \" + e4;\n }).join(\"\\n\").substr(2) : \"\\n\" + f3.split(\"\\n\").map(function(e4) {\n return \" \" + e4;\n }).join(\"\\n\")) : f3 = e3.stylize(\"[Circular]\", \"special\")), be(u3)) {\n if (o3 && i3.match(/^\\d+$/))\n return f3;\n (u3 = JSON.stringify(\"\" + i3)).match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/) ? (u3 = u3.substr(1, u3.length - 2), u3 = e3.stylize(u3, \"name\")) : (u3 = u3.replace(/'/g, \"\\\\'\").replace(/\\\\\"/g, '\"').replace(/(^\"|\"$)/g, \"'\"), u3 = e3.stylize(u3, \"string\"));\n }\n return u3 + \": \" + f3;\n}\nfunction pe(e3) {\n return Array.isArray(e3);\n}\nfunction ye(e3) {\n return \"boolean\" == typeof e3;\n}\nfunction le(e3) {\n return null === e3;\n}\nfunction de(e3) {\n return \"number\" == typeof e3;\n}\nfunction ge(e3) {\n return \"string\" == typeof e3;\n}\nfunction be(e3) {\n return void 0 === e3;\n}\nfunction me(e3) {\n return he(e3) && \"[object RegExp]\" === ve(e3);\n}\nfunction he(e3) {\n return \"object\" == typeof e3 && null !== e3;\n}\nfunction je(e3) {\n return he(e3) && \"[object Date]\" === ve(e3);\n}\nfunction Ae(e3) {\n return he(e3) && (\"[object Error]\" === ve(e3) || e3 instanceof Error);\n}\nfunction we(e3) {\n return \"function\" == typeof e3;\n}\nfunction ve(e3) {\n return Object.prototype.toString.call(e3);\n}\nfunction Oe(e3) {\n return e3 < 10 ? \"0\" + e3.toString(10) : e3.toString(10);\n}\nX.debuglog = function(e3) {\n if (e3 = e3.toUpperCase(), !re[e3])\n if (ne.test(e3)) {\n var t3 = Y.pid;\n re[e3] = function() {\n var r3 = X.format.apply(X, arguments);\n console.error(\"%s %d: %s\", e3, t3, r3);\n };\n } else\n re[e3] = function() {\n };\n return re[e3];\n}, X.inspect = oe, oe.colors = { bold: [1, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], white: [37, 39], grey: [90, 39], black: [30, 39], blue: [34, 39], cyan: [36, 39], green: [32, 39], magenta: [35, 39], red: [31, 39], yellow: [33, 39] }, oe.styles = { special: \"cyan\", number: \"yellow\", boolean: \"yellow\", undefined: \"grey\", null: \"bold\", string: \"green\", date: \"magenta\", regexp: \"red\" }, X.types = o$2, X.isArray = pe, X.isBoolean = ye, X.isNull = le, X.isNullOrUndefined = function(e3) {\n return null == e3;\n}, X.isNumber = de, X.isString = ge, X.isSymbol = function(e3) {\n return \"symbol\" == typeof e3;\n}, X.isUndefined = be, X.isRegExp = me, X.types.isRegExp = me, X.isObject = he, X.isDate = je, X.types.isDate = je, X.isError = Ae, X.types.isNativeError = Ae, X.isFunction = we, X.isPrimitive = function(e3) {\n return null === e3 || \"boolean\" == typeof e3 || \"number\" == typeof e3 || \"string\" == typeof e3 || \"symbol\" == typeof e3 || void 0 === e3;\n}, X.isBuffer = i$1;\nvar Se = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nfunction Be() {\n var e3 = new Date(), t3 = [Oe(e3.getHours()), Oe(e3.getMinutes()), Oe(e3.getSeconds())].join(\":\");\n return [e3.getDate(), Se[e3.getMonth()], t3].join(\" \");\n}\nfunction ke(e3, t3) {\n return Object.prototype.hasOwnProperty.call(e3, t3);\n}\nX.log = function() {\n console.log(\"%s - %s\", Be(), X.format.apply(X, arguments));\n}, X.inherits = t$2, X._extend = function(e3, t3) {\n if (!t3 || !he(t3))\n return e3;\n for (var r3 = Object.keys(t3), n3 = r3.length; n3--; )\n e3[r3[n3]] = t3[r3[n3]];\n return e3;\n};\nvar Ee = \"undefined\" != typeof Symbol ? Symbol(\"util.promisify.custom\") : void 0;\nfunction De(e3, t3) {\n if (!e3) {\n var r3 = new Error(\"Promise was rejected with a falsy value\");\n r3.reason = e3, e3 = r3;\n }\n return t3(e3);\n}\nX.promisify = function(e3) {\n if (\"function\" != typeof e3)\n throw new TypeError('The \"original\" argument must be of type Function');\n if (Ee && e3[Ee]) {\n var t3;\n if (\"function\" != typeof (t3 = e3[Ee]))\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n return Object.defineProperty(t3, Ee, { value: t3, enumerable: false, writable: false, configurable: true }), t3;\n }\n function t3() {\n for (var t4, r3, n3 = new Promise(function(e4, n4) {\n t4 = e4, r3 = n4;\n }), i3 = [], o3 = 0; o3 < arguments.length; o3++)\n i3.push(arguments[o3]);\n i3.push(function(e4, n4) {\n e4 ? r3(e4) : t4(n4);\n });\n try {\n e3.apply(this || Q, i3);\n } catch (e4) {\n r3(e4);\n }\n return n3;\n }\n return Object.setPrototypeOf(t3, Object.getPrototypeOf(e3)), Ee && Object.defineProperty(t3, Ee, { value: t3, enumerable: false, writable: false, configurable: true }), Object.defineProperties(t3, ee(e3));\n}, X.promisify.custom = Ee, X.callbackify = function(e3) {\n if (\"function\" != typeof e3)\n throw new TypeError('The \"original\" argument must be of type Function');\n function t3() {\n for (var t4 = [], r3 = 0; r3 < arguments.length; r3++)\n t4.push(arguments[r3]);\n var n3 = t4.pop();\n if (\"function\" != typeof n3)\n throw new TypeError(\"The last argument must be of type Function\");\n var i3 = this || Q, o3 = function() {\n return n3.apply(i3, arguments);\n };\n e3.apply(this || Q, t4).then(function(e4) {\n Y.nextTick(o3.bind(null, null, e4));\n }, function(e4) {\n Y.nextTick(De.bind(null, e4, o3));\n });\n }\n return Object.setPrototypeOf(t3, Object.getPrototypeOf(e3)), Object.defineProperties(t3, ee(e3)), t3;\n};\n\n// node_modules/@jspm/core/nodelibs/browser/chunk-ce0fbc82.js\nX._extend;\nX.callbackify;\nX.debuglog;\nX.deprecate;\nX.format;\nX.inherits;\nX.inspect;\nX.isArray;\nX.isBoolean;\nX.isBuffer;\nX.isDate;\nX.isError;\nX.isFunction;\nX.isNull;\nX.isNullOrUndefined;\nX.isNumber;\nX.isObject;\nX.isPrimitive;\nX.isRegExp;\nX.isString;\nX.isSymbol;\nX.isUndefined;\nX.log;\nX.promisify;\nvar _extend = X._extend;\nvar callbackify = X.callbackify;\nvar debuglog = X.debuglog;\nvar deprecate = X.deprecate;\nvar format = X.format;\nvar inherits = X.inherits;\nvar inspect = X.inspect;\nvar isArray = X.isArray;\nvar isBoolean = X.isBoolean;\nvar isBuffer = X.isBuffer;\nvar isDate = X.isDate;\nvar isError = X.isError;\nvar isFunction = X.isFunction;\nvar isNull = X.isNull;\nvar isNullOrUndefined = X.isNullOrUndefined;\nvar isNumber = X.isNumber;\nvar isObject = X.isObject;\nvar isPrimitive = X.isPrimitive;\nvar isRegExp = X.isRegExp;\nvar isString = X.isString;\nvar isSymbol = X.isSymbol;\nvar isUndefined = X.isUndefined;\nvar log = X.log;\nvar promisify = X.promisify;\nvar types = X.types;\nvar TextEncoder = self.TextEncoder;\nvar TextDecoder = self.TextDecoder;\n\n// node_modules/@jspm/core/nodelibs/browser/util.js\nvar _extend2 = X._extend;\nvar callbackify2 = X.callbackify;\nvar debuglog2 = X.debuglog;\nvar deprecate2 = X.deprecate;\nvar format2 = X.format;\nvar inherits2 = X.inherits;\nvar inspect2 = X.inspect;\nvar isArray2 = X.isArray;\nvar isBoolean2 = X.isBoolean;\nvar isBuffer2 = X.isBuffer;\nvar isDate2 = X.isDate;\nvar isError2 = X.isError;\nvar isFunction2 = X.isFunction;\nvar isNull2 = X.isNull;\nvar isNullOrUndefined2 = X.isNullOrUndefined;\nvar isNumber2 = X.isNumber;\nvar isObject2 = X.isObject;\nvar isPrimitive2 = X.isPrimitive;\nvar isRegExp2 = X.isRegExp;\nvar isString2 = X.isString;\nvar isSymbol2 = X.isSymbol;\nvar isUndefined2 = X.isUndefined;\nvar log2 = X.log;\nvar promisify2 = X.promisify;\nvar types2 = X.types;\nvar TextEncoder2 = X.TextEncoder = globalThis.TextEncoder;\nvar TextDecoder2 = X.TextDecoder = globalThis.TextDecoder;\nexport {\n TextDecoder2 as TextDecoder,\n TextEncoder2 as TextEncoder,\n _extend2 as _extend,\n callbackify2 as callbackify,\n debuglog2 as debuglog,\n X as default,\n deprecate2 as deprecate,\n format2 as format,\n inherits2 as inherits,\n inspect2 as inspect,\n isArray2 as isArray,\n isBoolean2 as isBoolean,\n isBuffer2 as isBuffer,\n isDate2 as isDate,\n isError2 as isError,\n isFunction2 as isFunction,\n isNull2 as isNull,\n isNullOrUndefined2 as isNullOrUndefined,\n isNumber2 as isNumber,\n isObject2 as isObject,\n isPrimitive2 as isPrimitive,\n isRegExp2 as isRegExp,\n isString2 as isString,\n isSymbol2 as isSymbol,\n isUndefined2 as isUndefined,\n log2 as log,\n promisify2 as promisify,\n types2 as types\n};\n","import type { InspectOptionsStylized } from 'util';\n\nexport const customInspectSymbol = Symbol.for('nodejs.util.inspect.custom');\nexport const customInspectSymbolStackLess = Symbol.for('nodejs.util.inspect.custom.stack-less');\n\nexport abstract class BaseError extends Error {\n\tprotected [customInspectSymbol](depth: number, options: InspectOptionsStylized) {\n\t\treturn `${this[customInspectSymbolStackLess](depth, options)}\\n${this.stack!.slice(this.stack!.indexOf('\\n'))}`;\n\t}\n\n\tprotected abstract [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string;\n}\n","import type {\n\tArrayConstraintName,\n\tBigIntConstraintName,\n\tBooleanConstraintName,\n\tDateConstraintName,\n\tNumberConstraintName,\n\tObjectConstraintName,\n\tStringConstraintName,\n\tTypedArrayConstraintName\n} from '../../constraints/type-exports';\nimport { BaseError } from './BaseError';\n\nexport type ConstraintErrorNames =\n\t| TypedArrayConstraintName\n\t| ArrayConstraintName\n\t| BigIntConstraintName\n\t| BooleanConstraintName\n\t| DateConstraintName\n\t| NumberConstraintName\n\t| ObjectConstraintName\n\t| StringConstraintName;\n\nexport abstract class BaseConstraintError<T = unknown> extends BaseError {\n\tpublic readonly constraint: ConstraintErrorNames;\n\tpublic readonly given: T;\n\n\tpublic constructor(constraint: ConstraintErrorNames, message: string, given: T) {\n\t\tsuper(message);\n\t\tthis.constraint = constraint;\n\t\tthis.given = given;\n\t}\n}\n","import { inspect, type InspectOptionsStylized } from 'util';\nimport { customInspectSymbolStackLess } from './BaseError';\nimport { BaseConstraintError, type ConstraintErrorNames } from './BaseConstraintError';\n\nexport class ExpectedConstraintError<T = unknown> extends BaseConstraintError<T> {\n\tpublic readonly expected: string;\n\n\tpublic constructor(constraint: ConstraintErrorNames, message: string, given: T, expected: string) {\n\t\tsuper(constraint, message, given);\n\t\tthis.expected = expected;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tconstraint: this.constraint,\n\t\t\tgiven: this.given,\n\t\t\texpected: this.expected\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst constraint = options.stylize(this.constraint, 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[ExpectedConstraintError: ${constraint}]`, 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1 };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\t\tconst given = inspect(this.given, newOptions).replace(/\\n/g, padding);\n\n\t\tconst header = `${options.stylize('ExpectedConstraintError', 'special')} > ${constraint}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst expectedBlock = `\\n ${options.stylize('Expected: ', 'string')}${options.stylize(this.expected, 'boolean')}`;\n\t\tconst givenBlock = `\\n ${options.stylize('Received:', 'regexp')}${padding}${given}`;\n\t\treturn `${header}\\n ${message}\\n${expectedBlock}\\n${givenBlock}`;\n\t}\n}\n","import { getGlobalValidationEnabled } from '../lib/configs';\nimport { Result } from '../lib/Result';\nimport { ArrayValidator, DefaultValidator, LiteralValidator, NullishValidator, SetValidator, UnionValidator } from './imports';\nimport { getValue } from './util/getValue';\nimport { whenConstraint, type WhenKey, type WhenOptions } from '../constraints/ObjectConstrains';\nimport type { CombinedError } from '../lib/errors/CombinedError';\nimport type { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport type { UnknownEnumValueError } from '../lib/errors/UnknownEnumValueError';\nimport type { ValidationError } from '../lib/errors/ValidationError';\nimport type { BaseConstraintError, InferResultType } from '../type-exports';\nimport type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\n\nexport abstract class BaseValidator<T> {\n\tpublic description?: string;\n\tprotected parent?: object;\n\tprotected constraints: readonly IConstraint<T>[] = [];\n\tprotected isValidationEnabled: boolean | (() => boolean) | null = null;\n\n\tpublic constructor(constraints: readonly IConstraint<T>[] = []) {\n\t\tthis.constraints = constraints;\n\t}\n\n\tpublic setParent(parent: object): this {\n\t\tthis.parent = parent;\n\t\treturn this;\n\t}\n\n\tpublic get optional(): UnionValidator<T | undefined> {\n\t\treturn new UnionValidator([new LiteralValidator(undefined), this.clone()]);\n\t}\n\n\tpublic get nullable(): UnionValidator<T | null> {\n\t\treturn new UnionValidator([new LiteralValidator(null), this.clone()]);\n\t}\n\n\tpublic get nullish(): UnionValidator<T | null | undefined> {\n\t\treturn new UnionValidator([new NullishValidator(), this.clone()]);\n\t}\n\n\tpublic get array(): ArrayValidator<T[]> {\n\t\treturn new ArrayValidator<T[]>(this.clone());\n\t}\n\n\tpublic get set(): SetValidator<T> {\n\t\treturn new SetValidator<T>(this.clone());\n\t}\n\n\tpublic or<O>(...predicates: readonly BaseValidator<O>[]): UnionValidator<T | O> {\n\t\treturn new UnionValidator<T | O>([this.clone(), ...predicates]);\n\t}\n\n\tpublic transform(cb: (value: T) => T): this;\n\tpublic transform<O>(cb: (value: T) => O): BaseValidator<O>;\n\tpublic transform<O>(cb: (value: T) => O): BaseValidator<O> {\n\t\treturn this.addConstraint({ run: (input) => Result.ok(cb(input) as unknown as T) }) as unknown as BaseValidator<O>;\n\t}\n\n\tpublic reshape(cb: (input: T) => Result<T>): this;\n\tpublic reshape<R extends Result<unknown>, O = InferResultType<R>>(cb: (input: T) => R): BaseValidator<O>;\n\tpublic reshape<R extends Result<unknown>, O = InferResultType<R>>(cb: (input: T) => R): BaseValidator<O> {\n\t\treturn this.addConstraint({ run: cb as unknown as (input: T) => Result<T, BaseConstraintError<T>> }) as unknown as BaseValidator<O>;\n\t}\n\n\tpublic default(value: Exclude<T, undefined> | (() => Exclude<T, undefined>)): DefaultValidator<Exclude<T, undefined>> {\n\t\treturn new DefaultValidator(this.clone() as unknown as BaseValidator<Exclude<T, undefined>>, value);\n\t}\n\n\tpublic when<Key extends WhenKey, This extends BaseValidator<any> = this>(key: Key, options: WhenOptions<This, Key>): this {\n\t\treturn this.addConstraint(whenConstraint<This, T, Key>(key, options, this as unknown as This));\n\t}\n\n\tpublic describe(description: string): this {\n\t\tconst clone = this.clone();\n\t\tclone.description = description;\n\t\treturn clone;\n\t}\n\n\tpublic run(value: unknown): Result<T, BaseError> {\n\t\tlet result = this.handle(value) as Result<T, BaseError>;\n\t\tif (result.isErr()) return result;\n\n\t\tfor (const constraint of this.constraints) {\n\t\t\tresult = constraint.run(result.value as T, this.parent);\n\t\t\tif (result.isErr()) break;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tpublic parse<R extends T = T>(value: unknown): R {\n\t\t// If validation is disabled (at the validator or global level), we only run the `handle` method, which will do some basic checks\n\t\t// (like that the input is a string for a string validator)\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn this.handle(value).unwrap() as R;\n\t\t}\n\n\t\treturn this.constraints.reduce((v, constraint) => constraint.run(v).unwrap(), this.handle(value).unwrap()) as R;\n\t}\n\n\tpublic is<R extends T = T>(value: unknown): value is R {\n\t\treturn this.run(value).isOk();\n\t}\n\n\t/**\n\t * Sets if the validator should also run constraints or just do basic checks.\n\t * @param isValidationEnabled Whether this validator should be enabled or disabled. You can pass boolean or a function returning boolean which will be called just before parsing.\n\t * Set to `null` to go off of the global configuration.\n\t */\n\tpublic setValidationEnabled(isValidationEnabled: boolean | (() => boolean) | null): this {\n\t\tconst clone = this.clone();\n\t\tclone.isValidationEnabled = isValidationEnabled;\n\t\treturn clone;\n\t}\n\n\tpublic getValidationEnabled() {\n\t\treturn getValue(this.isValidationEnabled);\n\t}\n\n\tprotected get shouldRunConstraints(): boolean {\n\t\treturn getValue(this.isValidationEnabled) ?? getGlobalValidationEnabled();\n\t}\n\n\tprotected clone(): this {\n\t\tconst clone: this = Reflect.construct(this.constructor, [this.constraints]);\n\t\tclone.isValidationEnabled = this.isValidationEnabled;\n\t\treturn clone;\n\t}\n\n\tprotected abstract handle(value: unknown): Result<T, ValidatorError>;\n\n\tprotected addConstraint(constraint: IConstraint<T>): this {\n\t\tconst clone = this.clone();\n\t\tclone.constraints = clone.constraints.concat(constraint);\n\t\treturn clone;\n\t}\n}\n\nexport type ValidatorError = ValidationError | CombinedError | CombinedPropertyError | UnknownEnumValueError;\n","import fastDeepEqual from 'fast-deep-equal/es6/index.js';\nimport uniqWith from 'lodash/uniqWith.js';\n\nexport function isUnique(input: unknown[]) {\n\tif (input.length < 2) return true;\n\tconst uniqueArray = uniqWith(input, fastDeepEqual);\n\treturn uniqueArray.length === input.length;\n}\n","export function lessThan(a: number, b: number): boolean;\nexport function lessThan(a: bigint, b: bigint): boolean;\nexport function lessThan(a: number | bigint, b: number | bigint): boolean {\n\treturn a < b;\n}\n\nexport function lessThanOrEqual(a: number, b: number): boolean;\nexport function lessThanOrEqual(a: bigint, b: bigint): boolean;\nexport function lessThanOrEqual(a: number | bigint, b: number | bigint): boolean {\n\treturn a <= b;\n}\n\nexport function greaterThan(a: number, b: number): boolean;\nexport function greaterThan(a: bigint, b: bigint): boolean;\nexport function greaterThan(a: number | bigint, b: number | bigint): boolean {\n\treturn a > b;\n}\n\nexport function greaterThanOrEqual(a: number, b: number): boolean;\nexport function greaterThanOrEqual(a: bigint, b: bigint): boolean;\nexport function greaterThanOrEqual(a: number | bigint, b: number | bigint): boolean {\n\treturn a >= b;\n}\n\nexport function equal(a: number, b: number): boolean;\nexport function equal(a: bigint, b: bigint): boolean;\nexport function equal(a: number | bigint, b: number | bigint): boolean {\n\treturn a === b;\n}\n\nexport function notEqual(a: number, b: number): boolean;\nexport function notEqual(a: bigint, b: bigint): boolean;\nexport function notEqual(a: number | bigint, b: number | bigint): boolean {\n\treturn a !== b;\n}\n\nexport interface Comparator {\n\t(a: number, b: number): boolean;\n\t(a: bigint, b: bigint): boolean;\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { isUnique } from './util/isUnique';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\n\nexport type ArrayConstraintName = `s.array(T).${\n\t| 'unique'\n\t| `length${\n\t\t\t| 'LessThan'\n\t\t\t| 'LessThanOrEqual'\n\t\t\t| 'GreaterThan'\n\t\t\t| 'GreaterThanOrEqual'\n\t\t\t| 'Equal'\n\t\t\t| 'NotEqual'\n\t\t\t| 'Range'\n\t\t\t| 'RangeInclusive'\n\t\t\t| 'RangeExclusive'}`}`;\n\nfunction arrayLengthComparator<T>(comparator: Comparator, name: ArrayConstraintName, expected: string, length: number): IConstraint<T[]> {\n\treturn {\n\t\trun(input: T[]) {\n\t\t\treturn comparator(input.length, length) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function arrayLengthLessThan<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length < ${value}`;\n\treturn arrayLengthComparator(lessThan, 's.array(T).lengthLessThan', expected, value);\n}\n\nexport function arrayLengthLessThanOrEqual<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length <= ${value}`;\n\treturn arrayLengthComparator(lessThanOrEqual, 's.array(T).lengthLessThanOrEqual', expected, value);\n}\n\nexport function arrayLengthGreaterThan<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length > ${value}`;\n\treturn arrayLengthComparator(greaterThan, 's.array(T).lengthGreaterThan', expected, value);\n}\n\nexport function arrayLengthGreaterThanOrEqual<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length >= ${value}`;\n\treturn arrayLengthComparator(greaterThanOrEqual, 's.array(T).lengthGreaterThanOrEqual', expected, value);\n}\n\nexport function arrayLengthEqual<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length === ${value}`;\n\treturn arrayLengthComparator(equal, 's.array(T).lengthEqual', expected, value);\n}\n\nexport function arrayLengthNotEqual<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length !== ${value}`;\n\treturn arrayLengthComparator(notEqual, 's.array(T).lengthNotEqual', expected, value);\n}\n\nexport function arrayLengthRange<T>(start: number, endBefore: number): IConstraint<T[]> {\n\tconst expected = `expected.length >= ${start} && expected.length < ${endBefore}`;\n\treturn {\n\t\trun(input: T[]) {\n\t\t\treturn input.length >= start && input.length < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.array(T).lengthRange', 'Invalid Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function arrayLengthRangeInclusive<T>(start: number, end: number): IConstraint<T[]> {\n\tconst expected = `expected.length >= ${start} && expected.length <= ${end}`;\n\treturn {\n\t\trun(input: T[]) {\n\t\t\treturn input.length >= start && input.length <= end //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.array(T).lengthRangeInclusive', 'Invalid Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function arrayLengthRangeExclusive<T>(startAfter: number, endBefore: number): IConstraint<T[]> {\n\tconst expected = `expected.length > ${startAfter} && expected.length < ${endBefore}`;\n\treturn {\n\t\trun(input: T[]) {\n\t\t\treturn input.length > startAfter && input.length < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.array(T).lengthRangeExclusive', 'Invalid Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport const uniqueArray: IConstraint<unknown[]> = {\n\trun(input: unknown[]) {\n\t\treturn isUnique(input) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(new ExpectedConstraintError('s.array(T).unique', 'Array values are not unique', input, 'Expected all values to be unique'));\n\t}\n};\n","import type { InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class CombinedPropertyError extends BaseError {\n\tpublic readonly errors: [PropertyKey, BaseError][];\n\n\tpublic constructor(errors: [PropertyKey, BaseError][]) {\n\t\tsuper('Received one or more errors');\n\n\t\tthis.errors = errors;\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize('[CombinedPropertyError]', 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1, compact: true };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\n\t\tconst header = `${options.stylize('CombinedPropertyError', 'special')} (${options.stylize(this.errors.length.toString(), 'number')})`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst errors = this.errors\n\t\t\t.map(([key, error]) => {\n\t\t\t\tconst property = CombinedPropertyError.formatProperty(key, options);\n\t\t\t\tconst body = error[customInspectSymbolStackLess](depth - 1, newOptions).replace(/\\n/g, padding);\n\n\t\t\t\treturn ` input${property}${padding}${body}`;\n\t\t\t})\n\t\t\t.join('\\n\\n');\n\t\treturn `${header}\\n ${message}\\n\\n${errors}`;\n\t}\n\n\tprivate static formatProperty(key: PropertyKey, options: InspectOptionsStylized): string {\n\t\tif (typeof key === 'string') return options.stylize(`.${key}`, 'symbol');\n\t\tif (typeof key === 'number') return `[${options.stylize(key.toString(), 'number')}]`;\n\t\treturn `[${options.stylize('Symbol', 'symbol')}(${key.description})]`;\n\t}\n}\n","import { inspect, type InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class ValidationError extends BaseError {\n\tpublic readonly validator: string;\n\tpublic readonly given: unknown;\n\n\tpublic constructor(validator: string, message: string, given: unknown) {\n\t\tsuper(message);\n\n\t\tthis.validator = validator;\n\t\tthis.given = given;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tvalidator: this.validator,\n\t\t\tgiven: this.given\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst validator = options.stylize(this.validator, 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[ValidationError: ${validator}]`, 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1, compact: true };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\t\tconst given = inspect(this.given, newOptions).replace(/\\n/g, padding);\n\n\t\tconst header = `${options.stylize('ValidationError', 'special')} > ${validator}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst givenBlock = `\\n ${options.stylize('Received:', 'regexp')}${padding}${given}`;\n\t\treturn `${header}\\n ${message}\\n${givenBlock}`;\n\t}\n}\n","import {\n\tarrayLengthEqual,\n\tarrayLengthGreaterThan,\n\tarrayLengthGreaterThanOrEqual,\n\tarrayLengthLessThan,\n\tarrayLengthLessThanOrEqual,\n\tarrayLengthNotEqual,\n\tarrayLengthRange,\n\tarrayLengthRangeExclusive,\n\tarrayLengthRangeInclusive,\n\tuniqueArray\n} from '../constraints/ArrayConstraints';\nimport type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport type { ExpandSmallerTuples, Tuple, UnshiftTuple } from '../lib/util-types';\nimport { BaseValidator } from './imports';\n\nexport class ArrayValidator<T extends unknown[], I = T[number]> extends BaseValidator<T> {\n\tprivate readonly validator: BaseValidator<I>;\n\n\tpublic constructor(validator: BaseValidator<I>, constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validator = validator;\n\t}\n\n\tpublic lengthLessThan<N extends number>(length: N): ArrayValidator<ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, N>]>>> {\n\t\treturn this.addConstraint(arrayLengthLessThan(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthLessThanOrEqual<N extends number>(length: N): ArrayValidator<ExpandSmallerTuples<[...Tuple<I, N>]>> {\n\t\treturn this.addConstraint(arrayLengthLessThanOrEqual(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthGreaterThan<N extends number>(length: N): ArrayValidator<[...Tuple<I, N>, I, ...T]> {\n\t\treturn this.addConstraint(arrayLengthGreaterThan(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthGreaterThanOrEqual<N extends number>(length: N): ArrayValidator<[...Tuple<I, N>, ...T]> {\n\t\treturn this.addConstraint(arrayLengthGreaterThanOrEqual(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthEqual<N extends number>(length: N): ArrayValidator<[...Tuple<I, N>]> {\n\t\treturn this.addConstraint(arrayLengthEqual(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthNotEqual(length: number): ArrayValidator<[...T]> {\n\t\treturn this.addConstraint(arrayLengthNotEqual(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthRange<S extends number, E extends number>(\n\t\tstart: S,\n\t\tendBefore: E\n\t): ArrayValidator<Exclude<ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, E>]>>, ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, S>]>>>> {\n\t\treturn this.addConstraint(arrayLengthRange(start, endBefore) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthRangeInclusive<S extends number, E extends number>(\n\t\tstartAt: S,\n\t\tendAt: E\n\t): ArrayValidator<Exclude<ExpandSmallerTuples<[...Tuple<I, E>]>, ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, S>]>>>> {\n\t\treturn this.addConstraint(arrayLengthRangeInclusive(startAt, endAt) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthRangeExclusive<S extends number, E extends number>(\n\t\tstartAfter: S,\n\t\tendBefore: E\n\t): ArrayValidator<Exclude<ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, E>]>>, ExpandSmallerTuples<[...Tuple<T, S>]>>> {\n\t\treturn this.addConstraint(arrayLengthRangeExclusive(startAfter, endBefore) as IConstraint<T>) as any;\n\t}\n\n\tpublic get unique(): this {\n\t\treturn this.addConstraint(uniqueArray as IConstraint<T>);\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validator, this.constraints]);\n\t}\n\n\tprotected handle(values: unknown): Result<T, ValidationError | CombinedPropertyError> {\n\t\tif (!Array.isArray(values)) {\n\t\t\treturn Result.err(new ValidationError('s.array(T)', 'Expected an array', values));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(values as T);\n\t\t}\n\n\t\tconst errors: [number, BaseError][] = [];\n\t\tconst transformed: T = [] as unknown as T;\n\n\t\tfor (let i = 0; i < values.length; i++) {\n\t\t\tconst result = this.validator.run(values[i]);\n\t\t\tif (result.isOk()) transformed.push(result.value);\n\t\t\telse errors.push([i, result.error!]);\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(transformed)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\n\nexport type BigIntConstraintName = `s.bigint.${\n\t| 'lessThan'\n\t| 'lessThanOrEqual'\n\t| 'greaterThan'\n\t| 'greaterThanOrEqual'\n\t| 'equal'\n\t| 'notEqual'\n\t| 'divisibleBy'}`;\n\nfunction bigintComparator(comparator: Comparator, name: BigIntConstraintName, expected: string, number: bigint): IConstraint<bigint> {\n\treturn {\n\t\trun(input: bigint) {\n\t\t\treturn comparator(input, number) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid bigint value', input, expected));\n\t\t}\n\t};\n}\n\nexport function bigintLessThan(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected < ${value}n`;\n\treturn bigintComparator(lessThan, 's.bigint.lessThan', expected, value);\n}\n\nexport function bigintLessThanOrEqual(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected <= ${value}n`;\n\treturn bigintComparator(lessThanOrEqual, 's.bigint.lessThanOrEqual', expected, value);\n}\n\nexport function bigintGreaterThan(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected > ${value}n`;\n\treturn bigintComparator(greaterThan, 's.bigint.greaterThan', expected, value);\n}\n\nexport function bigintGreaterThanOrEqual(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected >= ${value}n`;\n\treturn bigintComparator(greaterThanOrEqual, 's.bigint.greaterThanOrEqual', expected, value);\n}\n\nexport function bigintEqual(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected === ${value}n`;\n\treturn bigintComparator(equal, 's.bigint.equal', expected, value);\n}\n\nexport function bigintNotEqual(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected !== ${value}n`;\n\treturn bigintComparator(notEqual, 's.bigint.notEqual', expected, value);\n}\n\nexport function bigintDivisibleBy(divider: bigint): IConstraint<bigint> {\n\tconst expected = `expected % ${divider}n === 0n`;\n\treturn {\n\t\trun(input: bigint) {\n\t\t\treturn input % divider === 0n //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.bigint.divisibleBy', 'BigInt is not divisible', input, expected));\n\t\t}\n\t};\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport {\n\tbigintDivisibleBy,\n\tbigintEqual,\n\tbigintGreaterThan,\n\tbigintGreaterThanOrEqual,\n\tbigintLessThan,\n\tbigintLessThanOrEqual,\n\tbigintNotEqual\n} from '../constraints/BigIntConstraints';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class BigIntValidator<T extends bigint> extends BaseValidator<T> {\n\tpublic lessThan(number: bigint): this {\n\t\treturn this.addConstraint(bigintLessThan(number) as IConstraint<T>);\n\t}\n\n\tpublic lessThanOrEqual(number: bigint): this {\n\t\treturn this.addConstraint(bigintLessThanOrEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic greaterThan(number: bigint): this {\n\t\treturn this.addConstraint(bigintGreaterThan(number) as IConstraint<T>);\n\t}\n\n\tpublic greaterThanOrEqual(number: bigint): this {\n\t\treturn this.addConstraint(bigintGreaterThanOrEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic equal<N extends bigint>(number: N): BigIntValidator<N> {\n\t\treturn this.addConstraint(bigintEqual(number) as IConstraint<T>) as unknown as BigIntValidator<N>;\n\t}\n\n\tpublic notEqual(number: bigint): this {\n\t\treturn this.addConstraint(bigintNotEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic get positive(): this {\n\t\treturn this.greaterThanOrEqual(0n);\n\t}\n\n\tpublic get negative(): this {\n\t\treturn this.lessThan(0n);\n\t}\n\n\tpublic divisibleBy(number: bigint): this {\n\t\treturn this.addConstraint(bigintDivisibleBy(number) as IConstraint<T>);\n\t}\n\n\tpublic get abs(): this {\n\t\treturn this.transform((value) => (value < 0 ? -value : value) as T);\n\t}\n\n\tpublic intN(bits: number): this {\n\t\treturn this.transform((value) => BigInt.asIntN(bits, value) as T);\n\t}\n\n\tpublic uintN(bits: number): this {\n\t\treturn this.transform((value) => BigInt.asUintN(bits, value) as T);\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn typeof value === 'bigint' //\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ValidationError('s.bigint', 'Expected a bigint primitive', value));\n\t}\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\n\nexport type BooleanConstraintName = `s.boolean.${boolean}`;\n\nexport const booleanTrue: IConstraint<boolean, true> = {\n\trun(input: boolean) {\n\t\treturn input //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(new ExpectedConstraintError('s.boolean.true', 'Invalid boolean value', input, 'true'));\n\t}\n};\n\nexport const booleanFalse: IConstraint<boolean, false> = {\n\trun(input: boolean) {\n\t\treturn input //\n\t\t\t? Result.err(new ExpectedConstraintError('s.boolean.false', 'Invalid boolean value', input, 'false'))\n\t\t\t: Result.ok(input);\n\t}\n};\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport { booleanFalse, booleanTrue } from '../constraints/BooleanConstraints';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class BooleanValidator<T extends boolean = boolean> extends BaseValidator<T> {\n\tpublic get true(): BooleanValidator<true> {\n\t\treturn this.addConstraint(booleanTrue as IConstraint<T>) as BooleanValidator<true>;\n\t}\n\n\tpublic get false(): BooleanValidator<false> {\n\t\treturn this.addConstraint(booleanFalse as IConstraint<T>) as BooleanValidator<false>;\n\t}\n\n\tpublic equal<R extends true | false>(value: R): BooleanValidator<R> {\n\t\treturn (value ? this.true : this.false) as BooleanValidator<R>;\n\t}\n\n\tpublic notEqual<R extends true | false>(value: R): BooleanValidator<R> {\n\t\treturn (value ? this.false : this.true) as BooleanValidator<R>;\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn typeof value === 'boolean' //\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ValidationError('s.boolean', 'Expected a boolean primitive', value));\n\t}\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\n\nexport type DateConstraintName = `s.date.${\n\t| 'lessThan'\n\t| 'lessThanOrEqual'\n\t| 'greaterThan'\n\t| 'greaterThanOrEqual'\n\t| 'equal'\n\t| 'notEqual'\n\t| 'valid'\n\t| 'invalid'}`;\n\nfunction dateComparator(comparator: Comparator, name: DateConstraintName, expected: string, number: number): IConstraint<Date> {\n\treturn {\n\t\trun(input: Date) {\n\t\t\treturn comparator(input.getTime(), number) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid Date value', input, expected));\n\t\t}\n\t};\n}\n\nexport function dateLessThan(value: Date): IConstraint<Date> {\n\tconst expected = `expected < ${value.toISOString()}`;\n\treturn dateComparator(lessThan, 's.date.lessThan', expected, value.getTime());\n}\n\nexport function dateLessThanOrEqual(value: Date): IConstraint<Date> {\n\tconst expected = `expected <= ${value.toISOString()}`;\n\treturn dateComparator(lessThanOrEqual, 's.date.lessThanOrEqual', expected, value.getTime());\n}\n\nexport function dateGreaterThan(value: Date): IConstraint<Date> {\n\tconst expected = `expected > ${value.toISOString()}`;\n\treturn dateComparator(greaterThan, 's.date.greaterThan', expected, value.getTime());\n}\n\nexport function dateGreaterThanOrEqual(value: Date): IConstraint<Date> {\n\tconst expected = `expected >= ${value.toISOString()}`;\n\treturn dateComparator(greaterThanOrEqual, 's.date.greaterThanOrEqual', expected, value.getTime());\n}\n\nexport function dateEqual(value: Date): IConstraint<Date> {\n\tconst expected = `expected === ${value.toISOString()}`;\n\treturn dateComparator(equal, 's.date.equal', expected, value.getTime());\n}\n\nexport function dateNotEqual(value: Date): IConstraint<Date> {\n\tconst expected = `expected !== ${value.toISOString()}`;\n\treturn dateComparator(notEqual, 's.date.notEqual', expected, value.getTime());\n}\n\nexport const dateInvalid: IConstraint<Date> = {\n\trun(input: Date) {\n\t\treturn Number.isNaN(input.getTime()) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(new ExpectedConstraintError('s.date.invalid', 'Invalid Date value', input, 'expected === NaN'));\n\t}\n};\n\nexport const dateValid: IConstraint<Date> = {\n\trun(input: Date) {\n\t\treturn Number.isNaN(input.getTime()) //\n\t\t\t? Result.err(new ExpectedConstraintError('s.date.valid', 'Invalid Date value', input, 'expected !== NaN'))\n\t\t\t: Result.ok(input);\n\t}\n};\n","import {\n\tdateEqual,\n\tdateGreaterThan,\n\tdateGreaterThanOrEqual,\n\tdateInvalid,\n\tdateLessThan,\n\tdateLessThanOrEqual,\n\tdateNotEqual,\n\tdateValid\n} from '../constraints/DateConstraints';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class DateValidator extends BaseValidator<Date> {\n\tpublic lessThan(date: Date | number | string): this {\n\t\treturn this.addConstraint(dateLessThan(new Date(date)));\n\t}\n\n\tpublic lessThanOrEqual(date: Date | number | string): this {\n\t\treturn this.addConstraint(dateLessThanOrEqual(new Date(date)));\n\t}\n\n\tpublic greaterThan(date: Date | number | string): this {\n\t\treturn this.addConstraint(dateGreaterThan(new Date(date)));\n\t}\n\n\tpublic greaterThanOrEqual(date: Date | number | string): this {\n\t\treturn this.addConstraint(dateGreaterThanOrEqual(new Date(date)));\n\t}\n\n\tpublic equal(date: Date | number | string): this {\n\t\tconst resolved = new Date(date);\n\t\treturn Number.isNaN(resolved.getTime()) //\n\t\t\t? this.invalid\n\t\t\t: this.addConstraint(dateEqual(resolved));\n\t}\n\n\tpublic notEqual(date: Date | number | string): this {\n\t\tconst resolved = new Date(date);\n\t\treturn Number.isNaN(resolved.getTime()) //\n\t\t\t? this.valid\n\t\t\t: this.addConstraint(dateNotEqual(resolved));\n\t}\n\n\tpublic get valid(): this {\n\t\treturn this.addConstraint(dateValid);\n\t}\n\n\tpublic get invalid(): this {\n\t\treturn this.addConstraint(dateInvalid);\n\t}\n\n\tprotected handle(value: unknown): Result<Date, ValidationError> {\n\t\treturn value instanceof Date //\n\t\t\t? Result.ok(value)\n\t\t\t: Result.err(new ValidationError('s.date', 'Expected a Date', value));\n\t}\n}\n","import { inspect, type InspectOptionsStylized } from 'util';\nimport { customInspectSymbolStackLess } from './BaseError';\nimport { ValidationError } from './ValidationError';\n\nexport class ExpectedValidationError<T> extends ValidationError {\n\tpublic readonly expected: T;\n\n\tpublic constructor(validator: string, message: string, given: unknown, expected: T) {\n\t\tsuper(validator, message, given);\n\t\tthis.expected = expected;\n\t}\n\n\tpublic override toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tvalidator: this.validator,\n\t\t\tgiven: this.given,\n\t\t\texpected: this.expected\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst validator = options.stylize(this.validator, 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[ExpectedValidationError: ${validator}]`, 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1 };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\t\tconst expected = inspect(this.expected, newOptions).replace(/\\n/g, padding);\n\t\tconst given = inspect(this.given, newOptions).replace(/\\n/g, padding);\n\n\t\tconst header = `${options.stylize('ExpectedValidationError', 'special')} > ${validator}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst expectedBlock = `\\n ${options.stylize('Expected:', 'string')}${padding}${expected}`;\n\t\tconst givenBlock = `\\n ${options.stylize('Received:', 'regexp')}${padding}${given}`;\n\t\treturn `${header}\\n ${message}\\n${expectedBlock}\\n${givenBlock}`;\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport { ExpectedValidationError } from '../lib/errors/ExpectedValidationError';\nimport { Result } from '../lib/Result';\nimport type { Constructor } from '../lib/util-types';\nimport { BaseValidator } from './imports';\n\nexport class InstanceValidator<T> extends BaseValidator<T> {\n\tpublic readonly expected: Constructor<T>;\n\n\tpublic constructor(expected: Constructor<T>, constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.expected = expected;\n\t}\n\n\tprotected handle(value: unknown): Result<T, ExpectedValidationError<Constructor<T>>> {\n\t\treturn value instanceof this.expected //\n\t\t\t? Result.ok(value)\n\t\t\t: Result.err(new ExpectedValidationError('s.instance(V)', 'Expected', value, this.expected));\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.expected, this.constraints]);\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport { ExpectedValidationError } from '../lib/errors/ExpectedValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class LiteralValidator<T> extends BaseValidator<T> {\n\tpublic readonly expected: T;\n\n\tpublic constructor(literal: T, constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.expected = literal;\n\t}\n\n\tprotected handle(value: unknown): Result<T, ExpectedValidationError<T>> {\n\t\treturn Object.is(value, this.expected) //\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ExpectedValidationError('s.literal(V)', 'Expected values to be equals', value, this.expected));\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.expected, this.constraints]);\n\t}\n}\n","import { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class NeverValidator extends BaseValidator<never> {\n\tprotected handle(value: unknown): Result<never, ValidationError> {\n\t\treturn Result.err(new ValidationError('s.never', 'Expected a value to not be passed', value));\n\t}\n}\n","import { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class NullishValidator extends BaseValidator<undefined | null> {\n\tprotected handle(value: unknown): Result<undefined | null, ValidationError> {\n\t\treturn value === undefined || value === null //\n\t\t\t? Result.ok(value)\n\t\t\t: Result.err(new ValidationError('s.nullish', 'Expected undefined or null', value));\n\t}\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\n\nexport type NumberConstraintName = `s.number.${\n\t| 'lessThan'\n\t| 'lessThanOrEqual'\n\t| 'greaterThan'\n\t| 'greaterThanOrEqual'\n\t| 'equal'\n\t| 'equal(NaN)'\n\t| 'notEqual'\n\t| 'notEqual(NaN)'\n\t| 'int'\n\t| 'safeInt'\n\t| 'finite'\n\t| 'divisibleBy'}`;\n\nfunction numberComparator(comparator: Comparator, name: NumberConstraintName, expected: string, number: number): IConstraint<number> {\n\treturn {\n\t\trun(input: number) {\n\t\t\treturn comparator(input, number) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid number value', input, expected));\n\t\t}\n\t};\n}\n\nexport function numberLessThan(value: number): IConstraint<number> {\n\tconst expected = `expected < ${value}`;\n\treturn numberComparator(lessThan, 's.number.lessThan', expected, value);\n}\n\nexport function numberLessThanOrEqual(value: number): IConstraint<number> {\n\tconst expected = `expected <= ${value}`;\n\treturn numberComparator(lessThanOrEqual, 's.number.lessThanOrEqual', expected, value);\n}\n\nexport function numberGreaterThan(value: number): IConstraint<number> {\n\tconst expected = `expected > ${value}`;\n\treturn numberComparator(greaterThan, 's.number.greaterThan', expected, value);\n}\n\nexport function numberGreaterThanOrEqual(value: number): IConstraint<number> {\n\tconst expected = `expected >= ${value}`;\n\treturn numberComparator(greaterThanOrEqual, 's.number.greaterThanOrEqual', expected, value);\n}\n\nexport function numberEqual(value: number): IConstraint<number> {\n\tconst expected = `expected === ${value}`;\n\treturn numberComparator(equal, 's.number.equal', expected, value);\n}\n\nexport function numberNotEqual(value: number): IConstraint<number> {\n\tconst expected = `expected !== ${value}`;\n\treturn numberComparator(notEqual, 's.number.notEqual', expected, value);\n}\n\nexport const numberInt: IConstraint<number> = {\n\trun(input: number) {\n\t\treturn Number.isInteger(input) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(\n\t\t\t\t\tnew ExpectedConstraintError('s.number.int', 'Given value is not an integer', input, 'Number.isInteger(expected) to be true')\n\t\t\t );\n\t}\n};\n\nexport const numberSafeInt: IConstraint<number> = {\n\trun(input: number) {\n\t\treturn Number.isSafeInteger(input) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(\n\t\t\t\t\tnew ExpectedConstraintError(\n\t\t\t\t\t\t's.number.safeInt',\n\t\t\t\t\t\t'Given value is not a safe integer',\n\t\t\t\t\t\tinput,\n\t\t\t\t\t\t'Number.isSafeInteger(expected) to be true'\n\t\t\t\t\t)\n\t\t\t );\n\t}\n};\n\nexport const numberFinite: IConstraint<number> = {\n\trun(input: number) {\n\t\treturn Number.isFinite(input) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(new ExpectedConstraintError('s.number.finite', 'Given value is not finite', input, 'Number.isFinite(expected) to be true'));\n\t}\n};\n\nexport const numberNaN: IConstraint<number> = {\n\trun(input: number) {\n\t\treturn Number.isNaN(input) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(new ExpectedConstraintError('s.number.equal(NaN)', 'Invalid number value', input, 'expected === NaN'));\n\t}\n};\n\nexport const numberNotNaN: IConstraint<number> = {\n\trun(input: number) {\n\t\treturn Number.isNaN(input) //\n\t\t\t? Result.err(new ExpectedConstraintError('s.number.notEqual(NaN)', 'Invalid number value', input, 'expected !== NaN'))\n\t\t\t: Result.ok(input);\n\t}\n};\n\nexport function numberDivisibleBy(divider: number): IConstraint<number> {\n\tconst expected = `expected % ${divider} === 0`;\n\treturn {\n\t\trun(input: number) {\n\t\t\treturn input % divider === 0 //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.number.divisibleBy', 'Number is not divisible', input, expected));\n\t\t}\n\t};\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport {\n\tnumberDivisibleBy,\n\tnumberEqual,\n\tnumberFinite,\n\tnumberGreaterThan,\n\tnumberGreaterThanOrEqual,\n\tnumberInt,\n\tnumberLessThan,\n\tnumberLessThanOrEqual,\n\tnumberNaN,\n\tnumberNotEqual,\n\tnumberNotNaN,\n\tnumberSafeInt\n} from '../constraints/NumberConstraints';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class NumberValidator<T extends number> extends BaseValidator<T> {\n\tpublic lessThan(number: number): this {\n\t\treturn this.addConstraint(numberLessThan(number) as IConstraint<T>);\n\t}\n\n\tpublic lessThanOrEqual(number: number): this {\n\t\treturn this.addConstraint(numberLessThanOrEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic greaterThan(number: number): this {\n\t\treturn this.addConstraint(numberGreaterThan(number) as IConstraint<T>);\n\t}\n\n\tpublic greaterThanOrEqual(number: number): this {\n\t\treturn this.addConstraint(numberGreaterThanOrEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic equal<N extends number>(number: N): NumberValidator<N> {\n\t\treturn Number.isNaN(number) //\n\t\t\t? (this.addConstraint(numberNaN as IConstraint<T>) as unknown as NumberValidator<N>)\n\t\t\t: (this.addConstraint(numberEqual(number) as IConstraint<T>) as unknown as NumberValidator<N>);\n\t}\n\n\tpublic notEqual(number: number): this {\n\t\treturn Number.isNaN(number) //\n\t\t\t? this.addConstraint(numberNotNaN as IConstraint<T>)\n\t\t\t: this.addConstraint(numberNotEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic get int(): this {\n\t\treturn this.addConstraint(numberInt as IConstraint<T>);\n\t}\n\n\tpublic get safeInt(): this {\n\t\treturn this.addConstraint(numberSafeInt as IConstraint<T>);\n\t}\n\n\tpublic get finite(): this {\n\t\treturn this.addConstraint(numberFinite as IConstraint<T>);\n\t}\n\n\tpublic get positive(): this {\n\t\treturn this.greaterThanOrEqual(0);\n\t}\n\n\tpublic get negative(): this {\n\t\treturn this.lessThan(0);\n\t}\n\n\tpublic divisibleBy(divider: number): this {\n\t\treturn this.addConstraint(numberDivisibleBy(divider) as IConstraint<T>);\n\t}\n\n\tpublic get abs(): this {\n\t\treturn this.transform(Math.abs as (value: number) => T);\n\t}\n\n\tpublic get sign(): this {\n\t\treturn this.transform(Math.sign as (value: number) => T);\n\t}\n\n\tpublic get trunc(): this {\n\t\treturn this.transform(Math.trunc as (value: number) => T);\n\t}\n\n\tpublic get floor(): this {\n\t\treturn this.transform(Math.floor as (value: number) => T);\n\t}\n\n\tpublic get fround(): this {\n\t\treturn this.transform(Math.fround as (value: number) => T);\n\t}\n\n\tpublic get round(): this {\n\t\treturn this.transform(Math.round as (value: number) => T);\n\t}\n\n\tpublic get ceil(): this {\n\t\treturn this.transform(Math.ceil as (value: number) => T);\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn typeof value === 'number' //\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ValidationError('s.number', 'Expected a number primitive', value));\n\t}\n}\n","import type { InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class MissingPropertyError extends BaseError {\n\tpublic readonly property: PropertyKey;\n\n\tpublic constructor(property: PropertyKey) {\n\t\tsuper('A required property is missing');\n\t\tthis.property = property;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tproperty: this.property\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst property = options.stylize(this.property.toString(), 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[MissingPropertyError: ${property}]`, 'special');\n\t\t}\n\n\t\tconst header = `${options.stylize('MissingPropertyError', 'special')} > ${property}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\treturn `${header}\\n ${message}`;\n\t}\n}\n","import { inspect, type InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class UnknownPropertyError extends BaseError {\n\tpublic readonly property: PropertyKey;\n\tpublic readonly value: unknown;\n\n\tpublic constructor(property: PropertyKey, value: unknown) {\n\t\tsuper('Received unexpected property');\n\n\t\tthis.property = property;\n\t\tthis.value = value;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tproperty: this.property,\n\t\t\tvalue: this.value\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst property = options.stylize(this.property.toString(), 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[UnknownPropertyError: ${property}]`, 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1, compact: true };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\t\tconst given = inspect(this.value, newOptions).replace(/\\n/g, padding);\n\n\t\tconst header = `${options.stylize('UnknownPropertyError', 'special')} > ${property}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst givenBlock = `\\n ${options.stylize('Received:', 'regexp')}${padding}${given}`;\n\t\treturn `${header}\\n ${message}\\n${givenBlock}`;\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport { Result } from '../lib/Result';\nimport type { ValidatorError } from './BaseValidator';\nimport { BaseValidator } from './imports';\nimport { getValue } from './util/getValue';\n\nexport class DefaultValidator<T> extends BaseValidator<T> {\n\tprivate readonly validator: BaseValidator<T>;\n\tprivate defaultValue: T | (() => T);\n\n\tpublic constructor(validator: BaseValidator<T>, value: T | (() => T), constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validator = validator;\n\t\tthis.defaultValue = value;\n\t}\n\n\tpublic override default(value: Exclude<T, undefined> | (() => Exclude<T, undefined>)): DefaultValidator<Exclude<T, undefined>> {\n\t\tconst clone = this.clone() as unknown as DefaultValidator<Exclude<T, undefined>>;\n\t\tclone.defaultValue = value;\n\t\treturn clone;\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidatorError> {\n\t\treturn typeof value === 'undefined' //\n\t\t\t? Result.ok(getValue(this.defaultValue))\n\t\t\t: this.validator['handle'](value); // eslint-disable-line @typescript-eslint/dot-notation\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validator, this.defaultValue, this.constraints]);\n\t}\n}\n","import type { InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class CombinedError extends BaseError {\n\tpublic readonly errors: readonly BaseError[];\n\n\tpublic constructor(errors: readonly BaseError[]) {\n\t\tsuper('Received one or more errors');\n\n\t\tthis.errors = errors;\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize('[CombinedError]', 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1, compact: true };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\n\t\tconst header = `${options.stylize('CombinedError', 'special')} (${options.stylize(this.errors.length.toString(), 'number')})`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst errors = this.errors\n\t\t\t.map((error, i) => {\n\t\t\t\tconst index = options.stylize((i + 1).toString(), 'number');\n\t\t\t\tconst body = error[customInspectSymbolStackLess](depth - 1, newOptions).replace(/\\n/g, padding);\n\n\t\t\t\treturn ` ${index} ${body}`;\n\t\t\t})\n\t\t\t.join('\\n\\n');\n\t\treturn `${header}\\n ${message}\\n\\n${errors}`;\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedError } from '../lib/errors/CombinedError';\nimport type { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator, LiteralValidator, NullishValidator } from './imports';\n\nexport class UnionValidator<T> extends BaseValidator<T> {\n\tprivate validators: readonly BaseValidator<T>[];\n\n\tpublic constructor(validators: readonly BaseValidator<T>[], constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validators = validators;\n\t}\n\n\tpublic override get optional(): UnionValidator<T | undefined> {\n\t\tif (this.validators.length === 0) return new UnionValidator<T | undefined>([new LiteralValidator(undefined)], this.constraints);\n\n\t\tconst [validator] = this.validators;\n\t\tif (validator instanceof LiteralValidator) {\n\t\t\t// If already optional, return a clone:\n\t\t\tif (validator.expected === undefined) return this.clone();\n\n\t\t\t// If it's nullable, convert the nullable validator into a nullish validator to optimize `null | undefined`:\n\t\t\tif (validator.expected === null) {\n\t\t\t\treturn new UnionValidator<T | null | undefined>(\n\t\t\t\t\t[new NullishValidator(), ...this.validators.slice(1)],\n\t\t\t\t\tthis.constraints\n\t\t\t\t) as UnionValidator<T | undefined>;\n\t\t\t}\n\t\t} else if (validator instanceof NullishValidator) {\n\t\t\t// If it's already nullish (which validates optional), return a clone:\n\t\t\treturn this.clone();\n\t\t}\n\n\t\treturn new UnionValidator([new LiteralValidator(undefined), ...this.validators]);\n\t}\n\n\tpublic get required(): UnionValidator<Exclude<T, undefined>> {\n\t\ttype RequiredValidator = UnionValidator<Exclude<T, undefined>>;\n\n\t\tif (this.validators.length === 0) return this.clone() as unknown as RequiredValidator;\n\n\t\tconst [validator] = this.validators;\n\t\tif (validator instanceof LiteralValidator) {\n\t\t\tif (validator.expected === undefined) return new UnionValidator(this.validators.slice(1), this.constraints) as RequiredValidator;\n\t\t} else if (validator instanceof NullishValidator) {\n\t\t\treturn new UnionValidator([new LiteralValidator(null), ...this.validators.slice(1)], this.constraints) as RequiredValidator;\n\t\t}\n\n\t\treturn this.clone() as unknown as RequiredValidator;\n\t}\n\n\tpublic override get nullable(): UnionValidator<T | null> {\n\t\tif (this.validators.length === 0) return new UnionValidator<T | null>([new LiteralValidator(null)], this.constraints);\n\n\t\tconst [validator] = this.validators;\n\t\tif (validator instanceof LiteralValidator) {\n\t\t\t// If already nullable, return a clone:\n\t\t\tif (validator.expected === null) return this.clone();\n\n\t\t\t// If it's optional, convert the optional validator into a nullish validator to optimize `null | undefined`:\n\t\t\tif (validator.expected === undefined) {\n\t\t\t\treturn new UnionValidator<T | null | undefined>(\n\t\t\t\t\t[new NullishValidator(), ...this.validators.slice(1)],\n\t\t\t\t\tthis.constraints\n\t\t\t\t) as UnionValidator<T | null>;\n\t\t\t}\n\t\t} else if (validator instanceof NullishValidator) {\n\t\t\t// If it's already nullish (which validates nullable), return a clone:\n\t\t\treturn this.clone();\n\t\t}\n\n\t\treturn new UnionValidator([new LiteralValidator(null), ...this.validators]);\n\t}\n\n\tpublic override get nullish(): UnionValidator<T | null | undefined> {\n\t\tif (this.validators.length === 0) return new UnionValidator<T | null | undefined>([new NullishValidator()], this.constraints);\n\n\t\tconst [validator] = this.validators;\n\t\tif (validator instanceof LiteralValidator) {\n\t\t\t// If already nullable or optional, promote the union to nullish:\n\t\t\tif (validator.expected === null || validator.expected === undefined) {\n\t\t\t\treturn new UnionValidator<T | null | undefined>([new NullishValidator(), ...this.validators.slice(1)], this.constraints);\n\t\t\t}\n\t\t} else if (validator instanceof NullishValidator) {\n\t\t\t// If it's already nullish, return a clone:\n\t\t\treturn this.clone();\n\t\t}\n\n\t\treturn new UnionValidator<T | null | undefined>([new NullishValidator(), ...this.validators]);\n\t}\n\n\tpublic override or<O>(...predicates: readonly BaseValidator<O>[]): UnionValidator<T | O> {\n\t\treturn new UnionValidator<T | O>([...this.validators, ...predicates]);\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validators, this.constraints]);\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError | CombinedError> {\n\t\tconst errors: BaseError[] = [];\n\n\t\tfor (const validator of this.validators) {\n\t\t\tconst result = validator.run(value);\n\t\t\tif (result.isOk()) return result as Result<T, CombinedError>;\n\t\t\terrors.push(result.error!);\n\t\t}\n\n\t\treturn Result.err(new CombinedError(errors));\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport { MissingPropertyError } from '../lib/errors/MissingPropertyError';\nimport { UnknownPropertyError } from '../lib/errors/UnknownPropertyError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport type { MappedObjectValidator, UndefinedToOptional } from '../lib/util-types';\nimport { BaseValidator } from './BaseValidator';\nimport { DefaultValidator } from './DefaultValidator';\nimport { LiteralValidator } from './LiteralValidator';\nimport { NullishValidator } from './NullishValidator';\nimport { UnionValidator } from './UnionValidator';\n\nexport class ObjectValidator<T extends object, I = UndefinedToOptional<T>> extends BaseValidator<I> {\n\tpublic readonly shape: MappedObjectValidator<T>;\n\tpublic readonly strategy: ObjectValidatorStrategy;\n\tprivate readonly keys: readonly (keyof I)[] = [];\n\tprivate readonly handleStrategy: (value: object) => Result<I, CombinedPropertyError>;\n\n\tprivate readonly requiredKeys = new Map<keyof I, BaseValidator<unknown>>();\n\tprivate readonly possiblyUndefinedKeys = new Map<keyof I, BaseValidator<unknown>>();\n\tprivate readonly possiblyUndefinedKeysWithDefaults = new Map<keyof I, DefaultValidator<unknown>>();\n\n\tpublic constructor(\n\t\tshape: MappedObjectValidator<T>,\n\t\tstrategy: ObjectValidatorStrategy = ObjectValidatorStrategy.Ignore,\n\t\tconstraints: readonly IConstraint<I>[] = []\n\t) {\n\t\tsuper(constraints);\n\t\tthis.shape = shape;\n\t\tthis.strategy = strategy;\n\n\t\tswitch (this.strategy) {\n\t\t\tcase ObjectValidatorStrategy.Ignore:\n\t\t\t\tthis.handleStrategy = (value) => this.handleIgnoreStrategy(value);\n\t\t\t\tbreak;\n\t\t\tcase ObjectValidatorStrategy.Strict: {\n\t\t\t\tthis.handleStrategy = (value) => this.handleStrictStrategy(value);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase ObjectValidatorStrategy.Passthrough:\n\t\t\t\tthis.handleStrategy = (value) => this.handlePassthroughStrategy(value);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tconst shapeEntries = Object.entries(shape) as [keyof I, BaseValidator<T>][];\n\t\tthis.keys = shapeEntries.map(([key]) => key);\n\n\t\tfor (const [key, validator] of shapeEntries) {\n\t\t\tif (validator instanceof UnionValidator) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/dot-notation\n\t\t\t\tconst [possiblyLiteralOrNullishPredicate] = validator['validators'];\n\n\t\t\t\tif (possiblyLiteralOrNullishPredicate instanceof NullishValidator) {\n\t\t\t\t\tthis.possiblyUndefinedKeys.set(key, validator);\n\t\t\t\t} else if (possiblyLiteralOrNullishPredicate instanceof LiteralValidator) {\n\t\t\t\t\tif (possiblyLiteralOrNullishPredicate.expected === undefined) {\n\t\t\t\t\t\tthis.possiblyUndefinedKeys.set(key, validator);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.requiredKeys.set(key, validator);\n\t\t\t\t\t}\n\t\t\t\t} else if (validator instanceof DefaultValidator) {\n\t\t\t\t\tthis.possiblyUndefinedKeysWithDefaults.set(key, validator);\n\t\t\t\t} else {\n\t\t\t\t\tthis.requiredKeys.set(key, validator);\n\t\t\t\t}\n\t\t\t} else if (validator instanceof NullishValidator) {\n\t\t\t\tthis.possiblyUndefinedKeys.set(key, validator);\n\t\t\t} else if (validator instanceof LiteralValidator) {\n\t\t\t\tif (validator.expected === undefined) {\n\t\t\t\t\tthis.possiblyUndefinedKeys.set(key, validator);\n\t\t\t\t} else {\n\t\t\t\t\tthis.requiredKeys.set(key, validator);\n\t\t\t\t}\n\t\t\t} else if (validator instanceof DefaultValidator) {\n\t\t\t\tthis.possiblyUndefinedKeysWithDefaults.set(key, validator);\n\t\t\t} else {\n\t\t\t\tthis.requiredKeys.set(key, validator);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic get strict(): this {\n\t\treturn Reflect.construct(this.constructor, [this.shape, ObjectValidatorStrategy.Strict, this.constraints]);\n\t}\n\n\tpublic get ignore(): this {\n\t\treturn Reflect.construct(this.constructor, [this.shape, ObjectValidatorStrategy.Ignore, this.constraints]);\n\t}\n\n\tpublic get passthrough(): this {\n\t\treturn Reflect.construct(this.constructor, [this.shape, ObjectValidatorStrategy.Passthrough, this.constraints]);\n\t}\n\n\tpublic get partial(): ObjectValidator<{ [Key in keyof I]?: I[Key] }> {\n\t\tconst shape = Object.fromEntries(this.keys.map((key) => [key, this.shape[key as unknown as keyof typeof this.shape].optional]));\n\t\treturn Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);\n\t}\n\n\tpublic get required(): ObjectValidator<{ [Key in keyof I]-?: I[Key] }> {\n\t\tconst shape = Object.fromEntries(\n\t\t\tthis.keys.map((key) => {\n\t\t\t\tlet validator = this.shape[key as unknown as keyof typeof this.shape];\n\t\t\t\tif (validator instanceof UnionValidator) validator = validator.required;\n\t\t\t\treturn [key, validator];\n\t\t\t})\n\t\t);\n\t\treturn Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);\n\t}\n\n\tpublic extend<ET extends object>(schema: ObjectValidator<ET> | MappedObjectValidator<ET>): ObjectValidator<T & ET> {\n\t\tconst shape = { ...this.shape, ...(schema instanceof ObjectValidator ? schema.shape : schema) };\n\t\treturn Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);\n\t}\n\n\tpublic pick<K extends keyof I>(keys: readonly K[]): ObjectValidator<{ [Key in keyof Pick<I, K>]: I[Key] }> {\n\t\tconst shape = Object.fromEntries(\n\t\t\tkeys.filter((key) => this.keys.includes(key)).map((key) => [key, this.shape[key as unknown as keyof typeof this.shape]])\n\t\t);\n\t\treturn Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);\n\t}\n\n\tpublic omit<K extends keyof I>(keys: readonly K[]): ObjectValidator<{ [Key in keyof Omit<I, K>]: I[Key] }> {\n\t\tconst shape = Object.fromEntries(\n\t\t\tthis.keys.filter((key) => !keys.includes(key as any)).map((key) => [key, this.shape[key as unknown as keyof typeof this.shape]])\n\t\t);\n\t\treturn Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);\n\t}\n\n\tprotected override handle(value: unknown): Result<I, ValidationError | CombinedPropertyError> {\n\t\tconst typeOfValue = typeof value;\n\t\tif (typeOfValue !== 'object') {\n\t\t\treturn Result.err(new ValidationError('s.object(T)', `Expected the value to be an object, but received ${typeOfValue} instead`, value));\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn Result.err(new ValidationError('s.object(T)', 'Expected the value to not be null', value));\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\treturn Result.err(new ValidationError('s.object(T)', 'Expected the value to not be an array', value));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(value as I);\n\t\t}\n\n\t\tfor (const predicate of Object.values(this.shape) as BaseValidator<any>[]) {\n\t\t\tpredicate.setParent(this.parent ?? value!);\n\t\t}\n\n\t\treturn this.handleStrategy(value as object);\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.shape, this.strategy, this.constraints]);\n\t}\n\n\tprivate handleIgnoreStrategy(value: object): Result<I, CombinedPropertyError> {\n\t\tconst errors: [PropertyKey, BaseError][] = [];\n\t\tconst finalObject = {} as I;\n\t\tconst inputEntries = new Map(Object.entries(value) as [keyof I, unknown][]);\n\n\t\tconst runPredicate = (key: keyof I, predicate: BaseValidator<unknown>) => {\n\t\t\tconst result = predicate.run(value[key as keyof object]);\n\n\t\t\tif (result.isOk()) {\n\t\t\t\tfinalObject[key] = result.value as I[keyof I];\n\t\t\t} else {\n\t\t\t\tconst error = result.error!;\n\t\t\t\terrors.push([key, error]);\n\t\t\t}\n\t\t};\n\n\t\tfor (const [key, predicate] of this.requiredKeys) {\n\t\t\tif (inputEntries.delete(key)) {\n\t\t\t\trunPredicate(key, predicate);\n\t\t\t} else {\n\t\t\t\terrors.push([key, new MissingPropertyError(key)]);\n\t\t\t}\n\t\t}\n\n\t\t// Run possibly undefined keys that also have defaults even if there are no more keys to process (this is necessary so we fill in those defaults)\n\t\tfor (const [key, validator] of this.possiblyUndefinedKeysWithDefaults) {\n\t\t\tinputEntries.delete(key);\n\t\t\trunPredicate(key, validator);\n\t\t}\n\n\t\t// Early exit if there are no more properties to validate in the object and there are errors to report\n\t\tif (inputEntries.size === 0) {\n\t\t\treturn errors.length === 0 //\n\t\t\t\t? Result.ok(finalObject)\n\t\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t\t}\n\n\t\t// In the event the remaining keys to check are less than the number of possible undefined keys, we check those\n\t\t// as it could yield a faster execution\n\t\tconst checkInputEntriesInsteadOfSchemaKeys = this.possiblyUndefinedKeys.size > inputEntries.size;\n\n\t\tif (checkInputEntriesInsteadOfSchemaKeys) {\n\t\t\tfor (const [key] of inputEntries) {\n\t\t\t\tconst predicate = this.possiblyUndefinedKeys.get(key);\n\n\t\t\t\tif (predicate) {\n\t\t\t\t\trunPredicate(key, predicate);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (const [key, predicate] of this.possiblyUndefinedKeys) {\n\t\t\t\tif (inputEntries.delete(key)) {\n\t\t\t\t\trunPredicate(key, predicate);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(finalObject)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n\n\tprivate handleStrictStrategy(value: object): Result<I, CombinedPropertyError> {\n\t\tconst errors: [PropertyKey, BaseError][] = [];\n\t\tconst finalResult = {} as I;\n\t\tconst inputEntries = new Map(Object.entries(value) as [keyof I, unknown][]);\n\n\t\tconst runPredicate = (key: keyof I, predicate: BaseValidator<unknown>) => {\n\t\t\tconst result = predicate.run(value[key as keyof object]);\n\n\t\t\tif (result.isOk()) {\n\t\t\t\tfinalResult[key] = result.value as I[keyof I];\n\t\t\t} else {\n\t\t\t\tconst error = result.error!;\n\t\t\t\terrors.push([key, error]);\n\t\t\t}\n\t\t};\n\n\t\tfor (const [key, predicate] of this.requiredKeys) {\n\t\t\tif (inputEntries.delete(key)) {\n\t\t\t\trunPredicate(key, predicate);\n\t\t\t} else {\n\t\t\t\terrors.push([key, new MissingPropertyError(key)]);\n\t\t\t}\n\t\t}\n\n\t\t// Run possibly undefined keys that also have defaults even if there are no more keys to process (this is necessary so we fill in those defaults)\n\t\tfor (const [key, validator] of this.possiblyUndefinedKeysWithDefaults) {\n\t\t\tinputEntries.delete(key);\n\t\t\trunPredicate(key, validator);\n\t\t}\n\n\t\tfor (const [key, predicate] of this.possiblyUndefinedKeys) {\n\t\t\t// All of these validators are assumed to be possibly undefined, so if we have gone through the entire object and there's still validators,\n\t\t\t// safe to assume we're done here\n\t\t\tif (inputEntries.size === 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (inputEntries.delete(key)) {\n\t\t\t\trunPredicate(key, predicate);\n\t\t\t}\n\t\t}\n\n\t\tif (inputEntries.size !== 0) {\n\t\t\tfor (const [key, value] of inputEntries.entries()) {\n\t\t\t\terrors.push([key, new UnknownPropertyError(key, value)]);\n\t\t\t}\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(finalResult)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n\n\tprivate handlePassthroughStrategy(value: object): Result<I, CombinedPropertyError> {\n\t\tconst result = this.handleIgnoreStrategy(value);\n\t\treturn result.isErr() ? result : Result.ok({ ...value, ...result.value } as I);\n\t}\n}\n\nexport enum ObjectValidatorStrategy {\n\tIgnore,\n\tStrict,\n\tPassthrough\n}\n","import type { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class PassthroughValidator<T extends any | unknown> extends BaseValidator<T> {\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn Result.ok(value as T);\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class RecordValidator<T> extends BaseValidator<Record<string, T>> {\n\tprivate readonly validator: BaseValidator<T>;\n\n\tpublic constructor(validator: BaseValidator<T>, constraints: readonly IConstraint<Record<string, T>>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validator = validator;\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validator, this.constraints]);\n\t}\n\n\tprotected handle(value: unknown): Result<Record<string, T>, ValidationError | CombinedPropertyError> {\n\t\tif (typeof value !== 'object') {\n\t\t\treturn Result.err(new ValidationError('s.record(T)', 'Expected an object', value));\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn Result.err(new ValidationError('s.record(T)', 'Expected the value to not be null', value));\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\treturn Result.err(new ValidationError('s.record(T)', 'Expected the value to not be an array', value));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(value as Record<string, T>);\n\t\t}\n\n\t\tconst errors: [string, BaseError][] = [];\n\t\tconst transformed: Record<string, T> = {};\n\n\t\tfor (const [key, val] of Object.entries(value!)) {\n\t\t\tconst result = this.validator.run(val);\n\t\t\tif (result.isOk()) transformed[key] = result.value;\n\t\t\telse errors.push([key, result.error!]);\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(transformed)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedError } from '../lib/errors/CombinedError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class SetValidator<T> extends BaseValidator<Set<T>> {\n\tprivate readonly validator: BaseValidator<T>;\n\n\tpublic constructor(validator: BaseValidator<T>, constraints: readonly IConstraint<Set<T>>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validator = validator;\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validator, this.constraints]);\n\t}\n\n\tprotected handle(values: unknown): Result<Set<T>, ValidationError | CombinedError> {\n\t\tif (!(values instanceof Set)) {\n\t\t\treturn Result.err(new ValidationError('s.set(T)', 'Expected a set', values));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(values);\n\t\t}\n\n\t\tconst errors: BaseError[] = [];\n\t\tconst transformed = new Set<T>();\n\n\t\tfor (const value of values) {\n\t\t\tconst result = this.validator.run(value);\n\t\t\tif (result.isOk()) transformed.add(result.value);\n\t\t\telse errors.push(result.error!);\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(transformed)\n\t\t\t: Result.err(new CombinedError(errors));\n\t}\n}\n","/**\n * [RFC-5322](https://datatracker.ietf.org/doc/html/rfc5322)\n * compliant {@link RegExp} to validate an email address\n *\n * @see https://stackoverflow.com/questions/201323/how-can-i-validate-an-email-address-using-a-regular-expression/201378#201378\n */\nconst accountRegex =\n\t/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")$/;\n\n/**\n * Validates an email address string based on various checks:\n * - It must be a non nullish and non empty string\n * - It must include at least an `@` symbol`\n * - The account name may not exceed 64 characters\n * - The domain name may not exceed 255 characters\n * - The domain must include at least one `.` symbol\n * - Each part of the domain, split by `.` must not exceed 63 characters\n * - The email address must be [RFC-5322](https://datatracker.ietf.org/doc/html/rfc5322) compliant\n * @param email The email to validate\n * @returns `true` if the email is valid, `false` otherwise\n *\n * @remark Based on the following sources:\n * - `email-validator` by [manisharaan](https://github.com/manishsaraan) ([code](https://github.com/manishsaraan/email-validator/blob/master/index.js))\n * - [Comparing E-mail Address Validating Regular Expressions](http://fightingforalostcause.net/misc/2006/compare-email-regex.php)\n * - [Validating Email Addresses by Derrick Pallas](http://thedailywtf.com/Articles/Validating_Email_Addresses.aspx)\n * - [StackOverflow answer by bortzmeyer](http://stackoverflow.com/questions/201323/what-is-the-best-regular-expression-for-validating-email-addresses/201378#201378)\n * - [The wikipedia page on Email addresses](https://en.wikipedia.org/wiki/Email_address)\n */\nexport function validateEmail(email: string): boolean {\n\t// 1. Non-nullish and non-empty string check.\n\t//\n\t// If a nullish or empty email was provided then do an early exit\n\tif (!email) return false;\n\n\t// Find the location of the @ symbol:\n\tconst atIndex = email.indexOf('@');\n\n\t// 2. @ presence check.\n\t//\n\t// If the email does not have the @ symbol, it's automatically invalid:\n\tif (atIndex === -1) return false;\n\n\t// 3. <account> maximum length check.\n\t//\n\t// From <account>@<domain>, if <account> exceeds 64 characters, then the\n\t// position of the @ symbol is 64 or greater. In this case, the email is\n\t// invalid:\n\tif (atIndex > 64) return false;\n\n\tconst domainIndex = atIndex + 1;\n\n\t// 7.1. Duplicated @ symbol check.\n\t//\n\t// If there's a second @ symbol, the email is automatically invalid:\n\tif (email.includes('@', domainIndex)) return false;\n\n\t// 4. <domain> maximum length check.\n\t//\n\t// From <account>@<domain>, if <domain> exceeds 255 characters, then it\n\t// means that the amount of characters between the start of <domain> and the\n\t// end of the string is separated by 255 or more characters.\n\tif (email.length - domainIndex > 255) return false;\n\n\t// Find the location of the . symbol in <domain>:\n\tlet dotIndex = email.indexOf('.', domainIndex);\n\n\t// 5. <domain> dot (.) symbol check.\n\t//\n\t// From <account>@<domain>, if <domain> does not contain a dot (.) symbol,\n\t// then it means the domain is invalid.\n\tif (dotIndex === -1) return false;\n\n\t// 6. <domain> parts length.\n\t//\n\t// Assign a temporary variable to store the start of the last read domain\n\t// part, this would be at the start of <domain>.\n\t//\n\t// For a <domain> part to be correct, it must have at most, 63 characters.\n\t// We repeat this step for every sub-section of <domain> contained within\n\t// dot (.) symbols.\n\t//\n\t// The following step is a more optimized version of the following code:\n\t//\n\t// ```javascript\n\t// domain.split('.').some((part) => part.length > 63);\n\t// ```\n\tlet lastDotIndex = domainIndex;\n\tdo {\n\t\tif (dotIndex - lastDotIndex > 63) return false;\n\n\t\tlastDotIndex = dotIndex + 1;\n\t} while ((dotIndex = email.indexOf('.', lastDotIndex)) !== -1);\n\n\t// The loop iterates from the first to the n - 1 part, this line checks for\n\t// the last (n) part:\n\tif (email.length - lastDotIndex > 63) return false;\n\n\t// 7.2. Character checks.\n\t//\n\t// From <account>@<domain>:\n\t// - Extract the <account> part by slicing the input from start to the @\n\t// character. Validate afterwards.\n\t// - Extract the <domain> part by slicing the input from the start of\n\t// <domain>. Validate afterwards.\n\t//\n\t// Note: we inline the variables so <domain> isn't created unless the\n\t// <account> check passes.\n\treturn accountRegex.test(email.slice(0, atIndex)) && validateEmailDomain(email.slice(domainIndex));\n}\n\nfunction validateEmailDomain(domain: string): boolean {\n\ttry {\n\t\treturn new URL(`http://${domain}`).hostname === domain;\n\t} catch {\n\t\treturn false;\n\t}\n}\n","/**\n * Code ported from https://github.com/nodejs/node/blob/5fad0b93667ffc6e4def52996b9529ac99b26319/lib/internal/net.js\n */\n\n// IPv4 Segment\nconst v4Seg = '(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';\nconst v4Str = `(${v4Seg}[.]){3}${v4Seg}`;\nconst IPv4Reg = new RegExp(`^${v4Str}$`);\n\n// IPv6 Segment\nconst v6Seg = '(?:[0-9a-fA-F]{1,4})';\nconst IPv6Reg = new RegExp(\n\t'^(' +\n\t\t`(?:${v6Seg}:){7}(?:${v6Seg}|:)|` +\n\t\t`(?:${v6Seg}:){6}(?:${v4Str}|:${v6Seg}|:)|` +\n\t\t`(?:${v6Seg}:){5}(?::${v4Str}|(:${v6Seg}){1,2}|:)|` +\n\t\t`(?:${v6Seg}:){4}(?:(:${v6Seg}){0,1}:${v4Str}|(:${v6Seg}){1,3}|:)|` +\n\t\t`(?:${v6Seg}:){3}(?:(:${v6Seg}){0,2}:${v4Str}|(:${v6Seg}){1,4}|:)|` +\n\t\t`(?:${v6Seg}:){2}(?:(:${v6Seg}){0,3}:${v4Str}|(:${v6Seg}){1,5}|:)|` +\n\t\t`(?:${v6Seg}:){1}(?:(:${v6Seg}){0,4}:${v4Str}|(:${v6Seg}){1,6}|:)|` +\n\t\t`(?::((?::${v6Seg}){0,5}:${v4Str}|(?::${v6Seg}){1,7}|:))` +\n\t\t')(%[0-9a-zA-Z-.:]{1,})?$'\n);\n\nexport function isIPv4(s: string): boolean {\n\treturn IPv4Reg.test(s);\n}\n\nexport function isIPv6(s: string): boolean {\n\treturn IPv6Reg.test(s);\n}\n\nexport function isIP(s: string): number {\n\tif (isIPv4(s)) return 4;\n\tif (isIPv6(s)) return 6;\n\treturn 0;\n}\n","export const phoneNumberRegex = /^((?:\\+|0{0,2})\\d{1,2}\\s?)?\\(?\\d{3}\\)?[\\s.-]?\\d{3}[\\s.-]?\\d{4}$/;\n\nexport function validatePhoneNumber(input: string) {\n\treturn phoneNumberRegex.test(input);\n}\n","import { inspect, type InspectOptionsStylized } from 'util';\nimport { customInspectSymbolStackLess } from './BaseError';\nimport { BaseConstraintError, type ConstraintErrorNames } from './BaseConstraintError';\n\nexport class MultiplePossibilitiesConstraintError<T = unknown> extends BaseConstraintError<T> {\n\tpublic readonly expected: readonly string[];\n\n\tpublic constructor(constraint: ConstraintErrorNames, message: string, given: T, expected: readonly string[]) {\n\t\tsuper(constraint, message, given);\n\t\tthis.expected = expected;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tconstraint: this.constraint,\n\t\t\tgiven: this.given,\n\t\t\texpected: this.expected\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst constraint = options.stylize(this.constraint, 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[MultiplePossibilitiesConstraintError: ${constraint}]`, 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1 };\n\n\t\tconst verticalLine = options.stylize('|', 'undefined');\n\t\tconst padding = `\\n ${verticalLine} `;\n\t\tconst given = inspect(this.given, newOptions).replace(/\\n/g, padding);\n\n\t\tconst header = `${options.stylize('MultiplePossibilitiesConstraintError', 'special')} > ${constraint}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\n\t\tconst expectedPadding = `\\n ${verticalLine} - `;\n\t\tconst expectedBlock = `\\n ${options.stylize('Expected any of the following:', 'string')}${expectedPadding}${this.expected\n\t\t\t.map((possible) => options.stylize(possible, 'boolean'))\n\t\t\t.join(expectedPadding)}`;\n\t\tconst givenBlock = `\\n ${options.stylize('Received:', 'regexp')}${padding}${given}`;\n\t\treturn `${header}\\n ${message}\\n${expectedBlock}\\n${givenBlock}`;\n\t}\n}\n","export function combinedErrorFn<P extends [...any], E extends Error>(...fns: ErrorFn<P, E>[]): ErrorFn<P, E> {\n\tswitch (fns.length) {\n\t\tcase 0:\n\t\t\treturn () => null;\n\t\tcase 1:\n\t\t\treturn fns[0];\n\t\tcase 2: {\n\t\t\tconst [fn0, fn1] = fns;\n\t\t\treturn (...params) => fn0(...params) || fn1(...params);\n\t\t}\n\t\tdefault: {\n\t\t\treturn (...params) => {\n\t\t\t\tfor (const fn of fns) {\n\t\t\t\t\tconst result = fn(...params);\n\t\t\t\t\tif (result) return result;\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\t\t\t};\n\t\t}\n\t}\n}\n\nexport type ErrorFn<P extends [...any], E extends Error> = (...params: P) => E | null;\n","import { MultiplePossibilitiesConstraintError } from '../../lib/errors/MultiplePossibilitiesConstraintError';\nimport { combinedErrorFn, type ErrorFn } from './common/combinedResultFn';\n\nexport type StringProtocol = `${string}:`;\n\nexport type StringDomain = `${string}.${string}`;\n\nexport interface UrlOptions {\n\tallowedProtocols?: StringProtocol[];\n\tallowedDomains?: StringDomain[];\n}\n\nexport function createUrlValidators(options?: UrlOptions) {\n\tconst fns: ErrorFn<[input: string, url: URL], MultiplePossibilitiesConstraintError<string>>[] = [];\n\n\tif (options?.allowedProtocols?.length) fns.push(allowedProtocolsFn(options.allowedProtocols));\n\tif (options?.allowedDomains?.length) fns.push(allowedDomainsFn(options.allowedDomains));\n\n\treturn combinedErrorFn(...fns);\n}\n\nfunction allowedProtocolsFn(allowedProtocols: StringProtocol[]) {\n\treturn (input: string, url: URL) =>\n\t\tallowedProtocols.includes(url.protocol as StringProtocol)\n\t\t\t? null\n\t\t\t: new MultiplePossibilitiesConstraintError('s.string.url', 'Invalid URL protocol', input, allowedProtocols);\n}\n\nfunction allowedDomainsFn(allowedDomains: StringDomain[]) {\n\treturn (input: string, url: URL) =>\n\t\tallowedDomains.includes(url.hostname as StringDomain)\n\t\t\t? null\n\t\t\t: new MultiplePossibilitiesConstraintError('s.string.url', 'Invalid URL domain', input, allowedDomains);\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { validateEmail } from './util/emailValidator';\nimport { isIP, isIPv4, isIPv6 } from './util/net';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\nimport { validatePhoneNumber } from './util/phoneValidator';\nimport { createUrlValidators } from './util/urlValidators';\n\nexport type StringConstraintName =\n\t| `s.string.${\n\t\t\t| `length${'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'Equal' | 'NotEqual'}`\n\t\t\t| 'regex'\n\t\t\t| 'url'\n\t\t\t| 'uuid'\n\t\t\t| 'email'\n\t\t\t| `ip${'v4' | 'v6' | ''}`\n\t\t\t| 'date'\n\t\t\t| 'phone'}`;\n\nexport type StringProtocol = `${string}:`;\n\nexport type StringDomain = `${string}.${string}`;\n\nexport interface UrlOptions {\n\tallowedProtocols?: StringProtocol[];\n\tallowedDomains?: StringDomain[];\n}\n\nexport type UUIDVersion = 1 | 3 | 4 | 5;\n\nexport interface StringUuidOptions {\n\tversion?: UUIDVersion | `${UUIDVersion}-${UUIDVersion}` | null;\n\tnullable?: boolean;\n}\n\nfunction stringLengthComparator(comparator: Comparator, name: StringConstraintName, expected: string, length: number): IConstraint<string> {\n\treturn {\n\t\trun(input: string) {\n\t\t\treturn comparator(input.length, length) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid string length', input, expected));\n\t\t}\n\t};\n}\n\nexport function stringLengthLessThan(length: number): IConstraint<string> {\n\tconst expected = `expected.length < ${length}`;\n\treturn stringLengthComparator(lessThan, 's.string.lengthLessThan', expected, length);\n}\n\nexport function stringLengthLessThanOrEqual(length: number): IConstraint<string> {\n\tconst expected = `expected.length <= ${length}`;\n\treturn stringLengthComparator(lessThanOrEqual, 's.string.lengthLessThanOrEqual', expected, length);\n}\n\nexport function stringLengthGreaterThan(length: number): IConstraint<string> {\n\tconst expected = `expected.length > ${length}`;\n\treturn stringLengthComparator(greaterThan, 's.string.lengthGreaterThan', expected, length);\n}\n\nexport function stringLengthGreaterThanOrEqual(length: number): IConstraint<string> {\n\tconst expected = `expected.length >= ${length}`;\n\treturn stringLengthComparator(greaterThanOrEqual, 's.string.lengthGreaterThanOrEqual', expected, length);\n}\n\nexport function stringLengthEqual(length: number): IConstraint<string> {\n\tconst expected = `expected.length === ${length}`;\n\treturn stringLengthComparator(equal, 's.string.lengthEqual', expected, length);\n}\n\nexport function stringLengthNotEqual(length: number): IConstraint<string> {\n\tconst expected = `expected.length !== ${length}`;\n\treturn stringLengthComparator(notEqual, 's.string.lengthNotEqual', expected, length);\n}\n\nexport function stringEmail(): IConstraint<string> {\n\treturn {\n\t\trun(input: string) {\n\t\t\treturn validateEmail(input)\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.string.email', 'Invalid email address', input, 'expected to be an email address'));\n\t\t}\n\t};\n}\n\nfunction stringRegexValidator(type: StringConstraintName, expected: string, regex: RegExp): IConstraint<string> {\n\treturn {\n\t\trun(input: string) {\n\t\t\treturn regex.test(input) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(type, 'Invalid string format', input, expected));\n\t\t}\n\t};\n}\n\nexport function stringUrl(options?: UrlOptions): IConstraint<string> {\n\tconst validatorFn = createUrlValidators(options);\n\treturn {\n\t\trun(input: string) {\n\t\t\tlet url: URL;\n\t\t\ttry {\n\t\t\t\turl = new URL(input);\n\t\t\t} catch {\n\t\t\t\treturn Result.err(new ExpectedConstraintError('s.string.url', 'Invalid URL', input, 'expected to match a URL'));\n\t\t\t}\n\n\t\t\tconst validatorFnResult = validatorFn(input, url);\n\t\t\tif (validatorFnResult === null) return Result.ok(input);\n\t\t\treturn Result.err(validatorFnResult);\n\t\t}\n\t};\n}\n\nexport function stringIp(version?: 4 | 6): IConstraint<string> {\n\tconst ipVersion = version ? (`v${version}` as const) : '';\n\tconst validatorFn = version === 4 ? isIPv4 : version === 6 ? isIPv6 : isIP;\n\n\tconst name = `s.string.ip${ipVersion}` as const;\n\tconst message = `Invalid IP${ipVersion} address`;\n\tconst expected = `expected to be an IP${ipVersion} address`;\n\treturn {\n\t\trun(input: string) {\n\t\t\treturn validatorFn(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, message, input, expected));\n\t\t}\n\t};\n}\n\nexport function stringRegex(regex: RegExp) {\n\treturn stringRegexValidator('s.string.regex', `expected ${regex}.test(expected) to be true`, regex);\n}\n\nexport function stringUuid({ version = 4, nullable = false }: StringUuidOptions = {}) {\n\tversion ??= '1-5';\n\tconst regex = new RegExp(\n\t\t`^(?:[0-9A-F]{8}-[0-9A-F]{4}-[${version}][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}${\n\t\t\tnullable ? '|00000000-0000-0000-0000-000000000000' : ''\n\t\t})$`,\n\t\t'i'\n\t);\n\tconst expected = `expected to match UUID${typeof version === 'number' ? `v${version}` : ` in range of ${version}`}`;\n\treturn stringRegexValidator('s.string.uuid', expected, regex);\n}\n\nexport function stringDate(): IConstraint<string> {\n\treturn {\n\t\trun(input: string) {\n\t\t\tconst time = Date.parse(input);\n\n\t\t\treturn Number.isNaN(time)\n\t\t\t\t? Result.err(\n\t\t\t\t\t\tnew ExpectedConstraintError(\n\t\t\t\t\t\t\t's.string.date',\n\t\t\t\t\t\t\t'Invalid date string',\n\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\t'expected to be a valid date string (in the ISO 8601 or ECMA-262 format)'\n\t\t\t\t\t\t)\n\t\t\t\t )\n\t\t\t\t: Result.ok(input);\n\t\t}\n\t};\n}\n\nexport function stringPhone(): IConstraint<string> {\n\treturn {\n\t\trun(input: string) {\n\t\t\treturn validatePhoneNumber(input)\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.string.phone', 'Invalid phone number', input, 'expected to be a phone number'));\n\t\t}\n\t};\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport {\n\tstringDate,\n\tstringEmail,\n\tstringIp,\n\tstringLengthEqual,\n\tstringLengthGreaterThan,\n\tstringLengthGreaterThanOrEqual,\n\tstringLengthLessThan,\n\tstringLengthLessThanOrEqual,\n\tstringLengthNotEqual,\n\tstringPhone,\n\tstringRegex,\n\tstringUrl,\n\tstringUuid,\n\ttype StringUuidOptions,\n\ttype UrlOptions\n} from '../constraints/StringConstraints';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class StringValidator<T extends string> extends BaseValidator<T> {\n\tpublic lengthLessThan(length: number): this {\n\t\treturn this.addConstraint(stringLengthLessThan(length) as IConstraint<T>);\n\t}\n\n\tpublic lengthLessThanOrEqual(length: number): this {\n\t\treturn this.addConstraint(stringLengthLessThanOrEqual(length) as IConstraint<T>);\n\t}\n\n\tpublic lengthGreaterThan(length: number): this {\n\t\treturn this.addConstraint(stringLengthGreaterThan(length) as IConstraint<T>);\n\t}\n\n\tpublic lengthGreaterThanOrEqual(length: number): this {\n\t\treturn this.addConstraint(stringLengthGreaterThanOrEqual(length) as IConstraint<T>);\n\t}\n\n\tpublic lengthEqual(length: number): this {\n\t\treturn this.addConstraint(stringLengthEqual(length) as IConstraint<T>);\n\t}\n\n\tpublic lengthNotEqual(length: number): this {\n\t\treturn this.addConstraint(stringLengthNotEqual(length) as IConstraint<T>);\n\t}\n\n\tpublic get email(): this {\n\t\treturn this.addConstraint(stringEmail() as IConstraint<T>);\n\t}\n\n\tpublic url(options?: UrlOptions): this {\n\t\treturn this.addConstraint(stringUrl(options) as IConstraint<T>);\n\t}\n\n\tpublic uuid(options?: StringUuidOptions): this {\n\t\treturn this.addConstraint(stringUuid(options) as IConstraint<T>);\n\t}\n\n\tpublic regex(regex: RegExp): this {\n\t\treturn this.addConstraint(stringRegex(regex) as IConstraint<T>);\n\t}\n\n\tpublic get date() {\n\t\treturn this.addConstraint(stringDate() as IConstraint<T>);\n\t}\n\n\tpublic get ipv4(): this {\n\t\treturn this.ip(4);\n\t}\n\n\tpublic get ipv6(): this {\n\t\treturn this.ip(6);\n\t}\n\n\tpublic ip(version?: 4 | 6): this {\n\t\treturn this.addConstraint(stringIp(version) as IConstraint<T>);\n\t}\n\n\tpublic phone(): this {\n\t\treturn this.addConstraint(stringPhone() as IConstraint<T>);\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn typeof value === 'string' //\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ValidationError('s.string', 'Expected a string primitive', value));\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class TupleValidator<T extends any[]> extends BaseValidator<[...T]> {\n\tprivate readonly validators: BaseValidator<[...T]>[] = [];\n\n\tpublic constructor(validators: BaseValidator<[...T]>[], constraints: readonly IConstraint<[...T]>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validators = validators;\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validators, this.constraints]);\n\t}\n\n\tprotected handle(values: unknown): Result<[...T], ValidationError | CombinedPropertyError> {\n\t\tif (!Array.isArray(values)) {\n\t\t\treturn Result.err(new ValidationError('s.tuple(T)', 'Expected an array', values));\n\t\t}\n\n\t\tif (values.length !== this.validators.length) {\n\t\t\treturn Result.err(new ValidationError('s.tuple(T)', `Expected an array of length ${this.validators.length}`, values));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(values as [...T]);\n\t\t}\n\n\t\tconst errors: [number, BaseError][] = [];\n\t\tconst transformed: T = [] as unknown as T;\n\n\t\tfor (let i = 0; i < values.length; i++) {\n\t\t\tconst result = this.validators[i].run(values[i]);\n\t\t\tif (result.isOk()) transformed.push(result.value);\n\t\t\telse errors.push([i, result.error!]);\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(transformed)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class MapValidator<K, V> extends BaseValidator<Map<K, V>> {\n\tprivate readonly keyValidator: BaseValidator<K>;\n\tprivate readonly valueValidator: BaseValidator<V>;\n\n\tpublic constructor(keyValidator: BaseValidator<K>, valueValidator: BaseValidator<V>, constraints: readonly IConstraint<Map<K, V>>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.keyValidator = keyValidator;\n\t\tthis.valueValidator = valueValidator;\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.keyValidator, this.valueValidator, this.constraints]);\n\t}\n\n\tprotected handle(value: unknown): Result<Map<K, V>, ValidationError | CombinedPropertyError> {\n\t\tif (!(value instanceof Map)) {\n\t\t\treturn Result.err(new ValidationError('s.map(K, V)', 'Expected a map', value));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(value);\n\t\t}\n\n\t\tconst errors: [string, BaseError][] = [];\n\t\tconst transformed = new Map<K, V>();\n\n\t\tfor (const [key, val] of value.entries()) {\n\t\t\tconst keyResult = this.keyValidator.run(key);\n\t\t\tconst valueResult = this.valueValidator.run(val);\n\t\t\tconst { length } = errors;\n\t\t\tif (keyResult.isErr()) errors.push([key, keyResult.error]);\n\t\t\tif (valueResult.isErr()) errors.push([key, valueResult.error]);\n\t\t\tif (errors.length === length) transformed.set(keyResult.value!, valueResult.value!);\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(transformed)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n}\n","import type { Result } from '../lib/Result';\nimport type { IConstraint, Unwrap } from '../type-exports';\nimport { BaseValidator, type ValidatorError } from './imports';\n\nexport class LazyValidator<T extends BaseValidator<unknown>, R = Unwrap<T>> extends BaseValidator<R> {\n\tprivate readonly validator: (value: unknown) => T;\n\n\tpublic constructor(validator: (value: unknown) => T, constraints: readonly IConstraint<R>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validator = validator;\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validator, this.constraints]);\n\t}\n\n\tprotected handle(values: unknown): Result<R, ValidatorError> {\n\t\treturn this.validator(values).run(values) as Result<R, ValidatorError>;\n\t}\n}\n","import type { InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class UnknownEnumValueError extends BaseError {\n\tpublic readonly value: string | number;\n\tpublic readonly enumKeys: string[];\n\tpublic readonly enumMappings: Map<string | number, string | number>;\n\n\tpublic constructor(value: string | number, keys: string[], enumMappings: Map<string | number, string | number>) {\n\t\tsuper('Expected the value to be one of the following enum values:');\n\n\t\tthis.value = value;\n\t\tthis.enumKeys = keys;\n\t\tthis.enumMappings = enumMappings;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tvalue: this.value,\n\t\t\tenumKeys: this.enumKeys,\n\t\t\tenumMappings: [...this.enumMappings.entries()]\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst value = options.stylize(this.value.toString(), 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[UnknownEnumValueError: ${value}]`, 'special');\n\t\t}\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\t\tconst pairs = this.enumKeys\n\t\t\t.map((key) => {\n\t\t\t\tconst enumValue = this.enumMappings.get(key)!;\n\t\t\t\treturn `${options.stylize(key, 'string')} or ${options.stylize(\n\t\t\t\t\tenumValue.toString(),\n\t\t\t\t\ttypeof enumValue === 'number' ? 'number' : 'string'\n\t\t\t\t)}`;\n\t\t\t})\n\t\t\t.join(padding);\n\n\t\tconst header = `${options.stylize('UnknownEnumValueError', 'special')} > ${value}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst pairsBlock = `${padding}${pairs}`;\n\t\treturn `${header}\\n ${message}\\n${pairsBlock}`;\n\t}\n}\n","import { UnknownEnumValueError } from '../lib/errors/UnknownEnumValueError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class NativeEnumValidator<T extends NativeEnumLike> extends BaseValidator<T[keyof T]> {\n\tpublic readonly enumShape: T;\n\tpublic readonly hasNumericElements: boolean = false;\n\tprivate readonly enumKeys: string[];\n\tprivate readonly enumMapping = new Map<string | number, T[keyof T]>();\n\n\tpublic constructor(enumShape: T) {\n\t\tsuper();\n\t\tthis.enumShape = enumShape;\n\n\t\tthis.enumKeys = Object.keys(enumShape).filter((key) => {\n\t\t\treturn typeof enumShape[enumShape[key]] !== 'number';\n\t\t});\n\n\t\tfor (const key of this.enumKeys) {\n\t\t\tconst enumValue = enumShape[key] as T[keyof T];\n\n\t\t\tthis.enumMapping.set(key, enumValue);\n\t\t\tthis.enumMapping.set(enumValue, enumValue);\n\n\t\t\tif (typeof enumValue === 'number') {\n\t\t\t\tthis.hasNumericElements = true;\n\t\t\t\tthis.enumMapping.set(`${enumValue}`, enumValue);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected override handle(value: unknown): Result<T[keyof T], ValidationError | UnknownEnumValueError> {\n\t\tconst typeOfValue = typeof value;\n\n\t\tif (typeOfValue === 'number') {\n\t\t\tif (!this.hasNumericElements) {\n\t\t\t\treturn Result.err(new ValidationError('s.nativeEnum(T)', 'Expected the value to be a string', value));\n\t\t\t}\n\t\t} else if (typeOfValue !== 'string') {\n\t\t\t// typeOfValue !== 'number' is implied here\n\t\t\treturn Result.err(new ValidationError('s.nativeEnum(T)', 'Expected the value to be a string or number', value));\n\t\t}\n\n\t\tconst casted = value as string | number;\n\n\t\tconst possibleEnumValue = this.enumMapping.get(casted);\n\n\t\treturn typeof possibleEnumValue === 'undefined'\n\t\t\t? Result.err(new UnknownEnumValueError(casted, this.enumKeys, this.enumMapping))\n\t\t\t: Result.ok(possibleEnumValue);\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.enumShape]);\n\t}\n}\n\nexport interface NativeEnumLike {\n\t[key: string]: string | number;\n\t[key: number]: string;\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\nimport type { TypedArray } from './util/typedArray';\n\nexport type TypedArrayConstraintName = `s.typedArray(T).${'byteLength' | 'length'}${\n\t| 'LessThan'\n\t| 'LessThanOrEqual'\n\t| 'GreaterThan'\n\t| 'GreaterThanOrEqual'\n\t| 'Equal'\n\t| 'NotEqual'\n\t| 'Range'\n\t| 'RangeInclusive'\n\t| 'RangeExclusive'}`;\n\nfunction typedArrayByteLengthComparator<T extends TypedArray>(\n\tcomparator: Comparator,\n\tname: TypedArrayConstraintName,\n\texpected: string,\n\tlength: number\n): IConstraint<T> {\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn comparator(input.byteLength, length) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid Typed Array byte length', input, expected));\n\t\t}\n\t};\n}\n\nexport function typedArrayByteLengthLessThan<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength < ${value}`;\n\treturn typedArrayByteLengthComparator(lessThan, 's.typedArray(T).byteLengthLessThan', expected, value);\n}\n\nexport function typedArrayByteLengthLessThanOrEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength <= ${value}`;\n\treturn typedArrayByteLengthComparator(lessThanOrEqual, 's.typedArray(T).byteLengthLessThanOrEqual', expected, value);\n}\n\nexport function typedArrayByteLengthGreaterThan<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength > ${value}`;\n\treturn typedArrayByteLengthComparator(greaterThan, 's.typedArray(T).byteLengthGreaterThan', expected, value);\n}\n\nexport function typedArrayByteLengthGreaterThanOrEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength >= ${value}`;\n\treturn typedArrayByteLengthComparator(greaterThanOrEqual, 's.typedArray(T).byteLengthGreaterThanOrEqual', expected, value);\n}\n\nexport function typedArrayByteLengthEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength === ${value}`;\n\treturn typedArrayByteLengthComparator(equal, 's.typedArray(T).byteLengthEqual', expected, value);\n}\n\nexport function typedArrayByteLengthNotEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength !== ${value}`;\n\treturn typedArrayByteLengthComparator(notEqual, 's.typedArray(T).byteLengthNotEqual', expected, value);\n}\n\nexport function typedArrayByteLengthRange<T extends TypedArray>(start: number, endBefore: number): IConstraint<T> {\n\tconst expected = `expected.byteLength >= ${start} && expected.byteLength < ${endBefore}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.byteLength >= start && input.byteLength < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.typedArray(T).byteLengthRange', 'Invalid Typed Array byte length', input, expected));\n\t\t}\n\t};\n}\n\nexport function typedArrayByteLengthRangeInclusive<T extends TypedArray>(start: number, end: number) {\n\tconst expected = `expected.byteLength >= ${start} && expected.byteLength <= ${end}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.byteLength >= start && input.byteLength <= end //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(\n\t\t\t\t\t\tnew ExpectedConstraintError('s.typedArray(T).byteLengthRangeInclusive', 'Invalid Typed Array byte length', input, expected)\n\t\t\t\t );\n\t\t}\n\t};\n}\n\nexport function typedArrayByteLengthRangeExclusive<T extends TypedArray>(startAfter: number, endBefore: number): IConstraint<T> {\n\tconst expected = `expected.byteLength > ${startAfter} && expected.byteLength < ${endBefore}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.byteLength > startAfter && input.byteLength < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(\n\t\t\t\t\t\tnew ExpectedConstraintError('s.typedArray(T).byteLengthRangeExclusive', 'Invalid Typed Array byte length', input, expected)\n\t\t\t\t );\n\t\t}\n\t};\n}\n\nfunction typedArrayLengthComparator<T extends TypedArray>(\n\tcomparator: Comparator,\n\tname: TypedArrayConstraintName,\n\texpected: string,\n\tlength: number\n): IConstraint<T> {\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn comparator(input.length, length) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid Typed Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function typedArrayLengthLessThan<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length < ${value}`;\n\treturn typedArrayLengthComparator(lessThan, 's.typedArray(T).lengthLessThan', expected, value);\n}\n\nexport function typedArrayLengthLessThanOrEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length <= ${value}`;\n\treturn typedArrayLengthComparator(lessThanOrEqual, 's.typedArray(T).lengthLessThanOrEqual', expected, value);\n}\n\nexport function typedArrayLengthGreaterThan<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length > ${value}`;\n\treturn typedArrayLengthComparator(greaterThan, 's.typedArray(T).lengthGreaterThan', expected, value);\n}\n\nexport function typedArrayLengthGreaterThanOrEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length >= ${value}`;\n\treturn typedArrayLengthComparator(greaterThanOrEqual, 's.typedArray(T).lengthGreaterThanOrEqual', expected, value);\n}\n\nexport function typedArrayLengthEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length === ${value}`;\n\treturn typedArrayLengthComparator(equal, 's.typedArray(T).lengthEqual', expected, value);\n}\n\nexport function typedArrayLengthNotEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length !== ${value}`;\n\treturn typedArrayLengthComparator(notEqual, 's.typedArray(T).lengthNotEqual', expected, value);\n}\n\nexport function typedArrayLengthRange<T extends TypedArray>(start: number, endBefore: number): IConstraint<T> {\n\tconst expected = `expected.length >= ${start} && expected.length < ${endBefore}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.length >= start && input.length < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.typedArray(T).lengthRange', 'Invalid Typed Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function typedArrayLengthRangeInclusive<T extends TypedArray>(start: number, end: number): IConstraint<T> {\n\tconst expected = `expected.length >= ${start} && expected.length <= ${end}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.length >= start && input.length <= end //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.typedArray(T).lengthRangeInclusive', 'Invalid Typed Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function typedArrayLengthRangeExclusive<T extends TypedArray>(startAfter: number, endBefore: number): IConstraint<T> {\n\tconst expected = `expected.length > ${startAfter} && expected.length < ${endBefore}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.length > startAfter && input.length < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.typedArray(T).lengthRangeExclusive', 'Invalid Typed Array length', input, expected));\n\t\t}\n\t};\n}\n","const vowels = ['a', 'e', 'i', 'o', 'u'];\n\nexport const aOrAn = (word: string) => {\n\treturn `${vowels.includes(word[0].toLowerCase()) ? 'an' : 'a'} ${word}`;\n};\n","export type TypedArray =\n\t| Int8Array\n\t| Uint8Array\n\t| Uint8ClampedArray\n\t| Int16Array\n\t| Uint16Array\n\t| Int32Array\n\t| Uint32Array\n\t| Float32Array\n\t| Float64Array\n\t| BigInt64Array\n\t| BigUint64Array;\n\nexport const TypedArrays = {\n\tInt8Array: (x: unknown): x is Int8Array => x instanceof Int8Array,\n\tUint8Array: (x: unknown): x is Uint8Array => x instanceof Uint8Array,\n\tUint8ClampedArray: (x: unknown): x is Uint8ClampedArray => x instanceof Uint8ClampedArray,\n\tInt16Array: (x: unknown): x is Int16Array => x instanceof Int16Array,\n\tUint16Array: (x: unknown): x is Uint16Array => x instanceof Uint16Array,\n\tInt32Array: (x: unknown): x is Int32Array => x instanceof Int32Array,\n\tUint32Array: (x: unknown): x is Uint32Array => x instanceof Uint32Array,\n\tFloat32Array: (x: unknown): x is Float32Array => x instanceof Float32Array,\n\tFloat64Array: (x: unknown): x is Float64Array => x instanceof Float64Array,\n\tBigInt64Array: (x: unknown): x is BigInt64Array => x instanceof BigInt64Array,\n\tBigUint64Array: (x: unknown): x is BigUint64Array => x instanceof BigUint64Array,\n\tTypedArray: (x: unknown): x is TypedArray => ArrayBuffer.isView(x) && !(x instanceof DataView)\n} as const;\n\nexport type TypedArrayName = keyof typeof TypedArrays;\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport {\n\ttypedArrayByteLengthEqual,\n\ttypedArrayByteLengthGreaterThan,\n\ttypedArrayByteLengthGreaterThanOrEqual,\n\ttypedArrayByteLengthLessThan,\n\ttypedArrayByteLengthLessThanOrEqual,\n\ttypedArrayByteLengthNotEqual,\n\ttypedArrayByteLengthRange,\n\ttypedArrayByteLengthRangeExclusive,\n\ttypedArrayByteLengthRangeInclusive,\n\ttypedArrayLengthEqual,\n\ttypedArrayLengthGreaterThan,\n\ttypedArrayLengthGreaterThanOrEqual,\n\ttypedArrayLengthLessThan,\n\ttypedArrayLengthLessThanOrEqual,\n\ttypedArrayLengthNotEqual,\n\ttypedArrayLengthRange,\n\ttypedArrayLengthRangeExclusive,\n\ttypedArrayLengthRangeInclusive\n} from '../constraints/TypedArrayLengthConstraints';\nimport { aOrAn } from '../constraints/util/common/vowels';\nimport { TypedArrays, type TypedArray, type TypedArrayName } from '../constraints/util/typedArray';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class TypedArrayValidator<T extends TypedArray> extends BaseValidator<T> {\n\tprivate readonly type: TypedArrayName;\n\n\tpublic constructor(type: TypedArrayName, constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.type = type;\n\t}\n\n\tpublic byteLengthLessThan(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthLessThan(length));\n\t}\n\n\tpublic byteLengthLessThanOrEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthLessThanOrEqual(length));\n\t}\n\n\tpublic byteLengthGreaterThan(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthGreaterThan(length));\n\t}\n\n\tpublic byteLengthGreaterThanOrEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthGreaterThanOrEqual(length));\n\t}\n\n\tpublic byteLengthEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthEqual(length));\n\t}\n\n\tpublic byteLengthNotEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthNotEqual(length));\n\t}\n\n\tpublic byteLengthRange(start: number, endBefore: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthRange(start, endBefore));\n\t}\n\n\tpublic byteLengthRangeInclusive(startAt: number, endAt: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthRangeInclusive(startAt, endAt) as IConstraint<T>);\n\t}\n\n\tpublic byteLengthRangeExclusive(startAfter: number, endBefore: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthRangeExclusive(startAfter, endBefore));\n\t}\n\n\tpublic lengthLessThan(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthLessThan(length));\n\t}\n\n\tpublic lengthLessThanOrEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthLessThanOrEqual(length));\n\t}\n\n\tpublic lengthGreaterThan(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthGreaterThan(length));\n\t}\n\n\tpublic lengthGreaterThanOrEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthGreaterThanOrEqual(length));\n\t}\n\n\tpublic lengthEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthEqual(length));\n\t}\n\n\tpublic lengthNotEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthNotEqual(length));\n\t}\n\n\tpublic lengthRange(start: number, endBefore: number) {\n\t\treturn this.addConstraint(typedArrayLengthRange(start, endBefore));\n\t}\n\n\tpublic lengthRangeInclusive(startAt: number, endAt: number) {\n\t\treturn this.addConstraint(typedArrayLengthRangeInclusive(startAt, endAt));\n\t}\n\n\tpublic lengthRangeExclusive(startAfter: number, endBefore: number) {\n\t\treturn this.addConstraint(typedArrayLengthRangeExclusive(startAfter, endBefore));\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.type, this.constraints]);\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn TypedArrays[this.type](value)\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ValidationError('s.typedArray', `Expected ${aOrAn(this.type)}`, value));\n\t}\n}\n","import type { TypedArray, TypedArrayName } from '../constraints/util/typedArray';\nimport type { Unwrap, UnwrapTuple } from '../lib/util-types';\nimport {\n\tArrayValidator,\n\tBaseValidator,\n\tBigIntValidator,\n\tBooleanValidator,\n\tDateValidator,\n\tInstanceValidator,\n\tLiteralValidator,\n\tMapValidator,\n\tNeverValidator,\n\tNullishValidator,\n\tNumberValidator,\n\tObjectValidator,\n\tPassthroughValidator,\n\tRecordValidator,\n\tSetValidator,\n\tStringValidator,\n\tTupleValidator,\n\tUnionValidator\n} from '../validators/imports';\nimport { LazyValidator } from '../validators/LazyValidator';\nimport { NativeEnumValidator, type NativeEnumLike } from '../validators/NativeEnumValidator';\nimport { TypedArrayValidator } from '../validators/TypedArrayValidator';\nimport type { Constructor, MappedObjectValidator } from './util-types';\n\nexport class Shapes {\n\tpublic get string() {\n\t\treturn new StringValidator();\n\t}\n\n\tpublic get number() {\n\t\treturn new NumberValidator();\n\t}\n\n\tpublic get bigint() {\n\t\treturn new BigIntValidator();\n\t}\n\n\tpublic get boolean() {\n\t\treturn new BooleanValidator();\n\t}\n\n\tpublic get date() {\n\t\treturn new DateValidator();\n\t}\n\n\tpublic object<T extends object>(shape: MappedObjectValidator<T>) {\n\t\treturn new ObjectValidator<T>(shape);\n\t}\n\n\tpublic get undefined() {\n\t\treturn this.literal(undefined);\n\t}\n\n\tpublic get null() {\n\t\treturn this.literal(null);\n\t}\n\n\tpublic get nullish() {\n\t\treturn new NullishValidator();\n\t}\n\n\tpublic get any() {\n\t\treturn new PassthroughValidator<any>();\n\t}\n\n\tpublic get unknown() {\n\t\treturn new PassthroughValidator<unknown>();\n\t}\n\n\tpublic get never() {\n\t\treturn new NeverValidator();\n\t}\n\n\tpublic enum<T>(...values: readonly T[]) {\n\t\treturn this.union(...values.map((value) => this.literal(value)));\n\t}\n\n\tpublic nativeEnum<T extends NativeEnumLike>(enumShape: T): NativeEnumValidator<T> {\n\t\treturn new NativeEnumValidator(enumShape);\n\t}\n\n\tpublic literal<T>(value: T): BaseValidator<T> {\n\t\tif (value instanceof Date) return this.date.equal(value) as unknown as BaseValidator<T>;\n\t\treturn new LiteralValidator(value);\n\t}\n\n\tpublic instance<T>(expected: Constructor<T>): InstanceValidator<T> {\n\t\treturn new InstanceValidator(expected);\n\t}\n\n\tpublic union<T extends [...BaseValidator<any>[]]>(...validators: [...T]): UnionValidator<Unwrap<T[number]>> {\n\t\treturn new UnionValidator(validators);\n\t}\n\n\tpublic array<T>(validator: BaseValidator<T[][number]>): ArrayValidator<T[], T[][number]>;\n\tpublic array<T extends unknown[]>(validator: BaseValidator<T[number]>): ArrayValidator<T, T[number]>;\n\tpublic array<T extends unknown[]>(validator: BaseValidator<T[number]>) {\n\t\treturn new ArrayValidator(validator);\n\t}\n\n\tpublic typedArray<T extends TypedArray>(type: TypedArrayName = 'TypedArray') {\n\t\treturn new TypedArrayValidator<T>(type);\n\t}\n\n\tpublic get int8Array() {\n\t\treturn this.typedArray<Int8Array>('Int8Array');\n\t}\n\n\tpublic get uint8Array() {\n\t\treturn this.typedArray<Uint8Array>('Uint8Array');\n\t}\n\n\tpublic get uint8ClampedArray() {\n\t\treturn this.typedArray<Uint8ClampedArray>('Uint8ClampedArray');\n\t}\n\n\tpublic get int16Array() {\n\t\treturn this.typedArray<Int16Array>('Int16Array');\n\t}\n\n\tpublic get uint16Array() {\n\t\treturn this.typedArray<Uint16Array>('Uint16Array');\n\t}\n\n\tpublic get int32Array() {\n\t\treturn this.typedArray<Int32Array>('Int32Array');\n\t}\n\n\tpublic get uint32Array() {\n\t\treturn this.typedArray<Uint32Array>('Uint32Array');\n\t}\n\n\tpublic get float32Array() {\n\t\treturn this.typedArray<Float32Array>('Float32Array');\n\t}\n\n\tpublic get float64Array() {\n\t\treturn this.typedArray<Float64Array>('Float64Array');\n\t}\n\n\tpublic get bigInt64Array() {\n\t\treturn this.typedArray<BigInt64Array>('BigInt64Array');\n\t}\n\n\tpublic get bigUint64Array() {\n\t\treturn this.typedArray<BigUint64Array>('BigUint64Array');\n\t}\n\n\tpublic tuple<T extends [...BaseValidator<any>[]]>(validators: [...T]): TupleValidator<UnwrapTuple<T>> {\n\t\treturn new TupleValidator(validators);\n\t}\n\n\tpublic set<T>(validator: BaseValidator<T>) {\n\t\treturn new SetValidator(validator);\n\t}\n\n\tpublic record<T>(validator: BaseValidator<T>) {\n\t\treturn new RecordValidator(validator);\n\t}\n\n\tpublic map<T, U>(keyValidator: BaseValidator<T>, valueValidator: BaseValidator<U>) {\n\t\treturn new MapValidator(keyValidator, valueValidator);\n\t}\n\n\tpublic lazy<T extends BaseValidator<unknown>>(validator: (value: unknown) => T) {\n\t\treturn new LazyValidator(validator);\n\t}\n}\n","import { Shapes } from './lib/Shapes';\n\nexport const s = new Shapes();\n\nexport * from './lib/Result';\nexport * from './lib/configs';\nexport * from './lib/errors/BaseError';\nexport * from './lib/errors/CombinedError';\nexport * from './lib/errors/CombinedPropertyError';\nexport * from './lib/errors/ExpectedConstraintError';\nexport * from './lib/errors/ExpectedValidationError';\nexport * from './lib/errors/MissingPropertyError';\nexport * from './lib/errors/MultiplePossibilitiesConstraintError';\nexport * from './lib/errors/UnknownEnumValueError';\nexport * from './lib/errors/UnknownPropertyError';\nexport * from './lib/errors/ValidationError';\nexport * from './type-exports';\n"]} \ No newline at end of file
diff --git a/node_modules/@sapphire/shapeshift/dist/index.js b/node_modules/@sapphire/shapeshift/dist/index.js
new file mode 100644
index 0000000..42f256f
--- /dev/null
+++ b/node_modules/@sapphire/shapeshift/dist/index.js
@@ -0,0 +1,2242 @@
+'use strict';
+
+var get = require('lodash/get.js');
+var util = require('util');
+var fastDeepEqual = require('fast-deep-equal/es6/index.js');
+var uniqWith = require('lodash/uniqWith.js');
+
+function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
+
+var get__default = /*#__PURE__*/_interopDefault(get);
+var fastDeepEqual__default = /*#__PURE__*/_interopDefault(fastDeepEqual);
+var uniqWith__default = /*#__PURE__*/_interopDefault(uniqWith);
+
+var __defProp = Object.defineProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+
+// src/lib/configs.ts
+var validationEnabled = true;
+function setGlobalValidationEnabled(enabled) {
+ validationEnabled = enabled;
+}
+__name(setGlobalValidationEnabled, "setGlobalValidationEnabled");
+function getGlobalValidationEnabled() {
+ return validationEnabled;
+}
+__name(getGlobalValidationEnabled, "getGlobalValidationEnabled");
+
+// src/lib/Result.ts
+var Result = class {
+ constructor(success, value, error) {
+ this.success = success;
+ if (success) {
+ this.value = value;
+ } else {
+ this.error = error;
+ }
+ }
+ isOk() {
+ return this.success;
+ }
+ isErr() {
+ return !this.success;
+ }
+ unwrap() {
+ if (this.isOk())
+ return this.value;
+ throw this.error;
+ }
+ static ok(value) {
+ return new Result(true, value);
+ }
+ static err(error) {
+ return new Result(false, void 0, error);
+ }
+};
+__name(Result, "Result");
+
+// src/validators/util/getValue.ts
+function getValue(valueOrFn) {
+ return typeof valueOrFn === "function" ? valueOrFn() : valueOrFn;
+}
+__name(getValue, "getValue");
+
+// src/lib/errors/BaseError.ts
+var customInspectSymbol = Symbol.for("nodejs.util.inspect.custom");
+var customInspectSymbolStackLess = Symbol.for("nodejs.util.inspect.custom.stack-less");
+var BaseError = class extends Error {
+ [customInspectSymbol](depth, options) {
+ return `${this[customInspectSymbolStackLess](depth, options)}
+${this.stack.slice(this.stack.indexOf("\n"))}`;
+ }
+};
+__name(BaseError, "BaseError");
+
+// src/lib/errors/BaseConstraintError.ts
+var BaseConstraintError = class extends BaseError {
+ constructor(constraint, message, given) {
+ super(message);
+ this.constraint = constraint;
+ this.given = given;
+ }
+};
+__name(BaseConstraintError, "BaseConstraintError");
+
+// src/lib/errors/ExpectedConstraintError.ts
+var ExpectedConstraintError = class extends BaseConstraintError {
+ constructor(constraint, message, given, expected) {
+ super(constraint, message, given);
+ this.expected = expected;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ constraint: this.constraint,
+ given: this.given,
+ expected: this.expected
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const constraint = options.stylize(this.constraint, "string");
+ if (depth < 0) {
+ return options.stylize(`[ExpectedConstraintError: ${constraint}]`, "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1 };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const given = util.inspect(this.given, newOptions).replace(/\n/g, padding);
+ const header = `${options.stylize("ExpectedConstraintError", "special")} > ${constraint}`;
+ const message = options.stylize(this.message, "regexp");
+ const expectedBlock = `
+ ${options.stylize("Expected: ", "string")}${options.stylize(this.expected, "boolean")}`;
+ const givenBlock = `
+ ${options.stylize("Received:", "regexp")}${padding}${given}`;
+ return `${header}
+ ${message}
+${expectedBlock}
+${givenBlock}`;
+ }
+};
+__name(ExpectedConstraintError, "ExpectedConstraintError");
+
+// src/constraints/ObjectConstrains.ts
+function whenConstraint(key, options, validator) {
+ return {
+ run(input, parent) {
+ if (!parent) {
+ return Result.err(new ExpectedConstraintError("s.object(T.when)", "Validator has no parent", parent, "Validator to have a parent"));
+ }
+ const isKeyArray = Array.isArray(key);
+ const value = isKeyArray ? key.map((k) => get__default.default(parent, k)) : get__default.default(parent, key);
+ const predicate = resolveBooleanIs(options, value, isKeyArray) ? options.then : options.otherwise;
+ if (predicate) {
+ return predicate(validator).run(input);
+ }
+ return Result.ok(input);
+ }
+ };
+}
+__name(whenConstraint, "whenConstraint");
+function resolveBooleanIs(options, value, isKeyArray) {
+ if (options.is === void 0) {
+ return isKeyArray ? !value.some((val) => !val) : Boolean(value);
+ }
+ if (typeof options.is === "function") {
+ return options.is(value);
+ }
+ return value === options.is;
+}
+__name(resolveBooleanIs, "resolveBooleanIs");
+
+// src/validators/BaseValidator.ts
+var BaseValidator = class {
+ constructor(constraints = []) {
+ this.constraints = [];
+ this.isValidationEnabled = null;
+ this.constraints = constraints;
+ }
+ setParent(parent) {
+ this.parent = parent;
+ return this;
+ }
+ get optional() {
+ return new UnionValidator([new LiteralValidator(void 0), this.clone()]);
+ }
+ get nullable() {
+ return new UnionValidator([new LiteralValidator(null), this.clone()]);
+ }
+ get nullish() {
+ return new UnionValidator([new NullishValidator(), this.clone()]);
+ }
+ get array() {
+ return new ArrayValidator(this.clone());
+ }
+ get set() {
+ return new SetValidator(this.clone());
+ }
+ or(...predicates) {
+ return new UnionValidator([this.clone(), ...predicates]);
+ }
+ transform(cb) {
+ return this.addConstraint({ run: (input) => Result.ok(cb(input)) });
+ }
+ reshape(cb) {
+ return this.addConstraint({ run: cb });
+ }
+ default(value) {
+ return new DefaultValidator(this.clone(), value);
+ }
+ when(key, options) {
+ return this.addConstraint(whenConstraint(key, options, this));
+ }
+ describe(description) {
+ const clone = this.clone();
+ clone.description = description;
+ return clone;
+ }
+ run(value) {
+ let result = this.handle(value);
+ if (result.isErr())
+ return result;
+ for (const constraint of this.constraints) {
+ result = constraint.run(result.value, this.parent);
+ if (result.isErr())
+ break;
+ }
+ return result;
+ }
+ parse(value) {
+ if (!this.shouldRunConstraints) {
+ return this.handle(value).unwrap();
+ }
+ return this.constraints.reduce((v, constraint) => constraint.run(v).unwrap(), this.handle(value).unwrap());
+ }
+ is(value) {
+ return this.run(value).isOk();
+ }
+ /**
+ * Sets if the validator should also run constraints or just do basic checks.
+ * @param isValidationEnabled Whether this validator should be enabled or disabled. You can pass boolean or a function returning boolean which will be called just before parsing.
+ * Set to `null` to go off of the global configuration.
+ */
+ setValidationEnabled(isValidationEnabled) {
+ const clone = this.clone();
+ clone.isValidationEnabled = isValidationEnabled;
+ return clone;
+ }
+ getValidationEnabled() {
+ return getValue(this.isValidationEnabled);
+ }
+ get shouldRunConstraints() {
+ return getValue(this.isValidationEnabled) ?? getGlobalValidationEnabled();
+ }
+ clone() {
+ const clone = Reflect.construct(this.constructor, [this.constraints]);
+ clone.isValidationEnabled = this.isValidationEnabled;
+ return clone;
+ }
+ addConstraint(constraint) {
+ const clone = this.clone();
+ clone.constraints = clone.constraints.concat(constraint);
+ return clone;
+ }
+};
+__name(BaseValidator, "BaseValidator");
+function isUnique(input) {
+ if (input.length < 2)
+ return true;
+ const uniqueArray2 = uniqWith__default.default(input, fastDeepEqual__default.default);
+ return uniqueArray2.length === input.length;
+}
+__name(isUnique, "isUnique");
+
+// src/constraints/util/operators.ts
+function lessThan(a, b) {
+ return a < b;
+}
+__name(lessThan, "lessThan");
+function lessThanOrEqual(a, b) {
+ return a <= b;
+}
+__name(lessThanOrEqual, "lessThanOrEqual");
+function greaterThan(a, b) {
+ return a > b;
+}
+__name(greaterThan, "greaterThan");
+function greaterThanOrEqual(a, b) {
+ return a >= b;
+}
+__name(greaterThanOrEqual, "greaterThanOrEqual");
+function equal(a, b) {
+ return a === b;
+}
+__name(equal, "equal");
+function notEqual(a, b) {
+ return a !== b;
+}
+__name(notEqual, "notEqual");
+
+// src/constraints/ArrayConstraints.ts
+function arrayLengthComparator(comparator, name, expected, length) {
+ return {
+ run(input) {
+ return comparator(input.length, length) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid Array length", input, expected));
+ }
+ };
+}
+__name(arrayLengthComparator, "arrayLengthComparator");
+function arrayLengthLessThan(value) {
+ const expected = `expected.length < ${value}`;
+ return arrayLengthComparator(lessThan, "s.array(T).lengthLessThan", expected, value);
+}
+__name(arrayLengthLessThan, "arrayLengthLessThan");
+function arrayLengthLessThanOrEqual(value) {
+ const expected = `expected.length <= ${value}`;
+ return arrayLengthComparator(lessThanOrEqual, "s.array(T).lengthLessThanOrEqual", expected, value);
+}
+__name(arrayLengthLessThanOrEqual, "arrayLengthLessThanOrEqual");
+function arrayLengthGreaterThan(value) {
+ const expected = `expected.length > ${value}`;
+ return arrayLengthComparator(greaterThan, "s.array(T).lengthGreaterThan", expected, value);
+}
+__name(arrayLengthGreaterThan, "arrayLengthGreaterThan");
+function arrayLengthGreaterThanOrEqual(value) {
+ const expected = `expected.length >= ${value}`;
+ return arrayLengthComparator(greaterThanOrEqual, "s.array(T).lengthGreaterThanOrEqual", expected, value);
+}
+__name(arrayLengthGreaterThanOrEqual, "arrayLengthGreaterThanOrEqual");
+function arrayLengthEqual(value) {
+ const expected = `expected.length === ${value}`;
+ return arrayLengthComparator(equal, "s.array(T).lengthEqual", expected, value);
+}
+__name(arrayLengthEqual, "arrayLengthEqual");
+function arrayLengthNotEqual(value) {
+ const expected = `expected.length !== ${value}`;
+ return arrayLengthComparator(notEqual, "s.array(T).lengthNotEqual", expected, value);
+}
+__name(arrayLengthNotEqual, "arrayLengthNotEqual");
+function arrayLengthRange(start, endBefore) {
+ const expected = `expected.length >= ${start} && expected.length < ${endBefore}`;
+ return {
+ run(input) {
+ return input.length >= start && input.length < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.array(T).lengthRange", "Invalid Array length", input, expected));
+ }
+ };
+}
+__name(arrayLengthRange, "arrayLengthRange");
+function arrayLengthRangeInclusive(start, end) {
+ const expected = `expected.length >= ${start} && expected.length <= ${end}`;
+ return {
+ run(input) {
+ return input.length >= start && input.length <= end ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.array(T).lengthRangeInclusive", "Invalid Array length", input, expected));
+ }
+ };
+}
+__name(arrayLengthRangeInclusive, "arrayLengthRangeInclusive");
+function arrayLengthRangeExclusive(startAfter, endBefore) {
+ const expected = `expected.length > ${startAfter} && expected.length < ${endBefore}`;
+ return {
+ run(input) {
+ return input.length > startAfter && input.length < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.array(T).lengthRangeExclusive", "Invalid Array length", input, expected));
+ }
+ };
+}
+__name(arrayLengthRangeExclusive, "arrayLengthRangeExclusive");
+var uniqueArray = {
+ run(input) {
+ return isUnique(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.array(T).unique", "Array values are not unique", input, "Expected all values to be unique"));
+ }
+};
+
+// src/lib/errors/CombinedPropertyError.ts
+var CombinedPropertyError = class extends BaseError {
+ constructor(errors) {
+ super("Received one or more errors");
+ this.errors = errors;
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ if (depth < 0) {
+ return options.stylize("[CombinedPropertyError]", "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1, compact: true };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const header = `${options.stylize("CombinedPropertyError", "special")} (${options.stylize(this.errors.length.toString(), "number")})`;
+ const message = options.stylize(this.message, "regexp");
+ const errors = this.errors.map(([key, error]) => {
+ const property = CombinedPropertyError.formatProperty(key, options);
+ const body = error[customInspectSymbolStackLess](depth - 1, newOptions).replace(/\n/g, padding);
+ return ` input${property}${padding}${body}`;
+ }).join("\n\n");
+ return `${header}
+ ${message}
+
+${errors}`;
+ }
+ static formatProperty(key, options) {
+ if (typeof key === "string")
+ return options.stylize(`.${key}`, "symbol");
+ if (typeof key === "number")
+ return `[${options.stylize(key.toString(), "number")}]`;
+ return `[${options.stylize("Symbol", "symbol")}(${key.description})]`;
+ }
+};
+__name(CombinedPropertyError, "CombinedPropertyError");
+var ValidationError = class extends BaseError {
+ constructor(validator, message, given) {
+ super(message);
+ this.validator = validator;
+ this.given = given;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ validator: this.validator,
+ given: this.given
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const validator = options.stylize(this.validator, "string");
+ if (depth < 0) {
+ return options.stylize(`[ValidationError: ${validator}]`, "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1, compact: true };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const given = util.inspect(this.given, newOptions).replace(/\n/g, padding);
+ const header = `${options.stylize("ValidationError", "special")} > ${validator}`;
+ const message = options.stylize(this.message, "regexp");
+ const givenBlock = `
+ ${options.stylize("Received:", "regexp")}${padding}${given}`;
+ return `${header}
+ ${message}
+${givenBlock}`;
+ }
+};
+__name(ValidationError, "ValidationError");
+
+// src/validators/ArrayValidator.ts
+var ArrayValidator = class extends BaseValidator {
+ constructor(validator, constraints = []) {
+ super(constraints);
+ this.validator = validator;
+ }
+ lengthLessThan(length) {
+ return this.addConstraint(arrayLengthLessThan(length));
+ }
+ lengthLessThanOrEqual(length) {
+ return this.addConstraint(arrayLengthLessThanOrEqual(length));
+ }
+ lengthGreaterThan(length) {
+ return this.addConstraint(arrayLengthGreaterThan(length));
+ }
+ lengthGreaterThanOrEqual(length) {
+ return this.addConstraint(arrayLengthGreaterThanOrEqual(length));
+ }
+ lengthEqual(length) {
+ return this.addConstraint(arrayLengthEqual(length));
+ }
+ lengthNotEqual(length) {
+ return this.addConstraint(arrayLengthNotEqual(length));
+ }
+ lengthRange(start, endBefore) {
+ return this.addConstraint(arrayLengthRange(start, endBefore));
+ }
+ lengthRangeInclusive(startAt, endAt) {
+ return this.addConstraint(arrayLengthRangeInclusive(startAt, endAt));
+ }
+ lengthRangeExclusive(startAfter, endBefore) {
+ return this.addConstraint(arrayLengthRangeExclusive(startAfter, endBefore));
+ }
+ get unique() {
+ return this.addConstraint(uniqueArray);
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validator, this.constraints]);
+ }
+ handle(values) {
+ if (!Array.isArray(values)) {
+ return Result.err(new ValidationError("s.array(T)", "Expected an array", values));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(values);
+ }
+ const errors = [];
+ const transformed = [];
+ for (let i = 0; i < values.length; i++) {
+ const result = this.validator.run(values[i]);
+ if (result.isOk())
+ transformed.push(result.value);
+ else
+ errors.push([i, result.error]);
+ }
+ return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedPropertyError(errors));
+ }
+};
+__name(ArrayValidator, "ArrayValidator");
+
+// src/constraints/BigIntConstraints.ts
+function bigintComparator(comparator, name, expected, number) {
+ return {
+ run(input) {
+ return comparator(input, number) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid bigint value", input, expected));
+ }
+ };
+}
+__name(bigintComparator, "bigintComparator");
+function bigintLessThan(value) {
+ const expected = `expected < ${value}n`;
+ return bigintComparator(lessThan, "s.bigint.lessThan", expected, value);
+}
+__name(bigintLessThan, "bigintLessThan");
+function bigintLessThanOrEqual(value) {
+ const expected = `expected <= ${value}n`;
+ return bigintComparator(lessThanOrEqual, "s.bigint.lessThanOrEqual", expected, value);
+}
+__name(bigintLessThanOrEqual, "bigintLessThanOrEqual");
+function bigintGreaterThan(value) {
+ const expected = `expected > ${value}n`;
+ return bigintComparator(greaterThan, "s.bigint.greaterThan", expected, value);
+}
+__name(bigintGreaterThan, "bigintGreaterThan");
+function bigintGreaterThanOrEqual(value) {
+ const expected = `expected >= ${value}n`;
+ return bigintComparator(greaterThanOrEqual, "s.bigint.greaterThanOrEqual", expected, value);
+}
+__name(bigintGreaterThanOrEqual, "bigintGreaterThanOrEqual");
+function bigintEqual(value) {
+ const expected = `expected === ${value}n`;
+ return bigintComparator(equal, "s.bigint.equal", expected, value);
+}
+__name(bigintEqual, "bigintEqual");
+function bigintNotEqual(value) {
+ const expected = `expected !== ${value}n`;
+ return bigintComparator(notEqual, "s.bigint.notEqual", expected, value);
+}
+__name(bigintNotEqual, "bigintNotEqual");
+function bigintDivisibleBy(divider) {
+ const expected = `expected % ${divider}n === 0n`;
+ return {
+ run(input) {
+ return input % divider === 0n ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.bigint.divisibleBy", "BigInt is not divisible", input, expected));
+ }
+ };
+}
+__name(bigintDivisibleBy, "bigintDivisibleBy");
+
+// src/validators/BigIntValidator.ts
+var BigIntValidator = class extends BaseValidator {
+ lessThan(number) {
+ return this.addConstraint(bigintLessThan(number));
+ }
+ lessThanOrEqual(number) {
+ return this.addConstraint(bigintLessThanOrEqual(number));
+ }
+ greaterThan(number) {
+ return this.addConstraint(bigintGreaterThan(number));
+ }
+ greaterThanOrEqual(number) {
+ return this.addConstraint(bigintGreaterThanOrEqual(number));
+ }
+ equal(number) {
+ return this.addConstraint(bigintEqual(number));
+ }
+ notEqual(number) {
+ return this.addConstraint(bigintNotEqual(number));
+ }
+ get positive() {
+ return this.greaterThanOrEqual(0n);
+ }
+ get negative() {
+ return this.lessThan(0n);
+ }
+ divisibleBy(number) {
+ return this.addConstraint(bigintDivisibleBy(number));
+ }
+ get abs() {
+ return this.transform((value) => value < 0 ? -value : value);
+ }
+ intN(bits) {
+ return this.transform((value) => BigInt.asIntN(bits, value));
+ }
+ uintN(bits) {
+ return this.transform((value) => BigInt.asUintN(bits, value));
+ }
+ handle(value) {
+ return typeof value === "bigint" ? Result.ok(value) : Result.err(new ValidationError("s.bigint", "Expected a bigint primitive", value));
+ }
+};
+__name(BigIntValidator, "BigIntValidator");
+
+// src/constraints/BooleanConstraints.ts
+var booleanTrue = {
+ run(input) {
+ return input ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.boolean.true", "Invalid boolean value", input, "true"));
+ }
+};
+var booleanFalse = {
+ run(input) {
+ return input ? Result.err(new ExpectedConstraintError("s.boolean.false", "Invalid boolean value", input, "false")) : Result.ok(input);
+ }
+};
+
+// src/validators/BooleanValidator.ts
+var BooleanValidator = class extends BaseValidator {
+ get true() {
+ return this.addConstraint(booleanTrue);
+ }
+ get false() {
+ return this.addConstraint(booleanFalse);
+ }
+ equal(value) {
+ return value ? this.true : this.false;
+ }
+ notEqual(value) {
+ return value ? this.false : this.true;
+ }
+ handle(value) {
+ return typeof value === "boolean" ? Result.ok(value) : Result.err(new ValidationError("s.boolean", "Expected a boolean primitive", value));
+ }
+};
+__name(BooleanValidator, "BooleanValidator");
+
+// src/constraints/DateConstraints.ts
+function dateComparator(comparator, name, expected, number) {
+ return {
+ run(input) {
+ return comparator(input.getTime(), number) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid Date value", input, expected));
+ }
+ };
+}
+__name(dateComparator, "dateComparator");
+function dateLessThan(value) {
+ const expected = `expected < ${value.toISOString()}`;
+ return dateComparator(lessThan, "s.date.lessThan", expected, value.getTime());
+}
+__name(dateLessThan, "dateLessThan");
+function dateLessThanOrEqual(value) {
+ const expected = `expected <= ${value.toISOString()}`;
+ return dateComparator(lessThanOrEqual, "s.date.lessThanOrEqual", expected, value.getTime());
+}
+__name(dateLessThanOrEqual, "dateLessThanOrEqual");
+function dateGreaterThan(value) {
+ const expected = `expected > ${value.toISOString()}`;
+ return dateComparator(greaterThan, "s.date.greaterThan", expected, value.getTime());
+}
+__name(dateGreaterThan, "dateGreaterThan");
+function dateGreaterThanOrEqual(value) {
+ const expected = `expected >= ${value.toISOString()}`;
+ return dateComparator(greaterThanOrEqual, "s.date.greaterThanOrEqual", expected, value.getTime());
+}
+__name(dateGreaterThanOrEqual, "dateGreaterThanOrEqual");
+function dateEqual(value) {
+ const expected = `expected === ${value.toISOString()}`;
+ return dateComparator(equal, "s.date.equal", expected, value.getTime());
+}
+__name(dateEqual, "dateEqual");
+function dateNotEqual(value) {
+ const expected = `expected !== ${value.toISOString()}`;
+ return dateComparator(notEqual, "s.date.notEqual", expected, value.getTime());
+}
+__name(dateNotEqual, "dateNotEqual");
+var dateInvalid = {
+ run(input) {
+ return Number.isNaN(input.getTime()) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.date.invalid", "Invalid Date value", input, "expected === NaN"));
+ }
+};
+var dateValid = {
+ run(input) {
+ return Number.isNaN(input.getTime()) ? Result.err(new ExpectedConstraintError("s.date.valid", "Invalid Date value", input, "expected !== NaN")) : Result.ok(input);
+ }
+};
+
+// src/validators/DateValidator.ts
+var DateValidator = class extends BaseValidator {
+ lessThan(date) {
+ return this.addConstraint(dateLessThan(new Date(date)));
+ }
+ lessThanOrEqual(date) {
+ return this.addConstraint(dateLessThanOrEqual(new Date(date)));
+ }
+ greaterThan(date) {
+ return this.addConstraint(dateGreaterThan(new Date(date)));
+ }
+ greaterThanOrEqual(date) {
+ return this.addConstraint(dateGreaterThanOrEqual(new Date(date)));
+ }
+ equal(date) {
+ const resolved = new Date(date);
+ return Number.isNaN(resolved.getTime()) ? this.invalid : this.addConstraint(dateEqual(resolved));
+ }
+ notEqual(date) {
+ const resolved = new Date(date);
+ return Number.isNaN(resolved.getTime()) ? this.valid : this.addConstraint(dateNotEqual(resolved));
+ }
+ get valid() {
+ return this.addConstraint(dateValid);
+ }
+ get invalid() {
+ return this.addConstraint(dateInvalid);
+ }
+ handle(value) {
+ return value instanceof Date ? Result.ok(value) : Result.err(new ValidationError("s.date", "Expected a Date", value));
+ }
+};
+__name(DateValidator, "DateValidator");
+var ExpectedValidationError = class extends ValidationError {
+ constructor(validator, message, given, expected) {
+ super(validator, message, given);
+ this.expected = expected;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ validator: this.validator,
+ given: this.given,
+ expected: this.expected
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const validator = options.stylize(this.validator, "string");
+ if (depth < 0) {
+ return options.stylize(`[ExpectedValidationError: ${validator}]`, "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1 };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const expected = util.inspect(this.expected, newOptions).replace(/\n/g, padding);
+ const given = util.inspect(this.given, newOptions).replace(/\n/g, padding);
+ const header = `${options.stylize("ExpectedValidationError", "special")} > ${validator}`;
+ const message = options.stylize(this.message, "regexp");
+ const expectedBlock = `
+ ${options.stylize("Expected:", "string")}${padding}${expected}`;
+ const givenBlock = `
+ ${options.stylize("Received:", "regexp")}${padding}${given}`;
+ return `${header}
+ ${message}
+${expectedBlock}
+${givenBlock}`;
+ }
+};
+__name(ExpectedValidationError, "ExpectedValidationError");
+
+// src/validators/InstanceValidator.ts
+var InstanceValidator = class extends BaseValidator {
+ constructor(expected, constraints = []) {
+ super(constraints);
+ this.expected = expected;
+ }
+ handle(value) {
+ return value instanceof this.expected ? Result.ok(value) : Result.err(new ExpectedValidationError("s.instance(V)", "Expected", value, this.expected));
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.expected, this.constraints]);
+ }
+};
+__name(InstanceValidator, "InstanceValidator");
+
+// src/validators/LiteralValidator.ts
+var LiteralValidator = class extends BaseValidator {
+ constructor(literal, constraints = []) {
+ super(constraints);
+ this.expected = literal;
+ }
+ handle(value) {
+ return Object.is(value, this.expected) ? Result.ok(value) : Result.err(new ExpectedValidationError("s.literal(V)", "Expected values to be equals", value, this.expected));
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.expected, this.constraints]);
+ }
+};
+__name(LiteralValidator, "LiteralValidator");
+
+// src/validators/NeverValidator.ts
+var NeverValidator = class extends BaseValidator {
+ handle(value) {
+ return Result.err(new ValidationError("s.never", "Expected a value to not be passed", value));
+ }
+};
+__name(NeverValidator, "NeverValidator");
+
+// src/validators/NullishValidator.ts
+var NullishValidator = class extends BaseValidator {
+ handle(value) {
+ return value === void 0 || value === null ? Result.ok(value) : Result.err(new ValidationError("s.nullish", "Expected undefined or null", value));
+ }
+};
+__name(NullishValidator, "NullishValidator");
+
+// src/constraints/NumberConstraints.ts
+function numberComparator(comparator, name, expected, number) {
+ return {
+ run(input) {
+ return comparator(input, number) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid number value", input, expected));
+ }
+ };
+}
+__name(numberComparator, "numberComparator");
+function numberLessThan(value) {
+ const expected = `expected < ${value}`;
+ return numberComparator(lessThan, "s.number.lessThan", expected, value);
+}
+__name(numberLessThan, "numberLessThan");
+function numberLessThanOrEqual(value) {
+ const expected = `expected <= ${value}`;
+ return numberComparator(lessThanOrEqual, "s.number.lessThanOrEqual", expected, value);
+}
+__name(numberLessThanOrEqual, "numberLessThanOrEqual");
+function numberGreaterThan(value) {
+ const expected = `expected > ${value}`;
+ return numberComparator(greaterThan, "s.number.greaterThan", expected, value);
+}
+__name(numberGreaterThan, "numberGreaterThan");
+function numberGreaterThanOrEqual(value) {
+ const expected = `expected >= ${value}`;
+ return numberComparator(greaterThanOrEqual, "s.number.greaterThanOrEqual", expected, value);
+}
+__name(numberGreaterThanOrEqual, "numberGreaterThanOrEqual");
+function numberEqual(value) {
+ const expected = `expected === ${value}`;
+ return numberComparator(equal, "s.number.equal", expected, value);
+}
+__name(numberEqual, "numberEqual");
+function numberNotEqual(value) {
+ const expected = `expected !== ${value}`;
+ return numberComparator(notEqual, "s.number.notEqual", expected, value);
+}
+__name(numberNotEqual, "numberNotEqual");
+var numberInt = {
+ run(input) {
+ return Number.isInteger(input) ? Result.ok(input) : Result.err(
+ new ExpectedConstraintError("s.number.int", "Given value is not an integer", input, "Number.isInteger(expected) to be true")
+ );
+ }
+};
+var numberSafeInt = {
+ run(input) {
+ return Number.isSafeInteger(input) ? Result.ok(input) : Result.err(
+ new ExpectedConstraintError(
+ "s.number.safeInt",
+ "Given value is not a safe integer",
+ input,
+ "Number.isSafeInteger(expected) to be true"
+ )
+ );
+ }
+};
+var numberFinite = {
+ run(input) {
+ return Number.isFinite(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.number.finite", "Given value is not finite", input, "Number.isFinite(expected) to be true"));
+ }
+};
+var numberNaN = {
+ run(input) {
+ return Number.isNaN(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.number.equal(NaN)", "Invalid number value", input, "expected === NaN"));
+ }
+};
+var numberNotNaN = {
+ run(input) {
+ return Number.isNaN(input) ? Result.err(new ExpectedConstraintError("s.number.notEqual(NaN)", "Invalid number value", input, "expected !== NaN")) : Result.ok(input);
+ }
+};
+function numberDivisibleBy(divider) {
+ const expected = `expected % ${divider} === 0`;
+ return {
+ run(input) {
+ return input % divider === 0 ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.number.divisibleBy", "Number is not divisible", input, expected));
+ }
+ };
+}
+__name(numberDivisibleBy, "numberDivisibleBy");
+
+// src/validators/NumberValidator.ts
+var NumberValidator = class extends BaseValidator {
+ lessThan(number) {
+ return this.addConstraint(numberLessThan(number));
+ }
+ lessThanOrEqual(number) {
+ return this.addConstraint(numberLessThanOrEqual(number));
+ }
+ greaterThan(number) {
+ return this.addConstraint(numberGreaterThan(number));
+ }
+ greaterThanOrEqual(number) {
+ return this.addConstraint(numberGreaterThanOrEqual(number));
+ }
+ equal(number) {
+ return Number.isNaN(number) ? this.addConstraint(numberNaN) : this.addConstraint(numberEqual(number));
+ }
+ notEqual(number) {
+ return Number.isNaN(number) ? this.addConstraint(numberNotNaN) : this.addConstraint(numberNotEqual(number));
+ }
+ get int() {
+ return this.addConstraint(numberInt);
+ }
+ get safeInt() {
+ return this.addConstraint(numberSafeInt);
+ }
+ get finite() {
+ return this.addConstraint(numberFinite);
+ }
+ get positive() {
+ return this.greaterThanOrEqual(0);
+ }
+ get negative() {
+ return this.lessThan(0);
+ }
+ divisibleBy(divider) {
+ return this.addConstraint(numberDivisibleBy(divider));
+ }
+ get abs() {
+ return this.transform(Math.abs);
+ }
+ get sign() {
+ return this.transform(Math.sign);
+ }
+ get trunc() {
+ return this.transform(Math.trunc);
+ }
+ get floor() {
+ return this.transform(Math.floor);
+ }
+ get fround() {
+ return this.transform(Math.fround);
+ }
+ get round() {
+ return this.transform(Math.round);
+ }
+ get ceil() {
+ return this.transform(Math.ceil);
+ }
+ handle(value) {
+ return typeof value === "number" ? Result.ok(value) : Result.err(new ValidationError("s.number", "Expected a number primitive", value));
+ }
+};
+__name(NumberValidator, "NumberValidator");
+
+// src/lib/errors/MissingPropertyError.ts
+var MissingPropertyError = class extends BaseError {
+ constructor(property) {
+ super("A required property is missing");
+ this.property = property;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ property: this.property
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const property = options.stylize(this.property.toString(), "string");
+ if (depth < 0) {
+ return options.stylize(`[MissingPropertyError: ${property}]`, "special");
+ }
+ const header = `${options.stylize("MissingPropertyError", "special")} > ${property}`;
+ const message = options.stylize(this.message, "regexp");
+ return `${header}
+ ${message}`;
+ }
+};
+__name(MissingPropertyError, "MissingPropertyError");
+var UnknownPropertyError = class extends BaseError {
+ constructor(property, value) {
+ super("Received unexpected property");
+ this.property = property;
+ this.value = value;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ property: this.property,
+ value: this.value
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const property = options.stylize(this.property.toString(), "string");
+ if (depth < 0) {
+ return options.stylize(`[UnknownPropertyError: ${property}]`, "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1, compact: true };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const given = util.inspect(this.value, newOptions).replace(/\n/g, padding);
+ const header = `${options.stylize("UnknownPropertyError", "special")} > ${property}`;
+ const message = options.stylize(this.message, "regexp");
+ const givenBlock = `
+ ${options.stylize("Received:", "regexp")}${padding}${given}`;
+ return `${header}
+ ${message}
+${givenBlock}`;
+ }
+};
+__name(UnknownPropertyError, "UnknownPropertyError");
+
+// src/validators/DefaultValidator.ts
+var DefaultValidator = class extends BaseValidator {
+ constructor(validator, value, constraints = []) {
+ super(constraints);
+ this.validator = validator;
+ this.defaultValue = value;
+ }
+ default(value) {
+ const clone = this.clone();
+ clone.defaultValue = value;
+ return clone;
+ }
+ handle(value) {
+ return typeof value === "undefined" ? Result.ok(getValue(this.defaultValue)) : this.validator["handle"](value);
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validator, this.defaultValue, this.constraints]);
+ }
+};
+__name(DefaultValidator, "DefaultValidator");
+
+// src/lib/errors/CombinedError.ts
+var CombinedError = class extends BaseError {
+ constructor(errors) {
+ super("Received one or more errors");
+ this.errors = errors;
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ if (depth < 0) {
+ return options.stylize("[CombinedError]", "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1, compact: true };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const header = `${options.stylize("CombinedError", "special")} (${options.stylize(this.errors.length.toString(), "number")})`;
+ const message = options.stylize(this.message, "regexp");
+ const errors = this.errors.map((error, i) => {
+ const index = options.stylize((i + 1).toString(), "number");
+ const body = error[customInspectSymbolStackLess](depth - 1, newOptions).replace(/\n/g, padding);
+ return ` ${index} ${body}`;
+ }).join("\n\n");
+ return `${header}
+ ${message}
+
+${errors}`;
+ }
+};
+__name(CombinedError, "CombinedError");
+
+// src/validators/UnionValidator.ts
+var UnionValidator = class extends BaseValidator {
+ constructor(validators, constraints = []) {
+ super(constraints);
+ this.validators = validators;
+ }
+ get optional() {
+ if (this.validators.length === 0)
+ return new UnionValidator([new LiteralValidator(void 0)], this.constraints);
+ const [validator] = this.validators;
+ if (validator instanceof LiteralValidator) {
+ if (validator.expected === void 0)
+ return this.clone();
+ if (validator.expected === null) {
+ return new UnionValidator(
+ [new NullishValidator(), ...this.validators.slice(1)],
+ this.constraints
+ );
+ }
+ } else if (validator instanceof NullishValidator) {
+ return this.clone();
+ }
+ return new UnionValidator([new LiteralValidator(void 0), ...this.validators]);
+ }
+ get required() {
+ if (this.validators.length === 0)
+ return this.clone();
+ const [validator] = this.validators;
+ if (validator instanceof LiteralValidator) {
+ if (validator.expected === void 0)
+ return new UnionValidator(this.validators.slice(1), this.constraints);
+ } else if (validator instanceof NullishValidator) {
+ return new UnionValidator([new LiteralValidator(null), ...this.validators.slice(1)], this.constraints);
+ }
+ return this.clone();
+ }
+ get nullable() {
+ if (this.validators.length === 0)
+ return new UnionValidator([new LiteralValidator(null)], this.constraints);
+ const [validator] = this.validators;
+ if (validator instanceof LiteralValidator) {
+ if (validator.expected === null)
+ return this.clone();
+ if (validator.expected === void 0) {
+ return new UnionValidator(
+ [new NullishValidator(), ...this.validators.slice(1)],
+ this.constraints
+ );
+ }
+ } else if (validator instanceof NullishValidator) {
+ return this.clone();
+ }
+ return new UnionValidator([new LiteralValidator(null), ...this.validators]);
+ }
+ get nullish() {
+ if (this.validators.length === 0)
+ return new UnionValidator([new NullishValidator()], this.constraints);
+ const [validator] = this.validators;
+ if (validator instanceof LiteralValidator) {
+ if (validator.expected === null || validator.expected === void 0) {
+ return new UnionValidator([new NullishValidator(), ...this.validators.slice(1)], this.constraints);
+ }
+ } else if (validator instanceof NullishValidator) {
+ return this.clone();
+ }
+ return new UnionValidator([new NullishValidator(), ...this.validators]);
+ }
+ or(...predicates) {
+ return new UnionValidator([...this.validators, ...predicates]);
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validators, this.constraints]);
+ }
+ handle(value) {
+ const errors = [];
+ for (const validator of this.validators) {
+ const result = validator.run(value);
+ if (result.isOk())
+ return result;
+ errors.push(result.error);
+ }
+ return Result.err(new CombinedError(errors));
+ }
+};
+__name(UnionValidator, "UnionValidator");
+
+// src/validators/ObjectValidator.ts
+var ObjectValidator = class extends BaseValidator {
+ constructor(shape, strategy = 0 /* Ignore */, constraints = []) {
+ super(constraints);
+ this.keys = [];
+ this.requiredKeys = /* @__PURE__ */ new Map();
+ this.possiblyUndefinedKeys = /* @__PURE__ */ new Map();
+ this.possiblyUndefinedKeysWithDefaults = /* @__PURE__ */ new Map();
+ this.shape = shape;
+ this.strategy = strategy;
+ switch (this.strategy) {
+ case 0 /* Ignore */:
+ this.handleStrategy = (value) => this.handleIgnoreStrategy(value);
+ break;
+ case 1 /* Strict */: {
+ this.handleStrategy = (value) => this.handleStrictStrategy(value);
+ break;
+ }
+ case 2 /* Passthrough */:
+ this.handleStrategy = (value) => this.handlePassthroughStrategy(value);
+ break;
+ }
+ const shapeEntries = Object.entries(shape);
+ this.keys = shapeEntries.map(([key]) => key);
+ for (const [key, validator] of shapeEntries) {
+ if (validator instanceof UnionValidator) {
+ const [possiblyLiteralOrNullishPredicate] = validator["validators"];
+ if (possiblyLiteralOrNullishPredicate instanceof NullishValidator) {
+ this.possiblyUndefinedKeys.set(key, validator);
+ } else if (possiblyLiteralOrNullishPredicate instanceof LiteralValidator) {
+ if (possiblyLiteralOrNullishPredicate.expected === void 0) {
+ this.possiblyUndefinedKeys.set(key, validator);
+ } else {
+ this.requiredKeys.set(key, validator);
+ }
+ } else if (validator instanceof DefaultValidator) {
+ this.possiblyUndefinedKeysWithDefaults.set(key, validator);
+ } else {
+ this.requiredKeys.set(key, validator);
+ }
+ } else if (validator instanceof NullishValidator) {
+ this.possiblyUndefinedKeys.set(key, validator);
+ } else if (validator instanceof LiteralValidator) {
+ if (validator.expected === void 0) {
+ this.possiblyUndefinedKeys.set(key, validator);
+ } else {
+ this.requiredKeys.set(key, validator);
+ }
+ } else if (validator instanceof DefaultValidator) {
+ this.possiblyUndefinedKeysWithDefaults.set(key, validator);
+ } else {
+ this.requiredKeys.set(key, validator);
+ }
+ }
+ }
+ get strict() {
+ return Reflect.construct(this.constructor, [this.shape, 1 /* Strict */, this.constraints]);
+ }
+ get ignore() {
+ return Reflect.construct(this.constructor, [this.shape, 0 /* Ignore */, this.constraints]);
+ }
+ get passthrough() {
+ return Reflect.construct(this.constructor, [this.shape, 2 /* Passthrough */, this.constraints]);
+ }
+ get partial() {
+ const shape = Object.fromEntries(this.keys.map((key) => [key, this.shape[key].optional]));
+ return Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);
+ }
+ get required() {
+ const shape = Object.fromEntries(
+ this.keys.map((key) => {
+ let validator = this.shape[key];
+ if (validator instanceof UnionValidator)
+ validator = validator.required;
+ return [key, validator];
+ })
+ );
+ return Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);
+ }
+ extend(schema) {
+ const shape = { ...this.shape, ...schema instanceof ObjectValidator ? schema.shape : schema };
+ return Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);
+ }
+ pick(keys) {
+ const shape = Object.fromEntries(
+ keys.filter((key) => this.keys.includes(key)).map((key) => [key, this.shape[key]])
+ );
+ return Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);
+ }
+ omit(keys) {
+ const shape = Object.fromEntries(
+ this.keys.filter((key) => !keys.includes(key)).map((key) => [key, this.shape[key]])
+ );
+ return Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);
+ }
+ handle(value) {
+ const typeOfValue = typeof value;
+ if (typeOfValue !== "object") {
+ return Result.err(new ValidationError("s.object(T)", `Expected the value to be an object, but received ${typeOfValue} instead`, value));
+ }
+ if (value === null) {
+ return Result.err(new ValidationError("s.object(T)", "Expected the value to not be null", value));
+ }
+ if (Array.isArray(value)) {
+ return Result.err(new ValidationError("s.object(T)", "Expected the value to not be an array", value));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(value);
+ }
+ for (const predicate of Object.values(this.shape)) {
+ predicate.setParent(this.parent ?? value);
+ }
+ return this.handleStrategy(value);
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.shape, this.strategy, this.constraints]);
+ }
+ handleIgnoreStrategy(value) {
+ const errors = [];
+ const finalObject = {};
+ const inputEntries = new Map(Object.entries(value));
+ const runPredicate = /* @__PURE__ */ __name((key, predicate) => {
+ const result = predicate.run(value[key]);
+ if (result.isOk()) {
+ finalObject[key] = result.value;
+ } else {
+ const error = result.error;
+ errors.push([key, error]);
+ }
+ }, "runPredicate");
+ for (const [key, predicate] of this.requiredKeys) {
+ if (inputEntries.delete(key)) {
+ runPredicate(key, predicate);
+ } else {
+ errors.push([key, new MissingPropertyError(key)]);
+ }
+ }
+ for (const [key, validator] of this.possiblyUndefinedKeysWithDefaults) {
+ inputEntries.delete(key);
+ runPredicate(key, validator);
+ }
+ if (inputEntries.size === 0) {
+ return errors.length === 0 ? Result.ok(finalObject) : Result.err(new CombinedPropertyError(errors));
+ }
+ const checkInputEntriesInsteadOfSchemaKeys = this.possiblyUndefinedKeys.size > inputEntries.size;
+ if (checkInputEntriesInsteadOfSchemaKeys) {
+ for (const [key] of inputEntries) {
+ const predicate = this.possiblyUndefinedKeys.get(key);
+ if (predicate) {
+ runPredicate(key, predicate);
+ }
+ }
+ } else {
+ for (const [key, predicate] of this.possiblyUndefinedKeys) {
+ if (inputEntries.delete(key)) {
+ runPredicate(key, predicate);
+ }
+ }
+ }
+ return errors.length === 0 ? Result.ok(finalObject) : Result.err(new CombinedPropertyError(errors));
+ }
+ handleStrictStrategy(value) {
+ const errors = [];
+ const finalResult = {};
+ const inputEntries = new Map(Object.entries(value));
+ const runPredicate = /* @__PURE__ */ __name((key, predicate) => {
+ const result = predicate.run(value[key]);
+ if (result.isOk()) {
+ finalResult[key] = result.value;
+ } else {
+ const error = result.error;
+ errors.push([key, error]);
+ }
+ }, "runPredicate");
+ for (const [key, predicate] of this.requiredKeys) {
+ if (inputEntries.delete(key)) {
+ runPredicate(key, predicate);
+ } else {
+ errors.push([key, new MissingPropertyError(key)]);
+ }
+ }
+ for (const [key, validator] of this.possiblyUndefinedKeysWithDefaults) {
+ inputEntries.delete(key);
+ runPredicate(key, validator);
+ }
+ for (const [key, predicate] of this.possiblyUndefinedKeys) {
+ if (inputEntries.size === 0) {
+ break;
+ }
+ if (inputEntries.delete(key)) {
+ runPredicate(key, predicate);
+ }
+ }
+ if (inputEntries.size !== 0) {
+ for (const [key, value2] of inputEntries.entries()) {
+ errors.push([key, new UnknownPropertyError(key, value2)]);
+ }
+ }
+ return errors.length === 0 ? Result.ok(finalResult) : Result.err(new CombinedPropertyError(errors));
+ }
+ handlePassthroughStrategy(value) {
+ const result = this.handleIgnoreStrategy(value);
+ return result.isErr() ? result : Result.ok({ ...value, ...result.value });
+ }
+};
+__name(ObjectValidator, "ObjectValidator");
+
+// src/validators/PassthroughValidator.ts
+var PassthroughValidator = class extends BaseValidator {
+ handle(value) {
+ return Result.ok(value);
+ }
+};
+__name(PassthroughValidator, "PassthroughValidator");
+
+// src/validators/RecordValidator.ts
+var RecordValidator = class extends BaseValidator {
+ constructor(validator, constraints = []) {
+ super(constraints);
+ this.validator = validator;
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validator, this.constraints]);
+ }
+ handle(value) {
+ if (typeof value !== "object") {
+ return Result.err(new ValidationError("s.record(T)", "Expected an object", value));
+ }
+ if (value === null) {
+ return Result.err(new ValidationError("s.record(T)", "Expected the value to not be null", value));
+ }
+ if (Array.isArray(value)) {
+ return Result.err(new ValidationError("s.record(T)", "Expected the value to not be an array", value));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(value);
+ }
+ const errors = [];
+ const transformed = {};
+ for (const [key, val] of Object.entries(value)) {
+ const result = this.validator.run(val);
+ if (result.isOk())
+ transformed[key] = result.value;
+ else
+ errors.push([key, result.error]);
+ }
+ return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedPropertyError(errors));
+ }
+};
+__name(RecordValidator, "RecordValidator");
+
+// src/validators/SetValidator.ts
+var SetValidator = class extends BaseValidator {
+ constructor(validator, constraints = []) {
+ super(constraints);
+ this.validator = validator;
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validator, this.constraints]);
+ }
+ handle(values) {
+ if (!(values instanceof Set)) {
+ return Result.err(new ValidationError("s.set(T)", "Expected a set", values));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(values);
+ }
+ const errors = [];
+ const transformed = /* @__PURE__ */ new Set();
+ for (const value of values) {
+ const result = this.validator.run(value);
+ if (result.isOk())
+ transformed.add(result.value);
+ else
+ errors.push(result.error);
+ }
+ return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedError(errors));
+ }
+};
+__name(SetValidator, "SetValidator");
+
+// src/constraints/util/emailValidator.ts
+var accountRegex = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")$/;
+function validateEmail(email) {
+ if (!email)
+ return false;
+ const atIndex = email.indexOf("@");
+ if (atIndex === -1)
+ return false;
+ if (atIndex > 64)
+ return false;
+ const domainIndex = atIndex + 1;
+ if (email.includes("@", domainIndex))
+ return false;
+ if (email.length - domainIndex > 255)
+ return false;
+ let dotIndex = email.indexOf(".", domainIndex);
+ if (dotIndex === -1)
+ return false;
+ let lastDotIndex = domainIndex;
+ do {
+ if (dotIndex - lastDotIndex > 63)
+ return false;
+ lastDotIndex = dotIndex + 1;
+ } while ((dotIndex = email.indexOf(".", lastDotIndex)) !== -1);
+ if (email.length - lastDotIndex > 63)
+ return false;
+ return accountRegex.test(email.slice(0, atIndex)) && validateEmailDomain(email.slice(domainIndex));
+}
+__name(validateEmail, "validateEmail");
+function validateEmailDomain(domain) {
+ try {
+ return new URL(`http://${domain}`).hostname === domain;
+ } catch {
+ return false;
+ }
+}
+__name(validateEmailDomain, "validateEmailDomain");
+
+// src/constraints/util/net.ts
+var v4Seg = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])";
+var v4Str = `(${v4Seg}[.]){3}${v4Seg}`;
+var IPv4Reg = new RegExp(`^${v4Str}$`);
+var v6Seg = "(?:[0-9a-fA-F]{1,4})";
+var IPv6Reg = new RegExp(
+ `^((?:${v6Seg}:){7}(?:${v6Seg}|:)|(?:${v6Seg}:){6}(?:${v4Str}|:${v6Seg}|:)|(?:${v6Seg}:){5}(?::${v4Str}|(:${v6Seg}){1,2}|:)|(?:${v6Seg}:){4}(?:(:${v6Seg}){0,1}:${v4Str}|(:${v6Seg}){1,3}|:)|(?:${v6Seg}:){3}(?:(:${v6Seg}){0,2}:${v4Str}|(:${v6Seg}){1,4}|:)|(?:${v6Seg}:){2}(?:(:${v6Seg}){0,3}:${v4Str}|(:${v6Seg}){1,5}|:)|(?:${v6Seg}:){1}(?:(:${v6Seg}){0,4}:${v4Str}|(:${v6Seg}){1,6}|:)|(?::((?::${v6Seg}){0,5}:${v4Str}|(?::${v6Seg}){1,7}|:)))(%[0-9a-zA-Z-.:]{1,})?$`
+);
+function isIPv4(s2) {
+ return IPv4Reg.test(s2);
+}
+__name(isIPv4, "isIPv4");
+function isIPv6(s2) {
+ return IPv6Reg.test(s2);
+}
+__name(isIPv6, "isIPv6");
+function isIP(s2) {
+ if (isIPv4(s2))
+ return 4;
+ if (isIPv6(s2))
+ return 6;
+ return 0;
+}
+__name(isIP, "isIP");
+
+// src/constraints/util/phoneValidator.ts
+var phoneNumberRegex = /^((?:\+|0{0,2})\d{1,2}\s?)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$/;
+function validatePhoneNumber(input) {
+ return phoneNumberRegex.test(input);
+}
+__name(validatePhoneNumber, "validatePhoneNumber");
+var MultiplePossibilitiesConstraintError = class extends BaseConstraintError {
+ constructor(constraint, message, given, expected) {
+ super(constraint, message, given);
+ this.expected = expected;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ constraint: this.constraint,
+ given: this.given,
+ expected: this.expected
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const constraint = options.stylize(this.constraint, "string");
+ if (depth < 0) {
+ return options.stylize(`[MultiplePossibilitiesConstraintError: ${constraint}]`, "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1 };
+ const verticalLine = options.stylize("|", "undefined");
+ const padding = `
+ ${verticalLine} `;
+ const given = util.inspect(this.given, newOptions).replace(/\n/g, padding);
+ const header = `${options.stylize("MultiplePossibilitiesConstraintError", "special")} > ${constraint}`;
+ const message = options.stylize(this.message, "regexp");
+ const expectedPadding = `
+ ${verticalLine} - `;
+ const expectedBlock = `
+ ${options.stylize("Expected any of the following:", "string")}${expectedPadding}${this.expected.map((possible) => options.stylize(possible, "boolean")).join(expectedPadding)}`;
+ const givenBlock = `
+ ${options.stylize("Received:", "regexp")}${padding}${given}`;
+ return `${header}
+ ${message}
+${expectedBlock}
+${givenBlock}`;
+ }
+};
+__name(MultiplePossibilitiesConstraintError, "MultiplePossibilitiesConstraintError");
+
+// src/constraints/util/common/combinedResultFn.ts
+function combinedErrorFn(...fns) {
+ switch (fns.length) {
+ case 0:
+ return () => null;
+ case 1:
+ return fns[0];
+ case 2: {
+ const [fn0, fn1] = fns;
+ return (...params) => fn0(...params) || fn1(...params);
+ }
+ default: {
+ return (...params) => {
+ for (const fn of fns) {
+ const result = fn(...params);
+ if (result)
+ return result;
+ }
+ return null;
+ };
+ }
+ }
+}
+__name(combinedErrorFn, "combinedErrorFn");
+
+// src/constraints/util/urlValidators.ts
+function createUrlValidators(options) {
+ const fns = [];
+ if (options?.allowedProtocols?.length)
+ fns.push(allowedProtocolsFn(options.allowedProtocols));
+ if (options?.allowedDomains?.length)
+ fns.push(allowedDomainsFn(options.allowedDomains));
+ return combinedErrorFn(...fns);
+}
+__name(createUrlValidators, "createUrlValidators");
+function allowedProtocolsFn(allowedProtocols) {
+ return (input, url) => allowedProtocols.includes(url.protocol) ? null : new MultiplePossibilitiesConstraintError("s.string.url", "Invalid URL protocol", input, allowedProtocols);
+}
+__name(allowedProtocolsFn, "allowedProtocolsFn");
+function allowedDomainsFn(allowedDomains) {
+ return (input, url) => allowedDomains.includes(url.hostname) ? null : new MultiplePossibilitiesConstraintError("s.string.url", "Invalid URL domain", input, allowedDomains);
+}
+__name(allowedDomainsFn, "allowedDomainsFn");
+
+// src/constraints/StringConstraints.ts
+function stringLengthComparator(comparator, name, expected, length) {
+ return {
+ run(input) {
+ return comparator(input.length, length) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid string length", input, expected));
+ }
+ };
+}
+__name(stringLengthComparator, "stringLengthComparator");
+function stringLengthLessThan(length) {
+ const expected = `expected.length < ${length}`;
+ return stringLengthComparator(lessThan, "s.string.lengthLessThan", expected, length);
+}
+__name(stringLengthLessThan, "stringLengthLessThan");
+function stringLengthLessThanOrEqual(length) {
+ const expected = `expected.length <= ${length}`;
+ return stringLengthComparator(lessThanOrEqual, "s.string.lengthLessThanOrEqual", expected, length);
+}
+__name(stringLengthLessThanOrEqual, "stringLengthLessThanOrEqual");
+function stringLengthGreaterThan(length) {
+ const expected = `expected.length > ${length}`;
+ return stringLengthComparator(greaterThan, "s.string.lengthGreaterThan", expected, length);
+}
+__name(stringLengthGreaterThan, "stringLengthGreaterThan");
+function stringLengthGreaterThanOrEqual(length) {
+ const expected = `expected.length >= ${length}`;
+ return stringLengthComparator(greaterThanOrEqual, "s.string.lengthGreaterThanOrEqual", expected, length);
+}
+__name(stringLengthGreaterThanOrEqual, "stringLengthGreaterThanOrEqual");
+function stringLengthEqual(length) {
+ const expected = `expected.length === ${length}`;
+ return stringLengthComparator(equal, "s.string.lengthEqual", expected, length);
+}
+__name(stringLengthEqual, "stringLengthEqual");
+function stringLengthNotEqual(length) {
+ const expected = `expected.length !== ${length}`;
+ return stringLengthComparator(notEqual, "s.string.lengthNotEqual", expected, length);
+}
+__name(stringLengthNotEqual, "stringLengthNotEqual");
+function stringEmail() {
+ return {
+ run(input) {
+ return validateEmail(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.string.email", "Invalid email address", input, "expected to be an email address"));
+ }
+ };
+}
+__name(stringEmail, "stringEmail");
+function stringRegexValidator(type, expected, regex) {
+ return {
+ run(input) {
+ return regex.test(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError(type, "Invalid string format", input, expected));
+ }
+ };
+}
+__name(stringRegexValidator, "stringRegexValidator");
+function stringUrl(options) {
+ const validatorFn = createUrlValidators(options);
+ return {
+ run(input) {
+ let url;
+ try {
+ url = new URL(input);
+ } catch {
+ return Result.err(new ExpectedConstraintError("s.string.url", "Invalid URL", input, "expected to match a URL"));
+ }
+ const validatorFnResult = validatorFn(input, url);
+ if (validatorFnResult === null)
+ return Result.ok(input);
+ return Result.err(validatorFnResult);
+ }
+ };
+}
+__name(stringUrl, "stringUrl");
+function stringIp(version) {
+ const ipVersion = version ? `v${version}` : "";
+ const validatorFn = version === 4 ? isIPv4 : version === 6 ? isIPv6 : isIP;
+ const name = `s.string.ip${ipVersion}`;
+ const message = `Invalid IP${ipVersion} address`;
+ const expected = `expected to be an IP${ipVersion} address`;
+ return {
+ run(input) {
+ return validatorFn(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, message, input, expected));
+ }
+ };
+}
+__name(stringIp, "stringIp");
+function stringRegex(regex) {
+ return stringRegexValidator("s.string.regex", `expected ${regex}.test(expected) to be true`, regex);
+}
+__name(stringRegex, "stringRegex");
+function stringUuid({ version = 4, nullable = false } = {}) {
+ version ?? (version = "1-5");
+ const regex = new RegExp(
+ `^(?:[0-9A-F]{8}-[0-9A-F]{4}-[${version}][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}${nullable ? "|00000000-0000-0000-0000-000000000000" : ""})$`,
+ "i"
+ );
+ const expected = `expected to match UUID${typeof version === "number" ? `v${version}` : ` in range of ${version}`}`;
+ return stringRegexValidator("s.string.uuid", expected, regex);
+}
+__name(stringUuid, "stringUuid");
+function stringDate() {
+ return {
+ run(input) {
+ const time = Date.parse(input);
+ return Number.isNaN(time) ? Result.err(
+ new ExpectedConstraintError(
+ "s.string.date",
+ "Invalid date string",
+ input,
+ "expected to be a valid date string (in the ISO 8601 or ECMA-262 format)"
+ )
+ ) : Result.ok(input);
+ }
+ };
+}
+__name(stringDate, "stringDate");
+function stringPhone() {
+ return {
+ run(input) {
+ return validatePhoneNumber(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.string.phone", "Invalid phone number", input, "expected to be a phone number"));
+ }
+ };
+}
+__name(stringPhone, "stringPhone");
+
+// src/validators/StringValidator.ts
+var StringValidator = class extends BaseValidator {
+ lengthLessThan(length) {
+ return this.addConstraint(stringLengthLessThan(length));
+ }
+ lengthLessThanOrEqual(length) {
+ return this.addConstraint(stringLengthLessThanOrEqual(length));
+ }
+ lengthGreaterThan(length) {
+ return this.addConstraint(stringLengthGreaterThan(length));
+ }
+ lengthGreaterThanOrEqual(length) {
+ return this.addConstraint(stringLengthGreaterThanOrEqual(length));
+ }
+ lengthEqual(length) {
+ return this.addConstraint(stringLengthEqual(length));
+ }
+ lengthNotEqual(length) {
+ return this.addConstraint(stringLengthNotEqual(length));
+ }
+ get email() {
+ return this.addConstraint(stringEmail());
+ }
+ url(options) {
+ return this.addConstraint(stringUrl(options));
+ }
+ uuid(options) {
+ return this.addConstraint(stringUuid(options));
+ }
+ regex(regex) {
+ return this.addConstraint(stringRegex(regex));
+ }
+ get date() {
+ return this.addConstraint(stringDate());
+ }
+ get ipv4() {
+ return this.ip(4);
+ }
+ get ipv6() {
+ return this.ip(6);
+ }
+ ip(version) {
+ return this.addConstraint(stringIp(version));
+ }
+ phone() {
+ return this.addConstraint(stringPhone());
+ }
+ handle(value) {
+ return typeof value === "string" ? Result.ok(value) : Result.err(new ValidationError("s.string", "Expected a string primitive", value));
+ }
+};
+__name(StringValidator, "StringValidator");
+
+// src/validators/TupleValidator.ts
+var TupleValidator = class extends BaseValidator {
+ constructor(validators, constraints = []) {
+ super(constraints);
+ this.validators = [];
+ this.validators = validators;
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validators, this.constraints]);
+ }
+ handle(values) {
+ if (!Array.isArray(values)) {
+ return Result.err(new ValidationError("s.tuple(T)", "Expected an array", values));
+ }
+ if (values.length !== this.validators.length) {
+ return Result.err(new ValidationError("s.tuple(T)", `Expected an array of length ${this.validators.length}`, values));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(values);
+ }
+ const errors = [];
+ const transformed = [];
+ for (let i = 0; i < values.length; i++) {
+ const result = this.validators[i].run(values[i]);
+ if (result.isOk())
+ transformed.push(result.value);
+ else
+ errors.push([i, result.error]);
+ }
+ return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedPropertyError(errors));
+ }
+};
+__name(TupleValidator, "TupleValidator");
+
+// src/validators/MapValidator.ts
+var MapValidator = class extends BaseValidator {
+ constructor(keyValidator, valueValidator, constraints = []) {
+ super(constraints);
+ this.keyValidator = keyValidator;
+ this.valueValidator = valueValidator;
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.keyValidator, this.valueValidator, this.constraints]);
+ }
+ handle(value) {
+ if (!(value instanceof Map)) {
+ return Result.err(new ValidationError("s.map(K, V)", "Expected a map", value));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(value);
+ }
+ const errors = [];
+ const transformed = /* @__PURE__ */ new Map();
+ for (const [key, val] of value.entries()) {
+ const keyResult = this.keyValidator.run(key);
+ const valueResult = this.valueValidator.run(val);
+ const { length } = errors;
+ if (keyResult.isErr())
+ errors.push([key, keyResult.error]);
+ if (valueResult.isErr())
+ errors.push([key, valueResult.error]);
+ if (errors.length === length)
+ transformed.set(keyResult.value, valueResult.value);
+ }
+ return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedPropertyError(errors));
+ }
+};
+__name(MapValidator, "MapValidator");
+
+// src/validators/LazyValidator.ts
+var LazyValidator = class extends BaseValidator {
+ constructor(validator, constraints = []) {
+ super(constraints);
+ this.validator = validator;
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validator, this.constraints]);
+ }
+ handle(values) {
+ return this.validator(values).run(values);
+ }
+};
+__name(LazyValidator, "LazyValidator");
+
+// src/lib/errors/UnknownEnumValueError.ts
+var UnknownEnumValueError = class extends BaseError {
+ constructor(value, keys, enumMappings) {
+ super("Expected the value to be one of the following enum values:");
+ this.value = value;
+ this.enumKeys = keys;
+ this.enumMappings = enumMappings;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ value: this.value,
+ enumKeys: this.enumKeys,
+ enumMappings: [...this.enumMappings.entries()]
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const value = options.stylize(this.value.toString(), "string");
+ if (depth < 0) {
+ return options.stylize(`[UnknownEnumValueError: ${value}]`, "special");
+ }
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const pairs = this.enumKeys.map((key) => {
+ const enumValue = this.enumMappings.get(key);
+ return `${options.stylize(key, "string")} or ${options.stylize(
+ enumValue.toString(),
+ typeof enumValue === "number" ? "number" : "string"
+ )}`;
+ }).join(padding);
+ const header = `${options.stylize("UnknownEnumValueError", "special")} > ${value}`;
+ const message = options.stylize(this.message, "regexp");
+ const pairsBlock = `${padding}${pairs}`;
+ return `${header}
+ ${message}
+${pairsBlock}`;
+ }
+};
+__name(UnknownEnumValueError, "UnknownEnumValueError");
+
+// src/validators/NativeEnumValidator.ts
+var NativeEnumValidator = class extends BaseValidator {
+ constructor(enumShape) {
+ super();
+ this.hasNumericElements = false;
+ this.enumMapping = /* @__PURE__ */ new Map();
+ this.enumShape = enumShape;
+ this.enumKeys = Object.keys(enumShape).filter((key) => {
+ return typeof enumShape[enumShape[key]] !== "number";
+ });
+ for (const key of this.enumKeys) {
+ const enumValue = enumShape[key];
+ this.enumMapping.set(key, enumValue);
+ this.enumMapping.set(enumValue, enumValue);
+ if (typeof enumValue === "number") {
+ this.hasNumericElements = true;
+ this.enumMapping.set(`${enumValue}`, enumValue);
+ }
+ }
+ }
+ handle(value) {
+ const typeOfValue = typeof value;
+ if (typeOfValue === "number") {
+ if (!this.hasNumericElements) {
+ return Result.err(new ValidationError("s.nativeEnum(T)", "Expected the value to be a string", value));
+ }
+ } else if (typeOfValue !== "string") {
+ return Result.err(new ValidationError("s.nativeEnum(T)", "Expected the value to be a string or number", value));
+ }
+ const casted = value;
+ const possibleEnumValue = this.enumMapping.get(casted);
+ return typeof possibleEnumValue === "undefined" ? Result.err(new UnknownEnumValueError(casted, this.enumKeys, this.enumMapping)) : Result.ok(possibleEnumValue);
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.enumShape]);
+ }
+};
+__name(NativeEnumValidator, "NativeEnumValidator");
+
+// src/constraints/TypedArrayLengthConstraints.ts
+function typedArrayByteLengthComparator(comparator, name, expected, length) {
+ return {
+ run(input) {
+ return comparator(input.byteLength, length) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid Typed Array byte length", input, expected));
+ }
+ };
+}
+__name(typedArrayByteLengthComparator, "typedArrayByteLengthComparator");
+function typedArrayByteLengthLessThan(value) {
+ const expected = `expected.byteLength < ${value}`;
+ return typedArrayByteLengthComparator(lessThan, "s.typedArray(T).byteLengthLessThan", expected, value);
+}
+__name(typedArrayByteLengthLessThan, "typedArrayByteLengthLessThan");
+function typedArrayByteLengthLessThanOrEqual(value) {
+ const expected = `expected.byteLength <= ${value}`;
+ return typedArrayByteLengthComparator(lessThanOrEqual, "s.typedArray(T).byteLengthLessThanOrEqual", expected, value);
+}
+__name(typedArrayByteLengthLessThanOrEqual, "typedArrayByteLengthLessThanOrEqual");
+function typedArrayByteLengthGreaterThan(value) {
+ const expected = `expected.byteLength > ${value}`;
+ return typedArrayByteLengthComparator(greaterThan, "s.typedArray(T).byteLengthGreaterThan", expected, value);
+}
+__name(typedArrayByteLengthGreaterThan, "typedArrayByteLengthGreaterThan");
+function typedArrayByteLengthGreaterThanOrEqual(value) {
+ const expected = `expected.byteLength >= ${value}`;
+ return typedArrayByteLengthComparator(greaterThanOrEqual, "s.typedArray(T).byteLengthGreaterThanOrEqual", expected, value);
+}
+__name(typedArrayByteLengthGreaterThanOrEqual, "typedArrayByteLengthGreaterThanOrEqual");
+function typedArrayByteLengthEqual(value) {
+ const expected = `expected.byteLength === ${value}`;
+ return typedArrayByteLengthComparator(equal, "s.typedArray(T).byteLengthEqual", expected, value);
+}
+__name(typedArrayByteLengthEqual, "typedArrayByteLengthEqual");
+function typedArrayByteLengthNotEqual(value) {
+ const expected = `expected.byteLength !== ${value}`;
+ return typedArrayByteLengthComparator(notEqual, "s.typedArray(T).byteLengthNotEqual", expected, value);
+}
+__name(typedArrayByteLengthNotEqual, "typedArrayByteLengthNotEqual");
+function typedArrayByteLengthRange(start, endBefore) {
+ const expected = `expected.byteLength >= ${start} && expected.byteLength < ${endBefore}`;
+ return {
+ run(input) {
+ return input.byteLength >= start && input.byteLength < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).byteLengthRange", "Invalid Typed Array byte length", input, expected));
+ }
+ };
+}
+__name(typedArrayByteLengthRange, "typedArrayByteLengthRange");
+function typedArrayByteLengthRangeInclusive(start, end) {
+ const expected = `expected.byteLength >= ${start} && expected.byteLength <= ${end}`;
+ return {
+ run(input) {
+ return input.byteLength >= start && input.byteLength <= end ? Result.ok(input) : Result.err(
+ new ExpectedConstraintError("s.typedArray(T).byteLengthRangeInclusive", "Invalid Typed Array byte length", input, expected)
+ );
+ }
+ };
+}
+__name(typedArrayByteLengthRangeInclusive, "typedArrayByteLengthRangeInclusive");
+function typedArrayByteLengthRangeExclusive(startAfter, endBefore) {
+ const expected = `expected.byteLength > ${startAfter} && expected.byteLength < ${endBefore}`;
+ return {
+ run(input) {
+ return input.byteLength > startAfter && input.byteLength < endBefore ? Result.ok(input) : Result.err(
+ new ExpectedConstraintError("s.typedArray(T).byteLengthRangeExclusive", "Invalid Typed Array byte length", input, expected)
+ );
+ }
+ };
+}
+__name(typedArrayByteLengthRangeExclusive, "typedArrayByteLengthRangeExclusive");
+function typedArrayLengthComparator(comparator, name, expected, length) {
+ return {
+ run(input) {
+ return comparator(input.length, length) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid Typed Array length", input, expected));
+ }
+ };
+}
+__name(typedArrayLengthComparator, "typedArrayLengthComparator");
+function typedArrayLengthLessThan(value) {
+ const expected = `expected.length < ${value}`;
+ return typedArrayLengthComparator(lessThan, "s.typedArray(T).lengthLessThan", expected, value);
+}
+__name(typedArrayLengthLessThan, "typedArrayLengthLessThan");
+function typedArrayLengthLessThanOrEqual(value) {
+ const expected = `expected.length <= ${value}`;
+ return typedArrayLengthComparator(lessThanOrEqual, "s.typedArray(T).lengthLessThanOrEqual", expected, value);
+}
+__name(typedArrayLengthLessThanOrEqual, "typedArrayLengthLessThanOrEqual");
+function typedArrayLengthGreaterThan(value) {
+ const expected = `expected.length > ${value}`;
+ return typedArrayLengthComparator(greaterThan, "s.typedArray(T).lengthGreaterThan", expected, value);
+}
+__name(typedArrayLengthGreaterThan, "typedArrayLengthGreaterThan");
+function typedArrayLengthGreaterThanOrEqual(value) {
+ const expected = `expected.length >= ${value}`;
+ return typedArrayLengthComparator(greaterThanOrEqual, "s.typedArray(T).lengthGreaterThanOrEqual", expected, value);
+}
+__name(typedArrayLengthGreaterThanOrEqual, "typedArrayLengthGreaterThanOrEqual");
+function typedArrayLengthEqual(value) {
+ const expected = `expected.length === ${value}`;
+ return typedArrayLengthComparator(equal, "s.typedArray(T).lengthEqual", expected, value);
+}
+__name(typedArrayLengthEqual, "typedArrayLengthEqual");
+function typedArrayLengthNotEqual(value) {
+ const expected = `expected.length !== ${value}`;
+ return typedArrayLengthComparator(notEqual, "s.typedArray(T).lengthNotEqual", expected, value);
+}
+__name(typedArrayLengthNotEqual, "typedArrayLengthNotEqual");
+function typedArrayLengthRange(start, endBefore) {
+ const expected = `expected.length >= ${start} && expected.length < ${endBefore}`;
+ return {
+ run(input) {
+ return input.length >= start && input.length < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).lengthRange", "Invalid Typed Array length", input, expected));
+ }
+ };
+}
+__name(typedArrayLengthRange, "typedArrayLengthRange");
+function typedArrayLengthRangeInclusive(start, end) {
+ const expected = `expected.length >= ${start} && expected.length <= ${end}`;
+ return {
+ run(input) {
+ return input.length >= start && input.length <= end ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).lengthRangeInclusive", "Invalid Typed Array length", input, expected));
+ }
+ };
+}
+__name(typedArrayLengthRangeInclusive, "typedArrayLengthRangeInclusive");
+function typedArrayLengthRangeExclusive(startAfter, endBefore) {
+ const expected = `expected.length > ${startAfter} && expected.length < ${endBefore}`;
+ return {
+ run(input) {
+ return input.length > startAfter && input.length < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).lengthRangeExclusive", "Invalid Typed Array length", input, expected));
+ }
+ };
+}
+__name(typedArrayLengthRangeExclusive, "typedArrayLengthRangeExclusive");
+
+// src/constraints/util/common/vowels.ts
+var vowels = ["a", "e", "i", "o", "u"];
+var aOrAn = /* @__PURE__ */ __name((word) => {
+ return `${vowels.includes(word[0].toLowerCase()) ? "an" : "a"} ${word}`;
+}, "aOrAn");
+
+// src/constraints/util/typedArray.ts
+var TypedArrays = {
+ Int8Array: (x) => x instanceof Int8Array,
+ Uint8Array: (x) => x instanceof Uint8Array,
+ Uint8ClampedArray: (x) => x instanceof Uint8ClampedArray,
+ Int16Array: (x) => x instanceof Int16Array,
+ Uint16Array: (x) => x instanceof Uint16Array,
+ Int32Array: (x) => x instanceof Int32Array,
+ Uint32Array: (x) => x instanceof Uint32Array,
+ Float32Array: (x) => x instanceof Float32Array,
+ Float64Array: (x) => x instanceof Float64Array,
+ BigInt64Array: (x) => x instanceof BigInt64Array,
+ BigUint64Array: (x) => x instanceof BigUint64Array,
+ TypedArray: (x) => ArrayBuffer.isView(x) && !(x instanceof DataView)
+};
+
+// src/validators/TypedArrayValidator.ts
+var TypedArrayValidator = class extends BaseValidator {
+ constructor(type, constraints = []) {
+ super(constraints);
+ this.type = type;
+ }
+ byteLengthLessThan(length) {
+ return this.addConstraint(typedArrayByteLengthLessThan(length));
+ }
+ byteLengthLessThanOrEqual(length) {
+ return this.addConstraint(typedArrayByteLengthLessThanOrEqual(length));
+ }
+ byteLengthGreaterThan(length) {
+ return this.addConstraint(typedArrayByteLengthGreaterThan(length));
+ }
+ byteLengthGreaterThanOrEqual(length) {
+ return this.addConstraint(typedArrayByteLengthGreaterThanOrEqual(length));
+ }
+ byteLengthEqual(length) {
+ return this.addConstraint(typedArrayByteLengthEqual(length));
+ }
+ byteLengthNotEqual(length) {
+ return this.addConstraint(typedArrayByteLengthNotEqual(length));
+ }
+ byteLengthRange(start, endBefore) {
+ return this.addConstraint(typedArrayByteLengthRange(start, endBefore));
+ }
+ byteLengthRangeInclusive(startAt, endAt) {
+ return this.addConstraint(typedArrayByteLengthRangeInclusive(startAt, endAt));
+ }
+ byteLengthRangeExclusive(startAfter, endBefore) {
+ return this.addConstraint(typedArrayByteLengthRangeExclusive(startAfter, endBefore));
+ }
+ lengthLessThan(length) {
+ return this.addConstraint(typedArrayLengthLessThan(length));
+ }
+ lengthLessThanOrEqual(length) {
+ return this.addConstraint(typedArrayLengthLessThanOrEqual(length));
+ }
+ lengthGreaterThan(length) {
+ return this.addConstraint(typedArrayLengthGreaterThan(length));
+ }
+ lengthGreaterThanOrEqual(length) {
+ return this.addConstraint(typedArrayLengthGreaterThanOrEqual(length));
+ }
+ lengthEqual(length) {
+ return this.addConstraint(typedArrayLengthEqual(length));
+ }
+ lengthNotEqual(length) {
+ return this.addConstraint(typedArrayLengthNotEqual(length));
+ }
+ lengthRange(start, endBefore) {
+ return this.addConstraint(typedArrayLengthRange(start, endBefore));
+ }
+ lengthRangeInclusive(startAt, endAt) {
+ return this.addConstraint(typedArrayLengthRangeInclusive(startAt, endAt));
+ }
+ lengthRangeExclusive(startAfter, endBefore) {
+ return this.addConstraint(typedArrayLengthRangeExclusive(startAfter, endBefore));
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.type, this.constraints]);
+ }
+ handle(value) {
+ return TypedArrays[this.type](value) ? Result.ok(value) : Result.err(new ValidationError("s.typedArray", `Expected ${aOrAn(this.type)}`, value));
+ }
+};
+__name(TypedArrayValidator, "TypedArrayValidator");
+
+// src/lib/Shapes.ts
+var Shapes = class {
+ get string() {
+ return new StringValidator();
+ }
+ get number() {
+ return new NumberValidator();
+ }
+ get bigint() {
+ return new BigIntValidator();
+ }
+ get boolean() {
+ return new BooleanValidator();
+ }
+ get date() {
+ return new DateValidator();
+ }
+ object(shape) {
+ return new ObjectValidator(shape);
+ }
+ get undefined() {
+ return this.literal(void 0);
+ }
+ get null() {
+ return this.literal(null);
+ }
+ get nullish() {
+ return new NullishValidator();
+ }
+ get any() {
+ return new PassthroughValidator();
+ }
+ get unknown() {
+ return new PassthroughValidator();
+ }
+ get never() {
+ return new NeverValidator();
+ }
+ enum(...values) {
+ return this.union(...values.map((value) => this.literal(value)));
+ }
+ nativeEnum(enumShape) {
+ return new NativeEnumValidator(enumShape);
+ }
+ literal(value) {
+ if (value instanceof Date)
+ return this.date.equal(value);
+ return new LiteralValidator(value);
+ }
+ instance(expected) {
+ return new InstanceValidator(expected);
+ }
+ union(...validators) {
+ return new UnionValidator(validators);
+ }
+ array(validator) {
+ return new ArrayValidator(validator);
+ }
+ typedArray(type = "TypedArray") {
+ return new TypedArrayValidator(type);
+ }
+ get int8Array() {
+ return this.typedArray("Int8Array");
+ }
+ get uint8Array() {
+ return this.typedArray("Uint8Array");
+ }
+ get uint8ClampedArray() {
+ return this.typedArray("Uint8ClampedArray");
+ }
+ get int16Array() {
+ return this.typedArray("Int16Array");
+ }
+ get uint16Array() {
+ return this.typedArray("Uint16Array");
+ }
+ get int32Array() {
+ return this.typedArray("Int32Array");
+ }
+ get uint32Array() {
+ return this.typedArray("Uint32Array");
+ }
+ get float32Array() {
+ return this.typedArray("Float32Array");
+ }
+ get float64Array() {
+ return this.typedArray("Float64Array");
+ }
+ get bigInt64Array() {
+ return this.typedArray("BigInt64Array");
+ }
+ get bigUint64Array() {
+ return this.typedArray("BigUint64Array");
+ }
+ tuple(validators) {
+ return new TupleValidator(validators);
+ }
+ set(validator) {
+ return new SetValidator(validator);
+ }
+ record(validator) {
+ return new RecordValidator(validator);
+ }
+ map(keyValidator, valueValidator) {
+ return new MapValidator(keyValidator, valueValidator);
+ }
+ lazy(validator) {
+ return new LazyValidator(validator);
+ }
+};
+__name(Shapes, "Shapes");
+
+// src/index.ts
+var s = new Shapes();
+
+exports.BaseError = BaseError;
+exports.CombinedError = CombinedError;
+exports.CombinedPropertyError = CombinedPropertyError;
+exports.ExpectedConstraintError = ExpectedConstraintError;
+exports.ExpectedValidationError = ExpectedValidationError;
+exports.MissingPropertyError = MissingPropertyError;
+exports.MultiplePossibilitiesConstraintError = MultiplePossibilitiesConstraintError;
+exports.Result = Result;
+exports.UnknownEnumValueError = UnknownEnumValueError;
+exports.UnknownPropertyError = UnknownPropertyError;
+exports.ValidationError = ValidationError;
+exports.customInspectSymbol = customInspectSymbol;
+exports.customInspectSymbolStackLess = customInspectSymbolStackLess;
+exports.getGlobalValidationEnabled = getGlobalValidationEnabled;
+exports.s = s;
+exports.setGlobalValidationEnabled = setGlobalValidationEnabled;
+//# sourceMappingURL=out.js.map
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/@sapphire/shapeshift/dist/index.js.map b/node_modules/@sapphire/shapeshift/dist/index.js.map
new file mode 100644
index 0000000..46db7f3
--- /dev/null
+++ b/node_modules/@sapphire/shapeshift/dist/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/lib/configs.ts","../src/lib/Result.ts","../src/validators/util/getValue.ts","../src/constraints/ObjectConstrains.ts","../src/lib/errors/ExpectedConstraintError.ts","../src/lib/errors/BaseError.ts","../src/lib/errors/BaseConstraintError.ts","../src/validators/BaseValidator.ts","../src/constraints/util/isUnique.ts","../src/constraints/util/operators.ts","../src/constraints/ArrayConstraints.ts","../src/lib/errors/CombinedPropertyError.ts","../src/lib/errors/ValidationError.ts","../src/validators/ArrayValidator.ts","../src/constraints/BigIntConstraints.ts","../src/validators/BigIntValidator.ts","../src/constraints/BooleanConstraints.ts","../src/validators/BooleanValidator.ts","../src/constraints/DateConstraints.ts","../src/validators/DateValidator.ts","../src/lib/errors/ExpectedValidationError.ts","../src/validators/InstanceValidator.ts","../src/validators/LiteralValidator.ts","../src/validators/NeverValidator.ts","../src/validators/NullishValidator.ts","../src/constraints/NumberConstraints.ts","../src/validators/NumberValidator.ts","../src/lib/errors/MissingPropertyError.ts","../src/lib/errors/UnknownPropertyError.ts","../src/validators/DefaultValidator.ts","../src/lib/errors/CombinedError.ts","../src/validators/UnionValidator.ts","../src/validators/ObjectValidator.ts","../src/validators/PassthroughValidator.ts","../src/validators/RecordValidator.ts","../src/validators/SetValidator.ts","../src/constraints/util/emailValidator.ts","../src/constraints/util/net.ts","../src/constraints/util/phoneValidator.ts","../src/lib/errors/MultiplePossibilitiesConstraintError.ts","../src/constraints/util/common/combinedResultFn.ts","../src/constraints/util/urlValidators.ts","../src/constraints/StringConstraints.ts","../src/validators/StringValidator.ts","../src/validators/TupleValidator.ts","../src/validators/MapValidator.ts","../src/validators/LazyValidator.ts","../src/lib/errors/UnknownEnumValueError.ts","../src/validators/NativeEnumValidator.ts","../src/constraints/TypedArrayLengthConstraints.ts","../src/constraints/util/common/vowels.ts","../src/constraints/util/typedArray.ts","../src/validators/TypedArrayValidator.ts","../src/lib/Shapes.ts","../src/index.ts"],"names":["uniqueArray","inspect","value","s"],"mappings":";;;;AAAA,IAAI,oBAAoB;AAMjB,SAAS,2BAA2B,SAAkB;AAC5D,sBAAoB;AACrB;AAFgB;AAOT,SAAS,6BAA6B;AAC5C,SAAO;AACR;AAFgB;;;ACbT,IAAM,SAAN,MAAyC;AAAA,EAKvC,YAAY,SAAkB,OAAW,OAAW;AAC3D,SAAK,UAAU;AACf,QAAI,SAAS;AACZ,WAAK,QAAQ;AAAA,IACd,OAAO;AACN,WAAK,QAAQ;AAAA,IACd;AAAA,EACD;AAAA,EAEO,OAA4C;AAClD,WAAO,KAAK;AAAA,EACb;AAAA,EAEO,QAA8C;AACpD,WAAO,CAAC,KAAK;AAAA,EACd;AAAA,EAEO,SAAY;AAClB,QAAI,KAAK,KAAK;AAAG,aAAO,KAAK;AAC7B,UAAM,KAAK;AAAA,EACZ;AAAA,EAEA,OAAc,GAA+B,OAAwB;AACpE,WAAO,IAAI,OAAa,MAAM,KAAK;AAAA,EACpC;AAAA,EAEA,OAAc,IAAgC,OAAwB;AACrE,WAAO,IAAI,OAAa,OAAO,QAAW,KAAK;AAAA,EAChD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AS;AAAA,EACnC;AACD;AA/Ia;;;ACzBN,IAAM,IAAI,IAAI,OAAO","sourcesContent":["let validationEnabled = true;\n\n/**\n * Sets whether validators should run on the input, or if the input should be passed through.\n * @param enabled Whether validation should be done on inputs\n */\nexport function setGlobalValidationEnabled(enabled: boolean) {\n\tvalidationEnabled = enabled;\n}\n\n/**\n * @returns Whether validation is enabled\n */\nexport function getGlobalValidationEnabled() {\n\treturn validationEnabled;\n}\n","export class Result<T, E extends Error = Error> {\n\tpublic readonly success: boolean;\n\tpublic readonly value?: T;\n\tpublic readonly error?: E;\n\n\tprivate constructor(success: boolean, value?: T, error?: E) {\n\t\tthis.success = success;\n\t\tif (success) {\n\t\t\tthis.value = value;\n\t\t} else {\n\t\t\tthis.error = error;\n\t\t}\n\t}\n\n\tpublic isOk(): this is { success: true; value: T } {\n\t\treturn this.success;\n\t}\n\n\tpublic isErr(): this is { success: false; error: E } {\n\t\treturn !this.success;\n\t}\n\n\tpublic unwrap(): T {\n\t\tif (this.isOk()) return this.value;\n\t\tthrow this.error as Error;\n\t}\n\n\tpublic static ok<T, E extends Error = Error>(value: T): Result<T, E> {\n\t\treturn new Result<T, E>(true, value);\n\t}\n\n\tpublic static err<T, E extends Error = Error>(error: E): Result<T, E> {\n\t\treturn new Result<T, E>(false, undefined, error);\n\t}\n}\n","// https://github.com/microsoft/TypeScript/issues/37663\ntype Fn = (...args: unknown[]) => unknown;\n\nexport function getValue<T, U = T extends Fn ? ReturnType<T> : T>(valueOrFn: T): U {\n\treturn typeof valueOrFn === 'function' ? valueOrFn() : valueOrFn;\n}\n","import get from 'lodash/get.js';\nimport { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { BaseValidator } from '../type-exports';\nimport type { IConstraint } from './type-exports';\n\nexport type ObjectConstraintName = `s.object(T.when)`;\n\nexport type WhenKey = PropertyKey | PropertyKey[];\n\nexport interface WhenOptions<T extends BaseValidator<any>, Key extends WhenKey> {\n\tis?: boolean | ((value: Key extends Array<any> ? any[] : any) => boolean);\n\tthen: (predicate: T) => T;\n\totherwise?: (predicate: T) => T;\n}\n\nexport function whenConstraint<T extends BaseValidator<any>, I, Key extends WhenKey>(\n\tkey: Key,\n\toptions: WhenOptions<T, Key>,\n\tvalidator: T\n): IConstraint<I> {\n\treturn {\n\t\trun(input: I, parent?: any) {\n\t\t\tif (!parent) {\n\t\t\t\treturn Result.err(new ExpectedConstraintError('s.object(T.when)', 'Validator has no parent', parent, 'Validator to have a parent'));\n\t\t\t}\n\n\t\t\tconst isKeyArray = Array.isArray(key);\n\n\t\t\tconst value = isKeyArray ? key.map((k) => get(parent, k)) : get(parent, key);\n\n\t\t\tconst predicate = resolveBooleanIs<T, Key>(options, value, isKeyArray) ? options.then : options.otherwise;\n\n\t\t\tif (predicate) {\n\t\t\t\treturn predicate(validator).run(input) as Result<I, ExpectedConstraintError<I>>;\n\t\t\t}\n\n\t\t\treturn Result.ok(input);\n\t\t}\n\t};\n}\n\nfunction resolveBooleanIs<T extends BaseValidator<any>, Key extends WhenKey>(options: WhenOptions<T, Key>, value: any, isKeyArray: boolean) {\n\tif (options.is === undefined) {\n\t\treturn isKeyArray ? !value.some((val: any) => !val) : Boolean(value);\n\t}\n\n\tif (typeof options.is === 'function') {\n\t\treturn options.is(value);\n\t}\n\n\treturn value === options.is;\n}\n","import { inspect, type InspectOptionsStylized } from 'util';\nimport { customInspectSymbolStackLess } from './BaseError';\nimport { BaseConstraintError, type ConstraintErrorNames } from './BaseConstraintError';\n\nexport class ExpectedConstraintError<T = unknown> extends BaseConstraintError<T> {\n\tpublic readonly expected: string;\n\n\tpublic constructor(constraint: ConstraintErrorNames, message: string, given: T, expected: string) {\n\t\tsuper(constraint, message, given);\n\t\tthis.expected = expected;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tconstraint: this.constraint,\n\t\t\tgiven: this.given,\n\t\t\texpected: this.expected\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst constraint = options.stylize(this.constraint, 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[ExpectedConstraintError: ${constraint}]`, 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1 };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\t\tconst given = inspect(this.given, newOptions).replace(/\\n/g, padding);\n\n\t\tconst header = `${options.stylize('ExpectedConstraintError', 'special')} > ${constraint}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst expectedBlock = `\\n ${options.stylize('Expected: ', 'string')}${options.stylize(this.expected, 'boolean')}`;\n\t\tconst givenBlock = `\\n ${options.stylize('Received:', 'regexp')}${padding}${given}`;\n\t\treturn `${header}\\n ${message}\\n${expectedBlock}\\n${givenBlock}`;\n\t}\n}\n","import type { InspectOptionsStylized } from 'util';\n\nexport const customInspectSymbol = Symbol.for('nodejs.util.inspect.custom');\nexport const customInspectSymbolStackLess = Symbol.for('nodejs.util.inspect.custom.stack-less');\n\nexport abstract class BaseError extends Error {\n\tprotected [customInspectSymbol](depth: number, options: InspectOptionsStylized) {\n\t\treturn `${this[customInspectSymbolStackLess](depth, options)}\\n${this.stack!.slice(this.stack!.indexOf('\\n'))}`;\n\t}\n\n\tprotected abstract [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string;\n}\n","import type {\n\tArrayConstraintName,\n\tBigIntConstraintName,\n\tBooleanConstraintName,\n\tDateConstraintName,\n\tNumberConstraintName,\n\tObjectConstraintName,\n\tStringConstraintName,\n\tTypedArrayConstraintName\n} from '../../constraints/type-exports';\nimport { BaseError } from './BaseError';\n\nexport type ConstraintErrorNames =\n\t| TypedArrayConstraintName\n\t| ArrayConstraintName\n\t| BigIntConstraintName\n\t| BooleanConstraintName\n\t| DateConstraintName\n\t| NumberConstraintName\n\t| ObjectConstraintName\n\t| StringConstraintName;\n\nexport abstract class BaseConstraintError<T = unknown> extends BaseError {\n\tpublic readonly constraint: ConstraintErrorNames;\n\tpublic readonly given: T;\n\n\tpublic constructor(constraint: ConstraintErrorNames, message: string, given: T) {\n\t\tsuper(message);\n\t\tthis.constraint = constraint;\n\t\tthis.given = given;\n\t}\n}\n","import { getGlobalValidationEnabled } from '../lib/configs';\nimport { Result } from '../lib/Result';\nimport { ArrayValidator, DefaultValidator, LiteralValidator, NullishValidator, SetValidator, UnionValidator } from './imports';\nimport { getValue } from './util/getValue';\nimport { whenConstraint, type WhenKey, type WhenOptions } from '../constraints/ObjectConstrains';\nimport type { CombinedError } from '../lib/errors/CombinedError';\nimport type { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport type { UnknownEnumValueError } from '../lib/errors/UnknownEnumValueError';\nimport type { ValidationError } from '../lib/errors/ValidationError';\nimport type { BaseConstraintError, InferResultType } from '../type-exports';\nimport type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\n\nexport abstract class BaseValidator<T> {\n\tpublic description?: string;\n\tprotected parent?: object;\n\tprotected constraints: readonly IConstraint<T>[] = [];\n\tprotected isValidationEnabled: boolean | (() => boolean) | null = null;\n\n\tpublic constructor(constraints: readonly IConstraint<T>[] = []) {\n\t\tthis.constraints = constraints;\n\t}\n\n\tpublic setParent(parent: object): this {\n\t\tthis.parent = parent;\n\t\treturn this;\n\t}\n\n\tpublic get optional(): UnionValidator<T | undefined> {\n\t\treturn new UnionValidator([new LiteralValidator(undefined), this.clone()]);\n\t}\n\n\tpublic get nullable(): UnionValidator<T | null> {\n\t\treturn new UnionValidator([new LiteralValidator(null), this.clone()]);\n\t}\n\n\tpublic get nullish(): UnionValidator<T | null | undefined> {\n\t\treturn new UnionValidator([new NullishValidator(), this.clone()]);\n\t}\n\n\tpublic get array(): ArrayValidator<T[]> {\n\t\treturn new ArrayValidator<T[]>(this.clone());\n\t}\n\n\tpublic get set(): SetValidator<T> {\n\t\treturn new SetValidator<T>(this.clone());\n\t}\n\n\tpublic or<O>(...predicates: readonly BaseValidator<O>[]): UnionValidator<T | O> {\n\t\treturn new UnionValidator<T | O>([this.clone(), ...predicates]);\n\t}\n\n\tpublic transform(cb: (value: T) => T): this;\n\tpublic transform<O>(cb: (value: T) => O): BaseValidator<O>;\n\tpublic transform<O>(cb: (value: T) => O): BaseValidator<O> {\n\t\treturn this.addConstraint({ run: (input) => Result.ok(cb(input) as unknown as T) }) as unknown as BaseValidator<O>;\n\t}\n\n\tpublic reshape(cb: (input: T) => Result<T>): this;\n\tpublic reshape<R extends Result<unknown>, O = InferResultType<R>>(cb: (input: T) => R): BaseValidator<O>;\n\tpublic reshape<R extends Result<unknown>, O = InferResultType<R>>(cb: (input: T) => R): BaseValidator<O> {\n\t\treturn this.addConstraint({ run: cb as unknown as (input: T) => Result<T, BaseConstraintError<T>> }) as unknown as BaseValidator<O>;\n\t}\n\n\tpublic default(value: Exclude<T, undefined> | (() => Exclude<T, undefined>)): DefaultValidator<Exclude<T, undefined>> {\n\t\treturn new DefaultValidator(this.clone() as unknown as BaseValidator<Exclude<T, undefined>>, value);\n\t}\n\n\tpublic when<Key extends WhenKey, This extends BaseValidator<any> = this>(key: Key, options: WhenOptions<This, Key>): this {\n\t\treturn this.addConstraint(whenConstraint<This, T, Key>(key, options, this as unknown as This));\n\t}\n\n\tpublic describe(description: string): this {\n\t\tconst clone = this.clone();\n\t\tclone.description = description;\n\t\treturn clone;\n\t}\n\n\tpublic run(value: unknown): Result<T, BaseError> {\n\t\tlet result = this.handle(value) as Result<T, BaseError>;\n\t\tif (result.isErr()) return result;\n\n\t\tfor (const constraint of this.constraints) {\n\t\t\tresult = constraint.run(result.value as T, this.parent);\n\t\t\tif (result.isErr()) break;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tpublic parse<R extends T = T>(value: unknown): R {\n\t\t// If validation is disabled (at the validator or global level), we only run the `handle` method, which will do some basic checks\n\t\t// (like that the input is a string for a string validator)\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn this.handle(value).unwrap() as R;\n\t\t}\n\n\t\treturn this.constraints.reduce((v, constraint) => constraint.run(v).unwrap(), this.handle(value).unwrap()) as R;\n\t}\n\n\tpublic is<R extends T = T>(value: unknown): value is R {\n\t\treturn this.run(value).isOk();\n\t}\n\n\t/**\n\t * Sets if the validator should also run constraints or just do basic checks.\n\t * @param isValidationEnabled Whether this validator should be enabled or disabled. You can pass boolean or a function returning boolean which will be called just before parsing.\n\t * Set to `null` to go off of the global configuration.\n\t */\n\tpublic setValidationEnabled(isValidationEnabled: boolean | (() => boolean) | null): this {\n\t\tconst clone = this.clone();\n\t\tclone.isValidationEnabled = isValidationEnabled;\n\t\treturn clone;\n\t}\n\n\tpublic getValidationEnabled() {\n\t\treturn getValue(this.isValidationEnabled);\n\t}\n\n\tprotected get shouldRunConstraints(): boolean {\n\t\treturn getValue(this.isValidationEnabled) ?? getGlobalValidationEnabled();\n\t}\n\n\tprotected clone(): this {\n\t\tconst clone: this = Reflect.construct(this.constructor, [this.constraints]);\n\t\tclone.isValidationEnabled = this.isValidationEnabled;\n\t\treturn clone;\n\t}\n\n\tprotected abstract handle(value: unknown): Result<T, ValidatorError>;\n\n\tprotected addConstraint(constraint: IConstraint<T>): this {\n\t\tconst clone = this.clone();\n\t\tclone.constraints = clone.constraints.concat(constraint);\n\t\treturn clone;\n\t}\n}\n\nexport type ValidatorError = ValidationError | CombinedError | CombinedPropertyError | UnknownEnumValueError;\n","import fastDeepEqual from 'fast-deep-equal/es6/index.js';\nimport uniqWith from 'lodash/uniqWith.js';\n\nexport function isUnique(input: unknown[]) {\n\tif (input.length < 2) return true;\n\tconst uniqueArray = uniqWith(input, fastDeepEqual);\n\treturn uniqueArray.length === input.length;\n}\n","export function lessThan(a: number, b: number): boolean;\nexport function lessThan(a: bigint, b: bigint): boolean;\nexport function lessThan(a: number | bigint, b: number | bigint): boolean {\n\treturn a < b;\n}\n\nexport function lessThanOrEqual(a: number, b: number): boolean;\nexport function lessThanOrEqual(a: bigint, b: bigint): boolean;\nexport function lessThanOrEqual(a: number | bigint, b: number | bigint): boolean {\n\treturn a <= b;\n}\n\nexport function greaterThan(a: number, b: number): boolean;\nexport function greaterThan(a: bigint, b: bigint): boolean;\nexport function greaterThan(a: number | bigint, b: number | bigint): boolean {\n\treturn a > b;\n}\n\nexport function greaterThanOrEqual(a: number, b: number): boolean;\nexport function greaterThanOrEqual(a: bigint, b: bigint): boolean;\nexport function greaterThanOrEqual(a: number | bigint, b: number | bigint): boolean {\n\treturn a >= b;\n}\n\nexport function equal(a: number, b: number): boolean;\nexport function equal(a: bigint, b: bigint): boolean;\nexport function equal(a: number | bigint, b: number | bigint): boolean {\n\treturn a === b;\n}\n\nexport function notEqual(a: number, b: number): boolean;\nexport function notEqual(a: bigint, b: bigint): boolean;\nexport function notEqual(a: number | bigint, b: number | bigint): boolean {\n\treturn a !== b;\n}\n\nexport interface Comparator {\n\t(a: number, b: number): boolean;\n\t(a: bigint, b: bigint): boolean;\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { isUnique } from './util/isUnique';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\n\nexport type ArrayConstraintName = `s.array(T).${\n\t| 'unique'\n\t| `length${\n\t\t\t| 'LessThan'\n\t\t\t| 'LessThanOrEqual'\n\t\t\t| 'GreaterThan'\n\t\t\t| 'GreaterThanOrEqual'\n\t\t\t| 'Equal'\n\t\t\t| 'NotEqual'\n\t\t\t| 'Range'\n\t\t\t| 'RangeInclusive'\n\t\t\t| 'RangeExclusive'}`}`;\n\nfunction arrayLengthComparator<T>(comparator: Comparator, name: ArrayConstraintName, expected: string, length: number): IConstraint<T[]> {\n\treturn {\n\t\trun(input: T[]) {\n\t\t\treturn comparator(input.length, length) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function arrayLengthLessThan<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length < ${value}`;\n\treturn arrayLengthComparator(lessThan, 's.array(T).lengthLessThan', expected, value);\n}\n\nexport function arrayLengthLessThanOrEqual<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length <= ${value}`;\n\treturn arrayLengthComparator(lessThanOrEqual, 's.array(T).lengthLessThanOrEqual', expected, value);\n}\n\nexport function arrayLengthGreaterThan<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length > ${value}`;\n\treturn arrayLengthComparator(greaterThan, 's.array(T).lengthGreaterThan', expected, value);\n}\n\nexport function arrayLengthGreaterThanOrEqual<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length >= ${value}`;\n\treturn arrayLengthComparator(greaterThanOrEqual, 's.array(T).lengthGreaterThanOrEqual', expected, value);\n}\n\nexport function arrayLengthEqual<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length === ${value}`;\n\treturn arrayLengthComparator(equal, 's.array(T).lengthEqual', expected, value);\n}\n\nexport function arrayLengthNotEqual<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length !== ${value}`;\n\treturn arrayLengthComparator(notEqual, 's.array(T).lengthNotEqual', expected, value);\n}\n\nexport function arrayLengthRange<T>(start: number, endBefore: number): IConstraint<T[]> {\n\tconst expected = `expected.length >= ${start} && expected.length < ${endBefore}`;\n\treturn {\n\t\trun(input: T[]) {\n\t\t\treturn input.length >= start && input.length < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.array(T).lengthRange', 'Invalid Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function arrayLengthRangeInclusive<T>(start: number, end: number): IConstraint<T[]> {\n\tconst expected = `expected.length >= ${start} && expected.length <= ${end}`;\n\treturn {\n\t\trun(input: T[]) {\n\t\t\treturn input.length >= start && input.length <= end //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.array(T).lengthRangeInclusive', 'Invalid Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function arrayLengthRangeExclusive<T>(startAfter: number, endBefore: number): IConstraint<T[]> {\n\tconst expected = `expected.length > ${startAfter} && expected.length < ${endBefore}`;\n\treturn {\n\t\trun(input: T[]) {\n\t\t\treturn input.length > startAfter && input.length < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.array(T).lengthRangeExclusive', 'Invalid Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport const uniqueArray: IConstraint<unknown[]> = {\n\trun(input: unknown[]) {\n\t\treturn isUnique(input) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(new ExpectedConstraintError('s.array(T).unique', 'Array values are not unique', input, 'Expected all values to be unique'));\n\t}\n};\n","import type { InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class CombinedPropertyError extends BaseError {\n\tpublic readonly errors: [PropertyKey, BaseError][];\n\n\tpublic constructor(errors: [PropertyKey, BaseError][]) {\n\t\tsuper('Received one or more errors');\n\n\t\tthis.errors = errors;\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize('[CombinedPropertyError]', 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1, compact: true };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\n\t\tconst header = `${options.stylize('CombinedPropertyError', 'special')} (${options.stylize(this.errors.length.toString(), 'number')})`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst errors = this.errors\n\t\t\t.map(([key, error]) => {\n\t\t\t\tconst property = CombinedPropertyError.formatProperty(key, options);\n\t\t\t\tconst body = error[customInspectSymbolStackLess](depth - 1, newOptions).replace(/\\n/g, padding);\n\n\t\t\t\treturn ` input${property}${padding}${body}`;\n\t\t\t})\n\t\t\t.join('\\n\\n');\n\t\treturn `${header}\\n ${message}\\n\\n${errors}`;\n\t}\n\n\tprivate static formatProperty(key: PropertyKey, options: InspectOptionsStylized): string {\n\t\tif (typeof key === 'string') return options.stylize(`.${key}`, 'symbol');\n\t\tif (typeof key === 'number') return `[${options.stylize(key.toString(), 'number')}]`;\n\t\treturn `[${options.stylize('Symbol', 'symbol')}(${key.description})]`;\n\t}\n}\n","import { inspect, type InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class ValidationError extends BaseError {\n\tpublic readonly validator: string;\n\tpublic readonly given: unknown;\n\n\tpublic constructor(validator: string, message: string, given: unknown) {\n\t\tsuper(message);\n\n\t\tthis.validator = validator;\n\t\tthis.given = given;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tvalidator: this.validator,\n\t\t\tgiven: this.given\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst validator = options.stylize(this.validator, 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[ValidationError: ${validator}]`, 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1, compact: true };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\t\tconst given = inspect(this.given, newOptions).replace(/\\n/g, padding);\n\n\t\tconst header = `${options.stylize('ValidationError', 'special')} > ${validator}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst givenBlock = `\\n ${options.stylize('Received:', 'regexp')}${padding}${given}`;\n\t\treturn `${header}\\n ${message}\\n${givenBlock}`;\n\t}\n}\n","import {\n\tarrayLengthEqual,\n\tarrayLengthGreaterThan,\n\tarrayLengthGreaterThanOrEqual,\n\tarrayLengthLessThan,\n\tarrayLengthLessThanOrEqual,\n\tarrayLengthNotEqual,\n\tarrayLengthRange,\n\tarrayLengthRangeExclusive,\n\tarrayLengthRangeInclusive,\n\tuniqueArray\n} from '../constraints/ArrayConstraints';\nimport type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport type { ExpandSmallerTuples, Tuple, UnshiftTuple } from '../lib/util-types';\nimport { BaseValidator } from './imports';\n\nexport class ArrayValidator<T extends unknown[], I = T[number]> extends BaseValidator<T> {\n\tprivate readonly validator: BaseValidator<I>;\n\n\tpublic constructor(validator: BaseValidator<I>, constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validator = validator;\n\t}\n\n\tpublic lengthLessThan<N extends number>(length: N): ArrayValidator<ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, N>]>>> {\n\t\treturn this.addConstraint(arrayLengthLessThan(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthLessThanOrEqual<N extends number>(length: N): ArrayValidator<ExpandSmallerTuples<[...Tuple<I, N>]>> {\n\t\treturn this.addConstraint(arrayLengthLessThanOrEqual(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthGreaterThan<N extends number>(length: N): ArrayValidator<[...Tuple<I, N>, I, ...T]> {\n\t\treturn this.addConstraint(arrayLengthGreaterThan(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthGreaterThanOrEqual<N extends number>(length: N): ArrayValidator<[...Tuple<I, N>, ...T]> {\n\t\treturn this.addConstraint(arrayLengthGreaterThanOrEqual(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthEqual<N extends number>(length: N): ArrayValidator<[...Tuple<I, N>]> {\n\t\treturn this.addConstraint(arrayLengthEqual(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthNotEqual(length: number): ArrayValidator<[...T]> {\n\t\treturn this.addConstraint(arrayLengthNotEqual(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthRange<S extends number, E extends number>(\n\t\tstart: S,\n\t\tendBefore: E\n\t): ArrayValidator<Exclude<ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, E>]>>, ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, S>]>>>> {\n\t\treturn this.addConstraint(arrayLengthRange(start, endBefore) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthRangeInclusive<S extends number, E extends number>(\n\t\tstartAt: S,\n\t\tendAt: E\n\t): ArrayValidator<Exclude<ExpandSmallerTuples<[...Tuple<I, E>]>, ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, S>]>>>> {\n\t\treturn this.addConstraint(arrayLengthRangeInclusive(startAt, endAt) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthRangeExclusive<S extends number, E extends number>(\n\t\tstartAfter: S,\n\t\tendBefore: E\n\t): ArrayValidator<Exclude<ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, E>]>>, ExpandSmallerTuples<[...Tuple<T, S>]>>> {\n\t\treturn this.addConstraint(arrayLengthRangeExclusive(startAfter, endBefore) as IConstraint<T>) as any;\n\t}\n\n\tpublic get unique(): this {\n\t\treturn this.addConstraint(uniqueArray as IConstraint<T>);\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validator, this.constraints]);\n\t}\n\n\tprotected handle(values: unknown): Result<T, ValidationError | CombinedPropertyError> {\n\t\tif (!Array.isArray(values)) {\n\t\t\treturn Result.err(new ValidationError('s.array(T)', 'Expected an array', values));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(values as T);\n\t\t}\n\n\t\tconst errors: [number, BaseError][] = [];\n\t\tconst transformed: T = [] as unknown as T;\n\n\t\tfor (let i = 0; i < values.length; i++) {\n\t\t\tconst result = this.validator.run(values[i]);\n\t\t\tif (result.isOk()) transformed.push(result.value);\n\t\t\telse errors.push([i, result.error!]);\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(transformed)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\n\nexport type BigIntConstraintName = `s.bigint.${\n\t| 'lessThan'\n\t| 'lessThanOrEqual'\n\t| 'greaterThan'\n\t| 'greaterThanOrEqual'\n\t| 'equal'\n\t| 'notEqual'\n\t| 'divisibleBy'}`;\n\nfunction bigintComparator(comparator: Comparator, name: BigIntConstraintName, expected: string, number: bigint): IConstraint<bigint> {\n\treturn {\n\t\trun(input: bigint) {\n\t\t\treturn comparator(input, number) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid bigint value', input, expected));\n\t\t}\n\t};\n}\n\nexport function bigintLessThan(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected < ${value}n`;\n\treturn bigintComparator(lessThan, 's.bigint.lessThan', expected, value);\n}\n\nexport function bigintLessThanOrEqual(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected <= ${value}n`;\n\treturn bigintComparator(lessThanOrEqual, 's.bigint.lessThanOrEqual', expected, value);\n}\n\nexport function bigintGreaterThan(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected > ${value}n`;\n\treturn bigintComparator(greaterThan, 's.bigint.greaterThan', expected, value);\n}\n\nexport function bigintGreaterThanOrEqual(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected >= ${value}n`;\n\treturn bigintComparator(greaterThanOrEqual, 's.bigint.greaterThanOrEqual', expected, value);\n}\n\nexport function bigintEqual(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected === ${value}n`;\n\treturn bigintComparator(equal, 's.bigint.equal', expected, value);\n}\n\nexport function bigintNotEqual(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected !== ${value}n`;\n\treturn bigintComparator(notEqual, 's.bigint.notEqual', expected, value);\n}\n\nexport function bigintDivisibleBy(divider: bigint): IConstraint<bigint> {\n\tconst expected = `expected % ${divider}n === 0n`;\n\treturn {\n\t\trun(input: bigint) {\n\t\t\treturn input % divider === 0n //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.bigint.divisibleBy', 'BigInt is not divisible', input, expected));\n\t\t}\n\t};\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport {\n\tbigintDivisibleBy,\n\tbigintEqual,\n\tbigintGreaterThan,\n\tbigintGreaterThanOrEqual,\n\tbigintLessThan,\n\tbigintLessThanOrEqual,\n\tbigintNotEqual\n} from '../constraints/BigIntConstraints';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class BigIntValidator<T extends bigint> extends BaseValidator<T> {\n\tpublic lessThan(number: bigint): this {\n\t\treturn this.addConstraint(bigintLessThan(number) as IConstraint<T>);\n\t}\n\n\tpublic lessThanOrEqual(number: bigint): this {\n\t\treturn this.addConstraint(bigintLessThanOrEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic greaterThan(number: bigint): this {\n\t\treturn this.addConstraint(bigintGreaterThan(number) as IConstraint<T>);\n\t}\n\n\tpublic greaterThanOrEqual(number: bigint): this {\n\t\treturn this.addConstraint(bigintGreaterThanOrEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic equal<N extends bigint>(number: N): BigIntValidator<N> {\n\t\treturn this.addConstraint(bigintEqual(number) as IConstraint<T>) as unknown as BigIntValidator<N>;\n\t}\n\n\tpublic notEqual(number: bigint): this {\n\t\treturn this.addConstraint(bigintNotEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic get positive(): this {\n\t\treturn this.greaterThanOrEqual(0n);\n\t}\n\n\tpublic get negative(): this {\n\t\treturn this.lessThan(0n);\n\t}\n\n\tpublic divisibleBy(number: bigint): this {\n\t\treturn this.addConstraint(bigintDivisibleBy(number) as IConstraint<T>);\n\t}\n\n\tpublic get abs(): this {\n\t\treturn this.transform((value) => (value < 0 ? -value : value) as T);\n\t}\n\n\tpublic intN(bits: number): this {\n\t\treturn this.transform((value) => BigInt.asIntN(bits, value) as T);\n\t}\n\n\tpublic uintN(bits: number): this {\n\t\treturn this.transform((value) => BigInt.asUintN(bits, value) as T);\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn typeof value === 'bigint' //\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ValidationError('s.bigint', 'Expected a bigint primitive', value));\n\t}\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\n\nexport type BooleanConstraintName = `s.boolean.${boolean}`;\n\nexport const booleanTrue: IConstraint<boolean, true> = {\n\trun(input: boolean) {\n\t\treturn input //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(new ExpectedConstraintError('s.boolean.true', 'Invalid boolean value', input, 'true'));\n\t}\n};\n\nexport const booleanFalse: IConstraint<boolean, false> = {\n\trun(input: boolean) {\n\t\treturn input //\n\t\t\t? Result.err(new ExpectedConstraintError('s.boolean.false', 'Invalid boolean value', input, 'false'))\n\t\t\t: Result.ok(input);\n\t}\n};\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport { booleanFalse, booleanTrue } from '../constraints/BooleanConstraints';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class BooleanValidator<T extends boolean = boolean> extends BaseValidator<T> {\n\tpublic get true(): BooleanValidator<true> {\n\t\treturn this.addConstraint(booleanTrue as IConstraint<T>) as BooleanValidator<true>;\n\t}\n\n\tpublic get false(): BooleanValidator<false> {\n\t\treturn this.addConstraint(booleanFalse as IConstraint<T>) as BooleanValidator<false>;\n\t}\n\n\tpublic equal<R extends true | false>(value: R): BooleanValidator<R> {\n\t\treturn (value ? this.true : this.false) as BooleanValidator<R>;\n\t}\n\n\tpublic notEqual<R extends true | false>(value: R): BooleanValidator<R> {\n\t\treturn (value ? this.false : this.true) as BooleanValidator<R>;\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn typeof value === 'boolean' //\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ValidationError('s.boolean', 'Expected a boolean primitive', value));\n\t}\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\n\nexport type DateConstraintName = `s.date.${\n\t| 'lessThan'\n\t| 'lessThanOrEqual'\n\t| 'greaterThan'\n\t| 'greaterThanOrEqual'\n\t| 'equal'\n\t| 'notEqual'\n\t| 'valid'\n\t| 'invalid'}`;\n\nfunction dateComparator(comparator: Comparator, name: DateConstraintName, expected: string, number: number): IConstraint<Date> {\n\treturn {\n\t\trun(input: Date) {\n\t\t\treturn comparator(input.getTime(), number) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid Date value', input, expected));\n\t\t}\n\t};\n}\n\nexport function dateLessThan(value: Date): IConstraint<Date> {\n\tconst expected = `expected < ${value.toISOString()}`;\n\treturn dateComparator(lessThan, 's.date.lessThan', expected, value.getTime());\n}\n\nexport function dateLessThanOrEqual(value: Date): IConstraint<Date> {\n\tconst expected = `expected <= ${value.toISOString()}`;\n\treturn dateComparator(lessThanOrEqual, 's.date.lessThanOrEqual', expected, value.getTime());\n}\n\nexport function dateGreaterThan(value: Date): IConstraint<Date> {\n\tconst expected = `expected > ${value.toISOString()}`;\n\treturn dateComparator(greaterThan, 's.date.greaterThan', expected, value.getTime());\n}\n\nexport function dateGreaterThanOrEqual(value: Date): IConstraint<Date> {\n\tconst expected = `expected >= ${value.toISOString()}`;\n\treturn dateComparator(greaterThanOrEqual, 's.date.greaterThanOrEqual', expected, value.getTime());\n}\n\nexport function dateEqual(value: Date): IConstraint<Date> {\n\tconst expected = `expected === ${value.toISOString()}`;\n\treturn dateComparator(equal, 's.date.equal', expected, value.getTime());\n}\n\nexport function dateNotEqual(value: Date): IConstraint<Date> {\n\tconst expected = `expected !== ${value.toISOString()}`;\n\treturn dateComparator(notEqual, 's.date.notEqual', expected, value.getTime());\n}\n\nexport const dateInvalid: IConstraint<Date> = {\n\trun(input: Date) {\n\t\treturn Number.isNaN(input.getTime()) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(new ExpectedConstraintError('s.date.invalid', 'Invalid Date value', input, 'expected === NaN'));\n\t}\n};\n\nexport const dateValid: IConstraint<Date> = {\n\trun(input: Date) {\n\t\treturn Number.isNaN(input.getTime()) //\n\t\t\t? Result.err(new ExpectedConstraintError('s.date.valid', 'Invalid Date value', input, 'expected !== NaN'))\n\t\t\t: Result.ok(input);\n\t}\n};\n","import {\n\tdateEqual,\n\tdateGreaterThan,\n\tdateGreaterThanOrEqual,\n\tdateInvalid,\n\tdateLessThan,\n\tdateLessThanOrEqual,\n\tdateNotEqual,\n\tdateValid\n} from '../constraints/DateConstraints';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class DateValidator extends BaseValidator<Date> {\n\tpublic lessThan(date: Date | number | string): this {\n\t\treturn this.addConstraint(dateLessThan(new Date(date)));\n\t}\n\n\tpublic lessThanOrEqual(date: Date | number | string): this {\n\t\treturn this.addConstraint(dateLessThanOrEqual(new Date(date)));\n\t}\n\n\tpublic greaterThan(date: Date | number | string): this {\n\t\treturn this.addConstraint(dateGreaterThan(new Date(date)));\n\t}\n\n\tpublic greaterThanOrEqual(date: Date | number | string): this {\n\t\treturn this.addConstraint(dateGreaterThanOrEqual(new Date(date)));\n\t}\n\n\tpublic equal(date: Date | number | string): this {\n\t\tconst resolved = new Date(date);\n\t\treturn Number.isNaN(resolved.getTime()) //\n\t\t\t? this.invalid\n\t\t\t: this.addConstraint(dateEqual(resolved));\n\t}\n\n\tpublic notEqual(date: Date | number | string): this {\n\t\tconst resolved = new Date(date);\n\t\treturn Number.isNaN(resolved.getTime()) //\n\t\t\t? this.valid\n\t\t\t: this.addConstraint(dateNotEqual(resolved));\n\t}\n\n\tpublic get valid(): this {\n\t\treturn this.addConstraint(dateValid);\n\t}\n\n\tpublic get invalid(): this {\n\t\treturn this.addConstraint(dateInvalid);\n\t}\n\n\tprotected handle(value: unknown): Result<Date, ValidationError> {\n\t\treturn value instanceof Date //\n\t\t\t? Result.ok(value)\n\t\t\t: Result.err(new ValidationError('s.date', 'Expected a Date', value));\n\t}\n}\n","import { inspect, type InspectOptionsStylized } from 'util';\nimport { customInspectSymbolStackLess } from './BaseError';\nimport { ValidationError } from './ValidationError';\n\nexport class ExpectedValidationError<T> extends ValidationError {\n\tpublic readonly expected: T;\n\n\tpublic constructor(validator: string, message: string, given: unknown, expected: T) {\n\t\tsuper(validator, message, given);\n\t\tthis.expected = expected;\n\t}\n\n\tpublic override toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tvalidator: this.validator,\n\t\t\tgiven: this.given,\n\t\t\texpected: this.expected\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst validator = options.stylize(this.validator, 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[ExpectedValidationError: ${validator}]`, 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1 };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\t\tconst expected = inspect(this.expected, newOptions).replace(/\\n/g, padding);\n\t\tconst given = inspect(this.given, newOptions).replace(/\\n/g, padding);\n\n\t\tconst header = `${options.stylize('ExpectedValidationError', 'special')} > ${validator}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst expectedBlock = `\\n ${options.stylize('Expected:', 'string')}${padding}${expected}`;\n\t\tconst givenBlock = `\\n ${options.stylize('Received:', 'regexp')}${padding}${given}`;\n\t\treturn `${header}\\n ${message}\\n${expectedBlock}\\n${givenBlock}`;\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport { ExpectedValidationError } from '../lib/errors/ExpectedValidationError';\nimport { Result } from '../lib/Result';\nimport type { Constructor } from '../lib/util-types';\nimport { BaseValidator } from './imports';\n\nexport class InstanceValidator<T> extends BaseValidator<T> {\n\tpublic readonly expected: Constructor<T>;\n\n\tpublic constructor(expected: Constructor<T>, constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.expected = expected;\n\t}\n\n\tprotected handle(value: unknown): Result<T, ExpectedValidationError<Constructor<T>>> {\n\t\treturn value instanceof this.expected //\n\t\t\t? Result.ok(value)\n\t\t\t: Result.err(new ExpectedValidationError('s.instance(V)', 'Expected', value, this.expected));\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.expected, this.constraints]);\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport { ExpectedValidationError } from '../lib/errors/ExpectedValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class LiteralValidator<T> extends BaseValidator<T> {\n\tpublic readonly expected: T;\n\n\tpublic constructor(literal: T, constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.expected = literal;\n\t}\n\n\tprotected handle(value: unknown): Result<T, ExpectedValidationError<T>> {\n\t\treturn Object.is(value, this.expected) //\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ExpectedValidationError('s.literal(V)', 'Expected values to be equals', value, this.expected));\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.expected, this.constraints]);\n\t}\n}\n","import { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class NeverValidator extends BaseValidator<never> {\n\tprotected handle(value: unknown): Result<never, ValidationError> {\n\t\treturn Result.err(new ValidationError('s.never', 'Expected a value to not be passed', value));\n\t}\n}\n","import { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class NullishValidator extends BaseValidator<undefined | null> {\n\tprotected handle(value: unknown): Result<undefined | null, ValidationError> {\n\t\treturn value === undefined || value === null //\n\t\t\t? Result.ok(value)\n\t\t\t: Result.err(new ValidationError('s.nullish', 'Expected undefined or null', value));\n\t}\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\n\nexport type NumberConstraintName = `s.number.${\n\t| 'lessThan'\n\t| 'lessThanOrEqual'\n\t| 'greaterThan'\n\t| 'greaterThanOrEqual'\n\t| 'equal'\n\t| 'equal(NaN)'\n\t| 'notEqual'\n\t| 'notEqual(NaN)'\n\t| 'int'\n\t| 'safeInt'\n\t| 'finite'\n\t| 'divisibleBy'}`;\n\nfunction numberComparator(comparator: Comparator, name: NumberConstraintName, expected: string, number: number): IConstraint<number> {\n\treturn {\n\t\trun(input: number) {\n\t\t\treturn comparator(input, number) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid number value', input, expected));\n\t\t}\n\t};\n}\n\nexport function numberLessThan(value: number): IConstraint<number> {\n\tconst expected = `expected < ${value}`;\n\treturn numberComparator(lessThan, 's.number.lessThan', expected, value);\n}\n\nexport function numberLessThanOrEqual(value: number): IConstraint<number> {\n\tconst expected = `expected <= ${value}`;\n\treturn numberComparator(lessThanOrEqual, 's.number.lessThanOrEqual', expected, value);\n}\n\nexport function numberGreaterThan(value: number): IConstraint<number> {\n\tconst expected = `expected > ${value}`;\n\treturn numberComparator(greaterThan, 's.number.greaterThan', expected, value);\n}\n\nexport function numberGreaterThanOrEqual(value: number): IConstraint<number> {\n\tconst expected = `expected >= ${value}`;\n\treturn numberComparator(greaterThanOrEqual, 's.number.greaterThanOrEqual', expected, value);\n}\n\nexport function numberEqual(value: number): IConstraint<number> {\n\tconst expected = `expected === ${value}`;\n\treturn numberComparator(equal, 's.number.equal', expected, value);\n}\n\nexport function numberNotEqual(value: number): IConstraint<number> {\n\tconst expected = `expected !== ${value}`;\n\treturn numberComparator(notEqual, 's.number.notEqual', expected, value);\n}\n\nexport const numberInt: IConstraint<number> = {\n\trun(input: number) {\n\t\treturn Number.isInteger(input) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(\n\t\t\t\t\tnew ExpectedConstraintError('s.number.int', 'Given value is not an integer', input, 'Number.isInteger(expected) to be true')\n\t\t\t );\n\t}\n};\n\nexport const numberSafeInt: IConstraint<number> = {\n\trun(input: number) {\n\t\treturn Number.isSafeInteger(input) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(\n\t\t\t\t\tnew ExpectedConstraintError(\n\t\t\t\t\t\t's.number.safeInt',\n\t\t\t\t\t\t'Given value is not a safe integer',\n\t\t\t\t\t\tinput,\n\t\t\t\t\t\t'Number.isSafeInteger(expected) to be true'\n\t\t\t\t\t)\n\t\t\t );\n\t}\n};\n\nexport const numberFinite: IConstraint<number> = {\n\trun(input: number) {\n\t\treturn Number.isFinite(input) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(new ExpectedConstraintError('s.number.finite', 'Given value is not finite', input, 'Number.isFinite(expected) to be true'));\n\t}\n};\n\nexport const numberNaN: IConstraint<number> = {\n\trun(input: number) {\n\t\treturn Number.isNaN(input) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(new ExpectedConstraintError('s.number.equal(NaN)', 'Invalid number value', input, 'expected === NaN'));\n\t}\n};\n\nexport const numberNotNaN: IConstraint<number> = {\n\trun(input: number) {\n\t\treturn Number.isNaN(input) //\n\t\t\t? Result.err(new ExpectedConstraintError('s.number.notEqual(NaN)', 'Invalid number value', input, 'expected !== NaN'))\n\t\t\t: Result.ok(input);\n\t}\n};\n\nexport function numberDivisibleBy(divider: number): IConstraint<number> {\n\tconst expected = `expected % ${divider} === 0`;\n\treturn {\n\t\trun(input: number) {\n\t\t\treturn input % divider === 0 //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.number.divisibleBy', 'Number is not divisible', input, expected));\n\t\t}\n\t};\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport {\n\tnumberDivisibleBy,\n\tnumberEqual,\n\tnumberFinite,\n\tnumberGreaterThan,\n\tnumberGreaterThanOrEqual,\n\tnumberInt,\n\tnumberLessThan,\n\tnumberLessThanOrEqual,\n\tnumberNaN,\n\tnumberNotEqual,\n\tnumberNotNaN,\n\tnumberSafeInt\n} from '../constraints/NumberConstraints';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class NumberValidator<T extends number> extends BaseValidator<T> {\n\tpublic lessThan(number: number): this {\n\t\treturn this.addConstraint(numberLessThan(number) as IConstraint<T>);\n\t}\n\n\tpublic lessThanOrEqual(number: number): this {\n\t\treturn this.addConstraint(numberLessThanOrEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic greaterThan(number: number): this {\n\t\treturn this.addConstraint(numberGreaterThan(number) as IConstraint<T>);\n\t}\n\n\tpublic greaterThanOrEqual(number: number): this {\n\t\treturn this.addConstraint(numberGreaterThanOrEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic equal<N extends number>(number: N): NumberValidator<N> {\n\t\treturn Number.isNaN(number) //\n\t\t\t? (this.addConstraint(numberNaN as IConstraint<T>) as unknown as NumberValidator<N>)\n\t\t\t: (this.addConstraint(numberEqual(number) as IConstraint<T>) as unknown as NumberValidator<N>);\n\t}\n\n\tpublic notEqual(number: number): this {\n\t\treturn Number.isNaN(number) //\n\t\t\t? this.addConstraint(numberNotNaN as IConstraint<T>)\n\t\t\t: this.addConstraint(numberNotEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic get int(): this {\n\t\treturn this.addConstraint(numberInt as IConstraint<T>);\n\t}\n\n\tpublic get safeInt(): this {\n\t\treturn this.addConstraint(numberSafeInt as IConstraint<T>);\n\t}\n\n\tpublic get finite(): this {\n\t\treturn this.addConstraint(numberFinite as IConstraint<T>);\n\t}\n\n\tpublic get positive(): this {\n\t\treturn this.greaterThanOrEqual(0);\n\t}\n\n\tpublic get negative(): this {\n\t\treturn this.lessThan(0);\n\t}\n\n\tpublic divisibleBy(divider: number): this {\n\t\treturn this.addConstraint(numberDivisibleBy(divider) as IConstraint<T>);\n\t}\n\n\tpublic get abs(): this {\n\t\treturn this.transform(Math.abs as (value: number) => T);\n\t}\n\n\tpublic get sign(): this {\n\t\treturn this.transform(Math.sign as (value: number) => T);\n\t}\n\n\tpublic get trunc(): this {\n\t\treturn this.transform(Math.trunc as (value: number) => T);\n\t}\n\n\tpublic get floor(): this {\n\t\treturn this.transform(Math.floor as (value: number) => T);\n\t}\n\n\tpublic get fround(): this {\n\t\treturn this.transform(Math.fround as (value: number) => T);\n\t}\n\n\tpublic get round(): this {\n\t\treturn this.transform(Math.round as (value: number) => T);\n\t}\n\n\tpublic get ceil(): this {\n\t\treturn this.transform(Math.ceil as (value: number) => T);\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn typeof value === 'number' //\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ValidationError('s.number', 'Expected a number primitive', value));\n\t}\n}\n","import type { InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class MissingPropertyError extends BaseError {\n\tpublic readonly property: PropertyKey;\n\n\tpublic constructor(property: PropertyKey) {\n\t\tsuper('A required property is missing');\n\t\tthis.property = property;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tproperty: this.property\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst property = options.stylize(this.property.toString(), 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[MissingPropertyError: ${property}]`, 'special');\n\t\t}\n\n\t\tconst header = `${options.stylize('MissingPropertyError', 'special')} > ${property}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\treturn `${header}\\n ${message}`;\n\t}\n}\n","import { inspect, type InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class UnknownPropertyError extends BaseError {\n\tpublic readonly property: PropertyKey;\n\tpublic readonly value: unknown;\n\n\tpublic constructor(property: PropertyKey, value: unknown) {\n\t\tsuper('Received unexpected property');\n\n\t\tthis.property = property;\n\t\tthis.value = value;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tproperty: this.property,\n\t\t\tvalue: this.value\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst property = options.stylize(this.property.toString(), 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[UnknownPropertyError: ${property}]`, 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1, compact: true };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\t\tconst given = inspect(this.value, newOptions).replace(/\\n/g, padding);\n\n\t\tconst header = `${options.stylize('UnknownPropertyError', 'special')} > ${property}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst givenBlock = `\\n ${options.stylize('Received:', 'regexp')}${padding}${given}`;\n\t\treturn `${header}\\n ${message}\\n${givenBlock}`;\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport { Result } from '../lib/Result';\nimport type { ValidatorError } from './BaseValidator';\nimport { BaseValidator } from './imports';\nimport { getValue } from './util/getValue';\n\nexport class DefaultValidator<T> extends BaseValidator<T> {\n\tprivate readonly validator: BaseValidator<T>;\n\tprivate defaultValue: T | (() => T);\n\n\tpublic constructor(validator: BaseValidator<T>, value: T | (() => T), constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validator = validator;\n\t\tthis.defaultValue = value;\n\t}\n\n\tpublic override default(value: Exclude<T, undefined> | (() => Exclude<T, undefined>)): DefaultValidator<Exclude<T, undefined>> {\n\t\tconst clone = this.clone() as unknown as DefaultValidator<Exclude<T, undefined>>;\n\t\tclone.defaultValue = value;\n\t\treturn clone;\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidatorError> {\n\t\treturn typeof value === 'undefined' //\n\t\t\t? Result.ok(getValue(this.defaultValue))\n\t\t\t: this.validator['handle'](value); // eslint-disable-line @typescript-eslint/dot-notation\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validator, this.defaultValue, this.constraints]);\n\t}\n}\n","import type { InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class CombinedError extends BaseError {\n\tpublic readonly errors: readonly BaseError[];\n\n\tpublic constructor(errors: readonly BaseError[]) {\n\t\tsuper('Received one or more errors');\n\n\t\tthis.errors = errors;\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize('[CombinedError]', 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1, compact: true };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\n\t\tconst header = `${options.stylize('CombinedError', 'special')} (${options.stylize(this.errors.length.toString(), 'number')})`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst errors = this.errors\n\t\t\t.map((error, i) => {\n\t\t\t\tconst index = options.stylize((i + 1).toString(), 'number');\n\t\t\t\tconst body = error[customInspectSymbolStackLess](depth - 1, newOptions).replace(/\\n/g, padding);\n\n\t\t\t\treturn ` ${index} ${body}`;\n\t\t\t})\n\t\t\t.join('\\n\\n');\n\t\treturn `${header}\\n ${message}\\n\\n${errors}`;\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedError } from '../lib/errors/CombinedError';\nimport type { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator, LiteralValidator, NullishValidator } from './imports';\n\nexport class UnionValidator<T> extends BaseValidator<T> {\n\tprivate validators: readonly BaseValidator<T>[];\n\n\tpublic constructor(validators: readonly BaseValidator<T>[], constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validators = validators;\n\t}\n\n\tpublic override get optional(): UnionValidator<T | undefined> {\n\t\tif (this.validators.length === 0) return new UnionValidator<T | undefined>([new LiteralValidator(undefined)], this.constraints);\n\n\t\tconst [validator] = this.validators;\n\t\tif (validator instanceof LiteralValidator) {\n\t\t\t// If already optional, return a clone:\n\t\t\tif (validator.expected === undefined) return this.clone();\n\n\t\t\t// If it's nullable, convert the nullable validator into a nullish validator to optimize `null | undefined`:\n\t\t\tif (validator.expected === null) {\n\t\t\t\treturn new UnionValidator<T | null | undefined>(\n\t\t\t\t\t[new NullishValidator(), ...this.validators.slice(1)],\n\t\t\t\t\tthis.constraints\n\t\t\t\t) as UnionValidator<T | undefined>;\n\t\t\t}\n\t\t} else if (validator instanceof NullishValidator) {\n\t\t\t// If it's already nullish (which validates optional), return a clone:\n\t\t\treturn this.clone();\n\t\t}\n\n\t\treturn new UnionValidator([new LiteralValidator(undefined), ...this.validators]);\n\t}\n\n\tpublic get required(): UnionValidator<Exclude<T, undefined>> {\n\t\ttype RequiredValidator = UnionValidator<Exclude<T, undefined>>;\n\n\t\tif (this.validators.length === 0) return this.clone() as unknown as RequiredValidator;\n\n\t\tconst [validator] = this.validators;\n\t\tif (validator instanceof LiteralValidator) {\n\t\t\tif (validator.expected === undefined) return new UnionValidator(this.validators.slice(1), this.constraints) as RequiredValidator;\n\t\t} else if (validator instanceof NullishValidator) {\n\t\t\treturn new UnionValidator([new LiteralValidator(null), ...this.validators.slice(1)], this.constraints) as RequiredValidator;\n\t\t}\n\n\t\treturn this.clone() as unknown as RequiredValidator;\n\t}\n\n\tpublic override get nullable(): UnionValidator<T | null> {\n\t\tif (this.validators.length === 0) return new UnionValidator<T | null>([new LiteralValidator(null)], this.constraints);\n\n\t\tconst [validator] = this.validators;\n\t\tif (validator instanceof LiteralValidator) {\n\t\t\t// If already nullable, return a clone:\n\t\t\tif (validator.expected === null) return this.clone();\n\n\t\t\t// If it's optional, convert the optional validator into a nullish validator to optimize `null | undefined`:\n\t\t\tif (validator.expected === undefined) {\n\t\t\t\treturn new UnionValidator<T | null | undefined>(\n\t\t\t\t\t[new NullishValidator(), ...this.validators.slice(1)],\n\t\t\t\t\tthis.constraints\n\t\t\t\t) as UnionValidator<T | null>;\n\t\t\t}\n\t\t} else if (validator instanceof NullishValidator) {\n\t\t\t// If it's already nullish (which validates nullable), return a clone:\n\t\t\treturn this.clone();\n\t\t}\n\n\t\treturn new UnionValidator([new LiteralValidator(null), ...this.validators]);\n\t}\n\n\tpublic override get nullish(): UnionValidator<T | null | undefined> {\n\t\tif (this.validators.length === 0) return new UnionValidator<T | null | undefined>([new NullishValidator()], this.constraints);\n\n\t\tconst [validator] = this.validators;\n\t\tif (validator instanceof LiteralValidator) {\n\t\t\t// If already nullable or optional, promote the union to nullish:\n\t\t\tif (validator.expected === null || validator.expected === undefined) {\n\t\t\t\treturn new UnionValidator<T | null | undefined>([new NullishValidator(), ...this.validators.slice(1)], this.constraints);\n\t\t\t}\n\t\t} else if (validator instanceof NullishValidator) {\n\t\t\t// If it's already nullish, return a clone:\n\t\t\treturn this.clone();\n\t\t}\n\n\t\treturn new UnionValidator<T | null | undefined>([new NullishValidator(), ...this.validators]);\n\t}\n\n\tpublic override or<O>(...predicates: readonly BaseValidator<O>[]): UnionValidator<T | O> {\n\t\treturn new UnionValidator<T | O>([...this.validators, ...predicates]);\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validators, this.constraints]);\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError | CombinedError> {\n\t\tconst errors: BaseError[] = [];\n\n\t\tfor (const validator of this.validators) {\n\t\t\tconst result = validator.run(value);\n\t\t\tif (result.isOk()) return result as Result<T, CombinedError>;\n\t\t\terrors.push(result.error!);\n\t\t}\n\n\t\treturn Result.err(new CombinedError(errors));\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport { MissingPropertyError } from '../lib/errors/MissingPropertyError';\nimport { UnknownPropertyError } from '../lib/errors/UnknownPropertyError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport type { MappedObjectValidator, UndefinedToOptional } from '../lib/util-types';\nimport { BaseValidator } from './BaseValidator';\nimport { DefaultValidator } from './DefaultValidator';\nimport { LiteralValidator } from './LiteralValidator';\nimport { NullishValidator } from './NullishValidator';\nimport { UnionValidator } from './UnionValidator';\n\nexport class ObjectValidator<T extends object, I = UndefinedToOptional<T>> extends BaseValidator<I> {\n\tpublic readonly shape: MappedObjectValidator<T>;\n\tpublic readonly strategy: ObjectValidatorStrategy;\n\tprivate readonly keys: readonly (keyof I)[] = [];\n\tprivate readonly handleStrategy: (value: object) => Result<I, CombinedPropertyError>;\n\n\tprivate readonly requiredKeys = new Map<keyof I, BaseValidator<unknown>>();\n\tprivate readonly possiblyUndefinedKeys = new Map<keyof I, BaseValidator<unknown>>();\n\tprivate readonly possiblyUndefinedKeysWithDefaults = new Map<keyof I, DefaultValidator<unknown>>();\n\n\tpublic constructor(\n\t\tshape: MappedObjectValidator<T>,\n\t\tstrategy: ObjectValidatorStrategy = ObjectValidatorStrategy.Ignore,\n\t\tconstraints: readonly IConstraint<I>[] = []\n\t) {\n\t\tsuper(constraints);\n\t\tthis.shape = shape;\n\t\tthis.strategy = strategy;\n\n\t\tswitch (this.strategy) {\n\t\t\tcase ObjectValidatorStrategy.Ignore:\n\t\t\t\tthis.handleStrategy = (value) => this.handleIgnoreStrategy(value);\n\t\t\t\tbreak;\n\t\t\tcase ObjectValidatorStrategy.Strict: {\n\t\t\t\tthis.handleStrategy = (value) => this.handleStrictStrategy(value);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase ObjectValidatorStrategy.Passthrough:\n\t\t\t\tthis.handleStrategy = (value) => this.handlePassthroughStrategy(value);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tconst shapeEntries = Object.entries(shape) as [keyof I, BaseValidator<T>][];\n\t\tthis.keys = shapeEntries.map(([key]) => key);\n\n\t\tfor (const [key, validator] of shapeEntries) {\n\t\t\tif (validator instanceof UnionValidator) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/dot-notation\n\t\t\t\tconst [possiblyLiteralOrNullishPredicate] = validator['validators'];\n\n\t\t\t\tif (possiblyLiteralOrNullishPredicate instanceof NullishValidator) {\n\t\t\t\t\tthis.possiblyUndefinedKeys.set(key, validator);\n\t\t\t\t} else if (possiblyLiteralOrNullishPredicate instanceof LiteralValidator) {\n\t\t\t\t\tif (possiblyLiteralOrNullishPredicate.expected === undefined) {\n\t\t\t\t\t\tthis.possiblyUndefinedKeys.set(key, validator);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.requiredKeys.set(key, validator);\n\t\t\t\t\t}\n\t\t\t\t} else if (validator instanceof DefaultValidator) {\n\t\t\t\t\tthis.possiblyUndefinedKeysWithDefaults.set(key, validator);\n\t\t\t\t} else {\n\t\t\t\t\tthis.requiredKeys.set(key, validator);\n\t\t\t\t}\n\t\t\t} else if (validator instanceof NullishValidator) {\n\t\t\t\tthis.possiblyUndefinedKeys.set(key, validator);\n\t\t\t} else if (validator instanceof LiteralValidator) {\n\t\t\t\tif (validator.expected === undefined) {\n\t\t\t\t\tthis.possiblyUndefinedKeys.set(key, validator);\n\t\t\t\t} else {\n\t\t\t\t\tthis.requiredKeys.set(key, validator);\n\t\t\t\t}\n\t\t\t} else if (validator instanceof DefaultValidator) {\n\t\t\t\tthis.possiblyUndefinedKeysWithDefaults.set(key, validator);\n\t\t\t} else {\n\t\t\t\tthis.requiredKeys.set(key, validator);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic get strict(): this {\n\t\treturn Reflect.construct(this.constructor, [this.shape, ObjectValidatorStrategy.Strict, this.constraints]);\n\t}\n\n\tpublic get ignore(): this {\n\t\treturn Reflect.construct(this.constructor, [this.shape, ObjectValidatorStrategy.Ignore, this.constraints]);\n\t}\n\n\tpublic get passthrough(): this {\n\t\treturn Reflect.construct(this.constructor, [this.shape, ObjectValidatorStrategy.Passthrough, this.constraints]);\n\t}\n\n\tpublic get partial(): ObjectValidator<{ [Key in keyof I]?: I[Key] }> {\n\t\tconst shape = Object.fromEntries(this.keys.map((key) => [key, this.shape[key as unknown as keyof typeof this.shape].optional]));\n\t\treturn Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);\n\t}\n\n\tpublic get required(): ObjectValidator<{ [Key in keyof I]-?: I[Key] }> {\n\t\tconst shape = Object.fromEntries(\n\t\t\tthis.keys.map((key) => {\n\t\t\t\tlet validator = this.shape[key as unknown as keyof typeof this.shape];\n\t\t\t\tif (validator instanceof UnionValidator) validator = validator.required;\n\t\t\t\treturn [key, validator];\n\t\t\t})\n\t\t);\n\t\treturn Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);\n\t}\n\n\tpublic extend<ET extends object>(schema: ObjectValidator<ET> | MappedObjectValidator<ET>): ObjectValidator<T & ET> {\n\t\tconst shape = { ...this.shape, ...(schema instanceof ObjectValidator ? schema.shape : schema) };\n\t\treturn Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);\n\t}\n\n\tpublic pick<K extends keyof I>(keys: readonly K[]): ObjectValidator<{ [Key in keyof Pick<I, K>]: I[Key] }> {\n\t\tconst shape = Object.fromEntries(\n\t\t\tkeys.filter((key) => this.keys.includes(key)).map((key) => [key, this.shape[key as unknown as keyof typeof this.shape]])\n\t\t);\n\t\treturn Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);\n\t}\n\n\tpublic omit<K extends keyof I>(keys: readonly K[]): ObjectValidator<{ [Key in keyof Omit<I, K>]: I[Key] }> {\n\t\tconst shape = Object.fromEntries(\n\t\t\tthis.keys.filter((key) => !keys.includes(key as any)).map((key) => [key, this.shape[key as unknown as keyof typeof this.shape]])\n\t\t);\n\t\treturn Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);\n\t}\n\n\tprotected override handle(value: unknown): Result<I, ValidationError | CombinedPropertyError> {\n\t\tconst typeOfValue = typeof value;\n\t\tif (typeOfValue !== 'object') {\n\t\t\treturn Result.err(new ValidationError('s.object(T)', `Expected the value to be an object, but received ${typeOfValue} instead`, value));\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn Result.err(new ValidationError('s.object(T)', 'Expected the value to not be null', value));\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\treturn Result.err(new ValidationError('s.object(T)', 'Expected the value to not be an array', value));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(value as I);\n\t\t}\n\n\t\tfor (const predicate of Object.values(this.shape) as BaseValidator<any>[]) {\n\t\t\tpredicate.setParent(this.parent ?? value!);\n\t\t}\n\n\t\treturn this.handleStrategy(value as object);\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.shape, this.strategy, this.constraints]);\n\t}\n\n\tprivate handleIgnoreStrategy(value: object): Result<I, CombinedPropertyError> {\n\t\tconst errors: [PropertyKey, BaseError][] = [];\n\t\tconst finalObject = {} as I;\n\t\tconst inputEntries = new Map(Object.entries(value) as [keyof I, unknown][]);\n\n\t\tconst runPredicate = (key: keyof I, predicate: BaseValidator<unknown>) => {\n\t\t\tconst result = predicate.run(value[key as keyof object]);\n\n\t\t\tif (result.isOk()) {\n\t\t\t\tfinalObject[key] = result.value as I[keyof I];\n\t\t\t} else {\n\t\t\t\tconst error = result.error!;\n\t\t\t\terrors.push([key, error]);\n\t\t\t}\n\t\t};\n\n\t\tfor (const [key, predicate] of this.requiredKeys) {\n\t\t\tif (inputEntries.delete(key)) {\n\t\t\t\trunPredicate(key, predicate);\n\t\t\t} else {\n\t\t\t\terrors.push([key, new MissingPropertyError(key)]);\n\t\t\t}\n\t\t}\n\n\t\t// Run possibly undefined keys that also have defaults even if there are no more keys to process (this is necessary so we fill in those defaults)\n\t\tfor (const [key, validator] of this.possiblyUndefinedKeysWithDefaults) {\n\t\t\tinputEntries.delete(key);\n\t\t\trunPredicate(key, validator);\n\t\t}\n\n\t\t// Early exit if there are no more properties to validate in the object and there are errors to report\n\t\tif (inputEntries.size === 0) {\n\t\t\treturn errors.length === 0 //\n\t\t\t\t? Result.ok(finalObject)\n\t\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t\t}\n\n\t\t// In the event the remaining keys to check are less than the number of possible undefined keys, we check those\n\t\t// as it could yield a faster execution\n\t\tconst checkInputEntriesInsteadOfSchemaKeys = this.possiblyUndefinedKeys.size > inputEntries.size;\n\n\t\tif (checkInputEntriesInsteadOfSchemaKeys) {\n\t\t\tfor (const [key] of inputEntries) {\n\t\t\t\tconst predicate = this.possiblyUndefinedKeys.get(key);\n\n\t\t\t\tif (predicate) {\n\t\t\t\t\trunPredicate(key, predicate);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (const [key, predicate] of this.possiblyUndefinedKeys) {\n\t\t\t\tif (inputEntries.delete(key)) {\n\t\t\t\t\trunPredicate(key, predicate);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(finalObject)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n\n\tprivate handleStrictStrategy(value: object): Result<I, CombinedPropertyError> {\n\t\tconst errors: [PropertyKey, BaseError][] = [];\n\t\tconst finalResult = {} as I;\n\t\tconst inputEntries = new Map(Object.entries(value) as [keyof I, unknown][]);\n\n\t\tconst runPredicate = (key: keyof I, predicate: BaseValidator<unknown>) => {\n\t\t\tconst result = predicate.run(value[key as keyof object]);\n\n\t\t\tif (result.isOk()) {\n\t\t\t\tfinalResult[key] = result.value as I[keyof I];\n\t\t\t} else {\n\t\t\t\tconst error = result.error!;\n\t\t\t\terrors.push([key, error]);\n\t\t\t}\n\t\t};\n\n\t\tfor (const [key, predicate] of this.requiredKeys) {\n\t\t\tif (inputEntries.delete(key)) {\n\t\t\t\trunPredicate(key, predicate);\n\t\t\t} else {\n\t\t\t\terrors.push([key, new MissingPropertyError(key)]);\n\t\t\t}\n\t\t}\n\n\t\t// Run possibly undefined keys that also have defaults even if there are no more keys to process (this is necessary so we fill in those defaults)\n\t\tfor (const [key, validator] of this.possiblyUndefinedKeysWithDefaults) {\n\t\t\tinputEntries.delete(key);\n\t\t\trunPredicate(key, validator);\n\t\t}\n\n\t\tfor (const [key, predicate] of this.possiblyUndefinedKeys) {\n\t\t\t// All of these validators are assumed to be possibly undefined, so if we have gone through the entire object and there's still validators,\n\t\t\t// safe to assume we're done here\n\t\t\tif (inputEntries.size === 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (inputEntries.delete(key)) {\n\t\t\t\trunPredicate(key, predicate);\n\t\t\t}\n\t\t}\n\n\t\tif (inputEntries.size !== 0) {\n\t\t\tfor (const [key, value] of inputEntries.entries()) {\n\t\t\t\terrors.push([key, new UnknownPropertyError(key, value)]);\n\t\t\t}\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(finalResult)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n\n\tprivate handlePassthroughStrategy(value: object): Result<I, CombinedPropertyError> {\n\t\tconst result = this.handleIgnoreStrategy(value);\n\t\treturn result.isErr() ? result : Result.ok({ ...value, ...result.value } as I);\n\t}\n}\n\nexport enum ObjectValidatorStrategy {\n\tIgnore,\n\tStrict,\n\tPassthrough\n}\n","import type { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class PassthroughValidator<T extends any | unknown> extends BaseValidator<T> {\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn Result.ok(value as T);\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class RecordValidator<T> extends BaseValidator<Record<string, T>> {\n\tprivate readonly validator: BaseValidator<T>;\n\n\tpublic constructor(validator: BaseValidator<T>, constraints: readonly IConstraint<Record<string, T>>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validator = validator;\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validator, this.constraints]);\n\t}\n\n\tprotected handle(value: unknown): Result<Record<string, T>, ValidationError | CombinedPropertyError> {\n\t\tif (typeof value !== 'object') {\n\t\t\treturn Result.err(new ValidationError('s.record(T)', 'Expected an object', value));\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn Result.err(new ValidationError('s.record(T)', 'Expected the value to not be null', value));\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\treturn Result.err(new ValidationError('s.record(T)', 'Expected the value to not be an array', value));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(value as Record<string, T>);\n\t\t}\n\n\t\tconst errors: [string, BaseError][] = [];\n\t\tconst transformed: Record<string, T> = {};\n\n\t\tfor (const [key, val] of Object.entries(value!)) {\n\t\t\tconst result = this.validator.run(val);\n\t\t\tif (result.isOk()) transformed[key] = result.value;\n\t\t\telse errors.push([key, result.error!]);\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(transformed)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedError } from '../lib/errors/CombinedError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class SetValidator<T> extends BaseValidator<Set<T>> {\n\tprivate readonly validator: BaseValidator<T>;\n\n\tpublic constructor(validator: BaseValidator<T>, constraints: readonly IConstraint<Set<T>>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validator = validator;\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validator, this.constraints]);\n\t}\n\n\tprotected handle(values: unknown): Result<Set<T>, ValidationError | CombinedError> {\n\t\tif (!(values instanceof Set)) {\n\t\t\treturn Result.err(new ValidationError('s.set(T)', 'Expected a set', values));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(values);\n\t\t}\n\n\t\tconst errors: BaseError[] = [];\n\t\tconst transformed = new Set<T>();\n\n\t\tfor (const value of values) {\n\t\t\tconst result = this.validator.run(value);\n\t\t\tif (result.isOk()) transformed.add(result.value);\n\t\t\telse errors.push(result.error!);\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(transformed)\n\t\t\t: Result.err(new CombinedError(errors));\n\t}\n}\n","/**\n * [RFC-5322](https://datatracker.ietf.org/doc/html/rfc5322)\n * compliant {@link RegExp} to validate an email address\n *\n * @see https://stackoverflow.com/questions/201323/how-can-i-validate-an-email-address-using-a-regular-expression/201378#201378\n */\nconst accountRegex =\n\t/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")$/;\n\n/**\n * Validates an email address string based on various checks:\n * - It must be a non nullish and non empty string\n * - It must include at least an `@` symbol`\n * - The account name may not exceed 64 characters\n * - The domain name may not exceed 255 characters\n * - The domain must include at least one `.` symbol\n * - Each part of the domain, split by `.` must not exceed 63 characters\n * - The email address must be [RFC-5322](https://datatracker.ietf.org/doc/html/rfc5322) compliant\n * @param email The email to validate\n * @returns `true` if the email is valid, `false` otherwise\n *\n * @remark Based on the following sources:\n * - `email-validator` by [manisharaan](https://github.com/manishsaraan) ([code](https://github.com/manishsaraan/email-validator/blob/master/index.js))\n * - [Comparing E-mail Address Validating Regular Expressions](http://fightingforalostcause.net/misc/2006/compare-email-regex.php)\n * - [Validating Email Addresses by Derrick Pallas](http://thedailywtf.com/Articles/Validating_Email_Addresses.aspx)\n * - [StackOverflow answer by bortzmeyer](http://stackoverflow.com/questions/201323/what-is-the-best-regular-expression-for-validating-email-addresses/201378#201378)\n * - [The wikipedia page on Email addresses](https://en.wikipedia.org/wiki/Email_address)\n */\nexport function validateEmail(email: string): boolean {\n\t// 1. Non-nullish and non-empty string check.\n\t//\n\t// If a nullish or empty email was provided then do an early exit\n\tif (!email) return false;\n\n\t// Find the location of the @ symbol:\n\tconst atIndex = email.indexOf('@');\n\n\t// 2. @ presence check.\n\t//\n\t// If the email does not have the @ symbol, it's automatically invalid:\n\tif (atIndex === -1) return false;\n\n\t// 3. <account> maximum length check.\n\t//\n\t// From <account>@<domain>, if <account> exceeds 64 characters, then the\n\t// position of the @ symbol is 64 or greater. In this case, the email is\n\t// invalid:\n\tif (atIndex > 64) return false;\n\n\tconst domainIndex = atIndex + 1;\n\n\t// 7.1. Duplicated @ symbol check.\n\t//\n\t// If there's a second @ symbol, the email is automatically invalid:\n\tif (email.includes('@', domainIndex)) return false;\n\n\t// 4. <domain> maximum length check.\n\t//\n\t// From <account>@<domain>, if <domain> exceeds 255 characters, then it\n\t// means that the amount of characters between the start of <domain> and the\n\t// end of the string is separated by 255 or more characters.\n\tif (email.length - domainIndex > 255) return false;\n\n\t// Find the location of the . symbol in <domain>:\n\tlet dotIndex = email.indexOf('.', domainIndex);\n\n\t// 5. <domain> dot (.) symbol check.\n\t//\n\t// From <account>@<domain>, if <domain> does not contain a dot (.) symbol,\n\t// then it means the domain is invalid.\n\tif (dotIndex === -1) return false;\n\n\t// 6. <domain> parts length.\n\t//\n\t// Assign a temporary variable to store the start of the last read domain\n\t// part, this would be at the start of <domain>.\n\t//\n\t// For a <domain> part to be correct, it must have at most, 63 characters.\n\t// We repeat this step for every sub-section of <domain> contained within\n\t// dot (.) symbols.\n\t//\n\t// The following step is a more optimized version of the following code:\n\t//\n\t// ```javascript\n\t// domain.split('.').some((part) => part.length > 63);\n\t// ```\n\tlet lastDotIndex = domainIndex;\n\tdo {\n\t\tif (dotIndex - lastDotIndex > 63) return false;\n\n\t\tlastDotIndex = dotIndex + 1;\n\t} while ((dotIndex = email.indexOf('.', lastDotIndex)) !== -1);\n\n\t// The loop iterates from the first to the n - 1 part, this line checks for\n\t// the last (n) part:\n\tif (email.length - lastDotIndex > 63) return false;\n\n\t// 7.2. Character checks.\n\t//\n\t// From <account>@<domain>:\n\t// - Extract the <account> part by slicing the input from start to the @\n\t// character. Validate afterwards.\n\t// - Extract the <domain> part by slicing the input from the start of\n\t// <domain>. Validate afterwards.\n\t//\n\t// Note: we inline the variables so <domain> isn't created unless the\n\t// <account> check passes.\n\treturn accountRegex.test(email.slice(0, atIndex)) && validateEmailDomain(email.slice(domainIndex));\n}\n\nfunction validateEmailDomain(domain: string): boolean {\n\ttry {\n\t\treturn new URL(`http://${domain}`).hostname === domain;\n\t} catch {\n\t\treturn false;\n\t}\n}\n","/**\n * Code ported from https://github.com/nodejs/node/blob/5fad0b93667ffc6e4def52996b9529ac99b26319/lib/internal/net.js\n */\n\n// IPv4 Segment\nconst v4Seg = '(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';\nconst v4Str = `(${v4Seg}[.]){3}${v4Seg}`;\nconst IPv4Reg = new RegExp(`^${v4Str}$`);\n\n// IPv6 Segment\nconst v6Seg = '(?:[0-9a-fA-F]{1,4})';\nconst IPv6Reg = new RegExp(\n\t'^(' +\n\t\t`(?:${v6Seg}:){7}(?:${v6Seg}|:)|` +\n\t\t`(?:${v6Seg}:){6}(?:${v4Str}|:${v6Seg}|:)|` +\n\t\t`(?:${v6Seg}:){5}(?::${v4Str}|(:${v6Seg}){1,2}|:)|` +\n\t\t`(?:${v6Seg}:){4}(?:(:${v6Seg}){0,1}:${v4Str}|(:${v6Seg}){1,3}|:)|` +\n\t\t`(?:${v6Seg}:){3}(?:(:${v6Seg}){0,2}:${v4Str}|(:${v6Seg}){1,4}|:)|` +\n\t\t`(?:${v6Seg}:){2}(?:(:${v6Seg}){0,3}:${v4Str}|(:${v6Seg}){1,5}|:)|` +\n\t\t`(?:${v6Seg}:){1}(?:(:${v6Seg}){0,4}:${v4Str}|(:${v6Seg}){1,6}|:)|` +\n\t\t`(?::((?::${v6Seg}){0,5}:${v4Str}|(?::${v6Seg}){1,7}|:))` +\n\t\t')(%[0-9a-zA-Z-.:]{1,})?$'\n);\n\nexport function isIPv4(s: string): boolean {\n\treturn IPv4Reg.test(s);\n}\n\nexport function isIPv6(s: string): boolean {\n\treturn IPv6Reg.test(s);\n}\n\nexport function isIP(s: string): number {\n\tif (isIPv4(s)) return 4;\n\tif (isIPv6(s)) return 6;\n\treturn 0;\n}\n","export const phoneNumberRegex = /^((?:\\+|0{0,2})\\d{1,2}\\s?)?\\(?\\d{3}\\)?[\\s.-]?\\d{3}[\\s.-]?\\d{4}$/;\n\nexport function validatePhoneNumber(input: string) {\n\treturn phoneNumberRegex.test(input);\n}\n","import { inspect, type InspectOptionsStylized } from 'util';\nimport { customInspectSymbolStackLess } from './BaseError';\nimport { BaseConstraintError, type ConstraintErrorNames } from './BaseConstraintError';\n\nexport class MultiplePossibilitiesConstraintError<T = unknown> extends BaseConstraintError<T> {\n\tpublic readonly expected: readonly string[];\n\n\tpublic constructor(constraint: ConstraintErrorNames, message: string, given: T, expected: readonly string[]) {\n\t\tsuper(constraint, message, given);\n\t\tthis.expected = expected;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tconstraint: this.constraint,\n\t\t\tgiven: this.given,\n\t\t\texpected: this.expected\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst constraint = options.stylize(this.constraint, 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[MultiplePossibilitiesConstraintError: ${constraint}]`, 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1 };\n\n\t\tconst verticalLine = options.stylize('|', 'undefined');\n\t\tconst padding = `\\n ${verticalLine} `;\n\t\tconst given = inspect(this.given, newOptions).replace(/\\n/g, padding);\n\n\t\tconst header = `${options.stylize('MultiplePossibilitiesConstraintError', 'special')} > ${constraint}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\n\t\tconst expectedPadding = `\\n ${verticalLine} - `;\n\t\tconst expectedBlock = `\\n ${options.stylize('Expected any of the following:', 'string')}${expectedPadding}${this.expected\n\t\t\t.map((possible) => options.stylize(possible, 'boolean'))\n\t\t\t.join(expectedPadding)}`;\n\t\tconst givenBlock = `\\n ${options.stylize('Received:', 'regexp')}${padding}${given}`;\n\t\treturn `${header}\\n ${message}\\n${expectedBlock}\\n${givenBlock}`;\n\t}\n}\n","export function combinedErrorFn<P extends [...any], E extends Error>(...fns: ErrorFn<P, E>[]): ErrorFn<P, E> {\n\tswitch (fns.length) {\n\t\tcase 0:\n\t\t\treturn () => null;\n\t\tcase 1:\n\t\t\treturn fns[0];\n\t\tcase 2: {\n\t\t\tconst [fn0, fn1] = fns;\n\t\t\treturn (...params) => fn0(...params) || fn1(...params);\n\t\t}\n\t\tdefault: {\n\t\t\treturn (...params) => {\n\t\t\t\tfor (const fn of fns) {\n\t\t\t\t\tconst result = fn(...params);\n\t\t\t\t\tif (result) return result;\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\t\t\t};\n\t\t}\n\t}\n}\n\nexport type ErrorFn<P extends [...any], E extends Error> = (...params: P) => E | null;\n","import { MultiplePossibilitiesConstraintError } from '../../lib/errors/MultiplePossibilitiesConstraintError';\nimport { combinedErrorFn, type ErrorFn } from './common/combinedResultFn';\n\nexport type StringProtocol = `${string}:`;\n\nexport type StringDomain = `${string}.${string}`;\n\nexport interface UrlOptions {\n\tallowedProtocols?: StringProtocol[];\n\tallowedDomains?: StringDomain[];\n}\n\nexport function createUrlValidators(options?: UrlOptions) {\n\tconst fns: ErrorFn<[input: string, url: URL], MultiplePossibilitiesConstraintError<string>>[] = [];\n\n\tif (options?.allowedProtocols?.length) fns.push(allowedProtocolsFn(options.allowedProtocols));\n\tif (options?.allowedDomains?.length) fns.push(allowedDomainsFn(options.allowedDomains));\n\n\treturn combinedErrorFn(...fns);\n}\n\nfunction allowedProtocolsFn(allowedProtocols: StringProtocol[]) {\n\treturn (input: string, url: URL) =>\n\t\tallowedProtocols.includes(url.protocol as StringProtocol)\n\t\t\t? null\n\t\t\t: new MultiplePossibilitiesConstraintError('s.string.url', 'Invalid URL protocol', input, allowedProtocols);\n}\n\nfunction allowedDomainsFn(allowedDomains: StringDomain[]) {\n\treturn (input: string, url: URL) =>\n\t\tallowedDomains.includes(url.hostname as StringDomain)\n\t\t\t? null\n\t\t\t: new MultiplePossibilitiesConstraintError('s.string.url', 'Invalid URL domain', input, allowedDomains);\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { validateEmail } from './util/emailValidator';\nimport { isIP, isIPv4, isIPv6 } from './util/net';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\nimport { validatePhoneNumber } from './util/phoneValidator';\nimport { createUrlValidators } from './util/urlValidators';\n\nexport type StringConstraintName =\n\t| `s.string.${\n\t\t\t| `length${'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'Equal' | 'NotEqual'}`\n\t\t\t| 'regex'\n\t\t\t| 'url'\n\t\t\t| 'uuid'\n\t\t\t| 'email'\n\t\t\t| `ip${'v4' | 'v6' | ''}`\n\t\t\t| 'date'\n\t\t\t| 'phone'}`;\n\nexport type StringProtocol = `${string}:`;\n\nexport type StringDomain = `${string}.${string}`;\n\nexport interface UrlOptions {\n\tallowedProtocols?: StringProtocol[];\n\tallowedDomains?: StringDomain[];\n}\n\nexport type UUIDVersion = 1 | 3 | 4 | 5;\n\nexport interface StringUuidOptions {\n\tversion?: UUIDVersion | `${UUIDVersion}-${UUIDVersion}` | null;\n\tnullable?: boolean;\n}\n\nfunction stringLengthComparator(comparator: Comparator, name: StringConstraintName, expected: string, length: number): IConstraint<string> {\n\treturn {\n\t\trun(input: string) {\n\t\t\treturn comparator(input.length, length) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid string length', input, expected));\n\t\t}\n\t};\n}\n\nexport function stringLengthLessThan(length: number): IConstraint<string> {\n\tconst expected = `expected.length < ${length}`;\n\treturn stringLengthComparator(lessThan, 's.string.lengthLessThan', expected, length);\n}\n\nexport function stringLengthLessThanOrEqual(length: number): IConstraint<string> {\n\tconst expected = `expected.length <= ${length}`;\n\treturn stringLengthComparator(lessThanOrEqual, 's.string.lengthLessThanOrEqual', expected, length);\n}\n\nexport function stringLengthGreaterThan(length: number): IConstraint<string> {\n\tconst expected = `expected.length > ${length}`;\n\treturn stringLengthComparator(greaterThan, 's.string.lengthGreaterThan', expected, length);\n}\n\nexport function stringLengthGreaterThanOrEqual(length: number): IConstraint<string> {\n\tconst expected = `expected.length >= ${length}`;\n\treturn stringLengthComparator(greaterThanOrEqual, 's.string.lengthGreaterThanOrEqual', expected, length);\n}\n\nexport function stringLengthEqual(length: number): IConstraint<string> {\n\tconst expected = `expected.length === ${length}`;\n\treturn stringLengthComparator(equal, 's.string.lengthEqual', expected, length);\n}\n\nexport function stringLengthNotEqual(length: number): IConstraint<string> {\n\tconst expected = `expected.length !== ${length}`;\n\treturn stringLengthComparator(notEqual, 's.string.lengthNotEqual', expected, length);\n}\n\nexport function stringEmail(): IConstraint<string> {\n\treturn {\n\t\trun(input: string) {\n\t\t\treturn validateEmail(input)\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.string.email', 'Invalid email address', input, 'expected to be an email address'));\n\t\t}\n\t};\n}\n\nfunction stringRegexValidator(type: StringConstraintName, expected: string, regex: RegExp): IConstraint<string> {\n\treturn {\n\t\trun(input: string) {\n\t\t\treturn regex.test(input) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(type, 'Invalid string format', input, expected));\n\t\t}\n\t};\n}\n\nexport function stringUrl(options?: UrlOptions): IConstraint<string> {\n\tconst validatorFn = createUrlValidators(options);\n\treturn {\n\t\trun(input: string) {\n\t\t\tlet url: URL;\n\t\t\ttry {\n\t\t\t\turl = new URL(input);\n\t\t\t} catch {\n\t\t\t\treturn Result.err(new ExpectedConstraintError('s.string.url', 'Invalid URL', input, 'expected to match a URL'));\n\t\t\t}\n\n\t\t\tconst validatorFnResult = validatorFn(input, url);\n\t\t\tif (validatorFnResult === null) return Result.ok(input);\n\t\t\treturn Result.err(validatorFnResult);\n\t\t}\n\t};\n}\n\nexport function stringIp(version?: 4 | 6): IConstraint<string> {\n\tconst ipVersion = version ? (`v${version}` as const) : '';\n\tconst validatorFn = version === 4 ? isIPv4 : version === 6 ? isIPv6 : isIP;\n\n\tconst name = `s.string.ip${ipVersion}` as const;\n\tconst message = `Invalid IP${ipVersion} address`;\n\tconst expected = `expected to be an IP${ipVersion} address`;\n\treturn {\n\t\trun(input: string) {\n\t\t\treturn validatorFn(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, message, input, expected));\n\t\t}\n\t};\n}\n\nexport function stringRegex(regex: RegExp) {\n\treturn stringRegexValidator('s.string.regex', `expected ${regex}.test(expected) to be true`, regex);\n}\n\nexport function stringUuid({ version = 4, nullable = false }: StringUuidOptions = {}) {\n\tversion ??= '1-5';\n\tconst regex = new RegExp(\n\t\t`^(?:[0-9A-F]{8}-[0-9A-F]{4}-[${version}][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}${\n\t\t\tnullable ? '|00000000-0000-0000-0000-000000000000' : ''\n\t\t})$`,\n\t\t'i'\n\t);\n\tconst expected = `expected to match UUID${typeof version === 'number' ? `v${version}` : ` in range of ${version}`}`;\n\treturn stringRegexValidator('s.string.uuid', expected, regex);\n}\n\nexport function stringDate(): IConstraint<string> {\n\treturn {\n\t\trun(input: string) {\n\t\t\tconst time = Date.parse(input);\n\n\t\t\treturn Number.isNaN(time)\n\t\t\t\t? Result.err(\n\t\t\t\t\t\tnew ExpectedConstraintError(\n\t\t\t\t\t\t\t's.string.date',\n\t\t\t\t\t\t\t'Invalid date string',\n\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\t'expected to be a valid date string (in the ISO 8601 or ECMA-262 format)'\n\t\t\t\t\t\t)\n\t\t\t\t )\n\t\t\t\t: Result.ok(input);\n\t\t}\n\t};\n}\n\nexport function stringPhone(): IConstraint<string> {\n\treturn {\n\t\trun(input: string) {\n\t\t\treturn validatePhoneNumber(input)\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.string.phone', 'Invalid phone number', input, 'expected to be a phone number'));\n\t\t}\n\t};\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport {\n\tstringDate,\n\tstringEmail,\n\tstringIp,\n\tstringLengthEqual,\n\tstringLengthGreaterThan,\n\tstringLengthGreaterThanOrEqual,\n\tstringLengthLessThan,\n\tstringLengthLessThanOrEqual,\n\tstringLengthNotEqual,\n\tstringPhone,\n\tstringRegex,\n\tstringUrl,\n\tstringUuid,\n\ttype StringUuidOptions,\n\ttype UrlOptions\n} from '../constraints/StringConstraints';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class StringValidator<T extends string> extends BaseValidator<T> {\n\tpublic lengthLessThan(length: number): this {\n\t\treturn this.addConstraint(stringLengthLessThan(length) as IConstraint<T>);\n\t}\n\n\tpublic lengthLessThanOrEqual(length: number): this {\n\t\treturn this.addConstraint(stringLengthLessThanOrEqual(length) as IConstraint<T>);\n\t}\n\n\tpublic lengthGreaterThan(length: number): this {\n\t\treturn this.addConstraint(stringLengthGreaterThan(length) as IConstraint<T>);\n\t}\n\n\tpublic lengthGreaterThanOrEqual(length: number): this {\n\t\treturn this.addConstraint(stringLengthGreaterThanOrEqual(length) as IConstraint<T>);\n\t}\n\n\tpublic lengthEqual(length: number): this {\n\t\treturn this.addConstraint(stringLengthEqual(length) as IConstraint<T>);\n\t}\n\n\tpublic lengthNotEqual(length: number): this {\n\t\treturn this.addConstraint(stringLengthNotEqual(length) as IConstraint<T>);\n\t}\n\n\tpublic get email(): this {\n\t\treturn this.addConstraint(stringEmail() as IConstraint<T>);\n\t}\n\n\tpublic url(options?: UrlOptions): this {\n\t\treturn this.addConstraint(stringUrl(options) as IConstraint<T>);\n\t}\n\n\tpublic uuid(options?: StringUuidOptions): this {\n\t\treturn this.addConstraint(stringUuid(options) as IConstraint<T>);\n\t}\n\n\tpublic regex(regex: RegExp): this {\n\t\treturn this.addConstraint(stringRegex(regex) as IConstraint<T>);\n\t}\n\n\tpublic get date() {\n\t\treturn this.addConstraint(stringDate() as IConstraint<T>);\n\t}\n\n\tpublic get ipv4(): this {\n\t\treturn this.ip(4);\n\t}\n\n\tpublic get ipv6(): this {\n\t\treturn this.ip(6);\n\t}\n\n\tpublic ip(version?: 4 | 6): this {\n\t\treturn this.addConstraint(stringIp(version) as IConstraint<T>);\n\t}\n\n\tpublic phone(): this {\n\t\treturn this.addConstraint(stringPhone() as IConstraint<T>);\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn typeof value === 'string' //\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ValidationError('s.string', 'Expected a string primitive', value));\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class TupleValidator<T extends any[]> extends BaseValidator<[...T]> {\n\tprivate readonly validators: BaseValidator<[...T]>[] = [];\n\n\tpublic constructor(validators: BaseValidator<[...T]>[], constraints: readonly IConstraint<[...T]>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validators = validators;\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validators, this.constraints]);\n\t}\n\n\tprotected handle(values: unknown): Result<[...T], ValidationError | CombinedPropertyError> {\n\t\tif (!Array.isArray(values)) {\n\t\t\treturn Result.err(new ValidationError('s.tuple(T)', 'Expected an array', values));\n\t\t}\n\n\t\tif (values.length !== this.validators.length) {\n\t\t\treturn Result.err(new ValidationError('s.tuple(T)', `Expected an array of length ${this.validators.length}`, values));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(values as [...T]);\n\t\t}\n\n\t\tconst errors: [number, BaseError][] = [];\n\t\tconst transformed: T = [] as unknown as T;\n\n\t\tfor (let i = 0; i < values.length; i++) {\n\t\t\tconst result = this.validators[i].run(values[i]);\n\t\t\tif (result.isOk()) transformed.push(result.value);\n\t\t\telse errors.push([i, result.error!]);\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(transformed)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class MapValidator<K, V> extends BaseValidator<Map<K, V>> {\n\tprivate readonly keyValidator: BaseValidator<K>;\n\tprivate readonly valueValidator: BaseValidator<V>;\n\n\tpublic constructor(keyValidator: BaseValidator<K>, valueValidator: BaseValidator<V>, constraints: readonly IConstraint<Map<K, V>>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.keyValidator = keyValidator;\n\t\tthis.valueValidator = valueValidator;\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.keyValidator, this.valueValidator, this.constraints]);\n\t}\n\n\tprotected handle(value: unknown): Result<Map<K, V>, ValidationError | CombinedPropertyError> {\n\t\tif (!(value instanceof Map)) {\n\t\t\treturn Result.err(new ValidationError('s.map(K, V)', 'Expected a map', value));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(value);\n\t\t}\n\n\t\tconst errors: [string, BaseError][] = [];\n\t\tconst transformed = new Map<K, V>();\n\n\t\tfor (const [key, val] of value.entries()) {\n\t\t\tconst keyResult = this.keyValidator.run(key);\n\t\t\tconst valueResult = this.valueValidator.run(val);\n\t\t\tconst { length } = errors;\n\t\t\tif (keyResult.isErr()) errors.push([key, keyResult.error]);\n\t\t\tif (valueResult.isErr()) errors.push([key, valueResult.error]);\n\t\t\tif (errors.length === length) transformed.set(keyResult.value!, valueResult.value!);\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(transformed)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n}\n","import type { Result } from '../lib/Result';\nimport type { IConstraint, Unwrap } from '../type-exports';\nimport { BaseValidator, type ValidatorError } from './imports';\n\nexport class LazyValidator<T extends BaseValidator<unknown>, R = Unwrap<T>> extends BaseValidator<R> {\n\tprivate readonly validator: (value: unknown) => T;\n\n\tpublic constructor(validator: (value: unknown) => T, constraints: readonly IConstraint<R>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validator = validator;\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validator, this.constraints]);\n\t}\n\n\tprotected handle(values: unknown): Result<R, ValidatorError> {\n\t\treturn this.validator(values).run(values) as Result<R, ValidatorError>;\n\t}\n}\n","import type { InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class UnknownEnumValueError extends BaseError {\n\tpublic readonly value: string | number;\n\tpublic readonly enumKeys: string[];\n\tpublic readonly enumMappings: Map<string | number, string | number>;\n\n\tpublic constructor(value: string | number, keys: string[], enumMappings: Map<string | number, string | number>) {\n\t\tsuper('Expected the value to be one of the following enum values:');\n\n\t\tthis.value = value;\n\t\tthis.enumKeys = keys;\n\t\tthis.enumMappings = enumMappings;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tvalue: this.value,\n\t\t\tenumKeys: this.enumKeys,\n\t\t\tenumMappings: [...this.enumMappings.entries()]\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst value = options.stylize(this.value.toString(), 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[UnknownEnumValueError: ${value}]`, 'special');\n\t\t}\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\t\tconst pairs = this.enumKeys\n\t\t\t.map((key) => {\n\t\t\t\tconst enumValue = this.enumMappings.get(key)!;\n\t\t\t\treturn `${options.stylize(key, 'string')} or ${options.stylize(\n\t\t\t\t\tenumValue.toString(),\n\t\t\t\t\ttypeof enumValue === 'number' ? 'number' : 'string'\n\t\t\t\t)}`;\n\t\t\t})\n\t\t\t.join(padding);\n\n\t\tconst header = `${options.stylize('UnknownEnumValueError', 'special')} > ${value}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst pairsBlock = `${padding}${pairs}`;\n\t\treturn `${header}\\n ${message}\\n${pairsBlock}`;\n\t}\n}\n","import { UnknownEnumValueError } from '../lib/errors/UnknownEnumValueError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class NativeEnumValidator<T extends NativeEnumLike> extends BaseValidator<T[keyof T]> {\n\tpublic readonly enumShape: T;\n\tpublic readonly hasNumericElements: boolean = false;\n\tprivate readonly enumKeys: string[];\n\tprivate readonly enumMapping = new Map<string | number, T[keyof T]>();\n\n\tpublic constructor(enumShape: T) {\n\t\tsuper();\n\t\tthis.enumShape = enumShape;\n\n\t\tthis.enumKeys = Object.keys(enumShape).filter((key) => {\n\t\t\treturn typeof enumShape[enumShape[key]] !== 'number';\n\t\t});\n\n\t\tfor (const key of this.enumKeys) {\n\t\t\tconst enumValue = enumShape[key] as T[keyof T];\n\n\t\t\tthis.enumMapping.set(key, enumValue);\n\t\t\tthis.enumMapping.set(enumValue, enumValue);\n\n\t\t\tif (typeof enumValue === 'number') {\n\t\t\t\tthis.hasNumericElements = true;\n\t\t\t\tthis.enumMapping.set(`${enumValue}`, enumValue);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected override handle(value: unknown): Result<T[keyof T], ValidationError | UnknownEnumValueError> {\n\t\tconst typeOfValue = typeof value;\n\n\t\tif (typeOfValue === 'number') {\n\t\t\tif (!this.hasNumericElements) {\n\t\t\t\treturn Result.err(new ValidationError('s.nativeEnum(T)', 'Expected the value to be a string', value));\n\t\t\t}\n\t\t} else if (typeOfValue !== 'string') {\n\t\t\t// typeOfValue !== 'number' is implied here\n\t\t\treturn Result.err(new ValidationError('s.nativeEnum(T)', 'Expected the value to be a string or number', value));\n\t\t}\n\n\t\tconst casted = value as string | number;\n\n\t\tconst possibleEnumValue = this.enumMapping.get(casted);\n\n\t\treturn typeof possibleEnumValue === 'undefined'\n\t\t\t? Result.err(new UnknownEnumValueError(casted, this.enumKeys, this.enumMapping))\n\t\t\t: Result.ok(possibleEnumValue);\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.enumShape]);\n\t}\n}\n\nexport interface NativeEnumLike {\n\t[key: string]: string | number;\n\t[key: number]: string;\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\nimport type { TypedArray } from './util/typedArray';\n\nexport type TypedArrayConstraintName = `s.typedArray(T).${'byteLength' | 'length'}${\n\t| 'LessThan'\n\t| 'LessThanOrEqual'\n\t| 'GreaterThan'\n\t| 'GreaterThanOrEqual'\n\t| 'Equal'\n\t| 'NotEqual'\n\t| 'Range'\n\t| 'RangeInclusive'\n\t| 'RangeExclusive'}`;\n\nfunction typedArrayByteLengthComparator<T extends TypedArray>(\n\tcomparator: Comparator,\n\tname: TypedArrayConstraintName,\n\texpected: string,\n\tlength: number\n): IConstraint<T> {\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn comparator(input.byteLength, length) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid Typed Array byte length', input, expected));\n\t\t}\n\t};\n}\n\nexport function typedArrayByteLengthLessThan<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength < ${value}`;\n\treturn typedArrayByteLengthComparator(lessThan, 's.typedArray(T).byteLengthLessThan', expected, value);\n}\n\nexport function typedArrayByteLengthLessThanOrEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength <= ${value}`;\n\treturn typedArrayByteLengthComparator(lessThanOrEqual, 's.typedArray(T).byteLengthLessThanOrEqual', expected, value);\n}\n\nexport function typedArrayByteLengthGreaterThan<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength > ${value}`;\n\treturn typedArrayByteLengthComparator(greaterThan, 's.typedArray(T).byteLengthGreaterThan', expected, value);\n}\n\nexport function typedArrayByteLengthGreaterThanOrEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength >= ${value}`;\n\treturn typedArrayByteLengthComparator(greaterThanOrEqual, 's.typedArray(T).byteLengthGreaterThanOrEqual', expected, value);\n}\n\nexport function typedArrayByteLengthEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength === ${value}`;\n\treturn typedArrayByteLengthComparator(equal, 's.typedArray(T).byteLengthEqual', expected, value);\n}\n\nexport function typedArrayByteLengthNotEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength !== ${value}`;\n\treturn typedArrayByteLengthComparator(notEqual, 's.typedArray(T).byteLengthNotEqual', expected, value);\n}\n\nexport function typedArrayByteLengthRange<T extends TypedArray>(start: number, endBefore: number): IConstraint<T> {\n\tconst expected = `expected.byteLength >= ${start} && expected.byteLength < ${endBefore}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.byteLength >= start && input.byteLength < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.typedArray(T).byteLengthRange', 'Invalid Typed Array byte length', input, expected));\n\t\t}\n\t};\n}\n\nexport function typedArrayByteLengthRangeInclusive<T extends TypedArray>(start: number, end: number) {\n\tconst expected = `expected.byteLength >= ${start} && expected.byteLength <= ${end}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.byteLength >= start && input.byteLength <= end //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(\n\t\t\t\t\t\tnew ExpectedConstraintError('s.typedArray(T).byteLengthRangeInclusive', 'Invalid Typed Array byte length', input, expected)\n\t\t\t\t );\n\t\t}\n\t};\n}\n\nexport function typedArrayByteLengthRangeExclusive<T extends TypedArray>(startAfter: number, endBefore: number): IConstraint<T> {\n\tconst expected = `expected.byteLength > ${startAfter} && expected.byteLength < ${endBefore}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.byteLength > startAfter && input.byteLength < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(\n\t\t\t\t\t\tnew ExpectedConstraintError('s.typedArray(T).byteLengthRangeExclusive', 'Invalid Typed Array byte length', input, expected)\n\t\t\t\t );\n\t\t}\n\t};\n}\n\nfunction typedArrayLengthComparator<T extends TypedArray>(\n\tcomparator: Comparator,\n\tname: TypedArrayConstraintName,\n\texpected: string,\n\tlength: number\n): IConstraint<T> {\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn comparator(input.length, length) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid Typed Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function typedArrayLengthLessThan<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length < ${value}`;\n\treturn typedArrayLengthComparator(lessThan, 's.typedArray(T).lengthLessThan', expected, value);\n}\n\nexport function typedArrayLengthLessThanOrEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length <= ${value}`;\n\treturn typedArrayLengthComparator(lessThanOrEqual, 's.typedArray(T).lengthLessThanOrEqual', expected, value);\n}\n\nexport function typedArrayLengthGreaterThan<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length > ${value}`;\n\treturn typedArrayLengthComparator(greaterThan, 's.typedArray(T).lengthGreaterThan', expected, value);\n}\n\nexport function typedArrayLengthGreaterThanOrEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length >= ${value}`;\n\treturn typedArrayLengthComparator(greaterThanOrEqual, 's.typedArray(T).lengthGreaterThanOrEqual', expected, value);\n}\n\nexport function typedArrayLengthEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length === ${value}`;\n\treturn typedArrayLengthComparator(equal, 's.typedArray(T).lengthEqual', expected, value);\n}\n\nexport function typedArrayLengthNotEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length !== ${value}`;\n\treturn typedArrayLengthComparator(notEqual, 's.typedArray(T).lengthNotEqual', expected, value);\n}\n\nexport function typedArrayLengthRange<T extends TypedArray>(start: number, endBefore: number): IConstraint<T> {\n\tconst expected = `expected.length >= ${start} && expected.length < ${endBefore}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.length >= start && input.length < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.typedArray(T).lengthRange', 'Invalid Typed Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function typedArrayLengthRangeInclusive<T extends TypedArray>(start: number, end: number): IConstraint<T> {\n\tconst expected = `expected.length >= ${start} && expected.length <= ${end}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.length >= start && input.length <= end //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.typedArray(T).lengthRangeInclusive', 'Invalid Typed Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function typedArrayLengthRangeExclusive<T extends TypedArray>(startAfter: number, endBefore: number): IConstraint<T> {\n\tconst expected = `expected.length > ${startAfter} && expected.length < ${endBefore}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.length > startAfter && input.length < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.typedArray(T).lengthRangeExclusive', 'Invalid Typed Array length', input, expected));\n\t\t}\n\t};\n}\n","const vowels = ['a', 'e', 'i', 'o', 'u'];\n\nexport const aOrAn = (word: string) => {\n\treturn `${vowels.includes(word[0].toLowerCase()) ? 'an' : 'a'} ${word}`;\n};\n","export type TypedArray =\n\t| Int8Array\n\t| Uint8Array\n\t| Uint8ClampedArray\n\t| Int16Array\n\t| Uint16Array\n\t| Int32Array\n\t| Uint32Array\n\t| Float32Array\n\t| Float64Array\n\t| BigInt64Array\n\t| BigUint64Array;\n\nexport const TypedArrays = {\n\tInt8Array: (x: unknown): x is Int8Array => x instanceof Int8Array,\n\tUint8Array: (x: unknown): x is Uint8Array => x instanceof Uint8Array,\n\tUint8ClampedArray: (x: unknown): x is Uint8ClampedArray => x instanceof Uint8ClampedArray,\n\tInt16Array: (x: unknown): x is Int16Array => x instanceof Int16Array,\n\tUint16Array: (x: unknown): x is Uint16Array => x instanceof Uint16Array,\n\tInt32Array: (x: unknown): x is Int32Array => x instanceof Int32Array,\n\tUint32Array: (x: unknown): x is Uint32Array => x instanceof Uint32Array,\n\tFloat32Array: (x: unknown): x is Float32Array => x instanceof Float32Array,\n\tFloat64Array: (x: unknown): x is Float64Array => x instanceof Float64Array,\n\tBigInt64Array: (x: unknown): x is BigInt64Array => x instanceof BigInt64Array,\n\tBigUint64Array: (x: unknown): x is BigUint64Array => x instanceof BigUint64Array,\n\tTypedArray: (x: unknown): x is TypedArray => ArrayBuffer.isView(x) && !(x instanceof DataView)\n} as const;\n\nexport type TypedArrayName = keyof typeof TypedArrays;\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport {\n\ttypedArrayByteLengthEqual,\n\ttypedArrayByteLengthGreaterThan,\n\ttypedArrayByteLengthGreaterThanOrEqual,\n\ttypedArrayByteLengthLessThan,\n\ttypedArrayByteLengthLessThanOrEqual,\n\ttypedArrayByteLengthNotEqual,\n\ttypedArrayByteLengthRange,\n\ttypedArrayByteLengthRangeExclusive,\n\ttypedArrayByteLengthRangeInclusive,\n\ttypedArrayLengthEqual,\n\ttypedArrayLengthGreaterThan,\n\ttypedArrayLengthGreaterThanOrEqual,\n\ttypedArrayLengthLessThan,\n\ttypedArrayLengthLessThanOrEqual,\n\ttypedArrayLengthNotEqual,\n\ttypedArrayLengthRange,\n\ttypedArrayLengthRangeExclusive,\n\ttypedArrayLengthRangeInclusive\n} from '../constraints/TypedArrayLengthConstraints';\nimport { aOrAn } from '../constraints/util/common/vowels';\nimport { TypedArrays, type TypedArray, type TypedArrayName } from '../constraints/util/typedArray';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class TypedArrayValidator<T extends TypedArray> extends BaseValidator<T> {\n\tprivate readonly type: TypedArrayName;\n\n\tpublic constructor(type: TypedArrayName, constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.type = type;\n\t}\n\n\tpublic byteLengthLessThan(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthLessThan(length));\n\t}\n\n\tpublic byteLengthLessThanOrEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthLessThanOrEqual(length));\n\t}\n\n\tpublic byteLengthGreaterThan(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthGreaterThan(length));\n\t}\n\n\tpublic byteLengthGreaterThanOrEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthGreaterThanOrEqual(length));\n\t}\n\n\tpublic byteLengthEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthEqual(length));\n\t}\n\n\tpublic byteLengthNotEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthNotEqual(length));\n\t}\n\n\tpublic byteLengthRange(start: number, endBefore: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthRange(start, endBefore));\n\t}\n\n\tpublic byteLengthRangeInclusive(startAt: number, endAt: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthRangeInclusive(startAt, endAt) as IConstraint<T>);\n\t}\n\n\tpublic byteLengthRangeExclusive(startAfter: number, endBefore: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthRangeExclusive(startAfter, endBefore));\n\t}\n\n\tpublic lengthLessThan(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthLessThan(length));\n\t}\n\n\tpublic lengthLessThanOrEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthLessThanOrEqual(length));\n\t}\n\n\tpublic lengthGreaterThan(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthGreaterThan(length));\n\t}\n\n\tpublic lengthGreaterThanOrEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthGreaterThanOrEqual(length));\n\t}\n\n\tpublic lengthEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthEqual(length));\n\t}\n\n\tpublic lengthNotEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthNotEqual(length));\n\t}\n\n\tpublic lengthRange(start: number, endBefore: number) {\n\t\treturn this.addConstraint(typedArrayLengthRange(start, endBefore));\n\t}\n\n\tpublic lengthRangeInclusive(startAt: number, endAt: number) {\n\t\treturn this.addConstraint(typedArrayLengthRangeInclusive(startAt, endAt));\n\t}\n\n\tpublic lengthRangeExclusive(startAfter: number, endBefore: number) {\n\t\treturn this.addConstraint(typedArrayLengthRangeExclusive(startAfter, endBefore));\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.type, this.constraints]);\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn TypedArrays[this.type](value)\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ValidationError('s.typedArray', `Expected ${aOrAn(this.type)}`, value));\n\t}\n}\n","import type { TypedArray, TypedArrayName } from '../constraints/util/typedArray';\nimport type { Unwrap, UnwrapTuple } from '../lib/util-types';\nimport {\n\tArrayValidator,\n\tBaseValidator,\n\tBigIntValidator,\n\tBooleanValidator,\n\tDateValidator,\n\tInstanceValidator,\n\tLiteralValidator,\n\tMapValidator,\n\tNeverValidator,\n\tNullishValidator,\n\tNumberValidator,\n\tObjectValidator,\n\tPassthroughValidator,\n\tRecordValidator,\n\tSetValidator,\n\tStringValidator,\n\tTupleValidator,\n\tUnionValidator\n} from '../validators/imports';\nimport { LazyValidator } from '../validators/LazyValidator';\nimport { NativeEnumValidator, type NativeEnumLike } from '../validators/NativeEnumValidator';\nimport { TypedArrayValidator } from '../validators/TypedArrayValidator';\nimport type { Constructor, MappedObjectValidator } from './util-types';\n\nexport class Shapes {\n\tpublic get string() {\n\t\treturn new StringValidator();\n\t}\n\n\tpublic get number() {\n\t\treturn new NumberValidator();\n\t}\n\n\tpublic get bigint() {\n\t\treturn new BigIntValidator();\n\t}\n\n\tpublic get boolean() {\n\t\treturn new BooleanValidator();\n\t}\n\n\tpublic get date() {\n\t\treturn new DateValidator();\n\t}\n\n\tpublic object<T extends object>(shape: MappedObjectValidator<T>) {\n\t\treturn new ObjectValidator<T>(shape);\n\t}\n\n\tpublic get undefined() {\n\t\treturn this.literal(undefined);\n\t}\n\n\tpublic get null() {\n\t\treturn this.literal(null);\n\t}\n\n\tpublic get nullish() {\n\t\treturn new NullishValidator();\n\t}\n\n\tpublic get any() {\n\t\treturn new PassthroughValidator<any>();\n\t}\n\n\tpublic get unknown() {\n\t\treturn new PassthroughValidator<unknown>();\n\t}\n\n\tpublic get never() {\n\t\treturn new NeverValidator();\n\t}\n\n\tpublic enum<T>(...values: readonly T[]) {\n\t\treturn this.union(...values.map((value) => this.literal(value)));\n\t}\n\n\tpublic nativeEnum<T extends NativeEnumLike>(enumShape: T): NativeEnumValidator<T> {\n\t\treturn new NativeEnumValidator(enumShape);\n\t}\n\n\tpublic literal<T>(value: T): BaseValidator<T> {\n\t\tif (value instanceof Date) return this.date.equal(value) as unknown as BaseValidator<T>;\n\t\treturn new LiteralValidator(value);\n\t}\n\n\tpublic instance<T>(expected: Constructor<T>): InstanceValidator<T> {\n\t\treturn new InstanceValidator(expected);\n\t}\n\n\tpublic union<T extends [...BaseValidator<any>[]]>(...validators: [...T]): UnionValidator<Unwrap<T[number]>> {\n\t\treturn new UnionValidator(validators);\n\t}\n\n\tpublic array<T>(validator: BaseValidator<T[][number]>): ArrayValidator<T[], T[][number]>;\n\tpublic array<T extends unknown[]>(validator: BaseValidator<T[number]>): ArrayValidator<T, T[number]>;\n\tpublic array<T extends unknown[]>(validator: BaseValidator<T[number]>) {\n\t\treturn new ArrayValidator(validator);\n\t}\n\n\tpublic typedArray<T extends TypedArray>(type: TypedArrayName = 'TypedArray') {\n\t\treturn new TypedArrayValidator<T>(type);\n\t}\n\n\tpublic get int8Array() {\n\t\treturn this.typedArray<Int8Array>('Int8Array');\n\t}\n\n\tpublic get uint8Array() {\n\t\treturn this.typedArray<Uint8Array>('Uint8Array');\n\t}\n\n\tpublic get uint8ClampedArray() {\n\t\treturn this.typedArray<Uint8ClampedArray>('Uint8ClampedArray');\n\t}\n\n\tpublic get int16Array() {\n\t\treturn this.typedArray<Int16Array>('Int16Array');\n\t}\n\n\tpublic get uint16Array() {\n\t\treturn this.typedArray<Uint16Array>('Uint16Array');\n\t}\n\n\tpublic get int32Array() {\n\t\treturn this.typedArray<Int32Array>('Int32Array');\n\t}\n\n\tpublic get uint32Array() {\n\t\treturn this.typedArray<Uint32Array>('Uint32Array');\n\t}\n\n\tpublic get float32Array() {\n\t\treturn this.typedArray<Float32Array>('Float32Array');\n\t}\n\n\tpublic get float64Array() {\n\t\treturn this.typedArray<Float64Array>('Float64Array');\n\t}\n\n\tpublic get bigInt64Array() {\n\t\treturn this.typedArray<BigInt64Array>('BigInt64Array');\n\t}\n\n\tpublic get bigUint64Array() {\n\t\treturn this.typedArray<BigUint64Array>('BigUint64Array');\n\t}\n\n\tpublic tuple<T extends [...BaseValidator<any>[]]>(validators: [...T]): TupleValidator<UnwrapTuple<T>> {\n\t\treturn new TupleValidator(validators);\n\t}\n\n\tpublic set<T>(validator: BaseValidator<T>) {\n\t\treturn new SetValidator(validator);\n\t}\n\n\tpublic record<T>(validator: BaseValidator<T>) {\n\t\treturn new RecordValidator(validator);\n\t}\n\n\tpublic map<T, U>(keyValidator: BaseValidator<T>, valueValidator: BaseValidator<U>) {\n\t\treturn new MapValidator(keyValidator, valueValidator);\n\t}\n\n\tpublic lazy<T extends BaseValidator<unknown>>(validator: (value: unknown) => T) {\n\t\treturn new LazyValidator(validator);\n\t}\n}\n","import { Shapes } from './lib/Shapes';\n\nexport const s = new Shapes();\n\nexport * from './lib/Result';\nexport * from './lib/configs';\nexport * from './lib/errors/BaseError';\nexport * from './lib/errors/CombinedError';\nexport * from './lib/errors/CombinedPropertyError';\nexport * from './lib/errors/ExpectedConstraintError';\nexport * from './lib/errors/ExpectedValidationError';\nexport * from './lib/errors/MissingPropertyError';\nexport * from './lib/errors/MultiplePossibilitiesConstraintError';\nexport * from './lib/errors/UnknownEnumValueError';\nexport * from './lib/errors/UnknownPropertyError';\nexport * from './lib/errors/ValidationError';\nexport * from './type-exports';\n"]} \ No newline at end of file
diff --git a/node_modules/@sapphire/shapeshift/dist/index.mjs b/node_modules/@sapphire/shapeshift/dist/index.mjs
new file mode 100644
index 0000000..fb53e6e
--- /dev/null
+++ b/node_modules/@sapphire/shapeshift/dist/index.mjs
@@ -0,0 +1,2219 @@
+import get from 'lodash/get.js';
+import { inspect } from 'util';
+import fastDeepEqual from 'fast-deep-equal/es6/index.js';
+import uniqWith from 'lodash/uniqWith.js';
+
+var __defProp = Object.defineProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+
+// src/lib/configs.ts
+var validationEnabled = true;
+function setGlobalValidationEnabled(enabled) {
+ validationEnabled = enabled;
+}
+__name(setGlobalValidationEnabled, "setGlobalValidationEnabled");
+function getGlobalValidationEnabled() {
+ return validationEnabled;
+}
+__name(getGlobalValidationEnabled, "getGlobalValidationEnabled");
+
+// src/lib/Result.ts
+var Result = class {
+ constructor(success, value, error) {
+ this.success = success;
+ if (success) {
+ this.value = value;
+ } else {
+ this.error = error;
+ }
+ }
+ isOk() {
+ return this.success;
+ }
+ isErr() {
+ return !this.success;
+ }
+ unwrap() {
+ if (this.isOk())
+ return this.value;
+ throw this.error;
+ }
+ static ok(value) {
+ return new Result(true, value);
+ }
+ static err(error) {
+ return new Result(false, void 0, error);
+ }
+};
+__name(Result, "Result");
+
+// src/validators/util/getValue.ts
+function getValue(valueOrFn) {
+ return typeof valueOrFn === "function" ? valueOrFn() : valueOrFn;
+}
+__name(getValue, "getValue");
+
+// src/lib/errors/BaseError.ts
+var customInspectSymbol = Symbol.for("nodejs.util.inspect.custom");
+var customInspectSymbolStackLess = Symbol.for("nodejs.util.inspect.custom.stack-less");
+var BaseError = class extends Error {
+ [customInspectSymbol](depth, options) {
+ return `${this[customInspectSymbolStackLess](depth, options)}
+${this.stack.slice(this.stack.indexOf("\n"))}`;
+ }
+};
+__name(BaseError, "BaseError");
+
+// src/lib/errors/BaseConstraintError.ts
+var BaseConstraintError = class extends BaseError {
+ constructor(constraint, message, given) {
+ super(message);
+ this.constraint = constraint;
+ this.given = given;
+ }
+};
+__name(BaseConstraintError, "BaseConstraintError");
+
+// src/lib/errors/ExpectedConstraintError.ts
+var ExpectedConstraintError = class extends BaseConstraintError {
+ constructor(constraint, message, given, expected) {
+ super(constraint, message, given);
+ this.expected = expected;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ constraint: this.constraint,
+ given: this.given,
+ expected: this.expected
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const constraint = options.stylize(this.constraint, "string");
+ if (depth < 0) {
+ return options.stylize(`[ExpectedConstraintError: ${constraint}]`, "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1 };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const given = inspect(this.given, newOptions).replace(/\n/g, padding);
+ const header = `${options.stylize("ExpectedConstraintError", "special")} > ${constraint}`;
+ const message = options.stylize(this.message, "regexp");
+ const expectedBlock = `
+ ${options.stylize("Expected: ", "string")}${options.stylize(this.expected, "boolean")}`;
+ const givenBlock = `
+ ${options.stylize("Received:", "regexp")}${padding}${given}`;
+ return `${header}
+ ${message}
+${expectedBlock}
+${givenBlock}`;
+ }
+};
+__name(ExpectedConstraintError, "ExpectedConstraintError");
+
+// src/constraints/ObjectConstrains.ts
+function whenConstraint(key, options, validator) {
+ return {
+ run(input, parent) {
+ if (!parent) {
+ return Result.err(new ExpectedConstraintError("s.object(T.when)", "Validator has no parent", parent, "Validator to have a parent"));
+ }
+ const isKeyArray = Array.isArray(key);
+ const value = isKeyArray ? key.map((k) => get(parent, k)) : get(parent, key);
+ const predicate = resolveBooleanIs(options, value, isKeyArray) ? options.then : options.otherwise;
+ if (predicate) {
+ return predicate(validator).run(input);
+ }
+ return Result.ok(input);
+ }
+ };
+}
+__name(whenConstraint, "whenConstraint");
+function resolveBooleanIs(options, value, isKeyArray) {
+ if (options.is === void 0) {
+ return isKeyArray ? !value.some((val) => !val) : Boolean(value);
+ }
+ if (typeof options.is === "function") {
+ return options.is(value);
+ }
+ return value === options.is;
+}
+__name(resolveBooleanIs, "resolveBooleanIs");
+
+// src/validators/BaseValidator.ts
+var BaseValidator = class {
+ constructor(constraints = []) {
+ this.constraints = [];
+ this.isValidationEnabled = null;
+ this.constraints = constraints;
+ }
+ setParent(parent) {
+ this.parent = parent;
+ return this;
+ }
+ get optional() {
+ return new UnionValidator([new LiteralValidator(void 0), this.clone()]);
+ }
+ get nullable() {
+ return new UnionValidator([new LiteralValidator(null), this.clone()]);
+ }
+ get nullish() {
+ return new UnionValidator([new NullishValidator(), this.clone()]);
+ }
+ get array() {
+ return new ArrayValidator(this.clone());
+ }
+ get set() {
+ return new SetValidator(this.clone());
+ }
+ or(...predicates) {
+ return new UnionValidator([this.clone(), ...predicates]);
+ }
+ transform(cb) {
+ return this.addConstraint({ run: (input) => Result.ok(cb(input)) });
+ }
+ reshape(cb) {
+ return this.addConstraint({ run: cb });
+ }
+ default(value) {
+ return new DefaultValidator(this.clone(), value);
+ }
+ when(key, options) {
+ return this.addConstraint(whenConstraint(key, options, this));
+ }
+ describe(description) {
+ const clone = this.clone();
+ clone.description = description;
+ return clone;
+ }
+ run(value) {
+ let result = this.handle(value);
+ if (result.isErr())
+ return result;
+ for (const constraint of this.constraints) {
+ result = constraint.run(result.value, this.parent);
+ if (result.isErr())
+ break;
+ }
+ return result;
+ }
+ parse(value) {
+ if (!this.shouldRunConstraints) {
+ return this.handle(value).unwrap();
+ }
+ return this.constraints.reduce((v, constraint) => constraint.run(v).unwrap(), this.handle(value).unwrap());
+ }
+ is(value) {
+ return this.run(value).isOk();
+ }
+ /**
+ * Sets if the validator should also run constraints or just do basic checks.
+ * @param isValidationEnabled Whether this validator should be enabled or disabled. You can pass boolean or a function returning boolean which will be called just before parsing.
+ * Set to `null` to go off of the global configuration.
+ */
+ setValidationEnabled(isValidationEnabled) {
+ const clone = this.clone();
+ clone.isValidationEnabled = isValidationEnabled;
+ return clone;
+ }
+ getValidationEnabled() {
+ return getValue(this.isValidationEnabled);
+ }
+ get shouldRunConstraints() {
+ return getValue(this.isValidationEnabled) ?? getGlobalValidationEnabled();
+ }
+ clone() {
+ const clone = Reflect.construct(this.constructor, [this.constraints]);
+ clone.isValidationEnabled = this.isValidationEnabled;
+ return clone;
+ }
+ addConstraint(constraint) {
+ const clone = this.clone();
+ clone.constraints = clone.constraints.concat(constraint);
+ return clone;
+ }
+};
+__name(BaseValidator, "BaseValidator");
+function isUnique(input) {
+ if (input.length < 2)
+ return true;
+ const uniqueArray2 = uniqWith(input, fastDeepEqual);
+ return uniqueArray2.length === input.length;
+}
+__name(isUnique, "isUnique");
+
+// src/constraints/util/operators.ts
+function lessThan(a, b) {
+ return a < b;
+}
+__name(lessThan, "lessThan");
+function lessThanOrEqual(a, b) {
+ return a <= b;
+}
+__name(lessThanOrEqual, "lessThanOrEqual");
+function greaterThan(a, b) {
+ return a > b;
+}
+__name(greaterThan, "greaterThan");
+function greaterThanOrEqual(a, b) {
+ return a >= b;
+}
+__name(greaterThanOrEqual, "greaterThanOrEqual");
+function equal(a, b) {
+ return a === b;
+}
+__name(equal, "equal");
+function notEqual(a, b) {
+ return a !== b;
+}
+__name(notEqual, "notEqual");
+
+// src/constraints/ArrayConstraints.ts
+function arrayLengthComparator(comparator, name, expected, length) {
+ return {
+ run(input) {
+ return comparator(input.length, length) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid Array length", input, expected));
+ }
+ };
+}
+__name(arrayLengthComparator, "arrayLengthComparator");
+function arrayLengthLessThan(value) {
+ const expected = `expected.length < ${value}`;
+ return arrayLengthComparator(lessThan, "s.array(T).lengthLessThan", expected, value);
+}
+__name(arrayLengthLessThan, "arrayLengthLessThan");
+function arrayLengthLessThanOrEqual(value) {
+ const expected = `expected.length <= ${value}`;
+ return arrayLengthComparator(lessThanOrEqual, "s.array(T).lengthLessThanOrEqual", expected, value);
+}
+__name(arrayLengthLessThanOrEqual, "arrayLengthLessThanOrEqual");
+function arrayLengthGreaterThan(value) {
+ const expected = `expected.length > ${value}`;
+ return arrayLengthComparator(greaterThan, "s.array(T).lengthGreaterThan", expected, value);
+}
+__name(arrayLengthGreaterThan, "arrayLengthGreaterThan");
+function arrayLengthGreaterThanOrEqual(value) {
+ const expected = `expected.length >= ${value}`;
+ return arrayLengthComparator(greaterThanOrEqual, "s.array(T).lengthGreaterThanOrEqual", expected, value);
+}
+__name(arrayLengthGreaterThanOrEqual, "arrayLengthGreaterThanOrEqual");
+function arrayLengthEqual(value) {
+ const expected = `expected.length === ${value}`;
+ return arrayLengthComparator(equal, "s.array(T).lengthEqual", expected, value);
+}
+__name(arrayLengthEqual, "arrayLengthEqual");
+function arrayLengthNotEqual(value) {
+ const expected = `expected.length !== ${value}`;
+ return arrayLengthComparator(notEqual, "s.array(T).lengthNotEqual", expected, value);
+}
+__name(arrayLengthNotEqual, "arrayLengthNotEqual");
+function arrayLengthRange(start, endBefore) {
+ const expected = `expected.length >= ${start} && expected.length < ${endBefore}`;
+ return {
+ run(input) {
+ return input.length >= start && input.length < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.array(T).lengthRange", "Invalid Array length", input, expected));
+ }
+ };
+}
+__name(arrayLengthRange, "arrayLengthRange");
+function arrayLengthRangeInclusive(start, end) {
+ const expected = `expected.length >= ${start} && expected.length <= ${end}`;
+ return {
+ run(input) {
+ return input.length >= start && input.length <= end ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.array(T).lengthRangeInclusive", "Invalid Array length", input, expected));
+ }
+ };
+}
+__name(arrayLengthRangeInclusive, "arrayLengthRangeInclusive");
+function arrayLengthRangeExclusive(startAfter, endBefore) {
+ const expected = `expected.length > ${startAfter} && expected.length < ${endBefore}`;
+ return {
+ run(input) {
+ return input.length > startAfter && input.length < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.array(T).lengthRangeExclusive", "Invalid Array length", input, expected));
+ }
+ };
+}
+__name(arrayLengthRangeExclusive, "arrayLengthRangeExclusive");
+var uniqueArray = {
+ run(input) {
+ return isUnique(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.array(T).unique", "Array values are not unique", input, "Expected all values to be unique"));
+ }
+};
+
+// src/lib/errors/CombinedPropertyError.ts
+var CombinedPropertyError = class extends BaseError {
+ constructor(errors) {
+ super("Received one or more errors");
+ this.errors = errors;
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ if (depth < 0) {
+ return options.stylize("[CombinedPropertyError]", "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1, compact: true };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const header = `${options.stylize("CombinedPropertyError", "special")} (${options.stylize(this.errors.length.toString(), "number")})`;
+ const message = options.stylize(this.message, "regexp");
+ const errors = this.errors.map(([key, error]) => {
+ const property = CombinedPropertyError.formatProperty(key, options);
+ const body = error[customInspectSymbolStackLess](depth - 1, newOptions).replace(/\n/g, padding);
+ return ` input${property}${padding}${body}`;
+ }).join("\n\n");
+ return `${header}
+ ${message}
+
+${errors}`;
+ }
+ static formatProperty(key, options) {
+ if (typeof key === "string")
+ return options.stylize(`.${key}`, "symbol");
+ if (typeof key === "number")
+ return `[${options.stylize(key.toString(), "number")}]`;
+ return `[${options.stylize("Symbol", "symbol")}(${key.description})]`;
+ }
+};
+__name(CombinedPropertyError, "CombinedPropertyError");
+var ValidationError = class extends BaseError {
+ constructor(validator, message, given) {
+ super(message);
+ this.validator = validator;
+ this.given = given;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ validator: this.validator,
+ given: this.given
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const validator = options.stylize(this.validator, "string");
+ if (depth < 0) {
+ return options.stylize(`[ValidationError: ${validator}]`, "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1, compact: true };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const given = inspect(this.given, newOptions).replace(/\n/g, padding);
+ const header = `${options.stylize("ValidationError", "special")} > ${validator}`;
+ const message = options.stylize(this.message, "regexp");
+ const givenBlock = `
+ ${options.stylize("Received:", "regexp")}${padding}${given}`;
+ return `${header}
+ ${message}
+${givenBlock}`;
+ }
+};
+__name(ValidationError, "ValidationError");
+
+// src/validators/ArrayValidator.ts
+var ArrayValidator = class extends BaseValidator {
+ constructor(validator, constraints = []) {
+ super(constraints);
+ this.validator = validator;
+ }
+ lengthLessThan(length) {
+ return this.addConstraint(arrayLengthLessThan(length));
+ }
+ lengthLessThanOrEqual(length) {
+ return this.addConstraint(arrayLengthLessThanOrEqual(length));
+ }
+ lengthGreaterThan(length) {
+ return this.addConstraint(arrayLengthGreaterThan(length));
+ }
+ lengthGreaterThanOrEqual(length) {
+ return this.addConstraint(arrayLengthGreaterThanOrEqual(length));
+ }
+ lengthEqual(length) {
+ return this.addConstraint(arrayLengthEqual(length));
+ }
+ lengthNotEqual(length) {
+ return this.addConstraint(arrayLengthNotEqual(length));
+ }
+ lengthRange(start, endBefore) {
+ return this.addConstraint(arrayLengthRange(start, endBefore));
+ }
+ lengthRangeInclusive(startAt, endAt) {
+ return this.addConstraint(arrayLengthRangeInclusive(startAt, endAt));
+ }
+ lengthRangeExclusive(startAfter, endBefore) {
+ return this.addConstraint(arrayLengthRangeExclusive(startAfter, endBefore));
+ }
+ get unique() {
+ return this.addConstraint(uniqueArray);
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validator, this.constraints]);
+ }
+ handle(values) {
+ if (!Array.isArray(values)) {
+ return Result.err(new ValidationError("s.array(T)", "Expected an array", values));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(values);
+ }
+ const errors = [];
+ const transformed = [];
+ for (let i = 0; i < values.length; i++) {
+ const result = this.validator.run(values[i]);
+ if (result.isOk())
+ transformed.push(result.value);
+ else
+ errors.push([i, result.error]);
+ }
+ return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedPropertyError(errors));
+ }
+};
+__name(ArrayValidator, "ArrayValidator");
+
+// src/constraints/BigIntConstraints.ts
+function bigintComparator(comparator, name, expected, number) {
+ return {
+ run(input) {
+ return comparator(input, number) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid bigint value", input, expected));
+ }
+ };
+}
+__name(bigintComparator, "bigintComparator");
+function bigintLessThan(value) {
+ const expected = `expected < ${value}n`;
+ return bigintComparator(lessThan, "s.bigint.lessThan", expected, value);
+}
+__name(bigintLessThan, "bigintLessThan");
+function bigintLessThanOrEqual(value) {
+ const expected = `expected <= ${value}n`;
+ return bigintComparator(lessThanOrEqual, "s.bigint.lessThanOrEqual", expected, value);
+}
+__name(bigintLessThanOrEqual, "bigintLessThanOrEqual");
+function bigintGreaterThan(value) {
+ const expected = `expected > ${value}n`;
+ return bigintComparator(greaterThan, "s.bigint.greaterThan", expected, value);
+}
+__name(bigintGreaterThan, "bigintGreaterThan");
+function bigintGreaterThanOrEqual(value) {
+ const expected = `expected >= ${value}n`;
+ return bigintComparator(greaterThanOrEqual, "s.bigint.greaterThanOrEqual", expected, value);
+}
+__name(bigintGreaterThanOrEqual, "bigintGreaterThanOrEqual");
+function bigintEqual(value) {
+ const expected = `expected === ${value}n`;
+ return bigintComparator(equal, "s.bigint.equal", expected, value);
+}
+__name(bigintEqual, "bigintEqual");
+function bigintNotEqual(value) {
+ const expected = `expected !== ${value}n`;
+ return bigintComparator(notEqual, "s.bigint.notEqual", expected, value);
+}
+__name(bigintNotEqual, "bigintNotEqual");
+function bigintDivisibleBy(divider) {
+ const expected = `expected % ${divider}n === 0n`;
+ return {
+ run(input) {
+ return input % divider === 0n ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.bigint.divisibleBy", "BigInt is not divisible", input, expected));
+ }
+ };
+}
+__name(bigintDivisibleBy, "bigintDivisibleBy");
+
+// src/validators/BigIntValidator.ts
+var BigIntValidator = class extends BaseValidator {
+ lessThan(number) {
+ return this.addConstraint(bigintLessThan(number));
+ }
+ lessThanOrEqual(number) {
+ return this.addConstraint(bigintLessThanOrEqual(number));
+ }
+ greaterThan(number) {
+ return this.addConstraint(bigintGreaterThan(number));
+ }
+ greaterThanOrEqual(number) {
+ return this.addConstraint(bigintGreaterThanOrEqual(number));
+ }
+ equal(number) {
+ return this.addConstraint(bigintEqual(number));
+ }
+ notEqual(number) {
+ return this.addConstraint(bigintNotEqual(number));
+ }
+ get positive() {
+ return this.greaterThanOrEqual(0n);
+ }
+ get negative() {
+ return this.lessThan(0n);
+ }
+ divisibleBy(number) {
+ return this.addConstraint(bigintDivisibleBy(number));
+ }
+ get abs() {
+ return this.transform((value) => value < 0 ? -value : value);
+ }
+ intN(bits) {
+ return this.transform((value) => BigInt.asIntN(bits, value));
+ }
+ uintN(bits) {
+ return this.transform((value) => BigInt.asUintN(bits, value));
+ }
+ handle(value) {
+ return typeof value === "bigint" ? Result.ok(value) : Result.err(new ValidationError("s.bigint", "Expected a bigint primitive", value));
+ }
+};
+__name(BigIntValidator, "BigIntValidator");
+
+// src/constraints/BooleanConstraints.ts
+var booleanTrue = {
+ run(input) {
+ return input ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.boolean.true", "Invalid boolean value", input, "true"));
+ }
+};
+var booleanFalse = {
+ run(input) {
+ return input ? Result.err(new ExpectedConstraintError("s.boolean.false", "Invalid boolean value", input, "false")) : Result.ok(input);
+ }
+};
+
+// src/validators/BooleanValidator.ts
+var BooleanValidator = class extends BaseValidator {
+ get true() {
+ return this.addConstraint(booleanTrue);
+ }
+ get false() {
+ return this.addConstraint(booleanFalse);
+ }
+ equal(value) {
+ return value ? this.true : this.false;
+ }
+ notEqual(value) {
+ return value ? this.false : this.true;
+ }
+ handle(value) {
+ return typeof value === "boolean" ? Result.ok(value) : Result.err(new ValidationError("s.boolean", "Expected a boolean primitive", value));
+ }
+};
+__name(BooleanValidator, "BooleanValidator");
+
+// src/constraints/DateConstraints.ts
+function dateComparator(comparator, name, expected, number) {
+ return {
+ run(input) {
+ return comparator(input.getTime(), number) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid Date value", input, expected));
+ }
+ };
+}
+__name(dateComparator, "dateComparator");
+function dateLessThan(value) {
+ const expected = `expected < ${value.toISOString()}`;
+ return dateComparator(lessThan, "s.date.lessThan", expected, value.getTime());
+}
+__name(dateLessThan, "dateLessThan");
+function dateLessThanOrEqual(value) {
+ const expected = `expected <= ${value.toISOString()}`;
+ return dateComparator(lessThanOrEqual, "s.date.lessThanOrEqual", expected, value.getTime());
+}
+__name(dateLessThanOrEqual, "dateLessThanOrEqual");
+function dateGreaterThan(value) {
+ const expected = `expected > ${value.toISOString()}`;
+ return dateComparator(greaterThan, "s.date.greaterThan", expected, value.getTime());
+}
+__name(dateGreaterThan, "dateGreaterThan");
+function dateGreaterThanOrEqual(value) {
+ const expected = `expected >= ${value.toISOString()}`;
+ return dateComparator(greaterThanOrEqual, "s.date.greaterThanOrEqual", expected, value.getTime());
+}
+__name(dateGreaterThanOrEqual, "dateGreaterThanOrEqual");
+function dateEqual(value) {
+ const expected = `expected === ${value.toISOString()}`;
+ return dateComparator(equal, "s.date.equal", expected, value.getTime());
+}
+__name(dateEqual, "dateEqual");
+function dateNotEqual(value) {
+ const expected = `expected !== ${value.toISOString()}`;
+ return dateComparator(notEqual, "s.date.notEqual", expected, value.getTime());
+}
+__name(dateNotEqual, "dateNotEqual");
+var dateInvalid = {
+ run(input) {
+ return Number.isNaN(input.getTime()) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.date.invalid", "Invalid Date value", input, "expected === NaN"));
+ }
+};
+var dateValid = {
+ run(input) {
+ return Number.isNaN(input.getTime()) ? Result.err(new ExpectedConstraintError("s.date.valid", "Invalid Date value", input, "expected !== NaN")) : Result.ok(input);
+ }
+};
+
+// src/validators/DateValidator.ts
+var DateValidator = class extends BaseValidator {
+ lessThan(date) {
+ return this.addConstraint(dateLessThan(new Date(date)));
+ }
+ lessThanOrEqual(date) {
+ return this.addConstraint(dateLessThanOrEqual(new Date(date)));
+ }
+ greaterThan(date) {
+ return this.addConstraint(dateGreaterThan(new Date(date)));
+ }
+ greaterThanOrEqual(date) {
+ return this.addConstraint(dateGreaterThanOrEqual(new Date(date)));
+ }
+ equal(date) {
+ const resolved = new Date(date);
+ return Number.isNaN(resolved.getTime()) ? this.invalid : this.addConstraint(dateEqual(resolved));
+ }
+ notEqual(date) {
+ const resolved = new Date(date);
+ return Number.isNaN(resolved.getTime()) ? this.valid : this.addConstraint(dateNotEqual(resolved));
+ }
+ get valid() {
+ return this.addConstraint(dateValid);
+ }
+ get invalid() {
+ return this.addConstraint(dateInvalid);
+ }
+ handle(value) {
+ return value instanceof Date ? Result.ok(value) : Result.err(new ValidationError("s.date", "Expected a Date", value));
+ }
+};
+__name(DateValidator, "DateValidator");
+var ExpectedValidationError = class extends ValidationError {
+ constructor(validator, message, given, expected) {
+ super(validator, message, given);
+ this.expected = expected;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ validator: this.validator,
+ given: this.given,
+ expected: this.expected
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const validator = options.stylize(this.validator, "string");
+ if (depth < 0) {
+ return options.stylize(`[ExpectedValidationError: ${validator}]`, "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1 };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const expected = inspect(this.expected, newOptions).replace(/\n/g, padding);
+ const given = inspect(this.given, newOptions).replace(/\n/g, padding);
+ const header = `${options.stylize("ExpectedValidationError", "special")} > ${validator}`;
+ const message = options.stylize(this.message, "regexp");
+ const expectedBlock = `
+ ${options.stylize("Expected:", "string")}${padding}${expected}`;
+ const givenBlock = `
+ ${options.stylize("Received:", "regexp")}${padding}${given}`;
+ return `${header}
+ ${message}
+${expectedBlock}
+${givenBlock}`;
+ }
+};
+__name(ExpectedValidationError, "ExpectedValidationError");
+
+// src/validators/InstanceValidator.ts
+var InstanceValidator = class extends BaseValidator {
+ constructor(expected, constraints = []) {
+ super(constraints);
+ this.expected = expected;
+ }
+ handle(value) {
+ return value instanceof this.expected ? Result.ok(value) : Result.err(new ExpectedValidationError("s.instance(V)", "Expected", value, this.expected));
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.expected, this.constraints]);
+ }
+};
+__name(InstanceValidator, "InstanceValidator");
+
+// src/validators/LiteralValidator.ts
+var LiteralValidator = class extends BaseValidator {
+ constructor(literal, constraints = []) {
+ super(constraints);
+ this.expected = literal;
+ }
+ handle(value) {
+ return Object.is(value, this.expected) ? Result.ok(value) : Result.err(new ExpectedValidationError("s.literal(V)", "Expected values to be equals", value, this.expected));
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.expected, this.constraints]);
+ }
+};
+__name(LiteralValidator, "LiteralValidator");
+
+// src/validators/NeverValidator.ts
+var NeverValidator = class extends BaseValidator {
+ handle(value) {
+ return Result.err(new ValidationError("s.never", "Expected a value to not be passed", value));
+ }
+};
+__name(NeverValidator, "NeverValidator");
+
+// src/validators/NullishValidator.ts
+var NullishValidator = class extends BaseValidator {
+ handle(value) {
+ return value === void 0 || value === null ? Result.ok(value) : Result.err(new ValidationError("s.nullish", "Expected undefined or null", value));
+ }
+};
+__name(NullishValidator, "NullishValidator");
+
+// src/constraints/NumberConstraints.ts
+function numberComparator(comparator, name, expected, number) {
+ return {
+ run(input) {
+ return comparator(input, number) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid number value", input, expected));
+ }
+ };
+}
+__name(numberComparator, "numberComparator");
+function numberLessThan(value) {
+ const expected = `expected < ${value}`;
+ return numberComparator(lessThan, "s.number.lessThan", expected, value);
+}
+__name(numberLessThan, "numberLessThan");
+function numberLessThanOrEqual(value) {
+ const expected = `expected <= ${value}`;
+ return numberComparator(lessThanOrEqual, "s.number.lessThanOrEqual", expected, value);
+}
+__name(numberLessThanOrEqual, "numberLessThanOrEqual");
+function numberGreaterThan(value) {
+ const expected = `expected > ${value}`;
+ return numberComparator(greaterThan, "s.number.greaterThan", expected, value);
+}
+__name(numberGreaterThan, "numberGreaterThan");
+function numberGreaterThanOrEqual(value) {
+ const expected = `expected >= ${value}`;
+ return numberComparator(greaterThanOrEqual, "s.number.greaterThanOrEqual", expected, value);
+}
+__name(numberGreaterThanOrEqual, "numberGreaterThanOrEqual");
+function numberEqual(value) {
+ const expected = `expected === ${value}`;
+ return numberComparator(equal, "s.number.equal", expected, value);
+}
+__name(numberEqual, "numberEqual");
+function numberNotEqual(value) {
+ const expected = `expected !== ${value}`;
+ return numberComparator(notEqual, "s.number.notEqual", expected, value);
+}
+__name(numberNotEqual, "numberNotEqual");
+var numberInt = {
+ run(input) {
+ return Number.isInteger(input) ? Result.ok(input) : Result.err(
+ new ExpectedConstraintError("s.number.int", "Given value is not an integer", input, "Number.isInteger(expected) to be true")
+ );
+ }
+};
+var numberSafeInt = {
+ run(input) {
+ return Number.isSafeInteger(input) ? Result.ok(input) : Result.err(
+ new ExpectedConstraintError(
+ "s.number.safeInt",
+ "Given value is not a safe integer",
+ input,
+ "Number.isSafeInteger(expected) to be true"
+ )
+ );
+ }
+};
+var numberFinite = {
+ run(input) {
+ return Number.isFinite(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.number.finite", "Given value is not finite", input, "Number.isFinite(expected) to be true"));
+ }
+};
+var numberNaN = {
+ run(input) {
+ return Number.isNaN(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.number.equal(NaN)", "Invalid number value", input, "expected === NaN"));
+ }
+};
+var numberNotNaN = {
+ run(input) {
+ return Number.isNaN(input) ? Result.err(new ExpectedConstraintError("s.number.notEqual(NaN)", "Invalid number value", input, "expected !== NaN")) : Result.ok(input);
+ }
+};
+function numberDivisibleBy(divider) {
+ const expected = `expected % ${divider} === 0`;
+ return {
+ run(input) {
+ return input % divider === 0 ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.number.divisibleBy", "Number is not divisible", input, expected));
+ }
+ };
+}
+__name(numberDivisibleBy, "numberDivisibleBy");
+
+// src/validators/NumberValidator.ts
+var NumberValidator = class extends BaseValidator {
+ lessThan(number) {
+ return this.addConstraint(numberLessThan(number));
+ }
+ lessThanOrEqual(number) {
+ return this.addConstraint(numberLessThanOrEqual(number));
+ }
+ greaterThan(number) {
+ return this.addConstraint(numberGreaterThan(number));
+ }
+ greaterThanOrEqual(number) {
+ return this.addConstraint(numberGreaterThanOrEqual(number));
+ }
+ equal(number) {
+ return Number.isNaN(number) ? this.addConstraint(numberNaN) : this.addConstraint(numberEqual(number));
+ }
+ notEqual(number) {
+ return Number.isNaN(number) ? this.addConstraint(numberNotNaN) : this.addConstraint(numberNotEqual(number));
+ }
+ get int() {
+ return this.addConstraint(numberInt);
+ }
+ get safeInt() {
+ return this.addConstraint(numberSafeInt);
+ }
+ get finite() {
+ return this.addConstraint(numberFinite);
+ }
+ get positive() {
+ return this.greaterThanOrEqual(0);
+ }
+ get negative() {
+ return this.lessThan(0);
+ }
+ divisibleBy(divider) {
+ return this.addConstraint(numberDivisibleBy(divider));
+ }
+ get abs() {
+ return this.transform(Math.abs);
+ }
+ get sign() {
+ return this.transform(Math.sign);
+ }
+ get trunc() {
+ return this.transform(Math.trunc);
+ }
+ get floor() {
+ return this.transform(Math.floor);
+ }
+ get fround() {
+ return this.transform(Math.fround);
+ }
+ get round() {
+ return this.transform(Math.round);
+ }
+ get ceil() {
+ return this.transform(Math.ceil);
+ }
+ handle(value) {
+ return typeof value === "number" ? Result.ok(value) : Result.err(new ValidationError("s.number", "Expected a number primitive", value));
+ }
+};
+__name(NumberValidator, "NumberValidator");
+
+// src/lib/errors/MissingPropertyError.ts
+var MissingPropertyError = class extends BaseError {
+ constructor(property) {
+ super("A required property is missing");
+ this.property = property;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ property: this.property
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const property = options.stylize(this.property.toString(), "string");
+ if (depth < 0) {
+ return options.stylize(`[MissingPropertyError: ${property}]`, "special");
+ }
+ const header = `${options.stylize("MissingPropertyError", "special")} > ${property}`;
+ const message = options.stylize(this.message, "regexp");
+ return `${header}
+ ${message}`;
+ }
+};
+__name(MissingPropertyError, "MissingPropertyError");
+var UnknownPropertyError = class extends BaseError {
+ constructor(property, value) {
+ super("Received unexpected property");
+ this.property = property;
+ this.value = value;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ property: this.property,
+ value: this.value
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const property = options.stylize(this.property.toString(), "string");
+ if (depth < 0) {
+ return options.stylize(`[UnknownPropertyError: ${property}]`, "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1, compact: true };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const given = inspect(this.value, newOptions).replace(/\n/g, padding);
+ const header = `${options.stylize("UnknownPropertyError", "special")} > ${property}`;
+ const message = options.stylize(this.message, "regexp");
+ const givenBlock = `
+ ${options.stylize("Received:", "regexp")}${padding}${given}`;
+ return `${header}
+ ${message}
+${givenBlock}`;
+ }
+};
+__name(UnknownPropertyError, "UnknownPropertyError");
+
+// src/validators/DefaultValidator.ts
+var DefaultValidator = class extends BaseValidator {
+ constructor(validator, value, constraints = []) {
+ super(constraints);
+ this.validator = validator;
+ this.defaultValue = value;
+ }
+ default(value) {
+ const clone = this.clone();
+ clone.defaultValue = value;
+ return clone;
+ }
+ handle(value) {
+ return typeof value === "undefined" ? Result.ok(getValue(this.defaultValue)) : this.validator["handle"](value);
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validator, this.defaultValue, this.constraints]);
+ }
+};
+__name(DefaultValidator, "DefaultValidator");
+
+// src/lib/errors/CombinedError.ts
+var CombinedError = class extends BaseError {
+ constructor(errors) {
+ super("Received one or more errors");
+ this.errors = errors;
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ if (depth < 0) {
+ return options.stylize("[CombinedError]", "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1, compact: true };
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const header = `${options.stylize("CombinedError", "special")} (${options.stylize(this.errors.length.toString(), "number")})`;
+ const message = options.stylize(this.message, "regexp");
+ const errors = this.errors.map((error, i) => {
+ const index = options.stylize((i + 1).toString(), "number");
+ const body = error[customInspectSymbolStackLess](depth - 1, newOptions).replace(/\n/g, padding);
+ return ` ${index} ${body}`;
+ }).join("\n\n");
+ return `${header}
+ ${message}
+
+${errors}`;
+ }
+};
+__name(CombinedError, "CombinedError");
+
+// src/validators/UnionValidator.ts
+var UnionValidator = class extends BaseValidator {
+ constructor(validators, constraints = []) {
+ super(constraints);
+ this.validators = validators;
+ }
+ get optional() {
+ if (this.validators.length === 0)
+ return new UnionValidator([new LiteralValidator(void 0)], this.constraints);
+ const [validator] = this.validators;
+ if (validator instanceof LiteralValidator) {
+ if (validator.expected === void 0)
+ return this.clone();
+ if (validator.expected === null) {
+ return new UnionValidator(
+ [new NullishValidator(), ...this.validators.slice(1)],
+ this.constraints
+ );
+ }
+ } else if (validator instanceof NullishValidator) {
+ return this.clone();
+ }
+ return new UnionValidator([new LiteralValidator(void 0), ...this.validators]);
+ }
+ get required() {
+ if (this.validators.length === 0)
+ return this.clone();
+ const [validator] = this.validators;
+ if (validator instanceof LiteralValidator) {
+ if (validator.expected === void 0)
+ return new UnionValidator(this.validators.slice(1), this.constraints);
+ } else if (validator instanceof NullishValidator) {
+ return new UnionValidator([new LiteralValidator(null), ...this.validators.slice(1)], this.constraints);
+ }
+ return this.clone();
+ }
+ get nullable() {
+ if (this.validators.length === 0)
+ return new UnionValidator([new LiteralValidator(null)], this.constraints);
+ const [validator] = this.validators;
+ if (validator instanceof LiteralValidator) {
+ if (validator.expected === null)
+ return this.clone();
+ if (validator.expected === void 0) {
+ return new UnionValidator(
+ [new NullishValidator(), ...this.validators.slice(1)],
+ this.constraints
+ );
+ }
+ } else if (validator instanceof NullishValidator) {
+ return this.clone();
+ }
+ return new UnionValidator([new LiteralValidator(null), ...this.validators]);
+ }
+ get nullish() {
+ if (this.validators.length === 0)
+ return new UnionValidator([new NullishValidator()], this.constraints);
+ const [validator] = this.validators;
+ if (validator instanceof LiteralValidator) {
+ if (validator.expected === null || validator.expected === void 0) {
+ return new UnionValidator([new NullishValidator(), ...this.validators.slice(1)], this.constraints);
+ }
+ } else if (validator instanceof NullishValidator) {
+ return this.clone();
+ }
+ return new UnionValidator([new NullishValidator(), ...this.validators]);
+ }
+ or(...predicates) {
+ return new UnionValidator([...this.validators, ...predicates]);
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validators, this.constraints]);
+ }
+ handle(value) {
+ const errors = [];
+ for (const validator of this.validators) {
+ const result = validator.run(value);
+ if (result.isOk())
+ return result;
+ errors.push(result.error);
+ }
+ return Result.err(new CombinedError(errors));
+ }
+};
+__name(UnionValidator, "UnionValidator");
+
+// src/validators/ObjectValidator.ts
+var ObjectValidator = class extends BaseValidator {
+ constructor(shape, strategy = 0 /* Ignore */, constraints = []) {
+ super(constraints);
+ this.keys = [];
+ this.requiredKeys = /* @__PURE__ */ new Map();
+ this.possiblyUndefinedKeys = /* @__PURE__ */ new Map();
+ this.possiblyUndefinedKeysWithDefaults = /* @__PURE__ */ new Map();
+ this.shape = shape;
+ this.strategy = strategy;
+ switch (this.strategy) {
+ case 0 /* Ignore */:
+ this.handleStrategy = (value) => this.handleIgnoreStrategy(value);
+ break;
+ case 1 /* Strict */: {
+ this.handleStrategy = (value) => this.handleStrictStrategy(value);
+ break;
+ }
+ case 2 /* Passthrough */:
+ this.handleStrategy = (value) => this.handlePassthroughStrategy(value);
+ break;
+ }
+ const shapeEntries = Object.entries(shape);
+ this.keys = shapeEntries.map(([key]) => key);
+ for (const [key, validator] of shapeEntries) {
+ if (validator instanceof UnionValidator) {
+ const [possiblyLiteralOrNullishPredicate] = validator["validators"];
+ if (possiblyLiteralOrNullishPredicate instanceof NullishValidator) {
+ this.possiblyUndefinedKeys.set(key, validator);
+ } else if (possiblyLiteralOrNullishPredicate instanceof LiteralValidator) {
+ if (possiblyLiteralOrNullishPredicate.expected === void 0) {
+ this.possiblyUndefinedKeys.set(key, validator);
+ } else {
+ this.requiredKeys.set(key, validator);
+ }
+ } else if (validator instanceof DefaultValidator) {
+ this.possiblyUndefinedKeysWithDefaults.set(key, validator);
+ } else {
+ this.requiredKeys.set(key, validator);
+ }
+ } else if (validator instanceof NullishValidator) {
+ this.possiblyUndefinedKeys.set(key, validator);
+ } else if (validator instanceof LiteralValidator) {
+ if (validator.expected === void 0) {
+ this.possiblyUndefinedKeys.set(key, validator);
+ } else {
+ this.requiredKeys.set(key, validator);
+ }
+ } else if (validator instanceof DefaultValidator) {
+ this.possiblyUndefinedKeysWithDefaults.set(key, validator);
+ } else {
+ this.requiredKeys.set(key, validator);
+ }
+ }
+ }
+ get strict() {
+ return Reflect.construct(this.constructor, [this.shape, 1 /* Strict */, this.constraints]);
+ }
+ get ignore() {
+ return Reflect.construct(this.constructor, [this.shape, 0 /* Ignore */, this.constraints]);
+ }
+ get passthrough() {
+ return Reflect.construct(this.constructor, [this.shape, 2 /* Passthrough */, this.constraints]);
+ }
+ get partial() {
+ const shape = Object.fromEntries(this.keys.map((key) => [key, this.shape[key].optional]));
+ return Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);
+ }
+ get required() {
+ const shape = Object.fromEntries(
+ this.keys.map((key) => {
+ let validator = this.shape[key];
+ if (validator instanceof UnionValidator)
+ validator = validator.required;
+ return [key, validator];
+ })
+ );
+ return Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);
+ }
+ extend(schema) {
+ const shape = { ...this.shape, ...schema instanceof ObjectValidator ? schema.shape : schema };
+ return Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);
+ }
+ pick(keys) {
+ const shape = Object.fromEntries(
+ keys.filter((key) => this.keys.includes(key)).map((key) => [key, this.shape[key]])
+ );
+ return Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);
+ }
+ omit(keys) {
+ const shape = Object.fromEntries(
+ this.keys.filter((key) => !keys.includes(key)).map((key) => [key, this.shape[key]])
+ );
+ return Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);
+ }
+ handle(value) {
+ const typeOfValue = typeof value;
+ if (typeOfValue !== "object") {
+ return Result.err(new ValidationError("s.object(T)", `Expected the value to be an object, but received ${typeOfValue} instead`, value));
+ }
+ if (value === null) {
+ return Result.err(new ValidationError("s.object(T)", "Expected the value to not be null", value));
+ }
+ if (Array.isArray(value)) {
+ return Result.err(new ValidationError("s.object(T)", "Expected the value to not be an array", value));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(value);
+ }
+ for (const predicate of Object.values(this.shape)) {
+ predicate.setParent(this.parent ?? value);
+ }
+ return this.handleStrategy(value);
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.shape, this.strategy, this.constraints]);
+ }
+ handleIgnoreStrategy(value) {
+ const errors = [];
+ const finalObject = {};
+ const inputEntries = new Map(Object.entries(value));
+ const runPredicate = /* @__PURE__ */ __name((key, predicate) => {
+ const result = predicate.run(value[key]);
+ if (result.isOk()) {
+ finalObject[key] = result.value;
+ } else {
+ const error = result.error;
+ errors.push([key, error]);
+ }
+ }, "runPredicate");
+ for (const [key, predicate] of this.requiredKeys) {
+ if (inputEntries.delete(key)) {
+ runPredicate(key, predicate);
+ } else {
+ errors.push([key, new MissingPropertyError(key)]);
+ }
+ }
+ for (const [key, validator] of this.possiblyUndefinedKeysWithDefaults) {
+ inputEntries.delete(key);
+ runPredicate(key, validator);
+ }
+ if (inputEntries.size === 0) {
+ return errors.length === 0 ? Result.ok(finalObject) : Result.err(new CombinedPropertyError(errors));
+ }
+ const checkInputEntriesInsteadOfSchemaKeys = this.possiblyUndefinedKeys.size > inputEntries.size;
+ if (checkInputEntriesInsteadOfSchemaKeys) {
+ for (const [key] of inputEntries) {
+ const predicate = this.possiblyUndefinedKeys.get(key);
+ if (predicate) {
+ runPredicate(key, predicate);
+ }
+ }
+ } else {
+ for (const [key, predicate] of this.possiblyUndefinedKeys) {
+ if (inputEntries.delete(key)) {
+ runPredicate(key, predicate);
+ }
+ }
+ }
+ return errors.length === 0 ? Result.ok(finalObject) : Result.err(new CombinedPropertyError(errors));
+ }
+ handleStrictStrategy(value) {
+ const errors = [];
+ const finalResult = {};
+ const inputEntries = new Map(Object.entries(value));
+ const runPredicate = /* @__PURE__ */ __name((key, predicate) => {
+ const result = predicate.run(value[key]);
+ if (result.isOk()) {
+ finalResult[key] = result.value;
+ } else {
+ const error = result.error;
+ errors.push([key, error]);
+ }
+ }, "runPredicate");
+ for (const [key, predicate] of this.requiredKeys) {
+ if (inputEntries.delete(key)) {
+ runPredicate(key, predicate);
+ } else {
+ errors.push([key, new MissingPropertyError(key)]);
+ }
+ }
+ for (const [key, validator] of this.possiblyUndefinedKeysWithDefaults) {
+ inputEntries.delete(key);
+ runPredicate(key, validator);
+ }
+ for (const [key, predicate] of this.possiblyUndefinedKeys) {
+ if (inputEntries.size === 0) {
+ break;
+ }
+ if (inputEntries.delete(key)) {
+ runPredicate(key, predicate);
+ }
+ }
+ if (inputEntries.size !== 0) {
+ for (const [key, value2] of inputEntries.entries()) {
+ errors.push([key, new UnknownPropertyError(key, value2)]);
+ }
+ }
+ return errors.length === 0 ? Result.ok(finalResult) : Result.err(new CombinedPropertyError(errors));
+ }
+ handlePassthroughStrategy(value) {
+ const result = this.handleIgnoreStrategy(value);
+ return result.isErr() ? result : Result.ok({ ...value, ...result.value });
+ }
+};
+__name(ObjectValidator, "ObjectValidator");
+
+// src/validators/PassthroughValidator.ts
+var PassthroughValidator = class extends BaseValidator {
+ handle(value) {
+ return Result.ok(value);
+ }
+};
+__name(PassthroughValidator, "PassthroughValidator");
+
+// src/validators/RecordValidator.ts
+var RecordValidator = class extends BaseValidator {
+ constructor(validator, constraints = []) {
+ super(constraints);
+ this.validator = validator;
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validator, this.constraints]);
+ }
+ handle(value) {
+ if (typeof value !== "object") {
+ return Result.err(new ValidationError("s.record(T)", "Expected an object", value));
+ }
+ if (value === null) {
+ return Result.err(new ValidationError("s.record(T)", "Expected the value to not be null", value));
+ }
+ if (Array.isArray(value)) {
+ return Result.err(new ValidationError("s.record(T)", "Expected the value to not be an array", value));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(value);
+ }
+ const errors = [];
+ const transformed = {};
+ for (const [key, val] of Object.entries(value)) {
+ const result = this.validator.run(val);
+ if (result.isOk())
+ transformed[key] = result.value;
+ else
+ errors.push([key, result.error]);
+ }
+ return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedPropertyError(errors));
+ }
+};
+__name(RecordValidator, "RecordValidator");
+
+// src/validators/SetValidator.ts
+var SetValidator = class extends BaseValidator {
+ constructor(validator, constraints = []) {
+ super(constraints);
+ this.validator = validator;
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validator, this.constraints]);
+ }
+ handle(values) {
+ if (!(values instanceof Set)) {
+ return Result.err(new ValidationError("s.set(T)", "Expected a set", values));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(values);
+ }
+ const errors = [];
+ const transformed = /* @__PURE__ */ new Set();
+ for (const value of values) {
+ const result = this.validator.run(value);
+ if (result.isOk())
+ transformed.add(result.value);
+ else
+ errors.push(result.error);
+ }
+ return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedError(errors));
+ }
+};
+__name(SetValidator, "SetValidator");
+
+// src/constraints/util/emailValidator.ts
+var accountRegex = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")$/;
+function validateEmail(email) {
+ if (!email)
+ return false;
+ const atIndex = email.indexOf("@");
+ if (atIndex === -1)
+ return false;
+ if (atIndex > 64)
+ return false;
+ const domainIndex = atIndex + 1;
+ if (email.includes("@", domainIndex))
+ return false;
+ if (email.length - domainIndex > 255)
+ return false;
+ let dotIndex = email.indexOf(".", domainIndex);
+ if (dotIndex === -1)
+ return false;
+ let lastDotIndex = domainIndex;
+ do {
+ if (dotIndex - lastDotIndex > 63)
+ return false;
+ lastDotIndex = dotIndex + 1;
+ } while ((dotIndex = email.indexOf(".", lastDotIndex)) !== -1);
+ if (email.length - lastDotIndex > 63)
+ return false;
+ return accountRegex.test(email.slice(0, atIndex)) && validateEmailDomain(email.slice(domainIndex));
+}
+__name(validateEmail, "validateEmail");
+function validateEmailDomain(domain) {
+ try {
+ return new URL(`http://${domain}`).hostname === domain;
+ } catch {
+ return false;
+ }
+}
+__name(validateEmailDomain, "validateEmailDomain");
+
+// src/constraints/util/net.ts
+var v4Seg = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])";
+var v4Str = `(${v4Seg}[.]){3}${v4Seg}`;
+var IPv4Reg = new RegExp(`^${v4Str}$`);
+var v6Seg = "(?:[0-9a-fA-F]{1,4})";
+var IPv6Reg = new RegExp(
+ `^((?:${v6Seg}:){7}(?:${v6Seg}|:)|(?:${v6Seg}:){6}(?:${v4Str}|:${v6Seg}|:)|(?:${v6Seg}:){5}(?::${v4Str}|(:${v6Seg}){1,2}|:)|(?:${v6Seg}:){4}(?:(:${v6Seg}){0,1}:${v4Str}|(:${v6Seg}){1,3}|:)|(?:${v6Seg}:){3}(?:(:${v6Seg}){0,2}:${v4Str}|(:${v6Seg}){1,4}|:)|(?:${v6Seg}:){2}(?:(:${v6Seg}){0,3}:${v4Str}|(:${v6Seg}){1,5}|:)|(?:${v6Seg}:){1}(?:(:${v6Seg}){0,4}:${v4Str}|(:${v6Seg}){1,6}|:)|(?::((?::${v6Seg}){0,5}:${v4Str}|(?::${v6Seg}){1,7}|:)))(%[0-9a-zA-Z-.:]{1,})?$`
+);
+function isIPv4(s2) {
+ return IPv4Reg.test(s2);
+}
+__name(isIPv4, "isIPv4");
+function isIPv6(s2) {
+ return IPv6Reg.test(s2);
+}
+__name(isIPv6, "isIPv6");
+function isIP(s2) {
+ if (isIPv4(s2))
+ return 4;
+ if (isIPv6(s2))
+ return 6;
+ return 0;
+}
+__name(isIP, "isIP");
+
+// src/constraints/util/phoneValidator.ts
+var phoneNumberRegex = /^((?:\+|0{0,2})\d{1,2}\s?)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$/;
+function validatePhoneNumber(input) {
+ return phoneNumberRegex.test(input);
+}
+__name(validatePhoneNumber, "validatePhoneNumber");
+var MultiplePossibilitiesConstraintError = class extends BaseConstraintError {
+ constructor(constraint, message, given, expected) {
+ super(constraint, message, given);
+ this.expected = expected;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ constraint: this.constraint,
+ given: this.given,
+ expected: this.expected
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const constraint = options.stylize(this.constraint, "string");
+ if (depth < 0) {
+ return options.stylize(`[MultiplePossibilitiesConstraintError: ${constraint}]`, "special");
+ }
+ const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1 };
+ const verticalLine = options.stylize("|", "undefined");
+ const padding = `
+ ${verticalLine} `;
+ const given = inspect(this.given, newOptions).replace(/\n/g, padding);
+ const header = `${options.stylize("MultiplePossibilitiesConstraintError", "special")} > ${constraint}`;
+ const message = options.stylize(this.message, "regexp");
+ const expectedPadding = `
+ ${verticalLine} - `;
+ const expectedBlock = `
+ ${options.stylize("Expected any of the following:", "string")}${expectedPadding}${this.expected.map((possible) => options.stylize(possible, "boolean")).join(expectedPadding)}`;
+ const givenBlock = `
+ ${options.stylize("Received:", "regexp")}${padding}${given}`;
+ return `${header}
+ ${message}
+${expectedBlock}
+${givenBlock}`;
+ }
+};
+__name(MultiplePossibilitiesConstraintError, "MultiplePossibilitiesConstraintError");
+
+// src/constraints/util/common/combinedResultFn.ts
+function combinedErrorFn(...fns) {
+ switch (fns.length) {
+ case 0:
+ return () => null;
+ case 1:
+ return fns[0];
+ case 2: {
+ const [fn0, fn1] = fns;
+ return (...params) => fn0(...params) || fn1(...params);
+ }
+ default: {
+ return (...params) => {
+ for (const fn of fns) {
+ const result = fn(...params);
+ if (result)
+ return result;
+ }
+ return null;
+ };
+ }
+ }
+}
+__name(combinedErrorFn, "combinedErrorFn");
+
+// src/constraints/util/urlValidators.ts
+function createUrlValidators(options) {
+ const fns = [];
+ if (options?.allowedProtocols?.length)
+ fns.push(allowedProtocolsFn(options.allowedProtocols));
+ if (options?.allowedDomains?.length)
+ fns.push(allowedDomainsFn(options.allowedDomains));
+ return combinedErrorFn(...fns);
+}
+__name(createUrlValidators, "createUrlValidators");
+function allowedProtocolsFn(allowedProtocols) {
+ return (input, url) => allowedProtocols.includes(url.protocol) ? null : new MultiplePossibilitiesConstraintError("s.string.url", "Invalid URL protocol", input, allowedProtocols);
+}
+__name(allowedProtocolsFn, "allowedProtocolsFn");
+function allowedDomainsFn(allowedDomains) {
+ return (input, url) => allowedDomains.includes(url.hostname) ? null : new MultiplePossibilitiesConstraintError("s.string.url", "Invalid URL domain", input, allowedDomains);
+}
+__name(allowedDomainsFn, "allowedDomainsFn");
+
+// src/constraints/StringConstraints.ts
+function stringLengthComparator(comparator, name, expected, length) {
+ return {
+ run(input) {
+ return comparator(input.length, length) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid string length", input, expected));
+ }
+ };
+}
+__name(stringLengthComparator, "stringLengthComparator");
+function stringLengthLessThan(length) {
+ const expected = `expected.length < ${length}`;
+ return stringLengthComparator(lessThan, "s.string.lengthLessThan", expected, length);
+}
+__name(stringLengthLessThan, "stringLengthLessThan");
+function stringLengthLessThanOrEqual(length) {
+ const expected = `expected.length <= ${length}`;
+ return stringLengthComparator(lessThanOrEqual, "s.string.lengthLessThanOrEqual", expected, length);
+}
+__name(stringLengthLessThanOrEqual, "stringLengthLessThanOrEqual");
+function stringLengthGreaterThan(length) {
+ const expected = `expected.length > ${length}`;
+ return stringLengthComparator(greaterThan, "s.string.lengthGreaterThan", expected, length);
+}
+__name(stringLengthGreaterThan, "stringLengthGreaterThan");
+function stringLengthGreaterThanOrEqual(length) {
+ const expected = `expected.length >= ${length}`;
+ return stringLengthComparator(greaterThanOrEqual, "s.string.lengthGreaterThanOrEqual", expected, length);
+}
+__name(stringLengthGreaterThanOrEqual, "stringLengthGreaterThanOrEqual");
+function stringLengthEqual(length) {
+ const expected = `expected.length === ${length}`;
+ return stringLengthComparator(equal, "s.string.lengthEqual", expected, length);
+}
+__name(stringLengthEqual, "stringLengthEqual");
+function stringLengthNotEqual(length) {
+ const expected = `expected.length !== ${length}`;
+ return stringLengthComparator(notEqual, "s.string.lengthNotEqual", expected, length);
+}
+__name(stringLengthNotEqual, "stringLengthNotEqual");
+function stringEmail() {
+ return {
+ run(input) {
+ return validateEmail(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.string.email", "Invalid email address", input, "expected to be an email address"));
+ }
+ };
+}
+__name(stringEmail, "stringEmail");
+function stringRegexValidator(type, expected, regex) {
+ return {
+ run(input) {
+ return regex.test(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError(type, "Invalid string format", input, expected));
+ }
+ };
+}
+__name(stringRegexValidator, "stringRegexValidator");
+function stringUrl(options) {
+ const validatorFn = createUrlValidators(options);
+ return {
+ run(input) {
+ let url;
+ try {
+ url = new URL(input);
+ } catch {
+ return Result.err(new ExpectedConstraintError("s.string.url", "Invalid URL", input, "expected to match a URL"));
+ }
+ const validatorFnResult = validatorFn(input, url);
+ if (validatorFnResult === null)
+ return Result.ok(input);
+ return Result.err(validatorFnResult);
+ }
+ };
+}
+__name(stringUrl, "stringUrl");
+function stringIp(version) {
+ const ipVersion = version ? `v${version}` : "";
+ const validatorFn = version === 4 ? isIPv4 : version === 6 ? isIPv6 : isIP;
+ const name = `s.string.ip${ipVersion}`;
+ const message = `Invalid IP${ipVersion} address`;
+ const expected = `expected to be an IP${ipVersion} address`;
+ return {
+ run(input) {
+ return validatorFn(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, message, input, expected));
+ }
+ };
+}
+__name(stringIp, "stringIp");
+function stringRegex(regex) {
+ return stringRegexValidator("s.string.regex", `expected ${regex}.test(expected) to be true`, regex);
+}
+__name(stringRegex, "stringRegex");
+function stringUuid({ version = 4, nullable = false } = {}) {
+ version ?? (version = "1-5");
+ const regex = new RegExp(
+ `^(?:[0-9A-F]{8}-[0-9A-F]{4}-[${version}][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}${nullable ? "|00000000-0000-0000-0000-000000000000" : ""})$`,
+ "i"
+ );
+ const expected = `expected to match UUID${typeof version === "number" ? `v${version}` : ` in range of ${version}`}`;
+ return stringRegexValidator("s.string.uuid", expected, regex);
+}
+__name(stringUuid, "stringUuid");
+function stringDate() {
+ return {
+ run(input) {
+ const time = Date.parse(input);
+ return Number.isNaN(time) ? Result.err(
+ new ExpectedConstraintError(
+ "s.string.date",
+ "Invalid date string",
+ input,
+ "expected to be a valid date string (in the ISO 8601 or ECMA-262 format)"
+ )
+ ) : Result.ok(input);
+ }
+ };
+}
+__name(stringDate, "stringDate");
+function stringPhone() {
+ return {
+ run(input) {
+ return validatePhoneNumber(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.string.phone", "Invalid phone number", input, "expected to be a phone number"));
+ }
+ };
+}
+__name(stringPhone, "stringPhone");
+
+// src/validators/StringValidator.ts
+var StringValidator = class extends BaseValidator {
+ lengthLessThan(length) {
+ return this.addConstraint(stringLengthLessThan(length));
+ }
+ lengthLessThanOrEqual(length) {
+ return this.addConstraint(stringLengthLessThanOrEqual(length));
+ }
+ lengthGreaterThan(length) {
+ return this.addConstraint(stringLengthGreaterThan(length));
+ }
+ lengthGreaterThanOrEqual(length) {
+ return this.addConstraint(stringLengthGreaterThanOrEqual(length));
+ }
+ lengthEqual(length) {
+ return this.addConstraint(stringLengthEqual(length));
+ }
+ lengthNotEqual(length) {
+ return this.addConstraint(stringLengthNotEqual(length));
+ }
+ get email() {
+ return this.addConstraint(stringEmail());
+ }
+ url(options) {
+ return this.addConstraint(stringUrl(options));
+ }
+ uuid(options) {
+ return this.addConstraint(stringUuid(options));
+ }
+ regex(regex) {
+ return this.addConstraint(stringRegex(regex));
+ }
+ get date() {
+ return this.addConstraint(stringDate());
+ }
+ get ipv4() {
+ return this.ip(4);
+ }
+ get ipv6() {
+ return this.ip(6);
+ }
+ ip(version) {
+ return this.addConstraint(stringIp(version));
+ }
+ phone() {
+ return this.addConstraint(stringPhone());
+ }
+ handle(value) {
+ return typeof value === "string" ? Result.ok(value) : Result.err(new ValidationError("s.string", "Expected a string primitive", value));
+ }
+};
+__name(StringValidator, "StringValidator");
+
+// src/validators/TupleValidator.ts
+var TupleValidator = class extends BaseValidator {
+ constructor(validators, constraints = []) {
+ super(constraints);
+ this.validators = [];
+ this.validators = validators;
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validators, this.constraints]);
+ }
+ handle(values) {
+ if (!Array.isArray(values)) {
+ return Result.err(new ValidationError("s.tuple(T)", "Expected an array", values));
+ }
+ if (values.length !== this.validators.length) {
+ return Result.err(new ValidationError("s.tuple(T)", `Expected an array of length ${this.validators.length}`, values));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(values);
+ }
+ const errors = [];
+ const transformed = [];
+ for (let i = 0; i < values.length; i++) {
+ const result = this.validators[i].run(values[i]);
+ if (result.isOk())
+ transformed.push(result.value);
+ else
+ errors.push([i, result.error]);
+ }
+ return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedPropertyError(errors));
+ }
+};
+__name(TupleValidator, "TupleValidator");
+
+// src/validators/MapValidator.ts
+var MapValidator = class extends BaseValidator {
+ constructor(keyValidator, valueValidator, constraints = []) {
+ super(constraints);
+ this.keyValidator = keyValidator;
+ this.valueValidator = valueValidator;
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.keyValidator, this.valueValidator, this.constraints]);
+ }
+ handle(value) {
+ if (!(value instanceof Map)) {
+ return Result.err(new ValidationError("s.map(K, V)", "Expected a map", value));
+ }
+ if (!this.shouldRunConstraints) {
+ return Result.ok(value);
+ }
+ const errors = [];
+ const transformed = /* @__PURE__ */ new Map();
+ for (const [key, val] of value.entries()) {
+ const keyResult = this.keyValidator.run(key);
+ const valueResult = this.valueValidator.run(val);
+ const { length } = errors;
+ if (keyResult.isErr())
+ errors.push([key, keyResult.error]);
+ if (valueResult.isErr())
+ errors.push([key, valueResult.error]);
+ if (errors.length === length)
+ transformed.set(keyResult.value, valueResult.value);
+ }
+ return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedPropertyError(errors));
+ }
+};
+__name(MapValidator, "MapValidator");
+
+// src/validators/LazyValidator.ts
+var LazyValidator = class extends BaseValidator {
+ constructor(validator, constraints = []) {
+ super(constraints);
+ this.validator = validator;
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.validator, this.constraints]);
+ }
+ handle(values) {
+ return this.validator(values).run(values);
+ }
+};
+__name(LazyValidator, "LazyValidator");
+
+// src/lib/errors/UnknownEnumValueError.ts
+var UnknownEnumValueError = class extends BaseError {
+ constructor(value, keys, enumMappings) {
+ super("Expected the value to be one of the following enum values:");
+ this.value = value;
+ this.enumKeys = keys;
+ this.enumMappings = enumMappings;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ value: this.value,
+ enumKeys: this.enumKeys,
+ enumMappings: [...this.enumMappings.entries()]
+ };
+ }
+ [customInspectSymbolStackLess](depth, options) {
+ const value = options.stylize(this.value.toString(), "string");
+ if (depth < 0) {
+ return options.stylize(`[UnknownEnumValueError: ${value}]`, "special");
+ }
+ const padding = `
+ ${options.stylize("|", "undefined")} `;
+ const pairs = this.enumKeys.map((key) => {
+ const enumValue = this.enumMappings.get(key);
+ return `${options.stylize(key, "string")} or ${options.stylize(
+ enumValue.toString(),
+ typeof enumValue === "number" ? "number" : "string"
+ )}`;
+ }).join(padding);
+ const header = `${options.stylize("UnknownEnumValueError", "special")} > ${value}`;
+ const message = options.stylize(this.message, "regexp");
+ const pairsBlock = `${padding}${pairs}`;
+ return `${header}
+ ${message}
+${pairsBlock}`;
+ }
+};
+__name(UnknownEnumValueError, "UnknownEnumValueError");
+
+// src/validators/NativeEnumValidator.ts
+var NativeEnumValidator = class extends BaseValidator {
+ constructor(enumShape) {
+ super();
+ this.hasNumericElements = false;
+ this.enumMapping = /* @__PURE__ */ new Map();
+ this.enumShape = enumShape;
+ this.enumKeys = Object.keys(enumShape).filter((key) => {
+ return typeof enumShape[enumShape[key]] !== "number";
+ });
+ for (const key of this.enumKeys) {
+ const enumValue = enumShape[key];
+ this.enumMapping.set(key, enumValue);
+ this.enumMapping.set(enumValue, enumValue);
+ if (typeof enumValue === "number") {
+ this.hasNumericElements = true;
+ this.enumMapping.set(`${enumValue}`, enumValue);
+ }
+ }
+ }
+ handle(value) {
+ const typeOfValue = typeof value;
+ if (typeOfValue === "number") {
+ if (!this.hasNumericElements) {
+ return Result.err(new ValidationError("s.nativeEnum(T)", "Expected the value to be a string", value));
+ }
+ } else if (typeOfValue !== "string") {
+ return Result.err(new ValidationError("s.nativeEnum(T)", "Expected the value to be a string or number", value));
+ }
+ const casted = value;
+ const possibleEnumValue = this.enumMapping.get(casted);
+ return typeof possibleEnumValue === "undefined" ? Result.err(new UnknownEnumValueError(casted, this.enumKeys, this.enumMapping)) : Result.ok(possibleEnumValue);
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.enumShape]);
+ }
+};
+__name(NativeEnumValidator, "NativeEnumValidator");
+
+// src/constraints/TypedArrayLengthConstraints.ts
+function typedArrayByteLengthComparator(comparator, name, expected, length) {
+ return {
+ run(input) {
+ return comparator(input.byteLength, length) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid Typed Array byte length", input, expected));
+ }
+ };
+}
+__name(typedArrayByteLengthComparator, "typedArrayByteLengthComparator");
+function typedArrayByteLengthLessThan(value) {
+ const expected = `expected.byteLength < ${value}`;
+ return typedArrayByteLengthComparator(lessThan, "s.typedArray(T).byteLengthLessThan", expected, value);
+}
+__name(typedArrayByteLengthLessThan, "typedArrayByteLengthLessThan");
+function typedArrayByteLengthLessThanOrEqual(value) {
+ const expected = `expected.byteLength <= ${value}`;
+ return typedArrayByteLengthComparator(lessThanOrEqual, "s.typedArray(T).byteLengthLessThanOrEqual", expected, value);
+}
+__name(typedArrayByteLengthLessThanOrEqual, "typedArrayByteLengthLessThanOrEqual");
+function typedArrayByteLengthGreaterThan(value) {
+ const expected = `expected.byteLength > ${value}`;
+ return typedArrayByteLengthComparator(greaterThan, "s.typedArray(T).byteLengthGreaterThan", expected, value);
+}
+__name(typedArrayByteLengthGreaterThan, "typedArrayByteLengthGreaterThan");
+function typedArrayByteLengthGreaterThanOrEqual(value) {
+ const expected = `expected.byteLength >= ${value}`;
+ return typedArrayByteLengthComparator(greaterThanOrEqual, "s.typedArray(T).byteLengthGreaterThanOrEqual", expected, value);
+}
+__name(typedArrayByteLengthGreaterThanOrEqual, "typedArrayByteLengthGreaterThanOrEqual");
+function typedArrayByteLengthEqual(value) {
+ const expected = `expected.byteLength === ${value}`;
+ return typedArrayByteLengthComparator(equal, "s.typedArray(T).byteLengthEqual", expected, value);
+}
+__name(typedArrayByteLengthEqual, "typedArrayByteLengthEqual");
+function typedArrayByteLengthNotEqual(value) {
+ const expected = `expected.byteLength !== ${value}`;
+ return typedArrayByteLengthComparator(notEqual, "s.typedArray(T).byteLengthNotEqual", expected, value);
+}
+__name(typedArrayByteLengthNotEqual, "typedArrayByteLengthNotEqual");
+function typedArrayByteLengthRange(start, endBefore) {
+ const expected = `expected.byteLength >= ${start} && expected.byteLength < ${endBefore}`;
+ return {
+ run(input) {
+ return input.byteLength >= start && input.byteLength < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).byteLengthRange", "Invalid Typed Array byte length", input, expected));
+ }
+ };
+}
+__name(typedArrayByteLengthRange, "typedArrayByteLengthRange");
+function typedArrayByteLengthRangeInclusive(start, end) {
+ const expected = `expected.byteLength >= ${start} && expected.byteLength <= ${end}`;
+ return {
+ run(input) {
+ return input.byteLength >= start && input.byteLength <= end ? Result.ok(input) : Result.err(
+ new ExpectedConstraintError("s.typedArray(T).byteLengthRangeInclusive", "Invalid Typed Array byte length", input, expected)
+ );
+ }
+ };
+}
+__name(typedArrayByteLengthRangeInclusive, "typedArrayByteLengthRangeInclusive");
+function typedArrayByteLengthRangeExclusive(startAfter, endBefore) {
+ const expected = `expected.byteLength > ${startAfter} && expected.byteLength < ${endBefore}`;
+ return {
+ run(input) {
+ return input.byteLength > startAfter && input.byteLength < endBefore ? Result.ok(input) : Result.err(
+ new ExpectedConstraintError("s.typedArray(T).byteLengthRangeExclusive", "Invalid Typed Array byte length", input, expected)
+ );
+ }
+ };
+}
+__name(typedArrayByteLengthRangeExclusive, "typedArrayByteLengthRangeExclusive");
+function typedArrayLengthComparator(comparator, name, expected, length) {
+ return {
+ run(input) {
+ return comparator(input.length, length) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, "Invalid Typed Array length", input, expected));
+ }
+ };
+}
+__name(typedArrayLengthComparator, "typedArrayLengthComparator");
+function typedArrayLengthLessThan(value) {
+ const expected = `expected.length < ${value}`;
+ return typedArrayLengthComparator(lessThan, "s.typedArray(T).lengthLessThan", expected, value);
+}
+__name(typedArrayLengthLessThan, "typedArrayLengthLessThan");
+function typedArrayLengthLessThanOrEqual(value) {
+ const expected = `expected.length <= ${value}`;
+ return typedArrayLengthComparator(lessThanOrEqual, "s.typedArray(T).lengthLessThanOrEqual", expected, value);
+}
+__name(typedArrayLengthLessThanOrEqual, "typedArrayLengthLessThanOrEqual");
+function typedArrayLengthGreaterThan(value) {
+ const expected = `expected.length > ${value}`;
+ return typedArrayLengthComparator(greaterThan, "s.typedArray(T).lengthGreaterThan", expected, value);
+}
+__name(typedArrayLengthGreaterThan, "typedArrayLengthGreaterThan");
+function typedArrayLengthGreaterThanOrEqual(value) {
+ const expected = `expected.length >= ${value}`;
+ return typedArrayLengthComparator(greaterThanOrEqual, "s.typedArray(T).lengthGreaterThanOrEqual", expected, value);
+}
+__name(typedArrayLengthGreaterThanOrEqual, "typedArrayLengthGreaterThanOrEqual");
+function typedArrayLengthEqual(value) {
+ const expected = `expected.length === ${value}`;
+ return typedArrayLengthComparator(equal, "s.typedArray(T).lengthEqual", expected, value);
+}
+__name(typedArrayLengthEqual, "typedArrayLengthEqual");
+function typedArrayLengthNotEqual(value) {
+ const expected = `expected.length !== ${value}`;
+ return typedArrayLengthComparator(notEqual, "s.typedArray(T).lengthNotEqual", expected, value);
+}
+__name(typedArrayLengthNotEqual, "typedArrayLengthNotEqual");
+function typedArrayLengthRange(start, endBefore) {
+ const expected = `expected.length >= ${start} && expected.length < ${endBefore}`;
+ return {
+ run(input) {
+ return input.length >= start && input.length < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).lengthRange", "Invalid Typed Array length", input, expected));
+ }
+ };
+}
+__name(typedArrayLengthRange, "typedArrayLengthRange");
+function typedArrayLengthRangeInclusive(start, end) {
+ const expected = `expected.length >= ${start} && expected.length <= ${end}`;
+ return {
+ run(input) {
+ return input.length >= start && input.length <= end ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).lengthRangeInclusive", "Invalid Typed Array length", input, expected));
+ }
+ };
+}
+__name(typedArrayLengthRangeInclusive, "typedArrayLengthRangeInclusive");
+function typedArrayLengthRangeExclusive(startAfter, endBefore) {
+ const expected = `expected.length > ${startAfter} && expected.length < ${endBefore}`;
+ return {
+ run(input) {
+ return input.length > startAfter && input.length < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).lengthRangeExclusive", "Invalid Typed Array length", input, expected));
+ }
+ };
+}
+__name(typedArrayLengthRangeExclusive, "typedArrayLengthRangeExclusive");
+
+// src/constraints/util/common/vowels.ts
+var vowels = ["a", "e", "i", "o", "u"];
+var aOrAn = /* @__PURE__ */ __name((word) => {
+ return `${vowels.includes(word[0].toLowerCase()) ? "an" : "a"} ${word}`;
+}, "aOrAn");
+
+// src/constraints/util/typedArray.ts
+var TypedArrays = {
+ Int8Array: (x) => x instanceof Int8Array,
+ Uint8Array: (x) => x instanceof Uint8Array,
+ Uint8ClampedArray: (x) => x instanceof Uint8ClampedArray,
+ Int16Array: (x) => x instanceof Int16Array,
+ Uint16Array: (x) => x instanceof Uint16Array,
+ Int32Array: (x) => x instanceof Int32Array,
+ Uint32Array: (x) => x instanceof Uint32Array,
+ Float32Array: (x) => x instanceof Float32Array,
+ Float64Array: (x) => x instanceof Float64Array,
+ BigInt64Array: (x) => x instanceof BigInt64Array,
+ BigUint64Array: (x) => x instanceof BigUint64Array,
+ TypedArray: (x) => ArrayBuffer.isView(x) && !(x instanceof DataView)
+};
+
+// src/validators/TypedArrayValidator.ts
+var TypedArrayValidator = class extends BaseValidator {
+ constructor(type, constraints = []) {
+ super(constraints);
+ this.type = type;
+ }
+ byteLengthLessThan(length) {
+ return this.addConstraint(typedArrayByteLengthLessThan(length));
+ }
+ byteLengthLessThanOrEqual(length) {
+ return this.addConstraint(typedArrayByteLengthLessThanOrEqual(length));
+ }
+ byteLengthGreaterThan(length) {
+ return this.addConstraint(typedArrayByteLengthGreaterThan(length));
+ }
+ byteLengthGreaterThanOrEqual(length) {
+ return this.addConstraint(typedArrayByteLengthGreaterThanOrEqual(length));
+ }
+ byteLengthEqual(length) {
+ return this.addConstraint(typedArrayByteLengthEqual(length));
+ }
+ byteLengthNotEqual(length) {
+ return this.addConstraint(typedArrayByteLengthNotEqual(length));
+ }
+ byteLengthRange(start, endBefore) {
+ return this.addConstraint(typedArrayByteLengthRange(start, endBefore));
+ }
+ byteLengthRangeInclusive(startAt, endAt) {
+ return this.addConstraint(typedArrayByteLengthRangeInclusive(startAt, endAt));
+ }
+ byteLengthRangeExclusive(startAfter, endBefore) {
+ return this.addConstraint(typedArrayByteLengthRangeExclusive(startAfter, endBefore));
+ }
+ lengthLessThan(length) {
+ return this.addConstraint(typedArrayLengthLessThan(length));
+ }
+ lengthLessThanOrEqual(length) {
+ return this.addConstraint(typedArrayLengthLessThanOrEqual(length));
+ }
+ lengthGreaterThan(length) {
+ return this.addConstraint(typedArrayLengthGreaterThan(length));
+ }
+ lengthGreaterThanOrEqual(length) {
+ return this.addConstraint(typedArrayLengthGreaterThanOrEqual(length));
+ }
+ lengthEqual(length) {
+ return this.addConstraint(typedArrayLengthEqual(length));
+ }
+ lengthNotEqual(length) {
+ return this.addConstraint(typedArrayLengthNotEqual(length));
+ }
+ lengthRange(start, endBefore) {
+ return this.addConstraint(typedArrayLengthRange(start, endBefore));
+ }
+ lengthRangeInclusive(startAt, endAt) {
+ return this.addConstraint(typedArrayLengthRangeInclusive(startAt, endAt));
+ }
+ lengthRangeExclusive(startAfter, endBefore) {
+ return this.addConstraint(typedArrayLengthRangeExclusive(startAfter, endBefore));
+ }
+ clone() {
+ return Reflect.construct(this.constructor, [this.type, this.constraints]);
+ }
+ handle(value) {
+ return TypedArrays[this.type](value) ? Result.ok(value) : Result.err(new ValidationError("s.typedArray", `Expected ${aOrAn(this.type)}`, value));
+ }
+};
+__name(TypedArrayValidator, "TypedArrayValidator");
+
+// src/lib/Shapes.ts
+var Shapes = class {
+ get string() {
+ return new StringValidator();
+ }
+ get number() {
+ return new NumberValidator();
+ }
+ get bigint() {
+ return new BigIntValidator();
+ }
+ get boolean() {
+ return new BooleanValidator();
+ }
+ get date() {
+ return new DateValidator();
+ }
+ object(shape) {
+ return new ObjectValidator(shape);
+ }
+ get undefined() {
+ return this.literal(void 0);
+ }
+ get null() {
+ return this.literal(null);
+ }
+ get nullish() {
+ return new NullishValidator();
+ }
+ get any() {
+ return new PassthroughValidator();
+ }
+ get unknown() {
+ return new PassthroughValidator();
+ }
+ get never() {
+ return new NeverValidator();
+ }
+ enum(...values) {
+ return this.union(...values.map((value) => this.literal(value)));
+ }
+ nativeEnum(enumShape) {
+ return new NativeEnumValidator(enumShape);
+ }
+ literal(value) {
+ if (value instanceof Date)
+ return this.date.equal(value);
+ return new LiteralValidator(value);
+ }
+ instance(expected) {
+ return new InstanceValidator(expected);
+ }
+ union(...validators) {
+ return new UnionValidator(validators);
+ }
+ array(validator) {
+ return new ArrayValidator(validator);
+ }
+ typedArray(type = "TypedArray") {
+ return new TypedArrayValidator(type);
+ }
+ get int8Array() {
+ return this.typedArray("Int8Array");
+ }
+ get uint8Array() {
+ return this.typedArray("Uint8Array");
+ }
+ get uint8ClampedArray() {
+ return this.typedArray("Uint8ClampedArray");
+ }
+ get int16Array() {
+ return this.typedArray("Int16Array");
+ }
+ get uint16Array() {
+ return this.typedArray("Uint16Array");
+ }
+ get int32Array() {
+ return this.typedArray("Int32Array");
+ }
+ get uint32Array() {
+ return this.typedArray("Uint32Array");
+ }
+ get float32Array() {
+ return this.typedArray("Float32Array");
+ }
+ get float64Array() {
+ return this.typedArray("Float64Array");
+ }
+ get bigInt64Array() {
+ return this.typedArray("BigInt64Array");
+ }
+ get bigUint64Array() {
+ return this.typedArray("BigUint64Array");
+ }
+ tuple(validators) {
+ return new TupleValidator(validators);
+ }
+ set(validator) {
+ return new SetValidator(validator);
+ }
+ record(validator) {
+ return new RecordValidator(validator);
+ }
+ map(keyValidator, valueValidator) {
+ return new MapValidator(keyValidator, valueValidator);
+ }
+ lazy(validator) {
+ return new LazyValidator(validator);
+ }
+};
+__name(Shapes, "Shapes");
+
+// src/index.ts
+var s = new Shapes();
+
+export { BaseError, CombinedError, CombinedPropertyError, ExpectedConstraintError, ExpectedValidationError, MissingPropertyError, MultiplePossibilitiesConstraintError, Result, UnknownEnumValueError, UnknownPropertyError, ValidationError, customInspectSymbol, customInspectSymbolStackLess, getGlobalValidationEnabled, s, setGlobalValidationEnabled };
+//# sourceMappingURL=out.js.map
+//# sourceMappingURL=index.mjs.map \ No newline at end of file
diff --git a/node_modules/@sapphire/shapeshift/dist/index.mjs.map b/node_modules/@sapphire/shapeshift/dist/index.mjs.map
new file mode 100644
index 0000000..46db7f3
--- /dev/null
+++ b/node_modules/@sapphire/shapeshift/dist/index.mjs.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/lib/configs.ts","../src/lib/Result.ts","../src/validators/util/getValue.ts","../src/constraints/ObjectConstrains.ts","../src/lib/errors/ExpectedConstraintError.ts","../src/lib/errors/BaseError.ts","../src/lib/errors/BaseConstraintError.ts","../src/validators/BaseValidator.ts","../src/constraints/util/isUnique.ts","../src/constraints/util/operators.ts","../src/constraints/ArrayConstraints.ts","../src/lib/errors/CombinedPropertyError.ts","../src/lib/errors/ValidationError.ts","../src/validators/ArrayValidator.ts","../src/constraints/BigIntConstraints.ts","../src/validators/BigIntValidator.ts","../src/constraints/BooleanConstraints.ts","../src/validators/BooleanValidator.ts","../src/constraints/DateConstraints.ts","../src/validators/DateValidator.ts","../src/lib/errors/ExpectedValidationError.ts","../src/validators/InstanceValidator.ts","../src/validators/LiteralValidator.ts","../src/validators/NeverValidator.ts","../src/validators/NullishValidator.ts","../src/constraints/NumberConstraints.ts","../src/validators/NumberValidator.ts","../src/lib/errors/MissingPropertyError.ts","../src/lib/errors/UnknownPropertyError.ts","../src/validators/DefaultValidator.ts","../src/lib/errors/CombinedError.ts","../src/validators/UnionValidator.ts","../src/validators/ObjectValidator.ts","../src/validators/PassthroughValidator.ts","../src/validators/RecordValidator.ts","../src/validators/SetValidator.ts","../src/constraints/util/emailValidator.ts","../src/constraints/util/net.ts","../src/constraints/util/phoneValidator.ts","../src/lib/errors/MultiplePossibilitiesConstraintError.ts","../src/constraints/util/common/combinedResultFn.ts","../src/constraints/util/urlValidators.ts","../src/constraints/StringConstraints.ts","../src/validators/StringValidator.ts","../src/validators/TupleValidator.ts","../src/validators/MapValidator.ts","../src/validators/LazyValidator.ts","../src/lib/errors/UnknownEnumValueError.ts","../src/validators/NativeEnumValidator.ts","../src/constraints/TypedArrayLengthConstraints.ts","../src/constraints/util/common/vowels.ts","../src/constraints/util/typedArray.ts","../src/validators/TypedArrayValidator.ts","../src/lib/Shapes.ts","../src/index.ts"],"names":["uniqueArray","inspect","value","s"],"mappings":";;;;AAAA,IAAI,oBAAoB;AAMjB,SAAS,2BAA2B,SAAkB;AAC5D,sBAAoB;AACrB;AAFgB;AAOT,SAAS,6BAA6B;AAC5C,SAAO;AACR;AAFgB;;;ACbT,IAAM,SAAN,MAAyC;AAAA,EAKvC,YAAY,SAAkB,OAAW,OAAW;AAC3D,SAAK,UAAU;AACf,QAAI,SAAS;AACZ,WAAK,QAAQ;AAAA,IACd,OAAO;AACN,WAAK,QAAQ;AAAA,IACd;AAAA,EACD;AAAA,EAEO,OAA4C;AAClD,WAAO,KAAK;AAAA,EACb;AAAA,EAEO,QAA8C;AACpD,WAAO,CAAC,KAAK;AAAA,EACd;AAAA,EAEO,SAAY;AAClB,QAAI,KAAK,KAAK;AAAG,aAAO,KAAK;AAC7B,UAAM,KAAK;AAAA,EACZ;AAAA,EAEA,OAAc,GAA+B,OAAwB;AACpE,WAAO,IAAI,OAAa,MAAM,KAAK;AAAA,EACpC;AAAA,EAEA,OAAc,IAAgC,OAAwB;AACrE,WAAO,IAAI,OAAa,OAAO,QAAW,KAAK;AAAA,EAChD;AACD;AAlCa;;;ACGN,SAAS,SAAkD,WAAiB;AAClF,SAAO,OAAO,cAAc,aAAa,UAAU,IAAI;AACxD;AAFgB;;;ACHhB,OAAO,SAAS;;;ACAhB,SAAS,eAA4C;;;ACE9C,IAAM,sBAAsB,OAAO,IAAI,4BAA4B;AACnE,IAAM,+BAA+B,OAAO,IAAI,uCAAuC;AAEvF,IAAe,YAAf,cAAiC,MAAM;A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ChD;AAAA,EAEA,IAAW,oBAAoB;AAC9B,WAAO,KAAK,WAA8B,mBAAmB;AAAA,EAC9D;AAAA,EAEA,IAAW,aAAa;AACvB,WAAO,KAAK,WAAuB,YAAY;AAAA,EAChD;AAAA,EAEA,IAAW,cAAc;AACxB,WAAO,KAAK,WAAwB,aAAa;AAAA,EAClD;AAAA,EAEA,IAAW,aAAa;AACvB,WAAO,KAAK,WAAuB,YAAY;AAAA,EAChD;AAAA,EAEA,IAAW,cAAc;AACxB,WAAO,KAAK,WAAwB,aAAa;AAAA,EAClD;AAAA,EAEA,IAAW,eAAe;AACzB,WAAO,KAAK,WAAyB,cAAc;AAAA,EACpD;AAAA,EAEA,IAAW,eAAe;AACzB,WAAO,KAAK,WAAyB,cAAc;AAAA,EACpD;AAAA,EAEA,IAAW,gBAAgB;AAC1B,WAAO,KAAK,WAA0B,eAAe;AAAA,EACtD;AAAA,EAEA,IAAW,iBAAiB;AAC3B,WAAO,KAAK,WAA2B,gBAAgB;AAAA,EACxD;AAAA,EAEO,MAA2C,YAAoD;AACrG,WAAO,IAAI,eAAe,UAAU;AAAA,EACrC;AAAA,EAEO,IAAO,WAA6B;AAC1C,WAAO,IAAI,aAAa,SAAS;AAAA,EAClC;AAAA,EAEO,OAAU,WAA6B;AAC7C,WAAO,IAAI,gBAAgB,SAAS;AAAA,EACrC;AAAA,EAEO,IAAU,cAAgC,gBAAkC;AAClF,WAAO,IAAI,aAAa,cAAc,cAAc;AAAA,EACrD;AAAA,EAEO,KAAuC,WAAkC;AAC/E,WAAO,IAAI,cAAc,SAAS;AAAA,EACnC;AACD;AA/Ia;;;ACzBN,IAAM,IAAI,IAAI,OAAO","sourcesContent":["let validationEnabled = true;\n\n/**\n * Sets whether validators should run on the input, or if the input should be passed through.\n * @param enabled Whether validation should be done on inputs\n */\nexport function setGlobalValidationEnabled(enabled: boolean) {\n\tvalidationEnabled = enabled;\n}\n\n/**\n * @returns Whether validation is enabled\n */\nexport function getGlobalValidationEnabled() {\n\treturn validationEnabled;\n}\n","export class Result<T, E extends Error = Error> {\n\tpublic readonly success: boolean;\n\tpublic readonly value?: T;\n\tpublic readonly error?: E;\n\n\tprivate constructor(success: boolean, value?: T, error?: E) {\n\t\tthis.success = success;\n\t\tif (success) {\n\t\t\tthis.value = value;\n\t\t} else {\n\t\t\tthis.error = error;\n\t\t}\n\t}\n\n\tpublic isOk(): this is { success: true; value: T } {\n\t\treturn this.success;\n\t}\n\n\tpublic isErr(): this is { success: false; error: E } {\n\t\treturn !this.success;\n\t}\n\n\tpublic unwrap(): T {\n\t\tif (this.isOk()) return this.value;\n\t\tthrow this.error as Error;\n\t}\n\n\tpublic static ok<T, E extends Error = Error>(value: T): Result<T, E> {\n\t\treturn new Result<T, E>(true, value);\n\t}\n\n\tpublic static err<T, E extends Error = Error>(error: E): Result<T, E> {\n\t\treturn new Result<T, E>(false, undefined, error);\n\t}\n}\n","// https://github.com/microsoft/TypeScript/issues/37663\ntype Fn = (...args: unknown[]) => unknown;\n\nexport function getValue<T, U = T extends Fn ? ReturnType<T> : T>(valueOrFn: T): U {\n\treturn typeof valueOrFn === 'function' ? valueOrFn() : valueOrFn;\n}\n","import get from 'lodash/get.js';\nimport { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { BaseValidator } from '../type-exports';\nimport type { IConstraint } from './type-exports';\n\nexport type ObjectConstraintName = `s.object(T.when)`;\n\nexport type WhenKey = PropertyKey | PropertyKey[];\n\nexport interface WhenOptions<T extends BaseValidator<any>, Key extends WhenKey> {\n\tis?: boolean | ((value: Key extends Array<any> ? any[] : any) => boolean);\n\tthen: (predicate: T) => T;\n\totherwise?: (predicate: T) => T;\n}\n\nexport function whenConstraint<T extends BaseValidator<any>, I, Key extends WhenKey>(\n\tkey: Key,\n\toptions: WhenOptions<T, Key>,\n\tvalidator: T\n): IConstraint<I> {\n\treturn {\n\t\trun(input: I, parent?: any) {\n\t\t\tif (!parent) {\n\t\t\t\treturn Result.err(new ExpectedConstraintError('s.object(T.when)', 'Validator has no parent', parent, 'Validator to have a parent'));\n\t\t\t}\n\n\t\t\tconst isKeyArray = Array.isArray(key);\n\n\t\t\tconst value = isKeyArray ? key.map((k) => get(parent, k)) : get(parent, key);\n\n\t\t\tconst predicate = resolveBooleanIs<T, Key>(options, value, isKeyArray) ? options.then : options.otherwise;\n\n\t\t\tif (predicate) {\n\t\t\t\treturn predicate(validator).run(input) as Result<I, ExpectedConstraintError<I>>;\n\t\t\t}\n\n\t\t\treturn Result.ok(input);\n\t\t}\n\t};\n}\n\nfunction resolveBooleanIs<T extends BaseValidator<any>, Key extends WhenKey>(options: WhenOptions<T, Key>, value: any, isKeyArray: boolean) {\n\tif (options.is === undefined) {\n\t\treturn isKeyArray ? !value.some((val: any) => !val) : Boolean(value);\n\t}\n\n\tif (typeof options.is === 'function') {\n\t\treturn options.is(value);\n\t}\n\n\treturn value === options.is;\n}\n","import { inspect, type InspectOptionsStylized } from 'util';\nimport { customInspectSymbolStackLess } from './BaseError';\nimport { BaseConstraintError, type ConstraintErrorNames } from './BaseConstraintError';\n\nexport class ExpectedConstraintError<T = unknown> extends BaseConstraintError<T> {\n\tpublic readonly expected: string;\n\n\tpublic constructor(constraint: ConstraintErrorNames, message: string, given: T, expected: string) {\n\t\tsuper(constraint, message, given);\n\t\tthis.expected = expected;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tconstraint: this.constraint,\n\t\t\tgiven: this.given,\n\t\t\texpected: this.expected\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst constraint = options.stylize(this.constraint, 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[ExpectedConstraintError: ${constraint}]`, 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1 };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\t\tconst given = inspect(this.given, newOptions).replace(/\\n/g, padding);\n\n\t\tconst header = `${options.stylize('ExpectedConstraintError', 'special')} > ${constraint}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst expectedBlock = `\\n ${options.stylize('Expected: ', 'string')}${options.stylize(this.expected, 'boolean')}`;\n\t\tconst givenBlock = `\\n ${options.stylize('Received:', 'regexp')}${padding}${given}`;\n\t\treturn `${header}\\n ${message}\\n${expectedBlock}\\n${givenBlock}`;\n\t}\n}\n","import type { InspectOptionsStylized } from 'util';\n\nexport const customInspectSymbol = Symbol.for('nodejs.util.inspect.custom');\nexport const customInspectSymbolStackLess = Symbol.for('nodejs.util.inspect.custom.stack-less');\n\nexport abstract class BaseError extends Error {\n\tprotected [customInspectSymbol](depth: number, options: InspectOptionsStylized) {\n\t\treturn `${this[customInspectSymbolStackLess](depth, options)}\\n${this.stack!.slice(this.stack!.indexOf('\\n'))}`;\n\t}\n\n\tprotected abstract [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string;\n}\n","import type {\n\tArrayConstraintName,\n\tBigIntConstraintName,\n\tBooleanConstraintName,\n\tDateConstraintName,\n\tNumberConstraintName,\n\tObjectConstraintName,\n\tStringConstraintName,\n\tTypedArrayConstraintName\n} from '../../constraints/type-exports';\nimport { BaseError } from './BaseError';\n\nexport type ConstraintErrorNames =\n\t| TypedArrayConstraintName\n\t| ArrayConstraintName\n\t| BigIntConstraintName\n\t| BooleanConstraintName\n\t| DateConstraintName\n\t| NumberConstraintName\n\t| ObjectConstraintName\n\t| StringConstraintName;\n\nexport abstract class BaseConstraintError<T = unknown> extends BaseError {\n\tpublic readonly constraint: ConstraintErrorNames;\n\tpublic readonly given: T;\n\n\tpublic constructor(constraint: ConstraintErrorNames, message: string, given: T) {\n\t\tsuper(message);\n\t\tthis.constraint = constraint;\n\t\tthis.given = given;\n\t}\n}\n","import { getGlobalValidationEnabled } from '../lib/configs';\nimport { Result } from '../lib/Result';\nimport { ArrayValidator, DefaultValidator, LiteralValidator, NullishValidator, SetValidator, UnionValidator } from './imports';\nimport { getValue } from './util/getValue';\nimport { whenConstraint, type WhenKey, type WhenOptions } from '../constraints/ObjectConstrains';\nimport type { CombinedError } from '../lib/errors/CombinedError';\nimport type { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport type { UnknownEnumValueError } from '../lib/errors/UnknownEnumValueError';\nimport type { ValidationError } from '../lib/errors/ValidationError';\nimport type { BaseConstraintError, InferResultType } from '../type-exports';\nimport type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\n\nexport abstract class BaseValidator<T> {\n\tpublic description?: string;\n\tprotected parent?: object;\n\tprotected constraints: readonly IConstraint<T>[] = [];\n\tprotected isValidationEnabled: boolean | (() => boolean) | null = null;\n\n\tpublic constructor(constraints: readonly IConstraint<T>[] = []) {\n\t\tthis.constraints = constraints;\n\t}\n\n\tpublic setParent(parent: object): this {\n\t\tthis.parent = parent;\n\t\treturn this;\n\t}\n\n\tpublic get optional(): UnionValidator<T | undefined> {\n\t\treturn new UnionValidator([new LiteralValidator(undefined), this.clone()]);\n\t}\n\n\tpublic get nullable(): UnionValidator<T | null> {\n\t\treturn new UnionValidator([new LiteralValidator(null), this.clone()]);\n\t}\n\n\tpublic get nullish(): UnionValidator<T | null | undefined> {\n\t\treturn new UnionValidator([new NullishValidator(), this.clone()]);\n\t}\n\n\tpublic get array(): ArrayValidator<T[]> {\n\t\treturn new ArrayValidator<T[]>(this.clone());\n\t}\n\n\tpublic get set(): SetValidator<T> {\n\t\treturn new SetValidator<T>(this.clone());\n\t}\n\n\tpublic or<O>(...predicates: readonly BaseValidator<O>[]): UnionValidator<T | O> {\n\t\treturn new UnionValidator<T | O>([this.clone(), ...predicates]);\n\t}\n\n\tpublic transform(cb: (value: T) => T): this;\n\tpublic transform<O>(cb: (value: T) => O): BaseValidator<O>;\n\tpublic transform<O>(cb: (value: T) => O): BaseValidator<O> {\n\t\treturn this.addConstraint({ run: (input) => Result.ok(cb(input) as unknown as T) }) as unknown as BaseValidator<O>;\n\t}\n\n\tpublic reshape(cb: (input: T) => Result<T>): this;\n\tpublic reshape<R extends Result<unknown>, O = InferResultType<R>>(cb: (input: T) => R): BaseValidator<O>;\n\tpublic reshape<R extends Result<unknown>, O = InferResultType<R>>(cb: (input: T) => R): BaseValidator<O> {\n\t\treturn this.addConstraint({ run: cb as unknown as (input: T) => Result<T, BaseConstraintError<T>> }) as unknown as BaseValidator<O>;\n\t}\n\n\tpublic default(value: Exclude<T, undefined> | (() => Exclude<T, undefined>)): DefaultValidator<Exclude<T, undefined>> {\n\t\treturn new DefaultValidator(this.clone() as unknown as BaseValidator<Exclude<T, undefined>>, value);\n\t}\n\n\tpublic when<Key extends WhenKey, This extends BaseValidator<any> = this>(key: Key, options: WhenOptions<This, Key>): this {\n\t\treturn this.addConstraint(whenConstraint<This, T, Key>(key, options, this as unknown as This));\n\t}\n\n\tpublic describe(description: string): this {\n\t\tconst clone = this.clone();\n\t\tclone.description = description;\n\t\treturn clone;\n\t}\n\n\tpublic run(value: unknown): Result<T, BaseError> {\n\t\tlet result = this.handle(value) as Result<T, BaseError>;\n\t\tif (result.isErr()) return result;\n\n\t\tfor (const constraint of this.constraints) {\n\t\t\tresult = constraint.run(result.value as T, this.parent);\n\t\t\tif (result.isErr()) break;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tpublic parse<R extends T = T>(value: unknown): R {\n\t\t// If validation is disabled (at the validator or global level), we only run the `handle` method, which will do some basic checks\n\t\t// (like that the input is a string for a string validator)\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn this.handle(value).unwrap() as R;\n\t\t}\n\n\t\treturn this.constraints.reduce((v, constraint) => constraint.run(v).unwrap(), this.handle(value).unwrap()) as R;\n\t}\n\n\tpublic is<R extends T = T>(value: unknown): value is R {\n\t\treturn this.run(value).isOk();\n\t}\n\n\t/**\n\t * Sets if the validator should also run constraints or just do basic checks.\n\t * @param isValidationEnabled Whether this validator should be enabled or disabled. You can pass boolean or a function returning boolean which will be called just before parsing.\n\t * Set to `null` to go off of the global configuration.\n\t */\n\tpublic setValidationEnabled(isValidationEnabled: boolean | (() => boolean) | null): this {\n\t\tconst clone = this.clone();\n\t\tclone.isValidationEnabled = isValidationEnabled;\n\t\treturn clone;\n\t}\n\n\tpublic getValidationEnabled() {\n\t\treturn getValue(this.isValidationEnabled);\n\t}\n\n\tprotected get shouldRunConstraints(): boolean {\n\t\treturn getValue(this.isValidationEnabled) ?? getGlobalValidationEnabled();\n\t}\n\n\tprotected clone(): this {\n\t\tconst clone: this = Reflect.construct(this.constructor, [this.constraints]);\n\t\tclone.isValidationEnabled = this.isValidationEnabled;\n\t\treturn clone;\n\t}\n\n\tprotected abstract handle(value: unknown): Result<T, ValidatorError>;\n\n\tprotected addConstraint(constraint: IConstraint<T>): this {\n\t\tconst clone = this.clone();\n\t\tclone.constraints = clone.constraints.concat(constraint);\n\t\treturn clone;\n\t}\n}\n\nexport type ValidatorError = ValidationError | CombinedError | CombinedPropertyError | UnknownEnumValueError;\n","import fastDeepEqual from 'fast-deep-equal/es6/index.js';\nimport uniqWith from 'lodash/uniqWith.js';\n\nexport function isUnique(input: unknown[]) {\n\tif (input.length < 2) return true;\n\tconst uniqueArray = uniqWith(input, fastDeepEqual);\n\treturn uniqueArray.length === input.length;\n}\n","export function lessThan(a: number, b: number): boolean;\nexport function lessThan(a: bigint, b: bigint): boolean;\nexport function lessThan(a: number | bigint, b: number | bigint): boolean {\n\treturn a < b;\n}\n\nexport function lessThanOrEqual(a: number, b: number): boolean;\nexport function lessThanOrEqual(a: bigint, b: bigint): boolean;\nexport function lessThanOrEqual(a: number | bigint, b: number | bigint): boolean {\n\treturn a <= b;\n}\n\nexport function greaterThan(a: number, b: number): boolean;\nexport function greaterThan(a: bigint, b: bigint): boolean;\nexport function greaterThan(a: number | bigint, b: number | bigint): boolean {\n\treturn a > b;\n}\n\nexport function greaterThanOrEqual(a: number, b: number): boolean;\nexport function greaterThanOrEqual(a: bigint, b: bigint): boolean;\nexport function greaterThanOrEqual(a: number | bigint, b: number | bigint): boolean {\n\treturn a >= b;\n}\n\nexport function equal(a: number, b: number): boolean;\nexport function equal(a: bigint, b: bigint): boolean;\nexport function equal(a: number | bigint, b: number | bigint): boolean {\n\treturn a === b;\n}\n\nexport function notEqual(a: number, b: number): boolean;\nexport function notEqual(a: bigint, b: bigint): boolean;\nexport function notEqual(a: number | bigint, b: number | bigint): boolean {\n\treturn a !== b;\n}\n\nexport interface Comparator {\n\t(a: number, b: number): boolean;\n\t(a: bigint, b: bigint): boolean;\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { isUnique } from './util/isUnique';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\n\nexport type ArrayConstraintName = `s.array(T).${\n\t| 'unique'\n\t| `length${\n\t\t\t| 'LessThan'\n\t\t\t| 'LessThanOrEqual'\n\t\t\t| 'GreaterThan'\n\t\t\t| 'GreaterThanOrEqual'\n\t\t\t| 'Equal'\n\t\t\t| 'NotEqual'\n\t\t\t| 'Range'\n\t\t\t| 'RangeInclusive'\n\t\t\t| 'RangeExclusive'}`}`;\n\nfunction arrayLengthComparator<T>(comparator: Comparator, name: ArrayConstraintName, expected: string, length: number): IConstraint<T[]> {\n\treturn {\n\t\trun(input: T[]) {\n\t\t\treturn comparator(input.length, length) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function arrayLengthLessThan<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length < ${value}`;\n\treturn arrayLengthComparator(lessThan, 's.array(T).lengthLessThan', expected, value);\n}\n\nexport function arrayLengthLessThanOrEqual<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length <= ${value}`;\n\treturn arrayLengthComparator(lessThanOrEqual, 's.array(T).lengthLessThanOrEqual', expected, value);\n}\n\nexport function arrayLengthGreaterThan<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length > ${value}`;\n\treturn arrayLengthComparator(greaterThan, 's.array(T).lengthGreaterThan', expected, value);\n}\n\nexport function arrayLengthGreaterThanOrEqual<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length >= ${value}`;\n\treturn arrayLengthComparator(greaterThanOrEqual, 's.array(T).lengthGreaterThanOrEqual', expected, value);\n}\n\nexport function arrayLengthEqual<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length === ${value}`;\n\treturn arrayLengthComparator(equal, 's.array(T).lengthEqual', expected, value);\n}\n\nexport function arrayLengthNotEqual<T>(value: number): IConstraint<T[]> {\n\tconst expected = `expected.length !== ${value}`;\n\treturn arrayLengthComparator(notEqual, 's.array(T).lengthNotEqual', expected, value);\n}\n\nexport function arrayLengthRange<T>(start: number, endBefore: number): IConstraint<T[]> {\n\tconst expected = `expected.length >= ${start} && expected.length < ${endBefore}`;\n\treturn {\n\t\trun(input: T[]) {\n\t\t\treturn input.length >= start && input.length < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.array(T).lengthRange', 'Invalid Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function arrayLengthRangeInclusive<T>(start: number, end: number): IConstraint<T[]> {\n\tconst expected = `expected.length >= ${start} && expected.length <= ${end}`;\n\treturn {\n\t\trun(input: T[]) {\n\t\t\treturn input.length >= start && input.length <= end //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.array(T).lengthRangeInclusive', 'Invalid Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function arrayLengthRangeExclusive<T>(startAfter: number, endBefore: number): IConstraint<T[]> {\n\tconst expected = `expected.length > ${startAfter} && expected.length < ${endBefore}`;\n\treturn {\n\t\trun(input: T[]) {\n\t\t\treturn input.length > startAfter && input.length < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.array(T).lengthRangeExclusive', 'Invalid Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport const uniqueArray: IConstraint<unknown[]> = {\n\trun(input: unknown[]) {\n\t\treturn isUnique(input) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(new ExpectedConstraintError('s.array(T).unique', 'Array values are not unique', input, 'Expected all values to be unique'));\n\t}\n};\n","import type { InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class CombinedPropertyError extends BaseError {\n\tpublic readonly errors: [PropertyKey, BaseError][];\n\n\tpublic constructor(errors: [PropertyKey, BaseError][]) {\n\t\tsuper('Received one or more errors');\n\n\t\tthis.errors = errors;\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize('[CombinedPropertyError]', 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1, compact: true };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\n\t\tconst header = `${options.stylize('CombinedPropertyError', 'special')} (${options.stylize(this.errors.length.toString(), 'number')})`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst errors = this.errors\n\t\t\t.map(([key, error]) => {\n\t\t\t\tconst property = CombinedPropertyError.formatProperty(key, options);\n\t\t\t\tconst body = error[customInspectSymbolStackLess](depth - 1, newOptions).replace(/\\n/g, padding);\n\n\t\t\t\treturn ` input${property}${padding}${body}`;\n\t\t\t})\n\t\t\t.join('\\n\\n');\n\t\treturn `${header}\\n ${message}\\n\\n${errors}`;\n\t}\n\n\tprivate static formatProperty(key: PropertyKey, options: InspectOptionsStylized): string {\n\t\tif (typeof key === 'string') return options.stylize(`.${key}`, 'symbol');\n\t\tif (typeof key === 'number') return `[${options.stylize(key.toString(), 'number')}]`;\n\t\treturn `[${options.stylize('Symbol', 'symbol')}(${key.description})]`;\n\t}\n}\n","import { inspect, type InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class ValidationError extends BaseError {\n\tpublic readonly validator: string;\n\tpublic readonly given: unknown;\n\n\tpublic constructor(validator: string, message: string, given: unknown) {\n\t\tsuper(message);\n\n\t\tthis.validator = validator;\n\t\tthis.given = given;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tvalidator: this.validator,\n\t\t\tgiven: this.given\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst validator = options.stylize(this.validator, 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[ValidationError: ${validator}]`, 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1, compact: true };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\t\tconst given = inspect(this.given, newOptions).replace(/\\n/g, padding);\n\n\t\tconst header = `${options.stylize('ValidationError', 'special')} > ${validator}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst givenBlock = `\\n ${options.stylize('Received:', 'regexp')}${padding}${given}`;\n\t\treturn `${header}\\n ${message}\\n${givenBlock}`;\n\t}\n}\n","import {\n\tarrayLengthEqual,\n\tarrayLengthGreaterThan,\n\tarrayLengthGreaterThanOrEqual,\n\tarrayLengthLessThan,\n\tarrayLengthLessThanOrEqual,\n\tarrayLengthNotEqual,\n\tarrayLengthRange,\n\tarrayLengthRangeExclusive,\n\tarrayLengthRangeInclusive,\n\tuniqueArray\n} from '../constraints/ArrayConstraints';\nimport type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport type { ExpandSmallerTuples, Tuple, UnshiftTuple } from '../lib/util-types';\nimport { BaseValidator } from './imports';\n\nexport class ArrayValidator<T extends unknown[], I = T[number]> extends BaseValidator<T> {\n\tprivate readonly validator: BaseValidator<I>;\n\n\tpublic constructor(validator: BaseValidator<I>, constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validator = validator;\n\t}\n\n\tpublic lengthLessThan<N extends number>(length: N): ArrayValidator<ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, N>]>>> {\n\t\treturn this.addConstraint(arrayLengthLessThan(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthLessThanOrEqual<N extends number>(length: N): ArrayValidator<ExpandSmallerTuples<[...Tuple<I, N>]>> {\n\t\treturn this.addConstraint(arrayLengthLessThanOrEqual(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthGreaterThan<N extends number>(length: N): ArrayValidator<[...Tuple<I, N>, I, ...T]> {\n\t\treturn this.addConstraint(arrayLengthGreaterThan(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthGreaterThanOrEqual<N extends number>(length: N): ArrayValidator<[...Tuple<I, N>, ...T]> {\n\t\treturn this.addConstraint(arrayLengthGreaterThanOrEqual(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthEqual<N extends number>(length: N): ArrayValidator<[...Tuple<I, N>]> {\n\t\treturn this.addConstraint(arrayLengthEqual(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthNotEqual(length: number): ArrayValidator<[...T]> {\n\t\treturn this.addConstraint(arrayLengthNotEqual(length) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthRange<S extends number, E extends number>(\n\t\tstart: S,\n\t\tendBefore: E\n\t): ArrayValidator<Exclude<ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, E>]>>, ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, S>]>>>> {\n\t\treturn this.addConstraint(arrayLengthRange(start, endBefore) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthRangeInclusive<S extends number, E extends number>(\n\t\tstartAt: S,\n\t\tendAt: E\n\t): ArrayValidator<Exclude<ExpandSmallerTuples<[...Tuple<I, E>]>, ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, S>]>>>> {\n\t\treturn this.addConstraint(arrayLengthRangeInclusive(startAt, endAt) as IConstraint<T>) as any;\n\t}\n\n\tpublic lengthRangeExclusive<S extends number, E extends number>(\n\t\tstartAfter: S,\n\t\tendBefore: E\n\t): ArrayValidator<Exclude<ExpandSmallerTuples<UnshiftTuple<[...Tuple<I, E>]>>, ExpandSmallerTuples<[...Tuple<T, S>]>>> {\n\t\treturn this.addConstraint(arrayLengthRangeExclusive(startAfter, endBefore) as IConstraint<T>) as any;\n\t}\n\n\tpublic get unique(): this {\n\t\treturn this.addConstraint(uniqueArray as IConstraint<T>);\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validator, this.constraints]);\n\t}\n\n\tprotected handle(values: unknown): Result<T, ValidationError | CombinedPropertyError> {\n\t\tif (!Array.isArray(values)) {\n\t\t\treturn Result.err(new ValidationError('s.array(T)', 'Expected an array', values));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(values as T);\n\t\t}\n\n\t\tconst errors: [number, BaseError][] = [];\n\t\tconst transformed: T = [] as unknown as T;\n\n\t\tfor (let i = 0; i < values.length; i++) {\n\t\t\tconst result = this.validator.run(values[i]);\n\t\t\tif (result.isOk()) transformed.push(result.value);\n\t\t\telse errors.push([i, result.error!]);\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(transformed)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\n\nexport type BigIntConstraintName = `s.bigint.${\n\t| 'lessThan'\n\t| 'lessThanOrEqual'\n\t| 'greaterThan'\n\t| 'greaterThanOrEqual'\n\t| 'equal'\n\t| 'notEqual'\n\t| 'divisibleBy'}`;\n\nfunction bigintComparator(comparator: Comparator, name: BigIntConstraintName, expected: string, number: bigint): IConstraint<bigint> {\n\treturn {\n\t\trun(input: bigint) {\n\t\t\treturn comparator(input, number) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid bigint value', input, expected));\n\t\t}\n\t};\n}\n\nexport function bigintLessThan(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected < ${value}n`;\n\treturn bigintComparator(lessThan, 's.bigint.lessThan', expected, value);\n}\n\nexport function bigintLessThanOrEqual(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected <= ${value}n`;\n\treturn bigintComparator(lessThanOrEqual, 's.bigint.lessThanOrEqual', expected, value);\n}\n\nexport function bigintGreaterThan(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected > ${value}n`;\n\treturn bigintComparator(greaterThan, 's.bigint.greaterThan', expected, value);\n}\n\nexport function bigintGreaterThanOrEqual(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected >= ${value}n`;\n\treturn bigintComparator(greaterThanOrEqual, 's.bigint.greaterThanOrEqual', expected, value);\n}\n\nexport function bigintEqual(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected === ${value}n`;\n\treturn bigintComparator(equal, 's.bigint.equal', expected, value);\n}\n\nexport function bigintNotEqual(value: bigint): IConstraint<bigint> {\n\tconst expected = `expected !== ${value}n`;\n\treturn bigintComparator(notEqual, 's.bigint.notEqual', expected, value);\n}\n\nexport function bigintDivisibleBy(divider: bigint): IConstraint<bigint> {\n\tconst expected = `expected % ${divider}n === 0n`;\n\treturn {\n\t\trun(input: bigint) {\n\t\t\treturn input % divider === 0n //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.bigint.divisibleBy', 'BigInt is not divisible', input, expected));\n\t\t}\n\t};\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport {\n\tbigintDivisibleBy,\n\tbigintEqual,\n\tbigintGreaterThan,\n\tbigintGreaterThanOrEqual,\n\tbigintLessThan,\n\tbigintLessThanOrEqual,\n\tbigintNotEqual\n} from '../constraints/BigIntConstraints';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class BigIntValidator<T extends bigint> extends BaseValidator<T> {\n\tpublic lessThan(number: bigint): this {\n\t\treturn this.addConstraint(bigintLessThan(number) as IConstraint<T>);\n\t}\n\n\tpublic lessThanOrEqual(number: bigint): this {\n\t\treturn this.addConstraint(bigintLessThanOrEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic greaterThan(number: bigint): this {\n\t\treturn this.addConstraint(bigintGreaterThan(number) as IConstraint<T>);\n\t}\n\n\tpublic greaterThanOrEqual(number: bigint): this {\n\t\treturn this.addConstraint(bigintGreaterThanOrEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic equal<N extends bigint>(number: N): BigIntValidator<N> {\n\t\treturn this.addConstraint(bigintEqual(number) as IConstraint<T>) as unknown as BigIntValidator<N>;\n\t}\n\n\tpublic notEqual(number: bigint): this {\n\t\treturn this.addConstraint(bigintNotEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic get positive(): this {\n\t\treturn this.greaterThanOrEqual(0n);\n\t}\n\n\tpublic get negative(): this {\n\t\treturn this.lessThan(0n);\n\t}\n\n\tpublic divisibleBy(number: bigint): this {\n\t\treturn this.addConstraint(bigintDivisibleBy(number) as IConstraint<T>);\n\t}\n\n\tpublic get abs(): this {\n\t\treturn this.transform((value) => (value < 0 ? -value : value) as T);\n\t}\n\n\tpublic intN(bits: number): this {\n\t\treturn this.transform((value) => BigInt.asIntN(bits, value) as T);\n\t}\n\n\tpublic uintN(bits: number): this {\n\t\treturn this.transform((value) => BigInt.asUintN(bits, value) as T);\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn typeof value === 'bigint' //\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ValidationError('s.bigint', 'Expected a bigint primitive', value));\n\t}\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\n\nexport type BooleanConstraintName = `s.boolean.${boolean}`;\n\nexport const booleanTrue: IConstraint<boolean, true> = {\n\trun(input: boolean) {\n\t\treturn input //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(new ExpectedConstraintError('s.boolean.true', 'Invalid boolean value', input, 'true'));\n\t}\n};\n\nexport const booleanFalse: IConstraint<boolean, false> = {\n\trun(input: boolean) {\n\t\treturn input //\n\t\t\t? Result.err(new ExpectedConstraintError('s.boolean.false', 'Invalid boolean value', input, 'false'))\n\t\t\t: Result.ok(input);\n\t}\n};\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport { booleanFalse, booleanTrue } from '../constraints/BooleanConstraints';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class BooleanValidator<T extends boolean = boolean> extends BaseValidator<T> {\n\tpublic get true(): BooleanValidator<true> {\n\t\treturn this.addConstraint(booleanTrue as IConstraint<T>) as BooleanValidator<true>;\n\t}\n\n\tpublic get false(): BooleanValidator<false> {\n\t\treturn this.addConstraint(booleanFalse as IConstraint<T>) as BooleanValidator<false>;\n\t}\n\n\tpublic equal<R extends true | false>(value: R): BooleanValidator<R> {\n\t\treturn (value ? this.true : this.false) as BooleanValidator<R>;\n\t}\n\n\tpublic notEqual<R extends true | false>(value: R): BooleanValidator<R> {\n\t\treturn (value ? this.false : this.true) as BooleanValidator<R>;\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn typeof value === 'boolean' //\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ValidationError('s.boolean', 'Expected a boolean primitive', value));\n\t}\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\n\nexport type DateConstraintName = `s.date.${\n\t| 'lessThan'\n\t| 'lessThanOrEqual'\n\t| 'greaterThan'\n\t| 'greaterThanOrEqual'\n\t| 'equal'\n\t| 'notEqual'\n\t| 'valid'\n\t| 'invalid'}`;\n\nfunction dateComparator(comparator: Comparator, name: DateConstraintName, expected: string, number: number): IConstraint<Date> {\n\treturn {\n\t\trun(input: Date) {\n\t\t\treturn comparator(input.getTime(), number) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid Date value', input, expected));\n\t\t}\n\t};\n}\n\nexport function dateLessThan(value: Date): IConstraint<Date> {\n\tconst expected = `expected < ${value.toISOString()}`;\n\treturn dateComparator(lessThan, 's.date.lessThan', expected, value.getTime());\n}\n\nexport function dateLessThanOrEqual(value: Date): IConstraint<Date> {\n\tconst expected = `expected <= ${value.toISOString()}`;\n\treturn dateComparator(lessThanOrEqual, 's.date.lessThanOrEqual', expected, value.getTime());\n}\n\nexport function dateGreaterThan(value: Date): IConstraint<Date> {\n\tconst expected = `expected > ${value.toISOString()}`;\n\treturn dateComparator(greaterThan, 's.date.greaterThan', expected, value.getTime());\n}\n\nexport function dateGreaterThanOrEqual(value: Date): IConstraint<Date> {\n\tconst expected = `expected >= ${value.toISOString()}`;\n\treturn dateComparator(greaterThanOrEqual, 's.date.greaterThanOrEqual', expected, value.getTime());\n}\n\nexport function dateEqual(value: Date): IConstraint<Date> {\n\tconst expected = `expected === ${value.toISOString()}`;\n\treturn dateComparator(equal, 's.date.equal', expected, value.getTime());\n}\n\nexport function dateNotEqual(value: Date): IConstraint<Date> {\n\tconst expected = `expected !== ${value.toISOString()}`;\n\treturn dateComparator(notEqual, 's.date.notEqual', expected, value.getTime());\n}\n\nexport const dateInvalid: IConstraint<Date> = {\n\trun(input: Date) {\n\t\treturn Number.isNaN(input.getTime()) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(new ExpectedConstraintError('s.date.invalid', 'Invalid Date value', input, 'expected === NaN'));\n\t}\n};\n\nexport const dateValid: IConstraint<Date> = {\n\trun(input: Date) {\n\t\treturn Number.isNaN(input.getTime()) //\n\t\t\t? Result.err(new ExpectedConstraintError('s.date.valid', 'Invalid Date value', input, 'expected !== NaN'))\n\t\t\t: Result.ok(input);\n\t}\n};\n","import {\n\tdateEqual,\n\tdateGreaterThan,\n\tdateGreaterThanOrEqual,\n\tdateInvalid,\n\tdateLessThan,\n\tdateLessThanOrEqual,\n\tdateNotEqual,\n\tdateValid\n} from '../constraints/DateConstraints';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class DateValidator extends BaseValidator<Date> {\n\tpublic lessThan(date: Date | number | string): this {\n\t\treturn this.addConstraint(dateLessThan(new Date(date)));\n\t}\n\n\tpublic lessThanOrEqual(date: Date | number | string): this {\n\t\treturn this.addConstraint(dateLessThanOrEqual(new Date(date)));\n\t}\n\n\tpublic greaterThan(date: Date | number | string): this {\n\t\treturn this.addConstraint(dateGreaterThan(new Date(date)));\n\t}\n\n\tpublic greaterThanOrEqual(date: Date | number | string): this {\n\t\treturn this.addConstraint(dateGreaterThanOrEqual(new Date(date)));\n\t}\n\n\tpublic equal(date: Date | number | string): this {\n\t\tconst resolved = new Date(date);\n\t\treturn Number.isNaN(resolved.getTime()) //\n\t\t\t? this.invalid\n\t\t\t: this.addConstraint(dateEqual(resolved));\n\t}\n\n\tpublic notEqual(date: Date | number | string): this {\n\t\tconst resolved = new Date(date);\n\t\treturn Number.isNaN(resolved.getTime()) //\n\t\t\t? this.valid\n\t\t\t: this.addConstraint(dateNotEqual(resolved));\n\t}\n\n\tpublic get valid(): this {\n\t\treturn this.addConstraint(dateValid);\n\t}\n\n\tpublic get invalid(): this {\n\t\treturn this.addConstraint(dateInvalid);\n\t}\n\n\tprotected handle(value: unknown): Result<Date, ValidationError> {\n\t\treturn value instanceof Date //\n\t\t\t? Result.ok(value)\n\t\t\t: Result.err(new ValidationError('s.date', 'Expected a Date', value));\n\t}\n}\n","import { inspect, type InspectOptionsStylized } from 'util';\nimport { customInspectSymbolStackLess } from './BaseError';\nimport { ValidationError } from './ValidationError';\n\nexport class ExpectedValidationError<T> extends ValidationError {\n\tpublic readonly expected: T;\n\n\tpublic constructor(validator: string, message: string, given: unknown, expected: T) {\n\t\tsuper(validator, message, given);\n\t\tthis.expected = expected;\n\t}\n\n\tpublic override toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tvalidator: this.validator,\n\t\t\tgiven: this.given,\n\t\t\texpected: this.expected\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst validator = options.stylize(this.validator, 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[ExpectedValidationError: ${validator}]`, 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1 };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\t\tconst expected = inspect(this.expected, newOptions).replace(/\\n/g, padding);\n\t\tconst given = inspect(this.given, newOptions).replace(/\\n/g, padding);\n\n\t\tconst header = `${options.stylize('ExpectedValidationError', 'special')} > ${validator}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst expectedBlock = `\\n ${options.stylize('Expected:', 'string')}${padding}${expected}`;\n\t\tconst givenBlock = `\\n ${options.stylize('Received:', 'regexp')}${padding}${given}`;\n\t\treturn `${header}\\n ${message}\\n${expectedBlock}\\n${givenBlock}`;\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport { ExpectedValidationError } from '../lib/errors/ExpectedValidationError';\nimport { Result } from '../lib/Result';\nimport type { Constructor } from '../lib/util-types';\nimport { BaseValidator } from './imports';\n\nexport class InstanceValidator<T> extends BaseValidator<T> {\n\tpublic readonly expected: Constructor<T>;\n\n\tpublic constructor(expected: Constructor<T>, constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.expected = expected;\n\t}\n\n\tprotected handle(value: unknown): Result<T, ExpectedValidationError<Constructor<T>>> {\n\t\treturn value instanceof this.expected //\n\t\t\t? Result.ok(value)\n\t\t\t: Result.err(new ExpectedValidationError('s.instance(V)', 'Expected', value, this.expected));\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.expected, this.constraints]);\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport { ExpectedValidationError } from '../lib/errors/ExpectedValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class LiteralValidator<T> extends BaseValidator<T> {\n\tpublic readonly expected: T;\n\n\tpublic constructor(literal: T, constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.expected = literal;\n\t}\n\n\tprotected handle(value: unknown): Result<T, ExpectedValidationError<T>> {\n\t\treturn Object.is(value, this.expected) //\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ExpectedValidationError('s.literal(V)', 'Expected values to be equals', value, this.expected));\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.expected, this.constraints]);\n\t}\n}\n","import { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class NeverValidator extends BaseValidator<never> {\n\tprotected handle(value: unknown): Result<never, ValidationError> {\n\t\treturn Result.err(new ValidationError('s.never', 'Expected a value to not be passed', value));\n\t}\n}\n","import { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class NullishValidator extends BaseValidator<undefined | null> {\n\tprotected handle(value: unknown): Result<undefined | null, ValidationError> {\n\t\treturn value === undefined || value === null //\n\t\t\t? Result.ok(value)\n\t\t\t: Result.err(new ValidationError('s.nullish', 'Expected undefined or null', value));\n\t}\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\n\nexport type NumberConstraintName = `s.number.${\n\t| 'lessThan'\n\t| 'lessThanOrEqual'\n\t| 'greaterThan'\n\t| 'greaterThanOrEqual'\n\t| 'equal'\n\t| 'equal(NaN)'\n\t| 'notEqual'\n\t| 'notEqual(NaN)'\n\t| 'int'\n\t| 'safeInt'\n\t| 'finite'\n\t| 'divisibleBy'}`;\n\nfunction numberComparator(comparator: Comparator, name: NumberConstraintName, expected: string, number: number): IConstraint<number> {\n\treturn {\n\t\trun(input: number) {\n\t\t\treturn comparator(input, number) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid number value', input, expected));\n\t\t}\n\t};\n}\n\nexport function numberLessThan(value: number): IConstraint<number> {\n\tconst expected = `expected < ${value}`;\n\treturn numberComparator(lessThan, 's.number.lessThan', expected, value);\n}\n\nexport function numberLessThanOrEqual(value: number): IConstraint<number> {\n\tconst expected = `expected <= ${value}`;\n\treturn numberComparator(lessThanOrEqual, 's.number.lessThanOrEqual', expected, value);\n}\n\nexport function numberGreaterThan(value: number): IConstraint<number> {\n\tconst expected = `expected > ${value}`;\n\treturn numberComparator(greaterThan, 's.number.greaterThan', expected, value);\n}\n\nexport function numberGreaterThanOrEqual(value: number): IConstraint<number> {\n\tconst expected = `expected >= ${value}`;\n\treturn numberComparator(greaterThanOrEqual, 's.number.greaterThanOrEqual', expected, value);\n}\n\nexport function numberEqual(value: number): IConstraint<number> {\n\tconst expected = `expected === ${value}`;\n\treturn numberComparator(equal, 's.number.equal', expected, value);\n}\n\nexport function numberNotEqual(value: number): IConstraint<number> {\n\tconst expected = `expected !== ${value}`;\n\treturn numberComparator(notEqual, 's.number.notEqual', expected, value);\n}\n\nexport const numberInt: IConstraint<number> = {\n\trun(input: number) {\n\t\treturn Number.isInteger(input) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(\n\t\t\t\t\tnew ExpectedConstraintError('s.number.int', 'Given value is not an integer', input, 'Number.isInteger(expected) to be true')\n\t\t\t );\n\t}\n};\n\nexport const numberSafeInt: IConstraint<number> = {\n\trun(input: number) {\n\t\treturn Number.isSafeInteger(input) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(\n\t\t\t\t\tnew ExpectedConstraintError(\n\t\t\t\t\t\t's.number.safeInt',\n\t\t\t\t\t\t'Given value is not a safe integer',\n\t\t\t\t\t\tinput,\n\t\t\t\t\t\t'Number.isSafeInteger(expected) to be true'\n\t\t\t\t\t)\n\t\t\t );\n\t}\n};\n\nexport const numberFinite: IConstraint<number> = {\n\trun(input: number) {\n\t\treturn Number.isFinite(input) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(new ExpectedConstraintError('s.number.finite', 'Given value is not finite', input, 'Number.isFinite(expected) to be true'));\n\t}\n};\n\nexport const numberNaN: IConstraint<number> = {\n\trun(input: number) {\n\t\treturn Number.isNaN(input) //\n\t\t\t? Result.ok(input)\n\t\t\t: Result.err(new ExpectedConstraintError('s.number.equal(NaN)', 'Invalid number value', input, 'expected === NaN'));\n\t}\n};\n\nexport const numberNotNaN: IConstraint<number> = {\n\trun(input: number) {\n\t\treturn Number.isNaN(input) //\n\t\t\t? Result.err(new ExpectedConstraintError('s.number.notEqual(NaN)', 'Invalid number value', input, 'expected !== NaN'))\n\t\t\t: Result.ok(input);\n\t}\n};\n\nexport function numberDivisibleBy(divider: number): IConstraint<number> {\n\tconst expected = `expected % ${divider} === 0`;\n\treturn {\n\t\trun(input: number) {\n\t\t\treturn input % divider === 0 //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.number.divisibleBy', 'Number is not divisible', input, expected));\n\t\t}\n\t};\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport {\n\tnumberDivisibleBy,\n\tnumberEqual,\n\tnumberFinite,\n\tnumberGreaterThan,\n\tnumberGreaterThanOrEqual,\n\tnumberInt,\n\tnumberLessThan,\n\tnumberLessThanOrEqual,\n\tnumberNaN,\n\tnumberNotEqual,\n\tnumberNotNaN,\n\tnumberSafeInt\n} from '../constraints/NumberConstraints';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class NumberValidator<T extends number> extends BaseValidator<T> {\n\tpublic lessThan(number: number): this {\n\t\treturn this.addConstraint(numberLessThan(number) as IConstraint<T>);\n\t}\n\n\tpublic lessThanOrEqual(number: number): this {\n\t\treturn this.addConstraint(numberLessThanOrEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic greaterThan(number: number): this {\n\t\treturn this.addConstraint(numberGreaterThan(number) as IConstraint<T>);\n\t}\n\n\tpublic greaterThanOrEqual(number: number): this {\n\t\treturn this.addConstraint(numberGreaterThanOrEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic equal<N extends number>(number: N): NumberValidator<N> {\n\t\treturn Number.isNaN(number) //\n\t\t\t? (this.addConstraint(numberNaN as IConstraint<T>) as unknown as NumberValidator<N>)\n\t\t\t: (this.addConstraint(numberEqual(number) as IConstraint<T>) as unknown as NumberValidator<N>);\n\t}\n\n\tpublic notEqual(number: number): this {\n\t\treturn Number.isNaN(number) //\n\t\t\t? this.addConstraint(numberNotNaN as IConstraint<T>)\n\t\t\t: this.addConstraint(numberNotEqual(number) as IConstraint<T>);\n\t}\n\n\tpublic get int(): this {\n\t\treturn this.addConstraint(numberInt as IConstraint<T>);\n\t}\n\n\tpublic get safeInt(): this {\n\t\treturn this.addConstraint(numberSafeInt as IConstraint<T>);\n\t}\n\n\tpublic get finite(): this {\n\t\treturn this.addConstraint(numberFinite as IConstraint<T>);\n\t}\n\n\tpublic get positive(): this {\n\t\treturn this.greaterThanOrEqual(0);\n\t}\n\n\tpublic get negative(): this {\n\t\treturn this.lessThan(0);\n\t}\n\n\tpublic divisibleBy(divider: number): this {\n\t\treturn this.addConstraint(numberDivisibleBy(divider) as IConstraint<T>);\n\t}\n\n\tpublic get abs(): this {\n\t\treturn this.transform(Math.abs as (value: number) => T);\n\t}\n\n\tpublic get sign(): this {\n\t\treturn this.transform(Math.sign as (value: number) => T);\n\t}\n\n\tpublic get trunc(): this {\n\t\treturn this.transform(Math.trunc as (value: number) => T);\n\t}\n\n\tpublic get floor(): this {\n\t\treturn this.transform(Math.floor as (value: number) => T);\n\t}\n\n\tpublic get fround(): this {\n\t\treturn this.transform(Math.fround as (value: number) => T);\n\t}\n\n\tpublic get round(): this {\n\t\treturn this.transform(Math.round as (value: number) => T);\n\t}\n\n\tpublic get ceil(): this {\n\t\treturn this.transform(Math.ceil as (value: number) => T);\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn typeof value === 'number' //\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ValidationError('s.number', 'Expected a number primitive', value));\n\t}\n}\n","import type { InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class MissingPropertyError extends BaseError {\n\tpublic readonly property: PropertyKey;\n\n\tpublic constructor(property: PropertyKey) {\n\t\tsuper('A required property is missing');\n\t\tthis.property = property;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tproperty: this.property\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst property = options.stylize(this.property.toString(), 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[MissingPropertyError: ${property}]`, 'special');\n\t\t}\n\n\t\tconst header = `${options.stylize('MissingPropertyError', 'special')} > ${property}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\treturn `${header}\\n ${message}`;\n\t}\n}\n","import { inspect, type InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class UnknownPropertyError extends BaseError {\n\tpublic readonly property: PropertyKey;\n\tpublic readonly value: unknown;\n\n\tpublic constructor(property: PropertyKey, value: unknown) {\n\t\tsuper('Received unexpected property');\n\n\t\tthis.property = property;\n\t\tthis.value = value;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tproperty: this.property,\n\t\t\tvalue: this.value\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst property = options.stylize(this.property.toString(), 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[UnknownPropertyError: ${property}]`, 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1, compact: true };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\t\tconst given = inspect(this.value, newOptions).replace(/\\n/g, padding);\n\n\t\tconst header = `${options.stylize('UnknownPropertyError', 'special')} > ${property}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst givenBlock = `\\n ${options.stylize('Received:', 'regexp')}${padding}${given}`;\n\t\treturn `${header}\\n ${message}\\n${givenBlock}`;\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport { Result } from '../lib/Result';\nimport type { ValidatorError } from './BaseValidator';\nimport { BaseValidator } from './imports';\nimport { getValue } from './util/getValue';\n\nexport class DefaultValidator<T> extends BaseValidator<T> {\n\tprivate readonly validator: BaseValidator<T>;\n\tprivate defaultValue: T | (() => T);\n\n\tpublic constructor(validator: BaseValidator<T>, value: T | (() => T), constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validator = validator;\n\t\tthis.defaultValue = value;\n\t}\n\n\tpublic override default(value: Exclude<T, undefined> | (() => Exclude<T, undefined>)): DefaultValidator<Exclude<T, undefined>> {\n\t\tconst clone = this.clone() as unknown as DefaultValidator<Exclude<T, undefined>>;\n\t\tclone.defaultValue = value;\n\t\treturn clone;\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidatorError> {\n\t\treturn typeof value === 'undefined' //\n\t\t\t? Result.ok(getValue(this.defaultValue))\n\t\t\t: this.validator['handle'](value); // eslint-disable-line @typescript-eslint/dot-notation\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validator, this.defaultValue, this.constraints]);\n\t}\n}\n","import type { InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class CombinedError extends BaseError {\n\tpublic readonly errors: readonly BaseError[];\n\n\tpublic constructor(errors: readonly BaseError[]) {\n\t\tsuper('Received one or more errors');\n\n\t\tthis.errors = errors;\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize('[CombinedError]', 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1, compact: true };\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\n\t\tconst header = `${options.stylize('CombinedError', 'special')} (${options.stylize(this.errors.length.toString(), 'number')})`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst errors = this.errors\n\t\t\t.map((error, i) => {\n\t\t\t\tconst index = options.stylize((i + 1).toString(), 'number');\n\t\t\t\tconst body = error[customInspectSymbolStackLess](depth - 1, newOptions).replace(/\\n/g, padding);\n\n\t\t\t\treturn ` ${index} ${body}`;\n\t\t\t})\n\t\t\t.join('\\n\\n');\n\t\treturn `${header}\\n ${message}\\n\\n${errors}`;\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedError } from '../lib/errors/CombinedError';\nimport type { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator, LiteralValidator, NullishValidator } from './imports';\n\nexport class UnionValidator<T> extends BaseValidator<T> {\n\tprivate validators: readonly BaseValidator<T>[];\n\n\tpublic constructor(validators: readonly BaseValidator<T>[], constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validators = validators;\n\t}\n\n\tpublic override get optional(): UnionValidator<T | undefined> {\n\t\tif (this.validators.length === 0) return new UnionValidator<T | undefined>([new LiteralValidator(undefined)], this.constraints);\n\n\t\tconst [validator] = this.validators;\n\t\tif (validator instanceof LiteralValidator) {\n\t\t\t// If already optional, return a clone:\n\t\t\tif (validator.expected === undefined) return this.clone();\n\n\t\t\t// If it's nullable, convert the nullable validator into a nullish validator to optimize `null | undefined`:\n\t\t\tif (validator.expected === null) {\n\t\t\t\treturn new UnionValidator<T | null | undefined>(\n\t\t\t\t\t[new NullishValidator(), ...this.validators.slice(1)],\n\t\t\t\t\tthis.constraints\n\t\t\t\t) as UnionValidator<T | undefined>;\n\t\t\t}\n\t\t} else if (validator instanceof NullishValidator) {\n\t\t\t// If it's already nullish (which validates optional), return a clone:\n\t\t\treturn this.clone();\n\t\t}\n\n\t\treturn new UnionValidator([new LiteralValidator(undefined), ...this.validators]);\n\t}\n\n\tpublic get required(): UnionValidator<Exclude<T, undefined>> {\n\t\ttype RequiredValidator = UnionValidator<Exclude<T, undefined>>;\n\n\t\tif (this.validators.length === 0) return this.clone() as unknown as RequiredValidator;\n\n\t\tconst [validator] = this.validators;\n\t\tif (validator instanceof LiteralValidator) {\n\t\t\tif (validator.expected === undefined) return new UnionValidator(this.validators.slice(1), this.constraints) as RequiredValidator;\n\t\t} else if (validator instanceof NullishValidator) {\n\t\t\treturn new UnionValidator([new LiteralValidator(null), ...this.validators.slice(1)], this.constraints) as RequiredValidator;\n\t\t}\n\n\t\treturn this.clone() as unknown as RequiredValidator;\n\t}\n\n\tpublic override get nullable(): UnionValidator<T | null> {\n\t\tif (this.validators.length === 0) return new UnionValidator<T | null>([new LiteralValidator(null)], this.constraints);\n\n\t\tconst [validator] = this.validators;\n\t\tif (validator instanceof LiteralValidator) {\n\t\t\t// If already nullable, return a clone:\n\t\t\tif (validator.expected === null) return this.clone();\n\n\t\t\t// If it's optional, convert the optional validator into a nullish validator to optimize `null | undefined`:\n\t\t\tif (validator.expected === undefined) {\n\t\t\t\treturn new UnionValidator<T | null | undefined>(\n\t\t\t\t\t[new NullishValidator(), ...this.validators.slice(1)],\n\t\t\t\t\tthis.constraints\n\t\t\t\t) as UnionValidator<T | null>;\n\t\t\t}\n\t\t} else if (validator instanceof NullishValidator) {\n\t\t\t// If it's already nullish (which validates nullable), return a clone:\n\t\t\treturn this.clone();\n\t\t}\n\n\t\treturn new UnionValidator([new LiteralValidator(null), ...this.validators]);\n\t}\n\n\tpublic override get nullish(): UnionValidator<T | null | undefined> {\n\t\tif (this.validators.length === 0) return new UnionValidator<T | null | undefined>([new NullishValidator()], this.constraints);\n\n\t\tconst [validator] = this.validators;\n\t\tif (validator instanceof LiteralValidator) {\n\t\t\t// If already nullable or optional, promote the union to nullish:\n\t\t\tif (validator.expected === null || validator.expected === undefined) {\n\t\t\t\treturn new UnionValidator<T | null | undefined>([new NullishValidator(), ...this.validators.slice(1)], this.constraints);\n\t\t\t}\n\t\t} else if (validator instanceof NullishValidator) {\n\t\t\t// If it's already nullish, return a clone:\n\t\t\treturn this.clone();\n\t\t}\n\n\t\treturn new UnionValidator<T | null | undefined>([new NullishValidator(), ...this.validators]);\n\t}\n\n\tpublic override or<O>(...predicates: readonly BaseValidator<O>[]): UnionValidator<T | O> {\n\t\treturn new UnionValidator<T | O>([...this.validators, ...predicates]);\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validators, this.constraints]);\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError | CombinedError> {\n\t\tconst errors: BaseError[] = [];\n\n\t\tfor (const validator of this.validators) {\n\t\t\tconst result = validator.run(value);\n\t\t\tif (result.isOk()) return result as Result<T, CombinedError>;\n\t\t\terrors.push(result.error!);\n\t\t}\n\n\t\treturn Result.err(new CombinedError(errors));\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport { MissingPropertyError } from '../lib/errors/MissingPropertyError';\nimport { UnknownPropertyError } from '../lib/errors/UnknownPropertyError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport type { MappedObjectValidator, UndefinedToOptional } from '../lib/util-types';\nimport { BaseValidator } from './BaseValidator';\nimport { DefaultValidator } from './DefaultValidator';\nimport { LiteralValidator } from './LiteralValidator';\nimport { NullishValidator } from './NullishValidator';\nimport { UnionValidator } from './UnionValidator';\n\nexport class ObjectValidator<T extends object, I = UndefinedToOptional<T>> extends BaseValidator<I> {\n\tpublic readonly shape: MappedObjectValidator<T>;\n\tpublic readonly strategy: ObjectValidatorStrategy;\n\tprivate readonly keys: readonly (keyof I)[] = [];\n\tprivate readonly handleStrategy: (value: object) => Result<I, CombinedPropertyError>;\n\n\tprivate readonly requiredKeys = new Map<keyof I, BaseValidator<unknown>>();\n\tprivate readonly possiblyUndefinedKeys = new Map<keyof I, BaseValidator<unknown>>();\n\tprivate readonly possiblyUndefinedKeysWithDefaults = new Map<keyof I, DefaultValidator<unknown>>();\n\n\tpublic constructor(\n\t\tshape: MappedObjectValidator<T>,\n\t\tstrategy: ObjectValidatorStrategy = ObjectValidatorStrategy.Ignore,\n\t\tconstraints: readonly IConstraint<I>[] = []\n\t) {\n\t\tsuper(constraints);\n\t\tthis.shape = shape;\n\t\tthis.strategy = strategy;\n\n\t\tswitch (this.strategy) {\n\t\t\tcase ObjectValidatorStrategy.Ignore:\n\t\t\t\tthis.handleStrategy = (value) => this.handleIgnoreStrategy(value);\n\t\t\t\tbreak;\n\t\t\tcase ObjectValidatorStrategy.Strict: {\n\t\t\t\tthis.handleStrategy = (value) => this.handleStrictStrategy(value);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase ObjectValidatorStrategy.Passthrough:\n\t\t\t\tthis.handleStrategy = (value) => this.handlePassthroughStrategy(value);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tconst shapeEntries = Object.entries(shape) as [keyof I, BaseValidator<T>][];\n\t\tthis.keys = shapeEntries.map(([key]) => key);\n\n\t\tfor (const [key, validator] of shapeEntries) {\n\t\t\tif (validator instanceof UnionValidator) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/dot-notation\n\t\t\t\tconst [possiblyLiteralOrNullishPredicate] = validator['validators'];\n\n\t\t\t\tif (possiblyLiteralOrNullishPredicate instanceof NullishValidator) {\n\t\t\t\t\tthis.possiblyUndefinedKeys.set(key, validator);\n\t\t\t\t} else if (possiblyLiteralOrNullishPredicate instanceof LiteralValidator) {\n\t\t\t\t\tif (possiblyLiteralOrNullishPredicate.expected === undefined) {\n\t\t\t\t\t\tthis.possiblyUndefinedKeys.set(key, validator);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.requiredKeys.set(key, validator);\n\t\t\t\t\t}\n\t\t\t\t} else if (validator instanceof DefaultValidator) {\n\t\t\t\t\tthis.possiblyUndefinedKeysWithDefaults.set(key, validator);\n\t\t\t\t} else {\n\t\t\t\t\tthis.requiredKeys.set(key, validator);\n\t\t\t\t}\n\t\t\t} else if (validator instanceof NullishValidator) {\n\t\t\t\tthis.possiblyUndefinedKeys.set(key, validator);\n\t\t\t} else if (validator instanceof LiteralValidator) {\n\t\t\t\tif (validator.expected === undefined) {\n\t\t\t\t\tthis.possiblyUndefinedKeys.set(key, validator);\n\t\t\t\t} else {\n\t\t\t\t\tthis.requiredKeys.set(key, validator);\n\t\t\t\t}\n\t\t\t} else if (validator instanceof DefaultValidator) {\n\t\t\t\tthis.possiblyUndefinedKeysWithDefaults.set(key, validator);\n\t\t\t} else {\n\t\t\t\tthis.requiredKeys.set(key, validator);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic get strict(): this {\n\t\treturn Reflect.construct(this.constructor, [this.shape, ObjectValidatorStrategy.Strict, this.constraints]);\n\t}\n\n\tpublic get ignore(): this {\n\t\treturn Reflect.construct(this.constructor, [this.shape, ObjectValidatorStrategy.Ignore, this.constraints]);\n\t}\n\n\tpublic get passthrough(): this {\n\t\treturn Reflect.construct(this.constructor, [this.shape, ObjectValidatorStrategy.Passthrough, this.constraints]);\n\t}\n\n\tpublic get partial(): ObjectValidator<{ [Key in keyof I]?: I[Key] }> {\n\t\tconst shape = Object.fromEntries(this.keys.map((key) => [key, this.shape[key as unknown as keyof typeof this.shape].optional]));\n\t\treturn Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);\n\t}\n\n\tpublic get required(): ObjectValidator<{ [Key in keyof I]-?: I[Key] }> {\n\t\tconst shape = Object.fromEntries(\n\t\t\tthis.keys.map((key) => {\n\t\t\t\tlet validator = this.shape[key as unknown as keyof typeof this.shape];\n\t\t\t\tif (validator instanceof UnionValidator) validator = validator.required;\n\t\t\t\treturn [key, validator];\n\t\t\t})\n\t\t);\n\t\treturn Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);\n\t}\n\n\tpublic extend<ET extends object>(schema: ObjectValidator<ET> | MappedObjectValidator<ET>): ObjectValidator<T & ET> {\n\t\tconst shape = { ...this.shape, ...(schema instanceof ObjectValidator ? schema.shape : schema) };\n\t\treturn Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);\n\t}\n\n\tpublic pick<K extends keyof I>(keys: readonly K[]): ObjectValidator<{ [Key in keyof Pick<I, K>]: I[Key] }> {\n\t\tconst shape = Object.fromEntries(\n\t\t\tkeys.filter((key) => this.keys.includes(key)).map((key) => [key, this.shape[key as unknown as keyof typeof this.shape]])\n\t\t);\n\t\treturn Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);\n\t}\n\n\tpublic omit<K extends keyof I>(keys: readonly K[]): ObjectValidator<{ [Key in keyof Omit<I, K>]: I[Key] }> {\n\t\tconst shape = Object.fromEntries(\n\t\t\tthis.keys.filter((key) => !keys.includes(key as any)).map((key) => [key, this.shape[key as unknown as keyof typeof this.shape]])\n\t\t);\n\t\treturn Reflect.construct(this.constructor, [shape, this.strategy, this.constraints]);\n\t}\n\n\tprotected override handle(value: unknown): Result<I, ValidationError | CombinedPropertyError> {\n\t\tconst typeOfValue = typeof value;\n\t\tif (typeOfValue !== 'object') {\n\t\t\treturn Result.err(new ValidationError('s.object(T)', `Expected the value to be an object, but received ${typeOfValue} instead`, value));\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn Result.err(new ValidationError('s.object(T)', 'Expected the value to not be null', value));\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\treturn Result.err(new ValidationError('s.object(T)', 'Expected the value to not be an array', value));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(value as I);\n\t\t}\n\n\t\tfor (const predicate of Object.values(this.shape) as BaseValidator<any>[]) {\n\t\t\tpredicate.setParent(this.parent ?? value!);\n\t\t}\n\n\t\treturn this.handleStrategy(value as object);\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.shape, this.strategy, this.constraints]);\n\t}\n\n\tprivate handleIgnoreStrategy(value: object): Result<I, CombinedPropertyError> {\n\t\tconst errors: [PropertyKey, BaseError][] = [];\n\t\tconst finalObject = {} as I;\n\t\tconst inputEntries = new Map(Object.entries(value) as [keyof I, unknown][]);\n\n\t\tconst runPredicate = (key: keyof I, predicate: BaseValidator<unknown>) => {\n\t\t\tconst result = predicate.run(value[key as keyof object]);\n\n\t\t\tif (result.isOk()) {\n\t\t\t\tfinalObject[key] = result.value as I[keyof I];\n\t\t\t} else {\n\t\t\t\tconst error = result.error!;\n\t\t\t\terrors.push([key, error]);\n\t\t\t}\n\t\t};\n\n\t\tfor (const [key, predicate] of this.requiredKeys) {\n\t\t\tif (inputEntries.delete(key)) {\n\t\t\t\trunPredicate(key, predicate);\n\t\t\t} else {\n\t\t\t\terrors.push([key, new MissingPropertyError(key)]);\n\t\t\t}\n\t\t}\n\n\t\t// Run possibly undefined keys that also have defaults even if there are no more keys to process (this is necessary so we fill in those defaults)\n\t\tfor (const [key, validator] of this.possiblyUndefinedKeysWithDefaults) {\n\t\t\tinputEntries.delete(key);\n\t\t\trunPredicate(key, validator);\n\t\t}\n\n\t\t// Early exit if there are no more properties to validate in the object and there are errors to report\n\t\tif (inputEntries.size === 0) {\n\t\t\treturn errors.length === 0 //\n\t\t\t\t? Result.ok(finalObject)\n\t\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t\t}\n\n\t\t// In the event the remaining keys to check are less than the number of possible undefined keys, we check those\n\t\t// as it could yield a faster execution\n\t\tconst checkInputEntriesInsteadOfSchemaKeys = this.possiblyUndefinedKeys.size > inputEntries.size;\n\n\t\tif (checkInputEntriesInsteadOfSchemaKeys) {\n\t\t\tfor (const [key] of inputEntries) {\n\t\t\t\tconst predicate = this.possiblyUndefinedKeys.get(key);\n\n\t\t\t\tif (predicate) {\n\t\t\t\t\trunPredicate(key, predicate);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (const [key, predicate] of this.possiblyUndefinedKeys) {\n\t\t\t\tif (inputEntries.delete(key)) {\n\t\t\t\t\trunPredicate(key, predicate);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(finalObject)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n\n\tprivate handleStrictStrategy(value: object): Result<I, CombinedPropertyError> {\n\t\tconst errors: [PropertyKey, BaseError][] = [];\n\t\tconst finalResult = {} as I;\n\t\tconst inputEntries = new Map(Object.entries(value) as [keyof I, unknown][]);\n\n\t\tconst runPredicate = (key: keyof I, predicate: BaseValidator<unknown>) => {\n\t\t\tconst result = predicate.run(value[key as keyof object]);\n\n\t\t\tif (result.isOk()) {\n\t\t\t\tfinalResult[key] = result.value as I[keyof I];\n\t\t\t} else {\n\t\t\t\tconst error = result.error!;\n\t\t\t\terrors.push([key, error]);\n\t\t\t}\n\t\t};\n\n\t\tfor (const [key, predicate] of this.requiredKeys) {\n\t\t\tif (inputEntries.delete(key)) {\n\t\t\t\trunPredicate(key, predicate);\n\t\t\t} else {\n\t\t\t\terrors.push([key, new MissingPropertyError(key)]);\n\t\t\t}\n\t\t}\n\n\t\t// Run possibly undefined keys that also have defaults even if there are no more keys to process (this is necessary so we fill in those defaults)\n\t\tfor (const [key, validator] of this.possiblyUndefinedKeysWithDefaults) {\n\t\t\tinputEntries.delete(key);\n\t\t\trunPredicate(key, validator);\n\t\t}\n\n\t\tfor (const [key, predicate] of this.possiblyUndefinedKeys) {\n\t\t\t// All of these validators are assumed to be possibly undefined, so if we have gone through the entire object and there's still validators,\n\t\t\t// safe to assume we're done here\n\t\t\tif (inputEntries.size === 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (inputEntries.delete(key)) {\n\t\t\t\trunPredicate(key, predicate);\n\t\t\t}\n\t\t}\n\n\t\tif (inputEntries.size !== 0) {\n\t\t\tfor (const [key, value] of inputEntries.entries()) {\n\t\t\t\terrors.push([key, new UnknownPropertyError(key, value)]);\n\t\t\t}\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(finalResult)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n\n\tprivate handlePassthroughStrategy(value: object): Result<I, CombinedPropertyError> {\n\t\tconst result = this.handleIgnoreStrategy(value);\n\t\treturn result.isErr() ? result : Result.ok({ ...value, ...result.value } as I);\n\t}\n}\n\nexport enum ObjectValidatorStrategy {\n\tIgnore,\n\tStrict,\n\tPassthrough\n}\n","import type { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class PassthroughValidator<T extends any | unknown> extends BaseValidator<T> {\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn Result.ok(value as T);\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class RecordValidator<T> extends BaseValidator<Record<string, T>> {\n\tprivate readonly validator: BaseValidator<T>;\n\n\tpublic constructor(validator: BaseValidator<T>, constraints: readonly IConstraint<Record<string, T>>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validator = validator;\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validator, this.constraints]);\n\t}\n\n\tprotected handle(value: unknown): Result<Record<string, T>, ValidationError | CombinedPropertyError> {\n\t\tif (typeof value !== 'object') {\n\t\t\treturn Result.err(new ValidationError('s.record(T)', 'Expected an object', value));\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn Result.err(new ValidationError('s.record(T)', 'Expected the value to not be null', value));\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\treturn Result.err(new ValidationError('s.record(T)', 'Expected the value to not be an array', value));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(value as Record<string, T>);\n\t\t}\n\n\t\tconst errors: [string, BaseError][] = [];\n\t\tconst transformed: Record<string, T> = {};\n\n\t\tfor (const [key, val] of Object.entries(value!)) {\n\t\t\tconst result = this.validator.run(val);\n\t\t\tif (result.isOk()) transformed[key] = result.value;\n\t\t\telse errors.push([key, result.error!]);\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(transformed)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedError } from '../lib/errors/CombinedError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class SetValidator<T> extends BaseValidator<Set<T>> {\n\tprivate readonly validator: BaseValidator<T>;\n\n\tpublic constructor(validator: BaseValidator<T>, constraints: readonly IConstraint<Set<T>>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validator = validator;\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validator, this.constraints]);\n\t}\n\n\tprotected handle(values: unknown): Result<Set<T>, ValidationError | CombinedError> {\n\t\tif (!(values instanceof Set)) {\n\t\t\treturn Result.err(new ValidationError('s.set(T)', 'Expected a set', values));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(values);\n\t\t}\n\n\t\tconst errors: BaseError[] = [];\n\t\tconst transformed = new Set<T>();\n\n\t\tfor (const value of values) {\n\t\t\tconst result = this.validator.run(value);\n\t\t\tif (result.isOk()) transformed.add(result.value);\n\t\t\telse errors.push(result.error!);\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(transformed)\n\t\t\t: Result.err(new CombinedError(errors));\n\t}\n}\n","/**\n * [RFC-5322](https://datatracker.ietf.org/doc/html/rfc5322)\n * compliant {@link RegExp} to validate an email address\n *\n * @see https://stackoverflow.com/questions/201323/how-can-i-validate-an-email-address-using-a-regular-expression/201378#201378\n */\nconst accountRegex =\n\t/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")$/;\n\n/**\n * Validates an email address string based on various checks:\n * - It must be a non nullish and non empty string\n * - It must include at least an `@` symbol`\n * - The account name may not exceed 64 characters\n * - The domain name may not exceed 255 characters\n * - The domain must include at least one `.` symbol\n * - Each part of the domain, split by `.` must not exceed 63 characters\n * - The email address must be [RFC-5322](https://datatracker.ietf.org/doc/html/rfc5322) compliant\n * @param email The email to validate\n * @returns `true` if the email is valid, `false` otherwise\n *\n * @remark Based on the following sources:\n * - `email-validator` by [manisharaan](https://github.com/manishsaraan) ([code](https://github.com/manishsaraan/email-validator/blob/master/index.js))\n * - [Comparing E-mail Address Validating Regular Expressions](http://fightingforalostcause.net/misc/2006/compare-email-regex.php)\n * - [Validating Email Addresses by Derrick Pallas](http://thedailywtf.com/Articles/Validating_Email_Addresses.aspx)\n * - [StackOverflow answer by bortzmeyer](http://stackoverflow.com/questions/201323/what-is-the-best-regular-expression-for-validating-email-addresses/201378#201378)\n * - [The wikipedia page on Email addresses](https://en.wikipedia.org/wiki/Email_address)\n */\nexport function validateEmail(email: string): boolean {\n\t// 1. Non-nullish and non-empty string check.\n\t//\n\t// If a nullish or empty email was provided then do an early exit\n\tif (!email) return false;\n\n\t// Find the location of the @ symbol:\n\tconst atIndex = email.indexOf('@');\n\n\t// 2. @ presence check.\n\t//\n\t// If the email does not have the @ symbol, it's automatically invalid:\n\tif (atIndex === -1) return false;\n\n\t// 3. <account> maximum length check.\n\t//\n\t// From <account>@<domain>, if <account> exceeds 64 characters, then the\n\t// position of the @ symbol is 64 or greater. In this case, the email is\n\t// invalid:\n\tif (atIndex > 64) return false;\n\n\tconst domainIndex = atIndex + 1;\n\n\t// 7.1. Duplicated @ symbol check.\n\t//\n\t// If there's a second @ symbol, the email is automatically invalid:\n\tif (email.includes('@', domainIndex)) return false;\n\n\t// 4. <domain> maximum length check.\n\t//\n\t// From <account>@<domain>, if <domain> exceeds 255 characters, then it\n\t// means that the amount of characters between the start of <domain> and the\n\t// end of the string is separated by 255 or more characters.\n\tif (email.length - domainIndex > 255) return false;\n\n\t// Find the location of the . symbol in <domain>:\n\tlet dotIndex = email.indexOf('.', domainIndex);\n\n\t// 5. <domain> dot (.) symbol check.\n\t//\n\t// From <account>@<domain>, if <domain> does not contain a dot (.) symbol,\n\t// then it means the domain is invalid.\n\tif (dotIndex === -1) return false;\n\n\t// 6. <domain> parts length.\n\t//\n\t// Assign a temporary variable to store the start of the last read domain\n\t// part, this would be at the start of <domain>.\n\t//\n\t// For a <domain> part to be correct, it must have at most, 63 characters.\n\t// We repeat this step for every sub-section of <domain> contained within\n\t// dot (.) symbols.\n\t//\n\t// The following step is a more optimized version of the following code:\n\t//\n\t// ```javascript\n\t// domain.split('.').some((part) => part.length > 63);\n\t// ```\n\tlet lastDotIndex = domainIndex;\n\tdo {\n\t\tif (dotIndex - lastDotIndex > 63) return false;\n\n\t\tlastDotIndex = dotIndex + 1;\n\t} while ((dotIndex = email.indexOf('.', lastDotIndex)) !== -1);\n\n\t// The loop iterates from the first to the n - 1 part, this line checks for\n\t// the last (n) part:\n\tif (email.length - lastDotIndex > 63) return false;\n\n\t// 7.2. Character checks.\n\t//\n\t// From <account>@<domain>:\n\t// - Extract the <account> part by slicing the input from start to the @\n\t// character. Validate afterwards.\n\t// - Extract the <domain> part by slicing the input from the start of\n\t// <domain>. Validate afterwards.\n\t//\n\t// Note: we inline the variables so <domain> isn't created unless the\n\t// <account> check passes.\n\treturn accountRegex.test(email.slice(0, atIndex)) && validateEmailDomain(email.slice(domainIndex));\n}\n\nfunction validateEmailDomain(domain: string): boolean {\n\ttry {\n\t\treturn new URL(`http://${domain}`).hostname === domain;\n\t} catch {\n\t\treturn false;\n\t}\n}\n","/**\n * Code ported from https://github.com/nodejs/node/blob/5fad0b93667ffc6e4def52996b9529ac99b26319/lib/internal/net.js\n */\n\n// IPv4 Segment\nconst v4Seg = '(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';\nconst v4Str = `(${v4Seg}[.]){3}${v4Seg}`;\nconst IPv4Reg = new RegExp(`^${v4Str}$`);\n\n// IPv6 Segment\nconst v6Seg = '(?:[0-9a-fA-F]{1,4})';\nconst IPv6Reg = new RegExp(\n\t'^(' +\n\t\t`(?:${v6Seg}:){7}(?:${v6Seg}|:)|` +\n\t\t`(?:${v6Seg}:){6}(?:${v4Str}|:${v6Seg}|:)|` +\n\t\t`(?:${v6Seg}:){5}(?::${v4Str}|(:${v6Seg}){1,2}|:)|` +\n\t\t`(?:${v6Seg}:){4}(?:(:${v6Seg}){0,1}:${v4Str}|(:${v6Seg}){1,3}|:)|` +\n\t\t`(?:${v6Seg}:){3}(?:(:${v6Seg}){0,2}:${v4Str}|(:${v6Seg}){1,4}|:)|` +\n\t\t`(?:${v6Seg}:){2}(?:(:${v6Seg}){0,3}:${v4Str}|(:${v6Seg}){1,5}|:)|` +\n\t\t`(?:${v6Seg}:){1}(?:(:${v6Seg}){0,4}:${v4Str}|(:${v6Seg}){1,6}|:)|` +\n\t\t`(?::((?::${v6Seg}){0,5}:${v4Str}|(?::${v6Seg}){1,7}|:))` +\n\t\t')(%[0-9a-zA-Z-.:]{1,})?$'\n);\n\nexport function isIPv4(s: string): boolean {\n\treturn IPv4Reg.test(s);\n}\n\nexport function isIPv6(s: string): boolean {\n\treturn IPv6Reg.test(s);\n}\n\nexport function isIP(s: string): number {\n\tif (isIPv4(s)) return 4;\n\tif (isIPv6(s)) return 6;\n\treturn 0;\n}\n","export const phoneNumberRegex = /^((?:\\+|0{0,2})\\d{1,2}\\s?)?\\(?\\d{3}\\)?[\\s.-]?\\d{3}[\\s.-]?\\d{4}$/;\n\nexport function validatePhoneNumber(input: string) {\n\treturn phoneNumberRegex.test(input);\n}\n","import { inspect, type InspectOptionsStylized } from 'util';\nimport { customInspectSymbolStackLess } from './BaseError';\nimport { BaseConstraintError, type ConstraintErrorNames } from './BaseConstraintError';\n\nexport class MultiplePossibilitiesConstraintError<T = unknown> extends BaseConstraintError<T> {\n\tpublic readonly expected: readonly string[];\n\n\tpublic constructor(constraint: ConstraintErrorNames, message: string, given: T, expected: readonly string[]) {\n\t\tsuper(constraint, message, given);\n\t\tthis.expected = expected;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tconstraint: this.constraint,\n\t\t\tgiven: this.given,\n\t\t\texpected: this.expected\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst constraint = options.stylize(this.constraint, 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[MultiplePossibilitiesConstraintError: ${constraint}]`, 'special');\n\t\t}\n\n\t\tconst newOptions = { ...options, depth: options.depth === null ? null : options.depth! - 1 };\n\n\t\tconst verticalLine = options.stylize('|', 'undefined');\n\t\tconst padding = `\\n ${verticalLine} `;\n\t\tconst given = inspect(this.given, newOptions).replace(/\\n/g, padding);\n\n\t\tconst header = `${options.stylize('MultiplePossibilitiesConstraintError', 'special')} > ${constraint}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\n\t\tconst expectedPadding = `\\n ${verticalLine} - `;\n\t\tconst expectedBlock = `\\n ${options.stylize('Expected any of the following:', 'string')}${expectedPadding}${this.expected\n\t\t\t.map((possible) => options.stylize(possible, 'boolean'))\n\t\t\t.join(expectedPadding)}`;\n\t\tconst givenBlock = `\\n ${options.stylize('Received:', 'regexp')}${padding}${given}`;\n\t\treturn `${header}\\n ${message}\\n${expectedBlock}\\n${givenBlock}`;\n\t}\n}\n","export function combinedErrorFn<P extends [...any], E extends Error>(...fns: ErrorFn<P, E>[]): ErrorFn<P, E> {\n\tswitch (fns.length) {\n\t\tcase 0:\n\t\t\treturn () => null;\n\t\tcase 1:\n\t\t\treturn fns[0];\n\t\tcase 2: {\n\t\t\tconst [fn0, fn1] = fns;\n\t\t\treturn (...params) => fn0(...params) || fn1(...params);\n\t\t}\n\t\tdefault: {\n\t\t\treturn (...params) => {\n\t\t\t\tfor (const fn of fns) {\n\t\t\t\t\tconst result = fn(...params);\n\t\t\t\t\tif (result) return result;\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\t\t\t};\n\t\t}\n\t}\n}\n\nexport type ErrorFn<P extends [...any], E extends Error> = (...params: P) => E | null;\n","import { MultiplePossibilitiesConstraintError } from '../../lib/errors/MultiplePossibilitiesConstraintError';\nimport { combinedErrorFn, type ErrorFn } from './common/combinedResultFn';\n\nexport type StringProtocol = `${string}:`;\n\nexport type StringDomain = `${string}.${string}`;\n\nexport interface UrlOptions {\n\tallowedProtocols?: StringProtocol[];\n\tallowedDomains?: StringDomain[];\n}\n\nexport function createUrlValidators(options?: UrlOptions) {\n\tconst fns: ErrorFn<[input: string, url: URL], MultiplePossibilitiesConstraintError<string>>[] = [];\n\n\tif (options?.allowedProtocols?.length) fns.push(allowedProtocolsFn(options.allowedProtocols));\n\tif (options?.allowedDomains?.length) fns.push(allowedDomainsFn(options.allowedDomains));\n\n\treturn combinedErrorFn(...fns);\n}\n\nfunction allowedProtocolsFn(allowedProtocols: StringProtocol[]) {\n\treturn (input: string, url: URL) =>\n\t\tallowedProtocols.includes(url.protocol as StringProtocol)\n\t\t\t? null\n\t\t\t: new MultiplePossibilitiesConstraintError('s.string.url', 'Invalid URL protocol', input, allowedProtocols);\n}\n\nfunction allowedDomainsFn(allowedDomains: StringDomain[]) {\n\treturn (input: string, url: URL) =>\n\t\tallowedDomains.includes(url.hostname as StringDomain)\n\t\t\t? null\n\t\t\t: new MultiplePossibilitiesConstraintError('s.string.url', 'Invalid URL domain', input, allowedDomains);\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { validateEmail } from './util/emailValidator';\nimport { isIP, isIPv4, isIPv6 } from './util/net';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\nimport { validatePhoneNumber } from './util/phoneValidator';\nimport { createUrlValidators } from './util/urlValidators';\n\nexport type StringConstraintName =\n\t| `s.string.${\n\t\t\t| `length${'LessThan' | 'LessThanOrEqual' | 'GreaterThan' | 'GreaterThanOrEqual' | 'Equal' | 'NotEqual'}`\n\t\t\t| 'regex'\n\t\t\t| 'url'\n\t\t\t| 'uuid'\n\t\t\t| 'email'\n\t\t\t| `ip${'v4' | 'v6' | ''}`\n\t\t\t| 'date'\n\t\t\t| 'phone'}`;\n\nexport type StringProtocol = `${string}:`;\n\nexport type StringDomain = `${string}.${string}`;\n\nexport interface UrlOptions {\n\tallowedProtocols?: StringProtocol[];\n\tallowedDomains?: StringDomain[];\n}\n\nexport type UUIDVersion = 1 | 3 | 4 | 5;\n\nexport interface StringUuidOptions {\n\tversion?: UUIDVersion | `${UUIDVersion}-${UUIDVersion}` | null;\n\tnullable?: boolean;\n}\n\nfunction stringLengthComparator(comparator: Comparator, name: StringConstraintName, expected: string, length: number): IConstraint<string> {\n\treturn {\n\t\trun(input: string) {\n\t\t\treturn comparator(input.length, length) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid string length', input, expected));\n\t\t}\n\t};\n}\n\nexport function stringLengthLessThan(length: number): IConstraint<string> {\n\tconst expected = `expected.length < ${length}`;\n\treturn stringLengthComparator(lessThan, 's.string.lengthLessThan', expected, length);\n}\n\nexport function stringLengthLessThanOrEqual(length: number): IConstraint<string> {\n\tconst expected = `expected.length <= ${length}`;\n\treturn stringLengthComparator(lessThanOrEqual, 's.string.lengthLessThanOrEqual', expected, length);\n}\n\nexport function stringLengthGreaterThan(length: number): IConstraint<string> {\n\tconst expected = `expected.length > ${length}`;\n\treturn stringLengthComparator(greaterThan, 's.string.lengthGreaterThan', expected, length);\n}\n\nexport function stringLengthGreaterThanOrEqual(length: number): IConstraint<string> {\n\tconst expected = `expected.length >= ${length}`;\n\treturn stringLengthComparator(greaterThanOrEqual, 's.string.lengthGreaterThanOrEqual', expected, length);\n}\n\nexport function stringLengthEqual(length: number): IConstraint<string> {\n\tconst expected = `expected.length === ${length}`;\n\treturn stringLengthComparator(equal, 's.string.lengthEqual', expected, length);\n}\n\nexport function stringLengthNotEqual(length: number): IConstraint<string> {\n\tconst expected = `expected.length !== ${length}`;\n\treturn stringLengthComparator(notEqual, 's.string.lengthNotEqual', expected, length);\n}\n\nexport function stringEmail(): IConstraint<string> {\n\treturn {\n\t\trun(input: string) {\n\t\t\treturn validateEmail(input)\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.string.email', 'Invalid email address', input, 'expected to be an email address'));\n\t\t}\n\t};\n}\n\nfunction stringRegexValidator(type: StringConstraintName, expected: string, regex: RegExp): IConstraint<string> {\n\treturn {\n\t\trun(input: string) {\n\t\t\treturn regex.test(input) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(type, 'Invalid string format', input, expected));\n\t\t}\n\t};\n}\n\nexport function stringUrl(options?: UrlOptions): IConstraint<string> {\n\tconst validatorFn = createUrlValidators(options);\n\treturn {\n\t\trun(input: string) {\n\t\t\tlet url: URL;\n\t\t\ttry {\n\t\t\t\turl = new URL(input);\n\t\t\t} catch {\n\t\t\t\treturn Result.err(new ExpectedConstraintError('s.string.url', 'Invalid URL', input, 'expected to match a URL'));\n\t\t\t}\n\n\t\t\tconst validatorFnResult = validatorFn(input, url);\n\t\t\tif (validatorFnResult === null) return Result.ok(input);\n\t\t\treturn Result.err(validatorFnResult);\n\t\t}\n\t};\n}\n\nexport function stringIp(version?: 4 | 6): IConstraint<string> {\n\tconst ipVersion = version ? (`v${version}` as const) : '';\n\tconst validatorFn = version === 4 ? isIPv4 : version === 6 ? isIPv6 : isIP;\n\n\tconst name = `s.string.ip${ipVersion}` as const;\n\tconst message = `Invalid IP${ipVersion} address`;\n\tconst expected = `expected to be an IP${ipVersion} address`;\n\treturn {\n\t\trun(input: string) {\n\t\t\treturn validatorFn(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, message, input, expected));\n\t\t}\n\t};\n}\n\nexport function stringRegex(regex: RegExp) {\n\treturn stringRegexValidator('s.string.regex', `expected ${regex}.test(expected) to be true`, regex);\n}\n\nexport function stringUuid({ version = 4, nullable = false }: StringUuidOptions = {}) {\n\tversion ??= '1-5';\n\tconst regex = new RegExp(\n\t\t`^(?:[0-9A-F]{8}-[0-9A-F]{4}-[${version}][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}${\n\t\t\tnullable ? '|00000000-0000-0000-0000-000000000000' : ''\n\t\t})$`,\n\t\t'i'\n\t);\n\tconst expected = `expected to match UUID${typeof version === 'number' ? `v${version}` : ` in range of ${version}`}`;\n\treturn stringRegexValidator('s.string.uuid', expected, regex);\n}\n\nexport function stringDate(): IConstraint<string> {\n\treturn {\n\t\trun(input: string) {\n\t\t\tconst time = Date.parse(input);\n\n\t\t\treturn Number.isNaN(time)\n\t\t\t\t? Result.err(\n\t\t\t\t\t\tnew ExpectedConstraintError(\n\t\t\t\t\t\t\t's.string.date',\n\t\t\t\t\t\t\t'Invalid date string',\n\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\t'expected to be a valid date string (in the ISO 8601 or ECMA-262 format)'\n\t\t\t\t\t\t)\n\t\t\t\t )\n\t\t\t\t: Result.ok(input);\n\t\t}\n\t};\n}\n\nexport function stringPhone(): IConstraint<string> {\n\treturn {\n\t\trun(input: string) {\n\t\t\treturn validatePhoneNumber(input)\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.string.phone', 'Invalid phone number', input, 'expected to be a phone number'));\n\t\t}\n\t};\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport {\n\tstringDate,\n\tstringEmail,\n\tstringIp,\n\tstringLengthEqual,\n\tstringLengthGreaterThan,\n\tstringLengthGreaterThanOrEqual,\n\tstringLengthLessThan,\n\tstringLengthLessThanOrEqual,\n\tstringLengthNotEqual,\n\tstringPhone,\n\tstringRegex,\n\tstringUrl,\n\tstringUuid,\n\ttype StringUuidOptions,\n\ttype UrlOptions\n} from '../constraints/StringConstraints';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class StringValidator<T extends string> extends BaseValidator<T> {\n\tpublic lengthLessThan(length: number): this {\n\t\treturn this.addConstraint(stringLengthLessThan(length) as IConstraint<T>);\n\t}\n\n\tpublic lengthLessThanOrEqual(length: number): this {\n\t\treturn this.addConstraint(stringLengthLessThanOrEqual(length) as IConstraint<T>);\n\t}\n\n\tpublic lengthGreaterThan(length: number): this {\n\t\treturn this.addConstraint(stringLengthGreaterThan(length) as IConstraint<T>);\n\t}\n\n\tpublic lengthGreaterThanOrEqual(length: number): this {\n\t\treturn this.addConstraint(stringLengthGreaterThanOrEqual(length) as IConstraint<T>);\n\t}\n\n\tpublic lengthEqual(length: number): this {\n\t\treturn this.addConstraint(stringLengthEqual(length) as IConstraint<T>);\n\t}\n\n\tpublic lengthNotEqual(length: number): this {\n\t\treturn this.addConstraint(stringLengthNotEqual(length) as IConstraint<T>);\n\t}\n\n\tpublic get email(): this {\n\t\treturn this.addConstraint(stringEmail() as IConstraint<T>);\n\t}\n\n\tpublic url(options?: UrlOptions): this {\n\t\treturn this.addConstraint(stringUrl(options) as IConstraint<T>);\n\t}\n\n\tpublic uuid(options?: StringUuidOptions): this {\n\t\treturn this.addConstraint(stringUuid(options) as IConstraint<T>);\n\t}\n\n\tpublic regex(regex: RegExp): this {\n\t\treturn this.addConstraint(stringRegex(regex) as IConstraint<T>);\n\t}\n\n\tpublic get date() {\n\t\treturn this.addConstraint(stringDate() as IConstraint<T>);\n\t}\n\n\tpublic get ipv4(): this {\n\t\treturn this.ip(4);\n\t}\n\n\tpublic get ipv6(): this {\n\t\treturn this.ip(6);\n\t}\n\n\tpublic ip(version?: 4 | 6): this {\n\t\treturn this.addConstraint(stringIp(version) as IConstraint<T>);\n\t}\n\n\tpublic phone(): this {\n\t\treturn this.addConstraint(stringPhone() as IConstraint<T>);\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn typeof value === 'string' //\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ValidationError('s.string', 'Expected a string primitive', value));\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class TupleValidator<T extends any[]> extends BaseValidator<[...T]> {\n\tprivate readonly validators: BaseValidator<[...T]>[] = [];\n\n\tpublic constructor(validators: BaseValidator<[...T]>[], constraints: readonly IConstraint<[...T]>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validators = validators;\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validators, this.constraints]);\n\t}\n\n\tprotected handle(values: unknown): Result<[...T], ValidationError | CombinedPropertyError> {\n\t\tif (!Array.isArray(values)) {\n\t\t\treturn Result.err(new ValidationError('s.tuple(T)', 'Expected an array', values));\n\t\t}\n\n\t\tif (values.length !== this.validators.length) {\n\t\t\treturn Result.err(new ValidationError('s.tuple(T)', `Expected an array of length ${this.validators.length}`, values));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(values as [...T]);\n\t\t}\n\n\t\tconst errors: [number, BaseError][] = [];\n\t\tconst transformed: T = [] as unknown as T;\n\n\t\tfor (let i = 0; i < values.length; i++) {\n\t\t\tconst result = this.validators[i].run(values[i]);\n\t\t\tif (result.isOk()) transformed.push(result.value);\n\t\t\telse errors.push([i, result.error!]);\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(transformed)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n}\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport type { BaseError } from '../lib/errors/BaseError';\nimport { CombinedPropertyError } from '../lib/errors/CombinedPropertyError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class MapValidator<K, V> extends BaseValidator<Map<K, V>> {\n\tprivate readonly keyValidator: BaseValidator<K>;\n\tprivate readonly valueValidator: BaseValidator<V>;\n\n\tpublic constructor(keyValidator: BaseValidator<K>, valueValidator: BaseValidator<V>, constraints: readonly IConstraint<Map<K, V>>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.keyValidator = keyValidator;\n\t\tthis.valueValidator = valueValidator;\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.keyValidator, this.valueValidator, this.constraints]);\n\t}\n\n\tprotected handle(value: unknown): Result<Map<K, V>, ValidationError | CombinedPropertyError> {\n\t\tif (!(value instanceof Map)) {\n\t\t\treturn Result.err(new ValidationError('s.map(K, V)', 'Expected a map', value));\n\t\t}\n\n\t\tif (!this.shouldRunConstraints) {\n\t\t\treturn Result.ok(value);\n\t\t}\n\n\t\tconst errors: [string, BaseError][] = [];\n\t\tconst transformed = new Map<K, V>();\n\n\t\tfor (const [key, val] of value.entries()) {\n\t\t\tconst keyResult = this.keyValidator.run(key);\n\t\t\tconst valueResult = this.valueValidator.run(val);\n\t\t\tconst { length } = errors;\n\t\t\tif (keyResult.isErr()) errors.push([key, keyResult.error]);\n\t\t\tif (valueResult.isErr()) errors.push([key, valueResult.error]);\n\t\t\tif (errors.length === length) transformed.set(keyResult.value!, valueResult.value!);\n\t\t}\n\n\t\treturn errors.length === 0 //\n\t\t\t? Result.ok(transformed)\n\t\t\t: Result.err(new CombinedPropertyError(errors));\n\t}\n}\n","import type { Result } from '../lib/Result';\nimport type { IConstraint, Unwrap } from '../type-exports';\nimport { BaseValidator, type ValidatorError } from './imports';\n\nexport class LazyValidator<T extends BaseValidator<unknown>, R = Unwrap<T>> extends BaseValidator<R> {\n\tprivate readonly validator: (value: unknown) => T;\n\n\tpublic constructor(validator: (value: unknown) => T, constraints: readonly IConstraint<R>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.validator = validator;\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.validator, this.constraints]);\n\t}\n\n\tprotected handle(values: unknown): Result<R, ValidatorError> {\n\t\treturn this.validator(values).run(values) as Result<R, ValidatorError>;\n\t}\n}\n","import type { InspectOptionsStylized } from 'util';\nimport { BaseError, customInspectSymbolStackLess } from './BaseError';\n\nexport class UnknownEnumValueError extends BaseError {\n\tpublic readonly value: string | number;\n\tpublic readonly enumKeys: string[];\n\tpublic readonly enumMappings: Map<string | number, string | number>;\n\n\tpublic constructor(value: string | number, keys: string[], enumMappings: Map<string | number, string | number>) {\n\t\tsuper('Expected the value to be one of the following enum values:');\n\n\t\tthis.value = value;\n\t\tthis.enumKeys = keys;\n\t\tthis.enumMappings = enumMappings;\n\t}\n\n\tpublic toJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tvalue: this.value,\n\t\t\tenumKeys: this.enumKeys,\n\t\t\tenumMappings: [...this.enumMappings.entries()]\n\t\t};\n\t}\n\n\tprotected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string {\n\t\tconst value = options.stylize(this.value.toString(), 'string');\n\t\tif (depth < 0) {\n\t\t\treturn options.stylize(`[UnknownEnumValueError: ${value}]`, 'special');\n\t\t}\n\n\t\tconst padding = `\\n ${options.stylize('|', 'undefined')} `;\n\t\tconst pairs = this.enumKeys\n\t\t\t.map((key) => {\n\t\t\t\tconst enumValue = this.enumMappings.get(key)!;\n\t\t\t\treturn `${options.stylize(key, 'string')} or ${options.stylize(\n\t\t\t\t\tenumValue.toString(),\n\t\t\t\t\ttypeof enumValue === 'number' ? 'number' : 'string'\n\t\t\t\t)}`;\n\t\t\t})\n\t\t\t.join(padding);\n\n\t\tconst header = `${options.stylize('UnknownEnumValueError', 'special')} > ${value}`;\n\t\tconst message = options.stylize(this.message, 'regexp');\n\t\tconst pairsBlock = `${padding}${pairs}`;\n\t\treturn `${header}\\n ${message}\\n${pairsBlock}`;\n\t}\n}\n","import { UnknownEnumValueError } from '../lib/errors/UnknownEnumValueError';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class NativeEnumValidator<T extends NativeEnumLike> extends BaseValidator<T[keyof T]> {\n\tpublic readonly enumShape: T;\n\tpublic readonly hasNumericElements: boolean = false;\n\tprivate readonly enumKeys: string[];\n\tprivate readonly enumMapping = new Map<string | number, T[keyof T]>();\n\n\tpublic constructor(enumShape: T) {\n\t\tsuper();\n\t\tthis.enumShape = enumShape;\n\n\t\tthis.enumKeys = Object.keys(enumShape).filter((key) => {\n\t\t\treturn typeof enumShape[enumShape[key]] !== 'number';\n\t\t});\n\n\t\tfor (const key of this.enumKeys) {\n\t\t\tconst enumValue = enumShape[key] as T[keyof T];\n\n\t\t\tthis.enumMapping.set(key, enumValue);\n\t\t\tthis.enumMapping.set(enumValue, enumValue);\n\n\t\t\tif (typeof enumValue === 'number') {\n\t\t\t\tthis.hasNumericElements = true;\n\t\t\t\tthis.enumMapping.set(`${enumValue}`, enumValue);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected override handle(value: unknown): Result<T[keyof T], ValidationError | UnknownEnumValueError> {\n\t\tconst typeOfValue = typeof value;\n\n\t\tif (typeOfValue === 'number') {\n\t\t\tif (!this.hasNumericElements) {\n\t\t\t\treturn Result.err(new ValidationError('s.nativeEnum(T)', 'Expected the value to be a string', value));\n\t\t\t}\n\t\t} else if (typeOfValue !== 'string') {\n\t\t\t// typeOfValue !== 'number' is implied here\n\t\t\treturn Result.err(new ValidationError('s.nativeEnum(T)', 'Expected the value to be a string or number', value));\n\t\t}\n\n\t\tconst casted = value as string | number;\n\n\t\tconst possibleEnumValue = this.enumMapping.get(casted);\n\n\t\treturn typeof possibleEnumValue === 'undefined'\n\t\t\t? Result.err(new UnknownEnumValueError(casted, this.enumKeys, this.enumMapping))\n\t\t\t: Result.ok(possibleEnumValue);\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.enumShape]);\n\t}\n}\n\nexport interface NativeEnumLike {\n\t[key: string]: string | number;\n\t[key: number]: string;\n}\n","import { ExpectedConstraintError } from '../lib/errors/ExpectedConstraintError';\nimport { Result } from '../lib/Result';\nimport type { IConstraint } from './base/IConstraint';\nimport { equal, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, notEqual, type Comparator } from './util/operators';\nimport type { TypedArray } from './util/typedArray';\n\nexport type TypedArrayConstraintName = `s.typedArray(T).${'byteLength' | 'length'}${\n\t| 'LessThan'\n\t| 'LessThanOrEqual'\n\t| 'GreaterThan'\n\t| 'GreaterThanOrEqual'\n\t| 'Equal'\n\t| 'NotEqual'\n\t| 'Range'\n\t| 'RangeInclusive'\n\t| 'RangeExclusive'}`;\n\nfunction typedArrayByteLengthComparator<T extends TypedArray>(\n\tcomparator: Comparator,\n\tname: TypedArrayConstraintName,\n\texpected: string,\n\tlength: number\n): IConstraint<T> {\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn comparator(input.byteLength, length) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid Typed Array byte length', input, expected));\n\t\t}\n\t};\n}\n\nexport function typedArrayByteLengthLessThan<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength < ${value}`;\n\treturn typedArrayByteLengthComparator(lessThan, 's.typedArray(T).byteLengthLessThan', expected, value);\n}\n\nexport function typedArrayByteLengthLessThanOrEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength <= ${value}`;\n\treturn typedArrayByteLengthComparator(lessThanOrEqual, 's.typedArray(T).byteLengthLessThanOrEqual', expected, value);\n}\n\nexport function typedArrayByteLengthGreaterThan<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength > ${value}`;\n\treturn typedArrayByteLengthComparator(greaterThan, 's.typedArray(T).byteLengthGreaterThan', expected, value);\n}\n\nexport function typedArrayByteLengthGreaterThanOrEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength >= ${value}`;\n\treturn typedArrayByteLengthComparator(greaterThanOrEqual, 's.typedArray(T).byteLengthGreaterThanOrEqual', expected, value);\n}\n\nexport function typedArrayByteLengthEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength === ${value}`;\n\treturn typedArrayByteLengthComparator(equal, 's.typedArray(T).byteLengthEqual', expected, value);\n}\n\nexport function typedArrayByteLengthNotEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.byteLength !== ${value}`;\n\treturn typedArrayByteLengthComparator(notEqual, 's.typedArray(T).byteLengthNotEqual', expected, value);\n}\n\nexport function typedArrayByteLengthRange<T extends TypedArray>(start: number, endBefore: number): IConstraint<T> {\n\tconst expected = `expected.byteLength >= ${start} && expected.byteLength < ${endBefore}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.byteLength >= start && input.byteLength < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.typedArray(T).byteLengthRange', 'Invalid Typed Array byte length', input, expected));\n\t\t}\n\t};\n}\n\nexport function typedArrayByteLengthRangeInclusive<T extends TypedArray>(start: number, end: number) {\n\tconst expected = `expected.byteLength >= ${start} && expected.byteLength <= ${end}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.byteLength >= start && input.byteLength <= end //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(\n\t\t\t\t\t\tnew ExpectedConstraintError('s.typedArray(T).byteLengthRangeInclusive', 'Invalid Typed Array byte length', input, expected)\n\t\t\t\t );\n\t\t}\n\t};\n}\n\nexport function typedArrayByteLengthRangeExclusive<T extends TypedArray>(startAfter: number, endBefore: number): IConstraint<T> {\n\tconst expected = `expected.byteLength > ${startAfter} && expected.byteLength < ${endBefore}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.byteLength > startAfter && input.byteLength < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(\n\t\t\t\t\t\tnew ExpectedConstraintError('s.typedArray(T).byteLengthRangeExclusive', 'Invalid Typed Array byte length', input, expected)\n\t\t\t\t );\n\t\t}\n\t};\n}\n\nfunction typedArrayLengthComparator<T extends TypedArray>(\n\tcomparator: Comparator,\n\tname: TypedArrayConstraintName,\n\texpected: string,\n\tlength: number\n): IConstraint<T> {\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn comparator(input.length, length) //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError(name, 'Invalid Typed Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function typedArrayLengthLessThan<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length < ${value}`;\n\treturn typedArrayLengthComparator(lessThan, 's.typedArray(T).lengthLessThan', expected, value);\n}\n\nexport function typedArrayLengthLessThanOrEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length <= ${value}`;\n\treturn typedArrayLengthComparator(lessThanOrEqual, 's.typedArray(T).lengthLessThanOrEqual', expected, value);\n}\n\nexport function typedArrayLengthGreaterThan<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length > ${value}`;\n\treturn typedArrayLengthComparator(greaterThan, 's.typedArray(T).lengthGreaterThan', expected, value);\n}\n\nexport function typedArrayLengthGreaterThanOrEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length >= ${value}`;\n\treturn typedArrayLengthComparator(greaterThanOrEqual, 's.typedArray(T).lengthGreaterThanOrEqual', expected, value);\n}\n\nexport function typedArrayLengthEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length === ${value}`;\n\treturn typedArrayLengthComparator(equal, 's.typedArray(T).lengthEqual', expected, value);\n}\n\nexport function typedArrayLengthNotEqual<T extends TypedArray>(value: number): IConstraint<T> {\n\tconst expected = `expected.length !== ${value}`;\n\treturn typedArrayLengthComparator(notEqual, 's.typedArray(T).lengthNotEqual', expected, value);\n}\n\nexport function typedArrayLengthRange<T extends TypedArray>(start: number, endBefore: number): IConstraint<T> {\n\tconst expected = `expected.length >= ${start} && expected.length < ${endBefore}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.length >= start && input.length < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.typedArray(T).lengthRange', 'Invalid Typed Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function typedArrayLengthRangeInclusive<T extends TypedArray>(start: number, end: number): IConstraint<T> {\n\tconst expected = `expected.length >= ${start} && expected.length <= ${end}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.length >= start && input.length <= end //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.typedArray(T).lengthRangeInclusive', 'Invalid Typed Array length', input, expected));\n\t\t}\n\t};\n}\n\nexport function typedArrayLengthRangeExclusive<T extends TypedArray>(startAfter: number, endBefore: number): IConstraint<T> {\n\tconst expected = `expected.length > ${startAfter} && expected.length < ${endBefore}`;\n\treturn {\n\t\trun(input: T) {\n\t\t\treturn input.length > startAfter && input.length < endBefore //\n\t\t\t\t? Result.ok(input)\n\t\t\t\t: Result.err(new ExpectedConstraintError('s.typedArray(T).lengthRangeExclusive', 'Invalid Typed Array length', input, expected));\n\t\t}\n\t};\n}\n","const vowels = ['a', 'e', 'i', 'o', 'u'];\n\nexport const aOrAn = (word: string) => {\n\treturn `${vowels.includes(word[0].toLowerCase()) ? 'an' : 'a'} ${word}`;\n};\n","export type TypedArray =\n\t| Int8Array\n\t| Uint8Array\n\t| Uint8ClampedArray\n\t| Int16Array\n\t| Uint16Array\n\t| Int32Array\n\t| Uint32Array\n\t| Float32Array\n\t| Float64Array\n\t| BigInt64Array\n\t| BigUint64Array;\n\nexport const TypedArrays = {\n\tInt8Array: (x: unknown): x is Int8Array => x instanceof Int8Array,\n\tUint8Array: (x: unknown): x is Uint8Array => x instanceof Uint8Array,\n\tUint8ClampedArray: (x: unknown): x is Uint8ClampedArray => x instanceof Uint8ClampedArray,\n\tInt16Array: (x: unknown): x is Int16Array => x instanceof Int16Array,\n\tUint16Array: (x: unknown): x is Uint16Array => x instanceof Uint16Array,\n\tInt32Array: (x: unknown): x is Int32Array => x instanceof Int32Array,\n\tUint32Array: (x: unknown): x is Uint32Array => x instanceof Uint32Array,\n\tFloat32Array: (x: unknown): x is Float32Array => x instanceof Float32Array,\n\tFloat64Array: (x: unknown): x is Float64Array => x instanceof Float64Array,\n\tBigInt64Array: (x: unknown): x is BigInt64Array => x instanceof BigInt64Array,\n\tBigUint64Array: (x: unknown): x is BigUint64Array => x instanceof BigUint64Array,\n\tTypedArray: (x: unknown): x is TypedArray => ArrayBuffer.isView(x) && !(x instanceof DataView)\n} as const;\n\nexport type TypedArrayName = keyof typeof TypedArrays;\n","import type { IConstraint } from '../constraints/base/IConstraint';\nimport {\n\ttypedArrayByteLengthEqual,\n\ttypedArrayByteLengthGreaterThan,\n\ttypedArrayByteLengthGreaterThanOrEqual,\n\ttypedArrayByteLengthLessThan,\n\ttypedArrayByteLengthLessThanOrEqual,\n\ttypedArrayByteLengthNotEqual,\n\ttypedArrayByteLengthRange,\n\ttypedArrayByteLengthRangeExclusive,\n\ttypedArrayByteLengthRangeInclusive,\n\ttypedArrayLengthEqual,\n\ttypedArrayLengthGreaterThan,\n\ttypedArrayLengthGreaterThanOrEqual,\n\ttypedArrayLengthLessThan,\n\ttypedArrayLengthLessThanOrEqual,\n\ttypedArrayLengthNotEqual,\n\ttypedArrayLengthRange,\n\ttypedArrayLengthRangeExclusive,\n\ttypedArrayLengthRangeInclusive\n} from '../constraints/TypedArrayLengthConstraints';\nimport { aOrAn } from '../constraints/util/common/vowels';\nimport { TypedArrays, type TypedArray, type TypedArrayName } from '../constraints/util/typedArray';\nimport { ValidationError } from '../lib/errors/ValidationError';\nimport { Result } from '../lib/Result';\nimport { BaseValidator } from './imports';\n\nexport class TypedArrayValidator<T extends TypedArray> extends BaseValidator<T> {\n\tprivate readonly type: TypedArrayName;\n\n\tpublic constructor(type: TypedArrayName, constraints: readonly IConstraint<T>[] = []) {\n\t\tsuper(constraints);\n\t\tthis.type = type;\n\t}\n\n\tpublic byteLengthLessThan(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthLessThan(length));\n\t}\n\n\tpublic byteLengthLessThanOrEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthLessThanOrEqual(length));\n\t}\n\n\tpublic byteLengthGreaterThan(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthGreaterThan(length));\n\t}\n\n\tpublic byteLengthGreaterThanOrEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthGreaterThanOrEqual(length));\n\t}\n\n\tpublic byteLengthEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthEqual(length));\n\t}\n\n\tpublic byteLengthNotEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthNotEqual(length));\n\t}\n\n\tpublic byteLengthRange(start: number, endBefore: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthRange(start, endBefore));\n\t}\n\n\tpublic byteLengthRangeInclusive(startAt: number, endAt: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthRangeInclusive(startAt, endAt) as IConstraint<T>);\n\t}\n\n\tpublic byteLengthRangeExclusive(startAfter: number, endBefore: number) {\n\t\treturn this.addConstraint(typedArrayByteLengthRangeExclusive(startAfter, endBefore));\n\t}\n\n\tpublic lengthLessThan(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthLessThan(length));\n\t}\n\n\tpublic lengthLessThanOrEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthLessThanOrEqual(length));\n\t}\n\n\tpublic lengthGreaterThan(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthGreaterThan(length));\n\t}\n\n\tpublic lengthGreaterThanOrEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthGreaterThanOrEqual(length));\n\t}\n\n\tpublic lengthEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthEqual(length));\n\t}\n\n\tpublic lengthNotEqual(length: number) {\n\t\treturn this.addConstraint(typedArrayLengthNotEqual(length));\n\t}\n\n\tpublic lengthRange(start: number, endBefore: number) {\n\t\treturn this.addConstraint(typedArrayLengthRange(start, endBefore));\n\t}\n\n\tpublic lengthRangeInclusive(startAt: number, endAt: number) {\n\t\treturn this.addConstraint(typedArrayLengthRangeInclusive(startAt, endAt));\n\t}\n\n\tpublic lengthRangeExclusive(startAfter: number, endBefore: number) {\n\t\treturn this.addConstraint(typedArrayLengthRangeExclusive(startAfter, endBefore));\n\t}\n\n\tprotected override clone(): this {\n\t\treturn Reflect.construct(this.constructor, [this.type, this.constraints]);\n\t}\n\n\tprotected handle(value: unknown): Result<T, ValidationError> {\n\t\treturn TypedArrays[this.type](value)\n\t\t\t? Result.ok(value as T)\n\t\t\t: Result.err(new ValidationError('s.typedArray', `Expected ${aOrAn(this.type)}`, value));\n\t}\n}\n","import type { TypedArray, TypedArrayName } from '../constraints/util/typedArray';\nimport type { Unwrap, UnwrapTuple } from '../lib/util-types';\nimport {\n\tArrayValidator,\n\tBaseValidator,\n\tBigIntValidator,\n\tBooleanValidator,\n\tDateValidator,\n\tInstanceValidator,\n\tLiteralValidator,\n\tMapValidator,\n\tNeverValidator,\n\tNullishValidator,\n\tNumberValidator,\n\tObjectValidator,\n\tPassthroughValidator,\n\tRecordValidator,\n\tSetValidator,\n\tStringValidator,\n\tTupleValidator,\n\tUnionValidator\n} from '../validators/imports';\nimport { LazyValidator } from '../validators/LazyValidator';\nimport { NativeEnumValidator, type NativeEnumLike } from '../validators/NativeEnumValidator';\nimport { TypedArrayValidator } from '../validators/TypedArrayValidator';\nimport type { Constructor, MappedObjectValidator } from './util-types';\n\nexport class Shapes {\n\tpublic get string() {\n\t\treturn new StringValidator();\n\t}\n\n\tpublic get number() {\n\t\treturn new NumberValidator();\n\t}\n\n\tpublic get bigint() {\n\t\treturn new BigIntValidator();\n\t}\n\n\tpublic get boolean() {\n\t\treturn new BooleanValidator();\n\t}\n\n\tpublic get date() {\n\t\treturn new DateValidator();\n\t}\n\n\tpublic object<T extends object>(shape: MappedObjectValidator<T>) {\n\t\treturn new ObjectValidator<T>(shape);\n\t}\n\n\tpublic get undefined() {\n\t\treturn this.literal(undefined);\n\t}\n\n\tpublic get null() {\n\t\treturn this.literal(null);\n\t}\n\n\tpublic get nullish() {\n\t\treturn new NullishValidator();\n\t}\n\n\tpublic get any() {\n\t\treturn new PassthroughValidator<any>();\n\t}\n\n\tpublic get unknown() {\n\t\treturn new PassthroughValidator<unknown>();\n\t}\n\n\tpublic get never() {\n\t\treturn new NeverValidator();\n\t}\n\n\tpublic enum<T>(...values: readonly T[]) {\n\t\treturn this.union(...values.map((value) => this.literal(value)));\n\t}\n\n\tpublic nativeEnum<T extends NativeEnumLike>(enumShape: T): NativeEnumValidator<T> {\n\t\treturn new NativeEnumValidator(enumShape);\n\t}\n\n\tpublic literal<T>(value: T): BaseValidator<T> {\n\t\tif (value instanceof Date) return this.date.equal(value) as unknown as BaseValidator<T>;\n\t\treturn new LiteralValidator(value);\n\t}\n\n\tpublic instance<T>(expected: Constructor<T>): InstanceValidator<T> {\n\t\treturn new InstanceValidator(expected);\n\t}\n\n\tpublic union<T extends [...BaseValidator<any>[]]>(...validators: [...T]): UnionValidator<Unwrap<T[number]>> {\n\t\treturn new UnionValidator(validators);\n\t}\n\n\tpublic array<T>(validator: BaseValidator<T[][number]>): ArrayValidator<T[], T[][number]>;\n\tpublic array<T extends unknown[]>(validator: BaseValidator<T[number]>): ArrayValidator<T, T[number]>;\n\tpublic array<T extends unknown[]>(validator: BaseValidator<T[number]>) {\n\t\treturn new ArrayValidator(validator);\n\t}\n\n\tpublic typedArray<T extends TypedArray>(type: TypedArrayName = 'TypedArray') {\n\t\treturn new TypedArrayValidator<T>(type);\n\t}\n\n\tpublic get int8Array() {\n\t\treturn this.typedArray<Int8Array>('Int8Array');\n\t}\n\n\tpublic get uint8Array() {\n\t\treturn this.typedArray<Uint8Array>('Uint8Array');\n\t}\n\n\tpublic get uint8ClampedArray() {\n\t\treturn this.typedArray<Uint8ClampedArray>('Uint8ClampedArray');\n\t}\n\n\tpublic get int16Array() {\n\t\treturn this.typedArray<Int16Array>('Int16Array');\n\t}\n\n\tpublic get uint16Array() {\n\t\treturn this.typedArray<Uint16Array>('Uint16Array');\n\t}\n\n\tpublic get int32Array() {\n\t\treturn this.typedArray<Int32Array>('Int32Array');\n\t}\n\n\tpublic get uint32Array() {\n\t\treturn this.typedArray<Uint32Array>('Uint32Array');\n\t}\n\n\tpublic get float32Array() {\n\t\treturn this.typedArray<Float32Array>('Float32Array');\n\t}\n\n\tpublic get float64Array() {\n\t\treturn this.typedArray<Float64Array>('Float64Array');\n\t}\n\n\tpublic get bigInt64Array() {\n\t\treturn this.typedArray<BigInt64Array>('BigInt64Array');\n\t}\n\n\tpublic get bigUint64Array() {\n\t\treturn this.typedArray<BigUint64Array>('BigUint64Array');\n\t}\n\n\tpublic tuple<T extends [...BaseValidator<any>[]]>(validators: [...T]): TupleValidator<UnwrapTuple<T>> {\n\t\treturn new TupleValidator(validators);\n\t}\n\n\tpublic set<T>(validator: BaseValidator<T>) {\n\t\treturn new SetValidator(validator);\n\t}\n\n\tpublic record<T>(validator: BaseValidator<T>) {\n\t\treturn new RecordValidator(validator);\n\t}\n\n\tpublic map<T, U>(keyValidator: BaseValidator<T>, valueValidator: BaseValidator<U>) {\n\t\treturn new MapValidator(keyValidator, valueValidator);\n\t}\n\n\tpublic lazy<T extends BaseValidator<unknown>>(validator: (value: unknown) => T) {\n\t\treturn new LazyValidator(validator);\n\t}\n}\n","import { Shapes } from './lib/Shapes';\n\nexport const s = new Shapes();\n\nexport * from './lib/Result';\nexport * from './lib/configs';\nexport * from './lib/errors/BaseError';\nexport * from './lib/errors/CombinedError';\nexport * from './lib/errors/CombinedPropertyError';\nexport * from './lib/errors/ExpectedConstraintError';\nexport * from './lib/errors/ExpectedValidationError';\nexport * from './lib/errors/MissingPropertyError';\nexport * from './lib/errors/MultiplePossibilitiesConstraintError';\nexport * from './lib/errors/UnknownEnumValueError';\nexport * from './lib/errors/UnknownPropertyError';\nexport * from './lib/errors/ValidationError';\nexport * from './type-exports';\n"]} \ No newline at end of file
diff --git a/node_modules/@sapphire/shapeshift/package.json b/node_modules/@sapphire/shapeshift/package.json
new file mode 100644
index 0000000..cd7d6e6
--- /dev/null
+++ b/node_modules/@sapphire/shapeshift/package.json
@@ -0,0 +1,125 @@
+{
+ "name": "@sapphire/shapeshift",
+ "version": "3.9.2",
+ "description": "Blazing fast input validation and transformation ⚡",
+ "author": "@sapphire",
+ "license": "MIT",
+ "main": "dist/index.js",
+ "module": "dist/index.mjs",
+ "browser": "dist/index.global.js",
+ "unpkg": "dist/index.global.js",
+ "types": "dist/index.d.ts",
+ "exports": {
+ "types": "./dist/index.d.ts",
+ "import": "./dist/index.mjs",
+ "require": "./dist/index.js"
+ },
+ "sideEffects": false,
+ "homepage": "https://www.sapphirejs.dev",
+ "scripts": {
+ "lint": "eslint src tests --ext ts --fix",
+ "format": "prettier --write \"{src,tests}/**/*.ts\"",
+ "docs": "typedoc-json-parser",
+ "test": "vitest run",
+ "build": "tsup",
+ "clean": "node scripts/clean.mjs",
+ "typecheck": "tsc -p tsconfig.eslint.json",
+ "bump": "cliff-jumper",
+ "check-update": "cliff-jumper --dry-run",
+ "_postinstall": "husky install .github/husky",
+ "prepack": "yarn build && pinst --disable",
+ "postpack": "pinst --enable"
+ },
+ "dependencies": {
+ "fast-deep-equal": "^3.1.3",
+ "lodash": "^4.17.21"
+ },
+ "devDependencies": {
+ "@commitlint/cli": "^17.6.5",
+ "@commitlint/config-conventional": "^17.6.5",
+ "@favware/cliff-jumper": "^2.0.1",
+ "@favware/npm-deprecate": "^1.0.7",
+ "@sapphire/eslint-config": "^4.4.2",
+ "@sapphire/prettier-config": "^1.4.5",
+ "@sapphire/ts-config": "^4.0.0",
+ "@types/jsdom": "^21.1.1",
+ "@types/lodash": "^4.14.195",
+ "@types/node": "^18.16.16",
+ "@typescript-eslint/eslint-plugin": "^5.59.8",
+ "@typescript-eslint/parser": "^5.59.8",
+ "@vitest/coverage-c8": "^0.31.4",
+ "cz-conventional-changelog": "^3.3.0",
+ "esbuild-plugins-node-modules-polyfill": "^1.0.14",
+ "eslint": "^8.42.0",
+ "eslint-config-prettier": "^8.8.0",
+ "eslint-plugin-prettier": "^4.2.1",
+ "husky": "^8.0.3",
+ "jsdom": "^22.1.0",
+ "lint-staged": "^13.2.2",
+ "pinst": "^3.0.0",
+ "prettier": "^2.8.8",
+ "pretty-quick": "^3.1.3",
+ "ts-node": "^10.9.1",
+ "tsup": "^6.7.0",
+ "typedoc": "^0.24.7",
+ "typedoc-json-parser": "^8.1.2",
+ "typescript": "^5.1.3",
+ "vite": "^4.3.9",
+ "vitest": "^0.31.4"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sapphiredev/shapeshift.git"
+ },
+ "files": [
+ "dist/**/*.js*",
+ "dist/**/*.mjs*",
+ "dist/**/*.d*"
+ ],
+ "engines": {
+ "node": ">=v14.0.0",
+ "npm": ">=7.0.0"
+ },
+ "keywords": [
+ "@sapphire/shapeshift",
+ "shapeshift",
+ "bot",
+ "typescript",
+ "ts",
+ "yarn",
+ "sapphire",
+ "schema",
+ "validation",
+ "type-checking",
+ "checking",
+ "input-validation",
+ "runtime-validation",
+ "ow",
+ "type-validation",
+ "zod"
+ ],
+ "bugs": {
+ "url": "https://github.com/sapphiredev/shapeshift/issues"
+ },
+ "commitlint": {
+ "extends": [
+ "@commitlint/config-conventional"
+ ]
+ },
+ "lint-staged": {
+ "*.{mjs,js,ts}": "eslint --fix --ext mjs,js,ts"
+ },
+ "config": {
+ "commitizen": {
+ "path": "./node_modules/cz-conventional-changelog"
+ }
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "resolutions": {
+ "ansi-regex": "^5.0.1",
+ "minimist": "^1.2.8"
+ },
+ "packageManager": "yarn@3.6.0"
+} \ No newline at end of file
diff --git a/node_modules/@sapphire/snowflake/CHANGELOG.md b/node_modules/@sapphire/snowflake/CHANGELOG.md
new file mode 100644
index 0000000..511b056
--- /dev/null
+++ b/node_modules/@sapphire/snowflake/CHANGELOG.md
@@ -0,0 +1,294 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+# [@sapphire/snowflake@3.5.1](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.5.0...@sapphire/snowflake@3.5.1) - (2023-05-12)
+
+## 🏠 Refactor
+
+- **snowflake:** Handle out-of-bounds `increment` correctly (#596) ([b5276d7](https://github.com/sapphiredev/utilities/commit/b5276d7372c33356975a302bafb5ae8aba604431))
+
+# [@sapphire/snowflake@3.5.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.4.3...@sapphire/snowflake@3.5.0) - (2023-05-10)
+
+## 🚀 Features
+
+- **snowflake:** Expose `processId` and `workerId` (#595) ([b873c1c](https://github.com/sapphiredev/utilities/commit/b873c1cc3b30cb54d710a49f7618e125ac1132ad))
+
+# [@sapphire/snowflake@3.4.2](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.4.1...@sapphire/snowflake@3.4.2) - (2023-04-12)
+
+## 🏠 Refactor
+
+- **Snowflake:** Simplify `compare` logic (#578) ([886254e](https://github.com/sapphiredev/utilities/commit/886254eea2f0cc5e8f63d015acffaf0e61489357))
+
+# [@sapphire/snowflake@3.4.1](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.4.0...@sapphire/snowflake@3.4.1) - (2023-04-10)
+
+## 🐛 Bug Fixes
+
+- **snowflake:** Ensure strings are never compared with bigints ([22199a5](https://github.com/sapphiredev/utilities/commit/22199a5aa0c6150f46e01bfbe328deecb9f818ba))
+- **deps:** Update all non-major dependencies (#577) ([291dd67](https://github.com/sapphiredev/utilities/commit/291dd6783e57d8f075ce566218ba076ef6c4bbbd))
+- **deps:** Update all non-major dependencies (#545) ([40ca040](https://github.com/sapphiredev/utilities/commit/40ca040a21d8a0949682051a3a974538183a400e))
+- **deps:** Update all non-major dependencies (#544) ([cc78f17](https://github.com/sapphiredev/utilities/commit/cc78f17390c7f3db08af92bf46a5a70a9c11dd5f))
+
+## 🧪 Testing
+
+- Cleanup tests ([aec1bb2](https://github.com/sapphiredev/utilities/commit/aec1bb290d0f3c00a1ae4f4c86302ebbb161d348))
+
+# [@sapphire/snowflake@3.4.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.3.0...@sapphire/snowflake@3.4.0) - (2022-12-27)
+
+## 🐛 Bug Fixes
+
+- **deps:** Update all non-major dependencies (#532) ([8033d1f](https://github.com/sapphiredev/utilities/commit/8033d1ff7a5a1974134c61f424f171cccb2915e1))
+
+## 📝 Documentation
+
+- Add @06000208 as a contributor ([fa3349e](https://github.com/sapphiredev/utilities/commit/fa3349e55ce4ad008785211dec7bf8e2b5d933df))
+
+## 🚀 Features
+
+- **snowflake:** Added `Snowflake.compare` (#531) ([6accd6d](https://github.com/sapphiredev/utilities/commit/6accd6d15eab12e312034f8ef43cff032835c972))
+
+# [@sapphire/snowflake@3.3.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.2.2...@sapphire/snowflake@3.3.0) - (2022-12-03)
+
+## 🏠 Refactor
+
+- Split `@sapphire/time-utilities` into 4 sub-packages (#462) ([574299a](https://github.com/sapphiredev/utilities/commit/574299a99e658f6500a2a7efa587a0919b2d1313))
+
+## 🐛 Bug Fixes
+
+- **snowflake:** TwitterSnowflake using incorrect epoch (#522) ([4ad4117](https://github.com/sapphiredev/utilities/commit/4ad41170488161b2998bd72da5a8b7fea10539a0))
+- **deps:** Update all non-major dependencies (#514) ([21b07d5](https://github.com/sapphiredev/utilities/commit/21b07d5db529a0d982647a60de98e46f36f1ac93))
+- **deps:** Update all non-major dependencies (#505) ([6178296](https://github.com/sapphiredev/utilities/commit/617829649e1e4deeee02b14533b5377cd5bc1fb3))
+- **deps:** Update all non-major dependencies (#466) ([dc08606](https://github.com/sapphiredev/utilities/commit/dc08606a97154e47c65536123ac5f8b1262f7bd2))
+- **deps:** Update all non-major dependencies ([e20f299](https://github.com/sapphiredev/utilities/commit/e20f29906e83cee000aaba9c6827e3bec5173d28))
+- **deps:** Update all non-major dependencies ([2308bd7](https://github.com/sapphiredev/utilities/commit/2308bd74356b6b2e0c12995b25f4d8ade4803fe9))
+- **deps:** Update all non-major dependencies ([84af0db](https://github.com/sapphiredev/utilities/commit/84af0db2db749223b036aa99fe19a2e9af5681c6))
+- **deps:** Update all non-major dependencies ([50cd8de](https://github.com/sapphiredev/utilities/commit/50cd8dea593b6f5ae75571209456b3421e2ca59a))
+
+## 📝 Documentation
+
+- Add @didinele as a contributor ([42ef7b6](https://github.com/sapphiredev/utilities/commit/42ef7b656c48fd0e720119db1d622c8bba2791e9))
+- Add @goestav as a contributor ([0e56a92](https://github.com/sapphiredev/utilities/commit/0e56a92a4e2d0942bfa207f81a8cb03b32312034))
+- Add @CitTheDev as a contributor ([34169ea](https://github.com/sapphiredev/utilities/commit/34169eae1dc0476ccf5a6c4f36e28602a204829e))
+- Add @legendhimslef as a contributor ([059b6f1](https://github.com/sapphiredev/utilities/commit/059b6f1ab5362d46d58624d06c1aa39192b0716f))
+- Add @r-priyam as a contributor ([fb278ba](https://github.com/sapphiredev/utilities/commit/fb278bacf627ec6fc88752eafeb12df5f3177a2c))
+- Change name of @kyranet (#451) ([df4fdef](https://github.com/sapphiredev/utilities/commit/df4fdefce18659975a4ebc224723638507d02d35))
+- Update @RealShadowNova as a contributor ([a869ba0](https://github.com/sapphiredev/utilities/commit/a869ba0abfad041610b9115187d426aebe671af6))
+- Add @muchnameless as a contributor ([a1221fe](https://github.com/sapphiredev/utilities/commit/a1221fea68506e99591d5d00ec552a07c26833f9))
+- Add @enxg as a contributor ([d2382f0](https://github.com/sapphiredev/utilities/commit/d2382f04e3909cb4ad11798a0a10e683f6cf5383))
+- Add @EvolutionX-10 as a contributor ([efc3a32](https://github.com/sapphiredev/utilities/commit/efc3a320a72ae258996dd62866d206c33f8d4961))
+- Add @MajesticString as a contributor ([295b3e9](https://github.com/sapphiredev/utilities/commit/295b3e9849a4b0fe64074bae02f6426378a303c3))
+- Add @Mzato0001 as a contributor ([c790ef2](https://github.com/sapphiredev/utilities/commit/c790ef25df2d7e22888fa9f8169167aa555e9e19))
+
+## 🚀 Features
+
+- **utilities:** Add possibility to import single functions by appending them to the import path. (#454) ([374c145](https://github.com/sapphiredev/utilities/commit/374c145a5dd329cfc1a867ed6720abf408683a88))
+
+## 🧪 Testing
+
+- Migrate to vitest (#380) ([075ec73](https://github.com/sapphiredev/utilities/commit/075ec73c7a8e3374fad3ada612d37eb4ac36ec8d))
+
+# [@sapphire/snowflake@3.2.2](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.2.1...@sapphire/snowflake@3.2.2) - (2022-04-24)
+
+## Bug Fixes
+
+- Fix typo (#333) ([ae2f257](https://github.com/sapphiredev/utilities/commit/ae2f25766d5985735f2d9b257eebd27cdc8a7c52))
+
+## Documentation
+
+- Add @NotKaskus as a contributor ([00da8f1](https://github.com/sapphiredev/utilities/commit/00da8f199137b9277119823f322d1f2d168d928a))
+- Add @imranbarbhuiya as a contributor ([fb674c2](https://github.com/sapphiredev/utilities/commit/fb674c2c5594d41e71662263553dcb4bac9e37f4))
+- Add @axisiscool as a contributor ([ce1aa31](https://github.com/sapphiredev/utilities/commit/ce1aa316871a88d3663efbdf2a42d3d8dfe6a27f))
+- Add @dhruv-kaushikk as a contributor ([ebbf43f](https://github.com/sapphiredev/utilities/commit/ebbf43f63617daba96e72c50a234bf8b64f6ddc4))
+- Add @Commandtechno as a contributor ([f1d69fa](https://github.com/sapphiredev/utilities/commit/f1d69fabe1ee0abe4be08b19e63dbec03102f7ce))
+- Fix typedoc causing OOM crashes ([63ba41c](https://github.com/sapphiredev/utilities/commit/63ba41c4b6678554b1c7043a22d3296db4f59360))
+
+## [3.2.1](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.2.0...@sapphire/snowflake@3.2.1) (2022-04-01)
+
+**Note:** Version bump only for package @sapphire/snowflake
+
+# [3.2.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.1.0...@sapphire/snowflake@3.2.0) (2022-03-06)
+
+### Bug Fixes
+
+- **snowflake:** fixed the examples for `DiscordSnowflake` and `TwitterSnowflake` ([#282](https://github.com/sapphiredev/utilities/issues/282)) ([2e5ed7f](https://github.com/sapphiredev/utilities/commit/2e5ed7fdadccf261967c45f73d0dc78e2497eed3))
+
+### Features
+
+- allow module: NodeNext ([#306](https://github.com/sapphiredev/utilities/issues/306)) ([9dc6dd6](https://github.com/sapphiredev/utilities/commit/9dc6dd619efab879bb2b0b3c9e64304e10a67ed6))
+- **ts-config:** add multi-config structure ([#281](https://github.com/sapphiredev/utilities/issues/281)) ([b5191d7](https://github.com/sapphiredev/utilities/commit/b5191d7f2416dc5838590c4ff221454925553e37))
+
+# [3.1.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.0.1...@sapphire/snowflake@3.1.0) (2022-01-28)
+
+### Features
+
+- change build system to tsup ([#270](https://github.com/sapphiredev/utilities/issues/270)) ([365a53a](https://github.com/sapphiredev/utilities/commit/365a53a5517a01a0926cf28a83c96b63f32ed9f8))
+
+## [3.0.1](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@3.0.0...@sapphire/snowflake@3.0.1) (2022-01-10)
+
+**Note:** Version bump only for package @sapphire/snowflake
+
+# [3.0.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@2.1.4...@sapphire/snowflake@3.0.0) (2021-12-08)
+
+### Bug Fixes
+
+- **snowflake:** remove env-based defaults ([#232](https://github.com/sapphiredev/utilities/issues/232)) ([10408e4](https://github.com/sapphiredev/utilities/commit/10408e4d3677e91490d967c3d89bf9575946090b))
+
+### Features
+
+- **Snowflake:** rework entire package ([#231](https://github.com/sapphiredev/utilities/issues/231)) ([1d02f1a](https://github.com/sapphiredev/utilities/commit/1d02f1a2f520efcbc194c3992af593d0e493873b))
+
+### BREAKING CHANGES
+
+- **Snowflake:** Renamed `processID` to `processId`
+- **Snowflake:** Renamed `workerID` to `workerId`
+- **Snowflake:** `workerId` now defaults to 0n instead of 1n
+- **Snowflake:** `DiscordSnowflake` is not longer a class, but a constructed Snowflake
+- **Snowflake:** `TwitterSnowflake` is not longer a class, but a constructed Snowflake
+
+## [2.1.4](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@2.1.3...@sapphire/snowflake@2.1.4) (2021-11-06)
+
+**Note:** Version bump only for package @sapphire/snowflake
+
+## [2.1.3](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@2.1.2...@sapphire/snowflake@2.1.3) (2021-10-26)
+
+**Note:** Version bump only for package @sapphire/snowflake
+
+## [2.1.2](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@2.1.1...@sapphire/snowflake@2.1.2) (2021-10-17)
+
+### Bug Fixes
+
+- allow more node & npm versions in engines field ([5977d2a](https://github.com/sapphiredev/utilities/commit/5977d2a30a4b2cfdf84aff3f33af03ffde1bbec5))
+
+## [2.1.1](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@2.1.0...@sapphire/snowflake@2.1.1) (2021-10-11)
+
+**Note:** Version bump only for package @sapphire/snowflake
+
+# [2.1.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@2.0.0...@sapphire/snowflake@2.1.0) (2021-10-04)
+
+### Bug Fixes
+
+- **snowflake:** fixed snowflake generating duplicate IDs ([#166](https://github.com/sapphiredev/utilities/issues/166)) ([f0cf4ad](https://github.com/sapphiredev/utilities/commit/f0cf4ad6bc0b8b2447499ca36581d2b453e52715))
+
+### Features
+
+- **snowflake:** set minimum NodeJS to v14 ([11a61c7](https://github.com/sapphiredev/utilities/commit/11a61c72bc29e683f9a4492815db3db094103bbc))
+
+# [2.0.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.3.6...@sapphire/snowflake@2.0.0) (2021-07-17)
+
+### Code Refactoring
+
+- **rateLimits:** rewrite all of it ([#130](https://github.com/sapphiredev/utilities/issues/130)) ([320778c](https://github.com/sapphiredev/utilities/commit/320778ca65cbf3591bd1ce0b1f2eb430693eef9a))
+
+### BREAKING CHANGES
+
+- **rateLimits:** Removed `Bucket`
+
+## [1.3.6](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.3.5...@sapphire/snowflake@1.3.6) (2021-07-11)
+
+**Note:** Version bump only for package @sapphire/snowflake
+
+## [1.3.5](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.3.4...@sapphire/snowflake@1.3.5) (2021-06-27)
+
+**Note:** Version bump only for package @sapphire/snowflake
+
+## [1.3.4](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.3.3...@sapphire/snowflake@1.3.4) (2021-06-19)
+
+### Bug Fixes
+
+- **doc:** change `[@link](https://github.com/link)` to `[@linkplain](https://github.com/linkplain)` for support in VSCode IntelliSense ([703d460](https://github.com/sapphiredev/utilities/commit/703d4605b547a8787aff62d6f1054ea26dfd9d1c))
+- **docs:** update-tsdoc-for-vscode-may-2021 ([#126](https://github.com/sapphiredev/utilities/issues/126)) ([f8581bf](https://github.com/sapphiredev/utilities/commit/f8581bfe97a1b2f8aac3a3d3ed342d8ba92d730b))
+
+## [1.3.3](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.3.2...@sapphire/snowflake@1.3.3) (2021-06-06)
+
+### Bug Fixes
+
+- remove peer deps, update dev deps, update READMEs ([#124](https://github.com/sapphiredev/utilities/issues/124)) ([67256ed](https://github.com/sapphiredev/utilities/commit/67256ed43b915b02a8b5c68230ba82d6210c5032))
+- **snowflake:** fixed parsing for timestamps as Date objects ([c17a515](https://github.com/sapphiredev/utilities/commit/c17a515b02931cf778ca69913132e8d4558504a1))
+
+## [1.3.2](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.3.1...@sapphire/snowflake@1.3.2) (2021-05-20)
+
+### Bug Fixes
+
+- **snowflake:** mark package as side effect free ([6a9bafc](https://github.com/sapphiredev/utilities/commit/6a9bafc24caba4b0ebbdd6896ac245ae6d60dede))
+
+## [1.3.1](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.3.0...@sapphire/snowflake@1.3.1) (2021-05-02)
+
+### Bug Fixes
+
+- drop the `www.` from the SapphireJS URL ([494d89f](https://github.com/sapphiredev/utilities/commit/494d89ffa04f78c195b93d7905b3232884f7d7e2))
+- update all the SapphireJS URLs from `.com` to `.dev` ([f59b46d](https://github.com/sapphiredev/utilities/commit/f59b46d1a0ebd39cad17b17d71cd3b9da808d5fd))
+
+# [1.3.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.8...@sapphire/snowflake@1.3.0) (2021-04-21)
+
+### Features
+
+- add @sapphire/embed-jsx ([#100](https://github.com/sapphiredev/utilities/issues/100)) ([7277a23](https://github.com/sapphiredev/utilities/commit/7277a236015236ed8e81b7882875410facc4ce17))
+
+## [1.2.8](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.7...@sapphire/snowflake@1.2.8) (2021-04-19)
+
+### Bug Fixes
+
+- change all Sapphire URLs from "project"->"community" & use our domain where applicable 👨‍🌾🚜 ([#102](https://github.com/sapphiredev/utilities/issues/102)) ([835b408](https://github.com/sapphiredev/utilities/commit/835b408e8e57130c3787aca2e32613346ff23e4d))
+
+## [1.2.7](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.6...@sapphire/snowflake@1.2.7) (2021-04-03)
+
+**Note:** Version bump only for package @sapphire/snowflake
+
+## [1.2.6](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.5...@sapphire/snowflake@1.2.6) (2021-03-16)
+
+### Bug Fixes
+
+- remove terser from all packages ([#79](https://github.com/sapphiredev/utilities/issues/79)) ([1cfe4e7](https://github.com/sapphiredev/utilities/commit/1cfe4e7c804e62c142495686d2b83b81d0026c02))
+
+## [1.2.5](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.4...@sapphire/snowflake@1.2.5) (2021-02-16)
+
+**Note:** Version bump only for package @sapphire/snowflake
+
+## [1.2.4](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.3...@sapphire/snowflake@1.2.4) (2021-01-16)
+
+**Note:** Version bump only for package @sapphire/snowflake
+
+## [1.2.3](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.2...@sapphire/snowflake@1.2.3) (2021-01-01)
+
+**Note:** Version bump only for package @sapphire/snowflake
+
+## [1.2.2](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.1...@sapphire/snowflake@1.2.2) (2020-12-26)
+
+**Note:** Version bump only for package @sapphire/snowflake
+
+## [1.2.1](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.2.0...@sapphire/snowflake@1.2.1) (2020-12-22)
+
+**Note:** Version bump only for package @sapphire/snowflake
+
+# [1.2.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.1.0...@sapphire/snowflake@1.2.0) (2020-11-15)
+
+### Bug Fixes
+
+- **snowflake:** pass keep_classnames to terser ([76ea062](https://github.com/sapphiredev/utilities/commit/76ea062d07000b169d9781f1a199b85ad3db0ba6))
+- **snowflake:** pass keep_fnames to terser ([b52aa76](https://github.com/sapphiredev/utilities/commit/b52aa764d8b02535496e0ceea3204a37552ce3d1))
+
+### Features
+
+- added time-utilities package ([#26](https://github.com/sapphiredev/utilities/issues/26)) ([f17a333](https://github.com/sapphiredev/utilities/commit/f17a3339667a452e8745fad7884272176e5d65e8))
+
+# [1.1.0](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.0.1...@sapphire/snowflake@1.1.0) (2020-11-04)
+
+### Bug Fixes
+
+- **ratelimits,snowflake,utilities:** fixed esm output target ([9fdab3f](https://github.com/sapphiredev/utilities/commit/9fdab3fca283c8c0b47cc32661c5cf8e0a5e583c))
+- **snowflake:** properly specify ESM and CommonJS exports ([e3278e6](https://github.com/sapphiredev/utilities/commit/e3278e6868a4f31d5b2a100710bcbce2b79bc218))
+
+### Features
+
+- added ratelimits package ([#15](https://github.com/sapphiredev/utilities/issues/15)) ([e0ae18c](https://github.com/sapphiredev/utilities/commit/e0ae18c5e1d0ae4e68a982829f1cf251fddfc80d))
+
+## [1.0.1](https://github.com/sapphiredev/utilities/compare/@sapphire/snowflake@1.0.0...@sapphire/snowflake@1.0.1) (2020-09-20)
+
+**Note:** Version bump only for package @sapphire/snowflake
+
+# 1.0.0 (2020-09-05)
+
+### Features
+
+- implement snowflake ([5ba4e2d](https://github.com/sapphiredev/utilities/commit/5ba4e2d82557dd4ff60ffe891a7b46e46373bea2))
+- **decorators:** add decorators package ([#4](https://github.com/sapphiredev/utilities/issues/4)) ([677b3e5](https://github.com/sapphiredev/utilities/commit/677b3e59d5c6160cbe6fb410821cadd7c0f00e3c))
diff --git a/node_modules/@sapphire/snowflake/README.md b/node_modules/@sapphire/snowflake/README.md
new file mode 100644
index 0000000..c8f0901
--- /dev/null
+++ b/node_modules/@sapphire/snowflake/README.md
@@ -0,0 +1,170 @@
+<div align="center">
+
+![Sapphire Logo](https://raw.githubusercontent.com/sapphiredev/assets/main/banners/SapphireCommunity.png)
+
+# @sapphire/snowflake
+
+**Deconstruct and generate snowflake IDs using BigInts.**
+
+[![GitHub](https://img.shields.io/github/license/sapphiredev/utilities)](https://github.com/sapphiredev/utilities/blob/main/LICENSE.md)
+[![codecov](https://codecov.io/gh/sapphiredev/utilities/branch/main/graph/badge.svg?token=OEGIV6RFDO)](https://codecov.io/gh/sapphiredev/utilities)
+[![npm bundle size](https://img.shields.io/bundlephobia/min/@sapphire/snowflake?logo=webpack&style=flat-square)](https://bundlephobia.com/result?p=@sapphire/snowflake)
+[![npm](https://img.shields.io/npm/v/@sapphire/snowflake?color=crimson&logo=npm&style=flat-square)](https://www.npmjs.com/package/@sapphire/snowflake)
+
+</div>
+
+**Table of Contents**
+
+- [Description](#description)
+- [Features](#features)
+- [Installation](#installation)
+- [Usage](#usage)
+ - [Constructing snowflakes](#constructing-snowflakes)
+ - [Snowflakes with custom epoch](#snowflakes-with-custom-epoch)
+ - [Snowflake with Discord epoch constant](#snowflake-with-discord-epoch-constant)
+ - [Snowflake with Twitter epoch constant](#snowflake-with-twitter-epoch-constant)
+ - [Deconstructing snowflakes](#deconstructing-snowflakes)
+ - [Snowflakes with custom epoch](#snowflakes-with-custom-epoch-1)
+ - [Snowflake with Discord epoch constant](#snowflake-with-discord-epoch-constant-1)
+ - [Snowflake with Twitter epoch constant](#snowflake-with-twitter-epoch-constant-1)
+- [Buy us some doughnuts](#buy-us-some-doughnuts)
+- [Contributors ✨](#contributors-%E2%9C%A8)
+
+## Description
+
+There is often a need to get a unique ID for entities, be that for Discord messages/channels/servers, keys in a database or many other similar examples. There are many ways to get such a unique ID, and one of those is using a so-called "snowflake". You can read more about snowflake IDs in [this Medium article](https://medium.com/better-programming/uuid-generation-snowflake-identifiers-unique-2aed8b1771bc).
+
+## Features
+
+- Written in TypeScript
+- Bundled with esbuild so it can be used in NodeJS and browsers
+- Offers CommonJS, ESM and UMD bundles
+- Offers predefined epochs for Discord and Twitter
+- Fully tested
+
+## Installation
+
+You can use the following command to install this package, or replace `npm install` with your package manager of choice.
+
+```sh
+npm install @sapphire/snowflake
+```
+
+## Usage
+
+**Note:** While this section uses `require`, the imports match 1:1 with ESM imports. For example `const { Snowflake } = require('@sapphire/snowflake')` equals `import { Snowflake } from '@sapphire/snowflake'`.
+
+### Constructing snowflakes
+
+#### Snowflakes with custom epoch
+
+```typescript
+// Import the Snowflake class
+const { Snowflake } = require('@sapphire/snowflake');
+
+// Define a custom epoch
+const epoch = new Date('2000-01-01T00:00:00.000Z');
+
+// Create an instance of Snowflake
+const snowflake = new Snowflake(epoch);
+
+// Generate a snowflake with the given epoch
+const uniqueId = snowflake.generate();
+```
+
+#### Snowflake with Discord epoch constant
+
+```typescript
+// Import the Snowflake class
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+
+// Generate a snowflake with Discord's epoch
+const uniqueId = DiscordSnowflake.generate();
+
+// Alternatively, you can use the method directly
+const uniqueId = DiscordSnowflake.generate();
+```
+
+#### Snowflake with Twitter epoch constant
+
+```typescript
+// Import the Snowflake class
+const { TwitterSnowflake } = require('@sapphire/snowflake');
+
+// Generate a snowflake with Twitter's epoch
+const uniqueId = TwitterSnowflake.generate();
+
+// Alternatively, you can use the method directly
+const uniqueId = TwitterSnowflake.generate();
+```
+
+### Deconstructing snowflakes
+
+#### Snowflakes with custom epoch
+
+```typescript
+// Import the Snowflake class
+const { Snowflake } = require('@sapphire/snowflake');
+
+// Define a custom epoch
+const epoch = new Date('2000-01-01T00:00:00.000Z');
+
+// Create an instance of Snowflake
+const snowflake = new Snowflake(epoch);
+
+// Deconstruct a snowflake with the given epoch
+const uniqueId = snowflake.deconstruct('3971046231244935168');
+```
+
+#### Snowflake with Discord epoch constant
+
+```typescript
+// Import the Snowflake class
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+
+// Deconstruct a snowflake with Discord's epoch
+const uniqueId = DiscordSnowflake.deconstruct('3971046231244935168');
+
+// Alternatively, you can use the method directly
+const uniqueId = DiscordSnowflake.deconstruct('3971046231244935168');
+```
+
+#### Snowflake with Twitter epoch constant
+
+```typescript
+// Import the Snowflake class
+const { TwitterSnowflake } = require('@sapphire/snowflake');
+
+// Deconstruct a snowflake with Twitter's epoch
+const uniqueId = TwitterSnowflake.deconstruct('3971046231244935168');
+
+// Alternatively, you can use the method directly
+const uniqueId = TwitterSnowflake.deconstruct('3971046231244935168');
+```
+
+---
+
+## Buy us some doughnuts
+
+Sapphire Community is and always will be open source, even if we don't get donations. That being said, we know there are amazing people who may still want to donate just to show their appreciation. Thank you very much in advance!
+
+We accept donations through Open Collective, Ko-fi, PayPal, Patreon and GitHub Sponsorships. You can use the buttons below to donate through your method of choice.
+
+| Donate With | Address |
+| :-------------: | :-------------------------------------------------: |
+| Open Collective | [Click Here](https://sapphirejs.dev/opencollective) |
+| Ko-fi | [Click Here](https://sapphirejs.dev/kofi) |
+| Patreon | [Click Here](https://sapphirejs.dev/patreon) |
+| PayPal | [Click Here](https://sapphirejs.dev/paypal) |
+
+## Contributors
+
+Please make sure to read the [Contributing Guide][contributing] before making a pull request.
+
+Thank you to all the people who already contributed to Sapphire!
+
+<a href="https://github.com/sapphiredev/utilities/graphs/contributors">
+ <img src="https://contrib.rocks/image?repo=sapphiredev/utilities" />
+</a>
+
+[contributing]: https://github.com/sapphiredev/.github/blob/main/.github/CONTRIBUTING.md
diff --git a/node_modules/@sapphire/snowflake/dist/index.d.ts b/node_modules/@sapphire/snowflake/dist/index.d.ts
new file mode 100644
index 0000000..76db741
--- /dev/null
+++ b/node_modules/@sapphire/snowflake/dist/index.d.ts
@@ -0,0 +1,202 @@
+declare const IncrementSymbol: unique symbol;
+declare const EpochSymbol: unique symbol;
+declare const ProcessIdSymbol: unique symbol;
+declare const WorkerIdSymbol: unique symbol;
+/**
+ * The maximum value the `workerId` field accepts in snowflakes.
+ */
+declare const MaximumWorkerId = 31n;
+/**
+ * The maximum value the `processId` field accepts in snowflakes.
+ */
+declare const MaximumProcessId = 31n;
+/**
+ * The maximum value the `increment` field accepts in snowflakes.
+ */
+declare const MaximumIncrement = 4095n;
+/**
+ * A class for generating and deconstructing Twitter snowflakes.
+ *
+ * A {@link https://developer.twitter.com/en/docs/twitter-ids Twitter snowflake}
+ * is a 64-bit unsigned integer with 4 fields that have a fixed epoch value.
+ *
+ * If we have a snowflake `266241948824764416` we can represent it as binary:
+ * ```
+ * 64 22 17 12 0
+ * 000000111011000111100001101001000101000000 00001 00000 000000000000
+ * number of ms since epoch worker pid increment
+ * ```
+ */
+declare class Snowflake {
+ /**
+ * Alias for {@link deconstruct}
+ */
+ decode: (id: string | bigint) => DeconstructedSnowflake;
+ /**
+ * Internal reference of the epoch passed in the constructor
+ * @internal
+ */
+ private readonly [EpochSymbol];
+ /**
+ * Internal incrementor for generating snowflakes
+ * @internal
+ */
+ private [IncrementSymbol];
+ /**
+ * The process ID that will be used by default in the generate method
+ * @internal
+ */
+ private [ProcessIdSymbol];
+ /**
+ * The worker ID that will be used by default in the generate method
+ * @internal
+ */
+ private [WorkerIdSymbol];
+ /**
+ * @param epoch the epoch to use
+ */
+ constructor(epoch: number | bigint | Date);
+ /**
+ * The epoch for this snowflake
+ */
+ get epoch(): bigint;
+ /**
+ * Gets the configured process ID
+ */
+ get processId(): bigint;
+ /**
+ * Sets the process ID that will be used by default for the {@link generate} method
+ * @param value The new value, will be coerced to BigInt and masked with `0b11111n`
+ */
+ set processId(value: number | bigint);
+ /**
+ * Gets the configured worker ID
+ */
+ get workerId(): bigint;
+ /**
+ * Sets the worker ID that will be used by default for the {@link generate} method
+ * @param value The new value, will be coerced to BigInt and masked with `0b11111n`
+ */
+ set workerId(value: number | bigint);
+ /**
+ * Generates a snowflake given an epoch and optionally a timestamp
+ * @param options options to pass into the generator, see {@link SnowflakeGenerateOptions}
+ *
+ * **note** when `increment` is not provided it defaults to the private `increment` of the instance
+ * @example
+ * ```typescript
+ * const epoch = new Date('2000-01-01T00:00:00.000Z');
+ * const snowflake = new Snowflake(epoch).generate();
+ * ```
+ * @returns A unique snowflake
+ */
+ generate({ increment, timestamp, workerId, processId }?: SnowflakeGenerateOptions): bigint;
+ /**
+ * Deconstructs a snowflake given a snowflake ID
+ * @param id the snowflake to deconstruct
+ * @returns a deconstructed snowflake
+ * @example
+ * ```typescript
+ * const epoch = new Date('2000-01-01T00:00:00.000Z');
+ * const snowflake = new Snowflake(epoch).deconstruct('3971046231244935168');
+ * ```
+ */
+ deconstruct(id: string | bigint): DeconstructedSnowflake;
+ /**
+ * Retrieves the timestamp field's value from a snowflake.
+ * @param id The snowflake to get the timestamp value from.
+ * @returns The UNIX timestamp that is stored in `id`.
+ */
+ timestampFrom(id: string | bigint): number;
+ /**
+ * Returns a number indicating whether a reference snowflake comes before, or after, or is same as the given
+ * snowflake in sort order.
+ * @param a The first snowflake to compare.
+ * @param b The second snowflake to compare.
+ * @returns `-1` if `a` is older than `b`, `0` if `a` and `b` are equals, `1` if `a` is newer than `b`.
+ * @example Sort snowflakes in ascending order
+ * ```typescript
+ * const ids = ['737141877803057244', '1056191128120082432', '254360814063058944'];
+ * console.log(ids.sort((a, b) => Snowflake.compare(a, b)));
+ * // → ['254360814063058944', '737141877803057244', '1056191128120082432'];
+ * ```
+ * @example Sort snowflakes in descending order
+ * ```typescript
+ * const ids = ['737141877803057244', '1056191128120082432', '254360814063058944'];
+ * console.log(ids.sort((a, b) => -Snowflake.compare(a, b)));
+ * // → ['1056191128120082432', '737141877803057244', '254360814063058944'];
+ * ```
+ */
+ static compare(a: string | bigint, b: string | bigint): -1 | 0 | 1;
+}
+/**
+ * Options for Snowflake#generate
+ */
+interface SnowflakeGenerateOptions {
+ /**
+ * Timestamp or date of the snowflake to generate
+ * @default Date.now()
+ */
+ timestamp?: number | bigint | Date;
+ /**
+ * The increment to use
+ * @default 0n
+ * @remark keep in mind that this bigint is auto-incremented between generate calls
+ */
+ increment?: bigint;
+ /**
+ * The worker ID to use, will be truncated to 5 bits (0-31)
+ * @default 0n
+ */
+ workerId?: bigint;
+ /**
+ * The process ID to use, will be truncated to 5 bits (0-31)
+ * @default 1n
+ */
+ processId?: bigint;
+}
+/**
+ * Object returned by Snowflake#deconstruct
+ */
+interface DeconstructedSnowflake {
+ /**
+ * The id in BigInt form
+ */
+ id: bigint;
+ /**
+ * The timestamp stored in the snowflake
+ */
+ timestamp: bigint;
+ /**
+ * The worker id stored in the snowflake
+ */
+ workerId: bigint;
+ /**
+ * The process id stored in the snowflake
+ */
+ processId: bigint;
+ /**
+ * The increment stored in the snowflake
+ */
+ increment: bigint;
+ /**
+ * The epoch to use in the snowflake
+ */
+ epoch: bigint;
+}
+
+/**
+ * A class for parsing snowflake ids using Discord's snowflake epoch
+ *
+ * Which is 2015-01-01 at 00:00:00.000 UTC+0, {@linkplain https://discord.com/developers/docs/reference#snowflakes}
+ */
+declare const DiscordSnowflake: Snowflake;
+
+/**
+ * A class for parsing snowflake ids using Twitter's snowflake epoch
+ *
+ * Which is 2010-11-04 at 01:42:54.657 UTC+0, found in the archived snowflake repository {@linkplain https://github.com/twitter-archive/snowflake/blob/b3f6a3c6ca8e1b6847baa6ff42bf72201e2c2231/src/main/scala/com/twitter/service/snowflake/IdWorker.scala#L25}
+ */
+declare const TwitterSnowflake: Snowflake;
+
+export { DeconstructedSnowflake, DiscordSnowflake, MaximumIncrement, MaximumProcessId, MaximumWorkerId, Snowflake, SnowflakeGenerateOptions, TwitterSnowflake };
diff --git a/node_modules/@sapphire/snowflake/dist/index.global.js b/node_modules/@sapphire/snowflake/dist/index.global.js
new file mode 100644
index 0000000..dbcad34
--- /dev/null
+++ b/node_modules/@sapphire/snowflake/dist/index.global.js
@@ -0,0 +1,198 @@
+var SapphireSnowflake = (function (exports) {
+ 'use strict';
+
+ var __defProp = Object.defineProperty;
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+ var __publicField = (obj, key, value) => {
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
+ return value;
+ };
+
+ // src/lib/Snowflake.ts
+ var IncrementSymbol = Symbol("@sapphire/snowflake.increment");
+ var EpochSymbol = Symbol("@sapphire/snowflake.epoch");
+ var ProcessIdSymbol = Symbol("@sapphire/snowflake.processId");
+ var WorkerIdSymbol = Symbol("@sapphire/snowflake.workerId");
+ var MaximumWorkerId = 0b11111n;
+ var MaximumProcessId = 0b11111n;
+ var MaximumIncrement = 0b111111111111n;
+ var _a, _b, _c, _d;
+ var Snowflake = class {
+ /**
+ * @param epoch the epoch to use
+ */
+ constructor(epoch) {
+ /**
+ * Alias for {@link deconstruct}
+ */
+ // eslint-disable-next-line @typescript-eslint/unbound-method
+ __publicField(this, "decode", this.deconstruct);
+ /**
+ * Internal reference of the epoch passed in the constructor
+ * @internal
+ */
+ __publicField(this, _a);
+ /**
+ * Internal incrementor for generating snowflakes
+ * @internal
+ */
+ __publicField(this, _b, 0n);
+ /**
+ * The process ID that will be used by default in the generate method
+ * @internal
+ */
+ __publicField(this, _c, 1n);
+ /**
+ * The worker ID that will be used by default in the generate method
+ * @internal
+ */
+ __publicField(this, _d, 0n);
+ this[EpochSymbol] = BigInt(epoch instanceof Date ? epoch.getTime() : epoch);
+ }
+ /**
+ * The epoch for this snowflake
+ */
+ get epoch() {
+ return this[EpochSymbol];
+ }
+ /**
+ * Gets the configured process ID
+ */
+ get processId() {
+ return this[ProcessIdSymbol];
+ }
+ /**
+ * Sets the process ID that will be used by default for the {@link generate} method
+ * @param value The new value, will be coerced to BigInt and masked with `0b11111n`
+ */
+ set processId(value) {
+ this[ProcessIdSymbol] = BigInt(value) & MaximumProcessId;
+ }
+ /**
+ * Gets the configured worker ID
+ */
+ get workerId() {
+ return this[WorkerIdSymbol];
+ }
+ /**
+ * Sets the worker ID that will be used by default for the {@link generate} method
+ * @param value The new value, will be coerced to BigInt and masked with `0b11111n`
+ */
+ set workerId(value) {
+ this[WorkerIdSymbol] = BigInt(value) & MaximumWorkerId;
+ }
+ /**
+ * Generates a snowflake given an epoch and optionally a timestamp
+ * @param options options to pass into the generator, see {@link SnowflakeGenerateOptions}
+ *
+ * **note** when `increment` is not provided it defaults to the private `increment` of the instance
+ * @example
+ * ```typescript
+ * const epoch = new Date('2000-01-01T00:00:00.000Z');
+ * const snowflake = new Snowflake(epoch).generate();
+ * ```
+ * @returns A unique snowflake
+ */
+ generate({
+ increment,
+ timestamp = Date.now(),
+ workerId = this[WorkerIdSymbol],
+ processId = this[ProcessIdSymbol]
+ } = {}) {
+ if (timestamp instanceof Date)
+ timestamp = BigInt(timestamp.getTime());
+ else if (typeof timestamp === "number")
+ timestamp = BigInt(timestamp);
+ else if (typeof timestamp !== "bigint") {
+ throw new TypeError(`"timestamp" argument must be a number, bigint, or Date (received ${typeof timestamp})`);
+ }
+ if (typeof increment !== "bigint") {
+ increment = this[IncrementSymbol];
+ this[IncrementSymbol] = increment + 1n & MaximumIncrement;
+ }
+ return timestamp - this[EpochSymbol] << 22n | (workerId & MaximumWorkerId) << 17n | (processId & MaximumProcessId) << 12n | increment & MaximumIncrement;
+ }
+ /**
+ * Deconstructs a snowflake given a snowflake ID
+ * @param id the snowflake to deconstruct
+ * @returns a deconstructed snowflake
+ * @example
+ * ```typescript
+ * const epoch = new Date('2000-01-01T00:00:00.000Z');
+ * const snowflake = new Snowflake(epoch).deconstruct('3971046231244935168');
+ * ```
+ */
+ deconstruct(id) {
+ const bigIntId = BigInt(id);
+ const epoch = this[EpochSymbol];
+ return {
+ id: bigIntId,
+ timestamp: (bigIntId >> 22n) + epoch,
+ workerId: bigIntId >> 17n & MaximumWorkerId,
+ processId: bigIntId >> 12n & MaximumProcessId,
+ increment: bigIntId & MaximumIncrement,
+ epoch
+ };
+ }
+ /**
+ * Retrieves the timestamp field's value from a snowflake.
+ * @param id The snowflake to get the timestamp value from.
+ * @returns The UNIX timestamp that is stored in `id`.
+ */
+ timestampFrom(id) {
+ return Number((BigInt(id) >> 22n) + this[EpochSymbol]);
+ }
+ /**
+ * Returns a number indicating whether a reference snowflake comes before, or after, or is same as the given
+ * snowflake in sort order.
+ * @param a The first snowflake to compare.
+ * @param b The second snowflake to compare.
+ * @returns `-1` if `a` is older than `b`, `0` if `a` and `b` are equals, `1` if `a` is newer than `b`.
+ * @example Sort snowflakes in ascending order
+ * ```typescript
+ * const ids = ['737141877803057244', '1056191128120082432', '254360814063058944'];
+ * console.log(ids.sort((a, b) => Snowflake.compare(a, b)));
+ * // → ['254360814063058944', '737141877803057244', '1056191128120082432'];
+ * ```
+ * @example Sort snowflakes in descending order
+ * ```typescript
+ * const ids = ['737141877803057244', '1056191128120082432', '254360814063058944'];
+ * console.log(ids.sort((a, b) => -Snowflake.compare(a, b)));
+ * // → ['1056191128120082432', '737141877803057244', '254360814063058944'];
+ * ```
+ */
+ static compare(a, b) {
+ const typeA = typeof a;
+ return typeA === typeof b ? typeA === "string" ? cmpString(a, b) : cmpBigInt(a, b) : cmpBigInt(BigInt(a), BigInt(b));
+ }
+ };
+ __name(Snowflake, "Snowflake");
+ _a = EpochSymbol, _b = IncrementSymbol, _c = ProcessIdSymbol, _d = WorkerIdSymbol;
+ function cmpBigInt(a, b) {
+ return a === b ? 0 : a < b ? -1 : 1;
+ }
+ __name(cmpBigInt, "cmpBigInt");
+ function cmpString(a, b) {
+ return a === b ? 0 : a.length < b.length ? -1 : a.length > b.length ? 1 : a < b ? -1 : 1;
+ }
+ __name(cmpString, "cmpString");
+
+ // src/lib/DiscordSnowflake.ts
+ var DiscordSnowflake = new Snowflake(1420070400000n);
+
+ // src/lib/TwitterSnowflake.ts
+ var TwitterSnowflake = new Snowflake(1288834974657n);
+
+ exports.DiscordSnowflake = DiscordSnowflake;
+ exports.MaximumIncrement = MaximumIncrement;
+ exports.MaximumProcessId = MaximumProcessId;
+ exports.MaximumWorkerId = MaximumWorkerId;
+ exports.Snowflake = Snowflake;
+ exports.TwitterSnowflake = TwitterSnowflake;
+
+ return exports;
+
+})({});
+//# sourceMappingURL=out.js.map
+//# sourceMappingURL=index.global.js.map \ No newline at end of file
diff --git a/node_modules/@sapphire/snowflake/dist/index.global.js.map b/node_modules/@sapphire/snowflake/dist/index.global.js.map
new file mode 100644
index 0000000..4204534
--- /dev/null
+++ b/node_modules/@sapphire/snowflake/dist/index.global.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/lib/Snowflake.ts","../src/lib/DiscordSnowflake.ts","../src/lib/TwitterSnowflake.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAM,kBAAkB,OAAO,+BAA+B;AAC9D,IAAM,cAAc,OAAO,2BAA2B;AACtD,IAAM,kBAAkB,OAAO,+BAA+B;AAC9D,IAAM,iBAAiB,OAAO,8BAA8B;AAKrD,IAAM,kBAAkB;AAKxB,IAAM,mBAAmB;AAKzB,IAAM,mBAAmB;AAlBhC;AAiCO,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AAS,KAAK,EAAE,SAAS,EAAE,SAAS,IAAI,IAAI,IAAI,KAAK;AACxF;AAFS;;;AC9MF,IAAM,mBAAmB,IAAI,UAAU,cAAc;;;ACArD,IAAM,mBAAmB,IAAI,UAAU,cAAc","sourcesContent":["const IncrementSymbol = Symbol('@sapphire/snowflake.increment');\nconst EpochSymbol = Symbol('@sapphire/snowflake.epoch');\nconst ProcessIdSymbol = Symbol('@sapphire/snowflake.processId');\nconst WorkerIdSymbol = Symbol('@sapphire/snowflake.workerId');\n\n/**\n * The maximum value the `workerId` field accepts in snowflakes.\n */\nexport const MaximumWorkerId = 0b11111n;\n\n/**\n * The maximum value the `processId` field accepts in snowflakes.\n */\nexport const MaximumProcessId = 0b11111n;\n\n/**\n * The maximum value the `increment` field accepts in snowflakes.\n */\nexport const MaximumIncrement = 0b111111111111n;\n\n/**\n * A class for generating and deconstructing Twitter snowflakes.\n *\n * A {@link https://developer.twitter.com/en/docs/twitter-ids Twitter snowflake}\n * is a 64-bit unsigned integer with 4 fields that have a fixed epoch value.\n *\n * If we have a snowflake `266241948824764416` we can represent it as binary:\n * ```\n * 64 22 17 12 0\n * 000000111011000111100001101001000101000000 00001 00000 000000000000\n * number of ms since epoch worker pid increment\n * ```\n */\nexport class Snowflake {\n\t/**\n\t * Alias for {@link deconstruct}\n\t */\n\t// eslint-disable-next-line @typescript-eslint/unbound-method\n\tpublic decode = this.deconstruct;\n\n\t/**\n\t * Internal reference of the epoch passed in the constructor\n\t * @internal\n\t */\n\tprivate readonly [EpochSymbol]: bigint;\n\n\t/**\n\t * Internal incrementor for generating snowflakes\n\t * @internal\n\t */\n\tprivate [IncrementSymbol] = 0n;\n\n\t/**\n\t * The process ID that will be used by default in the generate method\n\t * @internal\n\t */\n\tprivate [ProcessIdSymbol] = 1n;\n\n\t/**\n\t * The worker ID that will be used by default in the generate method\n\t * @internal\n\t */\n\tprivate [WorkerIdSymbol] = 0n;\n\n\t/**\n\t * @param epoch the epoch to use\n\t */\n\tpublic constructor(epoch: number | bigint | Date) {\n\t\tthis[EpochSymbol] = BigInt(epoch instanceof Date ? epoch.getTime() : epoch);\n\t}\n\n\t/**\n\t * The epoch for this snowflake\n\t */\n\tpublic get epoch(): bigint {\n\t\treturn this[EpochSymbol];\n\t}\n\n\t/**\n\t * Gets the configured process ID\n\t */\n\tpublic get processId(): bigint {\n\t\treturn this[ProcessIdSymbol];\n\t}\n\n\t/**\n\t * Sets the process ID that will be used by default for the {@link generate} method\n\t * @param value The new value, will be coerced to BigInt and masked with `0b11111n`\n\t */\n\tpublic set processId(value: number | bigint) {\n\t\tthis[ProcessIdSymbol] = BigInt(value) & MaximumProcessId;\n\t}\n\n\t/**\n\t * Gets the configured worker ID\n\t */\n\tpublic get workerId(): bigint {\n\t\treturn this[WorkerIdSymbol];\n\t}\n\n\t/**\n\t * Sets the worker ID that will be used by default for the {@link generate} method\n\t * @param value The new value, will be coerced to BigInt and masked with `0b11111n`\n\t */\n\tpublic set workerId(value: number | bigint) {\n\t\tthis[WorkerIdSymbol] = BigInt(value) & MaximumWorkerId;\n\t}\n\n\t/**\n\t * Generates a snowflake given an epoch and optionally a timestamp\n\t * @param options options to pass into the generator, see {@link SnowflakeGenerateOptions}\n\t *\n\t * **note** when `increment` is not provided it defaults to the private `increment` of the instance\n\t * @example\n\t * ```typescript\n\t * const epoch = new Date('2000-01-01T00:00:00.000Z');\n\t * const snowflake = new Snowflake(epoch).generate();\n\t * ```\n\t * @returns A unique snowflake\n\t */\n\tpublic generate({\n\t\tincrement,\n\t\ttimestamp = Date.now(),\n\t\tworkerId = this[WorkerIdSymbol],\n\t\tprocessId = this[ProcessIdSymbol]\n\t}: SnowflakeGenerateOptions = {}) {\n\t\tif (timestamp instanceof Date) timestamp = BigInt(timestamp.getTime());\n\t\telse if (typeof timestamp === 'number') timestamp = BigInt(timestamp);\n\t\telse if (typeof timestamp !== 'bigint') {\n\t\t\tthrow new TypeError(`\"timestamp\" argument must be a number, bigint, or Date (received ${typeof timestamp})`);\n\t\t}\n\n\t\tif (typeof increment !== 'bigint') {\n\t\t\tincrement = this[IncrementSymbol];\n\t\t\tthis[IncrementSymbol] = (increment + 1n) & MaximumIncrement;\n\t\t}\n\n\t\t// timestamp, workerId, processId, increment\n\t\treturn (\n\t\t\t((timestamp - this[EpochSymbol]) << 22n) |\n\t\t\t((workerId & MaximumWorkerId) << 17n) |\n\t\t\t((processId & MaximumProcessId) << 12n) |\n\t\t\t(increment & MaximumIncrement)\n\t\t);\n\t}\n\n\t/**\n\t * Deconstructs a snowflake given a snowflake ID\n\t * @param id the snowflake to deconstruct\n\t * @returns a deconstructed snowflake\n\t * @example\n\t * ```typescript\n\t * const epoch = new Date('2000-01-01T00:00:00.000Z');\n\t * const snowflake = new Snowflake(epoch).deconstruct('3971046231244935168');\n\t * ```\n\t */\n\tpublic deconstruct(id: string | bigint): DeconstructedSnowflake {\n\t\tconst bigIntId = BigInt(id);\n\t\tconst epoch = this[EpochSymbol];\n\t\treturn {\n\t\t\tid: bigIntId,\n\t\t\ttimestamp: (bigIntId >> 22n) + epoch,\n\t\t\tworkerId: (bigIntId >> 17n) & MaximumWorkerId,\n\t\t\tprocessId: (bigIntId >> 12n) & MaximumProcessId,\n\t\t\tincrement: bigIntId & MaximumIncrement,\n\t\t\tepoch\n\t\t};\n\t}\n\n\t/**\n\t * Retrieves the timestamp field's value from a snowflake.\n\t * @param id The snowflake to get the timestamp value from.\n\t * @returns The UNIX timestamp that is stored in `id`.\n\t */\n\tpublic timestampFrom(id: string | bigint): number {\n\t\treturn Number((BigInt(id) >> 22n) + this[EpochSymbol]);\n\t}\n\n\t/**\n\t * Returns a number indicating whether a reference snowflake comes before, or after, or is same as the given\n\t * snowflake in sort order.\n\t * @param a The first snowflake to compare.\n\t * @param b The second snowflake to compare.\n\t * @returns `-1` if `a` is older than `b`, `0` if `a` and `b` are equals, `1` if `a` is newer than `b`.\n\t * @example Sort snowflakes in ascending order\n\t * ```typescript\n\t * const ids = ['737141877803057244', '1056191128120082432', '254360814063058944'];\n\t * console.log(ids.sort((a, b) => Snowflake.compare(a, b)));\n\t * // → ['254360814063058944', '737141877803057244', '1056191128120082432'];\n\t * ```\n\t * @example Sort snowflakes in descending order\n\t * ```typescript\n\t * const ids = ['737141877803057244', '1056191128120082432', '254360814063058944'];\n\t * console.log(ids.sort((a, b) => -Snowflake.compare(a, b)));\n\t * // → ['1056191128120082432', '737141877803057244', '254360814063058944'];\n\t * ```\n\t */\n\tpublic static compare(a: string | bigint, b: string | bigint): -1 | 0 | 1 {\n\t\tconst typeA = typeof a;\n\t\treturn typeA === typeof b\n\t\t\t? typeA === 'string'\n\t\t\t\t? cmpString(a as string, b as string)\n\t\t\t\t: cmpBigInt(a as bigint, b as bigint)\n\t\t\t: cmpBigInt(BigInt(a), BigInt(b));\n\t}\n}\n\n/** @internal */\nfunction cmpBigInt(a: bigint, b: bigint) {\n\treturn a === b ? 0 : a < b ? -1 : 1;\n}\n\n/** @internal */\nfunction cmpString(a: string, b: string) {\n\treturn a === b ? 0 : a.length < b.length ? -1 : a.length > b.length ? 1 : a < b ? -1 : 1;\n}\n\n/**\n * Options for Snowflake#generate\n */\nexport interface SnowflakeGenerateOptions {\n\t/**\n\t * Timestamp or date of the snowflake to generate\n\t * @default Date.now()\n\t */\n\ttimestamp?: number | bigint | Date;\n\n\t/**\n\t * The increment to use\n\t * @default 0n\n\t * @remark keep in mind that this bigint is auto-incremented between generate calls\n\t */\n\tincrement?: bigint;\n\n\t/**\n\t * The worker ID to use, will be truncated to 5 bits (0-31)\n\t * @default 0n\n\t */\n\tworkerId?: bigint;\n\n\t/**\n\t * The process ID to use, will be truncated to 5 bits (0-31)\n\t * @default 1n\n\t */\n\tprocessId?: bigint;\n}\n\n/**\n * Object returned by Snowflake#deconstruct\n */\nexport interface DeconstructedSnowflake {\n\t/**\n\t * The id in BigInt form\n\t */\n\tid: bigint;\n\n\t/**\n\t * The timestamp stored in the snowflake\n\t */\n\ttimestamp: bigint;\n\n\t/**\n\t * The worker id stored in the snowflake\n\t */\n\tworkerId: bigint;\n\n\t/**\n\t * The process id stored in the snowflake\n\t */\n\tprocessId: bigint;\n\n\t/**\n\t * The increment stored in the snowflake\n\t */\n\tincrement: bigint;\n\n\t/**\n\t * The epoch to use in the snowflake\n\t */\n\tepoch: bigint;\n}\n","import { Snowflake } from './Snowflake';\n\n/**\n * A class for parsing snowflake ids using Discord's snowflake epoch\n *\n * Which is 2015-01-01 at 00:00:00.000 UTC+0, {@linkplain https://discord.com/developers/docs/reference#snowflakes}\n */\nexport const DiscordSnowflake = new Snowflake(1420070400000n);\n","import { Snowflake } from './Snowflake';\n\n/**\n * A class for parsing snowflake ids using Twitter's snowflake epoch\n *\n * Which is 2010-11-04 at 01:42:54.657 UTC+0, found in the archived snowflake repository {@linkplain https://github.com/twitter-archive/snowflake/blob/b3f6a3c6ca8e1b6847baa6ff42bf72201e2c2231/src/main/scala/com/twitter/service/snowflake/IdWorker.scala#L25}\n */\nexport const TwitterSnowflake = new Snowflake(1288834974657n);\n"]} \ No newline at end of file
diff --git a/node_modules/@sapphire/snowflake/dist/index.js b/node_modules/@sapphire/snowflake/dist/index.js
new file mode 100644
index 0000000..4cfad2a
--- /dev/null
+++ b/node_modules/@sapphire/snowflake/dist/index.js
@@ -0,0 +1,193 @@
+'use strict';
+
+var __defProp = Object.defineProperty;
+var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+var __publicField = (obj, key, value) => {
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
+ return value;
+};
+
+// src/lib/Snowflake.ts
+var IncrementSymbol = Symbol("@sapphire/snowflake.increment");
+var EpochSymbol = Symbol("@sapphire/snowflake.epoch");
+var ProcessIdSymbol = Symbol("@sapphire/snowflake.processId");
+var WorkerIdSymbol = Symbol("@sapphire/snowflake.workerId");
+var MaximumWorkerId = 0b11111n;
+var MaximumProcessId = 0b11111n;
+var MaximumIncrement = 0b111111111111n;
+var _a, _b, _c, _d;
+var Snowflake = class {
+ /**
+ * @param epoch the epoch to use
+ */
+ constructor(epoch) {
+ /**
+ * Alias for {@link deconstruct}
+ */
+ // eslint-disable-next-line @typescript-eslint/unbound-method
+ __publicField(this, "decode", this.deconstruct);
+ /**
+ * Internal reference of the epoch passed in the constructor
+ * @internal
+ */
+ __publicField(this, _a);
+ /**
+ * Internal incrementor for generating snowflakes
+ * @internal
+ */
+ __publicField(this, _b, 0n);
+ /**
+ * The process ID that will be used by default in the generate method
+ * @internal
+ */
+ __publicField(this, _c, 1n);
+ /**
+ * The worker ID that will be used by default in the generate method
+ * @internal
+ */
+ __publicField(this, _d, 0n);
+ this[EpochSymbol] = BigInt(epoch instanceof Date ? epoch.getTime() : epoch);
+ }
+ /**
+ * The epoch for this snowflake
+ */
+ get epoch() {
+ return this[EpochSymbol];
+ }
+ /**
+ * Gets the configured process ID
+ */
+ get processId() {
+ return this[ProcessIdSymbol];
+ }
+ /**
+ * Sets the process ID that will be used by default for the {@link generate} method
+ * @param value The new value, will be coerced to BigInt and masked with `0b11111n`
+ */
+ set processId(value) {
+ this[ProcessIdSymbol] = BigInt(value) & MaximumProcessId;
+ }
+ /**
+ * Gets the configured worker ID
+ */
+ get workerId() {
+ return this[WorkerIdSymbol];
+ }
+ /**
+ * Sets the worker ID that will be used by default for the {@link generate} method
+ * @param value The new value, will be coerced to BigInt and masked with `0b11111n`
+ */
+ set workerId(value) {
+ this[WorkerIdSymbol] = BigInt(value) & MaximumWorkerId;
+ }
+ /**
+ * Generates a snowflake given an epoch and optionally a timestamp
+ * @param options options to pass into the generator, see {@link SnowflakeGenerateOptions}
+ *
+ * **note** when `increment` is not provided it defaults to the private `increment` of the instance
+ * @example
+ * ```typescript
+ * const epoch = new Date('2000-01-01T00:00:00.000Z');
+ * const snowflake = new Snowflake(epoch).generate();
+ * ```
+ * @returns A unique snowflake
+ */
+ generate({
+ increment,
+ timestamp = Date.now(),
+ workerId = this[WorkerIdSymbol],
+ processId = this[ProcessIdSymbol]
+ } = {}) {
+ if (timestamp instanceof Date)
+ timestamp = BigInt(timestamp.getTime());
+ else if (typeof timestamp === "number")
+ timestamp = BigInt(timestamp);
+ else if (typeof timestamp !== "bigint") {
+ throw new TypeError(`"timestamp" argument must be a number, bigint, or Date (received ${typeof timestamp})`);
+ }
+ if (typeof increment !== "bigint") {
+ increment = this[IncrementSymbol];
+ this[IncrementSymbol] = increment + 1n & MaximumIncrement;
+ }
+ return timestamp - this[EpochSymbol] << 22n | (workerId & MaximumWorkerId) << 17n | (processId & MaximumProcessId) << 12n | increment & MaximumIncrement;
+ }
+ /**
+ * Deconstructs a snowflake given a snowflake ID
+ * @param id the snowflake to deconstruct
+ * @returns a deconstructed snowflake
+ * @example
+ * ```typescript
+ * const epoch = new Date('2000-01-01T00:00:00.000Z');
+ * const snowflake = new Snowflake(epoch).deconstruct('3971046231244935168');
+ * ```
+ */
+ deconstruct(id) {
+ const bigIntId = BigInt(id);
+ const epoch = this[EpochSymbol];
+ return {
+ id: bigIntId,
+ timestamp: (bigIntId >> 22n) + epoch,
+ workerId: bigIntId >> 17n & MaximumWorkerId,
+ processId: bigIntId >> 12n & MaximumProcessId,
+ increment: bigIntId & MaximumIncrement,
+ epoch
+ };
+ }
+ /**
+ * Retrieves the timestamp field's value from a snowflake.
+ * @param id The snowflake to get the timestamp value from.
+ * @returns The UNIX timestamp that is stored in `id`.
+ */
+ timestampFrom(id) {
+ return Number((BigInt(id) >> 22n) + this[EpochSymbol]);
+ }
+ /**
+ * Returns a number indicating whether a reference snowflake comes before, or after, or is same as the given
+ * snowflake in sort order.
+ * @param a The first snowflake to compare.
+ * @param b The second snowflake to compare.
+ * @returns `-1` if `a` is older than `b`, `0` if `a` and `b` are equals, `1` if `a` is newer than `b`.
+ * @example Sort snowflakes in ascending order
+ * ```typescript
+ * const ids = ['737141877803057244', '1056191128120082432', '254360814063058944'];
+ * console.log(ids.sort((a, b) => Snowflake.compare(a, b)));
+ * // → ['254360814063058944', '737141877803057244', '1056191128120082432'];
+ * ```
+ * @example Sort snowflakes in descending order
+ * ```typescript
+ * const ids = ['737141877803057244', '1056191128120082432', '254360814063058944'];
+ * console.log(ids.sort((a, b) => -Snowflake.compare(a, b)));
+ * // → ['1056191128120082432', '737141877803057244', '254360814063058944'];
+ * ```
+ */
+ static compare(a, b) {
+ const typeA = typeof a;
+ return typeA === typeof b ? typeA === "string" ? cmpString(a, b) : cmpBigInt(a, b) : cmpBigInt(BigInt(a), BigInt(b));
+ }
+};
+__name(Snowflake, "Snowflake");
+_a = EpochSymbol, _b = IncrementSymbol, _c = ProcessIdSymbol, _d = WorkerIdSymbol;
+function cmpBigInt(a, b) {
+ return a === b ? 0 : a < b ? -1 : 1;
+}
+__name(cmpBigInt, "cmpBigInt");
+function cmpString(a, b) {
+ return a === b ? 0 : a.length < b.length ? -1 : a.length > b.length ? 1 : a < b ? -1 : 1;
+}
+__name(cmpString, "cmpString");
+
+// src/lib/DiscordSnowflake.ts
+var DiscordSnowflake = new Snowflake(1420070400000n);
+
+// src/lib/TwitterSnowflake.ts
+var TwitterSnowflake = new Snowflake(1288834974657n);
+
+exports.DiscordSnowflake = DiscordSnowflake;
+exports.MaximumIncrement = MaximumIncrement;
+exports.MaximumProcessId = MaximumProcessId;
+exports.MaximumWorkerId = MaximumWorkerId;
+exports.Snowflake = Snowflake;
+exports.TwitterSnowflake = TwitterSnowflake;
+//# sourceMappingURL=out.js.map
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/@sapphire/snowflake/dist/index.js.map b/node_modules/@sapphire/snowflake/dist/index.js.map
new file mode 100644
index 0000000..4204534
--- /dev/null
+++ b/node_modules/@sapphire/snowflake/dist/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/lib/Snowflake.ts","../src/lib/DiscordSnowflake.ts","../src/lib/TwitterSnowflake.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAM,kBAAkB,OAA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WM,kBAMT,sBAMA,sBAMA;AAkJV,SAAS,UAAU,GAAW,GAAW;AACxC,SAAO,MAAM,IAAI,IAAI,IAAI,IAAI,KAAK;AACnC;AAFS;AAKT,SAAS,UAAU,GAAW,GAAW;AACxC,SAAO,MAAM,IAAI,IAAI,EAAE,SAAS,EAAE,SAAS,KAAK,EAAE,SAAS,EAAE,SAAS,IAAI,IAAI,IAAI,KAAK;AACxF;AAFS;;;AC9MF,IAAM,mBAAmB,IAAI,UAAU,cAAc;;;ACArD,IAAM,mBAAmB,IAAI,UAAU,cAAc","sourcesContent":["const IncrementSymbol = Symbol('@sapphire/snowflake.increment');\nconst EpochSymbol = Symbol('@sapphire/snowflake.epoch');\nconst ProcessIdSymbol = Symbol('@sapphire/snowflake.processId');\nconst WorkerIdSymbol = Symbol('@sapphire/snowflake.workerId');\n\n/**\n * The maximum value the `workerId` field accepts in snowflakes.\n */\nexport const MaximumWorkerId = 0b11111n;\n\n/**\n * The maximum value the `processId` field accepts in snowflakes.\n */\nexport const MaximumProcessId = 0b11111n;\n\n/**\n * The maximum value the `increment` field accepts in snowflakes.\n */\nexport const MaximumIncrement = 0b111111111111n;\n\n/**\n * A class for generating and deconstructing Twitter snowflakes.\n *\n * A {@link https://developer.twitter.com/en/docs/twitter-ids Twitter snowflake}\n * is a 64-bit unsigned integer with 4 fields that have a fixed epoch value.\n *\n * If we have a snowflake `266241948824764416` we can represent it as binary:\n * ```\n * 64 22 17 12 0\n * 000000111011000111100001101001000101000000 00001 00000 000000000000\n * number of ms since epoch worker pid increment\n * ```\n */\nexport class Snowflake {\n\t/**\n\t * Alias for {@link deconstruct}\n\t */\n\t// eslint-disable-next-line @typescript-eslint/unbound-method\n\tpublic decode = this.deconstruct;\n\n\t/**\n\t * Internal reference of the epoch passed in the constructor\n\t * @internal\n\t */\n\tprivate readonly [EpochSymbol]: bigint;\n\n\t/**\n\t * Internal incrementor for generating snowflakes\n\t * @internal\n\t */\n\tprivate [IncrementSymbol] = 0n;\n\n\t/**\n\t * The process ID that will be used by default in the generate method\n\t * @internal\n\t */\n\tprivate [ProcessIdSymbol] = 1n;\n\n\t/**\n\t * The worker ID that will be used by default in the generate method\n\t * @internal\n\t */\n\tprivate [WorkerIdSymbol] = 0n;\n\n\t/**\n\t * @param epoch the epoch to use\n\t */\n\tpublic constructor(epoch: number | bigint | Date) {\n\t\tthis[EpochSymbol] = BigInt(epoch instanceof Date ? epoch.getTime() : epoch);\n\t}\n\n\t/**\n\t * The epoch for this snowflake\n\t */\n\tpublic get epoch(): bigint {\n\t\treturn this[EpochSymbol];\n\t}\n\n\t/**\n\t * Gets the configured process ID\n\t */\n\tpublic get processId(): bigint {\n\t\treturn this[ProcessIdSymbol];\n\t}\n\n\t/**\n\t * Sets the process ID that will be used by default for the {@link generate} method\n\t * @param value The new value, will be coerced to BigInt and masked with `0b11111n`\n\t */\n\tpublic set processId(value: number | bigint) {\n\t\tthis[ProcessIdSymbol] = BigInt(value) & MaximumProcessId;\n\t}\n\n\t/**\n\t * Gets the configured worker ID\n\t */\n\tpublic get workerId(): bigint {\n\t\treturn this[WorkerIdSymbol];\n\t}\n\n\t/**\n\t * Sets the worker ID that will be used by default for the {@link generate} method\n\t * @param value The new value, will be coerced to BigInt and masked with `0b11111n`\n\t */\n\tpublic set workerId(value: number | bigint) {\n\t\tthis[WorkerIdSymbol] = BigInt(value) & MaximumWorkerId;\n\t}\n\n\t/**\n\t * Generates a snowflake given an epoch and optionally a timestamp\n\t * @param options options to pass into the generator, see {@link SnowflakeGenerateOptions}\n\t *\n\t * **note** when `increment` is not provided it defaults to the private `increment` of the instance\n\t * @example\n\t * ```typescript\n\t * const epoch = new Date('2000-01-01T00:00:00.000Z');\n\t * const snowflake = new Snowflake(epoch).generate();\n\t * ```\n\t * @returns A unique snowflake\n\t */\n\tpublic generate({\n\t\tincrement,\n\t\ttimestamp = Date.now(),\n\t\tworkerId = this[WorkerIdSymbol],\n\t\tprocessId = this[ProcessIdSymbol]\n\t}: SnowflakeGenerateOptions = {}) {\n\t\tif (timestamp instanceof Date) timestamp = BigInt(timestamp.getTime());\n\t\telse if (typeof timestamp === 'number') timestamp = BigInt(timestamp);\n\t\telse if (typeof timestamp !== 'bigint') {\n\t\t\tthrow new TypeError(`\"timestamp\" argument must be a number, bigint, or Date (received ${typeof timestamp})`);\n\t\t}\n\n\t\tif (typeof increment !== 'bigint') {\n\t\t\tincrement = this[IncrementSymbol];\n\t\t\tthis[IncrementSymbol] = (increment + 1n) & MaximumIncrement;\n\t\t}\n\n\t\t// timestamp, workerId, processId, increment\n\t\treturn (\n\t\t\t((timestamp - this[EpochSymbol]) << 22n) |\n\t\t\t((workerId & MaximumWorkerId) << 17n) |\n\t\t\t((processId & MaximumProcessId) << 12n) |\n\t\t\t(increment & MaximumIncrement)\n\t\t);\n\t}\n\n\t/**\n\t * Deconstructs a snowflake given a snowflake ID\n\t * @param id the snowflake to deconstruct\n\t * @returns a deconstructed snowflake\n\t * @example\n\t * ```typescript\n\t * const epoch = new Date('2000-01-01T00:00:00.000Z');\n\t * const snowflake = new Snowflake(epoch).deconstruct('3971046231244935168');\n\t * ```\n\t */\n\tpublic deconstruct(id: string | bigint): DeconstructedSnowflake {\n\t\tconst bigIntId = BigInt(id);\n\t\tconst epoch = this[EpochSymbol];\n\t\treturn {\n\t\t\tid: bigIntId,\n\t\t\ttimestamp: (bigIntId >> 22n) + epoch,\n\t\t\tworkerId: (bigIntId >> 17n) & MaximumWorkerId,\n\t\t\tprocessId: (bigIntId >> 12n) & MaximumProcessId,\n\t\t\tincrement: bigIntId & MaximumIncrement,\n\t\t\tepoch\n\t\t};\n\t}\n\n\t/**\n\t * Retrieves the timestamp field's value from a snowflake.\n\t * @param id The snowflake to get the timestamp value from.\n\t * @returns The UNIX timestamp that is stored in `id`.\n\t */\n\tpublic timestampFrom(id: string | bigint): number {\n\t\treturn Number((BigInt(id) >> 22n) + this[EpochSymbol]);\n\t}\n\n\t/**\n\t * Returns a number indicating whether a reference snowflake comes before, or after, or is same as the given\n\t * snowflake in sort order.\n\t * @param a The first snowflake to compare.\n\t * @param b The second snowflake to compare.\n\t * @returns `-1` if `a` is older than `b`, `0` if `a` and `b` are equals, `1` if `a` is newer than `b`.\n\t * @example Sort snowflakes in ascending order\n\t * ```typescript\n\t * const ids = ['737141877803057244', '1056191128120082432', '254360814063058944'];\n\t * console.log(ids.sort((a, b) => Snowflake.compare(a, b)));\n\t * // → ['254360814063058944', '737141877803057244', '1056191128120082432'];\n\t * ```\n\t * @example Sort snowflakes in descending order\n\t * ```typescript\n\t * const ids = ['737141877803057244', '1056191128120082432', '254360814063058944'];\n\t * console.log(ids.sort((a, b) => -Snowflake.compare(a, b)));\n\t * // → ['1056191128120082432', '737141877803057244', '254360814063058944'];\n\t * ```\n\t */\n\tpublic static compare(a: string | bigint, b: string | bigint): -1 | 0 | 1 {\n\t\tconst typeA = typeof a;\n\t\treturn typeA === typeof b\n\t\t\t? typeA === 'string'\n\t\t\t\t? cmpString(a as string, b as string)\n\t\t\t\t: cmpBigInt(a as bigint, b as bigint)\n\t\t\t: cmpBigInt(BigInt(a), BigInt(b));\n\t}\n}\n\n/** @internal */\nfunction cmpBigInt(a: bigint, b: bigint) {\n\treturn a === b ? 0 : a < b ? -1 : 1;\n}\n\n/** @internal */\nfunction cmpString(a: string, b: string) {\n\treturn a === b ? 0 : a.length < b.length ? -1 : a.length > b.length ? 1 : a < b ? -1 : 1;\n}\n\n/**\n * Options for Snowflake#generate\n */\nexport interface SnowflakeGenerateOptions {\n\t/**\n\t * Timestamp or date of the snowflake to generate\n\t * @default Date.now()\n\t */\n\ttimestamp?: number | bigint | Date;\n\n\t/**\n\t * The increment to use\n\t * @default 0n\n\t * @remark keep in mind that this bigint is auto-incremented between generate calls\n\t */\n\tincrement?: bigint;\n\n\t/**\n\t * The worker ID to use, will be truncated to 5 bits (0-31)\n\t * @default 0n\n\t */\n\tworkerId?: bigint;\n\n\t/**\n\t * The process ID to use, will be truncated to 5 bits (0-31)\n\t * @default 1n\n\t */\n\tprocessId?: bigint;\n}\n\n/**\n * Object returned by Snowflake#deconstruct\n */\nexport interface DeconstructedSnowflake {\n\t/**\n\t * The id in BigInt form\n\t */\n\tid: bigint;\n\n\t/**\n\t * The timestamp stored in the snowflake\n\t */\n\ttimestamp: bigint;\n\n\t/**\n\t * The worker id stored in the snowflake\n\t */\n\tworkerId: bigint;\n\n\t/**\n\t * The process id stored in the snowflake\n\t */\n\tprocessId: bigint;\n\n\t/**\n\t * The increment stored in the snowflake\n\t */\n\tincrement: bigint;\n\n\t/**\n\t * The epoch to use in the snowflake\n\t */\n\tepoch: bigint;\n}\n","import { Snowflake } from './Snowflake';\n\n/**\n * A class for parsing snowflake ids using Discord's snowflake epoch\n *\n * Which is 2015-01-01 at 00:00:00.000 UTC+0, {@linkplain https://discord.com/developers/docs/reference#snowflakes}\n */\nexport const DiscordSnowflake = new Snowflake(1420070400000n);\n","import { Snowflake } from './Snowflake';\n\n/**\n * A class for parsing snowflake ids using Twitter's snowflake epoch\n *\n * Which is 2010-11-04 at 01:42:54.657 UTC+0, found in the archived snowflake repository {@linkplain https://github.com/twitter-archive/snowflake/blob/b3f6a3c6ca8e1b6847baa6ff42bf72201e2c2231/src/main/scala/com/twitter/service/snowflake/IdWorker.scala#L25}\n */\nexport const TwitterSnowflake = new Snowflake(1288834974657n);\n"]} \ No newline at end of file
diff --git a/node_modules/@sapphire/snowflake/dist/index.mjs b/node_modules/@sapphire/snowflake/dist/index.mjs
new file mode 100644
index 0000000..7cfbfd7
--- /dev/null
+++ b/node_modules/@sapphire/snowflake/dist/index.mjs
@@ -0,0 +1,186 @@
+var __defProp = Object.defineProperty;
+var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+var __publicField = (obj, key, value) => {
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
+ return value;
+};
+
+// src/lib/Snowflake.ts
+var IncrementSymbol = Symbol("@sapphire/snowflake.increment");
+var EpochSymbol = Symbol("@sapphire/snowflake.epoch");
+var ProcessIdSymbol = Symbol("@sapphire/snowflake.processId");
+var WorkerIdSymbol = Symbol("@sapphire/snowflake.workerId");
+var MaximumWorkerId = 0b11111n;
+var MaximumProcessId = 0b11111n;
+var MaximumIncrement = 0b111111111111n;
+var _a, _b, _c, _d;
+var Snowflake = class {
+ /**
+ * @param epoch the epoch to use
+ */
+ constructor(epoch) {
+ /**
+ * Alias for {@link deconstruct}
+ */
+ // eslint-disable-next-line @typescript-eslint/unbound-method
+ __publicField(this, "decode", this.deconstruct);
+ /**
+ * Internal reference of the epoch passed in the constructor
+ * @internal
+ */
+ __publicField(this, _a);
+ /**
+ * Internal incrementor for generating snowflakes
+ * @internal
+ */
+ __publicField(this, _b, 0n);
+ /**
+ * The process ID that will be used by default in the generate method
+ * @internal
+ */
+ __publicField(this, _c, 1n);
+ /**
+ * The worker ID that will be used by default in the generate method
+ * @internal
+ */
+ __publicField(this, _d, 0n);
+ this[EpochSymbol] = BigInt(epoch instanceof Date ? epoch.getTime() : epoch);
+ }
+ /**
+ * The epoch for this snowflake
+ */
+ get epoch() {
+ return this[EpochSymbol];
+ }
+ /**
+ * Gets the configured process ID
+ */
+ get processId() {
+ return this[ProcessIdSymbol];
+ }
+ /**
+ * Sets the process ID that will be used by default for the {@link generate} method
+ * @param value The new value, will be coerced to BigInt and masked with `0b11111n`
+ */
+ set processId(value) {
+ this[ProcessIdSymbol] = BigInt(value) & MaximumProcessId;
+ }
+ /**
+ * Gets the configured worker ID
+ */
+ get workerId() {
+ return this[WorkerIdSymbol];
+ }
+ /**
+ * Sets the worker ID that will be used by default for the {@link generate} method
+ * @param value The new value, will be coerced to BigInt and masked with `0b11111n`
+ */
+ set workerId(value) {
+ this[WorkerIdSymbol] = BigInt(value) & MaximumWorkerId;
+ }
+ /**
+ * Generates a snowflake given an epoch and optionally a timestamp
+ * @param options options to pass into the generator, see {@link SnowflakeGenerateOptions}
+ *
+ * **note** when `increment` is not provided it defaults to the private `increment` of the instance
+ * @example
+ * ```typescript
+ * const epoch = new Date('2000-01-01T00:00:00.000Z');
+ * const snowflake = new Snowflake(epoch).generate();
+ * ```
+ * @returns A unique snowflake
+ */
+ generate({
+ increment,
+ timestamp = Date.now(),
+ workerId = this[WorkerIdSymbol],
+ processId = this[ProcessIdSymbol]
+ } = {}) {
+ if (timestamp instanceof Date)
+ timestamp = BigInt(timestamp.getTime());
+ else if (typeof timestamp === "number")
+ timestamp = BigInt(timestamp);
+ else if (typeof timestamp !== "bigint") {
+ throw new TypeError(`"timestamp" argument must be a number, bigint, or Date (received ${typeof timestamp})`);
+ }
+ if (typeof increment !== "bigint") {
+ increment = this[IncrementSymbol];
+ this[IncrementSymbol] = increment + 1n & MaximumIncrement;
+ }
+ return timestamp - this[EpochSymbol] << 22n | (workerId & MaximumWorkerId) << 17n | (processId & MaximumProcessId) << 12n | increment & MaximumIncrement;
+ }
+ /**
+ * Deconstructs a snowflake given a snowflake ID
+ * @param id the snowflake to deconstruct
+ * @returns a deconstructed snowflake
+ * @example
+ * ```typescript
+ * const epoch = new Date('2000-01-01T00:00:00.000Z');
+ * const snowflake = new Snowflake(epoch).deconstruct('3971046231244935168');
+ * ```
+ */
+ deconstruct(id) {
+ const bigIntId = BigInt(id);
+ const epoch = this[EpochSymbol];
+ return {
+ id: bigIntId,
+ timestamp: (bigIntId >> 22n) + epoch,
+ workerId: bigIntId >> 17n & MaximumWorkerId,
+ processId: bigIntId >> 12n & MaximumProcessId,
+ increment: bigIntId & MaximumIncrement,
+ epoch
+ };
+ }
+ /**
+ * Retrieves the timestamp field's value from a snowflake.
+ * @param id The snowflake to get the timestamp value from.
+ * @returns The UNIX timestamp that is stored in `id`.
+ */
+ timestampFrom(id) {
+ return Number((BigInt(id) >> 22n) + this[EpochSymbol]);
+ }
+ /**
+ * Returns a number indicating whether a reference snowflake comes before, or after, or is same as the given
+ * snowflake in sort order.
+ * @param a The first snowflake to compare.
+ * @param b The second snowflake to compare.
+ * @returns `-1` if `a` is older than `b`, `0` if `a` and `b` are equals, `1` if `a` is newer than `b`.
+ * @example Sort snowflakes in ascending order
+ * ```typescript
+ * const ids = ['737141877803057244', '1056191128120082432', '254360814063058944'];
+ * console.log(ids.sort((a, b) => Snowflake.compare(a, b)));
+ * // → ['254360814063058944', '737141877803057244', '1056191128120082432'];
+ * ```
+ * @example Sort snowflakes in descending order
+ * ```typescript
+ * const ids = ['737141877803057244', '1056191128120082432', '254360814063058944'];
+ * console.log(ids.sort((a, b) => -Snowflake.compare(a, b)));
+ * // → ['1056191128120082432', '737141877803057244', '254360814063058944'];
+ * ```
+ */
+ static compare(a, b) {
+ const typeA = typeof a;
+ return typeA === typeof b ? typeA === "string" ? cmpString(a, b) : cmpBigInt(a, b) : cmpBigInt(BigInt(a), BigInt(b));
+ }
+};
+__name(Snowflake, "Snowflake");
+_a = EpochSymbol, _b = IncrementSymbol, _c = ProcessIdSymbol, _d = WorkerIdSymbol;
+function cmpBigInt(a, b) {
+ return a === b ? 0 : a < b ? -1 : 1;
+}
+__name(cmpBigInt, "cmpBigInt");
+function cmpString(a, b) {
+ return a === b ? 0 : a.length < b.length ? -1 : a.length > b.length ? 1 : a < b ? -1 : 1;
+}
+__name(cmpString, "cmpString");
+
+// src/lib/DiscordSnowflake.ts
+var DiscordSnowflake = new Snowflake(1420070400000n);
+
+// src/lib/TwitterSnowflake.ts
+var TwitterSnowflake = new Snowflake(1288834974657n);
+
+export { DiscordSnowflake, MaximumIncrement, MaximumProcessId, MaximumWorkerId, Snowflake, TwitterSnowflake };
+//# sourceMappingURL=out.js.map
+//# sourceMappingURL=index.mjs.map \ No newline at end of file
diff --git a/node_modules/@sapphire/snowflake/dist/index.mjs.map b/node_modules/@sapphire/snowflake/dist/index.mjs.map
new file mode 100644
index 0000000..4204534
--- /dev/null
+++ b/node_modules/@sapphire/snowflake/dist/index.mjs.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/l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,CAAW,IAClC,UAAU,GAAa,CAAW,IACnC,UAAU,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC;AAAA,EAClC;AACD;AA5Ka;AAWM,kBAMT,sBAMA,sBAMA;AAkJV,SAAS,UAAU,GAAW,GAAW;AACxC,SAAO,MAAM,IAAI,IAAI,IAAI,IAAI,KAAK;AACnC;AAFS;AAKT,SAAS,UAAU,GAAW,GAAW;AACxC,SAAO,MAAM,IAAI,IAAI,EAAE,SAAS,EAAE,SAAS,KAAK,EAAE,SAAS,EAAE,SAAS,IAAI,IAAI,IAAI,KAAK;AACxF;AAFS;;;AC9MF,IAAM,mBAAmB,IAAI,UAAU,cAAc;;;ACArD,IAAM,mBAAmB,IAAI,UAAU,cAAc","sourcesContent":["const IncrementSymbol = Symbol('@sapphire/snowflake.increment');\nconst EpochSymbol = Symbol('@sapphire/snowflake.epoch');\nconst ProcessIdSymbol = Symbol('@sapphire/snowflake.processId');\nconst WorkerIdSymbol = Symbol('@sapphire/snowflake.workerId');\n\n/**\n * The maximum value the `workerId` field accepts in snowflakes.\n */\nexport const MaximumWorkerId = 0b11111n;\n\n/**\n * The maximum value the `processId` field accepts in snowflakes.\n */\nexport const MaximumProcessId = 0b11111n;\n\n/**\n * The maximum value the `increment` field accepts in snowflakes.\n */\nexport const MaximumIncrement = 0b111111111111n;\n\n/**\n * A class for generating and deconstructing Twitter snowflakes.\n *\n * A {@link https://developer.twitter.com/en/docs/twitter-ids Twitter snowflake}\n * is a 64-bit unsigned integer with 4 fields that have a fixed epoch value.\n *\n * If we have a snowflake `266241948824764416` we can represent it as binary:\n * ```\n * 64 22 17 12 0\n * 000000111011000111100001101001000101000000 00001 00000 000000000000\n * number of ms since epoch worker pid increment\n * ```\n */\nexport class Snowflake {\n\t/**\n\t * Alias for {@link deconstruct}\n\t */\n\t// eslint-disable-next-line @typescript-eslint/unbound-method\n\tpublic decode = this.deconstruct;\n\n\t/**\n\t * Internal reference of the epoch passed in the constructor\n\t * @internal\n\t */\n\tprivate readonly [EpochSymbol]: bigint;\n\n\t/**\n\t * Internal incrementor for generating snowflakes\n\t * @internal\n\t */\n\tprivate [IncrementSymbol] = 0n;\n\n\t/**\n\t * The process ID that will be used by default in the generate method\n\t * @internal\n\t */\n\tprivate [ProcessIdSymbol] = 1n;\n\n\t/**\n\t * The worker ID that will be used by default in the generate method\n\t * @internal\n\t */\n\tprivate [WorkerIdSymbol] = 0n;\n\n\t/**\n\t * @param epoch the epoch to use\n\t */\n\tpublic constructor(epoch: number | bigint | Date) {\n\t\tthis[EpochSymbol] = BigInt(epoch instanceof Date ? epoch.getTime() : epoch);\n\t}\n\n\t/**\n\t * The epoch for this snowflake\n\t */\n\tpublic get epoch(): bigint {\n\t\treturn this[EpochSymbol];\n\t}\n\n\t/**\n\t * Gets the configured process ID\n\t */\n\tpublic get processId(): bigint {\n\t\treturn this[ProcessIdSymbol];\n\t}\n\n\t/**\n\t * Sets the process ID that will be used by default for the {@link generate} method\n\t * @param value The new value, will be coerced to BigInt and masked with `0b11111n`\n\t */\n\tpublic set processId(value: number | bigint) {\n\t\tthis[ProcessIdSymbol] = BigInt(value) & MaximumProcessId;\n\t}\n\n\t/**\n\t * Gets the configured worker ID\n\t */\n\tpublic get workerId(): bigint {\n\t\treturn this[WorkerIdSymbol];\n\t}\n\n\t/**\n\t * Sets the worker ID that will be used by default for the {@link generate} method\n\t * @param value The new value, will be coerced to BigInt and masked with `0b11111n`\n\t */\n\tpublic set workerId(value: number | bigint) {\n\t\tthis[WorkerIdSymbol] = BigInt(value) & MaximumWorkerId;\n\t}\n\n\t/**\n\t * Generates a snowflake given an epoch and optionally a timestamp\n\t * @param options options to pass into the generator, see {@link SnowflakeGenerateOptions}\n\t *\n\t * **note** when `increment` is not provided it defaults to the private `increment` of the instance\n\t * @example\n\t * ```typescript\n\t * const epoch = new Date('2000-01-01T00:00:00.000Z');\n\t * const snowflake = new Snowflake(epoch).generate();\n\t * ```\n\t * @returns A unique snowflake\n\t */\n\tpublic generate({\n\t\tincrement,\n\t\ttimestamp = Date.now(),\n\t\tworkerId = this[WorkerIdSymbol],\n\t\tprocessId = this[ProcessIdSymbol]\n\t}: SnowflakeGenerateOptions = {}) {\n\t\tif (timestamp instanceof Date) timestamp = BigInt(timestamp.getTime());\n\t\telse if (typeof timestamp === 'number') timestamp = BigInt(timestamp);\n\t\telse if (typeof timestamp !== 'bigint') {\n\t\t\tthrow new TypeError(`\"timestamp\" argument must be a number, bigint, or Date (received ${typeof timestamp})`);\n\t\t}\n\n\t\tif (typeof increment !== 'bigint') {\n\t\t\tincrement = this[IncrementSymbol];\n\t\t\tthis[IncrementSymbol] = (increment + 1n) & MaximumIncrement;\n\t\t}\n\n\t\t// timestamp, workerId, processId, increment\n\t\treturn (\n\t\t\t((timestamp - this[EpochSymbol]) << 22n) |\n\t\t\t((workerId & MaximumWorkerId) << 17n) |\n\t\t\t((processId & MaximumProcessId) << 12n) |\n\t\t\t(increment & MaximumIncrement)\n\t\t);\n\t}\n\n\t/**\n\t * Deconstructs a snowflake given a snowflake ID\n\t * @param id the snowflake to deconstruct\n\t * @returns a deconstructed snowflake\n\t * @example\n\t * ```typescript\n\t * const epoch = new Date('2000-01-01T00:00:00.000Z');\n\t * const snowflake = new Snowflake(epoch).deconstruct('3971046231244935168');\n\t * ```\n\t */\n\tpublic deconstruct(id: string | bigint): DeconstructedSnowflake {\n\t\tconst bigIntId = BigInt(id);\n\t\tconst epoch = this[EpochSymbol];\n\t\treturn {\n\t\t\tid: bigIntId,\n\t\t\ttimestamp: (bigIntId >> 22n) + epoch,\n\t\t\tworkerId: (bigIntId >> 17n) & MaximumWorkerId,\n\t\t\tprocessId: (bigIntId >> 12n) & MaximumProcessId,\n\t\t\tincrement: bigIntId & MaximumIncrement,\n\t\t\tepoch\n\t\t};\n\t}\n\n\t/**\n\t * Retrieves the timestamp field's value from a snowflake.\n\t * @param id The snowflake to get the timestamp value from.\n\t * @returns The UNIX timestamp that is stored in `id`.\n\t */\n\tpublic timestampFrom(id: string | bigint): number {\n\t\treturn Number((BigInt(id) >> 22n) + this[EpochSymbol]);\n\t}\n\n\t/**\n\t * Returns a number indicating whether a reference snowflake comes before, or after, or is same as the given\n\t * snowflake in sort order.\n\t * @param a The first snowflake to compare.\n\t * @param b The second snowflake to compare.\n\t * @returns `-1` if `a` is older than `b`, `0` if `a` and `b` are equals, `1` if `a` is newer than `b`.\n\t * @example Sort snowflakes in ascending order\n\t * ```typescript\n\t * const ids = ['737141877803057244', '1056191128120082432', '254360814063058944'];\n\t * console.log(ids.sort((a, b) => Snowflake.compare(a, b)));\n\t * // → ['254360814063058944', '737141877803057244', '1056191128120082432'];\n\t * ```\n\t * @example Sort snowflakes in descending order\n\t * ```typescript\n\t * const ids = ['737141877803057244', '1056191128120082432', '254360814063058944'];\n\t * console.log(ids.sort((a, b) => -Snowflake.compare(a, b)));\n\t * // → ['1056191128120082432', '737141877803057244', '254360814063058944'];\n\t * ```\n\t */\n\tpublic static compare(a: string | bigint, b: string | bigint): -1 | 0 | 1 {\n\t\tconst typeA = typeof a;\n\t\treturn typeA === typeof b\n\t\t\t? typeA === 'string'\n\t\t\t\t? cmpString(a as string, b as string)\n\t\t\t\t: cmpBigInt(a as bigint, b as bigint)\n\t\t\t: cmpBigInt(BigInt(a), BigInt(b));\n\t}\n}\n\n/** @internal */\nfunction cmpBigInt(a: bigint, b: bigint) {\n\treturn a === b ? 0 : a < b ? -1 : 1;\n}\n\n/** @internal */\nfunction cmpString(a: string, b: string) {\n\treturn a === b ? 0 : a.length < b.length ? -1 : a.length > b.length ? 1 : a < b ? -1 : 1;\n}\n\n/**\n * Options for Snowflake#generate\n */\nexport interface SnowflakeGenerateOptions {\n\t/**\n\t * Timestamp or date of the snowflake to generate\n\t * @default Date.now()\n\t */\n\ttimestamp?: number | bigint | Date;\n\n\t/**\n\t * The increment to use\n\t * @default 0n\n\t * @remark keep in mind that this bigint is auto-incremented between generate calls\n\t */\n\tincrement?: bigint;\n\n\t/**\n\t * The worker ID to use, will be truncated to 5 bits (0-31)\n\t * @default 0n\n\t */\n\tworkerId?: bigint;\n\n\t/**\n\t * The process ID to use, will be truncated to 5 bits (0-31)\n\t * @default 1n\n\t */\n\tprocessId?: bigint;\n}\n\n/**\n * Object returned by Snowflake#deconstruct\n */\nexport interface DeconstructedSnowflake {\n\t/**\n\t * The id in BigInt form\n\t */\n\tid: bigint;\n\n\t/**\n\t * The timestamp stored in the snowflake\n\t */\n\ttimestamp: bigint;\n\n\t/**\n\t * The worker id stored in the snowflake\n\t */\n\tworkerId: bigint;\n\n\t/**\n\t * The process id stored in the snowflake\n\t */\n\tprocessId: bigint;\n\n\t/**\n\t * The increment stored in the snowflake\n\t */\n\tincrement: bigint;\n\n\t/**\n\t * The epoch to use in the snowflake\n\t */\n\tepoch: bigint;\n}\n","import { Snowflake } from './Snowflake';\n\n/**\n * A class for parsing snowflake ids using Discord's snowflake epoch\n *\n * Which is 2015-01-01 at 00:00:00.000 UTC+0, {@linkplain https://discord.com/developers/docs/reference#snowflakes}\n */\nexport const DiscordSnowflake = new Snowflake(1420070400000n);\n","import { Snowflake } from './Snowflake';\n\n/**\n * A class for parsing snowflake ids using Twitter's snowflake epoch\n *\n * Which is 2010-11-04 at 01:42:54.657 UTC+0, found in the archived snowflake repository {@linkplain https://github.com/twitter-archive/snowflake/blob/b3f6a3c6ca8e1b6847baa6ff42bf72201e2c2231/src/main/scala/com/twitter/service/snowflake/IdWorker.scala#L25}\n */\nexport const TwitterSnowflake = new Snowflake(1288834974657n);\n"]} \ No newline at end of file
diff --git a/node_modules/@sapphire/snowflake/package.json b/node_modules/@sapphire/snowflake/package.json
new file mode 100644
index 0000000..da16195
--- /dev/null
+++ b/node_modules/@sapphire/snowflake/package.json
@@ -0,0 +1,67 @@
+{
+ "name": "@sapphire/snowflake",
+ "version": "3.5.1",
+ "description": "Deconstructs and generates snowflake IDs using BigInts",
+ "author": "@sapphire",
+ "license": "MIT",
+ "main": "dist/index.js",
+ "module": "dist/index.mjs",
+ "browser": "dist/index.global.js",
+ "unpkg": "dist/index.global.js",
+ "types": "dist/index.d.ts",
+ "exports": {
+ "import": "./dist/index.mjs",
+ "require": "./dist/index.js",
+ "types": "./dist/index.d.ts"
+ },
+ "sideEffects": false,
+ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/snowflake",
+ "scripts": {
+ "test": "vitest run",
+ "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc",
+ "build": "tsup",
+ "docs": "typedoc-json-parser",
+ "prepack": "yarn build",
+ "bump": "cliff-jumper",
+ "check-update": "cliff-jumper --dry-run"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sapphiredev/utilities.git",
+ "directory": "packages/snowflake"
+ },
+ "files": [
+ "dist/**/*.js*",
+ "dist/**/*.mjs*",
+ "dist/**/*.d*"
+ ],
+ "engines": {
+ "node": ">=v14.0.0",
+ "npm": ">=7.0.0"
+ },
+ "keywords": [
+ "@sapphire/snowflake",
+ "bot",
+ "typescript",
+ "ts",
+ "yarn",
+ "discord",
+ "sapphire",
+ "standalone"
+ ],
+ "bugs": {
+ "url": "https://github.com/sapphiredev/utilities/issues"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "devDependencies": {
+ "@favware/cliff-jumper": "^2.0.0",
+ "@vitest/coverage-c8": "^0.31.0",
+ "tsup": "^6.7.0",
+ "typedoc": "^0.24.7",
+ "typedoc-json-parser": "^7.4.0",
+ "typescript": "^5.0.4",
+ "vitest": "^0.31.0"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE
new file mode 100755
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/node/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md
new file mode 100755
index 0000000..ba4fca6
--- /dev/null
+++ b/node_modules/@types/node/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/node`
+
+# Summary
+This package contains type definitions for Node.js (https://nodejs.org/).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
+
+### Additional Details
+ * Last updated: Fri, 01 Sep 2023 20:33:24 GMT
+ * Dependencies: none
+ * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
+
+# Credits
+These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky).
diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts
new file mode 100755
index 0000000..e309252
--- /dev/null
+++ b/node_modules/@types/node/assert.d.ts
@@ -0,0 +1,972 @@
+/**
+ * The `node:assert` module provides a set of assertion functions for verifying
+ * invariants.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/assert.js)
+ */
+declare module 'assert' {
+ /**
+ * An alias of {@link ok}.
+ * @since v0.5.9
+ * @param value The input that is checked for being truthy.
+ */
+ function assert(value: unknown, message?: string | Error): asserts value;
+ namespace assert {
+ /**
+ * Indicates the failure of an assertion. All errors thrown by the `node:assert`module will be instances of the `AssertionError` class.
+ */
+ class AssertionError extends Error {
+ /**
+ * Set to the `actual` argument for methods such as {@link assert.strictEqual()}.
+ */
+ actual: unknown;
+ /**
+ * Set to the `expected` argument for methods such as {@link assert.strictEqual()}.
+ */
+ expected: unknown;
+ /**
+ * Set to the passed in operator value.
+ */
+ operator: string;
+ /**
+ * Indicates if the message was auto-generated (`true`) or not.
+ */
+ generatedMessage: boolean;
+ /**
+ * Value is always `ERR_ASSERTION` to show that the error is an assertion error.
+ */
+ code: 'ERR_ASSERTION';
+ constructor(options?: {
+ /** If provided, the error message is set to this value. */
+ message?: string | undefined;
+ /** The `actual` property on the error instance. */
+ actual?: unknown | undefined;
+ /** The `expected` property on the error instance. */
+ expected?: unknown | undefined;
+ /** The `operator` property on the error instance. */
+ operator?: string | undefined;
+ /** If provided, the generated stack trace omits frames before this function. */
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function | undefined;
+ });
+ }
+ /**
+ * This feature is deprecated and will be removed in a future version.
+ * Please consider using alternatives such as the `mock` helper function.
+ * @since v14.2.0, v12.19.0
+ * @deprecated Deprecated
+ */
+ class CallTracker {
+ /**
+ * The wrapper function is expected to be called exactly `exact` times. If the
+ * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an
+ * error.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func);
+ * ```
+ * @since v14.2.0, v12.19.0
+ * @param [fn='A no-op function']
+ * @param [exact=1]
+ * @return that wraps `fn`.
+ */
+ calls(exact?: number): () => void;
+ calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
+ /**
+ * Example:
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ * const callsfunc = tracker.calls(func);
+ * callsfunc(1, 2, 3);
+ *
+ * assert.deepStrictEqual(tracker.getCalls(callsfunc),
+ * [{ thisArg: undefined, arguments: [1, 2, 3] }]);
+ * ```
+ * @since v18.8.0, v16.18.0
+ * @param fn
+ * @return An Array with all the calls to a tracked function.
+ */
+ getCalls(fn: Function): CallTrackerCall[];
+ /**
+ * The arrays contains information about the expected and actual number of calls of
+ * the functions that have not been called the expected number of times.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func, 2);
+ *
+ * // Returns an array containing information on callsfunc()
+ * console.log(tracker.report());
+ * // [
+ * // {
+ * // message: 'Expected the func function to be executed 2 time(s) but was
+ * // executed 0 time(s).',
+ * // actual: 0,
+ * // expected: 2,
+ * // operator: 'func',
+ * // stack: stack trace
+ * // }
+ * // ]
+ * ```
+ * @since v14.2.0, v12.19.0
+ * @return An Array of objects containing information about the wrapper functions returned by `calls`.
+ */
+ report(): CallTrackerReportInformation[];
+ /**
+ * Reset calls of the call tracker.
+ * If a tracked function is passed as an argument, the calls will be reset for it.
+ * If no arguments are passed, all tracked functions will be reset.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ * const callsfunc = tracker.calls(func);
+ *
+ * callsfunc();
+ * // Tracker was called once
+ * assert.strictEqual(tracker.getCalls(callsfunc).length, 1);
+ *
+ * tracker.reset(callsfunc);
+ * assert.strictEqual(tracker.getCalls(callsfunc).length, 0);
+ * ```
+ * @since v18.8.0, v16.18.0
+ * @param fn a tracked function to reset.
+ */
+ reset(fn?: Function): void;
+ /**
+ * Iterates through the list of functions passed to `tracker.calls()` and will throw an error for functions that
+ * have not been called the expected number of times.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func, 2);
+ *
+ * callsfunc();
+ *
+ * // Will throw an error since callsfunc() was only called once.
+ * tracker.verify();
+ * ```
+ * @since v14.2.0, v12.19.0
+ */
+ verify(): void;
+ }
+ interface CallTrackerCall {
+ thisArg: object;
+ arguments: unknown[];
+ }
+ interface CallTrackerReportInformation {
+ message: string;
+ /** The actual number of times the function was called. */
+ actual: number;
+ /** The number of times the function was expected to be called. */
+ expected: number;
+ /** The name of the function that is wrapped. */
+ operator: string;
+ /** A stack trace of the function. */
+ stack: object;
+ }
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: unknown) => boolean) | object | Error;
+ /**
+ * Throws an `AssertionError` with the provided error message or a default
+ * error message. If the `message` parameter is an instance of an `Error` then
+ * it will be thrown instead of the `AssertionError`.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.fail();
+ * // AssertionError [ERR_ASSERTION]: Failed
+ *
+ * assert.fail('boom');
+ * // AssertionError [ERR_ASSERTION]: boom
+ *
+ * assert.fail(new TypeError('need array'));
+ * // TypeError: need array
+ * ```
+ *
+ * Using `assert.fail()` with more than two arguments is possible but deprecated.
+ * See below for further details.
+ * @since v0.1.21
+ * @param [message='Failed']
+ */
+ function fail(message?: string | Error): never;
+ /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
+ function fail(
+ actual: unknown,
+ expected: unknown,
+ message?: string | Error,
+ operator?: string,
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function
+ ): never;
+ /**
+ * Tests if `value` is truthy. It is equivalent to`assert.equal(!!value, true, message)`.
+ *
+ * If `value` is not truthy, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is `undefined`, a default
+ * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``.
+ *
+ * Be aware that in the `repl` the error message will be different to the one
+ * thrown in a file! See below for further details.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.ok(true);
+ * // OK
+ * assert.ok(1);
+ * // OK
+ *
+ * assert.ok();
+ * // AssertionError: No value argument passed to `assert.ok()`
+ *
+ * assert.ok(false, 'it\'s false');
+ * // AssertionError: it's false
+ *
+ * // In the repl:
+ * assert.ok(typeof 123 === 'string');
+ * // AssertionError: false == true
+ *
+ * // In a file (e.g. test.js):
+ * assert.ok(typeof 123 === 'string');
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(typeof 123 === 'string')
+ *
+ * assert.ok(false);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(false)
+ *
+ * assert.ok(0);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(0)
+ * ```
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * // Using `assert()` works the same:
+ * assert(0);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert(0)
+ * ```
+ * @since v0.1.21
+ */
+ function ok(value: unknown, message?: string | Error): asserts value;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link strictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link strictEqual} instead.
+ *
+ * Tests shallow, coercive equality between the `actual` and `expected` parameters
+ * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled
+ * and treated as being identical if both sides are `NaN`.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * assert.equal(1, 1);
+ * // OK, 1 == 1
+ * assert.equal(1, '1');
+ * // OK, 1 == '1'
+ * assert.equal(NaN, NaN);
+ * // OK
+ *
+ * assert.equal(1, 2);
+ * // AssertionError: 1 == 2
+ * assert.equal({ a: { b: 1 } }, { a: { b: 1 } });
+ * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
+ * ```
+ *
+ * If the values are not equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default
+ * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * @since v0.1.21
+ */
+ function equal(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link notStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
+ *
+ * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is
+ * specially handled and treated as being identical if both sides are `NaN`.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * assert.notEqual(1, 2);
+ * // OK
+ *
+ * assert.notEqual(1, 1);
+ * // AssertionError: 1 != 1
+ *
+ * assert.notEqual(1, '1');
+ * // AssertionError: 1 != '1'
+ * ```
+ *
+ * If the values are equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default error
+ * message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * @since v0.1.21
+ */
+ function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link deepStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead.
+ *
+ * Tests for deep equality between the `actual` and `expected` parameters. Consider
+ * using {@link deepStrictEqual} instead. {@link deepEqual} can have
+ * surprising results.
+ *
+ * _Deep equality_ means that the enumerable "own" properties of child objects
+ * are also recursively evaluated by the following rules.
+ * @since v0.1.21
+ */
+ function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link notDeepStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead.
+ *
+ * Tests for any deep inequality. Opposite of {@link deepEqual}.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const obj1 = {
+ * a: {
+ * b: 1,
+ * },
+ * };
+ * const obj2 = {
+ * a: {
+ * b: 2,
+ * },
+ * };
+ * const obj3 = {
+ * a: {
+ * b: 1,
+ * },
+ * };
+ * const obj4 = { __proto__: obj1 };
+ *
+ * assert.notDeepEqual(obj1, obj1);
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+ *
+ * assert.notDeepEqual(obj1, obj2);
+ * // OK
+ *
+ * assert.notDeepEqual(obj1, obj3);
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+ *
+ * assert.notDeepEqual(obj1, obj4);
+ * // OK
+ * ```
+ *
+ * If the values are deeply equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a default
+ * error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Tests strict equality between the `actual` and `expected` parameters as
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.strictEqual(1, 2);
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+ * //
+ * // 1 !== 2
+ *
+ * assert.strictEqual(1, 1);
+ * // OK
+ *
+ * assert.strictEqual('Hello foobar', 'Hello World!');
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+ * // + actual - expected
+ * //
+ * // + 'Hello foobar'
+ * // - 'Hello World!'
+ * // ^
+ *
+ * const apples = 1;
+ * const oranges = 2;
+ * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
+ * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
+ *
+ * assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
+ * // TypeError: Inputs are not identical
+ * ```
+ *
+ * If the values are not strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
+ * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function strictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+ /**
+ * Tests strict inequality between the `actual` and `expected` parameters as
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.notStrictEqual(1, 2);
+ * // OK
+ *
+ * assert.notStrictEqual(1, 1);
+ * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to:
+ * //
+ * // 1
+ *
+ * assert.notStrictEqual(1, '1');
+ * // OK
+ * ```
+ *
+ * If the values are strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
+ * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Tests for deep equality between the `actual` and `expected` parameters.
+ * "Deep" equality means that the enumerable "own" properties of child objects
+ * are recursively evaluated also by the following rules.
+ * @since v1.2.0
+ */
+ function deepStrictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+ /**
+ * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
+ * // OK
+ * ```
+ *
+ * If the values are deeply and strictly equal, an `AssertionError` is thrown
+ * with a `message` property set equal to the value of the `message` parameter. If
+ * the `message` parameter is undefined, a default error message is assigned. If
+ * the `message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v1.2.0
+ */
+ function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Expects the function `fn` to throw an error.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+ * a validation object where each property will be tested for strict deep equality,
+ * or an instance of error where each property will be tested for strict deep
+ * equality including the non-enumerable `message` and `name` properties. When
+ * using an object, it is also possible to use a regular expression, when
+ * validating against a string property. See below for examples.
+ *
+ * If specified, `message` will be appended to the message provided by the`AssertionError` if the `fn` call fails to throw or in case the error validation
+ * fails.
+ *
+ * Custom validation object/error instance:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * const err = new TypeError('Wrong value');
+ * err.code = 404;
+ * err.foo = 'bar';
+ * err.info = {
+ * nested: true,
+ * baz: 'text',
+ * };
+ * err.reg = /abc/i;
+ *
+ * assert.throws(
+ * () => {
+ * throw err;
+ * },
+ * {
+ * name: 'TypeError',
+ * message: 'Wrong value',
+ * info: {
+ * nested: true,
+ * baz: 'text',
+ * },
+ * // Only properties on the validation object will be tested for.
+ * // Using nested objects requires all properties to be present. Otherwise
+ * // the validation is going to fail.
+ * },
+ * );
+ *
+ * // Using regular expressions to validate error properties:
+ * assert.throws(
+ * () => {
+ * throw err;
+ * },
+ * {
+ * // The `name` and `message` properties are strings and using regular
+ * // expressions on those will match against the string. If they fail, an
+ * // error is thrown.
+ * name: /^TypeError$/,
+ * message: /Wrong/,
+ * foo: 'bar',
+ * info: {
+ * nested: true,
+ * // It is not possible to use regular expressions for nested properties!
+ * baz: 'text',
+ * },
+ * // The `reg` property contains a regular expression and only if the
+ * // validation object contains an identical regular expression, it is going
+ * // to pass.
+ * reg: /abc/i,
+ * },
+ * );
+ *
+ * // Fails due to the different `message` and `name` properties:
+ * assert.throws(
+ * () => {
+ * const otherErr = new Error('Not found');
+ * // Copy all enumerable properties from `err` to `otherErr`.
+ * for (const [key, value] of Object.entries(err)) {
+ * otherErr[key] = value;
+ * }
+ * throw otherErr;
+ * },
+ * // The error's `message` and `name` properties will also be checked when using
+ * // an error as validation object.
+ * err,
+ * );
+ * ```
+ *
+ * Validate instanceof using constructor:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * Error,
+ * );
+ * ```
+ *
+ * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions):
+ *
+ * Using a regular expression runs `.toString` on the error object, and will
+ * therefore also include the error name.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * /^Error: Wrong value$/,
+ * );
+ * ```
+ *
+ * Custom error validation:
+ *
+ * The function must return `true` to indicate all internal validations passed.
+ * It will otherwise fail with an `AssertionError`.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * (err) => {
+ * assert(err instanceof Error);
+ * assert(/value/.test(err));
+ * // Avoid returning anything from validation functions besides `true`.
+ * // Otherwise, it's not clear what part of the validation failed. Instead,
+ * // throw an error about the specific validation that failed (as done in this
+ * // example) and add as much helpful debugging information to that error as
+ * // possible.
+ * return true;
+ * },
+ * 'unexpected error',
+ * );
+ * ```
+ *
+ * `error` cannot be a string. If a string is provided as the second
+ * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Using the same
+ * message as the thrown error message is going to result in an`ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
+ * a string as the second argument gets considered:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * function throwingFirst() {
+ * throw new Error('First');
+ * }
+ *
+ * function throwingSecond() {
+ * throw new Error('Second');
+ * }
+ *
+ * function notThrowing() {}
+ *
+ * // The second argument is a string and the input function threw an Error.
+ * // The first case will not throw as it does not match for the error message
+ * // thrown by the input function!
+ * assert.throws(throwingFirst, 'Second');
+ * // In the next example the message has no benefit over the message from the
+ * // error and since it is not clear if the user intended to actually match
+ * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error.
+ * assert.throws(throwingSecond, 'Second');
+ * // TypeError [ERR_AMBIGUOUS_ARGUMENT]
+ *
+ * // The string is only used (as message) in case the function does not throw:
+ * assert.throws(notThrowing, 'Second');
+ * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second
+ *
+ * // If it was intended to match for the error message do this instead:
+ * // It does not throw because the error messages match.
+ * assert.throws(throwingSecond, /Second$/);
+ *
+ * // If the error message does not match, an AssertionError is thrown.
+ * assert.throws(throwingFirst, /Second$/);
+ * // AssertionError [ERR_ASSERTION]
+ * ```
+ *
+ * Due to the confusing error-prone notation, avoid a string as the second
+ * argument.
+ * @since v0.1.21
+ */
+ function throws(block: () => unknown, message?: string | Error): void;
+ function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+ /**
+ * Asserts that the function `fn` does not throw an error.
+ *
+ * Using `assert.doesNotThrow()` is actually not useful because there
+ * is no benefit in catching an error and then rethrowing it. Instead, consider
+ * adding a comment next to the specific code path that should not throw and keep
+ * error messages as expressive as possible.
+ *
+ * When `assert.doesNotThrow()` is called, it will immediately call the `fn`function.
+ *
+ * If an error is thrown and it is the same type as that specified by the `error`parameter, then an `AssertionError` is thrown. If the error is of a
+ * different type, or if the `error` parameter is undefined, the error is
+ * propagated back to the caller.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
+ * function. See {@link throws} for more details.
+ *
+ * The following, for instance, will throw the `TypeError` because there is no
+ * matching error type in the assertion:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * SyntaxError,
+ * );
+ * ```
+ *
+ * However, the following will result in an `AssertionError` with the message
+ * 'Got unwanted exception...':
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * TypeError,
+ * );
+ * ```
+ *
+ * If an `AssertionError` is thrown and a value is provided for the `message`parameter, the value of `message` will be appended to the `AssertionError` message:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * /Wrong value/,
+ * 'Whoops',
+ * );
+ * // Throws: AssertionError: Got unwanted exception: Whoops
+ * ```
+ * @since v0.1.21
+ */
+ function doesNotThrow(block: () => unknown, message?: string | Error): void;
+ function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+ /**
+ * Throws `value` if `value` is not `undefined` or `null`. This is useful when
+ * testing the `error` argument in callbacks. The stack trace contains all frames
+ * from the error passed to `ifError()` including the potential new frames for`ifError()` itself.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.ifError(null);
+ * // OK
+ * assert.ifError(0);
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0
+ * assert.ifError('error');
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error'
+ * assert.ifError(new Error());
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error
+ *
+ * // Create some random error frames.
+ * let err;
+ * (function errorFrame() {
+ * err = new Error('test error');
+ * })();
+ *
+ * (function ifErrorFrame() {
+ * assert.ifError(err);
+ * })();
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error
+ * // at ifErrorFrame
+ * // at errorFrame
+ * ```
+ * @since v0.1.97
+ */
+ function ifError(value: unknown): asserts value is null | undefined;
+ /**
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+ * calls the function and awaits the returned promise to complete. It will then
+ * check that the promise is rejected.
+ *
+ * If `asyncFn` is a function and it throws an error synchronously,`assert.rejects()` will return a rejected `Promise` with that error. If the
+ * function does not return a promise, `assert.rejects()` will return a rejected`Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases the error
+ * handler is skipped.
+ *
+ * Besides the async nature to await the completion behaves identically to {@link throws}.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+ * an object where each property will be tested for, or an instance of error where
+ * each property will be tested for including the non-enumerable `message` and`name` properties.
+ *
+ * If specified, `message` will be the message provided by the `AssertionError` if the `asyncFn` fails to reject.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * await assert.rejects(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * {
+ * name: 'TypeError',
+ * message: 'Wrong value',
+ * },
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * await assert.rejects(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * (err) => {
+ * assert.strictEqual(err.name, 'TypeError');
+ * assert.strictEqual(err.message, 'Wrong value');
+ * return true;
+ * },
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.rejects(
+ * Promise.reject(new Error('Wrong value')),
+ * Error,
+ * ).then(() => {
+ * // ...
+ * });
+ * ```
+ *
+ * `error` cannot be a string. If a string is provided as the second
+ * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Please read the
+ * example in {@link throws} carefully if using a string as the second
+ * argument gets considered.
+ * @since v10.0.0
+ */
+ function rejects(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
+ function rejects(block: (() => Promise<unknown>) | Promise<unknown>, error: AssertPredicate, message?: string | Error): Promise<void>;
+ /**
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+ * calls the function and awaits the returned promise to complete. It will then
+ * check that the promise is not rejected.
+ *
+ * If `asyncFn` is a function and it throws an error synchronously,`assert.doesNotReject()` will return a rejected `Promise` with that error. If
+ * the function does not return a promise, `assert.doesNotReject()` will return a
+ * rejected `Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases
+ * the error handler is skipped.
+ *
+ * Using `assert.doesNotReject()` is actually not useful because there is little
+ * benefit in catching a rejection and then rejecting it again. Instead, consider
+ * adding a comment next to the specific code path that should not reject and keep
+ * error messages as expressive as possible.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
+ * function. See {@link throws} for more details.
+ *
+ * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * await assert.doesNotReject(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * SyntaxError,
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
+ * .then(() => {
+ * // ...
+ * });
+ * ```
+ * @since v10.0.0
+ */
+ function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
+ function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, error: AssertPredicate, message?: string | Error): Promise<void>;
+ /**
+ * Expects the `string` input to match the regular expression.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.match('I will fail', /pass/);
+ * // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
+ *
+ * assert.match(123, /pass/);
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+ *
+ * assert.match('I will pass', /pass/);
+ * // OK
+ * ```
+ *
+ * If the values do not match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
+ * to the value of the `message` parameter. If the `message` parameter is
+ * undefined, a default error message is assigned. If the `message` parameter is an
+ * instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * @since v13.6.0, v12.16.0
+ */
+ function match(value: string, regExp: RegExp, message?: string | Error): void;
+ /**
+ * Expects the `string` input not to match the regular expression.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotMatch('I will fail', /fail/);
+ * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ...
+ *
+ * assert.doesNotMatch(123, /pass/);
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+ *
+ * assert.doesNotMatch('I will pass', /different/);
+ * // OK
+ * ```
+ *
+ * If the values do match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
+ * to the value of the `message` parameter. If the `message` parameter is
+ * undefined, a default error message is assigned. If the `message` parameter is an
+ * instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * @since v13.6.0, v12.16.0
+ */
+ function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
+ const strict: Omit<typeof assert, 'equal' | 'notEqual' | 'deepEqual' | 'notDeepEqual' | 'ok' | 'strictEqual' | 'deepStrictEqual' | 'ifError' | 'strict'> & {
+ (value: unknown, message?: string | Error): asserts value;
+ equal: typeof strictEqual;
+ notEqual: typeof notStrictEqual;
+ deepEqual: typeof deepStrictEqual;
+ notDeepEqual: typeof notDeepStrictEqual;
+ // Mapped types and assertion functions are incompatible?
+ // TS2775: Assertions require every name in the call target
+ // to be declared with an explicit type annotation.
+ ok: typeof ok;
+ strictEqual: typeof strictEqual;
+ deepStrictEqual: typeof deepStrictEqual;
+ ifError: typeof ifError;
+ strict: typeof strict;
+ };
+ }
+ export = assert;
+}
+declare module 'node:assert' {
+ import assert = require('assert');
+ export = assert;
+}
diff --git a/node_modules/@types/node/assert/strict.d.ts b/node_modules/@types/node/assert/strict.d.ts
new file mode 100755
index 0000000..b4319b9
--- /dev/null
+++ b/node_modules/@types/node/assert/strict.d.ts
@@ -0,0 +1,8 @@
+declare module 'assert/strict' {
+ import { strict } from 'node:assert';
+ export = strict;
+}
+declare module 'node:assert/strict' {
+ import { strict } from 'node:assert';
+ export = strict;
+}
diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts
new file mode 100755
index 0000000..e994f02
--- /dev/null
+++ b/node_modules/@types/node/async_hooks.d.ts
@@ -0,0 +1,530 @@
+/**
+ * We strongly discourage the use of the `async_hooks` API.
+ * Other APIs that can cover most of its use cases include:
+ *
+ * * `AsyncLocalStorage` tracks async context
+ * * `process.getActiveResourcesInfo()` tracks active resources
+ *
+ * The `node:async_hooks` module provides an API to track asynchronous resources.
+ * It can be accessed using:
+ *
+ * ```js
+ * import async_hooks from 'node:async_hooks';
+ * ```
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/async_hooks.js)
+ */
+declare module 'async_hooks' {
+ /**
+ * ```js
+ * import { executionAsyncId } from 'node:async_hooks';
+ * import fs from 'node:fs';
+ *
+ * console.log(executionAsyncId()); // 1 - bootstrap
+ * fs.open(path, 'r', (err, fd) => {
+ * console.log(executionAsyncId()); // 6 - open()
+ * });
+ * ```
+ *
+ * The ID returned from `executionAsyncId()` is related to execution timing, not
+ * causality (which is covered by `triggerAsyncId()`):
+ *
+ * ```js
+ * const server = net.createServer((conn) => {
+ * // Returns the ID of the server, not of the new connection, because the
+ * // callback runs in the execution scope of the server's MakeCallback().
+ * async_hooks.executionAsyncId();
+ *
+ * }).listen(port, () => {
+ * // Returns the ID of a TickObject (process.nextTick()) because all
+ * // callbacks passed to .listen() are wrapped in a nextTick().
+ * async_hooks.executionAsyncId();
+ * });
+ * ```
+ *
+ * Promise contexts may not get precise `executionAsyncIds` by default.
+ * See the section on `promise execution tracking`.
+ * @since v8.1.0
+ * @return The `asyncId` of the current execution context. Useful to track when something calls.
+ */
+ function executionAsyncId(): number;
+ /**
+ * Resource objects returned by `executionAsyncResource()` are most often internal
+ * Node.js handle objects with undocumented APIs. Using any functions or properties
+ * on the object is likely to crash your application and should be avoided.
+ *
+ * Using `executionAsyncResource()` in the top-level execution context will
+ * return an empty object as there is no handle or request object to use,
+ * but having an object representing the top-level can be helpful.
+ *
+ * ```js
+ * import { open } from 'node:fs';
+ * import { executionAsyncId, executionAsyncResource } from 'node:async_hooks';
+ *
+ * console.log(executionAsyncId(), executionAsyncResource()); // 1 {}
+ * open(new URL(import.meta.url), 'r', (err, fd) => {
+ * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap
+ * });
+ * ```
+ *
+ * This can be used to implement continuation local storage without the
+ * use of a tracking `Map` to store the metadata:
+ *
+ * ```js
+ * import { createServer } from 'node:http';
+ * import {
+ * executionAsyncId,
+ * executionAsyncResource,
+ * createHook,
+ * } from 'async_hooks';
+ * const sym = Symbol('state'); // Private symbol to avoid pollution
+ *
+ * createHook({
+ * init(asyncId, type, triggerAsyncId, resource) {
+ * const cr = executionAsyncResource();
+ * if (cr) {
+ * resource[sym] = cr[sym];
+ * }
+ * },
+ * }).enable();
+ *
+ * const server = createServer((req, res) => {
+ * executionAsyncResource()[sym] = { state: req.url };
+ * setTimeout(function() {
+ * res.end(JSON.stringify(executionAsyncResource()[sym]));
+ * }, 100);
+ * }).listen(3000);
+ * ```
+ * @since v13.9.0, v12.17.0
+ * @return The resource representing the current execution. Useful to store data within the resource.
+ */
+ function executionAsyncResource(): object;
+ /**
+ * ```js
+ * const server = net.createServer((conn) => {
+ * // The resource that caused (or triggered) this callback to be called
+ * // was that of the new connection. Thus the return value of triggerAsyncId()
+ * // is the asyncId of "conn".
+ * async_hooks.triggerAsyncId();
+ *
+ * }).listen(port, () => {
+ * // Even though all callbacks passed to .listen() are wrapped in a nextTick()
+ * // the callback itself exists because the call to the server's .listen()
+ * // was made. So the return value would be the ID of the server.
+ * async_hooks.triggerAsyncId();
+ * });
+ * ```
+ *
+ * Promise contexts may not get valid `triggerAsyncId`s by default. See
+ * the section on `promise execution tracking`.
+ * @return The ID of the resource responsible for calling the callback that is currently being executed.
+ */
+ function triggerAsyncId(): number;
+ interface HookCallbacks {
+ /**
+ * Called when a class is constructed that has the possibility to emit an asynchronous event.
+ * @param asyncId a unique ID for the async resource
+ * @param type the type of the async resource
+ * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
+ * @param resource reference to the resource representing the async operation, needs to be released during destroy
+ */
+ init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
+ /**
+ * When an asynchronous operation is initiated or completes a callback is called to notify the user.
+ * The before callback is called just before said callback is executed.
+ * @param asyncId the unique identifier assigned to the resource about to execute the callback.
+ */
+ before?(asyncId: number): void;
+ /**
+ * Called immediately after the callback specified in before is completed.
+ * @param asyncId the unique identifier assigned to the resource which has executed the callback.
+ */
+ after?(asyncId: number): void;
+ /**
+ * Called when a promise has resolve() called. This may not be in the same execution id
+ * as the promise itself.
+ * @param asyncId the unique id for the promise that was resolve()d.
+ */
+ promiseResolve?(asyncId: number): void;
+ /**
+ * Called after the resource corresponding to asyncId is destroyed
+ * @param asyncId a unique ID for the async resource
+ */
+ destroy?(asyncId: number): void;
+ }
+ interface AsyncHook {
+ /**
+ * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
+ */
+ enable(): this;
+ /**
+ * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
+ */
+ disable(): this;
+ }
+ /**
+ * Registers functions to be called for different lifetime events of each async
+ * operation.
+ *
+ * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the
+ * respective asynchronous event during a resource's lifetime.
+ *
+ * All callbacks are optional. For example, if only resource cleanup needs to
+ * be tracked, then only the `destroy` callback needs to be passed. The
+ * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section.
+ *
+ * ```js
+ * import { createHook } from 'node:async_hooks';
+ *
+ * const asyncHook = createHook({
+ * init(asyncId, type, triggerAsyncId, resource) { },
+ * destroy(asyncId) { },
+ * });
+ * ```
+ *
+ * The callbacks will be inherited via the prototype chain:
+ *
+ * ```js
+ * class MyAsyncCallbacks {
+ * init(asyncId, type, triggerAsyncId, resource) { }
+ * destroy(asyncId) {}
+ * }
+ *
+ * class MyAddedCallbacks extends MyAsyncCallbacks {
+ * before(asyncId) { }
+ * after(asyncId) { }
+ * }
+ *
+ * const asyncHook = async_hooks.createHook(new MyAddedCallbacks());
+ * ```
+ *
+ * Because promises are asynchronous resources whose lifecycle is tracked
+ * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises.
+ * @since v8.1.0
+ * @param callbacks The `Hook Callbacks` to register
+ * @return Instance used for disabling and enabling hooks
+ */
+ function createHook(callbacks: HookCallbacks): AsyncHook;
+ interface AsyncResourceOptions {
+ /**
+ * The ID of the execution context that created this async event.
+ * @default executionAsyncId()
+ */
+ triggerAsyncId?: number | undefined;
+ /**
+ * Disables automatic `emitDestroy` when the object is garbage collected.
+ * This usually does not need to be set (even if `emitDestroy` is called
+ * manually), unless the resource's `asyncId` is retrieved and the
+ * sensitive API's `emitDestroy` is called with it.
+ * @default false
+ */
+ requireManualDestroy?: boolean | undefined;
+ }
+ /**
+ * The class `AsyncResource` is designed to be extended by the embedder's async
+ * resources. Using this, users can easily trigger the lifetime events of their
+ * own resources.
+ *
+ * The `init` hook will trigger when an `AsyncResource` is instantiated.
+ *
+ * The following is an overview of the `AsyncResource` API.
+ *
+ * ```js
+ * import { AsyncResource, executionAsyncId } from 'node:async_hooks';
+ *
+ * // AsyncResource() is meant to be extended. Instantiating a
+ * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * // async_hook.executionAsyncId() is used.
+ * const asyncResource = new AsyncResource(
+ * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false },
+ * );
+ *
+ * // Run a function in the execution context of the resource. This will
+ * // * establish the context of the resource
+ * // * trigger the AsyncHooks before callbacks
+ * // * call the provided function `fn` with the supplied arguments
+ * // * trigger the AsyncHooks after callbacks
+ * // * restore the original execution context
+ * asyncResource.runInAsyncScope(fn, thisArg, ...args);
+ *
+ * // Call AsyncHooks destroy callbacks.
+ * asyncResource.emitDestroy();
+ *
+ * // Return the unique ID assigned to the AsyncResource instance.
+ * asyncResource.asyncId();
+ *
+ * // Return the trigger ID for the AsyncResource instance.
+ * asyncResource.triggerAsyncId();
+ * ```
+ */
+ class AsyncResource {
+ /**
+ * AsyncResource() is meant to be extended. Instantiating a
+ * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * async_hook.executionAsyncId() is used.
+ * @param type The type of async event.
+ * @param triggerAsyncId The ID of the execution context that created
+ * this async event (default: `executionAsyncId()`), or an
+ * AsyncResourceOptions object (since v9.3.0)
+ */
+ constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);
+ /**
+ * Binds the given function to the current execution context.
+ * @since v14.8.0, v12.19.0
+ * @param fn The function to bind to the current execution context.
+ * @param type An optional name to associate with the underlying `AsyncResource`.
+ */
+ static bind<Func extends (this: ThisArg, ...args: any[]) => any, ThisArg>(fn: Func, type?: string, thisArg?: ThisArg): Func;
+ /**
+ * Binds the given function to execute to this `AsyncResource`'s scope.
+ * @since v14.8.0, v12.19.0
+ * @param fn The function to bind to the current `AsyncResource`.
+ */
+ bind<Func extends (...args: any[]) => any>(fn: Func): Func;
+ /**
+ * Call the provided function with the provided arguments in the execution context
+ * of the async resource. This will establish the context, trigger the AsyncHooks
+ * before callbacks, call the function, trigger the AsyncHooks after callbacks, and
+ * then restore the original execution context.
+ * @since v9.6.0
+ * @param fn The function to call in the execution context of this async resource.
+ * @param thisArg The receiver to be used for the function call.
+ * @param args Optional arguments to pass to the function.
+ */
+ runInAsyncScope<This, Result>(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
+ /**
+ * Call all `destroy` hooks. This should only ever be called once. An error will
+ * be thrown if it is called more than once. This **must** be manually called. If
+ * the resource is left to be collected by the GC then the `destroy` hooks will
+ * never be called.
+ * @return A reference to `asyncResource`.
+ */
+ emitDestroy(): this;
+ /**
+ * @return The unique `asyncId` assigned to the resource.
+ */
+ asyncId(): number;
+ /**
+ *
+ * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor.
+ */
+ triggerAsyncId(): number;
+ }
+ /**
+ * This class creates stores that stay coherent through asynchronous operations.
+ *
+ * While you can create your own implementation on top of the `node:async_hooks`module, `AsyncLocalStorage` should be preferred as it is a performant and memory
+ * safe implementation that involves significant optimizations that are non-obvious
+ * to implement.
+ *
+ * The following example uses `AsyncLocalStorage` to build a simple logger
+ * that assigns IDs to incoming HTTP requests and includes them in messages
+ * logged within each request.
+ *
+ * ```js
+ * import http from 'node:http';
+ * import { AsyncLocalStorage } from 'node:async_hooks';
+ *
+ * const asyncLocalStorage = new AsyncLocalStorage();
+ *
+ * function logWithId(msg) {
+ * const id = asyncLocalStorage.getStore();
+ * console.log(`${id !== undefined ? id : '-'}:`, msg);
+ * }
+ *
+ * let idSeq = 0;
+ * http.createServer((req, res) => {
+ * asyncLocalStorage.run(idSeq++, () => {
+ * logWithId('start');
+ * // Imagine any chain of async operations here
+ * setImmediate(() => {
+ * logWithId('finish');
+ * res.end();
+ * });
+ * });
+ * }).listen(8080);
+ *
+ * http.get('http://localhost:8080');
+ * http.get('http://localhost:8080');
+ * // Prints:
+ * // 0: start
+ * // 1: start
+ * // 0: finish
+ * // 1: finish
+ * ```
+ *
+ * Each instance of `AsyncLocalStorage` maintains an independent storage context.
+ * Multiple instances can safely exist simultaneously without risk of interfering
+ * with each other's data.
+ * @since v13.10.0, v12.17.0
+ */
+ class AsyncLocalStorage<T> {
+ /**
+ * Binds the given function to the current execution context.
+ * @since v19.8.0
+ * @experimental
+ * @param fn The function to bind to the current execution context.
+ * @return A new function that calls `fn` within the captured execution context.
+ */
+ static bind<Func extends (...args: any[]) => any>(fn: Func): Func;
+ /**
+ * Captures the current execution context and returns a function that accepts a
+ * function as an argument. Whenever the returned function is called, it
+ * calls the function passed to it within the captured context.
+ *
+ * ```js
+ * const asyncLocalStorage = new AsyncLocalStorage();
+ * const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot());
+ * const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore()));
+ * console.log(result); // returns 123
+ * ```
+ *
+ * AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple
+ * async context tracking purposes, for example:
+ *
+ * ```js
+ * class Foo {
+ * #runInAsyncScope = AsyncLocalStorage.snapshot();
+ *
+ * get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); }
+ * }
+ *
+ * const foo = asyncLocalStorage.run(123, () => new Foo());
+ * console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123
+ * ```
+ * @since v19.8.0
+ * @experimental
+ * @return A new function with the signature `(fn: (...args) : R, ...args) : R`.
+ */
+ static snapshot(): <R, TArgs extends any[]>(fn: (...args: TArgs) => R, ...args: TArgs) => R;
+ /**
+ * Disables the instance of `AsyncLocalStorage`. All subsequent calls
+ * to `asyncLocalStorage.getStore()` will return `undefined` until`asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
+ *
+ * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
+ * instance will be exited.
+ *
+ * Calling `asyncLocalStorage.disable()` is required before the`asyncLocalStorage` can be garbage collected. This does not apply to stores
+ * provided by the `asyncLocalStorage`, as those objects are garbage collected
+ * along with the corresponding async resources.
+ *
+ * Use this method when the `asyncLocalStorage` is not in use anymore
+ * in the current process.
+ * @since v13.10.0, v12.17.0
+ * @experimental
+ */
+ disable(): void;
+ /**
+ * Returns the current store.
+ * If called outside of an asynchronous context initialized by
+ * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it
+ * returns `undefined`.
+ * @since v13.10.0, v12.17.0
+ */
+ getStore(): T | undefined;
+ /**
+ * Runs a function synchronously within a context and returns its
+ * return value. The store is not accessible outside of the callback function.
+ * The store is accessible to any asynchronous operations created within the
+ * callback.
+ *
+ * The optional `args` are passed to the callback function.
+ *
+ * If the callback function throws an error, the error is thrown by `run()` too.
+ * The stacktrace is not impacted by this call and the context is exited.
+ *
+ * Example:
+ *
+ * ```js
+ * const store = { id: 2 };
+ * try {
+ * asyncLocalStorage.run(store, () => {
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * setTimeout(() => {
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * }, 200);
+ * throw new Error();
+ * });
+ * } catch (e) {
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * // The error will be caught here
+ * }
+ * ```
+ * @since v13.10.0, v12.17.0
+ */
+ run<R, TArgs extends any[]>(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;
+ /**
+ * Runs a function synchronously outside of a context and returns its
+ * return value. The store is not accessible within the callback function or
+ * the asynchronous operations created within the callback. Any `getStore()`call done within the callback function will always return `undefined`.
+ *
+ * The optional `args` are passed to the callback function.
+ *
+ * If the callback function throws an error, the error is thrown by `exit()` too.
+ * The stacktrace is not impacted by this call and the context is re-entered.
+ *
+ * Example:
+ *
+ * ```js
+ * // Within a call to run
+ * try {
+ * asyncLocalStorage.getStore(); // Returns the store object or value
+ * asyncLocalStorage.exit(() => {
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * throw new Error();
+ * });
+ * } catch (e) {
+ * asyncLocalStorage.getStore(); // Returns the same object or value
+ * // The error will be caught here
+ * }
+ * ```
+ * @since v13.10.0, v12.17.0
+ * @experimental
+ */
+ exit<R, TArgs extends any[]>(callback: (...args: TArgs) => R, ...args: TArgs): R;
+ /**
+ * Transitions into the context for the remainder of the current
+ * synchronous execution and then persists the store through any following
+ * asynchronous calls.
+ *
+ * Example:
+ *
+ * ```js
+ * const store = { id: 1 };
+ * // Replaces previous store with the given store object
+ * asyncLocalStorage.enterWith(store);
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * someAsyncOperation(() => {
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * });
+ * ```
+ *
+ * This transition will continue for the _entire_ synchronous execution.
+ * This means that if, for example, the context is entered within an event
+ * handler subsequent event handlers will also run within that context unless
+ * specifically bound to another context with an `AsyncResource`. That is why`run()` should be preferred over `enterWith()` unless there are strong reasons
+ * to use the latter method.
+ *
+ * ```js
+ * const store = { id: 1 };
+ *
+ * emitter.on('my-event', () => {
+ * asyncLocalStorage.enterWith(store);
+ * });
+ * emitter.on('my-event', () => {
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * });
+ *
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * emitter.emit('my-event');
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * ```
+ * @since v13.11.0, v12.17.0
+ * @experimental
+ */
+ enterWith(store: T): void;
+ }
+}
+declare module 'node:async_hooks' {
+ export * from 'async_hooks';
+}
diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts
new file mode 100755
index 0000000..179a825
--- /dev/null
+++ b/node_modules/@types/node/buffer.d.ts
@@ -0,0 +1,2354 @@
+/**
+ * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many
+ * Node.js APIs support `Buffer`s.
+ *
+ * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and
+ * extends it with methods that cover additional use cases. Node.js APIs accept
+ * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well.
+ *
+ * While the `Buffer` class is available within the global scope, it is still
+ * recommended to explicitly reference it via an import or require statement.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Creates a zero-filled Buffer of length 10.
+ * const buf1 = Buffer.alloc(10);
+ *
+ * // Creates a Buffer of length 10,
+ * // filled with bytes which all have the value `1`.
+ * const buf2 = Buffer.alloc(10, 1);
+ *
+ * // Creates an uninitialized buffer of length 10.
+ * // This is faster than calling Buffer.alloc() but the returned
+ * // Buffer instance might contain old data that needs to be
+ * // overwritten using fill(), write(), or other functions that fill the Buffer's
+ * // contents.
+ * const buf3 = Buffer.allocUnsafe(10);
+ *
+ * // Creates a Buffer containing the bytes [1, 2, 3].
+ * const buf4 = Buffer.from([1, 2, 3]);
+ *
+ * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries
+ * // are all truncated using `(value &#x26; 255)` to fit into the range 0–255.
+ * const buf5 = Buffer.from([257, 257.5, -255, '1']);
+ *
+ * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést':
+ * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation)
+ * // [116, 195, 169, 115, 116] (in decimal notation)
+ * const buf6 = Buffer.from('tést');
+ *
+ * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
+ * const buf7 = Buffer.from('tést', 'latin1');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/buffer.js)
+ */
+declare module 'buffer' {
+ import { BinaryLike } from 'node:crypto';
+ import { ReadableStream as WebReadableStream } from 'node:stream/web';
+ /**
+ * This function returns `true` if `input` contains only valid UTF-8-encoded data,
+ * including the case in which `input` is empty.
+ *
+ * Throws if the `input` is a detached array buffer.
+ * @since v19.4.0, v18.14.0
+ * @param input The input to validate.
+ */
+ export function isUtf8(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean;
+ /**
+ * This function returns `true` if `input` contains only valid ASCII-encoded data,
+ * including the case in which `input` is empty.
+ *
+ * Throws if the `input` is a detached array buffer.
+ * @since v19.6.0, v18.15.0
+ * @param input The input to validate.
+ */
+ export function isAscii(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean;
+ export const INSPECT_MAX_BYTES: number;
+ export const kMaxLength: number;
+ export const kStringMaxLength: number;
+ export const constants: {
+ MAX_LENGTH: number;
+ MAX_STRING_LENGTH: number;
+ };
+ export type TranscodeEncoding = 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'latin1' | 'binary';
+ /**
+ * Re-encodes the given `Buffer` or `Uint8Array` instance from one character
+ * encoding to another. Returns a new `Buffer` instance.
+ *
+ * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if
+ * conversion from `fromEnc` to `toEnc` is not permitted.
+ *
+ * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`,`'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`.
+ *
+ * The transcoding process will use substitution characters if a given byte
+ * sequence cannot be adequately represented in the target encoding. For instance:
+ *
+ * ```js
+ * import { Buffer, transcode } from 'node:buffer';
+ *
+ * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii');
+ * console.log(newBuf.toString('ascii'));
+ * // Prints: '?'
+ * ```
+ *
+ * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced
+ * with `?` in the transcoded `Buffer`.
+ * @since v7.1.0
+ * @param source A `Buffer` or `Uint8Array` instance.
+ * @param fromEnc The current encoding.
+ * @param toEnc To target encoding.
+ */
+ export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
+ export const SlowBuffer: {
+ /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
+ new (size: number): Buffer;
+ prototype: Buffer;
+ };
+ /**
+ * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using
+ * a prior call to `URL.createObjectURL()`.
+ * @since v16.7.0
+ * @experimental
+ * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
+ */
+ export function resolveObjectURL(id: string): Blob | undefined;
+ export { Buffer };
+ /**
+ * @experimental
+ */
+ export interface BlobOptions {
+ /**
+ * @default 'utf8'
+ */
+ encoding?: BufferEncoding | undefined;
+ /**
+ * The Blob content-type. The intent is for `type` to convey
+ * the MIME media type of the data, however no validation of the type format
+ * is performed.
+ */
+ type?: string | undefined;
+ }
+ /**
+ * A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across
+ * multiple worker threads.
+ * @since v15.7.0, v14.18.0
+ */
+ export class Blob {
+ /**
+ * The total size of the `Blob` in bytes.
+ * @since v15.7.0, v14.18.0
+ */
+ readonly size: number;
+ /**
+ * The content-type of the `Blob`.
+ * @since v15.7.0, v14.18.0
+ */
+ readonly type: string;
+ /**
+ * Creates a new `Blob` object containing a concatenation of the given sources.
+ *
+ * {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into
+ * the 'Blob' and can therefore be safely modified after the 'Blob' is created.
+ *
+ * String sources are also copied into the `Blob`.
+ */
+ constructor(sources: Array<BinaryLike | Blob>, options?: BlobOptions);
+ /**
+ * Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
+ * the `Blob` data.
+ * @since v15.7.0, v14.18.0
+ */
+ arrayBuffer(): Promise<ArrayBuffer>;
+ /**
+ * Creates and returns a new `Blob` containing a subset of this `Blob` objects
+ * data. The original `Blob` is not altered.
+ * @since v15.7.0, v14.18.0
+ * @param start The starting index.
+ * @param end The ending index.
+ * @param type The content-type for the new `Blob`
+ */
+ slice(start?: number, end?: number, type?: string): Blob;
+ /**
+ * Returns a promise that fulfills with the contents of the `Blob` decoded as a
+ * UTF-8 string.
+ * @since v15.7.0, v14.18.0
+ */
+ text(): Promise<string>;
+ /**
+ * Returns a new `ReadableStream` that allows the content of the `Blob` to be read.
+ * @since v16.7.0
+ */
+ stream(): WebReadableStream;
+ }
+ export interface FileOptions {
+ /**
+ * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts will be
+ * converted to the platform native line-ending as specified by `require('node:os').EOL`.
+ */
+ endings?: 'native' | 'transparent';
+ /** The File content-type. */
+ type?: string;
+ /** The last modified date of the file. `Default`: Date.now(). */
+ lastModified?: number;
+ }
+ /**
+ * A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files.
+ * @since v19.2.0, v18.13.0
+ */
+ export class File extends Blob {
+ constructor(sources: Array<BinaryLike | Blob>, fileName: string, options?: FileOptions);
+ /**
+ * The name of the `File`.
+ * @since v19.2.0, v18.13.0
+ */
+ readonly name: string;
+ /**
+ * The last modified date of the `File`.
+ * @since v19.2.0, v18.13.0
+ */
+ readonly lastModified: number;
+ }
+ export import atob = globalThis.atob;
+ export import btoa = globalThis.btoa;
+ import { Blob as NodeBlob } from 'buffer';
+ // This conditional type will be the existing global Blob in a browser, or
+ // the copy below in a Node environment.
+ type __Blob = typeof globalThis extends { onmessage: any; Blob: infer T } ? T : NodeBlob;
+ global {
+ namespace NodeJS {
+ export { BufferEncoding };
+ }
+ // Buffer class
+ type BufferEncoding =
+ | 'ascii'
+ | 'utf8'
+ | 'utf-8'
+ | 'utf16le'
+ | 'ucs2'
+ | 'ucs-2'
+ | 'base64'
+ | 'base64url'
+ | 'latin1'
+ | 'binary'
+ | 'hex';
+ type WithImplicitCoercion<T> =
+ | T
+ | {
+ valueOf(): T;
+ };
+ /**
+ * Raw data is stored in instances of the Buffer class.
+ * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
+ * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
+ */
+ interface BufferConstructor {
+ /**
+ * Allocates a new buffer containing the given {str}.
+ *
+ * @param str String to store in buffer.
+ * @param encoding encoding to use, optional. Default is 'utf8'
+ * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
+ */
+ new (str: string, encoding?: BufferEncoding): Buffer;
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
+ */
+ new (size: number): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ new (array: Uint8Array): Buffer;
+ /**
+ * Produces a Buffer backed by the same allocated memory as
+ * the given {ArrayBuffer}/{SharedArrayBuffer}.
+ *
+ *
+ * @param arrayBuffer The ArrayBuffer with which to share memory.
+ * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
+ */
+ new (arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ new (array: ReadonlyArray<any>): Buffer;
+ /**
+ * Copies the passed {buffer} data onto a new {Buffer} instance.
+ *
+ * @param buffer The buffer to copy.
+ * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
+ */
+ new (buffer: Buffer): Buffer;
+ /**
+ * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
+ * Array entries outside that range will be truncated to fit into it.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'.
+ * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
+ * ```
+ *
+ * If `array` is an `Array`\-like object (that is, one with a `length` property of
+ * type `number`), it is treated as if it is an array, unless it is a `Buffer` or
+ * a `Uint8Array`. This means all other `TypedArray` variants get treated as an`Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use `Buffer.copyBytesFrom()`.
+ *
+ * A `TypeError` will be thrown if `array` is not an `Array` or another type
+ * appropriate for `Buffer.from()` variants.
+ *
+ * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal`Buffer` pool like `Buffer.allocUnsafe()` does.
+ * @since v5.10.0
+ */
+ from(
+ arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>,
+ byteOffset?: number,
+ length?: number,
+ ): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param data data to create a new Buffer
+ */
+ from(data: Uint8Array | ReadonlyArray<number>): Buffer;
+ from(data: WithImplicitCoercion<Uint8Array | ReadonlyArray<number> | string>): Buffer;
+ /**
+ * Creates a new Buffer containing the given JavaScript string {str}.
+ * If provided, the {encoding} parameter identifies the character encoding.
+ * If not provided, {encoding} defaults to 'utf8'.
+ */
+ from(
+ str:
+ | WithImplicitCoercion<string>
+ | {
+ [Symbol.toPrimitive](hint: 'string'): string;
+ },
+ encoding?: BufferEncoding,
+ ): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param values to create a new Buffer
+ */
+ of(...items: number[]): Buffer;
+ /**
+ * Returns `true` if `obj` is a `Buffer`, `false` otherwise.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * Buffer.isBuffer(Buffer.alloc(10)); // true
+ * Buffer.isBuffer(Buffer.from('foo')); // true
+ * Buffer.isBuffer('a string'); // false
+ * Buffer.isBuffer([]); // false
+ * Buffer.isBuffer(new Uint8Array(1024)); // false
+ * ```
+ * @since v0.1.101
+ */
+ isBuffer(obj: any): obj is Buffer;
+ /**
+ * Returns `true` if `encoding` is the name of a supported character encoding,
+ * or `false` otherwise.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * console.log(Buffer.isEncoding('utf8'));
+ * // Prints: true
+ *
+ * console.log(Buffer.isEncoding('hex'));
+ * // Prints: true
+ *
+ * console.log(Buffer.isEncoding('utf/8'));
+ * // Prints: false
+ *
+ * console.log(Buffer.isEncoding(''));
+ * // Prints: false
+ * ```
+ * @since v0.9.1
+ * @param encoding A character encoding name to check.
+ */
+ isEncoding(encoding: string): encoding is BufferEncoding;
+ /**
+ * Returns the byte length of a string when encoded using `encoding`.
+ * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account
+ * for the encoding that is used to convert the string into bytes.
+ *
+ * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input.
+ * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the
+ * return value might be greater than the length of a `Buffer` created from the
+ * string.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const str = '\u00bd + \u00bc = \u00be';
+ *
+ * console.log(`${str}: ${str.length} characters, ` +
+ * `${Buffer.byteLength(str, 'utf8')} bytes`);
+ * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes
+ * ```
+ *
+ * When `string` is a
+ * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/-
+ * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop-
+ * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned.
+ * @since v0.1.90
+ * @param string A value to calculate the length of.
+ * @param [encoding='utf8'] If `string` is a string, this is its encoding.
+ * @return The number of bytes contained within `string`.
+ */
+ byteLength(
+ string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
+ encoding?: BufferEncoding,
+ ): number;
+ /**
+ * Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together.
+ *
+ * If the list has no items, or if the `totalLength` is 0, then a new zero-length`Buffer` is returned.
+ *
+ * If `totalLength` is not provided, it is calculated from the `Buffer` instances
+ * in `list` by adding their lengths.
+ *
+ * If `totalLength` is provided, it is coerced to an unsigned integer. If the
+ * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
+ * truncated to `totalLength`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Create a single `Buffer` from a list of three `Buffer` instances.
+ *
+ * const buf1 = Buffer.alloc(10);
+ * const buf2 = Buffer.alloc(14);
+ * const buf3 = Buffer.alloc(18);
+ * const totalLength = buf1.length + buf2.length + buf3.length;
+ *
+ * console.log(totalLength);
+ * // Prints: 42
+ *
+ * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength);
+ *
+ * console.log(bufA);
+ * // Prints: <Buffer 00 00 00 00 ...>
+ * console.log(bufA.length);
+ * // Prints: 42
+ * ```
+ *
+ * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does.
+ * @since v0.7.11
+ * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate.
+ * @param totalLength Total length of the `Buffer` instances in `list` when concatenated.
+ */
+ concat(list: ReadonlyArray<Uint8Array>, totalLength?: number): Buffer;
+ /**
+ * Copies the underlying memory of `view` into a new `Buffer`.
+ *
+ * ```js
+ * const u16 = new Uint16Array([0, 0xffff]);
+ * const buf = Buffer.copyBytesFrom(u16, 1, 1);
+ * u16[1] = 0;
+ * console.log(buf.length); // 2
+ * console.log(buf[0]); // 255
+ * console.log(buf[1]); // 255
+ * ```
+ * @since v19.8.0
+ * @param view The {TypedArray} to copy.
+ * @param [offset=': 0'] The starting offset within `view`.
+ * @param [length=view.length - offset] The number of elements from `view` to copy.
+ */
+ copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer;
+ /**
+ * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of`Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from('1234');
+ * const buf2 = Buffer.from('0123');
+ * const arr = [buf1, buf2];
+ *
+ * console.log(arr.sort(Buffer.compare));
+ * // Prints: [ <Buffer 30 31 32 33>, <Buffer 31 32 33 34> ]
+ * // (This result is equal to: [buf2, buf1].)
+ * ```
+ * @since v0.11.13
+ * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details.
+ */
+ compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.alloc(5);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 00 00 00 00 00>
+ * ```
+ *
+ * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
+ *
+ * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.alloc(5, 'a');
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 61 61 61 61 61>
+ * ```
+ *
+ * If both `fill` and `encoding` are specified, the allocated `Buffer` will be
+ * initialized by calling `buf.fill(fill, encoding)`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64>
+ * ```
+ *
+ * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance
+ * contents will never contain sensitive data from previous allocations, including
+ * data that might not have been allocated for `Buffer`s.
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ * @since v5.10.0
+ * @param size The desired length of the new `Buffer`.
+ * @param [fill=0] A value to pre-fill the new `Buffer` with.
+ * @param [encoding='utf8'] If `fill` is a string, this is its encoding.
+ */
+ alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
+ *
+ * The underlying memory for `Buffer` instances created in this way is _not_
+ * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(10);
+ *
+ * console.log(buf);
+ * // Prints (contents may vary): <Buffer a0 8b 28 3f 01 00 00 00 50 32>
+ *
+ * buf.fill(0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 00 00 00 00 00 00 00 00 00 00>
+ * ```
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ *
+ * The `Buffer` module pre-allocates an internal `Buffer` instance of
+ * size `Buffer.poolSize` that is used as a pool for the fast allocation of new`Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`,
+ * and `Buffer.concat()` only when `size` is less than or equal to`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two).
+ *
+ * Use of this pre-allocated internal memory pool is a key difference between
+ * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
+ * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less
+ * than or equal to half `Buffer.poolSize`. The
+ * difference is subtle but can be important when an application requires the
+ * additional performance that `Buffer.allocUnsafe()` provides.
+ * @since v5.10.0
+ * @param size The desired length of the new `Buffer`.
+ */
+ allocUnsafe(size: number): Buffer;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if
+ * `size` is 0.
+ *
+ * The underlying memory for `Buffer` instances created in this way is _not_
+ * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize
+ * such `Buffer` instances with zeroes.
+ *
+ * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
+ * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This
+ * allows applications to avoid the garbage collection overhead of creating many
+ * individually allocated `Buffer` instances. This approach improves both
+ * performance and memory usage by eliminating the need to track and clean up as
+ * many individual `ArrayBuffer` objects.
+ *
+ * However, in the case where a developer may need to retain a small chunk of
+ * memory from a pool for an indeterminate amount of time, it may be appropriate
+ * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and
+ * then copying out the relevant bits.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Need to keep around a few small chunks of memory.
+ * const store = [];
+ *
+ * socket.on('readable', () => {
+ * let data;
+ * while (null !== (data = readable.read())) {
+ * // Allocate for retained data.
+ * const sb = Buffer.allocUnsafeSlow(10);
+ *
+ * // Copy the data into the new allocation.
+ * data.copy(sb, 0, 0, 10);
+ *
+ * store.push(sb);
+ * }
+ * });
+ * ```
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ * @since v5.12.0
+ * @param size The desired length of the new `Buffer`.
+ */
+ allocUnsafeSlow(size: number): Buffer;
+ /**
+ * This is the size (in bytes) of pre-allocated internal `Buffer` instances used
+ * for pooling. This value may be modified.
+ * @since v0.11.3
+ */
+ poolSize: number;
+ }
+ interface Buffer extends Uint8Array {
+ /**
+ * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did
+ * not contain enough space to fit the entire string, only part of `string` will be
+ * written. However, partially encoded characters will not be written.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.alloc(256);
+ *
+ * const len = buf.write('\u00bd + \u00bc = \u00be', 0);
+ *
+ * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`);
+ * // Prints: 12 bytes: ½ + ¼ = ¾
+ *
+ * const buffer = Buffer.alloc(10);
+ *
+ * const length = buffer.write('abcd', 8);
+ *
+ * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`);
+ * // Prints: 2 bytes : ab
+ * ```
+ * @since v0.1.90
+ * @param string String to write to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write `string`.
+ * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`).
+ * @param [encoding='utf8'] The character encoding of `string`.
+ * @return Number of bytes written.
+ */
+ write(string: string, encoding?: BufferEncoding): number;
+ write(string: string, offset: number, encoding?: BufferEncoding): number;
+ write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
+ /**
+ * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`.
+ *
+ * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8,
+ * then each invalid byte is replaced with the replacement character `U+FFFD`.
+ *
+ * The maximum length of a string instance (in UTF-16 code units) is available
+ * as {@link constants.MAX_STRING_LENGTH}.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * console.log(buf1.toString('utf8'));
+ * // Prints: abcdefghijklmnopqrstuvwxyz
+ * console.log(buf1.toString('utf8', 0, 5));
+ * // Prints: abcde
+ *
+ * const buf2 = Buffer.from('tést');
+ *
+ * console.log(buf2.toString('hex'));
+ * // Prints: 74c3a97374
+ * console.log(buf2.toString('utf8', 0, 3));
+ * // Prints: té
+ * console.log(buf2.toString(undefined, 0, 3));
+ * // Prints: té
+ * ```
+ * @since v0.1.90
+ * @param [encoding='utf8'] The character encoding to use.
+ * @param [start=0] The byte offset to start decoding at.
+ * @param [end=buf.length] The byte offset to stop decoding at (not inclusive).
+ */
+ toString(encoding?: BufferEncoding, start?: number, end?: number): string;
+ /**
+ * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls
+ * this function when stringifying a `Buffer` instance.
+ *
+ * `Buffer.from()` accepts objects in the format returned from this method.
+ * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]);
+ * const json = JSON.stringify(buf);
+ *
+ * console.log(json);
+ * // Prints: {"type":"Buffer","data":[1,2,3,4,5]}
+ *
+ * const copy = JSON.parse(json, (key, value) => {
+ * return value &#x26;&#x26; value.type === 'Buffer' ?
+ * Buffer.from(value) :
+ * value;
+ * });
+ *
+ * console.log(copy);
+ * // Prints: <Buffer 01 02 03 04 05>
+ * ```
+ * @since v0.9.2
+ */
+ toJSON(): {
+ type: 'Buffer';
+ data: number[];
+ };
+ /**
+ * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from('ABC');
+ * const buf2 = Buffer.from('414243', 'hex');
+ * const buf3 = Buffer.from('ABCD');
+ *
+ * console.log(buf1.equals(buf2));
+ * // Prints: true
+ * console.log(buf1.equals(buf3));
+ * // Prints: false
+ * ```
+ * @since v0.11.13
+ * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`.
+ */
+ equals(otherBuffer: Uint8Array): boolean;
+ /**
+ * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order.
+ * Comparison is based on the actual sequence of bytes in each `Buffer`.
+ *
+ * * `0` is returned if `target` is the same as `buf`
+ * * `1` is returned if `target` should come _before_`buf` when sorted.
+ * * `-1` is returned if `target` should come _after_`buf` when sorted.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from('ABC');
+ * const buf2 = Buffer.from('BCD');
+ * const buf3 = Buffer.from('ABCD');
+ *
+ * console.log(buf1.compare(buf1));
+ * // Prints: 0
+ * console.log(buf1.compare(buf2));
+ * // Prints: -1
+ * console.log(buf1.compare(buf3));
+ * // Prints: -1
+ * console.log(buf2.compare(buf1));
+ * // Prints: 1
+ * console.log(buf2.compare(buf3));
+ * // Prints: 1
+ * console.log([buf1, buf2, buf3].sort(Buffer.compare));
+ * // Prints: [ <Buffer 41 42 43>, <Buffer 41 42 43 44>, <Buffer 42 43 44> ]
+ * // (This result is equal to: [buf1, buf3, buf2].)
+ * ```
+ *
+ * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd`arguments can be used to limit the comparison to specific ranges within `target`and `buf` respectively.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]);
+ * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]);
+ *
+ * console.log(buf1.compare(buf2, 5, 9, 0, 4));
+ * // Prints: 0
+ * console.log(buf1.compare(buf2, 0, 6, 4));
+ * // Prints: -1
+ * console.log(buf1.compare(buf2, 5, 6, 5));
+ * // Prints: 1
+ * ```
+ *
+ * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`,`targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`.
+ * @since v0.11.13
+ * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`.
+ * @param [targetStart=0] The offset within `target` at which to begin comparison.
+ * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive).
+ * @param [sourceStart=0] The offset within `buf` at which to begin comparison.
+ * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive).
+ */
+ compare(
+ target: Uint8Array,
+ targetStart?: number,
+ targetEnd?: number,
+ sourceStart?: number,
+ sourceEnd?: number,
+ ): -1 | 0 | 1;
+ /**
+ * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`.
+ *
+ * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available
+ * for all TypedArrays, including Node.js `Buffer`s, although it takes
+ * different function arguments.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Create two `Buffer` instances.
+ * const buf1 = Buffer.allocUnsafe(26);
+ * const buf2 = Buffer.allocUnsafe(26).fill('!');
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`.
+ * buf1.copy(buf2, 8, 16, 20);
+ * // This is equivalent to:
+ * // buf2.set(buf1.subarray(16, 20), 8);
+ *
+ * console.log(buf2.toString('ascii', 0, 25));
+ * // Prints: !!!!!!!!qrst!!!!!!!!!!!!!
+ * ```
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Create a `Buffer` and copy data from one region to an overlapping region
+ * // within the same `Buffer`.
+ *
+ * const buf = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf[i] = i + 97;
+ * }
+ *
+ * buf.copy(buf, 0, 4, 10);
+ *
+ * console.log(buf.toString());
+ * // Prints: efghijghijklmnopqrstuvwxyz
+ * ```
+ * @since v0.1.90
+ * @param target A `Buffer` or {@link Uint8Array} to copy into.
+ * @param [targetStart=0] The offset within `target` at which to begin writing.
+ * @param [sourceStart=0] The offset within `buf` from which to begin copying.
+ * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive).
+ * @return The number of bytes copied.
+ */
+ copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
+ /**
+ * Returns a new `Buffer` that references the same memory as the original, but
+ * offset and cropped by the `start` and `end` indices.
+ *
+ * This method is not compatible with the `Uint8Array.prototype.slice()`,
+ * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * const copiedBuf = Uint8Array.prototype.slice.call(buf);
+ * copiedBuf[0]++;
+ * console.log(copiedBuf.toString());
+ * // Prints: cuffer
+ *
+ * console.log(buf.toString());
+ * // Prints: buffer
+ *
+ * // With buf.slice(), the original buffer is modified.
+ * const notReallyCopiedBuf = buf.slice();
+ * notReallyCopiedBuf[0]++;
+ * console.log(notReallyCopiedBuf.toString());
+ * // Prints: cuffer
+ * console.log(buf.toString());
+ * // Also prints: cuffer (!)
+ * ```
+ * @since v0.3.0
+ * @deprecated Use `subarray` instead.
+ * @param [start=0] Where the new `Buffer` will start.
+ * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
+ */
+ slice(start?: number, end?: number): Buffer;
+ /**
+ * Returns a new `Buffer` that references the same memory as the original, but
+ * offset and cropped by the `start` and `end` indices.
+ *
+ * Specifying `end` greater than `buf.length` will return the same result as
+ * that of `end` equal to `buf.length`.
+ *
+ * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray).
+ *
+ * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte
+ * // from the original `Buffer`.
+ *
+ * const buf1 = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * const buf2 = buf1.subarray(0, 3);
+ *
+ * console.log(buf2.toString('ascii', 0, buf2.length));
+ * // Prints: abc
+ *
+ * buf1[0] = 33;
+ *
+ * console.log(buf2.toString('ascii', 0, buf2.length));
+ * // Prints: !bc
+ * ```
+ *
+ * Specifying negative indexes causes the slice to be generated relative to the
+ * end of `buf` rather than the beginning.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * console.log(buf.subarray(-6, -1).toString());
+ * // Prints: buffe
+ * // (Equivalent to buf.subarray(0, 5).)
+ *
+ * console.log(buf.subarray(-6, -2).toString());
+ * // Prints: buff
+ * // (Equivalent to buf.subarray(0, 4).)
+ *
+ * console.log(buf.subarray(-5, -2).toString());
+ * // Prints: uff
+ * // (Equivalent to buf.subarray(1, 4).)
+ * ```
+ * @since v3.0.0
+ * @param [start=0] Where the new `Buffer` will start.
+ * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
+ */
+ subarray(start?: number, end?: number): Buffer;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigInt64BE(0x0102030405060708n, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigInt64BE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigInt64LE(0x0102030405060708n, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 08 07 06 05 04 03 02 01>
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigInt64LE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian.
+ *
+ * This function is also available under the `writeBigUint64BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigUInt64BE(0xdecafafecacefaden, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer de ca fa fe ca ce fa de>
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigUInt64BE(value: bigint, offset?: number): number;
+ /**
+ * @alias Buffer.writeBigUInt64BE
+ * @since v14.10.0, v12.19.0
+ */
+ writeBigUint64BE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigUInt64LE(0xdecafafecacefaden, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer de fa ce ca fe fa ca de>
+ * ```
+ *
+ * This function is also available under the `writeBigUint64LE` alias.
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigUInt64LE(value: bigint, offset?: number): number;
+ /**
+ * @alias Buffer.writeBigUInt64LE
+ * @since v14.10.0, v12.19.0
+ */
+ writeBigUint64LE(value: bigint, offset?: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than an unsigned integer.
+ *
+ * This function is also available under the `writeUintLE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeUIntLE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer ab 90 78 56 34 12>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUIntLE(value: number, offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.writeUIntLE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUintLE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than an unsigned integer.
+ *
+ * This function is also available under the `writeUintBE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeUIntBE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 12 34 56 78 90 ab>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUIntBE(value: number, offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.writeUIntBE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUintBE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than a signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeIntLE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer ab 90 78 56 34 12>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeIntLE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a
+ * signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeIntBE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 12 34 56 78 90 ab>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeIntBE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readBigUint64BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
+ *
+ * console.log(buf.readBigUInt64BE(0));
+ * // Prints: 4294967295n
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigUInt64BE(offset?: number): bigint;
+ /**
+ * @alias Buffer.readBigUInt64BE
+ * @since v14.10.0, v12.19.0
+ */
+ readBigUint64BE(offset?: number): bigint;
+ /**
+ * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readBigUint64LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
+ *
+ * console.log(buf.readBigUInt64LE(0));
+ * // Prints: 18446744069414584320n
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigUInt64LE(offset?: number): bigint;
+ /**
+ * @alias Buffer.readBigUInt64LE
+ * @since v14.10.0, v12.19.0
+ */
+ readBigUint64LE(offset?: number): bigint;
+ /**
+ * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed
+ * values.
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigInt64BE(offset?: number): bigint;
+ /**
+ * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed
+ * values.
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigInt64LE(offset?: number): bigint;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned, little-endian integer supporting
+ * up to 48 bits of accuracy.
+ *
+ * This function is also available under the `readUintLE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readUIntLE(0, 6).toString(16));
+ * // Prints: ab9078563412
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readUIntLE(offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.readUIntLE
+ * @since v14.9.0, v12.19.0
+ */
+ readUintLE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned big-endian integer supporting
+ * up to 48 bits of accuracy.
+ *
+ * This function is also available under the `readUintBE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readUIntBE(0, 6).toString(16));
+ * // Prints: 1234567890ab
+ * console.log(buf.readUIntBE(1, 6).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readUIntBE(offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.readUIntBE
+ * @since v14.9.0, v12.19.0
+ */
+ readUintBE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a little-endian, two's complement signed value
+ * supporting up to 48 bits of accuracy.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readIntLE(0, 6).toString(16));
+ * // Prints: -546f87a9cbee
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readIntLE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a big-endian, two's complement signed value
+ * supporting up to 48 bits of accuracy.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readIntBE(0, 6).toString(16));
+ * // Prints: 1234567890ab
+ * console.log(buf.readIntBE(1, 6).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * console.log(buf.readIntBE(1, 0).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readIntBE(offset: number, byteLength: number): number;
+ /**
+ * Reads an unsigned 8-bit integer from `buf` at the specified `offset`.
+ *
+ * This function is also available under the `readUint8` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([1, -2]);
+ *
+ * console.log(buf.readUInt8(0));
+ * // Prints: 1
+ * console.log(buf.readUInt8(1));
+ * // Prints: 254
+ * console.log(buf.readUInt8(2));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
+ */
+ readUInt8(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt8
+ * @since v14.9.0, v12.19.0
+ */
+ readUint8(offset?: number): number;
+ /**
+ * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint16LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56]);
+ *
+ * console.log(buf.readUInt16LE(0).toString(16));
+ * // Prints: 3412
+ * console.log(buf.readUInt16LE(1).toString(16));
+ * // Prints: 5634
+ * console.log(buf.readUInt16LE(2).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readUInt16LE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt16LE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint16LE(offset?: number): number;
+ /**
+ * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint16BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56]);
+ *
+ * console.log(buf.readUInt16BE(0).toString(16));
+ * // Prints: 1234
+ * console.log(buf.readUInt16BE(1).toString(16));
+ * // Prints: 3456
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readUInt16BE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt16BE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint16BE(offset?: number): number;
+ /**
+ * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint32LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
+ *
+ * console.log(buf.readUInt32LE(0).toString(16));
+ * // Prints: 78563412
+ * console.log(buf.readUInt32LE(1).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readUInt32LE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt32LE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint32LE(offset?: number): number;
+ /**
+ * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint32BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
+ *
+ * console.log(buf.readUInt32BE(0).toString(16));
+ * // Prints: 12345678
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readUInt32BE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt32BE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint32BE(offset?: number): number;
+ /**
+ * Reads a signed 8-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([-1, 5]);
+ *
+ * console.log(buf.readInt8(0));
+ * // Prints: -1
+ * console.log(buf.readInt8(1));
+ * // Prints: 5
+ * console.log(buf.readInt8(2));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
+ */
+ readInt8(offset?: number): number;
+ /**
+ * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0, 5]);
+ *
+ * console.log(buf.readInt16LE(0));
+ * // Prints: 1280
+ * console.log(buf.readInt16LE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readInt16LE(offset?: number): number;
+ /**
+ * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0, 5]);
+ *
+ * console.log(buf.readInt16BE(0));
+ * // Prints: 5
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readInt16BE(offset?: number): number;
+ /**
+ * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0, 0, 0, 5]);
+ *
+ * console.log(buf.readInt32LE(0));
+ * // Prints: 83886080
+ * console.log(buf.readInt32LE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readInt32LE(offset?: number): number;
+ /**
+ * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0, 0, 0, 5]);
+ *
+ * console.log(buf.readInt32BE(0));
+ * // Prints: 5
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readInt32BE(offset?: number): number;
+ /**
+ * Reads a 32-bit, little-endian float from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4]);
+ *
+ * console.log(buf.readFloatLE(0));
+ * // Prints: 1.539989614439558e-36
+ * console.log(buf.readFloatLE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readFloatLE(offset?: number): number;
+ /**
+ * Reads a 32-bit, big-endian float from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4]);
+ *
+ * console.log(buf.readFloatBE(0));
+ * // Prints: 2.387939260590663e-38
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readFloatBE(offset?: number): number;
+ /**
+ * Reads a 64-bit, little-endian double from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
+ *
+ * console.log(buf.readDoubleLE(0));
+ * // Prints: 5.447603722011605e-270
+ * console.log(buf.readDoubleLE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
+ */
+ readDoubleLE(offset?: number): number;
+ /**
+ * Reads a 64-bit, big-endian double from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
+ *
+ * console.log(buf.readDoubleBE(0));
+ * // Prints: 8.20788039913184e-304
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
+ */
+ readDoubleBE(offset?: number): number;
+ reverse(): this;
+ /**
+ * Interprets `buf` as an array of unsigned 16-bit integers and swaps the
+ * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+ *
+ * buf1.swap16();
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 02 01 04 03 06 05 08 07>
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap16();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ *
+ * One convenient use of `buf.swap16()` is to perform a fast in-place conversion
+ * between UTF-16 little-endian and UTF-16 big-endian:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le');
+ * buf.swap16(); // Convert to big-endian UTF-16 text.
+ * ```
+ * @since v5.10.0
+ * @return A reference to `buf`.
+ */
+ swap16(): Buffer;
+ /**
+ * Interprets `buf` as an array of unsigned 32-bit integers and swaps the
+ * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+ *
+ * buf1.swap32();
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 04 03 02 01 08 07 06 05>
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap32();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ * @since v5.10.0
+ * @return A reference to `buf`.
+ */
+ swap32(): Buffer;
+ /**
+ * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_.
+ * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+ *
+ * buf1.swap64();
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 08 07 06 05 04 03 02 01>
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap64();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ * @since v6.3.0
+ * @return A reference to `buf`.
+ */
+ swap64(): Buffer;
+ /**
+ * Writes `value` to `buf` at the specified `offset`. `value` must be a
+ * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything
+ * other than an unsigned 8-bit integer.
+ *
+ * This function is also available under the `writeUint8` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt8(0x3, 0);
+ * buf.writeUInt8(0x4, 1);
+ * buf.writeUInt8(0x23, 2);
+ * buf.writeUInt8(0x42, 3);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 03 04 23 42>
+ * ```
+ * @since v0.5.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt8(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt8
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint8(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is
+ * anything other than an unsigned 16-bit integer.
+ *
+ * This function is also available under the `writeUint16LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt16LE(0xdead, 0);
+ * buf.writeUInt16LE(0xbeef, 2);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer ad de ef be>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt16LE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt16LE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint16LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an
+ * unsigned 16-bit integer.
+ *
+ * This function is also available under the `writeUint16BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt16BE(0xdead, 0);
+ * buf.writeUInt16BE(0xbeef, 2);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer de ad be ef>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt16BE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt16BE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint16BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is
+ * anything other than an unsigned 32-bit integer.
+ *
+ * This function is also available under the `writeUint32LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt32LE(0xfeedface, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer ce fa ed fe>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt32LE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt32LE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint32LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an
+ * unsigned 32-bit integer.
+ *
+ * This function is also available under the `writeUint32BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt32BE(0xfeedface, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer fe ed fa ce>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt32BE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt32BE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint32BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset`. `value` must be a valid
+ * signed 8-bit integer. Behavior is undefined when `value` is anything other than
+ * a signed 8-bit integer.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt8(2, 0);
+ * buf.writeInt8(-2, 1);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 02 fe>
+ * ```
+ * @since v0.5.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt8(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 16-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt16LE(0x0304, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 04 03>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt16LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 16-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt16BE(0x0102, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 01 02>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt16BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 32-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeInt32LE(0x05060708, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 08 07 06 05>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt32LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 32-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeInt32BE(0x01020304, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 01 02 03 04>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt32BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is
+ * undefined when `value` is anything other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeFloatLE(0xcafebabe, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer bb fe 4a 4f>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeFloatLE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is
+ * undefined when `value` is anything other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeFloatBE(0xcafebabe, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 4f 4a fe bb>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeFloatBE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything
+ * other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeDoubleLE(123.456, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 77 be 9f 1a 2f dd 5e 40>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeDoubleLE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything
+ * other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeDoubleBE(123.456, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 40 5e dd 2f 1a 9f be 77>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeDoubleBE(value: number, offset?: number): number;
+ /**
+ * Fills `buf` with the specified `value`. If the `offset` and `end` are not given,
+ * the entire `buf` will be filled:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Fill a `Buffer` with the ASCII character 'h'.
+ *
+ * const b = Buffer.allocUnsafe(50).fill('h');
+ *
+ * console.log(b.toString());
+ * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+ *
+ * // Fill a buffer with empty string
+ * const c = Buffer.allocUnsafe(5).fill('');
+ *
+ * console.log(c.fill(''));
+ * // Prints: <Buffer 00 00 00 00 00>
+ * ```
+ *
+ * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or
+ * integer. If the resulting integer is greater than `255` (decimal), `buf` will be
+ * filled with `value &#x26; 255`.
+ *
+ * If the final write of a `fill()` operation falls on a multi-byte character,
+ * then only the bytes of that character that fit into `buf` are written:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Fill a `Buffer` with character that takes up two bytes in UTF-8.
+ *
+ * console.log(Buffer.allocUnsafe(5).fill('\u0222'));
+ * // Prints: <Buffer c8 a2 c8 a2 c8>
+ * ```
+ *
+ * If `value` contains invalid characters, it is truncated; if no valid
+ * fill data remains, an exception is thrown:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(5);
+ *
+ * console.log(buf.fill('a'));
+ * // Prints: <Buffer 61 61 61 61 61>
+ * console.log(buf.fill('aazz', 'hex'));
+ * // Prints: <Buffer aa aa aa aa aa>
+ * console.log(buf.fill('zz', 'hex'));
+ * // Throws an exception.
+ * ```
+ * @since v0.5.0
+ * @param value The value with which to fill `buf`. Empty value (string, Uint8Array, Buffer) is coerced to `0`.
+ * @param [offset=0] Number of bytes to skip before starting to fill `buf`.
+ * @param [end=buf.length] Where to stop filling `buf` (not inclusive).
+ * @param [encoding='utf8'] The encoding for `value` if `value` is a string.
+ * @return A reference to `buf`.
+ */
+ fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
+ /**
+ * If `value` is:
+ *
+ * * a string, `value` is interpreted according to the character encoding in`encoding`.
+ * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety.
+ * To compare a partial `Buffer`, use `buf.subarray`.
+ * * a number, `value` will be interpreted as an unsigned 8-bit integer
+ * value between `0` and `255`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('this is a buffer');
+ *
+ * console.log(buf.indexOf('this'));
+ * // Prints: 0
+ * console.log(buf.indexOf('is'));
+ * // Prints: 2
+ * console.log(buf.indexOf(Buffer.from('a buffer')));
+ * // Prints: 8
+ * console.log(buf.indexOf(97));
+ * // Prints: 8 (97 is the decimal ASCII value for 'a')
+ * console.log(buf.indexOf(Buffer.from('a buffer example')));
+ * // Prints: -1
+ * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8)));
+ * // Prints: 8
+ *
+ * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
+ *
+ * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le'));
+ * // Prints: 4
+ * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le'));
+ * // Prints: 6
+ * ```
+ *
+ * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value,
+ * an integer between 0 and 255.
+ *
+ * If `byteOffset` is not a number, it will be coerced to a number. If the result
+ * of coercion is `NaN` or `0`, then the entire buffer will be searched. This
+ * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf).
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const b = Buffer.from('abcdef');
+ *
+ * // Passing a value that's a number, but not a valid byte.
+ * // Prints: 2, equivalent to searching for 99 or 'c'.
+ * console.log(b.indexOf(99.9));
+ * console.log(b.indexOf(256 + 99));
+ *
+ * // Passing a byteOffset that coerces to NaN or 0.
+ * // Prints: 1, searching the whole buffer.
+ * console.log(b.indexOf('b', undefined));
+ * console.log(b.indexOf('b', {}));
+ * console.log(b.indexOf('b', null));
+ * console.log(b.indexOf('b', []));
+ * ```
+ *
+ * If `value` is an empty string or empty `Buffer` and `byteOffset` is less
+ * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned.
+ * @since v1.5.0
+ * @param value What to search for.
+ * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
+ * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
+ */
+ indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
+ /**
+ * Identical to `buf.indexOf()`, except the last occurrence of `value` is found
+ * rather than the first occurrence.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('this buffer is a buffer');
+ *
+ * console.log(buf.lastIndexOf('this'));
+ * // Prints: 0
+ * console.log(buf.lastIndexOf('buffer'));
+ * // Prints: 17
+ * console.log(buf.lastIndexOf(Buffer.from('buffer')));
+ * // Prints: 17
+ * console.log(buf.lastIndexOf(97));
+ * // Prints: 15 (97 is the decimal ASCII value for 'a')
+ * console.log(buf.lastIndexOf(Buffer.from('yolo')));
+ * // Prints: -1
+ * console.log(buf.lastIndexOf('buffer', 5));
+ * // Prints: 5
+ * console.log(buf.lastIndexOf('buffer', 4));
+ * // Prints: -1
+ *
+ * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
+ *
+ * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le'));
+ * // Prints: 6
+ * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le'));
+ * // Prints: 4
+ * ```
+ *
+ * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value,
+ * an integer between 0 and 255.
+ *
+ * If `byteOffset` is not a number, it will be coerced to a number. Any arguments
+ * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer.
+ * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf).
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const b = Buffer.from('abcdef');
+ *
+ * // Passing a value that's a number, but not a valid byte.
+ * // Prints: 2, equivalent to searching for 99 or 'c'.
+ * console.log(b.lastIndexOf(99.9));
+ * console.log(b.lastIndexOf(256 + 99));
+ *
+ * // Passing a byteOffset that coerces to NaN.
+ * // Prints: 1, searching the whole buffer.
+ * console.log(b.lastIndexOf('b', undefined));
+ * console.log(b.lastIndexOf('b', {}));
+ *
+ * // Passing a byteOffset that coerces to 0.
+ * // Prints: -1, equivalent to passing 0.
+ * console.log(b.lastIndexOf('b', null));
+ * console.log(b.lastIndexOf('b', []));
+ * ```
+ *
+ * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned.
+ * @since v6.0.0
+ * @param value What to search for.
+ * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
+ * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
+ */
+ lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
+ /**
+ * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `[index, byte]` pairs from the contents
+ * of `buf`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Log the entire contents of a `Buffer`.
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * for (const pair of buf.entries()) {
+ * console.log(pair);
+ * }
+ * // Prints:
+ * // [0, 98]
+ * // [1, 117]
+ * // [2, 102]
+ * // [3, 102]
+ * // [4, 101]
+ * // [5, 114]
+ * ```
+ * @since v1.1.0
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Equivalent to `buf.indexOf() !== -1`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('this is a buffer');
+ *
+ * console.log(buf.includes('this'));
+ * // Prints: true
+ * console.log(buf.includes('is'));
+ * // Prints: true
+ * console.log(buf.includes(Buffer.from('a buffer')));
+ * // Prints: true
+ * console.log(buf.includes(97));
+ * // Prints: true (97 is the decimal ASCII value for 'a')
+ * console.log(buf.includes(Buffer.from('a buffer example')));
+ * // Prints: false
+ * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8)));
+ * // Prints: true
+ * console.log(buf.includes('this', 4));
+ * // Prints: false
+ * ```
+ * @since v5.3.0
+ * @param value What to search for.
+ * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is its encoding.
+ * @return `true` if `value` was found in `buf`, `false` otherwise.
+ */
+ includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
+ /**
+ * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `buf` keys (indices).
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * for (const key of buf.keys()) {
+ * console.log(key);
+ * }
+ * // Prints:
+ * // 0
+ * // 1
+ * // 2
+ * // 3
+ * // 4
+ * // 5
+ * ```
+ * @since v1.1.0
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) for `buf` values (bytes). This function is
+ * called automatically when a `Buffer` is used in a `for..of` statement.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * for (const value of buf.values()) {
+ * console.log(value);
+ * }
+ * // Prints:
+ * // 98
+ * // 117
+ * // 102
+ * // 102
+ * // 101
+ * // 114
+ *
+ * for (const value of buf) {
+ * console.log(value);
+ * }
+ * // Prints:
+ * // 98
+ * // 117
+ * // 102
+ * // 102
+ * // 101
+ * // 114
+ * ```
+ * @since v1.1.0
+ */
+ values(): IterableIterator<number>;
+ }
+ var Buffer: BufferConstructor;
+ /**
+ * Decodes a string of Base64-encoded data into bytes, and encodes those bytes
+ * into a string using Latin-1 (ISO-8859-1).
+ *
+ * The `data` may be any JavaScript-value that can be coerced into a string.
+ *
+ * **This function is only provided for compatibility with legacy web platform APIs**
+ * **and should never be used in new code, because they use strings to represent**
+ * **binary data and predate the introduction of typed arrays in JavaScript.**
+ * **For code running using Node.js APIs, converting between base64-encoded strings**
+ * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
+ * @since v15.13.0, v14.17.0
+ * @legacy Use `Buffer.from(data, 'base64')` instead.
+ * @param data The Base64-encoded input string.
+ */
+ function atob(data: string): string;
+ /**
+ * Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes
+ * into a string using Base64.
+ *
+ * The `data` may be any JavaScript-value that can be coerced into a string.
+ *
+ * **This function is only provided for compatibility with legacy web platform APIs**
+ * **and should never be used in new code, because they use strings to represent**
+ * **binary data and predate the introduction of typed arrays in JavaScript.**
+ * **For code running using Node.js APIs, converting between base64-encoded strings**
+ * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
+ * @since v15.13.0, v14.17.0
+ * @legacy Use `buf.toString('base64')` instead.
+ * @param data An ASCII (Latin1) string.
+ */
+ function btoa(data: string): string;
+ interface Blob extends __Blob {}
+ /**
+ * `Blob` class is a global reference for `require('node:buffer').Blob`
+ * https://nodejs.org/api/buffer.html#class-blob
+ * @since v18.0.0
+ */
+ var Blob: typeof globalThis extends {
+ onmessage: any;
+ Blob: infer T;
+ }
+ ? T
+ : typeof NodeBlob;
+ }
+}
+declare module 'node:buffer' {
+ export * from 'buffer';
+}
diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts
new file mode 100755
index 0000000..b255795
--- /dev/null
+++ b/node_modules/@types/node/child_process.d.ts
@@ -0,0 +1,1400 @@
+/**
+ * The `node:child_process` module provides the ability to spawn subprocesses in
+ * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability
+ * is primarily provided by the {@link spawn} function:
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ * const ls = spawn('ls', ['-lh', '/usr']);
+ *
+ * ls.stdout.on('data', (data) => {
+ * console.log(`stdout: ${data}`);
+ * });
+ *
+ * ls.stderr.on('data', (data) => {
+ * console.error(`stderr: ${data}`);
+ * });
+ *
+ * ls.on('close', (code) => {
+ * console.log(`child process exited with code ${code}`);
+ * });
+ * ```
+ *
+ * By default, pipes for `stdin`, `stdout`, and `stderr` are established between
+ * the parent Node.js process and the spawned subprocess. These pipes have
+ * limited (and platform-specific) capacity. If the subprocess writes to
+ * stdout in excess of that limit without the output being captured, the
+ * subprocess blocks waiting for the pipe buffer to accept more data. This is
+ * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }`option if the output will not be consumed.
+ *
+ * The command lookup is performed using the `options.env.PATH` environment
+ * variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is
+ * used. If `options.env` is set without `PATH`, lookup on Unix is performed
+ * on a default search path search of `/usr/bin:/bin` (see your operating system's
+ * manual for execvpe/execvp), on Windows the current processes environment
+ * variable `PATH` is used.
+ *
+ * On Windows, environment variables are case-insensitive. Node.js
+ * lexicographically sorts the `env` keys and uses the first one that
+ * case-insensitively matches. Only first (in lexicographic order) entry will be
+ * passed to the subprocess. This might lead to issues on Windows when passing
+ * objects to the `env` option that have multiple variants of the same key, such as`PATH` and `Path`.
+ *
+ * The {@link spawn} method spawns the child process asynchronously,
+ * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks
+ * the event loop until the spawned process either exits or is terminated.
+ *
+ * For convenience, the `node:child_process` module provides a handful of
+ * synchronous and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on
+ * top of {@link spawn} or {@link spawnSync}.
+ *
+ * * {@link exec}: spawns a shell and runs a command within that
+ * shell, passing the `stdout` and `stderr` to a callback function when
+ * complete.
+ * * {@link execFile}: similar to {@link exec} except
+ * that it spawns the command directly without first spawning a shell by
+ * default.
+ * * {@link fork}: spawns a new Node.js process and invokes a
+ * specified module with an IPC communication channel established that allows
+ * sending messages between parent and child.
+ * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop.
+ * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop.
+ *
+ * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
+ * the synchronous methods can have significant impact on performance due to
+ * stalling the event loop while spawned processes complete.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/child_process.js)
+ */
+declare module 'child_process' {
+ import { ObjectEncodingOptions } from 'node:fs';
+ import { EventEmitter, Abortable } from 'node:events';
+ import * as net from 'node:net';
+ import { Writable, Readable, Stream, Pipe } from 'node:stream';
+ import { URL } from 'node:url';
+ type Serializable = string | object | number | boolean | bigint;
+ type SendHandle = net.Socket | net.Server;
+ /**
+ * Instances of the `ChildProcess` represent spawned child processes.
+ *
+ * Instances of `ChildProcess` are not intended to be created directly. Rather,
+ * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create
+ * instances of `ChildProcess`.
+ * @since v2.2.0
+ */
+ class ChildProcess extends EventEmitter {
+ /**
+ * A `Writable Stream` that represents the child process's `stdin`.
+ *
+ * If a child process waits to read all of its input, the child will not continue
+ * until this stream has been closed via `end()`.
+ *
+ * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will
+ * refer to the same value.
+ *
+ * The `subprocess.stdin` property can be `null` or `undefined`if the child process could not be successfully spawned.
+ * @since v0.1.90
+ */
+ stdin: Writable | null;
+ /**
+ * A `Readable Stream` that represents the child process's `stdout`.
+ *
+ * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will
+ * refer to the same value.
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ *
+ * const subprocess = spawn('ls');
+ *
+ * subprocess.stdout.on('data', (data) => {
+ * console.log(`Received chunk ${data}`);
+ * });
+ * ```
+ *
+ * The `subprocess.stdout` property can be `null` or `undefined`if the child process could not be successfully spawned.
+ * @since v0.1.90
+ */
+ stdout: Readable | null;
+ /**
+ * A `Readable Stream` that represents the child process's `stderr`.
+ *
+ * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will
+ * refer to the same value.
+ *
+ * The `subprocess.stderr` property can be `null` or `undefined`if the child process could not be successfully spawned.
+ * @since v0.1.90
+ */
+ stderr: Readable | null;
+ /**
+ * The `subprocess.channel` property is a reference to the child's IPC channel. If
+ * no IPC channel exists, this property is `undefined`.
+ * @since v7.1.0
+ */
+ readonly channel?: Pipe | null | undefined;
+ /**
+ * A sparse array of pipes to the child process, corresponding with positions in
+ * the `stdio` option passed to {@link spawn} that have been set
+ * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and`subprocess.stdio[2]` are also available as `subprocess.stdin`,`subprocess.stdout`, and `subprocess.stderr`,
+ * respectively.
+ *
+ * In the following example, only the child's fd `1` (stdout) is configured as a
+ * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values
+ * in the array are `null`.
+ *
+ * ```js
+ * const assert = require('node:assert');
+ * const fs = require('node:fs');
+ * const child_process = require('node:child_process');
+ *
+ * const subprocess = child_process.spawn('ls', {
+ * stdio: [
+ * 0, // Use parent's stdin for child.
+ * 'pipe', // Pipe child's stdout to parent.
+ * fs.openSync('err.out', 'w'), // Direct child's stderr to a file.
+ * ],
+ * });
+ *
+ * assert.strictEqual(subprocess.stdio[0], null);
+ * assert.strictEqual(subprocess.stdio[0], subprocess.stdin);
+ *
+ * assert(subprocess.stdout);
+ * assert.strictEqual(subprocess.stdio[1], subprocess.stdout);
+ *
+ * assert.strictEqual(subprocess.stdio[2], null);
+ * assert.strictEqual(subprocess.stdio[2], subprocess.stderr);
+ * ```
+ *
+ * The `subprocess.stdio` property can be `undefined` if the child process could
+ * not be successfully spawned.
+ * @since v0.7.10
+ */
+ readonly stdio: [
+ Writable | null,
+ // stdin
+ Readable | null,
+ // stdout
+ Readable | null,
+ // stderr
+ Readable | Writable | null | undefined,
+ // extra
+ Readable | Writable | null | undefined // extra
+ ];
+ /**
+ * The `subprocess.killed` property indicates whether the child process
+ * successfully received a signal from `subprocess.kill()`. The `killed` property
+ * does not indicate that the child process has been terminated.
+ * @since v0.5.10
+ */
+ readonly killed: boolean;
+ /**
+ * Returns the process identifier (PID) of the child process. If the child process
+ * fails to spawn due to errors, then the value is `undefined` and `error` is
+ * emitted.
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * console.log(`Spawned child pid: ${grep.pid}`);
+ * grep.stdin.end();
+ * ```
+ * @since v0.1.90
+ */
+ readonly pid?: number | undefined;
+ /**
+ * The `subprocess.connected` property indicates whether it is still possible to
+ * send and receive messages from a child process. When `subprocess.connected` is`false`, it is no longer possible to send or receive messages.
+ * @since v0.7.2
+ */
+ readonly connected: boolean;
+ /**
+ * The `subprocess.exitCode` property indicates the exit code of the child process.
+ * If the child process is still running, the field will be `null`.
+ */
+ readonly exitCode: number | null;
+ /**
+ * The `subprocess.signalCode` property indicates the signal received by
+ * the child process if any, else `null`.
+ */
+ readonly signalCode: NodeJS.Signals | null;
+ /**
+ * The `subprocess.spawnargs` property represents the full list of command-line
+ * arguments the child process was launched with.
+ */
+ readonly spawnargs: string[];
+ /**
+ * The `subprocess.spawnfile` property indicates the executable file name of
+ * the child process that is launched.
+ *
+ * For {@link fork}, its value will be equal to `process.execPath`.
+ * For {@link spawn}, its value will be the name of
+ * the executable file.
+ * For {@link exec}, its value will be the name of the shell
+ * in which the child process is launched.
+ */
+ readonly spawnfile: string;
+ /**
+ * The `subprocess.kill()` method sends a signal to the child process. If no
+ * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function
+ * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise.
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * grep.on('close', (code, signal) => {
+ * console.log(
+ * `child process terminated due to receipt of signal ${signal}`);
+ * });
+ *
+ * // Send SIGHUP to process.
+ * grep.kill('SIGHUP');
+ * ```
+ *
+ * The `ChildProcess` object may emit an `'error'` event if the signal
+ * cannot be delivered. Sending a signal to a child process that has already exited
+ * is not an error but may have unforeseen consequences. Specifically, if the
+ * process identifier (PID) has been reassigned to another process, the signal will
+ * be delivered to that process instead which can have unexpected results.
+ *
+ * While the function is called `kill`, the signal delivered to the child process
+ * may not actually terminate the process.
+ *
+ * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference.
+ *
+ * On Windows, where POSIX signals do not exist, the `signal` argument will be
+ * ignored, and the process will be killed forcefully and abruptly (similar to`'SIGKILL'`).
+ * See `Signal Events` for more details.
+ *
+ * On Linux, child processes of child processes will not be terminated
+ * when attempting to kill their parent. This is likely to happen when running a
+ * new process in a shell or with the use of the `shell` option of `ChildProcess`:
+ *
+ * ```js
+ * 'use strict';
+ * const { spawn } = require('node:child_process');
+ *
+ * const subprocess = spawn(
+ * 'sh',
+ * [
+ * '-c',
+ * `node -e "setInterval(() => {
+ * console.log(process.pid, 'is alive')
+ * }, 500);"`,
+ * ], {
+ * stdio: ['inherit', 'inherit', 'inherit'],
+ * },
+ * );
+ *
+ * setTimeout(() => {
+ * subprocess.kill(); // Does not terminate the Node.js process in the shell.
+ * }, 2000);
+ * ```
+ * @since v0.1.90
+ */
+ kill(signal?: NodeJS.Signals | number): boolean;
+ /**
+ * Calls {@link ChildProcess.kill} with `'SIGTERM'`.
+ * @since v20.5.0
+ */
+ [Symbol.dispose](): void;
+ /**
+ * When an IPC channel has been established between the parent and child (
+ * i.e. when using {@link fork}), the `subprocess.send()` method can
+ * be used to send messages to the child process. When the child process is a
+ * Node.js instance, these messages can be received via the `'message'` event.
+ *
+ * The message goes through serialization and parsing. The resulting
+ * message might not be the same as what is originally sent.
+ *
+ * For example, in the parent script:
+ *
+ * ```js
+ * const cp = require('node:child_process');
+ * const n = cp.fork(`${__dirname}/sub.js`);
+ *
+ * n.on('message', (m) => {
+ * console.log('PARENT got message:', m);
+ * });
+ *
+ * // Causes the child to print: CHILD got message: { hello: 'world' }
+ * n.send({ hello: 'world' });
+ * ```
+ *
+ * And then the child script, `'sub.js'` might look like this:
+ *
+ * ```js
+ * process.on('message', (m) => {
+ * console.log('CHILD got message:', m);
+ * });
+ *
+ * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null }
+ * process.send({ foo: 'bar', baz: NaN });
+ * ```
+ *
+ * Child Node.js processes will have a `process.send()` method of their own
+ * that allows the child to send messages back to the parent.
+ *
+ * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages
+ * containing a `NODE_` prefix in the `cmd` property are reserved for use within
+ * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the`'internalMessage'` event and are consumed internally by Node.js.
+ * Applications should avoid using such messages or listening for`'internalMessage'` events as it is subject to change without notice.
+ *
+ * The optional `sendHandle` argument that may be passed to `subprocess.send()` is
+ * for passing a TCP server or socket object to the child process. The child will
+ * receive the object as the second argument passed to the callback function
+ * registered on the `'message'` event. Any data that is received
+ * and buffered in the socket will not be sent to the child.
+ *
+ * The optional `callback` is a function that is invoked after the message is
+ * sent but before the child may have received it. The function is called with a
+ * single argument: `null` on success, or an `Error` object on failure.
+ *
+ * If no `callback` function is provided and the message cannot be sent, an`'error'` event will be emitted by the `ChildProcess` object. This can
+ * happen, for instance, when the child process has already exited.
+ *
+ * `subprocess.send()` will return `false` if the channel has closed or when the
+ * backlog of unsent messages exceeds a threshold that makes it unwise to send
+ * more. Otherwise, the method returns `true`. The `callback` function can be
+ * used to implement flow control.
+ *
+ * #### Example: sending a server object
+ *
+ * The `sendHandle` argument can be used, for instance, to pass the handle of
+ * a TCP server object to the child process as illustrated in the example below:
+ *
+ * ```js
+ * const subprocess = require('node:child_process').fork('subprocess.js');
+ *
+ * // Open up the server object and send the handle.
+ * const server = require('node:net').createServer();
+ * server.on('connection', (socket) => {
+ * socket.end('handled by parent');
+ * });
+ * server.listen(1337, () => {
+ * subprocess.send('server', server);
+ * });
+ * ```
+ *
+ * The child would then receive the server object as:
+ *
+ * ```js
+ * process.on('message', (m, server) => {
+ * if (m === 'server') {
+ * server.on('connection', (socket) => {
+ * socket.end('handled by child');
+ * });
+ * }
+ * });
+ * ```
+ *
+ * Once the server is now shared between the parent and child, some connections
+ * can be handled by the parent and some by the child.
+ *
+ * While the example above uses a server created using the `node:net` module,`node:dgram` module servers use exactly the same workflow with the exceptions of
+ * listening on a `'message'` event instead of `'connection'` and using`server.bind()` instead of `server.listen()`. This is, however, only
+ * supported on Unix platforms.
+ *
+ * #### Example: sending a socket object
+ *
+ * Similarly, the `sendHandler` argument can be used to pass the handle of a
+ * socket to the child process. The example below spawns two children that each
+ * handle connections with "normal" or "special" priority:
+ *
+ * ```js
+ * const { fork } = require('node:child_process');
+ * const normal = fork('subprocess.js', ['normal']);
+ * const special = fork('subprocess.js', ['special']);
+ *
+ * // Open up the server and send sockets to child. Use pauseOnConnect to prevent
+ * // the sockets from being read before they are sent to the child process.
+ * const server = require('node:net').createServer({ pauseOnConnect: true });
+ * server.on('connection', (socket) => {
+ *
+ * // If this is special priority...
+ * if (socket.remoteAddress === '74.125.127.100') {
+ * special.send('socket', socket);
+ * return;
+ * }
+ * // This is normal priority.
+ * normal.send('socket', socket);
+ * });
+ * server.listen(1337);
+ * ```
+ *
+ * The `subprocess.js` would receive the socket handle as the second argument
+ * passed to the event callback function:
+ *
+ * ```js
+ * process.on('message', (m, socket) => {
+ * if (m === 'socket') {
+ * if (socket) {
+ * // Check that the client socket exists.
+ * // It is possible for the socket to be closed between the time it is
+ * // sent and the time it is received in the child process.
+ * socket.end(`Request handled with ${process.argv[2]} priority`);
+ * }
+ * }
+ * });
+ * ```
+ *
+ * Do not use `.maxConnections` on a socket that has been passed to a subprocess.
+ * The parent cannot track when the socket is destroyed.
+ *
+ * Any `'message'` handlers in the subprocess should verify that `socket` exists,
+ * as the connection may have been closed during the time it takes to send the
+ * connection to the child.
+ * @since v0.5.9
+ * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
+ */
+ send(message: Serializable, callback?: (error: Error | null) => void): boolean;
+ send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
+ send(message: Serializable, sendHandle?: SendHandle, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
+ /**
+ * Closes the IPC channel between parent and child, allowing the child to exit
+ * gracefully once there are no other connections keeping it alive. After calling
+ * this method the `subprocess.connected` and `process.connected` properties in
+ * both the parent and child (respectively) will be set to `false`, and it will be
+ * no longer possible to pass messages between the processes.
+ *
+ * The `'disconnect'` event will be emitted when there are no messages in the
+ * process of being received. This will most often be triggered immediately after
+ * calling `subprocess.disconnect()`.
+ *
+ * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked
+ * within the child process to close the IPC channel as well.
+ * @since v0.7.2
+ */
+ disconnect(): void;
+ /**
+ * By default, the parent will wait for the detached child to exit. To prevent the
+ * parent from waiting for a given `subprocess` to exit, use the`subprocess.unref()` method. Doing so will cause the parent's event loop to not
+ * include the child in its reference count, allowing the parent to exit
+ * independently of the child, unless there is an established IPC channel between
+ * the child and the parent.
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ *
+ * const subprocess = spawn(process.argv[0], ['child_program.js'], {
+ * detached: true,
+ * stdio: 'ignore',
+ * });
+ *
+ * subprocess.unref();
+ * ```
+ * @since v0.7.10
+ */
+ unref(): void;
+ /**
+ * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will
+ * restore the removed reference count for the child process, forcing the parent
+ * to wait for the child to exit before exiting itself.
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ *
+ * const subprocess = spawn(process.argv[0], ['child_program.js'], {
+ * detached: true,
+ * stdio: 'ignore',
+ * });
+ *
+ * subprocess.unref();
+ * subprocess.ref();
+ * ```
+ * @since v0.7.10
+ */
+ ref(): void;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. disconnect
+ * 3. error
+ * 4. exit
+ * 5. message
+ * 6. spawn
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ addListener(event: 'disconnect', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ addListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ addListener(event: 'spawn', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close', code: number | null, signal: NodeJS.Signals | null): boolean;
+ emit(event: 'disconnect'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'exit', code: number | null, signal: NodeJS.Signals | null): boolean;
+ emit(event: 'message', message: Serializable, sendHandle: SendHandle): boolean;
+ emit(event: 'spawn', listener: () => void): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ on(event: 'disconnect', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ on(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ on(event: 'spawn', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ once(event: 'disconnect', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ once(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ once(event: 'spawn', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependListener(event: 'disconnect', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ prependListener(event: 'spawn', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependOnceListener(event: 'disconnect', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependOnceListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ prependOnceListener(event: 'spawn', listener: () => void): this;
+ }
+ // return this object when stdio option is undefined or not specified
+ interface ChildProcessWithoutNullStreams extends ChildProcess {
+ stdin: Writable;
+ stdout: Readable;
+ stderr: Readable;
+ readonly stdio: [
+ Writable,
+ Readable,
+ Readable,
+ // stderr
+ Readable | Writable | null | undefined,
+ // extra, no modification
+ Readable | Writable | null | undefined // extra, no modification
+ ];
+ }
+ // return this object when stdio option is a tuple of 3
+ interface ChildProcessByStdio<I extends null | Writable, O extends null | Readable, E extends null | Readable> extends ChildProcess {
+ stdin: I;
+ stdout: O;
+ stderr: E;
+ readonly stdio: [
+ I,
+ O,
+ E,
+ Readable | Writable | null | undefined,
+ // extra, no modification
+ Readable | Writable | null | undefined // extra, no modification
+ ];
+ }
+ interface MessageOptions {
+ keepOpen?: boolean | undefined;
+ }
+ type IOType = 'overlapped' | 'pipe' | 'ignore' | 'inherit';
+ type StdioOptions = IOType | Array<IOType | 'ipc' | Stream | number | null | undefined>;
+ type SerializationType = 'json' | 'advanced';
+ interface MessagingOptions extends Abortable {
+ /**
+ * Specify the kind of serialization used for sending messages between processes.
+ * @default 'json'
+ */
+ serialization?: SerializationType | undefined;
+ /**
+ * The signal value to be used when the spawned process will be killed by the abort signal.
+ * @default 'SIGTERM'
+ */
+ killSignal?: NodeJS.Signals | number | undefined;
+ /**
+ * In milliseconds the maximum amount of time the process is allowed to run.
+ */
+ timeout?: number | undefined;
+ }
+ interface ProcessEnvOptions {
+ uid?: number | undefined;
+ gid?: number | undefined;
+ cwd?: string | URL | undefined;
+ env?: NodeJS.ProcessEnv | undefined;
+ }
+ interface CommonOptions extends ProcessEnvOptions {
+ /**
+ * @default false
+ */
+ windowsHide?: boolean | undefined;
+ /**
+ * @default 0
+ */
+ timeout?: number | undefined;
+ }
+ interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable {
+ argv0?: string | undefined;
+ /**
+ * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings.
+ * If passed as an array, the first element is used for `stdin`, the second for
+ * `stdout`, and the third for `stderr`. A fourth element can be used to
+ * specify the `stdio` behavior beyond the standard streams. See
+ * {@link ChildProcess.stdio} for more information.
+ *
+ * @default 'pipe'
+ */
+ stdio?: StdioOptions | undefined;
+ shell?: boolean | string | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ }
+ interface SpawnOptions extends CommonSpawnOptions {
+ detached?: boolean | undefined;
+ }
+ interface SpawnOptionsWithoutStdio extends SpawnOptions {
+ stdio?: StdioPipeNamed | StdioPipe[] | undefined;
+ }
+ type StdioNull = 'inherit' | 'ignore' | Stream;
+ type StdioPipeNamed = 'pipe' | 'overlapped';
+ type StdioPipe = undefined | null | StdioPipeNamed;
+ interface SpawnOptionsWithStdioTuple<Stdin extends StdioNull | StdioPipe, Stdout extends StdioNull | StdioPipe, Stderr extends StdioNull | StdioPipe> extends SpawnOptions {
+ stdio: [Stdin, Stdout, Stderr];
+ }
+ /**
+ * The `child_process.spawn()` method spawns a new process using the given`command`, with command-line arguments in `args`. If omitted, `args` defaults
+ * to an empty array.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ *
+ * A third argument may be used to specify additional options, with these defaults:
+ *
+ * ```js
+ * const defaults = {
+ * cwd: undefined,
+ * env: process.env,
+ * };
+ * ```
+ *
+ * Use `cwd` to specify the working directory from which the process is spawned.
+ * If not given, the default is to inherit the current working directory. If given,
+ * but the path does not exist, the child process emits an `ENOENT` error
+ * and exits immediately. `ENOENT` is also emitted when the command
+ * does not exist.
+ *
+ * Use `env` to specify environment variables that will be visible to the new
+ * process, the default is `process.env`.
+ *
+ * `undefined` values in `env` will be ignored.
+ *
+ * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the
+ * exit code:
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ * const ls = spawn('ls', ['-lh', '/usr']);
+ *
+ * ls.stdout.on('data', (data) => {
+ * console.log(`stdout: ${data}`);
+ * });
+ *
+ * ls.stderr.on('data', (data) => {
+ * console.error(`stderr: ${data}`);
+ * });
+ *
+ * ls.on('close', (code) => {
+ * console.log(`child process exited with code ${code}`);
+ * });
+ * ```
+ *
+ * Example: A very elaborate way to run `ps ax | grep ssh`
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ * const ps = spawn('ps', ['ax']);
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * ps.stdout.on('data', (data) => {
+ * grep.stdin.write(data);
+ * });
+ *
+ * ps.stderr.on('data', (data) => {
+ * console.error(`ps stderr: ${data}`);
+ * });
+ *
+ * ps.on('close', (code) => {
+ * if (code !== 0) {
+ * console.log(`ps process exited with code ${code}`);
+ * }
+ * grep.stdin.end();
+ * });
+ *
+ * grep.stdout.on('data', (data) => {
+ * console.log(data.toString());
+ * });
+ *
+ * grep.stderr.on('data', (data) => {
+ * console.error(`grep stderr: ${data}`);
+ * });
+ *
+ * grep.on('close', (code) => {
+ * if (code !== 0) {
+ * console.log(`grep process exited with code ${code}`);
+ * }
+ * });
+ * ```
+ *
+ * Example of checking for failed `spawn`:
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ * const subprocess = spawn('bad_command');
+ *
+ * subprocess.on('error', (err) => {
+ * console.error('Failed to start subprocess.');
+ * });
+ * ```
+ *
+ * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process
+ * title while others (Windows, SunOS) will use `command`.
+ *
+ * Node.js overwrites `argv[0]` with `process.execPath` on startup, so`process.argv[0]` in a Node.js child process will not match the `argv0`parameter passed to `spawn` from the parent. Retrieve
+ * it with the`process.argv0` property instead.
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const grep = spawn('grep', ['ssh'], { signal });
+ * grep.on('error', (err) => {
+ * // This will be called with err being an AbortError if the controller aborts
+ * });
+ * controller.abort(); // Stops the child process
+ * ```
+ * @since v0.1.90
+ * @param command The command to run.
+ * @param args List of string arguments.
+ */
+ function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>): ChildProcessByStdio<Writable, Readable, Readable>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>): ChildProcessByStdio<Writable, Readable, null>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>): ChildProcessByStdio<Writable, null, Readable>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>): ChildProcessByStdio<null, Readable, Readable>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>): ChildProcessByStdio<Writable, null, null>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>): ChildProcessByStdio<null, Readable, null>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>): ChildProcessByStdio<null, null, Readable>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>): ChildProcessByStdio<null, null, null>;
+ function spawn(command: string, options: SpawnOptions): ChildProcess;
+ // overloads of spawn with 'args'
+ function spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>): ChildProcessByStdio<Writable, Readable, Readable>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>): ChildProcessByStdio<Writable, Readable, null>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>): ChildProcessByStdio<Writable, null, Readable>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>): ChildProcessByStdio<null, Readable, Readable>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>): ChildProcessByStdio<Writable, null, null>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>): ChildProcessByStdio<null, Readable, null>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>): ChildProcessByStdio<null, null, Readable>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>): ChildProcessByStdio<null, null, null>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
+ interface ExecOptions extends CommonOptions {
+ shell?: string | undefined;
+ signal?: AbortSignal | undefined;
+ maxBuffer?: number | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ }
+ interface ExecOptionsWithStringEncoding extends ExecOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecOptionsWithBufferEncoding extends ExecOptions {
+ encoding: BufferEncoding | null; // specify `null`.
+ }
+ interface ExecException extends Error {
+ cmd?: string | undefined;
+ killed?: boolean | undefined;
+ code?: number | undefined;
+ signal?: NodeJS.Signals | undefined;
+ }
+ /**
+ * Spawns a shell then executes the `command` within that shell, buffering any
+ * generated output. The `command` string passed to the exec function is processed
+ * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters))
+ * need to be dealt with accordingly:
+ *
+ * ```js
+ * const { exec } = require('node:child_process');
+ *
+ * exec('"/path/to/test file/test.sh" arg1 arg2');
+ * // Double quotes are used so that the space in the path is not interpreted as
+ * // a delimiter of multiple arguments.
+ *
+ * exec('echo "The \\$HOME variable is $HOME"');
+ * // The $HOME variable is escaped in the first instance, but not in the second.
+ * ```
+ *
+ * **Never pass unsanitized user input to this function. Any input containing shell**
+ * **metacharacters may be used to trigger arbitrary command execution.**
+ *
+ * If a `callback` function is provided, it is called with the arguments`(error, stdout, stderr)`. On success, `error` will be `null`. On error,`error` will be an instance of `Error`. The
+ * `error.code` property will be
+ * the exit code of the process. By convention, any exit code other than `0`indicates an error. `error.signal` will be the signal that terminated the
+ * process.
+ *
+ * The `stdout` and `stderr` arguments passed to the callback will contain the
+ * stdout and stderr output of the child process. By default, Node.js will decode
+ * the output as UTF-8 and pass strings to the callback. The `encoding` option
+ * can be used to specify the character encoding used to decode the stdout and
+ * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
+ * encoding, `Buffer` objects will be passed to the callback instead.
+ *
+ * ```js
+ * const { exec } = require('node:child_process');
+ * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => {
+ * if (error) {
+ * console.error(`exec error: ${error}`);
+ * return;
+ * }
+ * console.log(`stdout: ${stdout}`);
+ * console.error(`stderr: ${stderr}`);
+ * });
+ * ```
+ *
+ * If `timeout` is greater than `0`, the parent will send the signal
+ * identified by the `killSignal` property (the default is `'SIGTERM'`) if the
+ * child runs longer than `timeout` milliseconds.
+ *
+ * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace
+ * the existing process and uses a shell to execute the command.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In
+ * case of an error (including any error resulting in an exit code other than 0), a
+ * rejected promise is returned, with the same `error` object given in the
+ * callback, but with two additional properties `stdout` and `stderr`.
+ *
+ * ```js
+ * const util = require('node:util');
+ * const exec = util.promisify(require('node:child_process').exec);
+ *
+ * async function lsExample() {
+ * const { stdout, stderr } = await exec('ls');
+ * console.log('stdout:', stdout);
+ * console.error('stderr:', stderr);
+ * }
+ * lsExample();
+ * ```
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * const { exec } = require('node:child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = exec('grep ssh', { signal }, (error) => {
+ * console.error(error); // an AbortError
+ * });
+ * controller.abort();
+ * ```
+ * @since v0.1.90
+ * @param command The command to run, with space-separated arguments.
+ * @param callback called with the output when process terminates.
+ */
+ function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+ function exec(
+ command: string,
+ options: {
+ encoding: 'buffer' | null;
+ } & ExecOptions,
+ callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void
+ ): ChildProcess;
+ // `options` with well known `encoding` means stdout/stderr are definitely `string`.
+ function exec(
+ command: string,
+ options: {
+ encoding: BufferEncoding;
+ } & ExecOptions,
+ callback?: (error: ExecException | null, stdout: string, stderr: string) => void
+ ): ChildProcess;
+ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
+ // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
+ function exec(
+ command: string,
+ options: {
+ encoding: BufferEncoding;
+ } & ExecOptions,
+ callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void
+ ): ChildProcess;
+ // `options` without an `encoding` means stdout/stderr are definitely `string`.
+ function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
+ function exec(
+ command: string,
+ options: (ObjectEncodingOptions & ExecOptions) | undefined | null,
+ callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void
+ ): ChildProcess;
+ interface PromiseWithChild<T> extends Promise<T> {
+ child: ChildProcess;
+ }
+ namespace exec {
+ function __promisify__(command: string): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ command: string,
+ options: {
+ encoding: 'buffer' | null;
+ } & ExecOptions
+ ): PromiseWithChild<{
+ stdout: Buffer;
+ stderr: Buffer;
+ }>;
+ function __promisify__(
+ command: string,
+ options: {
+ encoding: BufferEncoding;
+ } & ExecOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ command: string,
+ options: ExecOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ command: string,
+ options?: (ObjectEncodingOptions & ExecOptions) | null
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ }
+ interface ExecFileOptions extends CommonOptions, Abortable {
+ maxBuffer?: number | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ shell?: boolean | string | undefined;
+ signal?: AbortSignal | undefined;
+ }
+ interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
+ encoding: 'buffer' | null;
+ }
+ interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {
+ encoding: BufferEncoding;
+ }
+ type ExecFileException =
+ & Omit<ExecException, 'code'>
+ & Omit<NodeJS.ErrnoException, 'code'>
+ & { code?: string | number | undefined | null };
+ /**
+ * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified
+ * executable `file` is spawned directly as a new process making it slightly more
+ * efficient than {@link exec}.
+ *
+ * The same options as {@link exec} are supported. Since a shell is
+ * not spawned, behaviors such as I/O redirection and file globbing are not
+ * supported.
+ *
+ * ```js
+ * const { execFile } = require('node:child_process');
+ * const child = execFile('node', ['--version'], (error, stdout, stderr) => {
+ * if (error) {
+ * throw error;
+ * }
+ * console.log(stdout);
+ * });
+ * ```
+ *
+ * The `stdout` and `stderr` arguments passed to the callback will contain the
+ * stdout and stderr output of the child process. By default, Node.js will decode
+ * the output as UTF-8 and pass strings to the callback. The `encoding` option
+ * can be used to specify the character encoding used to decode the stdout and
+ * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
+ * encoding, `Buffer` objects will be passed to the callback instead.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In
+ * case of an error (including any error resulting in an exit code other than 0), a
+ * rejected promise is returned, with the same `error` object given in the
+ * callback, but with two additional properties `stdout` and `stderr`.
+ *
+ * ```js
+ * const util = require('node:util');
+ * const execFile = util.promisify(require('node:child_process').execFile);
+ * async function getVersion() {
+ * const { stdout } = await execFile('node', ['--version']);
+ * console.log(stdout);
+ * }
+ * getVersion();
+ * ```
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * const { execFile } = require('node:child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = execFile('node', ['--version'], { signal }, (error) => {
+ * console.error(error); // an AbortError
+ * });
+ * controller.abort();
+ * ```
+ * @since v0.1.91
+ * @param file The name or path of the executable file to run.
+ * @param args List of string arguments.
+ * @param callback Called with the output when process terminates.
+ */
+ function execFile(file: string): ChildProcess;
+ function execFile(file: string, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
+ function execFile(file: string, args?: ReadonlyArray<string> | null): ChildProcess;
+ function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
+ // no `options` definitely means stdout/stderr are `string`.
+ function execFile(file: string, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(file: string, args: ReadonlyArray<string> | undefined | null, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+ function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithBufferEncoding,
+ callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void
+ ): ChildProcess;
+ // `options` with well known `encoding` means stdout/stderr are definitely `string`.
+ function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithStringEncoding,
+ callback: (error: ExecFileException | null, stdout: string, stderr: string) => void
+ ): ChildProcess;
+ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
+ // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
+ function execFile(file: string, options: ExecFileOptionsWithOtherEncoding, callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithOtherEncoding,
+ callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void
+ ): ChildProcess;
+ // `options` without an `encoding` means stdout/stderr are definitely `string`.
+ function execFile(file: string, options: ExecFileOptions, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptions,
+ callback: (error: ExecFileException | null, stdout: string, stderr: string) => void
+ ): ChildProcess;
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
+ function execFile(
+ file: string,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
+ callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null
+ ): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
+ callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null
+ ): ChildProcess;
+ namespace execFile {
+ function __promisify__(file: string): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptionsWithBufferEncoding
+ ): PromiseWithChild<{
+ stdout: Buffer;
+ stderr: Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithBufferEncoding
+ ): PromiseWithChild<{
+ stdout: Buffer;
+ stderr: Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptionsWithStringEncoding
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithStringEncoding
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptionsWithOtherEncoding
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithOtherEncoding
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ }
+ interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable {
+ execPath?: string | undefined;
+ execArgv?: string[] | undefined;
+ silent?: boolean | undefined;
+ /**
+ * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings.
+ * If passed as an array, the first element is used for `stdin`, the second for
+ * `stdout`, and the third for `stderr`. A fourth element can be used to
+ * specify the `stdio` behavior beyond the standard streams. See
+ * {@link ChildProcess.stdio} for more information.
+ *
+ * @default 'pipe'
+ */
+ stdio?: StdioOptions | undefined;
+ detached?: boolean | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ }
+ /**
+ * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes.
+ * Like {@link spawn}, a `ChildProcess` object is returned. The
+ * returned `ChildProcess` will have an additional communication channel
+ * built-in that allows messages to be passed back and forth between the parent and
+ * child. See `subprocess.send()` for details.
+ *
+ * Keep in mind that spawned Node.js child processes are
+ * independent of the parent with exception of the IPC communication channel
+ * that is established between the two. Each process has its own memory, with
+ * their own V8 instances. Because of the additional resource allocations
+ * required, spawning a large number of child Node.js processes is not
+ * recommended.
+ *
+ * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the`options` object allows for an alternative
+ * execution path to be used.
+ *
+ * Node.js processes launched with a custom `execPath` will communicate with the
+ * parent process using the file descriptor (fd) identified using the
+ * environment variable `NODE_CHANNEL_FD` on the child process.
+ *
+ * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the
+ * current process.
+ *
+ * The `shell` option available in {@link spawn} is not supported by`child_process.fork()` and will be ignored if set.
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * if (process.argv[2] === 'child') {
+ * setTimeout(() => {
+ * console.log(`Hello from ${process.argv[2]}!`);
+ * }, 1_000);
+ * } else {
+ * const { fork } = require('node:child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = fork(__filename, ['child'], { signal });
+ * child.on('error', (err) => {
+ * // This will be called with err being an AbortError if the controller aborts
+ * });
+ * controller.abort(); // Stops the child process
+ * }
+ * ```
+ * @since v0.5.0
+ * @param modulePath The module to run in the child.
+ * @param args List of string arguments.
+ */
+ function fork(modulePath: string, options?: ForkOptions): ChildProcess;
+ function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
+ interface SpawnSyncOptions extends CommonSpawnOptions {
+ input?: string | NodeJS.ArrayBufferView | undefined;
+ maxBuffer?: number | undefined;
+ encoding?: BufferEncoding | 'buffer' | null | undefined;
+ }
+ interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
+ encoding?: 'buffer' | null | undefined;
+ }
+ interface SpawnSyncReturns<T> {
+ pid: number;
+ output: Array<T | null>;
+ stdout: T;
+ stderr: T;
+ status: number | null;
+ signal: NodeJS.Signals | null;
+ error?: Error | undefined;
+ }
+ /**
+ * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return
+ * until the child process has fully closed. When a timeout has been encountered
+ * and `killSignal` is sent, the method won't return until the process has
+ * completely exited. If the process intercepts and handles the `SIGTERM` signal
+ * and doesn't exit, the parent process will wait until the child process has
+ * exited.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ * @since v0.11.12
+ * @param command The command to run.
+ * @param args List of string arguments.
+ */
+ function spawnSync(command: string): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
+ function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
+ function spawnSync(command: string, args: ReadonlyArray<string>): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, args: ReadonlyArray<string>, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
+ function spawnSync(command: string, args: ReadonlyArray<string>, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
+ interface CommonExecOptions extends CommonOptions {
+ input?: string | NodeJS.ArrayBufferView | undefined;
+ /**
+ * Can be set to 'pipe', 'inherit, or 'ignore', or an array of these strings.
+ * If passed as an array, the first element is used for `stdin`, the second for
+ * `stdout`, and the third for `stderr`. A fourth element can be used to
+ * specify the `stdio` behavior beyond the standard streams. See
+ * {@link ChildProcess.stdio} for more information.
+ *
+ * @default 'pipe'
+ */
+ stdio?: StdioOptions | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ maxBuffer?: number | undefined;
+ encoding?: BufferEncoding | 'buffer' | null | undefined;
+ }
+ interface ExecSyncOptions extends CommonExecOptions {
+ shell?: string | undefined;
+ }
+ interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
+ encoding?: 'buffer' | null | undefined;
+ }
+ /**
+ * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return
+ * until the child process has fully closed. When a timeout has been encountered
+ * and `killSignal` is sent, the method won't return until the process has
+ * completely exited. If the child process intercepts and handles the `SIGTERM`signal and doesn't exit, the parent process will wait until the child process
+ * has exited.
+ *
+ * If the process times out or has a non-zero exit code, this method will throw.
+ * The `Error` object will contain the entire result from {@link spawnSync}.
+ *
+ * **Never pass unsanitized user input to this function. Any input containing shell**
+ * **metacharacters may be used to trigger arbitrary command execution.**
+ * @since v0.11.12
+ * @param command The command to run.
+ * @return The stdout from the command.
+ */
+ function execSync(command: string): Buffer;
+ function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string;
+ function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): Buffer;
+ function execSync(command: string, options?: ExecSyncOptions): string | Buffer;
+ interface ExecFileSyncOptions extends CommonExecOptions {
+ shell?: boolean | string | undefined;
+ }
+ interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
+ encoding?: 'buffer' | null; // specify `null`.
+ }
+ /**
+ * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not
+ * return until the child process has fully closed. When a timeout has been
+ * encountered and `killSignal` is sent, the method won't return until the process
+ * has completely exited.
+ *
+ * If the child process intercepts and handles the `SIGTERM` signal and
+ * does not exit, the parent process will still wait until the child process has
+ * exited.
+ *
+ * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ * @since v0.11.12
+ * @param file The name or path of the executable file to run.
+ * @param args List of string arguments.
+ * @return The stdout from the command.
+ */
+ function execFileSync(file: string): Buffer;
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string;
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ function execFileSync(file: string, options?: ExecFileSyncOptions): string | Buffer;
+ function execFileSync(file: string, args: ReadonlyArray<string>): Buffer;
+ function execFileSync(file: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithStringEncoding): string;
+ function execFileSync(file: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ function execFileSync(file: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): string | Buffer;
+}
+declare module 'node:child_process' {
+ export * from 'child_process';
+}
diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts
new file mode 100755
index 0000000..4fa9aef
--- /dev/null
+++ b/node_modules/@types/node/cluster.d.ts
@@ -0,0 +1,414 @@
+/**
+ * Clusters of Node.js processes can be used to run multiple instances of Node.js
+ * that can distribute workloads among their application threads. When process
+ * isolation is not needed, use the `worker_threads` module instead, which
+ * allows running multiple application threads within a single Node.js instance.
+ *
+ * The cluster module allows easy creation of child processes that all share
+ * server ports.
+ *
+ * ```js
+ * import cluster from 'node:cluster';
+ * import http from 'node:http';
+ * import { availableParallelism } from 'node:os';
+ * import process from 'node:process';
+ *
+ * const numCPUs = availableParallelism();
+ *
+ * if (cluster.isPrimary) {
+ * console.log(`Primary ${process.pid} is running`);
+ *
+ * // Fork workers.
+ * for (let i = 0; i < numCPUs; i++) {
+ * cluster.fork();
+ * }
+ *
+ * cluster.on('exit', (worker, code, signal) => {
+ * console.log(`worker ${worker.process.pid} died`);
+ * });
+ * } else {
+ * // Workers can share any TCP connection
+ * // In this case it is an HTTP server
+ * http.createServer((req, res) => {
+ * res.writeHead(200);
+ * res.end('hello world\n');
+ * }).listen(8000);
+ *
+ * console.log(`Worker ${process.pid} started`);
+ * }
+ * ```
+ *
+ * Running Node.js will now share port 8000 between the workers:
+ *
+ * ```console
+ * $ node server.js
+ * Primary 3596 is running
+ * Worker 4324 started
+ * Worker 4520 started
+ * Worker 6056 started
+ * Worker 5644 started
+ * ```
+ *
+ * On Windows, it is not yet possible to set up a named pipe server in a worker.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/cluster.js)
+ */
+declare module 'cluster' {
+ import * as child from 'node:child_process';
+ import EventEmitter = require('node:events');
+ import * as net from 'node:net';
+ type SerializationType = 'json' | 'advanced';
+ export interface ClusterSettings {
+ execArgv?: string[] | undefined; // default: process.execArgv
+ exec?: string | undefined;
+ args?: string[] | undefined;
+ silent?: boolean | undefined;
+ stdio?: any[] | undefined;
+ uid?: number | undefined;
+ gid?: number | undefined;
+ inspectPort?: number | (() => number) | undefined;
+ serialization?: SerializationType | undefined;
+ cwd?: string | undefined;
+ windowsHide?: boolean | undefined;
+ }
+ export interface Address {
+ address: string;
+ port: number;
+ addressType: number | 'udp4' | 'udp6'; // 4, 6, -1, "udp4", "udp6"
+ }
+ /**
+ * A `Worker` object contains all public information and method about a worker.
+ * In the primary it can be obtained using `cluster.workers`. In a worker
+ * it can be obtained using `cluster.worker`.
+ * @since v0.7.0
+ */
+ export class Worker extends EventEmitter {
+ /**
+ * Each new worker is given its own unique id, this id is stored in the`id`.
+ *
+ * While a worker is alive, this is the key that indexes it in`cluster.workers`.
+ * @since v0.8.0
+ */
+ id: number;
+ /**
+ * All workers are created using `child_process.fork()`, the returned object
+ * from this function is stored as `.process`. In a worker, the global `process`is stored.
+ *
+ * See: `Child Process module`.
+ *
+ * Workers will call `process.exit(0)` if the `'disconnect'` event occurs
+ * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
+ * accidental disconnection.
+ * @since v0.7.0
+ */
+ process: child.ChildProcess;
+ /**
+ * Send a message to a worker or primary, optionally with a handle.
+ *
+ * In the primary, this sends a message to a specific worker. It is identical to `ChildProcess.send()`.
+ *
+ * In a worker, this sends a message to the primary. It is identical to`process.send()`.
+ *
+ * This example will echo back all messages from the primary:
+ *
+ * ```js
+ * if (cluster.isPrimary) {
+ * const worker = cluster.fork();
+ * worker.send('hi there');
+ *
+ * } else if (cluster.isWorker) {
+ * process.on('message', (msg) => {
+ * process.send(msg);
+ * });
+ * }
+ * ```
+ * @since v0.7.0
+ * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
+ */
+ send(message: child.Serializable, callback?: (error: Error | null) => void): boolean;
+ send(message: child.Serializable, sendHandle: child.SendHandle, callback?: (error: Error | null) => void): boolean;
+ send(message: child.Serializable, sendHandle: child.SendHandle, options?: child.MessageOptions, callback?: (error: Error | null) => void): boolean;
+ /**
+ * This function will kill the worker. In the primary worker, it does this by
+ * disconnecting the `worker.process`, and once disconnected, killing with`signal`. In the worker, it does it by killing the process with `signal`.
+ *
+ * The `kill()` function kills the worker process without waiting for a graceful
+ * disconnect, it has the same behavior as `worker.process.kill()`.
+ *
+ * This method is aliased as `worker.destroy()` for backwards compatibility.
+ *
+ * In a worker, `process.kill()` exists, but it is not this function;
+ * it is `kill()`.
+ * @since v0.9.12
+ * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process.
+ */
+ kill(signal?: string): void;
+ destroy(signal?: string): void;
+ /**
+ * In a worker, this function will close all servers, wait for the `'close'` event
+ * on those servers, and then disconnect the IPC channel.
+ *
+ * In the primary, an internal message is sent to the worker causing it to call`.disconnect()` on itself.
+ *
+ * Causes `.exitedAfterDisconnect` to be set.
+ *
+ * After a server is closed, it will no longer accept new connections,
+ * but connections may be accepted by any other listening worker. Existing
+ * connections will be allowed to close as usual. When no more connections exist,
+ * see `server.close()`, the IPC channel to the worker will close allowing it
+ * to die gracefully.
+ *
+ * The above applies _only_ to server connections, client connections are not
+ * automatically closed by workers, and disconnect does not wait for them to close
+ * before exiting.
+ *
+ * In a worker, `process.disconnect` exists, but it is not this function;
+ * it is `disconnect()`.
+ *
+ * Because long living server connections may block workers from disconnecting, it
+ * may be useful to send a message, so application specific actions may be taken to
+ * close them. It also may be useful to implement a timeout, killing a worker if
+ * the `'disconnect'` event has not been emitted after some time.
+ *
+ * ```js
+ * if (cluster.isPrimary) {
+ * const worker = cluster.fork();
+ * let timeout;
+ *
+ * worker.on('listening', (address) => {
+ * worker.send('shutdown');
+ * worker.disconnect();
+ * timeout = setTimeout(() => {
+ * worker.kill();
+ * }, 2000);
+ * });
+ *
+ * worker.on('disconnect', () => {
+ * clearTimeout(timeout);
+ * });
+ *
+ * } else if (cluster.isWorker) {
+ * const net = require('node:net');
+ * const server = net.createServer((socket) => {
+ * // Connections never end
+ * });
+ *
+ * server.listen(8000);
+ *
+ * process.on('message', (msg) => {
+ * if (msg === 'shutdown') {
+ * // Initiate graceful close of any connections to server
+ * }
+ * });
+ * }
+ * ```
+ * @since v0.7.7
+ * @return A reference to `worker`.
+ */
+ disconnect(): void;
+ /**
+ * This function returns `true` if the worker is connected to its primary via its
+ * IPC channel, `false` otherwise. A worker is connected to its primary after it
+ * has been created. It is disconnected after the `'disconnect'` event is emitted.
+ * @since v0.11.14
+ */
+ isConnected(): boolean;
+ /**
+ * This function returns `true` if the worker's process has terminated (either
+ * because of exiting or being signaled). Otherwise, it returns `false`.
+ *
+ * ```js
+ * import cluster from 'node:cluster';
+ * import http from 'node:http';
+ * import { availableParallelism } from 'node:os';
+ * import process from 'node:process';
+ *
+ * const numCPUs = availableParallelism();
+ *
+ * if (cluster.isPrimary) {
+ * console.log(`Primary ${process.pid} is running`);
+ *
+ * // Fork workers.
+ * for (let i = 0; i < numCPUs; i++) {
+ * cluster.fork();
+ * }
+ *
+ * cluster.on('fork', (worker) => {
+ * console.log('worker is dead:', worker.isDead());
+ * });
+ *
+ * cluster.on('exit', (worker, code, signal) => {
+ * console.log('worker is dead:', worker.isDead());
+ * });
+ * } else {
+ * // Workers can share any TCP connection. In this case, it is an HTTP server.
+ * http.createServer((req, res) => {
+ * res.writeHead(200);
+ * res.end(`Current process\n ${process.pid}`);
+ * process.kill(process.pid);
+ * }).listen(8000);
+ * }
+ * ```
+ * @since v0.11.14
+ */
+ isDead(): boolean;
+ /**
+ * This property is `true` if the worker exited due to `.disconnect()`.
+ * If the worker exited any other way, it is `false`. If the
+ * worker has not exited, it is `undefined`.
+ *
+ * The boolean `worker.exitedAfterDisconnect` allows distinguishing between
+ * voluntary and accidental exit, the primary may choose not to respawn a worker
+ * based on this value.
+ *
+ * ```js
+ * cluster.on('exit', (worker, code, signal) => {
+ * if (worker.exitedAfterDisconnect === true) {
+ * console.log('Oh, it was just voluntary – no need to worry');
+ * }
+ * });
+ *
+ * // kill worker
+ * worker.kill();
+ * ```
+ * @since v6.0.0
+ */
+ exitedAfterDisconnect: boolean;
+ /**
+ * events.EventEmitter
+ * 1. disconnect
+ * 2. error
+ * 3. exit
+ * 4. listening
+ * 5. message
+ * 6. online
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'disconnect', listener: () => void): this;
+ addListener(event: 'error', listener: (error: Error) => void): this;
+ addListener(event: 'exit', listener: (code: number, signal: string) => void): this;
+ addListener(event: 'listening', listener: (address: Address) => void): this;
+ addListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ addListener(event: 'online', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'disconnect'): boolean;
+ emit(event: 'error', error: Error): boolean;
+ emit(event: 'exit', code: number, signal: string): boolean;
+ emit(event: 'listening', address: Address): boolean;
+ emit(event: 'message', message: any, handle: net.Socket | net.Server): boolean;
+ emit(event: 'online'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'disconnect', listener: () => void): this;
+ on(event: 'error', listener: (error: Error) => void): this;
+ on(event: 'exit', listener: (code: number, signal: string) => void): this;
+ on(event: 'listening', listener: (address: Address) => void): this;
+ on(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ on(event: 'online', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'disconnect', listener: () => void): this;
+ once(event: 'error', listener: (error: Error) => void): this;
+ once(event: 'exit', listener: (code: number, signal: string) => void): this;
+ once(event: 'listening', listener: (address: Address) => void): this;
+ once(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ once(event: 'online', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'disconnect', listener: () => void): this;
+ prependListener(event: 'error', listener: (error: Error) => void): this;
+ prependListener(event: 'exit', listener: (code: number, signal: string) => void): this;
+ prependListener(event: 'listening', listener: (address: Address) => void): this;
+ prependListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ prependListener(event: 'online', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'disconnect', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (error: Error) => void): this;
+ prependOnceListener(event: 'exit', listener: (code: number, signal: string) => void): this;
+ prependOnceListener(event: 'listening', listener: (address: Address) => void): this;
+ prependOnceListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ prependOnceListener(event: 'online', listener: () => void): this;
+ }
+ export interface Cluster extends EventEmitter {
+ disconnect(callback?: () => void): void;
+ fork(env?: any): Worker;
+ /** @deprecated since v16.0.0 - use isPrimary. */
+ readonly isMaster: boolean;
+ readonly isPrimary: boolean;
+ readonly isWorker: boolean;
+ schedulingPolicy: number;
+ readonly settings: ClusterSettings;
+ /** @deprecated since v16.0.0 - use setupPrimary. */
+ setupMaster(settings?: ClusterSettings): void;
+ /**
+ * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in cluster.settings.
+ */
+ setupPrimary(settings?: ClusterSettings): void;
+ readonly worker?: Worker | undefined;
+ readonly workers?: NodeJS.Dict<Worker> | undefined;
+ readonly SCHED_NONE: number;
+ readonly SCHED_RR: number;
+ /**
+ * events.EventEmitter
+ * 1. disconnect
+ * 2. exit
+ * 3. fork
+ * 4. listening
+ * 5. message
+ * 6. online
+ * 7. setup
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'disconnect', listener: (worker: Worker) => void): this;
+ addListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ addListener(event: 'fork', listener: (worker: Worker) => void): this;
+ addListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ addListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ addListener(event: 'online', listener: (worker: Worker) => void): this;
+ addListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'disconnect', worker: Worker): boolean;
+ emit(event: 'exit', worker: Worker, code: number, signal: string): boolean;
+ emit(event: 'fork', worker: Worker): boolean;
+ emit(event: 'listening', worker: Worker, address: Address): boolean;
+ emit(event: 'message', worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
+ emit(event: 'online', worker: Worker): boolean;
+ emit(event: 'setup', settings: ClusterSettings): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'disconnect', listener: (worker: Worker) => void): this;
+ on(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ on(event: 'fork', listener: (worker: Worker) => void): this;
+ on(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ on(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ on(event: 'online', listener: (worker: Worker) => void): this;
+ on(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'disconnect', listener: (worker: Worker) => void): this;
+ once(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ once(event: 'fork', listener: (worker: Worker) => void): this;
+ once(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ once(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ once(event: 'online', listener: (worker: Worker) => void): this;
+ once(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'disconnect', listener: (worker: Worker) => void): this;
+ prependListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ prependListener(event: 'fork', listener: (worker: Worker) => void): this;
+ prependListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ prependListener(event: 'message', listener: (worker: Worker, message: any, handle?: net.Socket | net.Server) => void): this;
+ prependListener(event: 'online', listener: (worker: Worker) => void): this;
+ prependListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'disconnect', listener: (worker: Worker) => void): this;
+ prependOnceListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ prependOnceListener(event: 'fork', listener: (worker: Worker) => void): this;
+ prependOnceListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ prependOnceListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;
+ prependOnceListener(event: 'online', listener: (worker: Worker) => void): this;
+ prependOnceListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ }
+ const cluster: Cluster;
+ export default cluster;
+}
+declare module 'node:cluster' {
+ export * from 'cluster';
+ export { default as default } from 'cluster';
+}
diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts
new file mode 100755
index 0000000..7e35638
--- /dev/null
+++ b/node_modules/@types/node/console.d.ts
@@ -0,0 +1,412 @@
+/**
+ * The `node:console` module provides a simple debugging console that is similar to
+ * the JavaScript console mechanism provided by web browsers.
+ *
+ * The module exports two specific components:
+ *
+ * * A `Console` class with methods such as `console.log()`, `console.error()`, and`console.warn()` that can be used to write to any Node.js stream.
+ * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('node:console')`.
+ *
+ * _**Warning**_: The global console object's methods are neither consistently
+ * synchronous like the browser APIs they resemble, nor are they consistently
+ * asynchronous like all other Node.js streams. See the `note on process I/O` for
+ * more information.
+ *
+ * Example using the global `console`:
+ *
+ * ```js
+ * console.log('hello world');
+ * // Prints: hello world, to stdout
+ * console.log('hello %s', 'world');
+ * // Prints: hello world, to stdout
+ * console.error(new Error('Whoops, something bad happened'));
+ * // Prints error message and stack trace to stderr:
+ * // Error: Whoops, something bad happened
+ * // at [eval]:5:15
+ * // at Script.runInThisContext (node:vm:132:18)
+ * // at Object.runInThisContext (node:vm:309:38)
+ * // at node:internal/process/execution:77:19
+ * // at [eval]-wrapper:6:22
+ * // at evalScript (node:internal/process/execution:76:60)
+ * // at node:internal/main/eval_string:23:3
+ *
+ * const name = 'Will Robinson';
+ * console.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to stderr
+ * ```
+ *
+ * Example using the `Console` class:
+ *
+ * ```js
+ * const out = getStreamSomehow();
+ * const err = getStreamSomehow();
+ * const myConsole = new console.Console(out, err);
+ *
+ * myConsole.log('hello world');
+ * // Prints: hello world, to out
+ * myConsole.log('hello %s', 'world');
+ * // Prints: hello world, to out
+ * myConsole.error(new Error('Whoops, something bad happened'));
+ * // Prints: [Error: Whoops, something bad happened], to err
+ *
+ * const name = 'Will Robinson';
+ * myConsole.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to err
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/console.js)
+ */
+declare module 'console' {
+ import console = require('node:console');
+ export = console;
+}
+declare module 'node:console' {
+ import { InspectOptions } from 'node:util';
+ global {
+ // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
+ interface Console {
+ Console: console.ConsoleConstructor;
+ /**
+ * `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only
+ * writes a message and does not otherwise affect execution. The output always
+ * starts with `"Assertion failed"`. If provided, `message` is formatted using `util.format()`.
+ *
+ * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens.
+ *
+ * ```js
+ * console.assert(true, 'does nothing');
+ *
+ * console.assert(false, 'Whoops %s work', 'didn\'t');
+ * // Assertion failed: Whoops didn't work
+ *
+ * console.assert();
+ * // Assertion failed
+ * ```
+ * @since v0.1.101
+ * @param value The value tested for being truthy.
+ * @param message All arguments besides `value` are used as error message.
+ */
+ assert(value: any, message?: string, ...optionalParams: any[]): void;
+ /**
+ * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the
+ * TTY. When `stdout` is not a TTY, this method does nothing.
+ *
+ * The specific operation of `console.clear()` can vary across operating systems
+ * and terminal types. For most Linux operating systems, `console.clear()`operates similarly to the `clear` shell command. On Windows, `console.clear()`will clear only the output in the
+ * current terminal viewport for the Node.js
+ * binary.
+ * @since v8.3.0
+ */
+ clear(): void;
+ /**
+ * Maintains an internal counter specific to `label` and outputs to `stdout` the
+ * number of times `console.count()` has been called with the given `label`.
+ *
+ * ```js
+ * > console.count()
+ * default: 1
+ * undefined
+ * > console.count('default')
+ * default: 2
+ * undefined
+ * > console.count('abc')
+ * abc: 1
+ * undefined
+ * > console.count('xyz')
+ * xyz: 1
+ * undefined
+ * > console.count('abc')
+ * abc: 2
+ * undefined
+ * > console.count()
+ * default: 3
+ * undefined
+ * >
+ * ```
+ * @since v8.3.0
+ * @param label The display label for the counter.
+ */
+ count(label?: string): void;
+ /**
+ * Resets the internal counter specific to `label`.
+ *
+ * ```js
+ * > console.count('abc');
+ * abc: 1
+ * undefined
+ * > console.countReset('abc');
+ * undefined
+ * > console.count('abc');
+ * abc: 1
+ * undefined
+ * >
+ * ```
+ * @since v8.3.0
+ * @param label The display label for the counter.
+ */
+ countReset(label?: string): void;
+ /**
+ * The `console.debug()` function is an alias for {@link log}.
+ * @since v8.0.0
+ */
+ debug(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Uses `util.inspect()` on `obj` and prints the resulting string to `stdout`.
+ * This function bypasses any custom `inspect()` function defined on `obj`.
+ * @since v0.1.101
+ */
+ dir(obj: any, options?: InspectOptions): void;
+ /**
+ * This method calls `console.log()` passing it the arguments received.
+ * This method does not produce any XML formatting.
+ * @since v8.0.0
+ */
+ dirxml(...data: any[]): void;
+ /**
+ * Prints to `stderr` with newline. Multiple arguments can be passed, with the
+ * first used as the primary message and all additional used as substitution
+ * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`).
+ *
+ * ```js
+ * const code = 5;
+ * console.error('error #%d', code);
+ * // Prints: error #5, to stderr
+ * console.error('error', code);
+ * // Prints: error 5, to stderr
+ * ```
+ *
+ * If formatting elements (e.g. `%d`) are not found in the first string then `util.inspect()` is called on each argument and the resulting string
+ * values are concatenated. See `util.format()` for more information.
+ * @since v0.1.100
+ */
+ error(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Increases indentation of subsequent lines by spaces for `groupIndentation`length.
+ *
+ * If one or more `label`s are provided, those are printed first without the
+ * additional indentation.
+ * @since v8.5.0
+ */
+ group(...label: any[]): void;
+ /**
+ * An alias for {@link group}.
+ * @since v8.5.0
+ */
+ groupCollapsed(...label: any[]): void;
+ /**
+ * Decreases indentation of subsequent lines by spaces for `groupIndentation`length.
+ * @since v8.5.0
+ */
+ groupEnd(): void;
+ /**
+ * The `console.info()` function is an alias for {@link log}.
+ * @since v0.1.100
+ */
+ info(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Prints to `stdout` with newline. Multiple arguments can be passed, with the
+ * first used as the primary message and all additional used as substitution
+ * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`).
+ *
+ * ```js
+ * const count = 5;
+ * console.log('count: %d', count);
+ * // Prints: count: 5, to stdout
+ * console.log('count:', count);
+ * // Prints: count: 5, to stdout
+ * ```
+ *
+ * See `util.format()` for more information.
+ * @since v0.1.100
+ */
+ log(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Try to construct a table with the columns of the properties of `tabularData`(or use `properties`) and rows of `tabularData` and log it. Falls back to just
+ * logging the argument if it can’t be parsed as tabular.
+ *
+ * ```js
+ * // These can't be parsed as tabular data
+ * console.table(Symbol());
+ * // Symbol()
+ *
+ * console.table(undefined);
+ * // undefined
+ *
+ * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]);
+ * // ┌─────────┬─────┬─────┐
+ * // │ (index) │ a │ b │
+ * // ├─────────┼─────┼─────┤
+ * // │ 0 │ 1 │ 'Y' │
+ * // │ 1 │ 'Z' │ 2 │
+ * // └─────────┴─────┴─────┘
+ *
+ * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
+ * // ┌─────────┬─────┐
+ * // │ (index) │ a │
+ * // ├─────────┼─────┤
+ * // │ 0 │ 1 │
+ * // │ 1 │ 'Z' │
+ * // └─────────┴─────┘
+ * ```
+ * @since v10.0.0
+ * @param properties Alternate properties for constructing the table.
+ */
+ table(tabularData: any, properties?: ReadonlyArray<string>): void;
+ /**
+ * Starts a timer that can be used to compute the duration of an operation. Timers
+ * are identified by a unique `label`. Use the same `label` when calling {@link timeEnd} to stop the timer and output the elapsed time in
+ * suitable time units to `stdout`. For example, if the elapsed
+ * time is 3869ms, `console.timeEnd()` displays "3.869s".
+ * @since v0.1.104
+ */
+ time(label?: string): void;
+ /**
+ * Stops a timer that was previously started by calling {@link time} and
+ * prints the result to `stdout`:
+ *
+ * ```js
+ * console.time('100-elements');
+ * for (let i = 0; i < 100; i++) {}
+ * console.timeEnd('100-elements');
+ * // prints 100-elements: 225.438ms
+ * ```
+ * @since v0.1.104
+ */
+ timeEnd(label?: string): void;
+ /**
+ * For a timer that was previously started by calling {@link time}, prints
+ * the elapsed time and other `data` arguments to `stdout`:
+ *
+ * ```js
+ * console.time('process');
+ * const value = expensiveProcess1(); // Returns 42
+ * console.timeLog('process', value);
+ * // Prints "process: 365.227ms 42".
+ * doExpensiveProcess2(value);
+ * console.timeEnd('process');
+ * ```
+ * @since v10.7.0
+ */
+ timeLog(label?: string, ...data: any[]): void;
+ /**
+ * Prints to `stderr` the string `'Trace: '`, followed by the `util.format()` formatted message and stack trace to the current position in the code.
+ *
+ * ```js
+ * console.trace('Show me');
+ * // Prints: (stack trace will vary based on where trace is called)
+ * // Trace: Show me
+ * // at repl:2:9
+ * // at REPLServer.defaultEval (repl.js:248:27)
+ * // at bound (domain.js:287:14)
+ * // at REPLServer.runBound [as eval] (domain.js:300:12)
+ * // at REPLServer.<anonymous> (repl.js:412:12)
+ * // at emitOne (events.js:82:20)
+ * // at REPLServer.emit (events.js:169:7)
+ * // at REPLServer.Interface._onLine (readline.js:210:10)
+ * // at REPLServer.Interface._line (readline.js:549:8)
+ * // at REPLServer.Interface._ttyWrite (readline.js:826:14)
+ * ```
+ * @since v0.1.104
+ */
+ trace(message?: any, ...optionalParams: any[]): void;
+ /**
+ * The `console.warn()` function is an alias for {@link error}.
+ * @since v0.1.100
+ */
+ warn(message?: any, ...optionalParams: any[]): void;
+ // --- Inspector mode only ---
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Starts a JavaScript CPU profile with an optional label.
+ */
+ profile(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector.
+ */
+ profileEnd(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Adds an event with the label `label` to the Timeline panel of the inspector.
+ */
+ timeStamp(label?: string): void;
+ }
+ /**
+ * The `console` module provides a simple debugging console that is similar to the
+ * JavaScript console mechanism provided by web browsers.
+ *
+ * The module exports two specific components:
+ *
+ * * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream.
+ * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`.
+ *
+ * _**Warning**_: The global console object's methods are neither consistently
+ * synchronous like the browser APIs they resemble, nor are they consistently
+ * asynchronous like all other Node.js streams. See the `note on process I/O` for
+ * more information.
+ *
+ * Example using the global `console`:
+ *
+ * ```js
+ * console.log('hello world');
+ * // Prints: hello world, to stdout
+ * console.log('hello %s', 'world');
+ * // Prints: hello world, to stdout
+ * console.error(new Error('Whoops, something bad happened'));
+ * // Prints error message and stack trace to stderr:
+ * // Error: Whoops, something bad happened
+ * // at [eval]:5:15
+ * // at Script.runInThisContext (node:vm:132:18)
+ * // at Object.runInThisContext (node:vm:309:38)
+ * // at node:internal/process/execution:77:19
+ * // at [eval]-wrapper:6:22
+ * // at evalScript (node:internal/process/execution:76:60)
+ * // at node:internal/main/eval_string:23:3
+ *
+ * const name = 'Will Robinson';
+ * console.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to stderr
+ * ```
+ *
+ * Example using the `Console` class:
+ *
+ * ```js
+ * const out = getStreamSomehow();
+ * const err = getStreamSomehow();
+ * const myConsole = new console.Console(out, err);
+ *
+ * myConsole.log('hello world');
+ * // Prints: hello world, to out
+ * myConsole.log('hello %s', 'world');
+ * // Prints: hello world, to out
+ * myConsole.error(new Error('Whoops, something bad happened'));
+ * // Prints: [Error: Whoops, something bad happened], to err
+ *
+ * const name = 'Will Robinson';
+ * myConsole.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to err
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v16.4.2/lib/console.js)
+ */
+ namespace console {
+ interface ConsoleConstructorOptions {
+ stdout: NodeJS.WritableStream;
+ stderr?: NodeJS.WritableStream | undefined;
+ ignoreErrors?: boolean | undefined;
+ colorMode?: boolean | 'auto' | undefined;
+ inspectOptions?: InspectOptions | undefined;
+ /**
+ * Set group indentation
+ * @default 2
+ */
+ groupIndentation?: number | undefined;
+ }
+ interface ConsoleConstructor {
+ prototype: Console;
+ new (stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console;
+ new (options: ConsoleConstructorOptions): Console;
+ }
+ }
+ var console: Console;
+ }
+ export = globalThis.console;
+}
diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts
new file mode 100755
index 0000000..208020d
--- /dev/null
+++ b/node_modules/@types/node/constants.d.ts
@@ -0,0 +1,18 @@
+/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
+declare module 'constants' {
+ import { constants as osConstants, SignalConstants } from 'node:os';
+ import { constants as cryptoConstants } from 'node:crypto';
+ import { constants as fsConstants } from 'node:fs';
+
+ const exp: typeof osConstants.errno &
+ typeof osConstants.priority &
+ SignalConstants &
+ typeof cryptoConstants &
+ typeof fsConstants;
+ export = exp;
+}
+
+declare module 'node:constants' {
+ import constants = require('constants');
+ export = constants;
+}
diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts
new file mode 100755
index 0000000..9018464
--- /dev/null
+++ b/node_modules/@types/node/crypto.d.ts
@@ -0,0 +1,3978 @@
+/**
+ * The `node:crypto` module provides cryptographic functionality that includes a
+ * set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify
+ * functions.
+ *
+ * ```js
+ * const { createHmac } = await import('node:crypto');
+ *
+ * const secret = 'abcdefg';
+ * const hash = createHmac('sha256', secret)
+ * .update('I love cupcakes')
+ * .digest('hex');
+ * console.log(hash);
+ * // Prints:
+ * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/crypto.js)
+ */
+declare module 'crypto' {
+ import * as stream from 'node:stream';
+ import { PeerCertificate } from 'node:tls';
+ /**
+ * SPKAC is a Certificate Signing Request mechanism originally implemented by
+ * Netscape and was specified formally as part of HTML5's `keygen` element.
+ *
+ * `<keygen>` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects
+ * should not use this element anymore.
+ *
+ * The `node:crypto` module provides the `Certificate` class for working with SPKAC
+ * data. The most common usage is handling output generated by the HTML5`<keygen>` element. Node.js uses [OpenSSL's SPKAC
+ * implementation](https://www.openssl.org/docs/man3.0/man1/openssl-spkac.html) internally.
+ * @since v0.11.8
+ */
+ class Certificate {
+ /**
+ * ```js
+ * const { Certificate } = await import('node:crypto');
+ * const spkac = getSpkacSomehow();
+ * const challenge = Certificate.exportChallenge(spkac);
+ * console.log(challenge.toString('utf8'));
+ * // Prints: the challenge as a UTF8 string
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge.
+ */
+ static exportChallenge(spkac: BinaryLike): Buffer;
+ /**
+ * ```js
+ * const { Certificate } = await import('node:crypto');
+ * const spkac = getSpkacSomehow();
+ * const publicKey = Certificate.exportPublicKey(spkac);
+ * console.log(publicKey);
+ * // Prints: the public key as <Buffer ...>
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return The public key component of the `spkac` data structure, which includes a public key and a challenge.
+ */
+ static exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
+ /**
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const { Certificate } = await import('node:crypto');
+ *
+ * const spkac = getSpkacSomehow();
+ * console.log(Certificate.verifySpkac(Buffer.from(spkac)));
+ * // Prints: true or false
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return `true` if the given `spkac` data structure is valid, `false` otherwise.
+ */
+ static verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
+ /**
+ * @deprecated
+ * @param spkac
+ * @returns The challenge component of the `spkac` data structure,
+ * which includes a public key and a challenge.
+ */
+ exportChallenge(spkac: BinaryLike): Buffer;
+ /**
+ * @deprecated
+ * @param spkac
+ * @param encoding The encoding of the spkac string.
+ * @returns The public key component of the `spkac` data structure,
+ * which includes a public key and a challenge.
+ */
+ exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
+ /**
+ * @deprecated
+ * @param spkac
+ * @returns `true` if the given `spkac` data structure is valid,
+ * `false` otherwise.
+ */
+ verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
+ }
+ namespace constants {
+ // https://nodejs.org/dist/latest-v20.x/docs/api/crypto.html#crypto-constants
+ const OPENSSL_VERSION_NUMBER: number;
+ /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
+ const SSL_OP_ALL: number;
+ /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
+ const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
+ /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
+ const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
+ /** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */
+ const SSL_OP_CISCO_ANYCONNECT: number;
+ /** Instructs OpenSSL to turn on cookie exchange. */
+ const SSL_OP_COOKIE_EXCHANGE: number;
+ /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */
+ const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
+ /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */
+ const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
+ /** Allows initial connection to servers that do not support RI. */
+ const SSL_OP_LEGACY_SERVER_CONNECT: number;
+ /** Instructs OpenSSL to disable support for SSL/TLS compression. */
+ const SSL_OP_NO_COMPRESSION: number;
+ const SSL_OP_NO_QUERY_MTU: number;
+ /** Instructs OpenSSL to always start a new session when performing renegotiation. */
+ const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
+ const SSL_OP_NO_SSLv2: number;
+ const SSL_OP_NO_SSLv3: number;
+ const SSL_OP_NO_TICKET: number;
+ const SSL_OP_NO_TLSv1: number;
+ const SSL_OP_NO_TLSv1_1: number;
+ const SSL_OP_NO_TLSv1_2: number;
+ /** Instructs OpenSSL to disable version rollback attack detection. */
+ const SSL_OP_TLS_ROLLBACK_BUG: number;
+ const ENGINE_METHOD_RSA: number;
+ const ENGINE_METHOD_DSA: number;
+ const ENGINE_METHOD_DH: number;
+ const ENGINE_METHOD_RAND: number;
+ const ENGINE_METHOD_EC: number;
+ const ENGINE_METHOD_CIPHERS: number;
+ const ENGINE_METHOD_DIGESTS: number;
+ const ENGINE_METHOD_PKEY_METHS: number;
+ const ENGINE_METHOD_PKEY_ASN1_METHS: number;
+ const ENGINE_METHOD_ALL: number;
+ const ENGINE_METHOD_NONE: number;
+ const DH_CHECK_P_NOT_SAFE_PRIME: number;
+ const DH_CHECK_P_NOT_PRIME: number;
+ const DH_UNABLE_TO_CHECK_GENERATOR: number;
+ const DH_NOT_SUITABLE_GENERATOR: number;
+ const RSA_PKCS1_PADDING: number;
+ const RSA_SSLV23_PADDING: number;
+ const RSA_NO_PADDING: number;
+ const RSA_PKCS1_OAEP_PADDING: number;
+ const RSA_X931_PADDING: number;
+ const RSA_PKCS1_PSS_PADDING: number;
+ /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */
+ const RSA_PSS_SALTLEN_DIGEST: number;
+ /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */
+ const RSA_PSS_SALTLEN_MAX_SIGN: number;
+ /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */
+ const RSA_PSS_SALTLEN_AUTO: number;
+ const POINT_CONVERSION_COMPRESSED: number;
+ const POINT_CONVERSION_UNCOMPRESSED: number;
+ const POINT_CONVERSION_HYBRID: number;
+ /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */
+ const defaultCoreCipherList: string;
+ /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */
+ const defaultCipherList: string;
+ }
+ interface HashOptions extends stream.TransformOptions {
+ /**
+ * For XOF hash functions such as `shake256`, the
+ * outputLength option can be used to specify the desired output length in bytes.
+ */
+ outputLength?: number | undefined;
+ }
+ /** @deprecated since v10.0.0 */
+ const fips: boolean;
+ /**
+ * Creates and returns a `Hash` object that can be used to generate hash digests
+ * using the given `algorithm`. Optional `options` argument controls stream
+ * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option
+ * can be used to specify the desired output length in bytes.
+ *
+ * The `algorithm` is dependent on the available algorithms supported by the
+ * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
+ * On recent releases of OpenSSL, `openssl list -digest-algorithms` will
+ * display the available digest algorithms.
+ *
+ * Example: generating the sha256 sum of a file
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * } from 'node:fs';
+ * import { argv } from 'node:process';
+ * const {
+ * createHash,
+ * } = await import('node:crypto');
+ *
+ * const filename = argv[2];
+ *
+ * const hash = createHash('sha256');
+ *
+ * const input = createReadStream(filename);
+ * input.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = input.read();
+ * if (data)
+ * hash.update(data);
+ * else {
+ * console.log(`${hash.digest('hex')} ${filename}`);
+ * }
+ * });
+ * ```
+ * @since v0.1.92
+ * @param options `stream.transform` options
+ */
+ function createHash(algorithm: string, options?: HashOptions): Hash;
+ /**
+ * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`.
+ * Optional `options` argument controls stream behavior.
+ *
+ * The `algorithm` is dependent on the available algorithms supported by the
+ * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
+ * On recent releases of OpenSSL, `openssl list -digest-algorithms` will
+ * display the available digest algorithms.
+ *
+ * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is
+ * a `KeyObject`, its type must be `secret`. If it is a string, please consider `caveats when using strings as inputs to cryptographic APIs`. If it was
+ * obtained from a cryptographically secure source of entropy, such as {@link randomBytes} or {@link generateKey}, its length should not
+ * exceed the block size of `algorithm` (e.g., 512 bits for SHA-256).
+ *
+ * Example: generating the sha256 HMAC of a file
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * } from 'node:fs';
+ * import { argv } from 'node:process';
+ * const {
+ * createHmac,
+ * } = await import('node:crypto');
+ *
+ * const filename = argv[2];
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * const input = createReadStream(filename);
+ * input.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = input.read();
+ * if (data)
+ * hmac.update(data);
+ * else {
+ * console.log(`${hmac.digest('hex')} ${filename}`);
+ * }
+ * });
+ * ```
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
+ // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
+ type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex' | 'binary';
+ type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
+ type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
+ type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
+ type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid';
+ /**
+ * The `Hash` class is a utility for creating hash digests of data. It can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where data is written
+ * to produce a computed hash digest on the readable side, or
+ * * Using the `hash.update()` and `hash.digest()` methods to produce the
+ * computed hash.
+ *
+ * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword.
+ *
+ * Example: Using `Hash` objects as streams:
+ *
+ * ```js
+ * const {
+ * createHash,
+ * } = await import('node:crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = hash.read();
+ * if (data) {
+ * console.log(data.toString('hex'));
+ * // Prints:
+ * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
+ * }
+ * });
+ *
+ * hash.write('some data to hash');
+ * hash.end();
+ * ```
+ *
+ * Example: Using `Hash` and piped streams:
+ *
+ * ```js
+ * import { createReadStream } from 'node:fs';
+ * import { stdout } from 'node:process';
+ * const { createHash } = await import('node:crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * const input = createReadStream('test.js');
+ * input.pipe(hash).setEncoding('hex').pipe(stdout);
+ * ```
+ *
+ * Example: Using the `hash.update()` and `hash.digest()` methods:
+ *
+ * ```js
+ * const {
+ * createHash,
+ * } = await import('node:crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.update('some data to hash');
+ * console.log(hash.digest('hex'));
+ * // Prints:
+ * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
+ * ```
+ * @since v0.1.92
+ */
+ class Hash extends stream.Transform {
+ private constructor();
+ /**
+ * Creates a new `Hash` object that contains a deep copy of the internal state
+ * of the current `Hash` object.
+ *
+ * The optional `options` argument controls stream behavior. For XOF hash
+ * functions such as `'shake256'`, the `outputLength` option can be used to
+ * specify the desired output length in bytes.
+ *
+ * An error is thrown when an attempt is made to copy the `Hash` object after
+ * its `hash.digest()` method has been called.
+ *
+ * ```js
+ * // Calculate a rolling hash.
+ * const {
+ * createHash,
+ * } = await import('node:crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.update('one');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * hash.update('two');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * hash.update('three');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * // Etc.
+ * ```
+ * @since v13.1.0
+ * @param options `stream.transform` options
+ */
+ copy(options?: stream.TransformOptions): Hash;
+ /**
+ * Updates the hash content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Hash;
+ update(data: string, inputEncoding: Encoding): Hash;
+ /**
+ * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method).
+ * If `encoding` is provided a string will be returned; otherwise
+ * a `Buffer` is returned.
+ *
+ * The `Hash` object can not be used again after `hash.digest()` method has been
+ * called. Multiple calls will cause an error to be thrown.
+ * @since v0.1.92
+ * @param encoding The `encoding` of the return value.
+ */
+ digest(): Buffer;
+ digest(encoding: BinaryToTextEncoding): string;
+ }
+ /**
+ * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can
+ * be used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where data is written
+ * to produce a computed HMAC digest on the readable side, or
+ * * Using the `hmac.update()` and `hmac.digest()` methods to produce the
+ * computed HMAC digest.
+ *
+ * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword.
+ *
+ * Example: Using `Hmac` objects as streams:
+ *
+ * ```js
+ * const {
+ * createHmac,
+ * } = await import('node:crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * hmac.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = hmac.read();
+ * if (data) {
+ * console.log(data.toString('hex'));
+ * // Prints:
+ * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
+ * }
+ * });
+ *
+ * hmac.write('some data to hash');
+ * hmac.end();
+ * ```
+ *
+ * Example: Using `Hmac` and piped streams:
+ *
+ * ```js
+ * import { createReadStream } from 'node:fs';
+ * import { stdout } from 'node:process';
+ * const {
+ * createHmac,
+ * } = await import('node:crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * const input = createReadStream('test.js');
+ * input.pipe(hmac).pipe(stdout);
+ * ```
+ *
+ * Example: Using the `hmac.update()` and `hmac.digest()` methods:
+ *
+ * ```js
+ * const {
+ * createHmac,
+ * } = await import('node:crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * hmac.update('some data to hash');
+ * console.log(hmac.digest('hex'));
+ * // Prints:
+ * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
+ * ```
+ * @since v0.1.94
+ */
+ class Hmac extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the `Hmac` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Hmac;
+ update(data: string, inputEncoding: Encoding): Hmac;
+ /**
+ * Calculates the HMAC digest of all of the data passed using `hmac.update()`.
+ * If `encoding` is
+ * provided a string is returned; otherwise a `Buffer` is returned;
+ *
+ * The `Hmac` object can not be used again after `hmac.digest()` has been
+ * called. Multiple calls to `hmac.digest()` will result in an error being thrown.
+ * @since v0.1.94
+ * @param encoding The `encoding` of the return value.
+ */
+ digest(): Buffer;
+ digest(encoding: BinaryToTextEncoding): string;
+ }
+ type KeyObjectType = 'secret' | 'public' | 'private';
+ interface KeyExportOptions<T extends KeyFormat> {
+ type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
+ format: T;
+ cipher?: string | undefined;
+ passphrase?: string | Buffer | undefined;
+ }
+ interface JwkKeyExportOptions {
+ format: 'jwk';
+ }
+ interface JsonWebKey {
+ crv?: string | undefined;
+ d?: string | undefined;
+ dp?: string | undefined;
+ dq?: string | undefined;
+ e?: string | undefined;
+ k?: string | undefined;
+ kty?: string | undefined;
+ n?: string | undefined;
+ p?: string | undefined;
+ q?: string | undefined;
+ qi?: string | undefined;
+ x?: string | undefined;
+ y?: string | undefined;
+ [key: string]: unknown;
+ }
+ interface AsymmetricKeyDetails {
+ /**
+ * Key size in bits (RSA, DSA).
+ */
+ modulusLength?: number | undefined;
+ /**
+ * Public exponent (RSA).
+ */
+ publicExponent?: bigint | undefined;
+ /**
+ * Name of the message digest (RSA-PSS).
+ */
+ hashAlgorithm?: string | undefined;
+ /**
+ * Name of the message digest used by MGF1 (RSA-PSS).
+ */
+ mgf1HashAlgorithm?: string | undefined;
+ /**
+ * Minimal salt length in bytes (RSA-PSS).
+ */
+ saltLength?: number | undefined;
+ /**
+ * Size of q in bits (DSA).
+ */
+ divisorLength?: number | undefined;
+ /**
+ * Name of the curve (EC).
+ */
+ namedCurve?: string | undefined;
+ }
+ /**
+ * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key,
+ * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject`
+ * objects are not to be created directly using the `new`keyword.
+ *
+ * Most applications should consider using the new `KeyObject` API instead of
+ * passing keys as strings or `Buffer`s due to improved security features.
+ *
+ * `KeyObject` instances can be passed to other threads via `postMessage()`.
+ * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to
+ * be listed in the `transferList` argument.
+ * @since v11.6.0
+ */
+ class KeyObject {
+ private constructor();
+ /**
+ * Example: Converting a `CryptoKey` instance to a `KeyObject`:
+ *
+ * ```js
+ * const { KeyObject } = await import('node:crypto');
+ * const { subtle } = globalThis.crypto;
+ *
+ * const key = await subtle.generateKey({
+ * name: 'HMAC',
+ * hash: 'SHA-256',
+ * length: 256,
+ * }, true, ['sign', 'verify']);
+ *
+ * const keyObject = KeyObject.from(key);
+ * console.log(keyObject.symmetricKeySize);
+ * // Prints: 32 (symmetric key size in bytes)
+ * ```
+ * @since v15.0.0
+ */
+ static from(key: webcrypto.CryptoKey): KeyObject;
+ /**
+ * For asymmetric keys, this property represents the type of the key. Supported key
+ * types are:
+ *
+ * * `'rsa'` (OID 1.2.840.113549.1.1.1)
+ * * `'rsa-pss'` (OID 1.2.840.113549.1.1.10)
+ * * `'dsa'` (OID 1.2.840.10040.4.1)
+ * * `'ec'` (OID 1.2.840.10045.2.1)
+ * * `'x25519'` (OID 1.3.101.110)
+ * * `'x448'` (OID 1.3.101.111)
+ * * `'ed25519'` (OID 1.3.101.112)
+ * * `'ed448'` (OID 1.3.101.113)
+ * * `'dh'` (OID 1.2.840.113549.1.3.1)
+ *
+ * This property is `undefined` for unrecognized `KeyObject` types and symmetric
+ * keys.
+ * @since v11.6.0
+ */
+ asymmetricKeyType?: KeyType | undefined;
+ /**
+ * For asymmetric keys, this property represents the size of the embedded key in
+ * bytes. This property is `undefined` for symmetric keys.
+ */
+ asymmetricKeySize?: number | undefined;
+ /**
+ * This property exists only on asymmetric keys. Depending on the type of the key,
+ * this object contains information about the key. None of the information obtained
+ * through this property can be used to uniquely identify a key or to compromise
+ * the security of the key.
+ *
+ * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence,
+ * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be
+ * set.
+ *
+ * Other key details might be exposed via this API using additional attributes.
+ * @since v15.7.0
+ */
+ asymmetricKeyDetails?: AsymmetricKeyDetails | undefined;
+ /**
+ * For symmetric keys, the following encoding options can be used:
+ *
+ * For public keys, the following encoding options can be used:
+ *
+ * For private keys, the following encoding options can be used:
+ *
+ * The result type depends on the selected encoding format, when PEM the
+ * result is a string, when DER it will be a buffer containing the data
+ * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object.
+ *
+ * When [JWK](https://tools.ietf.org/html/rfc7517) encoding format was selected, all other encoding options are
+ * ignored.
+ *
+ * PKCS#1, SEC1, and PKCS#8 type keys can be encrypted by using a combination of
+ * the `cipher` and `format` options. The PKCS#8 `type` can be used with any`format` to encrypt any key algorithm (RSA, EC, or DH) by specifying a`cipher`. PKCS#1 and SEC1 can only be
+ * encrypted by specifying a `cipher`when the PEM `format` is used. For maximum compatibility, use PKCS#8 for
+ * encrypted private keys. Since PKCS#8 defines its own
+ * encryption mechanism, PEM-level encryption is not supported when encrypting
+ * a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for
+ * PKCS#1 and SEC1 encryption.
+ * @since v11.6.0
+ */
+ export(options: KeyExportOptions<'pem'>): string | Buffer;
+ export(options?: KeyExportOptions<'der'>): Buffer;
+ export(options?: JwkKeyExportOptions): JsonWebKey;
+ /**
+ * For secret keys, this property represents the size of the key in bytes. This
+ * property is `undefined` for asymmetric keys.
+ * @since v11.6.0
+ */
+ symmetricKeySize?: number | undefined;
+ /**
+ * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys
+ * or `'private'` for private (asymmetric) keys.
+ * @since v11.6.0
+ */
+ type: KeyObjectType;
+ }
+ type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305';
+ type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
+ type CipherOCBTypes = 'aes-128-ocb' | 'aes-192-ocb' | 'aes-256-ocb';
+ type BinaryLike = string | NodeJS.ArrayBufferView;
+ type CipherKey = BinaryLike | KeyObject;
+ interface CipherCCMOptions extends stream.TransformOptions {
+ authTagLength: number;
+ }
+ interface CipherGCMOptions extends stream.TransformOptions {
+ authTagLength?: number | undefined;
+ }
+ interface CipherOCBOptions extends stream.TransformOptions {
+ authTagLength: number;
+ }
+ /**
+ * Creates and returns a `Cipher` object that uses the given `algorithm` and`password`.
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
+ * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
+ * display the available cipher algorithms.
+ *
+ * The `password` is used to derive the cipher key and initialization vector (IV).
+ * The value must be either a `'latin1'` encoded string, a `Buffer`, a`TypedArray`, or a `DataView`.
+ *
+ * **This function is semantically insecure for all**
+ * **supported ciphers and fatally flawed for ciphers in counter mode (such as CTR,**
+ * **GCM, or CCM).**
+ *
+ * The implementation of `crypto.createCipher()` derives keys using the OpenSSL
+ * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) with the digest algorithm set to MD5, one
+ * iteration, and no salt. The lack of salt allows dictionary attacks as the same
+ * password always creates the same key. The low iteration count and
+ * non-cryptographically secure hash algorithm allow passwords to be tested very
+ * rapidly.
+ *
+ * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) it is recommended that
+ * developers derive a key and IV on
+ * their own using {@link scrypt} and to use {@link createCipheriv} to create the `Cipher` object. Users should not use ciphers with counter mode
+ * (e.g. CTR, GCM, or CCM) in `crypto.createCipher()`. A warning is emitted when
+ * they are used in order to avoid the risk of IV reuse that causes
+ * vulnerabilities. For the case when IV is reused in GCM, see [Nonce-Disrespecting Adversaries](https://github.com/nonce-disrespect/nonce-disrespect) for details.
+ * @since v0.1.94
+ * @deprecated Since v10.0.0 - Use {@link createCipheriv} instead.
+ * @param options `stream.transform` options
+ */
+ function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM;
+ /** @deprecated since v10.0.0 use `createCipheriv()` */
+ function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM;
+ /** @deprecated since v10.0.0 use `createCipheriv()` */
+ function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher;
+ /**
+ * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
+ * initialization vector (`iv`).
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
+ * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
+ * display the available cipher algorithms.
+ *
+ * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
+ * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
+ * a `KeyObject` of type `secret`. If the cipher does not need
+ * an initialization vector, `iv` may be `null`.
+ *
+ * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * Initialization vectors should be unpredictable and unique; ideally, they will be
+ * cryptographically random. They do not have to be secret: IVs are typically just
+ * added to ciphertext messages unencrypted. It may sound contradictory that
+ * something has to be unpredictable and unique, but does not have to be secret;
+ * remember that an attacker must not be able to predict ahead of time what a
+ * given IV will be.
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createCipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): CipherCCM;
+ function createCipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): CipherOCB;
+ function createCipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): CipherGCM;
+ function createCipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Cipher;
+ /**
+ * Instances of the `Cipher` class are used to encrypt data. The class can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where plain unencrypted
+ * data is written to produce encrypted data on the readable side, or
+ * * Using the `cipher.update()` and `cipher.final()` methods to produce
+ * the encrypted data.
+ *
+ * The {@link createCipher} or {@link createCipheriv} methods are
+ * used to create `Cipher` instances. `Cipher` objects are not to be created
+ * directly using the `new` keyword.
+ *
+ * Example: Using `Cipher` objects as streams:
+ *
+ * ```js
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * // Once we have the key and iv, we can create and use the cipher...
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * let encrypted = '';
+ * cipher.setEncoding('hex');
+ *
+ * cipher.on('data', (chunk) => encrypted += chunk);
+ * cipher.on('end', () => console.log(encrypted));
+ *
+ * cipher.write('some clear text data');
+ * cipher.end();
+ * });
+ * });
+ * ```
+ *
+ * Example: Using `Cipher` and piped streams:
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * createWriteStream,
+ * } from 'node:fs';
+ *
+ * import {
+ * pipeline,
+ * } from 'node:stream';
+ *
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * const input = createReadStream('test.js');
+ * const output = createWriteStream('test.enc');
+ *
+ * pipeline(input, cipher, output, (err) => {
+ * if (err) throw err;
+ * });
+ * });
+ * });
+ * ```
+ *
+ * Example: Using the `cipher.update()` and `cipher.final()` methods:
+ *
+ * ```js
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * let encrypted = cipher.update('some clear text data', 'utf8', 'hex');
+ * encrypted += cipher.final('hex');
+ * console.log(encrypted);
+ * });
+ * });
+ * ```
+ * @since v0.1.94
+ */
+ class Cipher extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the cipher with `data`. If the `inputEncoding` argument is given,
+ * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or`DataView`. If `data` is a `Buffer`,
+ * `TypedArray`, or `DataView`, then`inputEncoding` is ignored.
+ *
+ * The `outputEncoding` specifies the output format of the enciphered
+ * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
+ *
+ * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being
+ * thrown.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the data.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ update(data: BinaryLike): Buffer;
+ update(data: string, inputEncoding: Encoding): Buffer;
+ update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
+ update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
+ /**
+ * Once the `cipher.final()` method has been called, the `Cipher` object can no
+ * longer be used to encrypt data. Attempts to call `cipher.final()` more than
+ * once will result in an error being thrown.
+ * @since v0.1.94
+ * @param outputEncoding The `encoding` of the return value.
+ * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
+ */
+ final(): Buffer;
+ final(outputEncoding: BufferEncoding): string;
+ /**
+ * When using block encryption algorithms, the `Cipher` class will automatically
+ * add padding to the input data to the appropriate block size. To disable the
+ * default padding call `cipher.setAutoPadding(false)`.
+ *
+ * When `autoPadding` is `false`, the length of the entire input data must be a
+ * multiple of the cipher's block size or `cipher.final()` will throw an error.
+ * Disabling automatic padding is useful for non-standard padding, for instance
+ * using `0x0` instead of PKCS padding.
+ *
+ * The `cipher.setAutoPadding()` method must be called before `cipher.final()`.
+ * @since v0.7.1
+ * @param [autoPadding=true]
+ * @return for method chaining.
+ */
+ setAutoPadding(autoPadding?: boolean): this;
+ }
+ interface CipherCCM extends Cipher {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options: {
+ plaintextLength: number;
+ }
+ ): this;
+ getAuthTag(): Buffer;
+ }
+ interface CipherGCM extends Cipher {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ getAuthTag(): Buffer;
+ }
+ interface CipherOCB extends Cipher {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ getAuthTag(): Buffer;
+ }
+ /**
+ * Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key).
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * **This function is semantically insecure for all**
+ * **supported ciphers and fatally flawed for ciphers in counter mode (such as CTR,**
+ * **GCM, or CCM).**
+ *
+ * The implementation of `crypto.createDecipher()` derives keys using the OpenSSL
+ * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) with the digest algorithm set to MD5, one
+ * iteration, and no salt. The lack of salt allows dictionary attacks as the same
+ * password always creates the same key. The low iteration count and
+ * non-cryptographically secure hash algorithm allow passwords to be tested very
+ * rapidly.
+ *
+ * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) it is recommended that
+ * developers derive a key and IV on
+ * their own using {@link scrypt} and to use {@link createDecipheriv} to create the `Decipher` object.
+ * @since v0.1.94
+ * @deprecated Since v10.0.0 - Use {@link createDecipheriv} instead.
+ * @param options `stream.transform` options
+ */
+ function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM;
+ /** @deprecated since v10.0.0 use `createDecipheriv()` */
+ function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
+ /** @deprecated since v10.0.0 use `createDecipheriv()` */
+ function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
+ /**
+ * Creates and returns a `Decipher` object that uses the given `algorithm`, `key`and initialization vector (`iv`).
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to restrict accepted authentication tags
+ * to those with the specified length.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
+ * display the available cipher algorithms.
+ *
+ * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
+ * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
+ * a `KeyObject` of type `secret`. If the cipher does not need
+ * an initialization vector, `iv` may be `null`.
+ *
+ * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * Initialization vectors should be unpredictable and unique; ideally, they will be
+ * cryptographically random. They do not have to be secret: IVs are typically just
+ * added to ciphertext messages unencrypted. It may sound contradictory that
+ * something has to be unpredictable and unique, but does not have to be secret;
+ * remember that an attacker must not be able to predict ahead of time what a given
+ * IV will be.
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createDecipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): DecipherCCM;
+ function createDecipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): DecipherOCB;
+ function createDecipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
+ function createDecipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
+ /**
+ * Instances of the `Decipher` class are used to decrypt data. The class can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where plain encrypted
+ * data is written to produce unencrypted data on the readable side, or
+ * * Using the `decipher.update()` and `decipher.final()` methods to
+ * produce the unencrypted data.
+ *
+ * The {@link createDecipher} or {@link createDecipheriv} methods are
+ * used to create `Decipher` instances. `Decipher` objects are not to be created
+ * directly using the `new` keyword.
+ *
+ * Example: Using `Decipher` objects as streams:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Key length is dependent on the algorithm. In this case for aes192, it is
+ * // 24 bytes (192 bits).
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * let decrypted = '';
+ * decipher.on('readable', () => {
+ * let chunk;
+ * while (null !== (chunk = decipher.read())) {
+ * decrypted += chunk.toString('utf8');
+ * }
+ * });
+ * decipher.on('end', () => {
+ * console.log(decrypted);
+ * // Prints: some clear text data
+ * });
+ *
+ * // Encrypted with same algorithm, key and iv.
+ * const encrypted =
+ * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
+ * decipher.write(encrypted, 'hex');
+ * decipher.end();
+ * ```
+ *
+ * Example: Using `Decipher` and piped streams:
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * createWriteStream,
+ * } from 'node:fs';
+ * import { Buffer } from 'node:buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * const input = createReadStream('test.enc');
+ * const output = createWriteStream('test.js');
+ *
+ * input.pipe(decipher).pipe(output);
+ * ```
+ *
+ * Example: Using the `decipher.update()` and `decipher.final()` methods:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * // Encrypted using same algorithm, key and iv.
+ * const encrypted =
+ * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
+ * let decrypted = decipher.update(encrypted, 'hex', 'utf8');
+ * decrypted += decipher.final('utf8');
+ * console.log(decrypted);
+ * // Prints: some clear text data
+ * ```
+ * @since v0.1.94
+ */
+ class Decipher extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the decipher with `data`. If the `inputEncoding` argument is given,
+ * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is
+ * ignored.
+ *
+ * The `outputEncoding` specifies the output format of the enciphered
+ * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
+ *
+ * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error
+ * being thrown.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the `data` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ update(data: NodeJS.ArrayBufferView): Buffer;
+ update(data: string, inputEncoding: Encoding): Buffer;
+ update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
+ update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
+ /**
+ * Once the `decipher.final()` method has been called, the `Decipher` object can
+ * no longer be used to decrypt data. Attempts to call `decipher.final()` more
+ * than once will result in an error being thrown.
+ * @since v0.1.94
+ * @param outputEncoding The `encoding` of the return value.
+ * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
+ */
+ final(): Buffer;
+ final(outputEncoding: BufferEncoding): string;
+ /**
+ * When data has been encrypted without standard block padding, calling`decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and
+ * removing padding.
+ *
+ * Turning auto padding off will only work if the input data's length is a
+ * multiple of the ciphers block size.
+ *
+ * The `decipher.setAutoPadding()` method must be called before `decipher.final()`.
+ * @since v0.7.1
+ * @param [autoPadding=true]
+ * @return for method chaining.
+ */
+ setAutoPadding(auto_padding?: boolean): this;
+ }
+ interface DecipherCCM extends Decipher {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options: {
+ plaintextLength: number;
+ }
+ ): this;
+ }
+ interface DecipherGCM extends Decipher {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ }
+ interface DecipherOCB extends Decipher {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ }
+ interface PrivateKeyInput {
+ key: string | Buffer;
+ format?: KeyFormat | undefined;
+ type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
+ passphrase?: string | Buffer | undefined;
+ encoding?: string | undefined;
+ }
+ interface PublicKeyInput {
+ key: string | Buffer;
+ format?: KeyFormat | undefined;
+ type?: 'pkcs1' | 'spki' | undefined;
+ encoding?: string | undefined;
+ }
+ /**
+ * Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
+ *
+ * ```js
+ * const {
+ * generateKey,
+ * } = await import('node:crypto');
+ *
+ * generateKey('hmac', { length: 512 }, (err, key) => {
+ * if (err) throw err;
+ * console.log(key.export().toString('hex')); // 46e..........620
+ * });
+ * ```
+ *
+ * The size of a generated HMAC key should not exceed the block size of the
+ * underlying hash function. See {@link createHmac} for more information.
+ * @since v15.0.0
+ * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
+ */
+ function generateKey(
+ type: 'hmac' | 'aes',
+ options: {
+ length: number;
+ },
+ callback: (err: Error | null, key: KeyObject) => void
+ ): void;
+ /**
+ * Synchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
+ *
+ * ```js
+ * const {
+ * generateKeySync,
+ * } = await import('node:crypto');
+ *
+ * const key = generateKeySync('hmac', { length: 512 });
+ * console.log(key.export().toString('hex')); // e89..........41e
+ * ```
+ *
+ * The size of a generated HMAC key should not exceed the block size of the
+ * underlying hash function. See {@link createHmac} for more information.
+ * @since v15.0.0
+ * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
+ */
+ function generateKeySync(
+ type: 'hmac' | 'aes',
+ options: {
+ length: number;
+ }
+ ): KeyObject;
+ interface JsonWebKeyInput {
+ key: JsonWebKey;
+ format: 'jwk';
+ }
+ /**
+ * Creates and returns a new key object containing a private key. If `key` is a
+ * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key`must be an object with the properties described above.
+ *
+ * If the private key is encrypted, a `passphrase` must be specified. The length
+ * of the passphrase is limited to 1024 bytes.
+ * @since v11.6.0
+ */
+ function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject;
+ /**
+ * Creates and returns a new key object containing a public key. If `key` is a
+ * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject`with type `'private'`, the public key is derived from the given private key;
+ * otherwise, `key` must be an object with the properties described above.
+ *
+ * If the format is `'pem'`, the `'key'` may also be an X.509 certificate.
+ *
+ * Because public keys can be derived from private keys, a private key may be
+ * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the
+ * returned `KeyObject` will be `'public'` and that the private key cannot be
+ * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type`'private'` is given, a new `KeyObject` with type `'public'` will be returned
+ * and it will be impossible to extract the private key from the returned object.
+ * @since v11.6.0
+ */
+ function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput): KeyObject;
+ /**
+ * Creates and returns a new key object containing a secret key for symmetric
+ * encryption or `Hmac`.
+ * @since v11.6.0
+ * @param encoding The string encoding when `key` is a string.
+ */
+ function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject;
+ function createSecretKey(key: string, encoding: BufferEncoding): KeyObject;
+ /**
+ * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms.
+ * Optional `options` argument controls the `stream.Writable` behavior.
+ *
+ * In some cases, a `Sign` instance can be created using the name of a signature
+ * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
+ * the corresponding digest algorithm. This does not work for all signature
+ * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
+ * algorithm names.
+ * @since v0.1.92
+ * @param options `stream.Writable` options
+ */
+ function createSign(algorithm: string, options?: stream.WritableOptions): Sign;
+ type DSAEncoding = 'der' | 'ieee-p1363';
+ interface SigningOptions {
+ /**
+ * @see crypto.constants.RSA_PKCS1_PADDING
+ */
+ padding?: number | undefined;
+ saltLength?: number | undefined;
+ dsaEncoding?: DSAEncoding | undefined;
+ }
+ interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
+ interface SignKeyObjectInput extends SigningOptions {
+ key: KeyObject;
+ }
+ interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {}
+ interface VerifyKeyObjectInput extends SigningOptions {
+ key: KeyObject;
+ }
+ interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {}
+ type KeyLike = string | Buffer | KeyObject;
+ /**
+ * The `Sign` class is a utility for generating signatures. It can be used in one
+ * of two ways:
+ *
+ * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or
+ * * Using the `sign.update()` and `sign.sign()` methods to produce the
+ * signature.
+ *
+ * The {@link createSign} method is used to create `Sign` instances. The
+ * argument is the string name of the hash function to use. `Sign` objects are not
+ * to be created directly using the `new` keyword.
+ *
+ * Example: Using `Sign` and `Verify` objects as streams:
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync,
+ * createSign,
+ * createVerify,
+ * } = await import('node:crypto');
+ *
+ * const { privateKey, publicKey } = generateKeyPairSync('ec', {
+ * namedCurve: 'sect239k1',
+ * });
+ *
+ * const sign = createSign('SHA256');
+ * sign.write('some data to sign');
+ * sign.end();
+ * const signature = sign.sign(privateKey, 'hex');
+ *
+ * const verify = createVerify('SHA256');
+ * verify.write('some data to sign');
+ * verify.end();
+ * console.log(verify.verify(publicKey, signature, 'hex'));
+ * // Prints: true
+ * ```
+ *
+ * Example: Using the `sign.update()` and `verify.update()` methods:
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync,
+ * createSign,
+ * createVerify,
+ * } = await import('node:crypto');
+ *
+ * const { privateKey, publicKey } = generateKeyPairSync('rsa', {
+ * modulusLength: 2048,
+ * });
+ *
+ * const sign = createSign('SHA256');
+ * sign.update('some data to sign');
+ * sign.end();
+ * const signature = sign.sign(privateKey);
+ *
+ * const verify = createVerify('SHA256');
+ * verify.update('some data to sign');
+ * verify.end();
+ * console.log(verify.verify(publicKey, signature));
+ * // Prints: true
+ * ```
+ * @since v0.1.92
+ */
+ class Sign extends stream.Writable {
+ private constructor();
+ /**
+ * Updates the `Sign` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): this;
+ update(data: string, inputEncoding: Encoding): this;
+ /**
+ * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the following additional properties can be passed:
+ *
+ * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ *
+ * The `Sign` object can not be again used after `sign.sign()` method has been
+ * called. Multiple calls to `sign.sign()` will result in an error being thrown.
+ * @since v0.1.92
+ */
+ sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
+ sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, outputFormat: BinaryToTextEncoding): string;
+ }
+ /**
+ * Creates and returns a `Verify` object that uses the given algorithm.
+ * Use {@link getHashes} to obtain an array of names of the available
+ * signing algorithms. Optional `options` argument controls the`stream.Writable` behavior.
+ *
+ * In some cases, a `Verify` instance can be created using the name of a signature
+ * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
+ * the corresponding digest algorithm. This does not work for all signature
+ * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
+ * algorithm names.
+ * @since v0.1.92
+ * @param options `stream.Writable` options
+ */
+ function createVerify(algorithm: string, options?: stream.WritableOptions): Verify;
+ /**
+ * The `Verify` class is a utility for verifying signatures. It can be used in one
+ * of two ways:
+ *
+ * * As a writable `stream` where written data is used to validate against the
+ * supplied signature, or
+ * * Using the `verify.update()` and `verify.verify()` methods to verify
+ * the signature.
+ *
+ * The {@link createVerify} method is used to create `Verify` instances.`Verify` objects are not to be created directly using the `new` keyword.
+ *
+ * See `Sign` for examples.
+ * @since v0.1.92
+ */
+ class Verify extends stream.Writable {
+ private constructor();
+ /**
+ * Updates the `Verify` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `inputEncoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Verify;
+ update(data: string, inputEncoding: Encoding): Verify;
+ /**
+ * Verifies the provided data using the given `object` and `signature`.
+ *
+ * If `object` is not a `KeyObject`, this function behaves as if`object` had been passed to {@link createPublicKey}. If it is an
+ * object, the following additional properties can be passed:
+ *
+ * The `signature` argument is the previously calculated signature for the data, in
+ * the `signatureEncoding`.
+ * If a `signatureEncoding` is specified, the `signature` is expected to be a
+ * string; otherwise `signature` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * The `verify` object can not be used again after `verify.verify()` has been
+ * called. Multiple calls to `verify.verify()` will result in an error being
+ * thrown.
+ *
+ * Because public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v0.1.92
+ */
+ verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, signature: NodeJS.ArrayBufferView): boolean;
+ verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean;
+ }
+ /**
+ * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
+ * optional specific `generator`.
+ *
+ * The `generator` argument can be a number, string, or `Buffer`. If`generator` is not specified, the value `2` is used.
+ *
+ * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise
+ * a `Buffer`, `TypedArray`, or `DataView` is expected.
+ *
+ * If `generatorEncoding` is specified, `generator` is expected to be a string;
+ * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected.
+ * @since v0.11.12
+ * @param primeEncoding The `encoding` of the `prime` string.
+ * @param [generator=2]
+ * @param generatorEncoding The `encoding` of the `generator` string.
+ */
+ function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman;
+ function createDiffieHellman(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman;
+ function createDiffieHellman(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
+ function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman;
+ function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
+ /**
+ * The `DiffieHellman` class is a utility for creating Diffie-Hellman key
+ * exchanges.
+ *
+ * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const {
+ * createDiffieHellman,
+ * } = await import('node:crypto');
+ *
+ * // Generate Alice's keys...
+ * const alice = createDiffieHellman(2048);
+ * const aliceKey = alice.generateKeys();
+ *
+ * // Generate Bob's keys...
+ * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator());
+ * const bobKey = bob.generateKeys();
+ *
+ * // Exchange and generate the secret...
+ * const aliceSecret = alice.computeSecret(bobKey);
+ * const bobSecret = bob.computeSecret(aliceKey);
+ *
+ * // OK
+ * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
+ * ```
+ * @since v0.5.0
+ */
+ class DiffieHellman {
+ private constructor();
+ /**
+ * Generates private and public Diffie-Hellman key values unless they have been
+ * generated or computed already, and returns
+ * the public key in the specified `encoding`. This key should be
+ * transferred to the other party.
+ * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ *
+ * This function is a thin wrapper around [`DH_generate_key()`](https://www.openssl.org/docs/man3.0/man3/DH_generate_key.html). In particular,
+ * once a private key has been generated or set, calling this function only updates
+ * the public key but does not generate a new private key.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ generateKeys(): Buffer;
+ generateKeys(encoding: BinaryToTextEncoding): string;
+ /**
+ * Computes the shared secret using `otherPublicKey` as the other
+ * party's public key and returns the computed shared secret. The supplied
+ * key is interpreted using the specified `inputEncoding`, and secret is
+ * encoded using specified `outputEncoding`.
+ * If the `inputEncoding` is not
+ * provided, `otherPublicKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned.
+ * @since v0.5.0
+ * @param inputEncoding The `encoding` of an `otherPublicKey` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding?: null, outputEncoding?: null): Buffer;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding?: null): Buffer;
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding: null, outputEncoding: BinaryToTextEncoding): string;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman prime in the specified `encoding`.
+ * If `encoding` is provided a string is
+ * returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPrime(): Buffer;
+ getPrime(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman generator in the specified `encoding`.
+ * If `encoding` is provided a string is
+ * returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getGenerator(): Buffer;
+ getGenerator(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman public key in the specified `encoding`.
+ * If `encoding` is provided a
+ * string is returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPublicKey(): Buffer;
+ getPublicKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman private key in the specified `encoding`.
+ * If `encoding` is provided a
+ * string is returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPrivateKey(): Buffer;
+ getPrivateKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * Sets the Diffie-Hellman public key. If the `encoding` argument is provided,`publicKey` is expected
+ * to be a string. If no `encoding` is provided, `publicKey` is expected
+ * to be a `Buffer`, `TypedArray`, or `DataView`.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the `publicKey` string.
+ */
+ setPublicKey(publicKey: NodeJS.ArrayBufferView): void;
+ setPublicKey(publicKey: string, encoding: BufferEncoding): void;
+ /**
+ * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected
+ * to be a string. If no `encoding` is provided, `privateKey` is expected
+ * to be a `Buffer`, `TypedArray`, or `DataView`.
+ *
+ * This function does not automatically compute the associated public key. Either `diffieHellman.setPublicKey()` or `diffieHellman.generateKeys()` can be
+ * used to manually provide the public key or to automatically derive it.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the `privateKey` string.
+ */
+ setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
+ setPrivateKey(privateKey: string, encoding: BufferEncoding): void;
+ /**
+ * A bit field containing any warnings and/or errors resulting from a check
+ * performed during initialization of the `DiffieHellman` object.
+ *
+ * The following values are valid for this property (as defined in `node:constants` module):
+ *
+ * * `DH_CHECK_P_NOT_SAFE_PRIME`
+ * * `DH_CHECK_P_NOT_PRIME`
+ * * `DH_UNABLE_TO_CHECK_GENERATOR`
+ * * `DH_NOT_SUITABLE_GENERATOR`
+ * @since v0.11.12
+ */
+ verifyError: number;
+ }
+ /**
+ * The `DiffieHellmanGroup` class takes a well-known modp group as its argument.
+ * It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation.
+ * In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods.
+ *
+ * ```js
+ * const { createDiffieHellmanGroup } = await import('node:crypto');
+ * const dh = createDiffieHellmanGroup('modp1');
+ * ```
+ * The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt):
+ * ```bash
+ * $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h
+ * modp1 # 768 bits
+ * modp2 # 1024 bits
+ * modp5 # 1536 bits
+ * modp14 # 2048 bits
+ * modp15 # etc.
+ * modp16
+ * modp17
+ * modp18
+ * ```
+ * @since v0.7.5
+ */
+ const DiffieHellmanGroup: DiffieHellmanGroupConstructor;
+ interface DiffieHellmanGroupConstructor {
+ new (name: string): DiffieHellmanGroup;
+ (name: string): DiffieHellmanGroup;
+ readonly prototype: DiffieHellmanGroup;
+ }
+ type DiffieHellmanGroup = Omit<DiffieHellman, 'setPublicKey' | 'setPrivateKey'>;
+ /**
+ * Creates a predefined `DiffieHellmanGroup` key exchange object. The
+ * supported groups are listed in the documentation for `DiffieHellmanGroup`.
+ *
+ * The returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing
+ * the keys (with `diffieHellman.setPublicKey()`, for example). The
+ * advantage of using this method is that the parties do not have to
+ * generate nor exchange a group modulus beforehand, saving both processor
+ * and communication time.
+ *
+ * Example (obtaining a shared secret):
+ *
+ * ```js
+ * const {
+ * getDiffieHellman,
+ * } = await import('node:crypto');
+ * const alice = getDiffieHellman('modp14');
+ * const bob = getDiffieHellman('modp14');
+ *
+ * alice.generateKeys();
+ * bob.generateKeys();
+ *
+ * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex');
+ * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex');
+ *
+ * // aliceSecret and bobSecret should be the same
+ * console.log(aliceSecret === bobSecret);
+ * ```
+ * @since v0.7.5
+ */
+ function getDiffieHellman(groupName: string): DiffieHellmanGroup;
+ /**
+ * An alias for {@link getDiffieHellman}
+ * @since v0.9.3
+ */
+ function createDiffieHellmanGroup(name: string): DiffieHellmanGroup;
+ /**
+ * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2)
+ * implementation. A selected HMAC digest algorithm specified by `digest` is
+ * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
+ *
+ * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an error occurs while deriving the key, `err` will be set;
+ * otherwise `err` will be `null`. By default, the successfully generated`derivedKey` will be passed to the callback as a `Buffer`. An error will be
+ * thrown if any of the input arguments specify invalid values or types.
+ *
+ * The `iterations` argument must be a number set as high as possible. The
+ * higher the number of iterations, the more secure the derived key will be,
+ * but will take a longer amount of time to complete.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * ```js
+ * const {
+ * pbkdf2,
+ * } = await import('node:crypto');
+ *
+ * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
+ * });
+ * ```
+ *
+ * An array of supported digest functions can be retrieved using {@link getHashes}.
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ * @since v0.5.5
+ */
+ function pbkdf2(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string, callback: (err: Error | null, derivedKey: Buffer) => void): void;
+ /**
+ * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2)
+ * implementation. A selected HMAC digest algorithm specified by `digest` is
+ * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
+ *
+ * If an error occurs an `Error` will be thrown, otherwise the derived key will be
+ * returned as a `Buffer`.
+ *
+ * The `iterations` argument must be a number set as high as possible. The
+ * higher the number of iterations, the more secure the derived key will be,
+ * but will take a longer amount of time to complete.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * ```js
+ * const {
+ * pbkdf2Sync,
+ * } = await import('node:crypto');
+ *
+ * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512');
+ * console.log(key.toString('hex')); // '3745e48...08d59ae'
+ * ```
+ *
+ * An array of supported digest functions can be retrieved using {@link getHashes}.
+ * @since v0.9.3
+ */
+ function pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer;
+ /**
+ * Generates cryptographically strong pseudorandom data. The `size` argument
+ * is a number indicating the number of bytes to generate.
+ *
+ * If a `callback` function is provided, the bytes are generated asynchronously
+ * and the `callback` function is invoked with two arguments: `err` and `buf`.
+ * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The`buf` argument is a `Buffer` containing the generated bytes.
+ *
+ * ```js
+ * // Asynchronous
+ * const {
+ * randomBytes,
+ * } = await import('node:crypto');
+ *
+ * randomBytes(256, (err, buf) => {
+ * if (err) throw err;
+ * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`);
+ * });
+ * ```
+ *
+ * If the `callback` function is not provided, the random bytes are generated
+ * synchronously and returned as a `Buffer`. An error will be thrown if
+ * there is a problem generating the bytes.
+ *
+ * ```js
+ * // Synchronous
+ * const {
+ * randomBytes,
+ * } = await import('node:crypto');
+ *
+ * const buf = randomBytes(256);
+ * console.log(
+ * `${buf.length} bytes of random data: ${buf.toString('hex')}`);
+ * ```
+ *
+ * The `crypto.randomBytes()` method will not complete until there is
+ * sufficient entropy available.
+ * This should normally never take longer than a few milliseconds. The only time
+ * when generating the random bytes may conceivably block for a longer period of
+ * time is right after boot, when the whole system is still low on entropy.
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ *
+ * The asynchronous version of `crypto.randomBytes()` is carried out in a single
+ * threadpool request. To minimize threadpool task length variation, partition
+ * large `randomBytes` requests when doing so as part of fulfilling a client
+ * request.
+ * @since v0.5.8
+ * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`.
+ * @return if the `callback` function is not provided.
+ */
+ function randomBytes(size: number): Buffer;
+ function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
+ function pseudoRandomBytes(size: number): Buffer;
+ function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
+ /**
+ * Return a random integer `n` such that `min <= n < max`. This
+ * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias).
+ *
+ * The range (`max - min`) must be less than 248. `min` and `max` must
+ * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger).
+ *
+ * If the `callback` function is not provided, the random integer is
+ * generated synchronously.
+ *
+ * ```js
+ * // Asynchronous
+ * const {
+ * randomInt,
+ * } = await import('node:crypto');
+ *
+ * randomInt(3, (err, n) => {
+ * if (err) throw err;
+ * console.log(`Random number chosen from (0, 1, 2): ${n}`);
+ * });
+ * ```
+ *
+ * ```js
+ * // Synchronous
+ * const {
+ * randomInt,
+ * } = await import('node:crypto');
+ *
+ * const n = randomInt(3);
+ * console.log(`Random number chosen from (0, 1, 2): ${n}`);
+ * ```
+ *
+ * ```js
+ * // With `min` argument
+ * const {
+ * randomInt,
+ * } = await import('node:crypto');
+ *
+ * const n = randomInt(1, 7);
+ * console.log(`The dice rolled: ${n}`);
+ * ```
+ * @since v14.10.0, v12.19.0
+ * @param [min=0] Start of random range (inclusive).
+ * @param max End of random range (exclusive).
+ * @param callback `function(err, n) {}`.
+ */
+ function randomInt(max: number): number;
+ function randomInt(min: number, max: number): number;
+ function randomInt(max: number, callback: (err: Error | null, value: number) => void): void;
+ function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
+ /**
+ * Synchronous version of {@link randomFill}.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const { randomFillSync } = await import('node:crypto');
+ *
+ * const buf = Buffer.alloc(10);
+ * console.log(randomFillSync(buf).toString('hex'));
+ *
+ * randomFillSync(buf, 5);
+ * console.log(buf.toString('hex'));
+ *
+ * // The above is equivalent to the following:
+ * randomFillSync(buf, 5, 5);
+ * console.log(buf.toString('hex'));
+ * ```
+ *
+ * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const { randomFillSync } = await import('node:crypto');
+ *
+ * const a = new Uint32Array(10);
+ * console.log(Buffer.from(randomFillSync(a).buffer,
+ * a.byteOffset, a.byteLength).toString('hex'));
+ *
+ * const b = new DataView(new ArrayBuffer(10));
+ * console.log(Buffer.from(randomFillSync(b).buffer,
+ * b.byteOffset, b.byteLength).toString('hex'));
+ *
+ * const c = new ArrayBuffer(10);
+ * console.log(Buffer.from(randomFillSync(c)).toString('hex'));
+ * ```
+ * @since v7.10.0, v6.13.0
+ * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
+ * @param [offset=0]
+ * @param [size=buffer.length - offset]
+ * @return The object passed as `buffer` argument.
+ */
+ function randomFillSync<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number, size?: number): T;
+ /**
+ * This function is similar to {@link randomBytes} but requires the first
+ * argument to be a `Buffer` that will be filled. It also
+ * requires that a callback is passed in.
+ *
+ * If the `callback` function is not provided, an error will be thrown.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const { randomFill } = await import('node:crypto');
+ *
+ * const buf = Buffer.alloc(10);
+ * randomFill(buf, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ *
+ * randomFill(buf, 5, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ *
+ * // The above is equivalent to the following:
+ * randomFill(buf, 5, 5, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ * ```
+ *
+ * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as`buffer`.
+ *
+ * While this includes instances of `Float32Array` and `Float64Array`, this
+ * function should not be used to generate random floating-point numbers. The
+ * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array
+ * contains finite numbers only, they are not drawn from a uniform random
+ * distribution and have no meaningful lower or upper bounds.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const { randomFill } = await import('node:crypto');
+ *
+ * const a = new Uint32Array(10);
+ * randomFill(a, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
+ * .toString('hex'));
+ * });
+ *
+ * const b = new DataView(new ArrayBuffer(10));
+ * randomFill(b, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
+ * .toString('hex'));
+ * });
+ *
+ * const c = new ArrayBuffer(10);
+ * randomFill(c, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf).toString('hex'));
+ * });
+ * ```
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ *
+ * The asynchronous version of `crypto.randomFill()` is carried out in a single
+ * threadpool request. To minimize threadpool task length variation, partition
+ * large `randomFill` requests when doing so as part of fulfilling a client
+ * request.
+ * @since v7.10.0, v6.13.0
+ * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
+ * @param [offset=0]
+ * @param [size=buffer.length - offset]
+ * @param callback `function(err, buf) {}`.
+ */
+ function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, callback: (err: Error | null, buf: T) => void): void;
+ function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void;
+ function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void;
+ interface ScryptOptions {
+ cost?: number | undefined;
+ blockSize?: number | undefined;
+ parallelization?: number | undefined;
+ N?: number | undefined;
+ r?: number | undefined;
+ p?: number | undefined;
+ maxmem?: number | undefined;
+ }
+ /**
+ * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
+ * key derivation function that is designed to be expensive computationally and
+ * memory-wise in order to make brute-force attacks unrewarding.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * The `callback` function is called with two arguments: `err` and `derivedKey`.`err` is an exception object when key derivation fails, otherwise `err` is`null`. `derivedKey` is passed to the
+ * callback as a `Buffer`.
+ *
+ * An exception is thrown when any of the input arguments specify invalid values
+ * or types.
+ *
+ * ```js
+ * const {
+ * scrypt,
+ * } = await import('node:crypto');
+ *
+ * // Using the factory defaults.
+ * scrypt('password', 'salt', 64, (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
+ * });
+ * // Using a custom N parameter. Must be a power of two.
+ * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34'
+ * });
+ * ```
+ * @since v10.5.0
+ */
+ function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void): void;
+ function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, options: ScryptOptions, callback: (err: Error | null, derivedKey: Buffer) => void): void;
+ /**
+ * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
+ * key derivation function that is designed to be expensive computationally and
+ * memory-wise in order to make brute-force attacks unrewarding.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * An exception is thrown when key derivation fails, otherwise the derived key is
+ * returned as a `Buffer`.
+ *
+ * An exception is thrown when any of the input arguments specify invalid values
+ * or types.
+ *
+ * ```js
+ * const {
+ * scryptSync,
+ * } = await import('node:crypto');
+ * // Using the factory defaults.
+ *
+ * const key1 = scryptSync('password', 'salt', 64);
+ * console.log(key1.toString('hex')); // '3745e48...08d59ae'
+ * // Using a custom N parameter. Must be a power of two.
+ * const key2 = scryptSync('password', 'salt', 64, { N: 1024 });
+ * console.log(key2.toString('hex')); // '3745e48...aa39b34'
+ * ```
+ * @since v10.5.0
+ */
+ function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer;
+ interface RsaPublicKey {
+ key: KeyLike;
+ padding?: number | undefined;
+ }
+ interface RsaPrivateKey {
+ key: KeyLike;
+ passphrase?: string | undefined;
+ /**
+ * @default 'sha1'
+ */
+ oaepHash?: string | undefined;
+ oaepLabel?: NodeJS.TypedArray | undefined;
+ padding?: number | undefined;
+ }
+ /**
+ * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using
+ * the corresponding private key, for example using {@link privateDecrypt}.
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
+ *
+ * Because RSA public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v0.11.14
+ */
+ function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * Decrypts `buffer` with `key`.`buffer` was previously encrypted using
+ * the corresponding private key, for example using {@link privateEncrypt}.
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
+ *
+ * Because RSA public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v1.1.0
+ */
+ function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using
+ * the corresponding public key, for example using {@link publicEncrypt}.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
+ * @since v0.11.14
+ */
+ function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
+ * the corresponding public key, for example using {@link publicDecrypt}.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
+ * @since v1.1.0
+ */
+ function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * ```js
+ * const {
+ * getCiphers,
+ * } = await import('node:crypto');
+ *
+ * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...]
+ * ```
+ * @since v0.9.3
+ * @return An array with the names of the supported cipher algorithms.
+ */
+ function getCiphers(): string[];
+ /**
+ * ```js
+ * const {
+ * getCurves,
+ * } = await import('node:crypto');
+ *
+ * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...]
+ * ```
+ * @since v2.3.0
+ * @return An array with the names of the supported elliptic curves.
+ */
+ function getCurves(): string[];
+ /**
+ * @since v10.0.0
+ * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}.
+ */
+ function getFips(): 1 | 0;
+ /**
+ * Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build.
+ * Throws an error if FIPS mode is not available.
+ * @since v10.0.0
+ * @param bool `true` to enable FIPS mode.
+ */
+ function setFips(bool: boolean): void;
+ /**
+ * ```js
+ * const {
+ * getHashes,
+ * } = await import('node:crypto');
+ *
+ * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...]
+ * ```
+ * @since v0.9.3
+ * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms.
+ */
+ function getHashes(): string[];
+ /**
+ * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH)
+ * key exchanges.
+ *
+ * Instances of the `ECDH` class can be created using the {@link createECDH} function.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const {
+ * createECDH,
+ * } = await import('node:crypto');
+ *
+ * // Generate Alice's keys...
+ * const alice = createECDH('secp521r1');
+ * const aliceKey = alice.generateKeys();
+ *
+ * // Generate Bob's keys...
+ * const bob = createECDH('secp521r1');
+ * const bobKey = bob.generateKeys();
+ *
+ * // Exchange and generate the secret...
+ * const aliceSecret = alice.computeSecret(bobKey);
+ * const bobSecret = bob.computeSecret(aliceKey);
+ *
+ * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
+ * // OK
+ * ```
+ * @since v0.11.14
+ */
+ class ECDH {
+ private constructor();
+ /**
+ * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the
+ * format specified by `format`. The `format` argument specifies point encoding
+ * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is
+ * interpreted using the specified `inputEncoding`, and the returned key is encoded
+ * using the specified `outputEncoding`.
+ *
+ * Use {@link getCurves} to obtain a list of available curve names.
+ * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display
+ * the name and description of each available elliptic curve.
+ *
+ * If `format` is not specified the point will be returned in `'uncompressed'`format.
+ *
+ * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * Example (uncompressing a key):
+ *
+ * ```js
+ * const {
+ * createECDH,
+ * ECDH,
+ * } = await import('node:crypto');
+ *
+ * const ecdh = createECDH('secp256k1');
+ * ecdh.generateKeys();
+ *
+ * const compressedKey = ecdh.getPublicKey('hex', 'compressed');
+ *
+ * const uncompressedKey = ECDH.convertKey(compressedKey,
+ * 'secp256k1',
+ * 'hex',
+ * 'hex',
+ * 'uncompressed');
+ *
+ * // The converted key and the uncompressed public key should be the same
+ * console.log(uncompressedKey === ecdh.getPublicKey('hex'));
+ * ```
+ * @since v10.0.0
+ * @param inputEncoding The `encoding` of the `key` string.
+ * @param outputEncoding The `encoding` of the return value.
+ * @param [format='uncompressed']
+ */
+ static convertKey(
+ key: BinaryLike,
+ curve: string,
+ inputEncoding?: BinaryToTextEncoding,
+ outputEncoding?: 'latin1' | 'hex' | 'base64' | 'base64url',
+ format?: 'uncompressed' | 'compressed' | 'hybrid'
+ ): Buffer | string;
+ /**
+ * Generates private and public EC Diffie-Hellman key values, and returns
+ * the public key in the specified `format` and `encoding`. This key should be
+ * transferred to the other party.
+ *
+ * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format.
+ *
+ * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the return value.
+ * @param [format='uncompressed']
+ */
+ generateKeys(): Buffer;
+ generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
+ /**
+ * Computes the shared secret using `otherPublicKey` as the other
+ * party's public key and returns the computed shared secret. The supplied
+ * key is interpreted using specified `inputEncoding`, and the returned secret
+ * is encoded using the specified `outputEncoding`.
+ * If the `inputEncoding` is not
+ * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or`DataView`.
+ *
+ * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned.
+ *
+ * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey`lies outside of the elliptic curve. Since `otherPublicKey` is
+ * usually supplied from a remote user over an insecure network,
+ * be sure to handle this exception accordingly.
+ * @since v0.11.14
+ * @param inputEncoding The `encoding` of the `otherPublicKey` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer;
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
+ /**
+ * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
+ * returned.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the return value.
+ * @return The EC Diffie-Hellman in the specified `encoding`.
+ */
+ getPrivateKey(): Buffer;
+ getPrivateKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format.
+ *
+ * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
+ * returned.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the return value.
+ * @param [format='uncompressed']
+ * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`.
+ */
+ getPublicKey(encoding?: null, format?: ECDHKeyFormat): Buffer;
+ getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
+ /**
+ * Sets the EC Diffie-Hellman private key.
+ * If `encoding` is provided, `privateKey` is expected
+ * to be a string; otherwise `privateKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * If `privateKey` is not valid for the curve specified when the `ECDH` object was
+ * created, an error is thrown. Upon setting the private key, the associated
+ * public point (key) is also generated and set in the `ECDH` object.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the `privateKey` string.
+ */
+ setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
+ setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void;
+ }
+ /**
+ * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a
+ * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent
+ * OpenSSL releases, `openssl ecparam -list_curves` will also display the name
+ * and description of each available elliptic curve.
+ * @since v0.11.14
+ */
+ function createECDH(curveName: string): ECDH;
+ /**
+ * This function compares the underlying bytes that represent the given`ArrayBuffer`, `TypedArray`, or `DataView` instances using a constant-time
+ * algorithm.
+ *
+ * This function does not leak timing information that
+ * would allow an attacker to guess one of the values. This is suitable for
+ * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/).
+ *
+ * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they
+ * must have the same byte length. An error is thrown if `a` and `b` have
+ * different byte lengths.
+ *
+ * If at least one of `a` and `b` is a `TypedArray` with more than one byte per
+ * entry, such as `Uint16Array`, the result will be computed using the platform
+ * byte order.
+ *
+ * **When both of the inputs are `Float32Array`s or`Float64Array`s, this function might return unexpected results due to IEEE 754**
+ * **encoding of floating-point numbers. In particular, neither `x === y` nor`Object.is(x, y)` implies that the byte representations of two floating-point**
+ * **numbers `x` and `y` are equal.**
+ *
+ * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code
+ * is timing-safe. Care should be taken to ensure that the surrounding code does
+ * not introduce timing vulnerabilities.
+ * @since v6.6.0
+ */
+ function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
+ type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
+ type KeyFormat = 'pem' | 'der' | 'jwk';
+ interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
+ format: T;
+ cipher?: string | undefined;
+ passphrase?: string | undefined;
+ }
+ interface KeyPairKeyObjectResult {
+ publicKey: KeyObject;
+ privateKey: KeyObject;
+ }
+ interface ED25519KeyPairKeyObjectOptions {}
+ interface ED448KeyPairKeyObjectOptions {}
+ interface X25519KeyPairKeyObjectOptions {}
+ interface X448KeyPairKeyObjectOptions {}
+ interface ECKeyPairKeyObjectOptions {
+ /**
+ * Name of the curve to use
+ */
+ namedCurve: string;
+ }
+ interface RSAKeyPairKeyObjectOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ }
+ interface RSAPSSKeyPairKeyObjectOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ /**
+ * Name of the message digest
+ */
+ hashAlgorithm?: string;
+ /**
+ * Name of the message digest used by MGF1
+ */
+ mgf1HashAlgorithm?: string;
+ /**
+ * Minimal salt length in bytes
+ */
+ saltLength?: string;
+ }
+ interface DSAKeyPairKeyObjectOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Size of q in bits
+ */
+ divisorLength: number;
+ }
+ interface RSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ publicKeyEncoding: {
+ type: 'pkcs1' | 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs1' | 'pkcs8';
+ };
+ }
+ interface RSAPSSKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ /**
+ * Name of the message digest
+ */
+ hashAlgorithm?: string;
+ /**
+ * Name of the message digest used by MGF1
+ */
+ mgf1HashAlgorithm?: string;
+ /**
+ * Minimal salt length in bytes
+ */
+ saltLength?: string;
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface DSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Size of q in bits
+ */
+ divisorLength: number;
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Name of the curve to use.
+ */
+ namedCurve: string;
+ publicKeyEncoding: {
+ type: 'pkcs1' | 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'sec1' | 'pkcs8';
+ };
+ }
+ interface ED25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface ED448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface X25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface X448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
+ publicKey: T1;
+ privateKey: T2;
+ }
+ /**
+ * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
+ * Ed25519, Ed448, X25519, X448, and DH are currently supported.
+ *
+ * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
+ * behaves as if `keyObject.export()` had been called on its result. Otherwise,
+ * the respective part of the key is returned as a `KeyObject`.
+ *
+ * When encoding public keys, it is recommended to use `'spki'`. When encoding
+ * private keys, it is recommended to use `'pkcs8'` with a strong passphrase,
+ * and to keep the passphrase confidential.
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync,
+ * } = await import('node:crypto');
+ *
+ * const {
+ * publicKey,
+ * privateKey,
+ * } = generateKeyPairSync('rsa', {
+ * modulusLength: 4096,
+ * publicKeyEncoding: {
+ * type: 'spki',
+ * format: 'pem',
+ * },
+ * privateKeyEncoding: {
+ * type: 'pkcs8',
+ * format: 'pem',
+ * cipher: 'aes-256-cbc',
+ * passphrase: 'top secret',
+ * },
+ * });
+ * ```
+ *
+ * The return value `{ publicKey, privateKey }` represents the generated key pair.
+ * When PEM encoding was selected, the respective key will be a string, otherwise
+ * it will be a buffer containing the data encoded as DER.
+ * @since v10.12.0
+ * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
+ */
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ /**
+ * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
+ * Ed25519, Ed448, X25519, X448, and DH are currently supported.
+ *
+ * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
+ * behaves as if `keyObject.export()` had been called on its result. Otherwise,
+ * the respective part of the key is returned as a `KeyObject`.
+ *
+ * It is recommended to encode public keys as `'spki'` and private keys as`'pkcs8'` with encryption for long-term storage:
+ *
+ * ```js
+ * const {
+ * generateKeyPair,
+ * } = await import('node:crypto');
+ *
+ * generateKeyPair('rsa', {
+ * modulusLength: 4096,
+ * publicKeyEncoding: {
+ * type: 'spki',
+ * format: 'pem',
+ * },
+ * privateKeyEncoding: {
+ * type: 'pkcs8',
+ * format: 'pem',
+ * cipher: 'aes-256-cbc',
+ * passphrase: 'top secret',
+ * },
+ * }, (err, publicKey, privateKey) => {
+ * // Handle errors and use the generated key pair.
+ * });
+ * ```
+ *
+ * On completion, `callback` will be called with `err` set to `undefined` and`publicKey` / `privateKey` representing the generated key pair.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a `Promise` for an `Object` with `publicKey` and `privateKey` properties.
+ * @since v10.12.0
+ * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
+ */
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ namespace generateKeyPair {
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'rsa-pss',
+ options: RSAPSSKeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'rsa-pss',
+ options: RSAPSSKeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'rsa-pss',
+ options: RSAPSSKeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'rsa-pss',
+ options: RSAPSSKeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'dsa', options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'ec', options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'x448', options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ }
+ /**
+ * Calculates and returns the signature for `data` using the given private key and
+ * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is
+ * dependent upon the key type (especially Ed25519 and Ed448).
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if `key` had been
+ * passed to {@link createPrivateKey}. If it is an object, the following
+ * additional properties can be passed:
+ *
+ * If the `callback` function is provided this function uses libuv's threadpool.
+ * @since v12.0.0
+ */
+ function sign(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
+ function sign(
+ algorithm: string | null | undefined,
+ data: NodeJS.ArrayBufferView,
+ key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
+ callback: (error: Error | null, data: Buffer) => void
+ ): void;
+ /**
+ * Verifies the given signature for `data` using the given key and algorithm. If`algorithm` is `null` or `undefined`, then the algorithm is dependent upon the
+ * key type (especially Ed25519 and Ed448).
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if `key` had been
+ * passed to {@link createPublicKey}. If it is an object, the following
+ * additional properties can be passed:
+ *
+ * The `signature` argument is the previously calculated signature for the `data`.
+ *
+ * Because public keys can be derived from private keys, a private key or a public
+ * key may be passed for `key`.
+ *
+ * If the `callback` function is provided this function uses libuv's threadpool.
+ * @since v12.0.0
+ */
+ function verify(
+ algorithm: string | null | undefined,
+ data: NodeJS.ArrayBufferView,
+ key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
+ signature: NodeJS.ArrayBufferView
+ ): boolean;
+ function verify(
+ algorithm: string | null | undefined,
+ data: NodeJS.ArrayBufferView,
+ key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
+ signature: NodeJS.ArrayBufferView,
+ callback: (error: Error | null, result: boolean) => void
+ ): void;
+ /**
+ * Computes the Diffie-Hellman secret based on a `privateKey` and a `publicKey`.
+ * Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'`(for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES).
+ * @since v13.9.0, v12.17.0
+ */
+ function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer;
+ type CipherMode = 'cbc' | 'ccm' | 'cfb' | 'ctr' | 'ecb' | 'gcm' | 'ocb' | 'ofb' | 'stream' | 'wrap' | 'xts';
+ interface CipherInfoOptions {
+ /**
+ * A test key length.
+ */
+ keyLength?: number | undefined;
+ /**
+ * A test IV length.
+ */
+ ivLength?: number | undefined;
+ }
+ interface CipherInfo {
+ /**
+ * The name of the cipher.
+ */
+ name: string;
+ /**
+ * The nid of the cipher.
+ */
+ nid: number;
+ /**
+ * The block size of the cipher in bytes.
+ * This property is omitted when mode is 'stream'.
+ */
+ blockSize?: number | undefined;
+ /**
+ * The expected or default initialization vector length in bytes.
+ * This property is omitted if the cipher does not use an initialization vector.
+ */
+ ivLength?: number | undefined;
+ /**
+ * The expected or default key length in bytes.
+ */
+ keyLength: number;
+ /**
+ * The cipher mode.
+ */
+ mode: CipherMode;
+ }
+ /**
+ * Returns information about a given cipher.
+ *
+ * Some ciphers accept variable length keys and initialization vectors. By default,
+ * the `crypto.getCipherInfo()` method will return the default values for these
+ * ciphers. To test if a given key length or iv length is acceptable for given
+ * cipher, use the `keyLength` and `ivLength` options. If the given values are
+ * unacceptable, `undefined` will be returned.
+ * @since v15.0.0
+ * @param nameOrNid The name or nid of the cipher to query.
+ */
+ function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined;
+ /**
+ * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`,`salt` and `info` are used with the `digest` to derive a key of `keylen` bytes.
+ *
+ * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an errors occurs while deriving the key, `err` will be set;
+ * otherwise `err` will be `null`. The successfully generated `derivedKey` will
+ * be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any
+ * of the input arguments specify invalid values or types.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const {
+ * hkdf,
+ * } = await import('node:crypto');
+ *
+ * hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653'
+ * });
+ * ```
+ * @since v15.0.0
+ * @param digest The digest algorithm to use.
+ * @param ikm The input keying material. Must be provided but can be zero-length.
+ * @param salt The salt value. Must be provided but can be zero-length.
+ * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes.
+ * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512`
+ * generates 64-byte hashes, making the maximum HKDF output 16320 bytes).
+ */
+ function hkdf(digest: string, irm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: ArrayBuffer) => void): void;
+ /**
+ * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The
+ * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of`keylen` bytes.
+ *
+ * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer).
+ *
+ * An error will be thrown if any of the input arguments specify invalid values or
+ * types, or if the derived key cannot be generated.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const {
+ * hkdfSync,
+ * } = await import('node:crypto');
+ *
+ * const derivedKey = hkdfSync('sha512', 'key', 'salt', 'info', 64);
+ * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653'
+ * ```
+ * @since v15.0.0
+ * @param digest The digest algorithm to use.
+ * @param ikm The input keying material. Must be provided but can be zero-length.
+ * @param salt The salt value. Must be provided but can be zero-length.
+ * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes.
+ * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512`
+ * generates 64-byte hashes, making the maximum HKDF output 16320 bytes).
+ */
+ function hkdfSync(digest: string, ikm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number): ArrayBuffer;
+ interface SecureHeapUsage {
+ /**
+ * The total allocated secure heap size as specified using the `--secure-heap=n` command-line flag.
+ */
+ total: number;
+ /**
+ * The minimum allocation from the secure heap as specified using the `--secure-heap-min` command-line flag.
+ */
+ min: number;
+ /**
+ * The total number of bytes currently allocated from the secure heap.
+ */
+ used: number;
+ /**
+ * The calculated ratio of `used` to `total` allocated bytes.
+ */
+ utilization: number;
+ }
+ /**
+ * @since v15.6.0
+ */
+ function secureHeapUsed(): SecureHeapUsage;
+ interface RandomUUIDOptions {
+ /**
+ * By default, to improve performance,
+ * Node.js will pre-emptively generate and persistently cache enough
+ * random data to generate up to 128 random UUIDs. To generate a UUID
+ * without using the cache, set `disableEntropyCache` to `true`.
+ *
+ * @default `false`
+ */
+ disableEntropyCache?: boolean | undefined;
+ }
+ type UUID = `${string}-${string}-${string}-${string}-${string}`;
+ /**
+ * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a
+ * cryptographic pseudorandom number generator.
+ * @since v15.6.0, v14.17.0
+ */
+ function randomUUID(options?: RandomUUIDOptions): UUID;
+ interface X509CheckOptions {
+ /**
+ * @default 'always'
+ */
+ subject?: 'always' | 'default' | 'never';
+ /**
+ * @default true
+ */
+ wildcards?: boolean;
+ /**
+ * @default true
+ */
+ partialWildcards?: boolean;
+ /**
+ * @default false
+ */
+ multiLabelWildcards?: boolean;
+ /**
+ * @default false
+ */
+ singleLabelSubdomains?: boolean;
+ }
+ /**
+ * Encapsulates an X509 certificate and provides read-only access to
+ * its information.
+ *
+ * ```js
+ * const { X509Certificate } = await import('node:crypto');
+ *
+ * const x509 = new X509Certificate('{... pem encoded cert ...}');
+ *
+ * console.log(x509.subject);
+ * ```
+ * @since v15.6.0
+ */
+ class X509Certificate {
+ /**
+ * Will be \`true\` if this is a Certificate Authority (CA) certificate.
+ * @since v15.6.0
+ */
+ readonly ca: boolean;
+ /**
+ * The SHA-1 fingerprint of this certificate.
+ *
+ * Because SHA-1 is cryptographically broken and because the security of SHA-1 is
+ * significantly worse than that of algorithms that are commonly used to sign
+ * certificates, consider using `x509.fingerprint256` instead.
+ * @since v15.6.0
+ */
+ readonly fingerprint: string;
+ /**
+ * The SHA-256 fingerprint of this certificate.
+ * @since v15.6.0
+ */
+ readonly fingerprint256: string;
+ /**
+ * The SHA-512 fingerprint of this certificate.
+ *
+ * Because computing the SHA-256 fingerprint is usually faster and because it is
+ * only half the size of the SHA-512 fingerprint, `x509.fingerprint256` may be
+ * a better choice. While SHA-512 presumably provides a higher level of security in
+ * general, the security of SHA-256 matches that of most algorithms that are
+ * commonly used to sign certificates.
+ * @since v17.2.0, v16.14.0
+ */
+ readonly fingerprint512: string;
+ /**
+ * The complete subject of this certificate.
+ * @since v15.6.0
+ */
+ readonly subject: string;
+ /**
+ * The subject alternative name specified for this certificate.
+ *
+ * This is a comma-separated list of subject alternative names. Each entry begins
+ * with a string identifying the kind of the subject alternative name followed by
+ * a colon and the value associated with the entry.
+ *
+ * Earlier versions of Node.js incorrectly assumed that it is safe to split this
+ * property at the two-character sequence `', '` (see [CVE-2021-44532](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44532)). However,
+ * both malicious and legitimate certificates can contain subject alternative names
+ * that include this sequence when represented as a string.
+ *
+ * After the prefix denoting the type of the entry, the remainder of each entry
+ * might be enclosed in quotes to indicate that the value is a JSON string literal.
+ * For backward compatibility, Node.js only uses JSON string literals within this
+ * property when necessary to avoid ambiguity. Third-party code should be prepared
+ * to handle both possible entry formats.
+ * @since v15.6.0
+ */
+ readonly subjectAltName: string | undefined;
+ /**
+ * A textual representation of the certificate's authority information access
+ * extension.
+ *
+ * This is a line feed separated list of access descriptions. Each line begins with
+ * the access method and the kind of the access location, followed by a colon and
+ * the value associated with the access location.
+ *
+ * After the prefix denoting the access method and the kind of the access location,
+ * the remainder of each line might be enclosed in quotes to indicate that the
+ * value is a JSON string literal. For backward compatibility, Node.js only uses
+ * JSON string literals within this property when necessary to avoid ambiguity.
+ * Third-party code should be prepared to handle both possible entry formats.
+ * @since v15.6.0
+ */
+ readonly infoAccess: string | undefined;
+ /**
+ * An array detailing the key usages for this certificate.
+ * @since v15.6.0
+ */
+ readonly keyUsage: string[];
+ /**
+ * The issuer identification included in this certificate.
+ * @since v15.6.0
+ */
+ readonly issuer: string;
+ /**
+ * The issuer certificate or `undefined` if the issuer certificate is not
+ * available.
+ * @since v15.9.0
+ */
+ readonly issuerCertificate?: X509Certificate | undefined;
+ /**
+ * The public key `KeyObject` for this certificate.
+ * @since v15.6.0
+ */
+ readonly publicKey: KeyObject;
+ /**
+ * A `Buffer` containing the DER encoding of this certificate.
+ * @since v15.6.0
+ */
+ readonly raw: Buffer;
+ /**
+ * The serial number of this certificate.
+ *
+ * Serial numbers are assigned by certificate authorities and do not uniquely
+ * identify certificates. Consider using `x509.fingerprint256` as a unique
+ * identifier instead.
+ * @since v15.6.0
+ */
+ readonly serialNumber: string;
+ /**
+ * The date/time from which this certificate is considered valid.
+ * @since v15.6.0
+ */
+ readonly validFrom: string;
+ /**
+ * The date/time until which this certificate is considered valid.
+ * @since v15.6.0
+ */
+ readonly validTo: string;
+ constructor(buffer: BinaryLike);
+ /**
+ * Checks whether the certificate matches the given email address.
+ *
+ * If the `'subject'` option is undefined or set to `'default'`, the certificate
+ * subject is only considered if the subject alternative name extension either does
+ * not exist or does not contain any email addresses.
+ *
+ * If the `'subject'` option is set to `'always'` and if the subject alternative
+ * name extension either does not exist or does not contain a matching email
+ * address, the certificate subject is considered.
+ *
+ * If the `'subject'` option is set to `'never'`, the certificate subject is never
+ * considered, even if the certificate contains no subject alternative names.
+ * @since v15.6.0
+ * @return Returns `email` if the certificate matches, `undefined` if it does not.
+ */
+ checkEmail(email: string, options?: Pick<X509CheckOptions, 'subject'>): string | undefined;
+ /**
+ * Checks whether the certificate matches the given host name.
+ *
+ * If the certificate matches the given host name, the matching subject name is
+ * returned. The returned name might be an exact match (e.g., `foo.example.com`)
+ * or it might contain wildcards (e.g., `*.example.com`). Because host name
+ * comparisons are case-insensitive, the returned subject name might also differ
+ * from the given `name` in capitalization.
+ *
+ * If the `'subject'` option is undefined or set to `'default'`, the certificate
+ * subject is only considered if the subject alternative name extension either does
+ * not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS").
+ *
+ * If the `'subject'` option is set to `'always'` and if the subject alternative
+ * name extension either does not exist or does not contain a matching DNS name,
+ * the certificate subject is considered.
+ *
+ * If the `'subject'` option is set to `'never'`, the certificate subject is never
+ * considered, even if the certificate contains no subject alternative names.
+ * @since v15.6.0
+ * @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`.
+ */
+ checkHost(name: string, options?: X509CheckOptions): string | undefined;
+ /**
+ * Checks whether the certificate matches the given IP address (IPv4 or IPv6).
+ *
+ * Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they
+ * must match the given `ip` address exactly. Other subject alternative names as
+ * well as the subject field of the certificate are ignored.
+ * @since v15.6.0
+ * @return Returns `ip` if the certificate matches, `undefined` if it does not.
+ */
+ checkIP(ip: string): string | undefined;
+ /**
+ * Checks whether this certificate was issued by the given `otherCert`.
+ * @since v15.6.0
+ */
+ checkIssued(otherCert: X509Certificate): boolean;
+ /**
+ * Checks whether the public key for this certificate is consistent with
+ * the given private key.
+ * @since v15.6.0
+ * @param privateKey A private key.
+ */
+ checkPrivateKey(privateKey: KeyObject): boolean;
+ /**
+ * There is no standard JSON encoding for X509 certificates. The`toJSON()` method returns a string containing the PEM encoded
+ * certificate.
+ * @since v15.6.0
+ */
+ toJSON(): string;
+ /**
+ * Returns information about this certificate using the legacy `certificate object` encoding.
+ * @since v15.6.0
+ */
+ toLegacyObject(): PeerCertificate;
+ /**
+ * Returns the PEM-encoded certificate.
+ * @since v15.6.0
+ */
+ toString(): string;
+ /**
+ * Verifies that this certificate was signed by the given public key.
+ * Does not perform any other validation checks on the certificate.
+ * @since v15.6.0
+ * @param publicKey A public key.
+ */
+ verify(publicKey: KeyObject): boolean;
+ }
+ type LargeNumberLike = NodeJS.ArrayBufferView | SharedArrayBuffer | ArrayBuffer | bigint;
+ interface GeneratePrimeOptions {
+ add?: LargeNumberLike | undefined;
+ rem?: LargeNumberLike | undefined;
+ /**
+ * @default false
+ */
+ safe?: boolean | undefined;
+ bigint?: boolean | undefined;
+ }
+ interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions {
+ bigint: true;
+ }
+ interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions {
+ bigint?: false | undefined;
+ }
+ /**
+ * Generates a pseudorandom prime of `size` bits.
+ *
+ * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime.
+ *
+ * The `options.add` and `options.rem` parameters can be used to enforce additional
+ * requirements, e.g., for Diffie-Hellman:
+ *
+ * * If `options.add` and `options.rem` are both set, the prime will satisfy the
+ * condition that `prime % add = rem`.
+ * * If only `options.add` is set and `options.safe` is not `true`, the prime will
+ * satisfy the condition that `prime % add = 1`.
+ * * If only `options.add` is set and `options.safe` is set to `true`, the prime
+ * will instead satisfy the condition that `prime % add = 3`. This is necessary
+ * because `prime % add = 1` for `options.add > 2` would contradict the condition
+ * enforced by `options.safe`.
+ * * `options.rem` is ignored if `options.add` is not given.
+ *
+ * Both `options.add` and `options.rem` must be encoded as big-endian sequences
+ * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
+ *
+ * By default, the prime is encoded as a big-endian sequence of octets
+ * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
+ * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided.
+ * @since v15.8.0
+ * @param size The size (in bits) of the prime to generate.
+ */
+ function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void;
+ function generatePrime(size: number, options: GeneratePrimeOptionsBigInt, callback: (err: Error | null, prime: bigint) => void): void;
+ function generatePrime(size: number, options: GeneratePrimeOptionsArrayBuffer, callback: (err: Error | null, prime: ArrayBuffer) => void): void;
+ function generatePrime(size: number, options: GeneratePrimeOptions, callback: (err: Error | null, prime: ArrayBuffer | bigint) => void): void;
+ /**
+ * Generates a pseudorandom prime of `size` bits.
+ *
+ * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime.
+ *
+ * The `options.add` and `options.rem` parameters can be used to enforce additional
+ * requirements, e.g., for Diffie-Hellman:
+ *
+ * * If `options.add` and `options.rem` are both set, the prime will satisfy the
+ * condition that `prime % add = rem`.
+ * * If only `options.add` is set and `options.safe` is not `true`, the prime will
+ * satisfy the condition that `prime % add = 1`.
+ * * If only `options.add` is set and `options.safe` is set to `true`, the prime
+ * will instead satisfy the condition that `prime % add = 3`. This is necessary
+ * because `prime % add = 1` for `options.add > 2` would contradict the condition
+ * enforced by `options.safe`.
+ * * `options.rem` is ignored if `options.add` is not given.
+ *
+ * Both `options.add` and `options.rem` must be encoded as big-endian sequences
+ * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
+ *
+ * By default, the prime is encoded as a big-endian sequence of octets
+ * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
+ * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided.
+ * @since v15.8.0
+ * @param size The size (in bits) of the prime to generate.
+ */
+ function generatePrimeSync(size: number): ArrayBuffer;
+ function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint;
+ function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer;
+ function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint;
+ interface CheckPrimeOptions {
+ /**
+ * The number of Miller-Rabin probabilistic primality iterations to perform.
+ * When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most `2**-64` for random input.
+ * Care must be used when selecting a number of checks.
+ * Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details.
+ *
+ * @default 0
+ */
+ checks?: number | undefined;
+ }
+ /**
+ * Checks the primality of the `candidate`.
+ * @since v15.8.0
+ * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length.
+ */
+ function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void;
+ function checkPrime(value: LargeNumberLike, options: CheckPrimeOptions, callback: (err: Error | null, result: boolean) => void): void;
+ /**
+ * Checks the primality of the `candidate`.
+ * @since v15.8.0
+ * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length.
+ * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`.
+ */
+ function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean;
+ /**
+ * Load and set the `engine` for some or all OpenSSL functions (selected by flags).
+ *
+ * `engine` could be either an id or a path to the engine's shared library.
+ *
+ * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. The `flags`is a bit field taking one of or a mix of the following flags (defined in`crypto.constants`):
+ *
+ * * `crypto.constants.ENGINE_METHOD_RSA`
+ * * `crypto.constants.ENGINE_METHOD_DSA`
+ * * `crypto.constants.ENGINE_METHOD_DH`
+ * * `crypto.constants.ENGINE_METHOD_RAND`
+ * * `crypto.constants.ENGINE_METHOD_EC`
+ * * `crypto.constants.ENGINE_METHOD_CIPHERS`
+ * * `crypto.constants.ENGINE_METHOD_DIGESTS`
+ * * `crypto.constants.ENGINE_METHOD_PKEY_METHS`
+ * * `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS`
+ * * `crypto.constants.ENGINE_METHOD_ALL`
+ * * `crypto.constants.ENGINE_METHOD_NONE`
+ * @since v0.11.11
+ * @param flags
+ */
+ function setEngine(engine: string, flags?: number): void;
+ /**
+ * A convenient alias for {@link webcrypto.getRandomValues}. This
+ * implementation is not compliant with the Web Crypto spec, to write
+ * web-compatible code use {@link webcrypto.getRandomValues} instead.
+ * @since v17.4.0
+ * @return Returns `typedArray`.
+ */
+ function getRandomValues<T extends webcrypto.BufferSource>(typedArray: T): T;
+ /**
+ * A convenient alias for `crypto.webcrypto.subtle`.
+ * @since v17.4.0
+ */
+ const subtle: webcrypto.SubtleCrypto;
+ /**
+ * An implementation of the Web Crypto API standard.
+ *
+ * See the {@link https://nodejs.org/docs/latest/api/webcrypto.html Web Crypto API documentation} for details.
+ * @since v15.0.0
+ */
+ const webcrypto: webcrypto.Crypto;
+ namespace webcrypto {
+ type BufferSource = ArrayBufferView | ArrayBuffer;
+ type KeyFormat = 'jwk' | 'pkcs8' | 'raw' | 'spki';
+ type KeyType = 'private' | 'public' | 'secret';
+ type KeyUsage = 'decrypt' | 'deriveBits' | 'deriveKey' | 'encrypt' | 'sign' | 'unwrapKey' | 'verify' | 'wrapKey';
+ type AlgorithmIdentifier = Algorithm | string;
+ type HashAlgorithmIdentifier = AlgorithmIdentifier;
+ type NamedCurve = string;
+ type BigInteger = Uint8Array;
+ interface AesCbcParams extends Algorithm {
+ iv: BufferSource;
+ }
+ interface AesCtrParams extends Algorithm {
+ counter: BufferSource;
+ length: number;
+ }
+ interface AesDerivedKeyParams extends Algorithm {
+ length: number;
+ }
+ interface AesGcmParams extends Algorithm {
+ additionalData?: BufferSource;
+ iv: BufferSource;
+ tagLength?: number;
+ }
+ interface AesKeyAlgorithm extends KeyAlgorithm {
+ length: number;
+ }
+ interface AesKeyGenParams extends Algorithm {
+ length: number;
+ }
+ interface Algorithm {
+ name: string;
+ }
+ interface EcKeyAlgorithm extends KeyAlgorithm {
+ namedCurve: NamedCurve;
+ }
+ interface EcKeyGenParams extends Algorithm {
+ namedCurve: NamedCurve;
+ }
+ interface EcKeyImportParams extends Algorithm {
+ namedCurve: NamedCurve;
+ }
+ interface EcdhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+ }
+ interface EcdsaParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ }
+ interface Ed448Params extends Algorithm {
+ context?: BufferSource;
+ }
+ interface HkdfParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ info: BufferSource;
+ salt: BufferSource;
+ }
+ interface HmacImportParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ length?: number;
+ }
+ interface HmacKeyAlgorithm extends KeyAlgorithm {
+ hash: KeyAlgorithm;
+ length: number;
+ }
+ interface HmacKeyGenParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ length?: number;
+ }
+ interface JsonWebKey {
+ alg?: string;
+ crv?: string;
+ d?: string;
+ dp?: string;
+ dq?: string;
+ e?: string;
+ ext?: boolean;
+ k?: string;
+ key_ops?: string[];
+ kty?: string;
+ n?: string;
+ oth?: RsaOtherPrimesInfo[];
+ p?: string;
+ q?: string;
+ qi?: string;
+ use?: string;
+ x?: string;
+ y?: string;
+ }
+ interface KeyAlgorithm {
+ name: string;
+ }
+ interface Pbkdf2Params extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ iterations: number;
+ salt: BufferSource;
+ }
+ interface RsaHashedImportParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ }
+ interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
+ hash: KeyAlgorithm;
+ }
+ interface RsaHashedKeyGenParams extends RsaKeyGenParams {
+ hash: HashAlgorithmIdentifier;
+ }
+ interface RsaKeyAlgorithm extends KeyAlgorithm {
+ modulusLength: number;
+ publicExponent: BigInteger;
+ }
+ interface RsaKeyGenParams extends Algorithm {
+ modulusLength: number;
+ publicExponent: BigInteger;
+ }
+ interface RsaOaepParams extends Algorithm {
+ label?: BufferSource;
+ }
+ interface RsaOtherPrimesInfo {
+ d?: string;
+ r?: string;
+ t?: string;
+ }
+ interface RsaPssParams extends Algorithm {
+ saltLength: number;
+ }
+ /**
+ * Calling `require('node:crypto').webcrypto` returns an instance of the `Crypto` class.
+ * `Crypto` is a singleton that provides access to the remainder of the crypto API.
+ * @since v15.0.0
+ */
+ interface Crypto {
+ /**
+ * Provides access to the `SubtleCrypto` API.
+ * @since v15.0.0
+ */
+ readonly subtle: SubtleCrypto;
+ /**
+ * Generates cryptographically strong random values.
+ * The given `typedArray` is filled with random values, and a reference to `typedArray` is returned.
+ *
+ * The given `typedArray` must be an integer-based instance of {@link NodeJS.TypedArray}, i.e. `Float32Array` and `Float64Array` are not accepted.
+ *
+ * An error will be thrown if the given `typedArray` is larger than 65,536 bytes.
+ * @since v15.0.0
+ */
+ getRandomValues<T extends Exclude<NodeJS.TypedArray, Float32Array | Float64Array>>(typedArray: T): T;
+ /**
+ * Generates a random {@link https://www.rfc-editor.org/rfc/rfc4122.txt RFC 4122} version 4 UUID.
+ * The UUID is generated using a cryptographic pseudorandom number generator.
+ * @since v16.7.0
+ */
+ randomUUID(): UUID;
+ CryptoKey: CryptoKeyConstructor;
+ }
+ // This constructor throws ILLEGAL_CONSTRUCTOR so it should not be newable.
+ interface CryptoKeyConstructor {
+ /** Illegal constructor */
+ (_: { readonly _: unique symbol }): never; // Allows instanceof to work but not be callable by the user.
+ readonly length: 0;
+ readonly name: 'CryptoKey';
+ readonly prototype: CryptoKey;
+ }
+ /**
+ * @since v15.0.0
+ */
+ interface CryptoKey {
+ /**
+ * An object detailing the algorithm for which the key can be used along with additional algorithm-specific parameters.
+ * @since v15.0.0
+ */
+ readonly algorithm: KeyAlgorithm;
+ /**
+ * When `true`, the {@link CryptoKey} can be extracted using either `subtleCrypto.exportKey()` or `subtleCrypto.wrapKey()`.
+ * @since v15.0.0
+ */
+ readonly extractable: boolean;
+ /**
+ * A string identifying whether the key is a symmetric (`'secret'`) or asymmetric (`'private'` or `'public'`) key.
+ * @since v15.0.0
+ */
+ readonly type: KeyType;
+ /**
+ * An array of strings identifying the operations for which the key may be used.
+ *
+ * The possible usages are:
+ * - `'encrypt'` - The key may be used to encrypt data.
+ * - `'decrypt'` - The key may be used to decrypt data.
+ * - `'sign'` - The key may be used to generate digital signatures.
+ * - `'verify'` - The key may be used to verify digital signatures.
+ * - `'deriveKey'` - The key may be used to derive a new key.
+ * - `'deriveBits'` - The key may be used to derive bits.
+ * - `'wrapKey'` - The key may be used to wrap another key.
+ * - `'unwrapKey'` - The key may be used to unwrap another key.
+ *
+ * Valid key usages depend on the key algorithm (identified by `cryptokey.algorithm.name`).
+ * @since v15.0.0
+ */
+ readonly usages: KeyUsage[];
+ }
+ /**
+ * The `CryptoKeyPair` is a simple dictionary object with `publicKey` and `privateKey` properties, representing an asymmetric key pair.
+ * @since v15.0.0
+ */
+ interface CryptoKeyPair {
+ /**
+ * A {@link CryptoKey} whose type will be `'private'`.
+ * @since v15.0.0
+ */
+ privateKey: CryptoKey;
+ /**
+ * A {@link CryptoKey} whose type will be `'public'`.
+ * @since v15.0.0
+ */
+ publicKey: CryptoKey;
+ }
+ /**
+ * @since v15.0.0
+ */
+ interface SubtleCrypto {
+ /**
+ * Using the method and parameters specified in `algorithm` and the keying material provided by `key`,
+ * `subtle.decrypt()` attempts to decipher the provided `data`. If successful,
+ * the returned promise will be resolved with an `<ArrayBuffer>` containing the plaintext result.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'RSA-OAEP'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * @since v15.0.0
+ */
+ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ /**
+ * Using the method and parameters specified in `algorithm` and the keying material provided by `baseKey`,
+ * `subtle.deriveBits()` attempts to generate `length` bits.
+ * The Node.js implementation requires that when `length` is a number it must be multiple of `8`.
+ * When `length` is `null` the maximum number of bits for a given algorithm is generated. This is allowed
+ * for the `'ECDH'`, `'X25519'`, and `'X448'` algorithms.
+ * If successful, the returned promise will be resolved with an `<ArrayBuffer>` containing the generated data.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
+ * - `'HKDF'`
+ * - `'PBKDF2'`
+ * @since v15.0.0
+ */
+ deriveBits(algorithm: EcdhKeyDeriveParams, baseKey: CryptoKey, length: number | null): Promise<ArrayBuffer>;
+ deriveBits(algorithm: AlgorithmIdentifier | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
+ /**
+ * Using the method and parameters specified in `algorithm`, and the keying material provided by `baseKey`,
+ * `subtle.deriveKey()` attempts to generate a new <CryptoKey>` based on the method and parameters in `derivedKeyAlgorithm`.
+ *
+ * Calling `subtle.deriveKey()` is equivalent to calling `subtle.deriveBits()` to generate raw keying material,
+ * then passing the result into the `subtle.importKey()` method using the `deriveKeyAlgorithm`, `extractable`, and `keyUsages` parameters as input.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
+ * - `'HKDF'`
+ * - `'PBKDF2'`
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
+ * @since v15.0.0
+ */
+ deriveKey(
+ algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params,
+ baseKey: CryptoKey,
+ derivedKeyAlgorithm: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params,
+ extractable: boolean,
+ keyUsages: ReadonlyArray<KeyUsage>
+ ): Promise<CryptoKey>;
+ /**
+ * Using the method identified by `algorithm`, `subtle.digest()` attempts to generate a digest of `data`.
+ * If successful, the returned promise is resolved with an `<ArrayBuffer>` containing the computed digest.
+ *
+ * If `algorithm` is provided as a `<string>`, it must be one of:
+ *
+ * - `'SHA-1'`
+ * - `'SHA-256'`
+ * - `'SHA-384'`
+ * - `'SHA-512'`
+ *
+ * If `algorithm` is provided as an `<Object>`, it must have a `name` property whose value is one of the above.
+ * @since v15.0.0
+ */
+ digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
+ /**
+ * Using the method and parameters specified by `algorithm` and the keying material provided by `key`,
+ * `subtle.encrypt()` attempts to encipher `data`. If successful,
+ * the returned promise is resolved with an `<ArrayBuffer>` containing the encrypted result.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'RSA-OAEP'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * @since v15.0.0
+ */
+ encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ /**
+ * Exports the given key into the specified format, if supported.
+ *
+ * If the `<CryptoKey>` is not extractable, the returned promise will reject.
+ *
+ * When `format` is either `'pkcs8'` or `'spki'` and the export is successful,
+ * the returned promise will be resolved with an `<ArrayBuffer>` containing the exported key data.
+ *
+ * When `format` is `'jwk'` and the export is successful, the returned promise will be resolved with a
+ * JavaScript object conforming to the {@link https://tools.ietf.org/html/rfc7517 JSON Web Key} specification.
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
+ * @returns `<Promise>` containing `<ArrayBuffer>`.
+ * @since v15.0.0
+ */
+ exportKey(format: 'jwk', key: CryptoKey): Promise<JsonWebKey>;
+ exportKey(format: Exclude<KeyFormat, 'jwk'>, key: CryptoKey): Promise<ArrayBuffer>;
+ /**
+ * Using the method and parameters provided in `algorithm`,
+ * `subtle.generateKey()` attempts to generate new keying material.
+ * Depending the method used, the method may generate either a single `<CryptoKey>` or a `<CryptoKeyPair>`.
+ *
+ * The `<CryptoKeyPair>` (public and private key) generating algorithms supported include:
+ *
+ * - `'RSASSA-PKCS1-v1_5'`
+ * - `'RSA-PSS'`
+ * - `'RSA-OAEP'`
+ * - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
+ * - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
+ * The `<CryptoKey>` (secret key) generating algorithms supported include:
+ *
+ * - `'HMAC'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * - `'AES-KW'`
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
+ * @since v15.0.0
+ */
+ generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
+ generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
+ generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
+ /**
+ * The `subtle.importKey()` method attempts to interpret the provided `keyData` as the given `format`
+ * to create a `<CryptoKey>` instance using the provided `algorithm`, `extractable`, and `keyUsages` arguments.
+ * If the import is successful, the returned promise will be resolved with the created `<CryptoKey>`.
+ *
+ * If importing a `'PBKDF2'` key, `extractable` must be `false`.
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
+ * @since v15.0.0
+ */
+ importKey(
+ format: 'jwk',
+ keyData: JsonWebKey,
+ algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
+ extractable: boolean,
+ keyUsages: ReadonlyArray<KeyUsage>
+ ): Promise<CryptoKey>;
+ importKey(
+ format: Exclude<KeyFormat, 'jwk'>,
+ keyData: BufferSource,
+ algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
+ extractable: boolean,
+ keyUsages: KeyUsage[]
+ ): Promise<CryptoKey>;
+ /**
+ * Using the method and parameters given by `algorithm` and the keying material provided by `key`,
+ * `subtle.sign()` attempts to generate a cryptographic signature of `data`. If successful,
+ * the returned promise is resolved with an `<ArrayBuffer>` containing the generated signature.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'RSASSA-PKCS1-v1_5'`
+ * - `'RSA-PSS'`
+ * - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
+ * - `'HMAC'`
+ * @since v15.0.0
+ */
+ sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ /**
+ * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
+ * The `subtle.unwrapKey()` method attempts to decrypt a wrapped key and create a `<CryptoKey>` instance.
+ * It is equivalent to calling `subtle.decrypt()` first on the encrypted key data (using the `wrappedKey`, `unwrapAlgo`, and `unwrappingKey` arguments as input)
+ * then passing the results in to the `subtle.importKey()` method using the `unwrappedKeyAlgo`, `extractable`, and `keyUsages` arguments as inputs.
+ * If successful, the returned promise is resolved with a `<CryptoKey>` object.
+ *
+ * The wrapping algorithms currently supported include:
+ *
+ * - `'RSA-OAEP'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * - `'AES-KW'`
+ *
+ * The unwrapped key algorithms supported include:
+ *
+ * - `'RSASSA-PKCS1-v1_5'`
+ * - `'RSA-PSS'`
+ * - `'RSA-OAEP'`
+ * - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
+ * - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
+ * - `'HMAC'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * - `'AES-KW'`
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
+ * @since v15.0.0
+ */
+ unwrapKey(
+ format: KeyFormat,
+ wrappedKey: BufferSource,
+ unwrappingKey: CryptoKey,
+ unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,
+ unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
+ extractable: boolean,
+ keyUsages: KeyUsage[]
+ ): Promise<CryptoKey>;
+ /**
+ * Using the method and parameters given in `algorithm` and the keying material provided by `key`,
+ * `subtle.verify()` attempts to verify that `signature` is a valid cryptographic signature of `data`.
+ * The returned promise is resolved with either `true` or `false`.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'RSASSA-PKCS1-v1_5'`
+ * - `'RSA-PSS'`
+ * - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
+ * - `'HMAC'`
+ * @since v15.0.0
+ */
+ verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>;
+ /**
+ * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
+ * The `subtle.wrapKey()` method exports the keying material into the format identified by `format`,
+ * then encrypts it using the method and parameters specified by `wrapAlgo` and the keying material provided by `wrappingKey`.
+ * It is the equivalent to calling `subtle.exportKey()` using `format` and `key` as the arguments,
+ * then passing the result to the `subtle.encrypt()` method using `wrappingKey` and `wrapAlgo` as inputs.
+ * If successful, the returned promise will be resolved with an `<ArrayBuffer>` containing the encrypted key data.
+ *
+ * The wrapping algorithms currently supported include:
+ *
+ * - `'RSA-OAEP'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * - `'AES-KW'`
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
+ * @since v15.0.0
+ */
+ wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): Promise<ArrayBuffer>;
+ }
+ }
+}
+declare module 'node:crypto' {
+ export * from 'crypto';
+}
diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts
new file mode 100755
index 0000000..5b183b8
--- /dev/null
+++ b/node_modules/@types/node/dgram.d.ts
@@ -0,0 +1,550 @@
+/**
+ * The `node:dgram` module provides an implementation of UDP datagram sockets.
+ *
+ * ```js
+ * import dgram from 'node:dgram';
+ *
+ * const server = dgram.createSocket('udp4');
+ *
+ * server.on('error', (err) => {
+ * console.error(`server error:\n${err.stack}`);
+ * server.close();
+ * });
+ *
+ * server.on('message', (msg, rinfo) => {
+ * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
+ * });
+ *
+ * server.on('listening', () => {
+ * const address = server.address();
+ * console.log(`server listening ${address.address}:${address.port}`);
+ * });
+ *
+ * server.bind(41234);
+ * // Prints: server listening 0.0.0.0:41234
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/dgram.js)
+ */
+declare module 'dgram' {
+ import { AddressInfo } from 'node:net';
+ import * as dns from 'node:dns';
+ import { EventEmitter, Abortable } from 'node:events';
+ interface RemoteInfo {
+ address: string;
+ family: 'IPv4' | 'IPv6';
+ port: number;
+ size: number;
+ }
+ interface BindOptions {
+ port?: number | undefined;
+ address?: string | undefined;
+ exclusive?: boolean | undefined;
+ fd?: number | undefined;
+ }
+ type SocketType = 'udp4' | 'udp6';
+ interface SocketOptions extends Abortable {
+ type: SocketType;
+ reuseAddr?: boolean | undefined;
+ /**
+ * @default false
+ */
+ ipv6Only?: boolean | undefined;
+ recvBufferSize?: number | undefined;
+ sendBufferSize?: number | undefined;
+ lookup?: ((hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void) | undefined;
+ }
+ /**
+ * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram
+ * messages. When `address` and `port` are not passed to `socket.bind()` the
+ * method will bind the socket to the "all interfaces" address on a random port
+ * (it does the right thing for both `udp4` and `udp6` sockets). The bound address
+ * and port can be retrieved using `socket.address().address` and `socket.address().port`.
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.close()` on the socket:
+ *
+ * ```js
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const server = dgram.createSocket({ type: 'udp4', signal });
+ * server.on('message', (msg, rinfo) => {
+ * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
+ * });
+ * // Later, when you want to close the server.
+ * controller.abort();
+ * ```
+ * @since v0.11.13
+ * @param options Available options are:
+ * @param callback Attached as a listener for `'message'` events. Optional.
+ */
+ function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
+ function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
+ /**
+ * Encapsulates the datagram functionality.
+ *
+ * New instances of `dgram.Socket` are created using {@link createSocket}.
+ * The `new` keyword is not to be used to create `dgram.Socket` instances.
+ * @since v0.1.99
+ */
+ class Socket extends EventEmitter {
+ /**
+ * Tells the kernel to join a multicast group at the given `multicastAddress` and`multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the`multicastInterface` argument is not
+ * specified, the operating system will choose
+ * one interface and will add membership to it. To add membership to every
+ * available interface, call `addMembership` multiple times, once per interface.
+ *
+ * When called on an unbound socket, this method will implicitly bind to a random
+ * port, listening on all interfaces.
+ *
+ * When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur:
+ *
+ * ```js
+ * import cluster from 'node:cluster';
+ * import dgram from 'node:dgram';
+ *
+ * if (cluster.isPrimary) {
+ * cluster.fork(); // Works ok.
+ * cluster.fork(); // Fails with EADDRINUSE.
+ * } else {
+ * const s = dgram.createSocket('udp4');
+ * s.bind(1234, () => {
+ * s.addMembership('224.0.0.114');
+ * });
+ * }
+ * ```
+ * @since v0.6.9
+ */
+ addMembership(multicastAddress: string, multicastInterface?: string): void;
+ /**
+ * Returns an object containing the address information for a socket.
+ * For UDP sockets, this object will contain `address`, `family`, and `port`properties.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.1.99
+ */
+ address(): AddressInfo;
+ /**
+ * For UDP sockets, causes the `dgram.Socket` to listen for datagram
+ * messages on a named `port` and optional `address`. If `port` is not
+ * specified or is `0`, the operating system will attempt to bind to a
+ * random port. If `address` is not specified, the operating system will
+ * attempt to listen on all addresses. Once binding is complete, a`'listening'` event is emitted and the optional `callback` function is
+ * called.
+ *
+ * Specifying both a `'listening'` event listener and passing a`callback` to the `socket.bind()` method is not harmful but not very
+ * useful.
+ *
+ * A bound datagram socket keeps the Node.js process running to receive
+ * datagram messages.
+ *
+ * If binding fails, an `'error'` event is generated. In rare case (e.g.
+ * attempting to bind with a closed socket), an `Error` may be thrown.
+ *
+ * Example of a UDP server listening on port 41234:
+ *
+ * ```js
+ * import dgram from 'node:dgram';
+ *
+ * const server = dgram.createSocket('udp4');
+ *
+ * server.on('error', (err) => {
+ * console.error(`server error:\n${err.stack}`);
+ * server.close();
+ * });
+ *
+ * server.on('message', (msg, rinfo) => {
+ * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
+ * });
+ *
+ * server.on('listening', () => {
+ * const address = server.address();
+ * console.log(`server listening ${address.address}:${address.port}`);
+ * });
+ *
+ * server.bind(41234);
+ * // Prints: server listening 0.0.0.0:41234
+ * ```
+ * @since v0.1.99
+ * @param callback with no parameters. Called when binding is complete.
+ */
+ bind(port?: number, address?: string, callback?: () => void): this;
+ bind(port?: number, callback?: () => void): this;
+ bind(callback?: () => void): this;
+ bind(options: BindOptions, callback?: () => void): this;
+ /**
+ * Close the underlying socket and stop listening for data on it. If a callback is
+ * provided, it is added as a listener for the `'close'` event.
+ * @since v0.1.99
+ * @param callback Called when the socket has been closed.
+ */
+ close(callback?: () => void): this;
+ /**
+ * Associates the `dgram.Socket` to a remote address and port. Every
+ * message sent by this handle is automatically sent to that destination. Also,
+ * the socket will only receive messages from that remote peer.
+ * Trying to call `connect()` on an already connected socket will result
+ * in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not
+ * provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets)
+ * will be used by default. Once the connection is complete, a `'connect'` event
+ * is emitted and the optional `callback` function is called. In case of failure,
+ * the `callback` is called or, failing this, an `'error'` event is emitted.
+ * @since v12.0.0
+ * @param callback Called when the connection is completed or on error.
+ */
+ connect(port: number, address?: string, callback?: () => void): void;
+ connect(port: number, callback: () => void): void;
+ /**
+ * A synchronous function that disassociates a connected `dgram.Socket` from
+ * its remote address. Trying to call `disconnect()` on an unbound or already
+ * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception.
+ * @since v12.0.0
+ */
+ disconnect(): void;
+ /**
+ * Instructs the kernel to leave a multicast group at `multicastAddress` using the`IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the
+ * kernel when the socket is closed or the process terminates, so most apps will
+ * never have reason to call this.
+ *
+ * If `multicastInterface` is not specified, the operating system will attempt to
+ * drop membership on all valid interfaces.
+ * @since v0.6.9
+ */
+ dropMembership(multicastAddress: string, multicastInterface?: string): void;
+ /**
+ * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+ * @since v8.7.0
+ * @return the `SO_RCVBUF` socket receive buffer size in bytes.
+ */
+ getRecvBufferSize(): number;
+ /**
+ * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+ * @since v8.7.0
+ * @return the `SO_SNDBUF` socket send buffer size in bytes.
+ */
+ getSendBufferSize(): number;
+ /**
+ * By default, binding a socket will cause it to block the Node.js process from
+ * exiting as long as the socket is open. The `socket.unref()` method can be used
+ * to exclude the socket from the reference counting that keeps the Node.js
+ * process active. The `socket.ref()` method adds the socket back to the reference
+ * counting and restores the default behavior.
+ *
+ * Calling `socket.ref()` multiples times will have no additional effect.
+ *
+ * The `socket.ref()` method returns a reference to the socket so calls can be
+ * chained.
+ * @since v0.9.1
+ */
+ ref(): this;
+ /**
+ * Returns an object containing the `address`, `family`, and `port` of the remote
+ * endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception
+ * if the socket is not connected.
+ * @since v12.0.0
+ */
+ remoteAddress(): AddressInfo;
+ /**
+ * Broadcasts a datagram on the socket.
+ * For connectionless sockets, the destination `port` and `address` must be
+ * specified. Connected sockets, on the other hand, will use their associated
+ * remote endpoint, so the `port` and `address` arguments must not be set.
+ *
+ * The `msg` argument contains the message to be sent.
+ * Depending on its type, different behavior can apply. If `msg` is a `Buffer`,
+ * any `TypedArray` or a `DataView`,
+ * the `offset` and `length` specify the offset within the `Buffer` where the
+ * message begins and the number of bytes in the message, respectively.
+ * If `msg` is a `String`, then it is automatically converted to a `Buffer`with `'utf8'` encoding. With messages that
+ * contain multi-byte characters, `offset` and `length` will be calculated with
+ * respect to `byte length` and not the character position.
+ * If `msg` is an array, `offset` and `length` must not be specified.
+ *
+ * The `address` argument is a string. If the value of `address` is a host name,
+ * DNS will be used to resolve the address of the host. If `address` is not
+ * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'`(for `udp6` sockets) will be used by default.
+ *
+ * If the socket has not been previously bound with a call to `bind`, the socket
+ * is assigned a random port number and is bound to the "all interfaces" address
+ * (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.)
+ *
+ * An optional `callback` function may be specified to as a way of reporting
+ * DNS errors or for determining when it is safe to reuse the `buf` object.
+ * DNS lookups delay the time to send for at least one tick of the
+ * Node.js event loop.
+ *
+ * The only way to know for sure that the datagram has been sent is by using a`callback`. If an error occurs and a `callback` is given, the error will be
+ * passed as the first argument to the `callback`. If a `callback` is not given,
+ * the error is emitted as an `'error'` event on the `socket` object.
+ *
+ * Offset and length are optional but both _must_ be set if either are used.
+ * They are supported only when the first argument is a `Buffer`, a `TypedArray`,
+ * or a `DataView`.
+ *
+ * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket.
+ *
+ * Example of sending a UDP packet to a port on `localhost`;
+ *
+ * ```js
+ * import dgram from 'node:dgram';
+ * import { Buffer } from 'node:buffer';
+ *
+ * const message = Buffer.from('Some bytes');
+ * const client = dgram.createSocket('udp4');
+ * client.send(message, 41234, 'localhost', (err) => {
+ * client.close();
+ * });
+ * ```
+ *
+ * Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`;
+ *
+ * ```js
+ * import dgram from 'node:dgram';
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from('Some ');
+ * const buf2 = Buffer.from('bytes');
+ * const client = dgram.createSocket('udp4');
+ * client.send([buf1, buf2], 41234, (err) => {
+ * client.close();
+ * });
+ * ```
+ *
+ * Sending multiple buffers might be faster or slower depending on the
+ * application and operating system. Run benchmarks to
+ * determine the optimal strategy on a case-by-case basis. Generally speaking,
+ * however, sending multiple buffers is faster.
+ *
+ * Example of sending a UDP packet using a socket connected to a port on`localhost`:
+ *
+ * ```js
+ * import dgram from 'node:dgram';
+ * import { Buffer } from 'node:buffer';
+ *
+ * const message = Buffer.from('Some bytes');
+ * const client = dgram.createSocket('udp4');
+ * client.connect(41234, 'localhost', (err) => {
+ * client.send(message, (err) => {
+ * client.close();
+ * });
+ * });
+ * ```
+ * @since v0.1.99
+ * @param msg Message to be sent.
+ * @param offset Offset in the buffer where the message starts.
+ * @param length Number of bytes in the message.
+ * @param port Destination port.
+ * @param address Destination host name or IP address.
+ * @param callback Called when the message has been sent.
+ */
+ send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array | ReadonlyArray<any>, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void;
+ /**
+ * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP
+ * packets may be sent to a local interface's broadcast address.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.6.9
+ */
+ setBroadcast(flag: boolean): void;
+ /**
+ * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC
+ * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_
+ * _with a scope index is written as `'IP%scope'` where scope is an interface name_
+ * _or interface number._
+ *
+ * Sets the default outgoing multicast interface of the socket to a chosen
+ * interface or back to system interface selection. The `multicastInterface` must
+ * be a valid string representation of an IP from the socket's family.
+ *
+ * For IPv4 sockets, this should be the IP configured for the desired physical
+ * interface. All packets sent to multicast on the socket will be sent on the
+ * interface determined by the most recent successful use of this call.
+ *
+ * For IPv6 sockets, `multicastInterface` should include a scope to indicate the
+ * interface as in the examples that follow. In IPv6, individual `send` calls can
+ * also use explicit scope in addresses, so only packets sent to a multicast
+ * address without specifying an explicit scope are affected by the most recent
+ * successful use of this call.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ *
+ * #### Example: IPv6 outgoing multicast interface
+ *
+ * On most systems, where scope format uses the interface name:
+ *
+ * ```js
+ * const socket = dgram.createSocket('udp6');
+ *
+ * socket.bind(1234, () => {
+ * socket.setMulticastInterface('::%eth1');
+ * });
+ * ```
+ *
+ * On Windows, where scope format uses an interface number:
+ *
+ * ```js
+ * const socket = dgram.createSocket('udp6');
+ *
+ * socket.bind(1234, () => {
+ * socket.setMulticastInterface('::%2');
+ * });
+ * ```
+ *
+ * #### Example: IPv4 outgoing multicast interface
+ *
+ * All systems use an IP of the host on the desired physical interface:
+ *
+ * ```js
+ * const socket = dgram.createSocket('udp4');
+ *
+ * socket.bind(1234, () => {
+ * socket.setMulticastInterface('10.0.0.2');
+ * });
+ * ```
+ * @since v8.6.0
+ */
+ setMulticastInterface(multicastInterface: string): void;
+ /**
+ * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`,
+ * multicast packets will also be received on the local interface.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.3.8
+ */
+ setMulticastLoopback(flag: boolean): boolean;
+ /**
+ * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for
+ * "Time to Live", in this context it specifies the number of IP hops that a
+ * packet is allowed to travel through, specifically for multicast traffic. Each
+ * router or gateway that forwards a packet decrements the TTL. If the TTL is
+ * decremented to 0 by a router, it will not be forwarded.
+ *
+ * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.3.8
+ */
+ setMulticastTTL(ttl: number): number;
+ /**
+ * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer
+ * in bytes.
+ *
+ * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+ * @since v8.7.0
+ */
+ setRecvBufferSize(size: number): void;
+ /**
+ * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer
+ * in bytes.
+ *
+ * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+ * @since v8.7.0
+ */
+ setSendBufferSize(size: number): void;
+ /**
+ * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live",
+ * in this context it specifies the number of IP hops that a packet is allowed to
+ * travel through. Each router or gateway that forwards a packet decrements the
+ * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded.
+ * Changing TTL values is typically done for network probes or when multicasting.
+ *
+ * The `ttl` argument may be between 1 and 255\. The default on most systems
+ * is 64.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.1.101
+ */
+ setTTL(ttl: number): number;
+ /**
+ * By default, binding a socket will cause it to block the Node.js process from
+ * exiting as long as the socket is open. The `socket.unref()` method can be used
+ * to exclude the socket from the reference counting that keeps the Node.js
+ * process active, allowing the process to exit even if the socket is still
+ * listening.
+ *
+ * Calling `socket.unref()` multiple times will have no addition effect.
+ *
+ * The `socket.unref()` method returns a reference to the socket so calls can be
+ * chained.
+ * @since v0.9.1
+ */
+ unref(): this;
+ /**
+ * Tells the kernel to join a source-specific multicast channel at the given`sourceAddress` and `groupAddress`, using the `multicastInterface` with the`IP_ADD_SOURCE_MEMBERSHIP` socket
+ * option. If the `multicastInterface` argument
+ * is not specified, the operating system will choose one interface and will add
+ * membership to it. To add membership to every available interface, call`socket.addSourceSpecificMembership()` multiple times, once per interface.
+ *
+ * When called on an unbound socket, this method will implicitly bind to a random
+ * port, listening on all interfaces.
+ * @since v13.1.0, v12.16.0
+ */
+ addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
+ /**
+ * Instructs the kernel to leave a source-specific multicast channel at the given`sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP`socket option. This method is
+ * automatically called by the kernel when the
+ * socket is closed or the process terminates, so most apps will never have
+ * reason to call this.
+ *
+ * If `multicastInterface` is not specified, the operating system will attempt to
+ * drop membership on all valid interfaces.
+ * @since v13.1.0, v12.16.0
+ */
+ dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. connect
+ * 3. error
+ * 4. listening
+ * 5. message
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'connect', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'listening', listener: () => void): this;
+ addListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'connect'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'listening'): boolean;
+ emit(event: 'message', msg: Buffer, rinfo: RemoteInfo): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'connect', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'listening', listener: () => void): this;
+ on(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'connect', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'listening', listener: () => void): this;
+ once(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'connect', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'listening', listener: () => void): this;
+ prependListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'connect', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'listening', listener: () => void): this;
+ prependOnceListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ /**
+ * Calls `socket.close()` and returns a promise that fulfills when the socket has closed.
+ * @since v20.5.0
+ */
+ [Symbol.asyncDispose](): Promise<void>;
+ }
+}
+declare module 'node:dgram' {
+ export * from 'dgram';
+}
diff --git a/node_modules/@types/node/diagnostics_channel.d.ts b/node_modules/@types/node/diagnostics_channel.d.ts
new file mode 100755
index 0000000..5f19b20
--- /dev/null
+++ b/node_modules/@types/node/diagnostics_channel.d.ts
@@ -0,0 +1,191 @@
+/**
+ * The `node:diagnostics_channel` module provides an API to create named channels
+ * to report arbitrary message data for diagnostics purposes.
+ *
+ * It can be accessed using:
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ * ```
+ *
+ * It is intended that a module writer wanting to report diagnostics messages
+ * will create one or many top-level channels to report messages through.
+ * Channels may also be acquired at runtime but it is not encouraged
+ * due to the additional overhead of doing so. Channels may be exported for
+ * convenience, but as long as the name is known it can be acquired anywhere.
+ *
+ * If you intend for your module to produce diagnostics data for others to
+ * consume it is recommended that you include documentation of what named
+ * channels are used along with the shape of the message data. Channel names
+ * should generally include the module name to avoid collisions with data from
+ * other modules.
+ * @since v15.1.0, v14.17.0
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/diagnostics_channel.js)
+ */
+declare module 'diagnostics_channel' {
+ /**
+ * Check if there are active subscribers to the named channel. This is helpful if
+ * the message you want to send might be expensive to prepare.
+ *
+ * This API is optional but helpful when trying to publish messages from very
+ * performance-sensitive code.
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ *
+ * if (diagnostics_channel.hasSubscribers('my-channel')) {
+ * // There are subscribers, prepare and publish message
+ * }
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @param name The channel name
+ * @return If there are active subscribers
+ */
+ function hasSubscribers(name: string | symbol): boolean;
+ /**
+ * This is the primary entry-point for anyone wanting to publish to a named
+ * channel. It produces a channel object which is optimized to reduce overhead at
+ * publish time as much as possible.
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @param name The channel name
+ * @return The named channel object
+ */
+ function channel(name: string | symbol): Channel;
+ type ChannelListener = (message: unknown, name: string | symbol) => void;
+ /**
+ * Register a message handler to subscribe to this channel. This message handler
+ * will be run synchronously whenever a message is published to the channel. Any
+ * errors thrown in the message handler will trigger an `'uncaughtException'`.
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ *
+ * diagnostics_channel.subscribe('my-channel', (message, name) => {
+ * // Received data
+ * });
+ * ```
+ * @since v18.7.0, v16.17.0
+ * @param name The channel name
+ * @param onMessage The handler to receive channel messages
+ */
+ function subscribe(name: string | symbol, onMessage: ChannelListener): void;
+ /**
+ * Remove a message handler previously registered to this channel with {@link subscribe}.
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ *
+ * function onMessage(message, name) {
+ * // Received data
+ * }
+ *
+ * diagnostics_channel.subscribe('my-channel', onMessage);
+ *
+ * diagnostics_channel.unsubscribe('my-channel', onMessage);
+ * ```
+ * @since v18.7.0, v16.17.0
+ * @param name The channel name
+ * @param onMessage The previous subscribed handler to remove
+ * @return `true` if the handler was found, `false` otherwise.
+ */
+ function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean;
+ /**
+ * The class `Channel` represents an individual named channel within the data
+ * pipeline. It is used to track subscribers and to publish messages when there
+ * are subscribers present. It exists as a separate object to avoid channel
+ * lookups at publish time, enabling very fast publish speeds and allowing
+ * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly
+ * with `new Channel(name)` is not supported.
+ * @since v15.1.0, v14.17.0
+ */
+ class Channel {
+ readonly name: string | symbol;
+ /**
+ * Check if there are active subscribers to this channel. This is helpful if
+ * the message you want to send might be expensive to prepare.
+ *
+ * This API is optional but helpful when trying to publish messages from very
+ * performance-sensitive code.
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ *
+ * if (channel.hasSubscribers) {
+ * // There are subscribers, prepare and publish message
+ * }
+ * ```
+ * @since v15.1.0, v14.17.0
+ */
+ readonly hasSubscribers: boolean;
+ private constructor(name: string | symbol);
+ /**
+ * Publish a message to any subscribers to the channel. This will trigger
+ * message handlers synchronously so they will execute within the same context.
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ *
+ * channel.publish({
+ * some: 'message',
+ * });
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @param message The message to send to the channel subscribers
+ */
+ publish(message: unknown): void;
+ /**
+ * Register a message handler to subscribe to this channel. This message handler
+ * will be run synchronously whenever a message is published to the channel. Any
+ * errors thrown in the message handler will trigger an `'uncaughtException'`.
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ *
+ * channel.subscribe((message, name) => {
+ * // Received data
+ * });
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @deprecated Since v18.7.0,v16.17.0 - Use {@link subscribe(name, onMessage)}
+ * @param onMessage The handler to receive channel messages
+ */
+ subscribe(onMessage: ChannelListener): void;
+ /**
+ * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`.
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ *
+ * function onMessage(message, name) {
+ * // Received data
+ * }
+ *
+ * channel.subscribe(onMessage);
+ *
+ * channel.unsubscribe(onMessage);
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @deprecated Since v18.7.0,v16.17.0 - Use {@link unsubscribe(name, onMessage)}
+ * @param onMessage The previous subscribed handler to remove
+ * @return `true` if the handler was found, `false` otherwise.
+ */
+ unsubscribe(onMessage: ChannelListener): void;
+ }
+}
+declare module 'node:diagnostics_channel' {
+ export * from 'diagnostics_channel';
+}
diff --git a/node_modules/@types/node/dns.d.ts b/node_modules/@types/node/dns.d.ts
new file mode 100755
index 0000000..db3febc
--- /dev/null
+++ b/node_modules/@types/node/dns.d.ts
@@ -0,0 +1,668 @@
+/**
+ * The `node:dns` module enables name resolution. For example, use it to look up IP
+ * addresses of host names.
+ *
+ * Although named for the [Domain Name System (DNS)](https://en.wikipedia.org/wiki/Domain_Name_System), it does not always use the
+ * DNS protocol for lookups. {@link lookup} uses the operating system
+ * facilities to perform name resolution. It may not need to perform any network
+ * communication. To perform name resolution the way other applications on the same
+ * system do, use {@link lookup}.
+ *
+ * ```js
+ * const dns = require('node:dns');
+ *
+ * dns.lookup('example.org', (err, address, family) => {
+ * console.log('address: %j family: IPv%s', address, family);
+ * });
+ * // address: "93.184.216.34" family: IPv4
+ * ```
+ *
+ * All other functions in the `node:dns` module connect to an actual DNS server to
+ * perform name resolution. They will always use the network to perform DNS
+ * queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform
+ * DNS queries, bypassing other name-resolution facilities.
+ *
+ * ```js
+ * const dns = require('node:dns');
+ *
+ * dns.resolve4('archive.org', (err, addresses) => {
+ * if (err) throw err;
+ *
+ * console.log(`addresses: ${JSON.stringify(addresses)}`);
+ *
+ * addresses.forEach((a) => {
+ * dns.reverse(a, (err, hostnames) => {
+ * if (err) {
+ * throw err;
+ * }
+ * console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`);
+ * });
+ * });
+ * });
+ * ```
+ *
+ * See the `Implementation considerations section` for more information.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/dns.js)
+ */
+declare module 'dns' {
+ import * as dnsPromises from 'node:dns/promises';
+ // Supported getaddrinfo flags.
+ export const ADDRCONFIG: number;
+ export const V4MAPPED: number;
+ /**
+ * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
+ * well as IPv4 mapped IPv6 addresses.
+ */
+ export const ALL: number;
+ export interface LookupOptions {
+ family?: number | undefined;
+ hints?: number | undefined;
+ all?: boolean | undefined;
+ /**
+ * @default true
+ */
+ verbatim?: boolean | undefined;
+ }
+ export interface LookupOneOptions extends LookupOptions {
+ all?: false | undefined;
+ }
+ export interface LookupAllOptions extends LookupOptions {
+ all: true;
+ }
+ export interface LookupAddress {
+ address: string;
+ family: number;
+ }
+ /**
+ * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
+ * AAAA (IPv6) record. All `option` properties are optional. If `options` is an
+ * integer, then it must be `4` or `6` – if `options` is `0` or not provided, then
+ * IPv4 and IPv6 addresses are both returned if found.
+ *
+ * With the `all` option set to `true`, the arguments for `callback` change to`(err, addresses)`, with `addresses` being an array of objects with the
+ * properties `address` and `family`.
+ *
+ * On error, `err` is an `Error` object, where `err.code` is the error code.
+ * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
+ * the host name does not exist but also when the lookup fails in other ways
+ * such as no available file descriptors.
+ *
+ * `dns.lookup()` does not necessarily have anything to do with the DNS protocol.
+ * The implementation uses an operating system facility that can associate names
+ * with addresses and vice versa. This implementation can have subtle but
+ * important consequences on the behavior of any Node.js program. Please take some
+ * time to consult the `Implementation considerations section` before using`dns.lookup()`.
+ *
+ * Example usage:
+ *
+ * ```js
+ * const dns = require('node:dns');
+ * const options = {
+ * family: 6,
+ * hints: dns.ADDRCONFIG | dns.V4MAPPED,
+ * };
+ * dns.lookup('example.com', options, (err, address, family) =>
+ * console.log('address: %j family: IPv%s', address, family));
+ * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
+ *
+ * // When options.all is true, the result will be an Array.
+ * options.all = true;
+ * dns.lookup('example.com', options, (err, addresses) =>
+ * console.log('addresses: %j', addresses));
+ * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
+ * ```
+ *
+ * If this method is invoked as its `util.promisify()` ed version, and `all`is not set to `true`, it returns a `Promise` for an `Object` with `address` and`family` properties.
+ * @since v0.1.90
+ */
+ export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+ export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+ export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void;
+ export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void;
+ export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+ export namespace lookup {
+ function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
+ function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
+ function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
+ }
+ /**
+ * Resolves the given `address` and `port` into a host name and service using
+ * the operating system's underlying `getnameinfo` implementation.
+ *
+ * If `address` is not a valid IP address, a `TypeError` will be thrown.
+ * The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown.
+ *
+ * On an error, `err` is an `Error` object, where `err.code` is the error code.
+ *
+ * ```js
+ * const dns = require('node:dns');
+ * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {
+ * console.log(hostname, service);
+ * // Prints: localhost ssh
+ * });
+ * ```
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns a`Promise` for an `Object` with `hostname` and `service` properties.
+ * @since v0.11.14
+ */
+ export function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
+ export namespace lookupService {
+ function __promisify__(
+ address: string,
+ port: number
+ ): Promise<{
+ hostname: string;
+ service: string;
+ }>;
+ }
+ export interface ResolveOptions {
+ ttl: boolean;
+ }
+ export interface ResolveWithTtlOptions extends ResolveOptions {
+ ttl: true;
+ }
+ export interface RecordWithTtl {
+ address: string;
+ ttl: number;
+ }
+ /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
+ export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
+ export interface AnyARecord extends RecordWithTtl {
+ type: 'A';
+ }
+ export interface AnyAaaaRecord extends RecordWithTtl {
+ type: 'AAAA';
+ }
+ export interface CaaRecord {
+ critical: number;
+ issue?: string | undefined;
+ issuewild?: string | undefined;
+ iodef?: string | undefined;
+ contactemail?: string | undefined;
+ contactphone?: string | undefined;
+ }
+ export interface MxRecord {
+ priority: number;
+ exchange: string;
+ }
+ export interface AnyMxRecord extends MxRecord {
+ type: 'MX';
+ }
+ export interface NaptrRecord {
+ flags: string;
+ service: string;
+ regexp: string;
+ replacement: string;
+ order: number;
+ preference: number;
+ }
+ export interface AnyNaptrRecord extends NaptrRecord {
+ type: 'NAPTR';
+ }
+ export interface SoaRecord {
+ nsname: string;
+ hostmaster: string;
+ serial: number;
+ refresh: number;
+ retry: number;
+ expire: number;
+ minttl: number;
+ }
+ export interface AnySoaRecord extends SoaRecord {
+ type: 'SOA';
+ }
+ export interface SrvRecord {
+ priority: number;
+ weight: number;
+ port: number;
+ name: string;
+ }
+ export interface AnySrvRecord extends SrvRecord {
+ type: 'SRV';
+ }
+ export interface AnyTxtRecord {
+ type: 'TXT';
+ entries: string[];
+ }
+ export interface AnyNsRecord {
+ type: 'NS';
+ value: string;
+ }
+ export interface AnyPtrRecord {
+ type: 'PTR';
+ value: string;
+ }
+ export interface AnyCnameRecord {
+ type: 'CNAME';
+ value: string;
+ }
+ export type AnyRecord = AnyARecord | AnyAaaaRecord | AnyCnameRecord | AnyMxRecord | AnyNaptrRecord | AnyNsRecord | AnyPtrRecord | AnySoaRecord | AnySrvRecord | AnyTxtRecord;
+ /**
+ * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
+ * of the resource records. The `callback` function has arguments`(err, records)`. When successful, `records` will be an array of resource
+ * records. The type and structure of individual results varies based on `rrtype`:
+ *
+ * <omitted>
+ *
+ * On error, `err` is an `Error` object, where `err.code` is one of the `DNS error codes`.
+ * @since v0.1.27
+ * @param hostname Host name to resolve.
+ * @param [rrtype='A'] Resource record type.
+ */
+ export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'A', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'AAAA', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'ANY', callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'CNAME', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'MX', callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'NAPTR', callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'NS', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'PTR', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'SOA', callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
+ export function resolve(hostname: string, rrtype: 'SRV', callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'TXT', callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
+ export function resolve(
+ hostname: string,
+ rrtype: string,
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void
+ ): void;
+ export namespace resolve {
+ function __promisify__(hostname: string, rrtype?: 'A' | 'AAAA' | 'CNAME' | 'NS' | 'PTR'): Promise<string[]>;
+ function __promisify__(hostname: string, rrtype: 'ANY'): Promise<AnyRecord[]>;
+ function __promisify__(hostname: string, rrtype: 'MX'): Promise<MxRecord[]>;
+ function __promisify__(hostname: string, rrtype: 'NAPTR'): Promise<NaptrRecord[]>;
+ function __promisify__(hostname: string, rrtype: 'SOA'): Promise<SoaRecord>;
+ function __promisify__(hostname: string, rrtype: 'SRV'): Promise<SrvRecord[]>;
+ function __promisify__(hostname: string, rrtype: 'TXT'): Promise<string[][]>;
+ function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the`hostname`. The `addresses` argument passed to the `callback` function
+ * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
+ * @since v0.1.16
+ * @param hostname Host name to resolve.
+ */
+ export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
+ export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
+ export namespace resolve4 {
+ function __promisify__(hostname: string): Promise<string[]>;
+ function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the`hostname`. The `addresses` argument passed to the `callback` function
+ * will contain an array of IPv6 addresses.
+ * @since v0.1.16
+ * @param hostname Host name to resolve.
+ */
+ export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
+ export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
+ export namespace resolve6 {
+ function __promisify__(hostname: string): Promise<string[]>;
+ function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The`addresses` argument passed to the `callback` function
+ * will contain an array of canonical name records available for the `hostname`(e.g. `['bar.example.com']`).
+ * @since v0.3.2
+ */
+ export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export namespace resolveCname {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The`addresses` argument passed to the `callback` function
+ * will contain an array of certification authority authorization records
+ * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
+ * @since v15.0.0, v14.17.0
+ */
+ export function resolveCaa(hostname: string, callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void): void;
+ export namespace resolveCaa {
+ function __promisify__(hostname: string): Promise<CaaRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
+ * contain an array of objects containing both a `priority` and `exchange`property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
+ * @since v0.1.27
+ */
+ export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
+ export namespace resolveMx {
+ function __promisify__(hostname: string): Promise<MxRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve regular expression-based records (`NAPTR`records) for the `hostname`. The `addresses` argument passed to the `callback`function will contain an array of
+ * objects with the following properties:
+ *
+ * * `flags`
+ * * `service`
+ * * `regexp`
+ * * `replacement`
+ * * `order`
+ * * `preference`
+ *
+ * ```js
+ * {
+ * flags: 's',
+ * service: 'SIP+D2U',
+ * regexp: '',
+ * replacement: '_sip._udp.example.com',
+ * order: 30,
+ * preference: 100
+ * }
+ * ```
+ * @since v0.9.12
+ */
+ export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
+ export namespace resolveNaptr {
+ function __promisify__(hostname: string): Promise<NaptrRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
+ * contain an array of name server records available for `hostname`(e.g. `['ns1.example.com', 'ns2.example.com']`).
+ * @since v0.1.90
+ */
+ export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export namespace resolveNs {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
+ * be an array of strings containing the reply records.
+ * @since v6.0.0
+ */
+ export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export namespace resolvePtr {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
+ * the `hostname`. The `address` argument passed to the `callback` function will
+ * be an object with the following properties:
+ *
+ * * `nsname`
+ * * `hostmaster`
+ * * `serial`
+ * * `refresh`
+ * * `retry`
+ * * `expire`
+ * * `minttl`
+ *
+ * ```js
+ * {
+ * nsname: 'ns.example.com',
+ * hostmaster: 'root.example.com',
+ * serial: 2013101809,
+ * refresh: 10000,
+ * retry: 2400,
+ * expire: 604800,
+ * minttl: 3600
+ * }
+ * ```
+ * @since v0.11.10
+ */
+ export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
+ export namespace resolveSoa {
+ function __promisify__(hostname: string): Promise<SoaRecord>;
+ }
+ /**
+ * Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
+ * be an array of objects with the following properties:
+ *
+ * * `priority`
+ * * `weight`
+ * * `port`
+ * * `name`
+ *
+ * ```js
+ * {
+ * priority: 10,
+ * weight: 5,
+ * port: 21223,
+ * name: 'service.example.com'
+ * }
+ * ```
+ * @since v0.1.27
+ */
+ export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
+ export namespace resolveSrv {
+ function __promisify__(hostname: string): Promise<SrvRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. The `records` argument passed to the `callback` function is a
+ * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
+ * one record. Depending on the use case, these could be either joined together or
+ * treated separately.
+ * @since v0.1.27
+ */
+ export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
+ export namespace resolveTxt {
+ function __promisify__(hostname: string): Promise<string[][]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
+ * The `ret` argument passed to the `callback` function will be an array containing
+ * various types of records. Each object has a property `type` that indicates the
+ * type of the current record. And depending on the `type`, additional properties
+ * will be present on the object:
+ *
+ * <omitted>
+ *
+ * Here is an example of the `ret` object passed to the callback:
+ *
+ * ```js
+ * [ { type: 'A', address: '127.0.0.1', ttl: 299 },
+ * { type: 'CNAME', value: 'example.com' },
+ * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
+ * { type: 'NS', value: 'ns1.example.com' },
+ * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
+ * { type: 'SOA',
+ * nsname: 'ns1.example.com',
+ * hostmaster: 'admin.example.com',
+ * serial: 156696742,
+ * refresh: 900,
+ * retry: 900,
+ * expire: 1800,
+ * minttl: 60 } ]
+ * ```
+ *
+ * DNS server operators may choose not to respond to `ANY`queries. It may be better to call individual methods like {@link resolve4},{@link resolveMx}, and so on. For more details, see [RFC
+ * 8482](https://tools.ietf.org/html/rfc8482).
+ */
+ export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
+ export namespace resolveAny {
+ function __promisify__(hostname: string): Promise<AnyRecord[]>;
+ }
+ /**
+ * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
+ * array of host names.
+ *
+ * On error, `err` is an `Error` object, where `err.code` is
+ * one of the `DNS error codes`.
+ * @since v0.1.16
+ */
+ export function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void;
+ /**
+ * Get the default value for `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be:
+ *
+ * * `ipv4first`: for `verbatim` defaulting to `false`.
+ * * `verbatim`: for `verbatim` defaulting to `true`.
+ * @since v20.1.0
+ */
+ export function getDefaultResultOrder(): 'ipv4first' | 'verbatim';
+ /**
+ * Sets the IP address and port of servers to be used when performing DNS
+ * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
+ * addresses. If the port is the IANA default DNS port (53) it can be omitted.
+ *
+ * ```js
+ * dns.setServers([
+ * '4.4.4.4',
+ * '[2001:4860:4860::8888]',
+ * '4.4.4.4:1053',
+ * '[2001:4860:4860::8888]:1053',
+ * ]);
+ * ```
+ *
+ * An error will be thrown if an invalid address is provided.
+ *
+ * The `dns.setServers()` method must not be called while a DNS query is in
+ * progress.
+ *
+ * The {@link setServers} method affects only {@link resolve},`dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}).
+ *
+ * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
+ * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
+ * subsequent servers provided. Fallback DNS servers will only be used if the
+ * earlier ones time out or result in some other error.
+ * @since v0.11.3
+ * @param servers array of `RFC 5952` formatted addresses
+ */
+ export function setServers(servers: ReadonlyArray<string>): void;
+ /**
+ * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
+ * that are currently configured for DNS resolution. A string will include a port
+ * section if a custom port is used.
+ *
+ * ```js
+ * [
+ * '4.4.4.4',
+ * '2001:4860:4860::8888',
+ * '4.4.4.4:1053',
+ * '[2001:4860:4860::8888]:1053',
+ * ]
+ * ```
+ * @since v0.11.3
+ */
+ export function getServers(): string[];
+ /**
+ * Set the default value of `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be:
+ *
+ * * `ipv4first`: sets default `verbatim` `false`.
+ * * `verbatim`: sets default `verbatim` `true`.
+ *
+ * The default is `verbatim` and {@link setDefaultResultOrder} have higher
+ * priority than `--dns-result-order`. When using `worker threads`,{@link setDefaultResultOrder} from the main thread won't affect the default
+ * dns orders in workers.
+ * @since v16.4.0, v14.18.0
+ * @param order must be `'ipv4first'` or `'verbatim'`.
+ */
+ export function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
+ // Error codes
+ export const NODATA: string;
+ export const FORMERR: string;
+ export const SERVFAIL: string;
+ export const NOTFOUND: string;
+ export const NOTIMP: string;
+ export const REFUSED: string;
+ export const BADQUERY: string;
+ export const BADNAME: string;
+ export const BADFAMILY: string;
+ export const BADRESP: string;
+ export const CONNREFUSED: string;
+ export const TIMEOUT: string;
+ export const EOF: string;
+ export const FILE: string;
+ export const NOMEM: string;
+ export const DESTRUCTION: string;
+ export const BADSTR: string;
+ export const BADFLAGS: string;
+ export const NONAME: string;
+ export const BADHINTS: string;
+ export const NOTINITIALIZED: string;
+ export const LOADIPHLPAPI: string;
+ export const ADDRGETNETWORKPARAMS: string;
+ export const CANCELLED: string;
+ export interface ResolverOptions {
+ timeout?: number | undefined;
+ /**
+ * @default 4
+ */
+ tries?: number;
+ }
+ /**
+ * An independent resolver for DNS requests.
+ *
+ * Creating a new resolver uses the default server settings. Setting
+ * the servers used for a resolver using `resolver.setServers()` does not affect
+ * other resolvers:
+ *
+ * ```js
+ * const { Resolver } = require('node:dns');
+ * const resolver = new Resolver();
+ * resolver.setServers(['4.4.4.4']);
+ *
+ * // This request will use the server at 4.4.4.4, independent of global settings.
+ * resolver.resolve4('example.org', (err, addresses) => {
+ * // ...
+ * });
+ * ```
+ *
+ * The following methods from the `node:dns` module are available:
+ *
+ * * `resolver.getServers()`
+ * * `resolver.resolve()`
+ * * `resolver.resolve4()`
+ * * `resolver.resolve6()`
+ * * `resolver.resolveAny()`
+ * * `resolver.resolveCaa()`
+ * * `resolver.resolveCname()`
+ * * `resolver.resolveMx()`
+ * * `resolver.resolveNaptr()`
+ * * `resolver.resolveNs()`
+ * * `resolver.resolvePtr()`
+ * * `resolver.resolveSoa()`
+ * * `resolver.resolveSrv()`
+ * * `resolver.resolveTxt()`
+ * * `resolver.reverse()`
+ * * `resolver.setServers()`
+ * @since v8.3.0
+ */
+ export class Resolver {
+ constructor(options?: ResolverOptions);
+ /**
+ * Cancel all outstanding DNS queries made by this resolver. The corresponding
+ * callbacks will be called with an error with code `ECANCELLED`.
+ * @since v8.3.0
+ */
+ cancel(): void;
+ getServers: typeof getServers;
+ resolve: typeof resolve;
+ resolve4: typeof resolve4;
+ resolve6: typeof resolve6;
+ resolveAny: typeof resolveAny;
+ resolveCaa: typeof resolveCaa;
+ resolveCname: typeof resolveCname;
+ resolveMx: typeof resolveMx;
+ resolveNaptr: typeof resolveNaptr;
+ resolveNs: typeof resolveNs;
+ resolvePtr: typeof resolvePtr;
+ resolveSoa: typeof resolveSoa;
+ resolveSrv: typeof resolveSrv;
+ resolveTxt: typeof resolveTxt;
+ reverse: typeof reverse;
+ /**
+ * The resolver instance will send its requests from the specified IP address.
+ * This allows programs to specify outbound interfaces when used on multi-homed
+ * systems.
+ *
+ * If a v4 or v6 address is not specified, it is set to the default and the
+ * operating system will choose a local address automatically.
+ *
+ * The resolver will use the v4 local address when making requests to IPv4 DNS
+ * servers, and the v6 local address when making requests to IPv6 DNS servers.
+ * The `rrtype` of resolution requests has no impact on the local address used.
+ * @since v15.1.0, v14.17.0
+ * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
+ * @param [ipv6='::0'] A string representation of an IPv6 address.
+ */
+ setLocalAddress(ipv4?: string, ipv6?: string): void;
+ setServers: typeof setServers;
+ }
+ export { dnsPromises as promises };
+}
+declare module 'node:dns' {
+ export * from 'dns';
+}
diff --git a/node_modules/@types/node/dns/promises.d.ts b/node_modules/@types/node/dns/promises.d.ts
new file mode 100755
index 0000000..4c151e4
--- /dev/null
+++ b/node_modules/@types/node/dns/promises.d.ts
@@ -0,0 +1,414 @@
+/**
+ * The `dns.promises` API provides an alternative set of asynchronous DNS methods
+ * that return `Promise` objects rather than using callbacks. The API is accessible
+ * via `require('node:dns').promises` or `require('node:dns/promises')`.
+ * @since v10.6.0
+ */
+declare module 'dns/promises' {
+ import {
+ LookupAddress,
+ LookupOneOptions,
+ LookupAllOptions,
+ LookupOptions,
+ AnyRecord,
+ CaaRecord,
+ MxRecord,
+ NaptrRecord,
+ SoaRecord,
+ SrvRecord,
+ ResolveWithTtlOptions,
+ RecordWithTtl,
+ ResolveOptions,
+ ResolverOptions,
+ } from 'node:dns';
+ /**
+ * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
+ * that are currently configured for DNS resolution. A string will include a port
+ * section if a custom port is used.
+ *
+ * ```js
+ * [
+ * '4.4.4.4',
+ * '2001:4860:4860::8888',
+ * '4.4.4.4:1053',
+ * '[2001:4860:4860::8888]:1053',
+ * ]
+ * ```
+ * @since v10.6.0
+ */
+ function getServers(): string[];
+ /**
+ * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
+ * AAAA (IPv6) record. All `option` properties are optional. If `options` is an
+ * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4
+ * and IPv6 addresses are both returned if found.
+ *
+ * With the `all` option set to `true`, the `Promise` is resolved with `addresses`being an array of objects with the properties `address` and `family`.
+ *
+ * On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code.
+ * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
+ * the host name does not exist but also when the lookup fails in other ways
+ * such as no available file descriptors.
+ *
+ * `dnsPromises.lookup()` does not necessarily have anything to do with the DNS
+ * protocol. The implementation uses an operating system facility that can
+ * associate names with addresses and vice versa. This implementation can have
+ * subtle but important consequences on the behavior of any Node.js program. Please
+ * take some time to consult the `Implementation considerations section` before
+ * using `dnsPromises.lookup()`.
+ *
+ * Example usage:
+ *
+ * ```js
+ * const dns = require('node:dns');
+ * const dnsPromises = dns.promises;
+ * const options = {
+ * family: 6,
+ * hints: dns.ADDRCONFIG | dns.V4MAPPED,
+ * };
+ *
+ * dnsPromises.lookup('example.com', options).then((result) => {
+ * console.log('address: %j family: IPv%s', result.address, result.family);
+ * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
+ * });
+ *
+ * // When options.all is true, the result will be an Array.
+ * options.all = true;
+ * dnsPromises.lookup('example.com', options).then((result) => {
+ * console.log('addresses: %j', result);
+ * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
+ * });
+ * ```
+ * @since v10.6.0
+ */
+ function lookup(hostname: string, family: number): Promise<LookupAddress>;
+ function lookup(hostname: string, options: LookupOneOptions): Promise<LookupAddress>;
+ function lookup(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
+ function lookup(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
+ function lookup(hostname: string): Promise<LookupAddress>;
+ /**
+ * Resolves the given `address` and `port` into a host name and service using
+ * the operating system's underlying `getnameinfo` implementation.
+ *
+ * If `address` is not a valid IP address, a `TypeError` will be thrown.
+ * The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown.
+ *
+ * On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code.
+ *
+ * ```js
+ * const dnsPromises = require('node:dns').promises;
+ * dnsPromises.lookupService('127.0.0.1', 22).then((result) => {
+ * console.log(result.hostname, result.service);
+ * // Prints: localhost ssh
+ * });
+ * ```
+ * @since v10.6.0
+ */
+ function lookupService(
+ address: string,
+ port: number
+ ): Promise<{
+ hostname: string;
+ service: string;
+ }>;
+ /**
+ * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
+ * of the resource records. When successful, the `Promise` is resolved with an
+ * array of resource records. The type and structure of individual results vary
+ * based on `rrtype`:
+ *
+ * <omitted>
+ *
+ * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the `DNS error codes`.
+ * @since v10.6.0
+ * @param hostname Host name to resolve.
+ * @param [rrtype='A'] Resource record type.
+ */
+ function resolve(hostname: string): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'A'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'AAAA'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'ANY'): Promise<AnyRecord[]>;
+ function resolve(hostname: string, rrtype: 'CAA'): Promise<CaaRecord[]>;
+ function resolve(hostname: string, rrtype: 'CNAME'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'MX'): Promise<MxRecord[]>;
+ function resolve(hostname: string, rrtype: 'NAPTR'): Promise<NaptrRecord[]>;
+ function resolve(hostname: string, rrtype: 'NS'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'PTR'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'SOA'): Promise<SoaRecord>;
+ function resolve(hostname: string, rrtype: 'SRV'): Promise<SrvRecord[]>;
+ function resolve(hostname: string, rrtype: 'TXT'): Promise<string[][]>;
+ function resolve(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv4
+ * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
+ * @since v10.6.0
+ * @param hostname Host name to resolve.
+ */
+ function resolve4(hostname: string): Promise<string[]>;
+ function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ /**
+ * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv6
+ * addresses.
+ * @since v10.6.0
+ * @param hostname Host name to resolve.
+ */
+ function resolve6(hostname: string): Promise<string[]>;
+ function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function resolve6(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ /**
+ * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
+ * On success, the `Promise` is resolved with an array containing various types of
+ * records. Each object has a property `type` that indicates the type of the
+ * current record. And depending on the `type`, additional properties will be
+ * present on the object:
+ *
+ * <omitted>
+ *
+ * Here is an example of the result object:
+ *
+ * ```js
+ * [ { type: 'A', address: '127.0.0.1', ttl: 299 },
+ * { type: 'CNAME', value: 'example.com' },
+ * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
+ * { type: 'NS', value: 'ns1.example.com' },
+ * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
+ * { type: 'SOA',
+ * nsname: 'ns1.example.com',
+ * hostmaster: 'admin.example.com',
+ * serial: 156696742,
+ * refresh: 900,
+ * retry: 900,
+ * expire: 1800,
+ * minttl: 60 } ]
+ * ```
+ * @since v10.6.0
+ */
+ function resolveAny(hostname: string): Promise<AnyRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success,
+ * the `Promise` is resolved with an array of objects containing available
+ * certification authority authorization records available for the `hostname`(e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`).
+ * @since v15.0.0, v14.17.0
+ */
+ function resolveCaa(hostname: string): Promise<CaaRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success,
+ * the `Promise` is resolved with an array of canonical name records available for
+ * the `hostname` (e.g. `['bar.example.com']`).
+ * @since v10.6.0
+ */
+ function resolveCname(hostname: string): Promise<string[]>;
+ /**
+ * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects
+ * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`).
+ * @since v10.6.0
+ */
+ function resolveMx(hostname: string): Promise<MxRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve regular expression-based records (`NAPTR`records) for the `hostname`. On success, the `Promise` is resolved with an array
+ * of objects with the following properties:
+ *
+ * * `flags`
+ * * `service`
+ * * `regexp`
+ * * `replacement`
+ * * `order`
+ * * `preference`
+ *
+ * ```js
+ * {
+ * flags: 's',
+ * service: 'SIP+D2U',
+ * regexp: '',
+ * replacement: '_sip._udp.example.com',
+ * order: 30,
+ * preference: 100
+ * }
+ * ```
+ * @since v10.6.0
+ */
+ function resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. On success, the `Promise` is resolved with an array of name server
+ * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`).
+ * @since v10.6.0
+ */
+ function resolveNs(hostname: string): Promise<string[]>;
+ /**
+ * Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. On success, the `Promise` is resolved with an array of strings
+ * containing the reply records.
+ * @since v10.6.0
+ */
+ function resolvePtr(hostname: string): Promise<string[]>;
+ /**
+ * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
+ * the `hostname`. On success, the `Promise` is resolved with an object with the
+ * following properties:
+ *
+ * * `nsname`
+ * * `hostmaster`
+ * * `serial`
+ * * `refresh`
+ * * `retry`
+ * * `expire`
+ * * `minttl`
+ *
+ * ```js
+ * {
+ * nsname: 'ns.example.com',
+ * hostmaster: 'root.example.com',
+ * serial: 2013101809,
+ * refresh: 10000,
+ * retry: 2400,
+ * expire: 604800,
+ * minttl: 3600
+ * }
+ * ```
+ * @since v10.6.0
+ */
+ function resolveSoa(hostname: string): Promise<SoaRecord>;
+ /**
+ * Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects with
+ * the following properties:
+ *
+ * * `priority`
+ * * `weight`
+ * * `port`
+ * * `name`
+ *
+ * ```js
+ * {
+ * priority: 10,
+ * weight: 5,
+ * port: 21223,
+ * name: 'service.example.com'
+ * }
+ * ```
+ * @since v10.6.0
+ */
+ function resolveSrv(hostname: string): Promise<SrvRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. On success, the `Promise` is resolved with a two-dimensional array
+ * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
+ * one record. Depending on the use case, these could be either joined together or
+ * treated separately.
+ * @since v10.6.0
+ */
+ function resolveTxt(hostname: string): Promise<string[][]>;
+ /**
+ * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
+ * array of host names.
+ *
+ * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the `DNS error codes`.
+ * @since v10.6.0
+ */
+ function reverse(ip: string): Promise<string[]>;
+ /**
+ * Sets the IP address and port of servers to be used when performing DNS
+ * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
+ * addresses. If the port is the IANA default DNS port (53) it can be omitted.
+ *
+ * ```js
+ * dnsPromises.setServers([
+ * '4.4.4.4',
+ * '[2001:4860:4860::8888]',
+ * '4.4.4.4:1053',
+ * '[2001:4860:4860::8888]:1053',
+ * ]);
+ * ```
+ *
+ * An error will be thrown if an invalid address is provided.
+ *
+ * The `dnsPromises.setServers()` method must not be called while a DNS query is in
+ * progress.
+ *
+ * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
+ * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
+ * subsequent servers provided. Fallback DNS servers will only be used if the
+ * earlier ones time out or result in some other error.
+ * @since v10.6.0
+ * @param servers array of `RFC 5952` formatted addresses
+ */
+ function setServers(servers: ReadonlyArray<string>): void;
+ /**
+ * Set the default value of `verbatim` in `dns.lookup()` and `dnsPromises.lookup()`. The value could be:
+ *
+ * * `ipv4first`: sets default `verbatim` `false`.
+ * * `verbatim`: sets default `verbatim` `true`.
+ *
+ * The default is `verbatim` and `dnsPromises.setDefaultResultOrder()` have
+ * higher priority than `--dns-result-order`. When using `worker threads`,`dnsPromises.setDefaultResultOrder()` from the main thread won't affect the
+ * default dns orders in workers.
+ * @since v16.4.0, v14.18.0
+ * @param order must be `'ipv4first'` or `'verbatim'`.
+ */
+ function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
+ /**
+ * An independent resolver for DNS requests.
+ *
+ * Creating a new resolver uses the default server settings. Setting
+ * the servers used for a resolver using `resolver.setServers()` does not affect
+ * other resolvers:
+ *
+ * ```js
+ * const { Resolver } = require('node:dns').promises;
+ * const resolver = new Resolver();
+ * resolver.setServers(['4.4.4.4']);
+ *
+ * // This request will use the server at 4.4.4.4, independent of global settings.
+ * resolver.resolve4('example.org').then((addresses) => {
+ * // ...
+ * });
+ *
+ * // Alternatively, the same code can be written using async-await style.
+ * (async function() {
+ * const addresses = await resolver.resolve4('example.org');
+ * })();
+ * ```
+ *
+ * The following methods from the `dnsPromises` API are available:
+ *
+ * * `resolver.getServers()`
+ * * `resolver.resolve()`
+ * * `resolver.resolve4()`
+ * * `resolver.resolve6()`
+ * * `resolver.resolveAny()`
+ * * `resolver.resolveCaa()`
+ * * `resolver.resolveCname()`
+ * * `resolver.resolveMx()`
+ * * `resolver.resolveNaptr()`
+ * * `resolver.resolveNs()`
+ * * `resolver.resolvePtr()`
+ * * `resolver.resolveSoa()`
+ * * `resolver.resolveSrv()`
+ * * `resolver.resolveTxt()`
+ * * `resolver.reverse()`
+ * * `resolver.setServers()`
+ * @since v10.6.0
+ */
+ class Resolver {
+ constructor(options?: ResolverOptions);
+ cancel(): void;
+ getServers: typeof getServers;
+ resolve: typeof resolve;
+ resolve4: typeof resolve4;
+ resolve6: typeof resolve6;
+ resolveAny: typeof resolveAny;
+ resolveCaa: typeof resolveCaa;
+ resolveCname: typeof resolveCname;
+ resolveMx: typeof resolveMx;
+ resolveNaptr: typeof resolveNaptr;
+ resolveNs: typeof resolveNs;
+ resolvePtr: typeof resolvePtr;
+ resolveSoa: typeof resolveSoa;
+ resolveSrv: typeof resolveSrv;
+ resolveTxt: typeof resolveTxt;
+ reverse: typeof reverse;
+ setLocalAddress(ipv4?: string, ipv6?: string): void;
+ setServers: typeof setServers;
+ }
+}
+declare module 'node:dns/promises' {
+ export * from 'dns/promises';
+}
diff --git a/node_modules/@types/node/dom-events.d.ts b/node_modules/@types/node/dom-events.d.ts
new file mode 100755
index 0000000..b9c1c3a
--- /dev/null
+++ b/node_modules/@types/node/dom-events.d.ts
@@ -0,0 +1,126 @@
+export {}; // Don't export anything!
+
+//// DOM-like Events
+// NB: The Event / EventTarget / EventListener implementations below were copied
+// from lib.dom.d.ts, then edited to reflect Node's documentation at
+// https://nodejs.org/api/events.html#class-eventtarget.
+// Please read that link to understand important implementation differences.
+
+// This conditional type will be the existing global Event in a browser, or
+// the copy below in a Node environment.
+type __Event = typeof globalThis extends { onmessage: any, Event: any }
+? {}
+: {
+ /** This is not used in Node.js and is provided purely for completeness. */
+ readonly bubbles: boolean;
+ /** Alias for event.stopPropagation(). This is not used in Node.js and is provided purely for completeness. */
+ cancelBubble: () => void;
+ /** True if the event was created with the cancelable option */
+ readonly cancelable: boolean;
+ /** This is not used in Node.js and is provided purely for completeness. */
+ readonly composed: boolean;
+ /** Returns an array containing the current EventTarget as the only entry or empty if the event is not being dispatched. This is not used in Node.js and is provided purely for completeness. */
+ composedPath(): [EventTarget?]
+ /** Alias for event.target. */
+ readonly currentTarget: EventTarget | null;
+ /** Is true if cancelable is true and event.preventDefault() has been called. */
+ readonly defaultPrevented: boolean;
+ /** This is not used in Node.js and is provided purely for completeness. */
+ readonly eventPhase: 0 | 2;
+ /** The `AbortSignal` "abort" event is emitted with `isTrusted` set to `true`. The value is `false` in all other cases. */
+ readonly isTrusted: boolean;
+ /** Sets the `defaultPrevented` property to `true` if `cancelable` is `true`. */
+ preventDefault(): void;
+ /** This is not used in Node.js and is provided purely for completeness. */
+ returnValue: boolean;
+ /** Alias for event.target. */
+ readonly srcElement: EventTarget | null;
+ /** Stops the invocation of event listeners after the current one completes. */
+ stopImmediatePropagation(): void;
+ /** This is not used in Node.js and is provided purely for completeness. */
+ stopPropagation(): void;
+ /** The `EventTarget` dispatching the event */
+ readonly target: EventTarget | null;
+ /** The millisecond timestamp when the Event object was created. */
+ readonly timeStamp: number;
+ /** Returns the type of event, e.g. "click", "hashchange", or "submit". */
+ readonly type: string;
+};
+
+// See comment above explaining conditional type
+type __EventTarget = typeof globalThis extends { onmessage: any, EventTarget: any }
+? {}
+: {
+ /**
+ * Adds a new handler for the `type` event. Any given `listener` is added only once per `type` and per `capture` option value.
+ *
+ * If the `once` option is true, the `listener` is removed after the next time a `type` event is dispatched.
+ *
+ * The `capture` option is not used by Node.js in any functional way other than tracking registered event listeners per the `EventTarget` specification.
+ * Specifically, the `capture` option is used as part of the key when registering a `listener`.
+ * Any individual `listener` may be added once with `capture = false`, and once with `capture = true`.
+ */
+ addEventListener(
+ type: string,
+ listener: EventListener | EventListenerObject,
+ options?: AddEventListenerOptions | boolean,
+ ): void;
+ /** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
+ dispatchEvent(event: Event): boolean;
+ /** Removes the event listener in target's event listener list with the same type, callback, and options. */
+ removeEventListener(
+ type: string,
+ listener: EventListener | EventListenerObject,
+ options?: EventListenerOptions | boolean,
+ ): void;
+};
+
+interface EventInit {
+ bubbles?: boolean;
+ cancelable?: boolean;
+ composed?: boolean;
+}
+
+interface EventListenerOptions {
+ /** Not directly used by Node.js. Added for API completeness. Default: `false`. */
+ capture?: boolean;
+}
+
+interface AddEventListenerOptions extends EventListenerOptions {
+ /** When `true`, the listener is automatically removed when it is first invoked. Default: `false`. */
+ once?: boolean;
+ /** When `true`, serves as a hint that the listener will not call the `Event` object's `preventDefault()` method. Default: false. */
+ passive?: boolean;
+}
+
+interface EventListener {
+ (evt: Event): void;
+}
+
+interface EventListenerObject {
+ handleEvent(object: Event): void;
+}
+
+import {} from 'events'; // Make this an ambient declaration
+declare global {
+ /** An event which takes place in the DOM. */
+ interface Event extends __Event {}
+ var Event: typeof globalThis extends { onmessage: any, Event: infer T }
+ ? T
+ : {
+ prototype: __Event;
+ new (type: string, eventInitDict?: EventInit): __Event;
+ };
+
+ /**
+ * EventTarget is a DOM interface implemented by objects that can
+ * receive events and may have listeners for them.
+ */
+ interface EventTarget extends __EventTarget {}
+ var EventTarget: typeof globalThis extends { onmessage: any, EventTarget: infer T }
+ ? T
+ : {
+ prototype: __EventTarget;
+ new (): __EventTarget;
+ };
+}
diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts
new file mode 100755
index 0000000..e49b87f
--- /dev/null
+++ b/node_modules/@types/node/domain.d.ts
@@ -0,0 +1,170 @@
+/**
+ * **This module is pending deprecation.** Once a replacement API has been
+ * finalized, this module will be fully deprecated. Most developers should
+ * **not** have cause to use this module. Users who absolutely must have
+ * the functionality that domains provide may rely on it for the time being
+ * but should expect to have to migrate to a different solution
+ * in the future.
+ *
+ * Domains provide a way to handle multiple different IO operations as a
+ * single group. If any of the event emitters or callbacks registered to a
+ * domain emit an `'error'` event, or throw an error, then the domain object
+ * will be notified, rather than losing the context of the error in the`process.on('uncaughtException')` handler, or causing the program to
+ * exit immediately with an error code.
+ * @deprecated Since v1.4.2 - Deprecated
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/domain.js)
+ */
+declare module 'domain' {
+ import EventEmitter = require('node:events');
+ /**
+ * The `Domain` class encapsulates the functionality of routing errors and
+ * uncaught exceptions to the active `Domain` object.
+ *
+ * To handle the errors that it catches, listen to its `'error'` event.
+ */
+ class Domain extends EventEmitter {
+ /**
+ * An array of timers and event emitters that have been explicitly added
+ * to the domain.
+ */
+ members: Array<EventEmitter | NodeJS.Timer>;
+ /**
+ * The `enter()` method is plumbing used by the `run()`, `bind()`, and`intercept()` methods to set the active domain. It sets `domain.active` and`process.domain` to the domain, and implicitly
+ * pushes the domain onto the domain
+ * stack managed by the domain module (see {@link exit} for details on the
+ * domain stack). The call to `enter()` delimits the beginning of a chain of
+ * asynchronous calls and I/O operations bound to a domain.
+ *
+ * Calling `enter()` changes only the active domain, and does not alter the domain
+ * itself. `enter()` and `exit()` can be called an arbitrary number of times on a
+ * single domain.
+ */
+ enter(): void;
+ /**
+ * The `exit()` method exits the current domain, popping it off the domain stack.
+ * Any time execution is going to switch to the context of a different chain of
+ * asynchronous calls, it's important to ensure that the current domain is exited.
+ * The call to `exit()` delimits either the end of or an interruption to the chain
+ * of asynchronous calls and I/O operations bound to a domain.
+ *
+ * If there are multiple, nested domains bound to the current execution context,`exit()` will exit any domains nested within this domain.
+ *
+ * Calling `exit()` changes only the active domain, and does not alter the domain
+ * itself. `enter()` and `exit()` can be called an arbitrary number of times on a
+ * single domain.
+ */
+ exit(): void;
+ /**
+ * Run the supplied function in the context of the domain, implicitly
+ * binding all event emitters, timers, and low-level requests that are
+ * created in that context. Optionally, arguments can be passed to
+ * the function.
+ *
+ * This is the most basic way to use a domain.
+ *
+ * ```js
+ * const domain = require('node:domain');
+ * const fs = require('node:fs');
+ * const d = domain.create();
+ * d.on('error', (er) => {
+ * console.error('Caught error!', er);
+ * });
+ * d.run(() => {
+ * process.nextTick(() => {
+ * setTimeout(() => { // Simulating some various async stuff
+ * fs.open('non-existent file', 'r', (er, fd) => {
+ * if (er) throw er;
+ * // proceed...
+ * });
+ * }, 100);
+ * });
+ * });
+ * ```
+ *
+ * In this example, the `d.on('error')` handler will be triggered, rather
+ * than crashing the program.
+ */
+ run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
+ /**
+ * Explicitly adds an emitter to the domain. If any event handlers called by
+ * the emitter throw an error, or if the emitter emits an `'error'` event, it
+ * will be routed to the domain's `'error'` event, just like with implicit
+ * binding.
+ *
+ * This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by
+ * the domain `'error'` handler.
+ *
+ * If the Timer or `EventEmitter` was already bound to a domain, it is removed
+ * from that one, and bound to this one instead.
+ * @param emitter emitter or timer to be added to the domain
+ */
+ add(emitter: EventEmitter | NodeJS.Timer): void;
+ /**
+ * The opposite of {@link add}. Removes domain handling from the
+ * specified emitter.
+ * @param emitter emitter or timer to be removed from the domain
+ */
+ remove(emitter: EventEmitter | NodeJS.Timer): void;
+ /**
+ * The returned function will be a wrapper around the supplied callback
+ * function. When the returned function is called, any errors that are
+ * thrown will be routed to the domain's `'error'` event.
+ *
+ * ```js
+ * const d = domain.create();
+ *
+ * function readSomeFile(filename, cb) {
+ * fs.readFile(filename, 'utf8', d.bind((er, data) => {
+ * // If this throws, it will also be passed to the domain.
+ * return cb(er, data ? JSON.parse(data) : null);
+ * }));
+ * }
+ *
+ * d.on('error', (er) => {
+ * // An error occurred somewhere. If we throw it now, it will crash the program
+ * // with the normal line number and stack message.
+ * });
+ * ```
+ * @param callback The callback function
+ * @return The bound function
+ */
+ bind<T extends Function>(callback: T): T;
+ /**
+ * This method is almost identical to {@link bind}. However, in
+ * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function.
+ *
+ * In this way, the common `if (err) return callback(err);` pattern can be replaced
+ * with a single error handler in a single place.
+ *
+ * ```js
+ * const d = domain.create();
+ *
+ * function readSomeFile(filename, cb) {
+ * fs.readFile(filename, 'utf8', d.intercept((data) => {
+ * // Note, the first argument is never passed to the
+ * // callback since it is assumed to be the 'Error' argument
+ * // and thus intercepted by the domain.
+ *
+ * // If this throws, it will also be passed to the domain
+ * // so the error-handling logic can be moved to the 'error'
+ * // event on the domain instead of being repeated throughout
+ * // the program.
+ * return cb(null, JSON.parse(data));
+ * }));
+ * }
+ *
+ * d.on('error', (er) => {
+ * // An error occurred somewhere. If we throw it now, it will crash the program
+ * // with the normal line number and stack message.
+ * });
+ * ```
+ * @param callback The callback function
+ * @return The intercepted function
+ */
+ intercept<T extends Function>(callback: T): T;
+ }
+ function create(): Domain;
+}
+declare module 'node:domain' {
+ export * from 'domain';
+}
diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts
new file mode 100755
index 0000000..d9a97f6
--- /dev/null
+++ b/node_modules/@types/node/events.d.ts
@@ -0,0 +1,788 @@
+/**
+ * Much of the Node.js core API is built around an idiomatic asynchronous
+ * event-driven architecture in which certain kinds of objects (called "emitters")
+ * emit named events that cause `Function` objects ("listeners") to be called.
+ *
+ * For instance: a `net.Server` object emits an event each time a peer
+ * connects to it; a `fs.ReadStream` emits an event when the file is opened;
+ * a `stream` emits an event whenever data is available to be read.
+ *
+ * All objects that emit events are instances of the `EventEmitter` class. These
+ * objects expose an `eventEmitter.on()` function that allows one or more
+ * functions to be attached to named events emitted by the object. Typically,
+ * event names are camel-cased strings but any valid JavaScript property key
+ * can be used.
+ *
+ * When the `EventEmitter` object emits an event, all of the functions attached
+ * to that specific event are called _synchronously_. Any values returned by the
+ * called listeners are _ignored_ and discarded.
+ *
+ * The following example shows a simple `EventEmitter` instance with a single
+ * listener. The `eventEmitter.on()` method is used to register listeners, while
+ * the `eventEmitter.emit()` method is used to trigger the event.
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ *
+ * class MyEmitter extends EventEmitter {}
+ *
+ * const myEmitter = new MyEmitter();
+ * myEmitter.on('event', () => {
+ * console.log('an event occurred!');
+ * });
+ * myEmitter.emit('event');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/events.js)
+ */
+declare module 'events' {
+ // NOTE: This class is in the docs but is **not actually exported** by Node.
+ // If https://github.com/nodejs/node/issues/39903 gets resolved and Node
+ // actually starts exporting the class, uncomment below.
+ // import { EventListener, EventListenerObject } from '__dom-events';
+ // /** The NodeEventTarget is a Node.js-specific extension to EventTarget that emulates a subset of the EventEmitter API. */
+ // interface NodeEventTarget extends EventTarget {
+ // /**
+ // * Node.js-specific extension to the `EventTarget` class that emulates the equivalent `EventEmitter` API.
+ // * The only difference between `addListener()` and `addEventListener()` is that addListener() will return a reference to the EventTarget.
+ // */
+ // addListener(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
+ // /** Node.js-specific extension to the `EventTarget` class that returns an array of event `type` names for which event listeners are registered. */
+ // eventNames(): string[];
+ // /** Node.js-specific extension to the `EventTarget` class that returns the number of event listeners registered for the `type`. */
+ // listenerCount(type: string): number;
+ // /** Node.js-specific alias for `eventTarget.removeListener()`. */
+ // off(type: string, listener: EventListener | EventListenerObject): this;
+ // /** Node.js-specific alias for `eventTarget.addListener()`. */
+ // on(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
+ // /** Node.js-specific extension to the `EventTarget` class that adds a `once` listener for the given event `type`. This is equivalent to calling `on` with the `once` option set to `true`. */
+ // once(type: string, listener: EventListener | EventListenerObject): this;
+ // /**
+ // * Node.js-specific extension to the `EventTarget` class.
+ // * If `type` is specified, removes all registered listeners for `type`,
+ // * otherwise removes all registered listeners.
+ // */
+ // removeAllListeners(type: string): this;
+ // /**
+ // * Node.js-specific extension to the `EventTarget` class that removes the listener for the given `type`.
+ // * The only difference between `removeListener()` and `removeEventListener()` is that `removeListener()` will return a reference to the `EventTarget`.
+ // */
+ // removeListener(type: string, listener: EventListener | EventListenerObject): this;
+ // }
+ interface EventEmitterOptions {
+ /**
+ * Enables automatic capturing of promise rejection.
+ */
+ captureRejections?: boolean | undefined;
+ }
+ // Any EventTarget with a Node-style `once` function
+ interface _NodeEventTarget {
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ // Any EventTarget with a DOM-style `addEventListener`
+ interface _DOMEventTarget {
+ addEventListener(
+ eventName: string,
+ listener: (...args: any[]) => void,
+ opts?: {
+ once: boolean;
+ }
+ ): any;
+ }
+ interface StaticEventEmitterOptions {
+ signal?: AbortSignal | undefined;
+ }
+ interface EventEmitter extends NodeJS.EventEmitter {}
+ /**
+ * The `EventEmitter` class is defined and exposed by the `node:events` module:
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ * ```
+ *
+ * All `EventEmitter`s emit the event `'newListener'` when new listeners are
+ * added and `'removeListener'` when existing listeners are removed.
+ *
+ * It supports the following option:
+ * @since v0.1.26
+ */
+ class EventEmitter {
+ constructor(options?: EventEmitterOptions);
+ /**
+ * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given
+ * event or that is rejected if the `EventEmitter` emits `'error'` while waiting.
+ * The `Promise` will resolve with an array of all the arguments emitted to the
+ * given event.
+ *
+ * This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event
+ * semantics and does not listen to the `'error'` event.
+ *
+ * ```js
+ * import { once, EventEmitter } from 'node:events';
+ * import process from 'node:process';
+ *
+ * const ee = new EventEmitter();
+ *
+ * process.nextTick(() => {
+ * ee.emit('myevent', 42);
+ * });
+ *
+ * const [value] = await once(ee, 'myevent');
+ * console.log(value);
+ *
+ * const err = new Error('kaboom');
+ * process.nextTick(() => {
+ * ee.emit('error', err);
+ * });
+ *
+ * try {
+ * await once(ee, 'myevent');
+ * } catch (err) {
+ * console.error('error happened', err);
+ * }
+ * ```
+ *
+ * The special handling of the `'error'` event is only used when `events.once()`is used to wait for another event. If `events.once()` is used to wait for the
+ * '`error'` event itself, then it is treated as any other kind of event without
+ * special handling:
+ *
+ * ```js
+ * import { EventEmitter, once } from 'node:events';
+ *
+ * const ee = new EventEmitter();
+ *
+ * once(ee, 'error')
+ * .then(([err]) => console.log('ok', err.message))
+ * .catch((err) => console.error('error', err.message));
+ *
+ * ee.emit('error', new Error('boom'));
+ *
+ * // Prints: ok boom
+ * ```
+ *
+ * An `AbortSignal` can be used to cancel waiting for the event:
+ *
+ * ```js
+ * import { EventEmitter, once } from 'node:events';
+ *
+ * const ee = new EventEmitter();
+ * const ac = new AbortController();
+ *
+ * async function foo(emitter, event, signal) {
+ * try {
+ * await once(emitter, event, { signal });
+ * console.log('event emitted!');
+ * } catch (error) {
+ * if (error.name === 'AbortError') {
+ * console.error('Waiting for the event was canceled!');
+ * } else {
+ * console.error('There was an error', error.message);
+ * }
+ * }
+ * }
+ *
+ * foo(ee, 'foo', ac.signal);
+ * ac.abort(); // Abort waiting for the event
+ * ee.emit('foo'); // Prints: Waiting for the event was canceled!
+ * ```
+ * @since v11.13.0, v10.16.0
+ */
+ static once(emitter: _NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions): Promise<any[]>;
+ static once(emitter: _DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise<any[]>;
+ /**
+ * ```js
+ * import { on, EventEmitter } from 'node:events';
+ * import process from 'node:process';
+ *
+ * const ee = new EventEmitter();
+ *
+ * // Emit later on
+ * process.nextTick(() => {
+ * ee.emit('foo', 'bar');
+ * ee.emit('foo', 42);
+ * });
+ *
+ * for await (const event of on(ee, 'foo')) {
+ * // The execution of this inner block is synchronous and it
+ * // processes one event at a time (even with await). Do not use
+ * // if concurrent execution is required.
+ * console.log(event); // prints ['bar'] [42]
+ * }
+ * // Unreachable here
+ * ```
+ *
+ * Returns an `AsyncIterator` that iterates `eventName` events. It will throw
+ * if the `EventEmitter` emits `'error'`. It removes all listeners when
+ * exiting the loop. The `value` returned by each iteration is an array
+ * composed of the emitted event arguments.
+ *
+ * An `AbortSignal` can be used to cancel waiting on events:
+ *
+ * ```js
+ * import { on, EventEmitter } from 'node:events';
+ * import process from 'node:process';
+ *
+ * const ac = new AbortController();
+ *
+ * (async () => {
+ * const ee = new EventEmitter();
+ *
+ * // Emit later on
+ * process.nextTick(() => {
+ * ee.emit('foo', 'bar');
+ * ee.emit('foo', 42);
+ * });
+ *
+ * for await (const event of on(ee, 'foo', { signal: ac.signal })) {
+ * // The execution of this inner block is synchronous and it
+ * // processes one event at a time (even with await). Do not use
+ * // if concurrent execution is required.
+ * console.log(event); // prints ['bar'] [42]
+ * }
+ * // Unreachable here
+ * })();
+ *
+ * process.nextTick(() => ac.abort());
+ * ```
+ * @since v13.6.0, v12.16.0
+ * @param eventName The name of the event being listened for
+ * @return that iterates `eventName` events emitted by the `emitter`
+ */
+ static on(emitter: NodeJS.EventEmitter, eventName: string, options?: StaticEventEmitterOptions): AsyncIterableIterator<any>;
+ /**
+ * A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`.
+ *
+ * ```js
+ * import { EventEmitter, listenerCount } from 'node:events';
+ *
+ * const myEmitter = new EventEmitter();
+ * myEmitter.on('event', () => {});
+ * myEmitter.on('event', () => {});
+ * console.log(listenerCount(myEmitter, 'event'));
+ * // Prints: 2
+ * ```
+ * @since v0.9.12
+ * @deprecated Since v3.2.0 - Use `listenerCount` instead.
+ * @param emitter The emitter to query
+ * @param eventName The event name
+ */
+ static listenerCount(emitter: NodeJS.EventEmitter, eventName: string | symbol): number;
+ /**
+ * Returns a copy of the array of listeners for the event named `eventName`.
+ *
+ * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on
+ * the emitter.
+ *
+ * For `EventTarget`s this is the only way to get the event listeners for the
+ * event target. This is useful for debugging and diagnostic purposes.
+ *
+ * ```js
+ * import { getEventListeners, EventEmitter } from 'node:events';
+ *
+ * {
+ * const ee = new EventEmitter();
+ * const listener = () => console.log('Events are fun');
+ * ee.on('foo', listener);
+ * console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
+ * }
+ * {
+ * const et = new EventTarget();
+ * const listener = () => console.log('Events are fun');
+ * et.addEventListener('foo', listener);
+ * console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
+ * }
+ * ```
+ * @since v15.2.0, v14.17.0
+ */
+ static getEventListeners(emitter: _DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[];
+ /**
+ * Returns the currently set max amount of listeners.
+ *
+ * For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on
+ * the emitter.
+ *
+ * For `EventTarget`s this is the only way to get the max event listeners for the
+ * event target. If the number of event handlers on a single EventTarget exceeds
+ * the max set, the EventTarget will print a warning.
+ *
+ * ```js
+ * import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';
+ *
+ * {
+ * const ee = new EventEmitter();
+ * console.log(getMaxListeners(ee)); // 10
+ * setMaxListeners(11, ee);
+ * console.log(getMaxListeners(ee)); // 11
+ * }
+ * {
+ * const et = new EventTarget();
+ * console.log(getMaxListeners(et)); // 10
+ * setMaxListeners(11, et);
+ * console.log(getMaxListeners(et)); // 11
+ * }
+ * ```
+ * @since v19.9.0
+ */
+ static getMaxListeners(emitter: _DOMEventTarget | NodeJS.EventEmitter): number;
+ /**
+ * ```js
+ * import { setMaxListeners, EventEmitter } from 'node:events';
+ *
+ * const target = new EventTarget();
+ * const emitter = new EventEmitter();
+ *
+ * setMaxListeners(5, target, emitter);
+ * ```
+ * @since v15.4.0
+ * @param n A non-negative number. The maximum number of listeners per `EventTarget` event.
+ * @param eventsTargets Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter}
+ * objects.
+ */
+ static setMaxListeners(n?: number, ...eventTargets: Array<_DOMEventTarget | NodeJS.EventEmitter>): void;
+ /**
+ * Listens once to the `abort` event on the provided `signal`.
+ *
+ * Listening to the `abort` event on abort signals is unsafe and may
+ * lead to resource leaks since another third party with the signal can
+ * call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change
+ * this since it would violate the web standard. Additionally, the original
+ * API makes it easy to forget to remove listeners.
+ *
+ * This API allows safely using `AbortSignal`s in Node.js APIs by solving these
+ * two issues by listening to the event such that `stopImmediatePropagation` does
+ * not prevent the listener from running.
+ *
+ * Returns a disposable so that it may be unsubscribed from more easily.
+ *
+ * ```js
+ * import { addAbortListener } from 'node:events';
+ *
+ * function example(signal) {
+ * let disposable;
+ * try {
+ * signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
+ * disposable = addAbortListener(signal, (e) => {
+ * // Do something when signal is aborted.
+ * });
+ * } finally {
+ * disposable?.[Symbol.dispose]();
+ * }
+ * }
+ * ```
+ * @since v20.5.0
+ * @experimental
+ * @return that removes the `abort` listener.
+ */
+ static addAbortListener(signal: AbortSignal, resource: (event: Event) => void): Disposable;
+ /**
+ * This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called.
+ *
+ * Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no
+ * regular `'error'` listener is installed.
+ * @since v13.6.0, v12.17.0
+ */
+ static readonly errorMonitor: unique symbol;
+ /**
+ * Value: `Symbol.for('nodejs.rejection')`
+ *
+ * See how to write a custom `rejection handler`.
+ * @since v13.4.0, v12.16.0
+ */
+ static readonly captureRejectionSymbol: unique symbol;
+ /**
+ * Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
+ *
+ * Change the default `captureRejections` option on all new `EventEmitter` objects.
+ * @since v13.4.0, v12.16.0
+ */
+ static captureRejections: boolean;
+ /**
+ * By default, a maximum of `10` listeners can be registered for any single
+ * event. This limit can be changed for individual `EventEmitter` instances
+ * using the `emitter.setMaxListeners(n)` method. To change the default
+ * for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown.
+ *
+ * Take caution when setting the `events.defaultMaxListeners` because the
+ * change affects _all_`EventEmitter` instances, including those created before
+ * the change is made. However, calling `emitter.setMaxListeners(n)` still has
+ * precedence over `events.defaultMaxListeners`.
+ *
+ * This is not a hard limit. The `EventEmitter` instance will allow
+ * more listeners to be added but will output a trace warning to stderr indicating
+ * that a "possible EventEmitter memory leak" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to
+ * temporarily avoid this warning:
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ * const emitter = new EventEmitter();
+ * emitter.setMaxListeners(emitter.getMaxListeners() + 1);
+ * emitter.once('event', () => {
+ * // do stuff
+ * emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
+ * });
+ * ```
+ *
+ * The `--trace-warnings` command-line flag can be used to display the
+ * stack trace for such warnings.
+ *
+ * The emitted warning can be inspected with `process.on('warning')` and will
+ * have the additional `emitter`, `type`, and `count` properties, referring to
+ * the event emitter instance, the event's name and the number of attached
+ * listeners, respectively.
+ * Its `name` property is set to `'MaxListenersExceededWarning'`.
+ * @since v0.11.2
+ */
+ static defaultMaxListeners: number;
+ }
+ import internal = require('node:events');
+ namespace EventEmitter {
+ // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4
+ export { internal as EventEmitter };
+ export interface Abortable {
+ /**
+ * When provided the corresponding `AbortController` can be used to cancel an asynchronous action.
+ */
+ signal?: AbortSignal | undefined;
+ }
+ }
+ global {
+ namespace NodeJS {
+ interface EventEmitter {
+ /**
+ * Alias for `emitter.on(eventName, listener)`.
+ * @since v0.1.26
+ */
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Adds the `listener` function to the end of the listeners array for the
+ * event named `eventName`. No checks are made to see if the `listener` has
+ * already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple
+ * times.
+ *
+ * ```js
+ * server.on('connection', (stream) => {
+ * console.log('someone connected!');
+ * });
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ *
+ * By default, event listeners are invoked in the order they are added. The`emitter.prependListener()` method can be used as an alternative to add the
+ * event listener to the beginning of the listeners array.
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ * const myEE = new EventEmitter();
+ * myEE.on('foo', () => console.log('a'));
+ * myEE.prependListener('foo', () => console.log('b'));
+ * myEE.emit('foo');
+ * // Prints:
+ * // b
+ * // a
+ * ```
+ * @since v0.1.101
+ * @param eventName The name of the event.
+ * @param listener The callback function
+ */
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Adds a **one-time**`listener` function for the event named `eventName`. The
+ * next time `eventName` is triggered, this listener is removed and then invoked.
+ *
+ * ```js
+ * server.once('connection', (stream) => {
+ * console.log('Ah, we have our first user!');
+ * });
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ *
+ * By default, event listeners are invoked in the order they are added. The`emitter.prependOnceListener()` method can be used as an alternative to add the
+ * event listener to the beginning of the listeners array.
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ * const myEE = new EventEmitter();
+ * myEE.once('foo', () => console.log('a'));
+ * myEE.prependOnceListener('foo', () => console.log('b'));
+ * myEE.emit('foo');
+ * // Prints:
+ * // b
+ * // a
+ * ```
+ * @since v0.3.0
+ * @param eventName The name of the event.
+ * @param listener The callback function
+ */
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Removes the specified `listener` from the listener array for the event named`eventName`.
+ *
+ * ```js
+ * const callback = (stream) => {
+ * console.log('someone connected!');
+ * };
+ * server.on('connection', callback);
+ * // ...
+ * server.removeListener('connection', callback);
+ * ```
+ *
+ * `removeListener()` will remove, at most, one instance of a listener from the
+ * listener array. If any single listener has been added multiple times to the
+ * listener array for the specified `eventName`, then `removeListener()` must be
+ * called multiple times to remove each instance.
+ *
+ * Once an event is emitted, all listeners attached to it at the
+ * time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution
+ * will not remove them from`emit()` in progress. Subsequent events behave as expected.
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ * class MyEmitter extends EventEmitter {}
+ * const myEmitter = new MyEmitter();
+ *
+ * const callbackA = () => {
+ * console.log('A');
+ * myEmitter.removeListener('event', callbackB);
+ * };
+ *
+ * const callbackB = () => {
+ * console.log('B');
+ * };
+ *
+ * myEmitter.on('event', callbackA);
+ *
+ * myEmitter.on('event', callbackB);
+ *
+ * // callbackA removes listener callbackB but it will still be called.
+ * // Internal listener array at time of emit [callbackA, callbackB]
+ * myEmitter.emit('event');
+ * // Prints:
+ * // A
+ * // B
+ *
+ * // callbackB is now removed.
+ * // Internal listener array [callbackA]
+ * myEmitter.emit('event');
+ * // Prints:
+ * // A
+ * ```
+ *
+ * Because listeners are managed using an internal array, calling this will
+ * change the position indices of any listener registered _after_ the listener
+ * being removed. This will not impact the order in which listeners are called,
+ * but it means that any copies of the listener array as returned by
+ * the `emitter.listeners()` method will need to be recreated.
+ *
+ * When a single function has been added as a handler multiple times for a single
+ * event (as in the example below), `removeListener()` will remove the most
+ * recently added instance. In the example the `once('ping')`listener is removed:
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ * const ee = new EventEmitter();
+ *
+ * function pong() {
+ * console.log('pong');
+ * }
+ *
+ * ee.on('ping', pong);
+ * ee.once('ping', pong);
+ * ee.removeListener('ping', pong);
+ *
+ * ee.emit('ping');
+ * ee.emit('ping');
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v0.1.26
+ */
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Alias for `emitter.removeListener()`.
+ * @since v10.0.0
+ */
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Removes all listeners, or those of the specified `eventName`.
+ *
+ * It is bad practice to remove listeners added elsewhere in the code,
+ * particularly when the `EventEmitter` instance was created by some other
+ * component or module (e.g. sockets or file streams).
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v0.1.26
+ */
+ removeAllListeners(event?: string | symbol): this;
+ /**
+ * By default `EventEmitter`s will print a warning if more than `10` listeners are
+ * added for a particular event. This is a useful default that helps finding
+ * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be
+ * modified for this specific `EventEmitter` instance. The value can be set to`Infinity` (or `0`) to indicate an unlimited number of listeners.
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v0.3.5
+ */
+ setMaxListeners(n: number): this;
+ /**
+ * Returns the current max listener value for the `EventEmitter` which is either
+ * set by `emitter.setMaxListeners(n)` or defaults to {@link defaultMaxListeners}.
+ * @since v1.0.0
+ */
+ getMaxListeners(): number;
+ /**
+ * Returns a copy of the array of listeners for the event named `eventName`.
+ *
+ * ```js
+ * server.on('connection', (stream) => {
+ * console.log('someone connected!');
+ * });
+ * console.log(util.inspect(server.listeners('connection')));
+ * // Prints: [ [Function] ]
+ * ```
+ * @since v0.1.26
+ */
+ listeners(eventName: string | symbol): Function[];
+ /**
+ * Returns a copy of the array of listeners for the event named `eventName`,
+ * including any wrappers (such as those created by `.once()`).
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ * const emitter = new EventEmitter();
+ * emitter.once('log', () => console.log('log once'));
+ *
+ * // Returns a new Array with a function `onceWrapper` which has a property
+ * // `listener` which contains the original listener bound above
+ * const listeners = emitter.rawListeners('log');
+ * const logFnWrapper = listeners[0];
+ *
+ * // Logs "log once" to the console and does not unbind the `once` event
+ * logFnWrapper.listener();
+ *
+ * // Logs "log once" to the console and removes the listener
+ * logFnWrapper();
+ *
+ * emitter.on('log', () => console.log('log persistently'));
+ * // Will return a new Array with a single function bound by `.on()` above
+ * const newListeners = emitter.rawListeners('log');
+ *
+ * // Logs "log persistently" twice
+ * newListeners[0]();
+ * emitter.emit('log');
+ * ```
+ * @since v9.4.0
+ */
+ rawListeners(eventName: string | symbol): Function[];
+ /**
+ * Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments
+ * to each.
+ *
+ * Returns `true` if the event had listeners, `false` otherwise.
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ * const myEmitter = new EventEmitter();
+ *
+ * // First listener
+ * myEmitter.on('event', function firstListener() {
+ * console.log('Helloooo! first listener');
+ * });
+ * // Second listener
+ * myEmitter.on('event', function secondListener(arg1, arg2) {
+ * console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
+ * });
+ * // Third listener
+ * myEmitter.on('event', function thirdListener(...args) {
+ * const parameters = args.join(', ');
+ * console.log(`event with parameters ${parameters} in third listener`);
+ * });
+ *
+ * console.log(myEmitter.listeners('event'));
+ *
+ * myEmitter.emit('event', 1, 2, 3, 4, 5);
+ *
+ * // Prints:
+ * // [
+ * // [Function: firstListener],
+ * // [Function: secondListener],
+ * // [Function: thirdListener]
+ * // ]
+ * // Helloooo! first listener
+ * // event with parameters 1, 2 in second listener
+ * // event with parameters 1, 2, 3, 4, 5 in third listener
+ * ```
+ * @since v0.1.26
+ */
+ emit(eventName: string | symbol, ...args: any[]): boolean;
+ /**
+ * Returns the number of listeners listening for the event named `eventName`.
+ * If `listener` is provided, it will return how many times the listener is found
+ * in the list of the listeners of the event.
+ * @since v3.2.0
+ * @param eventName The name of the event being listened for
+ * @param listener The event handler function
+ */
+ listenerCount(eventName: string | symbol, listener?: Function): number;
+ /**
+ * Adds the `listener` function to the _beginning_ of the listeners array for the
+ * event named `eventName`. No checks are made to see if the `listener` has
+ * already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple
+ * times.
+ *
+ * ```js
+ * server.prependListener('connection', (stream) => {
+ * console.log('someone connected!');
+ * });
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v6.0.0
+ * @param eventName The name of the event.
+ * @param listener The callback function
+ */
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
+ * listener is removed, and then invoked.
+ *
+ * ```js
+ * server.prependOnceListener('connection', (stream) => {
+ * console.log('Ah, we have our first user!');
+ * });
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v6.0.0
+ * @param eventName The name of the event.
+ * @param listener The callback function
+ */
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Returns an array listing the events for which the emitter has registered
+ * listeners. The values in the array are strings or `Symbol`s.
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ *
+ * const myEE = new EventEmitter();
+ * myEE.on('foo', () => {});
+ * myEE.on('bar', () => {});
+ *
+ * const sym = Symbol('symbol');
+ * myEE.on(sym, () => {});
+ *
+ * console.log(myEE.eventNames());
+ * // Prints: [ 'foo', 'bar', Symbol(symbol) ]
+ * ```
+ * @since v6.0.0
+ */
+ eventNames(): Array<string | symbol>;
+ }
+ }
+ }
+ export = EventEmitter;
+}
+declare module 'node:events' {
+ import events = require('events');
+ export = events;
+}
diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts
new file mode 100755
index 0000000..88dc63e
--- /dev/null
+++ b/node_modules/@types/node/fs.d.ts
@@ -0,0 +1,4082 @@
+/**
+ * The `node:fs` module enables interacting with the file system in a
+ * way modeled on standard POSIX functions.
+ *
+ * To use the promise-based APIs:
+ *
+ * ```js
+ * import * as fs from 'node:fs/promises';
+ * ```
+ *
+ * To use the callback and sync APIs:
+ *
+ * ```js
+ * import * as fs from 'node:fs';
+ * ```
+ *
+ * All file system operations have synchronous, callback, and promise-based
+ * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/fs.js)
+ */
+declare module 'fs' {
+ import * as stream from 'node:stream';
+ import { Abortable, EventEmitter } from 'node:events';
+ import { URL } from 'node:url';
+ import * as promises from 'node:fs/promises';
+ export { promises };
+ /**
+ * Valid types for path values in "fs".
+ */
+ export type PathLike = string | Buffer | URL;
+ export type PathOrFileDescriptor = PathLike | number;
+ export type TimeLike = string | number | Date;
+ export type NoParamCallback = (err: NodeJS.ErrnoException | null) => void;
+ export type BufferEncodingOption =
+ | 'buffer'
+ | {
+ encoding: 'buffer';
+ };
+ export interface ObjectEncodingOptions {
+ encoding?: BufferEncoding | null | undefined;
+ }
+ export type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null;
+ export type OpenMode = number | string;
+ export type Mode = number | string;
+ export interface StatsBase<T> {
+ isFile(): boolean;
+ isDirectory(): boolean;
+ isBlockDevice(): boolean;
+ isCharacterDevice(): boolean;
+ isSymbolicLink(): boolean;
+ isFIFO(): boolean;
+ isSocket(): boolean;
+ dev: T;
+ ino: T;
+ mode: T;
+ nlink: T;
+ uid: T;
+ gid: T;
+ rdev: T;
+ size: T;
+ blksize: T;
+ blocks: T;
+ atimeMs: T;
+ mtimeMs: T;
+ ctimeMs: T;
+ birthtimeMs: T;
+ atime: Date;
+ mtime: Date;
+ ctime: Date;
+ birthtime: Date;
+ }
+ export interface Stats extends StatsBase<number> {}
+ /**
+ * A `fs.Stats` object provides information about a file.
+ *
+ * Objects returned from {@link stat}, {@link lstat}, {@link fstat}, and
+ * their synchronous counterparts are of this type.
+ * If `bigint` in the `options` passed to those methods is true, the numeric values
+ * will be `bigint` instead of `number`, and the object will contain additional
+ * nanosecond-precision properties suffixed with `Ns`.
+ *
+ * ```console
+ * Stats {
+ * dev: 2114,
+ * ino: 48064969,
+ * mode: 33188,
+ * nlink: 1,
+ * uid: 85,
+ * gid: 100,
+ * rdev: 0,
+ * size: 527,
+ * blksize: 4096,
+ * blocks: 8,
+ * atimeMs: 1318289051000.1,
+ * mtimeMs: 1318289051000.1,
+ * ctimeMs: 1318289051000.1,
+ * birthtimeMs: 1318289051000.1,
+ * atime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * mtime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * ctime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * birthtime: Mon, 10 Oct 2011 23:24:11 GMT }
+ * ```
+ *
+ * `bigint` version:
+ *
+ * ```console
+ * BigIntStats {
+ * dev: 2114n,
+ * ino: 48064969n,
+ * mode: 33188n,
+ * nlink: 1n,
+ * uid: 85n,
+ * gid: 100n,
+ * rdev: 0n,
+ * size: 527n,
+ * blksize: 4096n,
+ * blocks: 8n,
+ * atimeMs: 1318289051000n,
+ * mtimeMs: 1318289051000n,
+ * ctimeMs: 1318289051000n,
+ * birthtimeMs: 1318289051000n,
+ * atimeNs: 1318289051000000000n,
+ * mtimeNs: 1318289051000000000n,
+ * ctimeNs: 1318289051000000000n,
+ * birthtimeNs: 1318289051000000000n,
+ * atime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * mtime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * ctime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * birthtime: Mon, 10 Oct 2011 23:24:11 GMT }
+ * ```
+ * @since v0.1.21
+ */
+ export class Stats {}
+ export interface StatsFsBase<T> {
+ /** Type of file system. */
+ type: T;
+ /** Optimal transfer block size. */
+ bsize: T;
+ /** Total data blocks in file system. */
+ blocks: T;
+ /** Free blocks in file system. */
+ bfree: T;
+ /** Available blocks for unprivileged users */
+ bavail: T;
+ /** Total file nodes in file system. */
+ files: T;
+ /** Free file nodes in file system. */
+ ffree: T;
+ }
+ export interface StatsFs extends StatsFsBase<number> {}
+ /**
+ * Provides information about a mounted file system.
+ *
+ * Objects returned from {@link statfs} and its synchronous counterpart are of
+ * this type. If `bigint` in the `options` passed to those methods is `true`, the
+ * numeric values will be `bigint` instead of `number`.
+ *
+ * ```console
+ * StatFs {
+ * type: 1397114950,
+ * bsize: 4096,
+ * blocks: 121938943,
+ * bfree: 61058895,
+ * bavail: 61058895,
+ * files: 999,
+ * ffree: 1000000
+ * }
+ * ```
+ *
+ * `bigint` version:
+ *
+ * ```console
+ * StatFs {
+ * type: 1397114950n,
+ * bsize: 4096n,
+ * blocks: 121938943n,
+ * bfree: 61058895n,
+ * bavail: 61058895n,
+ * files: 999n,
+ * ffree: 1000000n
+ * }
+ * ```
+ * @since v19.6.0, v18.15.0
+ */
+ export class StatsFs {}
+ export interface BigIntStatsFs extends StatsFsBase<bigint> {}
+ export interface StatFsOptions {
+ bigint?: boolean | undefined;
+ }
+ /**
+ * A representation of a directory entry, which can be a file or a subdirectory
+ * within the directory, as returned by reading from an `fs.Dir`. The
+ * directory entry is a combination of the file name and file type pairs.
+ *
+ * Additionally, when {@link readdir} or {@link readdirSync} is called with
+ * the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s.
+ * @since v10.10.0
+ */
+ export class Dirent {
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a regular file.
+ * @since v10.10.0
+ */
+ isFile(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a file system
+ * directory.
+ * @since v10.10.0
+ */
+ isDirectory(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a block device.
+ * @since v10.10.0
+ */
+ isBlockDevice(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a character device.
+ * @since v10.10.0
+ */
+ isCharacterDevice(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a symbolic link.
+ * @since v10.10.0
+ */
+ isSymbolicLink(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a first-in-first-out
+ * (FIFO) pipe.
+ * @since v10.10.0
+ */
+ isFIFO(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a socket.
+ * @since v10.10.0
+ */
+ isSocket(): boolean;
+ /**
+ * The file name that this `fs.Dirent` object refers to. The type of this
+ * value is determined by the `options.encoding` passed to {@link readdir} or {@link readdirSync}.
+ * @since v10.10.0
+ */
+ name: string;
+ /**
+ * The base path that this `fs.Dirent` object refers to.
+ * @since v20.1.0
+ */
+ path: string;
+ }
+ /**
+ * A class representing a directory stream.
+ *
+ * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`.
+ *
+ * ```js
+ * import { opendir } from 'node:fs/promises';
+ *
+ * try {
+ * const dir = await opendir('./');
+ * for await (const dirent of dir)
+ * console.log(dirent.name);
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * ```
+ *
+ * When using the async iterator, the `fs.Dir` object will be automatically
+ * closed after the iterator exits.
+ * @since v12.12.0
+ */
+ export class Dir implements AsyncIterable<Dirent> {
+ /**
+ * The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`.
+ * @since v12.12.0
+ */
+ readonly path: string;
+ /**
+ * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read.
+ */
+ [Symbol.asyncIterator](): AsyncIterableIterator<Dirent>;
+ /**
+ * Asynchronously close the directory's underlying resource handle.
+ * Subsequent reads will result in errors.
+ *
+ * A promise is returned that will be resolved after the resource has been
+ * closed.
+ * @since v12.12.0
+ */
+ close(): Promise<void>;
+ close(cb: NoParamCallback): void;
+ /**
+ * Synchronously close the directory's underlying resource handle.
+ * Subsequent reads will result in errors.
+ * @since v12.12.0
+ */
+ closeSync(): void;
+ /**
+ * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`.
+ *
+ * A promise is returned that will be resolved with an `fs.Dirent`, or `null`if there are no more directory entries to read.
+ *
+ * Directory entries returned by this function are in no particular order as
+ * provided by the operating system's underlying directory mechanisms.
+ * Entries added or removed while iterating over the directory might not be
+ * included in the iteration results.
+ * @since v12.12.0
+ * @return containing {fs.Dirent|null}
+ */
+ read(): Promise<Dirent | null>;
+ read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void;
+ /**
+ * Synchronously read the next directory entry as an `fs.Dirent`. See the
+ * POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail.
+ *
+ * If there are no more directory entries to read, `null` will be returned.
+ *
+ * Directory entries returned by this function are in no particular order as
+ * provided by the operating system's underlying directory mechanisms.
+ * Entries added or removed while iterating over the directory might not be
+ * included in the iteration results.
+ * @since v12.12.0
+ */
+ readSync(): Dirent | null;
+ }
+ /**
+ * Class: fs.StatWatcher
+ * @since v14.3.0, v12.20.0
+ * Extends `EventEmitter`
+ * A successful call to {@link watchFile} method will return a new fs.StatWatcher object.
+ */
+ export interface StatWatcher extends EventEmitter {
+ /**
+ * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have
+ * no effect.
+ *
+ * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally
+ * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been
+ * called previously.
+ * @since v14.3.0, v12.20.0
+ */
+ ref(): this;
+ /**
+ * When called, the active `fs.StatWatcher` object will not require the Node.js
+ * event loop to remain active. If there is no other activity keeping the
+ * event loop running, the process may exit before the `fs.StatWatcher` object's
+ * callback is invoked. Calling `watcher.unref()` multiple times will have
+ * no effect.
+ * @since v14.3.0, v12.20.0
+ */
+ unref(): this;
+ }
+ export interface FSWatcher extends EventEmitter {
+ /**
+ * Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable.
+ * @since v0.5.8
+ */
+ close(): void;
+ /**
+ * events.EventEmitter
+ * 1. change
+ * 2. error
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ addListener(event: 'error', listener: (error: Error) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ on(event: 'error', listener: (error: Error) => void): this;
+ on(event: 'close', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ once(event: 'error', listener: (error: Error) => void): this;
+ once(event: 'close', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ prependListener(event: 'error', listener: (error: Error) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ prependOnceListener(event: 'error', listener: (error: Error) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ }
+ /**
+ * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function.
+ * @since v0.1.93
+ */
+ export class ReadStream extends stream.Readable {
+ close(callback?: (err?: NodeJS.ErrnoException | null) => void): void;
+ /**
+ * The number of bytes that have been read so far.
+ * @since v6.4.0
+ */
+ bytesRead: number;
+ /**
+ * The path to the file the stream is reading from as specified in the first
+ * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a
+ * `Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`.
+ * @since v0.1.93
+ */
+ path: string | Buffer;
+ /**
+ * This property is `true` if the underlying file has not been opened yet,
+ * i.e. before the `'ready'` event is emitted.
+ * @since v11.2.0, v10.16.0
+ */
+ pending: boolean;
+ /**
+ * events.EventEmitter
+ * 1. open
+ * 2. close
+ * 3. ready
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'open', listener: (fd: number) => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'readable', listener: () => void): this;
+ addListener(event: 'ready', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'open', listener: (fd: number) => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'readable', listener: () => void): this;
+ on(event: 'ready', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'open', listener: (fd: number) => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'readable', listener: () => void): this;
+ once(event: 'ready', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'open', listener: (fd: number) => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'readable', listener: () => void): this;
+ prependListener(event: 'ready', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'open', listener: (fd: number) => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'readable', listener: () => void): this;
+ prependOnceListener(event: 'ready', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * * Extends `stream.Writable`
+ *
+ * Instances of `fs.WriteStream` are created and returned using the {@link createWriteStream} function.
+ * @since v0.1.93
+ */
+ export class WriteStream extends stream.Writable {
+ /**
+ * Closes `writeStream`. Optionally accepts a
+ * callback that will be executed once the `writeStream`is closed.
+ * @since v0.9.4
+ */
+ close(callback?: (err?: NodeJS.ErrnoException | null) => void): void;
+ /**
+ * The number of bytes written so far. Does not include data that is still queued
+ * for writing.
+ * @since v0.4.7
+ */
+ bytesWritten: number;
+ /**
+ * The path to the file the stream is writing to as specified in the first
+ * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then`writeStream.path` will be a
+ * `Buffer`.
+ * @since v0.1.93
+ */
+ path: string | Buffer;
+ /**
+ * This property is `true` if the underlying file has not been opened yet,
+ * i.e. before the `'ready'` event is emitted.
+ * @since v11.2.0
+ */
+ pending: boolean;
+ /**
+ * events.EventEmitter
+ * 1. open
+ * 2. close
+ * 3. ready
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'open', listener: (fd: number) => void): this;
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'ready', listener: () => void): this;
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'open', listener: (fd: number) => void): this;
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'ready', listener: () => void): this;
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'open', listener: (fd: number) => void): this;
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'ready', listener: () => void): this;
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'open', listener: (fd: number) => void): this;
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'ready', listener: () => void): this;
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'open', listener: (fd: number) => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'ready', listener: () => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * Asynchronously rename file at `oldPath` to the pathname provided
+ * as `newPath`. In the case that `newPath` already exists, it will
+ * be overwritten. If there is a directory at `newPath`, an error will
+ * be raised instead. No arguments other than a possible exception are
+ * given to the completion callback.
+ *
+ * See also: [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html).
+ *
+ * ```js
+ * import { rename } from 'node:fs';
+ *
+ * rename('oldFile.txt', 'newFile.txt', (err) => {
+ * if (err) throw err;
+ * console.log('Rename complete!');
+ * });
+ * ```
+ * @since v0.0.2
+ */
+ export function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
+ export namespace rename {
+ /**
+ * Asynchronous rename(2) - Change the name or location of a file or directory.
+ * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(oldPath: PathLike, newPath: PathLike): Promise<void>;
+ }
+ /**
+ * Renames the file from `oldPath` to `newPath`. Returns `undefined`.
+ *
+ * See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details.
+ * @since v0.1.21
+ */
+ export function renameSync(oldPath: PathLike, newPath: PathLike): void;
+ /**
+ * Truncates the file. No arguments other than a possible exception are
+ * given to the completion callback. A file descriptor can also be passed as the
+ * first argument. In this case, `fs.ftruncate()` is called.
+ *
+ * ```js
+ * import { truncate } from 'node:fs';
+ * // Assuming that 'path/file.txt' is a regular file.
+ * truncate('path/file.txt', (err) => {
+ * if (err) throw err;
+ * console.log('path/file.txt was truncated');
+ * });
+ * ```
+ *
+ * Passing a file descriptor is deprecated and may result in an error being thrown
+ * in the future.
+ *
+ * See the POSIX [`truncate(2)`](http://man7.org/linux/man-pages/man2/truncate.2.html) documentation for more details.
+ * @since v0.8.6
+ * @param [len=0]
+ */
+ export function truncate(path: PathLike, len: number | undefined | null, callback: NoParamCallback): void;
+ /**
+ * Asynchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function truncate(path: PathLike, callback: NoParamCallback): void;
+ export namespace truncate {
+ /**
+ * Asynchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param len If not specified, defaults to `0`.
+ */
+ function __promisify__(path: PathLike, len?: number | null): Promise<void>;
+ }
+ /**
+ * Truncates the file. Returns `undefined`. A file descriptor can also be
+ * passed as the first argument. In this case, `fs.ftruncateSync()` is called.
+ *
+ * Passing a file descriptor is deprecated and may result in an error being thrown
+ * in the future.
+ * @since v0.8.6
+ * @param [len=0]
+ */
+ export function truncateSync(path: PathLike, len?: number | null): void;
+ /**
+ * Truncates the file descriptor. No arguments other than a possible exception are
+ * given to the completion callback.
+ *
+ * See the POSIX [`ftruncate(2)`](http://man7.org/linux/man-pages/man2/ftruncate.2.html) documentation for more detail.
+ *
+ * If the file referred to by the file descriptor was larger than `len` bytes, only
+ * the first `len` bytes will be retained in the file.
+ *
+ * For example, the following program retains only the first four bytes of the
+ * file:
+ *
+ * ```js
+ * import { open, close, ftruncate } from 'node:fs';
+ *
+ * function closeFd(fd) {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ *
+ * open('temp.txt', 'r+', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * ftruncate(fd, 4, (err) => {
+ * closeFd(fd);
+ * if (err) throw err;
+ * });
+ * } catch (err) {
+ * closeFd(fd);
+ * if (err) throw err;
+ * }
+ * });
+ * ```
+ *
+ * If the file previously was shorter than `len` bytes, it is extended, and the
+ * extended part is filled with null bytes (`'\0'`):
+ *
+ * If `len` is negative then `0` will be used.
+ * @since v0.8.6
+ * @param [len=0]
+ */
+ export function ftruncate(fd: number, len: number | undefined | null, callback: NoParamCallback): void;
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param fd A file descriptor.
+ */
+ export function ftruncate(fd: number, callback: NoParamCallback): void;
+ export namespace ftruncate {
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param fd A file descriptor.
+ * @param len If not specified, defaults to `0`.
+ */
+ function __promisify__(fd: number, len?: number | null): Promise<void>;
+ }
+ /**
+ * Truncates the file descriptor. Returns `undefined`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link ftruncate}.
+ * @since v0.8.6
+ * @param [len=0]
+ */
+ export function ftruncateSync(fd: number, len?: number | null): void;
+ /**
+ * Asynchronously changes owner and group of a file. No arguments other than a
+ * possible exception are given to the completion callback.
+ *
+ * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail.
+ * @since v0.1.97
+ */
+ export function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
+ export namespace chown {
+ /**
+ * Asynchronous chown(2) - Change ownership of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
+ }
+ /**
+ * Synchronously changes owner and group of a file. Returns `undefined`.
+ * This is the synchronous version of {@link chown}.
+ *
+ * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail.
+ * @since v0.1.97
+ */
+ export function chownSync(path: PathLike, uid: number, gid: number): void;
+ /**
+ * Sets the owner of the file. No arguments other than a possible exception are
+ * given to the completion callback.
+ *
+ * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail.
+ * @since v0.4.7
+ */
+ export function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void;
+ export namespace fchown {
+ /**
+ * Asynchronous fchown(2) - Change ownership of a file.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number, uid: number, gid: number): Promise<void>;
+ }
+ /**
+ * Sets the owner of the file. Returns `undefined`.
+ *
+ * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail.
+ * @since v0.4.7
+ * @param uid The file's new owner's user id.
+ * @param gid The file's new group's group id.
+ */
+ export function fchownSync(fd: number, uid: number, gid: number): void;
+ /**
+ * Set the owner of the symbolic link. No arguments other than a possible
+ * exception are given to the completion callback.
+ *
+ * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more detail.
+ */
+ export function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
+ export namespace lchown {
+ /**
+ * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
+ }
+ /**
+ * Set the owner for the path. Returns `undefined`.
+ *
+ * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more details.
+ * @param uid The file's new owner's user id.
+ * @param gid The file's new group's group id.
+ */
+ export function lchownSync(path: PathLike, uid: number, gid: number): void;
+ /**
+ * Changes the access and modification times of a file in the same way as {@link utimes}, with the difference that if the path refers to a symbolic
+ * link, then the link is not dereferenced: instead, the timestamps of the
+ * symbolic link itself are changed.
+ *
+ * No arguments other than a possible exception are given to the completion
+ * callback.
+ * @since v14.5.0, v12.19.0
+ */
+ export function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
+ export namespace lutimes {
+ /**
+ * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
+ * with the difference that if the path refers to a symbolic link, then the link is not
+ * dereferenced: instead, the timestamps of the symbolic link itself are changed.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ }
+ /**
+ * Change the file system timestamps of the symbolic link referenced by `path`.
+ * Returns `undefined`, or throws an exception when parameters are incorrect or
+ * the operation fails. This is the synchronous version of {@link lutimes}.
+ * @since v14.5.0, v12.19.0
+ */
+ export function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void;
+ /**
+ * Asynchronously changes the permissions of a file. No arguments other than a
+ * possible exception are given to the completion callback.
+ *
+ * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail.
+ *
+ * ```js
+ * import { chmod } from 'node:fs';
+ *
+ * chmod('my_file.txt', 0o775, (err) => {
+ * if (err) throw err;
+ * console.log('The permissions for file "my_file.txt" have been changed!');
+ * });
+ * ```
+ * @since v0.1.30
+ */
+ export function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
+ export namespace chmod {
+ /**
+ * Asynchronous chmod(2) - Change permissions of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(path: PathLike, mode: Mode): Promise<void>;
+ }
+ /**
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link chmod}.
+ *
+ * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail.
+ * @since v0.6.7
+ */
+ export function chmodSync(path: PathLike, mode: Mode): void;
+ /**
+ * Sets the permissions on the file. No arguments other than a possible exception
+ * are given to the completion callback.
+ *
+ * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail.
+ * @since v0.4.7
+ */
+ export function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void;
+ export namespace fchmod {
+ /**
+ * Asynchronous fchmod(2) - Change permissions of a file.
+ * @param fd A file descriptor.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(fd: number, mode: Mode): Promise<void>;
+ }
+ /**
+ * Sets the permissions on the file. Returns `undefined`.
+ *
+ * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail.
+ * @since v0.4.7
+ */
+ export function fchmodSync(fd: number, mode: Mode): void;
+ /**
+ * Changes the permissions on a symbolic link. No arguments other than a possible
+ * exception are given to the completion callback.
+ *
+ * This method is only implemented on macOS.
+ *
+ * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail.
+ * @deprecated Since v0.4.7
+ */
+ export function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
+ /** @deprecated */
+ export namespace lchmod {
+ /**
+ * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(path: PathLike, mode: Mode): Promise<void>;
+ }
+ /**
+ * Changes the permissions on a symbolic link. Returns `undefined`.
+ *
+ * This method is only implemented on macOS.
+ *
+ * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail.
+ * @deprecated Since v0.4.7
+ */
+ export function lchmodSync(path: PathLike, mode: Mode): void;
+ /**
+ * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `fs.Stats` object.
+ *
+ * In case of an error, the `err.code` will be one of `Common System Errors`.
+ *
+ * {@link stat} follows symbolic links. Use {@link lstat} to look at the
+ * links themselves.
+ *
+ * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended.
+ * Instead, user code should open/read/write the file directly and handle the
+ * error raised if the file is not available.
+ *
+ * To check if a file exists without manipulating it afterwards, {@link access} is recommended.
+ *
+ * For example, given the following directory structure:
+ *
+ * ```text
+ * - txtDir
+ * -- file.txt
+ * - app.js
+ * ```
+ *
+ * The next program will check for the stats of the given paths:
+ *
+ * ```js
+ * import { stat } from 'node:fs';
+ *
+ * const pathsToCheck = ['./txtDir', './txtDir/file.txt'];
+ *
+ * for (let i = 0; i < pathsToCheck.length; i++) {
+ * stat(pathsToCheck[i], (err, stats) => {
+ * console.log(stats.isDirectory());
+ * console.log(stats);
+ * });
+ * }
+ * ```
+ *
+ * The resulting output will resemble:
+ *
+ * ```console
+ * true
+ * Stats {
+ * dev: 16777220,
+ * mode: 16877,
+ * nlink: 3,
+ * uid: 501,
+ * gid: 20,
+ * rdev: 0,
+ * blksize: 4096,
+ * ino: 14214262,
+ * size: 96,
+ * blocks: 0,
+ * atimeMs: 1561174653071.963,
+ * mtimeMs: 1561174614583.3518,
+ * ctimeMs: 1561174626623.5366,
+ * birthtimeMs: 1561174126937.2893,
+ * atime: 2019-06-22T03:37:33.072Z,
+ * mtime: 2019-06-22T03:36:54.583Z,
+ * ctime: 2019-06-22T03:37:06.624Z,
+ * birthtime: 2019-06-22T03:28:46.937Z
+ * }
+ * false
+ * Stats {
+ * dev: 16777220,
+ * mode: 33188,
+ * nlink: 1,
+ * uid: 501,
+ * gid: 20,
+ * rdev: 0,
+ * blksize: 4096,
+ * ino: 14214074,
+ * size: 8,
+ * blocks: 8,
+ * atimeMs: 1561174616618.8555,
+ * mtimeMs: 1561174614584,
+ * ctimeMs: 1561174614583.8145,
+ * birthtimeMs: 1561174007710.7478,
+ * atime: 2019-06-22T03:36:56.619Z,
+ * mtime: 2019-06-22T03:36:54.584Z,
+ * ctime: 2019-06-22T03:36:54.584Z,
+ * birthtime: 2019-06-22T03:26:47.711Z
+ * }
+ * ```
+ * @since v0.0.2
+ */
+ export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function stat(
+ path: PathLike,
+ options:
+ | (StatOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void
+ ): void;
+ export function stat(
+ path: PathLike,
+ options: StatOptions & {
+ bigint: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void
+ ): void;
+ export function stat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
+ export namespace stat {
+ /**
+ * Asynchronous stat(2) - Get file status.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function __promisify__(
+ path: PathLike,
+ options: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
+ }
+ export interface StatSyncFn extends Function {
+ (path: PathLike, options?: undefined): Stats;
+ (
+ path: PathLike,
+ options?: StatSyncOptions & {
+ bigint?: false | undefined;
+ throwIfNoEntry: false;
+ }
+ ): Stats | undefined;
+ (
+ path: PathLike,
+ options: StatSyncOptions & {
+ bigint: true;
+ throwIfNoEntry: false;
+ }
+ ): BigIntStats | undefined;
+ (
+ path: PathLike,
+ options?: StatSyncOptions & {
+ bigint?: false | undefined;
+ }
+ ): Stats;
+ (
+ path: PathLike,
+ options: StatSyncOptions & {
+ bigint: true;
+ }
+ ): BigIntStats;
+ (
+ path: PathLike,
+ options: StatSyncOptions & {
+ bigint: boolean;
+ throwIfNoEntry?: false | undefined;
+ }
+ ): Stats | BigIntStats;
+ (path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined;
+ }
+ /**
+ * Synchronous stat(2) - Get file status.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export const statSync: StatSyncFn;
+ /**
+ * Invokes the callback with the `fs.Stats` for the file descriptor.
+ *
+ * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail.
+ * @since v0.1.95
+ */
+ export function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function fstat(
+ fd: number,
+ options:
+ | (StatOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void
+ ): void;
+ export function fstat(
+ fd: number,
+ options: StatOptions & {
+ bigint: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void
+ ): void;
+ export function fstat(fd: number, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
+ export namespace fstat {
+ /**
+ * Asynchronous fstat(2) - Get file status.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(
+ fd: number,
+ options?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function __promisify__(
+ fd: number,
+ options: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function __promisify__(fd: number, options?: StatOptions): Promise<Stats | BigIntStats>;
+ }
+ /**
+ * Retrieves the `fs.Stats` for the file descriptor.
+ *
+ * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail.
+ * @since v0.1.95
+ */
+ export function fstatSync(
+ fd: number,
+ options?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Stats;
+ export function fstatSync(
+ fd: number,
+ options: StatOptions & {
+ bigint: true;
+ }
+ ): BigIntStats;
+ export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
+ /**
+ * Retrieves the `fs.Stats` for the symbolic link referred to by the path.
+ * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic
+ * link, then the link itself is stat-ed, not the file that it refers to.
+ *
+ * See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details.
+ * @since v0.1.30
+ */
+ export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function lstat(
+ path: PathLike,
+ options:
+ | (StatOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void
+ ): void;
+ export function lstat(
+ path: PathLike,
+ options: StatOptions & {
+ bigint: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void
+ ): void;
+ export function lstat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
+ export namespace lstat {
+ /**
+ * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function __promisify__(
+ path: PathLike,
+ options: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
+ }
+ /**
+ * Asynchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which
+ * contains `path`. The callback gets two arguments `(err, stats)` where `stats`is an `fs.StatFs` object.
+ *
+ * In case of an error, the `err.code` will be one of `Common System Errors`.
+ * @since v19.6.0, v18.15.0
+ * @param path A path to an existing file or directory on the file system to be queried.
+ */
+ export function statfs(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void): void;
+ export function statfs(
+ path: PathLike,
+ options:
+ | (StatFsOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void
+ ): void;
+ export function statfs(
+ path: PathLike,
+ options: StatFsOptions & {
+ bigint: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, stats: BigIntStatsFs) => void
+ ): void;
+ export function statfs(path: PathLike, options: StatFsOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs | BigIntStatsFs) => void): void;
+ export namespace statfs {
+ /**
+ * Asynchronous statfs(2) - Returns information about the mounted file system which contains path. The callback gets two arguments (err, stats) where stats is an <fs.StatFs> object.
+ * @param path A path to an existing file or directory on the file system to be queried.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?: StatFsOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<StatsFs>;
+ function __promisify__(
+ path: PathLike,
+ options: StatFsOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStatsFs>;
+ function __promisify__(path: PathLike, options?: StatFsOptions): Promise<StatsFs | BigIntStatsFs>;
+ }
+ /**
+ * Synchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which
+ * contains `path`.
+ *
+ * In case of an error, the `err.code` will be one of `Common System Errors`.
+ * @since v19.6.0, v18.15.0
+ * @param path A path to an existing file or directory on the file system to be queried.
+ */
+ export function statfsSync(
+ path: PathLike,
+ options?: StatFsOptions & {
+ bigint?: false | undefined;
+ }
+ ): StatsFs;
+ export function statfsSync(
+ path: PathLike,
+ options: StatFsOptions & {
+ bigint: true;
+ }
+ ): BigIntStatsFs;
+ export function statfsSync(path: PathLike, options?: StatFsOptions): StatsFs | BigIntStatsFs;
+ /**
+ * Synchronous lstat(2) - Get file status. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export const lstatSync: StatSyncFn;
+ /**
+ * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than
+ * a possible
+ * exception are given to the completion callback.
+ * @since v0.1.31
+ */
+ export function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
+ export namespace link {
+ /**
+ * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
+ * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(existingPath: PathLike, newPath: PathLike): Promise<void>;
+ }
+ /**
+ * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`.
+ * @since v0.1.31
+ */
+ export function linkSync(existingPath: PathLike, newPath: PathLike): void;
+ /**
+ * Creates the link called `path` pointing to `target`. No arguments other than a
+ * possible exception are given to the completion callback.
+ *
+ * See the POSIX [`symlink(2)`](http://man7.org/linux/man-pages/man2/symlink.2.html) documentation for more details.
+ *
+ * The `type` argument is only available on Windows and ignored on other platforms.
+ * It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is
+ * not a string, Node.js will autodetect `target` type and use `'file'` or `'dir'`.
+ * If the `target` does not exist, `'file'` will be used. Windows junction points
+ * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path. Junction
+ * points on NTFS volumes can only point to directories.
+ *
+ * Relative targets are relative to the link's parent directory.
+ *
+ * ```js
+ * import { symlink } from 'node:fs';
+ *
+ * symlink('./mew', './mewtwo', callback);
+ * ```
+ *
+ * The above example creates a symbolic link `mewtwo` which points to `mew` in the
+ * same directory:
+ *
+ * ```bash
+ * $ tree .
+ * .
+ * ├── mew
+ * └── mewtwo -> ./mew
+ * ```
+ * @since v0.1.31
+ * @param [type='null']
+ */
+ export function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: NoParamCallback): void;
+ /**
+ * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void;
+ export namespace symlink {
+ /**
+ * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
+ * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
+ */
+ function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
+ type Type = 'dir' | 'file' | 'junction';
+ }
+ /**
+ * Returns `undefined`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link symlink}.
+ * @since v0.1.31
+ * @param [type='null']
+ */
+ export function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void;
+ /**
+ * Reads the contents of the symbolic link referred to by `path`. The callback gets
+ * two arguments `(err, linkString)`.
+ *
+ * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the link path passed to the callback. If the `encoding` is set to `'buffer'`,
+ * the link path returned will be passed as a `Buffer` object.
+ * @since v0.1.31
+ */
+ export function readlink(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlink(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void): void;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlink(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
+ export namespace readlink {
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string>;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string | Buffer>;
+ }
+ /**
+ * Returns the symbolic link's string value.
+ *
+ * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the link path returned. If the `encoding` is set to `'buffer'`,
+ * the link path returned will be passed as a `Buffer` object.
+ * @since v0.1.31
+ */
+ export function readlinkSync(path: PathLike, options?: EncodingOption): string;
+ /**
+ * Synchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlinkSync(path: PathLike, options: BufferEncodingOption): Buffer;
+ /**
+ * Synchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlinkSync(path: PathLike, options?: EncodingOption): string | Buffer;
+ /**
+ * Asynchronously computes the canonical pathname by resolving `.`, `..`, and
+ * symbolic links.
+ *
+ * A canonical pathname is not necessarily unique. Hard links and bind mounts can
+ * expose a file system entity through many pathnames.
+ *
+ * This function behaves like [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html), with some exceptions:
+ *
+ * 1. No case conversion is performed on case-insensitive file systems.
+ * 2. The maximum number of symbolic links is platform-independent and generally
+ * (much) higher than what the native [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html) implementation supports.
+ *
+ * The `callback` gets two arguments `(err, resolvedPath)`. May use `process.cwd`to resolve relative paths.
+ *
+ * Only paths that can be converted to UTF8 strings are supported.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the path passed to the callback. If the `encoding` is set to `'buffer'`,
+ * the path returned will be passed as a `Buffer` object.
+ *
+ * If `path` resolves to a socket or a pipe, the function will return a system
+ * dependent name for that object.
+ * @since v0.1.31
+ */
+ export function realpath(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpath(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpath(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ export namespace realpath {
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string>;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string | Buffer>;
+ /**
+ * Asynchronous [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html).
+ *
+ * The `callback` gets two arguments `(err, resolvedPath)`.
+ *
+ * Only paths that can be converted to UTF8 strings are supported.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the path passed to the callback. If the `encoding` is set to `'buffer'`,
+ * the path returned will be passed as a `Buffer` object.
+ *
+ * On Linux, when Node.js is linked against musl libc, the procfs file system must
+ * be mounted on `/proc` in order for this function to work. Glibc does not have
+ * this restriction.
+ * @since v9.2.0
+ */
+ function native(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ function native(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
+ function native(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
+ function native(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ }
+ /**
+ * Returns the resolved pathname.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link realpath}.
+ * @since v0.1.31
+ */
+ export function realpathSync(path: PathLike, options?: EncodingOption): string;
+ /**
+ * Synchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpathSync(path: PathLike, options: BufferEncodingOption): Buffer;
+ /**
+ * Synchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpathSync(path: PathLike, options?: EncodingOption): string | Buffer;
+ export namespace realpathSync {
+ function native(path: PathLike, options?: EncodingOption): string;
+ function native(path: PathLike, options: BufferEncodingOption): Buffer;
+ function native(path: PathLike, options?: EncodingOption): string | Buffer;
+ }
+ /**
+ * Asynchronously removes a file or symbolic link. No arguments other than a
+ * possible exception are given to the completion callback.
+ *
+ * ```js
+ * import { unlink } from 'node:fs';
+ * // Assuming that 'path/file.txt' is a regular file.
+ * unlink('path/file.txt', (err) => {
+ * if (err) throw err;
+ * console.log('path/file.txt was deleted');
+ * });
+ * ```
+ *
+ * `fs.unlink()` will not work on a directory, empty or otherwise. To remove a
+ * directory, use {@link rmdir}.
+ *
+ * See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more details.
+ * @since v0.0.2
+ */
+ export function unlink(path: PathLike, callback: NoParamCallback): void;
+ export namespace unlink {
+ /**
+ * Asynchronous unlink(2) - delete a name and possibly the file it refers to.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike): Promise<void>;
+ }
+ /**
+ * Synchronous [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html). Returns `undefined`.
+ * @since v0.1.21
+ */
+ export function unlinkSync(path: PathLike): void;
+ export interface RmDirOptions {
+ /**
+ * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
+ * `EPERM` error is encountered, Node.js will retry the operation with a linear
+ * backoff wait of `retryDelay` ms longer on each try. This option represents the
+ * number of retries. This option is ignored if the `recursive` option is not
+ * `true`.
+ * @default 0
+ */
+ maxRetries?: number | undefined;
+ /**
+ * @deprecated since v14.14.0 In future versions of Node.js and will trigger a warning
+ * `fs.rmdir(path, { recursive: true })` will throw if `path` does not exist or is a file.
+ * Use `fs.rm(path, { recursive: true, force: true })` instead.
+ *
+ * If `true`, perform a recursive directory removal. In
+ * recursive mode, operations are retried on failure.
+ * @default false
+ */
+ recursive?: boolean | undefined;
+ /**
+ * The amount of time in milliseconds to wait between retries.
+ * This option is ignored if the `recursive` option is not `true`.
+ * @default 100
+ */
+ retryDelay?: number | undefined;
+ }
+ /**
+ * Asynchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). No arguments other than a possible exception are given
+ * to the completion callback.
+ *
+ * Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on
+ * Windows and an `ENOTDIR` error on POSIX.
+ *
+ * To get a behavior similar to the `rm -rf` Unix command, use {@link rm} with options `{ recursive: true, force: true }`.
+ * @since v0.0.2
+ */
+ export function rmdir(path: PathLike, callback: NoParamCallback): void;
+ export function rmdir(path: PathLike, options: RmDirOptions, callback: NoParamCallback): void;
+ export namespace rmdir {
+ /**
+ * Asynchronous rmdir(2) - delete a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, options?: RmDirOptions): Promise<void>;
+ }
+ /**
+ * Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`.
+ *
+ * Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error
+ * on Windows and an `ENOTDIR` error on POSIX.
+ *
+ * To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`.
+ * @since v0.1.21
+ */
+ export function rmdirSync(path: PathLike, options?: RmDirOptions): void;
+ export interface RmOptions {
+ /**
+ * When `true`, exceptions will be ignored if `path` does not exist.
+ * @default false
+ */
+ force?: boolean | undefined;
+ /**
+ * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
+ * `EPERM` error is encountered, Node.js will retry the operation with a linear
+ * backoff wait of `retryDelay` ms longer on each try. This option represents the
+ * number of retries. This option is ignored if the `recursive` option is not
+ * `true`.
+ * @default 0
+ */
+ maxRetries?: number | undefined;
+ /**
+ * If `true`, perform a recursive directory removal. In
+ * recursive mode, operations are retried on failure.
+ * @default false
+ */
+ recursive?: boolean | undefined;
+ /**
+ * The amount of time in milliseconds to wait between retries.
+ * This option is ignored if the `recursive` option is not `true`.
+ * @default 100
+ */
+ retryDelay?: number | undefined;
+ }
+ /**
+ * Asynchronously removes files and directories (modeled on the standard POSIX `rm`utility). No arguments other than a possible exception are given to the
+ * completion callback.
+ * @since v14.14.0
+ */
+ export function rm(path: PathLike, callback: NoParamCallback): void;
+ export function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void;
+ export namespace rm {
+ /**
+ * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
+ */
+ function __promisify__(path: PathLike, options?: RmOptions): Promise<void>;
+ }
+ /**
+ * Synchronously removes files and directories (modeled on the standard POSIX `rm`utility). Returns `undefined`.
+ * @since v14.14.0
+ */
+ export function rmSync(path: PathLike, options?: RmOptions): void;
+ export interface MakeDirectoryOptions {
+ /**
+ * Indicates whether parent folders should be created.
+ * If a folder was created, the path to the first created folder will be returned.
+ * @default false
+ */
+ recursive?: boolean | undefined;
+ /**
+ * A file mode. If a string is passed, it is parsed as an octal integer. If not specified
+ * @default 0o777
+ */
+ mode?: Mode | undefined;
+ }
+ /**
+ * Asynchronously creates a directory.
+ *
+ * The callback is given a possible exception and, if `recursive` is `true`, the
+ * first directory path created, `(err[, path])`.`path` can still be `undefined` when `recursive` is `true`, if no directory was
+ * created (for instance, if it was previously created).
+ *
+ * The optional `options` argument can be an integer specifying `mode` (permission
+ * and sticky bits), or an object with a `mode` property and a `recursive`property indicating whether parent directories should be created. Calling`fs.mkdir()` when `path` is a directory that
+ * exists results in an error only
+ * when `recursive` is false. If `recursive` is false and the directory exists,
+ * an `EEXIST` error occurs.
+ *
+ * ```js
+ * import { mkdir } from 'node:fs';
+ *
+ * // Create ./tmp/a/apple, regardless of whether ./tmp and ./tmp/a exist.
+ * mkdir('./tmp/a/apple', { recursive: true }, (err) => {
+ * if (err) throw err;
+ * });
+ * ```
+ *
+ * On Windows, using `fs.mkdir()` on the root directory even with recursion will
+ * result in an error:
+ *
+ * ```js
+ * import { mkdir } from 'node:fs';
+ *
+ * mkdir('/', { recursive: true }, (err) => {
+ * // => [Error: EPERM: operation not permitted, mkdir 'C:\']
+ * });
+ * ```
+ *
+ * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details.
+ * @since v0.1.8
+ */
+ export function mkdir(
+ path: PathLike,
+ options: MakeDirectoryOptions & {
+ recursive: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, path?: string) => void
+ ): void;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdir(
+ path: PathLike,
+ options:
+ | Mode
+ | (MakeDirectoryOptions & {
+ recursive?: false | undefined;
+ })
+ | null
+ | undefined,
+ callback: NoParamCallback
+ ): void;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdir(path: PathLike, options: Mode | MakeDirectoryOptions | null | undefined, callback: (err: NodeJS.ErrnoException | null, path?: string) => void): void;
+ /**
+ * Asynchronous mkdir(2) - create a directory with a mode of `0o777`.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function mkdir(path: PathLike, callback: NoParamCallback): void;
+ export namespace mkdir {
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function __promisify__(
+ path: PathLike,
+ options: MakeDirectoryOptions & {
+ recursive: true;
+ }
+ ): Promise<string | undefined>;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?:
+ | Mode
+ | (MakeDirectoryOptions & {
+ recursive?: false | undefined;
+ })
+ | null
+ ): Promise<void>;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function __promisify__(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
+ }
+ /**
+ * Synchronously creates a directory. Returns `undefined`, or if `recursive` is`true`, the first directory path created.
+ * This is the synchronous version of {@link mkdir}.
+ *
+ * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details.
+ * @since v0.1.21
+ */
+ export function mkdirSync(
+ path: PathLike,
+ options: MakeDirectoryOptions & {
+ recursive: true;
+ }
+ ): string | undefined;
+ /**
+ * Synchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdirSync(
+ path: PathLike,
+ options?:
+ | Mode
+ | (MakeDirectoryOptions & {
+ recursive?: false | undefined;
+ })
+ | null
+ ): void;
+ /**
+ * Synchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined;
+ /**
+ * Creates a unique temporary directory.
+ *
+ * Generates six random characters to be appended behind a required`prefix` to create a unique temporary directory. Due to platform
+ * inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms,
+ * notably the BSDs, can return more than six random characters, and replace
+ * trailing `X` characters in `prefix` with random characters.
+ *
+ * The created directory path is passed as a string to the callback's second
+ * parameter.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use.
+ *
+ * ```js
+ * import { mkdtemp } from 'node:fs';
+ * import { join } from 'node:path';
+ * import { tmpdir } from 'node:os';
+ *
+ * mkdtemp(join(tmpdir(), 'foo-'), (err, directory) => {
+ * if (err) throw err;
+ * console.log(directory);
+ * // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2
+ * });
+ * ```
+ *
+ * The `fs.mkdtemp()` method will append the six randomly selected characters
+ * directly to the `prefix` string. For instance, given a directory `/tmp`, if the
+ * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator
+ * (`require('node:path').sep`).
+ *
+ * ```js
+ * import { tmpdir } from 'node:os';
+ * import { mkdtemp } from 'node:fs';
+ *
+ * // The parent directory for the new temporary directory
+ * const tmpDir = tmpdir();
+ *
+ * // This method is *INCORRECT*:
+ * mkdtemp(tmpDir, (err, directory) => {
+ * if (err) throw err;
+ * console.log(directory);
+ * // Will print something similar to `/tmpabc123`.
+ * // A new temporary directory is created at the file system root
+ * // rather than *within* the /tmp directory.
+ * });
+ *
+ * // This method is *CORRECT*:
+ * import { sep } from 'node:path';
+ * mkdtemp(`${tmpDir}${sep}`, (err, directory) => {
+ * if (err) throw err;
+ * console.log(directory);
+ * // Will print something similar to `/tmp/abc123`.
+ * // A new temporary directory is created within
+ * // the /tmp directory.
+ * });
+ * ```
+ * @since v5.10.0
+ */
+ export function mkdtemp(prefix: string, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtemp(
+ prefix: string,
+ options:
+ | 'buffer'
+ | {
+ encoding: 'buffer';
+ },
+ callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void
+ ): void;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtemp(prefix: string, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ */
+ export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
+ export namespace mkdtemp {
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options?: EncodingOption): Promise<string>;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options?: EncodingOption): Promise<string | Buffer>;
+ }
+ /**
+ * Returns the created directory path.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link mkdtemp}.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use.
+ * @since v5.10.0
+ */
+ export function mkdtempSync(prefix: string, options?: EncodingOption): string;
+ /**
+ * Synchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtempSync(prefix: string, options: BufferEncodingOption): Buffer;
+ /**
+ * Synchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtempSync(prefix: string, options?: EncodingOption): string | Buffer;
+ /**
+ * Reads the contents of a directory. The callback gets two arguments `(err, files)`where `files` is an array of the names of the files in the directory excluding`'.'` and `'..'`.
+ *
+ * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the filenames passed to the callback. If the `encoding` is set to `'buffer'`,
+ * the filenames returned will be passed as `Buffer` objects.
+ *
+ * If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects.
+ * @since v0.1.8
+ */
+ export function readdir(
+ path: PathLike,
+ options:
+ | {
+ encoding: BufferEncoding | null;
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ }
+ | BufferEncoding
+ | undefined
+ | null,
+ callback: (err: NodeJS.ErrnoException | null, files: string[]) => void
+ ): void;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdir(
+ path: PathLike,
+ options:
+ | {
+ encoding: 'buffer';
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ }
+ | 'buffer',
+ callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void
+ ): void;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdir(
+ path: PathLike,
+ options:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ })
+ | BufferEncoding
+ | undefined
+ | null,
+ callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void
+ ): void;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ export function readdir(
+ path: PathLike,
+ options: ObjectEncodingOptions & {
+ withFileTypes: true;
+ recursive?: boolean | undefined;
+ },
+ callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void
+ ): void;
+ export namespace readdir {
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?:
+ | {
+ encoding: BufferEncoding | null;
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ }
+ | BufferEncoding
+ | null
+ ): Promise<string[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(
+ path: PathLike,
+ options:
+ | 'buffer'
+ | {
+ encoding: 'buffer';
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ }
+ ): Promise<Buffer[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string[] | Buffer[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent
+ */
+ function __promisify__(
+ path: PathLike,
+ options: ObjectEncodingOptions & {
+ withFileTypes: true;
+ recursive?: boolean | undefined;
+ }
+ ): Promise<Dirent[]>;
+ }
+ /**
+ * Reads the contents of the directory.
+ *
+ * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the filenames returned. If the `encoding` is set to `'buffer'`,
+ * the filenames returned will be passed as `Buffer` objects.
+ *
+ * If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects.
+ * @since v0.1.21
+ */
+ export function readdirSync(
+ path: PathLike,
+ options?:
+ | {
+ encoding: BufferEncoding | null;
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ }
+ | BufferEncoding
+ | null
+ ): string[];
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdirSync(
+ path: PathLike,
+ options:
+ | {
+ encoding: 'buffer';
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ }
+ | 'buffer'
+ ): Buffer[];
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdirSync(
+ path: PathLike,
+ options?:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): string[] | Buffer[];
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ export function readdirSync(
+ path: PathLike,
+ options: ObjectEncodingOptions & {
+ withFileTypes: true;
+ recursive?: boolean | undefined;
+ }
+ ): Dirent[];
+ /**
+ * Closes the file descriptor. No arguments other than a possible exception are
+ * given to the completion callback.
+ *
+ * Calling `fs.close()` on any file descriptor (`fd`) that is currently in use
+ * through any other `fs` operation may lead to undefined behavior.
+ *
+ * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail.
+ * @since v0.0.2
+ */
+ export function close(fd: number, callback?: NoParamCallback): void;
+ export namespace close {
+ /**
+ * Asynchronous close(2) - close a file descriptor.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+ /**
+ * Closes the file descriptor. Returns `undefined`.
+ *
+ * Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use
+ * through any other `fs` operation may lead to undefined behavior.
+ *
+ * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail.
+ * @since v0.1.21
+ */
+ export function closeSync(fd: number): void;
+ /**
+ * Asynchronous file open. See the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more details.
+ *
+ * `mode` sets the file mode (permission and sticky bits), but only if the file was
+ * created. On Windows, only the write permission can be manipulated; see {@link chmod}.
+ *
+ * The callback gets two arguments `(err, fd)`.
+ *
+ * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented
+ * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains
+ * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams).
+ *
+ * Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc.
+ * @since v0.0.2
+ * @param [flags='r'] See `support of file system `flags``.
+ * @param [mode=0o666]
+ */
+ export function open(path: PathLike, flags: OpenMode | undefined, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+ /**
+ * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param [flags='r'] See `support of file system `flags``.
+ */
+ export function open(path: PathLike, flags: OpenMode | undefined, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+ /**
+ * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+ export namespace open {
+ /**
+ * Asynchronous open(2) - open and possibly create a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
+ */
+ function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise<number>;
+ }
+ /**
+ * Returns an integer representing the file descriptor.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link open}.
+ * @since v0.1.21
+ * @param [flags='r']
+ * @param [mode=0o666]
+ */
+ export function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number;
+ /**
+ * Change the file system timestamps of the object referenced by `path`.
+ *
+ * The `atime` and `mtime` arguments follow these rules:
+ *
+ * * Values can be either numbers representing Unix epoch time in seconds,`Date`s, or a numeric string like `'123456789.0'`.
+ * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or`-Infinity`, an `Error` will be thrown.
+ * @since v0.4.2
+ */
+ export function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
+ export namespace utimes {
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied path.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ }
+ /**
+ * Returns `undefined`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link utimes}.
+ * @since v0.4.2
+ */
+ export function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void;
+ /**
+ * Change the file system timestamps of the object referenced by the supplied file
+ * descriptor. See {@link utimes}.
+ * @since v0.4.2
+ */
+ export function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
+ export namespace futimes {
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function __promisify__(fd: number, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ }
+ /**
+ * Synchronous version of {@link futimes}. Returns `undefined`.
+ * @since v0.4.2
+ */
+ export function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void;
+ /**
+ * Request that all data for the open file descriptor is flushed to the storage
+ * device. The specific implementation is operating system and device specific.
+ * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. No arguments other
+ * than a possible exception are given to the completion callback.
+ * @since v0.1.96
+ */
+ export function fsync(fd: number, callback: NoParamCallback): void;
+ export namespace fsync {
+ /**
+ * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+ /**
+ * Request that all data for the open file descriptor is flushed to the storage
+ * device. The specific implementation is operating system and device specific.
+ * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. Returns `undefined`.
+ * @since v0.1.96
+ */
+ export function fsyncSync(fd: number): void;
+ /**
+ * Write `buffer` to the file specified by `fd`.
+ *
+ * `offset` determines the part of the buffer to be written, and `length` is
+ * an integer specifying the number of bytes to write.
+ *
+ * `position` refers to the offset from the beginning of the file where this data
+ * should be written. If `typeof position !== 'number'`, the data will be written
+ * at the current position. See [`pwrite(2)`](http://man7.org/linux/man-pages/man2/pwrite.2.html).
+ *
+ * The callback will be given three arguments `(err, bytesWritten, buffer)` where`bytesWritten` specifies how many _bytes_ were written from `buffer`.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a promise for an `Object` with `bytesWritten` and `buffer` properties.
+ *
+ * It is unsafe to use `fs.write()` multiple times on the same file without waiting
+ * for the callback. For this scenario, {@link createWriteStream} is
+ * recommended.
+ *
+ * On Linux, positional writes don't work when the file is opened in append mode.
+ * The kernel ignores the position argument and always appends the data to
+ * the end of the file.
+ * @since v0.0.2
+ * @param [offset=0]
+ * @param [length=buffer.byteLength - offset]
+ * @param [position='null']
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ length: number | undefined | null,
+ position: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void
+ ): void;
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ length: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void
+ ): void;
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void
+ ): void;
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ export function write(
+ fd: number,
+ string: string,
+ position: number | undefined | null,
+ encoding: BufferEncoding | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void
+ ): void;
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ export function write(fd: number, string: string, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ */
+ export function write(fd: number, string: string, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
+ export namespace write {
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer?: TBuffer,
+ offset?: number,
+ length?: number,
+ position?: number | null
+ ): Promise<{
+ bytesWritten: number;
+ buffer: TBuffer;
+ }>;
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ function __promisify__(
+ fd: number,
+ string: string,
+ position?: number | null,
+ encoding?: BufferEncoding | null
+ ): Promise<{
+ bytesWritten: number;
+ buffer: string;
+ }>;
+ }
+ /**
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link write}.
+ * @since v0.1.21
+ * @param [offset=0]
+ * @param [length=buffer.byteLength - offset]
+ * @param [position='null']
+ * @return The number of bytes written.
+ */
+ export function writeSync(fd: number, buffer: NodeJS.ArrayBufferView, offset?: number | null, length?: number | null, position?: number | null): number;
+ /**
+ * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ export function writeSync(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): number;
+ export type ReadPosition = number | bigint;
+ export interface ReadSyncOptions {
+ /**
+ * @default 0
+ */
+ offset?: number | undefined;
+ /**
+ * @default `length of buffer`
+ */
+ length?: number | undefined;
+ /**
+ * @default null
+ */
+ position?: ReadPosition | null | undefined;
+ }
+ export interface ReadAsyncOptions<TBuffer extends NodeJS.ArrayBufferView> extends ReadSyncOptions {
+ buffer?: TBuffer;
+ }
+ /**
+ * Read data from the file specified by `fd`.
+ *
+ * The callback is given the three arguments, `(err, bytesRead, buffer)`.
+ *
+ * If the file is not modified concurrently, the end-of-file is reached when the
+ * number of bytes read is zero.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a promise for an `Object` with `bytesRead` and `buffer` properties.
+ * @since v0.0.2
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The position in `buffer` to write the data to.
+ * @param length The number of bytes to read.
+ * @param position Specifies where to begin reading from in the file. If `position` is `null` or `-1 `, data will be read from the current file position, and the file position will be updated. If
+ * `position` is an integer, the file position will be unchanged.
+ */
+ export function read<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number,
+ length: number,
+ position: ReadPosition | null,
+ callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
+ ): void;
+ /**
+ * Similar to the above `fs.read` function, this version takes an optional `options` object.
+ * If not otherwise specified in an `options` object,
+ * `buffer` defaults to `Buffer.alloc(16384)`,
+ * `offset` defaults to `0`,
+ * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0
+ * `position` defaults to `null`
+ * @since v12.17.0, 13.11.0
+ */
+ export function read<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ options: ReadAsyncOptions<TBuffer>,
+ callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
+ ): void;
+ export function read(fd: number, callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NodeJS.ArrayBufferView) => void): void;
+ export namespace read {
+ /**
+ * @param fd A file descriptor.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The offset in the buffer at which to start writing.
+ * @param length The number of bytes to read.
+ * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
+ */
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number,
+ length: number,
+ position: number | null
+ ): Promise<{
+ bytesRead: number;
+ buffer: TBuffer;
+ }>;
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ options: ReadAsyncOptions<TBuffer>
+ ): Promise<{
+ bytesRead: number;
+ buffer: TBuffer;
+ }>;
+ function __promisify__(fd: number): Promise<{
+ bytesRead: number;
+ buffer: NodeJS.ArrayBufferView;
+ }>;
+ }
+ /**
+ * Returns the number of `bytesRead`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link read}.
+ * @since v0.1.21
+ * @param [position='null']
+ */
+ export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, offset: number, length: number, position: ReadPosition | null): number;
+ /**
+ * Similar to the above `fs.readSync` function, this version takes an optional `options` object.
+ * If no `options` object is specified, it will default with the above values.
+ */
+ export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadSyncOptions): number;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ *
+ * ```js
+ * import { readFile } from 'node:fs';
+ *
+ * readFile('/etc/passwd', (err, data) => {
+ * if (err) throw err;
+ * console.log(data);
+ * });
+ * ```
+ *
+ * The callback is passed two arguments `(err, data)`, where `data` is the
+ * contents of the file.
+ *
+ * If no encoding is specified, then the raw buffer is returned.
+ *
+ * If `options` is a string, then it specifies the encoding:
+ *
+ * ```js
+ * import { readFile } from 'node:fs';
+ *
+ * readFile('/etc/passwd', 'utf8', callback);
+ * ```
+ *
+ * When the path is a directory, the behavior of `fs.readFile()` and {@link readFileSync} is platform-specific. On macOS, Linux, and Windows, an
+ * error will be returned. On FreeBSD, a representation of the directory's contents
+ * will be returned.
+ *
+ * ```js
+ * import { readFile } from 'node:fs';
+ *
+ * // macOS, Linux, and Windows
+ * readFile('<directory>', (err, data) => {
+ * // => [Error: EISDIR: illegal operation on a directory, read <directory>]
+ * });
+ *
+ * // FreeBSD
+ * readFile('<directory>', (err, data) => {
+ * // => null, <data>
+ * });
+ * ```
+ *
+ * It is possible to abort an ongoing request using an `AbortSignal`. If a
+ * request is aborted the callback is called with an `AbortError`:
+ *
+ * ```js
+ * import { readFile } from 'node:fs';
+ *
+ * const controller = new AbortController();
+ * const signal = controller.signal;
+ * readFile(fileInfo[0].name, { signal }, (err, buf) => {
+ * // ...
+ * });
+ * // When you want to abort the request
+ * controller.abort();
+ * ```
+ *
+ * The `fs.readFile()` function buffers the entire file. To minimize memory costs,
+ * when possible prefer streaming via `fs.createReadStream()`.
+ *
+ * Aborting an ongoing request does not abort individual operating
+ * system requests but rather the internal buffering `fs.readFile` performs.
+ * @since v0.1.29
+ * @param path filename or file descriptor
+ */
+ export function readFile(
+ path: PathOrFileDescriptor,
+ options:
+ | ({
+ encoding?: null | undefined;
+ flag?: string | undefined;
+ } & Abortable)
+ | undefined
+ | null,
+ callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void
+ ): void;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFile(
+ path: PathOrFileDescriptor,
+ options:
+ | ({
+ encoding: BufferEncoding;
+ flag?: string | undefined;
+ } & Abortable)
+ | BufferEncoding,
+ callback: (err: NodeJS.ErrnoException | null, data: string) => void
+ ): void;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFile(
+ path: PathOrFileDescriptor,
+ options:
+ | (ObjectEncodingOptions & {
+ flag?: string | undefined;
+ } & Abortable)
+ | BufferEncoding
+ | undefined
+ | null,
+ callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void
+ ): void;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ */
+ export function readFile(path: PathOrFileDescriptor, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void;
+ export namespace readFile {
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(
+ path: PathOrFileDescriptor,
+ options?: {
+ encoding?: null | undefined;
+ flag?: string | undefined;
+ } | null
+ ): Promise<Buffer>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(
+ path: PathOrFileDescriptor,
+ options:
+ | {
+ encoding: BufferEncoding;
+ flag?: string | undefined;
+ }
+ | BufferEncoding
+ ): Promise<string>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(
+ path: PathOrFileDescriptor,
+ options?:
+ | (ObjectEncodingOptions & {
+ flag?: string | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string | Buffer>;
+ }
+ /**
+ * Returns the contents of the `path`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link readFile}.
+ *
+ * If the `encoding` option is specified then this function returns a
+ * string. Otherwise it returns a buffer.
+ *
+ * Similar to {@link readFile}, when the path is a directory, the behavior of`fs.readFileSync()` is platform-specific.
+ *
+ * ```js
+ * import { readFileSync } from 'node:fs';
+ *
+ * // macOS, Linux, and Windows
+ * readFileSync('<directory>');
+ * // => [Error: EISDIR: illegal operation on a directory, read <directory>]
+ *
+ * // FreeBSD
+ * readFileSync('<directory>'); // => <data>
+ * ```
+ * @since v0.1.8
+ * @param path filename or file descriptor
+ */
+ export function readFileSync(
+ path: PathOrFileDescriptor,
+ options?: {
+ encoding?: null | undefined;
+ flag?: string | undefined;
+ } | null
+ ): Buffer;
+ /**
+ * Synchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFileSync(
+ path: PathOrFileDescriptor,
+ options:
+ | {
+ encoding: BufferEncoding;
+ flag?: string | undefined;
+ }
+ | BufferEncoding
+ ): string;
+ /**
+ * Synchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFileSync(
+ path: PathOrFileDescriptor,
+ options?:
+ | (ObjectEncodingOptions & {
+ flag?: string | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): string | Buffer;
+ export type WriteFileOptions =
+ | (ObjectEncodingOptions &
+ Abortable & {
+ mode?: Mode | undefined;
+ flag?: string | undefined;
+ })
+ | BufferEncoding
+ | null;
+ /**
+ * When `file` is a filename, asynchronously writes data to the file, replacing the
+ * file if it already exists. `data` can be a string or a buffer.
+ *
+ * When `file` is a file descriptor, the behavior is similar to calling`fs.write()` directly (which is recommended). See the notes below on using
+ * a file descriptor.
+ *
+ * The `encoding` option is ignored if `data` is a buffer.
+ *
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
+ *
+ * ```js
+ * import { writeFile } from 'node:fs';
+ * import { Buffer } from 'node:buffer';
+ *
+ * const data = new Uint8Array(Buffer.from('Hello Node.js'));
+ * writeFile('message.txt', data, (err) => {
+ * if (err) throw err;
+ * console.log('The file has been saved!');
+ * });
+ * ```
+ *
+ * If `options` is a string, then it specifies the encoding:
+ *
+ * ```js
+ * import { writeFile } from 'node:fs';
+ *
+ * writeFile('message.txt', 'Hello Node.js', 'utf8', callback);
+ * ```
+ *
+ * It is unsafe to use `fs.writeFile()` multiple times on the same file without
+ * waiting for the callback. For this scenario, {@link createWriteStream} is
+ * recommended.
+ *
+ * Similarly to `fs.readFile` \- `fs.writeFile` is a convenience method that
+ * performs multiple `write` calls internally to write the buffer passed to it.
+ * For performance sensitive code consider using {@link createWriteStream}.
+ *
+ * It is possible to use an `AbortSignal` to cancel an `fs.writeFile()`.
+ * Cancelation is "best effort", and some amount of data is likely still
+ * to be written.
+ *
+ * ```js
+ * import { writeFile } from 'node:fs';
+ * import { Buffer } from 'node:buffer';
+ *
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const data = new Uint8Array(Buffer.from('Hello Node.js'));
+ * writeFile('message.txt', data, { signal }, (err) => {
+ * // When a request is aborted - the callback is called with an AbortError
+ * });
+ * // When the request should be aborted
+ * controller.abort();
+ * ```
+ *
+ * Aborting an ongoing request does not abort individual operating
+ * system requests but rather the internal buffering `fs.writeFile` performs.
+ * @since v0.1.29
+ * @param file filename or file descriptor
+ */
+ export function writeFile(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions, callback: NoParamCallback): void;
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ */
+ export function writeFile(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, callback: NoParamCallback): void;
+ export namespace writeFile {
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'w'` is used.
+ */
+ function __promisify__(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): Promise<void>;
+ }
+ /**
+ * Returns `undefined`.
+ *
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link writeFile}.
+ * @since v0.1.29
+ * @param file filename or file descriptor
+ */
+ export function writeFileSync(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void;
+ /**
+ * Asynchronously append data to a file, creating the file if it does not yet
+ * exist. `data` can be a string or a `Buffer`.
+ *
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
+ *
+ * ```js
+ * import { appendFile } from 'node:fs';
+ *
+ * appendFile('message.txt', 'data to append', (err) => {
+ * if (err) throw err;
+ * console.log('The "data to append" was appended to file!');
+ * });
+ * ```
+ *
+ * If `options` is a string, then it specifies the encoding:
+ *
+ * ```js
+ * import { appendFile } from 'node:fs';
+ *
+ * appendFile('message.txt', 'data to append', 'utf8', callback);
+ * ```
+ *
+ * The `path` may be specified as a numeric file descriptor that has been opened
+ * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will
+ * not be closed automatically.
+ *
+ * ```js
+ * import { open, close, appendFile } from 'node:fs';
+ *
+ * function closeFd(fd) {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ *
+ * open('message.txt', 'a', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * appendFile(fd, 'data to append', 'utf8', (err) => {
+ * closeFd(fd);
+ * if (err) throw err;
+ * });
+ * } catch (err) {
+ * closeFd(fd);
+ * throw err;
+ * }
+ * });
+ * ```
+ * @since v0.6.7
+ * @param path filename or file descriptor
+ */
+ export function appendFile(path: PathOrFileDescriptor, data: string | Uint8Array, options: WriteFileOptions, callback: NoParamCallback): void;
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ */
+ export function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void;
+ export namespace appendFile {
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'a'` is used.
+ */
+ function __promisify__(file: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): Promise<void>;
+ }
+ /**
+ * Synchronously append data to a file, creating the file if it does not yet
+ * exist. `data` can be a string or a `Buffer`.
+ *
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
+ *
+ * ```js
+ * import { appendFileSync } from 'node:fs';
+ *
+ * try {
+ * appendFileSync('message.txt', 'data to append');
+ * console.log('The "data to append" was appended to file!');
+ * } catch (err) {
+ * // Handle the error
+ * }
+ * ```
+ *
+ * If `options` is a string, then it specifies the encoding:
+ *
+ * ```js
+ * import { appendFileSync } from 'node:fs';
+ *
+ * appendFileSync('message.txt', 'data to append', 'utf8');
+ * ```
+ *
+ * The `path` may be specified as a numeric file descriptor that has been opened
+ * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will
+ * not be closed automatically.
+ *
+ * ```js
+ * import { openSync, closeSync, appendFileSync } from 'node:fs';
+ *
+ * let fd;
+ *
+ * try {
+ * fd = openSync('message.txt', 'a');
+ * appendFileSync(fd, 'data to append', 'utf8');
+ * } catch (err) {
+ * // Handle the error
+ * } finally {
+ * if (fd !== undefined)
+ * closeSync(fd);
+ * }
+ * ```
+ * @since v0.6.7
+ * @param path filename or file descriptor
+ */
+ export function appendFileSync(path: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): void;
+ /**
+ * Watch for changes on `filename`. The callback `listener` will be called each
+ * time the file is accessed.
+ *
+ * The `options` argument may be omitted. If provided, it should be an object. The`options` object may contain a boolean named `persistent` that indicates
+ * whether the process should continue to run as long as files are being watched.
+ * The `options` object may specify an `interval` property indicating how often the
+ * target should be polled in milliseconds.
+ *
+ * The `listener` gets two arguments the current stat object and the previous
+ * stat object:
+ *
+ * ```js
+ * import { watchFile } from 'fs';
+ *
+ * watchFile('message.text', (curr, prev) => {
+ * console.log(`the current mtime is: ${curr.mtime}`);
+ * console.log(`the previous mtime was: ${prev.mtime}`);
+ * });
+ * ```
+ *
+ * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
+ * the numeric values in these objects are specified as `BigInt`s.
+ *
+ * To be notified when the file was modified, not just accessed, it is necessary
+ * to compare `curr.mtimeMs` and `prev.mtimeMs`.
+ *
+ * When an `fs.watchFile` operation results in an `ENOENT` error, it
+ * will invoke the listener once, with all the fields zeroed (or, for dates, the
+ * Unix Epoch). If the file is created later on, the listener will be called
+ * again, with the latest stat objects. This is a change in functionality since
+ * v0.10.
+ *
+ * Using {@link watch} is more efficient than `fs.watchFile` and`fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and`fs.unwatchFile` when possible.
+ *
+ * When a file being watched by `fs.watchFile()` disappears and reappears,
+ * then the contents of `previous` in the second callback event (the file's
+ * reappearance) will be the same as the contents of `previous` in the first
+ * callback event (its disappearance).
+ *
+ * This happens when:
+ *
+ * * the file is deleted, followed by a restore
+ * * the file is renamed and then renamed a second time back to its original name
+ * @since v0.1.31
+ */
+ export interface WatchFileOptions {
+ bigint?: boolean | undefined;
+ persistent?: boolean | undefined;
+ interval?: number | undefined;
+ }
+ /**
+ * Watch for changes on `filename`. The callback `listener` will be called each
+ * time the file is accessed.
+ *
+ * The `options` argument may be omitted. If provided, it should be an object. The`options` object may contain a boolean named `persistent` that indicates
+ * whether the process should continue to run as long as files are being watched.
+ * The `options` object may specify an `interval` property indicating how often the
+ * target should be polled in milliseconds.
+ *
+ * The `listener` gets two arguments the current stat object and the previous
+ * stat object:
+ *
+ * ```js
+ * import { watchFile } from 'node:fs';
+ *
+ * watchFile('message.text', (curr, prev) => {
+ * console.log(`the current mtime is: ${curr.mtime}`);
+ * console.log(`the previous mtime was: ${prev.mtime}`);
+ * });
+ * ```
+ *
+ * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
+ * the numeric values in these objects are specified as `BigInt`s.
+ *
+ * To be notified when the file was modified, not just accessed, it is necessary
+ * to compare `curr.mtimeMs` and `prev.mtimeMs`.
+ *
+ * When an `fs.watchFile` operation results in an `ENOENT` error, it
+ * will invoke the listener once, with all the fields zeroed (or, for dates, the
+ * Unix Epoch). If the file is created later on, the listener will be called
+ * again, with the latest stat objects. This is a change in functionality since
+ * v0.10.
+ *
+ * Using {@link watch} is more efficient than `fs.watchFile` and`fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and`fs.unwatchFile` when possible.
+ *
+ * When a file being watched by `fs.watchFile()` disappears and reappears,
+ * then the contents of `previous` in the second callback event (the file's
+ * reappearance) will be the same as the contents of `previous` in the first
+ * callback event (its disappearance).
+ *
+ * This happens when:
+ *
+ * * the file is deleted, followed by a restore
+ * * the file is renamed and then renamed a second time back to its original name
+ * @since v0.1.31
+ */
+ export function watchFile(
+ filename: PathLike,
+ options:
+ | (WatchFileOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ listener: StatsListener
+ ): StatWatcher;
+ export function watchFile(
+ filename: PathLike,
+ options:
+ | (WatchFileOptions & {
+ bigint: true;
+ })
+ | undefined,
+ listener: BigIntStatsListener
+ ): StatWatcher;
+ /**
+ * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function watchFile(filename: PathLike, listener: StatsListener): StatWatcher;
+ /**
+ * Stop watching for changes on `filename`. If `listener` is specified, only that
+ * particular listener is removed. Otherwise, _all_ listeners are removed,
+ * effectively stopping watching of `filename`.
+ *
+ * Calling `fs.unwatchFile()` with a filename that is not being watched is a
+ * no-op, not an error.
+ *
+ * Using {@link watch} is more efficient than `fs.watchFile()` and`fs.unwatchFile()`. `fs.watch()` should be used instead of `fs.watchFile()`and `fs.unwatchFile()` when possible.
+ * @since v0.1.31
+ * @param listener Optional, a listener previously attached using `fs.watchFile()`
+ */
+ export function unwatchFile(filename: PathLike, listener?: StatsListener): void;
+ export function unwatchFile(filename: PathLike, listener?: BigIntStatsListener): void;
+ export interface WatchOptions extends Abortable {
+ encoding?: BufferEncoding | 'buffer' | undefined;
+ persistent?: boolean | undefined;
+ recursive?: boolean | undefined;
+ }
+ export type WatchEventType = 'rename' | 'change';
+ export type WatchListener<T> = (event: WatchEventType, filename: T | null) => void;
+ export type StatsListener = (curr: Stats, prev: Stats) => void;
+ export type BigIntStatsListener = (curr: BigIntStats, prev: BigIntStats) => void;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a
+ * directory.
+ *
+ * The second argument is optional. If `options` is provided as a string, it
+ * specifies the `encoding`. Otherwise `options` should be passed as an object.
+ *
+ * The listener callback gets two arguments `(eventType, filename)`. `eventType`is either `'rename'` or `'change'`, and `filename` is the name of the file
+ * which triggered the event.
+ *
+ * On most platforms, `'rename'` is emitted whenever a filename appears or
+ * disappears in the directory.
+ *
+ * The listener callback is attached to the `'change'` event fired by `fs.FSWatcher`, but it is not the same thing as the `'change'` value of`eventType`.
+ *
+ * If a `signal` is passed, aborting the corresponding AbortController will close
+ * the returned `fs.FSWatcher`.
+ * @since v0.5.10
+ * @param listener
+ */
+ export function watch(
+ filename: PathLike,
+ options:
+ | (WatchOptions & {
+ encoding: 'buffer';
+ })
+ | 'buffer',
+ listener?: WatchListener<Buffer>
+ ): FSWatcher;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ export function watch(filename: PathLike, options?: WatchOptions | BufferEncoding | null, listener?: WatchListener<string>): FSWatcher;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ export function watch(filename: PathLike, options: WatchOptions | string, listener?: WatchListener<string | Buffer>): FSWatcher;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function watch(filename: PathLike, listener?: WatchListener<string>): FSWatcher;
+ /**
+ * Test whether or not the given path exists by checking with the file system.
+ * Then call the `callback` argument with either true or false:
+ *
+ * ```js
+ * import { exists } from 'node:fs';
+ *
+ * exists('/etc/passwd', (e) => {
+ * console.log(e ? 'it exists' : 'no passwd!');
+ * });
+ * ```
+ *
+ * **The parameters for this callback are not consistent with other Node.js**
+ * **callbacks.** Normally, the first parameter to a Node.js callback is an `err`parameter, optionally followed by other parameters. The `fs.exists()` callback
+ * has only one boolean parameter. This is one reason `fs.access()` is recommended
+ * instead of `fs.exists()`.
+ *
+ * Using `fs.exists()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. Doing
+ * so introduces a race condition, since other processes may change the file's
+ * state between the two calls. Instead, user code should open/read/write the
+ * file directly and handle the error raised if the file does not exist.
+ *
+ * **write (NOT RECOMMENDED)**
+ *
+ * ```js
+ * import { exists, open, close } from 'node:fs';
+ *
+ * exists('myfile', (e) => {
+ * if (e) {
+ * console.error('myfile already exists');
+ * } else {
+ * open('myfile', 'wx', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * writeMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * }
+ * });
+ * ```
+ *
+ * **write (RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close } from 'node:fs';
+ * open('myfile', 'wx', (err, fd) => {
+ * if (err) {
+ * if (err.code === 'EEXIST') {
+ * console.error('myfile already exists');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * try {
+ * writeMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * ```
+ *
+ * **read (NOT RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close, exists } from 'node:fs';
+ *
+ * exists('myfile', (e) => {
+ * if (e) {
+ * open('myfile', 'r', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * readMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * } else {
+ * console.error('myfile does not exist');
+ * }
+ * });
+ * ```
+ *
+ * **read (RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close } from 'node:fs';
+ *
+ * open('myfile', 'r', (err, fd) => {
+ * if (err) {
+ * if (err.code === 'ENOENT') {
+ * console.error('myfile does not exist');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * try {
+ * readMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * ```
+ *
+ * The "not recommended" examples above check for existence and then use the
+ * file; the "recommended" examples are better because they use the file directly
+ * and handle the error, if any.
+ *
+ * In general, check for the existence of a file only if the file won't be
+ * used directly, for example when its existence is a signal from another
+ * process.
+ * @since v0.0.2
+ * @deprecated Since v1.0.0 - Use {@link stat} or {@link access} instead.
+ */
+ export function exists(path: PathLike, callback: (exists: boolean) => void): void;
+ /** @deprecated */
+ export namespace exists {
+ /**
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(path: PathLike): Promise<boolean>;
+ }
+ /**
+ * Returns `true` if the path exists, `false` otherwise.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link exists}.
+ *
+ * `fs.exists()` is deprecated, but `fs.existsSync()` is not. The `callback`parameter to `fs.exists()` accepts parameters that are inconsistent with other
+ * Node.js callbacks. `fs.existsSync()` does not use a callback.
+ *
+ * ```js
+ * import { existsSync } from 'node:fs';
+ *
+ * if (existsSync('/etc/passwd'))
+ * console.log('The path exists.');
+ * ```
+ * @since v0.1.21
+ */
+ export function existsSync(path: PathLike): boolean;
+ export namespace constants {
+ // File Access Constants
+ /** Constant for fs.access(). File is visible to the calling process. */
+ const F_OK: number;
+ /** Constant for fs.access(). File can be read by the calling process. */
+ const R_OK: number;
+ /** Constant for fs.access(). File can be written by the calling process. */
+ const W_OK: number;
+ /** Constant for fs.access(). File can be executed by the calling process. */
+ const X_OK: number;
+ // File Copy Constants
+ /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */
+ const COPYFILE_EXCL: number;
+ /**
+ * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink.
+ * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used.
+ */
+ const COPYFILE_FICLONE: number;
+ /**
+ * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink.
+ * If the underlying platform does not support copy-on-write, then the operation will fail with an error.
+ */
+ const COPYFILE_FICLONE_FORCE: number;
+ // File Open Constants
+ /** Constant for fs.open(). Flag indicating to open a file for read-only access. */
+ const O_RDONLY: number;
+ /** Constant for fs.open(). Flag indicating to open a file for write-only access. */
+ const O_WRONLY: number;
+ /** Constant for fs.open(). Flag indicating to open a file for read-write access. */
+ const O_RDWR: number;
+ /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */
+ const O_CREAT: number;
+ /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */
+ const O_EXCL: number;
+ /**
+ * Constant for fs.open(). Flag indicating that if path identifies a terminal device,
+ * opening the path shall not cause that terminal to become the controlling terminal for the process
+ * (if the process does not already have one).
+ */
+ const O_NOCTTY: number;
+ /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */
+ const O_TRUNC: number;
+ /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */
+ const O_APPEND: number;
+ /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */
+ const O_DIRECTORY: number;
+ /**
+ * constant for fs.open().
+ * Flag indicating reading accesses to the file system will no longer result in
+ * an update to the atime information associated with the file.
+ * This flag is available on Linux operating systems only.
+ */
+ const O_NOATIME: number;
+ /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */
+ const O_NOFOLLOW: number;
+ /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */
+ const O_SYNC: number;
+ /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */
+ const O_DSYNC: number;
+ /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */
+ const O_SYMLINK: number;
+ /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */
+ const O_DIRECT: number;
+ /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */
+ const O_NONBLOCK: number;
+ // File Type Constants
+ /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */
+ const S_IFMT: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */
+ const S_IFREG: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */
+ const S_IFDIR: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */
+ const S_IFCHR: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */
+ const S_IFBLK: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */
+ const S_IFIFO: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */
+ const S_IFLNK: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */
+ const S_IFSOCK: number;
+ // File Mode Constants
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */
+ const S_IRWXU: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */
+ const S_IRUSR: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */
+ const S_IWUSR: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */
+ const S_IXUSR: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */
+ const S_IRWXG: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */
+ const S_IRGRP: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */
+ const S_IWGRP: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */
+ const S_IXGRP: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */
+ const S_IRWXO: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */
+ const S_IROTH: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */
+ const S_IWOTH: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */
+ const S_IXOTH: number;
+ /**
+ * When set, a memory file mapping is used to access the file. This flag
+ * is available on Windows operating systems only. On other operating systems,
+ * this flag is ignored.
+ */
+ const UV_FS_O_FILEMAP: number;
+ }
+ /**
+ * Tests a user's permissions for the file or directory specified by `path`.
+ * The `mode` argument is an optional integer that specifies the accessibility
+ * checks to be performed. `mode` should be either the value `fs.constants.F_OK`or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`,`fs.constants.W_OK`, and `fs.constants.X_OK`
+ * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+ * possible values of `mode`.
+ *
+ * The final argument, `callback`, is a callback function that is invoked with
+ * a possible error argument. If any of the accessibility checks fail, the error
+ * argument will be an `Error` object. The following examples check if`package.json` exists, and if it is readable or writable.
+ *
+ * ```js
+ * import { access, constants } from 'node:fs';
+ *
+ * const file = 'package.json';
+ *
+ * // Check if the file exists in the current directory.
+ * access(file, constants.F_OK, (err) => {
+ * console.log(`${file} ${err ? 'does not exist' : 'exists'}`);
+ * });
+ *
+ * // Check if the file is readable.
+ * access(file, constants.R_OK, (err) => {
+ * console.log(`${file} ${err ? 'is not readable' : 'is readable'}`);
+ * });
+ *
+ * // Check if the file is writable.
+ * access(file, constants.W_OK, (err) => {
+ * console.log(`${file} ${err ? 'is not writable' : 'is writable'}`);
+ * });
+ *
+ * // Check if the file is readable and writable.
+ * access(file, constants.R_OK | constants.W_OK, (err) => {
+ * console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`);
+ * });
+ * ```
+ *
+ * Do not use `fs.access()` to check for the accessibility of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()`. Doing
+ * so introduces a race condition, since other processes may change the file's
+ * state between the two calls. Instead, user code should open/read/write the
+ * file directly and handle the error raised if the file is not accessible.
+ *
+ * **write (NOT RECOMMENDED)**
+ *
+ * ```js
+ * import { access, open, close } from 'node:fs';
+ *
+ * access('myfile', (err) => {
+ * if (!err) {
+ * console.error('myfile already exists');
+ * return;
+ * }
+ *
+ * open('myfile', 'wx', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * writeMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * });
+ * ```
+ *
+ * **write (RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close } from 'node:fs';
+ *
+ * open('myfile', 'wx', (err, fd) => {
+ * if (err) {
+ * if (err.code === 'EEXIST') {
+ * console.error('myfile already exists');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * try {
+ * writeMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * ```
+ *
+ * **read (NOT RECOMMENDED)**
+ *
+ * ```js
+ * import { access, open, close } from 'node:fs';
+ * access('myfile', (err) => {
+ * if (err) {
+ * if (err.code === 'ENOENT') {
+ * console.error('myfile does not exist');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * open('myfile', 'r', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * readMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * });
+ * ```
+ *
+ * **read (RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close } from 'node:fs';
+ *
+ * open('myfile', 'r', (err, fd) => {
+ * if (err) {
+ * if (err.code === 'ENOENT') {
+ * console.error('myfile does not exist');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * try {
+ * readMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * ```
+ *
+ * The "not recommended" examples above check for accessibility and then use the
+ * file; the "recommended" examples are better because they use the file directly
+ * and handle the error, if any.
+ *
+ * In general, check for the accessibility of a file only if the file will not be
+ * used directly, for example when its accessibility is a signal from another
+ * process.
+ *
+ * On Windows, access-control policies (ACLs) on a directory may limit access to
+ * a file or directory. The `fs.access()` function, however, does not check the
+ * ACL and therefore may report that a path is accessible even if the ACL restricts
+ * the user from reading or writing to it.
+ * @since v0.11.15
+ * @param [mode=fs.constants.F_OK]
+ */
+ export function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void;
+ /**
+ * Asynchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function access(path: PathLike, callback: NoParamCallback): void;
+ export namespace access {
+ /**
+ * Asynchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(path: PathLike, mode?: number): Promise<void>;
+ }
+ /**
+ * Synchronously tests a user's permissions for the file or directory specified
+ * by `path`. The `mode` argument is an optional integer that specifies the
+ * accessibility checks to be performed. `mode` should be either the value`fs.constants.F_OK` or a mask consisting of the bitwise OR of any of`fs.constants.R_OK`, `fs.constants.W_OK`, and
+ * `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+ * possible values of `mode`.
+ *
+ * If any of the accessibility checks fail, an `Error` will be thrown. Otherwise,
+ * the method will return `undefined`.
+ *
+ * ```js
+ * import { accessSync, constants } from 'node:fs';
+ *
+ * try {
+ * accessSync('etc/passwd', constants.R_OK | constants.W_OK);
+ * console.log('can read/write');
+ * } catch (err) {
+ * console.error('no access!');
+ * }
+ * ```
+ * @since v0.11.15
+ * @param [mode=fs.constants.F_OK]
+ */
+ export function accessSync(path: PathLike, mode?: number): void;
+ interface StreamOptions {
+ flags?: string | undefined;
+ encoding?: BufferEncoding | undefined;
+ fd?: number | promises.FileHandle | undefined;
+ mode?: number | undefined;
+ autoClose?: boolean | undefined;
+ emitClose?: boolean | undefined;
+ start?: number | undefined;
+ signal?: AbortSignal | null | undefined;
+ }
+ interface FSImplementation {
+ open?: (...args: any[]) => any;
+ close?: (...args: any[]) => any;
+ }
+ interface CreateReadStreamFSImplementation extends FSImplementation {
+ read: (...args: any[]) => any;
+ }
+ interface CreateWriteStreamFSImplementation extends FSImplementation {
+ write: (...args: any[]) => any;
+ writev?: (...args: any[]) => any;
+ }
+ interface ReadStreamOptions extends StreamOptions {
+ fs?: CreateReadStreamFSImplementation | null | undefined;
+ end?: number | undefined;
+ highWaterMark?: number | undefined;
+ }
+ interface WriteStreamOptions extends StreamOptions {
+ fs?: CreateWriteStreamFSImplementation | null | undefined;
+ }
+ /**
+ * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream
+ * returned by this method has a default `highWaterMark` of 64 KiB.
+ *
+ * `options` can include `start` and `end` values to read a range of bytes from
+ * the file instead of the entire file. Both `start` and `end` are inclusive and
+ * start counting at 0, allowed values are in the
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `fd` is specified and `start` is
+ * omitted or `undefined`, `fs.createReadStream()` reads sequentially from the
+ * current file position. The `encoding` can be any one of those accepted by `Buffer`.
+ *
+ * If `fd` is specified, `ReadStream` will ignore the `path` argument and will use
+ * the specified file descriptor. This means that no `'open'` event will be
+ * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `net.Socket`.
+ *
+ * If `fd` points to a character device that only supports blocking reads
+ * (such as keyboard or sound card), read operations do not finish until data is
+ * available. This can prevent the process from exiting and the stream from
+ * closing naturally.
+ *
+ * By default, the stream will emit a `'close'` event after it has been
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
+ *
+ * By providing the `fs` option, it is possible to override the corresponding `fs`implementations for `open`, `read`, and `close`. When providing the `fs` option,
+ * an override for `read` is required. If no `fd` is provided, an override for`open` is also required. If `autoClose` is `true`, an override for `close` is
+ * also required.
+ *
+ * ```js
+ * import { createReadStream } from 'node:fs';
+ *
+ * // Create a stream from some character device.
+ * const stream = createReadStream('/dev/input/event0');
+ * setTimeout(() => {
+ * stream.close(); // This may not close the stream.
+ * // Artificially marking end-of-stream, as if the underlying resource had
+ * // indicated end-of-file by itself, allows the stream to close.
+ * // This does not cancel pending read operations, and if there is such an
+ * // operation, the process may still not be able to exit successfully
+ * // until it finishes.
+ * stream.push(null);
+ * stream.read(0);
+ * }, 100);
+ * ```
+ *
+ * If `autoClose` is false, then the file descriptor won't be closed, even if
+ * there's an error. It is the application's responsibility to close it and make
+ * sure there's no file descriptor leak. If `autoClose` is set to true (default
+ * behavior), on `'error'` or `'end'` the file descriptor will be closed
+ * automatically.
+ *
+ * `mode` sets the file mode (permission and sticky bits), but only if the
+ * file was created.
+ *
+ * An example to read the last 10 bytes of a file which is 100 bytes long:
+ *
+ * ```js
+ * import { createReadStream } from 'node:fs';
+ *
+ * createReadStream('sample.txt', { start: 90, end: 99 });
+ * ```
+ *
+ * If `options` is a string, then it specifies the encoding.
+ * @since v0.1.31
+ */
+ export function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream;
+ /**
+ * `options` may also include a `start` option to allow writing data at some
+ * position past the beginning of the file, allowed values are in the
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than
+ * replacing it may require the `flags` option to be set to `r+` rather than the
+ * default `w`. The `encoding` can be any one of those accepted by `Buffer`.
+ *
+ * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false,
+ * then the file descriptor won't be closed, even if there's an error.
+ * It is the application's responsibility to close it and make sure there's no
+ * file descriptor leak.
+ *
+ * By default, the stream will emit a `'close'` event after it has been
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
+ *
+ * By providing the `fs` option it is possible to override the corresponding `fs`implementations for `open`, `write`, `writev`, and `close`. Overriding `write()`without `writev()` can reduce
+ * performance as some optimizations (`_writev()`)
+ * will be disabled. When providing the `fs` option, overrides for at least one of`write` and `writev` are required. If no `fd` option is supplied, an override
+ * for `open` is also required. If `autoClose` is `true`, an override for `close`is also required.
+ *
+ * Like `fs.ReadStream`, if `fd` is specified, `fs.WriteStream` will ignore the`path` argument and will use the specified file descriptor. This means that no`'open'` event will be
+ * emitted. `fd` should be blocking; non-blocking `fd`s
+ * should be passed to `net.Socket`.
+ *
+ * If `options` is a string, then it specifies the encoding.
+ * @since v0.1.31
+ */
+ export function createWriteStream(path: PathLike, options?: BufferEncoding | WriteStreamOptions): WriteStream;
+ /**
+ * Forces all currently queued I/O operations associated with the file to the
+ * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other
+ * than a possible
+ * exception are given to the completion callback.
+ * @since v0.1.96
+ */
+ export function fdatasync(fd: number, callback: NoParamCallback): void;
+ export namespace fdatasync {
+ /**
+ * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+ /**
+ * Forces all currently queued I/O operations associated with the file to the
+ * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. Returns `undefined`.
+ * @since v0.1.96
+ */
+ export function fdatasyncSync(fd: number): void;
+ /**
+ * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
+ * already exists. No arguments other than a possible exception are given to the
+ * callback function. Node.js makes no guarantees about the atomicity of the copy
+ * operation. If an error occurs after the destination file has been opened for
+ * writing, Node.js will attempt to remove the destination.
+ *
+ * `mode` is an optional integer that specifies the behavior
+ * of the copy operation. It is possible to create a mask consisting of the bitwise
+ * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`).
+ *
+ * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already
+ * exists.
+ * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a
+ * copy-on-write reflink. If the platform does not support copy-on-write, then a
+ * fallback copy mechanism is used.
+ * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to
+ * create a copy-on-write reflink. If the platform does not support
+ * copy-on-write, then the operation will fail.
+ *
+ * ```js
+ * import { copyFile, constants } from 'node:fs';
+ *
+ * function callback(err) {
+ * if (err) throw err;
+ * console.log('source.txt was copied to destination.txt');
+ * }
+ *
+ * // destination.txt will be created or overwritten by default.
+ * copyFile('source.txt', 'destination.txt', callback);
+ *
+ * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
+ * copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL, callback);
+ * ```
+ * @since v8.5.0
+ * @param src source filename to copy
+ * @param dest destination filename of the copy operation
+ * @param [mode=0] modifiers for copy operation.
+ */
+ export function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void;
+ export function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void;
+ export namespace copyFile {
+ function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise<void>;
+ }
+ /**
+ * Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it
+ * already exists. Returns `undefined`. Node.js makes no guarantees about the
+ * atomicity of the copy operation. If an error occurs after the destination file
+ * has been opened for writing, Node.js will attempt to remove the destination.
+ *
+ * `mode` is an optional integer that specifies the behavior
+ * of the copy operation. It is possible to create a mask consisting of the bitwise
+ * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`).
+ *
+ * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already
+ * exists.
+ * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a
+ * copy-on-write reflink. If the platform does not support copy-on-write, then a
+ * fallback copy mechanism is used.
+ * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to
+ * create a copy-on-write reflink. If the platform does not support
+ * copy-on-write, then the operation will fail.
+ *
+ * ```js
+ * import { copyFileSync, constants } from 'node:fs';
+ *
+ * // destination.txt will be created or overwritten by default.
+ * copyFileSync('source.txt', 'destination.txt');
+ * console.log('source.txt was copied to destination.txt');
+ *
+ * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
+ * copyFileSync('source.txt', 'destination.txt', constants.COPYFILE_EXCL);
+ * ```
+ * @since v8.5.0
+ * @param src source filename to copy
+ * @param dest destination filename of the copy operation
+ * @param [mode=0] modifiers for copy operation.
+ */
+ export function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void;
+ /**
+ * Write an array of `ArrayBufferView`s to the file specified by `fd` using`writev()`.
+ *
+ * `position` is the offset from the beginning of the file where this data
+ * should be written. If `typeof position !== 'number'`, the data will be written
+ * at the current position.
+ *
+ * The callback will be given three arguments: `err`, `bytesWritten`, and`buffers`. `bytesWritten` is how many bytes were written from `buffers`.
+ *
+ * If this method is `util.promisify()` ed, it returns a promise for an`Object` with `bytesWritten` and `buffers` properties.
+ *
+ * It is unsafe to use `fs.writev()` multiple times on the same file without
+ * waiting for the callback. For this scenario, use {@link createWriteStream}.
+ *
+ * On Linux, positional writes don't work when the file is opened in append mode.
+ * The kernel ignores the position argument and always appends the data to
+ * the end of the file.
+ * @since v12.9.0
+ * @param [position='null']
+ */
+ export function writev(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void): void;
+ export function writev(
+ fd: number,
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
+ position: number,
+ cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
+ ): void;
+ export interface WriteVResult {
+ bytesWritten: number;
+ buffers: NodeJS.ArrayBufferView[];
+ }
+ export namespace writev {
+ function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
+ }
+ /**
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link writev}.
+ * @since v12.9.0
+ * @param [position='null']
+ * @return The number of bytes written.
+ */
+ export function writevSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
+ /**
+ * Read from a file specified by `fd` and write to an array of `ArrayBufferView`s
+ * using `readv()`.
+ *
+ * `position` is the offset from the beginning of the file from where data
+ * should be read. If `typeof position !== 'number'`, the data will be read
+ * from the current position.
+ *
+ * The callback will be given three arguments: `err`, `bytesRead`, and`buffers`. `bytesRead` is how many bytes were read from the file.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a promise for an `Object` with `bytesRead` and `buffers` properties.
+ * @since v13.13.0, v12.17.0
+ * @param [position='null']
+ */
+ export function readv(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void): void;
+ export function readv(
+ fd: number,
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
+ position: number,
+ cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void
+ ): void;
+ export interface ReadVResult {
+ bytesRead: number;
+ buffers: NodeJS.ArrayBufferView[];
+ }
+ export namespace readv {
+ function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
+ }
+ /**
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link readv}.
+ * @since v13.13.0, v12.17.0
+ * @param [position='null']
+ * @return The number of bytes read.
+ */
+ export function readvSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
+
+ export interface OpenAsBlobOptions {
+ /**
+ * An optional mime type for the blob.
+ *
+ * @default 'undefined'
+ */
+ type?: string | undefined;
+ }
+
+ /**
+ * Returns a Blob whose data is backed by the given file.
+ *
+ * The file must not be modified after the `Blob` is created.
+ * Any modifications will cause reading the `Blob` data to fail with a `DOMException` error.
+ * Synchronous stat operations on the file when the `Blob` is created, and before each read in order to detect whether the file data has been modified on disk.
+ *
+ * @param path
+ * @param [options]
+ *
+ * @experimental
+ * @since v19.8.0
+ */
+ export function openAsBlob(path: PathLike, options?: OpenAsBlobOptions): Promise<Blob>;
+
+ export interface OpenDirOptions {
+ /**
+ * @default 'utf8'
+ */
+ encoding?: BufferEncoding | undefined;
+ /**
+ * Number of directory entries that are buffered
+ * internally when reading from the directory. Higher values lead to better
+ * performance but higher memory usage.
+ * @default 32
+ */
+ bufferSize?: number | undefined;
+ /**
+ * @default false
+ */
+ recursive?: boolean;
+ }
+ /**
+ * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html).
+ *
+ * Creates an `fs.Dir`, which contains all further functions for reading from
+ * and cleaning up the directory.
+ *
+ * The `encoding` option sets the encoding for the `path` while opening the
+ * directory and subsequent read operations.
+ * @since v12.12.0
+ */
+ export function opendirSync(path: PathLike, options?: OpenDirOptions): Dir;
+ /**
+ * Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for
+ * more details.
+ *
+ * Creates an `fs.Dir`, which contains all further functions for reading from
+ * and cleaning up the directory.
+ *
+ * The `encoding` option sets the encoding for the `path` while opening the
+ * directory and subsequent read operations.
+ * @since v12.12.0
+ */
+ export function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
+ export function opendir(path: PathLike, options: OpenDirOptions, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
+ export namespace opendir {
+ function __promisify__(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
+ }
+ export interface BigIntStats extends StatsBase<bigint> {
+ atimeNs: bigint;
+ mtimeNs: bigint;
+ ctimeNs: bigint;
+ birthtimeNs: bigint;
+ }
+ export interface BigIntOptions {
+ bigint: true;
+ }
+ export interface StatOptions {
+ bigint?: boolean | undefined;
+ }
+ export interface StatSyncOptions extends StatOptions {
+ throwIfNoEntry?: boolean | undefined;
+ }
+ interface CopyOptionsBase {
+ /**
+ * Dereference symlinks
+ * @default false
+ */
+ dereference?: boolean;
+ /**
+ * When `force` is `false`, and the destination
+ * exists, throw an error.
+ * @default false
+ */
+ errorOnExist?: boolean;
+ /**
+ * Overwrite existing file or directory. _The copy
+ * operation will ignore errors if you set this to false and the destination
+ * exists. Use the `errorOnExist` option to change this behavior.
+ * @default true
+ */
+ force?: boolean;
+ /**
+ * Modifiers for copy operation. See `mode` flag of {@link copyFileSync()}
+ */
+ mode?: number;
+ /**
+ * When `true` timestamps from `src` will
+ * be preserved.
+ * @default false
+ */
+ preserveTimestamps?: boolean;
+ /**
+ * Copy directories recursively.
+ * @default false
+ */
+ recursive?: boolean;
+ /**
+ * When true, path resolution for symlinks will be skipped
+ * @default false
+ */
+ verbatimSymlinks?: boolean;
+ }
+ export interface CopyOptions extends CopyOptionsBase {
+ /**
+ * Function to filter copied files/directories. Return
+ * `true` to copy the item, `false` to ignore it.
+ */
+ filter?(source: string, destination: string): boolean | Promise<boolean>;
+ }
+ export interface CopySyncOptions extends CopyOptionsBase {
+ /**
+ * Function to filter copied files/directories. Return
+ * `true` to copy the item, `false` to ignore it.
+ */
+ filter?(source: string, destination: string): boolean;
+ }
+ /**
+ * Asynchronously copies the entire directory structure from `src` to `dest`,
+ * including subdirectories and files.
+ *
+ * When copying a directory to another directory, globs are not supported and
+ * behavior is similar to `cp dir1/ dir2/`.
+ * @since v16.7.0
+ * @experimental
+ * @param src source path to copy.
+ * @param dest destination path to copy to.
+ */
+ export function cp(source: string | URL, destination: string | URL, callback: (err: NodeJS.ErrnoException | null) => void): void;
+ export function cp(source: string | URL, destination: string | URL, opts: CopyOptions, callback: (err: NodeJS.ErrnoException | null) => void): void;
+ /**
+ * Synchronously copies the entire directory structure from `src` to `dest`,
+ * including subdirectories and files.
+ *
+ * When copying a directory to another directory, globs are not supported and
+ * behavior is similar to `cp dir1/ dir2/`.
+ * @since v16.7.0
+ * @experimental
+ * @param src source path to copy.
+ * @param dest destination path to copy to.
+ */
+ export function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void;
+}
+declare module 'node:fs' {
+ export * from 'fs';
+}
diff --git a/node_modules/@types/node/fs/promises.d.ts b/node_modules/@types/node/fs/promises.d.ts
new file mode 100755
index 0000000..6082ff8
--- /dev/null
+++ b/node_modules/@types/node/fs/promises.d.ts
@@ -0,0 +1,1202 @@
+/**
+ * The `fs/promises` API provides asynchronous file system methods that return
+ * promises.
+ *
+ * The promise APIs use the underlying Node.js threadpool to perform file
+ * system operations off the event loop thread. These operations are not
+ * synchronized or threadsafe. Care must be taken when performing multiple
+ * concurrent modifications on the same file or data corruption may occur.
+ * @since v10.0.0
+ */
+declare module 'fs/promises' {
+ import { Abortable } from 'node:events';
+ import { Stream } from 'node:stream';
+ import { ReadableStream } from 'node:stream/web';
+ import {
+ BigIntStats,
+ BigIntStatsFs,
+ BufferEncodingOption,
+ constants as fsConstants,
+ CopyOptions,
+ Dir,
+ Dirent,
+ MakeDirectoryOptions,
+ Mode,
+ ObjectEncodingOptions,
+ OpenDirOptions,
+ OpenMode,
+ PathLike,
+ ReadStream,
+ ReadVResult,
+ RmDirOptions,
+ RmOptions,
+ StatOptions,
+ StatFsOptions,
+ Stats,
+ StatsFs,
+ TimeLike,
+ WatchEventType,
+ WatchOptions,
+ WriteStream,
+ WriteVResult,
+ } from 'node:fs';
+ import { Interface as ReadlineInterface } from 'node:readline';
+ interface FileChangeInfo<T extends string | Buffer> {
+ eventType: WatchEventType;
+ filename: T | null;
+ }
+ interface FlagAndOpenMode {
+ mode?: Mode | undefined;
+ flag?: OpenMode | undefined;
+ }
+ interface FileReadResult<T extends NodeJS.ArrayBufferView> {
+ bytesRead: number;
+ buffer: T;
+ }
+ interface FileReadOptions<T extends NodeJS.ArrayBufferView = Buffer> {
+ /**
+ * @default `Buffer.alloc(0xffff)`
+ */
+ buffer?: T;
+ /**
+ * @default 0
+ */
+ offset?: number | null;
+ /**
+ * @default `buffer.byteLength`
+ */
+ length?: number | null;
+ position?: number | null;
+ }
+ interface CreateReadStreamOptions {
+ encoding?: BufferEncoding | null | undefined;
+ autoClose?: boolean | undefined;
+ emitClose?: boolean | undefined;
+ start?: number | undefined;
+ end?: number | undefined;
+ highWaterMark?: number | undefined;
+ }
+ interface CreateWriteStreamOptions {
+ encoding?: BufferEncoding | null | undefined;
+ autoClose?: boolean | undefined;
+ emitClose?: boolean | undefined;
+ start?: number | undefined;
+ }
+ interface ReadableWebStreamOptions {
+ /**
+ * Whether to open a normal or a `'bytes'` stream.
+ * @since v20.0.0
+ */
+ type?: 'bytes' | undefined;
+ }
+ // TODO: Add `EventEmitter` close
+ interface FileHandle {
+ /**
+ * The numeric file descriptor managed by the {FileHandle} object.
+ * @since v10.0.0
+ */
+ readonly fd: number;
+ /**
+ * Alias of `filehandle.writeFile()`.
+ *
+ * When operating on file handles, the mode cannot be changed from what it was set
+ * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ appendFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise<void>;
+ /**
+ * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html).
+ * @since v10.0.0
+ * @param uid The file's new owner's user id.
+ * @param gid The file's new group's group id.
+ * @return Fulfills with `undefined` upon success.
+ */
+ chown(uid: number, gid: number): Promise<void>;
+ /**
+ * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html).
+ * @since v10.0.0
+ * @param mode the file mode bit mask.
+ * @return Fulfills with `undefined` upon success.
+ */
+ chmod(mode: Mode): Promise<void>;
+ /**
+ * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream
+ * returned by this method has a default `highWaterMark` of 64 KiB.
+ *
+ * `options` can include `start` and `end` values to read a range of bytes from
+ * the file instead of the entire file. Both `start` and `end` are inclusive and
+ * start counting at 0, allowed values are in the
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is
+ * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from
+ * the current file position. The `encoding` can be any one of those accepted by `Buffer`.
+ *
+ * If the `FileHandle` points to a character device that only supports blocking
+ * reads (such as keyboard or sound card), read operations do not finish until data
+ * is available. This can prevent the process from exiting and the stream from
+ * closing naturally.
+ *
+ * By default, the stream will emit a `'close'` event after it has been
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
+ *
+ * ```js
+ * import { open } from 'node:fs/promises';
+ *
+ * const fd = await open('/dev/input/event0');
+ * // Create a stream from some character device.
+ * const stream = fd.createReadStream();
+ * setTimeout(() => {
+ * stream.close(); // This may not close the stream.
+ * // Artificially marking end-of-stream, as if the underlying resource had
+ * // indicated end-of-file by itself, allows the stream to close.
+ * // This does not cancel pending read operations, and if there is such an
+ * // operation, the process may still not be able to exit successfully
+ * // until it finishes.
+ * stream.push(null);
+ * stream.read(0);
+ * }, 100);
+ * ```
+ *
+ * If `autoClose` is false, then the file descriptor won't be closed, even if
+ * there's an error. It is the application's responsibility to close it and make
+ * sure there's no file descriptor leak. If `autoClose` is set to true (default
+ * behavior), on `'error'` or `'end'` the file descriptor will be closed
+ * automatically.
+ *
+ * An example to read the last 10 bytes of a file which is 100 bytes long:
+ *
+ * ```js
+ * import { open } from 'node:fs/promises';
+ *
+ * const fd = await open('sample.txt');
+ * fd.createReadStream({ start: 90, end: 99 });
+ * ```
+ * @since v16.11.0
+ */
+ createReadStream(options?: CreateReadStreamOptions): ReadStream;
+ /**
+ * `options` may also include a `start` option to allow writing data at some
+ * position past the beginning of the file, allowed values are in the
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than
+ * replacing it may require the `flags` `open` option to be set to `r+` rather than
+ * the default `r`. The `encoding` can be any one of those accepted by `Buffer`.
+ *
+ * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false,
+ * then the file descriptor won't be closed, even if there's an error.
+ * It is the application's responsibility to close it and make sure there's no
+ * file descriptor leak.
+ *
+ * By default, the stream will emit a `'close'` event after it has been
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
+ * @since v16.11.0
+ */
+ createWriteStream(options?: CreateWriteStreamOptions): WriteStream;
+ /**
+ * Forces all currently queued I/O operations associated with the file to the
+ * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details.
+ *
+ * Unlike `filehandle.sync` this method does not flush modified metadata.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ datasync(): Promise<void>;
+ /**
+ * Request that all data for the open file descriptor is flushed to the storage
+ * device. The specific implementation is operating system and device specific.
+ * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ sync(): Promise<void>;
+ /**
+ * Reads data from the file and stores that in the given buffer.
+ *
+ * If the file is not modified concurrently, the end-of-file is reached when the
+ * number of bytes read is zero.
+ * @since v10.0.0
+ * @param buffer A buffer that will be filled with the file data read.
+ * @param offset The location in the buffer at which to start filling.
+ * @param length The number of bytes to read.
+ * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an
+ * integer, the current file position will remain unchanged.
+ * @return Fulfills upon success with an object with two properties:
+ */
+ read<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number | null, length?: number | null, position?: number | null): Promise<FileReadResult<T>>;
+ read<T extends NodeJS.ArrayBufferView = Buffer>(options?: FileReadOptions<T>): Promise<FileReadResult<T>>;
+ /**
+ * Returns a `ReadableStream` that may be used to read the files data.
+ *
+ * An error will be thrown if this method is called more than once or is called
+ * after the `FileHandle` is closed or closing.
+ *
+ * ```js
+ * import {
+ * open,
+ * } from 'node:fs/promises';
+ *
+ * const file = await open('./some/file/to/read');
+ *
+ * for await (const chunk of file.readableWebStream())
+ * console.log(chunk);
+ *
+ * await file.close();
+ * ```
+ *
+ * While the `ReadableStream` will read the file to completion, it will not
+ * close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method.
+ * @since v17.0.0
+ * @experimental
+ */
+ readableWebStream(options?: ReadableWebStreamOptions): ReadableStream;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ *
+ * If `options` is a string, then it specifies the `encoding`.
+ *
+ * The `FileHandle` has to support reading.
+ *
+ * If one or more `filehandle.read()` calls are made on a file handle and then a`filehandle.readFile()` call is made, the data will be read from the current
+ * position till the end of the file. It doesn't always read from the beginning
+ * of the file.
+ * @since v10.0.0
+ * @return Fulfills upon a successful read with the contents of the file. If no encoding is specified (using `options.encoding`), the data is returned as a {Buffer} object. Otherwise, the
+ * data will be a string.
+ */
+ readFile(
+ options?: {
+ encoding?: null | undefined;
+ flag?: OpenMode | undefined;
+ } | null
+ ): Promise<Buffer>;
+ /**
+ * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for reading.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ readFile(
+ options:
+ | {
+ encoding: BufferEncoding;
+ flag?: OpenMode | undefined;
+ }
+ | BufferEncoding
+ ): Promise<string>;
+ /**
+ * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for reading.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ readFile(
+ options?:
+ | (ObjectEncodingOptions & {
+ flag?: OpenMode | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string | Buffer>;
+ /**
+ * Convenience method to create a `readline` interface and stream over the file.
+ * See `filehandle.createReadStream()` for the options.
+ *
+ * ```js
+ * import { open } from 'node:fs/promises';
+ *
+ * const file = await open('./some/file/to/read');
+ *
+ * for await (const line of file.readLines()) {
+ * console.log(line);
+ * }
+ * ```
+ * @since v18.11.0
+ */
+ readLines(options?: CreateReadStreamOptions): ReadlineInterface;
+ /**
+ * @since v10.0.0
+ * @return Fulfills with an {fs.Stats} for the file.
+ */
+ stat(
+ opts?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ stat(
+ opts: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ stat(opts?: StatOptions): Promise<Stats | BigIntStats>;
+ /**
+ * Truncates the file.
+ *
+ * If the file was larger than `len` bytes, only the first `len` bytes will be
+ * retained in the file.
+ *
+ * The following example retains only the first four bytes of the file:
+ *
+ * ```js
+ * import { open } from 'node:fs/promises';
+ *
+ * let filehandle = null;
+ * try {
+ * filehandle = await open('temp.txt', 'r+');
+ * await filehandle.truncate(4);
+ * } finally {
+ * await filehandle?.close();
+ * }
+ * ```
+ *
+ * If the file previously was shorter than `len` bytes, it is extended, and the
+ * extended part is filled with null bytes (`'\0'`):
+ *
+ * If `len` is negative then `0` will be used.
+ * @since v10.0.0
+ * @param [len=0]
+ * @return Fulfills with `undefined` upon success.
+ */
+ truncate(len?: number): Promise<void>;
+ /**
+ * Change the file system timestamps of the object referenced by the `FileHandle` then resolves the promise with no arguments upon success.
+ * @since v10.0.0
+ */
+ utimes(atime: TimeLike, mtime: TimeLike): Promise<void>;
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
+ * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an
+ * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.
+ * The promise is resolved with no arguments upon success.
+ *
+ * If `options` is a string, then it specifies the `encoding`.
+ *
+ * The `FileHandle` has to support writing.
+ *
+ * It is unsafe to use `filehandle.writeFile()` multiple times on the same file
+ * without waiting for the promise to be resolved (or rejected).
+ *
+ * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the
+ * current position till the end of the file. It doesn't always write from the
+ * beginning of the file.
+ * @since v10.0.0
+ */
+ writeFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode & Abortable) | BufferEncoding | null): Promise<void>;
+ /**
+ * Write `buffer` to the file.
+ *
+ * The promise is resolved with an object containing two properties:
+ *
+ * It is unsafe to use `filehandle.write()` multiple times on the same file
+ * without waiting for the promise to be resolved (or rejected). For this
+ * scenario, use `filehandle.createWriteStream()`.
+ *
+ * On Linux, positional writes do not work when the file is opened in append mode.
+ * The kernel ignores the position argument and always appends the data to
+ * the end of the file.
+ * @since v10.0.0
+ * @param offset The start position from within `buffer` where the data to write begins.
+ * @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write.
+ * @param [position='null'] The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current
+ * position. See the POSIX pwrite(2) documentation for more detail.
+ */
+ write<TBuffer extends Uint8Array>(
+ buffer: TBuffer,
+ offset?: number | null,
+ length?: number | null,
+ position?: number | null
+ ): Promise<{
+ bytesWritten: number;
+ buffer: TBuffer;
+ }>;
+ write(
+ data: string,
+ position?: number | null,
+ encoding?: BufferEncoding | null
+ ): Promise<{
+ bytesWritten: number;
+ buffer: string;
+ }>;
+ /**
+ * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file.
+ *
+ * The promise is resolved with an object containing a two properties:
+ *
+ * It is unsafe to call `writev()` multiple times on the same file without waiting
+ * for the promise to be resolved (or rejected).
+ *
+ * On Linux, positional writes don't work when the file is opened in append mode.
+ * The kernel ignores the position argument and always appends the data to
+ * the end of the file.
+ * @since v12.9.0
+ * @param [position='null'] The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current
+ * position.
+ */
+ writev(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
+ /**
+ * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s
+ * @since v13.13.0, v12.17.0
+ * @param [position='null'] The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position.
+ * @return Fulfills upon success an object containing two properties:
+ */
+ readv(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
+ /**
+ * Closes the file handle after waiting for any pending operation on the handle to
+ * complete.
+ *
+ * ```js
+ * import { open } from 'node:fs/promises';
+ *
+ * let filehandle;
+ * try {
+ * filehandle = await open('thefile.txt', 'r');
+ * } finally {
+ * await filehandle?.close();
+ * }
+ * ```
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ close(): Promise<void>;
+ /**
+ * An alias for {@link FileHandle.close()}.
+ * @since v20.4.0
+ */
+ [Symbol.asyncDispose](): Promise<void>;
+ }
+ const constants: typeof fsConstants;
+ /**
+ * Tests a user's permissions for the file or directory specified by `path`.
+ * The `mode` argument is an optional integer that specifies the accessibility
+ * checks to be performed. `mode` should be either the value `fs.constants.F_OK`or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`,`fs.constants.W_OK`, and `fs.constants.X_OK`
+ * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+ * possible values of `mode`.
+ *
+ * If the accessibility check is successful, the promise is resolved with no
+ * value. If any of the accessibility checks fail, the promise is rejected
+ * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and
+ * written by the current process.
+ *
+ * ```js
+ * import { access, constants } from 'node:fs/promises';
+ *
+ * try {
+ * await access('/etc/passwd', constants.R_OK | constants.W_OK);
+ * console.log('can access');
+ * } catch {
+ * console.error('cannot access');
+ * }
+ * ```
+ *
+ * Using `fsPromises.access()` to check for the accessibility of a file before
+ * calling `fsPromises.open()` is not recommended. Doing so introduces a race
+ * condition, since other processes may change the file's state between the two
+ * calls. Instead, user code should open/read/write the file directly and handle
+ * the error raised if the file is not accessible.
+ * @since v10.0.0
+ * @param [mode=fs.constants.F_OK]
+ * @return Fulfills with `undefined` upon success.
+ */
+ function access(path: PathLike, mode?: number): Promise<void>;
+ /**
+ * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
+ * already exists.
+ *
+ * No guarantees are made about the atomicity of the copy operation. If an
+ * error occurs after the destination file has been opened for writing, an attempt
+ * will be made to remove the destination.
+ *
+ * ```js
+ * import { copyFile, constants } from 'node:fs/promises';
+ *
+ * try {
+ * await copyFile('source.txt', 'destination.txt');
+ * console.log('source.txt was copied to destination.txt');
+ * } catch {
+ * console.error('The file could not be copied');
+ * }
+ *
+ * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
+ * try {
+ * await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL);
+ * console.log('source.txt was copied to destination.txt');
+ * } catch {
+ * console.error('The file could not be copied');
+ * }
+ * ```
+ * @since v10.0.0
+ * @param src source filename to copy
+ * @param dest destination filename of the copy operation
+ * @param [mode=0] Optional modifiers that specify the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g.
+ * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`)
+ * @return Fulfills with `undefined` upon success.
+ */
+ function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise<void>;
+ /**
+ * Opens a `FileHandle`.
+ *
+ * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail.
+ *
+ * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented
+ * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains
+ * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams).
+ * @since v10.0.0
+ * @param [flags='r'] See `support of file system `flags``.
+ * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created.
+ * @return Fulfills with a {FileHandle} object.
+ */
+ function open(path: PathLike, flags?: string | number, mode?: Mode): Promise<FileHandle>;
+ /**
+ * Renames `oldPath` to `newPath`.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
+ /**
+ * Truncates (shortens or extends the length) of the content at `path` to `len`bytes.
+ * @since v10.0.0
+ * @param [len=0]
+ * @return Fulfills with `undefined` upon success.
+ */
+ function truncate(path: PathLike, len?: number): Promise<void>;
+ /**
+ * Removes the directory identified by `path`.
+ *
+ * Using `fsPromises.rmdir()` on a file (not a directory) results in the
+ * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR`error on POSIX.
+ *
+ * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function rmdir(path: PathLike, options?: RmDirOptions): Promise<void>;
+ /**
+ * Removes files and directories (modeled on the standard POSIX `rm` utility).
+ * @since v14.14.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function rm(path: PathLike, options?: RmOptions): Promise<void>;
+ /**
+ * Asynchronously creates a directory.
+ *
+ * The optional `options` argument can be an integer specifying `mode` (permission
+ * and sticky bits), or an object with a `mode` property and a `recursive`property indicating whether parent directories should be created. Calling`fsPromises.mkdir()` when `path` is a directory
+ * that exists results in a
+ * rejection only when `recursive` is false.
+ *
+ * ```js
+ * import { mkdir } from 'node:fs/promises';
+ *
+ * try {
+ * const projectFolder = new URL('./test/project/', import.meta.url);
+ * const createDir = await mkdir(projectFolder, { recursive: true });
+ *
+ * console.log(`created ${createDir}`);
+ * } catch (err) {
+ * console.error(err.message);
+ * }
+ * ```
+ * @since v10.0.0
+ * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`.
+ */
+ function mkdir(
+ path: PathLike,
+ options: MakeDirectoryOptions & {
+ recursive: true;
+ }
+ ): Promise<string | undefined>;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function mkdir(
+ path: PathLike,
+ options?:
+ | Mode
+ | (MakeDirectoryOptions & {
+ recursive?: false | undefined;
+ })
+ | null
+ ): Promise<void>;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
+ /**
+ * Reads the contents of a directory.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned
+ * will be passed as `Buffer` objects.
+ *
+ * If `options.withFileTypes` is set to `true`, the resolved array will contain `fs.Dirent` objects.
+ *
+ * ```js
+ * import { readdir } from 'node:fs/promises';
+ *
+ * try {
+ * const files = await readdir(path);
+ * for (const file of files)
+ * console.log(file);
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * ```
+ * @since v10.0.0
+ * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`.
+ */
+ function readdir(
+ path: PathLike,
+ options?:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdir(
+ path: PathLike,
+ options:
+ | {
+ encoding: 'buffer';
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ }
+ | 'buffer'
+ ): Promise<Buffer[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdir(
+ path: PathLike,
+ options?:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string[] | Buffer[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ function readdir(
+ path: PathLike,
+ options: ObjectEncodingOptions & {
+ withFileTypes: true;
+ recursive?: boolean | undefined;
+ }
+ ): Promise<Dirent[]>;
+ /**
+ * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is
+ * resolved with the`linkString` upon success.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the link path returned. If the `encoding` is set to `'buffer'`, the link path
+ * returned will be passed as a `Buffer` object.
+ * @since v10.0.0
+ * @return Fulfills with the `linkString` upon success.
+ */
+ function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlink(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlink(path: PathLike, options?: ObjectEncodingOptions | string | null): Promise<string | Buffer>;
+ /**
+ * Creates a symbolic link.
+ *
+ * The `type` argument is only used on Windows platforms and can be one of `'dir'`,`'file'`, or `'junction'`. If the `type` argument is not a string, Node.js will
+ * autodetect `target` type and use `'file'` or `'dir'`. If the `target` does not
+ * exist, `'file'` will be used. Windows junction points require the destination
+ * path to be absolute. When using `'junction'`, the `target` argument will
+ * automatically be normalized to absolute path. Junction points on NTFS volumes
+ * can only point to directories.
+ * @since v10.0.0
+ * @param [type='null']
+ * @return Fulfills with `undefined` upon success.
+ */
+ function symlink(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
+ /**
+ * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link,
+ * in which case the link itself is stat-ed, not the file that it refers to.
+ * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail.
+ * @since v10.0.0
+ * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`.
+ */
+ function lstat(
+ path: PathLike,
+ opts?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function lstat(
+ path: PathLike,
+ opts: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function lstat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
+ /**
+ * @since v10.0.0
+ * @return Fulfills with the {fs.Stats} object for the given `path`.
+ */
+ function stat(
+ path: PathLike,
+ opts?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function stat(
+ path: PathLike,
+ opts: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function stat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
+ /**
+ * @since v19.6.0, v18.15.0
+ * @return Fulfills with the {fs.StatFs} object for the given `path`.
+ */
+ function statfs(
+ path: PathLike,
+ opts?: StatFsOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<StatsFs>;
+ function statfs(
+ path: PathLike,
+ opts: StatFsOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStatsFs>;
+ function statfs(path: PathLike, opts?: StatFsOptions): Promise<StatsFs | BigIntStatsFs>;
+ /**
+ * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
+ /**
+ * If `path` refers to a symbolic link, then the link is removed without affecting
+ * the file or directory to which that link refers. If the `path` refers to a file
+ * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function unlink(path: PathLike): Promise<void>;
+ /**
+ * Changes the permissions of a file.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function chmod(path: PathLike, mode: Mode): Promise<void>;
+ /**
+ * Changes the permissions on a symbolic link.
+ *
+ * This method is only implemented on macOS.
+ * @deprecated Since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function lchmod(path: PathLike, mode: Mode): Promise<void>;
+ /**
+ * Changes the ownership on a symbolic link.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function lchown(path: PathLike, uid: number, gid: number): Promise<void>;
+ /**
+ * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, with the difference that if the path refers to a
+ * symbolic link, then the link is not dereferenced: instead, the timestamps of
+ * the symbolic link itself are changed.
+ * @since v14.5.0, v12.19.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ /**
+ * Changes the ownership of a file.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function chown(path: PathLike, uid: number, gid: number): Promise<void>;
+ /**
+ * Change the file system timestamps of the object referenced by `path`.
+ *
+ * The `atime` and `mtime` arguments follow these rules:
+ *
+ * * Values can be either numbers representing Unix epoch time, `Date`s, or a
+ * numeric string like `'123456789.0'`.
+ * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or`-Infinity`, an `Error` will be thrown.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ /**
+ * Determines the actual location of `path` using the same semantics as the`fs.realpath.native()` function.
+ *
+ * Only paths that can be converted to UTF8 strings are supported.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the path. If the `encoding` is set to `'buffer'`, the path returned will be
+ * passed as a `Buffer` object.
+ *
+ * On Linux, when Node.js is linked against musl libc, the procfs file system must
+ * be mounted on `/proc` in order for this function to work. Glibc does not have
+ * this restriction.
+ * @since v10.0.0
+ * @return Fulfills with the resolved path upon success.
+ */
+ function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpath(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
+ /**
+ * Creates a unique temporary directory. A unique directory name is generated by
+ * appending six random characters to the end of the provided `prefix`. Due to
+ * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some
+ * platforms, notably the BSDs, can return more than six random characters, and
+ * replace trailing `X` characters in `prefix` with random characters.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use.
+ *
+ * ```js
+ * import { mkdtemp } from 'node:fs/promises';
+ * import { join } from 'node:path';
+ * import { tmpdir } from 'node:os';
+ *
+ * try {
+ * await mkdtemp(join(tmpdir(), 'foo-'));
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * ```
+ *
+ * The `fsPromises.mkdtemp()` method will append the six randomly selected
+ * characters directly to the `prefix` string. For instance, given a directory`/tmp`, if the intention is to create a temporary directory _within_`/tmp`, the`prefix` must end with a trailing
+ * platform-specific path separator
+ * (`require('node:path').sep`).
+ * @since v10.0.0
+ * @return Fulfills with a string containing the file system path of the newly created temporary directory.
+ */
+ function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtemp(prefix: string, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
+ * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an
+ * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.
+ *
+ * The `encoding` option is ignored if `data` is a buffer.
+ *
+ * If `options` is a string, then it specifies the encoding.
+ *
+ * The `mode` option only affects the newly created file. See `fs.open()` for more details.
+ *
+ * Any specified `FileHandle` has to support writing.
+ *
+ * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file
+ * without waiting for the promise to be settled.
+ *
+ * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience
+ * method that performs multiple `write` calls internally to write the buffer
+ * passed to it. For performance sensitive code consider using `fs.createWriteStream()` or `filehandle.createWriteStream()`.
+ *
+ * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`.
+ * Cancelation is "best effort", and some amount of data is likely still
+ * to be written.
+ *
+ * ```js
+ * import { writeFile } from 'node:fs/promises';
+ * import { Buffer } from 'node:buffer';
+ *
+ * try {
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const data = new Uint8Array(Buffer.from('Hello Node.js'));
+ * const promise = writeFile('message.txt', data, { signal });
+ *
+ * // Abort the request before the promise settles.
+ * controller.abort();
+ *
+ * await promise;
+ * } catch (err) {
+ * // When a request is aborted - err is an AbortError
+ * console.error(err);
+ * }
+ * ```
+ *
+ * Aborting an ongoing request does not abort individual operating
+ * system requests but rather the internal buffering `fs.writeFile` performs.
+ * @since v10.0.0
+ * @param file filename or `FileHandle`
+ * @return Fulfills with `undefined` upon success.
+ */
+ function writeFile(
+ file: PathLike | FileHandle,
+ data: string | NodeJS.ArrayBufferView | Iterable<string | NodeJS.ArrayBufferView> | AsyncIterable<string | NodeJS.ArrayBufferView> | Stream,
+ options?:
+ | (ObjectEncodingOptions & {
+ mode?: Mode | undefined;
+ flag?: OpenMode | undefined;
+ } & Abortable)
+ | BufferEncoding
+ | null
+ ): Promise<void>;
+ /**
+ * Asynchronously append data to a file, creating the file if it does not yet
+ * exist. `data` can be a string or a `Buffer`.
+ *
+ * If `options` is a string, then it specifies the `encoding`.
+ *
+ * The `mode` option only affects the newly created file. See `fs.open()` for more details.
+ *
+ * The `path` may be specified as a `FileHandle` that has been opened
+ * for appending (using `fsPromises.open()`).
+ * @since v10.0.0
+ * @param path filename or {FileHandle}
+ * @return Fulfills with `undefined` upon success.
+ */
+ function appendFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise<void>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ *
+ * If no encoding is specified (using `options.encoding`), the data is returned
+ * as a `Buffer` object. Otherwise, the data will be a string.
+ *
+ * If `options` is a string, then it specifies the encoding.
+ *
+ * When the `path` is a directory, the behavior of `fsPromises.readFile()` is
+ * platform-specific. On macOS, Linux, and Windows, the promise will be rejected
+ * with an error. On FreeBSD, a representation of the directory's contents will be
+ * returned.
+ *
+ * An example of reading a `package.json` file located in the same directory of the
+ * running code:
+ *
+ * ```js
+ * import { readFile } from 'node:fs/promises';
+ * try {
+ * const filePath = new URL('./package.json', import.meta.url);
+ * const contents = await readFile(filePath, { encoding: 'utf8' });
+ * console.log(contents);
+ * } catch (err) {
+ * console.error(err.message);
+ * }
+ * ```
+ *
+ * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a
+ * request is aborted the promise returned is rejected with an `AbortError`:
+ *
+ * ```js
+ * import { readFile } from 'node:fs/promises';
+ *
+ * try {
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const promise = readFile(fileName, { signal });
+ *
+ * // Abort the request before the promise settles.
+ * controller.abort();
+ *
+ * await promise;
+ * } catch (err) {
+ * // When a request is aborted - err is an AbortError
+ * console.error(err);
+ * }
+ * ```
+ *
+ * Aborting an ongoing request does not abort individual operating
+ * system requests but rather the internal buffering `fs.readFile` performs.
+ *
+ * Any specified `FileHandle` has to support reading.
+ * @since v10.0.0
+ * @param path filename or `FileHandle`
+ * @return Fulfills with the contents of the file.
+ */
+ function readFile(
+ path: PathLike | FileHandle,
+ options?:
+ | ({
+ encoding?: null | undefined;
+ flag?: OpenMode | undefined;
+ } & Abortable)
+ | null
+ ): Promise<Buffer>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFile(
+ path: PathLike | FileHandle,
+ options:
+ | ({
+ encoding: BufferEncoding;
+ flag?: OpenMode | undefined;
+ } & Abortable)
+ | BufferEncoding
+ ): Promise<string>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFile(
+ path: PathLike | FileHandle,
+ options?:
+ | (ObjectEncodingOptions &
+ Abortable & {
+ flag?: OpenMode | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string | Buffer>;
+ /**
+ * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail.
+ *
+ * Creates an `fs.Dir`, which contains all further functions for reading from
+ * and cleaning up the directory.
+ *
+ * The `encoding` option sets the encoding for the `path` while opening the
+ * directory and subsequent read operations.
+ *
+ * Example using async iteration:
+ *
+ * ```js
+ * import { opendir } from 'node:fs/promises';
+ *
+ * try {
+ * const dir = await opendir('./');
+ * for await (const dirent of dir)
+ * console.log(dirent.name);
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * ```
+ *
+ * When using the async iterator, the `fs.Dir` object will be automatically
+ * closed after the iterator exits.
+ * @since v12.12.0
+ * @return Fulfills with an {fs.Dir}.
+ */
+ function opendir(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
+ /**
+ * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory.
+ *
+ * ```js
+ * const { watch } = require('node:fs/promises');
+ *
+ * const ac = new AbortController();
+ * const { signal } = ac;
+ * setTimeout(() => ac.abort(), 10000);
+ *
+ * (async () => {
+ * try {
+ * const watcher = watch(__filename, { signal });
+ * for await (const event of watcher)
+ * console.log(event);
+ * } catch (err) {
+ * if (err.name === 'AbortError')
+ * return;
+ * throw err;
+ * }
+ * })();
+ * ```
+ *
+ * On most platforms, `'rename'` is emitted whenever a filename appears or
+ * disappears in the directory.
+ *
+ * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`.
+ * @since v15.9.0, v14.18.0
+ * @return of objects with the properties:
+ */
+ function watch(
+ filename: PathLike,
+ options:
+ | (WatchOptions & {
+ encoding: 'buffer';
+ })
+ | 'buffer'
+ ): AsyncIterable<FileChangeInfo<Buffer>>;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ function watch(filename: PathLike, options?: WatchOptions | BufferEncoding): AsyncIterable<FileChangeInfo<string>>;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ function watch(filename: PathLike, options: WatchOptions | string): AsyncIterable<FileChangeInfo<string>> | AsyncIterable<FileChangeInfo<Buffer>>;
+ /**
+ * Asynchronously copies the entire directory structure from `src` to `dest`,
+ * including subdirectories and files.
+ *
+ * When copying a directory to another directory, globs are not supported and
+ * behavior is similar to `cp dir1/ dir2/`.
+ * @since v16.7.0
+ * @experimental
+ * @param src source path to copy.
+ * @param dest destination path to copy to.
+ * @return Fulfills with `undefined` upon success.
+ */
+ function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise<void>;
+}
+declare module 'node:fs/promises' {
+ export * from 'fs/promises';
+}
diff --git a/node_modules/@types/node/globals.d.ts b/node_modules/@types/node/globals.d.ts
new file mode 100755
index 0000000..1336d61
--- /dev/null
+++ b/node_modules/@types/node/globals.d.ts
@@ -0,0 +1,325 @@
+// Declare "static" methods in Error
+interface ErrorConstructor {
+ /** Create .stack property on a target object */
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
+
+ /**
+ * Optional override for formatting stack traces
+ *
+ * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
+ */
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
+
+ stackTraceLimit: number;
+}
+
+/*-----------------------------------------------*
+ * *
+ * GLOBAL *
+ * *
+ ------------------------------------------------*/
+
+// For backwards compability
+interface NodeRequire extends NodeJS.Require { }
+interface RequireResolve extends NodeJS.RequireResolve { }
+interface NodeModule extends NodeJS.Module { }
+
+declare var process: NodeJS.Process;
+declare var console: Console;
+
+declare var __filename: string;
+declare var __dirname: string;
+
+declare var require: NodeRequire;
+declare var module: NodeModule;
+
+// Same as module.exports
+declare var exports: any;
+
+/**
+ * Only available if `--expose-gc` is passed to the process.
+ */
+declare var gc: undefined | (() => void);
+
+//#region borrowed
+// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
+/** A controller object that allows you to abort one or more DOM requests as and when desired. */
+interface AbortController {
+ /**
+ * Returns the AbortSignal object associated with this object.
+ */
+
+ readonly signal: AbortSignal;
+ /**
+ * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
+ */
+ abort(reason?: any): void;
+}
+
+/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
+interface AbortSignal extends EventTarget {
+ /**
+ * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
+ */
+ readonly aborted: boolean;
+ readonly reason: any;
+ onabort: null | ((this: AbortSignal, event: Event) => any);
+ throwIfAborted(): void;
+}
+
+declare var AbortController: typeof globalThis extends {onmessage: any; AbortController: infer T}
+ ? T
+ : {
+ prototype: AbortController;
+ new(): AbortController;
+ };
+
+declare var AbortSignal: typeof globalThis extends {onmessage: any; AbortSignal: infer T}
+ ? T
+ : {
+ prototype: AbortSignal;
+ new(): AbortSignal;
+ abort(reason?: any): AbortSignal;
+ timeout(milliseconds: number): AbortSignal;
+ };
+//#endregion borrowed
+
+//#region Disposable
+interface SymbolConstructor {
+ /**
+ * A method that is used to release resources held by an object. Called by the semantics of the `using` statement.
+ */
+ readonly dispose: unique symbol;
+
+ /**
+ * A method that is used to asynchronously release resources held by an object. Called by the semantics of the `await using` statement.
+ */
+ readonly asyncDispose: unique symbol;
+}
+
+interface Disposable {
+ [Symbol.dispose](): void;
+}
+
+interface AsyncDisposable {
+ [Symbol.asyncDispose](): PromiseLike<void>;
+}
+//#endregion Disposable
+
+//#region ArrayLike.at()
+interface RelativeIndexable<T> {
+ /**
+ * Takes an integer value and returns the item at that index,
+ * allowing for positive and negative integers.
+ * Negative integers count back from the last item in the array.
+ */
+ at(index: number): T | undefined;
+}
+interface String extends RelativeIndexable<string> {}
+interface Array<T> extends RelativeIndexable<T> {}
+interface ReadonlyArray<T> extends RelativeIndexable<T> {}
+interface Int8Array extends RelativeIndexable<number> {}
+interface Uint8Array extends RelativeIndexable<number> {}
+interface Uint8ClampedArray extends RelativeIndexable<number> {}
+interface Int16Array extends RelativeIndexable<number> {}
+interface Uint16Array extends RelativeIndexable<number> {}
+interface Int32Array extends RelativeIndexable<number> {}
+interface Uint32Array extends RelativeIndexable<number> {}
+interface Float32Array extends RelativeIndexable<number> {}
+interface Float64Array extends RelativeIndexable<number> {}
+interface BigInt64Array extends RelativeIndexable<bigint> {}
+interface BigUint64Array extends RelativeIndexable<bigint> {}
+//#endregion ArrayLike.at() end
+
+/**
+ * @since v17.0.0
+ *
+ * Creates a deep clone of an object.
+ */
+declare function structuredClone<T>(
+ value: T,
+ transfer?: { transfer: ReadonlyArray<import('worker_threads').TransferListItem> },
+): T;
+
+/*----------------------------------------------*
+* *
+* GLOBAL INTERFACES *
+* *
+*-----------------------------------------------*/
+declare namespace NodeJS {
+ interface CallSite {
+ /**
+ * Value of "this"
+ */
+ getThis(): unknown;
+
+ /**
+ * Type of "this" as a string.
+ * This is the name of the function stored in the constructor field of
+ * "this", if available. Otherwise the object's [[Class]] internal
+ * property.
+ */
+ getTypeName(): string | null;
+
+ /**
+ * Current function
+ */
+ getFunction(): Function | undefined;
+
+ /**
+ * Name of the current function, typically its name property.
+ * If a name property is not available an attempt will be made to try
+ * to infer a name from the function's context.
+ */
+ getFunctionName(): string | null;
+
+ /**
+ * Name of the property [of "this" or one of its prototypes] that holds
+ * the current function
+ */
+ getMethodName(): string | null;
+
+ /**
+ * Name of the script [if this function was defined in a script]
+ */
+ getFileName(): string | undefined;
+
+ /**
+ * Current line number [if this function was defined in a script]
+ */
+ getLineNumber(): number | null;
+
+ /**
+ * Current column number [if this function was defined in a script]
+ */
+ getColumnNumber(): number | null;
+
+ /**
+ * A call site object representing the location where eval was called
+ * [if this function was created using a call to eval]
+ */
+ getEvalOrigin(): string | undefined;
+
+ /**
+ * Is this a toplevel invocation, that is, is "this" the global object?
+ */
+ isToplevel(): boolean;
+
+ /**
+ * Does this call take place in code defined by a call to eval?
+ */
+ isEval(): boolean;
+
+ /**
+ * Is this call in native V8 code?
+ */
+ isNative(): boolean;
+
+ /**
+ * Is this a constructor call?
+ */
+ isConstructor(): boolean;
+ }
+
+ interface ErrnoException extends Error {
+ errno?: number | undefined;
+ code?: string | undefined;
+ path?: string | undefined;
+ syscall?: string | undefined;
+ }
+
+ interface ReadableStream extends EventEmitter {
+ readable: boolean;
+ read(size?: number): string | Buffer;
+ setEncoding(encoding: BufferEncoding): this;
+ pause(): this;
+ resume(): this;
+ isPaused(): boolean;
+ pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined; }): T;
+ unpipe(destination?: WritableStream): this;
+ unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
+ wrap(oldStream: ReadableStream): this;
+ [Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
+ }
+
+ interface WritableStream extends EventEmitter {
+ writable: boolean;
+ write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
+ write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
+ end(cb?: () => void): this;
+ end(data: string | Uint8Array, cb?: () => void): this;
+ end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
+ }
+
+ interface ReadWriteStream extends ReadableStream, WritableStream { }
+
+ interface RefCounted {
+ ref(): this;
+ unref(): this;
+ }
+
+ type TypedArray =
+ | Uint8Array
+ | Uint8ClampedArray
+ | Uint16Array
+ | Uint32Array
+ | Int8Array
+ | Int16Array
+ | Int32Array
+ | BigUint64Array
+ | BigInt64Array
+ | Float32Array
+ | Float64Array;
+ type ArrayBufferView = TypedArray | DataView;
+
+ interface Require {
+ (id: string): any;
+ resolve: RequireResolve;
+ cache: Dict<NodeModule>;
+ /**
+ * @deprecated
+ */
+ extensions: RequireExtensions;
+ main: Module | undefined;
+ }
+
+ interface RequireResolve {
+ (id: string, options?: { paths?: string[] | undefined; }): string;
+ paths(request: string): string[] | null;
+ }
+
+ interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
+ '.js': (m: Module, filename: string) => any;
+ '.json': (m: Module, filename: string) => any;
+ '.node': (m: Module, filename: string) => any;
+ }
+ interface Module {
+ /**
+ * `true` if the module is running during the Node.js preload
+ */
+ isPreloading: boolean;
+ exports: any;
+ require: Require;
+ id: string;
+ filename: string;
+ loaded: boolean;
+ /** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */
+ parent: Module | null | undefined;
+ children: Module[];
+ /**
+ * @since v11.14.0
+ *
+ * The directory name of the module. This is usually the same as the path.dirname() of the module.id.
+ */
+ path: string;
+ paths: string[];
+ }
+
+ interface Dict<T> {
+ [key: string]: T | undefined;
+ }
+
+ interface ReadOnlyDict<T> {
+ readonly [key: string]: T | undefined;
+ }
+}
diff --git a/node_modules/@types/node/globals.global.d.ts b/node_modules/@types/node/globals.global.d.ts
new file mode 100755
index 0000000..ef1198c
--- /dev/null
+++ b/node_modules/@types/node/globals.global.d.ts
@@ -0,0 +1 @@
+declare var global: typeof globalThis;
diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts
new file mode 100755
index 0000000..cb50335
--- /dev/null
+++ b/node_modules/@types/node/http.d.ts
@@ -0,0 +1,1724 @@
+/**
+ * To use the HTTP server and client one must `require('node:http')`.
+ *
+ * The HTTP interfaces in Node.js are designed to support many features
+ * of the protocol which have been traditionally difficult to use.
+ * In particular, large, possibly chunk-encoded, messages. The interface is
+ * careful to never buffer entire requests or responses, so the
+ * user is able to stream data.
+ *
+ * HTTP message headers are represented by an object like this:
+ *
+ * ```js
+ * { 'content-length': '123',
+ * 'content-type': 'text/plain',
+ * 'connection': 'keep-alive',
+ * 'host': 'example.com',
+ * 'accept': '*' }
+ * ```
+ *
+ * Keys are lowercased. Values are not modified.
+ *
+ * In order to support the full spectrum of possible HTTP applications, the Node.js
+ * HTTP API is very low-level. It deals with stream handling and message
+ * parsing only. It parses a message into headers and body but it does not
+ * parse the actual headers or the body.
+ *
+ * See `message.headers` for details on how duplicate headers are handled.
+ *
+ * The raw headers as they were received are retained in the `rawHeaders`property, which is an array of `[key, value, key2, value2, ...]`. For
+ * example, the previous message header object might have a `rawHeaders`list like the following:
+ *
+ * ```js
+ * [ 'ConTent-Length', '123456',
+ * 'content-LENGTH', '123',
+ * 'content-type', 'text/plain',
+ * 'CONNECTION', 'keep-alive',
+ * 'Host', 'example.com',
+ * 'accepT', '*' ]
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/http.js)
+ */
+declare module 'http' {
+ import * as stream from 'node:stream';
+ import { URL } from 'node:url';
+ import { LookupOptions } from 'node:dns';
+ import { EventEmitter } from 'node:events';
+ import { TcpSocketConnectOpts, Socket, Server as NetServer, LookupFunction } from 'node:net';
+ // incoming headers will never contain number
+ interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
+ accept?: string | undefined;
+ 'accept-language'?: string | undefined;
+ 'accept-patch'?: string | undefined;
+ 'accept-ranges'?: string | undefined;
+ 'access-control-allow-credentials'?: string | undefined;
+ 'access-control-allow-headers'?: string | undefined;
+ 'access-control-allow-methods'?: string | undefined;
+ 'access-control-allow-origin'?: string | undefined;
+ 'access-control-expose-headers'?: string | undefined;
+ 'access-control-max-age'?: string | undefined;
+ 'access-control-request-headers'?: string | undefined;
+ 'access-control-request-method'?: string | undefined;
+ age?: string | undefined;
+ allow?: string | undefined;
+ 'alt-svc'?: string | undefined;
+ authorization?: string | undefined;
+ 'cache-control'?: string | undefined;
+ connection?: string | undefined;
+ 'content-disposition'?: string | undefined;
+ 'content-encoding'?: string | undefined;
+ 'content-language'?: string | undefined;
+ 'content-length'?: string | undefined;
+ 'content-location'?: string | undefined;
+ 'content-range'?: string | undefined;
+ 'content-type'?: string | undefined;
+ cookie?: string | undefined;
+ date?: string | undefined;
+ etag?: string | undefined;
+ expect?: string | undefined;
+ expires?: string | undefined;
+ forwarded?: string | undefined;
+ from?: string | undefined;
+ host?: string | undefined;
+ 'if-match'?: string | undefined;
+ 'if-modified-since'?: string | undefined;
+ 'if-none-match'?: string | undefined;
+ 'if-unmodified-since'?: string | undefined;
+ 'last-modified'?: string | undefined;
+ location?: string | undefined;
+ origin?: string | undefined;
+ pragma?: string | undefined;
+ 'proxy-authenticate'?: string | undefined;
+ 'proxy-authorization'?: string | undefined;
+ 'public-key-pins'?: string | undefined;
+ range?: string | undefined;
+ referer?: string | undefined;
+ 'retry-after'?: string | undefined;
+ 'sec-websocket-accept'?: string | undefined;
+ 'sec-websocket-extensions'?: string | undefined;
+ 'sec-websocket-key'?: string | undefined;
+ 'sec-websocket-protocol'?: string | undefined;
+ 'sec-websocket-version'?: string | undefined;
+ 'set-cookie'?: string[] | undefined;
+ 'strict-transport-security'?: string | undefined;
+ tk?: string | undefined;
+ trailer?: string | undefined;
+ 'transfer-encoding'?: string | undefined;
+ upgrade?: string | undefined;
+ 'user-agent'?: string | undefined;
+ vary?: string | undefined;
+ via?: string | undefined;
+ warning?: string | undefined;
+ 'www-authenticate'?: string | undefined;
+ }
+ // outgoing headers allows numbers (as they are converted internally to strings)
+ type OutgoingHttpHeader = number | string | string[];
+ interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {}
+ interface ClientRequestArgs {
+ _defaultAgent?: Agent | undefined;
+ agent?: Agent | boolean | undefined;
+ auth?: string | null | undefined;
+ // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
+ createConnection?:
+ | ((options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket)
+ | undefined;
+ defaultPort?: number | string | undefined;
+ family?: number | undefined;
+ headers?: OutgoingHttpHeaders | undefined;
+ hints?: LookupOptions['hints'];
+ host?: string | null | undefined;
+ hostname?: string | null | undefined;
+ insecureHTTPParser?: boolean | undefined;
+ localAddress?: string | undefined;
+ localPort?: number | undefined;
+ lookup?: LookupFunction | undefined;
+ /**
+ * @default 16384
+ */
+ maxHeaderSize?: number | undefined;
+ method?: string | undefined;
+ path?: string | null | undefined;
+ port?: number | string | null | undefined;
+ protocol?: string | null | undefined;
+ setHost?: boolean | undefined;
+ signal?: AbortSignal | undefined;
+ socketPath?: string | undefined;
+ timeout?: number | undefined;
+ uniqueHeaders?: Array<string | string[]> | undefined;
+ joinDuplicateHeaders?: boolean;
+ }
+ interface ServerOptions<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ > {
+ /**
+ * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`.
+ */
+ IncomingMessage?: Request | undefined;
+ /**
+ * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`.
+ */
+ ServerResponse?: Response | undefined;
+ /**
+ * Sets the timeout value in milliseconds for receiving the entire request from the client.
+ * @see Server.requestTimeout for more information.
+ * @default 300000
+ * @since v18.0.0
+ */
+ requestTimeout?: number | undefined;
+ /**
+ * It joins the field line values of multiple headers in a request with `, ` instead of discarding the duplicates.
+ * @default false
+ * @since v18.14.0
+ */
+ joinDuplicateHeaders?: boolean;
+ /**
+ * The number of milliseconds of inactivity a server needs to wait for additional incoming data,
+ * after it has finished writing the last response, before a socket will be destroyed.
+ * @see Server.keepAliveTimeout for more information.
+ * @default 5000
+ * @since v18.0.0
+ */
+ keepAliveTimeout?: number | undefined;
+ /**
+ * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests.
+ * @default 30000
+ */
+ connectionsCheckingInterval?: number | undefined;
+ /**
+ * Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
+ * This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`.
+ * Default: @see stream.getDefaultHighWaterMark().
+ * @since v20.1.0
+ */
+ highWaterMark?: number | undefined;
+ /**
+ * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`.
+ * Using the insecure parser should be avoided.
+ * See --insecure-http-parser for more information.
+ * @default false
+ */
+ insecureHTTPParser?: boolean | undefined;
+ /**
+ * Optionally overrides the value of
+ * `--max-http-header-size` for requests received by this server, i.e.
+ * the maximum length of request headers in bytes.
+ * @default 16384
+ * @since v13.3.0
+ */
+ maxHeaderSize?: number | undefined;
+ /**
+ * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
+ * @default true
+ * @since v16.5.0
+ */
+ noDelay?: boolean | undefined;
+ /**
+ * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received,
+ * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`.
+ * @default false
+ * @since v16.5.0
+ */
+ keepAlive?: boolean | undefined;
+ /**
+ * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.
+ * @default 0
+ * @since v16.5.0
+ */
+ keepAliveInitialDelay?: number | undefined;
+ /**
+ * A list of response headers that should be sent only once.
+ * If the header's value is an array, the items will be joined using `; `.
+ */
+ uniqueHeaders?: Array<string | string[]> | undefined;
+ }
+ type RequestListener<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ > = (req: InstanceType<Request>, res: InstanceType<Response> & { req: InstanceType<Request> }) => void;
+ /**
+ * @since v0.1.17
+ */
+ class Server<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ > extends NetServer {
+ constructor(requestListener?: RequestListener<Request, Response>);
+ constructor(options: ServerOptions<Request, Response>, requestListener?: RequestListener<Request, Response>);
+ /**
+ * Sets the timeout value for sockets, and emits a `'timeout'` event on
+ * the Server object, passing the socket as an argument, if a timeout
+ * occurs.
+ *
+ * If there is a `'timeout'` event listener on the Server object, then it
+ * will be called with the timed-out socket as an argument.
+ *
+ * By default, the Server does not timeout sockets. However, if a callback
+ * is assigned to the Server's `'timeout'` event, timeouts must be handled
+ * explicitly.
+ * @since v0.9.12
+ * @param [msecs=0 (no timeout)]
+ */
+ setTimeout(msecs?: number, callback?: () => void): this;
+ setTimeout(callback: () => void): this;
+ /**
+ * Limits maximum incoming headers count. If set to 0, no limit will be applied.
+ * @since v0.7.0
+ */
+ maxHeadersCount: number | null;
+ /**
+ * The maximum number of requests socket can handle
+ * before closing keep alive connection.
+ *
+ * A value of `0` will disable the limit.
+ *
+ * When the limit is reached it will set the `Connection` header value to `close`,
+ * but will not actually close the connection, subsequent requests sent
+ * after the limit is reached will get `503 Service Unavailable` as a response.
+ * @since v16.10.0
+ */
+ maxRequestsPerSocket: number | null;
+ /**
+ * The number of milliseconds of inactivity before a socket is presumed
+ * to have timed out.
+ *
+ * A value of `0` will disable the timeout behavior on incoming connections.
+ *
+ * The socket timeout logic is set up on connection, so changing this
+ * value only affects new connections to the server, not any existing connections.
+ * @since v0.9.12
+ */
+ timeout: number;
+ /**
+ * Limit the amount of time the parser will wait to receive the complete HTTP
+ * headers.
+ *
+ * If the timeout expires, the server responds with status 408 without
+ * forwarding the request to the request listener and then closes the connection.
+ *
+ * It must be set to a non-zero value (e.g. 120 seconds) to protect against
+ * potential Denial-of-Service attacks in case the server is deployed without a
+ * reverse proxy in front.
+ * @since v11.3.0, v10.14.0
+ */
+ headersTimeout: number;
+ /**
+ * The number of milliseconds of inactivity a server needs to wait for additional
+ * incoming data, after it has finished writing the last response, before a socket
+ * will be destroyed. If the server receives new data before the keep-alive
+ * timeout has fired, it will reset the regular inactivity timeout, i.e.,`server.timeout`.
+ *
+ * A value of `0` will disable the keep-alive timeout behavior on incoming
+ * connections.
+ * A value of `0` makes the http server behave similarly to Node.js versions prior
+ * to 8.0.0, which did not have a keep-alive timeout.
+ *
+ * The socket timeout logic is set up on connection, so changing this value only
+ * affects new connections to the server, not any existing connections.
+ * @since v8.0.0
+ */
+ keepAliveTimeout: number;
+ /**
+ * Sets the timeout value in milliseconds for receiving the entire request from
+ * the client.
+ *
+ * If the timeout expires, the server responds with status 408 without
+ * forwarding the request to the request listener and then closes the connection.
+ *
+ * It must be set to a non-zero value (e.g. 120 seconds) to protect against
+ * potential Denial-of-Service attacks in case the server is deployed without a
+ * reverse proxy in front.
+ * @since v14.11.0
+ */
+ requestTimeout: number;
+ /**
+ * Closes all connections connected to this server.
+ * @since v18.2.0
+ */
+ closeAllConnections(): void;
+ /**
+ * Closes all connections connected to this server which are not sending a request
+ * or waiting for a response.
+ * @since v18.2.0
+ */
+ closeIdleConnections(): void;
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'connection', listener: (socket: Socket) => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'listening', listener: () => void): this;
+ addListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ addListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ addListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ addListener(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ addListener(event: 'dropRequest', listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
+ addListener(event: 'request', listener: RequestListener<Request, Response>): this;
+ addListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ emit(event: string, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'connection', socket: Socket): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'listening'): boolean;
+ emit(
+ event: 'checkContinue',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(
+ event: 'checkExpectation',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(event: 'clientError', err: Error, socket: stream.Duplex): boolean;
+ emit(event: 'connect', req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
+ emit(event: 'dropRequest', req: InstanceType<Request>, socket: stream.Duplex): boolean;
+ emit(
+ event: 'request',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(event: 'upgrade', req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'connection', listener: (socket: Socket) => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'listening', listener: () => void): this;
+ on(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ on(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ on(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ on(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ on(event: 'dropRequest', listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
+ on(event: 'request', listener: RequestListener<Request, Response>): this;
+ on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'connection', listener: (socket: Socket) => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'listening', listener: () => void): this;
+ once(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ once(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ once(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ once(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ once(event: 'dropRequest', listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
+ once(event: 'request', listener: RequestListener<Request, Response>): this;
+ once(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'connection', listener: (socket: Socket) => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'listening', listener: () => void): this;
+ prependListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ prependListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ prependListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ prependListener(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ prependListener(event: 'dropRequest', listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
+ prependListener(event: 'request', listener: RequestListener<Request, Response>): this;
+ prependListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'listening', listener: () => void): this;
+ prependOnceListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ prependOnceListener(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ prependOnceListener(event: 'dropRequest', listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
+ prependOnceListener(event: 'request', listener: RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ }
+ /**
+ * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract outgoing message from
+ * the perspective of the participants of an HTTP transaction.
+ * @since v0.1.17
+ */
+ class OutgoingMessage<Request extends IncomingMessage = IncomingMessage> extends stream.Writable {
+ readonly req: Request;
+ chunkedEncoding: boolean;
+ shouldKeepAlive: boolean;
+ useChunkedEncodingByDefault: boolean;
+ sendDate: boolean;
+ /**
+ * @deprecated Use `writableEnded` instead.
+ */
+ finished: boolean;
+ /**
+ * Read-only. `true` if the headers were sent, otherwise `false`.
+ * @since v0.9.3
+ */
+ readonly headersSent: boolean;
+ /**
+ * Alias of `outgoingMessage.socket`.
+ * @since v0.3.0
+ * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead.
+ */
+ readonly connection: Socket | null;
+ /**
+ * Reference to the underlying socket. Usually, users will not want to access
+ * this property.
+ *
+ * After calling `outgoingMessage.end()`, this property will be nulled.
+ * @since v0.3.0
+ */
+ readonly socket: Socket | null;
+ constructor();
+ /**
+ * Once a socket is associated with the message and is connected,`socket.setTimeout()` will be called with `msecs` as the first parameter.
+ * @since v0.9.12
+ * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event.
+ */
+ setTimeout(msecs: number, callback?: () => void): this;
+ /**
+ * Sets a single header value. If the header already exists in the to-be-sent
+ * headers, its value will be replaced. Use an array of strings to send multiple
+ * headers with the same name.
+ * @since v0.4.0
+ * @param name Header name
+ * @param value Header value
+ */
+ setHeader(name: string, value: number | string | ReadonlyArray<string>): this;
+ /**
+ * Append a single header value for the header object.
+ *
+ * If the value is an array, this is equivalent of calling this method multiple
+ * times.
+ *
+ * If there were no previous value for the header, this is equivalent of calling `outgoingMessage.setHeader(name, value)`.
+ *
+ * Depending of the value of `options.uniqueHeaders` when the client request or the
+ * server were created, this will end up in the header being sent multiple times or
+ * a single time with values joined using `; `.
+ * @since v18.3.0, v16.17.0
+ * @param name Header name
+ * @param value Header value
+ */
+ appendHeader(name: string, value: string | ReadonlyArray<string>): this;
+ /**
+ * Gets the value of the HTTP header with the given name. If that header is not
+ * set, the returned value will be `undefined`.
+ * @since v0.4.0
+ * @param name Name of header
+ */
+ getHeader(name: string): number | string | string[] | undefined;
+ /**
+ * Returns a shallow copy of the current outgoing headers. Since a shallow
+ * copy is used, array values may be mutated without additional calls to
+ * various header-related HTTP module methods. The keys of the returned
+ * object are the header names and the values are the respective header
+ * values. All header names are lowercase.
+ *
+ * The object returned by the `outgoingMessage.getHeaders()` method does
+ * not prototypically inherit from the JavaScript `Object`. This means that
+ * typical `Object` methods such as `obj.toString()`, `obj.hasOwnProperty()`,
+ * and others are not defined and will not work.
+ *
+ * ```js
+ * outgoingMessage.setHeader('Foo', 'bar');
+ * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+ *
+ * const headers = outgoingMessage.getHeaders();
+ * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] }
+ * ```
+ * @since v7.7.0
+ */
+ getHeaders(): OutgoingHttpHeaders;
+ /**
+ * Returns an array containing the unique names of the current outgoing headers.
+ * All names are lowercase.
+ * @since v7.7.0
+ */
+ getHeaderNames(): string[];
+ /**
+ * Returns `true` if the header identified by `name` is currently set in the
+ * outgoing headers. The header name is case-insensitive.
+ *
+ * ```js
+ * const hasContentType = outgoingMessage.hasHeader('content-type');
+ * ```
+ * @since v7.7.0
+ */
+ hasHeader(name: string): boolean;
+ /**
+ * Removes a header that is queued for implicit sending.
+ *
+ * ```js
+ * outgoingMessage.removeHeader('Content-Encoding');
+ * ```
+ * @since v0.4.0
+ * @param name Header name
+ */
+ removeHeader(name: string): void;
+ /**
+ * Adds HTTP trailers (headers but at the end of the message) to the message.
+ *
+ * Trailers will **only** be emitted if the message is chunked encoded. If not,
+ * the trailers will be silently discarded.
+ *
+ * HTTP requires the `Trailer` header to be sent to emit trailers,
+ * with a list of header field names in its value, e.g.
+ *
+ * ```js
+ * message.writeHead(200, { 'Content-Type': 'text/plain',
+ * 'Trailer': 'Content-MD5' });
+ * message.write(fileData);
+ * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' });
+ * message.end();
+ * ```
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ * @since v0.3.0
+ */
+ addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
+ /**
+ * Flushes the message headers.
+ *
+ * For efficiency reason, Node.js normally buffers the message headers
+ * until `outgoingMessage.end()` is called or the first chunk of message data
+ * is written. It then tries to pack the headers and data into a single TCP
+ * packet.
+ *
+ * It is usually desired (it saves a TCP round-trip), but not when the first
+ * data is not sent until possibly much later. `outgoingMessage.flushHeaders()`bypasses the optimization and kickstarts the message.
+ * @since v1.6.0
+ */
+ flushHeaders(): void;
+ }
+ /**
+ * This object is created internally by an HTTP server, not by the user. It is
+ * passed as the second parameter to the `'request'` event.
+ * @since v0.1.17
+ */
+ class ServerResponse<Request extends IncomingMessage = IncomingMessage> extends OutgoingMessage<Request> {
+ /**
+ * When using implicit headers (not calling `response.writeHead()` explicitly),
+ * this property controls the status code that will be sent to the client when
+ * the headers get flushed.
+ *
+ * ```js
+ * response.statusCode = 404;
+ * ```
+ *
+ * After response header was sent to the client, this property indicates the
+ * status code which was sent out.
+ * @since v0.4.0
+ */
+ statusCode: number;
+ /**
+ * When using implicit headers (not calling `response.writeHead()` explicitly),
+ * this property controls the status message that will be sent to the client when
+ * the headers get flushed. If this is left as `undefined` then the standard
+ * message for the status code will be used.
+ *
+ * ```js
+ * response.statusMessage = 'Not found';
+ * ```
+ *
+ * After response header was sent to the client, this property indicates the
+ * status message which was sent out.
+ * @since v0.11.8
+ */
+ statusMessage: string;
+ /**
+ * If set to `true`, Node.js will check whether the `Content-Length`header value and the size of the body, in bytes, are equal.
+ * Mismatching the `Content-Length` header value will result
+ * in an `Error` being thrown, identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`.
+ * @since v18.10.0, v16.18.0
+ */
+ strictContentLength: boolean;
+ constructor(req: Request);
+ assignSocket(socket: Socket): void;
+ detachSocket(socket: Socket): void;
+ /**
+ * Sends an HTTP/1.1 100 Continue message to the client, indicating that
+ * the request body should be sent. See the `'checkContinue'` event on`Server`.
+ * @since v0.3.0
+ */
+ writeContinue(callback?: () => void): void;
+ /**
+ * Sends an HTTP/1.1 103 Early Hints message to the client with a Link header,
+ * indicating that the user agent can preload/preconnect the linked resources.
+ * The `hints` is an object containing the values of headers to be sent with
+ * early hints message. The optional `callback` argument will be called when
+ * the response message has been written.
+ *
+ * **Example**
+ *
+ * ```js
+ * const earlyHintsLink = '</styles.css>; rel=preload; as=style';
+ * response.writeEarlyHints({
+ * 'link': earlyHintsLink,
+ * });
+ *
+ * const earlyHintsLinks = [
+ * '</styles.css>; rel=preload; as=style',
+ * '</scripts.js>; rel=preload; as=script',
+ * ];
+ * response.writeEarlyHints({
+ * 'link': earlyHintsLinks,
+ * 'x-trace-id': 'id for diagnostics',
+ * });
+ *
+ * const earlyHintsCallback = () => console.log('early hints message sent');
+ * response.writeEarlyHints({
+ * 'link': earlyHintsLinks,
+ * }, earlyHintsCallback);
+ * ```
+ * @since v18.11.0
+ * @param hints An object containing the values of headers
+ * @param callback Will be called when the response message has been written
+ */
+ writeEarlyHints(hints: Record<string, string | string[]>, callback?: () => void): void;
+ /**
+ * Sends a response header to the request. The status code is a 3-digit HTTP
+ * status code, like `404`. The last argument, `headers`, are the response headers.
+ * Optionally one can give a human-readable `statusMessage` as the second
+ * argument.
+ *
+ * `headers` may be an `Array` where the keys and values are in the same list.
+ * It is _not_ a list of tuples. So, the even-numbered offsets are key values,
+ * and the odd-numbered offsets are the associated values. The array is in the same
+ * format as `request.rawHeaders`.
+ *
+ * Returns a reference to the `ServerResponse`, so that calls can be chained.
+ *
+ * ```js
+ * const body = 'hello world';
+ * response
+ * .writeHead(200, {
+ * 'Content-Length': Buffer.byteLength(body),
+ * 'Content-Type': 'text/plain',
+ * })
+ * .end(body);
+ * ```
+ *
+ * This method must only be called once on a message and it must
+ * be called before `response.end()` is called.
+ *
+ * If `response.write()` or `response.end()` are called before calling
+ * this, the implicit/mutable headers will be calculated and call this function.
+ *
+ * When headers have been set with `response.setHeader()`, they will be merged
+ * with any headers passed to `response.writeHead()`, with the headers passed
+ * to `response.writeHead()` given precedence.
+ *
+ * If this method is called and `response.setHeader()` has not been called,
+ * it will directly write the supplied header values onto the network channel
+ * without caching internally, and the `response.getHeader()` on the header
+ * will not yield the expected result. If progressive population of headers is
+ * desired with potential future retrieval and modification, use `response.setHeader()` instead.
+ *
+ * ```js
+ * // Returns content-type = text/plain
+ * const server = http.createServer((req, res) => {
+ * res.setHeader('Content-Type', 'text/html');
+ * res.setHeader('X-Foo', 'bar');
+ * res.writeHead(200, { 'Content-Type': 'text/plain' });
+ * res.end('ok');
+ * });
+ * ```
+ *
+ * `Content-Length` is read in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js
+ * will check whether `Content-Length` and the length of the body which has
+ * been transmitted are equal or not.
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a \[`Error`\]\[\] being thrown.
+ * @since v0.1.30
+ */
+ writeHead(
+ statusCode: number,
+ statusMessage?: string,
+ headers?: OutgoingHttpHeaders | OutgoingHttpHeader[],
+ ): this;
+ writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
+ /**
+ * Sends a HTTP/1.1 102 Processing message to the client, indicating that
+ * the request body should be sent.
+ * @since v10.0.0
+ */
+ writeProcessing(): void;
+ }
+ interface InformationEvent {
+ statusCode: number;
+ statusMessage: string;
+ httpVersion: string;
+ httpVersionMajor: number;
+ httpVersionMinor: number;
+ headers: IncomingHttpHeaders;
+ rawHeaders: string[];
+ }
+ /**
+ * This object is created internally and returned from {@link request}. It
+ * represents an _in-progress_ request whose header has already been queued. The
+ * header is still mutable using the `setHeader(name, value)`,`getHeader(name)`, `removeHeader(name)` API. The actual header will
+ * be sent along with the first data chunk or when calling `request.end()`.
+ *
+ * To get the response, add a listener for `'response'` to the request object.`'response'` will be emitted from the request object when the response
+ * headers have been received. The `'response'` event is executed with one
+ * argument which is an instance of {@link IncomingMessage}.
+ *
+ * During the `'response'` event, one can add listeners to the
+ * response object; particularly to listen for the `'data'` event.
+ *
+ * If no `'response'` handler is added, then the response will be
+ * entirely discarded. However, if a `'response'` event handler is added,
+ * then the data from the response object **must** be consumed, either by
+ * calling `response.read()` whenever there is a `'readable'` event, or
+ * by adding a `'data'` handler, or by calling the `.resume()` method.
+ * Until the data is consumed, the `'end'` event will not fire. Also, until
+ * the data is read it will consume memory that can eventually lead to a
+ * 'process out of memory' error.
+ *
+ * For backward compatibility, `res` will only emit `'error'` if there is an`'error'` listener registered.
+ *
+ * Set `Content-Length` header to limit the response body size.
+ * If `response.strictContentLength` is set to `true`, mismatching the`Content-Length` header value will result in an `Error` being thrown,
+ * identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`.
+ *
+ * `Content-Length` value should be in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes.
+ * @since v0.1.17
+ */
+ class ClientRequest extends OutgoingMessage {
+ /**
+ * The `request.aborted` property will be `true` if the request has
+ * been aborted.
+ * @since v0.11.14
+ * @deprecated Since v17.0.0,v16.12.0 - Check `destroyed` instead.
+ */
+ aborted: boolean;
+ /**
+ * The request host.
+ * @since v14.5.0, v12.19.0
+ */
+ host: string;
+ /**
+ * The request protocol.
+ * @since v14.5.0, v12.19.0
+ */
+ protocol: string;
+ /**
+ * When sending request through a keep-alive enabled agent, the underlying socket
+ * might be reused. But if server closes connection at unfortunate time, client
+ * may run into a 'ECONNRESET' error.
+ *
+ * ```js
+ * const http = require('node:http');
+ *
+ * // Server has a 5 seconds keep-alive timeout by default
+ * http
+ * .createServer((req, res) => {
+ * res.write('hello\n');
+ * res.end();
+ * })
+ * .listen(3000);
+ *
+ * setInterval(() => {
+ * // Adapting a keep-alive agent
+ * http.get('http://localhost:3000', { agent }, (res) => {
+ * res.on('data', (data) => {
+ * // Do nothing
+ * });
+ * });
+ * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout
+ * ```
+ *
+ * By marking a request whether it reused socket or not, we can do
+ * automatic error retry base on it.
+ *
+ * ```js
+ * const http = require('node:http');
+ * const agent = new http.Agent({ keepAlive: true });
+ *
+ * function retriableRequest() {
+ * const req = http
+ * .get('http://localhost:3000', { agent }, (res) => {
+ * // ...
+ * })
+ * .on('error', (err) => {
+ * // Check if retry is needed
+ * if (req.reusedSocket &#x26;&#x26; err.code === 'ECONNRESET') {
+ * retriableRequest();
+ * }
+ * });
+ * }
+ *
+ * retriableRequest();
+ * ```
+ * @since v13.0.0, v12.16.0
+ */
+ reusedSocket: boolean;
+ /**
+ * Limits maximum response headers count. If set to 0, no limit will be applied.
+ */
+ maxHeadersCount: number;
+ constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
+ /**
+ * The request method.
+ * @since v0.1.97
+ */
+ method: string;
+ /**
+ * The request path.
+ * @since v0.4.0
+ */
+ path: string;
+ /**
+ * Marks the request as aborting. Calling this will cause remaining data
+ * in the response to be dropped and the socket to be destroyed.
+ * @since v0.3.8
+ * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead.
+ */
+ abort(): void;
+ onSocket(socket: Socket): void;
+ /**
+ * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called.
+ * @since v0.5.9
+ * @param timeout Milliseconds before a request times out.
+ * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event.
+ */
+ setTimeout(timeout: number, callback?: () => void): this;
+ /**
+ * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called.
+ * @since v0.5.9
+ */
+ setNoDelay(noDelay?: boolean): void;
+ /**
+ * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called.
+ * @since v0.5.9
+ */
+ setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
+ /**
+ * Returns an array containing the unique names of the current outgoing raw
+ * headers. Header names are returned with their exact casing being set.
+ *
+ * ```js
+ * request.setHeader('Foo', 'bar');
+ * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+ *
+ * const headerNames = request.getRawHeaderNames();
+ * // headerNames === ['Foo', 'Set-Cookie']
+ * ```
+ * @since v15.13.0, v14.17.0
+ */
+ getRawHeaderNames(): string[];
+ /**
+ * @deprecated
+ */
+ addListener(event: 'abort', listener: () => void): this;
+ addListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ addListener(event: 'continue', listener: () => void): this;
+ addListener(event: 'information', listener: (info: InformationEvent) => void): this;
+ addListener(event: 'response', listener: (response: IncomingMessage) => void): this;
+ addListener(event: 'socket', listener: (socket: Socket) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
+ on(event: 'abort', listener: () => void): this;
+ on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ on(event: 'continue', listener: () => void): this;
+ on(event: 'information', listener: (info: InformationEvent) => void): this;
+ on(event: 'response', listener: (response: IncomingMessage) => void): this;
+ on(event: 'socket', listener: (socket: Socket) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
+ once(event: 'abort', listener: () => void): this;
+ once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ once(event: 'continue', listener: () => void): this;
+ once(event: 'information', listener: (info: InformationEvent) => void): this;
+ once(event: 'response', listener: (response: IncomingMessage) => void): this;
+ once(event: 'socket', listener: (socket: Socket) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
+ prependListener(event: 'abort', listener: () => void): this;
+ prependListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ prependListener(event: 'continue', listener: () => void): this;
+ prependListener(event: 'information', listener: (info: InformationEvent) => void): this;
+ prependListener(event: 'response', listener: (response: IncomingMessage) => void): this;
+ prependListener(event: 'socket', listener: (socket: Socket) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
+ prependOnceListener(event: 'abort', listener: () => void): this;
+ prependOnceListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ prependOnceListener(event: 'continue', listener: () => void): this;
+ prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this;
+ prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this;
+ prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to
+ * access response
+ * status, headers, and data.
+ *
+ * Different from its `socket` value which is a subclass of `stream.Duplex`, the`IncomingMessage` itself extends `stream.Readable` and is created separately to
+ * parse and emit the incoming HTTP headers and payload, as the underlying socket
+ * may be reused multiple times in case of keep-alive.
+ * @since v0.1.17
+ */
+ class IncomingMessage extends stream.Readable {
+ constructor(socket: Socket);
+ /**
+ * The `message.aborted` property will be `true` if the request has
+ * been aborted.
+ * @since v10.1.0
+ * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from <a href="stream.html#class-streamreadable" class="type">stream.Readable</a>.
+ */
+ aborted: boolean;
+ /**
+ * In case of server request, the HTTP version sent by the client. In the case of
+ * client response, the HTTP version of the connected-to server.
+ * Probably either `'1.1'` or `'1.0'`.
+ *
+ * Also `message.httpVersionMajor` is the first integer and`message.httpVersionMinor` is the second.
+ * @since v0.1.1
+ */
+ httpVersion: string;
+ httpVersionMajor: number;
+ httpVersionMinor: number;
+ /**
+ * The `message.complete` property will be `true` if a complete HTTP message has
+ * been received and successfully parsed.
+ *
+ * This property is particularly useful as a means of determining if a client or
+ * server fully transmitted a message before a connection was terminated:
+ *
+ * ```js
+ * const req = http.request({
+ * host: '127.0.0.1',
+ * port: 8080,
+ * method: 'POST',
+ * }, (res) => {
+ * res.resume();
+ * res.on('end', () => {
+ * if (!res.complete)
+ * console.error(
+ * 'The connection was terminated while the message was still being sent');
+ * });
+ * });
+ * ```
+ * @since v0.3.0
+ */
+ complete: boolean;
+ /**
+ * Alias for `message.socket`.
+ * @since v0.1.90
+ * @deprecated Since v16.0.0 - Use `socket`.
+ */
+ connection: Socket;
+ /**
+ * The `net.Socket` object associated with the connection.
+ *
+ * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the
+ * client's authentication details.
+ *
+ * This property is guaranteed to be an instance of the `net.Socket` class,
+ * a subclass of `stream.Duplex`, unless the user specified a socket
+ * type other than `net.Socket` or internally nulled.
+ * @since v0.3.0
+ */
+ socket: Socket;
+ /**
+ * The request/response headers object.
+ *
+ * Key-value pairs of header names and values. Header names are lower-cased.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // { 'user-agent': 'curl/7.22.0',
+ * // host: '127.0.0.1:8000',
+ * // accept: '*' }
+ * console.log(request.headers);
+ * ```
+ *
+ * Duplicates in raw headers are handled in the following ways, depending on the
+ * header name:
+ *
+ * * Duplicates of `age`, `authorization`, `content-length`, `content-type`,`etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`,`last-modified`, `location`,
+ * `max-forwards`, `proxy-authorization`, `referer`,`retry-after`, `server`, or `user-agent` are discarded.
+ * To allow duplicate values of the headers listed above to be joined,
+ * use the option `joinDuplicateHeaders` in {@link request} and {@link createServer}. See RFC 9110 Section 5.3 for more
+ * information.
+ * * `set-cookie` is always an array. Duplicates are added to the array.
+ * * For duplicate `cookie` headers, the values are joined together with `; `.
+ * * For all other headers, the values are joined together with `, `.
+ * @since v0.1.5
+ */
+ headers: IncomingHttpHeaders;
+ /**
+ * Similar to `message.headers`, but there is no join logic and the values are
+ * always arrays of strings, even for headers received just once.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // { 'user-agent': ['curl/7.22.0'],
+ * // host: ['127.0.0.1:8000'],
+ * // accept: ['*'] }
+ * console.log(request.headersDistinct);
+ * ```
+ * @since v18.3.0, v16.17.0
+ */
+ headersDistinct: NodeJS.Dict<string[]>;
+ /**
+ * The raw request/response headers list exactly as they were received.
+ *
+ * The keys and values are in the same list. It is _not_ a
+ * list of tuples. So, the even-numbered offsets are key values, and the
+ * odd-numbered offsets are the associated values.
+ *
+ * Header names are not lowercased, and duplicates are not merged.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // [ 'user-agent',
+ * // 'this is invalid because there can be only one',
+ * // 'User-Agent',
+ * // 'curl/7.22.0',
+ * // 'Host',
+ * // '127.0.0.1:8000',
+ * // 'ACCEPT',
+ * // '*' ]
+ * console.log(request.rawHeaders);
+ * ```
+ * @since v0.11.6
+ */
+ rawHeaders: string[];
+ /**
+ * The request/response trailers object. Only populated at the `'end'` event.
+ * @since v0.3.0
+ */
+ trailers: NodeJS.Dict<string>;
+ /**
+ * Similar to `message.trailers`, but there is no join logic and the values are
+ * always arrays of strings, even for headers received just once.
+ * Only populated at the `'end'` event.
+ * @since v18.3.0, v16.17.0
+ */
+ trailersDistinct: NodeJS.Dict<string[]>;
+ /**
+ * The raw request/response trailer keys and values exactly as they were
+ * received. Only populated at the `'end'` event.
+ * @since v0.11.6
+ */
+ rawTrailers: string[];
+ /**
+ * Calls `message.socket.setTimeout(msecs, callback)`.
+ * @since v0.5.9
+ */
+ setTimeout(msecs: number, callback?: () => void): this;
+ /**
+ * **Only valid for request obtained from {@link Server}.**
+ *
+ * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`.
+ * @since v0.1.1
+ */
+ method?: string | undefined;
+ /**
+ * **Only valid for request obtained from {@link Server}.**
+ *
+ * Request URL string. This contains only the URL that is present in the actual
+ * HTTP request. Take the following request:
+ *
+ * ```http
+ * GET /status?name=ryan HTTP/1.1
+ * Accept: text/plain
+ * ```
+ *
+ * To parse the URL into its parts:
+ *
+ * ```js
+ * new URL(request.url, `http://${request.headers.host}`);
+ * ```
+ *
+ * When `request.url` is `'/status?name=ryan'` and `request.headers.host` is`'localhost:3000'`:
+ *
+ * ```console
+ * $ node
+ * > new URL(request.url, `http://${request.headers.host}`)
+ * URL {
+ * href: 'http://localhost:3000/status?name=ryan',
+ * origin: 'http://localhost:3000',
+ * protocol: 'http:',
+ * username: '',
+ * password: '',
+ * host: 'localhost:3000',
+ * hostname: 'localhost',
+ * port: '3000',
+ * pathname: '/status',
+ * search: '?name=ryan',
+ * searchParams: URLSearchParams { 'name' => 'ryan' },
+ * hash: ''
+ * }
+ * ```
+ * @since v0.1.90
+ */
+ url?: string | undefined;
+ /**
+ * **Only valid for response obtained from {@link ClientRequest}.**
+ *
+ * The 3-digit HTTP response status code. E.G. `404`.
+ * @since v0.1.1
+ */
+ statusCode?: number | undefined;
+ /**
+ * **Only valid for response obtained from {@link ClientRequest}.**
+ *
+ * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`.
+ * @since v0.11.10
+ */
+ statusMessage?: string | undefined;
+ /**
+ * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error`is provided, an `'error'` event is emitted on the socket and `error` is passed
+ * as an argument to any listeners on the event.
+ * @since v0.3.0
+ */
+ destroy(error?: Error): this;
+ }
+ interface AgentOptions extends Partial<TcpSocketConnectOpts> {
+ /**
+ * Keep sockets around in a pool to be used by other requests in the future. Default = false
+ */
+ keepAlive?: boolean | undefined;
+ /**
+ * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000.
+ * Only relevant if keepAlive is set to true.
+ */
+ keepAliveMsecs?: number | undefined;
+ /**
+ * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
+ */
+ maxSockets?: number | undefined;
+ /**
+ * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity.
+ */
+ maxTotalSockets?: number | undefined;
+ /**
+ * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
+ */
+ maxFreeSockets?: number | undefined;
+ /**
+ * Socket timeout in milliseconds. This will set the timeout after the socket is connected.
+ */
+ timeout?: number | undefined;
+ /**
+ * Scheduling strategy to apply when picking the next free socket to use.
+ * @default `lifo`
+ */
+ scheduling?: 'fifo' | 'lifo' | undefined;
+ }
+ /**
+ * An `Agent` is responsible for managing connection persistence
+ * and reuse for HTTP clients. It maintains a queue of pending requests
+ * for a given host and port, reusing a single socket connection for each
+ * until the queue is empty, at which time the socket is either destroyed
+ * or put into a pool where it is kept to be used again for requests to the
+ * same host and port. Whether it is destroyed or pooled depends on the`keepAlive` `option`.
+ *
+ * Pooled connections have TCP Keep-Alive enabled for them, but servers may
+ * still close idle connections, in which case they will be removed from the
+ * pool and a new connection will be made when a new HTTP request is made for
+ * that host and port. Servers may also refuse to allow multiple requests
+ * over the same connection, in which case the connection will have to be
+ * remade for every request and cannot be pooled. The `Agent` will still make
+ * the requests to that server, but each one will occur over a new connection.
+ *
+ * When a connection is closed by the client or the server, it is removed
+ * from the pool. Any unused sockets in the pool will be unrefed so as not
+ * to keep the Node.js process running when there are no outstanding requests.
+ * (see `socket.unref()`).
+ *
+ * It is good practice, to `destroy()` an `Agent` instance when it is no
+ * longer in use, because unused sockets consume OS resources.
+ *
+ * Sockets are removed from an agent when the socket emits either
+ * a `'close'` event or an `'agentRemove'` event. When intending to keep one
+ * HTTP request open for a long time without keeping it in the agent, something
+ * like the following may be done:
+ *
+ * ```js
+ * http.get(options, (res) => {
+ * // Do stuff
+ * }).on('socket', (socket) => {
+ * socket.emit('agentRemove');
+ * });
+ * ```
+ *
+ * An agent may also be used for an individual request. By providing`{agent: false}` as an option to the `http.get()` or `http.request()`functions, a one-time use `Agent` with default options
+ * will be used
+ * for the client connection.
+ *
+ * `agent:false`:
+ *
+ * ```js
+ * http.get({
+ * hostname: 'localhost',
+ * port: 80,
+ * path: '/',
+ * agent: false, // Create a new agent just for this one request
+ * }, (res) => {
+ * // Do stuff with response
+ * });
+ * ```
+ * @since v0.3.4
+ */
+ class Agent extends EventEmitter {
+ /**
+ * By default set to 256. For agents with `keepAlive` enabled, this
+ * sets the maximum number of sockets that will be left open in the free
+ * state.
+ * @since v0.11.7
+ */
+ maxFreeSockets: number;
+ /**
+ * By default set to `Infinity`. Determines how many concurrent sockets the agent
+ * can have open per origin. Origin is the returned value of `agent.getName()`.
+ * @since v0.3.6
+ */
+ maxSockets: number;
+ /**
+ * By default set to `Infinity`. Determines how many concurrent sockets the agent
+ * can have open. Unlike `maxSockets`, this parameter applies across all origins.
+ * @since v14.5.0, v12.19.0
+ */
+ maxTotalSockets: number;
+ /**
+ * An object which contains arrays of sockets currently awaiting use by
+ * the agent when `keepAlive` is enabled. Do not modify.
+ *
+ * Sockets in the `freeSockets` list will be automatically destroyed and
+ * removed from the array on `'timeout'`.
+ * @since v0.11.4
+ */
+ readonly freeSockets: NodeJS.ReadOnlyDict<Socket[]>;
+ /**
+ * An object which contains arrays of sockets currently in use by the
+ * agent. Do not modify.
+ * @since v0.3.6
+ */
+ readonly sockets: NodeJS.ReadOnlyDict<Socket[]>;
+ /**
+ * An object which contains queues of requests that have not yet been assigned to
+ * sockets. Do not modify.
+ * @since v0.5.9
+ */
+ readonly requests: NodeJS.ReadOnlyDict<IncomingMessage[]>;
+ constructor(opts?: AgentOptions);
+ /**
+ * Destroy any sockets that are currently in use by the agent.
+ *
+ * It is usually not necessary to do this. However, if using an
+ * agent with `keepAlive` enabled, then it is best to explicitly shut down
+ * the agent when it is no longer needed. Otherwise,
+ * sockets might stay open for quite a long time before the server
+ * terminates them.
+ * @since v0.11.4
+ */
+ destroy(): void;
+ }
+ const METHODS: string[];
+ const STATUS_CODES: {
+ [errorCode: number]: string | undefined;
+ [errorCode: string]: string | undefined;
+ };
+ /**
+ * Returns a new instance of {@link Server}.
+ *
+ * The `requestListener` is a function which is automatically
+ * added to the `'request'` event.
+ * @since v0.1.13
+ */
+ function createServer<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ >(requestListener?: RequestListener<Request, Response>): Server<Request, Response>;
+ function createServer<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ >(
+ options: ServerOptions<Request, Response>,
+ requestListener?: RequestListener<Request, Response>,
+ ): Server<Request, Response>;
+ // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly,
+ // create interface RequestOptions would make the naming more clear to developers
+ interface RequestOptions extends ClientRequestArgs {}
+ /**
+ * `options` in `socket.connect()` are also supported.
+ *
+ * Node.js maintains several connections per server to make HTTP requests.
+ * This function allows one to transparently issue requests.
+ *
+ * `url` can be a string or a `URL` object. If `url` is a
+ * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
+ *
+ * If both `url` and `options` are specified, the objects are merged, with the`options` properties taking precedence.
+ *
+ * The optional `callback` parameter will be added as a one-time listener for
+ * the `'response'` event.
+ *
+ * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to
+ * upload a file with a POST request, then write to the `ClientRequest` object.
+ *
+ * ```js
+ * const http = require('node:http');
+ *
+ * const postData = JSON.stringify({
+ * 'msg': 'Hello World!',
+ * });
+ *
+ * const options = {
+ * hostname: 'www.google.com',
+ * port: 80,
+ * path: '/upload',
+ * method: 'POST',
+ * headers: {
+ * 'Content-Type': 'application/json',
+ * 'Content-Length': Buffer.byteLength(postData),
+ * },
+ * };
+ *
+ * const req = http.request(options, (res) => {
+ * console.log(`STATUS: ${res.statusCode}`);
+ * console.log(`HEADERS: ${JSON.stringify(res.headers)}`);
+ * res.setEncoding('utf8');
+ * res.on('data', (chunk) => {
+ * console.log(`BODY: ${chunk}`);
+ * });
+ * res.on('end', () => {
+ * console.log('No more data in response.');
+ * });
+ * });
+ *
+ * req.on('error', (e) => {
+ * console.error(`problem with request: ${e.message}`);
+ * });
+ *
+ * // Write data to request body
+ * req.write(postData);
+ * req.end();
+ * ```
+ *
+ * In the example `req.end()` was called. With `http.request()` one
+ * must always call `req.end()` to signify the end of the request -
+ * even if there is no data being written to the request body.
+ *
+ * If any error is encountered during the request (be that with DNS resolution,
+ * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted
+ * on the returned request object. As with all `'error'` events, if no listeners
+ * are registered the error will be thrown.
+ *
+ * There are a few special headers that should be noted.
+ *
+ * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to
+ * the server should be persisted until the next request.
+ * * Sending a 'Content-Length' header will disable the default chunked encoding.
+ * * Sending an 'Expect' header will immediately send the request headers.
+ * Usually, when sending 'Expect: 100-continue', both a timeout and a listener
+ * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more
+ * information.
+ * * Sending an Authorization header will override using the `auth` option
+ * to compute basic authentication.
+ *
+ * Example using a `URL` as `options`:
+ *
+ * ```js
+ * const options = new URL('http://abc:xyz@example.com');
+ *
+ * const req = http.request(options, (res) => {
+ * // ...
+ * });
+ * ```
+ *
+ * In a successful request, the following events will be emitted in the following
+ * order:
+ *
+ * * `'socket'`
+ * * `'response'`
+ * * `'data'` any number of times, on the `res` object
+ * (`'data'` will not be emitted at all if the response body is empty, for
+ * instance, in most redirects)
+ * * `'end'` on the `res` object
+ * * `'close'`
+ *
+ * In the case of a connection error, the following events will be emitted:
+ *
+ * * `'socket'`
+ * * `'error'`
+ * * `'close'`
+ *
+ * In the case of a premature connection close before the response is received,
+ * the following events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`
+ * * `'close'`
+ *
+ * In the case of a premature connection close after the response is received,
+ * the following events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * `'response'`
+ * * `'data'` any number of times, on the `res` object
+ * * (connection closed here)
+ * * `'aborted'` on the `res` object
+ * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`
+ * * `'close'`
+ * * `'close'` on the `res` object
+ *
+ * If `req.destroy()` is called before a socket is assigned, the following
+ * events will be emitted in the following order:
+ *
+ * * (`req.destroy()` called here)
+ * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`, or the error with which `req.destroy()` was called
+ * * `'close'`
+ *
+ * If `req.destroy()` is called before the connection succeeds, the following
+ * events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * (`req.destroy()` called here)
+ * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`, or the error with which `req.destroy()` was called
+ * * `'close'`
+ *
+ * If `req.destroy()` is called after the response is received, the following
+ * events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * `'response'`
+ * * `'data'` any number of times, on the `res` object
+ * * (`req.destroy()` called here)
+ * * `'aborted'` on the `res` object
+ * * `'error'` on the `res` object with an error with message `'Error: aborted'`and code `'ECONNRESET'`, or the error with which `req.destroy()` was called
+ * * `'close'`
+ * * `'close'` on the `res` object
+ *
+ * If `req.abort()` is called before a socket is assigned, the following
+ * events will be emitted in the following order:
+ *
+ * * (`req.abort()` called here)
+ * * `'abort'`
+ * * `'close'`
+ *
+ * If `req.abort()` is called before the connection succeeds, the following
+ * events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * (`req.abort()` called here)
+ * * `'abort'`
+ * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`
+ * * `'close'`
+ *
+ * If `req.abort()` is called after the response is received, the following
+ * events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * `'response'`
+ * * `'data'` any number of times, on the `res` object
+ * * (`req.abort()` called here)
+ * * `'abort'`
+ * * `'aborted'` on the `res` object
+ * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`.
+ * * `'close'`
+ * * `'close'` on the `res` object
+ *
+ * Setting the `timeout` option or using the `setTimeout()` function will
+ * not abort the request or do anything besides add a `'timeout'` event.
+ *
+ * Passing an `AbortSignal` and then calling `abort()` on the corresponding`AbortController` will behave the same way as calling `.destroy()` on the
+ * request. Specifically, the `'error'` event will be emitted with an error with
+ * the message `'AbortError: The operation was aborted'`, the code `'ABORT_ERR'`and the `cause`, if one was provided.
+ * @since v0.3.6
+ */
+ function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
+ function request(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
+ /**
+ * Since most requests are GET requests without bodies, Node.js provides this
+ * convenience method. The only difference between this method and {@link request} is that it sets the method to GET and calls `req.end()`automatically. The callback must take care to consume the
+ * response
+ * data for reasons stated in {@link ClientRequest} section.
+ *
+ * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}.
+ *
+ * JSON fetching example:
+ *
+ * ```js
+ * http.get('http://localhost:8000/', (res) => {
+ * const { statusCode } = res;
+ * const contentType = res.headers['content-type'];
+ *
+ * let error;
+ * // Any 2xx status code signals a successful response but
+ * // here we're only checking for 200.
+ * if (statusCode !== 200) {
+ * error = new Error('Request Failed.\n' +
+ * `Status Code: ${statusCode}`);
+ * } else if (!/^application\/json/.test(contentType)) {
+ * error = new Error('Invalid content-type.\n' +
+ * `Expected application/json but received ${contentType}`);
+ * }
+ * if (error) {
+ * console.error(error.message);
+ * // Consume response data to free up memory
+ * res.resume();
+ * return;
+ * }
+ *
+ * res.setEncoding('utf8');
+ * let rawData = '';
+ * res.on('data', (chunk) => { rawData += chunk; });
+ * res.on('end', () => {
+ * try {
+ * const parsedData = JSON.parse(rawData);
+ * console.log(parsedData);
+ * } catch (e) {
+ * console.error(e.message);
+ * }
+ * });
+ * }).on('error', (e) => {
+ * console.error(`Got error: ${e.message}`);
+ * });
+ *
+ * // Create a local server to receive data from
+ * const server = http.createServer((req, res) => {
+ * res.writeHead(200, { 'Content-Type': 'application/json' });
+ * res.end(JSON.stringify({
+ * data: 'Hello World!',
+ * }));
+ * });
+ *
+ * server.listen(8000);
+ * ```
+ * @since v0.3.6
+ * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. Properties that are inherited from the prototype are ignored.
+ */
+ function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
+ function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
+ /**
+ * Performs the low-level validations on the provided `name` that are done when`res.setHeader(name, value)` is called.
+ *
+ * Passing illegal value as `name` will result in a `TypeError` being thrown,
+ * identified by `code: 'ERR_INVALID_HTTP_TOKEN'`.
+ *
+ * It is not necessary to use this method before passing headers to an HTTP request
+ * or response. The HTTP module will automatically validate such headers.
+ * Examples:
+ *
+ * Example:
+ *
+ * ```js
+ * const { validateHeaderName } = require('node:http');
+ *
+ * try {
+ * validateHeaderName('');
+ * } catch (err) {
+ * console.error(err instanceof TypeError); // --> true
+ * console.error(err.code); // --> 'ERR_INVALID_HTTP_TOKEN'
+ * console.error(err.message); // --> 'Header name must be a valid HTTP token [""]'
+ * }
+ * ```
+ * @since v14.3.0
+ * @param [label='Header name'] Label for error message.
+ */
+ function validateHeaderName(name: string): void;
+ /**
+ * Performs the low-level validations on the provided `value` that are done when`res.setHeader(name, value)` is called.
+ *
+ * Passing illegal value as `value` will result in a `TypeError` being thrown.
+ *
+ * * Undefined value error is identified by `code: 'ERR_HTTP_INVALID_HEADER_VALUE'`.
+ * * Invalid value character error is identified by `code: 'ERR_INVALID_CHAR'`.
+ *
+ * It is not necessary to use this method before passing headers to an HTTP request
+ * or response. The HTTP module will automatically validate such headers.
+ *
+ * Examples:
+ *
+ * ```js
+ * const { validateHeaderValue } = require('node:http');
+ *
+ * try {
+ * validateHeaderValue('x-my-header', undefined);
+ * } catch (err) {
+ * console.error(err instanceof TypeError); // --> true
+ * console.error(err.code === 'ERR_HTTP_INVALID_HEADER_VALUE'); // --> true
+ * console.error(err.message); // --> 'Invalid value "undefined" for header "x-my-header"'
+ * }
+ *
+ * try {
+ * validateHeaderValue('x-my-header', 'oʊmɪɡə');
+ * } catch (err) {
+ * console.error(err instanceof TypeError); // --> true
+ * console.error(err.code === 'ERR_INVALID_CHAR'); // --> true
+ * console.error(err.message); // --> 'Invalid character in header content ["x-my-header"]'
+ * }
+ * ```
+ * @since v14.3.0
+ * @param name Header name
+ * @param value Header value
+ */
+ function validateHeaderValue(name: string, value: string): void;
+ /**
+ * Set the maximum number of idle HTTP parsers.
+ * @since v18.8.0, v16.18.0
+ * @param [max=1000]
+ */
+ function setMaxIdleHTTPParsers(max: number): void;
+ let globalAgent: Agent;
+ /**
+ * Read-only property specifying the maximum allowed size of HTTP headers in bytes.
+ * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option.
+ */
+ const maxHeaderSize: number;
+}
+declare module 'node:http' {
+ export * from 'http';
+}
diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts
new file mode 100755
index 0000000..1d29a2c
--- /dev/null
+++ b/node_modules/@types/node/http2.d.ts
@@ -0,0 +1,2129 @@
+/**
+ * The `node:http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol.
+ * It can be accessed using:
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * ```
+ * @since v8.4.0
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/http2.js)
+ */
+declare module 'http2' {
+ import EventEmitter = require('node:events');
+ import * as fs from 'node:fs';
+ import * as net from 'node:net';
+ import * as stream from 'node:stream';
+ import * as tls from 'node:tls';
+ import * as url from 'node:url';
+ import { IncomingHttpHeaders as Http1IncomingHttpHeaders, OutgoingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http';
+ export { OutgoingHttpHeaders } from 'node:http';
+ export interface IncomingHttpStatusHeader {
+ ':status'?: number | undefined;
+ }
+ export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders {
+ ':path'?: string | undefined;
+ ':method'?: string | undefined;
+ ':authority'?: string | undefined;
+ ':scheme'?: string | undefined;
+ }
+ // Http2Stream
+ export interface StreamPriorityOptions {
+ exclusive?: boolean | undefined;
+ parent?: number | undefined;
+ weight?: number | undefined;
+ silent?: boolean | undefined;
+ }
+ export interface StreamState {
+ localWindowSize?: number | undefined;
+ state?: number | undefined;
+ localClose?: number | undefined;
+ remoteClose?: number | undefined;
+ sumDependencyWeight?: number | undefined;
+ weight?: number | undefined;
+ }
+ export interface ServerStreamResponseOptions {
+ endStream?: boolean | undefined;
+ waitForTrailers?: boolean | undefined;
+ }
+ export interface StatOptions {
+ offset: number;
+ length: number;
+ }
+ export interface ServerStreamFileResponseOptions {
+ statCheck?(stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions): void | boolean;
+ waitForTrailers?: boolean | undefined;
+ offset?: number | undefined;
+ length?: number | undefined;
+ }
+ export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions {
+ onError?(err: NodeJS.ErrnoException): void;
+ }
+ export interface Http2Stream extends stream.Duplex {
+ /**
+ * Set to `true` if the `Http2Stream` instance was aborted abnormally. When set,
+ * the `'aborted'` event will have been emitted.
+ * @since v8.4.0
+ */
+ readonly aborted: boolean;
+ /**
+ * This property shows the number of characters currently buffered to be written.
+ * See `net.Socket.bufferSize` for details.
+ * @since v11.2.0, v10.16.0
+ */
+ readonly bufferSize: number;
+ /**
+ * Set to `true` if the `Http2Stream` instance has been closed.
+ * @since v9.4.0
+ */
+ readonly closed: boolean;
+ /**
+ * Set to `true` if the `Http2Stream` instance has been destroyed and is no longer
+ * usable.
+ * @since v8.4.0
+ */
+ readonly destroyed: boolean;
+ /**
+ * Set to `true` if the `END_STREAM` flag was set in the request or response
+ * HEADERS frame received, indicating that no additional data should be received
+ * and the readable side of the `Http2Stream` will be closed.
+ * @since v10.11.0
+ */
+ readonly endAfterHeaders: boolean;
+ /**
+ * The numeric stream identifier of this `Http2Stream` instance. Set to `undefined`if the stream identifier has not yet been assigned.
+ * @since v8.4.0
+ */
+ readonly id?: number | undefined;
+ /**
+ * Set to `true` if the `Http2Stream` instance has not yet been assigned a
+ * numeric stream identifier.
+ * @since v9.4.0
+ */
+ readonly pending: boolean;
+ /**
+ * Set to the `RST_STREAM` `error code` reported when the `Http2Stream` is
+ * destroyed after either receiving an `RST_STREAM` frame from the connected peer,
+ * calling `http2stream.close()`, or `http2stream.destroy()`. Will be`undefined` if the `Http2Stream` has not been closed.
+ * @since v8.4.0
+ */
+ readonly rstCode: number;
+ /**
+ * An object containing the outbound headers sent for this `Http2Stream`.
+ * @since v9.5.0
+ */
+ readonly sentHeaders: OutgoingHttpHeaders;
+ /**
+ * An array of objects containing the outbound informational (additional) headers
+ * sent for this `Http2Stream`.
+ * @since v9.5.0
+ */
+ readonly sentInfoHeaders?: OutgoingHttpHeaders[] | undefined;
+ /**
+ * An object containing the outbound trailers sent for this `HttpStream`.
+ * @since v9.5.0
+ */
+ readonly sentTrailers?: OutgoingHttpHeaders | undefined;
+ /**
+ * A reference to the `Http2Session` instance that owns this `Http2Stream`. The
+ * value will be `undefined` after the `Http2Stream` instance is destroyed.
+ * @since v8.4.0
+ */
+ readonly session: Http2Session | undefined;
+ /**
+ * Provides miscellaneous information about the current state of the`Http2Stream`.
+ *
+ * A current state of this `Http2Stream`.
+ * @since v8.4.0
+ */
+ readonly state: StreamState;
+ /**
+ * Closes the `Http2Stream` instance by sending an `RST_STREAM` frame to the
+ * connected HTTP/2 peer.
+ * @since v8.4.0
+ * @param [code=http2.constants.NGHTTP2_NO_ERROR] Unsigned 32-bit integer identifying the error code.
+ * @param callback An optional function registered to listen for the `'close'` event.
+ */
+ close(code?: number, callback?: () => void): void;
+ /**
+ * Updates the priority for this `Http2Stream` instance.
+ * @since v8.4.0
+ */
+ priority(options: StreamPriorityOptions): void;
+ /**
+ * ```js
+ * const http2 = require('node:http2');
+ * const client = http2.connect('http://example.org:8000');
+ * const { NGHTTP2_CANCEL } = http2.constants;
+ * const req = client.request({ ':path': '/' });
+ *
+ * // Cancel the stream if there's no activity after 5 seconds
+ * req.setTimeout(5000, () => req.close(NGHTTP2_CANCEL));
+ * ```
+ * @since v8.4.0
+ */
+ setTimeout(msecs: number, callback?: () => void): void;
+ /**
+ * Sends a trailing `HEADERS` frame to the connected HTTP/2 peer. This method
+ * will cause the `Http2Stream` to be immediately closed and must only be
+ * called after the `'wantTrailers'` event has been emitted. When sending a
+ * request or sending a response, the `options.waitForTrailers` option must be set
+ * in order to keep the `Http2Stream` open after the final `DATA` frame so that
+ * trailers can be sent.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respond(undefined, { waitForTrailers: true });
+ * stream.on('wantTrailers', () => {
+ * stream.sendTrailers({ xyz: 'abc' });
+ * });
+ * stream.end('Hello World');
+ * });
+ * ```
+ *
+ * The HTTP/1 specification forbids trailers from containing HTTP/2 pseudo-header
+ * fields (e.g. `':method'`, `':path'`, etc).
+ * @since v10.0.0
+ */
+ sendTrailers(headers: OutgoingHttpHeaders): void;
+ addListener(event: 'aborted', listener: () => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'streamClosed', listener: (code: number) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: 'wantTrailers', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'aborted'): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'data', chunk: Buffer | string): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'finish'): boolean;
+ emit(event: 'frameError', frameType: number, errorCode: number): boolean;
+ emit(event: 'pipe', src: stream.Readable): boolean;
+ emit(event: 'unpipe', src: stream.Readable): boolean;
+ emit(event: 'streamClosed', code: number): boolean;
+ emit(event: 'timeout'): boolean;
+ emit(event: 'trailers', trailers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: 'wantTrailers'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'aborted', listener: () => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'streamClosed', listener: (code: number) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: 'wantTrailers', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'aborted', listener: () => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'streamClosed', listener: (code: number) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: 'wantTrailers', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'aborted', listener: () => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'streamClosed', listener: (code: number) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: 'wantTrailers', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'aborted', listener: () => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'streamClosed', listener: (code: number) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: 'wantTrailers', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface ClientHttp2Stream extends Http2Stream {
+ addListener(event: 'continue', listener: () => {}): this;
+ addListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ addListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'continue'): boolean;
+ emit(event: 'headers', headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+ emit(event: 'push', headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: 'response', headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'continue', listener: () => {}): this;
+ on(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ on(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'continue', listener: () => {}): this;
+ once(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ once(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'continue', listener: () => {}): this;
+ prependListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'continue', listener: () => {}): this;
+ prependOnceListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependOnceListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface ServerHttp2Stream extends Http2Stream {
+ /**
+ * True if headers were sent, false otherwise (read-only).
+ * @since v8.4.0
+ */
+ readonly headersSent: boolean;
+ /**
+ * Read-only property mapped to the `SETTINGS_ENABLE_PUSH` flag of the remote
+ * client's most recent `SETTINGS` frame. Will be `true` if the remote peer
+ * accepts push streams, `false` otherwise. Settings are the same for every`Http2Stream` in the same `Http2Session`.
+ * @since v8.4.0
+ */
+ readonly pushAllowed: boolean;
+ /**
+ * Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer.
+ * @since v8.4.0
+ */
+ additionalHeaders(headers: OutgoingHttpHeaders): void;
+ /**
+ * Initiates a push stream. The callback is invoked with the new `Http2Stream`instance created for the push stream passed as the second argument, or an`Error` passed as the first argument.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respond({ ':status': 200 });
+ * stream.pushStream({ ':path': '/' }, (err, pushStream, headers) => {
+ * if (err) throw err;
+ * pushStream.respond({ ':status': 200 });
+ * pushStream.end('some pushed data');
+ * });
+ * stream.end('some data');
+ * });
+ * ```
+ *
+ * Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass
+ * a `weight` value to `http2stream.priority` with the `silent` option set to`true` to enable server-side bandwidth balancing between concurrent streams.
+ *
+ * Calling `http2stream.pushStream()` from within a pushed stream is not permitted
+ * and will throw an error.
+ * @since v8.4.0
+ * @param callback Callback that is called once the push stream has been initiated.
+ */
+ pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
+ pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
+ /**
+ * ```js
+ * const http2 = require('node:http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respond({ ':status': 200 });
+ * stream.end('some data');
+ * });
+ * ```
+ *
+ * Initiates a response. When the `options.waitForTrailers` option is set, the`'wantTrailers'` event will be emitted immediately after queuing the last chunk
+ * of payload data to be sent. The `http2stream.sendTrailers()` method can then be
+ * used to sent trailing header fields to the peer.
+ *
+ * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+ * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respond({ ':status': 200 }, { waitForTrailers: true });
+ * stream.on('wantTrailers', () => {
+ * stream.sendTrailers({ ABC: 'some value to send' });
+ * });
+ * stream.end('some data');
+ * });
+ * ```
+ * @since v8.4.0
+ */
+ respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void;
+ /**
+ * Initiates a response whose data is read from the given file descriptor. No
+ * validation is performed on the given file descriptor. If an error occurs while
+ * attempting to read data using the file descriptor, the `Http2Stream` will be
+ * closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code.
+ *
+ * When used, the `Http2Stream` object's `Duplex` interface will be closed
+ * automatically.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const fs = require('node:fs');
+ *
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * const fd = fs.openSync('/some/file', 'r');
+ *
+ * const stat = fs.fstatSync(fd);
+ * const headers = {
+ * 'content-length': stat.size,
+ * 'last-modified': stat.mtime.toUTCString(),
+ * 'content-type': 'text/plain; charset=utf-8',
+ * };
+ * stream.respondWithFD(fd, headers);
+ * stream.on('close', () => fs.closeSync(fd));
+ * });
+ * ```
+ *
+ * The optional `options.statCheck` function may be specified to give user code
+ * an opportunity to set additional content headers based on the `fs.Stat` details
+ * of the given fd. If the `statCheck` function is provided, the`http2stream.respondWithFD()` method will perform an `fs.fstat()` call to
+ * collect details on the provided file descriptor.
+ *
+ * The `offset` and `length` options may be used to limit the response to a
+ * specific range subset. This can be used, for instance, to support HTTP Range
+ * requests.
+ *
+ * The file descriptor or `FileHandle` is not closed when the stream is closed,
+ * so it will need to be closed manually once it is no longer needed.
+ * Using the same file descriptor concurrently for multiple streams
+ * is not supported and may result in data loss. Re-using a file descriptor
+ * after a stream has finished is supported.
+ *
+ * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+ * will be emitted immediately after queuing the last chunk of payload data to be
+ * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing
+ * header fields to the peer.
+ *
+ * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+ * close when the final `DATA` frame is transmitted. User code _must_ call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const fs = require('node:fs');
+ *
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * const fd = fs.openSync('/some/file', 'r');
+ *
+ * const stat = fs.fstatSync(fd);
+ * const headers = {
+ * 'content-length': stat.size,
+ * 'last-modified': stat.mtime.toUTCString(),
+ * 'content-type': 'text/plain; charset=utf-8',
+ * };
+ * stream.respondWithFD(fd, headers, { waitForTrailers: true });
+ * stream.on('wantTrailers', () => {
+ * stream.sendTrailers({ ABC: 'some value to send' });
+ * });
+ *
+ * stream.on('close', () => fs.closeSync(fd));
+ * });
+ * ```
+ * @since v8.4.0
+ * @param fd A readable file descriptor.
+ */
+ respondWithFD(fd: number | fs.promises.FileHandle, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void;
+ /**
+ * Sends a regular file as the response. The `path` must specify a regular file
+ * or an `'error'` event will be emitted on the `Http2Stream` object.
+ *
+ * When used, the `Http2Stream` object's `Duplex` interface will be closed
+ * automatically.
+ *
+ * The optional `options.statCheck` function may be specified to give user code
+ * an opportunity to set additional content headers based on the `fs.Stat` details
+ * of the given file:
+ *
+ * If an error occurs while attempting to read the file data, the `Http2Stream`will be closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR`code. If the `onError` callback is
+ * defined, then it will be called. Otherwise
+ * the stream will be destroyed.
+ *
+ * Example using a file path:
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * function statCheck(stat, headers) {
+ * headers['last-modified'] = stat.mtime.toUTCString();
+ * }
+ *
+ * function onError(err) {
+ * // stream.respond() can throw if the stream has been destroyed by
+ * // the other side.
+ * try {
+ * if (err.code === 'ENOENT') {
+ * stream.respond({ ':status': 404 });
+ * } else {
+ * stream.respond({ ':status': 500 });
+ * }
+ * } catch (err) {
+ * // Perform actual error handling.
+ * console.error(err);
+ * }
+ * stream.end();
+ * }
+ *
+ * stream.respondWithFile('/some/file',
+ * { 'content-type': 'text/plain; charset=utf-8' },
+ * { statCheck, onError });
+ * });
+ * ```
+ *
+ * The `options.statCheck` function may also be used to cancel the send operation
+ * by returning `false`. For instance, a conditional request may check the stat
+ * results to determine if the file has been modified to return an appropriate`304` response:
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * function statCheck(stat, headers) {
+ * // Check the stat here...
+ * stream.respond({ ':status': 304 });
+ * return false; // Cancel the send operation
+ * }
+ * stream.respondWithFile('/some/file',
+ * { 'content-type': 'text/plain; charset=utf-8' },
+ * { statCheck });
+ * });
+ * ```
+ *
+ * The `content-length` header field will be automatically set.
+ *
+ * The `offset` and `length` options may be used to limit the response to a
+ * specific range subset. This can be used, for instance, to support HTTP Range
+ * requests.
+ *
+ * The `options.onError` function may also be used to handle all the errors
+ * that could happen before the delivery of the file is initiated. The
+ * default behavior is to destroy the stream.
+ *
+ * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+ * will be emitted immediately after queuing the last chunk of payload data to be
+ * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing
+ * header fields to the peer.
+ *
+ * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+ * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respondWithFile('/some/file',
+ * { 'content-type': 'text/plain; charset=utf-8' },
+ * { waitForTrailers: true });
+ * stream.on('wantTrailers', () => {
+ * stream.sendTrailers({ ABC: 'some value to send' });
+ * });
+ * });
+ * ```
+ * @since v8.4.0
+ */
+ respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void;
+ }
+ // Http2Session
+ export interface Settings {
+ headerTableSize?: number | undefined;
+ enablePush?: boolean | undefined;
+ initialWindowSize?: number | undefined;
+ maxFrameSize?: number | undefined;
+ maxConcurrentStreams?: number | undefined;
+ maxHeaderListSize?: number | undefined;
+ enableConnectProtocol?: boolean | undefined;
+ }
+ export interface ClientSessionRequestOptions {
+ endStream?: boolean | undefined;
+ exclusive?: boolean | undefined;
+ parent?: number | undefined;
+ weight?: number | undefined;
+ waitForTrailers?: boolean | undefined;
+ signal?: AbortSignal | undefined;
+ }
+ export interface SessionState {
+ effectiveLocalWindowSize?: number | undefined;
+ effectiveRecvDataLength?: number | undefined;
+ nextStreamID?: number | undefined;
+ localWindowSize?: number | undefined;
+ lastProcStreamID?: number | undefined;
+ remoteWindowSize?: number | undefined;
+ outboundQueueSize?: number | undefined;
+ deflateDynamicTableSize?: number | undefined;
+ inflateDynamicTableSize?: number | undefined;
+ }
+ export interface Http2Session extends EventEmitter {
+ /**
+ * Value will be `undefined` if the `Http2Session` is not yet connected to a
+ * socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or
+ * will return the value of the connected `TLSSocket`'s own `alpnProtocol`property.
+ * @since v9.4.0
+ */
+ readonly alpnProtocol?: string | undefined;
+ /**
+ * Will be `true` if this `Http2Session` instance has been closed, otherwise`false`.
+ * @since v9.4.0
+ */
+ readonly closed: boolean;
+ /**
+ * Will be `true` if this `Http2Session` instance is still connecting, will be set
+ * to `false` before emitting `connect` event and/or calling the `http2.connect`callback.
+ * @since v10.0.0
+ */
+ readonly connecting: boolean;
+ /**
+ * Will be `true` if this `Http2Session` instance has been destroyed and must no
+ * longer be used, otherwise `false`.
+ * @since v8.4.0
+ */
+ readonly destroyed: boolean;
+ /**
+ * Value is `undefined` if the `Http2Session` session socket has not yet been
+ * connected, `true` if the `Http2Session` is connected with a `TLSSocket`,
+ * and `false` if the `Http2Session` is connected to any other kind of socket
+ * or stream.
+ * @since v9.4.0
+ */
+ readonly encrypted?: boolean | undefined;
+ /**
+ * A prototype-less object describing the current local settings of this`Http2Session`. The local settings are local to _this_`Http2Session` instance.
+ * @since v8.4.0
+ */
+ readonly localSettings: Settings;
+ /**
+ * If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property
+ * will return an `Array` of origins for which the `Http2Session` may be
+ * considered authoritative.
+ *
+ * The `originSet` property is only available when using a secure TLS connection.
+ * @since v9.4.0
+ */
+ readonly originSet?: string[] | undefined;
+ /**
+ * Indicates whether the `Http2Session` is currently waiting for acknowledgment of
+ * a sent `SETTINGS` frame. Will be `true` after calling the`http2session.settings()` method. Will be `false` once all sent `SETTINGS`frames have been acknowledged.
+ * @since v8.4.0
+ */
+ readonly pendingSettingsAck: boolean;
+ /**
+ * A prototype-less object describing the current remote settings of this`Http2Session`. The remote settings are set by the _connected_ HTTP/2 peer.
+ * @since v8.4.0
+ */
+ readonly remoteSettings: Settings;
+ /**
+ * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but
+ * limits available methods to ones safe to use with HTTP/2.
+ *
+ * `destroy`, `emit`, `end`, `pause`, `read`, `resume`, and `write` will throw
+ * an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for more information.
+ *
+ * `setTimeout` method will be called on this `Http2Session`.
+ *
+ * All other interactions will be routed directly to the socket.
+ * @since v8.4.0
+ */
+ readonly socket: net.Socket | tls.TLSSocket;
+ /**
+ * Provides miscellaneous information about the current state of the`Http2Session`.
+ *
+ * An object describing the current status of this `Http2Session`.
+ * @since v8.4.0
+ */
+ readonly state: SessionState;
+ /**
+ * The `http2session.type` will be equal to`http2.constants.NGHTTP2_SESSION_SERVER` if this `Http2Session` instance is a
+ * server, and `http2.constants.NGHTTP2_SESSION_CLIENT` if the instance is a
+ * client.
+ * @since v8.4.0
+ */
+ readonly type: number;
+ /**
+ * Gracefully closes the `Http2Session`, allowing any existing streams to
+ * complete on their own and preventing new `Http2Stream` instances from being
+ * created. Once closed, `http2session.destroy()`_might_ be called if there
+ * are no open `Http2Stream` instances.
+ *
+ * If specified, the `callback` function is registered as a handler for the`'close'` event.
+ * @since v9.4.0
+ */
+ close(callback?: () => void): void;
+ /**
+ * Immediately terminates the `Http2Session` and the associated `net.Socket` or`tls.TLSSocket`.
+ *
+ * Once destroyed, the `Http2Session` will emit the `'close'` event. If `error`is not undefined, an `'error'` event will be emitted immediately before the`'close'` event.
+ *
+ * If there are any remaining open `Http2Streams` associated with the`Http2Session`, those will also be destroyed.
+ * @since v8.4.0
+ * @param error An `Error` object if the `Http2Session` is being destroyed due to an error.
+ * @param code The HTTP/2 error code to send in the final `GOAWAY` frame. If unspecified, and `error` is not undefined, the default is `INTERNAL_ERROR`, otherwise defaults to `NO_ERROR`.
+ */
+ destroy(error?: Error, code?: number): void;
+ /**
+ * Transmits a `GOAWAY` frame to the connected peer _without_ shutting down the`Http2Session`.
+ * @since v9.4.0
+ * @param code An HTTP/2 error code
+ * @param lastStreamID The numeric ID of the last processed `Http2Stream`
+ * @param opaqueData A `TypedArray` or `DataView` instance containing additional data to be carried within the `GOAWAY` frame.
+ */
+ goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void;
+ /**
+ * Sends a `PING` frame to the connected HTTP/2 peer. A `callback` function must
+ * be provided. The method will return `true` if the `PING` was sent, `false`otherwise.
+ *
+ * The maximum number of outstanding (unacknowledged) pings is determined by the`maxOutstandingPings` configuration option. The default maximum is 10.
+ *
+ * If provided, the `payload` must be a `Buffer`, `TypedArray`, or `DataView`containing 8 bytes of data that will be transmitted with the `PING` and
+ * returned with the ping acknowledgment.
+ *
+ * The callback will be invoked with three arguments: an error argument that will
+ * be `null` if the `PING` was successfully acknowledged, a `duration` argument
+ * that reports the number of milliseconds elapsed since the ping was sent and the
+ * acknowledgment was received, and a `Buffer` containing the 8-byte `PING`payload.
+ *
+ * ```js
+ * session.ping(Buffer.from('abcdefgh'), (err, duration, payload) => {
+ * if (!err) {
+ * console.log(`Ping acknowledged in ${duration} milliseconds`);
+ * console.log(`With payload '${payload.toString()}'`);
+ * }
+ * });
+ * ```
+ *
+ * If the `payload` argument is not specified, the default payload will be the
+ * 64-bit timestamp (little endian) marking the start of the `PING` duration.
+ * @since v8.9.3
+ * @param payload Optional ping payload.
+ */
+ ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
+ ping(payload: NodeJS.ArrayBufferView, callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
+ /**
+ * Calls `ref()` on this `Http2Session`instance's underlying `net.Socket`.
+ * @since v9.4.0
+ */
+ ref(): void;
+ /**
+ * Sets the local endpoint's window size.
+ * The `windowSize` is the total window size to set, not
+ * the delta.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ *
+ * const server = http2.createServer();
+ * const expectedWindowSize = 2 ** 20;
+ * server.on('connect', (session) => {
+ *
+ * // Set local window size to be 2 ** 20
+ * session.setLocalWindowSize(expectedWindowSize);
+ * });
+ * ```
+ * @since v15.3.0, v14.18.0
+ */
+ setLocalWindowSize(windowSize: number): void;
+ /**
+ * Used to set a callback function that is called when there is no activity on
+ * the `Http2Session` after `msecs` milliseconds. The given `callback` is
+ * registered as a listener on the `'timeout'` event.
+ * @since v8.4.0
+ */
+ setTimeout(msecs: number, callback?: () => void): void;
+ /**
+ * Updates the current local settings for this `Http2Session` and sends a new`SETTINGS` frame to the connected HTTP/2 peer.
+ *
+ * Once called, the `http2session.pendingSettingsAck` property will be `true`while the session is waiting for the remote peer to acknowledge the new
+ * settings.
+ *
+ * The new settings will not become effective until the `SETTINGS` acknowledgment
+ * is received and the `'localSettings'` event is emitted. It is possible to send
+ * multiple `SETTINGS` frames while acknowledgment is still pending.
+ * @since v8.4.0
+ * @param callback Callback that is called once the session is connected or right away if the session is already connected.
+ */
+ settings(settings: Settings, callback?: (err: Error | null, settings: Settings, duration: number) => void): void;
+ /**
+ * Calls `unref()` on this `Http2Session`instance's underlying `net.Socket`.
+ * @since v9.4.0
+ */
+ unref(): void;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ addListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ addListener(event: 'localSettings', listener: (settings: Settings) => void): this;
+ addListener(event: 'ping', listener: () => void): this;
+ addListener(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'frameError', frameType: number, errorCode: number, streamID: number): boolean;
+ emit(event: 'goaway', errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean;
+ emit(event: 'localSettings', settings: Settings): boolean;
+ emit(event: 'ping'): boolean;
+ emit(event: 'remoteSettings', settings: Settings): boolean;
+ emit(event: 'timeout'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ on(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ on(event: 'localSettings', listener: (settings: Settings) => void): this;
+ on(event: 'ping', listener: () => void): this;
+ on(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ once(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ once(event: 'localSettings', listener: (settings: Settings) => void): this;
+ once(event: 'ping', listener: () => void): this;
+ once(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ prependListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ prependListener(event: 'localSettings', listener: (settings: Settings) => void): this;
+ prependListener(event: 'ping', listener: () => void): this;
+ prependListener(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ prependOnceListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ prependOnceListener(event: 'localSettings', listener: (settings: Settings) => void): this;
+ prependOnceListener(event: 'ping', listener: () => void): this;
+ prependOnceListener(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface ClientHttp2Session extends Http2Session {
+ /**
+ * For HTTP/2 Client `Http2Session` instances only, the `http2session.request()`creates and returns an `Http2Stream` instance that can be used to send an
+ * HTTP/2 request to the connected server.
+ *
+ * When a `ClientHttp2Session` is first created, the socket may not yet be
+ * connected. if `clienthttp2session.request()` is called during this time, the
+ * actual request will be deferred until the socket is ready to go.
+ * If the `session` is closed before the actual request be executed, an`ERR_HTTP2_GOAWAY_SESSION` is thrown.
+ *
+ * This method is only available if `http2session.type` is equal to`http2.constants.NGHTTP2_SESSION_CLIENT`.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const clientSession = http2.connect('https://localhost:1234');
+ * const {
+ * HTTP2_HEADER_PATH,
+ * HTTP2_HEADER_STATUS,
+ * } = http2.constants;
+ *
+ * const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' });
+ * req.on('response', (headers) => {
+ * console.log(headers[HTTP2_HEADER_STATUS]);
+ * req.on('data', (chunk) => { // .. });
+ * req.on('end', () => { // .. });
+ * });
+ * ```
+ *
+ * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+ * is emitted immediately after queuing the last chunk of payload data to be sent.
+ * The `http2stream.sendTrailers()` method can then be called to send trailing
+ * headers to the peer.
+ *
+ * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+ * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+ *
+ * When `options.signal` is set with an `AbortSignal` and then `abort` on the
+ * corresponding `AbortController` is called, the request will emit an `'error'`event with an `AbortError` error.
+ *
+ * The `:method` and `:path` pseudo-headers are not specified within `headers`,
+ * they respectively default to:
+ *
+ * * `:method` \= `'GET'`
+ * * `:path` \= `/`
+ * @since v8.4.0
+ */
+ request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream;
+ addListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ addListener(event: 'origin', listener: (origins: string[]) => void): this;
+ addListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ addListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'altsvc', alt: string, origin: string, stream: number): boolean;
+ emit(event: 'origin', origins: ReadonlyArray<string>): boolean;
+ emit(event: 'connect', session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
+ emit(event: 'stream', stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ on(event: 'origin', listener: (origins: string[]) => void): this;
+ on(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ on(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ once(event: 'origin', listener: (origins: string[]) => void): this;
+ once(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ once(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ prependListener(event: 'origin', listener: (origins: string[]) => void): this;
+ prependListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ prependOnceListener(event: 'origin', listener: (origins: string[]) => void): this;
+ prependOnceListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface AlternativeServiceOptions {
+ origin: number | string | url.URL;
+ }
+ export interface ServerHttp2Session extends Http2Session {
+ readonly server: Http2Server | Http2SecureServer;
+ /**
+ * Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ *
+ * const server = http2.createServer();
+ * server.on('session', (session) => {
+ * // Set altsvc for origin https://example.org:80
+ * session.altsvc('h2=":8000"', 'https://example.org:80');
+ * });
+ *
+ * server.on('stream', (stream) => {
+ * // Set altsvc for a specific stream
+ * stream.session.altsvc('h2=":8000"', stream.id);
+ * });
+ * ```
+ *
+ * Sending an `ALTSVC` frame with a specific stream ID indicates that the alternate
+ * service is associated with the origin of the given `Http2Stream`.
+ *
+ * The `alt` and origin string _must_ contain only ASCII bytes and are
+ * strictly interpreted as a sequence of ASCII bytes. The special value `'clear'`may be passed to clear any previously set alternative service for a given
+ * domain.
+ *
+ * When a string is passed for the `originOrStream` argument, it will be parsed as
+ * a URL and the origin will be derived. For instance, the origin for the
+ * HTTP URL `'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given string
+ * cannot be parsed as a URL or if a valid origin cannot be derived.
+ *
+ * A `URL` object, or any object with an `origin` property, may be passed as`originOrStream`, in which case the value of the `origin` property will be
+ * used. The value of the `origin` property _must_ be a properly serialized
+ * ASCII origin.
+ * @since v9.4.0
+ * @param alt A description of the alternative service configuration as defined by `RFC 7838`.
+ * @param originOrStream Either a URL string specifying the origin (or an `Object` with an `origin` property) or the numeric identifier of an active `Http2Stream` as given by the
+ * `http2stream.id` property.
+ */
+ altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void;
+ /**
+ * Submits an `ORIGIN` frame (as defined by [RFC 8336](https://tools.ietf.org/html/rfc8336)) to the connected client
+ * to advertise the set of origins for which the server is capable of providing
+ * authoritative responses.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const options = getSecureOptionsSomehow();
+ * const server = http2.createSecureServer(options);
+ * server.on('stream', (stream) => {
+ * stream.respond();
+ * stream.end('ok');
+ * });
+ * server.on('session', (session) => {
+ * session.origin('https://example.com', 'https://example.org');
+ * });
+ * ```
+ *
+ * When a string is passed as an `origin`, it will be parsed as a URL and the
+ * origin will be derived. For instance, the origin for the HTTP URL`'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given
+ * string
+ * cannot be parsed as a URL or if a valid origin cannot be derived.
+ *
+ * A `URL` object, or any object with an `origin` property, may be passed as
+ * an `origin`, in which case the value of the `origin` property will be
+ * used. The value of the `origin` property _must_ be a properly serialized
+ * ASCII origin.
+ *
+ * Alternatively, the `origins` option may be used when creating a new HTTP/2
+ * server using the `http2.createSecureServer()` method:
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const options = getSecureOptionsSomehow();
+ * options.origins = ['https://example.com', 'https://example.org'];
+ * const server = http2.createSecureServer(options);
+ * server.on('stream', (stream) => {
+ * stream.respond();
+ * stream.end('ok');
+ * });
+ * ```
+ * @since v10.12.0
+ * @param origins One or more URL Strings passed as separate arguments.
+ */
+ origin(
+ ...origins: Array<
+ | string
+ | url.URL
+ | {
+ origin: string;
+ }
+ >
+ ): void;
+ addListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'connect', session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
+ emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ // Http2Server
+ export interface SessionOptions {
+ maxDeflateDynamicTableSize?: number | undefined;
+ maxSessionMemory?: number | undefined;
+ maxHeaderListPairs?: number | undefined;
+ maxOutstandingPings?: number | undefined;
+ maxSendHeaderBlockLength?: number | undefined;
+ paddingStrategy?: number | undefined;
+ peerMaxConcurrentStreams?: number | undefined;
+ settings?: Settings | undefined;
+ /**
+ * Specifies a timeout in milliseconds that
+ * a server should wait when an [`'unknownProtocol'`][] is emitted. If the
+ * socket has not been destroyed by that time the server will destroy it.
+ * @default 100000
+ */
+ unknownProtocolTimeout?: number | undefined;
+ selectPadding?(frameLen: number, maxFrameLen: number): number;
+ }
+ export interface ClientSessionOptions extends SessionOptions {
+ maxReservedRemoteStreams?: number | undefined;
+ createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined;
+ protocol?: 'http:' | 'https:' | undefined;
+ }
+ export interface ServerSessionOptions extends SessionOptions {
+ Http1IncomingMessage?: typeof IncomingMessage | undefined;
+ Http1ServerResponse?: typeof ServerResponse | undefined;
+ Http2ServerRequest?: typeof Http2ServerRequest | undefined;
+ Http2ServerResponse?: typeof Http2ServerResponse | undefined;
+ }
+ export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {}
+ export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions {}
+ export interface ServerOptions extends ServerSessionOptions {}
+ export interface SecureServerOptions extends SecureServerSessionOptions {
+ allowHTTP1?: boolean | undefined;
+ origins?: string[] | undefined;
+ }
+ interface HTTP2ServerCommon {
+ setTimeout(msec?: number, callback?: () => void): this;
+ /**
+ * Throws ERR_HTTP2_INVALID_SETTING_VALUE for invalid settings values.
+ * Throws ERR_INVALID_ARG_TYPE for invalid settings argument.
+ */
+ updateSettings(settings: Settings): void;
+ }
+ export interface Http2Server extends net.Server, HTTP2ServerCommon {
+ addListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ addListener(event: 'sessionError', listener: (err: Error) => void): this;
+ addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'checkContinue', request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: 'request', request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: 'session', session: ServerHttp2Session): boolean;
+ emit(event: 'sessionError', err: Error): boolean;
+ emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: 'timeout'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ on(event: 'sessionError', listener: (err: Error) => void): this;
+ on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ once(event: 'sessionError', listener: (err: Error) => void): this;
+ once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ prependListener(event: 'sessionError', listener: (err: Error) => void): this;
+ prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ prependOnceListener(event: 'sessionError', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface Http2SecureServer extends tls.Server, HTTP2ServerCommon {
+ addListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ addListener(event: 'sessionError', listener: (err: Error) => void): this;
+ addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'checkContinue', request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: 'request', request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: 'session', session: ServerHttp2Session): boolean;
+ emit(event: 'sessionError', err: Error): boolean;
+ emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: 'timeout'): boolean;
+ emit(event: 'unknownProtocol', socket: tls.TLSSocket): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ on(event: 'sessionError', listener: (err: Error) => void): this;
+ on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ once(event: 'sessionError', listener: (err: Error) => void): this;
+ once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ prependListener(event: 'sessionError', listener: (err: Error) => void): this;
+ prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ prependOnceListener(event: 'sessionError', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * A `Http2ServerRequest` object is created by {@link Server} or {@link SecureServer} and passed as the first argument to the `'request'` event. It may be used to access a request status,
+ * headers, and
+ * data.
+ * @since v8.4.0
+ */
+ export class Http2ServerRequest extends stream.Readable {
+ constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: ReadonlyArray<string>);
+ /**
+ * The `request.aborted` property will be `true` if the request has
+ * been aborted.
+ * @since v10.1.0
+ */
+ readonly aborted: boolean;
+ /**
+ * The request authority pseudo header field. Because HTTP/2 allows requests
+ * to set either `:authority` or `host`, this value is derived from`req.headers[':authority']` if present. Otherwise, it is derived from`req.headers['host']`.
+ * @since v8.4.0
+ */
+ readonly authority: string;
+ /**
+ * See `request.socket`.
+ * @since v8.4.0
+ * @deprecated Since v13.0.0 - Use `socket`.
+ */
+ readonly connection: net.Socket | tls.TLSSocket;
+ /**
+ * The `request.complete` property will be `true` if the request has
+ * been completed, aborted, or destroyed.
+ * @since v12.10.0
+ */
+ readonly complete: boolean;
+ /**
+ * The request/response headers object.
+ *
+ * Key-value pairs of header names and values. Header names are lower-cased.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // { 'user-agent': 'curl/7.22.0',
+ * // host: '127.0.0.1:8000',
+ * // accept: '*' }
+ * console.log(request.headers);
+ * ```
+ *
+ * See `HTTP/2 Headers Object`.
+ *
+ * In HTTP/2, the request path, host name, protocol, and method are represented as
+ * special headers prefixed with the `:` character (e.g. `':path'`). These special
+ * headers will be included in the `request.headers` object. Care must be taken not
+ * to inadvertently modify these special headers or errors may occur. For instance,
+ * removing all headers from the request will cause errors to occur:
+ *
+ * ```js
+ * removeAllHeaders(request.headers);
+ * assert(request.url); // Fails because the :path header has been removed
+ * ```
+ * @since v8.4.0
+ */
+ readonly headers: IncomingHttpHeaders;
+ /**
+ * In case of server request, the HTTP version sent by the client. In the case of
+ * client response, the HTTP version of the connected-to server. Returns`'2.0'`.
+ *
+ * Also `message.httpVersionMajor` is the first integer and`message.httpVersionMinor` is the second.
+ * @since v8.4.0
+ */
+ readonly httpVersion: string;
+ readonly httpVersionMinor: number;
+ readonly httpVersionMajor: number;
+ /**
+ * The request method as a string. Read-only. Examples: `'GET'`, `'DELETE'`.
+ * @since v8.4.0
+ */
+ readonly method: string;
+ /**
+ * The raw request/response headers list exactly as they were received.
+ *
+ * The keys and values are in the same list. It is _not_ a
+ * list of tuples. So, the even-numbered offsets are key values, and the
+ * odd-numbered offsets are the associated values.
+ *
+ * Header names are not lowercased, and duplicates are not merged.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // [ 'user-agent',
+ * // 'this is invalid because there can be only one',
+ * // 'User-Agent',
+ * // 'curl/7.22.0',
+ * // 'Host',
+ * // '127.0.0.1:8000',
+ * // 'ACCEPT',
+ * // '*' ]
+ * console.log(request.rawHeaders);
+ * ```
+ * @since v8.4.0
+ */
+ readonly rawHeaders: string[];
+ /**
+ * The raw request/response trailer keys and values exactly as they were
+ * received. Only populated at the `'end'` event.
+ * @since v8.4.0
+ */
+ readonly rawTrailers: string[];
+ /**
+ * The request scheme pseudo header field indicating the scheme
+ * portion of the target URL.
+ * @since v8.4.0
+ */
+ readonly scheme: string;
+ /**
+ * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but
+ * applies getters, setters, and methods based on HTTP/2 logic.
+ *
+ * `destroyed`, `readable`, and `writable` properties will be retrieved from and
+ * set on `request.stream`.
+ *
+ * `destroy`, `emit`, `end`, `on` and `once` methods will be called on`request.stream`.
+ *
+ * `setTimeout` method will be called on `request.stream.session`.
+ *
+ * `pause`, `read`, `resume`, and `write` will throw an error with code`ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for
+ * more information.
+ *
+ * All other interactions will be routed directly to the socket. With TLS support,
+ * use `request.socket.getPeerCertificate()` to obtain the client's
+ * authentication details.
+ * @since v8.4.0
+ */
+ readonly socket: net.Socket | tls.TLSSocket;
+ /**
+ * The `Http2Stream` object backing the request.
+ * @since v8.4.0
+ */
+ readonly stream: ServerHttp2Stream;
+ /**
+ * The request/response trailers object. Only populated at the `'end'` event.
+ * @since v8.4.0
+ */
+ readonly trailers: IncomingHttpHeaders;
+ /**
+ * Request URL string. This contains only the URL that is present in the actual
+ * HTTP request. If the request is:
+ *
+ * ```http
+ * GET /status?name=ryan HTTP/1.1
+ * Accept: text/plain
+ * ```
+ *
+ * Then `request.url` will be:
+ *
+ * ```js
+ * '/status?name=ryan'
+ * ```
+ *
+ * To parse the url into its parts, `new URL()` can be used:
+ *
+ * ```console
+ * $ node
+ * > new URL('/status?name=ryan', 'http://example.com')
+ * URL {
+ * href: 'http://example.com/status?name=ryan',
+ * origin: 'http://example.com',
+ * protocol: 'http:',
+ * username: '',
+ * password: '',
+ * host: 'example.com',
+ * hostname: 'example.com',
+ * port: '',
+ * pathname: '/status',
+ * search: '?name=ryan',
+ * searchParams: URLSearchParams { 'name' => 'ryan' },
+ * hash: ''
+ * }
+ * ```
+ * @since v8.4.0
+ */
+ url: string;
+ /**
+ * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is
+ * provided, then it is added as a listener on the `'timeout'` event on
+ * the response object.
+ *
+ * If no `'timeout'` listener is added to the request, the response, or
+ * the server, then `Http2Stream` s are destroyed when they time out. If a
+ * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly.
+ * @since v8.4.0
+ */
+ setTimeout(msecs: number, callback?: () => void): void;
+ read(size?: number): Buffer | string | null;
+ addListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'readable', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'aborted', hadError: boolean, code: number): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'data', chunk: Buffer | string): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'readable'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'readable', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'readable', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'readable', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'readable', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * This object is created internally by an HTTP server, not by the user. It is
+ * passed as the second parameter to the `'request'` event.
+ * @since v8.4.0
+ */
+ export class Http2ServerResponse extends stream.Writable {
+ constructor(stream: ServerHttp2Stream);
+ /**
+ * See `response.socket`.
+ * @since v8.4.0
+ * @deprecated Since v13.0.0 - Use `socket`.
+ */
+ readonly connection: net.Socket | tls.TLSSocket;
+ /**
+ * Boolean value that indicates whether the response has completed. Starts
+ * as `false`. After `response.end()` executes, the value will be `true`.
+ * @since v8.4.0
+ * @deprecated Since v13.4.0,v12.16.0 - Use `writableEnded`.
+ */
+ readonly finished: boolean;
+ /**
+ * True if headers were sent, false otherwise (read-only).
+ * @since v8.4.0
+ */
+ readonly headersSent: boolean;
+ /**
+ * A reference to the original HTTP2 `request` object.
+ * @since v15.7.0
+ */
+ readonly req: Http2ServerRequest;
+ /**
+ * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but
+ * applies getters, setters, and methods based on HTTP/2 logic.
+ *
+ * `destroyed`, `readable`, and `writable` properties will be retrieved from and
+ * set on `response.stream`.
+ *
+ * `destroy`, `emit`, `end`, `on` and `once` methods will be called on`response.stream`.
+ *
+ * `setTimeout` method will be called on `response.stream.session`.
+ *
+ * `pause`, `read`, `resume`, and `write` will throw an error with code`ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for
+ * more information.
+ *
+ * All other interactions will be routed directly to the socket.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const server = http2.createServer((req, res) => {
+ * const ip = req.socket.remoteAddress;
+ * const port = req.socket.remotePort;
+ * res.end(`Your IP address is ${ip} and your source port is ${port}.`);
+ * }).listen(3000);
+ * ```
+ * @since v8.4.0
+ */
+ readonly socket: net.Socket | tls.TLSSocket;
+ /**
+ * The `Http2Stream` object backing the response.
+ * @since v8.4.0
+ */
+ readonly stream: ServerHttp2Stream;
+ /**
+ * When true, the Date header will be automatically generated and sent in
+ * the response if it is not already present in the headers. Defaults to true.
+ *
+ * This should only be disabled for testing; HTTP requires the Date header
+ * in responses.
+ * @since v8.4.0
+ */
+ sendDate: boolean;
+ /**
+ * When using implicit headers (not calling `response.writeHead()` explicitly),
+ * this property controls the status code that will be sent to the client when
+ * the headers get flushed.
+ *
+ * ```js
+ * response.statusCode = 404;
+ * ```
+ *
+ * After response header was sent to the client, this property indicates the
+ * status code which was sent out.
+ * @since v8.4.0
+ */
+ statusCode: number;
+ /**
+ * Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns
+ * an empty string.
+ * @since v8.4.0
+ */
+ statusMessage: '';
+ /**
+ * This method adds HTTP trailing headers (a header but at the end of the
+ * message) to the response.
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ * @since v8.4.0
+ */
+ addTrailers(trailers: OutgoingHttpHeaders): void;
+ /**
+ * This method signals to the server that all of the response headers and body
+ * have been sent; that server should consider this message complete.
+ * The method, `response.end()`, MUST be called on each response.
+ *
+ * If `data` is specified, it is equivalent to calling `response.write(data, encoding)` followed by `response.end(callback)`.
+ *
+ * If `callback` is specified, it will be called when the response stream
+ * is finished.
+ * @since v8.4.0
+ */
+ end(callback?: () => void): this;
+ end(data: string | Uint8Array, callback?: () => void): this;
+ end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this;
+ /**
+ * Reads out a header that has already been queued but not sent to the client.
+ * The name is case-insensitive.
+ *
+ * ```js
+ * const contentType = response.getHeader('content-type');
+ * ```
+ * @since v8.4.0
+ */
+ getHeader(name: string): string;
+ /**
+ * Returns an array containing the unique names of the current outgoing headers.
+ * All header names are lowercase.
+ *
+ * ```js
+ * response.setHeader('Foo', 'bar');
+ * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+ *
+ * const headerNames = response.getHeaderNames();
+ * // headerNames === ['foo', 'set-cookie']
+ * ```
+ * @since v8.4.0
+ */
+ getHeaderNames(): string[];
+ /**
+ * Returns a shallow copy of the current outgoing headers. Since a shallow copy
+ * is used, array values may be mutated without additional calls to various
+ * header-related http module methods. The keys of the returned object are the
+ * header names and the values are the respective header values. All header names
+ * are lowercase.
+ *
+ * The object returned by the `response.getHeaders()` method _does not_prototypically inherit from the JavaScript `Object`. This means that typical`Object` methods such as `obj.toString()`,
+ * `obj.hasOwnProperty()`, and others
+ * are not defined and _will not work_.
+ *
+ * ```js
+ * response.setHeader('Foo', 'bar');
+ * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+ *
+ * const headers = response.getHeaders();
+ * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] }
+ * ```
+ * @since v8.4.0
+ */
+ getHeaders(): OutgoingHttpHeaders;
+ /**
+ * Returns `true` if the header identified by `name` is currently set in the
+ * outgoing headers. The header name matching is case-insensitive.
+ *
+ * ```js
+ * const hasContentType = response.hasHeader('content-type');
+ * ```
+ * @since v8.4.0
+ */
+ hasHeader(name: string): boolean;
+ /**
+ * Removes a header that has been queued for implicit sending.
+ *
+ * ```js
+ * response.removeHeader('Content-Encoding');
+ * ```
+ * @since v8.4.0
+ */
+ removeHeader(name: string): void;
+ /**
+ * Sets a single header value for implicit headers. If this header already exists
+ * in the to-be-sent headers, its value will be replaced. Use an array of strings
+ * here to send multiple headers with the same name.
+ *
+ * ```js
+ * response.setHeader('Content-Type', 'text/html; charset=utf-8');
+ * ```
+ *
+ * or
+ *
+ * ```js
+ * response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']);
+ * ```
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ *
+ * When headers have been set with `response.setHeader()`, they will be merged
+ * with any headers passed to `response.writeHead()`, with the headers passed
+ * to `response.writeHead()` given precedence.
+ *
+ * ```js
+ * // Returns content-type = text/plain
+ * const server = http2.createServer((req, res) => {
+ * res.setHeader('Content-Type', 'text/html; charset=utf-8');
+ * res.setHeader('X-Foo', 'bar');
+ * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
+ * res.end('ok');
+ * });
+ * ```
+ * @since v8.4.0
+ */
+ setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
+ /**
+ * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is
+ * provided, then it is added as a listener on the `'timeout'` event on
+ * the response object.
+ *
+ * If no `'timeout'` listener is added to the request, the response, or
+ * the server, then `Http2Stream` s are destroyed when they time out. If a
+ * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly.
+ * @since v8.4.0
+ */
+ setTimeout(msecs: number, callback?: () => void): void;
+ /**
+ * If this method is called and `response.writeHead()` has not been called,
+ * it will switch to implicit header mode and flush the implicit headers.
+ *
+ * This sends a chunk of the response body. This method may
+ * be called multiple times to provide successive parts of the body.
+ *
+ * In the `node:http` module, the response body is omitted when the
+ * request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body.
+ *
+ * `chunk` can be a string or a buffer. If `chunk` is a string,
+ * the second parameter specifies how to encode it into a byte stream.
+ * By default the `encoding` is `'utf8'`. `callback` will be called when this chunk
+ * of data is flushed.
+ *
+ * This is the raw HTTP body and has nothing to do with higher-level multi-part
+ * body encodings that may be used.
+ *
+ * The first time `response.write()` is called, it will send the buffered
+ * header information and the first chunk of the body to the client. The second
+ * time `response.write()` is called, Node.js assumes data will be streamed,
+ * and sends the new data separately. That is, the response is buffered up to the
+ * first chunk of the body.
+ *
+ * Returns `true` if the entire data was flushed successfully to the kernel
+ * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is free again.
+ * @since v8.4.0
+ */
+ write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean;
+ write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean;
+ /**
+ * Sends a status `100 Continue` to the client, indicating that the request body
+ * should be sent. See the `'checkContinue'` event on `Http2Server` and`Http2SecureServer`.
+ * @since v8.4.0
+ */
+ writeContinue(): void;
+ /**
+ * Sends a status `103 Early Hints` to the client with a Link header,
+ * indicating that the user agent can preload/preconnect the linked resources.
+ * The `hints` is an object containing the values of headers to be sent with
+ * early hints message.
+ *
+ * **Example**
+ *
+ * ```js
+ * const earlyHintsLink = '</styles.css>; rel=preload; as=style';
+ * response.writeEarlyHints({
+ * 'link': earlyHintsLink,
+ * });
+ *
+ * const earlyHintsLinks = [
+ * '</styles.css>; rel=preload; as=style',
+ * '</scripts.js>; rel=preload; as=script',
+ * ];
+ * response.writeEarlyHints({
+ * 'link': earlyHintsLinks,
+ * });
+ * ```
+ * @since v18.11.0
+ */
+ writeEarlyHints(hints: Record<string, string | string[]>): void;
+ /**
+ * Sends a response header to the request. The status code is a 3-digit HTTP
+ * status code, like `404`. The last argument, `headers`, are the response headers.
+ *
+ * Returns a reference to the `Http2ServerResponse`, so that calls can be chained.
+ *
+ * For compatibility with `HTTP/1`, a human-readable `statusMessage` may be
+ * passed as the second argument. However, because the `statusMessage` has no
+ * meaning within HTTP/2, the argument will have no effect and a process warning
+ * will be emitted.
+ *
+ * ```js
+ * const body = 'hello world';
+ * response.writeHead(200, {
+ * 'Content-Length': Buffer.byteLength(body),
+ * 'Content-Type': 'text/plain; charset=utf-8',
+ * });
+ * ```
+ *
+ * `Content-Length` is given in bytes not characters. The`Buffer.byteLength()` API may be used to determine the number of bytes in a
+ * given encoding. On outbound messages, Node.js does not check if Content-Length
+ * and the length of the body being transmitted are equal or not. However, when
+ * receiving messages, Node.js will automatically reject messages when the`Content-Length` does not match the actual payload size.
+ *
+ * This method may be called at most one time on a message before `response.end()` is called.
+ *
+ * If `response.write()` or `response.end()` are called before calling
+ * this, the implicit/mutable headers will be calculated and call this function.
+ *
+ * When headers have been set with `response.setHeader()`, they will be merged
+ * with any headers passed to `response.writeHead()`, with the headers passed
+ * to `response.writeHead()` given precedence.
+ *
+ * ```js
+ * // Returns content-type = text/plain
+ * const server = http2.createServer((req, res) => {
+ * res.setHeader('Content-Type', 'text/html; charset=utf-8');
+ * res.setHeader('X-Foo', 'bar');
+ * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
+ * res.end('ok');
+ * });
+ * ```
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ * @since v8.4.0
+ */
+ writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this;
+ writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this;
+ /**
+ * Call `http2stream.pushStream()` with the given headers, and wrap the
+ * given `Http2Stream` on a newly created `Http2ServerResponse` as the callback
+ * parameter if successful. When `Http2ServerRequest` is closed, the callback is
+ * called with an error `ERR_HTTP2_INVALID_STREAM`.
+ * @since v8.4.0
+ * @param headers An object describing the headers
+ * @param callback Called once `http2stream.pushStream()` is finished, or either when the attempt to create the pushed `Http2Stream` has failed or has been rejected, or the state of
+ * `Http2ServerRequest` is closed prior to calling the `http2stream.pushStream()` method
+ */
+ createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'error', listener: (error: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'error', error: Error): boolean;
+ emit(event: 'finish'): boolean;
+ emit(event: 'pipe', src: stream.Readable): boolean;
+ emit(event: 'unpipe', src: stream.Readable): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'error', listener: (error: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'error', listener: (error: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'error', listener: (error: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (error: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export namespace constants {
+ const NGHTTP2_SESSION_SERVER: number;
+ const NGHTTP2_SESSION_CLIENT: number;
+ const NGHTTP2_STREAM_STATE_IDLE: number;
+ const NGHTTP2_STREAM_STATE_OPEN: number;
+ const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number;
+ const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number;
+ const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number;
+ const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number;
+ const NGHTTP2_STREAM_STATE_CLOSED: number;
+ const NGHTTP2_NO_ERROR: number;
+ const NGHTTP2_PROTOCOL_ERROR: number;
+ const NGHTTP2_INTERNAL_ERROR: number;
+ const NGHTTP2_FLOW_CONTROL_ERROR: number;
+ const NGHTTP2_SETTINGS_TIMEOUT: number;
+ const NGHTTP2_STREAM_CLOSED: number;
+ const NGHTTP2_FRAME_SIZE_ERROR: number;
+ const NGHTTP2_REFUSED_STREAM: number;
+ const NGHTTP2_CANCEL: number;
+ const NGHTTP2_COMPRESSION_ERROR: number;
+ const NGHTTP2_CONNECT_ERROR: number;
+ const NGHTTP2_ENHANCE_YOUR_CALM: number;
+ const NGHTTP2_INADEQUATE_SECURITY: number;
+ const NGHTTP2_HTTP_1_1_REQUIRED: number;
+ const NGHTTP2_ERR_FRAME_SIZE_ERROR: number;
+ const NGHTTP2_FLAG_NONE: number;
+ const NGHTTP2_FLAG_END_STREAM: number;
+ const NGHTTP2_FLAG_END_HEADERS: number;
+ const NGHTTP2_FLAG_ACK: number;
+ const NGHTTP2_FLAG_PADDED: number;
+ const NGHTTP2_FLAG_PRIORITY: number;
+ const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number;
+ const DEFAULT_SETTINGS_ENABLE_PUSH: number;
+ const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number;
+ const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number;
+ const MAX_MAX_FRAME_SIZE: number;
+ const MIN_MAX_FRAME_SIZE: number;
+ const MAX_INITIAL_WINDOW_SIZE: number;
+ const NGHTTP2_DEFAULT_WEIGHT: number;
+ const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number;
+ const NGHTTP2_SETTINGS_ENABLE_PUSH: number;
+ const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number;
+ const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number;
+ const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number;
+ const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number;
+ const PADDING_STRATEGY_NONE: number;
+ const PADDING_STRATEGY_MAX: number;
+ const PADDING_STRATEGY_CALLBACK: number;
+ const HTTP2_HEADER_STATUS: string;
+ const HTTP2_HEADER_METHOD: string;
+ const HTTP2_HEADER_AUTHORITY: string;
+ const HTTP2_HEADER_SCHEME: string;
+ const HTTP2_HEADER_PATH: string;
+ const HTTP2_HEADER_ACCEPT_CHARSET: string;
+ const HTTP2_HEADER_ACCEPT_ENCODING: string;
+ const HTTP2_HEADER_ACCEPT_LANGUAGE: string;
+ const HTTP2_HEADER_ACCEPT_RANGES: string;
+ const HTTP2_HEADER_ACCEPT: string;
+ const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string;
+ const HTTP2_HEADER_AGE: string;
+ const HTTP2_HEADER_ALLOW: string;
+ const HTTP2_HEADER_AUTHORIZATION: string;
+ const HTTP2_HEADER_CACHE_CONTROL: string;
+ const HTTP2_HEADER_CONNECTION: string;
+ const HTTP2_HEADER_CONTENT_DISPOSITION: string;
+ const HTTP2_HEADER_CONTENT_ENCODING: string;
+ const HTTP2_HEADER_CONTENT_LANGUAGE: string;
+ const HTTP2_HEADER_CONTENT_LENGTH: string;
+ const HTTP2_HEADER_CONTENT_LOCATION: string;
+ const HTTP2_HEADER_CONTENT_MD5: string;
+ const HTTP2_HEADER_CONTENT_RANGE: string;
+ const HTTP2_HEADER_CONTENT_TYPE: string;
+ const HTTP2_HEADER_COOKIE: string;
+ const HTTP2_HEADER_DATE: string;
+ const HTTP2_HEADER_ETAG: string;
+ const HTTP2_HEADER_EXPECT: string;
+ const HTTP2_HEADER_EXPIRES: string;
+ const HTTP2_HEADER_FROM: string;
+ const HTTP2_HEADER_HOST: string;
+ const HTTP2_HEADER_IF_MATCH: string;
+ const HTTP2_HEADER_IF_MODIFIED_SINCE: string;
+ const HTTP2_HEADER_IF_NONE_MATCH: string;
+ const HTTP2_HEADER_IF_RANGE: string;
+ const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string;
+ const HTTP2_HEADER_LAST_MODIFIED: string;
+ const HTTP2_HEADER_LINK: string;
+ const HTTP2_HEADER_LOCATION: string;
+ const HTTP2_HEADER_MAX_FORWARDS: string;
+ const HTTP2_HEADER_PREFER: string;
+ const HTTP2_HEADER_PROXY_AUTHENTICATE: string;
+ const HTTP2_HEADER_PROXY_AUTHORIZATION: string;
+ const HTTP2_HEADER_RANGE: string;
+ const HTTP2_HEADER_REFERER: string;
+ const HTTP2_HEADER_REFRESH: string;
+ const HTTP2_HEADER_RETRY_AFTER: string;
+ const HTTP2_HEADER_SERVER: string;
+ const HTTP2_HEADER_SET_COOKIE: string;
+ const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string;
+ const HTTP2_HEADER_TRANSFER_ENCODING: string;
+ const HTTP2_HEADER_TE: string;
+ const HTTP2_HEADER_UPGRADE: string;
+ const HTTP2_HEADER_USER_AGENT: string;
+ const HTTP2_HEADER_VARY: string;
+ const HTTP2_HEADER_VIA: string;
+ const HTTP2_HEADER_WWW_AUTHENTICATE: string;
+ const HTTP2_HEADER_HTTP2_SETTINGS: string;
+ const HTTP2_HEADER_KEEP_ALIVE: string;
+ const HTTP2_HEADER_PROXY_CONNECTION: string;
+ const HTTP2_METHOD_ACL: string;
+ const HTTP2_METHOD_BASELINE_CONTROL: string;
+ const HTTP2_METHOD_BIND: string;
+ const HTTP2_METHOD_CHECKIN: string;
+ const HTTP2_METHOD_CHECKOUT: string;
+ const HTTP2_METHOD_CONNECT: string;
+ const HTTP2_METHOD_COPY: string;
+ const HTTP2_METHOD_DELETE: string;
+ const HTTP2_METHOD_GET: string;
+ const HTTP2_METHOD_HEAD: string;
+ const HTTP2_METHOD_LABEL: string;
+ const HTTP2_METHOD_LINK: string;
+ const HTTP2_METHOD_LOCK: string;
+ const HTTP2_METHOD_MERGE: string;
+ const HTTP2_METHOD_MKACTIVITY: string;
+ const HTTP2_METHOD_MKCALENDAR: string;
+ const HTTP2_METHOD_MKCOL: string;
+ const HTTP2_METHOD_MKREDIRECTREF: string;
+ const HTTP2_METHOD_MKWORKSPACE: string;
+ const HTTP2_METHOD_MOVE: string;
+ const HTTP2_METHOD_OPTIONS: string;
+ const HTTP2_METHOD_ORDERPATCH: string;
+ const HTTP2_METHOD_PATCH: string;
+ const HTTP2_METHOD_POST: string;
+ const HTTP2_METHOD_PRI: string;
+ const HTTP2_METHOD_PROPFIND: string;
+ const HTTP2_METHOD_PROPPATCH: string;
+ const HTTP2_METHOD_PUT: string;
+ const HTTP2_METHOD_REBIND: string;
+ const HTTP2_METHOD_REPORT: string;
+ const HTTP2_METHOD_SEARCH: string;
+ const HTTP2_METHOD_TRACE: string;
+ const HTTP2_METHOD_UNBIND: string;
+ const HTTP2_METHOD_UNCHECKOUT: string;
+ const HTTP2_METHOD_UNLINK: string;
+ const HTTP2_METHOD_UNLOCK: string;
+ const HTTP2_METHOD_UPDATE: string;
+ const HTTP2_METHOD_UPDATEREDIRECTREF: string;
+ const HTTP2_METHOD_VERSION_CONTROL: string;
+ const HTTP_STATUS_CONTINUE: number;
+ const HTTP_STATUS_SWITCHING_PROTOCOLS: number;
+ const HTTP_STATUS_PROCESSING: number;
+ const HTTP_STATUS_OK: number;
+ const HTTP_STATUS_CREATED: number;
+ const HTTP_STATUS_ACCEPTED: number;
+ const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number;
+ const HTTP_STATUS_NO_CONTENT: number;
+ const HTTP_STATUS_RESET_CONTENT: number;
+ const HTTP_STATUS_PARTIAL_CONTENT: number;
+ const HTTP_STATUS_MULTI_STATUS: number;
+ const HTTP_STATUS_ALREADY_REPORTED: number;
+ const HTTP_STATUS_IM_USED: number;
+ const HTTP_STATUS_MULTIPLE_CHOICES: number;
+ const HTTP_STATUS_MOVED_PERMANENTLY: number;
+ const HTTP_STATUS_FOUND: number;
+ const HTTP_STATUS_SEE_OTHER: number;
+ const HTTP_STATUS_NOT_MODIFIED: number;
+ const HTTP_STATUS_USE_PROXY: number;
+ const HTTP_STATUS_TEMPORARY_REDIRECT: number;
+ const HTTP_STATUS_PERMANENT_REDIRECT: number;
+ const HTTP_STATUS_BAD_REQUEST: number;
+ const HTTP_STATUS_UNAUTHORIZED: number;
+ const HTTP_STATUS_PAYMENT_REQUIRED: number;
+ const HTTP_STATUS_FORBIDDEN: number;
+ const HTTP_STATUS_NOT_FOUND: number;
+ const HTTP_STATUS_METHOD_NOT_ALLOWED: number;
+ const HTTP_STATUS_NOT_ACCEPTABLE: number;
+ const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number;
+ const HTTP_STATUS_REQUEST_TIMEOUT: number;
+ const HTTP_STATUS_CONFLICT: number;
+ const HTTP_STATUS_GONE: number;
+ const HTTP_STATUS_LENGTH_REQUIRED: number;
+ const HTTP_STATUS_PRECONDITION_FAILED: number;
+ const HTTP_STATUS_PAYLOAD_TOO_LARGE: number;
+ const HTTP_STATUS_URI_TOO_LONG: number;
+ const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number;
+ const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number;
+ const HTTP_STATUS_EXPECTATION_FAILED: number;
+ const HTTP_STATUS_TEAPOT: number;
+ const HTTP_STATUS_MISDIRECTED_REQUEST: number;
+ const HTTP_STATUS_UNPROCESSABLE_ENTITY: number;
+ const HTTP_STATUS_LOCKED: number;
+ const HTTP_STATUS_FAILED_DEPENDENCY: number;
+ const HTTP_STATUS_UNORDERED_COLLECTION: number;
+ const HTTP_STATUS_UPGRADE_REQUIRED: number;
+ const HTTP_STATUS_PRECONDITION_REQUIRED: number;
+ const HTTP_STATUS_TOO_MANY_REQUESTS: number;
+ const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number;
+ const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number;
+ const HTTP_STATUS_INTERNAL_SERVER_ERROR: number;
+ const HTTP_STATUS_NOT_IMPLEMENTED: number;
+ const HTTP_STATUS_BAD_GATEWAY: number;
+ const HTTP_STATUS_SERVICE_UNAVAILABLE: number;
+ const HTTP_STATUS_GATEWAY_TIMEOUT: number;
+ const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number;
+ const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number;
+ const HTTP_STATUS_INSUFFICIENT_STORAGE: number;
+ const HTTP_STATUS_LOOP_DETECTED: number;
+ const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number;
+ const HTTP_STATUS_NOT_EXTENDED: number;
+ const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number;
+ }
+ /**
+ * This symbol can be set as a property on the HTTP/2 headers object with
+ * an array value in order to provide a list of headers considered sensitive.
+ */
+ export const sensitiveHeaders: symbol;
+ /**
+ * Returns an object containing the default settings for an `Http2Session`instance. This method returns a new object instance every time it is called
+ * so instances returned may be safely modified for use.
+ * @since v8.4.0
+ */
+ export function getDefaultSettings(): Settings;
+ /**
+ * Returns a `Buffer` instance containing serialized representation of the given
+ * HTTP/2 settings as specified in the [HTTP/2](https://tools.ietf.org/html/rfc7540) specification. This is intended
+ * for use with the `HTTP2-Settings` header field.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ *
+ * const packed = http2.getPackedSettings({ enablePush: false });
+ *
+ * console.log(packed.toString('base64'));
+ * // Prints: AAIAAAAA
+ * ```
+ * @since v8.4.0
+ */
+ export function getPackedSettings(settings: Settings): Buffer;
+ /**
+ * Returns a `HTTP/2 Settings Object` containing the deserialized settings from
+ * the given `Buffer` as generated by `http2.getPackedSettings()`.
+ * @since v8.4.0
+ * @param buf The packed settings.
+ */
+ export function getUnpackedSettings(buf: Uint8Array): Settings;
+ /**
+ * Returns a `net.Server` instance that creates and manages `Http2Session`instances.
+ *
+ * Since there are no browsers known that support [unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when
+ * communicating
+ * with browser clients.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ *
+ * // Create an unencrypted HTTP/2 server.
+ * // Since there are no browsers known that support
+ * // unencrypted HTTP/2, the use of `http2.createSecureServer()`
+ * // is necessary when communicating with browser clients.
+ * const server = http2.createServer();
+ *
+ * server.on('stream', (stream, headers) => {
+ * stream.respond({
+ * 'content-type': 'text/html; charset=utf-8',
+ * ':status': 200,
+ * });
+ * stream.end('<h1>Hello World</h1>');
+ * });
+ *
+ * server.listen(8000);
+ * ```
+ * @since v8.4.0
+ * @param onRequestHandler See `Compatibility API`
+ */
+ export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
+ export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
+ /**
+ * Returns a `tls.Server` instance that creates and manages `Http2Session`instances.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const fs = require('node:fs');
+ *
+ * const options = {
+ * key: fs.readFileSync('server-key.pem'),
+ * cert: fs.readFileSync('server-cert.pem'),
+ * };
+ *
+ * // Create a secure HTTP/2 server
+ * const server = http2.createSecureServer(options);
+ *
+ * server.on('stream', (stream, headers) => {
+ * stream.respond({
+ * 'content-type': 'text/html; charset=utf-8',
+ * ':status': 200,
+ * });
+ * stream.end('<h1>Hello World</h1>');
+ * });
+ *
+ * server.listen(8443);
+ * ```
+ * @since v8.4.0
+ * @param onRequestHandler See `Compatibility API`
+ */
+ export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
+ export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
+ /**
+ * Returns a `ClientHttp2Session` instance.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const client = http2.connect('https://localhost:1234');
+ *
+ * // Use the client
+ *
+ * client.close();
+ * ```
+ * @since v8.4.0
+ * @param authority The remote HTTP/2 server to connect to. This must be in the form of a minimal, valid URL with the `http://` or `https://` prefix, host name, and IP port (if a non-default port
+ * is used). Userinfo (user ID and password), path, querystring, and fragment details in the URL will be ignored.
+ * @param listener Will be registered as a one-time listener of the {@link 'connect'} event.
+ */
+ export function connect(authority: string | url.URL, listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session;
+ export function connect(
+ authority: string | url.URL,
+ options?: ClientSessionOptions | SecureClientSessionOptions,
+ listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void
+ ): ClientHttp2Session;
+}
+declare module 'node:http2' {
+ export * from 'http2';
+}
diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts
new file mode 100755
index 0000000..76fca92
--- /dev/null
+++ b/node_modules/@types/node/https.d.ts
@@ -0,0 +1,441 @@
+/**
+ * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
+ * separate module.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/https.js)
+ */
+declare module 'https' {
+ import { Duplex } from 'node:stream';
+ import * as tls from 'node:tls';
+ import * as http from 'node:http';
+ import { URL } from 'node:url';
+ type ServerOptions<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ > = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions<Request, Response>;
+ type RequestOptions = http.RequestOptions &
+ tls.SecureContextOptions & {
+ checkServerIdentity?: typeof tls.checkServerIdentity | undefined;
+ rejectUnauthorized?: boolean | undefined; // Defaults to true
+ servername?: string | undefined; // SNI TLS Extension
+ };
+ interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
+ rejectUnauthorized?: boolean | undefined;
+ maxCachedSessions?: number | undefined;
+ }
+ /**
+ * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information.
+ * @since v0.4.5
+ */
+ class Agent extends http.Agent {
+ constructor(options?: AgentOptions);
+ options: AgentOptions;
+ }
+ interface Server<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ > extends http.Server<Request, Response> {}
+ /**
+ * See `http.Server` for more information.
+ * @since v0.3.4
+ */
+ class Server<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ > extends tls.Server {
+ constructor(requestListener?: http.RequestListener<Request, Response>);
+ constructor(
+ options: ServerOptions<Request, Response>,
+ requestListener?: http.RequestListener<Request, Response>,
+ );
+ /**
+ * Closes all connections connected to this server.
+ * @since v18.2.0
+ */
+ closeAllConnections(): void;
+ /**
+ * Closes all connections connected to this server which are not sending a request or waiting for a response.
+ * @since v18.2.0
+ */
+ closeIdleConnections(): void;
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
+ addListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ addListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
+ addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'connection', listener: (socket: Duplex) => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'listening', listener: () => void): this;
+ addListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ addListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ addListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ addListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ addListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ emit(event: string, ...args: any[]): boolean;
+ emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean;
+ emit(event: 'newSession', sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean;
+ emit(event: 'OCSPRequest', certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean;
+ emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;
+ emit(event: 'secureConnection', tlsSocket: tls.TLSSocket): boolean;
+ emit(event: 'tlsClientError', err: Error, tlsSocket: tls.TLSSocket): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'connection', socket: Duplex): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'listening'): boolean;
+ emit(
+ event: 'checkContinue',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & {
+ req: InstanceType<Request>;
+ }
+ ): boolean;
+ emit(
+ event: 'checkExpectation',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & {
+ req: InstanceType<Request>;
+ }
+ ): boolean;
+ emit(event: 'clientError', err: Error, socket: Duplex): boolean;
+ emit(event: 'connect', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
+ emit(
+ event: 'request',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & {
+ req: InstanceType<Request>;
+ }
+ ): boolean;
+ emit(event: 'upgrade', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ on(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
+ on(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ on(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
+ on(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ on(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'connection', listener: (socket: Duplex) => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'listening', listener: () => void): this;
+ on(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ on(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ on(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ on(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ on(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
+ once(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ once(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
+ once(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ once(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'connection', listener: (socket: Duplex) => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'listening', listener: () => void): this;
+ once(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ once(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ once(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ once(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ once(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ once(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ prependListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
+ prependListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ prependListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
+ prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'connection', listener: (socket: Duplex) => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'listening', listener: () => void): this;
+ prependListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ prependListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ prependListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ prependListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ prependListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
+ prependOnceListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ prependOnceListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
+ prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'connection', listener: (socket: Duplex) => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'listening', listener: () => void): this;
+ prependOnceListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ prependOnceListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ prependOnceListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ }
+ /**
+ * ```js
+ * // curl -k https://localhost:8000/
+ * const https = require('node:https');
+ * const fs = require('node:fs');
+ *
+ * const options = {
+ * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
+ * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
+ * };
+ *
+ * https.createServer(options, (req, res) => {
+ * res.writeHead(200);
+ * res.end('hello world\n');
+ * }).listen(8000);
+ * ```
+ *
+ * Or
+ *
+ * ```js
+ * const https = require('node:https');
+ * const fs = require('node:fs');
+ *
+ * const options = {
+ * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'),
+ * passphrase: 'sample',
+ * };
+ *
+ * https.createServer(options, (req, res) => {
+ * res.writeHead(200);
+ * res.end('hello world\n');
+ * }).listen(8000);
+ * ```
+ * @since v0.3.4
+ * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`.
+ * @param requestListener A listener to be added to the `'request'` event.
+ */
+ function createServer<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ >(requestListener?: http.RequestListener<Request, Response>): Server<Request, Response>;
+ function createServer<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ >(
+ options: ServerOptions<Request, Response>,
+ requestListener?: http.RequestListener<Request, Response>,
+ ): Server<Request, Response>;
+ /**
+ * Makes a request to a secure web server.
+ *
+ * The following additional `options` from `tls.connect()` are also accepted:`ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`,`honorCipherOrder`, `key`, `passphrase`,
+ * `pfx`, `rejectUnauthorized`,`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`,`highWaterMark`.
+ *
+ * `options` can be an object, a string, or a `URL` object. If `options` is a
+ * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
+ *
+ * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to
+ * upload a file with a POST request, then write to the `ClientRequest` object.
+ *
+ * ```js
+ * const https = require('node:https');
+ *
+ * const options = {
+ * hostname: 'encrypted.google.com',
+ * port: 443,
+ * path: '/',
+ * method: 'GET',
+ * };
+ *
+ * const req = https.request(options, (res) => {
+ * console.log('statusCode:', res.statusCode);
+ * console.log('headers:', res.headers);
+ *
+ * res.on('data', (d) => {
+ * process.stdout.write(d);
+ * });
+ * });
+ *
+ * req.on('error', (e) => {
+ * console.error(e);
+ * });
+ * req.end();
+ * ```
+ *
+ * Example using options from `tls.connect()`:
+ *
+ * ```js
+ * const options = {
+ * hostname: 'encrypted.google.com',
+ * port: 443,
+ * path: '/',
+ * method: 'GET',
+ * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
+ * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
+ * };
+ * options.agent = new https.Agent(options);
+ *
+ * const req = https.request(options, (res) => {
+ * // ...
+ * });
+ * ```
+ *
+ * Alternatively, opt out of connection pooling by not using an `Agent`.
+ *
+ * ```js
+ * const options = {
+ * hostname: 'encrypted.google.com',
+ * port: 443,
+ * path: '/',
+ * method: 'GET',
+ * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
+ * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
+ * agent: false,
+ * };
+ *
+ * const req = https.request(options, (res) => {
+ * // ...
+ * });
+ * ```
+ *
+ * Example using a `URL` as `options`:
+ *
+ * ```js
+ * const options = new URL('https://abc:xyz@example.com');
+ *
+ * const req = https.request(options, (res) => {
+ * // ...
+ * });
+ * ```
+ *
+ * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`):
+ *
+ * ```js
+ * const tls = require('node:tls');
+ * const https = require('node:https');
+ * const crypto = require('node:crypto');
+ *
+ * function sha256(s) {
+ * return crypto.createHash('sha256').update(s).digest('base64');
+ * }
+ * const options = {
+ * hostname: 'github.com',
+ * port: 443,
+ * path: '/',
+ * method: 'GET',
+ * checkServerIdentity: function(host, cert) {
+ * // Make sure the certificate is issued to the host we are connected to
+ * const err = tls.checkServerIdentity(host, cert);
+ * if (err) {
+ * return err;
+ * }
+ *
+ * // Pin the public key, similar to HPKP pin-sha256 pinning
+ * const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=';
+ * if (sha256(cert.pubkey) !== pubkey256) {
+ * const msg = 'Certificate verification error: ' +
+ * `The public key of '${cert.subject.CN}' ` +
+ * 'does not match our pinned fingerprint';
+ * return new Error(msg);
+ * }
+ *
+ * // Pin the exact certificate, rather than the pub key
+ * const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' +
+ * 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16';
+ * if (cert.fingerprint256 !== cert256) {
+ * const msg = 'Certificate verification error: ' +
+ * `The certificate of '${cert.subject.CN}' ` +
+ * 'does not match our pinned fingerprint';
+ * return new Error(msg);
+ * }
+ *
+ * // This loop is informational only.
+ * // Print the certificate and public key fingerprints of all certs in the
+ * // chain. Its common to pin the public key of the issuer on the public
+ * // internet, while pinning the public key of the service in sensitive
+ * // environments.
+ * do {
+ * console.log('Subject Common Name:', cert.subject.CN);
+ * console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256);
+ *
+ * hash = crypto.createHash('sha256');
+ * console.log(' Public key ping-sha256:', sha256(cert.pubkey));
+ *
+ * lastprint256 = cert.fingerprint256;
+ * cert = cert.issuerCertificate;
+ * } while (cert.fingerprint256 !== lastprint256);
+ *
+ * },
+ * };
+ *
+ * options.agent = new https.Agent(options);
+ * const req = https.request(options, (res) => {
+ * console.log('All OK. Server matched our pinned cert or public key');
+ * console.log('statusCode:', res.statusCode);
+ * // Print the HPKP values
+ * console.log('headers:', res.headers['public-key-pins']);
+ *
+ * res.on('data', (d) => {});
+ * });
+ *
+ * req.on('error', (e) => {
+ * console.error(e.message);
+ * });
+ * req.end();
+ * ```
+ *
+ * Outputs for example:
+ *
+ * ```text
+ * Subject Common Name: github.com
+ * Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16
+ * Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=
+ * Subject Common Name: DigiCert SHA2 Extended Validation Server CA
+ * Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A
+ * Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=
+ * Subject Common Name: DigiCert High Assurance EV Root CA
+ * Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF
+ * Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=
+ * All OK. Server matched our pinned cert or public key
+ * statusCode: 200
+ * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=";
+ * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4=";
+ * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains
+ * ```
+ * @since v0.3.6
+ * @param options Accepts all `options` from `request`, with some differences in default values:
+ */
+ function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
+ function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
+ /**
+ * Like `http.get()` but for HTTPS.
+ *
+ * `options` can be an object, a string, or a `URL` object. If `options` is a
+ * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
+ *
+ * ```js
+ * const https = require('node:https');
+ *
+ * https.get('https://encrypted.google.com/', (res) => {
+ * console.log('statusCode:', res.statusCode);
+ * console.log('headers:', res.headers);
+ *
+ * res.on('data', (d) => {
+ * process.stdout.write(d);
+ * });
+ *
+ * }).on('error', (e) => {
+ * console.error(e);
+ * });
+ * ```
+ * @since v0.3.6
+ * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`.
+ */
+ function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
+ function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
+ let globalAgent: Agent;
+}
+declare module 'node:https' {
+ export * from 'https';
+}
diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts
new file mode 100755
index 0000000..baadcd8
--- /dev/null
+++ b/node_modules/@types/node/index.d.ts
@@ -0,0 +1,133 @@
+// Type definitions for non-npm package Node.js 20.5
+// Project: https://nodejs.org/
+// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
+// DefinitelyTyped <https://github.com/DefinitelyTyped>
+// Alberto Schiabel <https://github.com/jkomyno>
+// Alvis HT Tang <https://github.com/alvis>
+// Andrew Makarov <https://github.com/r3nya>
+// Benjamin Toueg <https://github.com/btoueg>
+// Chigozirim C. <https://github.com/smac89>
+// David Junger <https://github.com/touffy>
+// Deividas Bakanas <https://github.com/DeividasBakanas>
+// Eugene Y. Q. Shen <https://github.com/eyqs>
+// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
+// Huw <https://github.com/hoo29>
+// Kelvin Jin <https://github.com/kjin>
+// Klaus Meinhardt <https://github.com/ajafff>
+// Lishude <https://github.com/islishude>
+// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
+// Mohsen Azimi <https://github.com/mohsen1>
+// Nicolas Even <https://github.com/n-e>
+// Nikita Galkin <https://github.com/galkin>
+// Parambir Singh <https://github.com/parambirs>
+// Sebastian Silbermann <https://github.com/eps1lon>
+// Thomas den Hollander <https://github.com/ThomasdenH>
+// Wilco Bakker <https://github.com/WilcoBakker>
+// wwwy3y3 <https://github.com/wwwy3y3>
+// Samuel Ainsworth <https://github.com/samuela>
+// Kyle Uehlein <https://github.com/kuehlein>
+// Thanik Bhongbhibhat <https://github.com/bhongy>
+// Marcin Kopacz <https://github.com/chyzwar>
+// Trivikram Kamat <https://github.com/trivikr>
+// Junxiao Shi <https://github.com/yoursunny>
+// Ilia Baryshnikov <https://github.com/qwelias>
+// ExE Boss <https://github.com/ExE-Boss>
+// Piotr Błażejewicz <https://github.com/peterblazejewicz>
+// Anna Henningsen <https://github.com/addaleax>
+// Victor Perin <https://github.com/victorperin>
+// Yongsheng Zhang <https://github.com/ZYSzys>
+// NodeJS Contributors <https://github.com/NodeJS>
+// Linus Unnebäck <https://github.com/LinusU>
+// wafuwafu13 <https://github.com/wafuwafu13>
+// Matteo Collina <https://github.com/mcollina>
+// Dmitry Semigradsky <https://github.com/Semigradsky>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/**
+ * License for programmatically and manually incorporated
+ * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc
+ *
+ * Copyright Node.js contributors. All rights reserved.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+// NOTE: These definitions support NodeJS and TypeScript 4.9+.
+
+// Reference required types from the default lib:
+/// <reference lib="es2020" />
+/// <reference lib="esnext.asynciterable" />
+/// <reference lib="esnext.intl" />
+/// <reference lib="esnext.bigint" />
+
+// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
+/// <reference path="assert.d.ts" />
+/// <reference path="assert/strict.d.ts" />
+/// <reference path="globals.d.ts" />
+/// <reference path="async_hooks.d.ts" />
+/// <reference path="buffer.d.ts" />
+/// <reference path="child_process.d.ts" />
+/// <reference path="cluster.d.ts" />
+/// <reference path="console.d.ts" />
+/// <reference path="constants.d.ts" />
+/// <reference path="crypto.d.ts" />
+/// <reference path="dgram.d.ts" />
+/// <reference path="diagnostics_channel.d.ts" />
+/// <reference path="dns.d.ts" />
+/// <reference path="dns/promises.d.ts" />
+/// <reference path="dns/promises.d.ts" />
+/// <reference path="domain.d.ts" />
+/// <reference path="dom-events.d.ts" />
+/// <reference path="events.d.ts" />
+/// <reference path="fs.d.ts" />
+/// <reference path="fs/promises.d.ts" />
+/// <reference path="http.d.ts" />
+/// <reference path="http2.d.ts" />
+/// <reference path="https.d.ts" />
+/// <reference path="inspector.d.ts" />
+/// <reference path="module.d.ts" />
+/// <reference path="net.d.ts" />
+/// <reference path="os.d.ts" />
+/// <reference path="path.d.ts" />
+/// <reference path="perf_hooks.d.ts" />
+/// <reference path="process.d.ts" />
+/// <reference path="punycode.d.ts" />
+/// <reference path="querystring.d.ts" />
+/// <reference path="readline.d.ts" />
+/// <reference path="readline/promises.d.ts" />
+/// <reference path="repl.d.ts" />
+/// <reference path="stream.d.ts" />
+/// <reference path="stream/promises.d.ts" />
+/// <reference path="stream/consumers.d.ts" />
+/// <reference path="stream/web.d.ts" />
+/// <reference path="string_decoder.d.ts" />
+/// <reference path="test.d.ts" />
+/// <reference path="timers.d.ts" />
+/// <reference path="timers/promises.d.ts" />
+/// <reference path="tls.d.ts" />
+/// <reference path="trace_events.d.ts" />
+/// <reference path="tty.d.ts" />
+/// <reference path="url.d.ts" />
+/// <reference path="util.d.ts" />
+/// <reference path="v8.d.ts" />
+/// <reference path="vm.d.ts" />
+/// <reference path="wasi.d.ts" />
+/// <reference path="worker_threads.d.ts" />
+/// <reference path="zlib.d.ts" />
+
+/// <reference path="globals.global.d.ts" />
diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts
new file mode 100755
index 0000000..dbe0374
--- /dev/null
+++ b/node_modules/@types/node/inspector.d.ts
@@ -0,0 +1,2747 @@
+// eslint-disable-next-line @definitelytyped/dt-header
+// Type definitions for inspector
+
+// These definitions are auto-generated.
+// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330
+// for more information.
+
+
+/**
+ * The `node:inspector` module provides an API for interacting with the V8
+ * inspector.
+ *
+ * It can be accessed using:
+ *
+ * ```js
+ * import * as inspector from 'node:inspector/promises';
+ * ```
+ *
+ * or
+ *
+ * ```js
+ * import * as inspector from 'node:inspector';
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/inspector.js)
+ */
+declare module 'inspector' {
+ import EventEmitter = require('node:events');
+ interface InspectorNotification<T> {
+ method: string;
+ params: T;
+ }
+ namespace Schema {
+ /**
+ * Description of the protocol domain.
+ */
+ interface Domain {
+ /**
+ * Domain name.
+ */
+ name: string;
+ /**
+ * Domain version.
+ */
+ version: string;
+ }
+ interface GetDomainsReturnType {
+ /**
+ * List of supported domains.
+ */
+ domains: Domain[];
+ }
+ }
+ namespace Runtime {
+ /**
+ * Unique script identifier.
+ */
+ type ScriptId = string;
+ /**
+ * Unique object identifier.
+ */
+ type RemoteObjectId = string;
+ /**
+ * Primitive value which cannot be JSON-stringified.
+ */
+ type UnserializableValue = string;
+ /**
+ * Mirror object referencing original JavaScript object.
+ */
+ interface RemoteObject {
+ /**
+ * Object type.
+ */
+ type: string;
+ /**
+ * Object subtype hint. Specified for <code>object</code> type values only.
+ */
+ subtype?: string | undefined;
+ /**
+ * Object class (constructor) name. Specified for <code>object</code> type values only.
+ */
+ className?: string | undefined;
+ /**
+ * Remote object value in case of primitive values or JSON values (if it was requested).
+ */
+ value?: any;
+ /**
+ * Primitive value which can not be JSON-stringified does not have <code>value</code>, but gets this property.
+ */
+ unserializableValue?: UnserializableValue | undefined;
+ /**
+ * String representation of the object.
+ */
+ description?: string | undefined;
+ /**
+ * Unique object identifier (for non-primitive values).
+ */
+ objectId?: RemoteObjectId | undefined;
+ /**
+ * Preview containing abbreviated property values. Specified for <code>object</code> type values only.
+ * @experimental
+ */
+ preview?: ObjectPreview | undefined;
+ /**
+ * @experimental
+ */
+ customPreview?: CustomPreview | undefined;
+ }
+ /**
+ * @experimental
+ */
+ interface CustomPreview {
+ header: string;
+ hasBody: boolean;
+ formatterObjectId: RemoteObjectId;
+ bindRemoteObjectFunctionId: RemoteObjectId;
+ configObjectId?: RemoteObjectId | undefined;
+ }
+ /**
+ * Object containing abbreviated remote object value.
+ * @experimental
+ */
+ interface ObjectPreview {
+ /**
+ * Object type.
+ */
+ type: string;
+ /**
+ * Object subtype hint. Specified for <code>object</code> type values only.
+ */
+ subtype?: string | undefined;
+ /**
+ * String representation of the object.
+ */
+ description?: string | undefined;
+ /**
+ * True iff some of the properties or entries of the original object did not fit.
+ */
+ overflow: boolean;
+ /**
+ * List of the properties.
+ */
+ properties: PropertyPreview[];
+ /**
+ * List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only.
+ */
+ entries?: EntryPreview[] | undefined;
+ }
+ /**
+ * @experimental
+ */
+ interface PropertyPreview {
+ /**
+ * Property name.
+ */
+ name: string;
+ /**
+ * Object type. Accessor means that the property itself is an accessor property.
+ */
+ type: string;
+ /**
+ * User-friendly property value string.
+ */
+ value?: string | undefined;
+ /**
+ * Nested value preview.
+ */
+ valuePreview?: ObjectPreview | undefined;
+ /**
+ * Object subtype hint. Specified for <code>object</code> type values only.
+ */
+ subtype?: string | undefined;
+ }
+ /**
+ * @experimental
+ */
+ interface EntryPreview {
+ /**
+ * Preview of the key. Specified for map-like collection entries.
+ */
+ key?: ObjectPreview | undefined;
+ /**
+ * Preview of the value.
+ */
+ value: ObjectPreview;
+ }
+ /**
+ * Object property descriptor.
+ */
+ interface PropertyDescriptor {
+ /**
+ * Property name or symbol description.
+ */
+ name: string;
+ /**
+ * The value associated with the property.
+ */
+ value?: RemoteObject | undefined;
+ /**
+ * True if the value associated with the property may be changed (data descriptors only).
+ */
+ writable?: boolean | undefined;
+ /**
+ * A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only).
+ */
+ get?: RemoteObject | undefined;
+ /**
+ * A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only).
+ */
+ set?: RemoteObject | undefined;
+ /**
+ * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
+ */
+ configurable: boolean;
+ /**
+ * True if this property shows up during enumeration of the properties on the corresponding object.
+ */
+ enumerable: boolean;
+ /**
+ * True if the result was thrown during the evaluation.
+ */
+ wasThrown?: boolean | undefined;
+ /**
+ * True if the property is owned for the object.
+ */
+ isOwn?: boolean | undefined;
+ /**
+ * Property symbol object, if the property is of the <code>symbol</code> type.
+ */
+ symbol?: RemoteObject | undefined;
+ }
+ /**
+ * Object internal property descriptor. This property isn't normally visible in JavaScript code.
+ */
+ interface InternalPropertyDescriptor {
+ /**
+ * Conventional property name.
+ */
+ name: string;
+ /**
+ * The value associated with the property.
+ */
+ value?: RemoteObject | undefined;
+ }
+ /**
+ * Represents function call argument. Either remote object id <code>objectId</code>, primitive <code>value</code>, unserializable primitive value or neither of (for undefined) them should be specified.
+ */
+ interface CallArgument {
+ /**
+ * Primitive value or serializable javascript object.
+ */
+ value?: any;
+ /**
+ * Primitive value which can not be JSON-stringified.
+ */
+ unserializableValue?: UnserializableValue | undefined;
+ /**
+ * Remote object handle.
+ */
+ objectId?: RemoteObjectId | undefined;
+ }
+ /**
+ * Id of an execution context.
+ */
+ type ExecutionContextId = number;
+ /**
+ * Description of an isolated world.
+ */
+ interface ExecutionContextDescription {
+ /**
+ * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.
+ */
+ id: ExecutionContextId;
+ /**
+ * Execution context origin.
+ */
+ origin: string;
+ /**
+ * Human readable name describing given context.
+ */
+ name: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ auxData?: {} | undefined;
+ }
+ /**
+ * Detailed information about exception (or error) that was thrown during script compilation or execution.
+ */
+ interface ExceptionDetails {
+ /**
+ * Exception id.
+ */
+ exceptionId: number;
+ /**
+ * Exception text, which should be used together with exception object when available.
+ */
+ text: string;
+ /**
+ * Line number of the exception location (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number of the exception location (0-based).
+ */
+ columnNumber: number;
+ /**
+ * Script ID of the exception location.
+ */
+ scriptId?: ScriptId | undefined;
+ /**
+ * URL of the exception location, to be used when the script was not reported.
+ */
+ url?: string | undefined;
+ /**
+ * JavaScript stack trace if available.
+ */
+ stackTrace?: StackTrace | undefined;
+ /**
+ * Exception object if available.
+ */
+ exception?: RemoteObject | undefined;
+ /**
+ * Identifier of the context where exception happened.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ }
+ /**
+ * Number of milliseconds since epoch.
+ */
+ type Timestamp = number;
+ /**
+ * Stack entry for runtime errors and assertions.
+ */
+ interface CallFrame {
+ /**
+ * JavaScript function name.
+ */
+ functionName: string;
+ /**
+ * JavaScript script id.
+ */
+ scriptId: ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * JavaScript script line number (0-based).
+ */
+ lineNumber: number;
+ /**
+ * JavaScript script column number (0-based).
+ */
+ columnNumber: number;
+ }
+ /**
+ * Call frames for assertions or error messages.
+ */
+ interface StackTrace {
+ /**
+ * String label of this stack trace. For async traces this may be a name of the function that initiated the async call.
+ */
+ description?: string | undefined;
+ /**
+ * JavaScript function name.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Asynchronous JavaScript stack trace that preceded this stack, if available.
+ */
+ parent?: StackTrace | undefined;
+ /**
+ * Asynchronous JavaScript stack trace that preceded this stack, if available.
+ * @experimental
+ */
+ parentId?: StackTraceId | undefined;
+ }
+ /**
+ * Unique identifier of current debugger.
+ * @experimental
+ */
+ type UniqueDebuggerId = string;
+ /**
+ * If <code>debuggerId</code> is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See <code>Runtime.StackTrace</code> and <code>Debugger.paused</code> for usages.
+ * @experimental
+ */
+ interface StackTraceId {
+ id: string;
+ debuggerId?: UniqueDebuggerId | undefined;
+ }
+ interface EvaluateParameterType {
+ /**
+ * Expression to evaluate.
+ */
+ expression: string;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string | undefined;
+ /**
+ * Determines whether Command Line API should be available during the evaluation.
+ */
+ includeCommandLineAPI?: boolean | undefined;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean | undefined;
+ /**
+ * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+ */
+ contextId?: ExecutionContextId | undefined;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean | undefined;
+ /**
+ * Whether execution should be treated as initiated by user in the UI.
+ */
+ userGesture?: boolean | undefined;
+ /**
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+ */
+ awaitPromise?: boolean | undefined;
+ }
+ interface AwaitPromiseParameterType {
+ /**
+ * Identifier of the promise.
+ */
+ promiseObjectId: RemoteObjectId;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ */
+ generatePreview?: boolean | undefined;
+ }
+ interface CallFunctionOnParameterType {
+ /**
+ * Declaration of the function to call.
+ */
+ functionDeclaration: string;
+ /**
+ * Identifier of the object to call function on. Either objectId or executionContextId should be specified.
+ */
+ objectId?: RemoteObjectId | undefined;
+ /**
+ * Call arguments. All call arguments must belong to the same JavaScript world as the target object.
+ */
+ arguments?: CallArgument[] | undefined;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean | undefined;
+ /**
+ * Whether the result is expected to be a JSON object which should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean | undefined;
+ /**
+ * Whether execution should be treated as initiated by user in the UI.
+ */
+ userGesture?: boolean | undefined;
+ /**
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+ */
+ awaitPromise?: boolean | undefined;
+ /**
+ * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ /**
+ * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.
+ */
+ objectGroup?: string | undefined;
+ }
+ interface GetPropertiesParameterType {
+ /**
+ * Identifier of the object to return properties for.
+ */
+ objectId: RemoteObjectId;
+ /**
+ * If true, returns properties belonging only to the element itself, not to its prototype chain.
+ */
+ ownProperties?: boolean | undefined;
+ /**
+ * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
+ * @experimental
+ */
+ accessorPropertiesOnly?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the results.
+ * @experimental
+ */
+ generatePreview?: boolean | undefined;
+ }
+ interface ReleaseObjectParameterType {
+ /**
+ * Identifier of the object to release.
+ */
+ objectId: RemoteObjectId;
+ }
+ interface ReleaseObjectGroupParameterType {
+ /**
+ * Symbolic object group name.
+ */
+ objectGroup: string;
+ }
+ interface SetCustomObjectFormatterEnabledParameterType {
+ enabled: boolean;
+ }
+ interface CompileScriptParameterType {
+ /**
+ * Expression to compile.
+ */
+ expression: string;
+ /**
+ * Source url to be set for the script.
+ */
+ sourceURL: string;
+ /**
+ * Specifies whether the compiled script should be persisted.
+ */
+ persistScript: boolean;
+ /**
+ * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ }
+ interface RunScriptParameterType {
+ /**
+ * Id of the script to run.
+ */
+ scriptId: ScriptId;
+ /**
+ * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string | undefined;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean | undefined;
+ /**
+ * Determines whether Command Line API should be available during the evaluation.
+ */
+ includeCommandLineAPI?: boolean | undefined;
+ /**
+ * Whether the result is expected to be a JSON object which should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ */
+ generatePreview?: boolean | undefined;
+ /**
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+ */
+ awaitPromise?: boolean | undefined;
+ }
+ interface QueryObjectsParameterType {
+ /**
+ * Identifier of the prototype to return objects for.
+ */
+ prototypeObjectId: RemoteObjectId;
+ }
+ interface GlobalLexicalScopeNamesParameterType {
+ /**
+ * Specifies in which execution context to lookup global scope variables.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ }
+ interface EvaluateReturnType {
+ /**
+ * Evaluation result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface AwaitPromiseReturnType {
+ /**
+ * Promise result. Will contain rejected value if promise was rejected.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details if stack strace is available.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface CallFunctionOnReturnType {
+ /**
+ * Call result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface GetPropertiesReturnType {
+ /**
+ * Object properties.
+ */
+ result: PropertyDescriptor[];
+ /**
+ * Internal object properties (only of the element itself).
+ */
+ internalProperties?: InternalPropertyDescriptor[] | undefined;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface CompileScriptReturnType {
+ /**
+ * Id of the script.
+ */
+ scriptId?: ScriptId | undefined;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface RunScriptReturnType {
+ /**
+ * Run result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface QueryObjectsReturnType {
+ /**
+ * Array with objects.
+ */
+ objects: RemoteObject;
+ }
+ interface GlobalLexicalScopeNamesReturnType {
+ names: string[];
+ }
+ interface ExecutionContextCreatedEventDataType {
+ /**
+ * A newly created execution context.
+ */
+ context: ExecutionContextDescription;
+ }
+ interface ExecutionContextDestroyedEventDataType {
+ /**
+ * Id of the destroyed context
+ */
+ executionContextId: ExecutionContextId;
+ }
+ interface ExceptionThrownEventDataType {
+ /**
+ * Timestamp of the exception.
+ */
+ timestamp: Timestamp;
+ exceptionDetails: ExceptionDetails;
+ }
+ interface ExceptionRevokedEventDataType {
+ /**
+ * Reason describing why exception was revoked.
+ */
+ reason: string;
+ /**
+ * The id of revoked exception, as reported in <code>exceptionThrown</code>.
+ */
+ exceptionId: number;
+ }
+ interface ConsoleAPICalledEventDataType {
+ /**
+ * Type of the call.
+ */
+ type: string;
+ /**
+ * Call arguments.
+ */
+ args: RemoteObject[];
+ /**
+ * Identifier of the context where the call was made.
+ */
+ executionContextId: ExecutionContextId;
+ /**
+ * Call timestamp.
+ */
+ timestamp: Timestamp;
+ /**
+ * Stack trace captured when the call was made.
+ */
+ stackTrace?: StackTrace | undefined;
+ /**
+ * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.
+ * @experimental
+ */
+ context?: string | undefined;
+ }
+ interface InspectRequestedEventDataType {
+ object: RemoteObject;
+ hints: {};
+ }
+ }
+ namespace Debugger {
+ /**
+ * Breakpoint identifier.
+ */
+ type BreakpointId = string;
+ /**
+ * Call frame identifier.
+ */
+ type CallFrameId = string;
+ /**
+ * Location in the source code.
+ */
+ interface Location {
+ /**
+ * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * Line number in the script (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number in the script (0-based).
+ */
+ columnNumber?: number | undefined;
+ }
+ /**
+ * Location in the source code.
+ * @experimental
+ */
+ interface ScriptPosition {
+ lineNumber: number;
+ columnNumber: number;
+ }
+ /**
+ * JavaScript call frame. Array of call frames form the call stack.
+ */
+ interface CallFrame {
+ /**
+ * Call frame identifier. This identifier is only valid while the virtual machine is paused.
+ */
+ callFrameId: CallFrameId;
+ /**
+ * Name of the JavaScript function called on this call frame.
+ */
+ functionName: string;
+ /**
+ * Location in the source code.
+ */
+ functionLocation?: Location | undefined;
+ /**
+ * Location in the source code.
+ */
+ location: Location;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Scope chain for this call frame.
+ */
+ scopeChain: Scope[];
+ /**
+ * <code>this</code> object for this call frame.
+ */
+ this: Runtime.RemoteObject;
+ /**
+ * The value being returned, if the function is at return point.
+ */
+ returnValue?: Runtime.RemoteObject | undefined;
+ }
+ /**
+ * Scope description.
+ */
+ interface Scope {
+ /**
+ * Scope type.
+ */
+ type: string;
+ /**
+ * Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.
+ */
+ object: Runtime.RemoteObject;
+ name?: string | undefined;
+ /**
+ * Location in the source code where scope starts
+ */
+ startLocation?: Location | undefined;
+ /**
+ * Location in the source code where scope ends
+ */
+ endLocation?: Location | undefined;
+ }
+ /**
+ * Search match for resource.
+ */
+ interface SearchMatch {
+ /**
+ * Line number in resource content.
+ */
+ lineNumber: number;
+ /**
+ * Line with match content.
+ */
+ lineContent: string;
+ }
+ interface BreakLocation {
+ /**
+ * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * Line number in the script (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number in the script (0-based).
+ */
+ columnNumber?: number | undefined;
+ type?: string | undefined;
+ }
+ interface SetBreakpointsActiveParameterType {
+ /**
+ * New value for breakpoints active state.
+ */
+ active: boolean;
+ }
+ interface SetSkipAllPausesParameterType {
+ /**
+ * New value for skip pauses state.
+ */
+ skip: boolean;
+ }
+ interface SetBreakpointByUrlParameterType {
+ /**
+ * Line number to set breakpoint at.
+ */
+ lineNumber: number;
+ /**
+ * URL of the resources to set breakpoint on.
+ */
+ url?: string | undefined;
+ /**
+ * Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified.
+ */
+ urlRegex?: string | undefined;
+ /**
+ * Script hash of the resources to set breakpoint on.
+ */
+ scriptHash?: string | undefined;
+ /**
+ * Offset in the line to set breakpoint at.
+ */
+ columnNumber?: number | undefined;
+ /**
+ * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
+ */
+ condition?: string | undefined;
+ }
+ interface SetBreakpointParameterType {
+ /**
+ * Location to set breakpoint in.
+ */
+ location: Location;
+ /**
+ * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
+ */
+ condition?: string | undefined;
+ }
+ interface RemoveBreakpointParameterType {
+ breakpointId: BreakpointId;
+ }
+ interface GetPossibleBreakpointsParameterType {
+ /**
+ * Start of range to search possible breakpoint locations in.
+ */
+ start: Location;
+ /**
+ * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.
+ */
+ end?: Location | undefined;
+ /**
+ * Only consider locations which are in the same (non-nested) function as start.
+ */
+ restrictToFunction?: boolean | undefined;
+ }
+ interface ContinueToLocationParameterType {
+ /**
+ * Location to continue to.
+ */
+ location: Location;
+ targetCallFrames?: string | undefined;
+ }
+ interface PauseOnAsyncCallParameterType {
+ /**
+ * Debugger will pause when async call with given stack trace is started.
+ */
+ parentStackTraceId: Runtime.StackTraceId;
+ }
+ interface StepIntoParameterType {
+ /**
+ * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause.
+ * @experimental
+ */
+ breakOnAsyncCall?: boolean | undefined;
+ }
+ interface GetStackTraceParameterType {
+ stackTraceId: Runtime.StackTraceId;
+ }
+ interface SearchInContentParameterType {
+ /**
+ * Id of the script to search in.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * String to search for.
+ */
+ query: string;
+ /**
+ * If true, search is case sensitive.
+ */
+ caseSensitive?: boolean | undefined;
+ /**
+ * If true, treats string parameter as regex.
+ */
+ isRegex?: boolean | undefined;
+ }
+ interface SetScriptSourceParameterType {
+ /**
+ * Id of the script to edit.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * New content of the script.
+ */
+ scriptSource: string;
+ /**
+ * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
+ */
+ dryRun?: boolean | undefined;
+ }
+ interface RestartFrameParameterType {
+ /**
+ * Call frame identifier to evaluate on.
+ */
+ callFrameId: CallFrameId;
+ }
+ interface GetScriptSourceParameterType {
+ /**
+ * Id of the script to get source for.
+ */
+ scriptId: Runtime.ScriptId;
+ }
+ interface SetPauseOnExceptionsParameterType {
+ /**
+ * Pause on exceptions mode.
+ */
+ state: string;
+ }
+ interface EvaluateOnCallFrameParameterType {
+ /**
+ * Call frame identifier to evaluate on.
+ */
+ callFrameId: CallFrameId;
+ /**
+ * Expression to evaluate.
+ */
+ expression: string;
+ /**
+ * String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>).
+ */
+ objectGroup?: string | undefined;
+ /**
+ * Specifies whether command line API should be available to the evaluated expression, defaults to false.
+ */
+ includeCommandLineAPI?: boolean | undefined;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean | undefined;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean | undefined;
+ /**
+ * Whether to throw an exception if side effect cannot be ruled out during evaluation.
+ */
+ throwOnSideEffect?: boolean | undefined;
+ }
+ interface SetVariableValueParameterType {
+ /**
+ * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.
+ */
+ scopeNumber: number;
+ /**
+ * Variable name.
+ */
+ variableName: string;
+ /**
+ * New variable value.
+ */
+ newValue: Runtime.CallArgument;
+ /**
+ * Id of callframe that holds variable.
+ */
+ callFrameId: CallFrameId;
+ }
+ interface SetReturnValueParameterType {
+ /**
+ * New return value.
+ */
+ newValue: Runtime.CallArgument;
+ }
+ interface SetAsyncCallStackDepthParameterType {
+ /**
+ * Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default).
+ */
+ maxDepth: number;
+ }
+ interface SetBlackboxPatternsParameterType {
+ /**
+ * Array of regexps that will be used to check script url for blackbox state.
+ */
+ patterns: string[];
+ }
+ interface SetBlackboxedRangesParameterType {
+ /**
+ * Id of the script.
+ */
+ scriptId: Runtime.ScriptId;
+ positions: ScriptPosition[];
+ }
+ interface EnableReturnType {
+ /**
+ * Unique identifier of the debugger.
+ * @experimental
+ */
+ debuggerId: Runtime.UniqueDebuggerId;
+ }
+ interface SetBreakpointByUrlReturnType {
+ /**
+ * Id of the created breakpoint for further reference.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * List of the locations this breakpoint resolved into upon addition.
+ */
+ locations: Location[];
+ }
+ interface SetBreakpointReturnType {
+ /**
+ * Id of the created breakpoint for further reference.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * Location this breakpoint resolved into.
+ */
+ actualLocation: Location;
+ }
+ interface GetPossibleBreakpointsReturnType {
+ /**
+ * List of the possible breakpoint locations.
+ */
+ locations: BreakLocation[];
+ }
+ interface GetStackTraceReturnType {
+ stackTrace: Runtime.StackTrace;
+ }
+ interface SearchInContentReturnType {
+ /**
+ * List of search matches.
+ */
+ result: SearchMatch[];
+ }
+ interface SetScriptSourceReturnType {
+ /**
+ * New stack trace in case editing has happened while VM was stopped.
+ */
+ callFrames?: CallFrame[] | undefined;
+ /**
+ * Whether current call stack was modified after applying the changes.
+ */
+ stackChanged?: boolean | undefined;
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace | undefined;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId | undefined;
+ /**
+ * Exception details if any.
+ */
+ exceptionDetails?: Runtime.ExceptionDetails | undefined;
+ }
+ interface RestartFrameReturnType {
+ /**
+ * New stack trace.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace | undefined;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId | undefined;
+ }
+ interface GetScriptSourceReturnType {
+ /**
+ * Script source.
+ */
+ scriptSource: string;
+ }
+ interface EvaluateOnCallFrameReturnType {
+ /**
+ * Object wrapper for the evaluation result.
+ */
+ result: Runtime.RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: Runtime.ExceptionDetails | undefined;
+ }
+ interface ScriptParsedEventDataType {
+ /**
+ * Identifier of the script parsed.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * URL or name of the script parsed (if any).
+ */
+ url: string;
+ /**
+ * Line offset of the script within the resource with given URL (for script tags).
+ */
+ startLine: number;
+ /**
+ * Column offset of the script within the resource with given URL.
+ */
+ startColumn: number;
+ /**
+ * Last line of the script.
+ */
+ endLine: number;
+ /**
+ * Length of the last line of the script.
+ */
+ endColumn: number;
+ /**
+ * Specifies script creation context.
+ */
+ executionContextId: Runtime.ExecutionContextId;
+ /**
+ * Content hash of the script.
+ */
+ hash: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ executionContextAuxData?: {} | undefined;
+ /**
+ * True, if this script is generated as a result of the live edit operation.
+ * @experimental
+ */
+ isLiveEdit?: boolean | undefined;
+ /**
+ * URL of source map associated with script (if any).
+ */
+ sourceMapURL?: string | undefined;
+ /**
+ * True, if this script has sourceURL.
+ */
+ hasSourceURL?: boolean | undefined;
+ /**
+ * True, if this script is ES6 module.
+ */
+ isModule?: boolean | undefined;
+ /**
+ * This script length.
+ */
+ length?: number | undefined;
+ /**
+ * JavaScript top stack frame of where the script parsed event was triggered if available.
+ * @experimental
+ */
+ stackTrace?: Runtime.StackTrace | undefined;
+ }
+ interface ScriptFailedToParseEventDataType {
+ /**
+ * Identifier of the script parsed.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * URL or name of the script parsed (if any).
+ */
+ url: string;
+ /**
+ * Line offset of the script within the resource with given URL (for script tags).
+ */
+ startLine: number;
+ /**
+ * Column offset of the script within the resource with given URL.
+ */
+ startColumn: number;
+ /**
+ * Last line of the script.
+ */
+ endLine: number;
+ /**
+ * Length of the last line of the script.
+ */
+ endColumn: number;
+ /**
+ * Specifies script creation context.
+ */
+ executionContextId: Runtime.ExecutionContextId;
+ /**
+ * Content hash of the script.
+ */
+ hash: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ executionContextAuxData?: {} | undefined;
+ /**
+ * URL of source map associated with script (if any).
+ */
+ sourceMapURL?: string | undefined;
+ /**
+ * True, if this script has sourceURL.
+ */
+ hasSourceURL?: boolean | undefined;
+ /**
+ * True, if this script is ES6 module.
+ */
+ isModule?: boolean | undefined;
+ /**
+ * This script length.
+ */
+ length?: number | undefined;
+ /**
+ * JavaScript top stack frame of where the script parsed event was triggered if available.
+ * @experimental
+ */
+ stackTrace?: Runtime.StackTrace | undefined;
+ }
+ interface BreakpointResolvedEventDataType {
+ /**
+ * Breakpoint unique identifier.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * Actual breakpoint location.
+ */
+ location: Location;
+ }
+ interface PausedEventDataType {
+ /**
+ * Call stack the virtual machine stopped on.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Pause reason.
+ */
+ reason: string;
+ /**
+ * Object containing break-specific auxiliary properties.
+ */
+ data?: {} | undefined;
+ /**
+ * Hit breakpoints IDs
+ */
+ hitBreakpoints?: string[] | undefined;
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace | undefined;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId | undefined;
+ /**
+ * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after <code>Debugger.stepInto</code> call with <code>breakOnAsynCall</code> flag.
+ * @experimental
+ */
+ asyncCallStackTraceId?: Runtime.StackTraceId | undefined;
+ }
+ }
+ namespace Console {
+ /**
+ * Console message.
+ */
+ interface ConsoleMessage {
+ /**
+ * Message source.
+ */
+ source: string;
+ /**
+ * Message severity.
+ */
+ level: string;
+ /**
+ * Message text.
+ */
+ text: string;
+ /**
+ * URL of the message origin.
+ */
+ url?: string | undefined;
+ /**
+ * Line number in the resource that generated this message (1-based).
+ */
+ line?: number | undefined;
+ /**
+ * Column number in the resource that generated this message (1-based).
+ */
+ column?: number | undefined;
+ }
+ interface MessageAddedEventDataType {
+ /**
+ * Console message that has been added.
+ */
+ message: ConsoleMessage;
+ }
+ }
+ namespace Profiler {
+ /**
+ * Profile node. Holds callsite information, execution statistics and child nodes.
+ */
+ interface ProfileNode {
+ /**
+ * Unique id of the node.
+ */
+ id: number;
+ /**
+ * Function location.
+ */
+ callFrame: Runtime.CallFrame;
+ /**
+ * Number of samples where this node was on top of the call stack.
+ */
+ hitCount?: number | undefined;
+ /**
+ * Child node ids.
+ */
+ children?: number[] | undefined;
+ /**
+ * The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
+ */
+ deoptReason?: string | undefined;
+ /**
+ * An array of source position ticks.
+ */
+ positionTicks?: PositionTickInfo[] | undefined;
+ }
+ /**
+ * Profile.
+ */
+ interface Profile {
+ /**
+ * The list of profile nodes. First item is the root node.
+ */
+ nodes: ProfileNode[];
+ /**
+ * Profiling start timestamp in microseconds.
+ */
+ startTime: number;
+ /**
+ * Profiling end timestamp in microseconds.
+ */
+ endTime: number;
+ /**
+ * Ids of samples top nodes.
+ */
+ samples?: number[] | undefined;
+ /**
+ * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.
+ */
+ timeDeltas?: number[] | undefined;
+ }
+ /**
+ * Specifies a number of samples attributed to a certain source position.
+ */
+ interface PositionTickInfo {
+ /**
+ * Source line number (1-based).
+ */
+ line: number;
+ /**
+ * Number of samples attributed to the source line.
+ */
+ ticks: number;
+ }
+ /**
+ * Coverage data for a source range.
+ */
+ interface CoverageRange {
+ /**
+ * JavaScript script source offset for the range start.
+ */
+ startOffset: number;
+ /**
+ * JavaScript script source offset for the range end.
+ */
+ endOffset: number;
+ /**
+ * Collected execution count of the source range.
+ */
+ count: number;
+ }
+ /**
+ * Coverage data for a JavaScript function.
+ */
+ interface FunctionCoverage {
+ /**
+ * JavaScript function name.
+ */
+ functionName: string;
+ /**
+ * Source ranges inside the function with coverage data.
+ */
+ ranges: CoverageRange[];
+ /**
+ * Whether coverage data for this function has block granularity.
+ */
+ isBlockCoverage: boolean;
+ }
+ /**
+ * Coverage data for a JavaScript script.
+ */
+ interface ScriptCoverage {
+ /**
+ * JavaScript script id.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Functions contained in the script that has coverage data.
+ */
+ functions: FunctionCoverage[];
+ }
+ /**
+ * Describes a type collected during runtime.
+ * @experimental
+ */
+ interface TypeObject {
+ /**
+ * Name of a type collected with type profiling.
+ */
+ name: string;
+ }
+ /**
+ * Source offset and types for a parameter or return value.
+ * @experimental
+ */
+ interface TypeProfileEntry {
+ /**
+ * Source offset of the parameter or end of function for return values.
+ */
+ offset: number;
+ /**
+ * The types for this parameter or return value.
+ */
+ types: TypeObject[];
+ }
+ /**
+ * Type profile data collected during runtime for a JavaScript script.
+ * @experimental
+ */
+ interface ScriptTypeProfile {
+ /**
+ * JavaScript script id.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Type profile entries for parameters and return values of the functions in the script.
+ */
+ entries: TypeProfileEntry[];
+ }
+ interface SetSamplingIntervalParameterType {
+ /**
+ * New sampling interval in microseconds.
+ */
+ interval: number;
+ }
+ interface StartPreciseCoverageParameterType {
+ /**
+ * Collect accurate call counts beyond simple 'covered' or 'not covered'.
+ */
+ callCount?: boolean | undefined;
+ /**
+ * Collect block-based coverage.
+ */
+ detailed?: boolean | undefined;
+ }
+ interface StopReturnType {
+ /**
+ * Recorded profile.
+ */
+ profile: Profile;
+ }
+ interface TakePreciseCoverageReturnType {
+ /**
+ * Coverage data for the current isolate.
+ */
+ result: ScriptCoverage[];
+ }
+ interface GetBestEffortCoverageReturnType {
+ /**
+ * Coverage data for the current isolate.
+ */
+ result: ScriptCoverage[];
+ }
+ interface TakeTypeProfileReturnType {
+ /**
+ * Type profile for all scripts since startTypeProfile() was turned on.
+ */
+ result: ScriptTypeProfile[];
+ }
+ interface ConsoleProfileStartedEventDataType {
+ id: string;
+ /**
+ * Location of console.profile().
+ */
+ location: Debugger.Location;
+ /**
+ * Profile title passed as an argument to console.profile().
+ */
+ title?: string | undefined;
+ }
+ interface ConsoleProfileFinishedEventDataType {
+ id: string;
+ /**
+ * Location of console.profileEnd().
+ */
+ location: Debugger.Location;
+ profile: Profile;
+ /**
+ * Profile title passed as an argument to console.profile().
+ */
+ title?: string | undefined;
+ }
+ }
+ namespace HeapProfiler {
+ /**
+ * Heap snapshot object id.
+ */
+ type HeapSnapshotObjectId = string;
+ /**
+ * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
+ */
+ interface SamplingHeapProfileNode {
+ /**
+ * Function location.
+ */
+ callFrame: Runtime.CallFrame;
+ /**
+ * Allocations size in bytes for the node excluding children.
+ */
+ selfSize: number;
+ /**
+ * Child nodes.
+ */
+ children: SamplingHeapProfileNode[];
+ }
+ /**
+ * Profile.
+ */
+ interface SamplingHeapProfile {
+ head: SamplingHeapProfileNode;
+ }
+ interface StartTrackingHeapObjectsParameterType {
+ trackAllocations?: boolean | undefined;
+ }
+ interface StopTrackingHeapObjectsParameterType {
+ /**
+ * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
+ */
+ reportProgress?: boolean | undefined;
+ }
+ interface TakeHeapSnapshotParameterType {
+ /**
+ * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
+ */
+ reportProgress?: boolean | undefined;
+ }
+ interface GetObjectByHeapObjectIdParameterType {
+ objectId: HeapSnapshotObjectId;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string | undefined;
+ }
+ interface AddInspectedHeapObjectParameterType {
+ /**
+ * Heap snapshot object id to be accessible by means of $x command line API.
+ */
+ heapObjectId: HeapSnapshotObjectId;
+ }
+ interface GetHeapObjectIdParameterType {
+ /**
+ * Identifier of the object to get heap object id for.
+ */
+ objectId: Runtime.RemoteObjectId;
+ }
+ interface StartSamplingParameterType {
+ /**
+ * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
+ */
+ samplingInterval?: number | undefined;
+ }
+ interface GetObjectByHeapObjectIdReturnType {
+ /**
+ * Evaluation result.
+ */
+ result: Runtime.RemoteObject;
+ }
+ interface GetHeapObjectIdReturnType {
+ /**
+ * Id of the heap snapshot object corresponding to the passed remote object id.
+ */
+ heapSnapshotObjectId: HeapSnapshotObjectId;
+ }
+ interface StopSamplingReturnType {
+ /**
+ * Recorded sampling heap profile.
+ */
+ profile: SamplingHeapProfile;
+ }
+ interface GetSamplingProfileReturnType {
+ /**
+ * Return the sampling profile being collected.
+ */
+ profile: SamplingHeapProfile;
+ }
+ interface AddHeapSnapshotChunkEventDataType {
+ chunk: string;
+ }
+ interface ReportHeapSnapshotProgressEventDataType {
+ done: number;
+ total: number;
+ finished?: boolean | undefined;
+ }
+ interface LastSeenObjectIdEventDataType {
+ lastSeenObjectId: number;
+ timestamp: number;
+ }
+ interface HeapStatsUpdateEventDataType {
+ /**
+ * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.
+ */
+ statsUpdate: number[];
+ }
+ }
+ namespace NodeTracing {
+ interface TraceConfig {
+ /**
+ * Controls how the trace buffer stores data.
+ */
+ recordMode?: string | undefined;
+ /**
+ * Included category filters.
+ */
+ includedCategories: string[];
+ }
+ interface StartParameterType {
+ traceConfig: TraceConfig;
+ }
+ interface GetCategoriesReturnType {
+ /**
+ * A list of supported tracing categories.
+ */
+ categories: string[];
+ }
+ interface DataCollectedEventDataType {
+ value: Array<{}>;
+ }
+ }
+ namespace NodeWorker {
+ type WorkerID = string;
+ /**
+ * Unique identifier of attached debugging session.
+ */
+ type SessionID = string;
+ interface WorkerInfo {
+ workerId: WorkerID;
+ type: string;
+ title: string;
+ url: string;
+ }
+ interface SendMessageToWorkerParameterType {
+ message: string;
+ /**
+ * Identifier of the session.
+ */
+ sessionId: SessionID;
+ }
+ interface EnableParameterType {
+ /**
+ * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger`
+ * message to run them.
+ */
+ waitForDebuggerOnStart: boolean;
+ }
+ interface DetachParameterType {
+ sessionId: SessionID;
+ }
+ interface AttachedToWorkerEventDataType {
+ /**
+ * Identifier assigned to the session used to send/receive messages.
+ */
+ sessionId: SessionID;
+ workerInfo: WorkerInfo;
+ waitingForDebugger: boolean;
+ }
+ interface DetachedFromWorkerEventDataType {
+ /**
+ * Detached session identifier.
+ */
+ sessionId: SessionID;
+ }
+ interface ReceivedMessageFromWorkerEventDataType {
+ /**
+ * Identifier of a session which sends a message.
+ */
+ sessionId: SessionID;
+ message: string;
+ }
+ }
+ namespace NodeRuntime {
+ interface NotifyWhenWaitingForDisconnectParameterType {
+ enabled: boolean;
+ }
+ }
+ /**
+ * The `inspector.Session` is used for dispatching messages to the V8 inspector
+ * back-end and receiving message responses and notifications.
+ */
+ class Session extends EventEmitter {
+ /**
+ * Create a new instance of the inspector.Session class.
+ * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend.
+ */
+ constructor();
+ /**
+ * Connects a session to the inspector back-end.
+ * @since v8.0.0
+ */
+ connect(): void;
+ /**
+ * Immediately close the session. All pending message callbacks will be called
+ * with an error. `session.connect()` will need to be called to be able to send
+ * messages again. Reconnected session will lose all inspector state, such as
+ * enabled agents or configured breakpoints.
+ * @since v8.0.0
+ */
+ disconnect(): void;
+ /**
+ * Posts a message to the inspector back-end. `callback` will be notified when
+ * a response is received. `callback` is a function that accepts two optional
+ * arguments: error and message-specific result.
+ *
+ * ```js
+ * session.post('Runtime.evaluate', { expression: '2 + 2' },
+ * (error, { result }) => console.log(result));
+ * // Output: { type: 'number', value: 4, description: '4' }
+ * ```
+ *
+ * The latest version of the V8 inspector protocol is published on the [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/).
+ *
+ * Node.js inspector supports all the Chrome DevTools Protocol domains declared
+ * by V8\. Chrome DevTools Protocol domain provides an interface for interacting
+ * with one of the runtime agents used to inspect the application state and listen
+ * to the run-time events.
+ *
+ * ## Example usage
+ *
+ * Apart from the debugger, various V8 Profilers are available through the DevTools
+ * protocol.
+ * @since v8.0.0
+ */
+ post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void;
+ post(method: string, callback?: (err: Error | null, params?: {}) => void): void;
+ /**
+ * Returns supported domains.
+ */
+ post(method: 'Schema.getDomains', callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void;
+ /**
+ * Evaluates expression on global object.
+ */
+ post(method: 'Runtime.evaluate', params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
+ post(method: 'Runtime.evaluate', callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
+ /**
+ * Add handler to promise with given promise object id.
+ */
+ post(method: 'Runtime.awaitPromise', params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
+ post(method: 'Runtime.awaitPromise', callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
+ /**
+ * Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
+ */
+ post(method: 'Runtime.callFunctionOn', params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
+ post(method: 'Runtime.callFunctionOn', callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
+ /**
+ * Returns properties of a given object. Object group of the result is inherited from the target object.
+ */
+ post(method: 'Runtime.getProperties', params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
+ post(method: 'Runtime.getProperties', callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
+ /**
+ * Releases remote object with given id.
+ */
+ post(method: 'Runtime.releaseObject', params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Runtime.releaseObject', callback?: (err: Error | null) => void): void;
+ /**
+ * Releases all remote objects that belong to a given group.
+ */
+ post(method: 'Runtime.releaseObjectGroup', params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Runtime.releaseObjectGroup', callback?: (err: Error | null) => void): void;
+ /**
+ * Tells inspected instance to run if it was waiting for debugger to attach.
+ */
+ post(method: 'Runtime.runIfWaitingForDebugger', callback?: (err: Error | null) => void): void;
+ /**
+ * Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context.
+ */
+ post(method: 'Runtime.enable', callback?: (err: Error | null) => void): void;
+ /**
+ * Disables reporting of execution contexts creation.
+ */
+ post(method: 'Runtime.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Discards collected exceptions and console API calls.
+ */
+ post(method: 'Runtime.discardConsoleEntries', callback?: (err: Error | null) => void): void;
+ /**
+ * @experimental
+ */
+ post(method: 'Runtime.setCustomObjectFormatterEnabled', params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Runtime.setCustomObjectFormatterEnabled', callback?: (err: Error | null) => void): void;
+ /**
+ * Compiles expression.
+ */
+ post(method: 'Runtime.compileScript', params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
+ post(method: 'Runtime.compileScript', callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
+ /**
+ * Runs script with given id in a given context.
+ */
+ post(method: 'Runtime.runScript', params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
+ post(method: 'Runtime.runScript', callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
+ post(method: 'Runtime.queryObjects', params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
+ post(method: 'Runtime.queryObjects', callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
+ /**
+ * Returns all let, const and class variables from global scope.
+ */
+ post(
+ method: 'Runtime.globalLexicalScopeNames',
+ params?: Runtime.GlobalLexicalScopeNamesParameterType,
+ callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void
+ ): void;
+ post(method: 'Runtime.globalLexicalScopeNames', callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void;
+ /**
+ * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
+ */
+ post(method: 'Debugger.enable', callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void;
+ /**
+ * Disables debugger for given page.
+ */
+ post(method: 'Debugger.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Activates / deactivates all breakpoints on the page.
+ */
+ post(method: 'Debugger.setBreakpointsActive', params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setBreakpointsActive', callback?: (err: Error | null) => void): void;
+ /**
+ * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
+ */
+ post(method: 'Debugger.setSkipAllPauses', params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setSkipAllPauses', callback?: (err: Error | null) => void): void;
+ /**
+ * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads.
+ */
+ post(method: 'Debugger.setBreakpointByUrl', params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
+ post(method: 'Debugger.setBreakpointByUrl', callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
+ /**
+ * Sets JavaScript breakpoint at a given location.
+ */
+ post(method: 'Debugger.setBreakpoint', params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
+ post(method: 'Debugger.setBreakpoint', callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
+ /**
+ * Removes JavaScript breakpoint.
+ */
+ post(method: 'Debugger.removeBreakpoint', params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.removeBreakpoint', callback?: (err: Error | null) => void): void;
+ /**
+ * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
+ */
+ post(
+ method: 'Debugger.getPossibleBreakpoints',
+ params?: Debugger.GetPossibleBreakpointsParameterType,
+ callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void
+ ): void;
+ post(method: 'Debugger.getPossibleBreakpoints', callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void;
+ /**
+ * Continues execution until specific location is reached.
+ */
+ post(method: 'Debugger.continueToLocation', params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.continueToLocation', callback?: (err: Error | null) => void): void;
+ /**
+ * @experimental
+ */
+ post(method: 'Debugger.pauseOnAsyncCall', params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.pauseOnAsyncCall', callback?: (err: Error | null) => void): void;
+ /**
+ * Steps over the statement.
+ */
+ post(method: 'Debugger.stepOver', callback?: (err: Error | null) => void): void;
+ /**
+ * Steps into the function call.
+ */
+ post(method: 'Debugger.stepInto', params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.stepInto', callback?: (err: Error | null) => void): void;
+ /**
+ * Steps out of the function call.
+ */
+ post(method: 'Debugger.stepOut', callback?: (err: Error | null) => void): void;
+ /**
+ * Stops on the next JavaScript statement.
+ */
+ post(method: 'Debugger.pause', callback?: (err: Error | null) => void): void;
+ /**
+ * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.
+ * @experimental
+ */
+ post(method: 'Debugger.scheduleStepIntoAsync', callback?: (err: Error | null) => void): void;
+ /**
+ * Resumes JavaScript execution.
+ */
+ post(method: 'Debugger.resume', callback?: (err: Error | null) => void): void;
+ /**
+ * Returns stack trace with given <code>stackTraceId</code>.
+ * @experimental
+ */
+ post(method: 'Debugger.getStackTrace', params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
+ post(method: 'Debugger.getStackTrace', callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
+ /**
+ * Searches for given string in script content.
+ */
+ post(method: 'Debugger.searchInContent', params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
+ post(method: 'Debugger.searchInContent', callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
+ /**
+ * Edits JavaScript source live.
+ */
+ post(method: 'Debugger.setScriptSource', params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
+ post(method: 'Debugger.setScriptSource', callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
+ /**
+ * Restarts particular call frame from the beginning.
+ */
+ post(method: 'Debugger.restartFrame', params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
+ post(method: 'Debugger.restartFrame', callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
+ /**
+ * Returns source for the script with given id.
+ */
+ post(method: 'Debugger.getScriptSource', params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
+ post(method: 'Debugger.getScriptSource', callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
+ /**
+ * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>.
+ */
+ post(method: 'Debugger.setPauseOnExceptions', params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setPauseOnExceptions', callback?: (err: Error | null) => void): void;
+ /**
+ * Evaluates expression on a given call frame.
+ */
+ post(method: 'Debugger.evaluateOnCallFrame', params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
+ post(method: 'Debugger.evaluateOnCallFrame', callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
+ /**
+ * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
+ */
+ post(method: 'Debugger.setVariableValue', params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setVariableValue', callback?: (err: Error | null) => void): void;
+ /**
+ * Changes return value in top frame. Available only at return break position.
+ * @experimental
+ */
+ post(method: 'Debugger.setReturnValue', params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setReturnValue', callback?: (err: Error | null) => void): void;
+ /**
+ * Enables or disables async call stacks tracking.
+ */
+ post(method: 'Debugger.setAsyncCallStackDepth', params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setAsyncCallStackDepth', callback?: (err: Error | null) => void): void;
+ /**
+ * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
+ * @experimental
+ */
+ post(method: 'Debugger.setBlackboxPatterns', params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setBlackboxPatterns', callback?: (err: Error | null) => void): void;
+ /**
+ * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.
+ * @experimental
+ */
+ post(method: 'Debugger.setBlackboxedRanges', params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setBlackboxedRanges', callback?: (err: Error | null) => void): void;
+ /**
+ * Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification.
+ */
+ post(method: 'Console.enable', callback?: (err: Error | null) => void): void;
+ /**
+ * Disables console domain, prevents further console messages from being reported to the client.
+ */
+ post(method: 'Console.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Does nothing.
+ */
+ post(method: 'Console.clearMessages', callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.enable', callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
+ */
+ post(method: 'Profiler.setSamplingInterval', params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.setSamplingInterval', callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.start', callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.stop', callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void;
+ /**
+ * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.
+ */
+ post(method: 'Profiler.startPreciseCoverage', params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.startPreciseCoverage', callback?: (err: Error | null) => void): void;
+ /**
+ * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
+ */
+ post(method: 'Profiler.stopPreciseCoverage', callback?: (err: Error | null) => void): void;
+ /**
+ * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
+ */
+ post(method: 'Profiler.takePreciseCoverage', callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void;
+ /**
+ * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
+ */
+ post(method: 'Profiler.getBestEffortCoverage', callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void;
+ /**
+ * Enable type profile.
+ * @experimental
+ */
+ post(method: 'Profiler.startTypeProfile', callback?: (err: Error | null) => void): void;
+ /**
+ * Disable type profile. Disabling releases type profile data collected so far.
+ * @experimental
+ */
+ post(method: 'Profiler.stopTypeProfile', callback?: (err: Error | null) => void): void;
+ /**
+ * Collect type profile.
+ * @experimental
+ */
+ post(method: 'Profiler.takeTypeProfile', callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void;
+ post(method: 'HeapProfiler.enable', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.disable', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.startTrackingHeapObjects', params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.startTrackingHeapObjects', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.stopTrackingHeapObjects', params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.stopTrackingHeapObjects', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.takeHeapSnapshot', params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.takeHeapSnapshot', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.collectGarbage', callback?: (err: Error | null) => void): void;
+ post(
+ method: 'HeapProfiler.getObjectByHeapObjectId',
+ params?: HeapProfiler.GetObjectByHeapObjectIdParameterType,
+ callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void
+ ): void;
+ post(method: 'HeapProfiler.getObjectByHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void;
+ /**
+ * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
+ */
+ post(method: 'HeapProfiler.addInspectedHeapObject', params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.addInspectedHeapObject', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.getHeapObjectId', params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
+ post(method: 'HeapProfiler.getHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
+ post(method: 'HeapProfiler.startSampling', params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.startSampling', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.stopSampling', callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void;
+ post(method: 'HeapProfiler.getSamplingProfile', callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void;
+ /**
+ * Gets supported tracing categories.
+ */
+ post(method: 'NodeTracing.getCategories', callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void;
+ /**
+ * Start trace events collection.
+ */
+ post(method: 'NodeTracing.start', params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeTracing.start', callback?: (err: Error | null) => void): void;
+ /**
+ * Stop trace events collection. Remaining collected events will be sent as a sequence of
+ * dataCollected events followed by tracingComplete event.
+ */
+ post(method: 'NodeTracing.stop', callback?: (err: Error | null) => void): void;
+ /**
+ * Sends protocol message over session with given id.
+ */
+ post(method: 'NodeWorker.sendMessageToWorker', params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeWorker.sendMessageToWorker', callback?: (err: Error | null) => void): void;
+ /**
+ * Instructs the inspector to attach to running workers. Will also attach to new workers
+ * as they start
+ */
+ post(method: 'NodeWorker.enable', params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeWorker.enable', callback?: (err: Error | null) => void): void;
+ /**
+ * Detaches from all running workers and disables attaching to new workers as they are started.
+ */
+ post(method: 'NodeWorker.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Detached from the worker with given sessionId.
+ */
+ post(method: 'NodeWorker.detach', params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeWorker.detach', callback?: (err: Error | null) => void): void;
+ /**
+ * Enable the `NodeRuntime.waitingForDisconnect`.
+ */
+ post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', callback?: (err: Error | null) => void): void;
+ // Events
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ addListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ addListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ addListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ addListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ addListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ addListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ addListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ addListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ addListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ addListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ addListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ addListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ addListener(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ addListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ addListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ addListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ addListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ addListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ addListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ addListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ addListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ addListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ addListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ addListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ addListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ addListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ addListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'inspectorNotification', message: InspectorNotification<{}>): boolean;
+ emit(event: 'Runtime.executionContextCreated', message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
+ emit(event: 'Runtime.executionContextDestroyed', message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
+ emit(event: 'Runtime.executionContextsCleared'): boolean;
+ emit(event: 'Runtime.exceptionThrown', message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
+ emit(event: 'Runtime.exceptionRevoked', message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
+ emit(event: 'Runtime.consoleAPICalled', message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
+ emit(event: 'Runtime.inspectRequested', message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
+ emit(event: 'Debugger.scriptParsed', message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
+ emit(event: 'Debugger.scriptFailedToParse', message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
+ emit(event: 'Debugger.breakpointResolved', message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>): boolean;
+ emit(event: 'Debugger.paused', message: InspectorNotification<Debugger.PausedEventDataType>): boolean;
+ emit(event: 'Debugger.resumed'): boolean;
+ emit(event: 'Console.messageAdded', message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
+ emit(event: 'Profiler.consoleProfileStarted', message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
+ emit(event: 'Profiler.consoleProfileFinished', message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
+ emit(event: 'HeapProfiler.addHeapSnapshotChunk', message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>): boolean;
+ emit(event: 'HeapProfiler.resetProfiles'): boolean;
+ emit(event: 'HeapProfiler.reportHeapSnapshotProgress', message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
+ emit(event: 'HeapProfiler.lastSeenObjectId', message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
+ emit(event: 'HeapProfiler.heapStatsUpdate', message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
+ emit(event: 'NodeTracing.dataCollected', message: InspectorNotification<NodeTracing.DataCollectedEventDataType>): boolean;
+ emit(event: 'NodeTracing.tracingComplete'): boolean;
+ emit(event: 'NodeWorker.attachedToWorker', message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>): boolean;
+ emit(event: 'NodeWorker.detachedFromWorker', message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>): boolean;
+ emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
+ emit(event: 'NodeRuntime.waitingForDisconnect'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ on(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ on(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ on(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ on(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ on(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ on(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ on(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ on(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ on(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ on(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ on(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ on(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ on(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ on(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ on(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ on(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ on(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ on(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ on(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ on(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ on(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ on(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ on(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ on(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ on(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ on(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ on(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ once(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ once(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ once(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ once(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ once(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ once(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ once(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ once(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ once(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ once(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ once(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ once(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ once(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ once(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ once(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ once(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ once(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ once(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ once(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ once(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ once(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ once(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ once(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ once(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ once(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ once(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ once(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ prependListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ prependListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ prependListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ prependListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ prependListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ prependListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ prependListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ prependListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ prependListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ prependListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ prependListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ prependListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ prependListener(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ prependListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ prependListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ prependListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ prependListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ prependListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ prependListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ prependListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ prependListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ prependListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ prependListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ prependListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ prependListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ prependListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ prependListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ prependOnceListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ prependOnceListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ prependOnceListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ prependOnceListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ prependOnceListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ prependOnceListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ prependOnceListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ prependOnceListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ prependOnceListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ prependOnceListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ prependOnceListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ prependOnceListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ prependOnceListener(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ prependOnceListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ prependOnceListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ prependOnceListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ prependOnceListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ prependOnceListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ prependOnceListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ prependOnceListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ prependOnceListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ prependOnceListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ prependOnceListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ prependOnceListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ prependOnceListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ prependOnceListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ prependOnceListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ }
+ /**
+ * Activate inspector on host and port. Equivalent to`node --inspect=[[host:]port]`, but can be done programmatically after node has
+ * started.
+ *
+ * If wait is `true`, will block until a client has connected to the inspect port
+ * and flow control has been passed to the debugger client.
+ *
+ * See the `security warning` regarding the `host`parameter usage.
+ * @param [port='what was specified on the CLI'] Port to listen on for inspector connections. Optional.
+ * @param [host='what was specified on the CLI'] Host to listen on for inspector connections. Optional.
+ * @param [wait=false] Block until a client has connected. Optional.
+ */
+ function open(port?: number, host?: string, wait?: boolean): void;
+ /**
+ * Deactivate the inspector. Blocks until there are no active connections.
+ */
+ function close(): void;
+ /**
+ * Return the URL of the active inspector, or `undefined` if there is none.
+ *
+ * ```console
+ * $ node --inspect -p 'inspector.url()'
+ * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
+ * For help, see: https://nodejs.org/en/docs/inspector
+ * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
+ *
+ * $ node --inspect=localhost:3000 -p 'inspector.url()'
+ * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
+ * For help, see: https://nodejs.org/en/docs/inspector
+ * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
+ *
+ * $ node -p 'inspector.url()'
+ * undefined
+ * ```
+ */
+ function url(): string | undefined;
+ /**
+ * Blocks until a client (existing or connected later) has sent`Runtime.runIfWaitingForDebugger` command.
+ *
+ * An exception will be thrown if there is no active inspector.
+ * @since v12.7.0
+ */
+ function waitForDebugger(): void;
+}
+/**
+ * The inspector module provides an API for interacting with the V8 inspector.
+ */
+declare module 'node:inspector' {
+ import inspector = require('inspector');
+ export = inspector;
+}
diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts
new file mode 100755
index 0000000..58847a8
--- /dev/null
+++ b/node_modules/@types/node/module.d.ts
@@ -0,0 +1,232 @@
+/**
+ * @since v0.3.7
+ */
+declare module 'module' {
+ import { URL } from 'node:url';
+ import { MessagePort } from 'node:worker_threads';
+ namespace Module {
+ /**
+ * The `module.syncBuiltinESMExports()` method updates all the live bindings for
+ * builtin `ES Modules` to match the properties of the `CommonJS` exports. It
+ * does not add or remove exported names from the `ES Modules`.
+ *
+ * ```js
+ * const fs = require('node:fs');
+ * const assert = require('node:assert');
+ * const { syncBuiltinESMExports } = require('node:module');
+ *
+ * fs.readFile = newAPI;
+ *
+ * delete fs.readFileSync;
+ *
+ * function newAPI() {
+ * // ...
+ * }
+ *
+ * fs.newAPI = newAPI;
+ *
+ * syncBuiltinESMExports();
+ *
+ * import('node:fs').then((esmFS) => {
+ * // It syncs the existing readFile property with the new value
+ * assert.strictEqual(esmFS.readFile, newAPI);
+ * // readFileSync has been deleted from the required fs
+ * assert.strictEqual('readFileSync' in fs, false);
+ * // syncBuiltinESMExports() does not remove readFileSync from esmFS
+ * assert.strictEqual('readFileSync' in esmFS, true);
+ * // syncBuiltinESMExports() does not add names
+ * assert.strictEqual(esmFS.newAPI, undefined);
+ * });
+ * ```
+ * @since v12.12.0
+ */
+ function syncBuiltinESMExports(): void;
+ /**
+ * `path` is the resolved path for the file for which a corresponding source map
+ * should be fetched.
+ * @since v13.7.0, v12.17.0
+ * @return Returns `module.SourceMap` if a source map is found, `undefined` otherwise.
+ */
+ function findSourceMap(path: string, error?: Error): SourceMap;
+ interface SourceMapPayload {
+ file: string;
+ version: number;
+ sources: string[];
+ sourcesContent: string[];
+ names: string[];
+ mappings: string;
+ sourceRoot: string;
+ }
+ interface SourceMapping {
+ generatedLine: number;
+ generatedColumn: number;
+ originalSource: string;
+ originalLine: number;
+ originalColumn: number;
+ }
+ /**
+ * @since v13.7.0, v12.17.0
+ */
+ class SourceMap {
+ /**
+ * Getter for the payload used to construct the `SourceMap` instance.
+ */
+ readonly payload: SourceMapPayload;
+ constructor(payload: SourceMapPayload);
+ /**
+ * Given a line offset and column offset in the generated source
+ * file, returns an object representing the SourceMap range in the
+ * original file if found, or an empty object if not.
+ *
+ * The object returned contains the following keys:
+ *
+ * The returned value represents the raw range as it appears in the
+ * SourceMap, based on zero-indexed offsets, _not_ 1-indexed line and
+ * column numbers as they appear in Error messages and CallSite
+ * objects.
+ *
+ * To get the corresponding 1-indexed line and column numbers from a
+ * lineNumber and columnNumber as they are reported by Error stacks
+ * and CallSite objects, use `sourceMap.findOrigin(lineNumber, columnNumber)`
+ * @param lineOffset The zero-indexed line number offset in the generated source
+ * @param columnOffset The zero-indexed column number offset in the generated source
+ */
+ findEntry(lineOffset: number, columnOffset: number): SourceMapping;
+ }
+ interface ImportAssertions extends NodeJS.Dict<string> {
+ type?: string | undefined;
+ }
+ type ModuleFormat = 'builtin' | 'commonjs' | 'json' | 'module' | 'wasm';
+ type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray;
+ interface GlobalPreloadContext {
+ port: MessagePort;
+ }
+ /**
+ * Sometimes it might be necessary to run some code inside of the same global scope that the application runs in.
+ * This hook allows the return of a string that is run as a sloppy-mode script on startup.
+ *
+ * @param context Information to assist the preload code
+ * @return Code to run before application startup
+ */
+ type GlobalPreloadHook = (context: GlobalPreloadContext) => string;
+ interface ResolveHookContext {
+ /**
+ * Export conditions of the relevant `package.json`
+ */
+ conditions: string[];
+ /**
+ * An object whose key-value pairs represent the assertions for the module to import
+ */
+ importAssertions: ImportAssertions;
+ /**
+ * The module importing this one, or undefined if this is the Node.js entry point
+ */
+ parentURL: string | undefined;
+ }
+ interface ResolveFnOutput {
+ /**
+ * A hint to the load hook (it might be ignored)
+ */
+ format?: ModuleFormat | null | undefined;
+ /**
+ * The import assertions to use when caching the module (optional; if excluded the input will be used)
+ */
+ importAssertions?: ImportAssertions | undefined;
+ /**
+ * A signal that this hook intends to terminate the chain of `resolve` hooks.
+ * @default false
+ */
+ shortCircuit?: boolean | undefined;
+ /**
+ * The absolute URL to which this input resolves
+ */
+ url: string;
+ }
+ /**
+ * The `resolve` hook chain is responsible for resolving file URL for a given module specifier and parent URL, and optionally its format (such as `'module'`) as a hint to the `load` hook.
+ * If a format is specified, the load hook is ultimately responsible for providing the final `format` value (and it is free to ignore the hint provided by `resolve`);
+ * if `resolve` provides a format, a custom `load` hook is required even if only to pass the value to the Node.js default `load` hook.
+ *
+ * @param specifier The specified URL path of the module to be resolved
+ * @param context
+ * @param nextResolve The subsequent `resolve` hook in the chain, or the Node.js default `resolve` hook after the last user-supplied resolve hook
+ */
+ type ResolveHook = (
+ specifier: string,
+ context: ResolveHookContext,
+ nextResolve: (specifier: string, context?: ResolveHookContext) => ResolveFnOutput | Promise<ResolveFnOutput>
+ ) => ResolveFnOutput | Promise<ResolveFnOutput>;
+ interface LoadHookContext {
+ /**
+ * Export conditions of the relevant `package.json`
+ */
+ conditions: string[];
+ /**
+ * The format optionally supplied by the `resolve` hook chain
+ */
+ format: ModuleFormat;
+ /**
+ * An object whose key-value pairs represent the assertions for the module to import
+ */
+ importAssertions: ImportAssertions;
+ }
+ interface LoadFnOutput {
+ format: ModuleFormat;
+ /**
+ * A signal that this hook intends to terminate the chain of `resolve` hooks.
+ * @default false
+ */
+ shortCircuit?: boolean | undefined;
+ /**
+ * The source for Node.js to evaluate
+ */
+ source?: ModuleSource;
+ }
+ /**
+ * The `load` hook provides a way to define a custom method of determining how a URL should be interpreted, retrieved, and parsed.
+ * It is also in charge of validating the import assertion.
+ *
+ * @param url The URL/path of the module to be loaded
+ * @param context Metadata about the module
+ * @param nextLoad The subsequent `load` hook in the chain, or the Node.js default `load` hook after the last user-supplied `load` hook
+ */
+ type LoadHook = (
+ url: string,
+ context: LoadHookContext,
+ nextLoad: (url: string, context?: LoadHookContext) => LoadFnOutput | Promise<LoadFnOutput>
+ ) => LoadFnOutput | Promise<LoadFnOutput>;
+ }
+ interface Module extends NodeModule {}
+ class Module {
+ static runMain(): void;
+ static wrap(code: string): string;
+ static createRequire(path: string | URL): NodeRequire;
+ static builtinModules: string[];
+ static isBuiltin(moduleName: string): boolean;
+ static Module: typeof Module;
+ constructor(id: string, parent?: Module);
+ }
+ global {
+ interface ImportMeta {
+ url: string;
+ /**
+ * @experimental
+ * This feature is only available with the `--experimental-import-meta-resolve`
+ * command flag enabled.
+ *
+ * Provides a module-relative resolution function scoped to each module, returning
+ * the URL string.
+ *
+ * @param specified The module specifier to resolve relative to `parent`.
+ * @param parent The absolute parent module URL to resolve from. If none
+ * is specified, the value of `import.meta.url` is used as the default.
+ */
+ resolve?(specified: string, parent?: string | URL): Promise<string>;
+ }
+ }
+ export = Module;
+}
+declare module 'node:module' {
+ import module = require('module');
+ export = module;
+}
diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts
new file mode 100755
index 0000000..92190b6
--- /dev/null
+++ b/node_modules/@types/node/net.d.ts
@@ -0,0 +1,893 @@
+/**
+ * > Stability: 2 - Stable
+ *
+ * The `node:net` module provides an asynchronous network API for creating stream-based
+ * TCP or `IPC` servers ({@link createServer}) and clients
+ * ({@link createConnection}).
+ *
+ * It can be accessed using:
+ *
+ * ```js
+ * const net = require('node:net');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/net.js)
+ */
+declare module 'net' {
+ import * as stream from 'node:stream';
+ import { Abortable, EventEmitter } from 'node:events';
+ import * as dns from 'node:dns';
+ type LookupFunction = (hostname: string, options: dns.LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: dns.LookupAddress[]) => void) => void;
+ interface AddressInfo {
+ address: string;
+ family: string;
+ port: number;
+ }
+ interface SocketConstructorOpts {
+ fd?: number | undefined;
+ allowHalfOpen?: boolean | undefined;
+ readable?: boolean | undefined;
+ writable?: boolean | undefined;
+ signal?: AbortSignal;
+ }
+ interface OnReadOpts {
+ buffer: Uint8Array | (() => Uint8Array);
+ /**
+ * This function is called for every chunk of incoming data.
+ * Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer.
+ * Return false from this function to implicitly pause() the socket.
+ */
+ callback(bytesWritten: number, buf: Uint8Array): boolean;
+ }
+ interface ConnectOpts {
+ /**
+ * If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket.
+ * Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will
+ * still be emitted as normal and methods like pause() and resume() will also behave as expected.
+ */
+ onread?: OnReadOpts | undefined;
+ }
+ interface TcpSocketConnectOpts extends ConnectOpts {
+ port: number;
+ host?: string | undefined;
+ localAddress?: string | undefined;
+ localPort?: number | undefined;
+ hints?: number | undefined;
+ family?: number | undefined;
+ lookup?: LookupFunction | undefined;
+ noDelay?: boolean | undefined;
+ keepAlive?: boolean | undefined;
+ keepAliveInitialDelay?: number | undefined;
+ /**
+ * @since v18.13.0
+ */
+ autoSelectFamily?: boolean | undefined;
+ /**
+ * @since v18.13.0
+ */
+ autoSelectFamilyAttemptTimeout?: number | undefined;
+ }
+ interface IpcSocketConnectOpts extends ConnectOpts {
+ path: string;
+ }
+ type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
+ type SocketReadyState = 'opening' | 'open' | 'readOnly' | 'writeOnly' | 'closed';
+ /**
+ * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint
+ * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also
+ * an `EventEmitter`.
+ *
+ * A `net.Socket` can be created by the user and used directly to interact with
+ * a server. For example, it is returned by {@link createConnection},
+ * so the user can use it to talk to the server.
+ *
+ * It can also be created by Node.js and passed to the user when a connection
+ * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use
+ * it to interact with the client.
+ * @since v0.3.4
+ */
+ class Socket extends stream.Duplex {
+ constructor(options?: SocketConstructorOpts);
+ /**
+ * Sends data on the socket. The second parameter specifies the encoding in the
+ * case of a string. It defaults to UTF8 encoding.
+ *
+ * Returns `true` if the entire data was flushed successfully to the kernel
+ * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free.
+ *
+ * The optional `callback` parameter will be executed when the data is finally
+ * written out, which may not be immediately.
+ *
+ * See `Writable` stream `write()` method for more
+ * information.
+ * @since v0.1.90
+ * @param [encoding='utf8'] Only used when data is `string`.
+ */
+ write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean;
+ write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error) => void): boolean;
+ /**
+ * Initiate a connection on a given socket.
+ *
+ * Possible signatures:
+ *
+ * * `socket.connect(options[, connectListener])`
+ * * `socket.connect(path[, connectListener])` for `IPC` connections.
+ * * `socket.connect(port[, host][, connectListener])` for TCP connections.
+ * * Returns: `net.Socket` The socket itself.
+ *
+ * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting,
+ * instead of a `'connect'` event, an `'error'` event will be emitted with
+ * the error passed to the `'error'` listener.
+ * The last parameter `connectListener`, if supplied, will be added as a listener
+ * for the `'connect'` event **once**.
+ *
+ * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined
+ * behavior.
+ */
+ connect(options: SocketConnectOpts, connectionListener?: () => void): this;
+ connect(port: number, host: string, connectionListener?: () => void): this;
+ connect(port: number, connectionListener?: () => void): this;
+ connect(path: string, connectionListener?: () => void): this;
+ /**
+ * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information.
+ * @since v0.1.90
+ * @return The socket itself.
+ */
+ setEncoding(encoding?: BufferEncoding): this;
+ /**
+ * Pauses the reading of data. That is, `'data'` events will not be emitted.
+ * Useful to throttle back an upload.
+ * @return The socket itself.
+ */
+ pause(): this;
+ /**
+ * Close the TCP connection by sending an RST packet and destroy the stream.
+ * If this TCP socket is in connecting status, it will send an RST packet and destroy this TCP socket once it is connected.
+ * Otherwise, it will call `socket.destroy` with an `ERR_SOCKET_CLOSED` Error.
+ * If this is not a TCP socket (for example, a pipe), calling this method will immediately throw an `ERR_INVALID_HANDLE_TYPE` Error.
+ * @since v18.3.0, v16.17.0
+ */
+ resetAndDestroy(): this;
+ /**
+ * Resumes reading after a call to `socket.pause()`.
+ * @return The socket itself.
+ */
+ resume(): this;
+ /**
+ * Sets the socket to timeout after `timeout` milliseconds of inactivity on
+ * the socket. By default `net.Socket` do not have a timeout.
+ *
+ * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to
+ * end the connection.
+ *
+ * ```js
+ * socket.setTimeout(3000);
+ * socket.on('timeout', () => {
+ * console.log('socket timeout');
+ * socket.end();
+ * });
+ * ```
+ *
+ * If `timeout` is 0, then the existing idle timeout is disabled.
+ *
+ * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event.
+ * @since v0.1.90
+ * @return The socket itself.
+ */
+ setTimeout(timeout: number, callback?: () => void): this;
+ /**
+ * Enable/disable the use of Nagle's algorithm.
+ *
+ * When a TCP connection is created, it will have Nagle's algorithm enabled.
+ *
+ * Nagle's algorithm delays data before it is sent via the network. It attempts
+ * to optimize throughput at the expense of latency.
+ *
+ * Passing `true` for `noDelay` or not passing an argument will disable Nagle's
+ * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's
+ * algorithm.
+ * @since v0.1.90
+ * @param [noDelay=true]
+ * @return The socket itself.
+ */
+ setNoDelay(noDelay?: boolean): this;
+ /**
+ * Enable/disable keep-alive functionality, and optionally set the initial
+ * delay before the first keepalive probe is sent on an idle socket.
+ *
+ * Set `initialDelay` (in milliseconds) to set the delay between the last
+ * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default
+ * (or previous) setting.
+ *
+ * Enabling the keep-alive functionality will set the following socket options:
+ *
+ * * `SO_KEEPALIVE=1`
+ * * `TCP_KEEPIDLE=initialDelay`
+ * * `TCP_KEEPCNT=10`
+ * * `TCP_KEEPINTVL=1`
+ * @since v0.1.92
+ * @param [enable=false]
+ * @param [initialDelay=0]
+ * @return The socket itself.
+ */
+ setKeepAlive(enable?: boolean, initialDelay?: number): this;
+ /**
+ * Returns the bound `address`, the address `family` name and `port` of the
+ * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
+ * @since v0.1.90
+ */
+ address(): AddressInfo | {};
+ /**
+ * Calling `unref()` on a socket will allow the program to exit if this is the only
+ * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect.
+ * @since v0.9.1
+ * @return The socket itself.
+ */
+ unref(): this;
+ /**
+ * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior).
+ * If the socket is `ref`ed calling `ref` again will have no effect.
+ * @since v0.9.1
+ * @return The socket itself.
+ */
+ ref(): this;
+ /**
+ * This property shows the number of characters buffered for writing. The buffer
+ * may contain strings whose length after encoding is not yet known. So this number
+ * is only an approximation of the number of bytes in the buffer.
+ *
+ * `net.Socket` has the property that `socket.write()` always works. This is to
+ * help users get up and running quickly. The computer cannot always keep up
+ * with the amount of data that is written to a socket. The network connection
+ * simply might be too slow. Node.js will internally queue up the data written to a
+ * socket and send it out over the wire when it is possible.
+ *
+ * The consequence of this internal buffering is that memory may grow.
+ * Users who experience large or growing `bufferSize` should attempt to
+ * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`.
+ * @since v0.3.8
+ * @deprecated Since v14.6.0 - Use `writableLength` instead.
+ */
+ readonly bufferSize: number;
+ /**
+ * The amount of received bytes.
+ * @since v0.5.3
+ */
+ readonly bytesRead: number;
+ /**
+ * The amount of bytes sent.
+ * @since v0.5.3
+ */
+ readonly bytesWritten: number;
+ /**
+ * If `true`,`socket.connect(options[, connectListener])` was
+ * called and has not yet finished. It will stay `true` until the socket becomes
+ * connected, then it is set to `false` and the `'connect'` event is emitted. Note
+ * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event.
+ * @since v6.1.0
+ */
+ readonly connecting: boolean;
+ /**
+ * This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting
+ * (see `socket.connecting`).
+ * @since v11.2.0, v10.16.0
+ */
+ readonly pending: boolean;
+ /**
+ * See `writable.destroyed` for further details.
+ */
+ readonly destroyed: boolean;
+ /**
+ * The string representation of the local IP address the remote client is
+ * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client
+ * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`.
+ * @since v0.9.6
+ */
+ readonly localAddress?: string;
+ /**
+ * The numeric representation of the local port. For example, `80` or `21`.
+ * @since v0.9.6
+ */
+ readonly localPort?: number;
+ /**
+ * The string representation of the local IP family. `'IPv4'` or `'IPv6'`.
+ * @since v18.8.0, v16.18.0
+ */
+ readonly localFamily?: string;
+ /**
+ * This property represents the state of the connection as a string.
+ *
+ * * If the stream is connecting `socket.readyState` is `opening`.
+ * * If the stream is readable and writable, it is `open`.
+ * * If the stream is readable and not writable, it is `readOnly`.
+ * * If the stream is not readable and writable, it is `writeOnly`.
+ * @since v0.5.0
+ */
+ readonly readyState: SocketReadyState;
+ /**
+ * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if
+ * the socket is destroyed (for example, if the client disconnected).
+ * @since v0.5.10
+ */
+ readonly remoteAddress?: string | undefined;
+ /**
+ * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. Value may be `undefined` if
+ * the socket is destroyed (for example, if the client disconnected).
+ * @since v0.11.14
+ */
+ readonly remoteFamily?: string | undefined;
+ /**
+ * The numeric representation of the remote port. For example, `80` or `21`. Value may be `undefined` if
+ * the socket is destroyed (for example, if the client disconnected).
+ * @since v0.5.10
+ */
+ readonly remotePort?: number | undefined;
+ /**
+ * The socket timeout in milliseconds as set by `socket.setTimeout()`.
+ * It is `undefined` if a timeout has not been set.
+ * @since v10.7.0
+ */
+ readonly timeout?: number | undefined;
+ /**
+ * Half-closes the socket. i.e., it sends a FIN packet. It is possible the
+ * server will still send some data.
+ *
+ * See `writable.end()` for further details.
+ * @since v0.1.90
+ * @param [encoding='utf8'] Only used when data is `string`.
+ * @param callback Optional callback for when the socket is finished.
+ * @return The socket itself.
+ */
+ end(callback?: () => void): this;
+ end(buffer: Uint8Array | string, callback?: () => void): this;
+ end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. connect
+ * 3. data
+ * 4. drain
+ * 5. end
+ * 6. error
+ * 7. lookup
+ * 8. ready
+ * 9. timeout
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: (hadError: boolean) => void): this;
+ addListener(event: 'connect', listener: () => void): this;
+ addListener(event: 'data', listener: (data: Buffer) => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ addListener(event: 'ready', listener: () => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close', hadError: boolean): boolean;
+ emit(event: 'connect'): boolean;
+ emit(event: 'data', data: Buffer): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'lookup', err: Error, address: string, family: string | number, host: string): boolean;
+ emit(event: 'ready'): boolean;
+ emit(event: 'timeout'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: (hadError: boolean) => void): this;
+ on(event: 'connect', listener: () => void): this;
+ on(event: 'data', listener: (data: Buffer) => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ on(event: 'ready', listener: () => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: (hadError: boolean) => void): this;
+ once(event: 'connect', listener: () => void): this;
+ once(event: 'data', listener: (data: Buffer) => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ once(event: 'ready', listener: () => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: (hadError: boolean) => void): this;
+ prependListener(event: 'connect', listener: () => void): this;
+ prependListener(event: 'data', listener: (data: Buffer) => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ prependListener(event: 'ready', listener: () => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: (hadError: boolean) => void): this;
+ prependOnceListener(event: 'connect', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (data: Buffer) => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ prependOnceListener(event: 'ready', listener: () => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ }
+ interface ListenOptions extends Abortable {
+ port?: number | undefined;
+ host?: string | undefined;
+ backlog?: number | undefined;
+ path?: string | undefined;
+ exclusive?: boolean | undefined;
+ readableAll?: boolean | undefined;
+ writableAll?: boolean | undefined;
+ /**
+ * @default false
+ */
+ ipv6Only?: boolean | undefined;
+ }
+ interface ServerOpts {
+ /**
+ * Indicates whether half-opened TCP connections are allowed.
+ * @default false
+ */
+ allowHalfOpen?: boolean | undefined;
+ /**
+ * Indicates whether the socket should be paused on incoming connections.
+ * @default false
+ */
+ pauseOnConnect?: boolean | undefined;
+ /**
+ * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
+ * @default false
+ * @since v16.5.0
+ */
+ noDelay?: boolean | undefined;
+ /**
+ * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received,
+ * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`.
+ * @default false
+ * @since v16.5.0
+ */
+ keepAlive?: boolean | undefined;
+ /**
+ * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.
+ * @default 0
+ * @since v16.5.0
+ */
+ keepAliveInitialDelay?: number | undefined;
+ }
+ interface DropArgument {
+ localAddress?: string;
+ localPort?: number;
+ localFamily?: string;
+ remoteAddress?: string;
+ remotePort?: number;
+ remoteFamily?: string;
+ }
+ /**
+ * This class is used to create a TCP or `IPC` server.
+ * @since v0.1.90
+ */
+ class Server extends EventEmitter {
+ constructor(connectionListener?: (socket: Socket) => void);
+ constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void);
+ /**
+ * Start a server listening for connections. A `net.Server` can be a TCP or
+ * an `IPC` server depending on what it listens to.
+ *
+ * Possible signatures:
+ *
+ * * `server.listen(handle[, backlog][, callback])`
+ * * `server.listen(options[, callback])`
+ * * `server.listen(path[, backlog][, callback])` for `IPC` servers
+ * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers
+ *
+ * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'`
+ * event.
+ *
+ * All `listen()` methods can take a `backlog` parameter to specify the maximum
+ * length of the queue of pending connections. The actual length will be determined
+ * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn`on Linux. The default value of this parameter is 511 (not 512).
+ *
+ * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for
+ * details).
+ *
+ * The `server.listen()` method can be called again if and only if there was an
+ * error during the first `server.listen()` call or `server.close()` has been
+ * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown.
+ *
+ * One of the most common errors raised when listening is `EADDRINUSE`.
+ * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry
+ * after a certain amount of time:
+ *
+ * ```js
+ * server.on('error', (e) => {
+ * if (e.code === 'EADDRINUSE') {
+ * console.error('Address in use, retrying...');
+ * setTimeout(() => {
+ * server.close();
+ * server.listen(PORT, HOST);
+ * }, 1000);
+ * }
+ * });
+ * ```
+ */
+ listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this;
+ listen(port?: number, hostname?: string, listeningListener?: () => void): this;
+ listen(port?: number, backlog?: number, listeningListener?: () => void): this;
+ listen(port?: number, listeningListener?: () => void): this;
+ listen(path: string, backlog?: number, listeningListener?: () => void): this;
+ listen(path: string, listeningListener?: () => void): this;
+ listen(options: ListenOptions, listeningListener?: () => void): this;
+ listen(handle: any, backlog?: number, listeningListener?: () => void): this;
+ listen(handle: any, listeningListener?: () => void): this;
+ /**
+ * Stops the server from accepting new connections and keeps existing
+ * connections. This function is asynchronous, the server is finally closed
+ * when all connections are ended and the server emits a `'close'` event.
+ * The optional `callback` will be called once the `'close'` event occurs. Unlike
+ * that event, it will be called with an `Error` as its only argument if the server
+ * was not open when it was closed.
+ * @since v0.1.90
+ * @param callback Called when the server is closed.
+ */
+ close(callback?: (err?: Error) => void): this;
+ /**
+ * Returns the bound `address`, the address `family` name, and `port` of the server
+ * as reported by the operating system if listening on an IP socket
+ * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`.
+ *
+ * For a server listening on a pipe or Unix domain socket, the name is returned
+ * as a string.
+ *
+ * ```js
+ * const server = net.createServer((socket) => {
+ * socket.end('goodbye\n');
+ * }).on('error', (err) => {
+ * // Handle errors here.
+ * throw err;
+ * });
+ *
+ * // Grab an arbitrary unused port.
+ * server.listen(() => {
+ * console.log('opened server on', server.address());
+ * });
+ * ```
+ *
+ * `server.address()` returns `null` before the `'listening'` event has been
+ * emitted or after calling `server.close()`.
+ * @since v0.1.90
+ */
+ address(): AddressInfo | string | null;
+ /**
+ * Asynchronously get the number of concurrent connections on the server. Works
+ * when sockets were sent to forks.
+ *
+ * Callback should take two arguments `err` and `count`.
+ * @since v0.9.7
+ */
+ getConnections(cb: (error: Error | null, count: number) => void): void;
+ /**
+ * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior).
+ * If the server is `ref`ed calling `ref()` again will have no effect.
+ * @since v0.9.1
+ */
+ ref(): this;
+ /**
+ * Calling `unref()` on a server will allow the program to exit if this is the only
+ * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect.
+ * @since v0.9.1
+ */
+ unref(): this;
+ /**
+ * Set this property to reject connections when the server's connection count gets
+ * high.
+ *
+ * It is not recommended to use this option once a socket has been sent to a child
+ * with `child_process.fork()`.
+ * @since v0.2.0
+ */
+ maxConnections: number;
+ connections: number;
+ /**
+ * Indicates whether or not the server is listening for connections.
+ * @since v5.7.0
+ */
+ listening: boolean;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. connection
+ * 3. error
+ * 4. listening
+ * 5. drop
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'connection', listener: (socket: Socket) => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'listening', listener: () => void): this;
+ addListener(event: 'drop', listener: (data?: DropArgument) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'connection', socket: Socket): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'listening'): boolean;
+ emit(event: 'drop', data?: DropArgument): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'connection', listener: (socket: Socket) => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'listening', listener: () => void): this;
+ on(event: 'drop', listener: (data?: DropArgument) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'connection', listener: (socket: Socket) => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'listening', listener: () => void): this;
+ once(event: 'drop', listener: (data?: DropArgument) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'connection', listener: (socket: Socket) => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'listening', listener: () => void): this;
+ prependListener(event: 'drop', listener: (data?: DropArgument) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'listening', listener: () => void): this;
+ prependOnceListener(event: 'drop', listener: (data?: DropArgument) => void): this;
+ /**
+ * Calls {@link Server.close()} and returns a promise that fulfills when the server has closed.
+ * @since v20.5.0
+ */
+ [Symbol.asyncDispose](): Promise<void>;
+ }
+ type IPVersion = 'ipv4' | 'ipv6';
+ /**
+ * The `BlockList` object can be used with some network APIs to specify rules for
+ * disabling inbound or outbound access to specific IP addresses, IP ranges, or
+ * IP subnets.
+ * @since v15.0.0, v14.18.0
+ */
+ class BlockList {
+ /**
+ * Adds a rule to block the given IP address.
+ * @since v15.0.0, v14.18.0
+ * @param address An IPv4 or IPv6 address.
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+ */
+ addAddress(address: string, type?: IPVersion): void;
+ addAddress(address: SocketAddress): void;
+ /**
+ * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive).
+ * @since v15.0.0, v14.18.0
+ * @param start The starting IPv4 or IPv6 address in the range.
+ * @param end The ending IPv4 or IPv6 address in the range.
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+ */
+ addRange(start: string, end: string, type?: IPVersion): void;
+ addRange(start: SocketAddress, end: SocketAddress): void;
+ /**
+ * Adds a rule to block a range of IP addresses specified as a subnet mask.
+ * @since v15.0.0, v14.18.0
+ * @param net The network IPv4 or IPv6 address.
+ * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`.
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+ */
+ addSubnet(net: SocketAddress, prefix: number): void;
+ addSubnet(net: string, prefix: number, type?: IPVersion): void;
+ /**
+ * Returns `true` if the given IP address matches any of the rules added to the`BlockList`.
+ *
+ * ```js
+ * const blockList = new net.BlockList();
+ * blockList.addAddress('123.123.123.123');
+ * blockList.addRange('10.0.0.1', '10.0.0.10');
+ * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6');
+ *
+ * console.log(blockList.check('123.123.123.123')); // Prints: true
+ * console.log(blockList.check('10.0.0.3')); // Prints: true
+ * console.log(blockList.check('222.111.111.222')); // Prints: false
+ *
+ * // IPv6 notation for IPv4 addresses works:
+ * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true
+ * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true
+ * ```
+ * @since v15.0.0, v14.18.0
+ * @param address The IP address to check
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+ */
+ check(address: SocketAddress): boolean;
+ check(address: string, type?: IPVersion): boolean;
+ }
+ interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts {
+ timeout?: number | undefined;
+ }
+ interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts {
+ timeout?: number | undefined;
+ }
+ type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts;
+ /**
+ * Creates a new TCP or `IPC` server.
+ *
+ * If `allowHalfOpen` is set to `true`, when the other end of the socket
+ * signals the end of transmission, the server will only send back the end of
+ * transmission when `socket.end()` is explicitly called. For example, in the
+ * context of TCP, when a FIN packed is received, a FIN packed is sent
+ * back only when `socket.end()` is explicitly called. Until then the
+ * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information.
+ *
+ * If `pauseOnConnect` is set to `true`, then the socket associated with each
+ * incoming connection will be paused, and no data will be read from its handle.
+ * This allows connections to be passed between processes without any data being
+ * read by the original process. To begin reading data from a paused socket, call `socket.resume()`.
+ *
+ * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to.
+ *
+ * Here is an example of a TCP echo server which listens for connections
+ * on port 8124:
+ *
+ * ```js
+ * const net = require('node:net');
+ * const server = net.createServer((c) => {
+ * // 'connection' listener.
+ * console.log('client connected');
+ * c.on('end', () => {
+ * console.log('client disconnected');
+ * });
+ * c.write('hello\r\n');
+ * c.pipe(c);
+ * });
+ * server.on('error', (err) => {
+ * throw err;
+ * });
+ * server.listen(8124, () => {
+ * console.log('server bound');
+ * });
+ * ```
+ *
+ * Test this by using `telnet`:
+ *
+ * ```bash
+ * telnet localhost 8124
+ * ```
+ *
+ * To listen on the socket `/tmp/echo.sock`:
+ *
+ * ```js
+ * server.listen('/tmp/echo.sock', () => {
+ * console.log('server bound');
+ * });
+ * ```
+ *
+ * Use `nc` to connect to a Unix domain socket server:
+ *
+ * ```bash
+ * nc -U /tmp/echo.sock
+ * ```
+ * @since v0.5.0
+ * @param connectionListener Automatically set as a listener for the {@link 'connection'} event.
+ */
+ function createServer(connectionListener?: (socket: Socket) => void): Server;
+ function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server;
+ /**
+ * Aliases to {@link createConnection}.
+ *
+ * Possible signatures:
+ *
+ * * {@link connect}
+ * * {@link connect} for `IPC` connections.
+ * * {@link connect} for TCP connections.
+ */
+ function connect(options: NetConnectOpts, connectionListener?: () => void): Socket;
+ function connect(port: number, host?: string, connectionListener?: () => void): Socket;
+ function connect(path: string, connectionListener?: () => void): Socket;
+ /**
+ * A factory function, which creates a new {@link Socket},
+ * immediately initiates connection with `socket.connect()`,
+ * then returns the `net.Socket` that starts the connection.
+ *
+ * When the connection is established, a `'connect'` event will be emitted
+ * on the returned socket. The last parameter `connectListener`, if supplied,
+ * will be added as a listener for the `'connect'` event **once**.
+ *
+ * Possible signatures:
+ *
+ * * {@link createConnection}
+ * * {@link createConnection} for `IPC` connections.
+ * * {@link createConnection} for TCP connections.
+ *
+ * The {@link connect} function is an alias to this function.
+ */
+ function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket;
+ function createConnection(port: number, host?: string, connectionListener?: () => void): Socket;
+ function createConnection(path: string, connectionListener?: () => void): Socket;
+ /**
+ * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4
+ * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`.
+ *
+ * ```js
+ * net.isIP('::1'); // returns 6
+ * net.isIP('127.0.0.1'); // returns 4
+ * net.isIP('127.000.000.001'); // returns 0
+ * net.isIP('127.0.0.1/24'); // returns 0
+ * net.isIP('fhqwhgads'); // returns 0
+ * ```
+ * @since v0.3.0
+ */
+ function isIP(input: string): number;
+ /**
+ * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no
+ * leading zeroes. Otherwise, returns `false`.
+ *
+ * ```js
+ * net.isIPv4('127.0.0.1'); // returns true
+ * net.isIPv4('127.000.000.001'); // returns false
+ * net.isIPv4('127.0.0.1/24'); // returns false
+ * net.isIPv4('fhqwhgads'); // returns false
+ * ```
+ * @since v0.3.0
+ */
+ function isIPv4(input: string): boolean;
+ /**
+ * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`.
+ *
+ * ```js
+ * net.isIPv6('::1'); // returns true
+ * net.isIPv6('fhqwhgads'); // returns false
+ * ```
+ * @since v0.3.0
+ */
+ function isIPv6(input: string): boolean;
+ interface SocketAddressInitOptions {
+ /**
+ * The network address as either an IPv4 or IPv6 string.
+ * @default 127.0.0.1
+ */
+ address?: string | undefined;
+ /**
+ * @default `'ipv4'`
+ */
+ family?: IPVersion | undefined;
+ /**
+ * An IPv6 flow-label used only if `family` is `'ipv6'`.
+ * @default 0
+ */
+ flowlabel?: number | undefined;
+ /**
+ * An IP port.
+ * @default 0
+ */
+ port?: number | undefined;
+ }
+ /**
+ * @since v15.14.0, v14.18.0
+ */
+ class SocketAddress {
+ constructor(options: SocketAddressInitOptions);
+ /**
+ * Either \`'ipv4'\` or \`'ipv6'\`.
+ * @since v15.14.0, v14.18.0
+ */
+ readonly address: string;
+ /**
+ * Either \`'ipv4'\` or \`'ipv6'\`.
+ * @since v15.14.0, v14.18.0
+ */
+ readonly family: IPVersion;
+ /**
+ * @since v15.14.0, v14.18.0
+ */
+ readonly port: number;
+ /**
+ * @since v15.14.0, v14.18.0
+ */
+ readonly flowlabel: number;
+ }
+}
+declare module 'node:net' {
+ export * from 'net';
+}
diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts
new file mode 100755
index 0000000..3d20864
--- /dev/null
+++ b/node_modules/@types/node/os.d.ts
@@ -0,0 +1,477 @@
+/**
+ * The `node:os` module provides operating system-related utility methods and
+ * properties. It can be accessed using:
+ *
+ * ```js
+ * const os = require('node:os');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/os.js)
+ */
+declare module 'os' {
+ interface CpuInfo {
+ model: string;
+ speed: number;
+ times: {
+ user: number;
+ nice: number;
+ sys: number;
+ idle: number;
+ irq: number;
+ };
+ }
+ interface NetworkInterfaceBase {
+ address: string;
+ netmask: string;
+ mac: string;
+ internal: boolean;
+ cidr: string | null;
+ }
+ interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
+ family: 'IPv4';
+ scopeid?: undefined;
+ }
+ interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
+ family: 'IPv6';
+ scopeid: number;
+ }
+ interface UserInfo<T> {
+ username: T;
+ uid: number;
+ gid: number;
+ shell: T;
+ homedir: T;
+ }
+ type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
+ /**
+ * Returns the host name of the operating system as a string.
+ * @since v0.3.3
+ */
+ function hostname(): string;
+ /**
+ * Returns an array containing the 1, 5, and 15 minute load averages.
+ *
+ * The load average is a measure of system activity calculated by the operating
+ * system and expressed as a fractional number.
+ *
+ * The load average is a Unix-specific concept. On Windows, the return value is
+ * always `[0, 0, 0]`.
+ * @since v0.3.3
+ */
+ function loadavg(): number[];
+ /**
+ * Returns the system uptime in number of seconds.
+ * @since v0.3.3
+ */
+ function uptime(): number;
+ /**
+ * Returns the amount of free system memory in bytes as an integer.
+ * @since v0.3.3
+ */
+ function freemem(): number;
+ /**
+ * Returns the total amount of system memory in bytes as an integer.
+ * @since v0.3.3
+ */
+ function totalmem(): number;
+ /**
+ * Returns an array of objects containing information about each logical CPU core.
+ * The array will be empty if no CPU information is available, such as if the`/proc` file system is unavailable.
+ *
+ * The properties included on each object include:
+ *
+ * ```js
+ * [
+ * {
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
+ * speed: 2926,
+ * times: {
+ * user: 252020,
+ * nice: 0,
+ * sys: 30340,
+ * idle: 1070356870,
+ * irq: 0,
+ * },
+ * },
+ * {
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
+ * speed: 2926,
+ * times: {
+ * user: 306960,
+ * nice: 0,
+ * sys: 26980,
+ * idle: 1071569080,
+ * irq: 0,
+ * },
+ * },
+ * {
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
+ * speed: 2926,
+ * times: {
+ * user: 248450,
+ * nice: 0,
+ * sys: 21750,
+ * idle: 1070919370,
+ * irq: 0,
+ * },
+ * },
+ * {
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
+ * speed: 2926,
+ * times: {
+ * user: 256880,
+ * nice: 0,
+ * sys: 19430,
+ * idle: 1070905480,
+ * irq: 20,
+ * },
+ * },
+ * ]
+ * ```
+ *
+ * `nice` values are POSIX-only. On Windows, the `nice` values of all processors
+ * are always 0.
+ *
+ * `os.cpus().length` should not be used to calculate the amount of parallelism
+ * available to an application. Use {@link availableParallelism} for this purpose.
+ * @since v0.3.3
+ */
+ function cpus(): CpuInfo[];
+ /**
+ * Returns an estimate of the default amount of parallelism a program should use.
+ * Always returns a value greater than zero.
+ *
+ * This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism).
+ * @since v19.4.0, v18.14.0
+ */
+ function availableParallelism(): number;
+ /**
+ * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it
+ * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.
+ *
+ * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information
+ * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems.
+ * @since v0.3.3
+ */
+ function type(): string;
+ /**
+ * Returns the operating system as a string.
+ *
+ * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See
+ * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
+ * @since v0.3.3
+ */
+ function release(): string;
+ /**
+ * Returns an object containing network interfaces that have been assigned a
+ * network address.
+ *
+ * Each key on the returned object identifies a network interface. The associated
+ * value is an array of objects that each describe an assigned network address.
+ *
+ * The properties available on the assigned network address object include:
+ *
+ * ```js
+ * {
+ * lo: [
+ * {
+ * address: '127.0.0.1',
+ * netmask: '255.0.0.0',
+ * family: 'IPv4',
+ * mac: '00:00:00:00:00:00',
+ * internal: true,
+ * cidr: '127.0.0.1/8'
+ * },
+ * {
+ * address: '::1',
+ * netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
+ * family: 'IPv6',
+ * mac: '00:00:00:00:00:00',
+ * scopeid: 0,
+ * internal: true,
+ * cidr: '::1/128'
+ * }
+ * ],
+ * eth0: [
+ * {
+ * address: '192.168.1.108',
+ * netmask: '255.255.255.0',
+ * family: 'IPv4',
+ * mac: '01:02:03:0a:0b:0c',
+ * internal: false,
+ * cidr: '192.168.1.108/24'
+ * },
+ * {
+ * address: 'fe80::a00:27ff:fe4e:66a1',
+ * netmask: 'ffff:ffff:ffff:ffff::',
+ * family: 'IPv6',
+ * mac: '01:02:03:0a:0b:0c',
+ * scopeid: 1,
+ * internal: false,
+ * cidr: 'fe80::a00:27ff:fe4e:66a1/64'
+ * }
+ * ]
+ * }
+ * ```
+ * @since v0.6.0
+ */
+ function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
+ /**
+ * Returns the string path of the current user's home directory.
+ *
+ * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it
+ * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory.
+ *
+ * On Windows, it uses the `USERPROFILE` environment variable if defined.
+ * Otherwise it uses the path to the profile directory of the current user.
+ * @since v2.3.0
+ */
+ function homedir(): string;
+ /**
+ * Returns information about the currently effective user. On POSIX platforms,
+ * this is typically a subset of the password file. The returned object includes
+ * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and`gid` fields are `-1`, and `shell` is `null`.
+ *
+ * The value of `homedir` returned by `os.userInfo()` is provided by the operating
+ * system. This differs from the result of `os.homedir()`, which queries
+ * environment variables for the home directory before falling back to the
+ * operating system response.
+ *
+ * Throws a `SystemError` if a user has no `username` or `homedir`.
+ * @since v6.0.0
+ */
+ function userInfo(options: { encoding: 'buffer' }): UserInfo<Buffer>;
+ function userInfo(options?: { encoding: BufferEncoding }): UserInfo<string>;
+ type SignalConstants = {
+ [key in NodeJS.Signals]: number;
+ };
+ namespace constants {
+ const UV_UDP_REUSEADDR: number;
+ namespace signals {}
+ const signals: SignalConstants;
+ namespace errno {
+ const E2BIG: number;
+ const EACCES: number;
+ const EADDRINUSE: number;
+ const EADDRNOTAVAIL: number;
+ const EAFNOSUPPORT: number;
+ const EAGAIN: number;
+ const EALREADY: number;
+ const EBADF: number;
+ const EBADMSG: number;
+ const EBUSY: number;
+ const ECANCELED: number;
+ const ECHILD: number;
+ const ECONNABORTED: number;
+ const ECONNREFUSED: number;
+ const ECONNRESET: number;
+ const EDEADLK: number;
+ const EDESTADDRREQ: number;
+ const EDOM: number;
+ const EDQUOT: number;
+ const EEXIST: number;
+ const EFAULT: number;
+ const EFBIG: number;
+ const EHOSTUNREACH: number;
+ const EIDRM: number;
+ const EILSEQ: number;
+ const EINPROGRESS: number;
+ const EINTR: number;
+ const EINVAL: number;
+ const EIO: number;
+ const EISCONN: number;
+ const EISDIR: number;
+ const ELOOP: number;
+ const EMFILE: number;
+ const EMLINK: number;
+ const EMSGSIZE: number;
+ const EMULTIHOP: number;
+ const ENAMETOOLONG: number;
+ const ENETDOWN: number;
+ const ENETRESET: number;
+ const ENETUNREACH: number;
+ const ENFILE: number;
+ const ENOBUFS: number;
+ const ENODATA: number;
+ const ENODEV: number;
+ const ENOENT: number;
+ const ENOEXEC: number;
+ const ENOLCK: number;
+ const ENOLINK: number;
+ const ENOMEM: number;
+ const ENOMSG: number;
+ const ENOPROTOOPT: number;
+ const ENOSPC: number;
+ const ENOSR: number;
+ const ENOSTR: number;
+ const ENOSYS: number;
+ const ENOTCONN: number;
+ const ENOTDIR: number;
+ const ENOTEMPTY: number;
+ const ENOTSOCK: number;
+ const ENOTSUP: number;
+ const ENOTTY: number;
+ const ENXIO: number;
+ const EOPNOTSUPP: number;
+ const EOVERFLOW: number;
+ const EPERM: number;
+ const EPIPE: number;
+ const EPROTO: number;
+ const EPROTONOSUPPORT: number;
+ const EPROTOTYPE: number;
+ const ERANGE: number;
+ const EROFS: number;
+ const ESPIPE: number;
+ const ESRCH: number;
+ const ESTALE: number;
+ const ETIME: number;
+ const ETIMEDOUT: number;
+ const ETXTBSY: number;
+ const EWOULDBLOCK: number;
+ const EXDEV: number;
+ const WSAEINTR: number;
+ const WSAEBADF: number;
+ const WSAEACCES: number;
+ const WSAEFAULT: number;
+ const WSAEINVAL: number;
+ const WSAEMFILE: number;
+ const WSAEWOULDBLOCK: number;
+ const WSAEINPROGRESS: number;
+ const WSAEALREADY: number;
+ const WSAENOTSOCK: number;
+ const WSAEDESTADDRREQ: number;
+ const WSAEMSGSIZE: number;
+ const WSAEPROTOTYPE: number;
+ const WSAENOPROTOOPT: number;
+ const WSAEPROTONOSUPPORT: number;
+ const WSAESOCKTNOSUPPORT: number;
+ const WSAEOPNOTSUPP: number;
+ const WSAEPFNOSUPPORT: number;
+ const WSAEAFNOSUPPORT: number;
+ const WSAEADDRINUSE: number;
+ const WSAEADDRNOTAVAIL: number;
+ const WSAENETDOWN: number;
+ const WSAENETUNREACH: number;
+ const WSAENETRESET: number;
+ const WSAECONNABORTED: number;
+ const WSAECONNRESET: number;
+ const WSAENOBUFS: number;
+ const WSAEISCONN: number;
+ const WSAENOTCONN: number;
+ const WSAESHUTDOWN: number;
+ const WSAETOOMANYREFS: number;
+ const WSAETIMEDOUT: number;
+ const WSAECONNREFUSED: number;
+ const WSAELOOP: number;
+ const WSAENAMETOOLONG: number;
+ const WSAEHOSTDOWN: number;
+ const WSAEHOSTUNREACH: number;
+ const WSAENOTEMPTY: number;
+ const WSAEPROCLIM: number;
+ const WSAEUSERS: number;
+ const WSAEDQUOT: number;
+ const WSAESTALE: number;
+ const WSAEREMOTE: number;
+ const WSASYSNOTREADY: number;
+ const WSAVERNOTSUPPORTED: number;
+ const WSANOTINITIALISED: number;
+ const WSAEDISCON: number;
+ const WSAENOMORE: number;
+ const WSAECANCELLED: number;
+ const WSAEINVALIDPROCTABLE: number;
+ const WSAEINVALIDPROVIDER: number;
+ const WSAEPROVIDERFAILEDINIT: number;
+ const WSASYSCALLFAILURE: number;
+ const WSASERVICE_NOT_FOUND: number;
+ const WSATYPE_NOT_FOUND: number;
+ const WSA_E_NO_MORE: number;
+ const WSA_E_CANCELLED: number;
+ const WSAEREFUSED: number;
+ }
+ namespace priority {
+ const PRIORITY_LOW: number;
+ const PRIORITY_BELOW_NORMAL: number;
+ const PRIORITY_NORMAL: number;
+ const PRIORITY_ABOVE_NORMAL: number;
+ const PRIORITY_HIGH: number;
+ const PRIORITY_HIGHEST: number;
+ }
+ }
+ const devNull: string;
+ const EOL: string;
+ /**
+ * Returns the operating system CPU architecture for which the Node.js binary was
+ * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`.
+ *
+ * The return value is equivalent to `process.arch`.
+ * @since v0.5.0
+ */
+ function arch(): string;
+ /**
+ * Returns a string identifying the kernel version.
+ *
+ * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
+ * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
+ * @since v13.11.0, v12.17.0
+ */
+ function version(): string;
+ /**
+ * Returns a string identifying the operating system platform for which
+ * the Node.js binary was compiled. The value is set at compile time.
+ * Possible values are `'aix'`, `'darwin'`, `'freebsd'`,`'linux'`,`'openbsd'`, `'sunos'`, and `'win32'`.
+ *
+ * The return value is equivalent to `process.platform`.
+ *
+ * The value `'android'` may also be returned if Node.js is built on the Android
+ * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
+ * @since v0.5.0
+ */
+ function platform(): NodeJS.Platform;
+ /**
+ * Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`,`mips`, `mips64`, `ppc64`, `ppc64le`, `s390`, `s390x`, `i386`, `i686`, `x86_64`.
+ *
+ * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
+ * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
+ * @since v18.9.0, v16.18.0
+ */
+ function machine(): string;
+ /**
+ * Returns the operating system's default directory for temporary files as a
+ * string.
+ * @since v0.9.9
+ */
+ function tmpdir(): string;
+ /**
+ * Returns a string identifying the endianness of the CPU for which the Node.js
+ * binary was compiled.
+ *
+ * Possible values are `'BE'` for big endian and `'LE'` for little endian.
+ * @since v0.9.4
+ */
+ function endianness(): 'BE' | 'LE';
+ /**
+ * Returns the scheduling priority for the process specified by `pid`. If `pid` is
+ * not provided or is `0`, the priority of the current process is returned.
+ * @since v10.10.0
+ * @param [pid=0] The process ID to retrieve scheduling priority for.
+ */
+ function getPriority(pid?: number): number;
+ /**
+ * Attempts to set the scheduling priority for the process specified by `pid`. If`pid` is not provided or is `0`, the process ID of the current process is used.
+ *
+ * The `priority` input must be an integer between `-20` (high priority) and `19`(low priority). Due to differences between Unix priority levels and Windows
+ * priority classes, `priority` is mapped to one of six priority constants in`os.constants.priority`. When retrieving a process priority level, this range
+ * mapping may cause the return value to be slightly different on Windows. To avoid
+ * confusion, set `priority` to one of the priority constants.
+ *
+ * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user
+ * privileges. Otherwise the set priority will be silently reduced to`PRIORITY_HIGH`.
+ * @since v10.10.0
+ * @param [pid=0] The process ID to set scheduling priority for.
+ * @param priority The scheduling priority to assign to the process.
+ */
+ function setPriority(priority: number): void;
+ function setPriority(pid: number, priority: number): void;
+}
+declare module 'node:os' {
+ export * from 'os';
+}
diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json
new file mode 100755
index 0000000..7985df5
--- /dev/null
+++ b/node_modules/@types/node/package.json
@@ -0,0 +1,232 @@
+{
+ "name": "@types/node",
+ "version": "20.5.8",
+ "description": "TypeScript definitions for Node.js",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Microsoft TypeScript",
+ "url": "https://github.com/Microsoft",
+ "githubUsername": "Microsoft"
+ },
+ {
+ "name": "DefinitelyTyped",
+ "url": "https://github.com/DefinitelyTyped",
+ "githubUsername": "DefinitelyTyped"
+ },
+ {
+ "name": "Alberto Schiabel",
+ "url": "https://github.com/jkomyno",
+ "githubUsername": "jkomyno"
+ },
+ {
+ "name": "Alvis HT Tang",
+ "url": "https://github.com/alvis",
+ "githubUsername": "alvis"
+ },
+ {
+ "name": "Andrew Makarov",
+ "url": "https://github.com/r3nya",
+ "githubUsername": "r3nya"
+ },
+ {
+ "name": "Benjamin Toueg",
+ "url": "https://github.com/btoueg",
+ "githubUsername": "btoueg"
+ },
+ {
+ "name": "Chigozirim C.",
+ "url": "https://github.com/smac89",
+ "githubUsername": "smac89"
+ },
+ {
+ "name": "David Junger",
+ "url": "https://github.com/touffy",
+ "githubUsername": "touffy"
+ },
+ {
+ "name": "Deividas Bakanas",
+ "url": "https://github.com/DeividasBakanas",
+ "githubUsername": "DeividasBakanas"
+ },
+ {
+ "name": "Eugene Y. Q. Shen",
+ "url": "https://github.com/eyqs",
+ "githubUsername": "eyqs"
+ },
+ {
+ "name": "Hannes Magnusson",
+ "url": "https://github.com/Hannes-Magnusson-CK",
+ "githubUsername": "Hannes-Magnusson-CK"
+ },
+ {
+ "name": "Huw",
+ "url": "https://github.com/hoo29",
+ "githubUsername": "hoo29"
+ },
+ {
+ "name": "Kelvin Jin",
+ "url": "https://github.com/kjin",
+ "githubUsername": "kjin"
+ },
+ {
+ "name": "Klaus Meinhardt",
+ "url": "https://github.com/ajafff",
+ "githubUsername": "ajafff"
+ },
+ {
+ "name": "Lishude",
+ "url": "https://github.com/islishude",
+ "githubUsername": "islishude"
+ },
+ {
+ "name": "Mariusz Wiktorczyk",
+ "url": "https://github.com/mwiktorczyk",
+ "githubUsername": "mwiktorczyk"
+ },
+ {
+ "name": "Mohsen Azimi",
+ "url": "https://github.com/mohsen1",
+ "githubUsername": "mohsen1"
+ },
+ {
+ "name": "Nicolas Even",
+ "url": "https://github.com/n-e",
+ "githubUsername": "n-e"
+ },
+ {
+ "name": "Nikita Galkin",
+ "url": "https://github.com/galkin",
+ "githubUsername": "galkin"
+ },
+ {
+ "name": "Parambir Singh",
+ "url": "https://github.com/parambirs",
+ "githubUsername": "parambirs"
+ },
+ {
+ "name": "Sebastian Silbermann",
+ "url": "https://github.com/eps1lon",
+ "githubUsername": "eps1lon"
+ },
+ {
+ "name": "Thomas den Hollander",
+ "url": "https://github.com/ThomasdenH",
+ "githubUsername": "ThomasdenH"
+ },
+ {
+ "name": "Wilco Bakker",
+ "url": "https://github.com/WilcoBakker",
+ "githubUsername": "WilcoBakker"
+ },
+ {
+ "name": "wwwy3y3",
+ "url": "https://github.com/wwwy3y3",
+ "githubUsername": "wwwy3y3"
+ },
+ {
+ "name": "Samuel Ainsworth",
+ "url": "https://github.com/samuela",
+ "githubUsername": "samuela"
+ },
+ {
+ "name": "Kyle Uehlein",
+ "url": "https://github.com/kuehlein",
+ "githubUsername": "kuehlein"
+ },
+ {
+ "name": "Thanik Bhongbhibhat",
+ "url": "https://github.com/bhongy",
+ "githubUsername": "bhongy"
+ },
+ {
+ "name": "Marcin Kopacz",
+ "url": "https://github.com/chyzwar",
+ "githubUsername": "chyzwar"
+ },
+ {
+ "name": "Trivikram Kamat",
+ "url": "https://github.com/trivikr",
+ "githubUsername": "trivikr"
+ },
+ {
+ "name": "Junxiao Shi",
+ "url": "https://github.com/yoursunny",
+ "githubUsername": "yoursunny"
+ },
+ {
+ "name": "Ilia Baryshnikov",
+ "url": "https://github.com/qwelias",
+ "githubUsername": "qwelias"
+ },
+ {
+ "name": "ExE Boss",
+ "url": "https://github.com/ExE-Boss",
+ "githubUsername": "ExE-Boss"
+ },
+ {
+ "name": "Piotr Błażejewicz",
+ "url": "https://github.com/peterblazejewicz",
+ "githubUsername": "peterblazejewicz"
+ },
+ {
+ "name": "Anna Henningsen",
+ "url": "https://github.com/addaleax",
+ "githubUsername": "addaleax"
+ },
+ {
+ "name": "Victor Perin",
+ "url": "https://github.com/victorperin",
+ "githubUsername": "victorperin"
+ },
+ {
+ "name": "Yongsheng Zhang",
+ "url": "https://github.com/ZYSzys",
+ "githubUsername": "ZYSzys"
+ },
+ {
+ "name": "NodeJS Contributors",
+ "url": "https://github.com/NodeJS",
+ "githubUsername": "NodeJS"
+ },
+ {
+ "name": "Linus Unnebäck",
+ "url": "https://github.com/LinusU",
+ "githubUsername": "LinusU"
+ },
+ {
+ "name": "wafuwafu13",
+ "url": "https://github.com/wafuwafu13",
+ "githubUsername": "wafuwafu13"
+ },
+ {
+ "name": "Matteo Collina",
+ "url": "https://github.com/mcollina",
+ "githubUsername": "mcollina"
+ },
+ {
+ "name": "Dmitry Semigradsky",
+ "url": "https://github.com/Semigradsky",
+ "githubUsername": "Semigradsky"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "typesVersions": {
+ "<=4.8": {
+ "*": [
+ "ts4.8/*"
+ ]
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/node"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "typesPublisherContentHash": "052e69b2fc7bef54c95a0177aa5b5ca68a526de90fc86fa12048c32e143a1e5e",
+ "typeScriptVersion": "4.3"
+} \ No newline at end of file
diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts
new file mode 100755
index 0000000..723d5da
--- /dev/null
+++ b/node_modules/@types/node/path.d.ts
@@ -0,0 +1,191 @@
+declare module 'path/posix' {
+ import path = require('path');
+ export = path;
+}
+declare module 'path/win32' {
+ import path = require('path');
+ export = path;
+}
+/**
+ * The `node:path` module provides utilities for working with file and directory
+ * paths. It can be accessed using:
+ *
+ * ```js
+ * const path = require('node:path');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/path.js)
+ */
+declare module 'path' {
+ namespace path {
+ /**
+ * A parsed path object generated by path.parse() or consumed by path.format().
+ */
+ interface ParsedPath {
+ /**
+ * The root of the path such as '/' or 'c:\'
+ */
+ root: string;
+ /**
+ * The full directory path such as '/home/user/dir' or 'c:\path\dir'
+ */
+ dir: string;
+ /**
+ * The file name including extension (if any) such as 'index.html'
+ */
+ base: string;
+ /**
+ * The file extension (if any) such as '.html'
+ */
+ ext: string;
+ /**
+ * The file name without extension (if any) such as 'index'
+ */
+ name: string;
+ }
+ interface FormatInputPathObject {
+ /**
+ * The root of the path such as '/' or 'c:\'
+ */
+ root?: string | undefined;
+ /**
+ * The full directory path such as '/home/user/dir' or 'c:\path\dir'
+ */
+ dir?: string | undefined;
+ /**
+ * The file name including extension (if any) such as 'index.html'
+ */
+ base?: string | undefined;
+ /**
+ * The file extension (if any) such as '.html'
+ */
+ ext?: string | undefined;
+ /**
+ * The file name without extension (if any) such as 'index'
+ */
+ name?: string | undefined;
+ }
+ interface PlatformPath {
+ /**
+ * Normalize a string path, reducing '..' and '.' parts.
+ * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
+ *
+ * @param path string path to normalize.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ normalize(path: string): string;
+ /**
+ * Join all arguments together and normalize the resulting path.
+ *
+ * @param paths paths to join.
+ * @throws {TypeError} if any of the path segments is not a string.
+ */
+ join(...paths: string[]): string;
+ /**
+ * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
+ *
+ * Starting from leftmost {from} parameter, resolves {to} to an absolute path.
+ *
+ * If {to} isn't already absolute, {from} arguments are prepended in right to left order,
+ * until an absolute path is found. If after using all {from} paths still no absolute path is found,
+ * the current working directory is used as well. The resulting path is normalized,
+ * and trailing slashes are removed unless the path gets resolved to the root directory.
+ *
+ * @param paths A sequence of paths or path segments.
+ * @throws {TypeError} if any of the arguments is not a string.
+ */
+ resolve(...paths: string[]): string;
+ /**
+ * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
+ *
+ * If the given {path} is a zero-length string, `false` will be returned.
+ *
+ * @param path path to test.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ isAbsolute(path: string): boolean;
+ /**
+ * Solve the relative path from {from} to {to} based on the current working directory.
+ * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
+ *
+ * @throws {TypeError} if either `from` or `to` is not a string.
+ */
+ relative(from: string, to: string): string;
+ /**
+ * Return the directory name of a path. Similar to the Unix dirname command.
+ *
+ * @param path the path to evaluate.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ dirname(path: string): string;
+ /**
+ * Return the last portion of a path. Similar to the Unix basename command.
+ * Often used to extract the file name from a fully qualified path.
+ *
+ * @param path the path to evaluate.
+ * @param suffix optionally, an extension to remove from the result.
+ * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string.
+ */
+ basename(path: string, suffix?: string): string;
+ /**
+ * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
+ * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.
+ *
+ * @param path the path to evaluate.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ extname(path: string): string;
+ /**
+ * The platform-specific file separator. '\\' or '/'.
+ */
+ readonly sep: '\\' | '/';
+ /**
+ * The platform-specific file delimiter. ';' or ':'.
+ */
+ readonly delimiter: ';' | ':';
+ /**
+ * Returns an object from a path string - the opposite of format().
+ *
+ * @param path path to evaluate.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ parse(path: string): ParsedPath;
+ /**
+ * Returns a path string from an object - the opposite of parse().
+ *
+ * @param pathObject path to evaluate.
+ */
+ format(pathObject: FormatInputPathObject): string;
+ /**
+ * On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
+ * If path is not a string, path will be returned without modifications.
+ * This method is meaningful only on Windows system.
+ * On POSIX systems, the method is non-operational and always returns path without modifications.
+ */
+ toNamespacedPath(path: string): string;
+ /**
+ * Posix specific pathing.
+ * Same as parent object on posix.
+ */
+ readonly posix: PlatformPath;
+ /**
+ * Windows specific pathing.
+ * Same as parent object on windows
+ */
+ readonly win32: PlatformPath;
+ }
+ }
+ const path: path.PlatformPath;
+ export = path;
+}
+declare module 'node:path' {
+ import path = require('path');
+ export = path;
+}
+declare module 'node:path/posix' {
+ import path = require('path/posix');
+ export = path;
+}
+declare module 'node:path/win32' {
+ import path = require('path/win32');
+ export = path;
+}
diff --git a/node_modules/@types/node/perf_hooks.d.ts b/node_modules/@types/node/perf_hooks.d.ts
new file mode 100755
index 0000000..48d1848
--- /dev/null
+++ b/node_modules/@types/node/perf_hooks.d.ts
@@ -0,0 +1,638 @@
+/**
+ * This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for
+ * Node.js-specific performance measurements.
+ *
+ * Node.js supports the following [Web Performance APIs](https://w3c.github.io/perf-timing-primer/):
+ *
+ * * [High Resolution Time](https://www.w3.org/TR/hr-time-2)
+ * * [Performance Timeline](https://w3c.github.io/performance-timeline/)
+ * * [User Timing](https://www.w3.org/TR/user-timing/)
+ * * [Resource Timing](https://www.w3.org/TR/resource-timing-2/)
+ *
+ * ```js
+ * const { PerformanceObserver, performance } = require('node:perf_hooks');
+ *
+ * const obs = new PerformanceObserver((items) => {
+ * console.log(items.getEntries()[0].duration);
+ * performance.clearMarks();
+ * });
+ * obs.observe({ type: 'measure' });
+ * performance.measure('Start to Now');
+ *
+ * performance.mark('A');
+ * doSomeLongRunningProcess(() => {
+ * performance.measure('A to Now', 'A');
+ *
+ * performance.mark('B');
+ * performance.measure('A to B', 'A', 'B');
+ * });
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/perf_hooks.js)
+ */
+declare module 'perf_hooks' {
+ import { AsyncResource } from 'node:async_hooks';
+ type EntryType = 'node' | 'mark' | 'measure' | 'gc' | 'function' | 'http2' | 'http' | 'dns';
+ interface NodeGCPerformanceDetail {
+ /**
+ * When `performanceEntry.entryType` is equal to 'gc', `the performance.kind` property identifies
+ * the type of garbage collection operation that occurred.
+ * See perf_hooks.constants for valid values.
+ */
+ readonly kind?: number | undefined;
+ /**
+ * When `performanceEntry.entryType` is equal to 'gc', the `performance.flags`
+ * property contains additional information about garbage collection operation.
+ * See perf_hooks.constants for valid values.
+ */
+ readonly flags?: number | undefined;
+ }
+ /**
+ * The constructor of this class is not exposed to users directly.
+ * @since v8.5.0
+ */
+ class PerformanceEntry {
+ protected constructor();
+ /**
+ * The total number of milliseconds elapsed for this entry. This value will not
+ * be meaningful for all Performance Entry types.
+ * @since v8.5.0
+ */
+ readonly duration: number;
+ /**
+ * The name of the performance entry.
+ * @since v8.5.0
+ */
+ readonly name: string;
+ /**
+ * The high resolution millisecond timestamp marking the starting time of the
+ * Performance Entry.
+ * @since v8.5.0
+ */
+ readonly startTime: number;
+ /**
+ * The type of the performance entry. It may be one of:
+ *
+ * * `'node'` (Node.js only)
+ * * `'mark'` (available on the Web)
+ * * `'measure'` (available on the Web)
+ * * `'gc'` (Node.js only)
+ * * `'function'` (Node.js only)
+ * * `'http2'` (Node.js only)
+ * * `'http'` (Node.js only)
+ * @since v8.5.0
+ */
+ readonly entryType: EntryType;
+ /**
+ * Additional detail specific to the `entryType`.
+ * @since v16.0.0
+ */
+ readonly detail?: NodeGCPerformanceDetail | unknown | undefined; // TODO: Narrow this based on entry type.
+ toJSON(): any;
+ }
+ /**
+ * Exposes marks created via the `Performance.mark()` method.
+ * @since v18.2.0, v16.17.0
+ */
+ class PerformanceMark extends PerformanceEntry {
+ readonly duration: 0;
+ readonly entryType: 'mark';
+ }
+ /**
+ * Exposes measures created via the `Performance.measure()` method.
+ *
+ * The constructor of this class is not exposed to users directly.
+ * @since v18.2.0, v16.17.0
+ */
+ class PerformanceMeasure extends PerformanceEntry {
+ readonly entryType: 'measure';
+ }
+ /**
+ * _This property is an extension by Node.js. It is not available in Web browsers._
+ *
+ * Provides timing details for Node.js itself. The constructor of this class
+ * is not exposed to users.
+ * @since v8.5.0
+ */
+ class PerformanceNodeTiming extends PerformanceEntry {
+ /**
+ * The high resolution millisecond timestamp at which the Node.js process
+ * completed bootstrapping. If bootstrapping has not yet finished, the property
+ * has the value of -1.
+ * @since v8.5.0
+ */
+ readonly bootstrapComplete: number;
+ /**
+ * The high resolution millisecond timestamp at which the Node.js environment was
+ * initialized.
+ * @since v8.5.0
+ */
+ readonly environment: number;
+ /**
+ * The high resolution millisecond timestamp of the amount of time the event loop
+ * has been idle within the event loop's event provider (e.g. `epoll_wait`). This
+ * does not take CPU usage into consideration. If the event loop has not yet
+ * started (e.g., in the first tick of the main script), the property has the
+ * value of 0.
+ * @since v14.10.0, v12.19.0
+ */
+ readonly idleTime: number;
+ /**
+ * The high resolution millisecond timestamp at which the Node.js event loop
+ * exited. If the event loop has not yet exited, the property has the value of -1\.
+ * It can only have a value of not -1 in a handler of the `'exit'` event.
+ * @since v8.5.0
+ */
+ readonly loopExit: number;
+ /**
+ * The high resolution millisecond timestamp at which the Node.js event loop
+ * started. If the event loop has not yet started (e.g., in the first tick of the
+ * main script), the property has the value of -1.
+ * @since v8.5.0
+ */
+ readonly loopStart: number;
+ /**
+ * The high resolution millisecond timestamp at which the V8 platform was
+ * initialized.
+ * @since v8.5.0
+ */
+ readonly v8Start: number;
+ }
+ interface EventLoopUtilization {
+ idle: number;
+ active: number;
+ utilization: number;
+ }
+ /**
+ * @param util1 The result of a previous call to eventLoopUtilization()
+ * @param util2 The result of a previous call to eventLoopUtilization() prior to util1
+ */
+ type EventLoopUtilityFunction = (util1?: EventLoopUtilization, util2?: EventLoopUtilization) => EventLoopUtilization;
+ interface MarkOptions {
+ /**
+ * Additional optional detail to include with the mark.
+ */
+ detail?: unknown | undefined;
+ /**
+ * An optional timestamp to be used as the mark time.
+ * @default `performance.now()`.
+ */
+ startTime?: number | undefined;
+ }
+ interface MeasureOptions {
+ /**
+ * Additional optional detail to include with the mark.
+ */
+ detail?: unknown | undefined;
+ /**
+ * Duration between start and end times.
+ */
+ duration?: number | undefined;
+ /**
+ * Timestamp to be used as the end time, or a string identifying a previously recorded mark.
+ */
+ end?: number | string | undefined;
+ /**
+ * Timestamp to be used as the start time, or a string identifying a previously recorded mark.
+ */
+ start?: number | string | undefined;
+ }
+ interface TimerifyOptions {
+ /**
+ * A histogram object created using
+ * `perf_hooks.createHistogram()` that will record runtime durations in
+ * nanoseconds.
+ */
+ histogram?: RecordableHistogram | undefined;
+ }
+ interface Performance {
+ /**
+ * If name is not provided, removes all PerformanceMark objects from the Performance Timeline.
+ * If name is provided, removes only the named mark.
+ * @param name
+ */
+ clearMarks(name?: string): void;
+ /**
+ * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline.
+ * If name is provided, removes only the named measure.
+ * @param name
+ * @since v16.7.0
+ */
+ clearMeasures(name?: string): void;
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`.
+ * If you are only interested in performance entries of certain types or that have certain names, see
+ * `performance.getEntriesByType()` and `performance.getEntriesByName()`.
+ * @since v16.7.0
+ */
+ getEntries(): PerformanceEntry[];
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`
+ * whose `performanceEntry.name` is equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to `type`.
+ * @param name
+ * @param type
+ * @since v16.7.0
+ */
+ getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`
+ * whose `performanceEntry.entryType` is equal to `type`.
+ * @param type
+ * @since v16.7.0
+ */
+ getEntriesByType(type: EntryType): PerformanceEntry[];
+ /**
+ * Creates a new PerformanceMark entry in the Performance Timeline.
+ * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark',
+ * and whose performanceEntry.duration is always 0.
+ * Performance marks are used to mark specific significant moments in the Performance Timeline.
+ * @param name
+ * @return The PerformanceMark entry that was created
+ */
+ mark(name?: string, options?: MarkOptions): PerformanceMark;
+ /**
+ * Creates a new PerformanceMeasure entry in the Performance Timeline.
+ * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure',
+ * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark.
+ *
+ * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify
+ * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist,
+ * then startMark is set to timeOrigin by default.
+ *
+ * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp
+ * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown.
+ * @param name
+ * @param startMark
+ * @param endMark
+ * @return The PerformanceMeasure entry that was created
+ */
+ measure(name: string, startMark?: string, endMark?: string): PerformanceMeasure;
+ measure(name: string, options: MeasureOptions): PerformanceMeasure;
+ /**
+ * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones.
+ */
+ readonly nodeTiming: PerformanceNodeTiming;
+ /**
+ * @return the current high resolution millisecond timestamp
+ */
+ now(): number;
+ /**
+ * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured.
+ */
+ readonly timeOrigin: number;
+ /**
+ * Wraps a function within a new function that measures the running time of the wrapped function.
+ * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed.
+ * @param fn
+ */
+ timerify<T extends (...params: any[]) => any>(fn: T, options?: TimerifyOptions): T;
+ /**
+ * eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time.
+ * It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait).
+ * No other CPU idle time is taken into consideration.
+ */
+ eventLoopUtilization: EventLoopUtilityFunction;
+ }
+ interface PerformanceObserverEntryList {
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order
+ * with respect to `performanceEntry.startTime`.
+ *
+ * ```js
+ * const {
+ * performance,
+ * PerformanceObserver,
+ * } = require('node:perf_hooks');
+ *
+ * const obs = new PerformanceObserver((perfObserverList, observer) => {
+ * console.log(perfObserverList.getEntries());
+ *
+ * * [
+ * * PerformanceEntry {
+ * * name: 'test',
+ * * entryType: 'mark',
+ * * startTime: 81.465639,
+ * * duration: 0
+ * * },
+ * * PerformanceEntry {
+ * * name: 'meow',
+ * * entryType: 'mark',
+ * * startTime: 81.860064,
+ * * duration: 0
+ * * }
+ * * ]
+ *
+ *
+ * performance.clearMarks();
+ * performance.clearMeasures();
+ * observer.disconnect();
+ * });
+ * obs.observe({ type: 'mark' });
+ *
+ * performance.mark('test');
+ * performance.mark('meow');
+ * ```
+ * @since v8.5.0
+ */
+ getEntries(): PerformanceEntry[];
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order
+ * with respect to `performanceEntry.startTime` whose `performanceEntry.name` is
+ * equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to`type`.
+ *
+ * ```js
+ * const {
+ * performance,
+ * PerformanceObserver,
+ * } = require('node:perf_hooks');
+ *
+ * const obs = new PerformanceObserver((perfObserverList, observer) => {
+ * console.log(perfObserverList.getEntriesByName('meow'));
+ *
+ * * [
+ * * PerformanceEntry {
+ * * name: 'meow',
+ * * entryType: 'mark',
+ * * startTime: 98.545991,
+ * * duration: 0
+ * * }
+ * * ]
+ *
+ * console.log(perfObserverList.getEntriesByName('nope')); // []
+ *
+ * console.log(perfObserverList.getEntriesByName('test', 'mark'));
+ *
+ * * [
+ * * PerformanceEntry {
+ * * name: 'test',
+ * * entryType: 'mark',
+ * * startTime: 63.518931,
+ * * duration: 0
+ * * }
+ * * ]
+ *
+ * console.log(perfObserverList.getEntriesByName('test', 'measure')); // []
+ *
+ * performance.clearMarks();
+ * performance.clearMeasures();
+ * observer.disconnect();
+ * });
+ * obs.observe({ entryTypes: ['mark', 'measure'] });
+ *
+ * performance.mark('test');
+ * performance.mark('meow');
+ * ```
+ * @since v8.5.0
+ */
+ getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order
+ * with respect to `performanceEntry.startTime` whose `performanceEntry.entryType`is equal to `type`.
+ *
+ * ```js
+ * const {
+ * performance,
+ * PerformanceObserver,
+ * } = require('node:perf_hooks');
+ *
+ * const obs = new PerformanceObserver((perfObserverList, observer) => {
+ * console.log(perfObserverList.getEntriesByType('mark'));
+ *
+ * * [
+ * * PerformanceEntry {
+ * * name: 'test',
+ * * entryType: 'mark',
+ * * startTime: 55.897834,
+ * * duration: 0
+ * * },
+ * * PerformanceEntry {
+ * * name: 'meow',
+ * * entryType: 'mark',
+ * * startTime: 56.350146,
+ * * duration: 0
+ * * }
+ * * ]
+ *
+ * performance.clearMarks();
+ * performance.clearMeasures();
+ * observer.disconnect();
+ * });
+ * obs.observe({ type: 'mark' });
+ *
+ * performance.mark('test');
+ * performance.mark('meow');
+ * ```
+ * @since v8.5.0
+ */
+ getEntriesByType(type: EntryType): PerformanceEntry[];
+ }
+ type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void;
+ /**
+ * @since v8.5.0
+ */
+ class PerformanceObserver extends AsyncResource {
+ constructor(callback: PerformanceObserverCallback);
+ /**
+ * Disconnects the `PerformanceObserver` instance from all notifications.
+ * @since v8.5.0
+ */
+ disconnect(): void;
+ /**
+ * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes`or `options.type`:
+ *
+ * ```js
+ * const {
+ * performance,
+ * PerformanceObserver,
+ * } = require('node:perf_hooks');
+ *
+ * const obs = new PerformanceObserver((list, observer) => {
+ * // Called once asynchronously. `list` contains three items.
+ * });
+ * obs.observe({ type: 'mark' });
+ *
+ * for (let n = 0; n < 3; n++)
+ * performance.mark(`test${n}`);
+ * ```
+ * @since v8.5.0
+ */
+ observe(
+ options:
+ | {
+ entryTypes: ReadonlyArray<EntryType>;
+ buffered?: boolean | undefined;
+ }
+ | {
+ type: EntryType;
+ buffered?: boolean | undefined;
+ }
+ ): void;
+ }
+ namespace constants {
+ const NODE_PERFORMANCE_GC_MAJOR: number;
+ const NODE_PERFORMANCE_GC_MINOR: number;
+ const NODE_PERFORMANCE_GC_INCREMENTAL: number;
+ const NODE_PERFORMANCE_GC_WEAKCB: number;
+ const NODE_PERFORMANCE_GC_FLAGS_NO: number;
+ const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number;
+ const NODE_PERFORMANCE_GC_FLAGS_FORCED: number;
+ const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number;
+ const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number;
+ const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number;
+ const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number;
+ }
+ const performance: Performance;
+ interface EventLoopMonitorOptions {
+ /**
+ * The sampling rate in milliseconds.
+ * Must be greater than zero.
+ * @default 10
+ */
+ resolution?: number | undefined;
+ }
+ interface Histogram {
+ /**
+ * Returns a `Map` object detailing the accumulated percentile distribution.
+ * @since v11.10.0
+ */
+ readonly percentiles: Map<number, number>;
+ /**
+ * The number of times the event loop delay exceeded the maximum 1 hour event
+ * loop delay threshold.
+ * @since v11.10.0
+ */
+ readonly exceeds: number;
+ /**
+ * The minimum recorded event loop delay.
+ * @since v11.10.0
+ */
+ readonly min: number;
+ /**
+ * The maximum recorded event loop delay.
+ * @since v11.10.0
+ */
+ readonly max: number;
+ /**
+ * The mean of the recorded event loop delays.
+ * @since v11.10.0
+ */
+ readonly mean: number;
+ /**
+ * The standard deviation of the recorded event loop delays.
+ * @since v11.10.0
+ */
+ readonly stddev: number;
+ /**
+ * Resets the collected histogram data.
+ * @since v11.10.0
+ */
+ reset(): void;
+ /**
+ * Returns the value at the given percentile.
+ * @since v11.10.0
+ * @param percentile A percentile value in the range (0, 100].
+ */
+ percentile(percentile: number): number;
+ }
+ interface IntervalHistogram extends Histogram {
+ /**
+ * Enables the update interval timer. Returns `true` if the timer was
+ * started, `false` if it was already started.
+ * @since v11.10.0
+ */
+ enable(): boolean;
+ /**
+ * Disables the update interval timer. Returns `true` if the timer was
+ * stopped, `false` if it was already stopped.
+ * @since v11.10.0
+ */
+ disable(): boolean;
+ }
+ interface RecordableHistogram extends Histogram {
+ /**
+ * @since v15.9.0, v14.18.0
+ * @param val The amount to record in the histogram.
+ */
+ record(val: number | bigint): void;
+ /**
+ * Calculates the amount of time (in nanoseconds) that has passed since the
+ * previous call to `recordDelta()` and records that amount in the histogram.
+ *
+ * ## Examples
+ * @since v15.9.0, v14.18.0
+ */
+ recordDelta(): void;
+ /**
+ * Adds the values from `other` to this histogram.
+ * @since v17.4.0, v16.14.0
+ */
+ add(other: RecordableHistogram): void;
+ }
+ /**
+ * _This property is an extension by Node.js. It is not available in Web browsers._
+ *
+ * Creates an `IntervalHistogram` object that samples and reports the event loop
+ * delay over time. The delays will be reported in nanoseconds.
+ *
+ * Using a timer to detect approximate event loop delay works because the
+ * execution of timers is tied specifically to the lifecycle of the libuv
+ * event loop. That is, a delay in the loop will cause a delay in the execution
+ * of the timer, and those delays are specifically what this API is intended to
+ * detect.
+ *
+ * ```js
+ * const { monitorEventLoopDelay } = require('node:perf_hooks');
+ * const h = monitorEventLoopDelay({ resolution: 20 });
+ * h.enable();
+ * // Do something.
+ * h.disable();
+ * console.log(h.min);
+ * console.log(h.max);
+ * console.log(h.mean);
+ * console.log(h.stddev);
+ * console.log(h.percentiles);
+ * console.log(h.percentile(50));
+ * console.log(h.percentile(99));
+ * ```
+ * @since v11.10.0
+ */
+ function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram;
+ interface CreateHistogramOptions {
+ /**
+ * The minimum recordable value. Must be an integer value greater than 0.
+ * @default 1
+ */
+ min?: number | bigint | undefined;
+ /**
+ * The maximum recordable value. Must be an integer value greater than min.
+ * @default Number.MAX_SAFE_INTEGER
+ */
+ max?: number | bigint | undefined;
+ /**
+ * The number of accuracy digits. Must be a number between 1 and 5.
+ * @default 3
+ */
+ figures?: number | undefined;
+ }
+ /**
+ * Returns a `RecordableHistogram`.
+ * @since v15.9.0, v14.18.0
+ */
+ function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
+ import { performance as _performance } from 'perf_hooks';
+ global {
+ /**
+ * `performance` is a global reference for `require('perf_hooks').performance`
+ * https://nodejs.org/api/globals.html#performance
+ * @since v16.0.0
+ */
+ var performance: typeof globalThis extends {
+ onmessage: any;
+ performance: infer T;
+ }
+ ? T
+ : typeof _performance;
+ }
+}
+declare module 'node:perf_hooks' {
+ export * from 'perf_hooks';
+}
diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts
new file mode 100755
index 0000000..f122546
--- /dev/null
+++ b/node_modules/@types/node/process.d.ts
@@ -0,0 +1,1494 @@
+declare module 'process' {
+ import * as tty from 'node:tty';
+ import { Worker } from 'node:worker_threads';
+ global {
+ var process: NodeJS.Process;
+ namespace NodeJS {
+ // this namespace merge is here because these are specifically used
+ // as the type for process.stdin, process.stdout, and process.stderr.
+ // they can't live in tty.d.ts because we need to disambiguate the imported name.
+ interface ReadStream extends tty.ReadStream {}
+ interface WriteStream extends tty.WriteStream {}
+ interface MemoryUsageFn {
+ /**
+ * The `process.memoryUsage()` method iterate over each page to gather informations about memory
+ * usage which can be slow depending on the program memory allocations.
+ */
+ (): MemoryUsage;
+ /**
+ * method returns an integer representing the Resident Set Size (RSS) in bytes.
+ */
+ rss(): number;
+ }
+ interface MemoryUsage {
+ rss: number;
+ heapTotal: number;
+ heapUsed: number;
+ external: number;
+ arrayBuffers: number;
+ }
+ interface CpuUsage {
+ user: number;
+ system: number;
+ }
+ interface ProcessRelease {
+ name: string;
+ sourceUrl?: string | undefined;
+ headersUrl?: string | undefined;
+ libUrl?: string | undefined;
+ lts?: string | undefined;
+ }
+ interface ProcessVersions extends Dict<string> {
+ http_parser: string;
+ node: string;
+ v8: string;
+ ares: string;
+ uv: string;
+ zlib: string;
+ modules: string;
+ openssl: string;
+ }
+ type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd';
+ type Architecture = 'arm' | 'arm64' | 'ia32' | 'mips' | 'mipsel' | 'ppc' | 'ppc64' | 's390' | 's390x' | 'x64';
+ type Signals =
+ | 'SIGABRT'
+ | 'SIGALRM'
+ | 'SIGBUS'
+ | 'SIGCHLD'
+ | 'SIGCONT'
+ | 'SIGFPE'
+ | 'SIGHUP'
+ | 'SIGILL'
+ | 'SIGINT'
+ | 'SIGIO'
+ | 'SIGIOT'
+ | 'SIGKILL'
+ | 'SIGPIPE'
+ | 'SIGPOLL'
+ | 'SIGPROF'
+ | 'SIGPWR'
+ | 'SIGQUIT'
+ | 'SIGSEGV'
+ | 'SIGSTKFLT'
+ | 'SIGSTOP'
+ | 'SIGSYS'
+ | 'SIGTERM'
+ | 'SIGTRAP'
+ | 'SIGTSTP'
+ | 'SIGTTIN'
+ | 'SIGTTOU'
+ | 'SIGUNUSED'
+ | 'SIGURG'
+ | 'SIGUSR1'
+ | 'SIGUSR2'
+ | 'SIGVTALRM'
+ | 'SIGWINCH'
+ | 'SIGXCPU'
+ | 'SIGXFSZ'
+ | 'SIGBREAK'
+ | 'SIGLOST'
+ | 'SIGINFO';
+ type UncaughtExceptionOrigin = 'uncaughtException' | 'unhandledRejection';
+ type MultipleResolveType = 'resolve' | 'reject';
+ type BeforeExitListener = (code: number) => void;
+ type DisconnectListener = () => void;
+ type ExitListener = (code: number) => void;
+ type RejectionHandledListener = (promise: Promise<unknown>) => void;
+ type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void;
+ /**
+ * Most of the time the unhandledRejection will be an Error, but this should not be relied upon
+ * as *anything* can be thrown/rejected, it is therefore unsafe to assume that the value is an Error.
+ */
+ type UnhandledRejectionListener = (reason: unknown, promise: Promise<unknown>) => void;
+ type WarningListener = (warning: Error) => void;
+ type MessageListener = (message: unknown, sendHandle: unknown) => void;
+ type SignalsListener = (signal: Signals) => void;
+ type MultipleResolveListener = (type: MultipleResolveType, promise: Promise<unknown>, value: unknown) => void;
+ type WorkerListener = (worker: Worker) => void;
+ interface Socket extends ReadWriteStream {
+ isTTY?: true | undefined;
+ }
+ // Alias for compatibility
+ interface ProcessEnv extends Dict<string> {
+ /**
+ * Can be used to change the default timezone at runtime
+ */
+ TZ?: string;
+ }
+ interface HRTime {
+ (time?: [number, number]): [number, number];
+ bigint(): bigint;
+ }
+ interface ProcessReport {
+ /**
+ * Directory where the report is written.
+ * working directory of the Node.js process.
+ * @default '' indicating that reports are written to the current
+ */
+ directory: string;
+ /**
+ * Filename where the report is written.
+ * The default value is the empty string.
+ * @default '' the output filename will be comprised of a timestamp,
+ * PID, and sequence number.
+ */
+ filename: string;
+ /**
+ * Returns a JSON-formatted diagnostic report for the running process.
+ * The report's JavaScript stack trace is taken from err, if present.
+ */
+ getReport(err?: Error): string;
+ /**
+ * If true, a diagnostic report is generated on fatal errors,
+ * such as out of memory errors or failed C++ assertions.
+ * @default false
+ */
+ reportOnFatalError: boolean;
+ /**
+ * If true, a diagnostic report is generated when the process
+ * receives the signal specified by process.report.signal.
+ * @default false
+ */
+ reportOnSignal: boolean;
+ /**
+ * If true, a diagnostic report is generated on uncaught exception.
+ * @default false
+ */
+ reportOnUncaughtException: boolean;
+ /**
+ * The signal used to trigger the creation of a diagnostic report.
+ * @default 'SIGUSR2'
+ */
+ signal: Signals;
+ /**
+ * Writes a diagnostic report to a file. If filename is not provided, the default filename
+ * includes the date, time, PID, and a sequence number.
+ * The report's JavaScript stack trace is taken from err, if present.
+ *
+ * @param fileName Name of the file where the report is written.
+ * This should be a relative path, that will be appended to the directory specified in
+ * `process.report.directory`, or the current working directory of the Node.js process,
+ * if unspecified.
+ * @param error A custom error used for reporting the JavaScript stack.
+ * @return Filename of the generated report.
+ */
+ writeReport(fileName?: string): string;
+ writeReport(error?: Error): string;
+ writeReport(fileName?: string, err?: Error): string;
+ }
+ interface ResourceUsage {
+ fsRead: number;
+ fsWrite: number;
+ involuntaryContextSwitches: number;
+ ipcReceived: number;
+ ipcSent: number;
+ majorPageFault: number;
+ maxRSS: number;
+ minorPageFault: number;
+ sharedMemorySize: number;
+ signalsCount: number;
+ swappedOut: number;
+ systemCPUTime: number;
+ unsharedDataSize: number;
+ unsharedStackSize: number;
+ userCPUTime: number;
+ voluntaryContextSwitches: number;
+ }
+ interface EmitWarningOptions {
+ /**
+ * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted.
+ *
+ * @default 'Warning'
+ */
+ type?: string | undefined;
+ /**
+ * A unique identifier for the warning instance being emitted.
+ */
+ code?: string | undefined;
+ /**
+ * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace.
+ *
+ * @default process.emitWarning
+ */
+ ctor?: Function | undefined;
+ /**
+ * Additional text to include with the error.
+ */
+ detail?: string | undefined;
+ }
+ interface ProcessConfig {
+ readonly target_defaults: {
+ readonly cflags: any[];
+ readonly default_configuration: string;
+ readonly defines: string[];
+ readonly include_dirs: string[];
+ readonly libraries: string[];
+ };
+ readonly variables: {
+ readonly clang: number;
+ readonly host_arch: string;
+ readonly node_install_npm: boolean;
+ readonly node_install_waf: boolean;
+ readonly node_prefix: string;
+ readonly node_shared_openssl: boolean;
+ readonly node_shared_v8: boolean;
+ readonly node_shared_zlib: boolean;
+ readonly node_use_dtrace: boolean;
+ readonly node_use_etw: boolean;
+ readonly node_use_openssl: boolean;
+ readonly target_arch: string;
+ readonly v8_no_strict_aliasing: number;
+ readonly v8_use_snapshot: boolean;
+ readonly visibility: string;
+ };
+ }
+ interface Process extends EventEmitter {
+ /**
+ * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is
+ * a `Writable` stream.
+ *
+ * For example, to copy `process.stdin` to `process.stdout`:
+ *
+ * ```js
+ * import { stdin, stdout } from 'node:process';
+ *
+ * stdin.pipe(stdout);
+ * ```
+ *
+ * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information.
+ */
+ stdout: WriteStream & {
+ fd: 1;
+ };
+ /**
+ * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is
+ * a `Writable` stream.
+ *
+ * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information.
+ */
+ stderr: WriteStream & {
+ fd: 2;
+ };
+ /**
+ * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is
+ * a `Readable` stream.
+ *
+ * For details of how to read from `stdin` see `readable.read()`.
+ *
+ * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that
+ * is compatible with scripts written for Node.js prior to v0.10\.
+ * For more information see `Stream compatibility`.
+ *
+ * In "old" streams mode the `stdin` stream is paused by default, so one
+ * must call `process.stdin.resume()` to read from it. Note also that calling`process.stdin.resume()` itself would switch stream to "old" mode.
+ */
+ stdin: ReadStream & {
+ fd: 0;
+ };
+ openStdin(): Socket;
+ /**
+ * The `process.argv` property returns an array containing the command-line
+ * arguments passed when the Node.js process was launched. The first element will
+ * be {@link execPath}. See `process.argv0` if access to the original value
+ * of `argv[0]` is needed. The second element will be the path to the JavaScript
+ * file being executed. The remaining elements will be any additional command-line
+ * arguments.
+ *
+ * For example, assuming the following script for `process-args.js`:
+ *
+ * ```js
+ * import { argv } from 'node:process';
+ *
+ * // print process.argv
+ * argv.forEach((val, index) => {
+ * console.log(`${index}: ${val}`);
+ * });
+ * ```
+ *
+ * Launching the Node.js process as:
+ *
+ * ```bash
+ * node process-args.js one two=three four
+ * ```
+ *
+ * Would generate the output:
+ *
+ * ```text
+ * 0: /usr/local/bin/node
+ * 1: /Users/mjr/work/node/process-args.js
+ * 2: one
+ * 3: two=three
+ * 4: four
+ * ```
+ * @since v0.1.27
+ */
+ argv: string[];
+ /**
+ * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts.
+ *
+ * ```console
+ * $ bash -c 'exec -a customArgv0 ./node'
+ * > process.argv[0]
+ * '/Volumes/code/external/node/out/Release/node'
+ * > process.argv0
+ * 'customArgv0'
+ * ```
+ * @since v6.4.0
+ */
+ argv0: string;
+ /**
+ * The `process.execArgv` property returns the set of Node.js-specific command-line
+ * options passed when the Node.js process was launched. These options do not
+ * appear in the array returned by the {@link argv} property, and do not
+ * include the Node.js executable, the name of the script, or any options following
+ * the script name. These options are useful in order to spawn child processes with
+ * the same execution environment as the parent.
+ *
+ * ```bash
+ * node --harmony script.js --version
+ * ```
+ *
+ * Results in `process.execArgv`:
+ *
+ * ```js
+ * ['--harmony']
+ * ```
+ *
+ * And `process.argv`:
+ *
+ * ```js
+ * ['/usr/local/bin/node', 'script.js', '--version']
+ * ```
+ *
+ * Refer to `Worker constructor` for the detailed behavior of worker
+ * threads with this property.
+ * @since v0.7.7
+ */
+ execArgv: string[];
+ /**
+ * The `process.execPath` property returns the absolute pathname of the executable
+ * that started the Node.js process. Symbolic links, if any, are resolved.
+ *
+ * ```js
+ * '/usr/local/bin/node'
+ * ```
+ * @since v0.1.100
+ */
+ execPath: string;
+ /**
+ * The `process.abort()` method causes the Node.js process to exit immediately and
+ * generate a core file.
+ *
+ * This feature is not available in `Worker` threads.
+ * @since v0.7.0
+ */
+ abort(): never;
+ /**
+ * The `process.chdir()` method changes the current working directory of the
+ * Node.js process or throws an exception if doing so fails (for instance, if
+ * the specified `directory` does not exist).
+ *
+ * ```js
+ * import { chdir, cwd } from 'node:process';
+ *
+ * console.log(`Starting directory: ${cwd()}`);
+ * try {
+ * chdir('/tmp');
+ * console.log(`New directory: ${cwd()}`);
+ * } catch (err) {
+ * console.error(`chdir: ${err}`);
+ * }
+ * ```
+ *
+ * This feature is not available in `Worker` threads.
+ * @since v0.1.17
+ */
+ chdir(directory: string): void;
+ /**
+ * The `process.cwd()` method returns the current working directory of the Node.js
+ * process.
+ *
+ * ```js
+ * import { cwd } from 'node:process';
+ *
+ * console.log(`Current directory: ${cwd()}`);
+ * ```
+ * @since v0.1.8
+ */
+ cwd(): string;
+ /**
+ * The port used by the Node.js debugger when enabled.
+ *
+ * ```js
+ * import process from 'node:process';
+ *
+ * process.debugPort = 5858;
+ * ```
+ * @since v0.7.2
+ */
+ debugPort: number;
+ /**
+ * The `process.emitWarning()` method can be used to emit custom or application
+ * specific process warnings. These can be listened for by adding a handler to the `'warning'` event.
+ *
+ * ```js
+ * import { emitWarning } from 'node:process';
+ *
+ * // Emit a warning with a code and additional detail.
+ * emitWarning('Something happened!', {
+ * code: 'MY_WARNING',
+ * detail: 'This is some additional information',
+ * });
+ * // Emits:
+ * // (node:56338) [MY_WARNING] Warning: Something happened!
+ * // This is some additional information
+ * ```
+ *
+ * In this example, an `Error` object is generated internally by`process.emitWarning()` and passed through to the `'warning'` handler.
+ *
+ * ```js
+ * import process from 'node:process';
+ *
+ * process.on('warning', (warning) => {
+ * console.warn(warning.name); // 'Warning'
+ * console.warn(warning.message); // 'Something happened!'
+ * console.warn(warning.code); // 'MY_WARNING'
+ * console.warn(warning.stack); // Stack trace
+ * console.warn(warning.detail); // 'This is some additional information'
+ * });
+ * ```
+ *
+ * If `warning` is passed as an `Error` object, the `options` argument is ignored.
+ * @since v8.0.0
+ * @param warning The warning to emit.
+ */
+ emitWarning(warning: string | Error, ctor?: Function): void;
+ emitWarning(warning: string | Error, type?: string, ctor?: Function): void;
+ emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void;
+ emitWarning(warning: string | Error, options?: EmitWarningOptions): void;
+ /**
+ * The `process.env` property returns an object containing the user environment.
+ * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html).
+ *
+ * An example of this object looks like:
+ *
+ * ```js
+ * {
+ * TERM: 'xterm-256color',
+ * SHELL: '/usr/local/bin/bash',
+ * USER: 'maciej',
+ * PATH: '~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin',
+ * PWD: '/Users/maciej',
+ * EDITOR: 'vim',
+ * SHLVL: '1',
+ * HOME: '/Users/maciej',
+ * LOGNAME: 'maciej',
+ * _: '/usr/local/bin/node'
+ * }
+ * ```
+ *
+ * It is possible to modify this object, but such modifications will not be
+ * reflected outside the Node.js process, or (unless explicitly requested)
+ * to other `Worker` threads.
+ * In other words, the following example would not work:
+ *
+ * ```bash
+ * node -e 'process.env.foo = "bar"' &#x26;&#x26; echo $foo
+ * ```
+ *
+ * While the following will:
+ *
+ * ```js
+ * import { env } from 'node:process';
+ *
+ * env.foo = 'bar';
+ * console.log(env.foo);
+ * ```
+ *
+ * Assigning a property on `process.env` will implicitly convert the value
+ * to a string. **This behavior is deprecated.** Future versions of Node.js may
+ * throw an error when the value is not a string, number, or boolean.
+ *
+ * ```js
+ * import { env } from 'node:process';
+ *
+ * env.test = null;
+ * console.log(env.test);
+ * // => 'null'
+ * env.test = undefined;
+ * console.log(env.test);
+ * // => 'undefined'
+ * ```
+ *
+ * Use `delete` to delete a property from `process.env`.
+ *
+ * ```js
+ * import { env } from 'node:process';
+ *
+ * env.TEST = 1;
+ * delete env.TEST;
+ * console.log(env.TEST);
+ * // => undefined
+ * ```
+ *
+ * On Windows operating systems, environment variables are case-insensitive.
+ *
+ * ```js
+ * import { env } from 'node:process';
+ *
+ * env.TEST = 1;
+ * console.log(env.test);
+ * // => 1
+ * ```
+ *
+ * Unless explicitly specified when creating a `Worker` instance,
+ * each `Worker` thread has its own copy of `process.env`, based on its
+ * parent thread's `process.env`, or whatever was specified as the `env` option
+ * to the `Worker` constructor. Changes to `process.env` will not be visible
+ * across `Worker` threads, and only the main thread can make changes that
+ * are visible to the operating system or to native add-ons.
+ * @since v0.1.27
+ */
+ env: ProcessEnv;
+ /**
+ * The `process.exit()` method instructs Node.js to terminate the process
+ * synchronously with an exit status of `code`. If `code` is omitted, exit uses
+ * either the 'success' code `0` or the value of `process.exitCode` if it has been
+ * set. Node.js will not terminate until all the `'exit'` event listeners are
+ * called.
+ *
+ * To exit with a 'failure' code:
+ *
+ * ```js
+ * import { exit } from 'node:process';
+ *
+ * exit(1);
+ * ```
+ *
+ * The shell that executed Node.js should see the exit code as `1`.
+ *
+ * Calling `process.exit()` will force the process to exit as quickly as possible
+ * even if there are still asynchronous operations pending that have not yet
+ * completed fully, including I/O operations to `process.stdout` and`process.stderr`.
+ *
+ * In most situations, it is not actually necessary to call `process.exit()`explicitly. The Node.js process will exit on its own _if there is no additional_
+ * _work pending_ in the event loop. The `process.exitCode` property can be set to
+ * tell the process which exit code to use when the process exits gracefully.
+ *
+ * For instance, the following example illustrates a _misuse_ of the`process.exit()` method that could lead to data printed to stdout being
+ * truncated and lost:
+ *
+ * ```js
+ * import { exit } from 'node:process';
+ *
+ * // This is an example of what *not* to do:
+ * if (someConditionNotMet()) {
+ * printUsageToStdout();
+ * exit(1);
+ * }
+ * ```
+ *
+ * The reason this is problematic is because writes to `process.stdout` in Node.js
+ * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js
+ * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed.
+ *
+ * Rather than calling `process.exit()` directly, the code _should_ set the`process.exitCode` and allow the process to exit naturally by avoiding
+ * scheduling any additional work for the event loop:
+ *
+ * ```js
+ * import process from 'node:process';
+ *
+ * // How to properly set the exit code while letting
+ * // the process exit gracefully.
+ * if (someConditionNotMet()) {
+ * printUsageToStdout();
+ * process.exitCode = 1;
+ * }
+ * ```
+ *
+ * If it is necessary to terminate the Node.js process due to an error condition,
+ * throwing an _uncaught_ error and allowing the process to terminate accordingly
+ * is safer than calling `process.exit()`.
+ *
+ * In `Worker` threads, this function stops the current thread rather
+ * than the current process.
+ * @since v0.1.13
+ * @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed.
+ */
+ exit(code?: number): never;
+ /**
+ * A number which will be the process exit code, when the process either
+ * exits gracefully, or is exited via {@link exit} without specifying
+ * a code.
+ *
+ * Specifying a code to {@link exit} will override any
+ * previous setting of `process.exitCode`.
+ * @since v0.11.8
+ */
+ exitCode?: number | undefined;
+ /**
+ * The `process.getgid()` method returns the numerical group identity of the
+ * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).)
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getgid) {
+ * console.log(`Current gid: ${process.getgid()}`);
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v0.1.31
+ */
+ getgid?: () => number;
+ /**
+ * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a
+ * numeric ID or a group name
+ * string. If a group name is specified, this method blocks while resolving the
+ * associated numeric ID.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getgid &#x26;&#x26; process.setgid) {
+ * console.log(`Current gid: ${process.getgid()}`);
+ * try {
+ * process.setgid(501);
+ * console.log(`New gid: ${process.getgid()}`);
+ * } catch (err) {
+ * console.log(`Failed to set gid: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v0.1.31
+ * @param id The group name or ID
+ */
+ setgid?: (id: number | string) => void;
+ /**
+ * The `process.getuid()` method returns the numeric user identity of the process.
+ * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).)
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getuid) {
+ * console.log(`Current uid: ${process.getuid()}`);
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v0.1.28
+ */
+ getuid?: () => number;
+ /**
+ * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a
+ * numeric ID or a username string.
+ * If a username is specified, the method blocks while resolving the associated
+ * numeric ID.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getuid &#x26;&#x26; process.setuid) {
+ * console.log(`Current uid: ${process.getuid()}`);
+ * try {
+ * process.setuid(501);
+ * console.log(`New uid: ${process.getuid()}`);
+ * } catch (err) {
+ * console.log(`Failed to set uid: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v0.1.28
+ */
+ setuid?: (id: number | string) => void;
+ /**
+ * The `process.geteuid()` method returns the numerical effective user identity of
+ * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).)
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.geteuid) {
+ * console.log(`Current uid: ${process.geteuid()}`);
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v2.0.0
+ */
+ geteuid?: () => number;
+ /**
+ * The `process.seteuid()` method sets the effective user identity of the process.
+ * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username
+ * string. If a username is specified, the method blocks while resolving the
+ * associated numeric ID.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.geteuid &#x26;&#x26; process.seteuid) {
+ * console.log(`Current uid: ${process.geteuid()}`);
+ * try {
+ * process.seteuid(501);
+ * console.log(`New uid: ${process.geteuid()}`);
+ * } catch (err) {
+ * console.log(`Failed to set uid: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v2.0.0
+ * @param id A user name or ID
+ */
+ seteuid?: (id: number | string) => void;
+ /**
+ * The `process.getegid()` method returns the numerical effective group identity
+ * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).)
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getegid) {
+ * console.log(`Current gid: ${process.getegid()}`);
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v2.0.0
+ */
+ getegid?: () => number;
+ /**
+ * The `process.setegid()` method sets the effective group identity of the process.
+ * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group
+ * name string. If a group name is specified, this method blocks while resolving
+ * the associated a numeric ID.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getegid &#x26;&#x26; process.setegid) {
+ * console.log(`Current gid: ${process.getegid()}`);
+ * try {
+ * process.setegid(501);
+ * console.log(`New gid: ${process.getegid()}`);
+ * } catch (err) {
+ * console.log(`Failed to set gid: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v2.0.0
+ * @param id A group name or ID
+ */
+ setegid?: (id: number | string) => void;
+ /**
+ * The `process.getgroups()` method returns an array with the supplementary group
+ * IDs. POSIX leaves it unspecified if the effective group ID is included but
+ * Node.js ensures it always is.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getgroups) {
+ * console.log(process.getgroups()); // [ 16, 21, 297 ]
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v0.9.4
+ */
+ getgroups?: () => number[];
+ /**
+ * The `process.setgroups()` method sets the supplementary group IDs for the
+ * Node.js process. This is a privileged operation that requires the Node.js
+ * process to have `root` or the `CAP_SETGID` capability.
+ *
+ * The `groups` array can contain numeric group IDs, group names, or both.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getgroups &#x26;&#x26; process.setgroups) {
+ * try {
+ * process.setgroups([501]);
+ * console.log(process.getgroups()); // new groups
+ * } catch (err) {
+ * console.log(`Failed to set groups: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v0.9.4
+ */
+ setgroups?: (groups: ReadonlyArray<string | number>) => void;
+ /**
+ * The `process.setUncaughtExceptionCaptureCallback()` function sets a function
+ * that will be invoked when an uncaught exception occurs, which will receive the
+ * exception value itself as its first argument.
+ *
+ * If such a function is set, the `'uncaughtException'` event will
+ * not be emitted. If `--abort-on-uncaught-exception` was passed from the
+ * command line or set through `v8.setFlagsFromString()`, the process will
+ * not abort. Actions configured to take place on exceptions such as report
+ * generations will be affected too
+ *
+ * To unset the capture function,`process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this
+ * method with a non-`null` argument while another capture function is set will
+ * throw an error.
+ *
+ * Using this function is mutually exclusive with using the deprecated `domain` built-in module.
+ * @since v9.3.0
+ */
+ setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
+ /**
+ * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}.
+ * @since v9.3.0
+ */
+ hasUncaughtExceptionCaptureCallback(): boolean;
+ /**
+ * The `process.version` property contains the Node.js version string.
+ *
+ * ```js
+ * import { version } from 'node:process';
+ *
+ * console.log(`Version: ${version}`);
+ * // Version: v14.8.0
+ * ```
+ *
+ * To get the version string without the prepended _v_, use`process.versions.node`.
+ * @since v0.1.3
+ */
+ readonly version: string;
+ /**
+ * The `process.versions` property returns an object listing the version strings of
+ * Node.js and its dependencies. `process.versions.modules` indicates the current
+ * ABI version, which is increased whenever a C++ API changes. Node.js will refuse
+ * to load modules that were compiled against a different module ABI version.
+ *
+ * ```js
+ * import { versions } from 'node:process';
+ *
+ * console.log(versions);
+ * ```
+ *
+ * Will generate an object similar to:
+ *
+ * ```console
+ * { node: '20.2.0',
+ * acorn: '8.8.2',
+ * ada: '2.4.0',
+ * ares: '1.19.0',
+ * base64: '0.5.0',
+ * brotli: '1.0.9',
+ * cjs_module_lexer: '1.2.2',
+ * cldr: '43.0',
+ * icu: '73.1',
+ * llhttp: '8.1.0',
+ * modules: '115',
+ * napi: '8',
+ * nghttp2: '1.52.0',
+ * nghttp3: '0.7.0',
+ * ngtcp2: '0.8.1',
+ * openssl: '3.0.8+quic',
+ * simdutf: '3.2.9',
+ * tz: '2023c',
+ * undici: '5.22.0',
+ * unicode: '15.0',
+ * uv: '1.44.2',
+ * uvwasi: '0.0.16',
+ * v8: '11.3.244.8-node.9',
+ * zlib: '1.2.13' }
+ * ```
+ * @since v0.2.0
+ */
+ readonly versions: ProcessVersions;
+ /**
+ * The `process.config` property returns a frozen `Object` containing the
+ * JavaScript representation of the configure options used to compile the current
+ * Node.js executable. This is the same as the `config.gypi` file that was produced
+ * when running the `./configure` script.
+ *
+ * An example of the possible output looks like:
+ *
+ * ```js
+ * {
+ * target_defaults:
+ * { cflags: [],
+ * default_configuration: 'Release',
+ * defines: [],
+ * include_dirs: [],
+ * libraries: [] },
+ * variables:
+ * {
+ * host_arch: 'x64',
+ * napi_build_version: 5,
+ * node_install_npm: 'true',
+ * node_prefix: '',
+ * node_shared_cares: 'false',
+ * node_shared_http_parser: 'false',
+ * node_shared_libuv: 'false',
+ * node_shared_zlib: 'false',
+ * node_use_openssl: 'true',
+ * node_shared_openssl: 'false',
+ * strict_aliasing: 'true',
+ * target_arch: 'x64',
+ * v8_use_snapshot: 1
+ * }
+ * }
+ * ```
+ * @since v0.7.7
+ */
+ readonly config: ProcessConfig;
+ /**
+ * The `process.kill()` method sends the `signal` to the process identified by`pid`.
+ *
+ * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information.
+ *
+ * This method will throw an error if the target `pid` does not exist. As a special
+ * case, a signal of `0` can be used to test for the existence of a process.
+ * Windows platforms will throw an error if the `pid` is used to kill a process
+ * group.
+ *
+ * Even though the name of this function is `process.kill()`, it is really just a
+ * signal sender, like the `kill` system call. The signal sent may do something
+ * other than kill the target process.
+ *
+ * ```js
+ * import process, { kill } from 'node:process';
+ *
+ * process.on('SIGHUP', () => {
+ * console.log('Got SIGHUP signal.');
+ * });
+ *
+ * setTimeout(() => {
+ * console.log('Exiting.');
+ * process.exit(0);
+ * }, 100);
+ *
+ * kill(process.pid, 'SIGHUP');
+ * ```
+ *
+ * When `SIGUSR1` is received by a Node.js process, Node.js will start the
+ * debugger. See `Signal Events`.
+ * @since v0.0.6
+ * @param pid A process ID
+ * @param [signal='SIGTERM'] The signal to send, either as a string or number.
+ */
+ kill(pid: number, signal?: string | number): true;
+ /**
+ * The `process.pid` property returns the PID of the process.
+ *
+ * ```js
+ * import { pid } from 'node:process';
+ *
+ * console.log(`This process is pid ${pid}`);
+ * ```
+ * @since v0.1.15
+ */
+ readonly pid: number;
+ /**
+ * The `process.ppid` property returns the PID of the parent of the
+ * current process.
+ *
+ * ```js
+ * import { ppid } from 'node:process';
+ *
+ * console.log(`The parent process is pid ${ppid}`);
+ * ```
+ * @since v9.2.0, v8.10.0, v6.13.0
+ */
+ readonly ppid: number;
+ /**
+ * The `process.title` property returns the current process title (i.e. returns
+ * the current value of `ps`). Assigning a new value to `process.title` modifies
+ * the current value of `ps`.
+ *
+ * When a new value is assigned, different platforms will impose different maximum
+ * length restrictions on the title. Usually such restrictions are quite limited.
+ * For instance, on Linux and macOS, `process.title` is limited to the size of the
+ * binary name plus the length of the command-line arguments because setting the`process.title` overwrites the `argv` memory of the process. Node.js v0.8
+ * allowed for longer process title strings by also overwriting the `environ`memory but that was potentially insecure and confusing in some (rather obscure)
+ * cases.
+ *
+ * Assigning a value to `process.title` might not result in an accurate label
+ * within process manager applications such as macOS Activity Monitor or Windows
+ * Services Manager.
+ * @since v0.1.104
+ */
+ title: string;
+ /**
+ * The operating system CPU architecture for which the Node.js binary was compiled.
+ * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`,`'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`.
+ *
+ * ```js
+ * import { arch } from 'node:process';
+ *
+ * console.log(`This processor architecture is ${arch}`);
+ * ```
+ * @since v0.5.0
+ */
+ readonly arch: Architecture;
+ /**
+ * The `process.platform` property returns a string identifying the operating
+ * system platform for which the Node.js binary was compiled.
+ *
+ * Currently possible values are:
+ *
+ * * `'aix'`
+ * * `'darwin'`
+ * * `'freebsd'`
+ * * `'linux'`
+ * * `'openbsd'`
+ * * `'sunos'`
+ * * `'win32'`
+ *
+ * ```js
+ * import { platform } from 'node:process';
+ *
+ * console.log(`This platform is ${platform}`);
+ * ```
+ *
+ * The value `'android'` may also be returned if the Node.js is built on the
+ * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
+ * @since v0.1.16
+ */
+ readonly platform: Platform;
+ /**
+ * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at
+ * runtime, `require.main` may still refer to the original main module in
+ * modules that were required before the change occurred. Generally, it's
+ * safe to assume that the two refer to the same module.
+ *
+ * As with `require.main`, `process.mainModule` will be `undefined` if there
+ * is no entry script.
+ * @since v0.1.17
+ * @deprecated Since v14.0.0 - Use `main` instead.
+ */
+ mainModule?: Module | undefined;
+ memoryUsage: MemoryUsageFn;
+ /**
+ * Gets the amount of memory available to the process (in bytes) based on
+ * limits imposed by the OS. If there is no such constraint, or the constraint
+ * is unknown, `undefined` is returned.
+ *
+ * See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more
+ * information.
+ * @since v19.6.0, v18.15.0
+ * @experimental
+ */
+ constrainedMemory(): number | undefined;
+ /**
+ * The `process.cpuUsage()` method returns the user and system CPU time usage of
+ * the current process, in an object with properties `user` and `system`, whose
+ * values are microsecond values (millionth of a second). These values measure time
+ * spent in user and system code respectively, and may end up being greater than
+ * actual elapsed time if multiple CPU cores are performing work for this process.
+ *
+ * The result of a previous call to `process.cpuUsage()` can be passed as the
+ * argument to the function, to get a diff reading.
+ *
+ * ```js
+ * import { cpuUsage } from 'node:process';
+ *
+ * const startUsage = cpuUsage();
+ * // { user: 38579, system: 6986 }
+ *
+ * // spin the CPU for 500 milliseconds
+ * const now = Date.now();
+ * while (Date.now() - now < 500);
+ *
+ * console.log(cpuUsage(startUsage));
+ * // { user: 514883, system: 11226 }
+ * ```
+ * @since v6.1.0
+ * @param previousValue A previous return value from calling `process.cpuUsage()`
+ */
+ cpuUsage(previousValue?: CpuUsage): CpuUsage;
+ /**
+ * `process.nextTick()` adds `callback` to the "next tick queue". This queue is
+ * fully drained after the current operation on the JavaScript stack runs to
+ * completion and before the event loop is allowed to continue. It's possible to
+ * create an infinite loop if one were to recursively call `process.nextTick()`.
+ * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background.
+ *
+ * ```js
+ * import { nextTick } from 'node:process';
+ *
+ * console.log('start');
+ * nextTick(() => {
+ * console.log('nextTick callback');
+ * });
+ * console.log('scheduled');
+ * // Output:
+ * // start
+ * // scheduled
+ * // nextTick callback
+ * ```
+ *
+ * This is important when developing APIs in order to give users the opportunity
+ * to assign event handlers _after_ an object has been constructed but before any
+ * I/O has occurred:
+ *
+ * ```js
+ * import { nextTick } from 'node:process';
+ *
+ * function MyThing(options) {
+ * this.setupOptions(options);
+ *
+ * nextTick(() => {
+ * this.startDoingStuff();
+ * });
+ * }
+ *
+ * const thing = new MyThing();
+ * thing.getReadyForStuff();
+ *
+ * // thing.startDoingStuff() gets called now, not before.
+ * ```
+ *
+ * It is very important for APIs to be either 100% synchronous or 100%
+ * asynchronous. Consider this example:
+ *
+ * ```js
+ * // WARNING! DO NOT USE! BAD UNSAFE HAZARD!
+ * function maybeSync(arg, cb) {
+ * if (arg) {
+ * cb();
+ * return;
+ * }
+ *
+ * fs.stat('file', cb);
+ * }
+ * ```
+ *
+ * This API is hazardous because in the following case:
+ *
+ * ```js
+ * const maybeTrue = Math.random() > 0.5;
+ *
+ * maybeSync(maybeTrue, () => {
+ * foo();
+ * });
+ *
+ * bar();
+ * ```
+ *
+ * It is not clear whether `foo()` or `bar()` will be called first.
+ *
+ * The following approach is much better:
+ *
+ * ```js
+ * import { nextTick } from 'node:process';
+ *
+ * function definitelyAsync(arg, cb) {
+ * if (arg) {
+ * nextTick(cb);
+ * return;
+ * }
+ *
+ * fs.stat('file', cb);
+ * }
+ * ```
+ * @since v0.1.26
+ * @param args Additional arguments to pass when invoking the `callback`
+ */
+ nextTick(callback: Function, ...args: any[]): void;
+ /**
+ * The `process.release` property returns an `Object` containing metadata related
+ * to the current release, including URLs for the source tarball and headers-only
+ * tarball.
+ *
+ * `process.release` contains the following properties:
+ *
+ * ```js
+ * {
+ * name: 'node',
+ * lts: 'Hydrogen',
+ * sourceUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0.tar.gz',
+ * headersUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz',
+ * libUrl: 'https://nodejs.org/download/release/v18.12.0/win-x64/node.lib'
+ * }
+ * ```
+ *
+ * In custom builds from non-release versions of the source tree, only the`name` property may be present. The additional properties should not be
+ * relied upon to exist.
+ * @since v3.0.0
+ */
+ readonly release: ProcessRelease;
+ features: {
+ inspector: boolean;
+ debug: boolean;
+ uv: boolean;
+ ipv6: boolean;
+ tls_alpn: boolean;
+ tls_sni: boolean;
+ tls_ocsp: boolean;
+ tls: boolean;
+ };
+ /**
+ * `process.umask()` returns the Node.js process's file mode creation mask. Child
+ * processes inherit the mask from the parent process.
+ * @since v0.1.19
+ * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential *
+ * security vulnerability. There is no safe, cross-platform alternative API.
+ */
+ umask(): number;
+ /**
+ * Can only be set if not in worker thread.
+ */
+ umask(mask: string | number): number;
+ /**
+ * The `process.uptime()` method returns the number of seconds the current Node.js
+ * process has been running.
+ *
+ * The return value includes fractions of a second. Use `Math.floor()` to get whole
+ * seconds.
+ * @since v0.5.0
+ */
+ uptime(): number;
+ hrtime: HRTime;
+ /**
+ * If Node.js is spawned with an IPC channel, the `process.send()` method can be
+ * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object.
+ *
+ * If Node.js was not spawned with an IPC channel, `process.send` will be`undefined`.
+ *
+ * The message goes through serialization and parsing. The resulting message might
+ * not be the same as what is originally sent.
+ * @since v0.5.9
+ * @param options used to parameterize the sending of certain types of handles.`options` supports the following properties:
+ */
+ send?(
+ message: any,
+ sendHandle?: any,
+ options?: {
+ swallowErrors?: boolean | undefined;
+ },
+ callback?: (error: Error | null) => void
+ ): boolean;
+ /**
+ * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the
+ * IPC channel to the parent process, allowing the child process to exit gracefully
+ * once there are no other connections keeping it alive.
+ *
+ * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process.
+ *
+ * If the Node.js process was not spawned with an IPC channel,`process.disconnect()` will be `undefined`.
+ * @since v0.7.2
+ */
+ disconnect(): void;
+ /**
+ * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return`true` so long as the IPC
+ * channel is connected and will return `false` after`process.disconnect()` is called.
+ *
+ * Once `process.connected` is `false`, it is no longer possible to send messages
+ * over the IPC channel using `process.send()`.
+ * @since v0.7.2
+ */
+ connected: boolean;
+ /**
+ * The `process.allowedNodeEnvironmentFlags` property is a special,
+ * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable.
+ *
+ * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides`Set.prototype.has` to recognize several different possible flag
+ * representations. `process.allowedNodeEnvironmentFlags.has()` will
+ * return `true` in the following cases:
+ *
+ * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g.,`inspect-brk` for `--inspect-brk`, or `r` for `-r`.
+ * * Flags passed through to V8 (as listed in `--v8-options`) may replace
+ * one or more _non-leading_ dashes for an underscore, or vice-versa;
+ * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`,
+ * etc.
+ * * Flags may contain one or more equals (`=`) characters; all
+ * characters after and including the first equals will be ignored;
+ * e.g., `--stack-trace-limit=100`.
+ * * Flags _must_ be allowable within `NODE_OPTIONS`.
+ *
+ * When iterating over `process.allowedNodeEnvironmentFlags`, flags will
+ * appear only _once_; each will begin with one or more dashes. Flags
+ * passed through to V8 will contain underscores instead of non-leading
+ * dashes:
+ *
+ * ```js
+ * import { allowedNodeEnvironmentFlags } from 'node:process';
+ *
+ * allowedNodeEnvironmentFlags.forEach((flag) => {
+ * // -r
+ * // --inspect-brk
+ * // --abort_on_uncaught_exception
+ * // ...
+ * });
+ * ```
+ *
+ * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail
+ * silently.
+ *
+ * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will
+ * contain what _would have_ been allowable.
+ * @since v10.10.0
+ */
+ allowedNodeEnvironmentFlags: ReadonlySet<string>;
+ /**
+ * `process.report` is an object whose methods are used to generate diagnostic
+ * reports for the current process. Additional documentation is available in the `report documentation`.
+ * @since v11.8.0
+ */
+ report?: ProcessReport | undefined;
+ /**
+ * ```js
+ * import { resourceUsage } from 'node:process';
+ *
+ * console.log(resourceUsage());
+ * /*
+ * Will output:
+ * {
+ * userCPUTime: 82872,
+ * systemCPUTime: 4143,
+ * maxRSS: 33164,
+ * sharedMemorySize: 0,
+ * unsharedDataSize: 0,
+ * unsharedStackSize: 0,
+ * minorPageFault: 2469,
+ * majorPageFault: 0,
+ * swappedOut: 0,
+ * fsRead: 0,
+ * fsWrite: 8,
+ * ipcSent: 0,
+ * ipcReceived: 0,
+ * signalsCount: 0,
+ * voluntaryContextSwitches: 79,
+ * involuntaryContextSwitches: 1
+ * }
+ *
+ * ```
+ * @since v12.6.0
+ * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t].
+ */
+ resourceUsage(): ResourceUsage;
+ /**
+ * The `process.traceDeprecation` property indicates whether the`--trace-deprecation` flag is set on the current Node.js process. See the
+ * documentation for the `'warning' event` and the `emitWarning() method` for more information about this
+ * flag's behavior.
+ * @since v0.8.0
+ */
+ traceDeprecation: boolean;
+ /* EventEmitter */
+ addListener(event: 'beforeExit', listener: BeforeExitListener): this;
+ addListener(event: 'disconnect', listener: DisconnectListener): this;
+ addListener(event: 'exit', listener: ExitListener): this;
+ addListener(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ addListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ addListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ addListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ addListener(event: 'warning', listener: WarningListener): this;
+ addListener(event: 'message', listener: MessageListener): this;
+ addListener(event: Signals, listener: SignalsListener): this;
+ addListener(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ addListener(event: 'worker', listener: WorkerListener): this;
+ emit(event: 'beforeExit', code: number): boolean;
+ emit(event: 'disconnect'): boolean;
+ emit(event: 'exit', code: number): boolean;
+ emit(event: 'rejectionHandled', promise: Promise<unknown>): boolean;
+ emit(event: 'uncaughtException', error: Error): boolean;
+ emit(event: 'uncaughtExceptionMonitor', error: Error): boolean;
+ emit(event: 'unhandledRejection', reason: unknown, promise: Promise<unknown>): boolean;
+ emit(event: 'warning', warning: Error): boolean;
+ emit(event: 'message', message: unknown, sendHandle: unknown): this;
+ emit(event: Signals, signal?: Signals): boolean;
+ emit(event: 'multipleResolves', type: MultipleResolveType, promise: Promise<unknown>, value: unknown): this;
+ emit(event: 'worker', listener: WorkerListener): this;
+ on(event: 'beforeExit', listener: BeforeExitListener): this;
+ on(event: 'disconnect', listener: DisconnectListener): this;
+ on(event: 'exit', listener: ExitListener): this;
+ on(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ on(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ on(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ on(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ on(event: 'warning', listener: WarningListener): this;
+ on(event: 'message', listener: MessageListener): this;
+ on(event: Signals, listener: SignalsListener): this;
+ on(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ on(event: 'worker', listener: WorkerListener): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'beforeExit', listener: BeforeExitListener): this;
+ once(event: 'disconnect', listener: DisconnectListener): this;
+ once(event: 'exit', listener: ExitListener): this;
+ once(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ once(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ once(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ once(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ once(event: 'warning', listener: WarningListener): this;
+ once(event: 'message', listener: MessageListener): this;
+ once(event: Signals, listener: SignalsListener): this;
+ once(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ once(event: 'worker', listener: WorkerListener): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'beforeExit', listener: BeforeExitListener): this;
+ prependListener(event: 'disconnect', listener: DisconnectListener): this;
+ prependListener(event: 'exit', listener: ExitListener): this;
+ prependListener(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ prependListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ prependListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ prependListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ prependListener(event: 'warning', listener: WarningListener): this;
+ prependListener(event: 'message', listener: MessageListener): this;
+ prependListener(event: Signals, listener: SignalsListener): this;
+ prependListener(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ prependListener(event: 'worker', listener: WorkerListener): this;
+ prependOnceListener(event: 'beforeExit', listener: BeforeExitListener): this;
+ prependOnceListener(event: 'disconnect', listener: DisconnectListener): this;
+ prependOnceListener(event: 'exit', listener: ExitListener): this;
+ prependOnceListener(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ prependOnceListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ prependOnceListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ prependOnceListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ prependOnceListener(event: 'warning', listener: WarningListener): this;
+ prependOnceListener(event: 'message', listener: MessageListener): this;
+ prependOnceListener(event: Signals, listener: SignalsListener): this;
+ prependOnceListener(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ prependOnceListener(event: 'worker', listener: WorkerListener): this;
+ listeners(event: 'beforeExit'): BeforeExitListener[];
+ listeners(event: 'disconnect'): DisconnectListener[];
+ listeners(event: 'exit'): ExitListener[];
+ listeners(event: 'rejectionHandled'): RejectionHandledListener[];
+ listeners(event: 'uncaughtException'): UncaughtExceptionListener[];
+ listeners(event: 'uncaughtExceptionMonitor'): UncaughtExceptionListener[];
+ listeners(event: 'unhandledRejection'): UnhandledRejectionListener[];
+ listeners(event: 'warning'): WarningListener[];
+ listeners(event: 'message'): MessageListener[];
+ listeners(event: Signals): SignalsListener[];
+ listeners(event: 'multipleResolves'): MultipleResolveListener[];
+ listeners(event: 'worker'): WorkerListener[];
+ }
+ }
+ }
+ export = process;
+}
+declare module 'node:process' {
+ import process = require('process');
+ export = process;
+}
diff --git a/node_modules/@types/node/punycode.d.ts b/node_modules/@types/node/punycode.d.ts
new file mode 100755
index 0000000..8927207
--- /dev/null
+++ b/node_modules/@types/node/punycode.d.ts
@@ -0,0 +1,117 @@
+/**
+ * **The version of the punycode module bundled in Node.js is being deprecated.**In a future major version of Node.js this module will be removed. Users
+ * currently depending on the `punycode` module should switch to using the
+ * userland-provided [Punycode.js](https://github.com/bestiejs/punycode.js) module instead. For punycode-based URL
+ * encoding, see `url.domainToASCII` or, more generally, the `WHATWG URL API`.
+ *
+ * The `punycode` module is a bundled version of the [Punycode.js](https://github.com/bestiejs/punycode.js) module. It
+ * can be accessed using:
+ *
+ * ```js
+ * const punycode = require('punycode');
+ * ```
+ *
+ * [Punycode](https://tools.ietf.org/html/rfc3492) is a character encoding scheme defined by RFC 3492 that is
+ * primarily intended for use in Internationalized Domain Names. Because host
+ * names in URLs are limited to ASCII characters only, Domain Names that contain
+ * non-ASCII characters must be converted into ASCII using the Punycode scheme.
+ * For instance, the Japanese character that translates into the English word,`'example'` is `'例'`. The Internationalized Domain Name, `'例.com'` (equivalent
+ * to `'example.com'`) is represented by Punycode as the ASCII string`'xn--fsq.com'`.
+ *
+ * The `punycode` module provides a simple implementation of the Punycode standard.
+ *
+ * The `punycode` module is a third-party dependency used by Node.js and
+ * made available to developers as a convenience. Fixes or other modifications to
+ * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
+ * @deprecated Since v7.0.0 - Deprecated
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/punycode.js)
+ */
+declare module 'punycode' {
+ /**
+ * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only
+ * characters to the equivalent string of Unicode codepoints.
+ *
+ * ```js
+ * punycode.decode('maana-pta'); // 'mañana'
+ * punycode.decode('--dqo34k'); // '☃-⌘'
+ * ```
+ * @since v0.5.1
+ */
+ function decode(string: string): string;
+ /**
+ * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters.
+ *
+ * ```js
+ * punycode.encode('mañana'); // 'maana-pta'
+ * punycode.encode('☃-⌘'); // '--dqo34k'
+ * ```
+ * @since v0.5.1
+ */
+ function encode(string: string): string;
+ /**
+ * The `punycode.toUnicode()` method converts a string representing a domain name
+ * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be
+ * converted.
+ *
+ * ```js
+ * // decode domain names
+ * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com'
+ * punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com'
+ * punycode.toUnicode('example.com'); // 'example.com'
+ * ```
+ * @since v0.6.1
+ */
+ function toUnicode(domain: string): string;
+ /**
+ * The `punycode.toASCII()` method converts a Unicode string representing an
+ * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the
+ * domain name will be converted. Calling `punycode.toASCII()` on a string that
+ * already only contains ASCII characters will have no effect.
+ *
+ * ```js
+ * // encode domain names
+ * punycode.toASCII('mañana.com'); // 'xn--maana-pta.com'
+ * punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com'
+ * punycode.toASCII('example.com'); // 'example.com'
+ * ```
+ * @since v0.6.1
+ */
+ function toASCII(domain: string): string;
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ const ucs2: ucs2;
+ interface ucs2 {
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ decode(string: string): number[];
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ encode(codePoints: ReadonlyArray<number>): string;
+ }
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ const version: string;
+}
+declare module 'node:punycode' {
+ export * from 'punycode';
+}
diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts
new file mode 100755
index 0000000..e9d087c
--- /dev/null
+++ b/node_modules/@types/node/querystring.d.ts
@@ -0,0 +1,131 @@
+/**
+ * The `node:querystring` module provides utilities for parsing and formatting URL
+ * query strings. It can be accessed using:
+ *
+ * ```js
+ * const querystring = require('node:querystring');
+ * ```
+ *
+ * `querystring` is more performant than `URLSearchParams` but is not a
+ * standardized API. Use `URLSearchParams` when performance is not critical or
+ * when compatibility with browser code is desirable.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/querystring.js)
+ */
+declare module 'querystring' {
+ interface StringifyOptions {
+ encodeURIComponent?: ((str: string) => string) | undefined;
+ }
+ interface ParseOptions {
+ maxKeys?: number | undefined;
+ decodeURIComponent?: ((str: string) => string) | undefined;
+ }
+ interface ParsedUrlQuery extends NodeJS.Dict<string | string[]> {}
+ interface ParsedUrlQueryInput extends NodeJS.Dict<string | number | boolean | ReadonlyArray<string> | ReadonlyArray<number> | ReadonlyArray<boolean> | null> {}
+ /**
+ * The `querystring.stringify()` method produces a URL query string from a
+ * given `obj` by iterating through the object's "own properties".
+ *
+ * It serializes the following types of values passed in `obj`:[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
+ * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) |
+ * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) |
+ * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) |
+ * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
+ * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) |
+ * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) |
+ * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to
+ * empty strings.
+ *
+ * ```js
+ * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' });
+ * // Returns 'foo=bar&#x26;baz=qux&#x26;baz=quux&#x26;corge='
+ *
+ * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':');
+ * // Returns 'foo:bar;baz:qux'
+ * ```
+ *
+ * By default, characters requiring percent-encoding within the query string will
+ * be encoded as UTF-8\. If an alternative encoding is required, then an alternative`encodeURIComponent` option will need to be specified:
+ *
+ * ```js
+ * // Assuming gbkEncodeURIComponent function already exists,
+ *
+ * querystring.stringify({ w: '中文', foo: 'bar' }, null, null,
+ * { encodeURIComponent: gbkEncodeURIComponent });
+ * ```
+ * @since v0.1.25
+ * @param obj The object to serialize into a URL query string
+ * @param [sep='&'] The substring used to delimit key and value pairs in the query string.
+ * @param [eq='='] . The substring used to delimit keys and values in the query string.
+ */
+ function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string;
+ /**
+ * The `querystring.parse()` method parses a URL query string (`str`) into a
+ * collection of key and value pairs.
+ *
+ * For example, the query string `'foo=bar&#x26;abc=xyz&#x26;abc=123'` is parsed into:
+ *
+ * ```js
+ * {
+ * foo: 'bar',
+ * abc: ['xyz', '123']
+ * }
+ * ```
+ *
+ * The object returned by the `querystring.parse()` method _does not_prototypically inherit from the JavaScript `Object`. This means that typical`Object` methods such as `obj.toString()`,
+ * `obj.hasOwnProperty()`, and others
+ * are not defined and _will not work_.
+ *
+ * By default, percent-encoded characters within the query string will be assumed
+ * to use UTF-8 encoding. If an alternative character encoding is used, then an
+ * alternative `decodeURIComponent` option will need to be specified:
+ *
+ * ```js
+ * // Assuming gbkDecodeURIComponent function already exists...
+ *
+ * querystring.parse('w=%D6%D0%CE%C4&#x26;foo=bar', null, null,
+ * { decodeURIComponent: gbkDecodeURIComponent });
+ * ```
+ * @since v0.1.25
+ * @param str The URL query string to parse
+ * @param [sep='&'] The substring used to delimit key and value pairs in the query string.
+ * @param [eq='='] . The substring used to delimit keys and values in the query string.
+ */
+ function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
+ /**
+ * The querystring.encode() function is an alias for querystring.stringify().
+ */
+ const encode: typeof stringify;
+ /**
+ * The querystring.decode() function is an alias for querystring.parse().
+ */
+ const decode: typeof parse;
+ /**
+ * The `querystring.escape()` method performs URL percent-encoding on the given`str` in a manner that is optimized for the specific requirements of URL
+ * query strings.
+ *
+ * The `querystring.escape()` method is used by `querystring.stringify()` and is
+ * generally not expected to be used directly. It is exported primarily to allow
+ * application code to provide a replacement percent-encoding implementation if
+ * necessary by assigning `querystring.escape` to an alternative function.
+ * @since v0.1.25
+ */
+ function escape(str: string): string;
+ /**
+ * The `querystring.unescape()` method performs decoding of URL percent-encoded
+ * characters on the given `str`.
+ *
+ * The `querystring.unescape()` method is used by `querystring.parse()` and is
+ * generally not expected to be used directly. It is exported primarily to allow
+ * application code to provide a replacement decoding implementation if
+ * necessary by assigning `querystring.unescape` to an alternative function.
+ *
+ * By default, the `querystring.unescape()` method will attempt to use the
+ * JavaScript built-in `decodeURIComponent()` method to decode. If that fails,
+ * a safer equivalent that does not throw on malformed URLs will be used.
+ * @since v0.1.25
+ */
+ function unescape(str: string): string;
+}
+declare module 'node:querystring' {
+ export * from 'querystring';
+}
diff --git a/node_modules/@types/node/readline.d.ts b/node_modules/@types/node/readline.d.ts
new file mode 100755
index 0000000..e6f7b0a
--- /dev/null
+++ b/node_modules/@types/node/readline.d.ts
@@ -0,0 +1,526 @@
+/**
+ * The `node:readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time.
+ *
+ * To use the promise-based APIs:
+ *
+ * ```js
+ * import * as readline from 'node:readline/promises';
+ * ```
+ *
+ * To use the callback and sync APIs:
+ *
+ * ```js
+ * import * as readline from 'node:readline';
+ * ```
+ *
+ * The following simple example illustrates the basic use of the `node:readline`module.
+ *
+ * ```js
+ * import * as readline from 'node:readline/promises';
+ * import { stdin as input, stdout as output } from 'node:process';
+ *
+ * const rl = readline.createInterface({ input, output });
+ *
+ * const answer = await rl.question('What do you think of Node.js? ');
+ *
+ * console.log(`Thank you for your valuable feedback: ${answer}`);
+ *
+ * rl.close();
+ * ```
+ *
+ * Once this code is invoked, the Node.js application will not terminate until the`readline.Interface` is closed because the interface waits for data to be
+ * received on the `input` stream.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/readline.js)
+ */
+declare module 'readline' {
+ import { Abortable, EventEmitter } from 'node:events';
+ import * as promises from 'node:readline/promises';
+ export { promises };
+ export interface Key {
+ sequence?: string | undefined;
+ name?: string | undefined;
+ ctrl?: boolean | undefined;
+ meta?: boolean | undefined;
+ shift?: boolean | undefined;
+ }
+ /**
+ * Instances of the `readline.Interface` class are constructed using the`readline.createInterface()` method. Every instance is associated with a
+ * single `input` `Readable` stream and a single `output` `Writable` stream.
+ * The `output` stream is used to print prompts for user input that arrives on,
+ * and is read from, the `input` stream.
+ * @since v0.1.104
+ */
+ export class Interface extends EventEmitter {
+ readonly terminal: boolean;
+ /**
+ * The current input data being processed by node.
+ *
+ * This can be used when collecting input from a TTY stream to retrieve the
+ * current value that has been processed thus far, prior to the `line` event
+ * being emitted. Once the `line` event has been emitted, this property will
+ * be an empty string.
+ *
+ * Be aware that modifying the value during the instance runtime may have
+ * unintended consequences if `rl.cursor` is not also controlled.
+ *
+ * **If not using a TTY stream for input, use the `'line'` event.**
+ *
+ * One possible use case would be as follows:
+ *
+ * ```js
+ * const values = ['lorem ipsum', 'dolor sit amet'];
+ * const rl = readline.createInterface(process.stdin);
+ * const showResults = debounce(() => {
+ * console.log(
+ * '\n',
+ * values.filter((val) => val.startsWith(rl.line)).join(' '),
+ * );
+ * }, 300);
+ * process.stdin.on('keypress', (c, k) => {
+ * showResults();
+ * });
+ * ```
+ * @since v0.1.98
+ */
+ readonly line: string;
+ /**
+ * The cursor position relative to `rl.line`.
+ *
+ * This will track where the current cursor lands in the input string, when
+ * reading input from a TTY stream. The position of cursor determines the
+ * portion of the input string that will be modified as input is processed,
+ * as well as the column where the terminal caret will be rendered.
+ * @since v0.1.98
+ */
+ readonly cursor: number;
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of the `readline.Interface` class are constructed using the
+ * > `readline.createInterface()` method.
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#class-interfaceconstructor
+ */
+ protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean);
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of the `readline.Interface` class are constructed using the
+ * > `readline.createInterface()` method.
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#class-interfaceconstructor
+ */
+ protected constructor(options: ReadLineOptions);
+ /**
+ * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`.
+ * @since v15.3.0, v14.17.0
+ * @return the current prompt string
+ */
+ getPrompt(): string;
+ /**
+ * The `rl.setPrompt()` method sets the prompt that will be written to `output`whenever `rl.prompt()` is called.
+ * @since v0.1.98
+ */
+ setPrompt(prompt: string): void;
+ /**
+ * The `rl.prompt()` method writes the `Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new
+ * location at which to provide input.
+ *
+ * When called, `rl.prompt()` will resume the `input` stream if it has been
+ * paused.
+ *
+ * If the `Interface` was created with `output` set to `null` or`undefined` the prompt is not written.
+ * @since v0.1.98
+ * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`.
+ */
+ prompt(preserveCursor?: boolean): void;
+ /**
+ * The `rl.question()` method displays the `query` by writing it to the `output`,
+ * waits for user input to be provided on `input`, then invokes the `callback`function passing the provided input as the first argument.
+ *
+ * When called, `rl.question()` will resume the `input` stream if it has been
+ * paused.
+ *
+ * If the `Interface` was created with `output` set to `null` or`undefined` the `query` is not written.
+ *
+ * The `callback` function passed to `rl.question()` does not follow the typical
+ * pattern of accepting an `Error` object or `null` as the first argument.
+ * The `callback` is called with the provided answer as the only argument.
+ *
+ * An error will be thrown if calling `rl.question()` after `rl.close()`.
+ *
+ * Example usage:
+ *
+ * ```js
+ * rl.question('What is your favorite food? ', (answer) => {
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * });
+ * ```
+ *
+ * Using an `AbortController` to cancel a question.
+ *
+ * ```js
+ * const ac = new AbortController();
+ * const signal = ac.signal;
+ *
+ * rl.question('What is your favorite food? ', { signal }, (answer) => {
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * });
+ *
+ * signal.addEventListener('abort', () => {
+ * console.log('The food question timed out');
+ * }, { once: true });
+ *
+ * setTimeout(() => ac.abort(), 10000);
+ * ```
+ * @since v0.3.3
+ * @param query A statement or query to write to `output`, prepended to the prompt.
+ * @param callback A callback function that is invoked with the user's input in response to the `query`.
+ */
+ question(query: string, callback: (answer: string) => void): void;
+ question(query: string, options: Abortable, callback: (answer: string) => void): void;
+ /**
+ * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed
+ * later if necessary.
+ *
+ * Calling `rl.pause()` does not immediately pause other events (including`'line'`) from being emitted by the `Interface` instance.
+ * @since v0.3.4
+ */
+ pause(): this;
+ /**
+ * The `rl.resume()` method resumes the `input` stream if it has been paused.
+ * @since v0.3.4
+ */
+ resume(): this;
+ /**
+ * The `rl.close()` method closes the `Interface` instance and
+ * relinquishes control over the `input` and `output` streams. When called,
+ * the `'close'` event will be emitted.
+ *
+ * Calling `rl.close()` does not immediately stop other events (including `'line'`)
+ * from being emitted by the `Interface` instance.
+ * @since v0.1.98
+ */
+ close(): void;
+ /**
+ * The `rl.write()` method will write either `data` or a key sequence identified
+ * by `key` to the `output`. The `key` argument is supported only if `output` is
+ * a `TTY` text terminal. See `TTY keybindings` for a list of key
+ * combinations.
+ *
+ * If `key` is specified, `data` is ignored.
+ *
+ * When called, `rl.write()` will resume the `input` stream if it has been
+ * paused.
+ *
+ * If the `Interface` was created with `output` set to `null` or`undefined` the `data` and `key` are not written.
+ *
+ * ```js
+ * rl.write('Delete this!');
+ * // Simulate Ctrl+U to delete the line written previously
+ * rl.write(null, { ctrl: true, name: 'u' });
+ * ```
+ *
+ * The `rl.write()` method will write the data to the `readline` `Interface`'s`input`_as if it were provided by the user_.
+ * @since v0.1.98
+ */
+ write(data: string | Buffer, key?: Key): void;
+ write(data: undefined | null | string | Buffer, key: Key): void;
+ /**
+ * Returns the real position of the cursor in relation to the input
+ * prompt + string. Long input (wrapping) strings, as well as multiple
+ * line prompts are included in the calculations.
+ * @since v13.5.0, v12.16.0
+ */
+ getCursorPos(): CursorPos;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. line
+ * 3. pause
+ * 4. resume
+ * 5. SIGCONT
+ * 6. SIGINT
+ * 7. SIGTSTP
+ * 8. history
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'line', listener: (input: string) => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: 'SIGCONT', listener: () => void): this;
+ addListener(event: 'SIGINT', listener: () => void): this;
+ addListener(event: 'SIGTSTP', listener: () => void): this;
+ addListener(event: 'history', listener: (history: string[]) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'line', input: string): boolean;
+ emit(event: 'pause'): boolean;
+ emit(event: 'resume'): boolean;
+ emit(event: 'SIGCONT'): boolean;
+ emit(event: 'SIGINT'): boolean;
+ emit(event: 'SIGTSTP'): boolean;
+ emit(event: 'history', history: string[]): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'line', listener: (input: string) => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: 'SIGCONT', listener: () => void): this;
+ on(event: 'SIGINT', listener: () => void): this;
+ on(event: 'SIGTSTP', listener: () => void): this;
+ on(event: 'history', listener: (history: string[]) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'line', listener: (input: string) => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: 'SIGCONT', listener: () => void): this;
+ once(event: 'SIGINT', listener: () => void): this;
+ once(event: 'SIGTSTP', listener: () => void): this;
+ once(event: 'history', listener: (history: string[]) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'line', listener: (input: string) => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: 'SIGCONT', listener: () => void): this;
+ prependListener(event: 'SIGINT', listener: () => void): this;
+ prependListener(event: 'SIGTSTP', listener: () => void): this;
+ prependListener(event: 'history', listener: (history: string[]) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'line', listener: (input: string) => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: 'SIGCONT', listener: () => void): this;
+ prependOnceListener(event: 'SIGINT', listener: () => void): this;
+ prependOnceListener(event: 'SIGTSTP', listener: () => void): this;
+ prependOnceListener(event: 'history', listener: (history: string[]) => void): this;
+ [Symbol.asyncIterator](): AsyncIterableIterator<string>;
+ }
+ export type ReadLine = Interface; // type forwarded for backwards compatibility
+ export type Completer = (line: string) => CompleterResult;
+ export type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => void;
+ export type CompleterResult = [string[], string];
+ export interface ReadLineOptions {
+ input: NodeJS.ReadableStream;
+ output?: NodeJS.WritableStream | undefined;
+ completer?: Completer | AsyncCompleter | undefined;
+ terminal?: boolean | undefined;
+ /**
+ * Initial list of history lines. This option makes sense
+ * only if `terminal` is set to `true` by the user or by an internal `output`
+ * check, otherwise the history caching mechanism is not initialized at all.
+ * @default []
+ */
+ history?: string[] | undefined;
+ historySize?: number | undefined;
+ prompt?: string | undefined;
+ crlfDelay?: number | undefined;
+ /**
+ * If `true`, when a new input line added
+ * to the history list duplicates an older one, this removes the older line
+ * from the list.
+ * @default false
+ */
+ removeHistoryDuplicates?: boolean | undefined;
+ escapeCodeTimeout?: number | undefined;
+ tabSize?: number | undefined;
+ }
+ /**
+ * The `readline.createInterface()` method creates a new `readline.Interface`instance.
+ *
+ * ```js
+ * const readline = require('node:readline');
+ * const rl = readline.createInterface({
+ * input: process.stdin,
+ * output: process.stdout,
+ * });
+ * ```
+ *
+ * Once the `readline.Interface` instance is created, the most common case is to
+ * listen for the `'line'` event:
+ *
+ * ```js
+ * rl.on('line', (line) => {
+ * console.log(`Received: ${line}`);
+ * });
+ * ```
+ *
+ * If `terminal` is `true` for this instance then the `output` stream will get
+ * the best compatibility if it defines an `output.columns` property and emits
+ * a `'resize'` event on the `output` if or when the columns ever change
+ * (`process.stdout` does this automatically when it is a TTY).
+ *
+ * When creating a `readline.Interface` using `stdin` as input, the program
+ * will not terminate until it receives an [EOF character](https://en.wikipedia.org/wiki/End-of-file#EOF_character). To exit without
+ * waiting for user input, call `process.stdin.unref()`.
+ * @since v0.1.98
+ */
+ export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
+ export function createInterface(options: ReadLineOptions): Interface;
+ /**
+ * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input.
+ *
+ * Optionally, `interface` specifies a `readline.Interface` instance for which
+ * autocompletion is disabled when copy-pasted input is detected.
+ *
+ * If the `stream` is a `TTY`, then it must be in raw mode.
+ *
+ * This is automatically called by any readline instance on its `input` if the`input` is a terminal. Closing the `readline` instance does not stop
+ * the `input` from emitting `'keypress'` events.
+ *
+ * ```js
+ * readline.emitKeypressEvents(process.stdin);
+ * if (process.stdin.isTTY)
+ * process.stdin.setRawMode(true);
+ * ```
+ *
+ * ## Example: Tiny CLI
+ *
+ * The following example illustrates the use of `readline.Interface` class to
+ * implement a small command-line interface:
+ *
+ * ```js
+ * const readline = require('node:readline');
+ * const rl = readline.createInterface({
+ * input: process.stdin,
+ * output: process.stdout,
+ * prompt: 'OHAI> ',
+ * });
+ *
+ * rl.prompt();
+ *
+ * rl.on('line', (line) => {
+ * switch (line.trim()) {
+ * case 'hello':
+ * console.log('world!');
+ * break;
+ * default:
+ * console.log(`Say what? I might have heard '${line.trim()}'`);
+ * break;
+ * }
+ * rl.prompt();
+ * }).on('close', () => {
+ * console.log('Have a great day!');
+ * process.exit(0);
+ * });
+ * ```
+ *
+ * ## Example: Read file stream line-by-Line
+ *
+ * A common use case for `readline` is to consume an input file one line at a
+ * time. The easiest way to do so is leveraging the `fs.ReadStream` API as
+ * well as a `for await...of` loop:
+ *
+ * ```js
+ * const fs = require('node:fs');
+ * const readline = require('node:readline');
+ *
+ * async function processLineByLine() {
+ * const fileStream = fs.createReadStream('input.txt');
+ *
+ * const rl = readline.createInterface({
+ * input: fileStream,
+ * crlfDelay: Infinity,
+ * });
+ * // Note: we use the crlfDelay option to recognize all instances of CR LF
+ * // ('\r\n') in input.txt as a single line break.
+ *
+ * for await (const line of rl) {
+ * // Each line in input.txt will be successively available here as `line`.
+ * console.log(`Line from file: ${line}`);
+ * }
+ * }
+ *
+ * processLineByLine();
+ * ```
+ *
+ * Alternatively, one could use the `'line'` event:
+ *
+ * ```js
+ * const fs = require('node:fs');
+ * const readline = require('node:readline');
+ *
+ * const rl = readline.createInterface({
+ * input: fs.createReadStream('sample.txt'),
+ * crlfDelay: Infinity,
+ * });
+ *
+ * rl.on('line', (line) => {
+ * console.log(`Line from file: ${line}`);
+ * });
+ * ```
+ *
+ * Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied:
+ *
+ * ```js
+ * const { once } = require('node:events');
+ * const { createReadStream } = require('node:fs');
+ * const { createInterface } = require('node:readline');
+ *
+ * (async function processLineByLine() {
+ * try {
+ * const rl = createInterface({
+ * input: createReadStream('big-file.txt'),
+ * crlfDelay: Infinity,
+ * });
+ *
+ * rl.on('line', (line) => {
+ * // Process the line.
+ * });
+ *
+ * await once(rl, 'close');
+ *
+ * console.log('File processed.');
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * })();
+ * ```
+ * @since v0.7.7
+ */
+ export function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
+ export type Direction = -1 | 0 | 1;
+ export interface CursorPos {
+ rows: number;
+ cols: number;
+ }
+ /**
+ * The `readline.clearLine()` method clears current line of given `TTY` stream
+ * in a specified direction identified by `dir`.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
+ /**
+ * The `readline.clearScreenDown()` method clears the given `TTY` stream from
+ * the current position of the cursor down.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
+ /**
+ * The `readline.cursorTo()` method moves cursor to the specified position in a
+ * given `TTY` `stream`.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
+ /**
+ * The `readline.moveCursor()` method moves the cursor _relative_ to its current
+ * position in a given `TTY` `stream`.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ export function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
+}
+declare module 'node:readline' {
+ export * from 'readline';
+}
diff --git a/node_modules/@types/node/readline/promises.d.ts b/node_modules/@types/node/readline/promises.d.ts
new file mode 100755
index 0000000..079fbdf
--- /dev/null
+++ b/node_modules/@types/node/readline/promises.d.ts
@@ -0,0 +1,145 @@
+/**
+ * @since v17.0.0
+ * @experimental
+ */
+declare module 'readline/promises' {
+ import { Interface as _Interface, ReadLineOptions, Completer, AsyncCompleter, Direction } from 'node:readline';
+ import { Abortable } from 'node:events';
+ /**
+ * Instances of the `readlinePromises.Interface` class are constructed using the`readlinePromises.createInterface()` method. Every instance is associated with a
+ * single `input` `Readable` stream and a single `output` `Writable` stream.
+ * The `output` stream is used to print prompts for user input that arrives on,
+ * and is read from, the `input` stream.
+ * @since v17.0.0
+ */
+ class Interface extends _Interface {
+ /**
+ * The `rl.question()` method displays the `query` by writing it to the `output`,
+ * waits for user input to be provided on `input`, then invokes the `callback`function passing the provided input as the first argument.
+ *
+ * When called, `rl.question()` will resume the `input` stream if it has been
+ * paused.
+ *
+ * If the `Interface` was created with `output` set to `null` or`undefined` the `query` is not written.
+ *
+ * If the question is called after `rl.close()`, it returns a rejected promise.
+ *
+ * Example usage:
+ *
+ * ```js
+ * const answer = await rl.question('What is your favorite food? ');
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * ```
+ *
+ * Using an `AbortSignal` to cancel a question.
+ *
+ * ```js
+ * const signal = AbortSignal.timeout(10_000);
+ *
+ * signal.addEventListener('abort', () => {
+ * console.log('The food question timed out');
+ * }, { once: true });
+ *
+ * const answer = await rl.question('What is your favorite food? ', { signal });
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * ```
+ * @since v17.0.0
+ * @param query A statement or query to write to `output`, prepended to the prompt.
+ * @return A promise that is fulfilled with the user's input in response to the `query`.
+ */
+ question(query: string): Promise<string>;
+ question(query: string, options: Abortable): Promise<string>;
+ }
+ /**
+ * @since v17.0.0
+ */
+ class Readline {
+ /**
+ * @param stream A TTY stream.
+ */
+ constructor(
+ stream: NodeJS.WritableStream,
+ options?: {
+ autoCommit?: boolean;
+ }
+ );
+ /**
+ * The `rl.clearLine()` method adds to the internal list of pending action an
+ * action that clears current line of the associated `stream` in a specified
+ * direction identified by `dir`.
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`was passed to the constructor.
+ * @since v17.0.0
+ * @return this
+ */
+ clearLine(dir: Direction): this;
+ /**
+ * The `rl.clearScreenDown()` method adds to the internal list of pending action an
+ * action that clears the associated stream from the current position of the
+ * cursor down.
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`was passed to the constructor.
+ * @since v17.0.0
+ * @return this
+ */
+ clearScreenDown(): this;
+ /**
+ * The `rl.commit()` method sends all the pending actions to the associated`stream` and clears the internal list of pending actions.
+ * @since v17.0.0
+ */
+ commit(): Promise<void>;
+ /**
+ * The `rl.cursorTo()` method adds to the internal list of pending action an action
+ * that moves cursor to the specified position in the associated `stream`.
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`was passed to the constructor.
+ * @since v17.0.0
+ * @return this
+ */
+ cursorTo(x: number, y?: number): this;
+ /**
+ * The `rl.moveCursor()` method adds to the internal list of pending action an
+ * action that moves the cursor _relative_ to its current position in the
+ * associated `stream`.
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`was passed to the constructor.
+ * @since v17.0.0
+ * @return this
+ */
+ moveCursor(dx: number, dy: number): this;
+ /**
+ * The `rl.rollback` methods clears the internal list of pending actions without
+ * sending it to the associated `stream`.
+ * @since v17.0.0
+ * @return this
+ */
+ rollback(): this;
+ }
+ /**
+ * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface`instance.
+ *
+ * ```js
+ * const readlinePromises = require('node:readline/promises');
+ * const rl = readlinePromises.createInterface({
+ * input: process.stdin,
+ * output: process.stdout,
+ * });
+ * ```
+ *
+ * Once the `readlinePromises.Interface` instance is created, the most common case
+ * is to listen for the `'line'` event:
+ *
+ * ```js
+ * rl.on('line', (line) => {
+ * console.log(`Received: ${line}`);
+ * });
+ * ```
+ *
+ * If `terminal` is `true` for this instance then the `output` stream will get
+ * the best compatibility if it defines an `output.columns` property and emits
+ * a `'resize'` event on the `output` if or when the columns ever change
+ * (`process.stdout` does this automatically when it is a TTY).
+ * @since v17.0.0
+ */
+ function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
+ function createInterface(options: ReadLineOptions): Interface;
+}
+declare module 'node:readline/promises' {
+ export * from 'readline/promises';
+}
diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts
new file mode 100755
index 0000000..c8147ed
--- /dev/null
+++ b/node_modules/@types/node/repl.d.ts
@@ -0,0 +1,424 @@
+/**
+ * The `node:repl` module provides a Read-Eval-Print-Loop (REPL) implementation
+ * that is available both as a standalone program or includible in other
+ * applications. It can be accessed using:
+ *
+ * ```js
+ * const repl = require('node:repl');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/repl.js)
+ */
+declare module 'repl' {
+ import { Interface, Completer, AsyncCompleter } from 'node:readline';
+ import { Context } from 'node:vm';
+ import { InspectOptions } from 'node:util';
+ interface ReplOptions {
+ /**
+ * The input prompt to display.
+ * @default "> "
+ */
+ prompt?: string | undefined;
+ /**
+ * The `Readable` stream from which REPL input will be read.
+ * @default process.stdin
+ */
+ input?: NodeJS.ReadableStream | undefined;
+ /**
+ * The `Writable` stream to which REPL output will be written.
+ * @default process.stdout
+ */
+ output?: NodeJS.WritableStream | undefined;
+ /**
+ * If `true`, specifies that the output should be treated as a TTY terminal, and have
+ * ANSI/VT100 escape codes written to it.
+ * Default: checking the value of the `isTTY` property on the output stream upon
+ * instantiation.
+ */
+ terminal?: boolean | undefined;
+ /**
+ * The function to be used when evaluating each given line of input.
+ * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can
+ * error with `repl.Recoverable` to indicate the input was incomplete and prompt for
+ * additional lines.
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_default_evaluation
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_custom_evaluation_functions
+ */
+ eval?: REPLEval | undefined;
+ /**
+ * Defines if the repl prints output previews or not.
+ * @default `true` Always `false` in case `terminal` is falsy.
+ */
+ preview?: boolean | undefined;
+ /**
+ * If `true`, specifies that the default `writer` function should include ANSI color
+ * styling to REPL output. If a custom `writer` function is provided then this has no
+ * effect.
+ * Default: the REPL instance's `terminal` value.
+ */
+ useColors?: boolean | undefined;
+ /**
+ * If `true`, specifies that the default evaluation function will use the JavaScript
+ * `global` as the context as opposed to creating a new separate context for the REPL
+ * instance. The node CLI REPL sets this value to `true`.
+ * Default: `false`.
+ */
+ useGlobal?: boolean | undefined;
+ /**
+ * If `true`, specifies that the default writer will not output the return value of a
+ * command if it evaluates to `undefined`.
+ * Default: `false`.
+ */
+ ignoreUndefined?: boolean | undefined;
+ /**
+ * The function to invoke to format the output of each command before writing to `output`.
+ * Default: a wrapper for `util.inspect`.
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_customizing_repl_output
+ */
+ writer?: REPLWriter | undefined;
+ /**
+ * An optional function used for custom Tab auto completion.
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#readline_use_of_the_completer_function
+ */
+ completer?: Completer | AsyncCompleter | undefined;
+ /**
+ * A flag that specifies whether the default evaluator executes all JavaScript commands in
+ * strict mode or default (sloppy) mode.
+ * Accepted values are:
+ * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
+ * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
+ * prefacing every repl statement with `'use strict'`.
+ */
+ replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined;
+ /**
+ * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is
+ * pressed. This cannot be used together with a custom `eval` function.
+ * Default: `false`.
+ */
+ breakEvalOnSigint?: boolean | undefined;
+ }
+ type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void;
+ type REPLWriter = (this: REPLServer, obj: any) => string;
+ /**
+ * This is the default "writer" value, if none is passed in the REPL options,
+ * and it can be overridden by custom print functions.
+ */
+ const writer: REPLWriter & {
+ options: InspectOptions;
+ };
+ type REPLCommandAction = (this: REPLServer, text: string) => void;
+ interface REPLCommand {
+ /**
+ * Help text to be displayed when `.help` is entered.
+ */
+ help?: string | undefined;
+ /**
+ * The function to execute, optionally accepting a single string argument.
+ */
+ action: REPLCommandAction;
+ }
+ /**
+ * Instances of `repl.REPLServer` are created using the {@link start} method
+ * or directly using the JavaScript `new` keyword.
+ *
+ * ```js
+ * const repl = require('node:repl');
+ *
+ * const options = { useColors: true };
+ *
+ * const firstInstance = repl.start(options);
+ * const secondInstance = new repl.REPLServer(options);
+ * ```
+ * @since v0.1.91
+ */
+ class REPLServer extends Interface {
+ /**
+ * The `vm.Context` provided to the `eval` function to be used for JavaScript
+ * evaluation.
+ */
+ readonly context: Context;
+ /**
+ * @deprecated since v14.3.0 - Use `input` instead.
+ */
+ readonly inputStream: NodeJS.ReadableStream;
+ /**
+ * @deprecated since v14.3.0 - Use `output` instead.
+ */
+ readonly outputStream: NodeJS.WritableStream;
+ /**
+ * The `Readable` stream from which REPL input will be read.
+ */
+ readonly input: NodeJS.ReadableStream;
+ /**
+ * The `Writable` stream to which REPL output will be written.
+ */
+ readonly output: NodeJS.WritableStream;
+ /**
+ * The commands registered via `replServer.defineCommand()`.
+ */
+ readonly commands: NodeJS.ReadOnlyDict<REPLCommand>;
+ /**
+ * A value indicating whether the REPL is currently in "editor mode".
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_commands_and_special_keys
+ */
+ readonly editorMode: boolean;
+ /**
+ * A value indicating whether the `_` variable has been assigned.
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly underscoreAssigned: boolean;
+ /**
+ * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly last: any;
+ /**
+ * A value indicating whether the `_error` variable has been assigned.
+ *
+ * @since v9.8.0
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly underscoreErrAssigned: boolean;
+ /**
+ * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
+ *
+ * @since v9.8.0
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly lastError: any;
+ /**
+ * Specified in the REPL options, this is the function to be used when evaluating each
+ * given line of input. If not specified in the REPL options, this is an async wrapper
+ * for the JavaScript `eval()` function.
+ */
+ readonly eval: REPLEval;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default
+ * `writer` function should include ANSI color styling to REPL output.
+ */
+ readonly useColors: boolean;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default `eval`
+ * function will use the JavaScript `global` as the context as opposed to creating a new
+ * separate context for the REPL instance.
+ */
+ readonly useGlobal: boolean;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default `writer`
+ * function should output the result of a command if it evaluates to `undefined`.
+ */
+ readonly ignoreUndefined: boolean;
+ /**
+ * Specified in the REPL options, this is the function to invoke to format the output of
+ * each command before writing to `outputStream`. If not specified in the REPL options,
+ * this will be a wrapper for `util.inspect`.
+ */
+ readonly writer: REPLWriter;
+ /**
+ * Specified in the REPL options, this is the function to use for custom Tab auto-completion.
+ */
+ readonly completer: Completer | AsyncCompleter;
+ /**
+ * Specified in the REPL options, this is a flag that specifies whether the default `eval`
+ * function should execute all JavaScript commands in strict mode or default (sloppy) mode.
+ * Possible values are:
+ * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
+ * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
+ * prefacing every repl statement with `'use strict'`.
+ */
+ readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of `repl.REPLServer` are created using the `repl.start()` method and
+ * > _should not_ be created directly using the JavaScript `new` keyword.
+ *
+ * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_class_replserver
+ */
+ private constructor();
+ /**
+ * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands
+ * to the REPL instance. Such commands are invoked by typing a `.` followed by the`keyword`. The `cmd` is either a `Function` or an `Object` with the following
+ * properties:
+ *
+ * The following example shows two new commands added to the REPL instance:
+ *
+ * ```js
+ * const repl = require('node:repl');
+ *
+ * const replServer = repl.start({ prompt: '> ' });
+ * replServer.defineCommand('sayhello', {
+ * help: 'Say hello',
+ * action(name) {
+ * this.clearBufferedCommand();
+ * console.log(`Hello, ${name}!`);
+ * this.displayPrompt();
+ * },
+ * });
+ * replServer.defineCommand('saybye', function saybye() {
+ * console.log('Goodbye!');
+ * this.close();
+ * });
+ * ```
+ *
+ * The new commands can then be used from within the REPL instance:
+ *
+ * ```console
+ * > .sayhello Node.js User
+ * Hello, Node.js User!
+ * > .saybye
+ * Goodbye!
+ * ```
+ * @since v0.3.0
+ * @param keyword The command keyword (_without_ a leading `.` character).
+ * @param cmd The function to invoke when the command is processed.
+ */
+ defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void;
+ /**
+ * The `replServer.displayPrompt()` method readies the REPL instance for input
+ * from the user, printing the configured `prompt` to a new line in the `output`and resuming the `input` to accept new input.
+ *
+ * When multi-line input is being entered, an ellipsis is printed rather than the
+ * 'prompt'.
+ *
+ * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`.
+ *
+ * The `replServer.displayPrompt` method is primarily intended to be called from
+ * within the action function for commands registered using the`replServer.defineCommand()` method.
+ * @since v0.1.91
+ */
+ displayPrompt(preserveCursor?: boolean): void;
+ /**
+ * The `replServer.clearBufferedCommand()` method clears any command that has been
+ * buffered but not yet executed. This method is primarily intended to be
+ * called from within the action function for commands registered using the`replServer.defineCommand()` method.
+ * @since v9.0.0
+ */
+ clearBufferedCommand(): void;
+ /**
+ * Initializes a history log file for the REPL instance. When executing the
+ * Node.js binary and using the command-line REPL, a history file is initialized
+ * by default. However, this is not the case when creating a REPL
+ * programmatically. Use this method to initialize a history log file when working
+ * with REPL instances programmatically.
+ * @since v11.10.0
+ * @param historyPath the path to the history file
+ * @param callback called when history writes are ready or upon error
+ */
+ setupHistory(path: string, callback: (err: Error | null, repl: this) => void): void;
+ /**
+ * events.EventEmitter
+ * 1. close - inherited from `readline.Interface`
+ * 2. line - inherited from `readline.Interface`
+ * 3. pause - inherited from `readline.Interface`
+ * 4. resume - inherited from `readline.Interface`
+ * 5. SIGCONT - inherited from `readline.Interface`
+ * 6. SIGINT - inherited from `readline.Interface`
+ * 7. SIGTSTP - inherited from `readline.Interface`
+ * 8. exit
+ * 9. reset
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'line', listener: (input: string) => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: 'SIGCONT', listener: () => void): this;
+ addListener(event: 'SIGINT', listener: () => void): this;
+ addListener(event: 'SIGTSTP', listener: () => void): this;
+ addListener(event: 'exit', listener: () => void): this;
+ addListener(event: 'reset', listener: (context: Context) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'line', input: string): boolean;
+ emit(event: 'pause'): boolean;
+ emit(event: 'resume'): boolean;
+ emit(event: 'SIGCONT'): boolean;
+ emit(event: 'SIGINT'): boolean;
+ emit(event: 'SIGTSTP'): boolean;
+ emit(event: 'exit'): boolean;
+ emit(event: 'reset', context: Context): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'line', listener: (input: string) => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: 'SIGCONT', listener: () => void): this;
+ on(event: 'SIGINT', listener: () => void): this;
+ on(event: 'SIGTSTP', listener: () => void): this;
+ on(event: 'exit', listener: () => void): this;
+ on(event: 'reset', listener: (context: Context) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'line', listener: (input: string) => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: 'SIGCONT', listener: () => void): this;
+ once(event: 'SIGINT', listener: () => void): this;
+ once(event: 'SIGTSTP', listener: () => void): this;
+ once(event: 'exit', listener: () => void): this;
+ once(event: 'reset', listener: (context: Context) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'line', listener: (input: string) => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: 'SIGCONT', listener: () => void): this;
+ prependListener(event: 'SIGINT', listener: () => void): this;
+ prependListener(event: 'SIGTSTP', listener: () => void): this;
+ prependListener(event: 'exit', listener: () => void): this;
+ prependListener(event: 'reset', listener: (context: Context) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'line', listener: (input: string) => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: 'SIGCONT', listener: () => void): this;
+ prependOnceListener(event: 'SIGINT', listener: () => void): this;
+ prependOnceListener(event: 'SIGTSTP', listener: () => void): this;
+ prependOnceListener(event: 'exit', listener: () => void): this;
+ prependOnceListener(event: 'reset', listener: (context: Context) => void): this;
+ }
+ /**
+ * A flag passed in the REPL options. Evaluates expressions in sloppy mode.
+ */
+ const REPL_MODE_SLOPPY: unique symbol;
+ /**
+ * A flag passed in the REPL options. Evaluates expressions in strict mode.
+ * This is equivalent to prefacing every repl statement with `'use strict'`.
+ */
+ const REPL_MODE_STRICT: unique symbol;
+ /**
+ * The `repl.start()` method creates and starts a {@link REPLServer} instance.
+ *
+ * If `options` is a string, then it specifies the input prompt:
+ *
+ * ```js
+ * const repl = require('node:repl');
+ *
+ * // a Unix style prompt
+ * repl.start('$ ');
+ * ```
+ * @since v0.1.91
+ */
+ function start(options?: string | ReplOptions): REPLServer;
+ /**
+ * Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_recoverable_errors
+ */
+ class Recoverable extends SyntaxError {
+ err: Error;
+ constructor(err: Error);
+ }
+}
+declare module 'node:repl' {
+ export * from 'repl';
+}
diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts
new file mode 100755
index 0000000..7577c98
--- /dev/null
+++ b/node_modules/@types/node/stream.d.ts
@@ -0,0 +1,1568 @@
+/**
+ * A stream is an abstract interface for working with streaming data in Node.js.
+ * The `node:stream` module provides an API for implementing the stream interface.
+ *
+ * There are many stream objects provided by Node.js. For instance, a `request to an HTTP server` and `process.stdout` are both stream instances.
+ *
+ * Streams can be readable, writable, or both. All streams are instances of `EventEmitter`.
+ *
+ * To access the `node:stream` module:
+ *
+ * ```js
+ * const stream = require('node:stream');
+ * ```
+ *
+ * The `node:stream` module is useful for creating new types of stream instances.
+ * It is usually not necessary to use the `node:stream` module to consume streams.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/stream.js)
+ */
+declare module 'stream' {
+ import { EventEmitter, Abortable } from 'node:events';
+ import { Blob as NodeBlob } from 'node:buffer';
+ import * as streamPromises from 'node:stream/promises';
+ import * as streamConsumers from 'node:stream/consumers';
+ import * as streamWeb from 'node:stream/web';
+
+ type ComposeFnParam = (source: any) => void;
+
+ class internal extends EventEmitter {
+ pipe<T extends NodeJS.WritableStream>(
+ destination: T,
+ options?: {
+ end?: boolean | undefined;
+ }
+ ): T;
+ compose<T extends NodeJS.ReadableStream>(stream: T | ComposeFnParam | Iterable<T> | AsyncIterable<T>, options?: { signal: AbortSignal }): T;
+ }
+ import Stream = internal.Stream;
+ import Readable = internal.Readable;
+ import ReadableOptions = internal.ReadableOptions;
+ interface ArrayOptions {
+ /** the maximum concurrent invocations of `fn` to call on the stream at once. **Default: 1**. */
+ concurrency?: number;
+ /** allows destroying the stream if the signal is aborted. */
+ signal?: AbortSignal;
+ }
+ class ReadableBase extends Stream implements NodeJS.ReadableStream {
+ /**
+ * A utility method for creating Readable Streams out of iterators.
+ */
+ static from(iterable: Iterable<any> | AsyncIterable<any>, options?: ReadableOptions): Readable;
+ /**
+ * Returns whether the stream has been read from or cancelled.
+ * @since v16.8.0
+ */
+ static isDisturbed(stream: Readable | NodeJS.ReadableStream): boolean;
+ /**
+ * Returns whether the stream was destroyed or errored before emitting `'end'`.
+ * @since v16.8.0
+ * @experimental
+ */
+ readonly readableAborted: boolean;
+ /**
+ * Is `true` if it is safe to call `readable.read()`, which means
+ * the stream has not been destroyed or emitted `'error'` or `'end'`.
+ * @since v11.4.0
+ */
+ readable: boolean;
+ /**
+ * Returns whether `'data'` has been emitted.
+ * @since v16.7.0, v14.18.0
+ * @experimental
+ */
+ readonly readableDidRead: boolean;
+ /**
+ * Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method.
+ * @since v12.7.0
+ */
+ readonly readableEncoding: BufferEncoding | null;
+ /**
+ * Becomes `true` when `'end'` event is emitted.
+ * @since v12.9.0
+ */
+ readonly readableEnded: boolean;
+ /**
+ * This property reflects the current state of a `Readable` stream as described
+ * in the `Three states` section.
+ * @since v9.4.0
+ */
+ readonly readableFlowing: boolean | null;
+ /**
+ * Returns the value of `highWaterMark` passed when creating this `Readable`.
+ * @since v9.3.0
+ */
+ readonly readableHighWaterMark: number;
+ /**
+ * This property contains the number of bytes (or objects) in the queue
+ * ready to be read. The value provides introspection data regarding
+ * the status of the `highWaterMark`.
+ * @since v9.4.0
+ */
+ readonly readableLength: number;
+ /**
+ * Getter for the property `objectMode` of a given `Readable` stream.
+ * @since v12.3.0
+ */
+ readonly readableObjectMode: boolean;
+ /**
+ * Is `true` after `readable.destroy()` has been called.
+ * @since v8.0.0
+ */
+ destroyed: boolean;
+ /**
+ * Is `true` after `'close'` has been emitted.
+ * @since v18.0.0
+ */
+ readonly closed: boolean;
+ /**
+ * Returns error if the stream has been destroyed with an error.
+ * @since v18.0.0
+ */
+ readonly errored: Error | null;
+ constructor(opts?: ReadableOptions);
+ _construct?(callback: (error?: Error | null) => void): void;
+ _read(size: number): void;
+ /**
+ * The `readable.read()` method reads data out of the internal buffer and
+ * returns it. If no data is available to be read, `null` is returned. By default,
+ * the data is returned as a `Buffer` object unless an encoding has been
+ * specified using the `readable.setEncoding()` method or the stream is operating
+ * in object mode.
+ *
+ * The optional `size` argument specifies a specific number of bytes to read. If`size` bytes are not available to be read, `null` will be returned _unless_the stream has ended, in which
+ * case all of the data remaining in the internal
+ * buffer will be returned.
+ *
+ * If the `size` argument is not specified, all of the data contained in the
+ * internal buffer will be returned.
+ *
+ * The `size` argument must be less than or equal to 1 GiB.
+ *
+ * The `readable.read()` method should only be called on `Readable` streams
+ * operating in paused mode. In flowing mode, `readable.read()` is called
+ * automatically until the internal buffer is fully drained.
+ *
+ * ```js
+ * const readable = getReadableStreamSomehow();
+ *
+ * // 'readable' may be triggered multiple times as data is buffered in
+ * readable.on('readable', () => {
+ * let chunk;
+ * console.log('Stream is readable (new data received in buffer)');
+ * // Use a loop to make sure we read all currently available data
+ * while (null !== (chunk = readable.read())) {
+ * console.log(`Read ${chunk.length} bytes of data...`);
+ * }
+ * });
+ *
+ * // 'end' will be triggered once when there is no more data available
+ * readable.on('end', () => {
+ * console.log('Reached end of stream.');
+ * });
+ * ```
+ *
+ * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks
+ * are not concatenated. A `while` loop is necessary to consume all data
+ * currently in the buffer. When reading a large file `.read()` may return `null`,
+ * having consumed all buffered content so far, but there is still more data to
+ * come not yet buffered. In this case a new `'readable'` event will be emitted
+ * when there is more data in the buffer. Finally the `'end'` event will be
+ * emitted when there is no more data to come.
+ *
+ * Therefore to read a file's whole contents from a `readable`, it is necessary
+ * to collect chunks across multiple `'readable'` events:
+ *
+ * ```js
+ * const chunks = [];
+ *
+ * readable.on('readable', () => {
+ * let chunk;
+ * while (null !== (chunk = readable.read())) {
+ * chunks.push(chunk);
+ * }
+ * });
+ *
+ * readable.on('end', () => {
+ * const content = chunks.join('');
+ * });
+ * ```
+ *
+ * A `Readable` stream in object mode will always return a single item from
+ * a call to `readable.read(size)`, regardless of the value of the`size` argument.
+ *
+ * If the `readable.read()` method returns a chunk of data, a `'data'` event will
+ * also be emitted.
+ *
+ * Calling {@link read} after the `'end'` event has
+ * been emitted will return `null`. No runtime error will be raised.
+ * @since v0.9.4
+ * @param size Optional argument to specify how much data to read.
+ */
+ read(size?: number): any;
+ /**
+ * The `readable.setEncoding()` method sets the character encoding for
+ * data read from the `Readable` stream.
+ *
+ * By default, no encoding is assigned and stream data will be returned as`Buffer` objects. Setting an encoding causes the stream data
+ * to be returned as strings of the specified encoding rather than as `Buffer`objects. For instance, calling `readable.setEncoding('utf8')` will cause the
+ * output data to be interpreted as UTF-8 data, and passed as strings. Calling`readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal
+ * string format.
+ *
+ * The `Readable` stream will properly handle multi-byte characters delivered
+ * through the stream that would otherwise become improperly decoded if simply
+ * pulled from the stream as `Buffer` objects.
+ *
+ * ```js
+ * const readable = getReadableStreamSomehow();
+ * readable.setEncoding('utf8');
+ * readable.on('data', (chunk) => {
+ * assert.equal(typeof chunk, 'string');
+ * console.log('Got %d characters of string data:', chunk.length);
+ * });
+ * ```
+ * @since v0.9.4
+ * @param encoding The encoding to use.
+ */
+ setEncoding(encoding: BufferEncoding): this;
+ /**
+ * The `readable.pause()` method will cause a stream in flowing mode to stop
+ * emitting `'data'` events, switching out of flowing mode. Any data that
+ * becomes available will remain in the internal buffer.
+ *
+ * ```js
+ * const readable = getReadableStreamSomehow();
+ * readable.on('data', (chunk) => {
+ * console.log(`Received ${chunk.length} bytes of data.`);
+ * readable.pause();
+ * console.log('There will be no additional data for 1 second.');
+ * setTimeout(() => {
+ * console.log('Now data will start flowing again.');
+ * readable.resume();
+ * }, 1000);
+ * });
+ * ```
+ *
+ * The `readable.pause()` method has no effect if there is a `'readable'`event listener.
+ * @since v0.9.4
+ */
+ pause(): this;
+ /**
+ * The `readable.resume()` method causes an explicitly paused `Readable` stream to
+ * resume emitting `'data'` events, switching the stream into flowing mode.
+ *
+ * The `readable.resume()` method can be used to fully consume the data from a
+ * stream without actually processing any of that data:
+ *
+ * ```js
+ * getReadableStreamSomehow()
+ * .resume()
+ * .on('end', () => {
+ * console.log('Reached the end, but did not read anything.');
+ * });
+ * ```
+ *
+ * The `readable.resume()` method has no effect if there is a `'readable'`event listener.
+ * @since v0.9.4
+ */
+ resume(): this;
+ /**
+ * The `readable.isPaused()` method returns the current operating state of the`Readable`. This is used primarily by the mechanism that underlies the`readable.pipe()` method. In most
+ * typical cases, there will be no reason to
+ * use this method directly.
+ *
+ * ```js
+ * const readable = new stream.Readable();
+ *
+ * readable.isPaused(); // === false
+ * readable.pause();
+ * readable.isPaused(); // === true
+ * readable.resume();
+ * readable.isPaused(); // === false
+ * ```
+ * @since v0.11.14
+ */
+ isPaused(): boolean;
+ /**
+ * The `readable.unpipe()` method detaches a `Writable` stream previously attached
+ * using the {@link pipe} method.
+ *
+ * If the `destination` is not specified, then _all_ pipes are detached.
+ *
+ * If the `destination` is specified, but no pipe is set up for it, then
+ * the method does nothing.
+ *
+ * ```js
+ * const fs = require('node:fs');
+ * const readable = getReadableStreamSomehow();
+ * const writable = fs.createWriteStream('file.txt');
+ * // All the data from readable goes into 'file.txt',
+ * // but only for the first second.
+ * readable.pipe(writable);
+ * setTimeout(() => {
+ * console.log('Stop writing to file.txt.');
+ * readable.unpipe(writable);
+ * console.log('Manually close the file stream.');
+ * writable.end();
+ * }, 1000);
+ * ```
+ * @since v0.9.4
+ * @param destination Optional specific stream to unpipe
+ */
+ unpipe(destination?: NodeJS.WritableStream): this;
+ /**
+ * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the
+ * same as `readable.push(null)`, after which no more data can be written. The EOF
+ * signal is put at the end of the buffer and any buffered data will still be
+ * flushed.
+ *
+ * The `readable.unshift()` method pushes a chunk of data back into the internal
+ * buffer. This is useful in certain situations where a stream is being consumed by
+ * code that needs to "un-consume" some amount of data that it has optimistically
+ * pulled out of the source, so that the data can be passed on to some other party.
+ *
+ * The `stream.unshift(chunk)` method cannot be called after the `'end'` event
+ * has been emitted or a runtime error will be thrown.
+ *
+ * Developers using `stream.unshift()` often should consider switching to
+ * use of a `Transform` stream instead. See the `API for stream implementers` section for more information.
+ *
+ * ```js
+ * // Pull off a header delimited by \n\n.
+ * // Use unshift() if we get too much.
+ * // Call the callback with (error, header, stream).
+ * const { StringDecoder } = require('node:string_decoder');
+ * function parseHeader(stream, callback) {
+ * stream.on('error', callback);
+ * stream.on('readable', onReadable);
+ * const decoder = new StringDecoder('utf8');
+ * let header = '';
+ * function onReadable() {
+ * let chunk;
+ * while (null !== (chunk = stream.read())) {
+ * const str = decoder.write(chunk);
+ * if (str.includes('\n\n')) {
+ * // Found the header boundary.
+ * const split = str.split(/\n\n/);
+ * header += split.shift();
+ * const remaining = split.join('\n\n');
+ * const buf = Buffer.from(remaining, 'utf8');
+ * stream.removeListener('error', callback);
+ * // Remove the 'readable' listener before unshifting.
+ * stream.removeListener('readable', onReadable);
+ * if (buf.length)
+ * stream.unshift(buf);
+ * // Now the body of the message can be read from the stream.
+ * callback(null, header, stream);
+ * return;
+ * }
+ * // Still reading the header.
+ * header += str;
+ * }
+ * }
+ * }
+ * ```
+ *
+ * Unlike {@link push}, `stream.unshift(chunk)` will not
+ * end the reading process by resetting the internal reading state of the stream.
+ * This can cause unexpected results if `readable.unshift()` is called during a
+ * read (i.e. from within a {@link _read} implementation on a
+ * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately,
+ * however it is best to simply avoid calling `readable.unshift()` while in the
+ * process of performing a read.
+ * @since v0.9.11
+ * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must be a string, `Buffer`, `Uint8Array`, or `null`. For object mode
+ * streams, `chunk` may be any JavaScript value.
+ * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`.
+ */
+ unshift(chunk: any, encoding?: BufferEncoding): void;
+ /**
+ * Prior to Node.js 0.10, streams did not implement the entire `node:stream`module API as it is currently defined. (See `Compatibility` for more
+ * information.)
+ *
+ * When using an older Node.js library that emits `'data'` events and has a {@link pause} method that is advisory only, the`readable.wrap()` method can be used to create a `Readable`
+ * stream that uses
+ * the old stream as its data source.
+ *
+ * It will rarely be necessary to use `readable.wrap()` but the method has been
+ * provided as a convenience for interacting with older Node.js applications and
+ * libraries.
+ *
+ * ```js
+ * const { OldReader } = require('./old-api-module.js');
+ * const { Readable } = require('node:stream');
+ * const oreader = new OldReader();
+ * const myReader = new Readable().wrap(oreader);
+ *
+ * myReader.on('readable', () => {
+ * myReader.read(); // etc.
+ * });
+ * ```
+ * @since v0.9.4
+ * @param stream An "old style" readable stream
+ */
+ wrap(stream: NodeJS.ReadableStream): this;
+ push(chunk: any, encoding?: BufferEncoding): boolean;
+ /**
+ * The iterator created by this method gives users the option to cancel the destruction
+ * of the stream if the `for await...of` loop is exited by `return`, `break`, or `throw`,
+ * or if the iterator should destroy the stream if the stream emitted an error during iteration.
+ * @since v16.3.0
+ * @param options.destroyOnReturn When set to `false`, calling `return` on the async iterator,
+ * or exiting a `for await...of` iteration using a `break`, `return`, or `throw` will not destroy the stream.
+ * **Default: `true`**.
+ */
+ iterator(options?: {destroyOnReturn?: boolean}): AsyncIterableIterator<any>;
+ /**
+ * This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream.
+ * If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream.
+ * @since v17.4.0, v16.14.0
+ * @param fn a function to map over every chunk in the stream. Async or not.
+ * @returns a stream mapped with the function *fn*.
+ */
+ map(fn: (data: any, options?: Pick<ArrayOptions, "signal">) => any, options?: ArrayOptions): Readable;
+ /**
+ * This method allows filtering the stream. For each chunk in the stream the *fn* function will be called
+ * and if it returns a truthy value, the chunk will be passed to the result stream.
+ * If the *fn* function returns a promise - that promise will be `await`ed.
+ * @since v17.4.0, v16.14.0
+ * @param fn a function to filter chunks from the stream. Async or not.
+ * @returns a stream filtered with the predicate *fn*.
+ */
+ filter(fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>, options?: ArrayOptions): Readable;
+ /**
+ * This method allows iterating a stream. For each chunk in the stream the *fn* function will be called.
+ * If the *fn* function returns a promise - that promise will be `await`ed.
+ *
+ * This method is different from `for await...of` loops in that it can optionally process chunks concurrently.
+ * In addition, a `forEach` iteration can only be stopped by having passed a `signal` option
+ * and aborting the related AbortController while `for await...of` can be stopped with `break` or `return`.
+ * In either case the stream will be destroyed.
+ *
+ * This method is different from listening to the `'data'` event in that it uses the `readable` event
+ * in the underlying machinary and can limit the number of concurrent *fn* calls.
+ * @since v17.5.0
+ * @param fn a function to call on each chunk of the stream. Async or not.
+ * @returns a promise for when the stream has finished.
+ */
+ forEach(fn: (data: any, options?: Pick<ArrayOptions, "signal">) => void | Promise<void>, options?: ArrayOptions): Promise<void>;
+ /**
+ * This method allows easily obtaining the contents of a stream.
+ *
+ * As this method reads the entire stream into memory, it negates the benefits of streams. It's intended
+ * for interoperability and convenience, not as the primary way to consume streams.
+ * @since v17.5.0
+ * @returns a promise containing an array with the contents of the stream.
+ */
+ toArray(options?: Pick<ArrayOptions, "signal">): Promise<any[]>;
+ /**
+ * This method is similar to `Array.prototype.some` and calls *fn* on each chunk in the stream
+ * until the awaited return value is `true` (or any truthy value). Once an *fn* call on a chunk
+ * `await`ed return value is truthy, the stream is destroyed and the promise is fulfilled with `true`.
+ * If none of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `false`.
+ * @since v17.5.0
+ * @param fn a function to call on each chunk of the stream. Async or not.
+ * @returns a promise evaluating to `true` if *fn* returned a truthy value for at least one of the chunks.
+ */
+ some(fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>, options?: ArrayOptions): Promise<boolean>;
+ /**
+ * This method is similar to `Array.prototype.find` and calls *fn* on each chunk in the stream
+ * to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return value is truthy,
+ * the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value.
+ * If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`.
+ * @since v17.5.0
+ * @param fn a function to call on each chunk of the stream. Async or not.
+ * @returns a promise evaluating to the first chunk for which *fn* evaluated with a truthy value,
+ * or `undefined` if no element was found.
+ */
+ find<T>(fn: (data: any, options?: Pick<ArrayOptions, "signal">) => data is T, options?: ArrayOptions): Promise<T | undefined>;
+ find(fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>, options?: ArrayOptions): Promise<any>;
+ /**
+ * This method is similar to `Array.prototype.every` and calls *fn* on each chunk in the stream
+ * to check if all awaited return values are truthy value for *fn*. Once an *fn* call on a chunk
+ * `await`ed return value is falsy, the stream is destroyed and the promise is fulfilled with `false`.
+ * If all of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `true`.
+ * @since v17.5.0
+ * @param fn a function to call on each chunk of the stream. Async or not.
+ * @returns a promise evaluating to `true` if *fn* returned a truthy value for every one of the chunks.
+ */
+ every(fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>, options?: ArrayOptions): Promise<boolean>;
+ /**
+ * This method returns a new stream by applying the given callback to each chunk of the stream
+ * and then flattening the result.
+ *
+ * It is possible to return a stream or another iterable or async iterable from *fn* and the result streams
+ * will be merged (flattened) into the returned stream.
+ * @since v17.5.0
+ * @param fn a function to map over every chunk in the stream. May be async. May be a stream or generator.
+ * @returns a stream flat-mapped with the function *fn*.
+ */
+ flatMap(fn: (data: any, options?: Pick<ArrayOptions, "signal">) => any, options?: ArrayOptions): Readable;
+ /**
+ * This method returns a new stream with the first *limit* chunks dropped from the start.
+ * @since v17.5.0
+ * @param limit the number of chunks to drop from the readable.
+ * @returns a stream with *limit* chunks dropped from the start.
+ */
+ drop(limit: number, options?: Pick<ArrayOptions, "signal">): Readable;
+ /**
+ * This method returns a new stream with the first *limit* chunks.
+ * @since v17.5.0
+ * @param limit the number of chunks to take from the readable.
+ * @returns a stream with *limit* chunks taken.
+ */
+ take(limit: number, options?: Pick<ArrayOptions, "signal">): Readable;
+ /**
+ * This method returns a new stream with chunks of the underlying stream paired with a counter
+ * in the form `[index, chunk]`. The first index value is `0` and it increases by 1 for each chunk produced.
+ * @since v17.5.0
+ * @returns a stream of indexed pairs.
+ */
+ asIndexedPairs(options?: Pick<ArrayOptions, "signal">): Readable;
+ /**
+ * This method calls *fn* on each chunk of the stream in order, passing it the result from the calculation
+ * on the previous element. It returns a promise for the final value of the reduction.
+ *
+ * If no *initial* value is supplied the first chunk of the stream is used as the initial value.
+ * If the stream is empty, the promise is rejected with a `TypeError` with the `ERR_INVALID_ARGS` code property.
+ *
+ * The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter
+ * or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method.
+ * @since v17.5.0
+ * @param fn a reducer function to call over every chunk in the stream. Async or not.
+ * @param initial the initial value to use in the reduction.
+ * @returns a promise for the final value of the reduction.
+ */
+ reduce<T = any>(fn: (previous: any, data: any, options?: Pick<ArrayOptions, "signal">) => T, initial?: undefined, options?: Pick<ArrayOptions, "signal">): Promise<T>;
+ reduce<T = any>(fn: (previous: T, data: any, options?: Pick<ArrayOptions, "signal">) => T, initial: T, options?: Pick<ArrayOptions, "signal">): Promise<T>;
+ _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
+ /**
+ * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the readable
+ * stream will release any internal resources and subsequent calls to `push()`will be ignored.
+ *
+ * Once `destroy()` has been called any further calls will be a no-op and no
+ * further errors except from `_destroy()` may be emitted as `'error'`.
+ *
+ * Implementors should not override this method, but instead implement `readable._destroy()`.
+ * @since v8.0.0
+ * @param error Error which will be passed as payload in `'error'` event
+ */
+ destroy(error?: Error): this;
+ /**
+ * Event emitter
+ * The defined events on documents including:
+ * 1. close
+ * 2. data
+ * 3. end
+ * 4. error
+ * 5. pause
+ * 6. readable
+ * 7. resume
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: any) => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'readable', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'data', chunk: any): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'pause'): boolean;
+ emit(event: 'readable'): boolean;
+ emit(event: 'resume'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: any) => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'readable', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: any) => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'readable', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: any) => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'readable', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: any) => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'readable', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'close', listener: () => void): this;
+ removeListener(event: 'data', listener: (chunk: any) => void): this;
+ removeListener(event: 'end', listener: () => void): this;
+ removeListener(event: 'error', listener: (err: Error) => void): this;
+ removeListener(event: 'pause', listener: () => void): this;
+ removeListener(event: 'readable', listener: () => void): this;
+ removeListener(event: 'resume', listener: () => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ [Symbol.asyncIterator](): AsyncIterableIterator<any>;
+ /**
+ * Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished.
+ * @since v20.4.0
+ */
+ [Symbol.asyncDispose](): Promise<void>;
+ }
+ import WritableOptions = internal.WritableOptions;
+ class WritableBase extends Stream implements NodeJS.WritableStream {
+ /**
+ * Is `true` if it is safe to call `writable.write()`, which means
+ * the stream has not been destroyed, errored, or ended.
+ * @since v11.4.0
+ */
+ readonly writable: boolean;
+ /**
+ * Is `true` after `writable.end()` has been called. This property
+ * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead.
+ * @since v12.9.0
+ */
+ readonly writableEnded: boolean;
+ /**
+ * Is set to `true` immediately before the `'finish'` event is emitted.
+ * @since v12.6.0
+ */
+ readonly writableFinished: boolean;
+ /**
+ * Return the value of `highWaterMark` passed when creating this `Writable`.
+ * @since v9.3.0
+ */
+ readonly writableHighWaterMark: number;
+ /**
+ * This property contains the number of bytes (or objects) in the queue
+ * ready to be written. The value provides introspection data regarding
+ * the status of the `highWaterMark`.
+ * @since v9.4.0
+ */
+ readonly writableLength: number;
+ /**
+ * Getter for the property `objectMode` of a given `Writable` stream.
+ * @since v12.3.0
+ */
+ readonly writableObjectMode: boolean;
+ /**
+ * Number of times `writable.uncork()` needs to be
+ * called in order to fully uncork the stream.
+ * @since v13.2.0, v12.16.0
+ */
+ readonly writableCorked: number;
+ /**
+ * Is `true` after `writable.destroy()` has been called.
+ * @since v8.0.0
+ */
+ destroyed: boolean;
+ /**
+ * Is `true` after `'close'` has been emitted.
+ * @since v18.0.0
+ */
+ readonly closed: boolean;
+ /**
+ * Returns error if the stream has been destroyed with an error.
+ * @since v18.0.0
+ */
+ readonly errored: Error | null;
+ /**
+ * Is `true` if the stream's buffer has been full and stream will emit `'drain'`.
+ * @since v15.2.0, v14.17.0
+ */
+ readonly writableNeedDrain: boolean;
+ constructor(opts?: WritableOptions);
+ _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ _writev?(
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ _construct?(callback: (error?: Error | null) => void): void;
+ _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
+ _final(callback: (error?: Error | null) => void): void;
+ /**
+ * The `writable.write()` method writes some data to the stream, and calls the
+ * supplied `callback` once the data has been fully handled. If an error
+ * occurs, the `callback` will be called with the error as its
+ * first argument. The `callback` is called asynchronously and before `'error'` is
+ * emitted.
+ *
+ * The return value is `true` if the internal buffer is less than the`highWaterMark` configured when the stream was created after admitting `chunk`.
+ * If `false` is returned, further attempts to write data to the stream should
+ * stop until the `'drain'` event is emitted.
+ *
+ * While a stream is not draining, calls to `write()` will buffer `chunk`, and
+ * return false. Once all currently buffered chunks are drained (accepted for
+ * delivery by the operating system), the `'drain'` event will be emitted.
+ * Once `write()` returns false, do not write more chunks
+ * until the `'drain'` event is emitted. While calling `write()` on a stream that
+ * is not draining is allowed, Node.js will buffer all written chunks until
+ * maximum memory usage occurs, at which point it will abort unconditionally.
+ * Even before it aborts, high memory usage will cause poor garbage collector
+ * performance and high RSS (which is not typically released back to the system,
+ * even after the memory is no longer required). Since TCP sockets may never
+ * drain if the remote peer does not read the data, writing a socket that is
+ * not draining may lead to a remotely exploitable vulnerability.
+ *
+ * Writing data while the stream is not draining is particularly
+ * problematic for a `Transform`, because the `Transform` streams are paused
+ * by default until they are piped or a `'data'` or `'readable'` event handler
+ * is added.
+ *
+ * If the data to be written can be generated or fetched on demand, it is
+ * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is
+ * possible to respect backpressure and avoid memory issues using the `'drain'` event:
+ *
+ * ```js
+ * function write(data, cb) {
+ * if (!stream.write(data)) {
+ * stream.once('drain', cb);
+ * } else {
+ * process.nextTick(cb);
+ * }
+ * }
+ *
+ * // Wait for cb to be called before doing any other write.
+ * write('hello', () => {
+ * console.log('Write completed, do more writes now.');
+ * });
+ * ```
+ *
+ * A `Writable` stream in object mode will always ignore the `encoding` argument.
+ * @since v0.9.4
+ * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any
+ * JavaScript value other than `null`.
+ * @param [encoding='utf8'] The encoding, if `chunk` is a string.
+ * @param callback Callback for when this chunk of data is flushed.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean;
+ write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean;
+ /**
+ * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream.
+ * @since v0.11.15
+ * @param encoding The new default encoding
+ */
+ setDefaultEncoding(encoding: BufferEncoding): this;
+ /**
+ * Calling the `writable.end()` method signals that no more data will be written
+ * to the `Writable`. The optional `chunk` and `encoding` arguments allow one
+ * final additional chunk of data to be written immediately before closing the
+ * stream.
+ *
+ * Calling the {@link write} method after calling {@link end} will raise an error.
+ *
+ * ```js
+ * // Write 'hello, ' and then end with 'world!'.
+ * const fs = require('node:fs');
+ * const file = fs.createWriteStream('example.txt');
+ * file.write('hello, ');
+ * file.end('world!');
+ * // Writing more now is not allowed!
+ * ```
+ * @since v0.9.4
+ * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any
+ * JavaScript value other than `null`.
+ * @param encoding The encoding if `chunk` is a string
+ * @param callback Callback for when the stream is finished.
+ */
+ end(cb?: () => void): this;
+ end(chunk: any, cb?: () => void): this;
+ end(chunk: any, encoding: BufferEncoding, cb?: () => void): this;
+ /**
+ * The `writable.cork()` method forces all written data to be buffered in memory.
+ * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called.
+ *
+ * The primary intent of `writable.cork()` is to accommodate a situation in which
+ * several small chunks are written to the stream in rapid succession. Instead of
+ * immediately forwarding them to the underlying destination, `writable.cork()`buffers all the chunks until `writable.uncork()` is called, which will pass them
+ * all to `writable._writev()`, if present. This prevents a head-of-line blocking
+ * situation where data is being buffered while waiting for the first small chunk
+ * to be processed. However, use of `writable.cork()` without implementing`writable._writev()` may have an adverse effect on throughput.
+ *
+ * See also: `writable.uncork()`, `writable._writev()`.
+ * @since v0.11.2
+ */
+ cork(): void;
+ /**
+ * The `writable.uncork()` method flushes all data buffered since {@link cork} was called.
+ *
+ * When using `writable.cork()` and `writable.uncork()` to manage the buffering
+ * of writes to a stream, defer calls to `writable.uncork()` using`process.nextTick()`. Doing so allows batching of all`writable.write()` calls that occur within a given Node.js event
+ * loop phase.
+ *
+ * ```js
+ * stream.cork();
+ * stream.write('some ');
+ * stream.write('data ');
+ * process.nextTick(() => stream.uncork());
+ * ```
+ *
+ * If the `writable.cork()` method is called multiple times on a stream, the
+ * same number of calls to `writable.uncork()` must be called to flush the buffered
+ * data.
+ *
+ * ```js
+ * stream.cork();
+ * stream.write('some ');
+ * stream.cork();
+ * stream.write('data ');
+ * process.nextTick(() => {
+ * stream.uncork();
+ * // The data will not be flushed until uncork() is called a second time.
+ * stream.uncork();
+ * });
+ * ```
+ *
+ * See also: `writable.cork()`.
+ * @since v0.11.2
+ */
+ uncork(): void;
+ /**
+ * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the writable
+ * stream has ended and subsequent calls to `write()` or `end()` will result in
+ * an `ERR_STREAM_DESTROYED` error.
+ * This is a destructive and immediate way to destroy a stream. Previous calls to`write()` may not have drained, and may trigger an `ERR_STREAM_DESTROYED` error.
+ * Use `end()` instead of destroy if data should flush before close, or wait for
+ * the `'drain'` event before destroying the stream.
+ *
+ * Once `destroy()` has been called any further calls will be a no-op and no
+ * further errors except from `_destroy()` may be emitted as `'error'`.
+ *
+ * Implementors should not override this method,
+ * but instead implement `writable._destroy()`.
+ * @since v8.0.0
+ * @param error Optional, an error to emit with `'error'` event.
+ */
+ destroy(error?: Error): this;
+ /**
+ * Event emitter
+ * The defined events on documents including:
+ * 1. close
+ * 2. drain
+ * 3. error
+ * 4. finish
+ * 5. pipe
+ * 6. unpipe
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'pipe', listener: (src: Readable) => void): this;
+ addListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'finish'): boolean;
+ emit(event: 'pipe', src: Readable): boolean;
+ emit(event: 'unpipe', src: Readable): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'pipe', listener: (src: Readable) => void): this;
+ on(event: 'unpipe', listener: (src: Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'pipe', listener: (src: Readable) => void): this;
+ once(event: 'unpipe', listener: (src: Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'pipe', listener: (src: Readable) => void): this;
+ prependListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: Readable) => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'close', listener: () => void): this;
+ removeListener(event: 'drain', listener: () => void): this;
+ removeListener(event: 'error', listener: (err: Error) => void): this;
+ removeListener(event: 'finish', listener: () => void): this;
+ removeListener(event: 'pipe', listener: (src: Readable) => void): this;
+ removeListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ namespace internal {
+ class Stream extends internal {
+ constructor(opts?: ReadableOptions);
+ }
+ interface StreamOptions<T extends Stream> extends Abortable {
+ emitClose?: boolean | undefined;
+ highWaterMark?: number | undefined;
+ objectMode?: boolean | undefined;
+ construct?(this: T, callback: (error?: Error | null) => void): void;
+ destroy?(this: T, error: Error | null, callback: (error: Error | null) => void): void;
+ autoDestroy?: boolean | undefined;
+ }
+ interface ReadableOptions extends StreamOptions<Readable> {
+ encoding?: BufferEncoding | undefined;
+ read?(this: Readable, size: number): void;
+ }
+ /**
+ * @since v0.9.4
+ */
+ class Readable extends ReadableBase {
+ /**
+ * A utility method for creating a `Readable` from a web `ReadableStream`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static fromWeb(readableStream: streamWeb.ReadableStream, options?: Pick<ReadableOptions, 'encoding' | 'highWaterMark' | 'objectMode' | 'signal'>): Readable;
+ /**
+ * A utility method for creating a web `ReadableStream` from a `Readable`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static toWeb(streamReadable: Readable): streamWeb.ReadableStream;
+ }
+ interface WritableOptions extends StreamOptions<Writable> {
+ decodeStrings?: boolean | undefined;
+ defaultEncoding?: BufferEncoding | undefined;
+ write?(this: Writable, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ writev?(
+ this: Writable,
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ final?(this: Writable, callback: (error?: Error | null) => void): void;
+ }
+ /**
+ * @since v0.9.4
+ */
+ class Writable extends WritableBase {
+ /**
+ * A utility method for creating a `Writable` from a web `WritableStream`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static fromWeb(writableStream: streamWeb.WritableStream, options?: Pick<WritableOptions, 'decodeStrings' | 'highWaterMark' | 'objectMode' | 'signal'>): Writable;
+ /**
+ * A utility method for creating a web `WritableStream` from a `Writable`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static toWeb(streamWritable: Writable): streamWeb.WritableStream;
+ }
+ interface DuplexOptions extends ReadableOptions, WritableOptions {
+ allowHalfOpen?: boolean | undefined;
+ readableObjectMode?: boolean | undefined;
+ writableObjectMode?: boolean | undefined;
+ readableHighWaterMark?: number | undefined;
+ writableHighWaterMark?: number | undefined;
+ writableCorked?: number | undefined;
+ construct?(this: Duplex, callback: (error?: Error | null) => void): void;
+ read?(this: Duplex, size: number): void;
+ write?(this: Duplex, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ writev?(
+ this: Duplex,
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ final?(this: Duplex, callback: (error?: Error | null) => void): void;
+ destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void;
+ }
+ /**
+ * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces.
+ *
+ * Examples of `Duplex` streams include:
+ *
+ * * `TCP sockets`
+ * * `zlib streams`
+ * * `crypto streams`
+ * @since v0.9.4
+ */
+ class Duplex extends ReadableBase implements WritableBase {
+ readonly writable: boolean;
+ readonly writableEnded: boolean;
+ readonly writableFinished: boolean;
+ readonly writableHighWaterMark: number;
+ readonly writableLength: number;
+ readonly writableObjectMode: boolean;
+ readonly writableCorked: number;
+ readonly writableNeedDrain: boolean;
+ readonly closed: boolean;
+ readonly errored: Error | null;
+ /**
+ * If `false` then the stream will automatically end the writable side when the
+ * readable side ends. Set initially by the `allowHalfOpen` constructor option,
+ * which defaults to `true`.
+ *
+ * This can be changed manually to change the half-open behavior of an existing`Duplex` stream instance, but must be changed before the `'end'` event is
+ * emitted.
+ * @since v0.9.4
+ */
+ allowHalfOpen: boolean;
+ constructor(opts?: DuplexOptions);
+ /**
+ * A utility method for creating duplex streams.
+ *
+ * - `Stream` converts writable stream into writable `Duplex` and readable stream
+ * to `Duplex`.
+ * - `Blob` converts into readable `Duplex`.
+ * - `string` converts into readable `Duplex`.
+ * - `ArrayBuffer` converts into readable `Duplex`.
+ * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`.
+ * - `AsyncGeneratorFunction` converts into a readable/writable transform
+ * `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield
+ * `null`.
+ * - `AsyncFunction` converts into a writable `Duplex`. Must return
+ * either `null` or `undefined`
+ * - `Object ({ writable, readable })` converts `readable` and
+ * `writable` into `Stream` and then combines them into `Duplex` where the
+ * `Duplex` will write to the `writable` and read from the `readable`.
+ * - `Promise` converts into readable `Duplex`. Value `null` is ignored.
+ *
+ * @since v16.8.0
+ */
+ static from(src: Stream | NodeBlob | ArrayBuffer | string | Iterable<any> | AsyncIterable<any> | AsyncGeneratorFunction | Promise<any> | Object): Duplex;
+ _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ _writev?(
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ _destroy(error: Error | null, callback: (error: Error | null) => void): void;
+ _final(callback: (error?: Error | null) => void): void;
+ write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
+ write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
+ setDefaultEncoding(encoding: BufferEncoding): this;
+ end(cb?: () => void): this;
+ end(chunk: any, cb?: () => void): this;
+ end(chunk: any, encoding?: BufferEncoding, cb?: () => void): this;
+ cork(): void;
+ uncork(): void;
+ /**
+ * A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static toWeb(streamDuplex: Duplex): {
+ readable: streamWeb.ReadableStream;
+ writable: streamWeb.WritableStream;
+ };
+ /**
+ * A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static fromWeb(
+ duplexStream: {
+ readable: streamWeb.ReadableStream;
+ writable: streamWeb.WritableStream;
+ },
+ options?: Pick<DuplexOptions, 'allowHalfOpen' | 'decodeStrings' | 'encoding' | 'highWaterMark' | 'objectMode' | 'signal'>
+ ): Duplex;
+ /**
+ * Event emitter
+ * The defined events on documents including:
+ * 1. close
+ * 2. data
+ * 3. drain
+ * 4. end
+ * 5. error
+ * 6. finish
+ * 7. pause
+ * 8. pipe
+ * 9. readable
+ * 10. resume
+ * 11. unpipe
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: any) => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'pipe', listener: (src: Readable) => void): this;
+ addListener(event: 'readable', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'data', chunk: any): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'finish'): boolean;
+ emit(event: 'pause'): boolean;
+ emit(event: 'pipe', src: Readable): boolean;
+ emit(event: 'readable'): boolean;
+ emit(event: 'resume'): boolean;
+ emit(event: 'unpipe', src: Readable): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: any) => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'pipe', listener: (src: Readable) => void): this;
+ on(event: 'readable', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: 'unpipe', listener: (src: Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: any) => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'pipe', listener: (src: Readable) => void): this;
+ once(event: 'readable', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: 'unpipe', listener: (src: Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: any) => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'pipe', listener: (src: Readable) => void): this;
+ prependListener(event: 'readable', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: any) => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: Readable) => void): this;
+ prependOnceListener(event: 'readable', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'close', listener: () => void): this;
+ removeListener(event: 'data', listener: (chunk: any) => void): this;
+ removeListener(event: 'drain', listener: () => void): this;
+ removeListener(event: 'end', listener: () => void): this;
+ removeListener(event: 'error', listener: (err: Error) => void): this;
+ removeListener(event: 'finish', listener: () => void): this;
+ removeListener(event: 'pause', listener: () => void): this;
+ removeListener(event: 'pipe', listener: (src: Readable) => void): this;
+ removeListener(event: 'readable', listener: () => void): this;
+ removeListener(event: 'resume', listener: () => void): this;
+ removeListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ type TransformCallback = (error?: Error | null, data?: any) => void;
+ interface TransformOptions extends DuplexOptions {
+ construct?(this: Transform, callback: (error?: Error | null) => void): void;
+ read?(this: Transform, size: number): void;
+ write?(this: Transform, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ writev?(
+ this: Transform,
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ final?(this: Transform, callback: (error?: Error | null) => void): void;
+ destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void;
+ transform?(this: Transform, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
+ flush?(this: Transform, callback: TransformCallback): void;
+ }
+ /**
+ * Transform streams are `Duplex` streams where the output is in some way
+ * related to the input. Like all `Duplex` streams, `Transform` streams
+ * implement both the `Readable` and `Writable` interfaces.
+ *
+ * Examples of `Transform` streams include:
+ *
+ * * `zlib streams`
+ * * `crypto streams`
+ * @since v0.9.4
+ */
+ class Transform extends Duplex {
+ constructor(opts?: TransformOptions);
+ _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
+ _flush(callback: TransformCallback): void;
+ }
+ /**
+ * The `stream.PassThrough` class is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is
+ * primarily for examples and testing, but there are some use cases where`stream.PassThrough` is useful as a building block for novel sorts of streams.
+ */
+ class PassThrough extends Transform {}
+ /**
+ * A stream to attach a signal to.
+ *
+ * Attaches an AbortSignal to a readable or writeable stream. This lets code
+ * control stream destruction using an `AbortController`.
+ *
+ * Calling `abort` on the `AbortController` corresponding to the passed`AbortSignal` will behave the same way as calling `.destroy(new AbortError())`on the stream, and `controller.error(new
+ * AbortError())` for webstreams.
+ *
+ * ```js
+ * const fs = require('node:fs');
+ *
+ * const controller = new AbortController();
+ * const read = addAbortSignal(
+ * controller.signal,
+ * fs.createReadStream(('object.json')),
+ * );
+ * // Later, abort the operation closing the stream
+ * controller.abort();
+ * ```
+ *
+ * Or using an `AbortSignal` with a readable stream as an async iterable:
+ *
+ * ```js
+ * const controller = new AbortController();
+ * setTimeout(() => controller.abort(), 10_000); // set a timeout
+ * const stream = addAbortSignal(
+ * controller.signal,
+ * fs.createReadStream(('object.json')),
+ * );
+ * (async () => {
+ * try {
+ * for await (const chunk of stream) {
+ * await process(chunk);
+ * }
+ * } catch (e) {
+ * if (e.name === 'AbortError') {
+ * // The operation was cancelled
+ * } else {
+ * throw e;
+ * }
+ * }
+ * })();
+ * ```
+ *
+ * Or using an `AbortSignal` with a ReadableStream:
+ *
+ * ```js
+ * const controller = new AbortController();
+ * const rs = new ReadableStream({
+ * start(controller) {
+ * controller.enqueue('hello');
+ * controller.enqueue('world');
+ * controller.close();
+ * },
+ * });
+ *
+ * addAbortSignal(controller.signal, rs);
+ *
+ * finished(rs, (err) => {
+ * if (err) {
+ * if (err.name === 'AbortError') {
+ * // The operation was cancelled
+ * }
+ * }
+ * });
+ *
+ * const reader = rs.getReader();
+ *
+ * reader.read().then(({ value, done }) => {
+ * console.log(value); // hello
+ * console.log(done); // false
+ * controller.abort();
+ * });
+ * ```
+ * @since v15.4.0
+ * @param signal A signal representing possible cancellation
+ * @param stream a stream to attach a signal to
+ */
+ function addAbortSignal<T extends Stream>(signal: AbortSignal, stream: T): T;
+ /**
+ * Returns the default highWaterMark used by streams.
+ * Defaults to `16384` (16 KiB), or `16` for `objectMode`.
+ * @since v19.9.0
+ * @param objectMode
+ */
+ function getDefaultHighWaterMark(objectMode: boolean): number;
+ /**
+ * Sets the default highWaterMark used by streams.
+ * @since v19.9.0
+ * @param objectMode
+ * @param value highWaterMark value
+ */
+ function setDefaultHighWaterMark(objectMode: boolean, value: number): void;
+ interface FinishedOptions extends Abortable {
+ error?: boolean | undefined;
+ readable?: boolean | undefined;
+ writable?: boolean | undefined;
+ }
+ /**
+ * A readable and/or writable stream/webstream.
+ *
+ * A function to get notified when a stream is no longer readable, writable
+ * or has experienced an error or a premature close event.
+ *
+ * ```js
+ * const { finished } = require('node:stream');
+ * const fs = require('node:fs');
+ *
+ * const rs = fs.createReadStream('archive.tar');
+ *
+ * finished(rs, (err) => {
+ * if (err) {
+ * console.error('Stream failed.', err);
+ * } else {
+ * console.log('Stream is done reading.');
+ * }
+ * });
+ *
+ * rs.resume(); // Drain the stream.
+ * ```
+ *
+ * Especially useful in error handling scenarios where a stream is destroyed
+ * prematurely (like an aborted HTTP request), and will not emit `'end'`or `'finish'`.
+ *
+ * The `finished` API provides `promise version`.
+ *
+ * `stream.finished()` leaves dangling event listeners (in particular`'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been
+ * invoked. The reason for this is so that unexpected `'error'` events (due to
+ * incorrect stream implementations) do not cause unexpected crashes.
+ * If this is unwanted behavior then the returned cleanup function needs to be
+ * invoked in the callback:
+ *
+ * ```js
+ * const cleanup = finished(rs, (err) => {
+ * cleanup();
+ * // ...
+ * });
+ * ```
+ * @since v10.0.0
+ * @param stream A readable and/or writable stream.
+ * @param callback A callback function that takes an optional error argument.
+ * @return A cleanup function which removes all registered listeners.
+ */
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options: FinishedOptions, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
+ namespace finished {
+ function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
+ }
+ type PipelineSourceFunction<T> = () => Iterable<T> | AsyncIterable<T>;
+ type PipelineSource<T> = Iterable<T> | AsyncIterable<T> | NodeJS.ReadableStream | PipelineSourceFunction<T>;
+ type PipelineTransform<S extends PipelineTransformSource<any>, U> =
+ | NodeJS.ReadWriteStream
+ | ((source: S extends (...args: any[]) => Iterable<infer ST> | AsyncIterable<infer ST> ? AsyncIterable<ST> : S) => AsyncIterable<U>);
+ type PipelineTransformSource<T> = PipelineSource<T> | PipelineTransform<any, T>;
+ type PipelineDestinationIterableFunction<T> = (source: AsyncIterable<T>) => AsyncIterable<any>;
+ type PipelineDestinationPromiseFunction<T, P> = (source: AsyncIterable<T>) => Promise<P>;
+ type PipelineDestination<S extends PipelineTransformSource<any>, P> = S extends PipelineTransformSource<infer ST>
+ ? NodeJS.WritableStream | PipelineDestinationIterableFunction<ST> | PipelineDestinationPromiseFunction<ST, P>
+ : never;
+ type PipelineCallback<S extends PipelineDestination<any, any>> = S extends PipelineDestinationPromiseFunction<any, infer P>
+ ? (err: NodeJS.ErrnoException | null, value: P) => void
+ : (err: NodeJS.ErrnoException | null) => void;
+ type PipelinePromise<S extends PipelineDestination<any, any>> = S extends PipelineDestinationPromiseFunction<any, infer P> ? Promise<P> : Promise<void>;
+ interface PipelineOptions {
+ signal?: AbortSignal | undefined;
+ end?: boolean | undefined;
+ }
+ /**
+ * A module method to pipe between streams and generators forwarding errors and
+ * properly cleaning up and provide a callback when the pipeline is complete.
+ *
+ * ```js
+ * const { pipeline } = require('node:stream');
+ * const fs = require('node:fs');
+ * const zlib = require('node:zlib');
+ *
+ * // Use the pipeline API to easily pipe a series of streams
+ * // together and get notified when the pipeline is fully done.
+ *
+ * // A pipeline to gzip a potentially huge tar file efficiently:
+ *
+ * pipeline(
+ * fs.createReadStream('archive.tar'),
+ * zlib.createGzip(),
+ * fs.createWriteStream('archive.tar.gz'),
+ * (err) => {
+ * if (err) {
+ * console.error('Pipeline failed.', err);
+ * } else {
+ * console.log('Pipeline succeeded.');
+ * }
+ * },
+ * );
+ * ```
+ *
+ * The `pipeline` API provides a `promise version`.
+ *
+ * `stream.pipeline()` will call `stream.destroy(err)` on all streams except:
+ *
+ * * `Readable` streams which have emitted `'end'` or `'close'`.
+ * * `Writable` streams which have emitted `'finish'` or `'close'`.
+ *
+ * `stream.pipeline()` leaves dangling event listeners on the streams
+ * after the `callback` has been invoked. In the case of reuse of streams after
+ * failure, this can cause event listener leaks and swallowed errors. If the last
+ * stream is readable, dangling event listeners will be removed so that the last
+ * stream can be consumed later.
+ *
+ * `stream.pipeline()` closes all the streams when an error is raised.
+ * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior
+ * once it would destroy the socket without sending the expected response.
+ * See the example below:
+ *
+ * ```js
+ * const fs = require('node:fs');
+ * const http = require('node:http');
+ * const { pipeline } = require('node:stream');
+ *
+ * const server = http.createServer((req, res) => {
+ * const fileStream = fs.createReadStream('./fileNotExist.txt');
+ * pipeline(fileStream, res, (err) => {
+ * if (err) {
+ * console.log(err); // No such file
+ * // this message can't be sent once `pipeline` already destroyed the socket
+ * return res.end('error!!!');
+ * }
+ * });
+ * });
+ * ```
+ * @since v10.0.0
+ * @param callback Called when the pipeline is fully done.
+ */
+ function pipeline<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(
+ source: A,
+ destination: B,
+ callback?: PipelineCallback<B>
+ ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, B extends PipelineDestination<T1, any>>(
+ source: A,
+ transform1: T1,
+ destination: B,
+ callback?: PipelineCallback<B>
+ ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, T2 extends PipelineTransform<T1, any>, B extends PipelineDestination<T2, any>>(
+ source: A,
+ transform1: T1,
+ transform2: T2,
+ destination: B,
+ callback?: PipelineCallback<B>
+ ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ B extends PipelineDestination<T3, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, callback?: PipelineCallback<B>): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ T4 extends PipelineTransform<T3, any>,
+ B extends PipelineDestination<T4, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, callback?: PipelineCallback<B>): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline(
+ streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
+ callback?: (err: NodeJS.ErrnoException | null) => void
+ ): NodeJS.WritableStream;
+ function pipeline(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
+ ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException | null) => void)>
+ ): NodeJS.WritableStream;
+ namespace pipeline {
+ function __promisify__<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(source: A, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function __promisify__<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, B extends PipelineDestination<T1, any>>(
+ source: A,
+ transform1: T1,
+ destination: B,
+ options?: PipelineOptions
+ ): PipelinePromise<B>;
+ function __promisify__<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, T2 extends PipelineTransform<T1, any>, B extends PipelineDestination<T2, any>>(
+ source: A,
+ transform1: T1,
+ transform2: T2,
+ destination: B,
+ options?: PipelineOptions
+ ): PipelinePromise<B>;
+ function __promisify__<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ B extends PipelineDestination<T3, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function __promisify__<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ T4 extends PipelineTransform<T3, any>,
+ B extends PipelineDestination<T4, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function __promisify__(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>, options?: PipelineOptions): Promise<void>;
+ function __promisify__(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
+ ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
+ ): Promise<void>;
+ }
+ interface Pipe {
+ close(): void;
+ hasRef(): boolean;
+ ref(): void;
+ unref(): void;
+ }
+ /**
+ * Returns whether the stream has encountered an error.
+ * @since v17.3.0, v16.14.0
+ * @experimental
+ */
+ function isErrored(stream: Readable | Writable | NodeJS.ReadableStream | NodeJS.WritableStream): boolean;
+ /**
+ * Returns whether the stream is readable.
+ * @since v17.4.0, v16.14.0
+ * @experimental
+ */
+ function isReadable(stream: Readable | NodeJS.ReadableStream): boolean;
+ const promises: typeof streamPromises;
+ const consumers: typeof streamConsumers;
+ }
+ export = internal;
+}
+declare module 'node:stream' {
+ import stream = require('stream');
+ export = stream;
+}
diff --git a/node_modules/@types/node/stream/consumers.d.ts b/node_modules/@types/node/stream/consumers.d.ts
new file mode 100755
index 0000000..2fd9424
--- /dev/null
+++ b/node_modules/@types/node/stream/consumers.d.ts
@@ -0,0 +1,12 @@
+declare module 'stream/consumers' {
+ import { Blob as NodeBlob } from 'node:buffer';
+ import { Readable } from 'node:stream';
+ function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Buffer>;
+ function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<string>;
+ function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<ArrayBuffer>;
+ function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<NodeBlob>;
+ function json(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<unknown>;
+}
+declare module 'node:stream/consumers' {
+ export * from 'stream/consumers';
+}
diff --git a/node_modules/@types/node/stream/promises.d.ts b/node_modules/@types/node/stream/promises.d.ts
new file mode 100755
index 0000000..b427073
--- /dev/null
+++ b/node_modules/@types/node/stream/promises.d.ts
@@ -0,0 +1,42 @@
+declare module 'stream/promises' {
+ import { FinishedOptions, PipelineSource, PipelineTransform, PipelineDestination, PipelinePromise, PipelineOptions } from 'node:stream';
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
+ function pipeline<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(source: A, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, B extends PipelineDestination<T1, any>>(
+ source: A,
+ transform1: T1,
+ destination: B,
+ options?: PipelineOptions
+ ): PipelinePromise<B>;
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, T2 extends PipelineTransform<T1, any>, B extends PipelineDestination<T2, any>>(
+ source: A,
+ transform1: T1,
+ transform2: T2,
+ destination: B,
+ options?: PipelineOptions
+ ): PipelinePromise<B>;
+ function pipeline<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ B extends PipelineDestination<T3, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function pipeline<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ T4 extends PipelineTransform<T3, any>,
+ B extends PipelineDestination<T4, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function pipeline(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>, options?: PipelineOptions): Promise<void>;
+ function pipeline(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
+ ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
+ ): Promise<void>;
+}
+declare module 'node:stream/promises' {
+ export * from 'stream/promises';
+}
diff --git a/node_modules/@types/node/stream/web.d.ts b/node_modules/@types/node/stream/web.d.ts
new file mode 100755
index 0000000..f9ef057
--- /dev/null
+++ b/node_modules/@types/node/stream/web.d.ts
@@ -0,0 +1,330 @@
+declare module 'stream/web' {
+ // stub module, pending copy&paste from .d.ts or manual impl
+ // copy from lib.dom.d.ts
+ interface ReadableWritablePair<R = any, W = any> {
+ readable: ReadableStream<R>;
+ /**
+ * Provides a convenient, chainable way of piping this readable stream
+ * through a transform stream (or any other { writable, readable }
+ * pair). It simply pipes the stream into the writable side of the
+ * supplied pair, and returns the readable side for further use.
+ *
+ * Piping a stream will lock it for the duration of the pipe, preventing
+ * any other consumer from acquiring a reader.
+ */
+ writable: WritableStream<W>;
+ }
+ interface StreamPipeOptions {
+ preventAbort?: boolean;
+ preventCancel?: boolean;
+ /**
+ * Pipes this readable stream to a given writable stream destination.
+ * The way in which the piping process behaves under various error
+ * conditions can be customized with a number of passed options. It
+ * returns a promise that fulfills when the piping process completes
+ * successfully, or rejects if any errors were encountered.
+ *
+ * Piping a stream will lock it for the duration of the pipe, preventing
+ * any other consumer from acquiring a reader.
+ *
+ * Errors and closures of the source and destination streams propagate
+ * as follows:
+ *
+ * An error in this source readable stream will abort destination,
+ * unless preventAbort is truthy. The returned promise will be rejected
+ * with the source's error, or with any error that occurs during
+ * aborting the destination.
+ *
+ * An error in destination will cancel this source readable stream,
+ * unless preventCancel is truthy. The returned promise will be rejected
+ * with the destination's error, or with any error that occurs during
+ * canceling the source.
+ *
+ * When this source readable stream closes, destination will be closed,
+ * unless preventClose is truthy. The returned promise will be fulfilled
+ * once this process completes, unless an error is encountered while
+ * closing the destination, in which case it will be rejected with that
+ * error.
+ *
+ * If destination starts out closed or closing, this source readable
+ * stream will be canceled, unless preventCancel is true. The returned
+ * promise will be rejected with an error indicating piping to a closed
+ * stream failed, or with any error that occurs during canceling the
+ * source.
+ *
+ * The signal option can be set to an AbortSignal to allow aborting an
+ * ongoing pipe operation via the corresponding AbortController. In this
+ * case, this source readable stream will be canceled, and destination
+ * aborted, unless the respective options preventCancel or preventAbort
+ * are set.
+ */
+ preventClose?: boolean;
+ signal?: AbortSignal;
+ }
+ interface ReadableStreamGenericReader {
+ readonly closed: Promise<undefined>;
+ cancel(reason?: any): Promise<void>;
+ }
+ interface ReadableStreamDefaultReadValueResult<T> {
+ done: false;
+ value: T;
+ }
+ interface ReadableStreamDefaultReadDoneResult {
+ done: true;
+ value?: undefined;
+ }
+ type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
+ type ReadableStreamDefaultReadResult<T> = ReadableStreamDefaultReadValueResult<T> | ReadableStreamDefaultReadDoneResult;
+ interface ReadableByteStreamControllerCallback {
+ (controller: ReadableByteStreamController): void | PromiseLike<void>;
+ }
+ interface UnderlyingSinkAbortCallback {
+ (reason?: any): void | PromiseLike<void>;
+ }
+ interface UnderlyingSinkCloseCallback {
+ (): void | PromiseLike<void>;
+ }
+ interface UnderlyingSinkStartCallback {
+ (controller: WritableStreamDefaultController): any;
+ }
+ interface UnderlyingSinkWriteCallback<W> {
+ (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
+ }
+ interface UnderlyingSourceCancelCallback {
+ (reason?: any): void | PromiseLike<void>;
+ }
+ interface UnderlyingSourcePullCallback<R> {
+ (controller: ReadableStreamController<R>): void | PromiseLike<void>;
+ }
+ interface UnderlyingSourceStartCallback<R> {
+ (controller: ReadableStreamController<R>): any;
+ }
+ interface TransformerFlushCallback<O> {
+ (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
+ }
+ interface TransformerStartCallback<O> {
+ (controller: TransformStreamDefaultController<O>): any;
+ }
+ interface TransformerTransformCallback<I, O> {
+ (chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
+ }
+ interface UnderlyingByteSource {
+ autoAllocateChunkSize?: number;
+ cancel?: ReadableStreamErrorCallback;
+ pull?: ReadableByteStreamControllerCallback;
+ start?: ReadableByteStreamControllerCallback;
+ type: 'bytes';
+ }
+ interface UnderlyingSource<R = any> {
+ cancel?: UnderlyingSourceCancelCallback;
+ pull?: UnderlyingSourcePullCallback<R>;
+ start?: UnderlyingSourceStartCallback<R>;
+ type?: undefined;
+ }
+ interface UnderlyingSink<W = any> {
+ abort?: UnderlyingSinkAbortCallback;
+ close?: UnderlyingSinkCloseCallback;
+ start?: UnderlyingSinkStartCallback;
+ type?: undefined;
+ write?: UnderlyingSinkWriteCallback<W>;
+ }
+ interface ReadableStreamErrorCallback {
+ (reason: any): void | PromiseLike<void>;
+ }
+ /** This Streams API interface represents a readable stream of byte data. */
+ interface ReadableStream<R = any> {
+ readonly locked: boolean;
+ cancel(reason?: any): Promise<void>;
+ getReader(): ReadableStreamDefaultReader<R>;
+ pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
+ pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
+ tee(): [ReadableStream<R>, ReadableStream<R>];
+ values(options?: { preventCancel?: boolean }): AsyncIterableIterator<R>;
+ [Symbol.asyncIterator](): AsyncIterableIterator<R>;
+ }
+ const ReadableStream: {
+ prototype: ReadableStream;
+ new (underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy<Uint8Array>): ReadableStream<Uint8Array>;
+ new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
+ };
+ interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
+ read(): Promise<ReadableStreamDefaultReadResult<R>>;
+ releaseLock(): void;
+ }
+ const ReadableStreamDefaultReader: {
+ prototype: ReadableStreamDefaultReader;
+ new <R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
+ };
+ const ReadableStreamBYOBReader: any;
+ const ReadableStreamBYOBRequest: any;
+ interface ReadableByteStreamController {
+ readonly byobRequest: undefined;
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk: ArrayBufferView): void;
+ error(error?: any): void;
+ }
+ const ReadableByteStreamController: {
+ prototype: ReadableByteStreamController;
+ new (): ReadableByteStreamController;
+ };
+ interface ReadableStreamDefaultController<R = any> {
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk?: R): void;
+ error(e?: any): void;
+ }
+ const ReadableStreamDefaultController: {
+ prototype: ReadableStreamDefaultController;
+ new (): ReadableStreamDefaultController;
+ };
+ interface Transformer<I = any, O = any> {
+ flush?: TransformerFlushCallback<O>;
+ readableType?: undefined;
+ start?: TransformerStartCallback<O>;
+ transform?: TransformerTransformCallback<I, O>;
+ writableType?: undefined;
+ }
+ interface TransformStream<I = any, O = any> {
+ readonly readable: ReadableStream<O>;
+ readonly writable: WritableStream<I>;
+ }
+ const TransformStream: {
+ prototype: TransformStream;
+ new <I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
+ };
+ interface TransformStreamDefaultController<O = any> {
+ readonly desiredSize: number | null;
+ enqueue(chunk?: O): void;
+ error(reason?: any): void;
+ terminate(): void;
+ }
+ const TransformStreamDefaultController: {
+ prototype: TransformStreamDefaultController;
+ new (): TransformStreamDefaultController;
+ };
+ /**
+ * This Streams API interface provides a standard abstraction for writing
+ * streaming data to a destination, known as a sink. This object comes with
+ * built-in back pressure and queuing.
+ */
+ interface WritableStream<W = any> {
+ readonly locked: boolean;
+ abort(reason?: any): Promise<void>;
+ close(): Promise<void>;
+ getWriter(): WritableStreamDefaultWriter<W>;
+ }
+ const WritableStream: {
+ prototype: WritableStream;
+ new <W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
+ };
+ /**
+ * This Streams API interface is the object returned by
+ * WritableStream.getWriter() and once created locks the < writer to the
+ * WritableStream ensuring that no other streams can write to the underlying
+ * sink.
+ */
+ interface WritableStreamDefaultWriter<W = any> {
+ readonly closed: Promise<undefined>;
+ readonly desiredSize: number | null;
+ readonly ready: Promise<undefined>;
+ abort(reason?: any): Promise<void>;
+ close(): Promise<void>;
+ releaseLock(): void;
+ write(chunk?: W): Promise<void>;
+ }
+ const WritableStreamDefaultWriter: {
+ prototype: WritableStreamDefaultWriter;
+ new <W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
+ };
+ /**
+ * This Streams API interface represents a controller allowing control of a
+ * WritableStream's state. When constructing a WritableStream, the
+ * underlying sink is given a corresponding WritableStreamDefaultController
+ * instance to manipulate.
+ */
+ interface WritableStreamDefaultController {
+ error(e?: any): void;
+ }
+ const WritableStreamDefaultController: {
+ prototype: WritableStreamDefaultController;
+ new (): WritableStreamDefaultController;
+ };
+ interface QueuingStrategy<T = any> {
+ highWaterMark?: number;
+ size?: QueuingStrategySize<T>;
+ }
+ interface QueuingStrategySize<T = any> {
+ (chunk?: T): number;
+ }
+ interface QueuingStrategyInit {
+ /**
+ * Creates a new ByteLengthQueuingStrategy with the provided high water
+ * mark.
+ *
+ * Note that the provided high water mark will not be validated ahead of
+ * time. Instead, if it is negative, NaN, or not a number, the resulting
+ * ByteLengthQueuingStrategy will cause the corresponding stream
+ * constructor to throw.
+ */
+ highWaterMark: number;
+ }
+ /**
+ * This Streams API interface provides a built-in byte length queuing
+ * strategy that can be used when constructing streams.
+ */
+ interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
+ readonly highWaterMark: number;
+ readonly size: QueuingStrategySize<ArrayBufferView>;
+ }
+ const ByteLengthQueuingStrategy: {
+ prototype: ByteLengthQueuingStrategy;
+ new (init: QueuingStrategyInit): ByteLengthQueuingStrategy;
+ };
+ /**
+ * This Streams API interface provides a built-in byte length queuing
+ * strategy that can be used when constructing streams.
+ */
+ interface CountQueuingStrategy extends QueuingStrategy {
+ readonly highWaterMark: number;
+ readonly size: QueuingStrategySize;
+ }
+ const CountQueuingStrategy: {
+ prototype: CountQueuingStrategy;
+ new (init: QueuingStrategyInit): CountQueuingStrategy;
+ };
+ interface TextEncoderStream {
+ /** Returns "utf-8". */
+ readonly encoding: 'utf-8';
+ readonly readable: ReadableStream<Uint8Array>;
+ readonly writable: WritableStream<string>;
+ readonly [Symbol.toStringTag]: string;
+ }
+ const TextEncoderStream: {
+ prototype: TextEncoderStream;
+ new (): TextEncoderStream;
+ };
+ interface TextDecoderOptions {
+ fatal?: boolean;
+ ignoreBOM?: boolean;
+ }
+ type BufferSource = ArrayBufferView | ArrayBuffer;
+ interface TextDecoderStream {
+ /** Returns encoding's name, lower cased. */
+ readonly encoding: string;
+ /** Returns `true` if error mode is "fatal", and `false` otherwise. */
+ readonly fatal: boolean;
+ /** Returns `true` if ignore BOM flag is set, and `false` otherwise. */
+ readonly ignoreBOM: boolean;
+ readonly readable: ReadableStream<string>;
+ readonly writable: WritableStream<BufferSource>;
+ readonly [Symbol.toStringTag]: string;
+ }
+ const TextDecoderStream: {
+ prototype: TextDecoderStream;
+ new (label?: string, options?: TextDecoderOptions): TextDecoderStream;
+ };
+}
+declare module 'node:stream/web' {
+ export * from 'stream/web';
+}
diff --git a/node_modules/@types/node/string_decoder.d.ts b/node_modules/@types/node/string_decoder.d.ts
new file mode 100755
index 0000000..a069bb8
--- /dev/null
+++ b/node_modules/@types/node/string_decoder.d.ts
@@ -0,0 +1,67 @@
+/**
+ * The `node:string_decoder` module provides an API for decoding `Buffer` objects
+ * into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
+ * characters. It can be accessed using:
+ *
+ * ```js
+ * const { StringDecoder } = require('node:string_decoder');
+ * ```
+ *
+ * The following example shows the basic use of the `StringDecoder` class.
+ *
+ * ```js
+ * const { StringDecoder } = require('node:string_decoder');
+ * const decoder = new StringDecoder('utf8');
+ *
+ * const cent = Buffer.from([0xC2, 0xA2]);
+ * console.log(decoder.write(cent));
+ *
+ * const euro = Buffer.from([0xE2, 0x82, 0xAC]);
+ * console.log(decoder.write(euro));
+ * ```
+ *
+ * When a `Buffer` instance is written to the `StringDecoder` instance, an
+ * internal buffer is used to ensure that the decoded string does not contain
+ * any incomplete multibyte characters. These are held in the buffer until the
+ * next call to `stringDecoder.write()` or until `stringDecoder.end()` is called.
+ *
+ * In the following example, the three UTF-8 encoded bytes of the European Euro
+ * symbol (`€`) are written over three separate operations:
+ *
+ * ```js
+ * const { StringDecoder } = require('node:string_decoder');
+ * const decoder = new StringDecoder('utf8');
+ *
+ * decoder.write(Buffer.from([0xE2]));
+ * decoder.write(Buffer.from([0x82]));
+ * console.log(decoder.end(Buffer.from([0xAC])));
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/string_decoder.js)
+ */
+declare module 'string_decoder' {
+ class StringDecoder {
+ constructor(encoding?: BufferEncoding);
+ /**
+ * Returns a decoded string, ensuring that any incomplete multibyte characters at
+ * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the
+ * returned string and stored in an internal buffer for the next call to`stringDecoder.write()` or `stringDecoder.end()`.
+ * @since v0.1.99
+ * @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode.
+ */
+ write(buffer: Buffer): string;
+ /**
+ * Returns any remaining input stored in the internal buffer as a string. Bytes
+ * representing incomplete UTF-8 and UTF-16 characters will be replaced with
+ * substitution characters appropriate for the character encoding.
+ *
+ * If the `buffer` argument is provided, one final call to `stringDecoder.write()`is performed before returning the remaining input.
+ * After `end()` is called, the `stringDecoder` object can be reused for new input.
+ * @since v0.9.3
+ * @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode.
+ */
+ end(buffer?: Buffer): string;
+ }
+}
+declare module 'node:string_decoder' {
+ export * from 'string_decoder';
+}
diff --git a/node_modules/@types/node/test.d.ts b/node_modules/@types/node/test.d.ts
new file mode 100755
index 0000000..81c73a8
--- /dev/null
+++ b/node_modules/@types/node/test.d.ts
@@ -0,0 +1,1461 @@
+/**
+ * The `node:test` module facilitates the creation of JavaScript tests.
+ * To access it:
+ *
+ * ```js
+ * import test from 'node:test';
+ * ```
+ *
+ * This module is only available under the `node:` scheme. The following will not
+ * work:
+ *
+ * ```js
+ * import test from 'test';
+ * ```
+ *
+ * Tests created via the `test` module consist of a single function that is
+ * processed in one of three ways:
+ *
+ * 1. A synchronous function that is considered failing if it throws an exception,
+ * and is considered passing otherwise.
+ * 2. A function that returns a `Promise` that is considered failing if the`Promise` rejects, and is considered passing if the `Promise` resolves.
+ * 3. A function that receives a callback function. If the callback receives any
+ * truthy value as its first argument, the test is considered failing. If a
+ * falsy value is passed as the first argument to the callback, the test is
+ * considered passing. If the test function receives a callback function and
+ * also returns a `Promise`, the test will fail.
+ *
+ * The following example illustrates how tests are written using the`test` module.
+ *
+ * ```js
+ * test('synchronous passing test', (t) => {
+ * // This test passes because it does not throw an exception.
+ * assert.strictEqual(1, 1);
+ * });
+ *
+ * test('synchronous failing test', (t) => {
+ * // This test fails because it throws an exception.
+ * assert.strictEqual(1, 2);
+ * });
+ *
+ * test('asynchronous passing test', async (t) => {
+ * // This test passes because the Promise returned by the async
+ * // function is not rejected.
+ * assert.strictEqual(1, 1);
+ * });
+ *
+ * test('asynchronous failing test', async (t) => {
+ * // This test fails because the Promise returned by the async
+ * // function is rejected.
+ * assert.strictEqual(1, 2);
+ * });
+ *
+ * test('failing test using Promises', (t) => {
+ * // Promises can be used directly as well.
+ * return new Promise((resolve, reject) => {
+ * setImmediate(() => {
+ * reject(new Error('this will cause the test to fail'));
+ * });
+ * });
+ * });
+ *
+ * test('callback passing test', (t, done) => {
+ * // done() is the callback function. When the setImmediate() runs, it invokes
+ * // done() with no arguments.
+ * setImmediate(done);
+ * });
+ *
+ * test('callback failing test', (t, done) => {
+ * // When the setImmediate() runs, done() is invoked with an Error object and
+ * // the test fails.
+ * setImmediate(() => {
+ * done(new Error('callback failure'));
+ * });
+ * });
+ * ```
+ *
+ * If any tests fail, the process exit code is set to `1`.
+ * @since v18.0.0, v16.17.0
+ * @see [source](https://github.com/nodejs/node/blob/v20.4.0/lib/test.js)
+ */
+declare module 'node:test' {
+ import { Readable } from 'node:stream';
+ import { AsyncResource } from 'node:async_hooks';
+ /**
+ * ```js
+ * import { tap } from 'node:test/reporters';
+ * import process from 'node:process';
+ *
+ * run({ files: [path.resolve('./tests/test.js')] })
+ * .compose(tap)
+ * .pipe(process.stdout);
+ * ```
+ * @since v18.9.0, v16.19.0
+ * @param options Configuration options for running tests. The following properties are supported:
+ */
+ function run(options?: RunOptions): TestsStream;
+ /**
+ * The `test()` function is the value imported from the `test` module. Each
+ * invocation of this function results in reporting the test to the `TestsStream`.
+ *
+ * The `TestContext` object passed to the `fn` argument can be used to perform
+ * actions related to the current test. Examples include skipping the test, adding
+ * additional diagnostic information, or creating subtests.
+ *
+ * `test()` returns a `Promise` that resolves once the test completes.
+ * if `test()` is called within a `describe()` block, it resolve immediately.
+ * The return value can usually be discarded for top level tests.
+ * However, the return value from subtests should be used to prevent the parent
+ * test from finishing first and cancelling the subtest
+ * as shown in the following example.
+ *
+ * ```js
+ * test('top level test', async (t) => {
+ * // The setTimeout() in the following subtest would cause it to outlive its
+ * // parent test if 'await' is removed on the next line. Once the parent test
+ * // completes, it will cancel any outstanding subtests.
+ * await t.test('longer running subtest', async (t) => {
+ * return new Promise((resolve, reject) => {
+ * setTimeout(resolve, 1000);
+ * });
+ * });
+ * });
+ * ```
+ *
+ * The `timeout` option can be used to fail the test if it takes longer than`timeout` milliseconds to complete. However, it is not a reliable mechanism for
+ * canceling tests because a running test might block the application thread and
+ * thus prevent the scheduled cancellation.
+ * @since v18.0.0, v16.17.0
+ * @param [name='The name'] The name of the test, which is displayed when reporting test results.
+ * @param options Configuration options for the test. The following properties are supported:
+ * @param [fn='A no-op function'] The function under test. The first argument to this function is a {@link TestContext} object. If the test uses callbacks, the callback function is passed as the
+ * second argument.
+ * @return Resolved with `undefined` once the test completes, or immediately if the test runs within {@link describe}.
+ */
+ function test(name?: string, fn?: TestFn): Promise<void>;
+ function test(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function test(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function test(fn?: TestFn): Promise<void>;
+ namespace test {
+ export {
+ after,
+ afterEach,
+ before,
+ beforeEach,
+ describe,
+ it,
+ run,
+ mock,
+ test,
+ skip,
+ todo,
+ only
+ };
+ }
+ /**
+ * The `describe()` function imported from the `node:test` module. Each
+ * invocation of this function results in the creation of a Subtest.
+ * After invocation of top level `describe` functions,
+ * all top level tests and suites will execute.
+ * @param [name='The name'] The name of the suite, which is displayed when reporting test results.
+ * @param options Configuration options for the suite. supports the same options as `test([name][, options][, fn])`.
+ * @param [fn='A no-op function'] The function under suite declaring all subtests and subsuites. The first argument to this function is a {@link SuiteContext} object.
+ * @return Immediately fulfilled with `undefined`.
+ */
+ function describe(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
+ function describe(name?: string, fn?: SuiteFn): Promise<void>;
+ function describe(options?: TestOptions, fn?: SuiteFn): Promise<void>;
+ function describe(fn?: SuiteFn): Promise<void>;
+ namespace describe {
+ /**
+ * Shorthand for skipping a suite, same as `describe([name], { skip: true }[, fn])`.
+ */
+ function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
+ function skip(name?: string, fn?: SuiteFn): Promise<void>;
+ function skip(options?: TestOptions, fn?: SuiteFn): Promise<void>;
+ function skip(fn?: SuiteFn): Promise<void>;
+ /**
+ * Shorthand for marking a suite as `TODO`, same as `describe([name], { todo: true }[, fn])`.
+ */
+ function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
+ function todo(name?: string, fn?: SuiteFn): Promise<void>;
+ function todo(options?: TestOptions, fn?: SuiteFn): Promise<void>;
+ function todo(fn?: SuiteFn): Promise<void>;
+ /**
+ * Shorthand for marking a suite as `only`, same as `describe([name], { only: true }[, fn])`.
+ * @since v18.15.0
+ */
+ function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
+ function only(name?: string, fn?: SuiteFn): Promise<void>;
+ function only(options?: TestOptions, fn?: SuiteFn): Promise<void>;
+ function only(fn?: SuiteFn): Promise<void>;
+ }
+ /**
+ * Shorthand for `test()`.
+ *
+ * The `it()` function is imported from the `node:test` module.
+ * @since v18.6.0, v16.17.0
+ */
+ function it(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function it(name?: string, fn?: TestFn): Promise<void>;
+ function it(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function it(fn?: TestFn): Promise<void>;
+ namespace it {
+ /**
+ * Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`.
+ */
+ function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function skip(name?: string, fn?: TestFn): Promise<void>;
+ function skip(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function skip(fn?: TestFn): Promise<void>;
+ /**
+ * Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.
+ */
+ function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function todo(name?: string, fn?: TestFn): Promise<void>;
+ function todo(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function todo(fn?: TestFn): Promise<void>;
+ /**
+ * Shorthand for marking a test as `only`, same as `it([name], { only: true }[, fn])`.
+ * @since v18.15.0
+ */
+ function only(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function only(name?: string, fn?: TestFn): Promise<void>;
+ function only(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function only(fn?: TestFn): Promise<void>;
+ }
+ /**
+ * Shorthand for skipping a test, same as `test([name], { skip: true }[, fn])`.
+ * @since v20.2.0
+ */
+ function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function skip(name?: string, fn?: TestFn): Promise<void>;
+ function skip(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function skip(fn?: TestFn): Promise<void>;
+ /**
+ * Shorthand for marking a test as `TODO`, same as `test([name], { todo: true }[, fn])`.
+ * @since v20.2.0
+ */
+ function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function todo(name?: string, fn?: TestFn): Promise<void>;
+ function todo(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function todo(fn?: TestFn): Promise<void>;
+ /**
+ * Shorthand for marking a test as `only`, same as `test([name], { only: true }[, fn])`.
+ * @since v20.2.0
+ */
+ function only(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function only(name?: string, fn?: TestFn): Promise<void>;
+ function only(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function only(fn?: TestFn): Promise<void>;
+ /**
+ * The type of a function under test. The first argument to this function is a
+ * {@link TestContext} object. If the test uses callbacks, the callback function is passed as
+ * the second argument.
+ */
+ type TestFn = (t: TestContext, done: (result?: any) => void) => void | Promise<void>;
+ /**
+ * The type of a function under Suite.
+ */
+ type SuiteFn = (s: SuiteContext) => void | Promise<void>;
+ interface TestShard {
+ /**
+ * A positive integer between 1 and `<total>` that specifies the index of the shard to run.
+ */
+ index: number;
+ /**
+ * A positive integer that specifies the total number of shards to split the test files to.
+ */
+ total: number;
+ }
+ interface RunOptions {
+ /**
+ * If a number is provided, then that many files would run in parallel.
+ * If truthy, it would run (number of cpu cores - 1) files in parallel.
+ * If falsy, it would only run one file at a time.
+ * If unspecified, subtests inherit this value from their parent.
+ * @default true
+ */
+ concurrency?: number | boolean | undefined;
+ /**
+ * An array containing the list of files to run.
+ * If unspecified, the test runner execution model will be used.
+ */
+ files?: readonly string[] | undefined;
+ /**
+ * Allows aborting an in-progress test execution.
+ * @default undefined
+ */
+ signal?: AbortSignal | undefined;
+ /**
+ * A number of milliseconds the test will fail after.
+ * If unspecified, subtests inherit this value from their parent.
+ * @default Infinity
+ */
+ timeout?: number | undefined;
+ /**
+ * Sets inspector port of test child process.
+ * If a nullish value is provided, each process gets its own port,
+ * incremented from the primary's `process.debugPort`.
+ */
+ inspectPort?: number | (() => number) | undefined;
+ /**
+ * That can be used to only run tests whose name matches the provided pattern.
+ * Test name patterns are interpreted as JavaScript regular expressions.
+ * For each test that is executed, any corresponding test hooks, such as `beforeEach()`, are also run.
+ */
+ testNamePatterns?: string | RegExp | string[] | RegExp[];
+ /**
+ * A function that accepts the TestsStream instance and can be used to setup listeners before any tests are run.
+ */
+ setup?: (root: Test) => void | Promise<void>;
+ /**
+ * Whether to run in watch mode or not.
+ * @default false
+ */
+ watch?: boolean | undefined;
+ /**
+ * Running tests in a specific shard.
+ * @default undefined
+ */
+ shard?: TestShard | undefined;
+ }
+ class Test extends AsyncResource {
+ concurrency: number;
+ nesting: number;
+ only: boolean;
+ reporter: TestsStream;
+ runOnlySubtests: boolean;
+ testNumber: number;
+ timeout: number | null;
+ }
+ /**
+ * A successful call to `run()` method will return a new `TestsStream` object, streaming a series of events representing the execution of the tests.`TestsStream` will emit events, in the
+ * order of the tests definition
+ * @since v18.9.0, v16.19.0
+ */
+ class TestsStream extends Readable implements NodeJS.ReadableStream {
+ addListener(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
+ addListener(event: 'test:fail', listener: (data: TestFail) => void): this;
+ addListener(event: 'test:pass', listener: (data: TestPass) => void): this;
+ addListener(event: 'test:plan', listener: (data: TestPlan) => void): this;
+ addListener(event: 'test:start', listener: (data: TestStart) => void): this;
+ addListener(event: 'test:stderr', listener: (data: TestStderr) => void): this;
+ addListener(event: 'test:stdout', listener: (data: TestStdout) => void): this;
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ emit(event: 'test:diagnostic', data: DiagnosticData): boolean;
+ emit(event: 'test:fail', data: TestFail): boolean;
+ emit(event: 'test:pass', data: TestPass): boolean;
+ emit(event: 'test:plan', data: TestPlan): boolean;
+ emit(event: 'test:start', data: TestStart): boolean;
+ emit(event: 'test:stderr', data: TestStderr): boolean;
+ emit(event: 'test:stdout', data: TestStdout): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
+ on(event: 'test:fail', listener: (data: TestFail) => void): this;
+ on(event: 'test:pass', listener: (data: TestPass) => void): this;
+ on(event: 'test:plan', listener: (data: TestPlan) => void): this;
+ on(event: 'test:start', listener: (data: TestStart) => void): this;
+ on(event: 'test:stderr', listener: (data: TestStderr) => void): this;
+ on(event: 'test:stdout', listener: (data: TestStdout) => void): this;
+ on(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
+ once(event: 'test:fail', listener: (data: TestFail) => void): this;
+ once(event: 'test:pass', listener: (data: TestPass) => void): this;
+ once(event: 'test:plan', listener: (data: TestPlan) => void): this;
+ once(event: 'test:start', listener: (data: TestStart) => void): this;
+ once(event: 'test:stderr', listener: (data: TestStderr) => void): this;
+ once(event: 'test:stdout', listener: (data: TestStdout) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
+ prependListener(event: 'test:fail', listener: (data: TestFail) => void): this;
+ prependListener(event: 'test:pass', listener: (data: TestPass) => void): this;
+ prependListener(event: 'test:plan', listener: (data: TestPlan) => void): this;
+ prependListener(event: 'test:start', listener: (data: TestStart) => void): this;
+ prependListener(event: 'test:stderr', listener: (data: TestStderr) => void): this;
+ prependListener(event: 'test:stdout', listener: (data: TestStdout) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
+ prependOnceListener(event: 'test:fail', listener: (data: TestFail) => void): this;
+ prependOnceListener(event: 'test:pass', listener: (data: TestPass) => void): this;
+ prependOnceListener(event: 'test:plan', listener: (data: TestPlan) => void): this;
+ prependOnceListener(event: 'test:start', listener: (data: TestStart) => void): this;
+ prependOnceListener(event: 'test:stderr', listener: (data: TestStderr) => void): this;
+ prependOnceListener(event: 'test:stdout', listener: (data: TestStdout) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * An instance of `TestContext` is passed to each test function in order to
+ * interact with the test runner. However, the `TestContext` constructor is not
+ * exposed as part of the API.
+ * @since v18.0.0, v16.17.0
+ */
+ class TestContext {
+ /**
+ * This function is used to create a hook running before subtest of the current test.
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
+ * the second argument. Default: A no-op function.
+ * @param options Configuration options for the hook.
+ * @since v20.1.0
+ */
+ before: typeof before;
+ /**
+ * This function is used to create a hook running before each subtest of the current test.
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
+ * the second argument. Default: A no-op function.
+ * @param options Configuration options for the hook.
+ * @since v18.8.0
+ */
+ beforeEach: typeof beforeEach;
+ /**
+ * This function is used to create a hook that runs after the current test finishes.
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
+ * the second argument. Default: A no-op function.
+ * @param options Configuration options for the hook.
+ * @since v18.13.0
+ */
+ after: typeof after;
+ /**
+ * This function is used to create a hook running after each subtest of the current test.
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
+ * the second argument. Default: A no-op function.
+ * @param options Configuration options for the hook.
+ * @since v18.8.0
+ */
+ afterEach: typeof afterEach;
+ /**
+ * This function is used to write diagnostics to the output. Any diagnostic
+ * information is included at the end of the test's results. This function does
+ * not return a value.
+ *
+ * ```js
+ * test('top level test', (t) => {
+ * t.diagnostic('A diagnostic message');
+ * });
+ * ```
+ * @since v18.0.0, v16.17.0
+ * @param message Message to be reported.
+ */
+ diagnostic(message: string): void;
+ /**
+ * The name of the test.
+ * @since v18.8.0, v16.18.0
+ */
+ readonly name: string;
+ /**
+ * If `shouldRunOnlyTests` is truthy, the test context will only run tests that
+ * have the `only` option set. Otherwise, all tests are run. If Node.js was not
+ * started with the `--test-only` command-line option, this function is a
+ * no-op.
+ *
+ * ```js
+ * test('top level test', (t) => {
+ * // The test context can be set to run subtests with the 'only' option.
+ * t.runOnly(true);
+ * return Promise.all([
+ * t.test('this subtest is now skipped'),
+ * t.test('this subtest is run', { only: true }),
+ * ]);
+ * });
+ * ```
+ * @since v18.0.0, v16.17.0
+ * @param shouldRunOnlyTests Whether or not to run `only` tests.
+ */
+ runOnly(shouldRunOnlyTests: boolean): void;
+ /**
+ * ```js
+ * test('top level test', async (t) => {
+ * await fetch('some/uri', { signal: t.signal });
+ * });
+ * ```
+ * @since v18.7.0, v16.17.0
+ */
+ readonly signal: AbortSignal;
+ /**
+ * This function causes the test's output to indicate the test as skipped. If`message` is provided, it is included in the output. Calling `skip()` does
+ * not terminate execution of the test function. This function does not return a
+ * value.
+ *
+ * ```js
+ * test('top level test', (t) => {
+ * // Make sure to return here as well if the test contains additional logic.
+ * t.skip('this is skipped');
+ * });
+ * ```
+ * @since v18.0.0, v16.17.0
+ * @param message Optional skip message.
+ */
+ skip(message?: string): void;
+ /**
+ * This function adds a `TODO` directive to the test's output. If `message` is
+ * provided, it is included in the output. Calling `todo()` does not terminate
+ * execution of the test function. This function does not return a value.
+ *
+ * ```js
+ * test('top level test', (t) => {
+ * // This test is marked as `TODO`
+ * t.todo('this is a todo');
+ * });
+ * ```
+ * @since v18.0.0, v16.17.0
+ * @param message Optional `TODO` message.
+ */
+ todo(message?: string): void;
+ /**
+ * This function is used to create subtests under the current test. This function behaves in
+ * the same fashion as the top level {@link test} function.
+ * @since v18.0.0
+ * @param name The name of the test, which is displayed when reporting test results.
+ * Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
+ * @param options Configuration options for the test
+ * @param fn The function under test. This first argument to this function is a
+ * {@link TestContext} object. If the test uses callbacks, the callback function is
+ * passed as the second argument. Default: A no-op function.
+ * @returns A {@link Promise} resolved with `undefined` once the test completes.
+ */
+ test: typeof test;
+ /**
+ * Each test provides its own MockTracker instance.
+ */
+ readonly mock: MockTracker;
+ }
+ /**
+ * An instance of `SuiteContext` is passed to each suite function in order to
+ * interact with the test runner. However, the `SuiteContext` constructor is not
+ * exposed as part of the API.
+ * @since v18.7.0, v16.17.0
+ */
+ class SuiteContext {
+ /**
+ * The name of the suite.
+ * @since v18.8.0, v16.18.0
+ */
+ readonly name: string;
+ /**
+ * Can be used to abort test subtasks when the test has been aborted.
+ * @since v18.7.0, v16.17.0
+ */
+ readonly signal: AbortSignal;
+ }
+ interface TestOptions {
+ /**
+ * If a number is provided, then that many tests would run in parallel.
+ * If truthy, it would run (number of cpu cores - 1) tests in parallel.
+ * For subtests, it will be `Infinity` tests in parallel.
+ * If falsy, it would only run one test at a time.
+ * If unspecified, subtests inherit this value from their parent.
+ * @default false
+ */
+ concurrency?: number | boolean | undefined;
+ /**
+ * If truthy, and the test context is configured to run `only` tests, then this test will be
+ * run. Otherwise, the test is skipped.
+ * @default false
+ */
+ only?: boolean | undefined;
+ /**
+ * Allows aborting an in-progress test.
+ * @since v18.8.0
+ */
+ signal?: AbortSignal | undefined;
+ /**
+ * If truthy, the test is skipped. If a string is provided, that string is displayed in the
+ * test results as the reason for skipping the test.
+ * @default false
+ */
+ skip?: boolean | string | undefined;
+ /**
+ * A number of milliseconds the test will fail after. If unspecified, subtests inherit this
+ * value from their parent.
+ * @default Infinity
+ * @since v18.7.0
+ */
+ timeout?: number | undefined;
+ /**
+ * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in
+ * the test results as the reason why the test is `TODO`.
+ * @default false
+ */
+ todo?: boolean | string | undefined;
+ }
+ /**
+ * This function is used to create a hook running before running a suite.
+ *
+ * ```js
+ * describe('tests', async () => {
+ * before(() => console.log('about to run some test'));
+ * it('is a subtest', () => {
+ * assert.ok('some relevant assertion here');
+ * });
+ * });
+ * ```
+ * @since v18.8.0, v16.18.0
+ * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
+ * @param options Configuration options for the hook. The following properties are supported:
+ */
+ function before(fn?: HookFn, options?: HookOptions): void;
+ /**
+ * This function is used to create a hook running after running a suite.
+ *
+ * ```js
+ * describe('tests', async () => {
+ * after(() => console.log('finished running tests'));
+ * it('is a subtest', () => {
+ * assert.ok('some relevant assertion here');
+ * });
+ * });
+ * ```
+ * @since v18.8.0, v16.18.0
+ * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
+ * @param options Configuration options for the hook. The following properties are supported:
+ */
+ function after(fn?: HookFn, options?: HookOptions): void;
+ /**
+ * This function is used to create a hook running
+ * before each subtest of the current suite.
+ *
+ * ```js
+ * describe('tests', async () => {
+ * beforeEach(() => console.log('about to run a test'));
+ * it('is a subtest', () => {
+ * assert.ok('some relevant assertion here');
+ * });
+ * });
+ * ```
+ * @since v18.8.0, v16.18.0
+ * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
+ * @param options Configuration options for the hook. The following properties are supported:
+ */
+ function beforeEach(fn?: HookFn, options?: HookOptions): void;
+ /**
+ * This function is used to create a hook running
+ * after each subtest of the current test.
+ *
+ * ```js
+ * describe('tests', async () => {
+ * afterEach(() => console.log('finished running a test'));
+ * it('is a subtest', () => {
+ * assert.ok('some relevant assertion here');
+ * });
+ * });
+ * ```
+ * @since v18.8.0, v16.18.0
+ * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
+ * @param options Configuration options for the hook. The following properties are supported:
+ */
+ function afterEach(fn?: HookFn, options?: HookOptions): void;
+ /**
+ * The hook function. If the hook uses callbacks, the callback function is passed as the
+ * second argument.
+ */
+ type HookFn = (s: SuiteContext, done: (result?: any) => void) => any;
+ /**
+ * Configuration options for hooks.
+ * @since v18.8.0
+ */
+ interface HookOptions {
+ /**
+ * Allows aborting an in-progress hook.
+ */
+ signal?: AbortSignal | undefined;
+ /**
+ * A number of milliseconds the hook will fail after. If unspecified, subtests inherit this
+ * value from their parent.
+ * @default Infinity
+ */
+ timeout?: number | undefined;
+ }
+ interface MockFunctionOptions {
+ /**
+ * The number of times that the mock will use the behavior of `implementation`.
+ * Once the mock function has been called `times` times,
+ * it will automatically restore the behavior of `original`.
+ * This value must be an integer greater than zero.
+ * @default Infinity
+ */
+ times?: number | undefined;
+ }
+ interface MockMethodOptions extends MockFunctionOptions {
+ /**
+ * If `true`, `object[methodName]` is treated as a getter.
+ * This option cannot be used with the `setter` option.
+ */
+ getter?: boolean | undefined;
+ /**
+ * If `true`, `object[methodName]` is treated as a setter.
+ * This option cannot be used with the `getter` option.
+ */
+ setter?: boolean | undefined;
+ }
+ type Mock<F extends Function> = F & {
+ mock: MockFunctionContext<F>;
+ };
+ type NoOpFunction = (...args: any[]) => undefined;
+ type FunctionPropertyNames<T> = {
+ [K in keyof T]: T[K] extends Function ? K : never;
+ }[keyof T];
+ /**
+ * The `MockTracker` class is used to manage mocking functionality. The test runner
+ * module provides a top level `mock` export which is a `MockTracker` instance.
+ * Each test also provides its own `MockTracker` instance via the test context's`mock` property.
+ * @since v19.1.0, v18.13.0
+ */
+ class MockTracker {
+ /**
+ * This function is used to create a mock function.
+ *
+ * The following example creates a mock function that increments a counter by one
+ * on each invocation. The `times` option is used to modify the mock behavior such
+ * that the first two invocations add two to the counter instead of one.
+ *
+ * ```js
+ * test('mocks a counting function', (t) => {
+ * let cnt = 0;
+ *
+ * function addOne() {
+ * cnt++;
+ * return cnt;
+ * }
+ *
+ * function addTwo() {
+ * cnt += 2;
+ * return cnt;
+ * }
+ *
+ * const fn = t.mock.fn(addOne, addTwo, { times: 2 });
+ *
+ * assert.strictEqual(fn(), 2);
+ * assert.strictEqual(fn(), 4);
+ * assert.strictEqual(fn(), 5);
+ * assert.strictEqual(fn(), 6);
+ * });
+ * ```
+ * @since v19.1.0, v18.13.0
+ * @param [original='A no-op function'] An optional function to create a mock on.
+ * @param implementation An optional function used as the mock implementation for `original`. This is useful for creating mocks that exhibit one behavior for a specified number of calls and
+ * then restore the behavior of `original`.
+ * @param options Optional configuration options for the mock function. The following properties are supported:
+ * @return The mocked function. The mocked function contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the
+ * behavior of the mocked function.
+ */
+ fn<F extends Function = NoOpFunction>(original?: F, options?: MockFunctionOptions): Mock<F>;
+ fn<F extends Function = NoOpFunction, Implementation extends Function = F>(original?: F, implementation?: Implementation, options?: MockFunctionOptions): Mock<F | Implementation>;
+ /**
+ * This function is used to create a mock on an existing object method. The
+ * following example demonstrates how a mock is created on an existing object
+ * method.
+ *
+ * ```js
+ * test('spies on an object method', (t) => {
+ * const number = {
+ * value: 5,
+ * subtract(a) {
+ * return this.value - a;
+ * },
+ * };
+ *
+ * t.mock.method(number, 'subtract');
+ * assert.strictEqual(number.subtract.mock.calls.length, 0);
+ * assert.strictEqual(number.subtract(3), 2);
+ * assert.strictEqual(number.subtract.mock.calls.length, 1);
+ *
+ * const call = number.subtract.mock.calls[0];
+ *
+ * assert.deepStrictEqual(call.arguments, [3]);
+ * assert.strictEqual(call.result, 2);
+ * assert.strictEqual(call.error, undefined);
+ * assert.strictEqual(call.target, undefined);
+ * assert.strictEqual(call.this, number);
+ * });
+ * ```
+ * @since v19.1.0, v18.13.0
+ * @param object The object whose method is being mocked.
+ * @param methodName The identifier of the method on `object` to mock. If `object[methodName]` is not a function, an error is thrown.
+ * @param implementation An optional function used as the mock implementation for `object[methodName]`.
+ * @param options Optional configuration options for the mock method. The following properties are supported:
+ * @return The mocked method. The mocked method contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the
+ * behavior of the mocked method.
+ */
+ method<
+ MockedObject extends object,
+ MethodName extends FunctionPropertyNames<MockedObject>,
+ >(
+ object: MockedObject,
+ methodName: MethodName,
+ options?: MockFunctionOptions,
+ ): MockedObject[MethodName] extends Function
+ ? Mock<MockedObject[MethodName]>
+ : never;
+ method<
+ MockedObject extends object,
+ MethodName extends FunctionPropertyNames<MockedObject>,
+ Implementation extends Function,
+ >(
+ object: MockedObject,
+ methodName: MethodName,
+ implementation: Implementation,
+ options?: MockFunctionOptions,
+ ): MockedObject[MethodName] extends Function
+ ? Mock<MockedObject[MethodName] | Implementation>
+ : never;
+ method<MockedObject extends object>(
+ object: MockedObject,
+ methodName: keyof MockedObject,
+ options: MockMethodOptions,
+ ): Mock<Function>;
+ method<MockedObject extends object>(
+ object: MockedObject,
+ methodName: keyof MockedObject,
+ implementation: Function,
+ options: MockMethodOptions,
+ ): Mock<Function>;
+
+ /**
+ * This function is syntax sugar for `MockTracker.method` with `options.getter`set to `true`.
+ * @since v19.3.0, v18.13.0
+ */
+ getter<
+ MockedObject extends object,
+ MethodName extends keyof MockedObject,
+ >(
+ object: MockedObject,
+ methodName: MethodName,
+ options?: MockFunctionOptions,
+ ): Mock<() => MockedObject[MethodName]>;
+ getter<
+ MockedObject extends object,
+ MethodName extends keyof MockedObject,
+ Implementation extends Function,
+ >(
+ object: MockedObject,
+ methodName: MethodName,
+ implementation?: Implementation,
+ options?: MockFunctionOptions,
+ ): Mock<(() => MockedObject[MethodName]) | Implementation>;
+ /**
+ * This function is syntax sugar for `MockTracker.method` with `options.setter`set to `true`.
+ * @since v19.3.0, v18.13.0
+ */
+ setter<
+ MockedObject extends object,
+ MethodName extends keyof MockedObject,
+ >(
+ object: MockedObject,
+ methodName: MethodName,
+ options?: MockFunctionOptions,
+ ): Mock<(value: MockedObject[MethodName]) => void>;
+ setter<
+ MockedObject extends object,
+ MethodName extends keyof MockedObject,
+ Implementation extends Function,
+ >(
+ object: MockedObject,
+ methodName: MethodName,
+ implementation?: Implementation,
+ options?: MockFunctionOptions,
+ ): Mock<((value: MockedObject[MethodName]) => void) | Implementation>;
+ /**
+ * This function restores the default behavior of all mocks that were previously
+ * created by this `MockTracker` and disassociates the mocks from the`MockTracker` instance. Once disassociated, the mocks can still be used, but the`MockTracker` instance can no longer be
+ * used to reset their behavior or
+ * otherwise interact with them.
+ *
+ * After each test completes, this function is called on the test context's`MockTracker`. If the global `MockTracker` is used extensively, calling this
+ * function manually is recommended.
+ * @since v19.1.0, v18.13.0
+ */
+ reset(): void;
+ /**
+ * This function restores the default behavior of all mocks that were previously
+ * created by this `MockTracker`. Unlike `mock.reset()`, `mock.restoreAll()` does
+ * not disassociate the mocks from the `MockTracker` instance.
+ * @since v19.1.0, v18.13.0
+ */
+ restoreAll(): void;
+ timers: MockTimers;
+ }
+ const mock: MockTracker;
+ interface MockFunctionCall<
+ F extends Function,
+ ReturnType = F extends (...args: any) => infer T
+ ? T
+ : F extends abstract new (...args: any) => infer T
+ ? T
+ : unknown,
+ Args = F extends (...args: infer Y) => any
+ ? Y
+ : F extends abstract new (...args: infer Y) => any
+ ? Y
+ : unknown[],
+ > {
+ /**
+ * An array of the arguments passed to the mock function.
+ */
+ arguments: Args;
+ /**
+ * If the mocked function threw then this property contains the thrown value.
+ */
+ error: unknown | undefined;
+ /**
+ * The value returned by the mocked function.
+ *
+ * If the mocked function threw, it will be `undefined`.
+ */
+ result: ReturnType | undefined;
+ /**
+ * An `Error` object whose stack can be used to determine the callsite of the mocked function invocation.
+ */
+ stack: Error;
+ /**
+ * If the mocked function is a constructor, this field contains the class being constructed.
+ * Otherwise this will be `undefined`.
+ */
+ target: F extends abstract new (...args: any) => any ? F : undefined;
+ /**
+ * The mocked function's `this` value.
+ */
+ this: unknown;
+ }
+ /**
+ * The `MockFunctionContext` class is used to inspect or manipulate the behavior of
+ * mocks created via the `MockTracker` APIs.
+ * @since v19.1.0, v18.13.0
+ */
+ class MockFunctionContext<F extends Function> {
+ /**
+ * A getter that returns a copy of the internal array used to track calls to the
+ * mock. Each entry in the array is an object with the following properties.
+ * @since v19.1.0, v18.13.0
+ */
+ readonly calls: Array<MockFunctionCall<F>>;
+ /**
+ * This function returns the number of times that this mock has been invoked. This
+ * function is more efficient than checking `ctx.calls.length` because `ctx.calls`is a getter that creates a copy of the internal call tracking array.
+ * @since v19.1.0, v18.13.0
+ * @return The number of times that this mock has been invoked.
+ */
+ callCount(): number;
+ /**
+ * This function is used to change the behavior of an existing mock.
+ *
+ * The following example creates a mock function using `t.mock.fn()`, calls the
+ * mock function, and then changes the mock implementation to a different function.
+ *
+ * ```js
+ * test('changes a mock behavior', (t) => {
+ * let cnt = 0;
+ *
+ * function addOne() {
+ * cnt++;
+ * return cnt;
+ * }
+ *
+ * function addTwo() {
+ * cnt += 2;
+ * return cnt;
+ * }
+ *
+ * const fn = t.mock.fn(addOne);
+ *
+ * assert.strictEqual(fn(), 1);
+ * fn.mock.mockImplementation(addTwo);
+ * assert.strictEqual(fn(), 3);
+ * assert.strictEqual(fn(), 5);
+ * });
+ * ```
+ * @since v19.1.0, v18.13.0
+ * @param implementation The function to be used as the mock's new implementation.
+ */
+ mockImplementation(implementation: Function): void;
+ /**
+ * This function is used to change the behavior of an existing mock for a single
+ * invocation. Once invocation `onCall` has occurred, the mock will revert to
+ * whatever behavior it would have used had `mockImplementationOnce()` not been
+ * called.
+ *
+ * The following example creates a mock function using `t.mock.fn()`, calls the
+ * mock function, changes the mock implementation to a different function for the
+ * next invocation, and then resumes its previous behavior.
+ *
+ * ```js
+ * test('changes a mock behavior once', (t) => {
+ * let cnt = 0;
+ *
+ * function addOne() {
+ * cnt++;
+ * return cnt;
+ * }
+ *
+ * function addTwo() {
+ * cnt += 2;
+ * return cnt;
+ * }
+ *
+ * const fn = t.mock.fn(addOne);
+ *
+ * assert.strictEqual(fn(), 1);
+ * fn.mock.mockImplementationOnce(addTwo);
+ * assert.strictEqual(fn(), 3);
+ * assert.strictEqual(fn(), 4);
+ * });
+ * ```
+ * @since v19.1.0, v18.13.0
+ * @param implementation The function to be used as the mock's implementation for the invocation number specified by `onCall`.
+ * @param onCall The invocation number that will use `implementation`. If the specified invocation has already occurred then an exception is thrown.
+ */
+ mockImplementationOnce(implementation: Function, onCall?: number): void;
+ /**
+ * Resets the call history of the mock function.
+ * @since v19.3.0, v18.13.0
+ */
+ resetCalls(): void;
+ /**
+ * Resets the implementation of the mock function to its original behavior. The
+ * mock can still be used after calling this function.
+ * @since v19.1.0, v18.13.0
+ */
+ restore(): void;
+ }
+ type Timer = 'setInterval' | 'clearInterval' | 'setTimeout' | 'clearTimeout';
+ /**
+ * Mocking timers is a technique commonly used in software testing to simulate and
+ * control the behavior of timers, such as `setInterval` and `setTimeout`,
+ * without actually waiting for the specified time intervals.
+ *
+ * The `MockTracker` provides a top-level `timers` export
+ * which is a `MockTimers` instance.
+ * @since v20.4.0
+ * @experimental
+ */
+ class MockTimers {
+ /**
+ * Enables timer mocking for the specified timers.
+ *
+ * **Note:** When you enable mocking for a specific timer, its associated
+ * clear function will also be implicitly mocked.
+ *
+ * Example usage:
+ *
+ * ```js
+ * import { mock } from 'node:test';
+ * mock.timers.enable(['setInterval']);
+ * ```
+ *
+ * ```js
+ * const { mock } = require('node:test');
+ * mock.timers.enable(['setInterval']);
+ * ```
+ *
+ * The above example enables mocking for the `setInterval` timer and
+ * implicitly mocks the `clearInterval` function. Only the `setInterval`and `clearInterval` functions from `node:timers`,`node:timers/promises`, and`globalThis` will be mocked.
+ *
+ * Alternatively, if you call `mock.timers.enable()` without any parameters:
+ *
+ * All timers (`'setInterval'`, `'clearInterval'`, `'setTimeout'`, and `'clearTimeout'`)
+ * will be mocked. The `setInterval`, `clearInterval`, `setTimeout`, and `clearTimeout`functions from `node:timers`, `node:timers/promises`,
+ * and `globalThis` will be mocked.
+ * @since v20.4.0
+ */
+ enable(timers?: Timer[]): void;
+ /**
+ * This function restores the default behavior of all mocks that were previously
+ * created by this `MockTimers` instance and disassociates the mocks
+ * from the `MockTracker` instance.
+ *
+ * **Note:** After each test completes, this function is called on
+ * the test context's `MockTracker`.
+ *
+ * ```js
+ * import { mock } from 'node:test';
+ * mock.timers.reset();
+ * ```
+ *
+ * ```js
+ * const { mock } = require('node:test');
+ * mock.timers.reset();
+ * ```
+ * @since v20.4.0
+ */
+ reset(): void;
+ /**
+ * Advances time for all mocked timers.
+ *
+ * **Note:** This diverges from how `setTimeout` in Node.js behaves and accepts
+ * only positive numbers. In Node.js, `setTimeout` with negative numbers is
+ * only supported for web compatibility reasons.
+ *
+ * The following example mocks a `setTimeout` function and
+ * by using `.tick` advances in
+ * time triggering all pending timers.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ * import { test } from 'node:test';
+ *
+ * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => {
+ * const fn = context.mock.fn();
+ *
+ * context.mock.timers.enable(['setTimeout']);
+ *
+ * setTimeout(fn, 9999);
+ *
+ * assert.strictEqual(fn.mock.callCount(), 0);
+ *
+ * // Advance in time
+ * context.mock.timers.tick(9999);
+ *
+ * assert.strictEqual(fn.mock.callCount(), 1);
+ * });
+ * ```
+ *
+ * ```js
+ * const assert = require('node:assert');
+ * const { test } = require('node:test');
+ *
+ * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => {
+ * const fn = context.mock.fn();
+ * context.mock.timers.enable(['setTimeout']);
+ *
+ * setTimeout(fn, 9999);
+ * assert.strictEqual(fn.mock.callCount(), 0);
+ *
+ * // Advance in time
+ * context.mock.timers.tick(9999);
+ *
+ * assert.strictEqual(fn.mock.callCount(), 1);
+ * });
+ * ```
+ *
+ * Alternativelly, the `.tick` function can be called many times
+ *
+ * ```js
+ * import assert from 'node:assert';
+ * import { test } from 'node:test';
+ *
+ * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => {
+ * const fn = context.mock.fn();
+ * context.mock.timers.enable(['setTimeout']);
+ * const nineSecs = 9000;
+ * setTimeout(fn, nineSecs);
+ *
+ * const twoSeconds = 3000;
+ * context.mock.timers.tick(twoSeconds);
+ * context.mock.timers.tick(twoSeconds);
+ * context.mock.timers.tick(twoSeconds);
+ *
+ * assert.strictEqual(fn.mock.callCount(), 1);
+ * });
+ * ```
+ *
+ * ```js
+ * const assert = require('node:assert');
+ * const { test } = require('node:test');
+ *
+ * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => {
+ * const fn = context.mock.fn();
+ * context.mock.timers.enable(['setTimeout']);
+ * const nineSecs = 9000;
+ * setTimeout(fn, nineSecs);
+ *
+ * const twoSeconds = 3000;
+ * context.mock.timers.tick(twoSeconds);
+ * context.mock.timers.tick(twoSeconds);
+ * context.mock.timers.tick(twoSeconds);
+ *
+ * assert.strictEqual(fn.mock.callCount(), 1);
+ * });
+ * ```
+ * @since v20.4.0
+ */
+ tick(milliseconds: number): void;
+ /**
+ * Triggers all pending mocked timers immediately.
+ *
+ * The example below triggers all pending timers immediately,
+ * causing them to execute without any delay.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ * import { test } from 'node:test';
+ *
+ * test('runAll functions following the given order', (context) => {
+ * context.mock.timers.enable(['setTimeout']);
+ * const results = [];
+ * setTimeout(() => results.push(1), 9999);
+ *
+ * // Notice that if both timers have the same timeout,
+ * // the order of execution is guaranteed
+ * setTimeout(() => results.push(3), 8888);
+ * setTimeout(() => results.push(2), 8888);
+ *
+ * assert.deepStrictEqual(results, []);
+ *
+ * context.mock.timers.runAll();
+ *
+ * assert.deepStrictEqual(results, [3, 2, 1]);
+ * });
+ * ```
+ *
+ * ```js
+ * const assert = require('node:assert');
+ * const { test } = require('node:test');
+ *
+ * test('runAll functions following the given order', (context) => {
+ * context.mock.timers.enable(['setTimeout']);
+ * const results = [];
+ * setTimeout(() => results.push(1), 9999);
+ *
+ * // Notice that if both timers have the same timeout,
+ * // the order of execution is guaranteed
+ * setTimeout(() => results.push(3), 8888);
+ * setTimeout(() => results.push(2), 8888);
+ *
+ * assert.deepStrictEqual(results, []);
+ *
+ * context.mock.timers.runAll();
+ *
+ * assert.deepStrictEqual(results, [3, 2, 1]);
+ * });
+ * ```
+ *
+ * **Note:** The `runAll()` function is specifically designed for
+ * triggering timers in the context of timer mocking.
+ * It does not have any effect on real-time system
+ * clocks or actual timers outside of the mocking environment.
+ * @since v20.4.0
+ */
+ runAll(): void;
+ /**
+ * Calls {@link MockTimers.reset()}.
+ */
+ [Symbol.dispose](): void;
+ }
+ export { test as default, run, test, describe, it, before, after, beforeEach, afterEach, mock, skip, only, todo };
+}
+
+interface DiagnosticData {
+ /**
+ * The diagnostic message.
+ */
+ message: string;
+ /**
+ * The nesting level of the test.
+ */
+ nesting: number;
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+}
+interface TestFail {
+ /**
+ * Additional execution metadata.
+ */
+ details: {
+ /**
+ * The duration of the test in milliseconds.
+ */
+ duration_ms: number;
+ /**
+ * The error thrown by the test.
+ */
+ error: Error;
+ /**
+ * The type of the test, used to denote whether this is a suite.
+ * @since 20.0.0, 19.9.0, 18.17.0
+ */
+ type?: 'suite';
+ };
+ /**
+ * The test name.
+ */
+ name: string;
+ /**
+ * The nesting level of the test.
+ */
+ nesting: number;
+ /**
+ * The ordinal number of the test.
+ */
+ testNumber: number;
+ /**
+ * Present if `context.todo` is called.
+ */
+ todo?: string | boolean;
+ /**
+ * Present if `context.skip` is called.
+ */
+ skip?: string | boolean;
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+}
+interface TestPass {
+ /**
+ * Additional execution metadata.
+ */
+ details: {
+ /**
+ * The duration of the test in milliseconds.
+ */
+ duration_ms: number;
+ /**
+ * The type of the test, used to denote whether this is a suite.
+ * @since 20.0.0, 19.9.0, 18.17.0
+ */
+ type?: 'suite';
+ };
+ /**
+ * The test name.
+ */
+ name: string;
+ /**
+ * The nesting level of the test.
+ */
+ nesting: number;
+ /**
+ * The ordinal number of the test.
+ */
+ testNumber: number;
+ /**
+ * Present if `context.todo` is called.
+ */
+ todo?: string | boolean;
+ /**
+ * Present if `context.skip` is called.
+ */
+ skip?: string | boolean;
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+}
+interface TestPlan {
+ /**
+ * The nesting level of the test.
+ */
+ nesting: number;
+ /**
+ * The number of subtests that have ran.
+ */
+ count: number;
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+}
+interface TestStart {
+ /**
+ * The test name.
+ */
+ name: string;
+ /**
+ * The nesting level of the test.
+ */
+ nesting: number;
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+}
+interface TestStderr {
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+ /**
+ * The message written to `stderr`
+ */
+ message: string;
+}
+interface TestStdout {
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+ /**
+ * The message written to `stdout`
+ */
+ message: string;
+}
+interface TestEnqueue {
+ /**
+ * The test name
+ */
+ name: string;
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+ /**
+ * The nesting level of the test.
+ */
+ nesting: number;
+}
+interface TestDequeue {
+ /**
+ * The test name
+ */
+ name: string;
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+ /**
+ * The nesting level of the test.
+ */
+ nesting: number;
+}
+
+/**
+ * The `node:test/reporters` module exposes the builtin-reporters for `node:test`.
+ * To access it:
+ *
+ * ```js
+ * import test from 'node:test/reporters';
+ * ```
+ *
+ * This module is only available under the `node:` scheme. The following will not
+ * work:
+ *
+ * ```js
+ * import test from 'test/reporters';
+ * ```
+ * @since v19.9.0
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/test/reporters.js)
+ */
+declare module 'node:test/reporters' {
+ import { Transform } from 'node:stream';
+
+ type TestEvent =
+ | { type: 'test:diagnostic', data: DiagnosticData }
+ | { type: 'test:fail', data: TestFail }
+ | { type: 'test:pass', data: TestPass }
+ | { type: 'test:plan', data: TestPlan }
+ | { type: 'test:start', data: TestStart }
+ | { type: 'test:stderr', data: TestStderr }
+ | { type: 'test:stdout', data: TestStdout }
+ | { type: 'test:enqueue', data: TestEnqueue }
+ | { type: 'test:dequeue', data: TestDequeue }
+ | { type: 'test:watch:drained' };
+ type TestEventGenerator = AsyncGenerator<TestEvent, void>;
+
+ /**
+ * The `dot` reporter outputs the test results in a compact format,
+ * where each passing test is represented by a `.`,
+ * and each failing test is represented by a `X`.
+ */
+ function dot(source: TestEventGenerator): AsyncGenerator<'\n' | '.' | 'X', void>;
+ /**
+ * The `tap` reporter outputs the test results in the [TAP](https://testanything.org/) format.
+ */
+ function tap(source: TestEventGenerator): AsyncGenerator<string, void>;
+ /**
+ * The `spec` reporter outputs the test results in a human-readable format.
+ */
+ class Spec extends Transform {
+ constructor();
+ }
+ export { dot, tap, Spec as spec, TestEvent };
+}
diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts
new file mode 100755
index 0000000..51acc4e
--- /dev/null
+++ b/node_modules/@types/node/timers.d.ts
@@ -0,0 +1,225 @@
+/**
+ * The `timer` module exposes a global API for scheduling functions to
+ * be called at some future period of time. Because the timer functions are
+ * globals, there is no need to call `require('node:timers')` to use the API.
+ *
+ * The timer functions within Node.js implement a similar API as the timers API
+ * provided by Web Browsers but use a different internal implementation that is
+ * built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout).
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/timers.js)
+ */
+declare module 'timers' {
+ import { Abortable } from 'node:events';
+ import { setTimeout as setTimeoutPromise, setImmediate as setImmediatePromise, setInterval as setIntervalPromise } from 'node:timers/promises';
+ interface TimerOptions extends Abortable {
+ /**
+ * Set to `false` to indicate that the scheduled `Timeout`
+ * should not require the Node.js event loop to remain active.
+ * @default true
+ */
+ ref?: boolean | undefined;
+ }
+ let setTimeout: typeof global.setTimeout;
+ let clearTimeout: typeof global.clearTimeout;
+ let setInterval: typeof global.setInterval;
+ let clearInterval: typeof global.clearInterval;
+ let setImmediate: typeof global.setImmediate;
+ let clearImmediate: typeof global.clearImmediate;
+ global {
+ namespace NodeJS {
+ // compatibility with older typings
+ interface Timer extends RefCounted {
+ hasRef(): boolean;
+ refresh(): this;
+ [Symbol.toPrimitive](): number;
+ }
+ /**
+ * This object is created internally and is returned from `setImmediate()`. It
+ * can be passed to `clearImmediate()` in order to cancel the scheduled
+ * actions.
+ *
+ * By default, when an immediate is scheduled, the Node.js event loop will continue
+ * running as long as the immediate is active. The `Immediate` object returned by `setImmediate()` exports both `immediate.ref()` and `immediate.unref()`functions that can be used to
+ * control this default behavior.
+ */
+ class Immediate implements RefCounted {
+ /**
+ * When called, requests that the Node.js event loop _not_ exit so long as the`Immediate` is active. Calling `immediate.ref()` multiple times will have no
+ * effect.
+ *
+ * By default, all `Immediate` objects are "ref'ed", making it normally unnecessary
+ * to call `immediate.ref()` unless `immediate.unref()` had been called previously.
+ * @since v9.7.0
+ * @return a reference to `immediate`
+ */
+ ref(): this;
+ /**
+ * When called, the active `Immediate` object will not require the Node.js event
+ * loop to remain active. If there is no other activity keeping the event loop
+ * running, the process may exit before the `Immediate` object's callback is
+ * invoked. Calling `immediate.unref()` multiple times will have no effect.
+ * @since v9.7.0
+ * @return a reference to `immediate`
+ */
+ unref(): this;
+ /**
+ * If true, the `Immediate` object will keep the Node.js event loop active.
+ * @since v11.0.0
+ */
+ hasRef(): boolean;
+ _onImmediate: Function; // to distinguish it from the Timeout class
+ /**
+ * Cancels the immediate. This is similar to calling `clearImmediate()`.
+ * @since v20.5.0
+ */
+ [Symbol.dispose](): void;
+ }
+ /**
+ * This object is created internally and is returned from `setTimeout()` and `setInterval()`. It can be passed to either `clearTimeout()` or `clearInterval()` in order to cancel the
+ * scheduled actions.
+ *
+ * By default, when a timer is scheduled using either `setTimeout()` or `setInterval()`, the Node.js event loop will continue running as long as the
+ * timer is active. Each of the `Timeout` objects returned by these functions
+ * export both `timeout.ref()` and `timeout.unref()` functions that can be used to
+ * control this default behavior.
+ */
+ class Timeout implements Timer {
+ /**
+ * When called, requests that the Node.js event loop _not_ exit so long as the`Timeout` is active. Calling `timeout.ref()` multiple times will have no effect.
+ *
+ * By default, all `Timeout` objects are "ref'ed", making it normally unnecessary
+ * to call `timeout.ref()` unless `timeout.unref()` had been called previously.
+ * @since v0.9.1
+ * @return a reference to `timeout`
+ */
+ ref(): this;
+ /**
+ * When called, the active `Timeout` object will not require the Node.js event loop
+ * to remain active. If there is no other activity keeping the event loop running,
+ * the process may exit before the `Timeout` object's callback is invoked. Calling`timeout.unref()` multiple times will have no effect.
+ * @since v0.9.1
+ * @return a reference to `timeout`
+ */
+ unref(): this;
+ /**
+ * If true, the `Timeout` object will keep the Node.js event loop active.
+ * @since v11.0.0
+ */
+ hasRef(): boolean;
+ /**
+ * Sets the timer's start time to the current time, and reschedules the timer to
+ * call its callback at the previously specified duration adjusted to the current
+ * time. This is useful for refreshing a timer without allocating a new
+ * JavaScript object.
+ *
+ * Using this on a timer that has already called its callback will reactivate the
+ * timer.
+ * @since v10.2.0
+ * @return a reference to `timeout`
+ */
+ refresh(): this;
+ [Symbol.toPrimitive](): number;
+ /**
+ * Cancels the timeout.
+ * @since v20.5.0
+ */
+ [Symbol.dispose](): void;
+ }
+ }
+ /**
+ * Schedules execution of a one-time `callback` after `delay` milliseconds.
+ *
+ * The `callback` will likely not be invoked in precisely `delay` milliseconds.
+ * Node.js makes no guarantees about the exact timing of when callbacks will fire,
+ * nor of their ordering. The callback will be called as close as possible to the
+ * time specified.
+ *
+ * When `delay` is larger than `2147483647` or less than `1`, the `delay`will be set to `1`. Non-integer delays are truncated to an integer.
+ *
+ * If `callback` is not a function, a `TypeError` will be thrown.
+ *
+ * This method has a custom variant for promises that is available using `timersPromises.setTimeout()`.
+ * @since v0.0.1
+ * @param callback The function to call when the timer elapses.
+ * @param [delay=1] The number of milliseconds to wait before calling the `callback`.
+ * @param args Optional arguments to pass when the `callback` is called.
+ * @return for use with {@link clearTimeout}
+ */
+ function setTimeout<TArgs extends any[]>(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timeout;
+ // util.promisify no rest args compability
+ // tslint:disable-next-line void-return
+ function setTimeout(callback: (args: void) => void, ms?: number): NodeJS.Timeout;
+ namespace setTimeout {
+ const __promisify__: typeof setTimeoutPromise;
+ }
+ /**
+ * Cancels a `Timeout` object created by `setTimeout()`.
+ * @since v0.0.1
+ * @param timeout A `Timeout` object as returned by {@link setTimeout} or the `primitive` of the `Timeout` object as a string or a number.
+ */
+ function clearTimeout(timeoutId: NodeJS.Timeout | string | number | undefined): void;
+ /**
+ * Schedules repeated execution of `callback` every `delay` milliseconds.
+ *
+ * When `delay` is larger than `2147483647` or less than `1`, the `delay` will be
+ * set to `1`. Non-integer delays are truncated to an integer.
+ *
+ * If `callback` is not a function, a `TypeError` will be thrown.
+ *
+ * This method has a custom variant for promises that is available using `timersPromises.setInterval()`.
+ * @since v0.0.1
+ * @param callback The function to call when the timer elapses.
+ * @param [delay=1] The number of milliseconds to wait before calling the `callback`.
+ * @param args Optional arguments to pass when the `callback` is called.
+ * @return for use with {@link clearInterval}
+ */
+ function setInterval<TArgs extends any[]>(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timeout;
+ // util.promisify no rest args compability
+ // tslint:disable-next-line void-return
+ function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timeout;
+ namespace setInterval {
+ const __promisify__: typeof setIntervalPromise;
+ }
+ /**
+ * Cancels a `Timeout` object created by `setInterval()`.
+ * @since v0.0.1
+ * @param timeout A `Timeout` object as returned by {@link setInterval} or the `primitive` of the `Timeout` object as a string or a number.
+ */
+ function clearInterval(intervalId: NodeJS.Timeout | string | number | undefined): void;
+ /**
+ * Schedules the "immediate" execution of the `callback` after I/O events'
+ * callbacks.
+ *
+ * When multiple calls to `setImmediate()` are made, the `callback` functions are
+ * queued for execution in the order in which they are created. The entire callback
+ * queue is processed every event loop iteration. If an immediate timer is queued
+ * from inside an executing callback, that timer will not be triggered until the
+ * next event loop iteration.
+ *
+ * If `callback` is not a function, a `TypeError` will be thrown.
+ *
+ * This method has a custom variant for promises that is available using `timersPromises.setImmediate()`.
+ * @since v0.9.1
+ * @param callback The function to call at the end of this turn of the Node.js `Event Loop`
+ * @param args Optional arguments to pass when the `callback` is called.
+ * @return for use with {@link clearImmediate}
+ */
+ function setImmediate<TArgs extends any[]>(callback: (...args: TArgs) => void, ...args: TArgs): NodeJS.Immediate;
+ // util.promisify no rest args compability
+ // tslint:disable-next-line void-return
+ function setImmediate(callback: (args: void) => void): NodeJS.Immediate;
+ namespace setImmediate {
+ const __promisify__: typeof setImmediatePromise;
+ }
+ /**
+ * Cancels an `Immediate` object created by `setImmediate()`.
+ * @since v0.9.1
+ * @param immediate An `Immediate` object as returned by {@link setImmediate}.
+ */
+ function clearImmediate(immediateId: NodeJS.Immediate | undefined): void;
+ function queueMicrotask(callback: () => void): void;
+ }
+}
+declare module 'node:timers' {
+ export * from 'timers';
+}
diff --git a/node_modules/@types/node/timers/promises.d.ts b/node_modules/@types/node/timers/promises.d.ts
new file mode 100755
index 0000000..299a355
--- /dev/null
+++ b/node_modules/@types/node/timers/promises.d.ts
@@ -0,0 +1,93 @@
+/**
+ * The `timers/promises` API provides an alternative set of timer functions
+ * that return `Promise` objects. The API is accessible via`require('node:timers/promises')`.
+ *
+ * ```js
+ * import {
+ * setTimeout,
+ * setImmediate,
+ * setInterval,
+ * } from 'timers/promises';
+ * ```
+ * @since v15.0.0
+ */
+declare module 'timers/promises' {
+ import { TimerOptions } from 'node:timers';
+ /**
+ * ```js
+ * import {
+ * setTimeout,
+ * } from 'timers/promises';
+ *
+ * const res = await setTimeout(100, 'result');
+ *
+ * console.log(res); // Prints 'result'
+ * ```
+ * @since v15.0.0
+ * @param [delay=1] The number of milliseconds to wait before fulfilling the promise.
+ * @param value A value with which the promise is fulfilled.
+ */
+ function setTimeout<T = void>(delay?: number, value?: T, options?: TimerOptions): Promise<T>;
+ /**
+ * ```js
+ * import {
+ * setImmediate,
+ * } from 'timers/promises';
+ *
+ * const res = await setImmediate('result');
+ *
+ * console.log(res); // Prints 'result'
+ * ```
+ * @since v15.0.0
+ * @param value A value with which the promise is fulfilled.
+ */
+ function setImmediate<T = void>(value?: T, options?: TimerOptions): Promise<T>;
+ /**
+ * Returns an async iterator that generates values in an interval of `delay` ms.
+ * If `ref` is `true`, you need to call `next()` of async iterator explicitly
+ * or implicitly to keep the event loop alive.
+ *
+ * ```js
+ * import {
+ * setInterval,
+ * } from 'timers/promises';
+ *
+ * const interval = 100;
+ * for await (const startTime of setInterval(interval, Date.now())) {
+ * const now = Date.now();
+ * console.log(now);
+ * if ((now - startTime) > 1000)
+ * break;
+ * }
+ * console.log(Date.now());
+ * ```
+ * @since v15.9.0
+ */
+ function setInterval<T = void>(delay?: number, value?: T, options?: TimerOptions): AsyncIterable<T>;
+ interface Scheduler {
+ /**
+ * ```js
+ * import { scheduler } from 'node:timers/promises';
+ *
+ * await scheduler.wait(1000); // Wait one second before continuing
+ * ```
+ * An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API.
+ * Calling timersPromises.scheduler.wait(delay, options) is roughly equivalent to calling timersPromises.setTimeout(delay, undefined, options) except that the ref option is not supported.
+ * @since v16.14.0
+ * @experimental
+ * @param [delay=1] The number of milliseconds to wait before fulfilling the promise.
+ */
+ wait: (delay?: number, options?: TimerOptions) => Promise<void>;
+ /**
+ * An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API.
+ * Calling timersPromises.scheduler.yield() is equivalent to calling timersPromises.setImmediate() with no arguments.
+ * @since v16.14.0
+ * @experimental
+ */
+ yield: () => Promise<void>;
+ }
+ const scheduler: Scheduler;
+}
+declare module 'node:timers/promises' {
+ export * from 'timers/promises';
+}
diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts
new file mode 100755
index 0000000..4992b24
--- /dev/null
+++ b/node_modules/@types/node/tls.d.ts
@@ -0,0 +1,1130 @@
+/**
+ * The `node:tls` module provides an implementation of the Transport Layer Security
+ * (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL.
+ * The module can be accessed using:
+ *
+ * ```js
+ * const tls = require('node:tls');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/tls.js)
+ */
+declare module 'tls' {
+ import { X509Certificate } from 'node:crypto';
+ import * as net from 'node:net';
+ import * as stream from 'stream';
+ const CLIENT_RENEG_LIMIT: number;
+ const CLIENT_RENEG_WINDOW: number;
+ interface Certificate {
+ /**
+ * Country code.
+ */
+ C: string;
+ /**
+ * Street.
+ */
+ ST: string;
+ /**
+ * Locality.
+ */
+ L: string;
+ /**
+ * Organization.
+ */
+ O: string;
+ /**
+ * Organizational unit.
+ */
+ OU: string;
+ /**
+ * Common name.
+ */
+ CN: string;
+ }
+ interface PeerCertificate {
+ /**
+ * `true` if a Certificate Authority (CA), `false` otherwise.
+ * @since v18.13.0
+ */
+ ca: boolean;
+ /**
+ * The DER encoded X.509 certificate data.
+ */
+ raw: Buffer;
+ /**
+ * The certificate subject.
+ */
+ subject: Certificate;
+ /**
+ * The certificate issuer, described in the same terms as the `subject`.
+ */
+ issuer: Certificate;
+ /**
+ * The date-time the certificate is valid from.
+ */
+ valid_from: string;
+ /**
+ * The date-time the certificate is valid to.
+ */
+ valid_to: string;
+ /**
+ * The certificate serial number, as a hex string.
+ */
+ serialNumber: string;
+ /**
+ * The SHA-1 digest of the DER encoded certificate.
+ * It is returned as a `:` separated hexadecimal string.
+ */
+ fingerprint: string;
+ /**
+ * The SHA-256 digest of the DER encoded certificate.
+ * It is returned as a `:` separated hexadecimal string.
+ */
+ fingerprint256: string;
+ /**
+ * The SHA-512 digest of the DER encoded certificate.
+ * It is returned as a `:` separated hexadecimal string.
+ */
+ fingerprint512: string;
+ /**
+ * The extended key usage, a set of OIDs.
+ */
+ ext_key_usage?: string[];
+ /**
+ * A string containing concatenated names for the subject,
+ * an alternative to the `subject` names.
+ */
+ subjectaltname?: string;
+ /**
+ * An array describing the AuthorityInfoAccess, used with OCSP.
+ */
+ infoAccess?: NodeJS.Dict<string[]>;
+ /**
+ * For RSA keys: The RSA bit size.
+ *
+ * For EC keys: The key size in bits.
+ */
+ bits?: number;
+ /**
+ * The RSA exponent, as a string in hexadecimal number notation.
+ */
+ exponent?: string;
+ /**
+ * The RSA modulus, as a hexadecimal string.
+ */
+ modulus?: string;
+ /**
+ * The public key.
+ */
+ pubkey?: Buffer;
+ /**
+ * The ASN.1 name of the OID of the elliptic curve.
+ * Well-known curves are identified by an OID.
+ * While it is unusual, it is possible that the curve
+ * is identified by its mathematical properties,
+ * in which case it will not have an OID.
+ */
+ asn1Curve?: string;
+ /**
+ * The NIST name for the elliptic curve,if it has one
+ * (not all well-known curves have been assigned names by NIST).
+ */
+ nistCurve?: string;
+ }
+ interface DetailedPeerCertificate extends PeerCertificate {
+ /**
+ * The issuer certificate object.
+ * For self-signed certificates, this may be a circular reference.
+ */
+ issuerCertificate: DetailedPeerCertificate;
+ }
+ interface CipherNameAndProtocol {
+ /**
+ * The cipher name.
+ */
+ name: string;
+ /**
+ * SSL/TLS protocol version.
+ */
+ version: string;
+ /**
+ * IETF name for the cipher suite.
+ */
+ standardName: string;
+ }
+ interface EphemeralKeyInfo {
+ /**
+ * The supported types are 'DH' and 'ECDH'.
+ */
+ type: string;
+ /**
+ * The name property is available only when type is 'ECDH'.
+ */
+ name?: string | undefined;
+ /**
+ * The size of parameter of an ephemeral key exchange.
+ */
+ size: number;
+ }
+ interface KeyObject {
+ /**
+ * Private keys in PEM format.
+ */
+ pem: string | Buffer;
+ /**
+ * Optional passphrase.
+ */
+ passphrase?: string | undefined;
+ }
+ interface PxfObject {
+ /**
+ * PFX or PKCS12 encoded private key and certificate chain.
+ */
+ buf: string | Buffer;
+ /**
+ * Optional passphrase.
+ */
+ passphrase?: string | undefined;
+ }
+ interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions {
+ /**
+ * If true the TLS socket will be instantiated in server-mode.
+ * Defaults to false.
+ */
+ isServer?: boolean | undefined;
+ /**
+ * An optional net.Server instance.
+ */
+ server?: net.Server | undefined;
+ /**
+ * An optional Buffer instance containing a TLS session.
+ */
+ session?: Buffer | undefined;
+ /**
+ * If true, specifies that the OCSP status request extension will be
+ * added to the client hello and an 'OCSPResponse' event will be
+ * emitted on the socket before establishing a secure communication
+ */
+ requestOCSP?: boolean | undefined;
+ }
+ /**
+ * Performs transparent encryption of written data and all required TLS
+ * negotiation.
+ *
+ * Instances of `tls.TLSSocket` implement the duplex `Stream` interface.
+ *
+ * Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate}) will only return data while the
+ * connection is open.
+ * @since v0.11.4
+ */
+ class TLSSocket extends net.Socket {
+ /**
+ * Construct a new tls.TLSSocket object from an existing TCP socket.
+ */
+ constructor(socket: net.Socket, options?: TLSSocketOptions);
+ /**
+ * This property is `true` if the peer certificate was signed by one of the CAs
+ * specified when creating the `tls.TLSSocket` instance, otherwise `false`.
+ * @since v0.11.4
+ */
+ authorized: boolean;
+ /**
+ * Returns the reason why the peer's certificate was not been verified. This
+ * property is set only when `tlsSocket.authorized === false`.
+ * @since v0.11.4
+ */
+ authorizationError: Error;
+ /**
+ * Always returns `true`. This may be used to distinguish TLS sockets from regular`net.Socket` instances.
+ * @since v0.11.4
+ */
+ encrypted: true;
+ /**
+ * String containing the selected ALPN protocol.
+ * Before a handshake has completed, this value is always null.
+ * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false.
+ */
+ alpnProtocol: string | false | null;
+ /**
+ * Returns an object representing the local certificate. The returned object has
+ * some properties corresponding to the fields of the certificate.
+ *
+ * See {@link TLSSocket.getPeerCertificate} for an example of the certificate
+ * structure.
+ *
+ * If there is no local certificate, an empty object will be returned. If the
+ * socket has been destroyed, `null` will be returned.
+ * @since v11.2.0
+ */
+ getCertificate(): PeerCertificate | object | null;
+ /**
+ * Returns an object containing information on the negotiated cipher suite.
+ *
+ * For example, a TLSv1.2 protocol with AES256-SHA cipher:
+ *
+ * ```json
+ * {
+ * "name": "AES256-SHA",
+ * "standardName": "TLS_RSA_WITH_AES_256_CBC_SHA",
+ * "version": "SSLv3"
+ * }
+ * ```
+ *
+ * See [SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html) for more information.
+ * @since v0.11.4
+ */
+ getCipher(): CipherNameAndProtocol;
+ /**
+ * Returns an object representing the type, name, and size of parameter of
+ * an ephemeral key exchange in `perfect forward secrecy` on a client
+ * connection. It returns an empty object when the key exchange is not
+ * ephemeral. As this is only supported on a client socket; `null` is returned
+ * if called on a server socket. The supported types are `'DH'` and `'ECDH'`. The`name` property is available only when type is `'ECDH'`.
+ *
+ * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`.
+ * @since v5.0.0
+ */
+ getEphemeralKeyInfo(): EphemeralKeyInfo | object | null;
+ /**
+ * As the `Finished` messages are message digests of the complete handshake
+ * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can
+ * be used for external authentication procedures when the authentication
+ * provided by SSL/TLS is not desired or is not enough.
+ *
+ * Corresponds to the `SSL_get_finished` routine in OpenSSL and may be used
+ * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929).
+ * @since v9.9.0
+ * @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet.
+ */
+ getFinished(): Buffer | undefined;
+ /**
+ * Returns an object representing the peer's certificate. If the peer does not
+ * provide a certificate, an empty object will be returned. If the socket has been
+ * destroyed, `null` will be returned.
+ *
+ * If the full certificate chain was requested, each certificate will include an`issuerCertificate` property containing an object representing its issuer's
+ * certificate.
+ * @since v0.11.4
+ * @param detailed Include the full certificate chain if `true`, otherwise include just the peer's certificate.
+ * @return A certificate object.
+ */
+ getPeerCertificate(detailed: true): DetailedPeerCertificate;
+ getPeerCertificate(detailed?: false): PeerCertificate;
+ getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate;
+ /**
+ * As the `Finished` messages are message digests of the complete handshake
+ * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can
+ * be used for external authentication procedures when the authentication
+ * provided by SSL/TLS is not desired or is not enough.
+ *
+ * Corresponds to the `SSL_get_peer_finished` routine in OpenSSL and may be used
+ * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929).
+ * @since v9.9.0
+ * @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so
+ * far.
+ */
+ getPeerFinished(): Buffer | undefined;
+ /**
+ * Returns a string containing the negotiated SSL/TLS protocol version of the
+ * current connection. The value `'unknown'` will be returned for connected
+ * sockets that have not completed the handshaking process. The value `null` will
+ * be returned for server sockets or disconnected client sockets.
+ *
+ * Protocol versions are:
+ *
+ * * `'SSLv3'`
+ * * `'TLSv1'`
+ * * `'TLSv1.1'`
+ * * `'TLSv1.2'`
+ * * `'TLSv1.3'`
+ *
+ * See the OpenSSL [`SSL_get_version`](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html) documentation for more information.
+ * @since v5.7.0
+ */
+ getProtocol(): string | null;
+ /**
+ * Returns the TLS session data or `undefined` if no session was
+ * negotiated. On the client, the data can be provided to the `session` option of {@link connect} to resume the connection. On the server, it may be useful
+ * for debugging.
+ *
+ * See `Session Resumption` for more information.
+ *
+ * Note: `getSession()` works only for TLSv1.2 and below. For TLSv1.3, applications
+ * must use the `'session'` event (it also works for TLSv1.2 and below).
+ * @since v0.11.4
+ */
+ getSession(): Buffer | undefined;
+ /**
+ * See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information.
+ * @since v12.11.0
+ * @return List of signature algorithms shared between the server and the client in the order of decreasing preference.
+ */
+ getSharedSigalgs(): string[];
+ /**
+ * For a client, returns the TLS session ticket if one is available, or`undefined`. For a server, always returns `undefined`.
+ *
+ * It may be useful for debugging.
+ *
+ * See `Session Resumption` for more information.
+ * @since v0.11.4
+ */
+ getTLSTicket(): Buffer | undefined;
+ /**
+ * See `Session Resumption` for more information.
+ * @since v0.5.6
+ * @return `true` if the session was reused, `false` otherwise.
+ */
+ isSessionReused(): boolean;
+ /**
+ * The `tlsSocket.renegotiate()` method initiates a TLS renegotiation process.
+ * Upon completion, the `callback` function will be passed a single argument
+ * that is either an `Error` (if the request failed) or `null`.
+ *
+ * This method can be used to request a peer's certificate after the secure
+ * connection has been established.
+ *
+ * When running as the server, the socket will be destroyed with an error after`handshakeTimeout` timeout.
+ *
+ * For TLSv1.3, renegotiation cannot be initiated, it is not supported by the
+ * protocol.
+ * @since v0.11.8
+ * @param callback If `renegotiate()` returned `true`, callback is attached once to the `'secure'` event. If `renegotiate()` returned `false`, `callback` will be called in the next tick with
+ * an error, unless the `tlsSocket` has been destroyed, in which case `callback` will not be called at all.
+ * @return `true` if renegotiation was initiated, `false` otherwise.
+ */
+ renegotiate(
+ options: {
+ rejectUnauthorized?: boolean | undefined;
+ requestCert?: boolean | undefined;
+ },
+ callback: (err: Error | null) => void
+ ): undefined | boolean;
+ /**
+ * The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size.
+ * Returns `true` if setting the limit succeeded; `false` otherwise.
+ *
+ * Smaller fragment sizes decrease the buffering latency on the client: larger
+ * fragments are buffered by the TLS layer until the entire fragment is received
+ * and its integrity is verified; large fragments can span multiple roundtrips
+ * and their processing can be delayed due to packet loss or reordering. However,
+ * smaller fragments add extra TLS framing bytes and CPU overhead, which may
+ * decrease overall server throughput.
+ * @since v0.11.11
+ * @param [size=16384] The maximum TLS fragment size. The maximum value is `16384`.
+ */
+ setMaxSendFragment(size: number): boolean;
+ /**
+ * Disables TLS renegotiation for this `TLSSocket` instance. Once called, attempts
+ * to renegotiate will trigger an `'error'` event on the `TLSSocket`.
+ * @since v8.4.0
+ */
+ disableRenegotiation(): void;
+ /**
+ * When enabled, TLS packet trace information is written to `stderr`. This can be
+ * used to debug TLS connection problems.
+ *
+ * The format of the output is identical to the output of`openssl s_client -trace` or `openssl s_server -trace`. While it is produced by
+ * OpenSSL's `SSL_trace()` function, the format is undocumented, can change
+ * without notice, and should not be relied on.
+ * @since v12.2.0
+ */
+ enableTrace(): void;
+ /**
+ * Returns the peer certificate as an `X509Certificate` object.
+ *
+ * If there is no peer certificate, or the socket has been destroyed,`undefined` will be returned.
+ * @since v15.9.0
+ */
+ getPeerX509Certificate(): X509Certificate | undefined;
+ /**
+ * Returns the local certificate as an `X509Certificate` object.
+ *
+ * If there is no local certificate, or the socket has been destroyed,`undefined` will be returned.
+ * @since v15.9.0
+ */
+ getX509Certificate(): X509Certificate | undefined;
+ /**
+ * Keying material is used for validations to prevent different kind of attacks in
+ * network protocols, for example in the specifications of IEEE 802.1X.
+ *
+ * Example
+ *
+ * ```js
+ * const keyingMaterial = tlsSocket.exportKeyingMaterial(
+ * 128,
+ * 'client finished');
+ *
+ * /*
+ * Example return value of keyingMaterial:
+ * <Buffer 76 26 af 99 c5 56 8e 42 09 91 ef 9f 93 cb ad 6c 7b 65 f8 53 f1 d8 d9
+ * 12 5a 33 b8 b5 25 df 7b 37 9f e0 e2 4f b8 67 83 a3 2f cd 5d 41 42 4c 91
+ * 74 ef 2c ... 78 more bytes>
+ *
+ * ```
+ *
+ * See the OpenSSL [`SSL_export_keying_material`](https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html) documentation for more
+ * information.
+ * @since v13.10.0, v12.17.0
+ * @param length number of bytes to retrieve from keying material
+ * @param label an application specific label, typically this will be a value from the [IANA Exporter Label
+ * Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels).
+ * @param context Optionally provide a context.
+ * @return requested bytes of the keying material
+ */
+ exportKeyingMaterial(length: number, label: string, context: Buffer): Buffer;
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ addListener(event: 'secureConnect', listener: () => void): this;
+ addListener(event: 'session', listener: (session: Buffer) => void): this;
+ addListener(event: 'keylog', listener: (line: Buffer) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'OCSPResponse', response: Buffer): boolean;
+ emit(event: 'secureConnect'): boolean;
+ emit(event: 'session', session: Buffer): boolean;
+ emit(event: 'keylog', line: Buffer): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ on(event: 'secureConnect', listener: () => void): this;
+ on(event: 'session', listener: (session: Buffer) => void): this;
+ on(event: 'keylog', listener: (line: Buffer) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ once(event: 'secureConnect', listener: () => void): this;
+ once(event: 'session', listener: (session: Buffer) => void): this;
+ once(event: 'keylog', listener: (line: Buffer) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ prependListener(event: 'secureConnect', listener: () => void): this;
+ prependListener(event: 'session', listener: (session: Buffer) => void): this;
+ prependListener(event: 'keylog', listener: (line: Buffer) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ prependOnceListener(event: 'secureConnect', listener: () => void): this;
+ prependOnceListener(event: 'session', listener: (session: Buffer) => void): this;
+ prependOnceListener(event: 'keylog', listener: (line: Buffer) => void): this;
+ }
+ interface CommonConnectionOptions {
+ /**
+ * An optional TLS context object from tls.createSecureContext()
+ */
+ secureContext?: SecureContext | undefined;
+ /**
+ * When enabled, TLS packet trace information is written to `stderr`. This can be
+ * used to debug TLS connection problems.
+ * @default false
+ */
+ enableTrace?: boolean | undefined;
+ /**
+ * If true the server will request a certificate from clients that
+ * connect and attempt to verify that certificate. Defaults to
+ * false.
+ */
+ requestCert?: boolean | undefined;
+ /**
+ * An array of strings or a Buffer naming possible ALPN protocols.
+ * (Protocols should be ordered by their priority.)
+ */
+ ALPNProtocols?: string[] | Uint8Array[] | Uint8Array | undefined;
+ /**
+ * SNICallback(servername, cb) <Function> A function that will be
+ * called if the client supports SNI TLS extension. Two arguments
+ * will be passed when called: servername and cb. SNICallback should
+ * invoke cb(null, ctx), where ctx is a SecureContext instance.
+ * (tls.createSecureContext(...) can be used to get a proper
+ * SecureContext.) If SNICallback wasn't provided the default callback
+ * with high-level API will be used (see below).
+ */
+ SNICallback?: ((servername: string, cb: (err: Error | null, ctx?: SecureContext) => void) => void) | undefined;
+ /**
+ * If true the server will reject any connection which is not
+ * authorized with the list of supplied CAs. This option only has an
+ * effect if requestCert is true.
+ * @default true
+ */
+ rejectUnauthorized?: boolean | undefined;
+ }
+ interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts {
+ /**
+ * Abort the connection if the SSL/TLS handshake does not finish in the
+ * specified number of milliseconds. A 'tlsClientError' is emitted on
+ * the tls.Server object whenever a handshake times out. Default:
+ * 120000 (120 seconds).
+ */
+ handshakeTimeout?: number | undefined;
+ /**
+ * The number of seconds after which a TLS session created by the
+ * server will no longer be resumable. See Session Resumption for more
+ * information. Default: 300.
+ */
+ sessionTimeout?: number | undefined;
+ /**
+ * 48-bytes of cryptographically strong pseudo-random data.
+ */
+ ticketKeys?: Buffer | undefined;
+ /**
+ *
+ * @param socket
+ * @param identity identity parameter sent from the client.
+ * @return pre-shared key that must either be
+ * a buffer or `null` to stop the negotiation process. Returned PSK must be
+ * compatible with the selected cipher's digest.
+ *
+ * When negotiating TLS-PSK (pre-shared keys), this function is called
+ * with the identity provided by the client.
+ * If the return value is `null` the negotiation process will stop and an
+ * "unknown_psk_identity" alert message will be sent to the other party.
+ * If the server wishes to hide the fact that the PSK identity was not known,
+ * the callback must provide some random data as `psk` to make the connection
+ * fail with "decrypt_error" before negotiation is finished.
+ * PSK ciphers are disabled by default, and using TLS-PSK thus
+ * requires explicitly specifying a cipher suite with the `ciphers` option.
+ * More information can be found in the RFC 4279.
+ */
+ pskCallback?(socket: TLSSocket, identity: string): DataView | NodeJS.TypedArray | null;
+ /**
+ * hint to send to a client to help
+ * with selecting the identity during TLS-PSK negotiation. Will be ignored
+ * in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be
+ * emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code.
+ */
+ pskIdentityHint?: string | undefined;
+ }
+ interface PSKCallbackNegotation {
+ psk: DataView | NodeJS.TypedArray;
+ identity: string;
+ }
+ interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions {
+ host?: string | undefined;
+ port?: number | undefined;
+ path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored.
+ socket?: stream.Duplex | undefined; // Establish secure connection on a given socket rather than creating a new socket
+ checkServerIdentity?: typeof checkServerIdentity | undefined;
+ servername?: string | undefined; // SNI TLS Extension
+ session?: Buffer | undefined;
+ minDHSize?: number | undefined;
+ lookup?: net.LookupFunction | undefined;
+ timeout?: number | undefined;
+ /**
+ * When negotiating TLS-PSK (pre-shared keys), this function is called
+ * with optional identity `hint` provided by the server or `null`
+ * in case of TLS 1.3 where `hint` was removed.
+ * It will be necessary to provide a custom `tls.checkServerIdentity()`
+ * for the connection as the default one will try to check hostname/IP
+ * of the server against the certificate but that's not applicable for PSK
+ * because there won't be a certificate present.
+ * More information can be found in the RFC 4279.
+ *
+ * @param hint message sent from the server to help client
+ * decide which identity to use during negotiation.
+ * Always `null` if TLS 1.3 is used.
+ * @returns Return `null` to stop the negotiation process. `psk` must be
+ * compatible with the selected cipher's digest.
+ * `identity` must use UTF-8 encoding.
+ */
+ pskCallback?(hint: string | null): PSKCallbackNegotation | null;
+ }
+ /**
+ * Accepts encrypted connections using TLS or SSL.
+ * @since v0.3.2
+ */
+ class Server extends net.Server {
+ constructor(secureConnectionListener?: (socket: TLSSocket) => void);
+ constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void);
+ /**
+ * The `server.addContext()` method adds a secure context that will be used if
+ * the client request's SNI name matches the supplied `hostname` (or wildcard).
+ *
+ * When there are multiple matching contexts, the most recently added one is
+ * used.
+ * @since v0.5.3
+ * @param hostname A SNI host name or wildcard (e.g. `'*'`)
+ * @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc), or a TLS context object created
+ * with {@link createSecureContext} itself.
+ */
+ addContext(hostname: string, context: SecureContextOptions): void;
+ /**
+ * Returns the session ticket keys.
+ *
+ * See `Session Resumption` for more information.
+ * @since v3.0.0
+ * @return A 48-byte buffer containing the session ticket keys.
+ */
+ getTicketKeys(): Buffer;
+ /**
+ * The `server.setSecureContext()` method replaces the secure context of an
+ * existing server. Existing connections to the server are not interrupted.
+ * @since v11.0.0
+ * @param options An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc).
+ */
+ setSecureContext(options: SecureContextOptions): void;
+ /**
+ * Sets the session ticket keys.
+ *
+ * Changes to the ticket keys are effective only for future server connections.
+ * Existing or currently pending server connections will use the previous keys.
+ *
+ * See `Session Resumption` for more information.
+ * @since v3.0.0
+ * @param keys A 48-byte buffer containing the session ticket keys.
+ */
+ setTicketKeys(keys: Buffer): void;
+ /**
+ * events.EventEmitter
+ * 1. tlsClientError
+ * 2. newSession
+ * 3. OCSPRequest
+ * 4. resumeSession
+ * 5. secureConnection
+ * 6. keylog
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ addListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ addListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ addListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'tlsClientError', err: Error, tlsSocket: TLSSocket): boolean;
+ emit(event: 'newSession', sessionId: Buffer, sessionData: Buffer, callback: () => void): boolean;
+ emit(event: 'OCSPRequest', certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean;
+ emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void): boolean;
+ emit(event: 'secureConnection', tlsSocket: TLSSocket): boolean;
+ emit(event: 'keylog', line: Buffer, tlsSocket: TLSSocket): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ on(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ on(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ on(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ on(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ on(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ once(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ once(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ once(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ once(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ prependListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ prependListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ prependListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ prependListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ prependOnceListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ prependOnceListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ prependOnceListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ }
+ /**
+ * @deprecated since v0.11.3 Use `tls.TLSSocket` instead.
+ */
+ interface SecurePair {
+ encrypted: TLSSocket;
+ cleartext: TLSSocket;
+ }
+ type SecureVersion = 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1';
+ interface SecureContextOptions {
+ /**
+ * If set, this will be called when a client opens a connection using the ALPN extension.
+ * One argument will be passed to the callback: an object containing `servername` and `protocols` fields,
+ * respectively containing the server name from the SNI extension (if any) and an array of
+ * ALPN protocol name strings. The callback must return either one of the strings listed in `protocols`,
+ * which will be returned to the client as the selected ALPN protocol, or `undefined`,
+ * to reject the connection with a fatal alert. If a string is returned that does not match one of
+ * the client's ALPN protocols, an error will be thrown.
+ * This option cannot be used with the `ALPNProtocols` option, and setting both options will throw an error.
+ */
+ ALPNCallback?: ((arg: { servername: string; protocols: string[] }) => string | undefined) | undefined;
+ /**
+ * Optionally override the trusted CA certificates. Default is to trust
+ * the well-known CAs curated by Mozilla. Mozilla's CAs are completely
+ * replaced when CAs are explicitly specified using this option.
+ */
+ ca?: string | Buffer | Array<string | Buffer> | undefined;
+ /**
+ * Cert chains in PEM format. One cert chain should be provided per
+ * private key. Each cert chain should consist of the PEM formatted
+ * certificate for a provided private key, followed by the PEM
+ * formatted intermediate certificates (if any), in order, and not
+ * including the root CA (the root CA must be pre-known to the peer,
+ * see ca). When providing multiple cert chains, they do not have to
+ * be in the same order as their private keys in key. If the
+ * intermediate certificates are not provided, the peer will not be
+ * able to validate the certificate, and the handshake will fail.
+ */
+ cert?: string | Buffer | Array<string | Buffer> | undefined;
+ /**
+ * Colon-separated list of supported signature algorithms. The list
+ * can contain digest algorithms (SHA256, MD5 etc.), public key
+ * algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g
+ * 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512).
+ */
+ sigalgs?: string | undefined;
+ /**
+ * Cipher suite specification, replacing the default. For more
+ * information, see modifying the default cipher suite. Permitted
+ * ciphers can be obtained via tls.getCiphers(). Cipher names must be
+ * uppercased in order for OpenSSL to accept them.
+ */
+ ciphers?: string | undefined;
+ /**
+ * Name of an OpenSSL engine which can provide the client certificate.
+ */
+ clientCertEngine?: string | undefined;
+ /**
+ * PEM formatted CRLs (Certificate Revocation Lists).
+ */
+ crl?: string | Buffer | Array<string | Buffer> | undefined;
+ /**
+ * `'auto'` or custom Diffie-Hellman parameters, required for non-ECDHE perfect forward secrecy.
+ * If omitted or invalid, the parameters are silently discarded and DHE ciphers will not be available.
+ * ECDHE-based perfect forward secrecy will still be available.
+ */
+ dhparam?: string | Buffer | undefined;
+ /**
+ * A string describing a named curve or a colon separated list of curve
+ * NIDs or names, for example P-521:P-384:P-256, to use for ECDH key
+ * agreement. Set to auto to select the curve automatically. Use
+ * crypto.getCurves() to obtain a list of available curve names. On
+ * recent releases, openssl ecparam -list_curves will also display the
+ * name and description of each available elliptic curve. Default:
+ * tls.DEFAULT_ECDH_CURVE.
+ */
+ ecdhCurve?: string | undefined;
+ /**
+ * Attempt to use the server's cipher suite preferences instead of the
+ * client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be
+ * set in secureOptions
+ */
+ honorCipherOrder?: boolean | undefined;
+ /**
+ * Private keys in PEM format. PEM allows the option of private keys
+ * being encrypted. Encrypted keys will be decrypted with
+ * options.passphrase. Multiple keys using different algorithms can be
+ * provided either as an array of unencrypted key strings or buffers,
+ * or an array of objects in the form {pem: <string|buffer>[,
+ * passphrase: <string>]}. The object form can only occur in an array.
+ * object.passphrase is optional. Encrypted keys will be decrypted with
+ * object.passphrase if provided, or options.passphrase if it is not.
+ */
+ key?: string | Buffer | Array<string | Buffer | KeyObject> | undefined;
+ /**
+ * Name of an OpenSSL engine to get private key from. Should be used
+ * together with privateKeyIdentifier.
+ */
+ privateKeyEngine?: string | undefined;
+ /**
+ * Identifier of a private key managed by an OpenSSL engine. Should be
+ * used together with privateKeyEngine. Should not be set together with
+ * key, because both options define a private key in different ways.
+ */
+ privateKeyIdentifier?: string | undefined;
+ /**
+ * Optionally set the maximum TLS version to allow. One
+ * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
+ * `secureProtocol` option, use one or the other.
+ * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using
+ * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to
+ * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used.
+ */
+ maxVersion?: SecureVersion | undefined;
+ /**
+ * Optionally set the minimum TLS version to allow. One
+ * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
+ * `secureProtocol` option, use one or the other. It is not recommended to use
+ * less than TLSv1.2, but it may be required for interoperability.
+ * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using
+ * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to
+ * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to
+ * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used.
+ */
+ minVersion?: SecureVersion | undefined;
+ /**
+ * Shared passphrase used for a single private key and/or a PFX.
+ */
+ passphrase?: string | undefined;
+ /**
+ * PFX or PKCS12 encoded private key and certificate chain. pfx is an
+ * alternative to providing key and cert individually. PFX is usually
+ * encrypted, if it is, passphrase will be used to decrypt it. Multiple
+ * PFX can be provided either as an array of unencrypted PFX buffers,
+ * or an array of objects in the form {buf: <string|buffer>[,
+ * passphrase: <string>]}. The object form can only occur in an array.
+ * object.passphrase is optional. Encrypted PFX will be decrypted with
+ * object.passphrase if provided, or options.passphrase if it is not.
+ */
+ pfx?: string | Buffer | Array<string | Buffer | PxfObject> | undefined;
+ /**
+ * Optionally affect the OpenSSL protocol behavior, which is not
+ * usually necessary. This should be used carefully if at all! Value is
+ * a numeric bitmask of the SSL_OP_* options from OpenSSL Options
+ */
+ secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options
+ /**
+ * Legacy mechanism to select the TLS protocol version to use, it does
+ * not support independent control of the minimum and maximum version,
+ * and does not support limiting the protocol to TLSv1.3. Use
+ * minVersion and maxVersion instead. The possible values are listed as
+ * SSL_METHODS, use the function names as strings. For example, use
+ * 'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow
+ * any TLS protocol version up to TLSv1.3. It is not recommended to use
+ * TLS versions less than 1.2, but it may be required for
+ * interoperability. Default: none, see minVersion.
+ */
+ secureProtocol?: string | undefined;
+ /**
+ * Opaque identifier used by servers to ensure session state is not
+ * shared between applications. Unused by clients.
+ */
+ sessionIdContext?: string | undefined;
+ /**
+ * 48-bytes of cryptographically strong pseudo-random data.
+ * See Session Resumption for more information.
+ */
+ ticketKeys?: Buffer | undefined;
+ /**
+ * The number of seconds after which a TLS session created by the
+ * server will no longer be resumable. See Session Resumption for more
+ * information. Default: 300.
+ */
+ sessionTimeout?: number | undefined;
+ }
+ interface SecureContext {
+ context: any;
+ }
+ /**
+ * Verifies the certificate `cert` is issued to `hostname`.
+ *
+ * Returns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on
+ * failure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type).
+ *
+ * This function is intended to be used in combination with the`checkServerIdentity` option that can be passed to {@link connect} and as
+ * such operates on a `certificate object`. For other purposes, consider using `x509.checkHost()` instead.
+ *
+ * This function can be overwritten by providing an alternative function as the`options.checkServerIdentity` option that is passed to `tls.connect()`. The
+ * overwriting function can call `tls.checkServerIdentity()` of course, to augment
+ * the checks done with additional verification.
+ *
+ * This function is only called if the certificate passed all other checks, such as
+ * being issued by trusted CA (`options.ca`).
+ *
+ * Earlier versions of Node.js incorrectly accepted certificates for a given`hostname` if a matching `uniformResourceIdentifier` subject alternative name
+ * was present (see [CVE-2021-44531](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531)). Applications that wish to accept`uniformResourceIdentifier` subject alternative names can use
+ * a custom`options.checkServerIdentity` function that implements the desired behavior.
+ * @since v0.8.4
+ * @param hostname The host name or IP address to verify the certificate against.
+ * @param cert A `certificate object` representing the peer's certificate.
+ */
+ function checkServerIdentity(hostname: string, cert: PeerCertificate): Error | undefined;
+ /**
+ * Creates a new {@link Server}. The `secureConnectionListener`, if provided, is
+ * automatically set as a listener for the `'secureConnection'` event.
+ *
+ * The `ticketKeys` options is automatically shared between `node:cluster` module
+ * workers.
+ *
+ * The following illustrates a simple echo server:
+ *
+ * ```js
+ * const tls = require('node:tls');
+ * const fs = require('node:fs');
+ *
+ * const options = {
+ * key: fs.readFileSync('server-key.pem'),
+ * cert: fs.readFileSync('server-cert.pem'),
+ *
+ * // This is necessary only if using client certificate authentication.
+ * requestCert: true,
+ *
+ * // This is necessary only if the client uses a self-signed certificate.
+ * ca: [ fs.readFileSync('client-cert.pem') ],
+ * };
+ *
+ * const server = tls.createServer(options, (socket) => {
+ * console.log('server connected',
+ * socket.authorized ? 'authorized' : 'unauthorized');
+ * socket.write('welcome!\n');
+ * socket.setEncoding('utf8');
+ * socket.pipe(socket);
+ * });
+ * server.listen(8000, () => {
+ * console.log('server bound');
+ * });
+ * ```
+ *
+ * The server can be tested by connecting to it using the example client from {@link connect}.
+ * @since v0.3.2
+ */
+ function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server;
+ function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server;
+ /**
+ * The `callback` function, if specified, will be added as a listener for the `'secureConnect'` event.
+ *
+ * `tls.connect()` returns a {@link TLSSocket} object.
+ *
+ * Unlike the `https` API, `tls.connect()` does not enable the
+ * SNI (Server Name Indication) extension by default, which may cause some
+ * servers to return an incorrect certificate or reject the connection
+ * altogether. To enable SNI, set the `servername` option in addition
+ * to `host`.
+ *
+ * The following illustrates a client for the echo server example from {@link createServer}:
+ *
+ * ```js
+ * // Assumes an echo server that is listening on port 8000.
+ * const tls = require('node:tls');
+ * const fs = require('node:fs');
+ *
+ * const options = {
+ * // Necessary only if the server requires client certificate authentication.
+ * key: fs.readFileSync('client-key.pem'),
+ * cert: fs.readFileSync('client-cert.pem'),
+ *
+ * // Necessary only if the server uses a self-signed certificate.
+ * ca: [ fs.readFileSync('server-cert.pem') ],
+ *
+ * // Necessary only if the server's cert isn't for "localhost".
+ * checkServerIdentity: () => { return null; },
+ * };
+ *
+ * const socket = tls.connect(8000, options, () => {
+ * console.log('client connected',
+ * socket.authorized ? 'authorized' : 'unauthorized');
+ * process.stdin.pipe(socket);
+ * process.stdin.resume();
+ * });
+ * socket.setEncoding('utf8');
+ * socket.on('data', (data) => {
+ * console.log(data);
+ * });
+ * socket.on('end', () => {
+ * console.log('server ends connection');
+ * });
+ * ```
+ * @since v0.11.3
+ */
+ function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ /**
+ * Creates a new secure pair object with two streams, one of which reads and writes
+ * the encrypted data and the other of which reads and writes the cleartext data.
+ * Generally, the encrypted stream is piped to/from an incoming encrypted data
+ * stream and the cleartext one is used as a replacement for the initial encrypted
+ * stream.
+ *
+ * `tls.createSecurePair()` returns a `tls.SecurePair` object with `cleartext` and`encrypted` stream properties.
+ *
+ * Using `cleartext` has the same API as {@link TLSSocket}.
+ *
+ * The `tls.createSecurePair()` method is now deprecated in favor of`tls.TLSSocket()`. For example, the code:
+ *
+ * ```js
+ * pair = tls.createSecurePair(// ... );
+ * pair.encrypted.pipe(socket);
+ * socket.pipe(pair.encrypted);
+ * ```
+ *
+ * can be replaced by:
+ *
+ * ```js
+ * secureSocket = tls.TLSSocket(socket, options);
+ * ```
+ *
+ * where `secureSocket` has the same API as `pair.cleartext`.
+ * @since v0.3.2
+ * @deprecated Since v0.11.3 - Use {@link TLSSocket} instead.
+ * @param context A secure context object as returned by `tls.createSecureContext()`
+ * @param isServer `true` to specify that this TLS connection should be opened as a server.
+ * @param requestCert `true` to specify whether a server should request a certificate from a connecting client. Only applies when `isServer` is `true`.
+ * @param rejectUnauthorized If not `false` a server automatically reject clients with invalid certificates. Only applies when `isServer` is `true`.
+ */
+ function createSecurePair(context?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
+ /**
+ * {@link createServer} sets the default value of the `honorCipherOrder` option
+ * to `true`, other APIs that create secure contexts leave it unset.
+ *
+ * {@link createServer} uses a 128 bit truncated SHA1 hash value generated
+ * from `process.argv` as the default value of the `sessionIdContext` option, other
+ * APIs that create secure contexts have no default value.
+ *
+ * The `tls.createSecureContext()` method creates a `SecureContext` object. It is
+ * usable as an argument to several `tls` APIs, such as `server.addContext()`,
+ * but has no public methods. The {@link Server} constructor and the {@link createServer} method do not support the `secureContext` option.
+ *
+ * A key is _required_ for ciphers that use certificates. Either `key` or`pfx` can be used to provide it.
+ *
+ * If the `ca` option is not given, then Node.js will default to using [Mozilla's publicly trusted list of
+ * CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt).
+ *
+ * Custom DHE parameters are discouraged in favor of the new `dhparam: 'auto'`option. When set to `'auto'`, well-known DHE parameters of sufficient strength
+ * will be selected automatically. Otherwise, if necessary, `openssl dhparam` can
+ * be used to create custom parameters. The key length must be greater than or
+ * equal to 1024 bits or else an error will be thrown. Although 1024 bits is
+ * permissible, use 2048 bits or larger for stronger security.
+ * @since v0.11.13
+ */
+ function createSecureContext(options?: SecureContextOptions): SecureContext;
+ /**
+ * Returns an array with the names of the supported TLS ciphers. The names are
+ * lower-case for historical reasons, but must be uppercased to be used in
+ * the `ciphers` option of {@link createSecureContext}.
+ *
+ * Not all supported ciphers are enabled by default. See `Modifying the default TLS cipher suite`.
+ *
+ * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for
+ * TLSv1.2 and below.
+ *
+ * ```js
+ * console.log(tls.getCiphers()); // ['aes128-gcm-sha256', 'aes128-sha', ...]
+ * ```
+ * @since v0.10.2
+ */
+ function getCiphers(): string[];
+ /**
+ * The default curve name to use for ECDH key agreement in a tls server.
+ * The default value is 'auto'. See tls.createSecureContext() for further
+ * information.
+ */
+ let DEFAULT_ECDH_CURVE: string;
+ /**
+ * The default value of the maxVersion option of
+ * tls.createSecureContext(). It can be assigned any of the supported TLS
+ * protocol versions, 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default:
+ * 'TLSv1.3', unless changed using CLI options. Using --tls-max-v1.2 sets
+ * the default to 'TLSv1.2'. Using --tls-max-v1.3 sets the default to
+ * 'TLSv1.3'. If multiple of the options are provided, the highest maximum
+ * is used.
+ */
+ let DEFAULT_MAX_VERSION: SecureVersion;
+ /**
+ * The default value of the minVersion option of tls.createSecureContext().
+ * It can be assigned any of the supported TLS protocol versions,
+ * 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default: 'TLSv1.2', unless
+ * changed using CLI options. Using --tls-min-v1.0 sets the default to
+ * 'TLSv1'. Using --tls-min-v1.1 sets the default to 'TLSv1.1'. Using
+ * --tls-min-v1.3 sets the default to 'TLSv1.3'. If multiple of the options
+ * are provided, the lowest minimum is used.
+ */
+ let DEFAULT_MIN_VERSION: SecureVersion;
+ /**
+ * The default value of the ciphers option of tls.createSecureContext().
+ * It can be assigned any of the supported OpenSSL ciphers.
+ * Defaults to the content of crypto.constants.defaultCoreCipherList, unless
+ * changed using CLI options using --tls-default-ciphers.
+ */
+ let DEFAULT_CIPHERS: string;
+ /**
+ * An immutable array of strings representing the root certificates (in PEM
+ * format) used for verifying peer certificates. This is the default value
+ * of the ca option to tls.createSecureContext().
+ */
+ const rootCertificates: ReadonlyArray<string>;
+}
+declare module 'node:tls' {
+ export * from 'tls';
+}
diff --git a/node_modules/@types/node/trace_events.d.ts b/node_modules/@types/node/trace_events.d.ts
new file mode 100755
index 0000000..ca8baed
--- /dev/null
+++ b/node_modules/@types/node/trace_events.d.ts
@@ -0,0 +1,182 @@
+/**
+ * The `node:trace_events` module provides a mechanism to centralize tracing
+ * information generated by V8, Node.js core, and userspace code.
+ *
+ * Tracing can be enabled with the `--trace-event-categories` command-line flag
+ * or by using the `node:trace_events` module. The `--trace-event-categories` flag
+ * accepts a list of comma-separated category names.
+ *
+ * The available categories are:
+ *
+ * * `node`: An empty placeholder.
+ * * `node.async_hooks`: Enables capture of detailed `async_hooks` trace data.
+ * The `async_hooks` events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property.
+ * * `node.bootstrap`: Enables capture of Node.js bootstrap milestones.
+ * * `node.console`: Enables capture of `console.time()` and `console.count()`output.
+ * * `node.threadpoolwork.sync`: Enables capture of trace data for threadpool
+ * synchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`.
+ * * `node.threadpoolwork.async`: Enables capture of trace data for threadpool
+ * asynchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`.
+ * * `node.dns.native`: Enables capture of trace data for DNS queries.
+ * * `node.net.native`: Enables capture of trace data for network.
+ * * `node.environment`: Enables capture of Node.js Environment milestones.
+ * * `node.fs.sync`: Enables capture of trace data for file system sync methods.
+ * * `node.fs_dir.sync`: Enables capture of trace data for file system sync
+ * directory methods.
+ * * `node.fs.async`: Enables capture of trace data for file system async methods.
+ * * `node.fs_dir.async`: Enables capture of trace data for file system async
+ * directory methods.
+ * * `node.perf`: Enables capture of `Performance API` measurements.
+ * * `node.perf.usertiming`: Enables capture of only Performance API User Timing
+ * measures and marks.
+ * * `node.perf.timerify`: Enables capture of only Performance API timerify
+ * measurements.
+ * * `node.promises.rejections`: Enables capture of trace data tracking the number
+ * of unhandled Promise rejections and handled-after-rejections.
+ * * `node.vm.script`: Enables capture of trace data for the `node:vm` module's`runInNewContext()`, `runInContext()`, and `runInThisContext()` methods.
+ * * `v8`: The `V8` events are GC, compiling, and execution related.
+ * * `node.http`: Enables capture of trace data for http request / response.
+ *
+ * By default the `node`, `node.async_hooks`, and `v8` categories are enabled.
+ *
+ * ```bash
+ * node --trace-event-categories v8,node,node.async_hooks server.js
+ * ```
+ *
+ * Prior versions of Node.js required the use of the `--trace-events-enabled`flag to enable trace events. This requirement has been removed. However, the`--trace-events-enabled` flag _may_ still be
+ * used and will enable the`node`, `node.async_hooks`, and `v8` trace event categories by default.
+ *
+ * ```bash
+ * node --trace-events-enabled
+ *
+ * # is equivalent to
+ *
+ * node --trace-event-categories v8,node,node.async_hooks
+ * ```
+ *
+ * Alternatively, trace events may be enabled using the `node:trace_events` module:
+ *
+ * ```js
+ * const trace_events = require('node:trace_events');
+ * const tracing = trace_events.createTracing({ categories: ['node.perf'] });
+ * tracing.enable(); // Enable trace event capture for the 'node.perf' category
+ *
+ * // do work
+ *
+ * tracing.disable(); // Disable trace event capture for the 'node.perf' category
+ * ```
+ *
+ * Running Node.js with tracing enabled will produce log files that can be opened
+ * in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome.
+ *
+ * The logging file is by default called `node_trace.${rotation}.log`, where`${rotation}` is an incrementing log-rotation id. The filepath pattern can
+ * be specified with `--trace-event-file-pattern` that accepts a template
+ * string that supports `${rotation}` and `${pid}`:
+ *
+ * ```bash
+ * node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js
+ * ```
+ *
+ * To guarantee that the log file is properly generated after signal events like`SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers
+ * in your code, such as:
+ *
+ * ```js
+ * process.on('SIGINT', function onSigint() {
+ * console.info('Received SIGINT.');
+ * process.exit(130); // Or applicable exit code depending on OS and signal
+ * });
+ * ```
+ *
+ * The tracing system uses the same time source
+ * as the one used by `process.hrtime()`.
+ * However the trace-event timestamps are expressed in microseconds,
+ * unlike `process.hrtime()` which returns nanoseconds.
+ *
+ * The features from this module are not available in `Worker` threads.
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/trace_events.js)
+ */
+declare module 'trace_events' {
+ /**
+ * The `Tracing` object is used to enable or disable tracing for sets of
+ * categories. Instances are created using the
+ * `trace_events.createTracing()` method.
+ *
+ * When created, the `Tracing` object is disabled. Calling the
+ * `tracing.enable()` method adds the categories to the set of enabled trace
+ * event categories. Calling `tracing.disable()` will remove the categories
+ * from the set of enabled trace event categories.
+ */
+ interface Tracing {
+ /**
+ * A comma-separated list of the trace event categories covered by this
+ * `Tracing` object.
+ */
+ readonly categories: string;
+ /**
+ * Disables this `Tracing` object.
+ *
+ * Only trace event categories _not_ covered by other enabled `Tracing`
+ * objects and _not_ specified by the `--trace-event-categories` flag
+ * will be disabled.
+ */
+ disable(): void;
+ /**
+ * Enables this `Tracing` object for the set of categories covered by
+ * the `Tracing` object.
+ */
+ enable(): void;
+ /**
+ * `true` only if the `Tracing` object has been enabled.
+ */
+ readonly enabled: boolean;
+ }
+ interface CreateTracingOptions {
+ /**
+ * An array of trace category names. Values included in the array are
+ * coerced to a string when possible. An error will be thrown if the
+ * value cannot be coerced.
+ */
+ categories: string[];
+ }
+ /**
+ * Creates and returns a `Tracing` object for the given set of `categories`.
+ *
+ * ```js
+ * const trace_events = require('node:trace_events');
+ * const categories = ['node.perf', 'node.async_hooks'];
+ * const tracing = trace_events.createTracing({ categories });
+ * tracing.enable();
+ * // do stuff
+ * tracing.disable();
+ * ```
+ * @since v10.0.0
+ * @return .
+ */
+ function createTracing(options: CreateTracingOptions): Tracing;
+ /**
+ * Returns a comma-separated list of all currently-enabled trace event
+ * categories. The current set of enabled trace event categories is determined
+ * by the _union_ of all currently-enabled `Tracing` objects and any categories
+ * enabled using the `--trace-event-categories` flag.
+ *
+ * Given the file `test.js` below, the command`node --trace-event-categories node.perf test.js` will print`'node.async_hooks,node.perf'` to the console.
+ *
+ * ```js
+ * const trace_events = require('node:trace_events');
+ * const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] });
+ * const t2 = trace_events.createTracing({ categories: ['node.perf'] });
+ * const t3 = trace_events.createTracing({ categories: ['v8'] });
+ *
+ * t1.enable();
+ * t2.enable();
+ *
+ * console.log(trace_events.getEnabledCategories());
+ * ```
+ * @since v10.0.0
+ */
+ function getEnabledCategories(): string | undefined;
+}
+declare module 'node:trace_events' {
+ export * from 'trace_events';
+}
diff --git a/node_modules/@types/node/ts4.8/assert.d.ts b/node_modules/@types/node/ts4.8/assert.d.ts
new file mode 100755
index 0000000..e309252
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/assert.d.ts
@@ -0,0 +1,972 @@
+/**
+ * The `node:assert` module provides a set of assertion functions for verifying
+ * invariants.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/assert.js)
+ */
+declare module 'assert' {
+ /**
+ * An alias of {@link ok}.
+ * @since v0.5.9
+ * @param value The input that is checked for being truthy.
+ */
+ function assert(value: unknown, message?: string | Error): asserts value;
+ namespace assert {
+ /**
+ * Indicates the failure of an assertion. All errors thrown by the `node:assert`module will be instances of the `AssertionError` class.
+ */
+ class AssertionError extends Error {
+ /**
+ * Set to the `actual` argument for methods such as {@link assert.strictEqual()}.
+ */
+ actual: unknown;
+ /**
+ * Set to the `expected` argument for methods such as {@link assert.strictEqual()}.
+ */
+ expected: unknown;
+ /**
+ * Set to the passed in operator value.
+ */
+ operator: string;
+ /**
+ * Indicates if the message was auto-generated (`true`) or not.
+ */
+ generatedMessage: boolean;
+ /**
+ * Value is always `ERR_ASSERTION` to show that the error is an assertion error.
+ */
+ code: 'ERR_ASSERTION';
+ constructor(options?: {
+ /** If provided, the error message is set to this value. */
+ message?: string | undefined;
+ /** The `actual` property on the error instance. */
+ actual?: unknown | undefined;
+ /** The `expected` property on the error instance. */
+ expected?: unknown | undefined;
+ /** The `operator` property on the error instance. */
+ operator?: string | undefined;
+ /** If provided, the generated stack trace omits frames before this function. */
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function | undefined;
+ });
+ }
+ /**
+ * This feature is deprecated and will be removed in a future version.
+ * Please consider using alternatives such as the `mock` helper function.
+ * @since v14.2.0, v12.19.0
+ * @deprecated Deprecated
+ */
+ class CallTracker {
+ /**
+ * The wrapper function is expected to be called exactly `exact` times. If the
+ * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an
+ * error.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func);
+ * ```
+ * @since v14.2.0, v12.19.0
+ * @param [fn='A no-op function']
+ * @param [exact=1]
+ * @return that wraps `fn`.
+ */
+ calls(exact?: number): () => void;
+ calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
+ /**
+ * Example:
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ * const callsfunc = tracker.calls(func);
+ * callsfunc(1, 2, 3);
+ *
+ * assert.deepStrictEqual(tracker.getCalls(callsfunc),
+ * [{ thisArg: undefined, arguments: [1, 2, 3] }]);
+ * ```
+ * @since v18.8.0, v16.18.0
+ * @param fn
+ * @return An Array with all the calls to a tracked function.
+ */
+ getCalls(fn: Function): CallTrackerCall[];
+ /**
+ * The arrays contains information about the expected and actual number of calls of
+ * the functions that have not been called the expected number of times.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func, 2);
+ *
+ * // Returns an array containing information on callsfunc()
+ * console.log(tracker.report());
+ * // [
+ * // {
+ * // message: 'Expected the func function to be executed 2 time(s) but was
+ * // executed 0 time(s).',
+ * // actual: 0,
+ * // expected: 2,
+ * // operator: 'func',
+ * // stack: stack trace
+ * // }
+ * // ]
+ * ```
+ * @since v14.2.0, v12.19.0
+ * @return An Array of objects containing information about the wrapper functions returned by `calls`.
+ */
+ report(): CallTrackerReportInformation[];
+ /**
+ * Reset calls of the call tracker.
+ * If a tracked function is passed as an argument, the calls will be reset for it.
+ * If no arguments are passed, all tracked functions will be reset.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ * const callsfunc = tracker.calls(func);
+ *
+ * callsfunc();
+ * // Tracker was called once
+ * assert.strictEqual(tracker.getCalls(callsfunc).length, 1);
+ *
+ * tracker.reset(callsfunc);
+ * assert.strictEqual(tracker.getCalls(callsfunc).length, 0);
+ * ```
+ * @since v18.8.0, v16.18.0
+ * @param fn a tracked function to reset.
+ */
+ reset(fn?: Function): void;
+ /**
+ * Iterates through the list of functions passed to `tracker.calls()` and will throw an error for functions that
+ * have not been called the expected number of times.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func, 2);
+ *
+ * callsfunc();
+ *
+ * // Will throw an error since callsfunc() was only called once.
+ * tracker.verify();
+ * ```
+ * @since v14.2.0, v12.19.0
+ */
+ verify(): void;
+ }
+ interface CallTrackerCall {
+ thisArg: object;
+ arguments: unknown[];
+ }
+ interface CallTrackerReportInformation {
+ message: string;
+ /** The actual number of times the function was called. */
+ actual: number;
+ /** The number of times the function was expected to be called. */
+ expected: number;
+ /** The name of the function that is wrapped. */
+ operator: string;
+ /** A stack trace of the function. */
+ stack: object;
+ }
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: unknown) => boolean) | object | Error;
+ /**
+ * Throws an `AssertionError` with the provided error message or a default
+ * error message. If the `message` parameter is an instance of an `Error` then
+ * it will be thrown instead of the `AssertionError`.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.fail();
+ * // AssertionError [ERR_ASSERTION]: Failed
+ *
+ * assert.fail('boom');
+ * // AssertionError [ERR_ASSERTION]: boom
+ *
+ * assert.fail(new TypeError('need array'));
+ * // TypeError: need array
+ * ```
+ *
+ * Using `assert.fail()` with more than two arguments is possible but deprecated.
+ * See below for further details.
+ * @since v0.1.21
+ * @param [message='Failed']
+ */
+ function fail(message?: string | Error): never;
+ /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
+ function fail(
+ actual: unknown,
+ expected: unknown,
+ message?: string | Error,
+ operator?: string,
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function
+ ): never;
+ /**
+ * Tests if `value` is truthy. It is equivalent to`assert.equal(!!value, true, message)`.
+ *
+ * If `value` is not truthy, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is `undefined`, a default
+ * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``.
+ *
+ * Be aware that in the `repl` the error message will be different to the one
+ * thrown in a file! See below for further details.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.ok(true);
+ * // OK
+ * assert.ok(1);
+ * // OK
+ *
+ * assert.ok();
+ * // AssertionError: No value argument passed to `assert.ok()`
+ *
+ * assert.ok(false, 'it\'s false');
+ * // AssertionError: it's false
+ *
+ * // In the repl:
+ * assert.ok(typeof 123 === 'string');
+ * // AssertionError: false == true
+ *
+ * // In a file (e.g. test.js):
+ * assert.ok(typeof 123 === 'string');
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(typeof 123 === 'string')
+ *
+ * assert.ok(false);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(false)
+ *
+ * assert.ok(0);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(0)
+ * ```
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * // Using `assert()` works the same:
+ * assert(0);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert(0)
+ * ```
+ * @since v0.1.21
+ */
+ function ok(value: unknown, message?: string | Error): asserts value;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link strictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link strictEqual} instead.
+ *
+ * Tests shallow, coercive equality between the `actual` and `expected` parameters
+ * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled
+ * and treated as being identical if both sides are `NaN`.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * assert.equal(1, 1);
+ * // OK, 1 == 1
+ * assert.equal(1, '1');
+ * // OK, 1 == '1'
+ * assert.equal(NaN, NaN);
+ * // OK
+ *
+ * assert.equal(1, 2);
+ * // AssertionError: 1 == 2
+ * assert.equal({ a: { b: 1 } }, { a: { b: 1 } });
+ * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
+ * ```
+ *
+ * If the values are not equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default
+ * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * @since v0.1.21
+ */
+ function equal(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link notStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
+ *
+ * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is
+ * specially handled and treated as being identical if both sides are `NaN`.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * assert.notEqual(1, 2);
+ * // OK
+ *
+ * assert.notEqual(1, 1);
+ * // AssertionError: 1 != 1
+ *
+ * assert.notEqual(1, '1');
+ * // AssertionError: 1 != '1'
+ * ```
+ *
+ * If the values are equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default error
+ * message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * @since v0.1.21
+ */
+ function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link deepStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead.
+ *
+ * Tests for deep equality between the `actual` and `expected` parameters. Consider
+ * using {@link deepStrictEqual} instead. {@link deepEqual} can have
+ * surprising results.
+ *
+ * _Deep equality_ means that the enumerable "own" properties of child objects
+ * are also recursively evaluated by the following rules.
+ * @since v0.1.21
+ */
+ function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link notDeepStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead.
+ *
+ * Tests for any deep inequality. Opposite of {@link deepEqual}.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const obj1 = {
+ * a: {
+ * b: 1,
+ * },
+ * };
+ * const obj2 = {
+ * a: {
+ * b: 2,
+ * },
+ * };
+ * const obj3 = {
+ * a: {
+ * b: 1,
+ * },
+ * };
+ * const obj4 = { __proto__: obj1 };
+ *
+ * assert.notDeepEqual(obj1, obj1);
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+ *
+ * assert.notDeepEqual(obj1, obj2);
+ * // OK
+ *
+ * assert.notDeepEqual(obj1, obj3);
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+ *
+ * assert.notDeepEqual(obj1, obj4);
+ * // OK
+ * ```
+ *
+ * If the values are deeply equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a default
+ * error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Tests strict equality between the `actual` and `expected` parameters as
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.strictEqual(1, 2);
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+ * //
+ * // 1 !== 2
+ *
+ * assert.strictEqual(1, 1);
+ * // OK
+ *
+ * assert.strictEqual('Hello foobar', 'Hello World!');
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+ * // + actual - expected
+ * //
+ * // + 'Hello foobar'
+ * // - 'Hello World!'
+ * // ^
+ *
+ * const apples = 1;
+ * const oranges = 2;
+ * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
+ * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
+ *
+ * assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
+ * // TypeError: Inputs are not identical
+ * ```
+ *
+ * If the values are not strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
+ * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function strictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+ /**
+ * Tests strict inequality between the `actual` and `expected` parameters as
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.notStrictEqual(1, 2);
+ * // OK
+ *
+ * assert.notStrictEqual(1, 1);
+ * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to:
+ * //
+ * // 1
+ *
+ * assert.notStrictEqual(1, '1');
+ * // OK
+ * ```
+ *
+ * If the values are strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
+ * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Tests for deep equality between the `actual` and `expected` parameters.
+ * "Deep" equality means that the enumerable "own" properties of child objects
+ * are recursively evaluated also by the following rules.
+ * @since v1.2.0
+ */
+ function deepStrictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+ /**
+ * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
+ * // OK
+ * ```
+ *
+ * If the values are deeply and strictly equal, an `AssertionError` is thrown
+ * with a `message` property set equal to the value of the `message` parameter. If
+ * the `message` parameter is undefined, a default error message is assigned. If
+ * the `message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v1.2.0
+ */
+ function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Expects the function `fn` to throw an error.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+ * a validation object where each property will be tested for strict deep equality,
+ * or an instance of error where each property will be tested for strict deep
+ * equality including the non-enumerable `message` and `name` properties. When
+ * using an object, it is also possible to use a regular expression, when
+ * validating against a string property. See below for examples.
+ *
+ * If specified, `message` will be appended to the message provided by the`AssertionError` if the `fn` call fails to throw or in case the error validation
+ * fails.
+ *
+ * Custom validation object/error instance:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * const err = new TypeError('Wrong value');
+ * err.code = 404;
+ * err.foo = 'bar';
+ * err.info = {
+ * nested: true,
+ * baz: 'text',
+ * };
+ * err.reg = /abc/i;
+ *
+ * assert.throws(
+ * () => {
+ * throw err;
+ * },
+ * {
+ * name: 'TypeError',
+ * message: 'Wrong value',
+ * info: {
+ * nested: true,
+ * baz: 'text',
+ * },
+ * // Only properties on the validation object will be tested for.
+ * // Using nested objects requires all properties to be present. Otherwise
+ * // the validation is going to fail.
+ * },
+ * );
+ *
+ * // Using regular expressions to validate error properties:
+ * assert.throws(
+ * () => {
+ * throw err;
+ * },
+ * {
+ * // The `name` and `message` properties are strings and using regular
+ * // expressions on those will match against the string. If they fail, an
+ * // error is thrown.
+ * name: /^TypeError$/,
+ * message: /Wrong/,
+ * foo: 'bar',
+ * info: {
+ * nested: true,
+ * // It is not possible to use regular expressions for nested properties!
+ * baz: 'text',
+ * },
+ * // The `reg` property contains a regular expression and only if the
+ * // validation object contains an identical regular expression, it is going
+ * // to pass.
+ * reg: /abc/i,
+ * },
+ * );
+ *
+ * // Fails due to the different `message` and `name` properties:
+ * assert.throws(
+ * () => {
+ * const otherErr = new Error('Not found');
+ * // Copy all enumerable properties from `err` to `otherErr`.
+ * for (const [key, value] of Object.entries(err)) {
+ * otherErr[key] = value;
+ * }
+ * throw otherErr;
+ * },
+ * // The error's `message` and `name` properties will also be checked when using
+ * // an error as validation object.
+ * err,
+ * );
+ * ```
+ *
+ * Validate instanceof using constructor:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * Error,
+ * );
+ * ```
+ *
+ * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions):
+ *
+ * Using a regular expression runs `.toString` on the error object, and will
+ * therefore also include the error name.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * /^Error: Wrong value$/,
+ * );
+ * ```
+ *
+ * Custom error validation:
+ *
+ * The function must return `true` to indicate all internal validations passed.
+ * It will otherwise fail with an `AssertionError`.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * (err) => {
+ * assert(err instanceof Error);
+ * assert(/value/.test(err));
+ * // Avoid returning anything from validation functions besides `true`.
+ * // Otherwise, it's not clear what part of the validation failed. Instead,
+ * // throw an error about the specific validation that failed (as done in this
+ * // example) and add as much helpful debugging information to that error as
+ * // possible.
+ * return true;
+ * },
+ * 'unexpected error',
+ * );
+ * ```
+ *
+ * `error` cannot be a string. If a string is provided as the second
+ * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Using the same
+ * message as the thrown error message is going to result in an`ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
+ * a string as the second argument gets considered:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * function throwingFirst() {
+ * throw new Error('First');
+ * }
+ *
+ * function throwingSecond() {
+ * throw new Error('Second');
+ * }
+ *
+ * function notThrowing() {}
+ *
+ * // The second argument is a string and the input function threw an Error.
+ * // The first case will not throw as it does not match for the error message
+ * // thrown by the input function!
+ * assert.throws(throwingFirst, 'Second');
+ * // In the next example the message has no benefit over the message from the
+ * // error and since it is not clear if the user intended to actually match
+ * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error.
+ * assert.throws(throwingSecond, 'Second');
+ * // TypeError [ERR_AMBIGUOUS_ARGUMENT]
+ *
+ * // The string is only used (as message) in case the function does not throw:
+ * assert.throws(notThrowing, 'Second');
+ * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second
+ *
+ * // If it was intended to match for the error message do this instead:
+ * // It does not throw because the error messages match.
+ * assert.throws(throwingSecond, /Second$/);
+ *
+ * // If the error message does not match, an AssertionError is thrown.
+ * assert.throws(throwingFirst, /Second$/);
+ * // AssertionError [ERR_ASSERTION]
+ * ```
+ *
+ * Due to the confusing error-prone notation, avoid a string as the second
+ * argument.
+ * @since v0.1.21
+ */
+ function throws(block: () => unknown, message?: string | Error): void;
+ function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+ /**
+ * Asserts that the function `fn` does not throw an error.
+ *
+ * Using `assert.doesNotThrow()` is actually not useful because there
+ * is no benefit in catching an error and then rethrowing it. Instead, consider
+ * adding a comment next to the specific code path that should not throw and keep
+ * error messages as expressive as possible.
+ *
+ * When `assert.doesNotThrow()` is called, it will immediately call the `fn`function.
+ *
+ * If an error is thrown and it is the same type as that specified by the `error`parameter, then an `AssertionError` is thrown. If the error is of a
+ * different type, or if the `error` parameter is undefined, the error is
+ * propagated back to the caller.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
+ * function. See {@link throws} for more details.
+ *
+ * The following, for instance, will throw the `TypeError` because there is no
+ * matching error type in the assertion:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * SyntaxError,
+ * );
+ * ```
+ *
+ * However, the following will result in an `AssertionError` with the message
+ * 'Got unwanted exception...':
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * TypeError,
+ * );
+ * ```
+ *
+ * If an `AssertionError` is thrown and a value is provided for the `message`parameter, the value of `message` will be appended to the `AssertionError` message:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * /Wrong value/,
+ * 'Whoops',
+ * );
+ * // Throws: AssertionError: Got unwanted exception: Whoops
+ * ```
+ * @since v0.1.21
+ */
+ function doesNotThrow(block: () => unknown, message?: string | Error): void;
+ function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+ /**
+ * Throws `value` if `value` is not `undefined` or `null`. This is useful when
+ * testing the `error` argument in callbacks. The stack trace contains all frames
+ * from the error passed to `ifError()` including the potential new frames for`ifError()` itself.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.ifError(null);
+ * // OK
+ * assert.ifError(0);
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0
+ * assert.ifError('error');
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error'
+ * assert.ifError(new Error());
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error
+ *
+ * // Create some random error frames.
+ * let err;
+ * (function errorFrame() {
+ * err = new Error('test error');
+ * })();
+ *
+ * (function ifErrorFrame() {
+ * assert.ifError(err);
+ * })();
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error
+ * // at ifErrorFrame
+ * // at errorFrame
+ * ```
+ * @since v0.1.97
+ */
+ function ifError(value: unknown): asserts value is null | undefined;
+ /**
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+ * calls the function and awaits the returned promise to complete. It will then
+ * check that the promise is rejected.
+ *
+ * If `asyncFn` is a function and it throws an error synchronously,`assert.rejects()` will return a rejected `Promise` with that error. If the
+ * function does not return a promise, `assert.rejects()` will return a rejected`Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases the error
+ * handler is skipped.
+ *
+ * Besides the async nature to await the completion behaves identically to {@link throws}.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+ * an object where each property will be tested for, or an instance of error where
+ * each property will be tested for including the non-enumerable `message` and`name` properties.
+ *
+ * If specified, `message` will be the message provided by the `AssertionError` if the `asyncFn` fails to reject.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * await assert.rejects(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * {
+ * name: 'TypeError',
+ * message: 'Wrong value',
+ * },
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * await assert.rejects(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * (err) => {
+ * assert.strictEqual(err.name, 'TypeError');
+ * assert.strictEqual(err.message, 'Wrong value');
+ * return true;
+ * },
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.rejects(
+ * Promise.reject(new Error('Wrong value')),
+ * Error,
+ * ).then(() => {
+ * // ...
+ * });
+ * ```
+ *
+ * `error` cannot be a string. If a string is provided as the second
+ * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Please read the
+ * example in {@link throws} carefully if using a string as the second
+ * argument gets considered.
+ * @since v10.0.0
+ */
+ function rejects(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
+ function rejects(block: (() => Promise<unknown>) | Promise<unknown>, error: AssertPredicate, message?: string | Error): Promise<void>;
+ /**
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+ * calls the function and awaits the returned promise to complete. It will then
+ * check that the promise is not rejected.
+ *
+ * If `asyncFn` is a function and it throws an error synchronously,`assert.doesNotReject()` will return a rejected `Promise` with that error. If
+ * the function does not return a promise, `assert.doesNotReject()` will return a
+ * rejected `Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases
+ * the error handler is skipped.
+ *
+ * Using `assert.doesNotReject()` is actually not useful because there is little
+ * benefit in catching a rejection and then rejecting it again. Instead, consider
+ * adding a comment next to the specific code path that should not reject and keep
+ * error messages as expressive as possible.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
+ * function. See {@link throws} for more details.
+ *
+ * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * await assert.doesNotReject(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * SyntaxError,
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
+ * .then(() => {
+ * // ...
+ * });
+ * ```
+ * @since v10.0.0
+ */
+ function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
+ function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, error: AssertPredicate, message?: string | Error): Promise<void>;
+ /**
+ * Expects the `string` input to match the regular expression.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.match('I will fail', /pass/);
+ * // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
+ *
+ * assert.match(123, /pass/);
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+ *
+ * assert.match('I will pass', /pass/);
+ * // OK
+ * ```
+ *
+ * If the values do not match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
+ * to the value of the `message` parameter. If the `message` parameter is
+ * undefined, a default error message is assigned. If the `message` parameter is an
+ * instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * @since v13.6.0, v12.16.0
+ */
+ function match(value: string, regExp: RegExp, message?: string | Error): void;
+ /**
+ * Expects the `string` input not to match the regular expression.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotMatch('I will fail', /fail/);
+ * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ...
+ *
+ * assert.doesNotMatch(123, /pass/);
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+ *
+ * assert.doesNotMatch('I will pass', /different/);
+ * // OK
+ * ```
+ *
+ * If the values do match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
+ * to the value of the `message` parameter. If the `message` parameter is
+ * undefined, a default error message is assigned. If the `message` parameter is an
+ * instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * @since v13.6.0, v12.16.0
+ */
+ function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
+ const strict: Omit<typeof assert, 'equal' | 'notEqual' | 'deepEqual' | 'notDeepEqual' | 'ok' | 'strictEqual' | 'deepStrictEqual' | 'ifError' | 'strict'> & {
+ (value: unknown, message?: string | Error): asserts value;
+ equal: typeof strictEqual;
+ notEqual: typeof notStrictEqual;
+ deepEqual: typeof deepStrictEqual;
+ notDeepEqual: typeof notDeepStrictEqual;
+ // Mapped types and assertion functions are incompatible?
+ // TS2775: Assertions require every name in the call target
+ // to be declared with an explicit type annotation.
+ ok: typeof ok;
+ strictEqual: typeof strictEqual;
+ deepStrictEqual: typeof deepStrictEqual;
+ ifError: typeof ifError;
+ strict: typeof strict;
+ };
+ }
+ export = assert;
+}
+declare module 'node:assert' {
+ import assert = require('assert');
+ export = assert;
+}
diff --git a/node_modules/@types/node/ts4.8/assert/strict.d.ts b/node_modules/@types/node/ts4.8/assert/strict.d.ts
new file mode 100755
index 0000000..b4319b9
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/assert/strict.d.ts
@@ -0,0 +1,8 @@
+declare module 'assert/strict' {
+ import { strict } from 'node:assert';
+ export = strict;
+}
+declare module 'node:assert/strict' {
+ import { strict } from 'node:assert';
+ export = strict;
+}
diff --git a/node_modules/@types/node/ts4.8/async_hooks.d.ts b/node_modules/@types/node/ts4.8/async_hooks.d.ts
new file mode 100755
index 0000000..e994f02
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/async_hooks.d.ts
@@ -0,0 +1,530 @@
+/**
+ * We strongly discourage the use of the `async_hooks` API.
+ * Other APIs that can cover most of its use cases include:
+ *
+ * * `AsyncLocalStorage` tracks async context
+ * * `process.getActiveResourcesInfo()` tracks active resources
+ *
+ * The `node:async_hooks` module provides an API to track asynchronous resources.
+ * It can be accessed using:
+ *
+ * ```js
+ * import async_hooks from 'node:async_hooks';
+ * ```
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/async_hooks.js)
+ */
+declare module 'async_hooks' {
+ /**
+ * ```js
+ * import { executionAsyncId } from 'node:async_hooks';
+ * import fs from 'node:fs';
+ *
+ * console.log(executionAsyncId()); // 1 - bootstrap
+ * fs.open(path, 'r', (err, fd) => {
+ * console.log(executionAsyncId()); // 6 - open()
+ * });
+ * ```
+ *
+ * The ID returned from `executionAsyncId()` is related to execution timing, not
+ * causality (which is covered by `triggerAsyncId()`):
+ *
+ * ```js
+ * const server = net.createServer((conn) => {
+ * // Returns the ID of the server, not of the new connection, because the
+ * // callback runs in the execution scope of the server's MakeCallback().
+ * async_hooks.executionAsyncId();
+ *
+ * }).listen(port, () => {
+ * // Returns the ID of a TickObject (process.nextTick()) because all
+ * // callbacks passed to .listen() are wrapped in a nextTick().
+ * async_hooks.executionAsyncId();
+ * });
+ * ```
+ *
+ * Promise contexts may not get precise `executionAsyncIds` by default.
+ * See the section on `promise execution tracking`.
+ * @since v8.1.0
+ * @return The `asyncId` of the current execution context. Useful to track when something calls.
+ */
+ function executionAsyncId(): number;
+ /**
+ * Resource objects returned by `executionAsyncResource()` are most often internal
+ * Node.js handle objects with undocumented APIs. Using any functions or properties
+ * on the object is likely to crash your application and should be avoided.
+ *
+ * Using `executionAsyncResource()` in the top-level execution context will
+ * return an empty object as there is no handle or request object to use,
+ * but having an object representing the top-level can be helpful.
+ *
+ * ```js
+ * import { open } from 'node:fs';
+ * import { executionAsyncId, executionAsyncResource } from 'node:async_hooks';
+ *
+ * console.log(executionAsyncId(), executionAsyncResource()); // 1 {}
+ * open(new URL(import.meta.url), 'r', (err, fd) => {
+ * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap
+ * });
+ * ```
+ *
+ * This can be used to implement continuation local storage without the
+ * use of a tracking `Map` to store the metadata:
+ *
+ * ```js
+ * import { createServer } from 'node:http';
+ * import {
+ * executionAsyncId,
+ * executionAsyncResource,
+ * createHook,
+ * } from 'async_hooks';
+ * const sym = Symbol('state'); // Private symbol to avoid pollution
+ *
+ * createHook({
+ * init(asyncId, type, triggerAsyncId, resource) {
+ * const cr = executionAsyncResource();
+ * if (cr) {
+ * resource[sym] = cr[sym];
+ * }
+ * },
+ * }).enable();
+ *
+ * const server = createServer((req, res) => {
+ * executionAsyncResource()[sym] = { state: req.url };
+ * setTimeout(function() {
+ * res.end(JSON.stringify(executionAsyncResource()[sym]));
+ * }, 100);
+ * }).listen(3000);
+ * ```
+ * @since v13.9.0, v12.17.0
+ * @return The resource representing the current execution. Useful to store data within the resource.
+ */
+ function executionAsyncResource(): object;
+ /**
+ * ```js
+ * const server = net.createServer((conn) => {
+ * // The resource that caused (or triggered) this callback to be called
+ * // was that of the new connection. Thus the return value of triggerAsyncId()
+ * // is the asyncId of "conn".
+ * async_hooks.triggerAsyncId();
+ *
+ * }).listen(port, () => {
+ * // Even though all callbacks passed to .listen() are wrapped in a nextTick()
+ * // the callback itself exists because the call to the server's .listen()
+ * // was made. So the return value would be the ID of the server.
+ * async_hooks.triggerAsyncId();
+ * });
+ * ```
+ *
+ * Promise contexts may not get valid `triggerAsyncId`s by default. See
+ * the section on `promise execution tracking`.
+ * @return The ID of the resource responsible for calling the callback that is currently being executed.
+ */
+ function triggerAsyncId(): number;
+ interface HookCallbacks {
+ /**
+ * Called when a class is constructed that has the possibility to emit an asynchronous event.
+ * @param asyncId a unique ID for the async resource
+ * @param type the type of the async resource
+ * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
+ * @param resource reference to the resource representing the async operation, needs to be released during destroy
+ */
+ init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
+ /**
+ * When an asynchronous operation is initiated or completes a callback is called to notify the user.
+ * The before callback is called just before said callback is executed.
+ * @param asyncId the unique identifier assigned to the resource about to execute the callback.
+ */
+ before?(asyncId: number): void;
+ /**
+ * Called immediately after the callback specified in before is completed.
+ * @param asyncId the unique identifier assigned to the resource which has executed the callback.
+ */
+ after?(asyncId: number): void;
+ /**
+ * Called when a promise has resolve() called. This may not be in the same execution id
+ * as the promise itself.
+ * @param asyncId the unique id for the promise that was resolve()d.
+ */
+ promiseResolve?(asyncId: number): void;
+ /**
+ * Called after the resource corresponding to asyncId is destroyed
+ * @param asyncId a unique ID for the async resource
+ */
+ destroy?(asyncId: number): void;
+ }
+ interface AsyncHook {
+ /**
+ * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
+ */
+ enable(): this;
+ /**
+ * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
+ */
+ disable(): this;
+ }
+ /**
+ * Registers functions to be called for different lifetime events of each async
+ * operation.
+ *
+ * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the
+ * respective asynchronous event during a resource's lifetime.
+ *
+ * All callbacks are optional. For example, if only resource cleanup needs to
+ * be tracked, then only the `destroy` callback needs to be passed. The
+ * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section.
+ *
+ * ```js
+ * import { createHook } from 'node:async_hooks';
+ *
+ * const asyncHook = createHook({
+ * init(asyncId, type, triggerAsyncId, resource) { },
+ * destroy(asyncId) { },
+ * });
+ * ```
+ *
+ * The callbacks will be inherited via the prototype chain:
+ *
+ * ```js
+ * class MyAsyncCallbacks {
+ * init(asyncId, type, triggerAsyncId, resource) { }
+ * destroy(asyncId) {}
+ * }
+ *
+ * class MyAddedCallbacks extends MyAsyncCallbacks {
+ * before(asyncId) { }
+ * after(asyncId) { }
+ * }
+ *
+ * const asyncHook = async_hooks.createHook(new MyAddedCallbacks());
+ * ```
+ *
+ * Because promises are asynchronous resources whose lifecycle is tracked
+ * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises.
+ * @since v8.1.0
+ * @param callbacks The `Hook Callbacks` to register
+ * @return Instance used for disabling and enabling hooks
+ */
+ function createHook(callbacks: HookCallbacks): AsyncHook;
+ interface AsyncResourceOptions {
+ /**
+ * The ID of the execution context that created this async event.
+ * @default executionAsyncId()
+ */
+ triggerAsyncId?: number | undefined;
+ /**
+ * Disables automatic `emitDestroy` when the object is garbage collected.
+ * This usually does not need to be set (even if `emitDestroy` is called
+ * manually), unless the resource's `asyncId` is retrieved and the
+ * sensitive API's `emitDestroy` is called with it.
+ * @default false
+ */
+ requireManualDestroy?: boolean | undefined;
+ }
+ /**
+ * The class `AsyncResource` is designed to be extended by the embedder's async
+ * resources. Using this, users can easily trigger the lifetime events of their
+ * own resources.
+ *
+ * The `init` hook will trigger when an `AsyncResource` is instantiated.
+ *
+ * The following is an overview of the `AsyncResource` API.
+ *
+ * ```js
+ * import { AsyncResource, executionAsyncId } from 'node:async_hooks';
+ *
+ * // AsyncResource() is meant to be extended. Instantiating a
+ * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * // async_hook.executionAsyncId() is used.
+ * const asyncResource = new AsyncResource(
+ * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false },
+ * );
+ *
+ * // Run a function in the execution context of the resource. This will
+ * // * establish the context of the resource
+ * // * trigger the AsyncHooks before callbacks
+ * // * call the provided function `fn` with the supplied arguments
+ * // * trigger the AsyncHooks after callbacks
+ * // * restore the original execution context
+ * asyncResource.runInAsyncScope(fn, thisArg, ...args);
+ *
+ * // Call AsyncHooks destroy callbacks.
+ * asyncResource.emitDestroy();
+ *
+ * // Return the unique ID assigned to the AsyncResource instance.
+ * asyncResource.asyncId();
+ *
+ * // Return the trigger ID for the AsyncResource instance.
+ * asyncResource.triggerAsyncId();
+ * ```
+ */
+ class AsyncResource {
+ /**
+ * AsyncResource() is meant to be extended. Instantiating a
+ * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * async_hook.executionAsyncId() is used.
+ * @param type The type of async event.
+ * @param triggerAsyncId The ID of the execution context that created
+ * this async event (default: `executionAsyncId()`), or an
+ * AsyncResourceOptions object (since v9.3.0)
+ */
+ constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);
+ /**
+ * Binds the given function to the current execution context.
+ * @since v14.8.0, v12.19.0
+ * @param fn The function to bind to the current execution context.
+ * @param type An optional name to associate with the underlying `AsyncResource`.
+ */
+ static bind<Func extends (this: ThisArg, ...args: any[]) => any, ThisArg>(fn: Func, type?: string, thisArg?: ThisArg): Func;
+ /**
+ * Binds the given function to execute to this `AsyncResource`'s scope.
+ * @since v14.8.0, v12.19.0
+ * @param fn The function to bind to the current `AsyncResource`.
+ */
+ bind<Func extends (...args: any[]) => any>(fn: Func): Func;
+ /**
+ * Call the provided function with the provided arguments in the execution context
+ * of the async resource. This will establish the context, trigger the AsyncHooks
+ * before callbacks, call the function, trigger the AsyncHooks after callbacks, and
+ * then restore the original execution context.
+ * @since v9.6.0
+ * @param fn The function to call in the execution context of this async resource.
+ * @param thisArg The receiver to be used for the function call.
+ * @param args Optional arguments to pass to the function.
+ */
+ runInAsyncScope<This, Result>(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
+ /**
+ * Call all `destroy` hooks. This should only ever be called once. An error will
+ * be thrown if it is called more than once. This **must** be manually called. If
+ * the resource is left to be collected by the GC then the `destroy` hooks will
+ * never be called.
+ * @return A reference to `asyncResource`.
+ */
+ emitDestroy(): this;
+ /**
+ * @return The unique `asyncId` assigned to the resource.
+ */
+ asyncId(): number;
+ /**
+ *
+ * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor.
+ */
+ triggerAsyncId(): number;
+ }
+ /**
+ * This class creates stores that stay coherent through asynchronous operations.
+ *
+ * While you can create your own implementation on top of the `node:async_hooks`module, `AsyncLocalStorage` should be preferred as it is a performant and memory
+ * safe implementation that involves significant optimizations that are non-obvious
+ * to implement.
+ *
+ * The following example uses `AsyncLocalStorage` to build a simple logger
+ * that assigns IDs to incoming HTTP requests and includes them in messages
+ * logged within each request.
+ *
+ * ```js
+ * import http from 'node:http';
+ * import { AsyncLocalStorage } from 'node:async_hooks';
+ *
+ * const asyncLocalStorage = new AsyncLocalStorage();
+ *
+ * function logWithId(msg) {
+ * const id = asyncLocalStorage.getStore();
+ * console.log(`${id !== undefined ? id : '-'}:`, msg);
+ * }
+ *
+ * let idSeq = 0;
+ * http.createServer((req, res) => {
+ * asyncLocalStorage.run(idSeq++, () => {
+ * logWithId('start');
+ * // Imagine any chain of async operations here
+ * setImmediate(() => {
+ * logWithId('finish');
+ * res.end();
+ * });
+ * });
+ * }).listen(8080);
+ *
+ * http.get('http://localhost:8080');
+ * http.get('http://localhost:8080');
+ * // Prints:
+ * // 0: start
+ * // 1: start
+ * // 0: finish
+ * // 1: finish
+ * ```
+ *
+ * Each instance of `AsyncLocalStorage` maintains an independent storage context.
+ * Multiple instances can safely exist simultaneously without risk of interfering
+ * with each other's data.
+ * @since v13.10.0, v12.17.0
+ */
+ class AsyncLocalStorage<T> {
+ /**
+ * Binds the given function to the current execution context.
+ * @since v19.8.0
+ * @experimental
+ * @param fn The function to bind to the current execution context.
+ * @return A new function that calls `fn` within the captured execution context.
+ */
+ static bind<Func extends (...args: any[]) => any>(fn: Func): Func;
+ /**
+ * Captures the current execution context and returns a function that accepts a
+ * function as an argument. Whenever the returned function is called, it
+ * calls the function passed to it within the captured context.
+ *
+ * ```js
+ * const asyncLocalStorage = new AsyncLocalStorage();
+ * const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot());
+ * const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore()));
+ * console.log(result); // returns 123
+ * ```
+ *
+ * AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple
+ * async context tracking purposes, for example:
+ *
+ * ```js
+ * class Foo {
+ * #runInAsyncScope = AsyncLocalStorage.snapshot();
+ *
+ * get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); }
+ * }
+ *
+ * const foo = asyncLocalStorage.run(123, () => new Foo());
+ * console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123
+ * ```
+ * @since v19.8.0
+ * @experimental
+ * @return A new function with the signature `(fn: (...args) : R, ...args) : R`.
+ */
+ static snapshot(): <R, TArgs extends any[]>(fn: (...args: TArgs) => R, ...args: TArgs) => R;
+ /**
+ * Disables the instance of `AsyncLocalStorage`. All subsequent calls
+ * to `asyncLocalStorage.getStore()` will return `undefined` until`asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
+ *
+ * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
+ * instance will be exited.
+ *
+ * Calling `asyncLocalStorage.disable()` is required before the`asyncLocalStorage` can be garbage collected. This does not apply to stores
+ * provided by the `asyncLocalStorage`, as those objects are garbage collected
+ * along with the corresponding async resources.
+ *
+ * Use this method when the `asyncLocalStorage` is not in use anymore
+ * in the current process.
+ * @since v13.10.0, v12.17.0
+ * @experimental
+ */
+ disable(): void;
+ /**
+ * Returns the current store.
+ * If called outside of an asynchronous context initialized by
+ * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it
+ * returns `undefined`.
+ * @since v13.10.0, v12.17.0
+ */
+ getStore(): T | undefined;
+ /**
+ * Runs a function synchronously within a context and returns its
+ * return value. The store is not accessible outside of the callback function.
+ * The store is accessible to any asynchronous operations created within the
+ * callback.
+ *
+ * The optional `args` are passed to the callback function.
+ *
+ * If the callback function throws an error, the error is thrown by `run()` too.
+ * The stacktrace is not impacted by this call and the context is exited.
+ *
+ * Example:
+ *
+ * ```js
+ * const store = { id: 2 };
+ * try {
+ * asyncLocalStorage.run(store, () => {
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * setTimeout(() => {
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * }, 200);
+ * throw new Error();
+ * });
+ * } catch (e) {
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * // The error will be caught here
+ * }
+ * ```
+ * @since v13.10.0, v12.17.0
+ */
+ run<R, TArgs extends any[]>(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;
+ /**
+ * Runs a function synchronously outside of a context and returns its
+ * return value. The store is not accessible within the callback function or
+ * the asynchronous operations created within the callback. Any `getStore()`call done within the callback function will always return `undefined`.
+ *
+ * The optional `args` are passed to the callback function.
+ *
+ * If the callback function throws an error, the error is thrown by `exit()` too.
+ * The stacktrace is not impacted by this call and the context is re-entered.
+ *
+ * Example:
+ *
+ * ```js
+ * // Within a call to run
+ * try {
+ * asyncLocalStorage.getStore(); // Returns the store object or value
+ * asyncLocalStorage.exit(() => {
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * throw new Error();
+ * });
+ * } catch (e) {
+ * asyncLocalStorage.getStore(); // Returns the same object or value
+ * // The error will be caught here
+ * }
+ * ```
+ * @since v13.10.0, v12.17.0
+ * @experimental
+ */
+ exit<R, TArgs extends any[]>(callback: (...args: TArgs) => R, ...args: TArgs): R;
+ /**
+ * Transitions into the context for the remainder of the current
+ * synchronous execution and then persists the store through any following
+ * asynchronous calls.
+ *
+ * Example:
+ *
+ * ```js
+ * const store = { id: 1 };
+ * // Replaces previous store with the given store object
+ * asyncLocalStorage.enterWith(store);
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * someAsyncOperation(() => {
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * });
+ * ```
+ *
+ * This transition will continue for the _entire_ synchronous execution.
+ * This means that if, for example, the context is entered within an event
+ * handler subsequent event handlers will also run within that context unless
+ * specifically bound to another context with an `AsyncResource`. That is why`run()` should be preferred over `enterWith()` unless there are strong reasons
+ * to use the latter method.
+ *
+ * ```js
+ * const store = { id: 1 };
+ *
+ * emitter.on('my-event', () => {
+ * asyncLocalStorage.enterWith(store);
+ * });
+ * emitter.on('my-event', () => {
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * });
+ *
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * emitter.emit('my-event');
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * ```
+ * @since v13.11.0, v12.17.0
+ * @experimental
+ */
+ enterWith(store: T): void;
+ }
+}
+declare module 'node:async_hooks' {
+ export * from 'async_hooks';
+}
diff --git a/node_modules/@types/node/ts4.8/buffer.d.ts b/node_modules/@types/node/ts4.8/buffer.d.ts
new file mode 100755
index 0000000..86694b0
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/buffer.d.ts
@@ -0,0 +1,2354 @@
+/**
+ * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many
+ * Node.js APIs support `Buffer`s.
+ *
+ * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and
+ * extends it with methods that cover additional use cases. Node.js APIs accept
+ * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well.
+ *
+ * While the `Buffer` class is available within the global scope, it is still
+ * recommended to explicitly reference it via an import or require statement.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Creates a zero-filled Buffer of length 10.
+ * const buf1 = Buffer.alloc(10);
+ *
+ * // Creates a Buffer of length 10,
+ * // filled with bytes which all have the value `1`.
+ * const buf2 = Buffer.alloc(10, 1);
+ *
+ * // Creates an uninitialized buffer of length 10.
+ * // This is faster than calling Buffer.alloc() but the returned
+ * // Buffer instance might contain old data that needs to be
+ * // overwritten using fill(), write(), or other functions that fill the Buffer's
+ * // contents.
+ * const buf3 = Buffer.allocUnsafe(10);
+ *
+ * // Creates a Buffer containing the bytes [1, 2, 3].
+ * const buf4 = Buffer.from([1, 2, 3]);
+ *
+ * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries
+ * // are all truncated using `(value &#x26; 255)` to fit into the range 0–255.
+ * const buf5 = Buffer.from([257, 257.5, -255, '1']);
+ *
+ * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést':
+ * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation)
+ * // [116, 195, 169, 115, 116] (in decimal notation)
+ * const buf6 = Buffer.from('tést');
+ *
+ * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
+ * const buf7 = Buffer.from('tést', 'latin1');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/buffer.js)
+ */
+declare module 'buffer' {
+ import { BinaryLike } from 'node:crypto';
+ import { ReadableStream as WebReadableStream } from 'node:stream/web';
+ /**
+ * This function returns `true` if `input` contains only valid UTF-8-encoded data,
+ * including the case in which `input` is empty.
+ *
+ * Throws if the `input` is a detached array buffer.
+ * @since v19.4.0, v18.14.0
+ * @param input The input to validate.
+ */
+ export function isUtf8(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean;
+ /**
+ * This function returns `true` if `input` contains only valid ASCII-encoded data,
+ * including the case in which `input` is empty.
+ *
+ * Throws if the `input` is a detached array buffer.
+ * @since v19.6.0, v18.15.0
+ * @param input The input to validate.
+ */
+ export function isAscii(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean;
+ export const INSPECT_MAX_BYTES: number;
+ export const kMaxLength: number;
+ export const kStringMaxLength: number;
+ export const constants: {
+ MAX_LENGTH: number;
+ MAX_STRING_LENGTH: number;
+ };
+ export type TranscodeEncoding = 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'latin1' | 'binary';
+ /**
+ * Re-encodes the given `Buffer` or `Uint8Array` instance from one character
+ * encoding to another. Returns a new `Buffer` instance.
+ *
+ * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if
+ * conversion from `fromEnc` to `toEnc` is not permitted.
+ *
+ * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`,`'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`.
+ *
+ * The transcoding process will use substitution characters if a given byte
+ * sequence cannot be adequately represented in the target encoding. For instance:
+ *
+ * ```js
+ * import { Buffer, transcode } from 'node:buffer';
+ *
+ * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii');
+ * console.log(newBuf.toString('ascii'));
+ * // Prints: '?'
+ * ```
+ *
+ * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced
+ * with `?` in the transcoded `Buffer`.
+ * @since v7.1.0
+ * @param source A `Buffer` or `Uint8Array` instance.
+ * @param fromEnc The current encoding.
+ * @param toEnc To target encoding.
+ */
+ export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
+ export const SlowBuffer: {
+ /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
+ new (size: number): Buffer;
+ prototype: Buffer;
+ };
+ /**
+ * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using
+ * a prior call to `URL.createObjectURL()`.
+ * @since v16.7.0
+ * @experimental
+ * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
+ */
+ export function resolveObjectURL(id: string): Blob | undefined;
+ export { Buffer };
+ /**
+ * @experimental
+ */
+ export interface BlobOptions {
+ /**
+ * @default 'utf8'
+ */
+ encoding?: BufferEncoding | undefined;
+ /**
+ * The Blob content-type. The intent is for `type` to convey
+ * the MIME media type of the data, however no validation of the type format
+ * is performed.
+ */
+ type?: string | undefined;
+ }
+ /**
+ * A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across
+ * multiple worker threads.
+ * @since v15.7.0, v14.18.0
+ */
+ export class Blob {
+ /**
+ * The total size of the `Blob` in bytes.
+ * @since v15.7.0, v14.18.0
+ */
+ readonly size: number;
+ /**
+ * The content-type of the `Blob`.
+ * @since v15.7.0, v14.18.0
+ */
+ readonly type: string;
+ /**
+ * Creates a new `Blob` object containing a concatenation of the given sources.
+ *
+ * {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into
+ * the 'Blob' and can therefore be safely modified after the 'Blob' is created.
+ *
+ * String sources are also copied into the `Blob`.
+ */
+ constructor(sources: Array<BinaryLike | Blob>, options?: BlobOptions);
+ /**
+ * Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
+ * the `Blob` data.
+ * @since v15.7.0, v14.18.0
+ */
+ arrayBuffer(): Promise<ArrayBuffer>;
+ /**
+ * Creates and returns a new `Blob` containing a subset of this `Blob` objects
+ * data. The original `Blob` is not altered.
+ * @since v15.7.0, v14.18.0
+ * @param start The starting index.
+ * @param end The ending index.
+ * @param type The content-type for the new `Blob`
+ */
+ slice(start?: number, end?: number, type?: string): Blob;
+ /**
+ * Returns a promise that fulfills with the contents of the `Blob` decoded as a
+ * UTF-8 string.
+ * @since v15.7.0, v14.18.0
+ */
+ text(): Promise<string>;
+ /**
+ * Returns a new `ReadableStream` that allows the content of the `Blob` to be read.
+ * @since v16.7.0
+ */
+ stream(): WebReadableStream;
+ }
+ export interface FileOptions {
+ /**
+ * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts will be
+ * converted to the platform native line-ending as specified by `require('node:os').EOL`.
+ */
+ endings?: 'native' | 'transparent';
+ /** The File content-type. */
+ type?: string;
+ /** The last modified date of the file. `Default`: Date.now(). */
+ lastModified?: number;
+ }
+ /**
+ * A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files.
+ * @since v19.2.0, v18.13.0
+ */
+ export class File extends Blob {
+ constructor(sources: Array<BinaryLike | Blob>, fileName: string, options?: FileOptions);
+ /**
+ * The name of the `File`.
+ * @since v19.2.0, v18.13.0
+ */
+ readonly name: string;
+ /**
+ * The last modified date of the `File`.
+ * @since v19.2.0, v18.13.0
+ */
+ readonly lastModified: number;
+ }
+ export import atob = globalThis.atob;
+ export import btoa = globalThis.btoa;
+ import { Blob as NodeBlob } from 'buffer';
+ // This conditional type will be the existing global Blob in a browser, or
+ // the copy below in a Node environment.
+ type __Blob = typeof globalThis extends { onmessage: any; Blob: infer T } ? T : NodeBlob;
+ global {
+ namespace NodeJS {
+ export { BufferEncoding };
+ }
+ // Buffer class
+ type BufferEncoding =
+ | 'ascii'
+ | 'utf8'
+ | 'utf-8'
+ | 'utf16le'
+ | 'ucs2'
+ | 'ucs-2'
+ | 'base64'
+ | 'base64url'
+ | 'latin1'
+ | 'binary'
+ | 'hex';
+ type WithImplicitCoercion<T> =
+ | T
+ | {
+ valueOf(): T;
+ };
+ /**
+ * Raw data is stored in instances of the Buffer class.
+ * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
+ * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
+ */
+ interface BufferConstructor {
+ /**
+ * Allocates a new buffer containing the given {str}.
+ *
+ * @param str String to store in buffer.
+ * @param encoding encoding to use, optional. Default is 'utf8'
+ * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
+ */
+ new (str: string, encoding?: BufferEncoding): Buffer;
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
+ */
+ new (size: number): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ new (array: Uint8Array): Buffer;
+ /**
+ * Produces a Buffer backed by the same allocated memory as
+ * the given {ArrayBuffer}/{SharedArrayBuffer}.
+ *
+ *
+ * @param arrayBuffer The ArrayBuffer with which to share memory.
+ * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
+ */
+ new (arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ new (array: ReadonlyArray<any>): Buffer;
+ /**
+ * Copies the passed {buffer} data onto a new {Buffer} instance.
+ *
+ * @param buffer The buffer to copy.
+ * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
+ */
+ new (buffer: Buffer): Buffer;
+ /**
+ * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
+ * Array entries outside that range will be truncated to fit into it.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'.
+ * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
+ * ```
+ *
+ * If `array` is an `Array`\-like object (that is, one with a `length` property of
+ * type `number`), it is treated as if it is an array, unless it is a `Buffer` or
+ * a `Uint8Array`. This means all other `TypedArray` variants get treated as an`Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use `Buffer.copyBytesFrom()`.
+ *
+ * A `TypeError` will be thrown if `array` is not an `Array` or another type
+ * appropriate for `Buffer.from()` variants.
+ *
+ * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal`Buffer` pool like `Buffer.allocUnsafe()` does.
+ * @since v5.10.0
+ */
+ from(
+ arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>,
+ byteOffset?: number,
+ length?: number,
+ ): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param data data to create a new Buffer
+ */
+ from(data: Uint8Array | ReadonlyArray<number>): Buffer;
+ from(data: WithImplicitCoercion<Uint8Array | ReadonlyArray<number> | string>): Buffer;
+ /**
+ * Creates a new Buffer containing the given JavaScript string {str}.
+ * If provided, the {encoding} parameter identifies the character encoding.
+ * If not provided, {encoding} defaults to 'utf8'.
+ */
+ from(
+ str:
+ | WithImplicitCoercion<string>
+ | {
+ [Symbol.toPrimitive](hint: 'string'): string;
+ },
+ encoding?: BufferEncoding,
+ ): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param values to create a new Buffer
+ */
+ of(...items: number[]): Buffer;
+ /**
+ * Returns `true` if `obj` is a `Buffer`, `false` otherwise.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * Buffer.isBuffer(Buffer.alloc(10)); // true
+ * Buffer.isBuffer(Buffer.from('foo')); // true
+ * Buffer.isBuffer('a string'); // false
+ * Buffer.isBuffer([]); // false
+ * Buffer.isBuffer(new Uint8Array(1024)); // false
+ * ```
+ * @since v0.1.101
+ */
+ isBuffer(obj: any): obj is Buffer;
+ /**
+ * Returns `true` if `encoding` is the name of a supported character encoding,
+ * or `false` otherwise.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * console.log(Buffer.isEncoding('utf8'));
+ * // Prints: true
+ *
+ * console.log(Buffer.isEncoding('hex'));
+ * // Prints: true
+ *
+ * console.log(Buffer.isEncoding('utf/8'));
+ * // Prints: false
+ *
+ * console.log(Buffer.isEncoding(''));
+ * // Prints: false
+ * ```
+ * @since v0.9.1
+ * @param encoding A character encoding name to check.
+ */
+ isEncoding(encoding: string): encoding is BufferEncoding;
+ /**
+ * Returns the byte length of a string when encoded using `encoding`.
+ * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account
+ * for the encoding that is used to convert the string into bytes.
+ *
+ * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input.
+ * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the
+ * return value might be greater than the length of a `Buffer` created from the
+ * string.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const str = '\u00bd + \u00bc = \u00be';
+ *
+ * console.log(`${str}: ${str.length} characters, ` +
+ * `${Buffer.byteLength(str, 'utf8')} bytes`);
+ * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes
+ * ```
+ *
+ * When `string` is a
+ * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/-
+ * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop-
+ * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned.
+ * @since v0.1.90
+ * @param string A value to calculate the length of.
+ * @param [encoding='utf8'] If `string` is a string, this is its encoding.
+ * @return The number of bytes contained within `string`.
+ */
+ byteLength(
+ string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
+ encoding?: BufferEncoding,
+ ): number;
+ /**
+ * Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together.
+ *
+ * If the list has no items, or if the `totalLength` is 0, then a new zero-length`Buffer` is returned.
+ *
+ * If `totalLength` is not provided, it is calculated from the `Buffer` instances
+ * in `list` by adding their lengths.
+ *
+ * If `totalLength` is provided, it is coerced to an unsigned integer. If the
+ * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
+ * truncated to `totalLength`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Create a single `Buffer` from a list of three `Buffer` instances.
+ *
+ * const buf1 = Buffer.alloc(10);
+ * const buf2 = Buffer.alloc(14);
+ * const buf3 = Buffer.alloc(18);
+ * const totalLength = buf1.length + buf2.length + buf3.length;
+ *
+ * console.log(totalLength);
+ * // Prints: 42
+ *
+ * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength);
+ *
+ * console.log(bufA);
+ * // Prints: <Buffer 00 00 00 00 ...>
+ * console.log(bufA.length);
+ * // Prints: 42
+ * ```
+ *
+ * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does.
+ * @since v0.7.11
+ * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate.
+ * @param totalLength Total length of the `Buffer` instances in `list` when concatenated.
+ */
+ concat(list: ReadonlyArray<Uint8Array>, totalLength?: number): Buffer;
+ /**
+ * Copies the underlying memory of `view` into a new `Buffer`.
+ *
+ * ```js
+ * const u16 = new Uint16Array([0, 0xffff]);
+ * const buf = Buffer.copyBytesFrom(u16, 1, 1);
+ * u16[1] = 0;
+ * console.log(buf.length); // 2
+ * console.log(buf[0]); // 255
+ * console.log(buf[1]); // 255
+ * ```
+ * @since v19.8.0
+ * @param view The {TypedArray} to copy.
+ * @param [offset=': 0'] The starting offset within `view`.
+ * @param [length=view.length - offset] The number of elements from `view` to copy.
+ */
+ copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer;
+ /**
+ * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of`Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from('1234');
+ * const buf2 = Buffer.from('0123');
+ * const arr = [buf1, buf2];
+ *
+ * console.log(arr.sort(Buffer.compare));
+ * // Prints: [ <Buffer 30 31 32 33>, <Buffer 31 32 33 34> ]
+ * // (This result is equal to: [buf2, buf1].)
+ * ```
+ * @since v0.11.13
+ * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details.
+ */
+ compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.alloc(5);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 00 00 00 00 00>
+ * ```
+ *
+ * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
+ *
+ * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.alloc(5, 'a');
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 61 61 61 61 61>
+ * ```
+ *
+ * If both `fill` and `encoding` are specified, the allocated `Buffer` will be
+ * initialized by calling `buf.fill(fill, encoding)`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64>
+ * ```
+ *
+ * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance
+ * contents will never contain sensitive data from previous allocations, including
+ * data that might not have been allocated for `Buffer`s.
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ * @since v5.10.0
+ * @param size The desired length of the new `Buffer`.
+ * @param [fill=0] A value to pre-fill the new `Buffer` with.
+ * @param [encoding='utf8'] If `fill` is a string, this is its encoding.
+ */
+ alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
+ *
+ * The underlying memory for `Buffer` instances created in this way is _not_
+ * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(10);
+ *
+ * console.log(buf);
+ * // Prints (contents may vary): <Buffer a0 8b 28 3f 01 00 00 00 50 32>
+ *
+ * buf.fill(0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 00 00 00 00 00 00 00 00 00 00>
+ * ```
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ *
+ * The `Buffer` module pre-allocates an internal `Buffer` instance of
+ * size `Buffer.poolSize` that is used as a pool for the fast allocation of new`Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`,
+ * and `Buffer.concat()` only when `size` is less than or equal to`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two).
+ *
+ * Use of this pre-allocated internal memory pool is a key difference between
+ * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
+ * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less
+ * than or equal to half `Buffer.poolSize`. The
+ * difference is subtle but can be important when an application requires the
+ * additional performance that `Buffer.allocUnsafe()` provides.
+ * @since v5.10.0
+ * @param size The desired length of the new `Buffer`.
+ */
+ allocUnsafe(size: number): Buffer;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if
+ * `size` is 0.
+ *
+ * The underlying memory for `Buffer` instances created in this way is _not_
+ * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize
+ * such `Buffer` instances with zeroes.
+ *
+ * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
+ * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This
+ * allows applications to avoid the garbage collection overhead of creating many
+ * individually allocated `Buffer` instances. This approach improves both
+ * performance and memory usage by eliminating the need to track and clean up as
+ * many individual `ArrayBuffer` objects.
+ *
+ * However, in the case where a developer may need to retain a small chunk of
+ * memory from a pool for an indeterminate amount of time, it may be appropriate
+ * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and
+ * then copying out the relevant bits.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Need to keep around a few small chunks of memory.
+ * const store = [];
+ *
+ * socket.on('readable', () => {
+ * let data;
+ * while (null !== (data = readable.read())) {
+ * // Allocate for retained data.
+ * const sb = Buffer.allocUnsafeSlow(10);
+ *
+ * // Copy the data into the new allocation.
+ * data.copy(sb, 0, 0, 10);
+ *
+ * store.push(sb);
+ * }
+ * });
+ * ```
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ * @since v5.12.0
+ * @param size The desired length of the new `Buffer`.
+ */
+ allocUnsafeSlow(size: number): Buffer;
+ /**
+ * This is the size (in bytes) of pre-allocated internal `Buffer` instances used
+ * for pooling. This value may be modified.
+ * @since v0.11.3
+ */
+ poolSize: number;
+ }
+ interface Buffer extends Uint8Array {
+ /**
+ * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did
+ * not contain enough space to fit the entire string, only part of `string` will be
+ * written. However, partially encoded characters will not be written.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.alloc(256);
+ *
+ * const len = buf.write('\u00bd + \u00bc = \u00be', 0);
+ *
+ * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`);
+ * // Prints: 12 bytes: ½ + ¼ = ¾
+ *
+ * const buffer = Buffer.alloc(10);
+ *
+ * const length = buffer.write('abcd', 8);
+ *
+ * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`);
+ * // Prints: 2 bytes : ab
+ * ```
+ * @since v0.1.90
+ * @param string String to write to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write `string`.
+ * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`).
+ * @param [encoding='utf8'] The character encoding of `string`.
+ * @return Number of bytes written.
+ */
+ write(string: string, encoding?: BufferEncoding): number;
+ write(string: string, offset: number, encoding?: BufferEncoding): number;
+ write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
+ /**
+ * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`.
+ *
+ * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8,
+ * then each invalid byte is replaced with the replacement character `U+FFFD`.
+ *
+ * The maximum length of a string instance (in UTF-16 code units) is available
+ * as {@link constants.MAX_STRING_LENGTH}.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * console.log(buf1.toString('utf8'));
+ * // Prints: abcdefghijklmnopqrstuvwxyz
+ * console.log(buf1.toString('utf8', 0, 5));
+ * // Prints: abcde
+ *
+ * const buf2 = Buffer.from('tést');
+ *
+ * console.log(buf2.toString('hex'));
+ * // Prints: 74c3a97374
+ * console.log(buf2.toString('utf8', 0, 3));
+ * // Prints: té
+ * console.log(buf2.toString(undefined, 0, 3));
+ * // Prints: té
+ * ```
+ * @since v0.1.90
+ * @param [encoding='utf8'] The character encoding to use.
+ * @param [start=0] The byte offset to start decoding at.
+ * @param [end=buf.length] The byte offset to stop decoding at (not inclusive).
+ */
+ toString(encoding?: BufferEncoding, start?: number, end?: number): string;
+ /**
+ * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls
+ * this function when stringifying a `Buffer` instance.
+ *
+ * `Buffer.from()` accepts objects in the format returned from this method.
+ * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]);
+ * const json = JSON.stringify(buf);
+ *
+ * console.log(json);
+ * // Prints: {"type":"Buffer","data":[1,2,3,4,5]}
+ *
+ * const copy = JSON.parse(json, (key, value) => {
+ * return value &#x26;&#x26; value.type === 'Buffer' ?
+ * Buffer.from(value) :
+ * value;
+ * });
+ *
+ * console.log(copy);
+ * // Prints: <Buffer 01 02 03 04 05>
+ * ```
+ * @since v0.9.2
+ */
+ toJSON(): {
+ type: 'Buffer';
+ data: number[];
+ };
+ /**
+ * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from('ABC');
+ * const buf2 = Buffer.from('414243', 'hex');
+ * const buf3 = Buffer.from('ABCD');
+ *
+ * console.log(buf1.equals(buf2));
+ * // Prints: true
+ * console.log(buf1.equals(buf3));
+ * // Prints: false
+ * ```
+ * @since v0.11.13
+ * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`.
+ */
+ equals(otherBuffer: Uint8Array): boolean;
+ /**
+ * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order.
+ * Comparison is based on the actual sequence of bytes in each `Buffer`.
+ *
+ * * `0` is returned if `target` is the same as `buf`
+ * * `1` is returned if `target` should come _before_`buf` when sorted.
+ * * `-1` is returned if `target` should come _after_`buf` when sorted.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from('ABC');
+ * const buf2 = Buffer.from('BCD');
+ * const buf3 = Buffer.from('ABCD');
+ *
+ * console.log(buf1.compare(buf1));
+ * // Prints: 0
+ * console.log(buf1.compare(buf2));
+ * // Prints: -1
+ * console.log(buf1.compare(buf3));
+ * // Prints: -1
+ * console.log(buf2.compare(buf1));
+ * // Prints: 1
+ * console.log(buf2.compare(buf3));
+ * // Prints: 1
+ * console.log([buf1, buf2, buf3].sort(Buffer.compare));
+ * // Prints: [ <Buffer 41 42 43>, <Buffer 41 42 43 44>, <Buffer 42 43 44> ]
+ * // (This result is equal to: [buf1, buf3, buf2].)
+ * ```
+ *
+ * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd`arguments can be used to limit the comparison to specific ranges within `target`and `buf` respectively.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]);
+ * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]);
+ *
+ * console.log(buf1.compare(buf2, 5, 9, 0, 4));
+ * // Prints: 0
+ * console.log(buf1.compare(buf2, 0, 6, 4));
+ * // Prints: -1
+ * console.log(buf1.compare(buf2, 5, 6, 5));
+ * // Prints: 1
+ * ```
+ *
+ * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`,`targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`.
+ * @since v0.11.13
+ * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`.
+ * @param [targetStart=0] The offset within `target` at which to begin comparison.
+ * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive).
+ * @param [sourceStart=0] The offset within `buf` at which to begin comparison.
+ * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive).
+ */
+ compare(
+ target: Uint8Array,
+ targetStart?: number,
+ targetEnd?: number,
+ sourceStart?: number,
+ sourceEnd?: number,
+ ): -1 | 0 | 1;
+ /**
+ * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`.
+ *
+ * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available
+ * for all TypedArrays, including Node.js `Buffer`s, although it takes
+ * different function arguments.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Create two `Buffer` instances.
+ * const buf1 = Buffer.allocUnsafe(26);
+ * const buf2 = Buffer.allocUnsafe(26).fill('!');
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`.
+ * buf1.copy(buf2, 8, 16, 20);
+ * // This is equivalent to:
+ * // buf2.set(buf1.subarray(16, 20), 8);
+ *
+ * console.log(buf2.toString('ascii', 0, 25));
+ * // Prints: !!!!!!!!qrst!!!!!!!!!!!!!
+ * ```
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Create a `Buffer` and copy data from one region to an overlapping region
+ * // within the same `Buffer`.
+ *
+ * const buf = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf[i] = i + 97;
+ * }
+ *
+ * buf.copy(buf, 0, 4, 10);
+ *
+ * console.log(buf.toString());
+ * // Prints: efghijghijklmnopqrstuvwxyz
+ * ```
+ * @since v0.1.90
+ * @param target A `Buffer` or {@link Uint8Array} to copy into.
+ * @param [targetStart=0] The offset within `target` at which to begin writing.
+ * @param [sourceStart=0] The offset within `buf` from which to begin copying.
+ * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive).
+ * @return The number of bytes copied.
+ */
+ copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
+ /**
+ * Returns a new `Buffer` that references the same memory as the original, but
+ * offset and cropped by the `start` and `end` indices.
+ *
+ * This method is not compatible with the `Uint8Array.prototype.slice()`,
+ * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * const copiedBuf = Uint8Array.prototype.slice.call(buf);
+ * copiedBuf[0]++;
+ * console.log(copiedBuf.toString());
+ * // Prints: cuffer
+ *
+ * console.log(buf.toString());
+ * // Prints: buffer
+ *
+ * // With buf.slice(), the original buffer is modified.
+ * const notReallyCopiedBuf = buf.slice();
+ * notReallyCopiedBuf[0]++;
+ * console.log(notReallyCopiedBuf.toString());
+ * // Prints: cuffer
+ * console.log(buf.toString());
+ * // Also prints: cuffer (!)
+ * ```
+ * @since v0.3.0
+ * @deprecated Use `subarray` instead.
+ * @param [start=0] Where the new `Buffer` will start.
+ * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
+ */
+ slice(start?: number, end?: number): Buffer;
+ /**
+ * Returns a new `Buffer` that references the same memory as the original, but
+ * offset and cropped by the `start` and `end` indices.
+ *
+ * Specifying `end` greater than `buf.length` will return the same result as
+ * that of `end` equal to `buf.length`.
+ *
+ * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray).
+ *
+ * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte
+ * // from the original `Buffer`.
+ *
+ * const buf1 = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * const buf2 = buf1.subarray(0, 3);
+ *
+ * console.log(buf2.toString('ascii', 0, buf2.length));
+ * // Prints: abc
+ *
+ * buf1[0] = 33;
+ *
+ * console.log(buf2.toString('ascii', 0, buf2.length));
+ * // Prints: !bc
+ * ```
+ *
+ * Specifying negative indexes causes the slice to be generated relative to the
+ * end of `buf` rather than the beginning.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * console.log(buf.subarray(-6, -1).toString());
+ * // Prints: buffe
+ * // (Equivalent to buf.subarray(0, 5).)
+ *
+ * console.log(buf.subarray(-6, -2).toString());
+ * // Prints: buff
+ * // (Equivalent to buf.subarray(0, 4).)
+ *
+ * console.log(buf.subarray(-5, -2).toString());
+ * // Prints: uff
+ * // (Equivalent to buf.subarray(1, 4).)
+ * ```
+ * @since v3.0.0
+ * @param [start=0] Where the new `Buffer` will start.
+ * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
+ */
+ subarray(start?: number, end?: number): Buffer;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigInt64BE(0x0102030405060708n, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigInt64BE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigInt64LE(0x0102030405060708n, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 08 07 06 05 04 03 02 01>
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigInt64LE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian.
+ *
+ * This function is also available under the `writeBigUint64BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigUInt64BE(0xdecafafecacefaden, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer de ca fa fe ca ce fa de>
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigUInt64BE(value: bigint, offset?: number): number;
+ /**
+ * @alias Buffer.writeBigUInt64BE
+ * @since v14.10.0, v12.19.0
+ */
+ writeBigUint64BE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigUInt64LE(0xdecafafecacefaden, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer de fa ce ca fe fa ca de>
+ * ```
+ *
+ * This function is also available under the `writeBigUint64LE` alias.
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigUInt64LE(value: bigint, offset?: number): number;
+ /**
+ * @alias Buffer.writeBigUInt64LE
+ * @since v14.10.0, v12.19.0
+ */
+ writeBigUint64LE(value: bigint, offset?: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than an unsigned integer.
+ *
+ * This function is also available under the `writeUintLE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeUIntLE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer ab 90 78 56 34 12>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUIntLE(value: number, offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.writeUIntLE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUintLE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than an unsigned integer.
+ *
+ * This function is also available under the `writeUintBE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeUIntBE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 12 34 56 78 90 ab>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUIntBE(value: number, offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.writeUIntBE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUintBE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than a signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeIntLE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer ab 90 78 56 34 12>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeIntLE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a
+ * signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeIntBE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 12 34 56 78 90 ab>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeIntBE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readBigUint64BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
+ *
+ * console.log(buf.readBigUInt64BE(0));
+ * // Prints: 4294967295n
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigUInt64BE(offset?: number): bigint;
+ /**
+ * @alias Buffer.readBigUInt64BE
+ * @since v14.10.0, v12.19.0
+ */
+ readBigUint64BE(offset?: number): bigint;
+ /**
+ * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readBigUint64LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
+ *
+ * console.log(buf.readBigUInt64LE(0));
+ * // Prints: 18446744069414584320n
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigUInt64LE(offset?: number): bigint;
+ /**
+ * @alias Buffer.readBigUInt64LE
+ * @since v14.10.0, v12.19.0
+ */
+ readBigUint64LE(offset?: number): bigint;
+ /**
+ * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed
+ * values.
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigInt64BE(offset?: number): bigint;
+ /**
+ * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed
+ * values.
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigInt64LE(offset?: number): bigint;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned, little-endian integer supporting
+ * up to 48 bits of accuracy.
+ *
+ * This function is also available under the `readUintLE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readUIntLE(0, 6).toString(16));
+ * // Prints: ab9078563412
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readUIntLE(offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.readUIntLE
+ * @since v14.9.0, v12.19.0
+ */
+ readUintLE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned big-endian integer supporting
+ * up to 48 bits of accuracy.
+ *
+ * This function is also available under the `readUintBE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readUIntBE(0, 6).toString(16));
+ * // Prints: 1234567890ab
+ * console.log(buf.readUIntBE(1, 6).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readUIntBE(offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.readUIntBE
+ * @since v14.9.0, v12.19.0
+ */
+ readUintBE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a little-endian, two's complement signed value
+ * supporting up to 48 bits of accuracy.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readIntLE(0, 6).toString(16));
+ * // Prints: -546f87a9cbee
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readIntLE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a big-endian, two's complement signed value
+ * supporting up to 48 bits of accuracy.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readIntBE(0, 6).toString(16));
+ * // Prints: 1234567890ab
+ * console.log(buf.readIntBE(1, 6).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * console.log(buf.readIntBE(1, 0).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readIntBE(offset: number, byteLength: number): number;
+ /**
+ * Reads an unsigned 8-bit integer from `buf` at the specified `offset`.
+ *
+ * This function is also available under the `readUint8` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([1, -2]);
+ *
+ * console.log(buf.readUInt8(0));
+ * // Prints: 1
+ * console.log(buf.readUInt8(1));
+ * // Prints: 254
+ * console.log(buf.readUInt8(2));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
+ */
+ readUInt8(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt8
+ * @since v14.9.0, v12.19.0
+ */
+ readUint8(offset?: number): number;
+ /**
+ * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint16LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56]);
+ *
+ * console.log(buf.readUInt16LE(0).toString(16));
+ * // Prints: 3412
+ * console.log(buf.readUInt16LE(1).toString(16));
+ * // Prints: 5634
+ * console.log(buf.readUInt16LE(2).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readUInt16LE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt16LE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint16LE(offset?: number): number;
+ /**
+ * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint16BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56]);
+ *
+ * console.log(buf.readUInt16BE(0).toString(16));
+ * // Prints: 1234
+ * console.log(buf.readUInt16BE(1).toString(16));
+ * // Prints: 3456
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readUInt16BE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt16BE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint16BE(offset?: number): number;
+ /**
+ * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint32LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
+ *
+ * console.log(buf.readUInt32LE(0).toString(16));
+ * // Prints: 78563412
+ * console.log(buf.readUInt32LE(1).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readUInt32LE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt32LE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint32LE(offset?: number): number;
+ /**
+ * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint32BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
+ *
+ * console.log(buf.readUInt32BE(0).toString(16));
+ * // Prints: 12345678
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readUInt32BE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt32BE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint32BE(offset?: number): number;
+ /**
+ * Reads a signed 8-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([-1, 5]);
+ *
+ * console.log(buf.readInt8(0));
+ * // Prints: -1
+ * console.log(buf.readInt8(1));
+ * // Prints: 5
+ * console.log(buf.readInt8(2));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
+ */
+ readInt8(offset?: number): number;
+ /**
+ * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0, 5]);
+ *
+ * console.log(buf.readInt16LE(0));
+ * // Prints: 1280
+ * console.log(buf.readInt16LE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readInt16LE(offset?: number): number;
+ /**
+ * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0, 5]);
+ *
+ * console.log(buf.readInt16BE(0));
+ * // Prints: 5
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readInt16BE(offset?: number): number;
+ /**
+ * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0, 0, 0, 5]);
+ *
+ * console.log(buf.readInt32LE(0));
+ * // Prints: 83886080
+ * console.log(buf.readInt32LE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readInt32LE(offset?: number): number;
+ /**
+ * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0, 0, 0, 5]);
+ *
+ * console.log(buf.readInt32BE(0));
+ * // Prints: 5
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readInt32BE(offset?: number): number;
+ /**
+ * Reads a 32-bit, little-endian float from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4]);
+ *
+ * console.log(buf.readFloatLE(0));
+ * // Prints: 1.539989614439558e-36
+ * console.log(buf.readFloatLE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readFloatLE(offset?: number): number;
+ /**
+ * Reads a 32-bit, big-endian float from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4]);
+ *
+ * console.log(buf.readFloatBE(0));
+ * // Prints: 2.387939260590663e-38
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readFloatBE(offset?: number): number;
+ /**
+ * Reads a 64-bit, little-endian double from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
+ *
+ * console.log(buf.readDoubleLE(0));
+ * // Prints: 5.447603722011605e-270
+ * console.log(buf.readDoubleLE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
+ */
+ readDoubleLE(offset?: number): number;
+ /**
+ * Reads a 64-bit, big-endian double from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
+ *
+ * console.log(buf.readDoubleBE(0));
+ * // Prints: 8.20788039913184e-304
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
+ */
+ readDoubleBE(offset?: number): number;
+ reverse(): this;
+ /**
+ * Interprets `buf` as an array of unsigned 16-bit integers and swaps the
+ * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+ *
+ * buf1.swap16();
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 02 01 04 03 06 05 08 07>
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap16();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ *
+ * One convenient use of `buf.swap16()` is to perform a fast in-place conversion
+ * between UTF-16 little-endian and UTF-16 big-endian:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le');
+ * buf.swap16(); // Convert to big-endian UTF-16 text.
+ * ```
+ * @since v5.10.0
+ * @return A reference to `buf`.
+ */
+ swap16(): Buffer;
+ /**
+ * Interprets `buf` as an array of unsigned 32-bit integers and swaps the
+ * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+ *
+ * buf1.swap32();
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 04 03 02 01 08 07 06 05>
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap32();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ * @since v5.10.0
+ * @return A reference to `buf`.
+ */
+ swap32(): Buffer;
+ /**
+ * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_.
+ * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+ *
+ * buf1.swap64();
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 08 07 06 05 04 03 02 01>
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap64();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ * @since v6.3.0
+ * @return A reference to `buf`.
+ */
+ swap64(): Buffer;
+ /**
+ * Writes `value` to `buf` at the specified `offset`. `value` must be a
+ * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything
+ * other than an unsigned 8-bit integer.
+ *
+ * This function is also available under the `writeUint8` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt8(0x3, 0);
+ * buf.writeUInt8(0x4, 1);
+ * buf.writeUInt8(0x23, 2);
+ * buf.writeUInt8(0x42, 3);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 03 04 23 42>
+ * ```
+ * @since v0.5.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt8(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt8
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint8(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is
+ * anything other than an unsigned 16-bit integer.
+ *
+ * This function is also available under the `writeUint16LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt16LE(0xdead, 0);
+ * buf.writeUInt16LE(0xbeef, 2);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer ad de ef be>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt16LE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt16LE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint16LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an
+ * unsigned 16-bit integer.
+ *
+ * This function is also available under the `writeUint16BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt16BE(0xdead, 0);
+ * buf.writeUInt16BE(0xbeef, 2);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer de ad be ef>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt16BE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt16BE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint16BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is
+ * anything other than an unsigned 32-bit integer.
+ *
+ * This function is also available under the `writeUint32LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt32LE(0xfeedface, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer ce fa ed fe>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt32LE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt32LE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint32LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an
+ * unsigned 32-bit integer.
+ *
+ * This function is also available under the `writeUint32BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt32BE(0xfeedface, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer fe ed fa ce>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt32BE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt32BE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint32BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset`. `value` must be a valid
+ * signed 8-bit integer. Behavior is undefined when `value` is anything other than
+ * a signed 8-bit integer.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt8(2, 0);
+ * buf.writeInt8(-2, 1);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 02 fe>
+ * ```
+ * @since v0.5.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt8(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 16-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt16LE(0x0304, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 04 03>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt16LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 16-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt16BE(0x0102, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 01 02>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt16BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 32-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeInt32LE(0x05060708, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 08 07 06 05>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt32LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 32-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeInt32BE(0x01020304, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 01 02 03 04>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt32BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is
+ * undefined when `value` is anything other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeFloatLE(0xcafebabe, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer bb fe 4a 4f>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeFloatLE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is
+ * undefined when `value` is anything other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeFloatBE(0xcafebabe, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 4f 4a fe bb>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeFloatBE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything
+ * other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeDoubleLE(123.456, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 77 be 9f 1a 2f dd 5e 40>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeDoubleLE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything
+ * other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeDoubleBE(123.456, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 40 5e dd 2f 1a 9f be 77>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeDoubleBE(value: number, offset?: number): number;
+ /**
+ * Fills `buf` with the specified `value`. If the `offset` and `end` are not given,
+ * the entire `buf` will be filled:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Fill a `Buffer` with the ASCII character 'h'.
+ *
+ * const b = Buffer.allocUnsafe(50).fill('h');
+ *
+ * console.log(b.toString());
+ * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+ *
+ * // Fill a buffer with empty string
+ * const c = Buffer.allocUnsafe(5).fill('');
+ *
+ * console.log(c.fill(''));
+ * // Prints: <Buffer 00 00 00 00 00>
+ * ```
+ *
+ * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or
+ * integer. If the resulting integer is greater than `255` (decimal), `buf` will be
+ * filled with `value &#x26; 255`.
+ *
+ * If the final write of a `fill()` operation falls on a multi-byte character,
+ * then only the bytes of that character that fit into `buf` are written:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Fill a `Buffer` with character that takes up two bytes in UTF-8.
+ *
+ * console.log(Buffer.allocUnsafe(5).fill('\u0222'));
+ * // Prints: <Buffer c8 a2 c8 a2 c8>
+ * ```
+ *
+ * If `value` contains invalid characters, it is truncated; if no valid
+ * fill data remains, an exception is thrown:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(5);
+ *
+ * console.log(buf.fill('a'));
+ * // Prints: <Buffer 61 61 61 61 61>
+ * console.log(buf.fill('aazz', 'hex'));
+ * // Prints: <Buffer aa aa aa aa aa>
+ * console.log(buf.fill('zz', 'hex'));
+ * // Throws an exception.
+ * ```
+ * @since v0.5.0
+ * @param value The value with which to fill `buf`. Empty value (string, Uint8Array, Buffer) is coerced to `0`.
+ * @param [offset=0] Number of bytes to skip before starting to fill `buf`.
+ * @param [end=buf.length] Where to stop filling `buf` (not inclusive).
+ * @param [encoding='utf8'] The encoding for `value` if `value` is a string.
+ * @return A reference to `buf`.
+ */
+ fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
+ /**
+ * If `value` is:
+ *
+ * * a string, `value` is interpreted according to the character encoding in`encoding`.
+ * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety.
+ * To compare a partial `Buffer`, use `buf.subarray`.
+ * * a number, `value` will be interpreted as an unsigned 8-bit integer
+ * value between `0` and `255`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('this is a buffer');
+ *
+ * console.log(buf.indexOf('this'));
+ * // Prints: 0
+ * console.log(buf.indexOf('is'));
+ * // Prints: 2
+ * console.log(buf.indexOf(Buffer.from('a buffer')));
+ * // Prints: 8
+ * console.log(buf.indexOf(97));
+ * // Prints: 8 (97 is the decimal ASCII value for 'a')
+ * console.log(buf.indexOf(Buffer.from('a buffer example')));
+ * // Prints: -1
+ * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8)));
+ * // Prints: 8
+ *
+ * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
+ *
+ * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le'));
+ * // Prints: 4
+ * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le'));
+ * // Prints: 6
+ * ```
+ *
+ * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value,
+ * an integer between 0 and 255.
+ *
+ * If `byteOffset` is not a number, it will be coerced to a number. If the result
+ * of coercion is `NaN` or `0`, then the entire buffer will be searched. This
+ * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf).
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const b = Buffer.from('abcdef');
+ *
+ * // Passing a value that's a number, but not a valid byte.
+ * // Prints: 2, equivalent to searching for 99 or 'c'.
+ * console.log(b.indexOf(99.9));
+ * console.log(b.indexOf(256 + 99));
+ *
+ * // Passing a byteOffset that coerces to NaN or 0.
+ * // Prints: 1, searching the whole buffer.
+ * console.log(b.indexOf('b', undefined));
+ * console.log(b.indexOf('b', {}));
+ * console.log(b.indexOf('b', null));
+ * console.log(b.indexOf('b', []));
+ * ```
+ *
+ * If `value` is an empty string or empty `Buffer` and `byteOffset` is less
+ * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned.
+ * @since v1.5.0
+ * @param value What to search for.
+ * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
+ * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
+ */
+ indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
+ /**
+ * Identical to `buf.indexOf()`, except the last occurrence of `value` is found
+ * rather than the first occurrence.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('this buffer is a buffer');
+ *
+ * console.log(buf.lastIndexOf('this'));
+ * // Prints: 0
+ * console.log(buf.lastIndexOf('buffer'));
+ * // Prints: 17
+ * console.log(buf.lastIndexOf(Buffer.from('buffer')));
+ * // Prints: 17
+ * console.log(buf.lastIndexOf(97));
+ * // Prints: 15 (97 is the decimal ASCII value for 'a')
+ * console.log(buf.lastIndexOf(Buffer.from('yolo')));
+ * // Prints: -1
+ * console.log(buf.lastIndexOf('buffer', 5));
+ * // Prints: 5
+ * console.log(buf.lastIndexOf('buffer', 4));
+ * // Prints: -1
+ *
+ * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
+ *
+ * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le'));
+ * // Prints: 6
+ * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le'));
+ * // Prints: 4
+ * ```
+ *
+ * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value,
+ * an integer between 0 and 255.
+ *
+ * If `byteOffset` is not a number, it will be coerced to a number. Any arguments
+ * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer.
+ * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf).
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const b = Buffer.from('abcdef');
+ *
+ * // Passing a value that's a number, but not a valid byte.
+ * // Prints: 2, equivalent to searching for 99 or 'c'.
+ * console.log(b.lastIndexOf(99.9));
+ * console.log(b.lastIndexOf(256 + 99));
+ *
+ * // Passing a byteOffset that coerces to NaN.
+ * // Prints: 1, searching the whole buffer.
+ * console.log(b.lastIndexOf('b', undefined));
+ * console.log(b.lastIndexOf('b', {}));
+ *
+ * // Passing a byteOffset that coerces to 0.
+ * // Prints: -1, equivalent to passing 0.
+ * console.log(b.lastIndexOf('b', null));
+ * console.log(b.lastIndexOf('b', []));
+ * ```
+ *
+ * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned.
+ * @since v6.0.0
+ * @param value What to search for.
+ * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
+ * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
+ */
+ lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
+ /**
+ * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `[index, byte]` pairs from the contents
+ * of `buf`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Log the entire contents of a `Buffer`.
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * for (const pair of buf.entries()) {
+ * console.log(pair);
+ * }
+ * // Prints:
+ * // [0, 98]
+ * // [1, 117]
+ * // [2, 102]
+ * // [3, 102]
+ * // [4, 101]
+ * // [5, 114]
+ * ```
+ * @since v1.1.0
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Equivalent to `buf.indexOf() !== -1`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('this is a buffer');
+ *
+ * console.log(buf.includes('this'));
+ * // Prints: true
+ * console.log(buf.includes('is'));
+ * // Prints: true
+ * console.log(buf.includes(Buffer.from('a buffer')));
+ * // Prints: true
+ * console.log(buf.includes(97));
+ * // Prints: true (97 is the decimal ASCII value for 'a')
+ * console.log(buf.includes(Buffer.from('a buffer example')));
+ * // Prints: false
+ * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8)));
+ * // Prints: true
+ * console.log(buf.includes('this', 4));
+ * // Prints: false
+ * ```
+ * @since v5.3.0
+ * @param value What to search for.
+ * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is its encoding.
+ * @return `true` if `value` was found in `buf`, `false` otherwise.
+ */
+ includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
+ /**
+ * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `buf` keys (indices).
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * for (const key of buf.keys()) {
+ * console.log(key);
+ * }
+ * // Prints:
+ * // 0
+ * // 1
+ * // 2
+ * // 3
+ * // 4
+ * // 5
+ * ```
+ * @since v1.1.0
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) for `buf` values (bytes). This function is
+ * called automatically when a `Buffer` is used in a `for..of` statement.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * for (const value of buf.values()) {
+ * console.log(value);
+ * }
+ * // Prints:
+ * // 98
+ * // 117
+ * // 102
+ * // 102
+ * // 101
+ * // 114
+ *
+ * for (const value of buf) {
+ * console.log(value);
+ * }
+ * // Prints:
+ * // 98
+ * // 117
+ * // 102
+ * // 102
+ * // 101
+ * // 114
+ * ```
+ * @since v1.1.0
+ */
+ values(): IterableIterator<number>;
+ }
+ var Buffer: BufferConstructor;
+ /**
+ * Decodes a string of Base64-encoded data into bytes, and encodes those bytes
+ * into a string using Latin-1 (ISO-8859-1).
+ *
+ * The `data` may be any JavaScript-value that can be coerced into a string.
+ *
+ * **This function is only provided for compatibility with legacy web platform APIs**
+ * **and should never be used in new code, because they use strings to represent**
+ * **binary data and predate the introduction of typed arrays in JavaScript.**
+ * **For code running using Node.js APIs, converting between base64-encoded strings**
+ * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
+ * @since v15.13.0, v14.17.0
+ * @legacy Use `Buffer.from(data, 'base64')` instead.
+ * @param data The Base64-encoded input string.
+ */
+ function atob(data: string): string;
+ /**
+ * Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes
+ * into a string using Base64.
+ *
+ * The `data` may be any JavaScript-value that can be coerced into a string.
+ *
+ * **This function is only provided for compatibility with legacy web platform APIs**
+ * **and should never be used in new code, because they use strings to represent**
+ * **binary data and predate the introduction of typed arrays in JavaScript.**
+ * **For code running using Node.js APIs, converting between base64-encoded strings**
+ * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
+ * @since v15.13.0, v14.17.0
+ * @legacy Use `buf.toString('base64')` instead.
+ * @param data An ASCII (Latin1) string.
+ */
+ function btoa(data: string): string;
+ interface Blob extends __Blob {}
+ /**
+ * `Blob` class is a global reference for `require('node:buffer').Blob`
+ * https://nodejs.org/api/buffer.html#class-blob
+ * @since v18.0.0
+ */
+ var Blob: typeof globalThis extends {
+ onmessage: any;
+ Blob: infer T;
+ }
+ ? T
+ : typeof NodeBlob;
+ }
+}
+declare module 'node:buffer' {
+ export * from 'buffer';
+}
diff --git a/node_modules/@types/node/ts4.8/child_process.d.ts b/node_modules/@types/node/ts4.8/child_process.d.ts
new file mode 100755
index 0000000..b255795
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/child_process.d.ts
@@ -0,0 +1,1400 @@
+/**
+ * The `node:child_process` module provides the ability to spawn subprocesses in
+ * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability
+ * is primarily provided by the {@link spawn} function:
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ * const ls = spawn('ls', ['-lh', '/usr']);
+ *
+ * ls.stdout.on('data', (data) => {
+ * console.log(`stdout: ${data}`);
+ * });
+ *
+ * ls.stderr.on('data', (data) => {
+ * console.error(`stderr: ${data}`);
+ * });
+ *
+ * ls.on('close', (code) => {
+ * console.log(`child process exited with code ${code}`);
+ * });
+ * ```
+ *
+ * By default, pipes for `stdin`, `stdout`, and `stderr` are established between
+ * the parent Node.js process and the spawned subprocess. These pipes have
+ * limited (and platform-specific) capacity. If the subprocess writes to
+ * stdout in excess of that limit without the output being captured, the
+ * subprocess blocks waiting for the pipe buffer to accept more data. This is
+ * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }`option if the output will not be consumed.
+ *
+ * The command lookup is performed using the `options.env.PATH` environment
+ * variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is
+ * used. If `options.env` is set without `PATH`, lookup on Unix is performed
+ * on a default search path search of `/usr/bin:/bin` (see your operating system's
+ * manual for execvpe/execvp), on Windows the current processes environment
+ * variable `PATH` is used.
+ *
+ * On Windows, environment variables are case-insensitive. Node.js
+ * lexicographically sorts the `env` keys and uses the first one that
+ * case-insensitively matches. Only first (in lexicographic order) entry will be
+ * passed to the subprocess. This might lead to issues on Windows when passing
+ * objects to the `env` option that have multiple variants of the same key, such as`PATH` and `Path`.
+ *
+ * The {@link spawn} method spawns the child process asynchronously,
+ * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks
+ * the event loop until the spawned process either exits or is terminated.
+ *
+ * For convenience, the `node:child_process` module provides a handful of
+ * synchronous and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on
+ * top of {@link spawn} or {@link spawnSync}.
+ *
+ * * {@link exec}: spawns a shell and runs a command within that
+ * shell, passing the `stdout` and `stderr` to a callback function when
+ * complete.
+ * * {@link execFile}: similar to {@link exec} except
+ * that it spawns the command directly without first spawning a shell by
+ * default.
+ * * {@link fork}: spawns a new Node.js process and invokes a
+ * specified module with an IPC communication channel established that allows
+ * sending messages between parent and child.
+ * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop.
+ * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop.
+ *
+ * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
+ * the synchronous methods can have significant impact on performance due to
+ * stalling the event loop while spawned processes complete.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/child_process.js)
+ */
+declare module 'child_process' {
+ import { ObjectEncodingOptions } from 'node:fs';
+ import { EventEmitter, Abortable } from 'node:events';
+ import * as net from 'node:net';
+ import { Writable, Readable, Stream, Pipe } from 'node:stream';
+ import { URL } from 'node:url';
+ type Serializable = string | object | number | boolean | bigint;
+ type SendHandle = net.Socket | net.Server;
+ /**
+ * Instances of the `ChildProcess` represent spawned child processes.
+ *
+ * Instances of `ChildProcess` are not intended to be created directly. Rather,
+ * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create
+ * instances of `ChildProcess`.
+ * @since v2.2.0
+ */
+ class ChildProcess extends EventEmitter {
+ /**
+ * A `Writable Stream` that represents the child process's `stdin`.
+ *
+ * If a child process waits to read all of its input, the child will not continue
+ * until this stream has been closed via `end()`.
+ *
+ * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will
+ * refer to the same value.
+ *
+ * The `subprocess.stdin` property can be `null` or `undefined`if the child process could not be successfully spawned.
+ * @since v0.1.90
+ */
+ stdin: Writable | null;
+ /**
+ * A `Readable Stream` that represents the child process's `stdout`.
+ *
+ * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will
+ * refer to the same value.
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ *
+ * const subprocess = spawn('ls');
+ *
+ * subprocess.stdout.on('data', (data) => {
+ * console.log(`Received chunk ${data}`);
+ * });
+ * ```
+ *
+ * The `subprocess.stdout` property can be `null` or `undefined`if the child process could not be successfully spawned.
+ * @since v0.1.90
+ */
+ stdout: Readable | null;
+ /**
+ * A `Readable Stream` that represents the child process's `stderr`.
+ *
+ * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will
+ * refer to the same value.
+ *
+ * The `subprocess.stderr` property can be `null` or `undefined`if the child process could not be successfully spawned.
+ * @since v0.1.90
+ */
+ stderr: Readable | null;
+ /**
+ * The `subprocess.channel` property is a reference to the child's IPC channel. If
+ * no IPC channel exists, this property is `undefined`.
+ * @since v7.1.0
+ */
+ readonly channel?: Pipe | null | undefined;
+ /**
+ * A sparse array of pipes to the child process, corresponding with positions in
+ * the `stdio` option passed to {@link spawn} that have been set
+ * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and`subprocess.stdio[2]` are also available as `subprocess.stdin`,`subprocess.stdout`, and `subprocess.stderr`,
+ * respectively.
+ *
+ * In the following example, only the child's fd `1` (stdout) is configured as a
+ * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values
+ * in the array are `null`.
+ *
+ * ```js
+ * const assert = require('node:assert');
+ * const fs = require('node:fs');
+ * const child_process = require('node:child_process');
+ *
+ * const subprocess = child_process.spawn('ls', {
+ * stdio: [
+ * 0, // Use parent's stdin for child.
+ * 'pipe', // Pipe child's stdout to parent.
+ * fs.openSync('err.out', 'w'), // Direct child's stderr to a file.
+ * ],
+ * });
+ *
+ * assert.strictEqual(subprocess.stdio[0], null);
+ * assert.strictEqual(subprocess.stdio[0], subprocess.stdin);
+ *
+ * assert(subprocess.stdout);
+ * assert.strictEqual(subprocess.stdio[1], subprocess.stdout);
+ *
+ * assert.strictEqual(subprocess.stdio[2], null);
+ * assert.strictEqual(subprocess.stdio[2], subprocess.stderr);
+ * ```
+ *
+ * The `subprocess.stdio` property can be `undefined` if the child process could
+ * not be successfully spawned.
+ * @since v0.7.10
+ */
+ readonly stdio: [
+ Writable | null,
+ // stdin
+ Readable | null,
+ // stdout
+ Readable | null,
+ // stderr
+ Readable | Writable | null | undefined,
+ // extra
+ Readable | Writable | null | undefined // extra
+ ];
+ /**
+ * The `subprocess.killed` property indicates whether the child process
+ * successfully received a signal from `subprocess.kill()`. The `killed` property
+ * does not indicate that the child process has been terminated.
+ * @since v0.5.10
+ */
+ readonly killed: boolean;
+ /**
+ * Returns the process identifier (PID) of the child process. If the child process
+ * fails to spawn due to errors, then the value is `undefined` and `error` is
+ * emitted.
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * console.log(`Spawned child pid: ${grep.pid}`);
+ * grep.stdin.end();
+ * ```
+ * @since v0.1.90
+ */
+ readonly pid?: number | undefined;
+ /**
+ * The `subprocess.connected` property indicates whether it is still possible to
+ * send and receive messages from a child process. When `subprocess.connected` is`false`, it is no longer possible to send or receive messages.
+ * @since v0.7.2
+ */
+ readonly connected: boolean;
+ /**
+ * The `subprocess.exitCode` property indicates the exit code of the child process.
+ * If the child process is still running, the field will be `null`.
+ */
+ readonly exitCode: number | null;
+ /**
+ * The `subprocess.signalCode` property indicates the signal received by
+ * the child process if any, else `null`.
+ */
+ readonly signalCode: NodeJS.Signals | null;
+ /**
+ * The `subprocess.spawnargs` property represents the full list of command-line
+ * arguments the child process was launched with.
+ */
+ readonly spawnargs: string[];
+ /**
+ * The `subprocess.spawnfile` property indicates the executable file name of
+ * the child process that is launched.
+ *
+ * For {@link fork}, its value will be equal to `process.execPath`.
+ * For {@link spawn}, its value will be the name of
+ * the executable file.
+ * For {@link exec}, its value will be the name of the shell
+ * in which the child process is launched.
+ */
+ readonly spawnfile: string;
+ /**
+ * The `subprocess.kill()` method sends a signal to the child process. If no
+ * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function
+ * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise.
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * grep.on('close', (code, signal) => {
+ * console.log(
+ * `child process terminated due to receipt of signal ${signal}`);
+ * });
+ *
+ * // Send SIGHUP to process.
+ * grep.kill('SIGHUP');
+ * ```
+ *
+ * The `ChildProcess` object may emit an `'error'` event if the signal
+ * cannot be delivered. Sending a signal to a child process that has already exited
+ * is not an error but may have unforeseen consequences. Specifically, if the
+ * process identifier (PID) has been reassigned to another process, the signal will
+ * be delivered to that process instead which can have unexpected results.
+ *
+ * While the function is called `kill`, the signal delivered to the child process
+ * may not actually terminate the process.
+ *
+ * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference.
+ *
+ * On Windows, where POSIX signals do not exist, the `signal` argument will be
+ * ignored, and the process will be killed forcefully and abruptly (similar to`'SIGKILL'`).
+ * See `Signal Events` for more details.
+ *
+ * On Linux, child processes of child processes will not be terminated
+ * when attempting to kill their parent. This is likely to happen when running a
+ * new process in a shell or with the use of the `shell` option of `ChildProcess`:
+ *
+ * ```js
+ * 'use strict';
+ * const { spawn } = require('node:child_process');
+ *
+ * const subprocess = spawn(
+ * 'sh',
+ * [
+ * '-c',
+ * `node -e "setInterval(() => {
+ * console.log(process.pid, 'is alive')
+ * }, 500);"`,
+ * ], {
+ * stdio: ['inherit', 'inherit', 'inherit'],
+ * },
+ * );
+ *
+ * setTimeout(() => {
+ * subprocess.kill(); // Does not terminate the Node.js process in the shell.
+ * }, 2000);
+ * ```
+ * @since v0.1.90
+ */
+ kill(signal?: NodeJS.Signals | number): boolean;
+ /**
+ * Calls {@link ChildProcess.kill} with `'SIGTERM'`.
+ * @since v20.5.0
+ */
+ [Symbol.dispose](): void;
+ /**
+ * When an IPC channel has been established between the parent and child (
+ * i.e. when using {@link fork}), the `subprocess.send()` method can
+ * be used to send messages to the child process. When the child process is a
+ * Node.js instance, these messages can be received via the `'message'` event.
+ *
+ * The message goes through serialization and parsing. The resulting
+ * message might not be the same as what is originally sent.
+ *
+ * For example, in the parent script:
+ *
+ * ```js
+ * const cp = require('node:child_process');
+ * const n = cp.fork(`${__dirname}/sub.js`);
+ *
+ * n.on('message', (m) => {
+ * console.log('PARENT got message:', m);
+ * });
+ *
+ * // Causes the child to print: CHILD got message: { hello: 'world' }
+ * n.send({ hello: 'world' });
+ * ```
+ *
+ * And then the child script, `'sub.js'` might look like this:
+ *
+ * ```js
+ * process.on('message', (m) => {
+ * console.log('CHILD got message:', m);
+ * });
+ *
+ * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null }
+ * process.send({ foo: 'bar', baz: NaN });
+ * ```
+ *
+ * Child Node.js processes will have a `process.send()` method of their own
+ * that allows the child to send messages back to the parent.
+ *
+ * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages
+ * containing a `NODE_` prefix in the `cmd` property are reserved for use within
+ * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the`'internalMessage'` event and are consumed internally by Node.js.
+ * Applications should avoid using such messages or listening for`'internalMessage'` events as it is subject to change without notice.
+ *
+ * The optional `sendHandle` argument that may be passed to `subprocess.send()` is
+ * for passing a TCP server or socket object to the child process. The child will
+ * receive the object as the second argument passed to the callback function
+ * registered on the `'message'` event. Any data that is received
+ * and buffered in the socket will not be sent to the child.
+ *
+ * The optional `callback` is a function that is invoked after the message is
+ * sent but before the child may have received it. The function is called with a
+ * single argument: `null` on success, or an `Error` object on failure.
+ *
+ * If no `callback` function is provided and the message cannot be sent, an`'error'` event will be emitted by the `ChildProcess` object. This can
+ * happen, for instance, when the child process has already exited.
+ *
+ * `subprocess.send()` will return `false` if the channel has closed or when the
+ * backlog of unsent messages exceeds a threshold that makes it unwise to send
+ * more. Otherwise, the method returns `true`. The `callback` function can be
+ * used to implement flow control.
+ *
+ * #### Example: sending a server object
+ *
+ * The `sendHandle` argument can be used, for instance, to pass the handle of
+ * a TCP server object to the child process as illustrated in the example below:
+ *
+ * ```js
+ * const subprocess = require('node:child_process').fork('subprocess.js');
+ *
+ * // Open up the server object and send the handle.
+ * const server = require('node:net').createServer();
+ * server.on('connection', (socket) => {
+ * socket.end('handled by parent');
+ * });
+ * server.listen(1337, () => {
+ * subprocess.send('server', server);
+ * });
+ * ```
+ *
+ * The child would then receive the server object as:
+ *
+ * ```js
+ * process.on('message', (m, server) => {
+ * if (m === 'server') {
+ * server.on('connection', (socket) => {
+ * socket.end('handled by child');
+ * });
+ * }
+ * });
+ * ```
+ *
+ * Once the server is now shared between the parent and child, some connections
+ * can be handled by the parent and some by the child.
+ *
+ * While the example above uses a server created using the `node:net` module,`node:dgram` module servers use exactly the same workflow with the exceptions of
+ * listening on a `'message'` event instead of `'connection'` and using`server.bind()` instead of `server.listen()`. This is, however, only
+ * supported on Unix platforms.
+ *
+ * #### Example: sending a socket object
+ *
+ * Similarly, the `sendHandler` argument can be used to pass the handle of a
+ * socket to the child process. The example below spawns two children that each
+ * handle connections with "normal" or "special" priority:
+ *
+ * ```js
+ * const { fork } = require('node:child_process');
+ * const normal = fork('subprocess.js', ['normal']);
+ * const special = fork('subprocess.js', ['special']);
+ *
+ * // Open up the server and send sockets to child. Use pauseOnConnect to prevent
+ * // the sockets from being read before they are sent to the child process.
+ * const server = require('node:net').createServer({ pauseOnConnect: true });
+ * server.on('connection', (socket) => {
+ *
+ * // If this is special priority...
+ * if (socket.remoteAddress === '74.125.127.100') {
+ * special.send('socket', socket);
+ * return;
+ * }
+ * // This is normal priority.
+ * normal.send('socket', socket);
+ * });
+ * server.listen(1337);
+ * ```
+ *
+ * The `subprocess.js` would receive the socket handle as the second argument
+ * passed to the event callback function:
+ *
+ * ```js
+ * process.on('message', (m, socket) => {
+ * if (m === 'socket') {
+ * if (socket) {
+ * // Check that the client socket exists.
+ * // It is possible for the socket to be closed between the time it is
+ * // sent and the time it is received in the child process.
+ * socket.end(`Request handled with ${process.argv[2]} priority`);
+ * }
+ * }
+ * });
+ * ```
+ *
+ * Do not use `.maxConnections` on a socket that has been passed to a subprocess.
+ * The parent cannot track when the socket is destroyed.
+ *
+ * Any `'message'` handlers in the subprocess should verify that `socket` exists,
+ * as the connection may have been closed during the time it takes to send the
+ * connection to the child.
+ * @since v0.5.9
+ * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
+ */
+ send(message: Serializable, callback?: (error: Error | null) => void): boolean;
+ send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
+ send(message: Serializable, sendHandle?: SendHandle, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
+ /**
+ * Closes the IPC channel between parent and child, allowing the child to exit
+ * gracefully once there are no other connections keeping it alive. After calling
+ * this method the `subprocess.connected` and `process.connected` properties in
+ * both the parent and child (respectively) will be set to `false`, and it will be
+ * no longer possible to pass messages between the processes.
+ *
+ * The `'disconnect'` event will be emitted when there are no messages in the
+ * process of being received. This will most often be triggered immediately after
+ * calling `subprocess.disconnect()`.
+ *
+ * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked
+ * within the child process to close the IPC channel as well.
+ * @since v0.7.2
+ */
+ disconnect(): void;
+ /**
+ * By default, the parent will wait for the detached child to exit. To prevent the
+ * parent from waiting for a given `subprocess` to exit, use the`subprocess.unref()` method. Doing so will cause the parent's event loop to not
+ * include the child in its reference count, allowing the parent to exit
+ * independently of the child, unless there is an established IPC channel between
+ * the child and the parent.
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ *
+ * const subprocess = spawn(process.argv[0], ['child_program.js'], {
+ * detached: true,
+ * stdio: 'ignore',
+ * });
+ *
+ * subprocess.unref();
+ * ```
+ * @since v0.7.10
+ */
+ unref(): void;
+ /**
+ * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will
+ * restore the removed reference count for the child process, forcing the parent
+ * to wait for the child to exit before exiting itself.
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ *
+ * const subprocess = spawn(process.argv[0], ['child_program.js'], {
+ * detached: true,
+ * stdio: 'ignore',
+ * });
+ *
+ * subprocess.unref();
+ * subprocess.ref();
+ * ```
+ * @since v0.7.10
+ */
+ ref(): void;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. disconnect
+ * 3. error
+ * 4. exit
+ * 5. message
+ * 6. spawn
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ addListener(event: 'disconnect', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ addListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ addListener(event: 'spawn', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close', code: number | null, signal: NodeJS.Signals | null): boolean;
+ emit(event: 'disconnect'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'exit', code: number | null, signal: NodeJS.Signals | null): boolean;
+ emit(event: 'message', message: Serializable, sendHandle: SendHandle): boolean;
+ emit(event: 'spawn', listener: () => void): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ on(event: 'disconnect', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ on(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ on(event: 'spawn', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ once(event: 'disconnect', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ once(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ once(event: 'spawn', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependListener(event: 'disconnect', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ prependListener(event: 'spawn', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependOnceListener(event: 'disconnect', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependOnceListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ prependOnceListener(event: 'spawn', listener: () => void): this;
+ }
+ // return this object when stdio option is undefined or not specified
+ interface ChildProcessWithoutNullStreams extends ChildProcess {
+ stdin: Writable;
+ stdout: Readable;
+ stderr: Readable;
+ readonly stdio: [
+ Writable,
+ Readable,
+ Readable,
+ // stderr
+ Readable | Writable | null | undefined,
+ // extra, no modification
+ Readable | Writable | null | undefined // extra, no modification
+ ];
+ }
+ // return this object when stdio option is a tuple of 3
+ interface ChildProcessByStdio<I extends null | Writable, O extends null | Readable, E extends null | Readable> extends ChildProcess {
+ stdin: I;
+ stdout: O;
+ stderr: E;
+ readonly stdio: [
+ I,
+ O,
+ E,
+ Readable | Writable | null | undefined,
+ // extra, no modification
+ Readable | Writable | null | undefined // extra, no modification
+ ];
+ }
+ interface MessageOptions {
+ keepOpen?: boolean | undefined;
+ }
+ type IOType = 'overlapped' | 'pipe' | 'ignore' | 'inherit';
+ type StdioOptions = IOType | Array<IOType | 'ipc' | Stream | number | null | undefined>;
+ type SerializationType = 'json' | 'advanced';
+ interface MessagingOptions extends Abortable {
+ /**
+ * Specify the kind of serialization used for sending messages between processes.
+ * @default 'json'
+ */
+ serialization?: SerializationType | undefined;
+ /**
+ * The signal value to be used when the spawned process will be killed by the abort signal.
+ * @default 'SIGTERM'
+ */
+ killSignal?: NodeJS.Signals | number | undefined;
+ /**
+ * In milliseconds the maximum amount of time the process is allowed to run.
+ */
+ timeout?: number | undefined;
+ }
+ interface ProcessEnvOptions {
+ uid?: number | undefined;
+ gid?: number | undefined;
+ cwd?: string | URL | undefined;
+ env?: NodeJS.ProcessEnv | undefined;
+ }
+ interface CommonOptions extends ProcessEnvOptions {
+ /**
+ * @default false
+ */
+ windowsHide?: boolean | undefined;
+ /**
+ * @default 0
+ */
+ timeout?: number | undefined;
+ }
+ interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable {
+ argv0?: string | undefined;
+ /**
+ * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings.
+ * If passed as an array, the first element is used for `stdin`, the second for
+ * `stdout`, and the third for `stderr`. A fourth element can be used to
+ * specify the `stdio` behavior beyond the standard streams. See
+ * {@link ChildProcess.stdio} for more information.
+ *
+ * @default 'pipe'
+ */
+ stdio?: StdioOptions | undefined;
+ shell?: boolean | string | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ }
+ interface SpawnOptions extends CommonSpawnOptions {
+ detached?: boolean | undefined;
+ }
+ interface SpawnOptionsWithoutStdio extends SpawnOptions {
+ stdio?: StdioPipeNamed | StdioPipe[] | undefined;
+ }
+ type StdioNull = 'inherit' | 'ignore' | Stream;
+ type StdioPipeNamed = 'pipe' | 'overlapped';
+ type StdioPipe = undefined | null | StdioPipeNamed;
+ interface SpawnOptionsWithStdioTuple<Stdin extends StdioNull | StdioPipe, Stdout extends StdioNull | StdioPipe, Stderr extends StdioNull | StdioPipe> extends SpawnOptions {
+ stdio: [Stdin, Stdout, Stderr];
+ }
+ /**
+ * The `child_process.spawn()` method spawns a new process using the given`command`, with command-line arguments in `args`. If omitted, `args` defaults
+ * to an empty array.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ *
+ * A third argument may be used to specify additional options, with these defaults:
+ *
+ * ```js
+ * const defaults = {
+ * cwd: undefined,
+ * env: process.env,
+ * };
+ * ```
+ *
+ * Use `cwd` to specify the working directory from which the process is spawned.
+ * If not given, the default is to inherit the current working directory. If given,
+ * but the path does not exist, the child process emits an `ENOENT` error
+ * and exits immediately. `ENOENT` is also emitted when the command
+ * does not exist.
+ *
+ * Use `env` to specify environment variables that will be visible to the new
+ * process, the default is `process.env`.
+ *
+ * `undefined` values in `env` will be ignored.
+ *
+ * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the
+ * exit code:
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ * const ls = spawn('ls', ['-lh', '/usr']);
+ *
+ * ls.stdout.on('data', (data) => {
+ * console.log(`stdout: ${data}`);
+ * });
+ *
+ * ls.stderr.on('data', (data) => {
+ * console.error(`stderr: ${data}`);
+ * });
+ *
+ * ls.on('close', (code) => {
+ * console.log(`child process exited with code ${code}`);
+ * });
+ * ```
+ *
+ * Example: A very elaborate way to run `ps ax | grep ssh`
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ * const ps = spawn('ps', ['ax']);
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * ps.stdout.on('data', (data) => {
+ * grep.stdin.write(data);
+ * });
+ *
+ * ps.stderr.on('data', (data) => {
+ * console.error(`ps stderr: ${data}`);
+ * });
+ *
+ * ps.on('close', (code) => {
+ * if (code !== 0) {
+ * console.log(`ps process exited with code ${code}`);
+ * }
+ * grep.stdin.end();
+ * });
+ *
+ * grep.stdout.on('data', (data) => {
+ * console.log(data.toString());
+ * });
+ *
+ * grep.stderr.on('data', (data) => {
+ * console.error(`grep stderr: ${data}`);
+ * });
+ *
+ * grep.on('close', (code) => {
+ * if (code !== 0) {
+ * console.log(`grep process exited with code ${code}`);
+ * }
+ * });
+ * ```
+ *
+ * Example of checking for failed `spawn`:
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ * const subprocess = spawn('bad_command');
+ *
+ * subprocess.on('error', (err) => {
+ * console.error('Failed to start subprocess.');
+ * });
+ * ```
+ *
+ * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process
+ * title while others (Windows, SunOS) will use `command`.
+ *
+ * Node.js overwrites `argv[0]` with `process.execPath` on startup, so`process.argv[0]` in a Node.js child process will not match the `argv0`parameter passed to `spawn` from the parent. Retrieve
+ * it with the`process.argv0` property instead.
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * const { spawn } = require('node:child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const grep = spawn('grep', ['ssh'], { signal });
+ * grep.on('error', (err) => {
+ * // This will be called with err being an AbortError if the controller aborts
+ * });
+ * controller.abort(); // Stops the child process
+ * ```
+ * @since v0.1.90
+ * @param command The command to run.
+ * @param args List of string arguments.
+ */
+ function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>): ChildProcessByStdio<Writable, Readable, Readable>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>): ChildProcessByStdio<Writable, Readable, null>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>): ChildProcessByStdio<Writable, null, Readable>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>): ChildProcessByStdio<null, Readable, Readable>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>): ChildProcessByStdio<Writable, null, null>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>): ChildProcessByStdio<null, Readable, null>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>): ChildProcessByStdio<null, null, Readable>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>): ChildProcessByStdio<null, null, null>;
+ function spawn(command: string, options: SpawnOptions): ChildProcess;
+ // overloads of spawn with 'args'
+ function spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>): ChildProcessByStdio<Writable, Readable, Readable>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>): ChildProcessByStdio<Writable, Readable, null>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>): ChildProcessByStdio<Writable, null, Readable>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>): ChildProcessByStdio<null, Readable, Readable>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>): ChildProcessByStdio<Writable, null, null>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>): ChildProcessByStdio<null, Readable, null>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>): ChildProcessByStdio<null, null, Readable>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>): ChildProcessByStdio<null, null, null>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
+ interface ExecOptions extends CommonOptions {
+ shell?: string | undefined;
+ signal?: AbortSignal | undefined;
+ maxBuffer?: number | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ }
+ interface ExecOptionsWithStringEncoding extends ExecOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecOptionsWithBufferEncoding extends ExecOptions {
+ encoding: BufferEncoding | null; // specify `null`.
+ }
+ interface ExecException extends Error {
+ cmd?: string | undefined;
+ killed?: boolean | undefined;
+ code?: number | undefined;
+ signal?: NodeJS.Signals | undefined;
+ }
+ /**
+ * Spawns a shell then executes the `command` within that shell, buffering any
+ * generated output. The `command` string passed to the exec function is processed
+ * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters))
+ * need to be dealt with accordingly:
+ *
+ * ```js
+ * const { exec } = require('node:child_process');
+ *
+ * exec('"/path/to/test file/test.sh" arg1 arg2');
+ * // Double quotes are used so that the space in the path is not interpreted as
+ * // a delimiter of multiple arguments.
+ *
+ * exec('echo "The \\$HOME variable is $HOME"');
+ * // The $HOME variable is escaped in the first instance, but not in the second.
+ * ```
+ *
+ * **Never pass unsanitized user input to this function. Any input containing shell**
+ * **metacharacters may be used to trigger arbitrary command execution.**
+ *
+ * If a `callback` function is provided, it is called with the arguments`(error, stdout, stderr)`. On success, `error` will be `null`. On error,`error` will be an instance of `Error`. The
+ * `error.code` property will be
+ * the exit code of the process. By convention, any exit code other than `0`indicates an error. `error.signal` will be the signal that terminated the
+ * process.
+ *
+ * The `stdout` and `stderr` arguments passed to the callback will contain the
+ * stdout and stderr output of the child process. By default, Node.js will decode
+ * the output as UTF-8 and pass strings to the callback. The `encoding` option
+ * can be used to specify the character encoding used to decode the stdout and
+ * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
+ * encoding, `Buffer` objects will be passed to the callback instead.
+ *
+ * ```js
+ * const { exec } = require('node:child_process');
+ * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => {
+ * if (error) {
+ * console.error(`exec error: ${error}`);
+ * return;
+ * }
+ * console.log(`stdout: ${stdout}`);
+ * console.error(`stderr: ${stderr}`);
+ * });
+ * ```
+ *
+ * If `timeout` is greater than `0`, the parent will send the signal
+ * identified by the `killSignal` property (the default is `'SIGTERM'`) if the
+ * child runs longer than `timeout` milliseconds.
+ *
+ * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace
+ * the existing process and uses a shell to execute the command.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In
+ * case of an error (including any error resulting in an exit code other than 0), a
+ * rejected promise is returned, with the same `error` object given in the
+ * callback, but with two additional properties `stdout` and `stderr`.
+ *
+ * ```js
+ * const util = require('node:util');
+ * const exec = util.promisify(require('node:child_process').exec);
+ *
+ * async function lsExample() {
+ * const { stdout, stderr } = await exec('ls');
+ * console.log('stdout:', stdout);
+ * console.error('stderr:', stderr);
+ * }
+ * lsExample();
+ * ```
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * const { exec } = require('node:child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = exec('grep ssh', { signal }, (error) => {
+ * console.error(error); // an AbortError
+ * });
+ * controller.abort();
+ * ```
+ * @since v0.1.90
+ * @param command The command to run, with space-separated arguments.
+ * @param callback called with the output when process terminates.
+ */
+ function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+ function exec(
+ command: string,
+ options: {
+ encoding: 'buffer' | null;
+ } & ExecOptions,
+ callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void
+ ): ChildProcess;
+ // `options` with well known `encoding` means stdout/stderr are definitely `string`.
+ function exec(
+ command: string,
+ options: {
+ encoding: BufferEncoding;
+ } & ExecOptions,
+ callback?: (error: ExecException | null, stdout: string, stderr: string) => void
+ ): ChildProcess;
+ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
+ // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
+ function exec(
+ command: string,
+ options: {
+ encoding: BufferEncoding;
+ } & ExecOptions,
+ callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void
+ ): ChildProcess;
+ // `options` without an `encoding` means stdout/stderr are definitely `string`.
+ function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
+ function exec(
+ command: string,
+ options: (ObjectEncodingOptions & ExecOptions) | undefined | null,
+ callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void
+ ): ChildProcess;
+ interface PromiseWithChild<T> extends Promise<T> {
+ child: ChildProcess;
+ }
+ namespace exec {
+ function __promisify__(command: string): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ command: string,
+ options: {
+ encoding: 'buffer' | null;
+ } & ExecOptions
+ ): PromiseWithChild<{
+ stdout: Buffer;
+ stderr: Buffer;
+ }>;
+ function __promisify__(
+ command: string,
+ options: {
+ encoding: BufferEncoding;
+ } & ExecOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ command: string,
+ options: ExecOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ command: string,
+ options?: (ObjectEncodingOptions & ExecOptions) | null
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ }
+ interface ExecFileOptions extends CommonOptions, Abortable {
+ maxBuffer?: number | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ shell?: boolean | string | undefined;
+ signal?: AbortSignal | undefined;
+ }
+ interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
+ encoding: 'buffer' | null;
+ }
+ interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {
+ encoding: BufferEncoding;
+ }
+ type ExecFileException =
+ & Omit<ExecException, 'code'>
+ & Omit<NodeJS.ErrnoException, 'code'>
+ & { code?: string | number | undefined | null };
+ /**
+ * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified
+ * executable `file` is spawned directly as a new process making it slightly more
+ * efficient than {@link exec}.
+ *
+ * The same options as {@link exec} are supported. Since a shell is
+ * not spawned, behaviors such as I/O redirection and file globbing are not
+ * supported.
+ *
+ * ```js
+ * const { execFile } = require('node:child_process');
+ * const child = execFile('node', ['--version'], (error, stdout, stderr) => {
+ * if (error) {
+ * throw error;
+ * }
+ * console.log(stdout);
+ * });
+ * ```
+ *
+ * The `stdout` and `stderr` arguments passed to the callback will contain the
+ * stdout and stderr output of the child process. By default, Node.js will decode
+ * the output as UTF-8 and pass strings to the callback. The `encoding` option
+ * can be used to specify the character encoding used to decode the stdout and
+ * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
+ * encoding, `Buffer` objects will be passed to the callback instead.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In
+ * case of an error (including any error resulting in an exit code other than 0), a
+ * rejected promise is returned, with the same `error` object given in the
+ * callback, but with two additional properties `stdout` and `stderr`.
+ *
+ * ```js
+ * const util = require('node:util');
+ * const execFile = util.promisify(require('node:child_process').execFile);
+ * async function getVersion() {
+ * const { stdout } = await execFile('node', ['--version']);
+ * console.log(stdout);
+ * }
+ * getVersion();
+ * ```
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * const { execFile } = require('node:child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = execFile('node', ['--version'], { signal }, (error) => {
+ * console.error(error); // an AbortError
+ * });
+ * controller.abort();
+ * ```
+ * @since v0.1.91
+ * @param file The name or path of the executable file to run.
+ * @param args List of string arguments.
+ * @param callback Called with the output when process terminates.
+ */
+ function execFile(file: string): ChildProcess;
+ function execFile(file: string, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
+ function execFile(file: string, args?: ReadonlyArray<string> | null): ChildProcess;
+ function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
+ // no `options` definitely means stdout/stderr are `string`.
+ function execFile(file: string, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(file: string, args: ReadonlyArray<string> | undefined | null, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+ function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithBufferEncoding,
+ callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void
+ ): ChildProcess;
+ // `options` with well known `encoding` means stdout/stderr are definitely `string`.
+ function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithStringEncoding,
+ callback: (error: ExecFileException | null, stdout: string, stderr: string) => void
+ ): ChildProcess;
+ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
+ // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
+ function execFile(file: string, options: ExecFileOptionsWithOtherEncoding, callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithOtherEncoding,
+ callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void
+ ): ChildProcess;
+ // `options` without an `encoding` means stdout/stderr are definitely `string`.
+ function execFile(file: string, options: ExecFileOptions, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptions,
+ callback: (error: ExecFileException | null, stdout: string, stderr: string) => void
+ ): ChildProcess;
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
+ function execFile(
+ file: string,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
+ callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null
+ ): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
+ callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null
+ ): ChildProcess;
+ namespace execFile {
+ function __promisify__(file: string): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptionsWithBufferEncoding
+ ): PromiseWithChild<{
+ stdout: Buffer;
+ stderr: Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithBufferEncoding
+ ): PromiseWithChild<{
+ stdout: Buffer;
+ stderr: Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptionsWithStringEncoding
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithStringEncoding
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptionsWithOtherEncoding
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithOtherEncoding
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ }
+ interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable {
+ execPath?: string | undefined;
+ execArgv?: string[] | undefined;
+ silent?: boolean | undefined;
+ /**
+ * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings.
+ * If passed as an array, the first element is used for `stdin`, the second for
+ * `stdout`, and the third for `stderr`. A fourth element can be used to
+ * specify the `stdio` behavior beyond the standard streams. See
+ * {@link ChildProcess.stdio} for more information.
+ *
+ * @default 'pipe'
+ */
+ stdio?: StdioOptions | undefined;
+ detached?: boolean | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ }
+ /**
+ * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes.
+ * Like {@link spawn}, a `ChildProcess` object is returned. The
+ * returned `ChildProcess` will have an additional communication channel
+ * built-in that allows messages to be passed back and forth between the parent and
+ * child. See `subprocess.send()` for details.
+ *
+ * Keep in mind that spawned Node.js child processes are
+ * independent of the parent with exception of the IPC communication channel
+ * that is established between the two. Each process has its own memory, with
+ * their own V8 instances. Because of the additional resource allocations
+ * required, spawning a large number of child Node.js processes is not
+ * recommended.
+ *
+ * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the`options` object allows for an alternative
+ * execution path to be used.
+ *
+ * Node.js processes launched with a custom `execPath` will communicate with the
+ * parent process using the file descriptor (fd) identified using the
+ * environment variable `NODE_CHANNEL_FD` on the child process.
+ *
+ * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the
+ * current process.
+ *
+ * The `shell` option available in {@link spawn} is not supported by`child_process.fork()` and will be ignored if set.
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * if (process.argv[2] === 'child') {
+ * setTimeout(() => {
+ * console.log(`Hello from ${process.argv[2]}!`);
+ * }, 1_000);
+ * } else {
+ * const { fork } = require('node:child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = fork(__filename, ['child'], { signal });
+ * child.on('error', (err) => {
+ * // This will be called with err being an AbortError if the controller aborts
+ * });
+ * controller.abort(); // Stops the child process
+ * }
+ * ```
+ * @since v0.5.0
+ * @param modulePath The module to run in the child.
+ * @param args List of string arguments.
+ */
+ function fork(modulePath: string, options?: ForkOptions): ChildProcess;
+ function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
+ interface SpawnSyncOptions extends CommonSpawnOptions {
+ input?: string | NodeJS.ArrayBufferView | undefined;
+ maxBuffer?: number | undefined;
+ encoding?: BufferEncoding | 'buffer' | null | undefined;
+ }
+ interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
+ encoding?: 'buffer' | null | undefined;
+ }
+ interface SpawnSyncReturns<T> {
+ pid: number;
+ output: Array<T | null>;
+ stdout: T;
+ stderr: T;
+ status: number | null;
+ signal: NodeJS.Signals | null;
+ error?: Error | undefined;
+ }
+ /**
+ * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return
+ * until the child process has fully closed. When a timeout has been encountered
+ * and `killSignal` is sent, the method won't return until the process has
+ * completely exited. If the process intercepts and handles the `SIGTERM` signal
+ * and doesn't exit, the parent process will wait until the child process has
+ * exited.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ * @since v0.11.12
+ * @param command The command to run.
+ * @param args List of string arguments.
+ */
+ function spawnSync(command: string): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
+ function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
+ function spawnSync(command: string, args: ReadonlyArray<string>): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, args: ReadonlyArray<string>, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
+ function spawnSync(command: string, args: ReadonlyArray<string>, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
+ interface CommonExecOptions extends CommonOptions {
+ input?: string | NodeJS.ArrayBufferView | undefined;
+ /**
+ * Can be set to 'pipe', 'inherit, or 'ignore', or an array of these strings.
+ * If passed as an array, the first element is used for `stdin`, the second for
+ * `stdout`, and the third for `stderr`. A fourth element can be used to
+ * specify the `stdio` behavior beyond the standard streams. See
+ * {@link ChildProcess.stdio} for more information.
+ *
+ * @default 'pipe'
+ */
+ stdio?: StdioOptions | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ maxBuffer?: number | undefined;
+ encoding?: BufferEncoding | 'buffer' | null | undefined;
+ }
+ interface ExecSyncOptions extends CommonExecOptions {
+ shell?: string | undefined;
+ }
+ interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
+ encoding?: 'buffer' | null | undefined;
+ }
+ /**
+ * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return
+ * until the child process has fully closed. When a timeout has been encountered
+ * and `killSignal` is sent, the method won't return until the process has
+ * completely exited. If the child process intercepts and handles the `SIGTERM`signal and doesn't exit, the parent process will wait until the child process
+ * has exited.
+ *
+ * If the process times out or has a non-zero exit code, this method will throw.
+ * The `Error` object will contain the entire result from {@link spawnSync}.
+ *
+ * **Never pass unsanitized user input to this function. Any input containing shell**
+ * **metacharacters may be used to trigger arbitrary command execution.**
+ * @since v0.11.12
+ * @param command The command to run.
+ * @return The stdout from the command.
+ */
+ function execSync(command: string): Buffer;
+ function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string;
+ function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): Buffer;
+ function execSync(command: string, options?: ExecSyncOptions): string | Buffer;
+ interface ExecFileSyncOptions extends CommonExecOptions {
+ shell?: boolean | string | undefined;
+ }
+ interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
+ encoding?: 'buffer' | null; // specify `null`.
+ }
+ /**
+ * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not
+ * return until the child process has fully closed. When a timeout has been
+ * encountered and `killSignal` is sent, the method won't return until the process
+ * has completely exited.
+ *
+ * If the child process intercepts and handles the `SIGTERM` signal and
+ * does not exit, the parent process will still wait until the child process has
+ * exited.
+ *
+ * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ * @since v0.11.12
+ * @param file The name or path of the executable file to run.
+ * @param args List of string arguments.
+ * @return The stdout from the command.
+ */
+ function execFileSync(file: string): Buffer;
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string;
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ function execFileSync(file: string, options?: ExecFileSyncOptions): string | Buffer;
+ function execFileSync(file: string, args: ReadonlyArray<string>): Buffer;
+ function execFileSync(file: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithStringEncoding): string;
+ function execFileSync(file: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ function execFileSync(file: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): string | Buffer;
+}
+declare module 'node:child_process' {
+ export * from 'child_process';
+}
diff --git a/node_modules/@types/node/ts4.8/cluster.d.ts b/node_modules/@types/node/ts4.8/cluster.d.ts
new file mode 100755
index 0000000..4fa9aef
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/cluster.d.ts
@@ -0,0 +1,414 @@
+/**
+ * Clusters of Node.js processes can be used to run multiple instances of Node.js
+ * that can distribute workloads among their application threads. When process
+ * isolation is not needed, use the `worker_threads` module instead, which
+ * allows running multiple application threads within a single Node.js instance.
+ *
+ * The cluster module allows easy creation of child processes that all share
+ * server ports.
+ *
+ * ```js
+ * import cluster from 'node:cluster';
+ * import http from 'node:http';
+ * import { availableParallelism } from 'node:os';
+ * import process from 'node:process';
+ *
+ * const numCPUs = availableParallelism();
+ *
+ * if (cluster.isPrimary) {
+ * console.log(`Primary ${process.pid} is running`);
+ *
+ * // Fork workers.
+ * for (let i = 0; i < numCPUs; i++) {
+ * cluster.fork();
+ * }
+ *
+ * cluster.on('exit', (worker, code, signal) => {
+ * console.log(`worker ${worker.process.pid} died`);
+ * });
+ * } else {
+ * // Workers can share any TCP connection
+ * // In this case it is an HTTP server
+ * http.createServer((req, res) => {
+ * res.writeHead(200);
+ * res.end('hello world\n');
+ * }).listen(8000);
+ *
+ * console.log(`Worker ${process.pid} started`);
+ * }
+ * ```
+ *
+ * Running Node.js will now share port 8000 between the workers:
+ *
+ * ```console
+ * $ node server.js
+ * Primary 3596 is running
+ * Worker 4324 started
+ * Worker 4520 started
+ * Worker 6056 started
+ * Worker 5644 started
+ * ```
+ *
+ * On Windows, it is not yet possible to set up a named pipe server in a worker.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/cluster.js)
+ */
+declare module 'cluster' {
+ import * as child from 'node:child_process';
+ import EventEmitter = require('node:events');
+ import * as net from 'node:net';
+ type SerializationType = 'json' | 'advanced';
+ export interface ClusterSettings {
+ execArgv?: string[] | undefined; // default: process.execArgv
+ exec?: string | undefined;
+ args?: string[] | undefined;
+ silent?: boolean | undefined;
+ stdio?: any[] | undefined;
+ uid?: number | undefined;
+ gid?: number | undefined;
+ inspectPort?: number | (() => number) | undefined;
+ serialization?: SerializationType | undefined;
+ cwd?: string | undefined;
+ windowsHide?: boolean | undefined;
+ }
+ export interface Address {
+ address: string;
+ port: number;
+ addressType: number | 'udp4' | 'udp6'; // 4, 6, -1, "udp4", "udp6"
+ }
+ /**
+ * A `Worker` object contains all public information and method about a worker.
+ * In the primary it can be obtained using `cluster.workers`. In a worker
+ * it can be obtained using `cluster.worker`.
+ * @since v0.7.0
+ */
+ export class Worker extends EventEmitter {
+ /**
+ * Each new worker is given its own unique id, this id is stored in the`id`.
+ *
+ * While a worker is alive, this is the key that indexes it in`cluster.workers`.
+ * @since v0.8.0
+ */
+ id: number;
+ /**
+ * All workers are created using `child_process.fork()`, the returned object
+ * from this function is stored as `.process`. In a worker, the global `process`is stored.
+ *
+ * See: `Child Process module`.
+ *
+ * Workers will call `process.exit(0)` if the `'disconnect'` event occurs
+ * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
+ * accidental disconnection.
+ * @since v0.7.0
+ */
+ process: child.ChildProcess;
+ /**
+ * Send a message to a worker or primary, optionally with a handle.
+ *
+ * In the primary, this sends a message to a specific worker. It is identical to `ChildProcess.send()`.
+ *
+ * In a worker, this sends a message to the primary. It is identical to`process.send()`.
+ *
+ * This example will echo back all messages from the primary:
+ *
+ * ```js
+ * if (cluster.isPrimary) {
+ * const worker = cluster.fork();
+ * worker.send('hi there');
+ *
+ * } else if (cluster.isWorker) {
+ * process.on('message', (msg) => {
+ * process.send(msg);
+ * });
+ * }
+ * ```
+ * @since v0.7.0
+ * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
+ */
+ send(message: child.Serializable, callback?: (error: Error | null) => void): boolean;
+ send(message: child.Serializable, sendHandle: child.SendHandle, callback?: (error: Error | null) => void): boolean;
+ send(message: child.Serializable, sendHandle: child.SendHandle, options?: child.MessageOptions, callback?: (error: Error | null) => void): boolean;
+ /**
+ * This function will kill the worker. In the primary worker, it does this by
+ * disconnecting the `worker.process`, and once disconnected, killing with`signal`. In the worker, it does it by killing the process with `signal`.
+ *
+ * The `kill()` function kills the worker process without waiting for a graceful
+ * disconnect, it has the same behavior as `worker.process.kill()`.
+ *
+ * This method is aliased as `worker.destroy()` for backwards compatibility.
+ *
+ * In a worker, `process.kill()` exists, but it is not this function;
+ * it is `kill()`.
+ * @since v0.9.12
+ * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process.
+ */
+ kill(signal?: string): void;
+ destroy(signal?: string): void;
+ /**
+ * In a worker, this function will close all servers, wait for the `'close'` event
+ * on those servers, and then disconnect the IPC channel.
+ *
+ * In the primary, an internal message is sent to the worker causing it to call`.disconnect()` on itself.
+ *
+ * Causes `.exitedAfterDisconnect` to be set.
+ *
+ * After a server is closed, it will no longer accept new connections,
+ * but connections may be accepted by any other listening worker. Existing
+ * connections will be allowed to close as usual. When no more connections exist,
+ * see `server.close()`, the IPC channel to the worker will close allowing it
+ * to die gracefully.
+ *
+ * The above applies _only_ to server connections, client connections are not
+ * automatically closed by workers, and disconnect does not wait for them to close
+ * before exiting.
+ *
+ * In a worker, `process.disconnect` exists, but it is not this function;
+ * it is `disconnect()`.
+ *
+ * Because long living server connections may block workers from disconnecting, it
+ * may be useful to send a message, so application specific actions may be taken to
+ * close them. It also may be useful to implement a timeout, killing a worker if
+ * the `'disconnect'` event has not been emitted after some time.
+ *
+ * ```js
+ * if (cluster.isPrimary) {
+ * const worker = cluster.fork();
+ * let timeout;
+ *
+ * worker.on('listening', (address) => {
+ * worker.send('shutdown');
+ * worker.disconnect();
+ * timeout = setTimeout(() => {
+ * worker.kill();
+ * }, 2000);
+ * });
+ *
+ * worker.on('disconnect', () => {
+ * clearTimeout(timeout);
+ * });
+ *
+ * } else if (cluster.isWorker) {
+ * const net = require('node:net');
+ * const server = net.createServer((socket) => {
+ * // Connections never end
+ * });
+ *
+ * server.listen(8000);
+ *
+ * process.on('message', (msg) => {
+ * if (msg === 'shutdown') {
+ * // Initiate graceful close of any connections to server
+ * }
+ * });
+ * }
+ * ```
+ * @since v0.7.7
+ * @return A reference to `worker`.
+ */
+ disconnect(): void;
+ /**
+ * This function returns `true` if the worker is connected to its primary via its
+ * IPC channel, `false` otherwise. A worker is connected to its primary after it
+ * has been created. It is disconnected after the `'disconnect'` event is emitted.
+ * @since v0.11.14
+ */
+ isConnected(): boolean;
+ /**
+ * This function returns `true` if the worker's process has terminated (either
+ * because of exiting or being signaled). Otherwise, it returns `false`.
+ *
+ * ```js
+ * import cluster from 'node:cluster';
+ * import http from 'node:http';
+ * import { availableParallelism } from 'node:os';
+ * import process from 'node:process';
+ *
+ * const numCPUs = availableParallelism();
+ *
+ * if (cluster.isPrimary) {
+ * console.log(`Primary ${process.pid} is running`);
+ *
+ * // Fork workers.
+ * for (let i = 0; i < numCPUs; i++) {
+ * cluster.fork();
+ * }
+ *
+ * cluster.on('fork', (worker) => {
+ * console.log('worker is dead:', worker.isDead());
+ * });
+ *
+ * cluster.on('exit', (worker, code, signal) => {
+ * console.log('worker is dead:', worker.isDead());
+ * });
+ * } else {
+ * // Workers can share any TCP connection. In this case, it is an HTTP server.
+ * http.createServer((req, res) => {
+ * res.writeHead(200);
+ * res.end(`Current process\n ${process.pid}`);
+ * process.kill(process.pid);
+ * }).listen(8000);
+ * }
+ * ```
+ * @since v0.11.14
+ */
+ isDead(): boolean;
+ /**
+ * This property is `true` if the worker exited due to `.disconnect()`.
+ * If the worker exited any other way, it is `false`. If the
+ * worker has not exited, it is `undefined`.
+ *
+ * The boolean `worker.exitedAfterDisconnect` allows distinguishing between
+ * voluntary and accidental exit, the primary may choose not to respawn a worker
+ * based on this value.
+ *
+ * ```js
+ * cluster.on('exit', (worker, code, signal) => {
+ * if (worker.exitedAfterDisconnect === true) {
+ * console.log('Oh, it was just voluntary – no need to worry');
+ * }
+ * });
+ *
+ * // kill worker
+ * worker.kill();
+ * ```
+ * @since v6.0.0
+ */
+ exitedAfterDisconnect: boolean;
+ /**
+ * events.EventEmitter
+ * 1. disconnect
+ * 2. error
+ * 3. exit
+ * 4. listening
+ * 5. message
+ * 6. online
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'disconnect', listener: () => void): this;
+ addListener(event: 'error', listener: (error: Error) => void): this;
+ addListener(event: 'exit', listener: (code: number, signal: string) => void): this;
+ addListener(event: 'listening', listener: (address: Address) => void): this;
+ addListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ addListener(event: 'online', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'disconnect'): boolean;
+ emit(event: 'error', error: Error): boolean;
+ emit(event: 'exit', code: number, signal: string): boolean;
+ emit(event: 'listening', address: Address): boolean;
+ emit(event: 'message', message: any, handle: net.Socket | net.Server): boolean;
+ emit(event: 'online'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'disconnect', listener: () => void): this;
+ on(event: 'error', listener: (error: Error) => void): this;
+ on(event: 'exit', listener: (code: number, signal: string) => void): this;
+ on(event: 'listening', listener: (address: Address) => void): this;
+ on(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ on(event: 'online', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'disconnect', listener: () => void): this;
+ once(event: 'error', listener: (error: Error) => void): this;
+ once(event: 'exit', listener: (code: number, signal: string) => void): this;
+ once(event: 'listening', listener: (address: Address) => void): this;
+ once(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ once(event: 'online', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'disconnect', listener: () => void): this;
+ prependListener(event: 'error', listener: (error: Error) => void): this;
+ prependListener(event: 'exit', listener: (code: number, signal: string) => void): this;
+ prependListener(event: 'listening', listener: (address: Address) => void): this;
+ prependListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ prependListener(event: 'online', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'disconnect', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (error: Error) => void): this;
+ prependOnceListener(event: 'exit', listener: (code: number, signal: string) => void): this;
+ prependOnceListener(event: 'listening', listener: (address: Address) => void): this;
+ prependOnceListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ prependOnceListener(event: 'online', listener: () => void): this;
+ }
+ export interface Cluster extends EventEmitter {
+ disconnect(callback?: () => void): void;
+ fork(env?: any): Worker;
+ /** @deprecated since v16.0.0 - use isPrimary. */
+ readonly isMaster: boolean;
+ readonly isPrimary: boolean;
+ readonly isWorker: boolean;
+ schedulingPolicy: number;
+ readonly settings: ClusterSettings;
+ /** @deprecated since v16.0.0 - use setupPrimary. */
+ setupMaster(settings?: ClusterSettings): void;
+ /**
+ * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in cluster.settings.
+ */
+ setupPrimary(settings?: ClusterSettings): void;
+ readonly worker?: Worker | undefined;
+ readonly workers?: NodeJS.Dict<Worker> | undefined;
+ readonly SCHED_NONE: number;
+ readonly SCHED_RR: number;
+ /**
+ * events.EventEmitter
+ * 1. disconnect
+ * 2. exit
+ * 3. fork
+ * 4. listening
+ * 5. message
+ * 6. online
+ * 7. setup
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'disconnect', listener: (worker: Worker) => void): this;
+ addListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ addListener(event: 'fork', listener: (worker: Worker) => void): this;
+ addListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ addListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ addListener(event: 'online', listener: (worker: Worker) => void): this;
+ addListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'disconnect', worker: Worker): boolean;
+ emit(event: 'exit', worker: Worker, code: number, signal: string): boolean;
+ emit(event: 'fork', worker: Worker): boolean;
+ emit(event: 'listening', worker: Worker, address: Address): boolean;
+ emit(event: 'message', worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
+ emit(event: 'online', worker: Worker): boolean;
+ emit(event: 'setup', settings: ClusterSettings): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'disconnect', listener: (worker: Worker) => void): this;
+ on(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ on(event: 'fork', listener: (worker: Worker) => void): this;
+ on(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ on(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ on(event: 'online', listener: (worker: Worker) => void): this;
+ on(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'disconnect', listener: (worker: Worker) => void): this;
+ once(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ once(event: 'fork', listener: (worker: Worker) => void): this;
+ once(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ once(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ once(event: 'online', listener: (worker: Worker) => void): this;
+ once(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'disconnect', listener: (worker: Worker) => void): this;
+ prependListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ prependListener(event: 'fork', listener: (worker: Worker) => void): this;
+ prependListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ prependListener(event: 'message', listener: (worker: Worker, message: any, handle?: net.Socket | net.Server) => void): this;
+ prependListener(event: 'online', listener: (worker: Worker) => void): this;
+ prependListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'disconnect', listener: (worker: Worker) => void): this;
+ prependOnceListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ prependOnceListener(event: 'fork', listener: (worker: Worker) => void): this;
+ prependOnceListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ prependOnceListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;
+ prependOnceListener(event: 'online', listener: (worker: Worker) => void): this;
+ prependOnceListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ }
+ const cluster: Cluster;
+ export default cluster;
+}
+declare module 'node:cluster' {
+ export * from 'cluster';
+ export { default as default } from 'cluster';
+}
diff --git a/node_modules/@types/node/ts4.8/console.d.ts b/node_modules/@types/node/ts4.8/console.d.ts
new file mode 100755
index 0000000..7e35638
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/console.d.ts
@@ -0,0 +1,412 @@
+/**
+ * The `node:console` module provides a simple debugging console that is similar to
+ * the JavaScript console mechanism provided by web browsers.
+ *
+ * The module exports two specific components:
+ *
+ * * A `Console` class with methods such as `console.log()`, `console.error()`, and`console.warn()` that can be used to write to any Node.js stream.
+ * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('node:console')`.
+ *
+ * _**Warning**_: The global console object's methods are neither consistently
+ * synchronous like the browser APIs they resemble, nor are they consistently
+ * asynchronous like all other Node.js streams. See the `note on process I/O` for
+ * more information.
+ *
+ * Example using the global `console`:
+ *
+ * ```js
+ * console.log('hello world');
+ * // Prints: hello world, to stdout
+ * console.log('hello %s', 'world');
+ * // Prints: hello world, to stdout
+ * console.error(new Error('Whoops, something bad happened'));
+ * // Prints error message and stack trace to stderr:
+ * // Error: Whoops, something bad happened
+ * // at [eval]:5:15
+ * // at Script.runInThisContext (node:vm:132:18)
+ * // at Object.runInThisContext (node:vm:309:38)
+ * // at node:internal/process/execution:77:19
+ * // at [eval]-wrapper:6:22
+ * // at evalScript (node:internal/process/execution:76:60)
+ * // at node:internal/main/eval_string:23:3
+ *
+ * const name = 'Will Robinson';
+ * console.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to stderr
+ * ```
+ *
+ * Example using the `Console` class:
+ *
+ * ```js
+ * const out = getStreamSomehow();
+ * const err = getStreamSomehow();
+ * const myConsole = new console.Console(out, err);
+ *
+ * myConsole.log('hello world');
+ * // Prints: hello world, to out
+ * myConsole.log('hello %s', 'world');
+ * // Prints: hello world, to out
+ * myConsole.error(new Error('Whoops, something bad happened'));
+ * // Prints: [Error: Whoops, something bad happened], to err
+ *
+ * const name = 'Will Robinson';
+ * myConsole.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to err
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/console.js)
+ */
+declare module 'console' {
+ import console = require('node:console');
+ export = console;
+}
+declare module 'node:console' {
+ import { InspectOptions } from 'node:util';
+ global {
+ // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
+ interface Console {
+ Console: console.ConsoleConstructor;
+ /**
+ * `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only
+ * writes a message and does not otherwise affect execution. The output always
+ * starts with `"Assertion failed"`. If provided, `message` is formatted using `util.format()`.
+ *
+ * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens.
+ *
+ * ```js
+ * console.assert(true, 'does nothing');
+ *
+ * console.assert(false, 'Whoops %s work', 'didn\'t');
+ * // Assertion failed: Whoops didn't work
+ *
+ * console.assert();
+ * // Assertion failed
+ * ```
+ * @since v0.1.101
+ * @param value The value tested for being truthy.
+ * @param message All arguments besides `value` are used as error message.
+ */
+ assert(value: any, message?: string, ...optionalParams: any[]): void;
+ /**
+ * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the
+ * TTY. When `stdout` is not a TTY, this method does nothing.
+ *
+ * The specific operation of `console.clear()` can vary across operating systems
+ * and terminal types. For most Linux operating systems, `console.clear()`operates similarly to the `clear` shell command. On Windows, `console.clear()`will clear only the output in the
+ * current terminal viewport for the Node.js
+ * binary.
+ * @since v8.3.0
+ */
+ clear(): void;
+ /**
+ * Maintains an internal counter specific to `label` and outputs to `stdout` the
+ * number of times `console.count()` has been called with the given `label`.
+ *
+ * ```js
+ * > console.count()
+ * default: 1
+ * undefined
+ * > console.count('default')
+ * default: 2
+ * undefined
+ * > console.count('abc')
+ * abc: 1
+ * undefined
+ * > console.count('xyz')
+ * xyz: 1
+ * undefined
+ * > console.count('abc')
+ * abc: 2
+ * undefined
+ * > console.count()
+ * default: 3
+ * undefined
+ * >
+ * ```
+ * @since v8.3.0
+ * @param label The display label for the counter.
+ */
+ count(label?: string): void;
+ /**
+ * Resets the internal counter specific to `label`.
+ *
+ * ```js
+ * > console.count('abc');
+ * abc: 1
+ * undefined
+ * > console.countReset('abc');
+ * undefined
+ * > console.count('abc');
+ * abc: 1
+ * undefined
+ * >
+ * ```
+ * @since v8.3.0
+ * @param label The display label for the counter.
+ */
+ countReset(label?: string): void;
+ /**
+ * The `console.debug()` function is an alias for {@link log}.
+ * @since v8.0.0
+ */
+ debug(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Uses `util.inspect()` on `obj` and prints the resulting string to `stdout`.
+ * This function bypasses any custom `inspect()` function defined on `obj`.
+ * @since v0.1.101
+ */
+ dir(obj: any, options?: InspectOptions): void;
+ /**
+ * This method calls `console.log()` passing it the arguments received.
+ * This method does not produce any XML formatting.
+ * @since v8.0.0
+ */
+ dirxml(...data: any[]): void;
+ /**
+ * Prints to `stderr` with newline. Multiple arguments can be passed, with the
+ * first used as the primary message and all additional used as substitution
+ * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`).
+ *
+ * ```js
+ * const code = 5;
+ * console.error('error #%d', code);
+ * // Prints: error #5, to stderr
+ * console.error('error', code);
+ * // Prints: error 5, to stderr
+ * ```
+ *
+ * If formatting elements (e.g. `%d`) are not found in the first string then `util.inspect()` is called on each argument and the resulting string
+ * values are concatenated. See `util.format()` for more information.
+ * @since v0.1.100
+ */
+ error(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Increases indentation of subsequent lines by spaces for `groupIndentation`length.
+ *
+ * If one or more `label`s are provided, those are printed first without the
+ * additional indentation.
+ * @since v8.5.0
+ */
+ group(...label: any[]): void;
+ /**
+ * An alias for {@link group}.
+ * @since v8.5.0
+ */
+ groupCollapsed(...label: any[]): void;
+ /**
+ * Decreases indentation of subsequent lines by spaces for `groupIndentation`length.
+ * @since v8.5.0
+ */
+ groupEnd(): void;
+ /**
+ * The `console.info()` function is an alias for {@link log}.
+ * @since v0.1.100
+ */
+ info(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Prints to `stdout` with newline. Multiple arguments can be passed, with the
+ * first used as the primary message and all additional used as substitution
+ * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`).
+ *
+ * ```js
+ * const count = 5;
+ * console.log('count: %d', count);
+ * // Prints: count: 5, to stdout
+ * console.log('count:', count);
+ * // Prints: count: 5, to stdout
+ * ```
+ *
+ * See `util.format()` for more information.
+ * @since v0.1.100
+ */
+ log(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Try to construct a table with the columns of the properties of `tabularData`(or use `properties`) and rows of `tabularData` and log it. Falls back to just
+ * logging the argument if it can’t be parsed as tabular.
+ *
+ * ```js
+ * // These can't be parsed as tabular data
+ * console.table(Symbol());
+ * // Symbol()
+ *
+ * console.table(undefined);
+ * // undefined
+ *
+ * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]);
+ * // ┌─────────┬─────┬─────┐
+ * // │ (index) │ a │ b │
+ * // ├─────────┼─────┼─────┤
+ * // │ 0 │ 1 │ 'Y' │
+ * // │ 1 │ 'Z' │ 2 │
+ * // └─────────┴─────┴─────┘
+ *
+ * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
+ * // ┌─────────┬─────┐
+ * // │ (index) │ a │
+ * // ├─────────┼─────┤
+ * // │ 0 │ 1 │
+ * // │ 1 │ 'Z' │
+ * // └─────────┴─────┘
+ * ```
+ * @since v10.0.0
+ * @param properties Alternate properties for constructing the table.
+ */
+ table(tabularData: any, properties?: ReadonlyArray<string>): void;
+ /**
+ * Starts a timer that can be used to compute the duration of an operation. Timers
+ * are identified by a unique `label`. Use the same `label` when calling {@link timeEnd} to stop the timer and output the elapsed time in
+ * suitable time units to `stdout`. For example, if the elapsed
+ * time is 3869ms, `console.timeEnd()` displays "3.869s".
+ * @since v0.1.104
+ */
+ time(label?: string): void;
+ /**
+ * Stops a timer that was previously started by calling {@link time} and
+ * prints the result to `stdout`:
+ *
+ * ```js
+ * console.time('100-elements');
+ * for (let i = 0; i < 100; i++) {}
+ * console.timeEnd('100-elements');
+ * // prints 100-elements: 225.438ms
+ * ```
+ * @since v0.1.104
+ */
+ timeEnd(label?: string): void;
+ /**
+ * For a timer that was previously started by calling {@link time}, prints
+ * the elapsed time and other `data` arguments to `stdout`:
+ *
+ * ```js
+ * console.time('process');
+ * const value = expensiveProcess1(); // Returns 42
+ * console.timeLog('process', value);
+ * // Prints "process: 365.227ms 42".
+ * doExpensiveProcess2(value);
+ * console.timeEnd('process');
+ * ```
+ * @since v10.7.0
+ */
+ timeLog(label?: string, ...data: any[]): void;
+ /**
+ * Prints to `stderr` the string `'Trace: '`, followed by the `util.format()` formatted message and stack trace to the current position in the code.
+ *
+ * ```js
+ * console.trace('Show me');
+ * // Prints: (stack trace will vary based on where trace is called)
+ * // Trace: Show me
+ * // at repl:2:9
+ * // at REPLServer.defaultEval (repl.js:248:27)
+ * // at bound (domain.js:287:14)
+ * // at REPLServer.runBound [as eval] (domain.js:300:12)
+ * // at REPLServer.<anonymous> (repl.js:412:12)
+ * // at emitOne (events.js:82:20)
+ * // at REPLServer.emit (events.js:169:7)
+ * // at REPLServer.Interface._onLine (readline.js:210:10)
+ * // at REPLServer.Interface._line (readline.js:549:8)
+ * // at REPLServer.Interface._ttyWrite (readline.js:826:14)
+ * ```
+ * @since v0.1.104
+ */
+ trace(message?: any, ...optionalParams: any[]): void;
+ /**
+ * The `console.warn()` function is an alias for {@link error}.
+ * @since v0.1.100
+ */
+ warn(message?: any, ...optionalParams: any[]): void;
+ // --- Inspector mode only ---
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Starts a JavaScript CPU profile with an optional label.
+ */
+ profile(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector.
+ */
+ profileEnd(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Adds an event with the label `label` to the Timeline panel of the inspector.
+ */
+ timeStamp(label?: string): void;
+ }
+ /**
+ * The `console` module provides a simple debugging console that is similar to the
+ * JavaScript console mechanism provided by web browsers.
+ *
+ * The module exports two specific components:
+ *
+ * * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream.
+ * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`.
+ *
+ * _**Warning**_: The global console object's methods are neither consistently
+ * synchronous like the browser APIs they resemble, nor are they consistently
+ * asynchronous like all other Node.js streams. See the `note on process I/O` for
+ * more information.
+ *
+ * Example using the global `console`:
+ *
+ * ```js
+ * console.log('hello world');
+ * // Prints: hello world, to stdout
+ * console.log('hello %s', 'world');
+ * // Prints: hello world, to stdout
+ * console.error(new Error('Whoops, something bad happened'));
+ * // Prints error message and stack trace to stderr:
+ * // Error: Whoops, something bad happened
+ * // at [eval]:5:15
+ * // at Script.runInThisContext (node:vm:132:18)
+ * // at Object.runInThisContext (node:vm:309:38)
+ * // at node:internal/process/execution:77:19
+ * // at [eval]-wrapper:6:22
+ * // at evalScript (node:internal/process/execution:76:60)
+ * // at node:internal/main/eval_string:23:3
+ *
+ * const name = 'Will Robinson';
+ * console.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to stderr
+ * ```
+ *
+ * Example using the `Console` class:
+ *
+ * ```js
+ * const out = getStreamSomehow();
+ * const err = getStreamSomehow();
+ * const myConsole = new console.Console(out, err);
+ *
+ * myConsole.log('hello world');
+ * // Prints: hello world, to out
+ * myConsole.log('hello %s', 'world');
+ * // Prints: hello world, to out
+ * myConsole.error(new Error('Whoops, something bad happened'));
+ * // Prints: [Error: Whoops, something bad happened], to err
+ *
+ * const name = 'Will Robinson';
+ * myConsole.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to err
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v16.4.2/lib/console.js)
+ */
+ namespace console {
+ interface ConsoleConstructorOptions {
+ stdout: NodeJS.WritableStream;
+ stderr?: NodeJS.WritableStream | undefined;
+ ignoreErrors?: boolean | undefined;
+ colorMode?: boolean | 'auto' | undefined;
+ inspectOptions?: InspectOptions | undefined;
+ /**
+ * Set group indentation
+ * @default 2
+ */
+ groupIndentation?: number | undefined;
+ }
+ interface ConsoleConstructor {
+ prototype: Console;
+ new (stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console;
+ new (options: ConsoleConstructorOptions): Console;
+ }
+ }
+ var console: Console;
+ }
+ export = globalThis.console;
+}
diff --git a/node_modules/@types/node/ts4.8/constants.d.ts b/node_modules/@types/node/ts4.8/constants.d.ts
new file mode 100755
index 0000000..208020d
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/constants.d.ts
@@ -0,0 +1,18 @@
+/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
+declare module 'constants' {
+ import { constants as osConstants, SignalConstants } from 'node:os';
+ import { constants as cryptoConstants } from 'node:crypto';
+ import { constants as fsConstants } from 'node:fs';
+
+ const exp: typeof osConstants.errno &
+ typeof osConstants.priority &
+ SignalConstants &
+ typeof cryptoConstants &
+ typeof fsConstants;
+ export = exp;
+}
+
+declare module 'node:constants' {
+ import constants = require('constants');
+ export = constants;
+}
diff --git a/node_modules/@types/node/ts4.8/crypto.d.ts b/node_modules/@types/node/ts4.8/crypto.d.ts
new file mode 100755
index 0000000..5b51217
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/crypto.d.ts
@@ -0,0 +1,3977 @@
+/**
+ * The `node:crypto` module provides cryptographic functionality that includes a
+ * set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify
+ * functions.
+ *
+ * ```js
+ * const { createHmac } = await import('node:crypto');
+ *
+ * const secret = 'abcdefg';
+ * const hash = createHmac('sha256', secret)
+ * .update('I love cupcakes')
+ * .digest('hex');
+ * console.log(hash);
+ * // Prints:
+ * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/crypto.js)
+ */
+declare module 'crypto' {
+ import * as stream from 'node:stream';
+ import { PeerCertificate } from 'node:tls';
+ /**
+ * SPKAC is a Certificate Signing Request mechanism originally implemented by
+ * Netscape and was specified formally as part of HTML5's `keygen` element.
+ *
+ * `<keygen>` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects
+ * should not use this element anymore.
+ *
+ * The `node:crypto` module provides the `Certificate` class for working with SPKAC
+ * data. The most common usage is handling output generated by the HTML5`<keygen>` element. Node.js uses [OpenSSL's SPKAC
+ * implementation](https://www.openssl.org/docs/man3.0/man1/openssl-spkac.html) internally.
+ * @since v0.11.8
+ */
+ class Certificate {
+ /**
+ * ```js
+ * const { Certificate } = await import('node:crypto');
+ * const spkac = getSpkacSomehow();
+ * const challenge = Certificate.exportChallenge(spkac);
+ * console.log(challenge.toString('utf8'));
+ * // Prints: the challenge as a UTF8 string
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge.
+ */
+ static exportChallenge(spkac: BinaryLike): Buffer;
+ /**
+ * ```js
+ * const { Certificate } = await import('node:crypto');
+ * const spkac = getSpkacSomehow();
+ * const publicKey = Certificate.exportPublicKey(spkac);
+ * console.log(publicKey);
+ * // Prints: the public key as <Buffer ...>
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return The public key component of the `spkac` data structure, which includes a public key and a challenge.
+ */
+ static exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
+ /**
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const { Certificate } = await import('node:crypto');
+ *
+ * const spkac = getSpkacSomehow();
+ * console.log(Certificate.verifySpkac(Buffer.from(spkac)));
+ * // Prints: true or false
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return `true` if the given `spkac` data structure is valid, `false` otherwise.
+ */
+ static verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
+ /**
+ * @deprecated
+ * @param spkac
+ * @returns The challenge component of the `spkac` data structure,
+ * which includes a public key and a challenge.
+ */
+ exportChallenge(spkac: BinaryLike): Buffer;
+ /**
+ * @deprecated
+ * @param spkac
+ * @param encoding The encoding of the spkac string.
+ * @returns The public key component of the `spkac` data structure,
+ * which includes a public key and a challenge.
+ */
+ exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
+ /**
+ * @deprecated
+ * @param spkac
+ * @returns `true` if the given `spkac` data structure is valid,
+ * `false` otherwise.
+ */
+ verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
+ }
+ namespace constants {
+ // https://nodejs.org/dist/latest-v20.x/docs/api/crypto.html#crypto-constants
+ const OPENSSL_VERSION_NUMBER: number;
+ /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
+ const SSL_OP_ALL: number;
+ /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
+ const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
+ /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
+ const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
+ /** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */
+ const SSL_OP_CISCO_ANYCONNECT: number;
+ /** Instructs OpenSSL to turn on cookie exchange. */
+ const SSL_OP_COOKIE_EXCHANGE: number;
+ /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */
+ const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
+ /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */
+ const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
+ /** Allows initial connection to servers that do not support RI. */
+ const SSL_OP_LEGACY_SERVER_CONNECT: number;
+ /** Instructs OpenSSL to disable support for SSL/TLS compression. */
+ const SSL_OP_NO_COMPRESSION: number;
+ const SSL_OP_NO_QUERY_MTU: number;
+ /** Instructs OpenSSL to always start a new session when performing renegotiation. */
+ const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
+ const SSL_OP_NO_SSLv2: number;
+ const SSL_OP_NO_SSLv3: number;
+ const SSL_OP_NO_TICKET: number;
+ const SSL_OP_NO_TLSv1: number;
+ const SSL_OP_NO_TLSv1_1: number;
+ const SSL_OP_NO_TLSv1_2: number;
+ /** Instructs OpenSSL to disable version rollback attack detection. */
+ const SSL_OP_TLS_ROLLBACK_BUG: number;
+ const ENGINE_METHOD_RSA: number;
+ const ENGINE_METHOD_DSA: number;
+ const ENGINE_METHOD_DH: number;
+ const ENGINE_METHOD_RAND: number;
+ const ENGINE_METHOD_EC: number;
+ const ENGINE_METHOD_CIPHERS: number;
+ const ENGINE_METHOD_DIGESTS: number;
+ const ENGINE_METHOD_PKEY_METHS: number;
+ const ENGINE_METHOD_PKEY_ASN1_METHS: number;
+ const ENGINE_METHOD_ALL: number;
+ const ENGINE_METHOD_NONE: number;
+ const DH_CHECK_P_NOT_SAFE_PRIME: number;
+ const DH_CHECK_P_NOT_PRIME: number;
+ const DH_UNABLE_TO_CHECK_GENERATOR: number;
+ const DH_NOT_SUITABLE_GENERATOR: number;
+ const RSA_PKCS1_PADDING: number;
+ const RSA_SSLV23_PADDING: number;
+ const RSA_NO_PADDING: number;
+ const RSA_PKCS1_OAEP_PADDING: number;
+ const RSA_X931_PADDING: number;
+ const RSA_PKCS1_PSS_PADDING: number;
+ /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */
+ const RSA_PSS_SALTLEN_DIGEST: number;
+ /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */
+ const RSA_PSS_SALTLEN_MAX_SIGN: number;
+ /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */
+ const RSA_PSS_SALTLEN_AUTO: number;
+ const POINT_CONVERSION_COMPRESSED: number;
+ const POINT_CONVERSION_UNCOMPRESSED: number;
+ const POINT_CONVERSION_HYBRID: number;
+ /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */
+ const defaultCoreCipherList: string;
+ /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */
+ const defaultCipherList: string;
+ }
+ interface HashOptions extends stream.TransformOptions {
+ /**
+ * For XOF hash functions such as `shake256`, the
+ * outputLength option can be used to specify the desired output length in bytes.
+ */
+ outputLength?: number | undefined;
+ }
+ /** @deprecated since v10.0.0 */
+ const fips: boolean;
+ /**
+ * Creates and returns a `Hash` object that can be used to generate hash digests
+ * using the given `algorithm`. Optional `options` argument controls stream
+ * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option
+ * can be used to specify the desired output length in bytes.
+ *
+ * The `algorithm` is dependent on the available algorithms supported by the
+ * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
+ * On recent releases of OpenSSL, `openssl list -digest-algorithms` will
+ * display the available digest algorithms.
+ *
+ * Example: generating the sha256 sum of a file
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * } from 'node:fs';
+ * import { argv } from 'node:process';
+ * const {
+ * createHash,
+ * } = await import('node:crypto');
+ *
+ * const filename = argv[2];
+ *
+ * const hash = createHash('sha256');
+ *
+ * const input = createReadStream(filename);
+ * input.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = input.read();
+ * if (data)
+ * hash.update(data);
+ * else {
+ * console.log(`${hash.digest('hex')} ${filename}`);
+ * }
+ * });
+ * ```
+ * @since v0.1.92
+ * @param options `stream.transform` options
+ */
+ function createHash(algorithm: string, options?: HashOptions): Hash;
+ /**
+ * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`.
+ * Optional `options` argument controls stream behavior.
+ *
+ * The `algorithm` is dependent on the available algorithms supported by the
+ * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
+ * On recent releases of OpenSSL, `openssl list -digest-algorithms` will
+ * display the available digest algorithms.
+ *
+ * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is
+ * a `KeyObject`, its type must be `secret`. If it is a string, please consider `caveats when using strings as inputs to cryptographic APIs`. If it was
+ * obtained from a cryptographically secure source of entropy, such as {@link randomBytes} or {@link generateKey}, its length should not
+ * exceed the block size of `algorithm` (e.g., 512 bits for SHA-256).
+ *
+ * Example: generating the sha256 HMAC of a file
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * } from 'node:fs';
+ * import { argv } from 'node:process';
+ * const {
+ * createHmac,
+ * } = await import('node:crypto');
+ *
+ * const filename = argv[2];
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * const input = createReadStream(filename);
+ * input.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = input.read();
+ * if (data)
+ * hmac.update(data);
+ * else {
+ * console.log(`${hmac.digest('hex')} ${filename}`);
+ * }
+ * });
+ * ```
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
+ // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
+ type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex' | 'binary';
+ type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
+ type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
+ type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
+ type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid';
+ /**
+ * The `Hash` class is a utility for creating hash digests of data. It can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where data is written
+ * to produce a computed hash digest on the readable side, or
+ * * Using the `hash.update()` and `hash.digest()` methods to produce the
+ * computed hash.
+ *
+ * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword.
+ *
+ * Example: Using `Hash` objects as streams:
+ *
+ * ```js
+ * const {
+ * createHash,
+ * } = await import('node:crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = hash.read();
+ * if (data) {
+ * console.log(data.toString('hex'));
+ * // Prints:
+ * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
+ * }
+ * });
+ *
+ * hash.write('some data to hash');
+ * hash.end();
+ * ```
+ *
+ * Example: Using `Hash` and piped streams:
+ *
+ * ```js
+ * import { createReadStream } from 'node:fs';
+ * import { stdout } from 'node:process';
+ * const { createHash } = await import('node:crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * const input = createReadStream('test.js');
+ * input.pipe(hash).setEncoding('hex').pipe(stdout);
+ * ```
+ *
+ * Example: Using the `hash.update()` and `hash.digest()` methods:
+ *
+ * ```js
+ * const {
+ * createHash,
+ * } = await import('node:crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.update('some data to hash');
+ * console.log(hash.digest('hex'));
+ * // Prints:
+ * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
+ * ```
+ * @since v0.1.92
+ */
+ class Hash extends stream.Transform {
+ private constructor();
+ /**
+ * Creates a new `Hash` object that contains a deep copy of the internal state
+ * of the current `Hash` object.
+ *
+ * The optional `options` argument controls stream behavior. For XOF hash
+ * functions such as `'shake256'`, the `outputLength` option can be used to
+ * specify the desired output length in bytes.
+ *
+ * An error is thrown when an attempt is made to copy the `Hash` object after
+ * its `hash.digest()` method has been called.
+ *
+ * ```js
+ * // Calculate a rolling hash.
+ * const {
+ * createHash,
+ * } = await import('node:crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.update('one');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * hash.update('two');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * hash.update('three');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * // Etc.
+ * ```
+ * @since v13.1.0
+ * @param options `stream.transform` options
+ */
+ copy(options?: stream.TransformOptions): Hash;
+ /**
+ * Updates the hash content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Hash;
+ update(data: string, inputEncoding: Encoding): Hash;
+ /**
+ * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method).
+ * If `encoding` is provided a string will be returned; otherwise
+ * a `Buffer` is returned.
+ *
+ * The `Hash` object can not be used again after `hash.digest()` method has been
+ * called. Multiple calls will cause an error to be thrown.
+ * @since v0.1.92
+ * @param encoding The `encoding` of the return value.
+ */
+ digest(): Buffer;
+ digest(encoding: BinaryToTextEncoding): string;
+ }
+ /**
+ * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can
+ * be used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where data is written
+ * to produce a computed HMAC digest on the readable side, or
+ * * Using the `hmac.update()` and `hmac.digest()` methods to produce the
+ * computed HMAC digest.
+ *
+ * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword.
+ *
+ * Example: Using `Hmac` objects as streams:
+ *
+ * ```js
+ * const {
+ * createHmac,
+ * } = await import('node:crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * hmac.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = hmac.read();
+ * if (data) {
+ * console.log(data.toString('hex'));
+ * // Prints:
+ * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
+ * }
+ * });
+ *
+ * hmac.write('some data to hash');
+ * hmac.end();
+ * ```
+ *
+ * Example: Using `Hmac` and piped streams:
+ *
+ * ```js
+ * import { createReadStream } from 'node:fs';
+ * import { stdout } from 'node:process';
+ * const {
+ * createHmac,
+ * } = await import('node:crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * const input = createReadStream('test.js');
+ * input.pipe(hmac).pipe(stdout);
+ * ```
+ *
+ * Example: Using the `hmac.update()` and `hmac.digest()` methods:
+ *
+ * ```js
+ * const {
+ * createHmac,
+ * } = await import('node:crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * hmac.update('some data to hash');
+ * console.log(hmac.digest('hex'));
+ * // Prints:
+ * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
+ * ```
+ * @since v0.1.94
+ */
+ class Hmac extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the `Hmac` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Hmac;
+ update(data: string, inputEncoding: Encoding): Hmac;
+ /**
+ * Calculates the HMAC digest of all of the data passed using `hmac.update()`.
+ * If `encoding` is
+ * provided a string is returned; otherwise a `Buffer` is returned;
+ *
+ * The `Hmac` object can not be used again after `hmac.digest()` has been
+ * called. Multiple calls to `hmac.digest()` will result in an error being thrown.
+ * @since v0.1.94
+ * @param encoding The `encoding` of the return value.
+ */
+ digest(): Buffer;
+ digest(encoding: BinaryToTextEncoding): string;
+ }
+ type KeyObjectType = 'secret' | 'public' | 'private';
+ interface KeyExportOptions<T extends KeyFormat> {
+ type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
+ format: T;
+ cipher?: string | undefined;
+ passphrase?: string | Buffer | undefined;
+ }
+ interface JwkKeyExportOptions {
+ format: 'jwk';
+ }
+ interface JsonWebKey {
+ crv?: string | undefined;
+ d?: string | undefined;
+ dp?: string | undefined;
+ dq?: string | undefined;
+ e?: string | undefined;
+ k?: string | undefined;
+ kty?: string | undefined;
+ n?: string | undefined;
+ p?: string | undefined;
+ q?: string | undefined;
+ qi?: string | undefined;
+ x?: string | undefined;
+ y?: string | undefined;
+ [key: string]: unknown;
+ }
+ interface AsymmetricKeyDetails {
+ /**
+ * Key size in bits (RSA, DSA).
+ */
+ modulusLength?: number | undefined;
+ /**
+ * Public exponent (RSA).
+ */
+ publicExponent?: bigint | undefined;
+ /**
+ * Name of the message digest (RSA-PSS).
+ */
+ hashAlgorithm?: string | undefined;
+ /**
+ * Name of the message digest used by MGF1 (RSA-PSS).
+ */
+ mgf1HashAlgorithm?: string | undefined;
+ /**
+ * Minimal salt length in bytes (RSA-PSS).
+ */
+ saltLength?: number | undefined;
+ /**
+ * Size of q in bits (DSA).
+ */
+ divisorLength?: number | undefined;
+ /**
+ * Name of the curve (EC).
+ */
+ namedCurve?: string | undefined;
+ }
+ /**
+ * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key,
+ * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject`
+ * objects are not to be created directly using the `new`keyword.
+ *
+ * Most applications should consider using the new `KeyObject` API instead of
+ * passing keys as strings or `Buffer`s due to improved security features.
+ *
+ * `KeyObject` instances can be passed to other threads via `postMessage()`.
+ * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to
+ * be listed in the `transferList` argument.
+ * @since v11.6.0
+ */
+ class KeyObject {
+ private constructor();
+ /**
+ * Example: Converting a `CryptoKey` instance to a `KeyObject`:
+ *
+ * ```js
+ * const { KeyObject } = await import('node:crypto');
+ * const { subtle } = globalThis.crypto;
+ *
+ * const key = await subtle.generateKey({
+ * name: 'HMAC',
+ * hash: 'SHA-256',
+ * length: 256,
+ * }, true, ['sign', 'verify']);
+ *
+ * const keyObject = KeyObject.from(key);
+ * console.log(keyObject.symmetricKeySize);
+ * // Prints: 32 (symmetric key size in bytes)
+ * ```
+ * @since v15.0.0
+ */
+ static from(key: webcrypto.CryptoKey): KeyObject;
+ /**
+ * For asymmetric keys, this property represents the type of the key. Supported key
+ * types are:
+ *
+ * * `'rsa'` (OID 1.2.840.113549.1.1.1)
+ * * `'rsa-pss'` (OID 1.2.840.113549.1.1.10)
+ * * `'dsa'` (OID 1.2.840.10040.4.1)
+ * * `'ec'` (OID 1.2.840.10045.2.1)
+ * * `'x25519'` (OID 1.3.101.110)
+ * * `'x448'` (OID 1.3.101.111)
+ * * `'ed25519'` (OID 1.3.101.112)
+ * * `'ed448'` (OID 1.3.101.113)
+ * * `'dh'` (OID 1.2.840.113549.1.3.1)
+ *
+ * This property is `undefined` for unrecognized `KeyObject` types and symmetric
+ * keys.
+ * @since v11.6.0
+ */
+ asymmetricKeyType?: KeyType | undefined;
+ /**
+ * For asymmetric keys, this property represents the size of the embedded key in
+ * bytes. This property is `undefined` for symmetric keys.
+ */
+ asymmetricKeySize?: number | undefined;
+ /**
+ * This property exists only on asymmetric keys. Depending on the type of the key,
+ * this object contains information about the key. None of the information obtained
+ * through this property can be used to uniquely identify a key or to compromise
+ * the security of the key.
+ *
+ * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence,
+ * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be
+ * set.
+ *
+ * Other key details might be exposed via this API using additional attributes.
+ * @since v15.7.0
+ */
+ asymmetricKeyDetails?: AsymmetricKeyDetails | undefined;
+ /**
+ * For symmetric keys, the following encoding options can be used:
+ *
+ * For public keys, the following encoding options can be used:
+ *
+ * For private keys, the following encoding options can be used:
+ *
+ * The result type depends on the selected encoding format, when PEM the
+ * result is a string, when DER it will be a buffer containing the data
+ * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object.
+ *
+ * When [JWK](https://tools.ietf.org/html/rfc7517) encoding format was selected, all other encoding options are
+ * ignored.
+ *
+ * PKCS#1, SEC1, and PKCS#8 type keys can be encrypted by using a combination of
+ * the `cipher` and `format` options. The PKCS#8 `type` can be used with any`format` to encrypt any key algorithm (RSA, EC, or DH) by specifying a`cipher`. PKCS#1 and SEC1 can only be
+ * encrypted by specifying a `cipher`when the PEM `format` is used. For maximum compatibility, use PKCS#8 for
+ * encrypted private keys. Since PKCS#8 defines its own
+ * encryption mechanism, PEM-level encryption is not supported when encrypting
+ * a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for
+ * PKCS#1 and SEC1 encryption.
+ * @since v11.6.0
+ */
+ export(options: KeyExportOptions<'pem'>): string | Buffer;
+ export(options?: KeyExportOptions<'der'>): Buffer;
+ export(options?: JwkKeyExportOptions): JsonWebKey;
+ /**
+ * For secret keys, this property represents the size of the key in bytes. This
+ * property is `undefined` for asymmetric keys.
+ * @since v11.6.0
+ */
+ symmetricKeySize?: number | undefined;
+ /**
+ * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys
+ * or `'private'` for private (asymmetric) keys.
+ * @since v11.6.0
+ */
+ type: KeyObjectType;
+ }
+ type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305';
+ type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
+ type CipherOCBTypes = 'aes-128-ocb' | 'aes-192-ocb' | 'aes-256-ocb';
+ type BinaryLike = string | NodeJS.ArrayBufferView;
+ type CipherKey = BinaryLike | KeyObject;
+ interface CipherCCMOptions extends stream.TransformOptions {
+ authTagLength: number;
+ }
+ interface CipherGCMOptions extends stream.TransformOptions {
+ authTagLength?: number | undefined;
+ }
+ interface CipherOCBOptions extends stream.TransformOptions {
+ authTagLength: number;
+ }
+ /**
+ * Creates and returns a `Cipher` object that uses the given `algorithm` and`password`.
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
+ * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
+ * display the available cipher algorithms.
+ *
+ * The `password` is used to derive the cipher key and initialization vector (IV).
+ * The value must be either a `'latin1'` encoded string, a `Buffer`, a`TypedArray`, or a `DataView`.
+ *
+ * **This function is semantically insecure for all**
+ * **supported ciphers and fatally flawed for ciphers in counter mode (such as CTR,**
+ * **GCM, or CCM).**
+ *
+ * The implementation of `crypto.createCipher()` derives keys using the OpenSSL
+ * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) with the digest algorithm set to MD5, one
+ * iteration, and no salt. The lack of salt allows dictionary attacks as the same
+ * password always creates the same key. The low iteration count and
+ * non-cryptographically secure hash algorithm allow passwords to be tested very
+ * rapidly.
+ *
+ * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) it is recommended that
+ * developers derive a key and IV on
+ * their own using {@link scrypt} and to use {@link createCipheriv} to create the `Cipher` object. Users should not use ciphers with counter mode
+ * (e.g. CTR, GCM, or CCM) in `crypto.createCipher()`. A warning is emitted when
+ * they are used in order to avoid the risk of IV reuse that causes
+ * vulnerabilities. For the case when IV is reused in GCM, see [Nonce-Disrespecting Adversaries](https://github.com/nonce-disrespect/nonce-disrespect) for details.
+ * @since v0.1.94
+ * @deprecated Since v10.0.0 - Use {@link createCipheriv} instead.
+ * @param options `stream.transform` options
+ */
+ function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM;
+ /** @deprecated since v10.0.0 use `createCipheriv()` */
+ function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM;
+ /** @deprecated since v10.0.0 use `createCipheriv()` */
+ function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher;
+ /**
+ * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
+ * initialization vector (`iv`).
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
+ * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
+ * display the available cipher algorithms.
+ *
+ * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
+ * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
+ * a `KeyObject` of type `secret`. If the cipher does not need
+ * an initialization vector, `iv` may be `null`.
+ *
+ * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * Initialization vectors should be unpredictable and unique; ideally, they will be
+ * cryptographically random. They do not have to be secret: IVs are typically just
+ * added to ciphertext messages unencrypted. It may sound contradictory that
+ * something has to be unpredictable and unique, but does not have to be secret;
+ * remember that an attacker must not be able to predict ahead of time what a
+ * given IV will be.
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createCipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): CipherCCM;
+ function createCipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): CipherOCB;
+ function createCipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): CipherGCM;
+ function createCipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Cipher;
+ /**
+ * Instances of the `Cipher` class are used to encrypt data. The class can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where plain unencrypted
+ * data is written to produce encrypted data on the readable side, or
+ * * Using the `cipher.update()` and `cipher.final()` methods to produce
+ * the encrypted data.
+ *
+ * The {@link createCipher} or {@link createCipheriv} methods are
+ * used to create `Cipher` instances. `Cipher` objects are not to be created
+ * directly using the `new` keyword.
+ *
+ * Example: Using `Cipher` objects as streams:
+ *
+ * ```js
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * // Once we have the key and iv, we can create and use the cipher...
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * let encrypted = '';
+ * cipher.setEncoding('hex');
+ *
+ * cipher.on('data', (chunk) => encrypted += chunk);
+ * cipher.on('end', () => console.log(encrypted));
+ *
+ * cipher.write('some clear text data');
+ * cipher.end();
+ * });
+ * });
+ * ```
+ *
+ * Example: Using `Cipher` and piped streams:
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * createWriteStream,
+ * } from 'node:fs';
+ *
+ * import {
+ * pipeline,
+ * } from 'node:stream';
+ *
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * const input = createReadStream('test.js');
+ * const output = createWriteStream('test.enc');
+ *
+ * pipeline(input, cipher, output, (err) => {
+ * if (err) throw err;
+ * });
+ * });
+ * });
+ * ```
+ *
+ * Example: Using the `cipher.update()` and `cipher.final()` methods:
+ *
+ * ```js
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * let encrypted = cipher.update('some clear text data', 'utf8', 'hex');
+ * encrypted += cipher.final('hex');
+ * console.log(encrypted);
+ * });
+ * });
+ * ```
+ * @since v0.1.94
+ */
+ class Cipher extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the cipher with `data`. If the `inputEncoding` argument is given,
+ * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or`DataView`. If `data` is a `Buffer`,
+ * `TypedArray`, or `DataView`, then`inputEncoding` is ignored.
+ *
+ * The `outputEncoding` specifies the output format of the enciphered
+ * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
+ *
+ * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being
+ * thrown.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the data.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ update(data: BinaryLike): Buffer;
+ update(data: string, inputEncoding: Encoding): Buffer;
+ update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
+ update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
+ /**
+ * Once the `cipher.final()` method has been called, the `Cipher` object can no
+ * longer be used to encrypt data. Attempts to call `cipher.final()` more than
+ * once will result in an error being thrown.
+ * @since v0.1.94
+ * @param outputEncoding The `encoding` of the return value.
+ * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
+ */
+ final(): Buffer;
+ final(outputEncoding: BufferEncoding): string;
+ /**
+ * When using block encryption algorithms, the `Cipher` class will automatically
+ * add padding to the input data to the appropriate block size. To disable the
+ * default padding call `cipher.setAutoPadding(false)`.
+ *
+ * When `autoPadding` is `false`, the length of the entire input data must be a
+ * multiple of the cipher's block size or `cipher.final()` will throw an error.
+ * Disabling automatic padding is useful for non-standard padding, for instance
+ * using `0x0` instead of PKCS padding.
+ *
+ * The `cipher.setAutoPadding()` method must be called before `cipher.final()`.
+ * @since v0.7.1
+ * @param [autoPadding=true]
+ * @return for method chaining.
+ */
+ setAutoPadding(autoPadding?: boolean): this;
+ }
+ interface CipherCCM extends Cipher {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options: {
+ plaintextLength: number;
+ }
+ ): this;
+ getAuthTag(): Buffer;
+ }
+ interface CipherGCM extends Cipher {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ getAuthTag(): Buffer;
+ }
+ interface CipherOCB extends Cipher {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ getAuthTag(): Buffer;
+ }
+ /**
+ * Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key).
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * **This function is semantically insecure for all**
+ * **supported ciphers and fatally flawed for ciphers in counter mode (such as CTR,**
+ * **GCM, or CCM).**
+ *
+ * The implementation of `crypto.createDecipher()` derives keys using the OpenSSL
+ * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) with the digest algorithm set to MD5, one
+ * iteration, and no salt. The lack of salt allows dictionary attacks as the same
+ * password always creates the same key. The low iteration count and
+ * non-cryptographically secure hash algorithm allow passwords to be tested very
+ * rapidly.
+ *
+ * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) it is recommended that
+ * developers derive a key and IV on
+ * their own using {@link scrypt} and to use {@link createDecipheriv} to create the `Decipher` object.
+ * @since v0.1.94
+ * @deprecated Since v10.0.0 - Use {@link createDecipheriv} instead.
+ * @param options `stream.transform` options
+ */
+ function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM;
+ /** @deprecated since v10.0.0 use `createDecipheriv()` */
+ function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
+ /** @deprecated since v10.0.0 use `createDecipheriv()` */
+ function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
+ /**
+ * Creates and returns a `Decipher` object that uses the given `algorithm`, `key`and initialization vector (`iv`).
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to restrict accepted authentication tags
+ * to those with the specified length.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
+ * display the available cipher algorithms.
+ *
+ * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
+ * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
+ * a `KeyObject` of type `secret`. If the cipher does not need
+ * an initialization vector, `iv` may be `null`.
+ *
+ * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * Initialization vectors should be unpredictable and unique; ideally, they will be
+ * cryptographically random. They do not have to be secret: IVs are typically just
+ * added to ciphertext messages unencrypted. It may sound contradictory that
+ * something has to be unpredictable and unique, but does not have to be secret;
+ * remember that an attacker must not be able to predict ahead of time what a given
+ * IV will be.
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createDecipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): DecipherCCM;
+ function createDecipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): DecipherOCB;
+ function createDecipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
+ function createDecipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
+ /**
+ * Instances of the `Decipher` class are used to decrypt data. The class can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where plain encrypted
+ * data is written to produce unencrypted data on the readable side, or
+ * * Using the `decipher.update()` and `decipher.final()` methods to
+ * produce the unencrypted data.
+ *
+ * The {@link createDecipher} or {@link createDecipheriv} methods are
+ * used to create `Decipher` instances. `Decipher` objects are not to be created
+ * directly using the `new` keyword.
+ *
+ * Example: Using `Decipher` objects as streams:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Key length is dependent on the algorithm. In this case for aes192, it is
+ * // 24 bytes (192 bits).
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * let decrypted = '';
+ * decipher.on('readable', () => {
+ * let chunk;
+ * while (null !== (chunk = decipher.read())) {
+ * decrypted += chunk.toString('utf8');
+ * }
+ * });
+ * decipher.on('end', () => {
+ * console.log(decrypted);
+ * // Prints: some clear text data
+ * });
+ *
+ * // Encrypted with same algorithm, key and iv.
+ * const encrypted =
+ * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
+ * decipher.write(encrypted, 'hex');
+ * decipher.end();
+ * ```
+ *
+ * Example: Using `Decipher` and piped streams:
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * createWriteStream,
+ * } from 'node:fs';
+ * import { Buffer } from 'node:buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * const input = createReadStream('test.enc');
+ * const output = createWriteStream('test.js');
+ *
+ * input.pipe(decipher).pipe(output);
+ * ```
+ *
+ * Example: Using the `decipher.update()` and `decipher.final()` methods:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * // Encrypted using same algorithm, key and iv.
+ * const encrypted =
+ * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
+ * let decrypted = decipher.update(encrypted, 'hex', 'utf8');
+ * decrypted += decipher.final('utf8');
+ * console.log(decrypted);
+ * // Prints: some clear text data
+ * ```
+ * @since v0.1.94
+ */
+ class Decipher extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the decipher with `data`. If the `inputEncoding` argument is given,
+ * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is
+ * ignored.
+ *
+ * The `outputEncoding` specifies the output format of the enciphered
+ * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
+ *
+ * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error
+ * being thrown.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the `data` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ update(data: NodeJS.ArrayBufferView): Buffer;
+ update(data: string, inputEncoding: Encoding): Buffer;
+ update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
+ update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
+ /**
+ * Once the `decipher.final()` method has been called, the `Decipher` object can
+ * no longer be used to decrypt data. Attempts to call `decipher.final()` more
+ * than once will result in an error being thrown.
+ * @since v0.1.94
+ * @param outputEncoding The `encoding` of the return value.
+ * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
+ */
+ final(): Buffer;
+ final(outputEncoding: BufferEncoding): string;
+ /**
+ * When data has been encrypted without standard block padding, calling`decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and
+ * removing padding.
+ *
+ * Turning auto padding off will only work if the input data's length is a
+ * multiple of the ciphers block size.
+ *
+ * The `decipher.setAutoPadding()` method must be called before `decipher.final()`.
+ * @since v0.7.1
+ * @param [autoPadding=true]
+ * @return for method chaining.
+ */
+ setAutoPadding(auto_padding?: boolean): this;
+ }
+ interface DecipherCCM extends Decipher {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options: {
+ plaintextLength: number;
+ }
+ ): this;
+ }
+ interface DecipherGCM extends Decipher {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ }
+ interface DecipherOCB extends Decipher {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ }
+ interface PrivateKeyInput {
+ key: string | Buffer;
+ format?: KeyFormat | undefined;
+ type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
+ passphrase?: string | Buffer | undefined;
+ encoding?: string | undefined;
+ }
+ interface PublicKeyInput {
+ key: string | Buffer;
+ format?: KeyFormat | undefined;
+ type?: 'pkcs1' | 'spki' | undefined;
+ encoding?: string | undefined;
+ }
+ /**
+ * Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
+ *
+ * ```js
+ * const {
+ * generateKey,
+ * } = await import('node:crypto');
+ *
+ * generateKey('hmac', { length: 512 }, (err, key) => {
+ * if (err) throw err;
+ * console.log(key.export().toString('hex')); // 46e..........620
+ * });
+ * ```
+ *
+ * The size of a generated HMAC key should not exceed the block size of the
+ * underlying hash function. See {@link createHmac} for more information.
+ * @since v15.0.0
+ * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
+ */
+ function generateKey(
+ type: 'hmac' | 'aes',
+ options: {
+ length: number;
+ },
+ callback: (err: Error | null, key: KeyObject) => void
+ ): void;
+ /**
+ * Synchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
+ *
+ * ```js
+ * const {
+ * generateKeySync,
+ * } = await import('node:crypto');
+ *
+ * const key = generateKeySync('hmac', { length: 512 });
+ * console.log(key.export().toString('hex')); // e89..........41e
+ * ```
+ *
+ * The size of a generated HMAC key should not exceed the block size of the
+ * underlying hash function. See {@link createHmac} for more information.
+ * @since v15.0.0
+ * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
+ */
+ function generateKeySync(
+ type: 'hmac' | 'aes',
+ options: {
+ length: number;
+ }
+ ): KeyObject;
+ interface JsonWebKeyInput {
+ key: JsonWebKey;
+ format: 'jwk';
+ }
+ /**
+ * Creates and returns a new key object containing a private key. If `key` is a
+ * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key`must be an object with the properties described above.
+ *
+ * If the private key is encrypted, a `passphrase` must be specified. The length
+ * of the passphrase is limited to 1024 bytes.
+ * @since v11.6.0
+ */
+ function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject;
+ /**
+ * Creates and returns a new key object containing a public key. If `key` is a
+ * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject`with type `'private'`, the public key is derived from the given private key;
+ * otherwise, `key` must be an object with the properties described above.
+ *
+ * If the format is `'pem'`, the `'key'` may also be an X.509 certificate.
+ *
+ * Because public keys can be derived from private keys, a private key may be
+ * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the
+ * returned `KeyObject` will be `'public'` and that the private key cannot be
+ * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type`'private'` is given, a new `KeyObject` with type `'public'` will be returned
+ * and it will be impossible to extract the private key from the returned object.
+ * @since v11.6.0
+ */
+ function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput): KeyObject;
+ /**
+ * Creates and returns a new key object containing a secret key for symmetric
+ * encryption or `Hmac`.
+ * @since v11.6.0
+ * @param encoding The string encoding when `key` is a string.
+ */
+ function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject;
+ function createSecretKey(key: string, encoding: BufferEncoding): KeyObject;
+ /**
+ * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms.
+ * Optional `options` argument controls the `stream.Writable` behavior.
+ *
+ * In some cases, a `Sign` instance can be created using the name of a signature
+ * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
+ * the corresponding digest algorithm. This does not work for all signature
+ * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
+ * algorithm names.
+ * @since v0.1.92
+ * @param options `stream.Writable` options
+ */
+ function createSign(algorithm: string, options?: stream.WritableOptions): Sign;
+ type DSAEncoding = 'der' | 'ieee-p1363';
+ interface SigningOptions {
+ /**
+ * @see crypto.constants.RSA_PKCS1_PADDING
+ */
+ padding?: number | undefined;
+ saltLength?: number | undefined;
+ dsaEncoding?: DSAEncoding | undefined;
+ }
+ interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
+ interface SignKeyObjectInput extends SigningOptions {
+ key: KeyObject;
+ }
+ interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {}
+ interface VerifyKeyObjectInput extends SigningOptions {
+ key: KeyObject;
+ }
+ interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {}
+ type KeyLike = string | Buffer | KeyObject;
+ /**
+ * The `Sign` class is a utility for generating signatures. It can be used in one
+ * of two ways:
+ *
+ * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or
+ * * Using the `sign.update()` and `sign.sign()` methods to produce the
+ * signature.
+ *
+ * The {@link createSign} method is used to create `Sign` instances. The
+ * argument is the string name of the hash function to use. `Sign` objects are not
+ * to be created directly using the `new` keyword.
+ *
+ * Example: Using `Sign` and `Verify` objects as streams:
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync,
+ * createSign,
+ * createVerify,
+ * } = await import('node:crypto');
+ *
+ * const { privateKey, publicKey } = generateKeyPairSync('ec', {
+ * namedCurve: 'sect239k1',
+ * });
+ *
+ * const sign = createSign('SHA256');
+ * sign.write('some data to sign');
+ * sign.end();
+ * const signature = sign.sign(privateKey, 'hex');
+ *
+ * const verify = createVerify('SHA256');
+ * verify.write('some data to sign');
+ * verify.end();
+ * console.log(verify.verify(publicKey, signature, 'hex'));
+ * // Prints: true
+ * ```
+ *
+ * Example: Using the `sign.update()` and `verify.update()` methods:
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync,
+ * createSign,
+ * createVerify,
+ * } = await import('node:crypto');
+ *
+ * const { privateKey, publicKey } = generateKeyPairSync('rsa', {
+ * modulusLength: 2048,
+ * });
+ *
+ * const sign = createSign('SHA256');
+ * sign.update('some data to sign');
+ * sign.end();
+ * const signature = sign.sign(privateKey);
+ *
+ * const verify = createVerify('SHA256');
+ * verify.update('some data to sign');
+ * verify.end();
+ * console.log(verify.verify(publicKey, signature));
+ * // Prints: true
+ * ```
+ * @since v0.1.92
+ */
+ class Sign extends stream.Writable {
+ private constructor();
+ /**
+ * Updates the `Sign` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): this;
+ update(data: string, inputEncoding: Encoding): this;
+ /**
+ * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the following additional properties can be passed:
+ *
+ * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ *
+ * The `Sign` object can not be again used after `sign.sign()` method has been
+ * called. Multiple calls to `sign.sign()` will result in an error being thrown.
+ * @since v0.1.92
+ */
+ sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
+ sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, outputFormat: BinaryToTextEncoding): string;
+ }
+ /**
+ * Creates and returns a `Verify` object that uses the given algorithm.
+ * Use {@link getHashes} to obtain an array of names of the available
+ * signing algorithms. Optional `options` argument controls the`stream.Writable` behavior.
+ *
+ * In some cases, a `Verify` instance can be created using the name of a signature
+ * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
+ * the corresponding digest algorithm. This does not work for all signature
+ * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
+ * algorithm names.
+ * @since v0.1.92
+ * @param options `stream.Writable` options
+ */
+ function createVerify(algorithm: string, options?: stream.WritableOptions): Verify;
+ /**
+ * The `Verify` class is a utility for verifying signatures. It can be used in one
+ * of two ways:
+ *
+ * * As a writable `stream` where written data is used to validate against the
+ * supplied signature, or
+ * * Using the `verify.update()` and `verify.verify()` methods to verify
+ * the signature.
+ *
+ * The {@link createVerify} method is used to create `Verify` instances.`Verify` objects are not to be created directly using the `new` keyword.
+ *
+ * See `Sign` for examples.
+ * @since v0.1.92
+ */
+ class Verify extends stream.Writable {
+ private constructor();
+ /**
+ * Updates the `Verify` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `inputEncoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Verify;
+ update(data: string, inputEncoding: Encoding): Verify;
+ /**
+ * Verifies the provided data using the given `object` and `signature`.
+ *
+ * If `object` is not a `KeyObject`, this function behaves as if`object` had been passed to {@link createPublicKey}. If it is an
+ * object, the following additional properties can be passed:
+ *
+ * The `signature` argument is the previously calculated signature for the data, in
+ * the `signatureEncoding`.
+ * If a `signatureEncoding` is specified, the `signature` is expected to be a
+ * string; otherwise `signature` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * The `verify` object can not be used again after `verify.verify()` has been
+ * called. Multiple calls to `verify.verify()` will result in an error being
+ * thrown.
+ *
+ * Because public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v0.1.92
+ */
+ verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, signature: NodeJS.ArrayBufferView): boolean;
+ verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean;
+ }
+ /**
+ * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
+ * optional specific `generator`.
+ *
+ * The `generator` argument can be a number, string, or `Buffer`. If`generator` is not specified, the value `2` is used.
+ *
+ * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise
+ * a `Buffer`, `TypedArray`, or `DataView` is expected.
+ *
+ * If `generatorEncoding` is specified, `generator` is expected to be a string;
+ * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected.
+ * @since v0.11.12
+ * @param primeEncoding The `encoding` of the `prime` string.
+ * @param [generator=2]
+ * @param generatorEncoding The `encoding` of the `generator` string.
+ */
+ function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman;
+ function createDiffieHellman(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman;
+ function createDiffieHellman(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
+ function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman;
+ function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
+ /**
+ * The `DiffieHellman` class is a utility for creating Diffie-Hellman key
+ * exchanges.
+ *
+ * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const {
+ * createDiffieHellman,
+ * } = await import('node:crypto');
+ *
+ * // Generate Alice's keys...
+ * const alice = createDiffieHellman(2048);
+ * const aliceKey = alice.generateKeys();
+ *
+ * // Generate Bob's keys...
+ * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator());
+ * const bobKey = bob.generateKeys();
+ *
+ * // Exchange and generate the secret...
+ * const aliceSecret = alice.computeSecret(bobKey);
+ * const bobSecret = bob.computeSecret(aliceKey);
+ *
+ * // OK
+ * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
+ * ```
+ * @since v0.5.0
+ */
+ class DiffieHellman {
+ private constructor();
+ /**
+ * Generates private and public Diffie-Hellman key values unless they have been
+ * generated or computed already, and returns
+ * the public key in the specified `encoding`. This key should be
+ * transferred to the other party.
+ * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ *
+ * This function is a thin wrapper around [`DH_generate_key()`](https://www.openssl.org/docs/man3.0/man3/DH_generate_key.html). In particular,
+ * once a private key has been generated or set, calling this function only updates
+ * the public key but does not generate a new private key.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ generateKeys(): Buffer;
+ generateKeys(encoding: BinaryToTextEncoding): string;
+ /**
+ * Computes the shared secret using `otherPublicKey` as the other
+ * party's public key and returns the computed shared secret. The supplied
+ * key is interpreted using the specified `inputEncoding`, and secret is
+ * encoded using specified `outputEncoding`.
+ * If the `inputEncoding` is not
+ * provided, `otherPublicKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned.
+ * @since v0.5.0
+ * @param inputEncoding The `encoding` of an `otherPublicKey` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding?: null, outputEncoding?: null): Buffer;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding?: null): Buffer;
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding: null, outputEncoding: BinaryToTextEncoding): string;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman prime in the specified `encoding`.
+ * If `encoding` is provided a string is
+ * returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPrime(): Buffer;
+ getPrime(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman generator in the specified `encoding`.
+ * If `encoding` is provided a string is
+ * returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getGenerator(): Buffer;
+ getGenerator(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman public key in the specified `encoding`.
+ * If `encoding` is provided a
+ * string is returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPublicKey(): Buffer;
+ getPublicKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman private key in the specified `encoding`.
+ * If `encoding` is provided a
+ * string is returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPrivateKey(): Buffer;
+ getPrivateKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * Sets the Diffie-Hellman public key. If the `encoding` argument is provided,`publicKey` is expected
+ * to be a string. If no `encoding` is provided, `publicKey` is expected
+ * to be a `Buffer`, `TypedArray`, or `DataView`.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the `publicKey` string.
+ */
+ setPublicKey(publicKey: NodeJS.ArrayBufferView): void;
+ setPublicKey(publicKey: string, encoding: BufferEncoding): void;
+ /**
+ * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected
+ * to be a string. If no `encoding` is provided, `privateKey` is expected
+ * to be a `Buffer`, `TypedArray`, or `DataView`.
+ *
+ * This function does not automatically compute the associated public key. Either `diffieHellman.setPublicKey()` or `diffieHellman.generateKeys()` can be
+ * used to manually provide the public key or to automatically derive it.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the `privateKey` string.
+ */
+ setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
+ setPrivateKey(privateKey: string, encoding: BufferEncoding): void;
+ /**
+ * A bit field containing any warnings and/or errors resulting from a check
+ * performed during initialization of the `DiffieHellman` object.
+ *
+ * The following values are valid for this property (as defined in `node:constants` module):
+ *
+ * * `DH_CHECK_P_NOT_SAFE_PRIME`
+ * * `DH_CHECK_P_NOT_PRIME`
+ * * `DH_UNABLE_TO_CHECK_GENERATOR`
+ * * `DH_NOT_SUITABLE_GENERATOR`
+ * @since v0.11.12
+ */
+ verifyError: number;
+ }
+ /**
+ * The `DiffieHellmanGroup` class takes a well-known modp group as its argument.
+ * It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation.
+ * In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods.
+ *
+ * ```js
+ * const { createDiffieHellmanGroup } = await import('node:crypto');
+ * const dh = createDiffieHellmanGroup('modp1');
+ * ```
+ * The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt):
+ * ```bash
+ * $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h
+ * modp1 # 768 bits
+ * modp2 # 1024 bits
+ * modp5 # 1536 bits
+ * modp14 # 2048 bits
+ * modp15 # etc.
+ * modp16
+ * modp17
+ * modp18
+ * ```
+ * @since v0.7.5
+ */
+ const DiffieHellmanGroup: DiffieHellmanGroupConstructor;
+ interface DiffieHellmanGroupConstructor {
+ new (name: string): DiffieHellmanGroup;
+ (name: string): DiffieHellmanGroup;
+ readonly prototype: DiffieHellmanGroup;
+ }
+ type DiffieHellmanGroup = Omit<DiffieHellman, 'setPublicKey' | 'setPrivateKey'>;
+ /**
+ * Creates a predefined `DiffieHellmanGroup` key exchange object. The
+ * supported groups are listed in the documentation for `DiffieHellmanGroup`.
+ *
+ * The returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing
+ * the keys (with `diffieHellman.setPublicKey()`, for example). The
+ * advantage of using this method is that the parties do not have to
+ * generate nor exchange a group modulus beforehand, saving both processor
+ * and communication time.
+ *
+ * Example (obtaining a shared secret):
+ *
+ * ```js
+ * const {
+ * getDiffieHellman,
+ * } = await import('node:crypto');
+ * const alice = getDiffieHellman('modp14');
+ * const bob = getDiffieHellman('modp14');
+ *
+ * alice.generateKeys();
+ * bob.generateKeys();
+ *
+ * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex');
+ * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex');
+ *
+ * // aliceSecret and bobSecret should be the same
+ * console.log(aliceSecret === bobSecret);
+ * ```
+ * @since v0.7.5
+ */
+ function getDiffieHellman(groupName: string): DiffieHellmanGroup;
+ /**
+ * An alias for {@link getDiffieHellman}
+ * @since v0.9.3
+ */
+ function createDiffieHellmanGroup(name: string): DiffieHellmanGroup;
+ /**
+ * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2)
+ * implementation. A selected HMAC digest algorithm specified by `digest` is
+ * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
+ *
+ * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an error occurs while deriving the key, `err` will be set;
+ * otherwise `err` will be `null`. By default, the successfully generated`derivedKey` will be passed to the callback as a `Buffer`. An error will be
+ * thrown if any of the input arguments specify invalid values or types.
+ *
+ * The `iterations` argument must be a number set as high as possible. The
+ * higher the number of iterations, the more secure the derived key will be,
+ * but will take a longer amount of time to complete.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * ```js
+ * const {
+ * pbkdf2,
+ * } = await import('node:crypto');
+ *
+ * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
+ * });
+ * ```
+ *
+ * An array of supported digest functions can be retrieved using {@link getHashes}.
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ * @since v0.5.5
+ */
+ function pbkdf2(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string, callback: (err: Error | null, derivedKey: Buffer) => void): void;
+ /**
+ * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2)
+ * implementation. A selected HMAC digest algorithm specified by `digest` is
+ * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
+ *
+ * If an error occurs an `Error` will be thrown, otherwise the derived key will be
+ * returned as a `Buffer`.
+ *
+ * The `iterations` argument must be a number set as high as possible. The
+ * higher the number of iterations, the more secure the derived key will be,
+ * but will take a longer amount of time to complete.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * ```js
+ * const {
+ * pbkdf2Sync,
+ * } = await import('node:crypto');
+ *
+ * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512');
+ * console.log(key.toString('hex')); // '3745e48...08d59ae'
+ * ```
+ *
+ * An array of supported digest functions can be retrieved using {@link getHashes}.
+ * @since v0.9.3
+ */
+ function pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer;
+ /**
+ * Generates cryptographically strong pseudorandom data. The `size` argument
+ * is a number indicating the number of bytes to generate.
+ *
+ * If a `callback` function is provided, the bytes are generated asynchronously
+ * and the `callback` function is invoked with two arguments: `err` and `buf`.
+ * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The`buf` argument is a `Buffer` containing the generated bytes.
+ *
+ * ```js
+ * // Asynchronous
+ * const {
+ * randomBytes,
+ * } = await import('node:crypto');
+ *
+ * randomBytes(256, (err, buf) => {
+ * if (err) throw err;
+ * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`);
+ * });
+ * ```
+ *
+ * If the `callback` function is not provided, the random bytes are generated
+ * synchronously and returned as a `Buffer`. An error will be thrown if
+ * there is a problem generating the bytes.
+ *
+ * ```js
+ * // Synchronous
+ * const {
+ * randomBytes,
+ * } = await import('node:crypto');
+ *
+ * const buf = randomBytes(256);
+ * console.log(
+ * `${buf.length} bytes of random data: ${buf.toString('hex')}`);
+ * ```
+ *
+ * The `crypto.randomBytes()` method will not complete until there is
+ * sufficient entropy available.
+ * This should normally never take longer than a few milliseconds. The only time
+ * when generating the random bytes may conceivably block for a longer period of
+ * time is right after boot, when the whole system is still low on entropy.
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ *
+ * The asynchronous version of `crypto.randomBytes()` is carried out in a single
+ * threadpool request. To minimize threadpool task length variation, partition
+ * large `randomBytes` requests when doing so as part of fulfilling a client
+ * request.
+ * @since v0.5.8
+ * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`.
+ * @return if the `callback` function is not provided.
+ */
+ function randomBytes(size: number): Buffer;
+ function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
+ function pseudoRandomBytes(size: number): Buffer;
+ function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
+ /**
+ * Return a random integer `n` such that `min <= n < max`. This
+ * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias).
+ *
+ * The range (`max - min`) must be less than 248. `min` and `max` must
+ * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger).
+ *
+ * If the `callback` function is not provided, the random integer is
+ * generated synchronously.
+ *
+ * ```js
+ * // Asynchronous
+ * const {
+ * randomInt,
+ * } = await import('node:crypto');
+ *
+ * randomInt(3, (err, n) => {
+ * if (err) throw err;
+ * console.log(`Random number chosen from (0, 1, 2): ${n}`);
+ * });
+ * ```
+ *
+ * ```js
+ * // Synchronous
+ * const {
+ * randomInt,
+ * } = await import('node:crypto');
+ *
+ * const n = randomInt(3);
+ * console.log(`Random number chosen from (0, 1, 2): ${n}`);
+ * ```
+ *
+ * ```js
+ * // With `min` argument
+ * const {
+ * randomInt,
+ * } = await import('node:crypto');
+ *
+ * const n = randomInt(1, 7);
+ * console.log(`The dice rolled: ${n}`);
+ * ```
+ * @since v14.10.0, v12.19.0
+ * @param [min=0] Start of random range (inclusive).
+ * @param max End of random range (exclusive).
+ * @param callback `function(err, n) {}`.
+ */
+ function randomInt(max: number): number;
+ function randomInt(min: number, max: number): number;
+ function randomInt(max: number, callback: (err: Error | null, value: number) => void): void;
+ function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
+ /**
+ * Synchronous version of {@link randomFill}.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const { randomFillSync } = await import('node:crypto');
+ *
+ * const buf = Buffer.alloc(10);
+ * console.log(randomFillSync(buf).toString('hex'));
+ *
+ * randomFillSync(buf, 5);
+ * console.log(buf.toString('hex'));
+ *
+ * // The above is equivalent to the following:
+ * randomFillSync(buf, 5, 5);
+ * console.log(buf.toString('hex'));
+ * ```
+ *
+ * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const { randomFillSync } = await import('node:crypto');
+ *
+ * const a = new Uint32Array(10);
+ * console.log(Buffer.from(randomFillSync(a).buffer,
+ * a.byteOffset, a.byteLength).toString('hex'));
+ *
+ * const b = new DataView(new ArrayBuffer(10));
+ * console.log(Buffer.from(randomFillSync(b).buffer,
+ * b.byteOffset, b.byteLength).toString('hex'));
+ *
+ * const c = new ArrayBuffer(10);
+ * console.log(Buffer.from(randomFillSync(c)).toString('hex'));
+ * ```
+ * @since v7.10.0, v6.13.0
+ * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
+ * @param [offset=0]
+ * @param [size=buffer.length - offset]
+ * @return The object passed as `buffer` argument.
+ */
+ function randomFillSync<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number, size?: number): T;
+ /**
+ * This function is similar to {@link randomBytes} but requires the first
+ * argument to be a `Buffer` that will be filled. It also
+ * requires that a callback is passed in.
+ *
+ * If the `callback` function is not provided, an error will be thrown.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const { randomFill } = await import('node:crypto');
+ *
+ * const buf = Buffer.alloc(10);
+ * randomFill(buf, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ *
+ * randomFill(buf, 5, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ *
+ * // The above is equivalent to the following:
+ * randomFill(buf, 5, 5, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ * ```
+ *
+ * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as`buffer`.
+ *
+ * While this includes instances of `Float32Array` and `Float64Array`, this
+ * function should not be used to generate random floating-point numbers. The
+ * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array
+ * contains finite numbers only, they are not drawn from a uniform random
+ * distribution and have no meaningful lower or upper bounds.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const { randomFill } = await import('node:crypto');
+ *
+ * const a = new Uint32Array(10);
+ * randomFill(a, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
+ * .toString('hex'));
+ * });
+ *
+ * const b = new DataView(new ArrayBuffer(10));
+ * randomFill(b, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
+ * .toString('hex'));
+ * });
+ *
+ * const c = new ArrayBuffer(10);
+ * randomFill(c, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf).toString('hex'));
+ * });
+ * ```
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ *
+ * The asynchronous version of `crypto.randomFill()` is carried out in a single
+ * threadpool request. To minimize threadpool task length variation, partition
+ * large `randomFill` requests when doing so as part of fulfilling a client
+ * request.
+ * @since v7.10.0, v6.13.0
+ * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
+ * @param [offset=0]
+ * @param [size=buffer.length - offset]
+ * @param callback `function(err, buf) {}`.
+ */
+ function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, callback: (err: Error | null, buf: T) => void): void;
+ function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void;
+ function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void;
+ interface ScryptOptions {
+ cost?: number | undefined;
+ blockSize?: number | undefined;
+ parallelization?: number | undefined;
+ N?: number | undefined;
+ r?: number | undefined;
+ p?: number | undefined;
+ maxmem?: number | undefined;
+ }
+ /**
+ * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
+ * key derivation function that is designed to be expensive computationally and
+ * memory-wise in order to make brute-force attacks unrewarding.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * The `callback` function is called with two arguments: `err` and `derivedKey`.`err` is an exception object when key derivation fails, otherwise `err` is`null`. `derivedKey` is passed to the
+ * callback as a `Buffer`.
+ *
+ * An exception is thrown when any of the input arguments specify invalid values
+ * or types.
+ *
+ * ```js
+ * const {
+ * scrypt,
+ * } = await import('node:crypto');
+ *
+ * // Using the factory defaults.
+ * scrypt('password', 'salt', 64, (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
+ * });
+ * // Using a custom N parameter. Must be a power of two.
+ * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34'
+ * });
+ * ```
+ * @since v10.5.0
+ */
+ function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void): void;
+ function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, options: ScryptOptions, callback: (err: Error | null, derivedKey: Buffer) => void): void;
+ /**
+ * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
+ * key derivation function that is designed to be expensive computationally and
+ * memory-wise in order to make brute-force attacks unrewarding.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * An exception is thrown when key derivation fails, otherwise the derived key is
+ * returned as a `Buffer`.
+ *
+ * An exception is thrown when any of the input arguments specify invalid values
+ * or types.
+ *
+ * ```js
+ * const {
+ * scryptSync,
+ * } = await import('node:crypto');
+ * // Using the factory defaults.
+ *
+ * const key1 = scryptSync('password', 'salt', 64);
+ * console.log(key1.toString('hex')); // '3745e48...08d59ae'
+ * // Using a custom N parameter. Must be a power of two.
+ * const key2 = scryptSync('password', 'salt', 64, { N: 1024 });
+ * console.log(key2.toString('hex')); // '3745e48...aa39b34'
+ * ```
+ * @since v10.5.0
+ */
+ function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer;
+ interface RsaPublicKey {
+ key: KeyLike;
+ padding?: number | undefined;
+ }
+ interface RsaPrivateKey {
+ key: KeyLike;
+ passphrase?: string | undefined;
+ /**
+ * @default 'sha1'
+ */
+ oaepHash?: string | undefined;
+ oaepLabel?: NodeJS.TypedArray | undefined;
+ padding?: number | undefined;
+ }
+ /**
+ * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using
+ * the corresponding private key, for example using {@link privateDecrypt}.
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
+ *
+ * Because RSA public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v0.11.14
+ */
+ function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * Decrypts `buffer` with `key`.`buffer` was previously encrypted using
+ * the corresponding private key, for example using {@link privateEncrypt}.
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
+ *
+ * Because RSA public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v1.1.0
+ */
+ function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using
+ * the corresponding public key, for example using {@link publicEncrypt}.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
+ * @since v0.11.14
+ */
+ function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
+ * the corresponding public key, for example using {@link publicDecrypt}.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
+ * @since v1.1.0
+ */
+ function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * ```js
+ * const {
+ * getCiphers,
+ * } = await import('node:crypto');
+ *
+ * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...]
+ * ```
+ * @since v0.9.3
+ * @return An array with the names of the supported cipher algorithms.
+ */
+ function getCiphers(): string[];
+ /**
+ * ```js
+ * const {
+ * getCurves,
+ * } = await import('node:crypto');
+ *
+ * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...]
+ * ```
+ * @since v2.3.0
+ * @return An array with the names of the supported elliptic curves.
+ */
+ function getCurves(): string[];
+ /**
+ * @since v10.0.0
+ * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}.
+ */
+ function getFips(): 1 | 0;
+ /**
+ * Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build.
+ * Throws an error if FIPS mode is not available.
+ * @since v10.0.0
+ * @param bool `true` to enable FIPS mode.
+ */
+ function setFips(bool: boolean): void;
+ /**
+ * ```js
+ * const {
+ * getHashes,
+ * } = await import('node:crypto');
+ *
+ * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...]
+ * ```
+ * @since v0.9.3
+ * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms.
+ */
+ function getHashes(): string[];
+ /**
+ * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH)
+ * key exchanges.
+ *
+ * Instances of the `ECDH` class can be created using the {@link createECDH} function.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const {
+ * createECDH,
+ * } = await import('node:crypto');
+ *
+ * // Generate Alice's keys...
+ * const alice = createECDH('secp521r1');
+ * const aliceKey = alice.generateKeys();
+ *
+ * // Generate Bob's keys...
+ * const bob = createECDH('secp521r1');
+ * const bobKey = bob.generateKeys();
+ *
+ * // Exchange and generate the secret...
+ * const aliceSecret = alice.computeSecret(bobKey);
+ * const bobSecret = bob.computeSecret(aliceKey);
+ *
+ * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
+ * // OK
+ * ```
+ * @since v0.11.14
+ */
+ class ECDH {
+ private constructor();
+ /**
+ * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the
+ * format specified by `format`. The `format` argument specifies point encoding
+ * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is
+ * interpreted using the specified `inputEncoding`, and the returned key is encoded
+ * using the specified `outputEncoding`.
+ *
+ * Use {@link getCurves} to obtain a list of available curve names.
+ * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display
+ * the name and description of each available elliptic curve.
+ *
+ * If `format` is not specified the point will be returned in `'uncompressed'`format.
+ *
+ * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * Example (uncompressing a key):
+ *
+ * ```js
+ * const {
+ * createECDH,
+ * ECDH,
+ * } = await import('node:crypto');
+ *
+ * const ecdh = createECDH('secp256k1');
+ * ecdh.generateKeys();
+ *
+ * const compressedKey = ecdh.getPublicKey('hex', 'compressed');
+ *
+ * const uncompressedKey = ECDH.convertKey(compressedKey,
+ * 'secp256k1',
+ * 'hex',
+ * 'hex',
+ * 'uncompressed');
+ *
+ * // The converted key and the uncompressed public key should be the same
+ * console.log(uncompressedKey === ecdh.getPublicKey('hex'));
+ * ```
+ * @since v10.0.0
+ * @param inputEncoding The `encoding` of the `key` string.
+ * @param outputEncoding The `encoding` of the return value.
+ * @param [format='uncompressed']
+ */
+ static convertKey(
+ key: BinaryLike,
+ curve: string,
+ inputEncoding?: BinaryToTextEncoding,
+ outputEncoding?: 'latin1' | 'hex' | 'base64' | 'base64url',
+ format?: 'uncompressed' | 'compressed' | 'hybrid'
+ ): Buffer | string;
+ /**
+ * Generates private and public EC Diffie-Hellman key values, and returns
+ * the public key in the specified `format` and `encoding`. This key should be
+ * transferred to the other party.
+ *
+ * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format.
+ *
+ * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the return value.
+ * @param [format='uncompressed']
+ */
+ generateKeys(): Buffer;
+ generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
+ /**
+ * Computes the shared secret using `otherPublicKey` as the other
+ * party's public key and returns the computed shared secret. The supplied
+ * key is interpreted using specified `inputEncoding`, and the returned secret
+ * is encoded using the specified `outputEncoding`.
+ * If the `inputEncoding` is not
+ * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or`DataView`.
+ *
+ * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned.
+ *
+ * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey`lies outside of the elliptic curve. Since `otherPublicKey` is
+ * usually supplied from a remote user over an insecure network,
+ * be sure to handle this exception accordingly.
+ * @since v0.11.14
+ * @param inputEncoding The `encoding` of the `otherPublicKey` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer;
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
+ /**
+ * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
+ * returned.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the return value.
+ * @return The EC Diffie-Hellman in the specified `encoding`.
+ */
+ getPrivateKey(): Buffer;
+ getPrivateKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format.
+ *
+ * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
+ * returned.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the return value.
+ * @param [format='uncompressed']
+ * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`.
+ */
+ getPublicKey(encoding?: null, format?: ECDHKeyFormat): Buffer;
+ getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
+ /**
+ * Sets the EC Diffie-Hellman private key.
+ * If `encoding` is provided, `privateKey` is expected
+ * to be a string; otherwise `privateKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * If `privateKey` is not valid for the curve specified when the `ECDH` object was
+ * created, an error is thrown. Upon setting the private key, the associated
+ * public point (key) is also generated and set in the `ECDH` object.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the `privateKey` string.
+ */
+ setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
+ setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void;
+ }
+ /**
+ * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a
+ * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent
+ * OpenSSL releases, `openssl ecparam -list_curves` will also display the name
+ * and description of each available elliptic curve.
+ * @since v0.11.14
+ */
+ function createECDH(curveName: string): ECDH;
+ /**
+ * This function compares the underlying bytes that represent the given`ArrayBuffer`, `TypedArray`, or `DataView` instances using a constant-time
+ * algorithm.
+ *
+ * This function does not leak timing information that
+ * would allow an attacker to guess one of the values. This is suitable for
+ * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/).
+ *
+ * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they
+ * must have the same byte length. An error is thrown if `a` and `b` have
+ * different byte lengths.
+ *
+ * If at least one of `a` and `b` is a `TypedArray` with more than one byte per
+ * entry, such as `Uint16Array`, the result will be computed using the platform
+ * byte order.
+ *
+ * **When both of the inputs are `Float32Array`s or`Float64Array`s, this function might return unexpected results due to IEEE 754**
+ * **encoding of floating-point numbers. In particular, neither `x === y` nor`Object.is(x, y)` implies that the byte representations of two floating-point**
+ * **numbers `x` and `y` are equal.**
+ *
+ * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code
+ * is timing-safe. Care should be taken to ensure that the surrounding code does
+ * not introduce timing vulnerabilities.
+ * @since v6.6.0
+ */
+ function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
+ type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
+ type KeyFormat = 'pem' | 'der' | 'jwk';
+ interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
+ format: T;
+ cipher?: string | undefined;
+ passphrase?: string | undefined;
+ }
+ interface KeyPairKeyObjectResult {
+ publicKey: KeyObject;
+ privateKey: KeyObject;
+ }
+ interface ED25519KeyPairKeyObjectOptions {}
+ interface ED448KeyPairKeyObjectOptions {}
+ interface X25519KeyPairKeyObjectOptions {}
+ interface X448KeyPairKeyObjectOptions {}
+ interface ECKeyPairKeyObjectOptions {
+ /**
+ * Name of the curve to use
+ */
+ namedCurve: string;
+ }
+ interface RSAKeyPairKeyObjectOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ }
+ interface RSAPSSKeyPairKeyObjectOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ /**
+ * Name of the message digest
+ */
+ hashAlgorithm?: string;
+ /**
+ * Name of the message digest used by MGF1
+ */
+ mgf1HashAlgorithm?: string;
+ /**
+ * Minimal salt length in bytes
+ */
+ saltLength?: string;
+ }
+ interface DSAKeyPairKeyObjectOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Size of q in bits
+ */
+ divisorLength: number;
+ }
+ interface RSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ publicKeyEncoding: {
+ type: 'pkcs1' | 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs1' | 'pkcs8';
+ };
+ }
+ interface RSAPSSKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ /**
+ * Name of the message digest
+ */
+ hashAlgorithm?: string;
+ /**
+ * Name of the message digest used by MGF1
+ */
+ mgf1HashAlgorithm?: string;
+ /**
+ * Minimal salt length in bytes
+ */
+ saltLength?: string;
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface DSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Size of q in bits
+ */
+ divisorLength: number;
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Name of the curve to use.
+ */
+ namedCurve: string;
+ publicKeyEncoding: {
+ type: 'pkcs1' | 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'sec1' | 'pkcs8';
+ };
+ }
+ interface ED25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface ED448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface X25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface X448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
+ publicKey: T1;
+ privateKey: T2;
+ }
+ /**
+ * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
+ * Ed25519, Ed448, X25519, X448, and DH are currently supported.
+ *
+ * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
+ * behaves as if `keyObject.export()` had been called on its result. Otherwise,
+ * the respective part of the key is returned as a `KeyObject`.
+ *
+ * When encoding public keys, it is recommended to use `'spki'`. When encoding
+ * private keys, it is recommended to use `'pkcs8'` with a strong passphrase,
+ * and to keep the passphrase confidential.
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync,
+ * } = await import('node:crypto');
+ *
+ * const {
+ * publicKey,
+ * privateKey,
+ * } = generateKeyPairSync('rsa', {
+ * modulusLength: 4096,
+ * publicKeyEncoding: {
+ * type: 'spki',
+ * format: 'pem',
+ * },
+ * privateKeyEncoding: {
+ * type: 'pkcs8',
+ * format: 'pem',
+ * cipher: 'aes-256-cbc',
+ * passphrase: 'top secret',
+ * },
+ * });
+ * ```
+ *
+ * The return value `{ publicKey, privateKey }` represents the generated key pair.
+ * When PEM encoding was selected, the respective key will be a string, otherwise
+ * it will be a buffer containing the data encoded as DER.
+ * @since v10.12.0
+ * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
+ */
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ /**
+ * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
+ * Ed25519, Ed448, X25519, X448, and DH are currently supported.
+ *
+ * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
+ * behaves as if `keyObject.export()` had been called on its result. Otherwise,
+ * the respective part of the key is returned as a `KeyObject`.
+ *
+ * It is recommended to encode public keys as `'spki'` and private keys as`'pkcs8'` with encryption for long-term storage:
+ *
+ * ```js
+ * const {
+ * generateKeyPair,
+ * } = await import('node:crypto');
+ *
+ * generateKeyPair('rsa', {
+ * modulusLength: 4096,
+ * publicKeyEncoding: {
+ * type: 'spki',
+ * format: 'pem',
+ * },
+ * privateKeyEncoding: {
+ * type: 'pkcs8',
+ * format: 'pem',
+ * cipher: 'aes-256-cbc',
+ * passphrase: 'top secret',
+ * },
+ * }, (err, publicKey, privateKey) => {
+ * // Handle errors and use the generated key pair.
+ * });
+ * ```
+ *
+ * On completion, `callback` will be called with `err` set to `undefined` and`publicKey` / `privateKey` representing the generated key pair.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a `Promise` for an `Object` with `publicKey` and `privateKey` properties.
+ * @since v10.12.0
+ * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
+ */
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ namespace generateKeyPair {
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'rsa-pss',
+ options: RSAPSSKeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'rsa-pss',
+ options: RSAPSSKeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'rsa-pss',
+ options: RSAPSSKeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'rsa-pss',
+ options: RSAPSSKeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'dsa', options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'ec', options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'x448', options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ }
+ /**
+ * Calculates and returns the signature for `data` using the given private key and
+ * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is
+ * dependent upon the key type (especially Ed25519 and Ed448).
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if `key` had been
+ * passed to {@link createPrivateKey}. If it is an object, the following
+ * additional properties can be passed:
+ *
+ * If the `callback` function is provided this function uses libuv's threadpool.
+ * @since v12.0.0
+ */
+ function sign(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
+ function sign(
+ algorithm: string | null | undefined,
+ data: NodeJS.ArrayBufferView,
+ key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
+ callback: (error: Error | null, data: Buffer) => void
+ ): void;
+ /**
+ * Verifies the given signature for `data` using the given key and algorithm. If`algorithm` is `null` or `undefined`, then the algorithm is dependent upon the
+ * key type (especially Ed25519 and Ed448).
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if `key` had been
+ * passed to {@link createPublicKey}. If it is an object, the following
+ * additional properties can be passed:
+ *
+ * The `signature` argument is the previously calculated signature for the `data`.
+ *
+ * Because public keys can be derived from private keys, a private key or a public
+ * key may be passed for `key`.
+ *
+ * If the `callback` function is provided this function uses libuv's threadpool.
+ * @since v12.0.0
+ */
+ function verify(
+ algorithm: string | null | undefined,
+ data: NodeJS.ArrayBufferView,
+ key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
+ signature: NodeJS.ArrayBufferView
+ ): boolean;
+ function verify(
+ algorithm: string | null | undefined,
+ data: NodeJS.ArrayBufferView,
+ key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
+ signature: NodeJS.ArrayBufferView,
+ callback: (error: Error | null, result: boolean) => void
+ ): void;
+ /**
+ * Computes the Diffie-Hellman secret based on a `privateKey` and a `publicKey`.
+ * Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'`(for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES).
+ * @since v13.9.0, v12.17.0
+ */
+ function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer;
+ type CipherMode = 'cbc' | 'ccm' | 'cfb' | 'ctr' | 'ecb' | 'gcm' | 'ocb' | 'ofb' | 'stream' | 'wrap' | 'xts';
+ interface CipherInfoOptions {
+ /**
+ * A test key length.
+ */
+ keyLength?: number | undefined;
+ /**
+ * A test IV length.
+ */
+ ivLength?: number | undefined;
+ }
+ interface CipherInfo {
+ /**
+ * The name of the cipher.
+ */
+ name: string;
+ /**
+ * The nid of the cipher.
+ */
+ nid: number;
+ /**
+ * The block size of the cipher in bytes.
+ * This property is omitted when mode is 'stream'.
+ */
+ blockSize?: number | undefined;
+ /**
+ * The expected or default initialization vector length in bytes.
+ * This property is omitted if the cipher does not use an initialization vector.
+ */
+ ivLength?: number | undefined;
+ /**
+ * The expected or default key length in bytes.
+ */
+ keyLength: number;
+ /**
+ * The cipher mode.
+ */
+ mode: CipherMode;
+ }
+ /**
+ * Returns information about a given cipher.
+ *
+ * Some ciphers accept variable length keys and initialization vectors. By default,
+ * the `crypto.getCipherInfo()` method will return the default values for these
+ * ciphers. To test if a given key length or iv length is acceptable for given
+ * cipher, use the `keyLength` and `ivLength` options. If the given values are
+ * unacceptable, `undefined` will be returned.
+ * @since v15.0.0
+ * @param nameOrNid The name or nid of the cipher to query.
+ */
+ function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined;
+ /**
+ * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`,`salt` and `info` are used with the `digest` to derive a key of `keylen` bytes.
+ *
+ * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an errors occurs while deriving the key, `err` will be set;
+ * otherwise `err` will be `null`. The successfully generated `derivedKey` will
+ * be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any
+ * of the input arguments specify invalid values or types.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const {
+ * hkdf,
+ * } = await import('node:crypto');
+ *
+ * hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653'
+ * });
+ * ```
+ * @since v15.0.0
+ * @param digest The digest algorithm to use.
+ * @param ikm The input keying material. Must be provided but can be zero-length.
+ * @param salt The salt value. Must be provided but can be zero-length.
+ * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes.
+ * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512`
+ * generates 64-byte hashes, making the maximum HKDF output 16320 bytes).
+ */
+ function hkdf(digest: string, irm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: ArrayBuffer) => void): void;
+ /**
+ * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The
+ * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of`keylen` bytes.
+ *
+ * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer).
+ *
+ * An error will be thrown if any of the input arguments specify invalid values or
+ * types, or if the derived key cannot be generated.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const {
+ * hkdfSync,
+ * } = await import('node:crypto');
+ *
+ * const derivedKey = hkdfSync('sha512', 'key', 'salt', 'info', 64);
+ * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653'
+ * ```
+ * @since v15.0.0
+ * @param digest The digest algorithm to use.
+ * @param ikm The input keying material. Must be provided but can be zero-length.
+ * @param salt The salt value. Must be provided but can be zero-length.
+ * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes.
+ * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512`
+ * generates 64-byte hashes, making the maximum HKDF output 16320 bytes).
+ */
+ function hkdfSync(digest: string, ikm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number): ArrayBuffer;
+ interface SecureHeapUsage {
+ /**
+ * The total allocated secure heap size as specified using the `--secure-heap=n` command-line flag.
+ */
+ total: number;
+ /**
+ * The minimum allocation from the secure heap as specified using the `--secure-heap-min` command-line flag.
+ */
+ min: number;
+ /**
+ * The total number of bytes currently allocated from the secure heap.
+ */
+ used: number;
+ /**
+ * The calculated ratio of `used` to `total` allocated bytes.
+ */
+ utilization: number;
+ }
+ /**
+ * @since v15.6.0
+ */
+ function secureHeapUsed(): SecureHeapUsage;
+ interface RandomUUIDOptions {
+ /**
+ * By default, to improve performance,
+ * Node.js will pre-emptively generate and persistently cache enough
+ * random data to generate up to 128 random UUIDs. To generate a UUID
+ * without using the cache, set `disableEntropyCache` to `true`.
+ *
+ * @default `false`
+ */
+ disableEntropyCache?: boolean | undefined;
+ }
+ /**
+ * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a
+ * cryptographic pseudorandom number generator.
+ * @since v15.6.0, v14.17.0
+ */
+ function randomUUID(options?: RandomUUIDOptions): string;
+ interface X509CheckOptions {
+ /**
+ * @default 'always'
+ */
+ subject?: 'always' | 'default' | 'never';
+ /**
+ * @default true
+ */
+ wildcards?: boolean;
+ /**
+ * @default true
+ */
+ partialWildcards?: boolean;
+ /**
+ * @default false
+ */
+ multiLabelWildcards?: boolean;
+ /**
+ * @default false
+ */
+ singleLabelSubdomains?: boolean;
+ }
+ /**
+ * Encapsulates an X509 certificate and provides read-only access to
+ * its information.
+ *
+ * ```js
+ * const { X509Certificate } = await import('node:crypto');
+ *
+ * const x509 = new X509Certificate('{... pem encoded cert ...}');
+ *
+ * console.log(x509.subject);
+ * ```
+ * @since v15.6.0
+ */
+ class X509Certificate {
+ /**
+ * Will be \`true\` if this is a Certificate Authority (CA) certificate.
+ * @since v15.6.0
+ */
+ readonly ca: boolean;
+ /**
+ * The SHA-1 fingerprint of this certificate.
+ *
+ * Because SHA-1 is cryptographically broken and because the security of SHA-1 is
+ * significantly worse than that of algorithms that are commonly used to sign
+ * certificates, consider using `x509.fingerprint256` instead.
+ * @since v15.6.0
+ */
+ readonly fingerprint: string;
+ /**
+ * The SHA-256 fingerprint of this certificate.
+ * @since v15.6.0
+ */
+ readonly fingerprint256: string;
+ /**
+ * The SHA-512 fingerprint of this certificate.
+ *
+ * Because computing the SHA-256 fingerprint is usually faster and because it is
+ * only half the size of the SHA-512 fingerprint, `x509.fingerprint256` may be
+ * a better choice. While SHA-512 presumably provides a higher level of security in
+ * general, the security of SHA-256 matches that of most algorithms that are
+ * commonly used to sign certificates.
+ * @since v17.2.0, v16.14.0
+ */
+ readonly fingerprint512: string;
+ /**
+ * The complete subject of this certificate.
+ * @since v15.6.0
+ */
+ readonly subject: string;
+ /**
+ * The subject alternative name specified for this certificate.
+ *
+ * This is a comma-separated list of subject alternative names. Each entry begins
+ * with a string identifying the kind of the subject alternative name followed by
+ * a colon and the value associated with the entry.
+ *
+ * Earlier versions of Node.js incorrectly assumed that it is safe to split this
+ * property at the two-character sequence `', '` (see [CVE-2021-44532](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44532)). However,
+ * both malicious and legitimate certificates can contain subject alternative names
+ * that include this sequence when represented as a string.
+ *
+ * After the prefix denoting the type of the entry, the remainder of each entry
+ * might be enclosed in quotes to indicate that the value is a JSON string literal.
+ * For backward compatibility, Node.js only uses JSON string literals within this
+ * property when necessary to avoid ambiguity. Third-party code should be prepared
+ * to handle both possible entry formats.
+ * @since v15.6.0
+ */
+ readonly subjectAltName: string | undefined;
+ /**
+ * A textual representation of the certificate's authority information access
+ * extension.
+ *
+ * This is a line feed separated list of access descriptions. Each line begins with
+ * the access method and the kind of the access location, followed by a colon and
+ * the value associated with the access location.
+ *
+ * After the prefix denoting the access method and the kind of the access location,
+ * the remainder of each line might be enclosed in quotes to indicate that the
+ * value is a JSON string literal. For backward compatibility, Node.js only uses
+ * JSON string literals within this property when necessary to avoid ambiguity.
+ * Third-party code should be prepared to handle both possible entry formats.
+ * @since v15.6.0
+ */
+ readonly infoAccess: string | undefined;
+ /**
+ * An array detailing the key usages for this certificate.
+ * @since v15.6.0
+ */
+ readonly keyUsage: string[];
+ /**
+ * The issuer identification included in this certificate.
+ * @since v15.6.0
+ */
+ readonly issuer: string;
+ /**
+ * The issuer certificate or `undefined` if the issuer certificate is not
+ * available.
+ * @since v15.9.0
+ */
+ readonly issuerCertificate?: X509Certificate | undefined;
+ /**
+ * The public key `KeyObject` for this certificate.
+ * @since v15.6.0
+ */
+ readonly publicKey: KeyObject;
+ /**
+ * A `Buffer` containing the DER encoding of this certificate.
+ * @since v15.6.0
+ */
+ readonly raw: Buffer;
+ /**
+ * The serial number of this certificate.
+ *
+ * Serial numbers are assigned by certificate authorities and do not uniquely
+ * identify certificates. Consider using `x509.fingerprint256` as a unique
+ * identifier instead.
+ * @since v15.6.0
+ */
+ readonly serialNumber: string;
+ /**
+ * The date/time from which this certificate is considered valid.
+ * @since v15.6.0
+ */
+ readonly validFrom: string;
+ /**
+ * The date/time until which this certificate is considered valid.
+ * @since v15.6.0
+ */
+ readonly validTo: string;
+ constructor(buffer: BinaryLike);
+ /**
+ * Checks whether the certificate matches the given email address.
+ *
+ * If the `'subject'` option is undefined or set to `'default'`, the certificate
+ * subject is only considered if the subject alternative name extension either does
+ * not exist or does not contain any email addresses.
+ *
+ * If the `'subject'` option is set to `'always'` and if the subject alternative
+ * name extension either does not exist or does not contain a matching email
+ * address, the certificate subject is considered.
+ *
+ * If the `'subject'` option is set to `'never'`, the certificate subject is never
+ * considered, even if the certificate contains no subject alternative names.
+ * @since v15.6.0
+ * @return Returns `email` if the certificate matches, `undefined` if it does not.
+ */
+ checkEmail(email: string, options?: Pick<X509CheckOptions, 'subject'>): string | undefined;
+ /**
+ * Checks whether the certificate matches the given host name.
+ *
+ * If the certificate matches the given host name, the matching subject name is
+ * returned. The returned name might be an exact match (e.g., `foo.example.com`)
+ * or it might contain wildcards (e.g., `*.example.com`). Because host name
+ * comparisons are case-insensitive, the returned subject name might also differ
+ * from the given `name` in capitalization.
+ *
+ * If the `'subject'` option is undefined or set to `'default'`, the certificate
+ * subject is only considered if the subject alternative name extension either does
+ * not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS").
+ *
+ * If the `'subject'` option is set to `'always'` and if the subject alternative
+ * name extension either does not exist or does not contain a matching DNS name,
+ * the certificate subject is considered.
+ *
+ * If the `'subject'` option is set to `'never'`, the certificate subject is never
+ * considered, even if the certificate contains no subject alternative names.
+ * @since v15.6.0
+ * @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`.
+ */
+ checkHost(name: string, options?: X509CheckOptions): string | undefined;
+ /**
+ * Checks whether the certificate matches the given IP address (IPv4 or IPv6).
+ *
+ * Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they
+ * must match the given `ip` address exactly. Other subject alternative names as
+ * well as the subject field of the certificate are ignored.
+ * @since v15.6.0
+ * @return Returns `ip` if the certificate matches, `undefined` if it does not.
+ */
+ checkIP(ip: string): string | undefined;
+ /**
+ * Checks whether this certificate was issued by the given `otherCert`.
+ * @since v15.6.0
+ */
+ checkIssued(otherCert: X509Certificate): boolean;
+ /**
+ * Checks whether the public key for this certificate is consistent with
+ * the given private key.
+ * @since v15.6.0
+ * @param privateKey A private key.
+ */
+ checkPrivateKey(privateKey: KeyObject): boolean;
+ /**
+ * There is no standard JSON encoding for X509 certificates. The`toJSON()` method returns a string containing the PEM encoded
+ * certificate.
+ * @since v15.6.0
+ */
+ toJSON(): string;
+ /**
+ * Returns information about this certificate using the legacy `certificate object` encoding.
+ * @since v15.6.0
+ */
+ toLegacyObject(): PeerCertificate;
+ /**
+ * Returns the PEM-encoded certificate.
+ * @since v15.6.0
+ */
+ toString(): string;
+ /**
+ * Verifies that this certificate was signed by the given public key.
+ * Does not perform any other validation checks on the certificate.
+ * @since v15.6.0
+ * @param publicKey A public key.
+ */
+ verify(publicKey: KeyObject): boolean;
+ }
+ type LargeNumberLike = NodeJS.ArrayBufferView | SharedArrayBuffer | ArrayBuffer | bigint;
+ interface GeneratePrimeOptions {
+ add?: LargeNumberLike | undefined;
+ rem?: LargeNumberLike | undefined;
+ /**
+ * @default false
+ */
+ safe?: boolean | undefined;
+ bigint?: boolean | undefined;
+ }
+ interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions {
+ bigint: true;
+ }
+ interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions {
+ bigint?: false | undefined;
+ }
+ /**
+ * Generates a pseudorandom prime of `size` bits.
+ *
+ * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime.
+ *
+ * The `options.add` and `options.rem` parameters can be used to enforce additional
+ * requirements, e.g., for Diffie-Hellman:
+ *
+ * * If `options.add` and `options.rem` are both set, the prime will satisfy the
+ * condition that `prime % add = rem`.
+ * * If only `options.add` is set and `options.safe` is not `true`, the prime will
+ * satisfy the condition that `prime % add = 1`.
+ * * If only `options.add` is set and `options.safe` is set to `true`, the prime
+ * will instead satisfy the condition that `prime % add = 3`. This is necessary
+ * because `prime % add = 1` for `options.add > 2` would contradict the condition
+ * enforced by `options.safe`.
+ * * `options.rem` is ignored if `options.add` is not given.
+ *
+ * Both `options.add` and `options.rem` must be encoded as big-endian sequences
+ * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
+ *
+ * By default, the prime is encoded as a big-endian sequence of octets
+ * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
+ * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided.
+ * @since v15.8.0
+ * @param size The size (in bits) of the prime to generate.
+ */
+ function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void;
+ function generatePrime(size: number, options: GeneratePrimeOptionsBigInt, callback: (err: Error | null, prime: bigint) => void): void;
+ function generatePrime(size: number, options: GeneratePrimeOptionsArrayBuffer, callback: (err: Error | null, prime: ArrayBuffer) => void): void;
+ function generatePrime(size: number, options: GeneratePrimeOptions, callback: (err: Error | null, prime: ArrayBuffer | bigint) => void): void;
+ /**
+ * Generates a pseudorandom prime of `size` bits.
+ *
+ * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime.
+ *
+ * The `options.add` and `options.rem` parameters can be used to enforce additional
+ * requirements, e.g., for Diffie-Hellman:
+ *
+ * * If `options.add` and `options.rem` are both set, the prime will satisfy the
+ * condition that `prime % add = rem`.
+ * * If only `options.add` is set and `options.safe` is not `true`, the prime will
+ * satisfy the condition that `prime % add = 1`.
+ * * If only `options.add` is set and `options.safe` is set to `true`, the prime
+ * will instead satisfy the condition that `prime % add = 3`. This is necessary
+ * because `prime % add = 1` for `options.add > 2` would contradict the condition
+ * enforced by `options.safe`.
+ * * `options.rem` is ignored if `options.add` is not given.
+ *
+ * Both `options.add` and `options.rem` must be encoded as big-endian sequences
+ * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
+ *
+ * By default, the prime is encoded as a big-endian sequence of octets
+ * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
+ * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided.
+ * @since v15.8.0
+ * @param size The size (in bits) of the prime to generate.
+ */
+ function generatePrimeSync(size: number): ArrayBuffer;
+ function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint;
+ function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer;
+ function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint;
+ interface CheckPrimeOptions {
+ /**
+ * The number of Miller-Rabin probabilistic primality iterations to perform.
+ * When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most `2**-64` for random input.
+ * Care must be used when selecting a number of checks.
+ * Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details.
+ *
+ * @default 0
+ */
+ checks?: number | undefined;
+ }
+ /**
+ * Checks the primality of the `candidate`.
+ * @since v15.8.0
+ * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length.
+ */
+ function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void;
+ function checkPrime(value: LargeNumberLike, options: CheckPrimeOptions, callback: (err: Error | null, result: boolean) => void): void;
+ /**
+ * Checks the primality of the `candidate`.
+ * @since v15.8.0
+ * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length.
+ * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`.
+ */
+ function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean;
+ /**
+ * Load and set the `engine` for some or all OpenSSL functions (selected by flags).
+ *
+ * `engine` could be either an id or a path to the engine's shared library.
+ *
+ * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. The `flags`is a bit field taking one of or a mix of the following flags (defined in`crypto.constants`):
+ *
+ * * `crypto.constants.ENGINE_METHOD_RSA`
+ * * `crypto.constants.ENGINE_METHOD_DSA`
+ * * `crypto.constants.ENGINE_METHOD_DH`
+ * * `crypto.constants.ENGINE_METHOD_RAND`
+ * * `crypto.constants.ENGINE_METHOD_EC`
+ * * `crypto.constants.ENGINE_METHOD_CIPHERS`
+ * * `crypto.constants.ENGINE_METHOD_DIGESTS`
+ * * `crypto.constants.ENGINE_METHOD_PKEY_METHS`
+ * * `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS`
+ * * `crypto.constants.ENGINE_METHOD_ALL`
+ * * `crypto.constants.ENGINE_METHOD_NONE`
+ * @since v0.11.11
+ * @param flags
+ */
+ function setEngine(engine: string, flags?: number): void;
+ /**
+ * A convenient alias for {@link webcrypto.getRandomValues}. This
+ * implementation is not compliant with the Web Crypto spec, to write
+ * web-compatible code use {@link webcrypto.getRandomValues} instead.
+ * @since v17.4.0
+ * @return Returns `typedArray`.
+ */
+ function getRandomValues<T extends webcrypto.BufferSource>(typedArray: T): T;
+ /**
+ * A convenient alias for `crypto.webcrypto.subtle`.
+ * @since v17.4.0
+ */
+ const subtle: webcrypto.SubtleCrypto;
+ /**
+ * An implementation of the Web Crypto API standard.
+ *
+ * See the {@link https://nodejs.org/docs/latest/api/webcrypto.html Web Crypto API documentation} for details.
+ * @since v15.0.0
+ */
+ const webcrypto: webcrypto.Crypto;
+ namespace webcrypto {
+ type BufferSource = ArrayBufferView | ArrayBuffer;
+ type KeyFormat = 'jwk' | 'pkcs8' | 'raw' | 'spki';
+ type KeyType = 'private' | 'public' | 'secret';
+ type KeyUsage = 'decrypt' | 'deriveBits' | 'deriveKey' | 'encrypt' | 'sign' | 'unwrapKey' | 'verify' | 'wrapKey';
+ type AlgorithmIdentifier = Algorithm | string;
+ type HashAlgorithmIdentifier = AlgorithmIdentifier;
+ type NamedCurve = string;
+ type BigInteger = Uint8Array;
+ interface AesCbcParams extends Algorithm {
+ iv: BufferSource;
+ }
+ interface AesCtrParams extends Algorithm {
+ counter: BufferSource;
+ length: number;
+ }
+ interface AesDerivedKeyParams extends Algorithm {
+ length: number;
+ }
+ interface AesGcmParams extends Algorithm {
+ additionalData?: BufferSource;
+ iv: BufferSource;
+ tagLength?: number;
+ }
+ interface AesKeyAlgorithm extends KeyAlgorithm {
+ length: number;
+ }
+ interface AesKeyGenParams extends Algorithm {
+ length: number;
+ }
+ interface Algorithm {
+ name: string;
+ }
+ interface EcKeyAlgorithm extends KeyAlgorithm {
+ namedCurve: NamedCurve;
+ }
+ interface EcKeyGenParams extends Algorithm {
+ namedCurve: NamedCurve;
+ }
+ interface EcKeyImportParams extends Algorithm {
+ namedCurve: NamedCurve;
+ }
+ interface EcdhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+ }
+ interface EcdsaParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ }
+ interface Ed448Params extends Algorithm {
+ context?: BufferSource;
+ }
+ interface HkdfParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ info: BufferSource;
+ salt: BufferSource;
+ }
+ interface HmacImportParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ length?: number;
+ }
+ interface HmacKeyAlgorithm extends KeyAlgorithm {
+ hash: KeyAlgorithm;
+ length: number;
+ }
+ interface HmacKeyGenParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ length?: number;
+ }
+ interface JsonWebKey {
+ alg?: string;
+ crv?: string;
+ d?: string;
+ dp?: string;
+ dq?: string;
+ e?: string;
+ ext?: boolean;
+ k?: string;
+ key_ops?: string[];
+ kty?: string;
+ n?: string;
+ oth?: RsaOtherPrimesInfo[];
+ p?: string;
+ q?: string;
+ qi?: string;
+ use?: string;
+ x?: string;
+ y?: string;
+ }
+ interface KeyAlgorithm {
+ name: string;
+ }
+ interface Pbkdf2Params extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ iterations: number;
+ salt: BufferSource;
+ }
+ interface RsaHashedImportParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ }
+ interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
+ hash: KeyAlgorithm;
+ }
+ interface RsaHashedKeyGenParams extends RsaKeyGenParams {
+ hash: HashAlgorithmIdentifier;
+ }
+ interface RsaKeyAlgorithm extends KeyAlgorithm {
+ modulusLength: number;
+ publicExponent: BigInteger;
+ }
+ interface RsaKeyGenParams extends Algorithm {
+ modulusLength: number;
+ publicExponent: BigInteger;
+ }
+ interface RsaOaepParams extends Algorithm {
+ label?: BufferSource;
+ }
+ interface RsaOtherPrimesInfo {
+ d?: string;
+ r?: string;
+ t?: string;
+ }
+ interface RsaPssParams extends Algorithm {
+ saltLength: number;
+ }
+ /**
+ * Calling `require('node:crypto').webcrypto` returns an instance of the `Crypto` class.
+ * `Crypto` is a singleton that provides access to the remainder of the crypto API.
+ * @since v15.0.0
+ */
+ interface Crypto {
+ /**
+ * Provides access to the `SubtleCrypto` API.
+ * @since v15.0.0
+ */
+ readonly subtle: SubtleCrypto;
+ /**
+ * Generates cryptographically strong random values.
+ * The given `typedArray` is filled with random values, and a reference to `typedArray` is returned.
+ *
+ * The given `typedArray` must be an integer-based instance of {@link NodeJS.TypedArray}, i.e. `Float32Array` and `Float64Array` are not accepted.
+ *
+ * An error will be thrown if the given `typedArray` is larger than 65,536 bytes.
+ * @since v15.0.0
+ */
+ getRandomValues<T extends Exclude<NodeJS.TypedArray, Float32Array | Float64Array>>(typedArray: T): T;
+ /**
+ * Generates a random {@link https://www.rfc-editor.org/rfc/rfc4122.txt RFC 4122} version 4 UUID.
+ * The UUID is generated using a cryptographic pseudorandom number generator.
+ * @since v16.7.0
+ */
+ randomUUID(): string;
+ CryptoKey: CryptoKeyConstructor;
+ }
+ // This constructor throws ILLEGAL_CONSTRUCTOR so it should not be newable.
+ interface CryptoKeyConstructor {
+ /** Illegal constructor */
+ (_: { readonly _: unique symbol }): never; // Allows instanceof to work but not be callable by the user.
+ readonly length: 0;
+ readonly name: 'CryptoKey';
+ readonly prototype: CryptoKey;
+ }
+ /**
+ * @since v15.0.0
+ */
+ interface CryptoKey {
+ /**
+ * An object detailing the algorithm for which the key can be used along with additional algorithm-specific parameters.
+ * @since v15.0.0
+ */
+ readonly algorithm: KeyAlgorithm;
+ /**
+ * When `true`, the {@link CryptoKey} can be extracted using either `subtleCrypto.exportKey()` or `subtleCrypto.wrapKey()`.
+ * @since v15.0.0
+ */
+ readonly extractable: boolean;
+ /**
+ * A string identifying whether the key is a symmetric (`'secret'`) or asymmetric (`'private'` or `'public'`) key.
+ * @since v15.0.0
+ */
+ readonly type: KeyType;
+ /**
+ * An array of strings identifying the operations for which the key may be used.
+ *
+ * The possible usages are:
+ * - `'encrypt'` - The key may be used to encrypt data.
+ * - `'decrypt'` - The key may be used to decrypt data.
+ * - `'sign'` - The key may be used to generate digital signatures.
+ * - `'verify'` - The key may be used to verify digital signatures.
+ * - `'deriveKey'` - The key may be used to derive a new key.
+ * - `'deriveBits'` - The key may be used to derive bits.
+ * - `'wrapKey'` - The key may be used to wrap another key.
+ * - `'unwrapKey'` - The key may be used to unwrap another key.
+ *
+ * Valid key usages depend on the key algorithm (identified by `cryptokey.algorithm.name`).
+ * @since v15.0.0
+ */
+ readonly usages: KeyUsage[];
+ }
+ /**
+ * The `CryptoKeyPair` is a simple dictionary object with `publicKey` and `privateKey` properties, representing an asymmetric key pair.
+ * @since v15.0.0
+ */
+ interface CryptoKeyPair {
+ /**
+ * A {@link CryptoKey} whose type will be `'private'`.
+ * @since v15.0.0
+ */
+ privateKey: CryptoKey;
+ /**
+ * A {@link CryptoKey} whose type will be `'public'`.
+ * @since v15.0.0
+ */
+ publicKey: CryptoKey;
+ }
+ /**
+ * @since v15.0.0
+ */
+ interface SubtleCrypto {
+ /**
+ * Using the method and parameters specified in `algorithm` and the keying material provided by `key`,
+ * `subtle.decrypt()` attempts to decipher the provided `data`. If successful,
+ * the returned promise will be resolved with an `<ArrayBuffer>` containing the plaintext result.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'RSA-OAEP'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * @since v15.0.0
+ */
+ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ /**
+ * Using the method and parameters specified in `algorithm` and the keying material provided by `baseKey`,
+ * `subtle.deriveBits()` attempts to generate `length` bits.
+ * The Node.js implementation requires that when `length` is a number it must be multiple of `8`.
+ * When `length` is `null` the maximum number of bits for a given algorithm is generated. This is allowed
+ * for the `'ECDH'`, `'X25519'`, and `'X448'` algorithms.
+ * If successful, the returned promise will be resolved with an `<ArrayBuffer>` containing the generated data.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
+ * - `'HKDF'`
+ * - `'PBKDF2'`
+ * @since v15.0.0
+ */
+ deriveBits(algorithm: EcdhKeyDeriveParams, baseKey: CryptoKey, length: number | null): Promise<ArrayBuffer>;
+ deriveBits(algorithm: AlgorithmIdentifier | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
+ /**
+ * Using the method and parameters specified in `algorithm`, and the keying material provided by `baseKey`,
+ * `subtle.deriveKey()` attempts to generate a new <CryptoKey>` based on the method and parameters in `derivedKeyAlgorithm`.
+ *
+ * Calling `subtle.deriveKey()` is equivalent to calling `subtle.deriveBits()` to generate raw keying material,
+ * then passing the result into the `subtle.importKey()` method using the `deriveKeyAlgorithm`, `extractable`, and `keyUsages` parameters as input.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
+ * - `'HKDF'`
+ * - `'PBKDF2'`
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
+ * @since v15.0.0
+ */
+ deriveKey(
+ algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params,
+ baseKey: CryptoKey,
+ derivedKeyAlgorithm: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params,
+ extractable: boolean,
+ keyUsages: ReadonlyArray<KeyUsage>
+ ): Promise<CryptoKey>;
+ /**
+ * Using the method identified by `algorithm`, `subtle.digest()` attempts to generate a digest of `data`.
+ * If successful, the returned promise is resolved with an `<ArrayBuffer>` containing the computed digest.
+ *
+ * If `algorithm` is provided as a `<string>`, it must be one of:
+ *
+ * - `'SHA-1'`
+ * - `'SHA-256'`
+ * - `'SHA-384'`
+ * - `'SHA-512'`
+ *
+ * If `algorithm` is provided as an `<Object>`, it must have a `name` property whose value is one of the above.
+ * @since v15.0.0
+ */
+ digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
+ /**
+ * Using the method and parameters specified by `algorithm` and the keying material provided by `key`,
+ * `subtle.encrypt()` attempts to encipher `data`. If successful,
+ * the returned promise is resolved with an `<ArrayBuffer>` containing the encrypted result.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'RSA-OAEP'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * @since v15.0.0
+ */
+ encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ /**
+ * Exports the given key into the specified format, if supported.
+ *
+ * If the `<CryptoKey>` is not extractable, the returned promise will reject.
+ *
+ * When `format` is either `'pkcs8'` or `'spki'` and the export is successful,
+ * the returned promise will be resolved with an `<ArrayBuffer>` containing the exported key data.
+ *
+ * When `format` is `'jwk'` and the export is successful, the returned promise will be resolved with a
+ * JavaScript object conforming to the {@link https://tools.ietf.org/html/rfc7517 JSON Web Key} specification.
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
+ * @returns `<Promise>` containing `<ArrayBuffer>`.
+ * @since v15.0.0
+ */
+ exportKey(format: 'jwk', key: CryptoKey): Promise<JsonWebKey>;
+ exportKey(format: Exclude<KeyFormat, 'jwk'>, key: CryptoKey): Promise<ArrayBuffer>;
+ /**
+ * Using the method and parameters provided in `algorithm`,
+ * `subtle.generateKey()` attempts to generate new keying material.
+ * Depending the method used, the method may generate either a single `<CryptoKey>` or a `<CryptoKeyPair>`.
+ *
+ * The `<CryptoKeyPair>` (public and private key) generating algorithms supported include:
+ *
+ * - `'RSASSA-PKCS1-v1_5'`
+ * - `'RSA-PSS'`
+ * - `'RSA-OAEP'`
+ * - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
+ * - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
+ * The `<CryptoKey>` (secret key) generating algorithms supported include:
+ *
+ * - `'HMAC'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * - `'AES-KW'`
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
+ * @since v15.0.0
+ */
+ generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
+ generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
+ generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
+ /**
+ * The `subtle.importKey()` method attempts to interpret the provided `keyData` as the given `format`
+ * to create a `<CryptoKey>` instance using the provided `algorithm`, `extractable`, and `keyUsages` arguments.
+ * If the import is successful, the returned promise will be resolved with the created `<CryptoKey>`.
+ *
+ * If importing a `'PBKDF2'` key, `extractable` must be `false`.
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
+ * @since v15.0.0
+ */
+ importKey(
+ format: 'jwk',
+ keyData: JsonWebKey,
+ algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
+ extractable: boolean,
+ keyUsages: ReadonlyArray<KeyUsage>
+ ): Promise<CryptoKey>;
+ importKey(
+ format: Exclude<KeyFormat, 'jwk'>,
+ keyData: BufferSource,
+ algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
+ extractable: boolean,
+ keyUsages: KeyUsage[]
+ ): Promise<CryptoKey>;
+ /**
+ * Using the method and parameters given by `algorithm` and the keying material provided by `key`,
+ * `subtle.sign()` attempts to generate a cryptographic signature of `data`. If successful,
+ * the returned promise is resolved with an `<ArrayBuffer>` containing the generated signature.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'RSASSA-PKCS1-v1_5'`
+ * - `'RSA-PSS'`
+ * - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
+ * - `'HMAC'`
+ * @since v15.0.0
+ */
+ sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ /**
+ * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
+ * The `subtle.unwrapKey()` method attempts to decrypt a wrapped key and create a `<CryptoKey>` instance.
+ * It is equivalent to calling `subtle.decrypt()` first on the encrypted key data (using the `wrappedKey`, `unwrapAlgo`, and `unwrappingKey` arguments as input)
+ * then passing the results in to the `subtle.importKey()` method using the `unwrappedKeyAlgo`, `extractable`, and `keyUsages` arguments as inputs.
+ * If successful, the returned promise is resolved with a `<CryptoKey>` object.
+ *
+ * The wrapping algorithms currently supported include:
+ *
+ * - `'RSA-OAEP'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * - `'AES-KW'`
+ *
+ * The unwrapped key algorithms supported include:
+ *
+ * - `'RSASSA-PKCS1-v1_5'`
+ * - `'RSA-PSS'`
+ * - `'RSA-OAEP'`
+ * - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
+ * - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
+ * - `'HMAC'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * - `'AES-KW'`
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
+ * @since v15.0.0
+ */
+ unwrapKey(
+ format: KeyFormat,
+ wrappedKey: BufferSource,
+ unwrappingKey: CryptoKey,
+ unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,
+ unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
+ extractable: boolean,
+ keyUsages: KeyUsage[]
+ ): Promise<CryptoKey>;
+ /**
+ * Using the method and parameters given in `algorithm` and the keying material provided by `key`,
+ * `subtle.verify()` attempts to verify that `signature` is a valid cryptographic signature of `data`.
+ * The returned promise is resolved with either `true` or `false`.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'RSASSA-PKCS1-v1_5'`
+ * - `'RSA-PSS'`
+ * - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
+ * - `'HMAC'`
+ * @since v15.0.0
+ */
+ verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>;
+ /**
+ * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
+ * The `subtle.wrapKey()` method exports the keying material into the format identified by `format`,
+ * then encrypts it using the method and parameters specified by `wrapAlgo` and the keying material provided by `wrappingKey`.
+ * It is the equivalent to calling `subtle.exportKey()` using `format` and `key` as the arguments,
+ * then passing the result to the `subtle.encrypt()` method using `wrappingKey` and `wrapAlgo` as inputs.
+ * If successful, the returned promise will be resolved with an `<ArrayBuffer>` containing the encrypted key data.
+ *
+ * The wrapping algorithms currently supported include:
+ *
+ * - `'RSA-OAEP'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * - `'AES-KW'`
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
+ * @since v15.0.0
+ */
+ wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): Promise<ArrayBuffer>;
+ }
+ }
+}
+declare module 'node:crypto' {
+ export * from 'crypto';
+}
diff --git a/node_modules/@types/node/ts4.8/dgram.d.ts b/node_modules/@types/node/ts4.8/dgram.d.ts
new file mode 100755
index 0000000..5b183b8
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/dgram.d.ts
@@ -0,0 +1,550 @@
+/**
+ * The `node:dgram` module provides an implementation of UDP datagram sockets.
+ *
+ * ```js
+ * import dgram from 'node:dgram';
+ *
+ * const server = dgram.createSocket('udp4');
+ *
+ * server.on('error', (err) => {
+ * console.error(`server error:\n${err.stack}`);
+ * server.close();
+ * });
+ *
+ * server.on('message', (msg, rinfo) => {
+ * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
+ * });
+ *
+ * server.on('listening', () => {
+ * const address = server.address();
+ * console.log(`server listening ${address.address}:${address.port}`);
+ * });
+ *
+ * server.bind(41234);
+ * // Prints: server listening 0.0.0.0:41234
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/dgram.js)
+ */
+declare module 'dgram' {
+ import { AddressInfo } from 'node:net';
+ import * as dns from 'node:dns';
+ import { EventEmitter, Abortable } from 'node:events';
+ interface RemoteInfo {
+ address: string;
+ family: 'IPv4' | 'IPv6';
+ port: number;
+ size: number;
+ }
+ interface BindOptions {
+ port?: number | undefined;
+ address?: string | undefined;
+ exclusive?: boolean | undefined;
+ fd?: number | undefined;
+ }
+ type SocketType = 'udp4' | 'udp6';
+ interface SocketOptions extends Abortable {
+ type: SocketType;
+ reuseAddr?: boolean | undefined;
+ /**
+ * @default false
+ */
+ ipv6Only?: boolean | undefined;
+ recvBufferSize?: number | undefined;
+ sendBufferSize?: number | undefined;
+ lookup?: ((hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void) | undefined;
+ }
+ /**
+ * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram
+ * messages. When `address` and `port` are not passed to `socket.bind()` the
+ * method will bind the socket to the "all interfaces" address on a random port
+ * (it does the right thing for both `udp4` and `udp6` sockets). The bound address
+ * and port can be retrieved using `socket.address().address` and `socket.address().port`.
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.close()` on the socket:
+ *
+ * ```js
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const server = dgram.createSocket({ type: 'udp4', signal });
+ * server.on('message', (msg, rinfo) => {
+ * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
+ * });
+ * // Later, when you want to close the server.
+ * controller.abort();
+ * ```
+ * @since v0.11.13
+ * @param options Available options are:
+ * @param callback Attached as a listener for `'message'` events. Optional.
+ */
+ function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
+ function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
+ /**
+ * Encapsulates the datagram functionality.
+ *
+ * New instances of `dgram.Socket` are created using {@link createSocket}.
+ * The `new` keyword is not to be used to create `dgram.Socket` instances.
+ * @since v0.1.99
+ */
+ class Socket extends EventEmitter {
+ /**
+ * Tells the kernel to join a multicast group at the given `multicastAddress` and`multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the`multicastInterface` argument is not
+ * specified, the operating system will choose
+ * one interface and will add membership to it. To add membership to every
+ * available interface, call `addMembership` multiple times, once per interface.
+ *
+ * When called on an unbound socket, this method will implicitly bind to a random
+ * port, listening on all interfaces.
+ *
+ * When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur:
+ *
+ * ```js
+ * import cluster from 'node:cluster';
+ * import dgram from 'node:dgram';
+ *
+ * if (cluster.isPrimary) {
+ * cluster.fork(); // Works ok.
+ * cluster.fork(); // Fails with EADDRINUSE.
+ * } else {
+ * const s = dgram.createSocket('udp4');
+ * s.bind(1234, () => {
+ * s.addMembership('224.0.0.114');
+ * });
+ * }
+ * ```
+ * @since v0.6.9
+ */
+ addMembership(multicastAddress: string, multicastInterface?: string): void;
+ /**
+ * Returns an object containing the address information for a socket.
+ * For UDP sockets, this object will contain `address`, `family`, and `port`properties.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.1.99
+ */
+ address(): AddressInfo;
+ /**
+ * For UDP sockets, causes the `dgram.Socket` to listen for datagram
+ * messages on a named `port` and optional `address`. If `port` is not
+ * specified or is `0`, the operating system will attempt to bind to a
+ * random port. If `address` is not specified, the operating system will
+ * attempt to listen on all addresses. Once binding is complete, a`'listening'` event is emitted and the optional `callback` function is
+ * called.
+ *
+ * Specifying both a `'listening'` event listener and passing a`callback` to the `socket.bind()` method is not harmful but not very
+ * useful.
+ *
+ * A bound datagram socket keeps the Node.js process running to receive
+ * datagram messages.
+ *
+ * If binding fails, an `'error'` event is generated. In rare case (e.g.
+ * attempting to bind with a closed socket), an `Error` may be thrown.
+ *
+ * Example of a UDP server listening on port 41234:
+ *
+ * ```js
+ * import dgram from 'node:dgram';
+ *
+ * const server = dgram.createSocket('udp4');
+ *
+ * server.on('error', (err) => {
+ * console.error(`server error:\n${err.stack}`);
+ * server.close();
+ * });
+ *
+ * server.on('message', (msg, rinfo) => {
+ * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
+ * });
+ *
+ * server.on('listening', () => {
+ * const address = server.address();
+ * console.log(`server listening ${address.address}:${address.port}`);
+ * });
+ *
+ * server.bind(41234);
+ * // Prints: server listening 0.0.0.0:41234
+ * ```
+ * @since v0.1.99
+ * @param callback with no parameters. Called when binding is complete.
+ */
+ bind(port?: number, address?: string, callback?: () => void): this;
+ bind(port?: number, callback?: () => void): this;
+ bind(callback?: () => void): this;
+ bind(options: BindOptions, callback?: () => void): this;
+ /**
+ * Close the underlying socket and stop listening for data on it. If a callback is
+ * provided, it is added as a listener for the `'close'` event.
+ * @since v0.1.99
+ * @param callback Called when the socket has been closed.
+ */
+ close(callback?: () => void): this;
+ /**
+ * Associates the `dgram.Socket` to a remote address and port. Every
+ * message sent by this handle is automatically sent to that destination. Also,
+ * the socket will only receive messages from that remote peer.
+ * Trying to call `connect()` on an already connected socket will result
+ * in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not
+ * provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets)
+ * will be used by default. Once the connection is complete, a `'connect'` event
+ * is emitted and the optional `callback` function is called. In case of failure,
+ * the `callback` is called or, failing this, an `'error'` event is emitted.
+ * @since v12.0.0
+ * @param callback Called when the connection is completed or on error.
+ */
+ connect(port: number, address?: string, callback?: () => void): void;
+ connect(port: number, callback: () => void): void;
+ /**
+ * A synchronous function that disassociates a connected `dgram.Socket` from
+ * its remote address. Trying to call `disconnect()` on an unbound or already
+ * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception.
+ * @since v12.0.0
+ */
+ disconnect(): void;
+ /**
+ * Instructs the kernel to leave a multicast group at `multicastAddress` using the`IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the
+ * kernel when the socket is closed or the process terminates, so most apps will
+ * never have reason to call this.
+ *
+ * If `multicastInterface` is not specified, the operating system will attempt to
+ * drop membership on all valid interfaces.
+ * @since v0.6.9
+ */
+ dropMembership(multicastAddress: string, multicastInterface?: string): void;
+ /**
+ * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+ * @since v8.7.0
+ * @return the `SO_RCVBUF` socket receive buffer size in bytes.
+ */
+ getRecvBufferSize(): number;
+ /**
+ * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+ * @since v8.7.0
+ * @return the `SO_SNDBUF` socket send buffer size in bytes.
+ */
+ getSendBufferSize(): number;
+ /**
+ * By default, binding a socket will cause it to block the Node.js process from
+ * exiting as long as the socket is open. The `socket.unref()` method can be used
+ * to exclude the socket from the reference counting that keeps the Node.js
+ * process active. The `socket.ref()` method adds the socket back to the reference
+ * counting and restores the default behavior.
+ *
+ * Calling `socket.ref()` multiples times will have no additional effect.
+ *
+ * The `socket.ref()` method returns a reference to the socket so calls can be
+ * chained.
+ * @since v0.9.1
+ */
+ ref(): this;
+ /**
+ * Returns an object containing the `address`, `family`, and `port` of the remote
+ * endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception
+ * if the socket is not connected.
+ * @since v12.0.0
+ */
+ remoteAddress(): AddressInfo;
+ /**
+ * Broadcasts a datagram on the socket.
+ * For connectionless sockets, the destination `port` and `address` must be
+ * specified. Connected sockets, on the other hand, will use their associated
+ * remote endpoint, so the `port` and `address` arguments must not be set.
+ *
+ * The `msg` argument contains the message to be sent.
+ * Depending on its type, different behavior can apply. If `msg` is a `Buffer`,
+ * any `TypedArray` or a `DataView`,
+ * the `offset` and `length` specify the offset within the `Buffer` where the
+ * message begins and the number of bytes in the message, respectively.
+ * If `msg` is a `String`, then it is automatically converted to a `Buffer`with `'utf8'` encoding. With messages that
+ * contain multi-byte characters, `offset` and `length` will be calculated with
+ * respect to `byte length` and not the character position.
+ * If `msg` is an array, `offset` and `length` must not be specified.
+ *
+ * The `address` argument is a string. If the value of `address` is a host name,
+ * DNS will be used to resolve the address of the host. If `address` is not
+ * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'`(for `udp6` sockets) will be used by default.
+ *
+ * If the socket has not been previously bound with a call to `bind`, the socket
+ * is assigned a random port number and is bound to the "all interfaces" address
+ * (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.)
+ *
+ * An optional `callback` function may be specified to as a way of reporting
+ * DNS errors or for determining when it is safe to reuse the `buf` object.
+ * DNS lookups delay the time to send for at least one tick of the
+ * Node.js event loop.
+ *
+ * The only way to know for sure that the datagram has been sent is by using a`callback`. If an error occurs and a `callback` is given, the error will be
+ * passed as the first argument to the `callback`. If a `callback` is not given,
+ * the error is emitted as an `'error'` event on the `socket` object.
+ *
+ * Offset and length are optional but both _must_ be set if either are used.
+ * They are supported only when the first argument is a `Buffer`, a `TypedArray`,
+ * or a `DataView`.
+ *
+ * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket.
+ *
+ * Example of sending a UDP packet to a port on `localhost`;
+ *
+ * ```js
+ * import dgram from 'node:dgram';
+ * import { Buffer } from 'node:buffer';
+ *
+ * const message = Buffer.from('Some bytes');
+ * const client = dgram.createSocket('udp4');
+ * client.send(message, 41234, 'localhost', (err) => {
+ * client.close();
+ * });
+ * ```
+ *
+ * Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`;
+ *
+ * ```js
+ * import dgram from 'node:dgram';
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from('Some ');
+ * const buf2 = Buffer.from('bytes');
+ * const client = dgram.createSocket('udp4');
+ * client.send([buf1, buf2], 41234, (err) => {
+ * client.close();
+ * });
+ * ```
+ *
+ * Sending multiple buffers might be faster or slower depending on the
+ * application and operating system. Run benchmarks to
+ * determine the optimal strategy on a case-by-case basis. Generally speaking,
+ * however, sending multiple buffers is faster.
+ *
+ * Example of sending a UDP packet using a socket connected to a port on`localhost`:
+ *
+ * ```js
+ * import dgram from 'node:dgram';
+ * import { Buffer } from 'node:buffer';
+ *
+ * const message = Buffer.from('Some bytes');
+ * const client = dgram.createSocket('udp4');
+ * client.connect(41234, 'localhost', (err) => {
+ * client.send(message, (err) => {
+ * client.close();
+ * });
+ * });
+ * ```
+ * @since v0.1.99
+ * @param msg Message to be sent.
+ * @param offset Offset in the buffer where the message starts.
+ * @param length Number of bytes in the message.
+ * @param port Destination port.
+ * @param address Destination host name or IP address.
+ * @param callback Called when the message has been sent.
+ */
+ send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array | ReadonlyArray<any>, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void;
+ /**
+ * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP
+ * packets may be sent to a local interface's broadcast address.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.6.9
+ */
+ setBroadcast(flag: boolean): void;
+ /**
+ * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC
+ * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_
+ * _with a scope index is written as `'IP%scope'` where scope is an interface name_
+ * _or interface number._
+ *
+ * Sets the default outgoing multicast interface of the socket to a chosen
+ * interface or back to system interface selection. The `multicastInterface` must
+ * be a valid string representation of an IP from the socket's family.
+ *
+ * For IPv4 sockets, this should be the IP configured for the desired physical
+ * interface. All packets sent to multicast on the socket will be sent on the
+ * interface determined by the most recent successful use of this call.
+ *
+ * For IPv6 sockets, `multicastInterface` should include a scope to indicate the
+ * interface as in the examples that follow. In IPv6, individual `send` calls can
+ * also use explicit scope in addresses, so only packets sent to a multicast
+ * address without specifying an explicit scope are affected by the most recent
+ * successful use of this call.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ *
+ * #### Example: IPv6 outgoing multicast interface
+ *
+ * On most systems, where scope format uses the interface name:
+ *
+ * ```js
+ * const socket = dgram.createSocket('udp6');
+ *
+ * socket.bind(1234, () => {
+ * socket.setMulticastInterface('::%eth1');
+ * });
+ * ```
+ *
+ * On Windows, where scope format uses an interface number:
+ *
+ * ```js
+ * const socket = dgram.createSocket('udp6');
+ *
+ * socket.bind(1234, () => {
+ * socket.setMulticastInterface('::%2');
+ * });
+ * ```
+ *
+ * #### Example: IPv4 outgoing multicast interface
+ *
+ * All systems use an IP of the host on the desired physical interface:
+ *
+ * ```js
+ * const socket = dgram.createSocket('udp4');
+ *
+ * socket.bind(1234, () => {
+ * socket.setMulticastInterface('10.0.0.2');
+ * });
+ * ```
+ * @since v8.6.0
+ */
+ setMulticastInterface(multicastInterface: string): void;
+ /**
+ * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`,
+ * multicast packets will also be received on the local interface.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.3.8
+ */
+ setMulticastLoopback(flag: boolean): boolean;
+ /**
+ * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for
+ * "Time to Live", in this context it specifies the number of IP hops that a
+ * packet is allowed to travel through, specifically for multicast traffic. Each
+ * router or gateway that forwards a packet decrements the TTL. If the TTL is
+ * decremented to 0 by a router, it will not be forwarded.
+ *
+ * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.3.8
+ */
+ setMulticastTTL(ttl: number): number;
+ /**
+ * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer
+ * in bytes.
+ *
+ * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+ * @since v8.7.0
+ */
+ setRecvBufferSize(size: number): void;
+ /**
+ * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer
+ * in bytes.
+ *
+ * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+ * @since v8.7.0
+ */
+ setSendBufferSize(size: number): void;
+ /**
+ * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live",
+ * in this context it specifies the number of IP hops that a packet is allowed to
+ * travel through. Each router or gateway that forwards a packet decrements the
+ * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded.
+ * Changing TTL values is typically done for network probes or when multicasting.
+ *
+ * The `ttl` argument may be between 1 and 255\. The default on most systems
+ * is 64.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.1.101
+ */
+ setTTL(ttl: number): number;
+ /**
+ * By default, binding a socket will cause it to block the Node.js process from
+ * exiting as long as the socket is open. The `socket.unref()` method can be used
+ * to exclude the socket from the reference counting that keeps the Node.js
+ * process active, allowing the process to exit even if the socket is still
+ * listening.
+ *
+ * Calling `socket.unref()` multiple times will have no addition effect.
+ *
+ * The `socket.unref()` method returns a reference to the socket so calls can be
+ * chained.
+ * @since v0.9.1
+ */
+ unref(): this;
+ /**
+ * Tells the kernel to join a source-specific multicast channel at the given`sourceAddress` and `groupAddress`, using the `multicastInterface` with the`IP_ADD_SOURCE_MEMBERSHIP` socket
+ * option. If the `multicastInterface` argument
+ * is not specified, the operating system will choose one interface and will add
+ * membership to it. To add membership to every available interface, call`socket.addSourceSpecificMembership()` multiple times, once per interface.
+ *
+ * When called on an unbound socket, this method will implicitly bind to a random
+ * port, listening on all interfaces.
+ * @since v13.1.0, v12.16.0
+ */
+ addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
+ /**
+ * Instructs the kernel to leave a source-specific multicast channel at the given`sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP`socket option. This method is
+ * automatically called by the kernel when the
+ * socket is closed or the process terminates, so most apps will never have
+ * reason to call this.
+ *
+ * If `multicastInterface` is not specified, the operating system will attempt to
+ * drop membership on all valid interfaces.
+ * @since v13.1.0, v12.16.0
+ */
+ dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. connect
+ * 3. error
+ * 4. listening
+ * 5. message
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'connect', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'listening', listener: () => void): this;
+ addListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'connect'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'listening'): boolean;
+ emit(event: 'message', msg: Buffer, rinfo: RemoteInfo): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'connect', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'listening', listener: () => void): this;
+ on(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'connect', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'listening', listener: () => void): this;
+ once(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'connect', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'listening', listener: () => void): this;
+ prependListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'connect', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'listening', listener: () => void): this;
+ prependOnceListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ /**
+ * Calls `socket.close()` and returns a promise that fulfills when the socket has closed.
+ * @since v20.5.0
+ */
+ [Symbol.asyncDispose](): Promise<void>;
+ }
+}
+declare module 'node:dgram' {
+ export * from 'dgram';
+}
diff --git a/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts b/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts
new file mode 100755
index 0000000..5f19b20
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts
@@ -0,0 +1,191 @@
+/**
+ * The `node:diagnostics_channel` module provides an API to create named channels
+ * to report arbitrary message data for diagnostics purposes.
+ *
+ * It can be accessed using:
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ * ```
+ *
+ * It is intended that a module writer wanting to report diagnostics messages
+ * will create one or many top-level channels to report messages through.
+ * Channels may also be acquired at runtime but it is not encouraged
+ * due to the additional overhead of doing so. Channels may be exported for
+ * convenience, but as long as the name is known it can be acquired anywhere.
+ *
+ * If you intend for your module to produce diagnostics data for others to
+ * consume it is recommended that you include documentation of what named
+ * channels are used along with the shape of the message data. Channel names
+ * should generally include the module name to avoid collisions with data from
+ * other modules.
+ * @since v15.1.0, v14.17.0
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/diagnostics_channel.js)
+ */
+declare module 'diagnostics_channel' {
+ /**
+ * Check if there are active subscribers to the named channel. This is helpful if
+ * the message you want to send might be expensive to prepare.
+ *
+ * This API is optional but helpful when trying to publish messages from very
+ * performance-sensitive code.
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ *
+ * if (diagnostics_channel.hasSubscribers('my-channel')) {
+ * // There are subscribers, prepare and publish message
+ * }
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @param name The channel name
+ * @return If there are active subscribers
+ */
+ function hasSubscribers(name: string | symbol): boolean;
+ /**
+ * This is the primary entry-point for anyone wanting to publish to a named
+ * channel. It produces a channel object which is optimized to reduce overhead at
+ * publish time as much as possible.
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @param name The channel name
+ * @return The named channel object
+ */
+ function channel(name: string | symbol): Channel;
+ type ChannelListener = (message: unknown, name: string | symbol) => void;
+ /**
+ * Register a message handler to subscribe to this channel. This message handler
+ * will be run synchronously whenever a message is published to the channel. Any
+ * errors thrown in the message handler will trigger an `'uncaughtException'`.
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ *
+ * diagnostics_channel.subscribe('my-channel', (message, name) => {
+ * // Received data
+ * });
+ * ```
+ * @since v18.7.0, v16.17.0
+ * @param name The channel name
+ * @param onMessage The handler to receive channel messages
+ */
+ function subscribe(name: string | symbol, onMessage: ChannelListener): void;
+ /**
+ * Remove a message handler previously registered to this channel with {@link subscribe}.
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ *
+ * function onMessage(message, name) {
+ * // Received data
+ * }
+ *
+ * diagnostics_channel.subscribe('my-channel', onMessage);
+ *
+ * diagnostics_channel.unsubscribe('my-channel', onMessage);
+ * ```
+ * @since v18.7.0, v16.17.0
+ * @param name The channel name
+ * @param onMessage The previous subscribed handler to remove
+ * @return `true` if the handler was found, `false` otherwise.
+ */
+ function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean;
+ /**
+ * The class `Channel` represents an individual named channel within the data
+ * pipeline. It is used to track subscribers and to publish messages when there
+ * are subscribers present. It exists as a separate object to avoid channel
+ * lookups at publish time, enabling very fast publish speeds and allowing
+ * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly
+ * with `new Channel(name)` is not supported.
+ * @since v15.1.0, v14.17.0
+ */
+ class Channel {
+ readonly name: string | symbol;
+ /**
+ * Check if there are active subscribers to this channel. This is helpful if
+ * the message you want to send might be expensive to prepare.
+ *
+ * This API is optional but helpful when trying to publish messages from very
+ * performance-sensitive code.
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ *
+ * if (channel.hasSubscribers) {
+ * // There are subscribers, prepare and publish message
+ * }
+ * ```
+ * @since v15.1.0, v14.17.0
+ */
+ readonly hasSubscribers: boolean;
+ private constructor(name: string | symbol);
+ /**
+ * Publish a message to any subscribers to the channel. This will trigger
+ * message handlers synchronously so they will execute within the same context.
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ *
+ * channel.publish({
+ * some: 'message',
+ * });
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @param message The message to send to the channel subscribers
+ */
+ publish(message: unknown): void;
+ /**
+ * Register a message handler to subscribe to this channel. This message handler
+ * will be run synchronously whenever a message is published to the channel. Any
+ * errors thrown in the message handler will trigger an `'uncaughtException'`.
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ *
+ * channel.subscribe((message, name) => {
+ * // Received data
+ * });
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @deprecated Since v18.7.0,v16.17.0 - Use {@link subscribe(name, onMessage)}
+ * @param onMessage The handler to receive channel messages
+ */
+ subscribe(onMessage: ChannelListener): void;
+ /**
+ * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`.
+ *
+ * ```js
+ * import diagnostics_channel from 'node:diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ *
+ * function onMessage(message, name) {
+ * // Received data
+ * }
+ *
+ * channel.subscribe(onMessage);
+ *
+ * channel.unsubscribe(onMessage);
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @deprecated Since v18.7.0,v16.17.0 - Use {@link unsubscribe(name, onMessage)}
+ * @param onMessage The previous subscribed handler to remove
+ * @return `true` if the handler was found, `false` otherwise.
+ */
+ unsubscribe(onMessage: ChannelListener): void;
+ }
+}
+declare module 'node:diagnostics_channel' {
+ export * from 'diagnostics_channel';
+}
diff --git a/node_modules/@types/node/ts4.8/dns.d.ts b/node_modules/@types/node/ts4.8/dns.d.ts
new file mode 100755
index 0000000..db3febc
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/dns.d.ts
@@ -0,0 +1,668 @@
+/**
+ * The `node:dns` module enables name resolution. For example, use it to look up IP
+ * addresses of host names.
+ *
+ * Although named for the [Domain Name System (DNS)](https://en.wikipedia.org/wiki/Domain_Name_System), it does not always use the
+ * DNS protocol for lookups. {@link lookup} uses the operating system
+ * facilities to perform name resolution. It may not need to perform any network
+ * communication. To perform name resolution the way other applications on the same
+ * system do, use {@link lookup}.
+ *
+ * ```js
+ * const dns = require('node:dns');
+ *
+ * dns.lookup('example.org', (err, address, family) => {
+ * console.log('address: %j family: IPv%s', address, family);
+ * });
+ * // address: "93.184.216.34" family: IPv4
+ * ```
+ *
+ * All other functions in the `node:dns` module connect to an actual DNS server to
+ * perform name resolution. They will always use the network to perform DNS
+ * queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform
+ * DNS queries, bypassing other name-resolution facilities.
+ *
+ * ```js
+ * const dns = require('node:dns');
+ *
+ * dns.resolve4('archive.org', (err, addresses) => {
+ * if (err) throw err;
+ *
+ * console.log(`addresses: ${JSON.stringify(addresses)}`);
+ *
+ * addresses.forEach((a) => {
+ * dns.reverse(a, (err, hostnames) => {
+ * if (err) {
+ * throw err;
+ * }
+ * console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`);
+ * });
+ * });
+ * });
+ * ```
+ *
+ * See the `Implementation considerations section` for more information.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/dns.js)
+ */
+declare module 'dns' {
+ import * as dnsPromises from 'node:dns/promises';
+ // Supported getaddrinfo flags.
+ export const ADDRCONFIG: number;
+ export const V4MAPPED: number;
+ /**
+ * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
+ * well as IPv4 mapped IPv6 addresses.
+ */
+ export const ALL: number;
+ export interface LookupOptions {
+ family?: number | undefined;
+ hints?: number | undefined;
+ all?: boolean | undefined;
+ /**
+ * @default true
+ */
+ verbatim?: boolean | undefined;
+ }
+ export interface LookupOneOptions extends LookupOptions {
+ all?: false | undefined;
+ }
+ export interface LookupAllOptions extends LookupOptions {
+ all: true;
+ }
+ export interface LookupAddress {
+ address: string;
+ family: number;
+ }
+ /**
+ * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
+ * AAAA (IPv6) record. All `option` properties are optional. If `options` is an
+ * integer, then it must be `4` or `6` – if `options` is `0` or not provided, then
+ * IPv4 and IPv6 addresses are both returned if found.
+ *
+ * With the `all` option set to `true`, the arguments for `callback` change to`(err, addresses)`, with `addresses` being an array of objects with the
+ * properties `address` and `family`.
+ *
+ * On error, `err` is an `Error` object, where `err.code` is the error code.
+ * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
+ * the host name does not exist but also when the lookup fails in other ways
+ * such as no available file descriptors.
+ *
+ * `dns.lookup()` does not necessarily have anything to do with the DNS protocol.
+ * The implementation uses an operating system facility that can associate names
+ * with addresses and vice versa. This implementation can have subtle but
+ * important consequences on the behavior of any Node.js program. Please take some
+ * time to consult the `Implementation considerations section` before using`dns.lookup()`.
+ *
+ * Example usage:
+ *
+ * ```js
+ * const dns = require('node:dns');
+ * const options = {
+ * family: 6,
+ * hints: dns.ADDRCONFIG | dns.V4MAPPED,
+ * };
+ * dns.lookup('example.com', options, (err, address, family) =>
+ * console.log('address: %j family: IPv%s', address, family));
+ * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
+ *
+ * // When options.all is true, the result will be an Array.
+ * options.all = true;
+ * dns.lookup('example.com', options, (err, addresses) =>
+ * console.log('addresses: %j', addresses));
+ * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
+ * ```
+ *
+ * If this method is invoked as its `util.promisify()` ed version, and `all`is not set to `true`, it returns a `Promise` for an `Object` with `address` and`family` properties.
+ * @since v0.1.90
+ */
+ export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+ export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+ export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void;
+ export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void;
+ export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+ export namespace lookup {
+ function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
+ function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
+ function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
+ }
+ /**
+ * Resolves the given `address` and `port` into a host name and service using
+ * the operating system's underlying `getnameinfo` implementation.
+ *
+ * If `address` is not a valid IP address, a `TypeError` will be thrown.
+ * The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown.
+ *
+ * On an error, `err` is an `Error` object, where `err.code` is the error code.
+ *
+ * ```js
+ * const dns = require('node:dns');
+ * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {
+ * console.log(hostname, service);
+ * // Prints: localhost ssh
+ * });
+ * ```
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns a`Promise` for an `Object` with `hostname` and `service` properties.
+ * @since v0.11.14
+ */
+ export function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
+ export namespace lookupService {
+ function __promisify__(
+ address: string,
+ port: number
+ ): Promise<{
+ hostname: string;
+ service: string;
+ }>;
+ }
+ export interface ResolveOptions {
+ ttl: boolean;
+ }
+ export interface ResolveWithTtlOptions extends ResolveOptions {
+ ttl: true;
+ }
+ export interface RecordWithTtl {
+ address: string;
+ ttl: number;
+ }
+ /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
+ export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
+ export interface AnyARecord extends RecordWithTtl {
+ type: 'A';
+ }
+ export interface AnyAaaaRecord extends RecordWithTtl {
+ type: 'AAAA';
+ }
+ export interface CaaRecord {
+ critical: number;
+ issue?: string | undefined;
+ issuewild?: string | undefined;
+ iodef?: string | undefined;
+ contactemail?: string | undefined;
+ contactphone?: string | undefined;
+ }
+ export interface MxRecord {
+ priority: number;
+ exchange: string;
+ }
+ export interface AnyMxRecord extends MxRecord {
+ type: 'MX';
+ }
+ export interface NaptrRecord {
+ flags: string;
+ service: string;
+ regexp: string;
+ replacement: string;
+ order: number;
+ preference: number;
+ }
+ export interface AnyNaptrRecord extends NaptrRecord {
+ type: 'NAPTR';
+ }
+ export interface SoaRecord {
+ nsname: string;
+ hostmaster: string;
+ serial: number;
+ refresh: number;
+ retry: number;
+ expire: number;
+ minttl: number;
+ }
+ export interface AnySoaRecord extends SoaRecord {
+ type: 'SOA';
+ }
+ export interface SrvRecord {
+ priority: number;
+ weight: number;
+ port: number;
+ name: string;
+ }
+ export interface AnySrvRecord extends SrvRecord {
+ type: 'SRV';
+ }
+ export interface AnyTxtRecord {
+ type: 'TXT';
+ entries: string[];
+ }
+ export interface AnyNsRecord {
+ type: 'NS';
+ value: string;
+ }
+ export interface AnyPtrRecord {
+ type: 'PTR';
+ value: string;
+ }
+ export interface AnyCnameRecord {
+ type: 'CNAME';
+ value: string;
+ }
+ export type AnyRecord = AnyARecord | AnyAaaaRecord | AnyCnameRecord | AnyMxRecord | AnyNaptrRecord | AnyNsRecord | AnyPtrRecord | AnySoaRecord | AnySrvRecord | AnyTxtRecord;
+ /**
+ * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
+ * of the resource records. The `callback` function has arguments`(err, records)`. When successful, `records` will be an array of resource
+ * records. The type and structure of individual results varies based on `rrtype`:
+ *
+ * <omitted>
+ *
+ * On error, `err` is an `Error` object, where `err.code` is one of the `DNS error codes`.
+ * @since v0.1.27
+ * @param hostname Host name to resolve.
+ * @param [rrtype='A'] Resource record type.
+ */
+ export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'A', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'AAAA', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'ANY', callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'CNAME', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'MX', callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'NAPTR', callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'NS', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'PTR', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'SOA', callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
+ export function resolve(hostname: string, rrtype: 'SRV', callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'TXT', callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
+ export function resolve(
+ hostname: string,
+ rrtype: string,
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void
+ ): void;
+ export namespace resolve {
+ function __promisify__(hostname: string, rrtype?: 'A' | 'AAAA' | 'CNAME' | 'NS' | 'PTR'): Promise<string[]>;
+ function __promisify__(hostname: string, rrtype: 'ANY'): Promise<AnyRecord[]>;
+ function __promisify__(hostname: string, rrtype: 'MX'): Promise<MxRecord[]>;
+ function __promisify__(hostname: string, rrtype: 'NAPTR'): Promise<NaptrRecord[]>;
+ function __promisify__(hostname: string, rrtype: 'SOA'): Promise<SoaRecord>;
+ function __promisify__(hostname: string, rrtype: 'SRV'): Promise<SrvRecord[]>;
+ function __promisify__(hostname: string, rrtype: 'TXT'): Promise<string[][]>;
+ function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the`hostname`. The `addresses` argument passed to the `callback` function
+ * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
+ * @since v0.1.16
+ * @param hostname Host name to resolve.
+ */
+ export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
+ export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
+ export namespace resolve4 {
+ function __promisify__(hostname: string): Promise<string[]>;
+ function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the`hostname`. The `addresses` argument passed to the `callback` function
+ * will contain an array of IPv6 addresses.
+ * @since v0.1.16
+ * @param hostname Host name to resolve.
+ */
+ export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
+ export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
+ export namespace resolve6 {
+ function __promisify__(hostname: string): Promise<string[]>;
+ function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The`addresses` argument passed to the `callback` function
+ * will contain an array of canonical name records available for the `hostname`(e.g. `['bar.example.com']`).
+ * @since v0.3.2
+ */
+ export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export namespace resolveCname {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The`addresses` argument passed to the `callback` function
+ * will contain an array of certification authority authorization records
+ * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
+ * @since v15.0.0, v14.17.0
+ */
+ export function resolveCaa(hostname: string, callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void): void;
+ export namespace resolveCaa {
+ function __promisify__(hostname: string): Promise<CaaRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
+ * contain an array of objects containing both a `priority` and `exchange`property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
+ * @since v0.1.27
+ */
+ export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
+ export namespace resolveMx {
+ function __promisify__(hostname: string): Promise<MxRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve regular expression-based records (`NAPTR`records) for the `hostname`. The `addresses` argument passed to the `callback`function will contain an array of
+ * objects with the following properties:
+ *
+ * * `flags`
+ * * `service`
+ * * `regexp`
+ * * `replacement`
+ * * `order`
+ * * `preference`
+ *
+ * ```js
+ * {
+ * flags: 's',
+ * service: 'SIP+D2U',
+ * regexp: '',
+ * replacement: '_sip._udp.example.com',
+ * order: 30,
+ * preference: 100
+ * }
+ * ```
+ * @since v0.9.12
+ */
+ export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
+ export namespace resolveNaptr {
+ function __promisify__(hostname: string): Promise<NaptrRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
+ * contain an array of name server records available for `hostname`(e.g. `['ns1.example.com', 'ns2.example.com']`).
+ * @since v0.1.90
+ */
+ export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export namespace resolveNs {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
+ * be an array of strings containing the reply records.
+ * @since v6.0.0
+ */
+ export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export namespace resolvePtr {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
+ * the `hostname`. The `address` argument passed to the `callback` function will
+ * be an object with the following properties:
+ *
+ * * `nsname`
+ * * `hostmaster`
+ * * `serial`
+ * * `refresh`
+ * * `retry`
+ * * `expire`
+ * * `minttl`
+ *
+ * ```js
+ * {
+ * nsname: 'ns.example.com',
+ * hostmaster: 'root.example.com',
+ * serial: 2013101809,
+ * refresh: 10000,
+ * retry: 2400,
+ * expire: 604800,
+ * minttl: 3600
+ * }
+ * ```
+ * @since v0.11.10
+ */
+ export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
+ export namespace resolveSoa {
+ function __promisify__(hostname: string): Promise<SoaRecord>;
+ }
+ /**
+ * Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
+ * be an array of objects with the following properties:
+ *
+ * * `priority`
+ * * `weight`
+ * * `port`
+ * * `name`
+ *
+ * ```js
+ * {
+ * priority: 10,
+ * weight: 5,
+ * port: 21223,
+ * name: 'service.example.com'
+ * }
+ * ```
+ * @since v0.1.27
+ */
+ export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
+ export namespace resolveSrv {
+ function __promisify__(hostname: string): Promise<SrvRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. The `records` argument passed to the `callback` function is a
+ * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
+ * one record. Depending on the use case, these could be either joined together or
+ * treated separately.
+ * @since v0.1.27
+ */
+ export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
+ export namespace resolveTxt {
+ function __promisify__(hostname: string): Promise<string[][]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
+ * The `ret` argument passed to the `callback` function will be an array containing
+ * various types of records. Each object has a property `type` that indicates the
+ * type of the current record. And depending on the `type`, additional properties
+ * will be present on the object:
+ *
+ * <omitted>
+ *
+ * Here is an example of the `ret` object passed to the callback:
+ *
+ * ```js
+ * [ { type: 'A', address: '127.0.0.1', ttl: 299 },
+ * { type: 'CNAME', value: 'example.com' },
+ * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
+ * { type: 'NS', value: 'ns1.example.com' },
+ * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
+ * { type: 'SOA',
+ * nsname: 'ns1.example.com',
+ * hostmaster: 'admin.example.com',
+ * serial: 156696742,
+ * refresh: 900,
+ * retry: 900,
+ * expire: 1800,
+ * minttl: 60 } ]
+ * ```
+ *
+ * DNS server operators may choose not to respond to `ANY`queries. It may be better to call individual methods like {@link resolve4},{@link resolveMx}, and so on. For more details, see [RFC
+ * 8482](https://tools.ietf.org/html/rfc8482).
+ */
+ export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
+ export namespace resolveAny {
+ function __promisify__(hostname: string): Promise<AnyRecord[]>;
+ }
+ /**
+ * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
+ * array of host names.
+ *
+ * On error, `err` is an `Error` object, where `err.code` is
+ * one of the `DNS error codes`.
+ * @since v0.1.16
+ */
+ export function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void;
+ /**
+ * Get the default value for `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be:
+ *
+ * * `ipv4first`: for `verbatim` defaulting to `false`.
+ * * `verbatim`: for `verbatim` defaulting to `true`.
+ * @since v20.1.0
+ */
+ export function getDefaultResultOrder(): 'ipv4first' | 'verbatim';
+ /**
+ * Sets the IP address and port of servers to be used when performing DNS
+ * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
+ * addresses. If the port is the IANA default DNS port (53) it can be omitted.
+ *
+ * ```js
+ * dns.setServers([
+ * '4.4.4.4',
+ * '[2001:4860:4860::8888]',
+ * '4.4.4.4:1053',
+ * '[2001:4860:4860::8888]:1053',
+ * ]);
+ * ```
+ *
+ * An error will be thrown if an invalid address is provided.
+ *
+ * The `dns.setServers()` method must not be called while a DNS query is in
+ * progress.
+ *
+ * The {@link setServers} method affects only {@link resolve},`dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}).
+ *
+ * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
+ * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
+ * subsequent servers provided. Fallback DNS servers will only be used if the
+ * earlier ones time out or result in some other error.
+ * @since v0.11.3
+ * @param servers array of `RFC 5952` formatted addresses
+ */
+ export function setServers(servers: ReadonlyArray<string>): void;
+ /**
+ * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
+ * that are currently configured for DNS resolution. A string will include a port
+ * section if a custom port is used.
+ *
+ * ```js
+ * [
+ * '4.4.4.4',
+ * '2001:4860:4860::8888',
+ * '4.4.4.4:1053',
+ * '[2001:4860:4860::8888]:1053',
+ * ]
+ * ```
+ * @since v0.11.3
+ */
+ export function getServers(): string[];
+ /**
+ * Set the default value of `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be:
+ *
+ * * `ipv4first`: sets default `verbatim` `false`.
+ * * `verbatim`: sets default `verbatim` `true`.
+ *
+ * The default is `verbatim` and {@link setDefaultResultOrder} have higher
+ * priority than `--dns-result-order`. When using `worker threads`,{@link setDefaultResultOrder} from the main thread won't affect the default
+ * dns orders in workers.
+ * @since v16.4.0, v14.18.0
+ * @param order must be `'ipv4first'` or `'verbatim'`.
+ */
+ export function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
+ // Error codes
+ export const NODATA: string;
+ export const FORMERR: string;
+ export const SERVFAIL: string;
+ export const NOTFOUND: string;
+ export const NOTIMP: string;
+ export const REFUSED: string;
+ export const BADQUERY: string;
+ export const BADNAME: string;
+ export const BADFAMILY: string;
+ export const BADRESP: string;
+ export const CONNREFUSED: string;
+ export const TIMEOUT: string;
+ export const EOF: string;
+ export const FILE: string;
+ export const NOMEM: string;
+ export const DESTRUCTION: string;
+ export const BADSTR: string;
+ export const BADFLAGS: string;
+ export const NONAME: string;
+ export const BADHINTS: string;
+ export const NOTINITIALIZED: string;
+ export const LOADIPHLPAPI: string;
+ export const ADDRGETNETWORKPARAMS: string;
+ export const CANCELLED: string;
+ export interface ResolverOptions {
+ timeout?: number | undefined;
+ /**
+ * @default 4
+ */
+ tries?: number;
+ }
+ /**
+ * An independent resolver for DNS requests.
+ *
+ * Creating a new resolver uses the default server settings. Setting
+ * the servers used for a resolver using `resolver.setServers()` does not affect
+ * other resolvers:
+ *
+ * ```js
+ * const { Resolver } = require('node:dns');
+ * const resolver = new Resolver();
+ * resolver.setServers(['4.4.4.4']);
+ *
+ * // This request will use the server at 4.4.4.4, independent of global settings.
+ * resolver.resolve4('example.org', (err, addresses) => {
+ * // ...
+ * });
+ * ```
+ *
+ * The following methods from the `node:dns` module are available:
+ *
+ * * `resolver.getServers()`
+ * * `resolver.resolve()`
+ * * `resolver.resolve4()`
+ * * `resolver.resolve6()`
+ * * `resolver.resolveAny()`
+ * * `resolver.resolveCaa()`
+ * * `resolver.resolveCname()`
+ * * `resolver.resolveMx()`
+ * * `resolver.resolveNaptr()`
+ * * `resolver.resolveNs()`
+ * * `resolver.resolvePtr()`
+ * * `resolver.resolveSoa()`
+ * * `resolver.resolveSrv()`
+ * * `resolver.resolveTxt()`
+ * * `resolver.reverse()`
+ * * `resolver.setServers()`
+ * @since v8.3.0
+ */
+ export class Resolver {
+ constructor(options?: ResolverOptions);
+ /**
+ * Cancel all outstanding DNS queries made by this resolver. The corresponding
+ * callbacks will be called with an error with code `ECANCELLED`.
+ * @since v8.3.0
+ */
+ cancel(): void;
+ getServers: typeof getServers;
+ resolve: typeof resolve;
+ resolve4: typeof resolve4;
+ resolve6: typeof resolve6;
+ resolveAny: typeof resolveAny;
+ resolveCaa: typeof resolveCaa;
+ resolveCname: typeof resolveCname;
+ resolveMx: typeof resolveMx;
+ resolveNaptr: typeof resolveNaptr;
+ resolveNs: typeof resolveNs;
+ resolvePtr: typeof resolvePtr;
+ resolveSoa: typeof resolveSoa;
+ resolveSrv: typeof resolveSrv;
+ resolveTxt: typeof resolveTxt;
+ reverse: typeof reverse;
+ /**
+ * The resolver instance will send its requests from the specified IP address.
+ * This allows programs to specify outbound interfaces when used on multi-homed
+ * systems.
+ *
+ * If a v4 or v6 address is not specified, it is set to the default and the
+ * operating system will choose a local address automatically.
+ *
+ * The resolver will use the v4 local address when making requests to IPv4 DNS
+ * servers, and the v6 local address when making requests to IPv6 DNS servers.
+ * The `rrtype` of resolution requests has no impact on the local address used.
+ * @since v15.1.0, v14.17.0
+ * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
+ * @param [ipv6='::0'] A string representation of an IPv6 address.
+ */
+ setLocalAddress(ipv4?: string, ipv6?: string): void;
+ setServers: typeof setServers;
+ }
+ export { dnsPromises as promises };
+}
+declare module 'node:dns' {
+ export * from 'dns';
+}
diff --git a/node_modules/@types/node/ts4.8/dns/promises.d.ts b/node_modules/@types/node/ts4.8/dns/promises.d.ts
new file mode 100755
index 0000000..4c151e4
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/dns/promises.d.ts
@@ -0,0 +1,414 @@
+/**
+ * The `dns.promises` API provides an alternative set of asynchronous DNS methods
+ * that return `Promise` objects rather than using callbacks. The API is accessible
+ * via `require('node:dns').promises` or `require('node:dns/promises')`.
+ * @since v10.6.0
+ */
+declare module 'dns/promises' {
+ import {
+ LookupAddress,
+ LookupOneOptions,
+ LookupAllOptions,
+ LookupOptions,
+ AnyRecord,
+ CaaRecord,
+ MxRecord,
+ NaptrRecord,
+ SoaRecord,
+ SrvRecord,
+ ResolveWithTtlOptions,
+ RecordWithTtl,
+ ResolveOptions,
+ ResolverOptions,
+ } from 'node:dns';
+ /**
+ * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
+ * that are currently configured for DNS resolution. A string will include a port
+ * section if a custom port is used.
+ *
+ * ```js
+ * [
+ * '4.4.4.4',
+ * '2001:4860:4860::8888',
+ * '4.4.4.4:1053',
+ * '[2001:4860:4860::8888]:1053',
+ * ]
+ * ```
+ * @since v10.6.0
+ */
+ function getServers(): string[];
+ /**
+ * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
+ * AAAA (IPv6) record. All `option` properties are optional. If `options` is an
+ * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4
+ * and IPv6 addresses are both returned if found.
+ *
+ * With the `all` option set to `true`, the `Promise` is resolved with `addresses`being an array of objects with the properties `address` and `family`.
+ *
+ * On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code.
+ * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
+ * the host name does not exist but also when the lookup fails in other ways
+ * such as no available file descriptors.
+ *
+ * `dnsPromises.lookup()` does not necessarily have anything to do with the DNS
+ * protocol. The implementation uses an operating system facility that can
+ * associate names with addresses and vice versa. This implementation can have
+ * subtle but important consequences on the behavior of any Node.js program. Please
+ * take some time to consult the `Implementation considerations section` before
+ * using `dnsPromises.lookup()`.
+ *
+ * Example usage:
+ *
+ * ```js
+ * const dns = require('node:dns');
+ * const dnsPromises = dns.promises;
+ * const options = {
+ * family: 6,
+ * hints: dns.ADDRCONFIG | dns.V4MAPPED,
+ * };
+ *
+ * dnsPromises.lookup('example.com', options).then((result) => {
+ * console.log('address: %j family: IPv%s', result.address, result.family);
+ * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
+ * });
+ *
+ * // When options.all is true, the result will be an Array.
+ * options.all = true;
+ * dnsPromises.lookup('example.com', options).then((result) => {
+ * console.log('addresses: %j', result);
+ * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
+ * });
+ * ```
+ * @since v10.6.0
+ */
+ function lookup(hostname: string, family: number): Promise<LookupAddress>;
+ function lookup(hostname: string, options: LookupOneOptions): Promise<LookupAddress>;
+ function lookup(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
+ function lookup(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
+ function lookup(hostname: string): Promise<LookupAddress>;
+ /**
+ * Resolves the given `address` and `port` into a host name and service using
+ * the operating system's underlying `getnameinfo` implementation.
+ *
+ * If `address` is not a valid IP address, a `TypeError` will be thrown.
+ * The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown.
+ *
+ * On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code.
+ *
+ * ```js
+ * const dnsPromises = require('node:dns').promises;
+ * dnsPromises.lookupService('127.0.0.1', 22).then((result) => {
+ * console.log(result.hostname, result.service);
+ * // Prints: localhost ssh
+ * });
+ * ```
+ * @since v10.6.0
+ */
+ function lookupService(
+ address: string,
+ port: number
+ ): Promise<{
+ hostname: string;
+ service: string;
+ }>;
+ /**
+ * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
+ * of the resource records. When successful, the `Promise` is resolved with an
+ * array of resource records. The type and structure of individual results vary
+ * based on `rrtype`:
+ *
+ * <omitted>
+ *
+ * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the `DNS error codes`.
+ * @since v10.6.0
+ * @param hostname Host name to resolve.
+ * @param [rrtype='A'] Resource record type.
+ */
+ function resolve(hostname: string): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'A'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'AAAA'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'ANY'): Promise<AnyRecord[]>;
+ function resolve(hostname: string, rrtype: 'CAA'): Promise<CaaRecord[]>;
+ function resolve(hostname: string, rrtype: 'CNAME'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'MX'): Promise<MxRecord[]>;
+ function resolve(hostname: string, rrtype: 'NAPTR'): Promise<NaptrRecord[]>;
+ function resolve(hostname: string, rrtype: 'NS'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'PTR'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'SOA'): Promise<SoaRecord>;
+ function resolve(hostname: string, rrtype: 'SRV'): Promise<SrvRecord[]>;
+ function resolve(hostname: string, rrtype: 'TXT'): Promise<string[][]>;
+ function resolve(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv4
+ * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
+ * @since v10.6.0
+ * @param hostname Host name to resolve.
+ */
+ function resolve4(hostname: string): Promise<string[]>;
+ function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ /**
+ * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv6
+ * addresses.
+ * @since v10.6.0
+ * @param hostname Host name to resolve.
+ */
+ function resolve6(hostname: string): Promise<string[]>;
+ function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function resolve6(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ /**
+ * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
+ * On success, the `Promise` is resolved with an array containing various types of
+ * records. Each object has a property `type` that indicates the type of the
+ * current record. And depending on the `type`, additional properties will be
+ * present on the object:
+ *
+ * <omitted>
+ *
+ * Here is an example of the result object:
+ *
+ * ```js
+ * [ { type: 'A', address: '127.0.0.1', ttl: 299 },
+ * { type: 'CNAME', value: 'example.com' },
+ * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
+ * { type: 'NS', value: 'ns1.example.com' },
+ * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
+ * { type: 'SOA',
+ * nsname: 'ns1.example.com',
+ * hostmaster: 'admin.example.com',
+ * serial: 156696742,
+ * refresh: 900,
+ * retry: 900,
+ * expire: 1800,
+ * minttl: 60 } ]
+ * ```
+ * @since v10.6.0
+ */
+ function resolveAny(hostname: string): Promise<AnyRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success,
+ * the `Promise` is resolved with an array of objects containing available
+ * certification authority authorization records available for the `hostname`(e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`).
+ * @since v15.0.0, v14.17.0
+ */
+ function resolveCaa(hostname: string): Promise<CaaRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success,
+ * the `Promise` is resolved with an array of canonical name records available for
+ * the `hostname` (e.g. `['bar.example.com']`).
+ * @since v10.6.0
+ */
+ function resolveCname(hostname: string): Promise<string[]>;
+ /**
+ * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects
+ * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`).
+ * @since v10.6.0
+ */
+ function resolveMx(hostname: string): Promise<MxRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve regular expression-based records (`NAPTR`records) for the `hostname`. On success, the `Promise` is resolved with an array
+ * of objects with the following properties:
+ *
+ * * `flags`
+ * * `service`
+ * * `regexp`
+ * * `replacement`
+ * * `order`
+ * * `preference`
+ *
+ * ```js
+ * {
+ * flags: 's',
+ * service: 'SIP+D2U',
+ * regexp: '',
+ * replacement: '_sip._udp.example.com',
+ * order: 30,
+ * preference: 100
+ * }
+ * ```
+ * @since v10.6.0
+ */
+ function resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. On success, the `Promise` is resolved with an array of name server
+ * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`).
+ * @since v10.6.0
+ */
+ function resolveNs(hostname: string): Promise<string[]>;
+ /**
+ * Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. On success, the `Promise` is resolved with an array of strings
+ * containing the reply records.
+ * @since v10.6.0
+ */
+ function resolvePtr(hostname: string): Promise<string[]>;
+ /**
+ * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
+ * the `hostname`. On success, the `Promise` is resolved with an object with the
+ * following properties:
+ *
+ * * `nsname`
+ * * `hostmaster`
+ * * `serial`
+ * * `refresh`
+ * * `retry`
+ * * `expire`
+ * * `minttl`
+ *
+ * ```js
+ * {
+ * nsname: 'ns.example.com',
+ * hostmaster: 'root.example.com',
+ * serial: 2013101809,
+ * refresh: 10000,
+ * retry: 2400,
+ * expire: 604800,
+ * minttl: 3600
+ * }
+ * ```
+ * @since v10.6.0
+ */
+ function resolveSoa(hostname: string): Promise<SoaRecord>;
+ /**
+ * Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects with
+ * the following properties:
+ *
+ * * `priority`
+ * * `weight`
+ * * `port`
+ * * `name`
+ *
+ * ```js
+ * {
+ * priority: 10,
+ * weight: 5,
+ * port: 21223,
+ * name: 'service.example.com'
+ * }
+ * ```
+ * @since v10.6.0
+ */
+ function resolveSrv(hostname: string): Promise<SrvRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. On success, the `Promise` is resolved with a two-dimensional array
+ * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
+ * one record. Depending on the use case, these could be either joined together or
+ * treated separately.
+ * @since v10.6.0
+ */
+ function resolveTxt(hostname: string): Promise<string[][]>;
+ /**
+ * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
+ * array of host names.
+ *
+ * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the `DNS error codes`.
+ * @since v10.6.0
+ */
+ function reverse(ip: string): Promise<string[]>;
+ /**
+ * Sets the IP address and port of servers to be used when performing DNS
+ * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
+ * addresses. If the port is the IANA default DNS port (53) it can be omitted.
+ *
+ * ```js
+ * dnsPromises.setServers([
+ * '4.4.4.4',
+ * '[2001:4860:4860::8888]',
+ * '4.4.4.4:1053',
+ * '[2001:4860:4860::8888]:1053',
+ * ]);
+ * ```
+ *
+ * An error will be thrown if an invalid address is provided.
+ *
+ * The `dnsPromises.setServers()` method must not be called while a DNS query is in
+ * progress.
+ *
+ * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
+ * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
+ * subsequent servers provided. Fallback DNS servers will only be used if the
+ * earlier ones time out or result in some other error.
+ * @since v10.6.0
+ * @param servers array of `RFC 5952` formatted addresses
+ */
+ function setServers(servers: ReadonlyArray<string>): void;
+ /**
+ * Set the default value of `verbatim` in `dns.lookup()` and `dnsPromises.lookup()`. The value could be:
+ *
+ * * `ipv4first`: sets default `verbatim` `false`.
+ * * `verbatim`: sets default `verbatim` `true`.
+ *
+ * The default is `verbatim` and `dnsPromises.setDefaultResultOrder()` have
+ * higher priority than `--dns-result-order`. When using `worker threads`,`dnsPromises.setDefaultResultOrder()` from the main thread won't affect the
+ * default dns orders in workers.
+ * @since v16.4.0, v14.18.0
+ * @param order must be `'ipv4first'` or `'verbatim'`.
+ */
+ function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
+ /**
+ * An independent resolver for DNS requests.
+ *
+ * Creating a new resolver uses the default server settings. Setting
+ * the servers used for a resolver using `resolver.setServers()` does not affect
+ * other resolvers:
+ *
+ * ```js
+ * const { Resolver } = require('node:dns').promises;
+ * const resolver = new Resolver();
+ * resolver.setServers(['4.4.4.4']);
+ *
+ * // This request will use the server at 4.4.4.4, independent of global settings.
+ * resolver.resolve4('example.org').then((addresses) => {
+ * // ...
+ * });
+ *
+ * // Alternatively, the same code can be written using async-await style.
+ * (async function() {
+ * const addresses = await resolver.resolve4('example.org');
+ * })();
+ * ```
+ *
+ * The following methods from the `dnsPromises` API are available:
+ *
+ * * `resolver.getServers()`
+ * * `resolver.resolve()`
+ * * `resolver.resolve4()`
+ * * `resolver.resolve6()`
+ * * `resolver.resolveAny()`
+ * * `resolver.resolveCaa()`
+ * * `resolver.resolveCname()`
+ * * `resolver.resolveMx()`
+ * * `resolver.resolveNaptr()`
+ * * `resolver.resolveNs()`
+ * * `resolver.resolvePtr()`
+ * * `resolver.resolveSoa()`
+ * * `resolver.resolveSrv()`
+ * * `resolver.resolveTxt()`
+ * * `resolver.reverse()`
+ * * `resolver.setServers()`
+ * @since v10.6.0
+ */
+ class Resolver {
+ constructor(options?: ResolverOptions);
+ cancel(): void;
+ getServers: typeof getServers;
+ resolve: typeof resolve;
+ resolve4: typeof resolve4;
+ resolve6: typeof resolve6;
+ resolveAny: typeof resolveAny;
+ resolveCaa: typeof resolveCaa;
+ resolveCname: typeof resolveCname;
+ resolveMx: typeof resolveMx;
+ resolveNaptr: typeof resolveNaptr;
+ resolveNs: typeof resolveNs;
+ resolvePtr: typeof resolvePtr;
+ resolveSoa: typeof resolveSoa;
+ resolveSrv: typeof resolveSrv;
+ resolveTxt: typeof resolveTxt;
+ reverse: typeof reverse;
+ setLocalAddress(ipv4?: string, ipv6?: string): void;
+ setServers: typeof setServers;
+ }
+}
+declare module 'node:dns/promises' {
+ export * from 'dns/promises';
+}
diff --git a/node_modules/@types/node/ts4.8/dom-events.d.ts b/node_modules/@types/node/ts4.8/dom-events.d.ts
new file mode 100755
index 0000000..b9c1c3a
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/dom-events.d.ts
@@ -0,0 +1,126 @@
+export {}; // Don't export anything!
+
+//// DOM-like Events
+// NB: The Event / EventTarget / EventListener implementations below were copied
+// from lib.dom.d.ts, then edited to reflect Node's documentation at
+// https://nodejs.org/api/events.html#class-eventtarget.
+// Please read that link to understand important implementation differences.
+
+// This conditional type will be the existing global Event in a browser, or
+// the copy below in a Node environment.
+type __Event = typeof globalThis extends { onmessage: any, Event: any }
+? {}
+: {
+ /** This is not used in Node.js and is provided purely for completeness. */
+ readonly bubbles: boolean;
+ /** Alias for event.stopPropagation(). This is not used in Node.js and is provided purely for completeness. */
+ cancelBubble: () => void;
+ /** True if the event was created with the cancelable option */
+ readonly cancelable: boolean;
+ /** This is not used in Node.js and is provided purely for completeness. */
+ readonly composed: boolean;
+ /** Returns an array containing the current EventTarget as the only entry or empty if the event is not being dispatched. This is not used in Node.js and is provided purely for completeness. */
+ composedPath(): [EventTarget?]
+ /** Alias for event.target. */
+ readonly currentTarget: EventTarget | null;
+ /** Is true if cancelable is true and event.preventDefault() has been called. */
+ readonly defaultPrevented: boolean;
+ /** This is not used in Node.js and is provided purely for completeness. */
+ readonly eventPhase: 0 | 2;
+ /** The `AbortSignal` "abort" event is emitted with `isTrusted` set to `true`. The value is `false` in all other cases. */
+ readonly isTrusted: boolean;
+ /** Sets the `defaultPrevented` property to `true` if `cancelable` is `true`. */
+ preventDefault(): void;
+ /** This is not used in Node.js and is provided purely for completeness. */
+ returnValue: boolean;
+ /** Alias for event.target. */
+ readonly srcElement: EventTarget | null;
+ /** Stops the invocation of event listeners after the current one completes. */
+ stopImmediatePropagation(): void;
+ /** This is not used in Node.js and is provided purely for completeness. */
+ stopPropagation(): void;
+ /** The `EventTarget` dispatching the event */
+ readonly target: EventTarget | null;
+ /** The millisecond timestamp when the Event object was created. */
+ readonly timeStamp: number;
+ /** Returns the type of event, e.g. "click", "hashchange", or "submit". */
+ readonly type: string;
+};
+
+// See comment above explaining conditional type
+type __EventTarget = typeof globalThis extends { onmessage: any, EventTarget: any }
+? {}
+: {
+ /**
+ * Adds a new handler for the `type` event. Any given `listener` is added only once per `type` and per `capture` option value.
+ *
+ * If the `once` option is true, the `listener` is removed after the next time a `type` event is dispatched.
+ *
+ * The `capture` option is not used by Node.js in any functional way other than tracking registered event listeners per the `EventTarget` specification.
+ * Specifically, the `capture` option is used as part of the key when registering a `listener`.
+ * Any individual `listener` may be added once with `capture = false`, and once with `capture = true`.
+ */
+ addEventListener(
+ type: string,
+ listener: EventListener | EventListenerObject,
+ options?: AddEventListenerOptions | boolean,
+ ): void;
+ /** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
+ dispatchEvent(event: Event): boolean;
+ /** Removes the event listener in target's event listener list with the same type, callback, and options. */
+ removeEventListener(
+ type: string,
+ listener: EventListener | EventListenerObject,
+ options?: EventListenerOptions | boolean,
+ ): void;
+};
+
+interface EventInit {
+ bubbles?: boolean;
+ cancelable?: boolean;
+ composed?: boolean;
+}
+
+interface EventListenerOptions {
+ /** Not directly used by Node.js. Added for API completeness. Default: `false`. */
+ capture?: boolean;
+}
+
+interface AddEventListenerOptions extends EventListenerOptions {
+ /** When `true`, the listener is automatically removed when it is first invoked. Default: `false`. */
+ once?: boolean;
+ /** When `true`, serves as a hint that the listener will not call the `Event` object's `preventDefault()` method. Default: false. */
+ passive?: boolean;
+}
+
+interface EventListener {
+ (evt: Event): void;
+}
+
+interface EventListenerObject {
+ handleEvent(object: Event): void;
+}
+
+import {} from 'events'; // Make this an ambient declaration
+declare global {
+ /** An event which takes place in the DOM. */
+ interface Event extends __Event {}
+ var Event: typeof globalThis extends { onmessage: any, Event: infer T }
+ ? T
+ : {
+ prototype: __Event;
+ new (type: string, eventInitDict?: EventInit): __Event;
+ };
+
+ /**
+ * EventTarget is a DOM interface implemented by objects that can
+ * receive events and may have listeners for them.
+ */
+ interface EventTarget extends __EventTarget {}
+ var EventTarget: typeof globalThis extends { onmessage: any, EventTarget: infer T }
+ ? T
+ : {
+ prototype: __EventTarget;
+ new (): __EventTarget;
+ };
+}
diff --git a/node_modules/@types/node/ts4.8/domain.d.ts b/node_modules/@types/node/ts4.8/domain.d.ts
new file mode 100755
index 0000000..e49b87f
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/domain.d.ts
@@ -0,0 +1,170 @@
+/**
+ * **This module is pending deprecation.** Once a replacement API has been
+ * finalized, this module will be fully deprecated. Most developers should
+ * **not** have cause to use this module. Users who absolutely must have
+ * the functionality that domains provide may rely on it for the time being
+ * but should expect to have to migrate to a different solution
+ * in the future.
+ *
+ * Domains provide a way to handle multiple different IO operations as a
+ * single group. If any of the event emitters or callbacks registered to a
+ * domain emit an `'error'` event, or throw an error, then the domain object
+ * will be notified, rather than losing the context of the error in the`process.on('uncaughtException')` handler, or causing the program to
+ * exit immediately with an error code.
+ * @deprecated Since v1.4.2 - Deprecated
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/domain.js)
+ */
+declare module 'domain' {
+ import EventEmitter = require('node:events');
+ /**
+ * The `Domain` class encapsulates the functionality of routing errors and
+ * uncaught exceptions to the active `Domain` object.
+ *
+ * To handle the errors that it catches, listen to its `'error'` event.
+ */
+ class Domain extends EventEmitter {
+ /**
+ * An array of timers and event emitters that have been explicitly added
+ * to the domain.
+ */
+ members: Array<EventEmitter | NodeJS.Timer>;
+ /**
+ * The `enter()` method is plumbing used by the `run()`, `bind()`, and`intercept()` methods to set the active domain. It sets `domain.active` and`process.domain` to the domain, and implicitly
+ * pushes the domain onto the domain
+ * stack managed by the domain module (see {@link exit} for details on the
+ * domain stack). The call to `enter()` delimits the beginning of a chain of
+ * asynchronous calls and I/O operations bound to a domain.
+ *
+ * Calling `enter()` changes only the active domain, and does not alter the domain
+ * itself. `enter()` and `exit()` can be called an arbitrary number of times on a
+ * single domain.
+ */
+ enter(): void;
+ /**
+ * The `exit()` method exits the current domain, popping it off the domain stack.
+ * Any time execution is going to switch to the context of a different chain of
+ * asynchronous calls, it's important to ensure that the current domain is exited.
+ * The call to `exit()` delimits either the end of or an interruption to the chain
+ * of asynchronous calls and I/O operations bound to a domain.
+ *
+ * If there are multiple, nested domains bound to the current execution context,`exit()` will exit any domains nested within this domain.
+ *
+ * Calling `exit()` changes only the active domain, and does not alter the domain
+ * itself. `enter()` and `exit()` can be called an arbitrary number of times on a
+ * single domain.
+ */
+ exit(): void;
+ /**
+ * Run the supplied function in the context of the domain, implicitly
+ * binding all event emitters, timers, and low-level requests that are
+ * created in that context. Optionally, arguments can be passed to
+ * the function.
+ *
+ * This is the most basic way to use a domain.
+ *
+ * ```js
+ * const domain = require('node:domain');
+ * const fs = require('node:fs');
+ * const d = domain.create();
+ * d.on('error', (er) => {
+ * console.error('Caught error!', er);
+ * });
+ * d.run(() => {
+ * process.nextTick(() => {
+ * setTimeout(() => { // Simulating some various async stuff
+ * fs.open('non-existent file', 'r', (er, fd) => {
+ * if (er) throw er;
+ * // proceed...
+ * });
+ * }, 100);
+ * });
+ * });
+ * ```
+ *
+ * In this example, the `d.on('error')` handler will be triggered, rather
+ * than crashing the program.
+ */
+ run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
+ /**
+ * Explicitly adds an emitter to the domain. If any event handlers called by
+ * the emitter throw an error, or if the emitter emits an `'error'` event, it
+ * will be routed to the domain's `'error'` event, just like with implicit
+ * binding.
+ *
+ * This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by
+ * the domain `'error'` handler.
+ *
+ * If the Timer or `EventEmitter` was already bound to a domain, it is removed
+ * from that one, and bound to this one instead.
+ * @param emitter emitter or timer to be added to the domain
+ */
+ add(emitter: EventEmitter | NodeJS.Timer): void;
+ /**
+ * The opposite of {@link add}. Removes domain handling from the
+ * specified emitter.
+ * @param emitter emitter or timer to be removed from the domain
+ */
+ remove(emitter: EventEmitter | NodeJS.Timer): void;
+ /**
+ * The returned function will be a wrapper around the supplied callback
+ * function. When the returned function is called, any errors that are
+ * thrown will be routed to the domain's `'error'` event.
+ *
+ * ```js
+ * const d = domain.create();
+ *
+ * function readSomeFile(filename, cb) {
+ * fs.readFile(filename, 'utf8', d.bind((er, data) => {
+ * // If this throws, it will also be passed to the domain.
+ * return cb(er, data ? JSON.parse(data) : null);
+ * }));
+ * }
+ *
+ * d.on('error', (er) => {
+ * // An error occurred somewhere. If we throw it now, it will crash the program
+ * // with the normal line number and stack message.
+ * });
+ * ```
+ * @param callback The callback function
+ * @return The bound function
+ */
+ bind<T extends Function>(callback: T): T;
+ /**
+ * This method is almost identical to {@link bind}. However, in
+ * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function.
+ *
+ * In this way, the common `if (err) return callback(err);` pattern can be replaced
+ * with a single error handler in a single place.
+ *
+ * ```js
+ * const d = domain.create();
+ *
+ * function readSomeFile(filename, cb) {
+ * fs.readFile(filename, 'utf8', d.intercept((data) => {
+ * // Note, the first argument is never passed to the
+ * // callback since it is assumed to be the 'Error' argument
+ * // and thus intercepted by the domain.
+ *
+ * // If this throws, it will also be passed to the domain
+ * // so the error-handling logic can be moved to the 'error'
+ * // event on the domain instead of being repeated throughout
+ * // the program.
+ * return cb(null, JSON.parse(data));
+ * }));
+ * }
+ *
+ * d.on('error', (er) => {
+ * // An error occurred somewhere. If we throw it now, it will crash the program
+ * // with the normal line number and stack message.
+ * });
+ * ```
+ * @param callback The callback function
+ * @return The intercepted function
+ */
+ intercept<T extends Function>(callback: T): T;
+ }
+ function create(): Domain;
+}
+declare module 'node:domain' {
+ export * from 'domain';
+}
diff --git a/node_modules/@types/node/ts4.8/events.d.ts b/node_modules/@types/node/ts4.8/events.d.ts
new file mode 100755
index 0000000..d9a97f6
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/events.d.ts
@@ -0,0 +1,788 @@
+/**
+ * Much of the Node.js core API is built around an idiomatic asynchronous
+ * event-driven architecture in which certain kinds of objects (called "emitters")
+ * emit named events that cause `Function` objects ("listeners") to be called.
+ *
+ * For instance: a `net.Server` object emits an event each time a peer
+ * connects to it; a `fs.ReadStream` emits an event when the file is opened;
+ * a `stream` emits an event whenever data is available to be read.
+ *
+ * All objects that emit events are instances of the `EventEmitter` class. These
+ * objects expose an `eventEmitter.on()` function that allows one or more
+ * functions to be attached to named events emitted by the object. Typically,
+ * event names are camel-cased strings but any valid JavaScript property key
+ * can be used.
+ *
+ * When the `EventEmitter` object emits an event, all of the functions attached
+ * to that specific event are called _synchronously_. Any values returned by the
+ * called listeners are _ignored_ and discarded.
+ *
+ * The following example shows a simple `EventEmitter` instance with a single
+ * listener. The `eventEmitter.on()` method is used to register listeners, while
+ * the `eventEmitter.emit()` method is used to trigger the event.
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ *
+ * class MyEmitter extends EventEmitter {}
+ *
+ * const myEmitter = new MyEmitter();
+ * myEmitter.on('event', () => {
+ * console.log('an event occurred!');
+ * });
+ * myEmitter.emit('event');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/events.js)
+ */
+declare module 'events' {
+ // NOTE: This class is in the docs but is **not actually exported** by Node.
+ // If https://github.com/nodejs/node/issues/39903 gets resolved and Node
+ // actually starts exporting the class, uncomment below.
+ // import { EventListener, EventListenerObject } from '__dom-events';
+ // /** The NodeEventTarget is a Node.js-specific extension to EventTarget that emulates a subset of the EventEmitter API. */
+ // interface NodeEventTarget extends EventTarget {
+ // /**
+ // * Node.js-specific extension to the `EventTarget` class that emulates the equivalent `EventEmitter` API.
+ // * The only difference between `addListener()` and `addEventListener()` is that addListener() will return a reference to the EventTarget.
+ // */
+ // addListener(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
+ // /** Node.js-specific extension to the `EventTarget` class that returns an array of event `type` names for which event listeners are registered. */
+ // eventNames(): string[];
+ // /** Node.js-specific extension to the `EventTarget` class that returns the number of event listeners registered for the `type`. */
+ // listenerCount(type: string): number;
+ // /** Node.js-specific alias for `eventTarget.removeListener()`. */
+ // off(type: string, listener: EventListener | EventListenerObject): this;
+ // /** Node.js-specific alias for `eventTarget.addListener()`. */
+ // on(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
+ // /** Node.js-specific extension to the `EventTarget` class that adds a `once` listener for the given event `type`. This is equivalent to calling `on` with the `once` option set to `true`. */
+ // once(type: string, listener: EventListener | EventListenerObject): this;
+ // /**
+ // * Node.js-specific extension to the `EventTarget` class.
+ // * If `type` is specified, removes all registered listeners for `type`,
+ // * otherwise removes all registered listeners.
+ // */
+ // removeAllListeners(type: string): this;
+ // /**
+ // * Node.js-specific extension to the `EventTarget` class that removes the listener for the given `type`.
+ // * The only difference between `removeListener()` and `removeEventListener()` is that `removeListener()` will return a reference to the `EventTarget`.
+ // */
+ // removeListener(type: string, listener: EventListener | EventListenerObject): this;
+ // }
+ interface EventEmitterOptions {
+ /**
+ * Enables automatic capturing of promise rejection.
+ */
+ captureRejections?: boolean | undefined;
+ }
+ // Any EventTarget with a Node-style `once` function
+ interface _NodeEventTarget {
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ // Any EventTarget with a DOM-style `addEventListener`
+ interface _DOMEventTarget {
+ addEventListener(
+ eventName: string,
+ listener: (...args: any[]) => void,
+ opts?: {
+ once: boolean;
+ }
+ ): any;
+ }
+ interface StaticEventEmitterOptions {
+ signal?: AbortSignal | undefined;
+ }
+ interface EventEmitter extends NodeJS.EventEmitter {}
+ /**
+ * The `EventEmitter` class is defined and exposed by the `node:events` module:
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ * ```
+ *
+ * All `EventEmitter`s emit the event `'newListener'` when new listeners are
+ * added and `'removeListener'` when existing listeners are removed.
+ *
+ * It supports the following option:
+ * @since v0.1.26
+ */
+ class EventEmitter {
+ constructor(options?: EventEmitterOptions);
+ /**
+ * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given
+ * event or that is rejected if the `EventEmitter` emits `'error'` while waiting.
+ * The `Promise` will resolve with an array of all the arguments emitted to the
+ * given event.
+ *
+ * This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event
+ * semantics and does not listen to the `'error'` event.
+ *
+ * ```js
+ * import { once, EventEmitter } from 'node:events';
+ * import process from 'node:process';
+ *
+ * const ee = new EventEmitter();
+ *
+ * process.nextTick(() => {
+ * ee.emit('myevent', 42);
+ * });
+ *
+ * const [value] = await once(ee, 'myevent');
+ * console.log(value);
+ *
+ * const err = new Error('kaboom');
+ * process.nextTick(() => {
+ * ee.emit('error', err);
+ * });
+ *
+ * try {
+ * await once(ee, 'myevent');
+ * } catch (err) {
+ * console.error('error happened', err);
+ * }
+ * ```
+ *
+ * The special handling of the `'error'` event is only used when `events.once()`is used to wait for another event. If `events.once()` is used to wait for the
+ * '`error'` event itself, then it is treated as any other kind of event without
+ * special handling:
+ *
+ * ```js
+ * import { EventEmitter, once } from 'node:events';
+ *
+ * const ee = new EventEmitter();
+ *
+ * once(ee, 'error')
+ * .then(([err]) => console.log('ok', err.message))
+ * .catch((err) => console.error('error', err.message));
+ *
+ * ee.emit('error', new Error('boom'));
+ *
+ * // Prints: ok boom
+ * ```
+ *
+ * An `AbortSignal` can be used to cancel waiting for the event:
+ *
+ * ```js
+ * import { EventEmitter, once } from 'node:events';
+ *
+ * const ee = new EventEmitter();
+ * const ac = new AbortController();
+ *
+ * async function foo(emitter, event, signal) {
+ * try {
+ * await once(emitter, event, { signal });
+ * console.log('event emitted!');
+ * } catch (error) {
+ * if (error.name === 'AbortError') {
+ * console.error('Waiting for the event was canceled!');
+ * } else {
+ * console.error('There was an error', error.message);
+ * }
+ * }
+ * }
+ *
+ * foo(ee, 'foo', ac.signal);
+ * ac.abort(); // Abort waiting for the event
+ * ee.emit('foo'); // Prints: Waiting for the event was canceled!
+ * ```
+ * @since v11.13.0, v10.16.0
+ */
+ static once(emitter: _NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions): Promise<any[]>;
+ static once(emitter: _DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise<any[]>;
+ /**
+ * ```js
+ * import { on, EventEmitter } from 'node:events';
+ * import process from 'node:process';
+ *
+ * const ee = new EventEmitter();
+ *
+ * // Emit later on
+ * process.nextTick(() => {
+ * ee.emit('foo', 'bar');
+ * ee.emit('foo', 42);
+ * });
+ *
+ * for await (const event of on(ee, 'foo')) {
+ * // The execution of this inner block is synchronous and it
+ * // processes one event at a time (even with await). Do not use
+ * // if concurrent execution is required.
+ * console.log(event); // prints ['bar'] [42]
+ * }
+ * // Unreachable here
+ * ```
+ *
+ * Returns an `AsyncIterator` that iterates `eventName` events. It will throw
+ * if the `EventEmitter` emits `'error'`. It removes all listeners when
+ * exiting the loop. The `value` returned by each iteration is an array
+ * composed of the emitted event arguments.
+ *
+ * An `AbortSignal` can be used to cancel waiting on events:
+ *
+ * ```js
+ * import { on, EventEmitter } from 'node:events';
+ * import process from 'node:process';
+ *
+ * const ac = new AbortController();
+ *
+ * (async () => {
+ * const ee = new EventEmitter();
+ *
+ * // Emit later on
+ * process.nextTick(() => {
+ * ee.emit('foo', 'bar');
+ * ee.emit('foo', 42);
+ * });
+ *
+ * for await (const event of on(ee, 'foo', { signal: ac.signal })) {
+ * // The execution of this inner block is synchronous and it
+ * // processes one event at a time (even with await). Do not use
+ * // if concurrent execution is required.
+ * console.log(event); // prints ['bar'] [42]
+ * }
+ * // Unreachable here
+ * })();
+ *
+ * process.nextTick(() => ac.abort());
+ * ```
+ * @since v13.6.0, v12.16.0
+ * @param eventName The name of the event being listened for
+ * @return that iterates `eventName` events emitted by the `emitter`
+ */
+ static on(emitter: NodeJS.EventEmitter, eventName: string, options?: StaticEventEmitterOptions): AsyncIterableIterator<any>;
+ /**
+ * A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`.
+ *
+ * ```js
+ * import { EventEmitter, listenerCount } from 'node:events';
+ *
+ * const myEmitter = new EventEmitter();
+ * myEmitter.on('event', () => {});
+ * myEmitter.on('event', () => {});
+ * console.log(listenerCount(myEmitter, 'event'));
+ * // Prints: 2
+ * ```
+ * @since v0.9.12
+ * @deprecated Since v3.2.0 - Use `listenerCount` instead.
+ * @param emitter The emitter to query
+ * @param eventName The event name
+ */
+ static listenerCount(emitter: NodeJS.EventEmitter, eventName: string | symbol): number;
+ /**
+ * Returns a copy of the array of listeners for the event named `eventName`.
+ *
+ * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on
+ * the emitter.
+ *
+ * For `EventTarget`s this is the only way to get the event listeners for the
+ * event target. This is useful for debugging and diagnostic purposes.
+ *
+ * ```js
+ * import { getEventListeners, EventEmitter } from 'node:events';
+ *
+ * {
+ * const ee = new EventEmitter();
+ * const listener = () => console.log('Events are fun');
+ * ee.on('foo', listener);
+ * console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
+ * }
+ * {
+ * const et = new EventTarget();
+ * const listener = () => console.log('Events are fun');
+ * et.addEventListener('foo', listener);
+ * console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
+ * }
+ * ```
+ * @since v15.2.0, v14.17.0
+ */
+ static getEventListeners(emitter: _DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[];
+ /**
+ * Returns the currently set max amount of listeners.
+ *
+ * For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on
+ * the emitter.
+ *
+ * For `EventTarget`s this is the only way to get the max event listeners for the
+ * event target. If the number of event handlers on a single EventTarget exceeds
+ * the max set, the EventTarget will print a warning.
+ *
+ * ```js
+ * import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';
+ *
+ * {
+ * const ee = new EventEmitter();
+ * console.log(getMaxListeners(ee)); // 10
+ * setMaxListeners(11, ee);
+ * console.log(getMaxListeners(ee)); // 11
+ * }
+ * {
+ * const et = new EventTarget();
+ * console.log(getMaxListeners(et)); // 10
+ * setMaxListeners(11, et);
+ * console.log(getMaxListeners(et)); // 11
+ * }
+ * ```
+ * @since v19.9.0
+ */
+ static getMaxListeners(emitter: _DOMEventTarget | NodeJS.EventEmitter): number;
+ /**
+ * ```js
+ * import { setMaxListeners, EventEmitter } from 'node:events';
+ *
+ * const target = new EventTarget();
+ * const emitter = new EventEmitter();
+ *
+ * setMaxListeners(5, target, emitter);
+ * ```
+ * @since v15.4.0
+ * @param n A non-negative number. The maximum number of listeners per `EventTarget` event.
+ * @param eventsTargets Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter}
+ * objects.
+ */
+ static setMaxListeners(n?: number, ...eventTargets: Array<_DOMEventTarget | NodeJS.EventEmitter>): void;
+ /**
+ * Listens once to the `abort` event on the provided `signal`.
+ *
+ * Listening to the `abort` event on abort signals is unsafe and may
+ * lead to resource leaks since another third party with the signal can
+ * call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change
+ * this since it would violate the web standard. Additionally, the original
+ * API makes it easy to forget to remove listeners.
+ *
+ * This API allows safely using `AbortSignal`s in Node.js APIs by solving these
+ * two issues by listening to the event such that `stopImmediatePropagation` does
+ * not prevent the listener from running.
+ *
+ * Returns a disposable so that it may be unsubscribed from more easily.
+ *
+ * ```js
+ * import { addAbortListener } from 'node:events';
+ *
+ * function example(signal) {
+ * let disposable;
+ * try {
+ * signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
+ * disposable = addAbortListener(signal, (e) => {
+ * // Do something when signal is aborted.
+ * });
+ * } finally {
+ * disposable?.[Symbol.dispose]();
+ * }
+ * }
+ * ```
+ * @since v20.5.0
+ * @experimental
+ * @return that removes the `abort` listener.
+ */
+ static addAbortListener(signal: AbortSignal, resource: (event: Event) => void): Disposable;
+ /**
+ * This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called.
+ *
+ * Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no
+ * regular `'error'` listener is installed.
+ * @since v13.6.0, v12.17.0
+ */
+ static readonly errorMonitor: unique symbol;
+ /**
+ * Value: `Symbol.for('nodejs.rejection')`
+ *
+ * See how to write a custom `rejection handler`.
+ * @since v13.4.0, v12.16.0
+ */
+ static readonly captureRejectionSymbol: unique symbol;
+ /**
+ * Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
+ *
+ * Change the default `captureRejections` option on all new `EventEmitter` objects.
+ * @since v13.4.0, v12.16.0
+ */
+ static captureRejections: boolean;
+ /**
+ * By default, a maximum of `10` listeners can be registered for any single
+ * event. This limit can be changed for individual `EventEmitter` instances
+ * using the `emitter.setMaxListeners(n)` method. To change the default
+ * for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown.
+ *
+ * Take caution when setting the `events.defaultMaxListeners` because the
+ * change affects _all_`EventEmitter` instances, including those created before
+ * the change is made. However, calling `emitter.setMaxListeners(n)` still has
+ * precedence over `events.defaultMaxListeners`.
+ *
+ * This is not a hard limit. The `EventEmitter` instance will allow
+ * more listeners to be added but will output a trace warning to stderr indicating
+ * that a "possible EventEmitter memory leak" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to
+ * temporarily avoid this warning:
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ * const emitter = new EventEmitter();
+ * emitter.setMaxListeners(emitter.getMaxListeners() + 1);
+ * emitter.once('event', () => {
+ * // do stuff
+ * emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
+ * });
+ * ```
+ *
+ * The `--trace-warnings` command-line flag can be used to display the
+ * stack trace for such warnings.
+ *
+ * The emitted warning can be inspected with `process.on('warning')` and will
+ * have the additional `emitter`, `type`, and `count` properties, referring to
+ * the event emitter instance, the event's name and the number of attached
+ * listeners, respectively.
+ * Its `name` property is set to `'MaxListenersExceededWarning'`.
+ * @since v0.11.2
+ */
+ static defaultMaxListeners: number;
+ }
+ import internal = require('node:events');
+ namespace EventEmitter {
+ // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4
+ export { internal as EventEmitter };
+ export interface Abortable {
+ /**
+ * When provided the corresponding `AbortController` can be used to cancel an asynchronous action.
+ */
+ signal?: AbortSignal | undefined;
+ }
+ }
+ global {
+ namespace NodeJS {
+ interface EventEmitter {
+ /**
+ * Alias for `emitter.on(eventName, listener)`.
+ * @since v0.1.26
+ */
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Adds the `listener` function to the end of the listeners array for the
+ * event named `eventName`. No checks are made to see if the `listener` has
+ * already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple
+ * times.
+ *
+ * ```js
+ * server.on('connection', (stream) => {
+ * console.log('someone connected!');
+ * });
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ *
+ * By default, event listeners are invoked in the order they are added. The`emitter.prependListener()` method can be used as an alternative to add the
+ * event listener to the beginning of the listeners array.
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ * const myEE = new EventEmitter();
+ * myEE.on('foo', () => console.log('a'));
+ * myEE.prependListener('foo', () => console.log('b'));
+ * myEE.emit('foo');
+ * // Prints:
+ * // b
+ * // a
+ * ```
+ * @since v0.1.101
+ * @param eventName The name of the event.
+ * @param listener The callback function
+ */
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Adds a **one-time**`listener` function for the event named `eventName`. The
+ * next time `eventName` is triggered, this listener is removed and then invoked.
+ *
+ * ```js
+ * server.once('connection', (stream) => {
+ * console.log('Ah, we have our first user!');
+ * });
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ *
+ * By default, event listeners are invoked in the order they are added. The`emitter.prependOnceListener()` method can be used as an alternative to add the
+ * event listener to the beginning of the listeners array.
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ * const myEE = new EventEmitter();
+ * myEE.once('foo', () => console.log('a'));
+ * myEE.prependOnceListener('foo', () => console.log('b'));
+ * myEE.emit('foo');
+ * // Prints:
+ * // b
+ * // a
+ * ```
+ * @since v0.3.0
+ * @param eventName The name of the event.
+ * @param listener The callback function
+ */
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Removes the specified `listener` from the listener array for the event named`eventName`.
+ *
+ * ```js
+ * const callback = (stream) => {
+ * console.log('someone connected!');
+ * };
+ * server.on('connection', callback);
+ * // ...
+ * server.removeListener('connection', callback);
+ * ```
+ *
+ * `removeListener()` will remove, at most, one instance of a listener from the
+ * listener array. If any single listener has been added multiple times to the
+ * listener array for the specified `eventName`, then `removeListener()` must be
+ * called multiple times to remove each instance.
+ *
+ * Once an event is emitted, all listeners attached to it at the
+ * time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution
+ * will not remove them from`emit()` in progress. Subsequent events behave as expected.
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ * class MyEmitter extends EventEmitter {}
+ * const myEmitter = new MyEmitter();
+ *
+ * const callbackA = () => {
+ * console.log('A');
+ * myEmitter.removeListener('event', callbackB);
+ * };
+ *
+ * const callbackB = () => {
+ * console.log('B');
+ * };
+ *
+ * myEmitter.on('event', callbackA);
+ *
+ * myEmitter.on('event', callbackB);
+ *
+ * // callbackA removes listener callbackB but it will still be called.
+ * // Internal listener array at time of emit [callbackA, callbackB]
+ * myEmitter.emit('event');
+ * // Prints:
+ * // A
+ * // B
+ *
+ * // callbackB is now removed.
+ * // Internal listener array [callbackA]
+ * myEmitter.emit('event');
+ * // Prints:
+ * // A
+ * ```
+ *
+ * Because listeners are managed using an internal array, calling this will
+ * change the position indices of any listener registered _after_ the listener
+ * being removed. This will not impact the order in which listeners are called,
+ * but it means that any copies of the listener array as returned by
+ * the `emitter.listeners()` method will need to be recreated.
+ *
+ * When a single function has been added as a handler multiple times for a single
+ * event (as in the example below), `removeListener()` will remove the most
+ * recently added instance. In the example the `once('ping')`listener is removed:
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ * const ee = new EventEmitter();
+ *
+ * function pong() {
+ * console.log('pong');
+ * }
+ *
+ * ee.on('ping', pong);
+ * ee.once('ping', pong);
+ * ee.removeListener('ping', pong);
+ *
+ * ee.emit('ping');
+ * ee.emit('ping');
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v0.1.26
+ */
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Alias for `emitter.removeListener()`.
+ * @since v10.0.0
+ */
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Removes all listeners, or those of the specified `eventName`.
+ *
+ * It is bad practice to remove listeners added elsewhere in the code,
+ * particularly when the `EventEmitter` instance was created by some other
+ * component or module (e.g. sockets or file streams).
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v0.1.26
+ */
+ removeAllListeners(event?: string | symbol): this;
+ /**
+ * By default `EventEmitter`s will print a warning if more than `10` listeners are
+ * added for a particular event. This is a useful default that helps finding
+ * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be
+ * modified for this specific `EventEmitter` instance. The value can be set to`Infinity` (or `0`) to indicate an unlimited number of listeners.
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v0.3.5
+ */
+ setMaxListeners(n: number): this;
+ /**
+ * Returns the current max listener value for the `EventEmitter` which is either
+ * set by `emitter.setMaxListeners(n)` or defaults to {@link defaultMaxListeners}.
+ * @since v1.0.0
+ */
+ getMaxListeners(): number;
+ /**
+ * Returns a copy of the array of listeners for the event named `eventName`.
+ *
+ * ```js
+ * server.on('connection', (stream) => {
+ * console.log('someone connected!');
+ * });
+ * console.log(util.inspect(server.listeners('connection')));
+ * // Prints: [ [Function] ]
+ * ```
+ * @since v0.1.26
+ */
+ listeners(eventName: string | symbol): Function[];
+ /**
+ * Returns a copy of the array of listeners for the event named `eventName`,
+ * including any wrappers (such as those created by `.once()`).
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ * const emitter = new EventEmitter();
+ * emitter.once('log', () => console.log('log once'));
+ *
+ * // Returns a new Array with a function `onceWrapper` which has a property
+ * // `listener` which contains the original listener bound above
+ * const listeners = emitter.rawListeners('log');
+ * const logFnWrapper = listeners[0];
+ *
+ * // Logs "log once" to the console and does not unbind the `once` event
+ * logFnWrapper.listener();
+ *
+ * // Logs "log once" to the console and removes the listener
+ * logFnWrapper();
+ *
+ * emitter.on('log', () => console.log('log persistently'));
+ * // Will return a new Array with a single function bound by `.on()` above
+ * const newListeners = emitter.rawListeners('log');
+ *
+ * // Logs "log persistently" twice
+ * newListeners[0]();
+ * emitter.emit('log');
+ * ```
+ * @since v9.4.0
+ */
+ rawListeners(eventName: string | symbol): Function[];
+ /**
+ * Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments
+ * to each.
+ *
+ * Returns `true` if the event had listeners, `false` otherwise.
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ * const myEmitter = new EventEmitter();
+ *
+ * // First listener
+ * myEmitter.on('event', function firstListener() {
+ * console.log('Helloooo! first listener');
+ * });
+ * // Second listener
+ * myEmitter.on('event', function secondListener(arg1, arg2) {
+ * console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
+ * });
+ * // Third listener
+ * myEmitter.on('event', function thirdListener(...args) {
+ * const parameters = args.join(', ');
+ * console.log(`event with parameters ${parameters} in third listener`);
+ * });
+ *
+ * console.log(myEmitter.listeners('event'));
+ *
+ * myEmitter.emit('event', 1, 2, 3, 4, 5);
+ *
+ * // Prints:
+ * // [
+ * // [Function: firstListener],
+ * // [Function: secondListener],
+ * // [Function: thirdListener]
+ * // ]
+ * // Helloooo! first listener
+ * // event with parameters 1, 2 in second listener
+ * // event with parameters 1, 2, 3, 4, 5 in third listener
+ * ```
+ * @since v0.1.26
+ */
+ emit(eventName: string | symbol, ...args: any[]): boolean;
+ /**
+ * Returns the number of listeners listening for the event named `eventName`.
+ * If `listener` is provided, it will return how many times the listener is found
+ * in the list of the listeners of the event.
+ * @since v3.2.0
+ * @param eventName The name of the event being listened for
+ * @param listener The event handler function
+ */
+ listenerCount(eventName: string | symbol, listener?: Function): number;
+ /**
+ * Adds the `listener` function to the _beginning_ of the listeners array for the
+ * event named `eventName`. No checks are made to see if the `listener` has
+ * already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple
+ * times.
+ *
+ * ```js
+ * server.prependListener('connection', (stream) => {
+ * console.log('someone connected!');
+ * });
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v6.0.0
+ * @param eventName The name of the event.
+ * @param listener The callback function
+ */
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
+ * listener is removed, and then invoked.
+ *
+ * ```js
+ * server.prependOnceListener('connection', (stream) => {
+ * console.log('Ah, we have our first user!');
+ * });
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v6.0.0
+ * @param eventName The name of the event.
+ * @param listener The callback function
+ */
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Returns an array listing the events for which the emitter has registered
+ * listeners. The values in the array are strings or `Symbol`s.
+ *
+ * ```js
+ * import { EventEmitter } from 'node:events';
+ *
+ * const myEE = new EventEmitter();
+ * myEE.on('foo', () => {});
+ * myEE.on('bar', () => {});
+ *
+ * const sym = Symbol('symbol');
+ * myEE.on(sym, () => {});
+ *
+ * console.log(myEE.eventNames());
+ * // Prints: [ 'foo', 'bar', Symbol(symbol) ]
+ * ```
+ * @since v6.0.0
+ */
+ eventNames(): Array<string | symbol>;
+ }
+ }
+ }
+ export = EventEmitter;
+}
+declare module 'node:events' {
+ import events = require('events');
+ export = events;
+}
diff --git a/node_modules/@types/node/ts4.8/fs.d.ts b/node_modules/@types/node/ts4.8/fs.d.ts
new file mode 100755
index 0000000..88dc63e
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/fs.d.ts
@@ -0,0 +1,4082 @@
+/**
+ * The `node:fs` module enables interacting with the file system in a
+ * way modeled on standard POSIX functions.
+ *
+ * To use the promise-based APIs:
+ *
+ * ```js
+ * import * as fs from 'node:fs/promises';
+ * ```
+ *
+ * To use the callback and sync APIs:
+ *
+ * ```js
+ * import * as fs from 'node:fs';
+ * ```
+ *
+ * All file system operations have synchronous, callback, and promise-based
+ * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/fs.js)
+ */
+declare module 'fs' {
+ import * as stream from 'node:stream';
+ import { Abortable, EventEmitter } from 'node:events';
+ import { URL } from 'node:url';
+ import * as promises from 'node:fs/promises';
+ export { promises };
+ /**
+ * Valid types for path values in "fs".
+ */
+ export type PathLike = string | Buffer | URL;
+ export type PathOrFileDescriptor = PathLike | number;
+ export type TimeLike = string | number | Date;
+ export type NoParamCallback = (err: NodeJS.ErrnoException | null) => void;
+ export type BufferEncodingOption =
+ | 'buffer'
+ | {
+ encoding: 'buffer';
+ };
+ export interface ObjectEncodingOptions {
+ encoding?: BufferEncoding | null | undefined;
+ }
+ export type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null;
+ export type OpenMode = number | string;
+ export type Mode = number | string;
+ export interface StatsBase<T> {
+ isFile(): boolean;
+ isDirectory(): boolean;
+ isBlockDevice(): boolean;
+ isCharacterDevice(): boolean;
+ isSymbolicLink(): boolean;
+ isFIFO(): boolean;
+ isSocket(): boolean;
+ dev: T;
+ ino: T;
+ mode: T;
+ nlink: T;
+ uid: T;
+ gid: T;
+ rdev: T;
+ size: T;
+ blksize: T;
+ blocks: T;
+ atimeMs: T;
+ mtimeMs: T;
+ ctimeMs: T;
+ birthtimeMs: T;
+ atime: Date;
+ mtime: Date;
+ ctime: Date;
+ birthtime: Date;
+ }
+ export interface Stats extends StatsBase<number> {}
+ /**
+ * A `fs.Stats` object provides information about a file.
+ *
+ * Objects returned from {@link stat}, {@link lstat}, {@link fstat}, and
+ * their synchronous counterparts are of this type.
+ * If `bigint` in the `options` passed to those methods is true, the numeric values
+ * will be `bigint` instead of `number`, and the object will contain additional
+ * nanosecond-precision properties suffixed with `Ns`.
+ *
+ * ```console
+ * Stats {
+ * dev: 2114,
+ * ino: 48064969,
+ * mode: 33188,
+ * nlink: 1,
+ * uid: 85,
+ * gid: 100,
+ * rdev: 0,
+ * size: 527,
+ * blksize: 4096,
+ * blocks: 8,
+ * atimeMs: 1318289051000.1,
+ * mtimeMs: 1318289051000.1,
+ * ctimeMs: 1318289051000.1,
+ * birthtimeMs: 1318289051000.1,
+ * atime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * mtime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * ctime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * birthtime: Mon, 10 Oct 2011 23:24:11 GMT }
+ * ```
+ *
+ * `bigint` version:
+ *
+ * ```console
+ * BigIntStats {
+ * dev: 2114n,
+ * ino: 48064969n,
+ * mode: 33188n,
+ * nlink: 1n,
+ * uid: 85n,
+ * gid: 100n,
+ * rdev: 0n,
+ * size: 527n,
+ * blksize: 4096n,
+ * blocks: 8n,
+ * atimeMs: 1318289051000n,
+ * mtimeMs: 1318289051000n,
+ * ctimeMs: 1318289051000n,
+ * birthtimeMs: 1318289051000n,
+ * atimeNs: 1318289051000000000n,
+ * mtimeNs: 1318289051000000000n,
+ * ctimeNs: 1318289051000000000n,
+ * birthtimeNs: 1318289051000000000n,
+ * atime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * mtime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * ctime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * birthtime: Mon, 10 Oct 2011 23:24:11 GMT }
+ * ```
+ * @since v0.1.21
+ */
+ export class Stats {}
+ export interface StatsFsBase<T> {
+ /** Type of file system. */
+ type: T;
+ /** Optimal transfer block size. */
+ bsize: T;
+ /** Total data blocks in file system. */
+ blocks: T;
+ /** Free blocks in file system. */
+ bfree: T;
+ /** Available blocks for unprivileged users */
+ bavail: T;
+ /** Total file nodes in file system. */
+ files: T;
+ /** Free file nodes in file system. */
+ ffree: T;
+ }
+ export interface StatsFs extends StatsFsBase<number> {}
+ /**
+ * Provides information about a mounted file system.
+ *
+ * Objects returned from {@link statfs} and its synchronous counterpart are of
+ * this type. If `bigint` in the `options` passed to those methods is `true`, the
+ * numeric values will be `bigint` instead of `number`.
+ *
+ * ```console
+ * StatFs {
+ * type: 1397114950,
+ * bsize: 4096,
+ * blocks: 121938943,
+ * bfree: 61058895,
+ * bavail: 61058895,
+ * files: 999,
+ * ffree: 1000000
+ * }
+ * ```
+ *
+ * `bigint` version:
+ *
+ * ```console
+ * StatFs {
+ * type: 1397114950n,
+ * bsize: 4096n,
+ * blocks: 121938943n,
+ * bfree: 61058895n,
+ * bavail: 61058895n,
+ * files: 999n,
+ * ffree: 1000000n
+ * }
+ * ```
+ * @since v19.6.0, v18.15.0
+ */
+ export class StatsFs {}
+ export interface BigIntStatsFs extends StatsFsBase<bigint> {}
+ export interface StatFsOptions {
+ bigint?: boolean | undefined;
+ }
+ /**
+ * A representation of a directory entry, which can be a file or a subdirectory
+ * within the directory, as returned by reading from an `fs.Dir`. The
+ * directory entry is a combination of the file name and file type pairs.
+ *
+ * Additionally, when {@link readdir} or {@link readdirSync} is called with
+ * the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s.
+ * @since v10.10.0
+ */
+ export class Dirent {
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a regular file.
+ * @since v10.10.0
+ */
+ isFile(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a file system
+ * directory.
+ * @since v10.10.0
+ */
+ isDirectory(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a block device.
+ * @since v10.10.0
+ */
+ isBlockDevice(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a character device.
+ * @since v10.10.0
+ */
+ isCharacterDevice(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a symbolic link.
+ * @since v10.10.0
+ */
+ isSymbolicLink(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a first-in-first-out
+ * (FIFO) pipe.
+ * @since v10.10.0
+ */
+ isFIFO(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a socket.
+ * @since v10.10.0
+ */
+ isSocket(): boolean;
+ /**
+ * The file name that this `fs.Dirent` object refers to. The type of this
+ * value is determined by the `options.encoding` passed to {@link readdir} or {@link readdirSync}.
+ * @since v10.10.0
+ */
+ name: string;
+ /**
+ * The base path that this `fs.Dirent` object refers to.
+ * @since v20.1.0
+ */
+ path: string;
+ }
+ /**
+ * A class representing a directory stream.
+ *
+ * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`.
+ *
+ * ```js
+ * import { opendir } from 'node:fs/promises';
+ *
+ * try {
+ * const dir = await opendir('./');
+ * for await (const dirent of dir)
+ * console.log(dirent.name);
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * ```
+ *
+ * When using the async iterator, the `fs.Dir` object will be automatically
+ * closed after the iterator exits.
+ * @since v12.12.0
+ */
+ export class Dir implements AsyncIterable<Dirent> {
+ /**
+ * The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`.
+ * @since v12.12.0
+ */
+ readonly path: string;
+ /**
+ * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read.
+ */
+ [Symbol.asyncIterator](): AsyncIterableIterator<Dirent>;
+ /**
+ * Asynchronously close the directory's underlying resource handle.
+ * Subsequent reads will result in errors.
+ *
+ * A promise is returned that will be resolved after the resource has been
+ * closed.
+ * @since v12.12.0
+ */
+ close(): Promise<void>;
+ close(cb: NoParamCallback): void;
+ /**
+ * Synchronously close the directory's underlying resource handle.
+ * Subsequent reads will result in errors.
+ * @since v12.12.0
+ */
+ closeSync(): void;
+ /**
+ * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`.
+ *
+ * A promise is returned that will be resolved with an `fs.Dirent`, or `null`if there are no more directory entries to read.
+ *
+ * Directory entries returned by this function are in no particular order as
+ * provided by the operating system's underlying directory mechanisms.
+ * Entries added or removed while iterating over the directory might not be
+ * included in the iteration results.
+ * @since v12.12.0
+ * @return containing {fs.Dirent|null}
+ */
+ read(): Promise<Dirent | null>;
+ read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void;
+ /**
+ * Synchronously read the next directory entry as an `fs.Dirent`. See the
+ * POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail.
+ *
+ * If there are no more directory entries to read, `null` will be returned.
+ *
+ * Directory entries returned by this function are in no particular order as
+ * provided by the operating system's underlying directory mechanisms.
+ * Entries added or removed while iterating over the directory might not be
+ * included in the iteration results.
+ * @since v12.12.0
+ */
+ readSync(): Dirent | null;
+ }
+ /**
+ * Class: fs.StatWatcher
+ * @since v14.3.0, v12.20.0
+ * Extends `EventEmitter`
+ * A successful call to {@link watchFile} method will return a new fs.StatWatcher object.
+ */
+ export interface StatWatcher extends EventEmitter {
+ /**
+ * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have
+ * no effect.
+ *
+ * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally
+ * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been
+ * called previously.
+ * @since v14.3.0, v12.20.0
+ */
+ ref(): this;
+ /**
+ * When called, the active `fs.StatWatcher` object will not require the Node.js
+ * event loop to remain active. If there is no other activity keeping the
+ * event loop running, the process may exit before the `fs.StatWatcher` object's
+ * callback is invoked. Calling `watcher.unref()` multiple times will have
+ * no effect.
+ * @since v14.3.0, v12.20.0
+ */
+ unref(): this;
+ }
+ export interface FSWatcher extends EventEmitter {
+ /**
+ * Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable.
+ * @since v0.5.8
+ */
+ close(): void;
+ /**
+ * events.EventEmitter
+ * 1. change
+ * 2. error
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ addListener(event: 'error', listener: (error: Error) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ on(event: 'error', listener: (error: Error) => void): this;
+ on(event: 'close', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ once(event: 'error', listener: (error: Error) => void): this;
+ once(event: 'close', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ prependListener(event: 'error', listener: (error: Error) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ prependOnceListener(event: 'error', listener: (error: Error) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ }
+ /**
+ * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function.
+ * @since v0.1.93
+ */
+ export class ReadStream extends stream.Readable {
+ close(callback?: (err?: NodeJS.ErrnoException | null) => void): void;
+ /**
+ * The number of bytes that have been read so far.
+ * @since v6.4.0
+ */
+ bytesRead: number;
+ /**
+ * The path to the file the stream is reading from as specified in the first
+ * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a
+ * `Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`.
+ * @since v0.1.93
+ */
+ path: string | Buffer;
+ /**
+ * This property is `true` if the underlying file has not been opened yet,
+ * i.e. before the `'ready'` event is emitted.
+ * @since v11.2.0, v10.16.0
+ */
+ pending: boolean;
+ /**
+ * events.EventEmitter
+ * 1. open
+ * 2. close
+ * 3. ready
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'open', listener: (fd: number) => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'readable', listener: () => void): this;
+ addListener(event: 'ready', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'open', listener: (fd: number) => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'readable', listener: () => void): this;
+ on(event: 'ready', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'open', listener: (fd: number) => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'readable', listener: () => void): this;
+ once(event: 'ready', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'open', listener: (fd: number) => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'readable', listener: () => void): this;
+ prependListener(event: 'ready', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'open', listener: (fd: number) => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'readable', listener: () => void): this;
+ prependOnceListener(event: 'ready', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * * Extends `stream.Writable`
+ *
+ * Instances of `fs.WriteStream` are created and returned using the {@link createWriteStream} function.
+ * @since v0.1.93
+ */
+ export class WriteStream extends stream.Writable {
+ /**
+ * Closes `writeStream`. Optionally accepts a
+ * callback that will be executed once the `writeStream`is closed.
+ * @since v0.9.4
+ */
+ close(callback?: (err?: NodeJS.ErrnoException | null) => void): void;
+ /**
+ * The number of bytes written so far. Does not include data that is still queued
+ * for writing.
+ * @since v0.4.7
+ */
+ bytesWritten: number;
+ /**
+ * The path to the file the stream is writing to as specified in the first
+ * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then`writeStream.path` will be a
+ * `Buffer`.
+ * @since v0.1.93
+ */
+ path: string | Buffer;
+ /**
+ * This property is `true` if the underlying file has not been opened yet,
+ * i.e. before the `'ready'` event is emitted.
+ * @since v11.2.0
+ */
+ pending: boolean;
+ /**
+ * events.EventEmitter
+ * 1. open
+ * 2. close
+ * 3. ready
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'open', listener: (fd: number) => void): this;
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'ready', listener: () => void): this;
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'open', listener: (fd: number) => void): this;
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'ready', listener: () => void): this;
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'open', listener: (fd: number) => void): this;
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'ready', listener: () => void): this;
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'open', listener: (fd: number) => void): this;
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'ready', listener: () => void): this;
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'open', listener: (fd: number) => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'ready', listener: () => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * Asynchronously rename file at `oldPath` to the pathname provided
+ * as `newPath`. In the case that `newPath` already exists, it will
+ * be overwritten. If there is a directory at `newPath`, an error will
+ * be raised instead. No arguments other than a possible exception are
+ * given to the completion callback.
+ *
+ * See also: [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html).
+ *
+ * ```js
+ * import { rename } from 'node:fs';
+ *
+ * rename('oldFile.txt', 'newFile.txt', (err) => {
+ * if (err) throw err;
+ * console.log('Rename complete!');
+ * });
+ * ```
+ * @since v0.0.2
+ */
+ export function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
+ export namespace rename {
+ /**
+ * Asynchronous rename(2) - Change the name or location of a file or directory.
+ * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(oldPath: PathLike, newPath: PathLike): Promise<void>;
+ }
+ /**
+ * Renames the file from `oldPath` to `newPath`. Returns `undefined`.
+ *
+ * See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details.
+ * @since v0.1.21
+ */
+ export function renameSync(oldPath: PathLike, newPath: PathLike): void;
+ /**
+ * Truncates the file. No arguments other than a possible exception are
+ * given to the completion callback. A file descriptor can also be passed as the
+ * first argument. In this case, `fs.ftruncate()` is called.
+ *
+ * ```js
+ * import { truncate } from 'node:fs';
+ * // Assuming that 'path/file.txt' is a regular file.
+ * truncate('path/file.txt', (err) => {
+ * if (err) throw err;
+ * console.log('path/file.txt was truncated');
+ * });
+ * ```
+ *
+ * Passing a file descriptor is deprecated and may result in an error being thrown
+ * in the future.
+ *
+ * See the POSIX [`truncate(2)`](http://man7.org/linux/man-pages/man2/truncate.2.html) documentation for more details.
+ * @since v0.8.6
+ * @param [len=0]
+ */
+ export function truncate(path: PathLike, len: number | undefined | null, callback: NoParamCallback): void;
+ /**
+ * Asynchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function truncate(path: PathLike, callback: NoParamCallback): void;
+ export namespace truncate {
+ /**
+ * Asynchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param len If not specified, defaults to `0`.
+ */
+ function __promisify__(path: PathLike, len?: number | null): Promise<void>;
+ }
+ /**
+ * Truncates the file. Returns `undefined`. A file descriptor can also be
+ * passed as the first argument. In this case, `fs.ftruncateSync()` is called.
+ *
+ * Passing a file descriptor is deprecated and may result in an error being thrown
+ * in the future.
+ * @since v0.8.6
+ * @param [len=0]
+ */
+ export function truncateSync(path: PathLike, len?: number | null): void;
+ /**
+ * Truncates the file descriptor. No arguments other than a possible exception are
+ * given to the completion callback.
+ *
+ * See the POSIX [`ftruncate(2)`](http://man7.org/linux/man-pages/man2/ftruncate.2.html) documentation for more detail.
+ *
+ * If the file referred to by the file descriptor was larger than `len` bytes, only
+ * the first `len` bytes will be retained in the file.
+ *
+ * For example, the following program retains only the first four bytes of the
+ * file:
+ *
+ * ```js
+ * import { open, close, ftruncate } from 'node:fs';
+ *
+ * function closeFd(fd) {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ *
+ * open('temp.txt', 'r+', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * ftruncate(fd, 4, (err) => {
+ * closeFd(fd);
+ * if (err) throw err;
+ * });
+ * } catch (err) {
+ * closeFd(fd);
+ * if (err) throw err;
+ * }
+ * });
+ * ```
+ *
+ * If the file previously was shorter than `len` bytes, it is extended, and the
+ * extended part is filled with null bytes (`'\0'`):
+ *
+ * If `len` is negative then `0` will be used.
+ * @since v0.8.6
+ * @param [len=0]
+ */
+ export function ftruncate(fd: number, len: number | undefined | null, callback: NoParamCallback): void;
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param fd A file descriptor.
+ */
+ export function ftruncate(fd: number, callback: NoParamCallback): void;
+ export namespace ftruncate {
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param fd A file descriptor.
+ * @param len If not specified, defaults to `0`.
+ */
+ function __promisify__(fd: number, len?: number | null): Promise<void>;
+ }
+ /**
+ * Truncates the file descriptor. Returns `undefined`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link ftruncate}.
+ * @since v0.8.6
+ * @param [len=0]
+ */
+ export function ftruncateSync(fd: number, len?: number | null): void;
+ /**
+ * Asynchronously changes owner and group of a file. No arguments other than a
+ * possible exception are given to the completion callback.
+ *
+ * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail.
+ * @since v0.1.97
+ */
+ export function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
+ export namespace chown {
+ /**
+ * Asynchronous chown(2) - Change ownership of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
+ }
+ /**
+ * Synchronously changes owner and group of a file. Returns `undefined`.
+ * This is the synchronous version of {@link chown}.
+ *
+ * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail.
+ * @since v0.1.97
+ */
+ export function chownSync(path: PathLike, uid: number, gid: number): void;
+ /**
+ * Sets the owner of the file. No arguments other than a possible exception are
+ * given to the completion callback.
+ *
+ * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail.
+ * @since v0.4.7
+ */
+ export function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void;
+ export namespace fchown {
+ /**
+ * Asynchronous fchown(2) - Change ownership of a file.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number, uid: number, gid: number): Promise<void>;
+ }
+ /**
+ * Sets the owner of the file. Returns `undefined`.
+ *
+ * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail.
+ * @since v0.4.7
+ * @param uid The file's new owner's user id.
+ * @param gid The file's new group's group id.
+ */
+ export function fchownSync(fd: number, uid: number, gid: number): void;
+ /**
+ * Set the owner of the symbolic link. No arguments other than a possible
+ * exception are given to the completion callback.
+ *
+ * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more detail.
+ */
+ export function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
+ export namespace lchown {
+ /**
+ * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
+ }
+ /**
+ * Set the owner for the path. Returns `undefined`.
+ *
+ * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more details.
+ * @param uid The file's new owner's user id.
+ * @param gid The file's new group's group id.
+ */
+ export function lchownSync(path: PathLike, uid: number, gid: number): void;
+ /**
+ * Changes the access and modification times of a file in the same way as {@link utimes}, with the difference that if the path refers to a symbolic
+ * link, then the link is not dereferenced: instead, the timestamps of the
+ * symbolic link itself are changed.
+ *
+ * No arguments other than a possible exception are given to the completion
+ * callback.
+ * @since v14.5.0, v12.19.0
+ */
+ export function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
+ export namespace lutimes {
+ /**
+ * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
+ * with the difference that if the path refers to a symbolic link, then the link is not
+ * dereferenced: instead, the timestamps of the symbolic link itself are changed.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ }
+ /**
+ * Change the file system timestamps of the symbolic link referenced by `path`.
+ * Returns `undefined`, or throws an exception when parameters are incorrect or
+ * the operation fails. This is the synchronous version of {@link lutimes}.
+ * @since v14.5.0, v12.19.0
+ */
+ export function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void;
+ /**
+ * Asynchronously changes the permissions of a file. No arguments other than a
+ * possible exception are given to the completion callback.
+ *
+ * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail.
+ *
+ * ```js
+ * import { chmod } from 'node:fs';
+ *
+ * chmod('my_file.txt', 0o775, (err) => {
+ * if (err) throw err;
+ * console.log('The permissions for file "my_file.txt" have been changed!');
+ * });
+ * ```
+ * @since v0.1.30
+ */
+ export function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
+ export namespace chmod {
+ /**
+ * Asynchronous chmod(2) - Change permissions of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(path: PathLike, mode: Mode): Promise<void>;
+ }
+ /**
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link chmod}.
+ *
+ * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail.
+ * @since v0.6.7
+ */
+ export function chmodSync(path: PathLike, mode: Mode): void;
+ /**
+ * Sets the permissions on the file. No arguments other than a possible exception
+ * are given to the completion callback.
+ *
+ * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail.
+ * @since v0.4.7
+ */
+ export function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void;
+ export namespace fchmod {
+ /**
+ * Asynchronous fchmod(2) - Change permissions of a file.
+ * @param fd A file descriptor.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(fd: number, mode: Mode): Promise<void>;
+ }
+ /**
+ * Sets the permissions on the file. Returns `undefined`.
+ *
+ * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail.
+ * @since v0.4.7
+ */
+ export function fchmodSync(fd: number, mode: Mode): void;
+ /**
+ * Changes the permissions on a symbolic link. No arguments other than a possible
+ * exception are given to the completion callback.
+ *
+ * This method is only implemented on macOS.
+ *
+ * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail.
+ * @deprecated Since v0.4.7
+ */
+ export function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
+ /** @deprecated */
+ export namespace lchmod {
+ /**
+ * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(path: PathLike, mode: Mode): Promise<void>;
+ }
+ /**
+ * Changes the permissions on a symbolic link. Returns `undefined`.
+ *
+ * This method is only implemented on macOS.
+ *
+ * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail.
+ * @deprecated Since v0.4.7
+ */
+ export function lchmodSync(path: PathLike, mode: Mode): void;
+ /**
+ * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `fs.Stats` object.
+ *
+ * In case of an error, the `err.code` will be one of `Common System Errors`.
+ *
+ * {@link stat} follows symbolic links. Use {@link lstat} to look at the
+ * links themselves.
+ *
+ * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended.
+ * Instead, user code should open/read/write the file directly and handle the
+ * error raised if the file is not available.
+ *
+ * To check if a file exists without manipulating it afterwards, {@link access} is recommended.
+ *
+ * For example, given the following directory structure:
+ *
+ * ```text
+ * - txtDir
+ * -- file.txt
+ * - app.js
+ * ```
+ *
+ * The next program will check for the stats of the given paths:
+ *
+ * ```js
+ * import { stat } from 'node:fs';
+ *
+ * const pathsToCheck = ['./txtDir', './txtDir/file.txt'];
+ *
+ * for (let i = 0; i < pathsToCheck.length; i++) {
+ * stat(pathsToCheck[i], (err, stats) => {
+ * console.log(stats.isDirectory());
+ * console.log(stats);
+ * });
+ * }
+ * ```
+ *
+ * The resulting output will resemble:
+ *
+ * ```console
+ * true
+ * Stats {
+ * dev: 16777220,
+ * mode: 16877,
+ * nlink: 3,
+ * uid: 501,
+ * gid: 20,
+ * rdev: 0,
+ * blksize: 4096,
+ * ino: 14214262,
+ * size: 96,
+ * blocks: 0,
+ * atimeMs: 1561174653071.963,
+ * mtimeMs: 1561174614583.3518,
+ * ctimeMs: 1561174626623.5366,
+ * birthtimeMs: 1561174126937.2893,
+ * atime: 2019-06-22T03:37:33.072Z,
+ * mtime: 2019-06-22T03:36:54.583Z,
+ * ctime: 2019-06-22T03:37:06.624Z,
+ * birthtime: 2019-06-22T03:28:46.937Z
+ * }
+ * false
+ * Stats {
+ * dev: 16777220,
+ * mode: 33188,
+ * nlink: 1,
+ * uid: 501,
+ * gid: 20,
+ * rdev: 0,
+ * blksize: 4096,
+ * ino: 14214074,
+ * size: 8,
+ * blocks: 8,
+ * atimeMs: 1561174616618.8555,
+ * mtimeMs: 1561174614584,
+ * ctimeMs: 1561174614583.8145,
+ * birthtimeMs: 1561174007710.7478,
+ * atime: 2019-06-22T03:36:56.619Z,
+ * mtime: 2019-06-22T03:36:54.584Z,
+ * ctime: 2019-06-22T03:36:54.584Z,
+ * birthtime: 2019-06-22T03:26:47.711Z
+ * }
+ * ```
+ * @since v0.0.2
+ */
+ export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function stat(
+ path: PathLike,
+ options:
+ | (StatOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void
+ ): void;
+ export function stat(
+ path: PathLike,
+ options: StatOptions & {
+ bigint: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void
+ ): void;
+ export function stat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
+ export namespace stat {
+ /**
+ * Asynchronous stat(2) - Get file status.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function __promisify__(
+ path: PathLike,
+ options: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
+ }
+ export interface StatSyncFn extends Function {
+ (path: PathLike, options?: undefined): Stats;
+ (
+ path: PathLike,
+ options?: StatSyncOptions & {
+ bigint?: false | undefined;
+ throwIfNoEntry: false;
+ }
+ ): Stats | undefined;
+ (
+ path: PathLike,
+ options: StatSyncOptions & {
+ bigint: true;
+ throwIfNoEntry: false;
+ }
+ ): BigIntStats | undefined;
+ (
+ path: PathLike,
+ options?: StatSyncOptions & {
+ bigint?: false | undefined;
+ }
+ ): Stats;
+ (
+ path: PathLike,
+ options: StatSyncOptions & {
+ bigint: true;
+ }
+ ): BigIntStats;
+ (
+ path: PathLike,
+ options: StatSyncOptions & {
+ bigint: boolean;
+ throwIfNoEntry?: false | undefined;
+ }
+ ): Stats | BigIntStats;
+ (path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined;
+ }
+ /**
+ * Synchronous stat(2) - Get file status.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export const statSync: StatSyncFn;
+ /**
+ * Invokes the callback with the `fs.Stats` for the file descriptor.
+ *
+ * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail.
+ * @since v0.1.95
+ */
+ export function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function fstat(
+ fd: number,
+ options:
+ | (StatOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void
+ ): void;
+ export function fstat(
+ fd: number,
+ options: StatOptions & {
+ bigint: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void
+ ): void;
+ export function fstat(fd: number, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
+ export namespace fstat {
+ /**
+ * Asynchronous fstat(2) - Get file status.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(
+ fd: number,
+ options?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function __promisify__(
+ fd: number,
+ options: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function __promisify__(fd: number, options?: StatOptions): Promise<Stats | BigIntStats>;
+ }
+ /**
+ * Retrieves the `fs.Stats` for the file descriptor.
+ *
+ * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail.
+ * @since v0.1.95
+ */
+ export function fstatSync(
+ fd: number,
+ options?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Stats;
+ export function fstatSync(
+ fd: number,
+ options: StatOptions & {
+ bigint: true;
+ }
+ ): BigIntStats;
+ export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
+ /**
+ * Retrieves the `fs.Stats` for the symbolic link referred to by the path.
+ * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic
+ * link, then the link itself is stat-ed, not the file that it refers to.
+ *
+ * See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details.
+ * @since v0.1.30
+ */
+ export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function lstat(
+ path: PathLike,
+ options:
+ | (StatOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void
+ ): void;
+ export function lstat(
+ path: PathLike,
+ options: StatOptions & {
+ bigint: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void
+ ): void;
+ export function lstat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
+ export namespace lstat {
+ /**
+ * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function __promisify__(
+ path: PathLike,
+ options: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
+ }
+ /**
+ * Asynchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which
+ * contains `path`. The callback gets two arguments `(err, stats)` where `stats`is an `fs.StatFs` object.
+ *
+ * In case of an error, the `err.code` will be one of `Common System Errors`.
+ * @since v19.6.0, v18.15.0
+ * @param path A path to an existing file or directory on the file system to be queried.
+ */
+ export function statfs(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void): void;
+ export function statfs(
+ path: PathLike,
+ options:
+ | (StatFsOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void
+ ): void;
+ export function statfs(
+ path: PathLike,
+ options: StatFsOptions & {
+ bigint: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, stats: BigIntStatsFs) => void
+ ): void;
+ export function statfs(path: PathLike, options: StatFsOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs | BigIntStatsFs) => void): void;
+ export namespace statfs {
+ /**
+ * Asynchronous statfs(2) - Returns information about the mounted file system which contains path. The callback gets two arguments (err, stats) where stats is an <fs.StatFs> object.
+ * @param path A path to an existing file or directory on the file system to be queried.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?: StatFsOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<StatsFs>;
+ function __promisify__(
+ path: PathLike,
+ options: StatFsOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStatsFs>;
+ function __promisify__(path: PathLike, options?: StatFsOptions): Promise<StatsFs | BigIntStatsFs>;
+ }
+ /**
+ * Synchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which
+ * contains `path`.
+ *
+ * In case of an error, the `err.code` will be one of `Common System Errors`.
+ * @since v19.6.0, v18.15.0
+ * @param path A path to an existing file or directory on the file system to be queried.
+ */
+ export function statfsSync(
+ path: PathLike,
+ options?: StatFsOptions & {
+ bigint?: false | undefined;
+ }
+ ): StatsFs;
+ export function statfsSync(
+ path: PathLike,
+ options: StatFsOptions & {
+ bigint: true;
+ }
+ ): BigIntStatsFs;
+ export function statfsSync(path: PathLike, options?: StatFsOptions): StatsFs | BigIntStatsFs;
+ /**
+ * Synchronous lstat(2) - Get file status. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export const lstatSync: StatSyncFn;
+ /**
+ * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than
+ * a possible
+ * exception are given to the completion callback.
+ * @since v0.1.31
+ */
+ export function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
+ export namespace link {
+ /**
+ * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
+ * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(existingPath: PathLike, newPath: PathLike): Promise<void>;
+ }
+ /**
+ * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`.
+ * @since v0.1.31
+ */
+ export function linkSync(existingPath: PathLike, newPath: PathLike): void;
+ /**
+ * Creates the link called `path` pointing to `target`. No arguments other than a
+ * possible exception are given to the completion callback.
+ *
+ * See the POSIX [`symlink(2)`](http://man7.org/linux/man-pages/man2/symlink.2.html) documentation for more details.
+ *
+ * The `type` argument is only available on Windows and ignored on other platforms.
+ * It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is
+ * not a string, Node.js will autodetect `target` type and use `'file'` or `'dir'`.
+ * If the `target` does not exist, `'file'` will be used. Windows junction points
+ * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path. Junction
+ * points on NTFS volumes can only point to directories.
+ *
+ * Relative targets are relative to the link's parent directory.
+ *
+ * ```js
+ * import { symlink } from 'node:fs';
+ *
+ * symlink('./mew', './mewtwo', callback);
+ * ```
+ *
+ * The above example creates a symbolic link `mewtwo` which points to `mew` in the
+ * same directory:
+ *
+ * ```bash
+ * $ tree .
+ * .
+ * ├── mew
+ * └── mewtwo -> ./mew
+ * ```
+ * @since v0.1.31
+ * @param [type='null']
+ */
+ export function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: NoParamCallback): void;
+ /**
+ * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void;
+ export namespace symlink {
+ /**
+ * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
+ * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
+ */
+ function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
+ type Type = 'dir' | 'file' | 'junction';
+ }
+ /**
+ * Returns `undefined`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link symlink}.
+ * @since v0.1.31
+ * @param [type='null']
+ */
+ export function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void;
+ /**
+ * Reads the contents of the symbolic link referred to by `path`. The callback gets
+ * two arguments `(err, linkString)`.
+ *
+ * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the link path passed to the callback. If the `encoding` is set to `'buffer'`,
+ * the link path returned will be passed as a `Buffer` object.
+ * @since v0.1.31
+ */
+ export function readlink(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlink(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void): void;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlink(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
+ export namespace readlink {
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string>;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string | Buffer>;
+ }
+ /**
+ * Returns the symbolic link's string value.
+ *
+ * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the link path returned. If the `encoding` is set to `'buffer'`,
+ * the link path returned will be passed as a `Buffer` object.
+ * @since v0.1.31
+ */
+ export function readlinkSync(path: PathLike, options?: EncodingOption): string;
+ /**
+ * Synchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlinkSync(path: PathLike, options: BufferEncodingOption): Buffer;
+ /**
+ * Synchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlinkSync(path: PathLike, options?: EncodingOption): string | Buffer;
+ /**
+ * Asynchronously computes the canonical pathname by resolving `.`, `..`, and
+ * symbolic links.
+ *
+ * A canonical pathname is not necessarily unique. Hard links and bind mounts can
+ * expose a file system entity through many pathnames.
+ *
+ * This function behaves like [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html), with some exceptions:
+ *
+ * 1. No case conversion is performed on case-insensitive file systems.
+ * 2. The maximum number of symbolic links is platform-independent and generally
+ * (much) higher than what the native [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html) implementation supports.
+ *
+ * The `callback` gets two arguments `(err, resolvedPath)`. May use `process.cwd`to resolve relative paths.
+ *
+ * Only paths that can be converted to UTF8 strings are supported.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the path passed to the callback. If the `encoding` is set to `'buffer'`,
+ * the path returned will be passed as a `Buffer` object.
+ *
+ * If `path` resolves to a socket or a pipe, the function will return a system
+ * dependent name for that object.
+ * @since v0.1.31
+ */
+ export function realpath(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpath(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpath(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ export namespace realpath {
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string>;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string | Buffer>;
+ /**
+ * Asynchronous [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html).
+ *
+ * The `callback` gets two arguments `(err, resolvedPath)`.
+ *
+ * Only paths that can be converted to UTF8 strings are supported.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the path passed to the callback. If the `encoding` is set to `'buffer'`,
+ * the path returned will be passed as a `Buffer` object.
+ *
+ * On Linux, when Node.js is linked against musl libc, the procfs file system must
+ * be mounted on `/proc` in order for this function to work. Glibc does not have
+ * this restriction.
+ * @since v9.2.0
+ */
+ function native(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ function native(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
+ function native(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
+ function native(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ }
+ /**
+ * Returns the resolved pathname.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link realpath}.
+ * @since v0.1.31
+ */
+ export function realpathSync(path: PathLike, options?: EncodingOption): string;
+ /**
+ * Synchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpathSync(path: PathLike, options: BufferEncodingOption): Buffer;
+ /**
+ * Synchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpathSync(path: PathLike, options?: EncodingOption): string | Buffer;
+ export namespace realpathSync {
+ function native(path: PathLike, options?: EncodingOption): string;
+ function native(path: PathLike, options: BufferEncodingOption): Buffer;
+ function native(path: PathLike, options?: EncodingOption): string | Buffer;
+ }
+ /**
+ * Asynchronously removes a file or symbolic link. No arguments other than a
+ * possible exception are given to the completion callback.
+ *
+ * ```js
+ * import { unlink } from 'node:fs';
+ * // Assuming that 'path/file.txt' is a regular file.
+ * unlink('path/file.txt', (err) => {
+ * if (err) throw err;
+ * console.log('path/file.txt was deleted');
+ * });
+ * ```
+ *
+ * `fs.unlink()` will not work on a directory, empty or otherwise. To remove a
+ * directory, use {@link rmdir}.
+ *
+ * See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more details.
+ * @since v0.0.2
+ */
+ export function unlink(path: PathLike, callback: NoParamCallback): void;
+ export namespace unlink {
+ /**
+ * Asynchronous unlink(2) - delete a name and possibly the file it refers to.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike): Promise<void>;
+ }
+ /**
+ * Synchronous [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html). Returns `undefined`.
+ * @since v0.1.21
+ */
+ export function unlinkSync(path: PathLike): void;
+ export interface RmDirOptions {
+ /**
+ * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
+ * `EPERM` error is encountered, Node.js will retry the operation with a linear
+ * backoff wait of `retryDelay` ms longer on each try. This option represents the
+ * number of retries. This option is ignored if the `recursive` option is not
+ * `true`.
+ * @default 0
+ */
+ maxRetries?: number | undefined;
+ /**
+ * @deprecated since v14.14.0 In future versions of Node.js and will trigger a warning
+ * `fs.rmdir(path, { recursive: true })` will throw if `path` does not exist or is a file.
+ * Use `fs.rm(path, { recursive: true, force: true })` instead.
+ *
+ * If `true`, perform a recursive directory removal. In
+ * recursive mode, operations are retried on failure.
+ * @default false
+ */
+ recursive?: boolean | undefined;
+ /**
+ * The amount of time in milliseconds to wait between retries.
+ * This option is ignored if the `recursive` option is not `true`.
+ * @default 100
+ */
+ retryDelay?: number | undefined;
+ }
+ /**
+ * Asynchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). No arguments other than a possible exception are given
+ * to the completion callback.
+ *
+ * Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on
+ * Windows and an `ENOTDIR` error on POSIX.
+ *
+ * To get a behavior similar to the `rm -rf` Unix command, use {@link rm} with options `{ recursive: true, force: true }`.
+ * @since v0.0.2
+ */
+ export function rmdir(path: PathLike, callback: NoParamCallback): void;
+ export function rmdir(path: PathLike, options: RmDirOptions, callback: NoParamCallback): void;
+ export namespace rmdir {
+ /**
+ * Asynchronous rmdir(2) - delete a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, options?: RmDirOptions): Promise<void>;
+ }
+ /**
+ * Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`.
+ *
+ * Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error
+ * on Windows and an `ENOTDIR` error on POSIX.
+ *
+ * To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`.
+ * @since v0.1.21
+ */
+ export function rmdirSync(path: PathLike, options?: RmDirOptions): void;
+ export interface RmOptions {
+ /**
+ * When `true`, exceptions will be ignored if `path` does not exist.
+ * @default false
+ */
+ force?: boolean | undefined;
+ /**
+ * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
+ * `EPERM` error is encountered, Node.js will retry the operation with a linear
+ * backoff wait of `retryDelay` ms longer on each try. This option represents the
+ * number of retries. This option is ignored if the `recursive` option is not
+ * `true`.
+ * @default 0
+ */
+ maxRetries?: number | undefined;
+ /**
+ * If `true`, perform a recursive directory removal. In
+ * recursive mode, operations are retried on failure.
+ * @default false
+ */
+ recursive?: boolean | undefined;
+ /**
+ * The amount of time in milliseconds to wait between retries.
+ * This option is ignored if the `recursive` option is not `true`.
+ * @default 100
+ */
+ retryDelay?: number | undefined;
+ }
+ /**
+ * Asynchronously removes files and directories (modeled on the standard POSIX `rm`utility). No arguments other than a possible exception are given to the
+ * completion callback.
+ * @since v14.14.0
+ */
+ export function rm(path: PathLike, callback: NoParamCallback): void;
+ export function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void;
+ export namespace rm {
+ /**
+ * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
+ */
+ function __promisify__(path: PathLike, options?: RmOptions): Promise<void>;
+ }
+ /**
+ * Synchronously removes files and directories (modeled on the standard POSIX `rm`utility). Returns `undefined`.
+ * @since v14.14.0
+ */
+ export function rmSync(path: PathLike, options?: RmOptions): void;
+ export interface MakeDirectoryOptions {
+ /**
+ * Indicates whether parent folders should be created.
+ * If a folder was created, the path to the first created folder will be returned.
+ * @default false
+ */
+ recursive?: boolean | undefined;
+ /**
+ * A file mode. If a string is passed, it is parsed as an octal integer. If not specified
+ * @default 0o777
+ */
+ mode?: Mode | undefined;
+ }
+ /**
+ * Asynchronously creates a directory.
+ *
+ * The callback is given a possible exception and, if `recursive` is `true`, the
+ * first directory path created, `(err[, path])`.`path` can still be `undefined` when `recursive` is `true`, if no directory was
+ * created (for instance, if it was previously created).
+ *
+ * The optional `options` argument can be an integer specifying `mode` (permission
+ * and sticky bits), or an object with a `mode` property and a `recursive`property indicating whether parent directories should be created. Calling`fs.mkdir()` when `path` is a directory that
+ * exists results in an error only
+ * when `recursive` is false. If `recursive` is false and the directory exists,
+ * an `EEXIST` error occurs.
+ *
+ * ```js
+ * import { mkdir } from 'node:fs';
+ *
+ * // Create ./tmp/a/apple, regardless of whether ./tmp and ./tmp/a exist.
+ * mkdir('./tmp/a/apple', { recursive: true }, (err) => {
+ * if (err) throw err;
+ * });
+ * ```
+ *
+ * On Windows, using `fs.mkdir()` on the root directory even with recursion will
+ * result in an error:
+ *
+ * ```js
+ * import { mkdir } from 'node:fs';
+ *
+ * mkdir('/', { recursive: true }, (err) => {
+ * // => [Error: EPERM: operation not permitted, mkdir 'C:\']
+ * });
+ * ```
+ *
+ * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details.
+ * @since v0.1.8
+ */
+ export function mkdir(
+ path: PathLike,
+ options: MakeDirectoryOptions & {
+ recursive: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, path?: string) => void
+ ): void;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdir(
+ path: PathLike,
+ options:
+ | Mode
+ | (MakeDirectoryOptions & {
+ recursive?: false | undefined;
+ })
+ | null
+ | undefined,
+ callback: NoParamCallback
+ ): void;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdir(path: PathLike, options: Mode | MakeDirectoryOptions | null | undefined, callback: (err: NodeJS.ErrnoException | null, path?: string) => void): void;
+ /**
+ * Asynchronous mkdir(2) - create a directory with a mode of `0o777`.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function mkdir(path: PathLike, callback: NoParamCallback): void;
+ export namespace mkdir {
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function __promisify__(
+ path: PathLike,
+ options: MakeDirectoryOptions & {
+ recursive: true;
+ }
+ ): Promise<string | undefined>;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?:
+ | Mode
+ | (MakeDirectoryOptions & {
+ recursive?: false | undefined;
+ })
+ | null
+ ): Promise<void>;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function __promisify__(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
+ }
+ /**
+ * Synchronously creates a directory. Returns `undefined`, or if `recursive` is`true`, the first directory path created.
+ * This is the synchronous version of {@link mkdir}.
+ *
+ * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details.
+ * @since v0.1.21
+ */
+ export function mkdirSync(
+ path: PathLike,
+ options: MakeDirectoryOptions & {
+ recursive: true;
+ }
+ ): string | undefined;
+ /**
+ * Synchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdirSync(
+ path: PathLike,
+ options?:
+ | Mode
+ | (MakeDirectoryOptions & {
+ recursive?: false | undefined;
+ })
+ | null
+ ): void;
+ /**
+ * Synchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined;
+ /**
+ * Creates a unique temporary directory.
+ *
+ * Generates six random characters to be appended behind a required`prefix` to create a unique temporary directory. Due to platform
+ * inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms,
+ * notably the BSDs, can return more than six random characters, and replace
+ * trailing `X` characters in `prefix` with random characters.
+ *
+ * The created directory path is passed as a string to the callback's second
+ * parameter.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use.
+ *
+ * ```js
+ * import { mkdtemp } from 'node:fs';
+ * import { join } from 'node:path';
+ * import { tmpdir } from 'node:os';
+ *
+ * mkdtemp(join(tmpdir(), 'foo-'), (err, directory) => {
+ * if (err) throw err;
+ * console.log(directory);
+ * // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2
+ * });
+ * ```
+ *
+ * The `fs.mkdtemp()` method will append the six randomly selected characters
+ * directly to the `prefix` string. For instance, given a directory `/tmp`, if the
+ * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator
+ * (`require('node:path').sep`).
+ *
+ * ```js
+ * import { tmpdir } from 'node:os';
+ * import { mkdtemp } from 'node:fs';
+ *
+ * // The parent directory for the new temporary directory
+ * const tmpDir = tmpdir();
+ *
+ * // This method is *INCORRECT*:
+ * mkdtemp(tmpDir, (err, directory) => {
+ * if (err) throw err;
+ * console.log(directory);
+ * // Will print something similar to `/tmpabc123`.
+ * // A new temporary directory is created at the file system root
+ * // rather than *within* the /tmp directory.
+ * });
+ *
+ * // This method is *CORRECT*:
+ * import { sep } from 'node:path';
+ * mkdtemp(`${tmpDir}${sep}`, (err, directory) => {
+ * if (err) throw err;
+ * console.log(directory);
+ * // Will print something similar to `/tmp/abc123`.
+ * // A new temporary directory is created within
+ * // the /tmp directory.
+ * });
+ * ```
+ * @since v5.10.0
+ */
+ export function mkdtemp(prefix: string, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtemp(
+ prefix: string,
+ options:
+ | 'buffer'
+ | {
+ encoding: 'buffer';
+ },
+ callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void
+ ): void;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtemp(prefix: string, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ */
+ export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
+ export namespace mkdtemp {
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options?: EncodingOption): Promise<string>;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options?: EncodingOption): Promise<string | Buffer>;
+ }
+ /**
+ * Returns the created directory path.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link mkdtemp}.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use.
+ * @since v5.10.0
+ */
+ export function mkdtempSync(prefix: string, options?: EncodingOption): string;
+ /**
+ * Synchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtempSync(prefix: string, options: BufferEncodingOption): Buffer;
+ /**
+ * Synchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtempSync(prefix: string, options?: EncodingOption): string | Buffer;
+ /**
+ * Reads the contents of a directory. The callback gets two arguments `(err, files)`where `files` is an array of the names of the files in the directory excluding`'.'` and `'..'`.
+ *
+ * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the filenames passed to the callback. If the `encoding` is set to `'buffer'`,
+ * the filenames returned will be passed as `Buffer` objects.
+ *
+ * If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects.
+ * @since v0.1.8
+ */
+ export function readdir(
+ path: PathLike,
+ options:
+ | {
+ encoding: BufferEncoding | null;
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ }
+ | BufferEncoding
+ | undefined
+ | null,
+ callback: (err: NodeJS.ErrnoException | null, files: string[]) => void
+ ): void;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdir(
+ path: PathLike,
+ options:
+ | {
+ encoding: 'buffer';
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ }
+ | 'buffer',
+ callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void
+ ): void;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdir(
+ path: PathLike,
+ options:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ })
+ | BufferEncoding
+ | undefined
+ | null,
+ callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void
+ ): void;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ export function readdir(
+ path: PathLike,
+ options: ObjectEncodingOptions & {
+ withFileTypes: true;
+ recursive?: boolean | undefined;
+ },
+ callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void
+ ): void;
+ export namespace readdir {
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?:
+ | {
+ encoding: BufferEncoding | null;
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ }
+ | BufferEncoding
+ | null
+ ): Promise<string[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(
+ path: PathLike,
+ options:
+ | 'buffer'
+ | {
+ encoding: 'buffer';
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ }
+ ): Promise<Buffer[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string[] | Buffer[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent
+ */
+ function __promisify__(
+ path: PathLike,
+ options: ObjectEncodingOptions & {
+ withFileTypes: true;
+ recursive?: boolean | undefined;
+ }
+ ): Promise<Dirent[]>;
+ }
+ /**
+ * Reads the contents of the directory.
+ *
+ * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the filenames returned. If the `encoding` is set to `'buffer'`,
+ * the filenames returned will be passed as `Buffer` objects.
+ *
+ * If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects.
+ * @since v0.1.21
+ */
+ export function readdirSync(
+ path: PathLike,
+ options?:
+ | {
+ encoding: BufferEncoding | null;
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ }
+ | BufferEncoding
+ | null
+ ): string[];
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdirSync(
+ path: PathLike,
+ options:
+ | {
+ encoding: 'buffer';
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ }
+ | 'buffer'
+ ): Buffer[];
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdirSync(
+ path: PathLike,
+ options?:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): string[] | Buffer[];
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ export function readdirSync(
+ path: PathLike,
+ options: ObjectEncodingOptions & {
+ withFileTypes: true;
+ recursive?: boolean | undefined;
+ }
+ ): Dirent[];
+ /**
+ * Closes the file descriptor. No arguments other than a possible exception are
+ * given to the completion callback.
+ *
+ * Calling `fs.close()` on any file descriptor (`fd`) that is currently in use
+ * through any other `fs` operation may lead to undefined behavior.
+ *
+ * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail.
+ * @since v0.0.2
+ */
+ export function close(fd: number, callback?: NoParamCallback): void;
+ export namespace close {
+ /**
+ * Asynchronous close(2) - close a file descriptor.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+ /**
+ * Closes the file descriptor. Returns `undefined`.
+ *
+ * Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use
+ * through any other `fs` operation may lead to undefined behavior.
+ *
+ * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail.
+ * @since v0.1.21
+ */
+ export function closeSync(fd: number): void;
+ /**
+ * Asynchronous file open. See the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more details.
+ *
+ * `mode` sets the file mode (permission and sticky bits), but only if the file was
+ * created. On Windows, only the write permission can be manipulated; see {@link chmod}.
+ *
+ * The callback gets two arguments `(err, fd)`.
+ *
+ * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented
+ * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains
+ * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams).
+ *
+ * Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc.
+ * @since v0.0.2
+ * @param [flags='r'] See `support of file system `flags``.
+ * @param [mode=0o666]
+ */
+ export function open(path: PathLike, flags: OpenMode | undefined, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+ /**
+ * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param [flags='r'] See `support of file system `flags``.
+ */
+ export function open(path: PathLike, flags: OpenMode | undefined, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+ /**
+ * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+ export namespace open {
+ /**
+ * Asynchronous open(2) - open and possibly create a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
+ */
+ function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise<number>;
+ }
+ /**
+ * Returns an integer representing the file descriptor.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link open}.
+ * @since v0.1.21
+ * @param [flags='r']
+ * @param [mode=0o666]
+ */
+ export function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number;
+ /**
+ * Change the file system timestamps of the object referenced by `path`.
+ *
+ * The `atime` and `mtime` arguments follow these rules:
+ *
+ * * Values can be either numbers representing Unix epoch time in seconds,`Date`s, or a numeric string like `'123456789.0'`.
+ * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or`-Infinity`, an `Error` will be thrown.
+ * @since v0.4.2
+ */
+ export function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
+ export namespace utimes {
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied path.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ }
+ /**
+ * Returns `undefined`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link utimes}.
+ * @since v0.4.2
+ */
+ export function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void;
+ /**
+ * Change the file system timestamps of the object referenced by the supplied file
+ * descriptor. See {@link utimes}.
+ * @since v0.4.2
+ */
+ export function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
+ export namespace futimes {
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function __promisify__(fd: number, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ }
+ /**
+ * Synchronous version of {@link futimes}. Returns `undefined`.
+ * @since v0.4.2
+ */
+ export function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void;
+ /**
+ * Request that all data for the open file descriptor is flushed to the storage
+ * device. The specific implementation is operating system and device specific.
+ * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. No arguments other
+ * than a possible exception are given to the completion callback.
+ * @since v0.1.96
+ */
+ export function fsync(fd: number, callback: NoParamCallback): void;
+ export namespace fsync {
+ /**
+ * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+ /**
+ * Request that all data for the open file descriptor is flushed to the storage
+ * device. The specific implementation is operating system and device specific.
+ * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. Returns `undefined`.
+ * @since v0.1.96
+ */
+ export function fsyncSync(fd: number): void;
+ /**
+ * Write `buffer` to the file specified by `fd`.
+ *
+ * `offset` determines the part of the buffer to be written, and `length` is
+ * an integer specifying the number of bytes to write.
+ *
+ * `position` refers to the offset from the beginning of the file where this data
+ * should be written. If `typeof position !== 'number'`, the data will be written
+ * at the current position. See [`pwrite(2)`](http://man7.org/linux/man-pages/man2/pwrite.2.html).
+ *
+ * The callback will be given three arguments `(err, bytesWritten, buffer)` where`bytesWritten` specifies how many _bytes_ were written from `buffer`.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a promise for an `Object` with `bytesWritten` and `buffer` properties.
+ *
+ * It is unsafe to use `fs.write()` multiple times on the same file without waiting
+ * for the callback. For this scenario, {@link createWriteStream} is
+ * recommended.
+ *
+ * On Linux, positional writes don't work when the file is opened in append mode.
+ * The kernel ignores the position argument and always appends the data to
+ * the end of the file.
+ * @since v0.0.2
+ * @param [offset=0]
+ * @param [length=buffer.byteLength - offset]
+ * @param [position='null']
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ length: number | undefined | null,
+ position: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void
+ ): void;
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ length: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void
+ ): void;
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void
+ ): void;
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ export function write(
+ fd: number,
+ string: string,
+ position: number | undefined | null,
+ encoding: BufferEncoding | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void
+ ): void;
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ export function write(fd: number, string: string, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ */
+ export function write(fd: number, string: string, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
+ export namespace write {
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer?: TBuffer,
+ offset?: number,
+ length?: number,
+ position?: number | null
+ ): Promise<{
+ bytesWritten: number;
+ buffer: TBuffer;
+ }>;
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ function __promisify__(
+ fd: number,
+ string: string,
+ position?: number | null,
+ encoding?: BufferEncoding | null
+ ): Promise<{
+ bytesWritten: number;
+ buffer: string;
+ }>;
+ }
+ /**
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link write}.
+ * @since v0.1.21
+ * @param [offset=0]
+ * @param [length=buffer.byteLength - offset]
+ * @param [position='null']
+ * @return The number of bytes written.
+ */
+ export function writeSync(fd: number, buffer: NodeJS.ArrayBufferView, offset?: number | null, length?: number | null, position?: number | null): number;
+ /**
+ * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ export function writeSync(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): number;
+ export type ReadPosition = number | bigint;
+ export interface ReadSyncOptions {
+ /**
+ * @default 0
+ */
+ offset?: number | undefined;
+ /**
+ * @default `length of buffer`
+ */
+ length?: number | undefined;
+ /**
+ * @default null
+ */
+ position?: ReadPosition | null | undefined;
+ }
+ export interface ReadAsyncOptions<TBuffer extends NodeJS.ArrayBufferView> extends ReadSyncOptions {
+ buffer?: TBuffer;
+ }
+ /**
+ * Read data from the file specified by `fd`.
+ *
+ * The callback is given the three arguments, `(err, bytesRead, buffer)`.
+ *
+ * If the file is not modified concurrently, the end-of-file is reached when the
+ * number of bytes read is zero.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a promise for an `Object` with `bytesRead` and `buffer` properties.
+ * @since v0.0.2
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The position in `buffer` to write the data to.
+ * @param length The number of bytes to read.
+ * @param position Specifies where to begin reading from in the file. If `position` is `null` or `-1 `, data will be read from the current file position, and the file position will be updated. If
+ * `position` is an integer, the file position will be unchanged.
+ */
+ export function read<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number,
+ length: number,
+ position: ReadPosition | null,
+ callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
+ ): void;
+ /**
+ * Similar to the above `fs.read` function, this version takes an optional `options` object.
+ * If not otherwise specified in an `options` object,
+ * `buffer` defaults to `Buffer.alloc(16384)`,
+ * `offset` defaults to `0`,
+ * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0
+ * `position` defaults to `null`
+ * @since v12.17.0, 13.11.0
+ */
+ export function read<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ options: ReadAsyncOptions<TBuffer>,
+ callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
+ ): void;
+ export function read(fd: number, callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NodeJS.ArrayBufferView) => void): void;
+ export namespace read {
+ /**
+ * @param fd A file descriptor.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The offset in the buffer at which to start writing.
+ * @param length The number of bytes to read.
+ * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
+ */
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number,
+ length: number,
+ position: number | null
+ ): Promise<{
+ bytesRead: number;
+ buffer: TBuffer;
+ }>;
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ options: ReadAsyncOptions<TBuffer>
+ ): Promise<{
+ bytesRead: number;
+ buffer: TBuffer;
+ }>;
+ function __promisify__(fd: number): Promise<{
+ bytesRead: number;
+ buffer: NodeJS.ArrayBufferView;
+ }>;
+ }
+ /**
+ * Returns the number of `bytesRead`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link read}.
+ * @since v0.1.21
+ * @param [position='null']
+ */
+ export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, offset: number, length: number, position: ReadPosition | null): number;
+ /**
+ * Similar to the above `fs.readSync` function, this version takes an optional `options` object.
+ * If no `options` object is specified, it will default with the above values.
+ */
+ export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadSyncOptions): number;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ *
+ * ```js
+ * import { readFile } from 'node:fs';
+ *
+ * readFile('/etc/passwd', (err, data) => {
+ * if (err) throw err;
+ * console.log(data);
+ * });
+ * ```
+ *
+ * The callback is passed two arguments `(err, data)`, where `data` is the
+ * contents of the file.
+ *
+ * If no encoding is specified, then the raw buffer is returned.
+ *
+ * If `options` is a string, then it specifies the encoding:
+ *
+ * ```js
+ * import { readFile } from 'node:fs';
+ *
+ * readFile('/etc/passwd', 'utf8', callback);
+ * ```
+ *
+ * When the path is a directory, the behavior of `fs.readFile()` and {@link readFileSync} is platform-specific. On macOS, Linux, and Windows, an
+ * error will be returned. On FreeBSD, a representation of the directory's contents
+ * will be returned.
+ *
+ * ```js
+ * import { readFile } from 'node:fs';
+ *
+ * // macOS, Linux, and Windows
+ * readFile('<directory>', (err, data) => {
+ * // => [Error: EISDIR: illegal operation on a directory, read <directory>]
+ * });
+ *
+ * // FreeBSD
+ * readFile('<directory>', (err, data) => {
+ * // => null, <data>
+ * });
+ * ```
+ *
+ * It is possible to abort an ongoing request using an `AbortSignal`. If a
+ * request is aborted the callback is called with an `AbortError`:
+ *
+ * ```js
+ * import { readFile } from 'node:fs';
+ *
+ * const controller = new AbortController();
+ * const signal = controller.signal;
+ * readFile(fileInfo[0].name, { signal }, (err, buf) => {
+ * // ...
+ * });
+ * // When you want to abort the request
+ * controller.abort();
+ * ```
+ *
+ * The `fs.readFile()` function buffers the entire file. To minimize memory costs,
+ * when possible prefer streaming via `fs.createReadStream()`.
+ *
+ * Aborting an ongoing request does not abort individual operating
+ * system requests but rather the internal buffering `fs.readFile` performs.
+ * @since v0.1.29
+ * @param path filename or file descriptor
+ */
+ export function readFile(
+ path: PathOrFileDescriptor,
+ options:
+ | ({
+ encoding?: null | undefined;
+ flag?: string | undefined;
+ } & Abortable)
+ | undefined
+ | null,
+ callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void
+ ): void;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFile(
+ path: PathOrFileDescriptor,
+ options:
+ | ({
+ encoding: BufferEncoding;
+ flag?: string | undefined;
+ } & Abortable)
+ | BufferEncoding,
+ callback: (err: NodeJS.ErrnoException | null, data: string) => void
+ ): void;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFile(
+ path: PathOrFileDescriptor,
+ options:
+ | (ObjectEncodingOptions & {
+ flag?: string | undefined;
+ } & Abortable)
+ | BufferEncoding
+ | undefined
+ | null,
+ callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void
+ ): void;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ */
+ export function readFile(path: PathOrFileDescriptor, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void;
+ export namespace readFile {
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(
+ path: PathOrFileDescriptor,
+ options?: {
+ encoding?: null | undefined;
+ flag?: string | undefined;
+ } | null
+ ): Promise<Buffer>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(
+ path: PathOrFileDescriptor,
+ options:
+ | {
+ encoding: BufferEncoding;
+ flag?: string | undefined;
+ }
+ | BufferEncoding
+ ): Promise<string>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(
+ path: PathOrFileDescriptor,
+ options?:
+ | (ObjectEncodingOptions & {
+ flag?: string | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string | Buffer>;
+ }
+ /**
+ * Returns the contents of the `path`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link readFile}.
+ *
+ * If the `encoding` option is specified then this function returns a
+ * string. Otherwise it returns a buffer.
+ *
+ * Similar to {@link readFile}, when the path is a directory, the behavior of`fs.readFileSync()` is platform-specific.
+ *
+ * ```js
+ * import { readFileSync } from 'node:fs';
+ *
+ * // macOS, Linux, and Windows
+ * readFileSync('<directory>');
+ * // => [Error: EISDIR: illegal operation on a directory, read <directory>]
+ *
+ * // FreeBSD
+ * readFileSync('<directory>'); // => <data>
+ * ```
+ * @since v0.1.8
+ * @param path filename or file descriptor
+ */
+ export function readFileSync(
+ path: PathOrFileDescriptor,
+ options?: {
+ encoding?: null | undefined;
+ flag?: string | undefined;
+ } | null
+ ): Buffer;
+ /**
+ * Synchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFileSync(
+ path: PathOrFileDescriptor,
+ options:
+ | {
+ encoding: BufferEncoding;
+ flag?: string | undefined;
+ }
+ | BufferEncoding
+ ): string;
+ /**
+ * Synchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFileSync(
+ path: PathOrFileDescriptor,
+ options?:
+ | (ObjectEncodingOptions & {
+ flag?: string | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): string | Buffer;
+ export type WriteFileOptions =
+ | (ObjectEncodingOptions &
+ Abortable & {
+ mode?: Mode | undefined;
+ flag?: string | undefined;
+ })
+ | BufferEncoding
+ | null;
+ /**
+ * When `file` is a filename, asynchronously writes data to the file, replacing the
+ * file if it already exists. `data` can be a string or a buffer.
+ *
+ * When `file` is a file descriptor, the behavior is similar to calling`fs.write()` directly (which is recommended). See the notes below on using
+ * a file descriptor.
+ *
+ * The `encoding` option is ignored if `data` is a buffer.
+ *
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
+ *
+ * ```js
+ * import { writeFile } from 'node:fs';
+ * import { Buffer } from 'node:buffer';
+ *
+ * const data = new Uint8Array(Buffer.from('Hello Node.js'));
+ * writeFile('message.txt', data, (err) => {
+ * if (err) throw err;
+ * console.log('The file has been saved!');
+ * });
+ * ```
+ *
+ * If `options` is a string, then it specifies the encoding:
+ *
+ * ```js
+ * import { writeFile } from 'node:fs';
+ *
+ * writeFile('message.txt', 'Hello Node.js', 'utf8', callback);
+ * ```
+ *
+ * It is unsafe to use `fs.writeFile()` multiple times on the same file without
+ * waiting for the callback. For this scenario, {@link createWriteStream} is
+ * recommended.
+ *
+ * Similarly to `fs.readFile` \- `fs.writeFile` is a convenience method that
+ * performs multiple `write` calls internally to write the buffer passed to it.
+ * For performance sensitive code consider using {@link createWriteStream}.
+ *
+ * It is possible to use an `AbortSignal` to cancel an `fs.writeFile()`.
+ * Cancelation is "best effort", and some amount of data is likely still
+ * to be written.
+ *
+ * ```js
+ * import { writeFile } from 'node:fs';
+ * import { Buffer } from 'node:buffer';
+ *
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const data = new Uint8Array(Buffer.from('Hello Node.js'));
+ * writeFile('message.txt', data, { signal }, (err) => {
+ * // When a request is aborted - the callback is called with an AbortError
+ * });
+ * // When the request should be aborted
+ * controller.abort();
+ * ```
+ *
+ * Aborting an ongoing request does not abort individual operating
+ * system requests but rather the internal buffering `fs.writeFile` performs.
+ * @since v0.1.29
+ * @param file filename or file descriptor
+ */
+ export function writeFile(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions, callback: NoParamCallback): void;
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ */
+ export function writeFile(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, callback: NoParamCallback): void;
+ export namespace writeFile {
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'w'` is used.
+ */
+ function __promisify__(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): Promise<void>;
+ }
+ /**
+ * Returns `undefined`.
+ *
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link writeFile}.
+ * @since v0.1.29
+ * @param file filename or file descriptor
+ */
+ export function writeFileSync(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void;
+ /**
+ * Asynchronously append data to a file, creating the file if it does not yet
+ * exist. `data` can be a string or a `Buffer`.
+ *
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
+ *
+ * ```js
+ * import { appendFile } from 'node:fs';
+ *
+ * appendFile('message.txt', 'data to append', (err) => {
+ * if (err) throw err;
+ * console.log('The "data to append" was appended to file!');
+ * });
+ * ```
+ *
+ * If `options` is a string, then it specifies the encoding:
+ *
+ * ```js
+ * import { appendFile } from 'node:fs';
+ *
+ * appendFile('message.txt', 'data to append', 'utf8', callback);
+ * ```
+ *
+ * The `path` may be specified as a numeric file descriptor that has been opened
+ * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will
+ * not be closed automatically.
+ *
+ * ```js
+ * import { open, close, appendFile } from 'node:fs';
+ *
+ * function closeFd(fd) {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ *
+ * open('message.txt', 'a', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * appendFile(fd, 'data to append', 'utf8', (err) => {
+ * closeFd(fd);
+ * if (err) throw err;
+ * });
+ * } catch (err) {
+ * closeFd(fd);
+ * throw err;
+ * }
+ * });
+ * ```
+ * @since v0.6.7
+ * @param path filename or file descriptor
+ */
+ export function appendFile(path: PathOrFileDescriptor, data: string | Uint8Array, options: WriteFileOptions, callback: NoParamCallback): void;
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ */
+ export function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void;
+ export namespace appendFile {
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'a'` is used.
+ */
+ function __promisify__(file: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): Promise<void>;
+ }
+ /**
+ * Synchronously append data to a file, creating the file if it does not yet
+ * exist. `data` can be a string or a `Buffer`.
+ *
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
+ *
+ * ```js
+ * import { appendFileSync } from 'node:fs';
+ *
+ * try {
+ * appendFileSync('message.txt', 'data to append');
+ * console.log('The "data to append" was appended to file!');
+ * } catch (err) {
+ * // Handle the error
+ * }
+ * ```
+ *
+ * If `options` is a string, then it specifies the encoding:
+ *
+ * ```js
+ * import { appendFileSync } from 'node:fs';
+ *
+ * appendFileSync('message.txt', 'data to append', 'utf8');
+ * ```
+ *
+ * The `path` may be specified as a numeric file descriptor that has been opened
+ * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will
+ * not be closed automatically.
+ *
+ * ```js
+ * import { openSync, closeSync, appendFileSync } from 'node:fs';
+ *
+ * let fd;
+ *
+ * try {
+ * fd = openSync('message.txt', 'a');
+ * appendFileSync(fd, 'data to append', 'utf8');
+ * } catch (err) {
+ * // Handle the error
+ * } finally {
+ * if (fd !== undefined)
+ * closeSync(fd);
+ * }
+ * ```
+ * @since v0.6.7
+ * @param path filename or file descriptor
+ */
+ export function appendFileSync(path: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): void;
+ /**
+ * Watch for changes on `filename`. The callback `listener` will be called each
+ * time the file is accessed.
+ *
+ * The `options` argument may be omitted. If provided, it should be an object. The`options` object may contain a boolean named `persistent` that indicates
+ * whether the process should continue to run as long as files are being watched.
+ * The `options` object may specify an `interval` property indicating how often the
+ * target should be polled in milliseconds.
+ *
+ * The `listener` gets two arguments the current stat object and the previous
+ * stat object:
+ *
+ * ```js
+ * import { watchFile } from 'fs';
+ *
+ * watchFile('message.text', (curr, prev) => {
+ * console.log(`the current mtime is: ${curr.mtime}`);
+ * console.log(`the previous mtime was: ${prev.mtime}`);
+ * });
+ * ```
+ *
+ * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
+ * the numeric values in these objects are specified as `BigInt`s.
+ *
+ * To be notified when the file was modified, not just accessed, it is necessary
+ * to compare `curr.mtimeMs` and `prev.mtimeMs`.
+ *
+ * When an `fs.watchFile` operation results in an `ENOENT` error, it
+ * will invoke the listener once, with all the fields zeroed (or, for dates, the
+ * Unix Epoch). If the file is created later on, the listener will be called
+ * again, with the latest stat objects. This is a change in functionality since
+ * v0.10.
+ *
+ * Using {@link watch} is more efficient than `fs.watchFile` and`fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and`fs.unwatchFile` when possible.
+ *
+ * When a file being watched by `fs.watchFile()` disappears and reappears,
+ * then the contents of `previous` in the second callback event (the file's
+ * reappearance) will be the same as the contents of `previous` in the first
+ * callback event (its disappearance).
+ *
+ * This happens when:
+ *
+ * * the file is deleted, followed by a restore
+ * * the file is renamed and then renamed a second time back to its original name
+ * @since v0.1.31
+ */
+ export interface WatchFileOptions {
+ bigint?: boolean | undefined;
+ persistent?: boolean | undefined;
+ interval?: number | undefined;
+ }
+ /**
+ * Watch for changes on `filename`. The callback `listener` will be called each
+ * time the file is accessed.
+ *
+ * The `options` argument may be omitted. If provided, it should be an object. The`options` object may contain a boolean named `persistent` that indicates
+ * whether the process should continue to run as long as files are being watched.
+ * The `options` object may specify an `interval` property indicating how often the
+ * target should be polled in milliseconds.
+ *
+ * The `listener` gets two arguments the current stat object and the previous
+ * stat object:
+ *
+ * ```js
+ * import { watchFile } from 'node:fs';
+ *
+ * watchFile('message.text', (curr, prev) => {
+ * console.log(`the current mtime is: ${curr.mtime}`);
+ * console.log(`the previous mtime was: ${prev.mtime}`);
+ * });
+ * ```
+ *
+ * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
+ * the numeric values in these objects are specified as `BigInt`s.
+ *
+ * To be notified when the file was modified, not just accessed, it is necessary
+ * to compare `curr.mtimeMs` and `prev.mtimeMs`.
+ *
+ * When an `fs.watchFile` operation results in an `ENOENT` error, it
+ * will invoke the listener once, with all the fields zeroed (or, for dates, the
+ * Unix Epoch). If the file is created later on, the listener will be called
+ * again, with the latest stat objects. This is a change in functionality since
+ * v0.10.
+ *
+ * Using {@link watch} is more efficient than `fs.watchFile` and`fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and`fs.unwatchFile` when possible.
+ *
+ * When a file being watched by `fs.watchFile()` disappears and reappears,
+ * then the contents of `previous` in the second callback event (the file's
+ * reappearance) will be the same as the contents of `previous` in the first
+ * callback event (its disappearance).
+ *
+ * This happens when:
+ *
+ * * the file is deleted, followed by a restore
+ * * the file is renamed and then renamed a second time back to its original name
+ * @since v0.1.31
+ */
+ export function watchFile(
+ filename: PathLike,
+ options:
+ | (WatchFileOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ listener: StatsListener
+ ): StatWatcher;
+ export function watchFile(
+ filename: PathLike,
+ options:
+ | (WatchFileOptions & {
+ bigint: true;
+ })
+ | undefined,
+ listener: BigIntStatsListener
+ ): StatWatcher;
+ /**
+ * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function watchFile(filename: PathLike, listener: StatsListener): StatWatcher;
+ /**
+ * Stop watching for changes on `filename`. If `listener` is specified, only that
+ * particular listener is removed. Otherwise, _all_ listeners are removed,
+ * effectively stopping watching of `filename`.
+ *
+ * Calling `fs.unwatchFile()` with a filename that is not being watched is a
+ * no-op, not an error.
+ *
+ * Using {@link watch} is more efficient than `fs.watchFile()` and`fs.unwatchFile()`. `fs.watch()` should be used instead of `fs.watchFile()`and `fs.unwatchFile()` when possible.
+ * @since v0.1.31
+ * @param listener Optional, a listener previously attached using `fs.watchFile()`
+ */
+ export function unwatchFile(filename: PathLike, listener?: StatsListener): void;
+ export function unwatchFile(filename: PathLike, listener?: BigIntStatsListener): void;
+ export interface WatchOptions extends Abortable {
+ encoding?: BufferEncoding | 'buffer' | undefined;
+ persistent?: boolean | undefined;
+ recursive?: boolean | undefined;
+ }
+ export type WatchEventType = 'rename' | 'change';
+ export type WatchListener<T> = (event: WatchEventType, filename: T | null) => void;
+ export type StatsListener = (curr: Stats, prev: Stats) => void;
+ export type BigIntStatsListener = (curr: BigIntStats, prev: BigIntStats) => void;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a
+ * directory.
+ *
+ * The second argument is optional. If `options` is provided as a string, it
+ * specifies the `encoding`. Otherwise `options` should be passed as an object.
+ *
+ * The listener callback gets two arguments `(eventType, filename)`. `eventType`is either `'rename'` or `'change'`, and `filename` is the name of the file
+ * which triggered the event.
+ *
+ * On most platforms, `'rename'` is emitted whenever a filename appears or
+ * disappears in the directory.
+ *
+ * The listener callback is attached to the `'change'` event fired by `fs.FSWatcher`, but it is not the same thing as the `'change'` value of`eventType`.
+ *
+ * If a `signal` is passed, aborting the corresponding AbortController will close
+ * the returned `fs.FSWatcher`.
+ * @since v0.5.10
+ * @param listener
+ */
+ export function watch(
+ filename: PathLike,
+ options:
+ | (WatchOptions & {
+ encoding: 'buffer';
+ })
+ | 'buffer',
+ listener?: WatchListener<Buffer>
+ ): FSWatcher;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ export function watch(filename: PathLike, options?: WatchOptions | BufferEncoding | null, listener?: WatchListener<string>): FSWatcher;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ export function watch(filename: PathLike, options: WatchOptions | string, listener?: WatchListener<string | Buffer>): FSWatcher;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function watch(filename: PathLike, listener?: WatchListener<string>): FSWatcher;
+ /**
+ * Test whether or not the given path exists by checking with the file system.
+ * Then call the `callback` argument with either true or false:
+ *
+ * ```js
+ * import { exists } from 'node:fs';
+ *
+ * exists('/etc/passwd', (e) => {
+ * console.log(e ? 'it exists' : 'no passwd!');
+ * });
+ * ```
+ *
+ * **The parameters for this callback are not consistent with other Node.js**
+ * **callbacks.** Normally, the first parameter to a Node.js callback is an `err`parameter, optionally followed by other parameters. The `fs.exists()` callback
+ * has only one boolean parameter. This is one reason `fs.access()` is recommended
+ * instead of `fs.exists()`.
+ *
+ * Using `fs.exists()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. Doing
+ * so introduces a race condition, since other processes may change the file's
+ * state between the two calls. Instead, user code should open/read/write the
+ * file directly and handle the error raised if the file does not exist.
+ *
+ * **write (NOT RECOMMENDED)**
+ *
+ * ```js
+ * import { exists, open, close } from 'node:fs';
+ *
+ * exists('myfile', (e) => {
+ * if (e) {
+ * console.error('myfile already exists');
+ * } else {
+ * open('myfile', 'wx', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * writeMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * }
+ * });
+ * ```
+ *
+ * **write (RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close } from 'node:fs';
+ * open('myfile', 'wx', (err, fd) => {
+ * if (err) {
+ * if (err.code === 'EEXIST') {
+ * console.error('myfile already exists');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * try {
+ * writeMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * ```
+ *
+ * **read (NOT RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close, exists } from 'node:fs';
+ *
+ * exists('myfile', (e) => {
+ * if (e) {
+ * open('myfile', 'r', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * readMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * } else {
+ * console.error('myfile does not exist');
+ * }
+ * });
+ * ```
+ *
+ * **read (RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close } from 'node:fs';
+ *
+ * open('myfile', 'r', (err, fd) => {
+ * if (err) {
+ * if (err.code === 'ENOENT') {
+ * console.error('myfile does not exist');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * try {
+ * readMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * ```
+ *
+ * The "not recommended" examples above check for existence and then use the
+ * file; the "recommended" examples are better because they use the file directly
+ * and handle the error, if any.
+ *
+ * In general, check for the existence of a file only if the file won't be
+ * used directly, for example when its existence is a signal from another
+ * process.
+ * @since v0.0.2
+ * @deprecated Since v1.0.0 - Use {@link stat} or {@link access} instead.
+ */
+ export function exists(path: PathLike, callback: (exists: boolean) => void): void;
+ /** @deprecated */
+ export namespace exists {
+ /**
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(path: PathLike): Promise<boolean>;
+ }
+ /**
+ * Returns `true` if the path exists, `false` otherwise.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link exists}.
+ *
+ * `fs.exists()` is deprecated, but `fs.existsSync()` is not. The `callback`parameter to `fs.exists()` accepts parameters that are inconsistent with other
+ * Node.js callbacks. `fs.existsSync()` does not use a callback.
+ *
+ * ```js
+ * import { existsSync } from 'node:fs';
+ *
+ * if (existsSync('/etc/passwd'))
+ * console.log('The path exists.');
+ * ```
+ * @since v0.1.21
+ */
+ export function existsSync(path: PathLike): boolean;
+ export namespace constants {
+ // File Access Constants
+ /** Constant for fs.access(). File is visible to the calling process. */
+ const F_OK: number;
+ /** Constant for fs.access(). File can be read by the calling process. */
+ const R_OK: number;
+ /** Constant for fs.access(). File can be written by the calling process. */
+ const W_OK: number;
+ /** Constant for fs.access(). File can be executed by the calling process. */
+ const X_OK: number;
+ // File Copy Constants
+ /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */
+ const COPYFILE_EXCL: number;
+ /**
+ * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink.
+ * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used.
+ */
+ const COPYFILE_FICLONE: number;
+ /**
+ * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink.
+ * If the underlying platform does not support copy-on-write, then the operation will fail with an error.
+ */
+ const COPYFILE_FICLONE_FORCE: number;
+ // File Open Constants
+ /** Constant for fs.open(). Flag indicating to open a file for read-only access. */
+ const O_RDONLY: number;
+ /** Constant for fs.open(). Flag indicating to open a file for write-only access. */
+ const O_WRONLY: number;
+ /** Constant for fs.open(). Flag indicating to open a file for read-write access. */
+ const O_RDWR: number;
+ /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */
+ const O_CREAT: number;
+ /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */
+ const O_EXCL: number;
+ /**
+ * Constant for fs.open(). Flag indicating that if path identifies a terminal device,
+ * opening the path shall not cause that terminal to become the controlling terminal for the process
+ * (if the process does not already have one).
+ */
+ const O_NOCTTY: number;
+ /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */
+ const O_TRUNC: number;
+ /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */
+ const O_APPEND: number;
+ /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */
+ const O_DIRECTORY: number;
+ /**
+ * constant for fs.open().
+ * Flag indicating reading accesses to the file system will no longer result in
+ * an update to the atime information associated with the file.
+ * This flag is available on Linux operating systems only.
+ */
+ const O_NOATIME: number;
+ /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */
+ const O_NOFOLLOW: number;
+ /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */
+ const O_SYNC: number;
+ /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */
+ const O_DSYNC: number;
+ /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */
+ const O_SYMLINK: number;
+ /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */
+ const O_DIRECT: number;
+ /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */
+ const O_NONBLOCK: number;
+ // File Type Constants
+ /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */
+ const S_IFMT: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */
+ const S_IFREG: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */
+ const S_IFDIR: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */
+ const S_IFCHR: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */
+ const S_IFBLK: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */
+ const S_IFIFO: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */
+ const S_IFLNK: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */
+ const S_IFSOCK: number;
+ // File Mode Constants
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */
+ const S_IRWXU: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */
+ const S_IRUSR: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */
+ const S_IWUSR: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */
+ const S_IXUSR: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */
+ const S_IRWXG: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */
+ const S_IRGRP: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */
+ const S_IWGRP: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */
+ const S_IXGRP: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */
+ const S_IRWXO: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */
+ const S_IROTH: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */
+ const S_IWOTH: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */
+ const S_IXOTH: number;
+ /**
+ * When set, a memory file mapping is used to access the file. This flag
+ * is available on Windows operating systems only. On other operating systems,
+ * this flag is ignored.
+ */
+ const UV_FS_O_FILEMAP: number;
+ }
+ /**
+ * Tests a user's permissions for the file or directory specified by `path`.
+ * The `mode` argument is an optional integer that specifies the accessibility
+ * checks to be performed. `mode` should be either the value `fs.constants.F_OK`or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`,`fs.constants.W_OK`, and `fs.constants.X_OK`
+ * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+ * possible values of `mode`.
+ *
+ * The final argument, `callback`, is a callback function that is invoked with
+ * a possible error argument. If any of the accessibility checks fail, the error
+ * argument will be an `Error` object. The following examples check if`package.json` exists, and if it is readable or writable.
+ *
+ * ```js
+ * import { access, constants } from 'node:fs';
+ *
+ * const file = 'package.json';
+ *
+ * // Check if the file exists in the current directory.
+ * access(file, constants.F_OK, (err) => {
+ * console.log(`${file} ${err ? 'does not exist' : 'exists'}`);
+ * });
+ *
+ * // Check if the file is readable.
+ * access(file, constants.R_OK, (err) => {
+ * console.log(`${file} ${err ? 'is not readable' : 'is readable'}`);
+ * });
+ *
+ * // Check if the file is writable.
+ * access(file, constants.W_OK, (err) => {
+ * console.log(`${file} ${err ? 'is not writable' : 'is writable'}`);
+ * });
+ *
+ * // Check if the file is readable and writable.
+ * access(file, constants.R_OK | constants.W_OK, (err) => {
+ * console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`);
+ * });
+ * ```
+ *
+ * Do not use `fs.access()` to check for the accessibility of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()`. Doing
+ * so introduces a race condition, since other processes may change the file's
+ * state between the two calls. Instead, user code should open/read/write the
+ * file directly and handle the error raised if the file is not accessible.
+ *
+ * **write (NOT RECOMMENDED)**
+ *
+ * ```js
+ * import { access, open, close } from 'node:fs';
+ *
+ * access('myfile', (err) => {
+ * if (!err) {
+ * console.error('myfile already exists');
+ * return;
+ * }
+ *
+ * open('myfile', 'wx', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * writeMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * });
+ * ```
+ *
+ * **write (RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close } from 'node:fs';
+ *
+ * open('myfile', 'wx', (err, fd) => {
+ * if (err) {
+ * if (err.code === 'EEXIST') {
+ * console.error('myfile already exists');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * try {
+ * writeMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * ```
+ *
+ * **read (NOT RECOMMENDED)**
+ *
+ * ```js
+ * import { access, open, close } from 'node:fs';
+ * access('myfile', (err) => {
+ * if (err) {
+ * if (err.code === 'ENOENT') {
+ * console.error('myfile does not exist');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * open('myfile', 'r', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * readMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * });
+ * ```
+ *
+ * **read (RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close } from 'node:fs';
+ *
+ * open('myfile', 'r', (err, fd) => {
+ * if (err) {
+ * if (err.code === 'ENOENT') {
+ * console.error('myfile does not exist');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * try {
+ * readMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * ```
+ *
+ * The "not recommended" examples above check for accessibility and then use the
+ * file; the "recommended" examples are better because they use the file directly
+ * and handle the error, if any.
+ *
+ * In general, check for the accessibility of a file only if the file will not be
+ * used directly, for example when its accessibility is a signal from another
+ * process.
+ *
+ * On Windows, access-control policies (ACLs) on a directory may limit access to
+ * a file or directory. The `fs.access()` function, however, does not check the
+ * ACL and therefore may report that a path is accessible even if the ACL restricts
+ * the user from reading or writing to it.
+ * @since v0.11.15
+ * @param [mode=fs.constants.F_OK]
+ */
+ export function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void;
+ /**
+ * Asynchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function access(path: PathLike, callback: NoParamCallback): void;
+ export namespace access {
+ /**
+ * Asynchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(path: PathLike, mode?: number): Promise<void>;
+ }
+ /**
+ * Synchronously tests a user's permissions for the file or directory specified
+ * by `path`. The `mode` argument is an optional integer that specifies the
+ * accessibility checks to be performed. `mode` should be either the value`fs.constants.F_OK` or a mask consisting of the bitwise OR of any of`fs.constants.R_OK`, `fs.constants.W_OK`, and
+ * `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+ * possible values of `mode`.
+ *
+ * If any of the accessibility checks fail, an `Error` will be thrown. Otherwise,
+ * the method will return `undefined`.
+ *
+ * ```js
+ * import { accessSync, constants } from 'node:fs';
+ *
+ * try {
+ * accessSync('etc/passwd', constants.R_OK | constants.W_OK);
+ * console.log('can read/write');
+ * } catch (err) {
+ * console.error('no access!');
+ * }
+ * ```
+ * @since v0.11.15
+ * @param [mode=fs.constants.F_OK]
+ */
+ export function accessSync(path: PathLike, mode?: number): void;
+ interface StreamOptions {
+ flags?: string | undefined;
+ encoding?: BufferEncoding | undefined;
+ fd?: number | promises.FileHandle | undefined;
+ mode?: number | undefined;
+ autoClose?: boolean | undefined;
+ emitClose?: boolean | undefined;
+ start?: number | undefined;
+ signal?: AbortSignal | null | undefined;
+ }
+ interface FSImplementation {
+ open?: (...args: any[]) => any;
+ close?: (...args: any[]) => any;
+ }
+ interface CreateReadStreamFSImplementation extends FSImplementation {
+ read: (...args: any[]) => any;
+ }
+ interface CreateWriteStreamFSImplementation extends FSImplementation {
+ write: (...args: any[]) => any;
+ writev?: (...args: any[]) => any;
+ }
+ interface ReadStreamOptions extends StreamOptions {
+ fs?: CreateReadStreamFSImplementation | null | undefined;
+ end?: number | undefined;
+ highWaterMark?: number | undefined;
+ }
+ interface WriteStreamOptions extends StreamOptions {
+ fs?: CreateWriteStreamFSImplementation | null | undefined;
+ }
+ /**
+ * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream
+ * returned by this method has a default `highWaterMark` of 64 KiB.
+ *
+ * `options` can include `start` and `end` values to read a range of bytes from
+ * the file instead of the entire file. Both `start` and `end` are inclusive and
+ * start counting at 0, allowed values are in the
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `fd` is specified and `start` is
+ * omitted or `undefined`, `fs.createReadStream()` reads sequentially from the
+ * current file position. The `encoding` can be any one of those accepted by `Buffer`.
+ *
+ * If `fd` is specified, `ReadStream` will ignore the `path` argument and will use
+ * the specified file descriptor. This means that no `'open'` event will be
+ * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `net.Socket`.
+ *
+ * If `fd` points to a character device that only supports blocking reads
+ * (such as keyboard or sound card), read operations do not finish until data is
+ * available. This can prevent the process from exiting and the stream from
+ * closing naturally.
+ *
+ * By default, the stream will emit a `'close'` event after it has been
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
+ *
+ * By providing the `fs` option, it is possible to override the corresponding `fs`implementations for `open`, `read`, and `close`. When providing the `fs` option,
+ * an override for `read` is required. If no `fd` is provided, an override for`open` is also required. If `autoClose` is `true`, an override for `close` is
+ * also required.
+ *
+ * ```js
+ * import { createReadStream } from 'node:fs';
+ *
+ * // Create a stream from some character device.
+ * const stream = createReadStream('/dev/input/event0');
+ * setTimeout(() => {
+ * stream.close(); // This may not close the stream.
+ * // Artificially marking end-of-stream, as if the underlying resource had
+ * // indicated end-of-file by itself, allows the stream to close.
+ * // This does not cancel pending read operations, and if there is such an
+ * // operation, the process may still not be able to exit successfully
+ * // until it finishes.
+ * stream.push(null);
+ * stream.read(0);
+ * }, 100);
+ * ```
+ *
+ * If `autoClose` is false, then the file descriptor won't be closed, even if
+ * there's an error. It is the application's responsibility to close it and make
+ * sure there's no file descriptor leak. If `autoClose` is set to true (default
+ * behavior), on `'error'` or `'end'` the file descriptor will be closed
+ * automatically.
+ *
+ * `mode` sets the file mode (permission and sticky bits), but only if the
+ * file was created.
+ *
+ * An example to read the last 10 bytes of a file which is 100 bytes long:
+ *
+ * ```js
+ * import { createReadStream } from 'node:fs';
+ *
+ * createReadStream('sample.txt', { start: 90, end: 99 });
+ * ```
+ *
+ * If `options` is a string, then it specifies the encoding.
+ * @since v0.1.31
+ */
+ export function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream;
+ /**
+ * `options` may also include a `start` option to allow writing data at some
+ * position past the beginning of the file, allowed values are in the
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than
+ * replacing it may require the `flags` option to be set to `r+` rather than the
+ * default `w`. The `encoding` can be any one of those accepted by `Buffer`.
+ *
+ * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false,
+ * then the file descriptor won't be closed, even if there's an error.
+ * It is the application's responsibility to close it and make sure there's no
+ * file descriptor leak.
+ *
+ * By default, the stream will emit a `'close'` event after it has been
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
+ *
+ * By providing the `fs` option it is possible to override the corresponding `fs`implementations for `open`, `write`, `writev`, and `close`. Overriding `write()`without `writev()` can reduce
+ * performance as some optimizations (`_writev()`)
+ * will be disabled. When providing the `fs` option, overrides for at least one of`write` and `writev` are required. If no `fd` option is supplied, an override
+ * for `open` is also required. If `autoClose` is `true`, an override for `close`is also required.
+ *
+ * Like `fs.ReadStream`, if `fd` is specified, `fs.WriteStream` will ignore the`path` argument and will use the specified file descriptor. This means that no`'open'` event will be
+ * emitted. `fd` should be blocking; non-blocking `fd`s
+ * should be passed to `net.Socket`.
+ *
+ * If `options` is a string, then it specifies the encoding.
+ * @since v0.1.31
+ */
+ export function createWriteStream(path: PathLike, options?: BufferEncoding | WriteStreamOptions): WriteStream;
+ /**
+ * Forces all currently queued I/O operations associated with the file to the
+ * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other
+ * than a possible
+ * exception are given to the completion callback.
+ * @since v0.1.96
+ */
+ export function fdatasync(fd: number, callback: NoParamCallback): void;
+ export namespace fdatasync {
+ /**
+ * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+ /**
+ * Forces all currently queued I/O operations associated with the file to the
+ * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. Returns `undefined`.
+ * @since v0.1.96
+ */
+ export function fdatasyncSync(fd: number): void;
+ /**
+ * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
+ * already exists. No arguments other than a possible exception are given to the
+ * callback function. Node.js makes no guarantees about the atomicity of the copy
+ * operation. If an error occurs after the destination file has been opened for
+ * writing, Node.js will attempt to remove the destination.
+ *
+ * `mode` is an optional integer that specifies the behavior
+ * of the copy operation. It is possible to create a mask consisting of the bitwise
+ * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`).
+ *
+ * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already
+ * exists.
+ * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a
+ * copy-on-write reflink. If the platform does not support copy-on-write, then a
+ * fallback copy mechanism is used.
+ * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to
+ * create a copy-on-write reflink. If the platform does not support
+ * copy-on-write, then the operation will fail.
+ *
+ * ```js
+ * import { copyFile, constants } from 'node:fs';
+ *
+ * function callback(err) {
+ * if (err) throw err;
+ * console.log('source.txt was copied to destination.txt');
+ * }
+ *
+ * // destination.txt will be created or overwritten by default.
+ * copyFile('source.txt', 'destination.txt', callback);
+ *
+ * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
+ * copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL, callback);
+ * ```
+ * @since v8.5.0
+ * @param src source filename to copy
+ * @param dest destination filename of the copy operation
+ * @param [mode=0] modifiers for copy operation.
+ */
+ export function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void;
+ export function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void;
+ export namespace copyFile {
+ function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise<void>;
+ }
+ /**
+ * Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it
+ * already exists. Returns `undefined`. Node.js makes no guarantees about the
+ * atomicity of the copy operation. If an error occurs after the destination file
+ * has been opened for writing, Node.js will attempt to remove the destination.
+ *
+ * `mode` is an optional integer that specifies the behavior
+ * of the copy operation. It is possible to create a mask consisting of the bitwise
+ * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`).
+ *
+ * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already
+ * exists.
+ * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a
+ * copy-on-write reflink. If the platform does not support copy-on-write, then a
+ * fallback copy mechanism is used.
+ * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to
+ * create a copy-on-write reflink. If the platform does not support
+ * copy-on-write, then the operation will fail.
+ *
+ * ```js
+ * import { copyFileSync, constants } from 'node:fs';
+ *
+ * // destination.txt will be created or overwritten by default.
+ * copyFileSync('source.txt', 'destination.txt');
+ * console.log('source.txt was copied to destination.txt');
+ *
+ * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
+ * copyFileSync('source.txt', 'destination.txt', constants.COPYFILE_EXCL);
+ * ```
+ * @since v8.5.0
+ * @param src source filename to copy
+ * @param dest destination filename of the copy operation
+ * @param [mode=0] modifiers for copy operation.
+ */
+ export function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void;
+ /**
+ * Write an array of `ArrayBufferView`s to the file specified by `fd` using`writev()`.
+ *
+ * `position` is the offset from the beginning of the file where this data
+ * should be written. If `typeof position !== 'number'`, the data will be written
+ * at the current position.
+ *
+ * The callback will be given three arguments: `err`, `bytesWritten`, and`buffers`. `bytesWritten` is how many bytes were written from `buffers`.
+ *
+ * If this method is `util.promisify()` ed, it returns a promise for an`Object` with `bytesWritten` and `buffers` properties.
+ *
+ * It is unsafe to use `fs.writev()` multiple times on the same file without
+ * waiting for the callback. For this scenario, use {@link createWriteStream}.
+ *
+ * On Linux, positional writes don't work when the file is opened in append mode.
+ * The kernel ignores the position argument and always appends the data to
+ * the end of the file.
+ * @since v12.9.0
+ * @param [position='null']
+ */
+ export function writev(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void): void;
+ export function writev(
+ fd: number,
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
+ position: number,
+ cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
+ ): void;
+ export interface WriteVResult {
+ bytesWritten: number;
+ buffers: NodeJS.ArrayBufferView[];
+ }
+ export namespace writev {
+ function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
+ }
+ /**
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link writev}.
+ * @since v12.9.0
+ * @param [position='null']
+ * @return The number of bytes written.
+ */
+ export function writevSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
+ /**
+ * Read from a file specified by `fd` and write to an array of `ArrayBufferView`s
+ * using `readv()`.
+ *
+ * `position` is the offset from the beginning of the file from where data
+ * should be read. If `typeof position !== 'number'`, the data will be read
+ * from the current position.
+ *
+ * The callback will be given three arguments: `err`, `bytesRead`, and`buffers`. `bytesRead` is how many bytes were read from the file.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a promise for an `Object` with `bytesRead` and `buffers` properties.
+ * @since v13.13.0, v12.17.0
+ * @param [position='null']
+ */
+ export function readv(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void): void;
+ export function readv(
+ fd: number,
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
+ position: number,
+ cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void
+ ): void;
+ export interface ReadVResult {
+ bytesRead: number;
+ buffers: NodeJS.ArrayBufferView[];
+ }
+ export namespace readv {
+ function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
+ }
+ /**
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link readv}.
+ * @since v13.13.0, v12.17.0
+ * @param [position='null']
+ * @return The number of bytes read.
+ */
+ export function readvSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
+
+ export interface OpenAsBlobOptions {
+ /**
+ * An optional mime type for the blob.
+ *
+ * @default 'undefined'
+ */
+ type?: string | undefined;
+ }
+
+ /**
+ * Returns a Blob whose data is backed by the given file.
+ *
+ * The file must not be modified after the `Blob` is created.
+ * Any modifications will cause reading the `Blob` data to fail with a `DOMException` error.
+ * Synchronous stat operations on the file when the `Blob` is created, and before each read in order to detect whether the file data has been modified on disk.
+ *
+ * @param path
+ * @param [options]
+ *
+ * @experimental
+ * @since v19.8.0
+ */
+ export function openAsBlob(path: PathLike, options?: OpenAsBlobOptions): Promise<Blob>;
+
+ export interface OpenDirOptions {
+ /**
+ * @default 'utf8'
+ */
+ encoding?: BufferEncoding | undefined;
+ /**
+ * Number of directory entries that are buffered
+ * internally when reading from the directory. Higher values lead to better
+ * performance but higher memory usage.
+ * @default 32
+ */
+ bufferSize?: number | undefined;
+ /**
+ * @default false
+ */
+ recursive?: boolean;
+ }
+ /**
+ * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html).
+ *
+ * Creates an `fs.Dir`, which contains all further functions for reading from
+ * and cleaning up the directory.
+ *
+ * The `encoding` option sets the encoding for the `path` while opening the
+ * directory and subsequent read operations.
+ * @since v12.12.0
+ */
+ export function opendirSync(path: PathLike, options?: OpenDirOptions): Dir;
+ /**
+ * Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for
+ * more details.
+ *
+ * Creates an `fs.Dir`, which contains all further functions for reading from
+ * and cleaning up the directory.
+ *
+ * The `encoding` option sets the encoding for the `path` while opening the
+ * directory and subsequent read operations.
+ * @since v12.12.0
+ */
+ export function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
+ export function opendir(path: PathLike, options: OpenDirOptions, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
+ export namespace opendir {
+ function __promisify__(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
+ }
+ export interface BigIntStats extends StatsBase<bigint> {
+ atimeNs: bigint;
+ mtimeNs: bigint;
+ ctimeNs: bigint;
+ birthtimeNs: bigint;
+ }
+ export interface BigIntOptions {
+ bigint: true;
+ }
+ export interface StatOptions {
+ bigint?: boolean | undefined;
+ }
+ export interface StatSyncOptions extends StatOptions {
+ throwIfNoEntry?: boolean | undefined;
+ }
+ interface CopyOptionsBase {
+ /**
+ * Dereference symlinks
+ * @default false
+ */
+ dereference?: boolean;
+ /**
+ * When `force` is `false`, and the destination
+ * exists, throw an error.
+ * @default false
+ */
+ errorOnExist?: boolean;
+ /**
+ * Overwrite existing file or directory. _The copy
+ * operation will ignore errors if you set this to false and the destination
+ * exists. Use the `errorOnExist` option to change this behavior.
+ * @default true
+ */
+ force?: boolean;
+ /**
+ * Modifiers for copy operation. See `mode` flag of {@link copyFileSync()}
+ */
+ mode?: number;
+ /**
+ * When `true` timestamps from `src` will
+ * be preserved.
+ * @default false
+ */
+ preserveTimestamps?: boolean;
+ /**
+ * Copy directories recursively.
+ * @default false
+ */
+ recursive?: boolean;
+ /**
+ * When true, path resolution for symlinks will be skipped
+ * @default false
+ */
+ verbatimSymlinks?: boolean;
+ }
+ export interface CopyOptions extends CopyOptionsBase {
+ /**
+ * Function to filter copied files/directories. Return
+ * `true` to copy the item, `false` to ignore it.
+ */
+ filter?(source: string, destination: string): boolean | Promise<boolean>;
+ }
+ export interface CopySyncOptions extends CopyOptionsBase {
+ /**
+ * Function to filter copied files/directories. Return
+ * `true` to copy the item, `false` to ignore it.
+ */
+ filter?(source: string, destination: string): boolean;
+ }
+ /**
+ * Asynchronously copies the entire directory structure from `src` to `dest`,
+ * including subdirectories and files.
+ *
+ * When copying a directory to another directory, globs are not supported and
+ * behavior is similar to `cp dir1/ dir2/`.
+ * @since v16.7.0
+ * @experimental
+ * @param src source path to copy.
+ * @param dest destination path to copy to.
+ */
+ export function cp(source: string | URL, destination: string | URL, callback: (err: NodeJS.ErrnoException | null) => void): void;
+ export function cp(source: string | URL, destination: string | URL, opts: CopyOptions, callback: (err: NodeJS.ErrnoException | null) => void): void;
+ /**
+ * Synchronously copies the entire directory structure from `src` to `dest`,
+ * including subdirectories and files.
+ *
+ * When copying a directory to another directory, globs are not supported and
+ * behavior is similar to `cp dir1/ dir2/`.
+ * @since v16.7.0
+ * @experimental
+ * @param src source path to copy.
+ * @param dest destination path to copy to.
+ */
+ export function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void;
+}
+declare module 'node:fs' {
+ export * from 'fs';
+}
diff --git a/node_modules/@types/node/ts4.8/fs/promises.d.ts b/node_modules/@types/node/ts4.8/fs/promises.d.ts
new file mode 100755
index 0000000..6082ff8
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/fs/promises.d.ts
@@ -0,0 +1,1202 @@
+/**
+ * The `fs/promises` API provides asynchronous file system methods that return
+ * promises.
+ *
+ * The promise APIs use the underlying Node.js threadpool to perform file
+ * system operations off the event loop thread. These operations are not
+ * synchronized or threadsafe. Care must be taken when performing multiple
+ * concurrent modifications on the same file or data corruption may occur.
+ * @since v10.0.0
+ */
+declare module 'fs/promises' {
+ import { Abortable } from 'node:events';
+ import { Stream } from 'node:stream';
+ import { ReadableStream } from 'node:stream/web';
+ import {
+ BigIntStats,
+ BigIntStatsFs,
+ BufferEncodingOption,
+ constants as fsConstants,
+ CopyOptions,
+ Dir,
+ Dirent,
+ MakeDirectoryOptions,
+ Mode,
+ ObjectEncodingOptions,
+ OpenDirOptions,
+ OpenMode,
+ PathLike,
+ ReadStream,
+ ReadVResult,
+ RmDirOptions,
+ RmOptions,
+ StatOptions,
+ StatFsOptions,
+ Stats,
+ StatsFs,
+ TimeLike,
+ WatchEventType,
+ WatchOptions,
+ WriteStream,
+ WriteVResult,
+ } from 'node:fs';
+ import { Interface as ReadlineInterface } from 'node:readline';
+ interface FileChangeInfo<T extends string | Buffer> {
+ eventType: WatchEventType;
+ filename: T | null;
+ }
+ interface FlagAndOpenMode {
+ mode?: Mode | undefined;
+ flag?: OpenMode | undefined;
+ }
+ interface FileReadResult<T extends NodeJS.ArrayBufferView> {
+ bytesRead: number;
+ buffer: T;
+ }
+ interface FileReadOptions<T extends NodeJS.ArrayBufferView = Buffer> {
+ /**
+ * @default `Buffer.alloc(0xffff)`
+ */
+ buffer?: T;
+ /**
+ * @default 0
+ */
+ offset?: number | null;
+ /**
+ * @default `buffer.byteLength`
+ */
+ length?: number | null;
+ position?: number | null;
+ }
+ interface CreateReadStreamOptions {
+ encoding?: BufferEncoding | null | undefined;
+ autoClose?: boolean | undefined;
+ emitClose?: boolean | undefined;
+ start?: number | undefined;
+ end?: number | undefined;
+ highWaterMark?: number | undefined;
+ }
+ interface CreateWriteStreamOptions {
+ encoding?: BufferEncoding | null | undefined;
+ autoClose?: boolean | undefined;
+ emitClose?: boolean | undefined;
+ start?: number | undefined;
+ }
+ interface ReadableWebStreamOptions {
+ /**
+ * Whether to open a normal or a `'bytes'` stream.
+ * @since v20.0.0
+ */
+ type?: 'bytes' | undefined;
+ }
+ // TODO: Add `EventEmitter` close
+ interface FileHandle {
+ /**
+ * The numeric file descriptor managed by the {FileHandle} object.
+ * @since v10.0.0
+ */
+ readonly fd: number;
+ /**
+ * Alias of `filehandle.writeFile()`.
+ *
+ * When operating on file handles, the mode cannot be changed from what it was set
+ * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ appendFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise<void>;
+ /**
+ * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html).
+ * @since v10.0.0
+ * @param uid The file's new owner's user id.
+ * @param gid The file's new group's group id.
+ * @return Fulfills with `undefined` upon success.
+ */
+ chown(uid: number, gid: number): Promise<void>;
+ /**
+ * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html).
+ * @since v10.0.0
+ * @param mode the file mode bit mask.
+ * @return Fulfills with `undefined` upon success.
+ */
+ chmod(mode: Mode): Promise<void>;
+ /**
+ * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream
+ * returned by this method has a default `highWaterMark` of 64 KiB.
+ *
+ * `options` can include `start` and `end` values to read a range of bytes from
+ * the file instead of the entire file. Both `start` and `end` are inclusive and
+ * start counting at 0, allowed values are in the
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is
+ * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from
+ * the current file position. The `encoding` can be any one of those accepted by `Buffer`.
+ *
+ * If the `FileHandle` points to a character device that only supports blocking
+ * reads (such as keyboard or sound card), read operations do not finish until data
+ * is available. This can prevent the process from exiting and the stream from
+ * closing naturally.
+ *
+ * By default, the stream will emit a `'close'` event after it has been
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
+ *
+ * ```js
+ * import { open } from 'node:fs/promises';
+ *
+ * const fd = await open('/dev/input/event0');
+ * // Create a stream from some character device.
+ * const stream = fd.createReadStream();
+ * setTimeout(() => {
+ * stream.close(); // This may not close the stream.
+ * // Artificially marking end-of-stream, as if the underlying resource had
+ * // indicated end-of-file by itself, allows the stream to close.
+ * // This does not cancel pending read operations, and if there is such an
+ * // operation, the process may still not be able to exit successfully
+ * // until it finishes.
+ * stream.push(null);
+ * stream.read(0);
+ * }, 100);
+ * ```
+ *
+ * If `autoClose` is false, then the file descriptor won't be closed, even if
+ * there's an error. It is the application's responsibility to close it and make
+ * sure there's no file descriptor leak. If `autoClose` is set to true (default
+ * behavior), on `'error'` or `'end'` the file descriptor will be closed
+ * automatically.
+ *
+ * An example to read the last 10 bytes of a file which is 100 bytes long:
+ *
+ * ```js
+ * import { open } from 'node:fs/promises';
+ *
+ * const fd = await open('sample.txt');
+ * fd.createReadStream({ start: 90, end: 99 });
+ * ```
+ * @since v16.11.0
+ */
+ createReadStream(options?: CreateReadStreamOptions): ReadStream;
+ /**
+ * `options` may also include a `start` option to allow writing data at some
+ * position past the beginning of the file, allowed values are in the
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than
+ * replacing it may require the `flags` `open` option to be set to `r+` rather than
+ * the default `r`. The `encoding` can be any one of those accepted by `Buffer`.
+ *
+ * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false,
+ * then the file descriptor won't be closed, even if there's an error.
+ * It is the application's responsibility to close it and make sure there's no
+ * file descriptor leak.
+ *
+ * By default, the stream will emit a `'close'` event after it has been
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
+ * @since v16.11.0
+ */
+ createWriteStream(options?: CreateWriteStreamOptions): WriteStream;
+ /**
+ * Forces all currently queued I/O operations associated with the file to the
+ * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details.
+ *
+ * Unlike `filehandle.sync` this method does not flush modified metadata.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ datasync(): Promise<void>;
+ /**
+ * Request that all data for the open file descriptor is flushed to the storage
+ * device. The specific implementation is operating system and device specific.
+ * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ sync(): Promise<void>;
+ /**
+ * Reads data from the file and stores that in the given buffer.
+ *
+ * If the file is not modified concurrently, the end-of-file is reached when the
+ * number of bytes read is zero.
+ * @since v10.0.0
+ * @param buffer A buffer that will be filled with the file data read.
+ * @param offset The location in the buffer at which to start filling.
+ * @param length The number of bytes to read.
+ * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an
+ * integer, the current file position will remain unchanged.
+ * @return Fulfills upon success with an object with two properties:
+ */
+ read<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number | null, length?: number | null, position?: number | null): Promise<FileReadResult<T>>;
+ read<T extends NodeJS.ArrayBufferView = Buffer>(options?: FileReadOptions<T>): Promise<FileReadResult<T>>;
+ /**
+ * Returns a `ReadableStream` that may be used to read the files data.
+ *
+ * An error will be thrown if this method is called more than once or is called
+ * after the `FileHandle` is closed or closing.
+ *
+ * ```js
+ * import {
+ * open,
+ * } from 'node:fs/promises';
+ *
+ * const file = await open('./some/file/to/read');
+ *
+ * for await (const chunk of file.readableWebStream())
+ * console.log(chunk);
+ *
+ * await file.close();
+ * ```
+ *
+ * While the `ReadableStream` will read the file to completion, it will not
+ * close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method.
+ * @since v17.0.0
+ * @experimental
+ */
+ readableWebStream(options?: ReadableWebStreamOptions): ReadableStream;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ *
+ * If `options` is a string, then it specifies the `encoding`.
+ *
+ * The `FileHandle` has to support reading.
+ *
+ * If one or more `filehandle.read()` calls are made on a file handle and then a`filehandle.readFile()` call is made, the data will be read from the current
+ * position till the end of the file. It doesn't always read from the beginning
+ * of the file.
+ * @since v10.0.0
+ * @return Fulfills upon a successful read with the contents of the file. If no encoding is specified (using `options.encoding`), the data is returned as a {Buffer} object. Otherwise, the
+ * data will be a string.
+ */
+ readFile(
+ options?: {
+ encoding?: null | undefined;
+ flag?: OpenMode | undefined;
+ } | null
+ ): Promise<Buffer>;
+ /**
+ * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for reading.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ readFile(
+ options:
+ | {
+ encoding: BufferEncoding;
+ flag?: OpenMode | undefined;
+ }
+ | BufferEncoding
+ ): Promise<string>;
+ /**
+ * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for reading.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ readFile(
+ options?:
+ | (ObjectEncodingOptions & {
+ flag?: OpenMode | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string | Buffer>;
+ /**
+ * Convenience method to create a `readline` interface and stream over the file.
+ * See `filehandle.createReadStream()` for the options.
+ *
+ * ```js
+ * import { open } from 'node:fs/promises';
+ *
+ * const file = await open('./some/file/to/read');
+ *
+ * for await (const line of file.readLines()) {
+ * console.log(line);
+ * }
+ * ```
+ * @since v18.11.0
+ */
+ readLines(options?: CreateReadStreamOptions): ReadlineInterface;
+ /**
+ * @since v10.0.0
+ * @return Fulfills with an {fs.Stats} for the file.
+ */
+ stat(
+ opts?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ stat(
+ opts: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ stat(opts?: StatOptions): Promise<Stats | BigIntStats>;
+ /**
+ * Truncates the file.
+ *
+ * If the file was larger than `len` bytes, only the first `len` bytes will be
+ * retained in the file.
+ *
+ * The following example retains only the first four bytes of the file:
+ *
+ * ```js
+ * import { open } from 'node:fs/promises';
+ *
+ * let filehandle = null;
+ * try {
+ * filehandle = await open('temp.txt', 'r+');
+ * await filehandle.truncate(4);
+ * } finally {
+ * await filehandle?.close();
+ * }
+ * ```
+ *
+ * If the file previously was shorter than `len` bytes, it is extended, and the
+ * extended part is filled with null bytes (`'\0'`):
+ *
+ * If `len` is negative then `0` will be used.
+ * @since v10.0.0
+ * @param [len=0]
+ * @return Fulfills with `undefined` upon success.
+ */
+ truncate(len?: number): Promise<void>;
+ /**
+ * Change the file system timestamps of the object referenced by the `FileHandle` then resolves the promise with no arguments upon success.
+ * @since v10.0.0
+ */
+ utimes(atime: TimeLike, mtime: TimeLike): Promise<void>;
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
+ * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an
+ * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.
+ * The promise is resolved with no arguments upon success.
+ *
+ * If `options` is a string, then it specifies the `encoding`.
+ *
+ * The `FileHandle` has to support writing.
+ *
+ * It is unsafe to use `filehandle.writeFile()` multiple times on the same file
+ * without waiting for the promise to be resolved (or rejected).
+ *
+ * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the
+ * current position till the end of the file. It doesn't always write from the
+ * beginning of the file.
+ * @since v10.0.0
+ */
+ writeFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode & Abortable) | BufferEncoding | null): Promise<void>;
+ /**
+ * Write `buffer` to the file.
+ *
+ * The promise is resolved with an object containing two properties:
+ *
+ * It is unsafe to use `filehandle.write()` multiple times on the same file
+ * without waiting for the promise to be resolved (or rejected). For this
+ * scenario, use `filehandle.createWriteStream()`.
+ *
+ * On Linux, positional writes do not work when the file is opened in append mode.
+ * The kernel ignores the position argument and always appends the data to
+ * the end of the file.
+ * @since v10.0.0
+ * @param offset The start position from within `buffer` where the data to write begins.
+ * @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write.
+ * @param [position='null'] The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current
+ * position. See the POSIX pwrite(2) documentation for more detail.
+ */
+ write<TBuffer extends Uint8Array>(
+ buffer: TBuffer,
+ offset?: number | null,
+ length?: number | null,
+ position?: number | null
+ ): Promise<{
+ bytesWritten: number;
+ buffer: TBuffer;
+ }>;
+ write(
+ data: string,
+ position?: number | null,
+ encoding?: BufferEncoding | null
+ ): Promise<{
+ bytesWritten: number;
+ buffer: string;
+ }>;
+ /**
+ * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file.
+ *
+ * The promise is resolved with an object containing a two properties:
+ *
+ * It is unsafe to call `writev()` multiple times on the same file without waiting
+ * for the promise to be resolved (or rejected).
+ *
+ * On Linux, positional writes don't work when the file is opened in append mode.
+ * The kernel ignores the position argument and always appends the data to
+ * the end of the file.
+ * @since v12.9.0
+ * @param [position='null'] The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current
+ * position.
+ */
+ writev(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
+ /**
+ * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s
+ * @since v13.13.0, v12.17.0
+ * @param [position='null'] The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position.
+ * @return Fulfills upon success an object containing two properties:
+ */
+ readv(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
+ /**
+ * Closes the file handle after waiting for any pending operation on the handle to
+ * complete.
+ *
+ * ```js
+ * import { open } from 'node:fs/promises';
+ *
+ * let filehandle;
+ * try {
+ * filehandle = await open('thefile.txt', 'r');
+ * } finally {
+ * await filehandle?.close();
+ * }
+ * ```
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ close(): Promise<void>;
+ /**
+ * An alias for {@link FileHandle.close()}.
+ * @since v20.4.0
+ */
+ [Symbol.asyncDispose](): Promise<void>;
+ }
+ const constants: typeof fsConstants;
+ /**
+ * Tests a user's permissions for the file or directory specified by `path`.
+ * The `mode` argument is an optional integer that specifies the accessibility
+ * checks to be performed. `mode` should be either the value `fs.constants.F_OK`or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`,`fs.constants.W_OK`, and `fs.constants.X_OK`
+ * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+ * possible values of `mode`.
+ *
+ * If the accessibility check is successful, the promise is resolved with no
+ * value. If any of the accessibility checks fail, the promise is rejected
+ * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and
+ * written by the current process.
+ *
+ * ```js
+ * import { access, constants } from 'node:fs/promises';
+ *
+ * try {
+ * await access('/etc/passwd', constants.R_OK | constants.W_OK);
+ * console.log('can access');
+ * } catch {
+ * console.error('cannot access');
+ * }
+ * ```
+ *
+ * Using `fsPromises.access()` to check for the accessibility of a file before
+ * calling `fsPromises.open()` is not recommended. Doing so introduces a race
+ * condition, since other processes may change the file's state between the two
+ * calls. Instead, user code should open/read/write the file directly and handle
+ * the error raised if the file is not accessible.
+ * @since v10.0.0
+ * @param [mode=fs.constants.F_OK]
+ * @return Fulfills with `undefined` upon success.
+ */
+ function access(path: PathLike, mode?: number): Promise<void>;
+ /**
+ * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
+ * already exists.
+ *
+ * No guarantees are made about the atomicity of the copy operation. If an
+ * error occurs after the destination file has been opened for writing, an attempt
+ * will be made to remove the destination.
+ *
+ * ```js
+ * import { copyFile, constants } from 'node:fs/promises';
+ *
+ * try {
+ * await copyFile('source.txt', 'destination.txt');
+ * console.log('source.txt was copied to destination.txt');
+ * } catch {
+ * console.error('The file could not be copied');
+ * }
+ *
+ * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
+ * try {
+ * await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL);
+ * console.log('source.txt was copied to destination.txt');
+ * } catch {
+ * console.error('The file could not be copied');
+ * }
+ * ```
+ * @since v10.0.0
+ * @param src source filename to copy
+ * @param dest destination filename of the copy operation
+ * @param [mode=0] Optional modifiers that specify the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g.
+ * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`)
+ * @return Fulfills with `undefined` upon success.
+ */
+ function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise<void>;
+ /**
+ * Opens a `FileHandle`.
+ *
+ * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail.
+ *
+ * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented
+ * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains
+ * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams).
+ * @since v10.0.0
+ * @param [flags='r'] See `support of file system `flags``.
+ * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created.
+ * @return Fulfills with a {FileHandle} object.
+ */
+ function open(path: PathLike, flags?: string | number, mode?: Mode): Promise<FileHandle>;
+ /**
+ * Renames `oldPath` to `newPath`.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
+ /**
+ * Truncates (shortens or extends the length) of the content at `path` to `len`bytes.
+ * @since v10.0.0
+ * @param [len=0]
+ * @return Fulfills with `undefined` upon success.
+ */
+ function truncate(path: PathLike, len?: number): Promise<void>;
+ /**
+ * Removes the directory identified by `path`.
+ *
+ * Using `fsPromises.rmdir()` on a file (not a directory) results in the
+ * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR`error on POSIX.
+ *
+ * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function rmdir(path: PathLike, options?: RmDirOptions): Promise<void>;
+ /**
+ * Removes files and directories (modeled on the standard POSIX `rm` utility).
+ * @since v14.14.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function rm(path: PathLike, options?: RmOptions): Promise<void>;
+ /**
+ * Asynchronously creates a directory.
+ *
+ * The optional `options` argument can be an integer specifying `mode` (permission
+ * and sticky bits), or an object with a `mode` property and a `recursive`property indicating whether parent directories should be created. Calling`fsPromises.mkdir()` when `path` is a directory
+ * that exists results in a
+ * rejection only when `recursive` is false.
+ *
+ * ```js
+ * import { mkdir } from 'node:fs/promises';
+ *
+ * try {
+ * const projectFolder = new URL('./test/project/', import.meta.url);
+ * const createDir = await mkdir(projectFolder, { recursive: true });
+ *
+ * console.log(`created ${createDir}`);
+ * } catch (err) {
+ * console.error(err.message);
+ * }
+ * ```
+ * @since v10.0.0
+ * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`.
+ */
+ function mkdir(
+ path: PathLike,
+ options: MakeDirectoryOptions & {
+ recursive: true;
+ }
+ ): Promise<string | undefined>;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function mkdir(
+ path: PathLike,
+ options?:
+ | Mode
+ | (MakeDirectoryOptions & {
+ recursive?: false | undefined;
+ })
+ | null
+ ): Promise<void>;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
+ /**
+ * Reads the contents of a directory.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned
+ * will be passed as `Buffer` objects.
+ *
+ * If `options.withFileTypes` is set to `true`, the resolved array will contain `fs.Dirent` objects.
+ *
+ * ```js
+ * import { readdir } from 'node:fs/promises';
+ *
+ * try {
+ * const files = await readdir(path);
+ * for (const file of files)
+ * console.log(file);
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * ```
+ * @since v10.0.0
+ * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`.
+ */
+ function readdir(
+ path: PathLike,
+ options?:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdir(
+ path: PathLike,
+ options:
+ | {
+ encoding: 'buffer';
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ }
+ | 'buffer'
+ ): Promise<Buffer[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdir(
+ path: PathLike,
+ options?:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ recursive?: boolean | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string[] | Buffer[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ function readdir(
+ path: PathLike,
+ options: ObjectEncodingOptions & {
+ withFileTypes: true;
+ recursive?: boolean | undefined;
+ }
+ ): Promise<Dirent[]>;
+ /**
+ * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is
+ * resolved with the`linkString` upon success.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the link path returned. If the `encoding` is set to `'buffer'`, the link path
+ * returned will be passed as a `Buffer` object.
+ * @since v10.0.0
+ * @return Fulfills with the `linkString` upon success.
+ */
+ function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlink(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlink(path: PathLike, options?: ObjectEncodingOptions | string | null): Promise<string | Buffer>;
+ /**
+ * Creates a symbolic link.
+ *
+ * The `type` argument is only used on Windows platforms and can be one of `'dir'`,`'file'`, or `'junction'`. If the `type` argument is not a string, Node.js will
+ * autodetect `target` type and use `'file'` or `'dir'`. If the `target` does not
+ * exist, `'file'` will be used. Windows junction points require the destination
+ * path to be absolute. When using `'junction'`, the `target` argument will
+ * automatically be normalized to absolute path. Junction points on NTFS volumes
+ * can only point to directories.
+ * @since v10.0.0
+ * @param [type='null']
+ * @return Fulfills with `undefined` upon success.
+ */
+ function symlink(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
+ /**
+ * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link,
+ * in which case the link itself is stat-ed, not the file that it refers to.
+ * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail.
+ * @since v10.0.0
+ * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`.
+ */
+ function lstat(
+ path: PathLike,
+ opts?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function lstat(
+ path: PathLike,
+ opts: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function lstat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
+ /**
+ * @since v10.0.0
+ * @return Fulfills with the {fs.Stats} object for the given `path`.
+ */
+ function stat(
+ path: PathLike,
+ opts?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function stat(
+ path: PathLike,
+ opts: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function stat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
+ /**
+ * @since v19.6.0, v18.15.0
+ * @return Fulfills with the {fs.StatFs} object for the given `path`.
+ */
+ function statfs(
+ path: PathLike,
+ opts?: StatFsOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<StatsFs>;
+ function statfs(
+ path: PathLike,
+ opts: StatFsOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStatsFs>;
+ function statfs(path: PathLike, opts?: StatFsOptions): Promise<StatsFs | BigIntStatsFs>;
+ /**
+ * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
+ /**
+ * If `path` refers to a symbolic link, then the link is removed without affecting
+ * the file or directory to which that link refers. If the `path` refers to a file
+ * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function unlink(path: PathLike): Promise<void>;
+ /**
+ * Changes the permissions of a file.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function chmod(path: PathLike, mode: Mode): Promise<void>;
+ /**
+ * Changes the permissions on a symbolic link.
+ *
+ * This method is only implemented on macOS.
+ * @deprecated Since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function lchmod(path: PathLike, mode: Mode): Promise<void>;
+ /**
+ * Changes the ownership on a symbolic link.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function lchown(path: PathLike, uid: number, gid: number): Promise<void>;
+ /**
+ * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, with the difference that if the path refers to a
+ * symbolic link, then the link is not dereferenced: instead, the timestamps of
+ * the symbolic link itself are changed.
+ * @since v14.5.0, v12.19.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ /**
+ * Changes the ownership of a file.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function chown(path: PathLike, uid: number, gid: number): Promise<void>;
+ /**
+ * Change the file system timestamps of the object referenced by `path`.
+ *
+ * The `atime` and `mtime` arguments follow these rules:
+ *
+ * * Values can be either numbers representing Unix epoch time, `Date`s, or a
+ * numeric string like `'123456789.0'`.
+ * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or`-Infinity`, an `Error` will be thrown.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ /**
+ * Determines the actual location of `path` using the same semantics as the`fs.realpath.native()` function.
+ *
+ * Only paths that can be converted to UTF8 strings are supported.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the path. If the `encoding` is set to `'buffer'`, the path returned will be
+ * passed as a `Buffer` object.
+ *
+ * On Linux, when Node.js is linked against musl libc, the procfs file system must
+ * be mounted on `/proc` in order for this function to work. Glibc does not have
+ * this restriction.
+ * @since v10.0.0
+ * @return Fulfills with the resolved path upon success.
+ */
+ function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpath(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
+ /**
+ * Creates a unique temporary directory. A unique directory name is generated by
+ * appending six random characters to the end of the provided `prefix`. Due to
+ * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some
+ * platforms, notably the BSDs, can return more than six random characters, and
+ * replace trailing `X` characters in `prefix` with random characters.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use.
+ *
+ * ```js
+ * import { mkdtemp } from 'node:fs/promises';
+ * import { join } from 'node:path';
+ * import { tmpdir } from 'node:os';
+ *
+ * try {
+ * await mkdtemp(join(tmpdir(), 'foo-'));
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * ```
+ *
+ * The `fsPromises.mkdtemp()` method will append the six randomly selected
+ * characters directly to the `prefix` string. For instance, given a directory`/tmp`, if the intention is to create a temporary directory _within_`/tmp`, the`prefix` must end with a trailing
+ * platform-specific path separator
+ * (`require('node:path').sep`).
+ * @since v10.0.0
+ * @return Fulfills with a string containing the file system path of the newly created temporary directory.
+ */
+ function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtemp(prefix: string, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
+ * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an
+ * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.
+ *
+ * The `encoding` option is ignored if `data` is a buffer.
+ *
+ * If `options` is a string, then it specifies the encoding.
+ *
+ * The `mode` option only affects the newly created file. See `fs.open()` for more details.
+ *
+ * Any specified `FileHandle` has to support writing.
+ *
+ * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file
+ * without waiting for the promise to be settled.
+ *
+ * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience
+ * method that performs multiple `write` calls internally to write the buffer
+ * passed to it. For performance sensitive code consider using `fs.createWriteStream()` or `filehandle.createWriteStream()`.
+ *
+ * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`.
+ * Cancelation is "best effort", and some amount of data is likely still
+ * to be written.
+ *
+ * ```js
+ * import { writeFile } from 'node:fs/promises';
+ * import { Buffer } from 'node:buffer';
+ *
+ * try {
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const data = new Uint8Array(Buffer.from('Hello Node.js'));
+ * const promise = writeFile('message.txt', data, { signal });
+ *
+ * // Abort the request before the promise settles.
+ * controller.abort();
+ *
+ * await promise;
+ * } catch (err) {
+ * // When a request is aborted - err is an AbortError
+ * console.error(err);
+ * }
+ * ```
+ *
+ * Aborting an ongoing request does not abort individual operating
+ * system requests but rather the internal buffering `fs.writeFile` performs.
+ * @since v10.0.0
+ * @param file filename or `FileHandle`
+ * @return Fulfills with `undefined` upon success.
+ */
+ function writeFile(
+ file: PathLike | FileHandle,
+ data: string | NodeJS.ArrayBufferView | Iterable<string | NodeJS.ArrayBufferView> | AsyncIterable<string | NodeJS.ArrayBufferView> | Stream,
+ options?:
+ | (ObjectEncodingOptions & {
+ mode?: Mode | undefined;
+ flag?: OpenMode | undefined;
+ } & Abortable)
+ | BufferEncoding
+ | null
+ ): Promise<void>;
+ /**
+ * Asynchronously append data to a file, creating the file if it does not yet
+ * exist. `data` can be a string or a `Buffer`.
+ *
+ * If `options` is a string, then it specifies the `encoding`.
+ *
+ * The `mode` option only affects the newly created file. See `fs.open()` for more details.
+ *
+ * The `path` may be specified as a `FileHandle` that has been opened
+ * for appending (using `fsPromises.open()`).
+ * @since v10.0.0
+ * @param path filename or {FileHandle}
+ * @return Fulfills with `undefined` upon success.
+ */
+ function appendFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise<void>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ *
+ * If no encoding is specified (using `options.encoding`), the data is returned
+ * as a `Buffer` object. Otherwise, the data will be a string.
+ *
+ * If `options` is a string, then it specifies the encoding.
+ *
+ * When the `path` is a directory, the behavior of `fsPromises.readFile()` is
+ * platform-specific. On macOS, Linux, and Windows, the promise will be rejected
+ * with an error. On FreeBSD, a representation of the directory's contents will be
+ * returned.
+ *
+ * An example of reading a `package.json` file located in the same directory of the
+ * running code:
+ *
+ * ```js
+ * import { readFile } from 'node:fs/promises';
+ * try {
+ * const filePath = new URL('./package.json', import.meta.url);
+ * const contents = await readFile(filePath, { encoding: 'utf8' });
+ * console.log(contents);
+ * } catch (err) {
+ * console.error(err.message);
+ * }
+ * ```
+ *
+ * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a
+ * request is aborted the promise returned is rejected with an `AbortError`:
+ *
+ * ```js
+ * import { readFile } from 'node:fs/promises';
+ *
+ * try {
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const promise = readFile(fileName, { signal });
+ *
+ * // Abort the request before the promise settles.
+ * controller.abort();
+ *
+ * await promise;
+ * } catch (err) {
+ * // When a request is aborted - err is an AbortError
+ * console.error(err);
+ * }
+ * ```
+ *
+ * Aborting an ongoing request does not abort individual operating
+ * system requests but rather the internal buffering `fs.readFile` performs.
+ *
+ * Any specified `FileHandle` has to support reading.
+ * @since v10.0.0
+ * @param path filename or `FileHandle`
+ * @return Fulfills with the contents of the file.
+ */
+ function readFile(
+ path: PathLike | FileHandle,
+ options?:
+ | ({
+ encoding?: null | undefined;
+ flag?: OpenMode | undefined;
+ } & Abortable)
+ | null
+ ): Promise<Buffer>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFile(
+ path: PathLike | FileHandle,
+ options:
+ | ({
+ encoding: BufferEncoding;
+ flag?: OpenMode | undefined;
+ } & Abortable)
+ | BufferEncoding
+ ): Promise<string>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFile(
+ path: PathLike | FileHandle,
+ options?:
+ | (ObjectEncodingOptions &
+ Abortable & {
+ flag?: OpenMode | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string | Buffer>;
+ /**
+ * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail.
+ *
+ * Creates an `fs.Dir`, which contains all further functions for reading from
+ * and cleaning up the directory.
+ *
+ * The `encoding` option sets the encoding for the `path` while opening the
+ * directory and subsequent read operations.
+ *
+ * Example using async iteration:
+ *
+ * ```js
+ * import { opendir } from 'node:fs/promises';
+ *
+ * try {
+ * const dir = await opendir('./');
+ * for await (const dirent of dir)
+ * console.log(dirent.name);
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * ```
+ *
+ * When using the async iterator, the `fs.Dir` object will be automatically
+ * closed after the iterator exits.
+ * @since v12.12.0
+ * @return Fulfills with an {fs.Dir}.
+ */
+ function opendir(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
+ /**
+ * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory.
+ *
+ * ```js
+ * const { watch } = require('node:fs/promises');
+ *
+ * const ac = new AbortController();
+ * const { signal } = ac;
+ * setTimeout(() => ac.abort(), 10000);
+ *
+ * (async () => {
+ * try {
+ * const watcher = watch(__filename, { signal });
+ * for await (const event of watcher)
+ * console.log(event);
+ * } catch (err) {
+ * if (err.name === 'AbortError')
+ * return;
+ * throw err;
+ * }
+ * })();
+ * ```
+ *
+ * On most platforms, `'rename'` is emitted whenever a filename appears or
+ * disappears in the directory.
+ *
+ * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`.
+ * @since v15.9.0, v14.18.0
+ * @return of objects with the properties:
+ */
+ function watch(
+ filename: PathLike,
+ options:
+ | (WatchOptions & {
+ encoding: 'buffer';
+ })
+ | 'buffer'
+ ): AsyncIterable<FileChangeInfo<Buffer>>;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ function watch(filename: PathLike, options?: WatchOptions | BufferEncoding): AsyncIterable<FileChangeInfo<string>>;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ function watch(filename: PathLike, options: WatchOptions | string): AsyncIterable<FileChangeInfo<string>> | AsyncIterable<FileChangeInfo<Buffer>>;
+ /**
+ * Asynchronously copies the entire directory structure from `src` to `dest`,
+ * including subdirectories and files.
+ *
+ * When copying a directory to another directory, globs are not supported and
+ * behavior is similar to `cp dir1/ dir2/`.
+ * @since v16.7.0
+ * @experimental
+ * @param src source path to copy.
+ * @param dest destination path to copy to.
+ * @return Fulfills with `undefined` upon success.
+ */
+ function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise<void>;
+}
+declare module 'node:fs/promises' {
+ export * from 'fs/promises';
+}
diff --git a/node_modules/@types/node/ts4.8/globals.d.ts b/node_modules/@types/node/ts4.8/globals.d.ts
new file mode 100755
index 0000000..1336d61
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/globals.d.ts
@@ -0,0 +1,325 @@
+// Declare "static" methods in Error
+interface ErrorConstructor {
+ /** Create .stack property on a target object */
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
+
+ /**
+ * Optional override for formatting stack traces
+ *
+ * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
+ */
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
+
+ stackTraceLimit: number;
+}
+
+/*-----------------------------------------------*
+ * *
+ * GLOBAL *
+ * *
+ ------------------------------------------------*/
+
+// For backwards compability
+interface NodeRequire extends NodeJS.Require { }
+interface RequireResolve extends NodeJS.RequireResolve { }
+interface NodeModule extends NodeJS.Module { }
+
+declare var process: NodeJS.Process;
+declare var console: Console;
+
+declare var __filename: string;
+declare var __dirname: string;
+
+declare var require: NodeRequire;
+declare var module: NodeModule;
+
+// Same as module.exports
+declare var exports: any;
+
+/**
+ * Only available if `--expose-gc` is passed to the process.
+ */
+declare var gc: undefined | (() => void);
+
+//#region borrowed
+// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
+/** A controller object that allows you to abort one or more DOM requests as and when desired. */
+interface AbortController {
+ /**
+ * Returns the AbortSignal object associated with this object.
+ */
+
+ readonly signal: AbortSignal;
+ /**
+ * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
+ */
+ abort(reason?: any): void;
+}
+
+/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
+interface AbortSignal extends EventTarget {
+ /**
+ * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
+ */
+ readonly aborted: boolean;
+ readonly reason: any;
+ onabort: null | ((this: AbortSignal, event: Event) => any);
+ throwIfAborted(): void;
+}
+
+declare var AbortController: typeof globalThis extends {onmessage: any; AbortController: infer T}
+ ? T
+ : {
+ prototype: AbortController;
+ new(): AbortController;
+ };
+
+declare var AbortSignal: typeof globalThis extends {onmessage: any; AbortSignal: infer T}
+ ? T
+ : {
+ prototype: AbortSignal;
+ new(): AbortSignal;
+ abort(reason?: any): AbortSignal;
+ timeout(milliseconds: number): AbortSignal;
+ };
+//#endregion borrowed
+
+//#region Disposable
+interface SymbolConstructor {
+ /**
+ * A method that is used to release resources held by an object. Called by the semantics of the `using` statement.
+ */
+ readonly dispose: unique symbol;
+
+ /**
+ * A method that is used to asynchronously release resources held by an object. Called by the semantics of the `await using` statement.
+ */
+ readonly asyncDispose: unique symbol;
+}
+
+interface Disposable {
+ [Symbol.dispose](): void;
+}
+
+interface AsyncDisposable {
+ [Symbol.asyncDispose](): PromiseLike<void>;
+}
+//#endregion Disposable
+
+//#region ArrayLike.at()
+interface RelativeIndexable<T> {
+ /**
+ * Takes an integer value and returns the item at that index,
+ * allowing for positive and negative integers.
+ * Negative integers count back from the last item in the array.
+ */
+ at(index: number): T | undefined;
+}
+interface String extends RelativeIndexable<string> {}
+interface Array<T> extends RelativeIndexable<T> {}
+interface ReadonlyArray<T> extends RelativeIndexable<T> {}
+interface Int8Array extends RelativeIndexable<number> {}
+interface Uint8Array extends RelativeIndexable<number> {}
+interface Uint8ClampedArray extends RelativeIndexable<number> {}
+interface Int16Array extends RelativeIndexable<number> {}
+interface Uint16Array extends RelativeIndexable<number> {}
+interface Int32Array extends RelativeIndexable<number> {}
+interface Uint32Array extends RelativeIndexable<number> {}
+interface Float32Array extends RelativeIndexable<number> {}
+interface Float64Array extends RelativeIndexable<number> {}
+interface BigInt64Array extends RelativeIndexable<bigint> {}
+interface BigUint64Array extends RelativeIndexable<bigint> {}
+//#endregion ArrayLike.at() end
+
+/**
+ * @since v17.0.0
+ *
+ * Creates a deep clone of an object.
+ */
+declare function structuredClone<T>(
+ value: T,
+ transfer?: { transfer: ReadonlyArray<import('worker_threads').TransferListItem> },
+): T;
+
+/*----------------------------------------------*
+* *
+* GLOBAL INTERFACES *
+* *
+*-----------------------------------------------*/
+declare namespace NodeJS {
+ interface CallSite {
+ /**
+ * Value of "this"
+ */
+ getThis(): unknown;
+
+ /**
+ * Type of "this" as a string.
+ * This is the name of the function stored in the constructor field of
+ * "this", if available. Otherwise the object's [[Class]] internal
+ * property.
+ */
+ getTypeName(): string | null;
+
+ /**
+ * Current function
+ */
+ getFunction(): Function | undefined;
+
+ /**
+ * Name of the current function, typically its name property.
+ * If a name property is not available an attempt will be made to try
+ * to infer a name from the function's context.
+ */
+ getFunctionName(): string | null;
+
+ /**
+ * Name of the property [of "this" or one of its prototypes] that holds
+ * the current function
+ */
+ getMethodName(): string | null;
+
+ /**
+ * Name of the script [if this function was defined in a script]
+ */
+ getFileName(): string | undefined;
+
+ /**
+ * Current line number [if this function was defined in a script]
+ */
+ getLineNumber(): number | null;
+
+ /**
+ * Current column number [if this function was defined in a script]
+ */
+ getColumnNumber(): number | null;
+
+ /**
+ * A call site object representing the location where eval was called
+ * [if this function was created using a call to eval]
+ */
+ getEvalOrigin(): string | undefined;
+
+ /**
+ * Is this a toplevel invocation, that is, is "this" the global object?
+ */
+ isToplevel(): boolean;
+
+ /**
+ * Does this call take place in code defined by a call to eval?
+ */
+ isEval(): boolean;
+
+ /**
+ * Is this call in native V8 code?
+ */
+ isNative(): boolean;
+
+ /**
+ * Is this a constructor call?
+ */
+ isConstructor(): boolean;
+ }
+
+ interface ErrnoException extends Error {
+ errno?: number | undefined;
+ code?: string | undefined;
+ path?: string | undefined;
+ syscall?: string | undefined;
+ }
+
+ interface ReadableStream extends EventEmitter {
+ readable: boolean;
+ read(size?: number): string | Buffer;
+ setEncoding(encoding: BufferEncoding): this;
+ pause(): this;
+ resume(): this;
+ isPaused(): boolean;
+ pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined; }): T;
+ unpipe(destination?: WritableStream): this;
+ unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
+ wrap(oldStream: ReadableStream): this;
+ [Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
+ }
+
+ interface WritableStream extends EventEmitter {
+ writable: boolean;
+ write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
+ write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
+ end(cb?: () => void): this;
+ end(data: string | Uint8Array, cb?: () => void): this;
+ end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
+ }
+
+ interface ReadWriteStream extends ReadableStream, WritableStream { }
+
+ interface RefCounted {
+ ref(): this;
+ unref(): this;
+ }
+
+ type TypedArray =
+ | Uint8Array
+ | Uint8ClampedArray
+ | Uint16Array
+ | Uint32Array
+ | Int8Array
+ | Int16Array
+ | Int32Array
+ | BigUint64Array
+ | BigInt64Array
+ | Float32Array
+ | Float64Array;
+ type ArrayBufferView = TypedArray | DataView;
+
+ interface Require {
+ (id: string): any;
+ resolve: RequireResolve;
+ cache: Dict<NodeModule>;
+ /**
+ * @deprecated
+ */
+ extensions: RequireExtensions;
+ main: Module | undefined;
+ }
+
+ interface RequireResolve {
+ (id: string, options?: { paths?: string[] | undefined; }): string;
+ paths(request: string): string[] | null;
+ }
+
+ interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
+ '.js': (m: Module, filename: string) => any;
+ '.json': (m: Module, filename: string) => any;
+ '.node': (m: Module, filename: string) => any;
+ }
+ interface Module {
+ /**
+ * `true` if the module is running during the Node.js preload
+ */
+ isPreloading: boolean;
+ exports: any;
+ require: Require;
+ id: string;
+ filename: string;
+ loaded: boolean;
+ /** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */
+ parent: Module | null | undefined;
+ children: Module[];
+ /**
+ * @since v11.14.0
+ *
+ * The directory name of the module. This is usually the same as the path.dirname() of the module.id.
+ */
+ path: string;
+ paths: string[];
+ }
+
+ interface Dict<T> {
+ [key: string]: T | undefined;
+ }
+
+ interface ReadOnlyDict<T> {
+ readonly [key: string]: T | undefined;
+ }
+}
diff --git a/node_modules/@types/node/ts4.8/globals.global.d.ts b/node_modules/@types/node/ts4.8/globals.global.d.ts
new file mode 100755
index 0000000..ef1198c
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/globals.global.d.ts
@@ -0,0 +1 @@
+declare var global: typeof globalThis;
diff --git a/node_modules/@types/node/ts4.8/http.d.ts b/node_modules/@types/node/ts4.8/http.d.ts
new file mode 100755
index 0000000..cb50335
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/http.d.ts
@@ -0,0 +1,1724 @@
+/**
+ * To use the HTTP server and client one must `require('node:http')`.
+ *
+ * The HTTP interfaces in Node.js are designed to support many features
+ * of the protocol which have been traditionally difficult to use.
+ * In particular, large, possibly chunk-encoded, messages. The interface is
+ * careful to never buffer entire requests or responses, so the
+ * user is able to stream data.
+ *
+ * HTTP message headers are represented by an object like this:
+ *
+ * ```js
+ * { 'content-length': '123',
+ * 'content-type': 'text/plain',
+ * 'connection': 'keep-alive',
+ * 'host': 'example.com',
+ * 'accept': '*' }
+ * ```
+ *
+ * Keys are lowercased. Values are not modified.
+ *
+ * In order to support the full spectrum of possible HTTP applications, the Node.js
+ * HTTP API is very low-level. It deals with stream handling and message
+ * parsing only. It parses a message into headers and body but it does not
+ * parse the actual headers or the body.
+ *
+ * See `message.headers` for details on how duplicate headers are handled.
+ *
+ * The raw headers as they were received are retained in the `rawHeaders`property, which is an array of `[key, value, key2, value2, ...]`. For
+ * example, the previous message header object might have a `rawHeaders`list like the following:
+ *
+ * ```js
+ * [ 'ConTent-Length', '123456',
+ * 'content-LENGTH', '123',
+ * 'content-type', 'text/plain',
+ * 'CONNECTION', 'keep-alive',
+ * 'Host', 'example.com',
+ * 'accepT', '*' ]
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/http.js)
+ */
+declare module 'http' {
+ import * as stream from 'node:stream';
+ import { URL } from 'node:url';
+ import { LookupOptions } from 'node:dns';
+ import { EventEmitter } from 'node:events';
+ import { TcpSocketConnectOpts, Socket, Server as NetServer, LookupFunction } from 'node:net';
+ // incoming headers will never contain number
+ interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
+ accept?: string | undefined;
+ 'accept-language'?: string | undefined;
+ 'accept-patch'?: string | undefined;
+ 'accept-ranges'?: string | undefined;
+ 'access-control-allow-credentials'?: string | undefined;
+ 'access-control-allow-headers'?: string | undefined;
+ 'access-control-allow-methods'?: string | undefined;
+ 'access-control-allow-origin'?: string | undefined;
+ 'access-control-expose-headers'?: string | undefined;
+ 'access-control-max-age'?: string | undefined;
+ 'access-control-request-headers'?: string | undefined;
+ 'access-control-request-method'?: string | undefined;
+ age?: string | undefined;
+ allow?: string | undefined;
+ 'alt-svc'?: string | undefined;
+ authorization?: string | undefined;
+ 'cache-control'?: string | undefined;
+ connection?: string | undefined;
+ 'content-disposition'?: string | undefined;
+ 'content-encoding'?: string | undefined;
+ 'content-language'?: string | undefined;
+ 'content-length'?: string | undefined;
+ 'content-location'?: string | undefined;
+ 'content-range'?: string | undefined;
+ 'content-type'?: string | undefined;
+ cookie?: string | undefined;
+ date?: string | undefined;
+ etag?: string | undefined;
+ expect?: string | undefined;
+ expires?: string | undefined;
+ forwarded?: string | undefined;
+ from?: string | undefined;
+ host?: string | undefined;
+ 'if-match'?: string | undefined;
+ 'if-modified-since'?: string | undefined;
+ 'if-none-match'?: string | undefined;
+ 'if-unmodified-since'?: string | undefined;
+ 'last-modified'?: string | undefined;
+ location?: string | undefined;
+ origin?: string | undefined;
+ pragma?: string | undefined;
+ 'proxy-authenticate'?: string | undefined;
+ 'proxy-authorization'?: string | undefined;
+ 'public-key-pins'?: string | undefined;
+ range?: string | undefined;
+ referer?: string | undefined;
+ 'retry-after'?: string | undefined;
+ 'sec-websocket-accept'?: string | undefined;
+ 'sec-websocket-extensions'?: string | undefined;
+ 'sec-websocket-key'?: string | undefined;
+ 'sec-websocket-protocol'?: string | undefined;
+ 'sec-websocket-version'?: string | undefined;
+ 'set-cookie'?: string[] | undefined;
+ 'strict-transport-security'?: string | undefined;
+ tk?: string | undefined;
+ trailer?: string | undefined;
+ 'transfer-encoding'?: string | undefined;
+ upgrade?: string | undefined;
+ 'user-agent'?: string | undefined;
+ vary?: string | undefined;
+ via?: string | undefined;
+ warning?: string | undefined;
+ 'www-authenticate'?: string | undefined;
+ }
+ // outgoing headers allows numbers (as they are converted internally to strings)
+ type OutgoingHttpHeader = number | string | string[];
+ interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {}
+ interface ClientRequestArgs {
+ _defaultAgent?: Agent | undefined;
+ agent?: Agent | boolean | undefined;
+ auth?: string | null | undefined;
+ // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
+ createConnection?:
+ | ((options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket)
+ | undefined;
+ defaultPort?: number | string | undefined;
+ family?: number | undefined;
+ headers?: OutgoingHttpHeaders | undefined;
+ hints?: LookupOptions['hints'];
+ host?: string | null | undefined;
+ hostname?: string | null | undefined;
+ insecureHTTPParser?: boolean | undefined;
+ localAddress?: string | undefined;
+ localPort?: number | undefined;
+ lookup?: LookupFunction | undefined;
+ /**
+ * @default 16384
+ */
+ maxHeaderSize?: number | undefined;
+ method?: string | undefined;
+ path?: string | null | undefined;
+ port?: number | string | null | undefined;
+ protocol?: string | null | undefined;
+ setHost?: boolean | undefined;
+ signal?: AbortSignal | undefined;
+ socketPath?: string | undefined;
+ timeout?: number | undefined;
+ uniqueHeaders?: Array<string | string[]> | undefined;
+ joinDuplicateHeaders?: boolean;
+ }
+ interface ServerOptions<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ > {
+ /**
+ * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`.
+ */
+ IncomingMessage?: Request | undefined;
+ /**
+ * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`.
+ */
+ ServerResponse?: Response | undefined;
+ /**
+ * Sets the timeout value in milliseconds for receiving the entire request from the client.
+ * @see Server.requestTimeout for more information.
+ * @default 300000
+ * @since v18.0.0
+ */
+ requestTimeout?: number | undefined;
+ /**
+ * It joins the field line values of multiple headers in a request with `, ` instead of discarding the duplicates.
+ * @default false
+ * @since v18.14.0
+ */
+ joinDuplicateHeaders?: boolean;
+ /**
+ * The number of milliseconds of inactivity a server needs to wait for additional incoming data,
+ * after it has finished writing the last response, before a socket will be destroyed.
+ * @see Server.keepAliveTimeout for more information.
+ * @default 5000
+ * @since v18.0.0
+ */
+ keepAliveTimeout?: number | undefined;
+ /**
+ * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests.
+ * @default 30000
+ */
+ connectionsCheckingInterval?: number | undefined;
+ /**
+ * Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
+ * This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`.
+ * Default: @see stream.getDefaultHighWaterMark().
+ * @since v20.1.0
+ */
+ highWaterMark?: number | undefined;
+ /**
+ * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`.
+ * Using the insecure parser should be avoided.
+ * See --insecure-http-parser for more information.
+ * @default false
+ */
+ insecureHTTPParser?: boolean | undefined;
+ /**
+ * Optionally overrides the value of
+ * `--max-http-header-size` for requests received by this server, i.e.
+ * the maximum length of request headers in bytes.
+ * @default 16384
+ * @since v13.3.0
+ */
+ maxHeaderSize?: number | undefined;
+ /**
+ * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
+ * @default true
+ * @since v16.5.0
+ */
+ noDelay?: boolean | undefined;
+ /**
+ * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received,
+ * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`.
+ * @default false
+ * @since v16.5.0
+ */
+ keepAlive?: boolean | undefined;
+ /**
+ * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.
+ * @default 0
+ * @since v16.5.0
+ */
+ keepAliveInitialDelay?: number | undefined;
+ /**
+ * A list of response headers that should be sent only once.
+ * If the header's value is an array, the items will be joined using `; `.
+ */
+ uniqueHeaders?: Array<string | string[]> | undefined;
+ }
+ type RequestListener<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ > = (req: InstanceType<Request>, res: InstanceType<Response> & { req: InstanceType<Request> }) => void;
+ /**
+ * @since v0.1.17
+ */
+ class Server<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ > extends NetServer {
+ constructor(requestListener?: RequestListener<Request, Response>);
+ constructor(options: ServerOptions<Request, Response>, requestListener?: RequestListener<Request, Response>);
+ /**
+ * Sets the timeout value for sockets, and emits a `'timeout'` event on
+ * the Server object, passing the socket as an argument, if a timeout
+ * occurs.
+ *
+ * If there is a `'timeout'` event listener on the Server object, then it
+ * will be called with the timed-out socket as an argument.
+ *
+ * By default, the Server does not timeout sockets. However, if a callback
+ * is assigned to the Server's `'timeout'` event, timeouts must be handled
+ * explicitly.
+ * @since v0.9.12
+ * @param [msecs=0 (no timeout)]
+ */
+ setTimeout(msecs?: number, callback?: () => void): this;
+ setTimeout(callback: () => void): this;
+ /**
+ * Limits maximum incoming headers count. If set to 0, no limit will be applied.
+ * @since v0.7.0
+ */
+ maxHeadersCount: number | null;
+ /**
+ * The maximum number of requests socket can handle
+ * before closing keep alive connection.
+ *
+ * A value of `0` will disable the limit.
+ *
+ * When the limit is reached it will set the `Connection` header value to `close`,
+ * but will not actually close the connection, subsequent requests sent
+ * after the limit is reached will get `503 Service Unavailable` as a response.
+ * @since v16.10.0
+ */
+ maxRequestsPerSocket: number | null;
+ /**
+ * The number of milliseconds of inactivity before a socket is presumed
+ * to have timed out.
+ *
+ * A value of `0` will disable the timeout behavior on incoming connections.
+ *
+ * The socket timeout logic is set up on connection, so changing this
+ * value only affects new connections to the server, not any existing connections.
+ * @since v0.9.12
+ */
+ timeout: number;
+ /**
+ * Limit the amount of time the parser will wait to receive the complete HTTP
+ * headers.
+ *
+ * If the timeout expires, the server responds with status 408 without
+ * forwarding the request to the request listener and then closes the connection.
+ *
+ * It must be set to a non-zero value (e.g. 120 seconds) to protect against
+ * potential Denial-of-Service attacks in case the server is deployed without a
+ * reverse proxy in front.
+ * @since v11.3.0, v10.14.0
+ */
+ headersTimeout: number;
+ /**
+ * The number of milliseconds of inactivity a server needs to wait for additional
+ * incoming data, after it has finished writing the last response, before a socket
+ * will be destroyed. If the server receives new data before the keep-alive
+ * timeout has fired, it will reset the regular inactivity timeout, i.e.,`server.timeout`.
+ *
+ * A value of `0` will disable the keep-alive timeout behavior on incoming
+ * connections.
+ * A value of `0` makes the http server behave similarly to Node.js versions prior
+ * to 8.0.0, which did not have a keep-alive timeout.
+ *
+ * The socket timeout logic is set up on connection, so changing this value only
+ * affects new connections to the server, not any existing connections.
+ * @since v8.0.0
+ */
+ keepAliveTimeout: number;
+ /**
+ * Sets the timeout value in milliseconds for receiving the entire request from
+ * the client.
+ *
+ * If the timeout expires, the server responds with status 408 without
+ * forwarding the request to the request listener and then closes the connection.
+ *
+ * It must be set to a non-zero value (e.g. 120 seconds) to protect against
+ * potential Denial-of-Service attacks in case the server is deployed without a
+ * reverse proxy in front.
+ * @since v14.11.0
+ */
+ requestTimeout: number;
+ /**
+ * Closes all connections connected to this server.
+ * @since v18.2.0
+ */
+ closeAllConnections(): void;
+ /**
+ * Closes all connections connected to this server which are not sending a request
+ * or waiting for a response.
+ * @since v18.2.0
+ */
+ closeIdleConnections(): void;
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'connection', listener: (socket: Socket) => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'listening', listener: () => void): this;
+ addListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ addListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ addListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ addListener(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ addListener(event: 'dropRequest', listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
+ addListener(event: 'request', listener: RequestListener<Request, Response>): this;
+ addListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ emit(event: string, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'connection', socket: Socket): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'listening'): boolean;
+ emit(
+ event: 'checkContinue',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(
+ event: 'checkExpectation',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(event: 'clientError', err: Error, socket: stream.Duplex): boolean;
+ emit(event: 'connect', req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
+ emit(event: 'dropRequest', req: InstanceType<Request>, socket: stream.Duplex): boolean;
+ emit(
+ event: 'request',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(event: 'upgrade', req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'connection', listener: (socket: Socket) => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'listening', listener: () => void): this;
+ on(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ on(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ on(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ on(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ on(event: 'dropRequest', listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
+ on(event: 'request', listener: RequestListener<Request, Response>): this;
+ on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'connection', listener: (socket: Socket) => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'listening', listener: () => void): this;
+ once(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ once(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ once(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ once(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ once(event: 'dropRequest', listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
+ once(event: 'request', listener: RequestListener<Request, Response>): this;
+ once(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'connection', listener: (socket: Socket) => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'listening', listener: () => void): this;
+ prependListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ prependListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ prependListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ prependListener(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ prependListener(event: 'dropRequest', listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
+ prependListener(event: 'request', listener: RequestListener<Request, Response>): this;
+ prependListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'listening', listener: () => void): this;
+ prependOnceListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ prependOnceListener(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ prependOnceListener(event: 'dropRequest', listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
+ prependOnceListener(event: 'request', listener: RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ }
+ /**
+ * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract outgoing message from
+ * the perspective of the participants of an HTTP transaction.
+ * @since v0.1.17
+ */
+ class OutgoingMessage<Request extends IncomingMessage = IncomingMessage> extends stream.Writable {
+ readonly req: Request;
+ chunkedEncoding: boolean;
+ shouldKeepAlive: boolean;
+ useChunkedEncodingByDefault: boolean;
+ sendDate: boolean;
+ /**
+ * @deprecated Use `writableEnded` instead.
+ */
+ finished: boolean;
+ /**
+ * Read-only. `true` if the headers were sent, otherwise `false`.
+ * @since v0.9.3
+ */
+ readonly headersSent: boolean;
+ /**
+ * Alias of `outgoingMessage.socket`.
+ * @since v0.3.0
+ * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead.
+ */
+ readonly connection: Socket | null;
+ /**
+ * Reference to the underlying socket. Usually, users will not want to access
+ * this property.
+ *
+ * After calling `outgoingMessage.end()`, this property will be nulled.
+ * @since v0.3.0
+ */
+ readonly socket: Socket | null;
+ constructor();
+ /**
+ * Once a socket is associated with the message and is connected,`socket.setTimeout()` will be called with `msecs` as the first parameter.
+ * @since v0.9.12
+ * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event.
+ */
+ setTimeout(msecs: number, callback?: () => void): this;
+ /**
+ * Sets a single header value. If the header already exists in the to-be-sent
+ * headers, its value will be replaced. Use an array of strings to send multiple
+ * headers with the same name.
+ * @since v0.4.0
+ * @param name Header name
+ * @param value Header value
+ */
+ setHeader(name: string, value: number | string | ReadonlyArray<string>): this;
+ /**
+ * Append a single header value for the header object.
+ *
+ * If the value is an array, this is equivalent of calling this method multiple
+ * times.
+ *
+ * If there were no previous value for the header, this is equivalent of calling `outgoingMessage.setHeader(name, value)`.
+ *
+ * Depending of the value of `options.uniqueHeaders` when the client request or the
+ * server were created, this will end up in the header being sent multiple times or
+ * a single time with values joined using `; `.
+ * @since v18.3.0, v16.17.0
+ * @param name Header name
+ * @param value Header value
+ */
+ appendHeader(name: string, value: string | ReadonlyArray<string>): this;
+ /**
+ * Gets the value of the HTTP header with the given name. If that header is not
+ * set, the returned value will be `undefined`.
+ * @since v0.4.0
+ * @param name Name of header
+ */
+ getHeader(name: string): number | string | string[] | undefined;
+ /**
+ * Returns a shallow copy of the current outgoing headers. Since a shallow
+ * copy is used, array values may be mutated without additional calls to
+ * various header-related HTTP module methods. The keys of the returned
+ * object are the header names and the values are the respective header
+ * values. All header names are lowercase.
+ *
+ * The object returned by the `outgoingMessage.getHeaders()` method does
+ * not prototypically inherit from the JavaScript `Object`. This means that
+ * typical `Object` methods such as `obj.toString()`, `obj.hasOwnProperty()`,
+ * and others are not defined and will not work.
+ *
+ * ```js
+ * outgoingMessage.setHeader('Foo', 'bar');
+ * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+ *
+ * const headers = outgoingMessage.getHeaders();
+ * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] }
+ * ```
+ * @since v7.7.0
+ */
+ getHeaders(): OutgoingHttpHeaders;
+ /**
+ * Returns an array containing the unique names of the current outgoing headers.
+ * All names are lowercase.
+ * @since v7.7.0
+ */
+ getHeaderNames(): string[];
+ /**
+ * Returns `true` if the header identified by `name` is currently set in the
+ * outgoing headers. The header name is case-insensitive.
+ *
+ * ```js
+ * const hasContentType = outgoingMessage.hasHeader('content-type');
+ * ```
+ * @since v7.7.0
+ */
+ hasHeader(name: string): boolean;
+ /**
+ * Removes a header that is queued for implicit sending.
+ *
+ * ```js
+ * outgoingMessage.removeHeader('Content-Encoding');
+ * ```
+ * @since v0.4.0
+ * @param name Header name
+ */
+ removeHeader(name: string): void;
+ /**
+ * Adds HTTP trailers (headers but at the end of the message) to the message.
+ *
+ * Trailers will **only** be emitted if the message is chunked encoded. If not,
+ * the trailers will be silently discarded.
+ *
+ * HTTP requires the `Trailer` header to be sent to emit trailers,
+ * with a list of header field names in its value, e.g.
+ *
+ * ```js
+ * message.writeHead(200, { 'Content-Type': 'text/plain',
+ * 'Trailer': 'Content-MD5' });
+ * message.write(fileData);
+ * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' });
+ * message.end();
+ * ```
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ * @since v0.3.0
+ */
+ addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
+ /**
+ * Flushes the message headers.
+ *
+ * For efficiency reason, Node.js normally buffers the message headers
+ * until `outgoingMessage.end()` is called or the first chunk of message data
+ * is written. It then tries to pack the headers and data into a single TCP
+ * packet.
+ *
+ * It is usually desired (it saves a TCP round-trip), but not when the first
+ * data is not sent until possibly much later. `outgoingMessage.flushHeaders()`bypasses the optimization and kickstarts the message.
+ * @since v1.6.0
+ */
+ flushHeaders(): void;
+ }
+ /**
+ * This object is created internally by an HTTP server, not by the user. It is
+ * passed as the second parameter to the `'request'` event.
+ * @since v0.1.17
+ */
+ class ServerResponse<Request extends IncomingMessage = IncomingMessage> extends OutgoingMessage<Request> {
+ /**
+ * When using implicit headers (not calling `response.writeHead()` explicitly),
+ * this property controls the status code that will be sent to the client when
+ * the headers get flushed.
+ *
+ * ```js
+ * response.statusCode = 404;
+ * ```
+ *
+ * After response header was sent to the client, this property indicates the
+ * status code which was sent out.
+ * @since v0.4.0
+ */
+ statusCode: number;
+ /**
+ * When using implicit headers (not calling `response.writeHead()` explicitly),
+ * this property controls the status message that will be sent to the client when
+ * the headers get flushed. If this is left as `undefined` then the standard
+ * message for the status code will be used.
+ *
+ * ```js
+ * response.statusMessage = 'Not found';
+ * ```
+ *
+ * After response header was sent to the client, this property indicates the
+ * status message which was sent out.
+ * @since v0.11.8
+ */
+ statusMessage: string;
+ /**
+ * If set to `true`, Node.js will check whether the `Content-Length`header value and the size of the body, in bytes, are equal.
+ * Mismatching the `Content-Length` header value will result
+ * in an `Error` being thrown, identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`.
+ * @since v18.10.0, v16.18.0
+ */
+ strictContentLength: boolean;
+ constructor(req: Request);
+ assignSocket(socket: Socket): void;
+ detachSocket(socket: Socket): void;
+ /**
+ * Sends an HTTP/1.1 100 Continue message to the client, indicating that
+ * the request body should be sent. See the `'checkContinue'` event on`Server`.
+ * @since v0.3.0
+ */
+ writeContinue(callback?: () => void): void;
+ /**
+ * Sends an HTTP/1.1 103 Early Hints message to the client with a Link header,
+ * indicating that the user agent can preload/preconnect the linked resources.
+ * The `hints` is an object containing the values of headers to be sent with
+ * early hints message. The optional `callback` argument will be called when
+ * the response message has been written.
+ *
+ * **Example**
+ *
+ * ```js
+ * const earlyHintsLink = '</styles.css>; rel=preload; as=style';
+ * response.writeEarlyHints({
+ * 'link': earlyHintsLink,
+ * });
+ *
+ * const earlyHintsLinks = [
+ * '</styles.css>; rel=preload; as=style',
+ * '</scripts.js>; rel=preload; as=script',
+ * ];
+ * response.writeEarlyHints({
+ * 'link': earlyHintsLinks,
+ * 'x-trace-id': 'id for diagnostics',
+ * });
+ *
+ * const earlyHintsCallback = () => console.log('early hints message sent');
+ * response.writeEarlyHints({
+ * 'link': earlyHintsLinks,
+ * }, earlyHintsCallback);
+ * ```
+ * @since v18.11.0
+ * @param hints An object containing the values of headers
+ * @param callback Will be called when the response message has been written
+ */
+ writeEarlyHints(hints: Record<string, string | string[]>, callback?: () => void): void;
+ /**
+ * Sends a response header to the request. The status code is a 3-digit HTTP
+ * status code, like `404`. The last argument, `headers`, are the response headers.
+ * Optionally one can give a human-readable `statusMessage` as the second
+ * argument.
+ *
+ * `headers` may be an `Array` where the keys and values are in the same list.
+ * It is _not_ a list of tuples. So, the even-numbered offsets are key values,
+ * and the odd-numbered offsets are the associated values. The array is in the same
+ * format as `request.rawHeaders`.
+ *
+ * Returns a reference to the `ServerResponse`, so that calls can be chained.
+ *
+ * ```js
+ * const body = 'hello world';
+ * response
+ * .writeHead(200, {
+ * 'Content-Length': Buffer.byteLength(body),
+ * 'Content-Type': 'text/plain',
+ * })
+ * .end(body);
+ * ```
+ *
+ * This method must only be called once on a message and it must
+ * be called before `response.end()` is called.
+ *
+ * If `response.write()` or `response.end()` are called before calling
+ * this, the implicit/mutable headers will be calculated and call this function.
+ *
+ * When headers have been set with `response.setHeader()`, they will be merged
+ * with any headers passed to `response.writeHead()`, with the headers passed
+ * to `response.writeHead()` given precedence.
+ *
+ * If this method is called and `response.setHeader()` has not been called,
+ * it will directly write the supplied header values onto the network channel
+ * without caching internally, and the `response.getHeader()` on the header
+ * will not yield the expected result. If progressive population of headers is
+ * desired with potential future retrieval and modification, use `response.setHeader()` instead.
+ *
+ * ```js
+ * // Returns content-type = text/plain
+ * const server = http.createServer((req, res) => {
+ * res.setHeader('Content-Type', 'text/html');
+ * res.setHeader('X-Foo', 'bar');
+ * res.writeHead(200, { 'Content-Type': 'text/plain' });
+ * res.end('ok');
+ * });
+ * ```
+ *
+ * `Content-Length` is read in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js
+ * will check whether `Content-Length` and the length of the body which has
+ * been transmitted are equal or not.
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a \[`Error`\]\[\] being thrown.
+ * @since v0.1.30
+ */
+ writeHead(
+ statusCode: number,
+ statusMessage?: string,
+ headers?: OutgoingHttpHeaders | OutgoingHttpHeader[],
+ ): this;
+ writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
+ /**
+ * Sends a HTTP/1.1 102 Processing message to the client, indicating that
+ * the request body should be sent.
+ * @since v10.0.0
+ */
+ writeProcessing(): void;
+ }
+ interface InformationEvent {
+ statusCode: number;
+ statusMessage: string;
+ httpVersion: string;
+ httpVersionMajor: number;
+ httpVersionMinor: number;
+ headers: IncomingHttpHeaders;
+ rawHeaders: string[];
+ }
+ /**
+ * This object is created internally and returned from {@link request}. It
+ * represents an _in-progress_ request whose header has already been queued. The
+ * header is still mutable using the `setHeader(name, value)`,`getHeader(name)`, `removeHeader(name)` API. The actual header will
+ * be sent along with the first data chunk or when calling `request.end()`.
+ *
+ * To get the response, add a listener for `'response'` to the request object.`'response'` will be emitted from the request object when the response
+ * headers have been received. The `'response'` event is executed with one
+ * argument which is an instance of {@link IncomingMessage}.
+ *
+ * During the `'response'` event, one can add listeners to the
+ * response object; particularly to listen for the `'data'` event.
+ *
+ * If no `'response'` handler is added, then the response will be
+ * entirely discarded. However, if a `'response'` event handler is added,
+ * then the data from the response object **must** be consumed, either by
+ * calling `response.read()` whenever there is a `'readable'` event, or
+ * by adding a `'data'` handler, or by calling the `.resume()` method.
+ * Until the data is consumed, the `'end'` event will not fire. Also, until
+ * the data is read it will consume memory that can eventually lead to a
+ * 'process out of memory' error.
+ *
+ * For backward compatibility, `res` will only emit `'error'` if there is an`'error'` listener registered.
+ *
+ * Set `Content-Length` header to limit the response body size.
+ * If `response.strictContentLength` is set to `true`, mismatching the`Content-Length` header value will result in an `Error` being thrown,
+ * identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`.
+ *
+ * `Content-Length` value should be in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes.
+ * @since v0.1.17
+ */
+ class ClientRequest extends OutgoingMessage {
+ /**
+ * The `request.aborted` property will be `true` if the request has
+ * been aborted.
+ * @since v0.11.14
+ * @deprecated Since v17.0.0,v16.12.0 - Check `destroyed` instead.
+ */
+ aborted: boolean;
+ /**
+ * The request host.
+ * @since v14.5.0, v12.19.0
+ */
+ host: string;
+ /**
+ * The request protocol.
+ * @since v14.5.0, v12.19.0
+ */
+ protocol: string;
+ /**
+ * When sending request through a keep-alive enabled agent, the underlying socket
+ * might be reused. But if server closes connection at unfortunate time, client
+ * may run into a 'ECONNRESET' error.
+ *
+ * ```js
+ * const http = require('node:http');
+ *
+ * // Server has a 5 seconds keep-alive timeout by default
+ * http
+ * .createServer((req, res) => {
+ * res.write('hello\n');
+ * res.end();
+ * })
+ * .listen(3000);
+ *
+ * setInterval(() => {
+ * // Adapting a keep-alive agent
+ * http.get('http://localhost:3000', { agent }, (res) => {
+ * res.on('data', (data) => {
+ * // Do nothing
+ * });
+ * });
+ * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout
+ * ```
+ *
+ * By marking a request whether it reused socket or not, we can do
+ * automatic error retry base on it.
+ *
+ * ```js
+ * const http = require('node:http');
+ * const agent = new http.Agent({ keepAlive: true });
+ *
+ * function retriableRequest() {
+ * const req = http
+ * .get('http://localhost:3000', { agent }, (res) => {
+ * // ...
+ * })
+ * .on('error', (err) => {
+ * // Check if retry is needed
+ * if (req.reusedSocket &#x26;&#x26; err.code === 'ECONNRESET') {
+ * retriableRequest();
+ * }
+ * });
+ * }
+ *
+ * retriableRequest();
+ * ```
+ * @since v13.0.0, v12.16.0
+ */
+ reusedSocket: boolean;
+ /**
+ * Limits maximum response headers count. If set to 0, no limit will be applied.
+ */
+ maxHeadersCount: number;
+ constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
+ /**
+ * The request method.
+ * @since v0.1.97
+ */
+ method: string;
+ /**
+ * The request path.
+ * @since v0.4.0
+ */
+ path: string;
+ /**
+ * Marks the request as aborting. Calling this will cause remaining data
+ * in the response to be dropped and the socket to be destroyed.
+ * @since v0.3.8
+ * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead.
+ */
+ abort(): void;
+ onSocket(socket: Socket): void;
+ /**
+ * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called.
+ * @since v0.5.9
+ * @param timeout Milliseconds before a request times out.
+ * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event.
+ */
+ setTimeout(timeout: number, callback?: () => void): this;
+ /**
+ * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called.
+ * @since v0.5.9
+ */
+ setNoDelay(noDelay?: boolean): void;
+ /**
+ * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called.
+ * @since v0.5.9
+ */
+ setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
+ /**
+ * Returns an array containing the unique names of the current outgoing raw
+ * headers. Header names are returned with their exact casing being set.
+ *
+ * ```js
+ * request.setHeader('Foo', 'bar');
+ * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+ *
+ * const headerNames = request.getRawHeaderNames();
+ * // headerNames === ['Foo', 'Set-Cookie']
+ * ```
+ * @since v15.13.0, v14.17.0
+ */
+ getRawHeaderNames(): string[];
+ /**
+ * @deprecated
+ */
+ addListener(event: 'abort', listener: () => void): this;
+ addListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ addListener(event: 'continue', listener: () => void): this;
+ addListener(event: 'information', listener: (info: InformationEvent) => void): this;
+ addListener(event: 'response', listener: (response: IncomingMessage) => void): this;
+ addListener(event: 'socket', listener: (socket: Socket) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
+ on(event: 'abort', listener: () => void): this;
+ on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ on(event: 'continue', listener: () => void): this;
+ on(event: 'information', listener: (info: InformationEvent) => void): this;
+ on(event: 'response', listener: (response: IncomingMessage) => void): this;
+ on(event: 'socket', listener: (socket: Socket) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
+ once(event: 'abort', listener: () => void): this;
+ once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ once(event: 'continue', listener: () => void): this;
+ once(event: 'information', listener: (info: InformationEvent) => void): this;
+ once(event: 'response', listener: (response: IncomingMessage) => void): this;
+ once(event: 'socket', listener: (socket: Socket) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
+ prependListener(event: 'abort', listener: () => void): this;
+ prependListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ prependListener(event: 'continue', listener: () => void): this;
+ prependListener(event: 'information', listener: (info: InformationEvent) => void): this;
+ prependListener(event: 'response', listener: (response: IncomingMessage) => void): this;
+ prependListener(event: 'socket', listener: (socket: Socket) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
+ prependOnceListener(event: 'abort', listener: () => void): this;
+ prependOnceListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ prependOnceListener(event: 'continue', listener: () => void): this;
+ prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this;
+ prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this;
+ prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to
+ * access response
+ * status, headers, and data.
+ *
+ * Different from its `socket` value which is a subclass of `stream.Duplex`, the`IncomingMessage` itself extends `stream.Readable` and is created separately to
+ * parse and emit the incoming HTTP headers and payload, as the underlying socket
+ * may be reused multiple times in case of keep-alive.
+ * @since v0.1.17
+ */
+ class IncomingMessage extends stream.Readable {
+ constructor(socket: Socket);
+ /**
+ * The `message.aborted` property will be `true` if the request has
+ * been aborted.
+ * @since v10.1.0
+ * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from <a href="stream.html#class-streamreadable" class="type">stream.Readable</a>.
+ */
+ aborted: boolean;
+ /**
+ * In case of server request, the HTTP version sent by the client. In the case of
+ * client response, the HTTP version of the connected-to server.
+ * Probably either `'1.1'` or `'1.0'`.
+ *
+ * Also `message.httpVersionMajor` is the first integer and`message.httpVersionMinor` is the second.
+ * @since v0.1.1
+ */
+ httpVersion: string;
+ httpVersionMajor: number;
+ httpVersionMinor: number;
+ /**
+ * The `message.complete` property will be `true` if a complete HTTP message has
+ * been received and successfully parsed.
+ *
+ * This property is particularly useful as a means of determining if a client or
+ * server fully transmitted a message before a connection was terminated:
+ *
+ * ```js
+ * const req = http.request({
+ * host: '127.0.0.1',
+ * port: 8080,
+ * method: 'POST',
+ * }, (res) => {
+ * res.resume();
+ * res.on('end', () => {
+ * if (!res.complete)
+ * console.error(
+ * 'The connection was terminated while the message was still being sent');
+ * });
+ * });
+ * ```
+ * @since v0.3.0
+ */
+ complete: boolean;
+ /**
+ * Alias for `message.socket`.
+ * @since v0.1.90
+ * @deprecated Since v16.0.0 - Use `socket`.
+ */
+ connection: Socket;
+ /**
+ * The `net.Socket` object associated with the connection.
+ *
+ * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the
+ * client's authentication details.
+ *
+ * This property is guaranteed to be an instance of the `net.Socket` class,
+ * a subclass of `stream.Duplex`, unless the user specified a socket
+ * type other than `net.Socket` or internally nulled.
+ * @since v0.3.0
+ */
+ socket: Socket;
+ /**
+ * The request/response headers object.
+ *
+ * Key-value pairs of header names and values. Header names are lower-cased.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // { 'user-agent': 'curl/7.22.0',
+ * // host: '127.0.0.1:8000',
+ * // accept: '*' }
+ * console.log(request.headers);
+ * ```
+ *
+ * Duplicates in raw headers are handled in the following ways, depending on the
+ * header name:
+ *
+ * * Duplicates of `age`, `authorization`, `content-length`, `content-type`,`etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`,`last-modified`, `location`,
+ * `max-forwards`, `proxy-authorization`, `referer`,`retry-after`, `server`, or `user-agent` are discarded.
+ * To allow duplicate values of the headers listed above to be joined,
+ * use the option `joinDuplicateHeaders` in {@link request} and {@link createServer}. See RFC 9110 Section 5.3 for more
+ * information.
+ * * `set-cookie` is always an array. Duplicates are added to the array.
+ * * For duplicate `cookie` headers, the values are joined together with `; `.
+ * * For all other headers, the values are joined together with `, `.
+ * @since v0.1.5
+ */
+ headers: IncomingHttpHeaders;
+ /**
+ * Similar to `message.headers`, but there is no join logic and the values are
+ * always arrays of strings, even for headers received just once.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // { 'user-agent': ['curl/7.22.0'],
+ * // host: ['127.0.0.1:8000'],
+ * // accept: ['*'] }
+ * console.log(request.headersDistinct);
+ * ```
+ * @since v18.3.0, v16.17.0
+ */
+ headersDistinct: NodeJS.Dict<string[]>;
+ /**
+ * The raw request/response headers list exactly as they were received.
+ *
+ * The keys and values are in the same list. It is _not_ a
+ * list of tuples. So, the even-numbered offsets are key values, and the
+ * odd-numbered offsets are the associated values.
+ *
+ * Header names are not lowercased, and duplicates are not merged.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // [ 'user-agent',
+ * // 'this is invalid because there can be only one',
+ * // 'User-Agent',
+ * // 'curl/7.22.0',
+ * // 'Host',
+ * // '127.0.0.1:8000',
+ * // 'ACCEPT',
+ * // '*' ]
+ * console.log(request.rawHeaders);
+ * ```
+ * @since v0.11.6
+ */
+ rawHeaders: string[];
+ /**
+ * The request/response trailers object. Only populated at the `'end'` event.
+ * @since v0.3.0
+ */
+ trailers: NodeJS.Dict<string>;
+ /**
+ * Similar to `message.trailers`, but there is no join logic and the values are
+ * always arrays of strings, even for headers received just once.
+ * Only populated at the `'end'` event.
+ * @since v18.3.0, v16.17.0
+ */
+ trailersDistinct: NodeJS.Dict<string[]>;
+ /**
+ * The raw request/response trailer keys and values exactly as they were
+ * received. Only populated at the `'end'` event.
+ * @since v0.11.6
+ */
+ rawTrailers: string[];
+ /**
+ * Calls `message.socket.setTimeout(msecs, callback)`.
+ * @since v0.5.9
+ */
+ setTimeout(msecs: number, callback?: () => void): this;
+ /**
+ * **Only valid for request obtained from {@link Server}.**
+ *
+ * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`.
+ * @since v0.1.1
+ */
+ method?: string | undefined;
+ /**
+ * **Only valid for request obtained from {@link Server}.**
+ *
+ * Request URL string. This contains only the URL that is present in the actual
+ * HTTP request. Take the following request:
+ *
+ * ```http
+ * GET /status?name=ryan HTTP/1.1
+ * Accept: text/plain
+ * ```
+ *
+ * To parse the URL into its parts:
+ *
+ * ```js
+ * new URL(request.url, `http://${request.headers.host}`);
+ * ```
+ *
+ * When `request.url` is `'/status?name=ryan'` and `request.headers.host` is`'localhost:3000'`:
+ *
+ * ```console
+ * $ node
+ * > new URL(request.url, `http://${request.headers.host}`)
+ * URL {
+ * href: 'http://localhost:3000/status?name=ryan',
+ * origin: 'http://localhost:3000',
+ * protocol: 'http:',
+ * username: '',
+ * password: '',
+ * host: 'localhost:3000',
+ * hostname: 'localhost',
+ * port: '3000',
+ * pathname: '/status',
+ * search: '?name=ryan',
+ * searchParams: URLSearchParams { 'name' => 'ryan' },
+ * hash: ''
+ * }
+ * ```
+ * @since v0.1.90
+ */
+ url?: string | undefined;
+ /**
+ * **Only valid for response obtained from {@link ClientRequest}.**
+ *
+ * The 3-digit HTTP response status code. E.G. `404`.
+ * @since v0.1.1
+ */
+ statusCode?: number | undefined;
+ /**
+ * **Only valid for response obtained from {@link ClientRequest}.**
+ *
+ * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`.
+ * @since v0.11.10
+ */
+ statusMessage?: string | undefined;
+ /**
+ * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error`is provided, an `'error'` event is emitted on the socket and `error` is passed
+ * as an argument to any listeners on the event.
+ * @since v0.3.0
+ */
+ destroy(error?: Error): this;
+ }
+ interface AgentOptions extends Partial<TcpSocketConnectOpts> {
+ /**
+ * Keep sockets around in a pool to be used by other requests in the future. Default = false
+ */
+ keepAlive?: boolean | undefined;
+ /**
+ * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000.
+ * Only relevant if keepAlive is set to true.
+ */
+ keepAliveMsecs?: number | undefined;
+ /**
+ * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
+ */
+ maxSockets?: number | undefined;
+ /**
+ * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity.
+ */
+ maxTotalSockets?: number | undefined;
+ /**
+ * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
+ */
+ maxFreeSockets?: number | undefined;
+ /**
+ * Socket timeout in milliseconds. This will set the timeout after the socket is connected.
+ */
+ timeout?: number | undefined;
+ /**
+ * Scheduling strategy to apply when picking the next free socket to use.
+ * @default `lifo`
+ */
+ scheduling?: 'fifo' | 'lifo' | undefined;
+ }
+ /**
+ * An `Agent` is responsible for managing connection persistence
+ * and reuse for HTTP clients. It maintains a queue of pending requests
+ * for a given host and port, reusing a single socket connection for each
+ * until the queue is empty, at which time the socket is either destroyed
+ * or put into a pool where it is kept to be used again for requests to the
+ * same host and port. Whether it is destroyed or pooled depends on the`keepAlive` `option`.
+ *
+ * Pooled connections have TCP Keep-Alive enabled for them, but servers may
+ * still close idle connections, in which case they will be removed from the
+ * pool and a new connection will be made when a new HTTP request is made for
+ * that host and port. Servers may also refuse to allow multiple requests
+ * over the same connection, in which case the connection will have to be
+ * remade for every request and cannot be pooled. The `Agent` will still make
+ * the requests to that server, but each one will occur over a new connection.
+ *
+ * When a connection is closed by the client or the server, it is removed
+ * from the pool. Any unused sockets in the pool will be unrefed so as not
+ * to keep the Node.js process running when there are no outstanding requests.
+ * (see `socket.unref()`).
+ *
+ * It is good practice, to `destroy()` an `Agent` instance when it is no
+ * longer in use, because unused sockets consume OS resources.
+ *
+ * Sockets are removed from an agent when the socket emits either
+ * a `'close'` event or an `'agentRemove'` event. When intending to keep one
+ * HTTP request open for a long time without keeping it in the agent, something
+ * like the following may be done:
+ *
+ * ```js
+ * http.get(options, (res) => {
+ * // Do stuff
+ * }).on('socket', (socket) => {
+ * socket.emit('agentRemove');
+ * });
+ * ```
+ *
+ * An agent may also be used for an individual request. By providing`{agent: false}` as an option to the `http.get()` or `http.request()`functions, a one-time use `Agent` with default options
+ * will be used
+ * for the client connection.
+ *
+ * `agent:false`:
+ *
+ * ```js
+ * http.get({
+ * hostname: 'localhost',
+ * port: 80,
+ * path: '/',
+ * agent: false, // Create a new agent just for this one request
+ * }, (res) => {
+ * // Do stuff with response
+ * });
+ * ```
+ * @since v0.3.4
+ */
+ class Agent extends EventEmitter {
+ /**
+ * By default set to 256. For agents with `keepAlive` enabled, this
+ * sets the maximum number of sockets that will be left open in the free
+ * state.
+ * @since v0.11.7
+ */
+ maxFreeSockets: number;
+ /**
+ * By default set to `Infinity`. Determines how many concurrent sockets the agent
+ * can have open per origin. Origin is the returned value of `agent.getName()`.
+ * @since v0.3.6
+ */
+ maxSockets: number;
+ /**
+ * By default set to `Infinity`. Determines how many concurrent sockets the agent
+ * can have open. Unlike `maxSockets`, this parameter applies across all origins.
+ * @since v14.5.0, v12.19.0
+ */
+ maxTotalSockets: number;
+ /**
+ * An object which contains arrays of sockets currently awaiting use by
+ * the agent when `keepAlive` is enabled. Do not modify.
+ *
+ * Sockets in the `freeSockets` list will be automatically destroyed and
+ * removed from the array on `'timeout'`.
+ * @since v0.11.4
+ */
+ readonly freeSockets: NodeJS.ReadOnlyDict<Socket[]>;
+ /**
+ * An object which contains arrays of sockets currently in use by the
+ * agent. Do not modify.
+ * @since v0.3.6
+ */
+ readonly sockets: NodeJS.ReadOnlyDict<Socket[]>;
+ /**
+ * An object which contains queues of requests that have not yet been assigned to
+ * sockets. Do not modify.
+ * @since v0.5.9
+ */
+ readonly requests: NodeJS.ReadOnlyDict<IncomingMessage[]>;
+ constructor(opts?: AgentOptions);
+ /**
+ * Destroy any sockets that are currently in use by the agent.
+ *
+ * It is usually not necessary to do this. However, if using an
+ * agent with `keepAlive` enabled, then it is best to explicitly shut down
+ * the agent when it is no longer needed. Otherwise,
+ * sockets might stay open for quite a long time before the server
+ * terminates them.
+ * @since v0.11.4
+ */
+ destroy(): void;
+ }
+ const METHODS: string[];
+ const STATUS_CODES: {
+ [errorCode: number]: string | undefined;
+ [errorCode: string]: string | undefined;
+ };
+ /**
+ * Returns a new instance of {@link Server}.
+ *
+ * The `requestListener` is a function which is automatically
+ * added to the `'request'` event.
+ * @since v0.1.13
+ */
+ function createServer<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ >(requestListener?: RequestListener<Request, Response>): Server<Request, Response>;
+ function createServer<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ >(
+ options: ServerOptions<Request, Response>,
+ requestListener?: RequestListener<Request, Response>,
+ ): Server<Request, Response>;
+ // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly,
+ // create interface RequestOptions would make the naming more clear to developers
+ interface RequestOptions extends ClientRequestArgs {}
+ /**
+ * `options` in `socket.connect()` are also supported.
+ *
+ * Node.js maintains several connections per server to make HTTP requests.
+ * This function allows one to transparently issue requests.
+ *
+ * `url` can be a string or a `URL` object. If `url` is a
+ * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
+ *
+ * If both `url` and `options` are specified, the objects are merged, with the`options` properties taking precedence.
+ *
+ * The optional `callback` parameter will be added as a one-time listener for
+ * the `'response'` event.
+ *
+ * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to
+ * upload a file with a POST request, then write to the `ClientRequest` object.
+ *
+ * ```js
+ * const http = require('node:http');
+ *
+ * const postData = JSON.stringify({
+ * 'msg': 'Hello World!',
+ * });
+ *
+ * const options = {
+ * hostname: 'www.google.com',
+ * port: 80,
+ * path: '/upload',
+ * method: 'POST',
+ * headers: {
+ * 'Content-Type': 'application/json',
+ * 'Content-Length': Buffer.byteLength(postData),
+ * },
+ * };
+ *
+ * const req = http.request(options, (res) => {
+ * console.log(`STATUS: ${res.statusCode}`);
+ * console.log(`HEADERS: ${JSON.stringify(res.headers)}`);
+ * res.setEncoding('utf8');
+ * res.on('data', (chunk) => {
+ * console.log(`BODY: ${chunk}`);
+ * });
+ * res.on('end', () => {
+ * console.log('No more data in response.');
+ * });
+ * });
+ *
+ * req.on('error', (e) => {
+ * console.error(`problem with request: ${e.message}`);
+ * });
+ *
+ * // Write data to request body
+ * req.write(postData);
+ * req.end();
+ * ```
+ *
+ * In the example `req.end()` was called. With `http.request()` one
+ * must always call `req.end()` to signify the end of the request -
+ * even if there is no data being written to the request body.
+ *
+ * If any error is encountered during the request (be that with DNS resolution,
+ * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted
+ * on the returned request object. As with all `'error'` events, if no listeners
+ * are registered the error will be thrown.
+ *
+ * There are a few special headers that should be noted.
+ *
+ * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to
+ * the server should be persisted until the next request.
+ * * Sending a 'Content-Length' header will disable the default chunked encoding.
+ * * Sending an 'Expect' header will immediately send the request headers.
+ * Usually, when sending 'Expect: 100-continue', both a timeout and a listener
+ * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more
+ * information.
+ * * Sending an Authorization header will override using the `auth` option
+ * to compute basic authentication.
+ *
+ * Example using a `URL` as `options`:
+ *
+ * ```js
+ * const options = new URL('http://abc:xyz@example.com');
+ *
+ * const req = http.request(options, (res) => {
+ * // ...
+ * });
+ * ```
+ *
+ * In a successful request, the following events will be emitted in the following
+ * order:
+ *
+ * * `'socket'`
+ * * `'response'`
+ * * `'data'` any number of times, on the `res` object
+ * (`'data'` will not be emitted at all if the response body is empty, for
+ * instance, in most redirects)
+ * * `'end'` on the `res` object
+ * * `'close'`
+ *
+ * In the case of a connection error, the following events will be emitted:
+ *
+ * * `'socket'`
+ * * `'error'`
+ * * `'close'`
+ *
+ * In the case of a premature connection close before the response is received,
+ * the following events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`
+ * * `'close'`
+ *
+ * In the case of a premature connection close after the response is received,
+ * the following events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * `'response'`
+ * * `'data'` any number of times, on the `res` object
+ * * (connection closed here)
+ * * `'aborted'` on the `res` object
+ * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`
+ * * `'close'`
+ * * `'close'` on the `res` object
+ *
+ * If `req.destroy()` is called before a socket is assigned, the following
+ * events will be emitted in the following order:
+ *
+ * * (`req.destroy()` called here)
+ * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`, or the error with which `req.destroy()` was called
+ * * `'close'`
+ *
+ * If `req.destroy()` is called before the connection succeeds, the following
+ * events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * (`req.destroy()` called here)
+ * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`, or the error with which `req.destroy()` was called
+ * * `'close'`
+ *
+ * If `req.destroy()` is called after the response is received, the following
+ * events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * `'response'`
+ * * `'data'` any number of times, on the `res` object
+ * * (`req.destroy()` called here)
+ * * `'aborted'` on the `res` object
+ * * `'error'` on the `res` object with an error with message `'Error: aborted'`and code `'ECONNRESET'`, or the error with which `req.destroy()` was called
+ * * `'close'`
+ * * `'close'` on the `res` object
+ *
+ * If `req.abort()` is called before a socket is assigned, the following
+ * events will be emitted in the following order:
+ *
+ * * (`req.abort()` called here)
+ * * `'abort'`
+ * * `'close'`
+ *
+ * If `req.abort()` is called before the connection succeeds, the following
+ * events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * (`req.abort()` called here)
+ * * `'abort'`
+ * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`
+ * * `'close'`
+ *
+ * If `req.abort()` is called after the response is received, the following
+ * events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * `'response'`
+ * * `'data'` any number of times, on the `res` object
+ * * (`req.abort()` called here)
+ * * `'abort'`
+ * * `'aborted'` on the `res` object
+ * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`.
+ * * `'close'`
+ * * `'close'` on the `res` object
+ *
+ * Setting the `timeout` option or using the `setTimeout()` function will
+ * not abort the request or do anything besides add a `'timeout'` event.
+ *
+ * Passing an `AbortSignal` and then calling `abort()` on the corresponding`AbortController` will behave the same way as calling `.destroy()` on the
+ * request. Specifically, the `'error'` event will be emitted with an error with
+ * the message `'AbortError: The operation was aborted'`, the code `'ABORT_ERR'`and the `cause`, if one was provided.
+ * @since v0.3.6
+ */
+ function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
+ function request(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
+ /**
+ * Since most requests are GET requests without bodies, Node.js provides this
+ * convenience method. The only difference between this method and {@link request} is that it sets the method to GET and calls `req.end()`automatically. The callback must take care to consume the
+ * response
+ * data for reasons stated in {@link ClientRequest} section.
+ *
+ * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}.
+ *
+ * JSON fetching example:
+ *
+ * ```js
+ * http.get('http://localhost:8000/', (res) => {
+ * const { statusCode } = res;
+ * const contentType = res.headers['content-type'];
+ *
+ * let error;
+ * // Any 2xx status code signals a successful response but
+ * // here we're only checking for 200.
+ * if (statusCode !== 200) {
+ * error = new Error('Request Failed.\n' +
+ * `Status Code: ${statusCode}`);
+ * } else if (!/^application\/json/.test(contentType)) {
+ * error = new Error('Invalid content-type.\n' +
+ * `Expected application/json but received ${contentType}`);
+ * }
+ * if (error) {
+ * console.error(error.message);
+ * // Consume response data to free up memory
+ * res.resume();
+ * return;
+ * }
+ *
+ * res.setEncoding('utf8');
+ * let rawData = '';
+ * res.on('data', (chunk) => { rawData += chunk; });
+ * res.on('end', () => {
+ * try {
+ * const parsedData = JSON.parse(rawData);
+ * console.log(parsedData);
+ * } catch (e) {
+ * console.error(e.message);
+ * }
+ * });
+ * }).on('error', (e) => {
+ * console.error(`Got error: ${e.message}`);
+ * });
+ *
+ * // Create a local server to receive data from
+ * const server = http.createServer((req, res) => {
+ * res.writeHead(200, { 'Content-Type': 'application/json' });
+ * res.end(JSON.stringify({
+ * data: 'Hello World!',
+ * }));
+ * });
+ *
+ * server.listen(8000);
+ * ```
+ * @since v0.3.6
+ * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. Properties that are inherited from the prototype are ignored.
+ */
+ function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
+ function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
+ /**
+ * Performs the low-level validations on the provided `name` that are done when`res.setHeader(name, value)` is called.
+ *
+ * Passing illegal value as `name` will result in a `TypeError` being thrown,
+ * identified by `code: 'ERR_INVALID_HTTP_TOKEN'`.
+ *
+ * It is not necessary to use this method before passing headers to an HTTP request
+ * or response. The HTTP module will automatically validate such headers.
+ * Examples:
+ *
+ * Example:
+ *
+ * ```js
+ * const { validateHeaderName } = require('node:http');
+ *
+ * try {
+ * validateHeaderName('');
+ * } catch (err) {
+ * console.error(err instanceof TypeError); // --> true
+ * console.error(err.code); // --> 'ERR_INVALID_HTTP_TOKEN'
+ * console.error(err.message); // --> 'Header name must be a valid HTTP token [""]'
+ * }
+ * ```
+ * @since v14.3.0
+ * @param [label='Header name'] Label for error message.
+ */
+ function validateHeaderName(name: string): void;
+ /**
+ * Performs the low-level validations on the provided `value` that are done when`res.setHeader(name, value)` is called.
+ *
+ * Passing illegal value as `value` will result in a `TypeError` being thrown.
+ *
+ * * Undefined value error is identified by `code: 'ERR_HTTP_INVALID_HEADER_VALUE'`.
+ * * Invalid value character error is identified by `code: 'ERR_INVALID_CHAR'`.
+ *
+ * It is not necessary to use this method before passing headers to an HTTP request
+ * or response. The HTTP module will automatically validate such headers.
+ *
+ * Examples:
+ *
+ * ```js
+ * const { validateHeaderValue } = require('node:http');
+ *
+ * try {
+ * validateHeaderValue('x-my-header', undefined);
+ * } catch (err) {
+ * console.error(err instanceof TypeError); // --> true
+ * console.error(err.code === 'ERR_HTTP_INVALID_HEADER_VALUE'); // --> true
+ * console.error(err.message); // --> 'Invalid value "undefined" for header "x-my-header"'
+ * }
+ *
+ * try {
+ * validateHeaderValue('x-my-header', 'oʊmɪɡə');
+ * } catch (err) {
+ * console.error(err instanceof TypeError); // --> true
+ * console.error(err.code === 'ERR_INVALID_CHAR'); // --> true
+ * console.error(err.message); // --> 'Invalid character in header content ["x-my-header"]'
+ * }
+ * ```
+ * @since v14.3.0
+ * @param name Header name
+ * @param value Header value
+ */
+ function validateHeaderValue(name: string, value: string): void;
+ /**
+ * Set the maximum number of idle HTTP parsers.
+ * @since v18.8.0, v16.18.0
+ * @param [max=1000]
+ */
+ function setMaxIdleHTTPParsers(max: number): void;
+ let globalAgent: Agent;
+ /**
+ * Read-only property specifying the maximum allowed size of HTTP headers in bytes.
+ * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option.
+ */
+ const maxHeaderSize: number;
+}
+declare module 'node:http' {
+ export * from 'http';
+}
diff --git a/node_modules/@types/node/ts4.8/http2.d.ts b/node_modules/@types/node/ts4.8/http2.d.ts
new file mode 100755
index 0000000..1d29a2c
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/http2.d.ts
@@ -0,0 +1,2129 @@
+/**
+ * The `node:http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol.
+ * It can be accessed using:
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * ```
+ * @since v8.4.0
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/http2.js)
+ */
+declare module 'http2' {
+ import EventEmitter = require('node:events');
+ import * as fs from 'node:fs';
+ import * as net from 'node:net';
+ import * as stream from 'node:stream';
+ import * as tls from 'node:tls';
+ import * as url from 'node:url';
+ import { IncomingHttpHeaders as Http1IncomingHttpHeaders, OutgoingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http';
+ export { OutgoingHttpHeaders } from 'node:http';
+ export interface IncomingHttpStatusHeader {
+ ':status'?: number | undefined;
+ }
+ export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders {
+ ':path'?: string | undefined;
+ ':method'?: string | undefined;
+ ':authority'?: string | undefined;
+ ':scheme'?: string | undefined;
+ }
+ // Http2Stream
+ export interface StreamPriorityOptions {
+ exclusive?: boolean | undefined;
+ parent?: number | undefined;
+ weight?: number | undefined;
+ silent?: boolean | undefined;
+ }
+ export interface StreamState {
+ localWindowSize?: number | undefined;
+ state?: number | undefined;
+ localClose?: number | undefined;
+ remoteClose?: number | undefined;
+ sumDependencyWeight?: number | undefined;
+ weight?: number | undefined;
+ }
+ export interface ServerStreamResponseOptions {
+ endStream?: boolean | undefined;
+ waitForTrailers?: boolean | undefined;
+ }
+ export interface StatOptions {
+ offset: number;
+ length: number;
+ }
+ export interface ServerStreamFileResponseOptions {
+ statCheck?(stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions): void | boolean;
+ waitForTrailers?: boolean | undefined;
+ offset?: number | undefined;
+ length?: number | undefined;
+ }
+ export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions {
+ onError?(err: NodeJS.ErrnoException): void;
+ }
+ export interface Http2Stream extends stream.Duplex {
+ /**
+ * Set to `true` if the `Http2Stream` instance was aborted abnormally. When set,
+ * the `'aborted'` event will have been emitted.
+ * @since v8.4.0
+ */
+ readonly aborted: boolean;
+ /**
+ * This property shows the number of characters currently buffered to be written.
+ * See `net.Socket.bufferSize` for details.
+ * @since v11.2.0, v10.16.0
+ */
+ readonly bufferSize: number;
+ /**
+ * Set to `true` if the `Http2Stream` instance has been closed.
+ * @since v9.4.0
+ */
+ readonly closed: boolean;
+ /**
+ * Set to `true` if the `Http2Stream` instance has been destroyed and is no longer
+ * usable.
+ * @since v8.4.0
+ */
+ readonly destroyed: boolean;
+ /**
+ * Set to `true` if the `END_STREAM` flag was set in the request or response
+ * HEADERS frame received, indicating that no additional data should be received
+ * and the readable side of the `Http2Stream` will be closed.
+ * @since v10.11.0
+ */
+ readonly endAfterHeaders: boolean;
+ /**
+ * The numeric stream identifier of this `Http2Stream` instance. Set to `undefined`if the stream identifier has not yet been assigned.
+ * @since v8.4.0
+ */
+ readonly id?: number | undefined;
+ /**
+ * Set to `true` if the `Http2Stream` instance has not yet been assigned a
+ * numeric stream identifier.
+ * @since v9.4.0
+ */
+ readonly pending: boolean;
+ /**
+ * Set to the `RST_STREAM` `error code` reported when the `Http2Stream` is
+ * destroyed after either receiving an `RST_STREAM` frame from the connected peer,
+ * calling `http2stream.close()`, or `http2stream.destroy()`. Will be`undefined` if the `Http2Stream` has not been closed.
+ * @since v8.4.0
+ */
+ readonly rstCode: number;
+ /**
+ * An object containing the outbound headers sent for this `Http2Stream`.
+ * @since v9.5.0
+ */
+ readonly sentHeaders: OutgoingHttpHeaders;
+ /**
+ * An array of objects containing the outbound informational (additional) headers
+ * sent for this `Http2Stream`.
+ * @since v9.5.0
+ */
+ readonly sentInfoHeaders?: OutgoingHttpHeaders[] | undefined;
+ /**
+ * An object containing the outbound trailers sent for this `HttpStream`.
+ * @since v9.5.0
+ */
+ readonly sentTrailers?: OutgoingHttpHeaders | undefined;
+ /**
+ * A reference to the `Http2Session` instance that owns this `Http2Stream`. The
+ * value will be `undefined` after the `Http2Stream` instance is destroyed.
+ * @since v8.4.0
+ */
+ readonly session: Http2Session | undefined;
+ /**
+ * Provides miscellaneous information about the current state of the`Http2Stream`.
+ *
+ * A current state of this `Http2Stream`.
+ * @since v8.4.0
+ */
+ readonly state: StreamState;
+ /**
+ * Closes the `Http2Stream` instance by sending an `RST_STREAM` frame to the
+ * connected HTTP/2 peer.
+ * @since v8.4.0
+ * @param [code=http2.constants.NGHTTP2_NO_ERROR] Unsigned 32-bit integer identifying the error code.
+ * @param callback An optional function registered to listen for the `'close'` event.
+ */
+ close(code?: number, callback?: () => void): void;
+ /**
+ * Updates the priority for this `Http2Stream` instance.
+ * @since v8.4.0
+ */
+ priority(options: StreamPriorityOptions): void;
+ /**
+ * ```js
+ * const http2 = require('node:http2');
+ * const client = http2.connect('http://example.org:8000');
+ * const { NGHTTP2_CANCEL } = http2.constants;
+ * const req = client.request({ ':path': '/' });
+ *
+ * // Cancel the stream if there's no activity after 5 seconds
+ * req.setTimeout(5000, () => req.close(NGHTTP2_CANCEL));
+ * ```
+ * @since v8.4.0
+ */
+ setTimeout(msecs: number, callback?: () => void): void;
+ /**
+ * Sends a trailing `HEADERS` frame to the connected HTTP/2 peer. This method
+ * will cause the `Http2Stream` to be immediately closed and must only be
+ * called after the `'wantTrailers'` event has been emitted. When sending a
+ * request or sending a response, the `options.waitForTrailers` option must be set
+ * in order to keep the `Http2Stream` open after the final `DATA` frame so that
+ * trailers can be sent.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respond(undefined, { waitForTrailers: true });
+ * stream.on('wantTrailers', () => {
+ * stream.sendTrailers({ xyz: 'abc' });
+ * });
+ * stream.end('Hello World');
+ * });
+ * ```
+ *
+ * The HTTP/1 specification forbids trailers from containing HTTP/2 pseudo-header
+ * fields (e.g. `':method'`, `':path'`, etc).
+ * @since v10.0.0
+ */
+ sendTrailers(headers: OutgoingHttpHeaders): void;
+ addListener(event: 'aborted', listener: () => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'streamClosed', listener: (code: number) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: 'wantTrailers', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'aborted'): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'data', chunk: Buffer | string): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'finish'): boolean;
+ emit(event: 'frameError', frameType: number, errorCode: number): boolean;
+ emit(event: 'pipe', src: stream.Readable): boolean;
+ emit(event: 'unpipe', src: stream.Readable): boolean;
+ emit(event: 'streamClosed', code: number): boolean;
+ emit(event: 'timeout'): boolean;
+ emit(event: 'trailers', trailers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: 'wantTrailers'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'aborted', listener: () => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'streamClosed', listener: (code: number) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: 'wantTrailers', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'aborted', listener: () => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'streamClosed', listener: (code: number) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: 'wantTrailers', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'aborted', listener: () => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'streamClosed', listener: (code: number) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: 'wantTrailers', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'aborted', listener: () => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'streamClosed', listener: (code: number) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: 'wantTrailers', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface ClientHttp2Stream extends Http2Stream {
+ addListener(event: 'continue', listener: () => {}): this;
+ addListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ addListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'continue'): boolean;
+ emit(event: 'headers', headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+ emit(event: 'push', headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: 'response', headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'continue', listener: () => {}): this;
+ on(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ on(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'continue', listener: () => {}): this;
+ once(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ once(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'continue', listener: () => {}): this;
+ prependListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'continue', listener: () => {}): this;
+ prependOnceListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependOnceListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface ServerHttp2Stream extends Http2Stream {
+ /**
+ * True if headers were sent, false otherwise (read-only).
+ * @since v8.4.0
+ */
+ readonly headersSent: boolean;
+ /**
+ * Read-only property mapped to the `SETTINGS_ENABLE_PUSH` flag of the remote
+ * client's most recent `SETTINGS` frame. Will be `true` if the remote peer
+ * accepts push streams, `false` otherwise. Settings are the same for every`Http2Stream` in the same `Http2Session`.
+ * @since v8.4.0
+ */
+ readonly pushAllowed: boolean;
+ /**
+ * Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer.
+ * @since v8.4.0
+ */
+ additionalHeaders(headers: OutgoingHttpHeaders): void;
+ /**
+ * Initiates a push stream. The callback is invoked with the new `Http2Stream`instance created for the push stream passed as the second argument, or an`Error` passed as the first argument.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respond({ ':status': 200 });
+ * stream.pushStream({ ':path': '/' }, (err, pushStream, headers) => {
+ * if (err) throw err;
+ * pushStream.respond({ ':status': 200 });
+ * pushStream.end('some pushed data');
+ * });
+ * stream.end('some data');
+ * });
+ * ```
+ *
+ * Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass
+ * a `weight` value to `http2stream.priority` with the `silent` option set to`true` to enable server-side bandwidth balancing between concurrent streams.
+ *
+ * Calling `http2stream.pushStream()` from within a pushed stream is not permitted
+ * and will throw an error.
+ * @since v8.4.0
+ * @param callback Callback that is called once the push stream has been initiated.
+ */
+ pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
+ pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
+ /**
+ * ```js
+ * const http2 = require('node:http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respond({ ':status': 200 });
+ * stream.end('some data');
+ * });
+ * ```
+ *
+ * Initiates a response. When the `options.waitForTrailers` option is set, the`'wantTrailers'` event will be emitted immediately after queuing the last chunk
+ * of payload data to be sent. The `http2stream.sendTrailers()` method can then be
+ * used to sent trailing header fields to the peer.
+ *
+ * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+ * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respond({ ':status': 200 }, { waitForTrailers: true });
+ * stream.on('wantTrailers', () => {
+ * stream.sendTrailers({ ABC: 'some value to send' });
+ * });
+ * stream.end('some data');
+ * });
+ * ```
+ * @since v8.4.0
+ */
+ respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void;
+ /**
+ * Initiates a response whose data is read from the given file descriptor. No
+ * validation is performed on the given file descriptor. If an error occurs while
+ * attempting to read data using the file descriptor, the `Http2Stream` will be
+ * closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code.
+ *
+ * When used, the `Http2Stream` object's `Duplex` interface will be closed
+ * automatically.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const fs = require('node:fs');
+ *
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * const fd = fs.openSync('/some/file', 'r');
+ *
+ * const stat = fs.fstatSync(fd);
+ * const headers = {
+ * 'content-length': stat.size,
+ * 'last-modified': stat.mtime.toUTCString(),
+ * 'content-type': 'text/plain; charset=utf-8',
+ * };
+ * stream.respondWithFD(fd, headers);
+ * stream.on('close', () => fs.closeSync(fd));
+ * });
+ * ```
+ *
+ * The optional `options.statCheck` function may be specified to give user code
+ * an opportunity to set additional content headers based on the `fs.Stat` details
+ * of the given fd. If the `statCheck` function is provided, the`http2stream.respondWithFD()` method will perform an `fs.fstat()` call to
+ * collect details on the provided file descriptor.
+ *
+ * The `offset` and `length` options may be used to limit the response to a
+ * specific range subset. This can be used, for instance, to support HTTP Range
+ * requests.
+ *
+ * The file descriptor or `FileHandle` is not closed when the stream is closed,
+ * so it will need to be closed manually once it is no longer needed.
+ * Using the same file descriptor concurrently for multiple streams
+ * is not supported and may result in data loss. Re-using a file descriptor
+ * after a stream has finished is supported.
+ *
+ * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+ * will be emitted immediately after queuing the last chunk of payload data to be
+ * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing
+ * header fields to the peer.
+ *
+ * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+ * close when the final `DATA` frame is transmitted. User code _must_ call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const fs = require('node:fs');
+ *
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * const fd = fs.openSync('/some/file', 'r');
+ *
+ * const stat = fs.fstatSync(fd);
+ * const headers = {
+ * 'content-length': stat.size,
+ * 'last-modified': stat.mtime.toUTCString(),
+ * 'content-type': 'text/plain; charset=utf-8',
+ * };
+ * stream.respondWithFD(fd, headers, { waitForTrailers: true });
+ * stream.on('wantTrailers', () => {
+ * stream.sendTrailers({ ABC: 'some value to send' });
+ * });
+ *
+ * stream.on('close', () => fs.closeSync(fd));
+ * });
+ * ```
+ * @since v8.4.0
+ * @param fd A readable file descriptor.
+ */
+ respondWithFD(fd: number | fs.promises.FileHandle, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void;
+ /**
+ * Sends a regular file as the response. The `path` must specify a regular file
+ * or an `'error'` event will be emitted on the `Http2Stream` object.
+ *
+ * When used, the `Http2Stream` object's `Duplex` interface will be closed
+ * automatically.
+ *
+ * The optional `options.statCheck` function may be specified to give user code
+ * an opportunity to set additional content headers based on the `fs.Stat` details
+ * of the given file:
+ *
+ * If an error occurs while attempting to read the file data, the `Http2Stream`will be closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR`code. If the `onError` callback is
+ * defined, then it will be called. Otherwise
+ * the stream will be destroyed.
+ *
+ * Example using a file path:
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * function statCheck(stat, headers) {
+ * headers['last-modified'] = stat.mtime.toUTCString();
+ * }
+ *
+ * function onError(err) {
+ * // stream.respond() can throw if the stream has been destroyed by
+ * // the other side.
+ * try {
+ * if (err.code === 'ENOENT') {
+ * stream.respond({ ':status': 404 });
+ * } else {
+ * stream.respond({ ':status': 500 });
+ * }
+ * } catch (err) {
+ * // Perform actual error handling.
+ * console.error(err);
+ * }
+ * stream.end();
+ * }
+ *
+ * stream.respondWithFile('/some/file',
+ * { 'content-type': 'text/plain; charset=utf-8' },
+ * { statCheck, onError });
+ * });
+ * ```
+ *
+ * The `options.statCheck` function may also be used to cancel the send operation
+ * by returning `false`. For instance, a conditional request may check the stat
+ * results to determine if the file has been modified to return an appropriate`304` response:
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * function statCheck(stat, headers) {
+ * // Check the stat here...
+ * stream.respond({ ':status': 304 });
+ * return false; // Cancel the send operation
+ * }
+ * stream.respondWithFile('/some/file',
+ * { 'content-type': 'text/plain; charset=utf-8' },
+ * { statCheck });
+ * });
+ * ```
+ *
+ * The `content-length` header field will be automatically set.
+ *
+ * The `offset` and `length` options may be used to limit the response to a
+ * specific range subset. This can be used, for instance, to support HTTP Range
+ * requests.
+ *
+ * The `options.onError` function may also be used to handle all the errors
+ * that could happen before the delivery of the file is initiated. The
+ * default behavior is to destroy the stream.
+ *
+ * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+ * will be emitted immediately after queuing the last chunk of payload data to be
+ * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing
+ * header fields to the peer.
+ *
+ * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+ * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respondWithFile('/some/file',
+ * { 'content-type': 'text/plain; charset=utf-8' },
+ * { waitForTrailers: true });
+ * stream.on('wantTrailers', () => {
+ * stream.sendTrailers({ ABC: 'some value to send' });
+ * });
+ * });
+ * ```
+ * @since v8.4.0
+ */
+ respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void;
+ }
+ // Http2Session
+ export interface Settings {
+ headerTableSize?: number | undefined;
+ enablePush?: boolean | undefined;
+ initialWindowSize?: number | undefined;
+ maxFrameSize?: number | undefined;
+ maxConcurrentStreams?: number | undefined;
+ maxHeaderListSize?: number | undefined;
+ enableConnectProtocol?: boolean | undefined;
+ }
+ export interface ClientSessionRequestOptions {
+ endStream?: boolean | undefined;
+ exclusive?: boolean | undefined;
+ parent?: number | undefined;
+ weight?: number | undefined;
+ waitForTrailers?: boolean | undefined;
+ signal?: AbortSignal | undefined;
+ }
+ export interface SessionState {
+ effectiveLocalWindowSize?: number | undefined;
+ effectiveRecvDataLength?: number | undefined;
+ nextStreamID?: number | undefined;
+ localWindowSize?: number | undefined;
+ lastProcStreamID?: number | undefined;
+ remoteWindowSize?: number | undefined;
+ outboundQueueSize?: number | undefined;
+ deflateDynamicTableSize?: number | undefined;
+ inflateDynamicTableSize?: number | undefined;
+ }
+ export interface Http2Session extends EventEmitter {
+ /**
+ * Value will be `undefined` if the `Http2Session` is not yet connected to a
+ * socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or
+ * will return the value of the connected `TLSSocket`'s own `alpnProtocol`property.
+ * @since v9.4.0
+ */
+ readonly alpnProtocol?: string | undefined;
+ /**
+ * Will be `true` if this `Http2Session` instance has been closed, otherwise`false`.
+ * @since v9.4.0
+ */
+ readonly closed: boolean;
+ /**
+ * Will be `true` if this `Http2Session` instance is still connecting, will be set
+ * to `false` before emitting `connect` event and/or calling the `http2.connect`callback.
+ * @since v10.0.0
+ */
+ readonly connecting: boolean;
+ /**
+ * Will be `true` if this `Http2Session` instance has been destroyed and must no
+ * longer be used, otherwise `false`.
+ * @since v8.4.0
+ */
+ readonly destroyed: boolean;
+ /**
+ * Value is `undefined` if the `Http2Session` session socket has not yet been
+ * connected, `true` if the `Http2Session` is connected with a `TLSSocket`,
+ * and `false` if the `Http2Session` is connected to any other kind of socket
+ * or stream.
+ * @since v9.4.0
+ */
+ readonly encrypted?: boolean | undefined;
+ /**
+ * A prototype-less object describing the current local settings of this`Http2Session`. The local settings are local to _this_`Http2Session` instance.
+ * @since v8.4.0
+ */
+ readonly localSettings: Settings;
+ /**
+ * If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property
+ * will return an `Array` of origins for which the `Http2Session` may be
+ * considered authoritative.
+ *
+ * The `originSet` property is only available when using a secure TLS connection.
+ * @since v9.4.0
+ */
+ readonly originSet?: string[] | undefined;
+ /**
+ * Indicates whether the `Http2Session` is currently waiting for acknowledgment of
+ * a sent `SETTINGS` frame. Will be `true` after calling the`http2session.settings()` method. Will be `false` once all sent `SETTINGS`frames have been acknowledged.
+ * @since v8.4.0
+ */
+ readonly pendingSettingsAck: boolean;
+ /**
+ * A prototype-less object describing the current remote settings of this`Http2Session`. The remote settings are set by the _connected_ HTTP/2 peer.
+ * @since v8.4.0
+ */
+ readonly remoteSettings: Settings;
+ /**
+ * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but
+ * limits available methods to ones safe to use with HTTP/2.
+ *
+ * `destroy`, `emit`, `end`, `pause`, `read`, `resume`, and `write` will throw
+ * an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for more information.
+ *
+ * `setTimeout` method will be called on this `Http2Session`.
+ *
+ * All other interactions will be routed directly to the socket.
+ * @since v8.4.0
+ */
+ readonly socket: net.Socket | tls.TLSSocket;
+ /**
+ * Provides miscellaneous information about the current state of the`Http2Session`.
+ *
+ * An object describing the current status of this `Http2Session`.
+ * @since v8.4.0
+ */
+ readonly state: SessionState;
+ /**
+ * The `http2session.type` will be equal to`http2.constants.NGHTTP2_SESSION_SERVER` if this `Http2Session` instance is a
+ * server, and `http2.constants.NGHTTP2_SESSION_CLIENT` if the instance is a
+ * client.
+ * @since v8.4.0
+ */
+ readonly type: number;
+ /**
+ * Gracefully closes the `Http2Session`, allowing any existing streams to
+ * complete on their own and preventing new `Http2Stream` instances from being
+ * created. Once closed, `http2session.destroy()`_might_ be called if there
+ * are no open `Http2Stream` instances.
+ *
+ * If specified, the `callback` function is registered as a handler for the`'close'` event.
+ * @since v9.4.0
+ */
+ close(callback?: () => void): void;
+ /**
+ * Immediately terminates the `Http2Session` and the associated `net.Socket` or`tls.TLSSocket`.
+ *
+ * Once destroyed, the `Http2Session` will emit the `'close'` event. If `error`is not undefined, an `'error'` event will be emitted immediately before the`'close'` event.
+ *
+ * If there are any remaining open `Http2Streams` associated with the`Http2Session`, those will also be destroyed.
+ * @since v8.4.0
+ * @param error An `Error` object if the `Http2Session` is being destroyed due to an error.
+ * @param code The HTTP/2 error code to send in the final `GOAWAY` frame. If unspecified, and `error` is not undefined, the default is `INTERNAL_ERROR`, otherwise defaults to `NO_ERROR`.
+ */
+ destroy(error?: Error, code?: number): void;
+ /**
+ * Transmits a `GOAWAY` frame to the connected peer _without_ shutting down the`Http2Session`.
+ * @since v9.4.0
+ * @param code An HTTP/2 error code
+ * @param lastStreamID The numeric ID of the last processed `Http2Stream`
+ * @param opaqueData A `TypedArray` or `DataView` instance containing additional data to be carried within the `GOAWAY` frame.
+ */
+ goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void;
+ /**
+ * Sends a `PING` frame to the connected HTTP/2 peer. A `callback` function must
+ * be provided. The method will return `true` if the `PING` was sent, `false`otherwise.
+ *
+ * The maximum number of outstanding (unacknowledged) pings is determined by the`maxOutstandingPings` configuration option. The default maximum is 10.
+ *
+ * If provided, the `payload` must be a `Buffer`, `TypedArray`, or `DataView`containing 8 bytes of data that will be transmitted with the `PING` and
+ * returned with the ping acknowledgment.
+ *
+ * The callback will be invoked with three arguments: an error argument that will
+ * be `null` if the `PING` was successfully acknowledged, a `duration` argument
+ * that reports the number of milliseconds elapsed since the ping was sent and the
+ * acknowledgment was received, and a `Buffer` containing the 8-byte `PING`payload.
+ *
+ * ```js
+ * session.ping(Buffer.from('abcdefgh'), (err, duration, payload) => {
+ * if (!err) {
+ * console.log(`Ping acknowledged in ${duration} milliseconds`);
+ * console.log(`With payload '${payload.toString()}'`);
+ * }
+ * });
+ * ```
+ *
+ * If the `payload` argument is not specified, the default payload will be the
+ * 64-bit timestamp (little endian) marking the start of the `PING` duration.
+ * @since v8.9.3
+ * @param payload Optional ping payload.
+ */
+ ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
+ ping(payload: NodeJS.ArrayBufferView, callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
+ /**
+ * Calls `ref()` on this `Http2Session`instance's underlying `net.Socket`.
+ * @since v9.4.0
+ */
+ ref(): void;
+ /**
+ * Sets the local endpoint's window size.
+ * The `windowSize` is the total window size to set, not
+ * the delta.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ *
+ * const server = http2.createServer();
+ * const expectedWindowSize = 2 ** 20;
+ * server.on('connect', (session) => {
+ *
+ * // Set local window size to be 2 ** 20
+ * session.setLocalWindowSize(expectedWindowSize);
+ * });
+ * ```
+ * @since v15.3.0, v14.18.0
+ */
+ setLocalWindowSize(windowSize: number): void;
+ /**
+ * Used to set a callback function that is called when there is no activity on
+ * the `Http2Session` after `msecs` milliseconds. The given `callback` is
+ * registered as a listener on the `'timeout'` event.
+ * @since v8.4.0
+ */
+ setTimeout(msecs: number, callback?: () => void): void;
+ /**
+ * Updates the current local settings for this `Http2Session` and sends a new`SETTINGS` frame to the connected HTTP/2 peer.
+ *
+ * Once called, the `http2session.pendingSettingsAck` property will be `true`while the session is waiting for the remote peer to acknowledge the new
+ * settings.
+ *
+ * The new settings will not become effective until the `SETTINGS` acknowledgment
+ * is received and the `'localSettings'` event is emitted. It is possible to send
+ * multiple `SETTINGS` frames while acknowledgment is still pending.
+ * @since v8.4.0
+ * @param callback Callback that is called once the session is connected or right away if the session is already connected.
+ */
+ settings(settings: Settings, callback?: (err: Error | null, settings: Settings, duration: number) => void): void;
+ /**
+ * Calls `unref()` on this `Http2Session`instance's underlying `net.Socket`.
+ * @since v9.4.0
+ */
+ unref(): void;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ addListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ addListener(event: 'localSettings', listener: (settings: Settings) => void): this;
+ addListener(event: 'ping', listener: () => void): this;
+ addListener(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'frameError', frameType: number, errorCode: number, streamID: number): boolean;
+ emit(event: 'goaway', errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean;
+ emit(event: 'localSettings', settings: Settings): boolean;
+ emit(event: 'ping'): boolean;
+ emit(event: 'remoteSettings', settings: Settings): boolean;
+ emit(event: 'timeout'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ on(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ on(event: 'localSettings', listener: (settings: Settings) => void): this;
+ on(event: 'ping', listener: () => void): this;
+ on(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ once(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ once(event: 'localSettings', listener: (settings: Settings) => void): this;
+ once(event: 'ping', listener: () => void): this;
+ once(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ prependListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ prependListener(event: 'localSettings', listener: (settings: Settings) => void): this;
+ prependListener(event: 'ping', listener: () => void): this;
+ prependListener(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ prependOnceListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ prependOnceListener(event: 'localSettings', listener: (settings: Settings) => void): this;
+ prependOnceListener(event: 'ping', listener: () => void): this;
+ prependOnceListener(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface ClientHttp2Session extends Http2Session {
+ /**
+ * For HTTP/2 Client `Http2Session` instances only, the `http2session.request()`creates and returns an `Http2Stream` instance that can be used to send an
+ * HTTP/2 request to the connected server.
+ *
+ * When a `ClientHttp2Session` is first created, the socket may not yet be
+ * connected. if `clienthttp2session.request()` is called during this time, the
+ * actual request will be deferred until the socket is ready to go.
+ * If the `session` is closed before the actual request be executed, an`ERR_HTTP2_GOAWAY_SESSION` is thrown.
+ *
+ * This method is only available if `http2session.type` is equal to`http2.constants.NGHTTP2_SESSION_CLIENT`.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const clientSession = http2.connect('https://localhost:1234');
+ * const {
+ * HTTP2_HEADER_PATH,
+ * HTTP2_HEADER_STATUS,
+ * } = http2.constants;
+ *
+ * const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' });
+ * req.on('response', (headers) => {
+ * console.log(headers[HTTP2_HEADER_STATUS]);
+ * req.on('data', (chunk) => { // .. });
+ * req.on('end', () => { // .. });
+ * });
+ * ```
+ *
+ * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+ * is emitted immediately after queuing the last chunk of payload data to be sent.
+ * The `http2stream.sendTrailers()` method can then be called to send trailing
+ * headers to the peer.
+ *
+ * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+ * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+ *
+ * When `options.signal` is set with an `AbortSignal` and then `abort` on the
+ * corresponding `AbortController` is called, the request will emit an `'error'`event with an `AbortError` error.
+ *
+ * The `:method` and `:path` pseudo-headers are not specified within `headers`,
+ * they respectively default to:
+ *
+ * * `:method` \= `'GET'`
+ * * `:path` \= `/`
+ * @since v8.4.0
+ */
+ request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream;
+ addListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ addListener(event: 'origin', listener: (origins: string[]) => void): this;
+ addListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ addListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'altsvc', alt: string, origin: string, stream: number): boolean;
+ emit(event: 'origin', origins: ReadonlyArray<string>): boolean;
+ emit(event: 'connect', session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
+ emit(event: 'stream', stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ on(event: 'origin', listener: (origins: string[]) => void): this;
+ on(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ on(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ once(event: 'origin', listener: (origins: string[]) => void): this;
+ once(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ once(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ prependListener(event: 'origin', listener: (origins: string[]) => void): this;
+ prependListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ prependOnceListener(event: 'origin', listener: (origins: string[]) => void): this;
+ prependOnceListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface AlternativeServiceOptions {
+ origin: number | string | url.URL;
+ }
+ export interface ServerHttp2Session extends Http2Session {
+ readonly server: Http2Server | Http2SecureServer;
+ /**
+ * Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ *
+ * const server = http2.createServer();
+ * server.on('session', (session) => {
+ * // Set altsvc for origin https://example.org:80
+ * session.altsvc('h2=":8000"', 'https://example.org:80');
+ * });
+ *
+ * server.on('stream', (stream) => {
+ * // Set altsvc for a specific stream
+ * stream.session.altsvc('h2=":8000"', stream.id);
+ * });
+ * ```
+ *
+ * Sending an `ALTSVC` frame with a specific stream ID indicates that the alternate
+ * service is associated with the origin of the given `Http2Stream`.
+ *
+ * The `alt` and origin string _must_ contain only ASCII bytes and are
+ * strictly interpreted as a sequence of ASCII bytes. The special value `'clear'`may be passed to clear any previously set alternative service for a given
+ * domain.
+ *
+ * When a string is passed for the `originOrStream` argument, it will be parsed as
+ * a URL and the origin will be derived. For instance, the origin for the
+ * HTTP URL `'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given string
+ * cannot be parsed as a URL or if a valid origin cannot be derived.
+ *
+ * A `URL` object, or any object with an `origin` property, may be passed as`originOrStream`, in which case the value of the `origin` property will be
+ * used. The value of the `origin` property _must_ be a properly serialized
+ * ASCII origin.
+ * @since v9.4.0
+ * @param alt A description of the alternative service configuration as defined by `RFC 7838`.
+ * @param originOrStream Either a URL string specifying the origin (or an `Object` with an `origin` property) or the numeric identifier of an active `Http2Stream` as given by the
+ * `http2stream.id` property.
+ */
+ altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void;
+ /**
+ * Submits an `ORIGIN` frame (as defined by [RFC 8336](https://tools.ietf.org/html/rfc8336)) to the connected client
+ * to advertise the set of origins for which the server is capable of providing
+ * authoritative responses.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const options = getSecureOptionsSomehow();
+ * const server = http2.createSecureServer(options);
+ * server.on('stream', (stream) => {
+ * stream.respond();
+ * stream.end('ok');
+ * });
+ * server.on('session', (session) => {
+ * session.origin('https://example.com', 'https://example.org');
+ * });
+ * ```
+ *
+ * When a string is passed as an `origin`, it will be parsed as a URL and the
+ * origin will be derived. For instance, the origin for the HTTP URL`'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given
+ * string
+ * cannot be parsed as a URL or if a valid origin cannot be derived.
+ *
+ * A `URL` object, or any object with an `origin` property, may be passed as
+ * an `origin`, in which case the value of the `origin` property will be
+ * used. The value of the `origin` property _must_ be a properly serialized
+ * ASCII origin.
+ *
+ * Alternatively, the `origins` option may be used when creating a new HTTP/2
+ * server using the `http2.createSecureServer()` method:
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const options = getSecureOptionsSomehow();
+ * options.origins = ['https://example.com', 'https://example.org'];
+ * const server = http2.createSecureServer(options);
+ * server.on('stream', (stream) => {
+ * stream.respond();
+ * stream.end('ok');
+ * });
+ * ```
+ * @since v10.12.0
+ * @param origins One or more URL Strings passed as separate arguments.
+ */
+ origin(
+ ...origins: Array<
+ | string
+ | url.URL
+ | {
+ origin: string;
+ }
+ >
+ ): void;
+ addListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'connect', session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
+ emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ // Http2Server
+ export interface SessionOptions {
+ maxDeflateDynamicTableSize?: number | undefined;
+ maxSessionMemory?: number | undefined;
+ maxHeaderListPairs?: number | undefined;
+ maxOutstandingPings?: number | undefined;
+ maxSendHeaderBlockLength?: number | undefined;
+ paddingStrategy?: number | undefined;
+ peerMaxConcurrentStreams?: number | undefined;
+ settings?: Settings | undefined;
+ /**
+ * Specifies a timeout in milliseconds that
+ * a server should wait when an [`'unknownProtocol'`][] is emitted. If the
+ * socket has not been destroyed by that time the server will destroy it.
+ * @default 100000
+ */
+ unknownProtocolTimeout?: number | undefined;
+ selectPadding?(frameLen: number, maxFrameLen: number): number;
+ }
+ export interface ClientSessionOptions extends SessionOptions {
+ maxReservedRemoteStreams?: number | undefined;
+ createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined;
+ protocol?: 'http:' | 'https:' | undefined;
+ }
+ export interface ServerSessionOptions extends SessionOptions {
+ Http1IncomingMessage?: typeof IncomingMessage | undefined;
+ Http1ServerResponse?: typeof ServerResponse | undefined;
+ Http2ServerRequest?: typeof Http2ServerRequest | undefined;
+ Http2ServerResponse?: typeof Http2ServerResponse | undefined;
+ }
+ export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {}
+ export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions {}
+ export interface ServerOptions extends ServerSessionOptions {}
+ export interface SecureServerOptions extends SecureServerSessionOptions {
+ allowHTTP1?: boolean | undefined;
+ origins?: string[] | undefined;
+ }
+ interface HTTP2ServerCommon {
+ setTimeout(msec?: number, callback?: () => void): this;
+ /**
+ * Throws ERR_HTTP2_INVALID_SETTING_VALUE for invalid settings values.
+ * Throws ERR_INVALID_ARG_TYPE for invalid settings argument.
+ */
+ updateSettings(settings: Settings): void;
+ }
+ export interface Http2Server extends net.Server, HTTP2ServerCommon {
+ addListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ addListener(event: 'sessionError', listener: (err: Error) => void): this;
+ addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'checkContinue', request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: 'request', request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: 'session', session: ServerHttp2Session): boolean;
+ emit(event: 'sessionError', err: Error): boolean;
+ emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: 'timeout'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ on(event: 'sessionError', listener: (err: Error) => void): this;
+ on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ once(event: 'sessionError', listener: (err: Error) => void): this;
+ once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ prependListener(event: 'sessionError', listener: (err: Error) => void): this;
+ prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ prependOnceListener(event: 'sessionError', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface Http2SecureServer extends tls.Server, HTTP2ServerCommon {
+ addListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ addListener(event: 'sessionError', listener: (err: Error) => void): this;
+ addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'checkContinue', request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: 'request', request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: 'session', session: ServerHttp2Session): boolean;
+ emit(event: 'sessionError', err: Error): boolean;
+ emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: 'timeout'): boolean;
+ emit(event: 'unknownProtocol', socket: tls.TLSSocket): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ on(event: 'sessionError', listener: (err: Error) => void): this;
+ on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ once(event: 'sessionError', listener: (err: Error) => void): this;
+ once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ prependListener(event: 'sessionError', listener: (err: Error) => void): this;
+ prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ prependOnceListener(event: 'sessionError', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * A `Http2ServerRequest` object is created by {@link Server} or {@link SecureServer} and passed as the first argument to the `'request'` event. It may be used to access a request status,
+ * headers, and
+ * data.
+ * @since v8.4.0
+ */
+ export class Http2ServerRequest extends stream.Readable {
+ constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: ReadonlyArray<string>);
+ /**
+ * The `request.aborted` property will be `true` if the request has
+ * been aborted.
+ * @since v10.1.0
+ */
+ readonly aborted: boolean;
+ /**
+ * The request authority pseudo header field. Because HTTP/2 allows requests
+ * to set either `:authority` or `host`, this value is derived from`req.headers[':authority']` if present. Otherwise, it is derived from`req.headers['host']`.
+ * @since v8.4.0
+ */
+ readonly authority: string;
+ /**
+ * See `request.socket`.
+ * @since v8.4.0
+ * @deprecated Since v13.0.0 - Use `socket`.
+ */
+ readonly connection: net.Socket | tls.TLSSocket;
+ /**
+ * The `request.complete` property will be `true` if the request has
+ * been completed, aborted, or destroyed.
+ * @since v12.10.0
+ */
+ readonly complete: boolean;
+ /**
+ * The request/response headers object.
+ *
+ * Key-value pairs of header names and values. Header names are lower-cased.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // { 'user-agent': 'curl/7.22.0',
+ * // host: '127.0.0.1:8000',
+ * // accept: '*' }
+ * console.log(request.headers);
+ * ```
+ *
+ * See `HTTP/2 Headers Object`.
+ *
+ * In HTTP/2, the request path, host name, protocol, and method are represented as
+ * special headers prefixed with the `:` character (e.g. `':path'`). These special
+ * headers will be included in the `request.headers` object. Care must be taken not
+ * to inadvertently modify these special headers or errors may occur. For instance,
+ * removing all headers from the request will cause errors to occur:
+ *
+ * ```js
+ * removeAllHeaders(request.headers);
+ * assert(request.url); // Fails because the :path header has been removed
+ * ```
+ * @since v8.4.0
+ */
+ readonly headers: IncomingHttpHeaders;
+ /**
+ * In case of server request, the HTTP version sent by the client. In the case of
+ * client response, the HTTP version of the connected-to server. Returns`'2.0'`.
+ *
+ * Also `message.httpVersionMajor` is the first integer and`message.httpVersionMinor` is the second.
+ * @since v8.4.0
+ */
+ readonly httpVersion: string;
+ readonly httpVersionMinor: number;
+ readonly httpVersionMajor: number;
+ /**
+ * The request method as a string. Read-only. Examples: `'GET'`, `'DELETE'`.
+ * @since v8.4.0
+ */
+ readonly method: string;
+ /**
+ * The raw request/response headers list exactly as they were received.
+ *
+ * The keys and values are in the same list. It is _not_ a
+ * list of tuples. So, the even-numbered offsets are key values, and the
+ * odd-numbered offsets are the associated values.
+ *
+ * Header names are not lowercased, and duplicates are not merged.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // [ 'user-agent',
+ * // 'this is invalid because there can be only one',
+ * // 'User-Agent',
+ * // 'curl/7.22.0',
+ * // 'Host',
+ * // '127.0.0.1:8000',
+ * // 'ACCEPT',
+ * // '*' ]
+ * console.log(request.rawHeaders);
+ * ```
+ * @since v8.4.0
+ */
+ readonly rawHeaders: string[];
+ /**
+ * The raw request/response trailer keys and values exactly as they were
+ * received. Only populated at the `'end'` event.
+ * @since v8.4.0
+ */
+ readonly rawTrailers: string[];
+ /**
+ * The request scheme pseudo header field indicating the scheme
+ * portion of the target URL.
+ * @since v8.4.0
+ */
+ readonly scheme: string;
+ /**
+ * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but
+ * applies getters, setters, and methods based on HTTP/2 logic.
+ *
+ * `destroyed`, `readable`, and `writable` properties will be retrieved from and
+ * set on `request.stream`.
+ *
+ * `destroy`, `emit`, `end`, `on` and `once` methods will be called on`request.stream`.
+ *
+ * `setTimeout` method will be called on `request.stream.session`.
+ *
+ * `pause`, `read`, `resume`, and `write` will throw an error with code`ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for
+ * more information.
+ *
+ * All other interactions will be routed directly to the socket. With TLS support,
+ * use `request.socket.getPeerCertificate()` to obtain the client's
+ * authentication details.
+ * @since v8.4.0
+ */
+ readonly socket: net.Socket | tls.TLSSocket;
+ /**
+ * The `Http2Stream` object backing the request.
+ * @since v8.4.0
+ */
+ readonly stream: ServerHttp2Stream;
+ /**
+ * The request/response trailers object. Only populated at the `'end'` event.
+ * @since v8.4.0
+ */
+ readonly trailers: IncomingHttpHeaders;
+ /**
+ * Request URL string. This contains only the URL that is present in the actual
+ * HTTP request. If the request is:
+ *
+ * ```http
+ * GET /status?name=ryan HTTP/1.1
+ * Accept: text/plain
+ * ```
+ *
+ * Then `request.url` will be:
+ *
+ * ```js
+ * '/status?name=ryan'
+ * ```
+ *
+ * To parse the url into its parts, `new URL()` can be used:
+ *
+ * ```console
+ * $ node
+ * > new URL('/status?name=ryan', 'http://example.com')
+ * URL {
+ * href: 'http://example.com/status?name=ryan',
+ * origin: 'http://example.com',
+ * protocol: 'http:',
+ * username: '',
+ * password: '',
+ * host: 'example.com',
+ * hostname: 'example.com',
+ * port: '',
+ * pathname: '/status',
+ * search: '?name=ryan',
+ * searchParams: URLSearchParams { 'name' => 'ryan' },
+ * hash: ''
+ * }
+ * ```
+ * @since v8.4.0
+ */
+ url: string;
+ /**
+ * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is
+ * provided, then it is added as a listener on the `'timeout'` event on
+ * the response object.
+ *
+ * If no `'timeout'` listener is added to the request, the response, or
+ * the server, then `Http2Stream` s are destroyed when they time out. If a
+ * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly.
+ * @since v8.4.0
+ */
+ setTimeout(msecs: number, callback?: () => void): void;
+ read(size?: number): Buffer | string | null;
+ addListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'readable', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'aborted', hadError: boolean, code: number): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'data', chunk: Buffer | string): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'readable'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'readable', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'readable', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'readable', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'readable', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * This object is created internally by an HTTP server, not by the user. It is
+ * passed as the second parameter to the `'request'` event.
+ * @since v8.4.0
+ */
+ export class Http2ServerResponse extends stream.Writable {
+ constructor(stream: ServerHttp2Stream);
+ /**
+ * See `response.socket`.
+ * @since v8.4.0
+ * @deprecated Since v13.0.0 - Use `socket`.
+ */
+ readonly connection: net.Socket | tls.TLSSocket;
+ /**
+ * Boolean value that indicates whether the response has completed. Starts
+ * as `false`. After `response.end()` executes, the value will be `true`.
+ * @since v8.4.0
+ * @deprecated Since v13.4.0,v12.16.0 - Use `writableEnded`.
+ */
+ readonly finished: boolean;
+ /**
+ * True if headers were sent, false otherwise (read-only).
+ * @since v8.4.0
+ */
+ readonly headersSent: boolean;
+ /**
+ * A reference to the original HTTP2 `request` object.
+ * @since v15.7.0
+ */
+ readonly req: Http2ServerRequest;
+ /**
+ * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but
+ * applies getters, setters, and methods based on HTTP/2 logic.
+ *
+ * `destroyed`, `readable`, and `writable` properties will be retrieved from and
+ * set on `response.stream`.
+ *
+ * `destroy`, `emit`, `end`, `on` and `once` methods will be called on`response.stream`.
+ *
+ * `setTimeout` method will be called on `response.stream.session`.
+ *
+ * `pause`, `read`, `resume`, and `write` will throw an error with code`ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for
+ * more information.
+ *
+ * All other interactions will be routed directly to the socket.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const server = http2.createServer((req, res) => {
+ * const ip = req.socket.remoteAddress;
+ * const port = req.socket.remotePort;
+ * res.end(`Your IP address is ${ip} and your source port is ${port}.`);
+ * }).listen(3000);
+ * ```
+ * @since v8.4.0
+ */
+ readonly socket: net.Socket | tls.TLSSocket;
+ /**
+ * The `Http2Stream` object backing the response.
+ * @since v8.4.0
+ */
+ readonly stream: ServerHttp2Stream;
+ /**
+ * When true, the Date header will be automatically generated and sent in
+ * the response if it is not already present in the headers. Defaults to true.
+ *
+ * This should only be disabled for testing; HTTP requires the Date header
+ * in responses.
+ * @since v8.4.0
+ */
+ sendDate: boolean;
+ /**
+ * When using implicit headers (not calling `response.writeHead()` explicitly),
+ * this property controls the status code that will be sent to the client when
+ * the headers get flushed.
+ *
+ * ```js
+ * response.statusCode = 404;
+ * ```
+ *
+ * After response header was sent to the client, this property indicates the
+ * status code which was sent out.
+ * @since v8.4.0
+ */
+ statusCode: number;
+ /**
+ * Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns
+ * an empty string.
+ * @since v8.4.0
+ */
+ statusMessage: '';
+ /**
+ * This method adds HTTP trailing headers (a header but at the end of the
+ * message) to the response.
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ * @since v8.4.0
+ */
+ addTrailers(trailers: OutgoingHttpHeaders): void;
+ /**
+ * This method signals to the server that all of the response headers and body
+ * have been sent; that server should consider this message complete.
+ * The method, `response.end()`, MUST be called on each response.
+ *
+ * If `data` is specified, it is equivalent to calling `response.write(data, encoding)` followed by `response.end(callback)`.
+ *
+ * If `callback` is specified, it will be called when the response stream
+ * is finished.
+ * @since v8.4.0
+ */
+ end(callback?: () => void): this;
+ end(data: string | Uint8Array, callback?: () => void): this;
+ end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this;
+ /**
+ * Reads out a header that has already been queued but not sent to the client.
+ * The name is case-insensitive.
+ *
+ * ```js
+ * const contentType = response.getHeader('content-type');
+ * ```
+ * @since v8.4.0
+ */
+ getHeader(name: string): string;
+ /**
+ * Returns an array containing the unique names of the current outgoing headers.
+ * All header names are lowercase.
+ *
+ * ```js
+ * response.setHeader('Foo', 'bar');
+ * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+ *
+ * const headerNames = response.getHeaderNames();
+ * // headerNames === ['foo', 'set-cookie']
+ * ```
+ * @since v8.4.0
+ */
+ getHeaderNames(): string[];
+ /**
+ * Returns a shallow copy of the current outgoing headers. Since a shallow copy
+ * is used, array values may be mutated without additional calls to various
+ * header-related http module methods. The keys of the returned object are the
+ * header names and the values are the respective header values. All header names
+ * are lowercase.
+ *
+ * The object returned by the `response.getHeaders()` method _does not_prototypically inherit from the JavaScript `Object`. This means that typical`Object` methods such as `obj.toString()`,
+ * `obj.hasOwnProperty()`, and others
+ * are not defined and _will not work_.
+ *
+ * ```js
+ * response.setHeader('Foo', 'bar');
+ * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+ *
+ * const headers = response.getHeaders();
+ * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] }
+ * ```
+ * @since v8.4.0
+ */
+ getHeaders(): OutgoingHttpHeaders;
+ /**
+ * Returns `true` if the header identified by `name` is currently set in the
+ * outgoing headers. The header name matching is case-insensitive.
+ *
+ * ```js
+ * const hasContentType = response.hasHeader('content-type');
+ * ```
+ * @since v8.4.0
+ */
+ hasHeader(name: string): boolean;
+ /**
+ * Removes a header that has been queued for implicit sending.
+ *
+ * ```js
+ * response.removeHeader('Content-Encoding');
+ * ```
+ * @since v8.4.0
+ */
+ removeHeader(name: string): void;
+ /**
+ * Sets a single header value for implicit headers. If this header already exists
+ * in the to-be-sent headers, its value will be replaced. Use an array of strings
+ * here to send multiple headers with the same name.
+ *
+ * ```js
+ * response.setHeader('Content-Type', 'text/html; charset=utf-8');
+ * ```
+ *
+ * or
+ *
+ * ```js
+ * response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']);
+ * ```
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ *
+ * When headers have been set with `response.setHeader()`, they will be merged
+ * with any headers passed to `response.writeHead()`, with the headers passed
+ * to `response.writeHead()` given precedence.
+ *
+ * ```js
+ * // Returns content-type = text/plain
+ * const server = http2.createServer((req, res) => {
+ * res.setHeader('Content-Type', 'text/html; charset=utf-8');
+ * res.setHeader('X-Foo', 'bar');
+ * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
+ * res.end('ok');
+ * });
+ * ```
+ * @since v8.4.0
+ */
+ setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
+ /**
+ * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is
+ * provided, then it is added as a listener on the `'timeout'` event on
+ * the response object.
+ *
+ * If no `'timeout'` listener is added to the request, the response, or
+ * the server, then `Http2Stream` s are destroyed when they time out. If a
+ * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly.
+ * @since v8.4.0
+ */
+ setTimeout(msecs: number, callback?: () => void): void;
+ /**
+ * If this method is called and `response.writeHead()` has not been called,
+ * it will switch to implicit header mode and flush the implicit headers.
+ *
+ * This sends a chunk of the response body. This method may
+ * be called multiple times to provide successive parts of the body.
+ *
+ * In the `node:http` module, the response body is omitted when the
+ * request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body.
+ *
+ * `chunk` can be a string or a buffer. If `chunk` is a string,
+ * the second parameter specifies how to encode it into a byte stream.
+ * By default the `encoding` is `'utf8'`. `callback` will be called when this chunk
+ * of data is flushed.
+ *
+ * This is the raw HTTP body and has nothing to do with higher-level multi-part
+ * body encodings that may be used.
+ *
+ * The first time `response.write()` is called, it will send the buffered
+ * header information and the first chunk of the body to the client. The second
+ * time `response.write()` is called, Node.js assumes data will be streamed,
+ * and sends the new data separately. That is, the response is buffered up to the
+ * first chunk of the body.
+ *
+ * Returns `true` if the entire data was flushed successfully to the kernel
+ * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is free again.
+ * @since v8.4.0
+ */
+ write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean;
+ write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean;
+ /**
+ * Sends a status `100 Continue` to the client, indicating that the request body
+ * should be sent. See the `'checkContinue'` event on `Http2Server` and`Http2SecureServer`.
+ * @since v8.4.0
+ */
+ writeContinue(): void;
+ /**
+ * Sends a status `103 Early Hints` to the client with a Link header,
+ * indicating that the user agent can preload/preconnect the linked resources.
+ * The `hints` is an object containing the values of headers to be sent with
+ * early hints message.
+ *
+ * **Example**
+ *
+ * ```js
+ * const earlyHintsLink = '</styles.css>; rel=preload; as=style';
+ * response.writeEarlyHints({
+ * 'link': earlyHintsLink,
+ * });
+ *
+ * const earlyHintsLinks = [
+ * '</styles.css>; rel=preload; as=style',
+ * '</scripts.js>; rel=preload; as=script',
+ * ];
+ * response.writeEarlyHints({
+ * 'link': earlyHintsLinks,
+ * });
+ * ```
+ * @since v18.11.0
+ */
+ writeEarlyHints(hints: Record<string, string | string[]>): void;
+ /**
+ * Sends a response header to the request. The status code is a 3-digit HTTP
+ * status code, like `404`. The last argument, `headers`, are the response headers.
+ *
+ * Returns a reference to the `Http2ServerResponse`, so that calls can be chained.
+ *
+ * For compatibility with `HTTP/1`, a human-readable `statusMessage` may be
+ * passed as the second argument. However, because the `statusMessage` has no
+ * meaning within HTTP/2, the argument will have no effect and a process warning
+ * will be emitted.
+ *
+ * ```js
+ * const body = 'hello world';
+ * response.writeHead(200, {
+ * 'Content-Length': Buffer.byteLength(body),
+ * 'Content-Type': 'text/plain; charset=utf-8',
+ * });
+ * ```
+ *
+ * `Content-Length` is given in bytes not characters. The`Buffer.byteLength()` API may be used to determine the number of bytes in a
+ * given encoding. On outbound messages, Node.js does not check if Content-Length
+ * and the length of the body being transmitted are equal or not. However, when
+ * receiving messages, Node.js will automatically reject messages when the`Content-Length` does not match the actual payload size.
+ *
+ * This method may be called at most one time on a message before `response.end()` is called.
+ *
+ * If `response.write()` or `response.end()` are called before calling
+ * this, the implicit/mutable headers will be calculated and call this function.
+ *
+ * When headers have been set with `response.setHeader()`, they will be merged
+ * with any headers passed to `response.writeHead()`, with the headers passed
+ * to `response.writeHead()` given precedence.
+ *
+ * ```js
+ * // Returns content-type = text/plain
+ * const server = http2.createServer((req, res) => {
+ * res.setHeader('Content-Type', 'text/html; charset=utf-8');
+ * res.setHeader('X-Foo', 'bar');
+ * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
+ * res.end('ok');
+ * });
+ * ```
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ * @since v8.4.0
+ */
+ writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this;
+ writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this;
+ /**
+ * Call `http2stream.pushStream()` with the given headers, and wrap the
+ * given `Http2Stream` on a newly created `Http2ServerResponse` as the callback
+ * parameter if successful. When `Http2ServerRequest` is closed, the callback is
+ * called with an error `ERR_HTTP2_INVALID_STREAM`.
+ * @since v8.4.0
+ * @param headers An object describing the headers
+ * @param callback Called once `http2stream.pushStream()` is finished, or either when the attempt to create the pushed `Http2Stream` has failed or has been rejected, or the state of
+ * `Http2ServerRequest` is closed prior to calling the `http2stream.pushStream()` method
+ */
+ createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'error', listener: (error: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'error', error: Error): boolean;
+ emit(event: 'finish'): boolean;
+ emit(event: 'pipe', src: stream.Readable): boolean;
+ emit(event: 'unpipe', src: stream.Readable): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'error', listener: (error: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'error', listener: (error: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'error', listener: (error: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (error: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export namespace constants {
+ const NGHTTP2_SESSION_SERVER: number;
+ const NGHTTP2_SESSION_CLIENT: number;
+ const NGHTTP2_STREAM_STATE_IDLE: number;
+ const NGHTTP2_STREAM_STATE_OPEN: number;
+ const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number;
+ const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number;
+ const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number;
+ const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number;
+ const NGHTTP2_STREAM_STATE_CLOSED: number;
+ const NGHTTP2_NO_ERROR: number;
+ const NGHTTP2_PROTOCOL_ERROR: number;
+ const NGHTTP2_INTERNAL_ERROR: number;
+ const NGHTTP2_FLOW_CONTROL_ERROR: number;
+ const NGHTTP2_SETTINGS_TIMEOUT: number;
+ const NGHTTP2_STREAM_CLOSED: number;
+ const NGHTTP2_FRAME_SIZE_ERROR: number;
+ const NGHTTP2_REFUSED_STREAM: number;
+ const NGHTTP2_CANCEL: number;
+ const NGHTTP2_COMPRESSION_ERROR: number;
+ const NGHTTP2_CONNECT_ERROR: number;
+ const NGHTTP2_ENHANCE_YOUR_CALM: number;
+ const NGHTTP2_INADEQUATE_SECURITY: number;
+ const NGHTTP2_HTTP_1_1_REQUIRED: number;
+ const NGHTTP2_ERR_FRAME_SIZE_ERROR: number;
+ const NGHTTP2_FLAG_NONE: number;
+ const NGHTTP2_FLAG_END_STREAM: number;
+ const NGHTTP2_FLAG_END_HEADERS: number;
+ const NGHTTP2_FLAG_ACK: number;
+ const NGHTTP2_FLAG_PADDED: number;
+ const NGHTTP2_FLAG_PRIORITY: number;
+ const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number;
+ const DEFAULT_SETTINGS_ENABLE_PUSH: number;
+ const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number;
+ const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number;
+ const MAX_MAX_FRAME_SIZE: number;
+ const MIN_MAX_FRAME_SIZE: number;
+ const MAX_INITIAL_WINDOW_SIZE: number;
+ const NGHTTP2_DEFAULT_WEIGHT: number;
+ const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number;
+ const NGHTTP2_SETTINGS_ENABLE_PUSH: number;
+ const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number;
+ const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number;
+ const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number;
+ const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number;
+ const PADDING_STRATEGY_NONE: number;
+ const PADDING_STRATEGY_MAX: number;
+ const PADDING_STRATEGY_CALLBACK: number;
+ const HTTP2_HEADER_STATUS: string;
+ const HTTP2_HEADER_METHOD: string;
+ const HTTP2_HEADER_AUTHORITY: string;
+ const HTTP2_HEADER_SCHEME: string;
+ const HTTP2_HEADER_PATH: string;
+ const HTTP2_HEADER_ACCEPT_CHARSET: string;
+ const HTTP2_HEADER_ACCEPT_ENCODING: string;
+ const HTTP2_HEADER_ACCEPT_LANGUAGE: string;
+ const HTTP2_HEADER_ACCEPT_RANGES: string;
+ const HTTP2_HEADER_ACCEPT: string;
+ const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string;
+ const HTTP2_HEADER_AGE: string;
+ const HTTP2_HEADER_ALLOW: string;
+ const HTTP2_HEADER_AUTHORIZATION: string;
+ const HTTP2_HEADER_CACHE_CONTROL: string;
+ const HTTP2_HEADER_CONNECTION: string;
+ const HTTP2_HEADER_CONTENT_DISPOSITION: string;
+ const HTTP2_HEADER_CONTENT_ENCODING: string;
+ const HTTP2_HEADER_CONTENT_LANGUAGE: string;
+ const HTTP2_HEADER_CONTENT_LENGTH: string;
+ const HTTP2_HEADER_CONTENT_LOCATION: string;
+ const HTTP2_HEADER_CONTENT_MD5: string;
+ const HTTP2_HEADER_CONTENT_RANGE: string;
+ const HTTP2_HEADER_CONTENT_TYPE: string;
+ const HTTP2_HEADER_COOKIE: string;
+ const HTTP2_HEADER_DATE: string;
+ const HTTP2_HEADER_ETAG: string;
+ const HTTP2_HEADER_EXPECT: string;
+ const HTTP2_HEADER_EXPIRES: string;
+ const HTTP2_HEADER_FROM: string;
+ const HTTP2_HEADER_HOST: string;
+ const HTTP2_HEADER_IF_MATCH: string;
+ const HTTP2_HEADER_IF_MODIFIED_SINCE: string;
+ const HTTP2_HEADER_IF_NONE_MATCH: string;
+ const HTTP2_HEADER_IF_RANGE: string;
+ const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string;
+ const HTTP2_HEADER_LAST_MODIFIED: string;
+ const HTTP2_HEADER_LINK: string;
+ const HTTP2_HEADER_LOCATION: string;
+ const HTTP2_HEADER_MAX_FORWARDS: string;
+ const HTTP2_HEADER_PREFER: string;
+ const HTTP2_HEADER_PROXY_AUTHENTICATE: string;
+ const HTTP2_HEADER_PROXY_AUTHORIZATION: string;
+ const HTTP2_HEADER_RANGE: string;
+ const HTTP2_HEADER_REFERER: string;
+ const HTTP2_HEADER_REFRESH: string;
+ const HTTP2_HEADER_RETRY_AFTER: string;
+ const HTTP2_HEADER_SERVER: string;
+ const HTTP2_HEADER_SET_COOKIE: string;
+ const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string;
+ const HTTP2_HEADER_TRANSFER_ENCODING: string;
+ const HTTP2_HEADER_TE: string;
+ const HTTP2_HEADER_UPGRADE: string;
+ const HTTP2_HEADER_USER_AGENT: string;
+ const HTTP2_HEADER_VARY: string;
+ const HTTP2_HEADER_VIA: string;
+ const HTTP2_HEADER_WWW_AUTHENTICATE: string;
+ const HTTP2_HEADER_HTTP2_SETTINGS: string;
+ const HTTP2_HEADER_KEEP_ALIVE: string;
+ const HTTP2_HEADER_PROXY_CONNECTION: string;
+ const HTTP2_METHOD_ACL: string;
+ const HTTP2_METHOD_BASELINE_CONTROL: string;
+ const HTTP2_METHOD_BIND: string;
+ const HTTP2_METHOD_CHECKIN: string;
+ const HTTP2_METHOD_CHECKOUT: string;
+ const HTTP2_METHOD_CONNECT: string;
+ const HTTP2_METHOD_COPY: string;
+ const HTTP2_METHOD_DELETE: string;
+ const HTTP2_METHOD_GET: string;
+ const HTTP2_METHOD_HEAD: string;
+ const HTTP2_METHOD_LABEL: string;
+ const HTTP2_METHOD_LINK: string;
+ const HTTP2_METHOD_LOCK: string;
+ const HTTP2_METHOD_MERGE: string;
+ const HTTP2_METHOD_MKACTIVITY: string;
+ const HTTP2_METHOD_MKCALENDAR: string;
+ const HTTP2_METHOD_MKCOL: string;
+ const HTTP2_METHOD_MKREDIRECTREF: string;
+ const HTTP2_METHOD_MKWORKSPACE: string;
+ const HTTP2_METHOD_MOVE: string;
+ const HTTP2_METHOD_OPTIONS: string;
+ const HTTP2_METHOD_ORDERPATCH: string;
+ const HTTP2_METHOD_PATCH: string;
+ const HTTP2_METHOD_POST: string;
+ const HTTP2_METHOD_PRI: string;
+ const HTTP2_METHOD_PROPFIND: string;
+ const HTTP2_METHOD_PROPPATCH: string;
+ const HTTP2_METHOD_PUT: string;
+ const HTTP2_METHOD_REBIND: string;
+ const HTTP2_METHOD_REPORT: string;
+ const HTTP2_METHOD_SEARCH: string;
+ const HTTP2_METHOD_TRACE: string;
+ const HTTP2_METHOD_UNBIND: string;
+ const HTTP2_METHOD_UNCHECKOUT: string;
+ const HTTP2_METHOD_UNLINK: string;
+ const HTTP2_METHOD_UNLOCK: string;
+ const HTTP2_METHOD_UPDATE: string;
+ const HTTP2_METHOD_UPDATEREDIRECTREF: string;
+ const HTTP2_METHOD_VERSION_CONTROL: string;
+ const HTTP_STATUS_CONTINUE: number;
+ const HTTP_STATUS_SWITCHING_PROTOCOLS: number;
+ const HTTP_STATUS_PROCESSING: number;
+ const HTTP_STATUS_OK: number;
+ const HTTP_STATUS_CREATED: number;
+ const HTTP_STATUS_ACCEPTED: number;
+ const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number;
+ const HTTP_STATUS_NO_CONTENT: number;
+ const HTTP_STATUS_RESET_CONTENT: number;
+ const HTTP_STATUS_PARTIAL_CONTENT: number;
+ const HTTP_STATUS_MULTI_STATUS: number;
+ const HTTP_STATUS_ALREADY_REPORTED: number;
+ const HTTP_STATUS_IM_USED: number;
+ const HTTP_STATUS_MULTIPLE_CHOICES: number;
+ const HTTP_STATUS_MOVED_PERMANENTLY: number;
+ const HTTP_STATUS_FOUND: number;
+ const HTTP_STATUS_SEE_OTHER: number;
+ const HTTP_STATUS_NOT_MODIFIED: number;
+ const HTTP_STATUS_USE_PROXY: number;
+ const HTTP_STATUS_TEMPORARY_REDIRECT: number;
+ const HTTP_STATUS_PERMANENT_REDIRECT: number;
+ const HTTP_STATUS_BAD_REQUEST: number;
+ const HTTP_STATUS_UNAUTHORIZED: number;
+ const HTTP_STATUS_PAYMENT_REQUIRED: number;
+ const HTTP_STATUS_FORBIDDEN: number;
+ const HTTP_STATUS_NOT_FOUND: number;
+ const HTTP_STATUS_METHOD_NOT_ALLOWED: number;
+ const HTTP_STATUS_NOT_ACCEPTABLE: number;
+ const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number;
+ const HTTP_STATUS_REQUEST_TIMEOUT: number;
+ const HTTP_STATUS_CONFLICT: number;
+ const HTTP_STATUS_GONE: number;
+ const HTTP_STATUS_LENGTH_REQUIRED: number;
+ const HTTP_STATUS_PRECONDITION_FAILED: number;
+ const HTTP_STATUS_PAYLOAD_TOO_LARGE: number;
+ const HTTP_STATUS_URI_TOO_LONG: number;
+ const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number;
+ const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number;
+ const HTTP_STATUS_EXPECTATION_FAILED: number;
+ const HTTP_STATUS_TEAPOT: number;
+ const HTTP_STATUS_MISDIRECTED_REQUEST: number;
+ const HTTP_STATUS_UNPROCESSABLE_ENTITY: number;
+ const HTTP_STATUS_LOCKED: number;
+ const HTTP_STATUS_FAILED_DEPENDENCY: number;
+ const HTTP_STATUS_UNORDERED_COLLECTION: number;
+ const HTTP_STATUS_UPGRADE_REQUIRED: number;
+ const HTTP_STATUS_PRECONDITION_REQUIRED: number;
+ const HTTP_STATUS_TOO_MANY_REQUESTS: number;
+ const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number;
+ const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number;
+ const HTTP_STATUS_INTERNAL_SERVER_ERROR: number;
+ const HTTP_STATUS_NOT_IMPLEMENTED: number;
+ const HTTP_STATUS_BAD_GATEWAY: number;
+ const HTTP_STATUS_SERVICE_UNAVAILABLE: number;
+ const HTTP_STATUS_GATEWAY_TIMEOUT: number;
+ const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number;
+ const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number;
+ const HTTP_STATUS_INSUFFICIENT_STORAGE: number;
+ const HTTP_STATUS_LOOP_DETECTED: number;
+ const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number;
+ const HTTP_STATUS_NOT_EXTENDED: number;
+ const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number;
+ }
+ /**
+ * This symbol can be set as a property on the HTTP/2 headers object with
+ * an array value in order to provide a list of headers considered sensitive.
+ */
+ export const sensitiveHeaders: symbol;
+ /**
+ * Returns an object containing the default settings for an `Http2Session`instance. This method returns a new object instance every time it is called
+ * so instances returned may be safely modified for use.
+ * @since v8.4.0
+ */
+ export function getDefaultSettings(): Settings;
+ /**
+ * Returns a `Buffer` instance containing serialized representation of the given
+ * HTTP/2 settings as specified in the [HTTP/2](https://tools.ietf.org/html/rfc7540) specification. This is intended
+ * for use with the `HTTP2-Settings` header field.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ *
+ * const packed = http2.getPackedSettings({ enablePush: false });
+ *
+ * console.log(packed.toString('base64'));
+ * // Prints: AAIAAAAA
+ * ```
+ * @since v8.4.0
+ */
+ export function getPackedSettings(settings: Settings): Buffer;
+ /**
+ * Returns a `HTTP/2 Settings Object` containing the deserialized settings from
+ * the given `Buffer` as generated by `http2.getPackedSettings()`.
+ * @since v8.4.0
+ * @param buf The packed settings.
+ */
+ export function getUnpackedSettings(buf: Uint8Array): Settings;
+ /**
+ * Returns a `net.Server` instance that creates and manages `Http2Session`instances.
+ *
+ * Since there are no browsers known that support [unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when
+ * communicating
+ * with browser clients.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ *
+ * // Create an unencrypted HTTP/2 server.
+ * // Since there are no browsers known that support
+ * // unencrypted HTTP/2, the use of `http2.createSecureServer()`
+ * // is necessary when communicating with browser clients.
+ * const server = http2.createServer();
+ *
+ * server.on('stream', (stream, headers) => {
+ * stream.respond({
+ * 'content-type': 'text/html; charset=utf-8',
+ * ':status': 200,
+ * });
+ * stream.end('<h1>Hello World</h1>');
+ * });
+ *
+ * server.listen(8000);
+ * ```
+ * @since v8.4.0
+ * @param onRequestHandler See `Compatibility API`
+ */
+ export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
+ export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
+ /**
+ * Returns a `tls.Server` instance that creates and manages `Http2Session`instances.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const fs = require('node:fs');
+ *
+ * const options = {
+ * key: fs.readFileSync('server-key.pem'),
+ * cert: fs.readFileSync('server-cert.pem'),
+ * };
+ *
+ * // Create a secure HTTP/2 server
+ * const server = http2.createSecureServer(options);
+ *
+ * server.on('stream', (stream, headers) => {
+ * stream.respond({
+ * 'content-type': 'text/html; charset=utf-8',
+ * ':status': 200,
+ * });
+ * stream.end('<h1>Hello World</h1>');
+ * });
+ *
+ * server.listen(8443);
+ * ```
+ * @since v8.4.0
+ * @param onRequestHandler See `Compatibility API`
+ */
+ export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
+ export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
+ /**
+ * Returns a `ClientHttp2Session` instance.
+ *
+ * ```js
+ * const http2 = require('node:http2');
+ * const client = http2.connect('https://localhost:1234');
+ *
+ * // Use the client
+ *
+ * client.close();
+ * ```
+ * @since v8.4.0
+ * @param authority The remote HTTP/2 server to connect to. This must be in the form of a minimal, valid URL with the `http://` or `https://` prefix, host name, and IP port (if a non-default port
+ * is used). Userinfo (user ID and password), path, querystring, and fragment details in the URL will be ignored.
+ * @param listener Will be registered as a one-time listener of the {@link 'connect'} event.
+ */
+ export function connect(authority: string | url.URL, listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session;
+ export function connect(
+ authority: string | url.URL,
+ options?: ClientSessionOptions | SecureClientSessionOptions,
+ listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void
+ ): ClientHttp2Session;
+}
+declare module 'node:http2' {
+ export * from 'http2';
+}
diff --git a/node_modules/@types/node/ts4.8/https.d.ts b/node_modules/@types/node/ts4.8/https.d.ts
new file mode 100755
index 0000000..76fca92
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/https.d.ts
@@ -0,0 +1,441 @@
+/**
+ * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
+ * separate module.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/https.js)
+ */
+declare module 'https' {
+ import { Duplex } from 'node:stream';
+ import * as tls from 'node:tls';
+ import * as http from 'node:http';
+ import { URL } from 'node:url';
+ type ServerOptions<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ > = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions<Request, Response>;
+ type RequestOptions = http.RequestOptions &
+ tls.SecureContextOptions & {
+ checkServerIdentity?: typeof tls.checkServerIdentity | undefined;
+ rejectUnauthorized?: boolean | undefined; // Defaults to true
+ servername?: string | undefined; // SNI TLS Extension
+ };
+ interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
+ rejectUnauthorized?: boolean | undefined;
+ maxCachedSessions?: number | undefined;
+ }
+ /**
+ * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information.
+ * @since v0.4.5
+ */
+ class Agent extends http.Agent {
+ constructor(options?: AgentOptions);
+ options: AgentOptions;
+ }
+ interface Server<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ > extends http.Server<Request, Response> {}
+ /**
+ * See `http.Server` for more information.
+ * @since v0.3.4
+ */
+ class Server<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ > extends tls.Server {
+ constructor(requestListener?: http.RequestListener<Request, Response>);
+ constructor(
+ options: ServerOptions<Request, Response>,
+ requestListener?: http.RequestListener<Request, Response>,
+ );
+ /**
+ * Closes all connections connected to this server.
+ * @since v18.2.0
+ */
+ closeAllConnections(): void;
+ /**
+ * Closes all connections connected to this server which are not sending a request or waiting for a response.
+ * @since v18.2.0
+ */
+ closeIdleConnections(): void;
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
+ addListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ addListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
+ addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'connection', listener: (socket: Duplex) => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'listening', listener: () => void): this;
+ addListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ addListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ addListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ addListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ addListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ emit(event: string, ...args: any[]): boolean;
+ emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean;
+ emit(event: 'newSession', sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean;
+ emit(event: 'OCSPRequest', certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean;
+ emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;
+ emit(event: 'secureConnection', tlsSocket: tls.TLSSocket): boolean;
+ emit(event: 'tlsClientError', err: Error, tlsSocket: tls.TLSSocket): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'connection', socket: Duplex): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'listening'): boolean;
+ emit(
+ event: 'checkContinue',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & {
+ req: InstanceType<Request>;
+ }
+ ): boolean;
+ emit(
+ event: 'checkExpectation',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & {
+ req: InstanceType<Request>;
+ }
+ ): boolean;
+ emit(event: 'clientError', err: Error, socket: Duplex): boolean;
+ emit(event: 'connect', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
+ emit(
+ event: 'request',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & {
+ req: InstanceType<Request>;
+ }
+ ): boolean;
+ emit(event: 'upgrade', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ on(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
+ on(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ on(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
+ on(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ on(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'connection', listener: (socket: Duplex) => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'listening', listener: () => void): this;
+ on(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ on(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ on(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ on(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ on(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
+ once(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ once(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
+ once(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ once(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'connection', listener: (socket: Duplex) => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'listening', listener: () => void): this;
+ once(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ once(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ once(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ once(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ once(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ once(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ prependListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
+ prependListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ prependListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
+ prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'connection', listener: (socket: Duplex) => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'listening', listener: () => void): this;
+ prependListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ prependListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ prependListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ prependListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ prependListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
+ prependOnceListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ prependOnceListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
+ prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'connection', listener: (socket: Duplex) => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'listening', listener: () => void): this;
+ prependOnceListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ prependOnceListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ prependOnceListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ }
+ /**
+ * ```js
+ * // curl -k https://localhost:8000/
+ * const https = require('node:https');
+ * const fs = require('node:fs');
+ *
+ * const options = {
+ * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
+ * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
+ * };
+ *
+ * https.createServer(options, (req, res) => {
+ * res.writeHead(200);
+ * res.end('hello world\n');
+ * }).listen(8000);
+ * ```
+ *
+ * Or
+ *
+ * ```js
+ * const https = require('node:https');
+ * const fs = require('node:fs');
+ *
+ * const options = {
+ * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'),
+ * passphrase: 'sample',
+ * };
+ *
+ * https.createServer(options, (req, res) => {
+ * res.writeHead(200);
+ * res.end('hello world\n');
+ * }).listen(8000);
+ * ```
+ * @since v0.3.4
+ * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`.
+ * @param requestListener A listener to be added to the `'request'` event.
+ */
+ function createServer<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ >(requestListener?: http.RequestListener<Request, Response>): Server<Request, Response>;
+ function createServer<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ >(
+ options: ServerOptions<Request, Response>,
+ requestListener?: http.RequestListener<Request, Response>,
+ ): Server<Request, Response>;
+ /**
+ * Makes a request to a secure web server.
+ *
+ * The following additional `options` from `tls.connect()` are also accepted:`ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`,`honorCipherOrder`, `key`, `passphrase`,
+ * `pfx`, `rejectUnauthorized`,`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`,`highWaterMark`.
+ *
+ * `options` can be an object, a string, or a `URL` object. If `options` is a
+ * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
+ *
+ * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to
+ * upload a file with a POST request, then write to the `ClientRequest` object.
+ *
+ * ```js
+ * const https = require('node:https');
+ *
+ * const options = {
+ * hostname: 'encrypted.google.com',
+ * port: 443,
+ * path: '/',
+ * method: 'GET',
+ * };
+ *
+ * const req = https.request(options, (res) => {
+ * console.log('statusCode:', res.statusCode);
+ * console.log('headers:', res.headers);
+ *
+ * res.on('data', (d) => {
+ * process.stdout.write(d);
+ * });
+ * });
+ *
+ * req.on('error', (e) => {
+ * console.error(e);
+ * });
+ * req.end();
+ * ```
+ *
+ * Example using options from `tls.connect()`:
+ *
+ * ```js
+ * const options = {
+ * hostname: 'encrypted.google.com',
+ * port: 443,
+ * path: '/',
+ * method: 'GET',
+ * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
+ * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
+ * };
+ * options.agent = new https.Agent(options);
+ *
+ * const req = https.request(options, (res) => {
+ * // ...
+ * });
+ * ```
+ *
+ * Alternatively, opt out of connection pooling by not using an `Agent`.
+ *
+ * ```js
+ * const options = {
+ * hostname: 'encrypted.google.com',
+ * port: 443,
+ * path: '/',
+ * method: 'GET',
+ * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
+ * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
+ * agent: false,
+ * };
+ *
+ * const req = https.request(options, (res) => {
+ * // ...
+ * });
+ * ```
+ *
+ * Example using a `URL` as `options`:
+ *
+ * ```js
+ * const options = new URL('https://abc:xyz@example.com');
+ *
+ * const req = https.request(options, (res) => {
+ * // ...
+ * });
+ * ```
+ *
+ * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`):
+ *
+ * ```js
+ * const tls = require('node:tls');
+ * const https = require('node:https');
+ * const crypto = require('node:crypto');
+ *
+ * function sha256(s) {
+ * return crypto.createHash('sha256').update(s).digest('base64');
+ * }
+ * const options = {
+ * hostname: 'github.com',
+ * port: 443,
+ * path: '/',
+ * method: 'GET',
+ * checkServerIdentity: function(host, cert) {
+ * // Make sure the certificate is issued to the host we are connected to
+ * const err = tls.checkServerIdentity(host, cert);
+ * if (err) {
+ * return err;
+ * }
+ *
+ * // Pin the public key, similar to HPKP pin-sha256 pinning
+ * const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=';
+ * if (sha256(cert.pubkey) !== pubkey256) {
+ * const msg = 'Certificate verification error: ' +
+ * `The public key of '${cert.subject.CN}' ` +
+ * 'does not match our pinned fingerprint';
+ * return new Error(msg);
+ * }
+ *
+ * // Pin the exact certificate, rather than the pub key
+ * const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' +
+ * 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16';
+ * if (cert.fingerprint256 !== cert256) {
+ * const msg = 'Certificate verification error: ' +
+ * `The certificate of '${cert.subject.CN}' ` +
+ * 'does not match our pinned fingerprint';
+ * return new Error(msg);
+ * }
+ *
+ * // This loop is informational only.
+ * // Print the certificate and public key fingerprints of all certs in the
+ * // chain. Its common to pin the public key of the issuer on the public
+ * // internet, while pinning the public key of the service in sensitive
+ * // environments.
+ * do {
+ * console.log('Subject Common Name:', cert.subject.CN);
+ * console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256);
+ *
+ * hash = crypto.createHash('sha256');
+ * console.log(' Public key ping-sha256:', sha256(cert.pubkey));
+ *
+ * lastprint256 = cert.fingerprint256;
+ * cert = cert.issuerCertificate;
+ * } while (cert.fingerprint256 !== lastprint256);
+ *
+ * },
+ * };
+ *
+ * options.agent = new https.Agent(options);
+ * const req = https.request(options, (res) => {
+ * console.log('All OK. Server matched our pinned cert or public key');
+ * console.log('statusCode:', res.statusCode);
+ * // Print the HPKP values
+ * console.log('headers:', res.headers['public-key-pins']);
+ *
+ * res.on('data', (d) => {});
+ * });
+ *
+ * req.on('error', (e) => {
+ * console.error(e.message);
+ * });
+ * req.end();
+ * ```
+ *
+ * Outputs for example:
+ *
+ * ```text
+ * Subject Common Name: github.com
+ * Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16
+ * Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=
+ * Subject Common Name: DigiCert SHA2 Extended Validation Server CA
+ * Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A
+ * Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=
+ * Subject Common Name: DigiCert High Assurance EV Root CA
+ * Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF
+ * Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=
+ * All OK. Server matched our pinned cert or public key
+ * statusCode: 200
+ * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=";
+ * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4=";
+ * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains
+ * ```
+ * @since v0.3.6
+ * @param options Accepts all `options` from `request`, with some differences in default values:
+ */
+ function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
+ function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
+ /**
+ * Like `http.get()` but for HTTPS.
+ *
+ * `options` can be an object, a string, or a `URL` object. If `options` is a
+ * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
+ *
+ * ```js
+ * const https = require('node:https');
+ *
+ * https.get('https://encrypted.google.com/', (res) => {
+ * console.log('statusCode:', res.statusCode);
+ * console.log('headers:', res.headers);
+ *
+ * res.on('data', (d) => {
+ * process.stdout.write(d);
+ * });
+ *
+ * }).on('error', (e) => {
+ * console.error(e);
+ * });
+ * ```
+ * @since v0.3.6
+ * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`.
+ */
+ function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
+ function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
+ let globalAgent: Agent;
+}
+declare module 'node:https' {
+ export * from 'https';
+}
diff --git a/node_modules/@types/node/ts4.8/index.d.ts b/node_modules/@types/node/ts4.8/index.d.ts
new file mode 100755
index 0000000..7c8b38c
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/index.d.ts
@@ -0,0 +1,88 @@
+/**
+ * License for programmatically and manually incorporated
+ * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc
+ *
+ * Copyright Node.js contributors. All rights reserved.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+// NOTE: These definitions support NodeJS and TypeScript 4.8 and earlier.
+
+// Reference required types from the default lib:
+/// <reference lib="es2020" />
+/// <reference lib="esnext.asynciterable" />
+/// <reference lib="esnext.intl" />
+/// <reference lib="esnext.bigint" />
+
+// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
+/// <reference path="assert.d.ts" />
+/// <reference path="assert/strict.d.ts" />
+/// <reference path="globals.d.ts" />
+/// <reference path="async_hooks.d.ts" />
+/// <reference path="buffer.d.ts" />
+/// <reference path="child_process.d.ts" />
+/// <reference path="cluster.d.ts" />
+/// <reference path="console.d.ts" />
+/// <reference path="constants.d.ts" />
+/// <reference path="crypto.d.ts" />
+/// <reference path="dgram.d.ts" />
+/// <reference path="diagnostics_channel.d.ts" />
+/// <reference path="dns.d.ts" />
+/// <reference path="dns/promises.d.ts" />
+/// <reference path="dns/promises.d.ts" />
+/// <reference path="domain.d.ts" />
+/// <reference path="dom-events.d.ts" />
+/// <reference path="events.d.ts" />
+/// <reference path="fs.d.ts" />
+/// <reference path="fs/promises.d.ts" />
+/// <reference path="http.d.ts" />
+/// <reference path="http2.d.ts" />
+/// <reference path="https.d.ts" />
+/// <reference path="inspector.d.ts" />
+/// <reference path="module.d.ts" />
+/// <reference path="net.d.ts" />
+/// <reference path="os.d.ts" />
+/// <reference path="path.d.ts" />
+/// <reference path="perf_hooks.d.ts" />
+/// <reference path="process.d.ts" />
+/// <reference path="punycode.d.ts" />
+/// <reference path="querystring.d.ts" />
+/// <reference path="readline.d.ts" />
+/// <reference path="readline/promises.d.ts" />
+/// <reference path="repl.d.ts" />
+/// <reference path="stream.d.ts" />
+/// <reference path="stream/promises.d.ts" />
+/// <reference path="stream/consumers.d.ts" />
+/// <reference path="stream/web.d.ts" />
+/// <reference path="string_decoder.d.ts" />
+/// <reference path="test.d.ts" />
+/// <reference path="timers.d.ts" />
+/// <reference path="timers/promises.d.ts" />
+/// <reference path="tls.d.ts" />
+/// <reference path="trace_events.d.ts" />
+/// <reference path="tty.d.ts" />
+/// <reference path="url.d.ts" />
+/// <reference path="util.d.ts" />
+/// <reference path="v8.d.ts" />
+/// <reference path="vm.d.ts" />
+/// <reference path="wasi.d.ts" />
+/// <reference path="worker_threads.d.ts" />
+/// <reference path="zlib.d.ts" />
+
+/// <reference path="globals.global.d.ts" />
diff --git a/node_modules/@types/node/ts4.8/inspector.d.ts b/node_modules/@types/node/ts4.8/inspector.d.ts
new file mode 100755
index 0000000..dbe0374
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/inspector.d.ts
@@ -0,0 +1,2747 @@
+// eslint-disable-next-line @definitelytyped/dt-header
+// Type definitions for inspector
+
+// These definitions are auto-generated.
+// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330
+// for more information.
+
+
+/**
+ * The `node:inspector` module provides an API for interacting with the V8
+ * inspector.
+ *
+ * It can be accessed using:
+ *
+ * ```js
+ * import * as inspector from 'node:inspector/promises';
+ * ```
+ *
+ * or
+ *
+ * ```js
+ * import * as inspector from 'node:inspector';
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/inspector.js)
+ */
+declare module 'inspector' {
+ import EventEmitter = require('node:events');
+ interface InspectorNotification<T> {
+ method: string;
+ params: T;
+ }
+ namespace Schema {
+ /**
+ * Description of the protocol domain.
+ */
+ interface Domain {
+ /**
+ * Domain name.
+ */
+ name: string;
+ /**
+ * Domain version.
+ */
+ version: string;
+ }
+ interface GetDomainsReturnType {
+ /**
+ * List of supported domains.
+ */
+ domains: Domain[];
+ }
+ }
+ namespace Runtime {
+ /**
+ * Unique script identifier.
+ */
+ type ScriptId = string;
+ /**
+ * Unique object identifier.
+ */
+ type RemoteObjectId = string;
+ /**
+ * Primitive value which cannot be JSON-stringified.
+ */
+ type UnserializableValue = string;
+ /**
+ * Mirror object referencing original JavaScript object.
+ */
+ interface RemoteObject {
+ /**
+ * Object type.
+ */
+ type: string;
+ /**
+ * Object subtype hint. Specified for <code>object</code> type values only.
+ */
+ subtype?: string | undefined;
+ /**
+ * Object class (constructor) name. Specified for <code>object</code> type values only.
+ */
+ className?: string | undefined;
+ /**
+ * Remote object value in case of primitive values or JSON values (if it was requested).
+ */
+ value?: any;
+ /**
+ * Primitive value which can not be JSON-stringified does not have <code>value</code>, but gets this property.
+ */
+ unserializableValue?: UnserializableValue | undefined;
+ /**
+ * String representation of the object.
+ */
+ description?: string | undefined;
+ /**
+ * Unique object identifier (for non-primitive values).
+ */
+ objectId?: RemoteObjectId | undefined;
+ /**
+ * Preview containing abbreviated property values. Specified for <code>object</code> type values only.
+ * @experimental
+ */
+ preview?: ObjectPreview | undefined;
+ /**
+ * @experimental
+ */
+ customPreview?: CustomPreview | undefined;
+ }
+ /**
+ * @experimental
+ */
+ interface CustomPreview {
+ header: string;
+ hasBody: boolean;
+ formatterObjectId: RemoteObjectId;
+ bindRemoteObjectFunctionId: RemoteObjectId;
+ configObjectId?: RemoteObjectId | undefined;
+ }
+ /**
+ * Object containing abbreviated remote object value.
+ * @experimental
+ */
+ interface ObjectPreview {
+ /**
+ * Object type.
+ */
+ type: string;
+ /**
+ * Object subtype hint. Specified for <code>object</code> type values only.
+ */
+ subtype?: string | undefined;
+ /**
+ * String representation of the object.
+ */
+ description?: string | undefined;
+ /**
+ * True iff some of the properties or entries of the original object did not fit.
+ */
+ overflow: boolean;
+ /**
+ * List of the properties.
+ */
+ properties: PropertyPreview[];
+ /**
+ * List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only.
+ */
+ entries?: EntryPreview[] | undefined;
+ }
+ /**
+ * @experimental
+ */
+ interface PropertyPreview {
+ /**
+ * Property name.
+ */
+ name: string;
+ /**
+ * Object type. Accessor means that the property itself is an accessor property.
+ */
+ type: string;
+ /**
+ * User-friendly property value string.
+ */
+ value?: string | undefined;
+ /**
+ * Nested value preview.
+ */
+ valuePreview?: ObjectPreview | undefined;
+ /**
+ * Object subtype hint. Specified for <code>object</code> type values only.
+ */
+ subtype?: string | undefined;
+ }
+ /**
+ * @experimental
+ */
+ interface EntryPreview {
+ /**
+ * Preview of the key. Specified for map-like collection entries.
+ */
+ key?: ObjectPreview | undefined;
+ /**
+ * Preview of the value.
+ */
+ value: ObjectPreview;
+ }
+ /**
+ * Object property descriptor.
+ */
+ interface PropertyDescriptor {
+ /**
+ * Property name or symbol description.
+ */
+ name: string;
+ /**
+ * The value associated with the property.
+ */
+ value?: RemoteObject | undefined;
+ /**
+ * True if the value associated with the property may be changed (data descriptors only).
+ */
+ writable?: boolean | undefined;
+ /**
+ * A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only).
+ */
+ get?: RemoteObject | undefined;
+ /**
+ * A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only).
+ */
+ set?: RemoteObject | undefined;
+ /**
+ * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
+ */
+ configurable: boolean;
+ /**
+ * True if this property shows up during enumeration of the properties on the corresponding object.
+ */
+ enumerable: boolean;
+ /**
+ * True if the result was thrown during the evaluation.
+ */
+ wasThrown?: boolean | undefined;
+ /**
+ * True if the property is owned for the object.
+ */
+ isOwn?: boolean | undefined;
+ /**
+ * Property symbol object, if the property is of the <code>symbol</code> type.
+ */
+ symbol?: RemoteObject | undefined;
+ }
+ /**
+ * Object internal property descriptor. This property isn't normally visible in JavaScript code.
+ */
+ interface InternalPropertyDescriptor {
+ /**
+ * Conventional property name.
+ */
+ name: string;
+ /**
+ * The value associated with the property.
+ */
+ value?: RemoteObject | undefined;
+ }
+ /**
+ * Represents function call argument. Either remote object id <code>objectId</code>, primitive <code>value</code>, unserializable primitive value or neither of (for undefined) them should be specified.
+ */
+ interface CallArgument {
+ /**
+ * Primitive value or serializable javascript object.
+ */
+ value?: any;
+ /**
+ * Primitive value which can not be JSON-stringified.
+ */
+ unserializableValue?: UnserializableValue | undefined;
+ /**
+ * Remote object handle.
+ */
+ objectId?: RemoteObjectId | undefined;
+ }
+ /**
+ * Id of an execution context.
+ */
+ type ExecutionContextId = number;
+ /**
+ * Description of an isolated world.
+ */
+ interface ExecutionContextDescription {
+ /**
+ * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.
+ */
+ id: ExecutionContextId;
+ /**
+ * Execution context origin.
+ */
+ origin: string;
+ /**
+ * Human readable name describing given context.
+ */
+ name: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ auxData?: {} | undefined;
+ }
+ /**
+ * Detailed information about exception (or error) that was thrown during script compilation or execution.
+ */
+ interface ExceptionDetails {
+ /**
+ * Exception id.
+ */
+ exceptionId: number;
+ /**
+ * Exception text, which should be used together with exception object when available.
+ */
+ text: string;
+ /**
+ * Line number of the exception location (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number of the exception location (0-based).
+ */
+ columnNumber: number;
+ /**
+ * Script ID of the exception location.
+ */
+ scriptId?: ScriptId | undefined;
+ /**
+ * URL of the exception location, to be used when the script was not reported.
+ */
+ url?: string | undefined;
+ /**
+ * JavaScript stack trace if available.
+ */
+ stackTrace?: StackTrace | undefined;
+ /**
+ * Exception object if available.
+ */
+ exception?: RemoteObject | undefined;
+ /**
+ * Identifier of the context where exception happened.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ }
+ /**
+ * Number of milliseconds since epoch.
+ */
+ type Timestamp = number;
+ /**
+ * Stack entry for runtime errors and assertions.
+ */
+ interface CallFrame {
+ /**
+ * JavaScript function name.
+ */
+ functionName: string;
+ /**
+ * JavaScript script id.
+ */
+ scriptId: ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * JavaScript script line number (0-based).
+ */
+ lineNumber: number;
+ /**
+ * JavaScript script column number (0-based).
+ */
+ columnNumber: number;
+ }
+ /**
+ * Call frames for assertions or error messages.
+ */
+ interface StackTrace {
+ /**
+ * String label of this stack trace. For async traces this may be a name of the function that initiated the async call.
+ */
+ description?: string | undefined;
+ /**
+ * JavaScript function name.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Asynchronous JavaScript stack trace that preceded this stack, if available.
+ */
+ parent?: StackTrace | undefined;
+ /**
+ * Asynchronous JavaScript stack trace that preceded this stack, if available.
+ * @experimental
+ */
+ parentId?: StackTraceId | undefined;
+ }
+ /**
+ * Unique identifier of current debugger.
+ * @experimental
+ */
+ type UniqueDebuggerId = string;
+ /**
+ * If <code>debuggerId</code> is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See <code>Runtime.StackTrace</code> and <code>Debugger.paused</code> for usages.
+ * @experimental
+ */
+ interface StackTraceId {
+ id: string;
+ debuggerId?: UniqueDebuggerId | undefined;
+ }
+ interface EvaluateParameterType {
+ /**
+ * Expression to evaluate.
+ */
+ expression: string;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string | undefined;
+ /**
+ * Determines whether Command Line API should be available during the evaluation.
+ */
+ includeCommandLineAPI?: boolean | undefined;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean | undefined;
+ /**
+ * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+ */
+ contextId?: ExecutionContextId | undefined;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean | undefined;
+ /**
+ * Whether execution should be treated as initiated by user in the UI.
+ */
+ userGesture?: boolean | undefined;
+ /**
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+ */
+ awaitPromise?: boolean | undefined;
+ }
+ interface AwaitPromiseParameterType {
+ /**
+ * Identifier of the promise.
+ */
+ promiseObjectId: RemoteObjectId;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ */
+ generatePreview?: boolean | undefined;
+ }
+ interface CallFunctionOnParameterType {
+ /**
+ * Declaration of the function to call.
+ */
+ functionDeclaration: string;
+ /**
+ * Identifier of the object to call function on. Either objectId or executionContextId should be specified.
+ */
+ objectId?: RemoteObjectId | undefined;
+ /**
+ * Call arguments. All call arguments must belong to the same JavaScript world as the target object.
+ */
+ arguments?: CallArgument[] | undefined;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean | undefined;
+ /**
+ * Whether the result is expected to be a JSON object which should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean | undefined;
+ /**
+ * Whether execution should be treated as initiated by user in the UI.
+ */
+ userGesture?: boolean | undefined;
+ /**
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+ */
+ awaitPromise?: boolean | undefined;
+ /**
+ * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ /**
+ * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.
+ */
+ objectGroup?: string | undefined;
+ }
+ interface GetPropertiesParameterType {
+ /**
+ * Identifier of the object to return properties for.
+ */
+ objectId: RemoteObjectId;
+ /**
+ * If true, returns properties belonging only to the element itself, not to its prototype chain.
+ */
+ ownProperties?: boolean | undefined;
+ /**
+ * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
+ * @experimental
+ */
+ accessorPropertiesOnly?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the results.
+ * @experimental
+ */
+ generatePreview?: boolean | undefined;
+ }
+ interface ReleaseObjectParameterType {
+ /**
+ * Identifier of the object to release.
+ */
+ objectId: RemoteObjectId;
+ }
+ interface ReleaseObjectGroupParameterType {
+ /**
+ * Symbolic object group name.
+ */
+ objectGroup: string;
+ }
+ interface SetCustomObjectFormatterEnabledParameterType {
+ enabled: boolean;
+ }
+ interface CompileScriptParameterType {
+ /**
+ * Expression to compile.
+ */
+ expression: string;
+ /**
+ * Source url to be set for the script.
+ */
+ sourceURL: string;
+ /**
+ * Specifies whether the compiled script should be persisted.
+ */
+ persistScript: boolean;
+ /**
+ * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ }
+ interface RunScriptParameterType {
+ /**
+ * Id of the script to run.
+ */
+ scriptId: ScriptId;
+ /**
+ * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string | undefined;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean | undefined;
+ /**
+ * Determines whether Command Line API should be available during the evaluation.
+ */
+ includeCommandLineAPI?: boolean | undefined;
+ /**
+ * Whether the result is expected to be a JSON object which should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ */
+ generatePreview?: boolean | undefined;
+ /**
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+ */
+ awaitPromise?: boolean | undefined;
+ }
+ interface QueryObjectsParameterType {
+ /**
+ * Identifier of the prototype to return objects for.
+ */
+ prototypeObjectId: RemoteObjectId;
+ }
+ interface GlobalLexicalScopeNamesParameterType {
+ /**
+ * Specifies in which execution context to lookup global scope variables.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ }
+ interface EvaluateReturnType {
+ /**
+ * Evaluation result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface AwaitPromiseReturnType {
+ /**
+ * Promise result. Will contain rejected value if promise was rejected.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details if stack strace is available.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface CallFunctionOnReturnType {
+ /**
+ * Call result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface GetPropertiesReturnType {
+ /**
+ * Object properties.
+ */
+ result: PropertyDescriptor[];
+ /**
+ * Internal object properties (only of the element itself).
+ */
+ internalProperties?: InternalPropertyDescriptor[] | undefined;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface CompileScriptReturnType {
+ /**
+ * Id of the script.
+ */
+ scriptId?: ScriptId | undefined;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface RunScriptReturnType {
+ /**
+ * Run result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface QueryObjectsReturnType {
+ /**
+ * Array with objects.
+ */
+ objects: RemoteObject;
+ }
+ interface GlobalLexicalScopeNamesReturnType {
+ names: string[];
+ }
+ interface ExecutionContextCreatedEventDataType {
+ /**
+ * A newly created execution context.
+ */
+ context: ExecutionContextDescription;
+ }
+ interface ExecutionContextDestroyedEventDataType {
+ /**
+ * Id of the destroyed context
+ */
+ executionContextId: ExecutionContextId;
+ }
+ interface ExceptionThrownEventDataType {
+ /**
+ * Timestamp of the exception.
+ */
+ timestamp: Timestamp;
+ exceptionDetails: ExceptionDetails;
+ }
+ interface ExceptionRevokedEventDataType {
+ /**
+ * Reason describing why exception was revoked.
+ */
+ reason: string;
+ /**
+ * The id of revoked exception, as reported in <code>exceptionThrown</code>.
+ */
+ exceptionId: number;
+ }
+ interface ConsoleAPICalledEventDataType {
+ /**
+ * Type of the call.
+ */
+ type: string;
+ /**
+ * Call arguments.
+ */
+ args: RemoteObject[];
+ /**
+ * Identifier of the context where the call was made.
+ */
+ executionContextId: ExecutionContextId;
+ /**
+ * Call timestamp.
+ */
+ timestamp: Timestamp;
+ /**
+ * Stack trace captured when the call was made.
+ */
+ stackTrace?: StackTrace | undefined;
+ /**
+ * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.
+ * @experimental
+ */
+ context?: string | undefined;
+ }
+ interface InspectRequestedEventDataType {
+ object: RemoteObject;
+ hints: {};
+ }
+ }
+ namespace Debugger {
+ /**
+ * Breakpoint identifier.
+ */
+ type BreakpointId = string;
+ /**
+ * Call frame identifier.
+ */
+ type CallFrameId = string;
+ /**
+ * Location in the source code.
+ */
+ interface Location {
+ /**
+ * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * Line number in the script (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number in the script (0-based).
+ */
+ columnNumber?: number | undefined;
+ }
+ /**
+ * Location in the source code.
+ * @experimental
+ */
+ interface ScriptPosition {
+ lineNumber: number;
+ columnNumber: number;
+ }
+ /**
+ * JavaScript call frame. Array of call frames form the call stack.
+ */
+ interface CallFrame {
+ /**
+ * Call frame identifier. This identifier is only valid while the virtual machine is paused.
+ */
+ callFrameId: CallFrameId;
+ /**
+ * Name of the JavaScript function called on this call frame.
+ */
+ functionName: string;
+ /**
+ * Location in the source code.
+ */
+ functionLocation?: Location | undefined;
+ /**
+ * Location in the source code.
+ */
+ location: Location;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Scope chain for this call frame.
+ */
+ scopeChain: Scope[];
+ /**
+ * <code>this</code> object for this call frame.
+ */
+ this: Runtime.RemoteObject;
+ /**
+ * The value being returned, if the function is at return point.
+ */
+ returnValue?: Runtime.RemoteObject | undefined;
+ }
+ /**
+ * Scope description.
+ */
+ interface Scope {
+ /**
+ * Scope type.
+ */
+ type: string;
+ /**
+ * Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.
+ */
+ object: Runtime.RemoteObject;
+ name?: string | undefined;
+ /**
+ * Location in the source code where scope starts
+ */
+ startLocation?: Location | undefined;
+ /**
+ * Location in the source code where scope ends
+ */
+ endLocation?: Location | undefined;
+ }
+ /**
+ * Search match for resource.
+ */
+ interface SearchMatch {
+ /**
+ * Line number in resource content.
+ */
+ lineNumber: number;
+ /**
+ * Line with match content.
+ */
+ lineContent: string;
+ }
+ interface BreakLocation {
+ /**
+ * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * Line number in the script (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number in the script (0-based).
+ */
+ columnNumber?: number | undefined;
+ type?: string | undefined;
+ }
+ interface SetBreakpointsActiveParameterType {
+ /**
+ * New value for breakpoints active state.
+ */
+ active: boolean;
+ }
+ interface SetSkipAllPausesParameterType {
+ /**
+ * New value for skip pauses state.
+ */
+ skip: boolean;
+ }
+ interface SetBreakpointByUrlParameterType {
+ /**
+ * Line number to set breakpoint at.
+ */
+ lineNumber: number;
+ /**
+ * URL of the resources to set breakpoint on.
+ */
+ url?: string | undefined;
+ /**
+ * Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified.
+ */
+ urlRegex?: string | undefined;
+ /**
+ * Script hash of the resources to set breakpoint on.
+ */
+ scriptHash?: string | undefined;
+ /**
+ * Offset in the line to set breakpoint at.
+ */
+ columnNumber?: number | undefined;
+ /**
+ * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
+ */
+ condition?: string | undefined;
+ }
+ interface SetBreakpointParameterType {
+ /**
+ * Location to set breakpoint in.
+ */
+ location: Location;
+ /**
+ * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
+ */
+ condition?: string | undefined;
+ }
+ interface RemoveBreakpointParameterType {
+ breakpointId: BreakpointId;
+ }
+ interface GetPossibleBreakpointsParameterType {
+ /**
+ * Start of range to search possible breakpoint locations in.
+ */
+ start: Location;
+ /**
+ * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.
+ */
+ end?: Location | undefined;
+ /**
+ * Only consider locations which are in the same (non-nested) function as start.
+ */
+ restrictToFunction?: boolean | undefined;
+ }
+ interface ContinueToLocationParameterType {
+ /**
+ * Location to continue to.
+ */
+ location: Location;
+ targetCallFrames?: string | undefined;
+ }
+ interface PauseOnAsyncCallParameterType {
+ /**
+ * Debugger will pause when async call with given stack trace is started.
+ */
+ parentStackTraceId: Runtime.StackTraceId;
+ }
+ interface StepIntoParameterType {
+ /**
+ * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause.
+ * @experimental
+ */
+ breakOnAsyncCall?: boolean | undefined;
+ }
+ interface GetStackTraceParameterType {
+ stackTraceId: Runtime.StackTraceId;
+ }
+ interface SearchInContentParameterType {
+ /**
+ * Id of the script to search in.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * String to search for.
+ */
+ query: string;
+ /**
+ * If true, search is case sensitive.
+ */
+ caseSensitive?: boolean | undefined;
+ /**
+ * If true, treats string parameter as regex.
+ */
+ isRegex?: boolean | undefined;
+ }
+ interface SetScriptSourceParameterType {
+ /**
+ * Id of the script to edit.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * New content of the script.
+ */
+ scriptSource: string;
+ /**
+ * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
+ */
+ dryRun?: boolean | undefined;
+ }
+ interface RestartFrameParameterType {
+ /**
+ * Call frame identifier to evaluate on.
+ */
+ callFrameId: CallFrameId;
+ }
+ interface GetScriptSourceParameterType {
+ /**
+ * Id of the script to get source for.
+ */
+ scriptId: Runtime.ScriptId;
+ }
+ interface SetPauseOnExceptionsParameterType {
+ /**
+ * Pause on exceptions mode.
+ */
+ state: string;
+ }
+ interface EvaluateOnCallFrameParameterType {
+ /**
+ * Call frame identifier to evaluate on.
+ */
+ callFrameId: CallFrameId;
+ /**
+ * Expression to evaluate.
+ */
+ expression: string;
+ /**
+ * String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>).
+ */
+ objectGroup?: string | undefined;
+ /**
+ * Specifies whether command line API should be available to the evaluated expression, defaults to false.
+ */
+ includeCommandLineAPI?: boolean | undefined;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean | undefined;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean | undefined;
+ /**
+ * Whether to throw an exception if side effect cannot be ruled out during evaluation.
+ */
+ throwOnSideEffect?: boolean | undefined;
+ }
+ interface SetVariableValueParameterType {
+ /**
+ * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.
+ */
+ scopeNumber: number;
+ /**
+ * Variable name.
+ */
+ variableName: string;
+ /**
+ * New variable value.
+ */
+ newValue: Runtime.CallArgument;
+ /**
+ * Id of callframe that holds variable.
+ */
+ callFrameId: CallFrameId;
+ }
+ interface SetReturnValueParameterType {
+ /**
+ * New return value.
+ */
+ newValue: Runtime.CallArgument;
+ }
+ interface SetAsyncCallStackDepthParameterType {
+ /**
+ * Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default).
+ */
+ maxDepth: number;
+ }
+ interface SetBlackboxPatternsParameterType {
+ /**
+ * Array of regexps that will be used to check script url for blackbox state.
+ */
+ patterns: string[];
+ }
+ interface SetBlackboxedRangesParameterType {
+ /**
+ * Id of the script.
+ */
+ scriptId: Runtime.ScriptId;
+ positions: ScriptPosition[];
+ }
+ interface EnableReturnType {
+ /**
+ * Unique identifier of the debugger.
+ * @experimental
+ */
+ debuggerId: Runtime.UniqueDebuggerId;
+ }
+ interface SetBreakpointByUrlReturnType {
+ /**
+ * Id of the created breakpoint for further reference.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * List of the locations this breakpoint resolved into upon addition.
+ */
+ locations: Location[];
+ }
+ interface SetBreakpointReturnType {
+ /**
+ * Id of the created breakpoint for further reference.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * Location this breakpoint resolved into.
+ */
+ actualLocation: Location;
+ }
+ interface GetPossibleBreakpointsReturnType {
+ /**
+ * List of the possible breakpoint locations.
+ */
+ locations: BreakLocation[];
+ }
+ interface GetStackTraceReturnType {
+ stackTrace: Runtime.StackTrace;
+ }
+ interface SearchInContentReturnType {
+ /**
+ * List of search matches.
+ */
+ result: SearchMatch[];
+ }
+ interface SetScriptSourceReturnType {
+ /**
+ * New stack trace in case editing has happened while VM was stopped.
+ */
+ callFrames?: CallFrame[] | undefined;
+ /**
+ * Whether current call stack was modified after applying the changes.
+ */
+ stackChanged?: boolean | undefined;
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace | undefined;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId | undefined;
+ /**
+ * Exception details if any.
+ */
+ exceptionDetails?: Runtime.ExceptionDetails | undefined;
+ }
+ interface RestartFrameReturnType {
+ /**
+ * New stack trace.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace | undefined;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId | undefined;
+ }
+ interface GetScriptSourceReturnType {
+ /**
+ * Script source.
+ */
+ scriptSource: string;
+ }
+ interface EvaluateOnCallFrameReturnType {
+ /**
+ * Object wrapper for the evaluation result.
+ */
+ result: Runtime.RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: Runtime.ExceptionDetails | undefined;
+ }
+ interface ScriptParsedEventDataType {
+ /**
+ * Identifier of the script parsed.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * URL or name of the script parsed (if any).
+ */
+ url: string;
+ /**
+ * Line offset of the script within the resource with given URL (for script tags).
+ */
+ startLine: number;
+ /**
+ * Column offset of the script within the resource with given URL.
+ */
+ startColumn: number;
+ /**
+ * Last line of the script.
+ */
+ endLine: number;
+ /**
+ * Length of the last line of the script.
+ */
+ endColumn: number;
+ /**
+ * Specifies script creation context.
+ */
+ executionContextId: Runtime.ExecutionContextId;
+ /**
+ * Content hash of the script.
+ */
+ hash: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ executionContextAuxData?: {} | undefined;
+ /**
+ * True, if this script is generated as a result of the live edit operation.
+ * @experimental
+ */
+ isLiveEdit?: boolean | undefined;
+ /**
+ * URL of source map associated with script (if any).
+ */
+ sourceMapURL?: string | undefined;
+ /**
+ * True, if this script has sourceURL.
+ */
+ hasSourceURL?: boolean | undefined;
+ /**
+ * True, if this script is ES6 module.
+ */
+ isModule?: boolean | undefined;
+ /**
+ * This script length.
+ */
+ length?: number | undefined;
+ /**
+ * JavaScript top stack frame of where the script parsed event was triggered if available.
+ * @experimental
+ */
+ stackTrace?: Runtime.StackTrace | undefined;
+ }
+ interface ScriptFailedToParseEventDataType {
+ /**
+ * Identifier of the script parsed.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * URL or name of the script parsed (if any).
+ */
+ url: string;
+ /**
+ * Line offset of the script within the resource with given URL (for script tags).
+ */
+ startLine: number;
+ /**
+ * Column offset of the script within the resource with given URL.
+ */
+ startColumn: number;
+ /**
+ * Last line of the script.
+ */
+ endLine: number;
+ /**
+ * Length of the last line of the script.
+ */
+ endColumn: number;
+ /**
+ * Specifies script creation context.
+ */
+ executionContextId: Runtime.ExecutionContextId;
+ /**
+ * Content hash of the script.
+ */
+ hash: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ executionContextAuxData?: {} | undefined;
+ /**
+ * URL of source map associated with script (if any).
+ */
+ sourceMapURL?: string | undefined;
+ /**
+ * True, if this script has sourceURL.
+ */
+ hasSourceURL?: boolean | undefined;
+ /**
+ * True, if this script is ES6 module.
+ */
+ isModule?: boolean | undefined;
+ /**
+ * This script length.
+ */
+ length?: number | undefined;
+ /**
+ * JavaScript top stack frame of where the script parsed event was triggered if available.
+ * @experimental
+ */
+ stackTrace?: Runtime.StackTrace | undefined;
+ }
+ interface BreakpointResolvedEventDataType {
+ /**
+ * Breakpoint unique identifier.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * Actual breakpoint location.
+ */
+ location: Location;
+ }
+ interface PausedEventDataType {
+ /**
+ * Call stack the virtual machine stopped on.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Pause reason.
+ */
+ reason: string;
+ /**
+ * Object containing break-specific auxiliary properties.
+ */
+ data?: {} | undefined;
+ /**
+ * Hit breakpoints IDs
+ */
+ hitBreakpoints?: string[] | undefined;
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace | undefined;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId | undefined;
+ /**
+ * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after <code>Debugger.stepInto</code> call with <code>breakOnAsynCall</code> flag.
+ * @experimental
+ */
+ asyncCallStackTraceId?: Runtime.StackTraceId | undefined;
+ }
+ }
+ namespace Console {
+ /**
+ * Console message.
+ */
+ interface ConsoleMessage {
+ /**
+ * Message source.
+ */
+ source: string;
+ /**
+ * Message severity.
+ */
+ level: string;
+ /**
+ * Message text.
+ */
+ text: string;
+ /**
+ * URL of the message origin.
+ */
+ url?: string | undefined;
+ /**
+ * Line number in the resource that generated this message (1-based).
+ */
+ line?: number | undefined;
+ /**
+ * Column number in the resource that generated this message (1-based).
+ */
+ column?: number | undefined;
+ }
+ interface MessageAddedEventDataType {
+ /**
+ * Console message that has been added.
+ */
+ message: ConsoleMessage;
+ }
+ }
+ namespace Profiler {
+ /**
+ * Profile node. Holds callsite information, execution statistics and child nodes.
+ */
+ interface ProfileNode {
+ /**
+ * Unique id of the node.
+ */
+ id: number;
+ /**
+ * Function location.
+ */
+ callFrame: Runtime.CallFrame;
+ /**
+ * Number of samples where this node was on top of the call stack.
+ */
+ hitCount?: number | undefined;
+ /**
+ * Child node ids.
+ */
+ children?: number[] | undefined;
+ /**
+ * The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
+ */
+ deoptReason?: string | undefined;
+ /**
+ * An array of source position ticks.
+ */
+ positionTicks?: PositionTickInfo[] | undefined;
+ }
+ /**
+ * Profile.
+ */
+ interface Profile {
+ /**
+ * The list of profile nodes. First item is the root node.
+ */
+ nodes: ProfileNode[];
+ /**
+ * Profiling start timestamp in microseconds.
+ */
+ startTime: number;
+ /**
+ * Profiling end timestamp in microseconds.
+ */
+ endTime: number;
+ /**
+ * Ids of samples top nodes.
+ */
+ samples?: number[] | undefined;
+ /**
+ * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.
+ */
+ timeDeltas?: number[] | undefined;
+ }
+ /**
+ * Specifies a number of samples attributed to a certain source position.
+ */
+ interface PositionTickInfo {
+ /**
+ * Source line number (1-based).
+ */
+ line: number;
+ /**
+ * Number of samples attributed to the source line.
+ */
+ ticks: number;
+ }
+ /**
+ * Coverage data for a source range.
+ */
+ interface CoverageRange {
+ /**
+ * JavaScript script source offset for the range start.
+ */
+ startOffset: number;
+ /**
+ * JavaScript script source offset for the range end.
+ */
+ endOffset: number;
+ /**
+ * Collected execution count of the source range.
+ */
+ count: number;
+ }
+ /**
+ * Coverage data for a JavaScript function.
+ */
+ interface FunctionCoverage {
+ /**
+ * JavaScript function name.
+ */
+ functionName: string;
+ /**
+ * Source ranges inside the function with coverage data.
+ */
+ ranges: CoverageRange[];
+ /**
+ * Whether coverage data for this function has block granularity.
+ */
+ isBlockCoverage: boolean;
+ }
+ /**
+ * Coverage data for a JavaScript script.
+ */
+ interface ScriptCoverage {
+ /**
+ * JavaScript script id.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Functions contained in the script that has coverage data.
+ */
+ functions: FunctionCoverage[];
+ }
+ /**
+ * Describes a type collected during runtime.
+ * @experimental
+ */
+ interface TypeObject {
+ /**
+ * Name of a type collected with type profiling.
+ */
+ name: string;
+ }
+ /**
+ * Source offset and types for a parameter or return value.
+ * @experimental
+ */
+ interface TypeProfileEntry {
+ /**
+ * Source offset of the parameter or end of function for return values.
+ */
+ offset: number;
+ /**
+ * The types for this parameter or return value.
+ */
+ types: TypeObject[];
+ }
+ /**
+ * Type profile data collected during runtime for a JavaScript script.
+ * @experimental
+ */
+ interface ScriptTypeProfile {
+ /**
+ * JavaScript script id.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Type profile entries for parameters and return values of the functions in the script.
+ */
+ entries: TypeProfileEntry[];
+ }
+ interface SetSamplingIntervalParameterType {
+ /**
+ * New sampling interval in microseconds.
+ */
+ interval: number;
+ }
+ interface StartPreciseCoverageParameterType {
+ /**
+ * Collect accurate call counts beyond simple 'covered' or 'not covered'.
+ */
+ callCount?: boolean | undefined;
+ /**
+ * Collect block-based coverage.
+ */
+ detailed?: boolean | undefined;
+ }
+ interface StopReturnType {
+ /**
+ * Recorded profile.
+ */
+ profile: Profile;
+ }
+ interface TakePreciseCoverageReturnType {
+ /**
+ * Coverage data for the current isolate.
+ */
+ result: ScriptCoverage[];
+ }
+ interface GetBestEffortCoverageReturnType {
+ /**
+ * Coverage data for the current isolate.
+ */
+ result: ScriptCoverage[];
+ }
+ interface TakeTypeProfileReturnType {
+ /**
+ * Type profile for all scripts since startTypeProfile() was turned on.
+ */
+ result: ScriptTypeProfile[];
+ }
+ interface ConsoleProfileStartedEventDataType {
+ id: string;
+ /**
+ * Location of console.profile().
+ */
+ location: Debugger.Location;
+ /**
+ * Profile title passed as an argument to console.profile().
+ */
+ title?: string | undefined;
+ }
+ interface ConsoleProfileFinishedEventDataType {
+ id: string;
+ /**
+ * Location of console.profileEnd().
+ */
+ location: Debugger.Location;
+ profile: Profile;
+ /**
+ * Profile title passed as an argument to console.profile().
+ */
+ title?: string | undefined;
+ }
+ }
+ namespace HeapProfiler {
+ /**
+ * Heap snapshot object id.
+ */
+ type HeapSnapshotObjectId = string;
+ /**
+ * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
+ */
+ interface SamplingHeapProfileNode {
+ /**
+ * Function location.
+ */
+ callFrame: Runtime.CallFrame;
+ /**
+ * Allocations size in bytes for the node excluding children.
+ */
+ selfSize: number;
+ /**
+ * Child nodes.
+ */
+ children: SamplingHeapProfileNode[];
+ }
+ /**
+ * Profile.
+ */
+ interface SamplingHeapProfile {
+ head: SamplingHeapProfileNode;
+ }
+ interface StartTrackingHeapObjectsParameterType {
+ trackAllocations?: boolean | undefined;
+ }
+ interface StopTrackingHeapObjectsParameterType {
+ /**
+ * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
+ */
+ reportProgress?: boolean | undefined;
+ }
+ interface TakeHeapSnapshotParameterType {
+ /**
+ * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
+ */
+ reportProgress?: boolean | undefined;
+ }
+ interface GetObjectByHeapObjectIdParameterType {
+ objectId: HeapSnapshotObjectId;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string | undefined;
+ }
+ interface AddInspectedHeapObjectParameterType {
+ /**
+ * Heap snapshot object id to be accessible by means of $x command line API.
+ */
+ heapObjectId: HeapSnapshotObjectId;
+ }
+ interface GetHeapObjectIdParameterType {
+ /**
+ * Identifier of the object to get heap object id for.
+ */
+ objectId: Runtime.RemoteObjectId;
+ }
+ interface StartSamplingParameterType {
+ /**
+ * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
+ */
+ samplingInterval?: number | undefined;
+ }
+ interface GetObjectByHeapObjectIdReturnType {
+ /**
+ * Evaluation result.
+ */
+ result: Runtime.RemoteObject;
+ }
+ interface GetHeapObjectIdReturnType {
+ /**
+ * Id of the heap snapshot object corresponding to the passed remote object id.
+ */
+ heapSnapshotObjectId: HeapSnapshotObjectId;
+ }
+ interface StopSamplingReturnType {
+ /**
+ * Recorded sampling heap profile.
+ */
+ profile: SamplingHeapProfile;
+ }
+ interface GetSamplingProfileReturnType {
+ /**
+ * Return the sampling profile being collected.
+ */
+ profile: SamplingHeapProfile;
+ }
+ interface AddHeapSnapshotChunkEventDataType {
+ chunk: string;
+ }
+ interface ReportHeapSnapshotProgressEventDataType {
+ done: number;
+ total: number;
+ finished?: boolean | undefined;
+ }
+ interface LastSeenObjectIdEventDataType {
+ lastSeenObjectId: number;
+ timestamp: number;
+ }
+ interface HeapStatsUpdateEventDataType {
+ /**
+ * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.
+ */
+ statsUpdate: number[];
+ }
+ }
+ namespace NodeTracing {
+ interface TraceConfig {
+ /**
+ * Controls how the trace buffer stores data.
+ */
+ recordMode?: string | undefined;
+ /**
+ * Included category filters.
+ */
+ includedCategories: string[];
+ }
+ interface StartParameterType {
+ traceConfig: TraceConfig;
+ }
+ interface GetCategoriesReturnType {
+ /**
+ * A list of supported tracing categories.
+ */
+ categories: string[];
+ }
+ interface DataCollectedEventDataType {
+ value: Array<{}>;
+ }
+ }
+ namespace NodeWorker {
+ type WorkerID = string;
+ /**
+ * Unique identifier of attached debugging session.
+ */
+ type SessionID = string;
+ interface WorkerInfo {
+ workerId: WorkerID;
+ type: string;
+ title: string;
+ url: string;
+ }
+ interface SendMessageToWorkerParameterType {
+ message: string;
+ /**
+ * Identifier of the session.
+ */
+ sessionId: SessionID;
+ }
+ interface EnableParameterType {
+ /**
+ * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger`
+ * message to run them.
+ */
+ waitForDebuggerOnStart: boolean;
+ }
+ interface DetachParameterType {
+ sessionId: SessionID;
+ }
+ interface AttachedToWorkerEventDataType {
+ /**
+ * Identifier assigned to the session used to send/receive messages.
+ */
+ sessionId: SessionID;
+ workerInfo: WorkerInfo;
+ waitingForDebugger: boolean;
+ }
+ interface DetachedFromWorkerEventDataType {
+ /**
+ * Detached session identifier.
+ */
+ sessionId: SessionID;
+ }
+ interface ReceivedMessageFromWorkerEventDataType {
+ /**
+ * Identifier of a session which sends a message.
+ */
+ sessionId: SessionID;
+ message: string;
+ }
+ }
+ namespace NodeRuntime {
+ interface NotifyWhenWaitingForDisconnectParameterType {
+ enabled: boolean;
+ }
+ }
+ /**
+ * The `inspector.Session` is used for dispatching messages to the V8 inspector
+ * back-end and receiving message responses and notifications.
+ */
+ class Session extends EventEmitter {
+ /**
+ * Create a new instance of the inspector.Session class.
+ * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend.
+ */
+ constructor();
+ /**
+ * Connects a session to the inspector back-end.
+ * @since v8.0.0
+ */
+ connect(): void;
+ /**
+ * Immediately close the session. All pending message callbacks will be called
+ * with an error. `session.connect()` will need to be called to be able to send
+ * messages again. Reconnected session will lose all inspector state, such as
+ * enabled agents or configured breakpoints.
+ * @since v8.0.0
+ */
+ disconnect(): void;
+ /**
+ * Posts a message to the inspector back-end. `callback` will be notified when
+ * a response is received. `callback` is a function that accepts two optional
+ * arguments: error and message-specific result.
+ *
+ * ```js
+ * session.post('Runtime.evaluate', { expression: '2 + 2' },
+ * (error, { result }) => console.log(result));
+ * // Output: { type: 'number', value: 4, description: '4' }
+ * ```
+ *
+ * The latest version of the V8 inspector protocol is published on the [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/).
+ *
+ * Node.js inspector supports all the Chrome DevTools Protocol domains declared
+ * by V8\. Chrome DevTools Protocol domain provides an interface for interacting
+ * with one of the runtime agents used to inspect the application state and listen
+ * to the run-time events.
+ *
+ * ## Example usage
+ *
+ * Apart from the debugger, various V8 Profilers are available through the DevTools
+ * protocol.
+ * @since v8.0.0
+ */
+ post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void;
+ post(method: string, callback?: (err: Error | null, params?: {}) => void): void;
+ /**
+ * Returns supported domains.
+ */
+ post(method: 'Schema.getDomains', callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void;
+ /**
+ * Evaluates expression on global object.
+ */
+ post(method: 'Runtime.evaluate', params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
+ post(method: 'Runtime.evaluate', callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
+ /**
+ * Add handler to promise with given promise object id.
+ */
+ post(method: 'Runtime.awaitPromise', params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
+ post(method: 'Runtime.awaitPromise', callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
+ /**
+ * Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
+ */
+ post(method: 'Runtime.callFunctionOn', params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
+ post(method: 'Runtime.callFunctionOn', callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
+ /**
+ * Returns properties of a given object. Object group of the result is inherited from the target object.
+ */
+ post(method: 'Runtime.getProperties', params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
+ post(method: 'Runtime.getProperties', callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
+ /**
+ * Releases remote object with given id.
+ */
+ post(method: 'Runtime.releaseObject', params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Runtime.releaseObject', callback?: (err: Error | null) => void): void;
+ /**
+ * Releases all remote objects that belong to a given group.
+ */
+ post(method: 'Runtime.releaseObjectGroup', params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Runtime.releaseObjectGroup', callback?: (err: Error | null) => void): void;
+ /**
+ * Tells inspected instance to run if it was waiting for debugger to attach.
+ */
+ post(method: 'Runtime.runIfWaitingForDebugger', callback?: (err: Error | null) => void): void;
+ /**
+ * Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context.
+ */
+ post(method: 'Runtime.enable', callback?: (err: Error | null) => void): void;
+ /**
+ * Disables reporting of execution contexts creation.
+ */
+ post(method: 'Runtime.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Discards collected exceptions and console API calls.
+ */
+ post(method: 'Runtime.discardConsoleEntries', callback?: (err: Error | null) => void): void;
+ /**
+ * @experimental
+ */
+ post(method: 'Runtime.setCustomObjectFormatterEnabled', params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Runtime.setCustomObjectFormatterEnabled', callback?: (err: Error | null) => void): void;
+ /**
+ * Compiles expression.
+ */
+ post(method: 'Runtime.compileScript', params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
+ post(method: 'Runtime.compileScript', callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
+ /**
+ * Runs script with given id in a given context.
+ */
+ post(method: 'Runtime.runScript', params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
+ post(method: 'Runtime.runScript', callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
+ post(method: 'Runtime.queryObjects', params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
+ post(method: 'Runtime.queryObjects', callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
+ /**
+ * Returns all let, const and class variables from global scope.
+ */
+ post(
+ method: 'Runtime.globalLexicalScopeNames',
+ params?: Runtime.GlobalLexicalScopeNamesParameterType,
+ callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void
+ ): void;
+ post(method: 'Runtime.globalLexicalScopeNames', callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void;
+ /**
+ * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
+ */
+ post(method: 'Debugger.enable', callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void;
+ /**
+ * Disables debugger for given page.
+ */
+ post(method: 'Debugger.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Activates / deactivates all breakpoints on the page.
+ */
+ post(method: 'Debugger.setBreakpointsActive', params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setBreakpointsActive', callback?: (err: Error | null) => void): void;
+ /**
+ * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
+ */
+ post(method: 'Debugger.setSkipAllPauses', params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setSkipAllPauses', callback?: (err: Error | null) => void): void;
+ /**
+ * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads.
+ */
+ post(method: 'Debugger.setBreakpointByUrl', params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
+ post(method: 'Debugger.setBreakpointByUrl', callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
+ /**
+ * Sets JavaScript breakpoint at a given location.
+ */
+ post(method: 'Debugger.setBreakpoint', params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
+ post(method: 'Debugger.setBreakpoint', callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
+ /**
+ * Removes JavaScript breakpoint.
+ */
+ post(method: 'Debugger.removeBreakpoint', params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.removeBreakpoint', callback?: (err: Error | null) => void): void;
+ /**
+ * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
+ */
+ post(
+ method: 'Debugger.getPossibleBreakpoints',
+ params?: Debugger.GetPossibleBreakpointsParameterType,
+ callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void
+ ): void;
+ post(method: 'Debugger.getPossibleBreakpoints', callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void;
+ /**
+ * Continues execution until specific location is reached.
+ */
+ post(method: 'Debugger.continueToLocation', params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.continueToLocation', callback?: (err: Error | null) => void): void;
+ /**
+ * @experimental
+ */
+ post(method: 'Debugger.pauseOnAsyncCall', params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.pauseOnAsyncCall', callback?: (err: Error | null) => void): void;
+ /**
+ * Steps over the statement.
+ */
+ post(method: 'Debugger.stepOver', callback?: (err: Error | null) => void): void;
+ /**
+ * Steps into the function call.
+ */
+ post(method: 'Debugger.stepInto', params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.stepInto', callback?: (err: Error | null) => void): void;
+ /**
+ * Steps out of the function call.
+ */
+ post(method: 'Debugger.stepOut', callback?: (err: Error | null) => void): void;
+ /**
+ * Stops on the next JavaScript statement.
+ */
+ post(method: 'Debugger.pause', callback?: (err: Error | null) => void): void;
+ /**
+ * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.
+ * @experimental
+ */
+ post(method: 'Debugger.scheduleStepIntoAsync', callback?: (err: Error | null) => void): void;
+ /**
+ * Resumes JavaScript execution.
+ */
+ post(method: 'Debugger.resume', callback?: (err: Error | null) => void): void;
+ /**
+ * Returns stack trace with given <code>stackTraceId</code>.
+ * @experimental
+ */
+ post(method: 'Debugger.getStackTrace', params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
+ post(method: 'Debugger.getStackTrace', callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
+ /**
+ * Searches for given string in script content.
+ */
+ post(method: 'Debugger.searchInContent', params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
+ post(method: 'Debugger.searchInContent', callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
+ /**
+ * Edits JavaScript source live.
+ */
+ post(method: 'Debugger.setScriptSource', params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
+ post(method: 'Debugger.setScriptSource', callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
+ /**
+ * Restarts particular call frame from the beginning.
+ */
+ post(method: 'Debugger.restartFrame', params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
+ post(method: 'Debugger.restartFrame', callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
+ /**
+ * Returns source for the script with given id.
+ */
+ post(method: 'Debugger.getScriptSource', params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
+ post(method: 'Debugger.getScriptSource', callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
+ /**
+ * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>.
+ */
+ post(method: 'Debugger.setPauseOnExceptions', params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setPauseOnExceptions', callback?: (err: Error | null) => void): void;
+ /**
+ * Evaluates expression on a given call frame.
+ */
+ post(method: 'Debugger.evaluateOnCallFrame', params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
+ post(method: 'Debugger.evaluateOnCallFrame', callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
+ /**
+ * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
+ */
+ post(method: 'Debugger.setVariableValue', params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setVariableValue', callback?: (err: Error | null) => void): void;
+ /**
+ * Changes return value in top frame. Available only at return break position.
+ * @experimental
+ */
+ post(method: 'Debugger.setReturnValue', params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setReturnValue', callback?: (err: Error | null) => void): void;
+ /**
+ * Enables or disables async call stacks tracking.
+ */
+ post(method: 'Debugger.setAsyncCallStackDepth', params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setAsyncCallStackDepth', callback?: (err: Error | null) => void): void;
+ /**
+ * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
+ * @experimental
+ */
+ post(method: 'Debugger.setBlackboxPatterns', params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setBlackboxPatterns', callback?: (err: Error | null) => void): void;
+ /**
+ * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.
+ * @experimental
+ */
+ post(method: 'Debugger.setBlackboxedRanges', params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setBlackboxedRanges', callback?: (err: Error | null) => void): void;
+ /**
+ * Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification.
+ */
+ post(method: 'Console.enable', callback?: (err: Error | null) => void): void;
+ /**
+ * Disables console domain, prevents further console messages from being reported to the client.
+ */
+ post(method: 'Console.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Does nothing.
+ */
+ post(method: 'Console.clearMessages', callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.enable', callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
+ */
+ post(method: 'Profiler.setSamplingInterval', params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.setSamplingInterval', callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.start', callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.stop', callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void;
+ /**
+ * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.
+ */
+ post(method: 'Profiler.startPreciseCoverage', params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.startPreciseCoverage', callback?: (err: Error | null) => void): void;
+ /**
+ * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
+ */
+ post(method: 'Profiler.stopPreciseCoverage', callback?: (err: Error | null) => void): void;
+ /**
+ * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
+ */
+ post(method: 'Profiler.takePreciseCoverage', callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void;
+ /**
+ * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
+ */
+ post(method: 'Profiler.getBestEffortCoverage', callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void;
+ /**
+ * Enable type profile.
+ * @experimental
+ */
+ post(method: 'Profiler.startTypeProfile', callback?: (err: Error | null) => void): void;
+ /**
+ * Disable type profile. Disabling releases type profile data collected so far.
+ * @experimental
+ */
+ post(method: 'Profiler.stopTypeProfile', callback?: (err: Error | null) => void): void;
+ /**
+ * Collect type profile.
+ * @experimental
+ */
+ post(method: 'Profiler.takeTypeProfile', callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void;
+ post(method: 'HeapProfiler.enable', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.disable', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.startTrackingHeapObjects', params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.startTrackingHeapObjects', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.stopTrackingHeapObjects', params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.stopTrackingHeapObjects', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.takeHeapSnapshot', params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.takeHeapSnapshot', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.collectGarbage', callback?: (err: Error | null) => void): void;
+ post(
+ method: 'HeapProfiler.getObjectByHeapObjectId',
+ params?: HeapProfiler.GetObjectByHeapObjectIdParameterType,
+ callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void
+ ): void;
+ post(method: 'HeapProfiler.getObjectByHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void;
+ /**
+ * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
+ */
+ post(method: 'HeapProfiler.addInspectedHeapObject', params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.addInspectedHeapObject', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.getHeapObjectId', params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
+ post(method: 'HeapProfiler.getHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
+ post(method: 'HeapProfiler.startSampling', params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.startSampling', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.stopSampling', callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void;
+ post(method: 'HeapProfiler.getSamplingProfile', callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void;
+ /**
+ * Gets supported tracing categories.
+ */
+ post(method: 'NodeTracing.getCategories', callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void;
+ /**
+ * Start trace events collection.
+ */
+ post(method: 'NodeTracing.start', params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeTracing.start', callback?: (err: Error | null) => void): void;
+ /**
+ * Stop trace events collection. Remaining collected events will be sent as a sequence of
+ * dataCollected events followed by tracingComplete event.
+ */
+ post(method: 'NodeTracing.stop', callback?: (err: Error | null) => void): void;
+ /**
+ * Sends protocol message over session with given id.
+ */
+ post(method: 'NodeWorker.sendMessageToWorker', params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeWorker.sendMessageToWorker', callback?: (err: Error | null) => void): void;
+ /**
+ * Instructs the inspector to attach to running workers. Will also attach to new workers
+ * as they start
+ */
+ post(method: 'NodeWorker.enable', params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeWorker.enable', callback?: (err: Error | null) => void): void;
+ /**
+ * Detaches from all running workers and disables attaching to new workers as they are started.
+ */
+ post(method: 'NodeWorker.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Detached from the worker with given sessionId.
+ */
+ post(method: 'NodeWorker.detach', params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeWorker.detach', callback?: (err: Error | null) => void): void;
+ /**
+ * Enable the `NodeRuntime.waitingForDisconnect`.
+ */
+ post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', callback?: (err: Error | null) => void): void;
+ // Events
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ addListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ addListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ addListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ addListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ addListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ addListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ addListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ addListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ addListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ addListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ addListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ addListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ addListener(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ addListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ addListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ addListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ addListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ addListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ addListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ addListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ addListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ addListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ addListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ addListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ addListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ addListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ addListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'inspectorNotification', message: InspectorNotification<{}>): boolean;
+ emit(event: 'Runtime.executionContextCreated', message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
+ emit(event: 'Runtime.executionContextDestroyed', message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
+ emit(event: 'Runtime.executionContextsCleared'): boolean;
+ emit(event: 'Runtime.exceptionThrown', message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
+ emit(event: 'Runtime.exceptionRevoked', message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
+ emit(event: 'Runtime.consoleAPICalled', message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
+ emit(event: 'Runtime.inspectRequested', message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
+ emit(event: 'Debugger.scriptParsed', message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
+ emit(event: 'Debugger.scriptFailedToParse', message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
+ emit(event: 'Debugger.breakpointResolved', message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>): boolean;
+ emit(event: 'Debugger.paused', message: InspectorNotification<Debugger.PausedEventDataType>): boolean;
+ emit(event: 'Debugger.resumed'): boolean;
+ emit(event: 'Console.messageAdded', message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
+ emit(event: 'Profiler.consoleProfileStarted', message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
+ emit(event: 'Profiler.consoleProfileFinished', message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
+ emit(event: 'HeapProfiler.addHeapSnapshotChunk', message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>): boolean;
+ emit(event: 'HeapProfiler.resetProfiles'): boolean;
+ emit(event: 'HeapProfiler.reportHeapSnapshotProgress', message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
+ emit(event: 'HeapProfiler.lastSeenObjectId', message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
+ emit(event: 'HeapProfiler.heapStatsUpdate', message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
+ emit(event: 'NodeTracing.dataCollected', message: InspectorNotification<NodeTracing.DataCollectedEventDataType>): boolean;
+ emit(event: 'NodeTracing.tracingComplete'): boolean;
+ emit(event: 'NodeWorker.attachedToWorker', message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>): boolean;
+ emit(event: 'NodeWorker.detachedFromWorker', message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>): boolean;
+ emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
+ emit(event: 'NodeRuntime.waitingForDisconnect'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ on(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ on(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ on(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ on(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ on(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ on(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ on(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ on(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ on(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ on(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ on(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ on(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ on(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ on(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ on(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ on(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ on(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ on(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ on(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ on(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ on(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ on(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ on(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ on(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ on(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ on(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ on(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ once(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ once(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ once(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ once(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ once(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ once(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ once(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ once(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ once(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ once(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ once(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ once(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ once(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ once(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ once(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ once(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ once(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ once(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ once(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ once(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ once(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ once(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ once(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ once(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ once(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ once(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ once(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ prependListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ prependListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ prependListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ prependListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ prependListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ prependListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ prependListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ prependListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ prependListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ prependListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ prependListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ prependListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ prependListener(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ prependListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ prependListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ prependListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ prependListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ prependListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ prependListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ prependListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ prependListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ prependListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ prependListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ prependListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ prependListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ prependListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ prependListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ prependOnceListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ prependOnceListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ prependOnceListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ prependOnceListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ prependOnceListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ prependOnceListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ prependOnceListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ prependOnceListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ prependOnceListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ prependOnceListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ prependOnceListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ prependOnceListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ prependOnceListener(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ prependOnceListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ prependOnceListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ prependOnceListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ prependOnceListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ prependOnceListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ prependOnceListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ prependOnceListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ prependOnceListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ prependOnceListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ prependOnceListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ prependOnceListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ prependOnceListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ prependOnceListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ prependOnceListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ }
+ /**
+ * Activate inspector on host and port. Equivalent to`node --inspect=[[host:]port]`, but can be done programmatically after node has
+ * started.
+ *
+ * If wait is `true`, will block until a client has connected to the inspect port
+ * and flow control has been passed to the debugger client.
+ *
+ * See the `security warning` regarding the `host`parameter usage.
+ * @param [port='what was specified on the CLI'] Port to listen on for inspector connections. Optional.
+ * @param [host='what was specified on the CLI'] Host to listen on for inspector connections. Optional.
+ * @param [wait=false] Block until a client has connected. Optional.
+ */
+ function open(port?: number, host?: string, wait?: boolean): void;
+ /**
+ * Deactivate the inspector. Blocks until there are no active connections.
+ */
+ function close(): void;
+ /**
+ * Return the URL of the active inspector, or `undefined` if there is none.
+ *
+ * ```console
+ * $ node --inspect -p 'inspector.url()'
+ * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
+ * For help, see: https://nodejs.org/en/docs/inspector
+ * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
+ *
+ * $ node --inspect=localhost:3000 -p 'inspector.url()'
+ * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
+ * For help, see: https://nodejs.org/en/docs/inspector
+ * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
+ *
+ * $ node -p 'inspector.url()'
+ * undefined
+ * ```
+ */
+ function url(): string | undefined;
+ /**
+ * Blocks until a client (existing or connected later) has sent`Runtime.runIfWaitingForDebugger` command.
+ *
+ * An exception will be thrown if there is no active inspector.
+ * @since v12.7.0
+ */
+ function waitForDebugger(): void;
+}
+/**
+ * The inspector module provides an API for interacting with the V8 inspector.
+ */
+declare module 'node:inspector' {
+ import inspector = require('inspector');
+ export = inspector;
+}
diff --git a/node_modules/@types/node/ts4.8/module.d.ts b/node_modules/@types/node/ts4.8/module.d.ts
new file mode 100755
index 0000000..58847a8
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/module.d.ts
@@ -0,0 +1,232 @@
+/**
+ * @since v0.3.7
+ */
+declare module 'module' {
+ import { URL } from 'node:url';
+ import { MessagePort } from 'node:worker_threads';
+ namespace Module {
+ /**
+ * The `module.syncBuiltinESMExports()` method updates all the live bindings for
+ * builtin `ES Modules` to match the properties of the `CommonJS` exports. It
+ * does not add or remove exported names from the `ES Modules`.
+ *
+ * ```js
+ * const fs = require('node:fs');
+ * const assert = require('node:assert');
+ * const { syncBuiltinESMExports } = require('node:module');
+ *
+ * fs.readFile = newAPI;
+ *
+ * delete fs.readFileSync;
+ *
+ * function newAPI() {
+ * // ...
+ * }
+ *
+ * fs.newAPI = newAPI;
+ *
+ * syncBuiltinESMExports();
+ *
+ * import('node:fs').then((esmFS) => {
+ * // It syncs the existing readFile property with the new value
+ * assert.strictEqual(esmFS.readFile, newAPI);
+ * // readFileSync has been deleted from the required fs
+ * assert.strictEqual('readFileSync' in fs, false);
+ * // syncBuiltinESMExports() does not remove readFileSync from esmFS
+ * assert.strictEqual('readFileSync' in esmFS, true);
+ * // syncBuiltinESMExports() does not add names
+ * assert.strictEqual(esmFS.newAPI, undefined);
+ * });
+ * ```
+ * @since v12.12.0
+ */
+ function syncBuiltinESMExports(): void;
+ /**
+ * `path` is the resolved path for the file for which a corresponding source map
+ * should be fetched.
+ * @since v13.7.0, v12.17.0
+ * @return Returns `module.SourceMap` if a source map is found, `undefined` otherwise.
+ */
+ function findSourceMap(path: string, error?: Error): SourceMap;
+ interface SourceMapPayload {
+ file: string;
+ version: number;
+ sources: string[];
+ sourcesContent: string[];
+ names: string[];
+ mappings: string;
+ sourceRoot: string;
+ }
+ interface SourceMapping {
+ generatedLine: number;
+ generatedColumn: number;
+ originalSource: string;
+ originalLine: number;
+ originalColumn: number;
+ }
+ /**
+ * @since v13.7.0, v12.17.0
+ */
+ class SourceMap {
+ /**
+ * Getter for the payload used to construct the `SourceMap` instance.
+ */
+ readonly payload: SourceMapPayload;
+ constructor(payload: SourceMapPayload);
+ /**
+ * Given a line offset and column offset in the generated source
+ * file, returns an object representing the SourceMap range in the
+ * original file if found, or an empty object if not.
+ *
+ * The object returned contains the following keys:
+ *
+ * The returned value represents the raw range as it appears in the
+ * SourceMap, based on zero-indexed offsets, _not_ 1-indexed line and
+ * column numbers as they appear in Error messages and CallSite
+ * objects.
+ *
+ * To get the corresponding 1-indexed line and column numbers from a
+ * lineNumber and columnNumber as they are reported by Error stacks
+ * and CallSite objects, use `sourceMap.findOrigin(lineNumber, columnNumber)`
+ * @param lineOffset The zero-indexed line number offset in the generated source
+ * @param columnOffset The zero-indexed column number offset in the generated source
+ */
+ findEntry(lineOffset: number, columnOffset: number): SourceMapping;
+ }
+ interface ImportAssertions extends NodeJS.Dict<string> {
+ type?: string | undefined;
+ }
+ type ModuleFormat = 'builtin' | 'commonjs' | 'json' | 'module' | 'wasm';
+ type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray;
+ interface GlobalPreloadContext {
+ port: MessagePort;
+ }
+ /**
+ * Sometimes it might be necessary to run some code inside of the same global scope that the application runs in.
+ * This hook allows the return of a string that is run as a sloppy-mode script on startup.
+ *
+ * @param context Information to assist the preload code
+ * @return Code to run before application startup
+ */
+ type GlobalPreloadHook = (context: GlobalPreloadContext) => string;
+ interface ResolveHookContext {
+ /**
+ * Export conditions of the relevant `package.json`
+ */
+ conditions: string[];
+ /**
+ * An object whose key-value pairs represent the assertions for the module to import
+ */
+ importAssertions: ImportAssertions;
+ /**
+ * The module importing this one, or undefined if this is the Node.js entry point
+ */
+ parentURL: string | undefined;
+ }
+ interface ResolveFnOutput {
+ /**
+ * A hint to the load hook (it might be ignored)
+ */
+ format?: ModuleFormat | null | undefined;
+ /**
+ * The import assertions to use when caching the module (optional; if excluded the input will be used)
+ */
+ importAssertions?: ImportAssertions | undefined;
+ /**
+ * A signal that this hook intends to terminate the chain of `resolve` hooks.
+ * @default false
+ */
+ shortCircuit?: boolean | undefined;
+ /**
+ * The absolute URL to which this input resolves
+ */
+ url: string;
+ }
+ /**
+ * The `resolve` hook chain is responsible for resolving file URL for a given module specifier and parent URL, and optionally its format (such as `'module'`) as a hint to the `load` hook.
+ * If a format is specified, the load hook is ultimately responsible for providing the final `format` value (and it is free to ignore the hint provided by `resolve`);
+ * if `resolve` provides a format, a custom `load` hook is required even if only to pass the value to the Node.js default `load` hook.
+ *
+ * @param specifier The specified URL path of the module to be resolved
+ * @param context
+ * @param nextResolve The subsequent `resolve` hook in the chain, or the Node.js default `resolve` hook after the last user-supplied resolve hook
+ */
+ type ResolveHook = (
+ specifier: string,
+ context: ResolveHookContext,
+ nextResolve: (specifier: string, context?: ResolveHookContext) => ResolveFnOutput | Promise<ResolveFnOutput>
+ ) => ResolveFnOutput | Promise<ResolveFnOutput>;
+ interface LoadHookContext {
+ /**
+ * Export conditions of the relevant `package.json`
+ */
+ conditions: string[];
+ /**
+ * The format optionally supplied by the `resolve` hook chain
+ */
+ format: ModuleFormat;
+ /**
+ * An object whose key-value pairs represent the assertions for the module to import
+ */
+ importAssertions: ImportAssertions;
+ }
+ interface LoadFnOutput {
+ format: ModuleFormat;
+ /**
+ * A signal that this hook intends to terminate the chain of `resolve` hooks.
+ * @default false
+ */
+ shortCircuit?: boolean | undefined;
+ /**
+ * The source for Node.js to evaluate
+ */
+ source?: ModuleSource;
+ }
+ /**
+ * The `load` hook provides a way to define a custom method of determining how a URL should be interpreted, retrieved, and parsed.
+ * It is also in charge of validating the import assertion.
+ *
+ * @param url The URL/path of the module to be loaded
+ * @param context Metadata about the module
+ * @param nextLoad The subsequent `load` hook in the chain, or the Node.js default `load` hook after the last user-supplied `load` hook
+ */
+ type LoadHook = (
+ url: string,
+ context: LoadHookContext,
+ nextLoad: (url: string, context?: LoadHookContext) => LoadFnOutput | Promise<LoadFnOutput>
+ ) => LoadFnOutput | Promise<LoadFnOutput>;
+ }
+ interface Module extends NodeModule {}
+ class Module {
+ static runMain(): void;
+ static wrap(code: string): string;
+ static createRequire(path: string | URL): NodeRequire;
+ static builtinModules: string[];
+ static isBuiltin(moduleName: string): boolean;
+ static Module: typeof Module;
+ constructor(id: string, parent?: Module);
+ }
+ global {
+ interface ImportMeta {
+ url: string;
+ /**
+ * @experimental
+ * This feature is only available with the `--experimental-import-meta-resolve`
+ * command flag enabled.
+ *
+ * Provides a module-relative resolution function scoped to each module, returning
+ * the URL string.
+ *
+ * @param specified The module specifier to resolve relative to `parent`.
+ * @param parent The absolute parent module URL to resolve from. If none
+ * is specified, the value of `import.meta.url` is used as the default.
+ */
+ resolve?(specified: string, parent?: string | URL): Promise<string>;
+ }
+ }
+ export = Module;
+}
+declare module 'node:module' {
+ import module = require('module');
+ export = module;
+}
diff --git a/node_modules/@types/node/ts4.8/net.d.ts b/node_modules/@types/node/ts4.8/net.d.ts
new file mode 100755
index 0000000..92190b6
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/net.d.ts
@@ -0,0 +1,893 @@
+/**
+ * > Stability: 2 - Stable
+ *
+ * The `node:net` module provides an asynchronous network API for creating stream-based
+ * TCP or `IPC` servers ({@link createServer}) and clients
+ * ({@link createConnection}).
+ *
+ * It can be accessed using:
+ *
+ * ```js
+ * const net = require('node:net');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/net.js)
+ */
+declare module 'net' {
+ import * as stream from 'node:stream';
+ import { Abortable, EventEmitter } from 'node:events';
+ import * as dns from 'node:dns';
+ type LookupFunction = (hostname: string, options: dns.LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: dns.LookupAddress[]) => void) => void;
+ interface AddressInfo {
+ address: string;
+ family: string;
+ port: number;
+ }
+ interface SocketConstructorOpts {
+ fd?: number | undefined;
+ allowHalfOpen?: boolean | undefined;
+ readable?: boolean | undefined;
+ writable?: boolean | undefined;
+ signal?: AbortSignal;
+ }
+ interface OnReadOpts {
+ buffer: Uint8Array | (() => Uint8Array);
+ /**
+ * This function is called for every chunk of incoming data.
+ * Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer.
+ * Return false from this function to implicitly pause() the socket.
+ */
+ callback(bytesWritten: number, buf: Uint8Array): boolean;
+ }
+ interface ConnectOpts {
+ /**
+ * If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket.
+ * Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will
+ * still be emitted as normal and methods like pause() and resume() will also behave as expected.
+ */
+ onread?: OnReadOpts | undefined;
+ }
+ interface TcpSocketConnectOpts extends ConnectOpts {
+ port: number;
+ host?: string | undefined;
+ localAddress?: string | undefined;
+ localPort?: number | undefined;
+ hints?: number | undefined;
+ family?: number | undefined;
+ lookup?: LookupFunction | undefined;
+ noDelay?: boolean | undefined;
+ keepAlive?: boolean | undefined;
+ keepAliveInitialDelay?: number | undefined;
+ /**
+ * @since v18.13.0
+ */
+ autoSelectFamily?: boolean | undefined;
+ /**
+ * @since v18.13.0
+ */
+ autoSelectFamilyAttemptTimeout?: number | undefined;
+ }
+ interface IpcSocketConnectOpts extends ConnectOpts {
+ path: string;
+ }
+ type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
+ type SocketReadyState = 'opening' | 'open' | 'readOnly' | 'writeOnly' | 'closed';
+ /**
+ * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint
+ * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also
+ * an `EventEmitter`.
+ *
+ * A `net.Socket` can be created by the user and used directly to interact with
+ * a server. For example, it is returned by {@link createConnection},
+ * so the user can use it to talk to the server.
+ *
+ * It can also be created by Node.js and passed to the user when a connection
+ * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use
+ * it to interact with the client.
+ * @since v0.3.4
+ */
+ class Socket extends stream.Duplex {
+ constructor(options?: SocketConstructorOpts);
+ /**
+ * Sends data on the socket. The second parameter specifies the encoding in the
+ * case of a string. It defaults to UTF8 encoding.
+ *
+ * Returns `true` if the entire data was flushed successfully to the kernel
+ * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free.
+ *
+ * The optional `callback` parameter will be executed when the data is finally
+ * written out, which may not be immediately.
+ *
+ * See `Writable` stream `write()` method for more
+ * information.
+ * @since v0.1.90
+ * @param [encoding='utf8'] Only used when data is `string`.
+ */
+ write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean;
+ write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error) => void): boolean;
+ /**
+ * Initiate a connection on a given socket.
+ *
+ * Possible signatures:
+ *
+ * * `socket.connect(options[, connectListener])`
+ * * `socket.connect(path[, connectListener])` for `IPC` connections.
+ * * `socket.connect(port[, host][, connectListener])` for TCP connections.
+ * * Returns: `net.Socket` The socket itself.
+ *
+ * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting,
+ * instead of a `'connect'` event, an `'error'` event will be emitted with
+ * the error passed to the `'error'` listener.
+ * The last parameter `connectListener`, if supplied, will be added as a listener
+ * for the `'connect'` event **once**.
+ *
+ * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined
+ * behavior.
+ */
+ connect(options: SocketConnectOpts, connectionListener?: () => void): this;
+ connect(port: number, host: string, connectionListener?: () => void): this;
+ connect(port: number, connectionListener?: () => void): this;
+ connect(path: string, connectionListener?: () => void): this;
+ /**
+ * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information.
+ * @since v0.1.90
+ * @return The socket itself.
+ */
+ setEncoding(encoding?: BufferEncoding): this;
+ /**
+ * Pauses the reading of data. That is, `'data'` events will not be emitted.
+ * Useful to throttle back an upload.
+ * @return The socket itself.
+ */
+ pause(): this;
+ /**
+ * Close the TCP connection by sending an RST packet and destroy the stream.
+ * If this TCP socket is in connecting status, it will send an RST packet and destroy this TCP socket once it is connected.
+ * Otherwise, it will call `socket.destroy` with an `ERR_SOCKET_CLOSED` Error.
+ * If this is not a TCP socket (for example, a pipe), calling this method will immediately throw an `ERR_INVALID_HANDLE_TYPE` Error.
+ * @since v18.3.0, v16.17.0
+ */
+ resetAndDestroy(): this;
+ /**
+ * Resumes reading after a call to `socket.pause()`.
+ * @return The socket itself.
+ */
+ resume(): this;
+ /**
+ * Sets the socket to timeout after `timeout` milliseconds of inactivity on
+ * the socket. By default `net.Socket` do not have a timeout.
+ *
+ * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to
+ * end the connection.
+ *
+ * ```js
+ * socket.setTimeout(3000);
+ * socket.on('timeout', () => {
+ * console.log('socket timeout');
+ * socket.end();
+ * });
+ * ```
+ *
+ * If `timeout` is 0, then the existing idle timeout is disabled.
+ *
+ * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event.
+ * @since v0.1.90
+ * @return The socket itself.
+ */
+ setTimeout(timeout: number, callback?: () => void): this;
+ /**
+ * Enable/disable the use of Nagle's algorithm.
+ *
+ * When a TCP connection is created, it will have Nagle's algorithm enabled.
+ *
+ * Nagle's algorithm delays data before it is sent via the network. It attempts
+ * to optimize throughput at the expense of latency.
+ *
+ * Passing `true` for `noDelay` or not passing an argument will disable Nagle's
+ * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's
+ * algorithm.
+ * @since v0.1.90
+ * @param [noDelay=true]
+ * @return The socket itself.
+ */
+ setNoDelay(noDelay?: boolean): this;
+ /**
+ * Enable/disable keep-alive functionality, and optionally set the initial
+ * delay before the first keepalive probe is sent on an idle socket.
+ *
+ * Set `initialDelay` (in milliseconds) to set the delay between the last
+ * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default
+ * (or previous) setting.
+ *
+ * Enabling the keep-alive functionality will set the following socket options:
+ *
+ * * `SO_KEEPALIVE=1`
+ * * `TCP_KEEPIDLE=initialDelay`
+ * * `TCP_KEEPCNT=10`
+ * * `TCP_KEEPINTVL=1`
+ * @since v0.1.92
+ * @param [enable=false]
+ * @param [initialDelay=0]
+ * @return The socket itself.
+ */
+ setKeepAlive(enable?: boolean, initialDelay?: number): this;
+ /**
+ * Returns the bound `address`, the address `family` name and `port` of the
+ * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
+ * @since v0.1.90
+ */
+ address(): AddressInfo | {};
+ /**
+ * Calling `unref()` on a socket will allow the program to exit if this is the only
+ * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect.
+ * @since v0.9.1
+ * @return The socket itself.
+ */
+ unref(): this;
+ /**
+ * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior).
+ * If the socket is `ref`ed calling `ref` again will have no effect.
+ * @since v0.9.1
+ * @return The socket itself.
+ */
+ ref(): this;
+ /**
+ * This property shows the number of characters buffered for writing. The buffer
+ * may contain strings whose length after encoding is not yet known. So this number
+ * is only an approximation of the number of bytes in the buffer.
+ *
+ * `net.Socket` has the property that `socket.write()` always works. This is to
+ * help users get up and running quickly. The computer cannot always keep up
+ * with the amount of data that is written to a socket. The network connection
+ * simply might be too slow. Node.js will internally queue up the data written to a
+ * socket and send it out over the wire when it is possible.
+ *
+ * The consequence of this internal buffering is that memory may grow.
+ * Users who experience large or growing `bufferSize` should attempt to
+ * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`.
+ * @since v0.3.8
+ * @deprecated Since v14.6.0 - Use `writableLength` instead.
+ */
+ readonly bufferSize: number;
+ /**
+ * The amount of received bytes.
+ * @since v0.5.3
+ */
+ readonly bytesRead: number;
+ /**
+ * The amount of bytes sent.
+ * @since v0.5.3
+ */
+ readonly bytesWritten: number;
+ /**
+ * If `true`,`socket.connect(options[, connectListener])` was
+ * called and has not yet finished. It will stay `true` until the socket becomes
+ * connected, then it is set to `false` and the `'connect'` event is emitted. Note
+ * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event.
+ * @since v6.1.0
+ */
+ readonly connecting: boolean;
+ /**
+ * This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting
+ * (see `socket.connecting`).
+ * @since v11.2.0, v10.16.0
+ */
+ readonly pending: boolean;
+ /**
+ * See `writable.destroyed` for further details.
+ */
+ readonly destroyed: boolean;
+ /**
+ * The string representation of the local IP address the remote client is
+ * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client
+ * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`.
+ * @since v0.9.6
+ */
+ readonly localAddress?: string;
+ /**
+ * The numeric representation of the local port. For example, `80` or `21`.
+ * @since v0.9.6
+ */
+ readonly localPort?: number;
+ /**
+ * The string representation of the local IP family. `'IPv4'` or `'IPv6'`.
+ * @since v18.8.0, v16.18.0
+ */
+ readonly localFamily?: string;
+ /**
+ * This property represents the state of the connection as a string.
+ *
+ * * If the stream is connecting `socket.readyState` is `opening`.
+ * * If the stream is readable and writable, it is `open`.
+ * * If the stream is readable and not writable, it is `readOnly`.
+ * * If the stream is not readable and writable, it is `writeOnly`.
+ * @since v0.5.0
+ */
+ readonly readyState: SocketReadyState;
+ /**
+ * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if
+ * the socket is destroyed (for example, if the client disconnected).
+ * @since v0.5.10
+ */
+ readonly remoteAddress?: string | undefined;
+ /**
+ * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. Value may be `undefined` if
+ * the socket is destroyed (for example, if the client disconnected).
+ * @since v0.11.14
+ */
+ readonly remoteFamily?: string | undefined;
+ /**
+ * The numeric representation of the remote port. For example, `80` or `21`. Value may be `undefined` if
+ * the socket is destroyed (for example, if the client disconnected).
+ * @since v0.5.10
+ */
+ readonly remotePort?: number | undefined;
+ /**
+ * The socket timeout in milliseconds as set by `socket.setTimeout()`.
+ * It is `undefined` if a timeout has not been set.
+ * @since v10.7.0
+ */
+ readonly timeout?: number | undefined;
+ /**
+ * Half-closes the socket. i.e., it sends a FIN packet. It is possible the
+ * server will still send some data.
+ *
+ * See `writable.end()` for further details.
+ * @since v0.1.90
+ * @param [encoding='utf8'] Only used when data is `string`.
+ * @param callback Optional callback for when the socket is finished.
+ * @return The socket itself.
+ */
+ end(callback?: () => void): this;
+ end(buffer: Uint8Array | string, callback?: () => void): this;
+ end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. connect
+ * 3. data
+ * 4. drain
+ * 5. end
+ * 6. error
+ * 7. lookup
+ * 8. ready
+ * 9. timeout
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: (hadError: boolean) => void): this;
+ addListener(event: 'connect', listener: () => void): this;
+ addListener(event: 'data', listener: (data: Buffer) => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ addListener(event: 'ready', listener: () => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close', hadError: boolean): boolean;
+ emit(event: 'connect'): boolean;
+ emit(event: 'data', data: Buffer): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'lookup', err: Error, address: string, family: string | number, host: string): boolean;
+ emit(event: 'ready'): boolean;
+ emit(event: 'timeout'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: (hadError: boolean) => void): this;
+ on(event: 'connect', listener: () => void): this;
+ on(event: 'data', listener: (data: Buffer) => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ on(event: 'ready', listener: () => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: (hadError: boolean) => void): this;
+ once(event: 'connect', listener: () => void): this;
+ once(event: 'data', listener: (data: Buffer) => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ once(event: 'ready', listener: () => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: (hadError: boolean) => void): this;
+ prependListener(event: 'connect', listener: () => void): this;
+ prependListener(event: 'data', listener: (data: Buffer) => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ prependListener(event: 'ready', listener: () => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: (hadError: boolean) => void): this;
+ prependOnceListener(event: 'connect', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (data: Buffer) => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ prependOnceListener(event: 'ready', listener: () => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ }
+ interface ListenOptions extends Abortable {
+ port?: number | undefined;
+ host?: string | undefined;
+ backlog?: number | undefined;
+ path?: string | undefined;
+ exclusive?: boolean | undefined;
+ readableAll?: boolean | undefined;
+ writableAll?: boolean | undefined;
+ /**
+ * @default false
+ */
+ ipv6Only?: boolean | undefined;
+ }
+ interface ServerOpts {
+ /**
+ * Indicates whether half-opened TCP connections are allowed.
+ * @default false
+ */
+ allowHalfOpen?: boolean | undefined;
+ /**
+ * Indicates whether the socket should be paused on incoming connections.
+ * @default false
+ */
+ pauseOnConnect?: boolean | undefined;
+ /**
+ * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
+ * @default false
+ * @since v16.5.0
+ */
+ noDelay?: boolean | undefined;
+ /**
+ * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received,
+ * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`.
+ * @default false
+ * @since v16.5.0
+ */
+ keepAlive?: boolean | undefined;
+ /**
+ * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.
+ * @default 0
+ * @since v16.5.0
+ */
+ keepAliveInitialDelay?: number | undefined;
+ }
+ interface DropArgument {
+ localAddress?: string;
+ localPort?: number;
+ localFamily?: string;
+ remoteAddress?: string;
+ remotePort?: number;
+ remoteFamily?: string;
+ }
+ /**
+ * This class is used to create a TCP or `IPC` server.
+ * @since v0.1.90
+ */
+ class Server extends EventEmitter {
+ constructor(connectionListener?: (socket: Socket) => void);
+ constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void);
+ /**
+ * Start a server listening for connections. A `net.Server` can be a TCP or
+ * an `IPC` server depending on what it listens to.
+ *
+ * Possible signatures:
+ *
+ * * `server.listen(handle[, backlog][, callback])`
+ * * `server.listen(options[, callback])`
+ * * `server.listen(path[, backlog][, callback])` for `IPC` servers
+ * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers
+ *
+ * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'`
+ * event.
+ *
+ * All `listen()` methods can take a `backlog` parameter to specify the maximum
+ * length of the queue of pending connections. The actual length will be determined
+ * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn`on Linux. The default value of this parameter is 511 (not 512).
+ *
+ * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for
+ * details).
+ *
+ * The `server.listen()` method can be called again if and only if there was an
+ * error during the first `server.listen()` call or `server.close()` has been
+ * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown.
+ *
+ * One of the most common errors raised when listening is `EADDRINUSE`.
+ * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry
+ * after a certain amount of time:
+ *
+ * ```js
+ * server.on('error', (e) => {
+ * if (e.code === 'EADDRINUSE') {
+ * console.error('Address in use, retrying...');
+ * setTimeout(() => {
+ * server.close();
+ * server.listen(PORT, HOST);
+ * }, 1000);
+ * }
+ * });
+ * ```
+ */
+ listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this;
+ listen(port?: number, hostname?: string, listeningListener?: () => void): this;
+ listen(port?: number, backlog?: number, listeningListener?: () => void): this;
+ listen(port?: number, listeningListener?: () => void): this;
+ listen(path: string, backlog?: number, listeningListener?: () => void): this;
+ listen(path: string, listeningListener?: () => void): this;
+ listen(options: ListenOptions, listeningListener?: () => void): this;
+ listen(handle: any, backlog?: number, listeningListener?: () => void): this;
+ listen(handle: any, listeningListener?: () => void): this;
+ /**
+ * Stops the server from accepting new connections and keeps existing
+ * connections. This function is asynchronous, the server is finally closed
+ * when all connections are ended and the server emits a `'close'` event.
+ * The optional `callback` will be called once the `'close'` event occurs. Unlike
+ * that event, it will be called with an `Error` as its only argument if the server
+ * was not open when it was closed.
+ * @since v0.1.90
+ * @param callback Called when the server is closed.
+ */
+ close(callback?: (err?: Error) => void): this;
+ /**
+ * Returns the bound `address`, the address `family` name, and `port` of the server
+ * as reported by the operating system if listening on an IP socket
+ * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`.
+ *
+ * For a server listening on a pipe or Unix domain socket, the name is returned
+ * as a string.
+ *
+ * ```js
+ * const server = net.createServer((socket) => {
+ * socket.end('goodbye\n');
+ * }).on('error', (err) => {
+ * // Handle errors here.
+ * throw err;
+ * });
+ *
+ * // Grab an arbitrary unused port.
+ * server.listen(() => {
+ * console.log('opened server on', server.address());
+ * });
+ * ```
+ *
+ * `server.address()` returns `null` before the `'listening'` event has been
+ * emitted or after calling `server.close()`.
+ * @since v0.1.90
+ */
+ address(): AddressInfo | string | null;
+ /**
+ * Asynchronously get the number of concurrent connections on the server. Works
+ * when sockets were sent to forks.
+ *
+ * Callback should take two arguments `err` and `count`.
+ * @since v0.9.7
+ */
+ getConnections(cb: (error: Error | null, count: number) => void): void;
+ /**
+ * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior).
+ * If the server is `ref`ed calling `ref()` again will have no effect.
+ * @since v0.9.1
+ */
+ ref(): this;
+ /**
+ * Calling `unref()` on a server will allow the program to exit if this is the only
+ * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect.
+ * @since v0.9.1
+ */
+ unref(): this;
+ /**
+ * Set this property to reject connections when the server's connection count gets
+ * high.
+ *
+ * It is not recommended to use this option once a socket has been sent to a child
+ * with `child_process.fork()`.
+ * @since v0.2.0
+ */
+ maxConnections: number;
+ connections: number;
+ /**
+ * Indicates whether or not the server is listening for connections.
+ * @since v5.7.0
+ */
+ listening: boolean;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. connection
+ * 3. error
+ * 4. listening
+ * 5. drop
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'connection', listener: (socket: Socket) => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'listening', listener: () => void): this;
+ addListener(event: 'drop', listener: (data?: DropArgument) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'connection', socket: Socket): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'listening'): boolean;
+ emit(event: 'drop', data?: DropArgument): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'connection', listener: (socket: Socket) => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'listening', listener: () => void): this;
+ on(event: 'drop', listener: (data?: DropArgument) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'connection', listener: (socket: Socket) => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'listening', listener: () => void): this;
+ once(event: 'drop', listener: (data?: DropArgument) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'connection', listener: (socket: Socket) => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'listening', listener: () => void): this;
+ prependListener(event: 'drop', listener: (data?: DropArgument) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'listening', listener: () => void): this;
+ prependOnceListener(event: 'drop', listener: (data?: DropArgument) => void): this;
+ /**
+ * Calls {@link Server.close()} and returns a promise that fulfills when the server has closed.
+ * @since v20.5.0
+ */
+ [Symbol.asyncDispose](): Promise<void>;
+ }
+ type IPVersion = 'ipv4' | 'ipv6';
+ /**
+ * The `BlockList` object can be used with some network APIs to specify rules for
+ * disabling inbound or outbound access to specific IP addresses, IP ranges, or
+ * IP subnets.
+ * @since v15.0.0, v14.18.0
+ */
+ class BlockList {
+ /**
+ * Adds a rule to block the given IP address.
+ * @since v15.0.0, v14.18.0
+ * @param address An IPv4 or IPv6 address.
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+ */
+ addAddress(address: string, type?: IPVersion): void;
+ addAddress(address: SocketAddress): void;
+ /**
+ * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive).
+ * @since v15.0.0, v14.18.0
+ * @param start The starting IPv4 or IPv6 address in the range.
+ * @param end The ending IPv4 or IPv6 address in the range.
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+ */
+ addRange(start: string, end: string, type?: IPVersion): void;
+ addRange(start: SocketAddress, end: SocketAddress): void;
+ /**
+ * Adds a rule to block a range of IP addresses specified as a subnet mask.
+ * @since v15.0.0, v14.18.0
+ * @param net The network IPv4 or IPv6 address.
+ * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`.
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+ */
+ addSubnet(net: SocketAddress, prefix: number): void;
+ addSubnet(net: string, prefix: number, type?: IPVersion): void;
+ /**
+ * Returns `true` if the given IP address matches any of the rules added to the`BlockList`.
+ *
+ * ```js
+ * const blockList = new net.BlockList();
+ * blockList.addAddress('123.123.123.123');
+ * blockList.addRange('10.0.0.1', '10.0.0.10');
+ * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6');
+ *
+ * console.log(blockList.check('123.123.123.123')); // Prints: true
+ * console.log(blockList.check('10.0.0.3')); // Prints: true
+ * console.log(blockList.check('222.111.111.222')); // Prints: false
+ *
+ * // IPv6 notation for IPv4 addresses works:
+ * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true
+ * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true
+ * ```
+ * @since v15.0.0, v14.18.0
+ * @param address The IP address to check
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+ */
+ check(address: SocketAddress): boolean;
+ check(address: string, type?: IPVersion): boolean;
+ }
+ interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts {
+ timeout?: number | undefined;
+ }
+ interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts {
+ timeout?: number | undefined;
+ }
+ type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts;
+ /**
+ * Creates a new TCP or `IPC` server.
+ *
+ * If `allowHalfOpen` is set to `true`, when the other end of the socket
+ * signals the end of transmission, the server will only send back the end of
+ * transmission when `socket.end()` is explicitly called. For example, in the
+ * context of TCP, when a FIN packed is received, a FIN packed is sent
+ * back only when `socket.end()` is explicitly called. Until then the
+ * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information.
+ *
+ * If `pauseOnConnect` is set to `true`, then the socket associated with each
+ * incoming connection will be paused, and no data will be read from its handle.
+ * This allows connections to be passed between processes without any data being
+ * read by the original process. To begin reading data from a paused socket, call `socket.resume()`.
+ *
+ * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to.
+ *
+ * Here is an example of a TCP echo server which listens for connections
+ * on port 8124:
+ *
+ * ```js
+ * const net = require('node:net');
+ * const server = net.createServer((c) => {
+ * // 'connection' listener.
+ * console.log('client connected');
+ * c.on('end', () => {
+ * console.log('client disconnected');
+ * });
+ * c.write('hello\r\n');
+ * c.pipe(c);
+ * });
+ * server.on('error', (err) => {
+ * throw err;
+ * });
+ * server.listen(8124, () => {
+ * console.log('server bound');
+ * });
+ * ```
+ *
+ * Test this by using `telnet`:
+ *
+ * ```bash
+ * telnet localhost 8124
+ * ```
+ *
+ * To listen on the socket `/tmp/echo.sock`:
+ *
+ * ```js
+ * server.listen('/tmp/echo.sock', () => {
+ * console.log('server bound');
+ * });
+ * ```
+ *
+ * Use `nc` to connect to a Unix domain socket server:
+ *
+ * ```bash
+ * nc -U /tmp/echo.sock
+ * ```
+ * @since v0.5.0
+ * @param connectionListener Automatically set as a listener for the {@link 'connection'} event.
+ */
+ function createServer(connectionListener?: (socket: Socket) => void): Server;
+ function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server;
+ /**
+ * Aliases to {@link createConnection}.
+ *
+ * Possible signatures:
+ *
+ * * {@link connect}
+ * * {@link connect} for `IPC` connections.
+ * * {@link connect} for TCP connections.
+ */
+ function connect(options: NetConnectOpts, connectionListener?: () => void): Socket;
+ function connect(port: number, host?: string, connectionListener?: () => void): Socket;
+ function connect(path: string, connectionListener?: () => void): Socket;
+ /**
+ * A factory function, which creates a new {@link Socket},
+ * immediately initiates connection with `socket.connect()`,
+ * then returns the `net.Socket` that starts the connection.
+ *
+ * When the connection is established, a `'connect'` event will be emitted
+ * on the returned socket. The last parameter `connectListener`, if supplied,
+ * will be added as a listener for the `'connect'` event **once**.
+ *
+ * Possible signatures:
+ *
+ * * {@link createConnection}
+ * * {@link createConnection} for `IPC` connections.
+ * * {@link createConnection} for TCP connections.
+ *
+ * The {@link connect} function is an alias to this function.
+ */
+ function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket;
+ function createConnection(port: number, host?: string, connectionListener?: () => void): Socket;
+ function createConnection(path: string, connectionListener?: () => void): Socket;
+ /**
+ * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4
+ * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`.
+ *
+ * ```js
+ * net.isIP('::1'); // returns 6
+ * net.isIP('127.0.0.1'); // returns 4
+ * net.isIP('127.000.000.001'); // returns 0
+ * net.isIP('127.0.0.1/24'); // returns 0
+ * net.isIP('fhqwhgads'); // returns 0
+ * ```
+ * @since v0.3.0
+ */
+ function isIP(input: string): number;
+ /**
+ * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no
+ * leading zeroes. Otherwise, returns `false`.
+ *
+ * ```js
+ * net.isIPv4('127.0.0.1'); // returns true
+ * net.isIPv4('127.000.000.001'); // returns false
+ * net.isIPv4('127.0.0.1/24'); // returns false
+ * net.isIPv4('fhqwhgads'); // returns false
+ * ```
+ * @since v0.3.0
+ */
+ function isIPv4(input: string): boolean;
+ /**
+ * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`.
+ *
+ * ```js
+ * net.isIPv6('::1'); // returns true
+ * net.isIPv6('fhqwhgads'); // returns false
+ * ```
+ * @since v0.3.0
+ */
+ function isIPv6(input: string): boolean;
+ interface SocketAddressInitOptions {
+ /**
+ * The network address as either an IPv4 or IPv6 string.
+ * @default 127.0.0.1
+ */
+ address?: string | undefined;
+ /**
+ * @default `'ipv4'`
+ */
+ family?: IPVersion | undefined;
+ /**
+ * An IPv6 flow-label used only if `family` is `'ipv6'`.
+ * @default 0
+ */
+ flowlabel?: number | undefined;
+ /**
+ * An IP port.
+ * @default 0
+ */
+ port?: number | undefined;
+ }
+ /**
+ * @since v15.14.0, v14.18.0
+ */
+ class SocketAddress {
+ constructor(options: SocketAddressInitOptions);
+ /**
+ * Either \`'ipv4'\` or \`'ipv6'\`.
+ * @since v15.14.0, v14.18.0
+ */
+ readonly address: string;
+ /**
+ * Either \`'ipv4'\` or \`'ipv6'\`.
+ * @since v15.14.0, v14.18.0
+ */
+ readonly family: IPVersion;
+ /**
+ * @since v15.14.0, v14.18.0
+ */
+ readonly port: number;
+ /**
+ * @since v15.14.0, v14.18.0
+ */
+ readonly flowlabel: number;
+ }
+}
+declare module 'node:net' {
+ export * from 'net';
+}
diff --git a/node_modules/@types/node/ts4.8/os.d.ts b/node_modules/@types/node/ts4.8/os.d.ts
new file mode 100755
index 0000000..3d20864
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/os.d.ts
@@ -0,0 +1,477 @@
+/**
+ * The `node:os` module provides operating system-related utility methods and
+ * properties. It can be accessed using:
+ *
+ * ```js
+ * const os = require('node:os');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/os.js)
+ */
+declare module 'os' {
+ interface CpuInfo {
+ model: string;
+ speed: number;
+ times: {
+ user: number;
+ nice: number;
+ sys: number;
+ idle: number;
+ irq: number;
+ };
+ }
+ interface NetworkInterfaceBase {
+ address: string;
+ netmask: string;
+ mac: string;
+ internal: boolean;
+ cidr: string | null;
+ }
+ interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
+ family: 'IPv4';
+ scopeid?: undefined;
+ }
+ interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
+ family: 'IPv6';
+ scopeid: number;
+ }
+ interface UserInfo<T> {
+ username: T;
+ uid: number;
+ gid: number;
+ shell: T;
+ homedir: T;
+ }
+ type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
+ /**
+ * Returns the host name of the operating system as a string.
+ * @since v0.3.3
+ */
+ function hostname(): string;
+ /**
+ * Returns an array containing the 1, 5, and 15 minute load averages.
+ *
+ * The load average is a measure of system activity calculated by the operating
+ * system and expressed as a fractional number.
+ *
+ * The load average is a Unix-specific concept. On Windows, the return value is
+ * always `[0, 0, 0]`.
+ * @since v0.3.3
+ */
+ function loadavg(): number[];
+ /**
+ * Returns the system uptime in number of seconds.
+ * @since v0.3.3
+ */
+ function uptime(): number;
+ /**
+ * Returns the amount of free system memory in bytes as an integer.
+ * @since v0.3.3
+ */
+ function freemem(): number;
+ /**
+ * Returns the total amount of system memory in bytes as an integer.
+ * @since v0.3.3
+ */
+ function totalmem(): number;
+ /**
+ * Returns an array of objects containing information about each logical CPU core.
+ * The array will be empty if no CPU information is available, such as if the`/proc` file system is unavailable.
+ *
+ * The properties included on each object include:
+ *
+ * ```js
+ * [
+ * {
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
+ * speed: 2926,
+ * times: {
+ * user: 252020,
+ * nice: 0,
+ * sys: 30340,
+ * idle: 1070356870,
+ * irq: 0,
+ * },
+ * },
+ * {
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
+ * speed: 2926,
+ * times: {
+ * user: 306960,
+ * nice: 0,
+ * sys: 26980,
+ * idle: 1071569080,
+ * irq: 0,
+ * },
+ * },
+ * {
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
+ * speed: 2926,
+ * times: {
+ * user: 248450,
+ * nice: 0,
+ * sys: 21750,
+ * idle: 1070919370,
+ * irq: 0,
+ * },
+ * },
+ * {
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
+ * speed: 2926,
+ * times: {
+ * user: 256880,
+ * nice: 0,
+ * sys: 19430,
+ * idle: 1070905480,
+ * irq: 20,
+ * },
+ * },
+ * ]
+ * ```
+ *
+ * `nice` values are POSIX-only. On Windows, the `nice` values of all processors
+ * are always 0.
+ *
+ * `os.cpus().length` should not be used to calculate the amount of parallelism
+ * available to an application. Use {@link availableParallelism} for this purpose.
+ * @since v0.3.3
+ */
+ function cpus(): CpuInfo[];
+ /**
+ * Returns an estimate of the default amount of parallelism a program should use.
+ * Always returns a value greater than zero.
+ *
+ * This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism).
+ * @since v19.4.0, v18.14.0
+ */
+ function availableParallelism(): number;
+ /**
+ * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it
+ * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.
+ *
+ * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information
+ * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems.
+ * @since v0.3.3
+ */
+ function type(): string;
+ /**
+ * Returns the operating system as a string.
+ *
+ * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See
+ * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
+ * @since v0.3.3
+ */
+ function release(): string;
+ /**
+ * Returns an object containing network interfaces that have been assigned a
+ * network address.
+ *
+ * Each key on the returned object identifies a network interface. The associated
+ * value is an array of objects that each describe an assigned network address.
+ *
+ * The properties available on the assigned network address object include:
+ *
+ * ```js
+ * {
+ * lo: [
+ * {
+ * address: '127.0.0.1',
+ * netmask: '255.0.0.0',
+ * family: 'IPv4',
+ * mac: '00:00:00:00:00:00',
+ * internal: true,
+ * cidr: '127.0.0.1/8'
+ * },
+ * {
+ * address: '::1',
+ * netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
+ * family: 'IPv6',
+ * mac: '00:00:00:00:00:00',
+ * scopeid: 0,
+ * internal: true,
+ * cidr: '::1/128'
+ * }
+ * ],
+ * eth0: [
+ * {
+ * address: '192.168.1.108',
+ * netmask: '255.255.255.0',
+ * family: 'IPv4',
+ * mac: '01:02:03:0a:0b:0c',
+ * internal: false,
+ * cidr: '192.168.1.108/24'
+ * },
+ * {
+ * address: 'fe80::a00:27ff:fe4e:66a1',
+ * netmask: 'ffff:ffff:ffff:ffff::',
+ * family: 'IPv6',
+ * mac: '01:02:03:0a:0b:0c',
+ * scopeid: 1,
+ * internal: false,
+ * cidr: 'fe80::a00:27ff:fe4e:66a1/64'
+ * }
+ * ]
+ * }
+ * ```
+ * @since v0.6.0
+ */
+ function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
+ /**
+ * Returns the string path of the current user's home directory.
+ *
+ * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it
+ * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory.
+ *
+ * On Windows, it uses the `USERPROFILE` environment variable if defined.
+ * Otherwise it uses the path to the profile directory of the current user.
+ * @since v2.3.0
+ */
+ function homedir(): string;
+ /**
+ * Returns information about the currently effective user. On POSIX platforms,
+ * this is typically a subset of the password file. The returned object includes
+ * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and`gid` fields are `-1`, and `shell` is `null`.
+ *
+ * The value of `homedir` returned by `os.userInfo()` is provided by the operating
+ * system. This differs from the result of `os.homedir()`, which queries
+ * environment variables for the home directory before falling back to the
+ * operating system response.
+ *
+ * Throws a `SystemError` if a user has no `username` or `homedir`.
+ * @since v6.0.0
+ */
+ function userInfo(options: { encoding: 'buffer' }): UserInfo<Buffer>;
+ function userInfo(options?: { encoding: BufferEncoding }): UserInfo<string>;
+ type SignalConstants = {
+ [key in NodeJS.Signals]: number;
+ };
+ namespace constants {
+ const UV_UDP_REUSEADDR: number;
+ namespace signals {}
+ const signals: SignalConstants;
+ namespace errno {
+ const E2BIG: number;
+ const EACCES: number;
+ const EADDRINUSE: number;
+ const EADDRNOTAVAIL: number;
+ const EAFNOSUPPORT: number;
+ const EAGAIN: number;
+ const EALREADY: number;
+ const EBADF: number;
+ const EBADMSG: number;
+ const EBUSY: number;
+ const ECANCELED: number;
+ const ECHILD: number;
+ const ECONNABORTED: number;
+ const ECONNREFUSED: number;
+ const ECONNRESET: number;
+ const EDEADLK: number;
+ const EDESTADDRREQ: number;
+ const EDOM: number;
+ const EDQUOT: number;
+ const EEXIST: number;
+ const EFAULT: number;
+ const EFBIG: number;
+ const EHOSTUNREACH: number;
+ const EIDRM: number;
+ const EILSEQ: number;
+ const EINPROGRESS: number;
+ const EINTR: number;
+ const EINVAL: number;
+ const EIO: number;
+ const EISCONN: number;
+ const EISDIR: number;
+ const ELOOP: number;
+ const EMFILE: number;
+ const EMLINK: number;
+ const EMSGSIZE: number;
+ const EMULTIHOP: number;
+ const ENAMETOOLONG: number;
+ const ENETDOWN: number;
+ const ENETRESET: number;
+ const ENETUNREACH: number;
+ const ENFILE: number;
+ const ENOBUFS: number;
+ const ENODATA: number;
+ const ENODEV: number;
+ const ENOENT: number;
+ const ENOEXEC: number;
+ const ENOLCK: number;
+ const ENOLINK: number;
+ const ENOMEM: number;
+ const ENOMSG: number;
+ const ENOPROTOOPT: number;
+ const ENOSPC: number;
+ const ENOSR: number;
+ const ENOSTR: number;
+ const ENOSYS: number;
+ const ENOTCONN: number;
+ const ENOTDIR: number;
+ const ENOTEMPTY: number;
+ const ENOTSOCK: number;
+ const ENOTSUP: number;
+ const ENOTTY: number;
+ const ENXIO: number;
+ const EOPNOTSUPP: number;
+ const EOVERFLOW: number;
+ const EPERM: number;
+ const EPIPE: number;
+ const EPROTO: number;
+ const EPROTONOSUPPORT: number;
+ const EPROTOTYPE: number;
+ const ERANGE: number;
+ const EROFS: number;
+ const ESPIPE: number;
+ const ESRCH: number;
+ const ESTALE: number;
+ const ETIME: number;
+ const ETIMEDOUT: number;
+ const ETXTBSY: number;
+ const EWOULDBLOCK: number;
+ const EXDEV: number;
+ const WSAEINTR: number;
+ const WSAEBADF: number;
+ const WSAEACCES: number;
+ const WSAEFAULT: number;
+ const WSAEINVAL: number;
+ const WSAEMFILE: number;
+ const WSAEWOULDBLOCK: number;
+ const WSAEINPROGRESS: number;
+ const WSAEALREADY: number;
+ const WSAENOTSOCK: number;
+ const WSAEDESTADDRREQ: number;
+ const WSAEMSGSIZE: number;
+ const WSAEPROTOTYPE: number;
+ const WSAENOPROTOOPT: number;
+ const WSAEPROTONOSUPPORT: number;
+ const WSAESOCKTNOSUPPORT: number;
+ const WSAEOPNOTSUPP: number;
+ const WSAEPFNOSUPPORT: number;
+ const WSAEAFNOSUPPORT: number;
+ const WSAEADDRINUSE: number;
+ const WSAEADDRNOTAVAIL: number;
+ const WSAENETDOWN: number;
+ const WSAENETUNREACH: number;
+ const WSAENETRESET: number;
+ const WSAECONNABORTED: number;
+ const WSAECONNRESET: number;
+ const WSAENOBUFS: number;
+ const WSAEISCONN: number;
+ const WSAENOTCONN: number;
+ const WSAESHUTDOWN: number;
+ const WSAETOOMANYREFS: number;
+ const WSAETIMEDOUT: number;
+ const WSAECONNREFUSED: number;
+ const WSAELOOP: number;
+ const WSAENAMETOOLONG: number;
+ const WSAEHOSTDOWN: number;
+ const WSAEHOSTUNREACH: number;
+ const WSAENOTEMPTY: number;
+ const WSAEPROCLIM: number;
+ const WSAEUSERS: number;
+ const WSAEDQUOT: number;
+ const WSAESTALE: number;
+ const WSAEREMOTE: number;
+ const WSASYSNOTREADY: number;
+ const WSAVERNOTSUPPORTED: number;
+ const WSANOTINITIALISED: number;
+ const WSAEDISCON: number;
+ const WSAENOMORE: number;
+ const WSAECANCELLED: number;
+ const WSAEINVALIDPROCTABLE: number;
+ const WSAEINVALIDPROVIDER: number;
+ const WSAEPROVIDERFAILEDINIT: number;
+ const WSASYSCALLFAILURE: number;
+ const WSASERVICE_NOT_FOUND: number;
+ const WSATYPE_NOT_FOUND: number;
+ const WSA_E_NO_MORE: number;
+ const WSA_E_CANCELLED: number;
+ const WSAEREFUSED: number;
+ }
+ namespace priority {
+ const PRIORITY_LOW: number;
+ const PRIORITY_BELOW_NORMAL: number;
+ const PRIORITY_NORMAL: number;
+ const PRIORITY_ABOVE_NORMAL: number;
+ const PRIORITY_HIGH: number;
+ const PRIORITY_HIGHEST: number;
+ }
+ }
+ const devNull: string;
+ const EOL: string;
+ /**
+ * Returns the operating system CPU architecture for which the Node.js binary was
+ * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`.
+ *
+ * The return value is equivalent to `process.arch`.
+ * @since v0.5.0
+ */
+ function arch(): string;
+ /**
+ * Returns a string identifying the kernel version.
+ *
+ * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
+ * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
+ * @since v13.11.0, v12.17.0
+ */
+ function version(): string;
+ /**
+ * Returns a string identifying the operating system platform for which
+ * the Node.js binary was compiled. The value is set at compile time.
+ * Possible values are `'aix'`, `'darwin'`, `'freebsd'`,`'linux'`,`'openbsd'`, `'sunos'`, and `'win32'`.
+ *
+ * The return value is equivalent to `process.platform`.
+ *
+ * The value `'android'` may also be returned if Node.js is built on the Android
+ * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
+ * @since v0.5.0
+ */
+ function platform(): NodeJS.Platform;
+ /**
+ * Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`,`mips`, `mips64`, `ppc64`, `ppc64le`, `s390`, `s390x`, `i386`, `i686`, `x86_64`.
+ *
+ * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
+ * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
+ * @since v18.9.0, v16.18.0
+ */
+ function machine(): string;
+ /**
+ * Returns the operating system's default directory for temporary files as a
+ * string.
+ * @since v0.9.9
+ */
+ function tmpdir(): string;
+ /**
+ * Returns a string identifying the endianness of the CPU for which the Node.js
+ * binary was compiled.
+ *
+ * Possible values are `'BE'` for big endian and `'LE'` for little endian.
+ * @since v0.9.4
+ */
+ function endianness(): 'BE' | 'LE';
+ /**
+ * Returns the scheduling priority for the process specified by `pid`. If `pid` is
+ * not provided or is `0`, the priority of the current process is returned.
+ * @since v10.10.0
+ * @param [pid=0] The process ID to retrieve scheduling priority for.
+ */
+ function getPriority(pid?: number): number;
+ /**
+ * Attempts to set the scheduling priority for the process specified by `pid`. If`pid` is not provided or is `0`, the process ID of the current process is used.
+ *
+ * The `priority` input must be an integer between `-20` (high priority) and `19`(low priority). Due to differences between Unix priority levels and Windows
+ * priority classes, `priority` is mapped to one of six priority constants in`os.constants.priority`. When retrieving a process priority level, this range
+ * mapping may cause the return value to be slightly different on Windows. To avoid
+ * confusion, set `priority` to one of the priority constants.
+ *
+ * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user
+ * privileges. Otherwise the set priority will be silently reduced to`PRIORITY_HIGH`.
+ * @since v10.10.0
+ * @param [pid=0] The process ID to set scheduling priority for.
+ * @param priority The scheduling priority to assign to the process.
+ */
+ function setPriority(priority: number): void;
+ function setPriority(pid: number, priority: number): void;
+}
+declare module 'node:os' {
+ export * from 'os';
+}
diff --git a/node_modules/@types/node/ts4.8/path.d.ts b/node_modules/@types/node/ts4.8/path.d.ts
new file mode 100755
index 0000000..723d5da
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/path.d.ts
@@ -0,0 +1,191 @@
+declare module 'path/posix' {
+ import path = require('path');
+ export = path;
+}
+declare module 'path/win32' {
+ import path = require('path');
+ export = path;
+}
+/**
+ * The `node:path` module provides utilities for working with file and directory
+ * paths. It can be accessed using:
+ *
+ * ```js
+ * const path = require('node:path');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/path.js)
+ */
+declare module 'path' {
+ namespace path {
+ /**
+ * A parsed path object generated by path.parse() or consumed by path.format().
+ */
+ interface ParsedPath {
+ /**
+ * The root of the path such as '/' or 'c:\'
+ */
+ root: string;
+ /**
+ * The full directory path such as '/home/user/dir' or 'c:\path\dir'
+ */
+ dir: string;
+ /**
+ * The file name including extension (if any) such as 'index.html'
+ */
+ base: string;
+ /**
+ * The file extension (if any) such as '.html'
+ */
+ ext: string;
+ /**
+ * The file name without extension (if any) such as 'index'
+ */
+ name: string;
+ }
+ interface FormatInputPathObject {
+ /**
+ * The root of the path such as '/' or 'c:\'
+ */
+ root?: string | undefined;
+ /**
+ * The full directory path such as '/home/user/dir' or 'c:\path\dir'
+ */
+ dir?: string | undefined;
+ /**
+ * The file name including extension (if any) such as 'index.html'
+ */
+ base?: string | undefined;
+ /**
+ * The file extension (if any) such as '.html'
+ */
+ ext?: string | undefined;
+ /**
+ * The file name without extension (if any) such as 'index'
+ */
+ name?: string | undefined;
+ }
+ interface PlatformPath {
+ /**
+ * Normalize a string path, reducing '..' and '.' parts.
+ * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
+ *
+ * @param path string path to normalize.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ normalize(path: string): string;
+ /**
+ * Join all arguments together and normalize the resulting path.
+ *
+ * @param paths paths to join.
+ * @throws {TypeError} if any of the path segments is not a string.
+ */
+ join(...paths: string[]): string;
+ /**
+ * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
+ *
+ * Starting from leftmost {from} parameter, resolves {to} to an absolute path.
+ *
+ * If {to} isn't already absolute, {from} arguments are prepended in right to left order,
+ * until an absolute path is found. If after using all {from} paths still no absolute path is found,
+ * the current working directory is used as well. The resulting path is normalized,
+ * and trailing slashes are removed unless the path gets resolved to the root directory.
+ *
+ * @param paths A sequence of paths or path segments.
+ * @throws {TypeError} if any of the arguments is not a string.
+ */
+ resolve(...paths: string[]): string;
+ /**
+ * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
+ *
+ * If the given {path} is a zero-length string, `false` will be returned.
+ *
+ * @param path path to test.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ isAbsolute(path: string): boolean;
+ /**
+ * Solve the relative path from {from} to {to} based on the current working directory.
+ * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
+ *
+ * @throws {TypeError} if either `from` or `to` is not a string.
+ */
+ relative(from: string, to: string): string;
+ /**
+ * Return the directory name of a path. Similar to the Unix dirname command.
+ *
+ * @param path the path to evaluate.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ dirname(path: string): string;
+ /**
+ * Return the last portion of a path. Similar to the Unix basename command.
+ * Often used to extract the file name from a fully qualified path.
+ *
+ * @param path the path to evaluate.
+ * @param suffix optionally, an extension to remove from the result.
+ * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string.
+ */
+ basename(path: string, suffix?: string): string;
+ /**
+ * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
+ * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.
+ *
+ * @param path the path to evaluate.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ extname(path: string): string;
+ /**
+ * The platform-specific file separator. '\\' or '/'.
+ */
+ readonly sep: '\\' | '/';
+ /**
+ * The platform-specific file delimiter. ';' or ':'.
+ */
+ readonly delimiter: ';' | ':';
+ /**
+ * Returns an object from a path string - the opposite of format().
+ *
+ * @param path path to evaluate.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ parse(path: string): ParsedPath;
+ /**
+ * Returns a path string from an object - the opposite of parse().
+ *
+ * @param pathObject path to evaluate.
+ */
+ format(pathObject: FormatInputPathObject): string;
+ /**
+ * On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
+ * If path is not a string, path will be returned without modifications.
+ * This method is meaningful only on Windows system.
+ * On POSIX systems, the method is non-operational and always returns path without modifications.
+ */
+ toNamespacedPath(path: string): string;
+ /**
+ * Posix specific pathing.
+ * Same as parent object on posix.
+ */
+ readonly posix: PlatformPath;
+ /**
+ * Windows specific pathing.
+ * Same as parent object on windows
+ */
+ readonly win32: PlatformPath;
+ }
+ }
+ const path: path.PlatformPath;
+ export = path;
+}
+declare module 'node:path' {
+ import path = require('path');
+ export = path;
+}
+declare module 'node:path/posix' {
+ import path = require('path/posix');
+ export = path;
+}
+declare module 'node:path/win32' {
+ import path = require('path/win32');
+ export = path;
+}
diff --git a/node_modules/@types/node/ts4.8/perf_hooks.d.ts b/node_modules/@types/node/ts4.8/perf_hooks.d.ts
new file mode 100755
index 0000000..c090e1d
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/perf_hooks.d.ts
@@ -0,0 +1,638 @@
+/**
+ * This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for
+ * Node.js-specific performance measurements.
+ *
+ * Node.js supports the following [Web Performance APIs](https://w3c.github.io/perf-timing-primer/):
+ *
+ * * [High Resolution Time](https://www.w3.org/TR/hr-time-2)
+ * * [Performance Timeline](https://w3c.github.io/performance-timeline/)
+ * * [User Timing](https://www.w3.org/TR/user-timing/)
+ * * [Resource Timing](https://www.w3.org/TR/resource-timing-2/)
+ *
+ * ```js
+ * const { PerformanceObserver, performance } = require('node:perf_hooks');
+ *
+ * const obs = new PerformanceObserver((items) => {
+ * console.log(items.getEntries()[0].duration);
+ * performance.clearMarks();
+ * });
+ * obs.observe({ type: 'measure' });
+ * performance.measure('Start to Now');
+ *
+ * performance.mark('A');
+ * doSomeLongRunningProcess(() => {
+ * performance.measure('A to Now', 'A');
+ *
+ * performance.mark('B');
+ * performance.measure('A to B', 'A', 'B');
+ * });
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/perf_hooks.js)
+ */
+declare module 'perf_hooks' {
+ import { AsyncResource } from 'node:async_hooks';
+ type EntryType = 'node' | 'mark' | 'measure' | 'gc' | 'function' | 'http2' | 'http';
+ interface NodeGCPerformanceDetail {
+ /**
+ * When `performanceEntry.entryType` is equal to 'gc', `the performance.kind` property identifies
+ * the type of garbage collection operation that occurred.
+ * See perf_hooks.constants for valid values.
+ */
+ readonly kind?: number | undefined;
+ /**
+ * When `performanceEntry.entryType` is equal to 'gc', the `performance.flags`
+ * property contains additional information about garbage collection operation.
+ * See perf_hooks.constants for valid values.
+ */
+ readonly flags?: number | undefined;
+ }
+ /**
+ * The constructor of this class is not exposed to users directly.
+ * @since v8.5.0
+ */
+ class PerformanceEntry {
+ protected constructor();
+ /**
+ * The total number of milliseconds elapsed for this entry. This value will not
+ * be meaningful for all Performance Entry types.
+ * @since v8.5.0
+ */
+ readonly duration: number;
+ /**
+ * The name of the performance entry.
+ * @since v8.5.0
+ */
+ readonly name: string;
+ /**
+ * The high resolution millisecond timestamp marking the starting time of the
+ * Performance Entry.
+ * @since v8.5.0
+ */
+ readonly startTime: number;
+ /**
+ * The type of the performance entry. It may be one of:
+ *
+ * * `'node'` (Node.js only)
+ * * `'mark'` (available on the Web)
+ * * `'measure'` (available on the Web)
+ * * `'gc'` (Node.js only)
+ * * `'function'` (Node.js only)
+ * * `'http2'` (Node.js only)
+ * * `'http'` (Node.js only)
+ * @since v8.5.0
+ */
+ readonly entryType: EntryType;
+ /**
+ * Additional detail specific to the `entryType`.
+ * @since v16.0.0
+ */
+ readonly detail?: NodeGCPerformanceDetail | unknown | undefined; // TODO: Narrow this based on entry type.
+ toJSON(): any;
+ }
+ /**
+ * Exposes marks created via the `Performance.mark()` method.
+ * @since v18.2.0, v16.17.0
+ */
+ class PerformanceMark extends PerformanceEntry {
+ readonly duration: 0;
+ readonly entryType: 'mark';
+ }
+ /**
+ * Exposes measures created via the `Performance.measure()` method.
+ *
+ * The constructor of this class is not exposed to users directly.
+ * @since v18.2.0, v16.17.0
+ */
+ class PerformanceMeasure extends PerformanceEntry {
+ readonly entryType: 'measure';
+ }
+ /**
+ * _This property is an extension by Node.js. It is not available in Web browsers._
+ *
+ * Provides timing details for Node.js itself. The constructor of this class
+ * is not exposed to users.
+ * @since v8.5.0
+ */
+ class PerformanceNodeTiming extends PerformanceEntry {
+ /**
+ * The high resolution millisecond timestamp at which the Node.js process
+ * completed bootstrapping. If bootstrapping has not yet finished, the property
+ * has the value of -1.
+ * @since v8.5.0
+ */
+ readonly bootstrapComplete: number;
+ /**
+ * The high resolution millisecond timestamp at which the Node.js environment was
+ * initialized.
+ * @since v8.5.0
+ */
+ readonly environment: number;
+ /**
+ * The high resolution millisecond timestamp of the amount of time the event loop
+ * has been idle within the event loop's event provider (e.g. `epoll_wait`). This
+ * does not take CPU usage into consideration. If the event loop has not yet
+ * started (e.g., in the first tick of the main script), the property has the
+ * value of 0.
+ * @since v14.10.0, v12.19.0
+ */
+ readonly idleTime: number;
+ /**
+ * The high resolution millisecond timestamp at which the Node.js event loop
+ * exited. If the event loop has not yet exited, the property has the value of -1\.
+ * It can only have a value of not -1 in a handler of the `'exit'` event.
+ * @since v8.5.0
+ */
+ readonly loopExit: number;
+ /**
+ * The high resolution millisecond timestamp at which the Node.js event loop
+ * started. If the event loop has not yet started (e.g., in the first tick of the
+ * main script), the property has the value of -1.
+ * @since v8.5.0
+ */
+ readonly loopStart: number;
+ /**
+ * The high resolution millisecond timestamp at which the V8 platform was
+ * initialized.
+ * @since v8.5.0
+ */
+ readonly v8Start: number;
+ }
+ interface EventLoopUtilization {
+ idle: number;
+ active: number;
+ utilization: number;
+ }
+ /**
+ * @param util1 The result of a previous call to eventLoopUtilization()
+ * @param util2 The result of a previous call to eventLoopUtilization() prior to util1
+ */
+ type EventLoopUtilityFunction = (util1?: EventLoopUtilization, util2?: EventLoopUtilization) => EventLoopUtilization;
+ interface MarkOptions {
+ /**
+ * Additional optional detail to include with the mark.
+ */
+ detail?: unknown | undefined;
+ /**
+ * An optional timestamp to be used as the mark time.
+ * @default `performance.now()`.
+ */
+ startTime?: number | undefined;
+ }
+ interface MeasureOptions {
+ /**
+ * Additional optional detail to include with the mark.
+ */
+ detail?: unknown | undefined;
+ /**
+ * Duration between start and end times.
+ */
+ duration?: number | undefined;
+ /**
+ * Timestamp to be used as the end time, or a string identifying a previously recorded mark.
+ */
+ end?: number | string | undefined;
+ /**
+ * Timestamp to be used as the start time, or a string identifying a previously recorded mark.
+ */
+ start?: number | string | undefined;
+ }
+ interface TimerifyOptions {
+ /**
+ * A histogram object created using
+ * `perf_hooks.createHistogram()` that will record runtime durations in
+ * nanoseconds.
+ */
+ histogram?: RecordableHistogram | undefined;
+ }
+ interface Performance {
+ /**
+ * If name is not provided, removes all PerformanceMark objects from the Performance Timeline.
+ * If name is provided, removes only the named mark.
+ * @param name
+ */
+ clearMarks(name?: string): void;
+ /**
+ * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline.
+ * If name is provided, removes only the named measure.
+ * @param name
+ * @since v16.7.0
+ */
+ clearMeasures(name?: string): void;
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`.
+ * If you are only interested in performance entries of certain types or that have certain names, see
+ * `performance.getEntriesByType()` and `performance.getEntriesByName()`.
+ * @since v16.7.0
+ */
+ getEntries(): PerformanceEntry[];
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`
+ * whose `performanceEntry.name` is equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to `type`.
+ * @param name
+ * @param type
+ * @since v16.7.0
+ */
+ getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`
+ * whose `performanceEntry.entryType` is equal to `type`.
+ * @param type
+ * @since v16.7.0
+ */
+ getEntriesByType(type: EntryType): PerformanceEntry[];
+ /**
+ * Creates a new PerformanceMark entry in the Performance Timeline.
+ * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark',
+ * and whose performanceEntry.duration is always 0.
+ * Performance marks are used to mark specific significant moments in the Performance Timeline.
+ * @param name
+ * @return The PerformanceMark entry that was created
+ */
+ mark(name?: string, options?: MarkOptions): PerformanceMark;
+ /**
+ * Creates a new PerformanceMeasure entry in the Performance Timeline.
+ * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure',
+ * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark.
+ *
+ * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify
+ * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist,
+ * then startMark is set to timeOrigin by default.
+ *
+ * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp
+ * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown.
+ * @param name
+ * @param startMark
+ * @param endMark
+ * @return The PerformanceMeasure entry that was created
+ */
+ measure(name: string, startMark?: string, endMark?: string): PerformanceMeasure;
+ measure(name: string, options: MeasureOptions): PerformanceMeasure;
+ /**
+ * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones.
+ */
+ readonly nodeTiming: PerformanceNodeTiming;
+ /**
+ * @return the current high resolution millisecond timestamp
+ */
+ now(): number;
+ /**
+ * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured.
+ */
+ readonly timeOrigin: number;
+ /**
+ * Wraps a function within a new function that measures the running time of the wrapped function.
+ * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed.
+ * @param fn
+ */
+ timerify<T extends (...params: any[]) => any>(fn: T, options?: TimerifyOptions): T;
+ /**
+ * eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time.
+ * It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait).
+ * No other CPU idle time is taken into consideration.
+ */
+ eventLoopUtilization: EventLoopUtilityFunction;
+ }
+ interface PerformanceObserverEntryList {
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order
+ * with respect to `performanceEntry.startTime`.
+ *
+ * ```js
+ * const {
+ * performance,
+ * PerformanceObserver,
+ * } = require('node:perf_hooks');
+ *
+ * const obs = new PerformanceObserver((perfObserverList, observer) => {
+ * console.log(perfObserverList.getEntries());
+ *
+ * * [
+ * * PerformanceEntry {
+ * * name: 'test',
+ * * entryType: 'mark',
+ * * startTime: 81.465639,
+ * * duration: 0
+ * * },
+ * * PerformanceEntry {
+ * * name: 'meow',
+ * * entryType: 'mark',
+ * * startTime: 81.860064,
+ * * duration: 0
+ * * }
+ * * ]
+ *
+ *
+ * performance.clearMarks();
+ * performance.clearMeasures();
+ * observer.disconnect();
+ * });
+ * obs.observe({ type: 'mark' });
+ *
+ * performance.mark('test');
+ * performance.mark('meow');
+ * ```
+ * @since v8.5.0
+ */
+ getEntries(): PerformanceEntry[];
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order
+ * with respect to `performanceEntry.startTime` whose `performanceEntry.name` is
+ * equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to`type`.
+ *
+ * ```js
+ * const {
+ * performance,
+ * PerformanceObserver,
+ * } = require('node:perf_hooks');
+ *
+ * const obs = new PerformanceObserver((perfObserverList, observer) => {
+ * console.log(perfObserverList.getEntriesByName('meow'));
+ *
+ * * [
+ * * PerformanceEntry {
+ * * name: 'meow',
+ * * entryType: 'mark',
+ * * startTime: 98.545991,
+ * * duration: 0
+ * * }
+ * * ]
+ *
+ * console.log(perfObserverList.getEntriesByName('nope')); // []
+ *
+ * console.log(perfObserverList.getEntriesByName('test', 'mark'));
+ *
+ * * [
+ * * PerformanceEntry {
+ * * name: 'test',
+ * * entryType: 'mark',
+ * * startTime: 63.518931,
+ * * duration: 0
+ * * }
+ * * ]
+ *
+ * console.log(perfObserverList.getEntriesByName('test', 'measure')); // []
+ *
+ * performance.clearMarks();
+ * performance.clearMeasures();
+ * observer.disconnect();
+ * });
+ * obs.observe({ entryTypes: ['mark', 'measure'] });
+ *
+ * performance.mark('test');
+ * performance.mark('meow');
+ * ```
+ * @since v8.5.0
+ */
+ getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order
+ * with respect to `performanceEntry.startTime` whose `performanceEntry.entryType`is equal to `type`.
+ *
+ * ```js
+ * const {
+ * performance,
+ * PerformanceObserver,
+ * } = require('node:perf_hooks');
+ *
+ * const obs = new PerformanceObserver((perfObserverList, observer) => {
+ * console.log(perfObserverList.getEntriesByType('mark'));
+ *
+ * * [
+ * * PerformanceEntry {
+ * * name: 'test',
+ * * entryType: 'mark',
+ * * startTime: 55.897834,
+ * * duration: 0
+ * * },
+ * * PerformanceEntry {
+ * * name: 'meow',
+ * * entryType: 'mark',
+ * * startTime: 56.350146,
+ * * duration: 0
+ * * }
+ * * ]
+ *
+ * performance.clearMarks();
+ * performance.clearMeasures();
+ * observer.disconnect();
+ * });
+ * obs.observe({ type: 'mark' });
+ *
+ * performance.mark('test');
+ * performance.mark('meow');
+ * ```
+ * @since v8.5.0
+ */
+ getEntriesByType(type: EntryType): PerformanceEntry[];
+ }
+ type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void;
+ /**
+ * @since v8.5.0
+ */
+ class PerformanceObserver extends AsyncResource {
+ constructor(callback: PerformanceObserverCallback);
+ /**
+ * Disconnects the `PerformanceObserver` instance from all notifications.
+ * @since v8.5.0
+ */
+ disconnect(): void;
+ /**
+ * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes`or `options.type`:
+ *
+ * ```js
+ * const {
+ * performance,
+ * PerformanceObserver,
+ * } = require('node:perf_hooks');
+ *
+ * const obs = new PerformanceObserver((list, observer) => {
+ * // Called once asynchronously. `list` contains three items.
+ * });
+ * obs.observe({ type: 'mark' });
+ *
+ * for (let n = 0; n < 3; n++)
+ * performance.mark(`test${n}`);
+ * ```
+ * @since v8.5.0
+ */
+ observe(
+ options:
+ | {
+ entryTypes: ReadonlyArray<EntryType>;
+ buffered?: boolean | undefined;
+ }
+ | {
+ type: EntryType;
+ buffered?: boolean | undefined;
+ }
+ ): void;
+ }
+ namespace constants {
+ const NODE_PERFORMANCE_GC_MAJOR: number;
+ const NODE_PERFORMANCE_GC_MINOR: number;
+ const NODE_PERFORMANCE_GC_INCREMENTAL: number;
+ const NODE_PERFORMANCE_GC_WEAKCB: number;
+ const NODE_PERFORMANCE_GC_FLAGS_NO: number;
+ const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number;
+ const NODE_PERFORMANCE_GC_FLAGS_FORCED: number;
+ const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number;
+ const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number;
+ const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number;
+ const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number;
+ }
+ const performance: Performance;
+ interface EventLoopMonitorOptions {
+ /**
+ * The sampling rate in milliseconds.
+ * Must be greater than zero.
+ * @default 10
+ */
+ resolution?: number | undefined;
+ }
+ interface Histogram {
+ /**
+ * Returns a `Map` object detailing the accumulated percentile distribution.
+ * @since v11.10.0
+ */
+ readonly percentiles: Map<number, number>;
+ /**
+ * The number of times the event loop delay exceeded the maximum 1 hour event
+ * loop delay threshold.
+ * @since v11.10.0
+ */
+ readonly exceeds: number;
+ /**
+ * The minimum recorded event loop delay.
+ * @since v11.10.0
+ */
+ readonly min: number;
+ /**
+ * The maximum recorded event loop delay.
+ * @since v11.10.0
+ */
+ readonly max: number;
+ /**
+ * The mean of the recorded event loop delays.
+ * @since v11.10.0
+ */
+ readonly mean: number;
+ /**
+ * The standard deviation of the recorded event loop delays.
+ * @since v11.10.0
+ */
+ readonly stddev: number;
+ /**
+ * Resets the collected histogram data.
+ * @since v11.10.0
+ */
+ reset(): void;
+ /**
+ * Returns the value at the given percentile.
+ * @since v11.10.0
+ * @param percentile A percentile value in the range (0, 100].
+ */
+ percentile(percentile: number): number;
+ }
+ interface IntervalHistogram extends Histogram {
+ /**
+ * Enables the update interval timer. Returns `true` if the timer was
+ * started, `false` if it was already started.
+ * @since v11.10.0
+ */
+ enable(): boolean;
+ /**
+ * Disables the update interval timer. Returns `true` if the timer was
+ * stopped, `false` if it was already stopped.
+ * @since v11.10.0
+ */
+ disable(): boolean;
+ }
+ interface RecordableHistogram extends Histogram {
+ /**
+ * @since v15.9.0, v14.18.0
+ * @param val The amount to record in the histogram.
+ */
+ record(val: number | bigint): void;
+ /**
+ * Calculates the amount of time (in nanoseconds) that has passed since the
+ * previous call to `recordDelta()` and records that amount in the histogram.
+ *
+ * ## Examples
+ * @since v15.9.0, v14.18.0
+ */
+ recordDelta(): void;
+ /**
+ * Adds the values from `other` to this histogram.
+ * @since v17.4.0, v16.14.0
+ */
+ add(other: RecordableHistogram): void;
+ }
+ /**
+ * _This property is an extension by Node.js. It is not available in Web browsers._
+ *
+ * Creates an `IntervalHistogram` object that samples and reports the event loop
+ * delay over time. The delays will be reported in nanoseconds.
+ *
+ * Using a timer to detect approximate event loop delay works because the
+ * execution of timers is tied specifically to the lifecycle of the libuv
+ * event loop. That is, a delay in the loop will cause a delay in the execution
+ * of the timer, and those delays are specifically what this API is intended to
+ * detect.
+ *
+ * ```js
+ * const { monitorEventLoopDelay } = require('node:perf_hooks');
+ * const h = monitorEventLoopDelay({ resolution: 20 });
+ * h.enable();
+ * // Do something.
+ * h.disable();
+ * console.log(h.min);
+ * console.log(h.max);
+ * console.log(h.mean);
+ * console.log(h.stddev);
+ * console.log(h.percentiles);
+ * console.log(h.percentile(50));
+ * console.log(h.percentile(99));
+ * ```
+ * @since v11.10.0
+ */
+ function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram;
+ interface CreateHistogramOptions {
+ /**
+ * The minimum recordable value. Must be an integer value greater than 0.
+ * @default 1
+ */
+ min?: number | bigint | undefined;
+ /**
+ * The maximum recordable value. Must be an integer value greater than min.
+ * @default Number.MAX_SAFE_INTEGER
+ */
+ max?: number | bigint | undefined;
+ /**
+ * The number of accuracy digits. Must be a number between 1 and 5.
+ * @default 3
+ */
+ figures?: number | undefined;
+ }
+ /**
+ * Returns a `RecordableHistogram`.
+ * @since v15.9.0, v14.18.0
+ */
+ function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
+ import { performance as _performance } from 'perf_hooks';
+ global {
+ /**
+ * `performance` is a global reference for `require('perf_hooks').performance`
+ * https://nodejs.org/api/globals.html#performance
+ * @since v16.0.0
+ */
+ var performance: typeof globalThis extends {
+ onmessage: any;
+ performance: infer T;
+ }
+ ? T
+ : typeof _performance;
+ }
+}
+declare module 'node:perf_hooks' {
+ export * from 'perf_hooks';
+}
diff --git a/node_modules/@types/node/ts4.8/process.d.ts b/node_modules/@types/node/ts4.8/process.d.ts
new file mode 100755
index 0000000..f122546
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/process.d.ts
@@ -0,0 +1,1494 @@
+declare module 'process' {
+ import * as tty from 'node:tty';
+ import { Worker } from 'node:worker_threads';
+ global {
+ var process: NodeJS.Process;
+ namespace NodeJS {
+ // this namespace merge is here because these are specifically used
+ // as the type for process.stdin, process.stdout, and process.stderr.
+ // they can't live in tty.d.ts because we need to disambiguate the imported name.
+ interface ReadStream extends tty.ReadStream {}
+ interface WriteStream extends tty.WriteStream {}
+ interface MemoryUsageFn {
+ /**
+ * The `process.memoryUsage()` method iterate over each page to gather informations about memory
+ * usage which can be slow depending on the program memory allocations.
+ */
+ (): MemoryUsage;
+ /**
+ * method returns an integer representing the Resident Set Size (RSS) in bytes.
+ */
+ rss(): number;
+ }
+ interface MemoryUsage {
+ rss: number;
+ heapTotal: number;
+ heapUsed: number;
+ external: number;
+ arrayBuffers: number;
+ }
+ interface CpuUsage {
+ user: number;
+ system: number;
+ }
+ interface ProcessRelease {
+ name: string;
+ sourceUrl?: string | undefined;
+ headersUrl?: string | undefined;
+ libUrl?: string | undefined;
+ lts?: string | undefined;
+ }
+ interface ProcessVersions extends Dict<string> {
+ http_parser: string;
+ node: string;
+ v8: string;
+ ares: string;
+ uv: string;
+ zlib: string;
+ modules: string;
+ openssl: string;
+ }
+ type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd';
+ type Architecture = 'arm' | 'arm64' | 'ia32' | 'mips' | 'mipsel' | 'ppc' | 'ppc64' | 's390' | 's390x' | 'x64';
+ type Signals =
+ | 'SIGABRT'
+ | 'SIGALRM'
+ | 'SIGBUS'
+ | 'SIGCHLD'
+ | 'SIGCONT'
+ | 'SIGFPE'
+ | 'SIGHUP'
+ | 'SIGILL'
+ | 'SIGINT'
+ | 'SIGIO'
+ | 'SIGIOT'
+ | 'SIGKILL'
+ | 'SIGPIPE'
+ | 'SIGPOLL'
+ | 'SIGPROF'
+ | 'SIGPWR'
+ | 'SIGQUIT'
+ | 'SIGSEGV'
+ | 'SIGSTKFLT'
+ | 'SIGSTOP'
+ | 'SIGSYS'
+ | 'SIGTERM'
+ | 'SIGTRAP'
+ | 'SIGTSTP'
+ | 'SIGTTIN'
+ | 'SIGTTOU'
+ | 'SIGUNUSED'
+ | 'SIGURG'
+ | 'SIGUSR1'
+ | 'SIGUSR2'
+ | 'SIGVTALRM'
+ | 'SIGWINCH'
+ | 'SIGXCPU'
+ | 'SIGXFSZ'
+ | 'SIGBREAK'
+ | 'SIGLOST'
+ | 'SIGINFO';
+ type UncaughtExceptionOrigin = 'uncaughtException' | 'unhandledRejection';
+ type MultipleResolveType = 'resolve' | 'reject';
+ type BeforeExitListener = (code: number) => void;
+ type DisconnectListener = () => void;
+ type ExitListener = (code: number) => void;
+ type RejectionHandledListener = (promise: Promise<unknown>) => void;
+ type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void;
+ /**
+ * Most of the time the unhandledRejection will be an Error, but this should not be relied upon
+ * as *anything* can be thrown/rejected, it is therefore unsafe to assume that the value is an Error.
+ */
+ type UnhandledRejectionListener = (reason: unknown, promise: Promise<unknown>) => void;
+ type WarningListener = (warning: Error) => void;
+ type MessageListener = (message: unknown, sendHandle: unknown) => void;
+ type SignalsListener = (signal: Signals) => void;
+ type MultipleResolveListener = (type: MultipleResolveType, promise: Promise<unknown>, value: unknown) => void;
+ type WorkerListener = (worker: Worker) => void;
+ interface Socket extends ReadWriteStream {
+ isTTY?: true | undefined;
+ }
+ // Alias for compatibility
+ interface ProcessEnv extends Dict<string> {
+ /**
+ * Can be used to change the default timezone at runtime
+ */
+ TZ?: string;
+ }
+ interface HRTime {
+ (time?: [number, number]): [number, number];
+ bigint(): bigint;
+ }
+ interface ProcessReport {
+ /**
+ * Directory where the report is written.
+ * working directory of the Node.js process.
+ * @default '' indicating that reports are written to the current
+ */
+ directory: string;
+ /**
+ * Filename where the report is written.
+ * The default value is the empty string.
+ * @default '' the output filename will be comprised of a timestamp,
+ * PID, and sequence number.
+ */
+ filename: string;
+ /**
+ * Returns a JSON-formatted diagnostic report for the running process.
+ * The report's JavaScript stack trace is taken from err, if present.
+ */
+ getReport(err?: Error): string;
+ /**
+ * If true, a diagnostic report is generated on fatal errors,
+ * such as out of memory errors or failed C++ assertions.
+ * @default false
+ */
+ reportOnFatalError: boolean;
+ /**
+ * If true, a diagnostic report is generated when the process
+ * receives the signal specified by process.report.signal.
+ * @default false
+ */
+ reportOnSignal: boolean;
+ /**
+ * If true, a diagnostic report is generated on uncaught exception.
+ * @default false
+ */
+ reportOnUncaughtException: boolean;
+ /**
+ * The signal used to trigger the creation of a diagnostic report.
+ * @default 'SIGUSR2'
+ */
+ signal: Signals;
+ /**
+ * Writes a diagnostic report to a file. If filename is not provided, the default filename
+ * includes the date, time, PID, and a sequence number.
+ * The report's JavaScript stack trace is taken from err, if present.
+ *
+ * @param fileName Name of the file where the report is written.
+ * This should be a relative path, that will be appended to the directory specified in
+ * `process.report.directory`, or the current working directory of the Node.js process,
+ * if unspecified.
+ * @param error A custom error used for reporting the JavaScript stack.
+ * @return Filename of the generated report.
+ */
+ writeReport(fileName?: string): string;
+ writeReport(error?: Error): string;
+ writeReport(fileName?: string, err?: Error): string;
+ }
+ interface ResourceUsage {
+ fsRead: number;
+ fsWrite: number;
+ involuntaryContextSwitches: number;
+ ipcReceived: number;
+ ipcSent: number;
+ majorPageFault: number;
+ maxRSS: number;
+ minorPageFault: number;
+ sharedMemorySize: number;
+ signalsCount: number;
+ swappedOut: number;
+ systemCPUTime: number;
+ unsharedDataSize: number;
+ unsharedStackSize: number;
+ userCPUTime: number;
+ voluntaryContextSwitches: number;
+ }
+ interface EmitWarningOptions {
+ /**
+ * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted.
+ *
+ * @default 'Warning'
+ */
+ type?: string | undefined;
+ /**
+ * A unique identifier for the warning instance being emitted.
+ */
+ code?: string | undefined;
+ /**
+ * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace.
+ *
+ * @default process.emitWarning
+ */
+ ctor?: Function | undefined;
+ /**
+ * Additional text to include with the error.
+ */
+ detail?: string | undefined;
+ }
+ interface ProcessConfig {
+ readonly target_defaults: {
+ readonly cflags: any[];
+ readonly default_configuration: string;
+ readonly defines: string[];
+ readonly include_dirs: string[];
+ readonly libraries: string[];
+ };
+ readonly variables: {
+ readonly clang: number;
+ readonly host_arch: string;
+ readonly node_install_npm: boolean;
+ readonly node_install_waf: boolean;
+ readonly node_prefix: string;
+ readonly node_shared_openssl: boolean;
+ readonly node_shared_v8: boolean;
+ readonly node_shared_zlib: boolean;
+ readonly node_use_dtrace: boolean;
+ readonly node_use_etw: boolean;
+ readonly node_use_openssl: boolean;
+ readonly target_arch: string;
+ readonly v8_no_strict_aliasing: number;
+ readonly v8_use_snapshot: boolean;
+ readonly visibility: string;
+ };
+ }
+ interface Process extends EventEmitter {
+ /**
+ * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is
+ * a `Writable` stream.
+ *
+ * For example, to copy `process.stdin` to `process.stdout`:
+ *
+ * ```js
+ * import { stdin, stdout } from 'node:process';
+ *
+ * stdin.pipe(stdout);
+ * ```
+ *
+ * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information.
+ */
+ stdout: WriteStream & {
+ fd: 1;
+ };
+ /**
+ * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is
+ * a `Writable` stream.
+ *
+ * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information.
+ */
+ stderr: WriteStream & {
+ fd: 2;
+ };
+ /**
+ * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is
+ * a `Readable` stream.
+ *
+ * For details of how to read from `stdin` see `readable.read()`.
+ *
+ * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that
+ * is compatible with scripts written for Node.js prior to v0.10\.
+ * For more information see `Stream compatibility`.
+ *
+ * In "old" streams mode the `stdin` stream is paused by default, so one
+ * must call `process.stdin.resume()` to read from it. Note also that calling`process.stdin.resume()` itself would switch stream to "old" mode.
+ */
+ stdin: ReadStream & {
+ fd: 0;
+ };
+ openStdin(): Socket;
+ /**
+ * The `process.argv` property returns an array containing the command-line
+ * arguments passed when the Node.js process was launched. The first element will
+ * be {@link execPath}. See `process.argv0` if access to the original value
+ * of `argv[0]` is needed. The second element will be the path to the JavaScript
+ * file being executed. The remaining elements will be any additional command-line
+ * arguments.
+ *
+ * For example, assuming the following script for `process-args.js`:
+ *
+ * ```js
+ * import { argv } from 'node:process';
+ *
+ * // print process.argv
+ * argv.forEach((val, index) => {
+ * console.log(`${index}: ${val}`);
+ * });
+ * ```
+ *
+ * Launching the Node.js process as:
+ *
+ * ```bash
+ * node process-args.js one two=three four
+ * ```
+ *
+ * Would generate the output:
+ *
+ * ```text
+ * 0: /usr/local/bin/node
+ * 1: /Users/mjr/work/node/process-args.js
+ * 2: one
+ * 3: two=three
+ * 4: four
+ * ```
+ * @since v0.1.27
+ */
+ argv: string[];
+ /**
+ * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts.
+ *
+ * ```console
+ * $ bash -c 'exec -a customArgv0 ./node'
+ * > process.argv[0]
+ * '/Volumes/code/external/node/out/Release/node'
+ * > process.argv0
+ * 'customArgv0'
+ * ```
+ * @since v6.4.0
+ */
+ argv0: string;
+ /**
+ * The `process.execArgv` property returns the set of Node.js-specific command-line
+ * options passed when the Node.js process was launched. These options do not
+ * appear in the array returned by the {@link argv} property, and do not
+ * include the Node.js executable, the name of the script, or any options following
+ * the script name. These options are useful in order to spawn child processes with
+ * the same execution environment as the parent.
+ *
+ * ```bash
+ * node --harmony script.js --version
+ * ```
+ *
+ * Results in `process.execArgv`:
+ *
+ * ```js
+ * ['--harmony']
+ * ```
+ *
+ * And `process.argv`:
+ *
+ * ```js
+ * ['/usr/local/bin/node', 'script.js', '--version']
+ * ```
+ *
+ * Refer to `Worker constructor` for the detailed behavior of worker
+ * threads with this property.
+ * @since v0.7.7
+ */
+ execArgv: string[];
+ /**
+ * The `process.execPath` property returns the absolute pathname of the executable
+ * that started the Node.js process. Symbolic links, if any, are resolved.
+ *
+ * ```js
+ * '/usr/local/bin/node'
+ * ```
+ * @since v0.1.100
+ */
+ execPath: string;
+ /**
+ * The `process.abort()` method causes the Node.js process to exit immediately and
+ * generate a core file.
+ *
+ * This feature is not available in `Worker` threads.
+ * @since v0.7.0
+ */
+ abort(): never;
+ /**
+ * The `process.chdir()` method changes the current working directory of the
+ * Node.js process or throws an exception if doing so fails (for instance, if
+ * the specified `directory` does not exist).
+ *
+ * ```js
+ * import { chdir, cwd } from 'node:process';
+ *
+ * console.log(`Starting directory: ${cwd()}`);
+ * try {
+ * chdir('/tmp');
+ * console.log(`New directory: ${cwd()}`);
+ * } catch (err) {
+ * console.error(`chdir: ${err}`);
+ * }
+ * ```
+ *
+ * This feature is not available in `Worker` threads.
+ * @since v0.1.17
+ */
+ chdir(directory: string): void;
+ /**
+ * The `process.cwd()` method returns the current working directory of the Node.js
+ * process.
+ *
+ * ```js
+ * import { cwd } from 'node:process';
+ *
+ * console.log(`Current directory: ${cwd()}`);
+ * ```
+ * @since v0.1.8
+ */
+ cwd(): string;
+ /**
+ * The port used by the Node.js debugger when enabled.
+ *
+ * ```js
+ * import process from 'node:process';
+ *
+ * process.debugPort = 5858;
+ * ```
+ * @since v0.7.2
+ */
+ debugPort: number;
+ /**
+ * The `process.emitWarning()` method can be used to emit custom or application
+ * specific process warnings. These can be listened for by adding a handler to the `'warning'` event.
+ *
+ * ```js
+ * import { emitWarning } from 'node:process';
+ *
+ * // Emit a warning with a code and additional detail.
+ * emitWarning('Something happened!', {
+ * code: 'MY_WARNING',
+ * detail: 'This is some additional information',
+ * });
+ * // Emits:
+ * // (node:56338) [MY_WARNING] Warning: Something happened!
+ * // This is some additional information
+ * ```
+ *
+ * In this example, an `Error` object is generated internally by`process.emitWarning()` and passed through to the `'warning'` handler.
+ *
+ * ```js
+ * import process from 'node:process';
+ *
+ * process.on('warning', (warning) => {
+ * console.warn(warning.name); // 'Warning'
+ * console.warn(warning.message); // 'Something happened!'
+ * console.warn(warning.code); // 'MY_WARNING'
+ * console.warn(warning.stack); // Stack trace
+ * console.warn(warning.detail); // 'This is some additional information'
+ * });
+ * ```
+ *
+ * If `warning` is passed as an `Error` object, the `options` argument is ignored.
+ * @since v8.0.0
+ * @param warning The warning to emit.
+ */
+ emitWarning(warning: string | Error, ctor?: Function): void;
+ emitWarning(warning: string | Error, type?: string, ctor?: Function): void;
+ emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void;
+ emitWarning(warning: string | Error, options?: EmitWarningOptions): void;
+ /**
+ * The `process.env` property returns an object containing the user environment.
+ * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html).
+ *
+ * An example of this object looks like:
+ *
+ * ```js
+ * {
+ * TERM: 'xterm-256color',
+ * SHELL: '/usr/local/bin/bash',
+ * USER: 'maciej',
+ * PATH: '~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin',
+ * PWD: '/Users/maciej',
+ * EDITOR: 'vim',
+ * SHLVL: '1',
+ * HOME: '/Users/maciej',
+ * LOGNAME: 'maciej',
+ * _: '/usr/local/bin/node'
+ * }
+ * ```
+ *
+ * It is possible to modify this object, but such modifications will not be
+ * reflected outside the Node.js process, or (unless explicitly requested)
+ * to other `Worker` threads.
+ * In other words, the following example would not work:
+ *
+ * ```bash
+ * node -e 'process.env.foo = "bar"' &#x26;&#x26; echo $foo
+ * ```
+ *
+ * While the following will:
+ *
+ * ```js
+ * import { env } from 'node:process';
+ *
+ * env.foo = 'bar';
+ * console.log(env.foo);
+ * ```
+ *
+ * Assigning a property on `process.env` will implicitly convert the value
+ * to a string. **This behavior is deprecated.** Future versions of Node.js may
+ * throw an error when the value is not a string, number, or boolean.
+ *
+ * ```js
+ * import { env } from 'node:process';
+ *
+ * env.test = null;
+ * console.log(env.test);
+ * // => 'null'
+ * env.test = undefined;
+ * console.log(env.test);
+ * // => 'undefined'
+ * ```
+ *
+ * Use `delete` to delete a property from `process.env`.
+ *
+ * ```js
+ * import { env } from 'node:process';
+ *
+ * env.TEST = 1;
+ * delete env.TEST;
+ * console.log(env.TEST);
+ * // => undefined
+ * ```
+ *
+ * On Windows operating systems, environment variables are case-insensitive.
+ *
+ * ```js
+ * import { env } from 'node:process';
+ *
+ * env.TEST = 1;
+ * console.log(env.test);
+ * // => 1
+ * ```
+ *
+ * Unless explicitly specified when creating a `Worker` instance,
+ * each `Worker` thread has its own copy of `process.env`, based on its
+ * parent thread's `process.env`, or whatever was specified as the `env` option
+ * to the `Worker` constructor. Changes to `process.env` will not be visible
+ * across `Worker` threads, and only the main thread can make changes that
+ * are visible to the operating system or to native add-ons.
+ * @since v0.1.27
+ */
+ env: ProcessEnv;
+ /**
+ * The `process.exit()` method instructs Node.js to terminate the process
+ * synchronously with an exit status of `code`. If `code` is omitted, exit uses
+ * either the 'success' code `0` or the value of `process.exitCode` if it has been
+ * set. Node.js will not terminate until all the `'exit'` event listeners are
+ * called.
+ *
+ * To exit with a 'failure' code:
+ *
+ * ```js
+ * import { exit } from 'node:process';
+ *
+ * exit(1);
+ * ```
+ *
+ * The shell that executed Node.js should see the exit code as `1`.
+ *
+ * Calling `process.exit()` will force the process to exit as quickly as possible
+ * even if there are still asynchronous operations pending that have not yet
+ * completed fully, including I/O operations to `process.stdout` and`process.stderr`.
+ *
+ * In most situations, it is not actually necessary to call `process.exit()`explicitly. The Node.js process will exit on its own _if there is no additional_
+ * _work pending_ in the event loop. The `process.exitCode` property can be set to
+ * tell the process which exit code to use when the process exits gracefully.
+ *
+ * For instance, the following example illustrates a _misuse_ of the`process.exit()` method that could lead to data printed to stdout being
+ * truncated and lost:
+ *
+ * ```js
+ * import { exit } from 'node:process';
+ *
+ * // This is an example of what *not* to do:
+ * if (someConditionNotMet()) {
+ * printUsageToStdout();
+ * exit(1);
+ * }
+ * ```
+ *
+ * The reason this is problematic is because writes to `process.stdout` in Node.js
+ * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js
+ * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed.
+ *
+ * Rather than calling `process.exit()` directly, the code _should_ set the`process.exitCode` and allow the process to exit naturally by avoiding
+ * scheduling any additional work for the event loop:
+ *
+ * ```js
+ * import process from 'node:process';
+ *
+ * // How to properly set the exit code while letting
+ * // the process exit gracefully.
+ * if (someConditionNotMet()) {
+ * printUsageToStdout();
+ * process.exitCode = 1;
+ * }
+ * ```
+ *
+ * If it is necessary to terminate the Node.js process due to an error condition,
+ * throwing an _uncaught_ error and allowing the process to terminate accordingly
+ * is safer than calling `process.exit()`.
+ *
+ * In `Worker` threads, this function stops the current thread rather
+ * than the current process.
+ * @since v0.1.13
+ * @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed.
+ */
+ exit(code?: number): never;
+ /**
+ * A number which will be the process exit code, when the process either
+ * exits gracefully, or is exited via {@link exit} without specifying
+ * a code.
+ *
+ * Specifying a code to {@link exit} will override any
+ * previous setting of `process.exitCode`.
+ * @since v0.11.8
+ */
+ exitCode?: number | undefined;
+ /**
+ * The `process.getgid()` method returns the numerical group identity of the
+ * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).)
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getgid) {
+ * console.log(`Current gid: ${process.getgid()}`);
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v0.1.31
+ */
+ getgid?: () => number;
+ /**
+ * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a
+ * numeric ID or a group name
+ * string. If a group name is specified, this method blocks while resolving the
+ * associated numeric ID.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getgid &#x26;&#x26; process.setgid) {
+ * console.log(`Current gid: ${process.getgid()}`);
+ * try {
+ * process.setgid(501);
+ * console.log(`New gid: ${process.getgid()}`);
+ * } catch (err) {
+ * console.log(`Failed to set gid: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v0.1.31
+ * @param id The group name or ID
+ */
+ setgid?: (id: number | string) => void;
+ /**
+ * The `process.getuid()` method returns the numeric user identity of the process.
+ * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).)
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getuid) {
+ * console.log(`Current uid: ${process.getuid()}`);
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v0.1.28
+ */
+ getuid?: () => number;
+ /**
+ * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a
+ * numeric ID or a username string.
+ * If a username is specified, the method blocks while resolving the associated
+ * numeric ID.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getuid &#x26;&#x26; process.setuid) {
+ * console.log(`Current uid: ${process.getuid()}`);
+ * try {
+ * process.setuid(501);
+ * console.log(`New uid: ${process.getuid()}`);
+ * } catch (err) {
+ * console.log(`Failed to set uid: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v0.1.28
+ */
+ setuid?: (id: number | string) => void;
+ /**
+ * The `process.geteuid()` method returns the numerical effective user identity of
+ * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).)
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.geteuid) {
+ * console.log(`Current uid: ${process.geteuid()}`);
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v2.0.0
+ */
+ geteuid?: () => number;
+ /**
+ * The `process.seteuid()` method sets the effective user identity of the process.
+ * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username
+ * string. If a username is specified, the method blocks while resolving the
+ * associated numeric ID.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.geteuid &#x26;&#x26; process.seteuid) {
+ * console.log(`Current uid: ${process.geteuid()}`);
+ * try {
+ * process.seteuid(501);
+ * console.log(`New uid: ${process.geteuid()}`);
+ * } catch (err) {
+ * console.log(`Failed to set uid: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v2.0.0
+ * @param id A user name or ID
+ */
+ seteuid?: (id: number | string) => void;
+ /**
+ * The `process.getegid()` method returns the numerical effective group identity
+ * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).)
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getegid) {
+ * console.log(`Current gid: ${process.getegid()}`);
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v2.0.0
+ */
+ getegid?: () => number;
+ /**
+ * The `process.setegid()` method sets the effective group identity of the process.
+ * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group
+ * name string. If a group name is specified, this method blocks while resolving
+ * the associated a numeric ID.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getegid &#x26;&#x26; process.setegid) {
+ * console.log(`Current gid: ${process.getegid()}`);
+ * try {
+ * process.setegid(501);
+ * console.log(`New gid: ${process.getegid()}`);
+ * } catch (err) {
+ * console.log(`Failed to set gid: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v2.0.0
+ * @param id A group name or ID
+ */
+ setegid?: (id: number | string) => void;
+ /**
+ * The `process.getgroups()` method returns an array with the supplementary group
+ * IDs. POSIX leaves it unspecified if the effective group ID is included but
+ * Node.js ensures it always is.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getgroups) {
+ * console.log(process.getgroups()); // [ 16, 21, 297 ]
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v0.9.4
+ */
+ getgroups?: () => number[];
+ /**
+ * The `process.setgroups()` method sets the supplementary group IDs for the
+ * Node.js process. This is a privileged operation that requires the Node.js
+ * process to have `root` or the `CAP_SETGID` capability.
+ *
+ * The `groups` array can contain numeric group IDs, group names, or both.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getgroups &#x26;&#x26; process.setgroups) {
+ * try {
+ * process.setgroups([501]);
+ * console.log(process.getgroups()); // new groups
+ * } catch (err) {
+ * console.log(`Failed to set groups: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v0.9.4
+ */
+ setgroups?: (groups: ReadonlyArray<string | number>) => void;
+ /**
+ * The `process.setUncaughtExceptionCaptureCallback()` function sets a function
+ * that will be invoked when an uncaught exception occurs, which will receive the
+ * exception value itself as its first argument.
+ *
+ * If such a function is set, the `'uncaughtException'` event will
+ * not be emitted. If `--abort-on-uncaught-exception` was passed from the
+ * command line or set through `v8.setFlagsFromString()`, the process will
+ * not abort. Actions configured to take place on exceptions such as report
+ * generations will be affected too
+ *
+ * To unset the capture function,`process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this
+ * method with a non-`null` argument while another capture function is set will
+ * throw an error.
+ *
+ * Using this function is mutually exclusive with using the deprecated `domain` built-in module.
+ * @since v9.3.0
+ */
+ setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
+ /**
+ * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}.
+ * @since v9.3.0
+ */
+ hasUncaughtExceptionCaptureCallback(): boolean;
+ /**
+ * The `process.version` property contains the Node.js version string.
+ *
+ * ```js
+ * import { version } from 'node:process';
+ *
+ * console.log(`Version: ${version}`);
+ * // Version: v14.8.0
+ * ```
+ *
+ * To get the version string without the prepended _v_, use`process.versions.node`.
+ * @since v0.1.3
+ */
+ readonly version: string;
+ /**
+ * The `process.versions` property returns an object listing the version strings of
+ * Node.js and its dependencies. `process.versions.modules` indicates the current
+ * ABI version, which is increased whenever a C++ API changes. Node.js will refuse
+ * to load modules that were compiled against a different module ABI version.
+ *
+ * ```js
+ * import { versions } from 'node:process';
+ *
+ * console.log(versions);
+ * ```
+ *
+ * Will generate an object similar to:
+ *
+ * ```console
+ * { node: '20.2.0',
+ * acorn: '8.8.2',
+ * ada: '2.4.0',
+ * ares: '1.19.0',
+ * base64: '0.5.0',
+ * brotli: '1.0.9',
+ * cjs_module_lexer: '1.2.2',
+ * cldr: '43.0',
+ * icu: '73.1',
+ * llhttp: '8.1.0',
+ * modules: '115',
+ * napi: '8',
+ * nghttp2: '1.52.0',
+ * nghttp3: '0.7.0',
+ * ngtcp2: '0.8.1',
+ * openssl: '3.0.8+quic',
+ * simdutf: '3.2.9',
+ * tz: '2023c',
+ * undici: '5.22.0',
+ * unicode: '15.0',
+ * uv: '1.44.2',
+ * uvwasi: '0.0.16',
+ * v8: '11.3.244.8-node.9',
+ * zlib: '1.2.13' }
+ * ```
+ * @since v0.2.0
+ */
+ readonly versions: ProcessVersions;
+ /**
+ * The `process.config` property returns a frozen `Object` containing the
+ * JavaScript representation of the configure options used to compile the current
+ * Node.js executable. This is the same as the `config.gypi` file that was produced
+ * when running the `./configure` script.
+ *
+ * An example of the possible output looks like:
+ *
+ * ```js
+ * {
+ * target_defaults:
+ * { cflags: [],
+ * default_configuration: 'Release',
+ * defines: [],
+ * include_dirs: [],
+ * libraries: [] },
+ * variables:
+ * {
+ * host_arch: 'x64',
+ * napi_build_version: 5,
+ * node_install_npm: 'true',
+ * node_prefix: '',
+ * node_shared_cares: 'false',
+ * node_shared_http_parser: 'false',
+ * node_shared_libuv: 'false',
+ * node_shared_zlib: 'false',
+ * node_use_openssl: 'true',
+ * node_shared_openssl: 'false',
+ * strict_aliasing: 'true',
+ * target_arch: 'x64',
+ * v8_use_snapshot: 1
+ * }
+ * }
+ * ```
+ * @since v0.7.7
+ */
+ readonly config: ProcessConfig;
+ /**
+ * The `process.kill()` method sends the `signal` to the process identified by`pid`.
+ *
+ * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information.
+ *
+ * This method will throw an error if the target `pid` does not exist. As a special
+ * case, a signal of `0` can be used to test for the existence of a process.
+ * Windows platforms will throw an error if the `pid` is used to kill a process
+ * group.
+ *
+ * Even though the name of this function is `process.kill()`, it is really just a
+ * signal sender, like the `kill` system call. The signal sent may do something
+ * other than kill the target process.
+ *
+ * ```js
+ * import process, { kill } from 'node:process';
+ *
+ * process.on('SIGHUP', () => {
+ * console.log('Got SIGHUP signal.');
+ * });
+ *
+ * setTimeout(() => {
+ * console.log('Exiting.');
+ * process.exit(0);
+ * }, 100);
+ *
+ * kill(process.pid, 'SIGHUP');
+ * ```
+ *
+ * When `SIGUSR1` is received by a Node.js process, Node.js will start the
+ * debugger. See `Signal Events`.
+ * @since v0.0.6
+ * @param pid A process ID
+ * @param [signal='SIGTERM'] The signal to send, either as a string or number.
+ */
+ kill(pid: number, signal?: string | number): true;
+ /**
+ * The `process.pid` property returns the PID of the process.
+ *
+ * ```js
+ * import { pid } from 'node:process';
+ *
+ * console.log(`This process is pid ${pid}`);
+ * ```
+ * @since v0.1.15
+ */
+ readonly pid: number;
+ /**
+ * The `process.ppid` property returns the PID of the parent of the
+ * current process.
+ *
+ * ```js
+ * import { ppid } from 'node:process';
+ *
+ * console.log(`The parent process is pid ${ppid}`);
+ * ```
+ * @since v9.2.0, v8.10.0, v6.13.0
+ */
+ readonly ppid: number;
+ /**
+ * The `process.title` property returns the current process title (i.e. returns
+ * the current value of `ps`). Assigning a new value to `process.title` modifies
+ * the current value of `ps`.
+ *
+ * When a new value is assigned, different platforms will impose different maximum
+ * length restrictions on the title. Usually such restrictions are quite limited.
+ * For instance, on Linux and macOS, `process.title` is limited to the size of the
+ * binary name plus the length of the command-line arguments because setting the`process.title` overwrites the `argv` memory of the process. Node.js v0.8
+ * allowed for longer process title strings by also overwriting the `environ`memory but that was potentially insecure and confusing in some (rather obscure)
+ * cases.
+ *
+ * Assigning a value to `process.title` might not result in an accurate label
+ * within process manager applications such as macOS Activity Monitor or Windows
+ * Services Manager.
+ * @since v0.1.104
+ */
+ title: string;
+ /**
+ * The operating system CPU architecture for which the Node.js binary was compiled.
+ * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`,`'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`.
+ *
+ * ```js
+ * import { arch } from 'node:process';
+ *
+ * console.log(`This processor architecture is ${arch}`);
+ * ```
+ * @since v0.5.0
+ */
+ readonly arch: Architecture;
+ /**
+ * The `process.platform` property returns a string identifying the operating
+ * system platform for which the Node.js binary was compiled.
+ *
+ * Currently possible values are:
+ *
+ * * `'aix'`
+ * * `'darwin'`
+ * * `'freebsd'`
+ * * `'linux'`
+ * * `'openbsd'`
+ * * `'sunos'`
+ * * `'win32'`
+ *
+ * ```js
+ * import { platform } from 'node:process';
+ *
+ * console.log(`This platform is ${platform}`);
+ * ```
+ *
+ * The value `'android'` may also be returned if the Node.js is built on the
+ * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
+ * @since v0.1.16
+ */
+ readonly platform: Platform;
+ /**
+ * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at
+ * runtime, `require.main` may still refer to the original main module in
+ * modules that were required before the change occurred. Generally, it's
+ * safe to assume that the two refer to the same module.
+ *
+ * As with `require.main`, `process.mainModule` will be `undefined` if there
+ * is no entry script.
+ * @since v0.1.17
+ * @deprecated Since v14.0.0 - Use `main` instead.
+ */
+ mainModule?: Module | undefined;
+ memoryUsage: MemoryUsageFn;
+ /**
+ * Gets the amount of memory available to the process (in bytes) based on
+ * limits imposed by the OS. If there is no such constraint, or the constraint
+ * is unknown, `undefined` is returned.
+ *
+ * See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more
+ * information.
+ * @since v19.6.0, v18.15.0
+ * @experimental
+ */
+ constrainedMemory(): number | undefined;
+ /**
+ * The `process.cpuUsage()` method returns the user and system CPU time usage of
+ * the current process, in an object with properties `user` and `system`, whose
+ * values are microsecond values (millionth of a second). These values measure time
+ * spent in user and system code respectively, and may end up being greater than
+ * actual elapsed time if multiple CPU cores are performing work for this process.
+ *
+ * The result of a previous call to `process.cpuUsage()` can be passed as the
+ * argument to the function, to get a diff reading.
+ *
+ * ```js
+ * import { cpuUsage } from 'node:process';
+ *
+ * const startUsage = cpuUsage();
+ * // { user: 38579, system: 6986 }
+ *
+ * // spin the CPU for 500 milliseconds
+ * const now = Date.now();
+ * while (Date.now() - now < 500);
+ *
+ * console.log(cpuUsage(startUsage));
+ * // { user: 514883, system: 11226 }
+ * ```
+ * @since v6.1.0
+ * @param previousValue A previous return value from calling `process.cpuUsage()`
+ */
+ cpuUsage(previousValue?: CpuUsage): CpuUsage;
+ /**
+ * `process.nextTick()` adds `callback` to the "next tick queue". This queue is
+ * fully drained after the current operation on the JavaScript stack runs to
+ * completion and before the event loop is allowed to continue. It's possible to
+ * create an infinite loop if one were to recursively call `process.nextTick()`.
+ * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background.
+ *
+ * ```js
+ * import { nextTick } from 'node:process';
+ *
+ * console.log('start');
+ * nextTick(() => {
+ * console.log('nextTick callback');
+ * });
+ * console.log('scheduled');
+ * // Output:
+ * // start
+ * // scheduled
+ * // nextTick callback
+ * ```
+ *
+ * This is important when developing APIs in order to give users the opportunity
+ * to assign event handlers _after_ an object has been constructed but before any
+ * I/O has occurred:
+ *
+ * ```js
+ * import { nextTick } from 'node:process';
+ *
+ * function MyThing(options) {
+ * this.setupOptions(options);
+ *
+ * nextTick(() => {
+ * this.startDoingStuff();
+ * });
+ * }
+ *
+ * const thing = new MyThing();
+ * thing.getReadyForStuff();
+ *
+ * // thing.startDoingStuff() gets called now, not before.
+ * ```
+ *
+ * It is very important for APIs to be either 100% synchronous or 100%
+ * asynchronous. Consider this example:
+ *
+ * ```js
+ * // WARNING! DO NOT USE! BAD UNSAFE HAZARD!
+ * function maybeSync(arg, cb) {
+ * if (arg) {
+ * cb();
+ * return;
+ * }
+ *
+ * fs.stat('file', cb);
+ * }
+ * ```
+ *
+ * This API is hazardous because in the following case:
+ *
+ * ```js
+ * const maybeTrue = Math.random() > 0.5;
+ *
+ * maybeSync(maybeTrue, () => {
+ * foo();
+ * });
+ *
+ * bar();
+ * ```
+ *
+ * It is not clear whether `foo()` or `bar()` will be called first.
+ *
+ * The following approach is much better:
+ *
+ * ```js
+ * import { nextTick } from 'node:process';
+ *
+ * function definitelyAsync(arg, cb) {
+ * if (arg) {
+ * nextTick(cb);
+ * return;
+ * }
+ *
+ * fs.stat('file', cb);
+ * }
+ * ```
+ * @since v0.1.26
+ * @param args Additional arguments to pass when invoking the `callback`
+ */
+ nextTick(callback: Function, ...args: any[]): void;
+ /**
+ * The `process.release` property returns an `Object` containing metadata related
+ * to the current release, including URLs for the source tarball and headers-only
+ * tarball.
+ *
+ * `process.release` contains the following properties:
+ *
+ * ```js
+ * {
+ * name: 'node',
+ * lts: 'Hydrogen',
+ * sourceUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0.tar.gz',
+ * headersUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz',
+ * libUrl: 'https://nodejs.org/download/release/v18.12.0/win-x64/node.lib'
+ * }
+ * ```
+ *
+ * In custom builds from non-release versions of the source tree, only the`name` property may be present. The additional properties should not be
+ * relied upon to exist.
+ * @since v3.0.0
+ */
+ readonly release: ProcessRelease;
+ features: {
+ inspector: boolean;
+ debug: boolean;
+ uv: boolean;
+ ipv6: boolean;
+ tls_alpn: boolean;
+ tls_sni: boolean;
+ tls_ocsp: boolean;
+ tls: boolean;
+ };
+ /**
+ * `process.umask()` returns the Node.js process's file mode creation mask. Child
+ * processes inherit the mask from the parent process.
+ * @since v0.1.19
+ * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential *
+ * security vulnerability. There is no safe, cross-platform alternative API.
+ */
+ umask(): number;
+ /**
+ * Can only be set if not in worker thread.
+ */
+ umask(mask: string | number): number;
+ /**
+ * The `process.uptime()` method returns the number of seconds the current Node.js
+ * process has been running.
+ *
+ * The return value includes fractions of a second. Use `Math.floor()` to get whole
+ * seconds.
+ * @since v0.5.0
+ */
+ uptime(): number;
+ hrtime: HRTime;
+ /**
+ * If Node.js is spawned with an IPC channel, the `process.send()` method can be
+ * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object.
+ *
+ * If Node.js was not spawned with an IPC channel, `process.send` will be`undefined`.
+ *
+ * The message goes through serialization and parsing. The resulting message might
+ * not be the same as what is originally sent.
+ * @since v0.5.9
+ * @param options used to parameterize the sending of certain types of handles.`options` supports the following properties:
+ */
+ send?(
+ message: any,
+ sendHandle?: any,
+ options?: {
+ swallowErrors?: boolean | undefined;
+ },
+ callback?: (error: Error | null) => void
+ ): boolean;
+ /**
+ * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the
+ * IPC channel to the parent process, allowing the child process to exit gracefully
+ * once there are no other connections keeping it alive.
+ *
+ * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process.
+ *
+ * If the Node.js process was not spawned with an IPC channel,`process.disconnect()` will be `undefined`.
+ * @since v0.7.2
+ */
+ disconnect(): void;
+ /**
+ * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return`true` so long as the IPC
+ * channel is connected and will return `false` after`process.disconnect()` is called.
+ *
+ * Once `process.connected` is `false`, it is no longer possible to send messages
+ * over the IPC channel using `process.send()`.
+ * @since v0.7.2
+ */
+ connected: boolean;
+ /**
+ * The `process.allowedNodeEnvironmentFlags` property is a special,
+ * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable.
+ *
+ * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides`Set.prototype.has` to recognize several different possible flag
+ * representations. `process.allowedNodeEnvironmentFlags.has()` will
+ * return `true` in the following cases:
+ *
+ * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g.,`inspect-brk` for `--inspect-brk`, or `r` for `-r`.
+ * * Flags passed through to V8 (as listed in `--v8-options`) may replace
+ * one or more _non-leading_ dashes for an underscore, or vice-versa;
+ * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`,
+ * etc.
+ * * Flags may contain one or more equals (`=`) characters; all
+ * characters after and including the first equals will be ignored;
+ * e.g., `--stack-trace-limit=100`.
+ * * Flags _must_ be allowable within `NODE_OPTIONS`.
+ *
+ * When iterating over `process.allowedNodeEnvironmentFlags`, flags will
+ * appear only _once_; each will begin with one or more dashes. Flags
+ * passed through to V8 will contain underscores instead of non-leading
+ * dashes:
+ *
+ * ```js
+ * import { allowedNodeEnvironmentFlags } from 'node:process';
+ *
+ * allowedNodeEnvironmentFlags.forEach((flag) => {
+ * // -r
+ * // --inspect-brk
+ * // --abort_on_uncaught_exception
+ * // ...
+ * });
+ * ```
+ *
+ * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail
+ * silently.
+ *
+ * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will
+ * contain what _would have_ been allowable.
+ * @since v10.10.0
+ */
+ allowedNodeEnvironmentFlags: ReadonlySet<string>;
+ /**
+ * `process.report` is an object whose methods are used to generate diagnostic
+ * reports for the current process. Additional documentation is available in the `report documentation`.
+ * @since v11.8.0
+ */
+ report?: ProcessReport | undefined;
+ /**
+ * ```js
+ * import { resourceUsage } from 'node:process';
+ *
+ * console.log(resourceUsage());
+ * /*
+ * Will output:
+ * {
+ * userCPUTime: 82872,
+ * systemCPUTime: 4143,
+ * maxRSS: 33164,
+ * sharedMemorySize: 0,
+ * unsharedDataSize: 0,
+ * unsharedStackSize: 0,
+ * minorPageFault: 2469,
+ * majorPageFault: 0,
+ * swappedOut: 0,
+ * fsRead: 0,
+ * fsWrite: 8,
+ * ipcSent: 0,
+ * ipcReceived: 0,
+ * signalsCount: 0,
+ * voluntaryContextSwitches: 79,
+ * involuntaryContextSwitches: 1
+ * }
+ *
+ * ```
+ * @since v12.6.0
+ * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t].
+ */
+ resourceUsage(): ResourceUsage;
+ /**
+ * The `process.traceDeprecation` property indicates whether the`--trace-deprecation` flag is set on the current Node.js process. See the
+ * documentation for the `'warning' event` and the `emitWarning() method` for more information about this
+ * flag's behavior.
+ * @since v0.8.0
+ */
+ traceDeprecation: boolean;
+ /* EventEmitter */
+ addListener(event: 'beforeExit', listener: BeforeExitListener): this;
+ addListener(event: 'disconnect', listener: DisconnectListener): this;
+ addListener(event: 'exit', listener: ExitListener): this;
+ addListener(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ addListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ addListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ addListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ addListener(event: 'warning', listener: WarningListener): this;
+ addListener(event: 'message', listener: MessageListener): this;
+ addListener(event: Signals, listener: SignalsListener): this;
+ addListener(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ addListener(event: 'worker', listener: WorkerListener): this;
+ emit(event: 'beforeExit', code: number): boolean;
+ emit(event: 'disconnect'): boolean;
+ emit(event: 'exit', code: number): boolean;
+ emit(event: 'rejectionHandled', promise: Promise<unknown>): boolean;
+ emit(event: 'uncaughtException', error: Error): boolean;
+ emit(event: 'uncaughtExceptionMonitor', error: Error): boolean;
+ emit(event: 'unhandledRejection', reason: unknown, promise: Promise<unknown>): boolean;
+ emit(event: 'warning', warning: Error): boolean;
+ emit(event: 'message', message: unknown, sendHandle: unknown): this;
+ emit(event: Signals, signal?: Signals): boolean;
+ emit(event: 'multipleResolves', type: MultipleResolveType, promise: Promise<unknown>, value: unknown): this;
+ emit(event: 'worker', listener: WorkerListener): this;
+ on(event: 'beforeExit', listener: BeforeExitListener): this;
+ on(event: 'disconnect', listener: DisconnectListener): this;
+ on(event: 'exit', listener: ExitListener): this;
+ on(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ on(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ on(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ on(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ on(event: 'warning', listener: WarningListener): this;
+ on(event: 'message', listener: MessageListener): this;
+ on(event: Signals, listener: SignalsListener): this;
+ on(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ on(event: 'worker', listener: WorkerListener): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'beforeExit', listener: BeforeExitListener): this;
+ once(event: 'disconnect', listener: DisconnectListener): this;
+ once(event: 'exit', listener: ExitListener): this;
+ once(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ once(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ once(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ once(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ once(event: 'warning', listener: WarningListener): this;
+ once(event: 'message', listener: MessageListener): this;
+ once(event: Signals, listener: SignalsListener): this;
+ once(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ once(event: 'worker', listener: WorkerListener): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'beforeExit', listener: BeforeExitListener): this;
+ prependListener(event: 'disconnect', listener: DisconnectListener): this;
+ prependListener(event: 'exit', listener: ExitListener): this;
+ prependListener(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ prependListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ prependListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ prependListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ prependListener(event: 'warning', listener: WarningListener): this;
+ prependListener(event: 'message', listener: MessageListener): this;
+ prependListener(event: Signals, listener: SignalsListener): this;
+ prependListener(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ prependListener(event: 'worker', listener: WorkerListener): this;
+ prependOnceListener(event: 'beforeExit', listener: BeforeExitListener): this;
+ prependOnceListener(event: 'disconnect', listener: DisconnectListener): this;
+ prependOnceListener(event: 'exit', listener: ExitListener): this;
+ prependOnceListener(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ prependOnceListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ prependOnceListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ prependOnceListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ prependOnceListener(event: 'warning', listener: WarningListener): this;
+ prependOnceListener(event: 'message', listener: MessageListener): this;
+ prependOnceListener(event: Signals, listener: SignalsListener): this;
+ prependOnceListener(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ prependOnceListener(event: 'worker', listener: WorkerListener): this;
+ listeners(event: 'beforeExit'): BeforeExitListener[];
+ listeners(event: 'disconnect'): DisconnectListener[];
+ listeners(event: 'exit'): ExitListener[];
+ listeners(event: 'rejectionHandled'): RejectionHandledListener[];
+ listeners(event: 'uncaughtException'): UncaughtExceptionListener[];
+ listeners(event: 'uncaughtExceptionMonitor'): UncaughtExceptionListener[];
+ listeners(event: 'unhandledRejection'): UnhandledRejectionListener[];
+ listeners(event: 'warning'): WarningListener[];
+ listeners(event: 'message'): MessageListener[];
+ listeners(event: Signals): SignalsListener[];
+ listeners(event: 'multipleResolves'): MultipleResolveListener[];
+ listeners(event: 'worker'): WorkerListener[];
+ }
+ }
+ }
+ export = process;
+}
+declare module 'node:process' {
+ import process = require('process');
+ export = process;
+}
diff --git a/node_modules/@types/node/ts4.8/punycode.d.ts b/node_modules/@types/node/ts4.8/punycode.d.ts
new file mode 100755
index 0000000..8927207
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/punycode.d.ts
@@ -0,0 +1,117 @@
+/**
+ * **The version of the punycode module bundled in Node.js is being deprecated.**In a future major version of Node.js this module will be removed. Users
+ * currently depending on the `punycode` module should switch to using the
+ * userland-provided [Punycode.js](https://github.com/bestiejs/punycode.js) module instead. For punycode-based URL
+ * encoding, see `url.domainToASCII` or, more generally, the `WHATWG URL API`.
+ *
+ * The `punycode` module is a bundled version of the [Punycode.js](https://github.com/bestiejs/punycode.js) module. It
+ * can be accessed using:
+ *
+ * ```js
+ * const punycode = require('punycode');
+ * ```
+ *
+ * [Punycode](https://tools.ietf.org/html/rfc3492) is a character encoding scheme defined by RFC 3492 that is
+ * primarily intended for use in Internationalized Domain Names. Because host
+ * names in URLs are limited to ASCII characters only, Domain Names that contain
+ * non-ASCII characters must be converted into ASCII using the Punycode scheme.
+ * For instance, the Japanese character that translates into the English word,`'example'` is `'例'`. The Internationalized Domain Name, `'例.com'` (equivalent
+ * to `'example.com'`) is represented by Punycode as the ASCII string`'xn--fsq.com'`.
+ *
+ * The `punycode` module provides a simple implementation of the Punycode standard.
+ *
+ * The `punycode` module is a third-party dependency used by Node.js and
+ * made available to developers as a convenience. Fixes or other modifications to
+ * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
+ * @deprecated Since v7.0.0 - Deprecated
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/punycode.js)
+ */
+declare module 'punycode' {
+ /**
+ * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only
+ * characters to the equivalent string of Unicode codepoints.
+ *
+ * ```js
+ * punycode.decode('maana-pta'); // 'mañana'
+ * punycode.decode('--dqo34k'); // '☃-⌘'
+ * ```
+ * @since v0.5.1
+ */
+ function decode(string: string): string;
+ /**
+ * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters.
+ *
+ * ```js
+ * punycode.encode('mañana'); // 'maana-pta'
+ * punycode.encode('☃-⌘'); // '--dqo34k'
+ * ```
+ * @since v0.5.1
+ */
+ function encode(string: string): string;
+ /**
+ * The `punycode.toUnicode()` method converts a string representing a domain name
+ * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be
+ * converted.
+ *
+ * ```js
+ * // decode domain names
+ * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com'
+ * punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com'
+ * punycode.toUnicode('example.com'); // 'example.com'
+ * ```
+ * @since v0.6.1
+ */
+ function toUnicode(domain: string): string;
+ /**
+ * The `punycode.toASCII()` method converts a Unicode string representing an
+ * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the
+ * domain name will be converted. Calling `punycode.toASCII()` on a string that
+ * already only contains ASCII characters will have no effect.
+ *
+ * ```js
+ * // encode domain names
+ * punycode.toASCII('mañana.com'); // 'xn--maana-pta.com'
+ * punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com'
+ * punycode.toASCII('example.com'); // 'example.com'
+ * ```
+ * @since v0.6.1
+ */
+ function toASCII(domain: string): string;
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ const ucs2: ucs2;
+ interface ucs2 {
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ decode(string: string): number[];
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ encode(codePoints: ReadonlyArray<number>): string;
+ }
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ const version: string;
+}
+declare module 'node:punycode' {
+ export * from 'punycode';
+}
diff --git a/node_modules/@types/node/ts4.8/querystring.d.ts b/node_modules/@types/node/ts4.8/querystring.d.ts
new file mode 100755
index 0000000..e9d087c
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/querystring.d.ts
@@ -0,0 +1,131 @@
+/**
+ * The `node:querystring` module provides utilities for parsing and formatting URL
+ * query strings. It can be accessed using:
+ *
+ * ```js
+ * const querystring = require('node:querystring');
+ * ```
+ *
+ * `querystring` is more performant than `URLSearchParams` but is not a
+ * standardized API. Use `URLSearchParams` when performance is not critical or
+ * when compatibility with browser code is desirable.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/querystring.js)
+ */
+declare module 'querystring' {
+ interface StringifyOptions {
+ encodeURIComponent?: ((str: string) => string) | undefined;
+ }
+ interface ParseOptions {
+ maxKeys?: number | undefined;
+ decodeURIComponent?: ((str: string) => string) | undefined;
+ }
+ interface ParsedUrlQuery extends NodeJS.Dict<string | string[]> {}
+ interface ParsedUrlQueryInput extends NodeJS.Dict<string | number | boolean | ReadonlyArray<string> | ReadonlyArray<number> | ReadonlyArray<boolean> | null> {}
+ /**
+ * The `querystring.stringify()` method produces a URL query string from a
+ * given `obj` by iterating through the object's "own properties".
+ *
+ * It serializes the following types of values passed in `obj`:[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
+ * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) |
+ * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) |
+ * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) |
+ * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
+ * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) |
+ * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) |
+ * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to
+ * empty strings.
+ *
+ * ```js
+ * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' });
+ * // Returns 'foo=bar&#x26;baz=qux&#x26;baz=quux&#x26;corge='
+ *
+ * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':');
+ * // Returns 'foo:bar;baz:qux'
+ * ```
+ *
+ * By default, characters requiring percent-encoding within the query string will
+ * be encoded as UTF-8\. If an alternative encoding is required, then an alternative`encodeURIComponent` option will need to be specified:
+ *
+ * ```js
+ * // Assuming gbkEncodeURIComponent function already exists,
+ *
+ * querystring.stringify({ w: '中文', foo: 'bar' }, null, null,
+ * { encodeURIComponent: gbkEncodeURIComponent });
+ * ```
+ * @since v0.1.25
+ * @param obj The object to serialize into a URL query string
+ * @param [sep='&'] The substring used to delimit key and value pairs in the query string.
+ * @param [eq='='] . The substring used to delimit keys and values in the query string.
+ */
+ function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string;
+ /**
+ * The `querystring.parse()` method parses a URL query string (`str`) into a
+ * collection of key and value pairs.
+ *
+ * For example, the query string `'foo=bar&#x26;abc=xyz&#x26;abc=123'` is parsed into:
+ *
+ * ```js
+ * {
+ * foo: 'bar',
+ * abc: ['xyz', '123']
+ * }
+ * ```
+ *
+ * The object returned by the `querystring.parse()` method _does not_prototypically inherit from the JavaScript `Object`. This means that typical`Object` methods such as `obj.toString()`,
+ * `obj.hasOwnProperty()`, and others
+ * are not defined and _will not work_.
+ *
+ * By default, percent-encoded characters within the query string will be assumed
+ * to use UTF-8 encoding. If an alternative character encoding is used, then an
+ * alternative `decodeURIComponent` option will need to be specified:
+ *
+ * ```js
+ * // Assuming gbkDecodeURIComponent function already exists...
+ *
+ * querystring.parse('w=%D6%D0%CE%C4&#x26;foo=bar', null, null,
+ * { decodeURIComponent: gbkDecodeURIComponent });
+ * ```
+ * @since v0.1.25
+ * @param str The URL query string to parse
+ * @param [sep='&'] The substring used to delimit key and value pairs in the query string.
+ * @param [eq='='] . The substring used to delimit keys and values in the query string.
+ */
+ function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
+ /**
+ * The querystring.encode() function is an alias for querystring.stringify().
+ */
+ const encode: typeof stringify;
+ /**
+ * The querystring.decode() function is an alias for querystring.parse().
+ */
+ const decode: typeof parse;
+ /**
+ * The `querystring.escape()` method performs URL percent-encoding on the given`str` in a manner that is optimized for the specific requirements of URL
+ * query strings.
+ *
+ * The `querystring.escape()` method is used by `querystring.stringify()` and is
+ * generally not expected to be used directly. It is exported primarily to allow
+ * application code to provide a replacement percent-encoding implementation if
+ * necessary by assigning `querystring.escape` to an alternative function.
+ * @since v0.1.25
+ */
+ function escape(str: string): string;
+ /**
+ * The `querystring.unescape()` method performs decoding of URL percent-encoded
+ * characters on the given `str`.
+ *
+ * The `querystring.unescape()` method is used by `querystring.parse()` and is
+ * generally not expected to be used directly. It is exported primarily to allow
+ * application code to provide a replacement decoding implementation if
+ * necessary by assigning `querystring.unescape` to an alternative function.
+ *
+ * By default, the `querystring.unescape()` method will attempt to use the
+ * JavaScript built-in `decodeURIComponent()` method to decode. If that fails,
+ * a safer equivalent that does not throw on malformed URLs will be used.
+ * @since v0.1.25
+ */
+ function unescape(str: string): string;
+}
+declare module 'node:querystring' {
+ export * from 'querystring';
+}
diff --git a/node_modules/@types/node/ts4.8/readline.d.ts b/node_modules/@types/node/ts4.8/readline.d.ts
new file mode 100755
index 0000000..e6f7b0a
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/readline.d.ts
@@ -0,0 +1,526 @@
+/**
+ * The `node:readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time.
+ *
+ * To use the promise-based APIs:
+ *
+ * ```js
+ * import * as readline from 'node:readline/promises';
+ * ```
+ *
+ * To use the callback and sync APIs:
+ *
+ * ```js
+ * import * as readline from 'node:readline';
+ * ```
+ *
+ * The following simple example illustrates the basic use of the `node:readline`module.
+ *
+ * ```js
+ * import * as readline from 'node:readline/promises';
+ * import { stdin as input, stdout as output } from 'node:process';
+ *
+ * const rl = readline.createInterface({ input, output });
+ *
+ * const answer = await rl.question('What do you think of Node.js? ');
+ *
+ * console.log(`Thank you for your valuable feedback: ${answer}`);
+ *
+ * rl.close();
+ * ```
+ *
+ * Once this code is invoked, the Node.js application will not terminate until the`readline.Interface` is closed because the interface waits for data to be
+ * received on the `input` stream.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/readline.js)
+ */
+declare module 'readline' {
+ import { Abortable, EventEmitter } from 'node:events';
+ import * as promises from 'node:readline/promises';
+ export { promises };
+ export interface Key {
+ sequence?: string | undefined;
+ name?: string | undefined;
+ ctrl?: boolean | undefined;
+ meta?: boolean | undefined;
+ shift?: boolean | undefined;
+ }
+ /**
+ * Instances of the `readline.Interface` class are constructed using the`readline.createInterface()` method. Every instance is associated with a
+ * single `input` `Readable` stream and a single `output` `Writable` stream.
+ * The `output` stream is used to print prompts for user input that arrives on,
+ * and is read from, the `input` stream.
+ * @since v0.1.104
+ */
+ export class Interface extends EventEmitter {
+ readonly terminal: boolean;
+ /**
+ * The current input data being processed by node.
+ *
+ * This can be used when collecting input from a TTY stream to retrieve the
+ * current value that has been processed thus far, prior to the `line` event
+ * being emitted. Once the `line` event has been emitted, this property will
+ * be an empty string.
+ *
+ * Be aware that modifying the value during the instance runtime may have
+ * unintended consequences if `rl.cursor` is not also controlled.
+ *
+ * **If not using a TTY stream for input, use the `'line'` event.**
+ *
+ * One possible use case would be as follows:
+ *
+ * ```js
+ * const values = ['lorem ipsum', 'dolor sit amet'];
+ * const rl = readline.createInterface(process.stdin);
+ * const showResults = debounce(() => {
+ * console.log(
+ * '\n',
+ * values.filter((val) => val.startsWith(rl.line)).join(' '),
+ * );
+ * }, 300);
+ * process.stdin.on('keypress', (c, k) => {
+ * showResults();
+ * });
+ * ```
+ * @since v0.1.98
+ */
+ readonly line: string;
+ /**
+ * The cursor position relative to `rl.line`.
+ *
+ * This will track where the current cursor lands in the input string, when
+ * reading input from a TTY stream. The position of cursor determines the
+ * portion of the input string that will be modified as input is processed,
+ * as well as the column where the terminal caret will be rendered.
+ * @since v0.1.98
+ */
+ readonly cursor: number;
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of the `readline.Interface` class are constructed using the
+ * > `readline.createInterface()` method.
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#class-interfaceconstructor
+ */
+ protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean);
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of the `readline.Interface` class are constructed using the
+ * > `readline.createInterface()` method.
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#class-interfaceconstructor
+ */
+ protected constructor(options: ReadLineOptions);
+ /**
+ * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`.
+ * @since v15.3.0, v14.17.0
+ * @return the current prompt string
+ */
+ getPrompt(): string;
+ /**
+ * The `rl.setPrompt()` method sets the prompt that will be written to `output`whenever `rl.prompt()` is called.
+ * @since v0.1.98
+ */
+ setPrompt(prompt: string): void;
+ /**
+ * The `rl.prompt()` method writes the `Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new
+ * location at which to provide input.
+ *
+ * When called, `rl.prompt()` will resume the `input` stream if it has been
+ * paused.
+ *
+ * If the `Interface` was created with `output` set to `null` or`undefined` the prompt is not written.
+ * @since v0.1.98
+ * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`.
+ */
+ prompt(preserveCursor?: boolean): void;
+ /**
+ * The `rl.question()` method displays the `query` by writing it to the `output`,
+ * waits for user input to be provided on `input`, then invokes the `callback`function passing the provided input as the first argument.
+ *
+ * When called, `rl.question()` will resume the `input` stream if it has been
+ * paused.
+ *
+ * If the `Interface` was created with `output` set to `null` or`undefined` the `query` is not written.
+ *
+ * The `callback` function passed to `rl.question()` does not follow the typical
+ * pattern of accepting an `Error` object or `null` as the first argument.
+ * The `callback` is called with the provided answer as the only argument.
+ *
+ * An error will be thrown if calling `rl.question()` after `rl.close()`.
+ *
+ * Example usage:
+ *
+ * ```js
+ * rl.question('What is your favorite food? ', (answer) => {
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * });
+ * ```
+ *
+ * Using an `AbortController` to cancel a question.
+ *
+ * ```js
+ * const ac = new AbortController();
+ * const signal = ac.signal;
+ *
+ * rl.question('What is your favorite food? ', { signal }, (answer) => {
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * });
+ *
+ * signal.addEventListener('abort', () => {
+ * console.log('The food question timed out');
+ * }, { once: true });
+ *
+ * setTimeout(() => ac.abort(), 10000);
+ * ```
+ * @since v0.3.3
+ * @param query A statement or query to write to `output`, prepended to the prompt.
+ * @param callback A callback function that is invoked with the user's input in response to the `query`.
+ */
+ question(query: string, callback: (answer: string) => void): void;
+ question(query: string, options: Abortable, callback: (answer: string) => void): void;
+ /**
+ * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed
+ * later if necessary.
+ *
+ * Calling `rl.pause()` does not immediately pause other events (including`'line'`) from being emitted by the `Interface` instance.
+ * @since v0.3.4
+ */
+ pause(): this;
+ /**
+ * The `rl.resume()` method resumes the `input` stream if it has been paused.
+ * @since v0.3.4
+ */
+ resume(): this;
+ /**
+ * The `rl.close()` method closes the `Interface` instance and
+ * relinquishes control over the `input` and `output` streams. When called,
+ * the `'close'` event will be emitted.
+ *
+ * Calling `rl.close()` does not immediately stop other events (including `'line'`)
+ * from being emitted by the `Interface` instance.
+ * @since v0.1.98
+ */
+ close(): void;
+ /**
+ * The `rl.write()` method will write either `data` or a key sequence identified
+ * by `key` to the `output`. The `key` argument is supported only if `output` is
+ * a `TTY` text terminal. See `TTY keybindings` for a list of key
+ * combinations.
+ *
+ * If `key` is specified, `data` is ignored.
+ *
+ * When called, `rl.write()` will resume the `input` stream if it has been
+ * paused.
+ *
+ * If the `Interface` was created with `output` set to `null` or`undefined` the `data` and `key` are not written.
+ *
+ * ```js
+ * rl.write('Delete this!');
+ * // Simulate Ctrl+U to delete the line written previously
+ * rl.write(null, { ctrl: true, name: 'u' });
+ * ```
+ *
+ * The `rl.write()` method will write the data to the `readline` `Interface`'s`input`_as if it were provided by the user_.
+ * @since v0.1.98
+ */
+ write(data: string | Buffer, key?: Key): void;
+ write(data: undefined | null | string | Buffer, key: Key): void;
+ /**
+ * Returns the real position of the cursor in relation to the input
+ * prompt + string. Long input (wrapping) strings, as well as multiple
+ * line prompts are included in the calculations.
+ * @since v13.5.0, v12.16.0
+ */
+ getCursorPos(): CursorPos;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. line
+ * 3. pause
+ * 4. resume
+ * 5. SIGCONT
+ * 6. SIGINT
+ * 7. SIGTSTP
+ * 8. history
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'line', listener: (input: string) => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: 'SIGCONT', listener: () => void): this;
+ addListener(event: 'SIGINT', listener: () => void): this;
+ addListener(event: 'SIGTSTP', listener: () => void): this;
+ addListener(event: 'history', listener: (history: string[]) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'line', input: string): boolean;
+ emit(event: 'pause'): boolean;
+ emit(event: 'resume'): boolean;
+ emit(event: 'SIGCONT'): boolean;
+ emit(event: 'SIGINT'): boolean;
+ emit(event: 'SIGTSTP'): boolean;
+ emit(event: 'history', history: string[]): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'line', listener: (input: string) => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: 'SIGCONT', listener: () => void): this;
+ on(event: 'SIGINT', listener: () => void): this;
+ on(event: 'SIGTSTP', listener: () => void): this;
+ on(event: 'history', listener: (history: string[]) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'line', listener: (input: string) => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: 'SIGCONT', listener: () => void): this;
+ once(event: 'SIGINT', listener: () => void): this;
+ once(event: 'SIGTSTP', listener: () => void): this;
+ once(event: 'history', listener: (history: string[]) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'line', listener: (input: string) => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: 'SIGCONT', listener: () => void): this;
+ prependListener(event: 'SIGINT', listener: () => void): this;
+ prependListener(event: 'SIGTSTP', listener: () => void): this;
+ prependListener(event: 'history', listener: (history: string[]) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'line', listener: (input: string) => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: 'SIGCONT', listener: () => void): this;
+ prependOnceListener(event: 'SIGINT', listener: () => void): this;
+ prependOnceListener(event: 'SIGTSTP', listener: () => void): this;
+ prependOnceListener(event: 'history', listener: (history: string[]) => void): this;
+ [Symbol.asyncIterator](): AsyncIterableIterator<string>;
+ }
+ export type ReadLine = Interface; // type forwarded for backwards compatibility
+ export type Completer = (line: string) => CompleterResult;
+ export type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => void;
+ export type CompleterResult = [string[], string];
+ export interface ReadLineOptions {
+ input: NodeJS.ReadableStream;
+ output?: NodeJS.WritableStream | undefined;
+ completer?: Completer | AsyncCompleter | undefined;
+ terminal?: boolean | undefined;
+ /**
+ * Initial list of history lines. This option makes sense
+ * only if `terminal` is set to `true` by the user or by an internal `output`
+ * check, otherwise the history caching mechanism is not initialized at all.
+ * @default []
+ */
+ history?: string[] | undefined;
+ historySize?: number | undefined;
+ prompt?: string | undefined;
+ crlfDelay?: number | undefined;
+ /**
+ * If `true`, when a new input line added
+ * to the history list duplicates an older one, this removes the older line
+ * from the list.
+ * @default false
+ */
+ removeHistoryDuplicates?: boolean | undefined;
+ escapeCodeTimeout?: number | undefined;
+ tabSize?: number | undefined;
+ }
+ /**
+ * The `readline.createInterface()` method creates a new `readline.Interface`instance.
+ *
+ * ```js
+ * const readline = require('node:readline');
+ * const rl = readline.createInterface({
+ * input: process.stdin,
+ * output: process.stdout,
+ * });
+ * ```
+ *
+ * Once the `readline.Interface` instance is created, the most common case is to
+ * listen for the `'line'` event:
+ *
+ * ```js
+ * rl.on('line', (line) => {
+ * console.log(`Received: ${line}`);
+ * });
+ * ```
+ *
+ * If `terminal` is `true` for this instance then the `output` stream will get
+ * the best compatibility if it defines an `output.columns` property and emits
+ * a `'resize'` event on the `output` if or when the columns ever change
+ * (`process.stdout` does this automatically when it is a TTY).
+ *
+ * When creating a `readline.Interface` using `stdin` as input, the program
+ * will not terminate until it receives an [EOF character](https://en.wikipedia.org/wiki/End-of-file#EOF_character). To exit without
+ * waiting for user input, call `process.stdin.unref()`.
+ * @since v0.1.98
+ */
+ export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
+ export function createInterface(options: ReadLineOptions): Interface;
+ /**
+ * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input.
+ *
+ * Optionally, `interface` specifies a `readline.Interface` instance for which
+ * autocompletion is disabled when copy-pasted input is detected.
+ *
+ * If the `stream` is a `TTY`, then it must be in raw mode.
+ *
+ * This is automatically called by any readline instance on its `input` if the`input` is a terminal. Closing the `readline` instance does not stop
+ * the `input` from emitting `'keypress'` events.
+ *
+ * ```js
+ * readline.emitKeypressEvents(process.stdin);
+ * if (process.stdin.isTTY)
+ * process.stdin.setRawMode(true);
+ * ```
+ *
+ * ## Example: Tiny CLI
+ *
+ * The following example illustrates the use of `readline.Interface` class to
+ * implement a small command-line interface:
+ *
+ * ```js
+ * const readline = require('node:readline');
+ * const rl = readline.createInterface({
+ * input: process.stdin,
+ * output: process.stdout,
+ * prompt: 'OHAI> ',
+ * });
+ *
+ * rl.prompt();
+ *
+ * rl.on('line', (line) => {
+ * switch (line.trim()) {
+ * case 'hello':
+ * console.log('world!');
+ * break;
+ * default:
+ * console.log(`Say what? I might have heard '${line.trim()}'`);
+ * break;
+ * }
+ * rl.prompt();
+ * }).on('close', () => {
+ * console.log('Have a great day!');
+ * process.exit(0);
+ * });
+ * ```
+ *
+ * ## Example: Read file stream line-by-Line
+ *
+ * A common use case for `readline` is to consume an input file one line at a
+ * time. The easiest way to do so is leveraging the `fs.ReadStream` API as
+ * well as a `for await...of` loop:
+ *
+ * ```js
+ * const fs = require('node:fs');
+ * const readline = require('node:readline');
+ *
+ * async function processLineByLine() {
+ * const fileStream = fs.createReadStream('input.txt');
+ *
+ * const rl = readline.createInterface({
+ * input: fileStream,
+ * crlfDelay: Infinity,
+ * });
+ * // Note: we use the crlfDelay option to recognize all instances of CR LF
+ * // ('\r\n') in input.txt as a single line break.
+ *
+ * for await (const line of rl) {
+ * // Each line in input.txt will be successively available here as `line`.
+ * console.log(`Line from file: ${line}`);
+ * }
+ * }
+ *
+ * processLineByLine();
+ * ```
+ *
+ * Alternatively, one could use the `'line'` event:
+ *
+ * ```js
+ * const fs = require('node:fs');
+ * const readline = require('node:readline');
+ *
+ * const rl = readline.createInterface({
+ * input: fs.createReadStream('sample.txt'),
+ * crlfDelay: Infinity,
+ * });
+ *
+ * rl.on('line', (line) => {
+ * console.log(`Line from file: ${line}`);
+ * });
+ * ```
+ *
+ * Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied:
+ *
+ * ```js
+ * const { once } = require('node:events');
+ * const { createReadStream } = require('node:fs');
+ * const { createInterface } = require('node:readline');
+ *
+ * (async function processLineByLine() {
+ * try {
+ * const rl = createInterface({
+ * input: createReadStream('big-file.txt'),
+ * crlfDelay: Infinity,
+ * });
+ *
+ * rl.on('line', (line) => {
+ * // Process the line.
+ * });
+ *
+ * await once(rl, 'close');
+ *
+ * console.log('File processed.');
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * })();
+ * ```
+ * @since v0.7.7
+ */
+ export function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
+ export type Direction = -1 | 0 | 1;
+ export interface CursorPos {
+ rows: number;
+ cols: number;
+ }
+ /**
+ * The `readline.clearLine()` method clears current line of given `TTY` stream
+ * in a specified direction identified by `dir`.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
+ /**
+ * The `readline.clearScreenDown()` method clears the given `TTY` stream from
+ * the current position of the cursor down.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
+ /**
+ * The `readline.cursorTo()` method moves cursor to the specified position in a
+ * given `TTY` `stream`.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
+ /**
+ * The `readline.moveCursor()` method moves the cursor _relative_ to its current
+ * position in a given `TTY` `stream`.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ export function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
+}
+declare module 'node:readline' {
+ export * from 'readline';
+}
diff --git a/node_modules/@types/node/ts4.8/readline/promises.d.ts b/node_modules/@types/node/ts4.8/readline/promises.d.ts
new file mode 100755
index 0000000..079fbdf
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/readline/promises.d.ts
@@ -0,0 +1,145 @@
+/**
+ * @since v17.0.0
+ * @experimental
+ */
+declare module 'readline/promises' {
+ import { Interface as _Interface, ReadLineOptions, Completer, AsyncCompleter, Direction } from 'node:readline';
+ import { Abortable } from 'node:events';
+ /**
+ * Instances of the `readlinePromises.Interface` class are constructed using the`readlinePromises.createInterface()` method. Every instance is associated with a
+ * single `input` `Readable` stream and a single `output` `Writable` stream.
+ * The `output` stream is used to print prompts for user input that arrives on,
+ * and is read from, the `input` stream.
+ * @since v17.0.0
+ */
+ class Interface extends _Interface {
+ /**
+ * The `rl.question()` method displays the `query` by writing it to the `output`,
+ * waits for user input to be provided on `input`, then invokes the `callback`function passing the provided input as the first argument.
+ *
+ * When called, `rl.question()` will resume the `input` stream if it has been
+ * paused.
+ *
+ * If the `Interface` was created with `output` set to `null` or`undefined` the `query` is not written.
+ *
+ * If the question is called after `rl.close()`, it returns a rejected promise.
+ *
+ * Example usage:
+ *
+ * ```js
+ * const answer = await rl.question('What is your favorite food? ');
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * ```
+ *
+ * Using an `AbortSignal` to cancel a question.
+ *
+ * ```js
+ * const signal = AbortSignal.timeout(10_000);
+ *
+ * signal.addEventListener('abort', () => {
+ * console.log('The food question timed out');
+ * }, { once: true });
+ *
+ * const answer = await rl.question('What is your favorite food? ', { signal });
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * ```
+ * @since v17.0.0
+ * @param query A statement or query to write to `output`, prepended to the prompt.
+ * @return A promise that is fulfilled with the user's input in response to the `query`.
+ */
+ question(query: string): Promise<string>;
+ question(query: string, options: Abortable): Promise<string>;
+ }
+ /**
+ * @since v17.0.0
+ */
+ class Readline {
+ /**
+ * @param stream A TTY stream.
+ */
+ constructor(
+ stream: NodeJS.WritableStream,
+ options?: {
+ autoCommit?: boolean;
+ }
+ );
+ /**
+ * The `rl.clearLine()` method adds to the internal list of pending action an
+ * action that clears current line of the associated `stream` in a specified
+ * direction identified by `dir`.
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`was passed to the constructor.
+ * @since v17.0.0
+ * @return this
+ */
+ clearLine(dir: Direction): this;
+ /**
+ * The `rl.clearScreenDown()` method adds to the internal list of pending action an
+ * action that clears the associated stream from the current position of the
+ * cursor down.
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`was passed to the constructor.
+ * @since v17.0.0
+ * @return this
+ */
+ clearScreenDown(): this;
+ /**
+ * The `rl.commit()` method sends all the pending actions to the associated`stream` and clears the internal list of pending actions.
+ * @since v17.0.0
+ */
+ commit(): Promise<void>;
+ /**
+ * The `rl.cursorTo()` method adds to the internal list of pending action an action
+ * that moves cursor to the specified position in the associated `stream`.
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`was passed to the constructor.
+ * @since v17.0.0
+ * @return this
+ */
+ cursorTo(x: number, y?: number): this;
+ /**
+ * The `rl.moveCursor()` method adds to the internal list of pending action an
+ * action that moves the cursor _relative_ to its current position in the
+ * associated `stream`.
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true`was passed to the constructor.
+ * @since v17.0.0
+ * @return this
+ */
+ moveCursor(dx: number, dy: number): this;
+ /**
+ * The `rl.rollback` methods clears the internal list of pending actions without
+ * sending it to the associated `stream`.
+ * @since v17.0.0
+ * @return this
+ */
+ rollback(): this;
+ }
+ /**
+ * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface`instance.
+ *
+ * ```js
+ * const readlinePromises = require('node:readline/promises');
+ * const rl = readlinePromises.createInterface({
+ * input: process.stdin,
+ * output: process.stdout,
+ * });
+ * ```
+ *
+ * Once the `readlinePromises.Interface` instance is created, the most common case
+ * is to listen for the `'line'` event:
+ *
+ * ```js
+ * rl.on('line', (line) => {
+ * console.log(`Received: ${line}`);
+ * });
+ * ```
+ *
+ * If `terminal` is `true` for this instance then the `output` stream will get
+ * the best compatibility if it defines an `output.columns` property and emits
+ * a `'resize'` event on the `output` if or when the columns ever change
+ * (`process.stdout` does this automatically when it is a TTY).
+ * @since v17.0.0
+ */
+ function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
+ function createInterface(options: ReadLineOptions): Interface;
+}
+declare module 'node:readline/promises' {
+ export * from 'readline/promises';
+}
diff --git a/node_modules/@types/node/ts4.8/repl.d.ts b/node_modules/@types/node/ts4.8/repl.d.ts
new file mode 100755
index 0000000..c8147ed
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/repl.d.ts
@@ -0,0 +1,424 @@
+/**
+ * The `node:repl` module provides a Read-Eval-Print-Loop (REPL) implementation
+ * that is available both as a standalone program or includible in other
+ * applications. It can be accessed using:
+ *
+ * ```js
+ * const repl = require('node:repl');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/repl.js)
+ */
+declare module 'repl' {
+ import { Interface, Completer, AsyncCompleter } from 'node:readline';
+ import { Context } from 'node:vm';
+ import { InspectOptions } from 'node:util';
+ interface ReplOptions {
+ /**
+ * The input prompt to display.
+ * @default "> "
+ */
+ prompt?: string | undefined;
+ /**
+ * The `Readable` stream from which REPL input will be read.
+ * @default process.stdin
+ */
+ input?: NodeJS.ReadableStream | undefined;
+ /**
+ * The `Writable` stream to which REPL output will be written.
+ * @default process.stdout
+ */
+ output?: NodeJS.WritableStream | undefined;
+ /**
+ * If `true`, specifies that the output should be treated as a TTY terminal, and have
+ * ANSI/VT100 escape codes written to it.
+ * Default: checking the value of the `isTTY` property on the output stream upon
+ * instantiation.
+ */
+ terminal?: boolean | undefined;
+ /**
+ * The function to be used when evaluating each given line of input.
+ * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can
+ * error with `repl.Recoverable` to indicate the input was incomplete and prompt for
+ * additional lines.
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_default_evaluation
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_custom_evaluation_functions
+ */
+ eval?: REPLEval | undefined;
+ /**
+ * Defines if the repl prints output previews or not.
+ * @default `true` Always `false` in case `terminal` is falsy.
+ */
+ preview?: boolean | undefined;
+ /**
+ * If `true`, specifies that the default `writer` function should include ANSI color
+ * styling to REPL output. If a custom `writer` function is provided then this has no
+ * effect.
+ * Default: the REPL instance's `terminal` value.
+ */
+ useColors?: boolean | undefined;
+ /**
+ * If `true`, specifies that the default evaluation function will use the JavaScript
+ * `global` as the context as opposed to creating a new separate context for the REPL
+ * instance. The node CLI REPL sets this value to `true`.
+ * Default: `false`.
+ */
+ useGlobal?: boolean | undefined;
+ /**
+ * If `true`, specifies that the default writer will not output the return value of a
+ * command if it evaluates to `undefined`.
+ * Default: `false`.
+ */
+ ignoreUndefined?: boolean | undefined;
+ /**
+ * The function to invoke to format the output of each command before writing to `output`.
+ * Default: a wrapper for `util.inspect`.
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_customizing_repl_output
+ */
+ writer?: REPLWriter | undefined;
+ /**
+ * An optional function used for custom Tab auto completion.
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#readline_use_of_the_completer_function
+ */
+ completer?: Completer | AsyncCompleter | undefined;
+ /**
+ * A flag that specifies whether the default evaluator executes all JavaScript commands in
+ * strict mode or default (sloppy) mode.
+ * Accepted values are:
+ * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
+ * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
+ * prefacing every repl statement with `'use strict'`.
+ */
+ replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined;
+ /**
+ * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is
+ * pressed. This cannot be used together with a custom `eval` function.
+ * Default: `false`.
+ */
+ breakEvalOnSigint?: boolean | undefined;
+ }
+ type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void;
+ type REPLWriter = (this: REPLServer, obj: any) => string;
+ /**
+ * This is the default "writer" value, if none is passed in the REPL options,
+ * and it can be overridden by custom print functions.
+ */
+ const writer: REPLWriter & {
+ options: InspectOptions;
+ };
+ type REPLCommandAction = (this: REPLServer, text: string) => void;
+ interface REPLCommand {
+ /**
+ * Help text to be displayed when `.help` is entered.
+ */
+ help?: string | undefined;
+ /**
+ * The function to execute, optionally accepting a single string argument.
+ */
+ action: REPLCommandAction;
+ }
+ /**
+ * Instances of `repl.REPLServer` are created using the {@link start} method
+ * or directly using the JavaScript `new` keyword.
+ *
+ * ```js
+ * const repl = require('node:repl');
+ *
+ * const options = { useColors: true };
+ *
+ * const firstInstance = repl.start(options);
+ * const secondInstance = new repl.REPLServer(options);
+ * ```
+ * @since v0.1.91
+ */
+ class REPLServer extends Interface {
+ /**
+ * The `vm.Context` provided to the `eval` function to be used for JavaScript
+ * evaluation.
+ */
+ readonly context: Context;
+ /**
+ * @deprecated since v14.3.0 - Use `input` instead.
+ */
+ readonly inputStream: NodeJS.ReadableStream;
+ /**
+ * @deprecated since v14.3.0 - Use `output` instead.
+ */
+ readonly outputStream: NodeJS.WritableStream;
+ /**
+ * The `Readable` stream from which REPL input will be read.
+ */
+ readonly input: NodeJS.ReadableStream;
+ /**
+ * The `Writable` stream to which REPL output will be written.
+ */
+ readonly output: NodeJS.WritableStream;
+ /**
+ * The commands registered via `replServer.defineCommand()`.
+ */
+ readonly commands: NodeJS.ReadOnlyDict<REPLCommand>;
+ /**
+ * A value indicating whether the REPL is currently in "editor mode".
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_commands_and_special_keys
+ */
+ readonly editorMode: boolean;
+ /**
+ * A value indicating whether the `_` variable has been assigned.
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly underscoreAssigned: boolean;
+ /**
+ * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly last: any;
+ /**
+ * A value indicating whether the `_error` variable has been assigned.
+ *
+ * @since v9.8.0
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly underscoreErrAssigned: boolean;
+ /**
+ * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
+ *
+ * @since v9.8.0
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly lastError: any;
+ /**
+ * Specified in the REPL options, this is the function to be used when evaluating each
+ * given line of input. If not specified in the REPL options, this is an async wrapper
+ * for the JavaScript `eval()` function.
+ */
+ readonly eval: REPLEval;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default
+ * `writer` function should include ANSI color styling to REPL output.
+ */
+ readonly useColors: boolean;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default `eval`
+ * function will use the JavaScript `global` as the context as opposed to creating a new
+ * separate context for the REPL instance.
+ */
+ readonly useGlobal: boolean;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default `writer`
+ * function should output the result of a command if it evaluates to `undefined`.
+ */
+ readonly ignoreUndefined: boolean;
+ /**
+ * Specified in the REPL options, this is the function to invoke to format the output of
+ * each command before writing to `outputStream`. If not specified in the REPL options,
+ * this will be a wrapper for `util.inspect`.
+ */
+ readonly writer: REPLWriter;
+ /**
+ * Specified in the REPL options, this is the function to use for custom Tab auto-completion.
+ */
+ readonly completer: Completer | AsyncCompleter;
+ /**
+ * Specified in the REPL options, this is a flag that specifies whether the default `eval`
+ * function should execute all JavaScript commands in strict mode or default (sloppy) mode.
+ * Possible values are:
+ * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
+ * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
+ * prefacing every repl statement with `'use strict'`.
+ */
+ readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of `repl.REPLServer` are created using the `repl.start()` method and
+ * > _should not_ be created directly using the JavaScript `new` keyword.
+ *
+ * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_class_replserver
+ */
+ private constructor();
+ /**
+ * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands
+ * to the REPL instance. Such commands are invoked by typing a `.` followed by the`keyword`. The `cmd` is either a `Function` or an `Object` with the following
+ * properties:
+ *
+ * The following example shows two new commands added to the REPL instance:
+ *
+ * ```js
+ * const repl = require('node:repl');
+ *
+ * const replServer = repl.start({ prompt: '> ' });
+ * replServer.defineCommand('sayhello', {
+ * help: 'Say hello',
+ * action(name) {
+ * this.clearBufferedCommand();
+ * console.log(`Hello, ${name}!`);
+ * this.displayPrompt();
+ * },
+ * });
+ * replServer.defineCommand('saybye', function saybye() {
+ * console.log('Goodbye!');
+ * this.close();
+ * });
+ * ```
+ *
+ * The new commands can then be used from within the REPL instance:
+ *
+ * ```console
+ * > .sayhello Node.js User
+ * Hello, Node.js User!
+ * > .saybye
+ * Goodbye!
+ * ```
+ * @since v0.3.0
+ * @param keyword The command keyword (_without_ a leading `.` character).
+ * @param cmd The function to invoke when the command is processed.
+ */
+ defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void;
+ /**
+ * The `replServer.displayPrompt()` method readies the REPL instance for input
+ * from the user, printing the configured `prompt` to a new line in the `output`and resuming the `input` to accept new input.
+ *
+ * When multi-line input is being entered, an ellipsis is printed rather than the
+ * 'prompt'.
+ *
+ * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`.
+ *
+ * The `replServer.displayPrompt` method is primarily intended to be called from
+ * within the action function for commands registered using the`replServer.defineCommand()` method.
+ * @since v0.1.91
+ */
+ displayPrompt(preserveCursor?: boolean): void;
+ /**
+ * The `replServer.clearBufferedCommand()` method clears any command that has been
+ * buffered but not yet executed. This method is primarily intended to be
+ * called from within the action function for commands registered using the`replServer.defineCommand()` method.
+ * @since v9.0.0
+ */
+ clearBufferedCommand(): void;
+ /**
+ * Initializes a history log file for the REPL instance. When executing the
+ * Node.js binary and using the command-line REPL, a history file is initialized
+ * by default. However, this is not the case when creating a REPL
+ * programmatically. Use this method to initialize a history log file when working
+ * with REPL instances programmatically.
+ * @since v11.10.0
+ * @param historyPath the path to the history file
+ * @param callback called when history writes are ready or upon error
+ */
+ setupHistory(path: string, callback: (err: Error | null, repl: this) => void): void;
+ /**
+ * events.EventEmitter
+ * 1. close - inherited from `readline.Interface`
+ * 2. line - inherited from `readline.Interface`
+ * 3. pause - inherited from `readline.Interface`
+ * 4. resume - inherited from `readline.Interface`
+ * 5. SIGCONT - inherited from `readline.Interface`
+ * 6. SIGINT - inherited from `readline.Interface`
+ * 7. SIGTSTP - inherited from `readline.Interface`
+ * 8. exit
+ * 9. reset
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'line', listener: (input: string) => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: 'SIGCONT', listener: () => void): this;
+ addListener(event: 'SIGINT', listener: () => void): this;
+ addListener(event: 'SIGTSTP', listener: () => void): this;
+ addListener(event: 'exit', listener: () => void): this;
+ addListener(event: 'reset', listener: (context: Context) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'line', input: string): boolean;
+ emit(event: 'pause'): boolean;
+ emit(event: 'resume'): boolean;
+ emit(event: 'SIGCONT'): boolean;
+ emit(event: 'SIGINT'): boolean;
+ emit(event: 'SIGTSTP'): boolean;
+ emit(event: 'exit'): boolean;
+ emit(event: 'reset', context: Context): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'line', listener: (input: string) => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: 'SIGCONT', listener: () => void): this;
+ on(event: 'SIGINT', listener: () => void): this;
+ on(event: 'SIGTSTP', listener: () => void): this;
+ on(event: 'exit', listener: () => void): this;
+ on(event: 'reset', listener: (context: Context) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'line', listener: (input: string) => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: 'SIGCONT', listener: () => void): this;
+ once(event: 'SIGINT', listener: () => void): this;
+ once(event: 'SIGTSTP', listener: () => void): this;
+ once(event: 'exit', listener: () => void): this;
+ once(event: 'reset', listener: (context: Context) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'line', listener: (input: string) => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: 'SIGCONT', listener: () => void): this;
+ prependListener(event: 'SIGINT', listener: () => void): this;
+ prependListener(event: 'SIGTSTP', listener: () => void): this;
+ prependListener(event: 'exit', listener: () => void): this;
+ prependListener(event: 'reset', listener: (context: Context) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'line', listener: (input: string) => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: 'SIGCONT', listener: () => void): this;
+ prependOnceListener(event: 'SIGINT', listener: () => void): this;
+ prependOnceListener(event: 'SIGTSTP', listener: () => void): this;
+ prependOnceListener(event: 'exit', listener: () => void): this;
+ prependOnceListener(event: 'reset', listener: (context: Context) => void): this;
+ }
+ /**
+ * A flag passed in the REPL options. Evaluates expressions in sloppy mode.
+ */
+ const REPL_MODE_SLOPPY: unique symbol;
+ /**
+ * A flag passed in the REPL options. Evaluates expressions in strict mode.
+ * This is equivalent to prefacing every repl statement with `'use strict'`.
+ */
+ const REPL_MODE_STRICT: unique symbol;
+ /**
+ * The `repl.start()` method creates and starts a {@link REPLServer} instance.
+ *
+ * If `options` is a string, then it specifies the input prompt:
+ *
+ * ```js
+ * const repl = require('node:repl');
+ *
+ * // a Unix style prompt
+ * repl.start('$ ');
+ * ```
+ * @since v0.1.91
+ */
+ function start(options?: string | ReplOptions): REPLServer;
+ /**
+ * Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
+ *
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_recoverable_errors
+ */
+ class Recoverable extends SyntaxError {
+ err: Error;
+ constructor(err: Error);
+ }
+}
+declare module 'node:repl' {
+ export * from 'repl';
+}
diff --git a/node_modules/@types/node/ts4.8/stream.d.ts b/node_modules/@types/node/ts4.8/stream.d.ts
new file mode 100755
index 0000000..98866eb
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/stream.d.ts
@@ -0,0 +1,1430 @@
+/**
+ * A stream is an abstract interface for working with streaming data in Node.js.
+ * The `node:stream` module provides an API for implementing the stream interface.
+ *
+ * There are many stream objects provided by Node.js. For instance, a `request to an HTTP server` and `process.stdout` are both stream instances.
+ *
+ * Streams can be readable, writable, or both. All streams are instances of `EventEmitter`.
+ *
+ * To access the `node:stream` module:
+ *
+ * ```js
+ * const stream = require('node:stream');
+ * ```
+ *
+ * The `node:stream` module is useful for creating new types of stream instances.
+ * It is usually not necessary to use the `node:stream` module to consume streams.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/stream.js)
+ */
+declare module 'stream' {
+ import { EventEmitter, Abortable } from 'node:events';
+ import { Blob as NodeBlob } from 'node:buffer';
+ import * as streamPromises from 'node:stream/promises';
+ import * as streamConsumers from 'node:stream/consumers';
+ import * as streamWeb from 'node:stream/web';
+
+ type ComposeFnParam = (source: any) => void;
+
+ class internal extends EventEmitter {
+ pipe<T extends NodeJS.WritableStream>(
+ destination: T,
+ options?: {
+ end?: boolean | undefined;
+ }
+ ): T;
+ compose<T extends NodeJS.ReadableStream>(stream: T | ComposeFnParam | Iterable<T> | AsyncIterable<T>, options?: { signal: AbortSignal }): T;
+ }
+ import Stream = internal.Stream;
+ import Readable = internal.Readable;
+ import ReadableOptions = internal.ReadableOptions;
+ class ReadableBase extends Stream implements NodeJS.ReadableStream {
+ /**
+ * A utility method for creating Readable Streams out of iterators.
+ */
+ static from(iterable: Iterable<any> | AsyncIterable<any>, options?: ReadableOptions): Readable;
+ /**
+ * Returns whether the stream has been read from or cancelled.
+ * @since v16.8.0
+ */
+ static isDisturbed(stream: Readable | NodeJS.ReadableStream): boolean;
+ /**
+ * Returns whether the stream was destroyed or errored before emitting `'end'`.
+ * @since v16.8.0
+ * @experimental
+ */
+ readonly readableAborted: boolean;
+ /**
+ * Is `true` if it is safe to call `readable.read()`, which means
+ * the stream has not been destroyed or emitted `'error'` or `'end'`.
+ * @since v11.4.0
+ */
+ readable: boolean;
+ /**
+ * Returns whether `'data'` has been emitted.
+ * @since v16.7.0, v14.18.0
+ * @experimental
+ */
+ readonly readableDidRead: boolean;
+ /**
+ * Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method.
+ * @since v12.7.0
+ */
+ readonly readableEncoding: BufferEncoding | null;
+ /**
+ * Becomes `true` when `'end'` event is emitted.
+ * @since v12.9.0
+ */
+ readonly readableEnded: boolean;
+ /**
+ * This property reflects the current state of a `Readable` stream as described
+ * in the `Three states` section.
+ * @since v9.4.0
+ */
+ readonly readableFlowing: boolean | null;
+ /**
+ * Returns the value of `highWaterMark` passed when creating this `Readable`.
+ * @since v9.3.0
+ */
+ readonly readableHighWaterMark: number;
+ /**
+ * This property contains the number of bytes (or objects) in the queue
+ * ready to be read. The value provides introspection data regarding
+ * the status of the `highWaterMark`.
+ * @since v9.4.0
+ */
+ readonly readableLength: number;
+ /**
+ * Getter for the property `objectMode` of a given `Readable` stream.
+ * @since v12.3.0
+ */
+ readonly readableObjectMode: boolean;
+ /**
+ * Is `true` after `readable.destroy()` has been called.
+ * @since v8.0.0
+ */
+ destroyed: boolean;
+ /**
+ * Is `true` after `'close'` has been emitted.
+ * @since v18.0.0
+ */
+ readonly closed: boolean;
+ /**
+ * Returns error if the stream has been destroyed with an error.
+ * @since v18.0.0
+ */
+ readonly errored: Error | null;
+ constructor(opts?: ReadableOptions);
+ _construct?(callback: (error?: Error | null) => void): void;
+ _read(size: number): void;
+ /**
+ * The `readable.read()` method reads data out of the internal buffer and
+ * returns it. If no data is available to be read, `null` is returned. By default,
+ * the data is returned as a `Buffer` object unless an encoding has been
+ * specified using the `readable.setEncoding()` method or the stream is operating
+ * in object mode.
+ *
+ * The optional `size` argument specifies a specific number of bytes to read. If`size` bytes are not available to be read, `null` will be returned _unless_the stream has ended, in which
+ * case all of the data remaining in the internal
+ * buffer will be returned.
+ *
+ * If the `size` argument is not specified, all of the data contained in the
+ * internal buffer will be returned.
+ *
+ * The `size` argument must be less than or equal to 1 GiB.
+ *
+ * The `readable.read()` method should only be called on `Readable` streams
+ * operating in paused mode. In flowing mode, `readable.read()` is called
+ * automatically until the internal buffer is fully drained.
+ *
+ * ```js
+ * const readable = getReadableStreamSomehow();
+ *
+ * // 'readable' may be triggered multiple times as data is buffered in
+ * readable.on('readable', () => {
+ * let chunk;
+ * console.log('Stream is readable (new data received in buffer)');
+ * // Use a loop to make sure we read all currently available data
+ * while (null !== (chunk = readable.read())) {
+ * console.log(`Read ${chunk.length} bytes of data...`);
+ * }
+ * });
+ *
+ * // 'end' will be triggered once when there is no more data available
+ * readable.on('end', () => {
+ * console.log('Reached end of stream.');
+ * });
+ * ```
+ *
+ * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks
+ * are not concatenated. A `while` loop is necessary to consume all data
+ * currently in the buffer. When reading a large file `.read()` may return `null`,
+ * having consumed all buffered content so far, but there is still more data to
+ * come not yet buffered. In this case a new `'readable'` event will be emitted
+ * when there is more data in the buffer. Finally the `'end'` event will be
+ * emitted when there is no more data to come.
+ *
+ * Therefore to read a file's whole contents from a `readable`, it is necessary
+ * to collect chunks across multiple `'readable'` events:
+ *
+ * ```js
+ * const chunks = [];
+ *
+ * readable.on('readable', () => {
+ * let chunk;
+ * while (null !== (chunk = readable.read())) {
+ * chunks.push(chunk);
+ * }
+ * });
+ *
+ * readable.on('end', () => {
+ * const content = chunks.join('');
+ * });
+ * ```
+ *
+ * A `Readable` stream in object mode will always return a single item from
+ * a call to `readable.read(size)`, regardless of the value of the`size` argument.
+ *
+ * If the `readable.read()` method returns a chunk of data, a `'data'` event will
+ * also be emitted.
+ *
+ * Calling {@link read} after the `'end'` event has
+ * been emitted will return `null`. No runtime error will be raised.
+ * @since v0.9.4
+ * @param size Optional argument to specify how much data to read.
+ */
+ read(size?: number): any;
+ /**
+ * The `readable.setEncoding()` method sets the character encoding for
+ * data read from the `Readable` stream.
+ *
+ * By default, no encoding is assigned and stream data will be returned as`Buffer` objects. Setting an encoding causes the stream data
+ * to be returned as strings of the specified encoding rather than as `Buffer`objects. For instance, calling `readable.setEncoding('utf8')` will cause the
+ * output data to be interpreted as UTF-8 data, and passed as strings. Calling`readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal
+ * string format.
+ *
+ * The `Readable` stream will properly handle multi-byte characters delivered
+ * through the stream that would otherwise become improperly decoded if simply
+ * pulled from the stream as `Buffer` objects.
+ *
+ * ```js
+ * const readable = getReadableStreamSomehow();
+ * readable.setEncoding('utf8');
+ * readable.on('data', (chunk) => {
+ * assert.equal(typeof chunk, 'string');
+ * console.log('Got %d characters of string data:', chunk.length);
+ * });
+ * ```
+ * @since v0.9.4
+ * @param encoding The encoding to use.
+ */
+ setEncoding(encoding: BufferEncoding): this;
+ /**
+ * The `readable.pause()` method will cause a stream in flowing mode to stop
+ * emitting `'data'` events, switching out of flowing mode. Any data that
+ * becomes available will remain in the internal buffer.
+ *
+ * ```js
+ * const readable = getReadableStreamSomehow();
+ * readable.on('data', (chunk) => {
+ * console.log(`Received ${chunk.length} bytes of data.`);
+ * readable.pause();
+ * console.log('There will be no additional data for 1 second.');
+ * setTimeout(() => {
+ * console.log('Now data will start flowing again.');
+ * readable.resume();
+ * }, 1000);
+ * });
+ * ```
+ *
+ * The `readable.pause()` method has no effect if there is a `'readable'`event listener.
+ * @since v0.9.4
+ */
+ pause(): this;
+ /**
+ * The `readable.resume()` method causes an explicitly paused `Readable` stream to
+ * resume emitting `'data'` events, switching the stream into flowing mode.
+ *
+ * The `readable.resume()` method can be used to fully consume the data from a
+ * stream without actually processing any of that data:
+ *
+ * ```js
+ * getReadableStreamSomehow()
+ * .resume()
+ * .on('end', () => {
+ * console.log('Reached the end, but did not read anything.');
+ * });
+ * ```
+ *
+ * The `readable.resume()` method has no effect if there is a `'readable'`event listener.
+ * @since v0.9.4
+ */
+ resume(): this;
+ /**
+ * The `readable.isPaused()` method returns the current operating state of the`Readable`. This is used primarily by the mechanism that underlies the`readable.pipe()` method. In most
+ * typical cases, there will be no reason to
+ * use this method directly.
+ *
+ * ```js
+ * const readable = new stream.Readable();
+ *
+ * readable.isPaused(); // === false
+ * readable.pause();
+ * readable.isPaused(); // === true
+ * readable.resume();
+ * readable.isPaused(); // === false
+ * ```
+ * @since v0.11.14
+ */
+ isPaused(): boolean;
+ /**
+ * The `readable.unpipe()` method detaches a `Writable` stream previously attached
+ * using the {@link pipe} method.
+ *
+ * If the `destination` is not specified, then _all_ pipes are detached.
+ *
+ * If the `destination` is specified, but no pipe is set up for it, then
+ * the method does nothing.
+ *
+ * ```js
+ * const fs = require('node:fs');
+ * const readable = getReadableStreamSomehow();
+ * const writable = fs.createWriteStream('file.txt');
+ * // All the data from readable goes into 'file.txt',
+ * // but only for the first second.
+ * readable.pipe(writable);
+ * setTimeout(() => {
+ * console.log('Stop writing to file.txt.');
+ * readable.unpipe(writable);
+ * console.log('Manually close the file stream.');
+ * writable.end();
+ * }, 1000);
+ * ```
+ * @since v0.9.4
+ * @param destination Optional specific stream to unpipe
+ */
+ unpipe(destination?: NodeJS.WritableStream): this;
+ /**
+ * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the
+ * same as `readable.push(null)`, after which no more data can be written. The EOF
+ * signal is put at the end of the buffer and any buffered data will still be
+ * flushed.
+ *
+ * The `readable.unshift()` method pushes a chunk of data back into the internal
+ * buffer. This is useful in certain situations where a stream is being consumed by
+ * code that needs to "un-consume" some amount of data that it has optimistically
+ * pulled out of the source, so that the data can be passed on to some other party.
+ *
+ * The `stream.unshift(chunk)` method cannot be called after the `'end'` event
+ * has been emitted or a runtime error will be thrown.
+ *
+ * Developers using `stream.unshift()` often should consider switching to
+ * use of a `Transform` stream instead. See the `API for stream implementers` section for more information.
+ *
+ * ```js
+ * // Pull off a header delimited by \n\n.
+ * // Use unshift() if we get too much.
+ * // Call the callback with (error, header, stream).
+ * const { StringDecoder } = require('node:string_decoder');
+ * function parseHeader(stream, callback) {
+ * stream.on('error', callback);
+ * stream.on('readable', onReadable);
+ * const decoder = new StringDecoder('utf8');
+ * let header = '';
+ * function onReadable() {
+ * let chunk;
+ * while (null !== (chunk = stream.read())) {
+ * const str = decoder.write(chunk);
+ * if (str.includes('\n\n')) {
+ * // Found the header boundary.
+ * const split = str.split(/\n\n/);
+ * header += split.shift();
+ * const remaining = split.join('\n\n');
+ * const buf = Buffer.from(remaining, 'utf8');
+ * stream.removeListener('error', callback);
+ * // Remove the 'readable' listener before unshifting.
+ * stream.removeListener('readable', onReadable);
+ * if (buf.length)
+ * stream.unshift(buf);
+ * // Now the body of the message can be read from the stream.
+ * callback(null, header, stream);
+ * return;
+ * }
+ * // Still reading the header.
+ * header += str;
+ * }
+ * }
+ * }
+ * ```
+ *
+ * Unlike {@link push}, `stream.unshift(chunk)` will not
+ * end the reading process by resetting the internal reading state of the stream.
+ * This can cause unexpected results if `readable.unshift()` is called during a
+ * read (i.e. from within a {@link _read} implementation on a
+ * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately,
+ * however it is best to simply avoid calling `readable.unshift()` while in the
+ * process of performing a read.
+ * @since v0.9.11
+ * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must be a string, `Buffer`, `Uint8Array`, or `null`. For object mode
+ * streams, `chunk` may be any JavaScript value.
+ * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`.
+ */
+ unshift(chunk: any, encoding?: BufferEncoding): void;
+ /**
+ * Prior to Node.js 0.10, streams did not implement the entire `node:stream`module API as it is currently defined. (See `Compatibility` for more
+ * information.)
+ *
+ * When using an older Node.js library that emits `'data'` events and has a {@link pause} method that is advisory only, the`readable.wrap()` method can be used to create a `Readable`
+ * stream that uses
+ * the old stream as its data source.
+ *
+ * It will rarely be necessary to use `readable.wrap()` but the method has been
+ * provided as a convenience for interacting with older Node.js applications and
+ * libraries.
+ *
+ * ```js
+ * const { OldReader } = require('./old-api-module.js');
+ * const { Readable } = require('node:stream');
+ * const oreader = new OldReader();
+ * const myReader = new Readable().wrap(oreader);
+ *
+ * myReader.on('readable', () => {
+ * myReader.read(); // etc.
+ * });
+ * ```
+ * @since v0.9.4
+ * @param stream An "old style" readable stream
+ */
+ wrap(stream: NodeJS.ReadableStream): this;
+ push(chunk: any, encoding?: BufferEncoding): boolean;
+ _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
+ /**
+ * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the readable
+ * stream will release any internal resources and subsequent calls to `push()`will be ignored.
+ *
+ * Once `destroy()` has been called any further calls will be a no-op and no
+ * further errors except from `_destroy()` may be emitted as `'error'`.
+ *
+ * Implementors should not override this method, but instead implement `readable._destroy()`.
+ * @since v8.0.0
+ * @param error Error which will be passed as payload in `'error'` event
+ */
+ destroy(error?: Error): this;
+ /**
+ * Event emitter
+ * The defined events on documents including:
+ * 1. close
+ * 2. data
+ * 3. end
+ * 4. error
+ * 5. pause
+ * 6. readable
+ * 7. resume
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: any) => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'readable', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'data', chunk: any): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'pause'): boolean;
+ emit(event: 'readable'): boolean;
+ emit(event: 'resume'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: any) => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'readable', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: any) => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'readable', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: any) => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'readable', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: any) => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'readable', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'close', listener: () => void): this;
+ removeListener(event: 'data', listener: (chunk: any) => void): this;
+ removeListener(event: 'end', listener: () => void): this;
+ removeListener(event: 'error', listener: (err: Error) => void): this;
+ removeListener(event: 'pause', listener: () => void): this;
+ removeListener(event: 'readable', listener: () => void): this;
+ removeListener(event: 'resume', listener: () => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ [Symbol.asyncIterator](): AsyncIterableIterator<any>;
+ /**
+ * Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished.
+ * @since v20.4.0
+ */
+ [Symbol.asyncDispose](): Promise<void>;
+ }
+ import WritableOptions = internal.WritableOptions;
+ class WritableBase extends Stream implements NodeJS.WritableStream {
+ /**
+ * Is `true` if it is safe to call `writable.write()`, which means
+ * the stream has not been destroyed, errored, or ended.
+ * @since v11.4.0
+ */
+ readonly writable: boolean;
+ /**
+ * Is `true` after `writable.end()` has been called. This property
+ * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead.
+ * @since v12.9.0
+ */
+ readonly writableEnded: boolean;
+ /**
+ * Is set to `true` immediately before the `'finish'` event is emitted.
+ * @since v12.6.0
+ */
+ readonly writableFinished: boolean;
+ /**
+ * Return the value of `highWaterMark` passed when creating this `Writable`.
+ * @since v9.3.0
+ */
+ readonly writableHighWaterMark: number;
+ /**
+ * This property contains the number of bytes (or objects) in the queue
+ * ready to be written. The value provides introspection data regarding
+ * the status of the `highWaterMark`.
+ * @since v9.4.0
+ */
+ readonly writableLength: number;
+ /**
+ * Getter for the property `objectMode` of a given `Writable` stream.
+ * @since v12.3.0
+ */
+ readonly writableObjectMode: boolean;
+ /**
+ * Number of times `writable.uncork()` needs to be
+ * called in order to fully uncork the stream.
+ * @since v13.2.0, v12.16.0
+ */
+ readonly writableCorked: number;
+ /**
+ * Is `true` after `writable.destroy()` has been called.
+ * @since v8.0.0
+ */
+ destroyed: boolean;
+ /**
+ * Is `true` after `'close'` has been emitted.
+ * @since v18.0.0
+ */
+ readonly closed: boolean;
+ /**
+ * Returns error if the stream has been destroyed with an error.
+ * @since v18.0.0
+ */
+ readonly errored: Error | null;
+ /**
+ * Is `true` if the stream's buffer has been full and stream will emit `'drain'`.
+ * @since v15.2.0, v14.17.0
+ */
+ readonly writableNeedDrain: boolean;
+ constructor(opts?: WritableOptions);
+ _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ _writev?(
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ _construct?(callback: (error?: Error | null) => void): void;
+ _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
+ _final(callback: (error?: Error | null) => void): void;
+ /**
+ * The `writable.write()` method writes some data to the stream, and calls the
+ * supplied `callback` once the data has been fully handled. If an error
+ * occurs, the `callback` will be called with the error as its
+ * first argument. The `callback` is called asynchronously and before `'error'` is
+ * emitted.
+ *
+ * The return value is `true` if the internal buffer is less than the`highWaterMark` configured when the stream was created after admitting `chunk`.
+ * If `false` is returned, further attempts to write data to the stream should
+ * stop until the `'drain'` event is emitted.
+ *
+ * While a stream is not draining, calls to `write()` will buffer `chunk`, and
+ * return false. Once all currently buffered chunks are drained (accepted for
+ * delivery by the operating system), the `'drain'` event will be emitted.
+ * Once `write()` returns false, do not write more chunks
+ * until the `'drain'` event is emitted. While calling `write()` on a stream that
+ * is not draining is allowed, Node.js will buffer all written chunks until
+ * maximum memory usage occurs, at which point it will abort unconditionally.
+ * Even before it aborts, high memory usage will cause poor garbage collector
+ * performance and high RSS (which is not typically released back to the system,
+ * even after the memory is no longer required). Since TCP sockets may never
+ * drain if the remote peer does not read the data, writing a socket that is
+ * not draining may lead to a remotely exploitable vulnerability.
+ *
+ * Writing data while the stream is not draining is particularly
+ * problematic for a `Transform`, because the `Transform` streams are paused
+ * by default until they are piped or a `'data'` or `'readable'` event handler
+ * is added.
+ *
+ * If the data to be written can be generated or fetched on demand, it is
+ * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is
+ * possible to respect backpressure and avoid memory issues using the `'drain'` event:
+ *
+ * ```js
+ * function write(data, cb) {
+ * if (!stream.write(data)) {
+ * stream.once('drain', cb);
+ * } else {
+ * process.nextTick(cb);
+ * }
+ * }
+ *
+ * // Wait for cb to be called before doing any other write.
+ * write('hello', () => {
+ * console.log('Write completed, do more writes now.');
+ * });
+ * ```
+ *
+ * A `Writable` stream in object mode will always ignore the `encoding` argument.
+ * @since v0.9.4
+ * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any
+ * JavaScript value other than `null`.
+ * @param [encoding='utf8'] The encoding, if `chunk` is a string.
+ * @param callback Callback for when this chunk of data is flushed.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean;
+ write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean;
+ /**
+ * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream.
+ * @since v0.11.15
+ * @param encoding The new default encoding
+ */
+ setDefaultEncoding(encoding: BufferEncoding): this;
+ /**
+ * Calling the `writable.end()` method signals that no more data will be written
+ * to the `Writable`. The optional `chunk` and `encoding` arguments allow one
+ * final additional chunk of data to be written immediately before closing the
+ * stream.
+ *
+ * Calling the {@link write} method after calling {@link end} will raise an error.
+ *
+ * ```js
+ * // Write 'hello, ' and then end with 'world!'.
+ * const fs = require('node:fs');
+ * const file = fs.createWriteStream('example.txt');
+ * file.write('hello, ');
+ * file.end('world!');
+ * // Writing more now is not allowed!
+ * ```
+ * @since v0.9.4
+ * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any
+ * JavaScript value other than `null`.
+ * @param encoding The encoding if `chunk` is a string
+ * @param callback Callback for when the stream is finished.
+ */
+ end(cb?: () => void): this;
+ end(chunk: any, cb?: () => void): this;
+ end(chunk: any, encoding: BufferEncoding, cb?: () => void): this;
+ /**
+ * The `writable.cork()` method forces all written data to be buffered in memory.
+ * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called.
+ *
+ * The primary intent of `writable.cork()` is to accommodate a situation in which
+ * several small chunks are written to the stream in rapid succession. Instead of
+ * immediately forwarding them to the underlying destination, `writable.cork()`buffers all the chunks until `writable.uncork()` is called, which will pass them
+ * all to `writable._writev()`, if present. This prevents a head-of-line blocking
+ * situation where data is being buffered while waiting for the first small chunk
+ * to be processed. However, use of `writable.cork()` without implementing`writable._writev()` may have an adverse effect on throughput.
+ *
+ * See also: `writable.uncork()`, `writable._writev()`.
+ * @since v0.11.2
+ */
+ cork(): void;
+ /**
+ * The `writable.uncork()` method flushes all data buffered since {@link cork} was called.
+ *
+ * When using `writable.cork()` and `writable.uncork()` to manage the buffering
+ * of writes to a stream, defer calls to `writable.uncork()` using`process.nextTick()`. Doing so allows batching of all`writable.write()` calls that occur within a given Node.js event
+ * loop phase.
+ *
+ * ```js
+ * stream.cork();
+ * stream.write('some ');
+ * stream.write('data ');
+ * process.nextTick(() => stream.uncork());
+ * ```
+ *
+ * If the `writable.cork()` method is called multiple times on a stream, the
+ * same number of calls to `writable.uncork()` must be called to flush the buffered
+ * data.
+ *
+ * ```js
+ * stream.cork();
+ * stream.write('some ');
+ * stream.cork();
+ * stream.write('data ');
+ * process.nextTick(() => {
+ * stream.uncork();
+ * // The data will not be flushed until uncork() is called a second time.
+ * stream.uncork();
+ * });
+ * ```
+ *
+ * See also: `writable.cork()`.
+ * @since v0.11.2
+ */
+ uncork(): void;
+ /**
+ * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the writable
+ * stream has ended and subsequent calls to `write()` or `end()` will result in
+ * an `ERR_STREAM_DESTROYED` error.
+ * This is a destructive and immediate way to destroy a stream. Previous calls to`write()` may not have drained, and may trigger an `ERR_STREAM_DESTROYED` error.
+ * Use `end()` instead of destroy if data should flush before close, or wait for
+ * the `'drain'` event before destroying the stream.
+ *
+ * Once `destroy()` has been called any further calls will be a no-op and no
+ * further errors except from `_destroy()` may be emitted as `'error'`.
+ *
+ * Implementors should not override this method,
+ * but instead implement `writable._destroy()`.
+ * @since v8.0.0
+ * @param error Optional, an error to emit with `'error'` event.
+ */
+ destroy(error?: Error): this;
+ /**
+ * Event emitter
+ * The defined events on documents including:
+ * 1. close
+ * 2. drain
+ * 3. error
+ * 4. finish
+ * 5. pipe
+ * 6. unpipe
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'pipe', listener: (src: Readable) => void): this;
+ addListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'finish'): boolean;
+ emit(event: 'pipe', src: Readable): boolean;
+ emit(event: 'unpipe', src: Readable): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'pipe', listener: (src: Readable) => void): this;
+ on(event: 'unpipe', listener: (src: Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'pipe', listener: (src: Readable) => void): this;
+ once(event: 'unpipe', listener: (src: Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'pipe', listener: (src: Readable) => void): this;
+ prependListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: Readable) => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'close', listener: () => void): this;
+ removeListener(event: 'drain', listener: () => void): this;
+ removeListener(event: 'error', listener: (err: Error) => void): this;
+ removeListener(event: 'finish', listener: () => void): this;
+ removeListener(event: 'pipe', listener: (src: Readable) => void): this;
+ removeListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ namespace internal {
+ class Stream extends internal {
+ constructor(opts?: ReadableOptions);
+ }
+ interface StreamOptions<T extends Stream> extends Abortable {
+ emitClose?: boolean | undefined;
+ highWaterMark?: number | undefined;
+ objectMode?: boolean | undefined;
+ construct?(this: T, callback: (error?: Error | null) => void): void;
+ destroy?(this: T, error: Error | null, callback: (error: Error | null) => void): void;
+ autoDestroy?: boolean | undefined;
+ }
+ interface ReadableOptions extends StreamOptions<Readable> {
+ encoding?: BufferEncoding | undefined;
+ read?(this: Readable, size: number): void;
+ }
+ /**
+ * @since v0.9.4
+ */
+ class Readable extends ReadableBase {
+ /**
+ * A utility method for creating a `Readable` from a web `ReadableStream`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static fromWeb(readableStream: streamWeb.ReadableStream, options?: Pick<ReadableOptions, 'encoding' | 'highWaterMark' | 'objectMode' | 'signal'>): Readable;
+ /**
+ * A utility method for creating a web `ReadableStream` from a `Readable`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static toWeb(streamReadable: Readable): streamWeb.ReadableStream;
+ }
+ interface WritableOptions extends StreamOptions<Writable> {
+ decodeStrings?: boolean | undefined;
+ defaultEncoding?: BufferEncoding | undefined;
+ write?(this: Writable, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ writev?(
+ this: Writable,
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ final?(this: Writable, callback: (error?: Error | null) => void): void;
+ }
+ /**
+ * @since v0.9.4
+ */
+ class Writable extends WritableBase {
+ /**
+ * A utility method for creating a `Writable` from a web `WritableStream`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static fromWeb(writableStream: streamWeb.WritableStream, options?: Pick<WritableOptions, 'decodeStrings' | 'highWaterMark' | 'objectMode' | 'signal'>): Writable;
+ /**
+ * A utility method for creating a web `WritableStream` from a `Writable`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static toWeb(streamWritable: Writable): streamWeb.WritableStream;
+ }
+ interface DuplexOptions extends ReadableOptions, WritableOptions {
+ allowHalfOpen?: boolean | undefined;
+ readableObjectMode?: boolean | undefined;
+ writableObjectMode?: boolean | undefined;
+ readableHighWaterMark?: number | undefined;
+ writableHighWaterMark?: number | undefined;
+ writableCorked?: number | undefined;
+ construct?(this: Duplex, callback: (error?: Error | null) => void): void;
+ read?(this: Duplex, size: number): void;
+ write?(this: Duplex, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ writev?(
+ this: Duplex,
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ final?(this: Duplex, callback: (error?: Error | null) => void): void;
+ destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void;
+ }
+ /**
+ * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces.
+ *
+ * Examples of `Duplex` streams include:
+ *
+ * * `TCP sockets`
+ * * `zlib streams`
+ * * `crypto streams`
+ * @since v0.9.4
+ */
+ class Duplex extends ReadableBase implements WritableBase {
+ readonly writable: boolean;
+ readonly writableEnded: boolean;
+ readonly writableFinished: boolean;
+ readonly writableHighWaterMark: number;
+ readonly writableLength: number;
+ readonly writableObjectMode: boolean;
+ readonly writableCorked: number;
+ readonly writableNeedDrain: boolean;
+ readonly closed: boolean;
+ readonly errored: Error | null;
+ /**
+ * If `false` then the stream will automatically end the writable side when the
+ * readable side ends. Set initially by the `allowHalfOpen` constructor option,
+ * which defaults to `true`.
+ *
+ * This can be changed manually to change the half-open behavior of an existing`Duplex` stream instance, but must be changed before the `'end'` event is
+ * emitted.
+ * @since v0.9.4
+ */
+ allowHalfOpen: boolean;
+ constructor(opts?: DuplexOptions);
+ /**
+ * A utility method for creating duplex streams.
+ *
+ * - `Stream` converts writable stream into writable `Duplex` and readable stream
+ * to `Duplex`.
+ * - `Blob` converts into readable `Duplex`.
+ * - `string` converts into readable `Duplex`.
+ * - `ArrayBuffer` converts into readable `Duplex`.
+ * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`.
+ * - `AsyncGeneratorFunction` converts into a readable/writable transform
+ * `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield
+ * `null`.
+ * - `AsyncFunction` converts into a writable `Duplex`. Must return
+ * either `null` or `undefined`
+ * - `Object ({ writable, readable })` converts `readable` and
+ * `writable` into `Stream` and then combines them into `Duplex` where the
+ * `Duplex` will write to the `writable` and read from the `readable`.
+ * - `Promise` converts into readable `Duplex`. Value `null` is ignored.
+ *
+ * @since v16.8.0
+ */
+ static from(src: Stream | NodeBlob | ArrayBuffer | string | Iterable<any> | AsyncIterable<any> | AsyncGeneratorFunction | Promise<any> | Object): Duplex;
+ _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ _writev?(
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ _destroy(error: Error | null, callback: (error: Error | null) => void): void;
+ _final(callback: (error?: Error | null) => void): void;
+ write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
+ write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
+ setDefaultEncoding(encoding: BufferEncoding): this;
+ end(cb?: () => void): this;
+ end(chunk: any, cb?: () => void): this;
+ end(chunk: any, encoding?: BufferEncoding, cb?: () => void): this;
+ cork(): void;
+ uncork(): void;
+ /**
+ * A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static toWeb(streamDuplex: Duplex): {
+ readable: streamWeb.ReadableStream;
+ writable: streamWeb.WritableStream;
+ };
+ /**
+ * A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static fromWeb(
+ duplexStream: {
+ readable: streamWeb.ReadableStream;
+ writable: streamWeb.WritableStream;
+ },
+ options?: Pick<DuplexOptions, 'allowHalfOpen' | 'decodeStrings' | 'encoding' | 'highWaterMark' | 'objectMode' | 'signal'>
+ ): Duplex;
+ /**
+ * Event emitter
+ * The defined events on documents including:
+ * 1. close
+ * 2. data
+ * 3. drain
+ * 4. end
+ * 5. error
+ * 6. finish
+ * 7. pause
+ * 8. pipe
+ * 9. readable
+ * 10. resume
+ * 11. unpipe
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: any) => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'pipe', listener: (src: Readable) => void): this;
+ addListener(event: 'readable', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'data', chunk: any): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'finish'): boolean;
+ emit(event: 'pause'): boolean;
+ emit(event: 'pipe', src: Readable): boolean;
+ emit(event: 'readable'): boolean;
+ emit(event: 'resume'): boolean;
+ emit(event: 'unpipe', src: Readable): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: any) => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'pipe', listener: (src: Readable) => void): this;
+ on(event: 'readable', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: 'unpipe', listener: (src: Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: any) => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'pipe', listener: (src: Readable) => void): this;
+ once(event: 'readable', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: 'unpipe', listener: (src: Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: any) => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'pipe', listener: (src: Readable) => void): this;
+ prependListener(event: 'readable', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: any) => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: Readable) => void): this;
+ prependOnceListener(event: 'readable', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'close', listener: () => void): this;
+ removeListener(event: 'data', listener: (chunk: any) => void): this;
+ removeListener(event: 'drain', listener: () => void): this;
+ removeListener(event: 'end', listener: () => void): this;
+ removeListener(event: 'error', listener: (err: Error) => void): this;
+ removeListener(event: 'finish', listener: () => void): this;
+ removeListener(event: 'pause', listener: () => void): this;
+ removeListener(event: 'pipe', listener: (src: Readable) => void): this;
+ removeListener(event: 'readable', listener: () => void): this;
+ removeListener(event: 'resume', listener: () => void): this;
+ removeListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ type TransformCallback = (error?: Error | null, data?: any) => void;
+ interface TransformOptions extends DuplexOptions {
+ construct?(this: Transform, callback: (error?: Error | null) => void): void;
+ read?(this: Transform, size: number): void;
+ write?(this: Transform, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ writev?(
+ this: Transform,
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ final?(this: Transform, callback: (error?: Error | null) => void): void;
+ destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void;
+ transform?(this: Transform, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
+ flush?(this: Transform, callback: TransformCallback): void;
+ }
+ /**
+ * Transform streams are `Duplex` streams where the output is in some way
+ * related to the input. Like all `Duplex` streams, `Transform` streams
+ * implement both the `Readable` and `Writable` interfaces.
+ *
+ * Examples of `Transform` streams include:
+ *
+ * * `zlib streams`
+ * * `crypto streams`
+ * @since v0.9.4
+ */
+ class Transform extends Duplex {
+ constructor(opts?: TransformOptions);
+ _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
+ _flush(callback: TransformCallback): void;
+ }
+ /**
+ * The `stream.PassThrough` class is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is
+ * primarily for examples and testing, but there are some use cases where`stream.PassThrough` is useful as a building block for novel sorts of streams.
+ */
+ class PassThrough extends Transform {}
+ /**
+ * A stream to attach a signal to.
+ *
+ * Attaches an AbortSignal to a readable or writeable stream. This lets code
+ * control stream destruction using an `AbortController`.
+ *
+ * Calling `abort` on the `AbortController` corresponding to the passed`AbortSignal` will behave the same way as calling `.destroy(new AbortError())`on the stream, and `controller.error(new
+ * AbortError())` for webstreams.
+ *
+ * ```js
+ * const fs = require('node:fs');
+ *
+ * const controller = new AbortController();
+ * const read = addAbortSignal(
+ * controller.signal,
+ * fs.createReadStream(('object.json')),
+ * );
+ * // Later, abort the operation closing the stream
+ * controller.abort();
+ * ```
+ *
+ * Or using an `AbortSignal` with a readable stream as an async iterable:
+ *
+ * ```js
+ * const controller = new AbortController();
+ * setTimeout(() => controller.abort(), 10_000); // set a timeout
+ * const stream = addAbortSignal(
+ * controller.signal,
+ * fs.createReadStream(('object.json')),
+ * );
+ * (async () => {
+ * try {
+ * for await (const chunk of stream) {
+ * await process(chunk);
+ * }
+ * } catch (e) {
+ * if (e.name === 'AbortError') {
+ * // The operation was cancelled
+ * } else {
+ * throw e;
+ * }
+ * }
+ * })();
+ * ```
+ *
+ * Or using an `AbortSignal` with a ReadableStream:
+ *
+ * ```js
+ * const controller = new AbortController();
+ * const rs = new ReadableStream({
+ * start(controller) {
+ * controller.enqueue('hello');
+ * controller.enqueue('world');
+ * controller.close();
+ * },
+ * });
+ *
+ * addAbortSignal(controller.signal, rs);
+ *
+ * finished(rs, (err) => {
+ * if (err) {
+ * if (err.name === 'AbortError') {
+ * // The operation was cancelled
+ * }
+ * }
+ * });
+ *
+ * const reader = rs.getReader();
+ *
+ * reader.read().then(({ value, done }) => {
+ * console.log(value); // hello
+ * console.log(done); // false
+ * controller.abort();
+ * });
+ * ```
+ * @since v15.4.0
+ * @param signal A signal representing possible cancellation
+ * @param stream a stream to attach a signal to
+ */
+ function addAbortSignal<T extends Stream>(signal: AbortSignal, stream: T): T;
+ /**
+ * Returns the default highWaterMark used by streams.
+ * Defaults to `16384` (16 KiB), or `16` for `objectMode`.
+ * @since v19.9.0
+ * @param objectMode
+ */
+ function getDefaultHighWaterMark(objectMode: boolean): number;
+ /**
+ * Sets the default highWaterMark used by streams.
+ * @since v19.9.0
+ * @param objectMode
+ * @param value highWaterMark value
+ */
+ function setDefaultHighWaterMark(objectMode: boolean, value: number): void;
+ interface FinishedOptions extends Abortable {
+ error?: boolean | undefined;
+ readable?: boolean | undefined;
+ writable?: boolean | undefined;
+ }
+ /**
+ * A readable and/or writable stream/webstream.
+ *
+ * A function to get notified when a stream is no longer readable, writable
+ * or has experienced an error or a premature close event.
+ *
+ * ```js
+ * const { finished } = require('node:stream');
+ * const fs = require('node:fs');
+ *
+ * const rs = fs.createReadStream('archive.tar');
+ *
+ * finished(rs, (err) => {
+ * if (err) {
+ * console.error('Stream failed.', err);
+ * } else {
+ * console.log('Stream is done reading.');
+ * }
+ * });
+ *
+ * rs.resume(); // Drain the stream.
+ * ```
+ *
+ * Especially useful in error handling scenarios where a stream is destroyed
+ * prematurely (like an aborted HTTP request), and will not emit `'end'`or `'finish'`.
+ *
+ * The `finished` API provides `promise version`.
+ *
+ * `stream.finished()` leaves dangling event listeners (in particular`'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been
+ * invoked. The reason for this is so that unexpected `'error'` events (due to
+ * incorrect stream implementations) do not cause unexpected crashes.
+ * If this is unwanted behavior then the returned cleanup function needs to be
+ * invoked in the callback:
+ *
+ * ```js
+ * const cleanup = finished(rs, (err) => {
+ * cleanup();
+ * // ...
+ * });
+ * ```
+ * @since v10.0.0
+ * @param stream A readable and/or writable stream.
+ * @param callback A callback function that takes an optional error argument.
+ * @return A cleanup function which removes all registered listeners.
+ */
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options: FinishedOptions, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
+ namespace finished {
+ function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
+ }
+ type PipelineSourceFunction<T> = () => Iterable<T> | AsyncIterable<T>;
+ type PipelineSource<T> = Iterable<T> | AsyncIterable<T> | NodeJS.ReadableStream | PipelineSourceFunction<T>;
+ type PipelineTransform<S extends PipelineTransformSource<any>, U> =
+ | NodeJS.ReadWriteStream
+ | ((source: S extends (...args: any[]) => Iterable<infer ST> | AsyncIterable<infer ST> ? AsyncIterable<ST> : S) => AsyncIterable<U>);
+ type PipelineTransformSource<T> = PipelineSource<T> | PipelineTransform<any, T>;
+ type PipelineDestinationIterableFunction<T> = (source: AsyncIterable<T>) => AsyncIterable<any>;
+ type PipelineDestinationPromiseFunction<T, P> = (source: AsyncIterable<T>) => Promise<P>;
+ type PipelineDestination<S extends PipelineTransformSource<any>, P> = S extends PipelineTransformSource<infer ST>
+ ? NodeJS.WritableStream | PipelineDestinationIterableFunction<ST> | PipelineDestinationPromiseFunction<ST, P>
+ : never;
+ type PipelineCallback<S extends PipelineDestination<any, any>> = S extends PipelineDestinationPromiseFunction<any, infer P>
+ ? (err: NodeJS.ErrnoException | null, value: P) => void
+ : (err: NodeJS.ErrnoException | null) => void;
+ type PipelinePromise<S extends PipelineDestination<any, any>> = S extends PipelineDestinationPromiseFunction<any, infer P> ? Promise<P> : Promise<void>;
+ interface PipelineOptions {
+ signal?: AbortSignal | undefined;
+ end?: boolean | undefined;
+ }
+ /**
+ * A module method to pipe between streams and generators forwarding errors and
+ * properly cleaning up and provide a callback when the pipeline is complete.
+ *
+ * ```js
+ * const { pipeline } = require('node:stream');
+ * const fs = require('node:fs');
+ * const zlib = require('node:zlib');
+ *
+ * // Use the pipeline API to easily pipe a series of streams
+ * // together and get notified when the pipeline is fully done.
+ *
+ * // A pipeline to gzip a potentially huge tar file efficiently:
+ *
+ * pipeline(
+ * fs.createReadStream('archive.tar'),
+ * zlib.createGzip(),
+ * fs.createWriteStream('archive.tar.gz'),
+ * (err) => {
+ * if (err) {
+ * console.error('Pipeline failed.', err);
+ * } else {
+ * console.log('Pipeline succeeded.');
+ * }
+ * },
+ * );
+ * ```
+ *
+ * The `pipeline` API provides a `promise version`.
+ *
+ * `stream.pipeline()` will call `stream.destroy(err)` on all streams except:
+ *
+ * * `Readable` streams which have emitted `'end'` or `'close'`.
+ * * `Writable` streams which have emitted `'finish'` or `'close'`.
+ *
+ * `stream.pipeline()` leaves dangling event listeners on the streams
+ * after the `callback` has been invoked. In the case of reuse of streams after
+ * failure, this can cause event listener leaks and swallowed errors. If the last
+ * stream is readable, dangling event listeners will be removed so that the last
+ * stream can be consumed later.
+ *
+ * `stream.pipeline()` closes all the streams when an error is raised.
+ * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior
+ * once it would destroy the socket without sending the expected response.
+ * See the example below:
+ *
+ * ```js
+ * const fs = require('node:fs');
+ * const http = require('node:http');
+ * const { pipeline } = require('node:stream');
+ *
+ * const server = http.createServer((req, res) => {
+ * const fileStream = fs.createReadStream('./fileNotExist.txt');
+ * pipeline(fileStream, res, (err) => {
+ * if (err) {
+ * console.log(err); // No such file
+ * // this message can't be sent once `pipeline` already destroyed the socket
+ * return res.end('error!!!');
+ * }
+ * });
+ * });
+ * ```
+ * @since v10.0.0
+ * @param callback Called when the pipeline is fully done.
+ */
+ function pipeline<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(
+ source: A,
+ destination: B,
+ callback?: PipelineCallback<B>
+ ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, B extends PipelineDestination<T1, any>>(
+ source: A,
+ transform1: T1,
+ destination: B,
+ callback?: PipelineCallback<B>
+ ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, T2 extends PipelineTransform<T1, any>, B extends PipelineDestination<T2, any>>(
+ source: A,
+ transform1: T1,
+ transform2: T2,
+ destination: B,
+ callback?: PipelineCallback<B>
+ ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ B extends PipelineDestination<T3, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, callback?: PipelineCallback<B>): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ T4 extends PipelineTransform<T3, any>,
+ B extends PipelineDestination<T4, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, callback?: PipelineCallback<B>): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline(
+ streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
+ callback?: (err: NodeJS.ErrnoException | null) => void
+ ): NodeJS.WritableStream;
+ function pipeline(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
+ ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException | null) => void)>
+ ): NodeJS.WritableStream;
+ namespace pipeline {
+ function __promisify__<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(source: A, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function __promisify__<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, B extends PipelineDestination<T1, any>>(
+ source: A,
+ transform1: T1,
+ destination: B,
+ options?: PipelineOptions
+ ): PipelinePromise<B>;
+ function __promisify__<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, T2 extends PipelineTransform<T1, any>, B extends PipelineDestination<T2, any>>(
+ source: A,
+ transform1: T1,
+ transform2: T2,
+ destination: B,
+ options?: PipelineOptions
+ ): PipelinePromise<B>;
+ function __promisify__<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ B extends PipelineDestination<T3, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function __promisify__<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ T4 extends PipelineTransform<T3, any>,
+ B extends PipelineDestination<T4, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function __promisify__(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>, options?: PipelineOptions): Promise<void>;
+ function __promisify__(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
+ ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
+ ): Promise<void>;
+ }
+ interface Pipe {
+ close(): void;
+ hasRef(): boolean;
+ ref(): void;
+ unref(): void;
+ }
+ /**
+ * Returns whether the stream has encountered an error.
+ * @since v17.3.0, v16.14.0
+ * @experimental
+ */
+ function isErrored(stream: Readable | Writable | NodeJS.ReadableStream | NodeJS.WritableStream): boolean;
+ /**
+ * Returns whether the stream is readable.
+ * @since v17.4.0, v16.14.0
+ * @experimental
+ */
+ function isReadable(stream: Readable | NodeJS.ReadableStream): boolean;
+ const promises: typeof streamPromises;
+ const consumers: typeof streamConsumers;
+ }
+ export = internal;
+}
+declare module 'node:stream' {
+ import stream = require('stream');
+ export = stream;
+}
diff --git a/node_modules/@types/node/ts4.8/stream/consumers.d.ts b/node_modules/@types/node/ts4.8/stream/consumers.d.ts
new file mode 100755
index 0000000..2fd9424
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/stream/consumers.d.ts
@@ -0,0 +1,12 @@
+declare module 'stream/consumers' {
+ import { Blob as NodeBlob } from 'node:buffer';
+ import { Readable } from 'node:stream';
+ function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Buffer>;
+ function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<string>;
+ function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<ArrayBuffer>;
+ function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<NodeBlob>;
+ function json(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<unknown>;
+}
+declare module 'node:stream/consumers' {
+ export * from 'stream/consumers';
+}
diff --git a/node_modules/@types/node/ts4.8/stream/promises.d.ts b/node_modules/@types/node/ts4.8/stream/promises.d.ts
new file mode 100755
index 0000000..b427073
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/stream/promises.d.ts
@@ -0,0 +1,42 @@
+declare module 'stream/promises' {
+ import { FinishedOptions, PipelineSource, PipelineTransform, PipelineDestination, PipelinePromise, PipelineOptions } from 'node:stream';
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
+ function pipeline<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(source: A, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, B extends PipelineDestination<T1, any>>(
+ source: A,
+ transform1: T1,
+ destination: B,
+ options?: PipelineOptions
+ ): PipelinePromise<B>;
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, T2 extends PipelineTransform<T1, any>, B extends PipelineDestination<T2, any>>(
+ source: A,
+ transform1: T1,
+ transform2: T2,
+ destination: B,
+ options?: PipelineOptions
+ ): PipelinePromise<B>;
+ function pipeline<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ B extends PipelineDestination<T3, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function pipeline<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ T4 extends PipelineTransform<T3, any>,
+ B extends PipelineDestination<T4, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function pipeline(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>, options?: PipelineOptions): Promise<void>;
+ function pipeline(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
+ ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
+ ): Promise<void>;
+}
+declare module 'node:stream/promises' {
+ export * from 'stream/promises';
+}
diff --git a/node_modules/@types/node/ts4.8/stream/web.d.ts b/node_modules/@types/node/ts4.8/stream/web.d.ts
new file mode 100755
index 0000000..f9ef057
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/stream/web.d.ts
@@ -0,0 +1,330 @@
+declare module 'stream/web' {
+ // stub module, pending copy&paste from .d.ts or manual impl
+ // copy from lib.dom.d.ts
+ interface ReadableWritablePair<R = any, W = any> {
+ readable: ReadableStream<R>;
+ /**
+ * Provides a convenient, chainable way of piping this readable stream
+ * through a transform stream (or any other { writable, readable }
+ * pair). It simply pipes the stream into the writable side of the
+ * supplied pair, and returns the readable side for further use.
+ *
+ * Piping a stream will lock it for the duration of the pipe, preventing
+ * any other consumer from acquiring a reader.
+ */
+ writable: WritableStream<W>;
+ }
+ interface StreamPipeOptions {
+ preventAbort?: boolean;
+ preventCancel?: boolean;
+ /**
+ * Pipes this readable stream to a given writable stream destination.
+ * The way in which the piping process behaves under various error
+ * conditions can be customized with a number of passed options. It
+ * returns a promise that fulfills when the piping process completes
+ * successfully, or rejects if any errors were encountered.
+ *
+ * Piping a stream will lock it for the duration of the pipe, preventing
+ * any other consumer from acquiring a reader.
+ *
+ * Errors and closures of the source and destination streams propagate
+ * as follows:
+ *
+ * An error in this source readable stream will abort destination,
+ * unless preventAbort is truthy. The returned promise will be rejected
+ * with the source's error, or with any error that occurs during
+ * aborting the destination.
+ *
+ * An error in destination will cancel this source readable stream,
+ * unless preventCancel is truthy. The returned promise will be rejected
+ * with the destination's error, or with any error that occurs during
+ * canceling the source.
+ *
+ * When this source readable stream closes, destination will be closed,
+ * unless preventClose is truthy. The returned promise will be fulfilled
+ * once this process completes, unless an error is encountered while
+ * closing the destination, in which case it will be rejected with that
+ * error.
+ *
+ * If destination starts out closed or closing, this source readable
+ * stream will be canceled, unless preventCancel is true. The returned
+ * promise will be rejected with an error indicating piping to a closed
+ * stream failed, or with any error that occurs during canceling the
+ * source.
+ *
+ * The signal option can be set to an AbortSignal to allow aborting an
+ * ongoing pipe operation via the corresponding AbortController. In this
+ * case, this source readable stream will be canceled, and destination
+ * aborted, unless the respective options preventCancel or preventAbort
+ * are set.
+ */
+ preventClose?: boolean;
+ signal?: AbortSignal;
+ }
+ interface ReadableStreamGenericReader {
+ readonly closed: Promise<undefined>;
+ cancel(reason?: any): Promise<void>;
+ }
+ interface ReadableStreamDefaultReadValueResult<T> {
+ done: false;
+ value: T;
+ }
+ interface ReadableStreamDefaultReadDoneResult {
+ done: true;
+ value?: undefined;
+ }
+ type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
+ type ReadableStreamDefaultReadResult<T> = ReadableStreamDefaultReadValueResult<T> | ReadableStreamDefaultReadDoneResult;
+ interface ReadableByteStreamControllerCallback {
+ (controller: ReadableByteStreamController): void | PromiseLike<void>;
+ }
+ interface UnderlyingSinkAbortCallback {
+ (reason?: any): void | PromiseLike<void>;
+ }
+ interface UnderlyingSinkCloseCallback {
+ (): void | PromiseLike<void>;
+ }
+ interface UnderlyingSinkStartCallback {
+ (controller: WritableStreamDefaultController): any;
+ }
+ interface UnderlyingSinkWriteCallback<W> {
+ (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
+ }
+ interface UnderlyingSourceCancelCallback {
+ (reason?: any): void | PromiseLike<void>;
+ }
+ interface UnderlyingSourcePullCallback<R> {
+ (controller: ReadableStreamController<R>): void | PromiseLike<void>;
+ }
+ interface UnderlyingSourceStartCallback<R> {
+ (controller: ReadableStreamController<R>): any;
+ }
+ interface TransformerFlushCallback<O> {
+ (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
+ }
+ interface TransformerStartCallback<O> {
+ (controller: TransformStreamDefaultController<O>): any;
+ }
+ interface TransformerTransformCallback<I, O> {
+ (chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
+ }
+ interface UnderlyingByteSource {
+ autoAllocateChunkSize?: number;
+ cancel?: ReadableStreamErrorCallback;
+ pull?: ReadableByteStreamControllerCallback;
+ start?: ReadableByteStreamControllerCallback;
+ type: 'bytes';
+ }
+ interface UnderlyingSource<R = any> {
+ cancel?: UnderlyingSourceCancelCallback;
+ pull?: UnderlyingSourcePullCallback<R>;
+ start?: UnderlyingSourceStartCallback<R>;
+ type?: undefined;
+ }
+ interface UnderlyingSink<W = any> {
+ abort?: UnderlyingSinkAbortCallback;
+ close?: UnderlyingSinkCloseCallback;
+ start?: UnderlyingSinkStartCallback;
+ type?: undefined;
+ write?: UnderlyingSinkWriteCallback<W>;
+ }
+ interface ReadableStreamErrorCallback {
+ (reason: any): void | PromiseLike<void>;
+ }
+ /** This Streams API interface represents a readable stream of byte data. */
+ interface ReadableStream<R = any> {
+ readonly locked: boolean;
+ cancel(reason?: any): Promise<void>;
+ getReader(): ReadableStreamDefaultReader<R>;
+ pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
+ pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
+ tee(): [ReadableStream<R>, ReadableStream<R>];
+ values(options?: { preventCancel?: boolean }): AsyncIterableIterator<R>;
+ [Symbol.asyncIterator](): AsyncIterableIterator<R>;
+ }
+ const ReadableStream: {
+ prototype: ReadableStream;
+ new (underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy<Uint8Array>): ReadableStream<Uint8Array>;
+ new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
+ };
+ interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
+ read(): Promise<ReadableStreamDefaultReadResult<R>>;
+ releaseLock(): void;
+ }
+ const ReadableStreamDefaultReader: {
+ prototype: ReadableStreamDefaultReader;
+ new <R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
+ };
+ const ReadableStreamBYOBReader: any;
+ const ReadableStreamBYOBRequest: any;
+ interface ReadableByteStreamController {
+ readonly byobRequest: undefined;
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk: ArrayBufferView): void;
+ error(error?: any): void;
+ }
+ const ReadableByteStreamController: {
+ prototype: ReadableByteStreamController;
+ new (): ReadableByteStreamController;
+ };
+ interface ReadableStreamDefaultController<R = any> {
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk?: R): void;
+ error(e?: any): void;
+ }
+ const ReadableStreamDefaultController: {
+ prototype: ReadableStreamDefaultController;
+ new (): ReadableStreamDefaultController;
+ };
+ interface Transformer<I = any, O = any> {
+ flush?: TransformerFlushCallback<O>;
+ readableType?: undefined;
+ start?: TransformerStartCallback<O>;
+ transform?: TransformerTransformCallback<I, O>;
+ writableType?: undefined;
+ }
+ interface TransformStream<I = any, O = any> {
+ readonly readable: ReadableStream<O>;
+ readonly writable: WritableStream<I>;
+ }
+ const TransformStream: {
+ prototype: TransformStream;
+ new <I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
+ };
+ interface TransformStreamDefaultController<O = any> {
+ readonly desiredSize: number | null;
+ enqueue(chunk?: O): void;
+ error(reason?: any): void;
+ terminate(): void;
+ }
+ const TransformStreamDefaultController: {
+ prototype: TransformStreamDefaultController;
+ new (): TransformStreamDefaultController;
+ };
+ /**
+ * This Streams API interface provides a standard abstraction for writing
+ * streaming data to a destination, known as a sink. This object comes with
+ * built-in back pressure and queuing.
+ */
+ interface WritableStream<W = any> {
+ readonly locked: boolean;
+ abort(reason?: any): Promise<void>;
+ close(): Promise<void>;
+ getWriter(): WritableStreamDefaultWriter<W>;
+ }
+ const WritableStream: {
+ prototype: WritableStream;
+ new <W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
+ };
+ /**
+ * This Streams API interface is the object returned by
+ * WritableStream.getWriter() and once created locks the < writer to the
+ * WritableStream ensuring that no other streams can write to the underlying
+ * sink.
+ */
+ interface WritableStreamDefaultWriter<W = any> {
+ readonly closed: Promise<undefined>;
+ readonly desiredSize: number | null;
+ readonly ready: Promise<undefined>;
+ abort(reason?: any): Promise<void>;
+ close(): Promise<void>;
+ releaseLock(): void;
+ write(chunk?: W): Promise<void>;
+ }
+ const WritableStreamDefaultWriter: {
+ prototype: WritableStreamDefaultWriter;
+ new <W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
+ };
+ /**
+ * This Streams API interface represents a controller allowing control of a
+ * WritableStream's state. When constructing a WritableStream, the
+ * underlying sink is given a corresponding WritableStreamDefaultController
+ * instance to manipulate.
+ */
+ interface WritableStreamDefaultController {
+ error(e?: any): void;
+ }
+ const WritableStreamDefaultController: {
+ prototype: WritableStreamDefaultController;
+ new (): WritableStreamDefaultController;
+ };
+ interface QueuingStrategy<T = any> {
+ highWaterMark?: number;
+ size?: QueuingStrategySize<T>;
+ }
+ interface QueuingStrategySize<T = any> {
+ (chunk?: T): number;
+ }
+ interface QueuingStrategyInit {
+ /**
+ * Creates a new ByteLengthQueuingStrategy with the provided high water
+ * mark.
+ *
+ * Note that the provided high water mark will not be validated ahead of
+ * time. Instead, if it is negative, NaN, or not a number, the resulting
+ * ByteLengthQueuingStrategy will cause the corresponding stream
+ * constructor to throw.
+ */
+ highWaterMark: number;
+ }
+ /**
+ * This Streams API interface provides a built-in byte length queuing
+ * strategy that can be used when constructing streams.
+ */
+ interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
+ readonly highWaterMark: number;
+ readonly size: QueuingStrategySize<ArrayBufferView>;
+ }
+ const ByteLengthQueuingStrategy: {
+ prototype: ByteLengthQueuingStrategy;
+ new (init: QueuingStrategyInit): ByteLengthQueuingStrategy;
+ };
+ /**
+ * This Streams API interface provides a built-in byte length queuing
+ * strategy that can be used when constructing streams.
+ */
+ interface CountQueuingStrategy extends QueuingStrategy {
+ readonly highWaterMark: number;
+ readonly size: QueuingStrategySize;
+ }
+ const CountQueuingStrategy: {
+ prototype: CountQueuingStrategy;
+ new (init: QueuingStrategyInit): CountQueuingStrategy;
+ };
+ interface TextEncoderStream {
+ /** Returns "utf-8". */
+ readonly encoding: 'utf-8';
+ readonly readable: ReadableStream<Uint8Array>;
+ readonly writable: WritableStream<string>;
+ readonly [Symbol.toStringTag]: string;
+ }
+ const TextEncoderStream: {
+ prototype: TextEncoderStream;
+ new (): TextEncoderStream;
+ };
+ interface TextDecoderOptions {
+ fatal?: boolean;
+ ignoreBOM?: boolean;
+ }
+ type BufferSource = ArrayBufferView | ArrayBuffer;
+ interface TextDecoderStream {
+ /** Returns encoding's name, lower cased. */
+ readonly encoding: string;
+ /** Returns `true` if error mode is "fatal", and `false` otherwise. */
+ readonly fatal: boolean;
+ /** Returns `true` if ignore BOM flag is set, and `false` otherwise. */
+ readonly ignoreBOM: boolean;
+ readonly readable: ReadableStream<string>;
+ readonly writable: WritableStream<BufferSource>;
+ readonly [Symbol.toStringTag]: string;
+ }
+ const TextDecoderStream: {
+ prototype: TextDecoderStream;
+ new (label?: string, options?: TextDecoderOptions): TextDecoderStream;
+ };
+}
+declare module 'node:stream/web' {
+ export * from 'stream/web';
+}
diff --git a/node_modules/@types/node/ts4.8/string_decoder.d.ts b/node_modules/@types/node/ts4.8/string_decoder.d.ts
new file mode 100755
index 0000000..a069bb8
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/string_decoder.d.ts
@@ -0,0 +1,67 @@
+/**
+ * The `node:string_decoder` module provides an API for decoding `Buffer` objects
+ * into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
+ * characters. It can be accessed using:
+ *
+ * ```js
+ * const { StringDecoder } = require('node:string_decoder');
+ * ```
+ *
+ * The following example shows the basic use of the `StringDecoder` class.
+ *
+ * ```js
+ * const { StringDecoder } = require('node:string_decoder');
+ * const decoder = new StringDecoder('utf8');
+ *
+ * const cent = Buffer.from([0xC2, 0xA2]);
+ * console.log(decoder.write(cent));
+ *
+ * const euro = Buffer.from([0xE2, 0x82, 0xAC]);
+ * console.log(decoder.write(euro));
+ * ```
+ *
+ * When a `Buffer` instance is written to the `StringDecoder` instance, an
+ * internal buffer is used to ensure that the decoded string does not contain
+ * any incomplete multibyte characters. These are held in the buffer until the
+ * next call to `stringDecoder.write()` or until `stringDecoder.end()` is called.
+ *
+ * In the following example, the three UTF-8 encoded bytes of the European Euro
+ * symbol (`€`) are written over three separate operations:
+ *
+ * ```js
+ * const { StringDecoder } = require('node:string_decoder');
+ * const decoder = new StringDecoder('utf8');
+ *
+ * decoder.write(Buffer.from([0xE2]));
+ * decoder.write(Buffer.from([0x82]));
+ * console.log(decoder.end(Buffer.from([0xAC])));
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/string_decoder.js)
+ */
+declare module 'string_decoder' {
+ class StringDecoder {
+ constructor(encoding?: BufferEncoding);
+ /**
+ * Returns a decoded string, ensuring that any incomplete multibyte characters at
+ * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the
+ * returned string and stored in an internal buffer for the next call to`stringDecoder.write()` or `stringDecoder.end()`.
+ * @since v0.1.99
+ * @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode.
+ */
+ write(buffer: Buffer): string;
+ /**
+ * Returns any remaining input stored in the internal buffer as a string. Bytes
+ * representing incomplete UTF-8 and UTF-16 characters will be replaced with
+ * substitution characters appropriate for the character encoding.
+ *
+ * If the `buffer` argument is provided, one final call to `stringDecoder.write()`is performed before returning the remaining input.
+ * After `end()` is called, the `stringDecoder` object can be reused for new input.
+ * @since v0.9.3
+ * @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode.
+ */
+ end(buffer?: Buffer): string;
+ }
+}
+declare module 'node:string_decoder' {
+ export * from 'string_decoder';
+}
diff --git a/node_modules/@types/node/ts4.8/test.d.ts b/node_modules/@types/node/ts4.8/test.d.ts
new file mode 100755
index 0000000..6d8c91f
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/test.d.ts
@@ -0,0 +1,1461 @@
+/**
+ * The `node:test` module facilitates the creation of JavaScript tests.
+ * To access it:
+ *
+ * ```js
+ * import test from 'node:test';
+ * ```
+ *
+ * This module is only available under the `node:` scheme. The following will not
+ * work:
+ *
+ * ```js
+ * import test from 'test';
+ * ```
+ *
+ * Tests created via the `test` module consist of a single function that is
+ * processed in one of three ways:
+ *
+ * 1. A synchronous function that is considered failing if it throws an exception,
+ * and is considered passing otherwise.
+ * 2. A function that returns a `Promise` that is considered failing if the`Promise` rejects, and is considered passing if the `Promise` resolves.
+ * 3. A function that receives a callback function. If the callback receives any
+ * truthy value as its first argument, the test is considered failing. If a
+ * falsy value is passed as the first argument to the callback, the test is
+ * considered passing. If the test function receives a callback function and
+ * also returns a `Promise`, the test will fail.
+ *
+ * The following example illustrates how tests are written using the`test` module.
+ *
+ * ```js
+ * test('synchronous passing test', (t) => {
+ * // This test passes because it does not throw an exception.
+ * assert.strictEqual(1, 1);
+ * });
+ *
+ * test('synchronous failing test', (t) => {
+ * // This test fails because it throws an exception.
+ * assert.strictEqual(1, 2);
+ * });
+ *
+ * test('asynchronous passing test', async (t) => {
+ * // This test passes because the Promise returned by the async
+ * // function is not rejected.
+ * assert.strictEqual(1, 1);
+ * });
+ *
+ * test('asynchronous failing test', async (t) => {
+ * // This test fails because the Promise returned by the async
+ * // function is rejected.
+ * assert.strictEqual(1, 2);
+ * });
+ *
+ * test('failing test using Promises', (t) => {
+ * // Promises can be used directly as well.
+ * return new Promise((resolve, reject) => {
+ * setImmediate(() => {
+ * reject(new Error('this will cause the test to fail'));
+ * });
+ * });
+ * });
+ *
+ * test('callback passing test', (t, done) => {
+ * // done() is the callback function. When the setImmediate() runs, it invokes
+ * // done() with no arguments.
+ * setImmediate(done);
+ * });
+ *
+ * test('callback failing test', (t, done) => {
+ * // When the setImmediate() runs, done() is invoked with an Error object and
+ * // the test fails.
+ * setImmediate(() => {
+ * done(new Error('callback failure'));
+ * });
+ * });
+ * ```
+ *
+ * If any tests fail, the process exit code is set to `1`.
+ * @since v18.0.0, v16.17.0
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/test.js)
+ */
+declare module 'node:test' {
+ import { Readable } from 'node:stream';
+ import { AsyncResource } from 'node:async_hooks';
+ /**
+ * ```js
+ * import { tap } from 'node:test/reporters';
+ * import process from 'node:process';
+ *
+ * run({ files: [path.resolve('./tests/test.js')] })
+ * .compose(tap)
+ * .pipe(process.stdout);
+ * ```
+ * @since v18.9.0, v16.19.0
+ * @param options Configuration options for running tests. The following properties are supported:
+ */
+ function run(options?: RunOptions): TestsStream;
+ /**
+ * The `test()` function is the value imported from the `test` module. Each
+ * invocation of this function results in reporting the test to the `TestsStream`.
+ *
+ * The `TestContext` object passed to the `fn` argument can be used to perform
+ * actions related to the current test. Examples include skipping the test, adding
+ * additional diagnostic information, or creating subtests.
+ *
+ * `test()` returns a `Promise` that resolves once the test completes.
+ * if `test()` is called within a `describe()` block, it resolve immediately.
+ * The return value can usually be discarded for top level tests.
+ * However, the return value from subtests should be used to prevent the parent
+ * test from finishing first and cancelling the subtest
+ * as shown in the following example.
+ *
+ * ```js
+ * test('top level test', async (t) => {
+ * // The setTimeout() in the following subtest would cause it to outlive its
+ * // parent test if 'await' is removed on the next line. Once the parent test
+ * // completes, it will cancel any outstanding subtests.
+ * await t.test('longer running subtest', async (t) => {
+ * return new Promise((resolve, reject) => {
+ * setTimeout(resolve, 1000);
+ * });
+ * });
+ * });
+ * ```
+ *
+ * The `timeout` option can be used to fail the test if it takes longer than`timeout` milliseconds to complete. However, it is not a reliable mechanism for
+ * canceling tests because a running test might block the application thread and
+ * thus prevent the scheduled cancellation.
+ * @since v18.0.0, v16.17.0
+ * @param [name='The name'] The name of the test, which is displayed when reporting test results.
+ * @param options Configuration options for the test. The following properties are supported:
+ * @param [fn='A no-op function'] The function under test. The first argument to this function is a {@link TestContext} object. If the test uses callbacks, the callback function is passed as the
+ * second argument.
+ * @return Resolved with `undefined` once the test completes, or immediately if the test runs within {@link describe}.
+ */
+ function test(name?: string, fn?: TestFn): Promise<void>;
+ function test(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function test(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function test(fn?: TestFn): Promise<void>;
+ namespace test {
+ export {
+ after,
+ afterEach,
+ before,
+ beforeEach,
+ describe,
+ it,
+ run,
+ mock,
+ test,
+ skip,
+ todo,
+ only
+ };
+ }
+ /**
+ * The `describe()` function imported from the `node:test` module. Each
+ * invocation of this function results in the creation of a Subtest.
+ * After invocation of top level `describe` functions,
+ * all top level tests and suites will execute.
+ * @param [name='The name'] The name of the suite, which is displayed when reporting test results.
+ * @param options Configuration options for the suite. supports the same options as `test([name][, options][, fn])`.
+ * @param [fn='A no-op function'] The function under suite declaring all subtests and subsuites. The first argument to this function is a {@link SuiteContext} object.
+ * @return Immediately fulfilled with `undefined`.
+ */
+ function describe(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
+ function describe(name?: string, fn?: SuiteFn): Promise<void>;
+ function describe(options?: TestOptions, fn?: SuiteFn): Promise<void>;
+ function describe(fn?: SuiteFn): Promise<void>;
+ namespace describe {
+ /**
+ * Shorthand for skipping a suite, same as `describe([name], { skip: true }[, fn])`.
+ */
+ function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
+ function skip(name?: string, fn?: SuiteFn): Promise<void>;
+ function skip(options?: TestOptions, fn?: SuiteFn): Promise<void>;
+ function skip(fn?: SuiteFn): Promise<void>;
+ /**
+ * Shorthand for marking a suite as `TODO`, same as `describe([name], { todo: true }[, fn])`.
+ */
+ function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
+ function todo(name?: string, fn?: SuiteFn): Promise<void>;
+ function todo(options?: TestOptions, fn?: SuiteFn): Promise<void>;
+ function todo(fn?: SuiteFn): Promise<void>;
+ /**
+ * Shorthand for marking a suite as `only`, same as `describe([name], { only: true }[, fn])`.
+ * @since v18.15.0
+ */
+ function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
+ function only(name?: string, fn?: SuiteFn): Promise<void>;
+ function only(options?: TestOptions, fn?: SuiteFn): Promise<void>;
+ function only(fn?: SuiteFn): Promise<void>;
+ }
+ /**
+ * Shorthand for `test()`.
+ *
+ * The `it()` function is imported from the `node:test` module.
+ * @since v18.6.0, v16.17.0
+ */
+ function it(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function it(name?: string, fn?: TestFn): Promise<void>;
+ function it(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function it(fn?: TestFn): Promise<void>;
+ namespace it {
+ /**
+ * Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`.
+ */
+ function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function skip(name?: string, fn?: TestFn): Promise<void>;
+ function skip(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function skip(fn?: TestFn): Promise<void>;
+ /**
+ * Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.
+ */
+ function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function todo(name?: string, fn?: TestFn): Promise<void>;
+ function todo(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function todo(fn?: TestFn): Promise<void>;
+ /**
+ * Shorthand for marking a test as `only`, same as `it([name], { only: true }[, fn])`.
+ * @since v18.15.0
+ */
+ function only(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function only(name?: string, fn?: TestFn): Promise<void>;
+ function only(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function only(fn?: TestFn): Promise<void>;
+ }
+ /**
+ * Shorthand for skipping a test, same as `test([name], { skip: true }[, fn])`.
+ * @since v20.2.0
+ */
+ function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function skip(name?: string, fn?: TestFn): Promise<void>;
+ function skip(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function skip(fn?: TestFn): Promise<void>;
+ /**
+ * Shorthand for marking a test as `TODO`, same as `test([name], { todo: true }[, fn])`.
+ * @since v20.2.0
+ */
+ function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function todo(name?: string, fn?: TestFn): Promise<void>;
+ function todo(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function todo(fn?: TestFn): Promise<void>;
+ /**
+ * Shorthand for marking a test as `only`, same as `test([name], { only: true }[, fn])`.
+ * @since v20.2.0
+ */
+ function only(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function only(name?: string, fn?: TestFn): Promise<void>;
+ function only(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function only(fn?: TestFn): Promise<void>;
+ /**
+ * The type of a function under test. The first argument to this function is a
+ * {@link TestContext} object. If the test uses callbacks, the callback function is passed as
+ * the second argument.
+ */
+ type TestFn = (t: TestContext, done: (result?: any) => void) => void | Promise<void>;
+ /**
+ * The type of a function under Suite.
+ */
+ type SuiteFn = (s: SuiteContext) => void | Promise<void>;
+ interface TestShard {
+ /**
+ * A positive integer between 1 and `<total>` that specifies the index of the shard to run.
+ */
+ index: number;
+ /**
+ * A positive integer that specifies the total number of shards to split the test files to.
+ */
+ total: number;
+ }
+ interface RunOptions {
+ /**
+ * If a number is provided, then that many files would run in parallel.
+ * If truthy, it would run (number of cpu cores - 1) files in parallel.
+ * If falsy, it would only run one file at a time.
+ * If unspecified, subtests inherit this value from their parent.
+ * @default true
+ */
+ concurrency?: number | boolean | undefined;
+ /**
+ * An array containing the list of files to run.
+ * If unspecified, the test runner execution model will be used.
+ */
+ files?: readonly string[] | undefined;
+ /**
+ * Allows aborting an in-progress test execution.
+ * @default undefined
+ */
+ signal?: AbortSignal | undefined;
+ /**
+ * A number of milliseconds the test will fail after.
+ * If unspecified, subtests inherit this value from their parent.
+ * @default Infinity
+ */
+ timeout?: number | undefined;
+ /**
+ * Sets inspector port of test child process.
+ * If a nullish value is provided, each process gets its own port,
+ * incremented from the primary's `process.debugPort`.
+ */
+ inspectPort?: number | (() => number) | undefined;
+ /**
+ * That can be used to only run tests whose name matches the provided pattern.
+ * Test name patterns are interpreted as JavaScript regular expressions.
+ * For each test that is executed, any corresponding test hooks, such as `beforeEach()`, are also run.
+ */
+ testNamePatterns?: string | RegExp | string[] | RegExp[];
+ /**
+ * A function that accepts the TestsStream instance and can be used to setup listeners before any tests are run.
+ */
+ setup?: (root: unknown) => void | Promise<void>;
+ /**
+ * Whether to run in watch mode or not.
+ * @default false
+ */
+ watch?: boolean | undefined;
+ /**
+ * Running tests in a specific shard.
+ * @default undefined
+ */
+ shard?: TestShard | undefined;
+ }
+ class Test extends AsyncResource {
+ concurrency: number;
+ nesting: number;
+ only: boolean;
+ reporter: TestsStream;
+ runOnlySubtests: boolean;
+ testNumber: number;
+ timeout: number | null;
+ }
+ /**
+ * A successful call to `run()` method will return a new `TestsStream` object, streaming a series of events representing the execution of the tests.`TestsStream` will emit events, in the
+ * order of the tests definition
+ * @since v18.9.0, v16.19.0
+ */
+ class TestsStream extends Readable implements NodeJS.ReadableStream {
+ addListener(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
+ addListener(event: 'test:fail', listener: (data: TestFail) => void): this;
+ addListener(event: 'test:pass', listener: (data: TestPass) => void): this;
+ addListener(event: 'test:plan', listener: (data: TestPlan) => void): this;
+ addListener(event: 'test:start', listener: (data: TestStart) => void): this;
+ addListener(event: 'test:stderr', listener: (data: TestStderr) => void): this;
+ addListener(event: 'test:stdout', listener: (data: TestStdout) => void): this;
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ emit(event: 'test:diagnostic', data: DiagnosticData): boolean;
+ emit(event: 'test:fail', data: TestFail): boolean;
+ emit(event: 'test:pass', data: TestPass): boolean;
+ emit(event: 'test:plan', data: TestPlan): boolean;
+ emit(event: 'test:start', data: TestStart): boolean;
+ emit(event: 'test:stderr', data: TestStderr): boolean;
+ emit(event: 'test:stdout', data: TestStdout): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
+ on(event: 'test:fail', listener: (data: TestFail) => void): this;
+ on(event: 'test:pass', listener: (data: TestPass) => void): this;
+ on(event: 'test:plan', listener: (data: TestPlan) => void): this;
+ on(event: 'test:start', listener: (data: TestStart) => void): this;
+ on(event: 'test:stderr', listener: (data: TestStderr) => void): this;
+ on(event: 'test:stdout', listener: (data: TestStdout) => void): this;
+ on(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
+ once(event: 'test:fail', listener: (data: TestFail) => void): this;
+ once(event: 'test:pass', listener: (data: TestPass) => void): this;
+ once(event: 'test:plan', listener: (data: TestPlan) => void): this;
+ once(event: 'test:start', listener: (data: TestStart) => void): this;
+ once(event: 'test:stderr', listener: (data: TestStderr) => void): this;
+ once(event: 'test:stdout', listener: (data: TestStdout) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
+ prependListener(event: 'test:fail', listener: (data: TestFail) => void): this;
+ prependListener(event: 'test:pass', listener: (data: TestPass) => void): this;
+ prependListener(event: 'test:plan', listener: (data: TestPlan) => void): this;
+ prependListener(event: 'test:start', listener: (data: TestStart) => void): this;
+ prependListener(event: 'test:stderr', listener: (data: TestStderr) => void): this;
+ prependListener(event: 'test:stdout', listener: (data: TestStdout) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
+ prependOnceListener(event: 'test:fail', listener: (data: TestFail) => void): this;
+ prependOnceListener(event: 'test:pass', listener: (data: TestPass) => void): this;
+ prependOnceListener(event: 'test:plan', listener: (data: TestPlan) => void): this;
+ prependOnceListener(event: 'test:start', listener: (data: TestStart) => void): this;
+ prependOnceListener(event: 'test:stderr', listener: (data: TestStderr) => void): this;
+ prependOnceListener(event: 'test:stdout', listener: (data: TestStdout) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * An instance of `TestContext` is passed to each test function in order to
+ * interact with the test runner. However, the `TestContext` constructor is not
+ * exposed as part of the API.
+ * @since v18.0.0, v16.17.0
+ */
+ class TestContext {
+ /**
+ * This function is used to create a hook running before subtest of the current test.
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
+ * the second argument. Default: A no-op function.
+ * @param options Configuration options for the hook.
+ * @since v20.1.0
+ */
+ before: typeof before;
+ /**
+ * This function is used to create a hook running before each subtest of the current test.
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
+ * the second argument. Default: A no-op function.
+ * @param options Configuration options for the hook.
+ * @since v18.8.0
+ */
+ beforeEach: typeof beforeEach;
+ /**
+ * This function is used to create a hook that runs after the current test finishes.
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
+ * the second argument. Default: A no-op function.
+ * @param options Configuration options for the hook.
+ * @since v18.13.0
+ */
+ after: typeof after;
+ /**
+ * This function is used to create a hook running after each subtest of the current test.
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
+ * the second argument. Default: A no-op function.
+ * @param options Configuration options for the hook.
+ * @since v18.8.0
+ */
+ afterEach: typeof afterEach;
+ /**
+ * This function is used to write diagnostics to the output. Any diagnostic
+ * information is included at the end of the test's results. This function does
+ * not return a value.
+ *
+ * ```js
+ * test('top level test', (t) => {
+ * t.diagnostic('A diagnostic message');
+ * });
+ * ```
+ * @since v18.0.0, v16.17.0
+ * @param message Message to be reported.
+ */
+ diagnostic(message: string): void;
+ /**
+ * The name of the test.
+ * @since v18.8.0, v16.18.0
+ */
+ readonly name: string;
+ /**
+ * If `shouldRunOnlyTests` is truthy, the test context will only run tests that
+ * have the `only` option set. Otherwise, all tests are run. If Node.js was not
+ * started with the `--test-only` command-line option, this function is a
+ * no-op.
+ *
+ * ```js
+ * test('top level test', (t) => {
+ * // The test context can be set to run subtests with the 'only' option.
+ * t.runOnly(true);
+ * return Promise.all([
+ * t.test('this subtest is now skipped'),
+ * t.test('this subtest is run', { only: true }),
+ * ]);
+ * });
+ * ```
+ * @since v18.0.0, v16.17.0
+ * @param shouldRunOnlyTests Whether or not to run `only` tests.
+ */
+ runOnly(shouldRunOnlyTests: boolean): void;
+ /**
+ * ```js
+ * test('top level test', async (t) => {
+ * await fetch('some/uri', { signal: t.signal });
+ * });
+ * ```
+ * @since v18.7.0, v16.17.0
+ */
+ readonly signal: AbortSignal;
+ /**
+ * This function causes the test's output to indicate the test as skipped. If`message` is provided, it is included in the output. Calling `skip()` does
+ * not terminate execution of the test function. This function does not return a
+ * value.
+ *
+ * ```js
+ * test('top level test', (t) => {
+ * // Make sure to return here as well if the test contains additional logic.
+ * t.skip('this is skipped');
+ * });
+ * ```
+ * @since v18.0.0, v16.17.0
+ * @param message Optional skip message.
+ */
+ skip(message?: string): void;
+ /**
+ * This function adds a `TODO` directive to the test's output. If `message` is
+ * provided, it is included in the output. Calling `todo()` does not terminate
+ * execution of the test function. This function does not return a value.
+ *
+ * ```js
+ * test('top level test', (t) => {
+ * // This test is marked as `TODO`
+ * t.todo('this is a todo');
+ * });
+ * ```
+ * @since v18.0.0, v16.17.0
+ * @param message Optional `TODO` message.
+ */
+ todo(message?: string): void;
+ /**
+ * This function is used to create subtests under the current test. This function behaves in
+ * the same fashion as the top level {@link test} function.
+ * @since v18.0.0
+ * @param name The name of the test, which is displayed when reporting test results.
+ * Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
+ * @param options Configuration options for the test
+ * @param fn The function under test. This first argument to this function is a
+ * {@link TestContext} object. If the test uses callbacks, the callback function is
+ * passed as the second argument. Default: A no-op function.
+ * @returns A {@link Promise} resolved with `undefined` once the test completes.
+ */
+ test: typeof test;
+ /**
+ * Each test provides its own MockTracker instance.
+ */
+ readonly mock: MockTracker;
+ }
+ /**
+ * An instance of `SuiteContext` is passed to each suite function in order to
+ * interact with the test runner. However, the `SuiteContext` constructor is not
+ * exposed as part of the API.
+ * @since v18.7.0, v16.17.0
+ */
+ class SuiteContext {
+ /**
+ * The name of the suite.
+ * @since v18.8.0, v16.18.0
+ */
+ readonly name: string;
+ /**
+ * Can be used to abort test subtasks when the test has been aborted.
+ * @since v18.7.0, v16.17.0
+ */
+ readonly signal: AbortSignal;
+ }
+ interface TestOptions {
+ /**
+ * If a number is provided, then that many tests would run in parallel.
+ * If truthy, it would run (number of cpu cores - 1) tests in parallel.
+ * For subtests, it will be `Infinity` tests in parallel.
+ * If falsy, it would only run one test at a time.
+ * If unspecified, subtests inherit this value from their parent.
+ * @default false
+ */
+ concurrency?: number | boolean | undefined;
+ /**
+ * If truthy, and the test context is configured to run `only` tests, then this test will be
+ * run. Otherwise, the test is skipped.
+ * @default false
+ */
+ only?: boolean | undefined;
+ /**
+ * Allows aborting an in-progress test.
+ * @since v18.8.0
+ */
+ signal?: AbortSignal | undefined;
+ /**
+ * If truthy, the test is skipped. If a string is provided, that string is displayed in the
+ * test results as the reason for skipping the test.
+ * @default false
+ */
+ skip?: boolean | string | undefined;
+ /**
+ * A number of milliseconds the test will fail after. If unspecified, subtests inherit this
+ * value from their parent.
+ * @default Infinity
+ * @since v18.7.0
+ */
+ timeout?: number | undefined;
+ /**
+ * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in
+ * the test results as the reason why the test is `TODO`.
+ * @default false
+ */
+ todo?: boolean | string | undefined;
+ }
+ /**
+ * This function is used to create a hook running before running a suite.
+ *
+ * ```js
+ * describe('tests', async () => {
+ * before(() => console.log('about to run some test'));
+ * it('is a subtest', () => {
+ * assert.ok('some relevant assertion here');
+ * });
+ * });
+ * ```
+ * @since v18.8.0, v16.18.0
+ * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
+ * @param options Configuration options for the hook. The following properties are supported:
+ */
+ function before(fn?: HookFn, options?: HookOptions): void;
+ /**
+ * This function is used to create a hook running after running a suite.
+ *
+ * ```js
+ * describe('tests', async () => {
+ * after(() => console.log('finished running tests'));
+ * it('is a subtest', () => {
+ * assert.ok('some relevant assertion here');
+ * });
+ * });
+ * ```
+ * @since v18.8.0, v16.18.0
+ * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
+ * @param options Configuration options for the hook. The following properties are supported:
+ */
+ function after(fn?: HookFn, options?: HookOptions): void;
+ /**
+ * This function is used to create a hook running
+ * before each subtest of the current suite.
+ *
+ * ```js
+ * describe('tests', async () => {
+ * beforeEach(() => console.log('about to run a test'));
+ * it('is a subtest', () => {
+ * assert.ok('some relevant assertion here');
+ * });
+ * });
+ * ```
+ * @since v18.8.0, v16.18.0
+ * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
+ * @param options Configuration options for the hook. The following properties are supported:
+ */
+ function beforeEach(fn?: HookFn, options?: HookOptions): void;
+ /**
+ * This function is used to create a hook running
+ * after each subtest of the current test.
+ *
+ * ```js
+ * describe('tests', async () => {
+ * afterEach(() => console.log('finished running a test'));
+ * it('is a subtest', () => {
+ * assert.ok('some relevant assertion here');
+ * });
+ * });
+ * ```
+ * @since v18.8.0, v16.18.0
+ * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
+ * @param options Configuration options for the hook. The following properties are supported:
+ */
+ function afterEach(fn?: HookFn, options?: HookOptions): void;
+ /**
+ * The hook function. If the hook uses callbacks, the callback function is passed as the
+ * second argument.
+ */
+ type HookFn = (s: SuiteContext, done: (result?: any) => void) => any;
+ /**
+ * Configuration options for hooks.
+ * @since v18.8.0
+ */
+ interface HookOptions {
+ /**
+ * Allows aborting an in-progress hook.
+ */
+ signal?: AbortSignal | undefined;
+ /**
+ * A number of milliseconds the hook will fail after. If unspecified, subtests inherit this
+ * value from their parent.
+ * @default Infinity
+ */
+ timeout?: number | undefined;
+ }
+ interface MockFunctionOptions {
+ /**
+ * The number of times that the mock will use the behavior of `implementation`.
+ * Once the mock function has been called `times` times,
+ * it will automatically restore the behavior of `original`.
+ * This value must be an integer greater than zero.
+ * @default Infinity
+ */
+ times?: number | undefined;
+ }
+ interface MockMethodOptions extends MockFunctionOptions {
+ /**
+ * If `true`, `object[methodName]` is treated as a getter.
+ * This option cannot be used with the `setter` option.
+ */
+ getter?: boolean | undefined;
+ /**
+ * If `true`, `object[methodName]` is treated as a setter.
+ * This option cannot be used with the `getter` option.
+ */
+ setter?: boolean | undefined;
+ }
+ type Mock<F extends Function> = F & {
+ mock: MockFunctionContext<F>;
+ };
+ type NoOpFunction = (...args: any[]) => undefined;
+ type FunctionPropertyNames<T> = {
+ [K in keyof T]: T[K] extends Function ? K : never;
+ }[keyof T];
+ /**
+ * The `MockTracker` class is used to manage mocking functionality. The test runner
+ * module provides a top level `mock` export which is a `MockTracker` instance.
+ * Each test also provides its own `MockTracker` instance via the test context's`mock` property.
+ * @since v19.1.0, v18.13.0
+ */
+ class MockTracker {
+ /**
+ * This function is used to create a mock function.
+ *
+ * The following example creates a mock function that increments a counter by one
+ * on each invocation. The `times` option is used to modify the mock behavior such
+ * that the first two invocations add two to the counter instead of one.
+ *
+ * ```js
+ * test('mocks a counting function', (t) => {
+ * let cnt = 0;
+ *
+ * function addOne() {
+ * cnt++;
+ * return cnt;
+ * }
+ *
+ * function addTwo() {
+ * cnt += 2;
+ * return cnt;
+ * }
+ *
+ * const fn = t.mock.fn(addOne, addTwo, { times: 2 });
+ *
+ * assert.strictEqual(fn(), 2);
+ * assert.strictEqual(fn(), 4);
+ * assert.strictEqual(fn(), 5);
+ * assert.strictEqual(fn(), 6);
+ * });
+ * ```
+ * @since v19.1.0, v18.13.0
+ * @param [original='A no-op function'] An optional function to create a mock on.
+ * @param implementation An optional function used as the mock implementation for `original`. This is useful for creating mocks that exhibit one behavior for a specified number of calls and
+ * then restore the behavior of `original`.
+ * @param options Optional configuration options for the mock function. The following properties are supported:
+ * @return The mocked function. The mocked function contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the
+ * behavior of the mocked function.
+ */
+ fn<F extends Function = NoOpFunction>(original?: F, options?: MockFunctionOptions): Mock<F>;
+ fn<F extends Function = NoOpFunction, Implementation extends Function = F>(original?: F, implementation?: Implementation, options?: MockFunctionOptions): Mock<F | Implementation>;
+ /**
+ * This function is used to create a mock on an existing object method. The
+ * following example demonstrates how a mock is created on an existing object
+ * method.
+ *
+ * ```js
+ * test('spies on an object method', (t) => {
+ * const number = {
+ * value: 5,
+ * subtract(a) {
+ * return this.value - a;
+ * },
+ * };
+ *
+ * t.mock.method(number, 'subtract');
+ * assert.strictEqual(number.subtract.mock.calls.length, 0);
+ * assert.strictEqual(number.subtract(3), 2);
+ * assert.strictEqual(number.subtract.mock.calls.length, 1);
+ *
+ * const call = number.subtract.mock.calls[0];
+ *
+ * assert.deepStrictEqual(call.arguments, [3]);
+ * assert.strictEqual(call.result, 2);
+ * assert.strictEqual(call.error, undefined);
+ * assert.strictEqual(call.target, undefined);
+ * assert.strictEqual(call.this, number);
+ * });
+ * ```
+ * @since v19.1.0, v18.13.0
+ * @param object The object whose method is being mocked.
+ * @param methodName The identifier of the method on `object` to mock. If `object[methodName]` is not a function, an error is thrown.
+ * @param implementation An optional function used as the mock implementation for `object[methodName]`.
+ * @param options Optional configuration options for the mock method. The following properties are supported:
+ * @return The mocked method. The mocked method contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the
+ * behavior of the mocked method.
+ */
+ method<
+ MockedObject extends object,
+ MethodName extends FunctionPropertyNames<MockedObject>,
+ >(
+ object: MockedObject,
+ methodName: MethodName,
+ options?: MockFunctionOptions,
+ ): MockedObject[MethodName] extends Function
+ ? Mock<MockedObject[MethodName]>
+ : never;
+ method<
+ MockedObject extends object,
+ MethodName extends FunctionPropertyNames<MockedObject>,
+ Implementation extends Function,
+ >(
+ object: MockedObject,
+ methodName: MethodName,
+ implementation: Implementation,
+ options?: MockFunctionOptions,
+ ): MockedObject[MethodName] extends Function
+ ? Mock<MockedObject[MethodName] | Implementation>
+ : never;
+ method<MockedObject extends object>(
+ object: MockedObject,
+ methodName: keyof MockedObject,
+ options: MockMethodOptions,
+ ): Mock<Function>;
+ method<MockedObject extends object>(
+ object: MockedObject,
+ methodName: keyof MockedObject,
+ implementation: Function,
+ options: MockMethodOptions,
+ ): Mock<Function>;
+
+ /**
+ * This function is syntax sugar for `MockTracker.method` with `options.getter`set to `true`.
+ * @since v19.3.0, v18.13.0
+ */
+ getter<
+ MockedObject extends object,
+ MethodName extends keyof MockedObject,
+ >(
+ object: MockedObject,
+ methodName: MethodName,
+ options?: MockFunctionOptions,
+ ): Mock<() => MockedObject[MethodName]>;
+ getter<
+ MockedObject extends object,
+ MethodName extends keyof MockedObject,
+ Implementation extends Function,
+ >(
+ object: MockedObject,
+ methodName: MethodName,
+ implementation?: Implementation,
+ options?: MockFunctionOptions,
+ ): Mock<(() => MockedObject[MethodName]) | Implementation>;
+ /**
+ * This function is syntax sugar for `MockTracker.method` with `options.setter`set to `true`.
+ * @since v19.3.0, v18.13.0
+ */
+ setter<
+ MockedObject extends object,
+ MethodName extends keyof MockedObject,
+ >(
+ object: MockedObject,
+ methodName: MethodName,
+ options?: MockFunctionOptions,
+ ): Mock<(value: MockedObject[MethodName]) => void>;
+ setter<
+ MockedObject extends object,
+ MethodName extends keyof MockedObject,
+ Implementation extends Function,
+ >(
+ object: MockedObject,
+ methodName: MethodName,
+ implementation?: Implementation,
+ options?: MockFunctionOptions,
+ ): Mock<((value: MockedObject[MethodName]) => void) | Implementation>;
+ /**
+ * This function restores the default behavior of all mocks that were previously
+ * created by this `MockTracker` and disassociates the mocks from the`MockTracker` instance. Once disassociated, the mocks can still be used, but the`MockTracker` instance can no longer be
+ * used to reset their behavior or
+ * otherwise interact with them.
+ *
+ * After each test completes, this function is called on the test context's`MockTracker`. If the global `MockTracker` is used extensively, calling this
+ * function manually is recommended.
+ * @since v19.1.0, v18.13.0
+ */
+ reset(): void;
+ /**
+ * This function restores the default behavior of all mocks that were previously
+ * created by this `MockTracker`. Unlike `mock.reset()`, `mock.restoreAll()` does
+ * not disassociate the mocks from the `MockTracker` instance.
+ * @since v19.1.0, v18.13.0
+ */
+ restoreAll(): void;
+ timers: MockTimers;
+ }
+ const mock: MockTracker;
+ interface MockFunctionCall<
+ F extends Function,
+ ReturnType = F extends (...args: any) => infer T
+ ? T
+ : F extends abstract new (...args: any) => infer T
+ ? T
+ : unknown,
+ Args = F extends (...args: infer Y) => any
+ ? Y
+ : F extends abstract new (...args: infer Y) => any
+ ? Y
+ : unknown[],
+ > {
+ /**
+ * An array of the arguments passed to the mock function.
+ */
+ arguments: Args;
+ /**
+ * If the mocked function threw then this property contains the thrown value.
+ */
+ error: unknown | undefined;
+ /**
+ * The value returned by the mocked function.
+ *
+ * If the mocked function threw, it will be `undefined`.
+ */
+ result: ReturnType | undefined;
+ /**
+ * An `Error` object whose stack can be used to determine the callsite of the mocked function invocation.
+ */
+ stack: Error;
+ /**
+ * If the mocked function is a constructor, this field contains the class being constructed.
+ * Otherwise this will be `undefined`.
+ */
+ target: F extends abstract new (...args: any) => any ? F : undefined;
+ /**
+ * The mocked function's `this` value.
+ */
+ this: unknown;
+ }
+ /**
+ * The `MockFunctionContext` class is used to inspect or manipulate the behavior of
+ * mocks created via the `MockTracker` APIs.
+ * @since v19.1.0, v18.13.0
+ */
+ class MockFunctionContext<F extends Function> {
+ /**
+ * A getter that returns a copy of the internal array used to track calls to the
+ * mock. Each entry in the array is an object with the following properties.
+ * @since v19.1.0, v18.13.0
+ */
+ readonly calls: Array<MockFunctionCall<F>>;
+ /**
+ * This function returns the number of times that this mock has been invoked. This
+ * function is more efficient than checking `ctx.calls.length` because `ctx.calls`is a getter that creates a copy of the internal call tracking array.
+ * @since v19.1.0, v18.13.0
+ * @return The number of times that this mock has been invoked.
+ */
+ callCount(): number;
+ /**
+ * This function is used to change the behavior of an existing mock.
+ *
+ * The following example creates a mock function using `t.mock.fn()`, calls the
+ * mock function, and then changes the mock implementation to a different function.
+ *
+ * ```js
+ * test('changes a mock behavior', (t) => {
+ * let cnt = 0;
+ *
+ * function addOne() {
+ * cnt++;
+ * return cnt;
+ * }
+ *
+ * function addTwo() {
+ * cnt += 2;
+ * return cnt;
+ * }
+ *
+ * const fn = t.mock.fn(addOne);
+ *
+ * assert.strictEqual(fn(), 1);
+ * fn.mock.mockImplementation(addTwo);
+ * assert.strictEqual(fn(), 3);
+ * assert.strictEqual(fn(), 5);
+ * });
+ * ```
+ * @since v19.1.0, v18.13.0
+ * @param implementation The function to be used as the mock's new implementation.
+ */
+ mockImplementation(implementation: Function): void;
+ /**
+ * This function is used to change the behavior of an existing mock for a single
+ * invocation. Once invocation `onCall` has occurred, the mock will revert to
+ * whatever behavior it would have used had `mockImplementationOnce()` not been
+ * called.
+ *
+ * The following example creates a mock function using `t.mock.fn()`, calls the
+ * mock function, changes the mock implementation to a different function for the
+ * next invocation, and then resumes its previous behavior.
+ *
+ * ```js
+ * test('changes a mock behavior once', (t) => {
+ * let cnt = 0;
+ *
+ * function addOne() {
+ * cnt++;
+ * return cnt;
+ * }
+ *
+ * function addTwo() {
+ * cnt += 2;
+ * return cnt;
+ * }
+ *
+ * const fn = t.mock.fn(addOne);
+ *
+ * assert.strictEqual(fn(), 1);
+ * fn.mock.mockImplementationOnce(addTwo);
+ * assert.strictEqual(fn(), 3);
+ * assert.strictEqual(fn(), 4);
+ * });
+ * ```
+ * @since v19.1.0, v18.13.0
+ * @param implementation The function to be used as the mock's implementation for the invocation number specified by `onCall`.
+ * @param onCall The invocation number that will use `implementation`. If the specified invocation has already occurred then an exception is thrown.
+ */
+ mockImplementationOnce(implementation: Function, onCall?: number): void;
+ /**
+ * Resets the call history of the mock function.
+ * @since v19.3.0, v18.13.0
+ */
+ resetCalls(): void;
+ /**
+ * Resets the implementation of the mock function to its original behavior. The
+ * mock can still be used after calling this function.
+ * @since v19.1.0, v18.13.0
+ */
+ restore(): void;
+ }
+ type Timer = 'setInterval' | 'clearInterval' | 'setTimeout' | 'clearTimeout';
+ /**
+ * Mocking timers is a technique commonly used in software testing to simulate and
+ * control the behavior of timers, such as `setInterval` and `setTimeout`,
+ * without actually waiting for the specified time intervals.
+ *
+ * The `MockTracker` provides a top-level `timers` export
+ * which is a `MockTimers` instance.
+ * @since v20.4.0
+ * @experimental
+ */
+ class MockTimers {
+ /**
+ * Enables timer mocking for the specified timers.
+ *
+ * **Note:** When you enable mocking for a specific timer, its associated
+ * clear function will also be implicitly mocked.
+ *
+ * Example usage:
+ *
+ * ```js
+ * import { mock } from 'node:test';
+ * mock.timers.enable(['setInterval']);
+ * ```
+ *
+ * ```js
+ * const { mock } = require('node:test');
+ * mock.timers.enable(['setInterval']);
+ * ```
+ *
+ * The above example enables mocking for the `setInterval` timer and
+ * implicitly mocks the `clearInterval` function. Only the `setInterval`and `clearInterval` functions from `node:timers`,`node:timers/promises`, and`globalThis` will be mocked.
+ *
+ * Alternatively, if you call `mock.timers.enable()` without any parameters:
+ *
+ * All timers (`'setInterval'`, `'clearInterval'`, `'setTimeout'`, and `'clearTimeout'`)
+ * will be mocked. The `setInterval`, `clearInterval`, `setTimeout`, and `clearTimeout`functions from `node:timers`, `node:timers/promises`,
+ * and `globalThis` will be mocked.
+ * @since v20.4.0
+ */
+ enable(timers?: Timer[]): void;
+ /**
+ * This function restores the default behavior of all mocks that were previously
+ * created by this `MockTimers` instance and disassociates the mocks
+ * from the `MockTracker` instance.
+ *
+ * **Note:** After each test completes, this function is called on
+ * the test context's `MockTracker`.
+ *
+ * ```js
+ * import { mock } from 'node:test';
+ * mock.timers.reset();
+ * ```
+ *
+ * ```js
+ * const { mock } = require('node:test');
+ * mock.timers.reset();
+ * ```
+ * @since v20.4.0
+ */
+ reset(): void;
+ /**
+ * Advances time for all mocked timers.
+ *
+ * **Note:** This diverges from how `setTimeout` in Node.js behaves and accepts
+ * only positive numbers. In Node.js, `setTimeout` with negative numbers is
+ * only supported for web compatibility reasons.
+ *
+ * The following example mocks a `setTimeout` function and
+ * by using `.tick` advances in
+ * time triggering all pending timers.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ * import { test } from 'node:test';
+ *
+ * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => {
+ * const fn = context.mock.fn();
+ *
+ * context.mock.timers.enable(['setTimeout']);
+ *
+ * setTimeout(fn, 9999);
+ *
+ * assert.strictEqual(fn.mock.callCount(), 0);
+ *
+ * // Advance in time
+ * context.mock.timers.tick(9999);
+ *
+ * assert.strictEqual(fn.mock.callCount(), 1);
+ * });
+ * ```
+ *
+ * ```js
+ * const assert = require('node:assert');
+ * const { test } = require('node:test');
+ *
+ * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => {
+ * const fn = context.mock.fn();
+ * context.mock.timers.enable(['setTimeout']);
+ *
+ * setTimeout(fn, 9999);
+ * assert.strictEqual(fn.mock.callCount(), 0);
+ *
+ * // Advance in time
+ * context.mock.timers.tick(9999);
+ *
+ * assert.strictEqual(fn.mock.callCount(), 1);
+ * });
+ * ```
+ *
+ * Alternativelly, the `.tick` function can be called many times
+ *
+ * ```js
+ * import assert from 'node:assert';
+ * import { test } from 'node:test';
+ *
+ * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => {
+ * const fn = context.mock.fn();
+ * context.mock.timers.enable(['setTimeout']);
+ * const nineSecs = 9000;
+ * setTimeout(fn, nineSecs);
+ *
+ * const twoSeconds = 3000;
+ * context.mock.timers.tick(twoSeconds);
+ * context.mock.timers.tick(twoSeconds);
+ * context.mock.timers.tick(twoSeconds);
+ *
+ * assert.strictEqual(fn.mock.callCount(), 1);
+ * });
+ * ```
+ *
+ * ```js
+ * const assert = require('node:assert');
+ * const { test } = require('node:test');
+ *
+ * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => {
+ * const fn = context.mock.fn();
+ * context.mock.timers.enable(['setTimeout']);
+ * const nineSecs = 9000;
+ * setTimeout(fn, nineSecs);
+ *
+ * const twoSeconds = 3000;
+ * context.mock.timers.tick(twoSeconds);
+ * context.mock.timers.tick(twoSeconds);
+ * context.mock.timers.tick(twoSeconds);
+ *
+ * assert.strictEqual(fn.mock.callCount(), 1);
+ * });
+ * ```
+ * @since v20.4.0
+ */
+ tick(milliseconds: number): void;
+ /**
+ * Triggers all pending mocked timers immediately.
+ *
+ * The example below triggers all pending timers immediately,
+ * causing them to execute without any delay.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ * import { test } from 'node:test';
+ *
+ * test('runAll functions following the given order', (context) => {
+ * context.mock.timers.enable(['setTimeout']);
+ * const results = [];
+ * setTimeout(() => results.push(1), 9999);
+ *
+ * // Notice that if both timers have the same timeout,
+ * // the order of execution is guaranteed
+ * setTimeout(() => results.push(3), 8888);
+ * setTimeout(() => results.push(2), 8888);
+ *
+ * assert.deepStrictEqual(results, []);
+ *
+ * context.mock.timers.runAll();
+ *
+ * assert.deepStrictEqual(results, [3, 2, 1]);
+ * });
+ * ```
+ *
+ * ```js
+ * const assert = require('node:assert');
+ * const { test } = require('node:test');
+ *
+ * test('runAll functions following the given order', (context) => {
+ * context.mock.timers.enable(['setTimeout']);
+ * const results = [];
+ * setTimeout(() => results.push(1), 9999);
+ *
+ * // Notice that if both timers have the same timeout,
+ * // the order of execution is guaranteed
+ * setTimeout(() => results.push(3), 8888);
+ * setTimeout(() => results.push(2), 8888);
+ *
+ * assert.deepStrictEqual(results, []);
+ *
+ * context.mock.timers.runAll();
+ *
+ * assert.deepStrictEqual(results, [3, 2, 1]);
+ * });
+ * ```
+ *
+ * **Note:** The `runAll()` function is specifically designed for
+ * triggering timers in the context of timer mocking.
+ * It does not have any effect on real-time system
+ * clocks or actual timers outside of the mocking environment.
+ * @since v20.4.0
+ */
+ runAll(): void;
+ /**
+ * Calls {@link MockTimers.reset()}.
+ */
+ [Symbol.dispose](): void;
+ }
+ export { test as default, run, test, describe, it, before, after, beforeEach, afterEach, mock, skip, only, todo };
+}
+
+interface DiagnosticData {
+ /**
+ * The diagnostic message.
+ */
+ message: string;
+ /**
+ * The nesting level of the test.
+ */
+ nesting: number;
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+}
+interface TestFail {
+ /**
+ * Additional execution metadata.
+ */
+ details: {
+ /**
+ * The duration of the test in milliseconds.
+ */
+ duration_ms: number;
+ /**
+ * The error thrown by the test.
+ */
+ error: Error;
+ /**
+ * The type of the test, used to denote whether this is a suite.
+ * @since 20.0.0, 19.9.0, 18.17.0
+ */
+ type?: 'suite';
+ };
+ /**
+ * The test name.
+ */
+ name: string;
+ /**
+ * The nesting level of the test.
+ */
+ nesting: number;
+ /**
+ * The ordinal number of the test.
+ */
+ testNumber: number;
+ /**
+ * Present if `context.todo` is called.
+ */
+ todo?: string | boolean;
+ /**
+ * Present if `context.skip` is called.
+ */
+ skip?: string | boolean;
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+}
+interface TestPass {
+ /**
+ * Additional execution metadata.
+ */
+ details: {
+ /**
+ * The duration of the test in milliseconds.
+ */
+ duration_ms: number;
+ /**
+ * The type of the test, used to denote whether this is a suite.
+ * @since 20.0.0, 19.9.0, 18.17.0
+ */
+ type?: 'suite';
+ };
+ /**
+ * The test name.
+ */
+ name: string;
+ /**
+ * The nesting level of the test.
+ */
+ nesting: number;
+ /**
+ * The ordinal number of the test.
+ */
+ testNumber: number;
+ /**
+ * Present if `context.todo` is called.
+ */
+ todo?: string | boolean;
+ /**
+ * Present if `context.skip` is called.
+ */
+ skip?: string | boolean;
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+}
+interface TestPlan {
+ /**
+ * The nesting level of the test.
+ */
+ nesting: number;
+ /**
+ * The number of subtests that have ran.
+ */
+ count: number;
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+}
+interface TestStart {
+ /**
+ * The test name.
+ */
+ name: string;
+ /**
+ * The nesting level of the test.
+ */
+ nesting: number;
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+}
+interface TestStderr {
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+ /**
+ * The message written to `stderr`
+ */
+ message: string;
+}
+interface TestStdout {
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+ /**
+ * The message written to `stdout`
+ */
+ message: string;
+}
+interface TestEnqueue {
+ /**
+ * The test name
+ */
+ name: string;
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+ /**
+ * The nesting level of the test.
+ */
+ nesting: number;
+}
+interface TestDequeue {
+ /**
+ * The test name
+ */
+ name: string;
+ /**
+ * The path of the test file, undefined if test is not ran through a file.
+ */
+ file?: string;
+ /**
+ * The nesting level of the test.
+ */
+ nesting: number;
+}
+
+/**
+ * The `node:test/reporters` module exposes the builtin-reporters for `node:test`.
+ * To access it:
+ *
+ * ```js
+ * import test from 'node:test/reporters';
+ * ```
+ *
+ * This module is only available under the `node:` scheme. The following will not
+ * work:
+ *
+ * ```js
+ * import test from 'test/reporters';
+ * ```
+ * @since v19.9.0
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/test/reporters.js)
+ */
+declare module 'node:test/reporters' {
+ import { Transform } from 'node:stream';
+
+ type TestEvent =
+ | { type: 'test:diagnostic', data: DiagnosticData }
+ | { type: 'test:fail', data: TestFail }
+ | { type: 'test:pass', data: TestPass }
+ | { type: 'test:plan', data: TestPlan }
+ | { type: 'test:start', data: TestStart }
+ | { type: 'test:stderr', data: TestStderr }
+ | { type: 'test:stdout', data: TestStdout }
+ | { type: 'test:enqueue', data: TestEnqueue }
+ | { type: 'test:dequeue', data: TestDequeue }
+ | { type: 'test:watch:drained' };
+ type TestEventGenerator = AsyncGenerator<TestEvent, void>;
+
+ /**
+ * The `dot` reporter outputs the test results in a compact format,
+ * where each passing test is represented by a `.`,
+ * and each failing test is represented by a `X`.
+ */
+ function dot(source: TestEventGenerator): AsyncGenerator<'\n' | '.' | 'X', void>;
+ /**
+ * The `tap` reporter outputs the test results in the [TAP](https://testanything.org/) format.
+ */
+ function tap(source: TestEventGenerator): AsyncGenerator<string, void>;
+ /**
+ * The `spec` reporter outputs the test results in a human-readable format.
+ */
+ class Spec extends Transform {
+ constructor();
+ }
+ export { dot, tap, Spec as spec, TestEvent };
+}
diff --git a/node_modules/@types/node/ts4.8/timers.d.ts b/node_modules/@types/node/ts4.8/timers.d.ts
new file mode 100755
index 0000000..51acc4e
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/timers.d.ts
@@ -0,0 +1,225 @@
+/**
+ * The `timer` module exposes a global API for scheduling functions to
+ * be called at some future period of time. Because the timer functions are
+ * globals, there is no need to call `require('node:timers')` to use the API.
+ *
+ * The timer functions within Node.js implement a similar API as the timers API
+ * provided by Web Browsers but use a different internal implementation that is
+ * built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout).
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/timers.js)
+ */
+declare module 'timers' {
+ import { Abortable } from 'node:events';
+ import { setTimeout as setTimeoutPromise, setImmediate as setImmediatePromise, setInterval as setIntervalPromise } from 'node:timers/promises';
+ interface TimerOptions extends Abortable {
+ /**
+ * Set to `false` to indicate that the scheduled `Timeout`
+ * should not require the Node.js event loop to remain active.
+ * @default true
+ */
+ ref?: boolean | undefined;
+ }
+ let setTimeout: typeof global.setTimeout;
+ let clearTimeout: typeof global.clearTimeout;
+ let setInterval: typeof global.setInterval;
+ let clearInterval: typeof global.clearInterval;
+ let setImmediate: typeof global.setImmediate;
+ let clearImmediate: typeof global.clearImmediate;
+ global {
+ namespace NodeJS {
+ // compatibility with older typings
+ interface Timer extends RefCounted {
+ hasRef(): boolean;
+ refresh(): this;
+ [Symbol.toPrimitive](): number;
+ }
+ /**
+ * This object is created internally and is returned from `setImmediate()`. It
+ * can be passed to `clearImmediate()` in order to cancel the scheduled
+ * actions.
+ *
+ * By default, when an immediate is scheduled, the Node.js event loop will continue
+ * running as long as the immediate is active. The `Immediate` object returned by `setImmediate()` exports both `immediate.ref()` and `immediate.unref()`functions that can be used to
+ * control this default behavior.
+ */
+ class Immediate implements RefCounted {
+ /**
+ * When called, requests that the Node.js event loop _not_ exit so long as the`Immediate` is active. Calling `immediate.ref()` multiple times will have no
+ * effect.
+ *
+ * By default, all `Immediate` objects are "ref'ed", making it normally unnecessary
+ * to call `immediate.ref()` unless `immediate.unref()` had been called previously.
+ * @since v9.7.0
+ * @return a reference to `immediate`
+ */
+ ref(): this;
+ /**
+ * When called, the active `Immediate` object will not require the Node.js event
+ * loop to remain active. If there is no other activity keeping the event loop
+ * running, the process may exit before the `Immediate` object's callback is
+ * invoked. Calling `immediate.unref()` multiple times will have no effect.
+ * @since v9.7.0
+ * @return a reference to `immediate`
+ */
+ unref(): this;
+ /**
+ * If true, the `Immediate` object will keep the Node.js event loop active.
+ * @since v11.0.0
+ */
+ hasRef(): boolean;
+ _onImmediate: Function; // to distinguish it from the Timeout class
+ /**
+ * Cancels the immediate. This is similar to calling `clearImmediate()`.
+ * @since v20.5.0
+ */
+ [Symbol.dispose](): void;
+ }
+ /**
+ * This object is created internally and is returned from `setTimeout()` and `setInterval()`. It can be passed to either `clearTimeout()` or `clearInterval()` in order to cancel the
+ * scheduled actions.
+ *
+ * By default, when a timer is scheduled using either `setTimeout()` or `setInterval()`, the Node.js event loop will continue running as long as the
+ * timer is active. Each of the `Timeout` objects returned by these functions
+ * export both `timeout.ref()` and `timeout.unref()` functions that can be used to
+ * control this default behavior.
+ */
+ class Timeout implements Timer {
+ /**
+ * When called, requests that the Node.js event loop _not_ exit so long as the`Timeout` is active. Calling `timeout.ref()` multiple times will have no effect.
+ *
+ * By default, all `Timeout` objects are "ref'ed", making it normally unnecessary
+ * to call `timeout.ref()` unless `timeout.unref()` had been called previously.
+ * @since v0.9.1
+ * @return a reference to `timeout`
+ */
+ ref(): this;
+ /**
+ * When called, the active `Timeout` object will not require the Node.js event loop
+ * to remain active. If there is no other activity keeping the event loop running,
+ * the process may exit before the `Timeout` object's callback is invoked. Calling`timeout.unref()` multiple times will have no effect.
+ * @since v0.9.1
+ * @return a reference to `timeout`
+ */
+ unref(): this;
+ /**
+ * If true, the `Timeout` object will keep the Node.js event loop active.
+ * @since v11.0.0
+ */
+ hasRef(): boolean;
+ /**
+ * Sets the timer's start time to the current time, and reschedules the timer to
+ * call its callback at the previously specified duration adjusted to the current
+ * time. This is useful for refreshing a timer without allocating a new
+ * JavaScript object.
+ *
+ * Using this on a timer that has already called its callback will reactivate the
+ * timer.
+ * @since v10.2.0
+ * @return a reference to `timeout`
+ */
+ refresh(): this;
+ [Symbol.toPrimitive](): number;
+ /**
+ * Cancels the timeout.
+ * @since v20.5.0
+ */
+ [Symbol.dispose](): void;
+ }
+ }
+ /**
+ * Schedules execution of a one-time `callback` after `delay` milliseconds.
+ *
+ * The `callback` will likely not be invoked in precisely `delay` milliseconds.
+ * Node.js makes no guarantees about the exact timing of when callbacks will fire,
+ * nor of their ordering. The callback will be called as close as possible to the
+ * time specified.
+ *
+ * When `delay` is larger than `2147483647` or less than `1`, the `delay`will be set to `1`. Non-integer delays are truncated to an integer.
+ *
+ * If `callback` is not a function, a `TypeError` will be thrown.
+ *
+ * This method has a custom variant for promises that is available using `timersPromises.setTimeout()`.
+ * @since v0.0.1
+ * @param callback The function to call when the timer elapses.
+ * @param [delay=1] The number of milliseconds to wait before calling the `callback`.
+ * @param args Optional arguments to pass when the `callback` is called.
+ * @return for use with {@link clearTimeout}
+ */
+ function setTimeout<TArgs extends any[]>(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timeout;
+ // util.promisify no rest args compability
+ // tslint:disable-next-line void-return
+ function setTimeout(callback: (args: void) => void, ms?: number): NodeJS.Timeout;
+ namespace setTimeout {
+ const __promisify__: typeof setTimeoutPromise;
+ }
+ /**
+ * Cancels a `Timeout` object created by `setTimeout()`.
+ * @since v0.0.1
+ * @param timeout A `Timeout` object as returned by {@link setTimeout} or the `primitive` of the `Timeout` object as a string or a number.
+ */
+ function clearTimeout(timeoutId: NodeJS.Timeout | string | number | undefined): void;
+ /**
+ * Schedules repeated execution of `callback` every `delay` milliseconds.
+ *
+ * When `delay` is larger than `2147483647` or less than `1`, the `delay` will be
+ * set to `1`. Non-integer delays are truncated to an integer.
+ *
+ * If `callback` is not a function, a `TypeError` will be thrown.
+ *
+ * This method has a custom variant for promises that is available using `timersPromises.setInterval()`.
+ * @since v0.0.1
+ * @param callback The function to call when the timer elapses.
+ * @param [delay=1] The number of milliseconds to wait before calling the `callback`.
+ * @param args Optional arguments to pass when the `callback` is called.
+ * @return for use with {@link clearInterval}
+ */
+ function setInterval<TArgs extends any[]>(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timeout;
+ // util.promisify no rest args compability
+ // tslint:disable-next-line void-return
+ function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timeout;
+ namespace setInterval {
+ const __promisify__: typeof setIntervalPromise;
+ }
+ /**
+ * Cancels a `Timeout` object created by `setInterval()`.
+ * @since v0.0.1
+ * @param timeout A `Timeout` object as returned by {@link setInterval} or the `primitive` of the `Timeout` object as a string or a number.
+ */
+ function clearInterval(intervalId: NodeJS.Timeout | string | number | undefined): void;
+ /**
+ * Schedules the "immediate" execution of the `callback` after I/O events'
+ * callbacks.
+ *
+ * When multiple calls to `setImmediate()` are made, the `callback` functions are
+ * queued for execution in the order in which they are created. The entire callback
+ * queue is processed every event loop iteration. If an immediate timer is queued
+ * from inside an executing callback, that timer will not be triggered until the
+ * next event loop iteration.
+ *
+ * If `callback` is not a function, a `TypeError` will be thrown.
+ *
+ * This method has a custom variant for promises that is available using `timersPromises.setImmediate()`.
+ * @since v0.9.1
+ * @param callback The function to call at the end of this turn of the Node.js `Event Loop`
+ * @param args Optional arguments to pass when the `callback` is called.
+ * @return for use with {@link clearImmediate}
+ */
+ function setImmediate<TArgs extends any[]>(callback: (...args: TArgs) => void, ...args: TArgs): NodeJS.Immediate;
+ // util.promisify no rest args compability
+ // tslint:disable-next-line void-return
+ function setImmediate(callback: (args: void) => void): NodeJS.Immediate;
+ namespace setImmediate {
+ const __promisify__: typeof setImmediatePromise;
+ }
+ /**
+ * Cancels an `Immediate` object created by `setImmediate()`.
+ * @since v0.9.1
+ * @param immediate An `Immediate` object as returned by {@link setImmediate}.
+ */
+ function clearImmediate(immediateId: NodeJS.Immediate | undefined): void;
+ function queueMicrotask(callback: () => void): void;
+ }
+}
+declare module 'node:timers' {
+ export * from 'timers';
+}
diff --git a/node_modules/@types/node/ts4.8/timers/promises.d.ts b/node_modules/@types/node/ts4.8/timers/promises.d.ts
new file mode 100755
index 0000000..299a355
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/timers/promises.d.ts
@@ -0,0 +1,93 @@
+/**
+ * The `timers/promises` API provides an alternative set of timer functions
+ * that return `Promise` objects. The API is accessible via`require('node:timers/promises')`.
+ *
+ * ```js
+ * import {
+ * setTimeout,
+ * setImmediate,
+ * setInterval,
+ * } from 'timers/promises';
+ * ```
+ * @since v15.0.0
+ */
+declare module 'timers/promises' {
+ import { TimerOptions } from 'node:timers';
+ /**
+ * ```js
+ * import {
+ * setTimeout,
+ * } from 'timers/promises';
+ *
+ * const res = await setTimeout(100, 'result');
+ *
+ * console.log(res); // Prints 'result'
+ * ```
+ * @since v15.0.0
+ * @param [delay=1] The number of milliseconds to wait before fulfilling the promise.
+ * @param value A value with which the promise is fulfilled.
+ */
+ function setTimeout<T = void>(delay?: number, value?: T, options?: TimerOptions): Promise<T>;
+ /**
+ * ```js
+ * import {
+ * setImmediate,
+ * } from 'timers/promises';
+ *
+ * const res = await setImmediate('result');
+ *
+ * console.log(res); // Prints 'result'
+ * ```
+ * @since v15.0.0
+ * @param value A value with which the promise is fulfilled.
+ */
+ function setImmediate<T = void>(value?: T, options?: TimerOptions): Promise<T>;
+ /**
+ * Returns an async iterator that generates values in an interval of `delay` ms.
+ * If `ref` is `true`, you need to call `next()` of async iterator explicitly
+ * or implicitly to keep the event loop alive.
+ *
+ * ```js
+ * import {
+ * setInterval,
+ * } from 'timers/promises';
+ *
+ * const interval = 100;
+ * for await (const startTime of setInterval(interval, Date.now())) {
+ * const now = Date.now();
+ * console.log(now);
+ * if ((now - startTime) > 1000)
+ * break;
+ * }
+ * console.log(Date.now());
+ * ```
+ * @since v15.9.0
+ */
+ function setInterval<T = void>(delay?: number, value?: T, options?: TimerOptions): AsyncIterable<T>;
+ interface Scheduler {
+ /**
+ * ```js
+ * import { scheduler } from 'node:timers/promises';
+ *
+ * await scheduler.wait(1000); // Wait one second before continuing
+ * ```
+ * An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API.
+ * Calling timersPromises.scheduler.wait(delay, options) is roughly equivalent to calling timersPromises.setTimeout(delay, undefined, options) except that the ref option is not supported.
+ * @since v16.14.0
+ * @experimental
+ * @param [delay=1] The number of milliseconds to wait before fulfilling the promise.
+ */
+ wait: (delay?: number, options?: TimerOptions) => Promise<void>;
+ /**
+ * An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API.
+ * Calling timersPromises.scheduler.yield() is equivalent to calling timersPromises.setImmediate() with no arguments.
+ * @since v16.14.0
+ * @experimental
+ */
+ yield: () => Promise<void>;
+ }
+ const scheduler: Scheduler;
+}
+declare module 'node:timers/promises' {
+ export * from 'timers/promises';
+}
diff --git a/node_modules/@types/node/ts4.8/tls.d.ts b/node_modules/@types/node/ts4.8/tls.d.ts
new file mode 100755
index 0000000..4992b24
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/tls.d.ts
@@ -0,0 +1,1130 @@
+/**
+ * The `node:tls` module provides an implementation of the Transport Layer Security
+ * (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL.
+ * The module can be accessed using:
+ *
+ * ```js
+ * const tls = require('node:tls');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/tls.js)
+ */
+declare module 'tls' {
+ import { X509Certificate } from 'node:crypto';
+ import * as net from 'node:net';
+ import * as stream from 'stream';
+ const CLIENT_RENEG_LIMIT: number;
+ const CLIENT_RENEG_WINDOW: number;
+ interface Certificate {
+ /**
+ * Country code.
+ */
+ C: string;
+ /**
+ * Street.
+ */
+ ST: string;
+ /**
+ * Locality.
+ */
+ L: string;
+ /**
+ * Organization.
+ */
+ O: string;
+ /**
+ * Organizational unit.
+ */
+ OU: string;
+ /**
+ * Common name.
+ */
+ CN: string;
+ }
+ interface PeerCertificate {
+ /**
+ * `true` if a Certificate Authority (CA), `false` otherwise.
+ * @since v18.13.0
+ */
+ ca: boolean;
+ /**
+ * The DER encoded X.509 certificate data.
+ */
+ raw: Buffer;
+ /**
+ * The certificate subject.
+ */
+ subject: Certificate;
+ /**
+ * The certificate issuer, described in the same terms as the `subject`.
+ */
+ issuer: Certificate;
+ /**
+ * The date-time the certificate is valid from.
+ */
+ valid_from: string;
+ /**
+ * The date-time the certificate is valid to.
+ */
+ valid_to: string;
+ /**
+ * The certificate serial number, as a hex string.
+ */
+ serialNumber: string;
+ /**
+ * The SHA-1 digest of the DER encoded certificate.
+ * It is returned as a `:` separated hexadecimal string.
+ */
+ fingerprint: string;
+ /**
+ * The SHA-256 digest of the DER encoded certificate.
+ * It is returned as a `:` separated hexadecimal string.
+ */
+ fingerprint256: string;
+ /**
+ * The SHA-512 digest of the DER encoded certificate.
+ * It is returned as a `:` separated hexadecimal string.
+ */
+ fingerprint512: string;
+ /**
+ * The extended key usage, a set of OIDs.
+ */
+ ext_key_usage?: string[];
+ /**
+ * A string containing concatenated names for the subject,
+ * an alternative to the `subject` names.
+ */
+ subjectaltname?: string;
+ /**
+ * An array describing the AuthorityInfoAccess, used with OCSP.
+ */
+ infoAccess?: NodeJS.Dict<string[]>;
+ /**
+ * For RSA keys: The RSA bit size.
+ *
+ * For EC keys: The key size in bits.
+ */
+ bits?: number;
+ /**
+ * The RSA exponent, as a string in hexadecimal number notation.
+ */
+ exponent?: string;
+ /**
+ * The RSA modulus, as a hexadecimal string.
+ */
+ modulus?: string;
+ /**
+ * The public key.
+ */
+ pubkey?: Buffer;
+ /**
+ * The ASN.1 name of the OID of the elliptic curve.
+ * Well-known curves are identified by an OID.
+ * While it is unusual, it is possible that the curve
+ * is identified by its mathematical properties,
+ * in which case it will not have an OID.
+ */
+ asn1Curve?: string;
+ /**
+ * The NIST name for the elliptic curve,if it has one
+ * (not all well-known curves have been assigned names by NIST).
+ */
+ nistCurve?: string;
+ }
+ interface DetailedPeerCertificate extends PeerCertificate {
+ /**
+ * The issuer certificate object.
+ * For self-signed certificates, this may be a circular reference.
+ */
+ issuerCertificate: DetailedPeerCertificate;
+ }
+ interface CipherNameAndProtocol {
+ /**
+ * The cipher name.
+ */
+ name: string;
+ /**
+ * SSL/TLS protocol version.
+ */
+ version: string;
+ /**
+ * IETF name for the cipher suite.
+ */
+ standardName: string;
+ }
+ interface EphemeralKeyInfo {
+ /**
+ * The supported types are 'DH' and 'ECDH'.
+ */
+ type: string;
+ /**
+ * The name property is available only when type is 'ECDH'.
+ */
+ name?: string | undefined;
+ /**
+ * The size of parameter of an ephemeral key exchange.
+ */
+ size: number;
+ }
+ interface KeyObject {
+ /**
+ * Private keys in PEM format.
+ */
+ pem: string | Buffer;
+ /**
+ * Optional passphrase.
+ */
+ passphrase?: string | undefined;
+ }
+ interface PxfObject {
+ /**
+ * PFX or PKCS12 encoded private key and certificate chain.
+ */
+ buf: string | Buffer;
+ /**
+ * Optional passphrase.
+ */
+ passphrase?: string | undefined;
+ }
+ interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions {
+ /**
+ * If true the TLS socket will be instantiated in server-mode.
+ * Defaults to false.
+ */
+ isServer?: boolean | undefined;
+ /**
+ * An optional net.Server instance.
+ */
+ server?: net.Server | undefined;
+ /**
+ * An optional Buffer instance containing a TLS session.
+ */
+ session?: Buffer | undefined;
+ /**
+ * If true, specifies that the OCSP status request extension will be
+ * added to the client hello and an 'OCSPResponse' event will be
+ * emitted on the socket before establishing a secure communication
+ */
+ requestOCSP?: boolean | undefined;
+ }
+ /**
+ * Performs transparent encryption of written data and all required TLS
+ * negotiation.
+ *
+ * Instances of `tls.TLSSocket` implement the duplex `Stream` interface.
+ *
+ * Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate}) will only return data while the
+ * connection is open.
+ * @since v0.11.4
+ */
+ class TLSSocket extends net.Socket {
+ /**
+ * Construct a new tls.TLSSocket object from an existing TCP socket.
+ */
+ constructor(socket: net.Socket, options?: TLSSocketOptions);
+ /**
+ * This property is `true` if the peer certificate was signed by one of the CAs
+ * specified when creating the `tls.TLSSocket` instance, otherwise `false`.
+ * @since v0.11.4
+ */
+ authorized: boolean;
+ /**
+ * Returns the reason why the peer's certificate was not been verified. This
+ * property is set only when `tlsSocket.authorized === false`.
+ * @since v0.11.4
+ */
+ authorizationError: Error;
+ /**
+ * Always returns `true`. This may be used to distinguish TLS sockets from regular`net.Socket` instances.
+ * @since v0.11.4
+ */
+ encrypted: true;
+ /**
+ * String containing the selected ALPN protocol.
+ * Before a handshake has completed, this value is always null.
+ * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false.
+ */
+ alpnProtocol: string | false | null;
+ /**
+ * Returns an object representing the local certificate. The returned object has
+ * some properties corresponding to the fields of the certificate.
+ *
+ * See {@link TLSSocket.getPeerCertificate} for an example of the certificate
+ * structure.
+ *
+ * If there is no local certificate, an empty object will be returned. If the
+ * socket has been destroyed, `null` will be returned.
+ * @since v11.2.0
+ */
+ getCertificate(): PeerCertificate | object | null;
+ /**
+ * Returns an object containing information on the negotiated cipher suite.
+ *
+ * For example, a TLSv1.2 protocol with AES256-SHA cipher:
+ *
+ * ```json
+ * {
+ * "name": "AES256-SHA",
+ * "standardName": "TLS_RSA_WITH_AES_256_CBC_SHA",
+ * "version": "SSLv3"
+ * }
+ * ```
+ *
+ * See [SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html) for more information.
+ * @since v0.11.4
+ */
+ getCipher(): CipherNameAndProtocol;
+ /**
+ * Returns an object representing the type, name, and size of parameter of
+ * an ephemeral key exchange in `perfect forward secrecy` on a client
+ * connection. It returns an empty object when the key exchange is not
+ * ephemeral. As this is only supported on a client socket; `null` is returned
+ * if called on a server socket. The supported types are `'DH'` and `'ECDH'`. The`name` property is available only when type is `'ECDH'`.
+ *
+ * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`.
+ * @since v5.0.0
+ */
+ getEphemeralKeyInfo(): EphemeralKeyInfo | object | null;
+ /**
+ * As the `Finished` messages are message digests of the complete handshake
+ * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can
+ * be used for external authentication procedures when the authentication
+ * provided by SSL/TLS is not desired or is not enough.
+ *
+ * Corresponds to the `SSL_get_finished` routine in OpenSSL and may be used
+ * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929).
+ * @since v9.9.0
+ * @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet.
+ */
+ getFinished(): Buffer | undefined;
+ /**
+ * Returns an object representing the peer's certificate. If the peer does not
+ * provide a certificate, an empty object will be returned. If the socket has been
+ * destroyed, `null` will be returned.
+ *
+ * If the full certificate chain was requested, each certificate will include an`issuerCertificate` property containing an object representing its issuer's
+ * certificate.
+ * @since v0.11.4
+ * @param detailed Include the full certificate chain if `true`, otherwise include just the peer's certificate.
+ * @return A certificate object.
+ */
+ getPeerCertificate(detailed: true): DetailedPeerCertificate;
+ getPeerCertificate(detailed?: false): PeerCertificate;
+ getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate;
+ /**
+ * As the `Finished` messages are message digests of the complete handshake
+ * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can
+ * be used for external authentication procedures when the authentication
+ * provided by SSL/TLS is not desired or is not enough.
+ *
+ * Corresponds to the `SSL_get_peer_finished` routine in OpenSSL and may be used
+ * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929).
+ * @since v9.9.0
+ * @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so
+ * far.
+ */
+ getPeerFinished(): Buffer | undefined;
+ /**
+ * Returns a string containing the negotiated SSL/TLS protocol version of the
+ * current connection. The value `'unknown'` will be returned for connected
+ * sockets that have not completed the handshaking process. The value `null` will
+ * be returned for server sockets or disconnected client sockets.
+ *
+ * Protocol versions are:
+ *
+ * * `'SSLv3'`
+ * * `'TLSv1'`
+ * * `'TLSv1.1'`
+ * * `'TLSv1.2'`
+ * * `'TLSv1.3'`
+ *
+ * See the OpenSSL [`SSL_get_version`](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html) documentation for more information.
+ * @since v5.7.0
+ */
+ getProtocol(): string | null;
+ /**
+ * Returns the TLS session data or `undefined` if no session was
+ * negotiated. On the client, the data can be provided to the `session` option of {@link connect} to resume the connection. On the server, it may be useful
+ * for debugging.
+ *
+ * See `Session Resumption` for more information.
+ *
+ * Note: `getSession()` works only for TLSv1.2 and below. For TLSv1.3, applications
+ * must use the `'session'` event (it also works for TLSv1.2 and below).
+ * @since v0.11.4
+ */
+ getSession(): Buffer | undefined;
+ /**
+ * See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information.
+ * @since v12.11.0
+ * @return List of signature algorithms shared between the server and the client in the order of decreasing preference.
+ */
+ getSharedSigalgs(): string[];
+ /**
+ * For a client, returns the TLS session ticket if one is available, or`undefined`. For a server, always returns `undefined`.
+ *
+ * It may be useful for debugging.
+ *
+ * See `Session Resumption` for more information.
+ * @since v0.11.4
+ */
+ getTLSTicket(): Buffer | undefined;
+ /**
+ * See `Session Resumption` for more information.
+ * @since v0.5.6
+ * @return `true` if the session was reused, `false` otherwise.
+ */
+ isSessionReused(): boolean;
+ /**
+ * The `tlsSocket.renegotiate()` method initiates a TLS renegotiation process.
+ * Upon completion, the `callback` function will be passed a single argument
+ * that is either an `Error` (if the request failed) or `null`.
+ *
+ * This method can be used to request a peer's certificate after the secure
+ * connection has been established.
+ *
+ * When running as the server, the socket will be destroyed with an error after`handshakeTimeout` timeout.
+ *
+ * For TLSv1.3, renegotiation cannot be initiated, it is not supported by the
+ * protocol.
+ * @since v0.11.8
+ * @param callback If `renegotiate()` returned `true`, callback is attached once to the `'secure'` event. If `renegotiate()` returned `false`, `callback` will be called in the next tick with
+ * an error, unless the `tlsSocket` has been destroyed, in which case `callback` will not be called at all.
+ * @return `true` if renegotiation was initiated, `false` otherwise.
+ */
+ renegotiate(
+ options: {
+ rejectUnauthorized?: boolean | undefined;
+ requestCert?: boolean | undefined;
+ },
+ callback: (err: Error | null) => void
+ ): undefined | boolean;
+ /**
+ * The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size.
+ * Returns `true` if setting the limit succeeded; `false` otherwise.
+ *
+ * Smaller fragment sizes decrease the buffering latency on the client: larger
+ * fragments are buffered by the TLS layer until the entire fragment is received
+ * and its integrity is verified; large fragments can span multiple roundtrips
+ * and their processing can be delayed due to packet loss or reordering. However,
+ * smaller fragments add extra TLS framing bytes and CPU overhead, which may
+ * decrease overall server throughput.
+ * @since v0.11.11
+ * @param [size=16384] The maximum TLS fragment size. The maximum value is `16384`.
+ */
+ setMaxSendFragment(size: number): boolean;
+ /**
+ * Disables TLS renegotiation for this `TLSSocket` instance. Once called, attempts
+ * to renegotiate will trigger an `'error'` event on the `TLSSocket`.
+ * @since v8.4.0
+ */
+ disableRenegotiation(): void;
+ /**
+ * When enabled, TLS packet trace information is written to `stderr`. This can be
+ * used to debug TLS connection problems.
+ *
+ * The format of the output is identical to the output of`openssl s_client -trace` or `openssl s_server -trace`. While it is produced by
+ * OpenSSL's `SSL_trace()` function, the format is undocumented, can change
+ * without notice, and should not be relied on.
+ * @since v12.2.0
+ */
+ enableTrace(): void;
+ /**
+ * Returns the peer certificate as an `X509Certificate` object.
+ *
+ * If there is no peer certificate, or the socket has been destroyed,`undefined` will be returned.
+ * @since v15.9.0
+ */
+ getPeerX509Certificate(): X509Certificate | undefined;
+ /**
+ * Returns the local certificate as an `X509Certificate` object.
+ *
+ * If there is no local certificate, or the socket has been destroyed,`undefined` will be returned.
+ * @since v15.9.0
+ */
+ getX509Certificate(): X509Certificate | undefined;
+ /**
+ * Keying material is used for validations to prevent different kind of attacks in
+ * network protocols, for example in the specifications of IEEE 802.1X.
+ *
+ * Example
+ *
+ * ```js
+ * const keyingMaterial = tlsSocket.exportKeyingMaterial(
+ * 128,
+ * 'client finished');
+ *
+ * /*
+ * Example return value of keyingMaterial:
+ * <Buffer 76 26 af 99 c5 56 8e 42 09 91 ef 9f 93 cb ad 6c 7b 65 f8 53 f1 d8 d9
+ * 12 5a 33 b8 b5 25 df 7b 37 9f e0 e2 4f b8 67 83 a3 2f cd 5d 41 42 4c 91
+ * 74 ef 2c ... 78 more bytes>
+ *
+ * ```
+ *
+ * See the OpenSSL [`SSL_export_keying_material`](https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html) documentation for more
+ * information.
+ * @since v13.10.0, v12.17.0
+ * @param length number of bytes to retrieve from keying material
+ * @param label an application specific label, typically this will be a value from the [IANA Exporter Label
+ * Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels).
+ * @param context Optionally provide a context.
+ * @return requested bytes of the keying material
+ */
+ exportKeyingMaterial(length: number, label: string, context: Buffer): Buffer;
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ addListener(event: 'secureConnect', listener: () => void): this;
+ addListener(event: 'session', listener: (session: Buffer) => void): this;
+ addListener(event: 'keylog', listener: (line: Buffer) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'OCSPResponse', response: Buffer): boolean;
+ emit(event: 'secureConnect'): boolean;
+ emit(event: 'session', session: Buffer): boolean;
+ emit(event: 'keylog', line: Buffer): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ on(event: 'secureConnect', listener: () => void): this;
+ on(event: 'session', listener: (session: Buffer) => void): this;
+ on(event: 'keylog', listener: (line: Buffer) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ once(event: 'secureConnect', listener: () => void): this;
+ once(event: 'session', listener: (session: Buffer) => void): this;
+ once(event: 'keylog', listener: (line: Buffer) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ prependListener(event: 'secureConnect', listener: () => void): this;
+ prependListener(event: 'session', listener: (session: Buffer) => void): this;
+ prependListener(event: 'keylog', listener: (line: Buffer) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ prependOnceListener(event: 'secureConnect', listener: () => void): this;
+ prependOnceListener(event: 'session', listener: (session: Buffer) => void): this;
+ prependOnceListener(event: 'keylog', listener: (line: Buffer) => void): this;
+ }
+ interface CommonConnectionOptions {
+ /**
+ * An optional TLS context object from tls.createSecureContext()
+ */
+ secureContext?: SecureContext | undefined;
+ /**
+ * When enabled, TLS packet trace information is written to `stderr`. This can be
+ * used to debug TLS connection problems.
+ * @default false
+ */
+ enableTrace?: boolean | undefined;
+ /**
+ * If true the server will request a certificate from clients that
+ * connect and attempt to verify that certificate. Defaults to
+ * false.
+ */
+ requestCert?: boolean | undefined;
+ /**
+ * An array of strings or a Buffer naming possible ALPN protocols.
+ * (Protocols should be ordered by their priority.)
+ */
+ ALPNProtocols?: string[] | Uint8Array[] | Uint8Array | undefined;
+ /**
+ * SNICallback(servername, cb) <Function> A function that will be
+ * called if the client supports SNI TLS extension. Two arguments
+ * will be passed when called: servername and cb. SNICallback should
+ * invoke cb(null, ctx), where ctx is a SecureContext instance.
+ * (tls.createSecureContext(...) can be used to get a proper
+ * SecureContext.) If SNICallback wasn't provided the default callback
+ * with high-level API will be used (see below).
+ */
+ SNICallback?: ((servername: string, cb: (err: Error | null, ctx?: SecureContext) => void) => void) | undefined;
+ /**
+ * If true the server will reject any connection which is not
+ * authorized with the list of supplied CAs. This option only has an
+ * effect if requestCert is true.
+ * @default true
+ */
+ rejectUnauthorized?: boolean | undefined;
+ }
+ interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts {
+ /**
+ * Abort the connection if the SSL/TLS handshake does not finish in the
+ * specified number of milliseconds. A 'tlsClientError' is emitted on
+ * the tls.Server object whenever a handshake times out. Default:
+ * 120000 (120 seconds).
+ */
+ handshakeTimeout?: number | undefined;
+ /**
+ * The number of seconds after which a TLS session created by the
+ * server will no longer be resumable. See Session Resumption for more
+ * information. Default: 300.
+ */
+ sessionTimeout?: number | undefined;
+ /**
+ * 48-bytes of cryptographically strong pseudo-random data.
+ */
+ ticketKeys?: Buffer | undefined;
+ /**
+ *
+ * @param socket
+ * @param identity identity parameter sent from the client.
+ * @return pre-shared key that must either be
+ * a buffer or `null` to stop the negotiation process. Returned PSK must be
+ * compatible with the selected cipher's digest.
+ *
+ * When negotiating TLS-PSK (pre-shared keys), this function is called
+ * with the identity provided by the client.
+ * If the return value is `null` the negotiation process will stop and an
+ * "unknown_psk_identity" alert message will be sent to the other party.
+ * If the server wishes to hide the fact that the PSK identity was not known,
+ * the callback must provide some random data as `psk` to make the connection
+ * fail with "decrypt_error" before negotiation is finished.
+ * PSK ciphers are disabled by default, and using TLS-PSK thus
+ * requires explicitly specifying a cipher suite with the `ciphers` option.
+ * More information can be found in the RFC 4279.
+ */
+ pskCallback?(socket: TLSSocket, identity: string): DataView | NodeJS.TypedArray | null;
+ /**
+ * hint to send to a client to help
+ * with selecting the identity during TLS-PSK negotiation. Will be ignored
+ * in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be
+ * emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code.
+ */
+ pskIdentityHint?: string | undefined;
+ }
+ interface PSKCallbackNegotation {
+ psk: DataView | NodeJS.TypedArray;
+ identity: string;
+ }
+ interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions {
+ host?: string | undefined;
+ port?: number | undefined;
+ path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored.
+ socket?: stream.Duplex | undefined; // Establish secure connection on a given socket rather than creating a new socket
+ checkServerIdentity?: typeof checkServerIdentity | undefined;
+ servername?: string | undefined; // SNI TLS Extension
+ session?: Buffer | undefined;
+ minDHSize?: number | undefined;
+ lookup?: net.LookupFunction | undefined;
+ timeout?: number | undefined;
+ /**
+ * When negotiating TLS-PSK (pre-shared keys), this function is called
+ * with optional identity `hint` provided by the server or `null`
+ * in case of TLS 1.3 where `hint` was removed.
+ * It will be necessary to provide a custom `tls.checkServerIdentity()`
+ * for the connection as the default one will try to check hostname/IP
+ * of the server against the certificate but that's not applicable for PSK
+ * because there won't be a certificate present.
+ * More information can be found in the RFC 4279.
+ *
+ * @param hint message sent from the server to help client
+ * decide which identity to use during negotiation.
+ * Always `null` if TLS 1.3 is used.
+ * @returns Return `null` to stop the negotiation process. `psk` must be
+ * compatible with the selected cipher's digest.
+ * `identity` must use UTF-8 encoding.
+ */
+ pskCallback?(hint: string | null): PSKCallbackNegotation | null;
+ }
+ /**
+ * Accepts encrypted connections using TLS or SSL.
+ * @since v0.3.2
+ */
+ class Server extends net.Server {
+ constructor(secureConnectionListener?: (socket: TLSSocket) => void);
+ constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void);
+ /**
+ * The `server.addContext()` method adds a secure context that will be used if
+ * the client request's SNI name matches the supplied `hostname` (or wildcard).
+ *
+ * When there are multiple matching contexts, the most recently added one is
+ * used.
+ * @since v0.5.3
+ * @param hostname A SNI host name or wildcard (e.g. `'*'`)
+ * @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc), or a TLS context object created
+ * with {@link createSecureContext} itself.
+ */
+ addContext(hostname: string, context: SecureContextOptions): void;
+ /**
+ * Returns the session ticket keys.
+ *
+ * See `Session Resumption` for more information.
+ * @since v3.0.0
+ * @return A 48-byte buffer containing the session ticket keys.
+ */
+ getTicketKeys(): Buffer;
+ /**
+ * The `server.setSecureContext()` method replaces the secure context of an
+ * existing server. Existing connections to the server are not interrupted.
+ * @since v11.0.0
+ * @param options An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc).
+ */
+ setSecureContext(options: SecureContextOptions): void;
+ /**
+ * Sets the session ticket keys.
+ *
+ * Changes to the ticket keys are effective only for future server connections.
+ * Existing or currently pending server connections will use the previous keys.
+ *
+ * See `Session Resumption` for more information.
+ * @since v3.0.0
+ * @param keys A 48-byte buffer containing the session ticket keys.
+ */
+ setTicketKeys(keys: Buffer): void;
+ /**
+ * events.EventEmitter
+ * 1. tlsClientError
+ * 2. newSession
+ * 3. OCSPRequest
+ * 4. resumeSession
+ * 5. secureConnection
+ * 6. keylog
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ addListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ addListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ addListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'tlsClientError', err: Error, tlsSocket: TLSSocket): boolean;
+ emit(event: 'newSession', sessionId: Buffer, sessionData: Buffer, callback: () => void): boolean;
+ emit(event: 'OCSPRequest', certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean;
+ emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void): boolean;
+ emit(event: 'secureConnection', tlsSocket: TLSSocket): boolean;
+ emit(event: 'keylog', line: Buffer, tlsSocket: TLSSocket): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ on(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ on(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ on(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ on(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ on(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ once(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ once(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ once(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ once(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ prependListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ prependListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ prependListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ prependListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ prependOnceListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ prependOnceListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ prependOnceListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ }
+ /**
+ * @deprecated since v0.11.3 Use `tls.TLSSocket` instead.
+ */
+ interface SecurePair {
+ encrypted: TLSSocket;
+ cleartext: TLSSocket;
+ }
+ type SecureVersion = 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1';
+ interface SecureContextOptions {
+ /**
+ * If set, this will be called when a client opens a connection using the ALPN extension.
+ * One argument will be passed to the callback: an object containing `servername` and `protocols` fields,
+ * respectively containing the server name from the SNI extension (if any) and an array of
+ * ALPN protocol name strings. The callback must return either one of the strings listed in `protocols`,
+ * which will be returned to the client as the selected ALPN protocol, or `undefined`,
+ * to reject the connection with a fatal alert. If a string is returned that does not match one of
+ * the client's ALPN protocols, an error will be thrown.
+ * This option cannot be used with the `ALPNProtocols` option, and setting both options will throw an error.
+ */
+ ALPNCallback?: ((arg: { servername: string; protocols: string[] }) => string | undefined) | undefined;
+ /**
+ * Optionally override the trusted CA certificates. Default is to trust
+ * the well-known CAs curated by Mozilla. Mozilla's CAs are completely
+ * replaced when CAs are explicitly specified using this option.
+ */
+ ca?: string | Buffer | Array<string | Buffer> | undefined;
+ /**
+ * Cert chains in PEM format. One cert chain should be provided per
+ * private key. Each cert chain should consist of the PEM formatted
+ * certificate for a provided private key, followed by the PEM
+ * formatted intermediate certificates (if any), in order, and not
+ * including the root CA (the root CA must be pre-known to the peer,
+ * see ca). When providing multiple cert chains, they do not have to
+ * be in the same order as their private keys in key. If the
+ * intermediate certificates are not provided, the peer will not be
+ * able to validate the certificate, and the handshake will fail.
+ */
+ cert?: string | Buffer | Array<string | Buffer> | undefined;
+ /**
+ * Colon-separated list of supported signature algorithms. The list
+ * can contain digest algorithms (SHA256, MD5 etc.), public key
+ * algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g
+ * 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512).
+ */
+ sigalgs?: string | undefined;
+ /**
+ * Cipher suite specification, replacing the default. For more
+ * information, see modifying the default cipher suite. Permitted
+ * ciphers can be obtained via tls.getCiphers(). Cipher names must be
+ * uppercased in order for OpenSSL to accept them.
+ */
+ ciphers?: string | undefined;
+ /**
+ * Name of an OpenSSL engine which can provide the client certificate.
+ */
+ clientCertEngine?: string | undefined;
+ /**
+ * PEM formatted CRLs (Certificate Revocation Lists).
+ */
+ crl?: string | Buffer | Array<string | Buffer> | undefined;
+ /**
+ * `'auto'` or custom Diffie-Hellman parameters, required for non-ECDHE perfect forward secrecy.
+ * If omitted or invalid, the parameters are silently discarded and DHE ciphers will not be available.
+ * ECDHE-based perfect forward secrecy will still be available.
+ */
+ dhparam?: string | Buffer | undefined;
+ /**
+ * A string describing a named curve or a colon separated list of curve
+ * NIDs or names, for example P-521:P-384:P-256, to use for ECDH key
+ * agreement. Set to auto to select the curve automatically. Use
+ * crypto.getCurves() to obtain a list of available curve names. On
+ * recent releases, openssl ecparam -list_curves will also display the
+ * name and description of each available elliptic curve. Default:
+ * tls.DEFAULT_ECDH_CURVE.
+ */
+ ecdhCurve?: string | undefined;
+ /**
+ * Attempt to use the server's cipher suite preferences instead of the
+ * client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be
+ * set in secureOptions
+ */
+ honorCipherOrder?: boolean | undefined;
+ /**
+ * Private keys in PEM format. PEM allows the option of private keys
+ * being encrypted. Encrypted keys will be decrypted with
+ * options.passphrase. Multiple keys using different algorithms can be
+ * provided either as an array of unencrypted key strings or buffers,
+ * or an array of objects in the form {pem: <string|buffer>[,
+ * passphrase: <string>]}. The object form can only occur in an array.
+ * object.passphrase is optional. Encrypted keys will be decrypted with
+ * object.passphrase if provided, or options.passphrase if it is not.
+ */
+ key?: string | Buffer | Array<string | Buffer | KeyObject> | undefined;
+ /**
+ * Name of an OpenSSL engine to get private key from. Should be used
+ * together with privateKeyIdentifier.
+ */
+ privateKeyEngine?: string | undefined;
+ /**
+ * Identifier of a private key managed by an OpenSSL engine. Should be
+ * used together with privateKeyEngine. Should not be set together with
+ * key, because both options define a private key in different ways.
+ */
+ privateKeyIdentifier?: string | undefined;
+ /**
+ * Optionally set the maximum TLS version to allow. One
+ * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
+ * `secureProtocol` option, use one or the other.
+ * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using
+ * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to
+ * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used.
+ */
+ maxVersion?: SecureVersion | undefined;
+ /**
+ * Optionally set the minimum TLS version to allow. One
+ * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
+ * `secureProtocol` option, use one or the other. It is not recommended to use
+ * less than TLSv1.2, but it may be required for interoperability.
+ * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using
+ * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to
+ * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to
+ * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used.
+ */
+ minVersion?: SecureVersion | undefined;
+ /**
+ * Shared passphrase used for a single private key and/or a PFX.
+ */
+ passphrase?: string | undefined;
+ /**
+ * PFX or PKCS12 encoded private key and certificate chain. pfx is an
+ * alternative to providing key and cert individually. PFX is usually
+ * encrypted, if it is, passphrase will be used to decrypt it. Multiple
+ * PFX can be provided either as an array of unencrypted PFX buffers,
+ * or an array of objects in the form {buf: <string|buffer>[,
+ * passphrase: <string>]}. The object form can only occur in an array.
+ * object.passphrase is optional. Encrypted PFX will be decrypted with
+ * object.passphrase if provided, or options.passphrase if it is not.
+ */
+ pfx?: string | Buffer | Array<string | Buffer | PxfObject> | undefined;
+ /**
+ * Optionally affect the OpenSSL protocol behavior, which is not
+ * usually necessary. This should be used carefully if at all! Value is
+ * a numeric bitmask of the SSL_OP_* options from OpenSSL Options
+ */
+ secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options
+ /**
+ * Legacy mechanism to select the TLS protocol version to use, it does
+ * not support independent control of the minimum and maximum version,
+ * and does not support limiting the protocol to TLSv1.3. Use
+ * minVersion and maxVersion instead. The possible values are listed as
+ * SSL_METHODS, use the function names as strings. For example, use
+ * 'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow
+ * any TLS protocol version up to TLSv1.3. It is not recommended to use
+ * TLS versions less than 1.2, but it may be required for
+ * interoperability. Default: none, see minVersion.
+ */
+ secureProtocol?: string | undefined;
+ /**
+ * Opaque identifier used by servers to ensure session state is not
+ * shared between applications. Unused by clients.
+ */
+ sessionIdContext?: string | undefined;
+ /**
+ * 48-bytes of cryptographically strong pseudo-random data.
+ * See Session Resumption for more information.
+ */
+ ticketKeys?: Buffer | undefined;
+ /**
+ * The number of seconds after which a TLS session created by the
+ * server will no longer be resumable. See Session Resumption for more
+ * information. Default: 300.
+ */
+ sessionTimeout?: number | undefined;
+ }
+ interface SecureContext {
+ context: any;
+ }
+ /**
+ * Verifies the certificate `cert` is issued to `hostname`.
+ *
+ * Returns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on
+ * failure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type).
+ *
+ * This function is intended to be used in combination with the`checkServerIdentity` option that can be passed to {@link connect} and as
+ * such operates on a `certificate object`. For other purposes, consider using `x509.checkHost()` instead.
+ *
+ * This function can be overwritten by providing an alternative function as the`options.checkServerIdentity` option that is passed to `tls.connect()`. The
+ * overwriting function can call `tls.checkServerIdentity()` of course, to augment
+ * the checks done with additional verification.
+ *
+ * This function is only called if the certificate passed all other checks, such as
+ * being issued by trusted CA (`options.ca`).
+ *
+ * Earlier versions of Node.js incorrectly accepted certificates for a given`hostname` if a matching `uniformResourceIdentifier` subject alternative name
+ * was present (see [CVE-2021-44531](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531)). Applications that wish to accept`uniformResourceIdentifier` subject alternative names can use
+ * a custom`options.checkServerIdentity` function that implements the desired behavior.
+ * @since v0.8.4
+ * @param hostname The host name or IP address to verify the certificate against.
+ * @param cert A `certificate object` representing the peer's certificate.
+ */
+ function checkServerIdentity(hostname: string, cert: PeerCertificate): Error | undefined;
+ /**
+ * Creates a new {@link Server}. The `secureConnectionListener`, if provided, is
+ * automatically set as a listener for the `'secureConnection'` event.
+ *
+ * The `ticketKeys` options is automatically shared between `node:cluster` module
+ * workers.
+ *
+ * The following illustrates a simple echo server:
+ *
+ * ```js
+ * const tls = require('node:tls');
+ * const fs = require('node:fs');
+ *
+ * const options = {
+ * key: fs.readFileSync('server-key.pem'),
+ * cert: fs.readFileSync('server-cert.pem'),
+ *
+ * // This is necessary only if using client certificate authentication.
+ * requestCert: true,
+ *
+ * // This is necessary only if the client uses a self-signed certificate.
+ * ca: [ fs.readFileSync('client-cert.pem') ],
+ * };
+ *
+ * const server = tls.createServer(options, (socket) => {
+ * console.log('server connected',
+ * socket.authorized ? 'authorized' : 'unauthorized');
+ * socket.write('welcome!\n');
+ * socket.setEncoding('utf8');
+ * socket.pipe(socket);
+ * });
+ * server.listen(8000, () => {
+ * console.log('server bound');
+ * });
+ * ```
+ *
+ * The server can be tested by connecting to it using the example client from {@link connect}.
+ * @since v0.3.2
+ */
+ function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server;
+ function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server;
+ /**
+ * The `callback` function, if specified, will be added as a listener for the `'secureConnect'` event.
+ *
+ * `tls.connect()` returns a {@link TLSSocket} object.
+ *
+ * Unlike the `https` API, `tls.connect()` does not enable the
+ * SNI (Server Name Indication) extension by default, which may cause some
+ * servers to return an incorrect certificate or reject the connection
+ * altogether. To enable SNI, set the `servername` option in addition
+ * to `host`.
+ *
+ * The following illustrates a client for the echo server example from {@link createServer}:
+ *
+ * ```js
+ * // Assumes an echo server that is listening on port 8000.
+ * const tls = require('node:tls');
+ * const fs = require('node:fs');
+ *
+ * const options = {
+ * // Necessary only if the server requires client certificate authentication.
+ * key: fs.readFileSync('client-key.pem'),
+ * cert: fs.readFileSync('client-cert.pem'),
+ *
+ * // Necessary only if the server uses a self-signed certificate.
+ * ca: [ fs.readFileSync('server-cert.pem') ],
+ *
+ * // Necessary only if the server's cert isn't for "localhost".
+ * checkServerIdentity: () => { return null; },
+ * };
+ *
+ * const socket = tls.connect(8000, options, () => {
+ * console.log('client connected',
+ * socket.authorized ? 'authorized' : 'unauthorized');
+ * process.stdin.pipe(socket);
+ * process.stdin.resume();
+ * });
+ * socket.setEncoding('utf8');
+ * socket.on('data', (data) => {
+ * console.log(data);
+ * });
+ * socket.on('end', () => {
+ * console.log('server ends connection');
+ * });
+ * ```
+ * @since v0.11.3
+ */
+ function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ /**
+ * Creates a new secure pair object with two streams, one of which reads and writes
+ * the encrypted data and the other of which reads and writes the cleartext data.
+ * Generally, the encrypted stream is piped to/from an incoming encrypted data
+ * stream and the cleartext one is used as a replacement for the initial encrypted
+ * stream.
+ *
+ * `tls.createSecurePair()` returns a `tls.SecurePair` object with `cleartext` and`encrypted` stream properties.
+ *
+ * Using `cleartext` has the same API as {@link TLSSocket}.
+ *
+ * The `tls.createSecurePair()` method is now deprecated in favor of`tls.TLSSocket()`. For example, the code:
+ *
+ * ```js
+ * pair = tls.createSecurePair(// ... );
+ * pair.encrypted.pipe(socket);
+ * socket.pipe(pair.encrypted);
+ * ```
+ *
+ * can be replaced by:
+ *
+ * ```js
+ * secureSocket = tls.TLSSocket(socket, options);
+ * ```
+ *
+ * where `secureSocket` has the same API as `pair.cleartext`.
+ * @since v0.3.2
+ * @deprecated Since v0.11.3 - Use {@link TLSSocket} instead.
+ * @param context A secure context object as returned by `tls.createSecureContext()`
+ * @param isServer `true` to specify that this TLS connection should be opened as a server.
+ * @param requestCert `true` to specify whether a server should request a certificate from a connecting client. Only applies when `isServer` is `true`.
+ * @param rejectUnauthorized If not `false` a server automatically reject clients with invalid certificates. Only applies when `isServer` is `true`.
+ */
+ function createSecurePair(context?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
+ /**
+ * {@link createServer} sets the default value of the `honorCipherOrder` option
+ * to `true`, other APIs that create secure contexts leave it unset.
+ *
+ * {@link createServer} uses a 128 bit truncated SHA1 hash value generated
+ * from `process.argv` as the default value of the `sessionIdContext` option, other
+ * APIs that create secure contexts have no default value.
+ *
+ * The `tls.createSecureContext()` method creates a `SecureContext` object. It is
+ * usable as an argument to several `tls` APIs, such as `server.addContext()`,
+ * but has no public methods. The {@link Server} constructor and the {@link createServer} method do not support the `secureContext` option.
+ *
+ * A key is _required_ for ciphers that use certificates. Either `key` or`pfx` can be used to provide it.
+ *
+ * If the `ca` option is not given, then Node.js will default to using [Mozilla's publicly trusted list of
+ * CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt).
+ *
+ * Custom DHE parameters are discouraged in favor of the new `dhparam: 'auto'`option. When set to `'auto'`, well-known DHE parameters of sufficient strength
+ * will be selected automatically. Otherwise, if necessary, `openssl dhparam` can
+ * be used to create custom parameters. The key length must be greater than or
+ * equal to 1024 bits or else an error will be thrown. Although 1024 bits is
+ * permissible, use 2048 bits or larger for stronger security.
+ * @since v0.11.13
+ */
+ function createSecureContext(options?: SecureContextOptions): SecureContext;
+ /**
+ * Returns an array with the names of the supported TLS ciphers. The names are
+ * lower-case for historical reasons, but must be uppercased to be used in
+ * the `ciphers` option of {@link createSecureContext}.
+ *
+ * Not all supported ciphers are enabled by default. See `Modifying the default TLS cipher suite`.
+ *
+ * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for
+ * TLSv1.2 and below.
+ *
+ * ```js
+ * console.log(tls.getCiphers()); // ['aes128-gcm-sha256', 'aes128-sha', ...]
+ * ```
+ * @since v0.10.2
+ */
+ function getCiphers(): string[];
+ /**
+ * The default curve name to use for ECDH key agreement in a tls server.
+ * The default value is 'auto'. See tls.createSecureContext() for further
+ * information.
+ */
+ let DEFAULT_ECDH_CURVE: string;
+ /**
+ * The default value of the maxVersion option of
+ * tls.createSecureContext(). It can be assigned any of the supported TLS
+ * protocol versions, 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default:
+ * 'TLSv1.3', unless changed using CLI options. Using --tls-max-v1.2 sets
+ * the default to 'TLSv1.2'. Using --tls-max-v1.3 sets the default to
+ * 'TLSv1.3'. If multiple of the options are provided, the highest maximum
+ * is used.
+ */
+ let DEFAULT_MAX_VERSION: SecureVersion;
+ /**
+ * The default value of the minVersion option of tls.createSecureContext().
+ * It can be assigned any of the supported TLS protocol versions,
+ * 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default: 'TLSv1.2', unless
+ * changed using CLI options. Using --tls-min-v1.0 sets the default to
+ * 'TLSv1'. Using --tls-min-v1.1 sets the default to 'TLSv1.1'. Using
+ * --tls-min-v1.3 sets the default to 'TLSv1.3'. If multiple of the options
+ * are provided, the lowest minimum is used.
+ */
+ let DEFAULT_MIN_VERSION: SecureVersion;
+ /**
+ * The default value of the ciphers option of tls.createSecureContext().
+ * It can be assigned any of the supported OpenSSL ciphers.
+ * Defaults to the content of crypto.constants.defaultCoreCipherList, unless
+ * changed using CLI options using --tls-default-ciphers.
+ */
+ let DEFAULT_CIPHERS: string;
+ /**
+ * An immutable array of strings representing the root certificates (in PEM
+ * format) used for verifying peer certificates. This is the default value
+ * of the ca option to tls.createSecureContext().
+ */
+ const rootCertificates: ReadonlyArray<string>;
+}
+declare module 'node:tls' {
+ export * from 'tls';
+}
diff --git a/node_modules/@types/node/ts4.8/trace_events.d.ts b/node_modules/@types/node/ts4.8/trace_events.d.ts
new file mode 100755
index 0000000..ca8baed
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/trace_events.d.ts
@@ -0,0 +1,182 @@
+/**
+ * The `node:trace_events` module provides a mechanism to centralize tracing
+ * information generated by V8, Node.js core, and userspace code.
+ *
+ * Tracing can be enabled with the `--trace-event-categories` command-line flag
+ * or by using the `node:trace_events` module. The `--trace-event-categories` flag
+ * accepts a list of comma-separated category names.
+ *
+ * The available categories are:
+ *
+ * * `node`: An empty placeholder.
+ * * `node.async_hooks`: Enables capture of detailed `async_hooks` trace data.
+ * The `async_hooks` events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property.
+ * * `node.bootstrap`: Enables capture of Node.js bootstrap milestones.
+ * * `node.console`: Enables capture of `console.time()` and `console.count()`output.
+ * * `node.threadpoolwork.sync`: Enables capture of trace data for threadpool
+ * synchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`.
+ * * `node.threadpoolwork.async`: Enables capture of trace data for threadpool
+ * asynchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`.
+ * * `node.dns.native`: Enables capture of trace data for DNS queries.
+ * * `node.net.native`: Enables capture of trace data for network.
+ * * `node.environment`: Enables capture of Node.js Environment milestones.
+ * * `node.fs.sync`: Enables capture of trace data for file system sync methods.
+ * * `node.fs_dir.sync`: Enables capture of trace data for file system sync
+ * directory methods.
+ * * `node.fs.async`: Enables capture of trace data for file system async methods.
+ * * `node.fs_dir.async`: Enables capture of trace data for file system async
+ * directory methods.
+ * * `node.perf`: Enables capture of `Performance API` measurements.
+ * * `node.perf.usertiming`: Enables capture of only Performance API User Timing
+ * measures and marks.
+ * * `node.perf.timerify`: Enables capture of only Performance API timerify
+ * measurements.
+ * * `node.promises.rejections`: Enables capture of trace data tracking the number
+ * of unhandled Promise rejections and handled-after-rejections.
+ * * `node.vm.script`: Enables capture of trace data for the `node:vm` module's`runInNewContext()`, `runInContext()`, and `runInThisContext()` methods.
+ * * `v8`: The `V8` events are GC, compiling, and execution related.
+ * * `node.http`: Enables capture of trace data for http request / response.
+ *
+ * By default the `node`, `node.async_hooks`, and `v8` categories are enabled.
+ *
+ * ```bash
+ * node --trace-event-categories v8,node,node.async_hooks server.js
+ * ```
+ *
+ * Prior versions of Node.js required the use of the `--trace-events-enabled`flag to enable trace events. This requirement has been removed. However, the`--trace-events-enabled` flag _may_ still be
+ * used and will enable the`node`, `node.async_hooks`, and `v8` trace event categories by default.
+ *
+ * ```bash
+ * node --trace-events-enabled
+ *
+ * # is equivalent to
+ *
+ * node --trace-event-categories v8,node,node.async_hooks
+ * ```
+ *
+ * Alternatively, trace events may be enabled using the `node:trace_events` module:
+ *
+ * ```js
+ * const trace_events = require('node:trace_events');
+ * const tracing = trace_events.createTracing({ categories: ['node.perf'] });
+ * tracing.enable(); // Enable trace event capture for the 'node.perf' category
+ *
+ * // do work
+ *
+ * tracing.disable(); // Disable trace event capture for the 'node.perf' category
+ * ```
+ *
+ * Running Node.js with tracing enabled will produce log files that can be opened
+ * in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome.
+ *
+ * The logging file is by default called `node_trace.${rotation}.log`, where`${rotation}` is an incrementing log-rotation id. The filepath pattern can
+ * be specified with `--trace-event-file-pattern` that accepts a template
+ * string that supports `${rotation}` and `${pid}`:
+ *
+ * ```bash
+ * node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js
+ * ```
+ *
+ * To guarantee that the log file is properly generated after signal events like`SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers
+ * in your code, such as:
+ *
+ * ```js
+ * process.on('SIGINT', function onSigint() {
+ * console.info('Received SIGINT.');
+ * process.exit(130); // Or applicable exit code depending on OS and signal
+ * });
+ * ```
+ *
+ * The tracing system uses the same time source
+ * as the one used by `process.hrtime()`.
+ * However the trace-event timestamps are expressed in microseconds,
+ * unlike `process.hrtime()` which returns nanoseconds.
+ *
+ * The features from this module are not available in `Worker` threads.
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/trace_events.js)
+ */
+declare module 'trace_events' {
+ /**
+ * The `Tracing` object is used to enable or disable tracing for sets of
+ * categories. Instances are created using the
+ * `trace_events.createTracing()` method.
+ *
+ * When created, the `Tracing` object is disabled. Calling the
+ * `tracing.enable()` method adds the categories to the set of enabled trace
+ * event categories. Calling `tracing.disable()` will remove the categories
+ * from the set of enabled trace event categories.
+ */
+ interface Tracing {
+ /**
+ * A comma-separated list of the trace event categories covered by this
+ * `Tracing` object.
+ */
+ readonly categories: string;
+ /**
+ * Disables this `Tracing` object.
+ *
+ * Only trace event categories _not_ covered by other enabled `Tracing`
+ * objects and _not_ specified by the `--trace-event-categories` flag
+ * will be disabled.
+ */
+ disable(): void;
+ /**
+ * Enables this `Tracing` object for the set of categories covered by
+ * the `Tracing` object.
+ */
+ enable(): void;
+ /**
+ * `true` only if the `Tracing` object has been enabled.
+ */
+ readonly enabled: boolean;
+ }
+ interface CreateTracingOptions {
+ /**
+ * An array of trace category names. Values included in the array are
+ * coerced to a string when possible. An error will be thrown if the
+ * value cannot be coerced.
+ */
+ categories: string[];
+ }
+ /**
+ * Creates and returns a `Tracing` object for the given set of `categories`.
+ *
+ * ```js
+ * const trace_events = require('node:trace_events');
+ * const categories = ['node.perf', 'node.async_hooks'];
+ * const tracing = trace_events.createTracing({ categories });
+ * tracing.enable();
+ * // do stuff
+ * tracing.disable();
+ * ```
+ * @since v10.0.0
+ * @return .
+ */
+ function createTracing(options: CreateTracingOptions): Tracing;
+ /**
+ * Returns a comma-separated list of all currently-enabled trace event
+ * categories. The current set of enabled trace event categories is determined
+ * by the _union_ of all currently-enabled `Tracing` objects and any categories
+ * enabled using the `--trace-event-categories` flag.
+ *
+ * Given the file `test.js` below, the command`node --trace-event-categories node.perf test.js` will print`'node.async_hooks,node.perf'` to the console.
+ *
+ * ```js
+ * const trace_events = require('node:trace_events');
+ * const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] });
+ * const t2 = trace_events.createTracing({ categories: ['node.perf'] });
+ * const t3 = trace_events.createTracing({ categories: ['v8'] });
+ *
+ * t1.enable();
+ * t2.enable();
+ *
+ * console.log(trace_events.getEnabledCategories());
+ * ```
+ * @since v10.0.0
+ */
+ function getEnabledCategories(): string | undefined;
+}
+declare module 'node:trace_events' {
+ export * from 'trace_events';
+}
diff --git a/node_modules/@types/node/ts4.8/tty.d.ts b/node_modules/@types/node/ts4.8/tty.d.ts
new file mode 100755
index 0000000..7653bf8
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/tty.d.ts
@@ -0,0 +1,208 @@
+/**
+ * The `node:tty` module provides the `tty.ReadStream` and `tty.WriteStream`classes. In most cases, it will not be necessary or possible to use this module
+ * directly. However, it can be accessed using:
+ *
+ * ```js
+ * const tty = require('node:tty');
+ * ```
+ *
+ * When Node.js detects that it is being run with a text terminal ("TTY")
+ * attached, `process.stdin` will, by default, be initialized as an instance of`tty.ReadStream` and both `process.stdout` and `process.stderr` will, by
+ * default, be instances of `tty.WriteStream`. The preferred method of determining
+ * whether Node.js is being run within a TTY context is to check that the value of
+ * the `process.stdout.isTTY` property is `true`:
+ *
+ * ```console
+ * $ node -p -e "Boolean(process.stdout.isTTY)"
+ * true
+ * $ node -p -e "Boolean(process.stdout.isTTY)" | cat
+ * false
+ * ```
+ *
+ * In most cases, there should be little to no reason for an application to
+ * manually create instances of the `tty.ReadStream` and `tty.WriteStream`classes.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/tty.js)
+ */
+declare module 'tty' {
+ import * as net from 'node:net';
+ /**
+ * The `tty.isatty()` method returns `true` if the given `fd` is associated with
+ * a TTY and `false` if it is not, including whenever `fd` is not a non-negative
+ * integer.
+ * @since v0.5.8
+ * @param fd A numeric file descriptor
+ */
+ function isatty(fd: number): boolean;
+ /**
+ * Represents the readable side of a TTY. In normal circumstances `process.stdin` will be the only `tty.ReadStream` instance in a Node.js
+ * process and there should be no reason to create additional instances.
+ * @since v0.5.8
+ */
+ class ReadStream extends net.Socket {
+ constructor(fd: number, options?: net.SocketConstructorOpts);
+ /**
+ * A `boolean` that is `true` if the TTY is currently configured to operate as a
+ * raw device.
+ *
+ * This flag is always `false` when a process starts, even if the terminal is
+ * operating in raw mode. Its value will change with subsequent calls to`setRawMode`.
+ * @since v0.7.7
+ */
+ isRaw: boolean;
+ /**
+ * Allows configuration of `tty.ReadStream` so that it operates as a raw device.
+ *
+ * When in raw mode, input is always available character-by-character, not
+ * including modifiers. Additionally, all special processing of characters by the
+ * terminal is disabled, including echoing input
+ * characters. Ctrl+C will no longer cause a `SIGINT` when
+ * in this mode.
+ * @since v0.7.7
+ * @param mode If `true`, configures the `tty.ReadStream` to operate as a raw device. If `false`, configures the `tty.ReadStream` to operate in its default mode. The `readStream.isRaw`
+ * property will be set to the resulting mode.
+ * @return The read stream instance.
+ */
+ setRawMode(mode: boolean): this;
+ /**
+ * A `boolean` that is always `true` for `tty.ReadStream` instances.
+ * @since v0.5.8
+ */
+ isTTY: boolean;
+ }
+ /**
+ * -1 - to the left from cursor
+ * 0 - the entire line
+ * 1 - to the right from cursor
+ */
+ type Direction = -1 | 0 | 1;
+ /**
+ * Represents the writable side of a TTY. In normal circumstances,`process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there
+ * should be no reason to create additional instances.
+ * @since v0.5.8
+ */
+ class WriteStream extends net.Socket {
+ constructor(fd: number);
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'resize', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'resize'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'resize', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'resize', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'resize', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'resize', listener: () => void): this;
+ /**
+ * `writeStream.clearLine()` clears the current line of this `WriteStream` in a
+ * direction identified by `dir`.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ clearLine(dir: Direction, callback?: () => void): boolean;
+ /**
+ * `writeStream.clearScreenDown()` clears this `WriteStream` from the current
+ * cursor down.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ clearScreenDown(callback?: () => void): boolean;
+ /**
+ * `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified
+ * position.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ cursorTo(x: number, y?: number, callback?: () => void): boolean;
+ cursorTo(x: number, callback: () => void): boolean;
+ /**
+ * `writeStream.moveCursor()` moves this `WriteStream`'s cursor _relative_ to its
+ * current position.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ moveCursor(dx: number, dy: number, callback?: () => void): boolean;
+ /**
+ * Returns:
+ *
+ * * `1` for 2,
+ * * `4` for 16,
+ * * `8` for 256,
+ * * `24` for 16,777,216 colors supported.
+ *
+ * Use this to determine what colors the terminal supports. Due to the nature of
+ * colors in terminals it is possible to either have false positives or false
+ * negatives. It depends on process information and the environment variables that
+ * may lie about what terminal is used.
+ * It is possible to pass in an `env` object to simulate the usage of a specific
+ * terminal. This can be useful to check how specific environment settings behave.
+ *
+ * To enforce a specific color support, use one of the below environment settings.
+ *
+ * * 2 colors: `FORCE_COLOR = 0` (Disables colors)
+ * * 16 colors: `FORCE_COLOR = 1`
+ * * 256 colors: `FORCE_COLOR = 2`
+ * * 16,777,216 colors: `FORCE_COLOR = 3`
+ *
+ * Disabling color support is also possible by using the `NO_COLOR` and`NODE_DISABLE_COLORS` environment variables.
+ * @since v9.9.0
+ * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
+ */
+ getColorDepth(env?: object): number;
+ /**
+ * Returns `true` if the `writeStream` supports at least as many colors as provided
+ * in `count`. Minimum support is 2 (black and white).
+ *
+ * This has the same false positives and negatives as described in `writeStream.getColorDepth()`.
+ *
+ * ```js
+ * process.stdout.hasColors();
+ * // Returns true or false depending on if `stdout` supports at least 16 colors.
+ * process.stdout.hasColors(256);
+ * // Returns true or false depending on if `stdout` supports at least 256 colors.
+ * process.stdout.hasColors({ TMUX: '1' });
+ * // Returns true.
+ * process.stdout.hasColors(2 ** 24, { TMUX: '1' });
+ * // Returns false (the environment setting pretends to support 2 ** 8 colors).
+ * ```
+ * @since v11.13.0, v10.16.0
+ * @param [count=16] The number of colors that are requested (minimum 2).
+ * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
+ */
+ hasColors(count?: number): boolean;
+ hasColors(env?: object): boolean;
+ hasColors(count: number, env?: object): boolean;
+ /**
+ * `writeStream.getWindowSize()` returns the size of the TTY
+ * corresponding to this `WriteStream`. The array is of the type`[numColumns, numRows]` where `numColumns` and `numRows` represent the number
+ * of columns and rows in the corresponding TTY.
+ * @since v0.7.7
+ */
+ getWindowSize(): [number, number];
+ /**
+ * A `number` specifying the number of columns the TTY currently has. This property
+ * is updated whenever the `'resize'` event is emitted.
+ * @since v0.7.7
+ */
+ columns: number;
+ /**
+ * A `number` specifying the number of rows the TTY currently has. This property
+ * is updated whenever the `'resize'` event is emitted.
+ * @since v0.7.7
+ */
+ rows: number;
+ /**
+ * A `boolean` that is always `true`.
+ * @since v0.5.8
+ */
+ isTTY: boolean;
+ }
+}
+declare module 'node:tty' {
+ export * from 'tty';
+}
diff --git a/node_modules/@types/node/ts4.8/url.d.ts b/node_modules/@types/node/ts4.8/url.d.ts
new file mode 100755
index 0000000..7bdaed1
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/url.d.ts
@@ -0,0 +1,915 @@
+/**
+ * The `node:url` module provides utilities for URL resolution and parsing. It can
+ * be accessed using:
+ *
+ * ```js
+ * import url from 'node:url';
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/url.js)
+ */
+declare module 'url' {
+ import { Blob as NodeBlob } from 'node:buffer';
+ import { ClientRequestArgs } from 'node:http';
+ import { ParsedUrlQuery, ParsedUrlQueryInput } from 'node:querystring';
+ // Input to `url.format`
+ interface UrlObject {
+ auth?: string | null | undefined;
+ hash?: string | null | undefined;
+ host?: string | null | undefined;
+ hostname?: string | null | undefined;
+ href?: string | null | undefined;
+ pathname?: string | null | undefined;
+ protocol?: string | null | undefined;
+ search?: string | null | undefined;
+ slashes?: boolean | null | undefined;
+ port?: string | number | null | undefined;
+ query?: string | null | ParsedUrlQueryInput | undefined;
+ }
+ // Output of `url.parse`
+ interface Url {
+ auth: string | null;
+ hash: string | null;
+ host: string | null;
+ hostname: string | null;
+ href: string;
+ path: string | null;
+ pathname: string | null;
+ protocol: string | null;
+ search: string | null;
+ slashes: boolean | null;
+ port: string | null;
+ query: string | null | ParsedUrlQuery;
+ }
+ interface UrlWithParsedQuery extends Url {
+ query: ParsedUrlQuery;
+ }
+ interface UrlWithStringQuery extends Url {
+ query: string | null;
+ }
+ /**
+ * The `url.parse()` method takes a URL string, parses it, and returns a URL
+ * object.
+ *
+ * A `TypeError` is thrown if `urlString` is not a string.
+ *
+ * A `URIError` is thrown if the `auth` property is present but cannot be decoded.
+ *
+ * `url.parse()` uses a lenient, non-standard algorithm for parsing URL
+ * strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) and incorrect handling of usernames and passwords. Do not use with untrusted
+ * input. CVEs are not issued for `url.parse()` vulnerabilities. Use the `WHATWG URL` API instead.
+ * @since v0.1.25
+ * @deprecated Use the WHATWG URL API instead.
+ * @param urlString The URL string to parse.
+ * @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property
+ * on the returned URL object will be an unparsed, undecoded string.
+ * @param [slashesDenoteHost=false] If `true`, the first token after the literal string `//` and preceding the next `/` will be interpreted as the `host`. For instance, given `//foo/bar`, the
+ * result would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`.
+ */
+ function parse(urlString: string): UrlWithStringQuery;
+ function parse(urlString: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
+ function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
+ function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
+ /**
+ * The `url.format()` method returns a formatted URL string derived from`urlObject`.
+ *
+ * ```js
+ * const url = require('node:url');
+ * url.format({
+ * protocol: 'https',
+ * hostname: 'example.com',
+ * pathname: '/some/path',
+ * query: {
+ * page: 1,
+ * format: 'json',
+ * },
+ * });
+ *
+ * // => 'https://example.com/some/path?page=1&#x26;format=json'
+ * ```
+ *
+ * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
+ *
+ * The formatting process operates as follows:
+ *
+ * * A new empty string `result` is created.
+ * * If `urlObject.protocol` is a string, it is appended as-is to `result`.
+ * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
+ * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
+ * colon (`:`) character, the literal string `:` will be appended to `result`.
+ * * If either of the following conditions is true, then the literal string `//`will be appended to `result`:
+ * * `urlObject.slashes` property is true;
+ * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or`file`;
+ * * If the value of the `urlObject.auth` property is truthy, and either`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of`urlObject.auth` will be coerced into a string
+ * and appended to `result`followed by the literal string `@`.
+ * * If the `urlObject.host` property is `undefined` then:
+ * * If the `urlObject.hostname` is a string, it is appended to `result`.
+ * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
+ * an `Error` is thrown.
+ * * If the `urlObject.port` property value is truthy, and `urlObject.hostname`is not `undefined`:
+ * * The literal string `:` is appended to `result`, and
+ * * The value of `urlObject.port` is coerced to a string and appended to`result`.
+ * * Otherwise, if the `urlObject.host` property value is truthy, the value of`urlObject.host` is coerced to a string and appended to `result`.
+ * * If the `urlObject.pathname` property is a string that is not an empty string:
+ * * If the `urlObject.pathname`_does not start_ with an ASCII forward slash
+ * (`/`), then the literal string `'/'` is appended to `result`.
+ * * The value of `urlObject.pathname` is appended to `result`.
+ * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown.
+ * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result`followed by the output of calling the
+ * `querystring` module's `stringify()`method passing the value of `urlObject.query`.
+ * * Otherwise, if `urlObject.search` is a string:
+ * * If the value of `urlObject.search`_does not start_ with the ASCII question
+ * mark (`?`) character, the literal string `?` is appended to `result`.
+ * * The value of `urlObject.search` is appended to `result`.
+ * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
+ * * If the `urlObject.hash` property is a string:
+ * * If the value of `urlObject.hash`_does not start_ with the ASCII hash (`#`)
+ * character, the literal string `#` is appended to `result`.
+ * * The value of `urlObject.hash` is appended to `result`.
+ * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
+ * string, an `Error` is thrown.
+ * * `result` is returned.
+ * @since v0.1.25
+ * @legacy Use the WHATWG URL API instead.
+ * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
+ */
+ function format(urlObject: URL, options?: URLFormatOptions): string;
+ /**
+ * The `url.format()` method returns a formatted URL string derived from`urlObject`.
+ *
+ * ```js
+ * const url = require('url');
+ * url.format({
+ * protocol: 'https',
+ * hostname: 'example.com',
+ * pathname: '/some/path',
+ * query: {
+ * page: 1,
+ * format: 'json'
+ * }
+ * });
+ *
+ * // => 'https://example.com/some/path?page=1&#x26;format=json'
+ * ```
+ *
+ * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
+ *
+ * The formatting process operates as follows:
+ *
+ * * A new empty string `result` is created.
+ * * If `urlObject.protocol` is a string, it is appended as-is to `result`.
+ * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
+ * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
+ * colon (`:`) character, the literal string `:` will be appended to `result`.
+ * * If either of the following conditions is true, then the literal string `//`will be appended to `result`:
+ * * `urlObject.slashes` property is true;
+ * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or`file`;
+ * * If the value of the `urlObject.auth` property is truthy, and either`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of`urlObject.auth` will be coerced into a string
+ * and appended to `result`followed by the literal string `@`.
+ * * If the `urlObject.host` property is `undefined` then:
+ * * If the `urlObject.hostname` is a string, it is appended to `result`.
+ * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
+ * an `Error` is thrown.
+ * * If the `urlObject.port` property value is truthy, and `urlObject.hostname`is not `undefined`:
+ * * The literal string `:` is appended to `result`, and
+ * * The value of `urlObject.port` is coerced to a string and appended to`result`.
+ * * Otherwise, if the `urlObject.host` property value is truthy, the value of`urlObject.host` is coerced to a string and appended to `result`.
+ * * If the `urlObject.pathname` property is a string that is not an empty string:
+ * * If the `urlObject.pathname`_does not start_ with an ASCII forward slash
+ * (`/`), then the literal string `'/'` is appended to `result`.
+ * * The value of `urlObject.pathname` is appended to `result`.
+ * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown.
+ * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result`followed by the output of calling the
+ * `querystring` module's `stringify()`method passing the value of `urlObject.query`.
+ * * Otherwise, if `urlObject.search` is a string:
+ * * If the value of `urlObject.search`_does not start_ with the ASCII question
+ * mark (`?`) character, the literal string `?` is appended to `result`.
+ * * The value of `urlObject.search` is appended to `result`.
+ * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
+ * * If the `urlObject.hash` property is a string:
+ * * If the value of `urlObject.hash`_does not start_ with the ASCII hash (`#`)
+ * character, the literal string `#` is appended to `result`.
+ * * The value of `urlObject.hash` is appended to `result`.
+ * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
+ * string, an `Error` is thrown.
+ * * `result` is returned.
+ * @since v0.1.25
+ * @legacy Use the WHATWG URL API instead.
+ * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
+ */
+ function format(urlObject: UrlObject | string): string;
+ /**
+ * The `url.resolve()` method resolves a target URL relative to a base URL in a
+ * manner similar to that of a web browser resolving an anchor tag.
+ *
+ * ```js
+ * const url = require('node:url');
+ * url.resolve('/one/two/three', 'four'); // '/one/two/four'
+ * url.resolve('http://example.com/', '/one'); // 'http://example.com/one'
+ * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two'
+ * ```
+ *
+ * To achieve the same result using the WHATWG URL API:
+ *
+ * ```js
+ * function resolve(from, to) {
+ * const resolvedUrl = new URL(to, new URL(from, 'resolve://'));
+ * if (resolvedUrl.protocol === 'resolve:') {
+ * // `from` is a relative URL.
+ * const { pathname, search, hash } = resolvedUrl;
+ * return pathname + search + hash;
+ * }
+ * return resolvedUrl.toString();
+ * }
+ *
+ * resolve('/one/two/three', 'four'); // '/one/two/four'
+ * resolve('http://example.com/', '/one'); // 'http://example.com/one'
+ * resolve('http://example.com/one', '/two'); // 'http://example.com/two'
+ * ```
+ * @since v0.1.25
+ * @legacy Use the WHATWG URL API instead.
+ * @param from The base URL to use if `to` is a relative URL.
+ * @param to The target URL to resolve.
+ */
+ function resolve(from: string, to: string): string;
+ /**
+ * Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an
+ * invalid domain, the empty string is returned.
+ *
+ * It performs the inverse operation to {@link domainToUnicode}.
+ *
+ * ```js
+ * import url from 'node:url';
+ *
+ * console.log(url.domainToASCII('español.com'));
+ * // Prints xn--espaol-zwa.com
+ * console.log(url.domainToASCII('中文.com'));
+ * // Prints xn--fiq228c.com
+ * console.log(url.domainToASCII('xn--iñvalid.com'));
+ * // Prints an empty string
+ * ```
+ * @since v7.4.0, v6.13.0
+ */
+ function domainToASCII(domain: string): string;
+ /**
+ * Returns the Unicode serialization of the `domain`. If `domain` is an invalid
+ * domain, the empty string is returned.
+ *
+ * It performs the inverse operation to {@link domainToASCII}.
+ *
+ * ```js
+ * import url from 'node:url';
+ *
+ * console.log(url.domainToUnicode('xn--espaol-zwa.com'));
+ * // Prints español.com
+ * console.log(url.domainToUnicode('xn--fiq228c.com'));
+ * // Prints 中文.com
+ * console.log(url.domainToUnicode('xn--iñvalid.com'));
+ * // Prints an empty string
+ * ```
+ * @since v7.4.0, v6.13.0
+ */
+ function domainToUnicode(domain: string): string;
+ /**
+ * This function ensures the correct decodings of percent-encoded characters as
+ * well as ensuring a cross-platform valid absolute path string.
+ *
+ * ```js
+ * import { fileURLToPath } from 'node:url';
+ *
+ * const __filename = fileURLToPath(import.meta.url);
+ *
+ * new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/
+ * fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows)
+ *
+ * new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt
+ * fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows)
+ *
+ * new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt
+ * fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX)
+ *
+ * new URL('file:///hello world').pathname; // Incorrect: /hello%20world
+ * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX)
+ * ```
+ * @since v10.12.0
+ * @param url The file URL string or URL object to convert to a path.
+ * @return The fully-resolved platform-specific Node.js file path.
+ */
+ function fileURLToPath(url: string | URL): string;
+ /**
+ * This function ensures that `path` is resolved absolutely, and that the URL
+ * control characters are correctly encoded when converting into a File URL.
+ *
+ * ```js
+ * import { pathToFileURL } from 'node:url';
+ *
+ * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1
+ * pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX)
+ *
+ * new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c
+ * pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX)
+ * ```
+ * @since v10.12.0
+ * @param path The path to convert to a File URL.
+ * @return The file URL object.
+ */
+ function pathToFileURL(path: string): URL;
+ /**
+ * This utility function converts a URL object into an ordinary options object as
+ * expected by the `http.request()` and `https.request()` APIs.
+ *
+ * ```js
+ * import { urlToHttpOptions } from 'node:url';
+ * const myURL = new URL('https://a:b@測試?abc#foo');
+ *
+ * console.log(urlToHttpOptions(myURL));
+ * /*
+ * {
+ * protocol: 'https:',
+ * hostname: 'xn--g6w251d',
+ * hash: '#foo',
+ * search: '?abc',
+ * pathname: '/',
+ * path: '/?abc',
+ * href: 'https://a:b@xn--g6w251d/?abc#foo',
+ * auth: 'a:b'
+ * }
+ *
+ * ```
+ * @since v15.7.0, v14.18.0
+ * @param url The `WHATWG URL` object to convert to an options object.
+ * @return Options object
+ */
+ function urlToHttpOptions(url: URL): ClientRequestArgs;
+ interface URLFormatOptions {
+ auth?: boolean | undefined;
+ fragment?: boolean | undefined;
+ search?: boolean | undefined;
+ unicode?: boolean | undefined;
+ }
+ /**
+ * Browser-compatible `URL` class, implemented by following the WHATWG URL
+ * Standard. [Examples of parsed URLs](https://url.spec.whatwg.org/#example-url-parsing) may be found in the Standard itself.
+ * The `URL` class is also available on the global object.
+ *
+ * In accordance with browser conventions, all properties of `URL` objects
+ * are implemented as getters and setters on the class prototype, rather than as
+ * data properties on the object itself. Thus, unlike `legacy urlObject` s,
+ * using the `delete` keyword on any properties of `URL` objects (e.g. `delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still
+ * return `true`.
+ * @since v7.0.0, v6.13.0
+ */
+ class URL {
+ /**
+ * Creates a `'blob:nodedata:...'` URL string that represents the given `Blob` object and can be used to retrieve the `Blob` later.
+ *
+ * ```js
+ * const {
+ * Blob,
+ * resolveObjectURL,
+ * } = require('node:buffer');
+ *
+ * const blob = new Blob(['hello']);
+ * const id = URL.createObjectURL(blob);
+ *
+ * // later...
+ *
+ * const otherBlob = resolveObjectURL(id);
+ * console.log(otherBlob.size);
+ * ```
+ *
+ * The data stored by the registered `Blob` will be retained in memory until`URL.revokeObjectURL()` is called to remove it.
+ *
+ * `Blob` objects are registered within the current thread. If using Worker
+ * Threads, `Blob` objects registered within one Worker will not be available
+ * to other workers or the main thread.
+ * @since v16.7.0
+ * @experimental
+ */
+ static createObjectURL(blob: NodeBlob): string;
+ /**
+ * Removes the stored `Blob` identified by the given ID. Attempting to revoke a
+ * ID that isn't registered will silently fail.
+ * @since v16.7.0
+ * @experimental
+ * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
+ */
+ static revokeObjectURL(objectUrl: string): void;
+ /**
+ * Checks if an `input` relative to the `base` can be parsed to a `URL`.
+ *
+ * ```js
+ * const isValid = URL.canParse('/foo', 'https://example.org/'); // true
+ *
+ * const isNotValid = URL.canParse('/foo'); // false
+ * ```
+ * @since v19.9.0
+ * @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is
+ * `converted to a string` first.
+ * @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first.
+ */
+ static canParse(input: string, base?: string): boolean;
+ constructor(input: string, base?: string | URL);
+ /**
+ * Gets and sets the fragment portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/foo#bar');
+ * console.log(myURL.hash);
+ * // Prints #bar
+ *
+ * myURL.hash = 'baz';
+ * console.log(myURL.href);
+ * // Prints https://example.org/foo#baz
+ * ```
+ *
+ * Invalid URL characters included in the value assigned to the `hash` property
+ * are `percent-encoded`. The selection of which characters to
+ * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ hash: string;
+ /**
+ * Gets and sets the host portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org:81/foo');
+ * console.log(myURL.host);
+ * // Prints example.org:81
+ *
+ * myURL.host = 'example.com:82';
+ * console.log(myURL.href);
+ * // Prints https://example.com:82/foo
+ * ```
+ *
+ * Invalid host values assigned to the `host` property are ignored.
+ */
+ host: string;
+ /**
+ * Gets and sets the host name portion of the URL. The key difference between`url.host` and `url.hostname` is that `url.hostname` does _not_ include the
+ * port.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org:81/foo');
+ * console.log(myURL.hostname);
+ * // Prints example.org
+ *
+ * // Setting the hostname does not change the port
+ * myURL.hostname = 'example.com';
+ * console.log(myURL.href);
+ * // Prints https://example.com:81/foo
+ *
+ * // Use myURL.host to change the hostname and port
+ * myURL.host = 'example.org:82';
+ * console.log(myURL.href);
+ * // Prints https://example.org:82/foo
+ * ```
+ *
+ * Invalid host name values assigned to the `hostname` property are ignored.
+ */
+ hostname: string;
+ /**
+ * Gets and sets the serialized URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/foo');
+ * console.log(myURL.href);
+ * // Prints https://example.org/foo
+ *
+ * myURL.href = 'https://example.com/bar';
+ * console.log(myURL.href);
+ * // Prints https://example.com/bar
+ * ```
+ *
+ * Getting the value of the `href` property is equivalent to calling {@link toString}.
+ *
+ * Setting the value of this property to a new value is equivalent to creating a
+ * new `URL` object using `new URL(value)`. Each of the `URL`object's properties will be modified.
+ *
+ * If the value assigned to the `href` property is not a valid URL, a `TypeError`will be thrown.
+ */
+ href: string;
+ /**
+ * Gets the read-only serialization of the URL's origin.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/foo/bar?baz');
+ * console.log(myURL.origin);
+ * // Prints https://example.org
+ * ```
+ *
+ * ```js
+ * const idnURL = new URL('https://測試');
+ * console.log(idnURL.origin);
+ * // Prints https://xn--g6w251d
+ *
+ * console.log(idnURL.hostname);
+ * // Prints xn--g6w251d
+ * ```
+ */
+ readonly origin: string;
+ /**
+ * Gets and sets the password portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://abc:xyz@example.com');
+ * console.log(myURL.password);
+ * // Prints xyz
+ *
+ * myURL.password = '123';
+ * console.log(myURL.href);
+ * // Prints https://abc:123@example.com/
+ * ```
+ *
+ * Invalid URL characters included in the value assigned to the `password` property
+ * are `percent-encoded`. The selection of which characters to
+ * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ password: string;
+ /**
+ * Gets and sets the path portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/abc/xyz?123');
+ * console.log(myURL.pathname);
+ * // Prints /abc/xyz
+ *
+ * myURL.pathname = '/abcdef';
+ * console.log(myURL.href);
+ * // Prints https://example.org/abcdef?123
+ * ```
+ *
+ * Invalid URL characters included in the value assigned to the `pathname`property are `percent-encoded`. The selection of which characters
+ * to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ pathname: string;
+ /**
+ * Gets and sets the port portion of the URL.
+ *
+ * The port value may be a number or a string containing a number in the range`0` to `65535` (inclusive). Setting the value to the default port of the`URL` objects given `protocol` will
+ * result in the `port` value becoming
+ * the empty string (`''`).
+ *
+ * The port value can be an empty string in which case the port depends on
+ * the protocol/scheme:
+ *
+ * <omitted>
+ *
+ * Upon assigning a value to the port, the value will first be converted to a
+ * string using `.toString()`.
+ *
+ * If that string is invalid but it begins with a number, the leading number is
+ * assigned to `port`.
+ * If the number lies outside the range denoted above, it is ignored.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org:8888');
+ * console.log(myURL.port);
+ * // Prints 8888
+ *
+ * // Default ports are automatically transformed to the empty string
+ * // (HTTPS protocol's default port is 443)
+ * myURL.port = '443';
+ * console.log(myURL.port);
+ * // Prints the empty string
+ * console.log(myURL.href);
+ * // Prints https://example.org/
+ *
+ * myURL.port = 1234;
+ * console.log(myURL.port);
+ * // Prints 1234
+ * console.log(myURL.href);
+ * // Prints https://example.org:1234/
+ *
+ * // Completely invalid port strings are ignored
+ * myURL.port = 'abcd';
+ * console.log(myURL.port);
+ * // Prints 1234
+ *
+ * // Leading numbers are treated as a port number
+ * myURL.port = '5678abcd';
+ * console.log(myURL.port);
+ * // Prints 5678
+ *
+ * // Non-integers are truncated
+ * myURL.port = 1234.5678;
+ * console.log(myURL.port);
+ * // Prints 1234
+ *
+ * // Out-of-range numbers which are not represented in scientific notation
+ * // will be ignored.
+ * myURL.port = 1e10; // 10000000000, will be range-checked as described below
+ * console.log(myURL.port);
+ * // Prints 1234
+ * ```
+ *
+ * Numbers which contain a decimal point,
+ * such as floating-point numbers or numbers in scientific notation,
+ * are not an exception to this rule.
+ * Leading numbers up to the decimal point will be set as the URL's port,
+ * assuming they are valid:
+ *
+ * ```js
+ * myURL.port = 4.567e21;
+ * console.log(myURL.port);
+ * // Prints 4 (because it is the leading number in the string '4.567e21')
+ * ```
+ */
+ port: string;
+ /**
+ * Gets and sets the protocol portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org');
+ * console.log(myURL.protocol);
+ * // Prints https:
+ *
+ * myURL.protocol = 'ftp';
+ * console.log(myURL.href);
+ * // Prints ftp://example.org/
+ * ```
+ *
+ * Invalid URL protocol values assigned to the `protocol` property are ignored.
+ */
+ protocol: string;
+ /**
+ * Gets and sets the serialized query portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/abc?123');
+ * console.log(myURL.search);
+ * // Prints ?123
+ *
+ * myURL.search = 'abc=xyz';
+ * console.log(myURL.href);
+ * // Prints https://example.org/abc?abc=xyz
+ * ```
+ *
+ * Any invalid URL characters appearing in the value assigned the `search`property will be `percent-encoded`. The selection of which
+ * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ search: string;
+ /**
+ * Gets the `URLSearchParams` object representing the query parameters of the
+ * URL. This property is read-only but the `URLSearchParams` object it provides
+ * can be used to mutate the URL instance; to replace the entirety of query
+ * parameters of the URL, use the {@link search} setter. See `URLSearchParams` documentation for details.
+ *
+ * Use care when using `.searchParams` to modify the `URL` because,
+ * per the WHATWG specification, the `URLSearchParams` object uses
+ * different rules to determine which characters to percent-encode. For
+ * instance, the `URL` object will not percent encode the ASCII tilde (`~`)
+ * character, while `URLSearchParams` will always encode it:
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/abc?foo=~bar');
+ *
+ * console.log(myURL.search); // prints ?foo=~bar
+ *
+ * // Modify the URL via searchParams...
+ * myURL.searchParams.sort();
+ *
+ * console.log(myURL.search); // prints ?foo=%7Ebar
+ * ```
+ */
+ readonly searchParams: URLSearchParams;
+ /**
+ * Gets and sets the username portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://abc:xyz@example.com');
+ * console.log(myURL.username);
+ * // Prints abc
+ *
+ * myURL.username = '123';
+ * console.log(myURL.href);
+ * // Prints https://123:xyz@example.com/
+ * ```
+ *
+ * Any invalid URL characters appearing in the value assigned the `username`property will be `percent-encoded`. The selection of which
+ * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ username: string;
+ /**
+ * The `toString()` method on the `URL` object returns the serialized URL. The
+ * value returned is equivalent to that of {@link href} and {@link toJSON}.
+ */
+ toString(): string;
+ /**
+ * The `toJSON()` method on the `URL` object returns the serialized URL. The
+ * value returned is equivalent to that of {@link href} and {@link toString}.
+ *
+ * This method is automatically called when an `URL` object is serialized
+ * with [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).
+ *
+ * ```js
+ * const myURLs = [
+ * new URL('https://www.example.com'),
+ * new URL('https://test.example.org'),
+ * ];
+ * console.log(JSON.stringify(myURLs));
+ * // Prints ["https://www.example.com/","https://test.example.org/"]
+ * ```
+ */
+ toJSON(): string;
+ }
+ /**
+ * The `URLSearchParams` API provides read and write access to the query of a`URL`. The `URLSearchParams` class can also be used standalone with one of the
+ * four following constructors.
+ * The `URLSearchParams` class is also available on the global object.
+ *
+ * The WHATWG `URLSearchParams` interface and the `querystring` module have
+ * similar purpose, but the purpose of the `querystring` module is more
+ * general, as it allows the customization of delimiter characters (`&#x26;` and `=`).
+ * On the other hand, this API is designed purely for URL query strings.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/?abc=123');
+ * console.log(myURL.searchParams.get('abc'));
+ * // Prints 123
+ *
+ * myURL.searchParams.append('abc', 'xyz');
+ * console.log(myURL.href);
+ * // Prints https://example.org/?abc=123&#x26;abc=xyz
+ *
+ * myURL.searchParams.delete('abc');
+ * myURL.searchParams.set('a', 'b');
+ * console.log(myURL.href);
+ * // Prints https://example.org/?a=b
+ *
+ * const newSearchParams = new URLSearchParams(myURL.searchParams);
+ * // The above is equivalent to
+ * // const newSearchParams = new URLSearchParams(myURL.search);
+ *
+ * newSearchParams.append('a', 'c');
+ * console.log(myURL.href);
+ * // Prints https://example.org/?a=b
+ * console.log(newSearchParams.toString());
+ * // Prints a=b&#x26;a=c
+ *
+ * // newSearchParams.toString() is implicitly called
+ * myURL.search = newSearchParams;
+ * console.log(myURL.href);
+ * // Prints https://example.org/?a=b&#x26;a=c
+ * newSearchParams.delete('a');
+ * console.log(myURL.href);
+ * // Prints https://example.org/?a=b&#x26;a=c
+ * ```
+ * @since v7.5.0, v6.13.0
+ */
+ class URLSearchParams implements Iterable<[string, string]> {
+ constructor(init?: URLSearchParams | string | Record<string, string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
+ /**
+ * Append a new name-value pair to the query string.
+ */
+ append(name: string, value: string): void;
+ /**
+ * If `value` is provided, removes all name-value pairs
+ * where name is `name` and value is `value`..
+ *
+ * If `value` is not provided, removes all name-value pairs whose name is `name`.
+ */
+ delete(name: string, value?: string): void;
+ /**
+ * Returns an ES6 `Iterator` over each of the name-value pairs in the query.
+ * Each item of the iterator is a JavaScript `Array`. The first item of the `Array`is the `name`, the second item of the `Array` is the `value`.
+ *
+ * Alias for `urlSearchParams[@@iterator]()`.
+ */
+ entries(): IterableIterator<[string, string]>;
+ /**
+ * Iterates over each name-value pair in the query and invokes the given function.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/?a=b&#x26;c=d');
+ * myURL.searchParams.forEach((value, name, searchParams) => {
+ * console.log(name, value, myURL.searchParams === searchParams);
+ * });
+ * // Prints:
+ * // a b true
+ * // c d true
+ * ```
+ * @param fn Invoked for each name-value pair in the query
+ * @param thisArg To be used as `this` value for when `fn` is called
+ */
+ forEach<TThis = this>(callback: (this: TThis, value: string, name: string, searchParams: URLSearchParams) => void, thisArg?: TThis): void;
+ /**
+ * Returns the value of the first name-value pair whose name is `name`. If there
+ * are no such pairs, `null` is returned.
+ * @return or `null` if there is no name-value pair with the given `name`.
+ */
+ get(name: string): string | null;
+ /**
+ * Returns the values of all name-value pairs whose name is `name`. If there are
+ * no such pairs, an empty array is returned.
+ */
+ getAll(name: string): string[];
+ /**
+ * Checks if the `URLSearchParams` object contains key-value pair(s) based on`name` and an optional `value` argument.
+ *
+ * If `value` is provided, returns `true` when name-value pair with
+ * same `name` and `value` exists.
+ *
+ * If `value` is not provided, returns `true` if there is at least one name-value
+ * pair whose name is `name`.
+ */
+ has(name: string, value?: string): boolean;
+ /**
+ * Returns an ES6 `Iterator` over the names of each name-value pair.
+ *
+ * ```js
+ * const params = new URLSearchParams('foo=bar&#x26;foo=baz');
+ * for (const name of params.keys()) {
+ * console.log(name);
+ * }
+ * // Prints:
+ * // foo
+ * // foo
+ * ```
+ */
+ keys(): IterableIterator<string>;
+ /**
+ * Sets the value in the `URLSearchParams` object associated with `name` to`value`. If there are any pre-existing name-value pairs whose names are `name`,
+ * set the first such pair's value to `value` and remove all others. If not,
+ * append the name-value pair to the query string.
+ *
+ * ```js
+ * const params = new URLSearchParams();
+ * params.append('foo', 'bar');
+ * params.append('foo', 'baz');
+ * params.append('abc', 'def');
+ * console.log(params.toString());
+ * // Prints foo=bar&#x26;foo=baz&#x26;abc=def
+ *
+ * params.set('foo', 'def');
+ * params.set('xyz', 'opq');
+ * console.log(params.toString());
+ * // Prints foo=def&#x26;abc=def&#x26;xyz=opq
+ * ```
+ */
+ set(name: string, value: string): void;
+ /**
+ * The total number of parameter entries.
+ * @since v19.8.0
+ */
+ readonly size: number;
+ /**
+ * Sort all existing name-value pairs in-place by their names. Sorting is done
+ * with a [stable sorting algorithm](https://en.wikipedia.org/wiki/Sorting_algorithm#Stability), so relative order between name-value pairs
+ * with the same name is preserved.
+ *
+ * This method can be used, in particular, to increase cache hits.
+ *
+ * ```js
+ * const params = new URLSearchParams('query[]=abc&#x26;type=search&#x26;query[]=123');
+ * params.sort();
+ * console.log(params.toString());
+ * // Prints query%5B%5D=abc&#x26;query%5B%5D=123&#x26;type=search
+ * ```
+ * @since v7.7.0, v6.13.0
+ */
+ sort(): void;
+ /**
+ * Returns the search parameters serialized as a string, with characters
+ * percent-encoded where necessary.
+ */
+ toString(): string;
+ /**
+ * Returns an ES6 `Iterator` over the values of each name-value pair.
+ */
+ values(): IterableIterator<string>;
+ [Symbol.iterator](): IterableIterator<[string, string]>;
+ }
+ import { URL as _URL, URLSearchParams as _URLSearchParams } from 'url';
+ global {
+ interface URLSearchParams extends _URLSearchParams {}
+ interface URL extends _URL {}
+ interface Global {
+ URL: typeof _URL;
+ URLSearchParams: typeof _URLSearchParams;
+ }
+ /**
+ * `URL` class is a global reference for `require('url').URL`
+ * https://nodejs.org/api/url.html#the-whatwg-url-api
+ * @since v10.0.0
+ */
+ var URL: typeof globalThis extends {
+ onmessage: any;
+ URL: infer T;
+ }
+ ? T
+ : typeof _URL;
+ /**
+ * `URLSearchParams` class is a global reference for `require('url').URLSearchParams`
+ * https://nodejs.org/api/url.html#class-urlsearchparams
+ * @since v10.0.0
+ */
+ var URLSearchParams: typeof globalThis extends {
+ onmessage: any;
+ URLSearchParams: infer T;
+ }
+ ? T
+ : typeof _URLSearchParams;
+ }
+}
+declare module 'node:url' {
+ export * from 'url';
+}
diff --git a/node_modules/@types/node/ts4.8/util.d.ts b/node_modules/@types/node/ts4.8/util.d.ts
new file mode 100755
index 0000000..df1fd12
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/util.d.ts
@@ -0,0 +1,2116 @@
+/**
+ * The `node:util` module supports the needs of Node.js internal APIs. Many of the
+ * utilities are useful for application and module developers as well. To access
+ * it:
+ *
+ * ```js
+ * const util = require('node:util');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/util.js)
+ */
+declare module 'util' {
+ import * as types from 'node:util/types';
+ export interface InspectOptions {
+ /**
+ * If `true`, object's non-enumerable symbols and properties are included in the formatted result.
+ * `WeakMap` and `WeakSet` entries are also included as well as user defined prototype properties (excluding method properties).
+ * @default false
+ */
+ showHidden?: boolean | undefined;
+ /**
+ * Specifies the number of times to recurse while formatting object.
+ * This is useful for inspecting large objects.
+ * To recurse up to the maximum call stack size pass `Infinity` or `null`.
+ * @default 2
+ */
+ depth?: number | null | undefined;
+ /**
+ * If `true`, the output is styled with ANSI color codes. Colors are customizable.
+ */
+ colors?: boolean | undefined;
+ /**
+ * If `false`, `[util.inspect.custom](depth, opts, inspect)` functions are not invoked.
+ * @default true
+ */
+ customInspect?: boolean | undefined;
+ /**
+ * If `true`, `Proxy` inspection includes the target and handler objects.
+ * @default false
+ */
+ showProxy?: boolean | undefined;
+ /**
+ * Specifies the maximum number of `Array`, `TypedArray`, `WeakMap`, and `WeakSet` elements
+ * to include when formatting. Set to `null` or `Infinity` to show all elements.
+ * Set to `0` or negative to show no elements.
+ * @default 100
+ */
+ maxArrayLength?: number | null | undefined;
+ /**
+ * Specifies the maximum number of characters to
+ * include when formatting. Set to `null` or `Infinity` to show all elements.
+ * Set to `0` or negative to show no characters.
+ * @default 10000
+ */
+ maxStringLength?: number | null | undefined;
+ /**
+ * The length at which input values are split across multiple lines.
+ * Set to `Infinity` to format the input as a single line
+ * (in combination with `compact` set to `true` or any number >= `1`).
+ * @default 80
+ */
+ breakLength?: number | undefined;
+ /**
+ * Setting this to `false` causes each object key
+ * to be displayed on a new line. It will also add new lines to text that is
+ * longer than `breakLength`. If set to a number, the most `n` inner elements
+ * are united on a single line as long as all properties fit into
+ * `breakLength`. Short array elements are also grouped together. Note that no
+ * text will be reduced below 16 characters, no matter the `breakLength` size.
+ * For more information, see the example below.
+ * @default true
+ */
+ compact?: boolean | number | undefined;
+ /**
+ * If set to `true` or a function, all properties of an object, and `Set` and `Map`
+ * entries are sorted in the resulting string.
+ * If set to `true` the default sort is used.
+ * If set to a function, it is used as a compare function.
+ */
+ sorted?: boolean | ((a: string, b: string) => number) | undefined;
+ /**
+ * If set to `true`, getters are going to be
+ * inspected as well. If set to `'get'` only getters without setter are going
+ * to be inspected. If set to `'set'` only getters having a corresponding
+ * setter are going to be inspected. This might cause side effects depending on
+ * the getter function.
+ * @default false
+ */
+ getters?: 'get' | 'set' | boolean | undefined;
+ /**
+ * If set to `true`, an underscore is used to separate every three digits in all bigints and numbers.
+ * @default false
+ */
+ numericSeparator?: boolean | undefined;
+ }
+ export type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module';
+ export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => any; // TODO: , inspect: inspect
+ export interface InspectOptionsStylized extends InspectOptions {
+ stylize(text: string, styleType: Style): string;
+ }
+ /**
+ * The `util.format()` method returns a formatted string using the first argument
+ * as a `printf`\-like format string which can contain zero or more format
+ * specifiers. Each specifier is replaced with the converted value from the
+ * corresponding argument. Supported specifiers are:
+ *
+ * If a specifier does not have a corresponding argument, it is not replaced:
+ *
+ * ```js
+ * util.format('%s:%s', 'foo');
+ * // Returns: 'foo:%s'
+ * ```
+ *
+ * Values that are not part of the format string are formatted using`util.inspect()` if their type is not `string`.
+ *
+ * If there are more arguments passed to the `util.format()` method than the
+ * number of specifiers, the extra arguments are concatenated to the returned
+ * string, separated by spaces:
+ *
+ * ```js
+ * util.format('%s:%s', 'foo', 'bar', 'baz');
+ * // Returns: 'foo:bar baz'
+ * ```
+ *
+ * If the first argument does not contain a valid format specifier, `util.format()`returns a string that is the concatenation of all arguments separated by spaces:
+ *
+ * ```js
+ * util.format(1, 2, 3);
+ * // Returns: '1 2 3'
+ * ```
+ *
+ * If only one argument is passed to `util.format()`, it is returned as it is
+ * without any formatting:
+ *
+ * ```js
+ * util.format('%% %s');
+ * // Returns: '%% %s'
+ * ```
+ *
+ * `util.format()` is a synchronous method that is intended as a debugging tool.
+ * Some input values can have a significant performance overhead that can block the
+ * event loop. Use this function with care and never in a hot code path.
+ * @since v0.5.3
+ * @param format A `printf`-like format string.
+ */
+ export function format(format?: any, ...param: any[]): string;
+ /**
+ * This function is identical to {@link format}, except in that it takes
+ * an `inspectOptions` argument which specifies options that are passed along to {@link inspect}.
+ *
+ * ```js
+ * util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 });
+ * // Returns 'See object { foo: 42 }', where `42` is colored as a number
+ * // when printed to a terminal.
+ * ```
+ * @since v10.0.0
+ */
+ export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
+ /**
+ * Returns the string name for a numeric error code that comes from a Node.js API.
+ * The mapping between error codes and error names is platform-dependent.
+ * See `Common System Errors` for the names of common errors.
+ *
+ * ```js
+ * fs.access('file/that/does/not/exist', (err) => {
+ * const name = util.getSystemErrorName(err.errno);
+ * console.error(name); // ENOENT
+ * });
+ * ```
+ * @since v9.7.0
+ */
+ export function getSystemErrorName(err: number): string;
+ /**
+ * Returns a Map of all system error codes available from the Node.js API.
+ * The mapping between error codes and error names is platform-dependent.
+ * See `Common System Errors` for the names of common errors.
+ *
+ * ```js
+ * fs.access('file/that/does/not/exist', (err) => {
+ * const errorMap = util.getSystemErrorMap();
+ * const name = errorMap.get(err.errno);
+ * console.error(name); // ENOENT
+ * });
+ * ```
+ * @since v16.0.0, v14.17.0
+ */
+ export function getSystemErrorMap(): Map<number, [string, string]>;
+ /**
+ * The `util.log()` method prints the given `string` to `stdout` with an included
+ * timestamp.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.log('Timestamped message.');
+ * ```
+ * @since v0.3.0
+ * @deprecated Since v6.0.0 - Use a third party module instead.
+ */
+ export function log(string: string): void;
+ /**
+ * Returns the `string` after replacing any surrogate code points
+ * (or equivalently, any unpaired surrogate code units) with the
+ * Unicode "replacement character" U+FFFD.
+ * @since v16.8.0, v14.18.0
+ */
+ export function toUSVString(string: string): string;
+ /**
+ * Creates and returns an `AbortController` instance whose `AbortSignal` is marked
+ * as transferable and can be used with `structuredClone()` or `postMessage()`.
+ * @since v18.11.0
+ * @experimental
+ * @returns A transferable AbortController
+ */
+ export function transferableAbortController(): AbortController;
+ /**
+ * Marks the given `AbortSignal` as transferable so that it can be used with`structuredClone()` and `postMessage()`.
+ *
+ * ```js
+ * const signal = transferableAbortSignal(AbortSignal.timeout(100));
+ * const channel = new MessageChannel();
+ * channel.port2.postMessage(signal, [signal]);
+ * ```
+ * @since v18.11.0
+ * @experimental
+ * @param signal The AbortSignal
+ * @returns The same AbortSignal
+ */
+ export function transferableAbortSignal(signal: AbortSignal): AbortSignal;
+ /**
+ * Listens to abort event on the provided `signal` and
+ * returns a promise that is fulfilled when the `signal` is
+ * aborted. If the passed `resource` is garbage collected before the `signal` is
+ * aborted, the returned promise shall remain pending indefinitely.
+ *
+ * ```js
+ * import { aborted } from 'node:util';
+ *
+ * const dependent = obtainSomethingAbortable();
+ *
+ * aborted(dependent.signal, dependent).then(() => {
+ * // Do something when dependent is aborted.
+ * });
+ *
+ * dependent.on('event', () => {
+ * dependent.abort();
+ * });
+ * ```
+ * @since v19.7.0
+ * @experimental
+ * @param resource Any non-null entity, reference to which is held weakly.
+ */
+ export function aborted(signal: AbortSignal, resource: any): Promise<void>;
+ /**
+ * The `util.inspect()` method returns a string representation of `object` that is
+ * intended for debugging. The output of `util.inspect` may change at any time
+ * and should not be depended upon programmatically. Additional `options` may be
+ * passed that alter the result.`util.inspect()` will use the constructor's name and/or `@@toStringTag` to make
+ * an identifiable tag for an inspected value.
+ *
+ * ```js
+ * class Foo {
+ * get [Symbol.toStringTag]() {
+ * return 'bar';
+ * }
+ * }
+ *
+ * class Bar {}
+ *
+ * const baz = Object.create(null, { [Symbol.toStringTag]: { value: 'foo' } });
+ *
+ * util.inspect(new Foo()); // 'Foo [bar] {}'
+ * util.inspect(new Bar()); // 'Bar {}'
+ * util.inspect(baz); // '[foo] {}'
+ * ```
+ *
+ * Circular references point to their anchor by using a reference index:
+ *
+ * ```js
+ * const { inspect } = require('node:util');
+ *
+ * const obj = {};
+ * obj.a = [obj];
+ * obj.b = {};
+ * obj.b.inner = obj.b;
+ * obj.b.obj = obj;
+ *
+ * console.log(inspect(obj));
+ * // <ref *1> {
+ * // a: [ [Circular *1] ],
+ * // b: <ref *2> { inner: [Circular *2], obj: [Circular *1] }
+ * // }
+ * ```
+ *
+ * The following example inspects all properties of the `util` object:
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * console.log(util.inspect(util, { showHidden: true, depth: null }));
+ * ```
+ *
+ * The following example highlights the effect of the `compact` option:
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * const o = {
+ * a: [1, 2, [[
+ * 'Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit, sed do ' +
+ * 'eiusmod \ntempor incididunt ut labore et dolore magna aliqua.',
+ * 'test',
+ * 'foo']], 4],
+ * b: new Map([['za', 1], ['zb', 'test']]),
+ * };
+ * console.log(util.inspect(o, { compact: true, depth: 5, breakLength: 80 }));
+ *
+ * // { a:
+ * // [ 1,
+ * // 2,
+ * // [ [ 'Lorem ipsum dolor sit amet,\nconsectetur [...]', // A long line
+ * // 'test',
+ * // 'foo' ] ],
+ * // 4 ],
+ * // b: Map(2) { 'za' => 1, 'zb' => 'test' } }
+ *
+ * // Setting `compact` to false or an integer creates more reader friendly output.
+ * console.log(util.inspect(o, { compact: false, depth: 5, breakLength: 80 }));
+ *
+ * // {
+ * // a: [
+ * // 1,
+ * // 2,
+ * // [
+ * // [
+ * // 'Lorem ipsum dolor sit amet,\n' +
+ * // 'consectetur adipiscing elit, sed do eiusmod \n' +
+ * // 'tempor incididunt ut labore et dolore magna aliqua.',
+ * // 'test',
+ * // 'foo'
+ * // ]
+ * // ],
+ * // 4
+ * // ],
+ * // b: Map(2) {
+ * // 'za' => 1,
+ * // 'zb' => 'test'
+ * // }
+ * // }
+ *
+ * // Setting `breakLength` to e.g. 150 will print the "Lorem ipsum" text in a
+ * // single line.
+ * ```
+ *
+ * The `showHidden` option allows [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) and
+ * [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries to be
+ * inspected. If there are more entries than `maxArrayLength`, there is no
+ * guarantee which entries are displayed. That means retrieving the same [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries twice may
+ * result in different output. Furthermore, entries
+ * with no remaining strong references may be garbage collected at any time.
+ *
+ * ```js
+ * const { inspect } = require('node:util');
+ *
+ * const obj = { a: 1 };
+ * const obj2 = { b: 2 };
+ * const weakSet = new WeakSet([obj, obj2]);
+ *
+ * console.log(inspect(weakSet, { showHidden: true }));
+ * // WeakSet { { a: 1 }, { b: 2 } }
+ * ```
+ *
+ * The `sorted` option ensures that an object's property insertion order does not
+ * impact the result of `util.inspect()`.
+ *
+ * ```js
+ * const { inspect } = require('node:util');
+ * const assert = require('node:assert');
+ *
+ * const o1 = {
+ * b: [2, 3, 1],
+ * a: '`a` comes before `b`',
+ * c: new Set([2, 3, 1]),
+ * };
+ * console.log(inspect(o1, { sorted: true }));
+ * // { a: '`a` comes before `b`', b: [ 2, 3, 1 ], c: Set(3) { 1, 2, 3 } }
+ * console.log(inspect(o1, { sorted: (a, b) => b.localeCompare(a) }));
+ * // { c: Set(3) { 3, 2, 1 }, b: [ 2, 3, 1 ], a: '`a` comes before `b`' }
+ *
+ * const o2 = {
+ * c: new Set([2, 1, 3]),
+ * a: '`a` comes before `b`',
+ * b: [2, 3, 1],
+ * };
+ * assert.strict.equal(
+ * inspect(o1, { sorted: true }),
+ * inspect(o2, { sorted: true }),
+ * );
+ * ```
+ *
+ * The `numericSeparator` option adds an underscore every three digits to all
+ * numbers.
+ *
+ * ```js
+ * const { inspect } = require('node:util');
+ *
+ * const thousand = 1_000;
+ * const million = 1_000_000;
+ * const bigNumber = 123_456_789n;
+ * const bigDecimal = 1_234.123_45;
+ *
+ * console.log(thousand, million, bigNumber, bigDecimal);
+ * // 1_000 1_000_000 123_456_789n 1_234.123_45
+ * ```
+ *
+ * `util.inspect()` is a synchronous method intended for debugging. Its maximum
+ * output length is approximately 128 MiB. Inputs that result in longer output will
+ * be truncated.
+ * @since v0.3.0
+ * @param object Any JavaScript primitive or `Object`.
+ * @return The representation of `object`.
+ */
+ export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
+ export function inspect(object: any, options?: InspectOptions): string;
+ export namespace inspect {
+ let colors: NodeJS.Dict<[number, number]>;
+ let styles: {
+ [K in Style]: string;
+ };
+ let defaultOptions: InspectOptions;
+ /**
+ * Allows changing inspect settings from the repl.
+ */
+ let replDefaults: InspectOptions;
+ /**
+ * That can be used to declare custom inspect functions.
+ */
+ const custom: unique symbol;
+ }
+ /**
+ * Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray).
+ *
+ * Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isArray([]);
+ * // Returns: true
+ * util.isArray(new Array());
+ * // Returns: true
+ * util.isArray({});
+ * // Returns: false
+ * ```
+ * @since v0.6.0
+ * @deprecated Since v4.0.0 - Use `isArray` instead.
+ */
+ export function isArray(object: unknown): object is unknown[];
+ /**
+ * Returns `true` if the given `object` is a `RegExp`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isRegExp(/some regexp/);
+ * // Returns: true
+ * util.isRegExp(new RegExp('another regexp'));
+ * // Returns: true
+ * util.isRegExp({});
+ * // Returns: false
+ * ```
+ * @since v0.6.0
+ * @deprecated Since v4.0.0 - Deprecated
+ */
+ export function isRegExp(object: unknown): object is RegExp;
+ /**
+ * Returns `true` if the given `object` is a `Date`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isDate(new Date());
+ * // Returns: true
+ * util.isDate(Date());
+ * // false (without 'new' returns a String)
+ * util.isDate({});
+ * // Returns: false
+ * ```
+ * @since v0.6.0
+ * @deprecated Since v4.0.0 - Use {@link types.isDate} instead.
+ */
+ export function isDate(object: unknown): object is Date;
+ /**
+ * Returns `true` if the given `object` is an `Error`. Otherwise, returns`false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isError(new Error());
+ * // Returns: true
+ * util.isError(new TypeError());
+ * // Returns: true
+ * util.isError({ name: 'Error', message: 'an error occurred' });
+ * // Returns: false
+ * ```
+ *
+ * This method relies on `Object.prototype.toString()` behavior. It is
+ * possible to obtain an incorrect result when the `object` argument manipulates`@@toStringTag`.
+ *
+ * ```js
+ * const util = require('node:util');
+ * const obj = { name: 'Error', message: 'an error occurred' };
+ *
+ * util.isError(obj);
+ * // Returns: false
+ * obj[Symbol.toStringTag] = 'Error';
+ * util.isError(obj);
+ * // Returns: true
+ * ```
+ * @since v0.6.0
+ * @deprecated Since v4.0.0 - Use {@link types.isNativeError} instead.
+ */
+ export function isError(object: unknown): object is Error;
+ /**
+ * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and`extends` keywords to get language level inheritance support. Also note
+ * that the two styles are [semantically incompatible](https://github.com/nodejs/node/issues/4179).
+ *
+ * Inherit the prototype methods from one [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The
+ * prototype of `constructor` will be set to a new object created from`superConstructor`.
+ *
+ * This mainly adds some input validation on top of`Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`.
+ * As an additional convenience, `superConstructor` will be accessible
+ * through the `constructor.super_` property.
+ *
+ * ```js
+ * const util = require('node:util');
+ * const EventEmitter = require('node:events');
+ *
+ * function MyStream() {
+ * EventEmitter.call(this);
+ * }
+ *
+ * util.inherits(MyStream, EventEmitter);
+ *
+ * MyStream.prototype.write = function(data) {
+ * this.emit('data', data);
+ * };
+ *
+ * const stream = new MyStream();
+ *
+ * console.log(stream instanceof EventEmitter); // true
+ * console.log(MyStream.super_ === EventEmitter); // true
+ *
+ * stream.on('data', (data) => {
+ * console.log(`Received data: "${data}"`);
+ * });
+ * stream.write('It works!'); // Received data: "It works!"
+ * ```
+ *
+ * ES6 example using `class` and `extends`:
+ *
+ * ```js
+ * const EventEmitter = require('node:events');
+ *
+ * class MyStream extends EventEmitter {
+ * write(data) {
+ * this.emit('data', data);
+ * }
+ * }
+ *
+ * const stream = new MyStream();
+ *
+ * stream.on('data', (data) => {
+ * console.log(`Received data: "${data}"`);
+ * });
+ * stream.write('With ES6');
+ * ```
+ * @since v0.3.0
+ * @legacy Use ES2015 class syntax and `extends` keyword instead.
+ */
+ export function inherits(constructor: unknown, superConstructor: unknown): void;
+ export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void;
+ export interface DebugLogger extends DebugLoggerFunction {
+ enabled: boolean;
+ }
+ /**
+ * The `util.debuglog()` method is used to create a function that conditionally
+ * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG`environment variable. If the `section` name appears within the value of that
+ * environment variable, then the returned function operates similar to `console.error()`. If not, then the returned function is a no-op.
+ *
+ * ```js
+ * const util = require('node:util');
+ * const debuglog = util.debuglog('foo');
+ *
+ * debuglog('hello from foo [%d]', 123);
+ * ```
+ *
+ * If this program is run with `NODE_DEBUG=foo` in the environment, then
+ * it will output something like:
+ *
+ * ```console
+ * FOO 3245: hello from foo [123]
+ * ```
+ *
+ * where `3245` is the process id. If it is not run with that
+ * environment variable set, then it will not print anything.
+ *
+ * The `section` supports wildcard also:
+ *
+ * ```js
+ * const util = require('node:util');
+ * const debuglog = util.debuglog('foo-bar');
+ *
+ * debuglog('hi there, it\'s foo-bar [%d]', 2333);
+ * ```
+ *
+ * if it is run with `NODE_DEBUG=foo*` in the environment, then it will output
+ * something like:
+ *
+ * ```console
+ * FOO-BAR 3257: hi there, it's foo-bar [2333]
+ * ```
+ *
+ * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG`environment variable: `NODE_DEBUG=fs,net,tls`.
+ *
+ * The optional `callback` argument can be used to replace the logging function
+ * with a different function that doesn't have any initialization or
+ * unnecessary wrapping.
+ *
+ * ```js
+ * const util = require('node:util');
+ * let debuglog = util.debuglog('internals', (debug) => {
+ * // Replace with a logging function that optimizes out
+ * // testing if the section is enabled
+ * debuglog = debug;
+ * });
+ * ```
+ * @since v0.11.3
+ * @param section A string identifying the portion of the application for which the `debuglog` function is being created.
+ * @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function.
+ * @return The logging function
+ */
+ export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger;
+ export const debug: typeof debuglog;
+ /**
+ * Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isBoolean(1);
+ * // Returns: false
+ * util.isBoolean(0);
+ * // Returns: false
+ * util.isBoolean(false);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'boolean'` instead.
+ */
+ export function isBoolean(object: unknown): object is boolean;
+ /**
+ * Returns `true` if the given `object` is a `Buffer`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isBuffer({ length: 0 });
+ * // Returns: false
+ * util.isBuffer([]);
+ * // Returns: false
+ * util.isBuffer(Buffer.from('hello world'));
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `isBuffer` instead.
+ */
+ export function isBuffer(object: unknown): object is Buffer;
+ /**
+ * Returns `true` if the given `object` is a `Function`. Otherwise, returns`false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * function Foo() {}
+ * const Bar = () => {};
+ *
+ * util.isFunction({});
+ * // Returns: false
+ * util.isFunction(Foo);
+ * // Returns: true
+ * util.isFunction(Bar);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'function'` instead.
+ */
+ export function isFunction(object: unknown): boolean;
+ /**
+ * Returns `true` if the given `object` is strictly `null`. Otherwise, returns`false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isNull(0);
+ * // Returns: false
+ * util.isNull(undefined);
+ * // Returns: false
+ * util.isNull(null);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `value === null` instead.
+ */
+ export function isNull(object: unknown): object is null;
+ /**
+ * Returns `true` if the given `object` is `null` or `undefined`. Otherwise,
+ * returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isNullOrUndefined(0);
+ * // Returns: false
+ * util.isNullOrUndefined(undefined);
+ * // Returns: true
+ * util.isNullOrUndefined(null);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `value === undefined || value === null` instead.
+ */
+ export function isNullOrUndefined(object: unknown): object is null | undefined;
+ /**
+ * Returns `true` if the given `object` is a `Number`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isNumber(false);
+ * // Returns: false
+ * util.isNumber(Infinity);
+ * // Returns: true
+ * util.isNumber(0);
+ * // Returns: true
+ * util.isNumber(NaN);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'number'` instead.
+ */
+ export function isNumber(object: unknown): object is number;
+ /**
+ * Returns `true` if the given `object` is strictly an `Object`**and** not a`Function` (even though functions are objects in JavaScript).
+ * Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isObject(5);
+ * // Returns: false
+ * util.isObject(null);
+ * // Returns: false
+ * util.isObject({});
+ * // Returns: true
+ * util.isObject(() => {});
+ * // Returns: false
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `value !== null && typeof value === 'object'` instead.
+ */
+ export function isObject(object: unknown): boolean;
+ /**
+ * Returns `true` if the given `object` is a primitive type. Otherwise, returns`false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isPrimitive(5);
+ * // Returns: true
+ * util.isPrimitive('foo');
+ * // Returns: true
+ * util.isPrimitive(false);
+ * // Returns: true
+ * util.isPrimitive(null);
+ * // Returns: true
+ * util.isPrimitive(undefined);
+ * // Returns: true
+ * util.isPrimitive({});
+ * // Returns: false
+ * util.isPrimitive(() => {});
+ * // Returns: false
+ * util.isPrimitive(/^$/);
+ * // Returns: false
+ * util.isPrimitive(new Date());
+ * // Returns: false
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead.
+ */
+ export function isPrimitive(object: unknown): boolean;
+ /**
+ * Returns `true` if the given `object` is a `string`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isString('');
+ * // Returns: true
+ * util.isString('foo');
+ * // Returns: true
+ * util.isString(String('foo'));
+ * // Returns: true
+ * util.isString(5);
+ * // Returns: false
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'string'` instead.
+ */
+ export function isString(object: unknown): object is string;
+ /**
+ * Returns `true` if the given `object` is a `Symbol`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isSymbol(5);
+ * // Returns: false
+ * util.isSymbol('foo');
+ * // Returns: false
+ * util.isSymbol(Symbol('foo'));
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'symbol'` instead.
+ */
+ export function isSymbol(object: unknown): object is symbol;
+ /**
+ * Returns `true` if the given `object` is `undefined`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * const foo = undefined;
+ * util.isUndefined(5);
+ * // Returns: false
+ * util.isUndefined(foo);
+ * // Returns: true
+ * util.isUndefined(null);
+ * // Returns: false
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `value === undefined` instead.
+ */
+ export function isUndefined(object: unknown): object is undefined;
+ /**
+ * The `util.deprecate()` method wraps `fn` (which may be a function or class) in
+ * such a way that it is marked as deprecated.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * exports.obsoleteFunction = util.deprecate(() => {
+ * // Do something here.
+ * }, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.');
+ * ```
+ *
+ * When called, `util.deprecate()` will return a function that will emit a`DeprecationWarning` using the `'warning'` event. The warning will
+ * be emitted and printed to `stderr` the first time the returned function is
+ * called. After the warning is emitted, the wrapped function is called without
+ * emitting a warning.
+ *
+ * If the same optional `code` is supplied in multiple calls to `util.deprecate()`,
+ * the warning will be emitted only once for that `code`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * const fn1 = util.deprecate(someFunction, someMessage, 'DEP0001');
+ * const fn2 = util.deprecate(someOtherFunction, someOtherMessage, 'DEP0001');
+ * fn1(); // Emits a deprecation warning with code DEP0001
+ * fn2(); // Does not emit a deprecation warning because it has the same code
+ * ```
+ *
+ * If either the `--no-deprecation` or `--no-warnings` command-line flags are
+ * used, or if the `process.noDeprecation` property is set to `true`_prior_ to
+ * the first deprecation warning, the `util.deprecate()` method does nothing.
+ *
+ * If the `--trace-deprecation` or `--trace-warnings` command-line flags are set,
+ * or the `process.traceDeprecation` property is set to `true`, a warning and a
+ * stack trace are printed to `stderr` the first time the deprecated function is
+ * called.
+ *
+ * If the `--throw-deprecation` command-line flag is set, or the`process.throwDeprecation` property is set to `true`, then an exception will be
+ * thrown when the deprecated function is called.
+ *
+ * The `--throw-deprecation` command-line flag and `process.throwDeprecation`property take precedence over `--trace-deprecation` and`process.traceDeprecation`.
+ * @since v0.8.0
+ * @param fn The function that is being deprecated.
+ * @param msg A warning message to display when the deprecated function is invoked.
+ * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes.
+ * @return The deprecated function wrapped to emit a warning.
+ */
+ export function deprecate<T extends Function>(fn: T, msg: string, code?: string): T;
+ /**
+ * Returns `true` if there is deep strict equality between `val1` and `val2`.
+ * Otherwise, returns `false`.
+ *
+ * See `assert.deepStrictEqual()` for more information about deep strict
+ * equality.
+ * @since v9.0.0
+ */
+ export function isDeepStrictEqual(val1: unknown, val2: unknown): boolean;
+ /**
+ * Returns `str` with any ANSI escape codes removed.
+ *
+ * ```js
+ * console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m'));
+ * // Prints "value"
+ * ```
+ * @since v16.11.0
+ */
+ export function stripVTControlCharacters(str: string): string;
+ /**
+ * Takes an `async` function (or a function that returns a `Promise`) and returns a
+ * function following the error-first callback style, i.e. taking
+ * an `(err, value) => ...` callback as the last argument. In the callback, the
+ * first argument will be the rejection reason (or `null` if the `Promise`resolved), and the second argument will be the resolved value.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * async function fn() {
+ * return 'hello world';
+ * }
+ * const callbackFunction = util.callbackify(fn);
+ *
+ * callbackFunction((err, ret) => {
+ * if (err) throw err;
+ * console.log(ret);
+ * });
+ * ```
+ *
+ * Will print:
+ *
+ * ```text
+ * hello world
+ * ```
+ *
+ * The callback is executed asynchronously, and will have a limited stack trace.
+ * If the callback throws, the process will emit an `'uncaughtException'` event, and if not handled will exit.
+ *
+ * Since `null` has a special meaning as the first argument to a callback, if a
+ * wrapped function rejects a `Promise` with a falsy value as a reason, the value
+ * is wrapped in an `Error` with the original value stored in a field named`reason`.
+ *
+ * ```js
+ * function fn() {
+ * return Promise.reject(null);
+ * }
+ * const callbackFunction = util.callbackify(fn);
+ *
+ * callbackFunction((err, ret) => {
+ * // When the Promise was rejected with `null` it is wrapped with an Error and
+ * // the original value is stored in `reason`.
+ * err &#x26;&#x26; Object.hasOwn(err, 'reason') &#x26;&#x26; err.reason === null; // true
+ * });
+ * ```
+ * @since v8.2.0
+ * @param fn An `async` function
+ * @return a callback style function
+ */
+ export function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
+ export function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
+ export function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export function callbackify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, T3, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export function callbackify<T1, T2, T3, T4>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, T3, T4, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export function callbackify<T1, T2, T3, T4, T5>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, T3, T4, T5, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export function callbackify<T1, T2, T3, T4, T5, T6>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export interface CustomPromisifyLegacy<TCustom extends Function> extends Function {
+ __promisify__: TCustom;
+ }
+ export interface CustomPromisifySymbol<TCustom extends Function> extends Function {
+ [promisify.custom]: TCustom;
+ }
+ export type CustomPromisify<TCustom extends Function> = CustomPromisifySymbol<TCustom> | CustomPromisifyLegacy<TCustom>;
+ /**
+ * Takes a function following the common error-first callback style, i.e. taking
+ * an `(err, value) => ...` callback as the last argument, and returns a version
+ * that returns promises.
+ *
+ * ```js
+ * const util = require('node:util');
+ * const fs = require('node:fs');
+ *
+ * const stat = util.promisify(fs.stat);
+ * stat('.').then((stats) => {
+ * // Do something with `stats`
+ * }).catch((error) => {
+ * // Handle the error.
+ * });
+ * ```
+ *
+ * Or, equivalently using `async function`s:
+ *
+ * ```js
+ * const util = require('node:util');
+ * const fs = require('node:fs');
+ *
+ * const stat = util.promisify(fs.stat);
+ *
+ * async function callStat() {
+ * const stats = await stat('.');
+ * console.log(`This directory is owned by ${stats.uid}`);
+ * }
+ * ```
+ *
+ * If there is an `original[util.promisify.custom]` property present, `promisify`will return its value, see `Custom promisified functions`.
+ *
+ * `promisify()` assumes that `original` is a function taking a callback as its
+ * final argument in all cases. If `original` is not a function, `promisify()`will throw an error. If `original` is a function but its last argument is not
+ * an error-first callback, it will still be passed an error-first
+ * callback as its last argument.
+ *
+ * Using `promisify()` on class methods or other methods that use `this` may not
+ * work as expected unless handled specially:
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * class Foo {
+ * constructor() {
+ * this.a = 42;
+ * }
+ *
+ * bar(callback) {
+ * callback(null, this.a);
+ * }
+ * }
+ *
+ * const foo = new Foo();
+ *
+ * const naiveBar = util.promisify(foo.bar);
+ * // TypeError: Cannot read property 'a' of undefined
+ * // naiveBar().then(a => console.log(a));
+ *
+ * naiveBar.call(foo).then((a) => console.log(a)); // '42'
+ *
+ * const bindBar = naiveBar.bind(foo);
+ * bindBar().then((a) => console.log(a)); // '42'
+ * ```
+ * @since v8.0.0
+ */
+ export function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
+ export function promisify<TResult>(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise<TResult>;
+ export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
+ export function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
+ export function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
+ export function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
+ export function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
+ export function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
+ export function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
+ export function promisify<T1, T2, T3, T4, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
+ export function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
+ export function promisify<T1, T2, T3, T4, T5, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
+ export function promisify<T1, T2, T3, T4, T5>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
+ export function promisify(fn: Function): Function;
+ export namespace promisify {
+ /**
+ * That can be used to declare custom promisified variants of functions.
+ */
+ const custom: unique symbol;
+ }
+ /**
+ * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextDecoder` API.
+ *
+ * ```js
+ * const decoder = new TextDecoder();
+ * const u8arr = new Uint8Array([72, 101, 108, 108, 111]);
+ * console.log(decoder.decode(u8arr)); // Hello
+ * ```
+ * @since v8.3.0
+ */
+ export class TextDecoder {
+ /**
+ * The encoding supported by the `TextDecoder` instance.
+ */
+ readonly encoding: string;
+ /**
+ * The value will be `true` if decoding errors result in a `TypeError` being
+ * thrown.
+ */
+ readonly fatal: boolean;
+ /**
+ * The value will be `true` if the decoding result will include the byte order
+ * mark.
+ */
+ readonly ignoreBOM: boolean;
+ constructor(
+ encoding?: string,
+ options?: {
+ fatal?: boolean | undefined;
+ ignoreBOM?: boolean | undefined;
+ }
+ );
+ /**
+ * Decodes the `input` and returns a string. If `options.stream` is `true`, any
+ * incomplete byte sequences occurring at the end of the `input` are buffered
+ * internally and emitted after the next call to `textDecoder.decode()`.
+ *
+ * If `textDecoder.fatal` is `true`, decoding errors that occur will result in a`TypeError` being thrown.
+ * @param input An `ArrayBuffer`, `DataView`, or `TypedArray` instance containing the encoded data.
+ */
+ decode(
+ input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
+ options?: {
+ stream?: boolean | undefined;
+ }
+ ): string;
+ }
+ export interface EncodeIntoResult {
+ /**
+ * The read Unicode code units of input.
+ */
+ read: number;
+ /**
+ * The written UTF-8 bytes of output.
+ */
+ written: number;
+ }
+ export { types };
+
+ //// TextEncoder/Decoder
+ /**
+ * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextEncoder` API. All
+ * instances of `TextEncoder` only support UTF-8 encoding.
+ *
+ * ```js
+ * const encoder = new TextEncoder();
+ * const uint8array = encoder.encode('this is some data');
+ * ```
+ *
+ * The `TextEncoder` class is also available on the global object.
+ * @since v8.3.0
+ */
+ export class TextEncoder {
+ /**
+ * The encoding supported by the `TextEncoder` instance. Always set to `'utf-8'`.
+ */
+ readonly encoding: string;
+ /**
+ * UTF-8 encodes the `input` string and returns a `Uint8Array` containing the
+ * encoded bytes.
+ * @param [input='an empty string'] The text to encode.
+ */
+ encode(input?: string): Uint8Array;
+ /**
+ * UTF-8 encodes the `src` string to the `dest` Uint8Array and returns an object
+ * containing the read Unicode code units and written UTF-8 bytes.
+ *
+ * ```js
+ * const encoder = new TextEncoder();
+ * const src = 'this is some data';
+ * const dest = new Uint8Array(10);
+ * const { read, written } = encoder.encodeInto(src, dest);
+ * ```
+ * @param src The text to encode.
+ * @param dest The array to hold the encode result.
+ */
+ encodeInto(src: string, dest: Uint8Array): EncodeIntoResult;
+ }
+ import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from 'util';
+ global {
+ /**
+ * `TextDecoder` class is a global reference for `require('util').TextDecoder`
+ * https://nodejs.org/api/globals.html#textdecoder
+ * @since v11.0.0
+ */
+ var TextDecoder: typeof globalThis extends {
+ onmessage: any;
+ TextDecoder: infer TextDecoder;
+ }
+ ? TextDecoder
+ : typeof _TextDecoder;
+ /**
+ * `TextEncoder` class is a global reference for `require('util').TextEncoder`
+ * https://nodejs.org/api/globals.html#textencoder
+ * @since v11.0.0
+ */
+ var TextEncoder: typeof globalThis extends {
+ onmessage: any;
+ TextEncoder: infer TextEncoder;
+ }
+ ? TextEncoder
+ : typeof _TextEncoder;
+ }
+
+ //// parseArgs
+ /**
+ * Provides a higher level API for command-line argument parsing than interacting
+ * with `process.argv` directly. Takes a specification for the expected arguments
+ * and returns a structured object with the parsed options and positionals.
+ *
+ * ```js
+ * import { parseArgs } from 'node:util';
+ * const args = ['-f', '--bar', 'b'];
+ * const options = {
+ * foo: {
+ * type: 'boolean',
+ * short: 'f',
+ * },
+ * bar: {
+ * type: 'string',
+ * },
+ * };
+ * const {
+ * values,
+ * positionals,
+ * } = parseArgs({ args, options });
+ * console.log(values, positionals);
+ * // Prints: [Object: null prototype] { foo: true, bar: 'b' } []
+ * ```
+ * @since v18.3.0, v16.17.0
+ * @param config Used to provide arguments for parsing and to configure the parser. `config` supports the following properties:
+ * @return The parsed command line arguments:
+ */
+ export function parseArgs<T extends ParseArgsConfig>(config?: T): ParsedResults<T>;
+ interface ParseArgsOptionConfig {
+ /**
+ * Type of argument.
+ */
+ type: 'string' | 'boolean';
+ /**
+ * Whether this option can be provided multiple times.
+ * If `true`, all values will be collected in an array.
+ * If `false`, values for the option are last-wins.
+ * @default false.
+ */
+ multiple?: boolean | undefined;
+ /**
+ * A single character alias for the option.
+ */
+ short?: string | undefined;
+ /**
+ * The default option value when it is not set by args.
+ * It must be of the same type as the the `type` property.
+ * When `multiple` is `true`, it must be an array.
+ * @since v18.11.0
+ */
+ default?: string | boolean | string[] | boolean[] | undefined;
+ }
+ interface ParseArgsOptionsConfig {
+ [longOption: string]: ParseArgsOptionConfig;
+ }
+ export interface ParseArgsConfig {
+ /**
+ * Array of argument strings.
+ */
+ args?: string[] | undefined;
+ /**
+ * Used to describe arguments known to the parser.
+ */
+ options?: ParseArgsOptionsConfig | undefined;
+ /**
+ * Should an error be thrown when unknown arguments are encountered,
+ * or when arguments are passed that do not match the `type` configured in `options`.
+ * @default true
+ */
+ strict?: boolean | undefined;
+ /**
+ * Whether this command accepts positional arguments.
+ */
+ allowPositionals?: boolean | undefined;
+ /**
+ * Return the parsed tokens. This is useful for extending the built-in behavior,
+ * from adding additional checks through to reprocessing the tokens in different ways.
+ * @default false
+ */
+ tokens?: boolean | undefined;
+ }
+ /*
+ IfDefaultsTrue and IfDefaultsFalse are helpers to handle default values for missing boolean properties.
+ TypeScript does not have exact types for objects: https://github.com/microsoft/TypeScript/issues/12936
+ This means it is impossible to distinguish between "field X is definitely not present" and "field X may or may not be present".
+ But we expect users to generally provide their config inline or `as const`, which means TS will always know whether a given field is present.
+ So this helper treats "not definitely present" (i.e., not `extends boolean`) as being "definitely not present", i.e. it should have its default value.
+ This is technically incorrect but is a much nicer UX for the common case.
+ The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false.
+ */
+ type IfDefaultsTrue<T, IfTrue, IfFalse> = T extends true
+ ? IfTrue
+ : T extends false
+ ? IfFalse
+ : IfTrue;
+
+ // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false`
+ type IfDefaultsFalse<T, IfTrue, IfFalse> = T extends false
+ ? IfFalse
+ : T extends true
+ ? IfTrue
+ : IfFalse;
+
+ type ExtractOptionValue<T extends ParseArgsConfig, O extends ParseArgsOptionConfig> = IfDefaultsTrue<
+ T['strict'],
+ O['type'] extends 'string' ? string : O['type'] extends 'boolean' ? boolean : string | boolean,
+ string | boolean
+ >;
+
+ type ParsedValues<T extends ParseArgsConfig> =
+ & IfDefaultsTrue<T['strict'], unknown, { [longOption: string]: undefined | string | boolean }>
+ & (T['options'] extends ParseArgsOptionsConfig
+ ? {
+ -readonly [LongOption in keyof T['options']]: IfDefaultsFalse<
+ T['options'][LongOption]['multiple'],
+ undefined | Array<ExtractOptionValue<T, T['options'][LongOption]>>,
+ undefined | ExtractOptionValue<T, T['options'][LongOption]>
+ >;
+ }
+ : {});
+
+ type ParsedPositionals<T extends ParseArgsConfig> = IfDefaultsTrue<
+ T['strict'],
+ IfDefaultsFalse<T['allowPositionals'], string[], []>,
+ IfDefaultsTrue<T['allowPositionals'], string[], []>
+ >;
+
+ type PreciseTokenForOptions<
+ K extends string,
+ O extends ParseArgsOptionConfig,
+ > = O['type'] extends 'string'
+ ? {
+ kind: 'option';
+ index: number;
+ name: K;
+ rawName: string;
+ value: string;
+ inlineValue: boolean;
+ }
+ : O['type'] extends 'boolean'
+ ? {
+ kind: 'option';
+ index: number;
+ name: K;
+ rawName: string;
+ value: undefined;
+ inlineValue: undefined;
+ }
+ : OptionToken & { name: K };
+
+ type TokenForOptions<
+ T extends ParseArgsConfig,
+ K extends keyof T['options'] = keyof T['options'],
+ > = K extends unknown
+ ? T['options'] extends ParseArgsOptionsConfig
+ ? PreciseTokenForOptions<K & string, T['options'][K]>
+ : OptionToken
+ : never;
+
+ type ParsedOptionToken<T extends ParseArgsConfig> = IfDefaultsTrue<T['strict'], TokenForOptions<T>, OptionToken>;
+
+ type ParsedPositionalToken<T extends ParseArgsConfig> = IfDefaultsTrue<
+ T['strict'],
+ IfDefaultsFalse<T['allowPositionals'], { kind: 'positional'; index: number; value: string }, never>,
+ IfDefaultsTrue<T['allowPositionals'], { kind: 'positional'; index: number; value: string }, never>
+ >;
+
+ type ParsedTokens<T extends ParseArgsConfig> = Array<
+ ParsedOptionToken<T> | ParsedPositionalToken<T> | { kind: 'option-terminator'; index: number }
+ >;
+
+ type PreciseParsedResults<T extends ParseArgsConfig> = IfDefaultsFalse<
+ T['tokens'],
+ {
+ values: ParsedValues<T>;
+ positionals: ParsedPositionals<T>;
+ tokens: ParsedTokens<T>;
+ },
+ {
+ values: ParsedValues<T>;
+ positionals: ParsedPositionals<T>;
+ }
+ >;
+
+ type OptionToken =
+ | { kind: 'option'; index: number; name: string; rawName: string; value: string; inlineValue: boolean }
+ | {
+ kind: 'option';
+ index: number;
+ name: string;
+ rawName: string;
+ value: undefined;
+ inlineValue: undefined;
+ };
+
+ type Token =
+ | OptionToken
+ | { kind: 'positional'; index: number; value: string }
+ | { kind: 'option-terminator'; index: number };
+
+ // If ParseArgsConfig extends T, then the user passed config constructed elsewhere.
+ // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above.
+ type ParsedResults<T extends ParseArgsConfig> = ParseArgsConfig extends T
+ ? {
+ values: {
+ [longOption: string]: undefined | string | boolean | Array<string | boolean>;
+ };
+ positionals: string[];
+ tokens?: Token[];
+ }
+ : PreciseParsedResults<T>;
+
+ /**
+ * An implementation of [the MIMEType class](https://bmeck.github.io/node-proposal-mime-api/).
+ *
+ * In accordance with browser conventions, all properties of `MIMEType` objects
+ * are implemented as getters and setters on the class prototype, rather than as
+ * data properties on the object itself.
+ *
+ * A MIME string is a structured string containing multiple meaningful
+ * components. When parsed, a `MIMEType` object is returned containing
+ * properties for each of these components.
+ * @since v19.1.0, v18.13.0
+ * @experimental
+ */
+ export class MIMEType {
+ /**
+ * Creates a new MIMEType object by parsing the input.
+ *
+ * A `TypeError` will be thrown if the `input` is not a valid MIME.
+ * Note that an effort will be made to coerce the given values into strings.
+ * @param input The input MIME to parse.
+ */
+ constructor(input: string | { toString: () => string });
+
+ /**
+ * Gets and sets the type portion of the MIME.
+ *
+ * ```js
+ * import { MIMEType } from 'node:util';
+ *
+ * const myMIME = new MIMEType('text/javascript');
+ * console.log(myMIME.type);
+ * // Prints: text
+ * myMIME.type = 'application';
+ * console.log(myMIME.type);
+ * // Prints: application
+ * console.log(String(myMIME));
+ * // Prints: application/javascript
+ * ```
+ */
+ type: string;
+ /**
+ * Gets and sets the subtype portion of the MIME.
+ *
+ * ```js
+ * import { MIMEType } from 'node:util';
+ *
+ * const myMIME = new MIMEType('text/ecmascript');
+ * console.log(myMIME.subtype);
+ * // Prints: ecmascript
+ * myMIME.subtype = 'javascript';
+ * console.log(myMIME.subtype);
+ * // Prints: javascript
+ * console.log(String(myMIME));
+ * // Prints: text/javascript
+ * ```
+ */
+ subtype: string;
+ /**
+ * Gets the essence of the MIME. This property is read only.
+ * Use `mime.type` or `mime.subtype` to alter the MIME.
+ *
+ * ```js
+ * import { MIMEType } from 'node:util';
+ *
+ * const myMIME = new MIMEType('text/javascript;key=value');
+ * console.log(myMIME.essence);
+ * // Prints: text/javascript
+ * myMIME.type = 'application';
+ * console.log(myMIME.essence);
+ * // Prints: application/javascript
+ * console.log(String(myMIME));
+ * // Prints: application/javascript;key=value
+ * ```
+ */
+ readonly essence: string;
+ /**
+ * Gets the `MIMEParams` object representing the
+ * parameters of the MIME. This property is read-only. See `MIMEParams` documentation for details.
+ */
+ readonly params: MIMEParams;
+ /**
+ * The `toString()` method on the `MIMEType` object returns the serialized MIME.
+ *
+ * Because of the need for standard compliance, this method does not allow users
+ * to customize the serialization process of the MIME.
+ */
+ toString(): string;
+ }
+ /**
+ * The `MIMEParams` API provides read and write access to the parameters of a`MIMEType`.
+ * @since v19.1.0, v18.13.0
+ */
+ export class MIMEParams {
+ /**
+ * Remove all name-value pairs whose name is `name`.
+ */
+ delete(name: string): void;
+ /**
+ * Returns an iterator over each of the name-value pairs in the parameters.
+ * Each item of the iterator is a JavaScript `Array`. The first item of the array
+ * is the `name`, the second item of the array is the `value`.
+ */
+ entries(): IterableIterator<[string, string]>;
+ /**
+ * Returns the value of the first name-value pair whose name is `name`. If there
+ * are no such pairs, `null` is returned.
+ * @return or `null` if there is no name-value pair with the given `name`.
+ */
+ get(name: string): string | null;
+ /**
+ * Returns `true` if there is at least one name-value pair whose name is `name`.
+ */
+ has(name: string): boolean;
+ /**
+ * Returns an iterator over the names of each name-value pair.
+ *
+ * ```js
+ * import { MIMEType } from 'node:util';
+ *
+ * const { params } = new MIMEType('text/plain;foo=0;bar=1');
+ * for (const name of params.keys()) {
+ * console.log(name);
+ * }
+ * // Prints:
+ * // foo
+ * // bar
+ * ```
+ */
+ keys(): IterableIterator<string>;
+ /**
+ * Sets the value in the `MIMEParams` object associated with `name` to`value`. If there are any pre-existing name-value pairs whose names are `name`,
+ * set the first such pair's value to `value`.
+ *
+ * ```js
+ * import { MIMEType } from 'node:util';
+ *
+ * const { params } = new MIMEType('text/plain;foo=0;bar=1');
+ * params.set('foo', 'def');
+ * params.set('baz', 'xyz');
+ * console.log(params.toString());
+ * // Prints: foo=def&#x26;bar=1&#x26;baz=xyz
+ * ```
+ */
+ set(name: string, value: string): void;
+ /**
+ * Returns an iterator over the values of each name-value pair.
+ */
+ values(): IterableIterator<string>;
+ /**
+ * Returns an iterator over each of the name-value pairs in the parameters.
+ */
+ [Symbol.iterator]: typeof MIMEParams.prototype.entries;
+ }
+}
+declare module 'util/types' {
+ export * from 'util/types';
+}
+declare module 'util/types' {
+ import { KeyObject, webcrypto } from 'node:crypto';
+ /**
+ * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or
+ * [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance.
+ *
+ * See also `util.types.isArrayBuffer()` and `util.types.isSharedArrayBuffer()`.
+ *
+ * ```js
+ * util.types.isAnyArrayBuffer(new ArrayBuffer()); // Returns true
+ * util.types.isAnyArrayBuffer(new SharedArrayBuffer()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike;
+ /**
+ * Returns `true` if the value is an `arguments` object.
+ *
+ * ```js
+ * function foo() {
+ * util.types.isArgumentsObject(arguments); // Returns true
+ * }
+ * ```
+ * @since v10.0.0
+ */
+ function isArgumentsObject(object: unknown): object is IArguments;
+ /**
+ * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instance.
+ * This does _not_ include [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances. Usually, it is
+ * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that.
+ *
+ * ```js
+ * util.types.isArrayBuffer(new ArrayBuffer()); // Returns true
+ * util.types.isArrayBuffer(new SharedArrayBuffer()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isArrayBuffer(object: unknown): object is ArrayBuffer;
+ /**
+ * Returns `true` if the value is an instance of one of the [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) views, such as typed
+ * array objects or [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView). Equivalent to
+ * [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView).
+ *
+ * ```js
+ * util.types.isArrayBufferView(new Int8Array()); // true
+ * util.types.isArrayBufferView(Buffer.from('hello world')); // true
+ * util.types.isArrayBufferView(new DataView(new ArrayBuffer(16))); // true
+ * util.types.isArrayBufferView(new ArrayBuffer()); // false
+ * ```
+ * @since v10.0.0
+ */
+ function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView;
+ /**
+ * Returns `true` if the value is an [async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function).
+ * This only reports back what the JavaScript engine is seeing;
+ * in particular, the return value may not match the original source code if
+ * a transpilation tool was used.
+ *
+ * ```js
+ * util.types.isAsyncFunction(function foo() {}); // Returns false
+ * util.types.isAsyncFunction(async function foo() {}); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isAsyncFunction(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is a `BigInt64Array` instance.
+ *
+ * ```js
+ * util.types.isBigInt64Array(new BigInt64Array()); // Returns true
+ * util.types.isBigInt64Array(new BigUint64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isBigInt64Array(value: unknown): value is BigInt64Array;
+ /**
+ * Returns `true` if the value is a `BigUint64Array` instance.
+ *
+ * ```js
+ * util.types.isBigUint64Array(new BigInt64Array()); // Returns false
+ * util.types.isBigUint64Array(new BigUint64Array()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isBigUint64Array(value: unknown): value is BigUint64Array;
+ /**
+ * Returns `true` if the value is a boolean object, e.g. created
+ * by `new Boolean()`.
+ *
+ * ```js
+ * util.types.isBooleanObject(false); // Returns false
+ * util.types.isBooleanObject(true); // Returns false
+ * util.types.isBooleanObject(new Boolean(false)); // Returns true
+ * util.types.isBooleanObject(new Boolean(true)); // Returns true
+ * util.types.isBooleanObject(Boolean(false)); // Returns false
+ * util.types.isBooleanObject(Boolean(true)); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isBooleanObject(object: unknown): object is Boolean;
+ /**
+ * Returns `true` if the value is any boxed primitive object, e.g. created
+ * by `new Boolean()`, `new String()` or `Object(Symbol())`.
+ *
+ * For example:
+ *
+ * ```js
+ * util.types.isBoxedPrimitive(false); // Returns false
+ * util.types.isBoxedPrimitive(new Boolean(false)); // Returns true
+ * util.types.isBoxedPrimitive(Symbol('foo')); // Returns false
+ * util.types.isBoxedPrimitive(Object(Symbol('foo'))); // Returns true
+ * util.types.isBoxedPrimitive(Object(BigInt(5))); // Returns true
+ * ```
+ * @since v10.11.0
+ */
+ function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol;
+ /**
+ * Returns `true` if the value is a built-in [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instance.
+ *
+ * ```js
+ * const ab = new ArrayBuffer(20);
+ * util.types.isDataView(new DataView(ab)); // Returns true
+ * util.types.isDataView(new Float64Array()); // Returns false
+ * ```
+ *
+ * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView).
+ * @since v10.0.0
+ */
+ function isDataView(object: unknown): object is DataView;
+ /**
+ * Returns `true` if the value is a built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) instance.
+ *
+ * ```js
+ * util.types.isDate(new Date()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isDate(object: unknown): object is Date;
+ /**
+ * Returns `true` if the value is a native `External` value.
+ *
+ * A native `External` value is a special type of object that contains a
+ * raw C++ pointer (`void*`) for access from native code, and has no other
+ * properties. Such objects are created either by Node.js internals or native
+ * addons. In JavaScript, they are [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) objects with a`null` prototype.
+ *
+ * ```c
+ * #include <js_native_api.h>
+ * #include <stdlib.h>
+ * napi_value result;
+ * static napi_value MyNapi(napi_env env, napi_callback_info info) {
+ * int* raw = (int*) malloc(1024);
+ * napi_status status = napi_create_external(env, (void*) raw, NULL, NULL, &#x26;result);
+ * if (status != napi_ok) {
+ * napi_throw_error(env, NULL, "napi_create_external failed");
+ * return NULL;
+ * }
+ * return result;
+ * }
+ * ...
+ * DECLARE_NAPI_PROPERTY("myNapi", MyNapi)
+ * ...
+ * ```
+ *
+ * ```js
+ * const native = require('napi_addon.node');
+ * const data = native.myNapi();
+ * util.types.isExternal(data); // returns true
+ * util.types.isExternal(0); // returns false
+ * util.types.isExternal(new String('foo')); // returns false
+ * ```
+ *
+ * For further information on `napi_create_external`, refer to `napi_create_external()`.
+ * @since v10.0.0
+ */
+ function isExternal(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is a built-in [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) instance.
+ *
+ * ```js
+ * util.types.isFloat32Array(new ArrayBuffer()); // Returns false
+ * util.types.isFloat32Array(new Float32Array()); // Returns true
+ * util.types.isFloat32Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isFloat32Array(object: unknown): object is Float32Array;
+ /**
+ * Returns `true` if the value is a built-in [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) instance.
+ *
+ * ```js
+ * util.types.isFloat64Array(new ArrayBuffer()); // Returns false
+ * util.types.isFloat64Array(new Uint8Array()); // Returns false
+ * util.types.isFloat64Array(new Float64Array()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isFloat64Array(object: unknown): object is Float64Array;
+ /**
+ * Returns `true` if the value is a generator function.
+ * This only reports back what the JavaScript engine is seeing;
+ * in particular, the return value may not match the original source code if
+ * a transpilation tool was used.
+ *
+ * ```js
+ * util.types.isGeneratorFunction(function foo() {}); // Returns false
+ * util.types.isGeneratorFunction(function* foo() {}); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isGeneratorFunction(object: unknown): object is GeneratorFunction;
+ /**
+ * Returns `true` if the value is a generator object as returned from a
+ * built-in generator function.
+ * This only reports back what the JavaScript engine is seeing;
+ * in particular, the return value may not match the original source code if
+ * a transpilation tool was used.
+ *
+ * ```js
+ * function* foo() {}
+ * const generator = foo();
+ * util.types.isGeneratorObject(generator); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isGeneratorObject(object: unknown): object is Generator;
+ /**
+ * Returns `true` if the value is a built-in [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) instance.
+ *
+ * ```js
+ * util.types.isInt8Array(new ArrayBuffer()); // Returns false
+ * util.types.isInt8Array(new Int8Array()); // Returns true
+ * util.types.isInt8Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isInt8Array(object: unknown): object is Int8Array;
+ /**
+ * Returns `true` if the value is a built-in [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) instance.
+ *
+ * ```js
+ * util.types.isInt16Array(new ArrayBuffer()); // Returns false
+ * util.types.isInt16Array(new Int16Array()); // Returns true
+ * util.types.isInt16Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isInt16Array(object: unknown): object is Int16Array;
+ /**
+ * Returns `true` if the value is a built-in [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) instance.
+ *
+ * ```js
+ * util.types.isInt32Array(new ArrayBuffer()); // Returns false
+ * util.types.isInt32Array(new Int32Array()); // Returns true
+ * util.types.isInt32Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isInt32Array(object: unknown): object is Int32Array;
+ /**
+ * Returns `true` if the value is a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance.
+ *
+ * ```js
+ * util.types.isMap(new Map()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isMap<T>(object: T | {}): object is T extends ReadonlyMap<any, any> ? (unknown extends T ? never : ReadonlyMap<any, any>) : Map<unknown, unknown>;
+ /**
+ * Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance.
+ *
+ * ```js
+ * const map = new Map();
+ * util.types.isMapIterator(map.keys()); // Returns true
+ * util.types.isMapIterator(map.values()); // Returns true
+ * util.types.isMapIterator(map.entries()); // Returns true
+ * util.types.isMapIterator(map[Symbol.iterator]()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isMapIterator(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is an instance of a [Module Namespace Object](https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects).
+ *
+ * ```js
+ * import * as ns from './a.js';
+ *
+ * util.types.isModuleNamespaceObject(ns); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isModuleNamespaceObject(value: unknown): boolean;
+ /**
+ * Returns `true` if the value was returned by the constructor of a [built-in `Error` type](https://tc39.es/ecma262/#sec-error-objects).
+ *
+ * ```js
+ * console.log(util.types.isNativeError(new Error())); // true
+ * console.log(util.types.isNativeError(new TypeError())); // true
+ * console.log(util.types.isNativeError(new RangeError())); // true
+ * ```
+ *
+ * Subclasses of the native error types are also native errors:
+ *
+ * ```js
+ * class MyError extends Error {}
+ * console.log(util.types.isNativeError(new MyError())); // true
+ * ```
+ *
+ * A value being `instanceof` a native error class is not equivalent to `isNativeError()`returning `true` for that value. `isNativeError()` returns `true` for errors
+ * which come from a different [realm](https://tc39.es/ecma262/#realm) while `instanceof Error` returns `false`for these errors:
+ *
+ * ```js
+ * const vm = require('node:vm');
+ * const context = vm.createContext({});
+ * const myError = vm.runInContext('new Error()', context);
+ * console.log(util.types.isNativeError(myError)); // true
+ * console.log(myError instanceof Error); // false
+ * ```
+ *
+ * Conversely, `isNativeError()` returns `false` for all objects which were not
+ * returned by the constructor of a native error. That includes values
+ * which are `instanceof` native errors:
+ *
+ * ```js
+ * const myError = { __proto__: Error.prototype };
+ * console.log(util.types.isNativeError(myError)); // false
+ * console.log(myError instanceof Error); // true
+ * ```
+ * @since v10.0.0
+ */
+ function isNativeError(object: unknown): object is Error;
+ /**
+ * Returns `true` if the value is a number object, e.g. created
+ * by `new Number()`.
+ *
+ * ```js
+ * util.types.isNumberObject(0); // Returns false
+ * util.types.isNumberObject(new Number(0)); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isNumberObject(object: unknown): object is Number;
+ /**
+ * Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
+ *
+ * ```js
+ * util.types.isPromise(Promise.resolve(42)); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isPromise(object: unknown): object is Promise<unknown>;
+ /**
+ * Returns `true` if the value is a [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) instance.
+ *
+ * ```js
+ * const target = {};
+ * const proxy = new Proxy(target, {});
+ * util.types.isProxy(target); // Returns false
+ * util.types.isProxy(proxy); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isProxy(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is a regular expression object.
+ *
+ * ```js
+ * util.types.isRegExp(/abc/); // Returns true
+ * util.types.isRegExp(new RegExp('abc')); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isRegExp(object: unknown): object is RegExp;
+ /**
+ * Returns `true` if the value is a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance.
+ *
+ * ```js
+ * util.types.isSet(new Set()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isSet<T>(object: T | {}): object is T extends ReadonlySet<any> ? (unknown extends T ? never : ReadonlySet<any>) : Set<unknown>;
+ /**
+ * Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance.
+ *
+ * ```js
+ * const set = new Set();
+ * util.types.isSetIterator(set.keys()); // Returns true
+ * util.types.isSetIterator(set.values()); // Returns true
+ * util.types.isSetIterator(set.entries()); // Returns true
+ * util.types.isSetIterator(set[Symbol.iterator]()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isSetIterator(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is a built-in [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance.
+ * This does _not_ include [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instances. Usually, it is
+ * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that.
+ *
+ * ```js
+ * util.types.isSharedArrayBuffer(new ArrayBuffer()); // Returns false
+ * util.types.isSharedArrayBuffer(new SharedArrayBuffer()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer;
+ /**
+ * Returns `true` if the value is a string object, e.g. created
+ * by `new String()`.
+ *
+ * ```js
+ * util.types.isStringObject('foo'); // Returns false
+ * util.types.isStringObject(new String('foo')); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isStringObject(object: unknown): object is String;
+ /**
+ * Returns `true` if the value is a symbol object, created
+ * by calling `Object()` on a `Symbol` primitive.
+ *
+ * ```js
+ * const symbol = Symbol('foo');
+ * util.types.isSymbolObject(symbol); // Returns false
+ * util.types.isSymbolObject(Object(symbol)); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isSymbolObject(object: unknown): object is Symbol;
+ /**
+ * Returns `true` if the value is a built-in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance.
+ *
+ * ```js
+ * util.types.isTypedArray(new ArrayBuffer()); // Returns false
+ * util.types.isTypedArray(new Uint8Array()); // Returns true
+ * util.types.isTypedArray(new Float64Array()); // Returns true
+ * ```
+ *
+ * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView).
+ * @since v10.0.0
+ */
+ function isTypedArray(object: unknown): object is NodeJS.TypedArray;
+ /**
+ * Returns `true` if the value is a built-in [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) instance.
+ *
+ * ```js
+ * util.types.isUint8Array(new ArrayBuffer()); // Returns false
+ * util.types.isUint8Array(new Uint8Array()); // Returns true
+ * util.types.isUint8Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isUint8Array(object: unknown): object is Uint8Array;
+ /**
+ * Returns `true` if the value is a built-in [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) instance.
+ *
+ * ```js
+ * util.types.isUint8ClampedArray(new ArrayBuffer()); // Returns false
+ * util.types.isUint8ClampedArray(new Uint8ClampedArray()); // Returns true
+ * util.types.isUint8ClampedArray(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray;
+ /**
+ * Returns `true` if the value is a built-in [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) instance.
+ *
+ * ```js
+ * util.types.isUint16Array(new ArrayBuffer()); // Returns false
+ * util.types.isUint16Array(new Uint16Array()); // Returns true
+ * util.types.isUint16Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isUint16Array(object: unknown): object is Uint16Array;
+ /**
+ * Returns `true` if the value is a built-in [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) instance.
+ *
+ * ```js
+ * util.types.isUint32Array(new ArrayBuffer()); // Returns false
+ * util.types.isUint32Array(new Uint32Array()); // Returns true
+ * util.types.isUint32Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isUint32Array(object: unknown): object is Uint32Array;
+ /**
+ * Returns `true` if the value is a built-in [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) instance.
+ *
+ * ```js
+ * util.types.isWeakMap(new WeakMap()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isWeakMap(object: unknown): object is WeakMap<object, unknown>;
+ /**
+ * Returns `true` if the value is a built-in [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) instance.
+ *
+ * ```js
+ * util.types.isWeakSet(new WeakSet()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isWeakSet(object: unknown): object is WeakSet<object>;
+ /**
+ * Returns `true` if `value` is a `KeyObject`, `false` otherwise.
+ * @since v16.2.0
+ */
+ function isKeyObject(object: unknown): object is KeyObject;
+ /**
+ * Returns `true` if `value` is a `CryptoKey`, `false` otherwise.
+ * @since v16.2.0
+ */
+ function isCryptoKey(object: unknown): object is webcrypto.CryptoKey;
+}
+declare module 'node:util' {
+ export * from 'util';
+}
+declare module 'node:util/types' {
+ export * from 'util/types';
+}
diff --git a/node_modules/@types/node/ts4.8/v8.d.ts b/node_modules/@types/node/ts4.8/v8.d.ts
new file mode 100755
index 0000000..064f5d5
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/v8.d.ts
@@ -0,0 +1,635 @@
+/**
+ * The `node:v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using:
+ *
+ * ```js
+ * const v8 = require('node:v8');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/v8.js)
+ */
+declare module 'v8' {
+ import { Readable } from 'node:stream';
+ interface HeapSpaceInfo {
+ space_name: string;
+ space_size: number;
+ space_used_size: number;
+ space_available_size: number;
+ physical_space_size: number;
+ }
+ // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */
+ type DoesZapCodeSpaceFlag = 0 | 1;
+ interface HeapInfo {
+ total_heap_size: number;
+ total_heap_size_executable: number;
+ total_physical_size: number;
+ total_available_size: number;
+ used_heap_size: number;
+ heap_size_limit: number;
+ malloced_memory: number;
+ peak_malloced_memory: number;
+ does_zap_garbage: DoesZapCodeSpaceFlag;
+ number_of_native_contexts: number;
+ number_of_detached_contexts: number;
+ total_global_handles_size: number;
+ used_global_handles_size: number;
+ external_memory: number;
+ }
+ interface HeapCodeStatistics {
+ code_and_metadata_size: number;
+ bytecode_and_metadata_size: number;
+ external_script_source_size: number;
+ }
+ /**
+ * Returns an integer representing a version tag derived from the V8 version,
+ * command-line flags, and detected CPU features. This is useful for determining
+ * whether a `vm.Script` `cachedData` buffer is compatible with this instance
+ * of V8.
+ *
+ * ```js
+ * console.log(v8.cachedDataVersionTag()); // 3947234607
+ * // The value returned by v8.cachedDataVersionTag() is derived from the V8
+ * // version, command-line flags, and detected CPU features. Test that the value
+ * // does indeed update when flags are toggled.
+ * v8.setFlagsFromString('--allow_natives_syntax');
+ * console.log(v8.cachedDataVersionTag()); // 183726201
+ * ```
+ * @since v8.0.0
+ */
+ function cachedDataVersionTag(): number;
+ /**
+ * Returns an object with the following properties:
+ *
+ * `does_zap_garbage` is a 0/1 boolean, which signifies whether the`--zap_code_space` option is enabled or not. This makes V8 overwrite heap
+ * garbage with a bit pattern. The RSS footprint (resident set size) gets bigger
+ * because it continuously touches all heap pages and that makes them less likely
+ * to get swapped out by the operating system.
+ *
+ * `number_of_native_contexts` The value of native\_context is the number of the
+ * top-level contexts currently active. Increase of this number over time indicates
+ * a memory leak.
+ *
+ * `number_of_detached_contexts` The value of detached\_context is the number
+ * of contexts that were detached and not yet garbage collected. This number
+ * being non-zero indicates a potential memory leak.
+ *
+ * `total_global_handles_size` The value of total\_global\_handles\_size is the
+ * total memory size of V8 global handles.
+ *
+ * `used_global_handles_size` The value of used\_global\_handles\_size is the
+ * used memory size of V8 global handles.
+ *
+ * `external_memory` The value of external\_memory is the memory size of array
+ * buffers and external strings.
+ *
+ * ```js
+ * {
+ * total_heap_size: 7326976,
+ * total_heap_size_executable: 4194304,
+ * total_physical_size: 7326976,
+ * total_available_size: 1152656,
+ * used_heap_size: 3476208,
+ * heap_size_limit: 1535115264,
+ * malloced_memory: 16384,
+ * peak_malloced_memory: 1127496,
+ * does_zap_garbage: 0,
+ * number_of_native_contexts: 1,
+ * number_of_detached_contexts: 0,
+ * total_global_handles_size: 8192,
+ * used_global_handles_size: 3296,
+ * external_memory: 318824
+ * }
+ * ```
+ * @since v1.0.0
+ */
+ function getHeapStatistics(): HeapInfo;
+ /**
+ * Returns statistics about the V8 heap spaces, i.e. the segments which make up
+ * the V8 heap. Neither the ordering of heap spaces, nor the availability of a
+ * heap space can be guaranteed as the statistics are provided via the
+ * V8[`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the
+ * next.
+ *
+ * The value returned is an array of objects containing the following properties:
+ *
+ * ```json
+ * [
+ * {
+ * "space_name": "new_space",
+ * "space_size": 2063872,
+ * "space_used_size": 951112,
+ * "space_available_size": 80824,
+ * "physical_space_size": 2063872
+ * },
+ * {
+ * "space_name": "old_space",
+ * "space_size": 3090560,
+ * "space_used_size": 2493792,
+ * "space_available_size": 0,
+ * "physical_space_size": 3090560
+ * },
+ * {
+ * "space_name": "code_space",
+ * "space_size": 1260160,
+ * "space_used_size": 644256,
+ * "space_available_size": 960,
+ * "physical_space_size": 1260160
+ * },
+ * {
+ * "space_name": "map_space",
+ * "space_size": 1094160,
+ * "space_used_size": 201608,
+ * "space_available_size": 0,
+ * "physical_space_size": 1094160
+ * },
+ * {
+ * "space_name": "large_object_space",
+ * "space_size": 0,
+ * "space_used_size": 0,
+ * "space_available_size": 1490980608,
+ * "physical_space_size": 0
+ * }
+ * ]
+ * ```
+ * @since v6.0.0
+ */
+ function getHeapSpaceStatistics(): HeapSpaceInfo[];
+ /**
+ * The `v8.setFlagsFromString()` method can be used to programmatically set
+ * V8 command-line flags. This method should be used with care. Changing settings
+ * after the VM has started may result in unpredictable behavior, including
+ * crashes and data loss; or it may simply do nothing.
+ *
+ * The V8 options available for a version of Node.js may be determined by running`node --v8-options`.
+ *
+ * Usage:
+ *
+ * ```js
+ * // Print GC events to stdout for one minute.
+ * const v8 = require('node:v8');
+ * v8.setFlagsFromString('--trace_gc');
+ * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3);
+ * ```
+ * @since v1.0.0
+ */
+ function setFlagsFromString(flags: string): void;
+ /**
+ * Generates a snapshot of the current V8 heap and returns a Readable
+ * Stream that may be used to read the JSON serialized representation.
+ * This JSON stream format is intended to be used with tools such as
+ * Chrome DevTools. The JSON schema is undocumented and specific to the
+ * V8 engine. Therefore, the schema may change from one version of V8 to the next.
+ *
+ * Creating a heap snapshot requires memory about twice the size of the heap at
+ * the time the snapshot is created. This results in the risk of OOM killers
+ * terminating the process.
+ *
+ * Generating a snapshot is a synchronous operation which blocks the event loop
+ * for a duration depending on the heap size.
+ *
+ * ```js
+ * // Print heap snapshot to the console
+ * const v8 = require('node:v8');
+ * const stream = v8.getHeapSnapshot();
+ * stream.pipe(process.stdout);
+ * ```
+ * @since v11.13.0
+ * @return A Readable containing the V8 heap snapshot.
+ */
+ function getHeapSnapshot(): Readable;
+ /**
+ * Generates a snapshot of the current V8 heap and writes it to a JSON
+ * file. This file is intended to be used with tools such as Chrome
+ * DevTools. The JSON schema is undocumented and specific to the V8
+ * engine, and may change from one version of V8 to the next.
+ *
+ * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will
+ * not contain any information about the workers, and vice versa.
+ *
+ * Creating a heap snapshot requires memory about twice the size of the heap at
+ * the time the snapshot is created. This results in the risk of OOM killers
+ * terminating the process.
+ *
+ * Generating a snapshot is a synchronous operation which blocks the event loop
+ * for a duration depending on the heap size.
+ *
+ * ```js
+ * const { writeHeapSnapshot } = require('node:v8');
+ * const {
+ * Worker,
+ * isMainThread,
+ * parentPort,
+ * } = require('node:worker_threads');
+ *
+ * if (isMainThread) {
+ * const worker = new Worker(__filename);
+ *
+ * worker.once('message', (filename) => {
+ * console.log(`worker heapdump: ${filename}`);
+ * // Now get a heapdump for the main thread.
+ * console.log(`main thread heapdump: ${writeHeapSnapshot()}`);
+ * });
+ *
+ * // Tell the worker to create a heapdump.
+ * worker.postMessage('heapdump');
+ * } else {
+ * parentPort.once('message', (message) => {
+ * if (message === 'heapdump') {
+ * // Generate a heapdump for the worker
+ * // and return the filename to the parent.
+ * parentPort.postMessage(writeHeapSnapshot());
+ * }
+ * });
+ * }
+ * ```
+ * @since v11.13.0
+ * @param filename The file path where the V8 heap snapshot is to be saved. If not specified, a file name with the pattern `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be
+ * generated, where `{pid}` will be the PID of the Node.js process, `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from the main Node.js thread or the id of a
+ * worker thread.
+ * @return The filename where the snapshot was saved.
+ */
+ function writeHeapSnapshot(filename?: string): string;
+ /**
+ * Get statistics about code and its metadata in the heap, see
+ * V8[`GetHeapCodeAndMetadataStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#a6079122af17612ef54ef3348ce170866) API. Returns an object with the
+ * following properties:
+ *
+ * ```js
+ * {
+ * code_and_metadata_size: 212208,
+ * bytecode_and_metadata_size: 161368,
+ * external_script_source_size: 1410794,
+ * cpu_profiler_metadata_size: 0,
+ * }
+ * ```
+ * @since v12.8.0
+ */
+ function getHeapCodeStatistics(): HeapCodeStatistics;
+ /**
+ * @since v8.0.0
+ */
+ class Serializer {
+ /**
+ * Writes out a header, which includes the serialization format version.
+ */
+ writeHeader(): void;
+ /**
+ * Serializes a JavaScript value and adds the serialized representation to the
+ * internal buffer.
+ *
+ * This throws an error if `value` cannot be serialized.
+ */
+ writeValue(val: any): boolean;
+ /**
+ * Returns the stored internal buffer. This serializer should not be used once
+ * the buffer is released. Calling this method results in undefined behavior
+ * if a previous write has failed.
+ */
+ releaseBuffer(): Buffer;
+ /**
+ * Marks an `ArrayBuffer` as having its contents transferred out of band.
+ * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`.
+ * @param id A 32-bit unsigned integer.
+ * @param arrayBuffer An `ArrayBuffer` instance.
+ */
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
+ /**
+ * Write a raw 32-bit unsigned integer.
+ * For use inside of a custom `serializer._writeHostObject()`.
+ */
+ writeUint32(value: number): void;
+ /**
+ * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts.
+ * For use inside of a custom `serializer._writeHostObject()`.
+ */
+ writeUint64(hi: number, lo: number): void;
+ /**
+ * Write a JS `number` value.
+ * For use inside of a custom `serializer._writeHostObject()`.
+ */
+ writeDouble(value: number): void;
+ /**
+ * Write raw bytes into the serializer's internal buffer. The deserializer
+ * will require a way to compute the length of the buffer.
+ * For use inside of a custom `serializer._writeHostObject()`.
+ */
+ writeRawBytes(buffer: NodeJS.TypedArray): void;
+ }
+ /**
+ * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only
+ * stores the part of their underlying `ArrayBuffer`s that they are referring to.
+ * @since v8.0.0
+ */
+ class DefaultSerializer extends Serializer {}
+ /**
+ * @since v8.0.0
+ */
+ class Deserializer {
+ constructor(data: NodeJS.TypedArray);
+ /**
+ * Reads and validates a header (including the format version).
+ * May, for example, reject an invalid or unsupported wire format. In that case,
+ * an `Error` is thrown.
+ */
+ readHeader(): boolean;
+ /**
+ * Deserializes a JavaScript value from the buffer and returns it.
+ */
+ readValue(): any;
+ /**
+ * Marks an `ArrayBuffer` as having its contents transferred out of band.
+ * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of
+ * `SharedArrayBuffer`s).
+ * @param id A 32-bit unsigned integer.
+ * @param arrayBuffer An `ArrayBuffer` instance.
+ */
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
+ /**
+ * Reads the underlying wire format version. Likely mostly to be useful to
+ * legacy code reading old wire format versions. May not be called before`.readHeader()`.
+ */
+ getWireFormatVersion(): number;
+ /**
+ * Read a raw 32-bit unsigned integer and return it.
+ * For use inside of a custom `deserializer._readHostObject()`.
+ */
+ readUint32(): number;
+ /**
+ * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]`with two 32-bit unsigned integer entries.
+ * For use inside of a custom `deserializer._readHostObject()`.
+ */
+ readUint64(): [number, number];
+ /**
+ * Read a JS `number` value.
+ * For use inside of a custom `deserializer._readHostObject()`.
+ */
+ readDouble(): number;
+ /**
+ * Read raw bytes from the deserializer's internal buffer. The `length` parameter
+ * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`.
+ * For use inside of a custom `deserializer._readHostObject()`.
+ */
+ readRawBytes(length: number): Buffer;
+ }
+ /**
+ * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`.
+ * @since v8.0.0
+ */
+ class DefaultDeserializer extends Deserializer {}
+ /**
+ * Uses a `DefaultSerializer` to serialize `value` into a buffer.
+ *
+ * `ERR_BUFFER_TOO_LARGE` will be thrown when trying to
+ * serialize a huge object which requires buffer
+ * larger than `buffer.constants.MAX_LENGTH`.
+ * @since v8.0.0
+ */
+ function serialize(value: any): Buffer;
+ /**
+ * Uses a `DefaultDeserializer` with default options to read a JS value
+ * from a buffer.
+ * @since v8.0.0
+ * @param buffer A buffer returned by {@link serialize}.
+ */
+ function deserialize(buffer: NodeJS.TypedArray): any;
+ /**
+ * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple
+ * times during the lifetime of the process. Each time the execution counter will
+ * be reset and a new coverage report will be written to the directory specified
+ * by `NODE_V8_COVERAGE`.
+ *
+ * When the process is about to exit, one last coverage will still be written to
+ * disk unless {@link stopCoverage} is invoked before the process exits.
+ * @since v15.1.0, v14.18.0, v12.22.0
+ */
+ function takeCoverage(): void;
+ /**
+ * The `v8.stopCoverage()` method allows the user to stop the coverage collection
+ * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count
+ * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand.
+ * @since v15.1.0, v14.18.0, v12.22.0
+ */
+ function stopCoverage(): void;
+ /**
+ * This API collects GC data in current thread.
+ * @since v19.6.0, v18.15.0
+ */
+ class GCProfiler {
+ /**
+ * Start collecting GC data.
+ * @since v19.6.0, v18.15.0
+ */
+ start(): void;
+ /**
+ * Stop collecting GC data and return an object.The content of object
+ * is as follows.
+ *
+ * ```json
+ * {
+ * "version": 1,
+ * "startTime": 1674059033862,
+ * "statistics": [
+ * {
+ * "gcType": "Scavenge",
+ * "beforeGC": {
+ * "heapStatistics": {
+ * "totalHeapSize": 5005312,
+ * "totalHeapSizeExecutable": 524288,
+ * "totalPhysicalSize": 5226496,
+ * "totalAvailableSize": 4341325216,
+ * "totalGlobalHandlesSize": 8192,
+ * "usedGlobalHandlesSize": 2112,
+ * "usedHeapSize": 4883840,
+ * "heapSizeLimit": 4345298944,
+ * "mallocedMemory": 254128,
+ * "externalMemory": 225138,
+ * "peakMallocedMemory": 181760
+ * },
+ * "heapSpaceStatistics": [
+ * {
+ * "spaceName": "read_only_space",
+ * "spaceSize": 0,
+ * "spaceUsedSize": 0,
+ * "spaceAvailableSize": 0,
+ * "physicalSpaceSize": 0
+ * }
+ * ]
+ * },
+ * "cost": 1574.14,
+ * "afterGC": {
+ * "heapStatistics": {
+ * "totalHeapSize": 6053888,
+ * "totalHeapSizeExecutable": 524288,
+ * "totalPhysicalSize": 5500928,
+ * "totalAvailableSize": 4341101384,
+ * "totalGlobalHandlesSize": 8192,
+ * "usedGlobalHandlesSize": 2112,
+ * "usedHeapSize": 4059096,
+ * "heapSizeLimit": 4345298944,
+ * "mallocedMemory": 254128,
+ * "externalMemory": 225138,
+ * "peakMallocedMemory": 181760
+ * },
+ * "heapSpaceStatistics": [
+ * {
+ * "spaceName": "read_only_space",
+ * "spaceSize": 0,
+ * "spaceUsedSize": 0,
+ * "spaceAvailableSize": 0,
+ * "physicalSpaceSize": 0
+ * }
+ * ]
+ * }
+ * }
+ * ],
+ * "endTime": 1674059036865
+ * }
+ * ```
+ *
+ * Here's an example.
+ *
+ * ```js
+ * const { GCProfiler } = require('v8');
+ * const profiler = new GCProfiler();
+ * profiler.start();
+ * setTimeout(() => {
+ * console.log(profiler.stop());
+ * }, 1000);
+ * ```
+ * @since v19.6.0, v18.15.0
+ */
+ stop(): GCProfilerResult;
+ }
+ interface GCProfilerResult {
+ version: number;
+ startTime: number;
+ endTime: number;
+ statistics: Array<{
+ gcType: string;
+ cost: number;
+ beforeGC: {
+ heapStatistics: HeapStatistics;
+ heapSpaceStatistics: HeapSpaceStatistics[];
+ };
+ afterGC: {
+ heapStatistics: HeapStatistics;
+ heapSpaceStatistics: HeapSpaceStatistics[];
+ };
+ }>;
+ }
+ interface HeapStatistics {
+ totalHeapSize: number;
+ totalHeapSizeExecutable: number;
+ totalPhysicalSize: number;
+ totalAvailableSize: number;
+ totalGlobalHandlesSize: number;
+ usedGlobalHandlesSize: number;
+ usedHeapSize: number;
+ heapSizeLimit: number;
+ mallocedMemory: number;
+ externalMemory: number;
+ peakMallocedMemory: number;
+ }
+ interface HeapSpaceStatistics {
+ spaceName: string;
+ spaceSize: number;
+ spaceUsedSize: number;
+ spaceAvailableSize: number;
+ physicalSpaceSize: number;
+ }
+ /**
+ * Called when a promise is constructed. This does not mean that corresponding before/after events will occur, only that the possibility exists. This will
+ * happen if a promise is created without ever getting a continuation.
+ * @since v17.1.0, v16.14.0
+ * @param promise The promise being created.
+ * @param parent The promise continued from, if applicable.
+ */
+ interface Init {
+ (promise: Promise<unknown>, parent: Promise<unknown>): void;
+ }
+ /**
+ * Called before a promise continuation executes. This can be in the form of `then()`, `catch()`, or `finally()` handlers or an await resuming.
+ *
+ * The before callback will be called 0 to N times. The before callback will typically be called 0 times if no continuation was ever made for the promise.
+ * The before callback may be called many times in the case where many continuations have been made from the same promise.
+ * @since v17.1.0, v16.14.0
+ */
+ interface Before {
+ (promise: Promise<unknown>): void;
+ }
+ /**
+ * Called immediately after a promise continuation executes. This may be after a `then()`, `catch()`, or `finally()` handler or before an await after another await.
+ * @since v17.1.0, v16.14.0
+ */
+ interface After {
+ (promise: Promise<unknown>): void;
+ }
+ /**
+ * Called when the promise receives a resolution or rejection value. This may occur synchronously in the case of {@link Promise.resolve()} or
+ * {@link Promise.reject()}.
+ * @since v17.1.0, v16.14.0
+ */
+ interface Settled {
+ (promise: Promise<unknown>): void;
+ }
+ /**
+ * Key events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or
+ * around an await, and when the promise resolves or rejects.
+ *
+ * Because promises are asynchronous resources whose lifecycle is tracked via the promise hooks mechanism, the `init()`, `before()`, `after()`, and
+ * `settled()` callbacks must not be async functions as they create more promises which would produce an infinite loop.
+ * @since v17.1.0, v16.14.0
+ */
+ interface HookCallbacks {
+ init?: Init;
+ before?: Before;
+ after?: After;
+ settled?: Settled;
+ }
+ interface PromiseHooks {
+ /**
+ * The `init` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
+ * @since v17.1.0, v16.14.0
+ * @param init The {@link Init | `init` callback} to call when a promise is created.
+ * @return Call to stop the hook.
+ */
+ onInit: (init: Init) => Function;
+ /**
+ * The `settled` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
+ * @since v17.1.0, v16.14.0
+ * @param settled The {@link Settled | `settled` callback} to call when a promise is created.
+ * @return Call to stop the hook.
+ */
+ onSettled: (settled: Settled) => Function;
+ /**
+ * The `before` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
+ * @since v17.1.0, v16.14.0
+ * @param before The {@link Before | `before` callback} to call before a promise continuation executes.
+ * @return Call to stop the hook.
+ */
+ onBefore: (before: Before) => Function;
+ /**
+ * The `after` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
+ * @since v17.1.0, v16.14.0
+ * @param after The {@link After | `after` callback} to call after a promise continuation executes.
+ * @return Call to stop the hook.
+ */
+ onAfter: (after: After) => Function;
+ /**
+ * Registers functions to be called for different lifetime events of each promise.
+ * The callbacks `init()`/`before()`/`after()`/`settled()` are called for the respective events during a promise's lifetime.
+ * All callbacks are optional. For example, if only promise creation needs to be tracked, then only the init callback needs to be passed.
+ * The hook callbacks must be plain functions. Providing async functions will throw as it would produce an infinite microtask loop.
+ * @since v17.1.0, v16.14.0
+ * @param callbacks The {@link HookCallbacks | Hook Callbacks} to register
+ * @return Used for disabling hooks
+ */
+ createHook: (callbacks: HookCallbacks) => Function;
+ }
+ /**
+ * The `promiseHooks` interface can be used to track promise lifecycle events.
+ * @since v17.1.0, v16.14.0
+ */
+ const promiseHooks: PromiseHooks;
+}
+declare module 'node:v8' {
+ export * from 'v8';
+}
diff --git a/node_modules/@types/node/ts4.8/vm.d.ts b/node_modules/@types/node/ts4.8/vm.d.ts
new file mode 100755
index 0000000..b1aa99d
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/vm.d.ts
@@ -0,0 +1,895 @@
+/**
+ * The `node:vm` module enables compiling and running code within V8 Virtual
+ * Machine contexts.
+ *
+ * **The `node:vm` module is not a security**
+ * **mechanism. Do not use it to run untrusted code.**
+ *
+ * JavaScript code can be compiled and run immediately or
+ * compiled, saved, and run later.
+ *
+ * A common use case is to run the code in a different V8 Context. This means
+ * invoked code has a different global object than the invoking code.
+ *
+ * One can provide the context by `contextifying` an
+ * object. The invoked code treats any property in the context like a
+ * global variable. Any changes to global variables caused by the invoked
+ * code are reflected in the context object.
+ *
+ * ```js
+ * const vm = require('node:vm');
+ *
+ * const x = 1;
+ *
+ * const context = { x: 2 };
+ * vm.createContext(context); // Contextify the object.
+ *
+ * const code = 'x += 40; var y = 17;';
+ * // `x` and `y` are global variables in the context.
+ * // Initially, x has the value 2 because that is the value of context.x.
+ * vm.runInContext(code, context);
+ *
+ * console.log(context.x); // 42
+ * console.log(context.y); // 17
+ *
+ * console.log(x); // 1; y is not defined.
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/vm.js)
+ */
+declare module 'vm' {
+ import { ImportAssertions } from 'node:module';
+ interface Context extends NodeJS.Dict<any> {}
+ interface BaseOptions {
+ /**
+ * Specifies the filename used in stack traces produced by this script.
+ * Default: `''`.
+ */
+ filename?: string | undefined;
+ /**
+ * Specifies the line number offset that is displayed in stack traces produced by this script.
+ * Default: `0`.
+ */
+ lineOffset?: number | undefined;
+ /**
+ * Specifies the column number offset that is displayed in stack traces produced by this script.
+ * @default 0
+ */
+ columnOffset?: number | undefined;
+ }
+ interface ScriptOptions extends BaseOptions {
+ /**
+ * V8's code cache data for the supplied source.
+ */
+ cachedData?: Buffer | NodeJS.ArrayBufferView | undefined;
+ /** @deprecated in favor of `script.createCachedData()` */
+ produceCachedData?: boolean | undefined;
+ /**
+ * Called during evaluation of this module when `import()` is called.
+ * If this option is not specified, calls to `import()` will reject with `ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING`.
+ */
+ importModuleDynamically?: ((specifier: string, script: Script, importAssertions: ImportAssertions) => Module) | undefined;
+ }
+ interface RunningScriptOptions extends BaseOptions {
+ /**
+ * When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace.
+ * Default: `true`.
+ */
+ displayErrors?: boolean | undefined;
+ /**
+ * Specifies the number of milliseconds to execute code before terminating execution.
+ * If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer.
+ */
+ timeout?: number | undefined;
+ /**
+ * If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received.
+ * Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that.
+ * If execution is terminated, an `Error` will be thrown.
+ * Default: `false`.
+ */
+ breakOnSigint?: boolean | undefined;
+ }
+ interface RunningScriptInNewContextOptions extends RunningScriptOptions {
+ /**
+ * Human-readable name of the newly created context.
+ */
+ contextName?: CreateContextOptions['name'];
+ /**
+ * Origin corresponding to the newly created context for display purposes. The origin should be formatted like a URL,
+ * but with only the scheme, host, and port (if necessary), like the value of the `url.origin` property of a `URL` object.
+ * Most notably, this string should omit the trailing slash, as that denotes a path.
+ */
+ contextOrigin?: CreateContextOptions['origin'];
+ contextCodeGeneration?: CreateContextOptions['codeGeneration'];
+ /**
+ * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
+ */
+ microtaskMode?: CreateContextOptions['microtaskMode'];
+ }
+ interface RunningCodeOptions extends RunningScriptOptions {
+ cachedData?: ScriptOptions['cachedData'];
+ importModuleDynamically?: ScriptOptions['importModuleDynamically'];
+ }
+ interface RunningCodeInNewContextOptions extends RunningScriptInNewContextOptions {
+ cachedData?: ScriptOptions['cachedData'];
+ importModuleDynamically?: ScriptOptions['importModuleDynamically'];
+ }
+ interface CompileFunctionOptions extends BaseOptions {
+ /**
+ * Provides an optional data with V8's code cache data for the supplied source.
+ */
+ cachedData?: Buffer | undefined;
+ /**
+ * Specifies whether to produce new cache data.
+ * Default: `false`,
+ */
+ produceCachedData?: boolean | undefined;
+ /**
+ * The sandbox/context in which the said function should be compiled in.
+ */
+ parsingContext?: Context | undefined;
+ /**
+ * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling
+ */
+ contextExtensions?: Object[] | undefined;
+ }
+ interface CreateContextOptions {
+ /**
+ * Human-readable name of the newly created context.
+ * @default 'VM Context i' Where i is an ascending numerical index of the created context.
+ */
+ name?: string | undefined;
+ /**
+ * Corresponds to the newly created context for display purposes.
+ * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary),
+ * like the value of the `url.origin` property of a URL object.
+ * Most notably, this string should omit the trailing slash, as that denotes a path.
+ * @default ''
+ */
+ origin?: string | undefined;
+ codeGeneration?:
+ | {
+ /**
+ * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
+ * will throw an EvalError.
+ * @default true
+ */
+ strings?: boolean | undefined;
+ /**
+ * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
+ * @default true
+ */
+ wasm?: boolean | undefined;
+ }
+ | undefined;
+ /**
+ * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
+ */
+ microtaskMode?: 'afterEvaluate' | undefined;
+ }
+ type MeasureMemoryMode = 'summary' | 'detailed';
+ interface MeasureMemoryOptions {
+ /**
+ * @default 'summary'
+ */
+ mode?: MeasureMemoryMode | undefined;
+ /**
+ * @default 'default'
+ */
+ execution?: 'default' | 'eager' | undefined;
+ }
+ interface MemoryMeasurement {
+ total: {
+ jsMemoryEstimate: number;
+ jsMemoryRange: [number, number];
+ };
+ }
+ /**
+ * Instances of the `vm.Script` class contain precompiled scripts that can be
+ * executed in specific contexts.
+ * @since v0.3.1
+ */
+ class Script {
+ constructor(code: string, options?: ScriptOptions | string);
+ /**
+ * Runs the compiled code contained by the `vm.Script` object within the given`contextifiedObject` and returns the result. Running code does not have access
+ * to local scope.
+ *
+ * The following example compiles code that increments a global variable, sets
+ * the value of another global variable, then execute the code multiple times.
+ * The globals are contained in the `context` object.
+ *
+ * ```js
+ * const vm = require('node:vm');
+ *
+ * const context = {
+ * animal: 'cat',
+ * count: 2,
+ * };
+ *
+ * const script = new vm.Script('count += 1; name = "kitty";');
+ *
+ * vm.createContext(context);
+ * for (let i = 0; i < 10; ++i) {
+ * script.runInContext(context);
+ * }
+ *
+ * console.log(context);
+ * // Prints: { animal: 'cat', count: 12, name: 'kitty' }
+ * ```
+ *
+ * Using the `timeout` or `breakOnSigint` options will result in new event loops
+ * and corresponding threads being started, which have a non-zero performance
+ * overhead.
+ * @since v0.3.1
+ * @param contextifiedObject A `contextified` object as returned by the `vm.createContext()` method.
+ * @return the result of the very last statement executed in the script.
+ */
+ runInContext(contextifiedObject: Context, options?: RunningScriptOptions): any;
+ /**
+ * First contextifies the given `contextObject`, runs the compiled code contained
+ * by the `vm.Script` object within the created context, and returns the result.
+ * Running code does not have access to local scope.
+ *
+ * The following example compiles code that sets a global variable, then executes
+ * the code multiple times in different contexts. The globals are set on and
+ * contained within each individual `context`.
+ *
+ * ```js
+ * const vm = require('node:vm');
+ *
+ * const script = new vm.Script('globalVar = "set"');
+ *
+ * const contexts = [{}, {}, {}];
+ * contexts.forEach((context) => {
+ * script.runInNewContext(context);
+ * });
+ *
+ * console.log(contexts);
+ * // Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }]
+ * ```
+ * @since v0.3.1
+ * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
+ * @return the result of the very last statement executed in the script.
+ */
+ runInNewContext(contextObject?: Context, options?: RunningScriptInNewContextOptions): any;
+ /**
+ * Runs the compiled code contained by the `vm.Script` within the context of the
+ * current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object.
+ *
+ * The following example compiles code that increments a `global` variable then
+ * executes that code multiple times:
+ *
+ * ```js
+ * const vm = require('node:vm');
+ *
+ * global.globalVar = 0;
+ *
+ * const script = new vm.Script('globalVar += 1', { filename: 'myfile.vm' });
+ *
+ * for (let i = 0; i < 1000; ++i) {
+ * script.runInThisContext();
+ * }
+ *
+ * console.log(globalVar);
+ *
+ * // 1000
+ * ```
+ * @since v0.3.1
+ * @return the result of the very last statement executed in the script.
+ */
+ runInThisContext(options?: RunningScriptOptions): any;
+ /**
+ * Creates a code cache that can be used with the `Script` constructor's`cachedData` option. Returns a `Buffer`. This method may be called at any
+ * time and any number of times.
+ *
+ * The code cache of the `Script` doesn't contain any JavaScript observable
+ * states. The code cache is safe to be saved along side the script source and
+ * used to construct new `Script` instances multiple times.
+ *
+ * Functions in the `Script` source can be marked as lazily compiled and they are
+ * not compiled at construction of the `Script`. These functions are going to be
+ * compiled when they are invoked the first time. The code cache serializes the
+ * metadata that V8 currently knows about the `Script` that it can use to speed up
+ * future compilations.
+ *
+ * ```js
+ * const script = new vm.Script(`
+ * function add(a, b) {
+ * return a + b;
+ * }
+ *
+ * const x = add(1, 2);
+ * `);
+ *
+ * const cacheWithoutAdd = script.createCachedData();
+ * // In `cacheWithoutAdd` the function `add()` is marked for full compilation
+ * // upon invocation.
+ *
+ * script.runInThisContext();
+ *
+ * const cacheWithAdd = script.createCachedData();
+ * // `cacheWithAdd` contains fully compiled function `add()`.
+ * ```
+ * @since v10.6.0
+ */
+ createCachedData(): Buffer;
+ /** @deprecated in favor of `script.createCachedData()` */
+ cachedDataProduced?: boolean | undefined;
+ /**
+ * When `cachedData` is supplied to create the `vm.Script`, this value will be set
+ * to either `true` or `false` depending on acceptance of the data by V8\.
+ * Otherwise the value is `undefined`.
+ * @since v5.7.0
+ */
+ cachedDataRejected?: boolean | undefined;
+ cachedData?: Buffer | undefined;
+ /**
+ * When the script is compiled from a source that contains a source map magic
+ * comment, this property will be set to the URL of the source map.
+ *
+ * ```js
+ * import vm from 'node:vm';
+ *
+ * const script = new vm.Script(`
+ * function myFunc() {}
+ * //# sourceMappingURL=sourcemap.json
+ * `);
+ *
+ * console.log(script.sourceMapURL);
+ * // Prints: sourcemap.json
+ * ```
+ * @since v19.1.0, v18.13.0
+ */
+ sourceMapURL?: string | undefined;
+ }
+ /**
+ * If given a `contextObject`, the `vm.createContext()` method will `prepare
+ * that object` so that it can be used in calls to {@link runInContext} or `script.runInContext()`. Inside such scripts,
+ * the `contextObject` will be the global object, retaining all of its existing
+ * properties but also having the built-in objects and functions any standard [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global variables
+ * will remain unchanged.
+ *
+ * ```js
+ * const vm = require('node:vm');
+ *
+ * global.globalVar = 3;
+ *
+ * const context = { globalVar: 1 };
+ * vm.createContext(context);
+ *
+ * vm.runInContext('globalVar *= 2;', context);
+ *
+ * console.log(context);
+ * // Prints: { globalVar: 2 }
+ *
+ * console.log(global.globalVar);
+ * // Prints: 3
+ * ```
+ *
+ * If `contextObject` is omitted (or passed explicitly as `undefined`), a new,
+ * empty `contextified` object will be returned.
+ *
+ * The `vm.createContext()` method is primarily useful for creating a single
+ * context that can be used to run multiple scripts. For instance, if emulating a
+ * web browser, the method can be used to create a single context representing a
+ * window's global object, then run all `<script>` tags together within that
+ * context.
+ *
+ * The provided `name` and `origin` of the context are made visible through the
+ * Inspector API.
+ * @since v0.3.1
+ * @return contextified object.
+ */
+ function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
+ /**
+ * Returns `true` if the given `object` object has been `contextified` using {@link createContext}.
+ * @since v0.11.7
+ */
+ function isContext(sandbox: Context): boolean;
+ /**
+ * The `vm.runInContext()` method compiles `code`, runs it within the context of
+ * the `contextifiedObject`, then returns the result. Running code does not have
+ * access to the local scope. The `contextifiedObject` object _must_ have been
+ * previously `contextified` using the {@link createContext} method.
+ *
+ * If `options` is a string, then it specifies the filename.
+ *
+ * The following example compiles and executes different scripts using a single `contextified` object:
+ *
+ * ```js
+ * const vm = require('node:vm');
+ *
+ * const contextObject = { globalVar: 1 };
+ * vm.createContext(contextObject);
+ *
+ * for (let i = 0; i < 10; ++i) {
+ * vm.runInContext('globalVar *= 2;', contextObject);
+ * }
+ * console.log(contextObject);
+ * // Prints: { globalVar: 1024 }
+ * ```
+ * @since v0.3.1
+ * @param code The JavaScript code to compile and run.
+ * @param contextifiedObject The `contextified` object that will be used as the `global` when the `code` is compiled and run.
+ * @return the result of the very last statement executed in the script.
+ */
+ function runInContext(code: string, contextifiedObject: Context, options?: RunningCodeOptions | string): any;
+ /**
+ * The `vm.runInNewContext()` first contextifies the given `contextObject` (or
+ * creates a new `contextObject` if passed as `undefined`), compiles the `code`,
+ * runs it within the created context, then returns the result. Running code
+ * does not have access to the local scope.
+ *
+ * If `options` is a string, then it specifies the filename.
+ *
+ * The following example compiles and executes code that increments a global
+ * variable and sets a new one. These globals are contained in the `contextObject`.
+ *
+ * ```js
+ * const vm = require('node:vm');
+ *
+ * const contextObject = {
+ * animal: 'cat',
+ * count: 2,
+ * };
+ *
+ * vm.runInNewContext('count += 1; name = "kitty"', contextObject);
+ * console.log(contextObject);
+ * // Prints: { animal: 'cat', count: 3, name: 'kitty' }
+ * ```
+ * @since v0.3.1
+ * @param code The JavaScript code to compile and run.
+ * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
+ * @return the result of the very last statement executed in the script.
+ */
+ function runInNewContext(code: string, contextObject?: Context, options?: RunningCodeInNewContextOptions | string): any;
+ /**
+ * `vm.runInThisContext()` compiles `code`, runs it within the context of the
+ * current `global` and returns the result. Running code does not have access to
+ * local scope, but does have access to the current `global` object.
+ *
+ * If `options` is a string, then it specifies the filename.
+ *
+ * The following example illustrates using both `vm.runInThisContext()` and
+ * the JavaScript [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) function to run the same code:
+ *
+ * ```js
+ * const vm = require('node:vm');
+ * let localVar = 'initial value';
+ *
+ * const vmResult = vm.runInThisContext('localVar = "vm";');
+ * console.log(`vmResult: '${vmResult}', localVar: '${localVar}'`);
+ * // Prints: vmResult: 'vm', localVar: 'initial value'
+ *
+ * const evalResult = eval('localVar = "eval";');
+ * console.log(`evalResult: '${evalResult}', localVar: '${localVar}'`);
+ * // Prints: evalResult: 'eval', localVar: 'eval'
+ * ```
+ *
+ * Because `vm.runInThisContext()` does not have access to the local scope,`localVar` is unchanged. In contrast,
+ * [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) _does_ have access to the
+ * local scope, so the value `localVar` is changed. In this way`vm.runInThisContext()` is much like an [indirect `eval()` call](https://es5.github.io/#x10.4.2), e.g.`(0,eval)('code')`.
+ *
+ * ## Example: Running an HTTP server within a VM
+ *
+ * When using either `script.runInThisContext()` or {@link runInThisContext}, the code is executed within the current V8 global
+ * context. The code passed to this VM context will have its own isolated scope.
+ *
+ * In order to run a simple web server using the `node:http` module the code passed
+ * to the context must either call `require('node:http')` on its own, or have a
+ * reference to the `node:http` module passed to it. For instance:
+ *
+ * ```js
+ * 'use strict';
+ * const vm = require('node:vm');
+ *
+ * const code = `
+ * ((require) => {
+ * const http = require('node:http');
+ *
+ * http.createServer((request, response) => {
+ * response.writeHead(200, { 'Content-Type': 'text/plain' });
+ * response.end('Hello World\\n');
+ * }).listen(8124);
+ *
+ * console.log('Server running at http://127.0.0.1:8124/');
+ * })`;
+ *
+ * vm.runInThisContext(code)(require);
+ * ```
+ *
+ * The `require()` in the above case shares the state with the context it is
+ * passed from. This may introduce risks when untrusted code is executed, e.g.
+ * altering objects in the context in unwanted ways.
+ * @since v0.3.1
+ * @param code The JavaScript code to compile and run.
+ * @return the result of the very last statement executed in the script.
+ */
+ function runInThisContext(code: string, options?: RunningCodeOptions | string): any;
+ /**
+ * Compiles the given code into the provided context (if no context is
+ * supplied, the current context is used), and returns it wrapped inside a
+ * function with the given `params`.
+ * @since v10.10.0
+ * @param code The body of the function to compile.
+ * @param params An array of strings containing all parameters for the function.
+ */
+ function compileFunction(
+ code: string,
+ params?: ReadonlyArray<string>,
+ options?: CompileFunctionOptions
+ ): Function & {
+ cachedData?: Script['cachedData'] | undefined;
+ cachedDataProduced?: Script['cachedDataProduced'] | undefined;
+ cachedDataRejected?: Script['cachedDataRejected'] | undefined;
+ };
+ /**
+ * Measure the memory known to V8 and used by all contexts known to the
+ * current V8 isolate, or the main context.
+ *
+ * The format of the object that the returned Promise may resolve with is
+ * specific to the V8 engine and may change from one version of V8 to the next.
+ *
+ * The returned result is different from the statistics returned by`v8.getHeapSpaceStatistics()` in that `vm.measureMemory()` measure the
+ * memory reachable by each V8 specific contexts in the current instance of
+ * the V8 engine, while the result of `v8.getHeapSpaceStatistics()` measure
+ * the memory occupied by each heap space in the current V8 instance.
+ *
+ * ```js
+ * const vm = require('node:vm');
+ * // Measure the memory used by the main context.
+ * vm.measureMemory({ mode: 'summary' })
+ * // This is the same as vm.measureMemory()
+ * .then((result) => {
+ * // The current format is:
+ * // {
+ * // total: {
+ * // jsMemoryEstimate: 2418479, jsMemoryRange: [ 2418479, 2745799 ]
+ * // }
+ * // }
+ * console.log(result);
+ * });
+ *
+ * const context = vm.createContext({ a: 1 });
+ * vm.measureMemory({ mode: 'detailed', execution: 'eager' })
+ * .then((result) => {
+ * // Reference the context here so that it won't be GC'ed
+ * // until the measurement is complete.
+ * console.log(context.a);
+ * // {
+ * // total: {
+ * // jsMemoryEstimate: 2574732,
+ * // jsMemoryRange: [ 2574732, 2904372 ]
+ * // },
+ * // current: {
+ * // jsMemoryEstimate: 2438996,
+ * // jsMemoryRange: [ 2438996, 2768636 ]
+ * // },
+ * // other: [
+ * // {
+ * // jsMemoryEstimate: 135736,
+ * // jsMemoryRange: [ 135736, 465376 ]
+ * // }
+ * // ]
+ * // }
+ * console.log(result);
+ * });
+ * ```
+ * @since v13.10.0
+ * @experimental
+ */
+ function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
+ interface ModuleEvaluateOptions {
+ timeout?: RunningScriptOptions['timeout'] | undefined;
+ breakOnSigint?: RunningScriptOptions['breakOnSigint'] | undefined;
+ }
+ type ModuleLinker = (
+ specifier: string,
+ referencingModule: Module,
+ extra: {
+ assert: Object;
+ }
+ ) => Module | Promise<Module>;
+ type ModuleStatus = 'unlinked' | 'linking' | 'linked' | 'evaluating' | 'evaluated' | 'errored';
+ /**
+ * This feature is only available with the `--experimental-vm-modules` command
+ * flag enabled.
+ *
+ * The `vm.Module` class provides a low-level interface for using
+ * ECMAScript modules in VM contexts. It is the counterpart of the `vm.Script`class that closely mirrors [Module Record](https://www.ecma-international.org/ecma-262/#sec-abstract-module-records)
+ * s as defined in the ECMAScript
+ * specification.
+ *
+ * Unlike `vm.Script` however, every `vm.Module` object is bound to a context from
+ * its creation. Operations on `vm.Module` objects are intrinsically asynchronous,
+ * in contrast with the synchronous nature of `vm.Script` objects. The use of
+ * 'async' functions can help with manipulating `vm.Module` objects.
+ *
+ * Using a `vm.Module` object requires three distinct steps: creation/parsing,
+ * linking, and evaluation. These three steps are illustrated in the following
+ * example.
+ *
+ * This implementation lies at a lower level than the `ECMAScript Module
+ * loader`. There is also no way to interact with the Loader yet, though
+ * support is planned.
+ *
+ * ```js
+ * import vm from 'node:vm';
+ *
+ * const contextifiedObject = vm.createContext({
+ * secret: 42,
+ * print: console.log,
+ * });
+ *
+ * // Step 1
+ * //
+ * // Create a Module by constructing a new `vm.SourceTextModule` object. This
+ * // parses the provided source text, throwing a `SyntaxError` if anything goes
+ * // wrong. By default, a Module is created in the top context. But here, we
+ * // specify `contextifiedObject` as the context this Module belongs to.
+ * //
+ * // Here, we attempt to obtain the default export from the module "foo", and
+ * // put it into local binding "secret".
+ *
+ * const bar = new vm.SourceTextModule(`
+ * import s from 'foo';
+ * s;
+ * print(s);
+ * `, { context: contextifiedObject });
+ *
+ * // Step 2
+ * //
+ * // "Link" the imported dependencies of this Module to it.
+ * //
+ * // The provided linking callback (the "linker") accepts two arguments: the
+ * // parent module (`bar` in this case) and the string that is the specifier of
+ * // the imported module. The callback is expected to return a Module that
+ * // corresponds to the provided specifier, with certain requirements documented
+ * // in `module.link()`.
+ * //
+ * // If linking has not started for the returned Module, the same linker
+ * // callback will be called on the returned Module.
+ * //
+ * // Even top-level Modules without dependencies must be explicitly linked. The
+ * // callback provided would never be called, however.
+ * //
+ * // The link() method returns a Promise that will be resolved when all the
+ * // Promises returned by the linker resolve.
+ * //
+ * // Note: This is a contrived example in that the linker function creates a new
+ * // "foo" module every time it is called. In a full-fledged module system, a
+ * // cache would probably be used to avoid duplicated modules.
+ *
+ * async function linker(specifier, referencingModule) {
+ * if (specifier === 'foo') {
+ * return new vm.SourceTextModule(`
+ * // The "secret" variable refers to the global variable we added to
+ * // "contextifiedObject" when creating the context.
+ * export default secret;
+ * `, { context: referencingModule.context });
+ *
+ * // Using `contextifiedObject` instead of `referencingModule.context`
+ * // here would work as well.
+ * }
+ * throw new Error(`Unable to resolve dependency: ${specifier}`);
+ * }
+ * await bar.link(linker);
+ *
+ * // Step 3
+ * //
+ * // Evaluate the Module. The evaluate() method returns a promise which will
+ * // resolve after the module has finished evaluating.
+ *
+ * // Prints 42.
+ * await bar.evaluate();
+ * ```
+ * @since v13.0.0, v12.16.0
+ * @experimental
+ */
+ class Module {
+ /**
+ * The specifiers of all dependencies of this module. The returned array is frozen
+ * to disallow any changes to it.
+ *
+ * Corresponds to the `[[RequestedModules]]` field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in
+ * the ECMAScript specification.
+ */
+ dependencySpecifiers: readonly string[];
+ /**
+ * If the `module.status` is `'errored'`, this property contains the exception
+ * thrown by the module during evaluation. If the status is anything else,
+ * accessing this property will result in a thrown exception.
+ *
+ * The value `undefined` cannot be used for cases where there is not a thrown
+ * exception due to possible ambiguity with `throw undefined;`.
+ *
+ * Corresponds to the `[[EvaluationError]]` field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s
+ * in the ECMAScript specification.
+ */
+ error: any;
+ /**
+ * The identifier of the current module, as set in the constructor.
+ */
+ identifier: string;
+ context: Context;
+ /**
+ * The namespace object of the module. This is only available after linking
+ * (`module.link()`) has completed.
+ *
+ * Corresponds to the [GetModuleNamespace](https://tc39.es/ecma262/#sec-getmodulenamespace) abstract operation in the ECMAScript
+ * specification.
+ */
+ namespace: Object;
+ /**
+ * The current status of the module. Will be one of:
+ *
+ * * `'unlinked'`: `module.link()` has not yet been called.
+ * * `'linking'`: `module.link()` has been called, but not all Promises returned
+ * by the linker function have been resolved yet.
+ * * `'linked'`: The module has been linked successfully, and all of its
+ * dependencies are linked, but `module.evaluate()` has not yet been called.
+ * * `'evaluating'`: The module is being evaluated through a `module.evaluate()` on
+ * itself or a parent module.
+ * * `'evaluated'`: The module has been successfully evaluated.
+ * * `'errored'`: The module has been evaluated, but an exception was thrown.
+ *
+ * Other than `'errored'`, this status string corresponds to the specification's [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records)'s `[[Status]]` field. `'errored'`
+ * corresponds to`'evaluated'` in the specification, but with `[[EvaluationError]]` set to a
+ * value that is not `undefined`.
+ */
+ status: ModuleStatus;
+ /**
+ * Evaluate the module.
+ *
+ * This must be called after the module has been linked; otherwise it will reject.
+ * It could be called also when the module has already been evaluated, in which
+ * case it will either do nothing if the initial evaluation ended in success
+ * (`module.status` is `'evaluated'`) or it will re-throw the exception that the
+ * initial evaluation resulted in (`module.status` is `'errored'`).
+ *
+ * This method cannot be called while the module is being evaluated
+ * (`module.status` is `'evaluating'`).
+ *
+ * Corresponds to the [Evaluate() concrete method](https://tc39.es/ecma262/#sec-moduleevaluation) field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in the
+ * ECMAScript specification.
+ * @return Fulfills with `undefined` upon success.
+ */
+ evaluate(options?: ModuleEvaluateOptions): Promise<void>;
+ /**
+ * Link module dependencies. This method must be called before evaluation, and
+ * can only be called once per module.
+ *
+ * The function is expected to return a `Module` object or a `Promise` that
+ * eventually resolves to a `Module` object. The returned `Module` must satisfy the
+ * following two invariants:
+ *
+ * * It must belong to the same context as the parent `Module`.
+ * * Its `status` must not be `'errored'`.
+ *
+ * If the returned `Module`'s `status` is `'unlinked'`, this method will be
+ * recursively called on the returned `Module` with the same provided `linker`function.
+ *
+ * `link()` returns a `Promise` that will either get resolved when all linking
+ * instances resolve to a valid `Module`, or rejected if the linker function either
+ * throws an exception or returns an invalid `Module`.
+ *
+ * The linker function roughly corresponds to the implementation-defined [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) abstract operation in the
+ * ECMAScript
+ * specification, with a few key differences:
+ *
+ * * The linker function is allowed to be asynchronous while [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) is synchronous.
+ *
+ * The actual [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) implementation used during module
+ * linking is one that returns the modules linked during linking. Since at
+ * that point all modules would have been fully linked already, the [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) implementation is fully synchronous per
+ * specification.
+ *
+ * Corresponds to the [Link() concrete method](https://tc39.es/ecma262/#sec-moduledeclarationlinking) field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in
+ * the ECMAScript specification.
+ */
+ link(linker: ModuleLinker): Promise<void>;
+ }
+ interface SourceTextModuleOptions {
+ /**
+ * String used in stack traces.
+ * @default 'vm:module(i)' where i is a context-specific ascending index.
+ */
+ identifier?: string | undefined;
+ cachedData?: ScriptOptions['cachedData'] | undefined;
+ context?: Context | undefined;
+ lineOffset?: BaseOptions['lineOffset'] | undefined;
+ columnOffset?: BaseOptions['columnOffset'] | undefined;
+ /**
+ * Called during evaluation of this module to initialize the `import.meta`.
+ */
+ initializeImportMeta?: ((meta: ImportMeta, module: SourceTextModule) => void) | undefined;
+ importModuleDynamically?: ScriptOptions['importModuleDynamically'] | undefined;
+ }
+ /**
+ * This feature is only available with the `--experimental-vm-modules` command
+ * flag enabled.
+ *
+ *
+ *
+ * The `vm.SourceTextModule` class provides the [Source Text Module Record](https://tc39.es/ecma262/#sec-source-text-module-records) as
+ * defined in the ECMAScript specification.
+ * @since v9.6.0
+ * @experimental
+ */
+ class SourceTextModule extends Module {
+ /**
+ * Creates a new `SourceTextModule` instance.
+ * @param code JavaScript Module code to parse
+ */
+ constructor(code: string, options?: SourceTextModuleOptions);
+ }
+ interface SyntheticModuleOptions {
+ /**
+ * String used in stack traces.
+ * @default 'vm:module(i)' where i is a context-specific ascending index.
+ */
+ identifier?: string | undefined;
+ /**
+ * The contextified object as returned by the `vm.createContext()` method, to compile and evaluate this module in.
+ */
+ context?: Context | undefined;
+ }
+ /**
+ * This feature is only available with the `--experimental-vm-modules` command
+ * flag enabled.
+ *
+ *
+ *
+ * The `vm.SyntheticModule` class provides the [Synthetic Module Record](https://heycam.github.io/webidl/#synthetic-module-records) as
+ * defined in the WebIDL specification. The purpose of synthetic modules is to
+ * provide a generic interface for exposing non-JavaScript sources to ECMAScript
+ * module graphs.
+ *
+ * ```js
+ * const vm = require('node:vm');
+ *
+ * const source = '{ "a": 1 }';
+ * const module = new vm.SyntheticModule(['default'], function() {
+ * const obj = JSON.parse(source);
+ * this.setExport('default', obj);
+ * });
+ *
+ * // Use `module` in linking...
+ * ```
+ * @since v13.0.0, v12.16.0
+ * @experimental
+ */
+ class SyntheticModule extends Module {
+ /**
+ * Creates a new `SyntheticModule` instance.
+ * @param exportNames Array of names that will be exported from the module.
+ * @param evaluateCallback Called when the module is evaluated.
+ */
+ constructor(exportNames: string[], evaluateCallback: (this: SyntheticModule) => void, options?: SyntheticModuleOptions);
+ /**
+ * This method is used after the module is linked to set the values of exports. If
+ * it is called before the module is linked, an `ERR_VM_MODULE_STATUS` error
+ * will be thrown.
+ *
+ * ```js
+ * import vm from 'node:vm';
+ *
+ * const m = new vm.SyntheticModule(['x'], () => {
+ * m.setExport('x', 1);
+ * });
+ *
+ * await m.link(() => {});
+ * await m.evaluate();
+ *
+ * assert.strictEqual(m.namespace.x, 1);
+ * ```
+ * @since v13.0.0, v12.16.0
+ * @param name Name of the export to set.
+ * @param value The value to set the export to.
+ */
+ setExport(name: string, value: any): void;
+ }
+}
+declare module 'node:vm' {
+ export * from 'vm';
+}
diff --git a/node_modules/@types/node/ts4.8/wasi.d.ts b/node_modules/@types/node/ts4.8/wasi.d.ts
new file mode 100755
index 0000000..b430b3a
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/wasi.d.ts
@@ -0,0 +1,152 @@
+/**
+ * The WASI API provides an implementation of the [WebAssembly System Interface](https://wasi.dev/) specification. WASI gives sandboxed WebAssembly applications access to the
+ * underlying operating system via a collection of POSIX-like functions.
+ *
+ * ```js
+ * import { readFile } from 'node:fs/promises';
+ * import { WASI } from 'wasi';
+ * import { argv, env } from 'node:process';
+ *
+ * const wasi = new WASI({
+ * version: 'preview1',
+ * args: argv,
+ * env,
+ * preopens: {
+ * '/sandbox': '/some/real/path/that/wasm/can/access',
+ * },
+ * });
+ *
+ * const wasm = await WebAssembly.compile(
+ * await readFile(new URL('./demo.wasm', import.meta.url)),
+ * );
+ * const instance = await WebAssembly.instantiate(wasm, wasi.getImportObject());
+ *
+ * wasi.start(instance);
+ * ```
+ *
+ * To run the above example, create a new WebAssembly text format file named`demo.wat`:
+ *
+ * ```text
+ * (module
+ * ;; Import the required fd_write WASI function which will write the given io vectors to stdout
+ * ;; The function signature for fd_write is:
+ * ;; (File Descriptor, *iovs, iovs_len, nwritten) -> Returns number of bytes written
+ * (import "wasi_snapshot_preview1" "fd_write" (func $fd_write (param i32 i32 i32 i32) (result i32)))
+ *
+ * (memory 1)
+ * (export "memory" (memory 0))
+ *
+ * ;; Write 'hello world\n' to memory at an offset of 8 bytes
+ * ;; Note the trailing newline which is required for the text to appear
+ * (data (i32.const 8) "hello world\n")
+ *
+ * (func $main (export "_start")
+ * ;; Creating a new io vector within linear memory
+ * (i32.store (i32.const 0) (i32.const 8)) ;; iov.iov_base - This is a pointer to the start of the 'hello world\n' string
+ * (i32.store (i32.const 4) (i32.const 12)) ;; iov.iov_len - The length of the 'hello world\n' string
+ *
+ * (call $fd_write
+ * (i32.const 1) ;; file_descriptor - 1 for stdout
+ * (i32.const 0) ;; *iovs - The pointer to the iov array, which is stored at memory location 0
+ * (i32.const 1) ;; iovs_len - We're printing 1 string stored in an iov - so one.
+ * (i32.const 20) ;; nwritten - A place in memory to store the number of bytes written
+ * )
+ * drop ;; Discard the number of bytes written from the top of the stack
+ * )
+ * )
+ * ```
+ *
+ * Use [wabt](https://github.com/WebAssembly/wabt) to compile `.wat` to `.wasm`
+ *
+ * ```bash
+ * wat2wasm demo.wat
+ * ```
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/wasi.js)
+ */
+declare module 'wasi' {
+ interface WASIOptions {
+ /**
+ * An array of strings that the WebAssembly application will
+ * see as command line arguments. The first argument is the virtual path to the
+ * WASI command itself.
+ */
+ args?: string[] | undefined;
+ /**
+ * An object similar to `process.env` that the WebAssembly
+ * application will see as its environment.
+ */
+ env?: object | undefined;
+ /**
+ * This object represents the WebAssembly application's
+ * sandbox directory structure. The string keys of `preopens` are treated as
+ * directories within the sandbox. The corresponding values in `preopens` are
+ * the real paths to those directories on the host machine.
+ */
+ preopens?: NodeJS.Dict<string> | undefined;
+ /**
+ * By default, when WASI applications call `__wasi_proc_exit()`
+ * `wasi.start()` will return with the exit code specified rather than terminatng the process.
+ * Setting this option to `false` will cause the Node.js process to exit with
+ * the specified exit code instead.
+ * @default true
+ */
+ returnOnExit?: boolean | undefined;
+ /**
+ * The file descriptor used as standard input in the WebAssembly application.
+ * @default 0
+ */
+ stdin?: number | undefined;
+ /**
+ * The file descriptor used as standard output in the WebAssembly application.
+ * @default 1
+ */
+ stdout?: number | undefined;
+ /**
+ * The file descriptor used as standard error in the WebAssembly application.
+ * @default 2
+ */
+ stderr?: number | undefined;
+ }
+ /**
+ * The `WASI` class provides the WASI system call API and additional convenience
+ * methods for working with WASI-based applications. Each `WASI` instance
+ * represents a distinct sandbox environment. For security purposes, each `WASI`instance must have its command-line arguments, environment variables, and
+ * sandbox directory structure configured explicitly.
+ * @since v13.3.0, v12.16.0
+ */
+ class WASI {
+ constructor(options?: WASIOptions);
+ /**
+ * Attempt to begin execution of `instance` as a WASI command by invoking its`_start()` export. If `instance` does not contain a `_start()` export, or if`instance` contains an `_initialize()`
+ * export, then an exception is thrown.
+ *
+ * `start()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named`memory`. If
+ * `instance` does not have a `memory` export an exception is thrown.
+ *
+ * If `start()` is called more than once, an exception is thrown.
+ * @since v13.3.0, v12.16.0
+ */
+ start(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
+ /**
+ * Attempt to initialize `instance` as a WASI reactor by invoking its`_initialize()` export, if it is present. If `instance` contains a `_start()`export, then an exception is thrown.
+ *
+ * `initialize()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named`memory`.
+ * If `instance` does not have a `memory` export an exception is thrown.
+ *
+ * If `initialize()` is called more than once, an exception is thrown.
+ * @since v14.6.0, v12.19.0
+ */
+ initialize(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
+ /**
+ * `wasiImport` is an object that implements the WASI system call API. This object
+ * should be passed as the `wasi_snapshot_preview1` import during the instantiation
+ * of a [`WebAssembly.Instance`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance).
+ * @since v13.3.0, v12.16.0
+ */
+ readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
+ }
+}
+declare module 'node:wasi' {
+ export * from 'wasi';
+}
diff --git a/node_modules/@types/node/ts4.8/worker_threads.d.ts b/node_modules/@types/node/ts4.8/worker_threads.d.ts
new file mode 100755
index 0000000..e11932e
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/worker_threads.d.ts
@@ -0,0 +1,693 @@
+/**
+ * The `node:worker_threads` module enables the use of threads that execute
+ * JavaScript in parallel. To access it:
+ *
+ * ```js
+ * const worker = require('node:worker_threads');
+ * ```
+ *
+ * Workers (threads) are useful for performing CPU-intensive JavaScript operations.
+ * They do not help much with I/O-intensive work. The Node.js built-in
+ * asynchronous I/O operations are more efficient than Workers can be.
+ *
+ * Unlike `child_process` or `cluster`, `worker_threads` can share memory. They do
+ * so by transferring `ArrayBuffer` instances or sharing `SharedArrayBuffer`instances.
+ *
+ * ```js
+ * const {
+ * Worker, isMainThread, parentPort, workerData,
+ * } = require('node:worker_threads');
+ *
+ * if (isMainThread) {
+ * module.exports = function parseJSAsync(script) {
+ * return new Promise((resolve, reject) => {
+ * const worker = new Worker(__filename, {
+ * workerData: script,
+ * });
+ * worker.on('message', resolve);
+ * worker.on('error', reject);
+ * worker.on('exit', (code) => {
+ * if (code !== 0)
+ * reject(new Error(`Worker stopped with exit code ${code}`));
+ * });
+ * });
+ * };
+ * } else {
+ * const { parse } = require('some-js-parsing-library');
+ * const script = workerData;
+ * parentPort.postMessage(parse(script));
+ * }
+ * ```
+ *
+ * The above example spawns a Worker thread for each `parseJSAsync()` call. In
+ * practice, use a pool of Workers for these kinds of tasks. Otherwise, the
+ * overhead of creating Workers would likely exceed their benefit.
+ *
+ * When implementing a worker pool, use the `AsyncResource` API to inform
+ * diagnostic tools (e.g. to provide asynchronous stack traces) about the
+ * correlation between tasks and their outcomes. See `"Using AsyncResource for a Worker thread pool"` in the `async_hooks` documentation for an example implementation.
+ *
+ * Worker threads inherit non-process-specific options by default. Refer to `Worker constructor options` to know how to customize worker thread options,
+ * specifically `argv` and `execArgv` options.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/worker_threads.js)
+ */
+declare module 'worker_threads' {
+ import { Blob } from 'node:buffer';
+ import { Context } from 'node:vm';
+ import { EventEmitter } from 'node:events';
+ import { EventLoopUtilityFunction } from 'node:perf_hooks';
+ import { FileHandle } from 'node:fs/promises';
+ import { Readable, Writable } from 'node:stream';
+ import { URL } from 'node:url';
+ import { X509Certificate } from 'node:crypto';
+ const isMainThread: boolean;
+ const parentPort: null | MessagePort;
+ const resourceLimits: ResourceLimits;
+ const SHARE_ENV: unique symbol;
+ const threadId: number;
+ const workerData: any;
+ /**
+ * Instances of the `worker.MessageChannel` class represent an asynchronous,
+ * two-way communications channel.
+ * The `MessageChannel` has no methods of its own. `new MessageChannel()`yields an object with `port1` and `port2` properties, which refer to linked `MessagePort` instances.
+ *
+ * ```js
+ * const { MessageChannel } = require('node:worker_threads');
+ *
+ * const { port1, port2 } = new MessageChannel();
+ * port1.on('message', (message) => console.log('received', message));
+ * port2.postMessage({ foo: 'bar' });
+ * // Prints: received { foo: 'bar' } from the `port1.on('message')` listener
+ * ```
+ * @since v10.5.0
+ */
+ class MessageChannel {
+ readonly port1: MessagePort;
+ readonly port2: MessagePort;
+ }
+ interface WorkerPerformance {
+ eventLoopUtilization: EventLoopUtilityFunction;
+ }
+ type TransferListItem = ArrayBuffer | MessagePort | FileHandle | X509Certificate | Blob;
+ /**
+ * Instances of the `worker.MessagePort` class represent one end of an
+ * asynchronous, two-way communications channel. It can be used to transfer
+ * structured data, memory regions and other `MessagePort`s between different `Worker` s.
+ *
+ * This implementation matches [browser `MessagePort`](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort) s.
+ * @since v10.5.0
+ */
+ class MessagePort extends EventEmitter {
+ /**
+ * Disables further sending of messages on either side of the connection.
+ * This method can be called when no further communication will happen over this`MessagePort`.
+ *
+ * The `'close' event` is emitted on both `MessagePort` instances that
+ * are part of the channel.
+ * @since v10.5.0
+ */
+ close(): void;
+ /**
+ * Sends a JavaScript value to the receiving side of this channel.`value` is transferred in a way which is compatible with
+ * the [HTML structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm).
+ *
+ * In particular, the significant differences to `JSON` are:
+ *
+ * * `value` may contain circular references.
+ * * `value` may contain instances of builtin JS types such as `RegExp`s,`BigInt`s, `Map`s, `Set`s, etc.
+ * * `value` may contain typed arrays, both using `ArrayBuffer`s
+ * and `SharedArrayBuffer`s.
+ * * `value` may contain [`WebAssembly.Module`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module) instances.
+ * * `value` may not contain native (C++-backed) objects other than:
+ *
+ * ```js
+ * const { MessageChannel } = require('node:worker_threads');
+ * const { port1, port2 } = new MessageChannel();
+ *
+ * port1.on('message', (message) => console.log(message));
+ *
+ * const circularData = {};
+ * circularData.foo = circularData;
+ * // Prints: { foo: [Circular] }
+ * port2.postMessage(circularData);
+ * ```
+ *
+ * `transferList` may be a list of [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer), `MessagePort`, and `FileHandle` objects.
+ * After transferring, they are not usable on the sending side of the channel
+ * anymore (even if they are not contained in `value`). Unlike with `child processes`, transferring handles such as network sockets is currently
+ * not supported.
+ *
+ * If `value` contains [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances, those are accessible
+ * from either thread. They cannot be listed in `transferList`.
+ *
+ * `value` may still contain `ArrayBuffer` instances that are not in`transferList`; in that case, the underlying memory is copied rather than moved.
+ *
+ * ```js
+ * const { MessageChannel } = require('node:worker_threads');
+ * const { port1, port2 } = new MessageChannel();
+ *
+ * port1.on('message', (message) => console.log(message));
+ *
+ * const uint8Array = new Uint8Array([ 1, 2, 3, 4 ]);
+ * // This posts a copy of `uint8Array`:
+ * port2.postMessage(uint8Array);
+ * // This does not copy data, but renders `uint8Array` unusable:
+ * port2.postMessage(uint8Array, [ uint8Array.buffer ]);
+ *
+ * // The memory for the `sharedUint8Array` is accessible from both the
+ * // original and the copy received by `.on('message')`:
+ * const sharedUint8Array = new Uint8Array(new SharedArrayBuffer(4));
+ * port2.postMessage(sharedUint8Array);
+ *
+ * // This transfers a freshly created message port to the receiver.
+ * // This can be used, for example, to create communication channels between
+ * // multiple `Worker` threads that are children of the same parent thread.
+ * const otherChannel = new MessageChannel();
+ * port2.postMessage({ port: otherChannel.port1 }, [ otherChannel.port1 ]);
+ * ```
+ *
+ * The message object is cloned immediately, and can be modified after
+ * posting without having side effects.
+ *
+ * For more information on the serialization and deserialization mechanisms
+ * behind this API, see the `serialization API of the node:v8 module`.
+ * @since v10.5.0
+ */
+ postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
+ /**
+ * Opposite of `unref()`. Calling `ref()` on a previously `unref()`ed port does _not_ let the program exit if it's the only active handle left (the default
+ * behavior). If the port is `ref()`ed, calling `ref()` again has no effect.
+ *
+ * If listeners are attached or removed using `.on('message')`, the port
+ * is `ref()`ed and `unref()`ed automatically depending on whether
+ * listeners for the event exist.
+ * @since v10.5.0
+ */
+ ref(): void;
+ /**
+ * Calling `unref()` on a port allows the thread to exit if this is the only
+ * active handle in the event system. If the port is already `unref()`ed calling`unref()` again has no effect.
+ *
+ * If listeners are attached or removed using `.on('message')`, the port is`ref()`ed and `unref()`ed automatically depending on whether
+ * listeners for the event exist.
+ * @since v10.5.0
+ */
+ unref(): void;
+ /**
+ * Starts receiving messages on this `MessagePort`. When using this port
+ * as an event emitter, this is called automatically once `'message'`listeners are attached.
+ *
+ * This method exists for parity with the Web `MessagePort` API. In Node.js,
+ * it is only useful for ignoring messages when no event listener is present.
+ * Node.js also diverges in its handling of `.onmessage`. Setting it
+ * automatically calls `.start()`, but unsetting it lets messages queue up
+ * until a new handler is set or the port is discarded.
+ * @since v10.5.0
+ */
+ start(): void;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'message', listener: (value: any) => void): this;
+ addListener(event: 'messageerror', listener: (error: Error) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'message', value: any): boolean;
+ emit(event: 'messageerror', error: Error): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'message', listener: (value: any) => void): this;
+ on(event: 'messageerror', listener: (error: Error) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'message', listener: (value: any) => void): this;
+ once(event: 'messageerror', listener: (error: Error) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'message', listener: (value: any) => void): this;
+ prependListener(event: 'messageerror', listener: (error: Error) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'message', listener: (value: any) => void): this;
+ prependOnceListener(event: 'messageerror', listener: (error: Error) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'close', listener: () => void): this;
+ removeListener(event: 'message', listener: (value: any) => void): this;
+ removeListener(event: 'messageerror', listener: (error: Error) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ off(event: 'close', listener: () => void): this;
+ off(event: 'message', listener: (value: any) => void): this;
+ off(event: 'messageerror', listener: (error: Error) => void): this;
+ off(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ interface WorkerOptions {
+ /**
+ * List of arguments which would be stringified and appended to
+ * `process.argv` in the worker. This is mostly similar to the `workerData`
+ * but the values will be available on the global `process.argv` as if they
+ * were passed as CLI options to the script.
+ */
+ argv?: any[] | undefined;
+ env?: NodeJS.Dict<string> | typeof SHARE_ENV | undefined;
+ eval?: boolean | undefined;
+ workerData?: any;
+ stdin?: boolean | undefined;
+ stdout?: boolean | undefined;
+ stderr?: boolean | undefined;
+ execArgv?: string[] | undefined;
+ resourceLimits?: ResourceLimits | undefined;
+ /**
+ * Additional data to send in the first worker message.
+ */
+ transferList?: TransferListItem[] | undefined;
+ /**
+ * @default true
+ */
+ trackUnmanagedFds?: boolean | undefined;
+ /**
+ * An optional `name` to be appended to the worker title
+ * for debuggin/identification purposes, making the final title as
+ * `[worker ${id}] ${name}`.
+ */
+ name?: string | undefined;
+ }
+ interface ResourceLimits {
+ /**
+ * The maximum size of a heap space for recently created objects.
+ */
+ maxYoungGenerationSizeMb?: number | undefined;
+ /**
+ * The maximum size of the main heap in MB.
+ */
+ maxOldGenerationSizeMb?: number | undefined;
+ /**
+ * The size of a pre-allocated memory range used for generated code.
+ */
+ codeRangeSizeMb?: number | undefined;
+ /**
+ * The default maximum stack size for the thread. Small values may lead to unusable Worker instances.
+ * @default 4
+ */
+ stackSizeMb?: number | undefined;
+ }
+ /**
+ * The `Worker` class represents an independent JavaScript execution thread.
+ * Most Node.js APIs are available inside of it.
+ *
+ * Notable differences inside a Worker environment are:
+ *
+ * * The `process.stdin`, `process.stdout`, and `process.stderr` streams may be redirected by the parent thread.
+ * * The `require('node:worker_threads').isMainThread` property is set to `false`.
+ * * The `require('node:worker_threads').parentPort` message port is available.
+ * * `process.exit()` does not stop the whole program, just the single thread,
+ * and `process.abort()` is not available.
+ * * `process.chdir()` and `process` methods that set group or user ids
+ * are not available.
+ * * `process.env` is a copy of the parent thread's environment variables,
+ * unless otherwise specified. Changes to one copy are not visible in other
+ * threads, and are not visible to native add-ons (unless `worker.SHARE_ENV` is passed as the `env` option to the `Worker` constructor).
+ * * `process.title` cannot be modified.
+ * * Signals are not delivered through `process.on('...')`.
+ * * Execution may stop at any point as a result of `worker.terminate()` being invoked.
+ * * IPC channels from parent processes are not accessible.
+ * * The `trace_events` module is not supported.
+ * * Native add-ons can only be loaded from multiple threads if they fulfill `certain conditions`.
+ *
+ * Creating `Worker` instances inside of other `Worker`s is possible.
+ *
+ * Like [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) and the `node:cluster module`, two-way communication
+ * can be achieved through inter-thread message passing. Internally, a `Worker` has
+ * a built-in pair of `MessagePort` s that are already associated with each
+ * other when the `Worker` is created. While the `MessagePort` object on the parent
+ * side is not directly exposed, its functionalities are exposed through `worker.postMessage()` and the `worker.on('message')` event
+ * on the `Worker` object for the parent thread.
+ *
+ * To create custom messaging channels (which is encouraged over using the default
+ * global channel because it facilitates separation of concerns), users can create
+ * a `MessageChannel` object on either thread and pass one of the`MessagePort`s on that `MessageChannel` to the other thread through a
+ * pre-existing channel, such as the global one.
+ *
+ * See `port.postMessage()` for more information on how messages are passed,
+ * and what kind of JavaScript values can be successfully transported through
+ * the thread barrier.
+ *
+ * ```js
+ * const assert = require('node:assert');
+ * const {
+ * Worker, MessageChannel, MessagePort, isMainThread, parentPort,
+ * } = require('node:worker_threads');
+ * if (isMainThread) {
+ * const worker = new Worker(__filename);
+ * const subChannel = new MessageChannel();
+ * worker.postMessage({ hereIsYourPort: subChannel.port1 }, [subChannel.port1]);
+ * subChannel.port2.on('message', (value) => {
+ * console.log('received:', value);
+ * });
+ * } else {
+ * parentPort.once('message', (value) => {
+ * assert(value.hereIsYourPort instanceof MessagePort);
+ * value.hereIsYourPort.postMessage('the worker is sending this');
+ * value.hereIsYourPort.close();
+ * });
+ * }
+ * ```
+ * @since v10.5.0
+ */
+ class Worker extends EventEmitter {
+ /**
+ * If `stdin: true` was passed to the `Worker` constructor, this is a
+ * writable stream. The data written to this stream will be made available in
+ * the worker thread as `process.stdin`.
+ * @since v10.5.0
+ */
+ readonly stdin: Writable | null;
+ /**
+ * This is a readable stream which contains data written to `process.stdout` inside the worker thread. If `stdout: true` was not passed to the `Worker` constructor, then data is piped to the
+ * parent thread's `process.stdout` stream.
+ * @since v10.5.0
+ */
+ readonly stdout: Readable;
+ /**
+ * This is a readable stream which contains data written to `process.stderr` inside the worker thread. If `stderr: true` was not passed to the `Worker` constructor, then data is piped to the
+ * parent thread's `process.stderr` stream.
+ * @since v10.5.0
+ */
+ readonly stderr: Readable;
+ /**
+ * An integer identifier for the referenced thread. Inside the worker thread,
+ * it is available as `require('node:worker_threads').threadId`.
+ * This value is unique for each `Worker` instance inside a single process.
+ * @since v10.5.0
+ */
+ readonly threadId: number;
+ /**
+ * Provides the set of JS engine resource constraints for this Worker thread.
+ * If the `resourceLimits` option was passed to the `Worker` constructor,
+ * this matches its values.
+ *
+ * If the worker has stopped, the return value is an empty object.
+ * @since v13.2.0, v12.16.0
+ */
+ readonly resourceLimits?: ResourceLimits | undefined;
+ /**
+ * An object that can be used to query performance information from a worker
+ * instance. Similar to `perf_hooks.performance`.
+ * @since v15.1.0, v14.17.0, v12.22.0
+ */
+ readonly performance: WorkerPerformance;
+ /**
+ * @param filename The path to the Worker’s main script or module.
+ * Must be either an absolute path or a relative path (i.e. relative to the current working directory) starting with ./ or ../,
+ * or a WHATWG URL object using file: protocol. If options.eval is true, this is a string containing JavaScript code rather than a path.
+ */
+ constructor(filename: string | URL, options?: WorkerOptions);
+ /**
+ * Send a message to the worker that is received via `require('node:worker_threads').parentPort.on('message')`.
+ * See `port.postMessage()` for more details.
+ * @since v10.5.0
+ */
+ postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
+ /**
+ * Opposite of `unref()`, calling `ref()` on a previously `unref()`ed worker does _not_ let the program exit if it's the only active handle left (the default
+ * behavior). If the worker is `ref()`ed, calling `ref()` again has
+ * no effect.
+ * @since v10.5.0
+ */
+ ref(): void;
+ /**
+ * Calling `unref()` on a worker allows the thread to exit if this is the only
+ * active handle in the event system. If the worker is already `unref()`ed calling`unref()` again has no effect.
+ * @since v10.5.0
+ */
+ unref(): void;
+ /**
+ * Stop all JavaScript execution in the worker thread as soon as possible.
+ * Returns a Promise for the exit code that is fulfilled when the `'exit' event` is emitted.
+ * @since v10.5.0
+ */
+ terminate(): Promise<number>;
+ /**
+ * Returns a readable stream for a V8 snapshot of the current state of the Worker.
+ * See `v8.getHeapSnapshot()` for more details.
+ *
+ * If the Worker thread is no longer running, which may occur before the `'exit' event` is emitted, the returned `Promise` is rejected
+ * immediately with an `ERR_WORKER_NOT_RUNNING` error.
+ * @since v13.9.0, v12.17.0
+ * @return A promise for a Readable Stream containing a V8 heap snapshot
+ */
+ getHeapSnapshot(): Promise<Readable>;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'exit', listener: (exitCode: number) => void): this;
+ addListener(event: 'message', listener: (value: any) => void): this;
+ addListener(event: 'messageerror', listener: (error: Error) => void): this;
+ addListener(event: 'online', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'exit', exitCode: number): boolean;
+ emit(event: 'message', value: any): boolean;
+ emit(event: 'messageerror', error: Error): boolean;
+ emit(event: 'online'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'exit', listener: (exitCode: number) => void): this;
+ on(event: 'message', listener: (value: any) => void): this;
+ on(event: 'messageerror', listener: (error: Error) => void): this;
+ on(event: 'online', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'exit', listener: (exitCode: number) => void): this;
+ once(event: 'message', listener: (value: any) => void): this;
+ once(event: 'messageerror', listener: (error: Error) => void): this;
+ once(event: 'online', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'exit', listener: (exitCode: number) => void): this;
+ prependListener(event: 'message', listener: (value: any) => void): this;
+ prependListener(event: 'messageerror', listener: (error: Error) => void): this;
+ prependListener(event: 'online', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'exit', listener: (exitCode: number) => void): this;
+ prependOnceListener(event: 'message', listener: (value: any) => void): this;
+ prependOnceListener(event: 'messageerror', listener: (error: Error) => void): this;
+ prependOnceListener(event: 'online', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'error', listener: (err: Error) => void): this;
+ removeListener(event: 'exit', listener: (exitCode: number) => void): this;
+ removeListener(event: 'message', listener: (value: any) => void): this;
+ removeListener(event: 'messageerror', listener: (error: Error) => void): this;
+ removeListener(event: 'online', listener: () => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ off(event: 'error', listener: (err: Error) => void): this;
+ off(event: 'exit', listener: (exitCode: number) => void): this;
+ off(event: 'message', listener: (value: any) => void): this;
+ off(event: 'messageerror', listener: (error: Error) => void): this;
+ off(event: 'online', listener: () => void): this;
+ off(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ interface BroadcastChannel extends NodeJS.RefCounted {}
+ /**
+ * Instances of `BroadcastChannel` allow asynchronous one-to-many communication
+ * with all other `BroadcastChannel` instances bound to the same channel name.
+ *
+ * ```js
+ * 'use strict';
+ *
+ * const {
+ * isMainThread,
+ * BroadcastChannel,
+ * Worker,
+ * } = require('node:worker_threads');
+ *
+ * const bc = new BroadcastChannel('hello');
+ *
+ * if (isMainThread) {
+ * let c = 0;
+ * bc.onmessage = (event) => {
+ * console.log(event.data);
+ * if (++c === 10) bc.close();
+ * };
+ * for (let n = 0; n < 10; n++)
+ * new Worker(__filename);
+ * } else {
+ * bc.postMessage('hello from every worker');
+ * bc.close();
+ * }
+ * ```
+ * @since v15.4.0
+ */
+ class BroadcastChannel {
+ readonly name: string;
+ /**
+ * Invoked with a single \`MessageEvent\` argument when a message is received.
+ * @since v15.4.0
+ */
+ onmessage: (message: unknown) => void;
+ /**
+ * Invoked with a received message cannot be deserialized.
+ * @since v15.4.0
+ */
+ onmessageerror: (message: unknown) => void;
+ constructor(name: string);
+ /**
+ * Closes the `BroadcastChannel` connection.
+ * @since v15.4.0
+ */
+ close(): void;
+ /**
+ * @since v15.4.0
+ * @param message Any cloneable JavaScript value.
+ */
+ postMessage(message: unknown): void;
+ }
+ /**
+ * Mark an object as not transferable. If `object` occurs in the transfer list of
+ * a `port.postMessage()` call, it is ignored.
+ *
+ * In particular, this makes sense for objects that can be cloned, rather than
+ * transferred, and which are used by other objects on the sending side.
+ * For example, Node.js marks the `ArrayBuffer`s it uses for its `Buffer pool` with this.
+ *
+ * This operation cannot be undone.
+ *
+ * ```js
+ * const { MessageChannel, markAsUntransferable } = require('node:worker_threads');
+ *
+ * const pooledBuffer = new ArrayBuffer(8);
+ * const typedArray1 = new Uint8Array(pooledBuffer);
+ * const typedArray2 = new Float64Array(pooledBuffer);
+ *
+ * markAsUntransferable(pooledBuffer);
+ *
+ * const { port1 } = new MessageChannel();
+ * port1.postMessage(typedArray1, [ typedArray1.buffer ]);
+ *
+ * // The following line prints the contents of typedArray1 -- it still owns
+ * // its memory and has been cloned, not transferred. Without
+ * // `markAsUntransferable()`, this would print an empty Uint8Array.
+ * // typedArray2 is intact as well.
+ * console.log(typedArray1);
+ * console.log(typedArray2);
+ * ```
+ *
+ * There is no equivalent to this API in browsers.
+ * @since v14.5.0, v12.19.0
+ */
+ function markAsUntransferable(object: object): void;
+ /**
+ * Transfer a `MessagePort` to a different `vm` Context. The original `port`object is rendered unusable, and the returned `MessagePort` instance
+ * takes its place.
+ *
+ * The returned `MessagePort` is an object in the target context and
+ * inherits from its global `Object` class. Objects passed to the [`port.onmessage()`](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort/onmessage) listener are also created in the
+ * target context
+ * and inherit from its global `Object` class.
+ *
+ * However, the created `MessagePort` no longer inherits from [`EventTarget`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget), and only
+ * [`port.onmessage()`](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort/onmessage) can be used to receive
+ * events using it.
+ * @since v11.13.0
+ * @param port The message port to transfer.
+ * @param contextifiedSandbox A `contextified` object as returned by the `vm.createContext()` method.
+ */
+ function moveMessagePortToContext(port: MessagePort, contextifiedSandbox: Context): MessagePort;
+ /**
+ * Receive a single message from a given `MessagePort`. If no message is available,`undefined` is returned, otherwise an object with a single `message` property
+ * that contains the message payload, corresponding to the oldest message in the`MessagePort`'s queue.
+ *
+ * ```js
+ * const { MessageChannel, receiveMessageOnPort } = require('node:worker_threads');
+ * const { port1, port2 } = new MessageChannel();
+ * port1.postMessage({ hello: 'world' });
+ *
+ * console.log(receiveMessageOnPort(port2));
+ * // Prints: { message: { hello: 'world' } }
+ * console.log(receiveMessageOnPort(port2));
+ * // Prints: undefined
+ * ```
+ *
+ * When this function is used, no `'message'` event is emitted and the`onmessage` listener is not invoked.
+ * @since v12.3.0
+ */
+ function receiveMessageOnPort(port: MessagePort):
+ | {
+ message: any;
+ }
+ | undefined;
+ type Serializable = string | object | number | boolean | bigint;
+ /**
+ * Within a worker thread, `worker.getEnvironmentData()` returns a clone
+ * of data passed to the spawning thread's `worker.setEnvironmentData()`.
+ * Every new `Worker` receives its own copy of the environment data
+ * automatically.
+ *
+ * ```js
+ * const {
+ * Worker,
+ * isMainThread,
+ * setEnvironmentData,
+ * getEnvironmentData,
+ * } = require('node:worker_threads');
+ *
+ * if (isMainThread) {
+ * setEnvironmentData('Hello', 'World!');
+ * const worker = new Worker(__filename);
+ * } else {
+ * console.log(getEnvironmentData('Hello')); // Prints 'World!'.
+ * }
+ * ```
+ * @since v15.12.0, v14.18.0
+ * @param key Any arbitrary, cloneable JavaScript value that can be used as a {Map} key.
+ */
+ function getEnvironmentData(key: Serializable): Serializable;
+ /**
+ * The `worker.setEnvironmentData()` API sets the content of`worker.getEnvironmentData()` in the current thread and all new `Worker`instances spawned from the current context.
+ * @since v15.12.0, v14.18.0
+ * @param key Any arbitrary, cloneable JavaScript value that can be used as a {Map} key.
+ * @param value Any arbitrary, cloneable JavaScript value that will be cloned and passed automatically to all new `Worker` instances. If `value` is passed as `undefined`, any previously set value
+ * for the `key` will be deleted.
+ */
+ function setEnvironmentData(key: Serializable, value: Serializable): void;
+
+ import {
+ BroadcastChannel as _BroadcastChannel,
+ MessageChannel as _MessageChannel,
+ MessagePort as _MessagePort,
+ } from 'worker_threads';
+ global {
+ /**
+ * `BroadcastChannel` class is a global reference for `require('worker_threads').BroadcastChannel`
+ * https://nodejs.org/api/globals.html#broadcastchannel
+ * @since v18.0.0
+ */
+ var BroadcastChannel: typeof globalThis extends {
+ onmessage: any;
+ BroadcastChannel: infer T;
+ }
+ ? T
+ : typeof _BroadcastChannel;
+ /**
+ * `MessageChannel` class is a global reference for `require('worker_threads').MessageChannel`
+ * https://nodejs.org/api/globals.html#messagechannel
+ * @since v15.0.0
+ */
+ var MessageChannel: typeof globalThis extends {
+ onmessage: any;
+ MessageChannel: infer T;
+ }
+ ? T
+ : typeof _MessageChannel;
+ /**
+ * `MessagePort` class is a global reference for `require('worker_threads').MessagePort`
+ * https://nodejs.org/api/globals.html#messageport
+ * @since v15.0.0
+ */
+ var MessagePort: typeof globalThis extends {
+ onmessage: any;
+ MessagePort: infer T;
+ }
+ ? T
+ : typeof _MessagePort;
+ }
+}
+declare module 'node:worker_threads' {
+ export * from 'worker_threads';
+}
diff --git a/node_modules/@types/node/ts4.8/zlib.d.ts b/node_modules/@types/node/ts4.8/zlib.d.ts
new file mode 100755
index 0000000..9d74cd2
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/zlib.d.ts
@@ -0,0 +1,517 @@
+/**
+ * The `node:zlib` module provides compression functionality implemented using
+ * Gzip, Deflate/Inflate, and Brotli.
+ *
+ * To access it:
+ *
+ * ```js
+ * const zlib = require('node:zlib');
+ * ```
+ *
+ * Compression and decompression are built around the Node.js `Streams API`.
+ *
+ * Compressing or decompressing a stream (such as a file) can be accomplished by
+ * piping the source stream through a `zlib` `Transform` stream into a destination
+ * stream:
+ *
+ * ```js
+ * const { createGzip } = require('node:zlib');
+ * const { pipeline } = require('node:stream');
+ * const {
+ * createReadStream,
+ * createWriteStream,
+ * } = require('node:fs');
+ *
+ * const gzip = createGzip();
+ * const source = createReadStream('input.txt');
+ * const destination = createWriteStream('input.txt.gz');
+ *
+ * pipeline(source, gzip, destination, (err) => {
+ * if (err) {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * }
+ * });
+ *
+ * // Or, Promisified
+ *
+ * const { promisify } = require('node:util');
+ * const pipe = promisify(pipeline);
+ *
+ * async function do_gzip(input, output) {
+ * const gzip = createGzip();
+ * const source = createReadStream(input);
+ * const destination = createWriteStream(output);
+ * await pipe(source, gzip, destination);
+ * }
+ *
+ * do_gzip('input.txt', 'input.txt.gz')
+ * .catch((err) => {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * });
+ * ```
+ *
+ * It is also possible to compress or decompress data in a single step:
+ *
+ * ```js
+ * const { deflate, unzip } = require('node:zlib');
+ *
+ * const input = '.................................';
+ * deflate(input, (err, buffer) => {
+ * if (err) {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * }
+ * console.log(buffer.toString('base64'));
+ * });
+ *
+ * const buffer = Buffer.from('eJzT0yMAAGTvBe8=', 'base64');
+ * unzip(buffer, (err, buffer) => {
+ * if (err) {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * }
+ * console.log(buffer.toString());
+ * });
+ *
+ * // Or, Promisified
+ *
+ * const { promisify } = require('node:util');
+ * const do_unzip = promisify(unzip);
+ *
+ * do_unzip(buffer)
+ * .then((buf) => console.log(buf.toString()))
+ * .catch((err) => {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * });
+ * ```
+ * @since v0.5.8
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/zlib.js)
+ */
+declare module 'zlib' {
+ import * as stream from 'node:stream';
+ interface ZlibOptions {
+ /**
+ * @default constants.Z_NO_FLUSH
+ */
+ flush?: number | undefined;
+ /**
+ * @default constants.Z_FINISH
+ */
+ finishFlush?: number | undefined;
+ /**
+ * @default 16*1024
+ */
+ chunkSize?: number | undefined;
+ windowBits?: number | undefined;
+ level?: number | undefined; // compression only
+ memLevel?: number | undefined; // compression only
+ strategy?: number | undefined; // compression only
+ dictionary?: NodeJS.ArrayBufferView | ArrayBuffer | undefined; // deflate/inflate only, empty dictionary by default
+ info?: boolean | undefined;
+ maxOutputLength?: number | undefined;
+ }
+ interface BrotliOptions {
+ /**
+ * @default constants.BROTLI_OPERATION_PROCESS
+ */
+ flush?: number | undefined;
+ /**
+ * @default constants.BROTLI_OPERATION_FINISH
+ */
+ finishFlush?: number | undefined;
+ /**
+ * @default 16*1024
+ */
+ chunkSize?: number | undefined;
+ params?:
+ | {
+ /**
+ * Each key is a `constants.BROTLI_*` constant.
+ */
+ [key: number]: boolean | number;
+ }
+ | undefined;
+ maxOutputLength?: number | undefined;
+ }
+ interface Zlib {
+ /** @deprecated Use bytesWritten instead. */
+ readonly bytesRead: number;
+ readonly bytesWritten: number;
+ shell?: boolean | string | undefined;
+ close(callback?: () => void): void;
+ flush(kind?: number, callback?: () => void): void;
+ flush(callback?: () => void): void;
+ }
+ interface ZlibParams {
+ params(level: number, strategy: number, callback: () => void): void;
+ }
+ interface ZlibReset {
+ reset(): void;
+ }
+ interface BrotliCompress extends stream.Transform, Zlib {}
+ interface BrotliDecompress extends stream.Transform, Zlib {}
+ interface Gzip extends stream.Transform, Zlib {}
+ interface Gunzip extends stream.Transform, Zlib {}
+ interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
+ interface Inflate extends stream.Transform, Zlib, ZlibReset {}
+ interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
+ interface InflateRaw extends stream.Transform, Zlib, ZlibReset {}
+ interface Unzip extends stream.Transform, Zlib {}
+ /**
+ * Creates and returns a new `BrotliCompress` object.
+ * @since v11.7.0, v10.16.0
+ */
+ function createBrotliCompress(options?: BrotliOptions): BrotliCompress;
+ /**
+ * Creates and returns a new `BrotliDecompress` object.
+ * @since v11.7.0, v10.16.0
+ */
+ function createBrotliDecompress(options?: BrotliOptions): BrotliDecompress;
+ /**
+ * Creates and returns a new `Gzip` object.
+ * See `example`.
+ * @since v0.5.8
+ */
+ function createGzip(options?: ZlibOptions): Gzip;
+ /**
+ * Creates and returns a new `Gunzip` object.
+ * @since v0.5.8
+ */
+ function createGunzip(options?: ZlibOptions): Gunzip;
+ /**
+ * Creates and returns a new `Deflate` object.
+ * @since v0.5.8
+ */
+ function createDeflate(options?: ZlibOptions): Deflate;
+ /**
+ * Creates and returns a new `Inflate` object.
+ * @since v0.5.8
+ */
+ function createInflate(options?: ZlibOptions): Inflate;
+ /**
+ * Creates and returns a new `DeflateRaw` object.
+ *
+ * An upgrade of zlib from 1.2.8 to 1.2.11 changed behavior when `windowBits`is set to 8 for raw deflate streams. zlib would automatically set `windowBits`to 9 if was initially set to 8\. Newer
+ * versions of zlib will throw an exception,
+ * so Node.js restored the original behavior of upgrading a value of 8 to 9,
+ * since passing `windowBits = 9` to zlib actually results in a compressed stream
+ * that effectively uses an 8-bit window only.
+ * @since v0.5.8
+ */
+ function createDeflateRaw(options?: ZlibOptions): DeflateRaw;
+ /**
+ * Creates and returns a new `InflateRaw` object.
+ * @since v0.5.8
+ */
+ function createInflateRaw(options?: ZlibOptions): InflateRaw;
+ /**
+ * Creates and returns a new `Unzip` object.
+ * @since v0.5.8
+ */
+ function createUnzip(options?: ZlibOptions): Unzip;
+ type InputType = string | ArrayBuffer | NodeJS.ArrayBufferView;
+ type CompressCallback = (error: Error | null, result: Buffer) => void;
+ /**
+ * @since v11.7.0, v10.16.0
+ */
+ function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
+ function brotliCompress(buf: InputType, callback: CompressCallback): void;
+ namespace brotliCompress {
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
+ }
+ /**
+ * Compress a chunk of data with `BrotliCompress`.
+ * @since v11.7.0, v10.16.0
+ */
+ function brotliCompressSync(buf: InputType, options?: BrotliOptions): Buffer;
+ /**
+ * @since v11.7.0, v10.16.0
+ */
+ function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
+ function brotliDecompress(buf: InputType, callback: CompressCallback): void;
+ namespace brotliDecompress {
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `BrotliDecompress`.
+ * @since v11.7.0, v10.16.0
+ */
+ function brotliDecompressSync(buf: InputType, options?: BrotliOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function deflate(buf: InputType, callback: CompressCallback): void;
+ function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace deflate {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Compress a chunk of data with `Deflate`.
+ * @since v0.11.12
+ */
+ function deflateSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function deflateRaw(buf: InputType, callback: CompressCallback): void;
+ function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace deflateRaw {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Compress a chunk of data with `DeflateRaw`.
+ * @since v0.11.12
+ */
+ function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function gzip(buf: InputType, callback: CompressCallback): void;
+ function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace gzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Compress a chunk of data with `Gzip`.
+ * @since v0.11.12
+ */
+ function gzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function gunzip(buf: InputType, callback: CompressCallback): void;
+ function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace gunzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `Gunzip`.
+ * @since v0.11.12
+ */
+ function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function inflate(buf: InputType, callback: CompressCallback): void;
+ function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace inflate {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `Inflate`.
+ * @since v0.11.12
+ */
+ function inflateSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function inflateRaw(buf: InputType, callback: CompressCallback): void;
+ function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace inflateRaw {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `InflateRaw`.
+ * @since v0.11.12
+ */
+ function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function unzip(buf: InputType, callback: CompressCallback): void;
+ function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace unzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `Unzip`.
+ * @since v0.11.12
+ */
+ function unzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+ namespace constants {
+ const BROTLI_DECODE: number;
+ const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number;
+ const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: number;
+ const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: number;
+ const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: number;
+ const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: number;
+ const BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: number;
+ const BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: number;
+ const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: number;
+ const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: number;
+ const BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: number;
+ const BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: number;
+ const BROTLI_DECODER_ERROR_FORMAT_DISTANCE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_PADDING_1: number;
+ const BROTLI_DECODER_ERROR_FORMAT_PADDING_2: number;
+ const BROTLI_DECODER_ERROR_FORMAT_RESERVED: number;
+ const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: number;
+ const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: number;
+ const BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: number;
+ const BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: number;
+ const BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: number;
+ const BROTLI_DECODER_ERROR_UNREACHABLE: number;
+ const BROTLI_DECODER_NEEDS_MORE_INPUT: number;
+ const BROTLI_DECODER_NEEDS_MORE_OUTPUT: number;
+ const BROTLI_DECODER_NO_ERROR: number;
+ const BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: number;
+ const BROTLI_DECODER_PARAM_LARGE_WINDOW: number;
+ const BROTLI_DECODER_RESULT_ERROR: number;
+ const BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: number;
+ const BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: number;
+ const BROTLI_DECODER_RESULT_SUCCESS: number;
+ const BROTLI_DECODER_SUCCESS: number;
+ const BROTLI_DEFAULT_MODE: number;
+ const BROTLI_DEFAULT_QUALITY: number;
+ const BROTLI_DEFAULT_WINDOW: number;
+ const BROTLI_ENCODE: number;
+ const BROTLI_LARGE_MAX_WINDOW_BITS: number;
+ const BROTLI_MAX_INPUT_BLOCK_BITS: number;
+ const BROTLI_MAX_QUALITY: number;
+ const BROTLI_MAX_WINDOW_BITS: number;
+ const BROTLI_MIN_INPUT_BLOCK_BITS: number;
+ const BROTLI_MIN_QUALITY: number;
+ const BROTLI_MIN_WINDOW_BITS: number;
+ const BROTLI_MODE_FONT: number;
+ const BROTLI_MODE_GENERIC: number;
+ const BROTLI_MODE_TEXT: number;
+ const BROTLI_OPERATION_EMIT_METADATA: number;
+ const BROTLI_OPERATION_FINISH: number;
+ const BROTLI_OPERATION_FLUSH: number;
+ const BROTLI_OPERATION_PROCESS: number;
+ const BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: number;
+ const BROTLI_PARAM_LARGE_WINDOW: number;
+ const BROTLI_PARAM_LGBLOCK: number;
+ const BROTLI_PARAM_LGWIN: number;
+ const BROTLI_PARAM_MODE: number;
+ const BROTLI_PARAM_NDIRECT: number;
+ const BROTLI_PARAM_NPOSTFIX: number;
+ const BROTLI_PARAM_QUALITY: number;
+ const BROTLI_PARAM_SIZE_HINT: number;
+ const DEFLATE: number;
+ const DEFLATERAW: number;
+ const GUNZIP: number;
+ const GZIP: number;
+ const INFLATE: number;
+ const INFLATERAW: number;
+ const UNZIP: number;
+ // Allowed flush values.
+ const Z_NO_FLUSH: number;
+ const Z_PARTIAL_FLUSH: number;
+ const Z_SYNC_FLUSH: number;
+ const Z_FULL_FLUSH: number;
+ const Z_FINISH: number;
+ const Z_BLOCK: number;
+ const Z_TREES: number;
+ // Return codes for the compression/decompression functions.
+ // Negative values are errors, positive values are used for special but normal events.
+ const Z_OK: number;
+ const Z_STREAM_END: number;
+ const Z_NEED_DICT: number;
+ const Z_ERRNO: number;
+ const Z_STREAM_ERROR: number;
+ const Z_DATA_ERROR: number;
+ const Z_MEM_ERROR: number;
+ const Z_BUF_ERROR: number;
+ const Z_VERSION_ERROR: number;
+ // Compression levels.
+ const Z_NO_COMPRESSION: number;
+ const Z_BEST_SPEED: number;
+ const Z_BEST_COMPRESSION: number;
+ const Z_DEFAULT_COMPRESSION: number;
+ // Compression strategy.
+ const Z_FILTERED: number;
+ const Z_HUFFMAN_ONLY: number;
+ const Z_RLE: number;
+ const Z_FIXED: number;
+ const Z_DEFAULT_STRATEGY: number;
+ const Z_DEFAULT_WINDOWBITS: number;
+ const Z_MIN_WINDOWBITS: number;
+ const Z_MAX_WINDOWBITS: number;
+ const Z_MIN_CHUNK: number;
+ const Z_MAX_CHUNK: number;
+ const Z_DEFAULT_CHUNK: number;
+ const Z_MIN_MEMLEVEL: number;
+ const Z_MAX_MEMLEVEL: number;
+ const Z_DEFAULT_MEMLEVEL: number;
+ const Z_MIN_LEVEL: number;
+ const Z_MAX_LEVEL: number;
+ const Z_DEFAULT_LEVEL: number;
+ const ZLIB_VERNUM: number;
+ }
+ // Allowed flush values.
+ /** @deprecated Use `constants.Z_NO_FLUSH` */
+ const Z_NO_FLUSH: number;
+ /** @deprecated Use `constants.Z_PARTIAL_FLUSH` */
+ const Z_PARTIAL_FLUSH: number;
+ /** @deprecated Use `constants.Z_SYNC_FLUSH` */
+ const Z_SYNC_FLUSH: number;
+ /** @deprecated Use `constants.Z_FULL_FLUSH` */
+ const Z_FULL_FLUSH: number;
+ /** @deprecated Use `constants.Z_FINISH` */
+ const Z_FINISH: number;
+ /** @deprecated Use `constants.Z_BLOCK` */
+ const Z_BLOCK: number;
+ /** @deprecated Use `constants.Z_TREES` */
+ const Z_TREES: number;
+ // Return codes for the compression/decompression functions.
+ // Negative values are errors, positive values are used for special but normal events.
+ /** @deprecated Use `constants.Z_OK` */
+ const Z_OK: number;
+ /** @deprecated Use `constants.Z_STREAM_END` */
+ const Z_STREAM_END: number;
+ /** @deprecated Use `constants.Z_NEED_DICT` */
+ const Z_NEED_DICT: number;
+ /** @deprecated Use `constants.Z_ERRNO` */
+ const Z_ERRNO: number;
+ /** @deprecated Use `constants.Z_STREAM_ERROR` */
+ const Z_STREAM_ERROR: number;
+ /** @deprecated Use `constants.Z_DATA_ERROR` */
+ const Z_DATA_ERROR: number;
+ /** @deprecated Use `constants.Z_MEM_ERROR` */
+ const Z_MEM_ERROR: number;
+ /** @deprecated Use `constants.Z_BUF_ERROR` */
+ const Z_BUF_ERROR: number;
+ /** @deprecated Use `constants.Z_VERSION_ERROR` */
+ const Z_VERSION_ERROR: number;
+ // Compression levels.
+ /** @deprecated Use `constants.Z_NO_COMPRESSION` */
+ const Z_NO_COMPRESSION: number;
+ /** @deprecated Use `constants.Z_BEST_SPEED` */
+ const Z_BEST_SPEED: number;
+ /** @deprecated Use `constants.Z_BEST_COMPRESSION` */
+ const Z_BEST_COMPRESSION: number;
+ /** @deprecated Use `constants.Z_DEFAULT_COMPRESSION` */
+ const Z_DEFAULT_COMPRESSION: number;
+ // Compression strategy.
+ /** @deprecated Use `constants.Z_FILTERED` */
+ const Z_FILTERED: number;
+ /** @deprecated Use `constants.Z_HUFFMAN_ONLY` */
+ const Z_HUFFMAN_ONLY: number;
+ /** @deprecated Use `constants.Z_RLE` */
+ const Z_RLE: number;
+ /** @deprecated Use `constants.Z_FIXED` */
+ const Z_FIXED: number;
+ /** @deprecated Use `constants.Z_DEFAULT_STRATEGY` */
+ const Z_DEFAULT_STRATEGY: number;
+ /** @deprecated */
+ const Z_BINARY: number;
+ /** @deprecated */
+ const Z_TEXT: number;
+ /** @deprecated */
+ const Z_ASCII: number;
+ /** @deprecated */
+ const Z_UNKNOWN: number;
+ /** @deprecated */
+ const Z_DEFLATED: number;
+}
+declare module 'node:zlib' {
+ export * from 'zlib';
+}
diff --git a/node_modules/@types/node/tty.d.ts b/node_modules/@types/node/tty.d.ts
new file mode 100755
index 0000000..7653bf8
--- /dev/null
+++ b/node_modules/@types/node/tty.d.ts
@@ -0,0 +1,208 @@
+/**
+ * The `node:tty` module provides the `tty.ReadStream` and `tty.WriteStream`classes. In most cases, it will not be necessary or possible to use this module
+ * directly. However, it can be accessed using:
+ *
+ * ```js
+ * const tty = require('node:tty');
+ * ```
+ *
+ * When Node.js detects that it is being run with a text terminal ("TTY")
+ * attached, `process.stdin` will, by default, be initialized as an instance of`tty.ReadStream` and both `process.stdout` and `process.stderr` will, by
+ * default, be instances of `tty.WriteStream`. The preferred method of determining
+ * whether Node.js is being run within a TTY context is to check that the value of
+ * the `process.stdout.isTTY` property is `true`:
+ *
+ * ```console
+ * $ node -p -e "Boolean(process.stdout.isTTY)"
+ * true
+ * $ node -p -e "Boolean(process.stdout.isTTY)" | cat
+ * false
+ * ```
+ *
+ * In most cases, there should be little to no reason for an application to
+ * manually create instances of the `tty.ReadStream` and `tty.WriteStream`classes.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/tty.js)
+ */
+declare module 'tty' {
+ import * as net from 'node:net';
+ /**
+ * The `tty.isatty()` method returns `true` if the given `fd` is associated with
+ * a TTY and `false` if it is not, including whenever `fd` is not a non-negative
+ * integer.
+ * @since v0.5.8
+ * @param fd A numeric file descriptor
+ */
+ function isatty(fd: number): boolean;
+ /**
+ * Represents the readable side of a TTY. In normal circumstances `process.stdin` will be the only `tty.ReadStream` instance in a Node.js
+ * process and there should be no reason to create additional instances.
+ * @since v0.5.8
+ */
+ class ReadStream extends net.Socket {
+ constructor(fd: number, options?: net.SocketConstructorOpts);
+ /**
+ * A `boolean` that is `true` if the TTY is currently configured to operate as a
+ * raw device.
+ *
+ * This flag is always `false` when a process starts, even if the terminal is
+ * operating in raw mode. Its value will change with subsequent calls to`setRawMode`.
+ * @since v0.7.7
+ */
+ isRaw: boolean;
+ /**
+ * Allows configuration of `tty.ReadStream` so that it operates as a raw device.
+ *
+ * When in raw mode, input is always available character-by-character, not
+ * including modifiers. Additionally, all special processing of characters by the
+ * terminal is disabled, including echoing input
+ * characters. Ctrl+C will no longer cause a `SIGINT` when
+ * in this mode.
+ * @since v0.7.7
+ * @param mode If `true`, configures the `tty.ReadStream` to operate as a raw device. If `false`, configures the `tty.ReadStream` to operate in its default mode. The `readStream.isRaw`
+ * property will be set to the resulting mode.
+ * @return The read stream instance.
+ */
+ setRawMode(mode: boolean): this;
+ /**
+ * A `boolean` that is always `true` for `tty.ReadStream` instances.
+ * @since v0.5.8
+ */
+ isTTY: boolean;
+ }
+ /**
+ * -1 - to the left from cursor
+ * 0 - the entire line
+ * 1 - to the right from cursor
+ */
+ type Direction = -1 | 0 | 1;
+ /**
+ * Represents the writable side of a TTY. In normal circumstances,`process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there
+ * should be no reason to create additional instances.
+ * @since v0.5.8
+ */
+ class WriteStream extends net.Socket {
+ constructor(fd: number);
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'resize', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'resize'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'resize', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'resize', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'resize', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'resize', listener: () => void): this;
+ /**
+ * `writeStream.clearLine()` clears the current line of this `WriteStream` in a
+ * direction identified by `dir`.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ clearLine(dir: Direction, callback?: () => void): boolean;
+ /**
+ * `writeStream.clearScreenDown()` clears this `WriteStream` from the current
+ * cursor down.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ clearScreenDown(callback?: () => void): boolean;
+ /**
+ * `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified
+ * position.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ cursorTo(x: number, y?: number, callback?: () => void): boolean;
+ cursorTo(x: number, callback: () => void): boolean;
+ /**
+ * `writeStream.moveCursor()` moves this `WriteStream`'s cursor _relative_ to its
+ * current position.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ moveCursor(dx: number, dy: number, callback?: () => void): boolean;
+ /**
+ * Returns:
+ *
+ * * `1` for 2,
+ * * `4` for 16,
+ * * `8` for 256,
+ * * `24` for 16,777,216 colors supported.
+ *
+ * Use this to determine what colors the terminal supports. Due to the nature of
+ * colors in terminals it is possible to either have false positives or false
+ * negatives. It depends on process information and the environment variables that
+ * may lie about what terminal is used.
+ * It is possible to pass in an `env` object to simulate the usage of a specific
+ * terminal. This can be useful to check how specific environment settings behave.
+ *
+ * To enforce a specific color support, use one of the below environment settings.
+ *
+ * * 2 colors: `FORCE_COLOR = 0` (Disables colors)
+ * * 16 colors: `FORCE_COLOR = 1`
+ * * 256 colors: `FORCE_COLOR = 2`
+ * * 16,777,216 colors: `FORCE_COLOR = 3`
+ *
+ * Disabling color support is also possible by using the `NO_COLOR` and`NODE_DISABLE_COLORS` environment variables.
+ * @since v9.9.0
+ * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
+ */
+ getColorDepth(env?: object): number;
+ /**
+ * Returns `true` if the `writeStream` supports at least as many colors as provided
+ * in `count`. Minimum support is 2 (black and white).
+ *
+ * This has the same false positives and negatives as described in `writeStream.getColorDepth()`.
+ *
+ * ```js
+ * process.stdout.hasColors();
+ * // Returns true or false depending on if `stdout` supports at least 16 colors.
+ * process.stdout.hasColors(256);
+ * // Returns true or false depending on if `stdout` supports at least 256 colors.
+ * process.stdout.hasColors({ TMUX: '1' });
+ * // Returns true.
+ * process.stdout.hasColors(2 ** 24, { TMUX: '1' });
+ * // Returns false (the environment setting pretends to support 2 ** 8 colors).
+ * ```
+ * @since v11.13.0, v10.16.0
+ * @param [count=16] The number of colors that are requested (minimum 2).
+ * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
+ */
+ hasColors(count?: number): boolean;
+ hasColors(env?: object): boolean;
+ hasColors(count: number, env?: object): boolean;
+ /**
+ * `writeStream.getWindowSize()` returns the size of the TTY
+ * corresponding to this `WriteStream`. The array is of the type`[numColumns, numRows]` where `numColumns` and `numRows` represent the number
+ * of columns and rows in the corresponding TTY.
+ * @since v0.7.7
+ */
+ getWindowSize(): [number, number];
+ /**
+ * A `number` specifying the number of columns the TTY currently has. This property
+ * is updated whenever the `'resize'` event is emitted.
+ * @since v0.7.7
+ */
+ columns: number;
+ /**
+ * A `number` specifying the number of rows the TTY currently has. This property
+ * is updated whenever the `'resize'` event is emitted.
+ * @since v0.7.7
+ */
+ rows: number;
+ /**
+ * A `boolean` that is always `true`.
+ * @since v0.5.8
+ */
+ isTTY: boolean;
+ }
+}
+declare module 'node:tty' {
+ export * from 'tty';
+}
diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts
new file mode 100755
index 0000000..7bdaed1
--- /dev/null
+++ b/node_modules/@types/node/url.d.ts
@@ -0,0 +1,915 @@
+/**
+ * The `node:url` module provides utilities for URL resolution and parsing. It can
+ * be accessed using:
+ *
+ * ```js
+ * import url from 'node:url';
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/url.js)
+ */
+declare module 'url' {
+ import { Blob as NodeBlob } from 'node:buffer';
+ import { ClientRequestArgs } from 'node:http';
+ import { ParsedUrlQuery, ParsedUrlQueryInput } from 'node:querystring';
+ // Input to `url.format`
+ interface UrlObject {
+ auth?: string | null | undefined;
+ hash?: string | null | undefined;
+ host?: string | null | undefined;
+ hostname?: string | null | undefined;
+ href?: string | null | undefined;
+ pathname?: string | null | undefined;
+ protocol?: string | null | undefined;
+ search?: string | null | undefined;
+ slashes?: boolean | null | undefined;
+ port?: string | number | null | undefined;
+ query?: string | null | ParsedUrlQueryInput | undefined;
+ }
+ // Output of `url.parse`
+ interface Url {
+ auth: string | null;
+ hash: string | null;
+ host: string | null;
+ hostname: string | null;
+ href: string;
+ path: string | null;
+ pathname: string | null;
+ protocol: string | null;
+ search: string | null;
+ slashes: boolean | null;
+ port: string | null;
+ query: string | null | ParsedUrlQuery;
+ }
+ interface UrlWithParsedQuery extends Url {
+ query: ParsedUrlQuery;
+ }
+ interface UrlWithStringQuery extends Url {
+ query: string | null;
+ }
+ /**
+ * The `url.parse()` method takes a URL string, parses it, and returns a URL
+ * object.
+ *
+ * A `TypeError` is thrown if `urlString` is not a string.
+ *
+ * A `URIError` is thrown if the `auth` property is present but cannot be decoded.
+ *
+ * `url.parse()` uses a lenient, non-standard algorithm for parsing URL
+ * strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) and incorrect handling of usernames and passwords. Do not use with untrusted
+ * input. CVEs are not issued for `url.parse()` vulnerabilities. Use the `WHATWG URL` API instead.
+ * @since v0.1.25
+ * @deprecated Use the WHATWG URL API instead.
+ * @param urlString The URL string to parse.
+ * @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property
+ * on the returned URL object will be an unparsed, undecoded string.
+ * @param [slashesDenoteHost=false] If `true`, the first token after the literal string `//` and preceding the next `/` will be interpreted as the `host`. For instance, given `//foo/bar`, the
+ * result would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`.
+ */
+ function parse(urlString: string): UrlWithStringQuery;
+ function parse(urlString: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
+ function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
+ function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
+ /**
+ * The `url.format()` method returns a formatted URL string derived from`urlObject`.
+ *
+ * ```js
+ * const url = require('node:url');
+ * url.format({
+ * protocol: 'https',
+ * hostname: 'example.com',
+ * pathname: '/some/path',
+ * query: {
+ * page: 1,
+ * format: 'json',
+ * },
+ * });
+ *
+ * // => 'https://example.com/some/path?page=1&#x26;format=json'
+ * ```
+ *
+ * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
+ *
+ * The formatting process operates as follows:
+ *
+ * * A new empty string `result` is created.
+ * * If `urlObject.protocol` is a string, it is appended as-is to `result`.
+ * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
+ * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
+ * colon (`:`) character, the literal string `:` will be appended to `result`.
+ * * If either of the following conditions is true, then the literal string `//`will be appended to `result`:
+ * * `urlObject.slashes` property is true;
+ * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or`file`;
+ * * If the value of the `urlObject.auth` property is truthy, and either`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of`urlObject.auth` will be coerced into a string
+ * and appended to `result`followed by the literal string `@`.
+ * * If the `urlObject.host` property is `undefined` then:
+ * * If the `urlObject.hostname` is a string, it is appended to `result`.
+ * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
+ * an `Error` is thrown.
+ * * If the `urlObject.port` property value is truthy, and `urlObject.hostname`is not `undefined`:
+ * * The literal string `:` is appended to `result`, and
+ * * The value of `urlObject.port` is coerced to a string and appended to`result`.
+ * * Otherwise, if the `urlObject.host` property value is truthy, the value of`urlObject.host` is coerced to a string and appended to `result`.
+ * * If the `urlObject.pathname` property is a string that is not an empty string:
+ * * If the `urlObject.pathname`_does not start_ with an ASCII forward slash
+ * (`/`), then the literal string `'/'` is appended to `result`.
+ * * The value of `urlObject.pathname` is appended to `result`.
+ * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown.
+ * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result`followed by the output of calling the
+ * `querystring` module's `stringify()`method passing the value of `urlObject.query`.
+ * * Otherwise, if `urlObject.search` is a string:
+ * * If the value of `urlObject.search`_does not start_ with the ASCII question
+ * mark (`?`) character, the literal string `?` is appended to `result`.
+ * * The value of `urlObject.search` is appended to `result`.
+ * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
+ * * If the `urlObject.hash` property is a string:
+ * * If the value of `urlObject.hash`_does not start_ with the ASCII hash (`#`)
+ * character, the literal string `#` is appended to `result`.
+ * * The value of `urlObject.hash` is appended to `result`.
+ * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
+ * string, an `Error` is thrown.
+ * * `result` is returned.
+ * @since v0.1.25
+ * @legacy Use the WHATWG URL API instead.
+ * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
+ */
+ function format(urlObject: URL, options?: URLFormatOptions): string;
+ /**
+ * The `url.format()` method returns a formatted URL string derived from`urlObject`.
+ *
+ * ```js
+ * const url = require('url');
+ * url.format({
+ * protocol: 'https',
+ * hostname: 'example.com',
+ * pathname: '/some/path',
+ * query: {
+ * page: 1,
+ * format: 'json'
+ * }
+ * });
+ *
+ * // => 'https://example.com/some/path?page=1&#x26;format=json'
+ * ```
+ *
+ * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
+ *
+ * The formatting process operates as follows:
+ *
+ * * A new empty string `result` is created.
+ * * If `urlObject.protocol` is a string, it is appended as-is to `result`.
+ * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
+ * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
+ * colon (`:`) character, the literal string `:` will be appended to `result`.
+ * * If either of the following conditions is true, then the literal string `//`will be appended to `result`:
+ * * `urlObject.slashes` property is true;
+ * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or`file`;
+ * * If the value of the `urlObject.auth` property is truthy, and either`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of`urlObject.auth` will be coerced into a string
+ * and appended to `result`followed by the literal string `@`.
+ * * If the `urlObject.host` property is `undefined` then:
+ * * If the `urlObject.hostname` is a string, it is appended to `result`.
+ * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
+ * an `Error` is thrown.
+ * * If the `urlObject.port` property value is truthy, and `urlObject.hostname`is not `undefined`:
+ * * The literal string `:` is appended to `result`, and
+ * * The value of `urlObject.port` is coerced to a string and appended to`result`.
+ * * Otherwise, if the `urlObject.host` property value is truthy, the value of`urlObject.host` is coerced to a string and appended to `result`.
+ * * If the `urlObject.pathname` property is a string that is not an empty string:
+ * * If the `urlObject.pathname`_does not start_ with an ASCII forward slash
+ * (`/`), then the literal string `'/'` is appended to `result`.
+ * * The value of `urlObject.pathname` is appended to `result`.
+ * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown.
+ * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result`followed by the output of calling the
+ * `querystring` module's `stringify()`method passing the value of `urlObject.query`.
+ * * Otherwise, if `urlObject.search` is a string:
+ * * If the value of `urlObject.search`_does not start_ with the ASCII question
+ * mark (`?`) character, the literal string `?` is appended to `result`.
+ * * The value of `urlObject.search` is appended to `result`.
+ * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
+ * * If the `urlObject.hash` property is a string:
+ * * If the value of `urlObject.hash`_does not start_ with the ASCII hash (`#`)
+ * character, the literal string `#` is appended to `result`.
+ * * The value of `urlObject.hash` is appended to `result`.
+ * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
+ * string, an `Error` is thrown.
+ * * `result` is returned.
+ * @since v0.1.25
+ * @legacy Use the WHATWG URL API instead.
+ * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
+ */
+ function format(urlObject: UrlObject | string): string;
+ /**
+ * The `url.resolve()` method resolves a target URL relative to a base URL in a
+ * manner similar to that of a web browser resolving an anchor tag.
+ *
+ * ```js
+ * const url = require('node:url');
+ * url.resolve('/one/two/three', 'four'); // '/one/two/four'
+ * url.resolve('http://example.com/', '/one'); // 'http://example.com/one'
+ * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two'
+ * ```
+ *
+ * To achieve the same result using the WHATWG URL API:
+ *
+ * ```js
+ * function resolve(from, to) {
+ * const resolvedUrl = new URL(to, new URL(from, 'resolve://'));
+ * if (resolvedUrl.protocol === 'resolve:') {
+ * // `from` is a relative URL.
+ * const { pathname, search, hash } = resolvedUrl;
+ * return pathname + search + hash;
+ * }
+ * return resolvedUrl.toString();
+ * }
+ *
+ * resolve('/one/two/three', 'four'); // '/one/two/four'
+ * resolve('http://example.com/', '/one'); // 'http://example.com/one'
+ * resolve('http://example.com/one', '/two'); // 'http://example.com/two'
+ * ```
+ * @since v0.1.25
+ * @legacy Use the WHATWG URL API instead.
+ * @param from The base URL to use if `to` is a relative URL.
+ * @param to The target URL to resolve.
+ */
+ function resolve(from: string, to: string): string;
+ /**
+ * Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an
+ * invalid domain, the empty string is returned.
+ *
+ * It performs the inverse operation to {@link domainToUnicode}.
+ *
+ * ```js
+ * import url from 'node:url';
+ *
+ * console.log(url.domainToASCII('español.com'));
+ * // Prints xn--espaol-zwa.com
+ * console.log(url.domainToASCII('中文.com'));
+ * // Prints xn--fiq228c.com
+ * console.log(url.domainToASCII('xn--iñvalid.com'));
+ * // Prints an empty string
+ * ```
+ * @since v7.4.0, v6.13.0
+ */
+ function domainToASCII(domain: string): string;
+ /**
+ * Returns the Unicode serialization of the `domain`. If `domain` is an invalid
+ * domain, the empty string is returned.
+ *
+ * It performs the inverse operation to {@link domainToASCII}.
+ *
+ * ```js
+ * import url from 'node:url';
+ *
+ * console.log(url.domainToUnicode('xn--espaol-zwa.com'));
+ * // Prints español.com
+ * console.log(url.domainToUnicode('xn--fiq228c.com'));
+ * // Prints 中文.com
+ * console.log(url.domainToUnicode('xn--iñvalid.com'));
+ * // Prints an empty string
+ * ```
+ * @since v7.4.0, v6.13.0
+ */
+ function domainToUnicode(domain: string): string;
+ /**
+ * This function ensures the correct decodings of percent-encoded characters as
+ * well as ensuring a cross-platform valid absolute path string.
+ *
+ * ```js
+ * import { fileURLToPath } from 'node:url';
+ *
+ * const __filename = fileURLToPath(import.meta.url);
+ *
+ * new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/
+ * fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows)
+ *
+ * new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt
+ * fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows)
+ *
+ * new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt
+ * fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX)
+ *
+ * new URL('file:///hello world').pathname; // Incorrect: /hello%20world
+ * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX)
+ * ```
+ * @since v10.12.0
+ * @param url The file URL string or URL object to convert to a path.
+ * @return The fully-resolved platform-specific Node.js file path.
+ */
+ function fileURLToPath(url: string | URL): string;
+ /**
+ * This function ensures that `path` is resolved absolutely, and that the URL
+ * control characters are correctly encoded when converting into a File URL.
+ *
+ * ```js
+ * import { pathToFileURL } from 'node:url';
+ *
+ * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1
+ * pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX)
+ *
+ * new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c
+ * pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX)
+ * ```
+ * @since v10.12.0
+ * @param path The path to convert to a File URL.
+ * @return The file URL object.
+ */
+ function pathToFileURL(path: string): URL;
+ /**
+ * This utility function converts a URL object into an ordinary options object as
+ * expected by the `http.request()` and `https.request()` APIs.
+ *
+ * ```js
+ * import { urlToHttpOptions } from 'node:url';
+ * const myURL = new URL('https://a:b@測試?abc#foo');
+ *
+ * console.log(urlToHttpOptions(myURL));
+ * /*
+ * {
+ * protocol: 'https:',
+ * hostname: 'xn--g6w251d',
+ * hash: '#foo',
+ * search: '?abc',
+ * pathname: '/',
+ * path: '/?abc',
+ * href: 'https://a:b@xn--g6w251d/?abc#foo',
+ * auth: 'a:b'
+ * }
+ *
+ * ```
+ * @since v15.7.0, v14.18.0
+ * @param url The `WHATWG URL` object to convert to an options object.
+ * @return Options object
+ */
+ function urlToHttpOptions(url: URL): ClientRequestArgs;
+ interface URLFormatOptions {
+ auth?: boolean | undefined;
+ fragment?: boolean | undefined;
+ search?: boolean | undefined;
+ unicode?: boolean | undefined;
+ }
+ /**
+ * Browser-compatible `URL` class, implemented by following the WHATWG URL
+ * Standard. [Examples of parsed URLs](https://url.spec.whatwg.org/#example-url-parsing) may be found in the Standard itself.
+ * The `URL` class is also available on the global object.
+ *
+ * In accordance with browser conventions, all properties of `URL` objects
+ * are implemented as getters and setters on the class prototype, rather than as
+ * data properties on the object itself. Thus, unlike `legacy urlObject` s,
+ * using the `delete` keyword on any properties of `URL` objects (e.g. `delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still
+ * return `true`.
+ * @since v7.0.0, v6.13.0
+ */
+ class URL {
+ /**
+ * Creates a `'blob:nodedata:...'` URL string that represents the given `Blob` object and can be used to retrieve the `Blob` later.
+ *
+ * ```js
+ * const {
+ * Blob,
+ * resolveObjectURL,
+ * } = require('node:buffer');
+ *
+ * const blob = new Blob(['hello']);
+ * const id = URL.createObjectURL(blob);
+ *
+ * // later...
+ *
+ * const otherBlob = resolveObjectURL(id);
+ * console.log(otherBlob.size);
+ * ```
+ *
+ * The data stored by the registered `Blob` will be retained in memory until`URL.revokeObjectURL()` is called to remove it.
+ *
+ * `Blob` objects are registered within the current thread. If using Worker
+ * Threads, `Blob` objects registered within one Worker will not be available
+ * to other workers or the main thread.
+ * @since v16.7.0
+ * @experimental
+ */
+ static createObjectURL(blob: NodeBlob): string;
+ /**
+ * Removes the stored `Blob` identified by the given ID. Attempting to revoke a
+ * ID that isn't registered will silently fail.
+ * @since v16.7.0
+ * @experimental
+ * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
+ */
+ static revokeObjectURL(objectUrl: string): void;
+ /**
+ * Checks if an `input` relative to the `base` can be parsed to a `URL`.
+ *
+ * ```js
+ * const isValid = URL.canParse('/foo', 'https://example.org/'); // true
+ *
+ * const isNotValid = URL.canParse('/foo'); // false
+ * ```
+ * @since v19.9.0
+ * @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is
+ * `converted to a string` first.
+ * @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first.
+ */
+ static canParse(input: string, base?: string): boolean;
+ constructor(input: string, base?: string | URL);
+ /**
+ * Gets and sets the fragment portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/foo#bar');
+ * console.log(myURL.hash);
+ * // Prints #bar
+ *
+ * myURL.hash = 'baz';
+ * console.log(myURL.href);
+ * // Prints https://example.org/foo#baz
+ * ```
+ *
+ * Invalid URL characters included in the value assigned to the `hash` property
+ * are `percent-encoded`. The selection of which characters to
+ * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ hash: string;
+ /**
+ * Gets and sets the host portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org:81/foo');
+ * console.log(myURL.host);
+ * // Prints example.org:81
+ *
+ * myURL.host = 'example.com:82';
+ * console.log(myURL.href);
+ * // Prints https://example.com:82/foo
+ * ```
+ *
+ * Invalid host values assigned to the `host` property are ignored.
+ */
+ host: string;
+ /**
+ * Gets and sets the host name portion of the URL. The key difference between`url.host` and `url.hostname` is that `url.hostname` does _not_ include the
+ * port.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org:81/foo');
+ * console.log(myURL.hostname);
+ * // Prints example.org
+ *
+ * // Setting the hostname does not change the port
+ * myURL.hostname = 'example.com';
+ * console.log(myURL.href);
+ * // Prints https://example.com:81/foo
+ *
+ * // Use myURL.host to change the hostname and port
+ * myURL.host = 'example.org:82';
+ * console.log(myURL.href);
+ * // Prints https://example.org:82/foo
+ * ```
+ *
+ * Invalid host name values assigned to the `hostname` property are ignored.
+ */
+ hostname: string;
+ /**
+ * Gets and sets the serialized URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/foo');
+ * console.log(myURL.href);
+ * // Prints https://example.org/foo
+ *
+ * myURL.href = 'https://example.com/bar';
+ * console.log(myURL.href);
+ * // Prints https://example.com/bar
+ * ```
+ *
+ * Getting the value of the `href` property is equivalent to calling {@link toString}.
+ *
+ * Setting the value of this property to a new value is equivalent to creating a
+ * new `URL` object using `new URL(value)`. Each of the `URL`object's properties will be modified.
+ *
+ * If the value assigned to the `href` property is not a valid URL, a `TypeError`will be thrown.
+ */
+ href: string;
+ /**
+ * Gets the read-only serialization of the URL's origin.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/foo/bar?baz');
+ * console.log(myURL.origin);
+ * // Prints https://example.org
+ * ```
+ *
+ * ```js
+ * const idnURL = new URL('https://測試');
+ * console.log(idnURL.origin);
+ * // Prints https://xn--g6w251d
+ *
+ * console.log(idnURL.hostname);
+ * // Prints xn--g6w251d
+ * ```
+ */
+ readonly origin: string;
+ /**
+ * Gets and sets the password portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://abc:xyz@example.com');
+ * console.log(myURL.password);
+ * // Prints xyz
+ *
+ * myURL.password = '123';
+ * console.log(myURL.href);
+ * // Prints https://abc:123@example.com/
+ * ```
+ *
+ * Invalid URL characters included in the value assigned to the `password` property
+ * are `percent-encoded`. The selection of which characters to
+ * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ password: string;
+ /**
+ * Gets and sets the path portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/abc/xyz?123');
+ * console.log(myURL.pathname);
+ * // Prints /abc/xyz
+ *
+ * myURL.pathname = '/abcdef';
+ * console.log(myURL.href);
+ * // Prints https://example.org/abcdef?123
+ * ```
+ *
+ * Invalid URL characters included in the value assigned to the `pathname`property are `percent-encoded`. The selection of which characters
+ * to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ pathname: string;
+ /**
+ * Gets and sets the port portion of the URL.
+ *
+ * The port value may be a number or a string containing a number in the range`0` to `65535` (inclusive). Setting the value to the default port of the`URL` objects given `protocol` will
+ * result in the `port` value becoming
+ * the empty string (`''`).
+ *
+ * The port value can be an empty string in which case the port depends on
+ * the protocol/scheme:
+ *
+ * <omitted>
+ *
+ * Upon assigning a value to the port, the value will first be converted to a
+ * string using `.toString()`.
+ *
+ * If that string is invalid but it begins with a number, the leading number is
+ * assigned to `port`.
+ * If the number lies outside the range denoted above, it is ignored.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org:8888');
+ * console.log(myURL.port);
+ * // Prints 8888
+ *
+ * // Default ports are automatically transformed to the empty string
+ * // (HTTPS protocol's default port is 443)
+ * myURL.port = '443';
+ * console.log(myURL.port);
+ * // Prints the empty string
+ * console.log(myURL.href);
+ * // Prints https://example.org/
+ *
+ * myURL.port = 1234;
+ * console.log(myURL.port);
+ * // Prints 1234
+ * console.log(myURL.href);
+ * // Prints https://example.org:1234/
+ *
+ * // Completely invalid port strings are ignored
+ * myURL.port = 'abcd';
+ * console.log(myURL.port);
+ * // Prints 1234
+ *
+ * // Leading numbers are treated as a port number
+ * myURL.port = '5678abcd';
+ * console.log(myURL.port);
+ * // Prints 5678
+ *
+ * // Non-integers are truncated
+ * myURL.port = 1234.5678;
+ * console.log(myURL.port);
+ * // Prints 1234
+ *
+ * // Out-of-range numbers which are not represented in scientific notation
+ * // will be ignored.
+ * myURL.port = 1e10; // 10000000000, will be range-checked as described below
+ * console.log(myURL.port);
+ * // Prints 1234
+ * ```
+ *
+ * Numbers which contain a decimal point,
+ * such as floating-point numbers or numbers in scientific notation,
+ * are not an exception to this rule.
+ * Leading numbers up to the decimal point will be set as the URL's port,
+ * assuming they are valid:
+ *
+ * ```js
+ * myURL.port = 4.567e21;
+ * console.log(myURL.port);
+ * // Prints 4 (because it is the leading number in the string '4.567e21')
+ * ```
+ */
+ port: string;
+ /**
+ * Gets and sets the protocol portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org');
+ * console.log(myURL.protocol);
+ * // Prints https:
+ *
+ * myURL.protocol = 'ftp';
+ * console.log(myURL.href);
+ * // Prints ftp://example.org/
+ * ```
+ *
+ * Invalid URL protocol values assigned to the `protocol` property are ignored.
+ */
+ protocol: string;
+ /**
+ * Gets and sets the serialized query portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/abc?123');
+ * console.log(myURL.search);
+ * // Prints ?123
+ *
+ * myURL.search = 'abc=xyz';
+ * console.log(myURL.href);
+ * // Prints https://example.org/abc?abc=xyz
+ * ```
+ *
+ * Any invalid URL characters appearing in the value assigned the `search`property will be `percent-encoded`. The selection of which
+ * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ search: string;
+ /**
+ * Gets the `URLSearchParams` object representing the query parameters of the
+ * URL. This property is read-only but the `URLSearchParams` object it provides
+ * can be used to mutate the URL instance; to replace the entirety of query
+ * parameters of the URL, use the {@link search} setter. See `URLSearchParams` documentation for details.
+ *
+ * Use care when using `.searchParams` to modify the `URL` because,
+ * per the WHATWG specification, the `URLSearchParams` object uses
+ * different rules to determine which characters to percent-encode. For
+ * instance, the `URL` object will not percent encode the ASCII tilde (`~`)
+ * character, while `URLSearchParams` will always encode it:
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/abc?foo=~bar');
+ *
+ * console.log(myURL.search); // prints ?foo=~bar
+ *
+ * // Modify the URL via searchParams...
+ * myURL.searchParams.sort();
+ *
+ * console.log(myURL.search); // prints ?foo=%7Ebar
+ * ```
+ */
+ readonly searchParams: URLSearchParams;
+ /**
+ * Gets and sets the username portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://abc:xyz@example.com');
+ * console.log(myURL.username);
+ * // Prints abc
+ *
+ * myURL.username = '123';
+ * console.log(myURL.href);
+ * // Prints https://123:xyz@example.com/
+ * ```
+ *
+ * Any invalid URL characters appearing in the value assigned the `username`property will be `percent-encoded`. The selection of which
+ * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ username: string;
+ /**
+ * The `toString()` method on the `URL` object returns the serialized URL. The
+ * value returned is equivalent to that of {@link href} and {@link toJSON}.
+ */
+ toString(): string;
+ /**
+ * The `toJSON()` method on the `URL` object returns the serialized URL. The
+ * value returned is equivalent to that of {@link href} and {@link toString}.
+ *
+ * This method is automatically called when an `URL` object is serialized
+ * with [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).
+ *
+ * ```js
+ * const myURLs = [
+ * new URL('https://www.example.com'),
+ * new URL('https://test.example.org'),
+ * ];
+ * console.log(JSON.stringify(myURLs));
+ * // Prints ["https://www.example.com/","https://test.example.org/"]
+ * ```
+ */
+ toJSON(): string;
+ }
+ /**
+ * The `URLSearchParams` API provides read and write access to the query of a`URL`. The `URLSearchParams` class can also be used standalone with one of the
+ * four following constructors.
+ * The `URLSearchParams` class is also available on the global object.
+ *
+ * The WHATWG `URLSearchParams` interface and the `querystring` module have
+ * similar purpose, but the purpose of the `querystring` module is more
+ * general, as it allows the customization of delimiter characters (`&#x26;` and `=`).
+ * On the other hand, this API is designed purely for URL query strings.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/?abc=123');
+ * console.log(myURL.searchParams.get('abc'));
+ * // Prints 123
+ *
+ * myURL.searchParams.append('abc', 'xyz');
+ * console.log(myURL.href);
+ * // Prints https://example.org/?abc=123&#x26;abc=xyz
+ *
+ * myURL.searchParams.delete('abc');
+ * myURL.searchParams.set('a', 'b');
+ * console.log(myURL.href);
+ * // Prints https://example.org/?a=b
+ *
+ * const newSearchParams = new URLSearchParams(myURL.searchParams);
+ * // The above is equivalent to
+ * // const newSearchParams = new URLSearchParams(myURL.search);
+ *
+ * newSearchParams.append('a', 'c');
+ * console.log(myURL.href);
+ * // Prints https://example.org/?a=b
+ * console.log(newSearchParams.toString());
+ * // Prints a=b&#x26;a=c
+ *
+ * // newSearchParams.toString() is implicitly called
+ * myURL.search = newSearchParams;
+ * console.log(myURL.href);
+ * // Prints https://example.org/?a=b&#x26;a=c
+ * newSearchParams.delete('a');
+ * console.log(myURL.href);
+ * // Prints https://example.org/?a=b&#x26;a=c
+ * ```
+ * @since v7.5.0, v6.13.0
+ */
+ class URLSearchParams implements Iterable<[string, string]> {
+ constructor(init?: URLSearchParams | string | Record<string, string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
+ /**
+ * Append a new name-value pair to the query string.
+ */
+ append(name: string, value: string): void;
+ /**
+ * If `value` is provided, removes all name-value pairs
+ * where name is `name` and value is `value`..
+ *
+ * If `value` is not provided, removes all name-value pairs whose name is `name`.
+ */
+ delete(name: string, value?: string): void;
+ /**
+ * Returns an ES6 `Iterator` over each of the name-value pairs in the query.
+ * Each item of the iterator is a JavaScript `Array`. The first item of the `Array`is the `name`, the second item of the `Array` is the `value`.
+ *
+ * Alias for `urlSearchParams[@@iterator]()`.
+ */
+ entries(): IterableIterator<[string, string]>;
+ /**
+ * Iterates over each name-value pair in the query and invokes the given function.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/?a=b&#x26;c=d');
+ * myURL.searchParams.forEach((value, name, searchParams) => {
+ * console.log(name, value, myURL.searchParams === searchParams);
+ * });
+ * // Prints:
+ * // a b true
+ * // c d true
+ * ```
+ * @param fn Invoked for each name-value pair in the query
+ * @param thisArg To be used as `this` value for when `fn` is called
+ */
+ forEach<TThis = this>(callback: (this: TThis, value: string, name: string, searchParams: URLSearchParams) => void, thisArg?: TThis): void;
+ /**
+ * Returns the value of the first name-value pair whose name is `name`. If there
+ * are no such pairs, `null` is returned.
+ * @return or `null` if there is no name-value pair with the given `name`.
+ */
+ get(name: string): string | null;
+ /**
+ * Returns the values of all name-value pairs whose name is `name`. If there are
+ * no such pairs, an empty array is returned.
+ */
+ getAll(name: string): string[];
+ /**
+ * Checks if the `URLSearchParams` object contains key-value pair(s) based on`name` and an optional `value` argument.
+ *
+ * If `value` is provided, returns `true` when name-value pair with
+ * same `name` and `value` exists.
+ *
+ * If `value` is not provided, returns `true` if there is at least one name-value
+ * pair whose name is `name`.
+ */
+ has(name: string, value?: string): boolean;
+ /**
+ * Returns an ES6 `Iterator` over the names of each name-value pair.
+ *
+ * ```js
+ * const params = new URLSearchParams('foo=bar&#x26;foo=baz');
+ * for (const name of params.keys()) {
+ * console.log(name);
+ * }
+ * // Prints:
+ * // foo
+ * // foo
+ * ```
+ */
+ keys(): IterableIterator<string>;
+ /**
+ * Sets the value in the `URLSearchParams` object associated with `name` to`value`. If there are any pre-existing name-value pairs whose names are `name`,
+ * set the first such pair's value to `value` and remove all others. If not,
+ * append the name-value pair to the query string.
+ *
+ * ```js
+ * const params = new URLSearchParams();
+ * params.append('foo', 'bar');
+ * params.append('foo', 'baz');
+ * params.append('abc', 'def');
+ * console.log(params.toString());
+ * // Prints foo=bar&#x26;foo=baz&#x26;abc=def
+ *
+ * params.set('foo', 'def');
+ * params.set('xyz', 'opq');
+ * console.log(params.toString());
+ * // Prints foo=def&#x26;abc=def&#x26;xyz=opq
+ * ```
+ */
+ set(name: string, value: string): void;
+ /**
+ * The total number of parameter entries.
+ * @since v19.8.0
+ */
+ readonly size: number;
+ /**
+ * Sort all existing name-value pairs in-place by their names. Sorting is done
+ * with a [stable sorting algorithm](https://en.wikipedia.org/wiki/Sorting_algorithm#Stability), so relative order between name-value pairs
+ * with the same name is preserved.
+ *
+ * This method can be used, in particular, to increase cache hits.
+ *
+ * ```js
+ * const params = new URLSearchParams('query[]=abc&#x26;type=search&#x26;query[]=123');
+ * params.sort();
+ * console.log(params.toString());
+ * // Prints query%5B%5D=abc&#x26;query%5B%5D=123&#x26;type=search
+ * ```
+ * @since v7.7.0, v6.13.0
+ */
+ sort(): void;
+ /**
+ * Returns the search parameters serialized as a string, with characters
+ * percent-encoded where necessary.
+ */
+ toString(): string;
+ /**
+ * Returns an ES6 `Iterator` over the values of each name-value pair.
+ */
+ values(): IterableIterator<string>;
+ [Symbol.iterator](): IterableIterator<[string, string]>;
+ }
+ import { URL as _URL, URLSearchParams as _URLSearchParams } from 'url';
+ global {
+ interface URLSearchParams extends _URLSearchParams {}
+ interface URL extends _URL {}
+ interface Global {
+ URL: typeof _URL;
+ URLSearchParams: typeof _URLSearchParams;
+ }
+ /**
+ * `URL` class is a global reference for `require('url').URL`
+ * https://nodejs.org/api/url.html#the-whatwg-url-api
+ * @since v10.0.0
+ */
+ var URL: typeof globalThis extends {
+ onmessage: any;
+ URL: infer T;
+ }
+ ? T
+ : typeof _URL;
+ /**
+ * `URLSearchParams` class is a global reference for `require('url').URLSearchParams`
+ * https://nodejs.org/api/url.html#class-urlsearchparams
+ * @since v10.0.0
+ */
+ var URLSearchParams: typeof globalThis extends {
+ onmessage: any;
+ URLSearchParams: infer T;
+ }
+ ? T
+ : typeof _URLSearchParams;
+ }
+}
+declare module 'node:url' {
+ export * from 'url';
+}
diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts
new file mode 100755
index 0000000..824975f
--- /dev/null
+++ b/node_modules/@types/node/util.d.ts
@@ -0,0 +1,2116 @@
+/**
+ * The `node:util` module supports the needs of Node.js internal APIs. Many of the
+ * utilities are useful for application and module developers as well. To access
+ * it:
+ *
+ * ```js
+ * const util = require('node:util');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/util.js)
+ */
+declare module 'util' {
+ import * as types from 'node:util/types';
+ export interface InspectOptions {
+ /**
+ * If `true`, object's non-enumerable symbols and properties are included in the formatted result.
+ * `WeakMap` and `WeakSet` entries are also included as well as user defined prototype properties (excluding method properties).
+ * @default false
+ */
+ showHidden?: boolean | undefined;
+ /**
+ * Specifies the number of times to recurse while formatting object.
+ * This is useful for inspecting large objects.
+ * To recurse up to the maximum call stack size pass `Infinity` or `null`.
+ * @default 2
+ */
+ depth?: number | null | undefined;
+ /**
+ * If `true`, the output is styled with ANSI color codes. Colors are customizable.
+ */
+ colors?: boolean | undefined;
+ /**
+ * If `false`, `[util.inspect.custom](depth, opts, inspect)` functions are not invoked.
+ * @default true
+ */
+ customInspect?: boolean | undefined;
+ /**
+ * If `true`, `Proxy` inspection includes the target and handler objects.
+ * @default false
+ */
+ showProxy?: boolean | undefined;
+ /**
+ * Specifies the maximum number of `Array`, `TypedArray`, `WeakMap`, and `WeakSet` elements
+ * to include when formatting. Set to `null` or `Infinity` to show all elements.
+ * Set to `0` or negative to show no elements.
+ * @default 100
+ */
+ maxArrayLength?: number | null | undefined;
+ /**
+ * Specifies the maximum number of characters to
+ * include when formatting. Set to `null` or `Infinity` to show all elements.
+ * Set to `0` or negative to show no characters.
+ * @default 10000
+ */
+ maxStringLength?: number | null | undefined;
+ /**
+ * The length at which input values are split across multiple lines.
+ * Set to `Infinity` to format the input as a single line
+ * (in combination with `compact` set to `true` or any number >= `1`).
+ * @default 80
+ */
+ breakLength?: number | undefined;
+ /**
+ * Setting this to `false` causes each object key
+ * to be displayed on a new line. It will also add new lines to text that is
+ * longer than `breakLength`. If set to a number, the most `n` inner elements
+ * are united on a single line as long as all properties fit into
+ * `breakLength`. Short array elements are also grouped together. Note that no
+ * text will be reduced below 16 characters, no matter the `breakLength` size.
+ * For more information, see the example below.
+ * @default true
+ */
+ compact?: boolean | number | undefined;
+ /**
+ * If set to `true` or a function, all properties of an object, and `Set` and `Map`
+ * entries are sorted in the resulting string.
+ * If set to `true` the default sort is used.
+ * If set to a function, it is used as a compare function.
+ */
+ sorted?: boolean | ((a: string, b: string) => number) | undefined;
+ /**
+ * If set to `true`, getters are going to be
+ * inspected as well. If set to `'get'` only getters without setter are going
+ * to be inspected. If set to `'set'` only getters having a corresponding
+ * setter are going to be inspected. This might cause side effects depending on
+ * the getter function.
+ * @default false
+ */
+ getters?: 'get' | 'set' | boolean | undefined;
+ /**
+ * If set to `true`, an underscore is used to separate every three digits in all bigints and numbers.
+ * @default false
+ */
+ numericSeparator?: boolean | undefined;
+ }
+ export type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module';
+ export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => any; // TODO: , inspect: inspect
+ export interface InspectOptionsStylized extends InspectOptions {
+ stylize(text: string, styleType: Style): string;
+ }
+ /**
+ * The `util.format()` method returns a formatted string using the first argument
+ * as a `printf`\-like format string which can contain zero or more format
+ * specifiers. Each specifier is replaced with the converted value from the
+ * corresponding argument. Supported specifiers are:
+ *
+ * If a specifier does not have a corresponding argument, it is not replaced:
+ *
+ * ```js
+ * util.format('%s:%s', 'foo');
+ * // Returns: 'foo:%s'
+ * ```
+ *
+ * Values that are not part of the format string are formatted using`util.inspect()` if their type is not `string`.
+ *
+ * If there are more arguments passed to the `util.format()` method than the
+ * number of specifiers, the extra arguments are concatenated to the returned
+ * string, separated by spaces:
+ *
+ * ```js
+ * util.format('%s:%s', 'foo', 'bar', 'baz');
+ * // Returns: 'foo:bar baz'
+ * ```
+ *
+ * If the first argument does not contain a valid format specifier, `util.format()`returns a string that is the concatenation of all arguments separated by spaces:
+ *
+ * ```js
+ * util.format(1, 2, 3);
+ * // Returns: '1 2 3'
+ * ```
+ *
+ * If only one argument is passed to `util.format()`, it is returned as it is
+ * without any formatting:
+ *
+ * ```js
+ * util.format('%% %s');
+ * // Returns: '%% %s'
+ * ```
+ *
+ * `util.format()` is a synchronous method that is intended as a debugging tool.
+ * Some input values can have a significant performance overhead that can block the
+ * event loop. Use this function with care and never in a hot code path.
+ * @since v0.5.3
+ * @param format A `printf`-like format string.
+ */
+ export function format(format?: any, ...param: any[]): string;
+ /**
+ * This function is identical to {@link format}, except in that it takes
+ * an `inspectOptions` argument which specifies options that are passed along to {@link inspect}.
+ *
+ * ```js
+ * util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 });
+ * // Returns 'See object { foo: 42 }', where `42` is colored as a number
+ * // when printed to a terminal.
+ * ```
+ * @since v10.0.0
+ */
+ export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
+ /**
+ * Returns the string name for a numeric error code that comes from a Node.js API.
+ * The mapping between error codes and error names is platform-dependent.
+ * See `Common System Errors` for the names of common errors.
+ *
+ * ```js
+ * fs.access('file/that/does/not/exist', (err) => {
+ * const name = util.getSystemErrorName(err.errno);
+ * console.error(name); // ENOENT
+ * });
+ * ```
+ * @since v9.7.0
+ */
+ export function getSystemErrorName(err: number): string;
+ /**
+ * Returns a Map of all system error codes available from the Node.js API.
+ * The mapping between error codes and error names is platform-dependent.
+ * See `Common System Errors` for the names of common errors.
+ *
+ * ```js
+ * fs.access('file/that/does/not/exist', (err) => {
+ * const errorMap = util.getSystemErrorMap();
+ * const name = errorMap.get(err.errno);
+ * console.error(name); // ENOENT
+ * });
+ * ```
+ * @since v16.0.0, v14.17.0
+ */
+ export function getSystemErrorMap(): Map<number, [string, string]>;
+ /**
+ * The `util.log()` method prints the given `string` to `stdout` with an included
+ * timestamp.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.log('Timestamped message.');
+ * ```
+ * @since v0.3.0
+ * @deprecated Since v6.0.0 - Use a third party module instead.
+ */
+ export function log(string: string): void;
+ /**
+ * Returns the `string` after replacing any surrogate code points
+ * (or equivalently, any unpaired surrogate code units) with the
+ * Unicode "replacement character" U+FFFD.
+ * @since v16.8.0, v14.18.0
+ */
+ export function toUSVString(string: string): string;
+ /**
+ * Creates and returns an `AbortController` instance whose `AbortSignal` is marked
+ * as transferable and can be used with `structuredClone()` or `postMessage()`.
+ * @since v18.11.0
+ * @experimental
+ * @returns A transferable AbortController
+ */
+ export function transferableAbortController(): AbortController;
+ /**
+ * Marks the given `AbortSignal` as transferable so that it can be used with`structuredClone()` and `postMessage()`.
+ *
+ * ```js
+ * const signal = transferableAbortSignal(AbortSignal.timeout(100));
+ * const channel = new MessageChannel();
+ * channel.port2.postMessage(signal, [signal]);
+ * ```
+ * @since v18.11.0
+ * @experimental
+ * @param signal The AbortSignal
+ * @returns The same AbortSignal
+ */
+ export function transferableAbortSignal(signal: AbortSignal): AbortSignal;
+ /**
+ * Listens to abort event on the provided `signal` and
+ * returns a promise that is fulfilled when the `signal` is
+ * aborted. If the passed `resource` is garbage collected before the `signal` is
+ * aborted, the returned promise shall remain pending indefinitely.
+ *
+ * ```js
+ * import { aborted } from 'node:util';
+ *
+ * const dependent = obtainSomethingAbortable();
+ *
+ * aborted(dependent.signal, dependent).then(() => {
+ * // Do something when dependent is aborted.
+ * });
+ *
+ * dependent.on('event', () => {
+ * dependent.abort();
+ * });
+ * ```
+ * @since v19.7.0
+ * @experimental
+ * @param resource Any non-null entity, reference to which is held weakly.
+ */
+ export function aborted(signal: AbortSignal, resource: any): Promise<void>;
+ /**
+ * The `util.inspect()` method returns a string representation of `object` that is
+ * intended for debugging. The output of `util.inspect` may change at any time
+ * and should not be depended upon programmatically. Additional `options` may be
+ * passed that alter the result.`util.inspect()` will use the constructor's name and/or `@@toStringTag` to make
+ * an identifiable tag for an inspected value.
+ *
+ * ```js
+ * class Foo {
+ * get [Symbol.toStringTag]() {
+ * return 'bar';
+ * }
+ * }
+ *
+ * class Bar {}
+ *
+ * const baz = Object.create(null, { [Symbol.toStringTag]: { value: 'foo' } });
+ *
+ * util.inspect(new Foo()); // 'Foo [bar] {}'
+ * util.inspect(new Bar()); // 'Bar {}'
+ * util.inspect(baz); // '[foo] {}'
+ * ```
+ *
+ * Circular references point to their anchor by using a reference index:
+ *
+ * ```js
+ * const { inspect } = require('node:util');
+ *
+ * const obj = {};
+ * obj.a = [obj];
+ * obj.b = {};
+ * obj.b.inner = obj.b;
+ * obj.b.obj = obj;
+ *
+ * console.log(inspect(obj));
+ * // <ref *1> {
+ * // a: [ [Circular *1] ],
+ * // b: <ref *2> { inner: [Circular *2], obj: [Circular *1] }
+ * // }
+ * ```
+ *
+ * The following example inspects all properties of the `util` object:
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * console.log(util.inspect(util, { showHidden: true, depth: null }));
+ * ```
+ *
+ * The following example highlights the effect of the `compact` option:
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * const o = {
+ * a: [1, 2, [[
+ * 'Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit, sed do ' +
+ * 'eiusmod \ntempor incididunt ut labore et dolore magna aliqua.',
+ * 'test',
+ * 'foo']], 4],
+ * b: new Map([['za', 1], ['zb', 'test']]),
+ * };
+ * console.log(util.inspect(o, { compact: true, depth: 5, breakLength: 80 }));
+ *
+ * // { a:
+ * // [ 1,
+ * // 2,
+ * // [ [ 'Lorem ipsum dolor sit amet,\nconsectetur [...]', // A long line
+ * // 'test',
+ * // 'foo' ] ],
+ * // 4 ],
+ * // b: Map(2) { 'za' => 1, 'zb' => 'test' } }
+ *
+ * // Setting `compact` to false or an integer creates more reader friendly output.
+ * console.log(util.inspect(o, { compact: false, depth: 5, breakLength: 80 }));
+ *
+ * // {
+ * // a: [
+ * // 1,
+ * // 2,
+ * // [
+ * // [
+ * // 'Lorem ipsum dolor sit amet,\n' +
+ * // 'consectetur adipiscing elit, sed do eiusmod \n' +
+ * // 'tempor incididunt ut labore et dolore magna aliqua.',
+ * // 'test',
+ * // 'foo'
+ * // ]
+ * // ],
+ * // 4
+ * // ],
+ * // b: Map(2) {
+ * // 'za' => 1,
+ * // 'zb' => 'test'
+ * // }
+ * // }
+ *
+ * // Setting `breakLength` to e.g. 150 will print the "Lorem ipsum" text in a
+ * // single line.
+ * ```
+ *
+ * The `showHidden` option allows [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) and
+ * [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries to be
+ * inspected. If there are more entries than `maxArrayLength`, there is no
+ * guarantee which entries are displayed. That means retrieving the same [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries twice may
+ * result in different output. Furthermore, entries
+ * with no remaining strong references may be garbage collected at any time.
+ *
+ * ```js
+ * const { inspect } = require('node:util');
+ *
+ * const obj = { a: 1 };
+ * const obj2 = { b: 2 };
+ * const weakSet = new WeakSet([obj, obj2]);
+ *
+ * console.log(inspect(weakSet, { showHidden: true }));
+ * // WeakSet { { a: 1 }, { b: 2 } }
+ * ```
+ *
+ * The `sorted` option ensures that an object's property insertion order does not
+ * impact the result of `util.inspect()`.
+ *
+ * ```js
+ * const { inspect } = require('node:util');
+ * const assert = require('node:assert');
+ *
+ * const o1 = {
+ * b: [2, 3, 1],
+ * a: '`a` comes before `b`',
+ * c: new Set([2, 3, 1]),
+ * };
+ * console.log(inspect(o1, { sorted: true }));
+ * // { a: '`a` comes before `b`', b: [ 2, 3, 1 ], c: Set(3) { 1, 2, 3 } }
+ * console.log(inspect(o1, { sorted: (a, b) => b.localeCompare(a) }));
+ * // { c: Set(3) { 3, 2, 1 }, b: [ 2, 3, 1 ], a: '`a` comes before `b`' }
+ *
+ * const o2 = {
+ * c: new Set([2, 1, 3]),
+ * a: '`a` comes before `b`',
+ * b: [2, 3, 1],
+ * };
+ * assert.strict.equal(
+ * inspect(o1, { sorted: true }),
+ * inspect(o2, { sorted: true }),
+ * );
+ * ```
+ *
+ * The `numericSeparator` option adds an underscore every three digits to all
+ * numbers.
+ *
+ * ```js
+ * const { inspect } = require('node:util');
+ *
+ * const thousand = 1_000;
+ * const million = 1_000_000;
+ * const bigNumber = 123_456_789n;
+ * const bigDecimal = 1_234.123_45;
+ *
+ * console.log(thousand, million, bigNumber, bigDecimal);
+ * // 1_000 1_000_000 123_456_789n 1_234.123_45
+ * ```
+ *
+ * `util.inspect()` is a synchronous method intended for debugging. Its maximum
+ * output length is approximately 128 MiB. Inputs that result in longer output will
+ * be truncated.
+ * @since v0.3.0
+ * @param object Any JavaScript primitive or `Object`.
+ * @return The representation of `object`.
+ */
+ export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
+ export function inspect(object: any, options?: InspectOptions): string;
+ export namespace inspect {
+ let colors: NodeJS.Dict<[number, number]>;
+ let styles: {
+ [K in Style]: string;
+ };
+ let defaultOptions: InspectOptions;
+ /**
+ * Allows changing inspect settings from the repl.
+ */
+ let replDefaults: InspectOptions;
+ /**
+ * That can be used to declare custom inspect functions.
+ */
+ const custom: unique symbol;
+ }
+ /**
+ * Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray).
+ *
+ * Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isArray([]);
+ * // Returns: true
+ * util.isArray(new Array());
+ * // Returns: true
+ * util.isArray({});
+ * // Returns: false
+ * ```
+ * @since v0.6.0
+ * @deprecated Since v4.0.0 - Use `isArray` instead.
+ */
+ export function isArray(object: unknown): object is unknown[];
+ /**
+ * Returns `true` if the given `object` is a `RegExp`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isRegExp(/some regexp/);
+ * // Returns: true
+ * util.isRegExp(new RegExp('another regexp'));
+ * // Returns: true
+ * util.isRegExp({});
+ * // Returns: false
+ * ```
+ * @since v0.6.0
+ * @deprecated Since v4.0.0 - Deprecated
+ */
+ export function isRegExp(object: unknown): object is RegExp;
+ /**
+ * Returns `true` if the given `object` is a `Date`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isDate(new Date());
+ * // Returns: true
+ * util.isDate(Date());
+ * // false (without 'new' returns a String)
+ * util.isDate({});
+ * // Returns: false
+ * ```
+ * @since v0.6.0
+ * @deprecated Since v4.0.0 - Use {@link types.isDate} instead.
+ */
+ export function isDate(object: unknown): object is Date;
+ /**
+ * Returns `true` if the given `object` is an `Error`. Otherwise, returns`false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isError(new Error());
+ * // Returns: true
+ * util.isError(new TypeError());
+ * // Returns: true
+ * util.isError({ name: 'Error', message: 'an error occurred' });
+ * // Returns: false
+ * ```
+ *
+ * This method relies on `Object.prototype.toString()` behavior. It is
+ * possible to obtain an incorrect result when the `object` argument manipulates`@@toStringTag`.
+ *
+ * ```js
+ * const util = require('node:util');
+ * const obj = { name: 'Error', message: 'an error occurred' };
+ *
+ * util.isError(obj);
+ * // Returns: false
+ * obj[Symbol.toStringTag] = 'Error';
+ * util.isError(obj);
+ * // Returns: true
+ * ```
+ * @since v0.6.0
+ * @deprecated Since v4.0.0 - Use {@link types.isNativeError} instead.
+ */
+ export function isError(object: unknown): object is Error;
+ /**
+ * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and`extends` keywords to get language level inheritance support. Also note
+ * that the two styles are [semantically incompatible](https://github.com/nodejs/node/issues/4179).
+ *
+ * Inherit the prototype methods from one [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The
+ * prototype of `constructor` will be set to a new object created from`superConstructor`.
+ *
+ * This mainly adds some input validation on top of`Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`.
+ * As an additional convenience, `superConstructor` will be accessible
+ * through the `constructor.super_` property.
+ *
+ * ```js
+ * const util = require('node:util');
+ * const EventEmitter = require('node:events');
+ *
+ * function MyStream() {
+ * EventEmitter.call(this);
+ * }
+ *
+ * util.inherits(MyStream, EventEmitter);
+ *
+ * MyStream.prototype.write = function(data) {
+ * this.emit('data', data);
+ * };
+ *
+ * const stream = new MyStream();
+ *
+ * console.log(stream instanceof EventEmitter); // true
+ * console.log(MyStream.super_ === EventEmitter); // true
+ *
+ * stream.on('data', (data) => {
+ * console.log(`Received data: "${data}"`);
+ * });
+ * stream.write('It works!'); // Received data: "It works!"
+ * ```
+ *
+ * ES6 example using `class` and `extends`:
+ *
+ * ```js
+ * const EventEmitter = require('node:events');
+ *
+ * class MyStream extends EventEmitter {
+ * write(data) {
+ * this.emit('data', data);
+ * }
+ * }
+ *
+ * const stream = new MyStream();
+ *
+ * stream.on('data', (data) => {
+ * console.log(`Received data: "${data}"`);
+ * });
+ * stream.write('With ES6');
+ * ```
+ * @since v0.3.0
+ * @legacy Use ES2015 class syntax and `extends` keyword instead.
+ */
+ export function inherits(constructor: unknown, superConstructor: unknown): void;
+ export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void;
+ export interface DebugLogger extends DebugLoggerFunction {
+ enabled: boolean;
+ }
+ /**
+ * The `util.debuglog()` method is used to create a function that conditionally
+ * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG`environment variable. If the `section` name appears within the value of that
+ * environment variable, then the returned function operates similar to `console.error()`. If not, then the returned function is a no-op.
+ *
+ * ```js
+ * const util = require('node:util');
+ * const debuglog = util.debuglog('foo');
+ *
+ * debuglog('hello from foo [%d]', 123);
+ * ```
+ *
+ * If this program is run with `NODE_DEBUG=foo` in the environment, then
+ * it will output something like:
+ *
+ * ```console
+ * FOO 3245: hello from foo [123]
+ * ```
+ *
+ * where `3245` is the process id. If it is not run with that
+ * environment variable set, then it will not print anything.
+ *
+ * The `section` supports wildcard also:
+ *
+ * ```js
+ * const util = require('node:util');
+ * const debuglog = util.debuglog('foo-bar');
+ *
+ * debuglog('hi there, it\'s foo-bar [%d]', 2333);
+ * ```
+ *
+ * if it is run with `NODE_DEBUG=foo*` in the environment, then it will output
+ * something like:
+ *
+ * ```console
+ * FOO-BAR 3257: hi there, it's foo-bar [2333]
+ * ```
+ *
+ * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG`environment variable: `NODE_DEBUG=fs,net,tls`.
+ *
+ * The optional `callback` argument can be used to replace the logging function
+ * with a different function that doesn't have any initialization or
+ * unnecessary wrapping.
+ *
+ * ```js
+ * const util = require('node:util');
+ * let debuglog = util.debuglog('internals', (debug) => {
+ * // Replace with a logging function that optimizes out
+ * // testing if the section is enabled
+ * debuglog = debug;
+ * });
+ * ```
+ * @since v0.11.3
+ * @param section A string identifying the portion of the application for which the `debuglog` function is being created.
+ * @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function.
+ * @return The logging function
+ */
+ export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger;
+ export const debug: typeof debuglog;
+ /**
+ * Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isBoolean(1);
+ * // Returns: false
+ * util.isBoolean(0);
+ * // Returns: false
+ * util.isBoolean(false);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'boolean'` instead.
+ */
+ export function isBoolean(object: unknown): object is boolean;
+ /**
+ * Returns `true` if the given `object` is a `Buffer`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isBuffer({ length: 0 });
+ * // Returns: false
+ * util.isBuffer([]);
+ * // Returns: false
+ * util.isBuffer(Buffer.from('hello world'));
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `isBuffer` instead.
+ */
+ export function isBuffer(object: unknown): object is Buffer;
+ /**
+ * Returns `true` if the given `object` is a `Function`. Otherwise, returns`false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * function Foo() {}
+ * const Bar = () => {};
+ *
+ * util.isFunction({});
+ * // Returns: false
+ * util.isFunction(Foo);
+ * // Returns: true
+ * util.isFunction(Bar);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'function'` instead.
+ */
+ export function isFunction(object: unknown): boolean;
+ /**
+ * Returns `true` if the given `object` is strictly `null`. Otherwise, returns`false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isNull(0);
+ * // Returns: false
+ * util.isNull(undefined);
+ * // Returns: false
+ * util.isNull(null);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `value === null` instead.
+ */
+ export function isNull(object: unknown): object is null;
+ /**
+ * Returns `true` if the given `object` is `null` or `undefined`. Otherwise,
+ * returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isNullOrUndefined(0);
+ * // Returns: false
+ * util.isNullOrUndefined(undefined);
+ * // Returns: true
+ * util.isNullOrUndefined(null);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `value === undefined || value === null` instead.
+ */
+ export function isNullOrUndefined(object: unknown): object is null | undefined;
+ /**
+ * Returns `true` if the given `object` is a `Number`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isNumber(false);
+ * // Returns: false
+ * util.isNumber(Infinity);
+ * // Returns: true
+ * util.isNumber(0);
+ * // Returns: true
+ * util.isNumber(NaN);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'number'` instead.
+ */
+ export function isNumber(object: unknown): object is number;
+ /**
+ * Returns `true` if the given `object` is strictly an `Object`**and** not a`Function` (even though functions are objects in JavaScript).
+ * Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isObject(5);
+ * // Returns: false
+ * util.isObject(null);
+ * // Returns: false
+ * util.isObject({});
+ * // Returns: true
+ * util.isObject(() => {});
+ * // Returns: false
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `value !== null && typeof value === 'object'` instead.
+ */
+ export function isObject(object: unknown): boolean;
+ /**
+ * Returns `true` if the given `object` is a primitive type. Otherwise, returns`false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isPrimitive(5);
+ * // Returns: true
+ * util.isPrimitive('foo');
+ * // Returns: true
+ * util.isPrimitive(false);
+ * // Returns: true
+ * util.isPrimitive(null);
+ * // Returns: true
+ * util.isPrimitive(undefined);
+ * // Returns: true
+ * util.isPrimitive({});
+ * // Returns: false
+ * util.isPrimitive(() => {});
+ * // Returns: false
+ * util.isPrimitive(/^$/);
+ * // Returns: false
+ * util.isPrimitive(new Date());
+ * // Returns: false
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead.
+ */
+ export function isPrimitive(object: unknown): boolean;
+ /**
+ * Returns `true` if the given `object` is a `string`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isString('');
+ * // Returns: true
+ * util.isString('foo');
+ * // Returns: true
+ * util.isString(String('foo'));
+ * // Returns: true
+ * util.isString(5);
+ * // Returns: false
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'string'` instead.
+ */
+ export function isString(object: unknown): object is string;
+ /**
+ * Returns `true` if the given `object` is a `Symbol`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * util.isSymbol(5);
+ * // Returns: false
+ * util.isSymbol('foo');
+ * // Returns: false
+ * util.isSymbol(Symbol('foo'));
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'symbol'` instead.
+ */
+ export function isSymbol(object: unknown): object is symbol;
+ /**
+ * Returns `true` if the given `object` is `undefined`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * const foo = undefined;
+ * util.isUndefined(5);
+ * // Returns: false
+ * util.isUndefined(foo);
+ * // Returns: true
+ * util.isUndefined(null);
+ * // Returns: false
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `value === undefined` instead.
+ */
+ export function isUndefined(object: unknown): object is undefined;
+ /**
+ * The `util.deprecate()` method wraps `fn` (which may be a function or class) in
+ * such a way that it is marked as deprecated.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * exports.obsoleteFunction = util.deprecate(() => {
+ * // Do something here.
+ * }, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.');
+ * ```
+ *
+ * When called, `util.deprecate()` will return a function that will emit a`DeprecationWarning` using the `'warning'` event. The warning will
+ * be emitted and printed to `stderr` the first time the returned function is
+ * called. After the warning is emitted, the wrapped function is called without
+ * emitting a warning.
+ *
+ * If the same optional `code` is supplied in multiple calls to `util.deprecate()`,
+ * the warning will be emitted only once for that `code`.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * const fn1 = util.deprecate(someFunction, someMessage, 'DEP0001');
+ * const fn2 = util.deprecate(someOtherFunction, someOtherMessage, 'DEP0001');
+ * fn1(); // Emits a deprecation warning with code DEP0001
+ * fn2(); // Does not emit a deprecation warning because it has the same code
+ * ```
+ *
+ * If either the `--no-deprecation` or `--no-warnings` command-line flags are
+ * used, or if the `process.noDeprecation` property is set to `true`_prior_ to
+ * the first deprecation warning, the `util.deprecate()` method does nothing.
+ *
+ * If the `--trace-deprecation` or `--trace-warnings` command-line flags are set,
+ * or the `process.traceDeprecation` property is set to `true`, a warning and a
+ * stack trace are printed to `stderr` the first time the deprecated function is
+ * called.
+ *
+ * If the `--throw-deprecation` command-line flag is set, or the`process.throwDeprecation` property is set to `true`, then an exception will be
+ * thrown when the deprecated function is called.
+ *
+ * The `--throw-deprecation` command-line flag and `process.throwDeprecation`property take precedence over `--trace-deprecation` and`process.traceDeprecation`.
+ * @since v0.8.0
+ * @param fn The function that is being deprecated.
+ * @param msg A warning message to display when the deprecated function is invoked.
+ * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes.
+ * @return The deprecated function wrapped to emit a warning.
+ */
+ export function deprecate<T extends Function>(fn: T, msg: string, code?: string): T;
+ /**
+ * Returns `true` if there is deep strict equality between `val1` and `val2`.
+ * Otherwise, returns `false`.
+ *
+ * See `assert.deepStrictEqual()` for more information about deep strict
+ * equality.
+ * @since v9.0.0
+ */
+ export function isDeepStrictEqual(val1: unknown, val2: unknown): boolean;
+ /**
+ * Returns `str` with any ANSI escape codes removed.
+ *
+ * ```js
+ * console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m'));
+ * // Prints "value"
+ * ```
+ * @since v16.11.0
+ */
+ export function stripVTControlCharacters(str: string): string;
+ /**
+ * Takes an `async` function (or a function that returns a `Promise`) and returns a
+ * function following the error-first callback style, i.e. taking
+ * an `(err, value) => ...` callback as the last argument. In the callback, the
+ * first argument will be the rejection reason (or `null` if the `Promise`resolved), and the second argument will be the resolved value.
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * async function fn() {
+ * return 'hello world';
+ * }
+ * const callbackFunction = util.callbackify(fn);
+ *
+ * callbackFunction((err, ret) => {
+ * if (err) throw err;
+ * console.log(ret);
+ * });
+ * ```
+ *
+ * Will print:
+ *
+ * ```text
+ * hello world
+ * ```
+ *
+ * The callback is executed asynchronously, and will have a limited stack trace.
+ * If the callback throws, the process will emit an `'uncaughtException'` event, and if not handled will exit.
+ *
+ * Since `null` has a special meaning as the first argument to a callback, if a
+ * wrapped function rejects a `Promise` with a falsy value as a reason, the value
+ * is wrapped in an `Error` with the original value stored in a field named`reason`.
+ *
+ * ```js
+ * function fn() {
+ * return Promise.reject(null);
+ * }
+ * const callbackFunction = util.callbackify(fn);
+ *
+ * callbackFunction((err, ret) => {
+ * // When the Promise was rejected with `null` it is wrapped with an Error and
+ * // the original value is stored in `reason`.
+ * err &#x26;&#x26; Object.hasOwn(err, 'reason') &#x26;&#x26; err.reason === null; // true
+ * });
+ * ```
+ * @since v8.2.0
+ * @param fn An `async` function
+ * @return a callback style function
+ */
+ export function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
+ export function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
+ export function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export function callbackify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, T3, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export function callbackify<T1, T2, T3, T4>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, T3, T4, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export function callbackify<T1, T2, T3, T4, T5>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, T3, T4, T5, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export function callbackify<T1, T2, T3, T4, T5, T6>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export interface CustomPromisifyLegacy<TCustom extends Function> extends Function {
+ __promisify__: TCustom;
+ }
+ export interface CustomPromisifySymbol<TCustom extends Function> extends Function {
+ [promisify.custom]: TCustom;
+ }
+ export type CustomPromisify<TCustom extends Function> = CustomPromisifySymbol<TCustom> | CustomPromisifyLegacy<TCustom>;
+ /**
+ * Takes a function following the common error-first callback style, i.e. taking
+ * an `(err, value) => ...` callback as the last argument, and returns a version
+ * that returns promises.
+ *
+ * ```js
+ * const util = require('node:util');
+ * const fs = require('node:fs');
+ *
+ * const stat = util.promisify(fs.stat);
+ * stat('.').then((stats) => {
+ * // Do something with `stats`
+ * }).catch((error) => {
+ * // Handle the error.
+ * });
+ * ```
+ *
+ * Or, equivalently using `async function`s:
+ *
+ * ```js
+ * const util = require('node:util');
+ * const fs = require('node:fs');
+ *
+ * const stat = util.promisify(fs.stat);
+ *
+ * async function callStat() {
+ * const stats = await stat('.');
+ * console.log(`This directory is owned by ${stats.uid}`);
+ * }
+ * ```
+ *
+ * If there is an `original[util.promisify.custom]` property present, `promisify`will return its value, see `Custom promisified functions`.
+ *
+ * `promisify()` assumes that `original` is a function taking a callback as its
+ * final argument in all cases. If `original` is not a function, `promisify()`will throw an error. If `original` is a function but its last argument is not
+ * an error-first callback, it will still be passed an error-first
+ * callback as its last argument.
+ *
+ * Using `promisify()` on class methods or other methods that use `this` may not
+ * work as expected unless handled specially:
+ *
+ * ```js
+ * const util = require('node:util');
+ *
+ * class Foo {
+ * constructor() {
+ * this.a = 42;
+ * }
+ *
+ * bar(callback) {
+ * callback(null, this.a);
+ * }
+ * }
+ *
+ * const foo = new Foo();
+ *
+ * const naiveBar = util.promisify(foo.bar);
+ * // TypeError: Cannot read property 'a' of undefined
+ * // naiveBar().then(a => console.log(a));
+ *
+ * naiveBar.call(foo).then((a) => console.log(a)); // '42'
+ *
+ * const bindBar = naiveBar.bind(foo);
+ * bindBar().then((a) => console.log(a)); // '42'
+ * ```
+ * @since v8.0.0
+ */
+ export function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
+ export function promisify<TResult>(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise<TResult>;
+ export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
+ export function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
+ export function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
+ export function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
+ export function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
+ export function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
+ export function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
+ export function promisify<T1, T2, T3, T4, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
+ export function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
+ export function promisify<T1, T2, T3, T4, T5, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
+ export function promisify<T1, T2, T3, T4, T5>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
+ export function promisify(fn: Function): Function;
+ export namespace promisify {
+ /**
+ * That can be used to declare custom promisified variants of functions.
+ */
+ const custom: unique symbol;
+ }
+ /**
+ * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextDecoder` API.
+ *
+ * ```js
+ * const decoder = new TextDecoder();
+ * const u8arr = new Uint8Array([72, 101, 108, 108, 111]);
+ * console.log(decoder.decode(u8arr)); // Hello
+ * ```
+ * @since v8.3.0
+ */
+ export class TextDecoder {
+ /**
+ * The encoding supported by the `TextDecoder` instance.
+ */
+ readonly encoding: string;
+ /**
+ * The value will be `true` if decoding errors result in a `TypeError` being
+ * thrown.
+ */
+ readonly fatal: boolean;
+ /**
+ * The value will be `true` if the decoding result will include the byte order
+ * mark.
+ */
+ readonly ignoreBOM: boolean;
+ constructor(
+ encoding?: string,
+ options?: {
+ fatal?: boolean | undefined;
+ ignoreBOM?: boolean | undefined;
+ }
+ );
+ /**
+ * Decodes the `input` and returns a string. If `options.stream` is `true`, any
+ * incomplete byte sequences occurring at the end of the `input` are buffered
+ * internally and emitted after the next call to `textDecoder.decode()`.
+ *
+ * If `textDecoder.fatal` is `true`, decoding errors that occur will result in a`TypeError` being thrown.
+ * @param input An `ArrayBuffer`, `DataView`, or `TypedArray` instance containing the encoded data.
+ */
+ decode(
+ input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
+ options?: {
+ stream?: boolean | undefined;
+ }
+ ): string;
+ }
+ export interface EncodeIntoResult {
+ /**
+ * The read Unicode code units of input.
+ */
+ read: number;
+ /**
+ * The written UTF-8 bytes of output.
+ */
+ written: number;
+ }
+ export { types };
+
+ //// TextEncoder/Decoder
+ /**
+ * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextEncoder` API. All
+ * instances of `TextEncoder` only support UTF-8 encoding.
+ *
+ * ```js
+ * const encoder = new TextEncoder();
+ * const uint8array = encoder.encode('this is some data');
+ * ```
+ *
+ * The `TextEncoder` class is also available on the global object.
+ * @since v8.3.0
+ */
+ export class TextEncoder {
+ /**
+ * The encoding supported by the `TextEncoder` instance. Always set to `'utf-8'`.
+ */
+ readonly encoding: string;
+ /**
+ * UTF-8 encodes the `input` string and returns a `Uint8Array` containing the
+ * encoded bytes.
+ * @param [input='an empty string'] The text to encode.
+ */
+ encode(input?: string): Uint8Array;
+ /**
+ * UTF-8 encodes the `src` string to the `dest` Uint8Array and returns an object
+ * containing the read Unicode code units and written UTF-8 bytes.
+ *
+ * ```js
+ * const encoder = new TextEncoder();
+ * const src = 'this is some data';
+ * const dest = new Uint8Array(10);
+ * const { read, written } = encoder.encodeInto(src, dest);
+ * ```
+ * @param src The text to encode.
+ * @param dest The array to hold the encode result.
+ */
+ encodeInto(src: string, dest: Uint8Array): EncodeIntoResult;
+ }
+ import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from 'util';
+ global {
+ /**
+ * `TextDecoder` class is a global reference for `require('util').TextDecoder`
+ * https://nodejs.org/api/globals.html#textdecoder
+ * @since v11.0.0
+ */
+ var TextDecoder: typeof globalThis extends {
+ onmessage: any;
+ TextDecoder: infer TextDecoder;
+ }
+ ? TextDecoder
+ : typeof _TextDecoder;
+ /**
+ * `TextEncoder` class is a global reference for `require('util').TextEncoder`
+ * https://nodejs.org/api/globals.html#textencoder
+ * @since v11.0.0
+ */
+ var TextEncoder: typeof globalThis extends {
+ onmessage: any;
+ TextEncoder: infer TextEncoder;
+ }
+ ? TextEncoder
+ : typeof _TextEncoder;
+ }
+
+ //// parseArgs
+ /**
+ * Provides a higher level API for command-line argument parsing than interacting
+ * with `process.argv` directly. Takes a specification for the expected arguments
+ * and returns a structured object with the parsed options and positionals.
+ *
+ * ```js
+ * import { parseArgs } from 'node:util';
+ * const args = ['-f', '--bar', 'b'];
+ * const options = {
+ * foo: {
+ * type: 'boolean',
+ * short: 'f',
+ * },
+ * bar: {
+ * type: 'string',
+ * },
+ * };
+ * const {
+ * values,
+ * positionals,
+ * } = parseArgs({ args, options });
+ * console.log(values, positionals);
+ * // Prints: [Object: null prototype] { foo: true, bar: 'b' } []
+ * ```
+ * @since v18.3.0, v16.17.0
+ * @param config Used to provide arguments for parsing and to configure the parser. `config` supports the following properties:
+ * @return The parsed command line arguments:
+ */
+ export function parseArgs<T extends ParseArgsConfig>(config?: T): ParsedResults<T>;
+ interface ParseArgsOptionConfig {
+ /**
+ * Type of argument.
+ */
+ type: 'string' | 'boolean';
+ /**
+ * Whether this option can be provided multiple times.
+ * If `true`, all values will be collected in an array.
+ * If `false`, values for the option are last-wins.
+ * @default false.
+ */
+ multiple?: boolean | undefined;
+ /**
+ * A single character alias for the option.
+ */
+ short?: string | undefined;
+ /**
+ * The default option value when it is not set by args.
+ * It must be of the same type as the the `type` property.
+ * When `multiple` is `true`, it must be an array.
+ * @since v18.11.0
+ */
+ default?: string | boolean | string[] | boolean[] | undefined;
+ }
+ interface ParseArgsOptionsConfig {
+ [longOption: string]: ParseArgsOptionConfig;
+ }
+ export interface ParseArgsConfig {
+ /**
+ * Array of argument strings.
+ */
+ args?: string[] | undefined;
+ /**
+ * Used to describe arguments known to the parser.
+ */
+ options?: ParseArgsOptionsConfig | undefined;
+ /**
+ * Should an error be thrown when unknown arguments are encountered,
+ * or when arguments are passed that do not match the `type` configured in `options`.
+ * @default true
+ */
+ strict?: boolean | undefined;
+ /**
+ * Whether this command accepts positional arguments.
+ */
+ allowPositionals?: boolean | undefined;
+ /**
+ * Return the parsed tokens. This is useful for extending the built-in behavior,
+ * from adding additional checks through to reprocessing the tokens in different ways.
+ * @default false
+ */
+ tokens?: boolean | undefined;
+ }
+ /*
+ IfDefaultsTrue and IfDefaultsFalse are helpers to handle default values for missing boolean properties.
+ TypeScript does not have exact types for objects: https://github.com/microsoft/TypeScript/issues/12936
+ This means it is impossible to distinguish between "field X is definitely not present" and "field X may or may not be present".
+ But we expect users to generally provide their config inline or `as const`, which means TS will always know whether a given field is present.
+ So this helper treats "not definitely present" (i.e., not `extends boolean`) as being "definitely not present", i.e. it should have its default value.
+ This is technically incorrect but is a much nicer UX for the common case.
+ The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false.
+ */
+ type IfDefaultsTrue<T, IfTrue, IfFalse> = T extends true
+ ? IfTrue
+ : T extends false
+ ? IfFalse
+ : IfTrue;
+
+ // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false`
+ type IfDefaultsFalse<T, IfTrue, IfFalse> = T extends false
+ ? IfFalse
+ : T extends true
+ ? IfTrue
+ : IfFalse;
+
+ type ExtractOptionValue<T extends ParseArgsConfig, O extends ParseArgsOptionConfig> = IfDefaultsTrue<
+ T['strict'],
+ O['type'] extends 'string' ? string : O['type'] extends 'boolean' ? boolean : string | boolean,
+ string | boolean
+ >;
+
+ type ParsedValues<T extends ParseArgsConfig> =
+ & IfDefaultsTrue<T['strict'], unknown, { [longOption: string]: undefined | string | boolean }>
+ & (T['options'] extends ParseArgsOptionsConfig
+ ? {
+ -readonly [LongOption in keyof T['options']]: IfDefaultsFalse<
+ T['options'][LongOption]['multiple'],
+ undefined | Array<ExtractOptionValue<T, T['options'][LongOption]>>,
+ undefined | ExtractOptionValue<T, T['options'][LongOption]>
+ >;
+ }
+ : {});
+
+ type ParsedPositionals<T extends ParseArgsConfig> = IfDefaultsTrue<
+ T['strict'],
+ IfDefaultsFalse<T['allowPositionals'], string[], []>,
+ IfDefaultsTrue<T['allowPositionals'], string[], []>
+ >;
+
+ type PreciseTokenForOptions<
+ K extends string,
+ O extends ParseArgsOptionConfig,
+ > = O['type'] extends 'string'
+ ? {
+ kind: 'option';
+ index: number;
+ name: K;
+ rawName: string;
+ value: string;
+ inlineValue: boolean;
+ }
+ : O['type'] extends 'boolean'
+ ? {
+ kind: 'option';
+ index: number;
+ name: K;
+ rawName: string;
+ value: undefined;
+ inlineValue: undefined;
+ }
+ : OptionToken & { name: K };
+
+ type TokenForOptions<
+ T extends ParseArgsConfig,
+ K extends keyof T['options'] = keyof T['options'],
+ > = K extends unknown
+ ? T['options'] extends ParseArgsOptionsConfig
+ ? PreciseTokenForOptions<K & string, T['options'][K]>
+ : OptionToken
+ : never;
+
+ type ParsedOptionToken<T extends ParseArgsConfig> = IfDefaultsTrue<T['strict'], TokenForOptions<T>, OptionToken>;
+
+ type ParsedPositionalToken<T extends ParseArgsConfig> = IfDefaultsTrue<
+ T['strict'],
+ IfDefaultsFalse<T['allowPositionals'], { kind: 'positional'; index: number; value: string }, never>,
+ IfDefaultsTrue<T['allowPositionals'], { kind: 'positional'; index: number; value: string }, never>
+ >;
+
+ type ParsedTokens<T extends ParseArgsConfig> = Array<
+ ParsedOptionToken<T> | ParsedPositionalToken<T> | { kind: 'option-terminator'; index: number }
+ >;
+
+ type PreciseParsedResults<T extends ParseArgsConfig> = IfDefaultsFalse<
+ T['tokens'],
+ {
+ values: ParsedValues<T>;
+ positionals: ParsedPositionals<T>;
+ tokens: ParsedTokens<T>;
+ },
+ {
+ values: ParsedValues<T>;
+ positionals: ParsedPositionals<T>;
+ }
+ >;
+
+ type OptionToken =
+ | { kind: 'option'; index: number; name: string; rawName: string; value: string; inlineValue: boolean }
+ | {
+ kind: 'option';
+ index: number;
+ name: string;
+ rawName: string;
+ value: undefined;
+ inlineValue: undefined;
+ };
+
+ type Token =
+ | OptionToken
+ | { kind: 'positional'; index: number; value: string }
+ | { kind: 'option-terminator'; index: number };
+
+ // If ParseArgsConfig extends T, then the user passed config constructed elsewhere.
+ // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above.
+ type ParsedResults<T extends ParseArgsConfig> = ParseArgsConfig extends T
+ ? {
+ values: {
+ [longOption: string]: undefined | string | boolean | Array<string | boolean>;
+ };
+ positionals: string[];
+ tokens?: Token[];
+ }
+ : PreciseParsedResults<T>;
+
+ /**
+ * An implementation of [the MIMEType class](https://bmeck.github.io/node-proposal-mime-api/).
+ *
+ * In accordance with browser conventions, all properties of `MIMEType` objects
+ * are implemented as getters and setters on the class prototype, rather than as
+ * data properties on the object itself.
+ *
+ * A MIME string is a structured string containing multiple meaningful
+ * components. When parsed, a `MIMEType` object is returned containing
+ * properties for each of these components.
+ * @since v19.1.0, v18.13.0
+ * @experimental
+ */
+ export class MIMEType {
+ /**
+ * Creates a new MIMEType object by parsing the input.
+ *
+ * A `TypeError` will be thrown if the `input` is not a valid MIME.
+ * Note that an effort will be made to coerce the given values into strings.
+ * @param input The input MIME to parse.
+ */
+ constructor(input: string | { toString: () => string });
+
+ /**
+ * Gets and sets the type portion of the MIME.
+ *
+ * ```js
+ * import { MIMEType } from 'node:util';
+ *
+ * const myMIME = new MIMEType('text/javascript');
+ * console.log(myMIME.type);
+ * // Prints: text
+ * myMIME.type = 'application';
+ * console.log(myMIME.type);
+ * // Prints: application
+ * console.log(String(myMIME));
+ * // Prints: application/javascript
+ * ```
+ */
+ type: string;
+ /**
+ * Gets and sets the subtype portion of the MIME.
+ *
+ * ```js
+ * import { MIMEType } from 'node:util';
+ *
+ * const myMIME = new MIMEType('text/ecmascript');
+ * console.log(myMIME.subtype);
+ * // Prints: ecmascript
+ * myMIME.subtype = 'javascript';
+ * console.log(myMIME.subtype);
+ * // Prints: javascript
+ * console.log(String(myMIME));
+ * // Prints: text/javascript
+ * ```
+ */
+ subtype: string;
+ /**
+ * Gets the essence of the MIME. This property is read only.
+ * Use `mime.type` or `mime.subtype` to alter the MIME.
+ *
+ * ```js
+ * import { MIMEType } from 'node:util';
+ *
+ * const myMIME = new MIMEType('text/javascript;key=value');
+ * console.log(myMIME.essence);
+ * // Prints: text/javascript
+ * myMIME.type = 'application';
+ * console.log(myMIME.essence);
+ * // Prints: application/javascript
+ * console.log(String(myMIME));
+ * // Prints: application/javascript;key=value
+ * ```
+ */
+ readonly essence: string;
+ /**
+ * Gets the `MIMEParams` object representing the
+ * parameters of the MIME. This property is read-only. See `MIMEParams` documentation for details.
+ */
+ readonly params: MIMEParams;
+ /**
+ * The `toString()` method on the `MIMEType` object returns the serialized MIME.
+ *
+ * Because of the need for standard compliance, this method does not allow users
+ * to customize the serialization process of the MIME.
+ */
+ toString(): string;
+ }
+ /**
+ * The `MIMEParams` API provides read and write access to the parameters of a`MIMEType`.
+ * @since v19.1.0, v18.13.0
+ */
+ export class MIMEParams {
+ /**
+ * Remove all name-value pairs whose name is `name`.
+ */
+ delete(name: string): void;
+ /**
+ * Returns an iterator over each of the name-value pairs in the parameters.
+ * Each item of the iterator is a JavaScript `Array`. The first item of the array
+ * is the `name`, the second item of the array is the `value`.
+ */
+ entries(): IterableIterator<[name: string, value: string]>;
+ /**
+ * Returns the value of the first name-value pair whose name is `name`. If there
+ * are no such pairs, `null` is returned.
+ * @return or `null` if there is no name-value pair with the given `name`.
+ */
+ get(name: string): string | null;
+ /**
+ * Returns `true` if there is at least one name-value pair whose name is `name`.
+ */
+ has(name: string): boolean;
+ /**
+ * Returns an iterator over the names of each name-value pair.
+ *
+ * ```js
+ * import { MIMEType } from 'node:util';
+ *
+ * const { params } = new MIMEType('text/plain;foo=0;bar=1');
+ * for (const name of params.keys()) {
+ * console.log(name);
+ * }
+ * // Prints:
+ * // foo
+ * // bar
+ * ```
+ */
+ keys(): IterableIterator<string>;
+ /**
+ * Sets the value in the `MIMEParams` object associated with `name` to`value`. If there are any pre-existing name-value pairs whose names are `name`,
+ * set the first such pair's value to `value`.
+ *
+ * ```js
+ * import { MIMEType } from 'node:util';
+ *
+ * const { params } = new MIMEType('text/plain;foo=0;bar=1');
+ * params.set('foo', 'def');
+ * params.set('baz', 'xyz');
+ * console.log(params.toString());
+ * // Prints: foo=def&#x26;bar=1&#x26;baz=xyz
+ * ```
+ */
+ set(name: string, value: string): void;
+ /**
+ * Returns an iterator over the values of each name-value pair.
+ */
+ values(): IterableIterator<string>;
+ /**
+ * Returns an iterator over each of the name-value pairs in the parameters.
+ */
+ [Symbol.iterator]: typeof MIMEParams.prototype.entries;
+ }
+}
+declare module 'util/types' {
+ export * from 'util/types';
+}
+declare module 'util/types' {
+ import { KeyObject, webcrypto } from 'node:crypto';
+ /**
+ * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or
+ * [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance.
+ *
+ * See also `util.types.isArrayBuffer()` and `util.types.isSharedArrayBuffer()`.
+ *
+ * ```js
+ * util.types.isAnyArrayBuffer(new ArrayBuffer()); // Returns true
+ * util.types.isAnyArrayBuffer(new SharedArrayBuffer()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike;
+ /**
+ * Returns `true` if the value is an `arguments` object.
+ *
+ * ```js
+ * function foo() {
+ * util.types.isArgumentsObject(arguments); // Returns true
+ * }
+ * ```
+ * @since v10.0.0
+ */
+ function isArgumentsObject(object: unknown): object is IArguments;
+ /**
+ * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instance.
+ * This does _not_ include [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances. Usually, it is
+ * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that.
+ *
+ * ```js
+ * util.types.isArrayBuffer(new ArrayBuffer()); // Returns true
+ * util.types.isArrayBuffer(new SharedArrayBuffer()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isArrayBuffer(object: unknown): object is ArrayBuffer;
+ /**
+ * Returns `true` if the value is an instance of one of the [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) views, such as typed
+ * array objects or [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView). Equivalent to
+ * [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView).
+ *
+ * ```js
+ * util.types.isArrayBufferView(new Int8Array()); // true
+ * util.types.isArrayBufferView(Buffer.from('hello world')); // true
+ * util.types.isArrayBufferView(new DataView(new ArrayBuffer(16))); // true
+ * util.types.isArrayBufferView(new ArrayBuffer()); // false
+ * ```
+ * @since v10.0.0
+ */
+ function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView;
+ /**
+ * Returns `true` if the value is an [async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function).
+ * This only reports back what the JavaScript engine is seeing;
+ * in particular, the return value may not match the original source code if
+ * a transpilation tool was used.
+ *
+ * ```js
+ * util.types.isAsyncFunction(function foo() {}); // Returns false
+ * util.types.isAsyncFunction(async function foo() {}); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isAsyncFunction(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is a `BigInt64Array` instance.
+ *
+ * ```js
+ * util.types.isBigInt64Array(new BigInt64Array()); // Returns true
+ * util.types.isBigInt64Array(new BigUint64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isBigInt64Array(value: unknown): value is BigInt64Array;
+ /**
+ * Returns `true` if the value is a `BigUint64Array` instance.
+ *
+ * ```js
+ * util.types.isBigUint64Array(new BigInt64Array()); // Returns false
+ * util.types.isBigUint64Array(new BigUint64Array()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isBigUint64Array(value: unknown): value is BigUint64Array;
+ /**
+ * Returns `true` if the value is a boolean object, e.g. created
+ * by `new Boolean()`.
+ *
+ * ```js
+ * util.types.isBooleanObject(false); // Returns false
+ * util.types.isBooleanObject(true); // Returns false
+ * util.types.isBooleanObject(new Boolean(false)); // Returns true
+ * util.types.isBooleanObject(new Boolean(true)); // Returns true
+ * util.types.isBooleanObject(Boolean(false)); // Returns false
+ * util.types.isBooleanObject(Boolean(true)); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isBooleanObject(object: unknown): object is Boolean;
+ /**
+ * Returns `true` if the value is any boxed primitive object, e.g. created
+ * by `new Boolean()`, `new String()` or `Object(Symbol())`.
+ *
+ * For example:
+ *
+ * ```js
+ * util.types.isBoxedPrimitive(false); // Returns false
+ * util.types.isBoxedPrimitive(new Boolean(false)); // Returns true
+ * util.types.isBoxedPrimitive(Symbol('foo')); // Returns false
+ * util.types.isBoxedPrimitive(Object(Symbol('foo'))); // Returns true
+ * util.types.isBoxedPrimitive(Object(BigInt(5))); // Returns true
+ * ```
+ * @since v10.11.0
+ */
+ function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol;
+ /**
+ * Returns `true` if the value is a built-in [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instance.
+ *
+ * ```js
+ * const ab = new ArrayBuffer(20);
+ * util.types.isDataView(new DataView(ab)); // Returns true
+ * util.types.isDataView(new Float64Array()); // Returns false
+ * ```
+ *
+ * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView).
+ * @since v10.0.0
+ */
+ function isDataView(object: unknown): object is DataView;
+ /**
+ * Returns `true` if the value is a built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) instance.
+ *
+ * ```js
+ * util.types.isDate(new Date()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isDate(object: unknown): object is Date;
+ /**
+ * Returns `true` if the value is a native `External` value.
+ *
+ * A native `External` value is a special type of object that contains a
+ * raw C++ pointer (`void*`) for access from native code, and has no other
+ * properties. Such objects are created either by Node.js internals or native
+ * addons. In JavaScript, they are [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) objects with a`null` prototype.
+ *
+ * ```c
+ * #include <js_native_api.h>
+ * #include <stdlib.h>
+ * napi_value result;
+ * static napi_value MyNapi(napi_env env, napi_callback_info info) {
+ * int* raw = (int*) malloc(1024);
+ * napi_status status = napi_create_external(env, (void*) raw, NULL, NULL, &#x26;result);
+ * if (status != napi_ok) {
+ * napi_throw_error(env, NULL, "napi_create_external failed");
+ * return NULL;
+ * }
+ * return result;
+ * }
+ * ...
+ * DECLARE_NAPI_PROPERTY("myNapi", MyNapi)
+ * ...
+ * ```
+ *
+ * ```js
+ * const native = require('napi_addon.node');
+ * const data = native.myNapi();
+ * util.types.isExternal(data); // returns true
+ * util.types.isExternal(0); // returns false
+ * util.types.isExternal(new String('foo')); // returns false
+ * ```
+ *
+ * For further information on `napi_create_external`, refer to `napi_create_external()`.
+ * @since v10.0.0
+ */
+ function isExternal(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is a built-in [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) instance.
+ *
+ * ```js
+ * util.types.isFloat32Array(new ArrayBuffer()); // Returns false
+ * util.types.isFloat32Array(new Float32Array()); // Returns true
+ * util.types.isFloat32Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isFloat32Array(object: unknown): object is Float32Array;
+ /**
+ * Returns `true` if the value is a built-in [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) instance.
+ *
+ * ```js
+ * util.types.isFloat64Array(new ArrayBuffer()); // Returns false
+ * util.types.isFloat64Array(new Uint8Array()); // Returns false
+ * util.types.isFloat64Array(new Float64Array()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isFloat64Array(object: unknown): object is Float64Array;
+ /**
+ * Returns `true` if the value is a generator function.
+ * This only reports back what the JavaScript engine is seeing;
+ * in particular, the return value may not match the original source code if
+ * a transpilation tool was used.
+ *
+ * ```js
+ * util.types.isGeneratorFunction(function foo() {}); // Returns false
+ * util.types.isGeneratorFunction(function* foo() {}); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isGeneratorFunction(object: unknown): object is GeneratorFunction;
+ /**
+ * Returns `true` if the value is a generator object as returned from a
+ * built-in generator function.
+ * This only reports back what the JavaScript engine is seeing;
+ * in particular, the return value may not match the original source code if
+ * a transpilation tool was used.
+ *
+ * ```js
+ * function* foo() {}
+ * const generator = foo();
+ * util.types.isGeneratorObject(generator); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isGeneratorObject(object: unknown): object is Generator;
+ /**
+ * Returns `true` if the value is a built-in [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) instance.
+ *
+ * ```js
+ * util.types.isInt8Array(new ArrayBuffer()); // Returns false
+ * util.types.isInt8Array(new Int8Array()); // Returns true
+ * util.types.isInt8Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isInt8Array(object: unknown): object is Int8Array;
+ /**
+ * Returns `true` if the value is a built-in [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) instance.
+ *
+ * ```js
+ * util.types.isInt16Array(new ArrayBuffer()); // Returns false
+ * util.types.isInt16Array(new Int16Array()); // Returns true
+ * util.types.isInt16Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isInt16Array(object: unknown): object is Int16Array;
+ /**
+ * Returns `true` if the value is a built-in [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) instance.
+ *
+ * ```js
+ * util.types.isInt32Array(new ArrayBuffer()); // Returns false
+ * util.types.isInt32Array(new Int32Array()); // Returns true
+ * util.types.isInt32Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isInt32Array(object: unknown): object is Int32Array;
+ /**
+ * Returns `true` if the value is a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance.
+ *
+ * ```js
+ * util.types.isMap(new Map()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isMap<T>(object: T | {}): object is T extends ReadonlyMap<any, any> ? (unknown extends T ? never : ReadonlyMap<any, any>) : Map<unknown, unknown>;
+ /**
+ * Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance.
+ *
+ * ```js
+ * const map = new Map();
+ * util.types.isMapIterator(map.keys()); // Returns true
+ * util.types.isMapIterator(map.values()); // Returns true
+ * util.types.isMapIterator(map.entries()); // Returns true
+ * util.types.isMapIterator(map[Symbol.iterator]()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isMapIterator(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is an instance of a [Module Namespace Object](https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects).
+ *
+ * ```js
+ * import * as ns from './a.js';
+ *
+ * util.types.isModuleNamespaceObject(ns); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isModuleNamespaceObject(value: unknown): boolean;
+ /**
+ * Returns `true` if the value was returned by the constructor of a [built-in `Error` type](https://tc39.es/ecma262/#sec-error-objects).
+ *
+ * ```js
+ * console.log(util.types.isNativeError(new Error())); // true
+ * console.log(util.types.isNativeError(new TypeError())); // true
+ * console.log(util.types.isNativeError(new RangeError())); // true
+ * ```
+ *
+ * Subclasses of the native error types are also native errors:
+ *
+ * ```js
+ * class MyError extends Error {}
+ * console.log(util.types.isNativeError(new MyError())); // true
+ * ```
+ *
+ * A value being `instanceof` a native error class is not equivalent to `isNativeError()`returning `true` for that value. `isNativeError()` returns `true` for errors
+ * which come from a different [realm](https://tc39.es/ecma262/#realm) while `instanceof Error` returns `false`for these errors:
+ *
+ * ```js
+ * const vm = require('node:vm');
+ * const context = vm.createContext({});
+ * const myError = vm.runInContext('new Error()', context);
+ * console.log(util.types.isNativeError(myError)); // true
+ * console.log(myError instanceof Error); // false
+ * ```
+ *
+ * Conversely, `isNativeError()` returns `false` for all objects which were not
+ * returned by the constructor of a native error. That includes values
+ * which are `instanceof` native errors:
+ *
+ * ```js
+ * const myError = { __proto__: Error.prototype };
+ * console.log(util.types.isNativeError(myError)); // false
+ * console.log(myError instanceof Error); // true
+ * ```
+ * @since v10.0.0
+ */
+ function isNativeError(object: unknown): object is Error;
+ /**
+ * Returns `true` if the value is a number object, e.g. created
+ * by `new Number()`.
+ *
+ * ```js
+ * util.types.isNumberObject(0); // Returns false
+ * util.types.isNumberObject(new Number(0)); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isNumberObject(object: unknown): object is Number;
+ /**
+ * Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
+ *
+ * ```js
+ * util.types.isPromise(Promise.resolve(42)); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isPromise(object: unknown): object is Promise<unknown>;
+ /**
+ * Returns `true` if the value is a [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) instance.
+ *
+ * ```js
+ * const target = {};
+ * const proxy = new Proxy(target, {});
+ * util.types.isProxy(target); // Returns false
+ * util.types.isProxy(proxy); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isProxy(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is a regular expression object.
+ *
+ * ```js
+ * util.types.isRegExp(/abc/); // Returns true
+ * util.types.isRegExp(new RegExp('abc')); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isRegExp(object: unknown): object is RegExp;
+ /**
+ * Returns `true` if the value is a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance.
+ *
+ * ```js
+ * util.types.isSet(new Set()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isSet<T>(object: T | {}): object is T extends ReadonlySet<any> ? (unknown extends T ? never : ReadonlySet<any>) : Set<unknown>;
+ /**
+ * Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance.
+ *
+ * ```js
+ * const set = new Set();
+ * util.types.isSetIterator(set.keys()); // Returns true
+ * util.types.isSetIterator(set.values()); // Returns true
+ * util.types.isSetIterator(set.entries()); // Returns true
+ * util.types.isSetIterator(set[Symbol.iterator]()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isSetIterator(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is a built-in [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance.
+ * This does _not_ include [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instances. Usually, it is
+ * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that.
+ *
+ * ```js
+ * util.types.isSharedArrayBuffer(new ArrayBuffer()); // Returns false
+ * util.types.isSharedArrayBuffer(new SharedArrayBuffer()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer;
+ /**
+ * Returns `true` if the value is a string object, e.g. created
+ * by `new String()`.
+ *
+ * ```js
+ * util.types.isStringObject('foo'); // Returns false
+ * util.types.isStringObject(new String('foo')); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isStringObject(object: unknown): object is String;
+ /**
+ * Returns `true` if the value is a symbol object, created
+ * by calling `Object()` on a `Symbol` primitive.
+ *
+ * ```js
+ * const symbol = Symbol('foo');
+ * util.types.isSymbolObject(symbol); // Returns false
+ * util.types.isSymbolObject(Object(symbol)); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isSymbolObject(object: unknown): object is Symbol;
+ /**
+ * Returns `true` if the value is a built-in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance.
+ *
+ * ```js
+ * util.types.isTypedArray(new ArrayBuffer()); // Returns false
+ * util.types.isTypedArray(new Uint8Array()); // Returns true
+ * util.types.isTypedArray(new Float64Array()); // Returns true
+ * ```
+ *
+ * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView).
+ * @since v10.0.0
+ */
+ function isTypedArray(object: unknown): object is NodeJS.TypedArray;
+ /**
+ * Returns `true` if the value is a built-in [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) instance.
+ *
+ * ```js
+ * util.types.isUint8Array(new ArrayBuffer()); // Returns false
+ * util.types.isUint8Array(new Uint8Array()); // Returns true
+ * util.types.isUint8Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isUint8Array(object: unknown): object is Uint8Array;
+ /**
+ * Returns `true` if the value is a built-in [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) instance.
+ *
+ * ```js
+ * util.types.isUint8ClampedArray(new ArrayBuffer()); // Returns false
+ * util.types.isUint8ClampedArray(new Uint8ClampedArray()); // Returns true
+ * util.types.isUint8ClampedArray(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray;
+ /**
+ * Returns `true` if the value is a built-in [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) instance.
+ *
+ * ```js
+ * util.types.isUint16Array(new ArrayBuffer()); // Returns false
+ * util.types.isUint16Array(new Uint16Array()); // Returns true
+ * util.types.isUint16Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isUint16Array(object: unknown): object is Uint16Array;
+ /**
+ * Returns `true` if the value is a built-in [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) instance.
+ *
+ * ```js
+ * util.types.isUint32Array(new ArrayBuffer()); // Returns false
+ * util.types.isUint32Array(new Uint32Array()); // Returns true
+ * util.types.isUint32Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isUint32Array(object: unknown): object is Uint32Array;
+ /**
+ * Returns `true` if the value is a built-in [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) instance.
+ *
+ * ```js
+ * util.types.isWeakMap(new WeakMap()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isWeakMap(object: unknown): object is WeakMap<object, unknown>;
+ /**
+ * Returns `true` if the value is a built-in [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) instance.
+ *
+ * ```js
+ * util.types.isWeakSet(new WeakSet()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isWeakSet(object: unknown): object is WeakSet<object>;
+ /**
+ * Returns `true` if `value` is a `KeyObject`, `false` otherwise.
+ * @since v16.2.0
+ */
+ function isKeyObject(object: unknown): object is KeyObject;
+ /**
+ * Returns `true` if `value` is a `CryptoKey`, `false` otherwise.
+ * @since v16.2.0
+ */
+ function isCryptoKey(object: unknown): object is webcrypto.CryptoKey;
+}
+declare module 'node:util' {
+ export * from 'util';
+}
+declare module 'node:util/types' {
+ export * from 'util/types';
+}
diff --git a/node_modules/@types/node/v8.d.ts b/node_modules/@types/node/v8.d.ts
new file mode 100755
index 0000000..064f5d5
--- /dev/null
+++ b/node_modules/@types/node/v8.d.ts
@@ -0,0 +1,635 @@
+/**
+ * The `node:v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using:
+ *
+ * ```js
+ * const v8 = require('node:v8');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/v8.js)
+ */
+declare module 'v8' {
+ import { Readable } from 'node:stream';
+ interface HeapSpaceInfo {
+ space_name: string;
+ space_size: number;
+ space_used_size: number;
+ space_available_size: number;
+ physical_space_size: number;
+ }
+ // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */
+ type DoesZapCodeSpaceFlag = 0 | 1;
+ interface HeapInfo {
+ total_heap_size: number;
+ total_heap_size_executable: number;
+ total_physical_size: number;
+ total_available_size: number;
+ used_heap_size: number;
+ heap_size_limit: number;
+ malloced_memory: number;
+ peak_malloced_memory: number;
+ does_zap_garbage: DoesZapCodeSpaceFlag;
+ number_of_native_contexts: number;
+ number_of_detached_contexts: number;
+ total_global_handles_size: number;
+ used_global_handles_size: number;
+ external_memory: number;
+ }
+ interface HeapCodeStatistics {
+ code_and_metadata_size: number;
+ bytecode_and_metadata_size: number;
+ external_script_source_size: number;
+ }
+ /**
+ * Returns an integer representing a version tag derived from the V8 version,
+ * command-line flags, and detected CPU features. This is useful for determining
+ * whether a `vm.Script` `cachedData` buffer is compatible with this instance
+ * of V8.
+ *
+ * ```js
+ * console.log(v8.cachedDataVersionTag()); // 3947234607
+ * // The value returned by v8.cachedDataVersionTag() is derived from the V8
+ * // version, command-line flags, and detected CPU features. Test that the value
+ * // does indeed update when flags are toggled.
+ * v8.setFlagsFromString('--allow_natives_syntax');
+ * console.log(v8.cachedDataVersionTag()); // 183726201
+ * ```
+ * @since v8.0.0
+ */
+ function cachedDataVersionTag(): number;
+ /**
+ * Returns an object with the following properties:
+ *
+ * `does_zap_garbage` is a 0/1 boolean, which signifies whether the`--zap_code_space` option is enabled or not. This makes V8 overwrite heap
+ * garbage with a bit pattern. The RSS footprint (resident set size) gets bigger
+ * because it continuously touches all heap pages and that makes them less likely
+ * to get swapped out by the operating system.
+ *
+ * `number_of_native_contexts` The value of native\_context is the number of the
+ * top-level contexts currently active. Increase of this number over time indicates
+ * a memory leak.
+ *
+ * `number_of_detached_contexts` The value of detached\_context is the number
+ * of contexts that were detached and not yet garbage collected. This number
+ * being non-zero indicates a potential memory leak.
+ *
+ * `total_global_handles_size` The value of total\_global\_handles\_size is the
+ * total memory size of V8 global handles.
+ *
+ * `used_global_handles_size` The value of used\_global\_handles\_size is the
+ * used memory size of V8 global handles.
+ *
+ * `external_memory` The value of external\_memory is the memory size of array
+ * buffers and external strings.
+ *
+ * ```js
+ * {
+ * total_heap_size: 7326976,
+ * total_heap_size_executable: 4194304,
+ * total_physical_size: 7326976,
+ * total_available_size: 1152656,
+ * used_heap_size: 3476208,
+ * heap_size_limit: 1535115264,
+ * malloced_memory: 16384,
+ * peak_malloced_memory: 1127496,
+ * does_zap_garbage: 0,
+ * number_of_native_contexts: 1,
+ * number_of_detached_contexts: 0,
+ * total_global_handles_size: 8192,
+ * used_global_handles_size: 3296,
+ * external_memory: 318824
+ * }
+ * ```
+ * @since v1.0.0
+ */
+ function getHeapStatistics(): HeapInfo;
+ /**
+ * Returns statistics about the V8 heap spaces, i.e. the segments which make up
+ * the V8 heap. Neither the ordering of heap spaces, nor the availability of a
+ * heap space can be guaranteed as the statistics are provided via the
+ * V8[`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the
+ * next.
+ *
+ * The value returned is an array of objects containing the following properties:
+ *
+ * ```json
+ * [
+ * {
+ * "space_name": "new_space",
+ * "space_size": 2063872,
+ * "space_used_size": 951112,
+ * "space_available_size": 80824,
+ * "physical_space_size": 2063872
+ * },
+ * {
+ * "space_name": "old_space",
+ * "space_size": 3090560,
+ * "space_used_size": 2493792,
+ * "space_available_size": 0,
+ * "physical_space_size": 3090560
+ * },
+ * {
+ * "space_name": "code_space",
+ * "space_size": 1260160,
+ * "space_used_size": 644256,
+ * "space_available_size": 960,
+ * "physical_space_size": 1260160
+ * },
+ * {
+ * "space_name": "map_space",
+ * "space_size": 1094160,
+ * "space_used_size": 201608,
+ * "space_available_size": 0,
+ * "physical_space_size": 1094160
+ * },
+ * {
+ * "space_name": "large_object_space",
+ * "space_size": 0,
+ * "space_used_size": 0,
+ * "space_available_size": 1490980608,
+ * "physical_space_size": 0
+ * }
+ * ]
+ * ```
+ * @since v6.0.0
+ */
+ function getHeapSpaceStatistics(): HeapSpaceInfo[];
+ /**
+ * The `v8.setFlagsFromString()` method can be used to programmatically set
+ * V8 command-line flags. This method should be used with care. Changing settings
+ * after the VM has started may result in unpredictable behavior, including
+ * crashes and data loss; or it may simply do nothing.
+ *
+ * The V8 options available for a version of Node.js may be determined by running`node --v8-options`.
+ *
+ * Usage:
+ *
+ * ```js
+ * // Print GC events to stdout for one minute.
+ * const v8 = require('node:v8');
+ * v8.setFlagsFromString('--trace_gc');
+ * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3);
+ * ```
+ * @since v1.0.0
+ */
+ function setFlagsFromString(flags: string): void;
+ /**
+ * Generates a snapshot of the current V8 heap and returns a Readable
+ * Stream that may be used to read the JSON serialized representation.
+ * This JSON stream format is intended to be used with tools such as
+ * Chrome DevTools. The JSON schema is undocumented and specific to the
+ * V8 engine. Therefore, the schema may change from one version of V8 to the next.
+ *
+ * Creating a heap snapshot requires memory about twice the size of the heap at
+ * the time the snapshot is created. This results in the risk of OOM killers
+ * terminating the process.
+ *
+ * Generating a snapshot is a synchronous operation which blocks the event loop
+ * for a duration depending on the heap size.
+ *
+ * ```js
+ * // Print heap snapshot to the console
+ * const v8 = require('node:v8');
+ * const stream = v8.getHeapSnapshot();
+ * stream.pipe(process.stdout);
+ * ```
+ * @since v11.13.0
+ * @return A Readable containing the V8 heap snapshot.
+ */
+ function getHeapSnapshot(): Readable;
+ /**
+ * Generates a snapshot of the current V8 heap and writes it to a JSON
+ * file. This file is intended to be used with tools such as Chrome
+ * DevTools. The JSON schema is undocumented and specific to the V8
+ * engine, and may change from one version of V8 to the next.
+ *
+ * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will
+ * not contain any information about the workers, and vice versa.
+ *
+ * Creating a heap snapshot requires memory about twice the size of the heap at
+ * the time the snapshot is created. This results in the risk of OOM killers
+ * terminating the process.
+ *
+ * Generating a snapshot is a synchronous operation which blocks the event loop
+ * for a duration depending on the heap size.
+ *
+ * ```js
+ * const { writeHeapSnapshot } = require('node:v8');
+ * const {
+ * Worker,
+ * isMainThread,
+ * parentPort,
+ * } = require('node:worker_threads');
+ *
+ * if (isMainThread) {
+ * const worker = new Worker(__filename);
+ *
+ * worker.once('message', (filename) => {
+ * console.log(`worker heapdump: ${filename}`);
+ * // Now get a heapdump for the main thread.
+ * console.log(`main thread heapdump: ${writeHeapSnapshot()}`);
+ * });
+ *
+ * // Tell the worker to create a heapdump.
+ * worker.postMessage('heapdump');
+ * } else {
+ * parentPort.once('message', (message) => {
+ * if (message === 'heapdump') {
+ * // Generate a heapdump for the worker
+ * // and return the filename to the parent.
+ * parentPort.postMessage(writeHeapSnapshot());
+ * }
+ * });
+ * }
+ * ```
+ * @since v11.13.0
+ * @param filename The file path where the V8 heap snapshot is to be saved. If not specified, a file name with the pattern `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be
+ * generated, where `{pid}` will be the PID of the Node.js process, `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from the main Node.js thread or the id of a
+ * worker thread.
+ * @return The filename where the snapshot was saved.
+ */
+ function writeHeapSnapshot(filename?: string): string;
+ /**
+ * Get statistics about code and its metadata in the heap, see
+ * V8[`GetHeapCodeAndMetadataStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#a6079122af17612ef54ef3348ce170866) API. Returns an object with the
+ * following properties:
+ *
+ * ```js
+ * {
+ * code_and_metadata_size: 212208,
+ * bytecode_and_metadata_size: 161368,
+ * external_script_source_size: 1410794,
+ * cpu_profiler_metadata_size: 0,
+ * }
+ * ```
+ * @since v12.8.0
+ */
+ function getHeapCodeStatistics(): HeapCodeStatistics;
+ /**
+ * @since v8.0.0
+ */
+ class Serializer {
+ /**
+ * Writes out a header, which includes the serialization format version.
+ */
+ writeHeader(): void;
+ /**
+ * Serializes a JavaScript value and adds the serialized representation to the
+ * internal buffer.
+ *
+ * This throws an error if `value` cannot be serialized.
+ */
+ writeValue(val: any): boolean;
+ /**
+ * Returns the stored internal buffer. This serializer should not be used once
+ * the buffer is released. Calling this method results in undefined behavior
+ * if a previous write has failed.
+ */
+ releaseBuffer(): Buffer;
+ /**
+ * Marks an `ArrayBuffer` as having its contents transferred out of band.
+ * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`.
+ * @param id A 32-bit unsigned integer.
+ * @param arrayBuffer An `ArrayBuffer` instance.
+ */
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
+ /**
+ * Write a raw 32-bit unsigned integer.
+ * For use inside of a custom `serializer._writeHostObject()`.
+ */
+ writeUint32(value: number): void;
+ /**
+ * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts.
+ * For use inside of a custom `serializer._writeHostObject()`.
+ */
+ writeUint64(hi: number, lo: number): void;
+ /**
+ * Write a JS `number` value.
+ * For use inside of a custom `serializer._writeHostObject()`.
+ */
+ writeDouble(value: number): void;
+ /**
+ * Write raw bytes into the serializer's internal buffer. The deserializer
+ * will require a way to compute the length of the buffer.
+ * For use inside of a custom `serializer._writeHostObject()`.
+ */
+ writeRawBytes(buffer: NodeJS.TypedArray): void;
+ }
+ /**
+ * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only
+ * stores the part of their underlying `ArrayBuffer`s that they are referring to.
+ * @since v8.0.0
+ */
+ class DefaultSerializer extends Serializer {}
+ /**
+ * @since v8.0.0
+ */
+ class Deserializer {
+ constructor(data: NodeJS.TypedArray);
+ /**
+ * Reads and validates a header (including the format version).
+ * May, for example, reject an invalid or unsupported wire format. In that case,
+ * an `Error` is thrown.
+ */
+ readHeader(): boolean;
+ /**
+ * Deserializes a JavaScript value from the buffer and returns it.
+ */
+ readValue(): any;
+ /**
+ * Marks an `ArrayBuffer` as having its contents transferred out of band.
+ * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of
+ * `SharedArrayBuffer`s).
+ * @param id A 32-bit unsigned integer.
+ * @param arrayBuffer An `ArrayBuffer` instance.
+ */
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
+ /**
+ * Reads the underlying wire format version. Likely mostly to be useful to
+ * legacy code reading old wire format versions. May not be called before`.readHeader()`.
+ */
+ getWireFormatVersion(): number;
+ /**
+ * Read a raw 32-bit unsigned integer and return it.
+ * For use inside of a custom `deserializer._readHostObject()`.
+ */
+ readUint32(): number;
+ /**
+ * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]`with two 32-bit unsigned integer entries.
+ * For use inside of a custom `deserializer._readHostObject()`.
+ */
+ readUint64(): [number, number];
+ /**
+ * Read a JS `number` value.
+ * For use inside of a custom `deserializer._readHostObject()`.
+ */
+ readDouble(): number;
+ /**
+ * Read raw bytes from the deserializer's internal buffer. The `length` parameter
+ * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`.
+ * For use inside of a custom `deserializer._readHostObject()`.
+ */
+ readRawBytes(length: number): Buffer;
+ }
+ /**
+ * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`.
+ * @since v8.0.0
+ */
+ class DefaultDeserializer extends Deserializer {}
+ /**
+ * Uses a `DefaultSerializer` to serialize `value` into a buffer.
+ *
+ * `ERR_BUFFER_TOO_LARGE` will be thrown when trying to
+ * serialize a huge object which requires buffer
+ * larger than `buffer.constants.MAX_LENGTH`.
+ * @since v8.0.0
+ */
+ function serialize(value: any): Buffer;
+ /**
+ * Uses a `DefaultDeserializer` with default options to read a JS value
+ * from a buffer.
+ * @since v8.0.0
+ * @param buffer A buffer returned by {@link serialize}.
+ */
+ function deserialize(buffer: NodeJS.TypedArray): any;
+ /**
+ * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple
+ * times during the lifetime of the process. Each time the execution counter will
+ * be reset and a new coverage report will be written to the directory specified
+ * by `NODE_V8_COVERAGE`.
+ *
+ * When the process is about to exit, one last coverage will still be written to
+ * disk unless {@link stopCoverage} is invoked before the process exits.
+ * @since v15.1.0, v14.18.0, v12.22.0
+ */
+ function takeCoverage(): void;
+ /**
+ * The `v8.stopCoverage()` method allows the user to stop the coverage collection
+ * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count
+ * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand.
+ * @since v15.1.0, v14.18.0, v12.22.0
+ */
+ function stopCoverage(): void;
+ /**
+ * This API collects GC data in current thread.
+ * @since v19.6.0, v18.15.0
+ */
+ class GCProfiler {
+ /**
+ * Start collecting GC data.
+ * @since v19.6.0, v18.15.0
+ */
+ start(): void;
+ /**
+ * Stop collecting GC data and return an object.The content of object
+ * is as follows.
+ *
+ * ```json
+ * {
+ * "version": 1,
+ * "startTime": 1674059033862,
+ * "statistics": [
+ * {
+ * "gcType": "Scavenge",
+ * "beforeGC": {
+ * "heapStatistics": {
+ * "totalHeapSize": 5005312,
+ * "totalHeapSizeExecutable": 524288,
+ * "totalPhysicalSize": 5226496,
+ * "totalAvailableSize": 4341325216,
+ * "totalGlobalHandlesSize": 8192,
+ * "usedGlobalHandlesSize": 2112,
+ * "usedHeapSize": 4883840,
+ * "heapSizeLimit": 4345298944,
+ * "mallocedMemory": 254128,
+ * "externalMemory": 225138,
+ * "peakMallocedMemory": 181760
+ * },
+ * "heapSpaceStatistics": [
+ * {
+ * "spaceName": "read_only_space",
+ * "spaceSize": 0,
+ * "spaceUsedSize": 0,
+ * "spaceAvailableSize": 0,
+ * "physicalSpaceSize": 0
+ * }
+ * ]
+ * },
+ * "cost": 1574.14,
+ * "afterGC": {
+ * "heapStatistics": {
+ * "totalHeapSize": 6053888,
+ * "totalHeapSizeExecutable": 524288,
+ * "totalPhysicalSize": 5500928,
+ * "totalAvailableSize": 4341101384,
+ * "totalGlobalHandlesSize": 8192,
+ * "usedGlobalHandlesSize": 2112,
+ * "usedHeapSize": 4059096,
+ * "heapSizeLimit": 4345298944,
+ * "mallocedMemory": 254128,
+ * "externalMemory": 225138,
+ * "peakMallocedMemory": 181760
+ * },
+ * "heapSpaceStatistics": [
+ * {
+ * "spaceName": "read_only_space",
+ * "spaceSize": 0,
+ * "spaceUsedSize": 0,
+ * "spaceAvailableSize": 0,
+ * "physicalSpaceSize": 0
+ * }
+ * ]
+ * }
+ * }
+ * ],
+ * "endTime": 1674059036865
+ * }
+ * ```
+ *
+ * Here's an example.
+ *
+ * ```js
+ * const { GCProfiler } = require('v8');
+ * const profiler = new GCProfiler();
+ * profiler.start();
+ * setTimeout(() => {
+ * console.log(profiler.stop());
+ * }, 1000);
+ * ```
+ * @since v19.6.0, v18.15.0
+ */
+ stop(): GCProfilerResult;
+ }
+ interface GCProfilerResult {
+ version: number;
+ startTime: number;
+ endTime: number;
+ statistics: Array<{
+ gcType: string;
+ cost: number;
+ beforeGC: {
+ heapStatistics: HeapStatistics;
+ heapSpaceStatistics: HeapSpaceStatistics[];
+ };
+ afterGC: {
+ heapStatistics: HeapStatistics;
+ heapSpaceStatistics: HeapSpaceStatistics[];
+ };
+ }>;
+ }
+ interface HeapStatistics {
+ totalHeapSize: number;
+ totalHeapSizeExecutable: number;
+ totalPhysicalSize: number;
+ totalAvailableSize: number;
+ totalGlobalHandlesSize: number;
+ usedGlobalHandlesSize: number;
+ usedHeapSize: number;
+ heapSizeLimit: number;
+ mallocedMemory: number;
+ externalMemory: number;
+ peakMallocedMemory: number;
+ }
+ interface HeapSpaceStatistics {
+ spaceName: string;
+ spaceSize: number;
+ spaceUsedSize: number;
+ spaceAvailableSize: number;
+ physicalSpaceSize: number;
+ }
+ /**
+ * Called when a promise is constructed. This does not mean that corresponding before/after events will occur, only that the possibility exists. This will
+ * happen if a promise is created without ever getting a continuation.
+ * @since v17.1.0, v16.14.0
+ * @param promise The promise being created.
+ * @param parent The promise continued from, if applicable.
+ */
+ interface Init {
+ (promise: Promise<unknown>, parent: Promise<unknown>): void;
+ }
+ /**
+ * Called before a promise continuation executes. This can be in the form of `then()`, `catch()`, or `finally()` handlers or an await resuming.
+ *
+ * The before callback will be called 0 to N times. The before callback will typically be called 0 times if no continuation was ever made for the promise.
+ * The before callback may be called many times in the case where many continuations have been made from the same promise.
+ * @since v17.1.0, v16.14.0
+ */
+ interface Before {
+ (promise: Promise<unknown>): void;
+ }
+ /**
+ * Called immediately after a promise continuation executes. This may be after a `then()`, `catch()`, or `finally()` handler or before an await after another await.
+ * @since v17.1.0, v16.14.0
+ */
+ interface After {
+ (promise: Promise<unknown>): void;
+ }
+ /**
+ * Called when the promise receives a resolution or rejection value. This may occur synchronously in the case of {@link Promise.resolve()} or
+ * {@link Promise.reject()}.
+ * @since v17.1.0, v16.14.0
+ */
+ interface Settled {
+ (promise: Promise<unknown>): void;
+ }
+ /**
+ * Key events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or
+ * around an await, and when the promise resolves or rejects.
+ *
+ * Because promises are asynchronous resources whose lifecycle is tracked via the promise hooks mechanism, the `init()`, `before()`, `after()`, and
+ * `settled()` callbacks must not be async functions as they create more promises which would produce an infinite loop.
+ * @since v17.1.0, v16.14.0
+ */
+ interface HookCallbacks {
+ init?: Init;
+ before?: Before;
+ after?: After;
+ settled?: Settled;
+ }
+ interface PromiseHooks {
+ /**
+ * The `init` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
+ * @since v17.1.0, v16.14.0
+ * @param init The {@link Init | `init` callback} to call when a promise is created.
+ * @return Call to stop the hook.
+ */
+ onInit: (init: Init) => Function;
+ /**
+ * The `settled` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
+ * @since v17.1.0, v16.14.0
+ * @param settled The {@link Settled | `settled` callback} to call when a promise is created.
+ * @return Call to stop the hook.
+ */
+ onSettled: (settled: Settled) => Function;
+ /**
+ * The `before` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
+ * @since v17.1.0, v16.14.0
+ * @param before The {@link Before | `before` callback} to call before a promise continuation executes.
+ * @return Call to stop the hook.
+ */
+ onBefore: (before: Before) => Function;
+ /**
+ * The `after` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
+ * @since v17.1.0, v16.14.0
+ * @param after The {@link After | `after` callback} to call after a promise continuation executes.
+ * @return Call to stop the hook.
+ */
+ onAfter: (after: After) => Function;
+ /**
+ * Registers functions to be called for different lifetime events of each promise.
+ * The callbacks `init()`/`before()`/`after()`/`settled()` are called for the respective events during a promise's lifetime.
+ * All callbacks are optional. For example, if only promise creation needs to be tracked, then only the init callback needs to be passed.
+ * The hook callbacks must be plain functions. Providing async functions will throw as it would produce an infinite microtask loop.
+ * @since v17.1.0, v16.14.0
+ * @param callbacks The {@link HookCallbacks | Hook Callbacks} to register
+ * @return Used for disabling hooks
+ */
+ createHook: (callbacks: HookCallbacks) => Function;
+ }
+ /**
+ * The `promiseHooks` interface can be used to track promise lifecycle events.
+ * @since v17.1.0, v16.14.0
+ */
+ const promiseHooks: PromiseHooks;
+}
+declare module 'node:v8' {
+ export * from 'v8';
+}
diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts
new file mode 100755
index 0000000..b1aa99d
--- /dev/null
+++ b/node_modules/@types/node/vm.d.ts
@@ -0,0 +1,895 @@
+/**
+ * The `node:vm` module enables compiling and running code within V8 Virtual
+ * Machine contexts.
+ *
+ * **The `node:vm` module is not a security**
+ * **mechanism. Do not use it to run untrusted code.**
+ *
+ * JavaScript code can be compiled and run immediately or
+ * compiled, saved, and run later.
+ *
+ * A common use case is to run the code in a different V8 Context. This means
+ * invoked code has a different global object than the invoking code.
+ *
+ * One can provide the context by `contextifying` an
+ * object. The invoked code treats any property in the context like a
+ * global variable. Any changes to global variables caused by the invoked
+ * code are reflected in the context object.
+ *
+ * ```js
+ * const vm = require('node:vm');
+ *
+ * const x = 1;
+ *
+ * const context = { x: 2 };
+ * vm.createContext(context); // Contextify the object.
+ *
+ * const code = 'x += 40; var y = 17;';
+ * // `x` and `y` are global variables in the context.
+ * // Initially, x has the value 2 because that is the value of context.x.
+ * vm.runInContext(code, context);
+ *
+ * console.log(context.x); // 42
+ * console.log(context.y); // 17
+ *
+ * console.log(x); // 1; y is not defined.
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/vm.js)
+ */
+declare module 'vm' {
+ import { ImportAssertions } from 'node:module';
+ interface Context extends NodeJS.Dict<any> {}
+ interface BaseOptions {
+ /**
+ * Specifies the filename used in stack traces produced by this script.
+ * Default: `''`.
+ */
+ filename?: string | undefined;
+ /**
+ * Specifies the line number offset that is displayed in stack traces produced by this script.
+ * Default: `0`.
+ */
+ lineOffset?: number | undefined;
+ /**
+ * Specifies the column number offset that is displayed in stack traces produced by this script.
+ * @default 0
+ */
+ columnOffset?: number | undefined;
+ }
+ interface ScriptOptions extends BaseOptions {
+ /**
+ * V8's code cache data for the supplied source.
+ */
+ cachedData?: Buffer | NodeJS.ArrayBufferView | undefined;
+ /** @deprecated in favor of `script.createCachedData()` */
+ produceCachedData?: boolean | undefined;
+ /**
+ * Called during evaluation of this module when `import()` is called.
+ * If this option is not specified, calls to `import()` will reject with `ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING`.
+ */
+ importModuleDynamically?: ((specifier: string, script: Script, importAssertions: ImportAssertions) => Module) | undefined;
+ }
+ interface RunningScriptOptions extends BaseOptions {
+ /**
+ * When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace.
+ * Default: `true`.
+ */
+ displayErrors?: boolean | undefined;
+ /**
+ * Specifies the number of milliseconds to execute code before terminating execution.
+ * If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer.
+ */
+ timeout?: number | undefined;
+ /**
+ * If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received.
+ * Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that.
+ * If execution is terminated, an `Error` will be thrown.
+ * Default: `false`.
+ */
+ breakOnSigint?: boolean | undefined;
+ }
+ interface RunningScriptInNewContextOptions extends RunningScriptOptions {
+ /**
+ * Human-readable name of the newly created context.
+ */
+ contextName?: CreateContextOptions['name'];
+ /**
+ * Origin corresponding to the newly created context for display purposes. The origin should be formatted like a URL,
+ * but with only the scheme, host, and port (if necessary), like the value of the `url.origin` property of a `URL` object.
+ * Most notably, this string should omit the trailing slash, as that denotes a path.
+ */
+ contextOrigin?: CreateContextOptions['origin'];
+ contextCodeGeneration?: CreateContextOptions['codeGeneration'];
+ /**
+ * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
+ */
+ microtaskMode?: CreateContextOptions['microtaskMode'];
+ }
+ interface RunningCodeOptions extends RunningScriptOptions {
+ cachedData?: ScriptOptions['cachedData'];
+ importModuleDynamically?: ScriptOptions['importModuleDynamically'];
+ }
+ interface RunningCodeInNewContextOptions extends RunningScriptInNewContextOptions {
+ cachedData?: ScriptOptions['cachedData'];
+ importModuleDynamically?: ScriptOptions['importModuleDynamically'];
+ }
+ interface CompileFunctionOptions extends BaseOptions {
+ /**
+ * Provides an optional data with V8's code cache data for the supplied source.
+ */
+ cachedData?: Buffer | undefined;
+ /**
+ * Specifies whether to produce new cache data.
+ * Default: `false`,
+ */
+ produceCachedData?: boolean | undefined;
+ /**
+ * The sandbox/context in which the said function should be compiled in.
+ */
+ parsingContext?: Context | undefined;
+ /**
+ * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling
+ */
+ contextExtensions?: Object[] | undefined;
+ }
+ interface CreateContextOptions {
+ /**
+ * Human-readable name of the newly created context.
+ * @default 'VM Context i' Where i is an ascending numerical index of the created context.
+ */
+ name?: string | undefined;
+ /**
+ * Corresponds to the newly created context for display purposes.
+ * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary),
+ * like the value of the `url.origin` property of a URL object.
+ * Most notably, this string should omit the trailing slash, as that denotes a path.
+ * @default ''
+ */
+ origin?: string | undefined;
+ codeGeneration?:
+ | {
+ /**
+ * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
+ * will throw an EvalError.
+ * @default true
+ */
+ strings?: boolean | undefined;
+ /**
+ * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
+ * @default true
+ */
+ wasm?: boolean | undefined;
+ }
+ | undefined;
+ /**
+ * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
+ */
+ microtaskMode?: 'afterEvaluate' | undefined;
+ }
+ type MeasureMemoryMode = 'summary' | 'detailed';
+ interface MeasureMemoryOptions {
+ /**
+ * @default 'summary'
+ */
+ mode?: MeasureMemoryMode | undefined;
+ /**
+ * @default 'default'
+ */
+ execution?: 'default' | 'eager' | undefined;
+ }
+ interface MemoryMeasurement {
+ total: {
+ jsMemoryEstimate: number;
+ jsMemoryRange: [number, number];
+ };
+ }
+ /**
+ * Instances of the `vm.Script` class contain precompiled scripts that can be
+ * executed in specific contexts.
+ * @since v0.3.1
+ */
+ class Script {
+ constructor(code: string, options?: ScriptOptions | string);
+ /**
+ * Runs the compiled code contained by the `vm.Script` object within the given`contextifiedObject` and returns the result. Running code does not have access
+ * to local scope.
+ *
+ * The following example compiles code that increments a global variable, sets
+ * the value of another global variable, then execute the code multiple times.
+ * The globals are contained in the `context` object.
+ *
+ * ```js
+ * const vm = require('node:vm');
+ *
+ * const context = {
+ * animal: 'cat',
+ * count: 2,
+ * };
+ *
+ * const script = new vm.Script('count += 1; name = "kitty";');
+ *
+ * vm.createContext(context);
+ * for (let i = 0; i < 10; ++i) {
+ * script.runInContext(context);
+ * }
+ *
+ * console.log(context);
+ * // Prints: { animal: 'cat', count: 12, name: 'kitty' }
+ * ```
+ *
+ * Using the `timeout` or `breakOnSigint` options will result in new event loops
+ * and corresponding threads being started, which have a non-zero performance
+ * overhead.
+ * @since v0.3.1
+ * @param contextifiedObject A `contextified` object as returned by the `vm.createContext()` method.
+ * @return the result of the very last statement executed in the script.
+ */
+ runInContext(contextifiedObject: Context, options?: RunningScriptOptions): any;
+ /**
+ * First contextifies the given `contextObject`, runs the compiled code contained
+ * by the `vm.Script` object within the created context, and returns the result.
+ * Running code does not have access to local scope.
+ *
+ * The following example compiles code that sets a global variable, then executes
+ * the code multiple times in different contexts. The globals are set on and
+ * contained within each individual `context`.
+ *
+ * ```js
+ * const vm = require('node:vm');
+ *
+ * const script = new vm.Script('globalVar = "set"');
+ *
+ * const contexts = [{}, {}, {}];
+ * contexts.forEach((context) => {
+ * script.runInNewContext(context);
+ * });
+ *
+ * console.log(contexts);
+ * // Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }]
+ * ```
+ * @since v0.3.1
+ * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
+ * @return the result of the very last statement executed in the script.
+ */
+ runInNewContext(contextObject?: Context, options?: RunningScriptInNewContextOptions): any;
+ /**
+ * Runs the compiled code contained by the `vm.Script` within the context of the
+ * current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object.
+ *
+ * The following example compiles code that increments a `global` variable then
+ * executes that code multiple times:
+ *
+ * ```js
+ * const vm = require('node:vm');
+ *
+ * global.globalVar = 0;
+ *
+ * const script = new vm.Script('globalVar += 1', { filename: 'myfile.vm' });
+ *
+ * for (let i = 0; i < 1000; ++i) {
+ * script.runInThisContext();
+ * }
+ *
+ * console.log(globalVar);
+ *
+ * // 1000
+ * ```
+ * @since v0.3.1
+ * @return the result of the very last statement executed in the script.
+ */
+ runInThisContext(options?: RunningScriptOptions): any;
+ /**
+ * Creates a code cache that can be used with the `Script` constructor's`cachedData` option. Returns a `Buffer`. This method may be called at any
+ * time and any number of times.
+ *
+ * The code cache of the `Script` doesn't contain any JavaScript observable
+ * states. The code cache is safe to be saved along side the script source and
+ * used to construct new `Script` instances multiple times.
+ *
+ * Functions in the `Script` source can be marked as lazily compiled and they are
+ * not compiled at construction of the `Script`. These functions are going to be
+ * compiled when they are invoked the first time. The code cache serializes the
+ * metadata that V8 currently knows about the `Script` that it can use to speed up
+ * future compilations.
+ *
+ * ```js
+ * const script = new vm.Script(`
+ * function add(a, b) {
+ * return a + b;
+ * }
+ *
+ * const x = add(1, 2);
+ * `);
+ *
+ * const cacheWithoutAdd = script.createCachedData();
+ * // In `cacheWithoutAdd` the function `add()` is marked for full compilation
+ * // upon invocation.
+ *
+ * script.runInThisContext();
+ *
+ * const cacheWithAdd = script.createCachedData();
+ * // `cacheWithAdd` contains fully compiled function `add()`.
+ * ```
+ * @since v10.6.0
+ */
+ createCachedData(): Buffer;
+ /** @deprecated in favor of `script.createCachedData()` */
+ cachedDataProduced?: boolean | undefined;
+ /**
+ * When `cachedData` is supplied to create the `vm.Script`, this value will be set
+ * to either `true` or `false` depending on acceptance of the data by V8\.
+ * Otherwise the value is `undefined`.
+ * @since v5.7.0
+ */
+ cachedDataRejected?: boolean | undefined;
+ cachedData?: Buffer | undefined;
+ /**
+ * When the script is compiled from a source that contains a source map magic
+ * comment, this property will be set to the URL of the source map.
+ *
+ * ```js
+ * import vm from 'node:vm';
+ *
+ * const script = new vm.Script(`
+ * function myFunc() {}
+ * //# sourceMappingURL=sourcemap.json
+ * `);
+ *
+ * console.log(script.sourceMapURL);
+ * // Prints: sourcemap.json
+ * ```
+ * @since v19.1.0, v18.13.0
+ */
+ sourceMapURL?: string | undefined;
+ }
+ /**
+ * If given a `contextObject`, the `vm.createContext()` method will `prepare
+ * that object` so that it can be used in calls to {@link runInContext} or `script.runInContext()`. Inside such scripts,
+ * the `contextObject` will be the global object, retaining all of its existing
+ * properties but also having the built-in objects and functions any standard [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global variables
+ * will remain unchanged.
+ *
+ * ```js
+ * const vm = require('node:vm');
+ *
+ * global.globalVar = 3;
+ *
+ * const context = { globalVar: 1 };
+ * vm.createContext(context);
+ *
+ * vm.runInContext('globalVar *= 2;', context);
+ *
+ * console.log(context);
+ * // Prints: { globalVar: 2 }
+ *
+ * console.log(global.globalVar);
+ * // Prints: 3
+ * ```
+ *
+ * If `contextObject` is omitted (or passed explicitly as `undefined`), a new,
+ * empty `contextified` object will be returned.
+ *
+ * The `vm.createContext()` method is primarily useful for creating a single
+ * context that can be used to run multiple scripts. For instance, if emulating a
+ * web browser, the method can be used to create a single context representing a
+ * window's global object, then run all `<script>` tags together within that
+ * context.
+ *
+ * The provided `name` and `origin` of the context are made visible through the
+ * Inspector API.
+ * @since v0.3.1
+ * @return contextified object.
+ */
+ function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
+ /**
+ * Returns `true` if the given `object` object has been `contextified` using {@link createContext}.
+ * @since v0.11.7
+ */
+ function isContext(sandbox: Context): boolean;
+ /**
+ * The `vm.runInContext()` method compiles `code`, runs it within the context of
+ * the `contextifiedObject`, then returns the result. Running code does not have
+ * access to the local scope. The `contextifiedObject` object _must_ have been
+ * previously `contextified` using the {@link createContext} method.
+ *
+ * If `options` is a string, then it specifies the filename.
+ *
+ * The following example compiles and executes different scripts using a single `contextified` object:
+ *
+ * ```js
+ * const vm = require('node:vm');
+ *
+ * const contextObject = { globalVar: 1 };
+ * vm.createContext(contextObject);
+ *
+ * for (let i = 0; i < 10; ++i) {
+ * vm.runInContext('globalVar *= 2;', contextObject);
+ * }
+ * console.log(contextObject);
+ * // Prints: { globalVar: 1024 }
+ * ```
+ * @since v0.3.1
+ * @param code The JavaScript code to compile and run.
+ * @param contextifiedObject The `contextified` object that will be used as the `global` when the `code` is compiled and run.
+ * @return the result of the very last statement executed in the script.
+ */
+ function runInContext(code: string, contextifiedObject: Context, options?: RunningCodeOptions | string): any;
+ /**
+ * The `vm.runInNewContext()` first contextifies the given `contextObject` (or
+ * creates a new `contextObject` if passed as `undefined`), compiles the `code`,
+ * runs it within the created context, then returns the result. Running code
+ * does not have access to the local scope.
+ *
+ * If `options` is a string, then it specifies the filename.
+ *
+ * The following example compiles and executes code that increments a global
+ * variable and sets a new one. These globals are contained in the `contextObject`.
+ *
+ * ```js
+ * const vm = require('node:vm');
+ *
+ * const contextObject = {
+ * animal: 'cat',
+ * count: 2,
+ * };
+ *
+ * vm.runInNewContext('count += 1; name = "kitty"', contextObject);
+ * console.log(contextObject);
+ * // Prints: { animal: 'cat', count: 3, name: 'kitty' }
+ * ```
+ * @since v0.3.1
+ * @param code The JavaScript code to compile and run.
+ * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
+ * @return the result of the very last statement executed in the script.
+ */
+ function runInNewContext(code: string, contextObject?: Context, options?: RunningCodeInNewContextOptions | string): any;
+ /**
+ * `vm.runInThisContext()` compiles `code`, runs it within the context of the
+ * current `global` and returns the result. Running code does not have access to
+ * local scope, but does have access to the current `global` object.
+ *
+ * If `options` is a string, then it specifies the filename.
+ *
+ * The following example illustrates using both `vm.runInThisContext()` and
+ * the JavaScript [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) function to run the same code:
+ *
+ * ```js
+ * const vm = require('node:vm');
+ * let localVar = 'initial value';
+ *
+ * const vmResult = vm.runInThisContext('localVar = "vm";');
+ * console.log(`vmResult: '${vmResult}', localVar: '${localVar}'`);
+ * // Prints: vmResult: 'vm', localVar: 'initial value'
+ *
+ * const evalResult = eval('localVar = "eval";');
+ * console.log(`evalResult: '${evalResult}', localVar: '${localVar}'`);
+ * // Prints: evalResult: 'eval', localVar: 'eval'
+ * ```
+ *
+ * Because `vm.runInThisContext()` does not have access to the local scope,`localVar` is unchanged. In contrast,
+ * [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) _does_ have access to the
+ * local scope, so the value `localVar` is changed. In this way`vm.runInThisContext()` is much like an [indirect `eval()` call](https://es5.github.io/#x10.4.2), e.g.`(0,eval)('code')`.
+ *
+ * ## Example: Running an HTTP server within a VM
+ *
+ * When using either `script.runInThisContext()` or {@link runInThisContext}, the code is executed within the current V8 global
+ * context. The code passed to this VM context will have its own isolated scope.
+ *
+ * In order to run a simple web server using the `node:http` module the code passed
+ * to the context must either call `require('node:http')` on its own, or have a
+ * reference to the `node:http` module passed to it. For instance:
+ *
+ * ```js
+ * 'use strict';
+ * const vm = require('node:vm');
+ *
+ * const code = `
+ * ((require) => {
+ * const http = require('node:http');
+ *
+ * http.createServer((request, response) => {
+ * response.writeHead(200, { 'Content-Type': 'text/plain' });
+ * response.end('Hello World\\n');
+ * }).listen(8124);
+ *
+ * console.log('Server running at http://127.0.0.1:8124/');
+ * })`;
+ *
+ * vm.runInThisContext(code)(require);
+ * ```
+ *
+ * The `require()` in the above case shares the state with the context it is
+ * passed from. This may introduce risks when untrusted code is executed, e.g.
+ * altering objects in the context in unwanted ways.
+ * @since v0.3.1
+ * @param code The JavaScript code to compile and run.
+ * @return the result of the very last statement executed in the script.
+ */
+ function runInThisContext(code: string, options?: RunningCodeOptions | string): any;
+ /**
+ * Compiles the given code into the provided context (if no context is
+ * supplied, the current context is used), and returns it wrapped inside a
+ * function with the given `params`.
+ * @since v10.10.0
+ * @param code The body of the function to compile.
+ * @param params An array of strings containing all parameters for the function.
+ */
+ function compileFunction(
+ code: string,
+ params?: ReadonlyArray<string>,
+ options?: CompileFunctionOptions
+ ): Function & {
+ cachedData?: Script['cachedData'] | undefined;
+ cachedDataProduced?: Script['cachedDataProduced'] | undefined;
+ cachedDataRejected?: Script['cachedDataRejected'] | undefined;
+ };
+ /**
+ * Measure the memory known to V8 and used by all contexts known to the
+ * current V8 isolate, or the main context.
+ *
+ * The format of the object that the returned Promise may resolve with is
+ * specific to the V8 engine and may change from one version of V8 to the next.
+ *
+ * The returned result is different from the statistics returned by`v8.getHeapSpaceStatistics()` in that `vm.measureMemory()` measure the
+ * memory reachable by each V8 specific contexts in the current instance of
+ * the V8 engine, while the result of `v8.getHeapSpaceStatistics()` measure
+ * the memory occupied by each heap space in the current V8 instance.
+ *
+ * ```js
+ * const vm = require('node:vm');
+ * // Measure the memory used by the main context.
+ * vm.measureMemory({ mode: 'summary' })
+ * // This is the same as vm.measureMemory()
+ * .then((result) => {
+ * // The current format is:
+ * // {
+ * // total: {
+ * // jsMemoryEstimate: 2418479, jsMemoryRange: [ 2418479, 2745799 ]
+ * // }
+ * // }
+ * console.log(result);
+ * });
+ *
+ * const context = vm.createContext({ a: 1 });
+ * vm.measureMemory({ mode: 'detailed', execution: 'eager' })
+ * .then((result) => {
+ * // Reference the context here so that it won't be GC'ed
+ * // until the measurement is complete.
+ * console.log(context.a);
+ * // {
+ * // total: {
+ * // jsMemoryEstimate: 2574732,
+ * // jsMemoryRange: [ 2574732, 2904372 ]
+ * // },
+ * // current: {
+ * // jsMemoryEstimate: 2438996,
+ * // jsMemoryRange: [ 2438996, 2768636 ]
+ * // },
+ * // other: [
+ * // {
+ * // jsMemoryEstimate: 135736,
+ * // jsMemoryRange: [ 135736, 465376 ]
+ * // }
+ * // ]
+ * // }
+ * console.log(result);
+ * });
+ * ```
+ * @since v13.10.0
+ * @experimental
+ */
+ function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
+ interface ModuleEvaluateOptions {
+ timeout?: RunningScriptOptions['timeout'] | undefined;
+ breakOnSigint?: RunningScriptOptions['breakOnSigint'] | undefined;
+ }
+ type ModuleLinker = (
+ specifier: string,
+ referencingModule: Module,
+ extra: {
+ assert: Object;
+ }
+ ) => Module | Promise<Module>;
+ type ModuleStatus = 'unlinked' | 'linking' | 'linked' | 'evaluating' | 'evaluated' | 'errored';
+ /**
+ * This feature is only available with the `--experimental-vm-modules` command
+ * flag enabled.
+ *
+ * The `vm.Module` class provides a low-level interface for using
+ * ECMAScript modules in VM contexts. It is the counterpart of the `vm.Script`class that closely mirrors [Module Record](https://www.ecma-international.org/ecma-262/#sec-abstract-module-records)
+ * s as defined in the ECMAScript
+ * specification.
+ *
+ * Unlike `vm.Script` however, every `vm.Module` object is bound to a context from
+ * its creation. Operations on `vm.Module` objects are intrinsically asynchronous,
+ * in contrast with the synchronous nature of `vm.Script` objects. The use of
+ * 'async' functions can help with manipulating `vm.Module` objects.
+ *
+ * Using a `vm.Module` object requires three distinct steps: creation/parsing,
+ * linking, and evaluation. These three steps are illustrated in the following
+ * example.
+ *
+ * This implementation lies at a lower level than the `ECMAScript Module
+ * loader`. There is also no way to interact with the Loader yet, though
+ * support is planned.
+ *
+ * ```js
+ * import vm from 'node:vm';
+ *
+ * const contextifiedObject = vm.createContext({
+ * secret: 42,
+ * print: console.log,
+ * });
+ *
+ * // Step 1
+ * //
+ * // Create a Module by constructing a new `vm.SourceTextModule` object. This
+ * // parses the provided source text, throwing a `SyntaxError` if anything goes
+ * // wrong. By default, a Module is created in the top context. But here, we
+ * // specify `contextifiedObject` as the context this Module belongs to.
+ * //
+ * // Here, we attempt to obtain the default export from the module "foo", and
+ * // put it into local binding "secret".
+ *
+ * const bar = new vm.SourceTextModule(`
+ * import s from 'foo';
+ * s;
+ * print(s);
+ * `, { context: contextifiedObject });
+ *
+ * // Step 2
+ * //
+ * // "Link" the imported dependencies of this Module to it.
+ * //
+ * // The provided linking callback (the "linker") accepts two arguments: the
+ * // parent module (`bar` in this case) and the string that is the specifier of
+ * // the imported module. The callback is expected to return a Module that
+ * // corresponds to the provided specifier, with certain requirements documented
+ * // in `module.link()`.
+ * //
+ * // If linking has not started for the returned Module, the same linker
+ * // callback will be called on the returned Module.
+ * //
+ * // Even top-level Modules without dependencies must be explicitly linked. The
+ * // callback provided would never be called, however.
+ * //
+ * // The link() method returns a Promise that will be resolved when all the
+ * // Promises returned by the linker resolve.
+ * //
+ * // Note: This is a contrived example in that the linker function creates a new
+ * // "foo" module every time it is called. In a full-fledged module system, a
+ * // cache would probably be used to avoid duplicated modules.
+ *
+ * async function linker(specifier, referencingModule) {
+ * if (specifier === 'foo') {
+ * return new vm.SourceTextModule(`
+ * // The "secret" variable refers to the global variable we added to
+ * // "contextifiedObject" when creating the context.
+ * export default secret;
+ * `, { context: referencingModule.context });
+ *
+ * // Using `contextifiedObject` instead of `referencingModule.context`
+ * // here would work as well.
+ * }
+ * throw new Error(`Unable to resolve dependency: ${specifier}`);
+ * }
+ * await bar.link(linker);
+ *
+ * // Step 3
+ * //
+ * // Evaluate the Module. The evaluate() method returns a promise which will
+ * // resolve after the module has finished evaluating.
+ *
+ * // Prints 42.
+ * await bar.evaluate();
+ * ```
+ * @since v13.0.0, v12.16.0
+ * @experimental
+ */
+ class Module {
+ /**
+ * The specifiers of all dependencies of this module. The returned array is frozen
+ * to disallow any changes to it.
+ *
+ * Corresponds to the `[[RequestedModules]]` field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in
+ * the ECMAScript specification.
+ */
+ dependencySpecifiers: readonly string[];
+ /**
+ * If the `module.status` is `'errored'`, this property contains the exception
+ * thrown by the module during evaluation. If the status is anything else,
+ * accessing this property will result in a thrown exception.
+ *
+ * The value `undefined` cannot be used for cases where there is not a thrown
+ * exception due to possible ambiguity with `throw undefined;`.
+ *
+ * Corresponds to the `[[EvaluationError]]` field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s
+ * in the ECMAScript specification.
+ */
+ error: any;
+ /**
+ * The identifier of the current module, as set in the constructor.
+ */
+ identifier: string;
+ context: Context;
+ /**
+ * The namespace object of the module. This is only available after linking
+ * (`module.link()`) has completed.
+ *
+ * Corresponds to the [GetModuleNamespace](https://tc39.es/ecma262/#sec-getmodulenamespace) abstract operation in the ECMAScript
+ * specification.
+ */
+ namespace: Object;
+ /**
+ * The current status of the module. Will be one of:
+ *
+ * * `'unlinked'`: `module.link()` has not yet been called.
+ * * `'linking'`: `module.link()` has been called, but not all Promises returned
+ * by the linker function have been resolved yet.
+ * * `'linked'`: The module has been linked successfully, and all of its
+ * dependencies are linked, but `module.evaluate()` has not yet been called.
+ * * `'evaluating'`: The module is being evaluated through a `module.evaluate()` on
+ * itself or a parent module.
+ * * `'evaluated'`: The module has been successfully evaluated.
+ * * `'errored'`: The module has been evaluated, but an exception was thrown.
+ *
+ * Other than `'errored'`, this status string corresponds to the specification's [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records)'s `[[Status]]` field. `'errored'`
+ * corresponds to`'evaluated'` in the specification, but with `[[EvaluationError]]` set to a
+ * value that is not `undefined`.
+ */
+ status: ModuleStatus;
+ /**
+ * Evaluate the module.
+ *
+ * This must be called after the module has been linked; otherwise it will reject.
+ * It could be called also when the module has already been evaluated, in which
+ * case it will either do nothing if the initial evaluation ended in success
+ * (`module.status` is `'evaluated'`) or it will re-throw the exception that the
+ * initial evaluation resulted in (`module.status` is `'errored'`).
+ *
+ * This method cannot be called while the module is being evaluated
+ * (`module.status` is `'evaluating'`).
+ *
+ * Corresponds to the [Evaluate() concrete method](https://tc39.es/ecma262/#sec-moduleevaluation) field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in the
+ * ECMAScript specification.
+ * @return Fulfills with `undefined` upon success.
+ */
+ evaluate(options?: ModuleEvaluateOptions): Promise<void>;
+ /**
+ * Link module dependencies. This method must be called before evaluation, and
+ * can only be called once per module.
+ *
+ * The function is expected to return a `Module` object or a `Promise` that
+ * eventually resolves to a `Module` object. The returned `Module` must satisfy the
+ * following two invariants:
+ *
+ * * It must belong to the same context as the parent `Module`.
+ * * Its `status` must not be `'errored'`.
+ *
+ * If the returned `Module`'s `status` is `'unlinked'`, this method will be
+ * recursively called on the returned `Module` with the same provided `linker`function.
+ *
+ * `link()` returns a `Promise` that will either get resolved when all linking
+ * instances resolve to a valid `Module`, or rejected if the linker function either
+ * throws an exception or returns an invalid `Module`.
+ *
+ * The linker function roughly corresponds to the implementation-defined [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) abstract operation in the
+ * ECMAScript
+ * specification, with a few key differences:
+ *
+ * * The linker function is allowed to be asynchronous while [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) is synchronous.
+ *
+ * The actual [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) implementation used during module
+ * linking is one that returns the modules linked during linking. Since at
+ * that point all modules would have been fully linked already, the [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) implementation is fully synchronous per
+ * specification.
+ *
+ * Corresponds to the [Link() concrete method](https://tc39.es/ecma262/#sec-moduledeclarationlinking) field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in
+ * the ECMAScript specification.
+ */
+ link(linker: ModuleLinker): Promise<void>;
+ }
+ interface SourceTextModuleOptions {
+ /**
+ * String used in stack traces.
+ * @default 'vm:module(i)' where i is a context-specific ascending index.
+ */
+ identifier?: string | undefined;
+ cachedData?: ScriptOptions['cachedData'] | undefined;
+ context?: Context | undefined;
+ lineOffset?: BaseOptions['lineOffset'] | undefined;
+ columnOffset?: BaseOptions['columnOffset'] | undefined;
+ /**
+ * Called during evaluation of this module to initialize the `import.meta`.
+ */
+ initializeImportMeta?: ((meta: ImportMeta, module: SourceTextModule) => void) | undefined;
+ importModuleDynamically?: ScriptOptions['importModuleDynamically'] | undefined;
+ }
+ /**
+ * This feature is only available with the `--experimental-vm-modules` command
+ * flag enabled.
+ *
+ *
+ *
+ * The `vm.SourceTextModule` class provides the [Source Text Module Record](https://tc39.es/ecma262/#sec-source-text-module-records) as
+ * defined in the ECMAScript specification.
+ * @since v9.6.0
+ * @experimental
+ */
+ class SourceTextModule extends Module {
+ /**
+ * Creates a new `SourceTextModule` instance.
+ * @param code JavaScript Module code to parse
+ */
+ constructor(code: string, options?: SourceTextModuleOptions);
+ }
+ interface SyntheticModuleOptions {
+ /**
+ * String used in stack traces.
+ * @default 'vm:module(i)' where i is a context-specific ascending index.
+ */
+ identifier?: string | undefined;
+ /**
+ * The contextified object as returned by the `vm.createContext()` method, to compile and evaluate this module in.
+ */
+ context?: Context | undefined;
+ }
+ /**
+ * This feature is only available with the `--experimental-vm-modules` command
+ * flag enabled.
+ *
+ *
+ *
+ * The `vm.SyntheticModule` class provides the [Synthetic Module Record](https://heycam.github.io/webidl/#synthetic-module-records) as
+ * defined in the WebIDL specification. The purpose of synthetic modules is to
+ * provide a generic interface for exposing non-JavaScript sources to ECMAScript
+ * module graphs.
+ *
+ * ```js
+ * const vm = require('node:vm');
+ *
+ * const source = '{ "a": 1 }';
+ * const module = new vm.SyntheticModule(['default'], function() {
+ * const obj = JSON.parse(source);
+ * this.setExport('default', obj);
+ * });
+ *
+ * // Use `module` in linking...
+ * ```
+ * @since v13.0.0, v12.16.0
+ * @experimental
+ */
+ class SyntheticModule extends Module {
+ /**
+ * Creates a new `SyntheticModule` instance.
+ * @param exportNames Array of names that will be exported from the module.
+ * @param evaluateCallback Called when the module is evaluated.
+ */
+ constructor(exportNames: string[], evaluateCallback: (this: SyntheticModule) => void, options?: SyntheticModuleOptions);
+ /**
+ * This method is used after the module is linked to set the values of exports. If
+ * it is called before the module is linked, an `ERR_VM_MODULE_STATUS` error
+ * will be thrown.
+ *
+ * ```js
+ * import vm from 'node:vm';
+ *
+ * const m = new vm.SyntheticModule(['x'], () => {
+ * m.setExport('x', 1);
+ * });
+ *
+ * await m.link(() => {});
+ * await m.evaluate();
+ *
+ * assert.strictEqual(m.namespace.x, 1);
+ * ```
+ * @since v13.0.0, v12.16.0
+ * @param name Name of the export to set.
+ * @param value The value to set the export to.
+ */
+ setExport(name: string, value: any): void;
+ }
+}
+declare module 'node:vm' {
+ export * from 'vm';
+}
diff --git a/node_modules/@types/node/wasi.d.ts b/node_modules/@types/node/wasi.d.ts
new file mode 100755
index 0000000..b430b3a
--- /dev/null
+++ b/node_modules/@types/node/wasi.d.ts
@@ -0,0 +1,152 @@
+/**
+ * The WASI API provides an implementation of the [WebAssembly System Interface](https://wasi.dev/) specification. WASI gives sandboxed WebAssembly applications access to the
+ * underlying operating system via a collection of POSIX-like functions.
+ *
+ * ```js
+ * import { readFile } from 'node:fs/promises';
+ * import { WASI } from 'wasi';
+ * import { argv, env } from 'node:process';
+ *
+ * const wasi = new WASI({
+ * version: 'preview1',
+ * args: argv,
+ * env,
+ * preopens: {
+ * '/sandbox': '/some/real/path/that/wasm/can/access',
+ * },
+ * });
+ *
+ * const wasm = await WebAssembly.compile(
+ * await readFile(new URL('./demo.wasm', import.meta.url)),
+ * );
+ * const instance = await WebAssembly.instantiate(wasm, wasi.getImportObject());
+ *
+ * wasi.start(instance);
+ * ```
+ *
+ * To run the above example, create a new WebAssembly text format file named`demo.wat`:
+ *
+ * ```text
+ * (module
+ * ;; Import the required fd_write WASI function which will write the given io vectors to stdout
+ * ;; The function signature for fd_write is:
+ * ;; (File Descriptor, *iovs, iovs_len, nwritten) -> Returns number of bytes written
+ * (import "wasi_snapshot_preview1" "fd_write" (func $fd_write (param i32 i32 i32 i32) (result i32)))
+ *
+ * (memory 1)
+ * (export "memory" (memory 0))
+ *
+ * ;; Write 'hello world\n' to memory at an offset of 8 bytes
+ * ;; Note the trailing newline which is required for the text to appear
+ * (data (i32.const 8) "hello world\n")
+ *
+ * (func $main (export "_start")
+ * ;; Creating a new io vector within linear memory
+ * (i32.store (i32.const 0) (i32.const 8)) ;; iov.iov_base - This is a pointer to the start of the 'hello world\n' string
+ * (i32.store (i32.const 4) (i32.const 12)) ;; iov.iov_len - The length of the 'hello world\n' string
+ *
+ * (call $fd_write
+ * (i32.const 1) ;; file_descriptor - 1 for stdout
+ * (i32.const 0) ;; *iovs - The pointer to the iov array, which is stored at memory location 0
+ * (i32.const 1) ;; iovs_len - We're printing 1 string stored in an iov - so one.
+ * (i32.const 20) ;; nwritten - A place in memory to store the number of bytes written
+ * )
+ * drop ;; Discard the number of bytes written from the top of the stack
+ * )
+ * )
+ * ```
+ *
+ * Use [wabt](https://github.com/WebAssembly/wabt) to compile `.wat` to `.wasm`
+ *
+ * ```bash
+ * wat2wasm demo.wat
+ * ```
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/wasi.js)
+ */
+declare module 'wasi' {
+ interface WASIOptions {
+ /**
+ * An array of strings that the WebAssembly application will
+ * see as command line arguments. The first argument is the virtual path to the
+ * WASI command itself.
+ */
+ args?: string[] | undefined;
+ /**
+ * An object similar to `process.env` that the WebAssembly
+ * application will see as its environment.
+ */
+ env?: object | undefined;
+ /**
+ * This object represents the WebAssembly application's
+ * sandbox directory structure. The string keys of `preopens` are treated as
+ * directories within the sandbox. The corresponding values in `preopens` are
+ * the real paths to those directories on the host machine.
+ */
+ preopens?: NodeJS.Dict<string> | undefined;
+ /**
+ * By default, when WASI applications call `__wasi_proc_exit()`
+ * `wasi.start()` will return with the exit code specified rather than terminatng the process.
+ * Setting this option to `false` will cause the Node.js process to exit with
+ * the specified exit code instead.
+ * @default true
+ */
+ returnOnExit?: boolean | undefined;
+ /**
+ * The file descriptor used as standard input in the WebAssembly application.
+ * @default 0
+ */
+ stdin?: number | undefined;
+ /**
+ * The file descriptor used as standard output in the WebAssembly application.
+ * @default 1
+ */
+ stdout?: number | undefined;
+ /**
+ * The file descriptor used as standard error in the WebAssembly application.
+ * @default 2
+ */
+ stderr?: number | undefined;
+ }
+ /**
+ * The `WASI` class provides the WASI system call API and additional convenience
+ * methods for working with WASI-based applications. Each `WASI` instance
+ * represents a distinct sandbox environment. For security purposes, each `WASI`instance must have its command-line arguments, environment variables, and
+ * sandbox directory structure configured explicitly.
+ * @since v13.3.0, v12.16.0
+ */
+ class WASI {
+ constructor(options?: WASIOptions);
+ /**
+ * Attempt to begin execution of `instance` as a WASI command by invoking its`_start()` export. If `instance` does not contain a `_start()` export, or if`instance` contains an `_initialize()`
+ * export, then an exception is thrown.
+ *
+ * `start()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named`memory`. If
+ * `instance` does not have a `memory` export an exception is thrown.
+ *
+ * If `start()` is called more than once, an exception is thrown.
+ * @since v13.3.0, v12.16.0
+ */
+ start(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
+ /**
+ * Attempt to initialize `instance` as a WASI reactor by invoking its`_initialize()` export, if it is present. If `instance` contains a `_start()`export, then an exception is thrown.
+ *
+ * `initialize()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named`memory`.
+ * If `instance` does not have a `memory` export an exception is thrown.
+ *
+ * If `initialize()` is called more than once, an exception is thrown.
+ * @since v14.6.0, v12.19.0
+ */
+ initialize(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
+ /**
+ * `wasiImport` is an object that implements the WASI system call API. This object
+ * should be passed as the `wasi_snapshot_preview1` import during the instantiation
+ * of a [`WebAssembly.Instance`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance).
+ * @since v13.3.0, v12.16.0
+ */
+ readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
+ }
+}
+declare module 'node:wasi' {
+ export * from 'wasi';
+}
diff --git a/node_modules/@types/node/worker_threads.d.ts b/node_modules/@types/node/worker_threads.d.ts
new file mode 100755
index 0000000..e11932e
--- /dev/null
+++ b/node_modules/@types/node/worker_threads.d.ts
@@ -0,0 +1,693 @@
+/**
+ * The `node:worker_threads` module enables the use of threads that execute
+ * JavaScript in parallel. To access it:
+ *
+ * ```js
+ * const worker = require('node:worker_threads');
+ * ```
+ *
+ * Workers (threads) are useful for performing CPU-intensive JavaScript operations.
+ * They do not help much with I/O-intensive work. The Node.js built-in
+ * asynchronous I/O operations are more efficient than Workers can be.
+ *
+ * Unlike `child_process` or `cluster`, `worker_threads` can share memory. They do
+ * so by transferring `ArrayBuffer` instances or sharing `SharedArrayBuffer`instances.
+ *
+ * ```js
+ * const {
+ * Worker, isMainThread, parentPort, workerData,
+ * } = require('node:worker_threads');
+ *
+ * if (isMainThread) {
+ * module.exports = function parseJSAsync(script) {
+ * return new Promise((resolve, reject) => {
+ * const worker = new Worker(__filename, {
+ * workerData: script,
+ * });
+ * worker.on('message', resolve);
+ * worker.on('error', reject);
+ * worker.on('exit', (code) => {
+ * if (code !== 0)
+ * reject(new Error(`Worker stopped with exit code ${code}`));
+ * });
+ * });
+ * };
+ * } else {
+ * const { parse } = require('some-js-parsing-library');
+ * const script = workerData;
+ * parentPort.postMessage(parse(script));
+ * }
+ * ```
+ *
+ * The above example spawns a Worker thread for each `parseJSAsync()` call. In
+ * practice, use a pool of Workers for these kinds of tasks. Otherwise, the
+ * overhead of creating Workers would likely exceed their benefit.
+ *
+ * When implementing a worker pool, use the `AsyncResource` API to inform
+ * diagnostic tools (e.g. to provide asynchronous stack traces) about the
+ * correlation between tasks and their outcomes. See `"Using AsyncResource for a Worker thread pool"` in the `async_hooks` documentation for an example implementation.
+ *
+ * Worker threads inherit non-process-specific options by default. Refer to `Worker constructor options` to know how to customize worker thread options,
+ * specifically `argv` and `execArgv` options.
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/worker_threads.js)
+ */
+declare module 'worker_threads' {
+ import { Blob } from 'node:buffer';
+ import { Context } from 'node:vm';
+ import { EventEmitter } from 'node:events';
+ import { EventLoopUtilityFunction } from 'node:perf_hooks';
+ import { FileHandle } from 'node:fs/promises';
+ import { Readable, Writable } from 'node:stream';
+ import { URL } from 'node:url';
+ import { X509Certificate } from 'node:crypto';
+ const isMainThread: boolean;
+ const parentPort: null | MessagePort;
+ const resourceLimits: ResourceLimits;
+ const SHARE_ENV: unique symbol;
+ const threadId: number;
+ const workerData: any;
+ /**
+ * Instances of the `worker.MessageChannel` class represent an asynchronous,
+ * two-way communications channel.
+ * The `MessageChannel` has no methods of its own. `new MessageChannel()`yields an object with `port1` and `port2` properties, which refer to linked `MessagePort` instances.
+ *
+ * ```js
+ * const { MessageChannel } = require('node:worker_threads');
+ *
+ * const { port1, port2 } = new MessageChannel();
+ * port1.on('message', (message) => console.log('received', message));
+ * port2.postMessage({ foo: 'bar' });
+ * // Prints: received { foo: 'bar' } from the `port1.on('message')` listener
+ * ```
+ * @since v10.5.0
+ */
+ class MessageChannel {
+ readonly port1: MessagePort;
+ readonly port2: MessagePort;
+ }
+ interface WorkerPerformance {
+ eventLoopUtilization: EventLoopUtilityFunction;
+ }
+ type TransferListItem = ArrayBuffer | MessagePort | FileHandle | X509Certificate | Blob;
+ /**
+ * Instances of the `worker.MessagePort` class represent one end of an
+ * asynchronous, two-way communications channel. It can be used to transfer
+ * structured data, memory regions and other `MessagePort`s between different `Worker` s.
+ *
+ * This implementation matches [browser `MessagePort`](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort) s.
+ * @since v10.5.0
+ */
+ class MessagePort extends EventEmitter {
+ /**
+ * Disables further sending of messages on either side of the connection.
+ * This method can be called when no further communication will happen over this`MessagePort`.
+ *
+ * The `'close' event` is emitted on both `MessagePort` instances that
+ * are part of the channel.
+ * @since v10.5.0
+ */
+ close(): void;
+ /**
+ * Sends a JavaScript value to the receiving side of this channel.`value` is transferred in a way which is compatible with
+ * the [HTML structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm).
+ *
+ * In particular, the significant differences to `JSON` are:
+ *
+ * * `value` may contain circular references.
+ * * `value` may contain instances of builtin JS types such as `RegExp`s,`BigInt`s, `Map`s, `Set`s, etc.
+ * * `value` may contain typed arrays, both using `ArrayBuffer`s
+ * and `SharedArrayBuffer`s.
+ * * `value` may contain [`WebAssembly.Module`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module) instances.
+ * * `value` may not contain native (C++-backed) objects other than:
+ *
+ * ```js
+ * const { MessageChannel } = require('node:worker_threads');
+ * const { port1, port2 } = new MessageChannel();
+ *
+ * port1.on('message', (message) => console.log(message));
+ *
+ * const circularData = {};
+ * circularData.foo = circularData;
+ * // Prints: { foo: [Circular] }
+ * port2.postMessage(circularData);
+ * ```
+ *
+ * `transferList` may be a list of [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer), `MessagePort`, and `FileHandle` objects.
+ * After transferring, they are not usable on the sending side of the channel
+ * anymore (even if they are not contained in `value`). Unlike with `child processes`, transferring handles such as network sockets is currently
+ * not supported.
+ *
+ * If `value` contains [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances, those are accessible
+ * from either thread. They cannot be listed in `transferList`.
+ *
+ * `value` may still contain `ArrayBuffer` instances that are not in`transferList`; in that case, the underlying memory is copied rather than moved.
+ *
+ * ```js
+ * const { MessageChannel } = require('node:worker_threads');
+ * const { port1, port2 } = new MessageChannel();
+ *
+ * port1.on('message', (message) => console.log(message));
+ *
+ * const uint8Array = new Uint8Array([ 1, 2, 3, 4 ]);
+ * // This posts a copy of `uint8Array`:
+ * port2.postMessage(uint8Array);
+ * // This does not copy data, but renders `uint8Array` unusable:
+ * port2.postMessage(uint8Array, [ uint8Array.buffer ]);
+ *
+ * // The memory for the `sharedUint8Array` is accessible from both the
+ * // original and the copy received by `.on('message')`:
+ * const sharedUint8Array = new Uint8Array(new SharedArrayBuffer(4));
+ * port2.postMessage(sharedUint8Array);
+ *
+ * // This transfers a freshly created message port to the receiver.
+ * // This can be used, for example, to create communication channels between
+ * // multiple `Worker` threads that are children of the same parent thread.
+ * const otherChannel = new MessageChannel();
+ * port2.postMessage({ port: otherChannel.port1 }, [ otherChannel.port1 ]);
+ * ```
+ *
+ * The message object is cloned immediately, and can be modified after
+ * posting without having side effects.
+ *
+ * For more information on the serialization and deserialization mechanisms
+ * behind this API, see the `serialization API of the node:v8 module`.
+ * @since v10.5.0
+ */
+ postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
+ /**
+ * Opposite of `unref()`. Calling `ref()` on a previously `unref()`ed port does _not_ let the program exit if it's the only active handle left (the default
+ * behavior). If the port is `ref()`ed, calling `ref()` again has no effect.
+ *
+ * If listeners are attached or removed using `.on('message')`, the port
+ * is `ref()`ed and `unref()`ed automatically depending on whether
+ * listeners for the event exist.
+ * @since v10.5.0
+ */
+ ref(): void;
+ /**
+ * Calling `unref()` on a port allows the thread to exit if this is the only
+ * active handle in the event system. If the port is already `unref()`ed calling`unref()` again has no effect.
+ *
+ * If listeners are attached or removed using `.on('message')`, the port is`ref()`ed and `unref()`ed automatically depending on whether
+ * listeners for the event exist.
+ * @since v10.5.0
+ */
+ unref(): void;
+ /**
+ * Starts receiving messages on this `MessagePort`. When using this port
+ * as an event emitter, this is called automatically once `'message'`listeners are attached.
+ *
+ * This method exists for parity with the Web `MessagePort` API. In Node.js,
+ * it is only useful for ignoring messages when no event listener is present.
+ * Node.js also diverges in its handling of `.onmessage`. Setting it
+ * automatically calls `.start()`, but unsetting it lets messages queue up
+ * until a new handler is set or the port is discarded.
+ * @since v10.5.0
+ */
+ start(): void;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'message', listener: (value: any) => void): this;
+ addListener(event: 'messageerror', listener: (error: Error) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'message', value: any): boolean;
+ emit(event: 'messageerror', error: Error): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'message', listener: (value: any) => void): this;
+ on(event: 'messageerror', listener: (error: Error) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'message', listener: (value: any) => void): this;
+ once(event: 'messageerror', listener: (error: Error) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'message', listener: (value: any) => void): this;
+ prependListener(event: 'messageerror', listener: (error: Error) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'message', listener: (value: any) => void): this;
+ prependOnceListener(event: 'messageerror', listener: (error: Error) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'close', listener: () => void): this;
+ removeListener(event: 'message', listener: (value: any) => void): this;
+ removeListener(event: 'messageerror', listener: (error: Error) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ off(event: 'close', listener: () => void): this;
+ off(event: 'message', listener: (value: any) => void): this;
+ off(event: 'messageerror', listener: (error: Error) => void): this;
+ off(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ interface WorkerOptions {
+ /**
+ * List of arguments which would be stringified and appended to
+ * `process.argv` in the worker. This is mostly similar to the `workerData`
+ * but the values will be available on the global `process.argv` as if they
+ * were passed as CLI options to the script.
+ */
+ argv?: any[] | undefined;
+ env?: NodeJS.Dict<string> | typeof SHARE_ENV | undefined;
+ eval?: boolean | undefined;
+ workerData?: any;
+ stdin?: boolean | undefined;
+ stdout?: boolean | undefined;
+ stderr?: boolean | undefined;
+ execArgv?: string[] | undefined;
+ resourceLimits?: ResourceLimits | undefined;
+ /**
+ * Additional data to send in the first worker message.
+ */
+ transferList?: TransferListItem[] | undefined;
+ /**
+ * @default true
+ */
+ trackUnmanagedFds?: boolean | undefined;
+ /**
+ * An optional `name` to be appended to the worker title
+ * for debuggin/identification purposes, making the final title as
+ * `[worker ${id}] ${name}`.
+ */
+ name?: string | undefined;
+ }
+ interface ResourceLimits {
+ /**
+ * The maximum size of a heap space for recently created objects.
+ */
+ maxYoungGenerationSizeMb?: number | undefined;
+ /**
+ * The maximum size of the main heap in MB.
+ */
+ maxOldGenerationSizeMb?: number | undefined;
+ /**
+ * The size of a pre-allocated memory range used for generated code.
+ */
+ codeRangeSizeMb?: number | undefined;
+ /**
+ * The default maximum stack size for the thread. Small values may lead to unusable Worker instances.
+ * @default 4
+ */
+ stackSizeMb?: number | undefined;
+ }
+ /**
+ * The `Worker` class represents an independent JavaScript execution thread.
+ * Most Node.js APIs are available inside of it.
+ *
+ * Notable differences inside a Worker environment are:
+ *
+ * * The `process.stdin`, `process.stdout`, and `process.stderr` streams may be redirected by the parent thread.
+ * * The `require('node:worker_threads').isMainThread` property is set to `false`.
+ * * The `require('node:worker_threads').parentPort` message port is available.
+ * * `process.exit()` does not stop the whole program, just the single thread,
+ * and `process.abort()` is not available.
+ * * `process.chdir()` and `process` methods that set group or user ids
+ * are not available.
+ * * `process.env` is a copy of the parent thread's environment variables,
+ * unless otherwise specified. Changes to one copy are not visible in other
+ * threads, and are not visible to native add-ons (unless `worker.SHARE_ENV` is passed as the `env` option to the `Worker` constructor).
+ * * `process.title` cannot be modified.
+ * * Signals are not delivered through `process.on('...')`.
+ * * Execution may stop at any point as a result of `worker.terminate()` being invoked.
+ * * IPC channels from parent processes are not accessible.
+ * * The `trace_events` module is not supported.
+ * * Native add-ons can only be loaded from multiple threads if they fulfill `certain conditions`.
+ *
+ * Creating `Worker` instances inside of other `Worker`s is possible.
+ *
+ * Like [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) and the `node:cluster module`, two-way communication
+ * can be achieved through inter-thread message passing. Internally, a `Worker` has
+ * a built-in pair of `MessagePort` s that are already associated with each
+ * other when the `Worker` is created. While the `MessagePort` object on the parent
+ * side is not directly exposed, its functionalities are exposed through `worker.postMessage()` and the `worker.on('message')` event
+ * on the `Worker` object for the parent thread.
+ *
+ * To create custom messaging channels (which is encouraged over using the default
+ * global channel because it facilitates separation of concerns), users can create
+ * a `MessageChannel` object on either thread and pass one of the`MessagePort`s on that `MessageChannel` to the other thread through a
+ * pre-existing channel, such as the global one.
+ *
+ * See `port.postMessage()` for more information on how messages are passed,
+ * and what kind of JavaScript values can be successfully transported through
+ * the thread barrier.
+ *
+ * ```js
+ * const assert = require('node:assert');
+ * const {
+ * Worker, MessageChannel, MessagePort, isMainThread, parentPort,
+ * } = require('node:worker_threads');
+ * if (isMainThread) {
+ * const worker = new Worker(__filename);
+ * const subChannel = new MessageChannel();
+ * worker.postMessage({ hereIsYourPort: subChannel.port1 }, [subChannel.port1]);
+ * subChannel.port2.on('message', (value) => {
+ * console.log('received:', value);
+ * });
+ * } else {
+ * parentPort.once('message', (value) => {
+ * assert(value.hereIsYourPort instanceof MessagePort);
+ * value.hereIsYourPort.postMessage('the worker is sending this');
+ * value.hereIsYourPort.close();
+ * });
+ * }
+ * ```
+ * @since v10.5.0
+ */
+ class Worker extends EventEmitter {
+ /**
+ * If `stdin: true` was passed to the `Worker` constructor, this is a
+ * writable stream. The data written to this stream will be made available in
+ * the worker thread as `process.stdin`.
+ * @since v10.5.0
+ */
+ readonly stdin: Writable | null;
+ /**
+ * This is a readable stream which contains data written to `process.stdout` inside the worker thread. If `stdout: true` was not passed to the `Worker` constructor, then data is piped to the
+ * parent thread's `process.stdout` stream.
+ * @since v10.5.0
+ */
+ readonly stdout: Readable;
+ /**
+ * This is a readable stream which contains data written to `process.stderr` inside the worker thread. If `stderr: true` was not passed to the `Worker` constructor, then data is piped to the
+ * parent thread's `process.stderr` stream.
+ * @since v10.5.0
+ */
+ readonly stderr: Readable;
+ /**
+ * An integer identifier for the referenced thread. Inside the worker thread,
+ * it is available as `require('node:worker_threads').threadId`.
+ * This value is unique for each `Worker` instance inside a single process.
+ * @since v10.5.0
+ */
+ readonly threadId: number;
+ /**
+ * Provides the set of JS engine resource constraints for this Worker thread.
+ * If the `resourceLimits` option was passed to the `Worker` constructor,
+ * this matches its values.
+ *
+ * If the worker has stopped, the return value is an empty object.
+ * @since v13.2.0, v12.16.0
+ */
+ readonly resourceLimits?: ResourceLimits | undefined;
+ /**
+ * An object that can be used to query performance information from a worker
+ * instance. Similar to `perf_hooks.performance`.
+ * @since v15.1.0, v14.17.0, v12.22.0
+ */
+ readonly performance: WorkerPerformance;
+ /**
+ * @param filename The path to the Worker’s main script or module.
+ * Must be either an absolute path or a relative path (i.e. relative to the current working directory) starting with ./ or ../,
+ * or a WHATWG URL object using file: protocol. If options.eval is true, this is a string containing JavaScript code rather than a path.
+ */
+ constructor(filename: string | URL, options?: WorkerOptions);
+ /**
+ * Send a message to the worker that is received via `require('node:worker_threads').parentPort.on('message')`.
+ * See `port.postMessage()` for more details.
+ * @since v10.5.0
+ */
+ postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
+ /**
+ * Opposite of `unref()`, calling `ref()` on a previously `unref()`ed worker does _not_ let the program exit if it's the only active handle left (the default
+ * behavior). If the worker is `ref()`ed, calling `ref()` again has
+ * no effect.
+ * @since v10.5.0
+ */
+ ref(): void;
+ /**
+ * Calling `unref()` on a worker allows the thread to exit if this is the only
+ * active handle in the event system. If the worker is already `unref()`ed calling`unref()` again has no effect.
+ * @since v10.5.0
+ */
+ unref(): void;
+ /**
+ * Stop all JavaScript execution in the worker thread as soon as possible.
+ * Returns a Promise for the exit code that is fulfilled when the `'exit' event` is emitted.
+ * @since v10.5.0
+ */
+ terminate(): Promise<number>;
+ /**
+ * Returns a readable stream for a V8 snapshot of the current state of the Worker.
+ * See `v8.getHeapSnapshot()` for more details.
+ *
+ * If the Worker thread is no longer running, which may occur before the `'exit' event` is emitted, the returned `Promise` is rejected
+ * immediately with an `ERR_WORKER_NOT_RUNNING` error.
+ * @since v13.9.0, v12.17.0
+ * @return A promise for a Readable Stream containing a V8 heap snapshot
+ */
+ getHeapSnapshot(): Promise<Readable>;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'exit', listener: (exitCode: number) => void): this;
+ addListener(event: 'message', listener: (value: any) => void): this;
+ addListener(event: 'messageerror', listener: (error: Error) => void): this;
+ addListener(event: 'online', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'exit', exitCode: number): boolean;
+ emit(event: 'message', value: any): boolean;
+ emit(event: 'messageerror', error: Error): boolean;
+ emit(event: 'online'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'exit', listener: (exitCode: number) => void): this;
+ on(event: 'message', listener: (value: any) => void): this;
+ on(event: 'messageerror', listener: (error: Error) => void): this;
+ on(event: 'online', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'exit', listener: (exitCode: number) => void): this;
+ once(event: 'message', listener: (value: any) => void): this;
+ once(event: 'messageerror', listener: (error: Error) => void): this;
+ once(event: 'online', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'exit', listener: (exitCode: number) => void): this;
+ prependListener(event: 'message', listener: (value: any) => void): this;
+ prependListener(event: 'messageerror', listener: (error: Error) => void): this;
+ prependListener(event: 'online', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'exit', listener: (exitCode: number) => void): this;
+ prependOnceListener(event: 'message', listener: (value: any) => void): this;
+ prependOnceListener(event: 'messageerror', listener: (error: Error) => void): this;
+ prependOnceListener(event: 'online', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'error', listener: (err: Error) => void): this;
+ removeListener(event: 'exit', listener: (exitCode: number) => void): this;
+ removeListener(event: 'message', listener: (value: any) => void): this;
+ removeListener(event: 'messageerror', listener: (error: Error) => void): this;
+ removeListener(event: 'online', listener: () => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ off(event: 'error', listener: (err: Error) => void): this;
+ off(event: 'exit', listener: (exitCode: number) => void): this;
+ off(event: 'message', listener: (value: any) => void): this;
+ off(event: 'messageerror', listener: (error: Error) => void): this;
+ off(event: 'online', listener: () => void): this;
+ off(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ interface BroadcastChannel extends NodeJS.RefCounted {}
+ /**
+ * Instances of `BroadcastChannel` allow asynchronous one-to-many communication
+ * with all other `BroadcastChannel` instances bound to the same channel name.
+ *
+ * ```js
+ * 'use strict';
+ *
+ * const {
+ * isMainThread,
+ * BroadcastChannel,
+ * Worker,
+ * } = require('node:worker_threads');
+ *
+ * const bc = new BroadcastChannel('hello');
+ *
+ * if (isMainThread) {
+ * let c = 0;
+ * bc.onmessage = (event) => {
+ * console.log(event.data);
+ * if (++c === 10) bc.close();
+ * };
+ * for (let n = 0; n < 10; n++)
+ * new Worker(__filename);
+ * } else {
+ * bc.postMessage('hello from every worker');
+ * bc.close();
+ * }
+ * ```
+ * @since v15.4.0
+ */
+ class BroadcastChannel {
+ readonly name: string;
+ /**
+ * Invoked with a single \`MessageEvent\` argument when a message is received.
+ * @since v15.4.0
+ */
+ onmessage: (message: unknown) => void;
+ /**
+ * Invoked with a received message cannot be deserialized.
+ * @since v15.4.0
+ */
+ onmessageerror: (message: unknown) => void;
+ constructor(name: string);
+ /**
+ * Closes the `BroadcastChannel` connection.
+ * @since v15.4.0
+ */
+ close(): void;
+ /**
+ * @since v15.4.0
+ * @param message Any cloneable JavaScript value.
+ */
+ postMessage(message: unknown): void;
+ }
+ /**
+ * Mark an object as not transferable. If `object` occurs in the transfer list of
+ * a `port.postMessage()` call, it is ignored.
+ *
+ * In particular, this makes sense for objects that can be cloned, rather than
+ * transferred, and which are used by other objects on the sending side.
+ * For example, Node.js marks the `ArrayBuffer`s it uses for its `Buffer pool` with this.
+ *
+ * This operation cannot be undone.
+ *
+ * ```js
+ * const { MessageChannel, markAsUntransferable } = require('node:worker_threads');
+ *
+ * const pooledBuffer = new ArrayBuffer(8);
+ * const typedArray1 = new Uint8Array(pooledBuffer);
+ * const typedArray2 = new Float64Array(pooledBuffer);
+ *
+ * markAsUntransferable(pooledBuffer);
+ *
+ * const { port1 } = new MessageChannel();
+ * port1.postMessage(typedArray1, [ typedArray1.buffer ]);
+ *
+ * // The following line prints the contents of typedArray1 -- it still owns
+ * // its memory and has been cloned, not transferred. Without
+ * // `markAsUntransferable()`, this would print an empty Uint8Array.
+ * // typedArray2 is intact as well.
+ * console.log(typedArray1);
+ * console.log(typedArray2);
+ * ```
+ *
+ * There is no equivalent to this API in browsers.
+ * @since v14.5.0, v12.19.0
+ */
+ function markAsUntransferable(object: object): void;
+ /**
+ * Transfer a `MessagePort` to a different `vm` Context. The original `port`object is rendered unusable, and the returned `MessagePort` instance
+ * takes its place.
+ *
+ * The returned `MessagePort` is an object in the target context and
+ * inherits from its global `Object` class. Objects passed to the [`port.onmessage()`](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort/onmessage) listener are also created in the
+ * target context
+ * and inherit from its global `Object` class.
+ *
+ * However, the created `MessagePort` no longer inherits from [`EventTarget`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget), and only
+ * [`port.onmessage()`](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort/onmessage) can be used to receive
+ * events using it.
+ * @since v11.13.0
+ * @param port The message port to transfer.
+ * @param contextifiedSandbox A `contextified` object as returned by the `vm.createContext()` method.
+ */
+ function moveMessagePortToContext(port: MessagePort, contextifiedSandbox: Context): MessagePort;
+ /**
+ * Receive a single message from a given `MessagePort`. If no message is available,`undefined` is returned, otherwise an object with a single `message` property
+ * that contains the message payload, corresponding to the oldest message in the`MessagePort`'s queue.
+ *
+ * ```js
+ * const { MessageChannel, receiveMessageOnPort } = require('node:worker_threads');
+ * const { port1, port2 } = new MessageChannel();
+ * port1.postMessage({ hello: 'world' });
+ *
+ * console.log(receiveMessageOnPort(port2));
+ * // Prints: { message: { hello: 'world' } }
+ * console.log(receiveMessageOnPort(port2));
+ * // Prints: undefined
+ * ```
+ *
+ * When this function is used, no `'message'` event is emitted and the`onmessage` listener is not invoked.
+ * @since v12.3.0
+ */
+ function receiveMessageOnPort(port: MessagePort):
+ | {
+ message: any;
+ }
+ | undefined;
+ type Serializable = string | object | number | boolean | bigint;
+ /**
+ * Within a worker thread, `worker.getEnvironmentData()` returns a clone
+ * of data passed to the spawning thread's `worker.setEnvironmentData()`.
+ * Every new `Worker` receives its own copy of the environment data
+ * automatically.
+ *
+ * ```js
+ * const {
+ * Worker,
+ * isMainThread,
+ * setEnvironmentData,
+ * getEnvironmentData,
+ * } = require('node:worker_threads');
+ *
+ * if (isMainThread) {
+ * setEnvironmentData('Hello', 'World!');
+ * const worker = new Worker(__filename);
+ * } else {
+ * console.log(getEnvironmentData('Hello')); // Prints 'World!'.
+ * }
+ * ```
+ * @since v15.12.0, v14.18.0
+ * @param key Any arbitrary, cloneable JavaScript value that can be used as a {Map} key.
+ */
+ function getEnvironmentData(key: Serializable): Serializable;
+ /**
+ * The `worker.setEnvironmentData()` API sets the content of`worker.getEnvironmentData()` in the current thread and all new `Worker`instances spawned from the current context.
+ * @since v15.12.0, v14.18.0
+ * @param key Any arbitrary, cloneable JavaScript value that can be used as a {Map} key.
+ * @param value Any arbitrary, cloneable JavaScript value that will be cloned and passed automatically to all new `Worker` instances. If `value` is passed as `undefined`, any previously set value
+ * for the `key` will be deleted.
+ */
+ function setEnvironmentData(key: Serializable, value: Serializable): void;
+
+ import {
+ BroadcastChannel as _BroadcastChannel,
+ MessageChannel as _MessageChannel,
+ MessagePort as _MessagePort,
+ } from 'worker_threads';
+ global {
+ /**
+ * `BroadcastChannel` class is a global reference for `require('worker_threads').BroadcastChannel`
+ * https://nodejs.org/api/globals.html#broadcastchannel
+ * @since v18.0.0
+ */
+ var BroadcastChannel: typeof globalThis extends {
+ onmessage: any;
+ BroadcastChannel: infer T;
+ }
+ ? T
+ : typeof _BroadcastChannel;
+ /**
+ * `MessageChannel` class is a global reference for `require('worker_threads').MessageChannel`
+ * https://nodejs.org/api/globals.html#messagechannel
+ * @since v15.0.0
+ */
+ var MessageChannel: typeof globalThis extends {
+ onmessage: any;
+ MessageChannel: infer T;
+ }
+ ? T
+ : typeof _MessageChannel;
+ /**
+ * `MessagePort` class is a global reference for `require('worker_threads').MessagePort`
+ * https://nodejs.org/api/globals.html#messageport
+ * @since v15.0.0
+ */
+ var MessagePort: typeof globalThis extends {
+ onmessage: any;
+ MessagePort: infer T;
+ }
+ ? T
+ : typeof _MessagePort;
+ }
+}
+declare module 'node:worker_threads' {
+ export * from 'worker_threads';
+}
diff --git a/node_modules/@types/node/zlib.d.ts b/node_modules/@types/node/zlib.d.ts
new file mode 100755
index 0000000..9d74cd2
--- /dev/null
+++ b/node_modules/@types/node/zlib.d.ts
@@ -0,0 +1,517 @@
+/**
+ * The `node:zlib` module provides compression functionality implemented using
+ * Gzip, Deflate/Inflate, and Brotli.
+ *
+ * To access it:
+ *
+ * ```js
+ * const zlib = require('node:zlib');
+ * ```
+ *
+ * Compression and decompression are built around the Node.js `Streams API`.
+ *
+ * Compressing or decompressing a stream (such as a file) can be accomplished by
+ * piping the source stream through a `zlib` `Transform` stream into a destination
+ * stream:
+ *
+ * ```js
+ * const { createGzip } = require('node:zlib');
+ * const { pipeline } = require('node:stream');
+ * const {
+ * createReadStream,
+ * createWriteStream,
+ * } = require('node:fs');
+ *
+ * const gzip = createGzip();
+ * const source = createReadStream('input.txt');
+ * const destination = createWriteStream('input.txt.gz');
+ *
+ * pipeline(source, gzip, destination, (err) => {
+ * if (err) {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * }
+ * });
+ *
+ * // Or, Promisified
+ *
+ * const { promisify } = require('node:util');
+ * const pipe = promisify(pipeline);
+ *
+ * async function do_gzip(input, output) {
+ * const gzip = createGzip();
+ * const source = createReadStream(input);
+ * const destination = createWriteStream(output);
+ * await pipe(source, gzip, destination);
+ * }
+ *
+ * do_gzip('input.txt', 'input.txt.gz')
+ * .catch((err) => {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * });
+ * ```
+ *
+ * It is also possible to compress or decompress data in a single step:
+ *
+ * ```js
+ * const { deflate, unzip } = require('node:zlib');
+ *
+ * const input = '.................................';
+ * deflate(input, (err, buffer) => {
+ * if (err) {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * }
+ * console.log(buffer.toString('base64'));
+ * });
+ *
+ * const buffer = Buffer.from('eJzT0yMAAGTvBe8=', 'base64');
+ * unzip(buffer, (err, buffer) => {
+ * if (err) {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * }
+ * console.log(buffer.toString());
+ * });
+ *
+ * // Or, Promisified
+ *
+ * const { promisify } = require('node:util');
+ * const do_unzip = promisify(unzip);
+ *
+ * do_unzip(buffer)
+ * .then((buf) => console.log(buf.toString()))
+ * .catch((err) => {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * });
+ * ```
+ * @since v0.5.8
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/zlib.js)
+ */
+declare module 'zlib' {
+ import * as stream from 'node:stream';
+ interface ZlibOptions {
+ /**
+ * @default constants.Z_NO_FLUSH
+ */
+ flush?: number | undefined;
+ /**
+ * @default constants.Z_FINISH
+ */
+ finishFlush?: number | undefined;
+ /**
+ * @default 16*1024
+ */
+ chunkSize?: number | undefined;
+ windowBits?: number | undefined;
+ level?: number | undefined; // compression only
+ memLevel?: number | undefined; // compression only
+ strategy?: number | undefined; // compression only
+ dictionary?: NodeJS.ArrayBufferView | ArrayBuffer | undefined; // deflate/inflate only, empty dictionary by default
+ info?: boolean | undefined;
+ maxOutputLength?: number | undefined;
+ }
+ interface BrotliOptions {
+ /**
+ * @default constants.BROTLI_OPERATION_PROCESS
+ */
+ flush?: number | undefined;
+ /**
+ * @default constants.BROTLI_OPERATION_FINISH
+ */
+ finishFlush?: number | undefined;
+ /**
+ * @default 16*1024
+ */
+ chunkSize?: number | undefined;
+ params?:
+ | {
+ /**
+ * Each key is a `constants.BROTLI_*` constant.
+ */
+ [key: number]: boolean | number;
+ }
+ | undefined;
+ maxOutputLength?: number | undefined;
+ }
+ interface Zlib {
+ /** @deprecated Use bytesWritten instead. */
+ readonly bytesRead: number;
+ readonly bytesWritten: number;
+ shell?: boolean | string | undefined;
+ close(callback?: () => void): void;
+ flush(kind?: number, callback?: () => void): void;
+ flush(callback?: () => void): void;
+ }
+ interface ZlibParams {
+ params(level: number, strategy: number, callback: () => void): void;
+ }
+ interface ZlibReset {
+ reset(): void;
+ }
+ interface BrotliCompress extends stream.Transform, Zlib {}
+ interface BrotliDecompress extends stream.Transform, Zlib {}
+ interface Gzip extends stream.Transform, Zlib {}
+ interface Gunzip extends stream.Transform, Zlib {}
+ interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
+ interface Inflate extends stream.Transform, Zlib, ZlibReset {}
+ interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
+ interface InflateRaw extends stream.Transform, Zlib, ZlibReset {}
+ interface Unzip extends stream.Transform, Zlib {}
+ /**
+ * Creates and returns a new `BrotliCompress` object.
+ * @since v11.7.0, v10.16.0
+ */
+ function createBrotliCompress(options?: BrotliOptions): BrotliCompress;
+ /**
+ * Creates and returns a new `BrotliDecompress` object.
+ * @since v11.7.0, v10.16.0
+ */
+ function createBrotliDecompress(options?: BrotliOptions): BrotliDecompress;
+ /**
+ * Creates and returns a new `Gzip` object.
+ * See `example`.
+ * @since v0.5.8
+ */
+ function createGzip(options?: ZlibOptions): Gzip;
+ /**
+ * Creates and returns a new `Gunzip` object.
+ * @since v0.5.8
+ */
+ function createGunzip(options?: ZlibOptions): Gunzip;
+ /**
+ * Creates and returns a new `Deflate` object.
+ * @since v0.5.8
+ */
+ function createDeflate(options?: ZlibOptions): Deflate;
+ /**
+ * Creates and returns a new `Inflate` object.
+ * @since v0.5.8
+ */
+ function createInflate(options?: ZlibOptions): Inflate;
+ /**
+ * Creates and returns a new `DeflateRaw` object.
+ *
+ * An upgrade of zlib from 1.2.8 to 1.2.11 changed behavior when `windowBits`is set to 8 for raw deflate streams. zlib would automatically set `windowBits`to 9 if was initially set to 8\. Newer
+ * versions of zlib will throw an exception,
+ * so Node.js restored the original behavior of upgrading a value of 8 to 9,
+ * since passing `windowBits = 9` to zlib actually results in a compressed stream
+ * that effectively uses an 8-bit window only.
+ * @since v0.5.8
+ */
+ function createDeflateRaw(options?: ZlibOptions): DeflateRaw;
+ /**
+ * Creates and returns a new `InflateRaw` object.
+ * @since v0.5.8
+ */
+ function createInflateRaw(options?: ZlibOptions): InflateRaw;
+ /**
+ * Creates and returns a new `Unzip` object.
+ * @since v0.5.8
+ */
+ function createUnzip(options?: ZlibOptions): Unzip;
+ type InputType = string | ArrayBuffer | NodeJS.ArrayBufferView;
+ type CompressCallback = (error: Error | null, result: Buffer) => void;
+ /**
+ * @since v11.7.0, v10.16.0
+ */
+ function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
+ function brotliCompress(buf: InputType, callback: CompressCallback): void;
+ namespace brotliCompress {
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
+ }
+ /**
+ * Compress a chunk of data with `BrotliCompress`.
+ * @since v11.7.0, v10.16.0
+ */
+ function brotliCompressSync(buf: InputType, options?: BrotliOptions): Buffer;
+ /**
+ * @since v11.7.0, v10.16.0
+ */
+ function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
+ function brotliDecompress(buf: InputType, callback: CompressCallback): void;
+ namespace brotliDecompress {
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `BrotliDecompress`.
+ * @since v11.7.0, v10.16.0
+ */
+ function brotliDecompressSync(buf: InputType, options?: BrotliOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function deflate(buf: InputType, callback: CompressCallback): void;
+ function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace deflate {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Compress a chunk of data with `Deflate`.
+ * @since v0.11.12
+ */
+ function deflateSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function deflateRaw(buf: InputType, callback: CompressCallback): void;
+ function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace deflateRaw {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Compress a chunk of data with `DeflateRaw`.
+ * @since v0.11.12
+ */
+ function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function gzip(buf: InputType, callback: CompressCallback): void;
+ function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace gzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Compress a chunk of data with `Gzip`.
+ * @since v0.11.12
+ */
+ function gzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function gunzip(buf: InputType, callback: CompressCallback): void;
+ function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace gunzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `Gunzip`.
+ * @since v0.11.12
+ */
+ function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function inflate(buf: InputType, callback: CompressCallback): void;
+ function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace inflate {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `Inflate`.
+ * @since v0.11.12
+ */
+ function inflateSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function inflateRaw(buf: InputType, callback: CompressCallback): void;
+ function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace inflateRaw {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `InflateRaw`.
+ * @since v0.11.12
+ */
+ function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function unzip(buf: InputType, callback: CompressCallback): void;
+ function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace unzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `Unzip`.
+ * @since v0.11.12
+ */
+ function unzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+ namespace constants {
+ const BROTLI_DECODE: number;
+ const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number;
+ const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: number;
+ const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: number;
+ const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: number;
+ const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: number;
+ const BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: number;
+ const BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: number;
+ const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: number;
+ const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: number;
+ const BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: number;
+ const BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: number;
+ const BROTLI_DECODER_ERROR_FORMAT_DISTANCE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_PADDING_1: number;
+ const BROTLI_DECODER_ERROR_FORMAT_PADDING_2: number;
+ const BROTLI_DECODER_ERROR_FORMAT_RESERVED: number;
+ const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: number;
+ const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: number;
+ const BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: number;
+ const BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: number;
+ const BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: number;
+ const BROTLI_DECODER_ERROR_UNREACHABLE: number;
+ const BROTLI_DECODER_NEEDS_MORE_INPUT: number;
+ const BROTLI_DECODER_NEEDS_MORE_OUTPUT: number;
+ const BROTLI_DECODER_NO_ERROR: number;
+ const BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: number;
+ const BROTLI_DECODER_PARAM_LARGE_WINDOW: number;
+ const BROTLI_DECODER_RESULT_ERROR: number;
+ const BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: number;
+ const BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: number;
+ const BROTLI_DECODER_RESULT_SUCCESS: number;
+ const BROTLI_DECODER_SUCCESS: number;
+ const BROTLI_DEFAULT_MODE: number;
+ const BROTLI_DEFAULT_QUALITY: number;
+ const BROTLI_DEFAULT_WINDOW: number;
+ const BROTLI_ENCODE: number;
+ const BROTLI_LARGE_MAX_WINDOW_BITS: number;
+ const BROTLI_MAX_INPUT_BLOCK_BITS: number;
+ const BROTLI_MAX_QUALITY: number;
+ const BROTLI_MAX_WINDOW_BITS: number;
+ const BROTLI_MIN_INPUT_BLOCK_BITS: number;
+ const BROTLI_MIN_QUALITY: number;
+ const BROTLI_MIN_WINDOW_BITS: number;
+ const BROTLI_MODE_FONT: number;
+ const BROTLI_MODE_GENERIC: number;
+ const BROTLI_MODE_TEXT: number;
+ const BROTLI_OPERATION_EMIT_METADATA: number;
+ const BROTLI_OPERATION_FINISH: number;
+ const BROTLI_OPERATION_FLUSH: number;
+ const BROTLI_OPERATION_PROCESS: number;
+ const BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: number;
+ const BROTLI_PARAM_LARGE_WINDOW: number;
+ const BROTLI_PARAM_LGBLOCK: number;
+ const BROTLI_PARAM_LGWIN: number;
+ const BROTLI_PARAM_MODE: number;
+ const BROTLI_PARAM_NDIRECT: number;
+ const BROTLI_PARAM_NPOSTFIX: number;
+ const BROTLI_PARAM_QUALITY: number;
+ const BROTLI_PARAM_SIZE_HINT: number;
+ const DEFLATE: number;
+ const DEFLATERAW: number;
+ const GUNZIP: number;
+ const GZIP: number;
+ const INFLATE: number;
+ const INFLATERAW: number;
+ const UNZIP: number;
+ // Allowed flush values.
+ const Z_NO_FLUSH: number;
+ const Z_PARTIAL_FLUSH: number;
+ const Z_SYNC_FLUSH: number;
+ const Z_FULL_FLUSH: number;
+ const Z_FINISH: number;
+ const Z_BLOCK: number;
+ const Z_TREES: number;
+ // Return codes for the compression/decompression functions.
+ // Negative values are errors, positive values are used for special but normal events.
+ const Z_OK: number;
+ const Z_STREAM_END: number;
+ const Z_NEED_DICT: number;
+ const Z_ERRNO: number;
+ const Z_STREAM_ERROR: number;
+ const Z_DATA_ERROR: number;
+ const Z_MEM_ERROR: number;
+ const Z_BUF_ERROR: number;
+ const Z_VERSION_ERROR: number;
+ // Compression levels.
+ const Z_NO_COMPRESSION: number;
+ const Z_BEST_SPEED: number;
+ const Z_BEST_COMPRESSION: number;
+ const Z_DEFAULT_COMPRESSION: number;
+ // Compression strategy.
+ const Z_FILTERED: number;
+ const Z_HUFFMAN_ONLY: number;
+ const Z_RLE: number;
+ const Z_FIXED: number;
+ const Z_DEFAULT_STRATEGY: number;
+ const Z_DEFAULT_WINDOWBITS: number;
+ const Z_MIN_WINDOWBITS: number;
+ const Z_MAX_WINDOWBITS: number;
+ const Z_MIN_CHUNK: number;
+ const Z_MAX_CHUNK: number;
+ const Z_DEFAULT_CHUNK: number;
+ const Z_MIN_MEMLEVEL: number;
+ const Z_MAX_MEMLEVEL: number;
+ const Z_DEFAULT_MEMLEVEL: number;
+ const Z_MIN_LEVEL: number;
+ const Z_MAX_LEVEL: number;
+ const Z_DEFAULT_LEVEL: number;
+ const ZLIB_VERNUM: number;
+ }
+ // Allowed flush values.
+ /** @deprecated Use `constants.Z_NO_FLUSH` */
+ const Z_NO_FLUSH: number;
+ /** @deprecated Use `constants.Z_PARTIAL_FLUSH` */
+ const Z_PARTIAL_FLUSH: number;
+ /** @deprecated Use `constants.Z_SYNC_FLUSH` */
+ const Z_SYNC_FLUSH: number;
+ /** @deprecated Use `constants.Z_FULL_FLUSH` */
+ const Z_FULL_FLUSH: number;
+ /** @deprecated Use `constants.Z_FINISH` */
+ const Z_FINISH: number;
+ /** @deprecated Use `constants.Z_BLOCK` */
+ const Z_BLOCK: number;
+ /** @deprecated Use `constants.Z_TREES` */
+ const Z_TREES: number;
+ // Return codes for the compression/decompression functions.
+ // Negative values are errors, positive values are used for special but normal events.
+ /** @deprecated Use `constants.Z_OK` */
+ const Z_OK: number;
+ /** @deprecated Use `constants.Z_STREAM_END` */
+ const Z_STREAM_END: number;
+ /** @deprecated Use `constants.Z_NEED_DICT` */
+ const Z_NEED_DICT: number;
+ /** @deprecated Use `constants.Z_ERRNO` */
+ const Z_ERRNO: number;
+ /** @deprecated Use `constants.Z_STREAM_ERROR` */
+ const Z_STREAM_ERROR: number;
+ /** @deprecated Use `constants.Z_DATA_ERROR` */
+ const Z_DATA_ERROR: number;
+ /** @deprecated Use `constants.Z_MEM_ERROR` */
+ const Z_MEM_ERROR: number;
+ /** @deprecated Use `constants.Z_BUF_ERROR` */
+ const Z_BUF_ERROR: number;
+ /** @deprecated Use `constants.Z_VERSION_ERROR` */
+ const Z_VERSION_ERROR: number;
+ // Compression levels.
+ /** @deprecated Use `constants.Z_NO_COMPRESSION` */
+ const Z_NO_COMPRESSION: number;
+ /** @deprecated Use `constants.Z_BEST_SPEED` */
+ const Z_BEST_SPEED: number;
+ /** @deprecated Use `constants.Z_BEST_COMPRESSION` */
+ const Z_BEST_COMPRESSION: number;
+ /** @deprecated Use `constants.Z_DEFAULT_COMPRESSION` */
+ const Z_DEFAULT_COMPRESSION: number;
+ // Compression strategy.
+ /** @deprecated Use `constants.Z_FILTERED` */
+ const Z_FILTERED: number;
+ /** @deprecated Use `constants.Z_HUFFMAN_ONLY` */
+ const Z_HUFFMAN_ONLY: number;
+ /** @deprecated Use `constants.Z_RLE` */
+ const Z_RLE: number;
+ /** @deprecated Use `constants.Z_FIXED` */
+ const Z_FIXED: number;
+ /** @deprecated Use `constants.Z_DEFAULT_STRATEGY` */
+ const Z_DEFAULT_STRATEGY: number;
+ /** @deprecated */
+ const Z_BINARY: number;
+ /** @deprecated */
+ const Z_TEXT: number;
+ /** @deprecated */
+ const Z_ASCII: number;
+ /** @deprecated */
+ const Z_UNKNOWN: number;
+ /** @deprecated */
+ const Z_DEFLATED: number;
+}
+declare module 'node:zlib' {
+ export * from 'zlib';
+}
diff --git a/node_modules/@types/ws/LICENSE b/node_modules/@types/ws/LICENSE
new file mode 100755
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/ws/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@types/ws/README.md b/node_modules/@types/ws/README.md
new file mode 100755
index 0000000..51a5c50
--- /dev/null
+++ b/node_modules/@types/ws/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/ws`
+
+# Summary
+This package contains type definitions for ws (https://github.com/websockets/ws).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ws.
+
+### Additional Details
+ * Last updated: Thu, 08 Jun 2023 20:02:52 GMT
+ * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
+ * Global values: none
+
+# Credits
+These definitions were written by [Paul Loyd](https://github.com/loyd), [Margus Lamp](https://github.com/mlamp), [Philippe D'Alva](https://github.com/TitaneBoy), [reduckted](https://github.com/reduckted), [teidesu](https://github.com/teidesu), [Bartosz Wojtkowiak](https://github.com/wojtkowiak), [Kyle Hensel](https://github.com/k-yle), and [Samuel Skeen](https://github.com/cwadrupldijjit).
diff --git a/node_modules/@types/ws/index.d.mts b/node_modules/@types/ws/index.d.mts
new file mode 100755
index 0000000..a30913c
--- /dev/null
+++ b/node_modules/@types/ws/index.d.mts
@@ -0,0 +1,3 @@
+export { createWebSocketStream, WebSocket, WebSocketServer, RawData, Data, CertMeta, VerifyClientCallbackSync, VerifyClientCallbackAsync, ClientOptions, PerMessageDeflateOptions, Event, ErrorEvent, CloseEvent, MessageEvent, EventListenerOptions, ServerOptions, AddressInfo } from "./index.js";
+import WebSocket = require("./index.js");
+export default WebSocket; \ No newline at end of file
diff --git a/node_modules/@types/ws/index.d.ts b/node_modules/@types/ws/index.d.ts
new file mode 100755
index 0000000..5cf4748
--- /dev/null
+++ b/node_modules/@types/ws/index.d.ts
@@ -0,0 +1,411 @@
+// Type definitions for ws 8.5
+// Project: https://github.com/websockets/ws
+// Definitions by: Paul Loyd <https://github.com/loyd>
+// Margus Lamp <https://github.com/mlamp>
+// Philippe D'Alva <https://github.com/TitaneBoy>
+// reduckted <https://github.com/reduckted>
+// teidesu <https://github.com/teidesu>
+// Bartosz Wojtkowiak <https://github.com/wojtkowiak>
+// Kyle Hensel <https://github.com/k-yle>
+// Samuel Skeen <https://github.com/cwadrupldijjit>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/// <reference types="node" />
+
+import { EventEmitter } from "events";
+import {
+ Agent,
+ ClientRequest,
+ ClientRequestArgs,
+ IncomingMessage,
+ OutgoingHttpHeaders,
+ Server as HTTPServer,
+} from "http";
+import { Server as HTTPSServer } from "https";
+import { Duplex, DuplexOptions } from "stream";
+import { SecureContextOptions } from "tls";
+import { URL } from "url";
+import { ZlibOptions } from "zlib";
+
+// can not get all overload of BufferConstructor['from'], need to copy all it's first arguments here
+// https://github.com/microsoft/TypeScript/issues/32164
+type BufferLike =
+ | string
+ | Buffer
+ | DataView
+ | number
+ | ArrayBufferView
+ | Uint8Array
+ | ArrayBuffer
+ | SharedArrayBuffer
+ | ReadonlyArray<any>
+ | ReadonlyArray<number>
+ | { valueOf(): ArrayBuffer }
+ | { valueOf(): SharedArrayBuffer }
+ | { valueOf(): Uint8Array }
+ | { valueOf(): ReadonlyArray<number> }
+ | { valueOf(): string }
+ | { [Symbol.toPrimitive](hint: string): string };
+
+// WebSocket socket.
+declare class WebSocket extends EventEmitter {
+ /** The connection is not yet open. */
+ static readonly CONNECTING: 0;
+ /** The connection is open and ready to communicate. */
+ static readonly OPEN: 1;
+ /** The connection is in the process of closing. */
+ static readonly CLOSING: 2;
+ /** The connection is closed. */
+ static readonly CLOSED: 3;
+
+ binaryType: "nodebuffer" | "arraybuffer" | "fragments";
+ readonly bufferedAmount: number;
+ readonly extensions: string;
+ /** Indicates whether the websocket is paused */
+ readonly isPaused: boolean;
+ readonly protocol: string;
+ /** The current state of the connection */
+ readonly readyState:
+ | typeof WebSocket.CONNECTING
+ | typeof WebSocket.OPEN
+ | typeof WebSocket.CLOSING
+ | typeof WebSocket.CLOSED;
+ readonly url: string;
+
+ /** The connection is not yet open. */
+ readonly CONNECTING: 0;
+ /** The connection is open and ready to communicate. */
+ readonly OPEN: 1;
+ /** The connection is in the process of closing. */
+ readonly CLOSING: 2;
+ /** The connection is closed. */
+ readonly CLOSED: 3;
+
+ onopen: ((event: WebSocket.Event) => void) | null;
+ onerror: ((event: WebSocket.ErrorEvent) => void) | null;
+ onclose: ((event: WebSocket.CloseEvent) => void) | null;
+ onmessage: ((event: WebSocket.MessageEvent) => void) | null;
+
+ constructor(address: null);
+ constructor(address: string | URL, options?: WebSocket.ClientOptions | ClientRequestArgs);
+ constructor(
+ address: string | URL,
+ protocols?: string | string[],
+ options?: WebSocket.ClientOptions | ClientRequestArgs,
+ );
+
+ close(code?: number, data?: string | Buffer): void;
+ ping(data?: any, mask?: boolean, cb?: (err: Error) => void): void;
+ pong(data?: any, mask?: boolean, cb?: (err: Error) => void): void;
+ // https://github.com/websockets/ws/issues/2076#issuecomment-1250354722
+ send(data: BufferLike, cb?: (err?: Error) => void): void;
+ send(
+ data: BufferLike,
+ options: { mask?: boolean | undefined; binary?: boolean | undefined; compress?: boolean | undefined; fin?: boolean | undefined },
+ cb?: (err?: Error) => void,
+ ): void;
+ terminate(): void;
+
+ /**
+ * Pause the websocket causing it to stop emitting events. Some events can still be
+ * emitted after this is called, until all buffered data is consumed. This method
+ * is a noop if the ready state is `CONNECTING` or `CLOSED`.
+ */
+ pause(): void;
+ /**
+ * Make a paused socket resume emitting events. This method is a noop if the ready
+ * state is `CONNECTING` or `CLOSED`.
+ */
+ resume(): void;
+
+ // HTML5 WebSocket events
+ addEventListener(
+ method: "message",
+ cb: (event: WebSocket.MessageEvent) => void,
+ options?: WebSocket.EventListenerOptions,
+ ): void;
+ addEventListener(
+ method: "close",
+ cb: (event: WebSocket.CloseEvent) => void,
+ options?: WebSocket.EventListenerOptions,
+ ): void;
+ addEventListener(
+ method: "error",
+ cb: (event: WebSocket.ErrorEvent) => void,
+ options?: WebSocket.EventListenerOptions,
+ ): void;
+ addEventListener(
+ method: "open",
+ cb: (event: WebSocket.Event) => void,
+ options?: WebSocket.EventListenerOptions,
+ ): void;
+
+ removeEventListener(method: "message", cb: (event: WebSocket.MessageEvent) => void): void;
+ removeEventListener(method: "close", cb: (event: WebSocket.CloseEvent) => void): void;
+ removeEventListener(method: "error", cb: (event: WebSocket.ErrorEvent) => void): void;
+ removeEventListener(method: "open", cb: (event: WebSocket.Event) => void): void;
+
+ // Events
+ on(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this;
+ on(event: "error", listener: (this: WebSocket, err: Error) => void): this;
+ on(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this;
+ on(event: "message", listener: (this: WebSocket, data: WebSocket.RawData, isBinary: boolean) => void): this;
+ on(event: "open", listener: (this: WebSocket) => void): this;
+ on(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this;
+ on(
+ event: "unexpected-response",
+ listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ on(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this;
+
+ once(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this;
+ once(event: "error", listener: (this: WebSocket, err: Error) => void): this;
+ once(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this;
+ once(event: "message", listener: (this: WebSocket, data: WebSocket.RawData, isBinary: boolean) => void): this;
+ once(event: "open", listener: (this: WebSocket) => void): this;
+ once(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this;
+ once(
+ event: "unexpected-response",
+ listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ once(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this;
+
+ off(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this;
+ off(event: "error", listener: (this: WebSocket, err: Error) => void): this;
+ off(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this;
+ off(event: "message", listener: (this: WebSocket, data: WebSocket.RawData, isBinary: boolean) => void): this;
+ off(event: "open", listener: (this: WebSocket) => void): this;
+ off(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this;
+ off(
+ event: "unexpected-response",
+ listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ off(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this;
+
+ addListener(event: "close", listener: (code: number, reason: Buffer) => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "upgrade", listener: (request: IncomingMessage) => void): this;
+ addListener(event: "message", listener: (data: WebSocket.RawData, isBinary: boolean) => void): this;
+ addListener(event: "open", listener: () => void): this;
+ addListener(event: "ping" | "pong", listener: (data: Buffer) => void): this;
+ addListener(
+ event: "unexpected-response",
+ listener: (request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ removeListener(event: "close", listener: (code: number, reason: Buffer) => void): this;
+ removeListener(event: "error", listener: (err: Error) => void): this;
+ removeListener(event: "upgrade", listener: (request: IncomingMessage) => void): this;
+ removeListener(event: "message", listener: (data: WebSocket.RawData, isBinary: boolean) => void): this;
+ removeListener(event: "open", listener: () => void): this;
+ removeListener(event: "ping" | "pong", listener: (data: Buffer) => void): this;
+ removeListener(
+ event: "unexpected-response",
+ listener: (request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+}
+
+declare const WebSocketAlias: typeof WebSocket;
+interface WebSocketAlias extends WebSocket {} // tslint:disable-line no-empty-interface
+
+declare namespace WebSocket {
+ /**
+ * Data represents the raw message payload received over the WebSocket.
+ */
+ type RawData = Buffer | ArrayBuffer | Buffer[];
+
+ /**
+ * Data represents the message payload received over the WebSocket.
+ */
+ type Data = string | Buffer | ArrayBuffer | Buffer[];
+
+ /**
+ * CertMeta represents the accepted types for certificate & key data.
+ */
+ type CertMeta = string | string[] | Buffer | Buffer[];
+
+ /**
+ * VerifyClientCallbackSync is a synchronous callback used to inspect the
+ * incoming message. The return value (boolean) of the function determines
+ * whether or not to accept the handshake.
+ */
+ type VerifyClientCallbackSync<Request extends IncomingMessage = IncomingMessage> = (info: {
+ origin: string;
+ secure: boolean;
+ req: Request;
+ }) => boolean;
+
+ /**
+ * VerifyClientCallbackAsync is an asynchronous callback used to inspect the
+ * incoming message. The return value (boolean) of the function determines
+ * whether or not to accept the handshake.
+ */
+ type VerifyClientCallbackAsync<Request extends IncomingMessage = IncomingMessage> = (
+ info: { origin: string; secure: boolean; req: Request },
+ callback: (res: boolean, code?: number, message?: string, headers?: OutgoingHttpHeaders) => void,
+ ) => void;
+
+ interface ClientOptions extends SecureContextOptions {
+ protocol?: string | undefined;
+ followRedirects?: boolean | undefined;
+ generateMask?(mask: Buffer): void;
+ handshakeTimeout?: number | undefined;
+ maxRedirects?: number | undefined;
+ perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined;
+ localAddress?: string | undefined;
+ protocolVersion?: number | undefined;
+ headers?: { [key: string]: string } | undefined;
+ origin?: string | undefined;
+ agent?: Agent | undefined;
+ host?: string | undefined;
+ family?: number | undefined;
+ checkServerIdentity?(servername: string, cert: CertMeta): boolean;
+ rejectUnauthorized?: boolean | undefined;
+ maxPayload?: number | undefined;
+ skipUTF8Validation?: boolean | undefined;
+ }
+
+ interface PerMessageDeflateOptions {
+ serverNoContextTakeover?: boolean | undefined;
+ clientNoContextTakeover?: boolean | undefined;
+ serverMaxWindowBits?: number | undefined;
+ clientMaxWindowBits?: number | undefined;
+ zlibDeflateOptions?: {
+ flush?: number | undefined;
+ finishFlush?: number | undefined;
+ chunkSize?: number | undefined;
+ windowBits?: number | undefined;
+ level?: number | undefined;
+ memLevel?: number | undefined;
+ strategy?: number | undefined;
+ dictionary?: Buffer | Buffer[] | DataView | undefined;
+ info?: boolean | undefined;
+ } | undefined;
+ zlibInflateOptions?: ZlibOptions | undefined;
+ threshold?: number | undefined;
+ concurrencyLimit?: number | undefined;
+ }
+
+ interface Event {
+ type: string;
+ target: WebSocket;
+ }
+
+ interface ErrorEvent {
+ error: any;
+ message: string;
+ type: string;
+ target: WebSocket;
+ }
+
+ interface CloseEvent {
+ wasClean: boolean;
+ code: number;
+ reason: string;
+ type: string;
+ target: WebSocket;
+ }
+
+ interface MessageEvent {
+ data: Data;
+ type: string;
+ target: WebSocket;
+ }
+
+ interface EventListenerOptions {
+ once?: boolean | undefined;
+ }
+
+ interface ServerOptions<
+ U extends typeof WebSocket.WebSocket = typeof WebSocket.WebSocket,
+ V extends typeof IncomingMessage = typeof IncomingMessage,
+ > {
+ host?: string | undefined;
+ port?: number | undefined;
+ backlog?: number | undefined;
+ server?: HTTPServer<V> | HTTPSServer<V> | undefined;
+ verifyClient?:
+ | VerifyClientCallbackAsync<InstanceType<V>>
+ | VerifyClientCallbackSync<InstanceType<V>>
+ | undefined;
+ handleProtocols?: (protocols: Set<string>, request: InstanceType<V>) => string | false;
+ path?: string | undefined;
+ noServer?: boolean | undefined;
+ clientTracking?: boolean | undefined;
+ perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined;
+ maxPayload?: number | undefined;
+ skipUTF8Validation?: boolean | undefined;
+ WebSocket?: U | undefined;
+ }
+
+ interface AddressInfo {
+ address: string;
+ family: string;
+ port: number;
+ }
+
+ // WebSocket Server
+ class Server<
+ T extends typeof WebSocket.WebSocket = typeof WebSocket.WebSocket,
+ U extends typeof IncomingMessage = typeof IncomingMessage,
+ > extends EventEmitter {
+ options: ServerOptions<T, U>;
+ path: string;
+ clients: Set<InstanceType<T>>;
+
+ constructor(options?: ServerOptions<T, U>, callback?: () => void);
+
+ address(): AddressInfo | string;
+ close(cb?: (err?: Error) => void): void;
+ handleUpgrade(
+ request: InstanceType<U>,
+ socket: Duplex,
+ upgradeHead: Buffer,
+ callback: (client: InstanceType<T>, request: InstanceType<U>) => void,
+ ): void;
+ shouldHandle(request: InstanceType<U>): boolean | Promise<boolean>;
+
+ // Events
+ on(event: "connection", cb: (this: Server<T>, socket: InstanceType<T>, request: InstanceType<U>) => void): this;
+ on(event: "error", cb: (this: Server<T>, error: Error) => void): this;
+ on(event: "headers", cb: (this: Server<T>, headers: string[], request: InstanceType<U>) => void): this;
+ on(event: "close" | "listening", cb: (this: Server<T>) => void): this;
+ on(event: string | symbol, listener: (this: Server<T>, ...args: any[]) => void): this;
+
+ once(event: "connection", cb: (this: Server<T>, socket: InstanceType<T>, request: InstanceType<U>) => void): this;
+ once(event: "error", cb: (this: Server<T>, error: Error) => void): this;
+ once(event: "headers", cb: (this: Server<T>, headers: string[], request: InstanceType<U>) => void): this;
+ once(event: "close" | "listening", cb: (this: Server<T>) => void): this;
+ once(event: string | symbol, listener: (this: Server<T>, ...args: any[]) => void): this;
+
+ off(event: "connection", cb: (this: Server<T>, socket: InstanceType<T>, request: InstanceType<U>) => void): this;
+ off(event: "error", cb: (this: Server<T>, error: Error) => void): this;
+ off(event: "headers", cb: (this: Server<T>, headers: string[], request: InstanceType<U>) => void): this;
+ off(event: "close" | "listening", cb: (this: Server<T>) => void): this;
+ off(event: string | symbol, listener: (this: Server<T>, ...args: any[]) => void): this;
+
+ addListener(event: "connection", cb: (client: InstanceType<T>, request: InstanceType<U>) => void): this;
+ addListener(event: "error", cb: (err: Error) => void): this;
+ addListener(event: "headers", cb: (headers: string[], request: InstanceType<U>) => void): this;
+ addListener(event: "close" | "listening", cb: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ removeListener(event: "connection", cb: (client: InstanceType<T>, request: InstanceType<U>) => void): this;
+ removeListener(event: "error", cb: (err: Error) => void): this;
+ removeListener(event: "headers", cb: (headers: string[], request: InstanceType<U>) => void): this;
+ removeListener(event: "close" | "listening", cb: () => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ const WebSocketServer: typeof Server;
+ interface WebSocketServer extends Server {} // tslint:disable-line no-empty-interface
+ const WebSocket: typeof WebSocketAlias;
+ interface WebSocket extends WebSocketAlias {} // tslint:disable-line no-empty-interface
+
+ // WebSocket stream
+ function createWebSocketStream(websocket: WebSocket, options?: DuplexOptions): Duplex;
+}
+
+export = WebSocket;
diff --git a/node_modules/@types/ws/package.json b/node_modules/@types/ws/package.json
new file mode 100755
index 0000000..1b945c7
--- /dev/null
+++ b/node_modules/@types/ws/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "@types/ws",
+ "version": "8.5.5",
+ "description": "TypeScript definitions for ws",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ws",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Paul Loyd",
+ "url": "https://github.com/loyd",
+ "githubUsername": "loyd"
+ },
+ {
+ "name": "Margus Lamp",
+ "url": "https://github.com/mlamp",
+ "githubUsername": "mlamp"
+ },
+ {
+ "name": "Philippe D'Alva",
+ "url": "https://github.com/TitaneBoy",
+ "githubUsername": "TitaneBoy"
+ },
+ {
+ "name": "reduckted",
+ "url": "https://github.com/reduckted",
+ "githubUsername": "reduckted"
+ },
+ {
+ "name": "teidesu",
+ "url": "https://github.com/teidesu",
+ "githubUsername": "teidesu"
+ },
+ {
+ "name": "Bartosz Wojtkowiak",
+ "url": "https://github.com/wojtkowiak",
+ "githubUsername": "wojtkowiak"
+ },
+ {
+ "name": "Kyle Hensel",
+ "url": "https://github.com/k-yle",
+ "githubUsername": "k-yle"
+ },
+ {
+ "name": "Samuel Skeen",
+ "url": "https://github.com/cwadrupldijjit",
+ "githubUsername": "cwadrupldijjit"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/ws"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/node": "*"
+ },
+ "typesPublisherContentHash": "6eea0ac9982d9cb29e842a5be3f7d3e0103c444a7b96a324c0ce4a86980da93f",
+ "typeScriptVersion": "4.3",
+ "exports": {
+ ".": {
+ "types": {
+ "import": "./index.d.mts",
+ "default": "./index.d.ts"
+ }
+ },
+ "./package.json": "./package.json"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@vladfrangu/async_event_emitter/CHANGELOG.md b/node_modules/@vladfrangu/async_event_emitter/CHANGELOG.md
new file mode 100644
index 0000000..eb7a4bf
--- /dev/null
+++ b/node_modules/@vladfrangu/async_event_emitter/CHANGELOG.md
@@ -0,0 +1,63 @@
+# Changelog
+All notable changes to this project will be documented in this file.
+
+# [2.2.2](https://github.com/vladfrangu/async_event_emitter/compare/v2.2.1...v2.2.2) - (2023-05-11)
+
+## 🐛 Bug Fixes
+
+- Listener count was always 0 for one listener ([9b78e19](https://github.com/vladfrangu/async_event_emitter/commit/9b78e1992db649004dee852359240b3d0baaac2d))
+
+# [2.2.1](https://github.com/vladfrangu/async_event_emitter/compare/v2.2.0...v2.2.1) - (2023-04-08)
+
+## 🐛 Bug Fixes
+
+- Include comment for throwing error on emit ([19de045](https://github.com/vladfrangu/async_event_emitter/commit/19de0452702a0d9e35e9241259d100ca6d6f5447))
+
+# [2.2.0](https://github.com/vladfrangu/async_event_emitter/compare/v2.1.4...v2.2.0) - (2023-04-07)
+
+## 🚀 Features
+
+- Speed 🚀 ([23eb908](https://github.com/vladfrangu/async_event_emitter/commit/23eb90852ff8a6ceb4d6105c6df44c646642efae))
+
+# [2.1.4](https://github.com/vladfrangu/async_event_emitter/compare/v2.1.3...v2.1.4) - (2023-02-18)
+
+## 🐛 Bug Fixes
+
+- Remove predefined error event to allow extensions ([4224bbe](https://github.com/vladfrangu/async_event_emitter/commit/4224bbeae5c25cb94d4073600a9dff7ae3abcceb))
+
+# [2.1.2](https://github.com/vladfrangu/async_event_emitter/compare/v2.1.1...v2.1.2) - (2022-09-19)
+
+## 🐛 Bug Fixes
+
+- Don't use any `@types/node` types ([e4babce](https://github.com/vladfrangu/async_event_emitter/commit/e4babce88c17befdb6f84c73c0de2e0602260681))
+
+# [2.1.1](https://github.com/vladfrangu/async_event_emitter/compare/v2.1.0...v2.1.1) - (2022-09-19)
+
+## 🐛 Bug Fixes
+
+- Correct type errors when building with other types too ([72a03ae](https://github.com/vladfrangu/async_event_emitter/commit/72a03ae1ac30456241b4003a7c2ea93d27e8de5e))
+
+# [2.1.0](https://github.com/vladfrangu/async_event_emitter/compare/v2.0.1...v2.1.0) - (2022-09-18)
+
+## 🚀 Features
+
+- Bring in line with nodejs EventEmitters ([5a14ed0](https://github.com/vladfrangu/async_event_emitter/commit/5a14ed04bf87ec6a34cd33e26e3f25f101f87bcd))
+
+# [2.0.1](https://github.com/vladfrangu/async_event_emitter/compare/v2.0.0...v2.0.1) - (2022-07-09)
+
+## 🐛 Bug Fixes
+
+- Error event not properly emitting ([b849b38](https://github.com/vladfrangu/async_event_emitter/commit/b849b387c36515c60234c06681bfd4ec32ee5336))
+
+# [2.0.0](https://github.com/vladfrangu/async_event_emitter/compare/v1.0.1...v2.0.0) - (2022-06-29)
+
+## 🚀 Features
+
+- Use stringified bigints instead of uuids for promise map ([8c69419](https://github.com/vladfrangu/async_event_emitter/commit/8c694199da1a0a231feb1be3b0d7cfdb18cefd0b))
+
+ ### 💥 Breaking Changes:
+
+
+# Changelog
+
+All notable changes to this project will be documented in this file.
diff --git a/node_modules/@vladfrangu/async_event_emitter/LICENSE.md b/node_modules/@vladfrangu/async_event_emitter/LICENSE.md
new file mode 100644
index 0000000..6bd5831
--- /dev/null
+++ b/node_modules/@vladfrangu/async_event_emitter/LICENSE.md
@@ -0,0 +1,24 @@
+# The MIT License (MIT)
+
+Copyright © `2022` `Vlad Frangu`
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the “Software”), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@vladfrangu/async_event_emitter/README.md b/node_modules/@vladfrangu/async_event_emitter/README.md
new file mode 100644
index 0000000..ceb0d20
--- /dev/null
+++ b/node_modules/@vladfrangu/async_event_emitter/README.md
@@ -0,0 +1,51 @@
+<div align="center">
+
+# @vladfrangu/async_event_emitter
+
+**Simple to use event emitter implementation with async support in mind.**
+
+[![GitHub](https://img.shields.io/github/license/vladfrangu/async_event_emitter)](https://github.com/vladfrangu/async_event_emitter/blob/main/LICENSE.md)
+[![codecov](https://codecov.io/gh/vladfrangu/async_event_emitter/branch/main/graph/badge.svg?token=0MSAyoZNxz)](https://codecov.io/gh/vladfrangu/async_event_emitter)
+[![npm](https://img.shields.io/npm/v/@vladfrangu/async_event_emitter?color=crimson&logo=npm&style=flat-square)](https://www.npmjs.com/package/@vladfrangu/async_event_emitter)
+
+</div>
+
+## Description
+
+A very small, lightweight and simple re-implementation of event emitters, with support for async event handlers in mind.
+
+> **Note**: `@vladfrangu/async_event_emitter` requires Node.js v14 or higher to work, or a browser that has async/await support.
+
+## Features
+
+- TypeScript friendly
+- Offers CJS, ESM and UMD builds
+- Consistent interface with what is expected from an event emitter
+- Simple handling of asynchronous event handlers to allow waiting for their execution to finish if you want to exit the process
+
+## Buy me some doughnuts
+
+Most of my projects are and always will be open source, even if I don't get donations. That being said, I know there are amazing people who may still want to donate just to show their appreciation. Thank you very much in advance!
+
+I accept donations through Ko-fi, PayPal, Patreon and GitHub Sponsorships. You can use the buttons below to donate through your method of choice.
+
+| Donate With | Address |
+| :-------------: | :------------------------------------------------------: |
+| GitHub Sponsors | [Click Here](https://github.com/sponsors/vladfrangu) |
+| Ko-fi | [Click Here](https://ko-fi.com/wolfgalvlad) |
+| Patreon | [Click Here](https://patreon.com/vladfrangu) |
+| PayPal | [Click Here](https://www.paypal.com/paypalme/franguvlad) |
+
+## Contributors ✨
+
+Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
+
+<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
+<!-- prettier-ignore-start -->
+<!-- markdownlint-disable -->
+<!-- markdownlint-enable -->
+<!-- prettier-ignore-end -->
+
+<!-- ALL-CONTRIBUTORS-LIST:END -->
+
+This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
diff --git a/node_modules/@vladfrangu/async_event_emitter/THIRD_PARTY_LICENSE.md b/node_modules/@vladfrangu/async_event_emitter/THIRD_PARTY_LICENSE.md
new file mode 100644
index 0000000..7e35926
--- /dev/null
+++ b/node_modules/@vladfrangu/async_event_emitter/THIRD_PARTY_LICENSE.md
@@ -0,0 +1,23 @@
+# Most parts of this code are from node.js, specifically from https://github.com/nodejs/node/blob/main/lib/events.js
+
+As such, a lot of the code is licensed under the following license:
+
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/node_modules/@vladfrangu/async_event_emitter/dist/index.d.ts b/node_modules/@vladfrangu/async_event_emitter/dist/index.d.ts
new file mode 100644
index 0000000..ef909d8
--- /dev/null
+++ b/node_modules/@vladfrangu/async_event_emitter/dist/index.d.ts
@@ -0,0 +1,57 @@
+/// <reference types="node" />
+declare class AsyncEventEmitter<Events extends Record<PropertyKey, unknown[]> = Record<PropertyKey, unknown[]> & AsyncEventEmitterPredefinedEvents> {
+ private _events;
+ private _eventCount;
+ private _maxListeners;
+ private _internalPromiseMap;
+ private _wrapperId;
+ addListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K, listener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void): this;
+ on<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K, listener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void): this;
+ once<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K, listener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void): this;
+ removeListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K, listener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void): this;
+ off<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K, listener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void): this;
+ removeAllListeners<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(event?: K | undefined): this;
+ setMaxListeners(n: number): this;
+ getMaxListeners(): number;
+ listeners<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K): Listener<Events[keyof Events]>['listener'][];
+ rawListeners<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K): Listener<Events[keyof Events]>[];
+ emit<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K, ...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]): boolean;
+ listenerCount<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K): number;
+ prependListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K, listener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void): this;
+ prependOnceListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K, listener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void): this;
+ eventNames(): (keyof Events | keyof AsyncEventEmitterPredefinedEvents)[];
+ waitForAllListenersToComplete(): Promise<boolean>;
+ private _addListener;
+ private _wrapListener;
+ static listenerCount<Emitter extends AsyncEventEmitter<any>, EventNames = Emitter extends AsyncEventEmitter<infer Events> ? Events : never, EventName extends PropertyKey = EventNames extends never ? string | symbol : keyof EventNames>(emitter: Emitter, eventName: EventName | keyof AsyncEventEmitterPredefinedEvents): number;
+ static once<Emitter extends AsyncEventEmitter<any>, EventNames extends Record<PropertyKey, unknown[]> = Emitter extends AsyncEventEmitter<infer Events> ? Events : Record<PropertyKey, unknown[]>, EventName extends PropertyKey = keyof EventNames | keyof AsyncEventEmitterPredefinedEvents, EventResult extends unknown[] = EventName extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[EventName] : EventNames[EventName]>(emitter: Emitter, eventName: EventName, options?: AbortableMethods): Promise<EventResult>;
+ static on<Emitter extends AsyncEventEmitter<any>, EventNames extends Record<PropertyKey, unknown[]> = Emitter extends AsyncEventEmitter<infer Events> ? Events : Record<PropertyKey, unknown[]>, EventName extends PropertyKey = keyof EventNames | keyof AsyncEventEmitterPredefinedEvents, EventResult extends unknown[] = EventName extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[EventName] : EventNames[EventName]>(emitter: Emitter, eventName: EventName, options?: AbortableMethods): AsyncGenerator<EventResult, void>;
+}
+interface AsyncEventEmitterPredefinedEvents {
+ newListener: [eventName: string | symbol, listener: (...args: any[]) => Awaitable<void>];
+ removeListener: [eventName: string | symbol, listener: (...args: any[]) => Awaitable<void>];
+}
+interface WrappedOnce<Args extends any[] = any[]> {
+ (...args: Args): Awaitable<void>;
+ listener: (...args: Args) => Awaitable<void>;
+ _hasWarnedAboutMaxListeners?: boolean;
+}
+interface Listener<Args extends any[] = any[]> {
+ (...args: Args): Awaitable<void>;
+ listener: (...args: Args) => Awaitable<void>;
+ _hasWarnedAboutMaxListeners?: boolean;
+}
+type Awaitable<T> = T | Promise<T>;
+interface AbortableMethods {
+ signal?: AbortSignal;
+}
+interface AbortErrorOptions {
+ cause?: unknown;
+}
+declare class AbortError extends Error {
+ readonly code = "ABORT_ERR";
+ readonly name = "AbortError";
+ constructor(message?: string, options?: AbortErrorOptions | undefined);
+}
+
+export { AbortError, AbortErrorOptions, AbortableMethods, AsyncEventEmitter, AsyncEventEmitterPredefinedEvents, Awaitable, Listener, WrappedOnce };
diff --git a/node_modules/@vladfrangu/async_event_emitter/dist/index.global.js b/node_modules/@vladfrangu/async_event_emitter/dist/index.global.js
new file mode 100644
index 0000000..b528f19
--- /dev/null
+++ b/node_modules/@vladfrangu/async_event_emitter/dist/index.global.js
@@ -0,0 +1,568 @@
+"use strict";
+var AsyncEventEmitter = (() => {
+ var __defProp = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames = Object.getOwnPropertyNames;
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+ var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+ // src/index.ts
+ var src_exports = {};
+ __export(src_exports, {
+ AbortError: () => AbortError,
+ AsyncEventEmitter: () => AsyncEventEmitter
+ });
+ function validateListener(input) {
+ if (typeof input !== "function") {
+ throw new TypeError(`The listener argument must be a function. Received ${typeof input}`);
+ }
+ }
+ __name(validateListener, "validateListener");
+ function validateAbortSignal(input) {
+ if (input && !(input instanceof AbortSignal)) {
+ throw new TypeError(`The signal option must be an AbortSignal. Received ${input}`);
+ }
+ }
+ __name(validateAbortSignal, "validateAbortSignal");
+ function spliceOne(list, index) {
+ for (; index + 1 < list.length; index++) {
+ list[index] = list[index + 1];
+ }
+ list.pop();
+ }
+ __name(spliceOne, "spliceOne");
+ function arrayClone(arr) {
+ switch (arr.length) {
+ case 2:
+ return [arr[0], arr[1]];
+ case 3:
+ return [arr[0], arr[1], arr[2]];
+ case 4:
+ return [arr[0], arr[1], arr[2], arr[3]];
+ case 5:
+ return [arr[0], arr[1], arr[2], arr[3], arr[4]];
+ case 6:
+ return [arr[0], arr[1], arr[2], arr[3], arr[4], arr[5]];
+ }
+ return arr.slice();
+ }
+ __name(arrayClone, "arrayClone");
+ function identicalSequenceRange(a, b) {
+ for (let i = 0; i < a.length - 3; i++) {
+ const pos = b.indexOf(a[i]);
+ if (pos !== -1) {
+ const rest = b.length - pos;
+ if (rest > 3) {
+ let len = 1;
+ const maxLen = Math.min(a.length - i, rest);
+ while (maxLen > len && a[i + len] === b[pos + len]) {
+ len++;
+ }
+ if (len > 3) {
+ return [len, i];
+ }
+ }
+ }
+ }
+ return [0, 0];
+ }
+ __name(identicalSequenceRange, "identicalSequenceRange");
+ function enhanceStackTrace(err, own) {
+ let ctorInfo = "";
+ try {
+ const { name } = this.constructor;
+ if (name !== "AsyncEventEmitter")
+ ctorInfo = ` on ${name} instance`;
+ } catch {
+ }
+ const sep = `
+Emitted 'error' event${ctorInfo} at:
+`;
+ const errStack = err.stack.split("\n").slice(1);
+ const ownStack = own.stack.split("\n").slice(1);
+ const { 0: len, 1: off } = identicalSequenceRange(ownStack, errStack);
+ if (len > 0) {
+ ownStack.splice(off + 1, len - 2, " [... lines matching original stack trace ...]");
+ }
+ return err.stack + sep + ownStack.join("\n");
+ }
+ __name(enhanceStackTrace, "enhanceStackTrace");
+ var AsyncEventEmitter = class {
+ constructor() {
+ this._events = {
+ __proto__: null
+ };
+ this._eventCount = 0;
+ this._maxListeners = 10;
+ this._internalPromiseMap = /* @__PURE__ */ new Map();
+ this._wrapperId = 0n;
+ }
+ addListener(eventName, listener) {
+ validateListener(listener);
+ const wrapped = this._wrapListener(eventName, listener, false);
+ this._addListener(eventName, wrapped, false);
+ return this;
+ }
+ on(eventName, listener) {
+ return this.addListener(eventName, listener);
+ }
+ once(eventName, listener) {
+ validateListener(listener);
+ const wrapped = this._wrapListener(eventName, listener, true);
+ this._addListener(eventName, wrapped, false);
+ return this;
+ }
+ removeListener(eventName, listener) {
+ validateListener(listener);
+ const events = this._events;
+ const eventList = events[eventName];
+ if (eventList === void 0) {
+ return this;
+ }
+ if (eventList === listener || eventList.listener === listener) {
+ if (--this._eventCount === 0) {
+ this._events = { __proto__: null };
+ } else {
+ delete events[eventName];
+ if (events.removeListener) {
+ this.emit("removeListener", eventName, eventList.listener ?? eventList);
+ }
+ }
+ } else if (typeof eventList !== "function") {
+ let position = -1;
+ for (let i = eventList.length - 1; i >= 0; i--) {
+ if (eventList[i] === listener || eventList[i].listener === listener) {
+ position = i;
+ break;
+ }
+ }
+ if (position < 0) {
+ return this;
+ }
+ if (position === 0) {
+ eventList.shift();
+ } else {
+ spliceOne(eventList, position);
+ }
+ if (eventList.length === 0) {
+ delete events[eventName];
+ --this._eventCount;
+ }
+ if (events.removeListener !== void 0) {
+ this.emit("removeListener", eventName, listener);
+ }
+ }
+ return this;
+ }
+ off(eventName, listener) {
+ return this.removeListener(eventName, listener);
+ }
+ removeAllListeners(event) {
+ const events = this._events;
+ if (events.removeListener === void 0) {
+ if (!event) {
+ this._events = { __proto__: null };
+ this._eventCount = 0;
+ } else if (events[event] !== void 0) {
+ if (--this._eventCount === 0) {
+ this._events = { __proto__: null };
+ } else {
+ delete events[event];
+ }
+ }
+ return this;
+ }
+ if (!event) {
+ for (const key of Reflect.ownKeys(events)) {
+ if (key === "removeListener") {
+ continue;
+ }
+ this.removeAllListeners(key);
+ }
+ this.removeAllListeners("removeListener");
+ this._events = { __proto__: null };
+ this._eventCount = 0;
+ return this;
+ }
+ const listeners = events[event];
+ if (typeof listeners === "function") {
+ this.removeListener(event, listeners);
+ } else if (listeners !== void 0) {
+ for (let i = listeners.length - 1; i >= 0; i--) {
+ this.removeListener(event, listeners[i]);
+ }
+ }
+ return this;
+ }
+ setMaxListeners(n) {
+ if (typeof n !== "number" || n < 0 || Number.isNaN(n)) {
+ throw new RangeError(`Expected to get a non-negative number for "setMaxListeners", got ${n} instead`);
+ }
+ this._maxListeners = n;
+ return this;
+ }
+ getMaxListeners() {
+ return this._maxListeners;
+ }
+ listeners(eventName) {
+ const eventList = this._events[eventName];
+ if (eventList === void 0) {
+ return [];
+ }
+ if (typeof eventList === "function") {
+ return [eventList.listener ?? eventList];
+ }
+ const ret = arrayClone(eventList);
+ for (let i = 0; i < ret.length; ++i) {
+ const orig = ret[i].listener;
+ if (typeof orig === "function") {
+ ret[i] = orig;
+ }
+ }
+ return ret;
+ }
+ rawListeners(eventName) {
+ const eventList = this._events[eventName];
+ if (eventList === void 0) {
+ return [];
+ }
+ if (typeof eventList === "function") {
+ return [eventList];
+ }
+ return arrayClone(eventList);
+ }
+ emit(eventName, ...args) {
+ let doError = eventName === "error";
+ const events = this._events;
+ if (events !== void 0) {
+ doError = doError && events.error === void 0;
+ } else if (!doError) {
+ return false;
+ }
+ if (doError) {
+ let er;
+ if (args.length > 0) {
+ er = args[0];
+ }
+ if (er instanceof Error) {
+ try {
+ const capture = {};
+ Error.captureStackTrace(capture, AsyncEventEmitter.prototype.emit);
+ Object.defineProperty(er, "stack", {
+ value: enhanceStackTrace.call(this, er, capture),
+ configurable: true
+ });
+ } catch {
+ }
+ throw er; // Unhandled 'error' event
+ }
+ const stringifiedError = String(er);
+ const err = new Error(`Unhandled 'error' event emitted, received ${stringifiedError}`);
+ err.context = er;
+ throw err; // Unhandled 'error' event
+ }
+ const handlers = events[eventName];
+ if (handlers === void 0) {
+ return false;
+ }
+ if (typeof handlers === "function") {
+ const result = handlers.apply(this, args);
+ if (result !== void 0 && result !== null) {
+ handleMaybeAsync(this, result);
+ }
+ } else {
+ const len = handlers.length;
+ const listeners = arrayClone(handlers);
+ for (let i = 0; i < len; ++i) {
+ const result = listeners[i].apply(this, args);
+ if (result !== void 0 && result !== null) {
+ handleMaybeAsync(this, result);
+ }
+ }
+ }
+ return true;
+ }
+ listenerCount(eventName) {
+ const events = this._events;
+ if (events === void 0) {
+ return 0;
+ }
+ const eventListeners = events[eventName];
+ if (typeof eventListeners === "function") {
+ return 1;
+ }
+ return eventListeners?.length ?? 0;
+ }
+ prependListener(eventName, listener) {
+ validateListener(listener);
+ const wrapped = this._wrapListener(eventName, listener, false);
+ this._addListener(eventName, wrapped, true);
+ return this;
+ }
+ prependOnceListener(eventName, listener) {
+ validateListener(listener);
+ const wrapped = this._wrapListener(eventName, listener, true);
+ this._addListener(eventName, wrapped, true);
+ return this;
+ }
+ eventNames() {
+ return this._eventCount > 0 ? Reflect.ownKeys(this._events) : [];
+ }
+ async waitForAllListenersToComplete() {
+ const promises = [...this._internalPromiseMap.values()];
+ if (promises.length === 0) {
+ return false;
+ }
+ await Promise.all(promises);
+ return true;
+ }
+ _addListener(eventName, wrappedListener, prepend) {
+ if (this._events.newListener !== void 0) {
+ this.emit("newListener", eventName, wrappedListener.listener ?? wrappedListener);
+ }
+ let existing = this._events[eventName];
+ if (existing === void 0) {
+ existing = this._events[eventName] = wrappedListener;
+ ++this._eventCount;
+ } else if (typeof existing === "function") {
+ existing = this._events[eventName] = prepend ? [wrappedListener, existing] : [existing, wrappedListener];
+ } else if (prepend) {
+ existing.unshift(wrappedListener);
+ } else {
+ existing.push(wrappedListener);
+ }
+ if (this._maxListeners > 0 && existing.length > this._maxListeners && !existing._hasWarnedAboutMaxListeners) {
+ existing._hasWarnedAboutMaxListeners = true;
+ const warningMessage = [
+ `Possible AsyncEventEmitter memory leak detected. ${existing.length} ${String(eventName)} listeners added to ${this.constructor.name}.`,
+ `Use emitter.setMaxListeners() to increase the limit.`
+ ].join(" ");
+ console.warn(warningMessage);
+ }
+ }
+ _wrapListener(eventName, listener, once) {
+ if (!once) {
+ return listener;
+ }
+ const state = {
+ fired: false,
+ wrapFn: void 0,
+ eventEmitter: this,
+ eventName,
+ listener
+ };
+ const aliased = onceWrapper;
+ const wrapped = aliased.bind(state);
+ wrapped.listener = listener;
+ state.wrapFn = wrapped;
+ return wrapped;
+ }
+ static listenerCount(emitter, eventName) {
+ return emitter.listenerCount(eventName);
+ }
+ static async once(emitter, eventName, options = {}) {
+ const signal = options?.signal;
+ validateAbortSignal(signal);
+ if (signal?.aborted) {
+ throw new AbortError(void 0, { cause: getReason(signal) });
+ }
+ return new Promise((resolve, reject) => {
+ const errorListener = /* @__PURE__ */ __name((err) => {
+ emitter.removeListener(eventName, resolver);
+ if (signal) {
+ eventTargetAgnosticRemoveListener(emitter, eventName, abortListener);
+ }
+ reject(err);
+ }, "errorListener");
+ const resolver = /* @__PURE__ */ __name((...args) => {
+ emitter.removeListener("error", errorListener);
+ if (signal) {
+ eventTargetAgnosticRemoveListener(signal, "abort", abortListener);
+ }
+ resolve(args);
+ }, "resolver");
+ emitter.once(eventName, resolver);
+ if (eventName !== "error") {
+ emitter.once("error", errorListener);
+ }
+ const abortListener = /* @__PURE__ */ __name(() => {
+ eventTargetAgnosticRemoveListener(emitter, eventName, resolver);
+ eventTargetAgnosticRemoveListener(emitter, "error", errorListener);
+ reject(new AbortError(void 0, { cause: getReason(signal) }));
+ }, "abortListener");
+ if (signal) {
+ eventTargetAgnosticAddListener(signal, "abort", abortListener, { once: true });
+ }
+ });
+ }
+ static on(emitter, eventName, options = {}) {
+ const signal = options?.signal;
+ validateAbortSignal(signal);
+ if (signal?.aborted) {
+ throw new AbortError(void 0, { cause: getReason(signal) });
+ }
+ const unconsumedEvents = [];
+ const unconsumedPromises = [];
+ let error = null;
+ let finished = false;
+ const abortListener = /* @__PURE__ */ __name(() => {
+ errorHandler(new AbortError(void 0, { cause: getReason(signal) }));
+ }, "abortListener");
+ const eventHandler = /* @__PURE__ */ __name((...args) => {
+ const promise = unconsumedPromises.shift();
+ if (promise) {
+ promise.resolve(createIterResult(args, false));
+ } else {
+ unconsumedEvents.push(args);
+ }
+ }, "eventHandler");
+ const errorHandler = /* @__PURE__ */ __name((err) => {
+ finished = true;
+ const toError = unconsumedPromises.shift();
+ if (toError) {
+ toError.reject(err);
+ } else {
+ error = err;
+ }
+ void iterator.return();
+ }, "errorHandler");
+ const iterator = Object.setPrototypeOf(
+ {
+ next() {
+ const value = unconsumedEvents.shift();
+ if (value) {
+ return Promise.resolve(createIterResult(value, false));
+ }
+ if (error) {
+ const p = Promise.reject(error);
+ error = null;
+ return p;
+ }
+ if (finished) {
+ return Promise.resolve(createIterResult(void 0, true));
+ }
+ return new Promise((resolve, reject) => {
+ unconsumedPromises.push({ resolve, reject });
+ });
+ },
+ return() {
+ emitter.off(eventName, eventHandler);
+ emitter.off("error", errorHandler);
+ if (signal) {
+ eventTargetAgnosticRemoveListener(signal, "abort", abortListener);
+ }
+ finished = true;
+ const doneResult = createIterResult(void 0, true);
+ for (const promise of unconsumedPromises) {
+ promise.resolve(doneResult);
+ }
+ return Promise.resolve(doneResult);
+ },
+ throw(err) {
+ if (!err || !(err instanceof Error)) {
+ throw new TypeError(`Expected Error instance to be thrown in AsyncEventEmitter.AsyncIterator. Got ${err}`);
+ }
+ error = err;
+ emitter.off(eventName, eventHandler);
+ emitter.off("error", errorHandler);
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ }
+ },
+ AsyncIteratorPrototype
+ );
+ emitter.on(eventName, eventHandler);
+ if (eventName !== "error") {
+ emitter.on("error", errorHandler);
+ }
+ if (signal) {
+ eventTargetAgnosticAddListener(signal, "abort", abortListener);
+ }
+ return iterator;
+ }
+ };
+ __name(AsyncEventEmitter, "AsyncEventEmitter");
+ function onceWrapper() {
+ if (!this.fired) {
+ this.eventEmitter.removeListener(this.eventName, this.wrapFn);
+ this.fired = true;
+ if (arguments.length === 0) {
+ return this.listener.call(this.eventEmitter);
+ }
+ return this.listener.apply(this.eventEmitter, arguments);
+ }
+ }
+ __name(onceWrapper, "onceWrapper");
+ function getReason(signal) {
+ return signal?.reason;
+ }
+ __name(getReason, "getReason");
+ function eventTargetAgnosticRemoveListener(emitter, name, listener, flags) {
+ if (typeof emitter.off === "function") {
+ emitter.off(name, listener);
+ } else if (typeof emitter.removeEventListener === "function") {
+ emitter.removeEventListener(name, listener, flags);
+ }
+ }
+ __name(eventTargetAgnosticRemoveListener, "eventTargetAgnosticRemoveListener");
+ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
+ if (typeof emitter.on === "function") {
+ if (flags?.once) {
+ emitter.once(name, listener);
+ } else {
+ emitter.on(name, listener);
+ }
+ } else if (typeof emitter.addEventListener === "function") {
+ emitter.addEventListener(name, listener, flags);
+ }
+ }
+ __name(eventTargetAgnosticAddListener, "eventTargetAgnosticAddListener");
+ var AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function* () {
+ }).prototype);
+ function createIterResult(value, done) {
+ return { value, done };
+ }
+ __name(createIterResult, "createIterResult");
+ var AbortError = class extends Error {
+ constructor(message = "The operation was aborted", options = void 0) {
+ if (options !== void 0 && typeof options !== "object") {
+ throw new TypeError(`Failed to create AbortError: options is not an object or undefined`);
+ }
+ super(message, options);
+ this.code = "ABORT_ERR";
+ this.name = "AbortError";
+ }
+ };
+ __name(AbortError, "AbortError");
+ function handleMaybeAsync(emitter, result) {
+ try {
+ const fin = result.finally;
+ if (typeof fin === "function") {
+ const promiseId = String(++emitter["_wrapperId"]);
+ emitter["_internalPromiseMap"].set(promiseId, result);
+ fin.call(result, /* @__PURE__ */ __name(function final() {
+ emitter["_internalPromiseMap"].delete(promiseId);
+ }, "final"));
+ }
+ } catch (err) {
+ emitter.emit("error", err);
+ }
+ }
+ __name(handleMaybeAsync, "handleMaybeAsync");
+ return __toCommonJS(src_exports);
+})();
+//# sourceMappingURL=index.global.js.map \ No newline at end of file
diff --git a/node_modules/@vladfrangu/async_event_emitter/dist/index.global.js.map b/node_modules/@vladfrangu/async_event_emitter/dist/index.global.js.map
new file mode 100644
index 0000000..25a5ce7
--- /dev/null
+++ b/node_modules/@vladfrangu/async_event_emitter/dist/index.global.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/dot-notation */\nfunction validateListener(input: unknown): asserts input is (...args: unknown[]) => Awaitable<void> {\n\tif (typeof input !== 'function') {\n\t\tthrow new TypeError(`The listener argument must be a function. Received ${typeof input}`);\n\t}\n}\n\nfunction validateAbortSignal(input: unknown): asserts input is AbortSignal | undefined {\n\t// Only validate that the signal is a signal if its defined\n\tif (input && !(input instanceof AbortSignal)) {\n\t\tthrow new TypeError(`The signal option must be an AbortSignal. Received ${input}`);\n\t}\n}\n\n// Inspired from https://github.com/nodejs/node/blob/42ad967d68137df1a80a877e7b5ad56403fc157f/lib/internal/util.js#L397\nfunction spliceOne(list: unknown[], index: number) {\n\tfor (; index + 1 < list.length; index++) {\n\t\tlist[index] = list[index + 1];\n\t}\n\n\tlist.pop();\n}\n\n// Inspired from https://github.com/nodejs/node/blob/42ad967d68137df1a80a877e7b5ad56403fc157f/lib/events.js#L889\nfunction arrayClone<T extends unknown[]>(arr: T): T {\n\t// At least since V8 8.3, this implementation is faster than the previous\n\t// which always used a simple for-loop\n\tswitch (arr.length) {\n\t\tcase 2:\n\t\t\treturn [arr[0], arr[1]] as T;\n\t\tcase 3:\n\t\t\treturn [arr[0], arr[1], arr[2]] as T;\n\t\tcase 4:\n\t\t\treturn [arr[0], arr[1], arr[2], arr[3]] as T;\n\t\tcase 5:\n\t\t\treturn [arr[0], arr[1], arr[2], arr[3], arr[4]] as T;\n\t\tcase 6:\n\t\t\treturn [arr[0], arr[1], arr[2], arr[3], arr[4], arr[5]] as T;\n\t}\n\n\treturn arr.slice() as T;\n}\n\n// Inspired from https://github.com/nodejs/node/blob/42ad967d68137df1a80a877e7b5ad56403fc157f/lib/events.js#L427-L475\nfunction identicalSequenceRange(a: unknown[], b: unknown[]): [number, number] {\n\tfor (let i = 0; i < a.length - 3; i++) {\n\t\t// Find the first entry of b that matches the current entry of a.\n\t\tconst pos = b.indexOf(a[i]);\n\t\tif (pos !== -1) {\n\t\t\tconst rest = b.length - pos;\n\t\t\tif (rest > 3) {\n\t\t\t\tlet len = 1;\n\t\t\t\tconst maxLen = Math.min(a.length - i, rest);\n\t\t\t\t// Count the number of consecutive entries.\n\t\t\t\twhile (maxLen > len && a[i + len] === b[pos + len]) {\n\t\t\t\t\tlen++;\n\t\t\t\t}\n\t\t\t\tif (len > 3) {\n\t\t\t\t\treturn [len, i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn [0, 0];\n}\n\nfunction enhanceStackTrace(this: AsyncEventEmitter<any>, err: Error, own: Error) {\n\tlet ctorInfo = '';\n\ttry {\n\t\tconst { name } = this.constructor;\n\t\tif (name !== 'AsyncEventEmitter') ctorInfo = ` on ${name} instance`;\n\t} catch {\n\t\t// Continue regardless of error.\n\t}\n\tconst sep = `\\nEmitted 'error' event${ctorInfo} at:\\n`;\n\n\tconst errStack = err.stack!.split('\\n').slice(1);\n\tconst ownStack = own.stack!.split('\\n').slice(1);\n\n\tconst { 0: len, 1: off } = identicalSequenceRange(ownStack, errStack);\n\tif (len > 0) {\n\t\townStack.splice(off + 1, len - 2, ' [... lines matching original stack trace ...]');\n\t}\n\n\treturn err.stack + sep + ownStack.join('\\n');\n}\n\ninterface InternalEventMap extends Array<Listener | WrappedOnce> {\n\t_hasWarnedAboutMaxListeners?: boolean;\n}\n\nexport class AsyncEventEmitter<Events extends Record<PropertyKey, unknown[]> = Record<PropertyKey, unknown[]> & AsyncEventEmitterPredefinedEvents> {\n\tprivate _events: Record<keyof Events | keyof AsyncEventEmitterPredefinedEvents, Listener | WrappedOnce | InternalEventMap> = {\n\t\t__proto__: null\n\t} as Record<keyof Events | keyof AsyncEventEmitterPredefinedEvents, Listener | WrappedOnce | InternalEventMap>;\n\n\tprivate _eventCount = 0;\n\tprivate _maxListeners = 10;\n\tprivate _internalPromiseMap: Map<string, Promise<void>> = new Map();\n\tprivate _wrapperId = 0n;\n\n\tpublic addListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\tvalidateListener(listener);\n\n\t\tconst wrapped = this._wrapListener(eventName, listener, false);\n\n\t\tthis._addListener(eventName, wrapped, false);\n\n\t\treturn this;\n\t}\n\n\tpublic on<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\treturn this.addListener(eventName, listener);\n\t}\n\n\tpublic once<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\tvalidateListener(listener);\n\n\t\tconst wrapped = this._wrapListener(eventName, listener, true);\n\n\t\tthis._addListener(eventName, wrapped, false);\n\n\t\treturn this;\n\t}\n\n\tpublic removeListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\tvalidateListener(listener);\n\n\t\tconst events = this._events;\n\t\tconst eventList = events[eventName];\n\n\t\tif (eventList === undefined) {\n\t\t\treturn this;\n\t\t}\n\n\t\tif (eventList === listener || (eventList as WrappedOnce).listener === listener) {\n\t\t\tif (--this._eventCount === 0) {\n\t\t\t\tthis._events = { __proto__: null } as Record<\n\t\t\t\t\tkeyof Events | keyof AsyncEventEmitterPredefinedEvents,\n\t\t\t\t\tListener | WrappedOnce | InternalEventMap\n\t\t\t\t>;\n\t\t\t} else {\n\t\t\t\tdelete events[eventName];\n\t\t\t\tif (events.removeListener) {\n\t\t\t\t\tthis.emit('removeListener', eventName as string, (eventList as WrappedOnce).listener ?? eventList);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (typeof eventList !== 'function') {\n\t\t\tlet position = -1;\n\n\t\t\tfor (let i = eventList.length - 1; i >= 0; i--) {\n\t\t\t\tif (eventList[i] === listener || (eventList[i] as WrappedOnce).listener === listener) {\n\t\t\t\t\tposition = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (position < 0) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tif (position === 0) {\n\t\t\t\teventList.shift();\n\t\t\t} else {\n\t\t\t\tspliceOne(eventList, position);\n\t\t\t}\n\n\t\t\tif (eventList.length === 0) {\n\t\t\t\tdelete events[eventName];\n\t\t\t\t--this._eventCount;\n\t\t\t}\n\n\t\t\tif (events.removeListener !== undefined) {\n\t\t\t\t// Thanks TypeScript for the cast...\n\t\t\t\tthis.emit('removeListener', eventName as string | symbol, listener);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tpublic off<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\treturn this.removeListener(eventName, listener);\n\t}\n\n\tpublic removeAllListeners<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(event?: K | undefined): this {\n\t\tconst events = this._events;\n\n\t\t// Not listening for removeListener, no need to emit\n\t\tif (events.removeListener === undefined) {\n\t\t\tif (!event) {\n\t\t\t\tthis._events = { __proto__: null } as Record<keyof Events | keyof AsyncEventEmitterPredefinedEvents, InternalEventMap>;\n\t\t\t\tthis._eventCount = 0;\n\t\t\t} else if (events[event] !== undefined) {\n\t\t\t\tif (--this._eventCount === 0) {\n\t\t\t\t\tthis._events = { __proto__: null } as Record<keyof Events | keyof AsyncEventEmitterPredefinedEvents, InternalEventMap>;\n\t\t\t\t} else {\n\t\t\t\t\tdelete events[event];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\n\t\t// Emit removeListener for all listeners on all events\n\t\tif (!event) {\n\t\t\tfor (const key of Reflect.ownKeys(events)) {\n\t\t\t\tif (key === 'removeListener') {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tthis.removeAllListeners(key);\n\t\t\t}\n\n\t\t\tthis.removeAllListeners('removeListener');\n\t\t\tthis._events = { __proto__: null } as Record<keyof Events | keyof AsyncEventEmitterPredefinedEvents, InternalEventMap>;\n\t\t\tthis._eventCount = 0;\n\n\t\t\treturn this;\n\t\t}\n\n\t\tconst listeners = events[event];\n\n\t\tif (typeof listeners === 'function') {\n\t\t\tthis.removeListener(event, listeners);\n\t\t} else if (listeners !== undefined) {\n\t\t\t// LIFO order\n\t\t\tfor (let i = listeners.length - 1; i >= 0; i--) {\n\t\t\t\tthis.removeListener(event, listeners[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tpublic setMaxListeners(n: number): this {\n\t\tif (typeof n !== 'number' || n < 0 || Number.isNaN(n)) {\n\t\t\tthrow new RangeError(`Expected to get a non-negative number for \"setMaxListeners\", got ${n} instead`);\n\t\t}\n\n\t\tthis._maxListeners = n;\n\n\t\treturn this;\n\t}\n\n\tpublic getMaxListeners(): number {\n\t\treturn this._maxListeners;\n\t}\n\n\tpublic listeners<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K): Listener<Events[keyof Events]>['listener'][] {\n\t\tconst eventList = this._events[eventName];\n\n\t\tif (eventList === undefined) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (typeof eventList === 'function') {\n\t\t\treturn [eventList.listener ?? eventList];\n\t\t}\n\n\t\tconst ret = arrayClone(eventList) as Listener<Events[keyof Events]>['listener'][];\n\n\t\tfor (let i = 0; i < ret.length; ++i) {\n\t\t\tconst orig = (ret[i] as WrappedOnce).listener;\n\t\t\tif (typeof orig === 'function') {\n\t\t\t\tret[i] = orig;\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t}\n\n\tpublic rawListeners<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K): Listener<Events[keyof Events]>[] {\n\t\tconst eventList = this._events[eventName];\n\n\t\tif (eventList === undefined) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (typeof eventList === 'function') {\n\t\t\treturn [eventList];\n\t\t}\n\n\t\treturn arrayClone(eventList) as Listener<Events[keyof Events]>[];\n\t}\n\n\tpublic emit<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\t...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]\n\t): boolean {\n\t\tlet doError = eventName === 'error';\n\n\t\tconst events = this._events;\n\t\tif (events !== undefined) {\n\t\t\tdoError = doError && events.error === undefined;\n\t\t} else if (!doError) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (doError) {\n\t\t\tlet er: unknown;\n\n\t\t\tif (args.length > 0) {\n\t\t\t\t// eslint-disable-next-line prefer-destructuring\n\t\t\t\ter = args[0];\n\t\t\t}\n\n\t\t\tif (er instanceof Error) {\n\t\t\t\ttry {\n\t\t\t\t\tconst capture = {};\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/unbound-method\n\t\t\t\t\tError.captureStackTrace(capture, AsyncEventEmitter.prototype.emit);\n\t\t\t\t\tObject.defineProperty(er, 'stack', {\n\t\t\t\t\t\tvalue: enhanceStackTrace.call(this, er, capture as Error),\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t});\n\t\t\t\t} catch {\n\t\t\t\t\t// Continue regardless of error\n\t\t\t\t}\n\n\t\t\t\tthrow er; // Unhandled 'error' event\n\t\t\t}\n\n\t\t\tconst stringifiedError = String(er);\n\n\t\t\t// Give some error to user\n\t\t\tconst err = new Error(`Unhandled 'error' event emitted, received ${stringifiedError}`);\n\t\t\t// @ts-expect-error Add context to error too\n\t\t\terr.context = er;\n\n\t\t\tthrow err; // Unhandled 'error' event\n\t\t}\n\n\t\tconst handlers = events[eventName];\n\n\t\tif (handlers === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (typeof handlers === 'function') {\n\t\t\tconst result = handlers.apply(this, args);\n\n\t\t\tif (result !== undefined && result !== null) {\n\t\t\t\thandleMaybeAsync(this, result);\n\t\t\t}\n\t\t} else {\n\t\t\tconst len = handlers.length;\n\t\t\tconst listeners = arrayClone(handlers as InternalEventMap);\n\n\t\t\tfor (let i = 0; i < len; ++i) {\n\t\t\t\t// We call all listeners regardless of the result, as we already handle possible error emits in the wrapped func\n\t\t\t\tconst result = listeners[i].apply(this, args);\n\n\t\t\t\tif (result !== undefined && result !== null) {\n\t\t\t\t\thandleMaybeAsync(this, result);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic listenerCount<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K): number {\n\t\tconst events = this._events;\n\n\t\tif (events === undefined) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tconst eventListeners = events[eventName];\n\n\t\tif (typeof eventListeners === 'function') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn eventListeners?.length ?? 0;\n\t}\n\n\tpublic prependListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\tvalidateListener(listener);\n\n\t\tconst wrapped = this._wrapListener(eventName, listener, false);\n\n\t\tthis._addListener(eventName, wrapped, true);\n\n\t\treturn this;\n\t}\n\n\tpublic prependOnceListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\tvalidateListener(listener);\n\n\t\tconst wrapped = this._wrapListener(eventName, listener, true);\n\n\t\tthis._addListener(eventName, wrapped, true);\n\n\t\treturn this;\n\t}\n\n\tpublic eventNames(): (keyof Events | keyof AsyncEventEmitterPredefinedEvents)[] {\n\t\treturn this._eventCount > 0 ? Reflect.ownKeys(this._events) : [];\n\t}\n\n\tpublic async waitForAllListenersToComplete() {\n\t\tconst promises = [...this._internalPromiseMap.values()];\n\n\t\tif (promises.length === 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tawait Promise.all(promises);\n\n\t\treturn true;\n\t}\n\n\tprivate _addListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\twrappedListener: Listener | WrappedOnce,\n\t\tprepend: boolean\n\t) {\n\t\t// Emit newListener first in the event someone is listening for it\n\t\tif (this._events.newListener !== undefined) {\n\t\t\t// Thanks TypeScript for the cast...\n\t\t\tthis.emit('newListener', eventName as string | symbol, (wrappedListener as WrappedOnce).listener ?? wrappedListener);\n\t\t}\n\n\t\tlet existing = this._events[eventName];\n\n\t\tif (existing === undefined) {\n\t\t\t// eslint-disable-next-line no-multi-assign\n\t\t\texisting = this._events[eventName] = wrappedListener;\n\t\t\t++this._eventCount;\n\t\t} else if (typeof existing === 'function') {\n\t\t\t// Adding the second element, need to change to array.\n\t\t\t// eslint-disable-next-line no-multi-assign\n\t\t\texisting = this._events[eventName] = prepend ? [wrappedListener, existing] : [existing, wrappedListener];\n\t\t\t// If we've already got an array, just append.\n\t\t} else if (prepend) {\n\t\t\texisting.unshift(wrappedListener);\n\t\t} else {\n\t\t\texisting.push(wrappedListener);\n\t\t}\n\n\t\tif (this._maxListeners > 0 && existing.length > this._maxListeners && !existing._hasWarnedAboutMaxListeners) {\n\t\t\texisting._hasWarnedAboutMaxListeners = true;\n\t\t\tconst warningMessage = [\n\t\t\t\t`Possible AsyncEventEmitter memory leak detected. ${existing.length} ${String(eventName)} listeners added to ${\n\t\t\t\t\tthis.constructor.name\n\t\t\t\t}.`,\n\t\t\t\t`Use emitter.setMaxListeners() to increase the limit.`\n\t\t\t].join(' ');\n\t\t\tconsole.warn(warningMessage);\n\t\t}\n\t}\n\n\tprivate _wrapListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => Awaitable<void>,\n\t\tonce: boolean\n\t): Listener | WrappedOnce {\n\t\tif (!once) {\n\t\t\treturn listener as Listener;\n\t\t}\n\n\t\tconst state = {\n\t\t\tfired: false,\n\t\t\twrapFn: undefined!,\n\t\t\teventEmitter: this,\n\t\t\teventName,\n\t\t\tlistener\n\t\t} as WrappedOnceState<K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]>;\n\n\t\tconst aliased = onceWrapper<K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]>;\n\n\t\tconst wrapped = aliased.bind(state) as WrappedOnce<\n\t\t\tK extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]\n\t\t>;\n\t\twrapped.listener = listener;\n\t\tstate.wrapFn = wrapped;\n\n\t\treturn wrapped as WrappedOnce;\n\t}\n\n\tpublic static listenerCount<\n\t\tEmitter extends AsyncEventEmitter<any>,\n\t\tEventNames = Emitter extends AsyncEventEmitter<infer Events> ? Events : never,\n\t\tEventName extends PropertyKey = EventNames extends never ? string | symbol : keyof EventNames\n\t>(emitter: Emitter, eventName: EventName | keyof AsyncEventEmitterPredefinedEvents) {\n\t\treturn emitter.listenerCount(eventName);\n\t}\n\n\tpublic static async once<\n\t\tEmitter extends AsyncEventEmitter<any>,\n\t\tEventNames extends Record<PropertyKey, unknown[]> = Emitter extends AsyncEventEmitter<infer Events> ? Events : Record<PropertyKey, unknown[]>,\n\t\tEventName extends PropertyKey = keyof EventNames | keyof AsyncEventEmitterPredefinedEvents,\n\t\tEventResult extends unknown[] = EventName extends keyof AsyncEventEmitterPredefinedEvents\n\t\t\t? AsyncEventEmitterPredefinedEvents[EventName]\n\t\t\t: EventNames[EventName]\n\t>(emitter: Emitter, eventName: EventName, options: AbortableMethods = {}) {\n\t\tconst signal = options?.signal;\n\t\tvalidateAbortSignal(signal);\n\n\t\tif (signal?.aborted) {\n\t\t\tthrow new AbortError(undefined, { cause: getReason(signal) });\n\t\t}\n\n\t\treturn new Promise<EventResult>((resolve, reject) => {\n\t\t\tconst errorListener = (err: unknown) => {\n\t\t\t\temitter.removeListener(eventName, resolver);\n\n\t\t\t\tif (signal) {\n\t\t\t\t\teventTargetAgnosticRemoveListener(emitter, eventName, abortListener);\n\t\t\t\t}\n\n\t\t\t\treject(err);\n\t\t\t};\n\n\t\t\tconst resolver = (...args: unknown[]) => {\n\t\t\t\temitter.removeListener('error', errorListener);\n\n\t\t\t\tif (signal) {\n\t\t\t\t\teventTargetAgnosticRemoveListener(signal, 'abort', abortListener);\n\t\t\t\t}\n\n\t\t\t\tresolve(args as EventResult);\n\t\t\t};\n\n\t\t\temitter.once(eventName, resolver);\n\t\t\tif (eventName !== 'error') {\n\t\t\t\temitter.once('error', errorListener);\n\t\t\t}\n\n\t\t\tconst abortListener = () => {\n\t\t\t\teventTargetAgnosticRemoveListener(emitter, eventName, resolver);\n\t\t\t\teventTargetAgnosticRemoveListener(emitter, 'error', errorListener);\n\t\t\t\treject(new AbortError(undefined, { cause: getReason(signal) }));\n\t\t\t};\n\n\t\t\tif (signal) {\n\t\t\t\teventTargetAgnosticAddListener(signal, 'abort', abortListener, { once: true });\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic static on<\n\t\tEmitter extends AsyncEventEmitter<any>,\n\t\tEventNames extends Record<PropertyKey, unknown[]> = Emitter extends AsyncEventEmitter<infer Events> ? Events : Record<PropertyKey, unknown[]>,\n\t\tEventName extends PropertyKey = keyof EventNames | keyof AsyncEventEmitterPredefinedEvents,\n\t\tEventResult extends unknown[] = EventName extends keyof AsyncEventEmitterPredefinedEvents\n\t\t\t? AsyncEventEmitterPredefinedEvents[EventName]\n\t\t\t: EventNames[EventName]\n\t>(emitter: Emitter, eventName: EventName, options: AbortableMethods = {}): AsyncGenerator<EventResult, void> {\n\t\tconst signal = options?.signal;\n\t\tvalidateAbortSignal(signal);\n\n\t\tif (signal?.aborted) {\n\t\t\tthrow new AbortError(undefined, { cause: getReason(signal) });\n\t\t}\n\n\t\tconst unconsumedEvents: unknown[][] = [];\n\t\tconst unconsumedPromises: { resolve: (value?: unknown) => void; reject: (reason?: unknown) => void }[] = [];\n\t\tlet error: unknown = null;\n\t\tlet finished = false;\n\n\t\tconst abortListener = () => {\n\t\t\terrorHandler(new AbortError(undefined, { cause: getReason(signal) }));\n\t\t};\n\n\t\tconst eventHandler = (...args: unknown[]) => {\n\t\t\tconst promise = unconsumedPromises.shift();\n\t\t\tif (promise) {\n\t\t\t\tpromise.resolve(createIterResult(args, false));\n\t\t\t} else {\n\t\t\t\tunconsumedEvents.push(args);\n\t\t\t}\n\t\t};\n\n\t\tconst errorHandler = (err: unknown) => {\n\t\t\tfinished = true;\n\n\t\t\tconst toError = unconsumedPromises.shift();\n\n\t\t\tif (toError) {\n\t\t\t\ttoError.reject(err);\n\t\t\t} else {\n\t\t\t\terror = err;\n\t\t\t}\n\n\t\t\tvoid iterator.return();\n\t\t};\n\n\t\tconst iterator: AsyncGenerator<EventResult, void> = Object.setPrototypeOf(\n\t\t\t{\n\t\t\t\tnext() {\n\t\t\t\t\t// First, we consume all unread events\n\t\t\t\t\tconst value = unconsumedEvents.shift();\n\t\t\t\t\tif (value) {\n\t\t\t\t\t\treturn Promise.resolve(createIterResult(value, false));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Then we error, if an error happened\n\t\t\t\t\t// This happens one time if at all, because after 'error'\n\t\t\t\t\t// we stop listening\n\t\t\t\t\tif (error) {\n\t\t\t\t\t\tconst p = Promise.reject(error);\n\t\t\t\t\t\t// Only the first element errors\n\t\t\t\t\t\terror = null;\n\t\t\t\t\t\treturn p;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the iterator is finished, resolve to done\n\t\t\t\t\tif (finished) {\n\t\t\t\t\t\treturn Promise.resolve(createIterResult(undefined, true));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Wait until an event happens\n\t\t\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t\t\tunconsumedPromises.push({ resolve, reject });\n\t\t\t\t\t});\n\t\t\t\t},\n\n\t\t\t\treturn() {\n\t\t\t\t\temitter.off(eventName, eventHandler);\n\t\t\t\t\temitter.off('error', errorHandler);\n\n\t\t\t\t\tif (signal) {\n\t\t\t\t\t\teventTargetAgnosticRemoveListener(signal, 'abort', abortListener);\n\t\t\t\t\t}\n\n\t\t\t\t\tfinished = true;\n\n\t\t\t\t\tconst doneResult = createIterResult(undefined, true);\n\t\t\t\t\tfor (const promise of unconsumedPromises) {\n\t\t\t\t\t\tpromise.resolve(doneResult);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Promise.resolve(doneResult);\n\t\t\t\t},\n\n\t\t\t\tthrow(err: unknown) {\n\t\t\t\t\tif (!err || !(err instanceof Error)) {\n\t\t\t\t\t\tthrow new TypeError(`Expected Error instance to be thrown in AsyncEventEmitter.AsyncIterator. Got ${err}`);\n\t\t\t\t\t}\n\n\t\t\t\t\terror = err;\n\t\t\t\t\temitter.off(eventName, eventHandler);\n\t\t\t\t\temitter.off('error', errorHandler);\n\t\t\t\t},\n\n\t\t\t\t[Symbol.asyncIterator]() {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t},\n\t\t\tAsyncIteratorPrototype\n\t\t);\n\n\t\temitter.on(eventName, eventHandler);\n\t\tif (eventName !== 'error') {\n\t\t\temitter.on('error', errorHandler);\n\t\t}\n\n\t\tif (signal) {\n\t\t\teventTargetAgnosticAddListener(signal, 'abort', abortListener);\n\t\t}\n\n\t\treturn iterator;\n\t}\n}\n\nexport interface AsyncEventEmitterPredefinedEvents {\n\tnewListener: [eventName: string | symbol, listener: (...args: any[]) => Awaitable<void>];\n\tremoveListener: [eventName: string | symbol, listener: (...args: any[]) => Awaitable<void>];\n}\n\ninterface WrappedOnceState<Args extends any[] = any[]> {\n\tlistener: (...args: Args) => Awaitable<void>;\n\tfired: boolean;\n\teventName: string | symbol;\n\teventEmitter: AsyncEventEmitter<any>;\n\twrapFn: (...args: Args) => Awaitable<void>;\n}\n\nexport interface WrappedOnce<Args extends any[] = any[]> {\n\t(...args: Args): Awaitable<void>;\n\tlistener: (...args: Args) => Awaitable<void>;\n\t_hasWarnedAboutMaxListeners?: boolean;\n}\n\nexport interface Listener<Args extends any[] = any[]> {\n\t(...args: Args): Awaitable<void>;\n\tlistener: (...args: Args) => Awaitable<void>;\n\t_hasWarnedAboutMaxListeners?: boolean;\n}\n\nexport type Awaitable<T> = T | Promise<T>;\n\nexport interface AbortableMethods {\n\tsignal?: AbortSignal;\n}\n\n// @ts-ignore Not all paths returning is fine just fine:tm:\nfunction onceWrapper<Args extends any[] = any[]>(this: WrappedOnceState<Args>) {\n\tif (!this.fired) {\n\t\tthis.eventEmitter.removeListener(this.eventName, this.wrapFn);\n\t\tthis.fired = true;\n\t\t// eslint-disable-next-line @typescript-eslint/dot-notation\n\t\tif (arguments.length === 0) {\n\t\t\t// @ts-expect-error Types can be hell\n\t\t\treturn this.listener.call(this.eventEmitter);\n\t\t}\n\n\t\t// eslint-disable-next-line prefer-rest-params\n\t\treturn this.listener.apply(this.eventEmitter, arguments as unknown as Args);\n\t}\n}\n\n/**\n * A TypeScript not-compliant way of accessing AbortSignal#reason\n * Because DOM types have it, NodeJS types don't. -w-\n */\nfunction getReason(signal: any) {\n\treturn signal?.reason;\n}\n\nfunction eventTargetAgnosticRemoveListener(emitter: any, name: PropertyKey, listener: (...args: unknown[]) => any, flags?: InternalAgnosticFlags) {\n\tif (typeof emitter.off === 'function') {\n\t\temitter.off(name, listener);\n\t} else if (typeof emitter.removeEventListener === 'function') {\n\t\temitter.removeEventListener(name, listener, flags);\n\t}\n}\n\nfunction eventTargetAgnosticAddListener(emitter: any, name: string | symbol, listener: (...args: unknown[]) => any, flags?: InternalAgnosticFlags) {\n\tif (typeof emitter.on === 'function') {\n\t\tif (flags?.once) {\n\t\t\temitter.once!(name, listener);\n\t\t} else {\n\t\t\temitter.on(name, listener);\n\t\t}\n\t} else if (typeof emitter.addEventListener === 'function') {\n\t\temitter.addEventListener(name, listener, flags);\n\t}\n}\n\ninterface InternalAgnosticFlags {\n\tonce?: boolean;\n}\n\n// eslint-disable-next-line func-names, @typescript-eslint/no-empty-function\nconst AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function* () {}).prototype);\n\nfunction createIterResult(value: unknown, done: boolean) {\n\treturn { value, done };\n}\n\nexport interface AbortErrorOptions {\n\tcause?: unknown;\n}\n\nexport class AbortError extends Error {\n\tpublic readonly code = 'ABORT_ERR';\n\tpublic override readonly name = 'AbortError';\n\n\tpublic constructor(message = 'The operation was aborted', options: AbortErrorOptions | undefined = undefined) {\n\t\tif (options !== undefined && typeof options !== 'object') {\n\t\t\tthrow new TypeError(`Failed to create AbortError: options is not an object or undefined`);\n\t\t}\n\n\t\tsuper(message, options);\n\t}\n}\n\nfunction handleMaybeAsync(emitter: AsyncEventEmitter<any>, result: any) {\n\ttry {\n\t\tconst fin = result.finally;\n\n\t\tif (typeof fin === 'function') {\n\t\t\tconst promiseId = String(++emitter['_wrapperId']);\n\t\t\temitter['_internalPromiseMap'].set(promiseId, result);\n\t\t\tfin.call(result, function final() {\n\t\t\t\temitter['_internalPromiseMap'].delete(promiseId);\n\t\t\t});\n\t\t}\n\t} catch (err) {\n\t\temitter.emit('error', err);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;A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OAAO,SAAS;AAAA,QAChD,GAFiB,QAEhB;AAAA,MACF;AAAA,IACD,SAAS,KAAP;AACD,cAAQ,KAAK,SAAS,GAAG;AAAA,IAC1B;AAAA,EACD;AAdS;","names":[]} \ No newline at end of file
diff --git a/node_modules/@vladfrangu/async_event_emitter/dist/index.js b/node_modules/@vladfrangu/async_event_emitter/dist/index.js
new file mode 100644
index 0000000..c542899
--- /dev/null
+++ b/node_modules/@vladfrangu/async_event_emitter/dist/index.js
@@ -0,0 +1,571 @@
+"use strict";
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/index.ts
+var src_exports = {};
+__export(src_exports, {
+ AbortError: () => AbortError,
+ AsyncEventEmitter: () => AsyncEventEmitter
+});
+module.exports = __toCommonJS(src_exports);
+function validateListener(input) {
+ if (typeof input !== "function") {
+ throw new TypeError(`The listener argument must be a function. Received ${typeof input}`);
+ }
+}
+__name(validateListener, "validateListener");
+function validateAbortSignal(input) {
+ if (input && !(input instanceof AbortSignal)) {
+ throw new TypeError(`The signal option must be an AbortSignal. Received ${input}`);
+ }
+}
+__name(validateAbortSignal, "validateAbortSignal");
+function spliceOne(list, index) {
+ for (; index + 1 < list.length; index++) {
+ list[index] = list[index + 1];
+ }
+ list.pop();
+}
+__name(spliceOne, "spliceOne");
+function arrayClone(arr) {
+ switch (arr.length) {
+ case 2:
+ return [arr[0], arr[1]];
+ case 3:
+ return [arr[0], arr[1], arr[2]];
+ case 4:
+ return [arr[0], arr[1], arr[2], arr[3]];
+ case 5:
+ return [arr[0], arr[1], arr[2], arr[3], arr[4]];
+ case 6:
+ return [arr[0], arr[1], arr[2], arr[3], arr[4], arr[5]];
+ }
+ return arr.slice();
+}
+__name(arrayClone, "arrayClone");
+function identicalSequenceRange(a, b) {
+ for (let i = 0; i < a.length - 3; i++) {
+ const pos = b.indexOf(a[i]);
+ if (pos !== -1) {
+ const rest = b.length - pos;
+ if (rest > 3) {
+ let len = 1;
+ const maxLen = Math.min(a.length - i, rest);
+ while (maxLen > len && a[i + len] === b[pos + len]) {
+ len++;
+ }
+ if (len > 3) {
+ return [len, i];
+ }
+ }
+ }
+ }
+ return [0, 0];
+}
+__name(identicalSequenceRange, "identicalSequenceRange");
+function enhanceStackTrace(err, own) {
+ let ctorInfo = "";
+ try {
+ const { name } = this.constructor;
+ if (name !== "AsyncEventEmitter")
+ ctorInfo = ` on ${name} instance`;
+ } catch {
+ }
+ const sep = `
+Emitted 'error' event${ctorInfo} at:
+`;
+ const errStack = err.stack.split("\n").slice(1);
+ const ownStack = own.stack.split("\n").slice(1);
+ const { 0: len, 1: off } = identicalSequenceRange(ownStack, errStack);
+ if (len > 0) {
+ ownStack.splice(off + 1, len - 2, " [... lines matching original stack trace ...]");
+ }
+ return err.stack + sep + ownStack.join("\n");
+}
+__name(enhanceStackTrace, "enhanceStackTrace");
+var AsyncEventEmitter = class {
+ constructor() {
+ this._events = {
+ __proto__: null
+ };
+ this._eventCount = 0;
+ this._maxListeners = 10;
+ this._internalPromiseMap = /* @__PURE__ */ new Map();
+ this._wrapperId = 0n;
+ }
+ addListener(eventName, listener) {
+ validateListener(listener);
+ const wrapped = this._wrapListener(eventName, listener, false);
+ this._addListener(eventName, wrapped, false);
+ return this;
+ }
+ on(eventName, listener) {
+ return this.addListener(eventName, listener);
+ }
+ once(eventName, listener) {
+ validateListener(listener);
+ const wrapped = this._wrapListener(eventName, listener, true);
+ this._addListener(eventName, wrapped, false);
+ return this;
+ }
+ removeListener(eventName, listener) {
+ validateListener(listener);
+ const events = this._events;
+ const eventList = events[eventName];
+ if (eventList === void 0) {
+ return this;
+ }
+ if (eventList === listener || eventList.listener === listener) {
+ if (--this._eventCount === 0) {
+ this._events = { __proto__: null };
+ } else {
+ delete events[eventName];
+ if (events.removeListener) {
+ this.emit("removeListener", eventName, eventList.listener ?? eventList);
+ }
+ }
+ } else if (typeof eventList !== "function") {
+ let position = -1;
+ for (let i = eventList.length - 1; i >= 0; i--) {
+ if (eventList[i] === listener || eventList[i].listener === listener) {
+ position = i;
+ break;
+ }
+ }
+ if (position < 0) {
+ return this;
+ }
+ if (position === 0) {
+ eventList.shift();
+ } else {
+ spliceOne(eventList, position);
+ }
+ if (eventList.length === 0) {
+ delete events[eventName];
+ --this._eventCount;
+ }
+ if (events.removeListener !== void 0) {
+ this.emit("removeListener", eventName, listener);
+ }
+ }
+ return this;
+ }
+ off(eventName, listener) {
+ return this.removeListener(eventName, listener);
+ }
+ removeAllListeners(event) {
+ const events = this._events;
+ if (events.removeListener === void 0) {
+ if (!event) {
+ this._events = { __proto__: null };
+ this._eventCount = 0;
+ } else if (events[event] !== void 0) {
+ if (--this._eventCount === 0) {
+ this._events = { __proto__: null };
+ } else {
+ delete events[event];
+ }
+ }
+ return this;
+ }
+ if (!event) {
+ for (const key of Reflect.ownKeys(events)) {
+ if (key === "removeListener") {
+ continue;
+ }
+ this.removeAllListeners(key);
+ }
+ this.removeAllListeners("removeListener");
+ this._events = { __proto__: null };
+ this._eventCount = 0;
+ return this;
+ }
+ const listeners = events[event];
+ if (typeof listeners === "function") {
+ this.removeListener(event, listeners);
+ } else if (listeners !== void 0) {
+ for (let i = listeners.length - 1; i >= 0; i--) {
+ this.removeListener(event, listeners[i]);
+ }
+ }
+ return this;
+ }
+ setMaxListeners(n) {
+ if (typeof n !== "number" || n < 0 || Number.isNaN(n)) {
+ throw new RangeError(`Expected to get a non-negative number for "setMaxListeners", got ${n} instead`);
+ }
+ this._maxListeners = n;
+ return this;
+ }
+ getMaxListeners() {
+ return this._maxListeners;
+ }
+ listeners(eventName) {
+ const eventList = this._events[eventName];
+ if (eventList === void 0) {
+ return [];
+ }
+ if (typeof eventList === "function") {
+ return [eventList.listener ?? eventList];
+ }
+ const ret = arrayClone(eventList);
+ for (let i = 0; i < ret.length; ++i) {
+ const orig = ret[i].listener;
+ if (typeof orig === "function") {
+ ret[i] = orig;
+ }
+ }
+ return ret;
+ }
+ rawListeners(eventName) {
+ const eventList = this._events[eventName];
+ if (eventList === void 0) {
+ return [];
+ }
+ if (typeof eventList === "function") {
+ return [eventList];
+ }
+ return arrayClone(eventList);
+ }
+ emit(eventName, ...args) {
+ let doError = eventName === "error";
+ const events = this._events;
+ if (events !== void 0) {
+ doError = doError && events.error === void 0;
+ } else if (!doError) {
+ return false;
+ }
+ if (doError) {
+ let er;
+ if (args.length > 0) {
+ er = args[0];
+ }
+ if (er instanceof Error) {
+ try {
+ const capture = {};
+ Error.captureStackTrace(capture, AsyncEventEmitter.prototype.emit);
+ Object.defineProperty(er, "stack", {
+ value: enhanceStackTrace.call(this, er, capture),
+ configurable: true
+ });
+ } catch {
+ }
+ throw er; // Unhandled 'error' event
+ }
+ const stringifiedError = String(er);
+ const err = new Error(`Unhandled 'error' event emitted, received ${stringifiedError}`);
+ err.context = er;
+ throw err; // Unhandled 'error' event
+ }
+ const handlers = events[eventName];
+ if (handlers === void 0) {
+ return false;
+ }
+ if (typeof handlers === "function") {
+ const result = handlers.apply(this, args);
+ if (result !== void 0 && result !== null) {
+ handleMaybeAsync(this, result);
+ }
+ } else {
+ const len = handlers.length;
+ const listeners = arrayClone(handlers);
+ for (let i = 0; i < len; ++i) {
+ const result = listeners[i].apply(this, args);
+ if (result !== void 0 && result !== null) {
+ handleMaybeAsync(this, result);
+ }
+ }
+ }
+ return true;
+ }
+ listenerCount(eventName) {
+ const events = this._events;
+ if (events === void 0) {
+ return 0;
+ }
+ const eventListeners = events[eventName];
+ if (typeof eventListeners === "function") {
+ return 1;
+ }
+ return eventListeners?.length ?? 0;
+ }
+ prependListener(eventName, listener) {
+ validateListener(listener);
+ const wrapped = this._wrapListener(eventName, listener, false);
+ this._addListener(eventName, wrapped, true);
+ return this;
+ }
+ prependOnceListener(eventName, listener) {
+ validateListener(listener);
+ const wrapped = this._wrapListener(eventName, listener, true);
+ this._addListener(eventName, wrapped, true);
+ return this;
+ }
+ eventNames() {
+ return this._eventCount > 0 ? Reflect.ownKeys(this._events) : [];
+ }
+ async waitForAllListenersToComplete() {
+ const promises = [...this._internalPromiseMap.values()];
+ if (promises.length === 0) {
+ return false;
+ }
+ await Promise.all(promises);
+ return true;
+ }
+ _addListener(eventName, wrappedListener, prepend) {
+ if (this._events.newListener !== void 0) {
+ this.emit("newListener", eventName, wrappedListener.listener ?? wrappedListener);
+ }
+ let existing = this._events[eventName];
+ if (existing === void 0) {
+ existing = this._events[eventName] = wrappedListener;
+ ++this._eventCount;
+ } else if (typeof existing === "function") {
+ existing = this._events[eventName] = prepend ? [wrappedListener, existing] : [existing, wrappedListener];
+ } else if (prepend) {
+ existing.unshift(wrappedListener);
+ } else {
+ existing.push(wrappedListener);
+ }
+ if (this._maxListeners > 0 && existing.length > this._maxListeners && !existing._hasWarnedAboutMaxListeners) {
+ existing._hasWarnedAboutMaxListeners = true;
+ const warningMessage = [
+ `Possible AsyncEventEmitter memory leak detected. ${existing.length} ${String(eventName)} listeners added to ${this.constructor.name}.`,
+ `Use emitter.setMaxListeners() to increase the limit.`
+ ].join(" ");
+ console.warn(warningMessage);
+ }
+ }
+ _wrapListener(eventName, listener, once) {
+ if (!once) {
+ return listener;
+ }
+ const state = {
+ fired: false,
+ wrapFn: void 0,
+ eventEmitter: this,
+ eventName,
+ listener
+ };
+ const aliased = onceWrapper;
+ const wrapped = aliased.bind(state);
+ wrapped.listener = listener;
+ state.wrapFn = wrapped;
+ return wrapped;
+ }
+ static listenerCount(emitter, eventName) {
+ return emitter.listenerCount(eventName);
+ }
+ static async once(emitter, eventName, options = {}) {
+ const signal = options?.signal;
+ validateAbortSignal(signal);
+ if (signal?.aborted) {
+ throw new AbortError(void 0, { cause: getReason(signal) });
+ }
+ return new Promise((resolve, reject) => {
+ const errorListener = /* @__PURE__ */ __name((err) => {
+ emitter.removeListener(eventName, resolver);
+ if (signal) {
+ eventTargetAgnosticRemoveListener(emitter, eventName, abortListener);
+ }
+ reject(err);
+ }, "errorListener");
+ const resolver = /* @__PURE__ */ __name((...args) => {
+ emitter.removeListener("error", errorListener);
+ if (signal) {
+ eventTargetAgnosticRemoveListener(signal, "abort", abortListener);
+ }
+ resolve(args);
+ }, "resolver");
+ emitter.once(eventName, resolver);
+ if (eventName !== "error") {
+ emitter.once("error", errorListener);
+ }
+ const abortListener = /* @__PURE__ */ __name(() => {
+ eventTargetAgnosticRemoveListener(emitter, eventName, resolver);
+ eventTargetAgnosticRemoveListener(emitter, "error", errorListener);
+ reject(new AbortError(void 0, { cause: getReason(signal) }));
+ }, "abortListener");
+ if (signal) {
+ eventTargetAgnosticAddListener(signal, "abort", abortListener, { once: true });
+ }
+ });
+ }
+ static on(emitter, eventName, options = {}) {
+ const signal = options?.signal;
+ validateAbortSignal(signal);
+ if (signal?.aborted) {
+ throw new AbortError(void 0, { cause: getReason(signal) });
+ }
+ const unconsumedEvents = [];
+ const unconsumedPromises = [];
+ let error = null;
+ let finished = false;
+ const abortListener = /* @__PURE__ */ __name(() => {
+ errorHandler(new AbortError(void 0, { cause: getReason(signal) }));
+ }, "abortListener");
+ const eventHandler = /* @__PURE__ */ __name((...args) => {
+ const promise = unconsumedPromises.shift();
+ if (promise) {
+ promise.resolve(createIterResult(args, false));
+ } else {
+ unconsumedEvents.push(args);
+ }
+ }, "eventHandler");
+ const errorHandler = /* @__PURE__ */ __name((err) => {
+ finished = true;
+ const toError = unconsumedPromises.shift();
+ if (toError) {
+ toError.reject(err);
+ } else {
+ error = err;
+ }
+ void iterator.return();
+ }, "errorHandler");
+ const iterator = Object.setPrototypeOf(
+ {
+ next() {
+ const value = unconsumedEvents.shift();
+ if (value) {
+ return Promise.resolve(createIterResult(value, false));
+ }
+ if (error) {
+ const p = Promise.reject(error);
+ error = null;
+ return p;
+ }
+ if (finished) {
+ return Promise.resolve(createIterResult(void 0, true));
+ }
+ return new Promise((resolve, reject) => {
+ unconsumedPromises.push({ resolve, reject });
+ });
+ },
+ return() {
+ emitter.off(eventName, eventHandler);
+ emitter.off("error", errorHandler);
+ if (signal) {
+ eventTargetAgnosticRemoveListener(signal, "abort", abortListener);
+ }
+ finished = true;
+ const doneResult = createIterResult(void 0, true);
+ for (const promise of unconsumedPromises) {
+ promise.resolve(doneResult);
+ }
+ return Promise.resolve(doneResult);
+ },
+ throw(err) {
+ if (!err || !(err instanceof Error)) {
+ throw new TypeError(`Expected Error instance to be thrown in AsyncEventEmitter.AsyncIterator. Got ${err}`);
+ }
+ error = err;
+ emitter.off(eventName, eventHandler);
+ emitter.off("error", errorHandler);
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ }
+ },
+ AsyncIteratorPrototype
+ );
+ emitter.on(eventName, eventHandler);
+ if (eventName !== "error") {
+ emitter.on("error", errorHandler);
+ }
+ if (signal) {
+ eventTargetAgnosticAddListener(signal, "abort", abortListener);
+ }
+ return iterator;
+ }
+};
+__name(AsyncEventEmitter, "AsyncEventEmitter");
+function onceWrapper() {
+ if (!this.fired) {
+ this.eventEmitter.removeListener(this.eventName, this.wrapFn);
+ this.fired = true;
+ if (arguments.length === 0) {
+ return this.listener.call(this.eventEmitter);
+ }
+ return this.listener.apply(this.eventEmitter, arguments);
+ }
+}
+__name(onceWrapper, "onceWrapper");
+function getReason(signal) {
+ return signal?.reason;
+}
+__name(getReason, "getReason");
+function eventTargetAgnosticRemoveListener(emitter, name, listener, flags) {
+ if (typeof emitter.off === "function") {
+ emitter.off(name, listener);
+ } else if (typeof emitter.removeEventListener === "function") {
+ emitter.removeEventListener(name, listener, flags);
+ }
+}
+__name(eventTargetAgnosticRemoveListener, "eventTargetAgnosticRemoveListener");
+function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
+ if (typeof emitter.on === "function") {
+ if (flags?.once) {
+ emitter.once(name, listener);
+ } else {
+ emitter.on(name, listener);
+ }
+ } else if (typeof emitter.addEventListener === "function") {
+ emitter.addEventListener(name, listener, flags);
+ }
+}
+__name(eventTargetAgnosticAddListener, "eventTargetAgnosticAddListener");
+var AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function* () {
+}).prototype);
+function createIterResult(value, done) {
+ return { value, done };
+}
+__name(createIterResult, "createIterResult");
+var AbortError = class extends Error {
+ constructor(message = "The operation was aborted", options = void 0) {
+ if (options !== void 0 && typeof options !== "object") {
+ throw new TypeError(`Failed to create AbortError: options is not an object or undefined`);
+ }
+ super(message, options);
+ this.code = "ABORT_ERR";
+ this.name = "AbortError";
+ }
+};
+__name(AbortError, "AbortError");
+function handleMaybeAsync(emitter, result) {
+ try {
+ const fin = result.finally;
+ if (typeof fin === "function") {
+ const promiseId = String(++emitter["_wrapperId"]);
+ emitter["_internalPromiseMap"].set(promiseId, result);
+ fin.call(result, /* @__PURE__ */ __name(function final() {
+ emitter["_internalPromiseMap"].delete(promiseId);
+ }, "final"));
+ }
+ } catch (err) {
+ emitter.emit("error", err);
+ }
+}
+__name(handleMaybeAsync, "handleMaybeAsync");
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ AbortError,
+ AsyncEventEmitter
+});
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/@vladfrangu/async_event_emitter/dist/index.js.map b/node_modules/@vladfrangu/async_event_emitter/dist/index.js.map
new file mode 100644
index 0000000..776cb0c
--- /dev/null
+++ b/node_modules/@vladfrangu/async_event_emitter/dist/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/dot-notation */\nfunction validateListener(input: unknown): asserts input is (...args: unknown[]) => Awaitable<void> {\n\tif (typeof input !== 'function') {\n\t\tthrow new TypeError(`The listener argument must be a function. Received ${typeof input}`);\n\t}\n}\n\nfunction validateAbortSignal(input: unknown): asserts input is AbortSignal | undefined {\n\t// Only validate that the signal is a signal if its defined\n\tif (input && !(input instanceof AbortSignal)) {\n\t\tthrow new TypeError(`The signal option must be an AbortSignal. Received ${input}`);\n\t}\n}\n\n// Inspired from https://github.com/nodejs/node/blob/42ad967d68137df1a80a877e7b5ad56403fc157f/lib/internal/util.js#L397\nfunction spliceOne(list: unknown[], index: number) {\n\tfor (; index + 1 < list.length; index++) {\n\t\tlist[index] = list[index + 1];\n\t}\n\n\tlist.pop();\n}\n\n// Inspired from https://github.com/nodejs/node/blob/42ad967d68137df1a80a877e7b5ad56403fc157f/lib/events.js#L889\nfunction arrayClone<T extends unknown[]>(arr: T): T {\n\t// At least since V8 8.3, this implementation is faster than the previous\n\t// which always used a simple for-loop\n\tswitch (arr.length) {\n\t\tcase 2:\n\t\t\treturn [arr[0], arr[1]] as T;\n\t\tcase 3:\n\t\t\treturn [arr[0], arr[1], arr[2]] as T;\n\t\tcase 4:\n\t\t\treturn [arr[0], arr[1], arr[2], arr[3]] as T;\n\t\tcase 5:\n\t\t\treturn [arr[0], arr[1], arr[2], arr[3], arr[4]] as T;\n\t\tcase 6:\n\t\t\treturn [arr[0], arr[1], arr[2], arr[3], arr[4], arr[5]] as T;\n\t}\n\n\treturn arr.slice() as T;\n}\n\n// Inspired from https://github.com/nodejs/node/blob/42ad967d68137df1a80a877e7b5ad56403fc157f/lib/events.js#L427-L475\nfunction identicalSequenceRange(a: unknown[], b: unknown[]): [number, number] {\n\tfor (let i = 0; i < a.length - 3; i++) {\n\t\t// Find the first entry of b that matches the current entry of a.\n\t\tconst pos = b.indexOf(a[i]);\n\t\tif (pos !== -1) {\n\t\t\tconst rest = b.length - pos;\n\t\t\tif (rest > 3) {\n\t\t\t\tlet len = 1;\n\t\t\t\tconst maxLen = Math.min(a.length - i, rest);\n\t\t\t\t// Count the number of consecutive entries.\n\t\t\t\twhile (maxLen > len && a[i + len] === b[pos + len]) {\n\t\t\t\t\tlen++;\n\t\t\t\t}\n\t\t\t\tif (len > 3) {\n\t\t\t\t\treturn [len, i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn [0, 0];\n}\n\nfunction enhanceStackTrace(this: AsyncEventEmitter<any>, err: Error, own: Error) {\n\tlet ctorInfo = '';\n\ttry {\n\t\tconst { name } = this.constructor;\n\t\tif (name !== 'AsyncEventEmitter') ctorInfo = ` on ${name} instance`;\n\t} catch {\n\t\t// Continue regardless of error.\n\t}\n\tconst sep = `\\nEmitted 'error' event${ctorInfo} at:\\n`;\n\n\tconst errStack = err.stack!.split('\\n').slice(1);\n\tconst ownStack = own.stack!.split('\\n').slice(1);\n\n\tconst { 0: len, 1: off } = identicalSequenceRange(ownStack, errStack);\n\tif (len > 0) {\n\t\townStack.splice(off + 1, len - 2, ' [... lines matching original stack trace ...]');\n\t}\n\n\treturn err.stack + sep + ownStack.join('\\n');\n}\n\ninterface InternalEventMap extends Array<Listener | WrappedOnce> {\n\t_hasWarnedAboutMaxListeners?: boolean;\n}\n\nexport class AsyncEventEmitter<Events extends Record<PropertyKey, unknown[]> = Record<PropertyKey, unknown[]> & AsyncEventEmitterPredefinedEvents> {\n\tprivate _events: Record<keyof Events | keyof AsyncEventEmitterPredefinedEvents, Listener | WrappedOnce | InternalEventMap> = {\n\t\t__proto__: null\n\t} as Record<keyof Events | keyof AsyncEventEmitterPredefinedEvents, Listener | WrappedOnce | InternalEventMap>;\n\n\tprivate _eventCount = 0;\n\tprivate _maxListeners = 10;\n\tprivate _internalPromiseMap: Map<string, Promise<void>> = new Map();\n\tprivate _wrapperId = 0n;\n\n\tpublic addListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\tvalidateListener(listener);\n\n\t\tconst wrapped = this._wrapListener(eventName, listener, false);\n\n\t\tthis._addListener(eventName, wrapped, false);\n\n\t\treturn this;\n\t}\n\n\tpublic on<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\treturn this.addListener(eventName, listener);\n\t}\n\n\tpublic once<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\tvalidateListener(listener);\n\n\t\tconst wrapped = this._wrapListener(eventName, listener, true);\n\n\t\tthis._addListener(eventName, wrapped, false);\n\n\t\treturn this;\n\t}\n\n\tpublic removeListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\tvalidateListener(listener);\n\n\t\tconst events = this._events;\n\t\tconst eventList = events[eventName];\n\n\t\tif (eventList === undefined) {\n\t\t\treturn this;\n\t\t}\n\n\t\tif (eventList === listener || (eventList as WrappedOnce).listener === listener) {\n\t\t\tif (--this._eventCount === 0) {\n\t\t\t\tthis._events = { __proto__: null } as Record<\n\t\t\t\t\tkeyof Events | keyof AsyncEventEmitterPredefinedEvents,\n\t\t\t\t\tListener | WrappedOnce | InternalEventMap\n\t\t\t\t>;\n\t\t\t} else {\n\t\t\t\tdelete events[eventName];\n\t\t\t\tif (events.removeListener) {\n\t\t\t\t\tthis.emit('removeListener', eventName as string, (eventList as WrappedOnce).listener ?? eventList);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (typeof eventList !== 'function') {\n\t\t\tlet position = -1;\n\n\t\t\tfor (let i = eventList.length - 1; i >= 0; i--) {\n\t\t\t\tif (eventList[i] === listener || (eventList[i] as WrappedOnce).listener === listener) {\n\t\t\t\t\tposition = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (position < 0) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tif (position === 0) {\n\t\t\t\teventList.shift();\n\t\t\t} else {\n\t\t\t\tspliceOne(eventList, position);\n\t\t\t}\n\n\t\t\tif (eventList.length === 0) {\n\t\t\t\tdelete events[eventName];\n\t\t\t\t--this._eventCount;\n\t\t\t}\n\n\t\t\tif (events.removeListener !== undefined) {\n\t\t\t\t// Thanks TypeScript for the cast...\n\t\t\t\tthis.emit('removeListener', eventName as string | symbol, listener);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tpublic off<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\treturn this.removeListener(eventName, listener);\n\t}\n\n\tpublic removeAllListeners<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(event?: K | undefined): this {\n\t\tconst events = this._events;\n\n\t\t// Not listening for removeListener, no need to emit\n\t\tif (events.removeListener === undefined) {\n\t\t\tif (!event) {\n\t\t\t\tthis._events = { __proto__: null } as Record<keyof Events | keyof AsyncEventEmitterPredefinedEvents, InternalEventMap>;\n\t\t\t\tthis._eventCount = 0;\n\t\t\t} else if (events[event] !== undefined) {\n\t\t\t\tif (--this._eventCount === 0) {\n\t\t\t\t\tthis._events = { __proto__: null } as Record<keyof Events | keyof AsyncEventEmitterPredefinedEvents, InternalEventMap>;\n\t\t\t\t} else {\n\t\t\t\t\tdelete events[event];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\n\t\t// Emit removeListener for all listeners on all events\n\t\tif (!event) {\n\t\t\tfor (const key of Reflect.ownKeys(events)) {\n\t\t\t\tif (key === 'removeListener') {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tthis.removeAllListeners(key);\n\t\t\t}\n\n\t\t\tthis.removeAllListeners('removeListener');\n\t\t\tthis._events = { __proto__: null } as Record<keyof Events | keyof AsyncEventEmitterPredefinedEvents, InternalEventMap>;\n\t\t\tthis._eventCount = 0;\n\n\t\t\treturn this;\n\t\t}\n\n\t\tconst listeners = events[event];\n\n\t\tif (typeof listeners === 'function') {\n\t\t\tthis.removeListener(event, listeners);\n\t\t} else if (listeners !== undefined) {\n\t\t\t// LIFO order\n\t\t\tfor (let i = listeners.length - 1; i >= 0; i--) {\n\t\t\t\tthis.removeListener(event, listeners[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tpublic setMaxListeners(n: number): this {\n\t\tif (typeof n !== 'number' || n < 0 || Number.isNaN(n)) {\n\t\t\tthrow new RangeError(`Expected to get a non-negative number for \"setMaxListeners\", got ${n} instead`);\n\t\t}\n\n\t\tthis._maxListeners = n;\n\n\t\treturn this;\n\t}\n\n\tpublic getMaxListeners(): number {\n\t\treturn this._maxListeners;\n\t}\n\n\tpublic listeners<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K): Listener<Events[keyof Events]>['listener'][] {\n\t\tconst eventList = this._events[eventName];\n\n\t\tif (eventList === undefined) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (typeof eventList === 'function') {\n\t\t\treturn [eventList.listener ?? eventList];\n\t\t}\n\n\t\tconst ret = arrayClone(eventList) as Listener<Events[keyof Events]>['listener'][];\n\n\t\tfor (let i = 0; i < ret.length; ++i) {\n\t\t\tconst orig = (ret[i] as WrappedOnce).listener;\n\t\t\tif (typeof orig === 'function') {\n\t\t\t\tret[i] = orig;\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t}\n\n\tpublic rawListeners<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K): Listener<Events[keyof Events]>[] {\n\t\tconst eventList = this._events[eventName];\n\n\t\tif (eventList === undefined) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (typeof eventList === 'function') {\n\t\t\treturn [eventList];\n\t\t}\n\n\t\treturn arrayClone(eventList) as Listener<Events[keyof Events]>[];\n\t}\n\n\tpublic emit<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\t...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]\n\t): boolean {\n\t\tlet doError = eventName === 'error';\n\n\t\tconst events = this._events;\n\t\tif (events !== undefined) {\n\t\t\tdoError = doError && events.error === undefined;\n\t\t} else if (!doError) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (doError) {\n\t\t\tlet er: unknown;\n\n\t\t\tif (args.length > 0) {\n\t\t\t\t// eslint-disable-next-line prefer-destructuring\n\t\t\t\ter = args[0];\n\t\t\t}\n\n\t\t\tif (er instanceof Error) {\n\t\t\t\ttry {\n\t\t\t\t\tconst capture = {};\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/unbound-method\n\t\t\t\t\tError.captureStackTrace(capture, AsyncEventEmitter.prototype.emit);\n\t\t\t\t\tObject.defineProperty(er, 'stack', {\n\t\t\t\t\t\tvalue: enhanceStackTrace.call(this, er, capture as Error),\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t});\n\t\t\t\t} catch {\n\t\t\t\t\t// Continue regardless of error\n\t\t\t\t}\n\n\t\t\t\tthrow er; // Unhandled 'error' event\n\t\t\t}\n\n\t\t\tconst stringifiedError = String(er);\n\n\t\t\t// Give some error to user\n\t\t\tconst err = new Error(`Unhandled 'error' event emitted, received ${stringifiedError}`);\n\t\t\t// @ts-expect-error Add context to error too\n\t\t\terr.context = er;\n\n\t\t\tthrow err; // Unhandled 'error' event\n\t\t}\n\n\t\tconst handlers = events[eventName];\n\n\t\tif (handlers === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (typeof handlers === 'function') {\n\t\t\tconst result = handlers.apply(this, args);\n\n\t\t\tif (result !== undefined && result !== null) {\n\t\t\t\thandleMaybeAsync(this, result);\n\t\t\t}\n\t\t} else {\n\t\t\tconst len = handlers.length;\n\t\t\tconst listeners = arrayClone(handlers as InternalEventMap);\n\n\t\t\tfor (let i = 0; i < len; ++i) {\n\t\t\t\t// We call all listeners regardless of the result, as we already handle possible error emits in the wrapped func\n\t\t\t\tconst result = listeners[i].apply(this, args);\n\n\t\t\t\tif (result !== undefined && result !== null) {\n\t\t\t\t\thandleMaybeAsync(this, result);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic listenerCount<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K): number {\n\t\tconst events = this._events;\n\n\t\tif (events === undefined) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tconst eventListeners = events[eventName];\n\n\t\tif (typeof eventListeners === 'function') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn eventListeners?.length ?? 0;\n\t}\n\n\tpublic prependListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\tvalidateListener(listener);\n\n\t\tconst wrapped = this._wrapListener(eventName, listener, false);\n\n\t\tthis._addListener(eventName, wrapped, true);\n\n\t\treturn this;\n\t}\n\n\tpublic prependOnceListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\tvalidateListener(listener);\n\n\t\tconst wrapped = this._wrapListener(eventName, listener, true);\n\n\t\tthis._addListener(eventName, wrapped, true);\n\n\t\treturn this;\n\t}\n\n\tpublic eventNames(): (keyof Events | keyof AsyncEventEmitterPredefinedEvents)[] {\n\t\treturn this._eventCount > 0 ? Reflect.ownKeys(this._events) : [];\n\t}\n\n\tpublic async waitForAllListenersToComplete() {\n\t\tconst promises = [...this._internalPromiseMap.values()];\n\n\t\tif (promises.length === 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tawait Promise.all(promises);\n\n\t\treturn true;\n\t}\n\n\tprivate _addListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\twrappedListener: Listener | WrappedOnce,\n\t\tprepend: boolean\n\t) {\n\t\t// Emit newListener first in the event someone is listening for it\n\t\tif (this._events.newListener !== undefined) {\n\t\t\t// Thanks TypeScript for the cast...\n\t\t\tthis.emit('newListener', eventName as string | symbol, (wrappedListener as WrappedOnce).listener ?? wrappedListener);\n\t\t}\n\n\t\tlet existing = this._events[eventName];\n\n\t\tif (existing === undefined) {\n\t\t\t// eslint-disable-next-line no-multi-assign\n\t\t\texisting = this._events[eventName] = wrappedListener;\n\t\t\t++this._eventCount;\n\t\t} else if (typeof existing === 'function') {\n\t\t\t// Adding the second element, need to change to array.\n\t\t\t// eslint-disable-next-line no-multi-assign\n\t\t\texisting = this._events[eventName] = prepend ? [wrappedListener, existing] : [existing, wrappedListener];\n\t\t\t// If we've already got an array, just append.\n\t\t} else if (prepend) {\n\t\t\texisting.unshift(wrappedListener);\n\t\t} else {\n\t\t\texisting.push(wrappedListener);\n\t\t}\n\n\t\tif (this._maxListeners > 0 && existing.length > this._maxListeners && !existing._hasWarnedAboutMaxListeners) {\n\t\t\texisting._hasWarnedAboutMaxListeners = true;\n\t\t\tconst warningMessage = [\n\t\t\t\t`Possible AsyncEventEmitter memory leak detected. ${existing.length} ${String(eventName)} listeners added to ${\n\t\t\t\t\tthis.constructor.name\n\t\t\t\t}.`,\n\t\t\t\t`Use emitter.setMaxListeners() to increase the limit.`\n\t\t\t].join(' ');\n\t\t\tconsole.warn(warningMessage);\n\t\t}\n\t}\n\n\tprivate _wrapListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => Awaitable<void>,\n\t\tonce: boolean\n\t): Listener | WrappedOnce {\n\t\tif (!once) {\n\t\t\treturn listener as Listener;\n\t\t}\n\n\t\tconst state = {\n\t\t\tfired: false,\n\t\t\twrapFn: undefined!,\n\t\t\teventEmitter: this,\n\t\t\teventName,\n\t\t\tlistener\n\t\t} as WrappedOnceState<K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]>;\n\n\t\tconst aliased = onceWrapper<K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]>;\n\n\t\tconst wrapped = aliased.bind(state) as WrappedOnce<\n\t\t\tK extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]\n\t\t>;\n\t\twrapped.listener = listener;\n\t\tstate.wrapFn = wrapped;\n\n\t\treturn wrapped as WrappedOnce;\n\t}\n\n\tpublic static listenerCount<\n\t\tEmitter extends AsyncEventEmitter<any>,\n\t\tEventNames = Emitter extends AsyncEventEmitter<infer Events> ? Events : never,\n\t\tEventName extends PropertyKey = EventNames extends never ? string | symbol : keyof EventNames\n\t>(emitter: Emitter, eventName: EventName | keyof AsyncEventEmitterPredefinedEvents) {\n\t\treturn emitter.listenerCount(eventName);\n\t}\n\n\tpublic static async once<\n\t\tEmitter extends AsyncEventEmitter<any>,\n\t\tEventNames extends Record<PropertyKey, unknown[]> = Emitter extends AsyncEventEmitter<infer Events> ? Events : Record<PropertyKey, unknown[]>,\n\t\tEventName extends PropertyKey = keyof EventNames | keyof AsyncEventEmitterPredefinedEvents,\n\t\tEventResult extends unknown[] = EventName extends keyof AsyncEventEmitterPredefinedEvents\n\t\t\t? AsyncEventEmitterPredefinedEvents[EventName]\n\t\t\t: EventNames[EventName]\n\t>(emitter: Emitter, eventName: EventName, options: AbortableMethods = {}) {\n\t\tconst signal = options?.signal;\n\t\tvalidateAbortSignal(signal);\n\n\t\tif (signal?.aborted) {\n\t\t\tthrow new AbortError(undefined, { cause: getReason(signal) });\n\t\t}\n\n\t\treturn new Promise<EventResult>((resolve, reject) => {\n\t\t\tconst errorListener = (err: unknown) => {\n\t\t\t\temitter.removeListener(eventName, resolver);\n\n\t\t\t\tif (signal) {\n\t\t\t\t\teventTargetAgnosticRemoveListener(emitter, eventName, abortListener);\n\t\t\t\t}\n\n\t\t\t\treject(err);\n\t\t\t};\n\n\t\t\tconst resolver = (...args: unknown[]) => {\n\t\t\t\temitter.removeListener('error', errorListener);\n\n\t\t\t\tif (signal) {\n\t\t\t\t\teventTargetAgnosticRemoveListener(signal, 'abort', abortListener);\n\t\t\t\t}\n\n\t\t\t\tresolve(args as EventResult);\n\t\t\t};\n\n\t\t\temitter.once(eventName, resolver);\n\t\t\tif (eventName !== 'error') {\n\t\t\t\temitter.once('error', errorListener);\n\t\t\t}\n\n\t\t\tconst abortListener = () => {\n\t\t\t\teventTargetAgnosticRemoveListener(emitter, eventName, resolver);\n\t\t\t\teventTargetAgnosticRemoveListener(emitter, 'error', errorListener);\n\t\t\t\treject(new AbortError(undefined, { cause: getReason(signal) }));\n\t\t\t};\n\n\t\t\tif (signal) {\n\t\t\t\teventTargetAgnosticAddListener(signal, 'abort', abortListener, { once: true });\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic static on<\n\t\tEmitter extends AsyncEventEmitter<any>,\n\t\tEventNames extends Record<PropertyKey, unknown[]> = Emitter extends AsyncEventEmitter<infer Events> ? Events : Record<PropertyKey, unknown[]>,\n\t\tEventName extends PropertyKey = keyof EventNames | keyof AsyncEventEmitterPredefinedEvents,\n\t\tEventResult extends unknown[] = EventName extends keyof AsyncEventEmitterPredefinedEvents\n\t\t\t? AsyncEventEmitterPredefinedEvents[EventName]\n\t\t\t: EventNames[EventName]\n\t>(emitter: Emitter, eventName: EventName, options: AbortableMethods = {}): AsyncGenerator<EventResult, void> {\n\t\tconst signal = options?.signal;\n\t\tvalidateAbortSignal(signal);\n\n\t\tif (signal?.aborted) {\n\t\t\tthrow new AbortError(undefined, { cause: getReason(signal) });\n\t\t}\n\n\t\tconst unconsumedEvents: unknown[][] = [];\n\t\tconst unconsumedPromises: { resolve: (value?: unknown) => void; reject: (reason?: unknown) => void }[] = [];\n\t\tlet error: unknown = null;\n\t\tlet finished = false;\n\n\t\tconst abortListener = () => {\n\t\t\terrorHandler(new AbortError(undefined, { cause: getReason(signal) }));\n\t\t};\n\n\t\tconst eventHandler = (...args: unknown[]) => {\n\t\t\tconst promise = unconsumedPromises.shift();\n\t\t\tif (promise) {\n\t\t\t\tpromise.resolve(createIterResult(args, false));\n\t\t\t} else {\n\t\t\t\tunconsumedEvents.push(args);\n\t\t\t}\n\t\t};\n\n\t\tconst errorHandler = (err: unknown) => {\n\t\t\tfinished = true;\n\n\t\t\tconst toError = unconsumedPromises.shift();\n\n\t\t\tif (toError) {\n\t\t\t\ttoError.reject(err);\n\t\t\t} else {\n\t\t\t\terror = err;\n\t\t\t}\n\n\t\t\tvoid iterator.return();\n\t\t};\n\n\t\tconst iterator: AsyncGenerator<EventResult, void> = Object.setPrototypeOf(\n\t\t\t{\n\t\t\t\tnext() {\n\t\t\t\t\t// First, we consume all unread events\n\t\t\t\t\tconst value = unconsumedEvents.shift();\n\t\t\t\t\tif (value) {\n\t\t\t\t\t\treturn Promise.resolve(createIterResult(value, false));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Then we error, if an error happened\n\t\t\t\t\t// This happens one time if at all, because after 'error'\n\t\t\t\t\t// we stop listening\n\t\t\t\t\tif (error) {\n\t\t\t\t\t\tconst p = Promise.reject(error);\n\t\t\t\t\t\t// Only the first element errors\n\t\t\t\t\t\terror = null;\n\t\t\t\t\t\treturn p;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the iterator is finished, resolve to done\n\t\t\t\t\tif (finished) {\n\t\t\t\t\t\treturn Promise.resolve(createIterResult(undefined, true));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Wait until an event happens\n\t\t\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t\t\tunconsumedPromises.push({ resolve, reject });\n\t\t\t\t\t});\n\t\t\t\t},\n\n\t\t\t\treturn() {\n\t\t\t\t\temitter.off(eventName, eventHandler);\n\t\t\t\t\temitter.off('error', errorHandler);\n\n\t\t\t\t\tif (signal) {\n\t\t\t\t\t\teventTargetAgnosticRemoveListener(signal, 'abort', abortListener);\n\t\t\t\t\t}\n\n\t\t\t\t\tfinished = true;\n\n\t\t\t\t\tconst doneResult = createIterResult(undefined, true);\n\t\t\t\t\tfor (const promise of unconsumedPromises) {\n\t\t\t\t\t\tpromise.resolve(doneResult);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Promise.resolve(doneResult);\n\t\t\t\t},\n\n\t\t\t\tthrow(err: unknown) {\n\t\t\t\t\tif (!err || !(err instanceof Error)) {\n\t\t\t\t\t\tthrow new TypeError(`Expected Error instance to be thrown in AsyncEventEmitter.AsyncIterator. Got ${err}`);\n\t\t\t\t\t}\n\n\t\t\t\t\terror = err;\n\t\t\t\t\temitter.off(eventName, eventHandler);\n\t\t\t\t\temitter.off('error', errorHandler);\n\t\t\t\t},\n\n\t\t\t\t[Symbol.asyncIterator]() {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t},\n\t\t\tAsyncIteratorPrototype\n\t\t);\n\n\t\temitter.on(eventName, eventHandler);\n\t\tif (eventName !== 'error') {\n\t\t\temitter.on('error', errorHandler);\n\t\t}\n\n\t\tif (signal) {\n\t\t\teventTargetAgnosticAddListener(signal, 'abort', abortListener);\n\t\t}\n\n\t\treturn iterator;\n\t}\n}\n\nexport interface AsyncEventEmitterPredefinedEvents {\n\tnewListener: [eventName: string | symbol, listener: (...args: any[]) => Awaitable<void>];\n\tremoveListener: [eventName: string | symbol, listener: (...args: any[]) => Awaitable<void>];\n}\n\ninterface WrappedOnceState<Args extends any[] = any[]> {\n\tlistener: (...args: Args) => Awaitable<void>;\n\tfired: boolean;\n\teventName: string | symbol;\n\teventEmitter: AsyncEventEmitter<any>;\n\twrapFn: (...args: Args) => Awaitable<void>;\n}\n\nexport interface WrappedOnce<Args extends any[] = any[]> {\n\t(...args: Args): Awaitable<void>;\n\tlistener: (...args: Args) => Awaitable<void>;\n\t_hasWarnedAboutMaxListeners?: boolean;\n}\n\nexport interface Listener<Args extends any[] = any[]> {\n\t(...args: Args): Awaitable<void>;\n\tlistener: (...args: Args) => Awaitable<void>;\n\t_hasWarnedAboutMaxListeners?: boolean;\n}\n\nexport type Awaitable<T> = T | Promise<T>;\n\nexport interface AbortableMethods {\n\tsignal?: AbortSignal;\n}\n\n// @ts-ignore Not all paths returning is fine just fine:tm:\nfunction onceWrapper<Args extends any[] = any[]>(this: WrappedOnceState<Args>) {\n\tif (!this.fired) {\n\t\tthis.eventEmitter.removeListener(this.eventName, this.wrapFn);\n\t\tthis.fired = true;\n\t\t// eslint-disable-next-line @typescript-eslint/dot-notation\n\t\tif (arguments.length === 0) {\n\t\t\t// @ts-expect-error Types can be hell\n\t\t\treturn this.listener.call(this.eventEmitter);\n\t\t}\n\n\t\t// eslint-disable-next-line prefer-rest-params\n\t\treturn this.listener.apply(this.eventEmitter, arguments as unknown as Args);\n\t}\n}\n\n/**\n * A TypeScript not-compliant way of accessing AbortSignal#reason\n * Because DOM types have it, NodeJS types don't. -w-\n */\nfunction getReason(signal: any) {\n\treturn signal?.reason;\n}\n\nfunction eventTargetAgnosticRemoveListener(emitter: any, name: PropertyKey, listener: (...args: unknown[]) => any, flags?: InternalAgnosticFlags) {\n\tif (typeof emitter.off === 'function') {\n\t\temitter.off(name, listener);\n\t} else if (typeof emitter.removeEventListener === 'function') {\n\t\temitter.removeEventListener(name, listener, flags);\n\t}\n}\n\nfunction eventTargetAgnosticAddListener(emitter: any, name: string | symbol, listener: (...args: unknown[]) => any, flags?: InternalAgnosticFlags) {\n\tif (typeof emitter.on === 'function') {\n\t\tif (flags?.once) {\n\t\t\temitter.once!(name, listener);\n\t\t} else {\n\t\t\temitter.on(name, listener);\n\t\t}\n\t} else if (typeof emitter.addEventListener === 'function') {\n\t\temitter.addEventListener(name, listener, flags);\n\t}\n}\n\ninterface InternalAgnosticFlags {\n\tonce?: boolean;\n}\n\n// eslint-disable-next-line func-names, @typescript-eslint/no-empty-function\nconst AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function* () {}).prototype);\n\nfunction createIterResult(value: unknown, done: boolean) {\n\treturn { value, done };\n}\n\nexport interface AbortErrorOptions {\n\tcause?: unknown;\n}\n\nexport class AbortError extends Error {\n\tpublic readonly code = 'ABORT_ERR';\n\tpublic override readonly name = 'AbortError';\n\n\tpublic constructor(message = 'The operation was aborted', options: AbortErrorOptions | undefined = undefined) {\n\t\tif (options !== undefined && typeof options !== 'object') {\n\t\t\tthrow new TypeError(`Failed to create AbortError: options is not an object or undefined`);\n\t\t}\n\n\t\tsuper(message, options);\n\t}\n}\n\nfunction handleMaybeAsync(emitter: AsyncEventEmitter<any>, result: any) {\n\ttry {\n\t\tconst fin = result.finally;\n\n\t\tif (typeof fin === 'function') {\n\t\t\tconst promiseId = String(++emitter['_wrapperId']);\n\t\t\temitter['_internalPromiseMap'].set(promiseId, result);\n\t\t\tfin.call(result, function final() {\n\t\t\t\temitter['_internalPromiseMap'].delete(promiseId);\n\t\t\t});\n\t\t}\n\t} catch (err) {\n\t\temitter.emit('error', err);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,SAAS,iBAAiB,OAA0E;AACnG,MAAI,OAAO,UAAU,YAAY;AAChC,UAAM,IAAI,UAAU,sDAAsD,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itter/dist/index.mjs
new file mode 100644
index 0000000..9987787
--- /dev/null
+++ b/node_modules/@vladfrangu/async_event_emitter/dist/index.mjs
@@ -0,0 +1,547 @@
+var __defProp = Object.defineProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+
+// src/index.ts
+function validateListener(input) {
+ if (typeof input !== "function") {
+ throw new TypeError(`The listener argument must be a function. Received ${typeof input}`);
+ }
+}
+__name(validateListener, "validateListener");
+function validateAbortSignal(input) {
+ if (input && !(input instanceof AbortSignal)) {
+ throw new TypeError(`The signal option must be an AbortSignal. Received ${input}`);
+ }
+}
+__name(validateAbortSignal, "validateAbortSignal");
+function spliceOne(list, index) {
+ for (; index + 1 < list.length; index++) {
+ list[index] = list[index + 1];
+ }
+ list.pop();
+}
+__name(spliceOne, "spliceOne");
+function arrayClone(arr) {
+ switch (arr.length) {
+ case 2:
+ return [arr[0], arr[1]];
+ case 3:
+ return [arr[0], arr[1], arr[2]];
+ case 4:
+ return [arr[0], arr[1], arr[2], arr[3]];
+ case 5:
+ return [arr[0], arr[1], arr[2], arr[3], arr[4]];
+ case 6:
+ return [arr[0], arr[1], arr[2], arr[3], arr[4], arr[5]];
+ }
+ return arr.slice();
+}
+__name(arrayClone, "arrayClone");
+function identicalSequenceRange(a, b) {
+ for (let i = 0; i < a.length - 3; i++) {
+ const pos = b.indexOf(a[i]);
+ if (pos !== -1) {
+ const rest = b.length - pos;
+ if (rest > 3) {
+ let len = 1;
+ const maxLen = Math.min(a.length - i, rest);
+ while (maxLen > len && a[i + len] === b[pos + len]) {
+ len++;
+ }
+ if (len > 3) {
+ return [len, i];
+ }
+ }
+ }
+ }
+ return [0, 0];
+}
+__name(identicalSequenceRange, "identicalSequenceRange");
+function enhanceStackTrace(err, own) {
+ let ctorInfo = "";
+ try {
+ const { name } = this.constructor;
+ if (name !== "AsyncEventEmitter")
+ ctorInfo = ` on ${name} instance`;
+ } catch {
+ }
+ const sep = `
+Emitted 'error' event${ctorInfo} at:
+`;
+ const errStack = err.stack.split("\n").slice(1);
+ const ownStack = own.stack.split("\n").slice(1);
+ const { 0: len, 1: off } = identicalSequenceRange(ownStack, errStack);
+ if (len > 0) {
+ ownStack.splice(off + 1, len - 2, " [... lines matching original stack trace ...]");
+ }
+ return err.stack + sep + ownStack.join("\n");
+}
+__name(enhanceStackTrace, "enhanceStackTrace");
+var AsyncEventEmitter = class {
+ constructor() {
+ this._events = {
+ __proto__: null
+ };
+ this._eventCount = 0;
+ this._maxListeners = 10;
+ this._internalPromiseMap = /* @__PURE__ */ new Map();
+ this._wrapperId = 0n;
+ }
+ addListener(eventName, listener) {
+ validateListener(listener);
+ const wrapped = this._wrapListener(eventName, listener, false);
+ this._addListener(eventName, wrapped, false);
+ return this;
+ }
+ on(eventName, listener) {
+ return this.addListener(eventName, listener);
+ }
+ once(eventName, listener) {
+ validateListener(listener);
+ const wrapped = this._wrapListener(eventName, listener, true);
+ this._addListener(eventName, wrapped, false);
+ return this;
+ }
+ removeListener(eventName, listener) {
+ validateListener(listener);
+ const events = this._events;
+ const eventList = events[eventName];
+ if (eventList === void 0) {
+ return this;
+ }
+ if (eventList === listener || eventList.listener === listener) {
+ if (--this._eventCount === 0) {
+ this._events = { __proto__: null };
+ } else {
+ delete events[eventName];
+ if (events.removeListener) {
+ this.emit("removeListener", eventName, eventList.listener ?? eventList);
+ }
+ }
+ } else if (typeof eventList !== "function") {
+ let position = -1;
+ for (let i = eventList.length - 1; i >= 0; i--) {
+ if (eventList[i] === listener || eventList[i].listener === listener) {
+ position = i;
+ break;
+ }
+ }
+ if (position < 0) {
+ return this;
+ }
+ if (position === 0) {
+ eventList.shift();
+ } else {
+ spliceOne(eventList, position);
+ }
+ if (eventList.length === 0) {
+ delete events[eventName];
+ --this._eventCount;
+ }
+ if (events.removeListener !== void 0) {
+ this.emit("removeListener", eventName, listener);
+ }
+ }
+ return this;
+ }
+ off(eventName, listener) {
+ return this.removeListener(eventName, listener);
+ }
+ removeAllListeners(event) {
+ const events = this._events;
+ if (events.removeListener === void 0) {
+ if (!event) {
+ this._events = { __proto__: null };
+ this._eventCount = 0;
+ } else if (events[event] !== void 0) {
+ if (--this._eventCount === 0) {
+ this._events = { __proto__: null };
+ } else {
+ delete events[event];
+ }
+ }
+ return this;
+ }
+ if (!event) {
+ for (const key of Reflect.ownKeys(events)) {
+ if (key === "removeListener") {
+ continue;
+ }
+ this.removeAllListeners(key);
+ }
+ this.removeAllListeners("removeListener");
+ this._events = { __proto__: null };
+ this._eventCount = 0;
+ return this;
+ }
+ const listeners = events[event];
+ if (typeof listeners === "function") {
+ this.removeListener(event, listeners);
+ } else if (listeners !== void 0) {
+ for (let i = listeners.length - 1; i >= 0; i--) {
+ this.removeListener(event, listeners[i]);
+ }
+ }
+ return this;
+ }
+ setMaxListeners(n) {
+ if (typeof n !== "number" || n < 0 || Number.isNaN(n)) {
+ throw new RangeError(`Expected to get a non-negative number for "setMaxListeners", got ${n} instead`);
+ }
+ this._maxListeners = n;
+ return this;
+ }
+ getMaxListeners() {
+ return this._maxListeners;
+ }
+ listeners(eventName) {
+ const eventList = this._events[eventName];
+ if (eventList === void 0) {
+ return [];
+ }
+ if (typeof eventList === "function") {
+ return [eventList.listener ?? eventList];
+ }
+ const ret = arrayClone(eventList);
+ for (let i = 0; i < ret.length; ++i) {
+ const orig = ret[i].listener;
+ if (typeof orig === "function") {
+ ret[i] = orig;
+ }
+ }
+ return ret;
+ }
+ rawListeners(eventName) {
+ const eventList = this._events[eventName];
+ if (eventList === void 0) {
+ return [];
+ }
+ if (typeof eventList === "function") {
+ return [eventList];
+ }
+ return arrayClone(eventList);
+ }
+ emit(eventName, ...args) {
+ let doError = eventName === "error";
+ const events = this._events;
+ if (events !== void 0) {
+ doError = doError && events.error === void 0;
+ } else if (!doError) {
+ return false;
+ }
+ if (doError) {
+ let er;
+ if (args.length > 0) {
+ er = args[0];
+ }
+ if (er instanceof Error) {
+ try {
+ const capture = {};
+ Error.captureStackTrace(capture, AsyncEventEmitter.prototype.emit);
+ Object.defineProperty(er, "stack", {
+ value: enhanceStackTrace.call(this, er, capture),
+ configurable: true
+ });
+ } catch {
+ }
+ throw er; // Unhandled 'error' event
+ }
+ const stringifiedError = String(er);
+ const err = new Error(`Unhandled 'error' event emitted, received ${stringifiedError}`);
+ err.context = er;
+ throw err; // Unhandled 'error' event
+ }
+ const handlers = events[eventName];
+ if (handlers === void 0) {
+ return false;
+ }
+ if (typeof handlers === "function") {
+ const result = handlers.apply(this, args);
+ if (result !== void 0 && result !== null) {
+ handleMaybeAsync(this, result);
+ }
+ } else {
+ const len = handlers.length;
+ const listeners = arrayClone(handlers);
+ for (let i = 0; i < len; ++i) {
+ const result = listeners[i].apply(this, args);
+ if (result !== void 0 && result !== null) {
+ handleMaybeAsync(this, result);
+ }
+ }
+ }
+ return true;
+ }
+ listenerCount(eventName) {
+ const events = this._events;
+ if (events === void 0) {
+ return 0;
+ }
+ const eventListeners = events[eventName];
+ if (typeof eventListeners === "function") {
+ return 1;
+ }
+ return eventListeners?.length ?? 0;
+ }
+ prependListener(eventName, listener) {
+ validateListener(listener);
+ const wrapped = this._wrapListener(eventName, listener, false);
+ this._addListener(eventName, wrapped, true);
+ return this;
+ }
+ prependOnceListener(eventName, listener) {
+ validateListener(listener);
+ const wrapped = this._wrapListener(eventName, listener, true);
+ this._addListener(eventName, wrapped, true);
+ return this;
+ }
+ eventNames() {
+ return this._eventCount > 0 ? Reflect.ownKeys(this._events) : [];
+ }
+ async waitForAllListenersToComplete() {
+ const promises = [...this._internalPromiseMap.values()];
+ if (promises.length === 0) {
+ return false;
+ }
+ await Promise.all(promises);
+ return true;
+ }
+ _addListener(eventName, wrappedListener, prepend) {
+ if (this._events.newListener !== void 0) {
+ this.emit("newListener", eventName, wrappedListener.listener ?? wrappedListener);
+ }
+ let existing = this._events[eventName];
+ if (existing === void 0) {
+ existing = this._events[eventName] = wrappedListener;
+ ++this._eventCount;
+ } else if (typeof existing === "function") {
+ existing = this._events[eventName] = prepend ? [wrappedListener, existing] : [existing, wrappedListener];
+ } else if (prepend) {
+ existing.unshift(wrappedListener);
+ } else {
+ existing.push(wrappedListener);
+ }
+ if (this._maxListeners > 0 && existing.length > this._maxListeners && !existing._hasWarnedAboutMaxListeners) {
+ existing._hasWarnedAboutMaxListeners = true;
+ const warningMessage = [
+ `Possible AsyncEventEmitter memory leak detected. ${existing.length} ${String(eventName)} listeners added to ${this.constructor.name}.`,
+ `Use emitter.setMaxListeners() to increase the limit.`
+ ].join(" ");
+ console.warn(warningMessage);
+ }
+ }
+ _wrapListener(eventName, listener, once) {
+ if (!once) {
+ return listener;
+ }
+ const state = {
+ fired: false,
+ wrapFn: void 0,
+ eventEmitter: this,
+ eventName,
+ listener
+ };
+ const aliased = onceWrapper;
+ const wrapped = aliased.bind(state);
+ wrapped.listener = listener;
+ state.wrapFn = wrapped;
+ return wrapped;
+ }
+ static listenerCount(emitter, eventName) {
+ return emitter.listenerCount(eventName);
+ }
+ static async once(emitter, eventName, options = {}) {
+ const signal = options?.signal;
+ validateAbortSignal(signal);
+ if (signal?.aborted) {
+ throw new AbortError(void 0, { cause: getReason(signal) });
+ }
+ return new Promise((resolve, reject) => {
+ const errorListener = /* @__PURE__ */ __name((err) => {
+ emitter.removeListener(eventName, resolver);
+ if (signal) {
+ eventTargetAgnosticRemoveListener(emitter, eventName, abortListener);
+ }
+ reject(err);
+ }, "errorListener");
+ const resolver = /* @__PURE__ */ __name((...args) => {
+ emitter.removeListener("error", errorListener);
+ if (signal) {
+ eventTargetAgnosticRemoveListener(signal, "abort", abortListener);
+ }
+ resolve(args);
+ }, "resolver");
+ emitter.once(eventName, resolver);
+ if (eventName !== "error") {
+ emitter.once("error", errorListener);
+ }
+ const abortListener = /* @__PURE__ */ __name(() => {
+ eventTargetAgnosticRemoveListener(emitter, eventName, resolver);
+ eventTargetAgnosticRemoveListener(emitter, "error", errorListener);
+ reject(new AbortError(void 0, { cause: getReason(signal) }));
+ }, "abortListener");
+ if (signal) {
+ eventTargetAgnosticAddListener(signal, "abort", abortListener, { once: true });
+ }
+ });
+ }
+ static on(emitter, eventName, options = {}) {
+ const signal = options?.signal;
+ validateAbortSignal(signal);
+ if (signal?.aborted) {
+ throw new AbortError(void 0, { cause: getReason(signal) });
+ }
+ const unconsumedEvents = [];
+ const unconsumedPromises = [];
+ let error = null;
+ let finished = false;
+ const abortListener = /* @__PURE__ */ __name(() => {
+ errorHandler(new AbortError(void 0, { cause: getReason(signal) }));
+ }, "abortListener");
+ const eventHandler = /* @__PURE__ */ __name((...args) => {
+ const promise = unconsumedPromises.shift();
+ if (promise) {
+ promise.resolve(createIterResult(args, false));
+ } else {
+ unconsumedEvents.push(args);
+ }
+ }, "eventHandler");
+ const errorHandler = /* @__PURE__ */ __name((err) => {
+ finished = true;
+ const toError = unconsumedPromises.shift();
+ if (toError) {
+ toError.reject(err);
+ } else {
+ error = err;
+ }
+ void iterator.return();
+ }, "errorHandler");
+ const iterator = Object.setPrototypeOf(
+ {
+ next() {
+ const value = unconsumedEvents.shift();
+ if (value) {
+ return Promise.resolve(createIterResult(value, false));
+ }
+ if (error) {
+ const p = Promise.reject(error);
+ error = null;
+ return p;
+ }
+ if (finished) {
+ return Promise.resolve(createIterResult(void 0, true));
+ }
+ return new Promise((resolve, reject) => {
+ unconsumedPromises.push({ resolve, reject });
+ });
+ },
+ return() {
+ emitter.off(eventName, eventHandler);
+ emitter.off("error", errorHandler);
+ if (signal) {
+ eventTargetAgnosticRemoveListener(signal, "abort", abortListener);
+ }
+ finished = true;
+ const doneResult = createIterResult(void 0, true);
+ for (const promise of unconsumedPromises) {
+ promise.resolve(doneResult);
+ }
+ return Promise.resolve(doneResult);
+ },
+ throw(err) {
+ if (!err || !(err instanceof Error)) {
+ throw new TypeError(`Expected Error instance to be thrown in AsyncEventEmitter.AsyncIterator. Got ${err}`);
+ }
+ error = err;
+ emitter.off(eventName, eventHandler);
+ emitter.off("error", errorHandler);
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ }
+ },
+ AsyncIteratorPrototype
+ );
+ emitter.on(eventName, eventHandler);
+ if (eventName !== "error") {
+ emitter.on("error", errorHandler);
+ }
+ if (signal) {
+ eventTargetAgnosticAddListener(signal, "abort", abortListener);
+ }
+ return iterator;
+ }
+};
+__name(AsyncEventEmitter, "AsyncEventEmitter");
+function onceWrapper() {
+ if (!this.fired) {
+ this.eventEmitter.removeListener(this.eventName, this.wrapFn);
+ this.fired = true;
+ if (arguments.length === 0) {
+ return this.listener.call(this.eventEmitter);
+ }
+ return this.listener.apply(this.eventEmitter, arguments);
+ }
+}
+__name(onceWrapper, "onceWrapper");
+function getReason(signal) {
+ return signal?.reason;
+}
+__name(getReason, "getReason");
+function eventTargetAgnosticRemoveListener(emitter, name, listener, flags) {
+ if (typeof emitter.off === "function") {
+ emitter.off(name, listener);
+ } else if (typeof emitter.removeEventListener === "function") {
+ emitter.removeEventListener(name, listener, flags);
+ }
+}
+__name(eventTargetAgnosticRemoveListener, "eventTargetAgnosticRemoveListener");
+function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
+ if (typeof emitter.on === "function") {
+ if (flags?.once) {
+ emitter.once(name, listener);
+ } else {
+ emitter.on(name, listener);
+ }
+ } else if (typeof emitter.addEventListener === "function") {
+ emitter.addEventListener(name, listener, flags);
+ }
+}
+__name(eventTargetAgnosticAddListener, "eventTargetAgnosticAddListener");
+var AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function* () {
+}).prototype);
+function createIterResult(value, done) {
+ return { value, done };
+}
+__name(createIterResult, "createIterResult");
+var AbortError = class extends Error {
+ constructor(message = "The operation was aborted", options = void 0) {
+ if (options !== void 0 && typeof options !== "object") {
+ throw new TypeError(`Failed to create AbortError: options is not an object or undefined`);
+ }
+ super(message, options);
+ this.code = "ABORT_ERR";
+ this.name = "AbortError";
+ }
+};
+__name(AbortError, "AbortError");
+function handleMaybeAsync(emitter, result) {
+ try {
+ const fin = result.finally;
+ if (typeof fin === "function") {
+ const promiseId = String(++emitter["_wrapperId"]);
+ emitter["_internalPromiseMap"].set(promiseId, result);
+ fin.call(result, /* @__PURE__ */ __name(function final() {
+ emitter["_internalPromiseMap"].delete(promiseId);
+ }, "final"));
+ }
+ } catch (err) {
+ emitter.emit("error", err);
+ }
+}
+__name(handleMaybeAsync, "handleMaybeAsync");
+export {
+ AbortError,
+ AsyncEventEmitter
+};
+//# sourceMappingURL=index.mjs.map \ No newline at end of file
diff --git a/node_modules/@vladfrangu/async_event_emitter/dist/index.mjs.map b/node_modules/@vladfrangu/async_event_emitter/dist/index.mjs.map
new file mode 100644
index 0000000..3c8b39a
--- /dev/null
+++ b/node_modules/@vladfrangu/async_event_emitter/dist/index.mjs.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/dot-notation */\nfunction validateListener(input: unknown): asserts input is (...args: unknown[]) => Awaitable<void> {\n\tif (typeof input !== 'function') {\n\t\tthrow new TypeError(`The listener argument must be a function. Received ${typeof input}`);\n\t}\n}\n\nfunction validateAbortSignal(input: unknown): asserts input is AbortSignal | undefined {\n\t// Only validate that the signal is a signal if its defined\n\tif (input && !(input instanceof AbortSignal)) {\n\t\tthrow new TypeError(`The signal option must be an AbortSignal. Received ${input}`);\n\t}\n}\n\n// Inspired from https://github.com/nodejs/node/blob/42ad967d68137df1a80a877e7b5ad56403fc157f/lib/internal/util.js#L397\nfunction spliceOne(list: unknown[], index: number) {\n\tfor (; index + 1 < list.length; index++) {\n\t\tlist[index] = list[index + 1];\n\t}\n\n\tlist.pop();\n}\n\n// Inspired from https://github.com/nodejs/node/blob/42ad967d68137df1a80a877e7b5ad56403fc157f/lib/events.js#L889\nfunction arrayClone<T extends unknown[]>(arr: T): T {\n\t// At least since V8 8.3, this implementation is faster than the previous\n\t// which always used a simple for-loop\n\tswitch (arr.length) {\n\t\tcase 2:\n\t\t\treturn [arr[0], arr[1]] as T;\n\t\tcase 3:\n\t\t\treturn [arr[0], arr[1], arr[2]] as T;\n\t\tcase 4:\n\t\t\treturn [arr[0], arr[1], arr[2], arr[3]] as T;\n\t\tcase 5:\n\t\t\treturn [arr[0], arr[1], arr[2], arr[3], arr[4]] as T;\n\t\tcase 6:\n\t\t\treturn [arr[0], arr[1], arr[2], arr[3], arr[4], arr[5]] as T;\n\t}\n\n\treturn arr.slice() as T;\n}\n\n// Inspired from https://github.com/nodejs/node/blob/42ad967d68137df1a80a877e7b5ad56403fc157f/lib/events.js#L427-L475\nfunction identicalSequenceRange(a: unknown[], b: unknown[]): [number, number] {\n\tfor (let i = 0; i < a.length - 3; i++) {\n\t\t// Find the first entry of b that matches the current entry of a.\n\t\tconst pos = b.indexOf(a[i]);\n\t\tif (pos !== -1) {\n\t\t\tconst rest = b.length - pos;\n\t\t\tif (rest > 3) {\n\t\t\t\tlet len = 1;\n\t\t\t\tconst maxLen = Math.min(a.length - i, rest);\n\t\t\t\t// Count the number of consecutive entries.\n\t\t\t\twhile (maxLen > len && a[i + len] === b[pos + len]) {\n\t\t\t\t\tlen++;\n\t\t\t\t}\n\t\t\t\tif (len > 3) {\n\t\t\t\t\treturn [len, i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn [0, 0];\n}\n\nfunction enhanceStackTrace(this: AsyncEventEmitter<any>, err: Error, own: Error) {\n\tlet ctorInfo = '';\n\ttry {\n\t\tconst { name } = this.constructor;\n\t\tif (name !== 'AsyncEventEmitter') ctorInfo = ` on ${name} instance`;\n\t} catch {\n\t\t// Continue regardless of error.\n\t}\n\tconst sep = `\\nEmitted 'error' event${ctorInfo} at:\\n`;\n\n\tconst errStack = err.stack!.split('\\n').slice(1);\n\tconst ownStack = own.stack!.split('\\n').slice(1);\n\n\tconst { 0: len, 1: off } = identicalSequenceRange(ownStack, errStack);\n\tif (len > 0) {\n\t\townStack.splice(off + 1, len - 2, ' [... lines matching original stack trace ...]');\n\t}\n\n\treturn err.stack + sep + ownStack.join('\\n');\n}\n\ninterface InternalEventMap extends Array<Listener | WrappedOnce> {\n\t_hasWarnedAboutMaxListeners?: boolean;\n}\n\nexport class AsyncEventEmitter<Events extends Record<PropertyKey, unknown[]> = Record<PropertyKey, unknown[]> & AsyncEventEmitterPredefinedEvents> {\n\tprivate _events: Record<keyof Events | keyof AsyncEventEmitterPredefinedEvents, Listener | WrappedOnce | InternalEventMap> = {\n\t\t__proto__: null\n\t} as Record<keyof Events | keyof AsyncEventEmitterPredefinedEvents, Listener | WrappedOnce | InternalEventMap>;\n\n\tprivate _eventCount = 0;\n\tprivate _maxListeners = 10;\n\tprivate _internalPromiseMap: Map<string, Promise<void>> = new Map();\n\tprivate _wrapperId = 0n;\n\n\tpublic addListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\tvalidateListener(listener);\n\n\t\tconst wrapped = this._wrapListener(eventName, listener, false);\n\n\t\tthis._addListener(eventName, wrapped, false);\n\n\t\treturn this;\n\t}\n\n\tpublic on<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\treturn this.addListener(eventName, listener);\n\t}\n\n\tpublic once<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\tvalidateListener(listener);\n\n\t\tconst wrapped = this._wrapListener(eventName, listener, true);\n\n\t\tthis._addListener(eventName, wrapped, false);\n\n\t\treturn this;\n\t}\n\n\tpublic removeListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\tvalidateListener(listener);\n\n\t\tconst events = this._events;\n\t\tconst eventList = events[eventName];\n\n\t\tif (eventList === undefined) {\n\t\t\treturn this;\n\t\t}\n\n\t\tif (eventList === listener || (eventList as WrappedOnce).listener === listener) {\n\t\t\tif (--this._eventCount === 0) {\n\t\t\t\tthis._events = { __proto__: null } as Record<\n\t\t\t\t\tkeyof Events | keyof AsyncEventEmitterPredefinedEvents,\n\t\t\t\t\tListener | WrappedOnce | InternalEventMap\n\t\t\t\t>;\n\t\t\t} else {\n\t\t\t\tdelete events[eventName];\n\t\t\t\tif (events.removeListener) {\n\t\t\t\t\tthis.emit('removeListener', eventName as string, (eventList as WrappedOnce).listener ?? eventList);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (typeof eventList !== 'function') {\n\t\t\tlet position = -1;\n\n\t\t\tfor (let i = eventList.length - 1; i >= 0; i--) {\n\t\t\t\tif (eventList[i] === listener || (eventList[i] as WrappedOnce).listener === listener) {\n\t\t\t\t\tposition = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (position < 0) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tif (position === 0) {\n\t\t\t\teventList.shift();\n\t\t\t} else {\n\t\t\t\tspliceOne(eventList, position);\n\t\t\t}\n\n\t\t\tif (eventList.length === 0) {\n\t\t\t\tdelete events[eventName];\n\t\t\t\t--this._eventCount;\n\t\t\t}\n\n\t\t\tif (events.removeListener !== undefined) {\n\t\t\t\t// Thanks TypeScript for the cast...\n\t\t\t\tthis.emit('removeListener', eventName as string | symbol, listener);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tpublic off<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\treturn this.removeListener(eventName, listener);\n\t}\n\n\tpublic removeAllListeners<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(event?: K | undefined): this {\n\t\tconst events = this._events;\n\n\t\t// Not listening for removeListener, no need to emit\n\t\tif (events.removeListener === undefined) {\n\t\t\tif (!event) {\n\t\t\t\tthis._events = { __proto__: null } as Record<keyof Events | keyof AsyncEventEmitterPredefinedEvents, InternalEventMap>;\n\t\t\t\tthis._eventCount = 0;\n\t\t\t} else if (events[event] !== undefined) {\n\t\t\t\tif (--this._eventCount === 0) {\n\t\t\t\t\tthis._events = { __proto__: null } as Record<keyof Events | keyof AsyncEventEmitterPredefinedEvents, InternalEventMap>;\n\t\t\t\t} else {\n\t\t\t\t\tdelete events[event];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\n\t\t// Emit removeListener for all listeners on all events\n\t\tif (!event) {\n\t\t\tfor (const key of Reflect.ownKeys(events)) {\n\t\t\t\tif (key === 'removeListener') {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tthis.removeAllListeners(key);\n\t\t\t}\n\n\t\t\tthis.removeAllListeners('removeListener');\n\t\t\tthis._events = { __proto__: null } as Record<keyof Events | keyof AsyncEventEmitterPredefinedEvents, InternalEventMap>;\n\t\t\tthis._eventCount = 0;\n\n\t\t\treturn this;\n\t\t}\n\n\t\tconst listeners = events[event];\n\n\t\tif (typeof listeners === 'function') {\n\t\t\tthis.removeListener(event, listeners);\n\t\t} else if (listeners !== undefined) {\n\t\t\t// LIFO order\n\t\t\tfor (let i = listeners.length - 1; i >= 0; i--) {\n\t\t\t\tthis.removeListener(event, listeners[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tpublic setMaxListeners(n: number): this {\n\t\tif (typeof n !== 'number' || n < 0 || Number.isNaN(n)) {\n\t\t\tthrow new RangeError(`Expected to get a non-negative number for \"setMaxListeners\", got ${n} instead`);\n\t\t}\n\n\t\tthis._maxListeners = n;\n\n\t\treturn this;\n\t}\n\n\tpublic getMaxListeners(): number {\n\t\treturn this._maxListeners;\n\t}\n\n\tpublic listeners<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K): Listener<Events[keyof Events]>['listener'][] {\n\t\tconst eventList = this._events[eventName];\n\n\t\tif (eventList === undefined) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (typeof eventList === 'function') {\n\t\t\treturn [eventList.listener ?? eventList];\n\t\t}\n\n\t\tconst ret = arrayClone(eventList) as Listener<Events[keyof Events]>['listener'][];\n\n\t\tfor (let i = 0; i < ret.length; ++i) {\n\t\t\tconst orig = (ret[i] as WrappedOnce).listener;\n\t\t\tif (typeof orig === 'function') {\n\t\t\t\tret[i] = orig;\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t}\n\n\tpublic rawListeners<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K): Listener<Events[keyof Events]>[] {\n\t\tconst eventList = this._events[eventName];\n\n\t\tif (eventList === undefined) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (typeof eventList === 'function') {\n\t\t\treturn [eventList];\n\t\t}\n\n\t\treturn arrayClone(eventList) as Listener<Events[keyof Events]>[];\n\t}\n\n\tpublic emit<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\t...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]\n\t): boolean {\n\t\tlet doError = eventName === 'error';\n\n\t\tconst events = this._events;\n\t\tif (events !== undefined) {\n\t\t\tdoError = doError && events.error === undefined;\n\t\t} else if (!doError) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (doError) {\n\t\t\tlet er: unknown;\n\n\t\t\tif (args.length > 0) {\n\t\t\t\t// eslint-disable-next-line prefer-destructuring\n\t\t\t\ter = args[0];\n\t\t\t}\n\n\t\t\tif (er instanceof Error) {\n\t\t\t\ttry {\n\t\t\t\t\tconst capture = {};\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/unbound-method\n\t\t\t\t\tError.captureStackTrace(capture, AsyncEventEmitter.prototype.emit);\n\t\t\t\t\tObject.defineProperty(er, 'stack', {\n\t\t\t\t\t\tvalue: enhanceStackTrace.call(this, er, capture as Error),\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t});\n\t\t\t\t} catch {\n\t\t\t\t\t// Continue regardless of error\n\t\t\t\t}\n\n\t\t\t\tthrow er; // Unhandled 'error' event\n\t\t\t}\n\n\t\t\tconst stringifiedError = String(er);\n\n\t\t\t// Give some error to user\n\t\t\tconst err = new Error(`Unhandled 'error' event emitted, received ${stringifiedError}`);\n\t\t\t// @ts-expect-error Add context to error too\n\t\t\terr.context = er;\n\n\t\t\tthrow err; // Unhandled 'error' event\n\t\t}\n\n\t\tconst handlers = events[eventName];\n\n\t\tif (handlers === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (typeof handlers === 'function') {\n\t\t\tconst result = handlers.apply(this, args);\n\n\t\t\tif (result !== undefined && result !== null) {\n\t\t\t\thandleMaybeAsync(this, result);\n\t\t\t}\n\t\t} else {\n\t\t\tconst len = handlers.length;\n\t\t\tconst listeners = arrayClone(handlers as InternalEventMap);\n\n\t\t\tfor (let i = 0; i < len; ++i) {\n\t\t\t\t// We call all listeners regardless of the result, as we already handle possible error emits in the wrapped func\n\t\t\t\tconst result = listeners[i].apply(this, args);\n\n\t\t\t\tif (result !== undefined && result !== null) {\n\t\t\t\t\thandleMaybeAsync(this, result);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic listenerCount<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(eventName: K): number {\n\t\tconst events = this._events;\n\n\t\tif (events === undefined) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tconst eventListeners = events[eventName];\n\n\t\tif (typeof eventListeners === 'function') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn eventListeners?.length ?? 0;\n\t}\n\n\tpublic prependListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\tvalidateListener(listener);\n\n\t\tconst wrapped = this._wrapListener(eventName, listener, false);\n\n\t\tthis._addListener(eventName, wrapped, true);\n\n\t\treturn this;\n\t}\n\n\tpublic prependOnceListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => void\n\t): this {\n\t\tvalidateListener(listener);\n\n\t\tconst wrapped = this._wrapListener(eventName, listener, true);\n\n\t\tthis._addListener(eventName, wrapped, true);\n\n\t\treturn this;\n\t}\n\n\tpublic eventNames(): (keyof Events | keyof AsyncEventEmitterPredefinedEvents)[] {\n\t\treturn this._eventCount > 0 ? Reflect.ownKeys(this._events) : [];\n\t}\n\n\tpublic async waitForAllListenersToComplete() {\n\t\tconst promises = [...this._internalPromiseMap.values()];\n\n\t\tif (promises.length === 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tawait Promise.all(promises);\n\n\t\treturn true;\n\t}\n\n\tprivate _addListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\twrappedListener: Listener | WrappedOnce,\n\t\tprepend: boolean\n\t) {\n\t\t// Emit newListener first in the event someone is listening for it\n\t\tif (this._events.newListener !== undefined) {\n\t\t\t// Thanks TypeScript for the cast...\n\t\t\tthis.emit('newListener', eventName as string | symbol, (wrappedListener as WrappedOnce).listener ?? wrappedListener);\n\t\t}\n\n\t\tlet existing = this._events[eventName];\n\n\t\tif (existing === undefined) {\n\t\t\t// eslint-disable-next-line no-multi-assign\n\t\t\texisting = this._events[eventName] = wrappedListener;\n\t\t\t++this._eventCount;\n\t\t} else if (typeof existing === 'function') {\n\t\t\t// Adding the second element, need to change to array.\n\t\t\t// eslint-disable-next-line no-multi-assign\n\t\t\texisting = this._events[eventName] = prepend ? [wrappedListener, existing] : [existing, wrappedListener];\n\t\t\t// If we've already got an array, just append.\n\t\t} else if (prepend) {\n\t\t\texisting.unshift(wrappedListener);\n\t\t} else {\n\t\t\texisting.push(wrappedListener);\n\t\t}\n\n\t\tif (this._maxListeners > 0 && existing.length > this._maxListeners && !existing._hasWarnedAboutMaxListeners) {\n\t\t\texisting._hasWarnedAboutMaxListeners = true;\n\t\t\tconst warningMessage = [\n\t\t\t\t`Possible AsyncEventEmitter memory leak detected. ${existing.length} ${String(eventName)} listeners added to ${\n\t\t\t\t\tthis.constructor.name\n\t\t\t\t}.`,\n\t\t\t\t`Use emitter.setMaxListeners() to increase the limit.`\n\t\t\t].join(' ');\n\t\t\tconsole.warn(warningMessage);\n\t\t}\n\t}\n\n\tprivate _wrapListener<K extends keyof Events | keyof AsyncEventEmitterPredefinedEvents>(\n\t\teventName: K,\n\t\tlistener: (...args: K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]) => Awaitable<void>,\n\t\tonce: boolean\n\t): Listener | WrappedOnce {\n\t\tif (!once) {\n\t\t\treturn listener as Listener;\n\t\t}\n\n\t\tconst state = {\n\t\t\tfired: false,\n\t\t\twrapFn: undefined!,\n\t\t\teventEmitter: this,\n\t\t\teventName,\n\t\t\tlistener\n\t\t} as WrappedOnceState<K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]>;\n\n\t\tconst aliased = onceWrapper<K extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]>;\n\n\t\tconst wrapped = aliased.bind(state) as WrappedOnce<\n\t\t\tK extends keyof AsyncEventEmitterPredefinedEvents ? AsyncEventEmitterPredefinedEvents[K] : Events[K]\n\t\t>;\n\t\twrapped.listener = listener;\n\t\tstate.wrapFn = wrapped;\n\n\t\treturn wrapped as WrappedOnce;\n\t}\n\n\tpublic static listenerCount<\n\t\tEmitter extends AsyncEventEmitter<any>,\n\t\tEventNames = Emitter extends AsyncEventEmitter<infer Events> ? Events : never,\n\t\tEventName extends PropertyKey = EventNames extends never ? string | symbol : keyof EventNames\n\t>(emitter: Emitter, eventName: EventName | keyof AsyncEventEmitterPredefinedEvents) {\n\t\treturn emitter.listenerCount(eventName);\n\t}\n\n\tpublic static async once<\n\t\tEmitter extends AsyncEventEmitter<any>,\n\t\tEventNames extends Record<PropertyKey, unknown[]> = Emitter extends AsyncEventEmitter<infer Events> ? Events : Record<PropertyKey, unknown[]>,\n\t\tEventName extends PropertyKey = keyof EventNames | keyof AsyncEventEmitterPredefinedEvents,\n\t\tEventResult extends unknown[] = EventName extends keyof AsyncEventEmitterPredefinedEvents\n\t\t\t? AsyncEventEmitterPredefinedEvents[EventName]\n\t\t\t: EventNames[EventName]\n\t>(emitter: Emitter, eventName: EventName, options: AbortableMethods = {}) {\n\t\tconst signal = options?.signal;\n\t\tvalidateAbortSignal(signal);\n\n\t\tif (signal?.aborted) {\n\t\t\tthrow new AbortError(undefined, { cause: getReason(signal) });\n\t\t}\n\n\t\treturn new Promise<EventResult>((resolve, reject) => {\n\t\t\tconst errorListener = (err: unknown) => {\n\t\t\t\temitter.removeListener(eventName, resolver);\n\n\t\t\t\tif (signal) {\n\t\t\t\t\teventTargetAgnosticRemoveListener(emitter, eventName, abortListener);\n\t\t\t\t}\n\n\t\t\t\treject(err);\n\t\t\t};\n\n\t\t\tconst resolver = (...args: unknown[]) => {\n\t\t\t\temitter.removeListener('error', errorListener);\n\n\t\t\t\tif (signal) {\n\t\t\t\t\teventTargetAgnosticRemoveListener(signal, 'abort', abortListener);\n\t\t\t\t}\n\n\t\t\t\tresolve(args as EventResult);\n\t\t\t};\n\n\t\t\temitter.once(eventName, resolver);\n\t\t\tif (eventName !== 'error') {\n\t\t\t\temitter.once('error', errorListener);\n\t\t\t}\n\n\t\t\tconst abortListener = () => {\n\t\t\t\teventTargetAgnosticRemoveListener(emitter, eventName, resolver);\n\t\t\t\teventTargetAgnosticRemoveListener(emitter, 'error', errorListener);\n\t\t\t\treject(new AbortError(undefined, { cause: getReason(signal) }));\n\t\t\t};\n\n\t\t\tif (signal) {\n\t\t\t\teventTargetAgnosticAddListener(signal, 'abort', abortListener, { once: true });\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic static on<\n\t\tEmitter extends AsyncEventEmitter<any>,\n\t\tEventNames extends Record<PropertyKey, unknown[]> = Emitter extends AsyncEventEmitter<infer Events> ? Events : Record<PropertyKey, unknown[]>,\n\t\tEventName extends PropertyKey = keyof EventNames | keyof AsyncEventEmitterPredefinedEvents,\n\t\tEventResult extends unknown[] = EventName extends keyof AsyncEventEmitterPredefinedEvents\n\t\t\t? AsyncEventEmitterPredefinedEvents[EventName]\n\t\t\t: EventNames[EventName]\n\t>(emitter: Emitter, eventName: EventName, options: AbortableMethods = {}): AsyncGenerator<EventResult, void> {\n\t\tconst signal = options?.signal;\n\t\tvalidateAbortSignal(signal);\n\n\t\tif (signal?.aborted) {\n\t\t\tthrow new AbortError(undefined, { cause: getReason(signal) });\n\t\t}\n\n\t\tconst unconsumedEvents: unknown[][] = [];\n\t\tconst unconsumedPromises: { resolve: (value?: unknown) => void; reject: (reason?: unknown) => void }[] = [];\n\t\tlet error: unknown = null;\n\t\tlet finished = false;\n\n\t\tconst abortListener = () => {\n\t\t\terrorHandler(new AbortError(undefined, { cause: getReason(signal) }));\n\t\t};\n\n\t\tconst eventHandler = (...args: unknown[]) => {\n\t\t\tconst promise = unconsumedPromises.shift();\n\t\t\tif (promise) {\n\t\t\t\tpromise.resolve(createIterResult(args, false));\n\t\t\t} else {\n\t\t\t\tunconsumedEvents.push(args);\n\t\t\t}\n\t\t};\n\n\t\tconst errorHandler = (err: unknown) => {\n\t\t\tfinished = true;\n\n\t\t\tconst toError = unconsumedPromises.shift();\n\n\t\t\tif (toError) {\n\t\t\t\ttoError.reject(err);\n\t\t\t} else {\n\t\t\t\terror = err;\n\t\t\t}\n\n\t\t\tvoid iterator.return();\n\t\t};\n\n\t\tconst iterator: AsyncGenerator<EventResult, void> = Object.setPrototypeOf(\n\t\t\t{\n\t\t\t\tnext() {\n\t\t\t\t\t// First, we consume all unread events\n\t\t\t\t\tconst value = unconsumedEvents.shift();\n\t\t\t\t\tif (value) {\n\t\t\t\t\t\treturn Promise.resolve(createIterResult(value, false));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Then we error, if an error happened\n\t\t\t\t\t// This happens one time if at all, because after 'error'\n\t\t\t\t\t// we stop listening\n\t\t\t\t\tif (error) {\n\t\t\t\t\t\tconst p = Promise.reject(error);\n\t\t\t\t\t\t// Only the first element errors\n\t\t\t\t\t\terror = null;\n\t\t\t\t\t\treturn p;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the iterator is finished, resolve to done\n\t\t\t\t\tif (finished) {\n\t\t\t\t\t\treturn Promise.resolve(createIterResult(undefined, true));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Wait until an event happens\n\t\t\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t\t\tunconsumedPromises.push({ resolve, reject });\n\t\t\t\t\t});\n\t\t\t\t},\n\n\t\t\t\treturn() {\n\t\t\t\t\temitter.off(eventName, eventHandler);\n\t\t\t\t\temitter.off('error', errorHandler);\n\n\t\t\t\t\tif (signal) {\n\t\t\t\t\t\teventTargetAgnosticRemoveListener(signal, 'abort', abortListener);\n\t\t\t\t\t}\n\n\t\t\t\t\tfinished = true;\n\n\t\t\t\t\tconst doneResult = createIterResult(undefined, true);\n\t\t\t\t\tfor (const promise of unconsumedPromises) {\n\t\t\t\t\t\tpromise.resolve(doneResult);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Promise.resolve(doneResult);\n\t\t\t\t},\n\n\t\t\t\tthrow(err: unknown) {\n\t\t\t\t\tif (!err || !(err instanceof Error)) {\n\t\t\t\t\t\tthrow new TypeError(`Expected Error instance to be thrown in AsyncEventEmitter.AsyncIterator. Got ${err}`);\n\t\t\t\t\t}\n\n\t\t\t\t\terror = err;\n\t\t\t\t\temitter.off(eventName, eventHandler);\n\t\t\t\t\temitter.off('error', errorHandler);\n\t\t\t\t},\n\n\t\t\t\t[Symbol.asyncIterator]() {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t},\n\t\t\tAsyncIteratorPrototype\n\t\t);\n\n\t\temitter.on(eventName, eventHandler);\n\t\tif (eventName !== 'error') {\n\t\t\temitter.on('error', errorHandler);\n\t\t}\n\n\t\tif (signal) {\n\t\t\teventTargetAgnosticAddListener(signal, 'abort', abortListener);\n\t\t}\n\n\t\treturn iterator;\n\t}\n}\n\nexport interface AsyncEventEmitterPredefinedEvents {\n\tnewListener: [eventName: string | symbol, listener: (...args: any[]) => Awaitable<void>];\n\tremoveListener: [eventName: string | symbol, listener: (...args: any[]) => Awaitable<void>];\n}\n\ninterface WrappedOnceState<Args extends any[] = any[]> {\n\tlistener: (...args: Args) => Awaitable<void>;\n\tfired: boolean;\n\teventName: string | symbol;\n\teventEmitter: AsyncEventEmitter<any>;\n\twrapFn: (...args: Args) => Awaitable<void>;\n}\n\nexport interface WrappedOnce<Args extends any[] = any[]> {\n\t(...args: Args): Awaitable<void>;\n\tlistener: (...args: Args) => Awaitable<void>;\n\t_hasWarnedAboutMaxListeners?: boolean;\n}\n\nexport interface Listener<Args extends any[] = any[]> {\n\t(...args: Args): Awaitable<void>;\n\tlistener: (...args: Args) => Awaitable<void>;\n\t_hasWarnedAboutMaxListeners?: boolean;\n}\n\nexport type Awaitable<T> = T | Promise<T>;\n\nexport interface AbortableMethods {\n\tsignal?: AbortSignal;\n}\n\n// @ts-ignore Not all paths returning is fine just fine:tm:\nfunction onceWrapper<Args extends any[] = any[]>(this: WrappedOnceState<Args>) {\n\tif (!this.fired) {\n\t\tthis.eventEmitter.removeListener(this.eventName, this.wrapFn);\n\t\tthis.fired = true;\n\t\t// eslint-disable-next-line @typescript-eslint/dot-notation\n\t\tif (arguments.length === 0) {\n\t\t\t// @ts-expect-error Types can be hell\n\t\t\treturn this.listener.call(this.eventEmitter);\n\t\t}\n\n\t\t// eslint-disable-next-line prefer-rest-params\n\t\treturn this.listener.apply(this.eventEmitter, arguments as unknown as Args);\n\t}\n}\n\n/**\n * A TypeScript not-compliant way of accessing AbortSignal#reason\n * Because DOM types have it, NodeJS types don't. -w-\n */\nfunction getReason(signal: any) {\n\treturn signal?.reason;\n}\n\nfunction eventTargetAgnosticRemoveListener(emitter: any, name: PropertyKey, listener: (...args: unknown[]) => any, flags?: InternalAgnosticFlags) {\n\tif (typeof emitter.off === 'function') {\n\t\temitter.off(name, listener);\n\t} else if (typeof emitter.removeEventListener === 'function') {\n\t\temitter.removeEventListener(name, listener, flags);\n\t}\n}\n\nfunction eventTargetAgnosticAddListener(emitter: any, name: string | symbol, listener: (...args: unknown[]) => any, flags?: InternalAgnosticFlags) {\n\tif (typeof emitter.on === 'function') {\n\t\tif (flags?.once) {\n\t\t\temitter.once!(name, listener);\n\t\t} else {\n\t\t\temitter.on(name, listener);\n\t\t}\n\t} else if (typeof emitter.addEventListener === 'function') {\n\t\temitter.addEventListener(name, listener, flags);\n\t}\n}\n\ninterface InternalAgnosticFlags {\n\tonce?: boolean;\n}\n\n// eslint-disable-next-line func-names, @typescript-eslint/no-empty-function\nconst AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function* () {}).prototype);\n\nfunction createIterResult(value: unknown, done: boolean) {\n\treturn { value, done };\n}\n\nexport interface AbortErrorOptions {\n\tcause?: unknown;\n}\n\nexport class AbortError extends Error {\n\tpublic readonly code = 'ABORT_ERR';\n\tpublic override readonly name = 'AbortError';\n\n\tpublic constructor(message = 'The operation was aborted', options: AbortErrorOptions | undefined = undefined) {\n\t\tif (options !== undefined && typeof options !== 'object') {\n\t\t\tthrow new TypeError(`Failed to create AbortError: options is not an object or undefined`);\n\t\t}\n\n\t\tsuper(message, options);\n\t}\n}\n\nfunction handleMaybeAsync(emitter: AsyncEventEmitter<any>, result: any) {\n\ttry {\n\t\tconst fin = result.finally;\n\n\t\tif (typeof fin === 'function') {\n\t\t\tconst promiseId = String(++emitter['_wrapperId']);\n\t\t\temitter['_internalPromiseMap'].set(promiseId, result);\n\t\t\tfin.call(result, function final() {\n\t\t\t\temitter['_internalPromiseMap'].delete(promiseId);\n\t\t\t});\n\t\t}\n\t} catch (err) {\n\t\temitter.emit('error', err);\n\t}\n}\n"],"mappings":";;;;AACA,SAAS,iBAAiB,OAA0E;AACnG,MAAI,OAAO,UAAU,YAAY;AAChC,UAAM,IAAI,UAAU,sDAAsD,OAAO,OAAO;AAAA,EACzF;AACD;AAJS;AAMT,SAAS,oBAAoB,OAA0D;AAEtF,MAAI,SAAS,EAAE,iBAAiB,cAAc;AAC7C,UAAM,IAAI,UAAU,sDAAsD,OAAO;AAAA,EAClF;AACD;AALS;AAQT,SAAS,UAAU,MAAiB,OAAe;AAClD,SAAO,QAAQ,IAAI,KAAK,QAAQ,SAAS;AACxC,SAAK,KAAK,IAAI,KAAK,QAAQ,CAAC;AAAA,EAC7B;AAEA,OAAK,IAAI;AACV;AANS;AAST,SAAS,WAAgC,KAAW;AAGnD,UAAQ,IAAI,QAAQ;AAAA,IACnB,KAAK;AACJ,aAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;AAAA,IACvB,KAAK;AACJ,aAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;AAAA,IAC/B,KAAK;AACJ,aAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;AAAA,IACvC,KAAK;AACJ,aAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;AAAA,IAC/C,KAAK;AACJ,aAAO,CAAC,IAAI,C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AAO;AAEnB,QAAI,OAAO,QAAQ,YAAY;AAC9B,YAAM,YAAY,OAAO,EAAE,QAAQ,YAAY,CAAC;AAChD,cAAQ,qBAAqB,EAAE,IAAI,WAAW,MAAM;AACpD,UAAI,KAAK,QAAQ,gCAAS,QAAQ;AACjC,gBAAQ,qBAAqB,EAAE,OAAO,SAAS;AAAA,MAChD,GAFiB,QAEhB;AAAA,IACF;AAAA,EACD,SAAS,KAAP;AACD,YAAQ,KAAK,SAAS,GAAG;AAAA,EAC1B;AACD;AAdS;","names":[]} \ No newline at end of file
diff --git a/node_modules/@vladfrangu/async_event_emitter/package.json b/node_modules/@vladfrangu/async_event_emitter/package.json
new file mode 100644
index 0000000..bb9534f
--- /dev/null
+++ b/node_modules/@vladfrangu/async_event_emitter/package.json
@@ -0,0 +1,107 @@
+{
+ "name": "@vladfrangu/async_event_emitter",
+ "version": "2.2.2",
+ "description": "An event emitter implementation with async support in mind",
+ "main": "./dist/index.js",
+ "module": "./dist/index.mjs",
+ "browser": "./dist/index.global.js",
+ "unpkg": "./dist/index.global.js",
+ "types": "./dist/index.d.ts",
+ "exports": {
+ ".": {
+ "import": "./dist/index.mjs",
+ "require": "./dist/index.js",
+ "types": "./dist/index.d.ts"
+ }
+ },
+ "sideEffects": false,
+ "author": "Vlad Frangu <kingdgrizzle@gmail.com>",
+ "license": "MIT",
+ "scripts": {
+ "lint": "eslint src tests --ext ts --fix",
+ "format": "prettier --write \"{src,tests}/**/*.ts\"",
+ "docs": "typedoc",
+ "test": "vitest run",
+ "test:watch": "vitest",
+ "update": "yarn upgrade-interactive",
+ "build": "tsup && tsc -b src",
+ "clean": "node scripts/clean.mjs",
+ "typecheck": "tsc -p tsconfig.typecheck.json",
+ "bump": "cliff-jumper",
+ "check-update": "cliff-jumper --dry-run",
+ "_postinstall": "husky install .github/husky",
+ "prepack": "rollup-type-bundler && pinst --disable",
+ "postpack": "pinst --enable"
+ },
+ "devDependencies": {
+ "@commitlint/cli": "^17.4.4",
+ "@commitlint/config-conventional": "^17.4.4",
+ "@favware/cliff-jumper": "^1.10.0",
+ "@favware/npm-deprecate": "^1.0.7",
+ "@favware/rollup-type-bundler": "^2.0.0",
+ "@sapphire/eslint-config": "^4.3.8",
+ "@sapphire/prettier-config": "^1.4.5",
+ "@sapphire/ts-config": "^3.3.4",
+ "@typescript-eslint/eslint-plugin": "^5.52.0",
+ "@typescript-eslint/parser": "^5.52.0",
+ "@vitest/coverage-c8": "^0.28.5",
+ "cz-conventional-changelog": "^3.3.0",
+ "eslint": "^8.34.0",
+ "eslint-config-prettier": "^8.6.0",
+ "eslint-plugin-prettier": "^4.2.1",
+ "husky": "^8.0.3",
+ "lint-staged": "^13.1.2",
+ "pinst": "^3.0.0",
+ "prettier": "^2.8.4",
+ "pretty-quick": "^3.1.3",
+ "tsup": "^6.6.3",
+ "typedoc": "^0.23.25",
+ "typedoc-plugin-mdn-links": "^2.0.2",
+ "typescript": "^4.9.5",
+ "vitest": "^0.28.5"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/vladfrangu/async_event_emitter.git"
+ },
+ "files": [
+ "dist",
+ "!dist/*.tsbuildinfo",
+ "THIRD_PARTY_LICENSE.md"
+ ],
+ "engines": {
+ "node": ">=v14.0.0",
+ "npm": ">=7.0.0"
+ },
+ "keywords": [
+ "event emitter",
+ "async",
+ "event",
+ "emitter"
+ ],
+ "bugs": {
+ "url": "https://github.com/vladfrangu/async_event_emitter/issues"
+ },
+ "commitlint": {
+ "extends": [
+ "@commitlint/config-conventional"
+ ]
+ },
+ "lint-staged": {
+ "*.{mjs,js,ts}": "eslint --fix --ext mjs,js,ts"
+ },
+ "config": {
+ "commitizen": {
+ "path": "./node_modules/cz-conventional-changelog"
+ }
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "prettier": "@sapphire/prettier-config",
+ "resolutions": {
+ "ansi-regex": "^5.0.1",
+ "minimist": "^1.2.6"
+ },
+ "packageManager": "yarn@3.2.1"
+} \ No newline at end of file
diff --git a/node_modules/busboy/.eslintrc.js b/node_modules/busboy/.eslintrc.js
new file mode 100644
index 0000000..be9311d
--- /dev/null
+++ b/node_modules/busboy/.eslintrc.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = {
+ extends: '@mscdex/eslint-config',
+};
diff --git a/node_modules/busboy/.github/workflows/ci.yml b/node_modules/busboy/.github/workflows/ci.yml
new file mode 100644
index 0000000..799bae0
--- /dev/null
+++ b/node_modules/busboy/.github/workflows/ci.yml
@@ -0,0 +1,24 @@
+name: CI
+
+on:
+ pull_request:
+ push:
+ branches: [ master ]
+
+jobs:
+ tests-linux:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ node-version: [10.16.0, 10.x, 12.x, 14.x, 16.x]
+ steps:
+ - uses: actions/checkout@v2
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+ - name: Install module
+ run: npm install
+ - name: Run tests
+ run: npm test
diff --git a/node_modules/busboy/.github/workflows/lint.yml b/node_modules/busboy/.github/workflows/lint.yml
new file mode 100644
index 0000000..9f9e1f5
--- /dev/null
+++ b/node_modules/busboy/.github/workflows/lint.yml
@@ -0,0 +1,23 @@
+name: lint
+
+on:
+ pull_request:
+ push:
+ branches: [ master ]
+
+env:
+ NODE_VERSION: 16.x
+
+jobs:
+ lint-js:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Use Node.js ${{ env.NODE_VERSION }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ env.NODE_VERSION }}
+ - name: Install ESLint + ESLint configs/plugins
+ run: npm install --only=dev
+ - name: Lint files
+ run: npm run lint
diff --git a/node_modules/busboy/LICENSE b/node_modules/busboy/LICENSE
new file mode 100644
index 0000000..290762e
--- /dev/null
+++ b/node_modules/busboy/LICENSE
@@ -0,0 +1,19 @@
+Copyright Brian White. 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. \ No newline at end of file
diff --git a/node_modules/busboy/README.md b/node_modules/busboy/README.md
new file mode 100644
index 0000000..654af30
--- /dev/null
+++ b/node_modules/busboy/README.md
@@ -0,0 +1,191 @@
+# Description
+
+A node.js module for parsing incoming HTML form data.
+
+Changes (breaking or otherwise) in v1.0.0 can be found [here](https://github.com/mscdex/busboy/issues/266).
+
+# Requirements
+
+* [node.js](http://nodejs.org/) -- v10.16.0 or newer
+
+
+# Install
+
+ npm install busboy
+
+
+# Examples
+
+* Parsing (multipart) with default options:
+
+```js
+const http = require('http');
+
+const busboy = require('busboy');
+
+http.createServer((req, res) => {
+ if (req.method === 'POST') {
+ console.log('POST request');
+ const bb = busboy({ headers: req.headers });
+ bb.on('file', (name, file, info) => {
+ const { filename, encoding, mimeType } = info;
+ console.log(
+ `File [${name}]: filename: %j, encoding: %j, mimeType: %j`,
+ filename,
+ encoding,
+ mimeType
+ );
+ file.on('data', (data) => {
+ console.log(`File [${name}] got ${data.length} bytes`);
+ }).on('close', () => {
+ console.log(`File [${name}] done`);
+ });
+ });
+ bb.on('field', (name, val, info) => {
+ console.log(`Field [${name}]: value: %j`, val);
+ });
+ bb.on('close', () => {
+ console.log('Done parsing form!');
+ res.writeHead(303, { Connection: 'close', Location: '/' });
+ res.end();
+ });
+ req.pipe(bb);
+ } else if (req.method === 'GET') {
+ res.writeHead(200, { Connection: 'close' });
+ res.end(`
+ <html>
+ <head></head>
+ <body>
+ <form method="POST" enctype="multipart/form-data">
+ <input type="file" name="filefield"><br />
+ <input type="text" name="textfield"><br />
+ <input type="submit">
+ </form>
+ </body>
+ </html>
+ `);
+ }
+}).listen(8000, () => {
+ console.log('Listening for requests');
+});
+
+// Example output:
+//
+// Listening for requests
+// < ... form submitted ... >
+// POST request
+// File [filefield]: filename: "logo.jpg", encoding: "binary", mime: "image/jpeg"
+// File [filefield] got 11912 bytes
+// Field [textfield]: value: "testing! :-)"
+// File [filefield] done
+// Done parsing form!
+```
+
+* Save all incoming files to disk:
+
+```js
+const { randomFillSync } = require('crypto');
+const fs = require('fs');
+const http = require('http');
+const os = require('os');
+const path = require('path');
+
+const busboy = require('busboy');
+
+const random = (() => {
+ const buf = Buffer.alloc(16);
+ return () => randomFillSync(buf).toString('hex');
+})();
+
+http.createServer((req, res) => {
+ if (req.method === 'POST') {
+ const bb = busboy({ headers: req.headers });
+ bb.on('file', (name, file, info) => {
+ const saveTo = path.join(os.tmpdir(), `busboy-upload-${random()}`);
+ file.pipe(fs.createWriteStream(saveTo));
+ });
+ bb.on('close', () => {
+ res.writeHead(200, { 'Connection': 'close' });
+ res.end(`That's all folks!`);
+ });
+ req.pipe(bb);
+ return;
+ }
+ res.writeHead(404);
+ res.end();
+}).listen(8000, () => {
+ console.log('Listening for requests');
+});
+```
+
+
+# API
+
+## Exports
+
+`busboy` exports a single function:
+
+**( _function_ )**(< _object_ >config) - Creates and returns a new _Writable_ form parser stream.
+
+* Valid `config` properties:
+
+ * **headers** - _object_ - These are the HTTP headers of the incoming request, which are used by individual parsers.
+
+ * **highWaterMark** - _integer_ - highWaterMark to use for the parser stream. **Default:** node's _stream.Writable_ default.
+
+ * **fileHwm** - _integer_ - highWaterMark to use for individual file streams. **Default:** node's _stream.Readable_ default.
+
+ * **defCharset** - _string_ - Default character set to use when one isn't defined. **Default:** `'utf8'`.
+
+ * **defParamCharset** - _string_ - For multipart forms, the default character set to use for values of part header parameters (e.g. filename) that are not extended parameters (that contain an explicit charset). **Default:** `'latin1'`.
+
+ * **preservePath** - _boolean_ - If paths in filenames from file parts in a `'multipart/form-data'` request shall be preserved. **Default:** `false`.
+
+ * **limits** - _object_ - Various limits on incoming data. Valid properties are:
+
+ * **fieldNameSize** - _integer_ - Max field name size (in bytes). **Default:** `100`.
+
+ * **fieldSize** - _integer_ - Max field value size (in bytes). **Default:** `1048576` (1MB).
+
+ * **fields** - _integer_ - Max number of non-file fields. **Default:** `Infinity`.
+
+ * **fileSize** - _integer_ - For multipart forms, the max file size (in bytes). **Default:** `Infinity`.
+
+ * **files** - _integer_ - For multipart forms, the max number of file fields. **Default:** `Infinity`.
+
+ * **parts** - _integer_ - For multipart forms, the max number of parts (fields + files). **Default:** `Infinity`.
+
+ * **headerPairs** - _integer_ - For multipart forms, the max number of header key-value pairs to parse. **Default:** `2000` (same as node's http module).
+
+This function can throw exceptions if there is something wrong with the values in `config`. For example, if the Content-Type in `headers` is missing entirely, is not a supported type, or is missing the boundary for `'multipart/form-data'` requests.
+
+## (Special) Parser stream events
+
+* **file**(< _string_ >name, < _Readable_ >stream, < _object_ >info) - Emitted for each new file found. `name` contains the form field name. `stream` is a _Readable_ stream containing the file's data. No transformations/conversions (e.g. base64 to raw binary) are done on the file's data. `info` contains the following properties:
+
+ * `filename` - _string_ - If supplied, this contains the file's filename. **WARNING:** You should almost _never_ use this value as-is (especially if you are using `preservePath: true` in your `config`) as it could contain malicious input. You are better off generating your own (safe) filenames, or at the very least using a hash of the filename.
+
+ * `encoding` - _string_ - The file's `'Content-Transfer-Encoding'` value.
+
+ * `mimeType` - _string_ - The file's `'Content-Type'` value.
+
+ **Note:** If you listen for this event, you should always consume the `stream` whether you care about its contents or not (you can simply do `stream.resume();` if you want to discard/skip the contents), otherwise the `'finish'`/`'close'` event will never fire on the busboy parser stream.
+ However, if you aren't accepting files, you can either simply not listen for the `'file'` event at all or set `limits.files` to `0`, and any/all files will be automatically skipped (these skipped files will still count towards any configured `limits.files` and `limits.parts` limits though).
+
+ **Note:** If a configured `limits.fileSize` limit was reached for a file, `stream` will both have a boolean property `truncated` set to `true` (best checked at the end of the stream) and emit a `'limit'` event to notify you when this happens.
+
+* **field**(< _string_ >name, < _string_ >value, < _object_ >info) - Emitted for each new non-file field found. `name` contains the form field name. `value` contains the string value of the field. `info` contains the following properties:
+
+ * `nameTruncated` - _boolean_ - Whether `name` was truncated or not (due to a configured `limits.fieldNameSize` limit)
+
+ * `valueTruncated` - _boolean_ - Whether `value` was truncated or not (due to a configured `limits.fieldSize` limit)
+
+ * `encoding` - _string_ - The field's `'Content-Transfer-Encoding'` value.
+
+ * `mimeType` - _string_ - The field's `'Content-Type'` value.
+
+* **partsLimit**() - Emitted when the configured `limits.parts` limit has been reached. No more `'file'` or `'field'` events will be emitted.
+
+* **filesLimit**() - Emitted when the configured `limits.files` limit has been reached. No more `'file'` events will be emitted.
+
+* **fieldsLimit**() - Emitted when the configured `limits.fields` limit has been reached. No more `'field'` events will be emitted.
diff --git a/node_modules/busboy/bench/bench-multipart-fields-100mb-big.js b/node_modules/busboy/bench/bench-multipart-fields-100mb-big.js
new file mode 100644
index 0000000..ef15729
--- /dev/null
+++ b/node_modules/busboy/bench/bench-multipart-fields-100mb-big.js
@@ -0,0 +1,149 @@
+'use strict';
+
+function createMultipartBuffers(boundary, sizes) {
+ const bufs = [];
+ for (let i = 0; i < sizes.length; ++i) {
+ const mb = sizes[i] * 1024 * 1024;
+ bufs.push(Buffer.from([
+ `--${boundary}`,
+ `content-disposition: form-data; name="field${i + 1}"`,
+ '',
+ '0'.repeat(mb),
+ '',
+ ].join('\r\n')));
+ }
+ bufs.push(Buffer.from([
+ `--${boundary}--`,
+ '',
+ ].join('\r\n')));
+ return bufs;
+}
+
+const boundary = '-----------------------------168072824752491622650073';
+const buffers = createMultipartBuffers(boundary, [
+ 10,
+ 10,
+ 10,
+ 20,
+ 50,
+]);
+const calls = {
+ partBegin: 0,
+ headerField: 0,
+ headerValue: 0,
+ headerEnd: 0,
+ headersEnd: 0,
+ partData: 0,
+ partEnd: 0,
+ end: 0,
+};
+
+const moduleName = process.argv[2];
+switch (moduleName) {
+ case 'busboy': {
+ const busboy = require('busboy');
+
+ const parser = busboy({
+ limits: {
+ fieldSizeLimit: Infinity,
+ },
+ headers: {
+ 'content-type': `multipart/form-data; boundary=${boundary}`,
+ },
+ });
+ parser.on('field', (name, val, info) => {
+ ++calls.partBegin;
+ ++calls.partData;
+ ++calls.partEnd;
+ }).on('close', () => {
+ ++calls.end;
+ console.timeEnd(moduleName);
+ });
+
+ console.time(moduleName);
+ for (const buf of buffers)
+ parser.write(buf);
+ break;
+ }
+
+ case 'formidable': {
+ const { MultipartParser } = require('formidable');
+
+ const parser = new MultipartParser();
+ parser.initWithBoundary(boundary);
+ parser.on('data', ({ name }) => {
+ ++calls[name];
+ if (name === 'end')
+ console.timeEnd(moduleName);
+ });
+
+ console.time(moduleName);
+ for (const buf of buffers)
+ parser.write(buf);
+
+ break;
+ }
+
+ case 'multiparty': {
+ const { Readable } = require('stream');
+
+ const { Form } = require('multiparty');
+
+ const form = new Form({
+ maxFieldsSize: Infinity,
+ maxFields: Infinity,
+ maxFilesSize: Infinity,
+ autoFields: false,
+ autoFiles: false,
+ });
+
+ const req = new Readable({ read: () => {} });
+ req.headers = {
+ 'content-type': `multipart/form-data; boundary=${boundary}`,
+ };
+
+ function hijack(name, fn) {
+ const oldFn = form[name];
+ form[name] = function() {
+ fn();
+ return oldFn.apply(this, arguments);
+ };
+ }
+
+ hijack('onParseHeaderField', () => {
+ ++calls.headerField;
+ });
+ hijack('onParseHeaderValue', () => {
+ ++calls.headerValue;
+ });
+ hijack('onParsePartBegin', () => {
+ ++calls.partBegin;
+ });
+ hijack('onParsePartData', () => {
+ ++calls.partData;
+ });
+ hijack('onParsePartEnd', () => {
+ ++calls.partEnd;
+ });
+
+ form.on('close', () => {
+ ++calls.end;
+ console.timeEnd(moduleName);
+ }).on('part', (p) => p.resume());
+
+ console.time(moduleName);
+ form.parse(req);
+ for (const buf of buffers)
+ req.push(buf);
+ req.push(null);
+
+ break;
+ }
+
+ default:
+ if (moduleName === undefined)
+ console.error('Missing parser module name');
+ else
+ console.error(`Invalid parser module name: ${moduleName}`);
+ process.exit(1);
+}
diff --git a/node_modules/busboy/bench/bench-multipart-fields-100mb-small.js b/node_modules/busboy/bench/bench-multipart-fields-100mb-small.js
new file mode 100644
index 0000000..f32d421
--- /dev/null
+++ b/node_modules/busboy/bench/bench-multipart-fields-100mb-small.js
@@ -0,0 +1,143 @@
+'use strict';
+
+function createMultipartBuffers(boundary, sizes) {
+ const bufs = [];
+ for (let i = 0; i < sizes.length; ++i) {
+ const mb = sizes[i] * 1024 * 1024;
+ bufs.push(Buffer.from([
+ `--${boundary}`,
+ `content-disposition: form-data; name="field${i + 1}"`,
+ '',
+ '0'.repeat(mb),
+ '',
+ ].join('\r\n')));
+ }
+ bufs.push(Buffer.from([
+ `--${boundary}--`,
+ '',
+ ].join('\r\n')));
+ return bufs;
+}
+
+const boundary = '-----------------------------168072824752491622650073';
+const buffers = createMultipartBuffers(boundary, (new Array(100)).fill(1));
+const calls = {
+ partBegin: 0,
+ headerField: 0,
+ headerValue: 0,
+ headerEnd: 0,
+ headersEnd: 0,
+ partData: 0,
+ partEnd: 0,
+ end: 0,
+};
+
+const moduleName = process.argv[2];
+switch (moduleName) {
+ case 'busboy': {
+ const busboy = require('busboy');
+
+ const parser = busboy({
+ limits: {
+ fieldSizeLimit: Infinity,
+ },
+ headers: {
+ 'content-type': `multipart/form-data; boundary=${boundary}`,
+ },
+ });
+ parser.on('field', (name, val, info) => {
+ ++calls.partBegin;
+ ++calls.partData;
+ ++calls.partEnd;
+ }).on('close', () => {
+ ++calls.end;
+ console.timeEnd(moduleName);
+ });
+
+ console.time(moduleName);
+ for (const buf of buffers)
+ parser.write(buf);
+ break;
+ }
+
+ case 'formidable': {
+ const { MultipartParser } = require('formidable');
+
+ const parser = new MultipartParser();
+ parser.initWithBoundary(boundary);
+ parser.on('data', ({ name }) => {
+ ++calls[name];
+ if (name === 'end')
+ console.timeEnd(moduleName);
+ });
+
+ console.time(moduleName);
+ for (const buf of buffers)
+ parser.write(buf);
+
+ break;
+ }
+
+ case 'multiparty': {
+ const { Readable } = require('stream');
+
+ const { Form } = require('multiparty');
+
+ const form = new Form({
+ maxFieldsSize: Infinity,
+ maxFields: Infinity,
+ maxFilesSize: Infinity,
+ autoFields: false,
+ autoFiles: false,
+ });
+
+ const req = new Readable({ read: () => {} });
+ req.headers = {
+ 'content-type': `multipart/form-data; boundary=${boundary}`,
+ };
+
+ function hijack(name, fn) {
+ const oldFn = form[name];
+ form[name] = function() {
+ fn();
+ return oldFn.apply(this, arguments);
+ };
+ }
+
+ hijack('onParseHeaderField', () => {
+ ++calls.headerField;
+ });
+ hijack('onParseHeaderValue', () => {
+ ++calls.headerValue;
+ });
+ hijack('onParsePartBegin', () => {
+ ++calls.partBegin;
+ });
+ hijack('onParsePartData', () => {
+ ++calls.partData;
+ });
+ hijack('onParsePartEnd', () => {
+ ++calls.partEnd;
+ });
+
+ form.on('close', () => {
+ ++calls.end;
+ console.timeEnd(moduleName);
+ }).on('part', (p) => p.resume());
+
+ console.time(moduleName);
+ form.parse(req);
+ for (const buf of buffers)
+ req.push(buf);
+ req.push(null);
+
+ break;
+ }
+
+ default:
+ if (moduleName === undefined)
+ console.error('Missing parser module name');
+ else
+ console.error(`Invalid parser module name: ${moduleName}`);
+ process.exit(1);
+}
diff --git a/node_modules/busboy/bench/bench-multipart-files-100mb-big.js b/node_modules/busboy/bench/bench-multipart-files-100mb-big.js
new file mode 100644
index 0000000..b46bdee
--- /dev/null
+++ b/node_modules/busboy/bench/bench-multipart-files-100mb-big.js
@@ -0,0 +1,154 @@
+'use strict';
+
+function createMultipartBuffers(boundary, sizes) {
+ const bufs = [];
+ for (let i = 0; i < sizes.length; ++i) {
+ const mb = sizes[i] * 1024 * 1024;
+ bufs.push(Buffer.from([
+ `--${boundary}`,
+ `content-disposition: form-data; name="file${i + 1}"; `
+ + `filename="random${i + 1}.bin"`,
+ 'content-type: application/octet-stream',
+ '',
+ '0'.repeat(mb),
+ '',
+ ].join('\r\n')));
+ }
+ bufs.push(Buffer.from([
+ `--${boundary}--`,
+ '',
+ ].join('\r\n')));
+ return bufs;
+}
+
+const boundary = '-----------------------------168072824752491622650073';
+const buffers = createMultipartBuffers(boundary, [
+ 10,
+ 10,
+ 10,
+ 20,
+ 50,
+]);
+const calls = {
+ partBegin: 0,
+ headerField: 0,
+ headerValue: 0,
+ headerEnd: 0,
+ headersEnd: 0,
+ partData: 0,
+ partEnd: 0,
+ end: 0,
+};
+
+const moduleName = process.argv[2];
+switch (moduleName) {
+ case 'busboy': {
+ const busboy = require('busboy');
+
+ const parser = busboy({
+ limits: {
+ fieldSizeLimit: Infinity,
+ },
+ headers: {
+ 'content-type': `multipart/form-data; boundary=${boundary}`,
+ },
+ });
+ parser.on('file', (name, stream, info) => {
+ ++calls.partBegin;
+ stream.on('data', (chunk) => {
+ ++calls.partData;
+ }).on('end', () => {
+ ++calls.partEnd;
+ });
+ }).on('close', () => {
+ ++calls.end;
+ console.timeEnd(moduleName);
+ });
+
+ console.time(moduleName);
+ for (const buf of buffers)
+ parser.write(buf);
+ break;
+ }
+
+ case 'formidable': {
+ const { MultipartParser } = require('formidable');
+
+ const parser = new MultipartParser();
+ parser.initWithBoundary(boundary);
+ parser.on('data', ({ name }) => {
+ ++calls[name];
+ if (name === 'end')
+ console.timeEnd(moduleName);
+ });
+
+ console.time(moduleName);
+ for (const buf of buffers)
+ parser.write(buf);
+
+ break;
+ }
+
+ case 'multiparty': {
+ const { Readable } = require('stream');
+
+ const { Form } = require('multiparty');
+
+ const form = new Form({
+ maxFieldsSize: Infinity,
+ maxFields: Infinity,
+ maxFilesSize: Infinity,
+ autoFields: false,
+ autoFiles: false,
+ });
+
+ const req = new Readable({ read: () => {} });
+ req.headers = {
+ 'content-type': `multipart/form-data; boundary=${boundary}`,
+ };
+
+ function hijack(name, fn) {
+ const oldFn = form[name];
+ form[name] = function() {
+ fn();
+ return oldFn.apply(this, arguments);
+ };
+ }
+
+ hijack('onParseHeaderField', () => {
+ ++calls.headerField;
+ });
+ hijack('onParseHeaderValue', () => {
+ ++calls.headerValue;
+ });
+ hijack('onParsePartBegin', () => {
+ ++calls.partBegin;
+ });
+ hijack('onParsePartData', () => {
+ ++calls.partData;
+ });
+ hijack('onParsePartEnd', () => {
+ ++calls.partEnd;
+ });
+
+ form.on('close', () => {
+ ++calls.end;
+ console.timeEnd(moduleName);
+ }).on('part', (p) => p.resume());
+
+ console.time(moduleName);
+ form.parse(req);
+ for (const buf of buffers)
+ req.push(buf);
+ req.push(null);
+
+ break;
+ }
+
+ default:
+ if (moduleName === undefined)
+ console.error('Missing parser module name');
+ else
+ console.error(`Invalid parser module name: ${moduleName}`);
+ process.exit(1);
+}
diff --git a/node_modules/busboy/bench/bench-multipart-files-100mb-small.js b/node_modules/busboy/bench/bench-multipart-files-100mb-small.js
new file mode 100644
index 0000000..46b5dff
--- /dev/null
+++ b/node_modules/busboy/bench/bench-multipart-files-100mb-small.js
@@ -0,0 +1,148 @@
+'use strict';
+
+function createMultipartBuffers(boundary, sizes) {
+ const bufs = [];
+ for (let i = 0; i < sizes.length; ++i) {
+ const mb = sizes[i] * 1024 * 1024;
+ bufs.push(Buffer.from([
+ `--${boundary}`,
+ `content-disposition: form-data; name="file${i + 1}"; `
+ + `filename="random${i + 1}.bin"`,
+ 'content-type: application/octet-stream',
+ '',
+ '0'.repeat(mb),
+ '',
+ ].join('\r\n')));
+ }
+ bufs.push(Buffer.from([
+ `--${boundary}--`,
+ '',
+ ].join('\r\n')));
+ return bufs;
+}
+
+const boundary = '-----------------------------168072824752491622650073';
+const buffers = createMultipartBuffers(boundary, (new Array(100)).fill(1));
+const calls = {
+ partBegin: 0,
+ headerField: 0,
+ headerValue: 0,
+ headerEnd: 0,
+ headersEnd: 0,
+ partData: 0,
+ partEnd: 0,
+ end: 0,
+};
+
+const moduleName = process.argv[2];
+switch (moduleName) {
+ case 'busboy': {
+ const busboy = require('busboy');
+
+ const parser = busboy({
+ limits: {
+ fieldSizeLimit: Infinity,
+ },
+ headers: {
+ 'content-type': `multipart/form-data; boundary=${boundary}`,
+ },
+ });
+ parser.on('file', (name, stream, info) => {
+ ++calls.partBegin;
+ stream.on('data', (chunk) => {
+ ++calls.partData;
+ }).on('end', () => {
+ ++calls.partEnd;
+ });
+ }).on('close', () => {
+ ++calls.end;
+ console.timeEnd(moduleName);
+ });
+
+ console.time(moduleName);
+ for (const buf of buffers)
+ parser.write(buf);
+ break;
+ }
+
+ case 'formidable': {
+ const { MultipartParser } = require('formidable');
+
+ const parser = new MultipartParser();
+ parser.initWithBoundary(boundary);
+ parser.on('data', ({ name }) => {
+ ++calls[name];
+ if (name === 'end')
+ console.timeEnd(moduleName);
+ });
+
+ console.time(moduleName);
+ for (const buf of buffers)
+ parser.write(buf);
+
+ break;
+ }
+
+ case 'multiparty': {
+ const { Readable } = require('stream');
+
+ const { Form } = require('multiparty');
+
+ const form = new Form({
+ maxFieldsSize: Infinity,
+ maxFields: Infinity,
+ maxFilesSize: Infinity,
+ autoFields: false,
+ autoFiles: false,
+ });
+
+ const req = new Readable({ read: () => {} });
+ req.headers = {
+ 'content-type': `multipart/form-data; boundary=${boundary}`,
+ };
+
+ function hijack(name, fn) {
+ const oldFn = form[name];
+ form[name] = function() {
+ fn();
+ return oldFn.apply(this, arguments);
+ };
+ }
+
+ hijack('onParseHeaderField', () => {
+ ++calls.headerField;
+ });
+ hijack('onParseHeaderValue', () => {
+ ++calls.headerValue;
+ });
+ hijack('onParsePartBegin', () => {
+ ++calls.partBegin;
+ });
+ hijack('onParsePartData', () => {
+ ++calls.partData;
+ });
+ hijack('onParsePartEnd', () => {
+ ++calls.partEnd;
+ });
+
+ form.on('close', () => {
+ ++calls.end;
+ console.timeEnd(moduleName);
+ }).on('part', (p) => p.resume());
+
+ console.time(moduleName);
+ form.parse(req);
+ for (const buf of buffers)
+ req.push(buf);
+ req.push(null);
+
+ break;
+ }
+
+ default:
+ if (moduleName === undefined)
+ console.error('Missing parser module name');
+ else
+ console.error(`Invalid parser module name: ${moduleName}`);
+ process.exit(1);
+}
diff --git a/node_modules/busboy/bench/bench-urlencoded-fields-100pairs-small.js b/node_modules/busboy/bench/bench-urlencoded-fields-100pairs-small.js
new file mode 100644
index 0000000..5c337df
--- /dev/null
+++ b/node_modules/busboy/bench/bench-urlencoded-fields-100pairs-small.js
@@ -0,0 +1,101 @@
+'use strict';
+
+const buffers = [
+ Buffer.from(
+ (new Array(100)).fill('').map((_, i) => `key${i}=value${i}`).join('&')
+ ),
+];
+const calls = {
+ field: 0,
+ end: 0,
+};
+
+let n = 3e3;
+
+const moduleName = process.argv[2];
+switch (moduleName) {
+ case 'busboy': {
+ const busboy = require('busboy');
+
+ console.time(moduleName);
+ (function next() {
+ const parser = busboy({
+ limits: {
+ fieldSizeLimit: Infinity,
+ },
+ headers: {
+ 'content-type': 'application/x-www-form-urlencoded; charset=utf-8',
+ },
+ });
+ parser.on('field', (name, val, info) => {
+ ++calls.field;
+ }).on('close', () => {
+ ++calls.end;
+ if (--n === 0)
+ console.timeEnd(moduleName);
+ else
+ process.nextTick(next);
+ });
+
+ for (const buf of buffers)
+ parser.write(buf);
+ parser.end();
+ })();
+ break;
+ }
+
+ case 'formidable': {
+ const QuerystringParser =
+ require('formidable/src/parsers/Querystring.js');
+
+ console.time(moduleName);
+ (function next() {
+ const parser = new QuerystringParser();
+ parser.on('data', (obj) => {
+ ++calls.field;
+ }).on('end', () => {
+ ++calls.end;
+ if (--n === 0)
+ console.timeEnd(moduleName);
+ else
+ process.nextTick(next);
+ });
+
+ for (const buf of buffers)
+ parser.write(buf);
+ parser.end();
+ })();
+ break;
+ }
+
+ case 'formidable-streaming': {
+ const QuerystringParser =
+ require('formidable/src/parsers/StreamingQuerystring.js');
+
+ console.time(moduleName);
+ (function next() {
+ const parser = new QuerystringParser();
+ parser.on('data', (obj) => {
+ ++calls.field;
+ }).on('end', () => {
+ ++calls.end;
+ if (--n === 0)
+ console.timeEnd(moduleName);
+ else
+ process.nextTick(next);
+ });
+
+ for (const buf of buffers)
+ parser.write(buf);
+ parser.end();
+ })();
+ break;
+ }
+
+ default:
+ if (moduleName === undefined)
+ console.error('Missing parser module name');
+ else
+ console.error(`Invalid parser module name: ${moduleName}`);
+ process.exit(1);
+}
diff --git a/node_modules/busboy/bench/bench-urlencoded-fields-900pairs-small-alt.js b/node_modules/busboy/bench/bench-urlencoded-fields-900pairs-small-alt.js
new file mode 100644
index 0000000..1f5645c
--- /dev/null
+++ b/node_modules/busboy/bench/bench-urlencoded-fields-900pairs-small-alt.js
@@ -0,0 +1,84 @@
+'use strict';
+
+const buffers = [
+ Buffer.from(
+ (new Array(900)).fill('').map((_, i) => `key${i}=value${i}`).join('&')
+ ),
+];
+const calls = {
+ field: 0,
+ end: 0,
+};
+
+const moduleName = process.argv[2];
+switch (moduleName) {
+ case 'busboy': {
+ const busboy = require('busboy');
+
+ console.time(moduleName);
+ const parser = busboy({
+ limits: {
+ fieldSizeLimit: Infinity,
+ },
+ headers: {
+ 'content-type': 'application/x-www-form-urlencoded; charset=utf-8',
+ },
+ });
+ parser.on('field', (name, val, info) => {
+ ++calls.field;
+ }).on('close', () => {
+ ++calls.end;
+ console.timeEnd(moduleName);
+ });
+
+ for (const buf of buffers)
+ parser.write(buf);
+ parser.end();
+ break;
+ }
+
+ case 'formidable': {
+ const QuerystringParser =
+ require('formidable/src/parsers/Querystring.js');
+
+ console.time(moduleName);
+ const parser = new QuerystringParser();
+ parser.on('data', (obj) => {
+ ++calls.field;
+ }).on('end', () => {
+ ++calls.end;
+ console.timeEnd(moduleName);
+ });
+
+ for (const buf of buffers)
+ parser.write(buf);
+ parser.end();
+ break;
+ }
+
+ case 'formidable-streaming': {
+ const QuerystringParser =
+ require('formidable/src/parsers/StreamingQuerystring.js');
+
+ console.time(moduleName);
+ const parser = new QuerystringParser();
+ parser.on('data', (obj) => {
+ ++calls.field;
+ }).on('end', () => {
+ ++calls.end;
+ console.timeEnd(moduleName);
+ });
+
+ for (const buf of buffers)
+ parser.write(buf);
+ parser.end();
+ break;
+ }
+
+ default:
+ if (moduleName === undefined)
+ console.error('Missing parser module name');
+ else
+ console.error(`Invalid parser module name: ${moduleName}`);
+ process.exit(1);
+}
diff --git a/node_modules/busboy/lib/index.js b/node_modules/busboy/lib/index.js
new file mode 100644
index 0000000..873272d
--- /dev/null
+++ b/node_modules/busboy/lib/index.js
@@ -0,0 +1,57 @@
+'use strict';
+
+const { parseContentType } = require('./utils.js');
+
+function getInstance(cfg) {
+ const headers = cfg.headers;
+ const conType = parseContentType(headers['content-type']);
+ if (!conType)
+ throw new Error('Malformed content type');
+
+ for (const type of TYPES) {
+ const matched = type.detect(conType);
+ if (!matched)
+ continue;
+
+ const instanceCfg = {
+ limits: cfg.limits,
+ headers,
+ conType,
+ highWaterMark: undefined,
+ fileHwm: undefined,
+ defCharset: undefined,
+ defParamCharset: undefined,
+ preservePath: false,
+ };
+ if (cfg.highWaterMark)
+ instanceCfg.highWaterMark = cfg.highWaterMark;
+ if (cfg.fileHwm)
+ instanceCfg.fileHwm = cfg.fileHwm;
+ instanceCfg.defCharset = cfg.defCharset;
+ instanceCfg.defParamCharset = cfg.defParamCharset;
+ instanceCfg.preservePath = cfg.preservePath;
+ return new type(instanceCfg);
+ }
+
+ throw new Error(`Unsupported content type: ${headers['content-type']}`);
+}
+
+// Note: types are explicitly listed here for easier bundling
+// See: https://github.com/mscdex/busboy/issues/121
+const TYPES = [
+ require('./types/multipart'),
+ require('./types/urlencoded'),
+].filter(function(typemod) { return typeof typemod.detect === 'function'; });
+
+module.exports = (cfg) => {
+ if (typeof cfg !== 'object' || cfg === null)
+ cfg = {};
+
+ if (typeof cfg.headers !== 'object'
+ || cfg.headers === null
+ || typeof cfg.headers['content-type'] !== 'string') {
+ throw new Error('Missing Content-Type');
+ }
+
+ return getInstance(cfg);
+};
diff --git a/node_modules/busboy/lib/types/multipart.js b/node_modules/busboy/lib/types/multipart.js
new file mode 100644
index 0000000..cc0d7bb
--- /dev/null
+++ b/node_modules/busboy/lib/types/multipart.js
@@ -0,0 +1,653 @@
+'use strict';
+
+const { Readable, Writable } = require('stream');
+
+const StreamSearch = require('streamsearch');
+
+const {
+ basename,
+ convertToUTF8,
+ getDecoder,
+ parseContentType,
+ parseDisposition,
+} = require('../utils.js');
+
+const BUF_CRLF = Buffer.from('\r\n');
+const BUF_CR = Buffer.from('\r');
+const BUF_DASH = Buffer.from('-');
+
+function noop() {}
+
+const MAX_HEADER_PAIRS = 2000; // From node
+const MAX_HEADER_SIZE = 16 * 1024; // From node (its default value)
+
+const HPARSER_NAME = 0;
+const HPARSER_PRE_OWS = 1;
+const HPARSER_VALUE = 2;
+class HeaderParser {
+ constructor(cb) {
+ this.header = Object.create(null);
+ this.pairCount = 0;
+ this.byteCount = 0;
+ this.state = HPARSER_NAME;
+ this.name = '';
+ this.value = '';
+ this.crlf = 0;
+ this.cb = cb;
+ }
+
+ reset() {
+ this.header = Object.create(null);
+ this.pairCount = 0;
+ this.byteCount = 0;
+ this.state = HPARSER_NAME;
+ this.name = '';
+ this.value = '';
+ this.crlf = 0;
+ }
+
+ push(chunk, pos, end) {
+ let start = pos;
+ while (pos < end) {
+ switch (this.state) {
+ case HPARSER_NAME: {
+ let done = false;
+ for (; pos < end; ++pos) {
+ if (this.byteCount === MAX_HEADER_SIZE)
+ return -1;
+ ++this.byteCount;
+ const code = chunk[pos];
+ if (TOKEN[code] !== 1) {
+ if (code !== 58/* ':' */)
+ return -1;
+ this.name += chunk.latin1Slice(start, pos);
+ if (this.name.length === 0)
+ return -1;
+ ++pos;
+ done = true;
+ this.state = HPARSER_PRE_OWS;
+ break;
+ }
+ }
+ if (!done) {
+ this.name += chunk.latin1Slice(start, pos);
+ break;
+ }
+ // FALLTHROUGH
+ }
+ case HPARSER_PRE_OWS: {
+ // Skip optional whitespace
+ let done = false;
+ for (; pos < end; ++pos) {
+ if (this.byteCount === MAX_HEADER_SIZE)
+ return -1;
+ ++this.byteCount;
+ const code = chunk[pos];
+ if (code !== 32/* ' ' */ && code !== 9/* '\t' */) {
+ start = pos;
+ done = true;
+ this.state = HPARSER_VALUE;
+ break;
+ }
+ }
+ if (!done)
+ break;
+ // FALLTHROUGH
+ }
+ case HPARSER_VALUE:
+ switch (this.crlf) {
+ case 0: // Nothing yet
+ for (; pos < end; ++pos) {
+ if (this.byteCount === MAX_HEADER_SIZE)
+ return -1;
+ ++this.byteCount;
+ const code = chunk[pos];
+ if (FIELD_VCHAR[code] !== 1) {
+ if (code !== 13/* '\r' */)
+ return -1;
+ ++this.crlf;
+ break;
+ }
+ }
+ this.value += chunk.latin1Slice(start, pos++);
+ break;
+ case 1: // Received CR
+ if (this.byteCount === MAX_HEADER_SIZE)
+ return -1;
+ ++this.byteCount;
+ if (chunk[pos++] !== 10/* '\n' */)
+ return -1;
+ ++this.crlf;
+ break;
+ case 2: { // Received CR LF
+ if (this.byteCount === MAX_HEADER_SIZE)
+ return -1;
+ ++this.byteCount;
+ const code = chunk[pos];
+ if (code === 32/* ' ' */ || code === 9/* '\t' */) {
+ // Folded value
+ start = pos;
+ this.crlf = 0;
+ } else {
+ if (++this.pairCount < MAX_HEADER_PAIRS) {
+ this.name = this.name.toLowerCase();
+ if (this.header[this.name] === undefined)
+ this.header[this.name] = [this.value];
+ else
+ this.header[this.name].push(this.value);
+ }
+ if (code === 13/* '\r' */) {
+ ++this.crlf;
+ ++pos;
+ } else {
+ // Assume start of next header field name
+ start = pos;
+ this.crlf = 0;
+ this.state = HPARSER_NAME;
+ this.name = '';
+ this.value = '';
+ }
+ }
+ break;
+ }
+ case 3: { // Received CR LF CR
+ if (this.byteCount === MAX_HEADER_SIZE)
+ return -1;
+ ++this.byteCount;
+ if (chunk[pos++] !== 10/* '\n' */)
+ return -1;
+ // End of header
+ const header = this.header;
+ this.reset();
+ this.cb(header);
+ return pos;
+ }
+ }
+ break;
+ }
+ }
+
+ return pos;
+ }
+}
+
+class FileStream extends Readable {
+ constructor(opts, owner) {
+ super(opts);
+ this.truncated = false;
+ this._readcb = null;
+ this.once('end', () => {
+ // We need to make sure that we call any outstanding _writecb() that is
+ // associated with this file so that processing of the rest of the form
+ // can continue. This may not happen if the file stream ends right after
+ // backpressure kicks in, so we force it here.
+ this._read();
+ if (--owner._fileEndsLeft === 0 && owner._finalcb) {
+ const cb = owner._finalcb;
+ owner._finalcb = null;
+ // Make sure other 'end' event handlers get a chance to be executed
+ // before busboy's 'finish' event is emitted
+ process.nextTick(cb);
+ }
+ });
+ }
+ _read(n) {
+ const cb = this._readcb;
+ if (cb) {
+ this._readcb = null;
+ cb();
+ }
+ }
+}
+
+const ignoreData = {
+ push: (chunk, pos) => {},
+ destroy: () => {},
+};
+
+function callAndUnsetCb(self, err) {
+ const cb = self._writecb;
+ self._writecb = null;
+ if (err)
+ self.destroy(err);
+ else if (cb)
+ cb();
+}
+
+function nullDecoder(val, hint) {
+ return val;
+}
+
+class Multipart extends Writable {
+ constructor(cfg) {
+ const streamOpts = {
+ autoDestroy: true,
+ emitClose: true,
+ highWaterMark: (typeof cfg.highWaterMark === 'number'
+ ? cfg.highWaterMark
+ : undefined),
+ };
+ super(streamOpts);
+
+ if (!cfg.conType.params || typeof cfg.conType.params.boundary !== 'string')
+ throw new Error('Multipart: Boundary not found');
+
+ const boundary = cfg.conType.params.boundary;
+ const paramDecoder = (typeof cfg.defParamCharset === 'string'
+ && cfg.defParamCharset
+ ? getDecoder(cfg.defParamCharset)
+ : nullDecoder);
+ const defCharset = (cfg.defCharset || 'utf8');
+ const preservePath = cfg.preservePath;
+ const fileOpts = {
+ autoDestroy: true,
+ emitClose: true,
+ highWaterMark: (typeof cfg.fileHwm === 'number'
+ ? cfg.fileHwm
+ : undefined),
+ };
+
+ const limits = cfg.limits;
+ const fieldSizeLimit = (limits && typeof limits.fieldSize === 'number'
+ ? limits.fieldSize
+ : 1 * 1024 * 1024);
+ const fileSizeLimit = (limits && typeof limits.fileSize === 'number'
+ ? limits.fileSize
+ : Infinity);
+ const filesLimit = (limits && typeof limits.files === 'number'
+ ? limits.files
+ : Infinity);
+ const fieldsLimit = (limits && typeof limits.fields === 'number'
+ ? limits.fields
+ : Infinity);
+ const partsLimit = (limits && typeof limits.parts === 'number'
+ ? limits.parts
+ : Infinity);
+
+ let parts = -1; // Account for initial boundary
+ let fields = 0;
+ let files = 0;
+ let skipPart = false;
+
+ this._fileEndsLeft = 0;
+ this._fileStream = undefined;
+ this._complete = false;
+ let fileSize = 0;
+
+ let field;
+ let fieldSize = 0;
+ let partCharset;
+ let partEncoding;
+ let partType;
+ let partName;
+ let partTruncated = false;
+
+ let hitFilesLimit = false;
+ let hitFieldsLimit = false;
+
+ this._hparser = null;
+ const hparser = new HeaderParser((header) => {
+ this._hparser = null;
+ skipPart = false;
+
+ partType = 'text/plain';
+ partCharset = defCharset;
+ partEncoding = '7bit';
+ partName = undefined;
+ partTruncated = false;
+
+ let filename;
+ if (!header['content-disposition']) {
+ skipPart = true;
+ return;
+ }
+
+ const disp = parseDisposition(header['content-disposition'][0],
+ paramDecoder);
+ if (!disp || disp.type !== 'form-data') {
+ skipPart = true;
+ return;
+ }
+
+ if (disp.params) {
+ if (disp.params.name)
+ partName = disp.params.name;
+
+ if (disp.params['filename*'])
+ filename = disp.params['filename*'];
+ else if (disp.params.filename)
+ filename = disp.params.filename;
+
+ if (filename !== undefined && !preservePath)
+ filename = basename(filename);
+ }
+
+ if (header['content-type']) {
+ const conType = parseContentType(header['content-type'][0]);
+ if (conType) {
+ partType = `${conType.type}/${conType.subtype}`;
+ if (conType.params && typeof conType.params.charset === 'string')
+ partCharset = conType.params.charset.toLowerCase();
+ }
+ }
+
+ if (header['content-transfer-encoding'])
+ partEncoding = header['content-transfer-encoding'][0].toLowerCase();
+
+ if (partType === 'application/octet-stream' || filename !== undefined) {
+ // File
+
+ if (files === filesLimit) {
+ if (!hitFilesLimit) {
+ hitFilesLimit = true;
+ this.emit('filesLimit');
+ }
+ skipPart = true;
+ return;
+ }
+ ++files;
+
+ if (this.listenerCount('file') === 0) {
+ skipPart = true;
+ return;
+ }
+
+ fileSize = 0;
+ this._fileStream = new FileStream(fileOpts, this);
+ ++this._fileEndsLeft;
+ this.emit(
+ 'file',
+ partName,
+ this._fileStream,
+ { filename,
+ encoding: partEncoding,
+ mimeType: partType }
+ );
+ } else {
+ // Non-file
+
+ if (fields === fieldsLimit) {
+ if (!hitFieldsLimit) {
+ hitFieldsLimit = true;
+ this.emit('fieldsLimit');
+ }
+ skipPart = true;
+ return;
+ }
+ ++fields;
+
+ if (this.listenerCount('field') === 0) {
+ skipPart = true;
+ return;
+ }
+
+ field = [];
+ fieldSize = 0;
+ }
+ });
+
+ let matchPostBoundary = 0;
+ const ssCb = (isMatch, data, start, end, isDataSafe) => {
+retrydata:
+ while (data) {
+ if (this._hparser !== null) {
+ const ret = this._hparser.push(data, start, end);
+ if (ret === -1) {
+ this._hparser = null;
+ hparser.reset();
+ this.emit('error', new Error('Malformed part header'));
+ break;
+ }
+ start = ret;
+ }
+
+ if (start === end)
+ break;
+
+ if (matchPostBoundary !== 0) {
+ if (matchPostBoundary === 1) {
+ switch (data[start]) {
+ case 45: // '-'
+ // Try matching '--' after boundary
+ matchPostBoundary = 2;
+ ++start;
+ break;
+ case 13: // '\r'
+ // Try matching CR LF before header
+ matchPostBoundary = 3;
+ ++start;
+ break;
+ default:
+ matchPostBoundary = 0;
+ }
+ if (start === end)
+ return;
+ }
+
+ if (matchPostBoundary === 2) {
+ matchPostBoundary = 0;
+ if (data[start] === 45/* '-' */) {
+ // End of multipart data
+ this._complete = true;
+ this._bparser = ignoreData;
+ return;
+ }
+ // We saw something other than '-', so put the dash we consumed
+ // "back"
+ const writecb = this._writecb;
+ this._writecb = noop;
+ ssCb(false, BUF_DASH, 0, 1, false);
+ this._writecb = writecb;
+ } else if (matchPostBoundary === 3) {
+ matchPostBoundary = 0;
+ if (data[start] === 10/* '\n' */) {
+ ++start;
+ if (parts >= partsLimit)
+ break;
+ // Prepare the header parser
+ this._hparser = hparser;
+ if (start === end)
+ break;
+ // Process the remaining data as a header
+ continue retrydata;
+ } else {
+ // We saw something other than LF, so put the CR we consumed
+ // "back"
+ const writecb = this._writecb;
+ this._writecb = noop;
+ ssCb(false, BUF_CR, 0, 1, false);
+ this._writecb = writecb;
+ }
+ }
+ }
+
+ if (!skipPart) {
+ if (this._fileStream) {
+ let chunk;
+ const actualLen = Math.min(end - start, fileSizeLimit - fileSize);
+ if (!isDataSafe) {
+ chunk = Buffer.allocUnsafe(actualLen);
+ data.copy(chunk, 0, start, start + actualLen);
+ } else {
+ chunk = data.slice(start, start + actualLen);
+ }
+
+ fileSize += chunk.length;
+ if (fileSize === fileSizeLimit) {
+ if (chunk.length > 0)
+ this._fileStream.push(chunk);
+ this._fileStream.emit('limit');
+ this._fileStream.truncated = true;
+ skipPart = true;
+ } else if (!this._fileStream.push(chunk)) {
+ if (this._writecb)
+ this._fileStream._readcb = this._writecb;
+ this._writecb = null;
+ }
+ } else if (field !== undefined) {
+ let chunk;
+ const actualLen = Math.min(
+ end - start,
+ fieldSizeLimit - fieldSize
+ );
+ if (!isDataSafe) {
+ chunk = Buffer.allocUnsafe(actualLen);
+ data.copy(chunk, 0, start, start + actualLen);
+ } else {
+ chunk = data.slice(start, start + actualLen);
+ }
+
+ fieldSize += actualLen;
+ field.push(chunk);
+ if (fieldSize === fieldSizeLimit) {
+ skipPart = true;
+ partTruncated = true;
+ }
+ }
+ }
+
+ break;
+ }
+
+ if (isMatch) {
+ matchPostBoundary = 1;
+
+ if (this._fileStream) {
+ // End the active file stream if the previous part was a file
+ this._fileStream.push(null);
+ this._fileStream = null;
+ } else if (field !== undefined) {
+ let data;
+ switch (field.length) {
+ case 0:
+ data = '';
+ break;
+ case 1:
+ data = convertToUTF8(field[0], partCharset, 0);
+ break;
+ default:
+ data = convertToUTF8(
+ Buffer.concat(field, fieldSize),
+ partCharset,
+ 0
+ );
+ }
+ field = undefined;
+ fieldSize = 0;
+ this.emit(
+ 'field',
+ partName,
+ data,
+ { nameTruncated: false,
+ valueTruncated: partTruncated,
+ encoding: partEncoding,
+ mimeType: partType }
+ );
+ }
+
+ if (++parts === partsLimit)
+ this.emit('partsLimit');
+ }
+ };
+ this._bparser = new StreamSearch(`\r\n--${boundary}`, ssCb);
+
+ this._writecb = null;
+ this._finalcb = null;
+
+ // Just in case there is no preamble
+ this.write(BUF_CRLF);
+ }
+
+ static detect(conType) {
+ return (conType.type === 'multipart' && conType.subtype === 'form-data');
+ }
+
+ _write(chunk, enc, cb) {
+ this._writecb = cb;
+ this._bparser.push(chunk, 0);
+ if (this._writecb)
+ callAndUnsetCb(this);
+ }
+
+ _destroy(err, cb) {
+ this._hparser = null;
+ this._bparser = ignoreData;
+ if (!err)
+ err = checkEndState(this);
+ const fileStream = this._fileStream;
+ if (fileStream) {
+ this._fileStream = null;
+ fileStream.destroy(err);
+ }
+ cb(err);
+ }
+
+ _final(cb) {
+ this._bparser.destroy();
+ if (!this._complete)
+ return cb(new Error('Unexpected end of form'));
+ if (this._fileEndsLeft)
+ this._finalcb = finalcb.bind(null, this, cb);
+ else
+ finalcb(this, cb);
+ }
+}
+
+function finalcb(self, cb, err) {
+ if (err)
+ return cb(err);
+ err = checkEndState(self);
+ cb(err);
+}
+
+function checkEndState(self) {
+ if (self._hparser)
+ return new Error('Malformed part header');
+ const fileStream = self._fileStream;
+ if (fileStream) {
+ self._fileStream = null;
+ fileStream.destroy(new Error('Unexpected end of file'));
+ }
+ if (!self._complete)
+ return new Error('Unexpected end of form');
+}
+
+const TOKEN = [
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+];
+
+module.exports = Multipart;
diff --git a/node_modules/busboy/lib/types/urlencoded.js b/node_modules/busboy/lib/types/urlencoded.js
new file mode 100644
index 0000000..5c463a2
--- /dev/null
+++ b/node_modules/busboy/lib/types/urlencoded.js
@@ -0,0 +1,350 @@
+'use strict';
+
+const { Writable } = require('stream');
+
+const { getDecoder } = require('../utils.js');
+
+class URLEncoded extends Writable {
+ constructor(cfg) {
+ const streamOpts = {
+ autoDestroy: true,
+ emitClose: true,
+ highWaterMark: (typeof cfg.highWaterMark === 'number'
+ ? cfg.highWaterMark
+ : undefined),
+ };
+ super(streamOpts);
+
+ let charset = (cfg.defCharset || 'utf8');
+ if (cfg.conType.params && typeof cfg.conType.params.charset === 'string')
+ charset = cfg.conType.params.charset;
+
+ this.charset = charset;
+
+ const limits = cfg.limits;
+ this.fieldSizeLimit = (limits && typeof limits.fieldSize === 'number'
+ ? limits.fieldSize
+ : 1 * 1024 * 1024);
+ this.fieldsLimit = (limits && typeof limits.fields === 'number'
+ ? limits.fields
+ : Infinity);
+ this.fieldNameSizeLimit = (
+ limits && typeof limits.fieldNameSize === 'number'
+ ? limits.fieldNameSize
+ : 100
+ );
+
+ this._inKey = true;
+ this._keyTrunc = false;
+ this._valTrunc = false;
+ this._bytesKey = 0;
+ this._bytesVal = 0;
+ this._fields = 0;
+ this._key = '';
+ this._val = '';
+ this._byte = -2;
+ this._lastPos = 0;
+ this._encode = 0;
+ this._decoder = getDecoder(charset);
+ }
+
+ static detect(conType) {
+ return (conType.type === 'application'
+ && conType.subtype === 'x-www-form-urlencoded');
+ }
+
+ _write(chunk, enc, cb) {
+ if (this._fields >= this.fieldsLimit)
+ return cb();
+
+ let i = 0;
+ const len = chunk.length;
+ this._lastPos = 0;
+
+ // Check if we last ended mid-percent-encoded byte
+ if (this._byte !== -2) {
+ i = readPctEnc(this, chunk, i, len);
+ if (i === -1)
+ return cb(new Error('Malformed urlencoded form'));
+ if (i >= len)
+ return cb();
+ if (this._inKey)
+ ++this._bytesKey;
+ else
+ ++this._bytesVal;
+ }
+
+main:
+ while (i < len) {
+ if (this._inKey) {
+ // Parsing key
+
+ i = skipKeyBytes(this, chunk, i, len);
+
+ while (i < len) {
+ switch (chunk[i]) {
+ case 61: // '='
+ if (this._lastPos < i)
+ this._key += chunk.latin1Slice(this._lastPos, i);
+ this._lastPos = ++i;
+ this._key = this._decoder(this._key, this._encode);
+ this._encode = 0;
+ this._inKey = false;
+ continue main;
+ case 38: // '&'
+ if (this._lastPos < i)
+ this._key += chunk.latin1Slice(this._lastPos, i);
+ this._lastPos = ++i;
+ this._key = this._decoder(this._key, this._encode);
+ this._encode = 0;
+ if (this._bytesKey > 0) {
+ this.emit(
+ 'field',
+ this._key,
+ '',
+ { nameTruncated: this._keyTrunc,
+ valueTruncated: false,
+ encoding: this.charset,
+ mimeType: 'text/plain' }
+ );
+ }
+ this._key = '';
+ this._val = '';
+ this._keyTrunc = false;
+ this._valTrunc = false;
+ this._bytesKey = 0;
+ this._bytesVal = 0;
+ if (++this._fields >= this.fieldsLimit) {
+ this.emit('fieldsLimit');
+ return cb();
+ }
+ continue;
+ case 43: // '+'
+ if (this._lastPos < i)
+ this._key += chunk.latin1Slice(this._lastPos, i);
+ this._key += ' ';
+ this._lastPos = i + 1;
+ break;
+ case 37: // '%'
+ if (this._encode === 0)
+ this._encode = 1;
+ if (this._lastPos < i)
+ this._key += chunk.latin1Slice(this._lastPos, i);
+ this._lastPos = i + 1;
+ this._byte = -1;
+ i = readPctEnc(this, chunk, i + 1, len);
+ if (i === -1)
+ return cb(new Error('Malformed urlencoded form'));
+ if (i >= len)
+ return cb();
+ ++this._bytesKey;
+ i = skipKeyBytes(this, chunk, i, len);
+ continue;
+ }
+ ++i;
+ ++this._bytesKey;
+ i = skipKeyBytes(this, chunk, i, len);
+ }
+ if (this._lastPos < i)
+ this._key += chunk.latin1Slice(this._lastPos, i);
+ } else {
+ // Parsing value
+
+ i = skipValBytes(this, chunk, i, len);
+
+ while (i < len) {
+ switch (chunk[i]) {
+ case 38: // '&'
+ if (this._lastPos < i)
+ this._val += chunk.latin1Slice(this._lastPos, i);
+ this._lastPos = ++i;
+ this._inKey = true;
+ this._val = this._decoder(this._val, this._encode);
+ this._encode = 0;
+ if (this._bytesKey > 0 || this._bytesVal > 0) {
+ this.emit(
+ 'field',
+ this._key,
+ this._val,
+ { nameTruncated: this._keyTrunc,
+ valueTruncated: this._valTrunc,
+ encoding: this.charset,
+ mimeType: 'text/plain' }
+ );
+ }
+ this._key = '';
+ this._val = '';
+ this._keyTrunc = false;
+ this._valTrunc = false;
+ this._bytesKey = 0;
+ this._bytesVal = 0;
+ if (++this._fields >= this.fieldsLimit) {
+ this.emit('fieldsLimit');
+ return cb();
+ }
+ continue main;
+ case 43: // '+'
+ if (this._lastPos < i)
+ this._val += chunk.latin1Slice(this._lastPos, i);
+ this._val += ' ';
+ this._lastPos = i + 1;
+ break;
+ case 37: // '%'
+ if (this._encode === 0)
+ this._encode = 1;
+ if (this._lastPos < i)
+ this._val += chunk.latin1Slice(this._lastPos, i);
+ this._lastPos = i + 1;
+ this._byte = -1;
+ i = readPctEnc(this, chunk, i + 1, len);
+ if (i === -1)
+ return cb(new Error('Malformed urlencoded form'));
+ if (i >= len)
+ return cb();
+ ++this._bytesVal;
+ i = skipValBytes(this, chunk, i, len);
+ continue;
+ }
+ ++i;
+ ++this._bytesVal;
+ i = skipValBytes(this, chunk, i, len);
+ }
+ if (this._lastPos < i)
+ this._val += chunk.latin1Slice(this._lastPos, i);
+ }
+ }
+
+ cb();
+ }
+
+ _final(cb) {
+ if (this._byte !== -2)
+ return cb(new Error('Malformed urlencoded form'));
+ if (!this._inKey || this._bytesKey > 0 || this._bytesVal > 0) {
+ if (this._inKey)
+ this._key = this._decoder(this._key, this._encode);
+ else
+ this._val = this._decoder(this._val, this._encode);
+ this.emit(
+ 'field',
+ this._key,
+ this._val,
+ { nameTruncated: this._keyTrunc,
+ valueTruncated: this._valTrunc,
+ encoding: this.charset,
+ mimeType: 'text/plain' }
+ );
+ }
+ cb();
+ }
+}
+
+function readPctEnc(self, chunk, pos, len) {
+ if (pos >= len)
+ return len;
+
+ if (self._byte === -1) {
+ // We saw a '%' but no hex characters yet
+ const hexUpper = HEX_VALUES[chunk[pos++]];
+ if (hexUpper === -1)
+ return -1;
+
+ if (hexUpper >= 8)
+ self._encode = 2; // Indicate high bits detected
+
+ if (pos < len) {
+ // Both hex characters are in this chunk
+ const hexLower = HEX_VALUES[chunk[pos++]];
+ if (hexLower === -1)
+ return -1;
+
+ if (self._inKey)
+ self._key += String.fromCharCode((hexUpper << 4) + hexLower);
+ else
+ self._val += String.fromCharCode((hexUpper << 4) + hexLower);
+
+ self._byte = -2;
+ self._lastPos = pos;
+ } else {
+ // Only one hex character was available in this chunk
+ self._byte = hexUpper;
+ }
+ } else {
+ // We saw only one hex character so far
+ const hexLower = HEX_VALUES[chunk[pos++]];
+ if (hexLower === -1)
+ return -1;
+
+ if (self._inKey)
+ self._key += String.fromCharCode((self._byte << 4) + hexLower);
+ else
+ self._val += String.fromCharCode((self._byte << 4) + hexLower);
+
+ self._byte = -2;
+ self._lastPos = pos;
+ }
+
+ return pos;
+}
+
+function skipKeyBytes(self, chunk, pos, len) {
+ // Skip bytes if we've truncated
+ if (self._bytesKey > self.fieldNameSizeLimit) {
+ if (!self._keyTrunc) {
+ if (self._lastPos < pos)
+ self._key += chunk.latin1Slice(self._lastPos, pos - 1);
+ }
+ self._keyTrunc = true;
+ for (; pos < len; ++pos) {
+ const code = chunk[pos];
+ if (code === 61/* '=' */ || code === 38/* '&' */)
+ break;
+ ++self._bytesKey;
+ }
+ self._lastPos = pos;
+ }
+
+ return pos;
+}
+
+function skipValBytes(self, chunk, pos, len) {
+ // Skip bytes if we've truncated
+ if (self._bytesVal > self.fieldSizeLimit) {
+ if (!self._valTrunc) {
+ if (self._lastPos < pos)
+ self._val += chunk.latin1Slice(self._lastPos, pos - 1);
+ }
+ self._valTrunc = true;
+ for (; pos < len; ++pos) {
+ if (chunk[pos] === 38/* '&' */)
+ break;
+ ++self._bytesVal;
+ }
+ self._lastPos = pos;
+ }
+
+ return pos;
+}
+
+/* eslint-disable no-multi-spaces */
+const HEX_VALUES = [
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
+ -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+];
+/* eslint-enable no-multi-spaces */
+
+module.exports = URLEncoded;
diff --git a/node_modules/busboy/lib/utils.js b/node_modules/busboy/lib/utils.js
new file mode 100644
index 0000000..8274f6c
--- /dev/null
+++ b/node_modules/busboy/lib/utils.js
@@ -0,0 +1,596 @@
+'use strict';
+
+function parseContentType(str) {
+ if (str.length === 0)
+ return;
+
+ const params = Object.create(null);
+ let i = 0;
+
+ // Parse type
+ for (; i < str.length; ++i) {
+ const code = str.charCodeAt(i);
+ if (TOKEN[code] !== 1) {
+ if (code !== 47/* '/' */ || i === 0)
+ return;
+ break;
+ }
+ }
+ // Check for type without subtype
+ if (i === str.length)
+ return;
+
+ const type = str.slice(0, i).toLowerCase();
+
+ // Parse subtype
+ const subtypeStart = ++i;
+ for (; i < str.length; ++i) {
+ const code = str.charCodeAt(i);
+ if (TOKEN[code] !== 1) {
+ // Make sure we have a subtype
+ if (i === subtypeStart)
+ return;
+
+ if (parseContentTypeParams(str, i, params) === undefined)
+ return;
+ break;
+ }
+ }
+ // Make sure we have a subtype
+ if (i === subtypeStart)
+ return;
+
+ const subtype = str.slice(subtypeStart, i).toLowerCase();
+
+ return { type, subtype, params };
+}
+
+function parseContentTypeParams(str, i, params) {
+ while (i < str.length) {
+ // Consume whitespace
+ for (; i < str.length; ++i) {
+ const code = str.charCodeAt(i);
+ if (code !== 32/* ' ' */ && code !== 9/* '\t' */)
+ break;
+ }
+
+ // Ended on whitespace
+ if (i === str.length)
+ break;
+
+ // Check for malformed parameter
+ if (str.charCodeAt(i++) !== 59/* ';' */)
+ return;
+
+ // Consume whitespace
+ for (; i < str.length; ++i) {
+ const code = str.charCodeAt(i);
+ if (code !== 32/* ' ' */ && code !== 9/* '\t' */)
+ break;
+ }
+
+ // Ended on whitespace (malformed)
+ if (i === str.length)
+ return;
+
+ let name;
+ const nameStart = i;
+ // Parse parameter name
+ for (; i < str.length; ++i) {
+ const code = str.charCodeAt(i);
+ if (TOKEN[code] !== 1) {
+ if (code !== 61/* '=' */)
+ return;
+ break;
+ }
+ }
+
+ // No value (malformed)
+ if (i === str.length)
+ return;
+
+ name = str.slice(nameStart, i);
+ ++i; // Skip over '='
+
+ // No value (malformed)
+ if (i === str.length)
+ return;
+
+ let value = '';
+ let valueStart;
+ if (str.charCodeAt(i) === 34/* '"' */) {
+ valueStart = ++i;
+ let escaping = false;
+ // Parse quoted value
+ for (; i < str.length; ++i) {
+ const code = str.charCodeAt(i);
+ if (code === 92/* '\\' */) {
+ if (escaping) {
+ valueStart = i;
+ escaping = false;
+ } else {
+ value += str.slice(valueStart, i);
+ escaping = true;
+ }
+ continue;
+ }
+ if (code === 34/* '"' */) {
+ if (escaping) {
+ valueStart = i;
+ escaping = false;
+ continue;
+ }
+ value += str.slice(valueStart, i);
+ break;
+ }
+ if (escaping) {
+ valueStart = i - 1;
+ escaping = false;
+ }
+ // Invalid unescaped quoted character (malformed)
+ if (QDTEXT[code] !== 1)
+ return;
+ }
+
+ // No end quote (malformed)
+ if (i === str.length)
+ return;
+
+ ++i; // Skip over double quote
+ } else {
+ valueStart = i;
+ // Parse unquoted value
+ for (; i < str.length; ++i) {
+ const code = str.charCodeAt(i);
+ if (TOKEN[code] !== 1) {
+ // No value (malformed)
+ if (i === valueStart)
+ return;
+ break;
+ }
+ }
+ value = str.slice(valueStart, i);
+ }
+
+ name = name.toLowerCase();
+ if (params[name] === undefined)
+ params[name] = value;
+ }
+
+ return params;
+}
+
+function parseDisposition(str, defDecoder) {
+ if (str.length === 0)
+ return;
+
+ const params = Object.create(null);
+ let i = 0;
+
+ for (; i < str.length; ++i) {
+ const code = str.charCodeAt(i);
+ if (TOKEN[code] !== 1) {
+ if (parseDispositionParams(str, i, params, defDecoder) === undefined)
+ return;
+ break;
+ }
+ }
+
+ const type = str.slice(0, i).toLowerCase();
+
+ return { type, params };
+}
+
+function parseDispositionParams(str, i, params, defDecoder) {
+ while (i < str.length) {
+ // Consume whitespace
+ for (; i < str.length; ++i) {
+ const code = str.charCodeAt(i);
+ if (code !== 32/* ' ' */ && code !== 9/* '\t' */)
+ break;
+ }
+
+ // Ended on whitespace
+ if (i === str.length)
+ break;
+
+ // Check for malformed parameter
+ if (str.charCodeAt(i++) !== 59/* ';' */)
+ return;
+
+ // Consume whitespace
+ for (; i < str.length; ++i) {
+ const code = str.charCodeAt(i);
+ if (code !== 32/* ' ' */ && code !== 9/* '\t' */)
+ break;
+ }
+
+ // Ended on whitespace (malformed)
+ if (i === str.length)
+ return;
+
+ let name;
+ const nameStart = i;
+ // Parse parameter name
+ for (; i < str.length; ++i) {
+ const code = str.charCodeAt(i);
+ if (TOKEN[code] !== 1) {
+ if (code === 61/* '=' */)
+ break;
+ return;
+ }
+ }
+
+ // No value (malformed)
+ if (i === str.length)
+ return;
+
+ let value = '';
+ let valueStart;
+ let charset;
+ //~ let lang;
+ name = str.slice(nameStart, i);
+ if (name.charCodeAt(name.length - 1) === 42/* '*' */) {
+ // Extended value
+
+ const charsetStart = ++i;
+ // Parse charset name
+ for (; i < str.length; ++i) {
+ const code = str.charCodeAt(i);
+ if (CHARSET[code] !== 1) {
+ if (code !== 39/* '\'' */)
+ return;
+ break;
+ }
+ }
+
+ // Incomplete charset (malformed)
+ if (i === str.length)
+ return;
+
+ charset = str.slice(charsetStart, i);
+ ++i; // Skip over the '\''
+
+ //~ const langStart = ++i;
+ // Parse language name
+ for (; i < str.length; ++i) {
+ const code = str.charCodeAt(i);
+ if (code === 39/* '\'' */)
+ break;
+ }
+
+ // Incomplete language (malformed)
+ if (i === str.length)
+ return;
+
+ //~ lang = str.slice(langStart, i);
+ ++i; // Skip over the '\''
+
+ // No value (malformed)
+ if (i === str.length)
+ return;
+
+ valueStart = i;
+
+ let encode = 0;
+ // Parse value
+ for (; i < str.length; ++i) {
+ const code = str.charCodeAt(i);
+ if (EXTENDED_VALUE[code] !== 1) {
+ if (code === 37/* '%' */) {
+ let hexUpper;
+ let hexLower;
+ if (i + 2 < str.length
+ && (hexUpper = HEX_VALUES[str.charCodeAt(i + 1)]) !== -1
+ && (hexLower = HEX_VALUES[str.charCodeAt(i + 2)]) !== -1) {
+ const byteVal = (hexUpper << 4) + hexLower;
+ value += str.slice(valueStart, i);
+ value += String.fromCharCode(byteVal);
+ i += 2;
+ valueStart = i + 1;
+ if (byteVal >= 128)
+ encode = 2;
+ else if (encode === 0)
+ encode = 1;
+ continue;
+ }
+ // '%' disallowed in non-percent encoded contexts (malformed)
+ return;
+ }
+ break;
+ }
+ }
+
+ value += str.slice(valueStart, i);
+ value = convertToUTF8(value, charset, encode);
+ if (value === undefined)
+ return;
+ } else {
+ // Non-extended value
+
+ ++i; // Skip over '='
+
+ // No value (malformed)
+ if (i === str.length)
+ return;
+
+ if (str.charCodeAt(i) === 34/* '"' */) {
+ valueStart = ++i;
+ let escaping = false;
+ // Parse quoted value
+ for (; i < str.length; ++i) {
+ const code = str.charCodeAt(i);
+ if (code === 92/* '\\' */) {
+ if (escaping) {
+ valueStart = i;
+ escaping = false;
+ } else {
+ value += str.slice(valueStart, i);
+ escaping = true;
+ }
+ continue;
+ }
+ if (code === 34/* '"' */) {
+ if (escaping) {
+ valueStart = i;
+ escaping = false;
+ continue;
+ }
+ value += str.slice(valueStart, i);
+ break;
+ }
+ if (escaping) {
+ valueStart = i - 1;
+ escaping = false;
+ }
+ // Invalid unescaped quoted character (malformed)
+ if (QDTEXT[code] !== 1)
+ return;
+ }
+
+ // No end quote (malformed)
+ if (i === str.length)
+ return;
+
+ ++i; // Skip over double quote
+ } else {
+ valueStart = i;
+ // Parse unquoted value
+ for (; i < str.length; ++i) {
+ const code = str.charCodeAt(i);
+ if (TOKEN[code] !== 1) {
+ // No value (malformed)
+ if (i === valueStart)
+ return;
+ break;
+ }
+ }
+ value = str.slice(valueStart, i);
+ }
+
+ value = defDecoder(value, 2);
+ if (value === undefined)
+ return;
+ }
+
+ name = name.toLowerCase();
+ if (params[name] === undefined)
+ params[name] = value;
+ }
+
+ return params;
+}
+
+function getDecoder(charset) {
+ let lc;
+ while (true) {
+ switch (charset) {
+ case 'utf-8':
+ case 'utf8':
+ return decoders.utf8;
+ case 'latin1':
+ case 'ascii': // TODO: Make these a separate, strict decoder?
+ case 'us-ascii':
+ case 'iso-8859-1':
+ case 'iso8859-1':
+ case 'iso88591':
+ case 'iso_8859-1':
+ case 'windows-1252':
+ case 'iso_8859-1:1987':
+ case 'cp1252':
+ case 'x-cp1252':
+ return decoders.latin1;
+ case 'utf16le':
+ case 'utf-16le':
+ case 'ucs2':
+ case 'ucs-2':
+ return decoders.utf16le;
+ case 'base64':
+ return decoders.base64;
+ default:
+ if (lc === undefined) {
+ lc = true;
+ charset = charset.toLowerCase();
+ continue;
+ }
+ return decoders.other.bind(charset);
+ }
+ }
+}
+
+const decoders = {
+ utf8: (data, hint) => {
+ if (data.length === 0)
+ return '';
+ if (typeof data === 'string') {
+ // If `data` never had any percent-encoded bytes or never had any that
+ // were outside of the ASCII range, then we can safely just return the
+ // input since UTF-8 is ASCII compatible
+ if (hint < 2)
+ return data;
+
+ data = Buffer.from(data, 'latin1');
+ }
+ return data.utf8Slice(0, data.length);
+ },
+
+ latin1: (data, hint) => {
+ if (data.length === 0)
+ return '';
+ if (typeof data === 'string')
+ return data;
+ return data.latin1Slice(0, data.length);
+ },
+
+ utf16le: (data, hint) => {
+ if (data.length === 0)
+ return '';
+ if (typeof data === 'string')
+ data = Buffer.from(data, 'latin1');
+ return data.ucs2Slice(0, data.length);
+ },
+
+ base64: (data, hint) => {
+ if (data.length === 0)
+ return '';
+ if (typeof data === 'string')
+ data = Buffer.from(data, 'latin1');
+ return data.base64Slice(0, data.length);
+ },
+
+ other: (data, hint) => {
+ if (data.length === 0)
+ return '';
+ if (typeof data === 'string')
+ data = Buffer.from(data, 'latin1');
+ try {
+ const decoder = new TextDecoder(this);
+ return decoder.decode(data);
+ } catch {}
+ },
+};
+
+function convertToUTF8(data, charset, hint) {
+ const decode = getDecoder(charset);
+ if (decode)
+ return decode(data, hint);
+}
+
+function basename(path) {
+ if (typeof path !== 'string')
+ return '';
+ for (let i = path.length - 1; i >= 0; --i) {
+ switch (path.charCodeAt(i)) {
+ case 0x2F: // '/'
+ case 0x5C: // '\'
+ path = path.slice(i + 1);
+ return (path === '..' || path === '.' ? '' : path);
+ }
+ }
+ return (path === '..' || path === '.' ? '' : path);
+}
+
+const TOKEN = [
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1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-1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
+ -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+];
+/* eslint-enable no-multi-spaces */
+
+module.exports = {
+ basename,
+ convertToUTF8,
+ getDecoder,
+ parseContentType,
+ parseDisposition,
+};
diff --git a/node_modules/busboy/package.json b/node_modules/busboy/package.json
new file mode 100644
index 0000000..ac2577f
--- /dev/null
+++ b/node_modules/busboy/package.json
@@ -0,0 +1,22 @@
+{ "name": "busboy",
+ "version": "1.6.0",
+ "author": "Brian White <mscdex@mscdex.net>",
+ "description": "A streaming parser for HTML form data for node.js",
+ "main": "./lib/index.js",
+ "dependencies": {
+ "streamsearch": "^1.1.0"
+ },
+ "devDependencies": {
+ "@mscdex/eslint-config": "^1.1.0",
+ "eslint": "^7.32.0"
+ },
+ "scripts": {
+ "test": "node test/test.js",
+ "lint": "eslint --cache --report-unused-disable-directives --ext=.js .eslintrc.js lib test bench",
+ "lint:fix": "npm run lint -- --fix"
+ },
+ "engines": { "node": ">=10.16.0" },
+ "keywords": [ "uploads", "forms", "multipart", "form-data" ],
+ "licenses": [ { "type": "MIT", "url": "http://github.com/mscdex/busboy/raw/master/LICENSE" } ],
+ "repository": { "type": "git", "url": "http://github.com/mscdex/busboy.git" }
+}
diff --git a/node_modules/busboy/test/common.js b/node_modules/busboy/test/common.js
new file mode 100644
index 0000000..fb82ad8
--- /dev/null
+++ b/node_modules/busboy/test/common.js
@@ -0,0 +1,109 @@
+'use strict';
+
+const assert = require('assert');
+const { inspect } = require('util');
+
+const mustCallChecks = [];
+
+function noop() {}
+
+function runCallChecks(exitCode) {
+ if (exitCode !== 0) return;
+
+ const failed = mustCallChecks.filter((context) => {
+ if ('minimum' in context) {
+ context.messageSegment = `at least ${context.minimum}`;
+ return context.actual < context.minimum;
+ }
+ context.messageSegment = `exactly ${context.exact}`;
+ return context.actual !== context.exact;
+ });
+
+ failed.forEach((context) => {
+ console.error('Mismatched %s function calls. Expected %s, actual %d.',
+ context.name,
+ context.messageSegment,
+ context.actual);
+ console.error(context.stack.split('\n').slice(2).join('\n'));
+ });
+
+ if (failed.length)
+ process.exit(1);
+}
+
+function mustCall(fn, exact) {
+ return _mustCallInner(fn, exact, 'exact');
+}
+
+function mustCallAtLeast(fn, minimum) {
+ return _mustCallInner(fn, minimum, 'minimum');
+}
+
+function _mustCallInner(fn, criteria = 1, field) {
+ if (process._exiting)
+ throw new Error('Cannot use common.mustCall*() in process exit handler');
+
+ if (typeof fn === 'number') {
+ criteria = fn;
+ fn = noop;
+ } else if (fn === undefined) {
+ fn = noop;
+ }
+
+ if (typeof criteria !== 'number')
+ throw new TypeError(`Invalid ${field} value: ${criteria}`);
+
+ const context = {
+ [field]: criteria,
+ actual: 0,
+ stack: inspect(new Error()),
+ name: fn.name || '<anonymous>'
+ };
+
+ // Add the exit listener only once to avoid listener leak warnings
+ if (mustCallChecks.length === 0)
+ process.on('exit', runCallChecks);
+
+ mustCallChecks.push(context);
+
+ function wrapped(...args) {
+ ++context.actual;
+ return fn.call(this, ...args);
+ }
+ // TODO: remove origFn?
+ wrapped.origFn = fn;
+
+ return wrapped;
+}
+
+function getCallSite(top) {
+ const originalStackFormatter = Error.prepareStackTrace;
+ Error.prepareStackTrace = (err, stack) =>
+ `${stack[0].getFileName()}:${stack[0].getLineNumber()}`;
+ const err = new Error();
+ Error.captureStackTrace(err, top);
+ // With the V8 Error API, the stack is not formatted until it is accessed
+ // eslint-disable-next-line no-unused-expressions
+ err.stack;
+ Error.prepareStackTrace = originalStackFormatter;
+ return err.stack;
+}
+
+function mustNotCall(msg) {
+ const callSite = getCallSite(mustNotCall);
+ return function mustNotCall(...args) {
+ args = args.map(inspect).join(', ');
+ const argsInfo = (args.length > 0
+ ? `\ncalled with arguments: ${args}`
+ : '');
+ assert.fail(
+ `${msg || 'function should not have been called'} at ${callSite}`
+ + argsInfo);
+ };
+}
+
+module.exports = {
+ mustCall,
+ mustCallAtLeast,
+ mustNotCall,
+};
diff --git a/node_modules/busboy/test/test-types-multipart-charsets.js b/node_modules/busboy/test/test-types-multipart-charsets.js
new file mode 100644
index 0000000..ed9c38a
--- /dev/null
+++ b/node_modules/busboy/test/test-types-multipart-charsets.js
@@ -0,0 +1,94 @@
+'use strict';
+
+const assert = require('assert');
+const { inspect } = require('util');
+
+const { mustCall } = require(`${__dirname}/common.js`);
+
+const busboy = require('..');
+
+const input = Buffer.from([
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_0"; filename="テスト.dat"',
+ 'Content-Type: application/octet-stream',
+ '',
+ 'A'.repeat(1023),
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--'
+].join('\r\n'));
+const boundary = '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k';
+const expected = [
+ { type: 'file',
+ name: 'upload_file_0',
+ data: Buffer.from('A'.repeat(1023)),
+ info: {
+ filename: 'テスト.dat',
+ encoding: '7bit',
+ mimeType: 'application/octet-stream',
+ },
+ limited: false,
+ },
+];
+const bb = busboy({
+ defParamCharset: 'utf8',
+ headers: {
+ 'content-type': `multipart/form-data; boundary=${boundary}`,
+ }
+});
+const results = [];
+
+bb.on('field', (name, val, info) => {
+ results.push({ type: 'field', name, val, info });
+});
+
+bb.on('file', (name, stream, info) => {
+ const data = [];
+ let nb = 0;
+ const file = {
+ type: 'file',
+ name,
+ data: null,
+ info,
+ limited: false,
+ };
+ results.push(file);
+ stream.on('data', (d) => {
+ data.push(d);
+ nb += d.length;
+ }).on('limit', () => {
+ file.limited = true;
+ }).on('close', () => {
+ file.data = Buffer.concat(data, nb);
+ assert.strictEqual(stream.truncated, file.limited);
+ }).once('error', (err) => {
+ file.err = err.message;
+ });
+});
+
+bb.on('error', (err) => {
+ results.push({ error: err.message });
+});
+
+bb.on('partsLimit', () => {
+ results.push('partsLimit');
+});
+
+bb.on('filesLimit', () => {
+ results.push('filesLimit');
+});
+
+bb.on('fieldsLimit', () => {
+ results.push('fieldsLimit');
+});
+
+bb.on('close', mustCall(() => {
+ assert.deepStrictEqual(
+ results,
+ expected,
+ 'Results mismatch.\n'
+ + `Parsed: ${inspect(results)}\n`
+ + `Expected: ${inspect(expected)}`
+ );
+}));
+
+bb.end(input);
diff --git a/node_modules/busboy/test/test-types-multipart-stream-pause.js b/node_modules/busboy/test/test-types-multipart-stream-pause.js
new file mode 100644
index 0000000..df7268a
--- /dev/null
+++ b/node_modules/busboy/test/test-types-multipart-stream-pause.js
@@ -0,0 +1,102 @@
+'use strict';
+
+const assert = require('assert');
+const { randomFillSync } = require('crypto');
+const { inspect } = require('util');
+
+const busboy = require('..');
+
+const { mustCall } = require('./common.js');
+
+const BOUNDARY = 'u2KxIV5yF1y+xUspOQCCZopaVgeV6Jxihv35XQJmuTx8X3sh';
+
+function formDataSection(key, value) {
+ return Buffer.from(
+ `\r\n--${BOUNDARY}`
+ + `\r\nContent-Disposition: form-data; name="${key}"`
+ + `\r\n\r\n${value}`
+ );
+}
+
+function formDataFile(key, filename, contentType) {
+ const buf = Buffer.allocUnsafe(100000);
+ return Buffer.concat([
+ Buffer.from(`\r\n--${BOUNDARY}\r\n`),
+ Buffer.from(`Content-Disposition: form-data; name="${key}"`
+ + `; filename="${filename}"\r\n`),
+ Buffer.from(`Content-Type: ${contentType}\r\n\r\n`),
+ randomFillSync(buf)
+ ]);
+}
+
+const reqChunks = [
+ Buffer.concat([
+ formDataFile('file', 'file.bin', 'application/octet-stream'),
+ formDataSection('foo', 'foo value'),
+ ]),
+ formDataSection('bar', 'bar value'),
+ Buffer.from(`\r\n--${BOUNDARY}--\r\n`)
+];
+const bb = busboy({
+ headers: {
+ 'content-type': `multipart/form-data; boundary=${BOUNDARY}`
+ }
+});
+const expected = [
+ { type: 'file',
+ name: 'file',
+ info: {
+ filename: 'file.bin',
+ encoding: '7bit',
+ mimeType: 'application/octet-stream',
+ },
+ },
+ { type: 'field',
+ name: 'foo',
+ val: 'foo value',
+ info: {
+ nameTruncated: false,
+ valueTruncated: false,
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ },
+ { type: 'field',
+ name: 'bar',
+ val: 'bar value',
+ info: {
+ nameTruncated: false,
+ valueTruncated: false,
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ },
+];
+const results = [];
+
+bb.on('field', (name, val, info) => {
+ results.push({ type: 'field', name, val, info });
+});
+
+bb.on('file', (name, stream, info) => {
+ results.push({ type: 'file', name, info });
+ // Simulate a pipe where the destination is pausing (perhaps due to waiting
+ // for file system write to finish)
+ setTimeout(() => {
+ stream.resume();
+ }, 10);
+});
+
+bb.on('close', mustCall(() => {
+ assert.deepStrictEqual(
+ results,
+ expected,
+ 'Results mismatch.\n'
+ + `Parsed: ${inspect(results)}\n`
+ + `Expected: ${inspect(expected)}`
+ );
+}));
+
+for (const chunk of reqChunks)
+ bb.write(chunk);
+bb.end();
diff --git a/node_modules/busboy/test/test-types-multipart.js b/node_modules/busboy/test/test-types-multipart.js
new file mode 100644
index 0000000..9755642
--- /dev/null
+++ b/node_modules/busboy/test/test-types-multipart.js
@@ -0,0 +1,1053 @@
+'use strict';
+
+const assert = require('assert');
+const { inspect } = require('util');
+
+const busboy = require('..');
+
+const active = new Map();
+
+const tests = [
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; name="file_name_0"',
+ '',
+ 'super alpha file',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; name="file_name_1"',
+ '',
+ 'super beta file',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_0"; filename="1k_a.dat"',
+ 'Content-Type: application/octet-stream',
+ '',
+ 'A'.repeat(1023),
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_1"; filename="1k_b.dat"',
+ 'Content-Type: application/octet-stream',
+ '',
+ 'B'.repeat(1023),
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--'
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ expected: [
+ { type: 'field',
+ name: 'file_name_0',
+ val: 'super alpha file',
+ info: {
+ nameTruncated: false,
+ valueTruncated: false,
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ },
+ { type: 'field',
+ name: 'file_name_1',
+ val: 'super beta file',
+ info: {
+ nameTruncated: false,
+ valueTruncated: false,
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ },
+ { type: 'file',
+ name: 'upload_file_0',
+ data: Buffer.from('A'.repeat(1023)),
+ info: {
+ filename: '1k_a.dat',
+ encoding: '7bit',
+ mimeType: 'application/octet-stream',
+ },
+ limited: false,
+ },
+ { type: 'file',
+ name: 'upload_file_1',
+ data: Buffer.from('B'.repeat(1023)),
+ info: {
+ filename: '1k_b.dat',
+ encoding: '7bit',
+ mimeType: 'application/octet-stream',
+ },
+ limited: false,
+ },
+ ],
+ what: 'Fields and files'
+ },
+ { source: [
+ ['------WebKitFormBoundaryTB2MiQ36fnSJlrhY',
+ 'Content-Disposition: form-data; name="cont"',
+ '',
+ 'some random content',
+ '------WebKitFormBoundaryTB2MiQ36fnSJlrhY',
+ 'Content-Disposition: form-data; name="pass"',
+ '',
+ 'some random pass',
+ '------WebKitFormBoundaryTB2MiQ36fnSJlrhY',
+ 'Content-Disposition: form-data; name=bit',
+ '',
+ '2',
+ '------WebKitFormBoundaryTB2MiQ36fnSJlrhY--'
+ ].join('\r\n')
+ ],
+ boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY',
+ expected: [
+ { type: 'field',
+ name: 'cont',
+ val: 'some random content',
+ info: {
+ nameTruncated: false,
+ valueTruncated: false,
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ },
+ { type: 'field',
+ name: 'pass',
+ val: 'some random pass',
+ info: {
+ nameTruncated: false,
+ valueTruncated: false,
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ },
+ { type: 'field',
+ name: 'bit',
+ val: '2',
+ info: {
+ nameTruncated: false,
+ valueTruncated: false,
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ },
+ ],
+ what: 'Fields only'
+ },
+ { source: [
+ ''
+ ],
+ boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY',
+ expected: [
+ { error: 'Unexpected end of form' },
+ ],
+ what: 'No fields and no files'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; name="file_name_0"',
+ '',
+ 'super alpha file',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_0"; filename="1k_a.dat"',
+ 'Content-Type: application/octet-stream',
+ '',
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--'
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ limits: {
+ fileSize: 13,
+ fieldSize: 5
+ },
+ expected: [
+ { type: 'field',
+ name: 'file_name_0',
+ val: 'super',
+ info: {
+ nameTruncated: false,
+ valueTruncated: true,
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ },
+ { type: 'file',
+ name: 'upload_file_0',
+ data: Buffer.from('ABCDEFGHIJKLM'),
+ info: {
+ filename: '1k_a.dat',
+ encoding: '7bit',
+ mimeType: 'application/octet-stream',
+ },
+ limited: true,
+ },
+ ],
+ what: 'Fields and files (limits)'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; name="file_name_0"',
+ '',
+ 'super alpha file',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_0"; filename="1k_a.dat"',
+ 'Content-Type: application/octet-stream',
+ '',
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--'
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ limits: {
+ files: 0
+ },
+ expected: [
+ { type: 'field',
+ name: 'file_name_0',
+ val: 'super alpha file',
+ info: {
+ nameTruncated: false,
+ valueTruncated: false,
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ },
+ 'filesLimit',
+ ],
+ what: 'Fields and files (limits: 0 files)'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; name="file_name_0"',
+ '',
+ 'super alpha file',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; name="file_name_1"',
+ '',
+ 'super beta file',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_0"; filename="1k_a.dat"',
+ 'Content-Type: application/octet-stream',
+ '',
+ 'A'.repeat(1023),
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_1"; filename="1k_b.dat"',
+ 'Content-Type: application/octet-stream',
+ '',
+ 'B'.repeat(1023),
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--'
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ expected: [
+ { type: 'field',
+ name: 'file_name_0',
+ val: 'super alpha file',
+ info: {
+ nameTruncated: false,
+ valueTruncated: false,
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ },
+ { type: 'field',
+ name: 'file_name_1',
+ val: 'super beta file',
+ info: {
+ nameTruncated: false,
+ valueTruncated: false,
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ },
+ ],
+ events: ['field'],
+ what: 'Fields and (ignored) files'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_0"; filename="/tmp/1k_a.dat"',
+ 'Content-Type: application/octet-stream',
+ '',
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_1"; filename="C:\\files\\1k_b.dat"',
+ 'Content-Type: application/octet-stream',
+ '',
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_2"; filename="relative/1k_c.dat"',
+ 'Content-Type: application/octet-stream',
+ '',
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--'
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ expected: [
+ { type: 'file',
+ name: 'upload_file_0',
+ data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'),
+ info: {
+ filename: '1k_a.dat',
+ encoding: '7bit',
+ mimeType: 'application/octet-stream',
+ },
+ limited: false,
+ },
+ { type: 'file',
+ name: 'upload_file_1',
+ data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'),
+ info: {
+ filename: '1k_b.dat',
+ encoding: '7bit',
+ mimeType: 'application/octet-stream',
+ },
+ limited: false,
+ },
+ { type: 'file',
+ name: 'upload_file_2',
+ data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'),
+ info: {
+ filename: '1k_c.dat',
+ encoding: '7bit',
+ mimeType: 'application/octet-stream',
+ },
+ limited: false,
+ },
+ ],
+ what: 'Files with filenames containing paths'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_0"; filename="/absolute/1k_a.dat"',
+ 'Content-Type: application/octet-stream',
+ '',
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_1"; filename="C:\\absolute\\1k_b.dat"',
+ 'Content-Type: application/octet-stream',
+ '',
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_2"; filename="relative/1k_c.dat"',
+ 'Content-Type: application/octet-stream',
+ '',
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--'
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ preservePath: true,
+ expected: [
+ { type: 'file',
+ name: 'upload_file_0',
+ data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'),
+ info: {
+ filename: '/absolute/1k_a.dat',
+ encoding: '7bit',
+ mimeType: 'application/octet-stream',
+ },
+ limited: false,
+ },
+ { type: 'file',
+ name: 'upload_file_1',
+ data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'),
+ info: {
+ filename: 'C:\\absolute\\1k_b.dat',
+ encoding: '7bit',
+ mimeType: 'application/octet-stream',
+ },
+ limited: false,
+ },
+ { type: 'file',
+ name: 'upload_file_2',
+ data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'),
+ info: {
+ filename: 'relative/1k_c.dat',
+ encoding: '7bit',
+ mimeType: 'application/octet-stream',
+ },
+ limited: false,
+ },
+ ],
+ what: 'Paths to be preserved through the preservePath option'
+ },
+ { source: [
+ ['------WebKitFormBoundaryTB2MiQ36fnSJlrhY',
+ 'Content-Disposition: form-data; name="cont"',
+ 'Content-Type: ',
+ '',
+ 'some random content',
+ '------WebKitFormBoundaryTB2MiQ36fnSJlrhY',
+ 'Content-Disposition: ',
+ '',
+ 'some random pass',
+ '------WebKitFormBoundaryTB2MiQ36fnSJlrhY--'
+ ].join('\r\n')
+ ],
+ boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY',
+ expected: [
+ { type: 'field',
+ name: 'cont',
+ val: 'some random content',
+ info: {
+ nameTruncated: false,
+ valueTruncated: false,
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ },
+ ],
+ what: 'Empty content-type and empty content-disposition'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="file"; filename*=utf-8\'\'n%C3%A4me.txt',
+ 'Content-Type: application/octet-stream',
+ '',
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--'
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ expected: [
+ { type: 'file',
+ name: 'file',
+ data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'),
+ info: {
+ filename: 'näme.txt',
+ encoding: '7bit',
+ mimeType: 'application/octet-stream',
+ },
+ limited: false,
+ },
+ ],
+ what: 'Unicode filenames'
+ },
+ { source: [
+ ['--asdasdasdasd\r\n',
+ 'Content-Type: text/plain\r\n',
+ 'Content-Disposition: form-data; name="foo"\r\n',
+ '\r\n',
+ 'asd\r\n',
+ '--asdasdasdasd--'
+ ].join(':)')
+ ],
+ boundary: 'asdasdasdasd',
+ expected: [
+ { error: 'Malformed part header' },
+ { error: 'Unexpected end of form' },
+ ],
+ what: 'Stopped mid-header'
+ },
+ { source: [
+ ['------WebKitFormBoundaryTB2MiQ36fnSJlrhY',
+ 'Content-Disposition: form-data; name="cont"',
+ 'Content-Type: application/json',
+ '',
+ '{}',
+ '------WebKitFormBoundaryTB2MiQ36fnSJlrhY--',
+ ].join('\r\n')
+ ],
+ boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY',
+ expected: [
+ { type: 'field',
+ name: 'cont',
+ val: '{}',
+ info: {
+ nameTruncated: false,
+ valueTruncated: false,
+ encoding: '7bit',
+ mimeType: 'application/json',
+ },
+ },
+ ],
+ what: 'content-type for fields'
+ },
+ { source: [
+ '------WebKitFormBoundaryTB2MiQ36fnSJlrhY--',
+ ],
+ boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY',
+ expected: [],
+ what: 'empty form'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name=upload_file_0; filename="1k_a.dat"',
+ 'Content-Type: application/octet-stream',
+ 'Content-Transfer-Encoding: binary',
+ '',
+ '',
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ expected: [
+ { type: 'file',
+ name: 'upload_file_0',
+ data: Buffer.alloc(0),
+ info: {
+ filename: '1k_a.dat',
+ encoding: 'binary',
+ mimeType: 'application/octet-stream',
+ },
+ limited: false,
+ err: 'Unexpected end of form',
+ },
+ { error: 'Unexpected end of form' },
+ ],
+ what: 'Stopped mid-file #1'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name=upload_file_0; filename="1k_a.dat"',
+ 'Content-Type: application/octet-stream',
+ '',
+ 'a',
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ expected: [
+ { type: 'file',
+ name: 'upload_file_0',
+ data: Buffer.from('a'),
+ info: {
+ filename: '1k_a.dat',
+ encoding: '7bit',
+ mimeType: 'application/octet-stream',
+ },
+ limited: false,
+ err: 'Unexpected end of form',
+ },
+ { error: 'Unexpected end of form' },
+ ],
+ what: 'Stopped mid-file #2'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_0"; filename="notes.txt"',
+ 'Content-Type: text/plain; charset=utf8',
+ '',
+ 'a',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--',
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ expected: [
+ { type: 'file',
+ name: 'upload_file_0',
+ data: Buffer.from('a'),
+ info: {
+ filename: 'notes.txt',
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ limited: false,
+ },
+ ],
+ what: 'Text file with charset'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_0"; filename="notes.txt"',
+ 'Content-Type: ',
+ ' text/plain; charset=utf8',
+ '',
+ 'a',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--',
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ expected: [
+ { type: 'file',
+ name: 'upload_file_0',
+ data: Buffer.from('a'),
+ info: {
+ filename: 'notes.txt',
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ limited: false,
+ },
+ ],
+ what: 'Folded header value'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Type: text/plain; charset=utf8',
+ '',
+ 'a',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--',
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ expected: [],
+ what: 'No Content-Disposition'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; name="file_name_0"',
+ '',
+ 'a'.repeat(64 * 1024),
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_0"; filename="notes.txt"',
+ 'Content-Type: ',
+ ' text/plain; charset=utf8',
+ '',
+ 'bc',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--',
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ limits: {
+ fieldSize: Infinity,
+ },
+ expected: [
+ { type: 'file',
+ name: 'upload_file_0',
+ data: Buffer.from('bc'),
+ info: {
+ filename: 'notes.txt',
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ limited: false,
+ },
+ ],
+ events: [ 'file' ],
+ what: 'Skip field parts if no listener'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; name="file_name_0"',
+ '',
+ 'a',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_0"; filename="notes.txt"',
+ 'Content-Type: ',
+ ' text/plain; charset=utf8',
+ '',
+ 'bc',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--',
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ limits: {
+ parts: 1,
+ },
+ expected: [
+ { type: 'field',
+ name: 'file_name_0',
+ val: 'a',
+ info: {
+ nameTruncated: false,
+ valueTruncated: false,
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ },
+ 'partsLimit',
+ ],
+ what: 'Parts limit'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; name="file_name_0"',
+ '',
+ 'a',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; name="file_name_1"',
+ '',
+ 'b',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--',
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ limits: {
+ fields: 1,
+ },
+ expected: [
+ { type: 'field',
+ name: 'file_name_0',
+ val: 'a',
+ info: {
+ nameTruncated: false,
+ valueTruncated: false,
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ },
+ 'fieldsLimit',
+ ],
+ what: 'Fields limit'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_0"; filename="notes.txt"',
+ 'Content-Type: text/plain; charset=utf8',
+ '',
+ 'ab',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_1"; filename="notes2.txt"',
+ 'Content-Type: text/plain; charset=utf8',
+ '',
+ 'cd',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--',
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ limits: {
+ files: 1,
+ },
+ expected: [
+ { type: 'file',
+ name: 'upload_file_0',
+ data: Buffer.from('ab'),
+ info: {
+ filename: 'notes.txt',
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ limited: false,
+ },
+ 'filesLimit',
+ ],
+ what: 'Files limit'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + `name="upload_file_0"; filename="${'a'.repeat(64 * 1024)}.txt"`,
+ 'Content-Type: text/plain; charset=utf8',
+ '',
+ 'ab',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_1"; filename="notes2.txt"',
+ 'Content-Type: text/plain; charset=utf8',
+ '',
+ 'cd',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--',
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ expected: [
+ { error: 'Malformed part header' },
+ { type: 'file',
+ name: 'upload_file_1',
+ data: Buffer.from('cd'),
+ info: {
+ filename: 'notes2.txt',
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ limited: false,
+ },
+ ],
+ what: 'Oversized part header'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + 'name="upload_file_0"; filename="notes.txt"',
+ 'Content-Type: text/plain; charset=utf8',
+ '',
+ 'a'.repeat(31) + '\r',
+ ].join('\r\n'),
+ 'b'.repeat(40),
+ '\r\n-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--',
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ fileHwm: 32,
+ expected: [
+ { type: 'file',
+ name: 'upload_file_0',
+ data: Buffer.from('a'.repeat(31) + '\r' + 'b'.repeat(40)),
+ info: {
+ filename: 'notes.txt',
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ limited: false,
+ },
+ ],
+ what: 'Lookbehind data should not stall file streams'
+ },
+ { source: [
+ ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + `name="upload_file_0"; filename="${'a'.repeat(8 * 1024)}.txt"`,
+ 'Content-Type: text/plain; charset=utf8',
+ '',
+ 'ab',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + `name="upload_file_1"; filename="${'b'.repeat(8 * 1024)}.txt"`,
+ 'Content-Type: text/plain; charset=utf8',
+ '',
+ 'cd',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ 'Content-Disposition: form-data; '
+ + `name="upload_file_2"; filename="${'c'.repeat(8 * 1024)}.txt"`,
+ 'Content-Type: text/plain; charset=utf8',
+ '',
+ 'ef',
+ '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--',
+ ].join('\r\n')
+ ],
+ boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k',
+ expected: [
+ { type: 'file',
+ name: 'upload_file_0',
+ data: Buffer.from('ab'),
+ info: {
+ filename: `${'a'.repeat(8 * 1024)}.txt`,
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ limited: false,
+ },
+ { type: 'file',
+ name: 'upload_file_1',
+ data: Buffer.from('cd'),
+ info: {
+ filename: `${'b'.repeat(8 * 1024)}.txt`,
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ limited: false,
+ },
+ { type: 'file',
+ name: 'upload_file_2',
+ data: Buffer.from('ef'),
+ info: {
+ filename: `${'c'.repeat(8 * 1024)}.txt`,
+ encoding: '7bit',
+ mimeType: 'text/plain',
+ },
+ limited: false,
+ },
+ ],
+ what: 'Header size limit should be per part'
+ },
+ { source: [
+ '\r\n--d1bf46b3-aa33-4061-b28d-6c5ced8b08ee\r\n',
+ 'Content-Type: application/gzip\r\n'
+ + 'Content-Encoding: gzip\r\n'
+ + 'Content-Disposition: form-data; name=batch-1; filename=batch-1'
+ + '\r\n\r\n',
+ '\r\n--d1bf46b3-aa33-4061-b28d-6c5ced8b08ee--',
+ ],
+ boundary: 'd1bf46b3-aa33-4061-b28d-6c5ced8b08ee',
+ expected: [
+ { type: 'file',
+ name: 'batch-1',
+ data: Buffer.alloc(0),
+ info: {
+ filename: 'batch-1',
+ encoding: '7bit',
+ mimeType: 'application/gzip',
+ },
+ limited: false,
+ },
+ ],
+ what: 'Empty part'
+ },
+];
+
+for (const test of tests) {
+ active.set(test, 1);
+
+ const { what, boundary, events, limits, preservePath, fileHwm } = test;
+ const bb = busboy({
+ fileHwm,
+ limits,
+ preservePath,
+ headers: {
+ 'content-type': `multipart/form-data; boundary=${boundary}`,
+ }
+ });
+ const results = [];
+
+ if (events === undefined || events.includes('field')) {
+ bb.on('field', (name, val, info) => {
+ results.push({ type: 'field', name, val, info });
+ });
+ }
+
+ if (events === undefined || events.includes('file')) {
+ bb.on('file', (name, stream, info) => {
+ const data = [];
+ let nb = 0;
+ const file = {
+ type: 'file',
+ name,
+ data: null,
+ info,
+ limited: false,
+ };
+ results.push(file);
+ stream.on('data', (d) => {
+ data.push(d);
+ nb += d.length;
+ }).on('limit', () => {
+ file.limited = true;
+ }).on('close', () => {
+ file.data = Buffer.concat(data, nb);
+ assert.strictEqual(stream.truncated, file.limited);
+ }).once('error', (err) => {
+ file.err = err.message;
+ });
+ });
+ }
+
+ bb.on('error', (err) => {
+ results.push({ error: err.message });
+ });
+
+ bb.on('partsLimit', () => {
+ results.push('partsLimit');
+ });
+
+ bb.on('filesLimit', () => {
+ results.push('filesLimit');
+ });
+
+ bb.on('fieldsLimit', () => {
+ results.push('fieldsLimit');
+ });
+
+ bb.on('close', () => {
+ active.delete(test);
+
+ assert.deepStrictEqual(
+ results,
+ test.expected,
+ `[${what}] Results mismatch.\n`
+ + `Parsed: ${inspect(results)}\n`
+ + `Expected: ${inspect(test.expected)}`
+ );
+ });
+
+ for (const src of test.source) {
+ const buf = (typeof src === 'string' ? Buffer.from(src, 'utf8') : src);
+ bb.write(buf);
+ }
+ bb.end();
+}
+
+// Byte-by-byte versions
+for (let test of tests) {
+ test = { ...test };
+ test.what += ' (byte-by-byte)';
+ active.set(test, 1);
+
+ const { what, boundary, events, limits, preservePath, fileHwm } = test;
+ const bb = busboy({
+ fileHwm,
+ limits,
+ preservePath,
+ headers: {
+ 'content-type': `multipart/form-data; boundary=${boundary}`,
+ }
+ });
+ const results = [];
+
+ if (events === undefined || events.includes('field')) {
+ bb.on('field', (name, val, info) => {
+ results.push({ type: 'field', name, val, info });
+ });
+ }
+
+ if (events === undefined || events.includes('file')) {
+ bb.on('file', (name, stream, info) => {
+ const data = [];
+ let nb = 0;
+ const file = {
+ type: 'file',
+ name,
+ data: null,
+ info,
+ limited: false,
+ };
+ results.push(file);
+ stream.on('data', (d) => {
+ data.push(d);
+ nb += d.length;
+ }).on('limit', () => {
+ file.limited = true;
+ }).on('close', () => {
+ file.data = Buffer.concat(data, nb);
+ assert.strictEqual(stream.truncated, file.limited);
+ }).once('error', (err) => {
+ file.err = err.message;
+ });
+ });
+ }
+
+ bb.on('error', (err) => {
+ results.push({ error: err.message });
+ });
+
+ bb.on('partsLimit', () => {
+ results.push('partsLimit');
+ });
+
+ bb.on('filesLimit', () => {
+ results.push('filesLimit');
+ });
+
+ bb.on('fieldsLimit', () => {
+ results.push('fieldsLimit');
+ });
+
+ bb.on('close', () => {
+ active.delete(test);
+
+ assert.deepStrictEqual(
+ results,
+ test.expected,
+ `[${what}] Results mismatch.\n`
+ + `Parsed: ${inspect(results)}\n`
+ + `Expected: ${inspect(test.expected)}`
+ );
+ });
+
+ for (const src of test.source) {
+ const buf = (typeof src === 'string' ? Buffer.from(src, 'utf8') : src);
+ for (let i = 0; i < buf.length; ++i)
+ bb.write(buf.slice(i, i + 1));
+ }
+ bb.end();
+}
+
+{
+ let exception = false;
+ process.once('uncaughtException', (ex) => {
+ exception = true;
+ throw ex;
+ });
+ process.on('exit', () => {
+ if (exception || active.size === 0)
+ return;
+ process.exitCode = 1;
+ console.error('==========================');
+ console.error(`${active.size} test(s) did not finish:`);
+ console.error('==========================');
+ console.error(Array.from(active.keys()).map((v) => v.what).join('\n'));
+ });
+}
diff --git a/node_modules/busboy/test/test-types-urlencoded.js b/node_modules/busboy/test/test-types-urlencoded.js
new file mode 100644
index 0000000..c35962b
--- /dev/null
+++ b/node_modules/busboy/test/test-types-urlencoded.js
@@ -0,0 +1,488 @@
+'use strict';
+
+const assert = require('assert');
+const { transcode } = require('buffer');
+const { inspect } = require('util');
+
+const busboy = require('..');
+
+const active = new Map();
+
+const tests = [
+ { source: ['foo'],
+ expected: [
+ ['foo',
+ '',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Unassigned value'
+ },
+ { source: ['foo=bar'],
+ expected: [
+ ['foo',
+ 'bar',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Assigned value'
+ },
+ { source: ['foo&bar=baz'],
+ expected: [
+ ['foo',
+ '',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ['bar',
+ 'baz',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Unassigned and assigned value'
+ },
+ { source: ['foo=bar&baz'],
+ expected: [
+ ['foo',
+ 'bar',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ['baz',
+ '',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Assigned and unassigned value'
+ },
+ { source: ['foo=bar&baz=bla'],
+ expected: [
+ ['foo',
+ 'bar',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ['baz',
+ 'bla',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Two assigned values'
+ },
+ { source: ['foo&bar'],
+ expected: [
+ ['foo',
+ '',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ['bar',
+ '',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Two unassigned values'
+ },
+ { source: ['foo&bar&'],
+ expected: [
+ ['foo',
+ '',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ['bar',
+ '',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Two unassigned values and ampersand'
+ },
+ { source: ['foo+1=bar+baz%2Bquux'],
+ expected: [
+ ['foo 1',
+ 'bar baz+quux',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Assigned key and value with (plus) space'
+ },
+ { source: ['foo=bar%20baz%21'],
+ expected: [
+ ['foo',
+ 'bar baz!',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Assigned value with encoded bytes'
+ },
+ { source: ['foo%20bar=baz%20bla%21'],
+ expected: [
+ ['foo bar',
+ 'baz bla!',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Assigned value with encoded bytes #2'
+ },
+ { source: ['foo=bar%20baz%21&num=1000'],
+ expected: [
+ ['foo',
+ 'bar baz!',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ['num',
+ '1000',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Two assigned values, one with encoded bytes'
+ },
+ { source: [
+ Array.from(transcode(Buffer.from('foo'), 'utf8', 'utf16le')).map(
+ (n) => `%${n.toString(16).padStart(2, '0')}`
+ ).join(''),
+ '=',
+ Array.from(transcode(Buffer.from('😀!'), 'utf8', 'utf16le')).map(
+ (n) => `%${n.toString(16).padStart(2, '0')}`
+ ).join(''),
+ ],
+ expected: [
+ ['foo',
+ '😀!',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'UTF-16LE',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ charset: 'UTF-16LE',
+ what: 'Encoded value with multi-byte charset'
+ },
+ { source: [
+ 'foo=<',
+ Array.from(transcode(Buffer.from('©:^þ'), 'utf8', 'latin1')).map(
+ (n) => `%${n.toString(16).padStart(2, '0')}`
+ ).join(''),
+ ],
+ expected: [
+ ['foo',
+ '<©:^þ',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'ISO-8859-1',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ charset: 'ISO-8859-1',
+ what: 'Encoded value with single-byte, ASCII-compatible, non-UTF8 charset'
+ },
+ { source: ['foo=bar&baz=bla'],
+ expected: [],
+ what: 'Limits: zero fields',
+ limits: { fields: 0 }
+ },
+ { source: ['foo=bar&baz=bla'],
+ expected: [
+ ['foo',
+ 'bar',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Limits: one field',
+ limits: { fields: 1 }
+ },
+ { source: ['foo=bar&baz=bla'],
+ expected: [
+ ['foo',
+ 'bar',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ['baz',
+ 'bla',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Limits: field part lengths match limits',
+ limits: { fieldNameSize: 3, fieldSize: 3 }
+ },
+ { source: ['foo=bar&baz=bla'],
+ expected: [
+ ['fo',
+ 'bar',
+ { nameTruncated: true,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ['ba',
+ 'bla',
+ { nameTruncated: true,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Limits: truncated field name',
+ limits: { fieldNameSize: 2 }
+ },
+ { source: ['foo=bar&baz=bla'],
+ expected: [
+ ['foo',
+ 'ba',
+ { nameTruncated: false,
+ valueTruncated: true,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ['baz',
+ 'bl',
+ { nameTruncated: false,
+ valueTruncated: true,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Limits: truncated field value',
+ limits: { fieldSize: 2 }
+ },
+ { source: ['foo=bar&baz=bla'],
+ expected: [
+ ['fo',
+ 'ba',
+ { nameTruncated: true,
+ valueTruncated: true,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ['ba',
+ 'bl',
+ { nameTruncated: true,
+ valueTruncated: true,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Limits: truncated field name and value',
+ limits: { fieldNameSize: 2, fieldSize: 2 }
+ },
+ { source: ['foo=bar&baz=bla'],
+ expected: [
+ ['fo',
+ '',
+ { nameTruncated: true,
+ valueTruncated: true,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ['ba',
+ '',
+ { nameTruncated: true,
+ valueTruncated: true,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Limits: truncated field name and zero value limit',
+ limits: { fieldNameSize: 2, fieldSize: 0 }
+ },
+ { source: ['foo=bar&baz=bla'],
+ expected: [
+ ['',
+ '',
+ { nameTruncated: true,
+ valueTruncated: true,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ['',
+ '',
+ { nameTruncated: true,
+ valueTruncated: true,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Limits: truncated zero field name and zero value limit',
+ limits: { fieldNameSize: 0, fieldSize: 0 }
+ },
+ { source: ['&'],
+ expected: [],
+ what: 'Ampersand'
+ },
+ { source: ['&&&&&'],
+ expected: [],
+ what: 'Many ampersands'
+ },
+ { source: ['='],
+ expected: [
+ ['',
+ '',
+ { nameTruncated: false,
+ valueTruncated: false,
+ encoding: 'utf-8',
+ mimeType: 'text/plain' },
+ ],
+ ],
+ what: 'Assigned value, empty name and value'
+ },
+ { source: [''],
+ expected: [],
+ what: 'Nothing'
+ },
+];
+
+for (const test of tests) {
+ active.set(test, 1);
+
+ const { what } = test;
+ const charset = test.charset || 'utf-8';
+ const bb = busboy({
+ limits: test.limits,
+ headers: {
+ 'content-type': `application/x-www-form-urlencoded; charset=${charset}`,
+ },
+ });
+ const results = [];
+
+ bb.on('field', (key, val, info) => {
+ results.push([key, val, info]);
+ });
+
+ bb.on('file', () => {
+ throw new Error(`[${what}] Unexpected file`);
+ });
+
+ bb.on('close', () => {
+ active.delete(test);
+
+ assert.deepStrictEqual(
+ results,
+ test.expected,
+ `[${what}] Results mismatch.\n`
+ + `Parsed: ${inspect(results)}\n`
+ + `Expected: ${inspect(test.expected)}`
+ );
+ });
+
+ for (const src of test.source) {
+ const buf = (typeof src === 'string' ? Buffer.from(src, 'utf8') : src);
+ bb.write(buf);
+ }
+ bb.end();
+}
+
+// Byte-by-byte versions
+for (let test of tests) {
+ test = { ...test };
+ test.what += ' (byte-by-byte)';
+ active.set(test, 1);
+
+ const { what } = test;
+ const charset = test.charset || 'utf-8';
+ const bb = busboy({
+ limits: test.limits,
+ headers: {
+ 'content-type': `application/x-www-form-urlencoded; charset="${charset}"`,
+ },
+ });
+ const results = [];
+
+ bb.on('field', (key, val, info) => {
+ results.push([key, val, info]);
+ });
+
+ bb.on('file', () => {
+ throw new Error(`[${what}] Unexpected file`);
+ });
+
+ bb.on('close', () => {
+ active.delete(test);
+
+ assert.deepStrictEqual(
+ results,
+ test.expected,
+ `[${what}] Results mismatch.\n`
+ + `Parsed: ${inspect(results)}\n`
+ + `Expected: ${inspect(test.expected)}`
+ );
+ });
+
+ for (const src of test.source) {
+ const buf = (typeof src === 'string' ? Buffer.from(src, 'utf8') : src);
+ for (let i = 0; i < buf.length; ++i)
+ bb.write(buf.slice(i, i + 1));
+ }
+ bb.end();
+}
+
+{
+ let exception = false;
+ process.once('uncaughtException', (ex) => {
+ exception = true;
+ throw ex;
+ });
+ process.on('exit', () => {
+ if (exception || active.size === 0)
+ return;
+ process.exitCode = 1;
+ console.error('==========================');
+ console.error(`${active.size} test(s) did not finish:`);
+ console.error('==========================');
+ console.error(Array.from(active.keys()).map((v) => v.what).join('\n'));
+ });
+}
diff --git a/node_modules/busboy/test/test.js b/node_modules/busboy/test/test.js
new file mode 100644
index 0000000..d0380f2
--- /dev/null
+++ b/node_modules/busboy/test/test.js
@@ -0,0 +1,20 @@
+'use strict';
+
+const { spawnSync } = require('child_process');
+const { readdirSync } = require('fs');
+const { join } = require('path');
+
+const files = readdirSync(__dirname).sort();
+for (const filename of files) {
+ if (filename.startsWith('test-')) {
+ const path = join(__dirname, filename);
+ console.log(`> Running ${filename} ...`);
+ const result = spawnSync(`${process.argv0} ${path}`, {
+ shell: true,
+ stdio: 'inherit',
+ windowsHide: true
+ });
+ if (result.status !== 0)
+ process.exitCode = 1;
+ }
+}
diff --git a/node_modules/discord-api-types/LICENSE b/node_modules/discord-api-types/LICENSE
new file mode 100644
index 0000000..a8b1694
--- /dev/null
+++ b/node_modules/discord-api-types/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 vladfrangu
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/discord-api-types/README.md b/node_modules/discord-api-types/README.md
new file mode 100644
index 0000000..f33c5df
--- /dev/null
+++ b/node_modules/discord-api-types/README.md
@@ -0,0 +1,105 @@
+# Discord API Types
+
+[![discord-api-types](https://raw.githubusercontent.com/discordjs/discord-api-types/main/website/static/svgs/logo_long_blurple.svg)](https://github.com/discordjs/discord-api-types)
+
+[![GitHub](https://img.shields.io/github/license/discordjs/discord-api-types)](https://github.com/discordjs/discord-api-types/blob/main/LICENSE.md)
+[![npm](https://img.shields.io/npm/v/discord-api-types?color=crimson&logo=npm)](https://www.npmjs.com/package/discord-api-types)
+[![deno](https://img.shields.io/npm/v/discord-api-types?color=blue&label=deno&logo=deno)](https://deno.land/x/discord_api_types)
+[![Patreon Donate](https://img.shields.io/badge/patreon-donate-brightgreen.svg?label=Donate%20with%20Patreon&logo=patreon&colorB=F96854&link=https://www.patreon.com/vladfrangu)](https://www.patreon.com/vladfrangu)
+[![Ko-fi Donate](https://img.shields.io/badge/kofi-donate-brightgreen.svg?label=Donate%20with%20Ko-fi&logo=ko-fi&colorB=F16061&link=https://ko-fi.com/wolfgalvlad&logoColor=FFFFFF)](https://ko-fi.com/wolfgalvlad)
+[![GitHub Sponsors](https://img.shields.io/badge/patreon-donate-brightgreen.svg?label=Sponsor%20through%20GitHub&logo=github&colorB=F96854&link=https://github.com/sponsors/vladfrangu)](https://github.com/sponsors/vladfrangu)
+[![Powered by Vercel](https://raw.githubusercontent.com/discordjs/discord-api-types/main/website/static/powered-by-vercel.svg)](https://vercel.com?utm_source=discordjs&utm_campaign=oss)
+
+Simple type definitions for the [Discord API](https://discord.com/developers/docs/intro).
+
+## Installation
+
+Install with [npm](https://www.npmjs.com/) / [yarn](https://yarnpkg.com) / [pnpm](https://pnpm.js.org/):
+
+```sh
+npm install discord-api-types
+yarn add discord-api-types
+pnpm add discord-api-types
+```
+
+### Usage
+
+You can only import this module by specifying the API version you want to target. Append `/v*` to the import path, where the `*` represents the API version. Below are some examples
+
+```js
+const { APIUser } = require('discord-api-types/v10');
+```
+
+```ts
+// TypeScript/ES Module support
+import { APIUser } from 'discord-api-types/v10';
+```
+
+You may also import just certain parts of the module that you need. The possible values are: `globals`, `gateway`, `gateway/v*`, `payloads`, `payloads/v*`, `rest`, `rest/v*`, `rpc`, `rpc/v*`, `utils`, `utils/v*`, `voice`, and `voice/v*`. Below are some examples
+
+```js
+const { GatewayVersion } = require('discord-api-types/gateway/v10');
+```
+
+```ts
+// TypeScript/ES Module support
+import { GatewayVersion } from 'discord-api-types/gateway/v10';
+```
+
+> _**Note:** The `v*` exports (`discord-api-types/v*`) include the appropriate version of `gateway`, `payloads`, `rest`, `rpc`, and `utils` you specified, alongside the `globals` exports_
+
+### Deno
+
+We also provide typings compatible with the [deno](https://deno.land/) runtime. You have 3 ways you can import them:
+
+1. Directly from GitHub
+
+```ts
+// Importing a specific API version
+import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/deno/v10.ts';
+```
+
+2. From [deno.land/x](https://deno.land/x)
+
+```ts
+// Importing a specific API version
+import { APIUser } from 'https://deno.land/x/discord_api_types/v10.ts';
+```
+
+3. From [skypack.dev](https://www.skypack.dev/)
+
+```ts
+// Importing a specific API version
+import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v10?dts';
+```
+
+## Project Structure
+
+The exports of each API version is split into three main parts:
+
+- Everything exported with the `API` prefix represents a payload you may get from the REST API _or_ the Gateway.
+
+- Everything exported with the `Gateway` prefix represents data that ONLY comes from or is directly related to the Gateway.
+
+- Everything exported with the `REST` prefix represents data that ONLY comes from or is directly related to the REST API.
+
+ - For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return.
+
+ - For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
+
+ - Some exported types (specifically OAuth2 related ones) may not respect this entire structure due to the nature of the fields. They will start with either `RESTOAuth2` or with something similar to `REST<HTTP Method>OAuth2`
+
+ - If a type ends with `Result`, then it represents the expected result by calling its accompanying route.
+
+ - Types that are exported as `never` usually mean the result will be a `204 No Content`, so you can safely ignore it. This does **not** account for errors.
+
+- Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object).
+
+- There may be types exported that are identical for all versions. These will be exported as is and can be found in the `globals` file. They will still be prefixed accordingly as described above.
+
+**A note about how types are documented**: This package will add types only for known and documented properties that are present in Discord's [API Documentation repository](https://github.com/discord/discord-api-docs),
+that are mentioned in an open pull request, or known through other means _and have received the green light to be used_.
+Anything else will not be documented (for example client only types).
+
+With that aside, we may allow certain types that are not documented in the [API Documentation repository](https://github.com/discord/discord-api-docs) on a case by case basis.
+They will be documented with an `@unstable` tag and are not subject with the same versioning rules.
diff --git a/node_modules/discord-api-types/gateway/common.d.ts b/node_modules/discord-api-types/gateway/common.d.ts
new file mode 100644
index 0000000..75afddc
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/common.d.ts
@@ -0,0 +1,9 @@
+/**
+ * https://discord.com/developers/docs/topics/gateway#connecting-gateway-url-query-string-params
+ */
+export interface GatewayURLQuery {
+ v: string;
+ encoding: 'json' | 'etf';
+ compress?: 'zlib-stream';
+}
+//# sourceMappingURL=common.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/common.d.ts.map b/node_modules/discord-api-types/gateway/common.d.ts.map
new file mode 100644
index 0000000..59c2f60
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/common.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC;IACzB,QAAQ,CAAC,EAAE,aAAa,CAAC;CACzB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/common.js b/node_modules/discord-api-types/gateway/common.js
new file mode 100644
index 0000000..023264f
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/common.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=common.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/common.js.map b/node_modules/discord-api-types/gateway/common.js.map
new file mode 100644
index 0000000..d0f541d
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/common.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"common.js","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/index.d.ts b/node_modules/discord-api-types/gateway/index.d.ts
new file mode 100644
index 0000000..73b8353
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/index.d.ts
@@ -0,0 +1,2 @@
+export * from './v10';
+//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/index.d.ts.map b/node_modules/discord-api-types/gateway/index.d.ts.map
new file mode 100644
index 0000000..ff50635
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,cAAc,OAAO,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/index.js b/node_modules/discord-api-types/gateway/index.js
new file mode 100644
index 0000000..cdf95e3
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/index.js
@@ -0,0 +1,20 @@
+"use strict";
+// This file exports all the types available in the recommended gateway version
+// Thereby, things MAY break in the future. Try sticking to imports from a specific version
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./v10"), exports);
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/index.js.map b/node_modules/discord-api-types/gateway/index.js.map
new file mode 100644
index 0000000..d432448
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,2FAA2F;;;;;;;;;;;;;;;;AAE3F,wCAAsB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/index.mjs b/node_modules/discord-api-types/gateway/index.mjs
new file mode 100644
index 0000000..fd4ff25
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/index.mjs
@@ -0,0 +1,8 @@
+import mod from "./index.js";
+
+export default mod;
+export const GatewayCloseCodes = mod.GatewayCloseCodes;
+export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
+export const GatewayIntentBits = mod.GatewayIntentBits;
+export const GatewayOpcodes = mod.GatewayOpcodes;
+export const GatewayVersion = mod.GatewayVersion;
diff --git a/node_modules/discord-api-types/gateway/v10.d.ts b/node_modules/discord-api-types/gateway/v10.d.ts
new file mode 100644
index 0000000..06bfc70
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v10.d.ts
@@ -0,0 +1,1634 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/gateway
+ */
+import type { Snowflake } from '../globals';
+import type { GatewayPresenceUpdate } from '../payloads/v10/gateway';
+import type { APIApplication, APIApplicationCommandPermission, APIAutoModerationRule, APIAutoModerationAction, APIChannel, APIEmoji, APIGuild, APIGuildIntegration, APIGuildMember, APIGuildScheduledEvent, APIInteraction, APIMessage, APIRole, APIStageInstance, APISticker, APIThreadChannel, APIThreadMember, APIUnavailableGuild, APIUser, GatewayActivity, GatewayPresenceUpdate as RawGatewayPresenceUpdate, GatewayThreadListSync as RawGatewayThreadListSync, GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate, GatewayVoiceState, InviteTargetType, PresenceUpdateStatus, AutoModerationRuleTriggerType, APIAuditLogEntry } from '../payloads/v10/index';
+import type { Nullable } from '../utils/internals';
+export * from './common';
+export declare const GatewayVersion = "10";
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
+ */
+export declare enum GatewayOpcodes {
+ /**
+ * An event was dispatched
+ */
+ Dispatch = 0,
+ /**
+ * A bidirectional opcode to maintain an active gateway connection.
+ * Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client.
+ */
+ Heartbeat = 1,
+ /**
+ * Starts a new session during the initial handshake
+ */
+ Identify = 2,
+ /**
+ * Update the client's presence
+ */
+ PresenceUpdate = 3,
+ /**
+ * Used to join/leave or move between voice channels
+ */
+ VoiceStateUpdate = 4,
+ /**
+ * Resume a previous session that was disconnected
+ */
+ Resume = 6,
+ /**
+ * You should attempt to reconnect and resume immediately
+ */
+ Reconnect = 7,
+ /**
+ * Request information about offline guild members in a large guild
+ */
+ RequestGuildMembers = 8,
+ /**
+ * The session has been invalidated. You should reconnect and identify/resume accordingly
+ */
+ InvalidSession = 9,
+ /**
+ * Sent immediately after connecting, contains the `heartbeat_interval` to use
+ */
+ Hello = 10,
+ /**
+ * Sent in response to receiving a heartbeat to acknowledge that it has been received
+ */
+ HeartbeatAck = 11
+}
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
+ */
+export declare enum GatewayCloseCodes {
+ /**
+ * We're not sure what went wrong. Try reconnecting?
+ */
+ UnknownError = 4000,
+ /**
+ * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that!
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#payload-structure
+ */
+ UnknownOpcode = 4001,
+ /**
+ * You sent an invalid payload to us. Don't do that!
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sending-events
+ */
+ DecodeError = 4002,
+ /**
+ * You sent us a payload prior to identifying
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#identify
+ */
+ NotAuthenticated = 4003,
+ /**
+ * The account token sent with your identify payload is incorrect
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#identify
+ */
+ AuthenticationFailed = 4004,
+ /**
+ * You sent more than one identify payload. Don't do that!
+ */
+ AlreadyAuthenticated = 4005,
+ /**
+ * The sequence sent when resuming the session was invalid. Reconnect and start a new session
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#resume
+ */
+ InvalidSeq = 4007,
+ /**
+ * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this
+ */
+ RateLimited = 4008,
+ /**
+ * Your session timed out. Reconnect and start a new one
+ */
+ SessionTimedOut = 4009,
+ /**
+ * You sent us an invalid shard when identifying
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ InvalidShard = 4010,
+ /**
+ * The session would have handled too many guilds - you are required to shard your connection in order to connect
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ ShardingRequired = 4011,
+ /**
+ * You sent an invalid version for the gateway
+ */
+ InvalidAPIVersion = 4012,
+ /**
+ * You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value
+ *
+ * See https://discord.com/developers/docs/topics/gateway#gateway-intents
+ */
+ InvalidIntents = 4013,
+ /**
+ * You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not
+ * enabled or are not whitelisted for
+ *
+ * See https://discord.com/developers/docs/topics/gateway#gateway-intents
+ *
+ * See https://discord.com/developers/docs/topics/gateway#privileged-intents
+ */
+ DisallowedIntents = 4014
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#list-of-intents
+ */
+export declare enum GatewayIntentBits {
+ Guilds = 1,
+ GuildMembers = 2,
+ GuildModeration = 4,
+ /**
+ * @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration}
+ */
+ GuildBans = 4,
+ GuildEmojisAndStickers = 8,
+ GuildIntegrations = 16,
+ GuildWebhooks = 32,
+ GuildInvites = 64,
+ GuildVoiceStates = 128,
+ GuildPresences = 256,
+ GuildMessages = 512,
+ GuildMessageReactions = 1024,
+ GuildMessageTyping = 2048,
+ DirectMessages = 4096,
+ DirectMessageReactions = 8192,
+ DirectMessageTyping = 16384,
+ MessageContent = 32768,
+ GuildScheduledEvents = 65536,
+ AutoModerationConfiguration = 1048576,
+ AutoModerationExecution = 2097152
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#receive-events
+ */
+export declare enum GatewayDispatchEvents {
+ ApplicationCommandPermissionsUpdate = "APPLICATION_COMMAND_PERMISSIONS_UPDATE",
+ ChannelCreate = "CHANNEL_CREATE",
+ ChannelDelete = "CHANNEL_DELETE",
+ ChannelPinsUpdate = "CHANNEL_PINS_UPDATE",
+ ChannelUpdate = "CHANNEL_UPDATE",
+ GuildBanAdd = "GUILD_BAN_ADD",
+ GuildBanRemove = "GUILD_BAN_REMOVE",
+ GuildCreate = "GUILD_CREATE",
+ GuildDelete = "GUILD_DELETE",
+ GuildEmojisUpdate = "GUILD_EMOJIS_UPDATE",
+ GuildIntegrationsUpdate = "GUILD_INTEGRATIONS_UPDATE",
+ GuildMemberAdd = "GUILD_MEMBER_ADD",
+ GuildMemberRemove = "GUILD_MEMBER_REMOVE",
+ GuildMembersChunk = "GUILD_MEMBERS_CHUNK",
+ GuildMemberUpdate = "GUILD_MEMBER_UPDATE",
+ GuildRoleCreate = "GUILD_ROLE_CREATE",
+ GuildRoleDelete = "GUILD_ROLE_DELETE",
+ GuildRoleUpdate = "GUILD_ROLE_UPDATE",
+ GuildStickersUpdate = "GUILD_STICKERS_UPDATE",
+ GuildUpdate = "GUILD_UPDATE",
+ IntegrationCreate = "INTEGRATION_CREATE",
+ IntegrationDelete = "INTEGRATION_DELETE",
+ IntegrationUpdate = "INTEGRATION_UPDATE",
+ InteractionCreate = "INTERACTION_CREATE",
+ InviteCreate = "INVITE_CREATE",
+ InviteDelete = "INVITE_DELETE",
+ MessageCreate = "MESSAGE_CREATE",
+ MessageDelete = "MESSAGE_DELETE",
+ MessageDeleteBulk = "MESSAGE_DELETE_BULK",
+ MessageReactionAdd = "MESSAGE_REACTION_ADD",
+ MessageReactionRemove = "MESSAGE_REACTION_REMOVE",
+ MessageReactionRemoveAll = "MESSAGE_REACTION_REMOVE_ALL",
+ MessageReactionRemoveEmoji = "MESSAGE_REACTION_REMOVE_EMOJI",
+ MessageUpdate = "MESSAGE_UPDATE",
+ PresenceUpdate = "PRESENCE_UPDATE",
+ StageInstanceCreate = "STAGE_INSTANCE_CREATE",
+ StageInstanceDelete = "STAGE_INSTANCE_DELETE",
+ StageInstanceUpdate = "STAGE_INSTANCE_UPDATE",
+ Ready = "READY",
+ Resumed = "RESUMED",
+ ThreadCreate = "THREAD_CREATE",
+ ThreadDelete = "THREAD_DELETE",
+ ThreadListSync = "THREAD_LIST_SYNC",
+ ThreadMembersUpdate = "THREAD_MEMBERS_UPDATE",
+ ThreadMemberUpdate = "THREAD_MEMBER_UPDATE",
+ ThreadUpdate = "THREAD_UPDATE",
+ TypingStart = "TYPING_START",
+ UserUpdate = "USER_UPDATE",
+ VoiceServerUpdate = "VOICE_SERVER_UPDATE",
+ VoiceStateUpdate = "VOICE_STATE_UPDATE",
+ WebhooksUpdate = "WEBHOOKS_UPDATE",
+ GuildScheduledEventCreate = "GUILD_SCHEDULED_EVENT_CREATE",
+ GuildScheduledEventUpdate = "GUILD_SCHEDULED_EVENT_UPDATE",
+ GuildScheduledEventDelete = "GUILD_SCHEDULED_EVENT_DELETE",
+ GuildScheduledEventUserAdd = "GUILD_SCHEDULED_EVENT_USER_ADD",
+ GuildScheduledEventUserRemove = "GUILD_SCHEDULED_EVENT_USER_REMOVE",
+ AutoModerationRuleCreate = "AUTO_MODERATION_RULE_CREATE",
+ AutoModerationRuleUpdate = "AUTO_MODERATION_RULE_UPDATE",
+ AutoModerationRuleDelete = "AUTO_MODERATION_RULE_DELETE",
+ AutoModerationActionExecution = "AUTO_MODERATION_ACTION_EXECUTION",
+ GuildAuditLogEntryCreate = "GUILD_AUDIT_LOG_ENTRY_CREATE"
+}
+export type GatewaySendPayload = GatewayHeartbeat | GatewayIdentify | GatewayUpdatePresence | GatewayVoiceStateUpdate | GatewayResume | GatewayRequestGuildMembers;
+export type GatewayReceivePayload = GatewayHello | GatewayHeartbeatRequest | GatewayHeartbeatAck | GatewayInvalidSession | GatewayReconnect | GatewayDispatchPayload;
+export type GatewayDispatchPayload = GatewayAutoModerationRuleModifyDispatch | GatewayAutoModerationRuleCreateDispatch | GatewayAutoModerationRuleDeleteDispatch | GatewayAutoModerationActionExecutionDispatch | GatewayApplicationCommandPermissionsUpdateDispatch | GatewayChannelModifyDispatch | GatewayChannelPinsUpdateDispatch | GatewayGuildBanModifyDispatch | GatewayGuildCreateDispatch | GatewayGuildDeleteDispatch | GatewayGuildEmojisUpdateDispatch | GatewayGuildIntegrationsUpdateDispatch | GatewayGuildMemberAddDispatch | GatewayGuildMemberRemoveDispatch | GatewayGuildMembersChunkDispatch | GatewayGuildMemberUpdateDispatch | GatewayGuildModifyDispatch | GatewayGuildRoleDeleteDispatch | GatewayGuildRoleModifyDispatch | GatewayGuildScheduledEventCreateDispatch | GatewayGuildScheduledEventUpdateDispatch | GatewayGuildScheduledEventDeleteDispatch | GatewayGuildScheduledEventUserAddDispatch | GatewayGuildScheduledEventUserRemoveDispatch | GatewayGuildStickersUpdateDispatch | GatewayIntegrationCreateDispatch | GatewayIntegrationDeleteDispatch | GatewayIntegrationUpdateDispatch | GatewayInteractionCreateDispatch | GatewayInviteCreateDispatch | GatewayInviteDeleteDispatch | GatewayMessageCreateDispatch | GatewayMessageDeleteBulkDispatch | GatewayMessageDeleteDispatch | GatewayMessageReactionAddDispatch | GatewayMessageReactionRemoveAllDispatch | GatewayMessageReactionRemoveDispatch | GatewayMessageReactionRemoveEmojiDispatch | GatewayMessageUpdateDispatch | GatewayPresenceUpdateDispatch | GatewayStageInstanceCreateDispatch | GatewayStageInstanceDeleteDispatch | GatewayStageInstanceUpdateDispatch | GatewayReadyDispatch | GatewayResumedDispatch | GatewayThreadListSyncDispatch | GatewayThreadMembersUpdateDispatch | GatewayThreadMemberUpdateDispatch | GatewayThreadModifyDispatch | GatewayTypingStartDispatch | GatewayUserUpdateDispatch | GatewayVoiceServerUpdateDispatch | GatewayVoiceStateUpdateDispatch | GatewayWebhooksUpdateDispatch | GatewayGuildAuditLogEntryCreateDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#hello
+ */
+export interface GatewayHello extends NonDispatchPayload {
+ op: GatewayOpcodes.Hello;
+ d: GatewayHelloData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#hello
+ */
+export interface GatewayHelloData {
+ /**
+ * The interval (in milliseconds) the client should heartbeat with
+ */
+ heartbeat_interval: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#sending-heartbeats
+ */
+export interface GatewayHeartbeatRequest extends NonDispatchPayload {
+ op: GatewayOpcodes.Heartbeat;
+ d: never;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#heartbeat
+ */
+export interface GatewayHeartbeatAck extends NonDispatchPayload {
+ op: GatewayOpcodes.HeartbeatAck;
+ d: never;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#invalid-session
+ */
+export interface GatewayInvalidSession extends NonDispatchPayload {
+ op: GatewayOpcodes.InvalidSession;
+ d: GatewayInvalidSessionData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#invalid-session
+ */
+export type GatewayInvalidSessionData = boolean;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#reconnect
+ */
+export interface GatewayReconnect extends NonDispatchPayload {
+ op: GatewayOpcodes.Reconnect;
+ d: never;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#ready
+ */
+export type GatewayReadyDispatch = DataPayload<GatewayDispatchEvents.Ready, GatewayReadyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#ready
+ */
+export interface GatewayReadyDispatchData {
+ /**
+ * Gateway version
+ *
+ * See https://discord.com/developers/docs/reference#api-versioning
+ */
+ v: number;
+ /**
+ * Information about the user including email
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user: APIUser;
+ /**
+ * The guilds the user is in
+ *
+ * See https://discord.com/developers/docs/resources/guild#unavailable-guild-object
+ */
+ guilds: APIUnavailableGuild[];
+ /**
+ * Used for resuming connections
+ */
+ session_id: string;
+ /**
+ * Gateway url for resuming connections
+ */
+ resume_gateway_url: string;
+ /**
+ * The shard information associated with this session, if sent when identifying
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ shard?: [shard_id: number, shard_count: number];
+ /**
+ * Contains `id` and `flags`
+ *
+ * See https://discord.com/developers/docs/resources/application#application-object
+ */
+ application: Pick<APIApplication, 'id' | 'flags'>;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#resumed
+ */
+export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed, never>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete
+ */
+export type GatewayAutoModerationRuleModifyDispatch = DataPayload<GatewayDispatchEvents.AutoModerationRuleCreate | GatewayDispatchEvents.AutoModerationRuleUpdate | GatewayDispatchEvents.AutoModerationRuleDelete, GatewayAutoModerationRuleModifyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete
+ */
+export type GatewayAutoModerationRuleModifyDispatchData = APIAutoModerationRule;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create
+ */
+export type GatewayAutoModerationRuleCreateDispatch = GatewayAutoModerationRuleModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create
+ */
+export type GatewayAutoModerationRuleCreateDispatchData = GatewayAutoModerationRuleModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update
+ */
+export type GatewayAutoModerationRuleUpdateDispatch = GatewayAutoModerationRuleModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update
+ */
+export type GatewayAutoModerationRuleUpdateDispatchData = GatewayAutoModerationRuleModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete
+ */
+export type GatewayAutoModerationRuleDeleteDispatch = GatewayAutoModerationRuleModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete
+ */
+export type GatewayAutoModerationRuleDeleteDispatchData = GatewayAutoModerationRuleModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-action-execution
+ */
+export type GatewayAutoModerationActionExecutionDispatch = DataPayload<GatewayDispatchEvents.AutoModerationActionExecution, GatewayAutoModerationActionExecutionDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-action-execution
+ */
+export interface GatewayAutoModerationActionExecutionDispatchData {
+ /**
+ * The id of the guild in which action was executed
+ */
+ guild_id: Snowflake;
+ /**
+ * The action which was executed
+ */
+ action: APIAutoModerationAction;
+ /**
+ * The id of the rule which action belongs to
+ */
+ rule_id: Snowflake;
+ /**
+ * The trigger type of rule which was triggered
+ */
+ rule_trigger_type: AutoModerationRuleTriggerType;
+ /**
+ * The id of the user which generated the content which triggered the rule
+ */
+ user_id: Snowflake;
+ /**
+ * The id of the channel in which user content was posted
+ */
+ channel_id?: Snowflake;
+ /**
+ * The id of any user message which content belongs to
+ *
+ * This field will not be present if message was blocked by AutoMod or content was not part of any message
+ */
+ message_id?: Snowflake;
+ /**
+ * The id of any system auto moderation messages posted as a result of this action
+ *
+ * This field will not be present if this event does not correspond to an action with type {@link AutoModerationActionType.SendAlertMessage}
+ */
+ alert_system_message_id?: Snowflake;
+ /**
+ * The user generated text content
+ *
+ * `MESSAGE_CONTENT` (`1 << 15`) gateway intent is required to receive non-empty values from this field
+ */
+ content: string;
+ /**
+ * The word or phrase configured in the rule that triggered the rule
+ */
+ matched_keyword: string | null;
+ /**
+ * The substring in content that triggered the rule
+ *
+ * `MESSAGE_CONTENT` (`1 << 15`) gateway intent is required to receive non-empty values from this field
+ */
+ matched_content: string | null;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#application-command-permissions-update
+ */
+export type GatewayApplicationCommandPermissionsUpdateDispatch = DataPayload<GatewayDispatchEvents.ApplicationCommandPermissionsUpdate, GatewayApplicationCommandPermissionsUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#application-command-permissions-update
+ */
+export interface GatewayApplicationCommandPermissionsUpdateDispatchData {
+ /**
+ * ID of the command or the application ID
+ */
+ id: Snowflake;
+ /**
+ * ID of the application the command belongs to
+ */
+ application_id: Snowflake;
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * Permissions for the command in the guild, max of 100
+ */
+ permissions: APIApplicationCommandPermission[];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-create
+ * https://discord.com/developers/docs/topics/gateway-events#channel-update
+ * https://discord.com/developers/docs/topics/gateway-events#channel-delete
+ */
+export type GatewayChannelModifyDispatch = DataPayload<GatewayDispatchEvents.ChannelCreate | GatewayDispatchEvents.ChannelDelete | GatewayDispatchEvents.ChannelUpdate, GatewayChannelModifyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-create
+ * https://discord.com/developers/docs/topics/gateway-events#channel-update
+ * https://discord.com/developers/docs/topics/gateway-events#channel-delete
+ */
+export type GatewayChannelModifyDispatchData = APIChannel;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-create
+ */
+export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-create
+ */
+export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-update
+ */
+export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-update
+ */
+export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-delete
+ */
+export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-delete
+ */
+export type GatewayChannelDeleteDispatchData = GatewayChannelModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-pins-update
+ */
+export type GatewayChannelPinsUpdateDispatch = DataPayload<GatewayDispatchEvents.ChannelPinsUpdate, GatewayChannelPinsUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-pins-update
+ */
+export interface GatewayChannelPinsUpdateDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The time at which the most recent pinned message was pinned
+ */
+ last_pin_timestamp?: string | null;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-create
+ */
+export type GatewayGuildModifyDispatch = DataPayload<GatewayDispatchEvents.GuildUpdate, GatewayGuildModifyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-update
+ */
+export type GatewayGuildModifyDispatchData = APIGuild;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-create
+ */
+export type GatewayGuildCreateDispatch = DataPayload<GatewayDispatchEvents.GuildCreate, GatewayGuildCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-create
+ * https://discord.com/developers/docs/topics/gateway-events#guild-create-guild-create-extra-fields
+ */
+export interface GatewayGuildCreateDispatchData extends APIGuild {
+ /**
+ * When this guild was joined at
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ */
+ joined_at: string;
+ /**
+ * `true` if this is considered a large guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ */
+ large: boolean;
+ /**
+ * `true` if this guild is unavailable due to an outage
+ */
+ unavailable?: boolean;
+ /**
+ * Total number of members in this guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ */
+ member_count: number;
+ /**
+ * States of members currently in voice channels; lacks the `guild_id` key
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-state-object
+ */
+ voice_states: Omit<GatewayVoiceState, 'guild_id'>[];
+ /**
+ * Users in the guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ members: APIGuildMember[];
+ /**
+ * Channels in the guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object
+ */
+ channels: APIChannel[];
+ /**
+ * Threads in the guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object
+ */
+ threads: APIChannel[];
+ /**
+ * Presences of the members in the guild, will only include non-offline members if the size is greater than `large_threshold`
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#presence-update
+ */
+ presences: GatewayPresenceUpdate[];
+ /**
+ * The stage instances in the guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ *
+ * See https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-stage-instance-structure
+ */
+ stage_instances: APIStageInstance[];
+ /**
+ * The scheduled events in the guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ *
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object
+ */
+ guild_scheduled_events: APIGuildScheduledEvent[];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-update
+ */
+export type GatewayGuildUpdateDispatch = GatewayGuildModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-update
+ */
+export type GatewayGuildUpdateDispatchData = GatewayGuildModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-delete
+ */
+export type GatewayGuildDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildDelete, GatewayGuildDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-delete
+ */
+export type GatewayGuildDeleteDispatchData = APIUnavailableGuild;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-ban-add
+ * https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove
+ */
+export type GatewayGuildBanModifyDispatch = DataPayload<GatewayDispatchEvents.GuildBanAdd | GatewayDispatchEvents.GuildBanRemove, GatewayGuildBanModifyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-ban-add
+ * https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove
+ */
+export interface GatewayGuildBanModifyDispatchData {
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The banned user
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-ban-add
+ */
+export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-ban-add
+ */
+export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove
+ */
+export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove
+ */
+export type GatewayGuildBanRemoveDispatchData = GatewayGuildBanModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-emojis-update
+ */
+export type GatewayGuildEmojisUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildEmojisUpdate, GatewayGuildEmojisUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-emojis-update
+ */
+export interface GatewayGuildEmojisUpdateDispatchData {
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * Array of emojis
+ *
+ * See https://discord.com/developers/docs/resources/emoji#emoji-object
+ */
+ emojis: APIEmoji[];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-stickers-update
+ */
+export type GatewayGuildStickersUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildStickersUpdate, GatewayGuildStickersUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-stickers-update
+ */
+export interface GatewayGuildStickersUpdateDispatchData {
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * Array of stickers
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object
+ */
+ stickers: APISticker[];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-integrations-update
+ */
+export type GatewayGuildIntegrationsUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildIntegrationsUpdate, GatewayGuildIntegrationsUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-integrations-update
+ */
+export interface GatewayGuildIntegrationsUpdateDispatchData {
+ /**
+ * ID of the guild whose integrations were updated
+ */
+ guild_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-member-add
+ */
+export type GatewayGuildMemberAddDispatch = DataPayload<GatewayDispatchEvents.GuildMemberAdd, GatewayGuildMemberAddDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-member-add
+ */
+export interface GatewayGuildMemberAddDispatchData extends APIGuildMember {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-member-remove
+ */
+export type GatewayGuildMemberRemoveDispatch = DataPayload<GatewayDispatchEvents.GuildMemberRemove, GatewayGuildMemberRemoveDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-member-remove
+ */
+export interface GatewayGuildMemberRemoveDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The user who was removed
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-member-update
+ */
+export type GatewayGuildMemberUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildMemberUpdate, GatewayGuildMemberUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-member-update
+ */
+export type GatewayGuildMemberUpdateDispatchData = Omit<APIGuildMember, 'deaf' | 'mute' | 'user' | 'joined_at'> & Partial<Pick<APIGuildMember, 'deaf' | 'mute'>> & Required<Pick<APIGuildMember, 'user'>> & Nullable<Pick<APIGuildMember, 'joined_at'>> & {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+};
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk
+ */
+export type GatewayGuildMembersChunkDispatch = DataPayload<GatewayDispatchEvents.GuildMembersChunk, GatewayGuildMembersChunkDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#update-presence
+ */
+export type GatewayGuildMembersChunkPresence = Omit<RawGatewayPresenceUpdate, 'guild_id'>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk
+ */
+export interface GatewayGuildMembersChunkDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * Set of guild members
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ members: APIGuildMember[];
+ /**
+ * The chunk index in the expected chunks for this response (`0 <= chunk_index < chunk_count`)
+ */
+ chunk_index: number;
+ /**
+ * The total number of expected chunks for this response
+ */
+ chunk_count: number;
+ /**
+ * If passing an invalid id to `REQUEST_GUILD_MEMBERS`, it will be returned here
+ */
+ not_found?: unknown[];
+ /**
+ * If passing true to `REQUEST_GUILD_MEMBERS`, presences of the returned members will be here
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#update-presence
+ */
+ presences?: GatewayGuildMembersChunkPresence[];
+ /**
+ * The nonce used in the Guild Members Request
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#request-guild-members
+ */
+ nonce?: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-create
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-update
+ */
+export type GatewayGuildRoleModifyDispatch = DataPayload<GatewayDispatchEvents.GuildRoleCreate | GatewayDispatchEvents.GuildRoleUpdate, GatewayGuildRoleModifyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-create
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-update
+ */
+export interface GatewayGuildRoleModifyDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The role created or updated
+ *
+ * See https://discord.com/developers/docs/topics/permissions#role-object
+ */
+ role: APIRole;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-create
+ */
+export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-create
+ */
+export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-update
+ */
+export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-update
+ */
+export type GatewayGuildRoleUpdateDispatchData = GatewayGuildRoleModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-delete
+ */
+export type GatewayGuildRoleDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildRoleDelete, GatewayGuildRoleDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-delete
+ */
+export interface GatewayGuildRoleDeleteDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The id of the role
+ */
+ role_id: Snowflake;
+}
+export type GatewayGuildScheduledEventCreateDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventCreate, GatewayGuildScheduledEventCreateDispatchData>;
+export type GatewayGuildScheduledEventCreateDispatchData = APIGuildScheduledEvent;
+export type GatewayGuildScheduledEventUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventUpdate, GatewayGuildScheduledEventUpdateDispatchData>;
+export type GatewayGuildScheduledEventUpdateDispatchData = APIGuildScheduledEvent;
+export type GatewayGuildScheduledEventDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventDelete, GatewayGuildScheduledEventDeleteDispatchData>;
+export type GatewayGuildScheduledEventDeleteDispatchData = APIGuildScheduledEvent;
+export type GatewayGuildScheduledEventUserAddDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventUserAdd, GatewayGuildScheduledEventUserAddDispatchData>;
+export interface GatewayGuildScheduledEventUserAddDispatchData {
+ guild_scheduled_event_id: Snowflake;
+ user_id: Snowflake;
+ guild_id: Snowflake;
+}
+export type GatewayGuildScheduledEventUserRemoveDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventUserRemove, GatewayGuildScheduledEventUserAddDispatchData>;
+export interface GatewayGuildScheduledEventUserRemoveDispatchData {
+ guild_scheduled_event_id: Snowflake;
+ user_id: Snowflake;
+ guild_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#integration-create
+ */
+export type GatewayIntegrationCreateDispatch = DataPayload<GatewayDispatchEvents.IntegrationCreate, GatewayIntegrationCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#integration-create
+ */
+export type GatewayIntegrationCreateDispatchData = APIGuildIntegration & {
+ guild_id: Snowflake;
+};
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#integration-update
+ */
+export type GatewayIntegrationUpdateDispatch = DataPayload<GatewayDispatchEvents.IntegrationUpdate, GatewayIntegrationUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#integration-update
+ */
+export type GatewayIntegrationUpdateDispatchData = APIGuildIntegration & {
+ guild_id: Snowflake;
+};
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#integration-update
+ */
+export type GatewayIntegrationDeleteDispatch = DataPayload<GatewayDispatchEvents.IntegrationDelete, GatewayIntegrationDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#integration-delete
+ */
+export interface GatewayIntegrationDeleteDispatchData {
+ /**
+ * Integration id
+ */
+ id: Snowflake;
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * ID of the bot/OAuth2 application for this Discord integration
+ */
+ application_id?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#interaction-create
+ */
+export type GatewayInteractionCreateDispatch = DataPayload<GatewayDispatchEvents.InteractionCreate, GatewayInteractionCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#interaction-create
+ */
+export type GatewayInteractionCreateDispatchData = APIInteraction;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#invite-create
+ */
+export type GatewayInviteCreateDispatch = DataPayload<GatewayDispatchEvents.InviteCreate, GatewayInviteCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#invite-create
+ */
+export interface GatewayInviteCreateDispatchData {
+ /**
+ * The channel the invite is for
+ */
+ channel_id: Snowflake;
+ /**
+ * The unique invite code
+ *
+ * See https://discord.com/developers/docs/resources/invite#invite-object
+ */
+ code: string;
+ /**
+ * The time at which the invite was created
+ */
+ created_at: number;
+ /**
+ * The guild of the invite
+ */
+ guild_id?: Snowflake;
+ /**
+ * The user that created the invite
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ inviter?: APIUser;
+ /**
+ * How long the invite is valid for (in seconds)
+ */
+ max_age: number;
+ /**
+ * The maximum number of times the invite can be used
+ */
+ max_uses: number;
+ /**
+ * The type of target for this voice channel invite
+ *
+ * See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
+ */
+ target_type?: InviteTargetType;
+ /**
+ * The user whose stream to display for this voice channel stream invite
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ target_user?: APIUser;
+ /**
+ * The embedded application to open for this voice channel embedded application invite
+ */
+ target_application?: Partial<APIApplication>;
+ /**
+ * Whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role)
+ */
+ temporary: boolean;
+ /**
+ * How many times the invite has been used (always will be `0`)
+ */
+ uses: 0;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#invite-delete
+ */
+export type GatewayInviteDeleteDispatch = DataPayload<GatewayDispatchEvents.InviteDelete, GatewayInviteDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#invite-delete
+ */
+export interface GatewayInviteDeleteDispatchData {
+ /**
+ * The channel of the invite
+ */
+ channel_id: Snowflake;
+ /**
+ * The guild of the invite
+ */
+ guild_id?: Snowflake;
+ /**
+ * The unique invite code
+ *
+ * See https://discord.com/developers/docs/resources/invite#invite-object
+ */
+ code: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-create
+ */
+export type GatewayMessageCreateDispatch = DataPayload<GatewayDispatchEvents.MessageCreate, GatewayMessageCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-create
+ */
+export type GatewayMessageCreateDispatchData = Omit<APIMessage, 'mentions'> & GatewayMessageEventExtraFields;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-update
+ */
+export type GatewayMessageUpdateDispatch = DataPayload<GatewayDispatchEvents.MessageUpdate, GatewayMessageUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-update
+ */
+export type GatewayMessageUpdateDispatchData = Omit<Partial<APIMessage>, 'mentions'> & GatewayMessageEventExtraFields & {
+ /**
+ * ID of the message
+ */
+ id: Snowflake;
+ /**
+ * ID of the channel the message was sent in
+ */
+ channel_id: Snowflake;
+};
+export interface GatewayMessageEventExtraFields {
+ /**
+ * ID of the guild the message was sent in
+ */
+ guild_id?: Snowflake;
+ /**
+ * Member properties for this message's author
+ *
+ * The member object exists in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
+ * from text-based guild channels
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ member?: APIGuildMember;
+ /**
+ * Users specifically mentioned in the message
+ *
+ * The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
+ * from text-based guild channels
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ mentions: (APIUser & {
+ member?: Omit<APIGuildMember, 'user'>;
+ })[];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-delete
+ */
+export type GatewayMessageDeleteDispatch = DataPayload<GatewayDispatchEvents.MessageDelete, GatewayMessageDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-delete
+ */
+export interface GatewayMessageDeleteDispatchData {
+ /**
+ * The id of the message
+ */
+ id: Snowflake;
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-delete-bulk
+ */
+export type GatewayMessageDeleteBulkDispatch = DataPayload<GatewayDispatchEvents.MessageDeleteBulk, GatewayMessageDeleteBulkDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-delete-bulk
+ */
+export interface GatewayMessageDeleteBulkDispatchData {
+ /**
+ * The ids of the messages
+ */
+ ids: Snowflake[];
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-reaction-add
+ */
+export type GatewayMessageReactionAddDispatch = ReactionData<GatewayDispatchEvents.MessageReactionAdd>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-reaction-add
+ */
+export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDispatch['d'];
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove
+ */
+export type GatewayMessageReactionRemoveDispatch = ReactionData<GatewayDispatchEvents.MessageReactionRemove, 'member' | 'message_author_id'>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove
+ */
+export type GatewayMessageReactionRemoveDispatchData = GatewayMessageReactionRemoveDispatch['d'];
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-all
+ */
+export type GatewayMessageReactionRemoveAllDispatch = DataPayload<GatewayDispatchEvents.MessageReactionRemoveAll, GatewayMessageReactionRemoveAllDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-all
+ */
+export type GatewayMessageReactionRemoveAllDispatchData = MessageReactionRemoveData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-emoji
+ */
+export type GatewayMessageReactionRemoveEmojiDispatch = DataPayload<GatewayDispatchEvents.MessageReactionRemoveEmoji, GatewayMessageReactionRemoveEmojiDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-emoji
+ */
+export interface GatewayMessageReactionRemoveEmojiDispatchData extends MessageReactionRemoveData {
+ /**
+ * The emoji that was removed
+ */
+ emoji: APIEmoji;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#presence-update
+ */
+export type GatewayPresenceUpdateDispatch = DataPayload<GatewayDispatchEvents.PresenceUpdate, GatewayPresenceUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#presence-update
+ */
+export type GatewayPresenceUpdateDispatchData = RawGatewayPresenceUpdate;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#stage-instance-create
+ */
+export type GatewayStageInstanceCreateDispatch = DataPayload<GatewayDispatchEvents.StageInstanceCreate, GatewayStageInstanceCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#stage-instance-create
+ */
+export type GatewayStageInstanceCreateDispatchData = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#stage-instance-delete
+ */
+export type GatewayStageInstanceDeleteDispatch = DataPayload<GatewayDispatchEvents.StageInstanceDelete, GatewayStageInstanceDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#stage-instance-delete
+ */
+export type GatewayStageInstanceDeleteDispatchData = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#stage-instance-update
+ */
+export type GatewayStageInstanceUpdateDispatch = DataPayload<GatewayDispatchEvents.StageInstanceUpdate, GatewayStageInstanceUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#stage-instance-update
+ */
+export type GatewayStageInstanceUpdateDispatchData = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-list-sync
+ */
+export type GatewayThreadListSyncDispatch = DataPayload<GatewayDispatchEvents.ThreadListSync, GatewayThreadListSyncDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-list-sync
+ */
+export type GatewayThreadListSyncDispatchData = RawGatewayThreadListSync;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-members-update
+ */
+export type GatewayThreadMembersUpdateDispatch = DataPayload<GatewayDispatchEvents.ThreadMembersUpdate, GatewayThreadMembersUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-members-update
+ */
+export type GatewayThreadMembersUpdateDispatchData = RawGatewayThreadMembersUpdate;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-member-update
+ */
+export type GatewayThreadMemberUpdateDispatch = DataPayload<GatewayDispatchEvents.ThreadMemberUpdate, GatewayThreadMemberUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-member-update
+ */
+export type GatewayThreadMemberUpdateDispatchData = APIThreadMember & {
+ guild_id: Snowflake;
+};
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-create
+ * https://discord.com/developers/docs/topics/gateway-events#thread-update
+ * https://discord.com/developers/docs/topics/gateway-events#thread-delete
+ */
+export type GatewayThreadModifyDispatch = DataPayload<GatewayDispatchEvents.ThreadCreate | GatewayDispatchEvents.ThreadDelete | GatewayDispatchEvents.ThreadUpdate, GatewayChannelModifyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-create
+ */
+export type GatewayThreadCreateDispatch = GatewayChannelModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-create
+ */
+export interface GatewayThreadCreateDispatchData extends APIThreadChannel {
+ /**
+ * Whether the thread is newly created or not.
+ */
+ newly_created?: true;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-update
+ */
+export type GatewayThreadUpdateDispatch = GatewayChannelModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-update
+ */
+export type GatewayThreadUpdateDispatchData = GatewayChannelModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-delete
+ */
+export type GatewayThreadDeleteDispatch = GatewayChannelModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-delete
+ */
+export type GatewayThreadDeleteDispatchData = GatewayChannelModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#typing-start
+ */
+export type GatewayTypingStartDispatch = DataPayload<GatewayDispatchEvents.TypingStart, GatewayTypingStartDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#typing-start
+ */
+export interface GatewayTypingStartDispatchData {
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+ /**
+ * The id of the user
+ */
+ user_id: Snowflake;
+ /**
+ * Unix time (in seconds) of when the user started typing
+ */
+ timestamp: number;
+ /**
+ * The member who started typing if this happened in a guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ member?: APIGuildMember;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#user-update
+ */
+export type GatewayUserUpdateDispatch = DataPayload<GatewayDispatchEvents.UserUpdate, GatewayUserUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#user-update
+ */
+export type GatewayUserUpdateDispatchData = APIUser;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#voice-state-update
+ */
+export type GatewayVoiceStateUpdateDispatch = DataPayload<GatewayDispatchEvents.VoiceStateUpdate, GatewayVoiceStateUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#voice-state-update
+ */
+export type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#voice-server-update
+ */
+export type GatewayVoiceServerUpdateDispatch = DataPayload<GatewayDispatchEvents.VoiceServerUpdate, GatewayVoiceServerUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#voice-server-update
+ */
+export interface GatewayVoiceServerUpdateDispatchData {
+ /**
+ * Voice connection token
+ */
+ token: string;
+ /**
+ * The guild this voice server update is for
+ */
+ guild_id: Snowflake;
+ /**
+ * The voice server host
+ *
+ * A `null` endpoint means that the voice server allocated has gone away and is trying to be reallocated.
+ * You should attempt to disconnect from the currently connected voice server, and not attempt to reconnect
+ * until a new voice server is allocated
+ */
+ endpoint: string | null;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#webhooks-update
+ */
+export type GatewayWebhooksUpdateDispatch = DataPayload<GatewayDispatchEvents.WebhooksUpdate, GatewayWebhooksUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#webhooks-update
+ */
+export interface GatewayWebhooksUpdateDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
+ */
+export type GatewayGuildAuditLogEntryCreateDispatch = DataPayload<GatewayDispatchEvents.GuildAuditLogEntryCreate, GatewayGuildAuditLogEntryCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
+ */
+export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLogEntry {
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#sending-heartbeats
+ */
+export interface GatewayHeartbeat {
+ op: GatewayOpcodes.Heartbeat;
+ d: GatewayHeartbeatData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#sending-heartbeats
+ */
+export type GatewayHeartbeatData = number | null;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#identify
+ */
+export interface GatewayIdentify {
+ op: GatewayOpcodes.Identify;
+ d: GatewayIdentifyData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#identify
+ */
+export interface GatewayIdentifyData {
+ /**
+ * Authentication token
+ */
+ token: string;
+ /**
+ * Connection properties
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#identify-identify-connection-properties
+ */
+ properties: GatewayIdentifyProperties;
+ /**
+ * Whether this connection supports compression of packets
+ *
+ * @default false
+ */
+ compress?: boolean;
+ /**
+ * Value between 50 and 250, total number of members where the gateway will stop sending
+ * offline members in the guild member list
+ *
+ * @default 50
+ */
+ large_threshold?: number;
+ /**
+ * Used for Guild Sharding
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ shard?: [shard_id: number, shard_count: number];
+ /**
+ * Presence structure for initial presence information
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#update-presence
+ */
+ presence?: GatewayPresenceUpdateData;
+ /**
+ * The Gateway Intents you wish to receive
+ *
+ * See https://discord.com/developers/docs/topics/gateway#gateway-intents
+ */
+ intents: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#identify-identify-connection-properties
+ */
+export interface GatewayIdentifyProperties {
+ /**
+ * Your operating system
+ */
+ os: string;
+ /**
+ * Your library name
+ */
+ browser: string;
+ /**
+ * Your library name
+ */
+ device: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#resume
+ */
+export interface GatewayResume {
+ op: GatewayOpcodes.Resume;
+ d: GatewayResumeData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#resume
+ */
+export interface GatewayResumeData {
+ /**
+ * Session token
+ */
+ token: string;
+ /**
+ * Session id
+ */
+ session_id: string;
+ /**
+ * Last sequence number received
+ */
+ seq: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#request-guild-members
+ */
+export interface GatewayRequestGuildMembers {
+ op: GatewayOpcodes.RequestGuildMembers;
+ d: GatewayRequestGuildMembersData;
+}
+export interface GatewayRequestGuildMembersDataBase {
+ /**
+ * ID of the guild to get members for
+ */
+ guild_id: Snowflake;
+ /**
+ * Used to specify if we want the presences of the matched members
+ */
+ presences?: boolean;
+ /**
+ * Nonce to identify the Guild Members Chunk response
+ *
+ * Nonce can only be up to 32 bytes. If you send an invalid nonce it will be ignored and the reply member_chunk(s) will not have a `nonce` set.
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk
+ */
+ nonce?: string;
+}
+export interface GatewayRequestGuildMembersDataWithUserIds extends GatewayRequestGuildMembersDataBase {
+ /**
+ * Used to specify which users you wish to fetch
+ */
+ user_ids: Snowflake | Snowflake[];
+}
+export interface GatewayRequestGuildMembersDataWithQuery extends GatewayRequestGuildMembersDataBase {
+ /**
+ * String that username starts with, or an empty string to return all members
+ */
+ query: string;
+ /**
+ * Maximum number of members to send matching the `query`;
+ * a limit of `0` can be used with an empty string `query` to return all members
+ */
+ limit: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#request-guild-members
+ */
+export type GatewayRequestGuildMembersData = GatewayRequestGuildMembersDataWithUserIds | GatewayRequestGuildMembersDataWithQuery;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#update-voice-state
+ */
+export interface GatewayVoiceStateUpdate {
+ op: GatewayOpcodes.VoiceStateUpdate;
+ d: GatewayVoiceStateUpdateData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#update-voice-state
+ */
+export interface GatewayVoiceStateUpdateData {
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * ID of the voice channel client wants to join (`null` if disconnecting)
+ */
+ channel_id: Snowflake | null;
+ /**
+ * Is the client muted
+ */
+ self_mute: boolean;
+ /**
+ * Is the client deafened
+ */
+ self_deaf: boolean;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#update-presence
+ */
+export interface GatewayUpdatePresence {
+ op: GatewayOpcodes.PresenceUpdate;
+ d: GatewayPresenceUpdateData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#update-presence-gateway-presence-update-structure
+ */
+export interface GatewayPresenceUpdateData {
+ /**
+ * Unix time (in milliseconds) of when the client went idle, or `null` if the client is not idle
+ */
+ since: number | null;
+ /**
+ * The user's activities
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#activity-object
+ */
+ activities: GatewayActivityUpdateData[];
+ /**
+ * The user's new status
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types
+ */
+ status: PresenceUpdateStatus;
+ /**
+ * Whether or not the client is afk
+ */
+ afk: boolean;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure
+ */
+export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'type' | 'url'>;
+interface BasePayload {
+ /**
+ * Opcode for the payload
+ */
+ op: GatewayOpcodes;
+ /**
+ * Event data
+ */
+ d?: unknown;
+ /**
+ * Sequence number, used for resuming sessions and heartbeats
+ */
+ s: number;
+ /**
+ * The event name for this payload
+ */
+ t?: string;
+}
+type NonDispatchPayload = Omit<BasePayload, 't' | 's'> & {
+ t: null;
+ s: null;
+};
+interface DataPayload<Event extends GatewayDispatchEvents, D = unknown> extends BasePayload {
+ op: GatewayOpcodes.Dispatch;
+ t: Event;
+ d: D;
+}
+type ReactionData<E extends GatewayDispatchEvents, O extends string = never> = DataPayload<E, Omit<{
+ /**
+ * The id of the user
+ */
+ user_id: Snowflake;
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The id of the message
+ */
+ message_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+ /**
+ * The member who reacted if this happened in a guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ member?: APIGuildMember;
+ /**
+ * The emoji used to react
+ *
+ * See https://discord.com/developers/docs/resources/emoji#emoji-object
+ */
+ emoji: APIEmoji;
+ /**
+ * The id of the user that posted the message that was reacted to
+ */
+ message_author_id?: Snowflake;
+}, O>>;
+interface MessageReactionRemoveData {
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The id of the message
+ */
+ message_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+}
+//# sourceMappingURL=v10.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/v10.d.ts.map b/node_modules/discord-api-types/gateway/v10.d.ts.map
new file mode 100644
index 0000000..2751a15
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v10.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"v10.d.ts","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,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IAChB;;OAEG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC;CAC9B,EACD,CAAC,CACD,CACD,CAAC;AAEF,UAAU,yBAAyB;IAClC;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/v10.js b/node_modules/discord-api-types/gateway/v10.js
new file mode 100644
index 0000000..fe9129a
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v10.js
@@ -0,0 +1,254 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/gateway
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0;
+__exportStar(require("./common"), exports);
+exports.GatewayVersion = '10';
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
+ */
+var GatewayOpcodes;
+(function (GatewayOpcodes) {
+ /**
+ * An event was dispatched
+ */
+ GatewayOpcodes[GatewayOpcodes["Dispatch"] = 0] = "Dispatch";
+ /**
+ * A bidirectional opcode to maintain an active gateway connection.
+ * Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client.
+ */
+ GatewayOpcodes[GatewayOpcodes["Heartbeat"] = 1] = "Heartbeat";
+ /**
+ * Starts a new session during the initial handshake
+ */
+ GatewayOpcodes[GatewayOpcodes["Identify"] = 2] = "Identify";
+ /**
+ * Update the client's presence
+ */
+ GatewayOpcodes[GatewayOpcodes["PresenceUpdate"] = 3] = "PresenceUpdate";
+ /**
+ * Used to join/leave or move between voice channels
+ */
+ GatewayOpcodes[GatewayOpcodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate";
+ /**
+ * Resume a previous session that was disconnected
+ */
+ GatewayOpcodes[GatewayOpcodes["Resume"] = 6] = "Resume";
+ /**
+ * You should attempt to reconnect and resume immediately
+ */
+ GatewayOpcodes[GatewayOpcodes["Reconnect"] = 7] = "Reconnect";
+ /**
+ * Request information about offline guild members in a large guild
+ */
+ GatewayOpcodes[GatewayOpcodes["RequestGuildMembers"] = 8] = "RequestGuildMembers";
+ /**
+ * The session has been invalidated. You should reconnect and identify/resume accordingly
+ */
+ GatewayOpcodes[GatewayOpcodes["InvalidSession"] = 9] = "InvalidSession";
+ /**
+ * Sent immediately after connecting, contains the `heartbeat_interval` to use
+ */
+ GatewayOpcodes[GatewayOpcodes["Hello"] = 10] = "Hello";
+ /**
+ * Sent in response to receiving a heartbeat to acknowledge that it has been received
+ */
+ GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck";
+})(GatewayOpcodes = exports.GatewayOpcodes || (exports.GatewayOpcodes = {}));
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
+ */
+var GatewayCloseCodes;
+(function (GatewayCloseCodes) {
+ /**
+ * We're not sure what went wrong. Try reconnecting?
+ */
+ GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError";
+ /**
+ * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that!
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#payload-structure
+ */
+ GatewayCloseCodes[GatewayCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode";
+ /**
+ * You sent an invalid payload to us. Don't do that!
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sending-events
+ */
+ GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError";
+ /**
+ * You sent us a payload prior to identifying
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#identify
+ */
+ GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
+ /**
+ * The account token sent with your identify payload is incorrect
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#identify
+ */
+ GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed";
+ /**
+ * You sent more than one identify payload. Don't do that!
+ */
+ GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated";
+ /**
+ * The sequence sent when resuming the session was invalid. Reconnect and start a new session
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#resume
+ */
+ GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq";
+ /**
+ * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this
+ */
+ GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited";
+ /**
+ * Your session timed out. Reconnect and start a new one
+ */
+ GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut";
+ /**
+ * You sent us an invalid shard when identifying
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard";
+ /**
+ * The session would have handled too many guilds - you are required to shard your connection in order to connect
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired";
+ /**
+ * You sent an invalid version for the gateway
+ */
+ GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion";
+ /**
+ * You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value
+ *
+ * See https://discord.com/developers/docs/topics/gateway#gateway-intents
+ */
+ GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents";
+ /**
+ * You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not
+ * enabled or are not whitelisted for
+ *
+ * See https://discord.com/developers/docs/topics/gateway#gateway-intents
+ *
+ * See https://discord.com/developers/docs/topics/gateway#privileged-intents
+ */
+ GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents";
+})(GatewayCloseCodes = exports.GatewayCloseCodes || (exports.GatewayCloseCodes = {}));
+/**
+ * https://discord.com/developers/docs/topics/gateway#list-of-intents
+ */
+var GatewayIntentBits;
+(function (GatewayIntentBits) {
+ GatewayIntentBits[GatewayIntentBits["Guilds"] = 1] = "Guilds";
+ GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers";
+ GatewayIntentBits[GatewayIntentBits["GuildModeration"] = 4] = "GuildModeration";
+ /**
+ * @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration}
+ */
+ GatewayIntentBits[GatewayIntentBits["GuildBans"] = 4] = "GuildBans";
+ GatewayIntentBits[GatewayIntentBits["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers";
+ GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations";
+ GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks";
+ GatewayIntentBits[GatewayIntentBits["GuildInvites"] = 64] = "GuildInvites";
+ GatewayIntentBits[GatewayIntentBits["GuildVoiceStates"] = 128] = "GuildVoiceStates";
+ GatewayIntentBits[GatewayIntentBits["GuildPresences"] = 256] = "GuildPresences";
+ GatewayIntentBits[GatewayIntentBits["GuildMessages"] = 512] = "GuildMessages";
+ GatewayIntentBits[GatewayIntentBits["GuildMessageReactions"] = 1024] = "GuildMessageReactions";
+ GatewayIntentBits[GatewayIntentBits["GuildMessageTyping"] = 2048] = "GuildMessageTyping";
+ GatewayIntentBits[GatewayIntentBits["DirectMessages"] = 4096] = "DirectMessages";
+ GatewayIntentBits[GatewayIntentBits["DirectMessageReactions"] = 8192] = "DirectMessageReactions";
+ GatewayIntentBits[GatewayIntentBits["DirectMessageTyping"] = 16384] = "DirectMessageTyping";
+ GatewayIntentBits[GatewayIntentBits["MessageContent"] = 32768] = "MessageContent";
+ GatewayIntentBits[GatewayIntentBits["GuildScheduledEvents"] = 65536] = "GuildScheduledEvents";
+ GatewayIntentBits[GatewayIntentBits["AutoModerationConfiguration"] = 1048576] = "AutoModerationConfiguration";
+ GatewayIntentBits[GatewayIntentBits["AutoModerationExecution"] = 2097152] = "AutoModerationExecution";
+})(GatewayIntentBits = exports.GatewayIntentBits || (exports.GatewayIntentBits = {}));
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#receive-events
+ */
+var GatewayDispatchEvents;
+(function (GatewayDispatchEvents) {
+ GatewayDispatchEvents["ApplicationCommandPermissionsUpdate"] = "APPLICATION_COMMAND_PERMISSIONS_UPDATE";
+ GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE";
+ GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE";
+ GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
+ GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
+ GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD";
+ GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE";
+ GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE";
+ GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE";
+ GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE";
+ GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE";
+ GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD";
+ GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE";
+ GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK";
+ GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE";
+ GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE";
+ GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE";
+ GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE";
+ GatewayDispatchEvents["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE";
+ GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE";
+ GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE";
+ GatewayDispatchEvents["IntegrationDelete"] = "INTEGRATION_DELETE";
+ GatewayDispatchEvents["IntegrationUpdate"] = "INTEGRATION_UPDATE";
+ GatewayDispatchEvents["InteractionCreate"] = "INTERACTION_CREATE";
+ GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE";
+ GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE";
+ GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE";
+ GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE";
+ GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK";
+ GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD";
+ GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE";
+ GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL";
+ GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI";
+ GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE";
+ GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE";
+ GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE";
+ GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE";
+ GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE";
+ GatewayDispatchEvents["Ready"] = "READY";
+ GatewayDispatchEvents["Resumed"] = "RESUMED";
+ GatewayDispatchEvents["ThreadCreate"] = "THREAD_CREATE";
+ GatewayDispatchEvents["ThreadDelete"] = "THREAD_DELETE";
+ GatewayDispatchEvents["ThreadListSync"] = "THREAD_LIST_SYNC";
+ GatewayDispatchEvents["ThreadMembersUpdate"] = "THREAD_MEMBERS_UPDATE";
+ GatewayDispatchEvents["ThreadMemberUpdate"] = "THREAD_MEMBER_UPDATE";
+ GatewayDispatchEvents["ThreadUpdate"] = "THREAD_UPDATE";
+ GatewayDispatchEvents["TypingStart"] = "TYPING_START";
+ GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE";
+ GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
+ GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
+ GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
+ GatewayDispatchEvents["GuildScheduledEventCreate"] = "GUILD_SCHEDULED_EVENT_CREATE";
+ GatewayDispatchEvents["GuildScheduledEventUpdate"] = "GUILD_SCHEDULED_EVENT_UPDATE";
+ GatewayDispatchEvents["GuildScheduledEventDelete"] = "GUILD_SCHEDULED_EVENT_DELETE";
+ GatewayDispatchEvents["GuildScheduledEventUserAdd"] = "GUILD_SCHEDULED_EVENT_USER_ADD";
+ GatewayDispatchEvents["GuildScheduledEventUserRemove"] = "GUILD_SCHEDULED_EVENT_USER_REMOVE";
+ GatewayDispatchEvents["AutoModerationRuleCreate"] = "AUTO_MODERATION_RULE_CREATE";
+ GatewayDispatchEvents["AutoModerationRuleUpdate"] = "AUTO_MODERATION_RULE_UPDATE";
+ GatewayDispatchEvents["AutoModerationRuleDelete"] = "AUTO_MODERATION_RULE_DELETE";
+ GatewayDispatchEvents["AutoModerationActionExecution"] = "AUTO_MODERATION_ACTION_EXECUTION";
+ GatewayDispatchEvents["GuildAuditLogEntryCreate"] = "GUILD_AUDIT_LOG_ENTRY_CREATE";
+})(GatewayDispatchEvents = exports.GatewayDispatchEvents || (exports.GatewayDispatchEvents = {}));
+// #endregion Shared
+//# sourceMappingURL=v10.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/v10.js.map b/node_modules/discord-api-types/gateway/v10.js.map
new file mode 100644
index 0000000..062eab4
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v10.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"v10.js","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;AAoCH,2CAAyB;AAEZ,QAAA,cAAc,GAAG,IAAI,CAAC;AAEnC;;GAEG;AACH,IAAY,cA8CX;AA9CD,WAAY,cAAc;IACzB;;OAEG;IACH,2DAAQ,CAAA;IACR;;;OAGG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,2EAAgB,CAAA;IAChB;;OAEG;IACH,uDAAU,CAAA;IACV;;OAEG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,iFAAmB,CAAA;IACnB;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,sDAAK,CAAA;IACL;;OAEG;IACH,oEAAY,CAAA;AACb,CAAC,EA9CW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QA8CzB;AAED;;GAEG;AACH,IAAY,iBA8EX;AA9ED,WAAY,iBAAiB;IAC5B;;OAEG;IACH,4EAAoB,CAAA;IACpB;;;;OAIG;IACH,8EAAa,CAAA;IACb;;;;OAIG;IACH,0EAAW,CAAA;IACX;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yC,CAAA;IACzC,8EAAqD,CAAA;IACrD,4DAAmC,CAAA;IACnC,kEAAyC,CAAA;IACzC,kEAAyC,CAAA;IACzC,kEAAyC,CAAA;IACzC,8DAAqC,CAAA;IACrC,8DAAqC,CAAA;IACrC,8DAAqC,CAAA;IACrC,sEAA6C,CAAA;IAC7C,qDAA4B,CAAA;IAC5B,iEAAwC,CAAA;IACxC,iEAAwC,CAAA;IACxC,iEAAwC,CAAA;IACxC,iEAAwC,CAAA;IACxC,uDAA8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,kEAAyC,CAAA;IACzC,oEAA2C,CAAA;IAC3C,0EAAiD,CAAA;IACjD,iFAAwD,CAAA;IACxD,qFAA4D,CAAA;IAC5D,yDAAgC,CAAA;IAChC,2DAAkC,CAAA;IAClC,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,wCAAe,CAAA;IACf,4CAAmB,CAAA;IACnB,uDAA8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,4DAAmC,CAAA;IACnC,sEAA6C,CAAA;IAC7C,oEAA2C,CAAA;IAC3C,uDAA8B,CAAA;IAC9B,qDAA4B,CAAA;IAC5B,mDAA0B,CAAA;IAC1B,kEAAyC,CAAA;IACzC,gEAAuC,CAAA;IACvC,2DAAkC,CAAA;IAClC,mFAA0D,CAAA;IAC1D,mFAA0D,CAAA;IAC1D,mFAA0D,CAAA;IAC1D,sFAA6D,CAAA;IAC7D,4FAAmE,CAAA;IACnE,iFAAwD,CAAA;IACxD,iFAAwD,CAAA;IACxD,iFAAwD,CAAA;IACxD,2FAAkE,CAAA;IAClE,kFAAyD,CAAA;AAC1D,CAAC,EA9DW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QA8DhC;AAsvDD,oBAAoB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/v10.mjs b/node_modules/discord-api-types/gateway/v10.mjs
new file mode 100644
index 0000000..0ee554f
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v10.mjs
@@ -0,0 +1,8 @@
+import mod from "./v10.js";
+
+export default mod;
+export const GatewayCloseCodes = mod.GatewayCloseCodes;
+export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
+export const GatewayIntentBits = mod.GatewayIntentBits;
+export const GatewayOpcodes = mod.GatewayOpcodes;
+export const GatewayVersion = mod.GatewayVersion;
diff --git a/node_modules/discord-api-types/gateway/v6.d.ts b/node_modules/discord-api-types/gateway/v6.d.ts
new file mode 100644
index 0000000..18b38d7
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v6.d.ts
@@ -0,0 +1,658 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/gateway
+ */
+import type { APIChannel, APIEmoji, APIGuild, APIGuildMember, APIMessage, APIRole, APIUnavailableGuild, APIUser, GatewayActivity, GatewayPresenceUpdate as RawGatewayPresenceUpdate, GatewayVoiceState, InviteTargetUserType, PresenceUpdateStatus } from '../payloads/v6/index';
+export * from './common';
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare const GatewayVersion = "6";
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum GatewayOPCodes {
+ Dispatch = 0,
+ Heartbeat = 1,
+ Identify = 2,
+ PresenceUpdate = 3,
+ VoiceStateUpdate = 4,
+ Resume = 6,
+ Reconnect = 7,
+ RequestGuildMembers = 8,
+ InvalidSession = 9,
+ Hello = 10,
+ HeartbeatAck = 11
+}
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum GatewayCloseCodes {
+ UnknownError = 4000,
+ UnknownOpCode = 4001,
+ DecodeError = 4002,
+ NotAuthenticated = 4003,
+ AuthenticationFailed = 4004,
+ AlreadyAuthenticated = 4005,
+ InvalidSeq = 4007,
+ RateLimited = 4008,
+ SessionTimedOut = 4009,
+ InvalidShard = 4010,
+ ShardingRequired = 4011,
+ InvalidAPIVersion = 4012,
+ InvalidIntents = 4013,
+ DisallowedIntents = 4014
+}
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum VoiceOPCodes {
+ Identify = 0,
+ SelectProtocol = 1,
+ Ready = 2,
+ Heartbeat = 3,
+ SessionDescription = 4,
+ Speaking = 5,
+ HeartbeatAck = 6,
+ Resume = 7,
+ Hello = 8,
+ Resumed = 9,
+ ClientDisconnect = 13
+}
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum VoiceCloseCodes {
+ UnknownOpCode = 4001,
+ NotAuthenticated = 4003,
+ AuthenticationFailed = 4004,
+ AlreadyAuthenticated = 4005,
+ SessionNoLongerValid = 4006,
+ SessionTimeout = 4009,
+ ServerNotFound = 4011,
+ UnknownProtocol = 4012,
+ Disconnected = 4014,
+ VoiceServerCrashed = 4015,
+ UnknownEncryptionMode = 4016
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#list-of-intents
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum GatewayIntentBits {
+ GUILDS = 1,
+ GUILD_MEMBERS = 2,
+ GUILD_BANS = 4,
+ GUILD_EMOJIS = 8,
+ GUILD_INTEGRATIONS = 16,
+ GUILD_WEBHOOKS = 32,
+ GUILD_INVITES = 64,
+ GUILD_VOICE_STATES = 128,
+ GUILD_PRESENCES = 256,
+ GUILD_MESSAGES = 512,
+ GUILD_MESSAGE_REACTIONS = 1024,
+ GUILD_MESSAGE_TYPING = 2048,
+ DIRECT_MESSAGES = 4096,
+ DIRECT_MESSAGE_REACTIONS = 8192,
+ DIRECT_MESSAGE_TYPING = 16384
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum GatewayDispatchEvents {
+ Ready = "READY",
+ Resumed = "RESUMED",
+ ChannelCreate = "CHANNEL_CREATE",
+ ChannelUpdate = "CHANNEL_UPDATE",
+ ChannelDelete = "CHANNEL_DELETE",
+ ChannelPinsUpdate = "CHANNEL_PINS_UPDATE",
+ GuildCreate = "GUILD_CREATE",
+ GuildUpdate = "GUILD_UPDATE",
+ GuildDelete = "GUILD_DELETE",
+ GuildBanAdd = "GUILD_BAN_ADD",
+ GuildBanRemove = "GUILD_BAN_REMOVE",
+ GuildEmojisUpdate = "GUILD_EMOJIS_UPDATE",
+ GuildIntegrationsUpdate = "GUILD_INTEGRATIONS_UPDATE",
+ GuildMemberAdd = "GUILD_MEMBER_ADD",
+ GuildMemberRemove = "GUILD_MEMBER_REMOVE",
+ GuildMemberUpdate = "GUILD_MEMBER_UPDATE",
+ GuildMembersChunk = "GUILD_MEMBERS_CHUNK",
+ GuildRoleCreate = "GUILD_ROLE_CREATE",
+ GuildRoleUpdate = "GUILD_ROLE_UPDATE",
+ GuildRoleDelete = "GUILD_ROLE_DELETE",
+ InviteCreate = "INVITE_CREATE",
+ InviteDelete = "INVITE_DELETE",
+ MessageCreate = "MESSAGE_CREATE",
+ MessageUpdate = "MESSAGE_UPDATE",
+ MessageDelete = "MESSAGE_DELETE",
+ MessageDeleteBulk = "MESSAGE_DELETE_BULK",
+ MessageReactionAdd = "MESSAGE_REACTION_ADD",
+ MessageReactionRemove = "MESSAGE_REACTION_REMOVE",
+ MessageReactionRemoveAll = "MESSAGE_REACTION_REMOVE_ALL",
+ MessageReactionRemoveEmoji = "MESSAGE_REACTION_REMOVE_EMOJI",
+ PresenceUpdate = "PRESENCE_UPDATE",
+ TypingStart = "TYPING_START",
+ UserUpdate = "USER_UPDATE",
+ VoiceStateUpdate = "VOICE_STATE_UPDATE",
+ VoiceServerUpdate = "VOICE_SERVER_UPDATE",
+ WebhooksUpdate = "WEBHOOKS_UPDATE"
+}
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewaySendPayload = GatewayHeartbeat | GatewayIdentify | GatewayUpdatePresence | GatewayVoiceStateUpdate | GatewayResume | GatewayRequestGuildMembers;
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayReceivePayload = GatewayHello | GatewayHeartbeatRequest | GatewayHeartbeatAck | GatewayInvalidSession | GatewayReconnect | GatewayDispatchPayload;
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayDispatchPayload = GatewayReadyDispatch | GatewayResumedDispatch | GatewayChannelModifyDispatch | GatewayChannelPinsUpdateDispatch | GatewayGuildModifyDispatch | GatewayGuildDeleteDispatch | GatewayGuildBanModifyDispatch | GatewayGuildEmojisUpdateDispatch | GatewayGuildIntegrationsUpdateDispatch | GatewayGuildMemberAddDispatch | GatewayGuildMemberRemoveDispatch | GatewayGuildMemberUpdateDispatch | GatewayGuildMembersChunkDispatch | GatewayGuildRoleModifyDispatch | GatewayGuildRoleDeleteDispatch | GatewayInviteCreateDispatch | GatewayInviteDeleteDispatch | GatewayMessageCreateDispatch | GatewayMessageUpdateDispatch | GatewayMessageDeleteDispatch | GatewayMessageDeleteBulkDispatch | GatewayMessageReactionAddDispatch | GatewayMessageReactionRemoveDispatch | GatewayMessageReactionRemoveAllDispatch | GatewayMessageReactionRemoveEmojiDispatch | GatewayPresenceUpdateDispatch | GatewayTypingStartDispatch | GatewayUserUpdateDispatch | GatewayVoiceStateUpdateDispatch | GatewayVoiceServerUpdateDispatch | GatewayWebhooksUpdateDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway#hello
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayHello extends NonDispatchPayload {
+ op: GatewayOPCodes.Hello;
+ d: {
+ heartbeat_interval: number;
+ };
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#heartbeating
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayHeartbeatRequest extends NonDispatchPayload {
+ op: GatewayOPCodes.Heartbeat;
+ d: never;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#heartbeating-example-gateway-heartbeat-ack
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayHeartbeatAck extends NonDispatchPayload {
+ op: GatewayOPCodes.HeartbeatAck;
+ d: never;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#invalid-session
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayInvalidSession extends NonDispatchPayload {
+ op: GatewayOPCodes.InvalidSession;
+ d: boolean;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#reconnect
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayReconnect extends NonDispatchPayload {
+ op: GatewayOPCodes.Reconnect;
+ d: never;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#ready
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayReadyDispatch = DataPayload<GatewayDispatchEvents.Ready, {
+ v: number;
+ user: APIUser;
+ session_id: string;
+ private_channels: [];
+ guilds: APIUnavailableGuild[];
+ shard?: [number, number];
+}>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#resumed
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed, never>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#channel-create
+ * https://discord.com/developers/docs/topics/gateway#channel-update
+ * https://discord.com/developers/docs/topics/gateway#channel-delete
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayChannelModifyDispatch = DataPayload<GatewayDispatchEvents.ChannelCreate | GatewayDispatchEvents.ChannelDelete | GatewayDispatchEvents.ChannelUpdate, APIChannel>;
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway#channel-pins-update
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayChannelPinsUpdateDispatch = DataPayload<GatewayDispatchEvents.ChannelPinsUpdate, {
+ guild_id?: string;
+ channel_id: string;
+ last_pin_timestamp?: string;
+}>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-create
+ * https://discord.com/developers/docs/topics/gateway#guild-update
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayGuildModifyDispatch = DataPayload<GatewayDispatchEvents.GuildCreate | GatewayDispatchEvents.GuildUpdate, APIGuild>;
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayGuildCreateDispatch = GatewayGuildModifyDispatch;
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayGuildUpdateDispatch = GatewayGuildModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-delete
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayGuildDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildDelete, APIUnavailableGuild>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-ban-add
+ * https://discord.com/developers/docs/topics/gateway#guild-ban-remove
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayGuildBanModifyDispatch = DataPayload<GatewayDispatchEvents.GuildBanAdd | GatewayDispatchEvents.GuildBanRemove, {
+ guild_id: string;
+ user: APIUser;
+}>;
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-emojis-update
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayGuildEmojisUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildEmojisUpdate, {
+ guild_id: string;
+ emojis: APIEmoji[];
+}>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-integrations-update
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayGuildIntegrationsUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildIntegrationsUpdate, {
+ guild_id: string;
+}>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-member-add
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayGuildMemberAddDispatch = DataPayload<GatewayDispatchEvents.GuildMemberAdd, APIGuildMember & {
+ guild_id: string;
+}>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-member-remove
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayGuildMemberRemoveDispatch = DataPayload<GatewayDispatchEvents.GuildMemberRemove, {
+ guild_id: string;
+ user: APIUser;
+}>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-member-update
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayGuildMemberUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildMemberUpdate, Omit<APIGuildMember, 'deaf' | 'mute'> & {
+ guild_id: string;
+}>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-members-chunk
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayGuildMembersChunkDispatch = DataPayload<GatewayDispatchEvents.GuildMembersChunk, {
+ guild_id: string;
+ members: APIGuildMember[];
+ chunk_index?: number;
+ chunk_count?: number;
+ not_found?: unknown[];
+ presences?: RawGatewayPresenceUpdate[];
+ nonce?: string;
+}>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-role-create
+ * https://discord.com/developers/docs/topics/gateway#guild-role-update
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayGuildRoleModifyDispatch = DataPayload<GatewayDispatchEvents.GuildRoleCreate | GatewayDispatchEvents.GuildRoleUpdate, {
+ guild_id: string;
+ role: APIRole;
+}>;
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-role-delete
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayGuildRoleDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildRoleDelete, {
+ guild_id: string;
+ role_id: string;
+}>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#invite-create
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayInviteCreateDispatch = DataPayload<GatewayDispatchEvents.InviteCreate, {
+ channel_id: string;
+ code: string;
+ created_at: number;
+ guild_id?: string;
+ inviter?: APIUser;
+ max_age: number;
+ max_uses: number;
+ target_user?: APIUser;
+ target_user_type?: InviteTargetUserType;
+ temporary: boolean;
+ uses: 0;
+}>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#invite-delete
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayInviteDeleteDispatch = DataPayload<GatewayDispatchEvents.InviteDelete, {
+ channel_id: string;
+ guild_id?: string;
+ code: string;
+}>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-create
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayMessageCreateDispatch = DataPayload<GatewayDispatchEvents.MessageCreate, APIMessage>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-update
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayMessageUpdateDispatch = DataPayload<GatewayDispatchEvents.MessageUpdate, {
+ id: string;
+ channel_id: string;
+} & Partial<APIMessage>>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-delete
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayMessageDeleteDispatch = DataPayload<GatewayDispatchEvents.MessageDelete, {
+ id: string;
+ channel_id: string;
+ guild_id?: string;
+}>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-delete-bulk
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayMessageDeleteBulkDispatch = DataPayload<GatewayDispatchEvents.MessageDeleteBulk, {
+ ids: string[];
+ channel_id: string;
+ guild_id?: string;
+}>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-reaction-add
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayMessageReactionAddDispatch = ReactionData<GatewayDispatchEvents.MessageReactionAdd>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-reaction-remove
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayMessageReactionRemoveDispatch = ReactionData<GatewayDispatchEvents.MessageReactionRemove, 'member'>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayMessageReactionRemoveAllDispatch = DataPayload<GatewayDispatchEvents.MessageReactionRemoveAll, MessageReactionRemoveData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayMessageReactionRemoveEmojiDispatch = DataPayload<GatewayDispatchEvents.MessageReactionRemoveEmoji, MessageReactionRemoveData & {
+ emoji: APIEmoji;
+}>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#presence-update
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayPresenceUpdateDispatch = DataPayload<GatewayDispatchEvents.PresenceUpdate, RawGatewayPresenceUpdate>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#typing-start
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayTypingStartDispatch = DataPayload<GatewayDispatchEvents.TypingStart, {
+ channel_id: string;
+ guild_id?: string;
+ user_id: string;
+ timestamp: number;
+ member?: APIGuildMember;
+}>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#user-update
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayUserUpdateDispatch = DataPayload<GatewayDispatchEvents.UserUpdate, APIUser>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#voice-state-update
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayVoiceStateUpdateDispatch = DataPayload<GatewayDispatchEvents.VoiceStateUpdate, GatewayVoiceState>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#voice-server-update
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayVoiceServerUpdateDispatch = DataPayload<GatewayDispatchEvents.VoiceServerUpdate, {
+ token: string;
+ guild_id: string;
+ endpoint: string;
+}>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#webhooks-update
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayWebhooksUpdateDispatch = DataPayload<GatewayDispatchEvents.WebhooksUpdate, {
+ guild_id: string;
+ channel_id: string;
+}>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#heartbeating
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayHeartbeat {
+ op: GatewayOPCodes.Heartbeat;
+ d: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayIdentifyProperties {
+ $os: string;
+ $browser: string;
+ $device: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#identify
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayIdentify {
+ op: GatewayOPCodes.Identify;
+ d: {
+ token: string;
+ properties: GatewayIdentifyProperties;
+ compress?: boolean;
+ large_threshold?: number;
+ shard?: [shard_id: number, shard_count: number];
+ presence?: RawGatewayPresenceUpdate;
+ guild_subscriptions?: boolean;
+ intents?: number;
+ };
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#resume
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayResume {
+ op: GatewayOPCodes.Resume;
+ d: {
+ token: string;
+ session_id: string;
+ seq: number;
+ };
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#request-guild-members
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayRequestGuildMembers {
+ op: GatewayOPCodes.RequestGuildMembers;
+ d: {
+ guild_id: string | string[];
+ query?: string;
+ limit: number;
+ presences?: boolean;
+ user_ids?: string | string[];
+ nonce?: string;
+ };
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#update-voice-state
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayVoiceStateUpdate {
+ op: GatewayOPCodes.VoiceStateUpdate;
+ d: {
+ guild_id: string;
+ channel_id: string | null;
+ self_mute: boolean;
+ self_deaf: boolean;
+ };
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#update-status
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayUpdatePresence {
+ op: GatewayOPCodes.PresenceUpdate;
+ d: GatewayPresenceUpdateData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#update-status-gateway-status-update-structure
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayPresenceUpdateData {
+ since: number | null;
+ game: GatewayActivity | null;
+ status: PresenceUpdateStatus;
+ afk: boolean;
+}
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+interface BasePayload {
+ op: GatewayOPCodes;
+ s: number;
+ d?: unknown;
+ t?: string;
+}
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+type NonDispatchPayload = Omit<BasePayload, 't'>;
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+interface DataPayload<Event extends GatewayDispatchEvents, D = unknown> extends BasePayload {
+ op: GatewayOPCodes.Dispatch;
+ t: Event;
+ d: D;
+}
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+type ReactionData<E extends GatewayDispatchEvents, O extends string = never> = DataPayload<E, Omit<{
+ user_id: string;
+ channel_id: string;
+ message_id: string;
+ guild_id?: string;
+ member?: APIGuildMember;
+ emoji: APIEmoji;
+}, O>>;
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+interface MessageReactionRemoveData {
+ channel_id: string;
+ message_id: string;
+ guild_id?: string;
+}
+//# sourceMappingURL=v6.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/v6.d.ts.map b/node_modules/discord-api-types/gateway/v6.d.ts.map
new file mode 100644
index 0000000..ebed81a
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v6.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"v6.d.ts","sourceRoot":"","sources":["v6.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACX,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,UAAU,EACV,OAAO,EACP,mBAAmB,EACnB,OAAO,EACP,eAAe,EACf,qBAAqB,IAAI,wBAAwB,EACjD,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,MAAM,sBAAsB,CAAC;AAE9B,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC;;;;GAIG;AACH,oBAAY,cAAc;IACzB,QAAQ,IAAA;IACR,SAAS,IAAA;IACT,QAAQ,IAAA;IACR,cAAc,IAAA;IACd,gBAAgB,IAAA;IAEhB,MAAM,IAAI;IACV,SAAS,IAAA;IACT,mBAAmB,IAAA;IACnB,cAAc,IAAA;IACd,KAAK,KAAA;IACL,YAAY,KAAA;CACZ;AAED;;;;GAIG;AACH,oBAAY,iBAAiB;IAC5B,YAAY,OAAQ;IACpB,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,yBAAyB;IACzC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,oBAAoB,CAAC;IAC7B,GAAG,EAAE,OAAO,CAAC;CACb;AAKD;;GAEG;AACH,UAAU,WAAW;IACpB,EAAE,EAAE,cAAc,CAAC;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,OAAO,CAAC;IACZ,CAAC,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;GAEG;AACH,KAAK,kBAAkB,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;AAEjD;;GAEG;AACH,UAAU,WAAW,CAAC,KAAK,SAAS,qBAAqB,EAAE,CAAC,GAAG,OAAO,CAAE,SAAQ,WAAW;IAC1F,EAAE,EAAE,cAAc,CAAC,QAAQ,CAAC;IAC5B,CAAC,EAAE,KAAK,CAAC;IACT,CAAC,EAAE,CAAC,CAAC;CACL;AAED;;GAEG;AACH,KAAK,YAAY,CAAC,CAAC,SAAS,qBAAqB,EAAE,CAAC,SAAS,MAAM,GAAG,KAAK,IAAI,WAAW,CACzF,CAAC,EACD,IAAI,CACH;IACC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,QAAQ,CAAC;CAChB,EACD,CAAC,CACD,CACD,CAAC;AAEF;;GAEG;AACH,UAAU,yBAAyB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/v6.js b/node_modules/discord-api-types/gateway/v6.js
new file mode 100644
index 0000000..51cedc9
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v6.js
@@ -0,0 +1,173 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/gateway
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.VoiceCloseCodes = exports.VoiceOPCodes = exports.GatewayCloseCodes = exports.GatewayOPCodes = exports.GatewayVersion = void 0;
+__exportStar(require("./common"), exports);
+/**
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+exports.GatewayVersion = '6';
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+var GatewayOPCodes;
+(function (GatewayOPCodes) {
+ GatewayOPCodes[GatewayOPCodes["Dispatch"] = 0] = "Dispatch";
+ GatewayOPCodes[GatewayOPCodes["Heartbeat"] = 1] = "Heartbeat";
+ GatewayOPCodes[GatewayOPCodes["Identify"] = 2] = "Identify";
+ GatewayOPCodes[GatewayOPCodes["PresenceUpdate"] = 3] = "PresenceUpdate";
+ GatewayOPCodes[GatewayOPCodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate";
+ GatewayOPCodes[GatewayOPCodes["Resume"] = 6] = "Resume";
+ GatewayOPCodes[GatewayOPCodes["Reconnect"] = 7] = "Reconnect";
+ GatewayOPCodes[GatewayOPCodes["RequestGuildMembers"] = 8] = "RequestGuildMembers";
+ GatewayOPCodes[GatewayOPCodes["InvalidSession"] = 9] = "InvalidSession";
+ GatewayOPCodes[GatewayOPCodes["Hello"] = 10] = "Hello";
+ GatewayOPCodes[GatewayOPCodes["HeartbeatAck"] = 11] = "HeartbeatAck";
+})(GatewayOPCodes = exports.GatewayOPCodes || (exports.GatewayOPCodes = {}));
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+var GatewayCloseCodes;
+(function (GatewayCloseCodes) {
+ GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError";
+ GatewayCloseCodes[GatewayCloseCodes["UnknownOpCode"] = 4001] = "UnknownOpCode";
+ GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError";
+ GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
+ GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed";
+ GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated";
+ GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq";
+ GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited";
+ GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut";
+ GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard";
+ GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired";
+ GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion";
+ GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents";
+ GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents";
+})(GatewayCloseCodes = exports.GatewayCloseCodes || (exports.GatewayCloseCodes = {}));
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+var VoiceOPCodes;
+(function (VoiceOPCodes) {
+ VoiceOPCodes[VoiceOPCodes["Identify"] = 0] = "Identify";
+ VoiceOPCodes[VoiceOPCodes["SelectProtocol"] = 1] = "SelectProtocol";
+ VoiceOPCodes[VoiceOPCodes["Ready"] = 2] = "Ready";
+ VoiceOPCodes[VoiceOPCodes["Heartbeat"] = 3] = "Heartbeat";
+ VoiceOPCodes[VoiceOPCodes["SessionDescription"] = 4] = "SessionDescription";
+ VoiceOPCodes[VoiceOPCodes["Speaking"] = 5] = "Speaking";
+ VoiceOPCodes[VoiceOPCodes["HeartbeatAck"] = 6] = "HeartbeatAck";
+ VoiceOPCodes[VoiceOPCodes["Resume"] = 7] = "Resume";
+ VoiceOPCodes[VoiceOPCodes["Hello"] = 8] = "Hello";
+ VoiceOPCodes[VoiceOPCodes["Resumed"] = 9] = "Resumed";
+ VoiceOPCodes[VoiceOPCodes["ClientDisconnect"] = 13] = "ClientDisconnect";
+})(VoiceOPCodes = exports.VoiceOPCodes || (exports.VoiceOPCodes = {}));
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+var VoiceCloseCodes;
+(function (VoiceCloseCodes) {
+ VoiceCloseCodes[VoiceCloseCodes["UnknownOpCode"] = 4001] = "UnknownOpCode";
+ VoiceCloseCodes[VoiceCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
+ VoiceCloseCodes[VoiceCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed";
+ VoiceCloseCodes[VoiceCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated";
+ VoiceCloseCodes[VoiceCloseCodes["SessionNoLongerValid"] = 4006] = "SessionNoLongerValid";
+ VoiceCloseCodes[VoiceCloseCodes["SessionTimeout"] = 4009] = "SessionTimeout";
+ VoiceCloseCodes[VoiceCloseCodes["ServerNotFound"] = 4011] = "ServerNotFound";
+ VoiceCloseCodes[VoiceCloseCodes["UnknownProtocol"] = 4012] = "UnknownProtocol";
+ VoiceCloseCodes[VoiceCloseCodes["Disconnected"] = 4014] = "Disconnected";
+ VoiceCloseCodes[VoiceCloseCodes["VoiceServerCrashed"] = 4015] = "VoiceServerCrashed";
+ VoiceCloseCodes[VoiceCloseCodes["UnknownEncryptionMode"] = 4016] = "UnknownEncryptionMode";
+})(VoiceCloseCodes = exports.VoiceCloseCodes || (exports.VoiceCloseCodes = {}));
+/**
+ * https://discord.com/developers/docs/topics/gateway#list-of-intents
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+var GatewayIntentBits;
+(function (GatewayIntentBits) {
+ GatewayIntentBits[GatewayIntentBits["GUILDS"] = 1] = "GUILDS";
+ GatewayIntentBits[GatewayIntentBits["GUILD_MEMBERS"] = 2] = "GUILD_MEMBERS";
+ GatewayIntentBits[GatewayIntentBits["GUILD_BANS"] = 4] = "GUILD_BANS";
+ GatewayIntentBits[GatewayIntentBits["GUILD_EMOJIS"] = 8] = "GUILD_EMOJIS";
+ GatewayIntentBits[GatewayIntentBits["GUILD_INTEGRATIONS"] = 16] = "GUILD_INTEGRATIONS";
+ GatewayIntentBits[GatewayIntentBits["GUILD_WEBHOOKS"] = 32] = "GUILD_WEBHOOKS";
+ GatewayIntentBits[GatewayIntentBits["GUILD_INVITES"] = 64] = "GUILD_INVITES";
+ GatewayIntentBits[GatewayIntentBits["GUILD_VOICE_STATES"] = 128] = "GUILD_VOICE_STATES";
+ GatewayIntentBits[GatewayIntentBits["GUILD_PRESENCES"] = 256] = "GUILD_PRESENCES";
+ GatewayIntentBits[GatewayIntentBits["GUILD_MESSAGES"] = 512] = "GUILD_MESSAGES";
+ GatewayIntentBits[GatewayIntentBits["GUILD_MESSAGE_REACTIONS"] = 1024] = "GUILD_MESSAGE_REACTIONS";
+ GatewayIntentBits[GatewayIntentBits["GUILD_MESSAGE_TYPING"] = 2048] = "GUILD_MESSAGE_TYPING";
+ GatewayIntentBits[GatewayIntentBits["DIRECT_MESSAGES"] = 4096] = "DIRECT_MESSAGES";
+ GatewayIntentBits[GatewayIntentBits["DIRECT_MESSAGE_REACTIONS"] = 8192] = "DIRECT_MESSAGE_REACTIONS";
+ GatewayIntentBits[GatewayIntentBits["DIRECT_MESSAGE_TYPING"] = 16384] = "DIRECT_MESSAGE_TYPING";
+})(GatewayIntentBits = exports.GatewayIntentBits || (exports.GatewayIntentBits = {}));
+/**
+ * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
+ *
+ * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+var GatewayDispatchEvents;
+(function (GatewayDispatchEvents) {
+ GatewayDispatchEvents["Ready"] = "READY";
+ GatewayDispatchEvents["Resumed"] = "RESUMED";
+ GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE";
+ GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
+ GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE";
+ GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
+ GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE";
+ GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE";
+ GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE";
+ GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD";
+ GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE";
+ GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE";
+ GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE";
+ GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD";
+ GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE";
+ GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE";
+ GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK";
+ GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE";
+ GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE";
+ GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE";
+ GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE";
+ GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE";
+ GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE";
+ GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE";
+ GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE";
+ GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK";
+ GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD";
+ GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE";
+ GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL";
+ GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI";
+ GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE";
+ GatewayDispatchEvents["TypingStart"] = "TYPING_START";
+ GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE";
+ GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
+ GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
+ GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
+})(GatewayDispatchEvents = exports.GatewayDispatchEvents || (exports.GatewayDispatchEvents = {}));
+// #endregion Shared
+//# sourceMappingURL=v6.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/v6.js.map b/node_modules/discord-api-types/gateway/v6.js.map
new file mode 100644
index 0000000..b62d2be
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v6.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"v6.js","sourceRoot":"","sources":["v6.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;AAkBH,2CAAyB;AAEzB;;GAEG;AACU,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC;;;;GAIG;AACH,IAAY,cAaX;AAbD,WAAY,cAAc;IACzB,2DAAQ,CAAA;IACR,6DAAS,CAAA;IACT,2DAAQ,CAAA;IACR,uEAAc,CAAA;IACd,2EAAgB,CAAA;IAEhB,uDAAU,CAAA;IACV,6DAAS,CAAA;IACT,iFAAmB,CAAA;IACnB,uEAAc,CAAA;IACd,sDAAK,CAAA;IACL,oEAAY,CAAA;AACb,CAAC,EAbW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAazB;AAED;;;;GAIG;AACH,IAAY,iBAgBX;AAhBD,WAAY,iBAAiB;IAC5B,4EAAoB,CAAA;IACpB,8EAAa,CAAA;IACb,0EAAW,CAAA;IACX,oFAAgB,CAAA;IAChB,4FAAoB,CAAA;IACpB,4FAAoB,CAAA;IAEpB,wEAAkB,CAAA;IAClB,0EAAW,CAAA;IACX,kFAAe,CAAA;IACf,4EAAY,CAAA;IACZ,oFAAgB,CAAA;IAChB,sFAAiB,CAAA;IACjB,gFAAc,CAAA;IACd,sFAAiB,CAAA;AAClB,CAAC,EAhBW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAgB5B;AAED;;;;GAIG;AACH,IAAY,YAaX;AAbD,WAAY,YAAY;IACvB,uDAAQ,CAAA;IACR,mEAAc,CAAA;IACd,iDAAK,CAAA;IACL,yDAAS,CAAA;IACT,2EAAkB,CAAA;IAClB,u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,CAAA;IACzC,8EAAqD,CAAA;IACrD,4DAAmC,CAAA;IACnC,kEAAyC,CAAA;IACzC,kEAAyC,CAAA;IACzC,kEAAyC,CAAA;IACzC,8DAAqC,CAAA;IACrC,8DAAqC,CAAA;IACrC,8DAAqC,CAAA;IACrC,uDAA8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,kEAAyC,CAAA;IACzC,oEAA2C,CAAA;IAC3C,0EAAiD,CAAA;IACjD,iFAAwD,CAAA;IACxD,qFAA4D,CAAA;IAC5D,2DAAkC,CAAA;IAClC,qDAA4B,CAAA;IAC5B,mDAA0B,CAAA;IAC1B,gEAAuC,CAAA;IACvC,kEAAyC,CAAA;IACzC,2DAAkC,CAAA;AACnC,CAAC,EArCW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAqChC;AAmrBD,oBAAoB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/v6.mjs b/node_modules/discord-api-types/gateway/v6.mjs
new file mode 100644
index 0000000..848edfc
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v6.mjs
@@ -0,0 +1,10 @@
+import mod from "./v6.js";
+
+export default mod;
+export const GatewayCloseCodes = mod.GatewayCloseCodes;
+export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
+export const GatewayIntentBits = mod.GatewayIntentBits;
+export const GatewayOPCodes = mod.GatewayOPCodes;
+export const GatewayVersion = mod.GatewayVersion;
+export const VoiceCloseCodes = mod.VoiceCloseCodes;
+export const VoiceOPCodes = mod.VoiceOPCodes;
diff --git a/node_modules/discord-api-types/gateway/v8.d.ts b/node_modules/discord-api-types/gateway/v8.d.ts
new file mode 100644
index 0000000..0e7c10b
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v8.d.ts
@@ -0,0 +1,1575 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/gateway
+ */
+import type { Snowflake } from '../globals';
+import type { APIApplication, APIChannel, APIEmoji, APIGuild, APIGuildIntegration, APIGuildMember, APIGuildScheduledEvent, APIInteraction, APIMessage, APIRole, APIStageInstance, APISticker, APIUnavailableGuild, APIUser, GatewayActivity, GatewayPresenceUpdate as RawGatewayPresenceUpdate, GatewayVoiceState, InviteTargetType, PresenceUpdateStatus } from '../payloads/v8/index';
+import type { Nullable } from '../utils/internals';
+export * from './common';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare const GatewayVersion = "8";
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum GatewayOpcodes {
+ /**
+ * An event was dispatched
+ */
+ Dispatch = 0,
+ /**
+ * A bidirectional opcode to maintain an active gateway connection.
+ * Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client.
+ */
+ Heartbeat = 1,
+ /**
+ * Starts a new session during the initial handshake
+ */
+ Identify = 2,
+ /**
+ * Update the client's presence
+ */
+ PresenceUpdate = 3,
+ /**
+ * Used to join/leave or move between voice channels
+ */
+ VoiceStateUpdate = 4,
+ /**
+ * Resume a previous session that was disconnected
+ */
+ Resume = 6,
+ /**
+ * You should attempt to reconnect and resume immediately
+ */
+ Reconnect = 7,
+ /**
+ * Request information about offline guild members in a large guild
+ */
+ RequestGuildMembers = 8,
+ /**
+ * The session has been invalidated. You should reconnect and identify/resume accordingly
+ */
+ InvalidSession = 9,
+ /**
+ * Sent immediately after connecting, contains the `heartbeat_interval` to use
+ */
+ Hello = 10,
+ /**
+ * Sent in response to receiving a heartbeat to acknowledge that it has been received
+ */
+ HeartbeatAck = 11
+}
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum GatewayCloseCodes {
+ /**
+ * We're not sure what went wrong. Try reconnecting?
+ */
+ UnknownError = 4000,
+ /**
+ * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that!
+ *
+ * See https://discord.com/developers/docs/topics/gateway#payloads-and-opcodes
+ */
+ UnknownOpcode = 4001,
+ /**
+ * You sent an invalid payload to us. Don't do that!
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sending-payloads
+ */
+ DecodeError = 4002,
+ /**
+ * You sent us a payload prior to identifying
+ *
+ * See https://discord.com/developers/docs/topics/gateway#identify
+ */
+ NotAuthenticated = 4003,
+ /**
+ * The account token sent with your identify payload is incorrect
+ *
+ * See https://discord.com/developers/docs/topics/gateway#identify
+ */
+ AuthenticationFailed = 4004,
+ /**
+ * You sent more than one identify payload. Don't do that!
+ */
+ AlreadyAuthenticated = 4005,
+ /**
+ * The sequence sent when resuming the session was invalid. Reconnect and start a new session
+ *
+ * See https://discord.com/developers/docs/topics/gateway#resume
+ */
+ InvalidSeq = 4007,
+ /**
+ * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this
+ */
+ RateLimited = 4008,
+ /**
+ * Your session timed out. Reconnect and start a new one
+ */
+ SessionTimedOut = 4009,
+ /**
+ * You sent us an invalid shard when identifying
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ InvalidShard = 4010,
+ /**
+ * The session would have handled too many guilds - you are required to shard your connection in order to connect
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ ShardingRequired = 4011,
+ /**
+ * You sent an invalid version for the gateway
+ */
+ InvalidAPIVersion = 4012,
+ /**
+ * You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value
+ *
+ * See https://discord.com/developers/docs/topics/gateway#gateway-intents
+ */
+ InvalidIntents = 4013,
+ /**
+ * You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not
+ * enabled or are not whitelisted for
+ *
+ * See https://discord.com/developers/docs/topics/gateway#gateway-intents
+ *
+ * See https://discord.com/developers/docs/topics/gateway#privileged-intents
+ */
+ DisallowedIntents = 4014
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#list-of-intents
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum GatewayIntentBits {
+ Guilds = 1,
+ GuildMembers = 2,
+ GuildBans = 4,
+ GuildEmojisAndStickers = 8,
+ GuildIntegrations = 16,
+ GuildWebhooks = 32,
+ GuildInvites = 64,
+ GuildVoiceStates = 128,
+ GuildPresences = 256,
+ GuildMessages = 512,
+ GuildMessageReactions = 1024,
+ GuildMessageTyping = 2048,
+ DirectMessages = 4096,
+ DirectMessageReactions = 8192,
+ DirectMessageTyping = 16384,
+ GuildScheduledEvents = 65536
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum GatewayDispatchEvents {
+ ChannelCreate = "CHANNEL_CREATE",
+ ChannelDelete = "CHANNEL_DELETE",
+ ChannelPinsUpdate = "CHANNEL_PINS_UPDATE",
+ ChannelUpdate = "CHANNEL_UPDATE",
+ GuildBanAdd = "GUILD_BAN_ADD",
+ GuildBanRemove = "GUILD_BAN_REMOVE",
+ GuildCreate = "GUILD_CREATE",
+ GuildDelete = "GUILD_DELETE",
+ GuildEmojisUpdate = "GUILD_EMOJIS_UPDATE",
+ GuildIntegrationsUpdate = "GUILD_INTEGRATIONS_UPDATE",
+ GuildMemberAdd = "GUILD_MEMBER_ADD",
+ GuildMemberRemove = "GUILD_MEMBER_REMOVE",
+ GuildMembersChunk = "GUILD_MEMBERS_CHUNK",
+ GuildMemberUpdate = "GUILD_MEMBER_UPDATE",
+ GuildRoleCreate = "GUILD_ROLE_CREATE",
+ GuildRoleDelete = "GUILD_ROLE_DELETE",
+ GuildRoleUpdate = "GUILD_ROLE_UPDATE",
+ GuildStickersUpdate = "GUILD_STICKERS_UPDATE",
+ GuildUpdate = "GUILD_UPDATE",
+ IntegrationCreate = "INTEGRATION_CREATE",
+ IntegrationDelete = "INTEGRATION_DELETE",
+ IntegrationUpdate = "INTEGRATION_UPDATE",
+ InteractionCreate = "INTERACTION_CREATE",
+ InviteCreate = "INVITE_CREATE",
+ InviteDelete = "INVITE_DELETE",
+ MessageCreate = "MESSAGE_CREATE",
+ MessageDelete = "MESSAGE_DELETE",
+ MessageDeleteBulk = "MESSAGE_DELETE_BULK",
+ MessageReactionAdd = "MESSAGE_REACTION_ADD",
+ MessageReactionRemove = "MESSAGE_REACTION_REMOVE",
+ MessageReactionRemoveAll = "MESSAGE_REACTION_REMOVE_ALL",
+ MessageReactionRemoveEmoji = "MESSAGE_REACTION_REMOVE_EMOJI",
+ MessageUpdate = "MESSAGE_UPDATE",
+ PresenceUpdate = "PRESENCE_UPDATE",
+ StageInstanceCreate = "STAGE_INSTANCE_CREATE",
+ StageInstanceDelete = "STAGE_INSTANCE_DELETE",
+ StageInstanceUpdate = "STAGE_INSTANCE_UPDATE",
+ Ready = "READY",
+ Resumed = "RESUMED",
+ TypingStart = "TYPING_START",
+ UserUpdate = "USER_UPDATE",
+ VoiceServerUpdate = "VOICE_SERVER_UPDATE",
+ VoiceStateUpdate = "VOICE_STATE_UPDATE",
+ WebhooksUpdate = "WEBHOOKS_UPDATE",
+ GuildScheduledEventCreate = "GUILD_SCHEDULED_EVENT_CREATE",
+ GuildScheduledEventUpdate = "GUILD_SCHEDULED_EVENT_UPDATE",
+ GuildScheduledEventDelete = "GUILD_SCHEDULED_EVENT_DELETE",
+ GuildScheduledEventUserAdd = "GUILD_SCHEDULED_EVENT_USER_ADD",
+ GuildScheduledEventUserRemove = "GUILD_SCHEDULED_EVENT_USER_REMOVE"
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewaySendPayload = GatewayHeartbeat | GatewayIdentify | GatewayUpdatePresence | GatewayVoiceStateUpdate | GatewayResume | GatewayRequestGuildMembers;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayReceivePayload = GatewayHello | GatewayHeartbeatRequest | GatewayHeartbeatAck | GatewayInvalidSession | GatewayReconnect | GatewayDispatchPayload;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayDispatchPayload = GatewayChannelModifyDispatch | GatewayChannelPinsUpdateDispatch | GatewayGuildBanModifyDispatch | GatewayGuildDeleteDispatch | GatewayGuildEmojisUpdateDispatch | GatewayGuildIntegrationsUpdateDispatch | GatewayGuildMemberAddDispatch | GatewayGuildMemberRemoveDispatch | GatewayGuildMembersChunkDispatch | GatewayGuildMemberUpdateDispatch | GatewayGuildModifyDispatch | GatewayGuildRoleDeleteDispatch | GatewayGuildRoleModifyDispatch | GatewayGuildScheduledEventCreateDispatch | GatewayGuildScheduledEventUpdateDispatch | GatewayGuildScheduledEventDeleteDispatch | GatewayGuildScheduledEventUserAddDispatch | GatewayGuildScheduledEventUserRemoveDispatch | GatewayGuildStickersUpdateDispatch | GatewayIntegrationCreateDispatch | GatewayIntegrationDeleteDispatch | GatewayIntegrationUpdateDispatch | GatewayInteractionCreateDispatch | GatewayInviteCreateDispatch | GatewayInviteDeleteDispatch | GatewayMessageCreateDispatch | GatewayMessageDeleteBulkDispatch | GatewayMessageDeleteDispatch | GatewayMessageReactionAddDispatch | GatewayMessageReactionRemoveAllDispatch | GatewayMessageReactionRemoveDispatch | GatewayMessageReactionRemoveEmojiDispatch | GatewayMessageUpdateDispatch | GatewayPresenceUpdateDispatch | GatewayStageInstanceCreateDispatch | GatewayStageInstanceDeleteDispatch | GatewayStageInstanceUpdateDispatch | GatewayReadyDispatch | GatewayResumedDispatch | GatewayTypingStartDispatch | GatewayUserUpdateDispatch | GatewayVoiceServerUpdateDispatch | GatewayVoiceStateUpdateDispatch | GatewayWebhooksUpdateDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway#hello
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayHello extends NonDispatchPayload {
+ op: GatewayOpcodes.Hello;
+ d: GatewayHelloData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#hello
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayHelloData {
+ /**
+ * The interval (in milliseconds) the client should heartbeat with
+ */
+ heartbeat_interval: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#heartbeating
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayHeartbeatRequest extends NonDispatchPayload {
+ op: GatewayOpcodes.Heartbeat;
+ d: never;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#heartbeating-example-gateway-heartbeat-ack
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayHeartbeatAck extends NonDispatchPayload {
+ op: GatewayOpcodes.HeartbeatAck;
+ d: never;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#invalid-session
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayInvalidSession extends NonDispatchPayload {
+ op: GatewayOpcodes.InvalidSession;
+ d: GatewayInvalidSessionData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#invalid-session
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayInvalidSessionData = boolean;
+/**
+ * https://discord.com/developers/docs/topics/gateway#reconnect
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayReconnect extends NonDispatchPayload {
+ op: GatewayOpcodes.Reconnect;
+ d: never;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#ready
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayReadyDispatch = DataPayload<GatewayDispatchEvents.Ready, GatewayReadyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#ready
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayReadyDispatchData {
+ /**
+ * Gateway version
+ *
+ * See https://discord.com/developers/docs/topics/gateway#gateways-gateway-versions
+ */
+ v: number;
+ /**
+ * Information about the user including email
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user: APIUser;
+ /**
+ * The guilds the user is in
+ *
+ * See https://discord.com/developers/docs/resources/guild#unavailable-guild-object
+ */
+ guilds: APIUnavailableGuild[];
+ /**
+ * Used for resuming connections
+ */
+ session_id: string;
+ /**
+ * The shard information associated with this session, if sent when identifying
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ shard?: [shard_id: number, shard_count: number];
+ /**
+ * Contains `id` and `flags`
+ *
+ * See https://discord.com/developers/docs/resources/application#application-object
+ */
+ application: Pick<APIApplication, 'id' | 'flags'>;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#resumed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed, never>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#channel-create
+ * https://discord.com/developers/docs/topics/gateway#channel-update
+ * https://discord.com/developers/docs/topics/gateway#channel-delete
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayChannelModifyDispatch = DataPayload<GatewayDispatchEvents.ChannelCreate | GatewayDispatchEvents.ChannelDelete | GatewayDispatchEvents.ChannelUpdate, GatewayChannelModifyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#channel-create
+ * https://discord.com/developers/docs/topics/gateway#channel-update
+ * https://discord.com/developers/docs/topics/gateway#channel-delete
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayChannelModifyDispatchData = APIChannel;
+/**
+ * https://discord.com/developers/docs/topics/gateway#channel-create
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway#channel-create
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway#channel-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway#channel-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway#channel-delete
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway#channel-delete
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayChannelDeleteDispatchData = GatewayChannelModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway#channel-pins-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayChannelPinsUpdateDispatch = DataPayload<GatewayDispatchEvents.ChannelPinsUpdate, GatewayChannelPinsUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#channel-pins-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayChannelPinsUpdateDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The time at which the most recent pinned message was pinned
+ */
+ last_pin_timestamp?: string | null;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-create
+ * https://discord.com/developers/docs/topics/gateway#guild-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildModifyDispatch = DataPayload<GatewayDispatchEvents.GuildCreate | GatewayDispatchEvents.GuildUpdate, GatewayGuildModifyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-create
+ * https://discord.com/developers/docs/topics/gateway#guild-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildModifyDispatchData = APIGuild;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-create
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildCreateDispatch = GatewayGuildModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-create
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildCreateDispatchData = GatewayGuildModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildUpdateDispatch = GatewayGuildModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildUpdateDispatchData = GatewayGuildModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-delete
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildDelete, GatewayGuildDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-delete
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildDeleteDispatchData = APIUnavailableGuild;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-ban-add
+ * https://discord.com/developers/docs/topics/gateway#guild-ban-remove
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildBanModifyDispatch = DataPayload<GatewayDispatchEvents.GuildBanAdd | GatewayDispatchEvents.GuildBanRemove, GatewayGuildBanModifyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-ban-add
+ * https://discord.com/developers/docs/topics/gateway#guild-ban-remove
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayGuildBanModifyDispatchData {
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The banned user
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-ban-add
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-ban-add
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-ban-remove
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-ban-remove
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildBanRemoveDispatchData = GatewayGuildBanModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-emojis-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildEmojisUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildEmojisUpdate, GatewayGuildEmojisUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-emojis-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayGuildEmojisUpdateDispatchData {
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * Array of emojis
+ *
+ * See https://discord.com/developers/docs/resources/emoji#emoji-object
+ */
+ emojis: APIEmoji[];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-stickers-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildStickersUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildStickersUpdate, GatewayGuildStickersUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-stickers-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayGuildStickersUpdateDispatchData {
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * Array of stickers
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object
+ */
+ stickers: APISticker[];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-integrations-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildIntegrationsUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildIntegrationsUpdate, GatewayGuildIntegrationsUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-integrations-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayGuildIntegrationsUpdateDispatchData {
+ /**
+ * ID of the guild whose integrations were updated
+ */
+ guild_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-member-add
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildMemberAddDispatch = DataPayload<GatewayDispatchEvents.GuildMemberAdd, GatewayGuildMemberAddDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-member-add
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayGuildMemberAddDispatchData extends APIGuildMember {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-member-remove
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildMemberRemoveDispatch = DataPayload<GatewayDispatchEvents.GuildMemberRemove, GatewayGuildMemberRemoveDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-member-remove
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayGuildMemberRemoveDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The user who was removed
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-member-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildMemberUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildMemberUpdate, GatewayGuildMemberUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-member-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildMemberUpdateDispatchData = Omit<APIGuildMember, 'deaf' | 'mute' | 'user' | 'joined_at'> & Partial<Pick<APIGuildMember, 'deaf' | 'mute'>> & Required<Pick<APIGuildMember, 'user'>> & Nullable<Pick<APIGuildMember, 'joined_at'>> & {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+};
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-members-chunk
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildMembersChunkDispatch = DataPayload<GatewayDispatchEvents.GuildMembersChunk, GatewayGuildMembersChunkDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-members-chunk
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayGuildMembersChunkDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * Set of guild members
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ members: APIGuildMember[];
+ /**
+ * The chunk index in the expected chunks for this response (`0 <= chunk_index < chunk_count`)
+ */
+ chunk_index?: number;
+ /**
+ * The total number of expected chunks for this response
+ */
+ chunk_count?: number;
+ /**
+ * If passing an invalid id to `REQUEST_GUILD_MEMBERS`, it will be returned here
+ */
+ not_found?: unknown[];
+ /**
+ * If passing true to `REQUEST_GUILD_MEMBERS`, presences of the returned members will be here
+ *
+ * See https://discord.com/developers/docs/topics/gateway#presence
+ */
+ presences?: RawGatewayPresenceUpdate[];
+ /**
+ * The nonce used in the Guild Members Request
+ *
+ * See https://discord.com/developers/docs/topics/gateway#request-guild-members
+ */
+ nonce?: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-role-create
+ * https://discord.com/developers/docs/topics/gateway#guild-role-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildRoleModifyDispatch = DataPayload<GatewayDispatchEvents.GuildRoleCreate | GatewayDispatchEvents.GuildRoleUpdate, GatewayGuildRoleModifyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-role-create
+ * https://discord.com/developers/docs/topics/gateway#guild-role-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayGuildRoleModifyDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The role created or updated
+ *
+ * See https://discord.com/developers/docs/topics/permissions#role-object
+ */
+ role: APIRole;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-role-create
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-role-create
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-role-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-role-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildRoleUpdateDispatchData = GatewayGuildRoleModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-role-delete
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildRoleDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildRoleDelete, GatewayGuildRoleDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#guild-role-delete
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayGuildRoleDeleteDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The id of the role
+ */
+ role_id: Snowflake;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildScheduledEventCreateDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventCreate, GatewayGuildScheduledEventCreateDispatchData>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildScheduledEventCreateDispatchData = APIGuildScheduledEvent;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildScheduledEventUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventUpdate, GatewayGuildScheduledEventUpdateDispatchData>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildScheduledEventUpdateDispatchData = APIGuildScheduledEvent;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildScheduledEventDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventDelete, GatewayGuildScheduledEventDeleteDispatchData>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildScheduledEventDeleteDispatchData = APIGuildScheduledEvent;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildScheduledEventUserAddDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventUserAdd, GatewayGuildScheduledEventUserAddDispatchData>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayGuildScheduledEventUserAddDispatchData {
+ guild_scheduled_event_id: Snowflake;
+ user_id: Snowflake;
+ guild_id: Snowflake;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayGuildScheduledEventUserRemoveDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventUserRemove, GatewayGuildScheduledEventUserAddDispatchData>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayGuildScheduledEventUserRemoveDispatchData {
+ guild_scheduled_event_id: Snowflake;
+ user_id: Snowflake;
+ guild_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#integration-create
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayIntegrationCreateDispatch = DataPayload<GatewayDispatchEvents.IntegrationCreate, GatewayIntegrationCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#integration-create
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayIntegrationCreateDispatchData = APIGuildIntegration & {
+ guild_id: Snowflake;
+};
+/**
+ * https://discord.com/developers/docs/topics/gateway#integration-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayIntegrationUpdateDispatch = DataPayload<GatewayDispatchEvents.IntegrationUpdate, GatewayIntegrationUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#integration-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayIntegrationUpdateDispatchData = APIGuildIntegration & {
+ guild_id: Snowflake;
+};
+/**
+ * https://discord.com/developers/docs/topics/gateway#integration-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayIntegrationDeleteDispatch = DataPayload<GatewayDispatchEvents.IntegrationDelete, GatewayIntegrationDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#integration-delete
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayIntegrationDeleteDispatchData {
+ /**
+ * Integration id
+ */
+ id: Snowflake;
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * ID of the bot/OAuth2 application for this Discord integration
+ */
+ application_id?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#interaction-create
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayInteractionCreateDispatch = DataPayload<GatewayDispatchEvents.InteractionCreate, GatewayInteractionCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#interaction-create
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayInteractionCreateDispatchData = APIInteraction;
+/**
+ * https://discord.com/developers/docs/topics/gateway#invite-create
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayInviteCreateDispatch = DataPayload<GatewayDispatchEvents.InviteCreate, GatewayInviteCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#invite-create
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayInviteCreateDispatchData {
+ /**
+ * The channel the invite is for
+ */
+ channel_id: Snowflake;
+ /**
+ * The unique invite code
+ *
+ * See https://discord.com/developers/docs/resources/invite#invite-object
+ */
+ code: string;
+ /**
+ * The time at which the invite was created
+ */
+ created_at: number;
+ /**
+ * The guild of the invite
+ */
+ guild_id?: Snowflake;
+ /**
+ * The user that created the invite
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ inviter?: APIUser;
+ /**
+ * How long the invite is valid for (in seconds)
+ */
+ max_age: number;
+ /**
+ * The maximum number of times the invite can be used
+ */
+ max_uses: number;
+ /**
+ * The type of target for this voice channel invite
+ *
+ * See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
+ */
+ target_type?: InviteTargetType;
+ /**
+ * The user whose stream to display for this voice channel stream invite
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ target_user?: APIUser;
+ /**
+ * The embedded application to open for this voice channel embedded application invite
+ */
+ target_application?: Partial<APIApplication>;
+ /**
+ * Whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role)
+ */
+ temporary: boolean;
+ /**
+ * How many times the invite has been used (always will be `0`)
+ */
+ uses: 0;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#invite-delete
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayInviteDeleteDispatch = DataPayload<GatewayDispatchEvents.InviteDelete, GatewayInviteDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#invite-delete
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayInviteDeleteDispatchData {
+ /**
+ * The channel of the invite
+ */
+ channel_id: Snowflake;
+ /**
+ * The guild of the invite
+ */
+ guild_id?: Snowflake;
+ /**
+ * The unique invite code
+ *
+ * See https://discord.com/developers/docs/resources/invite#invite-object
+ */
+ code: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-create
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayMessageCreateDispatch = DataPayload<GatewayDispatchEvents.MessageCreate, GatewayMessageCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-create
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayMessageCreateDispatchData = APIMessage;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayMessageUpdateDispatch = DataPayload<GatewayDispatchEvents.MessageUpdate, GatewayMessageUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayMessageUpdateDispatchData = {
+ id: Snowflake;
+ channel_id: Snowflake;
+} & Partial<APIMessage>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-delete
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayMessageDeleteDispatch = DataPayload<GatewayDispatchEvents.MessageDelete, GatewayMessageDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-delete
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayMessageDeleteDispatchData {
+ /**
+ * The id of the message
+ */
+ id: Snowflake;
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-delete-bulk
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayMessageDeleteBulkDispatch = DataPayload<GatewayDispatchEvents.MessageDeleteBulk, GatewayMessageDeleteBulkDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-delete-bulk
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayMessageDeleteBulkDispatchData {
+ /**
+ * The ids of the messages
+ */
+ ids: Snowflake[];
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-reaction-add
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayMessageReactionAddDispatch = ReactionData<GatewayDispatchEvents.MessageReactionAdd>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-reaction-add
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDispatch['d'];
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-reaction-remove
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayMessageReactionRemoveDispatch = ReactionData<GatewayDispatchEvents.MessageReactionRemove, 'member'>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-reaction-remove
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayMessageReactionRemoveDispatchData = GatewayMessageReactionRemoveDispatch['d'];
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayMessageReactionRemoveAllDispatch = DataPayload<GatewayDispatchEvents.MessageReactionRemoveAll, GatewayMessageReactionRemoveAllDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayMessageReactionRemoveAllDispatchData = MessageReactionRemoveData;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayMessageReactionRemoveEmojiDispatch = DataPayload<GatewayDispatchEvents.MessageReactionRemoveEmoji, GatewayMessageReactionRemoveEmojiDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayMessageReactionRemoveEmojiDispatchData extends MessageReactionRemoveData {
+ /**
+ * The emoji that was removed
+ */
+ emoji: APIEmoji;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#presence-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayPresenceUpdateDispatch = DataPayload<GatewayDispatchEvents.PresenceUpdate, GatewayPresenceUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#presence-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayPresenceUpdateDispatchData = RawGatewayPresenceUpdate;
+/**
+ * https://discord.com/developers/docs/topics/gateway#stage-instance-create
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayStageInstanceCreateDispatch = DataPayload<GatewayDispatchEvents.StageInstanceCreate, GatewayStageInstanceCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#stage-instance-create
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayStageInstanceCreateDispatchData = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/topics/gateway#stage-instance-delete
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayStageInstanceDeleteDispatch = DataPayload<GatewayDispatchEvents.StageInstanceDelete, GatewayStageInstanceDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#stage-instance-delete
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayStageInstanceDeleteDispatchData = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/topics/gateway#stage-instance-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayStageInstanceUpdateDispatch = DataPayload<GatewayDispatchEvents.StageInstanceUpdate, GatewayStageInstanceUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#stage-instance-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayStageInstanceUpdateDispatchData = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/topics/gateway#typing-start
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayTypingStartDispatch = DataPayload<GatewayDispatchEvents.TypingStart, GatewayTypingStartDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#typing-start
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayTypingStartDispatchData {
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+ /**
+ * The id of the user
+ */
+ user_id: Snowflake;
+ /**
+ * Unix time (in seconds) of when the user started typing
+ */
+ timestamp: number;
+ /**
+ * The member who started typing if this happened in a guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ member?: APIGuildMember;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#user-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayUserUpdateDispatch = DataPayload<GatewayDispatchEvents.UserUpdate, GatewayUserUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#user-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayUserUpdateDispatchData = APIUser;
+/**
+ * https://discord.com/developers/docs/topics/gateway#voice-state-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayVoiceStateUpdateDispatch = DataPayload<GatewayDispatchEvents.VoiceStateUpdate, GatewayVoiceStateUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#voice-state-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState;
+/**
+ * https://discord.com/developers/docs/topics/gateway#voice-server-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayVoiceServerUpdateDispatch = DataPayload<GatewayDispatchEvents.VoiceServerUpdate, GatewayVoiceServerUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#voice-server-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayVoiceServerUpdateDispatchData {
+ /**
+ * Voice connection token
+ */
+ token: string;
+ /**
+ * The guild this voice server update is for
+ */
+ guild_id: Snowflake;
+ /**
+ * The voice server host
+ *
+ * A `null` endpoint means that the voice server allocated has gone away and is trying to be reallocated.
+ * You should attempt to disconnect from the currently connected voice server, and not attempt to reconnect
+ * until a new voice server is allocated
+ */
+ endpoint: string | null;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#webhooks-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayWebhooksUpdateDispatch = DataPayload<GatewayDispatchEvents.WebhooksUpdate, GatewayWebhooksUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#webhooks-update
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayWebhooksUpdateDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#heartbeating
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayHeartbeat {
+ op: GatewayOpcodes.Heartbeat;
+ d: GatewayHeartbeatData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#heartbeating
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayHeartbeatData = number | null;
+/**
+ * https://discord.com/developers/docs/topics/gateway#identify
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayIdentify {
+ op: GatewayOpcodes.Identify;
+ d: GatewayIdentifyData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#identify
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayIdentifyData {
+ /**
+ * Authentication token
+ */
+ token: string;
+ /**
+ * Connection properties
+ *
+ * See https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties
+ */
+ properties: GatewayIdentifyProperties;
+ /**
+ * Whether this connection supports compression of packets
+ *
+ * @default false
+ */
+ compress?: boolean;
+ /**
+ * Value between 50 and 250, total number of members where the gateway will stop sending
+ * offline members in the guild member list
+ *
+ * @default 50
+ */
+ large_threshold?: number;
+ /**
+ * Used for Guild Sharding
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ shard?: [shard_id: number, shard_count: number];
+ /**
+ * Presence structure for initial presence information
+ *
+ * See https://discord.com/developers/docs/topics/gateway#update-presence
+ */
+ presence?: GatewayPresenceUpdateData;
+ /**
+ * The Gateway Intents you wish to receive
+ *
+ * See https://discord.com/developers/docs/topics/gateway#gateway-intents
+ */
+ intents: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayIdentifyProperties {
+ /**
+ * Your operating system
+ */
+ $os: string;
+ /**
+ * Your library name
+ */
+ $browser: string;
+ /**
+ * Your library name
+ */
+ $device: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#resume
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayResume {
+ op: GatewayOpcodes.Resume;
+ d: GatewayResumeData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#resume
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayResumeData {
+ /**
+ * Session token
+ */
+ token: string;
+ /**
+ * Session id
+ */
+ session_id: string;
+ /**
+ * Last sequence number received
+ */
+ seq: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#request-guild-members
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayRequestGuildMembers {
+ op: GatewayOpcodes.RequestGuildMembers;
+ d: GatewayRequestGuildMembersData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#request-guild-members
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayRequestGuildMembersData {
+ /**
+ * ID of the guild to get members for
+ */
+ guild_id: Snowflake;
+ /**
+ * String that username starts with, or an empty string to return all members
+ */
+ query?: string;
+ /**
+ * Maximum number of members to send matching the `query`;
+ * a limit of `0` can be used with an empty string `query` to return all members
+ */
+ limit: number;
+ /**
+ * Used to specify if we want the presences of the matched members
+ */
+ presences?: boolean;
+ /**
+ * Used to specify which users you wish to fetch
+ */
+ user_ids?: Snowflake | Snowflake[];
+ /**
+ * Nonce to identify the Guild Members Chunk response
+ *
+ * Nonce can only be up to 32 bytes. If you send an invalid nonce it will be ignored and the reply member_chunk(s) will not have a `nonce` set.
+ *
+ * See https://discord.com/developers/docs/topics/gateway#guild-members-chunk
+ */
+ nonce?: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#update-voice-state
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayVoiceStateUpdate {
+ op: GatewayOpcodes.VoiceStateUpdate;
+ d: GatewayVoiceStateUpdateData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#update-voice-state
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayVoiceStateUpdateData {
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * ID of the voice channel client wants to join (`null` if disconnecting)
+ */
+ channel_id: Snowflake | null;
+ /**
+ * Is the client muted
+ */
+ self_mute: boolean;
+ /**
+ * Is the client deafened
+ */
+ self_deaf: boolean;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#update-presence
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayUpdatePresence {
+ op: GatewayOpcodes.PresenceUpdate;
+ d: GatewayPresenceUpdateData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#update-presence-gateway-presence-update-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayPresenceUpdateData {
+ /**
+ * Unix time (in milliseconds) of when the client went idle, or `null` if the client is not idle
+ */
+ since: number | null;
+ /**
+ * The user's activities
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#activity-object
+ */
+ activities: GatewayActivityUpdateData[];
+ /**
+ * The user's new status
+ *
+ * See https://discord.com/developers/docs/topics/gateway#update-presence-status-types
+ */
+ status: PresenceUpdateStatus;
+ /**
+ * Whether or not the client is afk
+ */
+ afk: boolean;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'type' | 'url'>;
+interface BasePayload {
+ /**
+ * Opcode for the payload
+ */
+ op: GatewayOpcodes;
+ /**
+ * Event data
+ */
+ d?: unknown;
+ /**
+ * Sequence number, used for resuming sessions and heartbeats
+ */
+ s: number;
+ /**
+ * The event name for this payload
+ */
+ t?: string;
+}
+type NonDispatchPayload = Omit<BasePayload, 't' | 's'> & {
+ t: null;
+ s: null;
+};
+interface DataPayload<Event extends GatewayDispatchEvents, D = unknown> extends BasePayload {
+ op: GatewayOpcodes.Dispatch;
+ t: Event;
+ d: D;
+}
+type ReactionData<E extends GatewayDispatchEvents, O extends string = never> = DataPayload<E, Omit<{
+ /**
+ * The id of the user
+ */
+ user_id: Snowflake;
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The id of the message
+ */
+ message_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+ /**
+ * The member who reacted if this happened in a guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ member?: APIGuildMember;
+ /**
+ * The emoji used to react
+ *
+ * See https://discord.com/developers/docs/resources/emoji#emoji-object
+ */
+ emoji: APIEmoji;
+}, O>>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+interface MessageReactionRemoveData {
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The id of the message
+ */
+ message_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+}
+//# sourceMappingURL=v8.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/v8.d.ts.map b/node_modules/discord-api-types/gateway/v8.d.ts.map
new file mode 100644
index 0000000..651b737
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v8.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"v8.d.ts","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EACX,cAAc,EACd,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,mBAAmB,EACnB,OAAO,EACP,eAAe,EACf,qBAAqB,IAAI,wBAAwB,EACjD,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC;;;;GAIG;AACH,oBAAY,cAAc;IACzB;;OAEG;IACH,QAAQ,IAAA;IACR;;;OAGG;IACH,SAAS,IAAA;IACT;;OAEG;IACH,QAAQ,IAAA;IACR;;OAEG;IACH,cAAc,IAAA;IACd;;OAEG;IACH,gBAAgB,IAAA;IAChB;;OAEG;IACH,MAAM,IAAI;IACV;;OAEG;IACH,SAAS,IAAA;IACT;;OAEG;IACH,mBAAmB,IAAA;IAC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M,GAAG,KAAK,CAAC,CAAC;AAKvF,UAAU,WAAW;IACpB;;OAEG;IACH,EAAE,EAAE,cAAc,CAAC;IACnB;;OAEG;IACH,CAAC,CAAC,EAAE,OAAO,CAAC;IACZ;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;CACX;AAED,KAAK,kBAAkB,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,GAAG,GAAG,CAAC,GAAG;IACxD,CAAC,EAAE,IAAI,CAAC;IACR,CAAC,EAAE,IAAI,CAAC;CACR,CAAC;AAEF,UAAU,WAAW,CAAC,KAAK,SAAS,qBAAqB,EAAE,CAAC,GAAG,OAAO,CAAE,SAAQ,WAAW;IAC1F,EAAE,EAAE,cAAc,CAAC,QAAQ,CAAC;IAC5B,CAAC,EAAE,KAAK,CAAC;IACT,CAAC,EAAE,CAAC,CAAC;CACL;AAED,KAAK,YAAY,CAAC,CAAC,SAAS,qBAAqB,EAAE,CAAC,SAAS,MAAM,GAAG,KAAK,IAAI,WAAW,CACzF,CAAC,EACD,IAAI,CACH;IACC;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;;;OAIG;IACH,KAAK,EAAE,QAAQ,CAAC;CAChB,EACD,CAAC,CACD,CACD,CAAC;AAEF;;GAEG;AACH,UAAU,yBAAyB;IAClC;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/v8.js b/node_modules/discord-api-types/gateway/v8.js
new file mode 100644
index 0000000..109013a
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v8.js
@@ -0,0 +1,246 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/gateway
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0;
+__exportStar(require("./common"), exports);
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+exports.GatewayVersion = '8';
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var GatewayOpcodes;
+(function (GatewayOpcodes) {
+ /**
+ * An event was dispatched
+ */
+ GatewayOpcodes[GatewayOpcodes["Dispatch"] = 0] = "Dispatch";
+ /**
+ * A bidirectional opcode to maintain an active gateway connection.
+ * Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client.
+ */
+ GatewayOpcodes[GatewayOpcodes["Heartbeat"] = 1] = "Heartbeat";
+ /**
+ * Starts a new session during the initial handshake
+ */
+ GatewayOpcodes[GatewayOpcodes["Identify"] = 2] = "Identify";
+ /**
+ * Update the client's presence
+ */
+ GatewayOpcodes[GatewayOpcodes["PresenceUpdate"] = 3] = "PresenceUpdate";
+ /**
+ * Used to join/leave or move between voice channels
+ */
+ GatewayOpcodes[GatewayOpcodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate";
+ /**
+ * Resume a previous session that was disconnected
+ */
+ GatewayOpcodes[GatewayOpcodes["Resume"] = 6] = "Resume";
+ /**
+ * You should attempt to reconnect and resume immediately
+ */
+ GatewayOpcodes[GatewayOpcodes["Reconnect"] = 7] = "Reconnect";
+ /**
+ * Request information about offline guild members in a large guild
+ */
+ GatewayOpcodes[GatewayOpcodes["RequestGuildMembers"] = 8] = "RequestGuildMembers";
+ /**
+ * The session has been invalidated. You should reconnect and identify/resume accordingly
+ */
+ GatewayOpcodes[GatewayOpcodes["InvalidSession"] = 9] = "InvalidSession";
+ /**
+ * Sent immediately after connecting, contains the `heartbeat_interval` to use
+ */
+ GatewayOpcodes[GatewayOpcodes["Hello"] = 10] = "Hello";
+ /**
+ * Sent in response to receiving a heartbeat to acknowledge that it has been received
+ */
+ GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck";
+})(GatewayOpcodes = exports.GatewayOpcodes || (exports.GatewayOpcodes = {}));
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var GatewayCloseCodes;
+(function (GatewayCloseCodes) {
+ /**
+ * We're not sure what went wrong. Try reconnecting?
+ */
+ GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError";
+ /**
+ * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that!
+ *
+ * See https://discord.com/developers/docs/topics/gateway#payloads-and-opcodes
+ */
+ GatewayCloseCodes[GatewayCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode";
+ /**
+ * You sent an invalid payload to us. Don't do that!
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sending-payloads
+ */
+ GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError";
+ /**
+ * You sent us a payload prior to identifying
+ *
+ * See https://discord.com/developers/docs/topics/gateway#identify
+ */
+ GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
+ /**
+ * The account token sent with your identify payload is incorrect
+ *
+ * See https://discord.com/developers/docs/topics/gateway#identify
+ */
+ GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed";
+ /**
+ * You sent more than one identify payload. Don't do that!
+ */
+ GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated";
+ /**
+ * The sequence sent when resuming the session was invalid. Reconnect and start a new session
+ *
+ * See https://discord.com/developers/docs/topics/gateway#resume
+ */
+ GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq";
+ /**
+ * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this
+ */
+ GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited";
+ /**
+ * Your session timed out. Reconnect and start a new one
+ */
+ GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut";
+ /**
+ * You sent us an invalid shard when identifying
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard";
+ /**
+ * The session would have handled too many guilds - you are required to shard your connection in order to connect
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired";
+ /**
+ * You sent an invalid version for the gateway
+ */
+ GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion";
+ /**
+ * You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value
+ *
+ * See https://discord.com/developers/docs/topics/gateway#gateway-intents
+ */
+ GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents";
+ /**
+ * You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not
+ * enabled or are not whitelisted for
+ *
+ * See https://discord.com/developers/docs/topics/gateway#gateway-intents
+ *
+ * See https://discord.com/developers/docs/topics/gateway#privileged-intents
+ */
+ GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents";
+})(GatewayCloseCodes = exports.GatewayCloseCodes || (exports.GatewayCloseCodes = {}));
+/**
+ * https://discord.com/developers/docs/topics/gateway#list-of-intents
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var GatewayIntentBits;
+(function (GatewayIntentBits) {
+ GatewayIntentBits[GatewayIntentBits["Guilds"] = 1] = "Guilds";
+ GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers";
+ GatewayIntentBits[GatewayIntentBits["GuildBans"] = 4] = "GuildBans";
+ GatewayIntentBits[GatewayIntentBits["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers";
+ GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations";
+ GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks";
+ GatewayIntentBits[GatewayIntentBits["GuildInvites"] = 64] = "GuildInvites";
+ GatewayIntentBits[GatewayIntentBits["GuildVoiceStates"] = 128] = "GuildVoiceStates";
+ GatewayIntentBits[GatewayIntentBits["GuildPresences"] = 256] = "GuildPresences";
+ GatewayIntentBits[GatewayIntentBits["GuildMessages"] = 512] = "GuildMessages";
+ GatewayIntentBits[GatewayIntentBits["GuildMessageReactions"] = 1024] = "GuildMessageReactions";
+ GatewayIntentBits[GatewayIntentBits["GuildMessageTyping"] = 2048] = "GuildMessageTyping";
+ GatewayIntentBits[GatewayIntentBits["DirectMessages"] = 4096] = "DirectMessages";
+ GatewayIntentBits[GatewayIntentBits["DirectMessageReactions"] = 8192] = "DirectMessageReactions";
+ GatewayIntentBits[GatewayIntentBits["DirectMessageTyping"] = 16384] = "DirectMessageTyping";
+ GatewayIntentBits[GatewayIntentBits["GuildScheduledEvents"] = 65536] = "GuildScheduledEvents";
+})(GatewayIntentBits = exports.GatewayIntentBits || (exports.GatewayIntentBits = {}));
+/**
+ * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var GatewayDispatchEvents;
+(function (GatewayDispatchEvents) {
+ GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE";
+ GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE";
+ GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
+ GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
+ GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD";
+ GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE";
+ GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE";
+ GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE";
+ GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE";
+ GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE";
+ GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD";
+ GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE";
+ GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK";
+ GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE";
+ GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE";
+ GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE";
+ GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE";
+ GatewayDispatchEvents["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE";
+ GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE";
+ GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE";
+ GatewayDispatchEvents["IntegrationDelete"] = "INTEGRATION_DELETE";
+ GatewayDispatchEvents["IntegrationUpdate"] = "INTEGRATION_UPDATE";
+ GatewayDispatchEvents["InteractionCreate"] = "INTERACTION_CREATE";
+ GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE";
+ GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE";
+ GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE";
+ GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE";
+ GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK";
+ GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD";
+ GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE";
+ GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL";
+ GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI";
+ GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE";
+ GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE";
+ GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE";
+ GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE";
+ GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE";
+ GatewayDispatchEvents["Ready"] = "READY";
+ GatewayDispatchEvents["Resumed"] = "RESUMED";
+ GatewayDispatchEvents["TypingStart"] = "TYPING_START";
+ GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE";
+ GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
+ GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
+ GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
+ GatewayDispatchEvents["GuildScheduledEventCreate"] = "GUILD_SCHEDULED_EVENT_CREATE";
+ GatewayDispatchEvents["GuildScheduledEventUpdate"] = "GUILD_SCHEDULED_EVENT_UPDATE";
+ GatewayDispatchEvents["GuildScheduledEventDelete"] = "GUILD_SCHEDULED_EVENT_DELETE";
+ GatewayDispatchEvents["GuildScheduledEventUserAdd"] = "GUILD_SCHEDULED_EVENT_USER_ADD";
+ GatewayDispatchEvents["GuildScheduledEventUserRemove"] = "GUILD_SCHEDULED_EVENT_USER_REMOVE";
+})(GatewayDispatchEvents = exports.GatewayDispatchEvents || (exports.GatewayDispatchEvents = {}));
+// #endregion Shared
+//# sourceMappingURL=v8.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/v8.js.map b/node_modules/discord-api-types/gateway/v8.js.map
new file mode 100644
index 0000000..d51a4af
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v8.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"v8.js","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;AA0BH,2CAAyB;AAEzB;;GAEG;AACU,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC;;;;GAIG;AACH,IAAY,cA8CX;AA9CD,WAAY,cAAc;IACzB;;OAEG;IACH,2DAAQ,CAAA;IACR;;;OAGG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,2EAAgB,CAAA;IAChB;;OAEG;IACH,uDAAU,CAAA;IACV;;OAEG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,iFAAmB,CAAA;IACnB;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,sDAAK,CAAA;IACL;;OAEG;IACH,oEAA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ACzC,yDAAgC,CAAA;IAChC,sDAA6B,CAAA;IAC7B,4DAAmC,CAAA;IACnC,qDAA4B,CAAA;IAC5B,qDAA4B,CAAA;IAC5B,kEAAyC,CAAA;IACzC,8EAAqD,CAAA;IACrD,4DAAmC,CAAA;IACnC,kEAAyC,CAAA;IACzC,kEAAyC,CAAA;IACzC,kEAAyC,CAAA;IACzC,8DAAqC,CAAA;IACrC,8DAAqC,CAAA;IACrC,8DAAqC,CAAA;IACrC,sEAA6C,CAAA;IAC7C,qDAA4B,CAAA;IAC5B,iEAAwC,CAAA;IACxC,iEAAwC,CAAA;IACxC,iEAAwC,CAAA;IACxC,iEAAwC,CAAA;IACxC,uDAA8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,kEAAyC,CAAA;IACzC,oEAA2C,CAAA;IAC3C,0EAAiD,CAAA;IACjD,iFAAwD,CAAA;IACxD,qFAA4D,CAAA;IAC5D,yDAAgC,CAAA;IAChC,2DAAkC,CAAA;IAClC,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,wCAAe,CAAA;IACf,4CAAmB,CAAA;IACnB,qDAA4B,CAAA;IAC5B,mDAA0B,CAAA;IAC1B,kEAAyC,CAAA;IACzC,gEAAuC,CAAA;IACvC,2DAAkC,CAAA;IAClC,mFAA0D,CAAA;IAC1D,mFAA0D,CAAA;IAC1D,mFAA0D,CAAA;IAC1D,sFAA6D,CAAA;IAC7D,4FAAmE,CAAA;AACpE,CAAC,EAlDW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAkDhC;AAgoDD,oBAAoB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/v8.mjs b/node_modules/discord-api-types/gateway/v8.mjs
new file mode 100644
index 0000000..c5cfed1
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v8.mjs
@@ -0,0 +1,8 @@
+import mod from "./v8.js";
+
+export default mod;
+export const GatewayCloseCodes = mod.GatewayCloseCodes;
+export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
+export const GatewayIntentBits = mod.GatewayIntentBits;
+export const GatewayOpcodes = mod.GatewayOpcodes;
+export const GatewayVersion = mod.GatewayVersion;
diff --git a/node_modules/discord-api-types/gateway/v9.d.ts b/node_modules/discord-api-types/gateway/v9.d.ts
new file mode 100644
index 0000000..5c0682f
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v9.d.ts
@@ -0,0 +1,1633 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/gateway
+ */
+import type { Snowflake } from '../globals';
+import type { GatewayPresenceUpdate } from '../payloads/v9/gateway';
+import type { APIApplication, APIApplicationCommandPermission, APIAutoModerationRule, APIAutoModerationAction, APIChannel, APIEmoji, APIGuild, APIGuildIntegration, APIGuildMember, APIGuildScheduledEvent, APIInteraction, APIMessage, APIRole, APIStageInstance, APISticker, APIThreadChannel, APIThreadMember, APIUnavailableGuild, APIUser, GatewayActivity, GatewayPresenceUpdate as RawGatewayPresenceUpdate, GatewayThreadListSync as RawGatewayThreadListSync, GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate, GatewayVoiceState, InviteTargetType, PresenceUpdateStatus, AutoModerationRuleTriggerType, APIAuditLogEntry } from '../payloads/v9/index';
+import type { Nullable } from '../utils/internals';
+export * from './common';
+export declare const GatewayVersion = "9";
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
+ */
+export declare enum GatewayOpcodes {
+ /**
+ * An event was dispatched
+ */
+ Dispatch = 0,
+ /**
+ * A bidirectional opcode to maintain an active gateway connection.
+ * Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client.
+ */
+ Heartbeat = 1,
+ /**
+ * Starts a new session during the initial handshake
+ */
+ Identify = 2,
+ /**
+ * Update the client's presence
+ */
+ PresenceUpdate = 3,
+ /**
+ * Used to join/leave or move between voice channels
+ */
+ VoiceStateUpdate = 4,
+ /**
+ * Resume a previous session that was disconnected
+ */
+ Resume = 6,
+ /**
+ * You should attempt to reconnect and resume immediately
+ */
+ Reconnect = 7,
+ /**
+ * Request information about offline guild members in a large guild
+ */
+ RequestGuildMembers = 8,
+ /**
+ * The session has been invalidated. You should reconnect and identify/resume accordingly
+ */
+ InvalidSession = 9,
+ /**
+ * Sent immediately after connecting, contains the `heartbeat_interval` to use
+ */
+ Hello = 10,
+ /**
+ * Sent in response to receiving a heartbeat to acknowledge that it has been received
+ */
+ HeartbeatAck = 11
+}
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
+ */
+export declare enum GatewayCloseCodes {
+ /**
+ * We're not sure what went wrong. Try reconnecting?
+ */
+ UnknownError = 4000,
+ /**
+ * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that!
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#payload-structure
+ */
+ UnknownOpcode = 4001,
+ /**
+ * You sent an invalid payload to us. Don't do that!
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sending-events
+ */
+ DecodeError = 4002,
+ /**
+ * You sent us a payload prior to identifying
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#identify
+ */
+ NotAuthenticated = 4003,
+ /**
+ * The account token sent with your identify payload is incorrect
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#identify
+ */
+ AuthenticationFailed = 4004,
+ /**
+ * You sent more than one identify payload. Don't do that!
+ */
+ AlreadyAuthenticated = 4005,
+ /**
+ * The sequence sent when resuming the session was invalid. Reconnect and start a new session
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#resume
+ */
+ InvalidSeq = 4007,
+ /**
+ * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this
+ */
+ RateLimited = 4008,
+ /**
+ * Your session timed out. Reconnect and start a new one
+ */
+ SessionTimedOut = 4009,
+ /**
+ * You sent us an invalid shard when identifying
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ InvalidShard = 4010,
+ /**
+ * The session would have handled too many guilds - you are required to shard your connection in order to connect
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ ShardingRequired = 4011,
+ /**
+ * You sent an invalid version for the gateway
+ */
+ InvalidAPIVersion = 4012,
+ /**
+ * You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value
+ *
+ * See https://discord.com/developers/docs/topics/gateway#gateway-intents
+ */
+ InvalidIntents = 4013,
+ /**
+ * You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not
+ * enabled or are not whitelisted for
+ *
+ * See https://discord.com/developers/docs/topics/gateway#gateway-intents
+ *
+ * See https://discord.com/developers/docs/topics/gateway#privileged-intents
+ */
+ DisallowedIntents = 4014
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#list-of-intents
+ */
+export declare enum GatewayIntentBits {
+ Guilds = 1,
+ GuildMembers = 2,
+ GuildModeration = 4,
+ /**
+ * @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration}
+ */
+ GuildBans = 4,
+ GuildEmojisAndStickers = 8,
+ GuildIntegrations = 16,
+ GuildWebhooks = 32,
+ GuildInvites = 64,
+ GuildVoiceStates = 128,
+ GuildPresences = 256,
+ GuildMessages = 512,
+ GuildMessageReactions = 1024,
+ GuildMessageTyping = 2048,
+ DirectMessages = 4096,
+ DirectMessageReactions = 8192,
+ DirectMessageTyping = 16384,
+ GuildScheduledEvents = 65536,
+ AutoModerationConfiguration = 1048576,
+ AutoModerationExecution = 2097152
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#receive-events
+ */
+export declare enum GatewayDispatchEvents {
+ ApplicationCommandPermissionsUpdate = "APPLICATION_COMMAND_PERMISSIONS_UPDATE",
+ ChannelCreate = "CHANNEL_CREATE",
+ ChannelDelete = "CHANNEL_DELETE",
+ ChannelPinsUpdate = "CHANNEL_PINS_UPDATE",
+ ChannelUpdate = "CHANNEL_UPDATE",
+ GuildBanAdd = "GUILD_BAN_ADD",
+ GuildBanRemove = "GUILD_BAN_REMOVE",
+ GuildCreate = "GUILD_CREATE",
+ GuildDelete = "GUILD_DELETE",
+ GuildEmojisUpdate = "GUILD_EMOJIS_UPDATE",
+ GuildIntegrationsUpdate = "GUILD_INTEGRATIONS_UPDATE",
+ GuildMemberAdd = "GUILD_MEMBER_ADD",
+ GuildMemberRemove = "GUILD_MEMBER_REMOVE",
+ GuildMembersChunk = "GUILD_MEMBERS_CHUNK",
+ GuildMemberUpdate = "GUILD_MEMBER_UPDATE",
+ GuildRoleCreate = "GUILD_ROLE_CREATE",
+ GuildRoleDelete = "GUILD_ROLE_DELETE",
+ GuildRoleUpdate = "GUILD_ROLE_UPDATE",
+ GuildStickersUpdate = "GUILD_STICKERS_UPDATE",
+ GuildUpdate = "GUILD_UPDATE",
+ IntegrationCreate = "INTEGRATION_CREATE",
+ IntegrationDelete = "INTEGRATION_DELETE",
+ IntegrationUpdate = "INTEGRATION_UPDATE",
+ InteractionCreate = "INTERACTION_CREATE",
+ InviteCreate = "INVITE_CREATE",
+ InviteDelete = "INVITE_DELETE",
+ MessageCreate = "MESSAGE_CREATE",
+ MessageDelete = "MESSAGE_DELETE",
+ MessageDeleteBulk = "MESSAGE_DELETE_BULK",
+ MessageReactionAdd = "MESSAGE_REACTION_ADD",
+ MessageReactionRemove = "MESSAGE_REACTION_REMOVE",
+ MessageReactionRemoveAll = "MESSAGE_REACTION_REMOVE_ALL",
+ MessageReactionRemoveEmoji = "MESSAGE_REACTION_REMOVE_EMOJI",
+ MessageUpdate = "MESSAGE_UPDATE",
+ PresenceUpdate = "PRESENCE_UPDATE",
+ StageInstanceCreate = "STAGE_INSTANCE_CREATE",
+ StageInstanceDelete = "STAGE_INSTANCE_DELETE",
+ StageInstanceUpdate = "STAGE_INSTANCE_UPDATE",
+ Ready = "READY",
+ Resumed = "RESUMED",
+ ThreadCreate = "THREAD_CREATE",
+ ThreadDelete = "THREAD_DELETE",
+ ThreadListSync = "THREAD_LIST_SYNC",
+ ThreadMembersUpdate = "THREAD_MEMBERS_UPDATE",
+ ThreadMemberUpdate = "THREAD_MEMBER_UPDATE",
+ ThreadUpdate = "THREAD_UPDATE",
+ TypingStart = "TYPING_START",
+ UserUpdate = "USER_UPDATE",
+ VoiceServerUpdate = "VOICE_SERVER_UPDATE",
+ VoiceStateUpdate = "VOICE_STATE_UPDATE",
+ WebhooksUpdate = "WEBHOOKS_UPDATE",
+ GuildScheduledEventCreate = "GUILD_SCHEDULED_EVENT_CREATE",
+ GuildScheduledEventUpdate = "GUILD_SCHEDULED_EVENT_UPDATE",
+ GuildScheduledEventDelete = "GUILD_SCHEDULED_EVENT_DELETE",
+ GuildScheduledEventUserAdd = "GUILD_SCHEDULED_EVENT_USER_ADD",
+ GuildScheduledEventUserRemove = "GUILD_SCHEDULED_EVENT_USER_REMOVE",
+ AutoModerationRuleCreate = "AUTO_MODERATION_RULE_CREATE",
+ AutoModerationRuleUpdate = "AUTO_MODERATION_RULE_UPDATE",
+ AutoModerationRuleDelete = "AUTO_MODERATION_RULE_DELETE",
+ AutoModerationActionExecution = "AUTO_MODERATION_ACTION_EXECUTION",
+ GuildAuditLogEntryCreate = "GUILD_AUDIT_LOG_ENTRY_CREATE"
+}
+export type GatewaySendPayload = GatewayHeartbeat | GatewayIdentify | GatewayUpdatePresence | GatewayVoiceStateUpdate | GatewayResume | GatewayRequestGuildMembers;
+export type GatewayReceivePayload = GatewayHello | GatewayHeartbeatRequest | GatewayHeartbeatAck | GatewayInvalidSession | GatewayReconnect | GatewayDispatchPayload;
+export type GatewayDispatchPayload = GatewayApplicationCommandPermissionsUpdateDispatch | GatewayAutoModerationRuleModifyDispatch | GatewayAutoModerationRuleCreateDispatch | GatewayAutoModerationRuleDeleteDispatch | GatewayAutoModerationActionExecutionDispatch | GatewayChannelModifyDispatch | GatewayChannelPinsUpdateDispatch | GatewayGuildBanModifyDispatch | GatewayGuildCreateDispatch | GatewayGuildDeleteDispatch | GatewayGuildEmojisUpdateDispatch | GatewayGuildIntegrationsUpdateDispatch | GatewayGuildMemberAddDispatch | GatewayGuildMemberRemoveDispatch | GatewayGuildMembersChunkDispatch | GatewayGuildMemberUpdateDispatch | GatewayGuildModifyDispatch | GatewayGuildRoleDeleteDispatch | GatewayGuildRoleModifyDispatch | GatewayGuildScheduledEventCreateDispatch | GatewayGuildScheduledEventUpdateDispatch | GatewayGuildScheduledEventDeleteDispatch | GatewayGuildScheduledEventUserAddDispatch | GatewayGuildScheduledEventUserRemoveDispatch | GatewayGuildStickersUpdateDispatch | GatewayIntegrationCreateDispatch | GatewayIntegrationDeleteDispatch | GatewayIntegrationUpdateDispatch | GatewayInteractionCreateDispatch | GatewayInviteCreateDispatch | GatewayInviteDeleteDispatch | GatewayMessageCreateDispatch | GatewayMessageDeleteBulkDispatch | GatewayMessageDeleteDispatch | GatewayMessageReactionAddDispatch | GatewayMessageReactionRemoveAllDispatch | GatewayMessageReactionRemoveDispatch | GatewayMessageReactionRemoveEmojiDispatch | GatewayMessageUpdateDispatch | GatewayPresenceUpdateDispatch | GatewayStageInstanceCreateDispatch | GatewayStageInstanceDeleteDispatch | GatewayStageInstanceUpdateDispatch | GatewayReadyDispatch | GatewayResumedDispatch | GatewayThreadListSyncDispatch | GatewayThreadMembersUpdateDispatch | GatewayThreadMemberUpdateDispatch | GatewayThreadModifyDispatch | GatewayTypingStartDispatch | GatewayUserUpdateDispatch | GatewayVoiceServerUpdateDispatch | GatewayVoiceStateUpdateDispatch | GatewayWebhooksUpdateDispatch | GatewayGuildAuditLogEntryCreateDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#hello
+ */
+export interface GatewayHello extends NonDispatchPayload {
+ op: GatewayOpcodes.Hello;
+ d: GatewayHelloData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#hello
+ */
+export interface GatewayHelloData {
+ /**
+ * The interval (in milliseconds) the client should heartbeat with
+ */
+ heartbeat_interval: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#sending-heartbeats
+ */
+export interface GatewayHeartbeatRequest extends NonDispatchPayload {
+ op: GatewayOpcodes.Heartbeat;
+ d: never;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#heartbeat
+ */
+export interface GatewayHeartbeatAck extends NonDispatchPayload {
+ op: GatewayOpcodes.HeartbeatAck;
+ d: never;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#invalid-session
+ */
+export interface GatewayInvalidSession extends NonDispatchPayload {
+ op: GatewayOpcodes.InvalidSession;
+ d: GatewayInvalidSessionData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#invalid-session
+ */
+export type GatewayInvalidSessionData = boolean;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#reconnect
+ */
+export interface GatewayReconnect extends NonDispatchPayload {
+ op: GatewayOpcodes.Reconnect;
+ d: never;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#ready
+ */
+export type GatewayReadyDispatch = DataPayload<GatewayDispatchEvents.Ready, GatewayReadyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#ready
+ */
+export interface GatewayReadyDispatchData {
+ /**
+ * Gateway version
+ *
+ * See https://discord.com/developers/docs/reference#api-versioning
+ */
+ v: number;
+ /**
+ * Information about the user including email
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user: APIUser;
+ /**
+ * The guilds the user is in
+ *
+ * See https://discord.com/developers/docs/resources/guild#unavailable-guild-object
+ */
+ guilds: APIUnavailableGuild[];
+ /**
+ * Used for resuming connections
+ */
+ session_id: string;
+ /**
+ * Gateway url for resuming connections
+ */
+ resume_gateway_url: string;
+ /**
+ * The shard information associated with this session, if sent when identifying
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ shard?: [shard_id: number, shard_count: number];
+ /**
+ * Contains `id` and `flags`
+ *
+ * See https://discord.com/developers/docs/resources/application#application-object
+ */
+ application: Pick<APIApplication, 'id' | 'flags'>;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#resumed
+ */
+export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed, never>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete
+ */
+export type GatewayAutoModerationRuleModifyDispatch = DataPayload<GatewayDispatchEvents.AutoModerationRuleCreate | GatewayDispatchEvents.AutoModerationRuleUpdate | GatewayDispatchEvents.AutoModerationRuleDelete, GatewayAutoModerationRuleModifyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete
+ */
+export type GatewayAutoModerationRuleModifyDispatchData = APIAutoModerationRule;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create
+ */
+export type GatewayAutoModerationRuleCreateDispatch = GatewayAutoModerationRuleModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create
+ */
+export type GatewayAutoModerationRuleCreateDispatchData = GatewayAutoModerationRuleModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update
+ */
+export type GatewayAutoModerationRuleUpdateDispatch = GatewayAutoModerationRuleModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update
+ */
+export type GatewayAutoModerationRuleUpdateDispatchData = GatewayAutoModerationRuleModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete
+ */
+export type GatewayAutoModerationRuleDeleteDispatch = GatewayAutoModerationRuleModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete
+ */
+export type GatewayAutoModerationRuleDeleteDispatchData = GatewayAutoModerationRuleModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-action-execution
+ */
+export type GatewayAutoModerationActionExecutionDispatch = DataPayload<GatewayDispatchEvents.AutoModerationActionExecution, GatewayAutoModerationActionExecutionDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#auto-moderation-action-execution
+ */
+export interface GatewayAutoModerationActionExecutionDispatchData {
+ /**
+ * The id of the guild in which action was executed
+ */
+ guild_id: Snowflake;
+ /**
+ * The action which was executed
+ */
+ action: APIAutoModerationAction;
+ /**
+ * The id of the rule which action belongs to
+ */
+ rule_id: Snowflake;
+ /**
+ * The trigger type of rule which was triggered
+ */
+ rule_trigger_type: AutoModerationRuleTriggerType;
+ /**
+ * The id of the user which generated the content which triggered the rule
+ */
+ user_id: Snowflake;
+ /**
+ * The id of the channel in which user content was posted
+ */
+ channel_id?: Snowflake;
+ /**
+ * The id of any user message which content belongs to
+ *
+ * This field will not be present if message was blocked by AutoMod or content was not part of any message
+ */
+ message_id?: Snowflake;
+ /**
+ * The id of any system auto moderation messages posted as a result of this action
+ *
+ * This field will not be present if this event does not correspond to an action with type {@link AutoModerationActionType.SendAlertMessage}
+ */
+ alert_system_message_id?: Snowflake;
+ /**
+ * The user generated text content
+ *
+ * `MESSAGE_CONTENT` (`1 << 15`) gateway intent is required to receive non-empty values from this field
+ */
+ content: string;
+ /**
+ * The word or phrase configured in the rule that triggered the rule
+ */
+ matched_keyword: string | null;
+ /**
+ * The substring in content that triggered the rule
+ *
+ * `MESSAGE_CONTENT` (`1 << 15`) gateway intent is required to receive non-empty values from this field
+ */
+ matched_content: string | null;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#application-command-permissions-update
+ */
+export type GatewayApplicationCommandPermissionsUpdateDispatch = DataPayload<GatewayDispatchEvents.ApplicationCommandPermissionsUpdate, GatewayApplicationCommandPermissionsUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#application-command-permissions-update
+ */
+export interface GatewayApplicationCommandPermissionsUpdateDispatchData {
+ /**
+ * ID of the command or the application ID
+ */
+ id: Snowflake;
+ /**
+ * ID of the application the command belongs to
+ */
+ application_id: Snowflake;
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * Permissions for the command in the guild, max of 100
+ */
+ permissions: APIApplicationCommandPermission[];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-create
+ * https://discord.com/developers/docs/topics/gateway-events#channel-update
+ * https://discord.com/developers/docs/topics/gateway-events#channel-delete
+ */
+export type GatewayChannelModifyDispatch = DataPayload<GatewayDispatchEvents.ChannelCreate | GatewayDispatchEvents.ChannelDelete | GatewayDispatchEvents.ChannelUpdate, GatewayChannelModifyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-create
+ * https://discord.com/developers/docs/topics/gateway-events#channel-update
+ * https://discord.com/developers/docs/topics/gateway-events#channel-delete
+ */
+export type GatewayChannelModifyDispatchData = APIChannel;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-create
+ */
+export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-create
+ */
+export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-update
+ */
+export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-update
+ */
+export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-delete
+ */
+export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-delete
+ */
+export type GatewayChannelDeleteDispatchData = GatewayChannelModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-pins-update
+ */
+export type GatewayChannelPinsUpdateDispatch = DataPayload<GatewayDispatchEvents.ChannelPinsUpdate, GatewayChannelPinsUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#channel-pins-update
+ */
+export interface GatewayChannelPinsUpdateDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The time at which the most recent pinned message was pinned
+ */
+ last_pin_timestamp?: string | null;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-update
+ */
+export type GatewayGuildModifyDispatch = DataPayload<GatewayDispatchEvents.GuildUpdate, GatewayGuildModifyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-update
+ */
+export type GatewayGuildModifyDispatchData = APIGuild;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-create
+ */
+export type GatewayGuildCreateDispatch = DataPayload<GatewayDispatchEvents.GuildCreate, GatewayGuildCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-create
+ * https://discord.com/developers/docs/topics/gateway-events#guild-create-guild-create-extra-fields
+ */
+export interface GatewayGuildCreateDispatchData extends APIGuild {
+ /**
+ * When this guild was joined at
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ */
+ joined_at: string;
+ /**
+ * `true` if this is considered a large guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ */
+ large: boolean;
+ /**
+ * `true` if this guild is unavailable due to an outage
+ */
+ unavailable?: boolean;
+ /**
+ * Total number of members in this guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ */
+ member_count: number;
+ /**
+ * States of members currently in voice channels; lacks the `guild_id` key
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-state-object
+ */
+ voice_states: Omit<GatewayVoiceState, 'guild_id'>[];
+ /**
+ * Users in the guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ members: APIGuildMember[];
+ /**
+ * Channels in the guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object
+ */
+ channels: APIChannel[];
+ /**
+ * Threads in the guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object
+ */
+ threads: APIChannel[];
+ /**
+ * Presences of the members in the guild, will only include non-offline members if the size is greater than `large_threshold`
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#presence-update
+ */
+ presences: GatewayPresenceUpdate[];
+ /**
+ * The stage instances in the guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ *
+ * See https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-stage-instance-structure
+ */
+ stage_instances: APIStageInstance[];
+ /**
+ * The scheduled events in the guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway-events#guild-create) event**
+ *
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object
+ */
+ guild_scheduled_events: APIGuildScheduledEvent[];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-update
+ */
+export type GatewayGuildUpdateDispatch = GatewayGuildModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-update
+ */
+export type GatewayGuildUpdateDispatchData = GatewayGuildModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-delete
+ */
+export type GatewayGuildDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildDelete, GatewayGuildDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-delete
+ */
+export type GatewayGuildDeleteDispatchData = APIUnavailableGuild;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-ban-add
+ * https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove
+ */
+export type GatewayGuildBanModifyDispatch = DataPayload<GatewayDispatchEvents.GuildBanAdd | GatewayDispatchEvents.GuildBanRemove, GatewayGuildBanModifyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-ban-add
+ * https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove
+ */
+export interface GatewayGuildBanModifyDispatchData {
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The banned user
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-ban-add
+ */
+export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-ban-add
+ */
+export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove
+ */
+export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove
+ */
+export type GatewayGuildBanRemoveDispatchData = GatewayGuildBanModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-emojis-update
+ */
+export type GatewayGuildEmojisUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildEmojisUpdate, GatewayGuildEmojisUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-emojis-update
+ */
+export interface GatewayGuildEmojisUpdateDispatchData {
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * Array of emojis
+ *
+ * See https://discord.com/developers/docs/resources/emoji#emoji-object
+ */
+ emojis: APIEmoji[];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-stickers-update
+ */
+export type GatewayGuildStickersUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildStickersUpdate, GatewayGuildStickersUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-stickers-update
+ */
+export interface GatewayGuildStickersUpdateDispatchData {
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * Array of stickers
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object
+ */
+ stickers: APISticker[];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-integrations-update
+ */
+export type GatewayGuildIntegrationsUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildIntegrationsUpdate, GatewayGuildIntegrationsUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-integrations-update
+ */
+export interface GatewayGuildIntegrationsUpdateDispatchData {
+ /**
+ * ID of the guild whose integrations were updated
+ */
+ guild_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-member-add
+ */
+export type GatewayGuildMemberAddDispatch = DataPayload<GatewayDispatchEvents.GuildMemberAdd, GatewayGuildMemberAddDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-member-add
+ */
+export interface GatewayGuildMemberAddDispatchData extends APIGuildMember {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-member-remove
+ */
+export type GatewayGuildMemberRemoveDispatch = DataPayload<GatewayDispatchEvents.GuildMemberRemove, GatewayGuildMemberRemoveDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-member-remove
+ */
+export interface GatewayGuildMemberRemoveDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The user who was removed
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-member-update
+ */
+export type GatewayGuildMemberUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildMemberUpdate, GatewayGuildMemberUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-member-update
+ */
+export type GatewayGuildMemberUpdateDispatchData = Omit<APIGuildMember, 'deaf' | 'mute' | 'user' | 'joined_at'> & Partial<Pick<APIGuildMember, 'deaf' | 'mute'>> & Required<Pick<APIGuildMember, 'user'>> & Nullable<Pick<APIGuildMember, 'joined_at'>> & {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+};
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk
+ */
+export type GatewayGuildMembersChunkDispatch = DataPayload<GatewayDispatchEvents.GuildMembersChunk, GatewayGuildMembersChunkDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#update-presence
+ */
+export type GatewayGuildMembersChunkPresence = Omit<RawGatewayPresenceUpdate, 'guild_id'>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk
+ */
+export interface GatewayGuildMembersChunkDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * Set of guild members
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ members: APIGuildMember[];
+ /**
+ * The chunk index in the expected chunks for this response (`0 <= chunk_index < chunk_count`)
+ */
+ chunk_index: number;
+ /**
+ * The total number of expected chunks for this response
+ */
+ chunk_count: number;
+ /**
+ * If passing an invalid id to `REQUEST_GUILD_MEMBERS`, it will be returned here
+ */
+ not_found?: unknown[];
+ /**
+ * If passing true to `REQUEST_GUILD_MEMBERS`, presences of the returned members will be here
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#update-presence
+ */
+ presences?: GatewayGuildMembersChunkPresence[];
+ /**
+ * The nonce used in the Guild Members Request
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#request-guild-members
+ */
+ nonce?: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-create
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-update
+ */
+export type GatewayGuildRoleModifyDispatch = DataPayload<GatewayDispatchEvents.GuildRoleCreate | GatewayDispatchEvents.GuildRoleUpdate, GatewayGuildRoleModifyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-create
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-update
+ */
+export interface GatewayGuildRoleModifyDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The role created or updated
+ *
+ * See https://discord.com/developers/docs/topics/permissions#role-object
+ */
+ role: APIRole;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-create
+ */
+export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-create
+ */
+export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-update
+ */
+export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-update
+ */
+export type GatewayGuildRoleUpdateDispatchData = GatewayGuildRoleModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-delete
+ */
+export type GatewayGuildRoleDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildRoleDelete, GatewayGuildRoleDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-role-delete
+ */
+export interface GatewayGuildRoleDeleteDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The id of the role
+ */
+ role_id: Snowflake;
+}
+export type GatewayGuildScheduledEventCreateDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventCreate, GatewayGuildScheduledEventCreateDispatchData>;
+export type GatewayGuildScheduledEventCreateDispatchData = APIGuildScheduledEvent;
+export type GatewayGuildScheduledEventUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventUpdate, GatewayGuildScheduledEventUpdateDispatchData>;
+export type GatewayGuildScheduledEventUpdateDispatchData = APIGuildScheduledEvent;
+export type GatewayGuildScheduledEventDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventDelete, GatewayGuildScheduledEventDeleteDispatchData>;
+export type GatewayGuildScheduledEventDeleteDispatchData = APIGuildScheduledEvent;
+export type GatewayGuildScheduledEventUserAddDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventUserAdd, GatewayGuildScheduledEventUserAddDispatchData>;
+export interface GatewayGuildScheduledEventUserAddDispatchData {
+ guild_scheduled_event_id: Snowflake;
+ user_id: Snowflake;
+ guild_id: Snowflake;
+}
+export type GatewayGuildScheduledEventUserRemoveDispatch = DataPayload<GatewayDispatchEvents.GuildScheduledEventUserRemove, GatewayGuildScheduledEventUserAddDispatchData>;
+export interface GatewayGuildScheduledEventUserRemoveDispatchData {
+ guild_scheduled_event_id: Snowflake;
+ user_id: Snowflake;
+ guild_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#integration-create
+ */
+export type GatewayIntegrationCreateDispatch = DataPayload<GatewayDispatchEvents.IntegrationCreate, GatewayIntegrationCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#integration-create
+ */
+export type GatewayIntegrationCreateDispatchData = APIGuildIntegration & {
+ guild_id: Snowflake;
+};
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#integration-update
+ */
+export type GatewayIntegrationUpdateDispatch = DataPayload<GatewayDispatchEvents.IntegrationUpdate, GatewayIntegrationUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#integration-update
+ */
+export type GatewayIntegrationUpdateDispatchData = APIGuildIntegration & {
+ guild_id: Snowflake;
+};
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#integration-update
+ */
+export type GatewayIntegrationDeleteDispatch = DataPayload<GatewayDispatchEvents.IntegrationDelete, GatewayIntegrationDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#integration-delete
+ */
+export interface GatewayIntegrationDeleteDispatchData {
+ /**
+ * Integration id
+ */
+ id: Snowflake;
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * ID of the bot/OAuth2 application for this Discord integration
+ */
+ application_id?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#interaction-create
+ */
+export type GatewayInteractionCreateDispatch = DataPayload<GatewayDispatchEvents.InteractionCreate, GatewayInteractionCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#interaction-create
+ */
+export type GatewayInteractionCreateDispatchData = APIInteraction;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#invite-create
+ */
+export type GatewayInviteCreateDispatch = DataPayload<GatewayDispatchEvents.InviteCreate, GatewayInviteCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#invite-create
+ */
+export interface GatewayInviteCreateDispatchData {
+ /**
+ * The channel the invite is for
+ */
+ channel_id: Snowflake;
+ /**
+ * The unique invite code
+ *
+ * See https://discord.com/developers/docs/resources/invite#invite-object
+ */
+ code: string;
+ /**
+ * The time at which the invite was created
+ */
+ created_at: number;
+ /**
+ * The guild of the invite
+ */
+ guild_id?: Snowflake;
+ /**
+ * The user that created the invite
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ inviter?: APIUser;
+ /**
+ * How long the invite is valid for (in seconds)
+ */
+ max_age: number;
+ /**
+ * The maximum number of times the invite can be used
+ */
+ max_uses: number;
+ /**
+ * The type of target for this voice channel invite
+ *
+ * See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
+ */
+ target_type?: InviteTargetType;
+ /**
+ * The user whose stream to display for this voice channel stream invite
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ target_user?: APIUser;
+ /**
+ * The embedded application to open for this voice channel embedded application invite
+ */
+ target_application?: Partial<APIApplication>;
+ /**
+ * Whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role)
+ */
+ temporary: boolean;
+ /**
+ * How many times the invite has been used (always will be `0`)
+ */
+ uses: 0;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#invite-delete
+ */
+export type GatewayInviteDeleteDispatch = DataPayload<GatewayDispatchEvents.InviteDelete, GatewayInviteDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#invite-delete
+ */
+export interface GatewayInviteDeleteDispatchData {
+ /**
+ * The channel of the invite
+ */
+ channel_id: Snowflake;
+ /**
+ * The guild of the invite
+ */
+ guild_id?: Snowflake;
+ /**
+ * The unique invite code
+ *
+ * See https://discord.com/developers/docs/resources/invite#invite-object
+ */
+ code: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-create
+ */
+export type GatewayMessageCreateDispatch = DataPayload<GatewayDispatchEvents.MessageCreate, GatewayMessageCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-create
+ */
+export type GatewayMessageCreateDispatchData = Omit<APIMessage, 'mentions'> & GatewayMessageEventExtraFields;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-update
+ */
+export type GatewayMessageUpdateDispatch = DataPayload<GatewayDispatchEvents.MessageUpdate, GatewayMessageUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-update
+ */
+export type GatewayMessageUpdateDispatchData = Omit<Partial<APIMessage>, 'mentions'> & GatewayMessageEventExtraFields & {
+ /**
+ * ID of the message
+ */
+ id: Snowflake;
+ /**
+ * ID of the channel the message was sent in
+ */
+ channel_id: Snowflake;
+};
+export interface GatewayMessageEventExtraFields {
+ /**
+ * ID of the guild the message was sent in
+ */
+ guild_id?: Snowflake;
+ /**
+ * Member properties for this message's author
+ *
+ * The member object exists in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
+ * from text-based guild channels
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ member?: APIGuildMember;
+ /**
+ * Users specifically mentioned in the message
+ *
+ * The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
+ * from text-based guild channels
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ mentions: (APIUser & {
+ member?: Omit<APIGuildMember, 'user'>;
+ })[];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-delete
+ */
+export type GatewayMessageDeleteDispatch = DataPayload<GatewayDispatchEvents.MessageDelete, GatewayMessageDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-delete
+ */
+export interface GatewayMessageDeleteDispatchData {
+ /**
+ * The id of the message
+ */
+ id: Snowflake;
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-delete-bulk
+ */
+export type GatewayMessageDeleteBulkDispatch = DataPayload<GatewayDispatchEvents.MessageDeleteBulk, GatewayMessageDeleteBulkDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-delete-bulk
+ */
+export interface GatewayMessageDeleteBulkDispatchData {
+ /**
+ * The ids of the messages
+ */
+ ids: Snowflake[];
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-reaction-add
+ */
+export type GatewayMessageReactionAddDispatch = ReactionData<GatewayDispatchEvents.MessageReactionAdd>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-reaction-add
+ */
+export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDispatch['d'];
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove
+ */
+export type GatewayMessageReactionRemoveDispatch = ReactionData<GatewayDispatchEvents.MessageReactionRemove, 'member' | 'message_author_id'>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove
+ */
+export type GatewayMessageReactionRemoveDispatchData = GatewayMessageReactionRemoveDispatch['d'];
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-all
+ */
+export type GatewayMessageReactionRemoveAllDispatch = DataPayload<GatewayDispatchEvents.MessageReactionRemoveAll, GatewayMessageReactionRemoveAllDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-all
+ */
+export type GatewayMessageReactionRemoveAllDispatchData = MessageReactionRemoveData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-emoji
+ */
+export type GatewayMessageReactionRemoveEmojiDispatch = DataPayload<GatewayDispatchEvents.MessageReactionRemoveEmoji, GatewayMessageReactionRemoveEmojiDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-emoji
+ */
+export interface GatewayMessageReactionRemoveEmojiDispatchData extends MessageReactionRemoveData {
+ /**
+ * The emoji that was removed
+ */
+ emoji: APIEmoji;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#presence-update
+ */
+export type GatewayPresenceUpdateDispatch = DataPayload<GatewayDispatchEvents.PresenceUpdate, GatewayPresenceUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#presence-update
+ */
+export type GatewayPresenceUpdateDispatchData = RawGatewayPresenceUpdate;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#stage-instance-create
+ */
+export type GatewayStageInstanceCreateDispatch = DataPayload<GatewayDispatchEvents.StageInstanceCreate, GatewayStageInstanceCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#stage-instance-create
+ */
+export type GatewayStageInstanceCreateDispatchData = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#stage-instance-delete
+ */
+export type GatewayStageInstanceDeleteDispatch = DataPayload<GatewayDispatchEvents.StageInstanceDelete, GatewayStageInstanceDeleteDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#stage-instance-delete
+ */
+export type GatewayStageInstanceDeleteDispatchData = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#stage-instance-update
+ */
+export type GatewayStageInstanceUpdateDispatch = DataPayload<GatewayDispatchEvents.StageInstanceUpdate, GatewayStageInstanceUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#stage-instance-update
+ */
+export type GatewayStageInstanceUpdateDispatchData = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-list-sync
+ */
+export type GatewayThreadListSyncDispatch = DataPayload<GatewayDispatchEvents.ThreadListSync, GatewayThreadListSyncDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-list-sync
+ */
+export type GatewayThreadListSyncDispatchData = RawGatewayThreadListSync;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-members-update
+ */
+export type GatewayThreadMembersUpdateDispatch = DataPayload<GatewayDispatchEvents.ThreadMembersUpdate, GatewayThreadMembersUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-members-update
+ */
+export type GatewayThreadMembersUpdateDispatchData = RawGatewayThreadMembersUpdate;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-member-update
+ */
+export type GatewayThreadMemberUpdateDispatch = DataPayload<GatewayDispatchEvents.ThreadMemberUpdate, GatewayThreadMemberUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-member-update
+ */
+export type GatewayThreadMemberUpdateDispatchData = APIThreadMember & {
+ guild_id: Snowflake;
+};
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-create
+ * https://discord.com/developers/docs/topics/gateway-events#thread-update
+ * https://discord.com/developers/docs/topics/gateway-events#thread-delete
+ */
+export type GatewayThreadModifyDispatch = DataPayload<GatewayDispatchEvents.ThreadCreate | GatewayDispatchEvents.ThreadDelete | GatewayDispatchEvents.ThreadUpdate, GatewayChannelModifyDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-create
+ */
+export type GatewayThreadCreateDispatch = GatewayChannelModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-create
+ */
+export interface GatewayThreadCreateDispatchData extends APIThreadChannel {
+ /**
+ * Whether the thread is newly created or not.
+ */
+ newly_created?: true;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-update
+ */
+export type GatewayThreadUpdateDispatch = GatewayChannelModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-update
+ */
+export type GatewayThreadUpdateDispatchData = GatewayChannelModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-delete
+ */
+export type GatewayThreadDeleteDispatch = GatewayChannelModifyDispatch;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-delete
+ */
+export type GatewayThreadDeleteDispatchData = GatewayChannelModifyDispatchData;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#typing-start
+ */
+export type GatewayTypingStartDispatch = DataPayload<GatewayDispatchEvents.TypingStart, GatewayTypingStartDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#typing-start
+ */
+export interface GatewayTypingStartDispatchData {
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+ /**
+ * The id of the user
+ */
+ user_id: Snowflake;
+ /**
+ * Unix time (in seconds) of when the user started typing
+ */
+ timestamp: number;
+ /**
+ * The member who started typing if this happened in a guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ member?: APIGuildMember;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#user-update
+ */
+export type GatewayUserUpdateDispatch = DataPayload<GatewayDispatchEvents.UserUpdate, GatewayUserUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#user-update
+ */
+export type GatewayUserUpdateDispatchData = APIUser;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#voice-state-update
+ */
+export type GatewayVoiceStateUpdateDispatch = DataPayload<GatewayDispatchEvents.VoiceStateUpdate, GatewayVoiceStateUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#voice-state-update
+ */
+export type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#voice-server-update
+ */
+export type GatewayVoiceServerUpdateDispatch = DataPayload<GatewayDispatchEvents.VoiceServerUpdate, GatewayVoiceServerUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#voice-server-update
+ */
+export interface GatewayVoiceServerUpdateDispatchData {
+ /**
+ * Voice connection token
+ */
+ token: string;
+ /**
+ * The guild this voice server update is for
+ */
+ guild_id: Snowflake;
+ /**
+ * The voice server host
+ *
+ * A `null` endpoint means that the voice server allocated has gone away and is trying to be reallocated.
+ * You should attempt to disconnect from the currently connected voice server, and not attempt to reconnect
+ * until a new voice server is allocated
+ */
+ endpoint: string | null;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#webhooks-update
+ */
+export type GatewayWebhooksUpdateDispatch = DataPayload<GatewayDispatchEvents.WebhooksUpdate, GatewayWebhooksUpdateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#webhooks-update
+ */
+export interface GatewayWebhooksUpdateDispatchData {
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
+ */
+export type GatewayGuildAuditLogEntryCreateDispatch = DataPayload<GatewayDispatchEvents.GuildAuditLogEntryCreate, GatewayGuildAuditLogEntryCreateDispatchData>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
+ */
+export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLogEntry {
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#sending-heartbeats
+ */
+export interface GatewayHeartbeat {
+ op: GatewayOpcodes.Heartbeat;
+ d: GatewayHeartbeatData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#sending-heartbeats
+ */
+export type GatewayHeartbeatData = number | null;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#identify
+ */
+export interface GatewayIdentify {
+ op: GatewayOpcodes.Identify;
+ d: GatewayIdentifyData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#identify
+ */
+export interface GatewayIdentifyData {
+ /**
+ * Authentication token
+ */
+ token: string;
+ /**
+ * Connection properties
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#identify-identify-connection-properties
+ */
+ properties: GatewayIdentifyProperties;
+ /**
+ * Whether this connection supports compression of packets
+ *
+ * @default false
+ */
+ compress?: boolean;
+ /**
+ * Value between 50 and 250, total number of members where the gateway will stop sending
+ * offline members in the guild member list
+ *
+ * @default 50
+ */
+ large_threshold?: number;
+ /**
+ * Used for Guild Sharding
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ shard?: [shard_id: number, shard_count: number];
+ /**
+ * Presence structure for initial presence information
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#update-presence
+ */
+ presence?: GatewayPresenceUpdateData;
+ /**
+ * The Gateway Intents you wish to receive
+ *
+ * See https://discord.com/developers/docs/topics/gateway#gateway-intents
+ */
+ intents: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#identify-identify-connection-properties
+ */
+export interface GatewayIdentifyProperties {
+ /**
+ * Your operating system
+ */
+ os: string;
+ /**
+ * Your library name
+ */
+ browser: string;
+ /**
+ * Your library name
+ */
+ device: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#resume
+ */
+export interface GatewayResume {
+ op: GatewayOpcodes.Resume;
+ d: GatewayResumeData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#resume
+ */
+export interface GatewayResumeData {
+ /**
+ * Session token
+ */
+ token: string;
+ /**
+ * Session id
+ */
+ session_id: string;
+ /**
+ * Last sequence number received
+ */
+ seq: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#request-guild-members
+ */
+export interface GatewayRequestGuildMembers {
+ op: GatewayOpcodes.RequestGuildMembers;
+ d: GatewayRequestGuildMembersData;
+}
+export interface GatewayRequestGuildMembersDataBase {
+ /**
+ * ID of the guild to get members for
+ */
+ guild_id: Snowflake;
+ /**
+ * Used to specify if we want the presences of the matched members
+ */
+ presences?: boolean;
+ /**
+ * Nonce to identify the Guild Members Chunk response
+ *
+ * Nonce can only be up to 32 bytes. If you send an invalid nonce it will be ignored and the reply member_chunk(s) will not have a `nonce` set.
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk
+ */
+ nonce?: string;
+}
+export interface GatewayRequestGuildMembersDataWithUserIds extends GatewayRequestGuildMembersDataBase {
+ /**
+ * Used to specify which users you wish to fetch
+ */
+ user_ids: Snowflake | Snowflake[];
+}
+export interface GatewayRequestGuildMembersDataWithQuery extends GatewayRequestGuildMembersDataBase {
+ /**
+ * String that username starts with, or an empty string to return all members
+ */
+ query: string;
+ /**
+ * Maximum number of members to send matching the `query`;
+ * a limit of `0` can be used with an empty string `query` to return all members
+ */
+ limit: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#request-guild-members
+ */
+export type GatewayRequestGuildMembersData = GatewayRequestGuildMembersDataWithUserIds | GatewayRequestGuildMembersDataWithQuery;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#update-voice-state
+ */
+export interface GatewayVoiceStateUpdate {
+ op: GatewayOpcodes.VoiceStateUpdate;
+ d: GatewayVoiceStateUpdateData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#update-voice-state
+ */
+export interface GatewayVoiceStateUpdateData {
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * ID of the voice channel client wants to join (`null` if disconnecting)
+ */
+ channel_id: Snowflake | null;
+ /**
+ * Is the client muted
+ */
+ self_mute: boolean;
+ /**
+ * Is the client deafened
+ */
+ self_deaf: boolean;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#update-presence
+ */
+export interface GatewayUpdatePresence {
+ op: GatewayOpcodes.PresenceUpdate;
+ d: GatewayPresenceUpdateData;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#update-presence-gateway-presence-update-structure
+ */
+export interface GatewayPresenceUpdateData {
+ /**
+ * Unix time (in milliseconds) of when the client went idle, or `null` if the client is not idle
+ */
+ since: number | null;
+ /**
+ * The user's activities
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#activity-object
+ */
+ activities: GatewayActivityUpdateData[];
+ /**
+ * The user's new status
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types
+ */
+ status: PresenceUpdateStatus;
+ /**
+ * Whether or not the client is afk
+ */
+ afk: boolean;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure
+ */
+export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'type' | 'url'>;
+interface BasePayload {
+ /**
+ * Opcode for the payload
+ */
+ op: GatewayOpcodes;
+ /**
+ * Event data
+ */
+ d?: unknown;
+ /**
+ * Sequence number, used for resuming sessions and heartbeats
+ */
+ s: number;
+ /**
+ * The event name for this payload
+ */
+ t?: string;
+}
+type NonDispatchPayload = Omit<BasePayload, 't' | 's'> & {
+ t: null;
+ s: null;
+};
+interface DataPayload<Event extends GatewayDispatchEvents, D = unknown> extends BasePayload {
+ op: GatewayOpcodes.Dispatch;
+ t: Event;
+ d: D;
+}
+type ReactionData<E extends GatewayDispatchEvents, O extends string = never> = DataPayload<E, Omit<{
+ /**
+ * The id of the user
+ */
+ user_id: Snowflake;
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The id of the message
+ */
+ message_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+ /**
+ * The member who reacted if this happened in a guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ member?: APIGuildMember;
+ /**
+ * The emoji used to react
+ *
+ * See https://discord.com/developers/docs/resources/emoji#emoji-object
+ */
+ emoji: APIEmoji;
+ /**
+ * The id of the user that posted the message that was reacted to
+ */
+ message_author_id?: Snowflake;
+}, O>>;
+interface MessageReactionRemoveData {
+ /**
+ * The id of the channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The id of the message
+ */
+ message_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id?: Snowflake;
+}
+//# sourceMappingURL=v9.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/v9.d.ts.map b/node_modules/discord-api-types/gateway/v9.d.ts.map
new file mode 100644
index 0000000..957f24e
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v9.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"v9.d.ts","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,KAAK,EACX,cAAc,EACd,+BAA+B,EAC/B,qBAAqB,EACrB,uBAAuB,EACvB,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,OAAO,EACP,eAAe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AE,cAAc,CAAC;IACnB;;OAEG;IACH,CAAC,CAAC,EAAE,OAAO,CAAC;IACZ;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;CACX;AAED,KAAK,kBAAkB,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,GAAG,GAAG,CAAC,GAAG;IACxD,CAAC,EAAE,IAAI,CAAC;IACR,CAAC,EAAE,IAAI,CAAC;CACR,CAAC;AAEF,UAAU,WAAW,CAAC,KAAK,SAAS,qBAAqB,EAAE,CAAC,GAAG,OAAO,CAAE,SAAQ,WAAW;IAC1F,EAAE,EAAE,cAAc,CAAC,QAAQ,CAAC;IAC5B,CAAC,EAAE,KAAK,CAAC;IACT,CAAC,EAAE,CAAC,CAAC;CACL;AAED,KAAK,YAAY,CAAC,CAAC,SAAS,qBAAqB,EAAE,CAAC,SAAS,MAAM,GAAG,KAAK,IAAI,WAAW,CACzF,CAAC,EACD,IAAI,CACH;IACC;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;;;OAIG;IACH,KAAK,EAAE,QAAQ,CAAC;IAChB;;OAEG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC;CAC9B,EACD,CAAC,CACD,CACD,CAAC;AAEF,UAAU,yBAAyB;IAClC;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/v9.js b/node_modules/discord-api-types/gateway/v9.js
new file mode 100644
index 0000000..04c58bf
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v9.js
@@ -0,0 +1,253 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/gateway
+ */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0;
+__exportStar(require("./common"), exports);
+exports.GatewayVersion = '9';
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
+ */
+var GatewayOpcodes;
+(function (GatewayOpcodes) {
+ /**
+ * An event was dispatched
+ */
+ GatewayOpcodes[GatewayOpcodes["Dispatch"] = 0] = "Dispatch";
+ /**
+ * A bidirectional opcode to maintain an active gateway connection.
+ * Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client.
+ */
+ GatewayOpcodes[GatewayOpcodes["Heartbeat"] = 1] = "Heartbeat";
+ /**
+ * Starts a new session during the initial handshake
+ */
+ GatewayOpcodes[GatewayOpcodes["Identify"] = 2] = "Identify";
+ /**
+ * Update the client's presence
+ */
+ GatewayOpcodes[GatewayOpcodes["PresenceUpdate"] = 3] = "PresenceUpdate";
+ /**
+ * Used to join/leave or move between voice channels
+ */
+ GatewayOpcodes[GatewayOpcodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate";
+ /**
+ * Resume a previous session that was disconnected
+ */
+ GatewayOpcodes[GatewayOpcodes["Resume"] = 6] = "Resume";
+ /**
+ * You should attempt to reconnect and resume immediately
+ */
+ GatewayOpcodes[GatewayOpcodes["Reconnect"] = 7] = "Reconnect";
+ /**
+ * Request information about offline guild members in a large guild
+ */
+ GatewayOpcodes[GatewayOpcodes["RequestGuildMembers"] = 8] = "RequestGuildMembers";
+ /**
+ * The session has been invalidated. You should reconnect and identify/resume accordingly
+ */
+ GatewayOpcodes[GatewayOpcodes["InvalidSession"] = 9] = "InvalidSession";
+ /**
+ * Sent immediately after connecting, contains the `heartbeat_interval` to use
+ */
+ GatewayOpcodes[GatewayOpcodes["Hello"] = 10] = "Hello";
+ /**
+ * Sent in response to receiving a heartbeat to acknowledge that it has been received
+ */
+ GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck";
+})(GatewayOpcodes = exports.GatewayOpcodes || (exports.GatewayOpcodes = {}));
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
+ */
+var GatewayCloseCodes;
+(function (GatewayCloseCodes) {
+ /**
+ * We're not sure what went wrong. Try reconnecting?
+ */
+ GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError";
+ /**
+ * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that!
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#payload-structure
+ */
+ GatewayCloseCodes[GatewayCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode";
+ /**
+ * You sent an invalid payload to us. Don't do that!
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sending-events
+ */
+ GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError";
+ /**
+ * You sent us a payload prior to identifying
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#identify
+ */
+ GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
+ /**
+ * The account token sent with your identify payload is incorrect
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#identify
+ */
+ GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed";
+ /**
+ * You sent more than one identify payload. Don't do that!
+ */
+ GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated";
+ /**
+ * The sequence sent when resuming the session was invalid. Reconnect and start a new session
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#resume
+ */
+ GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq";
+ /**
+ * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this
+ */
+ GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited";
+ /**
+ * Your session timed out. Reconnect and start a new one
+ */
+ GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut";
+ /**
+ * You sent us an invalid shard when identifying
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard";
+ /**
+ * The session would have handled too many guilds - you are required to shard your connection in order to connect
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired";
+ /**
+ * You sent an invalid version for the gateway
+ */
+ GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion";
+ /**
+ * You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value
+ *
+ * See https://discord.com/developers/docs/topics/gateway#gateway-intents
+ */
+ GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents";
+ /**
+ * You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not
+ * enabled or are not whitelisted for
+ *
+ * See https://discord.com/developers/docs/topics/gateway#gateway-intents
+ *
+ * See https://discord.com/developers/docs/topics/gateway#privileged-intents
+ */
+ GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents";
+})(GatewayCloseCodes = exports.GatewayCloseCodes || (exports.GatewayCloseCodes = {}));
+/**
+ * https://discord.com/developers/docs/topics/gateway#list-of-intents
+ */
+var GatewayIntentBits;
+(function (GatewayIntentBits) {
+ GatewayIntentBits[GatewayIntentBits["Guilds"] = 1] = "Guilds";
+ GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers";
+ GatewayIntentBits[GatewayIntentBits["GuildModeration"] = 4] = "GuildModeration";
+ /**
+ * @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration}
+ */
+ GatewayIntentBits[GatewayIntentBits["GuildBans"] = 4] = "GuildBans";
+ GatewayIntentBits[GatewayIntentBits["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers";
+ GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations";
+ GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks";
+ GatewayIntentBits[GatewayIntentBits["GuildInvites"] = 64] = "GuildInvites";
+ GatewayIntentBits[GatewayIntentBits["GuildVoiceStates"] = 128] = "GuildVoiceStates";
+ GatewayIntentBits[GatewayIntentBits["GuildPresences"] = 256] = "GuildPresences";
+ GatewayIntentBits[GatewayIntentBits["GuildMessages"] = 512] = "GuildMessages";
+ GatewayIntentBits[GatewayIntentBits["GuildMessageReactions"] = 1024] = "GuildMessageReactions";
+ GatewayIntentBits[GatewayIntentBits["GuildMessageTyping"] = 2048] = "GuildMessageTyping";
+ GatewayIntentBits[GatewayIntentBits["DirectMessages"] = 4096] = "DirectMessages";
+ GatewayIntentBits[GatewayIntentBits["DirectMessageReactions"] = 8192] = "DirectMessageReactions";
+ GatewayIntentBits[GatewayIntentBits["DirectMessageTyping"] = 16384] = "DirectMessageTyping";
+ GatewayIntentBits[GatewayIntentBits["GuildScheduledEvents"] = 65536] = "GuildScheduledEvents";
+ GatewayIntentBits[GatewayIntentBits["AutoModerationConfiguration"] = 1048576] = "AutoModerationConfiguration";
+ GatewayIntentBits[GatewayIntentBits["AutoModerationExecution"] = 2097152] = "AutoModerationExecution";
+})(GatewayIntentBits = exports.GatewayIntentBits || (exports.GatewayIntentBits = {}));
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#receive-events
+ */
+var GatewayDispatchEvents;
+(function (GatewayDispatchEvents) {
+ GatewayDispatchEvents["ApplicationCommandPermissionsUpdate"] = "APPLICATION_COMMAND_PERMISSIONS_UPDATE";
+ GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE";
+ GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE";
+ GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
+ GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
+ GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD";
+ GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE";
+ GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE";
+ GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE";
+ GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE";
+ GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE";
+ GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD";
+ GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE";
+ GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK";
+ GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE";
+ GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE";
+ GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE";
+ GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE";
+ GatewayDispatchEvents["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE";
+ GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE";
+ GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE";
+ GatewayDispatchEvents["IntegrationDelete"] = "INTEGRATION_DELETE";
+ GatewayDispatchEvents["IntegrationUpdate"] = "INTEGRATION_UPDATE";
+ GatewayDispatchEvents["InteractionCreate"] = "INTERACTION_CREATE";
+ GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE";
+ GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE";
+ GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE";
+ GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE";
+ GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK";
+ GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD";
+ GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE";
+ GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL";
+ GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI";
+ GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE";
+ GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE";
+ GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE";
+ GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE";
+ GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE";
+ GatewayDispatchEvents["Ready"] = "READY";
+ GatewayDispatchEvents["Resumed"] = "RESUMED";
+ GatewayDispatchEvents["ThreadCreate"] = "THREAD_CREATE";
+ GatewayDispatchEvents["ThreadDelete"] = "THREAD_DELETE";
+ GatewayDispatchEvents["ThreadListSync"] = "THREAD_LIST_SYNC";
+ GatewayDispatchEvents["ThreadMembersUpdate"] = "THREAD_MEMBERS_UPDATE";
+ GatewayDispatchEvents["ThreadMemberUpdate"] = "THREAD_MEMBER_UPDATE";
+ GatewayDispatchEvents["ThreadUpdate"] = "THREAD_UPDATE";
+ GatewayDispatchEvents["TypingStart"] = "TYPING_START";
+ GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE";
+ GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
+ GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
+ GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
+ GatewayDispatchEvents["GuildScheduledEventCreate"] = "GUILD_SCHEDULED_EVENT_CREATE";
+ GatewayDispatchEvents["GuildScheduledEventUpdate"] = "GUILD_SCHEDULED_EVENT_UPDATE";
+ GatewayDispatchEvents["GuildScheduledEventDelete"] = "GUILD_SCHEDULED_EVENT_DELETE";
+ GatewayDispatchEvents["GuildScheduledEventUserAdd"] = "GUILD_SCHEDULED_EVENT_USER_ADD";
+ GatewayDispatchEvents["GuildScheduledEventUserRemove"] = "GUILD_SCHEDULED_EVENT_USER_REMOVE";
+ GatewayDispatchEvents["AutoModerationRuleCreate"] = "AUTO_MODERATION_RULE_CREATE";
+ GatewayDispatchEvents["AutoModerationRuleUpdate"] = "AUTO_MODERATION_RULE_UPDATE";
+ GatewayDispatchEvents["AutoModerationRuleDelete"] = "AUTO_MODERATION_RULE_DELETE";
+ GatewayDispatchEvents["AutoModerationActionExecution"] = "AUTO_MODERATION_ACTION_EXECUTION";
+ GatewayDispatchEvents["GuildAuditLogEntryCreate"] = "GUILD_AUDIT_LOG_ENTRY_CREATE";
+})(GatewayDispatchEvents = exports.GatewayDispatchEvents || (exports.GatewayDispatchEvents = {}));
+// #endregion Shared
+//# sourceMappingURL=v9.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/v9.js.map b/node_modules/discord-api-types/gateway/v9.js.map
new file mode 100644
index 0000000..948abdd
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v9.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"v9.js","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;AAoCH,2CAAyB;AAEZ,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC;;GAEG;AACH,IAAY,cA8CX;AA9CD,WAAY,cAAc;IACzB;;OAEG;IACH,2DAAQ,CAAA;IACR;;;OAGG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,2EAAgB,CAAA;IAChB;;OAEG;IACH,uDAAU,CAAA;IACV;;OAEG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,iFAAmB,CAAA;IACnB;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,sDAAK,CAAA;IACL;;OAEG;IACH,oEAAY,CAAA;AACb,CAAC,EA9CW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QA8CzB;AAED;;GAEG;AACH,IAAY,iBA8EX;AA9ED,WAAY,iBAAiB;IAC5B;;OAEG;IACH,4EAAoB,CAAA;IACpB;;;;OAIG;IACH,8EAAa,CAAA;IACb;;;;OAIG;IACH,0EAAW,CAAA;IACX;;;;OAIG;IACH,oFAAgB,CAAA;IAChB;;;;OAIG;IACH,4FAAoB,CAAA;IACpB;;OAEG;IACH,4FAAoB,CAAA;IACpB;;;;OAIG;IACH,wEAAkB,CAAA;IAClB;;OAEG;IACH,0EAAW,CAAA;IACX;;OAEG;IACH,kFAAe,CAAA;IACf;;;;OAIG;IACH,4EAAY,CAAA;IACZ;;;;OAIG;IACH,oFAAgB,CAAA;IAChB;;OAEG;IACH,sFAAiB,CAAA;IACjB;;;;OAIG;IACH,gFAAc,CAAA;IACd;;;;;;;OAOG;IACH,sFAAiB,CAAA;AAClB,CAAC,EA9EW,iBAAiB,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AA2C,CAAA;IAC3C,0EAAiD,CAAA;IACjD,iFAAwD,CAAA;IACxD,qFAA4D,CAAA;IAC5D,yDAAgC,CAAA;IAChC,2DAAkC,CAAA;IAClC,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,wCAAe,CAAA;IACf,4CAAmB,CAAA;IACnB,uDAA8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,4DAAmC,CAAA;IACnC,sEAA6C,CAAA;IAC7C,oEAA2C,CAAA;IAC3C,uDAA8B,CAAA;IAC9B,qDAA4B,CAAA;IAC5B,mDAA0B,CAAA;IAC1B,kEAAyC,CAAA;IACzC,gEAAuC,CAAA;IACvC,2DAAkC,CAAA;IAClC,mFAA0D,CAAA;IAC1D,mFAA0D,CAAA;IAC1D,mFAA0D,CAAA;IAC1D,sFAA6D,CAAA;IAC7D,4FAAmE,CAAA;IACnE,iFAAwD,CAAA;IACxD,iFAAwD,CAAA;IACxD,iFAAwD,CAAA;IACxD,2FAAkE,CAAA;IAClE,kFAAyD,CAAA;AAC1D,CAAC,EA9DW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QA8DhC;AAsvDD,oBAAoB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/gateway/v9.mjs b/node_modules/discord-api-types/gateway/v9.mjs
new file mode 100644
index 0000000..27b1baf
--- /dev/null
+++ b/node_modules/discord-api-types/gateway/v9.mjs
@@ -0,0 +1,8 @@
+import mod from "./v9.js";
+
+export default mod;
+export const GatewayCloseCodes = mod.GatewayCloseCodes;
+export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
+export const GatewayIntentBits = mod.GatewayIntentBits;
+export const GatewayOpcodes = mod.GatewayOpcodes;
+export const GatewayVersion = mod.GatewayVersion;
diff --git a/node_modules/discord-api-types/globals.d.ts b/node_modules/discord-api-types/globals.d.ts
new file mode 100644
index 0000000..bd4145c
--- /dev/null
+++ b/node_modules/discord-api-types/globals.d.ts
@@ -0,0 +1,92 @@
+/**
+ * https://discord.com/developers/docs/reference#snowflakes
+ */
+export type Snowflake = string;
+/**
+ * https://discord.com/developers/docs/topics/permissions
+ *
+ * @internal
+ */
+export type Permissions = string;
+/**
+ * https://discord.com/developers/docs/reference#message-formatting-formats
+ */
+export declare const FormattingPatterns: {
+ /**
+ * Regular expression for matching a user mention, strictly without a nickname
+ *
+ * The `id` group property is present on the `exec` result of this expression
+ */
+ readonly User: RegExp;
+ /**
+ * Regular expression for matching a user mention, strictly with a nickname
+ *
+ * The `id` group property is present on the `exec` result of this expression
+ *
+ * @deprecated Passing `!` in user mentions is no longer necessary / supported, and future message contents won't have it
+ */
+ readonly UserWithNickname: RegExp;
+ /**
+ * Regular expression for matching a user mention, with or without a nickname
+ *
+ * The `id` group property is present on the `exec` result of this expression
+ *
+ * @deprecated Passing `!` in user mentions is no longer necessary / supported, and future message contents won't have it
+ */
+ readonly UserWithOptionalNickname: RegExp;
+ /**
+ * Regular expression for matching a channel mention
+ *
+ * The `id` group property is present on the `exec` result of this expression
+ */
+ readonly Channel: RegExp;
+ /**
+ * Regular expression for matching a role mention
+ *
+ * The `id` group property is present on the `exec` result of this expression
+ */
+ readonly Role: RegExp;
+ /**
+ * Regular expression for matching a application command mention
+ *
+ * The `fullName` (possibly including `name`, `subcommandOrGroup` and `subcommand`) and `id` group properties are present on the `exec` result of this expression
+ */
+ readonly SlashCommand: RegExp;
+ /**
+ * Regular expression for matching a custom emoji, either static or animated
+ *
+ * The `animated`, `name` and `id` group properties are present on the `exec` result of this expression
+ */
+ readonly Emoji: RegExp;
+ /**
+ * Regular expression for matching strictly an animated custom emoji
+ *
+ * The `animated`, `name` and `id` group properties are present on the `exec` result of this expression
+ */
+ readonly AnimatedEmoji: RegExp;
+ /**
+ * Regular expression for matching strictly a static custom emoji
+ *
+ * The `name` and `id` group properties are present on the `exec` result of this expression
+ */
+ readonly StaticEmoji: RegExp;
+ /**
+ * Regular expression for matching a timestamp, either default or custom styled
+ *
+ * The `timestamp` and `style` group properties are present on the `exec` result of this expression
+ */
+ readonly Timestamp: RegExp;
+ /**
+ * Regular expression for matching strictly default styled timestamps
+ *
+ * The `timestamp` group property is present on the `exec` result of this expression
+ */
+ readonly DefaultStyledTimestamp: RegExp;
+ /**
+ * Regular expression for matching strictly custom styled timestamps
+ *
+ * The `timestamp` and `style` group properties are present on the `exec` result of this expression
+ */
+ readonly StyledTimestamp: RegExp;
+};
+//# sourceMappingURL=globals.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/globals.d.ts.map b/node_modules/discord-api-types/globals.d.ts.map
new file mode 100644
index 0000000..1a81c64
--- /dev/null
+++ b/node_modules/discord-api-types/globals.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["globals.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;GAEG;AACH,eAAO,MAAM,kBAAkB;IAC9B;;;;OAIG;;IAEH;;;;;;OAMG;;IAEH;;;;;;OAMG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAIH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAGH;;;;OAIG;;IAEH;;;;OAIG;;CAEM,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/globals.js b/node_modules/discord-api-types/globals.js
new file mode 100644
index 0000000..636db41
--- /dev/null
+++ b/node_modules/discord-api-types/globals.js
@@ -0,0 +1,94 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.FormattingPatterns = void 0;
+/**
+ * https://discord.com/developers/docs/reference#message-formatting-formats
+ */
+exports.FormattingPatterns = {
+ /**
+ * Regular expression for matching a user mention, strictly without a nickname
+ *
+ * The `id` group property is present on the `exec` result of this expression
+ */
+ User: /<@(?<id>\d{17,20})>/,
+ /**
+ * Regular expression for matching a user mention, strictly with a nickname
+ *
+ * The `id` group property is present on the `exec` result of this expression
+ *
+ * @deprecated Passing `!` in user mentions is no longer necessary / supported, and future message contents won't have it
+ */
+ UserWithNickname: /<@!(?<id>\d{17,20})>/,
+ /**
+ * Regular expression for matching a user mention, with or without a nickname
+ *
+ * The `id` group property is present on the `exec` result of this expression
+ *
+ * @deprecated Passing `!` in user mentions is no longer necessary / supported, and future message contents won't have it
+ */
+ UserWithOptionalNickname: /<@!?(?<id>\d{17,20})>/,
+ /**
+ * Regular expression for matching a channel mention
+ *
+ * The `id` group property is present on the `exec` result of this expression
+ */
+ Channel: /<#(?<id>\d{17,20})>/,
+ /**
+ * Regular expression for matching a role mention
+ *
+ * The `id` group property is present on the `exec` result of this expression
+ */
+ Role: /<@&(?<id>\d{17,20})>/,
+ /**
+ * Regular expression for matching a application command mention
+ *
+ * The `fullName` (possibly including `name`, `subcommandOrGroup` and `subcommand`) and `id` group properties are present on the `exec` result of this expression
+ */
+ SlashCommand:
+ // eslint-disable-next-line unicorn/no-unsafe-regex
+ /<\/(?<fullName>(?<name>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32})(?: (?<subcommandOrGroup>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?(?: (?<subcommand>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?):(?<id>\d{17,20})>/u,
+ /**
+ * Regular expression for matching a custom emoji, either static or animated
+ *
+ * The `animated`, `name` and `id` group properties are present on the `exec` result of this expression
+ */
+ Emoji: /<(?<animated>a)?:(?<name>\w{2,32}):(?<id>\d{17,20})>/,
+ /**
+ * Regular expression for matching strictly an animated custom emoji
+ *
+ * The `animated`, `name` and `id` group properties are present on the `exec` result of this expression
+ */
+ AnimatedEmoji: /<(?<animated>a):(?<name>\w{2,32}):(?<id>\d{17,20})>/,
+ /**
+ * Regular expression for matching strictly a static custom emoji
+ *
+ * The `name` and `id` group properties are present on the `exec` result of this expression
+ */
+ StaticEmoji: /<:(?<name>\w{2,32}):(?<id>\d{17,20})>/,
+ /**
+ * Regular expression for matching a timestamp, either default or custom styled
+ *
+ * The `timestamp` and `style` group properties are present on the `exec` result of this expression
+ */
+ // eslint-disable-next-line prefer-named-capture-group
+ Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[DFRTdft]))?>/,
+ /**
+ * Regular expression for matching strictly default styled timestamps
+ *
+ * The `timestamp` group property is present on the `exec` result of this expression
+ */
+ DefaultStyledTimestamp: /<t:(?<timestamp>-?\d{1,13})>/,
+ /**
+ * Regular expression for matching strictly custom styled timestamps
+ *
+ * The `timestamp` and `style` group properties are present on the `exec` result of this expression
+ */
+ StyledTimestamp: /<t:(?<timestamp>-?\d{1,13}):(?<style>[DFRTdft])>/,
+};
+/**
+ * Freezes the formatting patterns
+ *
+ * @internal
+ */
+Object.freeze(exports.FormattingPatterns);
+//# sourceMappingURL=globals.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/globals.js.map b/node_modules/discord-api-types/globals.js.map
new file mode 100644
index 0000000..2aa9c0b
--- /dev/null
+++ b/node_modules/discord-api-types/globals.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"globals.js","sourceRoot":"","sources":["globals.ts"],"names":[],"mappings":";;;AAYA;;GAEG;AACU,QAAA,kBAAkB,GAAG;IACjC;;;;OAIG;IACH,IAAI,EAAE,qBAAqB;IAC3B;;;;;;OAMG;IACH,gBAAgB,EAAE,sBAAsB;IACxC;;;;;;OAMG;IACH,wBAAwB,EAAE,uBAAuB;IACjD;;;;OAIG;IACH,OAAO,EAAE,qBAAqB;IAC9B;;;;OAIG;IACH,IAAI,EAAE,sBAAsB;IAC5B;;;;OAIG;IACH,YAAY;IACX,mDAAmD;IACnD,2PAA2P;IAC5P;;;;OAIG;IACH,KAAK,EAAE,sDAAsD;IAC7D;;;;OAIG;IACH,aAAa,EAAE,qDAAqD;IACpE;;;;OAIG;IACH,WAAW,EAAE,uCAAuC;IACpD;;;;OAIG;IACH,sDAAsD;IACtD,SAAS,EAAE,qDAAqD;IAChE;;;;OAIG;IACH,sBAAsB,EAAE,8BAA8B;IACtD;;;;OAIG;IACH,eAAe,EAAE,kDAAkD;CAC1D,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,CAAC,0BAAkB,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/globals.mjs b/node_modules/discord-api-types/globals.mjs
new file mode 100644
index 0000000..0b85bcd
--- /dev/null
+++ b/node_modules/discord-api-types/globals.mjs
@@ -0,0 +1,4 @@
+import mod from "./globals.js";
+
+export default mod;
+export const FormattingPatterns = mod.FormattingPatterns;
diff --git a/node_modules/discord-api-types/package.json b/node_modules/discord-api-types/package.json
new file mode 100644
index 0000000..33a8f97
--- /dev/null
+++ b/node_modules/discord-api-types/package.json
@@ -0,0 +1,202 @@
+{
+ "name": "discord-api-types",
+ "version": "0.37.50",
+ "description": "Discord API typings that are kept up to date for use in bot library creation.",
+ "homepage": "https://discord-api-types.dev",
+ "exports": {
+ "./globals": {
+ "types": "./globals.d.ts",
+ "require": "./globals.js",
+ "import": "./globals.mjs"
+ },
+ "./v6": {
+ "types": "./v6.d.ts",
+ "require": "./v6.js",
+ "import": "./v6.mjs"
+ },
+ "./v8": {
+ "types": "./v8.d.ts",
+ "require": "./v8.js",
+ "import": "./v8.mjs"
+ },
+ "./v9": {
+ "types": "./v9.d.ts",
+ "require": "./v9.js",
+ "import": "./v9.mjs"
+ },
+ "./v10": {
+ "types": "./v10.d.ts",
+ "require": "./v10.js",
+ "import": "./v10.mjs"
+ },
+ "./gateway": {
+ "types": "./gateway/index.d.ts",
+ "require": "./gateway/index.js",
+ "import": "./gateway/index.mjs"
+ },
+ "./gateway/v*": {
+ "types": "./gateway/v*.d.ts",
+ "require": "./gateway/v*.js",
+ "import": "./gateway/v*.mjs"
+ },
+ "./payloads": {
+ "types": "./payloads/index.d.ts",
+ "require": "./payloads/index.js",
+ "import": "./payloads/index.mjs"
+ },
+ "./payloads/v*": {
+ "types": "./payloads/v*/index.d.ts",
+ "require": "./payloads/v*/index.js",
+ "import": "./payloads/v*/index.mjs"
+ },
+ "./rest": {
+ "types": "./rest/index.d.ts",
+ "require": "./rest/index.js",
+ "import": "./rest/index.mjs"
+ },
+ "./rest/v*": {
+ "types": "./rest/v*/index.d.ts",
+ "require": "./rest/v*/index.js",
+ "import": "./rest/v*/index.mjs"
+ },
+ "./rpc": {
+ "types": "./rpc/index.d.ts",
+ "require": "./rpc/index.js",
+ "import": "./rpc/index.mjs"
+ },
+ "./rpc/v*": {
+ "types": "./rpc/v*.d.ts",
+ "require": "./rpc/v*.js",
+ "import": "./rpc/v*.mjs"
+ },
+ "./voice": {
+ "types": "./voice/index.d.ts",
+ "require": "./voice/index.js",
+ "import": "./voice/index.mjs"
+ },
+ "./voice/v*": {
+ "types": "./voice/v*.d.ts",
+ "require": "./voice/v*.js",
+ "import": "./voice/v*.mjs"
+ },
+ "./utils": {
+ "types": "./utils/index.d.ts",
+ "require": "./utils/index.js",
+ "import": "./utils/index.mjs"
+ },
+ "./utils/v*": {
+ "types": "./utils/v*.d.ts",
+ "require": "./utils/v*.js",
+ "import": "./utils/v*.mjs"
+ }
+ },
+ "scripts": {
+ "build:ci": "tsc --noEmit --incremental false",
+ "build:deno": "node ./scripts/deno.mjs",
+ "build:node": "tsc && run-p esm:*",
+ "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
+ "ci:pr": "run-s changelog lint build:deno && node ./scripts/bump-website-version.mjs",
+ "clean:deno": "rimraf deno/",
+ "clean:node": "rimraf {gateway,payloads,rest,rpc,voice,utils}/**/*.{js,mjs,d.ts,*map} {globals,v*}.{js,mjs,d.ts,*map}",
+ "clean": "run-p clean:*",
+ "esm:gateway": "gen-esm-wrapper ./gateway/index.js ./gateway/index.mjs",
+ "esm:globals": "gen-esm-wrapper ./globals.js ./globals.mjs",
+ "esm:payloads": "gen-esm-wrapper ./payloads/index.js ./payloads/index.mjs",
+ "esm:rest": "gen-esm-wrapper ./rest/index.js ./rest/index.mjs",
+ "esm:rpc": "gen-esm-wrapper ./rpc/index.js ./rpc/index.mjs",
+ "esm:utils": "gen-esm-wrapper ./utils/index.js ./utils/index.mjs",
+ "esm:versions": "node ./scripts/versions.mjs",
+ "esm:voice": "gen-esm-wrapper ./voice/index.js ./voice/index.mjs",
+ "lint": "prettier --write . && eslint --fix --ext mjs,ts {gateway,payloads,rest,rpc,voice,utils}/**/*.ts {globals,v*}.ts scripts/**/*.mjs",
+ "postpublish": "run-s clean:node build:deno",
+ "prepare": "tsc -p ./.eslintplugin && (is-ci || husky install)",
+ "prepublishOnly": "run-s clean test:lint build:node",
+ "test:lint": "prettier --check . && eslint --ext mjs,ts {gateway,payloads,rest,rpc,voice,utils}/**/*.ts {globals,v*}.ts scripts/**/*.mjs",
+ "pretest:types": "tsc",
+ "test:types": "tsd -t ./v10.d.ts",
+ "posttest:types": "npm run clean:node"
+ },
+ "keywords": [
+ "discord",
+ "discord api",
+ "types",
+ "discordjs"
+ ],
+ "author": "Vlad Frangu <kingdgrizzle@gmail.com>",
+ "license": "MIT",
+ "files": [
+ "{gateway,payloads,rest,rpc,voice,utils}/**/*.{js,js.map,d.ts,d.ts.map,mjs}",
+ "{globals,v*}.{js,js.map,d.ts,d.ts.map,mjs}"
+ ],
+ "devDependencies": {
+ "@babel/runtime-corejs3": "^7.18.0",
+ "@commitlint/cli": "^17.0.0",
+ "@commitlint/config-angular": "^17.0.0",
+ "@favware/npm-deprecate": "^1.0.4",
+ "@octokit/action": "^3.18.1",
+ "@octokit/webhooks-types": "^5.6.0",
+ "@sapphire/prettier-config": "^1.4.3",
+ "@types/conventional-recommended-bump": "^6.1.0",
+ "@types/node": "^17.0.35",
+ "@typescript-eslint/utils": "^5.53.0",
+ "conventional-changelog-cli": "^2.2.2",
+ "conventional-recommended-bump": "^6.1.0",
+ "eslint": "^8.16.0",
+ "eslint-config-neon": "^0.1.42",
+ "eslint-import-resolver-typescript": "^2.7.1",
+ "eslint-plugin-local": "^1.0.0",
+ "gen-esm-wrapper": "^1.1.3",
+ "husky": "^8.0.1",
+ "is-ci": "^3.0.1",
+ "lint-staged": "^13.2.1",
+ "npm-run-all": "^4.1.5",
+ "prettier": "^2.6.2",
+ "pretty-quick": "^3.1.3",
+ "rimraf": "^3.0.2",
+ "tsd": "^0.25.0",
+ "tsutils": "^3.21.0",
+ "typescript": "^4.9.5"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/discordjs/discord-api-types"
+ },
+ "lint-staged": {
+ "{gateway,payloads,rest,rpc,voice,utils}/**/*.{mjs,js,ts}": "eslint --fix --ext mjs,js,ts",
+ "{globals,v*}.ts": "eslint --fix --ext mjs,js,ts"
+ },
+ "commitlint": {
+ "extends": [
+ "@commitlint/config-angular"
+ ],
+ "rules": {
+ "type-enum": [
+ 2,
+ "always",
+ [
+ "chore",
+ "build",
+ "ci",
+ "docs",
+ "feat",
+ "fix",
+ "perf",
+ "refactor",
+ "revert",
+ "style",
+ "test",
+ "types",
+ "wip"
+ ]
+ ],
+ "scope-case": [
+ 1,
+ "always",
+ "pascal-case"
+ ]
+ }
+ },
+ "tsd": {
+ "directory": "tests"
+ }
+}
diff --git a/node_modules/discord-api-types/payloads/common.d.ts b/node_modules/discord-api-types/payloads/common.d.ts
new file mode 100644
index 0000000..6d4de2a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/common.d.ts
@@ -0,0 +1,310 @@
+import type { LocaleString } from '../rest/common';
+/**
+ * https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
+ *
+ * These flags are exported as `BigInt`s and NOT numbers. Wrapping them in `Number()`
+ * may cause issues, try to use BigInts as much as possible or modules that can
+ * replicate them in some way
+ */
+export declare const PermissionFlagsBits: {
+ /**
+ * Allows creation of instant invites
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ readonly CreateInstantInvite: bigint;
+ /**
+ * Allows kicking members
+ */
+ readonly KickMembers: bigint;
+ /**
+ * Allows banning members
+ */
+ readonly BanMembers: bigint;
+ /**
+ * Allows all permissions and bypasses channel permission overwrites
+ */
+ readonly Administrator: bigint;
+ /**
+ * Allows management and editing of channels
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ readonly ManageChannels: bigint;
+ /**
+ * Allows management and editing of the guild
+ */
+ readonly ManageGuild: bigint;
+ /**
+ * Allows for the addition of reactions to messages
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ readonly AddReactions: bigint;
+ /**
+ * Allows for viewing of audit logs
+ */
+ readonly ViewAuditLog: bigint;
+ /**
+ * Allows for using priority speaker in a voice channel
+ *
+ * Applies to channel types: Voice
+ */
+ readonly PrioritySpeaker: bigint;
+ /**
+ * Allows the user to go live
+ *
+ * Applies to channel types: Voice, Stage
+ */
+ readonly Stream: bigint;
+ /**
+ * Allows guild members to view a channel, which includes reading messages in text channels and joining voice channels
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ readonly ViewChannel: bigint;
+ /**
+ * Allows for sending messages in a channel and creating threads in a forum
+ * (does not allow sending messages in threads)
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ readonly SendMessages: bigint;
+ /**
+ * Allows for sending of `/tts` messages
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ readonly SendTTSMessages: bigint;
+ /**
+ * Allows for deletion of other users messages
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ readonly ManageMessages: bigint;
+ /**
+ * Links sent by users with this permission will be auto-embedded
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ readonly EmbedLinks: bigint;
+ /**
+ * Allows for uploading images and files
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ readonly AttachFiles: bigint;
+ /**
+ * Allows for reading of message history
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ readonly ReadMessageHistory: bigint;
+ /**
+ * Allows for using the `@everyone` tag to notify all users in a channel,
+ * and the `@here` tag to notify all online users in a channel
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ readonly MentionEveryone: bigint;
+ /**
+ * Allows the usage of custom emojis from other servers
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ readonly UseExternalEmojis: bigint;
+ /**
+ * Allows for viewing guild insights
+ */
+ readonly ViewGuildInsights: bigint;
+ /**
+ * Allows for joining of a voice channel
+ *
+ * Applies to channel types: Voice, Stage
+ */
+ readonly Connect: bigint;
+ /**
+ * Allows for speaking in a voice channel
+ *
+ * Applies to channel types: Voice
+ */
+ readonly Speak: bigint;
+ /**
+ * Allows for muting members in a voice channel
+ *
+ * Applies to channel types: Voice, Stage
+ */
+ readonly MuteMembers: bigint;
+ /**
+ * Allows for deafening of members in a voice channel
+ *
+ * Applies to channel types: Voice
+ */
+ readonly DeafenMembers: bigint;
+ /**
+ * Allows for moving of members between voice channels
+ *
+ * Applies to channel types: Voice, Stage
+ */
+ readonly MoveMembers: bigint;
+ /**
+ * Allows for using voice-activity-detection in a voice channel
+ *
+ * Applies to channel types: Voice
+ */
+ readonly UseVAD: bigint;
+ /**
+ * Allows for modification of own nickname
+ */
+ readonly ChangeNickname: bigint;
+ /**
+ * Allows for modification of other users nicknames
+ */
+ readonly ManageNicknames: bigint;
+ /**
+ * Allows management and editing of roles
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ readonly ManageRoles: bigint;
+ /**
+ * Allows management and editing of webhooks
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ readonly ManageWebhooks: bigint;
+ /**
+ * Allows management and editing of emojis, stickers, and soundboard sounds
+ *
+ * @deprecated This is the old name for {@apilink PermissionFlagsBits#ManageGuildExpressions}
+ */
+ readonly ManageEmojisAndStickers: bigint;
+ /**
+ * Allows management and editing of emojis, stickers, and soundboard sounds
+ */
+ readonly ManageGuildExpressions: bigint;
+ /**
+ * Allows members to use application commands, including slash commands and context menu commands
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ readonly UseApplicationCommands: bigint;
+ /**
+ * Allows for requesting to speak in stage channels
+ *
+ * Applies to channel types: Stage
+ */
+ readonly RequestToSpeak: bigint;
+ /**
+ * Allows for creating, editing, and deleting scheduled events
+ *
+ * Applies to channel types: Voice, Stage
+ */
+ readonly ManageEvents: bigint;
+ /**
+ * Allows for deleting and archiving threads, and viewing all private threads
+ *
+ * Applies to channel types: Text
+ */
+ readonly ManageThreads: bigint;
+ /**
+ * Allows for creating public and announcement threads
+ *
+ * Applies to channel types: Text
+ */
+ readonly CreatePublicThreads: bigint;
+ /**
+ * Allows for creating private threads
+ *
+ * Applies to channel types: Text
+ */
+ readonly CreatePrivateThreads: bigint;
+ /**
+ * Allows the usage of custom stickers from other servers
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ readonly UseExternalStickers: bigint;
+ /**
+ * Allows for sending messages in threads
+ *
+ * Applies to channel types: Text
+ */
+ readonly SendMessagesInThreads: bigint;
+ /**
+ * Allows for using Activities (applications with the {@apilink ApplicationFlags.Embedded} flag) in a voice channel
+ *
+ * Applies to channel types: Voice
+ */
+ readonly UseEmbeddedActivities: bigint;
+ /**
+ * Allows for timing out users to prevent them from sending or reacting to messages in chat and threads,
+ * and from speaking in voice and stage channels
+ */
+ readonly ModerateMembers: bigint;
+ /**
+ * Allows for viewing role subscription insights
+ */
+ readonly ViewCreatorMonetizationAnalytics: bigint;
+ /**
+ * Allows for using soundboard in a voice channel
+ *
+ * Applies to channel types: Voice
+ */
+ readonly UseSoundboard: bigint;
+ /**
+ * Allows the usage of custom soundboard sounds from other servers
+ *
+ * Applies to channel types: Voice
+ */
+ readonly UseExternalSounds: bigint;
+ /**
+ * Allows sending voice messages
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ readonly SendVoiceMessages: bigint;
+};
+export type LocalizationMap = Partial<Record<LocaleString, string | null>>;
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#json
+ */
+export interface RESTError {
+ code: number;
+ message: string;
+ errors?: RESTErrorData;
+}
+export interface RESTErrorFieldInformation {
+ code: string;
+ message: string;
+}
+export interface RESTErrorGroupWrapper {
+ _errors: RESTErrorData[];
+}
+export type RESTErrorData = RESTErrorGroupWrapper | RESTErrorFieldInformation | {
+ [k: string]: RESTErrorData;
+} | string;
+/**
+ * https://discord.com/developers/docs/topics/rate-limits#exceeding-a-rate-limit-rate-limit-response-structure
+ */
+export interface RESTRateLimit {
+ /**
+ * An error code for some limits
+ *
+ * {@link RESTJSONErrorCodes}
+ */
+ code?: number;
+ /**
+ * A value indicating if you are being globally rate limited or not
+ */
+ global: boolean;
+ /**
+ * A message saying you are being rate limited.
+ */
+ message: string;
+ /**
+ * The number of seconds to wait before submitting another request.
+ */
+ retry_after: number;
+}
+//# sourceMappingURL=common.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/common.d.ts.map b/node_modules/discord-api-types/payloads/common.d.ts.map
new file mode 100644
index 0000000..2730657
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/common.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;IAC/B;;;;OAIG;;IAEH;;OAEG;;IAGH;;OAEG;;IAEH;;OAEG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;CAEM,CAAC;AASX,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,qBAAqB;IACrC,OAAO,EAAE,aAAa,EAAE,CAAC;CACzB;AAED,MAAM,MAAM,aAAa,GAAG,qBAAqB,GAAG,yBAAyB,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,aAAa,CAAA;CAAE,GAAG,MAAM,CAAC;AAExH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACpB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/common.js b/node_modules/discord-api-types/payloads/common.js
new file mode 100644
index 0000000..842fe80
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/common.js
@@ -0,0 +1,277 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.PermissionFlagsBits = void 0;
+/**
+ * https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
+ *
+ * These flags are exported as `BigInt`s and NOT numbers. Wrapping them in `Number()`
+ * may cause issues, try to use BigInts as much as possible or modules that can
+ * replicate them in some way
+ */
+exports.PermissionFlagsBits = {
+ /**
+ * Allows creation of instant invites
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ CreateInstantInvite: 1n << 0n,
+ /**
+ * Allows kicking members
+ */
+ // eslint-disable-next-line sonarjs/no-identical-expressions
+ KickMembers: 1n << 1n,
+ /**
+ * Allows banning members
+ */
+ BanMembers: 1n << 2n,
+ /**
+ * Allows all permissions and bypasses channel permission overwrites
+ */
+ Administrator: 1n << 3n,
+ /**
+ * Allows management and editing of channels
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ ManageChannels: 1n << 4n,
+ /**
+ * Allows management and editing of the guild
+ */
+ ManageGuild: 1n << 5n,
+ /**
+ * Allows for the addition of reactions to messages
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ AddReactions: 1n << 6n,
+ /**
+ * Allows for viewing of audit logs
+ */
+ ViewAuditLog: 1n << 7n,
+ /**
+ * Allows for using priority speaker in a voice channel
+ *
+ * Applies to channel types: Voice
+ */
+ PrioritySpeaker: 1n << 8n,
+ /**
+ * Allows the user to go live
+ *
+ * Applies to channel types: Voice, Stage
+ */
+ Stream: 1n << 9n,
+ /**
+ * Allows guild members to view a channel, which includes reading messages in text channels and joining voice channels
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ ViewChannel: 1n << 10n,
+ /**
+ * Allows for sending messages in a channel and creating threads in a forum
+ * (does not allow sending messages in threads)
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ SendMessages: 1n << 11n,
+ /**
+ * Allows for sending of `/tts` messages
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ SendTTSMessages: 1n << 12n,
+ /**
+ * Allows for deletion of other users messages
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ ManageMessages: 1n << 13n,
+ /**
+ * Links sent by users with this permission will be auto-embedded
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ EmbedLinks: 1n << 14n,
+ /**
+ * Allows for uploading images and files
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ AttachFiles: 1n << 15n,
+ /**
+ * Allows for reading of message history
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ ReadMessageHistory: 1n << 16n,
+ /**
+ * Allows for using the `@everyone` tag to notify all users in a channel,
+ * and the `@here` tag to notify all online users in a channel
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ MentionEveryone: 1n << 17n,
+ /**
+ * Allows the usage of custom emojis from other servers
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ UseExternalEmojis: 1n << 18n,
+ /**
+ * Allows for viewing guild insights
+ */
+ ViewGuildInsights: 1n << 19n,
+ /**
+ * Allows for joining of a voice channel
+ *
+ * Applies to channel types: Voice, Stage
+ */
+ Connect: 1n << 20n,
+ /**
+ * Allows for speaking in a voice channel
+ *
+ * Applies to channel types: Voice
+ */
+ Speak: 1n << 21n,
+ /**
+ * Allows for muting members in a voice channel
+ *
+ * Applies to channel types: Voice, Stage
+ */
+ MuteMembers: 1n << 22n,
+ /**
+ * Allows for deafening of members in a voice channel
+ *
+ * Applies to channel types: Voice
+ */
+ DeafenMembers: 1n << 23n,
+ /**
+ * Allows for moving of members between voice channels
+ *
+ * Applies to channel types: Voice, Stage
+ */
+ MoveMembers: 1n << 24n,
+ /**
+ * Allows for using voice-activity-detection in a voice channel
+ *
+ * Applies to channel types: Voice
+ */
+ UseVAD: 1n << 25n,
+ /**
+ * Allows for modification of own nickname
+ */
+ ChangeNickname: 1n << 26n,
+ /**
+ * Allows for modification of other users nicknames
+ */
+ ManageNicknames: 1n << 27n,
+ /**
+ * Allows management and editing of roles
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ ManageRoles: 1n << 28n,
+ /**
+ * Allows management and editing of webhooks
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ ManageWebhooks: 1n << 29n,
+ /**
+ * Allows management and editing of emojis, stickers, and soundboard sounds
+ *
+ * @deprecated This is the old name for {@apilink PermissionFlagsBits#ManageGuildExpressions}
+ */
+ ManageEmojisAndStickers: 1n << 30n,
+ /**
+ * Allows management and editing of emojis, stickers, and soundboard sounds
+ */
+ ManageGuildExpressions: 1n << 30n,
+ /**
+ * Allows members to use application commands, including slash commands and context menu commands
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ UseApplicationCommands: 1n << 31n,
+ /**
+ * Allows for requesting to speak in stage channels
+ *
+ * Applies to channel types: Stage
+ */
+ RequestToSpeak: 1n << 32n,
+ /**
+ * Allows for creating, editing, and deleting scheduled events
+ *
+ * Applies to channel types: Voice, Stage
+ */
+ ManageEvents: 1n << 33n,
+ /**
+ * Allows for deleting and archiving threads, and viewing all private threads
+ *
+ * Applies to channel types: Text
+ */
+ ManageThreads: 1n << 34n,
+ /**
+ * Allows for creating public and announcement threads
+ *
+ * Applies to channel types: Text
+ */
+ CreatePublicThreads: 1n << 35n,
+ /**
+ * Allows for creating private threads
+ *
+ * Applies to channel types: Text
+ */
+ CreatePrivateThreads: 1n << 36n,
+ /**
+ * Allows the usage of custom stickers from other servers
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ UseExternalStickers: 1n << 37n,
+ /**
+ * Allows for sending messages in threads
+ *
+ * Applies to channel types: Text
+ */
+ SendMessagesInThreads: 1n << 38n,
+ /**
+ * Allows for using Activities (applications with the {@apilink ApplicationFlags.Embedded} flag) in a voice channel
+ *
+ * Applies to channel types: Voice
+ */
+ UseEmbeddedActivities: 1n << 39n,
+ /**
+ * Allows for timing out users to prevent them from sending or reacting to messages in chat and threads,
+ * and from speaking in voice and stage channels
+ */
+ ModerateMembers: 1n << 40n,
+ /**
+ * Allows for viewing role subscription insights
+ */
+ ViewCreatorMonetizationAnalytics: 1n << 41n,
+ /**
+ * Allows for using soundboard in a voice channel
+ *
+ * Applies to channel types: Voice
+ */
+ UseSoundboard: 1n << 42n,
+ /**
+ * Allows the usage of custom soundboard sounds from other servers
+ *
+ * Applies to channel types: Voice
+ */
+ UseExternalSounds: 1n << 45n,
+ /**
+ * Allows sending voice messages
+ *
+ * Applies to channel types: Text, Voice, Stage
+ */
+ SendVoiceMessages: 1n << 46n,
+};
+/**
+ * Freeze the object of bits, preventing any modifications to it
+ *
+ * @internal
+ */
+Object.freeze(exports.PermissionFlagsBits);
+//# sourceMappingURL=common.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/common.js.map b/node_modules/discord-api-types/payloads/common.js.map
new file mode 100644
index 0000000..3a756d3
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/common.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"common.js","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACU,QAAA,mBAAmB,GAAG;IAClC;;;;OAIG;IACH,mBAAmB,EAAE,EAAE,IAAI,EAAE;IAC7B;;OAEG;IACH,4DAA4D;IAC5D,WAAW,EAAE,EAAE,IAAI,EAAE;IACrB;;OAEG;IACH,UAAU,EAAE,EAAE,IAAI,EAAE;IACpB;;OAEG;IACH,aAAa,EAAE,EAAE,IAAI,EAAE;IACvB;;;;OAIG;IACH,cAAc,EAAE,EAAE,IAAI,EAAE;IACxB;;OAEG;IACH,WAAW,EAAE,EAAE,IAAI,EAAE;IACrB;;;;OAIG;IACH,YAAY,EAAE,EAAE,IAAI,EAAE;IACtB;;OAEG;IACH,YAAY,EAAE,EAAE,IAAI,EAAE;IACtB;;;;OAIG;IACH,eAAe,EAAE,EAAE,IAAI,EAAE;IACzB;;;;OAIG;IACH,MAAM,EAAE,EAAE,IAAI,EAAE;IAChB;;;;OAIG;IACH,WAAW,EAAE,EAAE,IAAI,GAAG;IACtB;;;;;OAKG;IACH,YAAY,EAAE,EAAE,IAA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G;IACxB;;;;OAIG;IACH,mBAAmB,EAAE,EAAE,IAAI,GAAG;IAC9B;;;;OAIG;IACH,oBAAoB,EAAE,EAAE,IAAI,GAAG;IAC/B;;;;OAIG;IACH,mBAAmB,EAAE,EAAE,IAAI,GAAG;IAC9B;;;;OAIG;IACH,qBAAqB,EAAE,EAAE,IAAI,GAAG;IAChC;;;;OAIG;IACH,qBAAqB,EAAE,EAAE,IAAI,GAAG;IAChC;;;OAGG;IACH,eAAe,EAAE,EAAE,IAAI,GAAG;IAC1B;;OAEG;IACH,gCAAgC,EAAE,EAAE,IAAI,GAAG;IAC3C;;;;OAIG;IACH,aAAa,EAAE,EAAE,IAAI,GAAG;IACxB;;;;OAIG;IACH,iBAAiB,EAAE,EAAE,IAAI,GAAG;IAC5B;;;;OAIG;IACH,iBAAiB,EAAE,EAAE,IAAI,GAAG;CACnB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,CAAC,2BAAmB,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/index.d.ts b/node_modules/discord-api-types/payloads/index.d.ts
new file mode 100644
index 0000000..3fbd05d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/index.d.ts
@@ -0,0 +1,2 @@
+export * from './v10/index';
+//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/index.d.ts.map b/node_modules/discord-api-types/payloads/index.d.ts.map
new file mode 100644
index 0000000..574afa8
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,cAAc,aAAa,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/index.js b/node_modules/discord-api-types/payloads/index.js
new file mode 100644
index 0000000..1e06394
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/index.js
@@ -0,0 +1,20 @@
+"use strict";
+// This file exports all the payloads available in the recommended API version
+// Thereby, things MAY break in the future. Try sticking to imports from a specific version
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./v10/index"), exports);
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/index.js.map b/node_modules/discord-api-types/payloads/index.js.map
new file mode 100644
index 0000000..5e06be2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,2FAA2F;;;;;;;;;;;;;;;;AAE3F,8CAA4B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/index.mjs b/node_modules/discord-api-types/payloads/index.mjs
new file mode 100644
index 0000000..a5b5a7b
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/index.mjs
@@ -0,0 +1,69 @@
+import mod from "./index.js";
+
+export default mod;
+export const APIApplicationCommandPermissionsConstant = mod.APIApplicationCommandPermissionsConstant;
+export const ActivityFlags = mod.ActivityFlags;
+export const ActivityPlatform = mod.ActivityPlatform;
+export const ActivityType = mod.ActivityType;
+export const AllowedMentionsTypes = mod.AllowedMentionsTypes;
+export const ApplicationCommandOptionType = mod.ApplicationCommandOptionType;
+export const ApplicationCommandPermissionType = mod.ApplicationCommandPermissionType;
+export const ApplicationCommandType = mod.ApplicationCommandType;
+export const ApplicationFlags = mod.ApplicationFlags;
+export const ApplicationRoleConnectionMetadataType = mod.ApplicationRoleConnectionMetadataType;
+export const AttachmentFlags = mod.AttachmentFlags;
+export const AuditLogEvent = mod.AuditLogEvent;
+export const AuditLogOptionsType = mod.AuditLogOptionsType;
+export const AutoModerationActionType = mod.AutoModerationActionType;
+export const AutoModerationRuleEventType = mod.AutoModerationRuleEventType;
+export const AutoModerationRuleKeywordPresetType = mod.AutoModerationRuleKeywordPresetType;
+export const AutoModerationRuleTriggerType = mod.AutoModerationRuleTriggerType;
+export const ButtonStyle = mod.ButtonStyle;
+export const ChannelFlags = mod.ChannelFlags;
+export const ChannelType = mod.ChannelType;
+export const ComponentType = mod.ComponentType;
+export const ConnectionService = mod.ConnectionService;
+export const ConnectionVisibility = mod.ConnectionVisibility;
+export const EmbedType = mod.EmbedType;
+export const ForumLayoutType = mod.ForumLayoutType;
+export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications;
+export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter;
+export const GuildFeature = mod.GuildFeature;
+export const GuildHubType = mod.GuildHubType;
+export const GuildMFALevel = mod.GuildMFALevel;
+export const GuildMemberFlags = mod.GuildMemberFlags;
+export const GuildNSFWLevel = mod.GuildNSFWLevel;
+export const GuildOnboardingMode = mod.GuildOnboardingMode;
+export const GuildOnboardingPromptType = mod.GuildOnboardingPromptType;
+export const GuildPremiumTier = mod.GuildPremiumTier;
+export const GuildScheduledEventEntityType = mod.GuildScheduledEventEntityType;
+export const GuildScheduledEventPrivacyLevel = mod.GuildScheduledEventPrivacyLevel;
+export const GuildScheduledEventStatus = mod.GuildScheduledEventStatus;
+export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags;
+export const GuildVerificationLevel = mod.GuildVerificationLevel;
+export const GuildWidgetStyle = mod.GuildWidgetStyle;
+export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior;
+export const InteractionResponseType = mod.InteractionResponseType;
+export const InteractionType = mod.InteractionType;
+export const InviteTargetType = mod.InviteTargetType;
+export const MembershipScreeningFieldType = mod.MembershipScreeningFieldType;
+export const MessageActivityType = mod.MessageActivityType;
+export const MessageFlags = mod.MessageFlags;
+export const MessageType = mod.MessageType;
+export const OAuth2Scopes = mod.OAuth2Scopes;
+export const OverwriteType = mod.OverwriteType;
+export const PermissionFlagsBits = mod.PermissionFlagsBits;
+export const PresenceUpdateStatus = mod.PresenceUpdateStatus;
+export const RoleFlags = mod.RoleFlags;
+export const SortOrderType = mod.SortOrderType;
+export const StageInstancePrivacyLevel = mod.StageInstancePrivacyLevel;
+export const StickerFormatType = mod.StickerFormatType;
+export const StickerType = mod.StickerType;
+export const TeamMemberMembershipState = mod.TeamMemberMembershipState;
+export const TextInputStyle = mod.TextInputStyle;
+export const ThreadAutoArchiveDuration = mod.ThreadAutoArchiveDuration;
+export const ThreadMemberFlags = mod.ThreadMemberFlags;
+export const UserFlags = mod.UserFlags;
+export const UserPremiumType = mod.UserPremiumType;
+export const VideoQualityMode = mod.VideoQualityMode;
+export const WebhookType = mod.WebhookType;
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.d.ts
new file mode 100644
index 0000000..d3d5318
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.d.ts
@@ -0,0 +1,6 @@
+import type { Snowflake } from '../../../../../globals';
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+export type APIApplicationCommandAttachmentOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Attachment>;
+export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Attachment, Snowflake>;
+//# sourceMappingURL=attachment.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map
new file mode 100644
index 0000000..9b6b302
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,qCAAqC,GAChD,+BAA+B,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;AAE1E,MAAM,MAAM,oDAAoD,GAAG,4BAA4B,CAC9F,4BAA4B,CAAC,UAAU,EACvC,SAAS,CACT,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.js b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.js
new file mode 100644
index 0000000..c79ce94
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=attachment.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.js.map
new file mode 100644
index 0000000..0cf9a21
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"attachment.js","sourceRoot":"","sources":["attachment.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts
new file mode 100644
index 0000000..26890a3
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts
@@ -0,0 +1,23 @@
+import type { LocalizationMap } from '../../../../../v10';
+import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
+export interface APIApplicationCommandOptionBase<Type extends ApplicationCommandOptionType> {
+ type: Type;
+ name: string;
+ name_localizations?: LocalizationMap | null;
+ description: string;
+ description_localizations?: LocalizationMap | null;
+ required?: boolean;
+}
+export interface APIInteractionDataOptionBase<T extends ApplicationCommandOptionType, D> {
+ name: string;
+ type: T;
+ value: D;
+}
+export type APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<Base extends APIApplicationCommandOptionBase<ApplicationCommandOptionType>, ChoiceType extends APIApplicationCommandOptionChoice> = (Base & {
+ autocomplete: true;
+ choices?: [];
+}) | (Base & {
+ autocomplete?: false;
+ choices?: ChoiceType[];
+});
+//# sourceMappingURL=base.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts.map
new file mode 100644
index 0000000..1122f57
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,WAAW,+BAA+B,CAAC,IAAI,SAAS,4BAA4B;IACzF,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,4BAA4B,CAAC,CAAC,SAAS,4BAA4B,EAAE,CAAC;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,CAAC,CAAC;CACT;AAED,MAAM,MAAM,2DAA2D,CACtE,IAAI,SAAS,+BAA+B,CAAC,4BAA4B,CAAC,EAC1E,UAAU,SAAS,iCAAiC,IAElD,CAAC,IAAI,GAAG;IACR,YAAY,EAAE,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,EAAE,CAAC;CACZ,CAAC,GACF,CAAC,IAAI,GAAG;IACR,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.js b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.js
new file mode 100644
index 0000000..1e393c0
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=base.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.js.map
new file mode 100644
index 0000000..755d82e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"base.js","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.d.ts
new file mode 100644
index 0000000..9f5fc46
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.d.ts
@@ -0,0 +1,5 @@
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+export type APIApplicationCommandBooleanOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Boolean>;
+export type APIApplicationCommandInteractionDataBooleanOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Boolean, boolean>;
+//# sourceMappingURL=boolean.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map
new file mode 100644
index 0000000..814d6a2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["boolean.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,kCAAkC,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAEvH,MAAM,MAAM,iDAAiD,GAAG,4BAA4B,CAC3F,4BAA4B,CAAC,OAAO,EACpC,OAAO,CACP,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.js b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.js
new file mode 100644
index 0000000..8b82929
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=boolean.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.js.map
new file mode 100644
index 0000000..2eb5640
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"boolean.js","sourceRoot":"","sources":["boolean.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.d.ts
new file mode 100644
index 0000000..4b64561
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.d.ts
@@ -0,0 +1,9 @@
+import type { Snowflake } from '../../../../../globals';
+import type { ChannelType } from '../../../channel';
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
+ channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>[];
+}
+export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Channel, Snowflake>;
+//# sourceMappingURL=channel.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.d.ts.map
new file mode 100644
index 0000000..e954d0d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,kCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E,aAAa,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;CAC7E;AAED,MAAM,MAAM,iDAAiD,GAAG,4BAA4B,CAC3F,4BAA4B,CAAC,OAAO,EACpC,SAAS,CACT,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.js b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.js
new file mode 100644
index 0000000..7c587bc
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=channel.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.js.map
new file mode 100644
index 0000000..f1057f4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.d.ts
new file mode 100644
index 0000000..1a4f008
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.d.ts
@@ -0,0 +1,18 @@
+import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
+import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
+interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
+ /**
+ * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
+ */
+ min_value?: number;
+ /**
+ * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
+ */
+ max_value?: number;
+}
+export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandIntegerOptionBase, APIApplicationCommandOptionChoice<number>>;
+export interface APIApplicationCommandInteractionDataIntegerOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Integer, number> {
+ focused?: boolean;
+}
+export {};
+//# sourceMappingURL=integer.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.d.ts.map
new file mode 100644
index 0000000..4970fe5
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["integer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,UAAU,sCACT,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,kCAAkC,GAAG,2DAA2D,CAC3G,sCAAsC,EACtC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,iDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,OAAO,EAAE,MAAM,CAAC;IAClF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.js b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.js
new file mode 100644
index 0000000..bdae3b2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=integer.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.js.map
new file mode 100644
index 0000000..525e62f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"integer.js","sourceRoot":"","sources":["integer.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.d.ts
new file mode 100644
index 0000000..385bf4a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.d.ts
@@ -0,0 +1,6 @@
+import type { Snowflake } from '../../../../../globals';
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+export type APIApplicationCommandMentionableOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Mentionable>;
+export type APIApplicationCommandInteractionDataMentionableOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Mentionable, Snowflake>;
+//# sourceMappingURL=mentionable.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map
new file mode 100644
index 0000000..3e93ca5
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"mentionable.d.ts","sourceRoot":"","sources":["mentionable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,sCAAsC,GACjD,+BAA+B,CAAC,4BAA4B,CAAC,WAAW,CAAC,CAAC;AAE3E,MAAM,MAAM,qDAAqD,GAAG,4BAA4B,CAC/F,4BAA4B,CAAC,WAAW,EACxC,SAAS,CACT,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.js b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.js
new file mode 100644
index 0000000..41a60eb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=mentionable.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.js.map
new file mode 100644
index 0000000..f0d8dfb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"mentionable.js","sourceRoot":"","sources":["mentionable.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.d.ts
new file mode 100644
index 0000000..4292b67
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.d.ts
@@ -0,0 +1,18 @@
+import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
+import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
+interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
+ /**
+ * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
+ */
+ min_value?: number;
+ /**
+ * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
+ */
+ max_value?: number;
+}
+export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandNumberOptionBase, APIApplicationCommandOptionChoice<number>>;
+export interface APIApplicationCommandInteractionDataNumberOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Number, number> {
+ focused?: boolean;
+}
+export {};
+//# sourceMappingURL=number.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.d.ts.map
new file mode 100644
index 0000000..e440f36
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,UAAU,qCACT,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC;IAC5E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,iCAAiC,GAAG,2DAA2D,CAC1G,qCAAqC,EACrC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,gDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.js b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.js
new file mode 100644
index 0000000..f779930
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=number.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.js.map
new file mode 100644
index 0000000..28d5b03
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"number.js","sourceRoot":"","sources":["number.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.d.ts
new file mode 100644
index 0000000..0a00fd7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.d.ts
@@ -0,0 +1,6 @@
+import type { Snowflake } from '../../../../../globals';
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+export type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Role>;
+export type APIApplicationCommandInteractionDataRoleOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Role, Snowflake>;
+//# sourceMappingURL=role.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.d.ts.map
new file mode 100644
index 0000000..79188e6
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"role.d.ts","sourceRoot":"","sources":["role.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,+BAA+B,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;AAEjH,MAAM,MAAM,8CAA8C,GAAG,4BAA4B,CACxF,4BAA4B,CAAC,IAAI,EACjC,SAAS,CACT,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.js b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.js
new file mode 100644
index 0000000..db328fc
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=role.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.js.map
new file mode 100644
index 0000000..490c1af
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"role.js","sourceRoot":"","sources":["role.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.d.ts
new file mode 100644
index 0000000..3ec3497
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.d.ts
@@ -0,0 +1,26 @@
+import type { LocalizationMap } from '../../../../../v10';
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
+ */
+export declare enum ApplicationCommandOptionType {
+ Subcommand = 1,
+ SubcommandGroup = 2,
+ String = 3,
+ Integer = 4,
+ Boolean = 5,
+ User = 6,
+ Channel = 7,
+ Role = 8,
+ Mentionable = 9,
+ Number = 10,
+ Attachment = 11
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure
+ */
+export interface APIApplicationCommandOptionChoice<ValueType = string | number> {
+ name: string;
+ name_localizations?: LocalizationMap | null;
+ value: ValueType;
+}
+//# sourceMappingURL=shared.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.d.ts.map
new file mode 100644
index 0000000..6076bd1
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;GAEG;AACH,oBAAY,4BAA4B;IACvC,UAAU,IAAI;IACd,eAAe,IAAA;IACf,MAAM,IAAA;IACN,OAAO,IAAA;IACP,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,WAAW,IAAA;IACX,MAAM,KAAA;IACN,UAAU,KAAA;CACV;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC,CAAC,SAAS,GAAG,MAAM,GAAG,MAAM;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC5C,KAAK,EAAE,SAAS,CAAC;CACjB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.js b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.js
new file mode 100644
index 0000000..e71ad7d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.js
@@ -0,0 +1,21 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ApplicationCommandOptionType = void 0;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
+ */
+var ApplicationCommandOptionType;
+(function (ApplicationCommandOptionType) {
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Subcommand"] = 1] = "Subcommand";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["SubcommandGroup"] = 2] = "SubcommandGroup";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["String"] = 3] = "String";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Integer"] = 4] = "Integer";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Boolean"] = 5] = "Boolean";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["User"] = 6] = "User";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Channel"] = 7] = "Channel";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Role"] = 8] = "Role";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Mentionable"] = 9] = "Mentionable";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Number"] = 10] = "Number";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Attachment"] = 11] = "Attachment";
+})(ApplicationCommandOptionType = exports.ApplicationCommandOptionType || (exports.ApplicationCommandOptionType = {}));
+//# sourceMappingURL=shared.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.js.map
new file mode 100644
index 0000000..b3672ec
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"shared.js","sourceRoot":"","sources":["shared.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,IAAY,4BAYX;AAZD,WAAY,4BAA4B;IACvC,2FAAc,CAAA;IACd,qGAAe,CAAA;IACf,mFAAM,CAAA;IACN,qFAAO,CAAA;IACP,qFAAO,CAAA;IACP,+EAAI,CAAA;IACJ,qFAAO,CAAA;IACP,+EAAI,CAAA;IACJ,6FAAW,CAAA;IACX,oFAAM,CAAA;IACN,4FAAU,CAAA;AACX,CAAC,EAZW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAYvC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.d.ts
new file mode 100644
index 0000000..be078fb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.d.ts
@@ -0,0 +1,18 @@
+import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
+import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
+interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
+ /**
+ * For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).
+ */
+ min_length?: number;
+ /**
+ * For option type `STRING`, the maximum allowed length (minimum of `1`, maximum of `6000`).
+ */
+ max_length?: number;
+}
+export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandStringOptionBase, APIApplicationCommandOptionChoice<string>>;
+export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
+ focused?: boolean;
+}
+export {};
+//# sourceMappingURL=string.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.d.ts.map
new file mode 100644
index 0000000..295f1e0
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,UAAU,qCACT,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC;IAC5E;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,iCAAiC,GAAG,2DAA2D,CAC1G,qCAAqC,EACrC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,gDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.js b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.js
new file mode 100644
index 0000000..2967e4e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=string.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.js.map
new file mode 100644
index 0000000..84875d4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"string.js","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.d.ts
new file mode 100644
index 0000000..0264fa3
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.d.ts
@@ -0,0 +1,12 @@
+import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput';
+import type { APIApplicationCommandOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
+ options?: APIApplicationCommandBasicOption[];
+}
+export interface APIApplicationCommandInteractionDataSubcommandOption {
+ name: string;
+ type: ApplicationCommandOptionType.Subcommand;
+ options?: APIApplicationCommandInteractionDataBasicOption[];
+}
+//# sourceMappingURL=subcommand.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map
new file mode 100644
index 0000000..32405a2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"subcommand.d.ts","sourceRoot":"","sources":["subcommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gCAAgC,EAAE,+CAA+C,EAAE,MAAM,cAAc,CAAC;AACtH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,qCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,UAAU,CAAC;IAChF,OAAO,CAAC,EAAE,gCAAgC,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,oDAAoD;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,4BAA4B,CAAC,UAAU,CAAC;IAC9C,OAAO,CAAC,EAAE,+CAA+C,EAAE,CAAC;CAC5D"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.js b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.js
new file mode 100644
index 0000000..b82efe7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=subcommand.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.js.map
new file mode 100644
index 0000000..8872d4a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"subcommand.js","sourceRoot":"","sources":["subcommand.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts
new file mode 100644
index 0000000..e5f3aad
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts
@@ -0,0 +1,12 @@
+import type { APIApplicationCommandOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+import type { APIApplicationCommandInteractionDataSubcommandOption, APIApplicationCommandSubcommandOption } from './subcommand';
+export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
+ options?: APIApplicationCommandSubcommandOption[];
+}
+export interface APIApplicationCommandInteractionDataSubcommandGroupOption {
+ name: string;
+ type: ApplicationCommandOptionType.SubcommandGroup;
+ options: APIApplicationCommandInteractionDataSubcommandOption[];
+}
+//# sourceMappingURL=subcommandGroup.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map
new file mode 100644
index 0000000..a3aca65
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"subcommandGroup.d.ts","sourceRoot":"","sources":["subcommandGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EACX,oDAAoD,EACpD,qCAAqC,EACrC,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,0CAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,eAAe,CAAC;IACrF,OAAO,CAAC,EAAE,qCAAqC,EAAE,CAAC;CAClD;AAED,MAAM,WAAW,yDAAyD;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,4BAA4B,CAAC,eAAe,CAAC;IACnD,OAAO,EAAE,oDAAoD,EAAE,CAAC;CAChE"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.js b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.js
new file mode 100644
index 0000000..e06cf57
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=subcommandGroup.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map
new file mode 100644
index 0000000..fcf1472
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"subcommandGroup.js","sourceRoot":"","sources":["subcommandGroup.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.d.ts
new file mode 100644
index 0000000..cf470c6
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.d.ts
@@ -0,0 +1,6 @@
+import type { Snowflake } from '../../../../../globals';
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+export type APIApplicationCommandUserOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.User>;
+export type APIApplicationCommandInteractionDataUserOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.User, Snowflake>;
+//# sourceMappingURL=user.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.d.ts.map
new file mode 100644
index 0000000..e6d5c84
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,+BAA+B,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;AAEjH,MAAM,MAAM,8CAA8C,GAAG,4BAA4B,CACxF,4BAA4B,CAAC,IAAI,EACjC,SAAS,CACT,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.js b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.js
new file mode 100644
index 0000000..33269d3
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=user.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.js.map
new file mode 100644
index 0000000..ff1a289
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.d.ts
new file mode 100644
index 0000000..3014c11
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.d.ts
@@ -0,0 +1,61 @@
+import type { APIInteractionDataResolved } from '../../index';
+import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands';
+import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base';
+import type { APIApplicationCommandAttachmentOption, APIApplicationCommandInteractionDataAttachmentOption } from './_chatInput/attachment';
+import type { APIApplicationCommandBooleanOption, APIApplicationCommandInteractionDataBooleanOption } from './_chatInput/boolean';
+import type { APIApplicationCommandChannelOption, APIApplicationCommandInteractionDataChannelOption } from './_chatInput/channel';
+import type { APIApplicationCommandIntegerOption, APIApplicationCommandInteractionDataIntegerOption } from './_chatInput/integer';
+import type { APIApplicationCommandInteractionDataMentionableOption, APIApplicationCommandMentionableOption } from './_chatInput/mentionable';
+import type { APIApplicationCommandInteractionDataNumberOption, APIApplicationCommandNumberOption } from './_chatInput/number';
+import type { APIApplicationCommandInteractionDataRoleOption, APIApplicationCommandRoleOption } from './_chatInput/role';
+import type { APIApplicationCommandInteractionDataStringOption, APIApplicationCommandStringOption } from './_chatInput/string';
+import type { APIApplicationCommandInteractionDataSubcommandOption, APIApplicationCommandSubcommandOption } from './_chatInput/subcommand';
+import type { APIApplicationCommandInteractionDataSubcommandGroupOption, APIApplicationCommandSubcommandGroupOption } from './_chatInput/subcommandGroup';
+import type { APIApplicationCommandInteractionDataUserOption, APIApplicationCommandUserOption } from './_chatInput/user';
+import type { APIBaseApplicationCommandInteractionData } from './internals';
+export * from './_chatInput/attachment';
+export * from './_chatInput/base';
+export * from './_chatInput/boolean';
+export * from './_chatInput/channel';
+export * from './_chatInput/integer';
+export * from './_chatInput/mentionable';
+export * from './_chatInput/number';
+export * from './_chatInput/role';
+export * from './_chatInput/shared';
+export * from './_chatInput/string';
+export * from './_chatInput/subcommand';
+export * from './_chatInput/subcommandGroup';
+export * from './_chatInput/user';
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
+ */
+export type APIApplicationCommandBasicOption = APIApplicationCommandStringOption | APIApplicationCommandIntegerOption | APIApplicationCommandBooleanOption | APIApplicationCommandUserOption | APIApplicationCommandChannelOption | APIApplicationCommandRoleOption | APIApplicationCommandMentionableOption | APIApplicationCommandNumberOption | APIApplicationCommandAttachmentOption;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
+ */
+export type APIApplicationCommandOption = APIApplicationCommandSubcommandOption | APIApplicationCommandSubcommandGroupOption | APIApplicationCommandBasicOption;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure
+ */
+export type APIApplicationCommandInteractionDataOption = APIApplicationCommandInteractionDataSubcommandOption | APIApplicationCommandInteractionDataSubcommandGroupOption | APIApplicationCommandInteractionDataBasicOption;
+export type APIApplicationCommandInteractionDataBasicOption = APIApplicationCommandInteractionDataStringOption | APIApplicationCommandInteractionDataIntegerOption | APIApplicationCommandInteractionDataBooleanOption | APIApplicationCommandInteractionDataUserOption | APIApplicationCommandInteractionDataChannelOption | APIApplicationCommandInteractionDataRoleOption | APIApplicationCommandInteractionDataMentionableOption | APIApplicationCommandInteractionDataNumberOption | APIApplicationCommandInteractionDataAttachmentOption;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
+ */
+export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
+ options?: APIApplicationCommandInteractionDataOption[];
+ resolved?: APIInteractionDataResolved;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIChatInputApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIChatInputApplicationCommandInteractionData>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIChatInputApplicationCommandDMInteraction = APIDMInteractionWrapper<APIChatInputApplicationCommandInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIChatInputApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIChatInputApplicationCommandInteraction>;
+//# sourceMappingURL=chatInput.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.d.ts.map
new file mode 100644
index 0000000..a996b1f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"chatInput.d.ts","sourceRoot":"","sources":["chatInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAE,uCAAuC,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC9G,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,KAAK,EACX,qCAAqC,EACrC,oDAAoD,EACpD,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACX,kCAAkC,EAClC,iDAAiD,EACjD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,kCAAkC,EAClC,iDAAiD,EACjD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,kCAAkC,EAClC,iDAAiD,EACjD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,qDAAqD,EACrD,sCAAsC,EACtC,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACX,gDAAgD,EAChD,iCAAiC,EACjC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACX,8CAA8C,EAC9C,+BAA+B,EAC/B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACX,gDAAgD,EAChD,iCAAiC,EACjC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACX,oDAAoD,EACpD,qCAAqC,EACrC,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACX,yDAAyD,EACzD,0CAA0C,EAC1C,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACX,8CAA8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;GAEG;AACH,MAAM,MAAM,2CAA2C,GACtD,uBAAuB,CAAC,yCAAyC,CAAC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,8CAA8C,GACzD,0BAA0B,CAAC,yCAAyC,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.js b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.js
new file mode 100644
index 0000000..2d3c151
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.js
@@ -0,0 +1,30 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./_chatInput/attachment"), exports);
+__exportStar(require("./_chatInput/base"), exports);
+__exportStar(require("./_chatInput/boolean"), exports);
+__exportStar(require("./_chatInput/channel"), exports);
+__exportStar(require("./_chatInput/integer"), exports);
+__exportStar(require("./_chatInput/mentionable"), exports);
+__exportStar(require("./_chatInput/number"), exports);
+__exportStar(require("./_chatInput/role"), exports);
+__exportStar(require("./_chatInput/shared"), exports);
+__exportStar(require("./_chatInput/string"), exports);
+__exportStar(require("./_chatInput/subcommand"), exports);
+__exportStar(require("./_chatInput/subcommandGroup"), exports);
+__exportStar(require("./_chatInput/user"), exports);
+//# sourceMappingURL=chatInput.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.js.map
new file mode 100644
index 0000000..5c6ed3c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"chatInput.js","sourceRoot":"","sources":["chatInput.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAiDA,0DAAwC;AACxC,oDAAkC;AAClC,uDAAqC;AACrC,uDAAqC;AACrC,uDAAqC;AACrC,2DAAyC;AACzC,sDAAoC;AACpC,oDAAkC;AAClC,sDAAoC;AACpC,sDAAoC;AACpC,0DAAwC;AACxC,+DAA6C;AAC7C,oDAAkC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.d.ts
new file mode 100644
index 0000000..b472856
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.d.ts
@@ -0,0 +1,66 @@
+import type { Snowflake } from '../../../../globals';
+import type { APIMessage } from '../../channel';
+import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands';
+import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIUserInteractionDataResolved } from '../base';
+import type { APIBaseApplicationCommandInteractionData } from './internals';
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
+ */
+export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
+ target_id: Snowflake;
+ resolved: APIUserInteractionDataResolved;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
+ */
+export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
+ target_id: Snowflake;
+ resolved: APIMessageApplicationCommandInteractionDataResolved;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
+ */
+export interface APIMessageApplicationCommandInteractionDataResolved {
+ messages: Record<Snowflake, APIMessage>;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
+ */
+export type APIContextMenuInteractionData = APIUserApplicationCommandInteractionData | APIMessageApplicationCommandInteractionData;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIUserApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIUserApplicationCommandInteractionData>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIUserApplicationCommandDMInteraction = APIDMInteractionWrapper<APIUserApplicationCommandInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIUserApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIUserApplicationCommandInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIMessageApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIMessageApplicationCommandInteractionData>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIMessageApplicationCommandDMInteraction = APIDMInteractionWrapper<APIMessageApplicationCommandInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIMessageApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIMessageApplicationCommandInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIContextMenuInteraction = APIUserApplicationCommandInteraction | APIMessageApplicationCommandInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIContextMenuDMInteraction = APIUserApplicationCommandDMInteraction | APIMessageApplicationCommandDMInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIContextMenuGuildInteraction = APIUserApplicationCommandGuildInteraction | APIMessageApplicationCommandGuildInteraction;
+//# sourceMappingURL=contextMenu.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.d.ts.map
new file mode 100644
index 0000000..80d3a58
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"contextMenu.d.ts","sourceRoot":"","sources":["contextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,uCAAuC,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC9G,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC;AACnH,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,aAAa,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,wCAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,IAAI,CAAC;IAC7E,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,8BAA8B,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,2CAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,OAAO,CAAC;IAChF,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,mDAAmD,CAAC;CAC9D;AAED;;GAEG;AACH,MAAM,WAAW,mDAAmD;IACnE,QAAQ,EAAE,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GACtC,wCAAwC,GACxC,2CAA2C,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAC/C,uCAAuC,CAAC,wCAAwC,CAAC,CAAC;AAEnF;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,uBAAuB,CAAC,oCAAoC,CAAC,CAAC;AAEnH;;GAEG;AACH,MAAM,MAAM,yCAAyC,GACpD,0BAA0B,CAAC,oCAAoC,CAAC,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,uCAAuC,GAClD,uCAAuC,CAAC,2CAA2C,CAAC,CAAC;AAEtF;;GAEG;AACH,MAAM,MAAM,yCAAyC,GACpD,uBAAuB,CAAC,uCAAuC,CAAC,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,4CAA4C,GACvD,0BAA0B,CAAC,uCAAuC,CAAC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,oCAAoC,GAAG,uCAAuC,CAAC;AAEvH;;GAEG;AACH,MAAM,MAAM,2BAA2B,GACpC,sCAAsC,GACtC,yCAAyC,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,8BAA8B,GACvC,yCAAyC,GACzC,4CAA4C,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.js b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.js
new file mode 100644
index 0000000..e96ad8c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=contextMenu.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.js.map
new file mode 100644
index 0000000..c905148
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"contextMenu.js","sourceRoot":"","sources":["contextMenu.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.d.ts
new file mode 100644
index 0000000..7c351c1
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.d.ts
@@ -0,0 +1,9 @@
+import type { Snowflake } from '../../../../globals';
+import type { ApplicationCommandType } from '../applicationCommands';
+export interface APIBaseApplicationCommandInteractionData<Type extends ApplicationCommandType> {
+ id: Snowflake;
+ type: Type;
+ name: string;
+ guild_id?: Snowflake;
+}
+//# sourceMappingURL=internals.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.d.ts.map
new file mode 100644
index 0000000..8b35c6a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"internals.d.ts","sourceRoot":"","sources":["internals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,MAAM,WAAW,wCAAwC,CAAC,IAAI,SAAS,sBAAsB;IAC5F,EAAE,EAAE,SAAS,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.js b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.js
new file mode 100644
index 0000000..00585b4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=internals.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.js.map
new file mode 100644
index 0000000..c4808b2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"internals.js","sourceRoot":"","sources":["internals.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.d.ts
new file mode 100644
index 0000000..431bbbe
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.d.ts
@@ -0,0 +1,55 @@
+import type { Snowflake } from '../../../../globals';
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure
+ */
+export interface APIGuildApplicationCommandPermissions {
+ /**
+ * The id of the command or the application id if that permission applies to all commands
+ */
+ id: Snowflake;
+ /**
+ * The id of the application the command belongs to
+ */
+ application_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The permissions for the command in the guild
+ */
+ permissions: APIApplicationCommandPermission[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure
+ */
+export interface APIApplicationCommandPermission {
+ /**
+ * The id of the role, user or channel. Can also be a permission constant
+ */
+ id: Snowflake;
+ /**
+ * Role, user or channel
+ */
+ type: ApplicationCommandPermissionType;
+ /**
+ * `true` to allow, `false`, to disallow
+ */
+ permission: boolean;
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
+ */
+export declare enum ApplicationCommandPermissionType {
+ Role = 1,
+ User = 2,
+ Channel = 3
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants
+ */
+export declare const APIApplicationCommandPermissionsConstant: {
+ Everyone: (guildId: string | bigint) => Snowflake;
+ AllChannels: (guildId: string | bigint) => Snowflake;
+};
+//# sourceMappingURL=permissions.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.d.ts.map
new file mode 100644
index 0000000..4c1bcee
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACrD;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,cAAc,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,+BAA+B,EAAE,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,gCAAgC,CAAC;IACvC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,oBAAY,gCAAgC;IAC3C,IAAI,IAAI;IACR,IAAI,IAAA;IACJ,OAAO,IAAA;CACP;AAED;;GAEG;AACH,eAAO,MAAM,wCAAwC;wBAEhC,MAAM,GAAG,MAAM,KAAG,SAAS;2BACxB,MAAM,GAAG,MAAM,KAAG,SAAS;CAClD,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.js b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.js
new file mode 100644
index 0000000..8ef0aa2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.js
@@ -0,0 +1,21 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.APIApplicationCommandPermissionsConstant = exports.ApplicationCommandPermissionType = void 0;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
+ */
+var ApplicationCommandPermissionType;
+(function (ApplicationCommandPermissionType) {
+ ApplicationCommandPermissionType[ApplicationCommandPermissionType["Role"] = 1] = "Role";
+ ApplicationCommandPermissionType[ApplicationCommandPermissionType["User"] = 2] = "User";
+ ApplicationCommandPermissionType[ApplicationCommandPermissionType["Channel"] = 3] = "Channel";
+})(ApplicationCommandPermissionType = exports.ApplicationCommandPermissionType || (exports.ApplicationCommandPermissionType = {}));
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants
+ */
+exports.APIApplicationCommandPermissionsConstant = {
+ // eslint-disable-next-line unicorn/prefer-native-coercion-functions
+ Everyone: (guildId) => String(guildId),
+ AllChannels: (guildId) => String(BigInt(guildId) - 1n),
+};
+//# sourceMappingURL=permissions.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.js.map
new file mode 100644
index 0000000..f485500
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"permissions.js","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":";;;AA0CA;;GAEG;AACH,IAAY,gCAIX;AAJD,WAAY,gCAAgC;IAC3C,uFAAQ,CAAA;IACR,uFAAI,CAAA;IACJ,6FAAO,CAAA;AACR,CAAC,EAJW,gCAAgC,GAAhC,wCAAgC,KAAhC,wCAAgC,QAI3C;AAED;;GAEG;AACU,QAAA,wCAAwC,GAAG;IACvD,oEAAoE;IACpE,QAAQ,EAAE,CAAC,OAAwB,EAAa,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;IAClE,WAAW,EAAE,CAAC,OAAwB,EAAa,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;CAClF,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.d.ts
new file mode 100644
index 0000000..658b271
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.d.ts
@@ -0,0 +1,111 @@
+import type { Permissions, Snowflake } from '../../../globals';
+import type { LocalizationMap } from '../../../v10';
+import type { APIApplicationCommandOption, APIChatInputApplicationCommandDMInteraction, APIChatInputApplicationCommandGuildInteraction, APIChatInputApplicationCommandInteraction, APIChatInputApplicationCommandInteractionData } from './_applicationCommands/chatInput';
+import type { APIContextMenuDMInteraction, APIContextMenuGuildInteraction, APIContextMenuInteraction, APIContextMenuInteractionData } from './_applicationCommands/contextMenu';
+import type { APIBaseInteraction } from './base';
+import type { InteractionType } from './responses';
+export * from './_applicationCommands/chatInput';
+export * from './_applicationCommands/contextMenu';
+export * from './_applicationCommands/permissions';
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object
+ */
+export interface APIApplicationCommand {
+ /**
+ * Unique id of the command
+ */
+ id: Snowflake;
+ /**
+ * Type of the command
+ */
+ type: ApplicationCommandType;
+ /**
+ * Unique id of the parent application
+ */
+ application_id: Snowflake;
+ /**
+ * Guild id of the command, if not global
+ */
+ guild_id?: Snowflake;
+ /**
+ * 1-32 character name; `CHAT_INPUT` command names must be all lowercase matching `^[-_\p{L}\p{N}\p{sc=Deva}\p{sc=Thai}]{1,32}$`
+ */
+ name: string;
+ /**
+ * Localization dictionary for the name field. Values follow the same restrictions as name
+ */
+ name_localizations?: LocalizationMap | null;
+ /**
+ * The localized name
+ */
+ name_localized?: string;
+ /**
+ * 1-100 character description for `CHAT_INPUT` commands, empty string for `USER` and `MESSAGE` commands
+ */
+ description: string;
+ /**
+ * Localization dictionary for the description field. Values follow the same restrictions as description
+ */
+ description_localizations?: LocalizationMap | null;
+ /**
+ * The localized description
+ */
+ description_localized?: string;
+ /**
+ * The parameters for the `CHAT_INPUT` command, max 25
+ */
+ options?: APIApplicationCommandOption[];
+ /**
+ * Set of permissions represented as a bitset
+ */
+ default_member_permissions: Permissions | null;
+ /**
+ * Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible
+ */
+ dm_permission?: boolean;
+ /**
+ * Whether the command is enabled by default when the app is added to a guild
+ *
+ * If missing, this property should be assumed as `true`
+ *
+ * @deprecated Use `dm_permission` and/or `default_member_permissions` instead
+ */
+ default_permission?: boolean;
+ /**
+ * Indicates whether the command is age-restricted, defaults to `false`
+ */
+ nsfw?: boolean;
+ /**
+ * Autoincrementing version identifier updated during substantial record changes
+ */
+ version: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types
+ */
+export declare enum ApplicationCommandType {
+ ChatInput = 1,
+ User = 2,
+ Message = 3
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
+ */
+export type APIApplicationCommandInteractionData = APIChatInputApplicationCommandInteractionData | APIContextMenuInteractionData;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationCommandInteractionData> = APIBaseInteraction<InteractionType.ApplicationCommand, Data> & Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommand, Data>, 'channel' | 'channel_id' | 'data' | 'app_permissions'>>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIApplicationCommandInteraction = APIChatInputApplicationCommandInteraction | APIContextMenuInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIApplicationCommandDMInteraction = APIChatInputApplicationCommandDMInteraction | APIContextMenuDMInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIApplicationCommandGuildInteraction = APIChatInputApplicationCommandGuildInteraction | APIContextMenuGuildInteraction;
+//# sourceMappingURL=applicationCommands.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.d.ts.map
new file mode 100644
index 0000000..36b0553
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"applicationCommands.d.ts","sourceRoot":"","sources":["applicationCommands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EACX,2BAA2B,EAC3B,2CAA2C,EAC3C,8CAA8C,EAC9C,yCAAyC,EACzC,6CAA6C,EAC7C,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EACX,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,EACzB,6BAA6B,EAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAA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yC,GAAG,yBAAyB,CAAC;AAErH;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC3C,2CAA2C,GAC3C,2BAA2B,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAC9C,8CAA8C,GAC9C,8BAA8B,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.js b/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.js
new file mode 100644
index 0000000..7113b3c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.js
@@ -0,0 +1,30 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ApplicationCommandType = void 0;
+__exportStar(require("./_applicationCommands/chatInput"), exports);
+__exportStar(require("./_applicationCommands/contextMenu"), exports);
+__exportStar(require("./_applicationCommands/permissions"), exports);
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types
+ */
+var ApplicationCommandType;
+(function (ApplicationCommandType) {
+ ApplicationCommandType[ApplicationCommandType["ChatInput"] = 1] = "ChatInput";
+ ApplicationCommandType[ApplicationCommandType["User"] = 2] = "User";
+ ApplicationCommandType[ApplicationCommandType["Message"] = 3] = "Message";
+})(ApplicationCommandType = exports.ApplicationCommandType || (exports.ApplicationCommandType = {}));
+//# sourceMappingURL=applicationCommands.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.js.map
new file mode 100644
index 0000000..03c85bd
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"applicationCommands.js","sourceRoot":"","sources":["applicationCommands.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAkBA,mEAAiD;AACjD,qEAAmD;AACnD,qEAAmD;AA4EnD;;GAEG;AACH,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IACjC,6EAAa,CAAA;IACb,mEAAI,CAAA;IACJ,yEAAO,CAAA;AACR,CAAC,EAJW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAIjC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.d.ts
new file mode 100644
index 0000000..7b6f60c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.d.ts
@@ -0,0 +1,11 @@
+import type { APIBaseInteraction, APIChatInputApplicationCommandInteractionData, APIDMInteractionWrapper, APIGuildInteractionWrapper, InteractionType } from '../index';
+export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIChatInputApplicationCommandInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>>, 'data'>>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIApplicationCommandAutocompleteDMInteraction = APIDMInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIApplicationCommandAutocompleteGuildInteraction = APIGuildInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
+//# sourceMappingURL=autocomplete.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.d.ts.map
new file mode 100644
index 0000000..ee8a8c9
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["autocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kBAAkB,EAClB,6CAA6C,EAC7C,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,4CAA4C,GAAG,kBAAkB,CAC5E,eAAe,CAAC,8BAA8B,EAC9C,6CAA6C,CAC7C,GACA,QAAQ,CACP,IAAI,CACH,kBAAkB,CACjB,eAAe,CAAC,8BAA8B,EAC9C,QAAQ,CAAC,IAAI,CAAC,6CAA6C,EAAE,SAAS,CAAC,CAAC,CACxE,EACD,MAAM,CACN,CACD,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,8CAA8C,GACzD,uBAAuB,CAAC,4CAA4C,CAAC,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAC5D,0BAA0B,CAAC,4CAA4C,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.js b/node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.js
new file mode 100644
index 0000000..c165ee2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=autocomplete.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.js.map
new file mode 100644
index 0000000..d7f27d6
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"autocomplete.js","sourceRoot":"","sources":["autocomplete.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/base.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/base.d.ts
new file mode 100644
index 0000000..ddb4b58
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/base.d.ts
@@ -0,0 +1,147 @@
+import type { Permissions, Snowflake } from '../../../globals';
+import type { APIRole, LocaleString } from '../../../v10';
+import type { APIAttachment, APIChannel, APIMessage, APIPartialChannel, APIThreadMetadata } from '../channel';
+import type { APIGuildMember } from '../guild';
+import type { APIUser } from '../user';
+import type { InteractionType } from './responses';
+export type PartialAPIMessageInteractionGuildMember = Pick<APIGuildMember, 'roles' | 'premium_since' | 'pending' | 'nick' | 'mute' | 'joined_at' | 'deaf' | 'communication_disabled_until' | 'avatar'>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object
+ */
+export interface APIMessageInteraction {
+ /**
+ * ID of the interaction
+ */
+ id: Snowflake;
+ /**
+ * The type of interaction
+ */
+ type: InteractionType;
+ /**
+ * The name of the application command, including subcommands and subcommand groups
+ */
+ name: string;
+ /**
+ * The user who invoked the interaction
+ */
+ user: APIUser;
+ /**
+ * The guild member who invoked the interaction, only sent in MESSAGE_CREATE events
+ */
+ member?: PartialAPIMessageInteractionGuildMember;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+export interface APIInteractionGuildMember extends APIGuildMember {
+ permissions: Permissions;
+ user: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export interface APIBaseInteraction<Type extends InteractionType, Data> {
+ /**
+ * ID of the interaction
+ */
+ id: Snowflake;
+ /**
+ * ID of the application this interaction is for
+ */
+ application_id: Snowflake;
+ /**
+ * The type of interaction
+ */
+ type: Type;
+ /**
+ * The command data payload
+ */
+ data?: Data;
+ /**
+ * The guild it was sent from
+ */
+ guild_id?: Snowflake;
+ /**
+ * The channel it was sent from
+ */
+ channel?: Partial<APIChannel> & Pick<APIChannel, 'id' | 'type'>;
+ /**
+ * The id of the channel it was sent from
+ *
+ * @deprecated Use {@apilink APIBaseInteraction#channel} instead
+ */
+ channel_id?: Snowflake;
+ /**
+ * Guild member data for the invoking user, including permissions
+ *
+ * **This is only sent when an interaction is invoked in a guild**
+ */
+ member?: APIInteractionGuildMember;
+ /**
+ * User object for the invoking user, if invoked in a DM
+ */
+ user?: APIUser;
+ /**
+ * A continuation token for responding to the interaction
+ */
+ token: string;
+ /**
+ * Read-only property, always `1`
+ */
+ version: 1;
+ /**
+ * For components, the message they were attached to
+ */
+ message?: APIMessage;
+ /**
+ * Bitwise set of permissions the app or bot has within the channel the interaction was sent from
+ */
+ app_permissions?: Permissions;
+ /**
+ * The selected language of the invoking user
+ */
+ locale: LocaleString;
+ /**
+ * The guild's preferred locale, if invoked in a guild
+ */
+ guild_locale?: LocaleString;
+}
+export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<Original, 'member' | 'guild_id'> & Required<Pick<Original, 'user'>>;
+export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<Original, 'user'> & Required<Pick<Original, 'member' | 'guild_id'>>;
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object
+ */
+export interface APIInteractionDataResolvedChannel extends Required<APIPartialChannel> {
+ thread_metadata?: APIThreadMetadata | null;
+ permissions: Permissions;
+ parent_id?: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'user' | 'deaf' | 'mute'> {
+ permissions: Permissions;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
+ */
+export interface APIInteractionDataResolved {
+ users?: Record<Snowflake, APIUser>;
+ roles?: Record<Snowflake, APIRole>;
+ members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
+ channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
+ attachments?: Record<Snowflake, APIAttachment>;
+}
+/**
+ * @deprecated Renamed to `APIInteractionDataResolved`
+ */
+export type APIChatInputApplicationCommandInteractionDataResolved = APIInteractionDataResolved;
+/**
+ * `users` and optional `members` from APIInteractionDataResolved, for user commands and user selects
+ */
+export type APIUserInteractionDataResolved = Required<Pick<APIInteractionDataResolved, 'users'>> & Pick<APIInteractionDataResolved, 'members'>;
+/**
+ * @deprecated Renamed to `APIUserInteractionDataResolved`
+ */
+export type APIUserApplicationCommandInteractionDataResolved = APIUserInteractionDataResolved;
+//# sourceMappingURL=base.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/base.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/base.d.ts.map
new file mode 100644
index 0000000..246ad2d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/base.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC9G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,MAAM,uCAAuC,GAAG,IAAI,CACzD,cAAc,EACZ,OAAO,GAC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C/C;AAED;;GAEG;AACH,MAAM,MAAM,qDAAqD,GAAG,0BAA0B,CAAC;AAE/F;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,QAAQ,CAAC,IAAI,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC,GAC/F,IAAI,CAAC,0BAA0B,EAAE,SAAS,CAAC,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,gDAAgD,GAAG,8BAA8B,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/base.js b/node_modules/discord-api-types/payloads/v10/_interactions/base.js
new file mode 100644
index 0000000..1e393c0
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/base.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=base.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/base.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/base.js.map
new file mode 100644
index 0000000..755d82e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/base.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"base.js","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.d.ts
new file mode 100644
index 0000000..42a7947
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.d.ts
@@ -0,0 +1,42 @@
+import type { Snowflake } from '../../../globals';
+import type { ComponentType } from '../channel';
+import type { APIBaseInteraction, InteractionType } from '../interactions';
+import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIInteractionDataResolved, APIUserInteractionDataResolved } from './base';
+export type APIMessageComponentInteraction = APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData>, 'channel' | 'channel_id' | 'data' | 'app_permissions' | 'message'>>;
+export type APIMessageComponentButtonInteraction = APIBaseInteraction<InteractionType.MessageComponent, APIMessageButtonInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.MessageComponent, APIMessageButtonInteractionData>, 'channel' | 'channel_id' | 'data' | 'app_permissions' | 'message'>>;
+export type APIMessageComponentSelectMenuInteraction = APIBaseInteraction<InteractionType.MessageComponent, APIMessageSelectMenuInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.MessageComponent, APIMessageSelectMenuInteractionData>, 'channel' | 'channel_id' | 'data' | 'app_permissions' | 'message'>>;
+export type APIMessageComponentInteractionData = APIMessageButtonInteractionData | APIMessageSelectMenuInteractionData;
+export interface APIMessageComponentBaseInteractionData<CType extends ComponentType> {
+ /**
+ * The `custom_id` of the component
+ */
+ custom_id: string;
+ /**
+ * The type of the component
+ */
+ component_type: CType;
+}
+export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>;
+export interface APIMessageStringSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.StringSelect> {
+ values: string[];
+}
+export interface APIMessageUserSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.UserSelect> {
+ values: Snowflake[];
+ resolved: APIUserInteractionDataResolved;
+}
+export interface APIMessageRoleSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.RoleSelect> {
+ values: Snowflake[];
+ resolved: Required<Pick<APIInteractionDataResolved, 'roles'>>;
+}
+export interface APIMessageMentionableSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.MentionableSelect> {
+ values: Snowflake[];
+ resolved: Pick<APIInteractionDataResolved, 'users' | 'members' | 'roles'>;
+}
+export interface APIMessageChannelSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.ChannelSelect> {
+ values: Snowflake[];
+ resolved: Required<Pick<APIInteractionDataResolved, 'channels'>>;
+}
+export type APIMessageSelectMenuInteractionData = APIMessageStringSelectInteractionData | APIMessageUserSelectInteractionData | APIMessageRoleSelectInteractionData | APIMessageMentionableSelectInteractionData | APIMessageChannelSelectInteractionData;
+export type APIMessageComponentDMInteraction = APIDMInteractionWrapper<APIMessageComponentInteraction>;
+export type APIMessageComponentGuildInteraction = APIGuildInteractionWrapper<APIMessageComponentInteraction>;
+//# sourceMappingURL=messageComponents.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.d.ts.map
new file mode 100644
index 0000000..9a5ecd6
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"messageComponents.d.ts","sourceRoot":"","sources":["messageComponents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,KAAK,EACX,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,8BAA8B,EAC9B,MAAM,QAAQ,CAAC;AAEhB,MAAM,MAAM,8BAA8B,GAAG,kBAAkB,CAC9D,eAAe,CAAC,gBAAgB,EAChC,kCAAkC,CAClC,GACA,QAAQ,CACP,IAAI,CACH,kBAAkB,CAAC,eAAe,CAAC,gBAAgB,EAAE,kCAAkC,CAAC,EACxF,SAAS,GAAG,YAAY,GAAG,MAAM,GAAG,iBAAiB,GAAG,SAAS,CACjE,CACD,CAAC;AAEH,MAAM,MAAM,oCAAoC,GAAG,kBAAkB,CACpE,eAAe,CAAC,gBAAgB,EAChC,+BAA+B,CAC/B,GACA,QAAQ,CACP,IAAI,CACH,kBAAkB,CAAC,eAAe,CAAC,gBAAgB,EAAE,+BAA+B,CAAC,EACrF,SAAS,GAAG,YAAY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C,CAAC;CAC1E;AAED,MAAM,WAAW,sCAChB,SAAQ,sCAAsC,CAAC,aAAa,CAAC,aAAa,CAAC;IAC3E,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,0BAA0B,EAAE,UAAU,CAAC,CAAC,CAAC;CACjE;AAED,MAAM,MAAM,mCAAmC,GAC5C,qCAAqC,GACrC,mCAAmC,GACnC,mCAAmC,GACnC,0CAA0C,GAC1C,sCAAsC,CAAC;AAE1C,MAAM,MAAM,gCAAgC,GAAG,uBAAuB,CAAC,8BAA8B,CAAC,CAAC;AAEvG,MAAM,MAAM,mCAAmC,GAAG,0BAA0B,CAAC,8BAA8B,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.js b/node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.js
new file mode 100644
index 0000000..3f086c7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=messageComponents.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.js.map
new file mode 100644
index 0000000..571b70d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"messageComponents.js","sourceRoot":"","sources":["messageComponents.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.d.ts
new file mode 100644
index 0000000..bd4a6c5
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.d.ts
@@ -0,0 +1,36 @@
+import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel';
+import type { APIBaseInteraction, APIDMInteractionWrapper, APIGuildInteractionWrapper, ComponentType, InteractionType } from '../index';
+export interface ModalSubmitComponent {
+ type: ComponentType;
+ custom_id: string;
+ value: string;
+}
+export interface ModalSubmitActionRowComponent extends Omit<APIActionRowComponent<APIModalActionRowComponent>, 'components'> {
+ components: ModalSubmitComponent[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure
+ */
+export interface APIModalSubmission {
+ /**
+ * A developer-defined identifier for the component, max 100 characters
+ */
+ custom_id: string;
+ /**
+ * A list of child components
+ */
+ components: ModalSubmitActionRowComponent[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIModalSubmitInteraction = APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission> & Required<Pick<APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission>, 'data'>>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIModalSubmitDMInteraction = APIDMInteractionWrapper<APIModalSubmitInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIModalSubmitGuildInteraction = APIGuildInteractionWrapper<APIModalSubmitInteraction>;
+//# sourceMappingURL=modalSubmit.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.d.ts.map
new file mode 100644
index 0000000..55d63ef
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"modalSubmit.d.ts","sourceRoot":"","sources":["modalSubmit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,KAAK,EACX,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,aAAa,EACb,eAAe,EACf,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,oBAAoB;IACpC,IAAI,EAAE,aAAa,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,6BAChB,SAAQ,IAAI,CAAC,qBAAqB,CAAC,0BAA0B,CAAC,EAAE,YAAY,CAAC;IAC7E,UAAU,EAAE,oBAAoB,EAAE,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,6BAA6B,EAAE,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,kBAAkB,CAAC,eAAe,CAAC,WAAW,EAAE,kBAAkB,CAAC,GAC1G,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,WAAW,EAAE,kBAAkB,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAE7F;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,uBAAuB,CAAC,yBAAyB,CAAC,CAAC;AAE7F;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,0BAA0B,CAAC,yBAAyB,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.js b/node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.js
new file mode 100644
index 0000000..59c83cb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=modalSubmit.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.js.map
new file mode 100644
index 0000000..ad871d9
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"modalSubmit.js","sourceRoot":"","sources":["modalSubmit.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/ping.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/ping.d.ts
new file mode 100644
index 0000000..f684653
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/ping.d.ts
@@ -0,0 +1,4 @@
+import type { APIBaseInteraction } from './base';
+import type { InteractionType } from './responses';
+export type APIPingInteraction = Omit<APIBaseInteraction<InteractionType.Ping, never>, 'locale'>;
+//# sourceMappingURL=ping.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/ping.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/ping.d.ts.map
new file mode 100644
index 0000000..6ffd8aa
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/ping.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ping.d.ts","sourceRoot":"","sources":["ping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/ping.js b/node_modules/discord-api-types/payloads/v10/_interactions/ping.js
new file mode 100644
index 0000000..c8b17d7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/ping.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=ping.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/ping.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/ping.js.map
new file mode 100644
index 0000000..9246c5a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/ping.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ping.js","sourceRoot":"","sources":["ping.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/responses.d.ts b/node_modules/discord-api-types/payloads/v10/_interactions/responses.d.ts
new file mode 100644
index 0000000..6524903
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/responses.d.ts
@@ -0,0 +1,104 @@
+import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v10';
+import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel';
+import type { MessageFlags } from '../index';
+import type { APIApplicationCommandOptionChoice } from './applicationCommands';
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
+ */
+export declare enum InteractionType {
+ Ping = 1,
+ ApplicationCommand = 2,
+ MessageComponent = 3,
+ ApplicationCommandAutocomplete = 4,
+ ModalSubmit = 5
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object
+ */
+export type APIInteractionResponse = APIInteractionResponsePong | APIInteractionResponseChannelMessageWithSource | APIInteractionResponseDeferredChannelMessageWithSource | APIInteractionResponseDeferredMessageUpdate | APIInteractionResponseUpdateMessage | APIApplicationCommandAutocompleteResponse | APIModalInteractionResponse;
+export interface APIInteractionResponsePong {
+ type: InteractionResponseType.Pong;
+}
+export interface APIApplicationCommandAutocompleteResponse {
+ type: InteractionResponseType.ApplicationCommandAutocompleteResult;
+ data: APICommandAutocompleteInteractionResponseCallbackData;
+}
+export interface APIModalInteractionResponse {
+ type: InteractionResponseType.Modal;
+ data: APIModalInteractionResponseCallbackData;
+}
+export interface APIInteractionResponseChannelMessageWithSource {
+ type: InteractionResponseType.ChannelMessageWithSource;
+ data: APIInteractionResponseCallbackData;
+}
+export interface APIInteractionResponseDeferredChannelMessageWithSource {
+ type: InteractionResponseType.DeferredChannelMessageWithSource;
+ data?: Pick<APIInteractionResponseCallbackData, 'flags'>;
+}
+export interface APIInteractionResponseDeferredMessageUpdate {
+ type: InteractionResponseType.DeferredMessageUpdate;
+}
+export interface APIInteractionResponseUpdateMessage {
+ type: InteractionResponseType.UpdateMessage;
+ data?: APIInteractionResponseCallbackData;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
+ */
+export declare enum InteractionResponseType {
+ /**
+ * ACK a `Ping`
+ */
+ Pong = 1,
+ /**
+ * Respond to an interaction with a message
+ */
+ ChannelMessageWithSource = 4,
+ /**
+ * ACK an interaction and edit to a response later, the user sees a loading state
+ */
+ DeferredChannelMessageWithSource = 5,
+ /**
+ * ACK a button interaction and update it to a loading state
+ */
+ DeferredMessageUpdate = 6,
+ /**
+ * ACK a button interaction and edit the message to which the button was attached
+ */
+ UpdateMessage = 7,
+ /**
+ * For autocomplete interactions
+ */
+ ApplicationCommandAutocompleteResult = 8,
+ /**
+ * Respond to an interaction with an modal for a user to fill-out
+ */
+ Modal = 9
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure
+ */
+export type APIInteractionResponseCallbackData = Omit<RESTPostAPIWebhookWithTokenJSONBody, 'username' | 'avatar_url'> & {
+ flags?: MessageFlags;
+};
+export interface APICommandAutocompleteInteractionResponseCallbackData {
+ choices?: APIApplicationCommandOptionChoice[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal
+ */
+export interface APIModalInteractionResponseCallbackData {
+ /**
+ * A developer-defined identifier for the component, max 100 characters
+ */
+ custom_id: string;
+ /**
+ * The title of the popup modal
+ */
+ title: string;
+ /**
+ * Between 1 and 5 (inclusive) components that make up the modal
+ */
+ components: APIActionRowComponent<APIModalActionRowComponent>[];
+}
+//# sourceMappingURL=responses.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/responses.d.ts.map b/node_modules/discord-api-types/payloads/v10/_interactions/responses.d.ts.map
new file mode 100644
index 0000000..81447aa
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/responses.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["responses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,KAAK,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AAE/E;;GAEG;AACH,oBAAY,eAAe;IAC1B,IAAI,IAAI;IACR,kBAAkB,IAAA;IAClB,gBAAgB,IAAA;IAChB,8BAA8B,IAAA;IAC9B,WAAW,IAAA;CACX;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAC/B,0BAA0B,GAC1B,8CAA8C,GAC9C,sDAAsD,GACtD,2CAA2C,GAC3C,mCAAmC,GACnC,yCAAyC,GACzC,2BAA2B,CAAC;AAE/B,MAAM,WAAW,0BAA0B;IAC1C,IAAI,EAAE,uBAAuB,CAAC,IAAI,CAAC;CACnC;AAED,MAAM,WAAW,yCAAyC;IACzD,IAAI,EAAE,uBAAuB,CAAC,oCAAoC,CAAC;IACnE,IAAI,EAAE,qDAAqD,CAAC;CAC5D;AAED,MAAM,WAAW,2BAA2B;IAC3C,IAAI,EAAE,uBAAuB,CAAC,KAAK,CAAC;IACpC,IAAI,EAAE,uCAAuC,CAAC;CAC9C;AAED,MAAM,WAAW,8CAA8C;IAC9D,IAAI,EAAE,uBAAuB,CAAC,wBAAwB,CAAC;IACvD,IAAI,EAAE,kCAAkC,CAAC;CACzC;AAED,MAAM,WAAW,sDAAsD;IACtE,IAAI,EAAE,uBAAuB,CAAC,gCAAgC,CAAC;IAC/D,IAAI,CAAC,EAAE,IAAI,CAAC,kCAAkC,EAAE,OAAO,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,2CAA2C;IAC3D,IAAI,EAAE,uBAAuB,CAAC,qBAAqB,CAAC;CACpD;AAED,MAAM,WAAW,mCAAmC;IACnD,IAAI,EAAE,uBAAuB,CAAC,aAAa,CAAC;IAC5C,IAAI,CAAC,EAAE,kCAAkC,CAAC;CAC1C;AAED;;GAEG;AACH,oBAAY,uBAAuB;IAClC;;OAEG;IACH,IAAI,IAAI;IACR;;OAEG;IACH,wBAAwB,IAAI;IAC5B;;OAEG;IACH,gCAAgC,IAAA;IAChC;;OAEG;IACH,qBAAqB,IAAA;IACrB;;OAEG;IACH,aAAa,IAAA;IACb;;OAEG;IACH,oCAAoC,IAAA;IACpC;;OAEG;IACH,KAAK,IAAA;CACL;AAED;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,IAAI,CACpD,mCAAmC,EACnC,UAAU,GAAG,YAAY,CACzB,GAAG;IAAE,KAAK,CAAC,EAAE,YAAY,CAAA;CAAE,CAAC;AAE7B,MAAM,WAAW,qDAAqD;IACrE,OAAO,CAAC,EAAE,iCAAiC,EAAE,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACvD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,UAAU,EAAE,qBAAqB,CAAC,0BAA0B,CAAC,EAAE,CAAC;CAChE"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/responses.js b/node_modules/discord-api-types/payloads/v10/_interactions/responses.js
new file mode 100644
index 0000000..f9c848a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/responses.js
@@ -0,0 +1,49 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.InteractionResponseType = exports.InteractionType = void 0;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
+ */
+var InteractionType;
+(function (InteractionType) {
+ InteractionType[InteractionType["Ping"] = 1] = "Ping";
+ InteractionType[InteractionType["ApplicationCommand"] = 2] = "ApplicationCommand";
+ InteractionType[InteractionType["MessageComponent"] = 3] = "MessageComponent";
+ InteractionType[InteractionType["ApplicationCommandAutocomplete"] = 4] = "ApplicationCommandAutocomplete";
+ InteractionType[InteractionType["ModalSubmit"] = 5] = "ModalSubmit";
+})(InteractionType = exports.InteractionType || (exports.InteractionType = {}));
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
+ */
+var InteractionResponseType;
+(function (InteractionResponseType) {
+ /**
+ * ACK a `Ping`
+ */
+ InteractionResponseType[InteractionResponseType["Pong"] = 1] = "Pong";
+ /**
+ * Respond to an interaction with a message
+ */
+ InteractionResponseType[InteractionResponseType["ChannelMessageWithSource"] = 4] = "ChannelMessageWithSource";
+ /**
+ * ACK an interaction and edit to a response later, the user sees a loading state
+ */
+ InteractionResponseType[InteractionResponseType["DeferredChannelMessageWithSource"] = 5] = "DeferredChannelMessageWithSource";
+ /**
+ * ACK a button interaction and update it to a loading state
+ */
+ InteractionResponseType[InteractionResponseType["DeferredMessageUpdate"] = 6] = "DeferredMessageUpdate";
+ /**
+ * ACK a button interaction and edit the message to which the button was attached
+ */
+ InteractionResponseType[InteractionResponseType["UpdateMessage"] = 7] = "UpdateMessage";
+ /**
+ * For autocomplete interactions
+ */
+ InteractionResponseType[InteractionResponseType["ApplicationCommandAutocompleteResult"] = 8] = "ApplicationCommandAutocompleteResult";
+ /**
+ * Respond to an interaction with an modal for a user to fill-out
+ */
+ InteractionResponseType[InteractionResponseType["Modal"] = 9] = "Modal";
+})(InteractionResponseType = exports.InteractionResponseType || (exports.InteractionResponseType = {}));
+//# sourceMappingURL=responses.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/_interactions/responses.js.map b/node_modules/discord-api-types/payloads/v10/_interactions/responses.js.map
new file mode 100644
index 0000000..d76a355
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/_interactions/responses.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"responses.js","sourceRoot":"","sources":["responses.ts"],"names":[],"mappings":";;;AAKA;;GAEG;AACH,IAAY,eAMX;AAND,WAAY,eAAe;IAC1B,qDAAQ,CAAA;IACR,iFAAkB,CAAA;IAClB,6EAAgB,CAAA;IAChB,yGAA8B,CAAA;IAC9B,mEAAW,CAAA;AACZ,CAAC,EANW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAM1B;AA+CD;;GAEG;AACH,IAAY,uBA6BX;AA7BD,WAAY,uBAAuB;IAClC;;OAEG;IACH,qEAAQ,CAAA;IACR;;OAEG;IACH,6GAA4B,CAAA;IAC5B;;OAEG;IACH,6HAAgC,CAAA;IAChC;;OAEG;IACH,uGAAqB,CAAA;IACrB;;OAEG;IACH,uFAAa,CAAA;IACb;;OAEG;IACH,qIAAoC,CAAA;IACpC;;OAEG;IACH,uEAAK,CAAA;AACN,CAAC,EA7BW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QA6BlC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/application.d.ts b/node_modules/discord-api-types/payloads/v10/application.d.ts
new file mode 100644
index 0000000..e7f5351
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/application.d.ts
@@ -0,0 +1,264 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/application
+ */
+import type { Permissions, Snowflake } from '../../globals';
+import type { LocalizationMap } from '../common';
+import type { APIPartialGuild } from './guild';
+import type { OAuth2Scopes } from './oauth2';
+import type { APITeam } from './teams';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/resources/application#application-object
+ */
+export interface APIApplication {
+ /**
+ * The id of the app
+ */
+ id: Snowflake;
+ /**
+ * The name of the app
+ */
+ name: string;
+ /**
+ * The icon hash of the app
+ */
+ icon: string | null;
+ /**
+ * The description of the app
+ */
+ description: string;
+ /**
+ * An array of rpc origin urls, if rpc is enabled
+ */
+ rpc_origins?: string[];
+ /**
+ * When `false` only app owner can join the app's bot to guilds
+ */
+ bot_public: boolean;
+ /**
+ * When `true` the app's bot will only join upon completion of the full oauth2 code grant flow
+ */
+ bot_require_code_grant: boolean;
+ /**
+ * The url of the application's terms of service
+ */
+ terms_of_service_url?: string;
+ /**
+ * The url of the application's privacy policy
+ */
+ privacy_policy_url?: string;
+ /**
+ * Partial user object containing info on the owner of the application
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ owner?: APIUser;
+ /**
+ * An empty string
+ *
+ * @deprecated This field will be removed in v11
+ */
+ summary: string;
+ /**
+ * The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
+ *
+ * See https://discord.com/developers/docs/game-sdk/applications#getticket
+ */
+ verify_key: string;
+ /**
+ * The team this application belongs to
+ *
+ * See https://discord.com/developers/docs/topics/teams#data-models-team-object
+ */
+ team: APITeam | null;
+ /**
+ * If this application is a game sold on Discord, this field will be the guild to which it has been linked
+ */
+ guild_id?: Snowflake;
+ /**
+ * If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists
+ */
+ primary_sku_id?: Snowflake;
+ /**
+ * If this application is a game sold on Discord, this field will be the URL slug that links to the store page
+ */
+ slug?: string;
+ /**
+ * If this application is a game sold on Discord, this field will be the hash of the image on store embeds
+ */
+ cover_image?: string;
+ /**
+ * The application's public flags
+ *
+ * See https://discord.com/developers/docs/resources/application#application-object-application-flags
+ */
+ flags: ApplicationFlags;
+ /**
+ * Up to 5 tags describing the content and functionality of the application
+ */
+ tags?: [string, string?, string?, string?, string?];
+ /**
+ * Settings for the application's default in-app authorization link, if enabled
+ */
+ install_params?: APIApplicationInstallParams;
+ /**
+ * The application's default custom authorization link, if enabled
+ */
+ custom_install_url?: string;
+ /**
+ * The application's role connection verification entry point,
+ * which when configured will render the app as a verification method in the guild role verification configuration
+ */
+ role_connections_verification_url?: string;
+ /**
+ * An approximate count of the app's guild membership
+ */
+ approximate_guild_count?: number;
+ /**
+ * A partial object of the associated guild
+ */
+ guild?: APIPartialGuild;
+}
+export interface APIApplicationInstallParams {
+ scopes: OAuth2Scopes[];
+ permissions: Permissions;
+}
+/**
+ * https://discord.com/developers/docs/resources/application#application-object-application-flags
+ */
+export declare enum ApplicationFlags {
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ EmbeddedReleased = 2,
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ManagedEmoji = 4,
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ EmbeddedIAP = 8,
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ GroupDMCreate = 16,
+ /**
+ * Indicates if an app uses the Auto Moderation API
+ */
+ ApplicationAutoModerationRuleCreateBadge = 64,
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ RPCHasConnected = 2048,
+ /**
+ * Intent required for bots in 100 or more servers to receive `presence_update` events
+ */
+ GatewayPresence = 4096,
+ /**
+ * Intent required for bots in under 100 servers to receive `presence_update` events, found in Bot Settings
+ */
+ GatewayPresenceLimited = 8192,
+ /**
+ * Intent required for bots in 100 or more servers to receive member-related events like `guild_member_add`.
+ * See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
+ */
+ GatewayGuildMembers = 16384,
+ /**
+ * Intent required for bots in under 100 servers to receive member-related events like `guild_member_add`, found in Bot Settings.
+ * See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
+ */
+ GatewayGuildMembersLimited = 32768,
+ /**
+ * Indicates unusual growth of an app that prevents verification
+ */
+ VerificationPendingGuildLimit = 65536,
+ /**
+ * Indicates if an app is embedded within the Discord client (currently unavailable publicly)
+ */
+ Embedded = 131072,
+ /**
+ * Intent required for bots in 100 or more servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055)
+ */
+ GatewayMessageContent = 262144,
+ /**
+ * Intent required for bots in under 100 servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055),
+ * found in Bot Settings
+ */
+ GatewayMessageContentLimited = 524288,
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ EmbeddedFirstParty = 1048576,
+ /**
+ * Indicates if an app has registered global [application commands](https://discord.com/developers/docs/interactions/application-commands)
+ */
+ ApplicationCommandBadge = 8388608
+}
+/**
+ * https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-structure
+ */
+export interface APIApplicationRoleConnectionMetadata {
+ /**
+ * Type of metadata value
+ */
+ type: ApplicationRoleConnectionMetadataType;
+ /**
+ * Dictionary key for the metadata field (must be `a-z`, `0-9`, or `_` characters; 1-50 characters)
+ */
+ key: string;
+ /**
+ * Name of the metadata field (1-100 characters)
+ */
+ name: string;
+ /**
+ * Translations of the name
+ */
+ name_localizations?: LocalizationMap;
+ /**
+ * Description of the metadata field (1-200 characters)
+ */
+ description: string;
+ /**
+ * Translations of the description
+ */
+ description_localizations?: LocalizationMap;
+}
+/**
+ * https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type
+ */
+export declare enum ApplicationRoleConnectionMetadataType {
+ /**
+ * The metadata value (`integer`) is less than or equal to the guild's configured value (`integer`)
+ */
+ IntegerLessThanOrEqual = 1,
+ /**
+ * The metadata value (`integer`) is greater than or equal to the guild's configured value (`integer`)
+ */
+ IntegerGreaterThanOrEqual = 2,
+ /**
+ * The metadata value (`integer`) is equal to the guild's configured value (`integer`)
+ */
+ IntegerEqual = 3,
+ /**
+ * The metadata value (`integer`) is not equal to the guild's configured value (`integer`)
+ */
+ IntegerNotEqual = 4,
+ /**
+ * The metadata value (`ISO8601 string`) is less than or equal to the guild's configured value (`integer`; days before current date)
+ */
+ DatetimeLessThanOrEqual = 5,
+ /**
+ * The metadata value (`ISO8601 string`) is greater than or equal to the guild's configured value (`integer`; days before current date)
+ */
+ DatetimeGreaterThanOrEqual = 6,
+ /**
+ * The metadata value (`integer`) is equal to the guild's configured value (`integer`; `1`)
+ */
+ BooleanEqual = 7,
+ /**
+ * The metadata value (`integer`) is not equal to the guild's configured value (`integer`; `1`)
+ */
+ BooleanNotEqual = 8
+}
+//# sourceMappingURL=application.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/application.d.ts.map b/node_modules/discord-api-types/payloads/v10/application.d.ts.map
new file mode 100644
index 0000000..47d5833
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/application.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB;;OAEG;IACH,UAAU,EAAE,OA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AAa,KAAS;IACtB;;OAEG;IACH,wCAAwC,KAAS;IACjD;;OAEG;IACH,eAAe,OAAU;IACzB;;OAEG;IACH,eAAe,OAAU;IACzB;;OAEG;IACH,sBAAsB,OAAU;IAChC;;;OAGG;IACH,mBAAmB,QAAU;IAC7B;;;OAGG;IACH,0BAA0B,QAAU;IACpC;;OAEG;IACH,6BAA6B,QAAU;IACvC;;OAEG;IACH,QAAQ,SAAU;IAClB;;OAEG;IACH,qBAAqB,SAAU;IAC/B;;;OAGG;IACH,4BAA4B,SAAU;IACtC;;OAEG;IACH,kBAAkB,UAAU;IAC5B;;OAEG;IACH,uBAAuB,UAAU;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACpD;;OAEG;IACH,IAAI,EAAE,qCAAqC,CAAC;IAC5C;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,kBAAkB,CAAC,EAAE,eAAe,CAAC;IACrC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,yBAAyB,CAAC,EAAE,eAAe,CAAC;CAC5C;AAED;;GAEG;AACH,oBAAY,qCAAqC;IAChD;;OAEG;IACH,sBAAsB,IAAI;IAC1B;;OAEG;IACH,yBAAyB,IAAA;IACzB;;OAEG;IACH,YAAY,IAAA;IACZ;;OAEG;IACH,eAAe,IAAA;IACf;;OAEG;IACH,uBAAuB,IAAA;IACvB;;OAEG;IACH,0BAA0B,IAAA;IAC1B;;OAEG;IACH,YAAY,IAAA;IACZ;;OAEG;IACH,eAAe,IAAA;CACf"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/application.js b/node_modules/discord-api-types/payloads/v10/application.js
new file mode 100644
index 0000000..d37666b
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/application.js
@@ -0,0 +1,118 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/application
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ApplicationRoleConnectionMetadataType = exports.ApplicationFlags = void 0;
+/**
+ * https://discord.com/developers/docs/resources/application#application-object-application-flags
+ */
+var ApplicationFlags;
+(function (ApplicationFlags) {
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ApplicationFlags[ApplicationFlags["EmbeddedReleased"] = 2] = "EmbeddedReleased";
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ApplicationFlags[ApplicationFlags["ManagedEmoji"] = 4] = "ManagedEmoji";
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ApplicationFlags[ApplicationFlags["EmbeddedIAP"] = 8] = "EmbeddedIAP";
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ApplicationFlags[ApplicationFlags["GroupDMCreate"] = 16] = "GroupDMCreate";
+ /**
+ * Indicates if an app uses the Auto Moderation API
+ */
+ ApplicationFlags[ApplicationFlags["ApplicationAutoModerationRuleCreateBadge"] = 64] = "ApplicationAutoModerationRuleCreateBadge";
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ApplicationFlags[ApplicationFlags["RPCHasConnected"] = 2048] = "RPCHasConnected";
+ /**
+ * Intent required for bots in 100 or more servers to receive `presence_update` events
+ */
+ ApplicationFlags[ApplicationFlags["GatewayPresence"] = 4096] = "GatewayPresence";
+ /**
+ * Intent required for bots in under 100 servers to receive `presence_update` events, found in Bot Settings
+ */
+ ApplicationFlags[ApplicationFlags["GatewayPresenceLimited"] = 8192] = "GatewayPresenceLimited";
+ /**
+ * Intent required for bots in 100 or more servers to receive member-related events like `guild_member_add`.
+ * See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
+ */
+ ApplicationFlags[ApplicationFlags["GatewayGuildMembers"] = 16384] = "GatewayGuildMembers";
+ /**
+ * Intent required for bots in under 100 servers to receive member-related events like `guild_member_add`, found in Bot Settings.
+ * See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
+ */
+ ApplicationFlags[ApplicationFlags["GatewayGuildMembersLimited"] = 32768] = "GatewayGuildMembersLimited";
+ /**
+ * Indicates unusual growth of an app that prevents verification
+ */
+ ApplicationFlags[ApplicationFlags["VerificationPendingGuildLimit"] = 65536] = "VerificationPendingGuildLimit";
+ /**
+ * Indicates if an app is embedded within the Discord client (currently unavailable publicly)
+ */
+ ApplicationFlags[ApplicationFlags["Embedded"] = 131072] = "Embedded";
+ /**
+ * Intent required for bots in 100 or more servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055)
+ */
+ ApplicationFlags[ApplicationFlags["GatewayMessageContent"] = 262144] = "GatewayMessageContent";
+ /**
+ * Intent required for bots in under 100 servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055),
+ * found in Bot Settings
+ */
+ ApplicationFlags[ApplicationFlags["GatewayMessageContentLimited"] = 524288] = "GatewayMessageContentLimited";
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ApplicationFlags[ApplicationFlags["EmbeddedFirstParty"] = 1048576] = "EmbeddedFirstParty";
+ /**
+ * Indicates if an app has registered global [application commands](https://discord.com/developers/docs/interactions/application-commands)
+ */
+ ApplicationFlags[ApplicationFlags["ApplicationCommandBadge"] = 8388608] = "ApplicationCommandBadge";
+})(ApplicationFlags = exports.ApplicationFlags || (exports.ApplicationFlags = {}));
+/**
+ * https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type
+ */
+var ApplicationRoleConnectionMetadataType;
+(function (ApplicationRoleConnectionMetadataType) {
+ /**
+ * The metadata value (`integer`) is less than or equal to the guild's configured value (`integer`)
+ */
+ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["IntegerLessThanOrEqual"] = 1] = "IntegerLessThanOrEqual";
+ /**
+ * The metadata value (`integer`) is greater than or equal to the guild's configured value (`integer`)
+ */
+ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["IntegerGreaterThanOrEqual"] = 2] = "IntegerGreaterThanOrEqual";
+ /**
+ * The metadata value (`integer`) is equal to the guild's configured value (`integer`)
+ */
+ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["IntegerEqual"] = 3] = "IntegerEqual";
+ /**
+ * The metadata value (`integer`) is not equal to the guild's configured value (`integer`)
+ */
+ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["IntegerNotEqual"] = 4] = "IntegerNotEqual";
+ /**
+ * The metadata value (`ISO8601 string`) is less than or equal to the guild's configured value (`integer`; days before current date)
+ */
+ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["DatetimeLessThanOrEqual"] = 5] = "DatetimeLessThanOrEqual";
+ /**
+ * The metadata value (`ISO8601 string`) is greater than or equal to the guild's configured value (`integer`; days before current date)
+ */
+ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["DatetimeGreaterThanOrEqual"] = 6] = "DatetimeGreaterThanOrEqual";
+ /**
+ * The metadata value (`integer`) is equal to the guild's configured value (`integer`; `1`)
+ */
+ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["BooleanEqual"] = 7] = "BooleanEqual";
+ /**
+ * The metadata value (`integer`) is not equal to the guild's configured value (`integer`; `1`)
+ */
+ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["BooleanNotEqual"] = 8] = "BooleanNotEqual";
+})(ApplicationRoleConnectionMetadataType = exports.ApplicationRoleConnectionMetadataType || (exports.ApplicationRoleConnectionMetadataType = {}));
+//# sourceMappingURL=application.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/application.js.map b/node_modules/discord-api-types/payloads/v10/application.js.map
new file mode 100644
index 0000000..bb59206
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/application.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"application.js","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA+HH;;GAEG;AACH,IAAY,gBAoEX;AApED,WAAY,gBAAgB;IAC3B;;OAEG;IACH,+EAAyB,CAAA;IACzB;;OAEG;IACH,uEAAqB,CAAA;IACrB;;OAEG;IACH,qEAAoB,CAAA;IACpB;;OAEG;IACH,0EAAsB,CAAA;IACtB;;OAEG;IACH,gIAAiD,CAAA;IACjD;;OAEG;IACH,gFAAyB,CAAA;IACzB;;OAEG;IACH,gFAAyB,CAAA;IACzB;;OAEG;IACH,8FAAgC,CAAA;IAChC;;;OAGG;IACH,yFAA6B,CAAA;IAC7B;;;OAGG;IACH,uGAAoC,CAAA;IACpC;;OAEG;IACH,6GAAuC,CAAA;IACvC;;OAEG;IACH,oEAAkB,CAAA;IAClB;;OAEG;IACH,8FAA+B,CAAA;IAC/B;;;OAGG;IACH,4GAAsC,CAAA;IACtC;;OAEG;IACH,yFAA4B,CAAA;IAC5B;;OAEG;IACH,mGAAiC,CAAA;AAClC,CAAC,EApEW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAoE3B;AAgCD;;GAEG;AACH,IAAY,qCAiCX;AAjCD,WAAY,qCAAqC;IAChD;;OAEG;IACH,qIAA0B,CAAA;IAC1B;;OAEG;IACH,2IAAyB,CAAA;IACzB;;OAEG;IACH,iHAAY,CAAA;IACZ;;OAEG;IACH,uHAAe,CAAA;IACf;;OAEG;IACH,uIAAuB,CAAA;IACvB;;OAEG;IACH,6IAA0B,CAAA;IAC1B;;OAEG;IACH,iHAAY,CAAA;IACZ;;OAEG;IACH,uHAAe,CAAA;AAChB,CAAC,EAjCW,qCAAqC,GAArC,6CAAqC,KAArC,6CAAqC,QAiChD"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/auditLog.d.ts b/node_modules/discord-api-types/payloads/v10/auditLog.d.ts
new file mode 100644
index 0000000..8a6c32f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/auditLog.d.ts
@@ -0,0 +1,597 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/audit-log
+ */
+import type { Snowflake } from '../../globals';
+import type { APIAutoModerationAction, APIAutoModerationRule, APIAutoModerationRuleTriggerMetadata, AutoModerationRuleEventType, AutoModerationRuleTriggerType } from './autoModeration';
+import type { APIChannel, APIOverwrite } from './channel';
+import type { APIGuildIntegration, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildMFALevel, GuildVerificationLevel, IntegrationExpireBehavior } from './guild';
+import type { APIGuildScheduledEvent, GuildScheduledEventEntityType, GuildScheduledEventStatus } from './guildScheduledEvent';
+import type { APIApplicationCommand } from './interactions';
+import type { APIRole } from './permissions';
+import type { StageInstancePrivacyLevel } from './stageInstance';
+import type { StickerFormatType } from './sticker';
+import type { APIUser } from './user';
+import type { APIWebhook } from './webhook';
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
+ */
+export interface APIAuditLog {
+ /**
+ * List of application commands found in the audit log
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands#application-command-object
+ */
+ application_commands: APIApplicationCommand[];
+ /**
+ * Webhooks found in the audit log
+ *
+ * See https://discord.com/developers/docs/resources/webhook#webhook-object
+ */
+ webhooks: APIWebhook[];
+ /**
+ * Users found in the audit log
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ users: APIUser[];
+ /**
+ * Audit log entries
+ *
+ * See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object
+ */
+ audit_log_entries: APIAuditLogEntry[];
+ /**
+ * List of auto moderation rules referenced in the audit log
+ *
+ * See https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object
+ */
+ auto_moderation_rules: APIAutoModerationRule[];
+ /**
+ * Partial integration objects
+ *
+ * See https://discord.com/developers/docs/resources/guild#integration-object
+ */
+ integrations: APIGuildIntegration[];
+ /**
+ * Threads found in the audit log
+ *
+ * Threads referenced in THREAD_CREATE and THREAD_UPDATE events are included in the threads map, since archived threads might not be kept in memory by clients.
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object
+ */
+ threads: APIChannel[];
+ /**
+ * The guild scheduled events in the audit log
+ *
+ * See https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object
+ */
+ guild_scheduled_events: APIGuildScheduledEvent[];
+}
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure
+ */
+export interface APIAuditLogEntry {
+ /**
+ * ID of the affected entity (webhook, user, role, etc.)
+ */
+ target_id: string | null;
+ /**
+ * Changes made to the `target_id`
+ *
+ * See https://discord.com/developers/docs/resources/audit-log#audit-log-change-object
+ */
+ changes?: APIAuditLogChange[];
+ /**
+ * The user who made the changes
+ *
+ * This can be `null` in some cases (webhooks deleting themselves by using their own token, for example)
+ */
+ user_id: Snowflake | null;
+ /**
+ * ID of the entry
+ */
+ id: Snowflake;
+ /**
+ * Type of action that occurred
+ *
+ * See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
+ */
+ action_type: AuditLogEvent;
+ /**
+ * Additional info for certain action types
+ *
+ * See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
+ */
+ options?: APIAuditLogOptions;
+ /**
+ * The reason for the change (0-512 characters)
+ */
+ reason?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
+ */
+export declare enum AuditLogEvent {
+ GuildUpdate = 1,
+ ChannelCreate = 10,
+ ChannelUpdate = 11,
+ ChannelDelete = 12,
+ ChannelOverwriteCreate = 13,
+ ChannelOverwriteUpdate = 14,
+ ChannelOverwriteDelete = 15,
+ MemberKick = 20,
+ MemberPrune = 21,
+ MemberBanAdd = 22,
+ MemberBanRemove = 23,
+ MemberUpdate = 24,
+ MemberRoleUpdate = 25,
+ MemberMove = 26,
+ MemberDisconnect = 27,
+ BotAdd = 28,
+ RoleCreate = 30,
+ RoleUpdate = 31,
+ RoleDelete = 32,
+ InviteCreate = 40,
+ InviteUpdate = 41,
+ InviteDelete = 42,
+ WebhookCreate = 50,
+ WebhookUpdate = 51,
+ WebhookDelete = 52,
+ EmojiCreate = 60,
+ EmojiUpdate = 61,
+ EmojiDelete = 62,
+ MessageDelete = 72,
+ MessageBulkDelete = 73,
+ MessagePin = 74,
+ MessageUnpin = 75,
+ IntegrationCreate = 80,
+ IntegrationUpdate = 81,
+ IntegrationDelete = 82,
+ StageInstanceCreate = 83,
+ StageInstanceUpdate = 84,
+ StageInstanceDelete = 85,
+ StickerCreate = 90,
+ StickerUpdate = 91,
+ StickerDelete = 92,
+ GuildScheduledEventCreate = 100,
+ GuildScheduledEventUpdate = 101,
+ GuildScheduledEventDelete = 102,
+ ThreadCreate = 110,
+ ThreadUpdate = 111,
+ ThreadDelete = 112,
+ ApplicationCommandPermissionUpdate = 121,
+ AutoModerationRuleCreate = 140,
+ AutoModerationRuleUpdate = 141,
+ AutoModerationRuleDelete = 142,
+ AutoModerationBlockMessage = 143,
+ AutoModerationFlagToChannel = 144,
+ AutoModerationUserCommunicationDisabled = 145,
+ CreatorMonetizationRequestCreated = 150,
+ CreatorMonetizationTermsAccepted = 151
+}
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
+ */
+export interface APIAuditLogOptions {
+ /**
+ * Name of the Auto Moderation rule that was triggered
+ *
+ * Present from:
+ * - AUTO_MODERATION_BLOCK_MESSAGE
+ * - AUTO_MODERATION_FLAG_TO_CHANNEL
+ * - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
+ */
+ auto_moderation_rule_name?: string;
+ /**
+ * Trigger type of the Auto Moderation rule that was triggered
+ *
+ * Present from:
+ * - AUTO_MODERATION_BLOCK_MESSAGE
+ * - AUTO_MODERATION_FLAG_TO_CHANNEL
+ * - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
+ */
+ auto_moderation_rule_trigger_type?: AuditLogRuleTriggerType;
+ /**
+ * Number of days after which inactive members were kicked
+ *
+ * Present from:
+ * - MEMBER_PRUNE
+ */
+ delete_member_days?: string;
+ /**
+ * Number of members removed by the prune
+ *
+ * Present from:
+ * - MEMBER_PRUNE
+ */
+ members_removed?: string;
+ /**
+ * Channel in which the entities were targeted
+ *
+ * Present from:
+ * - MEMBER_MOVE
+ * - MESSAGE_PIN
+ * - MESSAGE_UNPIN
+ * - MESSAGE_DELETE
+ * - STAGE_INSTANCE_CREATE
+ * - STAGE_INSTANCE_UPDATE
+ * - STAGE_INSTANCE_DELETE
+ * - AUTO_MODERATION_BLOCK_MESSAGE
+ * - AUTO_MODERATION_FLAG_TO_CHANNEL
+ * - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
+ */
+ channel_id?: Snowflake;
+ /**
+ * ID of the message that was targeted
+ *
+ * Present from:
+ * - MESSAGE_PIN
+ * - MESSAGE_UNPIN
+ */
+ message_id?: Snowflake;
+ /**
+ * Number of entities that were targeted
+ *
+ * Present from:
+ * - MESSAGE_DELETE
+ * - MESSAGE_BULK_DELETE
+ * - MEMBER_DISCONNECT
+ * - MEMBER_MOVE
+ */
+ count?: string;
+ /**
+ * ID of the overwritten entity
+ *
+ * Present from:
+ * - CHANNEL_OVERWRITE_CREATE
+ * - CHANNEL_OVERWRITE_UPDATE
+ * - CHANNEL_OVERWRITE_DELETE
+ */
+ id?: Snowflake;
+ /**
+ * Type of overwritten entity - "0" for "role" or "1" for "member"
+ *
+ * Present from:
+ * - CHANNEL_OVERWRITE_CREATE
+ * - CHANNEL_OVERWRITE_UPDATE
+ * - CHANNEL_OVERWRITE_DELETE
+ *
+ * {@link AuditLogOptionsType}
+ */
+ type?: AuditLogOptionsType;
+ /**
+ * Name of the role
+ *
+ * Present from:
+ * - CHANNEL_OVERWRITE_CREATE
+ * - CHANNEL_OVERWRITE_UPDATE
+ * - CHANNEL_OVERWRITE_DELETE
+ *
+ * **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
+ */
+ role_name?: string;
+}
+export declare enum AuditLogOptionsType {
+ Role = "0",
+ Member = "1"
+}
+export type AuditLogRuleTriggerType = `${AutoModerationRuleTriggerType}`;
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure
+ */
+export type APIAuditLogChange = APIAuditLogChangeKeyName | APIAuditLogChangeKeyDescription | APIAuditLogChangeKeyIconHash | APIAuditLogChangeKeyImageHash | APIAuditLogChangeKeySplashHash | APIAuditLogChangeKeyDiscoverySplashHash | APIAuditLogChangeKeyBannerHash | APIAuditLogChangeKeyOwnerId | APIAuditLogChangeKeyRegion | APIAuditLogChangeKeyPreferredLocale | APIAuditLogChangeKeyAFKChannelId | APIAuditLogChangeKeyAFKTimeout | APIAuditLogChangeKeyRulesChannelId | APIAuditLogChangeKeyPublicUpdatesChannelId | APIAuditLogChangeKeyMFALevel | APIAuditLogChangeKeyVerificationLevel | APIAuditLogChangeKeyExplicitContentFilter | APIAuditLogChangeKeyDefaultMessageNotifications | APIAuditLogChangeKeyVanityURLCode | APIAuditLogChangeKey$Add | APIAuditLogChangeKey$Remove | APIAuditLogChangeKeyPruneDeleteDays | APIAuditLogChangeKeyWidgetEnabled | APIAuditLogChangeKeyWidgetChannelId | APIAuditLogChangeKeySystemChannelId | APIAuditLogChangeKeyPosition | APIAuditLogChangeKeyTopic | APIAuditLogChangeKeyBitrate | APIAuditLogChangeKeyPermissionOverwrites | APIAuditLogChangeKeyNSFW | APIAuditLogChangeKeyApplicationId | APIAuditLogChangeKeyRateLimitPerUser | APIAuditLogChangeKeyPermissions | APIAuditLogChangeKeyColor | APIAuditLogChangeKeyHoist | APIAuditLogChangeKeyMentionable | APIAuditLogChangeKeyAllow | APIAuditLogChangeKeyDeny | APIAuditLogChangeKeyCode | APIAuditLogChangeKeyChannelId | APIAuditLogChangeKeyInviterId | APIAuditLogChangeKeyMaxUses | APIAuditLogChangeKeyUses | APIAuditLogChangeKeyMaxAge | APIAuditLogChangeKeyTemporary | APIAuditLogChangeKeyDeaf | APIAuditLogChangeKeyMute | APIAuditLogChangeKeyNick | APIAuditLogChangeKeyAvatarHash | APIAuditLogChangeKeyId | APIAuditLogChangeKeyType | APIAuditLogChangeKeyEnableEmoticons | APIAuditLogChangeKeyExpireBehavior | APIAuditLogChangeKeyExpireGracePeriod | APIAuditLogChangeKeyUserLimit | APIAuditLogChangeKeyPrivacyLevel | APIAuditLogChangeKeyTags | APIAuditLogChangeKeyFormatType | APIAuditLogChangeKeyAsset | APIAuditLogChangeKeyAvailable | APIAuditLogChangeKeyGuildId | APIAuditLogChangeKeyArchived | APIAuditLogChangeKeyLocked | APIAuditLogChangeKeyAutoArchiveDuration | APIAuditLogChangeKeyDefaultAutoArchiveDuration | APIAuditLogChangeKeyEntityType | APIAuditLogChangeKeyStatus | APIAuditLogChangeKeyLocation | APIAuditLogChangeKeyCommunicationDisabledUntil | APIAuditLogChangeKeyTriggerType | APIAuditLogChangeKeyEventType | APIAuditLogChangeKeyTriggerMetadata | APIAuditLogChangeKeyActions | APIAuditLogChangeKeyEnabled | APIAuditLogChangeKeyExemptRoles | APIAuditLogChangeKeyExemptChannels;
+/**
+ * Returned when an entity's name is changed
+ */
+export type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>;
+/**
+ * Returned when a guild's or sticker's or guild scheduled event's description is changed
+ */
+export type APIAuditLogChangeKeyDescription = AuditLogChangeData<'description', string>;
+/**
+ * Returned when a guild's icon is changed
+ */
+export type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', string>;
+/**
+ * Returned when a guild's scheduled event's cover image is changed
+ */
+export type APIAuditLogChangeKeyImageHash = AuditLogChangeData<'image_hash', string>;
+/**
+ * Returned when a guild's splash is changed
+ */
+export type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>;
+/**
+ * Returned when a guild's discovery splash is changed
+ */
+export type APIAuditLogChangeKeyDiscoverySplashHash = AuditLogChangeData<'discovery_splash_hash', string>;
+/**
+ * Returned when a guild's banner hash is changed
+ */
+export type APIAuditLogChangeKeyBannerHash = AuditLogChangeData<'banner_hash', string>;
+/**
+ * Returned when a guild's owner_id is changed
+ */
+export type APIAuditLogChangeKeyOwnerId = AuditLogChangeData<'owner_id', Snowflake>;
+/**
+ * Returned when a guild's region is changed
+ */
+export type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>;
+/**
+ * Returned when a guild's preferred_locale is changed
+ */
+export type APIAuditLogChangeKeyPreferredLocale = AuditLogChangeData<'preferred_locale', string>;
+/**
+ * Returned when a guild's afk_channel_id is changed
+ */
+export type APIAuditLogChangeKeyAFKChannelId = AuditLogChangeData<'afk_channel_id', Snowflake>;
+/**
+ * Returned when a guild's afk_timeout is changed
+ */
+export type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>;
+/**
+ * Returned when a guild's rules_channel_id is changed
+ */
+export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_channel_id', string>;
+/**
+ * Returned when a guild's public_updates_channel_id is changed
+ */
+export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;
+/**
+ * Returned when a guild's safety_alerts_channel_id is changed
+ */
+export type APIAuditLogChangeKeySafetyAlertsChannelId = AuditLogChangeData<'safety_alerts_channel_id', string>;
+/**
+ * Returned when a guild's mfa_level is changed
+ */
+export type APIAuditLogChangeKeyMFALevel = AuditLogChangeData<'mfa_level', GuildMFALevel>;
+/**
+ * Returned when a guild's verification_level is changed
+ */
+export type APIAuditLogChangeKeyVerificationLevel = AuditLogChangeData<'verification_level', GuildVerificationLevel>;
+/**
+ * Returned when a guild's explicit_content_filter is changed
+ */
+export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<'explicit_content_filter', GuildExplicitContentFilter>;
+/**
+ * Returned when a guild's default_message_notifications is changed
+ */
+export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData<'default_message_notifications', GuildDefaultMessageNotifications>;
+/**
+ * Returned when a guild's vanity_url_code is changed
+ */
+export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_code', string>;
+/**
+ * Returned when new role(s) are added
+ */
+export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', APIRole[]>;
+/**
+ * Returned when role(s) are removed
+ */
+export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', APIRole[]>;
+/**
+ * Returned when there is a change in number of days after which inactive and role-unassigned members are kicked
+ */
+export type APIAuditLogChangeKeyPruneDeleteDays = AuditLogChangeData<'prune_delete_days', number>;
+/**
+ * Returned when a guild's widget is enabled
+ */
+export type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabled', boolean>;
+/**
+ * Returned when a guild's widget_channel_id is changed
+ */
+export type APIAuditLogChangeKeyWidgetChannelId = AuditLogChangeData<'widget_channel_id', Snowflake>;
+/**
+ * Returned when a guild's system_channel_id is changed
+ */
+export type APIAuditLogChangeKeySystemChannelId = AuditLogChangeData<'system_channel_id', Snowflake>;
+/**
+ * Returned when a channel's position is changed
+ */
+export type APIAuditLogChangeKeyPosition = AuditLogChangeData<'position', number>;
+/**
+ * Returned when a channel's topic is changed
+ */
+export type APIAuditLogChangeKeyTopic = AuditLogChangeData<'topic', string>;
+/**
+ * Returned when a voice channel's bitrate is changed
+ */
+export type APIAuditLogChangeKeyBitrate = AuditLogChangeData<'bitrate', number>;
+/**
+ * Returned when a channel's permission overwrites is changed
+ */
+export type APIAuditLogChangeKeyPermissionOverwrites = AuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
+/**
+ * Returned when a channel's NSFW restriction is changed
+ */
+export type APIAuditLogChangeKeyNSFW = AuditLogChangeData<'nsfw', boolean>;
+/**
+ * The application ID of the added or removed Webhook or Bot
+ */
+export type APIAuditLogChangeKeyApplicationId = AuditLogChangeData<'application_id', Snowflake>;
+/**
+ * Returned when a channel's amount of seconds a user has to wait before sending another message
+ * is changed
+ */
+export type APIAuditLogChangeKeyRateLimitPerUser = AuditLogChangeData<'rate_limit_per_user', number>;
+/**
+ * Returned when a permission bitfield is changed
+ */
+export type APIAuditLogChangeKeyPermissions = AuditLogChangeData<'permissions', string>;
+/**
+ * Returned when a role's color is changed
+ */
+export type APIAuditLogChangeKeyColor = AuditLogChangeData<'color', number>;
+/**
+ * Represents a change where the key is a snowflake.
+ * Currently, the only known instance of this is returned when permissions for a command were updated (<insert name of object here>)
+ */
+export type APIAuditLogChangeKeySnowflake = AuditLogChangeData<Snowflake, unknown>;
+/**
+ * Returned when a role's hoist status is changed
+ */
+export type APIAuditLogChangeKeyHoist = AuditLogChangeData<'hoist', boolean>;
+/**
+ * Returned when a role's mentionable status is changed
+ */
+export type APIAuditLogChangeKeyMentionable = AuditLogChangeData<'mentionable', boolean>;
+/**
+ * Returned when an overwrite's allowed permissions bitfield is changed
+ */
+export type APIAuditLogChangeKeyAllow = AuditLogChangeData<'allow', string>;
+/**
+ * Returned when an overwrite's denied permissions bitfield is changed
+ */
+export type APIAuditLogChangeKeyDeny = AuditLogChangeData<'deny', string>;
+/**
+ * Returned when an invite's code is changed
+ */
+export type APIAuditLogChangeKeyCode = AuditLogChangeData<'code', string>;
+/**
+ * Returned when an invite's or guild scheduled event's channel_id is changed
+ */
+export type APIAuditLogChangeKeyChannelId = AuditLogChangeData<'channel_id', Snowflake>;
+/**
+ * Returned when an invite's inviter_id is changed
+ */
+export type APIAuditLogChangeKeyInviterId = AuditLogChangeData<'inviter_id', Snowflake>;
+/**
+ * Returned when an invite's max_uses is changed
+ */
+export type APIAuditLogChangeKeyMaxUses = AuditLogChangeData<'max_uses', number>;
+/**
+ * Returned when an invite's uses is changed
+ */
+export type APIAuditLogChangeKeyUses = AuditLogChangeData<'uses', number>;
+/**
+ * Returned when an invite's max_age is changed
+ */
+export type APIAuditLogChangeKeyMaxAge = AuditLogChangeData<'max_age', number>;
+/**
+ * Returned when an invite's temporary status is changed
+ */
+export type APIAuditLogChangeKeyTemporary = AuditLogChangeData<'temporary', boolean>;
+/**
+ * Returned when a user's deaf status is changed
+ */
+export type APIAuditLogChangeKeyDeaf = AuditLogChangeData<'deaf', boolean>;
+/**
+ * Returned when a user's mute status is changed
+ */
+export type APIAuditLogChangeKeyMute = AuditLogChangeData<'mute', boolean>;
+/**
+ * Returned when a user's nick is changed
+ */
+export type APIAuditLogChangeKeyNick = AuditLogChangeData<'nick', string>;
+/**
+ * Returned when a user's avatar_hash is changed
+ */
+export type APIAuditLogChangeKeyAvatarHash = AuditLogChangeData<'avatar_hash', string>;
+/**
+ * The ID of the changed entity - sometimes used in conjunction with other keys
+ */
+export type APIAuditLogChangeKeyId = AuditLogChangeData<'id', Snowflake>;
+/**
+ * The type of entity created
+ */
+export type APIAuditLogChangeKeyType = AuditLogChangeData<'type', number | string>;
+/**
+ * Returned when an integration's enable_emoticons is changed
+ */
+export type APIAuditLogChangeKeyEnableEmoticons = AuditLogChangeData<'enable_emoticons', boolean>;
+/**
+ * Returned when an integration's expire_behavior is changed
+ */
+export type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
+/**
+ * Returned when an integration's expire_grace_period is changed
+ */
+export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>;
+/**
+ * Returned when a voice channel's user_limit is changed
+ */
+export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>;
+/**
+ * Returned when privacy level of a stage instance or guild scheduled event is changed
+ */
+export type APIAuditLogChangeKeyPrivacyLevel = AuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
+/**
+ * Returned when a sticker's related emoji is changed
+ */
+export type APIAuditLogChangeKeyTags = AuditLogChangeData<'tags', string>;
+/**
+ * Returned when a sticker's format_type is changed
+ */
+export type APIAuditLogChangeKeyFormatType = AuditLogChangeData<'format_type', StickerFormatType>;
+/**
+ * Empty string
+ */
+export type APIAuditLogChangeKeyAsset = AuditLogChangeData<'asset', ''>;
+/**
+ * Returned when a sticker's availability is changed
+ */
+export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', boolean>;
+/**
+ * Returned when a sticker's guild_id is changed
+ */
+export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
+export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
+export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
+export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
+export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<'default_auto_archive_duration', number>;
+/**
+ * Returned when entity type of a guild scheduled event is changed
+ */
+export type APIAuditLogChangeKeyEntityType = AuditLogChangeData<'entity_type', GuildScheduledEventEntityType>;
+/**
+ * Returned when status of a guild scheduled event is changed
+ */
+export type APIAuditLogChangeKeyStatus = AuditLogChangeData<'status', GuildScheduledEventStatus>;
+/**
+ * Returned when location of a guild scheduled event is changed
+ */
+export type APIAuditLogChangeKeyLocation = AuditLogChangeData<'location', string>;
+/**
+ * Returned when a user's timeout is changed
+ */
+export type APIAuditLogChangeKeyCommunicationDisabledUntil = AuditLogChangeData<'communication_disabled_until', string>;
+/**
+ * Returned when an auto moderation rule's trigger type is changed (only in rule creation or deletion)
+ */
+export type APIAuditLogChangeKeyTriggerType = AuditLogChangeData<'trigger_type', AutoModerationRuleTriggerType>;
+/**
+ * Returned when an auto moderation rule's event type is changed
+ */
+export type APIAuditLogChangeKeyEventType = AuditLogChangeData<'event_type', AutoModerationRuleEventType>;
+/**
+ * Returned when an auto moderation rule's trigger metadata is changed
+ */
+export type APIAuditLogChangeKeyTriggerMetadata = AuditLogChangeData<'trigger_metadata', APIAutoModerationRuleTriggerMetadata>;
+/**
+ * Returned when an auto moderation rule's actions is changed
+ */
+export type APIAuditLogChangeKeyActions = AuditLogChangeData<'actions', APIAutoModerationAction[]>;
+/**
+ * Returned when an auto moderation rule's enabled status is changed
+ */
+export type APIAuditLogChangeKeyEnabled = AuditLogChangeData<'enabled', boolean>;
+/**
+ * Returned when an auto moderation rule's exempt roles is changed
+ */
+export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles', Snowflake[]>;
+/**
+ * Returned when an auto moderation rule's exempt channels is changed
+ */
+export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>;
+interface AuditLogChangeData<K extends string, D> {
+ key: K;
+ /**
+ * The new value
+ *
+ * If `new_value` is not present in the change object, while `old_value` is,
+ * that means the property that was changed has been reset, or set to `null`
+ */
+ new_value?: D;
+ old_value?: D;
+}
+export {};
+//# sourceMappingURL=auditLog.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/auditLog.d.ts.map b/node_modules/discord-api-types/payloads/v10/auditLog.d.ts.map
new file mode 100644
index 0000000..eff6415
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/auditLog.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"auditLog.d.ts","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EACX,uBAAuB,EACvB,qBAAqB,EACrB,oCAAoC,EACpC,2BAA2B,EAC3B,6BAA6B,EAC7B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,KAAK,EACX,mBAAmB,EACnB,gCAAgC,EAChC,0BAA0B,EAC1B,aAAa,EACb,sBAAsB,EACtB,yBAAyB,EACzB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EACX,sBAAsB,EACtB,6BAA6B,EAC7B,yBAAyB,EACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,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;AACH,MAAM,MAAM,+BAA+B,GAAG,kBAAkB,CAAC,cAAc,EAAE,SAAS,EAAE,CAAC,CAAC;AAE9F;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,kBAAkB,CAAC,iBAAiB,EAAE,SAAS,EAAE,CAAC,CAAC;AAEpG,UAAU,kBAAkB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC;IAC/C,GAAG,EAAE,CAAC,CAAC;IACP;;;;;OAKG;IACH,SAAS,CAAC,EAAE,CAAC,CAAC;IACd,SAAS,CAAC,EAAE,CAAC,CAAC;CACd"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/auditLog.js b/node_modules/discord-api-types/payloads/v10/auditLog.js
new file mode 100644
index 0000000..7648caa
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/auditLog.js
@@ -0,0 +1,74 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/audit-log
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AuditLogOptionsType = exports.AuditLogEvent = void 0;
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
+ */
+var AuditLogEvent;
+(function (AuditLogEvent) {
+ AuditLogEvent[AuditLogEvent["GuildUpdate"] = 1] = "GuildUpdate";
+ AuditLogEvent[AuditLogEvent["ChannelCreate"] = 10] = "ChannelCreate";
+ AuditLogEvent[AuditLogEvent["ChannelUpdate"] = 11] = "ChannelUpdate";
+ AuditLogEvent[AuditLogEvent["ChannelDelete"] = 12] = "ChannelDelete";
+ AuditLogEvent[AuditLogEvent["ChannelOverwriteCreate"] = 13] = "ChannelOverwriteCreate";
+ AuditLogEvent[AuditLogEvent["ChannelOverwriteUpdate"] = 14] = "ChannelOverwriteUpdate";
+ AuditLogEvent[AuditLogEvent["ChannelOverwriteDelete"] = 15] = "ChannelOverwriteDelete";
+ AuditLogEvent[AuditLogEvent["MemberKick"] = 20] = "MemberKick";
+ AuditLogEvent[AuditLogEvent["MemberPrune"] = 21] = "MemberPrune";
+ AuditLogEvent[AuditLogEvent["MemberBanAdd"] = 22] = "MemberBanAdd";
+ AuditLogEvent[AuditLogEvent["MemberBanRemove"] = 23] = "MemberBanRemove";
+ AuditLogEvent[AuditLogEvent["MemberUpdate"] = 24] = "MemberUpdate";
+ AuditLogEvent[AuditLogEvent["MemberRoleUpdate"] = 25] = "MemberRoleUpdate";
+ AuditLogEvent[AuditLogEvent["MemberMove"] = 26] = "MemberMove";
+ AuditLogEvent[AuditLogEvent["MemberDisconnect"] = 27] = "MemberDisconnect";
+ AuditLogEvent[AuditLogEvent["BotAdd"] = 28] = "BotAdd";
+ AuditLogEvent[AuditLogEvent["RoleCreate"] = 30] = "RoleCreate";
+ AuditLogEvent[AuditLogEvent["RoleUpdate"] = 31] = "RoleUpdate";
+ AuditLogEvent[AuditLogEvent["RoleDelete"] = 32] = "RoleDelete";
+ AuditLogEvent[AuditLogEvent["InviteCreate"] = 40] = "InviteCreate";
+ AuditLogEvent[AuditLogEvent["InviteUpdate"] = 41] = "InviteUpdate";
+ AuditLogEvent[AuditLogEvent["InviteDelete"] = 42] = "InviteDelete";
+ AuditLogEvent[AuditLogEvent["WebhookCreate"] = 50] = "WebhookCreate";
+ AuditLogEvent[AuditLogEvent["WebhookUpdate"] = 51] = "WebhookUpdate";
+ AuditLogEvent[AuditLogEvent["WebhookDelete"] = 52] = "WebhookDelete";
+ AuditLogEvent[AuditLogEvent["EmojiCreate"] = 60] = "EmojiCreate";
+ AuditLogEvent[AuditLogEvent["EmojiUpdate"] = 61] = "EmojiUpdate";
+ AuditLogEvent[AuditLogEvent["EmojiDelete"] = 62] = "EmojiDelete";
+ AuditLogEvent[AuditLogEvent["MessageDelete"] = 72] = "MessageDelete";
+ AuditLogEvent[AuditLogEvent["MessageBulkDelete"] = 73] = "MessageBulkDelete";
+ AuditLogEvent[AuditLogEvent["MessagePin"] = 74] = "MessagePin";
+ AuditLogEvent[AuditLogEvent["MessageUnpin"] = 75] = "MessageUnpin";
+ AuditLogEvent[AuditLogEvent["IntegrationCreate"] = 80] = "IntegrationCreate";
+ AuditLogEvent[AuditLogEvent["IntegrationUpdate"] = 81] = "IntegrationUpdate";
+ AuditLogEvent[AuditLogEvent["IntegrationDelete"] = 82] = "IntegrationDelete";
+ AuditLogEvent[AuditLogEvent["StageInstanceCreate"] = 83] = "StageInstanceCreate";
+ AuditLogEvent[AuditLogEvent["StageInstanceUpdate"] = 84] = "StageInstanceUpdate";
+ AuditLogEvent[AuditLogEvent["StageInstanceDelete"] = 85] = "StageInstanceDelete";
+ AuditLogEvent[AuditLogEvent["StickerCreate"] = 90] = "StickerCreate";
+ AuditLogEvent[AuditLogEvent["StickerUpdate"] = 91] = "StickerUpdate";
+ AuditLogEvent[AuditLogEvent["StickerDelete"] = 92] = "StickerDelete";
+ AuditLogEvent[AuditLogEvent["GuildScheduledEventCreate"] = 100] = "GuildScheduledEventCreate";
+ AuditLogEvent[AuditLogEvent["GuildScheduledEventUpdate"] = 101] = "GuildScheduledEventUpdate";
+ AuditLogEvent[AuditLogEvent["GuildScheduledEventDelete"] = 102] = "GuildScheduledEventDelete";
+ AuditLogEvent[AuditLogEvent["ThreadCreate"] = 110] = "ThreadCreate";
+ AuditLogEvent[AuditLogEvent["ThreadUpdate"] = 111] = "ThreadUpdate";
+ AuditLogEvent[AuditLogEvent["ThreadDelete"] = 112] = "ThreadDelete";
+ AuditLogEvent[AuditLogEvent["ApplicationCommandPermissionUpdate"] = 121] = "ApplicationCommandPermissionUpdate";
+ AuditLogEvent[AuditLogEvent["AutoModerationRuleCreate"] = 140] = "AutoModerationRuleCreate";
+ AuditLogEvent[AuditLogEvent["AutoModerationRuleUpdate"] = 141] = "AutoModerationRuleUpdate";
+ AuditLogEvent[AuditLogEvent["AutoModerationRuleDelete"] = 142] = "AutoModerationRuleDelete";
+ AuditLogEvent[AuditLogEvent["AutoModerationBlockMessage"] = 143] = "AutoModerationBlockMessage";
+ AuditLogEvent[AuditLogEvent["AutoModerationFlagToChannel"] = 144] = "AutoModerationFlagToChannel";
+ AuditLogEvent[AuditLogEvent["AutoModerationUserCommunicationDisabled"] = 145] = "AutoModerationUserCommunicationDisabled";
+ AuditLogEvent[AuditLogEvent["CreatorMonetizationRequestCreated"] = 150] = "CreatorMonetizationRequestCreated";
+ AuditLogEvent[AuditLogEvent["CreatorMonetizationTermsAccepted"] = 151] = "CreatorMonetizationTermsAccepted";
+})(AuditLogEvent = exports.AuditLogEvent || (exports.AuditLogEvent = {}));
+var AuditLogOptionsType;
+(function (AuditLogOptionsType) {
+ AuditLogOptionsType["Role"] = "0";
+ AuditLogOptionsType["Member"] = "1";
+})(AuditLogOptionsType = exports.AuditLogOptionsType || (exports.AuditLogOptionsType = {}));
+//# sourceMappingURL=auditLog.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/auditLog.js.map b/node_modules/discord-api-types/payloads/v10/auditLog.js.map
new file mode 100644
index 0000000..5b3070d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/auditLog.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"auditLog.js","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAiIH;;GAEG;AACH,IAAY,aAuEX;AAvED,WAAY,aAAa;IACxB,+DAAe,CAAA;IAEf,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IACb,sFAAsB,CAAA;IACtB,sFAAsB,CAAA;IACtB,sFAAsB,CAAA;IAEtB,8DAAe,CAAA;IACf,gEAAW,CAAA;IACX,kEAAY,CAAA;IACZ,wEAAe,CAAA;IACf,kEAAY,CAAA;IACZ,0EAAgB,CAAA;IAChB,8DAAU,CAAA;IACV,0EAAgB,CAAA;IAChB,sDAAM,CAAA;IAEN,8DAAe,CAAA;IACf,8DAAU,CAAA;IACV,8DAAU,CAAA;IAEV,kEAAiB,CAAA;IACjB,kEAAY,CAAA;IACZ,kEAAY,CAAA;IAEZ,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IAEb,gEAAgB,CAAA;IAChB,gEAAW,CAAA;IACX,gEAAW,CAAA;IAEX,oEAAkB,CAAA;IAClB,4EAAiB,CAAA;IACjB,8DAAU,CAAA;IACV,kEAAY,CAAA;IAEZ,4EAAsB,CAAA;IACtB,4EAAiB,CAAA;IACjB,4EAAiB,CAAA;IACjB,gFAAmB,CAAA;IACnB,gFAAmB,CAAA;IACnB,gFAAmB,CAAA;IAEnB,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IAEb,6FAA+B,CAAA;IAC/B,6FAAyB,CAAA;IACzB,6FAAyB,CAAA;IAEzB,mEAAkB,CAAA;IAClB,mEAAY,CAAA;IACZ,mEAAY,CAAA;IAEZ,+GAAwC,CAAA;IAExC,2FAA8B,CAAA;IAC9B,2FAAwB,CAAA;IACxB,2FAAwB,CAAA;IACxB,+FAA0B,CAAA;IAC1B,iGAA2B,CAAA;IAC3B,yHAAuC,CAAA;IAEvC,6GAAuC,CAAA;IACvC,2GAAgC,CAAA;AACjC,CAAC,EAvEW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAuExB;AA+GD,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC9B,iCAAU,CAAA;IACV,mCAAY,CAAA;AACb,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/autoModeration.d.ts b/node_modules/discord-api-types/payloads/v10/autoModeration.d.ts
new file mode 100644
index 0000000..16ee6f2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/autoModeration.d.ts
@@ -0,0 +1,208 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/auto-moderation
+ */
+import type { Snowflake } from '../../globals';
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-auto-moderation-rule-structure
+ */
+export interface APIAutoModerationRule {
+ /**
+ * The id of this rule
+ */
+ id: Snowflake;
+ /**
+ * The guild which this rule belongs to
+ */
+ guild_id: Snowflake;
+ /**
+ * The rule name
+ */
+ name: string;
+ /**
+ * The user id who created this rule
+ */
+ creator_id: Snowflake;
+ /**
+ * The rule event type
+ */
+ event_type: AutoModerationRuleEventType;
+ /**
+ * The rule trigger type
+ */
+ trigger_type: AutoModerationRuleTriggerType;
+ /**
+ * The rule trigger metadata
+ */
+ trigger_metadata: APIAutoModerationRuleTriggerMetadata;
+ /**
+ * The actions which will execute when this rule is triggered
+ */
+ actions: APIAutoModerationAction[];
+ /**
+ * Whether this rule is enabled
+ */
+ enabled: boolean;
+ /**
+ * The role ids that shouldn't be affected by this rule (Maximum of 20)
+ */
+ exempt_roles: Snowflake[];
+ /**
+ * The channel ids that shouldn't be affected by this rule (Maximum of 50)
+ */
+ exempt_channels: Snowflake[];
+}
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types
+ */
+export declare enum AutoModerationRuleTriggerType {
+ /**
+ * Check if content contains words from a user defined list of keywords (Maximum of 6 per guild)
+ */
+ Keyword = 1,
+ /**
+ * Check if content represents generic spam (Maximum of 1 per guild)
+ */
+ Spam = 3,
+ /**
+ * Check if content contains words from internal pre-defined wordsets (Maximum of 1 per guild)
+ */
+ KeywordPreset = 4,
+ /**
+ * Check if content contains more mentions than allowed (Maximum of 1 per guild)
+ */
+ MentionSpam = 5
+}
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata
+ */
+export interface APIAutoModerationRuleTriggerMetadata {
+ /**
+ * Substrings which will be searched for in content (Maximum of 1000)
+ *
+ * A keyword can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less
+ * See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies)
+ *
+ * Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword}
+ */
+ keyword_filter?: string[];
+ /**
+ * The internally pre-defined wordsets which will be searched for in content
+ *
+ * Associated trigger type: {@link AutoModerationRuleTriggerType.KeywordPreset}
+ */
+ presets?: AutoModerationRuleKeywordPresetType[];
+ /**
+ * Substrings which will be exempt from triggering the preset trigger type (Maximum of 1000)
+ *
+ * A allowed-word can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less
+ * See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies)
+ *
+ * Associated trigger type: {@link AutoModerationRuleTriggerType.KeywordPreset}
+ */
+ allow_list?: string[];
+ /**
+ * Regular expression patterns which will be matched against content (Maximum of 10)
+ *
+ * Only Rust flavored regex is currently supported (Maximum of 260 characters)
+ *
+ * Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword}
+ */
+ regex_patterns?: string[];
+ /**
+ * Total number of mentions (role & user) allowed per message (Maximum of 50)
+ *
+ * Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam}
+ */
+ mention_total_limit?: number;
+ /**
+ * Whether to automatically detect mention raids
+ *
+ * Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam}
+ */
+ mention_raid_protection_enabled?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types
+ */
+export declare enum AutoModerationRuleKeywordPresetType {
+ /**
+ * Words that may be considered forms of swearing or cursing
+ */
+ Profanity = 1,
+ /**
+ * Words that refer to sexually explicit behavior or activity
+ */
+ SexualContent = 2,
+ /**
+ * Personal insults or words that may be considered hate speech
+ */
+ Slurs = 3
+}
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types
+ */
+export declare enum AutoModerationRuleEventType {
+ /**
+ * When a member sends or edits a message in the guild
+ */
+ MessageSend = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-auto-moderation-action-structure
+ */
+export interface APIAutoModerationAction {
+ /**
+ * The action type
+ */
+ type: AutoModerationActionType;
+ /**
+ * Additional metadata needed during execution for this specific action type
+ *
+ * Will only be omitted if the action type is {@link AutoModerationActionType.BlockMessage}
+ */
+ metadata?: APIAutoModerationActionMetadata;
+}
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types
+ */
+export declare enum AutoModerationActionType {
+ /**
+ * Blocks a member's message and prevents it from being posted.
+ * A custom explanation can be specified and shown to members whenever their message is blocked
+ */
+ BlockMessage = 1,
+ /**
+ * Logs user content to a specified channel
+ */
+ SendAlertMessage = 2,
+ /**
+ * Timeout user for specified duration, this action type can be set if the bot has `MODERATE_MEMBERS` permission
+ */
+ Timeout = 3
+}
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-metadata
+ */
+export interface APIAutoModerationActionMetadata {
+ /**
+ * Channel to which user content should be logged
+ *
+ * Associated action type: {@link AutoModerationActionType.SendAlertMessage}
+ */
+ channel_id?: Snowflake;
+ /**
+ * Timeout duration in seconds (Maximum of 4 weeks - 2419200 seconds)
+ *
+ * Only available if using {@link AutoModerationRuleTriggerType.Keyword}
+ *
+ * Associated action type: {@link AutoModerationActionType.Timeout}
+ */
+ duration_seconds?: number;
+ /**
+ * Additional explanation that will be shown to members whenever their message is blocked (Maximum 150 characters)
+ *
+ * Associated action type {@link AutoModerationActionType.BlockMessage}
+ */
+ custom_message?: string;
+}
+//# sourceMappingURL=autoModeration.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/autoModeration.d.ts.map b/node_modules/discord-api-types/payloads/v10/autoModeration.d.ts.map
new file mode 100644
index 0000000..c74bc8c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/autoModeration.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"autoModeration.d.ts","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,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GAEG;AACH,oBAAY,2BAA2B;IACtC;;OAEG;IACH,WAAW,IAAI;CACf;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,IAAI,EAAE,wBAAwB,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,+BAA+B,CAAC;CAC3C;AAED;;GAEG;AACH,oBAAY,wBAAwB;IACnC;;;OAGG;IACH,YAAY,IAAI;IAChB;;OAEG;IACH,gBAAgB,IAAA;IAChB;;OAEG;IACH,OAAO,IAAA;CACP;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/autoModeration.js b/node_modules/discord-api-types/payloads/v10/autoModeration.js
new file mode 100644
index 0000000..0ec10a4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/autoModeration.js
@@ -0,0 +1,76 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/auto-moderation
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AutoModerationActionType = exports.AutoModerationRuleEventType = exports.AutoModerationRuleKeywordPresetType = exports.AutoModerationRuleTriggerType = void 0;
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types
+ */
+var AutoModerationRuleTriggerType;
+(function (AutoModerationRuleTriggerType) {
+ /**
+ * Check if content contains words from a user defined list of keywords (Maximum of 6 per guild)
+ */
+ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["Keyword"] = 1] = "Keyword";
+ /**
+ * Check if content represents generic spam (Maximum of 1 per guild)
+ */
+ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["Spam"] = 3] = "Spam";
+ /**
+ * Check if content contains words from internal pre-defined wordsets (Maximum of 1 per guild)
+ */
+ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["KeywordPreset"] = 4] = "KeywordPreset";
+ /**
+ * Check if content contains more mentions than allowed (Maximum of 1 per guild)
+ */
+ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["MentionSpam"] = 5] = "MentionSpam";
+})(AutoModerationRuleTriggerType = exports.AutoModerationRuleTriggerType || (exports.AutoModerationRuleTriggerType = {}));
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types
+ */
+var AutoModerationRuleKeywordPresetType;
+(function (AutoModerationRuleKeywordPresetType) {
+ /**
+ * Words that may be considered forms of swearing or cursing
+ */
+ AutoModerationRuleKeywordPresetType[AutoModerationRuleKeywordPresetType["Profanity"] = 1] = "Profanity";
+ /**
+ * Words that refer to sexually explicit behavior or activity
+ */
+ AutoModerationRuleKeywordPresetType[AutoModerationRuleKeywordPresetType["SexualContent"] = 2] = "SexualContent";
+ /**
+ * Personal insults or words that may be considered hate speech
+ */
+ AutoModerationRuleKeywordPresetType[AutoModerationRuleKeywordPresetType["Slurs"] = 3] = "Slurs";
+})(AutoModerationRuleKeywordPresetType = exports.AutoModerationRuleKeywordPresetType || (exports.AutoModerationRuleKeywordPresetType = {}));
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types
+ */
+var AutoModerationRuleEventType;
+(function (AutoModerationRuleEventType) {
+ /**
+ * When a member sends or edits a message in the guild
+ */
+ AutoModerationRuleEventType[AutoModerationRuleEventType["MessageSend"] = 1] = "MessageSend";
+})(AutoModerationRuleEventType = exports.AutoModerationRuleEventType || (exports.AutoModerationRuleEventType = {}));
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types
+ */
+var AutoModerationActionType;
+(function (AutoModerationActionType) {
+ /**
+ * Blocks a member's message and prevents it from being posted.
+ * A custom explanation can be specified and shown to members whenever their message is blocked
+ */
+ AutoModerationActionType[AutoModerationActionType["BlockMessage"] = 1] = "BlockMessage";
+ /**
+ * Logs user content to a specified channel
+ */
+ AutoModerationActionType[AutoModerationActionType["SendAlertMessage"] = 2] = "SendAlertMessage";
+ /**
+ * Timeout user for specified duration, this action type can be set if the bot has `MODERATE_MEMBERS` permission
+ */
+ AutoModerationActionType[AutoModerationActionType["Timeout"] = 3] = "Timeout";
+})(AutoModerationActionType = exports.AutoModerationActionType || (exports.AutoModerationActionType = {}));
+//# sourceMappingURL=autoModeration.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/autoModeration.js.map b/node_modules/discord-api-types/payloads/v10/autoModeration.js.map
new file mode 100644
index 0000000..0310be2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/autoModeration.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"autoModeration.js","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAsDH;;GAEG;AACH,IAAY,6BAiBX;AAjBD,WAAY,6BAA6B;IACxC;;OAEG;IACH,uFAAW,CAAA;IACX;;OAEG;IACH,iFAAQ,CAAA;IACR;;OAEG;IACH,mGAAa,CAAA;IACb;;OAEG;IACH,+FAAW,CAAA;AACZ,CAAC,EAjBW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAiBxC;AAoDD;;GAEG;AACH,IAAY,mCAaX;AAbD,WAAY,mCAAmC;IAC9C;;OAEG;IACH,uGAAa,CAAA;IACb;;OAEG;IACH,+GAAa,CAAA;IACb;;OAEG;IACH,+FAAK,CAAA;AACN,CAAC,EAbW,mCAAmC,GAAnC,2CAAmC,KAAnC,2CAAmC,QAa9C;AAED;;GAEG;AACH,IAAY,2BAKX;AALD,WAAY,2BAA2B;IACtC;;OAEG;IACH,2FAAe,CAAA;AAChB,CAAC,EALW,2BAA2B,GAA3B,mCAA2B,KAA3B,mCAA2B,QAKtC;AAkBD;;GAEG;AACH,IAAY,wBAcX;AAdD,WAAY,wBAAwB;IACnC;;;OAGG;IACH,uFAAgB,CAAA;IAChB;;OAEG;IACH,+FAAgB,CAAA;IAChB;;OAEG;IACH,6EAAO,CAAA;AACR,CAAC,EAdW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAcnC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/channel.d.ts b/node_modules/discord-api-types/payloads/v10/channel.d.ts
new file mode 100644
index 0000000..422a0e9
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/channel.d.ts
@@ -0,0 +1,1631 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/channel
+ */
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIApplication } from './application';
+import type { APIPartialEmoji } from './emoji';
+import type { APIGuildMember } from './guild';
+import type { APIMessageInteraction } from './interactions';
+import type { APIRole } from './permissions';
+import type { APISticker, APIStickerItem } from './sticker';
+import type { APIUser } from './user';
+/**
+ * Not documented, but partial only includes id, name, and type
+ */
+export interface APIPartialChannel {
+ /**
+ * The id of the channel
+ */
+ id: Snowflake;
+ /**
+ * The type of the channel
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object-channel-types
+ */
+ type: ChannelType;
+ /**
+ * The name of the channel (1-100 characters)
+ */
+ name?: string | null;
+}
+/**
+ * This interface is used to allow easy extension for other channel types. While
+ * also allowing `APIPartialChannel` to be used without breaking.
+ */
+export interface APIChannelBase<T extends ChannelType> extends APIPartialChannel {
+ type: T;
+ flags?: ChannelFlags;
+}
+export type TextChannelType = ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildAnnouncement | ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread | ChannelType.GuildText | ChannelType.GuildForum | ChannelType.GuildVoice | ChannelType.GuildStageVoice;
+export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>;
+export interface APITextBasedChannel<T extends ChannelType> extends APIChannelBase<T> {
+ /**
+ * The id of the last message sent in this channel (may not point to an existing or valid message)
+ */
+ last_message_id?: Snowflake | null;
+ /**
+ * When the last pinned message was pinned.
+ * This may be `null` in events such as `GUILD_CREATE` when a message is not pinned
+ */
+ last_pin_timestamp?: string | null;
+ /**
+ * Amount of seconds a user has to wait before sending another message (0-21600);
+ * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
+ *
+ * `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
+ *
+ * For thread channels, `rate_limit_per_user` is only returned if the field is set to a non-zero and non-null value.
+ * The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
+ */
+ rate_limit_per_user?: number;
+}
+export interface APIGuildChannel<T extends ChannelType> extends Omit<APIChannelBase<T>, 'name'> {
+ /**
+ * The name of the channel (1-100 characters)
+ */
+ name: string;
+ /**
+ * The id of the guild (may be missing for some channel objects received over gateway guild dispatches)
+ */
+ guild_id?: Snowflake;
+ /**
+ * Explicit permission overwrites for members and roles
+ *
+ * See https://discord.com/developers/docs/resources/channel#overwrite-object
+ */
+ permission_overwrites?: APIOverwrite[];
+ /**
+ * Sorting position of the channel
+ */
+ position: number;
+ /**
+ * ID of the parent category for a channel (each parent category can contain up to 50 channels)
+ *
+ * OR
+ *
+ * ID of the parent channel for a thread
+ */
+ parent_id?: Snowflake | null;
+ /**
+ * Whether the channel is nsfw
+ */
+ nsfw?: boolean;
+}
+export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
+export interface APIGuildTextChannel<T extends GuildTextChannelType> extends Omit<APITextBasedChannel<T>, 'name'>, APIGuildChannel<T> {
+ /**
+ * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
+ */
+ default_auto_archive_duration?: ThreadAutoArchiveDuration;
+ /**
+ * The initial `rate_limit_per_user` to set on newly created threads.
+ * This field is copied to the thread at creation time and does not live update
+ */
+ default_thread_rate_limit_per_user?: number;
+ /**
+ * The channel topic (0-4096 characters for forum channels, 0-1024 characters for all others)
+ */
+ topic?: string | null;
+}
+export type APITextChannel = APIGuildTextChannel<ChannelType.GuildText>;
+export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildAnnouncement>;
+export type APIGuildCategoryChannel = APIGuildChannel<ChannelType.GuildCategory>;
+export interface APIVoiceChannelBase<T extends ChannelType> extends APIGuildChannel<T>, Omit<APITextBasedChannel<T>, 'name' | 'last_pin_timestamp'> {
+ /**
+ * The bitrate (in bits) of the voice or stage channel
+ */
+ bitrate?: number;
+ /**
+ * The user limit of the voice or stage channel
+ */
+ user_limit?: number;
+ /**
+ * Voice region id for the voice or stage channel, automatic when set to `null`
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-region-object
+ */
+ rtc_region?: string | null;
+ /**
+ * The camera video quality mode of the voice or stage channel, `1` when not present
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes
+ */
+ video_quality_mode?: VideoQualityMode;
+}
+export type APIGuildVoiceChannel = APIVoiceChannelBase<ChannelType.GuildVoice>;
+export type APIGuildStageVoiceChannel = APIVoiceChannelBase<ChannelType.GuildStageVoice>;
+export interface APIDMChannelBase<T extends ChannelType> extends Omit<APITextBasedChannel<T>, 'rate_limit_per_user'> {
+ /**
+ * The recipients of the DM
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ recipients?: APIUser[];
+}
+export interface APIDMChannel extends Omit<APIDMChannelBase<ChannelType.DM>, 'name'> {
+ /**
+ * The name of the channel (always null for DM channels)
+ */
+ name: null;
+}
+export interface APIGroupDMChannel extends Omit<APIDMChannelBase<ChannelType.GroupDM>, 'name'> {
+ /**
+ * The name of the channel (1-100 characters)
+ */
+ name: string | null;
+ /**
+ * Application id of the group DM creator if it is bot-created
+ */
+ application_id?: Snowflake;
+ /**
+ * Icon hash
+ */
+ icon?: string | null;
+ /**
+ * ID of the DM creator
+ */
+ owner_id?: Snowflake;
+ /**
+ * The id of the last message sent in this channel (may not point to an existing or valid message)
+ */
+ last_message_id?: Snowflake | null;
+ /**
+ * Whether the channel is managed by an OAuth2 application
+ */
+ managed?: boolean;
+}
+export interface APIThreadChannel extends Omit<APITextBasedChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread>, 'name'>, APIGuildChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread> {
+ /**
+ * The client users member for the thread, only included in select endpoints
+ */
+ member?: APIThreadMember;
+ /**
+ * The metadata for a thread channel not shared by other channels
+ */
+ thread_metadata?: APIThreadMetadata;
+ /**
+ * Number of messages (not including the initial message or deleted messages) in a thread
+ *
+ * If the thread was created before July 1, 2022, it stops counting at 50 messages
+ */
+ message_count?: number;
+ /**
+ * The approximate member count of the thread, does not count above 50 even if there are more members
+ */
+ member_count?: number;
+ /**
+ * ID of the thread creator
+ */
+ owner_id?: Snowflake;
+ /**
+ * Number of messages ever sent in a thread
+ *
+ * Similar to `message_count` on message creation, but won't decrement when a message is deleted
+ */
+ total_message_sent?: number;
+ /**
+ * The IDs of the set of tags that have been applied to a thread in a forum channel
+ */
+ applied_tags: Snowflake[];
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#forum-tag-object-forum-tag-structure
+ */
+export interface APIGuildForumTag {
+ /**
+ * The id of the tag
+ */
+ id: Snowflake;
+ /**
+ * The name of the tag (0-20 characters)
+ */
+ name: string;
+ /**
+ * Whether this tag can only be added to or removed from threads by a member with the `MANAGE_THREADS` permission
+ */
+ moderated: boolean;
+ /**
+ * The id of a guild's custom emoji
+ */
+ emoji_id: Snowflake | null;
+ /**
+ * The unicode character of the emoji
+ */
+ emoji_name: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#default-reaction-object-default-reaction-structure
+ */
+export interface APIGuildForumDefaultReactionEmoji {
+ /**
+ * The id of a guild's custom emoji
+ */
+ emoji_id: Snowflake | null;
+ /**
+ * The unicode character of the emoji
+ */
+ emoji_name: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel/#channel-object-sort-order-types
+ */
+export declare enum SortOrderType {
+ /**
+ * Sort forum posts by activity
+ */
+ LatestActivity = 0,
+ /**
+ * Sort forum posts by creation time (from most recent to oldest)
+ */
+ CreationDate = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/channel/#channel-object-forum-layout-types
+ */
+export declare enum ForumLayoutType {
+ /**
+ * No default has been set for forum channel
+ */
+ NotSet = 0,
+ /**
+ * Display posts as a list
+ */
+ ListView = 1,
+ /**
+ * Display posts as a collection of tiles
+ */
+ GalleryView = 2
+}
+export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
+ /**
+ * The set of tags that can be used in a forum channel
+ */
+ available_tags: APIGuildForumTag[];
+ /**
+ * The emoji to show in the add reaction button on a thread in a forum channel
+ */
+ default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
+ /**
+ * The default sort order type used to order posts in a forum channel
+ */
+ default_sort_order: SortOrderType | null;
+ /**
+ * The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
+ */
+ default_forum_layout: ForumLayoutType;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure
+ */
+export type APIChannel = APIGroupDMChannel | APIDMChannel | APITextChannel | APINewsChannel | APIGuildVoiceChannel | APIGuildStageVoiceChannel | APIGuildCategoryChannel | APIThreadChannel | APIGuildForumChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object-channel-types
+ */
+export declare enum ChannelType {
+ /**
+ * A text channel within a guild
+ */
+ GuildText = 0,
+ /**
+ * A direct message between users
+ */
+ DM = 1,
+ /**
+ * A voice channel within a guild
+ */
+ GuildVoice = 2,
+ /**
+ * A direct message between multiple users
+ */
+ GroupDM = 3,
+ /**
+ * An organizational category that contains up to 50 channels
+ *
+ * See https://support.discord.com/hc/articles/115001580171
+ */
+ GuildCategory = 4,
+ /**
+ * A channel that users can follow and crosspost into their own guild
+ *
+ * See https://support.discord.com/hc/articles/360032008192
+ */
+ GuildAnnouncement = 5,
+ /**
+ * A temporary sub-channel within a Guild Announcement channel
+ */
+ AnnouncementThread = 10,
+ /**
+ * A temporary sub-channel within a Guild Text or Guild Forum channel
+ */
+ PublicThread = 11,
+ /**
+ * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission
+ */
+ PrivateThread = 12,
+ /**
+ * A voice channel for hosting events with an audience
+ *
+ * See https://support.discord.com/hc/articles/1500005513722
+ */
+ GuildStageVoice = 13,
+ /**
+ * The channel in a Student Hub containing the listed servers
+ *
+ * See https://support.discord.com/hc/articles/4406046651927
+ */
+ GuildDirectory = 14,
+ /**
+ * A channel that can only contain threads
+ */
+ GuildForum = 15,
+ /**
+ * A channel that users can follow and crosspost into their own guild
+ *
+ * @deprecated This is the old name for {@apilink ChannelType#GuildAnnouncement}
+ *
+ * See https://support.discord.com/hc/articles/360032008192
+ */
+ GuildNews = 5,
+ /**
+ * A temporary sub-channel within a Guild Announcement channel
+ *
+ * @deprecated This is the old name for {@apilink ChannelType#AnnouncementThread}
+ */
+ GuildNewsThread = 10,
+ /**
+ * A temporary sub-channel within a Guild Text channel
+ *
+ * @deprecated This is the old name for {@apilink ChannelType#PublicThread}
+ */
+ GuildPublicThread = 11,
+ /**
+ * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission
+ *
+ * @deprecated This is the old name for {@apilink ChannelType#PrivateThread}
+ */
+ GuildPrivateThread = 12
+}
+export declare enum VideoQualityMode {
+ /**
+ * Discord chooses the quality for optimal performance
+ */
+ Auto = 1,
+ /**
+ * 720p
+ */
+ Full = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-structure
+ */
+export interface APIMessage {
+ /**
+ * ID of the message
+ */
+ id: Snowflake;
+ /**
+ * ID of the channel the message was sent in
+ */
+ channel_id: Snowflake;
+ /**
+ * The author of this message (only a valid user in the case where the message is generated by a user or bot user)
+ *
+ * If the message is generated by a webhook, the author object corresponds to the webhook's id,
+ * username, and avatar. You can tell if a message is generated by a webhook by checking for the `webhook_id` property
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ author: APIUser;
+ /**
+ * Contents of the message
+ *
+ * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
+ *
+ * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**.
+ * You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway
+ *
+ * See https://support-dev.discord.com/hc/articles/4404772028055
+ */
+ content: string;
+ /**
+ * When this message was sent
+ */
+ timestamp: string;
+ /**
+ * When this message was edited (or null if never)
+ */
+ edited_timestamp: string | null;
+ /**
+ * Whether this was a TTS message
+ */
+ tts: boolean;
+ /**
+ * Whether this message mentions everyone
+ */
+ mention_everyone: boolean;
+ /**
+ * Users specifically mentioned in the message
+ *
+ * The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
+ * from text-based guild channels
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ mentions: APIUser[];
+ /**
+ * Roles specifically mentioned in this message
+ *
+ * See https://discord.com/developers/docs/topics/permissions#role-object
+ */
+ mention_roles: APIRole['id'][];
+ /**
+ * Channels specifically mentioned in this message
+ *
+ * Not all channel mentions in a message will appear in `mention_channels`.
+ * - Only textual channels that are visible to everyone in a lurkable guild will ever be included
+ * - Only crossposted messages (via Channel Following) currently include `mention_channels` at all
+ *
+ * If no mentions in the message meet these requirements, this field will not be sent
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-mention-object
+ */
+ mention_channels?: APIChannelMention[];
+ /**
+ * Any attached files
+ *
+ * See https://discord.com/developers/docs/resources/channel#attachment-object
+ *
+ * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
+ *
+ * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**.
+ * You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway
+ *
+ * See https://support-dev.discord.com/hc/articles/4404772028055
+ */
+ attachments: APIAttachment[];
+ /**
+ * Any embedded content
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object
+ *
+ * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
+ *
+ * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**.
+ * You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway
+ *
+ * See https://support-dev.discord.com/hc/articles/4404772028055
+ */
+ embeds: APIEmbed[];
+ /**
+ * Reactions to the message
+ *
+ * See https://discord.com/developers/docs/resources/channel#reaction-object
+ */
+ reactions?: APIReaction[];
+ /**
+ * A nonce that can be used for optimistic message sending (up to 25 characters)
+ *
+ * **You will not receive this from further fetches. This is received only once from a `MESSAGE_CREATE`
+ * event to ensure it got sent**
+ */
+ nonce?: string | number;
+ /**
+ * Whether this message is pinned
+ */
+ pinned: boolean;
+ /**
+ * If the message is generated by a webhook, this is the webhook's id
+ */
+ webhook_id?: Snowflake;
+ /**
+ * Type of message
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-types
+ */
+ type: MessageType;
+ /**
+ * Sent with Rich Presence-related chat embeds
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure
+ */
+ activity?: APIMessageActivity;
+ /**
+ * Sent with Rich Presence-related chat embeds
+ *
+ * See https://discord.com/developers/docs/resources/application#application-object
+ */
+ application?: Partial<APIApplication>;
+ /**
+ * If the message is a response to an Interaction, this is the id of the interaction's application
+ */
+ application_id?: Snowflake;
+ /**
+ * Reference data sent with crossposted messages, replies, pins, and thread starter messages
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
+ */
+ message_reference?: APIMessageReference;
+ /**
+ * Message flags combined as a bitfield
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-flags
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ flags?: MessageFlags;
+ /**
+ * The message associated with the `message_reference`
+ *
+ * This field is only returned for messages with a `type` of `19` (REPLY).
+ *
+ * If the message is a reply but the `referenced_message` field is not present,
+ * the backend did not attempt to fetch the message that was being replied to,
+ * so its state is unknown.
+ *
+ * If the field exists but is `null`, the referenced message was deleted
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object
+ */
+ referenced_message?: APIMessage | null;
+ /**
+ * Sent if the message is a response to an Interaction
+ */
+ interaction?: APIMessageInteraction;
+ /**
+ * Sent if a thread was started from this message
+ */
+ thread?: APIChannel;
+ /**
+ * Sent if the message contains components like buttons, action rows, or other interactive components
+ *
+ * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
+ *
+ * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**.
+ * You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway
+ *
+ * See https://support-dev.discord.com/hc/articles/4404772028055
+ */
+ components?: APIActionRowComponent<APIMessageActionRowComponent>[];
+ /**
+ * Sent if the message contains stickers
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-item-object
+ */
+ sticker_items?: APIStickerItem[];
+ /**
+ * The stickers sent with the message
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object
+ *
+ * @deprecated Use `sticker_items` instead
+ */
+ stickers?: APISticker[];
+ /**
+ * A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread
+ *
+ * It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
+ */
+ position?: number;
+ /**
+ * Data of the role subscription purchase or renewal that prompted this `ROLE_SUBSCRIPTION_PURCHASE` message
+ */
+ role_subscription_data?: APIMessageRoleSubscriptionData;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-types
+ */
+export declare enum MessageType {
+ Default = 0,
+ RecipientAdd = 1,
+ RecipientRemove = 2,
+ Call = 3,
+ ChannelNameChange = 4,
+ ChannelIconChange = 5,
+ ChannelPinnedMessage = 6,
+ UserJoin = 7,
+ GuildBoost = 8,
+ GuildBoostTier1 = 9,
+ GuildBoostTier2 = 10,
+ GuildBoostTier3 = 11,
+ ChannelFollowAdd = 12,
+ GuildDiscoveryDisqualified = 14,
+ GuildDiscoveryRequalified = 15,
+ GuildDiscoveryGracePeriodInitialWarning = 16,
+ GuildDiscoveryGracePeriodFinalWarning = 17,
+ ThreadCreated = 18,
+ Reply = 19,
+ ChatInputCommand = 20,
+ ThreadStarterMessage = 21,
+ GuildInviteReminder = 22,
+ ContextMenuCommand = 23,
+ AutoModerationAction = 24,
+ RoleSubscriptionPurchase = 25,
+ InteractionPremiumUpsell = 26,
+ StageStart = 27,
+ StageEnd = 28,
+ StageSpeaker = 29,
+ /**
+ * @unstable https://github.com/discord/discord-api-docs/pull/5927#discussion_r1107678548
+ */
+ StageRaiseHand = 30,
+ StageTopic = 31,
+ GuildApplicationPremiumSubscription = 32
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure
+ */
+export interface APIMessageActivity {
+ /**
+ * Type of message activity
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
+ */
+ type: MessageActivityType;
+ /**
+ * `party_id` from a Rich Presence event
+ *
+ * See https://discord.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields
+ */
+ party_id?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
+ */
+export interface APIMessageReference {
+ /**
+ * ID of the originating message
+ */
+ message_id?: Snowflake;
+ /**
+ * ID of the originating message's channel
+ */
+ channel_id: Snowflake;
+ /**
+ * ID of the originating message's guild
+ */
+ guild_id?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
+ */
+export declare enum MessageActivityType {
+ Join = 1,
+ Spectate = 2,
+ Listen = 3,
+ JoinRequest = 5
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-flags
+ */
+export declare enum MessageFlags {
+ /**
+ * This message has been published to subscribed channels (via Channel Following)
+ */
+ Crossposted = 1,
+ /**
+ * This message originated from a message in another channel (via Channel Following)
+ */
+ IsCrosspost = 2,
+ /**
+ * Do not include any embeds when serializing this message
+ */
+ SuppressEmbeds = 4,
+ /**
+ * The source message for this crosspost has been deleted (via Channel Following)
+ */
+ SourceMessageDeleted = 8,
+ /**
+ * This message came from the urgent message system
+ */
+ Urgent = 16,
+ /**
+ * This message has an associated thread, which shares its id
+ */
+ HasThread = 32,
+ /**
+ * This message is only visible to the user who invoked the Interaction
+ */
+ Ephemeral = 64,
+ /**
+ * This message is an Interaction Response and the bot is "thinking"
+ */
+ Loading = 128,
+ /**
+ * This message failed to mention some roles and add their members to the thread
+ */
+ FailedToMentionSomeRolesInThread = 256,
+ /**
+ * @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ShouldShowLinkNotDiscordWarning = 1024,
+ /**
+ * This message will not trigger push and desktop notifications
+ */
+ SuppressNotifications = 4096,
+ /**
+ * This message is a voice message
+ */
+ IsVoiceMessage = 8192
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#role-subscription-data-object-role-subscription-data-object-structure
+ */
+export interface APIMessageRoleSubscriptionData {
+ /**
+ * The id of the SKU and listing the user is subscribed to
+ */
+ role_subscription_listing_id: Snowflake;
+ /**
+ * The name of the tier the user is subscribed to
+ */
+ tier_name: string;
+ /**
+ * The number of months the user has been subscribed for
+ */
+ total_months_subscribed: number;
+ /**
+ * Whether this notification is for a renewal
+ */
+ is_renewal: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#followed-channel-object
+ */
+export interface APIFollowedChannel {
+ /**
+ * Source channel id
+ */
+ channel_id: Snowflake;
+ /**
+ * Created target webhook id
+ */
+ webhook_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure
+ */
+export interface APIReaction {
+ /**
+ * Times this emoji has been used to react
+ */
+ count: number;
+ /**
+ * Whether the current user reacted using this emoji
+ */
+ me: boolean;
+ /**
+ * Emoji information
+ *
+ * See https://discord.com/developers/docs/resources/emoji#emoji-object
+ */
+ emoji: APIPartialEmoji;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure
+ */
+export interface APIOverwrite {
+ /**
+ * Role or user id
+ */
+ id: Snowflake;
+ /**
+ * Either 0 (role) or 1 (member)
+ *
+ * {@link OverwriteType}
+ */
+ type: OverwriteType;
+ /**
+ * Permission bit set
+ *
+ * See https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ allow: Permissions;
+ /**
+ * Permission bit set
+ *
+ * See https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ deny: Permissions;
+}
+export declare enum OverwriteType {
+ Role = 0,
+ Member = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#thread-metadata-object-thread-metadata-structure
+ */
+export interface APIThreadMetadata {
+ /**
+ * Whether the thread is archived
+ */
+ archived: boolean;
+ /**
+ * Duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080
+ */
+ auto_archive_duration: ThreadAutoArchiveDuration;
+ /**
+ * An ISO8601 timestamp when the thread's archive status was last changed, used for calculating recent activity
+ */
+ archive_timestamp: string;
+ /**
+ * Whether the thread is locked; when a thread is locked, only users with `MANAGE_THREADS` can unarchive it
+ */
+ locked?: boolean;
+ /**
+ * Whether non-moderators can add other non-moderators to the thread; only available on private threads
+ */
+ invitable?: boolean;
+ /**
+ * Timestamp when the thread was created; only populated for threads created after 2022-01-09
+ */
+ create_timestamp?: string;
+}
+export declare enum ThreadAutoArchiveDuration {
+ OneHour = 60,
+ OneDay = 1440,
+ ThreeDays = 4320,
+ OneWeek = 10080
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#thread-member-object-thread-member-structure
+ */
+export interface APIThreadMember {
+ /**
+ * The id of the thread
+ *
+ * **This field is omitted on the member sent within each thread in the `GUILD_CREATE` event**
+ */
+ id?: Snowflake;
+ /**
+ * The id of the member
+ *
+ * **This field is omitted on the member sent within each thread in the `GUILD_CREATE` event**
+ */
+ user_id?: Snowflake;
+ /**
+ * An ISO8601 timestamp for when the member last joined
+ */
+ join_timestamp: string;
+ /**
+ * Member flags combined as a bitfield
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ flags: ThreadMemberFlags;
+ /**
+ * Additional information about the user
+ *
+ * **This field is omitted on the member sent within each thread in the `GUILD_CREATE` event**
+ *
+ * **This field is only present when `with_member` is set to true when calling `List Thread Members` or `Get Thread Member`**
+ */
+ member?: APIGuildMember;
+}
+export declare enum ThreadMemberFlags {
+ /**
+ * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ HasInteracted = 1,
+ /**
+ * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ AllMessages = 2,
+ /**
+ * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ OnlyMentions = 4,
+ /**
+ * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ NoMessages = 8
+}
+export interface APIThreadList {
+ /**
+ * The threads that were fetched
+ */
+ threads: APIChannel[];
+ /**
+ * The members for the client user in each of the fetched threads
+ */
+ members: APIThreadMember[];
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-structure
+ *
+ * Length limit: 6000 characters
+ */
+export interface APIEmbed {
+ /**
+ * Title of embed
+ *
+ * Length limit: 256 characters
+ */
+ title?: string;
+ /**
+ * Type of embed (always "rich" for webhook embeds)
+ *
+ * @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-types
+ */
+ type?: EmbedType;
+ /**
+ * Description of embed
+ *
+ * Length limit: 4096 characters
+ */
+ description?: string;
+ /**
+ * URL of embed
+ */
+ url?: string;
+ /**
+ * Timestamp of embed content
+ */
+ timestamp?: string;
+ /**
+ * Color code of the embed
+ */
+ color?: number;
+ /**
+ * Footer information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure
+ */
+ footer?: APIEmbedFooter;
+ /**
+ * Image information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure
+ */
+ image?: APIEmbedImage;
+ /**
+ * Thumbnail information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure
+ */
+ thumbnail?: APIEmbedThumbnail;
+ /**
+ * Video information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure
+ */
+ video?: APIEmbedVideo;
+ /**
+ * Provider information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure
+ */
+ provider?: APIEmbedProvider;
+ /**
+ * Author information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure
+ */
+ author?: APIEmbedAuthor;
+ /**
+ * Fields information
+ *
+ * Length limit: 25 field objects
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure
+ */
+ fields?: APIEmbedField[];
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-types
+ *
+ * @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
+ */
+export declare enum EmbedType {
+ /**
+ * Generic embed rendered from embed attributes
+ */
+ Rich = "rich",
+ /**
+ * Image embed
+ */
+ Image = "image",
+ /**
+ * Video embed
+ */
+ Video = "video",
+ /**
+ * Animated gif image embed rendered as a video embed
+ */
+ GIFV = "gifv",
+ /**
+ * Article embed
+ */
+ Article = "article",
+ /**
+ * Link embed
+ */
+ Link = "link",
+ /**
+ * Auto moderation alert embed
+ *
+ * @unstable This embed type is currently not documented by Discord, but it is returned in the auto moderation system messages.
+ */
+ AutoModerationMessage = "auto_moderation_message"
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure
+ */
+export interface APIEmbedThumbnail {
+ /**
+ * Source url of thumbnail (only supports http(s) and attachments)
+ */
+ url: string;
+ /**
+ * A proxied url of the thumbnail
+ */
+ proxy_url?: string;
+ /**
+ * Height of thumbnail
+ */
+ height?: number;
+ /**
+ * Width of thumbnail
+ */
+ width?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure
+ */
+export interface APIEmbedVideo {
+ /**
+ * Source url of video
+ */
+ url?: string;
+ /**
+ * A proxied url of the video
+ */
+ proxy_url?: string;
+ /**
+ * Height of video
+ */
+ height?: number;
+ /**
+ * Width of video
+ */
+ width?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure
+ */
+export interface APIEmbedImage {
+ /**
+ * Source url of image (only supports http(s) and attachments)
+ */
+ url: string;
+ /**
+ * A proxied url of the image
+ */
+ proxy_url?: string;
+ /**
+ * Height of image
+ */
+ height?: number;
+ /**
+ * Width of image
+ */
+ width?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure
+ */
+export interface APIEmbedProvider {
+ /**
+ * Name of provider
+ */
+ name?: string;
+ /**
+ * URL of provider
+ */
+ url?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure
+ */
+export interface APIEmbedAuthor {
+ /**
+ * Name of author
+ *
+ * Length limit: 256 characters
+ */
+ name: string;
+ /**
+ * URL of author
+ */
+ url?: string;
+ /**
+ * URL of author icon (only supports http(s) and attachments)
+ */
+ icon_url?: string;
+ /**
+ * A proxied url of author icon
+ */
+ proxy_icon_url?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure
+ */
+export interface APIEmbedFooter {
+ /**
+ * Footer text
+ *
+ * Length limit: 2048 characters
+ */
+ text: string;
+ /**
+ * URL of footer icon (only supports http(s) and attachments)
+ */
+ icon_url?: string;
+ /**
+ * A proxied url of footer icon
+ */
+ proxy_icon_url?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure
+ */
+export interface APIEmbedField {
+ /**
+ * Name of the field
+ *
+ * Length limit: 256 characters
+ */
+ name: string;
+ /**
+ * Value of the field
+ *
+ * Length limit: 1024 characters
+ */
+ value: string;
+ /**
+ * Whether or not this field should display inline
+ */
+ inline?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure
+ */
+export interface APIAttachment {
+ /**
+ * Attachment id
+ */
+ id: Snowflake;
+ /**
+ * Name of file attached
+ */
+ filename: string;
+ /**
+ * Description for the file
+ */
+ description?: string;
+ /**
+ * The attachment's media type
+ *
+ * See https://en.wikipedia.org/wiki/Media_type
+ */
+ content_type?: string;
+ /**
+ * Size of file in bytes
+ */
+ size: number;
+ /**
+ * Source url of file
+ */
+ url: string;
+ /**
+ * A proxied url of file
+ */
+ proxy_url: string;
+ /**
+ * Height of file (if image)
+ */
+ height?: number | null;
+ /**
+ * Width of file (if image)
+ */
+ width?: number | null;
+ /**
+ * Whether this attachment is ephemeral
+ */
+ ephemeral?: boolean;
+ /**
+ * The duration of the audio file (currently for voice messages)
+ */
+ duration_secs?: number;
+ /**
+ * Base64 encoded bytearray representing a sampled waveform (currently for voice messages)
+ */
+ waveform?: string;
+ /**
+ * Attachment flags combined as a bitfield
+ */
+ flags?: AttachmentFlags;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags
+ */
+export declare enum AttachmentFlags {
+ /**
+ * This attachment has been edited using the remix feature on mobile
+ */
+ IsRemix = 4
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-mention-object-channel-mention-structure
+ */
+export interface APIChannelMention {
+ /**
+ * ID of the channel
+ */
+ id: Snowflake;
+ /**
+ * ID of the guild containing the channel
+ */
+ guild_id: Snowflake;
+ /**
+ * The type of channel
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object-channel-types
+ */
+ type: ChannelType;
+ /**
+ * The name of the channel
+ */
+ name: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types
+ */
+export declare enum AllowedMentionsTypes {
+ /**
+ * Controls @everyone and @here mentions
+ */
+ Everyone = "everyone",
+ /**
+ * Controls role mentions
+ */
+ Role = "roles",
+ /**
+ * Controls user mentions
+ */
+ User = "users"
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mentions-structure
+ */
+export interface APIAllowedMentions {
+ /**
+ * An array of allowed mention types to parse from the content
+ *
+ * See https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types
+ */
+ parse?: AllowedMentionsTypes[];
+ /**
+ * Array of role_ids to mention (Max size of 100)
+ */
+ roles?: Snowflake[];
+ /**
+ * Array of user_ids to mention (Max size of 100)
+ */
+ users?: Snowflake[];
+ /**
+ * For replies, whether to mention the author of the message being replied to (default false)
+ *
+ * @default false
+ */
+ replied_user?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#component-object
+ */
+export interface APIBaseComponent<T extends ComponentType> {
+ /**
+ * The type of the component
+ */
+ type: T;
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#component-object-component-types
+ */
+export declare enum ComponentType {
+ /**
+ * Action Row component
+ */
+ ActionRow = 1,
+ /**
+ * Button component
+ */
+ Button = 2,
+ /**
+ * Select menu for picking from defined text options
+ */
+ StringSelect = 3,
+ /**
+ * Text Input component
+ */
+ TextInput = 4,
+ /**
+ * Select menu for users
+ */
+ UserSelect = 5,
+ /**
+ * Select menu for roles
+ */
+ RoleSelect = 6,
+ /**
+ * Select menu for users and roles
+ */
+ MentionableSelect = 7,
+ /**
+ * Select menu for channels
+ */
+ ChannelSelect = 8,
+ /**
+ * Select menu for picking from defined text options
+ *
+ * @deprecated This is the old name for {@apilink ComponentType#StringSelect}
+ */
+ SelectMenu = 3
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#action-rows
+ */
+export interface APIActionRowComponent<T extends APIActionRowComponentTypes> extends APIBaseComponent<ComponentType.ActionRow> {
+ /**
+ * The components in the ActionRow
+ */
+ components: T[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#buttons
+ */
+export interface APIButtonComponentBase<Style extends ButtonStyle> extends APIBaseComponent<ComponentType.Button> {
+ /**
+ * The label to be displayed on the button
+ */
+ label?: string;
+ /**
+ * The style of the button
+ */
+ style: Style;
+ /**
+ * The emoji to display to the left of the text
+ */
+ emoji?: APIMessageComponentEmoji;
+ /**
+ * The status of the button
+ */
+ disabled?: boolean;
+}
+export interface APIMessageComponentEmoji {
+ /**
+ * Emoji id
+ */
+ id?: Snowflake;
+ /**
+ * Emoji name
+ */
+ name?: string;
+ /**
+ * Whether this emoji is animated
+ */
+ animated?: boolean;
+}
+export interface APIButtonComponentWithCustomId extends APIButtonComponentBase<ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success | ButtonStyle.Danger> {
+ /**
+ * The custom_id to be sent in the interaction when clicked
+ */
+ custom_id: string;
+}
+export interface APIButtonComponentWithURL extends APIButtonComponentBase<ButtonStyle.Link> {
+ /**
+ * The URL to direct users to when clicked for Link buttons
+ */
+ url: string;
+}
+export type APIButtonComponent = APIButtonComponentWithCustomId | APIButtonComponentWithURL;
+/**
+ * https://discord.com/developers/docs/interactions/message-components#button-object-button-styles
+ */
+export declare enum ButtonStyle {
+ Primary = 1,
+ Secondary = 2,
+ Success = 3,
+ Danger = 4,
+ Link = 5
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-styles
+ */
+export declare enum TextInputStyle {
+ Short = 1,
+ Paragraph = 2
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menus
+ */
+export interface APIBaseSelectMenuComponent<T extends ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect> extends APIBaseComponent<T> {
+ /**
+ * A developer-defined identifier for the select menu, max 100 characters
+ */
+ custom_id: string;
+ /**
+ * Custom placeholder text if nothing is selected, max 150 characters
+ */
+ placeholder?: string;
+ /**
+ * The minimum number of items that must be chosen; min 0, max 25
+ *
+ * @default 1
+ */
+ min_values?: number;
+ /**
+ * The maximum number of items that can be chosen; max 25
+ *
+ * @default 1
+ */
+ max_values?: number;
+ /**
+ * Disable the select
+ *
+ * @default false
+ */
+ disabled?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menus
+ */
+export interface APIStringSelectComponent extends APIBaseSelectMenuComponent<ComponentType.StringSelect> {
+ /**
+ * Specified choices in a select menu; max 25
+ */
+ options: APISelectMenuOption[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menus
+ */
+export type APIUserSelectComponent = APIBaseSelectMenuComponent<ComponentType.UserSelect>;
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menus
+ */
+export type APIRoleSelectComponent = APIBaseSelectMenuComponent<ComponentType.RoleSelect>;
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menus
+ */
+export type APIMentionableSelectComponent = APIBaseSelectMenuComponent<ComponentType.MentionableSelect>;
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menus
+ */
+export interface APIChannelSelectComponent extends APIBaseSelectMenuComponent<ComponentType.ChannelSelect> {
+ /**
+ * List of channel types to include in the ChannelSelect component
+ */
+ channel_types?: ChannelType[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menus
+ */
+export type APISelectMenuComponent = APIStringSelectComponent | APIUserSelectComponent | APIRoleSelectComponent | APIMentionableSelectComponent | APIChannelSelectComponent;
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-option-structure
+ */
+export interface APISelectMenuOption {
+ /**
+ * The user-facing name of the option (max 25 chars)
+ */
+ label: string;
+ /**
+ * The dev-defined value of the option (max 100 chars)
+ */
+ value: string;
+ /**
+ * An additional description of the option (max 50 chars)
+ */
+ description?: string;
+ /**
+ * The emoji to display to the left of the option
+ */
+ emoji?: APIMessageComponentEmoji;
+ /**
+ * Whether this option should be already-selected by default
+ */
+ default?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-structure
+ */
+export interface APITextInputComponent extends APIBaseComponent<ComponentType.TextInput> {
+ /**
+ * One of text input styles
+ */
+ style: TextInputStyle;
+ /**
+ * The custom id for the text input
+ */
+ custom_id: string;
+ /**
+ * Text that appears on top of the text input field, max 45 characters
+ */
+ label: string;
+ /**
+ * Placeholder for the text input
+ */
+ placeholder?: string;
+ /**
+ * The pre-filled text in the text input
+ */
+ value?: string;
+ /**
+ * Minimal length of text input
+ */
+ min_length?: number;
+ /**
+ * Maximal length of text input
+ */
+ max_length?: number;
+ /**
+ * Whether or not this text input is required or not
+ */
+ required?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object-channel-flags
+ */
+export declare enum ChannelFlags {
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ GuildFeedRemoved = 1,
+ /**
+ * This thread is pinned to the top of its parent forum channel
+ */
+ Pinned = 2,
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ActiveChannelsRemoved = 4,
+ /**
+ * Whether a tag is required to be specified when creating a thread in a forum channel.
+ * Tags are specified in the `applied_tags` field
+ */
+ RequireTag = 16,
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ IsSpam = 32,
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ IsGuildResourceChannel = 128,
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ClydeAI = 256,
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ IsScheduledForDeletion = 512
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#message-components
+ */
+export type APIMessageComponent = APIMessageActionRowComponent | APIActionRowComponent<APIMessageActionRowComponent>;
+export type APIModalComponent = APIModalActionRowComponent | APIActionRowComponent<APIModalActionRowComponent>;
+export type APIActionRowComponentTypes = APIMessageActionRowComponent | APIModalActionRowComponent;
+/**
+ * https://discord.com/developers/docs/interactions/message-components#message-components
+ */
+export type APIMessageActionRowComponent = APIButtonComponent | APISelectMenuComponent;
+export type APIModalActionRowComponent = APITextInputComponent;
+//# sourceMappingURL=channel.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/channel.d.ts.map b/node_modules/discord-api-types/payloads/v10/channel.d.ts.map
new file mode 100644
index 0000000..84da539
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/channel.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;;;OAIG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,WAAW,CAAE,SAAQ,i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AACH,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB,CAAC,aAAa,CAAC,SAAS,CAAC;IACvF;;OAEG;IACH,KAAK,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,oBAAY,YAAY;IACvB;;OAEG;IACH,gBAAgB,IAAS;IACzB;;OAEG;IACH,MAAM,IAAS;IACf;;OAEG;IACH,qBAAqB,IAAS;IAC9B;;;OAGG;IACH,UAAU,KAAS;IACnB;;OAEG;IACH,MAAM,KAAS;IACf;;OAEG;IACH,sBAAsB,MAAS;IAC/B;;OAEG;IACH,OAAO,MAAS;IAChB;;OAEG;IACH,sBAAsB,MAAS;CAC/B;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,4BAA4B,GAAG,qBAAqB,CAAC,4BAA4B,CAAC,CAAC;AACrH,MAAM,MAAM,iBAAiB,GAAG,0BAA0B,GAAG,qBAAqB,CAAC,0BAA0B,CAAC,CAAC;AAE/G,MAAM,MAAM,0BAA0B,GAAG,4BAA4B,GAAG,0BAA0B,CAAC;AAEnG;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,kBAAkB,GAAG,sBAAsB,CAAC;AAGvF,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/channel.js b/node_modules/discord-api-types/payloads/v10/channel.js
new file mode 100644
index 0000000..a159ed3
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/channel.js
@@ -0,0 +1,445 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/channel
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ChannelFlags = exports.TextInputStyle = exports.ButtonStyle = exports.ComponentType = exports.AllowedMentionsTypes = exports.AttachmentFlags = exports.EmbedType = exports.ThreadMemberFlags = exports.ThreadAutoArchiveDuration = exports.OverwriteType = exports.MessageFlags = exports.MessageActivityType = exports.MessageType = exports.VideoQualityMode = exports.ChannelType = exports.ForumLayoutType = exports.SortOrderType = void 0;
+/**
+ * https://discord.com/developers/docs/resources/channel/#channel-object-sort-order-types
+ */
+var SortOrderType;
+(function (SortOrderType) {
+ /**
+ * Sort forum posts by activity
+ */
+ SortOrderType[SortOrderType["LatestActivity"] = 0] = "LatestActivity";
+ /**
+ * Sort forum posts by creation time (from most recent to oldest)
+ */
+ SortOrderType[SortOrderType["CreationDate"] = 1] = "CreationDate";
+})(SortOrderType = exports.SortOrderType || (exports.SortOrderType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel/#channel-object-forum-layout-types
+ */
+var ForumLayoutType;
+(function (ForumLayoutType) {
+ /**
+ * No default has been set for forum channel
+ */
+ ForumLayoutType[ForumLayoutType["NotSet"] = 0] = "NotSet";
+ /**
+ * Display posts as a list
+ */
+ ForumLayoutType[ForumLayoutType["ListView"] = 1] = "ListView";
+ /**
+ * Display posts as a collection of tiles
+ */
+ ForumLayoutType[ForumLayoutType["GalleryView"] = 2] = "GalleryView";
+})(ForumLayoutType = exports.ForumLayoutType || (exports.ForumLayoutType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object-channel-types
+ */
+var ChannelType;
+(function (ChannelType) {
+ /**
+ * A text channel within a guild
+ */
+ ChannelType[ChannelType["GuildText"] = 0] = "GuildText";
+ /**
+ * A direct message between users
+ */
+ ChannelType[ChannelType["DM"] = 1] = "DM";
+ /**
+ * A voice channel within a guild
+ */
+ ChannelType[ChannelType["GuildVoice"] = 2] = "GuildVoice";
+ /**
+ * A direct message between multiple users
+ */
+ ChannelType[ChannelType["GroupDM"] = 3] = "GroupDM";
+ /**
+ * An organizational category that contains up to 50 channels
+ *
+ * See https://support.discord.com/hc/articles/115001580171
+ */
+ ChannelType[ChannelType["GuildCategory"] = 4] = "GuildCategory";
+ /**
+ * A channel that users can follow and crosspost into their own guild
+ *
+ * See https://support.discord.com/hc/articles/360032008192
+ */
+ ChannelType[ChannelType["GuildAnnouncement"] = 5] = "GuildAnnouncement";
+ /**
+ * A temporary sub-channel within a Guild Announcement channel
+ */
+ ChannelType[ChannelType["AnnouncementThread"] = 10] = "AnnouncementThread";
+ /**
+ * A temporary sub-channel within a Guild Text or Guild Forum channel
+ */
+ ChannelType[ChannelType["PublicThread"] = 11] = "PublicThread";
+ /**
+ * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission
+ */
+ ChannelType[ChannelType["PrivateThread"] = 12] = "PrivateThread";
+ /**
+ * A voice channel for hosting events with an audience
+ *
+ * See https://support.discord.com/hc/articles/1500005513722
+ */
+ ChannelType[ChannelType["GuildStageVoice"] = 13] = "GuildStageVoice";
+ /**
+ * The channel in a Student Hub containing the listed servers
+ *
+ * See https://support.discord.com/hc/articles/4406046651927
+ */
+ ChannelType[ChannelType["GuildDirectory"] = 14] = "GuildDirectory";
+ /**
+ * A channel that can only contain threads
+ */
+ ChannelType[ChannelType["GuildForum"] = 15] = "GuildForum";
+ // EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
+ /**
+ * A channel that users can follow and crosspost into their own guild
+ *
+ * @deprecated This is the old name for {@apilink ChannelType#GuildAnnouncement}
+ *
+ * See https://support.discord.com/hc/articles/360032008192
+ */
+ ChannelType[ChannelType["GuildNews"] = 5] = "GuildNews";
+ /**
+ * A temporary sub-channel within a Guild Announcement channel
+ *
+ * @deprecated This is the old name for {@apilink ChannelType#AnnouncementThread}
+ */
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
+ ChannelType[ChannelType["GuildNewsThread"] = 10] = "GuildNewsThread";
+ /**
+ * A temporary sub-channel within a Guild Text channel
+ *
+ * @deprecated This is the old name for {@apilink ChannelType#PublicThread}
+ */
+ ChannelType[ChannelType["GuildPublicThread"] = 11] = "GuildPublicThread";
+ /**
+ * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission
+ *
+ * @deprecated This is the old name for {@apilink ChannelType#PrivateThread}
+ */
+ ChannelType[ChannelType["GuildPrivateThread"] = 12] = "GuildPrivateThread";
+})(ChannelType = exports.ChannelType || (exports.ChannelType = {}));
+var VideoQualityMode;
+(function (VideoQualityMode) {
+ /**
+ * Discord chooses the quality for optimal performance
+ */
+ VideoQualityMode[VideoQualityMode["Auto"] = 1] = "Auto";
+ /**
+ * 720p
+ */
+ VideoQualityMode[VideoQualityMode["Full"] = 2] = "Full";
+})(VideoQualityMode = exports.VideoQualityMode || (exports.VideoQualityMode = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-types
+ */
+var MessageType;
+(function (MessageType) {
+ MessageType[MessageType["Default"] = 0] = "Default";
+ MessageType[MessageType["RecipientAdd"] = 1] = "RecipientAdd";
+ MessageType[MessageType["RecipientRemove"] = 2] = "RecipientRemove";
+ MessageType[MessageType["Call"] = 3] = "Call";
+ MessageType[MessageType["ChannelNameChange"] = 4] = "ChannelNameChange";
+ MessageType[MessageType["ChannelIconChange"] = 5] = "ChannelIconChange";
+ MessageType[MessageType["ChannelPinnedMessage"] = 6] = "ChannelPinnedMessage";
+ MessageType[MessageType["UserJoin"] = 7] = "UserJoin";
+ MessageType[MessageType["GuildBoost"] = 8] = "GuildBoost";
+ MessageType[MessageType["GuildBoostTier1"] = 9] = "GuildBoostTier1";
+ MessageType[MessageType["GuildBoostTier2"] = 10] = "GuildBoostTier2";
+ MessageType[MessageType["GuildBoostTier3"] = 11] = "GuildBoostTier3";
+ MessageType[MessageType["ChannelFollowAdd"] = 12] = "ChannelFollowAdd";
+ MessageType[MessageType["GuildDiscoveryDisqualified"] = 14] = "GuildDiscoveryDisqualified";
+ MessageType[MessageType["GuildDiscoveryRequalified"] = 15] = "GuildDiscoveryRequalified";
+ MessageType[MessageType["GuildDiscoveryGracePeriodInitialWarning"] = 16] = "GuildDiscoveryGracePeriodInitialWarning";
+ MessageType[MessageType["GuildDiscoveryGracePeriodFinalWarning"] = 17] = "GuildDiscoveryGracePeriodFinalWarning";
+ MessageType[MessageType["ThreadCreated"] = 18] = "ThreadCreated";
+ MessageType[MessageType["Reply"] = 19] = "Reply";
+ MessageType[MessageType["ChatInputCommand"] = 20] = "ChatInputCommand";
+ MessageType[MessageType["ThreadStarterMessage"] = 21] = "ThreadStarterMessage";
+ MessageType[MessageType["GuildInviteReminder"] = 22] = "GuildInviteReminder";
+ MessageType[MessageType["ContextMenuCommand"] = 23] = "ContextMenuCommand";
+ MessageType[MessageType["AutoModerationAction"] = 24] = "AutoModerationAction";
+ MessageType[MessageType["RoleSubscriptionPurchase"] = 25] = "RoleSubscriptionPurchase";
+ MessageType[MessageType["InteractionPremiumUpsell"] = 26] = "InteractionPremiumUpsell";
+ MessageType[MessageType["StageStart"] = 27] = "StageStart";
+ MessageType[MessageType["StageEnd"] = 28] = "StageEnd";
+ MessageType[MessageType["StageSpeaker"] = 29] = "StageSpeaker";
+ /**
+ * @unstable https://github.com/discord/discord-api-docs/pull/5927#discussion_r1107678548
+ */
+ MessageType[MessageType["StageRaiseHand"] = 30] = "StageRaiseHand";
+ MessageType[MessageType["StageTopic"] = 31] = "StageTopic";
+ MessageType[MessageType["GuildApplicationPremiumSubscription"] = 32] = "GuildApplicationPremiumSubscription";
+})(MessageType = exports.MessageType || (exports.MessageType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
+ */
+var MessageActivityType;
+(function (MessageActivityType) {
+ MessageActivityType[MessageActivityType["Join"] = 1] = "Join";
+ MessageActivityType[MessageActivityType["Spectate"] = 2] = "Spectate";
+ MessageActivityType[MessageActivityType["Listen"] = 3] = "Listen";
+ MessageActivityType[MessageActivityType["JoinRequest"] = 5] = "JoinRequest";
+})(MessageActivityType = exports.MessageActivityType || (exports.MessageActivityType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-flags
+ */
+var MessageFlags;
+(function (MessageFlags) {
+ /**
+ * This message has been published to subscribed channels (via Channel Following)
+ */
+ MessageFlags[MessageFlags["Crossposted"] = 1] = "Crossposted";
+ /**
+ * This message originated from a message in another channel (via Channel Following)
+ */
+ MessageFlags[MessageFlags["IsCrosspost"] = 2] = "IsCrosspost";
+ /**
+ * Do not include any embeds when serializing this message
+ */
+ MessageFlags[MessageFlags["SuppressEmbeds"] = 4] = "SuppressEmbeds";
+ /**
+ * The source message for this crosspost has been deleted (via Channel Following)
+ */
+ MessageFlags[MessageFlags["SourceMessageDeleted"] = 8] = "SourceMessageDeleted";
+ /**
+ * This message came from the urgent message system
+ */
+ MessageFlags[MessageFlags["Urgent"] = 16] = "Urgent";
+ /**
+ * This message has an associated thread, which shares its id
+ */
+ MessageFlags[MessageFlags["HasThread"] = 32] = "HasThread";
+ /**
+ * This message is only visible to the user who invoked the Interaction
+ */
+ MessageFlags[MessageFlags["Ephemeral"] = 64] = "Ephemeral";
+ /**
+ * This message is an Interaction Response and the bot is "thinking"
+ */
+ MessageFlags[MessageFlags["Loading"] = 128] = "Loading";
+ /**
+ * This message failed to mention some roles and add their members to the thread
+ */
+ MessageFlags[MessageFlags["FailedToMentionSomeRolesInThread"] = 256] = "FailedToMentionSomeRolesInThread";
+ /**
+ * @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ MessageFlags[MessageFlags["ShouldShowLinkNotDiscordWarning"] = 1024] = "ShouldShowLinkNotDiscordWarning";
+ /**
+ * This message will not trigger push and desktop notifications
+ */
+ MessageFlags[MessageFlags["SuppressNotifications"] = 4096] = "SuppressNotifications";
+ /**
+ * This message is a voice message
+ */
+ MessageFlags[MessageFlags["IsVoiceMessage"] = 8192] = "IsVoiceMessage";
+})(MessageFlags = exports.MessageFlags || (exports.MessageFlags = {}));
+var OverwriteType;
+(function (OverwriteType) {
+ OverwriteType[OverwriteType["Role"] = 0] = "Role";
+ OverwriteType[OverwriteType["Member"] = 1] = "Member";
+})(OverwriteType = exports.OverwriteType || (exports.OverwriteType = {}));
+var ThreadAutoArchiveDuration;
+(function (ThreadAutoArchiveDuration) {
+ ThreadAutoArchiveDuration[ThreadAutoArchiveDuration["OneHour"] = 60] = "OneHour";
+ ThreadAutoArchiveDuration[ThreadAutoArchiveDuration["OneDay"] = 1440] = "OneDay";
+ ThreadAutoArchiveDuration[ThreadAutoArchiveDuration["ThreeDays"] = 4320] = "ThreeDays";
+ ThreadAutoArchiveDuration[ThreadAutoArchiveDuration["OneWeek"] = 10080] = "OneWeek";
+})(ThreadAutoArchiveDuration = exports.ThreadAutoArchiveDuration || (exports.ThreadAutoArchiveDuration = {}));
+var ThreadMemberFlags;
+(function (ThreadMemberFlags) {
+ /**
+ * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ThreadMemberFlags[ThreadMemberFlags["HasInteracted"] = 1] = "HasInteracted";
+ /**
+ * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ThreadMemberFlags[ThreadMemberFlags["AllMessages"] = 2] = "AllMessages";
+ /**
+ * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ThreadMemberFlags[ThreadMemberFlags["OnlyMentions"] = 4] = "OnlyMentions";
+ /**
+ * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ThreadMemberFlags[ThreadMemberFlags["NoMessages"] = 8] = "NoMessages";
+})(ThreadMemberFlags = exports.ThreadMemberFlags || (exports.ThreadMemberFlags = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-types
+ *
+ * @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
+ */
+var EmbedType;
+(function (EmbedType) {
+ /**
+ * Generic embed rendered from embed attributes
+ */
+ EmbedType["Rich"] = "rich";
+ /**
+ * Image embed
+ */
+ EmbedType["Image"] = "image";
+ /**
+ * Video embed
+ */
+ EmbedType["Video"] = "video";
+ /**
+ * Animated gif image embed rendered as a video embed
+ */
+ EmbedType["GIFV"] = "gifv";
+ /**
+ * Article embed
+ */
+ EmbedType["Article"] = "article";
+ /**
+ * Link embed
+ */
+ EmbedType["Link"] = "link";
+ /**
+ * Auto moderation alert embed
+ *
+ * @unstable This embed type is currently not documented by Discord, but it is returned in the auto moderation system messages.
+ */
+ EmbedType["AutoModerationMessage"] = "auto_moderation_message";
+})(EmbedType = exports.EmbedType || (exports.EmbedType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags
+ */
+var AttachmentFlags;
+(function (AttachmentFlags) {
+ /**
+ * This attachment has been edited using the remix feature on mobile
+ */
+ AttachmentFlags[AttachmentFlags["IsRemix"] = 4] = "IsRemix";
+})(AttachmentFlags = exports.AttachmentFlags || (exports.AttachmentFlags = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types
+ */
+var AllowedMentionsTypes;
+(function (AllowedMentionsTypes) {
+ /**
+ * Controls @everyone and @here mentions
+ */
+ AllowedMentionsTypes["Everyone"] = "everyone";
+ /**
+ * Controls role mentions
+ */
+ AllowedMentionsTypes["Role"] = "roles";
+ /**
+ * Controls user mentions
+ */
+ AllowedMentionsTypes["User"] = "users";
+})(AllowedMentionsTypes = exports.AllowedMentionsTypes || (exports.AllowedMentionsTypes = {}));
+/**
+ * https://discord.com/developers/docs/interactions/message-components#component-object-component-types
+ */
+var ComponentType;
+(function (ComponentType) {
+ /**
+ * Action Row component
+ */
+ ComponentType[ComponentType["ActionRow"] = 1] = "ActionRow";
+ /**
+ * Button component
+ */
+ ComponentType[ComponentType["Button"] = 2] = "Button";
+ /**
+ * Select menu for picking from defined text options
+ */
+ ComponentType[ComponentType["StringSelect"] = 3] = "StringSelect";
+ /**
+ * Text Input component
+ */
+ ComponentType[ComponentType["TextInput"] = 4] = "TextInput";
+ /**
+ * Select menu for users
+ */
+ ComponentType[ComponentType["UserSelect"] = 5] = "UserSelect";
+ /**
+ * Select menu for roles
+ */
+ ComponentType[ComponentType["RoleSelect"] = 6] = "RoleSelect";
+ /**
+ * Select menu for users and roles
+ */
+ ComponentType[ComponentType["MentionableSelect"] = 7] = "MentionableSelect";
+ /**
+ * Select menu for channels
+ */
+ ComponentType[ComponentType["ChannelSelect"] = 8] = "ChannelSelect";
+ // EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
+ /**
+ * Select menu for picking from defined text options
+ *
+ * @deprecated This is the old name for {@apilink ComponentType#StringSelect}
+ */
+ ComponentType[ComponentType["SelectMenu"] = 3] = "SelectMenu";
+})(ComponentType = exports.ComponentType || (exports.ComponentType = {}));
+/**
+ * https://discord.com/developers/docs/interactions/message-components#button-object-button-styles
+ */
+var ButtonStyle;
+(function (ButtonStyle) {
+ ButtonStyle[ButtonStyle["Primary"] = 1] = "Primary";
+ ButtonStyle[ButtonStyle["Secondary"] = 2] = "Secondary";
+ ButtonStyle[ButtonStyle["Success"] = 3] = "Success";
+ ButtonStyle[ButtonStyle["Danger"] = 4] = "Danger";
+ ButtonStyle[ButtonStyle["Link"] = 5] = "Link";
+})(ButtonStyle = exports.ButtonStyle || (exports.ButtonStyle = {}));
+/**
+ * https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-styles
+ */
+var TextInputStyle;
+(function (TextInputStyle) {
+ TextInputStyle[TextInputStyle["Short"] = 1] = "Short";
+ TextInputStyle[TextInputStyle["Paragraph"] = 2] = "Paragraph";
+})(TextInputStyle = exports.TextInputStyle || (exports.TextInputStyle = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object-channel-flags
+ */
+var ChannelFlags;
+(function (ChannelFlags) {
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ChannelFlags[ChannelFlags["GuildFeedRemoved"] = 1] = "GuildFeedRemoved";
+ /**
+ * This thread is pinned to the top of its parent forum channel
+ */
+ ChannelFlags[ChannelFlags["Pinned"] = 2] = "Pinned";
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ChannelFlags[ChannelFlags["ActiveChannelsRemoved"] = 4] = "ActiveChannelsRemoved";
+ /**
+ * Whether a tag is required to be specified when creating a thread in a forum channel.
+ * Tags are specified in the `applied_tags` field
+ */
+ ChannelFlags[ChannelFlags["RequireTag"] = 16] = "RequireTag";
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ChannelFlags[ChannelFlags["IsSpam"] = 32] = "IsSpam";
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ChannelFlags[ChannelFlags["IsGuildResourceChannel"] = 128] = "IsGuildResourceChannel";
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ChannelFlags[ChannelFlags["ClydeAI"] = 256] = "ClydeAI";
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ChannelFlags[ChannelFlags["IsScheduledForDeletion"] = 512] = "IsScheduledForDeletion";
+})(ChannelFlags = exports.ChannelFlags || (exports.ChannelFlags = {}));
+//# sourceMappingURL=channel.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/channel.js.map b/node_modules/discord-api-types/payloads/v10/channel.js.map
new file mode 100644
index 0000000..95ddee4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/channel.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA6RH;;GAEG;AACH,IAAY,aASX;AATD,WAAY,aAAa;IACxB;;OAEG;IACH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_modules/discord-api-types/payloads/v10/emoji.d.ts b/node_modules/discord-api-types/payloads/v10/emoji.d.ts
new file mode 100644
index 0000000..74c1522
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/emoji.d.ts
@@ -0,0 +1,49 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/emoji
+ */
+import type { Snowflake } from '../../globals';
+import type { APIRole } from './permissions';
+import type { APIUser } from './user';
+/**
+ * Not documented but mentioned
+ */
+export interface APIPartialEmoji {
+ /**
+ * Emoji id
+ */
+ id: Snowflake | null;
+ /**
+ * Emoji name (can be null only in reaction emoji objects)
+ */
+ name: string | null;
+ /**
+ * Whether this emoji is animated
+ */
+ animated?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure
+ */
+export interface APIEmoji extends APIPartialEmoji {
+ /**
+ * Roles this emoji is whitelisted to
+ */
+ roles?: APIRole['id'][];
+ /**
+ * User that created this emoji
+ */
+ user?: APIUser;
+ /**
+ * Whether this emoji must be wrapped in colons
+ */
+ require_colons?: boolean;
+ /**
+ * Whether this emoji is managed
+ */
+ managed?: boolean;
+ /**
+ * Whether this emoji can be used, may be false due to loss of Server Boosts
+ */
+ available?: boolean;
+}
+//# sourceMappingURL=emoji.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/emoji.d.ts.map b/node_modules/discord-api-types/payloads/v10/emoji.d.ts.map
new file mode 100644
index 0000000..c211400
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/emoji.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,EAAE,EAAE,SAAS,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,eAAe;IAChD;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/emoji.js b/node_modules/discord-api-types/payloads/v10/emoji.js
new file mode 100644
index 0000000..a640b7e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/emoji.js
@@ -0,0 +1,6 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/emoji
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=emoji.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/emoji.js.map b/node_modules/discord-api-types/payloads/v10/emoji.js.map
new file mode 100644
index 0000000..9037967
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/emoji.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"emoji.js","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":";AAAA;;GAEG"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/gateway.d.ts b/node_modules/discord-api-types/payloads/v10/gateway.d.ts
new file mode 100644
index 0000000..44017e6
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/gateway.d.ts
@@ -0,0 +1,370 @@
+/**
+ * Types extracted from
+ * - https://discord.com/developers/docs/topics/gateway
+ * - https://discord.com/developers/docs/topics/gateway-events
+ */
+import type { Snowflake } from '../../globals';
+import type { APIChannel, APIThreadMember } from './channel';
+import type { APIEmoji } from './emoji';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/topics/gateway#get-gateway
+ */
+export interface APIGatewayInfo {
+ /**
+ * The WSS URL that can be used for connecting to the gateway
+ */
+ url: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#get-gateway-bot
+ */
+export interface APIGatewayBotInfo extends APIGatewayInfo {
+ /**
+ * The recommended number of shards to use when connecting
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ shards: number;
+ /**
+ * Information on the current session start limit
+ *
+ * See https://discord.com/developers/docs/topics/gateway#session-start-limit-object
+ */
+ session_start_limit: APIGatewaySessionStartLimit;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#session-start-limit-object
+ */
+export interface APIGatewaySessionStartLimit {
+ /**
+ * The total number of session starts the current user is allowed
+ */
+ total: number;
+ /**
+ * The remaining number of session starts the current user is allowed
+ */
+ remaining: number;
+ /**
+ * The number of milliseconds after which the limit resets
+ */
+ reset_after: number;
+ /**
+ * The number of identify requests allowed per 5 seconds
+ */
+ max_concurrency: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields
+ */
+export interface GatewayPresenceUpdate {
+ /**
+ * The user presence is being updated for
+ *
+ * **The user object within this event can be partial, the only field which must be sent is the `id` field,
+ * everything else is optional.**
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user: Partial<APIUser> & Pick<APIUser, 'id'>;
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * Either "idle", "dnd", "online", or "offline"
+ */
+ status?: PresenceUpdateStatus;
+ /**
+ * User's current activities
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#activity-object
+ */
+ activities?: GatewayActivity[];
+ /**
+ * User's platform-dependent status
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#client-status-object
+ */
+ client_status?: GatewayPresenceClientStatus;
+}
+export declare enum PresenceUpdateStatus {
+ Online = "online",
+ DoNotDisturb = "dnd",
+ Idle = "idle",
+ /**
+ * Invisible and shown as offline
+ */
+ Invisible = "invisible",
+ Offline = "offline"
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#client-status-object
+ */
+export interface GatewayPresenceClientStatus {
+ /**
+ * The user's status set for an active desktop (Windows, Linux, Mac) application session
+ */
+ desktop?: PresenceUpdateStatus;
+ /**
+ * The user's status set for an active mobile (iOS, Android) application session
+ */
+ mobile?: PresenceUpdateStatus;
+ /**
+ * The user's status set for an active web (browser, bot account) application session
+ */
+ web?: PresenceUpdateStatus;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure
+ */
+export interface GatewayActivity {
+ /**
+ * The activity's id
+ *
+ * @unstable
+ */
+ id: string;
+ /**
+ * The activity's name
+ */
+ name: string;
+ /**
+ * Activity type
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
+ */
+ type: ActivityType;
+ /**
+ * Stream url, is validated when type is `1`
+ */
+ url?: string | null;
+ /**
+ * Unix timestamp of when the activity was added to the user's session
+ */
+ created_at: number;
+ /**
+ * Unix timestamps for start and/or end of the game
+ */
+ timestamps?: GatewayActivityTimestamps;
+ /**
+ * The Spotify song id
+ *
+ * @unstable
+ */
+ sync_id?: string;
+ /**
+ * The platform this activity is being done on
+ *
+ * @unstable You can use {@link ActivityPlatform} as a stepping stone, but this might be inaccurate
+ */
+ platform?: string;
+ /**
+ * Application id for the game
+ */
+ application_id?: Snowflake;
+ /**
+ * What the player is currently doing
+ */
+ details?: string | null;
+ /**
+ * The user's current party status
+ */
+ state?: string | null;
+ /**
+ * The emoji used for a custom status
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji
+ */
+ emoji?: GatewayActivityEmoji;
+ /**
+ * @unstable
+ */
+ session_id?: string;
+ /**
+ * Information for the current party of the player
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party
+ */
+ party?: GatewayActivityParty;
+ /**
+ * Images for the presence and their hover texts
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets
+ */
+ assets?: GatewayActivityAssets;
+ /**
+ * Secrets for Rich Presence joining and spectating
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets
+ */
+ secrets?: GatewayActivitySecrets;
+ /**
+ * Whether or not the activity is an instanced game session
+ */
+ instance?: boolean;
+ /**
+ * Activity flags `OR`d together, describes what the payload includes
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ flags?: ActivityFlags;
+ /**
+ * The custom buttons shown in the Rich Presence (max 2)
+ */
+ buttons?: string[] | GatewayActivityButton[];
+}
+/**
+ * @unstable This enum is currently not documented by Discord but has known values which we will try to keep up to date.
+ * Values might be added or removed without a major version bump.
+ */
+export declare enum ActivityPlatform {
+ Desktop = "desktop",
+ Xbox = "xbox",
+ Samsung = "samsung",
+ IOS = "ios",
+ Android = "android",
+ Embedded = "embedded",
+ PS4 = "ps4",
+ PS5 = "ps5"
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
+ */
+export declare enum ActivityType {
+ /**
+ * Playing {game}
+ */
+ Playing = 0,
+ /**
+ * Streaming {details}
+ */
+ Streaming = 1,
+ /**
+ * Listening to {name}
+ */
+ Listening = 2,
+ /**
+ * Watching {details}
+ */
+ Watching = 3,
+ /**
+ * {emoji} {details}
+ */
+ Custom = 4,
+ /**
+ * Competing in {name}
+ */
+ Competing = 5
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps
+ */
+export interface GatewayActivityTimestamps {
+ /**
+ * Unix time (in milliseconds) of when the activity started
+ */
+ start?: number;
+ /**
+ * Unix time (in milliseconds) of when the activity ends
+ */
+ end?: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji
+ */
+export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'id' | 'animated'>> & Pick<APIEmoji, 'name'>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party
+ */
+export interface GatewayActivityParty {
+ /**
+ * The id of the party
+ */
+ id?: string;
+ /**
+ * Used to show the party's current and maximum size
+ */
+ size?: [current_size: number, max_size: number];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets
+ */
+export type GatewayActivityAssets = Partial<Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets
+ */
+export type GatewayActivitySecrets = Partial<Record<'join' | 'spectate' | 'match', string>>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags
+ */
+export declare enum ActivityFlags {
+ Instance = 1,
+ Join = 2,
+ Spectate = 4,
+ JoinRequest = 8,
+ Sync = 16,
+ Play = 32,
+ PartyPrivacyFriends = 64,
+ PartyPrivacyVoiceChannel = 128,
+ Embedded = 256
+}
+export interface GatewayActivityButton {
+ /**
+ * The text shown on the button (1-32 characters)
+ */
+ label: string;
+ /**
+ * The url opened when clicking the button (1-512 characters)
+ */
+ url: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-list-sync-thread-list-sync-event-fields
+ */
+export interface GatewayThreadListSync {
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The ids of all the parent channels whose threads are being synced, otherwise the entire guild
+ */
+ channel_ids?: Snowflake[];
+ /**
+ * Array of the synced threads
+ */
+ threads: APIChannel[];
+ /**
+ * The member objects for the client user in each joined thread that was synced
+ */
+ members: APIThreadMember[];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-members-update-thread-members-update-event-fields
+ */
+export interface GatewayThreadMembersUpdate {
+ /**
+ * The id of the thread for which members are being synced
+ */
+ id: Snowflake;
+ /**
+ * The id of the guild that the thread is in
+ */
+ guild_id: Snowflake;
+ /**
+ * The approximate member count of the thread, does not count above 50 even if there are more members
+ */
+ member_count: number;
+ /**
+ * The members that were added to the thread
+ */
+ added_members?: APIThreadMember[];
+ /**
+ * The ids of the members that were removed from the thread
+ */
+ removed_member_ids?: Snowflake[];
+}
+//# sourceMappingURL=gateway.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/gateway.d.ts.map b/node_modules/discord-api-types/payloads/v10/gateway.d.ts.map
new file mode 100644
index 0000000..2b3decc
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/gateway.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,C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M,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC;IAC1B;;OAEG;IACH,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB;;OAEG;IACH,OAAO,EAAE,eAAe,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,eAAe,EAAE,CAAC;IAClC;;OAEG;IACH,kBAAkB,CAAC,EAAE,SAAS,EAAE,CAAC;CACjC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/gateway.js b/node_modules/discord-api-types/payloads/v10/gateway.js
new file mode 100644
index 0000000..8f1dbf4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/gateway.js
@@ -0,0 +1,80 @@
+"use strict";
+/**
+ * Types extracted from
+ * - https://discord.com/developers/docs/topics/gateway
+ * - https://discord.com/developers/docs/topics/gateway-events
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ActivityFlags = exports.ActivityType = exports.ActivityPlatform = exports.PresenceUpdateStatus = void 0;
+var PresenceUpdateStatus;
+(function (PresenceUpdateStatus) {
+ PresenceUpdateStatus["Online"] = "online";
+ PresenceUpdateStatus["DoNotDisturb"] = "dnd";
+ PresenceUpdateStatus["Idle"] = "idle";
+ /**
+ * Invisible and shown as offline
+ */
+ PresenceUpdateStatus["Invisible"] = "invisible";
+ PresenceUpdateStatus["Offline"] = "offline";
+})(PresenceUpdateStatus = exports.PresenceUpdateStatus || (exports.PresenceUpdateStatus = {}));
+/**
+ * @unstable This enum is currently not documented by Discord but has known values which we will try to keep up to date.
+ * Values might be added or removed without a major version bump.
+ */
+var ActivityPlatform;
+(function (ActivityPlatform) {
+ ActivityPlatform["Desktop"] = "desktop";
+ ActivityPlatform["Xbox"] = "xbox";
+ ActivityPlatform["Samsung"] = "samsung";
+ ActivityPlatform["IOS"] = "ios";
+ ActivityPlatform["Android"] = "android";
+ ActivityPlatform["Embedded"] = "embedded";
+ ActivityPlatform["PS4"] = "ps4";
+ ActivityPlatform["PS5"] = "ps5";
+})(ActivityPlatform = exports.ActivityPlatform || (exports.ActivityPlatform = {}));
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
+ */
+var ActivityType;
+(function (ActivityType) {
+ /**
+ * Playing {game}
+ */
+ ActivityType[ActivityType["Playing"] = 0] = "Playing";
+ /**
+ * Streaming {details}
+ */
+ ActivityType[ActivityType["Streaming"] = 1] = "Streaming";
+ /**
+ * Listening to {name}
+ */
+ ActivityType[ActivityType["Listening"] = 2] = "Listening";
+ /**
+ * Watching {details}
+ */
+ ActivityType[ActivityType["Watching"] = 3] = "Watching";
+ /**
+ * {emoji} {details}
+ */
+ ActivityType[ActivityType["Custom"] = 4] = "Custom";
+ /**
+ * Competing in {name}
+ */
+ ActivityType[ActivityType["Competing"] = 5] = "Competing";
+})(ActivityType = exports.ActivityType || (exports.ActivityType = {}));
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags
+ */
+var ActivityFlags;
+(function (ActivityFlags) {
+ ActivityFlags[ActivityFlags["Instance"] = 1] = "Instance";
+ ActivityFlags[ActivityFlags["Join"] = 2] = "Join";
+ ActivityFlags[ActivityFlags["Spectate"] = 4] = "Spectate";
+ ActivityFlags[ActivityFlags["JoinRequest"] = 8] = "JoinRequest";
+ ActivityFlags[ActivityFlags["Sync"] = 16] = "Sync";
+ ActivityFlags[ActivityFlags["Play"] = 32] = "Play";
+ ActivityFlags[ActivityFlags["PartyPrivacyFriends"] = 64] = "PartyPrivacyFriends";
+ ActivityFlags[ActivityFlags["PartyPrivacyVoiceChannel"] = 128] = "PartyPrivacyVoiceChannel";
+ ActivityFlags[ActivityFlags["Embedded"] = 256] = "Embedded";
+})(ActivityFlags = exports.ActivityFlags || (exports.ActivityFlags = {}));
+//# sourceMappingURL=gateway.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/gateway.js.map b/node_modules/discord-api-types/payloads/v10/gateway.js.map
new file mode 100644
index 0000000..21fb42e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/gateway.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"gateway.js","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AA4FH,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC/B,yCAAiB,CAAA;IACjB,4CAAoB,CAAA;IACpB,qCAAa,CAAA;IACb;;OAEG;IACH,+CAAuB,CAAA;IACvB,2CAAmB,CAAA;AACpB,CAAC,EATW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAS/B;AA0HD;;;GAGG;AACH,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC3B,uCAAmB,CAAA;IACnB,iCAAa,CAAA;IACb,uCAAmB,CAAA;IACnB,+BAAW,CAAA;IACX,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,+BAAW,CAAA;IACX,+BAAW,CAAA;AACZ,CAAC,EATW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAS3B;AAED;;GAEG;AACH,IAAY,YAyBX;AAzBD,WAAY,YAAY;IACvB;;OAEG;IACH,qDAAO,CAAA;IACP;;OAEG;IACH,yDAAS,CAAA;IACT;;OAEG;IACH,yDAAS,CAAA;IACT;;OAEG;IACH,uDAAQ,CAAA;IACR;;OAEG;IACH,mDAAM,CAAA;IACN;;OAEG;IACH,yDAAS,CAAA;AACV,CAAC,EAzBW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAyBvB;AA+CD;;GAEG;AACH,IAAY,aAUX;AAVD,WAAY,aAAa;IACxB,yDAAiB,CAAA;IACjB,iDAAa,CAAA;IACb,yDAAiB,CAAA;IACjB,+DAAoB,CAAA;IACpB,kDAAa,CAAA;IACb,kDAAa,CAAA;IACb,gFAA4B,CAAA;IAC5B,2FAAiC,CAAA;IACjC,2DAAiB,CAAA;AAClB,CAAC,EAVW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAUxB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/guild.d.ts b/node_modules/discord-api-types/payloads/v10/guild.d.ts
new file mode 100644
index 0000000..269b9e1
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/guild.d.ts
@@ -0,0 +1,1083 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/guild
+ */
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIEmoji, APIPartialEmoji } from './emoji';
+import type { PresenceUpdateStatus } from './gateway';
+import type { OAuth2Scopes } from './oauth2';
+import type { APIRole } from './permissions';
+import type { APISticker } from './sticker';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/resources/guild#unavailable-guild-object
+ */
+export interface APIUnavailableGuild {
+ /**
+ * Guild id
+ */
+ id: Snowflake;
+ /**
+ * `true` if this guild is unavailable due to an outage
+ */
+ unavailable: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
+ */
+export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'>, Pick<APIGuild, 'welcome_screen'> {
+ /**
+ * Guild name (2-100 characters, excluding trailing and leading whitespace)
+ */
+ name: string;
+ /**
+ * Icon hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ icon: string | null;
+ /**
+ * Splash hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ splash: string | null;
+ /**
+ * Banner hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ banner?: string | null;
+ /**
+ * The description for the guild
+ */
+ description?: string | null;
+ /**
+ * Enabled guild features
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ */
+ features?: GuildFeature[];
+ /**
+ * Verification level required for the guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ */
+ verification_level?: GuildVerificationLevel;
+ /**
+ * The vanity url code for the guild
+ */
+ vanity_url_code?: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
+ */
+export interface APIGuild extends APIPartialGuild {
+ /**
+ * Icon hash, returned when in the template object
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ icon_hash?: string | null;
+ /**
+ * Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ discovery_splash: string | null;
+ /**
+ * `true` if the user is the owner of the guild
+ *
+ * **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds**
+ */
+ owner?: boolean;
+ /**
+ * ID of owner
+ */
+ owner_id: Snowflake;
+ /**
+ * Total permissions for the user in the guild (excludes overrides)
+ *
+ * **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds**
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ permissions?: Permissions;
+ /**
+ * Voice region id for the guild
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-region-object
+ *
+ * @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
+ */
+ region: string;
+ /**
+ * ID of afk channel
+ */
+ afk_channel_id: Snowflake | null;
+ /**
+ * afk timeout in seconds, can be set to: `60`, `300`, `900`, `1800`, `3600`
+ */
+ afk_timeout: 60 | 300 | 900 | 1800 | 3600;
+ /**
+ * `true` if the guild widget is enabled
+ */
+ widget_enabled?: boolean;
+ /**
+ * The channel id that the widget will generate an invite to, or `null` if set to no invite
+ */
+ widget_channel_id?: Snowflake | null;
+ /**
+ * Verification level required for the guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ */
+ verification_level: GuildVerificationLevel;
+ /**
+ * Default message notifications level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
+ */
+ default_message_notifications: GuildDefaultMessageNotifications;
+ /**
+ * Explicit content filter level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
+ */
+ explicit_content_filter: GuildExplicitContentFilter;
+ /**
+ * Roles in the guild
+ *
+ * See https://discord.com/developers/docs/topics/permissions#role-object
+ */
+ roles: APIRole[];
+ /**
+ * Custom guild emojis
+ *
+ * See https://discord.com/developers/docs/resources/emoji#emoji-object
+ */
+ emojis: APIEmoji[];
+ /**
+ * Enabled guild features
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ */
+ features: GuildFeature[];
+ /**
+ * Required MFA level for the guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
+ */
+ mfa_level: GuildMFALevel;
+ /**
+ * Application id of the guild creator if it is bot-created
+ */
+ application_id: Snowflake | null;
+ /**
+ * The id of the channel where guild notices such as welcome messages and boost events are posted
+ */
+ system_channel_id: Snowflake | null;
+ /**
+ * System channel flags
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
+ */
+ system_channel_flags: GuildSystemChannelFlags;
+ /**
+ * The id of the channel where Community guilds can display rules and/or guidelines
+ */
+ rules_channel_id: Snowflake | null;
+ /**
+ * The maximum number of presences for the guild (`null` is always returned, apart from the largest of guilds)
+ */
+ max_presences?: number | null;
+ /**
+ * The maximum number of members for the guild
+ */
+ max_members?: number;
+ /**
+ * The vanity url code for the guild
+ */
+ vanity_url_code: string | null;
+ /**
+ * The description for the guild
+ */
+ description: string | null;
+ /**
+ * Banner hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ banner: string | null;
+ /**
+ * Premium tier (Server Boost level)
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
+ */
+ premium_tier: GuildPremiumTier;
+ /**
+ * The number of boosts this guild currently has
+ */
+ premium_subscription_count?: number;
+ /**
+ * The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
+ *
+ * @default "en-US"
+ */
+ preferred_locale: string;
+ /**
+ * The id of the channel where admins and moderators of Community guilds receive notices from Discord
+ */
+ public_updates_channel_id: Snowflake | null;
+ /**
+ * The maximum amount of users in a video channel
+ */
+ max_video_channel_users?: number;
+ /**
+ * The maximum amount of users in a stage video channel
+ */
+ max_stage_video_channel_users?: number;
+ /**
+ * Approximate number of members in this guild,
+ * returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true`
+ */
+ approximate_member_count?: number;
+ /**
+ * Approximate number of non-offline members in this guild,
+ * returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true`
+ */
+ approximate_presence_count?: number;
+ /**
+ * The welcome screen of a Community guild, shown to new members
+ *
+ * Returned in the invite object
+ */
+ welcome_screen?: APIGuildWelcomeScreen;
+ /**
+ * The nsfw level of the guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
+ */
+ nsfw_level: GuildNSFWLevel;
+ /**
+ * Custom guild stickers
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object
+ */
+ stickers: APISticker[];
+ /**
+ * Whether the guild has the boost progress bar enabled.
+ */
+ premium_progress_bar_enabled: boolean;
+ /**
+ * The type of Student Hub the guild is
+ */
+ hub_type: GuildHubType | null;
+ /**
+ * The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
+ */
+ safety_alerts_channel_id: Snowflake | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
+ */
+export declare enum GuildDefaultMessageNotifications {
+ AllMessages = 0,
+ OnlyMentions = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
+ */
+export declare enum GuildExplicitContentFilter {
+ Disabled = 0,
+ MembersWithoutRoles = 1,
+ AllMembers = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
+ */
+export declare enum GuildMFALevel {
+ None = 0,
+ Elevated = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
+ */
+export declare enum GuildNSFWLevel {
+ Default = 0,
+ Explicit = 1,
+ Safe = 2,
+ AgeRestricted = 3
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ */
+export declare enum GuildVerificationLevel {
+ /**
+ * Unrestricted
+ */
+ None = 0,
+ /**
+ * Must have verified email on account
+ */
+ Low = 1,
+ /**
+ * Must be registered on Discord for longer than 5 minutes
+ */
+ Medium = 2,
+ /**
+ * Must be a member of the guild for longer than 10 minutes
+ */
+ High = 3,
+ /**
+ * Must have a verified phone number
+ */
+ VeryHigh = 4
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
+ */
+export declare enum GuildPremiumTier {
+ None = 0,
+ Tier1 = 1,
+ Tier2 = 2,
+ Tier3 = 3
+}
+export declare enum GuildHubType {
+ Default = 0,
+ HighSchool = 1,
+ College = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
+ */
+export declare enum GuildSystemChannelFlags {
+ /**
+ * Suppress member join notifications
+ */
+ SuppressJoinNotifications = 1,
+ /**
+ * Suppress server boost notifications
+ */
+ SuppressPremiumSubscriptions = 2,
+ /**
+ * Suppress server setup tips
+ */
+ SuppressGuildReminderNotifications = 4,
+ /**
+ * Hide member join sticker reply buttons
+ */
+ SuppressJoinNotificationReplies = 8,
+ /**
+ * Suppress role subscription purchase and renewal notifications
+ */
+ SuppressRoleSubscriptionPurchaseNotifications = 16,
+ /**
+ * Hide role subscription sticker reply buttons
+ */
+ SuppressRoleSubscriptionPurchaseNotificationReplies = 32
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ */
+export declare enum GuildFeature {
+ /**
+ * Guild has access to set an animated guild banner image
+ */
+ AnimatedBanner = "ANIMATED_BANNER",
+ /**
+ * Guild has access to set an animated guild icon
+ */
+ AnimatedIcon = "ANIMATED_ICON",
+ /**
+ * Guild is using the old permissions configuration behavior
+ *
+ * See https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes
+ */
+ ApplicationCommandPermissionsV2 = "APPLICATION_COMMAND_PERMISSIONS_V2",
+ /**
+ * Guild has set up auto moderation rules
+ */
+ AutoModeration = "AUTO_MODERATION",
+ /**
+ * Guild has access to set a guild banner image
+ */
+ Banner = "BANNER",
+ /**
+ * Guild can enable welcome screen, Membership Screening and discovery, and receives community updates
+ */
+ Community = "COMMUNITY",
+ /**
+ * Guild has enabled monetization
+ */
+ CreatorMonetizableProvisional = "CREATOR_MONETIZABLE_PROVISIONAL",
+ /**
+ * Guild has enabled the role subscription promo page
+ */
+ CreatorStorePage = "CREATOR_STORE_PAGE",
+ DeveloperSupportServer = "DEVELOPER_SUPPORT_SERVER",
+ /**
+ * Guild is able to be discovered in the directory
+ */
+ Discoverable = "DISCOVERABLE",
+ /**
+ * Guild is able to be featured in the directory
+ */
+ Featurable = "FEATURABLE",
+ /**
+ * Guild is listed in a directory channel
+ */
+ HasDirectoryEntry = "HAS_DIRECTORY_ENTRY",
+ /**
+ * Guild is a Student Hub
+ *
+ * See https://support.discord.com/hc/articles/4406046651927
+ *
+ * @unstable This feature is currently not documented by Discord, but has known value
+ */
+ Hub = "HUB",
+ /**
+ * Guild has disabled invite usage, preventing users from joining
+ */
+ InvitesDisabled = "INVITES_DISABLED",
+ /**
+ * Guild has access to set an invite splash background
+ */
+ InviteSplash = "INVITE_SPLASH",
+ /**
+ * Guild is in a Student Hub
+ *
+ * See https://support.discord.com/hc/articles/4406046651927
+ *
+ * @unstable This feature is currently not documented by Discord, but has known value
+ */
+ LinkedToHub = "LINKED_TO_HUB",
+ /**
+ * Guild has enabled Membership Screening
+ */
+ MemberVerificationGateEnabled = "MEMBER_VERIFICATION_GATE_ENABLED",
+ /**
+ * Guild has enabled monetization
+ *
+ * @unstable This feature is no longer documented by Discord
+ */
+ MonetizationEnabled = "MONETIZATION_ENABLED",
+ /**
+ * Guild has increased custom sticker slots
+ */
+ MoreStickers = "MORE_STICKERS",
+ /**
+ * Guild has access to create news channels
+ */
+ News = "NEWS",
+ /**
+ * Guild is partnered
+ */
+ Partnered = "PARTNERED",
+ /**
+ * Guild can be previewed before joining via Membership Screening or the directory
+ */
+ PreviewEnabled = "PREVIEW_ENABLED",
+ /**
+ * Guild has access to create private threads
+ */
+ PrivateThreads = "PRIVATE_THREADS",
+ /**
+ * Guild has disabled alerts for join raids in the configured safety alerts channel
+ */
+ RaidAlertsDisabled = "RAID_ALERTS_DISABLED",
+ RelayEnabled = "RELAY_ENABLED",
+ /**
+ * Guild is able to set role icons
+ */
+ RoleIcons = "ROLE_ICONS",
+ /**
+ * Guild has role subscriptions that can be purchased
+ */
+ RoleSubscriptionsAvailableForPurchase = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE",
+ /**
+ * Guild has enabled role subscriptions
+ */
+ RoleSubscriptionsEnabled = "ROLE_SUBSCRIPTIONS_ENABLED",
+ /**
+ * Guild has enabled ticketed events
+ */
+ TicketedEventsEnabled = "TICKETED_EVENTS_ENABLED",
+ /**
+ * Guild has access to set a vanity URL
+ */
+ VanityURL = "VANITY_URL",
+ /**
+ * Guild is verified
+ */
+ Verified = "VERIFIED",
+ /**
+ * Guild has access to set 384kbps bitrate in voice (previously VIP voice servers)
+ */
+ VIPRegions = "VIP_REGIONS",
+ /**
+ * Guild has enabled the welcome screen
+ */
+ WelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED"
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-preview-object
+ */
+export interface APIGuildPreview {
+ /**
+ * Guild id
+ */
+ id: Snowflake;
+ /**
+ * Guild name (2-100 characters)
+ */
+ name: string;
+ /**
+ * Icon hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ icon: string | null;
+ /**
+ * Splash hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ splash: string | null;
+ /**
+ * Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ discovery_splash: string | null;
+ /**
+ * Custom guild emojis
+ *
+ * See https://discord.com/developers/docs/resources/emoji#emoji-object
+ */
+ emojis: APIEmoji[];
+ /**
+ * Enabled guild features
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ */
+ features: GuildFeature[];
+ /**
+ * Approximate number of members in this guild
+ */
+ approximate_member_count: number;
+ /**
+ * Approximate number of online members in this guild
+ */
+ approximate_presence_count: number;
+ /**
+ * The description for the guild
+ */
+ description: string;
+ /**
+ * Custom guild stickers
+ */
+ stickers: APISticker[];
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-widget-object
+ */
+export interface APIGuildWidgetSettings {
+ /**
+ * Whether the widget is enabled
+ */
+ enabled: boolean;
+ /**
+ * The widget channel id
+ */
+ channel_id: Snowflake | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+export interface APIGuildMember {
+ /**
+ * The user this guild member represents
+ *
+ * **This field won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.**
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user?: APIUser;
+ /**
+ * This users guild nickname
+ */
+ nick?: string | null;
+ /**
+ * The member's guild avatar hash
+ */
+ avatar?: string | null;
+ /**
+ * Array of role object ids
+ *
+ * See https://discord.com/developers/docs/topics/permissions#role-object
+ */
+ roles: Snowflake[];
+ /**
+ * When the user joined the guild
+ */
+ joined_at: string;
+ /**
+ * When the user started boosting the guild
+ *
+ * See https://support.discord.com/hc/articles/360028038352
+ */
+ premium_since?: string | null;
+ /**
+ * Whether the user is deafened in voice channels
+ */
+ deaf: boolean;
+ /**
+ * Whether the user is muted in voice channels
+ */
+ mute: boolean;
+ /**
+ * Guild member flags represented as a bit set, defaults to `0`
+ */
+ flags: GuildMemberFlags;
+ /**
+ * Whether the user has not yet passed the guild's Membership Screening requirements
+ *
+ * @remarks If this field is not present, it can be assumed as `false`.
+ */
+ pending?: boolean;
+ /**
+ * Timestamp of when the time out will be removed; until then, they cannot interact with the guild
+ */
+ communication_disabled_until?: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags
+ */
+export declare enum GuildMemberFlags {
+ /**
+ * Member has left and rejoined the guild
+ */
+ DidRejoin = 1,
+ /**
+ * Member has completed onboarding
+ */
+ CompletedOnboarding = 2,
+ /**
+ * Member bypasses guild verification requirements
+ */
+ BypassesVerification = 4,
+ /**
+ * Member has started onboarding
+ */
+ StartedOnboarding = 8,
+ /**
+ * @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ StartedHomeActions = 32,
+ /**
+ * @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ CompletedHomeActions = 64,
+ /**
+ * @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ AutomodQuarantinedUsernameOrGuildNickname = 128,
+ /**
+ * @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ AutomodQuarantinedBio = 256
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-object
+ */
+export interface APIGuildIntegration {
+ /**
+ * Integration id
+ */
+ id: Snowflake;
+ /**
+ * Integration name
+ */
+ name: string;
+ /**
+ * Integration type
+ */
+ type: APIGuildIntegrationType;
+ /**
+ * Is this integration enabled
+ */
+ enabled: boolean;
+ /**
+ * Is this integration syncing
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ syncing?: boolean;
+ /**
+ * ID that this integration uses for "subscribers"
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ role_id?: Snowflake;
+ /**
+ * Whether emoticons should be synced for this integration (`twitch` only currently)
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ enable_emoticons?: boolean;
+ /**
+ * The behavior of expiring subscribers
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ *
+ * See https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
+ */
+ expire_behavior?: IntegrationExpireBehavior;
+ /**
+ * The grace period (in days) before expiring subscribers
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ expire_grace_period?: number;
+ /**
+ * User for this integration
+ *
+ * **Some older integrations may not have an attached user.**
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user?: APIUser;
+ /**
+ * Integration account information
+ *
+ * See https://discord.com/developers/docs/resources/guild#integration-account-object
+ */
+ account: APIIntegrationAccount;
+ /**
+ * When this integration was last synced
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ synced_at?: string;
+ /**
+ * How many subscribers this integration has
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ subscriber_count?: number;
+ /**
+ * Has this integration been revoked
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ revoked?: boolean;
+ /**
+ * The bot/OAuth2 application for discord integrations
+ *
+ * See https://discord.com/developers/docs/resources/guild#integration-application-object
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ application?: APIGuildIntegrationApplication;
+ /**
+ * The scopes the application has been authorized for
+ */
+ scopes?: OAuth2Scopes[];
+}
+export type APIGuildIntegrationType = 'twitch' | 'youtube' | 'discord' | 'guild_subscription';
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
+ */
+export declare enum IntegrationExpireBehavior {
+ RemoveRole = 0,
+ Kick = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-account-object
+ */
+export interface APIIntegrationAccount {
+ /**
+ * ID of the account
+ */
+ id: string;
+ /**
+ * Name of the account
+ */
+ name: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-application-object
+ */
+export interface APIGuildIntegrationApplication {
+ /**
+ * The id of the app
+ */
+ id: Snowflake;
+ /**
+ * The name of the app
+ */
+ name: string;
+ /**
+ * The icon hash of the app
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ icon: string | null;
+ /**
+ * The description of the app
+ */
+ description: string;
+ /**
+ * The bot associated with this application
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ bot?: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#ban-object
+ */
+export interface APIBan {
+ /**
+ * The reason for the ban
+ */
+ reason: string | null;
+ /**
+ * The banned user
+ */
+ user: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-widget-object
+ */
+export interface APIGuildWidget {
+ id: Snowflake;
+ name: string;
+ instant_invite: string | null;
+ channels: APIGuildWidgetChannel[];
+ members: APIGuildWidgetMember[];
+ presence_count: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
+ */
+export interface APIGuildWidgetChannel {
+ id: Snowflake;
+ name: string;
+ position: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
+ */
+export interface APIGuildWidgetMember {
+ id: string;
+ username: string;
+ discriminator: string;
+ avatar: string | null;
+ status: PresenceUpdateStatus;
+ activity?: {
+ name: string;
+ };
+ avatar_url: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options
+ */
+export declare enum GuildWidgetStyle {
+ /**
+ * Shield style widget with Discord icon and guild members online count
+ */
+ Shield = "shield",
+ /**
+ * Large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget
+ */
+ Banner1 = "banner1",
+ /**
+ * Smaller widget style with guild icon, name and online count. Split on the right with Discord logo
+ */
+ Banner2 = "banner2",
+ /**
+ * Large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right
+ */
+ Banner3 = "banner3",
+ /**
+ * Large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget
+ * and a "JOIN MY SERVER" button at the bottom
+ */
+ Banner4 = "banner4"
+}
+export interface APIGuildWelcomeScreen {
+ /**
+ * The welcome screen short message
+ */
+ description: string | null;
+ /**
+ * Array of suggested channels
+ */
+ welcome_channels: APIGuildWelcomeScreenChannel[];
+}
+export interface APIGuildWelcomeScreenChannel {
+ /**
+ * The channel id that is suggested
+ */
+ channel_id: Snowflake;
+ /**
+ * The description shown for the channel
+ */
+ description: string;
+ /**
+ * The emoji id of the emoji that is shown on the left of the channel
+ */
+ emoji_id: Snowflake | null;
+ /**
+ * The emoji name of the emoji that is shown on the left of the channel
+ */
+ emoji_name: string | null;
+}
+export interface APIGuildMembershipScreening {
+ /**
+ * When the fields were last updated
+ */
+ version: string;
+ /**
+ * The steps in the screening form
+ */
+ form_fields: APIGuildMembershipScreeningField[];
+ /**
+ * The server description shown in the screening form
+ */
+ description: string | null;
+}
+export interface APIGuildMembershipScreeningField {
+ /**
+ * The type of field
+ */
+ field_type: MembershipScreeningFieldType;
+ /**
+ * The title of the field
+ */
+ label: string;
+ /**
+ * The list of rules
+ */
+ values?: string[];
+ /**
+ * Whether the user has to fill out this field
+ */
+ required: boolean;
+}
+export declare enum MembershipScreeningFieldType {
+ /**
+ * Server Rules
+ */
+ Terms = "TERMS"
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-guild-onboarding-structure
+ */
+export interface APIGuildOnboarding {
+ /**
+ * Id of the guild this onboarding is part of
+ */
+ guild_id: Snowflake;
+ /**
+ * Prompts shown during onboarding and in customize community
+ */
+ prompts: APIGuildOnboardingPrompt[];
+ /**
+ * Channel ids that members get opted into automatically
+ */
+ default_channel_ids: Snowflake[];
+ /**
+ * Whether onboarding is enabled in the guild
+ */
+ enabled: boolean;
+ /**
+ * Current mode of onboarding
+ */
+ mode: GuildOnboardingMode;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure
+ */
+export interface APIGuildOnboardingPrompt {
+ /**
+ * Id of the prompt
+ */
+ id: Snowflake;
+ /**
+ * Options available within the prompt
+ */
+ options: APIGuildOnboardingPromptOption[];
+ /**
+ * Title of the prompt
+ */
+ title: string;
+ /**
+ * Indicates whether users are limited to selecting one option for the prompt
+ */
+ single_select: boolean;
+ /**
+ * Indicates whether the prompt is required before a user completes the onboarding flow
+ */
+ required: boolean;
+ /**
+ * Indicates whether the prompt is present in the onboarding flow.
+ * If `false`, the prompt will only appear in the Channels & Roles tab
+ */
+ in_onboarding: boolean;
+ /**
+ * Type of prompt
+ */
+ type: GuildOnboardingPromptType;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure
+ */
+export interface APIGuildOnboardingPromptOption {
+ /**
+ * Id of the prompt option
+ */
+ id: Snowflake;
+ /**
+ * Ids for channels a member is added to when the option is selected
+ */
+ channel_ids: Snowflake[];
+ /**
+ * Ids for roles assigned to a member when the option is selected
+ */
+ role_ids: Snowflake[];
+ /**
+ * Emoji of the option
+ */
+ emoji: APIPartialEmoji;
+ /**
+ * Title of the option
+ */
+ title: string;
+ /**
+ * Description of the option
+ */
+ description: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode
+ */
+export declare enum GuildOnboardingMode {
+ /**
+ * Counts only Default Channels towards constraints
+ */
+ OnboardingDefault = 0,
+ /**
+ * Counts Default Channels and Questions towards constraints
+ */
+ OnboardingAdvanced = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
+ */
+export declare enum GuildOnboardingPromptType {
+ MultipleChoice = 0,
+ Dropdown = 1
+}
+//# sourceMappingURL=guild.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/guild.d.ts.map b/node_modules/discord-api-types/payloads/v10/guild.d.ts.map
new file mode 100644
index 0000000..c27e136
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/guild.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"guild.d.ts","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO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,CAAC;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED;;GAEG;AACH,oBAAY,mBAAmB;IAC9B;;OAEG;IACH,iBAAiB,IAAA;IACjB;;OAEG;IACH,kBAAkB,IAAA;CAClB;AAED;;GAEG;AACH,oBAAY,yBAAyB;IACpC,cAAc,IAAA;IACd,QAAQ,IAAA;CACR"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/guild.js b/node_modules/discord-api-types/payloads/v10/guild.js
new file mode 100644
index 0000000..e61f636
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/guild.js
@@ -0,0 +1,363 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/guild
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.GuildOnboardingPromptType = exports.GuildOnboardingMode = exports.MembershipScreeningFieldType = exports.GuildWidgetStyle = exports.IntegrationExpireBehavior = exports.GuildMemberFlags = exports.GuildFeature = exports.GuildSystemChannelFlags = exports.GuildHubType = exports.GuildPremiumTier = exports.GuildVerificationLevel = exports.GuildNSFWLevel = exports.GuildMFALevel = exports.GuildExplicitContentFilter = exports.GuildDefaultMessageNotifications = void 0;
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
+ */
+var GuildDefaultMessageNotifications;
+(function (GuildDefaultMessageNotifications) {
+ GuildDefaultMessageNotifications[GuildDefaultMessageNotifications["AllMessages"] = 0] = "AllMessages";
+ GuildDefaultMessageNotifications[GuildDefaultMessageNotifications["OnlyMentions"] = 1] = "OnlyMentions";
+})(GuildDefaultMessageNotifications = exports.GuildDefaultMessageNotifications || (exports.GuildDefaultMessageNotifications = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
+ */
+var GuildExplicitContentFilter;
+(function (GuildExplicitContentFilter) {
+ GuildExplicitContentFilter[GuildExplicitContentFilter["Disabled"] = 0] = "Disabled";
+ GuildExplicitContentFilter[GuildExplicitContentFilter["MembersWithoutRoles"] = 1] = "MembersWithoutRoles";
+ GuildExplicitContentFilter[GuildExplicitContentFilter["AllMembers"] = 2] = "AllMembers";
+})(GuildExplicitContentFilter = exports.GuildExplicitContentFilter || (exports.GuildExplicitContentFilter = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
+ */
+var GuildMFALevel;
+(function (GuildMFALevel) {
+ GuildMFALevel[GuildMFALevel["None"] = 0] = "None";
+ GuildMFALevel[GuildMFALevel["Elevated"] = 1] = "Elevated";
+})(GuildMFALevel = exports.GuildMFALevel || (exports.GuildMFALevel = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
+ */
+var GuildNSFWLevel;
+(function (GuildNSFWLevel) {
+ GuildNSFWLevel[GuildNSFWLevel["Default"] = 0] = "Default";
+ GuildNSFWLevel[GuildNSFWLevel["Explicit"] = 1] = "Explicit";
+ GuildNSFWLevel[GuildNSFWLevel["Safe"] = 2] = "Safe";
+ GuildNSFWLevel[GuildNSFWLevel["AgeRestricted"] = 3] = "AgeRestricted";
+})(GuildNSFWLevel = exports.GuildNSFWLevel || (exports.GuildNSFWLevel = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ */
+var GuildVerificationLevel;
+(function (GuildVerificationLevel) {
+ /**
+ * Unrestricted
+ */
+ GuildVerificationLevel[GuildVerificationLevel["None"] = 0] = "None";
+ /**
+ * Must have verified email on account
+ */
+ GuildVerificationLevel[GuildVerificationLevel["Low"] = 1] = "Low";
+ /**
+ * Must be registered on Discord for longer than 5 minutes
+ */
+ GuildVerificationLevel[GuildVerificationLevel["Medium"] = 2] = "Medium";
+ /**
+ * Must be a member of the guild for longer than 10 minutes
+ */
+ GuildVerificationLevel[GuildVerificationLevel["High"] = 3] = "High";
+ /**
+ * Must have a verified phone number
+ */
+ GuildVerificationLevel[GuildVerificationLevel["VeryHigh"] = 4] = "VeryHigh";
+})(GuildVerificationLevel = exports.GuildVerificationLevel || (exports.GuildVerificationLevel = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
+ */
+var GuildPremiumTier;
+(function (GuildPremiumTier) {
+ GuildPremiumTier[GuildPremiumTier["None"] = 0] = "None";
+ GuildPremiumTier[GuildPremiumTier["Tier1"] = 1] = "Tier1";
+ GuildPremiumTier[GuildPremiumTier["Tier2"] = 2] = "Tier2";
+ GuildPremiumTier[GuildPremiumTier["Tier3"] = 3] = "Tier3";
+})(GuildPremiumTier = exports.GuildPremiumTier || (exports.GuildPremiumTier = {}));
+var GuildHubType;
+(function (GuildHubType) {
+ GuildHubType[GuildHubType["Default"] = 0] = "Default";
+ GuildHubType[GuildHubType["HighSchool"] = 1] = "HighSchool";
+ GuildHubType[GuildHubType["College"] = 2] = "College";
+})(GuildHubType = exports.GuildHubType || (exports.GuildHubType = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
+ */
+var GuildSystemChannelFlags;
+(function (GuildSystemChannelFlags) {
+ /**
+ * Suppress member join notifications
+ */
+ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressJoinNotifications"] = 1] = "SuppressJoinNotifications";
+ /**
+ * Suppress server boost notifications
+ */
+ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressPremiumSubscriptions"] = 2] = "SuppressPremiumSubscriptions";
+ /**
+ * Suppress server setup tips
+ */
+ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressGuildReminderNotifications"] = 4] = "SuppressGuildReminderNotifications";
+ /**
+ * Hide member join sticker reply buttons
+ */
+ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressJoinNotificationReplies"] = 8] = "SuppressJoinNotificationReplies";
+ /**
+ * Suppress role subscription purchase and renewal notifications
+ */
+ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressRoleSubscriptionPurchaseNotifications"] = 16] = "SuppressRoleSubscriptionPurchaseNotifications";
+ /**
+ * Hide role subscription sticker reply buttons
+ */
+ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressRoleSubscriptionPurchaseNotificationReplies"] = 32] = "SuppressRoleSubscriptionPurchaseNotificationReplies";
+})(GuildSystemChannelFlags = exports.GuildSystemChannelFlags || (exports.GuildSystemChannelFlags = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ */
+var GuildFeature;
+(function (GuildFeature) {
+ /**
+ * Guild has access to set an animated guild banner image
+ */
+ GuildFeature["AnimatedBanner"] = "ANIMATED_BANNER";
+ /**
+ * Guild has access to set an animated guild icon
+ */
+ GuildFeature["AnimatedIcon"] = "ANIMATED_ICON";
+ /**
+ * Guild is using the old permissions configuration behavior
+ *
+ * See https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes
+ */
+ GuildFeature["ApplicationCommandPermissionsV2"] = "APPLICATION_COMMAND_PERMISSIONS_V2";
+ /**
+ * Guild has set up auto moderation rules
+ */
+ GuildFeature["AutoModeration"] = "AUTO_MODERATION";
+ /**
+ * Guild has access to set a guild banner image
+ */
+ GuildFeature["Banner"] = "BANNER";
+ /**
+ * Guild can enable welcome screen, Membership Screening and discovery, and receives community updates
+ */
+ GuildFeature["Community"] = "COMMUNITY";
+ /**
+ * Guild has enabled monetization
+ */
+ GuildFeature["CreatorMonetizableProvisional"] = "CREATOR_MONETIZABLE_PROVISIONAL";
+ /**
+ * Guild has enabled the role subscription promo page
+ */
+ GuildFeature["CreatorStorePage"] = "CREATOR_STORE_PAGE";
+ /*
+ * Guild has been set as a support server on the App Directory
+ */
+ GuildFeature["DeveloperSupportServer"] = "DEVELOPER_SUPPORT_SERVER";
+ /**
+ * Guild is able to be discovered in the directory
+ */
+ GuildFeature["Discoverable"] = "DISCOVERABLE";
+ /**
+ * Guild is able to be featured in the directory
+ */
+ GuildFeature["Featurable"] = "FEATURABLE";
+ /**
+ * Guild is listed in a directory channel
+ */
+ GuildFeature["HasDirectoryEntry"] = "HAS_DIRECTORY_ENTRY";
+ /**
+ * Guild is a Student Hub
+ *
+ * See https://support.discord.com/hc/articles/4406046651927
+ *
+ * @unstable This feature is currently not documented by Discord, but has known value
+ */
+ GuildFeature["Hub"] = "HUB";
+ /**
+ * Guild has disabled invite usage, preventing users from joining
+ */
+ GuildFeature["InvitesDisabled"] = "INVITES_DISABLED";
+ /**
+ * Guild has access to set an invite splash background
+ */
+ GuildFeature["InviteSplash"] = "INVITE_SPLASH";
+ /**
+ * Guild is in a Student Hub
+ *
+ * See https://support.discord.com/hc/articles/4406046651927
+ *
+ * @unstable This feature is currently not documented by Discord, but has known value
+ */
+ GuildFeature["LinkedToHub"] = "LINKED_TO_HUB";
+ /**
+ * Guild has enabled Membership Screening
+ */
+ GuildFeature["MemberVerificationGateEnabled"] = "MEMBER_VERIFICATION_GATE_ENABLED";
+ /**
+ * Guild has enabled monetization
+ *
+ * @unstable This feature is no longer documented by Discord
+ */
+ GuildFeature["MonetizationEnabled"] = "MONETIZATION_ENABLED";
+ /**
+ * Guild has increased custom sticker slots
+ */
+ GuildFeature["MoreStickers"] = "MORE_STICKERS";
+ /**
+ * Guild has access to create news channels
+ */
+ GuildFeature["News"] = "NEWS";
+ /**
+ * Guild is partnered
+ */
+ GuildFeature["Partnered"] = "PARTNERED";
+ /**
+ * Guild can be previewed before joining via Membership Screening or the directory
+ */
+ GuildFeature["PreviewEnabled"] = "PREVIEW_ENABLED";
+ /**
+ * Guild has access to create private threads
+ */
+ GuildFeature["PrivateThreads"] = "PRIVATE_THREADS";
+ /**
+ * Guild has disabled alerts for join raids in the configured safety alerts channel
+ */
+ GuildFeature["RaidAlertsDisabled"] = "RAID_ALERTS_DISABLED";
+ GuildFeature["RelayEnabled"] = "RELAY_ENABLED";
+ /**
+ * Guild is able to set role icons
+ */
+ GuildFeature["RoleIcons"] = "ROLE_ICONS";
+ /**
+ * Guild has role subscriptions that can be purchased
+ */
+ GuildFeature["RoleSubscriptionsAvailableForPurchase"] = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE";
+ /**
+ * Guild has enabled role subscriptions
+ */
+ GuildFeature["RoleSubscriptionsEnabled"] = "ROLE_SUBSCRIPTIONS_ENABLED";
+ /**
+ * Guild has enabled ticketed events
+ */
+ GuildFeature["TicketedEventsEnabled"] = "TICKETED_EVENTS_ENABLED";
+ /**
+ * Guild has access to set a vanity URL
+ */
+ GuildFeature["VanityURL"] = "VANITY_URL";
+ /**
+ * Guild is verified
+ */
+ GuildFeature["Verified"] = "VERIFIED";
+ /**
+ * Guild has access to set 384kbps bitrate in voice (previously VIP voice servers)
+ */
+ GuildFeature["VIPRegions"] = "VIP_REGIONS";
+ /**
+ * Guild has enabled the welcome screen
+ */
+ GuildFeature["WelcomeScreenEnabled"] = "WELCOME_SCREEN_ENABLED";
+})(GuildFeature = exports.GuildFeature || (exports.GuildFeature = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags
+ */
+var GuildMemberFlags;
+(function (GuildMemberFlags) {
+ /**
+ * Member has left and rejoined the guild
+ */
+ GuildMemberFlags[GuildMemberFlags["DidRejoin"] = 1] = "DidRejoin";
+ /**
+ * Member has completed onboarding
+ */
+ GuildMemberFlags[GuildMemberFlags["CompletedOnboarding"] = 2] = "CompletedOnboarding";
+ /**
+ * Member bypasses guild verification requirements
+ */
+ GuildMemberFlags[GuildMemberFlags["BypassesVerification"] = 4] = "BypassesVerification";
+ /**
+ * Member has started onboarding
+ */
+ GuildMemberFlags[GuildMemberFlags["StartedOnboarding"] = 8] = "StartedOnboarding";
+ /**
+ * @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ GuildMemberFlags[GuildMemberFlags["StartedHomeActions"] = 32] = "StartedHomeActions";
+ /**
+ * @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ GuildMemberFlags[GuildMemberFlags["CompletedHomeActions"] = 64] = "CompletedHomeActions";
+ /**
+ * @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ GuildMemberFlags[GuildMemberFlags["AutomodQuarantinedUsernameOrGuildNickname"] = 128] = "AutomodQuarantinedUsernameOrGuildNickname";
+ /**
+ * @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ GuildMemberFlags[GuildMemberFlags["AutomodQuarantinedBio"] = 256] = "AutomodQuarantinedBio";
+})(GuildMemberFlags = exports.GuildMemberFlags || (exports.GuildMemberFlags = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
+ */
+var IntegrationExpireBehavior;
+(function (IntegrationExpireBehavior) {
+ IntegrationExpireBehavior[IntegrationExpireBehavior["RemoveRole"] = 0] = "RemoveRole";
+ IntegrationExpireBehavior[IntegrationExpireBehavior["Kick"] = 1] = "Kick";
+})(IntegrationExpireBehavior = exports.IntegrationExpireBehavior || (exports.IntegrationExpireBehavior = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options
+ */
+var GuildWidgetStyle;
+(function (GuildWidgetStyle) {
+ /**
+ * Shield style widget with Discord icon and guild members online count
+ */
+ GuildWidgetStyle["Shield"] = "shield";
+ /**
+ * Large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget
+ */
+ GuildWidgetStyle["Banner1"] = "banner1";
+ /**
+ * Smaller widget style with guild icon, name and online count. Split on the right with Discord logo
+ */
+ GuildWidgetStyle["Banner2"] = "banner2";
+ /**
+ * Large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right
+ */
+ GuildWidgetStyle["Banner3"] = "banner3";
+ /**
+ * Large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget
+ * and a "JOIN MY SERVER" button at the bottom
+ */
+ GuildWidgetStyle["Banner4"] = "banner4";
+})(GuildWidgetStyle = exports.GuildWidgetStyle || (exports.GuildWidgetStyle = {}));
+var MembershipScreeningFieldType;
+(function (MembershipScreeningFieldType) {
+ /**
+ * Server Rules
+ */
+ MembershipScreeningFieldType["Terms"] = "TERMS";
+})(MembershipScreeningFieldType = exports.MembershipScreeningFieldType || (exports.MembershipScreeningFieldType = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode
+ */
+var GuildOnboardingMode;
+(function (GuildOnboardingMode) {
+ /**
+ * Counts only Default Channels towards constraints
+ */
+ GuildOnboardingMode[GuildOnboardingMode["OnboardingDefault"] = 0] = "OnboardingDefault";
+ /**
+ * Counts Default Channels and Questions towards constraints
+ */
+ GuildOnboardingMode[GuildOnboardingMode["OnboardingAdvanced"] = 1] = "OnboardingAdvanced";
+})(GuildOnboardingMode = exports.GuildOnboardingMode || (exports.GuildOnboardingMode = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
+ */
+var GuildOnboardingPromptType;
+(function (GuildOnboardingPromptType) {
+ GuildOnboardingPromptType[GuildOnboardingPromptType["MultipleChoice"] = 0] = "MultipleChoice";
+ GuildOnboardingPromptType[GuildOnboardingPromptType["Dropdown"] = 1] = "Dropdown";
+})(GuildOnboardingPromptType = exports.GuildOnboardingPromptType || (exports.GuildOnboardingPromptType = {}));
+//# sourceMappingURL=guild.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/guild.js.map b/node_modules/discord-api-types/payloads/v10/guild.js.map
new file mode 100644
index 0000000..0988fc8
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/guild.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"guild.js","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA0RH;;GAEG;AACH,IAAY,gCAGX;AAHD,WAAY,gCAAgC;IAC3C,qGAAW,CAAA;IACX,uGAAY,CAAA;AACb,CAAC,EAHW,gCAAgC,GAAhC,wCAAgC,KAAhC,wCAAgC,QAG3C;AAED;;GAEG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,mFAAQ,CAAA;IACR,yGAAmB,CAAA;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;AAHD,WAAY,yBAAyB;IACpC,6FAAc,CAAA;IACd,iFAAQ,CAAA;AACT,CAAC,EAHW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAGpC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/guildScheduledEvent.d.ts b/node_modules/discord-api-types/payloads/v10/guildScheduledEvent.d.ts
new file mode 100644
index 0000000..a519264
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/guildScheduledEvent.d.ts
@@ -0,0 +1,139 @@
+import type { Snowflake } from '../../globals';
+import type { APIGuildMember } from './guild';
+import type { APIUser } from './user';
+interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> {
+ /**
+ * The id of the guild event
+ */
+ id: Snowflake;
+ /**
+ * The guild id which the scheduled event belongs to
+ */
+ guild_id: Snowflake;
+ /**
+ * The channel id in which the scheduled event will be hosted, or `null` if entity type is `EXTERNAL`
+ */
+ channel_id: Snowflake | null;
+ /**
+ * The id of the user that created the scheduled event
+ */
+ creator_id?: Snowflake | null;
+ /**
+ * The name of the scheduled event
+ */
+ name: string;
+ /**
+ * The description of the scheduled event
+ */
+ description?: string | null;
+ /**
+ * The time the scheduled event will start
+ */
+ scheduled_start_time: string;
+ /**
+ * The time at which the guild event will end, or `null` if the event does not have a scheduled time to end
+ */
+ scheduled_end_time: string | null;
+ /**
+ * The privacy level of the scheduled event
+ */
+ privacy_level: GuildScheduledEventPrivacyLevel;
+ /**
+ * The status of the scheduled event
+ */
+ status: GuildScheduledEventStatus;
+ /**
+ * The type of hosting entity associated with the scheduled event
+ */
+ entity_type: Type;
+ /**
+ * The id of the hosting entity associated with the scheduled event
+ */
+ entity_id: Snowflake | null;
+ /**
+ * The entity metadata for the scheduled event
+ */
+ entity_metadata: APIGuildScheduledEventEntityMetadata | null;
+ /**
+ * The user that created the scheduled event
+ */
+ creator?: APIUser;
+ /**
+ * The number of users subscribed to the scheduled event
+ */
+ user_count?: number;
+ /**
+ * The cover image of the scheduled event
+ */
+ image?: string | null;
+}
+export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
+ channel_id: Snowflake;
+ entity_metadata: null;
+}
+export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.Voice> {
+ channel_id: Snowflake;
+ entity_metadata: null;
+}
+export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
+ channel_id: null;
+ entity_metadata: Required<APIGuildScheduledEventEntityMetadata>;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure
+ */
+export type APIGuildScheduledEvent = APIStageInstanceGuildScheduledEvent | APIVoiceGuildScheduledEvent | APIExternalGuildScheduledEvent;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata
+ */
+export interface APIGuildScheduledEventEntityMetadata {
+ /**
+ * The location of the scheduled event
+ */
+ location?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types
+ */
+export declare enum GuildScheduledEventEntityType {
+ StageInstance = 1,
+ Voice = 2,
+ External = 3
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status
+ */
+export declare enum GuildScheduledEventStatus {
+ Scheduled = 1,
+ Active = 2,
+ Completed = 3,
+ Canceled = 4
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level
+ */
+export declare enum GuildScheduledEventPrivacyLevel {
+ /**
+ * The scheduled event is only accessible to guild members
+ */
+ GuildOnly = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object-guild-scheduled-event-user-structure
+ */
+export interface APIGuildScheduledEventUser {
+ /**
+ * The scheduled event id which the user subscribed to
+ */
+ guild_scheduled_event_id: Snowflake;
+ /**
+ * The user which subscribed to the event
+ */
+ user: APIUser;
+ /**
+ * The guild member data for this user for the guild which this event belongs to, if any
+ */
+ member?: APIGuildMember;
+}
+export {};
+//# sourceMappingURL=guildScheduledEvent.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/guildScheduledEvent.d.ts.map b/node_modules/discord-api-types/payloads/v10/guildScheduledEvent.d.ts.map
new file mode 100644
index 0000000..b8203cf
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/guildScheduledEvent.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"guildScheduledEvent.d.ts","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,UAAU,0BAA0B,CAAC,IAAI,SAAS,6BAA6B;IAC9E;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;OAEG;IACH,aAAa,EAAE,+BAA+B,CAAC;IAC/C;;OAEG;IACH,MAAM,EAAE,yBAAyB,CAAC;IAClC;;OAEG;IACH,WAAW,EAAE,IAAI,CAAC;IAClB;;OAEG;IACH,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IACpC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;CACxB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/guildScheduledEvent.js b/node_modules/discord-api-types/payloads/v10/guildScheduledEvent.js
new file mode 100644
index 0000000..b5c9a2f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/guildScheduledEvent.js
@@ -0,0 +1,33 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.GuildScheduledEventPrivacyLevel = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityType = void 0;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types
+ */
+var GuildScheduledEventEntityType;
+(function (GuildScheduledEventEntityType) {
+ GuildScheduledEventEntityType[GuildScheduledEventEntityType["StageInstance"] = 1] = "StageInstance";
+ GuildScheduledEventEntityType[GuildScheduledEventEntityType["Voice"] = 2] = "Voice";
+ GuildScheduledEventEntityType[GuildScheduledEventEntityType["External"] = 3] = "External";
+})(GuildScheduledEventEntityType = exports.GuildScheduledEventEntityType || (exports.GuildScheduledEventEntityType = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status
+ */
+var GuildScheduledEventStatus;
+(function (GuildScheduledEventStatus) {
+ GuildScheduledEventStatus[GuildScheduledEventStatus["Scheduled"] = 1] = "Scheduled";
+ GuildScheduledEventStatus[GuildScheduledEventStatus["Active"] = 2] = "Active";
+ GuildScheduledEventStatus[GuildScheduledEventStatus["Completed"] = 3] = "Completed";
+ GuildScheduledEventStatus[GuildScheduledEventStatus["Canceled"] = 4] = "Canceled";
+})(GuildScheduledEventStatus = exports.GuildScheduledEventStatus || (exports.GuildScheduledEventStatus = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level
+ */
+var GuildScheduledEventPrivacyLevel;
+(function (GuildScheduledEventPrivacyLevel) {
+ /**
+ * The scheduled event is only accessible to guild members
+ */
+ GuildScheduledEventPrivacyLevel[GuildScheduledEventPrivacyLevel["GuildOnly"] = 2] = "GuildOnly";
+})(GuildScheduledEventPrivacyLevel = exports.GuildScheduledEventPrivacyLevel || (exports.GuildScheduledEventPrivacyLevel = {}));
+//# sourceMappingURL=guildScheduledEvent.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/guildScheduledEvent.js.map b/node_modules/discord-api-types/payloads/v10/guildScheduledEvent.js.map
new file mode 100644
index 0000000..0eacccd
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/guildScheduledEvent.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"guildScheduledEvent.js","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":";;;AA0GA;;GAEG;AACH,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACxC,mGAAiB,CAAA;IACjB,mFAAK,CAAA;IACL,yFAAQ,CAAA;AACT,CAAC,EAJW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAIxC;AAED;;GAEG;AACH,IAAY,yBAKX;AALD,WAAY,yBAAyB;IACpC,mFAAa,CAAA;IACb,6EAAM,CAAA;IACN,mFAAS,CAAA;IACT,iFAAQ,CAAA;AACT,CAAC,EALW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAKpC;AAED;;GAEG;AACH,IAAY,+BAKX;AALD,WAAY,+BAA+B;IAC1C;;OAEG;IACH,+FAAa,CAAA;AACd,CAAC,EALW,+BAA+B,GAA/B,uCAA+B,KAA/B,uCAA+B,QAK1C"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/index.d.ts b/node_modules/discord-api-types/payloads/v10/index.d.ts
new file mode 100644
index 0000000..2864f33
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/index.d.ts
@@ -0,0 +1,21 @@
+export * from '../common';
+export * from './application';
+export * from './auditLog';
+export * from './autoModeration';
+export * from './channel';
+export * from './emoji';
+export * from './gateway';
+export * from './guild';
+export * from './guildScheduledEvent';
+export * from './interactions';
+export * from './invite';
+export * from './oauth2';
+export * from './permissions';
+export * from './stageInstance';
+export * from './sticker';
+export * from './teams';
+export * from './template';
+export * from './user';
+export * from './voice';
+export * from './webhook';
+//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/index.d.ts.map b/node_modules/discord-api-types/payloads/v10/index.d.ts.map
new file mode 100644
index 0000000..2bb79bb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/index.js b/node_modules/discord-api-types/payloads/v10/index.js
new file mode 100644
index 0000000..c9c0e74
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/index.js
@@ -0,0 +1,37 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("../common"), exports);
+__exportStar(require("./application"), exports);
+__exportStar(require("./auditLog"), exports);
+__exportStar(require("./autoModeration"), exports);
+__exportStar(require("./channel"), exports);
+__exportStar(require("./emoji"), exports);
+__exportStar(require("./gateway"), exports);
+__exportStar(require("./guild"), exports);
+__exportStar(require("./guildScheduledEvent"), exports);
+__exportStar(require("./interactions"), exports);
+__exportStar(require("./invite"), exports);
+__exportStar(require("./oauth2"), exports);
+__exportStar(require("./permissions"), exports);
+__exportStar(require("./stageInstance"), exports);
+__exportStar(require("./sticker"), exports);
+__exportStar(require("./teams"), exports);
+__exportStar(require("./template"), exports);
+__exportStar(require("./user"), exports);
+__exportStar(require("./voice"), exports);
+__exportStar(require("./webhook"), exports);
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/index.js.map b/node_modules/discord-api-types/payloads/v10/index.js.map
new file mode 100644
index 0000000..02cfb83
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,gDAA8B;AAC9B,6CAA2B;AAC3B,mDAAiC;AACjC,4CAA0B;AAC1B,0CAAwB;AACxB,4CAA0B;AAC1B,0CAAwB;AACxB,wDAAsC;AACtC,iDAA+B;AAC/B,2CAAyB;AACzB,2CAAyB;AACzB,gDAA8B;AAC9B,kDAAgC;AAChC,4CAA0B;AAC1B,0CAAwB;AACxB,6CAA2B;AAC3B,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/index.mjs b/node_modules/discord-api-types/payloads/v10/index.mjs
new file mode 100644
index 0000000..a5b5a7b
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/index.mjs
@@ -0,0 +1,69 @@
+import mod from "./index.js";
+
+export default mod;
+export const APIApplicationCommandPermissionsConstant = mod.APIApplicationCommandPermissionsConstant;
+export const ActivityFlags = mod.ActivityFlags;
+export const ActivityPlatform = mod.ActivityPlatform;
+export const ActivityType = mod.ActivityType;
+export const AllowedMentionsTypes = mod.AllowedMentionsTypes;
+export const ApplicationCommandOptionType = mod.ApplicationCommandOptionType;
+export const ApplicationCommandPermissionType = mod.ApplicationCommandPermissionType;
+export const ApplicationCommandType = mod.ApplicationCommandType;
+export const ApplicationFlags = mod.ApplicationFlags;
+export const ApplicationRoleConnectionMetadataType = mod.ApplicationRoleConnectionMetadataType;
+export const AttachmentFlags = mod.AttachmentFlags;
+export const AuditLogEvent = mod.AuditLogEvent;
+export const AuditLogOptionsType = mod.AuditLogOptionsType;
+export const AutoModerationActionType = mod.AutoModerationActionType;
+export const AutoModerationRuleEventType = mod.AutoModerationRuleEventType;
+export const AutoModerationRuleKeywordPresetType = mod.AutoModerationRuleKeywordPresetType;
+export const AutoModerationRuleTriggerType = mod.AutoModerationRuleTriggerType;
+export const ButtonStyle = mod.ButtonStyle;
+export const ChannelFlags = mod.ChannelFlags;
+export const ChannelType = mod.ChannelType;
+export const ComponentType = mod.ComponentType;
+export const ConnectionService = mod.ConnectionService;
+export const ConnectionVisibility = mod.ConnectionVisibility;
+export const EmbedType = mod.EmbedType;
+export const ForumLayoutType = mod.ForumLayoutType;
+export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications;
+export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter;
+export const GuildFeature = mod.GuildFeature;
+export const GuildHubType = mod.GuildHubType;
+export const GuildMFALevel = mod.GuildMFALevel;
+export const GuildMemberFlags = mod.GuildMemberFlags;
+export const GuildNSFWLevel = mod.GuildNSFWLevel;
+export const GuildOnboardingMode = mod.GuildOnboardingMode;
+export const GuildOnboardingPromptType = mod.GuildOnboardingPromptType;
+export const GuildPremiumTier = mod.GuildPremiumTier;
+export const GuildScheduledEventEntityType = mod.GuildScheduledEventEntityType;
+export const GuildScheduledEventPrivacyLevel = mod.GuildScheduledEventPrivacyLevel;
+export const GuildScheduledEventStatus = mod.GuildScheduledEventStatus;
+export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags;
+export const GuildVerificationLevel = mod.GuildVerificationLevel;
+export const GuildWidgetStyle = mod.GuildWidgetStyle;
+export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior;
+export const InteractionResponseType = mod.InteractionResponseType;
+export const InteractionType = mod.InteractionType;
+export const InviteTargetType = mod.InviteTargetType;
+export const MembershipScreeningFieldType = mod.MembershipScreeningFieldType;
+export const MessageActivityType = mod.MessageActivityType;
+export const MessageFlags = mod.MessageFlags;
+export const MessageType = mod.MessageType;
+export const OAuth2Scopes = mod.OAuth2Scopes;
+export const OverwriteType = mod.OverwriteType;
+export const PermissionFlagsBits = mod.PermissionFlagsBits;
+export const PresenceUpdateStatus = mod.PresenceUpdateStatus;
+export const RoleFlags = mod.RoleFlags;
+export const SortOrderType = mod.SortOrderType;
+export const StageInstancePrivacyLevel = mod.StageInstancePrivacyLevel;
+export const StickerFormatType = mod.StickerFormatType;
+export const StickerType = mod.StickerType;
+export const TeamMemberMembershipState = mod.TeamMemberMembershipState;
+export const TextInputStyle = mod.TextInputStyle;
+export const ThreadAutoArchiveDuration = mod.ThreadAutoArchiveDuration;
+export const ThreadMemberFlags = mod.ThreadMemberFlags;
+export const UserFlags = mod.UserFlags;
+export const UserPremiumType = mod.UserPremiumType;
+export const VideoQualityMode = mod.VideoQualityMode;
+export const WebhookType = mod.WebhookType;
diff --git a/node_modules/discord-api-types/payloads/v10/interactions.d.ts b/node_modules/discord-api-types/payloads/v10/interactions.d.ts
new file mode 100644
index 0000000..226a841
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/interactions.d.ts
@@ -0,0 +1,25 @@
+import type { APIApplicationCommandDMInteraction, APIApplicationCommandGuildInteraction, APIApplicationCommandInteraction } from './_interactions/applicationCommands';
+import type { APIApplicationCommandAutocompleteDMInteraction, APIApplicationCommandAutocompleteGuildInteraction, APIApplicationCommandAutocompleteInteraction } from './_interactions/autocomplete';
+import type { APIMessageComponentDMInteraction, APIMessageComponentGuildInteraction, APIMessageComponentInteraction } from './_interactions/messageComponents';
+import type { APIModalSubmitDMInteraction, APIModalSubmitGuildInteraction, APIModalSubmitInteraction } from './_interactions/modalSubmit';
+import type { APIPingInteraction } from './_interactions/ping';
+export * from './_interactions/applicationCommands';
+export * from './_interactions/autocomplete';
+export * from './_interactions/base';
+export * from './_interactions/messageComponents';
+export * from './_interactions/modalSubmit';
+export * from './_interactions/ping';
+export * from './_interactions/responses';
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIInteraction = APIPingInteraction | APIApplicationCommandInteraction | APIMessageComponentInteraction | APIApplicationCommandAutocompleteInteraction | APIModalSubmitInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIDMInteraction = APIApplicationCommandDMInteraction | APIMessageComponentDMInteraction | APIApplicationCommandAutocompleteDMInteraction | APIModalSubmitDMInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIGuildInteraction = APIApplicationCommandGuildInteraction | APIMessageComponentGuildInteraction | APIApplicationCommandAutocompleteGuildInteraction | APIModalSubmitGuildInteraction;
+//# sourceMappingURL=interactions.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/interactions.d.ts.map b/node_modules/discord-api-types/payloads/v10/interactions.d.ts.map
new file mode 100644
index 0000000..afd4500
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/interactions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kCAAkC,EAClC,qCAAqC,EACrC,gCAAgC,EAChC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EACX,8CAA8C,EAC9C,iDAAiD,EACjD,4CAA4C,EAC5C,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACX,gCAAgC,EAChC,mCAAmC,EACnC,8BAA8B,EAC9B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACX,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,EACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,cAAc,GACvB,kBAAkB,GAClB,gCAAgC,GAChC,8BAA8B,GAC9B,4CAA4C,GAC5C,yBAAyB,CAAC;AAE7B;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACzB,kCAAkC,GAClC,gCAAgC,GAChC,8CAA8C,GAC9C,2BAA2B,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC5B,qCAAqC,GACrC,mCAAmC,GACnC,iDAAiD,GACjD,8BAA8B,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/interactions.js b/node_modules/discord-api-types/payloads/v10/interactions.js
new file mode 100644
index 0000000..4f5b780
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/interactions.js
@@ -0,0 +1,24 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./_interactions/applicationCommands"), exports);
+__exportStar(require("./_interactions/autocomplete"), exports);
+__exportStar(require("./_interactions/base"), exports);
+__exportStar(require("./_interactions/messageComponents"), exports);
+__exportStar(require("./_interactions/modalSubmit"), exports);
+__exportStar(require("./_interactions/ping"), exports);
+__exportStar(require("./_interactions/responses"), exports);
+//# sourceMappingURL=interactions.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/interactions.js.map b/node_modules/discord-api-types/payloads/v10/interactions.js.map
new file mode 100644
index 0000000..8c2bebe
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/interactions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"interactions.js","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAsBA,sEAAoD;AACpD,+DAA6C;AAC7C,uDAAqC;AACrC,oEAAkD;AAClD,8DAA4C;AAC5C,uDAAqC;AACrC,4DAA0C"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/invite.d.ts b/node_modules/discord-api-types/payloads/v10/invite.d.ts
new file mode 100644
index 0000000..a247f39
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/invite.d.ts
@@ -0,0 +1,110 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/invite
+ */
+import type { APIApplication } from './application';
+import type { APIPartialChannel } from './channel';
+import type { APIGuild } from './guild';
+import type { APIGuildScheduledEvent } from './guildScheduledEvent';
+import type { APIInviteStageInstance } from './stageInstance';
+import type { APIUser } from './user';
+export type APIInviteGuild = Pick<APIGuild, 'id' | 'name' | 'splash' | 'banner' | 'icon' | 'vanity_url_code' | 'description' | 'features' | 'verification_level' | 'nsfw_level' | 'premium_subscription_count'>;
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-object
+ */
+export interface APIInvite {
+ /**
+ * The invite code (unique ID)
+ */
+ code: string;
+ /**
+ * The guild this invite is for
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object
+ */
+ guild?: APIInviteGuild;
+ /**
+ * The channel this invite is for
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object
+ */
+ channel: Required<APIPartialChannel> | null;
+ /**
+ * The user who created the invite
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ inviter?: APIUser;
+ /**
+ * The type of target for this voice channel invite
+ *
+ * See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
+ */
+ target_type?: InviteTargetType;
+ /**
+ * The user whose stream to display for this voice channel stream invite
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ target_user?: APIUser;
+ /**
+ * The embedded application to open for this voice channel embedded application invite
+ *
+ * See https://discord.com/developers/docs/resources/application#application-object
+ */
+ target_application?: Partial<APIApplication>;
+ /**
+ * Approximate count of online members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true`
+ */
+ approximate_presence_count?: number;
+ /**
+ * Approximate count of total members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true`
+ */
+ approximate_member_count?: number;
+ /**
+ * The expiration date of this invite, returned from the `GET /invites/<code>` endpoint when `with_expiration` is `true`
+ */
+ expires_at?: string | null;
+ /**
+ * The stage instance data if there is a public stage instance in the stage channel this invite is for
+ *
+ * @deprecated
+ */
+ stage_instance?: APIInviteStageInstance;
+ /**
+ * The guild scheduled event data, returned from the `GET /invites/<code>` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id
+ */
+ guild_scheduled_event?: APIGuildScheduledEvent;
+}
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
+ */
+export declare enum InviteTargetType {
+ Stream = 1,
+ EmbeddedApplication = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-metadata-object
+ */
+export interface APIExtendedInvite extends APIInvite {
+ /**
+ * Number of times this invite has been used
+ */
+ uses: number;
+ /**
+ * Max number of times this invite can be used
+ */
+ max_uses: number;
+ /**
+ * Duration (in seconds) after which the invite expires
+ */
+ max_age: number;
+ /**
+ * Whether this invite only grants temporary membership
+ */
+ temporary: boolean;
+ /**
+ * When this invite was created
+ */
+ created_at: string;
+}
+//# sourceMappingURL=invite.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/invite.d.ts.map b/node_modules/discord-api-types/payloads/v10/invite.d.ts.map
new file mode 100644
index 0000000..f80ac05
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/invite.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,MAAM,MAAM,cAAc,GAAG,IAAI,CAChC,QAAQ,EACN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payloads/v10/invite.js b/node_modules/discord-api-types/payloads/v10/invite.js
new file mode 100644
index 0000000..e41210d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/invite.js
@@ -0,0 +1,15 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/invite
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.InviteTargetType = void 0;
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
+ */
+var InviteTargetType;
+(function (InviteTargetType) {
+ InviteTargetType[InviteTargetType["Stream"] = 1] = "Stream";
+ InviteTargetType[InviteTargetType["EmbeddedApplication"] = 2] = "EmbeddedApplication";
+})(InviteTargetType = exports.InviteTargetType || (exports.InviteTargetType = {}));
+//# sourceMappingURL=invite.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/invite.js.map b/node_modules/discord-api-types/payloads/v10/invite.js.map
new file mode 100644
index 0000000..8eb61b0
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/invite.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"invite.js","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA4FH;;GAEG;AACH,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC3B,2DAAU,CAAA;IACV,qFAAmB,CAAA;AACpB,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/oauth2.d.ts b/node_modules/discord-api-types/payloads/v10/oauth2.d.ts
new file mode 100644
index 0000000..aa5c6a9
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/oauth2.d.ts
@@ -0,0 +1,132 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/oauth2
+ */
+export declare enum OAuth2Scopes {
+ /**
+ * For oauth2 bots, this puts the bot in the user's selected guild by default
+ */
+ Bot = "bot",
+ /**
+ * Allows [/users/@me/connections](https://discord.com/developers/docs/resources/user#get-user-connections)
+ * to return linked third-party accounts
+ *
+ * See https://discord.com/developers/docs/resources/user#get-user-connections
+ */
+ Connections = "connections",
+ /**
+ * Allows your app to see information about the user's DMs and group DMs - requires Discord approval
+ */
+ DMChannelsRead = "dm_channels.read",
+ /**
+ * Enables [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) to return an `email`
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user
+ */
+ Email = "email",
+ /**
+ * Allows [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) without `email`
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user
+ */
+ Identify = "identify",
+ /**
+ * Allows [/users/@me/guilds](https://discord.com/developers/docs/resources/user#get-current-user-guilds)
+ * to return basic information about all of a user's guilds
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user-guilds
+ */
+ Guilds = "guilds",
+ /**
+ * Allows [/guilds/{guild.id}/members/{user.id}](https://discord.com/developers/docs/resources/guild#add-guild-member)
+ * to be used for joining users to a guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#add-guild-member
+ */
+ GuildsJoin = "guilds.join",
+ /**
+ * Allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user-guild-member
+ */
+ GuildsMembersRead = "guilds.members.read",
+ /**
+ * Allows your app to join users to a group dm
+ *
+ * See https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
+ */
+ GroupDMJoins = "gdm.join",
+ /**
+ * For local rpc server api access, this allows you to read messages from all client channels
+ * (otherwise restricted to channels/guilds your app creates)
+ */
+ MessagesRead = "messages.read",
+ /**
+ * Allows your app to update a user's connection and metadata for the app
+ */
+ RoleConnectionsWrite = "role_connections.write",
+ /**
+ * For local rpc server access, this allows you to control a user's local Discord client - requires Discord approval
+ */
+ RPC = "rpc",
+ /**
+ * For local rpc server api access, this allows you to receive notifications pushed out to the user - requires Discord approval
+ */
+ RPCNotificationsRead = "rpc.notifications.read",
+ /**
+ * This generates a webhook that is returned in the oauth token response for authorization code grants
+ */
+ WebhookIncoming = "webhook.incoming",
+ /**
+ * Allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval
+ */
+ Voice = "voice",
+ /**
+ * Allows your app to upload/update builds for a user's applications - requires Discord approval
+ */
+ ApplicationsBuildsUpload = "applications.builds.upload",
+ /**
+ * Allows your app to read build data for a user's applications
+ */
+ ApplicationsBuildsRead = "applications.builds.read",
+ /**
+ * Allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications
+ */
+ ApplicationsStoreUpdate = "applications.store.update",
+ /**
+ * Allows your app to read entitlements for a user's applications
+ */
+ ApplicationsEntitlements = "applications.entitlements",
+ /**
+ * Allows your app to know a user's friends and implicit relationships - requires Discord approval
+ */
+ RelationshipsRead = "relationships.read",
+ /**
+ * Allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval
+ */
+ ActivitiesRead = "activities.read",
+ /**
+ * Allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
+ *
+ * See https://discord.com/developers/docs/game-sdk/activities
+ */
+ ActivitiesWrite = "activities.write",
+ /**
+ * Allows your app to use Application Commands in a guild
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands
+ */
+ ApplicationsCommands = "applications.commands",
+ /**
+ * Allows your app to update its Application Commands via this bearer token - client credentials grant only
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands
+ */
+ ApplicationsCommandsUpdate = "applications.commands.update",
+ /**
+ * Allows your app to update permissions for its commands using a Bearer token - client credentials grant only
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands
+ */
+ ApplicationCommandsPermissionsUpdate = "applications.commands.permissions.update"
+}
+//# sourceMappingURL=oauth2.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/oauth2.d.ts.map b/node_modules/discord-api-types/payloads/v10/oauth2.d.ts.map
new file mode 100644
index 0000000..2e95cd0
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/oauth2.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,oBAAY,YAAY;IACvB;;OAEG;IACH,GAAG,QAAQ;IACX;;;;;OAKG;IACH,WAAW,gBAAgB;IAC3B;;OAEG;IACH,cAAc,qBAAqB;IACnC;;;;OAIG;IACH,KAAK,UAAU;IACf;;;;OAIG;IACH,QAAQ,aAAa;IACrB;;;;;OAKG;IACH,MAAM,WAAW;IACjB;;;;;OAKG;IACH,UAAU,gBAAgB;IAC1B;;;;OAIG;IACH,iBAAiB,wBAAwB;IACzC;;;;OAIG;IACH,YAAY,aAAa;IACzB;;;OAGG;IACH,YAAY,kBAAkB;IAC9B;;OAEG;IACH,oBAAoB,2BAA2B;IAC/C;;OAEG;IACH,GAAG,QAAQ;IACX;;OAEG;IACH,oBAAoB,2BAA2B;IAC/C;;OAEG;IACH,eAAe,qBAAqB;IACpC;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,wBAAwB,+BAA+B;IACvD;;OAEG;IACH,sBAAsB,6BAA6B;IACnD;;OAEG;IACH,uBAAuB,8BAA8B;IACrD;;OAEG;IACH,wBAAwB,8BAA8B;IACtD;;OAEG;IACH,iBAAiB,uBAAuB;IACxC;;OAEG;IACH,cAAc,oBAAoB;IAClC;;;;OAIG;IACH,eAAe,qBAAqB;IACpC;;;;OAIG;IACH,oBAAoB,0BAA0B;IAC9C;;;;OAIG;IACH,0BAA0B,iCAAiC;IAC3D;;;;OAIG;IACH,oCAAoC,6CAA6C;CACjF"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/oauth2.js b/node_modules/discord-api-types/payloads/v10/oauth2.js
new file mode 100644
index 0000000..22b368f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/oauth2.js
@@ -0,0 +1,136 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/oauth2
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OAuth2Scopes = void 0;
+var OAuth2Scopes;
+(function (OAuth2Scopes) {
+ /**
+ * For oauth2 bots, this puts the bot in the user's selected guild by default
+ */
+ OAuth2Scopes["Bot"] = "bot";
+ /**
+ * Allows [/users/@me/connections](https://discord.com/developers/docs/resources/user#get-user-connections)
+ * to return linked third-party accounts
+ *
+ * See https://discord.com/developers/docs/resources/user#get-user-connections
+ */
+ OAuth2Scopes["Connections"] = "connections";
+ /**
+ * Allows your app to see information about the user's DMs and group DMs - requires Discord approval
+ */
+ OAuth2Scopes["DMChannelsRead"] = "dm_channels.read";
+ /**
+ * Enables [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) to return an `email`
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user
+ */
+ OAuth2Scopes["Email"] = "email";
+ /**
+ * Allows [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) without `email`
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user
+ */
+ OAuth2Scopes["Identify"] = "identify";
+ /**
+ * Allows [/users/@me/guilds](https://discord.com/developers/docs/resources/user#get-current-user-guilds)
+ * to return basic information about all of a user's guilds
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user-guilds
+ */
+ OAuth2Scopes["Guilds"] = "guilds";
+ /**
+ * Allows [/guilds/{guild.id}/members/{user.id}](https://discord.com/developers/docs/resources/guild#add-guild-member)
+ * to be used for joining users to a guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#add-guild-member
+ */
+ OAuth2Scopes["GuildsJoin"] = "guilds.join";
+ /**
+ * Allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user-guild-member
+ */
+ OAuth2Scopes["GuildsMembersRead"] = "guilds.members.read";
+ /**
+ * Allows your app to join users to a group dm
+ *
+ * See https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
+ */
+ OAuth2Scopes["GroupDMJoins"] = "gdm.join";
+ /**
+ * For local rpc server api access, this allows you to read messages from all client channels
+ * (otherwise restricted to channels/guilds your app creates)
+ */
+ OAuth2Scopes["MessagesRead"] = "messages.read";
+ /**
+ * Allows your app to update a user's connection and metadata for the app
+ */
+ OAuth2Scopes["RoleConnectionsWrite"] = "role_connections.write";
+ /**
+ * For local rpc server access, this allows you to control a user's local Discord client - requires Discord approval
+ */
+ OAuth2Scopes["RPC"] = "rpc";
+ /**
+ * For local rpc server api access, this allows you to receive notifications pushed out to the user - requires Discord approval
+ */
+ OAuth2Scopes["RPCNotificationsRead"] = "rpc.notifications.read";
+ /**
+ * This generates a webhook that is returned in the oauth token response for authorization code grants
+ */
+ OAuth2Scopes["WebhookIncoming"] = "webhook.incoming";
+ /**
+ * Allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval
+ */
+ OAuth2Scopes["Voice"] = "voice";
+ /**
+ * Allows your app to upload/update builds for a user's applications - requires Discord approval
+ */
+ OAuth2Scopes["ApplicationsBuildsUpload"] = "applications.builds.upload";
+ /**
+ * Allows your app to read build data for a user's applications
+ */
+ OAuth2Scopes["ApplicationsBuildsRead"] = "applications.builds.read";
+ /**
+ * Allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications
+ */
+ OAuth2Scopes["ApplicationsStoreUpdate"] = "applications.store.update";
+ /**
+ * Allows your app to read entitlements for a user's applications
+ */
+ OAuth2Scopes["ApplicationsEntitlements"] = "applications.entitlements";
+ /**
+ * Allows your app to know a user's friends and implicit relationships - requires Discord approval
+ */
+ OAuth2Scopes["RelationshipsRead"] = "relationships.read";
+ /**
+ * Allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval
+ */
+ OAuth2Scopes["ActivitiesRead"] = "activities.read";
+ /**
+ * Allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
+ *
+ * See https://discord.com/developers/docs/game-sdk/activities
+ */
+ OAuth2Scopes["ActivitiesWrite"] = "activities.write";
+ /**
+ * Allows your app to use Application Commands in a guild
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands
+ */
+ OAuth2Scopes["ApplicationsCommands"] = "applications.commands";
+ /**
+ * Allows your app to update its Application Commands via this bearer token - client credentials grant only
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands
+ */
+ OAuth2Scopes["ApplicationsCommandsUpdate"] = "applications.commands.update";
+ /**
+ * Allows your app to update permissions for its commands using a Bearer token - client credentials grant only
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands
+ */
+ OAuth2Scopes["ApplicationCommandsPermissionsUpdate"] = "applications.commands.permissions.update";
+})(OAuth2Scopes = exports.OAuth2Scopes || (exports.OAuth2Scopes = {}));
+//# sourceMappingURL=oauth2.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/oauth2.js.map b/node_modules/discord-api-types/payloads/v10/oauth2.js.map
new file mode 100644
index 0000000..e289280
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/oauth2.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"oauth2.js","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,IAAY,YA+HX;AA/HD,WAAY,YAAY;IACvB;;OAEG;IACH,2BAAW,CAAA;IACX;;;;;OAKG;IACH,2CAA2B,CAAA;IAC3B;;OAEG;IACH,mDAAmC,CAAA;IACnC;;;;OAIG;IACH,+BAAe,CAAA;IACf;;;;OAIG;IACH,qCAAqB,CAAA;IACrB;;;;;OAKG;IACH,iCAAiB,CAAA;IACjB;;;;;OAKG;IACH,0CAA0B,CAAA;IAC1B;;;;OAIG;IACH,yDAAyC,CAAA;IACzC;;;;OAIG;IACH,yCAAyB,CAAA;IACzB;;;OAGG;IACH,8CAA8B,CAAA;IAC9B;;OAEG;IACH,+DAA+C,CAAA;IAC/C;;OAEG;IACH,2BAAW,CAAA;IACX;;OAEG;IACH,+DAA+C,CAAA;IAC/C;;OAEG;IACH,oDAAoC,CAAA;IACpC;;OAEG;IACH,+BAAe,CAAA;IACf;;OAEG;IACH,uEAAuD,CAAA;IACvD;;OAEG;IACH,mEAAmD,CAAA;IACnD;;OAEG;IACH,qEAAqD,CAAA;IACrD;;OAEG;IACH,sEAAsD,CAAA;IACtD;;OAEG;IACH,wDAAwC,CAAA;IACxC;;OAEG;IACH,kDAAkC,CAAA;IAClC;;;;OAIG;IACH,oDAAoC,CAAA;IACpC;;;;OAIG;IACH,8DAA8C,CAAA;IAC9C;;;;OAIG;IACH,2EAA2D,CAAA;IAC3D;;;;OAIG;IACH,iGAAiF,CAAA;AAClF,CAAC,EA/HW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QA+HvB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/permissions.d.ts b/node_modules/discord-api-types/payloads/v10/permissions.d.ts
new file mode 100644
index 0000000..1d0663f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/permissions.d.ts
@@ -0,0 +1,95 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/permissions
+ */
+import type { Permissions, Snowflake } from '../../globals';
+/**
+ * https://discord.com/developers/docs/topics/permissions#role-object
+ */
+export interface APIRole {
+ /**
+ * Role id
+ */
+ id: Snowflake;
+ /**
+ * Role name
+ */
+ name: string;
+ /**
+ * Integer representation of hexadecimal color code
+ */
+ color: number;
+ /**
+ * If this role is pinned in the user listing
+ */
+ hoist: boolean;
+ /**
+ * The role icon hash
+ */
+ icon?: string | null;
+ /**
+ * The role unicode emoji as a standard emoji
+ */
+ unicode_emoji?: string | null;
+ /**
+ * Position of this role
+ */
+ position: number;
+ /**
+ * Permission bit set
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ permissions: Permissions;
+ /**
+ * Whether this role is managed by an integration
+ */
+ managed: boolean;
+ /**
+ * Whether this role is mentionable
+ */
+ mentionable: boolean;
+ /**
+ * The tags this role has
+ */
+ tags?: APIRoleTags;
+ /**
+ * Role flags
+ */
+ flags: RoleFlags;
+}
+/**
+ * https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure
+ */
+export interface APIRoleTags {
+ /**
+ * The id of the bot this role belongs to
+ */
+ bot_id?: Snowflake;
+ /**
+ * Whether this is the guild's premium subscriber role
+ */
+ premium_subscriber?: null;
+ /**
+ * The id of the integration this role belongs to
+ */
+ integration_id?: Snowflake;
+ /**
+ * The id of this role's subscription sku and listing
+ */
+ subscription_listing_id?: Snowflake;
+ /**
+ * Whether this role is available for purchase
+ */
+ available_for_purchase?: null;
+ /**
+ * Whether this role is a guild's linked role
+ */
+ guild_connections?: null;
+}
+export declare enum RoleFlags {
+ /**
+ * Role can be selected by members in an onboarding prompt
+ */
+ InPrompt = 1
+}
+//# sourceMappingURL=permissions.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/permissions.d.ts.map b/node_modules/discord-api-types/payloads/v10/permissions.d.ts.map
new file mode 100644
index 0000000..d4d9554
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/permissions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,WAAW,EAAE,WAAW,CAAC;IACzB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,IAAI,CAAC;IAC1B;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,uBAAuB,CAAC,EAAE,SAAS,CAAC;IACpC;;OAEG;IACH,sBAAsB,CAAC,EAAE,IAAI,CAAC;IAC9B;;OAEG;IACH,iBAAiB,CAAC,EAAE,IAAI,CAAC;CACzB;AAED,oBAAY,SAAS;IACpB;;OAEG;IACH,QAAQ,IAAS;CACjB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/permissions.js b/node_modules/discord-api-types/payloads/v10/permissions.js
new file mode 100644
index 0000000..eaa6068
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/permissions.js
@@ -0,0 +1,14 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/permissions
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.RoleFlags = void 0;
+var RoleFlags;
+(function (RoleFlags) {
+ /**
+ * Role can be selected by members in an onboarding prompt
+ */
+ RoleFlags[RoleFlags["InPrompt"] = 1] = "InPrompt";
+})(RoleFlags = exports.RoleFlags || (exports.RoleFlags = {}));
+//# sourceMappingURL=permissions.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/permissions.js.map b/node_modules/discord-api-types/payloads/v10/permissions.js.map
new file mode 100644
index 0000000..eae0aef
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/permissions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"permissions.js","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA0FH,IAAY,SAKX;AALD,WAAY,SAAS;IACpB;;OAEG;IACH,iDAAiB,CAAA;AAClB,CAAC,EALW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAKpB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/stageInstance.d.ts b/node_modules/discord-api-types/payloads/v10/stageInstance.d.ts
new file mode 100644
index 0000000..ce60fd7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/stageInstance.d.ts
@@ -0,0 +1,76 @@
+import type { Snowflake } from '../../globals';
+import type { APIGuildMember } from './guild';
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#stage-instance-object
+ */
+export interface APIStageInstance {
+ /**
+ * The id of the stage instance
+ */
+ id: Snowflake;
+ /**
+ * The guild id of the associated stage channel
+ */
+ guild_id: Snowflake;
+ /**
+ * The id of the associated stage channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The topic of the stage instance (1-120 characters)
+ */
+ topic: string;
+ /**
+ * The privacy level of the stage instance
+ *
+ * See https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
+ */
+ privacy_level: StageInstancePrivacyLevel;
+ /**
+ * Whether or not stage discovery is disabled
+ *
+ * @deprecated
+ */
+ discoverable_disabled: boolean;
+ /**
+ * The id of the scheduled event for this stage instance
+ */
+ guild_scheduled_event_id?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
+ */
+export declare enum StageInstancePrivacyLevel {
+ /**
+ * The stage instance is visible publicly, such as on stage discovery
+ */
+ Public = 1,
+ /**
+ * The stage instance is visible to only guild members
+ */
+ GuildOnly = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-stage-instance-object-invite-stage-instance-structure
+ */
+export interface APIInviteStageInstance {
+ /**
+ * The topic of the stage instance (1-120 characters)
+ */
+ topic: string;
+ /**
+ * The number of users in the stage
+ */
+ participant_count: number;
+ /**
+ * The number of users speaking in the stage
+ */
+ speaker_count: number;
+ /**
+ * The members speaking in the stage
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure
+ */
+ members: APIGuildMember[];
+}
+//# sourceMappingURL=stageInstance.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/stageInstance.d.ts.map b/node_modules/discord-api-types/payloads/v10/stageInstance.d.ts.map
new file mode 100644
index 0000000..80800d4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/stageInstance.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"stageInstance.d.ts","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,EAAE,yBAAyB,CAAC;IACzC;;;;OAIG;IACH,qBAAqB,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,wBAAwB,CAAC,EAAE,SAAS,CAAC;CACrC;AAED;;GAEG;AACH,oBAAY,yBAAyB;IACpC;;OAEG;IACH,MAAM,IAAI;IACV;;OAEG;IACH,SAAS,IAAA;CACT;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,OAAO,EAAE,cAAc,EAAE,CAAC;CAC1B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/stageInstance.js b/node_modules/discord-api-types/payloads/v10/stageInstance.js
new file mode 100644
index 0000000..5d4c382
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/stageInstance.js
@@ -0,0 +1,18 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.StageInstancePrivacyLevel = void 0;
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
+ */
+var StageInstancePrivacyLevel;
+(function (StageInstancePrivacyLevel) {
+ /**
+ * The stage instance is visible publicly, such as on stage discovery
+ */
+ StageInstancePrivacyLevel[StageInstancePrivacyLevel["Public"] = 1] = "Public";
+ /**
+ * The stage instance is visible to only guild members
+ */
+ StageInstancePrivacyLevel[StageInstancePrivacyLevel["GuildOnly"] = 2] = "GuildOnly";
+})(StageInstancePrivacyLevel = exports.StageInstancePrivacyLevel || (exports.StageInstancePrivacyLevel = {}));
+//# sourceMappingURL=stageInstance.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/stageInstance.js.map b/node_modules/discord-api-types/payloads/v10/stageInstance.js.map
new file mode 100644
index 0000000..d9cc17c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/stageInstance.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"stageInstance.js","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":";;;AAyCA;;GAEG;AACH,IAAY,yBASX;AATD,WAAY,yBAAyB;IACpC;;OAEG;IACH,6EAAU,CAAA;IACV;;OAEG;IACH,mFAAS,CAAA;AACV,CAAC,EATW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QASpC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/sticker.d.ts b/node_modules/discord-api-types/payloads/v10/sticker.d.ts
new file mode 100644
index 0000000..4edbd78
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/sticker.d.ts
@@ -0,0 +1,124 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/sticker
+ */
+import type { Snowflake } from '../../globals';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-object
+ */
+export interface APISticker {
+ /**
+ * ID of the sticker
+ */
+ id: Snowflake;
+ /**
+ * For standard stickers, ID of the pack the sticker is from
+ */
+ pack_id?: Snowflake;
+ /**
+ * Name of the sticker
+ */
+ name: string;
+ /**
+ * Description of the sticker
+ */
+ description: string | null;
+ /**
+ * For guild stickers, the Discord name of a unicode emoji representing the sticker's expression. for standard stickers, a comma-separated list of related expressions.
+ */
+ tags: string;
+ /**
+ * Previously the sticker asset hash, now an empty string
+ *
+ * @deprecated
+ */
+ asset?: '';
+ /**
+ * Type of sticker
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
+ */
+ type: StickerType;
+ /**
+ * Type of sticker format
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
+ */
+ format_type: StickerFormatType;
+ /**
+ * Whether this guild sticker can be used, may be false due to loss of Server Boosts
+ */
+ available?: boolean;
+ /**
+ * ID of the guild that owns this sticker
+ */
+ guild_id?: Snowflake;
+ /**
+ * The user that uploaded the guild sticker
+ */
+ user?: APIUser;
+ /**
+ * The standard sticker's sort order within its pack
+ */
+ sort_value?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
+ */
+export declare enum StickerType {
+ /**
+ * An official sticker in a pack, part of Nitro or in a removed purchasable pack
+ */
+ Standard = 1,
+ /**
+ * A sticker uploaded to a guild for the guild's members
+ */
+ Guild = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
+ */
+export declare enum StickerFormatType {
+ PNG = 1,
+ APNG = 2,
+ Lottie = 3,
+ GIF = 4
+}
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-item-object
+ */
+export type APIStickerItem = Pick<APISticker, 'id' | 'name' | 'format_type'>;
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-pack-object
+ */
+export interface APIStickerPack {
+ /**
+ * ID of the sticker pack
+ */
+ id: Snowflake;
+ /**
+ * The stickers in the pack
+ */
+ stickers: APISticker[];
+ /**
+ * Name of the sticker pack
+ */
+ name: string;
+ /**
+ * ID of the pack's SKU
+ */
+ sku_id: Snowflake;
+ /**
+ * ID of a sticker in the pack which is shown as the pack's icon
+ */
+ cover_sticker_id?: Snowflake;
+ /**
+ * Description of the sticker pack
+ */
+ description: string;
+ /**
+ * ID of the sticker pack's banner image
+ */
+ banner_asset_id?: Snowflake;
+}
+//# sourceMappingURL=sticker.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/sticker.d.ts.map b/node_modules/discord-api-types/payloads/v10/sticker.d.ts.map
new file mode 100644
index 0000000..8e5d1c0
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/sticker.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"sticker.d.ts","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,CAAC,EAAE,EAAE,CAAC;IACX;;;;OAIG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;;;OAIG;IACH,WAAW,EAAE,iBAAiB,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,oBAAY,WAAW;IACtB;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,KAAK,IAAA;CACL;AAED;;GAEG;AACH,oBAAY,iBAAiB;IAC5B,GAAG,IAAI;IACP,IAAI,IAAA;IACJ,MAAM,IAAA;IACN,GAAG,IAAA;CACH;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,MAAM,GAAG,aAAa,CAAC,CAAC;AAE7E;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;CAC5B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/sticker.js b/node_modules/discord-api-types/payloads/v10/sticker.js
new file mode 100644
index 0000000..7d96714
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/sticker.js
@@ -0,0 +1,31 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/sticker
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.StickerFormatType = exports.StickerType = void 0;
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
+ */
+var StickerType;
+(function (StickerType) {
+ /**
+ * An official sticker in a pack, part of Nitro or in a removed purchasable pack
+ */
+ StickerType[StickerType["Standard"] = 1] = "Standard";
+ /**
+ * A sticker uploaded to a guild for the guild's members
+ */
+ StickerType[StickerType["Guild"] = 2] = "Guild";
+})(StickerType = exports.StickerType || (exports.StickerType = {}));
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
+ */
+var StickerFormatType;
+(function (StickerFormatType) {
+ StickerFormatType[StickerFormatType["PNG"] = 1] = "PNG";
+ StickerFormatType[StickerFormatType["APNG"] = 2] = "APNG";
+ StickerFormatType[StickerFormatType["Lottie"] = 3] = "Lottie";
+ StickerFormatType[StickerFormatType["GIF"] = 4] = "GIF";
+})(StickerFormatType = exports.StickerFormatType || (exports.StickerFormatType = {}));
+//# sourceMappingURL=sticker.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/sticker.js.map b/node_modules/discord-api-types/payloads/v10/sticker.js.map
new file mode 100644
index 0000000..c1d2495
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/sticker.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"sticker.js","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAiEH;;GAEG;AACH,IAAY,WASX;AATD,WAAY,WAAW;IACtB;;OAEG;IACH,qDAAY,CAAA;IACZ;;OAEG;IACH,+CAAK,CAAA;AACN,CAAC,EATW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAStB;AAED;;GAEG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC5B,uDAAO,CAAA;IACP,yDAAI,CAAA;IACJ,6DAAM,CAAA;IACN,uDAAG,CAAA;AACJ,CAAC,EALW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAK5B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/teams.d.ts b/node_modules/discord-api-types/payloads/v10/teams.d.ts
new file mode 100644
index 0000000..0f8d0b7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/teams.d.ts
@@ -0,0 +1,63 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/teams
+ */
+import type { Snowflake } from '../../globals';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/topics/teams#data-models-team-object
+ */
+export interface APITeam {
+ /**
+ * A hash of the image of the team's icon
+ */
+ icon: string | null;
+ /**
+ * The unique id of the team
+ */
+ id: Snowflake;
+ /**
+ * The members of the team
+ */
+ members: APITeamMember[];
+ /**
+ * The name of the team
+ */
+ name: string;
+ /**
+ * The user id of the current team owner
+ */
+ owner_user_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/teams#data-models-team-member-object
+ */
+export interface APITeamMember {
+ /**
+ * The user's membership state on the team
+ *
+ * See https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
+ */
+ membership_state: TeamMemberMembershipState;
+ /**
+ * Will always be `["*"]`
+ */
+ permissions: ['*'];
+ /**
+ * The id of the parent team of which they are a member
+ */
+ team_id: Snowflake;
+ /**
+ * The avatar, discriminator, id, and username of the user
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
+ */
+export declare enum TeamMemberMembershipState {
+ Invited = 1,
+ Accepted = 2
+}
+//# sourceMappingURL=teams.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/teams.d.ts.map b/node_modules/discord-api-types/payloads/v10/teams.d.ts.map
new file mode 100644
index 0000000..a80ab8f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/teams.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["teams.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,aAAa,EAAE,SAAS,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B;;;;OAIG;IACH,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C;;OAEG;IACH,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC;IACnB;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;CACd;AAED;;GAEG;AACH,oBAAY,yBAAyB;IACpC,OAAO,IAAI;IACX,QAAQ,IAAA;CACR"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/teams.js b/node_modules/discord-api-types/payloads/v10/teams.js
new file mode 100644
index 0000000..8218efd
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/teams.js
@@ -0,0 +1,15 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/teams
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.TeamMemberMembershipState = void 0;
+/**
+ * https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
+ */
+var TeamMemberMembershipState;
+(function (TeamMemberMembershipState) {
+ TeamMemberMembershipState[TeamMemberMembershipState["Invited"] = 1] = "Invited";
+ TeamMemberMembershipState[TeamMemberMembershipState["Accepted"] = 2] = "Accepted";
+})(TeamMemberMembershipState = exports.TeamMemberMembershipState || (exports.TeamMemberMembershipState = {}));
+//# sourceMappingURL=teams.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/teams.js.map b/node_modules/discord-api-types/payloads/v10/teams.js.map
new file mode 100644
index 0000000..de84691
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/teams.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"teams.js","sourceRoot":"","sources":["teams.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAyDH;;GAEG;AACH,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACpC,+EAAW,CAAA;IACX,iFAAQ,CAAA;AACT,CAAC,EAHW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAGpC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/template.d.ts b/node_modules/discord-api-types/payloads/v10/template.d.ts
new file mode 100644
index 0000000..0eda728
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/template.d.ts
@@ -0,0 +1,63 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/guild-template
+ */
+import type { Snowflake } from '../../globals';
+import type { RESTPostAPIGuildsJSONBody } from '../../rest/v10/index';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/resources/guild-template#guild-template-object
+ */
+export interface APITemplate {
+ /**
+ * The template code (unique ID)
+ */
+ code: string;
+ /**
+ * Template name
+ */
+ name: string;
+ /**
+ * The description for the template
+ */
+ description: string | null;
+ /**
+ * Number of times this template has been used
+ */
+ usage_count: number;
+ /**
+ * The ID of the user who created the template
+ */
+ creator_id: Snowflake;
+ /**
+ * The user who created the template
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ creator: APIUser;
+ /**
+ * When this template was created
+ */
+ created_at: string;
+ /**
+ * When this template was last synced to the source guild
+ */
+ updated_at: string;
+ /**
+ * The ID of the guild this template is based on
+ */
+ source_guild_id: Snowflake;
+ /**
+ * The guild snapshot this template contains
+ */
+ serialized_source_guild: APITemplateSerializedSourceGuild;
+ /**
+ * Whether the template has unsynced changes
+ */
+ is_dirty: boolean | null;
+}
+export interface APITemplateSerializedSourceGuild extends Omit<RESTPostAPIGuildsJSONBody, 'icon'> {
+ description: string | null;
+ preferred_locale: string;
+ icon_hash: string | null;
+}
+//# sourceMappingURL=template.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/template.d.ts.map b/node_modules/discord-api-types/payloads/v10/template.d.ts.map
new file mode 100644
index 0000000..576f76b
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/template.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,eAAe,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,uBAAuB,EAAE,gCAAgC,CAAC;IAC1D;;OAEG;IACH,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,gCAAiC,SAAQ,IAAI,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAChG,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/template.js b/node_modules/discord-api-types/payloads/v10/template.js
new file mode 100644
index 0000000..1316c33
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/template.js
@@ -0,0 +1,6 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/guild-template
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=template.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/template.js.map b/node_modules/discord-api-types/payloads/v10/template.js.map
new file mode 100644
index 0000000..12683e3
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/template.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"template.js","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":";AAAA;;GAEG"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/user.d.ts b/node_modules/discord-api-types/payloads/v10/user.d.ts
new file mode 100644
index 0000000..d342e85
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/user.d.ts
@@ -0,0 +1,309 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/user
+ */
+import type { Snowflake } from '../../globals';
+import type { APIGuildIntegration } from './guild';
+/**
+ * https://discord.com/developers/docs/resources/user#user-object
+ */
+export interface APIUser {
+ /**
+ * The user's id
+ */
+ id: Snowflake;
+ /**
+ * The user's username, not unique across the platform
+ */
+ username: string;
+ /**
+ * The user's Discord-tag
+ */
+ discriminator: string;
+ /**
+ * The user's display name, if it is set. For bots, this is the application name
+ */
+ global_name: string | null;
+ /**
+ * The user's avatar hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ avatar: string | null;
+ /**
+ * Whether the user belongs to an OAuth2 application
+ */
+ bot?: boolean;
+ /**
+ * Whether the user is an Official Discord System user (part of the urgent message system)
+ */
+ system?: boolean;
+ /**
+ * Whether the user has two factor enabled on their account
+ */
+ mfa_enabled?: boolean;
+ /**
+ * The user's banner hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ banner?: string | null;
+ /**
+ * The user's banner color encoded as an integer representation of hexadecimal color code
+ */
+ accent_color?: number | null;
+ /**
+ * The user's chosen language option
+ */
+ locale?: string;
+ /**
+ * Whether the email on this account has been verified
+ */
+ verified?: boolean;
+ /**
+ * The user's email
+ */
+ email?: string | null;
+ /**
+ * The flags on a user's account
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object-user-flags
+ */
+ flags?: UserFlags;
+ /**
+ * The type of Nitro subscription on a user's account
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object-premium-types
+ */
+ premium_type?: UserPremiumType;
+ /**
+ * The public flags on a user's account
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object-user-flags
+ */
+ public_flags?: UserFlags;
+ /**
+ * The user's avatar decoration hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ avatar_decoration?: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/user#user-object-user-flags
+ */
+export declare enum UserFlags {
+ /**
+ * Discord Employee
+ */
+ Staff = 1,
+ /**
+ * Partnered Server Owner
+ */
+ Partner = 2,
+ /**
+ * HypeSquad Events Member
+ */
+ Hypesquad = 4,
+ /**
+ * Bug Hunter Level 1
+ */
+ BugHunterLevel1 = 8,
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ MFASMS = 16,
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ PremiumPromoDismissed = 32,
+ /**
+ * House Bravery Member
+ */
+ HypeSquadOnlineHouse1 = 64,
+ /**
+ * House Brilliance Member
+ */
+ HypeSquadOnlineHouse2 = 128,
+ /**
+ * House Balance Member
+ */
+ HypeSquadOnlineHouse3 = 256,
+ /**
+ * Early Nitro Supporter
+ */
+ PremiumEarlySupporter = 512,
+ /**
+ * User is a [team](https://discord.com/developers/docs/topics/teams)
+ */
+ TeamPseudoUser = 1024,
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ HasUnreadUrgentMessages = 8192,
+ /**
+ * Bug Hunter Level 2
+ */
+ BugHunterLevel2 = 16384,
+ /**
+ * Verified Bot
+ */
+ VerifiedBot = 65536,
+ /**
+ * Early Verified Bot Developer
+ */
+ VerifiedDeveloper = 131072,
+ /**
+ * Moderator Programs Alumni
+ */
+ CertifiedModerator = 262144,
+ /**
+ * Bot uses only [HTTP interactions](https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction) and is shown in the online member list
+ */
+ BotHTTPInteractions = 524288,
+ /**
+ * User has been identified as spammer
+ *
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ Spammer = 1048576,
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ DisablePremium = 2097152,
+ /**
+ * User is an [Active Developer](https://support-dev.discord.com/hc/articles/10113997751447)
+ */
+ ActiveDeveloper = 4194304,
+ /**
+ * User's account has been [quarantined](https://support.discord.com/hc/articles/6461420677527) based on recent activity
+ *
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ * @privateRemarks
+ *
+ * This value would be 1 << 44, but bit shifting above 1 << 30 requires bigints
+ */
+ Quarantined = 17592186044416,
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ * @privateRemarks
+ *
+ * This value would be 1 << 50, but bit shifting above 1 << 30 requires bigints
+ */
+ Collaborator = 1125899906842624,
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ * @privateRemarks
+ *
+ * This value would be 1 << 51, but bit shifting above 1 << 30 requires bigints
+ */
+ RestrictedCollaborator = 2251799813685248
+}
+/**
+ * https://discord.com/developers/docs/resources/user#user-object-premium-types
+ */
+export declare enum UserPremiumType {
+ None = 0,
+ NitroClassic = 1,
+ Nitro = 2,
+ NitroBasic = 3
+}
+/**
+ * https://discord.com/developers/docs/resources/user#connection-object
+ */
+export interface APIConnection {
+ /**
+ * ID of the connection account
+ */
+ id: string;
+ /**
+ * The username of the connection account
+ */
+ name: string;
+ /**
+ * The service of the connection
+ *
+ * See https://discord.com/developers/docs/resources/user#connection-object-services
+ */
+ type: ConnectionService;
+ /**
+ * Whether the connection is revoked
+ */
+ revoked?: boolean;
+ /**
+ * An array of partial server integrations
+ *
+ * See https://discord.com/developers/docs/resources/guild#integration-object
+ */
+ integrations?: Partial<APIGuildIntegration>[];
+ /**
+ * Whether the connection is verified
+ */
+ verified: boolean;
+ /**
+ * Whether friend sync is enabled for this connection
+ */
+ friend_sync: boolean;
+ /**
+ * Whether activities related to this connection will be shown in presence updates
+ */
+ show_activity: boolean;
+ /**
+ * Whether this connection supports console voice transfer
+ */
+ two_way_link: boolean;
+ /**
+ * Visibility of this connection
+ *
+ * See https://discord.com/developers/docs/resources/user#connection-object-visibility-types
+ */
+ visibility: ConnectionVisibility;
+}
+export declare enum ConnectionService {
+ BattleNet = "battlenet",
+ eBay = "ebay",
+ EpicGames = "epicgames",
+ Facebook = "facebook",
+ GitHub = "github",
+ Instagram = "instagram",
+ LeagueOfLegends = "leagueoflegends",
+ PayPal = "paypal",
+ PlayStationNetwork = "playstation",
+ Reddit = "reddit",
+ RiotGames = "riotgames",
+ Spotify = "spotify",
+ Skype = "skype",
+ Steam = "steam",
+ TikTok = "tiktok",
+ Twitch = "twitch",
+ Twitter = "twitter",
+ Xbox = "xbox",
+ YouTube = "youtube"
+}
+export declare enum ConnectionVisibility {
+ /**
+ * Invisible to everyone except the user themselves
+ */
+ None = 0,
+ /**
+ * Visible to everyone
+ */
+ Everyone = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/user#application-role-connection-object-application-role-connection-structure
+ */
+export interface APIApplicationRoleConnection {
+ /**
+ * The vanity name of the platform a bot has connected (max 50 characters)
+ */
+ platform_name: string | null;
+ /**
+ * The username on the platform a bot has connected (max 100 characters)
+ */
+ platform_username: string | null;
+ /**
+ * Object mapping application role connection metadata keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected
+ */
+ metadata: Record<string, string | number>;
+}
+//# sourceMappingURL=user.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/user.d.ts.map b/node_modules/discord-api-types/payloads/v10/user.d.ts.map
new file mode 100644
index 0000000..6e4e36e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/user.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;;;OAIG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B;;;;OAIG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED;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;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,UAAU,EAAE,oBAAoB,CAAC;CACjC;AAED,oBAAY,iBAAiB;IAC5B,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,eAAe,oBAAoB;IACnC,MAAM,WAAW;IACjB,kBAAkB,gBAAgB;IAClC,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,OAAO,YAAY;CACnB;AAED,oBAAY,oBAAoB;IAC/B;;OAEG;IACH,IAAI,IAAA;IACJ;;OAEG;IACH,QAAQ,IAAA;CACR;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CAC1C"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/user.js b/node_modules/discord-api-types/payloads/v10/user.js
new file mode 100644
index 0000000..c5281b2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/user.js
@@ -0,0 +1,161 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/user
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ConnectionVisibility = exports.ConnectionService = exports.UserPremiumType = exports.UserFlags = void 0;
+/**
+ * https://discord.com/developers/docs/resources/user#user-object-user-flags
+ */
+var UserFlags;
+(function (UserFlags) {
+ /**
+ * Discord Employee
+ */
+ UserFlags[UserFlags["Staff"] = 1] = "Staff";
+ /**
+ * Partnered Server Owner
+ */
+ UserFlags[UserFlags["Partner"] = 2] = "Partner";
+ /**
+ * HypeSquad Events Member
+ */
+ UserFlags[UserFlags["Hypesquad"] = 4] = "Hypesquad";
+ /**
+ * Bug Hunter Level 1
+ */
+ UserFlags[UserFlags["BugHunterLevel1"] = 8] = "BugHunterLevel1";
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ UserFlags[UserFlags["MFASMS"] = 16] = "MFASMS";
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ UserFlags[UserFlags["PremiumPromoDismissed"] = 32] = "PremiumPromoDismissed";
+ /**
+ * House Bravery Member
+ */
+ UserFlags[UserFlags["HypeSquadOnlineHouse1"] = 64] = "HypeSquadOnlineHouse1";
+ /**
+ * House Brilliance Member
+ */
+ UserFlags[UserFlags["HypeSquadOnlineHouse2"] = 128] = "HypeSquadOnlineHouse2";
+ /**
+ * House Balance Member
+ */
+ UserFlags[UserFlags["HypeSquadOnlineHouse3"] = 256] = "HypeSquadOnlineHouse3";
+ /**
+ * Early Nitro Supporter
+ */
+ UserFlags[UserFlags["PremiumEarlySupporter"] = 512] = "PremiumEarlySupporter";
+ /**
+ * User is a [team](https://discord.com/developers/docs/topics/teams)
+ */
+ UserFlags[UserFlags["TeamPseudoUser"] = 1024] = "TeamPseudoUser";
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ UserFlags[UserFlags["HasUnreadUrgentMessages"] = 8192] = "HasUnreadUrgentMessages";
+ /**
+ * Bug Hunter Level 2
+ */
+ UserFlags[UserFlags["BugHunterLevel2"] = 16384] = "BugHunterLevel2";
+ /**
+ * Verified Bot
+ */
+ UserFlags[UserFlags["VerifiedBot"] = 65536] = "VerifiedBot";
+ /**
+ * Early Verified Bot Developer
+ */
+ UserFlags[UserFlags["VerifiedDeveloper"] = 131072] = "VerifiedDeveloper";
+ /**
+ * Moderator Programs Alumni
+ */
+ UserFlags[UserFlags["CertifiedModerator"] = 262144] = "CertifiedModerator";
+ /**
+ * Bot uses only [HTTP interactions](https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction) and is shown in the online member list
+ */
+ UserFlags[UserFlags["BotHTTPInteractions"] = 524288] = "BotHTTPInteractions";
+ /**
+ * User has been identified as spammer
+ *
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ UserFlags[UserFlags["Spammer"] = 1048576] = "Spammer";
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ UserFlags[UserFlags["DisablePremium"] = 2097152] = "DisablePremium";
+ /**
+ * User is an [Active Developer](https://support-dev.discord.com/hc/articles/10113997751447)
+ */
+ UserFlags[UserFlags["ActiveDeveloper"] = 4194304] = "ActiveDeveloper";
+ /**
+ * User's account has been [quarantined](https://support.discord.com/hc/articles/6461420677527) based on recent activity
+ *
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ * @privateRemarks
+ *
+ * This value would be 1 << 44, but bit shifting above 1 << 30 requires bigints
+ */
+ UserFlags[UserFlags["Quarantined"] = 17592186044416] = "Quarantined";
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ * @privateRemarks
+ *
+ * This value would be 1 << 50, but bit shifting above 1 << 30 requires bigints
+ */
+ UserFlags[UserFlags["Collaborator"] = 1125899906842624] = "Collaborator";
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ * @privateRemarks
+ *
+ * This value would be 1 << 51, but bit shifting above 1 << 30 requires bigints
+ */
+ UserFlags[UserFlags["RestrictedCollaborator"] = 2251799813685248] = "RestrictedCollaborator";
+})(UserFlags = exports.UserFlags || (exports.UserFlags = {}));
+/**
+ * https://discord.com/developers/docs/resources/user#user-object-premium-types
+ */
+var UserPremiumType;
+(function (UserPremiumType) {
+ UserPremiumType[UserPremiumType["None"] = 0] = "None";
+ UserPremiumType[UserPremiumType["NitroClassic"] = 1] = "NitroClassic";
+ UserPremiumType[UserPremiumType["Nitro"] = 2] = "Nitro";
+ UserPremiumType[UserPremiumType["NitroBasic"] = 3] = "NitroBasic";
+})(UserPremiumType = exports.UserPremiumType || (exports.UserPremiumType = {}));
+var ConnectionService;
+(function (ConnectionService) {
+ ConnectionService["BattleNet"] = "battlenet";
+ ConnectionService["eBay"] = "ebay";
+ ConnectionService["EpicGames"] = "epicgames";
+ ConnectionService["Facebook"] = "facebook";
+ ConnectionService["GitHub"] = "github";
+ ConnectionService["Instagram"] = "instagram";
+ ConnectionService["LeagueOfLegends"] = "leagueoflegends";
+ ConnectionService["PayPal"] = "paypal";
+ ConnectionService["PlayStationNetwork"] = "playstation";
+ ConnectionService["Reddit"] = "reddit";
+ ConnectionService["RiotGames"] = "riotgames";
+ ConnectionService["Spotify"] = "spotify";
+ ConnectionService["Skype"] = "skype";
+ ConnectionService["Steam"] = "steam";
+ ConnectionService["TikTok"] = "tiktok";
+ ConnectionService["Twitch"] = "twitch";
+ ConnectionService["Twitter"] = "twitter";
+ ConnectionService["Xbox"] = "xbox";
+ ConnectionService["YouTube"] = "youtube";
+})(ConnectionService = exports.ConnectionService || (exports.ConnectionService = {}));
+var ConnectionVisibility;
+(function (ConnectionVisibility) {
+ /**
+ * Invisible to everyone except the user themselves
+ */
+ ConnectionVisibility[ConnectionVisibility["None"] = 0] = "None";
+ /**
+ * Visible to everyone
+ */
+ ConnectionVisibility[ConnectionVisibility["Everyone"] = 1] = "Everyone";
+})(ConnectionVisibility = exports.ConnectionVisibility || (exports.ConnectionVisibility = {}));
+//# sourceMappingURL=user.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/user.js.map b/node_modules/discord-api-types/payloads/v10/user.js.map
new file mode 100644
index 0000000..f2cc69a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/user.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA2FH;;GAEG;AACH,IAAY,SA0GX;AA1GD,WAAY,SAAS;IACpB;;OAEG;IACH,2CAAc,CAAA;IACd;;OAEG;IACH,+CAAgB,CAAA;IAChB;;OAEG;IACH,mDAAkB,CAAA;IAClB;;OAEG;IACH,+DAAwB,CAAA;IACxB;;OAEG;IACH,8CAAe,CAAA;IACf;;OAEG;IACH,4EAA8B,CAAA;IAC9B;;OAEG;IACH,4EAA8B,CAAA;IAC9B;;OAEG;IACH,6EAA8B,CAAA;IAC9B;;OAEG;IACH,6EAA8B,CAAA;IAC9B;;OAEG;IACH,6EAA8B,CAAA;IAC9B;;OAEG;IACH,gEAAwB,CAAA;IACxB;;OAEG;IACH,kFAAiC,CAAA;IACjC;;OAEG;IACH,mEAAyB,CAAA;IACzB;;OAEG;IACH,2DAAqB,CAAA;IACrB;;OAEG;IACH,wEAA2B,CAAA;IAC3B;;OAEG;IACH,0EAA4B,CAAA;IAC5B;;OAEG;IACH,4EAA6B,CAAA;IAC7B;;;;OAIG;IACH,qDAAiB,CAAA;IACjB;;OAEG;IACH,mEAAwB,CAAA;IACxB;;OAEG;IACH,qEAAyB,CAAA;IACzB;;;;;;;OAOG;IACH,oEAAgC,CAAA;IAChC;;;;;OAKG;IACH,wEAAoC,CAAA;IACpC;;;;;OAKG;IACH,4FAA8C,CAAA;AAC/C,CAAC,EA1GW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QA0GpB;AAED;;GAEG;AACH,IAAY,eAKX;AALD,WAAY,eAAe;IAC1B,qDAAI,CAAA;IACJ,qEAAY,CAAA;IACZ,uDAAK,CAAA;IACL,iEAAU,CAAA;AACX,CAAC,EALW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAK1B;AAsDD,IAAY,iBAoBX;AApBD,WAAY,iBAAiB;IAC5B,4CAAuB,CAAA;IACvB,kCAAa,CAAA;IACb,4CAAuB,CAAA;IACvB,0CAAqB,CAAA;IACrB,sCAAiB,CAAA;IACjB,4CAAuB,CAAA;IACvB,wDAAmC,CAAA;IACnC,sCAAiB,CAAA;IACjB,uDAAkC,CAAA;IAClC,sCAAiB,CAAA;IACjB,4CAAuB,CAAA;IACvB,wCAAmB,CAAA;IACnB,oCAAe,CAAA;IACf,oCAAe,CAAA;IACf,sCAAiB,CAAA;IACjB,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IACnB,kCAAa,CAAA;IACb,wCAAmB,CAAA;AACpB,CAAC,EApBW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAoB5B;AAED,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC/B;;OAEG;IACH,+DAAI,CAAA;IACJ;;OAEG;IACH,uEAAQ,CAAA;AACT,CAAC,EATW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAS/B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/voice.d.ts b/node_modules/discord-api-types/payloads/v10/voice.d.ts
new file mode 100644
index 0000000..ca28e61
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/voice.d.ts
@@ -0,0 +1,90 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/voice
+ */
+import type { Snowflake } from '../../globals';
+import type { APIGuildMember } from './guild';
+/**
+ * https://discord.com/developers/docs/resources/voice#voice-state-object
+ */
+export interface GatewayVoiceState {
+ /**
+ * The guild id this voice state is for
+ */
+ guild_id?: Snowflake;
+ /**
+ * The channel id this user is connected to
+ */
+ channel_id: Snowflake | null;
+ /**
+ * The user id this voice state is for
+ */
+ user_id: Snowflake;
+ /**
+ * The guild member this voice state is for
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ member?: APIGuildMember;
+ /**
+ * The session id for this voice state
+ */
+ session_id: string;
+ /**
+ * Whether this user is deafened by the server
+ */
+ deaf: boolean;
+ /**
+ * Whether this user is muted by the server
+ */
+ mute: boolean;
+ /**
+ * Whether this user is locally deafened
+ */
+ self_deaf: boolean;
+ /**
+ * Whether this user is locally muted
+ */
+ self_mute: boolean;
+ /**
+ * Whether this user is streaming using "Go Live"
+ */
+ self_stream?: boolean;
+ /**
+ * Whether this user's camera is enabled
+ */
+ self_video: boolean;
+ /**
+ * Whether this user is muted by the current user
+ */
+ suppress: boolean;
+ /**
+ * The time at which the user requested to speak
+ */
+ request_to_speak_timestamp: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/voice#voice-region-object
+ */
+export interface APIVoiceRegion {
+ /**
+ * Unique ID for the region
+ */
+ id: string;
+ /**
+ * Name of the region
+ */
+ name: string;
+ /**
+ * `true` for a single server that is closest to the current user's client
+ */
+ optimal: boolean;
+ /**
+ * Whether this is a deprecated voice region (avoid switching to these)
+ */
+ deprecated: boolean;
+ /**
+ * Whether this is a custom voice region (used for events/etc)
+ */
+ custom: boolean;
+}
+//# sourceMappingURL=voice.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/voice.d.ts.map b/node_modules/discord-api-types/payloads/v10/voice.d.ts.map
new file mode 100644
index 0000000..966c242
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/voice.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,UAAU,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;CAChB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/voice.js b/node_modules/discord-api-types/payloads/v10/voice.js
new file mode 100644
index 0000000..8e67862
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/voice.js
@@ -0,0 +1,6 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/voice
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=voice.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/voice.js.map b/node_modules/discord-api-types/payloads/v10/voice.js.map
new file mode 100644
index 0000000..e54835f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/voice.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"voice.js","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":";AAAA;;GAEG"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/webhook.d.ts b/node_modules/discord-api-types/payloads/v10/webhook.d.ts
new file mode 100644
index 0000000..3241e39
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/webhook.d.ts
@@ -0,0 +1,77 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/webhook
+ */
+import type { Snowflake } from '../../globals';
+import type { APIPartialChannel, APIPartialGuild, APIUser } from './index';
+/**
+ * https://discord.com/developers/docs/resources/webhook#webhook-object
+ */
+export interface APIWebhook {
+ /**
+ * The id of the webhook
+ */
+ id: Snowflake;
+ /**
+ * The type of the webhook
+ *
+ * See https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types
+ */
+ type: WebhookType;
+ /**
+ * The guild id this webhook is for
+ */
+ guild_id?: Snowflake;
+ /**
+ * The channel id this webhook is for
+ */
+ channel_id: Snowflake;
+ /**
+ * The user this webhook was created by (not returned when getting a webhook with its token)
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user?: APIUser;
+ /**
+ * The default name of the webhook
+ */
+ name: string | null;
+ /**
+ * The default avatar of the webhook
+ */
+ avatar: string | null;
+ /**
+ * The secure token of the webhook (returned for Incoming Webhooks)
+ */
+ token?: string;
+ /**
+ * The bot/OAuth2 application that created this webhook
+ */
+ application_id: Snowflake | null;
+ /**
+ * The guild of the channel that this webhook is following (returned for Channel Follower Webhooks)
+ */
+ source_guild?: APIPartialGuild;
+ /**
+ * The channel that this webhook is following (returned for Channel Follower Webhooks)
+ */
+ source_channel?: APIPartialChannel;
+ /**
+ * The url used for executing the webhook (returned by the webhooks OAuth2 flow)
+ */
+ url?: string;
+}
+export declare enum WebhookType {
+ /**
+ * Incoming Webhooks can post messages to channels with a generated token
+ */
+ Incoming = 1,
+ /**
+ * Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels
+ */
+ ChannelFollower = 2,
+ /**
+ * Application webhooks are webhooks used with Interactions
+ */
+ Application = 3
+}
+//# sourceMappingURL=webhook.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/webhook.d.ts.map b/node_modules/discord-api-types/payloads/v10/webhook.d.ts.map
new file mode 100644
index 0000000..612eae2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/webhook.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;;;OAIG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,cAAc,EAAE,SAAS,GAAG,IAAI,CAAC;IACjC;;OAEG;IACH,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B;;OAEG;IACH,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED,oBAAY,WAAW;IACtB;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,eAAe,IAAA;IACf;;OAEG;IACH,WAAW,IAAA;CACX"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/webhook.js b/node_modules/discord-api-types/payloads/v10/webhook.js
new file mode 100644
index 0000000..f9a8bbe
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/webhook.js
@@ -0,0 +1,22 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/webhook
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.WebhookType = void 0;
+var WebhookType;
+(function (WebhookType) {
+ /**
+ * Incoming Webhooks can post messages to channels with a generated token
+ */
+ WebhookType[WebhookType["Incoming"] = 1] = "Incoming";
+ /**
+ * Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels
+ */
+ WebhookType[WebhookType["ChannelFollower"] = 2] = "ChannelFollower";
+ /**
+ * Application webhooks are webhooks used with Interactions
+ */
+ WebhookType[WebhookType["Application"] = 3] = "Application";
+})(WebhookType = exports.WebhookType || (exports.WebhookType = {}));
+//# sourceMappingURL=webhook.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v10/webhook.js.map b/node_modules/discord-api-types/payloads/v10/webhook.js.map
new file mode 100644
index 0000000..8c06411
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v10/webhook.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA+DH,IAAY,WAaX;AAbD,WAAY,WAAW;IACtB;;OAEG;IACH,qDAAY,CAAA;IACZ;;OAEG;IACH,mEAAe,CAAA;IACf;;OAEG;IACH,2DAAW,CAAA;AACZ,CAAC,EAbW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAatB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/auditLog.d.ts b/node_modules/discord-api-types/payloads/v6/auditLog.d.ts
new file mode 100644
index 0000000..f6b22d8
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/auditLog.d.ts
@@ -0,0 +1,469 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/audit-log
+ */
+import type { APIOverwrite, ChannelType } from './channel';
+import type { APIGuildIntegration, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildMFALevel, GuildVerificationLevel, IntegrationExpireBehavior } from './guild';
+import type { APIRole } from './permissions';
+import type { APIUser } from './user';
+import type { APIWebhook } from './webhook';
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIAuditLog {
+ webhooks: APIWebhook[];
+ users: APIUser[];
+ audit_log_entries: APIAuditLogEntry[];
+ integrations: APIGuildIntegration[];
+}
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIAuditLogEntry {
+ target_id: string | null;
+ changes?: APIAuditLogChange[];
+ user_id: string | null;
+ id: string;
+ action_type: AuditLogEvent;
+ options?: APIAuditLogOptions;
+ reason?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum AuditLogEvent {
+ GUILD_UPDATE = 1,
+ CHANNEL_CREATE = 10,
+ CHANNEL_UPDATE = 11,
+ CHANNEL_DELETE = 12,
+ CHANNEL_OVERWRITE_CREATE = 13,
+ CHANNEL_OVERWRITE_UPDATE = 14,
+ CHANNEL_OVERWRITE_DELETE = 15,
+ MEMBER_KICK = 20,
+ MEMBER_PRUNE = 21,
+ MEMBER_BAN_ADD = 22,
+ MEMBER_BAN_REMOVE = 23,
+ MEMBER_UPDATE = 24,
+ MEMBER_ROLE_UPDATE = 25,
+ MEMBER_MOVE = 26,
+ MEMBER_DISCONNECT = 27,
+ BOT_ADD = 28,
+ ROLE_CREATE = 30,
+ ROLE_UPDATE = 31,
+ ROLE_DELETE = 32,
+ INVITE_CREATE = 40,
+ INVITE_UPDATE = 41,
+ INVITE_DELETE = 42,
+ WEBHOOK_CREATE = 50,
+ WEBHOOK_UPDATE = 51,
+ WEBHOOK_DELETE = 52,
+ EMOJI_CREATE = 60,
+ EMOJI_UPDATE = 61,
+ EMOJI_DELETE = 62,
+ MESSAGE_DELETE = 72,
+ MESSAGE_BULK_DELETE = 73,
+ MESSAGE_PIN = 74,
+ MESSAGE_UNPIN = 75,
+ INTEGRATION_CREATE = 80,
+ INTEGRATION_UPDATE = 81,
+ INTEGRATION_DELETE = 82
+}
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIAuditLogOptions {
+ /**
+ * Present from:
+ * - MEMBER_PRUNE
+ */
+ delete_member_days?: string;
+ /**
+ * Present from:
+ * - MEMBER_PRUNE
+ */
+ members_removed?: string;
+ /**
+ * Present from:
+ * - MEMBER_MOVE
+ * - MESSAGE_PIN
+ * - MESSAGE_UNPIN
+ * - MESSAGE_DELETE
+ */
+ channel_id?: string;
+ /**
+ * Present from:
+ * - MESSAGE_PIN
+ * - MESSAGE_UNPIN
+ */
+ message_id?: string;
+ /**
+ * Present from:
+ * - MESSAGE_DELETE
+ * - MESSAGE_BULK_DELETE
+ * - MEMBER_DISCONNECT
+ * - MEMBER_MOVE
+ */
+ count?: string;
+ /**
+ * Present from:
+ * - CHANNEL_OVERWRITE_CREATE
+ * - CHANNEL_OVERWRITE_UPDATE
+ * - CHANNEL_OVERWRITE_DELETE
+ */
+ id?: string;
+ /**
+ * Present from:
+ * - CHANNEL_OVERWRITE_CREATE
+ * - CHANNEL_OVERWRITE_UPDATE
+ * - CHANNEL_OVERWRITE_DELETE
+ */
+ type: AuditLogOptionsType;
+ /**
+ * Present from:
+ * - CHANNEL_OVERWRITE_CREATE
+ * - CHANNEL_OVERWRITE_UPDATE
+ * - CHANNEL_OVERWRITE_DELETE
+ *
+ * **Present only if the {@link APIAuditLogOptions#type entry type} is "role"**
+ */
+ role_name?: string;
+}
+/**
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum AuditLogOptionsType {
+ Member = "member",
+ Role = "role"
+}
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChange = APIAuditLogChangeKeyName | APIAuditLogChangeKeyIconHash | APIAuditLogChangeKeySplashHash | APIAuditLogChangeKeyOwnerID | APIAuditLogChangeKeyRegion | APIAuditLogChangeKeyAFKChannelID | APIAuditLogChangeKeyAFKTimeout | APIAuditLogChangeKeyMFALevel | APIAuditLogChangeKeyVerificationLevel | APIAuditLogChangeKeyExplicitContentFilter | APIAuditLogChangeKeyDefaultMessageNotifications | APIAuditLogChangeKeyVanityURLCode | APIAuditLogChangeKey$Add | APIAuditLogChangeKey$Remove | APIAuditLogChangeKeyPruneDeleteDays | APIAuditLogChangeKeyWidgetEnabled | APIAuditLogChangeKeyWidgetChannelID | APIAuditLogChangeKeySystemChannelID | APIAuditLogChangeKeyPosition | APIAuditLogChangeKeyTopic | APIAuditLogChangeKeyBitrate | APIAuditLogChangeKeyPermissionOverwrites | APIAuditLogChangeKeyNSFW | APIAuditLogChangeKeyApplicationID | APIAuditLogChangeKeyRateLimitPerUser | APIAuditLogChangeKeyPermissions | APIAuditLogChangeKeyPermissionsNew | APIAuditLogChangeKeyColor | APIAuditLogChangeKeyHoist | APIAuditLogChangeKeyMentionable | APIAuditLogChangeKeyAllow | APIAuditLogChangeKeyAllowNew | APIAuditLogChangeKeyDeny | APIAuditLogChangeKeyDenyNew | APIAuditLogChangeKeyCode | APIAuditLogChangeKeyChannelID | APIAuditLogChangeKeyInviterID | APIAuditLogChangeKeyMaxUses | APIAuditLogChangeKeyUses | APIAuditLogChangeKeyMaxAge | APIAuditLogChangeKeyTemporary | APIAuditLogChangeKeyDeaf | APIAuditLogChangeKeyMute | APIAuditLogChangeKeyNick | APIAuditLogChangeKeyAvatarHash | APIAuditLogChangeKeyID | APIAuditLogChangeKeyType | APIAuditLogChangeKeyEnableEmoticons | APIAuditLogChangeKeyExpireBehavior | APIAuditLogChangeKeyExpireGracePeriod;
+/**
+ * Returned when a guild's name is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>;
+/**
+ * Returned when a guild's icon is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', string>;
+/**
+ * Returned when a guild's splash is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>;
+/**
+ * Returned when a guild's owner ID is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyOwnerID = AuditLogChangeData<'owner_id', string>;
+/**
+ * Returned when a guild's region is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>;
+/**
+ * Returned when a guild's afk_channel_id is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyAFKChannelID = AuditLogChangeData<'afk_channel_id', string>;
+/**
+ * Returned when a guild's afk_timeout is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>;
+/**
+ * Returned when a guild's mfa_level is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyMFALevel = AuditLogChangeData<'mfa_level', GuildMFALevel>;
+/**
+ * Returned when a guild's verification_level is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyVerificationLevel = AuditLogChangeData<'verification_level', GuildVerificationLevel>;
+/**
+ * Returned when a guild's explicit_content_filter is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<'explicit_content_filter', GuildExplicitContentFilter>;
+/**
+ * Returned when a guild's default_message_notifications is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData<'default_message_notifications', GuildDefaultMessageNotifications>;
+/**
+ * Returned when a guild's vanity_url_code is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_code', string>;
+/**
+ * Returned when new role(s) are added
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', APIRole[]>;
+/**
+ * Returned when role(s) are removed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', APIRole[]>;
+/**
+ * Returned when there is a change in number of days after which inactive and role-unassigned members are kicked
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyPruneDeleteDays = AuditLogChangeData<'prune_delete_days', number>;
+/**
+ * Returned when a guild's widget is enabled
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabled', boolean>;
+/**
+ * Returned when a guild's widget_channel_id is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyWidgetChannelID = AuditLogChangeData<'widget_channel_id', string>;
+/**
+ * Returned when a guild's system_channel_id is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeySystemChannelID = AuditLogChangeData<'system_channel_id', string>;
+/**
+ * Returned when a channel's position is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyPosition = AuditLogChangeData<'position', number>;
+/**
+ * Returned when a channel's topic is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyTopic = AuditLogChangeData<'topic', string>;
+/**
+ * Returned when a voice channel's bitrate is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyBitrate = AuditLogChangeData<'bitrate', number>;
+/**
+ * Returned when a channel's permission overwrites is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyPermissionOverwrites = AuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
+/**
+ * Returned when a channel's NSFW restriction is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyNSFW = AuditLogChangeData<'nsfw', boolean>;
+/**
+ * The application ID of the added or removed Webhook or Bot
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyApplicationID = AuditLogChangeData<'application_id', string>;
+/**
+ * Returned when a channel's amount of seconds a user has to wait before sending another message
+ * is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyRateLimitPerUser = AuditLogChangeData<'rate_limit_per_user', number>;
+/**
+ * Returned when a permission bitfield is changed
+ *
+ * @deprecated Use `permissions_new` instead
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyPermissions = AuditLogChangeData<'permissions', number>;
+/**
+ * Returned when a permission bitfield is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyPermissionsNew = AuditLogChangeData<'permissions_new', string>;
+/**
+ * Returned when a role's color is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyColor = AuditLogChangeData<'color', number>;
+/**
+ * Returned when a role's hoist status is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyHoist = AuditLogChangeData<'hoist', boolean>;
+/**
+ * Returned when a role's mentionable status is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyMentionable = AuditLogChangeData<'mentionable', boolean>;
+/**
+ * Returned when an overwrite's allowed permissions bitfield is changed
+ *
+ * @deprecated Use `allow_new` instead
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyAllow = AuditLogChangeData<'allow', number>;
+/**
+ * Returned when an overwrite's allowed permissions bitfield is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyAllowNew = AuditLogChangeData<'allow_new', string>;
+/**
+ * Returned when an overwrite's denied permissions bitfield is changed
+ *
+ * @deprecated Use `deny_new` instead
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyDeny = AuditLogChangeData<'deny', number>;
+/**
+ * Returned when an overwrite's denied permissions bitfield is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyDenyNew = AuditLogChangeData<'deny_new', string>;
+/**
+ * Returned when an invite's code is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyCode = AuditLogChangeData<'code', string>;
+/**
+ * Returned when an invite's channel_id is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyChannelID = AuditLogChangeData<'channel_id', string>;
+/**
+ * Returned when an invite's inviter_id is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyInviterID = AuditLogChangeData<'inviter_id', string>;
+/**
+ * Returned when an invite's max_uses is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyMaxUses = AuditLogChangeData<'max_uses', number>;
+/**
+ * Returned when an invite's uses is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyUses = AuditLogChangeData<'uses', number>;
+/**
+ * Returned when an invite's max_age is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyMaxAge = AuditLogChangeData<'max_age', number>;
+/**
+ * Returned when an invite's temporary status is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyTemporary = AuditLogChangeData<'temporary', boolean>;
+/**
+ * Returned when a user's deaf status is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyDeaf = AuditLogChangeData<'deaf', boolean>;
+/**
+ * Returned when a user's mute status is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyMute = AuditLogChangeData<'mute', boolean>;
+/**
+ * Returned when a user's nick is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyNick = AuditLogChangeData<'mute', boolean>;
+/**
+ * Returned when a user's avatar_hash is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyAvatarHash = AuditLogChangeData<'avatar_hash', string>;
+/**
+ * The ID of the changed entity - sometimes used in conjunction with other keys
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIAuditLogChangeKeyID {
+ key: 'id';
+ new_value: string;
+ old_value?: string;
+}
+/**
+ * The type of entity created
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyType = AuditLogChangeData<'type', ChannelType | string>;
+/**
+ * Returned when an integration's enable_emoticons is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyEnableEmoticons = AuditLogChangeData<'enable_emoticons', boolean>;
+/**
+ * Returned when an integration's expire_behavior is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
+/**
+ * Returned when an integration's expire_grace_period is changed
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>;
+/**
+ * @internal
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+interface AuditLogChangeData<K extends string, D> {
+ key: K;
+ new_value?: D;
+ old_value?: D;
+}
+export {};
+//# sourceMappingURL=auditLog.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/auditLog.d.ts.map b/node_modules/discord-api-types/payloads/v6/auditLog.d.ts.map
new file mode 100644
index 0000000..b7824cb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/auditLog.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"auditLog.d.ts","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,KAAK,EACX,mBAAmB,EACnB,gCAAgC,EAChC,0BAA0B,EAC1B,aAAa,EACb,sBAAsB,EACtB,yBAAyB,EACzB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC3B,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;IACtC,YAAY,EAAE,mBAAmB,EAAE,CAAC;CACpC;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAChC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,aAAa,CAAC;IAC3B,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,oBAAY,aAAa;IACxB,YAAY,IAAI;IAEhB,cAAc,KAAK;IACnB,cAAc,KAAA;IACd,cAAc,KAAA;IACd,wBAAwB,KAAA;IACxB,wBAAwB,KAAA;IACxB,wBAAwB,KAAA;I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,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,CAAC;AAExF;;;;GAIG;AACH,MAAM,MAAM,mCAAmC,GAAG,kBAAkB,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;AAElG;;;;GAIG;AACH,MAAM,MAAM,kCAAkC,GAAG,kBAAkB,CAAC,iBAAiB,EAAE,yBAAyB,CAAC,CAAC;AAElH;;;;GAIG;AACH,MAAM,MAAM,qCAAqC,GAAG,kBAAkB,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AAEtG;;;GAGG;AACH,UAAU,kBAAkB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC;IAC/C,GAAG,EAAE,CAAC,CAAC;IACP,SAAS,CAAC,EAAE,CAAC,CAAC;IACd,SAAS,CAAC,EAAE,CAAC,CAAC;CACd"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/auditLog.js b/node_modules/discord-api-types/payloads/v6/auditLog.js
new file mode 100644
index 0000000..04b53a4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/auditLog.js
@@ -0,0 +1,58 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/audit-log
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AuditLogOptionsType = exports.AuditLogEvent = void 0;
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var AuditLogEvent;
+(function (AuditLogEvent) {
+ AuditLogEvent[AuditLogEvent["GUILD_UPDATE"] = 1] = "GUILD_UPDATE";
+ AuditLogEvent[AuditLogEvent["CHANNEL_CREATE"] = 10] = "CHANNEL_CREATE";
+ AuditLogEvent[AuditLogEvent["CHANNEL_UPDATE"] = 11] = "CHANNEL_UPDATE";
+ AuditLogEvent[AuditLogEvent["CHANNEL_DELETE"] = 12] = "CHANNEL_DELETE";
+ AuditLogEvent[AuditLogEvent["CHANNEL_OVERWRITE_CREATE"] = 13] = "CHANNEL_OVERWRITE_CREATE";
+ AuditLogEvent[AuditLogEvent["CHANNEL_OVERWRITE_UPDATE"] = 14] = "CHANNEL_OVERWRITE_UPDATE";
+ AuditLogEvent[AuditLogEvent["CHANNEL_OVERWRITE_DELETE"] = 15] = "CHANNEL_OVERWRITE_DELETE";
+ AuditLogEvent[AuditLogEvent["MEMBER_KICK"] = 20] = "MEMBER_KICK";
+ AuditLogEvent[AuditLogEvent["MEMBER_PRUNE"] = 21] = "MEMBER_PRUNE";
+ AuditLogEvent[AuditLogEvent["MEMBER_BAN_ADD"] = 22] = "MEMBER_BAN_ADD";
+ AuditLogEvent[AuditLogEvent["MEMBER_BAN_REMOVE"] = 23] = "MEMBER_BAN_REMOVE";
+ AuditLogEvent[AuditLogEvent["MEMBER_UPDATE"] = 24] = "MEMBER_UPDATE";
+ AuditLogEvent[AuditLogEvent["MEMBER_ROLE_UPDATE"] = 25] = "MEMBER_ROLE_UPDATE";
+ AuditLogEvent[AuditLogEvent["MEMBER_MOVE"] = 26] = "MEMBER_MOVE";
+ AuditLogEvent[AuditLogEvent["MEMBER_DISCONNECT"] = 27] = "MEMBER_DISCONNECT";
+ AuditLogEvent[AuditLogEvent["BOT_ADD"] = 28] = "BOT_ADD";
+ AuditLogEvent[AuditLogEvent["ROLE_CREATE"] = 30] = "ROLE_CREATE";
+ AuditLogEvent[AuditLogEvent["ROLE_UPDATE"] = 31] = "ROLE_UPDATE";
+ AuditLogEvent[AuditLogEvent["ROLE_DELETE"] = 32] = "ROLE_DELETE";
+ AuditLogEvent[AuditLogEvent["INVITE_CREATE"] = 40] = "INVITE_CREATE";
+ AuditLogEvent[AuditLogEvent["INVITE_UPDATE"] = 41] = "INVITE_UPDATE";
+ AuditLogEvent[AuditLogEvent["INVITE_DELETE"] = 42] = "INVITE_DELETE";
+ AuditLogEvent[AuditLogEvent["WEBHOOK_CREATE"] = 50] = "WEBHOOK_CREATE";
+ AuditLogEvent[AuditLogEvent["WEBHOOK_UPDATE"] = 51] = "WEBHOOK_UPDATE";
+ AuditLogEvent[AuditLogEvent["WEBHOOK_DELETE"] = 52] = "WEBHOOK_DELETE";
+ AuditLogEvent[AuditLogEvent["EMOJI_CREATE"] = 60] = "EMOJI_CREATE";
+ AuditLogEvent[AuditLogEvent["EMOJI_UPDATE"] = 61] = "EMOJI_UPDATE";
+ AuditLogEvent[AuditLogEvent["EMOJI_DELETE"] = 62] = "EMOJI_DELETE";
+ AuditLogEvent[AuditLogEvent["MESSAGE_DELETE"] = 72] = "MESSAGE_DELETE";
+ AuditLogEvent[AuditLogEvent["MESSAGE_BULK_DELETE"] = 73] = "MESSAGE_BULK_DELETE";
+ AuditLogEvent[AuditLogEvent["MESSAGE_PIN"] = 74] = "MESSAGE_PIN";
+ AuditLogEvent[AuditLogEvent["MESSAGE_UNPIN"] = 75] = "MESSAGE_UNPIN";
+ AuditLogEvent[AuditLogEvent["INTEGRATION_CREATE"] = 80] = "INTEGRATION_CREATE";
+ AuditLogEvent[AuditLogEvent["INTEGRATION_UPDATE"] = 81] = "INTEGRATION_UPDATE";
+ AuditLogEvent[AuditLogEvent["INTEGRATION_DELETE"] = 82] = "INTEGRATION_DELETE";
+})(AuditLogEvent = exports.AuditLogEvent || (exports.AuditLogEvent = {}));
+/**
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var AuditLogOptionsType;
+(function (AuditLogOptionsType) {
+ AuditLogOptionsType["Member"] = "member";
+ AuditLogOptionsType["Role"] = "role";
+})(AuditLogOptionsType = exports.AuditLogOptionsType || (exports.AuditLogOptionsType = {}));
+//# sourceMappingURL=auditLog.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/auditLog.js.map b/node_modules/discord-api-types/payloads/v6/auditLog.js.map
new file mode 100644
index 0000000..02d914b
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/auditLog.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"auditLog.js","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA0CH;;;;GAIG;AACH,IAAY,aA4CX;AA5CD,WAAY,aAAa;IACxB,iEAAgB,CAAA;IAEhB,sEAAmB,CAAA;IACnB,sEAAc,CAAA;IACd,sEAAc,CAAA;IACd,0FAAwB,CAAA;IACxB,0FAAwB,CAAA;IACxB,0FAAwB,CAAA;IAExB,gEAAgB,CAAA;IAChB,kEAAY,CAAA;IACZ,sEAAc,CAAA;IACd,4EAAiB,CAAA;IACjB,oEAAa,CAAA;IACb,8EAAkB,CAAA;IAClB,gEAAW,CAAA;IACX,4EAAiB,CAAA;IACjB,wDAAO,CAAA;IAEP,gEAAgB,CAAA;IAChB,gEAAW,CAAA;IACX,gEAAW,CAAA;IAEX,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IAEb,sEAAmB,CAAA;IACnB,sEAAc,CAAA;IACd,sEAAc,CAAA;IAEd,kEAAiB,CAAA;IACjB,kEAAY,CAAA;IACZ,kEAAY,CAAA;IAEZ,sEAAmB,CAAA;IACnB,gFAAmB,CAAA;IACnB,gEAAW,CAAA;IACX,oEAAa,CAAA;IAEb,8EAAuB,CAAA;IACvB,8EAAkB,CAAA;IAClB,8EAAkB,CAAA;AACnB,CAAC,EA5CW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QA4CxB;AAuED;;GAEG;AACH,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC9B,wCAAiB,CAAA;IACjB,oCAAa,CAAA;AACd,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/channel.d.ts b/node_modules/discord-api-types/payloads/v6/channel.d.ts
new file mode 100644
index 0000000..4f88956
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/channel.d.ts
@@ -0,0 +1,343 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/channel
+ */
+import type { APIPartialEmoji } from './emoji';
+import type { APIGuildMember } from './guild';
+import type { APIUser } from './user';
+/**
+ * Not documented, but partial only includes id, name, and type
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIPartialChannel {
+ id: string;
+ type: ChannelType;
+ name?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIChannel extends APIPartialChannel {
+ guild_id?: string;
+ position?: number;
+ permission_overwrites?: APIOverwrite[];
+ name?: string;
+ topic?: string | null;
+ nsfw?: boolean;
+ last_message_id?: string | null;
+ bitrate?: number;
+ user_limit?: number;
+ rate_limit_per_user?: number;
+ recipients?: APIUser[];
+ icon?: string | null;
+ owner_id?: string;
+ application_id?: string;
+ parent_id?: string | null;
+ last_pin_timestamp?: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object-channel-types
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum ChannelType {
+ GUILD_TEXT = 0,
+ DM = 1,
+ GUILD_VOICE = 2,
+ GROUP_DM = 3,
+ GUILD_CATEGORY = 4,
+ GUILD_NEWS = 5,
+ GUILD_STORE = 6
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIMessage {
+ id: string;
+ channel_id: string;
+ guild_id?: string;
+ author: APIUser;
+ member?: APIGuildMember;
+ content: string;
+ timestamp: string;
+ edited_timestamp: string | null;
+ tts: boolean;
+ mention_everyone: boolean;
+ mentions: (APIUser & {
+ member?: Omit<APIGuildMember, 'user'>;
+ })[];
+ mention_roles: string[];
+ mention_channels?: APIChannelMention[];
+ attachments: APIAttachment[];
+ embeds: APIEmbed[];
+ reactions?: APIReaction[];
+ nonce?: string | number;
+ pinned: boolean;
+ webhook_id?: string;
+ type: MessageType;
+ activity?: APIMessageActivity;
+ application?: APIMessageApplication;
+ message_reference?: APIMessageReference;
+ flags?: MessageFlags;
+ referenced_message?: APIMessage | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-types
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum MessageType {
+ DEFAULT = 0,
+ RECIPIENT_ADD = 1,
+ RECIPIENT_REMOVE = 2,
+ CALL = 3,
+ CHANNEL_NAME_CHANGE = 4,
+ CHANNEL_ICON_CHANGE = 5,
+ CHANNEL_PINNED_MESSAGE = 6,
+ GUILD_MEMBER_JOIN = 7,
+ USER_PREMIUM_GUILD_SUBSCRIPTION = 8,
+ USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1 = 9,
+ USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2 = 10,
+ USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3 = 11,
+ CHANNEL_FOLLOW_ADD = 12,
+ GUILD_DISCOVERY_DISQUALIFIED = 14,
+ GUILD_DISCOVERY_REQUALIFIED = 15,
+ GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING = 16,
+ GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING = 17
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIMessageActivity {
+ type: MessageActivityType;
+ party_id?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-application-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIMessageApplication {
+ id: string;
+ cover_image?: string;
+ description: string;
+ icon: string | null;
+ name: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-reference-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIMessageReference {
+ message_id?: string;
+ channel_id: string;
+ guild_id?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum MessageActivityType {
+ JOIN = 1,
+ SPECTATE = 2,
+ LISTEN = 3,
+ JOIN_REQUEST = 5
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-flags
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum MessageFlags {
+ CROSSPOSTED = 1,
+ IS_CROSSPOST = 2,
+ SUPPRESS_EMBEDS = 4,
+ SOURCE_MESSAGE_DELETED = 8,
+ URGENT = 16
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIReaction {
+ count: number;
+ me: boolean;
+ emoji: APIPartialEmoji;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIOverwrite {
+ id: string;
+ type: OverwriteType;
+ /**
+ * @deprecated Use `allow_new` instead
+ */
+ allow: number;
+ allow_new: string;
+ /**
+ * @deprecated Use `deny_new` instead
+ */
+ deny: number;
+ deny_new: string;
+}
+/**
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum OverwriteType {
+ Member = "member",
+ Role = "role"
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIEmbed {
+ title?: string;
+ /**
+ * @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
+ */
+ type?: EmbedType;
+ description?: string;
+ url?: string;
+ timestamp?: string;
+ color?: number;
+ footer?: APIEmbedFooter;
+ image?: APIEmbedImage;
+ thumbnail?: APIEmbedThumbnail;
+ video?: APIEmbedVideo;
+ provider?: APIEmbedProvider;
+ author?: APIEmbedAuthor;
+ fields?: APIEmbedField[];
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-types
+ *
+ * @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum EmbedType {
+ Rich = "rich",
+ Image = "image",
+ Video = "video",
+ GifV = "gifv",
+ Article = "article",
+ Link = "link"
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIEmbedThumbnail {
+ url?: string;
+ proxy_url?: string;
+ height?: number;
+ width?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIEmbedVideo {
+ url?: string;
+ height?: number;
+ width?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIEmbedImage {
+ url?: string;
+ proxy_url?: string;
+ height?: number;
+ width?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIEmbedProvider {
+ name?: string;
+ url?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIEmbedAuthor {
+ name?: string;
+ url?: string;
+ icon_url?: string;
+ proxy_icon_url?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIEmbedFooter {
+ text: string;
+ icon_url?: string;
+ proxy_icon_url?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIEmbedField {
+ name: string;
+ value: string;
+ inline?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIAttachment {
+ id: string;
+ filename: string;
+ size: number;
+ url: string;
+ proxy_url: string;
+ height: number | null;
+ width: number | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-mention-object-channel-mention-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIChannelMention {
+ id: string;
+ guild_id: string;
+ type: ChannelType;
+ name: string;
+}
+/**
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIFollowedChannel {
+ channel_id: string;
+ webhook_id: string;
+}
+//# sourceMappingURL=channel.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/channel.d.ts.map b/node_modules/discord-api-types/payloads/v6/channel.d.ts.map
new file mode 100644
index 0000000..e3ad901
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/channel.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,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,WAAW,gBAAgB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACnB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/channel.js b/node_modules/discord-api-types/payloads/v6/channel.js
new file mode 100644
index 0000000..e554777
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/channel.js
@@ -0,0 +1,95 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/channel
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.EmbedType = exports.OverwriteType = exports.MessageFlags = exports.MessageActivityType = exports.MessageType = exports.ChannelType = void 0;
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object-channel-types
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var ChannelType;
+(function (ChannelType) {
+ ChannelType[ChannelType["GUILD_TEXT"] = 0] = "GUILD_TEXT";
+ ChannelType[ChannelType["DM"] = 1] = "DM";
+ ChannelType[ChannelType["GUILD_VOICE"] = 2] = "GUILD_VOICE";
+ ChannelType[ChannelType["GROUP_DM"] = 3] = "GROUP_DM";
+ ChannelType[ChannelType["GUILD_CATEGORY"] = 4] = "GUILD_CATEGORY";
+ ChannelType[ChannelType["GUILD_NEWS"] = 5] = "GUILD_NEWS";
+ ChannelType[ChannelType["GUILD_STORE"] = 6] = "GUILD_STORE";
+})(ChannelType = exports.ChannelType || (exports.ChannelType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-types
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var MessageType;
+(function (MessageType) {
+ MessageType[MessageType["DEFAULT"] = 0] = "DEFAULT";
+ MessageType[MessageType["RECIPIENT_ADD"] = 1] = "RECIPIENT_ADD";
+ MessageType[MessageType["RECIPIENT_REMOVE"] = 2] = "RECIPIENT_REMOVE";
+ MessageType[MessageType["CALL"] = 3] = "CALL";
+ MessageType[MessageType["CHANNEL_NAME_CHANGE"] = 4] = "CHANNEL_NAME_CHANGE";
+ MessageType[MessageType["CHANNEL_ICON_CHANGE"] = 5] = "CHANNEL_ICON_CHANGE";
+ MessageType[MessageType["CHANNEL_PINNED_MESSAGE"] = 6] = "CHANNEL_PINNED_MESSAGE";
+ MessageType[MessageType["GUILD_MEMBER_JOIN"] = 7] = "GUILD_MEMBER_JOIN";
+ MessageType[MessageType["USER_PREMIUM_GUILD_SUBSCRIPTION"] = 8] = "USER_PREMIUM_GUILD_SUBSCRIPTION";
+ MessageType[MessageType["USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1"] = 9] = "USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1";
+ MessageType[MessageType["USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2"] = 10] = "USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2";
+ MessageType[MessageType["USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3"] = 11] = "USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3";
+ MessageType[MessageType["CHANNEL_FOLLOW_ADD"] = 12] = "CHANNEL_FOLLOW_ADD";
+ MessageType[MessageType["GUILD_DISCOVERY_DISQUALIFIED"] = 14] = "GUILD_DISCOVERY_DISQUALIFIED";
+ MessageType[MessageType["GUILD_DISCOVERY_REQUALIFIED"] = 15] = "GUILD_DISCOVERY_REQUALIFIED";
+ MessageType[MessageType["GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING"] = 16] = "GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING";
+ MessageType[MessageType["GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING"] = 17] = "GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING";
+})(MessageType = exports.MessageType || (exports.MessageType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var MessageActivityType;
+(function (MessageActivityType) {
+ MessageActivityType[MessageActivityType["JOIN"] = 1] = "JOIN";
+ MessageActivityType[MessageActivityType["SPECTATE"] = 2] = "SPECTATE";
+ MessageActivityType[MessageActivityType["LISTEN"] = 3] = "LISTEN";
+ MessageActivityType[MessageActivityType["JOIN_REQUEST"] = 5] = "JOIN_REQUEST";
+})(MessageActivityType = exports.MessageActivityType || (exports.MessageActivityType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-flags
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var MessageFlags;
+(function (MessageFlags) {
+ MessageFlags[MessageFlags["CROSSPOSTED"] = 1] = "CROSSPOSTED";
+ MessageFlags[MessageFlags["IS_CROSSPOST"] = 2] = "IS_CROSSPOST";
+ MessageFlags[MessageFlags["SUPPRESS_EMBEDS"] = 4] = "SUPPRESS_EMBEDS";
+ MessageFlags[MessageFlags["SOURCE_MESSAGE_DELETED"] = 8] = "SOURCE_MESSAGE_DELETED";
+ MessageFlags[MessageFlags["URGENT"] = 16] = "URGENT";
+})(MessageFlags = exports.MessageFlags || (exports.MessageFlags = {}));
+/**
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var OverwriteType;
+(function (OverwriteType) {
+ OverwriteType["Member"] = "member";
+ OverwriteType["Role"] = "role";
+})(OverwriteType = exports.OverwriteType || (exports.OverwriteType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-types
+ *
+ * @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var EmbedType;
+(function (EmbedType) {
+ EmbedType["Rich"] = "rich";
+ EmbedType["Image"] = "image";
+ EmbedType["Video"] = "video";
+ EmbedType["GifV"] = "gifv";
+ EmbedType["Article"] = "article";
+ EmbedType["Link"] = "link";
+})(EmbedType = exports.EmbedType || (exports.EmbedType = {}));
+//# sourceMappingURL=channel.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/channel.js.map b/node_modules/discord-api-types/payloads/v6/channel.js.map
new file mode 100644
index 0000000..45a117e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/channel.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.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C,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AA0BD;;;;;GAKG;AACH,IAAY,SAOX;AAPD,WAAY,SAAS;IACpB,0BAAa,CAAA;IACb,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,0BAAa,CAAA;IACb,gCAAmB,CAAA;IACnB,0BAAa,CAAA;AACd,CAAC,EAPW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAOpB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/emoji.d.ts b/node_modules/discord-api-types/payloads/v6/emoji.d.ts
new file mode 100644
index 0000000..fa2a4f9
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/emoji.d.ts
@@ -0,0 +1,27 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/emoji
+ */
+import type { APIUser } from './user';
+/**
+ * Not documented but mentioned
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIPartialEmoji {
+ id: string | null;
+ name: string | null;
+ animated?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIEmoji extends APIPartialEmoji {
+ roles?: string[];
+ user?: APIUser;
+ require_colons?: boolean;
+ managed?: boolean;
+ available?: boolean;
+}
+//# sourceMappingURL=emoji.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/emoji.d.ts.map b/node_modules/discord-api-types/payloads/v6/emoji.d.ts.map
new file mode 100644
index 0000000..3a68eee
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/emoji.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC/B,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,QAAS,SAAQ,eAAe;IAChD,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/emoji.js b/node_modules/discord-api-types/payloads/v6/emoji.js
new file mode 100644
index 0000000..a640b7e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/emoji.js
@@ -0,0 +1,6 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/emoji
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=emoji.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/emoji.js.map b/node_modules/discord-api-types/payloads/v6/emoji.js.map
new file mode 100644
index 0000000..9037967
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/emoji.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"emoji.js","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":";AAAA;;GAEG"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/gateway.d.ts b/node_modules/discord-api-types/payloads/v6/gateway.d.ts
new file mode 100644
index 0000000..e4d5225
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/gateway.d.ts
@@ -0,0 +1,149 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/gateway
+ */
+import type { APIEmoji } from './emoji';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/topics/gateway#get-gateway
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIGatewayInfo {
+ url: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#get-gateway-bot
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIGatewayBotInfo extends APIGatewayInfo {
+ shards: number;
+ session_start_limit: APIGatewaySessionStartLimit;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#session-start-limit-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIGatewaySessionStartLimit {
+ total: number;
+ remaining: number;
+ reset_after: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#presence-update-presence-update-event-fields
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayPresenceUpdate {
+ user: Partial<APIUser> & {
+ id: string;
+ };
+ roles?: string[];
+ game?: GatewayActivity | null;
+ guild_id?: string;
+ status?: PresenceUpdateStatus;
+ activities?: GatewayActivity[];
+ client_status?: GatewayPresenceClientStatus;
+ premium_since?: string | null;
+ nick?: string | null;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum PresenceUpdateStatus {
+ DoNotDisturb = "dnd",
+ Idle = "idle",
+ Invisible = "invisible",
+ Offline = "offline",
+ Online = "online"
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#client-status-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayPresenceClientStatus = Partial<Record<'desktop' | 'mobile' | 'web', PresenceUpdateStatus>>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayActivity {
+ name: string;
+ type: ActivityType;
+ url?: string | null;
+ created_at: number;
+ timestamps?: GatewayActivityTimestamps;
+ application_id?: string;
+ details?: string | null;
+ state?: string | null;
+ emoji?: GatewayActivityEmoji;
+ party?: GatewayActivityParty;
+ assets?: GatewayActivityAssets;
+ secrets?: GatewayActivitySecrets;
+ instance?: boolean;
+ flags?: ActivityFlags;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-types
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum ActivityType {
+ Game = 0,
+ Streaming = 1,
+ Listening = 2,
+ Custom = 4,
+ Competing = 5
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-timestamps
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayActivityTimestamps {
+ start?: number;
+ end?: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'name' | 'animated'>> & Pick<APIEmoji, 'id'>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-party
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayActivityParty {
+ id?: string;
+ size?: [currentSize: number, maxSize: number];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-assets
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayActivityAssets = Partial<Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-secrets
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GatewayActivitySecrets = Partial<Record<'join' | 'spectate' | 'match', string>>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum ActivityFlags {
+ INSTANCE = 1,
+ JOIN = 2,
+ SPECTATE = 4,
+ JOIN_REQUEST = 8,
+ SYNC = 16,
+ PLAY = 32
+}
+//# sourceMappingURL=gateway.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/gateway.d.ts.map b/node_modules/discord-api-types/payloads/v6/gateway.d.ts.map
new file mode 100644
index 0000000..15b309f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/gateway.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,2BAA2B,CAAC;CACjD;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG;QACxB,EAAE,EAAE,MAAM,CAAC;KACX,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;IAC/B,aAAa,CAAC,EAAE,2BAA2B,CAAC;IAC5C,aAAa,CAAC,EA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AI,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAEvG;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACpC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;CAC9C;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAC1C,MAAM,CAAC,aAAa,GAAG,YAAY,GAAG,aAAa,GAAG,YAAY,EAAE,MAAM,CAAC,CAC3E,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,UAAU,GAAG,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAE5F;;;;GAIG;AACH,oBAAY,aAAa;IACxB,QAAQ,IAAS;IACjB,IAAI,IAAS;IACb,QAAQ,IAAS;IACjB,YAAY,IAAS;IACrB,IAAI,KAAS;IACb,IAAI,KAAS;CACb"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/gateway.js b/node_modules/discord-api-types/payloads/v6/gateway.js
new file mode 100644
index 0000000..c73d03a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/gateway.js
@@ -0,0 +1,45 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/gateway
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ActivityFlags = exports.ActivityType = exports.PresenceUpdateStatus = void 0;
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+var PresenceUpdateStatus;
+(function (PresenceUpdateStatus) {
+ PresenceUpdateStatus["DoNotDisturb"] = "dnd";
+ PresenceUpdateStatus["Idle"] = "idle";
+ PresenceUpdateStatus["Invisible"] = "invisible";
+ PresenceUpdateStatus["Offline"] = "offline";
+ PresenceUpdateStatus["Online"] = "online";
+})(PresenceUpdateStatus = exports.PresenceUpdateStatus || (exports.PresenceUpdateStatus = {}));
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-types
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var ActivityType;
+(function (ActivityType) {
+ ActivityType[ActivityType["Game"] = 0] = "Game";
+ ActivityType[ActivityType["Streaming"] = 1] = "Streaming";
+ ActivityType[ActivityType["Listening"] = 2] = "Listening";
+ ActivityType[ActivityType["Custom"] = 4] = "Custom";
+ ActivityType[ActivityType["Competing"] = 5] = "Competing";
+})(ActivityType = exports.ActivityType || (exports.ActivityType = {}));
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var ActivityFlags;
+(function (ActivityFlags) {
+ ActivityFlags[ActivityFlags["INSTANCE"] = 1] = "INSTANCE";
+ ActivityFlags[ActivityFlags["JOIN"] = 2] = "JOIN";
+ ActivityFlags[ActivityFlags["SPECTATE"] = 4] = "SPECTATE";
+ ActivityFlags[ActivityFlags["JOIN_REQUEST"] = 8] = "JOIN_REQUEST";
+ ActivityFlags[ActivityFlags["SYNC"] = 16] = "SYNC";
+ ActivityFlags[ActivityFlags["PLAY"] = 32] = "PLAY";
+})(ActivityFlags = exports.ActivityFlags || (exports.ActivityFlags = {}));
+//# sourceMappingURL=gateway.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/gateway.js.map b/node_modules/discord-api-types/payloads/v6/gateway.js.map
new file mode 100644
index 0000000..bdc98e2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/gateway.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"gateway.js","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAsDH;;GAEG;AACH,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC/B,4CAAoB,CAAA;IACpB,qCAAa,CAAA;IACb,+CAAuB,CAAA;IACvB,2CAAmB,CAAA;IACnB,yCAAiB,CAAA;AAClB,CAAC,EANW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAM/B;AA+BD;;;;GAIG;AACH,IAAY,YAOX;AAPD,WAAY,YAAY;IACvB,+CAAI,CAAA;IACJ,yDAAS,CAAA;IACT,yDAAS,CAAA;IAET,mDAAU,CAAA;IACV,yDAAS,CAAA;AACV,CAAC,EAPW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAOvB;AA6CD;;;;GAIG;AACH,IAAY,aAOX;AAPD,WAAY,aAAa;IACxB,yDAAiB,CAAA;IACjB,iDAAa,CAAA;IACb,yDAAiB,CAAA;IACjB,iEAAqB,CAAA;IACrB,kDAAa,CAAA;IACb,kDAAa,CAAA;AACd,CAAC,EAPW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAOxB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/guild.d.ts b/node_modules/discord-api-types/payloads/v6/guild.d.ts
new file mode 100644
index 0000000..346f3b7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/guild.d.ts
@@ -0,0 +1,310 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/guild
+ */
+import type { APIChannel } from './channel';
+import type { APIEmoji } from './emoji';
+import type { GatewayPresenceUpdate } from './gateway';
+import type { APIRole } from './permissions';
+import type { APIUser } from './user';
+import type { GatewayVoiceState } from './voice';
+/**
+ * https://discord.com/developers/docs/resources/guild#unavailable-guild-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIUnavailableGuild {
+ id: string;
+ unavailable: boolean;
+}
+/**
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'>, Pick<APIGuild, 'welcome_screen'> {
+ name: string;
+ icon: string | null;
+ splash: string | null;
+ banner?: string | null;
+ description?: string | null;
+ features?: GuildFeature[];
+ verification_level?: GuildVerificationLevel;
+ vanity_url_code?: string | null;
+ unavailable?: boolean;
+}
+/**
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIGuild extends APIPartialGuild {
+ discovery_splash: string | null;
+ owner?: boolean;
+ owner_id: string;
+ /**
+ * @deprecated Use `permissions_new` instead
+ */
+ permissions?: number;
+ permissions_new?: string;
+ region: string;
+ afk_channel_id: string | null;
+ afk_timeout: number;
+ /**
+ * @deprecated Use `widget_enabled` instead
+ */
+ embed_enabled?: boolean;
+ /**
+ * @deprecated Use `widget_channel_id` instead
+ */
+ embed_channel_id?: string | null;
+ verification_level: GuildVerificationLevel;
+ default_message_notifications: GuildDefaultMessageNotifications;
+ explicit_content_filter: GuildExplicitContentFilter;
+ roles: APIRole[];
+ emojis: APIEmoji[];
+ features: GuildFeature[];
+ mfa_level: GuildMFALevel;
+ application_id: string | null;
+ widget_enabled?: boolean;
+ widget_channel_id?: string | null;
+ system_channel_id: string | null;
+ system_channel_flags: GuildSystemChannelFlags;
+ rules_channel_id: string | null;
+ joined_at?: string;
+ large?: boolean;
+ member_count?: number;
+ voice_states?: Omit<GatewayVoiceState, 'guild_id'>[];
+ members?: APIGuildMember[];
+ channels?: APIChannel[];
+ presences?: GatewayPresenceUpdate[];
+ max_presences?: number | null;
+ max_members?: number;
+ vanity_url_code: string | null;
+ description: string | null;
+ banner: string | null;
+ premium_tier: GuildPremiumTier;
+ premium_subscription_count?: number;
+ preferred_locale: string;
+ public_updates_channel_id: string | null;
+ max_video_channel_users?: number;
+ /**
+ * Returned by calling GET `/guilds/{guild.id}` with the query `with_counts` set to `true`
+ */
+ approximate_member_count?: number;
+ /**
+ * Returned by calling GET `/guilds/{guild.id}` with the query `with_counts` set to `true`
+ */
+ approximate_presence_count?: number;
+ welcome_screen?: APIGuildWelcomeScreen;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum GuildDefaultMessageNotifications {
+ ALL_MESSAGES = 0,
+ ONLY_MENTIONS = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum GuildExplicitContentFilter {
+ DISABLED = 0,
+ MEMBERS_WITHOUT_ROLES = 1,
+ ALL_MEMBERS = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum GuildMFALevel {
+ NONE = 0,
+ ELEVATED = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum GuildVerificationLevel {
+ NONE = 0,
+ LOW = 1,
+ MEDIUM = 2,
+ HIGH = 3,
+ VERY_HIGH = 4
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum GuildPremiumTier {
+ NONE = 0,
+ TIER_1 = 1,
+ TIER_2 = 2,
+ TIER_3 = 3
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum GuildSystemChannelFlags {
+ SUPPRESS_JOIN_NOTIFICATIONS = 1,
+ SUPPRESS_PREMIUM_SUBSCRIPTIONS = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum GuildFeature {
+ ANIMATED_ICON = "ANIMATED_ICON",
+ BANNER = "BANNER",
+ COMMERCE = "COMMERCE",
+ COMMUNITY = "COMMUNITY",
+ DISCOVERABLE = "DISCOVERABLE",
+ FEATURABLE = "FEATURABLE",
+ INVITE_SPLASH = "INVITE_SPLASH",
+ NEWS = "NEWS",
+ PARTNERED = "PARTNERED",
+ RELAY_ENABLED = "RELAY_ENABLED",
+ VANITY_URL = "VANITY_URL",
+ VERIFIED = "VERIFIED",
+ VIP_REGIONS = "VIP_REGIONS",
+ WELCOME_SCREEN_ENABLED = "WELCOME_SCREEN_ENABLED"
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-preview-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIGuildPreview {
+ id: string;
+ name: string;
+ icon: string | null;
+ splash: string | null;
+ discovery_splash: string | null;
+ emojis: APIEmoji[];
+ features: GuildFeature[];
+ approximate_member_count: number;
+ approximate_presence_count: number;
+}
+/**
+ * @deprecated Use `APIGuildWidgetSettings` instead
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIGuildWidget = APIGuildWidgetSettings;
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-widget-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIGuildWidgetSettings {
+ enabled: boolean;
+ channel_id: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-member-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIGuildMember {
+ user?: APIUser;
+ nick: string | null;
+ roles: string[];
+ joined_at: string;
+ premium_since?: string | null;
+ deaf: boolean;
+ mute: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIGuildIntegration {
+ id: string;
+ name: string;
+ type: string;
+ enabled: boolean;
+ syncing: boolean;
+ role_id: string;
+ enable_emoticons?: boolean;
+ expire_behavior: IntegrationExpireBehavior;
+ expire_grace_period: number;
+ user?: APIUser;
+ account: APIIntegrationAccount;
+ synced_at: string;
+ subscriber_count: number;
+ revoked: boolean;
+ application?: APIGuildIntegrationApplication;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum IntegrationExpireBehavior {
+ RemoveRole = 0,
+ Kick = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-account-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIIntegrationAccount {
+ id: string;
+ name: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-application-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIGuildIntegrationApplication {
+ id: string;
+ name: string;
+ icon: string | null;
+ description: string;
+ summary: string;
+ bot?: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#ban-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIBan {
+ reason: string | null;
+ user: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum GuildWidgetStyle {
+ Banner1 = "banner1",
+ Banner2 = "banner2",
+ Banner3 = "banner3",
+ Banner4 = "banner4",
+ Shield = "shield"
+}
+/**
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIGuildWelcomeScreen {
+ description: string | null;
+ welcome_channels: APIGuildWelcomeScreenChannel[];
+}
+/**
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIGuildWelcomeScreenChannel {
+ channel_id: string;
+ emoji_id: string | null;
+ emoji_name: string | null;
+}
+//# sourceMappingURL=guild.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/guild.d.ts.map b/node_modules/discord-api-types/payloads/v6/guild.d.ts.map
new file mode 100644
index 0000000..9f82b1e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/guild.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"guild.d.ts","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,mBAAmB,EAAE,aAAa,CAAC,EAAE,IAAI,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IAClH,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;IAC5C,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WA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,WAAW,4BAA4B;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/guild.js b/node_modules/discord-api-types/payloads/v6/guild.js
new file mode 100644
index 0000000..965636d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/guild.js
@@ -0,0 +1,118 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/guild
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.GuildWidgetStyle = exports.IntegrationExpireBehavior = exports.GuildFeature = exports.GuildSystemChannelFlags = exports.GuildPremiumTier = exports.GuildVerificationLevel = exports.GuildMFALevel = exports.GuildExplicitContentFilter = exports.GuildDefaultMessageNotifications = void 0;
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var GuildDefaultMessageNotifications;
+(function (GuildDefaultMessageNotifications) {
+ GuildDefaultMessageNotifications[GuildDefaultMessageNotifications["ALL_MESSAGES"] = 0] = "ALL_MESSAGES";
+ GuildDefaultMessageNotifications[GuildDefaultMessageNotifications["ONLY_MENTIONS"] = 1] = "ONLY_MENTIONS";
+})(GuildDefaultMessageNotifications = exports.GuildDefaultMessageNotifications || (exports.GuildDefaultMessageNotifications = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var GuildExplicitContentFilter;
+(function (GuildExplicitContentFilter) {
+ GuildExplicitContentFilter[GuildExplicitContentFilter["DISABLED"] = 0] = "DISABLED";
+ GuildExplicitContentFilter[GuildExplicitContentFilter["MEMBERS_WITHOUT_ROLES"] = 1] = "MEMBERS_WITHOUT_ROLES";
+ GuildExplicitContentFilter[GuildExplicitContentFilter["ALL_MEMBERS"] = 2] = "ALL_MEMBERS";
+})(GuildExplicitContentFilter = exports.GuildExplicitContentFilter || (exports.GuildExplicitContentFilter = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var GuildMFALevel;
+(function (GuildMFALevel) {
+ GuildMFALevel[GuildMFALevel["NONE"] = 0] = "NONE";
+ GuildMFALevel[GuildMFALevel["ELEVATED"] = 1] = "ELEVATED";
+})(GuildMFALevel = exports.GuildMFALevel || (exports.GuildMFALevel = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var GuildVerificationLevel;
+(function (GuildVerificationLevel) {
+ GuildVerificationLevel[GuildVerificationLevel["NONE"] = 0] = "NONE";
+ GuildVerificationLevel[GuildVerificationLevel["LOW"] = 1] = "LOW";
+ GuildVerificationLevel[GuildVerificationLevel["MEDIUM"] = 2] = "MEDIUM";
+ GuildVerificationLevel[GuildVerificationLevel["HIGH"] = 3] = "HIGH";
+ GuildVerificationLevel[GuildVerificationLevel["VERY_HIGH"] = 4] = "VERY_HIGH";
+})(GuildVerificationLevel = exports.GuildVerificationLevel || (exports.GuildVerificationLevel = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var GuildPremiumTier;
+(function (GuildPremiumTier) {
+ GuildPremiumTier[GuildPremiumTier["NONE"] = 0] = "NONE";
+ GuildPremiumTier[GuildPremiumTier["TIER_1"] = 1] = "TIER_1";
+ GuildPremiumTier[GuildPremiumTier["TIER_2"] = 2] = "TIER_2";
+ GuildPremiumTier[GuildPremiumTier["TIER_3"] = 3] = "TIER_3";
+})(GuildPremiumTier = exports.GuildPremiumTier || (exports.GuildPremiumTier = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var GuildSystemChannelFlags;
+(function (GuildSystemChannelFlags) {
+ GuildSystemChannelFlags[GuildSystemChannelFlags["SUPPRESS_JOIN_NOTIFICATIONS"] = 1] = "SUPPRESS_JOIN_NOTIFICATIONS";
+ GuildSystemChannelFlags[GuildSystemChannelFlags["SUPPRESS_PREMIUM_SUBSCRIPTIONS"] = 2] = "SUPPRESS_PREMIUM_SUBSCRIPTIONS";
+})(GuildSystemChannelFlags = exports.GuildSystemChannelFlags || (exports.GuildSystemChannelFlags = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var GuildFeature;
+(function (GuildFeature) {
+ GuildFeature["ANIMATED_ICON"] = "ANIMATED_ICON";
+ GuildFeature["BANNER"] = "BANNER";
+ GuildFeature["COMMERCE"] = "COMMERCE";
+ GuildFeature["COMMUNITY"] = "COMMUNITY";
+ GuildFeature["DISCOVERABLE"] = "DISCOVERABLE";
+ GuildFeature["FEATURABLE"] = "FEATURABLE";
+ GuildFeature["INVITE_SPLASH"] = "INVITE_SPLASH";
+ GuildFeature["NEWS"] = "NEWS";
+ GuildFeature["PARTNERED"] = "PARTNERED";
+ GuildFeature["RELAY_ENABLED"] = "RELAY_ENABLED";
+ GuildFeature["VANITY_URL"] = "VANITY_URL";
+ GuildFeature["VERIFIED"] = "VERIFIED";
+ GuildFeature["VIP_REGIONS"] = "VIP_REGIONS";
+ GuildFeature["WELCOME_SCREEN_ENABLED"] = "WELCOME_SCREEN_ENABLED";
+})(GuildFeature = exports.GuildFeature || (exports.GuildFeature = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var IntegrationExpireBehavior;
+(function (IntegrationExpireBehavior) {
+ IntegrationExpireBehavior[IntegrationExpireBehavior["RemoveRole"] = 0] = "RemoveRole";
+ IntegrationExpireBehavior[IntegrationExpireBehavior["Kick"] = 1] = "Kick";
+})(IntegrationExpireBehavior = exports.IntegrationExpireBehavior || (exports.IntegrationExpireBehavior = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var GuildWidgetStyle;
+(function (GuildWidgetStyle) {
+ GuildWidgetStyle["Banner1"] = "banner1";
+ GuildWidgetStyle["Banner2"] = "banner2";
+ GuildWidgetStyle["Banner3"] = "banner3";
+ GuildWidgetStyle["Banner4"] = "banner4";
+ GuildWidgetStyle["Shield"] = "shield";
+})(GuildWidgetStyle = exports.GuildWidgetStyle || (exports.GuildWidgetStyle = {}));
+//# sourceMappingURL=guild.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/guild.js.map b/node_modules/discord-api-types/payloads/v6/guild.js.map
new file mode 100644
index 0000000..dc2a074
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/guild.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"guild.js","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAkGH;;;;GAIG;AACH,IAAY,gCAGX;AAHD,WAAY,gCAAgC;IAC3C,uGAAY,CAAA;IACZ,yGAAa,CAAA;AACd,CAAC,EAHW,gCAAgC,GAAhC,wCAAgC,KAAhC,wCAAgC,QAG3C;AAED;;;;GAIG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,mFAAQ,CAAA;IACR,6GAAqB,CAAA;IACrB,yFAAW,CAAA;AACZ,CAAC,EAJW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAIrC;AAED;;;;GAIG;AACH,IAAY,aAGX;AAHD,WAAY,aAAa;I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,gBAMX;AAND,WAAY,gBAAgB;IAC3B,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;AAClB,CAAC,EANW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAM3B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/index.d.ts b/node_modules/discord-api-types/payloads/v6/index.d.ts
new file mode 100644
index 0000000..08e9f26
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/index.d.ts
@@ -0,0 +1,13 @@
+export * from './auditLog';
+export * from './channel';
+export * from './emoji';
+export * from './gateway';
+export * from './guild';
+export * from './invite';
+export * from './oauth2';
+export * from './permissions';
+export * from './teams';
+export * from './user';
+export * from './voice';
+export * from './webhook';
+//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/index.d.ts.map b/node_modules/discord-api-types/payloads/v6/index.d.ts.map
new file mode 100644
index 0000000..d62ba8e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/index.js b/node_modules/discord-api-types/payloads/v6/index.js
new file mode 100644
index 0000000..5e375e7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/index.js
@@ -0,0 +1,29 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./auditLog"), exports);
+__exportStar(require("./channel"), exports);
+__exportStar(require("./emoji"), exports);
+__exportStar(require("./gateway"), exports);
+__exportStar(require("./guild"), exports);
+__exportStar(require("./invite"), exports);
+__exportStar(require("./oauth2"), exports);
+__exportStar(require("./permissions"), exports);
+__exportStar(require("./teams"), exports);
+__exportStar(require("./user"), exports);
+__exportStar(require("./voice"), exports);
+__exportStar(require("./webhook"), exports);
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/index.js.map b/node_modules/discord-api-types/payloads/v6/index.js.map
new file mode 100644
index 0000000..6b7124c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,0CAAwB;AACxB,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,gDAA8B;AAC9B,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/index.mjs b/node_modules/discord-api-types/payloads/v6/index.mjs
new file mode 100644
index 0000000..86a4939
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/index.mjs
@@ -0,0 +1,30 @@
+import mod from "./index.js";
+
+export default mod;
+export const ActivityFlags = mod.ActivityFlags;
+export const ActivityType = mod.ActivityType;
+export const AuditLogEvent = mod.AuditLogEvent;
+export const AuditLogOptionsType = mod.AuditLogOptionsType;
+export const ChannelType = mod.ChannelType;
+export const ConnectionVisibility = mod.ConnectionVisibility;
+export const EmbedType = mod.EmbedType;
+export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications;
+export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter;
+export const GuildFeature = mod.GuildFeature;
+export const GuildMFALevel = mod.GuildMFALevel;
+export const GuildPremiumTier = mod.GuildPremiumTier;
+export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags;
+export const GuildVerificationLevel = mod.GuildVerificationLevel;
+export const GuildWidgetStyle = mod.GuildWidgetStyle;
+export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior;
+export const InviteTargetUserType = mod.InviteTargetUserType;
+export const MessageActivityType = mod.MessageActivityType;
+export const MessageFlags = mod.MessageFlags;
+export const MessageType = mod.MessageType;
+export const OverwriteType = mod.OverwriteType;
+export const PermissionFlagsBits = mod.PermissionFlagsBits;
+export const PresenceUpdateStatus = mod.PresenceUpdateStatus;
+export const TeamMemberMembershipState = mod.TeamMemberMembershipState;
+export const UserFlags = mod.UserFlags;
+export const UserPremiumType = mod.UserPremiumType;
+export const WebhookType = mod.WebhookType;
diff --git a/node_modules/discord-api-types/payloads/v6/invite.d.ts b/node_modules/discord-api-types/payloads/v6/invite.d.ts
new file mode 100644
index 0000000..00946f0
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/invite.d.ts
@@ -0,0 +1,42 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/invite
+ */
+import type { APIPartialChannel } from './channel';
+import type { APIPartialGuild } from './guild';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIInvite {
+ code: string;
+ guild?: APIPartialGuild;
+ channel?: Required<APIPartialChannel>;
+ inviter?: APIUser;
+ target_user?: APIUser;
+ target_user_type?: InviteTargetUserType;
+ approximate_presence_count?: number;
+ approximate_member_count?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum InviteTargetUserType {
+ STREAM = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-metadata-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIExtendedInvite extends APIInvite {
+ uses: number;
+ max_uses: number;
+ max_age: number;
+ temporary: boolean;
+ created_at: string;
+}
+//# sourceMappingURL=invite.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/invite.d.ts.map b/node_modules/discord-api-types/payloads/v6/invite.d.ts.map
new file mode 100644
index 0000000..97cc7af
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/invite.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,OAAO,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;IACxC,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,wBAAwB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED;;;;GAIG;AACH,oBAAY,oBAAoB;IAC/B,MAAM,IAAI;CACV;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACnB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/invite.js b/node_modules/discord-api-types/payloads/v6/invite.js
new file mode 100644
index 0000000..1eea1a2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/invite.js
@@ -0,0 +1,16 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/invite
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.InviteTargetUserType = void 0;
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var InviteTargetUserType;
+(function (InviteTargetUserType) {
+ InviteTargetUserType[InviteTargetUserType["STREAM"] = 1] = "STREAM";
+})(InviteTargetUserType = exports.InviteTargetUserType || (exports.InviteTargetUserType = {}));
+//# sourceMappingURL=invite.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/invite.js.map b/node_modules/discord-api-types/payloads/v6/invite.js.map
new file mode 100644
index 0000000..7b2b092
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/invite.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"invite.js","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAsBH;;;;GAIG;AACH,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC/B,mEAAU,CAAA;AACX,CAAC,EAFW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAE/B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/oauth2.d.ts b/node_modules/discord-api-types/payloads/v6/oauth2.d.ts
new file mode 100644
index 0000000..b2fed63
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/oauth2.d.ts
@@ -0,0 +1,28 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/oauth2
+ */
+import type { APITeam } from './teams';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/topics/oauth2#get-current-application-information-response-structure
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIApplication {
+ id: string;
+ name: string;
+ icon: string | null;
+ description: string;
+ rpc_origins?: string[];
+ bot_public: boolean;
+ bot_require_code_grant: boolean;
+ owner: APIUser;
+ summary: string;
+ verify_key: string;
+ team: APITeam | null;
+ guild_id?: string;
+ primary_sku_id?: string;
+ slug?: string;
+ cover_image?: string;
+}
+//# sourceMappingURL=oauth2.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/oauth2.d.ts.map b/node_modules/discord-api-types/payloads/v6/oauth2.d.ts.map
new file mode 100644
index 0000000..219638c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/oauth2.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,sBAAsB,EAAE,OAAO,CAAC;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/oauth2.js b/node_modules/discord-api-types/payloads/v6/oauth2.js
new file mode 100644
index 0000000..eb23d3c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/oauth2.js
@@ -0,0 +1,6 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/oauth2
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=oauth2.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/oauth2.js.map b/node_modules/discord-api-types/payloads/v6/oauth2.js.map
new file mode 100644
index 0000000..c4b14f4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/oauth2.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"oauth2.js","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":";AAAA;;GAEG"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/permissions.d.ts b/node_modules/discord-api-types/payloads/v6/permissions.d.ts
new file mode 100644
index 0000000..91e7a50
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/permissions.d.ts
@@ -0,0 +1,75 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/permissions
+ */
+/**
+ * https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
+ *
+ * These flags are exported as `BigInt`s and NOT numbers. For most of them, you can
+ * convert them in a number by wrapping it in `Number()`, however be careful as any
+ * further bits added may cause issues if done so. Try to use BigInts as much as possible
+ * or modules that can replicate them in some way.
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare const PermissionFlagsBits: {
+ readonly CREATE_INSTANT_INVITE: 1n;
+ readonly KICK_MEMBERS: 2n;
+ readonly BAN_MEMBERS: 4n;
+ readonly ADMINISTRATOR: 8n;
+ readonly MANAGE_CHANNELS: 16n;
+ readonly MANAGE_GUILD: 32n;
+ readonly ADD_REACTIONS: 64n;
+ readonly VIEW_AUDIT_LOG: 128n;
+ readonly PRIORITY_SPEAKER: 256n;
+ readonly STREAM: 512n;
+ readonly VIEW_CHANNEL: 1024n;
+ readonly SEND_MESSAGES: 2048n;
+ readonly SEND_TTS_MESSAGES: 4096n;
+ readonly MANAGE_MESSAGES: 8192n;
+ readonly EMBED_LINKS: 16384n;
+ readonly ATTACH_FILES: 32768n;
+ readonly READ_MESSAGE_HISTORY: 65536n;
+ readonly MENTION_EVERYONE: 131072n;
+ readonly USE_EXTERNAL_EMOJIS: 262144n;
+ readonly VIEW_GUILD_INSIGHTS: 524288n;
+ readonly CONNECT: 1048576n;
+ readonly SPEAK: 2097152n;
+ readonly MUTE_MEMBERS: 4194304n;
+ readonly DEAFEN_MEMBERS: 8388608n;
+ readonly MOVE_MEMBERS: 16777216n;
+ readonly USE_VAD: 33554432n;
+ readonly CHANGE_NICKNAME: 67108864n;
+ readonly MANAGE_NICKNAMES: 134217728n;
+ readonly MANAGE_ROLES: 268435456n;
+ readonly MANAGE_WEBHOOKS: 536870912n;
+ readonly MANAGE_EMOJIS: 1073741824n;
+};
+/**
+ * https://discord.com/developers/docs/topics/permissions#role-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIRole {
+ id: string;
+ name: string;
+ color: number;
+ hoist: boolean;
+ position: number;
+ /**
+ * @deprecated Use `permissions_new` instead
+ */
+ permissions: number;
+ permissions_new: string;
+ managed: boolean;
+ mentionable: boolean;
+ tags?: APIRoleTags;
+}
+/**
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIRoleTags {
+ bot_id?: string;
+ premium_subscriber?: null;
+ integration_id?: string;
+}
+//# sourceMappingURL=permissions.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/permissions.d.ts.map b/node_modules/discord-api-types/payloads/v6/permissions.d.ts.map
new file mode 100644
index 0000000..26f300d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/permissions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCtB,CAAC;AASX;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,WAAW,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/permissions.js b/node_modules/discord-api-types/payloads/v6/permissions.js
new file mode 100644
index 0000000..8dd83fa
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/permissions.js
@@ -0,0 +1,56 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/permissions
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.PermissionFlagsBits = void 0;
+/**
+ * https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
+ *
+ * These flags are exported as `BigInt`s and NOT numbers. For most of them, you can
+ * convert them in a number by wrapping it in `Number()`, however be careful as any
+ * further bits added may cause issues if done so. Try to use BigInts as much as possible
+ * or modules that can replicate them in some way.
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+exports.PermissionFlagsBits = {
+ CREATE_INSTANT_INVITE: 1n,
+ KICK_MEMBERS: 2n,
+ BAN_MEMBERS: 4n,
+ ADMINISTRATOR: 8n,
+ MANAGE_CHANNELS: 16n,
+ MANAGE_GUILD: 32n,
+ ADD_REACTIONS: 64n,
+ VIEW_AUDIT_LOG: 128n,
+ PRIORITY_SPEAKER: 256n,
+ STREAM: 512n,
+ VIEW_CHANNEL: 1024n,
+ SEND_MESSAGES: 2048n,
+ SEND_TTS_MESSAGES: 4096n,
+ MANAGE_MESSAGES: 8192n,
+ EMBED_LINKS: 16384n,
+ ATTACH_FILES: 32768n,
+ READ_MESSAGE_HISTORY: 65536n,
+ MENTION_EVERYONE: 131072n,
+ USE_EXTERNAL_EMOJIS: 262144n,
+ VIEW_GUILD_INSIGHTS: 524288n,
+ CONNECT: 1048576n,
+ SPEAK: 2097152n,
+ MUTE_MEMBERS: 4194304n,
+ DEAFEN_MEMBERS: 8388608n,
+ MOVE_MEMBERS: 16777216n,
+ USE_VAD: 33554432n,
+ CHANGE_NICKNAME: 67108864n,
+ MANAGE_NICKNAMES: 134217728n,
+ MANAGE_ROLES: 268435456n,
+ MANAGE_WEBHOOKS: 536870912n,
+ MANAGE_EMOJIS: 1073741824n,
+};
+/**
+ * Freeze the object of bits, preventing any modifications to it.
+ *
+ * @internal
+ */
+Object.freeze(exports.PermissionFlagsBits);
+//# sourceMappingURL=permissions.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/permissions.js.map b/node_modules/discord-api-types/payloads/v6/permissions.js.map
new file mode 100644
index 0000000..18623f3
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/permissions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"permissions.js","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH;;;;;;;;;GASG;AACU,QAAA,mBAAmB,GAAG;IAClC,qBAAqB,EAAE,EAAE;IACzB,YAAY,EAAE,EAAE;IAChB,WAAW,EAAE,EAAE;IACf,aAAa,EAAE,EAAE;IACjB,eAAe,EAAE,GAAG;IACpB,YAAY,EAAE,GAAG;IACjB,aAAa,EAAE,GAAG;IAClB,cAAc,EAAE,IAAI;IACpB,gBAAgB,EAAE,IAAI;IACtB,MAAM,EAAE,IAAI;IACZ,YAAY,EAAE,KAAM;IACpB,aAAa,EAAE,KAAM;IACrB,iBAAiB,EAAE,KAAM;IACzB,eAAe,EAAE,KAAM;IACvB,WAAW,EAAE,MAAO;IACpB,YAAY,EAAE,MAAO;IACrB,oBAAoB,EAAE,MAAO;IAC7B,gBAAgB,EAAE,OAAQ;IAC1B,mBAAmB,EAAE,OAAQ;IAC7B,mBAAmB,EAAE,OAAQ;IAC7B,OAAO,EAAE,QAAU;IACnB,KAAK,EAAE,QAAU;IACjB,YAAY,EAAE,QAAU;IACxB,cAAc,EAAE,QAAU;IAC1B,YAAY,EAAE,SAAW;IACzB,OAAO,EAAE,SAAW;IACpB,eAAe,EAAE,SAAW;IAC5B,gBAAgB,EAAE,UAAY;IAC9B,YAAY,EAAE,UAAY;IAC1B,eAAe,EAAE,UAAY;IAC7B,aAAa,EAAE,WAAc;CACpB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,CAAC,2BAAmB,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/teams.d.ts b/node_modules/discord-api-types/payloads/v6/teams.d.ts
new file mode 100644
index 0000000..2bd7405
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/teams.d.ts
@@ -0,0 +1,36 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/teams
+ */
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/topics/teams#data-models-team-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APITeam {
+ id: string;
+ icon: string | null;
+ members: APITeamMember[];
+ owner_user_id: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/teams#data-models-team-members-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APITeamMember {
+ membership_state: TeamMemberMembershipState;
+ permissions: string[];
+ team_id: string;
+ user: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum TeamMemberMembershipState {
+ INVITED = 1,
+ ACCEPTED = 2
+}
+//# sourceMappingURL=teams.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/teams.d.ts.map b/node_modules/discord-api-types/payloads/v6/teams.d.ts.map
new file mode 100644
index 0000000..6f29fe7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/teams.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["teams.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC7B,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;CACd;AAED;;;;GAIG;AACH,oBAAY,yBAAyB;IACpC,OAAO,IAAI;IACX,QAAQ,IAAA;CACR"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/teams.js b/node_modules/discord-api-types/payloads/v6/teams.js
new file mode 100644
index 0000000..377033d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/teams.js
@@ -0,0 +1,17 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/teams
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.TeamMemberMembershipState = void 0;
+/**
+ * https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var TeamMemberMembershipState;
+(function (TeamMemberMembershipState) {
+ TeamMemberMembershipState[TeamMemberMembershipState["INVITED"] = 1] = "INVITED";
+ TeamMemberMembershipState[TeamMemberMembershipState["ACCEPTED"] = 2] = "ACCEPTED";
+})(TeamMemberMembershipState = exports.TeamMemberMembershipState || (exports.TeamMemberMembershipState = {}));
+//# sourceMappingURL=teams.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/teams.js.map b/node_modules/discord-api-types/payloads/v6/teams.js.map
new file mode 100644
index 0000000..1ff27a9
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/teams.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"teams.js","sourceRoot":"","sources":["teams.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA4BH;;;;GAIG;AACH,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACpC,+EAAW,CAAA;IACX,iFAAQ,CAAA;AACT,CAAC,EAHW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAGpC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/user.d.ts b/node_modules/discord-api-types/payloads/v6/user.d.ts
new file mode 100644
index 0000000..c04540a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/user.d.ts
@@ -0,0 +1,79 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/user
+ */
+import type { APIGuildIntegration } from './guild';
+/**
+ * https://discord.com/developers/docs/resources/user#user-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIUser {
+ id: string;
+ username: string;
+ discriminator: string;
+ avatar: string | null;
+ bot?: boolean;
+ system?: boolean;
+ mfa_enabled?: boolean;
+ locale?: string;
+ verified?: boolean;
+ email?: string | null;
+ flags?: UserFlags;
+ premium_type?: UserPremiumType;
+ public_flags?: UserFlags;
+}
+/**
+ * https://discord.com/developers/docs/resources/user#user-object-user-flags
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum UserFlags {
+ None = 0,
+ DiscordEmployee = 1,
+ PartneredServerOwner = 2,
+ DiscordHypeSquadEvents = 4,
+ BugHunterLevel1 = 8,
+ HypeSquadHouseBravery = 64,
+ HypeSquadHouseBrilliance = 128,
+ HypeSquadHouseBalance = 256,
+ EarlySupporter = 512,
+ TeamUser = 1024,
+ System = 4096,
+ BugHunterLevel2 = 16384,
+ VerifiedBot = 65536,
+ EarlyVerifiedBotDeveloper = 131072
+}
+/**
+ * https://discord.com/developers/docs/resources/user#user-object-premium-types
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum UserPremiumType {
+ None = 0,
+ NitroClassic = 1,
+ Nitro = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/user#connection-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIConnection {
+ id: string;
+ name: string;
+ type: string;
+ revoked?: boolean;
+ integrations?: Partial<APIGuildIntegration>[];
+ verified: boolean;
+ friend_sync: boolean;
+ show_activity: boolean;
+ visibility: ConnectionVisibility;
+}
+/**
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum ConnectionVisibility {
+ None = 0,
+ Everyone = 1
+}
+//# sourceMappingURL=user.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/user.d.ts.map b/node_modules/discord-api-types/payloads/v6/user.d.ts.map
new file mode 100644
index 0000000..ea72c16
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/user.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,YAAY,CAAC,EAAE,SAAS,CAAC;CACzB;AAED;;;;GAIG;AACH,oBAAY,SAAS;IACpB,IAAI,IAAI;IACR,eAAe,IAAS;IACxB,oBAAoB,IAAS;IAC7B,sBAAsB,IAAS;IAC/B,eAAe,IAAS;IACxB,qBAAqB,KAAS;IAC9B,wBAAwB,MAAS;IACjC,qBAAqB,MAAS;IAC9B,cAAc,MAAS;IACvB,QAAQ,OAAU;IAClB,MAAM,OAAU;IAChB,eAAe,QAAU;IACzB,WAAW,QAAU;IACrB,yBAAyB,SAAU;CACnC;AAED;;;;GAIG;AACH,oBAAY,eAAe;IAC1B,IAAI,IAAA;IACJ,YAAY,IAAA;IACZ,KAAK,IAAA;CACL;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,EAAE,CAAC;IAC9C,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,oBAAoB,CAAC;CACjC;AAED;;GAEG;AACH,oBAAY,oBAAoB;IAC/B,IAAI,IAAA;IACJ,QAAQ,IAAA;CACR"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/user.js b/node_modules/discord-api-types/payloads/v6/user.js
new file mode 100644
index 0000000..e099f2f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/user.js
@@ -0,0 +1,48 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/user
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ConnectionVisibility = exports.UserPremiumType = exports.UserFlags = void 0;
+/**
+ * https://discord.com/developers/docs/resources/user#user-object-user-flags
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var UserFlags;
+(function (UserFlags) {
+ UserFlags[UserFlags["None"] = 0] = "None";
+ UserFlags[UserFlags["DiscordEmployee"] = 1] = "DiscordEmployee";
+ UserFlags[UserFlags["PartneredServerOwner"] = 2] = "PartneredServerOwner";
+ UserFlags[UserFlags["DiscordHypeSquadEvents"] = 4] = "DiscordHypeSquadEvents";
+ UserFlags[UserFlags["BugHunterLevel1"] = 8] = "BugHunterLevel1";
+ UserFlags[UserFlags["HypeSquadHouseBravery"] = 64] = "HypeSquadHouseBravery";
+ UserFlags[UserFlags["HypeSquadHouseBrilliance"] = 128] = "HypeSquadHouseBrilliance";
+ UserFlags[UserFlags["HypeSquadHouseBalance"] = 256] = "HypeSquadHouseBalance";
+ UserFlags[UserFlags["EarlySupporter"] = 512] = "EarlySupporter";
+ UserFlags[UserFlags["TeamUser"] = 1024] = "TeamUser";
+ UserFlags[UserFlags["System"] = 4096] = "System";
+ UserFlags[UserFlags["BugHunterLevel2"] = 16384] = "BugHunterLevel2";
+ UserFlags[UserFlags["VerifiedBot"] = 65536] = "VerifiedBot";
+ UserFlags[UserFlags["EarlyVerifiedBotDeveloper"] = 131072] = "EarlyVerifiedBotDeveloper";
+})(UserFlags = exports.UserFlags || (exports.UserFlags = {}));
+/**
+ * https://discord.com/developers/docs/resources/user#user-object-premium-types
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var UserPremiumType;
+(function (UserPremiumType) {
+ UserPremiumType[UserPremiumType["None"] = 0] = "None";
+ UserPremiumType[UserPremiumType["NitroClassic"] = 1] = "NitroClassic";
+ UserPremiumType[UserPremiumType["Nitro"] = 2] = "Nitro";
+})(UserPremiumType = exports.UserPremiumType || (exports.UserPremiumType = {}));
+/**
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var ConnectionVisibility;
+(function (ConnectionVisibility) {
+ ConnectionVisibility[ConnectionVisibility["None"] = 0] = "None";
+ ConnectionVisibility[ConnectionVisibility["Everyone"] = 1] = "Everyone";
+})(ConnectionVisibility = exports.ConnectionVisibility || (exports.ConnectionVisibility = {}));
+//# sourceMappingURL=user.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/user.js.map b/node_modules/discord-api-types/payloads/v6/user.js.map
new file mode 100644
index 0000000..884961b
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/user.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAyBH;;;;GAIG;AACH,IAAY,SAeX;AAfD,WAAY,SAAS;IACpB,yCAAQ,CAAA;IACR,+DAAwB,CAAA;IACxB,yEAA6B,CAAA;IAC7B,6EAA+B,CAAA;IAC/B,+DAAwB,CAAA;IACxB,4EAA8B,CAAA;IAC9B,mFAAiC,CAAA;IACjC,6EAA8B,CAAA;IAC9B,+DAAuB,CAAA;IACvB,oDAAkB,CAAA;IAClB,gDAAgB,CAAA;IAChB,mEAAyB,CAAA;IACzB,2DAAqB,CAAA;IACrB,wFAAmC,CAAA;AACpC,CAAC,EAfW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAepB;AAED;;;;GAIG;AACH,IAAY,eAIX;AAJD,WAAY,eAAe;IAC1B,qDAAI,CAAA;IACJ,qEAAY,CAAA;IACZ,uDAAK,CAAA;AACN,CAAC,EAJW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAI1B;AAmBD;;GAEG;AACH,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC/B,+DAAI,CAAA;IACJ,uEAAQ,CAAA;AACT,CAAC,EAHW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAG/B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/voice.d.ts b/node_modules/discord-api-types/payloads/v6/voice.d.ts
new file mode 100644
index 0000000..10d1fe3
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/voice.d.ts
@@ -0,0 +1,37 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/voice
+ */
+import type { APIGuildMember } from './guild';
+/**
+ * https://discord.com/developers/docs/resources/voice#voice-state-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface GatewayVoiceState {
+ guild_id?: string;
+ channel_id: string | null;
+ user_id: string;
+ member?: APIGuildMember;
+ session_id: string;
+ deaf: boolean;
+ mute: boolean;
+ self_deaf: boolean;
+ self_mute: boolean;
+ self_stream?: boolean;
+ self_video: boolean;
+ suppress: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/voice#voice-region-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIVoiceRegion {
+ id: string;
+ name: string;
+ vip: boolean;
+ optimal: boolean;
+ deprecated: boolean;
+ custom: boolean;
+}
+//# sourceMappingURL=voice.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/voice.d.ts.map b/node_modules/discord-api-types/payloads/v6/voice.d.ts.map
new file mode 100644
index 0000000..4854240
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/voice.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CAChB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/voice.js b/node_modules/discord-api-types/payloads/v6/voice.js
new file mode 100644
index 0000000..8e67862
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/voice.js
@@ -0,0 +1,6 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/voice
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=voice.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/voice.js.map b/node_modules/discord-api-types/payloads/v6/voice.js.map
new file mode 100644
index 0000000..e54835f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/voice.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"voice.js","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":";AAAA;;GAEG"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/webhook.d.ts b/node_modules/discord-api-types/payloads/v6/webhook.d.ts
new file mode 100644
index 0000000..76aac70
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/webhook.d.ts
@@ -0,0 +1,32 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/webhook
+ */
+import type { APIPartialChannel } from './channel';
+import type { APIPartialGuild } from './guild';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/resources/webhook#webhook-object
+ *
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIWebhook {
+ id: string;
+ type: WebhookType;
+ guild_id?: string;
+ channel_id: string;
+ user?: APIUser;
+ name: string | null;
+ avatar: string | null;
+ token?: string;
+ source_guild?: APIPartialGuild;
+ source_channel?: APIPartialChannel;
+ application_id: string | null;
+}
+/**
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum WebhookType {
+ Incoming = 1,
+ ChannelFollower = 2
+}
+//# sourceMappingURL=webhook.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/webhook.d.ts.map b/node_modules/discord-api-types/payloads/v6/webhook.d.ts.map
new file mode 100644
index 0000000..50e6ae0
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/webhook.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,UAAU;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED;;GAEG;AACH,oBAAY,WAAW;IACtB,QAAQ,IAAI;IACZ,eAAe,IAAA;CACf"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/webhook.js b/node_modules/discord-api-types/payloads/v6/webhook.js
new file mode 100644
index 0000000..bf69074
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/webhook.js
@@ -0,0 +1,15 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/webhook
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.WebhookType = void 0;
+/**
+ * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
+ */
+var WebhookType;
+(function (WebhookType) {
+ WebhookType[WebhookType["Incoming"] = 1] = "Incoming";
+ WebhookType[WebhookType["ChannelFollower"] = 2] = "ChannelFollower";
+})(WebhookType = exports.WebhookType || (exports.WebhookType = {}));
+//# sourceMappingURL=webhook.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v6/webhook.js.map b/node_modules/discord-api-types/payloads/v6/webhook.js.map
new file mode 100644
index 0000000..66d611d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v6/webhook.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAyBH;;GAEG;AACH,IAAY,WAGX;AAHD,WAAY,WAAW;IACtB,qDAAY,CAAA;IACZ,mEAAe,CAAA;AAChB,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.d.ts
new file mode 100644
index 0000000..b97006f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.d.ts
@@ -0,0 +1,12 @@
+import type { Snowflake } from '../../../../../globals';
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandAttachmentOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Attachment>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Attachment, Snowflake>;
+//# sourceMappingURL=attachment.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map
new file mode 100644
index 0000000..fc84cf9
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAChD,+BAA+B,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,oDAAoD,GAAG,4BAA4B,CAC9F,4BAA4B,CAAC,UAAU,EACvC,SAAS,CACT,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.js b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.js
new file mode 100644
index 0000000..c79ce94
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=attachment.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.js.map
new file mode 100644
index 0000000..0cf9a21
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"attachment.js","sourceRoot":"","sources":["attachment.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.d.ts
new file mode 100644
index 0000000..50c9819
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.d.ts
@@ -0,0 +1,28 @@
+import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIApplicationCommandOptionBase<Type extends ApplicationCommandOptionType> {
+ type: Type;
+ name: string;
+ description: string;
+ required?: boolean;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIInteractionDataOptionBase<T extends ApplicationCommandOptionType, D> {
+ name: string;
+ type: T;
+ value: D;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<Base extends APIApplicationCommandOptionBase<ApplicationCommandOptionType>, ChoiceType extends APIApplicationCommandOptionChoice> = (Base & {
+ autocomplete: true;
+}) | (Base & {
+ autocomplete?: false;
+ choices?: ChoiceType[];
+});
+//# sourceMappingURL=base.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.d.ts.map
new file mode 100644
index 0000000..167fbc0
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,+BAA+B,CAAC,IAAI,SAAS,4BAA4B;IACzF,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B,CAAC,CAAC,SAAS,4BAA4B,EAAE,CAAC;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,CAAC,CAAC;CACT;AAED;;GAEG;AACH,MAAM,MAAM,2DAA2D,CACtE,IAAI,SAAS,+BAA+B,CAAC,4BAA4B,CAAC,EAC1E,UAAU,SAAS,iCAAiC,IAElD,CAAC,IAAI,GAAG;IACR,YAAY,EAAE,IAAI,CAAC;CAClB,CAAC,GACF,CAAC,IAAI,GAAG;IACR,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.js b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.js
new file mode 100644
index 0000000..1e393c0
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=base.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.js.map
new file mode 100644
index 0000000..755d82e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"base.js","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.d.ts
new file mode 100644
index 0000000..de13fee
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.d.ts
@@ -0,0 +1,11 @@
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandBooleanOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Boolean>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandInteractionDataBooleanOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Boolean, boolean>;
+//# sourceMappingURL=boolean.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map
new file mode 100644
index 0000000..79e9d6a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["boolean.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAEvH;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAAG,4BAA4B,CAC3F,4BAA4B,CAAC,OAAO,EACpC,OAAO,CACP,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.js b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.js
new file mode 100644
index 0000000..8b82929
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=boolean.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.js.map
new file mode 100644
index 0000000..2eb5640
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"boolean.js","sourceRoot":"","sources":["boolean.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.d.ts
new file mode 100644
index 0000000..22e1646
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.d.ts
@@ -0,0 +1,15 @@
+import type { Snowflake } from '../../../../../globals';
+import type { ChannelType } from '../../../channel';
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
+ channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>[];
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Channel, Snowflake>;
+//# sourceMappingURL=channel.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.d.ts.map
new file mode 100644
index 0000000..a13b10e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,kCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E,aAAa,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;CAC7E;AAED;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAAG,4BAA4B,CAC3F,4BAA4B,CAAC,OAAO,EACpC,SAAS,CACT,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.js b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.js
new file mode 100644
index 0000000..7c587bc
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=channel.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.js.map
new file mode 100644
index 0000000..f1057f4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.d.ts
new file mode 100644
index 0000000..f726166
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.d.ts
@@ -0,0 +1,27 @@
+import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
+import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
+ /**
+ * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
+ */
+ min_value?: number;
+ /**
+ * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
+ */
+ max_value?: number;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandIntegerOptionBase, APIApplicationCommandOptionChoice<number>>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIApplicationCommandInteractionDataIntegerOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Integer, number> {
+ focused?: boolean;
+}
+export {};
+//# sourceMappingURL=integer.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.d.ts.map
new file mode 100644
index 0000000..232ec57
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["integer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG;;GAEG;AACH,UAAU,sCACT,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,2DAA2D,CAC3G,sCAAsC,EACtC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,iDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,OAAO,EAAE,MAAM,CAAC;IAClF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.js b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.js
new file mode 100644
index 0000000..bdae3b2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=integer.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.js.map
new file mode 100644
index 0000000..525e62f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"integer.js","sourceRoot":"","sources":["integer.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.d.ts
new file mode 100644
index 0000000..f493cdb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.d.ts
@@ -0,0 +1,12 @@
+import type { Snowflake } from '../../../../../globals';
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandMentionableOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Mentionable>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandInteractionDataMentionableOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Mentionable, Snowflake>;
+//# sourceMappingURL=mentionable.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map
new file mode 100644
index 0000000..29f5582
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"mentionable.d.ts","sourceRoot":"","sources":["mentionable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,sCAAsC,GACjD,+BAA+B,CAAC,4BAA4B,CAAC,WAAW,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,qDAAqD,GAAG,4BAA4B,CAC/F,4BAA4B,CAAC,WAAW,EACxC,SAAS,CACT,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.js b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.js
new file mode 100644
index 0000000..41a60eb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=mentionable.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.js.map
new file mode 100644
index 0000000..f0d8dfb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"mentionable.js","sourceRoot":"","sources":["mentionable.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.d.ts
new file mode 100644
index 0000000..8820548
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.d.ts
@@ -0,0 +1,27 @@
+import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
+import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
+ /**
+ * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
+ */
+ min_value?: number;
+ /**
+ * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
+ */
+ max_value?: number;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandNumberOptionBase, APIApplicationCommandOptionChoice<number>>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIApplicationCommandInteractionDataNumberOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Number, number> {
+ focused?: boolean;
+}
+export {};
+//# sourceMappingURL=number.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.d.ts.map
new file mode 100644
index 0000000..a676a2a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG;;GAEG;AACH,UAAU,qCACT,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC;IAC5E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,2DAA2D,CAC1G,qCAAqC,EACrC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,gDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.js b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.js
new file mode 100644
index 0000000..f779930
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=number.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.js.map
new file mode 100644
index 0000000..28d5b03
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"number.js","sourceRoot":"","sources":["number.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.d.ts
new file mode 100644
index 0000000..4920320
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.d.ts
@@ -0,0 +1,12 @@
+import type { Snowflake } from '../../../../../globals';
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Role>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandInteractionDataRoleOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Role, Snowflake>;
+//# sourceMappingURL=role.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.d.ts.map
new file mode 100644
index 0000000..19d42fb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"role.d.ts","sourceRoot":"","sources":["role.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;AAEjH;;GAEG;AACH,MAAM,MAAM,8CAA8C,GAAG,4BAA4B,CACxF,4BAA4B,CAAC,IAAI,EACjC,SAAS,CACT,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.js b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.js
new file mode 100644
index 0000000..db328fc
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=role.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.js.map
new file mode 100644
index 0000000..490c1af
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"role.js","sourceRoot":"","sources":["role.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.d.ts
new file mode 100644
index 0000000..544c233
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.d.ts
@@ -0,0 +1,28 @@
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum ApplicationCommandOptionType {
+ Subcommand = 1,
+ SubcommandGroup = 2,
+ String = 3,
+ Integer = 4,
+ Boolean = 5,
+ User = 6,
+ Channel = 7,
+ Role = 8,
+ Mentionable = 9,
+ Number = 10,
+ Attachment = 11
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIApplicationCommandOptionChoice<ValueType = string | number> {
+ name: string;
+ value: ValueType;
+}
+//# sourceMappingURL=shared.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.d.ts.map
new file mode 100644
index 0000000..21eacee
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["shared.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,oBAAY,4BAA4B;IACvC,UAAU,IAAI;IACd,eAAe,IAAA;IACf,MAAM,IAAA;IACN,OAAO,IAAA;IACP,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,WAAW,IAAA;IACX,MAAM,KAAA;IACN,UAAU,KAAA;CACV;AAED;;;;GAIG;AACH,MAAM,WAAW,iCAAiC,CAAC,SAAS,GAAG,MAAM,GAAG,MAAM;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,SAAS,CAAC;CACjB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.js b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.js
new file mode 100644
index 0000000..a170d83
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.js
@@ -0,0 +1,23 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ApplicationCommandOptionType = void 0;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var ApplicationCommandOptionType;
+(function (ApplicationCommandOptionType) {
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Subcommand"] = 1] = "Subcommand";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["SubcommandGroup"] = 2] = "SubcommandGroup";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["String"] = 3] = "String";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Integer"] = 4] = "Integer";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Boolean"] = 5] = "Boolean";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["User"] = 6] = "User";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Channel"] = 7] = "Channel";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Role"] = 8] = "Role";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Mentionable"] = 9] = "Mentionable";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Number"] = 10] = "Number";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Attachment"] = 11] = "Attachment";
+})(ApplicationCommandOptionType = exports.ApplicationCommandOptionType || (exports.ApplicationCommandOptionType = {}));
+//# sourceMappingURL=shared.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.js.map
new file mode 100644
index 0000000..9b116f8
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"shared.js","sourceRoot":"","sources":["shared.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,IAAY,4BAYX;AAZD,WAAY,4BAA4B;IACvC,2FAAc,CAAA;IACd,qGAAe,CAAA;IACf,mFAAM,CAAA;IACN,qFAAO,CAAA;IACP,qFAAO,CAAA;IACP,+EAAI,CAAA;IACJ,qFAAO,CAAA;IACP,+EAAI,CAAA;IACJ,6FAAW,CAAA;IACX,oFAAM,CAAA;IACN,4FAAU,CAAA;AACX,CAAC,EAZW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAYvC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.d.ts
new file mode 100644
index 0000000..caa85f6
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.d.ts
@@ -0,0 +1,13 @@
+import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
+import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandOptionBase<ApplicationCommandOptionType.String>, APIApplicationCommandOptionChoice<string>>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
+ focused?: boolean;
+}
+//# sourceMappingURL=string.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.d.ts.map
new file mode 100644
index 0000000..19d9123
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,2DAA2D,CAC1G,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC,EACpE,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,gDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.js b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.js
new file mode 100644
index 0000000..2967e4e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=string.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.js.map
new file mode 100644
index 0000000..84875d4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"string.js","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.d.ts
new file mode 100644
index 0000000..140f029
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.d.ts
@@ -0,0 +1,18 @@
+import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput';
+import type { APIApplicationCommandOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
+ options?: APIApplicationCommandBasicOption[];
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIApplicationCommandInteractionDataSubcommandOption {
+ name: string;
+ type: ApplicationCommandOptionType.Subcommand;
+ options?: APIApplicationCommandInteractionDataBasicOption[];
+}
+//# sourceMappingURL=subcommand.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map
new file mode 100644
index 0000000..6a49188
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"subcommand.d.ts","sourceRoot":"","sources":["subcommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gCAAgC,EAAE,+CAA+C,EAAE,MAAM,cAAc,CAAC;AACtH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,qCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,UAAU,CAAC;IAChF,OAAO,CAAC,EAAE,gCAAgC,EAAE,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,oDAAoD;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,4BAA4B,CAAC,UAAU,CAAC;IAC9C,OAAO,CAAC,EAAE,+CAA+C,EAAE,CAAC;CAC5D"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.js b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.js
new file mode 100644
index 0000000..b82efe7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=subcommand.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.js.map
new file mode 100644
index 0000000..8872d4a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"subcommand.js","sourceRoot":"","sources":["subcommand.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts
new file mode 100644
index 0000000..33e1ba7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts
@@ -0,0 +1,18 @@
+import type { APIApplicationCommandOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+import type { APIApplicationCommandInteractionDataSubcommandOption, APIApplicationCommandSubcommandOption } from './subcommand';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
+ options?: APIApplicationCommandSubcommandOption[];
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIApplicationCommandInteractionDataSubcommandGroupOption {
+ name: string;
+ type: ApplicationCommandOptionType.SubcommandGroup;
+ options: APIApplicationCommandInteractionDataSubcommandOption[];
+}
+//# sourceMappingURL=subcommandGroup.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map
new file mode 100644
index 0000000..7e0e53a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"subcommandGroup.d.ts","sourceRoot":"","sources":["subcommandGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EACX,oDAAoD,EACpD,qCAAqC,EACrC,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,WAAW,0CAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,eAAe,CAAC;IACrF,OAAO,CAAC,EAAE,qCAAqC,EAAE,CAAC;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,yDAAyD;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,4BAA4B,CAAC,eAAe,CAAC;IACnD,OAAO,EAAE,oDAAoD,EAAE,CAAC;CAChE"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.js b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.js
new file mode 100644
index 0000000..e06cf57
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=subcommandGroup.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map
new file mode 100644
index 0000000..fcf1472
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"subcommandGroup.js","sourceRoot":"","sources":["subcommandGroup.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.d.ts
new file mode 100644
index 0000000..24a4b15
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.d.ts
@@ -0,0 +1,12 @@
+import type { Snowflake } from '../../../../../globals';
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandUserOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.User>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandInteractionDataUserOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.User, Snowflake>;
+//# sourceMappingURL=user.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.d.ts.map
new file mode 100644
index 0000000..36eceb4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;AAEjH;;GAEG;AACH,MAAM,MAAM,8CAA8C,GAAG,4BAA4B,CACxF,4BAA4B,CAAC,IAAI,EACjC,SAAS,CACT,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.js b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.js
new file mode 100644
index 0000000..33269d3
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=user.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.js.map
new file mode 100644
index 0000000..ff1a289
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.d.ts
new file mode 100644
index 0000000..1ec6537
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.d.ts
@@ -0,0 +1,90 @@
+import type { Snowflake } from '../../../../globals';
+import type { APIAttachment, APIRole, APIUser } from '../../index';
+import type { APIApplicationCommandInteractionWrapper, APIInteractionDataResolvedChannel, APIInteractionDataResolvedGuildMember, ApplicationCommandType } from '../applicationCommands';
+import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base';
+import type { APIApplicationCommandAttachmentOption, APIApplicationCommandInteractionDataAttachmentOption } from './_chatInput/attachment';
+import type { APIApplicationCommandBooleanOption, APIApplicationCommandInteractionDataBooleanOption } from './_chatInput/boolean';
+import type { APIApplicationCommandChannelOption, APIApplicationCommandInteractionDataChannelOption } from './_chatInput/channel';
+import type { APIApplicationCommandIntegerOption, APIApplicationCommandInteractionDataIntegerOption } from './_chatInput/integer';
+import type { APIApplicationCommandInteractionDataMentionableOption, APIApplicationCommandMentionableOption } from './_chatInput/mentionable';
+import type { APIApplicationCommandInteractionDataNumberOption, APIApplicationCommandNumberOption } from './_chatInput/number';
+import type { APIApplicationCommandInteractionDataRoleOption, APIApplicationCommandRoleOption } from './_chatInput/role';
+import type { APIApplicationCommandInteractionDataStringOption, APIApplicationCommandStringOption } from './_chatInput/string';
+import type { APIApplicationCommandInteractionDataSubcommandOption, APIApplicationCommandSubcommandOption } from './_chatInput/subcommand';
+import type { APIApplicationCommandInteractionDataSubcommandGroupOption, APIApplicationCommandSubcommandGroupOption } from './_chatInput/subcommandGroup';
+import type { APIApplicationCommandInteractionDataUserOption, APIApplicationCommandUserOption } from './_chatInput/user';
+import type { APIBaseApplicationCommandInteractionData } from './internals';
+export * from './_chatInput/attachment';
+export * from './_chatInput/boolean';
+export * from './_chatInput/channel';
+export * from './_chatInput/integer';
+export * from './_chatInput/mentionable';
+export * from './_chatInput/number';
+export * from './_chatInput/role';
+export * from './_chatInput/shared';
+export * from './_chatInput/string';
+export * from './_chatInput/subcommand';
+export * from './_chatInput/subcommandGroup';
+export * from './_chatInput/user';
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandBasicOption = APIApplicationCommandStringOption | APIApplicationCommandIntegerOption | APIApplicationCommandBooleanOption | APIApplicationCommandUserOption | APIApplicationCommandChannelOption | APIApplicationCommandRoleOption | APIApplicationCommandMentionableOption | APIApplicationCommandNumberOption | APIApplicationCommandAttachmentOption;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandOption = APIApplicationCommandSubcommandOption | APIApplicationCommandSubcommandGroupOption | APIApplicationCommandBasicOption;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandInteractionDataOption = APIApplicationCommandInteractionDataSubcommandOption | APIApplicationCommandInteractionDataSubcommandGroupOption | APIApplicationCommandInteractionDataBasicOption;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandInteractionDataBasicOption = APIApplicationCommandInteractionDataStringOption | APIApplicationCommandInteractionDataIntegerOption | APIApplicationCommandInteractionDataBooleanOption | APIApplicationCommandInteractionDataUserOption | APIApplicationCommandInteractionDataChannelOption | APIApplicationCommandInteractionDataRoleOption | APIApplicationCommandInteractionDataMentionableOption | APIApplicationCommandInteractionDataNumberOption | APIApplicationCommandInteractionDataAttachmentOption;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
+ options?: APIApplicationCommandInteractionDataOption[];
+ resolved?: APIChatInputApplicationCommandInteractionDataResolved;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIChatInputApplicationCommandInteractionDataResolved {
+ users?: Record<Snowflake, APIUser>;
+ roles?: Record<Snowflake, APIRole>;
+ members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
+ channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
+ attachments?: Record<Snowflake, APIAttachment>;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIChatInputApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIChatInputApplicationCommandInteractionData>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIChatInputApplicationCommandDMInteraction = APIDMInteractionWrapper<APIChatInputApplicationCommandInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIChatInputApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIChatInputApplicationCommandInteraction>;
+//# sourceMappingURL=chatInput.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.d.ts.map
new file mode 100644
index 0000000..2d11067
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"chatInput.d.ts","sourceRoot":"","sources":["chatInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,KAAK,EACX,uCAAuC,EACvC,iCAAiC,EACjC,qC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C,6CAA6C,CAAC,CAAC;AAExF;;;;GAIG;AACH,MAAM,MAAM,2CAA2C,GACtD,uBAAuB,CAAC,yCAAyC,CAAC,CAAC;AAEpE;;;;GAIG;AACH,MAAM,MAAM,8CAA8C,GACzD,0BAA0B,CAAC,yCAAyC,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.js b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.js
new file mode 100644
index 0000000..d1c32e9
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.js
@@ -0,0 +1,29 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./_chatInput/attachment"), exports);
+__exportStar(require("./_chatInput/boolean"), exports);
+__exportStar(require("./_chatInput/channel"), exports);
+__exportStar(require("./_chatInput/integer"), exports);
+__exportStar(require("./_chatInput/mentionable"), exports);
+__exportStar(require("./_chatInput/number"), exports);
+__exportStar(require("./_chatInput/role"), exports);
+__exportStar(require("./_chatInput/shared"), exports);
+__exportStar(require("./_chatInput/string"), exports);
+__exportStar(require("./_chatInput/subcommand"), exports);
+__exportStar(require("./_chatInput/subcommandGroup"), exports);
+__exportStar(require("./_chatInput/user"), exports);
+//# sourceMappingURL=chatInput.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.js.map
new file mode 100644
index 0000000..b10b189
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"chatInput.js","sourceRoot":"","sources":["chatInput.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAuDA,0DAAwC;AACxC,uDAAqC;AACrC,uDAAqC;AACrC,uDAAqC;AACrC,2DAAyC;AACzC,sDAAoC;AACpC,oDAAkC;AAClC,sDAAoC;AACpC,sDAAoC;AACpC,0DAAwC;AACxC,+DAA6C;AAC7C,oDAAkC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.d.ts
new file mode 100644
index 0000000..49de68b
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.d.ts
@@ -0,0 +1,102 @@
+import type { Snowflake } from '../../../../globals';
+import type { APIMessage } from '../../channel';
+import type { APIUser } from '../../user';
+import type { APIApplicationCommandInteractionWrapper, APIInteractionDataResolvedGuildMember, ApplicationCommandType } from '../applicationCommands';
+import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base';
+import type { APIBaseApplicationCommandInteractionData } from './internals';
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
+ target_id: Snowflake;
+ resolved: APIUserApplicationCommandInteractionDataResolved;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIUserApplicationCommandInteractionDataResolved {
+ users: Record<Snowflake, APIUser>;
+ members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
+ target_id: Snowflake;
+ resolved: APIMessageApplicationCommandInteractionDataResolved;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIMessageApplicationCommandInteractionDataResolved {
+ messages: Record<Snowflake, APIMessage>;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIContextMenuInteractionData = APIUserApplicationCommandInteractionData | APIMessageApplicationCommandInteractionData;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIUserApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIUserApplicationCommandInteractionData>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIUserApplicationCommandDMInteraction = APIDMInteractionWrapper<APIUserApplicationCommandInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIUserApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIUserApplicationCommandInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIMessageApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIMessageApplicationCommandInteractionData>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIMessageApplicationCommandDMInteraction = APIDMInteractionWrapper<APIMessageApplicationCommandInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIMessageApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIMessageApplicationCommandInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIContextMenuInteraction = APIUserApplicationCommandInteraction | APIMessageApplicationCommandInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIContextMenuDMInteraction = APIUserApplicationCommandDMInteraction | APIMessageApplicationCommandDMInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIContextMenuGuildInteraction = APIUserApplicationCommandGuildInteraction | APIMessageApplicationCommandGuildInteraction;
+//# sourceMappingURL=contextMenu.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.d.ts.map
new file mode 100644
index 0000000..4cbdf95
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"contextMenu.d.ts","sourceRoot":"","sources":["contextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EACX,uCAAuC,EACvC,qCAAqC,EACrC,sBAAsB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,aAAa,CAAC;AAE5E;;;;GAIG;AACH,MAAM,WAAW,wCAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,IAAI,CAAC;IAC7E,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,gDAAgD,CAAC;CAC3D;AAED;;;;GAIG;AACH,MAAM,WAAW,gDAAgD;IAChE,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,qCAAqC,CAAC,CAAC;CACnE;AAED;;;;GAIG;AACH,MAAM,WAAW,2CAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,OAAO,CAAC;IAChF,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,mDAAmD,CAAC;CAC9D;AAED;;;;GAIG;AACH,MAAM,WAAW,mDAAmD;IACnE,QAAQ,EAAE,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;CACxC;AAED;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GACtC,wCAAwC,GACxC,2CAA2C,CAAC;AAE/C;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAC/C,uCAAuC,CAAC,wCAAwC,CAAC,CAAC;AAEnF;;;;GAIG;AACH,MAAM,MAAM,sCAAsC,GAAG,uBAAuB,CAAC,oCAAoC,CAAC,CAAC;AAEnH;;;;GAIG;AACH,MAAM,MAAM,yCAAyC,GACpD,0BAA0B,CAAC,oCAAoC,CAAC,CAAC;AAElE;;;;GAIG;AACH,MAAM,MAAM,uCAAuC,GAClD,uCAAuC,CAAC,2CAA2C,CAAC,CAAC;AAEtF;;;;GAIG;AACH,MAAM,MAAM,yCAAyC,GACpD,uBAAuB,CAAC,uCAAuC,CAAC,CAAC;AAElE;;;;GAIG;AACH,MAAM,MAAM,4CAA4C,GACvD,0BAA0B,CAAC,uCAAuC,CAAC,CAAC;AAErE;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,oCAAoC,GAAG,uCAAuC,CAAC;AAEvH;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GACpC,sCAAsC,GACtC,yCAAyC,CAAC;AAE7C;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GACvC,yCAAyC,GACzC,4CAA4C,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.js b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.js
new file mode 100644
index 0000000..e96ad8c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=contextMenu.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.js.map
new file mode 100644
index 0000000..c905148
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"contextMenu.js","sourceRoot":"","sources":["contextMenu.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.d.ts
new file mode 100644
index 0000000..66087d2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.d.ts
@@ -0,0 +1,11 @@
+import type { Snowflake } from '../../../../globals';
+import type { ApplicationCommandType } from '../applicationCommands';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIBaseApplicationCommandInteractionData<Type extends ApplicationCommandType> {
+ id: Snowflake;
+ type: Type;
+ name: string;
+}
+//# sourceMappingURL=internals.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.d.ts.map
new file mode 100644
index 0000000..1547cae
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"internals.d.ts","sourceRoot":"","sources":["internals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,wCAAwC,CAAC,IAAI,SAAS,sBAAsB;IAC5F,EAAE,EAAE,SAAS,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACb"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.js b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.js
new file mode 100644
index 0000000..00585b4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=internals.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.js.map
new file mode 100644
index 0000000..c4808b2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"internals.js","sourceRoot":"","sources":["internals.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.d.ts
new file mode 100644
index 0000000..5ba580b
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.d.ts
@@ -0,0 +1,53 @@
+import type { Snowflake } from '../../../../globals';
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildApplicationCommandPermissions {
+ /**
+ * The id of the command
+ */
+ id: Snowflake;
+ /**
+ * The id of the application the command belongs to
+ */
+ application_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The permissions for the command in the guild
+ */
+ permissions: APIApplicationCommandPermission[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIApplicationCommandPermission {
+ /**
+ * The id of the role or user
+ */
+ id: Snowflake;
+ /**
+ * Role or user
+ */
+ type: ApplicationCommandPermissionType;
+ /**
+ * `true` to allow, `false`, to disallow
+ */
+ permission: boolean;
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum ApplicationCommandPermissionType {
+ Role = 1,
+ User = 2
+}
+//# sourceMappingURL=permissions.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.d.ts.map
new file mode 100644
index 0000000..ff20787
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;GAIG;AACH,MAAM,WAAW,qCAAqC;IACrD;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,cAAc,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,+BAA+B,EAAE,CAAC;CAC/C;AAED;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,gCAAgC,CAAC;IACvC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,oBAAY,gCAAgC;IAC3C,IAAI,IAAI;IACR,IAAI,IAAA;CACJ"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.js b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.js
new file mode 100644
index 0000000..a28989c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.js
@@ -0,0 +1,14 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ApplicationCommandPermissionType = void 0;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var ApplicationCommandPermissionType;
+(function (ApplicationCommandPermissionType) {
+ ApplicationCommandPermissionType[ApplicationCommandPermissionType["Role"] = 1] = "Role";
+ ApplicationCommandPermissionType[ApplicationCommandPermissionType["User"] = 2] = "User";
+})(ApplicationCommandPermissionType = exports.ApplicationCommandPermissionType || (exports.ApplicationCommandPermissionType = {}));
+//# sourceMappingURL=permissions.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.js.map
new file mode 100644
index 0000000..1714204
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"permissions.js","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":";;;AA8CA;;;;GAIG;AACH,IAAY,gCAGX;AAHD,WAAY,gCAAgC;IAC3C,uFAAQ,CAAA;IACR,uFAAI,CAAA;AACL,CAAC,EAHW,gCAAgC,GAAhC,wCAAgC,KAAhC,wCAAgC,QAG3C"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.d.ts
new file mode 100644
index 0000000..e34e1db
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.d.ts
@@ -0,0 +1,112 @@
+import type { Permissions, Snowflake } from '../../../globals';
+import type { APIPartialChannel } from '../channel';
+import type { APIGuildMember } from '../guild';
+import type { APIApplicationCommandOption, APIChatInputApplicationCommandDMInteraction, APIChatInputApplicationCommandGuildInteraction, APIChatInputApplicationCommandInteraction, APIChatInputApplicationCommandInteractionData } from './_applicationCommands/chatInput';
+import type { APIContextMenuDMInteraction, APIContextMenuGuildInteraction, APIContextMenuInteraction, APIContextMenuInteractionData } from './_applicationCommands/contextMenu';
+import type { APIBaseInteraction } from './base';
+import type { InteractionType } from './responses';
+export * from './_applicationCommands/chatInput';
+export * from './_applicationCommands/contextMenu';
+export * from './_applicationCommands/permissions';
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIApplicationCommand {
+ /**
+ * Unique id of the command
+ */
+ id: Snowflake;
+ /**
+ * Type of the command
+ */
+ type: ApplicationCommandType;
+ /**
+ * Unique id of the parent application
+ */
+ application_id: Snowflake;
+ /**
+ * Guild id of the command, if not global
+ */
+ guild_id?: Snowflake;
+ /**
+ * 1-32 character name; `CHAT_INPUT` command names must be all lowercase matching `^[\w-]{1,32}$`
+ */
+ name: string;
+ /**
+ * 1-100 character description for `CHAT_INPUT` commands, empty string for `USER` and `MESSAGE` commands
+ */
+ description: string;
+ /**
+ * The parameters for the `CHAT_INPUT` command, max 25
+ */
+ options?: APIApplicationCommandOption[];
+ /**
+ * Whether the command is enabled by default when the app is added to a guild
+ *
+ * If missing, this property should be assumed as `true`
+ */
+ default_permission?: boolean;
+ /**
+ * Autoincrementing version identifier updated during substantial record changes
+ */
+ version: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum ApplicationCommandType {
+ ChatInput = 1,
+ User = 2,
+ Message = 3
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandInteractionData = APIChatInputApplicationCommandInteractionData | APIContextMenuInteractionData;
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIInteractionDataResolvedChannel extends Required<APIPartialChannel> {
+ permissions: Permissions;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-member-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'user' | 'deaf' | 'mute'> {
+ permissions: Permissions;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationCommandInteractionData> = APIBaseInteraction<InteractionType.ApplicationCommand, Data> & Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommand, Data>, 'channel_id' | 'data'>>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandInteraction = APIChatInputApplicationCommandInteraction | APIContextMenuInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandDMInteraction = APIChatInputApplicationCommandDMInteraction | APIContextMenuDMInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandGuildInteraction = APIChatInputApplicationCommandGuildInteraction | APIContextMenuGuildInteraction;
+//# sourceMappingURL=applicationCommands.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.d.ts.map
new file mode 100644
index 0000000..27fca15
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"applicationCommands.d.ts","sourceRoot":"","sources":["applicationCommands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EACX,2BAA2B,EAC3B,2CAA2C,EAC3C,8CAA8C,EAC9C,yCAAyC,EACzC,6CAA6C,EAC7C,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EACX,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,EACzB,6BAA6B,EAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,sBAAsB,CAAC;IAC7B;;OAEG;IACH,cAAc,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,2BAA2B,EAAE,CAAC;IACxC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;CACnB;AAED;;;;GAIG;AACH,oBAAY,sBAAsB;IACjC,SAAS,IAAI;IACb,IAAI,IAAA;IACJ,OAAO,IAAA;CACP;AAED;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAC7C,6CAA6C,GAC7C,6BAA6B,CAAC;AAEjC;;;;GAIG;AACH,MAAM,WAAW,iCAAkC,SAAQ,QAAQ,CAAC,iBAAiB,CAAC;IACrF,WAAW,EAAE,WAAW,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,qCAAsC,SAAQ,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAC5G,WAAW,EAAE,WAAW,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,MAAM,uCAAuC,CAAC,IAAI,SAAS,oCAAoC,IACpG,kBAAkB,CAAC,eAAe,CAAC,kBAAkB,EAAE,IAAI,CAAC,GAC3D,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,kBAAkB,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC;AAEtG;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,GAAG,yCAAyC,GAAG,yBAAyB,CAAC;AAErH;;;;GAIG;AACH,MAAM,MAAM,kCAAkC,GAC3C,2CAA2C,GAC3C,2BAA2B,CAAC;AAE/B;;;;GAIG;AACH,MAAM,MAAM,qCAAqC,GAC9C,8CAA8C,GAC9C,8BAA8B,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.js b/node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.js
new file mode 100644
index 0000000..9bfec67
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.js
@@ -0,0 +1,32 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ApplicationCommandType = void 0;
+__exportStar(require("./_applicationCommands/chatInput"), exports);
+__exportStar(require("./_applicationCommands/contextMenu"), exports);
+__exportStar(require("./_applicationCommands/permissions"), exports);
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var ApplicationCommandType;
+(function (ApplicationCommandType) {
+ ApplicationCommandType[ApplicationCommandType["ChatInput"] = 1] = "ChatInput";
+ ApplicationCommandType[ApplicationCommandType["User"] = 2] = "User";
+ ApplicationCommandType[ApplicationCommandType["Message"] = 3] = "Message";
+})(ApplicationCommandType = exports.ApplicationCommandType || (exports.ApplicationCommandType = {}));
+//# sourceMappingURL=applicationCommands.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.js.map
new file mode 100644
index 0000000..f9a0394
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"applicationCommands.js","sourceRoot":"","sources":["applicationCommands.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAmBA,mEAAiD;AACjD,qEAAmD;AACnD,qEAAmD;AAgDnD;;;;GAIG;AACH,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IACjC,6EAAa,CAAA;IACb,mEAAI,CAAA;IACJ,yEAAO,CAAA;AACR,CAAC,EAJW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAIjC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.d.ts
new file mode 100644
index 0000000..39e13f6
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.d.ts
@@ -0,0 +1,18 @@
+import type { APIBaseInteraction, APIChatInputApplicationCommandInteractionData, APIDMInteractionWrapper, APIGuildInteractionWrapper, InteractionType } from '../index';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIChatInputApplicationCommandInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>>, 'data'>>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandAutocompleteDMInteraction = APIDMInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIApplicationCommandAutocompleteGuildInteraction = APIGuildInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
+//# sourceMappingURL=autocomplete.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.d.ts.map
new file mode 100644
index 0000000..d7c9b70
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["autocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kBAAkB,EAClB,6CAA6C,EAC7C,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,MAAM,MAAM,4CAA4C,GAAG,kBAAkB,CAC5E,eAAe,CAAC,8BAA8B,EAC9C,6CAA6C,CAC7C,GACA,QAAQ,CACP,IAAI,CACH,kBAAkB,CACjB,eAAe,CAAC,8BAA8B,EAC9C,QAAQ,CAAC,IAAI,CAAC,6CAA6C,EAAE,SAAS,CAAC,CAAC,CACxE,EACD,MAAM,CACN,CACD,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,8CAA8C,GACzD,uBAAuB,CAAC,4CAA4C,CAAC,CAAC;AAEvE;;;;GAIG;AACH,MAAM,MAAM,iDAAiD,GAC5D,0BAA0B,CAAC,4CAA4C,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.js b/node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.js
new file mode 100644
index 0000000..c165ee2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=autocomplete.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.js.map
new file mode 100644
index 0000000..d7f27d6
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"autocomplete.js","sourceRoot":"","sources":["autocomplete.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/base.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/base.d.ts
new file mode 100644
index 0000000..aa0014a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/base.d.ts
@@ -0,0 +1,116 @@
+import type { Permissions, Snowflake } from '../../../globals';
+import type { LocaleString } from '../../../v8';
+import type { APIMessage } from '../channel';
+import type { APIGuildMember } from '../guild';
+import type { APIUser } from '../user';
+import type { InteractionType } from './responses';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type PartialAPIMessageInteractionGuildMember = Pick<APIGuildMember, 'roles' | 'premium_since' | 'pending' | 'nick' | 'mute' | 'joined_at' | 'deaf' | 'communication_disabled_until' | 'avatar'>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIMessageInteraction {
+ /**
+ * ID of the interaction
+ */
+ id: Snowflake;
+ /**
+ * The type of interaction
+ */
+ type: InteractionType;
+ /**
+ * The name of the ApplicationCommand
+ */
+ name: string;
+ /**
+ * The user who invoked the interaction
+ */
+ user: APIUser;
+ /**
+ * The guild member who invoked the interaction, only sent in MESSAGE_CREATE events
+ */
+ member?: PartialAPIMessageInteractionGuildMember;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-member-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIInteractionGuildMember extends APIGuildMember {
+ permissions: Permissions;
+ user: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIBaseInteraction<Type extends InteractionType, Data> {
+ /**
+ * ID of the interaction
+ */
+ id: Snowflake;
+ /**
+ * ID of the application this interaction is for
+ */
+ application_id: Snowflake;
+ /**
+ * The type of interaction
+ */
+ type: Type;
+ /**
+ * The command data payload
+ */
+ data?: Data;
+ /**
+ * The guild it was sent from
+ */
+ guild_id?: Snowflake;
+ /**
+ * The channel it was sent from
+ */
+ channel_id?: Snowflake;
+ /**
+ * Guild member data for the invoking user, including permissions
+ *
+ * **This is only sent when an interaction is invoked in a guild**
+ */
+ member?: APIInteractionGuildMember;
+ /**
+ * User object for the invoking user, if invoked in a DM
+ */
+ user?: APIUser;
+ /**
+ * A continuation token for responding to the interaction
+ */
+ token: string;
+ /**
+ * Read-only property, always `1`
+ */
+ version: 1;
+ /**
+ * For components, the message they were attached to
+ */
+ message?: APIMessage;
+ /**
+ * The selected language of the invoking user
+ */
+ locale: LocaleString;
+ /**
+ * The guild's preferred locale, if invoked in a guild
+ */
+ guild_locale?: LocaleString;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<Original, 'member' | 'guild_id'> & Required<Pick<Original, 'user'>>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<Original, 'user'> & Required<Pick<Original, 'member' | 'guild_id'>>;
+//# sourceMappingURL=base.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/base.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/base.d.ts.map
new file mode 100644
index 0000000..e2dca10
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/base.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE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,YAAY,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,CAAC,QAAQ,SAAS,kBAAkB,CAAC,eAAe,EAAE,OAAO,CAAC,IAAI,IAAI,CACxG,QAAQ,EACR,QAAQ,GAAG,UAAU,CACrB,GACA,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,0BAA0B,CAAC,QAAQ,SAAS,kBAAkB,CAAC,eAAe,EAAE,OAAO,CAAC,IAAI,IAAI,CAC3G,QAAQ,EACR,MAAM,CACN,GACA,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/base.js b/node_modules/discord-api-types/payloads/v8/_interactions/base.js
new file mode 100644
index 0000000..1e393c0
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/base.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=base.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/base.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/base.js.map
new file mode 100644
index 0000000..755d82e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/base.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"base.js","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.d.ts
new file mode 100644
index 0000000..60f0909
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.d.ts
@@ -0,0 +1,43 @@
+import type { ComponentType } from '../channel';
+import type { APIBaseInteraction, InteractionType } from '../interactions';
+import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from './base';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIMessageComponentInteraction = APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData>, 'channel_id' | 'data' | 'message'>>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIMessageComponentInteractionData = APIMessageButtonInteractionData | APIMessageSelectMenuInteractionData;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIMessageComponentBaseInteractionData<CType extends ComponentType> {
+ /**
+ * The `custom_id` of the component
+ */
+ custom_id: string;
+ /**
+ * The type of the component
+ */
+ component_type: CType;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIMessageSelectMenuInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.SelectMenu> {
+ values: string[];
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIMessageComponentDMInteraction = APIDMInteractionWrapper<APIMessageComponentInteraction>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIMessageComponentGuildInteraction = APIGuildInteractionWrapper<APIMessageComponentInteraction>;
+//# sourceMappingURL=messageComponents.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.d.ts.map
new file mode 100644
index 0000000..67bb2c4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"messageComponents.d.ts","sourceRoot":"","sources":["messageComponents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,QAAQ,CAAC;AAElF;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,kBAAkB,CAC9D,eAAe,CAAC,gBAAgB,EAChC,kCAAkC,CAClC,GACA,QAAQ,CACP,IAAI,CACH,kBAAkB,CAAC,eAAe,CAAC,gBAAgB,EAAE,kCAAkC,CAAC,EACxF,YAAY,GAAG,MAAM,GAAG,SAAS,CACjC,CACD,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,+BAA+B,GAAG,mCAAmC,CAAC;AAEvH;;GAEG;AACH,MAAM,WAAW,sCAAsC,CAAC,KAAK,SAAS,aAAa;IAClF;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,cAAc,EAAE,KAAK,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,sCAAsC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AAE3G;;GAEG;AACH,MAAM,WAAW,mCAChB,SAAQ,sCAAsC,CAAC,aAAa,CAAC,UAAU,CAAC;IACxE,MAAM,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,uBAAuB,CAAC,8BAA8B,CAAC,CAAC;AAEvG;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,0BAA0B,CAAC,8BAA8B,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.js b/node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.js
new file mode 100644
index 0000000..3f086c7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=messageComponents.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.js.map
new file mode 100644
index 0000000..571b70d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"messageComponents.js","sourceRoot":"","sources":["messageComponents.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.d.ts
new file mode 100644
index 0000000..8fb1179
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.d.ts
@@ -0,0 +1,48 @@
+import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel';
+import type { APIBaseInteraction, APIDMInteractionWrapper, APIGuildInteractionWrapper, ComponentType, InteractionType } from '../index';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface ModalSubmitComponent {
+ type: ComponentType;
+ custom_id: string;
+ value: string;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface ModalSubmitActionRowComponent extends Omit<APIActionRowComponent<APIModalActionRowComponent>, 'components'> {
+ components: ModalSubmitComponent[];
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIModalSubmission {
+ /**
+ * A developer-defined identifier for the component, max 100 characters
+ */
+ custom_id: string;
+ /**
+ * A list of child components
+ */
+ components?: ModalSubmitActionRowComponent[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIModalSubmitInteraction = APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission> & Required<Pick<APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission>, 'data'>>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIModalSubmitDMInteraction = APIDMInteractionWrapper<APIModalSubmitInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIModalSubmitGuildInteraction = APIGuildInteractionWrapper<APIModalSubmitInteraction>;
+//# sourceMappingURL=modalSubmit.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.d.ts.map
new file mode 100644
index 0000000..047ac0a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"modalSubmit.d.ts","sourceRoot":"","sources":["modalSubmit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,KAAK,EACX,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,aAAa,EACb,eAAe,EACf,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,IAAI,EAAE,aAAa,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,6BAChB,SAAQ,IAAI,CAAC,qBAAqB,CAAC,0BAA0B,CAAC,EAAE,YAAY,CAAC;IAC7E,UAAU,EAAE,oBAAoB,EAAE,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,6BAA6B,EAAE,CAAC;CAC7C;AAED;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,kBAAkB,CAAC,eAAe,CAAC,WAAW,EAAE,kBAAkB,CAAC,GAC1G,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,WAAW,EAAE,kBAAkB,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAE7F;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,uBAAuB,CAAC,yBAAyB,CAAC,CAAC;AAE7F;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GAAG,0BAA0B,CAAC,yBAAyB,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.js b/node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.js
new file mode 100644
index 0000000..59c83cb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=modalSubmit.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.js.map
new file mode 100644
index 0000000..ad871d9
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"modalSubmit.js","sourceRoot":"","sources":["modalSubmit.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/ping.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/ping.d.ts
new file mode 100644
index 0000000..2629e7b
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/ping.d.ts
@@ -0,0 +1,7 @@
+import type { APIBaseInteraction } from './base';
+import type { InteractionType } from './responses';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIPingInteraction = Omit<APIBaseInteraction<InteractionType.Ping, never>, 'locale'>;
+//# sourceMappingURL=ping.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/ping.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/ping.d.ts.map
new file mode 100644
index 0000000..7a9fe69
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/ping.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ping.d.ts","sourceRoot":"","sources":["ping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/ping.js b/node_modules/discord-api-types/payloads/v8/_interactions/ping.js
new file mode 100644
index 0000000..c8b17d7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/ping.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=ping.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/ping.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/ping.js.map
new file mode 100644
index 0000000..9246c5a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/ping.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ping.js","sourceRoot":"","sources":["ping.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/responses.d.ts b/node_modules/discord-api-types/payloads/v8/_interactions/responses.d.ts
new file mode 100644
index 0000000..a1854bb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/responses.d.ts
@@ -0,0 +1,138 @@
+import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v8';
+import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel';
+import type { MessageFlags } from '../index';
+import type { APIApplicationCommandOptionChoice } from './applicationCommands';
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum InteractionType {
+ Ping = 1,
+ ApplicationCommand = 2,
+ MessageComponent = 3,
+ ApplicationCommandAutocomplete = 4,
+ ModalSubmit = 5
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIInteractionResponse = APIInteractionResponsePong | APIInteractionResponseChannelMessageWithSource | APIInteractionResponseDeferredChannelMessageWithSource | APIInteractionResponseDeferredMessageUpdate | APIInteractionResponseUpdateMessage | APIApplicationCommandAutocompleteResponse | APIModalInteractionResponse;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIInteractionResponsePong {
+ type: InteractionResponseType.Pong;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIApplicationCommandAutocompleteResponse {
+ type: InteractionResponseType.ApplicationCommandAutocompleteResult;
+ data: APICommandAutocompleteInteractionResponseCallbackData;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIModalInteractionResponse {
+ type: InteractionResponseType.Modal;
+ data: APIModalInteractionResponseCallbackData;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIInteractionResponseChannelMessageWithSource {
+ type: InteractionResponseType.ChannelMessageWithSource;
+ data: APIInteractionResponseCallbackData;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIInteractionResponseDeferredChannelMessageWithSource {
+ type: InteractionResponseType.DeferredChannelMessageWithSource;
+ data?: Pick<APIInteractionResponseCallbackData, 'flags'>;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIInteractionResponseDeferredMessageUpdate {
+ type: InteractionResponseType.DeferredMessageUpdate;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIInteractionResponseUpdateMessage {
+ type: InteractionResponseType.UpdateMessage;
+ data?: APIInteractionResponseCallbackData;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum InteractionResponseType {
+ /**
+ * ACK a `Ping`
+ */
+ Pong = 1,
+ /**
+ * Respond to an interaction with a message
+ */
+ ChannelMessageWithSource = 4,
+ /**
+ * ACK an interaction and edit to a response later, the user sees a loading state
+ */
+ DeferredChannelMessageWithSource = 5,
+ /**
+ * ACK a button interaction and update it to a loading state
+ */
+ DeferredMessageUpdate = 6,
+ /**
+ * ACK a button interaction and edit the message to which the button was attached
+ */
+ UpdateMessage = 7,
+ /**
+ * For autocomplete interactions
+ */
+ ApplicationCommandAutocompleteResult = 8,
+ /**
+ * Respond to an interaction with an modal for a user to fill-out
+ */
+ Modal = 9
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIInteractionResponseCallbackData = Omit<RESTPostAPIWebhookWithTokenJSONBody, 'username' | 'avatar_url'> & {
+ flags?: MessageFlags;
+};
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APICommandAutocompleteInteractionResponseCallbackData {
+ choices?: APIApplicationCommandOptionChoice[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIModalInteractionResponseCallbackData {
+ /**
+ * A developer-defined identifier for the component, max 100 characters
+ */
+ custom_id: string;
+ /**
+ * The title of the popup modal
+ */
+ title: string;
+ /**
+ * Between 1 and 5 (inclusive) components that make up the modal
+ */
+ components: APIActionRowComponent<APIModalActionRowComponent>[];
+}
+//# sourceMappingURL=responses.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/responses.d.ts.map b/node_modules/discord-api-types/payloads/v8/_interactions/responses.d.ts.map
new file mode 100644
index 0000000..f4c9ab8
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/responses.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["responses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AAE/E;;;;GAIG;AACH,oBAAY,eAAe;IAC1B,IAAI,IAAI;IACR,kBAAkB,IAAA;IAClB,gBAAgB,IAAA;IAChB,8BAA8B,IAAA;IAC9B,WAAW,IAAA;CACX;AAED;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAC/B,0BAA0B,GAC1B,8CAA8C,GAC9C,sDAAsD,GACtD,2CAA2C,GAC3C,mCAAmC,GACnC,yCAAyC,GACzC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AAC,EAAE,YAAY,CAAA;CAAE,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,qDAAqD;IACrE,OAAO,CAAC,EAAE,iCAAiC,EAAE,CAAC;CAC9C;AAED;;;;GAIG;AACH,MAAM,WAAW,uCAAuC;IACvD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,UAAU,EAAE,qBAAqB,CAAC,0BAA0B,CAAC,EAAE,CAAC;CAChE"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/responses.js b/node_modules/discord-api-types/payloads/v8/_interactions/responses.js
new file mode 100644
index 0000000..3ade188
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/responses.js
@@ -0,0 +1,53 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.InteractionResponseType = exports.InteractionType = void 0;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var InteractionType;
+(function (InteractionType) {
+ InteractionType[InteractionType["Ping"] = 1] = "Ping";
+ InteractionType[InteractionType["ApplicationCommand"] = 2] = "ApplicationCommand";
+ InteractionType[InteractionType["MessageComponent"] = 3] = "MessageComponent";
+ InteractionType[InteractionType["ApplicationCommandAutocomplete"] = 4] = "ApplicationCommandAutocomplete";
+ InteractionType[InteractionType["ModalSubmit"] = 5] = "ModalSubmit";
+})(InteractionType = exports.InteractionType || (exports.InteractionType = {}));
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var InteractionResponseType;
+(function (InteractionResponseType) {
+ /**
+ * ACK a `Ping`
+ */
+ InteractionResponseType[InteractionResponseType["Pong"] = 1] = "Pong";
+ /**
+ * Respond to an interaction with a message
+ */
+ InteractionResponseType[InteractionResponseType["ChannelMessageWithSource"] = 4] = "ChannelMessageWithSource";
+ /**
+ * ACK an interaction and edit to a response later, the user sees a loading state
+ */
+ InteractionResponseType[InteractionResponseType["DeferredChannelMessageWithSource"] = 5] = "DeferredChannelMessageWithSource";
+ /**
+ * ACK a button interaction and update it to a loading state
+ */
+ InteractionResponseType[InteractionResponseType["DeferredMessageUpdate"] = 6] = "DeferredMessageUpdate";
+ /**
+ * ACK a button interaction and edit the message to which the button was attached
+ */
+ InteractionResponseType[InteractionResponseType["UpdateMessage"] = 7] = "UpdateMessage";
+ /**
+ * For autocomplete interactions
+ */
+ InteractionResponseType[InteractionResponseType["ApplicationCommandAutocompleteResult"] = 8] = "ApplicationCommandAutocompleteResult";
+ /**
+ * Respond to an interaction with an modal for a user to fill-out
+ */
+ InteractionResponseType[InteractionResponseType["Modal"] = 9] = "Modal";
+})(InteractionResponseType = exports.InteractionResponseType || (exports.InteractionResponseType = {}));
+//# sourceMappingURL=responses.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/_interactions/responses.js.map b/node_modules/discord-api-types/payloads/v8/_interactions/responses.js.map
new file mode 100644
index 0000000..1917c72
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/_interactions/responses.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"responses.js","sourceRoot":"","sources":["responses.ts"],"names":[],"mappings":";;;AAKA;;;;GAIG;AACH,IAAY,eAMX;AAND,WAAY,eAAe;IAC1B,qDAAQ,CAAA;IACR,iFAAkB,CAAA;IAClB,6EAAgB,CAAA;IAChB,yGAA8B,CAAA;IAC9B,mEAAW,CAAA;AACZ,CAAC,EANW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAM1B;AAsED;;;;GAIG;AACH,IAAY,uBA6BX;AA7BD,WAAY,uBAAuB;IAClC;;OAEG;IACH,qEAAQ,CAAA;IACR;;OAEG;IACH,6GAA4B,CAAA;IAC5B;;OAEG;IACH,6HAAgC,CAAA;IAChC;;OAEG;IACH,uGAAqB,CAAA;IACrB;;OAEG;IACH,uFAAa,CAAA;IACb;;OAEG;IACH,qIAAoC,CAAA;IACpC;;OAEG;IACH,uEAAK,CAAA;AACN,CAAC,EA7BW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QA6BlC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/application.d.ts b/node_modules/discord-api-types/payloads/v8/application.d.ts
new file mode 100644
index 0000000..f164cd3
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/application.d.ts
@@ -0,0 +1,134 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/application
+ */
+import type { Permissions, Snowflake } from '../../globals';
+import type { OAuth2Scopes } from './oauth2';
+import type { APITeam } from './teams';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/resources/application#application-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIApplication {
+ /**
+ * The id of the app
+ */
+ id: Snowflake;
+ /**
+ * The name of the app
+ */
+ name: string;
+ /**
+ * The icon hash of the app
+ */
+ icon: string | null;
+ /**
+ * The description of the app
+ */
+ description: string;
+ /**
+ * An array of rpc origin urls, if rpc is enabled
+ */
+ rpc_origins?: string[];
+ /**
+ * When `false` only app owner can join the app's bot to guilds
+ */
+ bot_public: boolean;
+ /**
+ * When `true` the app's bot will only join upon completion of the full oauth2 code grant flow
+ */
+ bot_require_code_grant: boolean;
+ /**
+ * The url of the application's terms of service
+ */
+ terms_of_service_url?: string;
+ /**
+ * The url of the application's privacy policy
+ */
+ privacy_policy_url?: string;
+ /**
+ * Partial user object containing info on the owner of the application
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ owner?: APIUser;
+ /**
+ * If this application is a game sold on Discord, this field will be the summary field for the store page
+ * of its primary sku
+ *
+ * @deprecated Always an empty string, will be removed in v11
+ */
+ summary: '';
+ /**
+ * The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
+ *
+ * See https://discord.com/developers/docs/game-sdk/applications#get-ticket
+ */
+ verify_key: string;
+ /**
+ * The team this application belongs to
+ *
+ * See https://discord.com/developers/docs/topics/teams#data-models-team-object
+ */
+ team: APITeam | null;
+ /**
+ * If this application is a game sold on Discord, this field will be the guild to which it has been linked
+ */
+ guild_id?: Snowflake;
+ /**
+ * If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists
+ */
+ primary_sku_id?: Snowflake;
+ /**
+ * If this application is a game sold on Discord, this field will be the URL slug that links to the store page
+ */
+ slug?: string;
+ /**
+ * If this application is a game sold on Discord, this field will be the hash of the image on store embeds
+ */
+ cover_image?: string;
+ /**
+ * The application's public flags
+ *
+ * See https://discord.com/developers/docs/resources/application#application-object-application-flags
+ */
+ flags: ApplicationFlags;
+ /**
+ * Up to 5 tags describing the content and functionality of the application
+ */
+ tags?: [string, string?, string?, string?, string?];
+ /**
+ * Settings for the application's default in-app authorization link, if enabled
+ */
+ install_params?: APIApplicationInstallParams;
+ /**
+ * The application's default custom authorization link, if enabled
+ */
+ custom_install_url?: string;
+}
+export interface APIApplicationInstallParams {
+ scopes: OAuth2Scopes[];
+ permissions: Permissions;
+}
+/**
+ * https://discord.com/developers/docs/resources/application#application-object-application-flags
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum ApplicationFlags {
+ EmbeddedReleased = 2,
+ ManagedEmoji = 4,
+ GroupDMCreate = 16,
+ RPCHasConnected = 2048,
+ GatewayPresence = 4096,
+ GatewayPresenceLimited = 8192,
+ GatewayGuildMembers = 16384,
+ GatewayGuildMembersLimited = 32768,
+ VerificationPendingGuildLimit = 65536,
+ Embedded = 131072,
+ GatewayMessageContent = 262144,
+ GatewayMessageContentLimited = 524288,
+ EmbeddedFirstParty = 1048576
+}
+//# sourceMappingURL=application.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/application.d.ts.map b/node_modules/discord-api-types/payloads/v8/application.d.ts.map
new file mode 100644
index 0000000..d79e5bf
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/application.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,sBAAsB,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;OAKG;IACH,OAAO,EAAE,EAAE,CAAC;IACZ;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,KAAK,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD;;OAEG;IACH,cAAc,CAAC,EAAE,2BAA2B,CAAC;IAC7C;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,2BAA2B;IAC3C,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;CACzB;AAED;;;;GAIG;AACH,oBAAY,gBAAgB;IAC3B,gBAAgB,IAAS;IACzB,YAAY,IAAS;IACrB,aAAa,KAAS;IACtB,eAAe,OAAU;IACzB,eAAe,OAAU;IACzB,sBAAsB,OAAU;IAChC,mBAAmB,QAAU;IAC7B,0BAA0B,QAAU;IACpC,6BAA6B,QAAU;IACvC,QAAQ,SAAU;IAClB,qBAAqB,SAAU;IAC/B,4BAA4B,SAAU;IACtC,kBAAkB,UAAU;CAC5B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/application.js b/node_modules/discord-api-types/payloads/v8/application.js
new file mode 100644
index 0000000..af2d224
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/application.js
@@ -0,0 +1,28 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/application
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ApplicationFlags = void 0;
+/**
+ * https://discord.com/developers/docs/resources/application#application-object-application-flags
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var ApplicationFlags;
+(function (ApplicationFlags) {
+ ApplicationFlags[ApplicationFlags["EmbeddedReleased"] = 2] = "EmbeddedReleased";
+ ApplicationFlags[ApplicationFlags["ManagedEmoji"] = 4] = "ManagedEmoji";
+ ApplicationFlags[ApplicationFlags["GroupDMCreate"] = 16] = "GroupDMCreate";
+ ApplicationFlags[ApplicationFlags["RPCHasConnected"] = 2048] = "RPCHasConnected";
+ ApplicationFlags[ApplicationFlags["GatewayPresence"] = 4096] = "GatewayPresence";
+ ApplicationFlags[ApplicationFlags["GatewayPresenceLimited"] = 8192] = "GatewayPresenceLimited";
+ ApplicationFlags[ApplicationFlags["GatewayGuildMembers"] = 16384] = "GatewayGuildMembers";
+ ApplicationFlags[ApplicationFlags["GatewayGuildMembersLimited"] = 32768] = "GatewayGuildMembersLimited";
+ ApplicationFlags[ApplicationFlags["VerificationPendingGuildLimit"] = 65536] = "VerificationPendingGuildLimit";
+ ApplicationFlags[ApplicationFlags["Embedded"] = 131072] = "Embedded";
+ ApplicationFlags[ApplicationFlags["GatewayMessageContent"] = 262144] = "GatewayMessageContent";
+ ApplicationFlags[ApplicationFlags["GatewayMessageContentLimited"] = 524288] = "GatewayMessageContentLimited";
+ ApplicationFlags[ApplicationFlags["EmbeddedFirstParty"] = 1048576] = "EmbeddedFirstParty";
+})(ApplicationFlags = exports.ApplicationFlags || (exports.ApplicationFlags = {}));
+//# sourceMappingURL=application.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/application.js.map b/node_modules/discord-api-types/payloads/v8/application.js.map
new file mode 100644
index 0000000..b147e2e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/application.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"application.js","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAmHH;;;;GAIG;AACH,IAAY,gBAcX;AAdD,WAAY,gBAAgB;IAC3B,+EAAyB,CAAA;IACzB,uEAAqB,CAAA;IACrB,0EAAsB,CAAA;IACtB,gFAAyB,CAAA;IACzB,gFAAyB,CAAA;IACzB,8FAAgC,CAAA;IAChC,yFAA6B,CAAA;IAC7B,uGAAoC,CAAA;IACpC,6GAAuC,CAAA;IACvC,oEAAkB,CAAA;IAClB,8FAA+B,CAAA;IAC/B,4GAAsC,CAAA;IACtC,yFAA4B,CAAA;AAC7B,CAAC,EAdW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAc3B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/auditLog.d.ts b/node_modules/discord-api-types/payloads/v8/auditLog.d.ts
new file mode 100644
index 0000000..e8adfa9
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/auditLog.d.ts
@@ -0,0 +1,637 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/audit-log
+ */
+import type { Snowflake } from '../../globals';
+import type { APIOverwrite } from './channel';
+import type { APIGuildIntegration, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildMFALevel, GuildVerificationLevel, IntegrationExpireBehavior } from './guild';
+import type { APIGuildScheduledEvent, GuildScheduledEventEntityType, GuildScheduledEventStatus } from './guildScheduledEvent';
+import type { APIRole } from './permissions';
+import type { StageInstancePrivacyLevel } from './stageInstance';
+import type { StickerFormatType } from './sticker';
+import type { APIUser } from './user';
+import type { APIWebhook } from './webhook';
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIAuditLog {
+ /**
+ * Webhooks found in the audit log
+ *
+ * See https://discord.com/developers/docs/resources/webhook#webhook-object
+ */
+ webhooks: APIWebhook[];
+ /**
+ * Users found in the audit log
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ users: APIUser[];
+ /**
+ * Audit log entries
+ *
+ * See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object
+ */
+ audit_log_entries: APIAuditLogEntry[];
+ /**
+ * Partial integration objects
+ *
+ * See https://discord.com/developers/docs/resources/guild#integration-object
+ */
+ integrations: APIGuildIntegration[];
+ /**
+ * The guild scheduled events in the audit log
+ *
+ * See https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object
+ */
+ guild_scheduled_events: APIGuildScheduledEvent[];
+}
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIAuditLogEntry {
+ /**
+ * ID of the affected entity (webhook, user, role, etc.)
+ */
+ target_id: string | null;
+ /**
+ * Changes made to the `target_id`
+ *
+ * See https://discord.com/developers/docs/resources/audit-log#audit-log-change-object
+ */
+ changes?: APIAuditLogChange[];
+ /**
+ * The user who made the changes
+ *
+ * This can be `null` in some cases (webhooks deleting themselves by using their own token, for example)
+ */
+ user_id: Snowflake | null;
+ /**
+ * ID of the entry
+ */
+ id: Snowflake;
+ /**
+ * Type of action that occurred
+ *
+ * See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
+ */
+ action_type: AuditLogEvent;
+ /**
+ * Additional info for certain action types
+ *
+ * See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
+ */
+ options?: APIAuditLogOptions;
+ /**
+ * The reason for the change (0-512 characters)
+ */
+ reason?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum AuditLogEvent {
+ GuildUpdate = 1,
+ ChannelCreate = 10,
+ ChannelUpdate = 11,
+ ChannelDelete = 12,
+ ChannelOverwriteCreate = 13,
+ ChannelOverwriteUpdate = 14,
+ ChannelOverwriteDelete = 15,
+ MemberKick = 20,
+ MemberPrune = 21,
+ MemberBanAdd = 22,
+ MemberBanRemove = 23,
+ MemberUpdate = 24,
+ MemberRoleUpdate = 25,
+ MemberMove = 26,
+ MemberDisconnect = 27,
+ BotAdd = 28,
+ RoleCreate = 30,
+ RoleUpdate = 31,
+ RoleDelete = 32,
+ InviteCreate = 40,
+ InviteUpdate = 41,
+ InviteDelete = 42,
+ WebhookCreate = 50,
+ WebhookUpdate = 51,
+ WebhookDelete = 52,
+ EmojiCreate = 60,
+ EmojiUpdate = 61,
+ EmojiDelete = 62,
+ MessageDelete = 72,
+ MessageBulkDelete = 73,
+ MessagePin = 74,
+ MessageUnpin = 75,
+ IntegrationCreate = 80,
+ IntegrationUpdate = 81,
+ IntegrationDelete = 82,
+ StageInstanceCreate = 83,
+ StageInstanceUpdate = 84,
+ StageInstanceDelete = 85,
+ StickerCreate = 90,
+ StickerUpdate = 91,
+ StickerDelete = 92,
+ GuildScheduledEventCreate = 100,
+ GuildScheduledEventUpdate = 101,
+ GuildScheduledEventDelete = 102
+}
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIAuditLogOptions {
+ /**
+ * Number of days after which inactive members were kicked
+ *
+ * Present from:
+ * - MEMBER_PRUNE
+ */
+ delete_member_days?: string;
+ /**
+ * Number of members removed by the prune
+ *
+ * Present from:
+ * - MEMBER_PRUNE
+ */
+ members_removed?: string;
+ /**
+ * Channel in which the entities were targeted
+ *
+ * Present from:
+ * - MEMBER_MOVE
+ * - MESSAGE_PIN
+ * - MESSAGE_UNPIN
+ * - MESSAGE_DELETE
+ * - STAGE_INSTANCE_CREATE
+ * - STAGE_INSTANCE_UPDATE
+ * - STAGE_INSTANCE_DELETE
+ */
+ channel_id?: Snowflake;
+ /**
+ * ID of the message that was targeted
+ *
+ * Present from:
+ * - MESSAGE_PIN
+ * - MESSAGE_UNPIN
+ */
+ message_id?: Snowflake;
+ /**
+ * Number of entities that were targeted
+ *
+ * Present from:
+ * - MESSAGE_DELETE
+ * - MESSAGE_BULK_DELETE
+ * - MEMBER_DISCONNECT
+ * - MEMBER_MOVE
+ */
+ count?: string;
+ /**
+ * ID of the overwritten entity
+ *
+ * Present from:
+ * - CHANNEL_OVERWRITE_CREATE
+ * - CHANNEL_OVERWRITE_UPDATE
+ * - CHANNEL_OVERWRITE_DELETE
+ */
+ id?: Snowflake;
+ /**
+ * Type of overwritten entity - "0" for "role" or "1" for "member"
+ *
+ * Present from:
+ * - CHANNEL_OVERWRITE_CREATE
+ * - CHANNEL_OVERWRITE_UPDATE
+ * - CHANNEL_OVERWRITE_DELETE
+ *
+ * {@link AuditLogOptionsType}
+ */
+ type?: AuditLogOptionsType;
+ /**
+ * Name of the role
+ *
+ * Present from:
+ * - CHANNEL_OVERWRITE_CREATE
+ * - CHANNEL_OVERWRITE_UPDATE
+ * - CHANNEL_OVERWRITE_DELETE
+ *
+ * **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
+ */
+ role_name?: string;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum AuditLogOptionsType {
+ Role = "0",
+ Member = "1"
+}
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChange = APIAuditLogChangeKeyName | APIAuditLogChangeKeyDescription | APIAuditLogChangeKeyIconHash | APIAuditLogChangeKeySplashHash | APIAuditLogChangeKeyDiscoverySplashHash | APIAuditLogChangeKeyBannerHash | APIAuditLogChangeKeyOwnerId | APIAuditLogChangeKeyRegion | APIAuditLogChangeKeyPreferredLocale | APIAuditLogChangeKeyAFKChannelId | APIAuditLogChangeKeyAFKTimeout | APIAuditLogChangeKeyRulesChannelId | APIAuditLogChangeKeyPublicUpdatesChannelId | APIAuditLogChangeKeyMFALevel | APIAuditLogChangeKeyVerificationLevel | APIAuditLogChangeKeyExplicitContentFilter | APIAuditLogChangeKeyDefaultMessageNotifications | APIAuditLogChangeKeyVanityURLCode | APIAuditLogChangeKey$Add | APIAuditLogChangeKey$Remove | APIAuditLogChangeKeyPruneDeleteDays | APIAuditLogChangeKeyWidgetEnabled | APIAuditLogChangeKeyWidgetChannelId | APIAuditLogChangeKeySystemChannelId | APIAuditLogChangeKeyPosition | APIAuditLogChangeKeyTopic | APIAuditLogChangeKeyBitrate | APIAuditLogChangeKeyPermissionOverwrites | APIAuditLogChangeKeyNSFW | APIAuditLogChangeKeyApplicationId | APIAuditLogChangeKeyRateLimitPerUser | APIAuditLogChangeKeyPermissions | APIAuditLogChangeKeyColor | APIAuditLogChangeKeyHoist | APIAuditLogChangeKeyMentionable | APIAuditLogChangeKeyAllow | APIAuditLogChangeKeyDeny | APIAuditLogChangeKeyCode | APIAuditLogChangeKeyChannelId | APIAuditLogChangeKeyInviterId | APIAuditLogChangeKeyMaxUses | APIAuditLogChangeKeyUses | APIAuditLogChangeKeyMaxAge | APIAuditLogChangeKeyTemporary | APIAuditLogChangeKeyDeaf | APIAuditLogChangeKeyMute | APIAuditLogChangeKeyNick | APIAuditLogChangeKeyAvatarHash | APIAuditLogChangeKeyId | APIAuditLogChangeKeyType | APIAuditLogChangeKeyEnableEmoticons | APIAuditLogChangeKeyExpireBehavior | APIAuditLogChangeKeyExpireGracePeriod | APIAuditLogChangeKeyUserLimit | APIAuditLogChangeKeyPrivacyLevel | APIAuditLogChangeKeyTags | APIAuditLogChangeKeyFormatType | APIAuditLogChangeKeyAsset | APIAuditLogChangeKeyAvailable | APIAuditLogChangeKeyGuildId | APIAuditLogChangeKeyEntityType | APIAuditLogChangeKeyStatus | APIAuditLogChangeKeyLocation | APIAuditLogChangeKeyCommunicationDisabledUntil;
+/**
+ * Returned when an entity's name is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>;
+/**
+ * Returned when a guild's or sticker's or guild scheduled event's description is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyDescription = AuditLogChangeData<'description', string>;
+/**
+ * Returned when a guild's icon is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', string>;
+/**
+ * Returned when a guild's splash is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>;
+/**
+ * Returned when a guild's discovery splash is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyDiscoverySplashHash = AuditLogChangeData<'discovery_splash_hash', string>;
+/**
+ * Returned when a guild's banner hash is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyBannerHash = AuditLogChangeData<'banner_hash', string>;
+/**
+ * Returned when a guild's owner_id is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyOwnerId = AuditLogChangeData<'owner_id', Snowflake>;
+/**
+ * Returned when a guild's region is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>;
+/**
+ * Returned when a guild's preferred_locale is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyPreferredLocale = AuditLogChangeData<'preferred_locale', string>;
+/**
+ * Returned when a guild's afk_channel_id is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyAFKChannelId = AuditLogChangeData<'afk_channel_id', Snowflake>;
+/**
+ * Returned when a guild's afk_timeout is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>;
+/**
+ * Returned when a guild's rules_channel_id is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_channel_id', string>;
+/**
+ * Returned when a guild's public_updates_channel_id is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;
+/**
+ * Returned when a guild's mfa_level is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyMFALevel = AuditLogChangeData<'mfa_level', GuildMFALevel>;
+/**
+ * Returned when a guild's verification_level is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyVerificationLevel = AuditLogChangeData<'verification_level', GuildVerificationLevel>;
+/**
+ * Returned when a guild's explicit_content_filter is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<'explicit_content_filter', GuildExplicitContentFilter>;
+/**
+ * Returned when a guild's default_message_notifications is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData<'default_message_notifications', GuildDefaultMessageNotifications>;
+/**
+ * Returned when a guild's vanity_url_code is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_code', string>;
+/**
+ * Returned when new role(s) are added
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', APIRole[]>;
+/**
+ * Returned when role(s) are removed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', APIRole[]>;
+/**
+ * Returned when there is a change in number of days after which inactive and role-unassigned members are kicked
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyPruneDeleteDays = AuditLogChangeData<'prune_delete_days', number>;
+/**
+ * Returned when a guild's widget is enabled
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabled', boolean>;
+/**
+ * Returned when a guild's widget_channel_id is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyWidgetChannelId = AuditLogChangeData<'widget_channel_id', Snowflake>;
+/**
+ * Returned when a guild's system_channel_id is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeySystemChannelId = AuditLogChangeData<'system_channel_id', Snowflake>;
+/**
+ * Returned when a channel's position is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyPosition = AuditLogChangeData<'position', number>;
+/**
+ * Returned when a channel's topic is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyTopic = AuditLogChangeData<'topic', string>;
+/**
+ * Returned when a voice channel's bitrate is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyBitrate = AuditLogChangeData<'bitrate', number>;
+/**
+ * Returned when a channel's permission overwrites is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyPermissionOverwrites = AuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
+/**
+ * Returned when a channel's NSFW restriction is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyNSFW = AuditLogChangeData<'nsfw', boolean>;
+/**
+ * The application ID of the added or removed Webhook or Bot
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyApplicationId = AuditLogChangeData<'application_id', Snowflake>;
+/**
+ * Returned when a channel's amount of seconds a user has to wait before sending another message
+ * is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyRateLimitPerUser = AuditLogChangeData<'rate_limit_per_user', number>;
+/**
+ * Returned when a permission bitfield is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyPermissions = AuditLogChangeData<'permissions', string>;
+/**
+ * Returned when a role's color is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyColor = AuditLogChangeData<'color', number>;
+/**
+ * Returned when a role's hoist status is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyHoist = AuditLogChangeData<'hoist', boolean>;
+/**
+ * Returned when a role's mentionable status is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyMentionable = AuditLogChangeData<'mentionable', boolean>;
+/**
+ * Returned when an overwrite's allowed permissions bitfield is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyAllow = AuditLogChangeData<'allow', string>;
+/**
+ * Returned when an overwrite's denied permissions bitfield is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyDeny = AuditLogChangeData<'deny', string>;
+/**
+ * Returned when an invite's code is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyCode = AuditLogChangeData<'code', string>;
+/**
+ * Returned when an invite's or guild scheduled event's channel_id is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyChannelId = AuditLogChangeData<'channel_id', Snowflake>;
+/**
+ * Returned when an invite's inviter_id is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyInviterId = AuditLogChangeData<'inviter_id', Snowflake>;
+/**
+ * Returned when an invite's max_uses is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyMaxUses = AuditLogChangeData<'max_uses', number>;
+/**
+ * Returned when an invite's uses is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyUses = AuditLogChangeData<'uses', number>;
+/**
+ * Returned when an invite's max_age is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyMaxAge = AuditLogChangeData<'max_age', number>;
+/**
+ * Returned when an invite's temporary status is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyTemporary = AuditLogChangeData<'temporary', boolean>;
+/**
+ * Returned when a user's deaf status is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyDeaf = AuditLogChangeData<'deaf', boolean>;
+/**
+ * Returned when a user's mute status is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyMute = AuditLogChangeData<'mute', boolean>;
+/**
+ * Returned when a user's nick is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyNick = AuditLogChangeData<'nick', string>;
+/**
+ * Returned when a user's avatar_hash is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyAvatarHash = AuditLogChangeData<'avatar_hash', string>;
+/**
+ * The ID of the changed entity - sometimes used in conjunction with other keys
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyId = AuditLogChangeData<'id', Snowflake>;
+/**
+ * The type of entity created
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyType = AuditLogChangeData<'type', number | string>;
+/**
+ * Returned when an integration's enable_emoticons is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyEnableEmoticons = AuditLogChangeData<'enable_emoticons', boolean>;
+/**
+ * Returned when an integration's expire_behavior is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
+/**
+ * Returned when an integration's expire_grace_period is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>;
+/**
+ * Returned when a voice channel's user_limit is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>;
+/**
+ * Returned when privacy level of a stage instance or guild scheduled event is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyPrivacyLevel = AuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
+/**
+ * Returned when a sticker's related emoji is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyTags = AuditLogChangeData<'tags', string>;
+/**
+ * Returned when a sticker's format_type is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyFormatType = AuditLogChangeData<'format_type', StickerFormatType>;
+/**
+ * Empty string
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyAsset = AuditLogChangeData<'asset', ''>;
+/**
+ * Returned when a sticker's availability is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', boolean>;
+/**
+ * Returned when a sticker's guild_id is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
+/**
+ * Returned when entity type of a guild scheduled event is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyEntityType = AuditLogChangeData<'entity_type', GuildScheduledEventEntityType>;
+/**
+ * Returned when status of a guild scheduled event is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyStatus = AuditLogChangeData<'status', GuildScheduledEventStatus>;
+/**
+ * Returned when location of a guild scheduled event is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyLocation = AuditLogChangeData<'location', string>;
+/**
+ * Returned when a user's timeout is changed
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIAuditLogChangeKeyCommunicationDisabledUntil = AuditLogChangeData<'communication_disabled_until', string>;
+interface AuditLogChangeData<K extends string, D> {
+ key: K;
+ /**
+ * The new value
+ *
+ * If `new_value` is not present in the change object, while `old_value` is,
+ * that means the property that was changed has been reset, or set to `null`
+ */
+ new_value?: D;
+ old_value?: D;
+}
+export {};
+//# sourceMappingURL=auditLog.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/auditLog.d.ts.map b/node_modules/discord-api-types/payloads/v8/auditLog.d.ts.map
new file mode 100644
index 0000000..44cc905
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/auditLog.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"auditLog.d.ts","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EACX,mBAAmB,EACnB,gCAAgC,EAChC,0BAA0B,EAC1B,aAAa,EACb,sBAAsB,EACtB,yBAAyB,EACzB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EACX,sBAAsB,EACtB,6BAA6B,EAC7B,yBAAyB,EACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC3B;;;;OAIG;IACH,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB;;;;OAIG;IACH,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB;;;;OAIG;IACH,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;IAC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AAG,kBAAkB,CAAC,aAAa,EAAE,6BAA6B,CAAC,CAAC;AAE9G;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,kBAAkB,CAAC,QAAQ,EAAE,yBAAyB,CAAC,CAAC;AAEjG;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,GAAG,kBAAkB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAElF;;;;GAIG;AACH,MAAM,MAAM,8CAA8C,GAAG,kBAAkB,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;AAExH,UAAU,kBAAkB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC;IAC/C,GAAG,EAAE,CAAC,CAAC;IACP;;;;;OAKG;IACH,SAAS,CAAC,EAAE,CAAC,CAAC;IACd,SAAS,CAAC,EAAE,CAAC,CAAC;CACd"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/auditLog.js b/node_modules/discord-api-types/payloads/v8/auditLog.js
new file mode 100644
index 0000000..ca72051
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/auditLog.js
@@ -0,0 +1,67 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/audit-log
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AuditLogOptionsType = exports.AuditLogEvent = void 0;
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var AuditLogEvent;
+(function (AuditLogEvent) {
+ AuditLogEvent[AuditLogEvent["GuildUpdate"] = 1] = "GuildUpdate";
+ AuditLogEvent[AuditLogEvent["ChannelCreate"] = 10] = "ChannelCreate";
+ AuditLogEvent[AuditLogEvent["ChannelUpdate"] = 11] = "ChannelUpdate";
+ AuditLogEvent[AuditLogEvent["ChannelDelete"] = 12] = "ChannelDelete";
+ AuditLogEvent[AuditLogEvent["ChannelOverwriteCreate"] = 13] = "ChannelOverwriteCreate";
+ AuditLogEvent[AuditLogEvent["ChannelOverwriteUpdate"] = 14] = "ChannelOverwriteUpdate";
+ AuditLogEvent[AuditLogEvent["ChannelOverwriteDelete"] = 15] = "ChannelOverwriteDelete";
+ AuditLogEvent[AuditLogEvent["MemberKick"] = 20] = "MemberKick";
+ AuditLogEvent[AuditLogEvent["MemberPrune"] = 21] = "MemberPrune";
+ AuditLogEvent[AuditLogEvent["MemberBanAdd"] = 22] = "MemberBanAdd";
+ AuditLogEvent[AuditLogEvent["MemberBanRemove"] = 23] = "MemberBanRemove";
+ AuditLogEvent[AuditLogEvent["MemberUpdate"] = 24] = "MemberUpdate";
+ AuditLogEvent[AuditLogEvent["MemberRoleUpdate"] = 25] = "MemberRoleUpdate";
+ AuditLogEvent[AuditLogEvent["MemberMove"] = 26] = "MemberMove";
+ AuditLogEvent[AuditLogEvent["MemberDisconnect"] = 27] = "MemberDisconnect";
+ AuditLogEvent[AuditLogEvent["BotAdd"] = 28] = "BotAdd";
+ AuditLogEvent[AuditLogEvent["RoleCreate"] = 30] = "RoleCreate";
+ AuditLogEvent[AuditLogEvent["RoleUpdate"] = 31] = "RoleUpdate";
+ AuditLogEvent[AuditLogEvent["RoleDelete"] = 32] = "RoleDelete";
+ AuditLogEvent[AuditLogEvent["InviteCreate"] = 40] = "InviteCreate";
+ AuditLogEvent[AuditLogEvent["InviteUpdate"] = 41] = "InviteUpdate";
+ AuditLogEvent[AuditLogEvent["InviteDelete"] = 42] = "InviteDelete";
+ AuditLogEvent[AuditLogEvent["WebhookCreate"] = 50] = "WebhookCreate";
+ AuditLogEvent[AuditLogEvent["WebhookUpdate"] = 51] = "WebhookUpdate";
+ AuditLogEvent[AuditLogEvent["WebhookDelete"] = 52] = "WebhookDelete";
+ AuditLogEvent[AuditLogEvent["EmojiCreate"] = 60] = "EmojiCreate";
+ AuditLogEvent[AuditLogEvent["EmojiUpdate"] = 61] = "EmojiUpdate";
+ AuditLogEvent[AuditLogEvent["EmojiDelete"] = 62] = "EmojiDelete";
+ AuditLogEvent[AuditLogEvent["MessageDelete"] = 72] = "MessageDelete";
+ AuditLogEvent[AuditLogEvent["MessageBulkDelete"] = 73] = "MessageBulkDelete";
+ AuditLogEvent[AuditLogEvent["MessagePin"] = 74] = "MessagePin";
+ AuditLogEvent[AuditLogEvent["MessageUnpin"] = 75] = "MessageUnpin";
+ AuditLogEvent[AuditLogEvent["IntegrationCreate"] = 80] = "IntegrationCreate";
+ AuditLogEvent[AuditLogEvent["IntegrationUpdate"] = 81] = "IntegrationUpdate";
+ AuditLogEvent[AuditLogEvent["IntegrationDelete"] = 82] = "IntegrationDelete";
+ AuditLogEvent[AuditLogEvent["StageInstanceCreate"] = 83] = "StageInstanceCreate";
+ AuditLogEvent[AuditLogEvent["StageInstanceUpdate"] = 84] = "StageInstanceUpdate";
+ AuditLogEvent[AuditLogEvent["StageInstanceDelete"] = 85] = "StageInstanceDelete";
+ AuditLogEvent[AuditLogEvent["StickerCreate"] = 90] = "StickerCreate";
+ AuditLogEvent[AuditLogEvent["StickerUpdate"] = 91] = "StickerUpdate";
+ AuditLogEvent[AuditLogEvent["StickerDelete"] = 92] = "StickerDelete";
+ AuditLogEvent[AuditLogEvent["GuildScheduledEventCreate"] = 100] = "GuildScheduledEventCreate";
+ AuditLogEvent[AuditLogEvent["GuildScheduledEventUpdate"] = 101] = "GuildScheduledEventUpdate";
+ AuditLogEvent[AuditLogEvent["GuildScheduledEventDelete"] = 102] = "GuildScheduledEventDelete";
+})(AuditLogEvent = exports.AuditLogEvent || (exports.AuditLogEvent = {}));
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var AuditLogOptionsType;
+(function (AuditLogOptionsType) {
+ AuditLogOptionsType["Role"] = "0";
+ AuditLogOptionsType["Member"] = "1";
+})(AuditLogOptionsType = exports.AuditLogOptionsType || (exports.AuditLogOptionsType = {}));
+//# sourceMappingURL=auditLog.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/auditLog.js.map b/node_modules/discord-api-types/payloads/v8/auditLog.js.map
new file mode 100644
index 0000000..6ab1cb5
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/auditLog.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"auditLog.js","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAyGH;;;;GAIG;AACH,IAAY,aAuDX;AAvDD,WAAY,aAAa;IACxB,+DAAe,CAAA;IAEf,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IACb,sFAAsB,CAAA;IACtB,sFAAsB,CAAA;IACtB,sFAAsB,CAAA;IAEtB,8DAAe,CAAA;IACf,gEAAW,CAAA;IACX,kEAAY,CAAA;IACZ,wEAAe,CAAA;IACf,kEAAY,CAAA;IACZ,0EAAgB,CAAA;IAChB,8DAAU,CAAA;IACV,0EAAgB,CAAA;IAChB,sDAAM,CAAA;IAEN,8DAAe,CAAA;IACf,8DAAU,CAAA;IACV,8DAAU,CAAA;IAEV,kEAAiB,CAAA;IACjB,kEAAY,CAAA;IACZ,kEAAY,CAAA;IAEZ,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IAEb,gEAAgB,CAAA;IAChB,gEAAW,CAAA;IACX,gEAAW,CAAA;IAEX,oEAAkB,CAAA;IAClB,4EAAiB,CAAA;IACjB,8DAAU,CAAA;IACV,kEAAY,CAAA;IAEZ,4EAAsB,CAAA;IACtB,4EAAiB,CAAA;IACjB,4EAAiB,CAAA;IACjB,gFAAmB,CAAA;IACnB,gFAAmB,CAAA;IACnB,gFAAmB,CAAA;IAEnB,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IAEb,6FAA+B,CAAA;IAC/B,6FAAyB,CAAA;IACzB,6FAAyB,CAAA;AAC1B,CAAC,EAvDW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAuDxB;AA4FD;;GAEG;AACH,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC9B,iCAAU,CAAA;IACV,mCAAY,CAAA;AACb,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/channel.d.ts b/node_modules/discord-api-types/payloads/v8/channel.d.ts
new file mode 100644
index 0000000..e58e582
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/channel.d.ts
@@ -0,0 +1,1273 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/channel
+ */
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIApplication } from './application';
+import type { APIPartialEmoji } from './emoji';
+import type { APIGuildMember } from './guild';
+import type { APIMessageInteraction } from './interactions';
+import type { APIRole } from './permissions';
+import type { APISticker, APIStickerItem } from './sticker';
+import type { APIUser } from './user';
+/**
+ * Not documented, but partial only includes id, name, and type
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIPartialChannel {
+ /**
+ * The id of the channel
+ */
+ id: Snowflake;
+ /**
+ * The type of the channel
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object-channel-types
+ */
+ type: ChannelType;
+ /**
+ * The name of the channel (2-100 characters)
+ */
+ name?: string;
+}
+/**
+ * This interface is used to allow easy extension for other channel types. While
+ * also allowing `APIPartialChannel` to be used without breaking.
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIChannelBase<T extends ChannelType> extends APIPartialChannel {
+ type: T;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type TextChannelType = ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildNews | ChannelType.GuildText;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GuildChannelType = Exclude<TextChannelType | ChannelType.GuildVoice | ChannelType.GuildStageVoice | ChannelType.GuildNews | ChannelType.GuildStore, ChannelType.DM | ChannelType.GroupDM>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APITextBasedChannel<T extends ChannelType> extends APIChannelBase<T> {
+ /**
+ * The id of the last message sent in this channel (may not point to an existing or valid message)
+ */
+ last_message_id?: Snowflake | null;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildChannel<T extends ChannelType> extends APIChannelBase<T> {
+ /**
+ * The id of the guild (may be missing for some channel objects received over gateway guild dispatches)
+ */
+ guild_id?: Snowflake;
+ /**
+ * Explicit permission overwrites for members and roles
+ *
+ * See https://discord.com/developers/docs/resources/channel#overwrite-object
+ */
+ permission_overwrites?: APIOverwrite[];
+ /**
+ * Sorting position of the channel
+ */
+ position: number;
+ /**
+ * ID of the parent category for a channel (each parent category can contain up to 50 channels)
+ */
+ parent_id?: Snowflake | null;
+ /**
+ * Whether the channel is nsfw
+ */
+ nsfw?: boolean;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildTextChannel<T extends GuildTextChannelType> extends APITextBasedChannel<T>, APIGuildChannel<T> {
+ /**
+ * The channel topic (0-1024 characters)
+ */
+ topic?: string | null;
+ /**
+ * When the last pinned message was pinned.
+ * This may be `null` in events such as `GUILD_CREATE` when a message is not pinned
+ */
+ last_pin_timestamp?: string | null;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APITextChannel extends APIGuildTextChannel<ChannelType.GuildText> {
+ /**
+ * Amount of seconds a user has to wait before sending another message (0-21600);
+ * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
+ */
+ rate_limit_per_user?: number;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildNews>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIGuildCategoryChannel = APIGuildChannel<ChannelType.GuildCategory>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIGuildStoreChannel = APIGuildChannel<ChannelType.GuildStore>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageVoice | ChannelType.GuildVoice> {
+ /**
+ * The bitrate (in bits) of the voice channel
+ */
+ bitrate?: number;
+ /**
+ * The user limit of the voice channel
+ */
+ user_limit?: number;
+ /**
+ * Voice region id for the voice or stage channel, automatic when set to `null`
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-region-object
+ */
+ rtc_region?: string | null;
+ /**
+ * The camera video quality mode of the voice channel, `1` when not present
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes
+ */
+ video_quality_mode?: VideoQualityMode;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+interface APIDMChannelBase<T extends ChannelType> extends APITextBasedChannel<T> {
+ /**
+ * The recipients of the DM
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ recipients?: APIUser[];
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIDMChannel = APIDMChannelBase<ChannelType.DM>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGroupDMChannel extends APIDMChannelBase<ChannelType.GroupDM> {
+ /**
+ * Application id of the group DM creator if it is bot-created
+ */
+ application_id?: Snowflake;
+ /**
+ * Icon hash
+ */
+ icon?: string | null;
+ /**
+ * ID of the DM creator
+ */
+ owner_id?: Snowflake;
+ /**
+ * The id of the last message sent in this channel (may not point to an existing or valid message)
+ */
+ last_message_id?: Snowflake | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIChannel = APIGroupDMChannel | APIDMChannel | APITextChannel | APINewsChannel | APIGuildStoreChannel | APIVoiceChannel | APIGuildCategoryChannel | APINewsChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object-channel-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum ChannelType {
+ /**
+ * A text channel within a guild
+ */
+ GuildText = 0,
+ /**
+ * A direct message between users
+ */
+ DM = 1,
+ /**
+ * A voice channel within a guild
+ */
+ GuildVoice = 2,
+ /**
+ * A direct message between multiple users
+ */
+ GroupDM = 3,
+ /**
+ * An organizational category that contains up to 50 channels
+ *
+ * See https://support.discord.com/hc/en-us/articles/115001580171-Channel-Categories-101
+ */
+ GuildCategory = 4,
+ /**
+ * A channel that users can follow and crosspost into their own guild
+ *
+ * See https://support.discord.com/hc/en-us/articles/360032008192
+ */
+ GuildNews = 5,
+ /**
+ * A channel in which game developers can sell their game on Discord
+ *
+ * See https://discord.com/developers/docs/game-and-server-management/special-channels
+ */
+ GuildStore = 6,
+ /**
+ * A voice channel for hosting events with an audience
+ *
+ * See https://support.discord.com/hc/en-us/articles/1500005513722
+ */
+ GuildStageVoice = 13
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum VideoQualityMode {
+ /**
+ * Discord chooses the quality for optimal performance
+ */
+ Auto = 1,
+ /**
+ * 720p
+ */
+ Full = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIMessage {
+ /**
+ * ID of the message
+ */
+ id: Snowflake;
+ /**
+ * ID of the channel the message was sent in
+ */
+ channel_id: Snowflake;
+ /**
+ * ID of the guild the message was sent in
+ */
+ guild_id?: Snowflake;
+ /**
+ * The author of this message (only a valid user in the case where the message is generated by a user or bot user)
+ *
+ * If the message is generated by a webhook, the author object corresponds to the webhook's id,
+ * username, and avatar. You can tell if a message is generated by a webhook by checking for the `webhook_id` property
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ author: APIUser;
+ /**
+ * Member properties for this message's author
+ *
+ * The member object exists in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
+ * from text-based guild channels
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ member?: APIGuildMember;
+ /**
+ * Contents of the message
+ */
+ content: string;
+ /**
+ * When this message was sent
+ */
+ timestamp: string;
+ /**
+ * When this message was edited (or null if never)
+ */
+ edited_timestamp: string | null;
+ /**
+ * Whether this was a TTS message
+ */
+ tts: boolean;
+ /**
+ * Whether this message mentions everyone
+ */
+ mention_everyone: boolean;
+ /**
+ * Users specifically mentioned in the message
+ *
+ * The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
+ * from text-based guild channels
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ mentions: (APIUser & {
+ member?: Omit<APIGuildMember, 'user'>;
+ })[];
+ /**
+ * Roles specifically mentioned in this message
+ *
+ * See https://discord.com/developers/docs/topics/permissions#role-object
+ */
+ mention_roles: APIRole['id'][];
+ /**
+ * Channels specifically mentioned in this message
+ *
+ * Not all channel mentions in a message will appear in `mention_channels`.
+ * - Only textual channels that are visible to everyone in a lurkable guild will ever be included
+ * - Only crossposted messages (via Channel Following) currently include `mention_channels` at all
+ *
+ * If no mentions in the message meet these requirements, this field will not be sent
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-mention-object
+ */
+ mention_channels?: APIChannelMention[];
+ /**
+ * Any attached files
+ *
+ * See https://discord.com/developers/docs/resources/channel#attachment-object
+ */
+ attachments: APIAttachment[];
+ /**
+ * Any embedded content
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object
+ */
+ embeds: APIEmbed[];
+ /**
+ * Reactions to the message
+ *
+ * See https://discord.com/developers/docs/resources/channel#reaction-object
+ */
+ reactions?: APIReaction[];
+ /**
+ * A nonce that can be used for optimistic message sending (up to 25 characters)
+ *
+ * **You will not receive this from further fetches. This is received only once from a `MESSAGE_CREATE`
+ * event to ensure it got sent**
+ */
+ nonce?: string | number;
+ /**
+ * Whether this message is pinned
+ */
+ pinned: boolean;
+ /**
+ * If the message is generated by a webhook, this is the webhook's id
+ */
+ webhook_id?: Snowflake;
+ /**
+ * Type of message
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-types
+ */
+ type: MessageType;
+ /**
+ * Sent with Rich Presence-related chat embeds
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure
+ */
+ activity?: APIMessageActivity;
+ /**
+ * Sent with Rich Presence-related chat embeds
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-application-structure
+ */
+ application?: Partial<APIApplication>;
+ /**
+ * If the message is a response to an Interaction, this is the id of the interaction's application
+ */
+ application_id?: Snowflake;
+ /**
+ * Reference data sent with crossposted messages, replies, pins, and thread starter messages
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-reference-structure
+ */
+ message_reference?: APIMessageReference;
+ /**
+ * Message flags combined as a bitfield
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-flags
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ flags?: MessageFlags;
+ /**
+ * The message associated with the `message_reference`
+ *
+ * This field is only returned for messages with a `type` of `19` (REPLY).
+ *
+ * If the message is a reply but the `referenced_message` field is not present,
+ * the backend did not attempt to fetch the message that was being replied to,
+ * so its state is unknown.
+ *
+ * If the field exists but is `null`, the referenced message was deleted
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object
+ */
+ referenced_message?: APIMessage | null;
+ /**
+ * Sent if the message is a response to an Interaction
+ */
+ interaction?: APIMessageInteraction;
+ /**
+ * Sent if the message contains components like buttons, action rows, or other interactive components
+ */
+ components?: APIActionRowComponent<APIMessageActionRowComponent>[];
+ /**
+ * Sent if the message contains stickers
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-item-object
+ */
+ sticker_items?: APIStickerItem[];
+ /**
+ * The stickers sent with the message
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object
+ *
+ * @deprecated Use `sticker_items` instead
+ */
+ stickers?: APISticker[];
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum MessageType {
+ Default = 0,
+ RecipientAdd = 1,
+ RecipientRemove = 2,
+ Call = 3,
+ ChannelNameChange = 4,
+ ChannelIconChange = 5,
+ ChannelPinnedMessage = 6,
+ GuildMemberJoin = 7,
+ UserPremiumGuildSubscription = 8,
+ UserPremiumGuildSubscriptionTier1 = 9,
+ UserPremiumGuildSubscriptionTier2 = 10,
+ UserPremiumGuildSubscriptionTier3 = 11,
+ ChannelFollowAdd = 12,
+ GuildDiscoveryDisqualified = 14,
+ GuildDiscoveryRequalified = 15,
+ GuildDiscoveryGracePeriodInitialWarning = 16,
+ GuildDiscoveryGracePeriodFinalWarning = 17,
+ Reply = 19,
+ ChatInputCommand = 20,
+ GuildInviteReminder = 22,
+ ContextMenuCommand = 23
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIMessageActivity {
+ /**
+ * Type of message activity
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
+ */
+ type: MessageActivityType;
+ /**
+ * `party_id` from a Rich Presence event
+ *
+ * See https://discord.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields
+ */
+ party_id?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-reference-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIMessageReference {
+ /**
+ * ID of the originating message
+ */
+ message_id?: Snowflake;
+ /**
+ * ID of the originating message's channel
+ */
+ channel_id: Snowflake;
+ /**
+ * ID of the originating message's guild
+ */
+ guild_id?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum MessageActivityType {
+ Join = 1,
+ Spectate = 2,
+ Listen = 3,
+ JoinRequest = 5
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-flags
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum MessageFlags {
+ /**
+ * This message has been published to subscribed channels (via Channel Following)
+ */
+ Crossposted = 1,
+ /**
+ * This message originated from a message in another channel (via Channel Following)
+ */
+ IsCrosspost = 2,
+ /**
+ * Do not include any embeds when serializing this message
+ */
+ SuppressEmbeds = 4,
+ /**
+ * The source message for this crosspost has been deleted (via Channel Following)
+ */
+ SourceMessageDeleted = 8,
+ /**
+ * This message came from the urgent message system
+ */
+ Urgent = 16,
+ /**
+ * This message is only visible to the user who invoked the Interaction
+ */
+ Ephemeral = 64,
+ /**
+ * This message is an Interaction Response and the bot is "thinking"
+ */
+ Loading = 128
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#followed-channel-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIFollowedChannel {
+ /**
+ * Source channel id
+ */
+ channel_id: Snowflake;
+ /**
+ * Created target webhook id
+ */
+ webhook_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIReaction {
+ /**
+ * Times this emoji has been used to react
+ */
+ count: number;
+ /**
+ * Whether the current user reacted using this emoji
+ */
+ me: boolean;
+ /**
+ * Emoji information
+ *
+ * See https://discord.com/developers/docs/resources/emoji#emoji-object
+ */
+ emoji: APIPartialEmoji;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIOverwrite {
+ /**
+ * Role or user id
+ */
+ id: Snowflake;
+ /**
+ * Either 0 (role) or 1 (member)
+ *
+ * {@link OverwriteType}
+ */
+ type: OverwriteType;
+ /**
+ * Permission bit set
+ *
+ * See https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ allow: Permissions;
+ /**
+ * Permission bit set
+ *
+ * See https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ deny: Permissions;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum OverwriteType {
+ Role = 0,
+ Member = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-structure
+ *
+ * Length limit: 6000 characters
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIEmbed {
+ /**
+ * Title of embed
+ *
+ * Length limit: 256 characters
+ */
+ title?: string;
+ /**
+ * Type of embed (always "rich" for webhook embeds)
+ *
+ * @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-types
+ */
+ type?: EmbedType;
+ /**
+ * Description of embed
+ *
+ * Length limit: 4096 characters
+ */
+ description?: string;
+ /**
+ * URL of embed
+ */
+ url?: string;
+ /**
+ * Timestamp of embed content
+ */
+ timestamp?: string;
+ /**
+ * Color code of the embed
+ */
+ color?: number;
+ /**
+ * Footer information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure
+ */
+ footer?: APIEmbedFooter;
+ /**
+ * Image information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure
+ */
+ image?: APIEmbedImage;
+ /**
+ * Thumbnail information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure
+ */
+ thumbnail?: APIEmbedThumbnail;
+ /**
+ * Video information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure
+ */
+ video?: APIEmbedVideo;
+ /**
+ * Provider information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure
+ */
+ provider?: APIEmbedProvider;
+ /**
+ * Author information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure
+ */
+ author?: APIEmbedAuthor;
+ /**
+ * Fields information
+ *
+ * Length limit: 25 field objects
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure
+ */
+ fields?: APIEmbedField[];
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-types
+ *
+ * @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum EmbedType {
+ /**
+ * Generic embed rendered from embed attributes
+ */
+ Rich = "rich",
+ /**
+ * Image embed
+ */
+ Image = "image",
+ /**
+ * Video embed
+ */
+ Video = "video",
+ /**
+ * Animated gif image embed rendered as a video embed
+ */
+ GIFV = "gifv",
+ /**
+ * Article embed
+ */
+ Article = "article",
+ /**
+ * Link embed
+ */
+ Link = "link"
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIEmbedThumbnail {
+ /**
+ * Source url of thumbnail (only supports http(s) and attachments)
+ */
+ url: string;
+ /**
+ * A proxied url of the thumbnail
+ */
+ proxy_url?: string;
+ /**
+ * Height of thumbnail
+ */
+ height?: number;
+ /**
+ * Width of thumbnail
+ */
+ width?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIEmbedVideo {
+ /**
+ * Source url of video
+ */
+ url?: string;
+ /**
+ * Height of video
+ */
+ height?: number;
+ /**
+ * Width of video
+ */
+ width?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIEmbedImage {
+ /**
+ * Source url of image (only supports http(s) and attachments)
+ */
+ url: string;
+ /**
+ * A proxied url of the image
+ */
+ proxy_url?: string;
+ /**
+ * Height of image
+ */
+ height?: number;
+ /**
+ * Width of image
+ */
+ width?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIEmbedProvider {
+ /**
+ * Name of provider
+ */
+ name?: string;
+ /**
+ * URL of provider
+ */
+ url?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIEmbedAuthor {
+ /**
+ * Name of author
+ *
+ * Length limit: 256 characters
+ */
+ name: string;
+ /**
+ * URL of author
+ */
+ url?: string;
+ /**
+ * URL of author icon (only supports http(s) and attachments)
+ */
+ icon_url?: string;
+ /**
+ * A proxied url of author icon
+ */
+ proxy_icon_url?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIEmbedFooter {
+ /**
+ * Footer text
+ *
+ * Length limit: 2048 characters
+ */
+ text: string;
+ /**
+ * URL of footer icon (only supports http(s) and attachments)
+ */
+ icon_url?: string;
+ /**
+ * A proxied url of footer icon
+ */
+ proxy_icon_url?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIEmbedField {
+ /**
+ * Name of the field
+ *
+ * Length limit: 256 characters
+ */
+ name: string;
+ /**
+ * Value of the field
+ *
+ * Length limit: 1024 characters
+ */
+ value: string;
+ /**
+ * Whether or not this field should display inline
+ */
+ inline?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIAttachment {
+ /**
+ * Attachment id
+ */
+ id: Snowflake;
+ /**
+ * Name of file attached
+ */
+ filename: string;
+ /**
+ * Description for the file
+ */
+ description?: string;
+ /**
+ * The attachment's media type
+ *
+ * See https://en.wikipedia.org/wiki/Media_type
+ */
+ content_type?: string;
+ /**
+ * Size of file in bytes
+ */
+ size: number;
+ /**
+ * Source url of file
+ */
+ url: string;
+ /**
+ * A proxied url of file
+ */
+ proxy_url: string;
+ /**
+ * Height of file (if image)
+ */
+ height?: number | null;
+ /**
+ * Width of file (if image)
+ */
+ width?: number | null;
+ /**
+ * Whether this attachment is ephemeral
+ */
+ ephemeral?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-mention-object-channel-mention-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIChannelMention {
+ /**
+ * ID of the channel
+ */
+ id: Snowflake;
+ /**
+ * ID of the guild containing the channel
+ */
+ guild_id: Snowflake;
+ /**
+ * The type of channel
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object-channel-types
+ */
+ type: ChannelType;
+ /**
+ * The name of the channel
+ */
+ name: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum AllowedMentionsTypes {
+ /**
+ * Controls @everyone and @here mentions
+ */
+ Everyone = "everyone",
+ /**
+ * Controls role mentions
+ */
+ Role = "roles",
+ /**
+ * Controls user mentions
+ */
+ User = "users"
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mentions-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIAllowedMentions {
+ /**
+ * An array of allowed mention types to parse from the content
+ *
+ * See https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types
+ */
+ parse?: AllowedMentionsTypes[];
+ /**
+ * Array of role_ids to mention (Max size of 100)
+ */
+ roles?: Snowflake[];
+ /**
+ * Array of user_ids to mention (Max size of 100)
+ */
+ users?: Snowflake[];
+ /**
+ * For replies, whether to mention the author of the message being replied to (default false)
+ *
+ * @default false
+ */
+ replied_user?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#component-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIBaseComponent<T extends ComponentType> {
+ /**
+ * The type of the component
+ */
+ type: T;
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#component-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum ComponentType {
+ /**
+ * Action Row component
+ */
+ ActionRow = 1,
+ /**
+ * Button component
+ */
+ Button = 2,
+ /**
+ * Select Menu component
+ */
+ SelectMenu = 3,
+ /**
+ * Text Input component
+ */
+ TextInput = 4
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#action-rows
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIActionRowComponent<T extends APIActionRowComponentTypes> extends APIBaseComponent<ComponentType.ActionRow> {
+ /**
+ * The components in the ActionRow
+ */
+ components: T[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#buttons
+ */
+interface APIButtonComponentBase<Style extends ButtonStyle> extends APIBaseComponent<ComponentType.Button> {
+ /**
+ * The label to be displayed on the button
+ */
+ label?: string;
+ /**
+ * The style of the button
+ */
+ style: Style;
+ /**
+ * The emoji to display to the left of the text
+ */
+ emoji?: APIMessageComponentEmoji;
+ /**
+ * The status of the button
+ */
+ disabled?: boolean;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIMessageComponentEmoji {
+ /**
+ * Emoji id
+ */
+ id?: Snowflake;
+ /**
+ * Emoji name
+ */
+ name?: string;
+ /**
+ * Whether this emoji is animated
+ */
+ animated?: boolean;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIButtonComponentWithCustomId extends APIButtonComponentBase<ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success | ButtonStyle.Danger> {
+ /**
+ * The custom_id to be sent in the interaction when clicked
+ */
+ custom_id: string;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIButtonComponentWithURL extends APIButtonComponentBase<ButtonStyle.Link> {
+ /**
+ * The URL to direct users to when clicked for Link buttons
+ */
+ url: string;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIButtonComponent = APIButtonComponentWithCustomId | APIButtonComponentWithURL;
+/**
+ * https://discord.com/developers/docs/interactions/message-components#button-object-button-styles
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum ButtonStyle {
+ Primary = 1,
+ Secondary = 2,
+ Success = 3,
+ Danger = 4,
+ Link = 5
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-styles
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum TextInputStyle {
+ Short = 1,
+ Paragraph = 2
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menus
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APISelectMenuComponent extends APIBaseComponent<ComponentType.SelectMenu> {
+ /**
+ * A developer-defined identifier for the select menu, max 100 characters
+ */
+ custom_id: string;
+ /**
+ * The choices in the select, max 25
+ */
+ options: APISelectMenuOption[];
+ /**
+ * Custom placeholder text if nothing is selected, max 100 characters
+ */
+ placeholder?: string;
+ /**
+ * The minimum number of items that must be chosen; min 0, max 25
+ *
+ * @default 1
+ */
+ min_values?: number;
+ /**
+ * The maximum number of items that can be chosen; max 25
+ *
+ * @default 1
+ */
+ max_values?: number;
+ /**
+ * Disable the select
+ *
+ * @default false
+ */
+ disabled?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-option-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APISelectMenuOption {
+ /**
+ * The user-facing name of the option (max 25 chars)
+ */
+ label: string;
+ /**
+ * The dev-defined value of the option (max 100 chars)
+ */
+ value: string;
+ /**
+ * An additional description of the option (max 50 chars)
+ */
+ description?: string;
+ /**
+ * The emoji to display to the left of the option
+ */
+ emoji?: APIMessageComponentEmoji;
+ /**
+ * Whether this option should be already-selected by default
+ */
+ default?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APITextInputComponent extends APIBaseComponent<ComponentType.TextInput> {
+ /**
+ * One of text input styles
+ */
+ style: TextInputStyle;
+ /**
+ * The custom id for the text input
+ */
+ custom_id: string;
+ /**
+ * Text that appears on top of the text input field, max 45 characters
+ */
+ label: string;
+ /**
+ * Placeholder for the text input
+ */
+ placeholder?: string;
+ /**
+ * The pre-filled text in the text input
+ */
+ value?: string;
+ /**
+ * Minimal length of text input
+ */
+ min_length?: number;
+ /**
+ * Maximal length of text input
+ */
+ max_length?: number;
+ /**
+ * Whether or not this text input is required or not
+ */
+ required?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#message-components
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIMessageComponent = APIMessageActionRowComponent | APIActionRowComponent<APIMessageActionRowComponent>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIModalComponent = APIModalActionRowComponent | APIActionRowComponent<APIModalActionRowComponent>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIActionRowComponentTypes = APIMessageActionRowComponent | APIModalActionRowComponent;
+/**
+ * https://discord.com/developers/docs/interactions/message-components#message-components
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIMessageActionRowComponent = APIButtonComponent | APISelectMenuComponent;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIModalActionRowComponent = APITextInputComponent;
+export {};
+//# sourceMappingURL=channel.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/channel.d.ts.map b/node_modules/discord-api-types/payloads/v8/channel.d.ts.map
new file mode 100644
index 0000000..a4def6c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/channel.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,S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ACH,MAAM,MAAM,4BAA4B,GAAG,kBAAkB,GAAG,sBAAsB,CAAC;AAGvF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/channel.js b/node_modules/discord-api-types/payloads/v8/channel.js
new file mode 100644
index 0000000..91d2331
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/channel.js
@@ -0,0 +1,254 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/channel
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.TextInputStyle = exports.ButtonStyle = exports.ComponentType = exports.AllowedMentionsTypes = exports.EmbedType = exports.OverwriteType = exports.MessageFlags = exports.MessageActivityType = exports.MessageType = exports.VideoQualityMode = exports.ChannelType = void 0;
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object-channel-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var ChannelType;
+(function (ChannelType) {
+ /**
+ * A text channel within a guild
+ */
+ ChannelType[ChannelType["GuildText"] = 0] = "GuildText";
+ /**
+ * A direct message between users
+ */
+ ChannelType[ChannelType["DM"] = 1] = "DM";
+ /**
+ * A voice channel within a guild
+ */
+ ChannelType[ChannelType["GuildVoice"] = 2] = "GuildVoice";
+ /**
+ * A direct message between multiple users
+ */
+ ChannelType[ChannelType["GroupDM"] = 3] = "GroupDM";
+ /**
+ * An organizational category that contains up to 50 channels
+ *
+ * See https://support.discord.com/hc/en-us/articles/115001580171-Channel-Categories-101
+ */
+ ChannelType[ChannelType["GuildCategory"] = 4] = "GuildCategory";
+ /**
+ * A channel that users can follow and crosspost into their own guild
+ *
+ * See https://support.discord.com/hc/en-us/articles/360032008192
+ */
+ ChannelType[ChannelType["GuildNews"] = 5] = "GuildNews";
+ /**
+ * A channel in which game developers can sell their game on Discord
+ *
+ * See https://discord.com/developers/docs/game-and-server-management/special-channels
+ */
+ ChannelType[ChannelType["GuildStore"] = 6] = "GuildStore";
+ /**
+ * A voice channel for hosting events with an audience
+ *
+ * See https://support.discord.com/hc/en-us/articles/1500005513722
+ */
+ ChannelType[ChannelType["GuildStageVoice"] = 13] = "GuildStageVoice";
+})(ChannelType = exports.ChannelType || (exports.ChannelType = {}));
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var VideoQualityMode;
+(function (VideoQualityMode) {
+ /**
+ * Discord chooses the quality for optimal performance
+ */
+ VideoQualityMode[VideoQualityMode["Auto"] = 1] = "Auto";
+ /**
+ * 720p
+ */
+ VideoQualityMode[VideoQualityMode["Full"] = 2] = "Full";
+})(VideoQualityMode = exports.VideoQualityMode || (exports.VideoQualityMode = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var MessageType;
+(function (MessageType) {
+ MessageType[MessageType["Default"] = 0] = "Default";
+ MessageType[MessageType["RecipientAdd"] = 1] = "RecipientAdd";
+ MessageType[MessageType["RecipientRemove"] = 2] = "RecipientRemove";
+ MessageType[MessageType["Call"] = 3] = "Call";
+ MessageType[MessageType["ChannelNameChange"] = 4] = "ChannelNameChange";
+ MessageType[MessageType["ChannelIconChange"] = 5] = "ChannelIconChange";
+ MessageType[MessageType["ChannelPinnedMessage"] = 6] = "ChannelPinnedMessage";
+ MessageType[MessageType["GuildMemberJoin"] = 7] = "GuildMemberJoin";
+ MessageType[MessageType["UserPremiumGuildSubscription"] = 8] = "UserPremiumGuildSubscription";
+ MessageType[MessageType["UserPremiumGuildSubscriptionTier1"] = 9] = "UserPremiumGuildSubscriptionTier1";
+ MessageType[MessageType["UserPremiumGuildSubscriptionTier2"] = 10] = "UserPremiumGuildSubscriptionTier2";
+ MessageType[MessageType["UserPremiumGuildSubscriptionTier3"] = 11] = "UserPremiumGuildSubscriptionTier3";
+ MessageType[MessageType["ChannelFollowAdd"] = 12] = "ChannelFollowAdd";
+ MessageType[MessageType["GuildDiscoveryDisqualified"] = 14] = "GuildDiscoveryDisqualified";
+ MessageType[MessageType["GuildDiscoveryRequalified"] = 15] = "GuildDiscoveryRequalified";
+ MessageType[MessageType["GuildDiscoveryGracePeriodInitialWarning"] = 16] = "GuildDiscoveryGracePeriodInitialWarning";
+ MessageType[MessageType["GuildDiscoveryGracePeriodFinalWarning"] = 17] = "GuildDiscoveryGracePeriodFinalWarning";
+ MessageType[MessageType["Reply"] = 19] = "Reply";
+ MessageType[MessageType["ChatInputCommand"] = 20] = "ChatInputCommand";
+ MessageType[MessageType["GuildInviteReminder"] = 22] = "GuildInviteReminder";
+ MessageType[MessageType["ContextMenuCommand"] = 23] = "ContextMenuCommand";
+})(MessageType = exports.MessageType || (exports.MessageType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var MessageActivityType;
+(function (MessageActivityType) {
+ MessageActivityType[MessageActivityType["Join"] = 1] = "Join";
+ MessageActivityType[MessageActivityType["Spectate"] = 2] = "Spectate";
+ MessageActivityType[MessageActivityType["Listen"] = 3] = "Listen";
+ MessageActivityType[MessageActivityType["JoinRequest"] = 5] = "JoinRequest";
+})(MessageActivityType = exports.MessageActivityType || (exports.MessageActivityType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-flags
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var MessageFlags;
+(function (MessageFlags) {
+ /**
+ * This message has been published to subscribed channels (via Channel Following)
+ */
+ MessageFlags[MessageFlags["Crossposted"] = 1] = "Crossposted";
+ /**
+ * This message originated from a message in another channel (via Channel Following)
+ */
+ MessageFlags[MessageFlags["IsCrosspost"] = 2] = "IsCrosspost";
+ /**
+ * Do not include any embeds when serializing this message
+ */
+ MessageFlags[MessageFlags["SuppressEmbeds"] = 4] = "SuppressEmbeds";
+ /**
+ * The source message for this crosspost has been deleted (via Channel Following)
+ */
+ MessageFlags[MessageFlags["SourceMessageDeleted"] = 8] = "SourceMessageDeleted";
+ /**
+ * This message came from the urgent message system
+ */
+ MessageFlags[MessageFlags["Urgent"] = 16] = "Urgent";
+ /**
+ * This message is only visible to the user who invoked the Interaction
+ */
+ MessageFlags[MessageFlags["Ephemeral"] = 64] = "Ephemeral";
+ /**
+ * This message is an Interaction Response and the bot is "thinking"
+ */
+ MessageFlags[MessageFlags["Loading"] = 128] = "Loading";
+})(MessageFlags = exports.MessageFlags || (exports.MessageFlags = {}));
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var OverwriteType;
+(function (OverwriteType) {
+ OverwriteType[OverwriteType["Role"] = 0] = "Role";
+ OverwriteType[OverwriteType["Member"] = 1] = "Member";
+})(OverwriteType = exports.OverwriteType || (exports.OverwriteType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-types
+ *
+ * @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var EmbedType;
+(function (EmbedType) {
+ /**
+ * Generic embed rendered from embed attributes
+ */
+ EmbedType["Rich"] = "rich";
+ /**
+ * Image embed
+ */
+ EmbedType["Image"] = "image";
+ /**
+ * Video embed
+ */
+ EmbedType["Video"] = "video";
+ /**
+ * Animated gif image embed rendered as a video embed
+ */
+ EmbedType["GIFV"] = "gifv";
+ /**
+ * Article embed
+ */
+ EmbedType["Article"] = "article";
+ /**
+ * Link embed
+ */
+ EmbedType["Link"] = "link";
+})(EmbedType = exports.EmbedType || (exports.EmbedType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var AllowedMentionsTypes;
+(function (AllowedMentionsTypes) {
+ /**
+ * Controls @everyone and @here mentions
+ */
+ AllowedMentionsTypes["Everyone"] = "everyone";
+ /**
+ * Controls role mentions
+ */
+ AllowedMentionsTypes["Role"] = "roles";
+ /**
+ * Controls user mentions
+ */
+ AllowedMentionsTypes["User"] = "users";
+})(AllowedMentionsTypes = exports.AllowedMentionsTypes || (exports.AllowedMentionsTypes = {}));
+/**
+ * https://discord.com/developers/docs/interactions/message-components#component-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var ComponentType;
+(function (ComponentType) {
+ /**
+ * Action Row component
+ */
+ ComponentType[ComponentType["ActionRow"] = 1] = "ActionRow";
+ /**
+ * Button component
+ */
+ ComponentType[ComponentType["Button"] = 2] = "Button";
+ /**
+ * Select Menu component
+ */
+ ComponentType[ComponentType["SelectMenu"] = 3] = "SelectMenu";
+ /**
+ * Text Input component
+ */
+ ComponentType[ComponentType["TextInput"] = 4] = "TextInput";
+})(ComponentType = exports.ComponentType || (exports.ComponentType = {}));
+/**
+ * https://discord.com/developers/docs/interactions/message-components#button-object-button-styles
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var ButtonStyle;
+(function (ButtonStyle) {
+ ButtonStyle[ButtonStyle["Primary"] = 1] = "Primary";
+ ButtonStyle[ButtonStyle["Secondary"] = 2] = "Secondary";
+ ButtonStyle[ButtonStyle["Success"] = 3] = "Success";
+ ButtonStyle[ButtonStyle["Danger"] = 4] = "Danger";
+ ButtonStyle[ButtonStyle["Link"] = 5] = "Link";
+})(ButtonStyle = exports.ButtonStyle || (exports.ButtonStyle = {}));
+/**
+ * https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-styles
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var TextInputStyle;
+(function (TextInputStyle) {
+ TextInputStyle[TextInputStyle["Short"] = 1] = "Short";
+ TextInputStyle[TextInputStyle["Paragraph"] = 2] = "Paragraph";
+})(TextInputStyle = exports.TextInputStyle || (exports.TextInputStyle = {}));
+//# sourceMappingURL=channel.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/channel.js.map b/node_modules/discord-api-types/payloads/v8/channel.js.map
new file mode 100644
index 0000000..388bb63
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/channel.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAmOH;;;;GAIG;AACH,IAAY,WAyCX;AAzCD,WAAY,WAAW;IACtB;;OAEG;IACH,uDAAS,CAAA;IACT;;OAEG;IACH,yCAAE,CAAA;IACF;;OAEG;IACH,yDAAU,CAAA;IACV;;OAEG;IACH,mDAAO,CAAA;IACP;;;;OAIG;IACH,+DAAa,CAAA;IACb;;;;OAIG;IACH,uDAAS,CAAA;IACT;;;;OAIG;IACH,yDAAU,CAAA;IACV;;;;OAIG;IACH,oEAAoB,CAAA;AACrB,CAAC,EAzCW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAyCtB;AAED;;GAEG;AACH,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC3B;;OAEG;IACH,uDAAQ,CAAA;IACR;;OAEG;IACH,uDAAI,CAAA;AACL,CAAC,EATW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAS3B;AAiMD;;;;GAIG;AACH,IAAY,WAsBX;AAtBD,WAAY,WAAW;IACtB,mDAAO,CAAA;IACP,6DAAY,CAAA;IACZ,mEAAe,CAAA;IACf,6CAAI,CAAA;IACJ,uEAAiB,CAAA;IACjB,uEAAiB,CAAA;IACjB,6EAAoB,CAAA;IACpB,mEAAe,CAAA;IACf,6FAA4B,CAAA;IAC5B,uGAAiC,CAAA;IACjC,wGAAiC,CAAA;IACjC,wGAAiC,CAAA;IACjC,sEAAgB,CAAA;IAChB,0FAA+B,CAAA;IAC/B,wFAAyB,CAAA;IACzB,oHAAuC,CAAA;IACvC,gHAAqC,CAAA;IACrC,gDAAU,CAAA;IACV,sEAAgB,CAA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AACf,CAAC,EAbW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAa/B;AA0CD;;;;GAIG;AACH,IAAY,aAiBX;AAjBD,WAAY,aAAa;IACxB;;OAEG;IACH,2DAAa,CAAA;IACb;;OAEG;IACH,qDAAM,CAAA;IACN;;OAEG;IACH,6DAAU,CAAA;IACV;;OAEG;IACH,2DAAS,CAAA;AACV,CAAC,EAjBW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAiBxB;AAmFD;;;;GAIG;AACH,IAAY,WAMX;AAND,WAAY,WAAW;IACtB,mDAAW,CAAA;IACX,uDAAS,CAAA;IACT,mDAAO,CAAA;IACP,iDAAM,CAAA;IACN,6CAAI,CAAA;AACL,CAAC,EANW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAMtB;AAED;;;;GAIG;AACH,IAAY,cAGX;AAHD,WAAY,cAAc;IACzB,qDAAS,CAAA;IACT,6DAAS,CAAA;AACV,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/emoji.d.ts b/node_modules/discord-api-types/payloads/v8/emoji.d.ts
new file mode 100644
index 0000000..672dae2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/emoji.d.ts
@@ -0,0 +1,53 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/emoji
+ */
+import type { Snowflake } from '../../globals';
+import type { APIRole } from './permissions';
+import type { APIUser } from './user';
+/**
+ * Not documented but mentioned
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIPartialEmoji {
+ /**
+ * Emoji id
+ */
+ id: Snowflake | null;
+ /**
+ * Emoji name (can be null only in reaction emoji objects)
+ */
+ name: string | null;
+ /**
+ * Whether this emoji is animated
+ */
+ animated?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIEmoji extends APIPartialEmoji {
+ /**
+ * Roles this emoji is whitelisted to
+ */
+ roles?: APIRole['id'][];
+ /**
+ * User that created this emoji
+ */
+ user?: APIUser;
+ /**
+ * Whether this emoji must be wrapped in colons
+ */
+ require_colons?: boolean;
+ /**
+ * Whether this emoji is managed
+ */
+ managed?: boolean;
+ /**
+ * Whether this emoji can be used, may be false due to loss of Server Boosts
+ */
+ available?: boolean;
+}
+//# sourceMappingURL=emoji.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/emoji.d.ts.map b/node_modules/discord-api-types/payloads/v8/emoji.d.ts.map
new file mode 100644
index 0000000..b30df0c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/emoji.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,EAAE,EAAE,SAAS,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,QAAS,SAAQ,eAAe;IAChD;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/emoji.js b/node_modules/discord-api-types/payloads/v8/emoji.js
new file mode 100644
index 0000000..a640b7e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/emoji.js
@@ -0,0 +1,6 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/emoji
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=emoji.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/emoji.js.map b/node_modules/discord-api-types/payloads/v8/emoji.js.map
new file mode 100644
index 0000000..9037967
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/emoji.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"emoji.js","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":";AAAA;;GAEG"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/gateway.d.ts b/node_modules/discord-api-types/payloads/v8/gateway.d.ts
new file mode 100644
index 0000000..142ec96
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/gateway.d.ts
@@ -0,0 +1,332 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/gateway
+ */
+import type { Snowflake } from '../../globals';
+import type { APIEmoji } from './emoji';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/topics/gateway#get-gateway
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGatewayInfo {
+ /**
+ * The WSS URL that can be used for connecting to the gateway
+ */
+ url: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#get-gateway-bot
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGatewayBotInfo extends APIGatewayInfo {
+ /**
+ * The recommended number of shards to use when connecting
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ shards: number;
+ /**
+ * Information on the current session start limit
+ *
+ * See https://discord.com/developers/docs/topics/gateway#session-start-limit-object
+ */
+ session_start_limit: APIGatewaySessionStartLimit;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#session-start-limit-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGatewaySessionStartLimit {
+ /**
+ * The total number of session starts the current user is allowed
+ */
+ total: number;
+ /**
+ * The remaining number of session starts the current user is allowed
+ */
+ remaining: number;
+ /**
+ * The number of milliseconds after which the limit resets
+ */
+ reset_after: number;
+ /**
+ * The number of identify requests allowed per 5 seconds
+ */
+ max_concurrency: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#presence-update-presence-update-event-fields
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayPresenceUpdate {
+ /**
+ * The user presence is being updated for
+ *
+ * **The user object within this event can be partial, the only field which must be sent is the `id` field,
+ * everything else is optional.**
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user: Partial<APIUser> & Pick<APIUser, 'id'>;
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * Either "idle", "dnd", "online", or "offline"
+ */
+ status?: PresenceUpdateStatus;
+ /**
+ * User's current activities
+ *
+ * See https://discord.com/developers/docs/topics/gateway#activity-object
+ */
+ activities?: GatewayActivity[];
+ /**
+ * User's platform-dependent status
+ *
+ * See https://discord.com/developers/docs/topics/gateway#client-status-object
+ */
+ client_status?: GatewayPresenceClientStatus;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum PresenceUpdateStatus {
+ Online = "online",
+ DoNotDisturb = "dnd",
+ Idle = "idle",
+ /**
+ * Invisible and shown as offline
+ */
+ Invisible = "invisible",
+ Offline = "offline"
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#client-status-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayPresenceClientStatus {
+ /**
+ * The user's status set for an active desktop (Windows, Linux, Mac) application session
+ */
+ desktop?: PresenceUpdateStatus;
+ /**
+ * The user's status set for an active mobile (iOS, Android) application session
+ */
+ mobile?: PresenceUpdateStatus;
+ /**
+ * The user's status set for an active web (browser, bot account) application session
+ */
+ web?: PresenceUpdateStatus;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayActivity {
+ /**
+ * The activity's id
+ */
+ id: string;
+ /**
+ * The activity's name
+ */
+ name: string;
+ /**
+ * Activity type
+ *
+ * See https://discord.com/developers/docs/topics/gateway#activity-object-activity-types
+ */
+ type: ActivityType;
+ /**
+ * Stream url, is validated when type is `1`
+ */
+ url?: string | null;
+ /**
+ * Unix timestamp of when the activity was added to the user's session
+ */
+ created_at: number;
+ /**
+ * Unix timestamps for start and/or end of the game
+ */
+ timestamps?: GatewayActivityTimestamps;
+ sync_id?: string;
+ platform?: ActivityPlatform;
+ /**
+ * Application id for the game
+ */
+ application_id?: Snowflake;
+ /**
+ * What the player is currently doing
+ */
+ details?: string | null;
+ /**
+ * The user's current party status
+ */
+ state?: string | null;
+ /**
+ * The emoji used for a custom status
+ *
+ * See https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji
+ */
+ emoji?: GatewayActivityEmoji;
+ session_id?: string;
+ /**
+ * Information for the current party of the player
+ *
+ * See https://discord.com/developers/docs/topics/gateway#activity-object-activity-party
+ */
+ party?: GatewayActivityParty;
+ /**
+ * Images for the presence and their hover texts
+ *
+ * See https://discord.com/developers/docs/topics/gateway#activity-object-activity-assets
+ */
+ assets?: GatewayActivityAssets;
+ /**
+ * Secrets for Rich Presence joining and spectating
+ *
+ * See https://discord.com/developers/docs/topics/gateway#activity-object-activity-secrets
+ */
+ secrets?: GatewayActivitySecrets;
+ /**
+ * Whether or not the activity is an instanced game session
+ */
+ instance?: boolean;
+ /**
+ * Activity flags `OR`d together, describes what the payload includes
+ *
+ * See https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ flags?: ActivityFlags;
+ /**
+ * The custom buttons shown in the Rich Presence (max 2)
+ */
+ buttons?: string[] | GatewayActivityButton[];
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum ActivityPlatform {
+ Desktop = "desktop",
+ Samsung = "samsung",
+ Xbox = "xbox"
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum ActivityType {
+ /**
+ * Playing {game}
+ */
+ Playing = 0,
+ /**
+ * Streaming {details}
+ */
+ Streaming = 1,
+ /**
+ * Listening to {name}
+ */
+ Listening = 2,
+ /**
+ * Watching {details}
+ */
+ Watching = 3,
+ /**
+ * {emoji} {details}
+ */
+ Custom = 4,
+ /**
+ * Competing in {name}
+ */
+ Competing = 5
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-timestamps
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayActivityTimestamps {
+ /**
+ * Unix time (in milliseconds) of when the activity started
+ */
+ start?: number;
+ /**
+ * Unix time (in milliseconds) of when the activity ends
+ */
+ end?: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'id' | 'animated'>> & Pick<APIEmoji, 'name'>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-party
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayActivityParty {
+ /**
+ * The id of the party
+ */
+ id?: string;
+ /**
+ * Used to show the party's current and maximum size
+ */
+ size?: [current_size: number, max_size: number];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-assets
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayActivityAssets = Partial<Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-secrets
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GatewayActivitySecrets = Partial<Record<'join' | 'spectate' | 'match', string>>;
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum ActivityFlags {
+ Instance = 1,
+ Join = 2,
+ Spectate = 4,
+ JoinRequest = 8,
+ Sync = 16,
+ Play = 32,
+ PartyPrivacyFriends = 64,
+ PartyPrivacyVoiceChannel = 128,
+ Embedded = 256
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayActivityButton {
+ /**
+ * The text shown on the button (1-32 characters)
+ */
+ label: string;
+ /**
+ * The url opened when clicking the button (1-512 characters)
+ */
+ url: string;
+}
+//# sourceMappingURL=gateway.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/gateway.d.ts.map b/node_modules/discord-api-types/payloads/v8/gateway.d.ts.map
new file mode 100644
index 0000000..db45e67
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/gateway.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EA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AA;IACN;;OAEG;IACH,SAAS,IAAA;CACT;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACzC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAEvG;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;CAChD;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAC1C,MAAM,CAAC,aAAa,GAAG,YAAY,GAAG,aAAa,GAAG,YAAY,EAAE,MAAM,CAAC,CAC3E,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,UAAU,GAAG,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAE5F;;;;GAIG;AACH,oBAAY,aAAa;IACxB,QAAQ,IAAS;IACjB,IAAI,IAAS;IACb,QAAQ,IAAS;IACjB,WAAW,IAAS;IACpB,IAAI,KAAS;IACb,IAAI,KAAS;IACb,mBAAmB,KAAS;IAC5B,wBAAwB,MAAS;IACjC,QAAQ,MAAS;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACZ"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/gateway.js b/node_modules/discord-api-types/payloads/v8/gateway.js
new file mode 100644
index 0000000..3e1a1ec
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/gateway.js
@@ -0,0 +1,79 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/gateway
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ActivityFlags = exports.ActivityType = exports.ActivityPlatform = exports.PresenceUpdateStatus = void 0;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var PresenceUpdateStatus;
+(function (PresenceUpdateStatus) {
+ PresenceUpdateStatus["Online"] = "online";
+ PresenceUpdateStatus["DoNotDisturb"] = "dnd";
+ PresenceUpdateStatus["Idle"] = "idle";
+ /**
+ * Invisible and shown as offline
+ */
+ PresenceUpdateStatus["Invisible"] = "invisible";
+ PresenceUpdateStatus["Offline"] = "offline";
+})(PresenceUpdateStatus = exports.PresenceUpdateStatus || (exports.PresenceUpdateStatus = {}));
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var ActivityPlatform;
+(function (ActivityPlatform) {
+ ActivityPlatform["Desktop"] = "desktop";
+ ActivityPlatform["Samsung"] = "samsung";
+ ActivityPlatform["Xbox"] = "xbox";
+})(ActivityPlatform = exports.ActivityPlatform || (exports.ActivityPlatform = {}));
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var ActivityType;
+(function (ActivityType) {
+ /**
+ * Playing {game}
+ */
+ ActivityType[ActivityType["Playing"] = 0] = "Playing";
+ /**
+ * Streaming {details}
+ */
+ ActivityType[ActivityType["Streaming"] = 1] = "Streaming";
+ /**
+ * Listening to {name}
+ */
+ ActivityType[ActivityType["Listening"] = 2] = "Listening";
+ /**
+ * Watching {details}
+ */
+ ActivityType[ActivityType["Watching"] = 3] = "Watching";
+ /**
+ * {emoji} {details}
+ */
+ ActivityType[ActivityType["Custom"] = 4] = "Custom";
+ /**
+ * Competing in {name}
+ */
+ ActivityType[ActivityType["Competing"] = 5] = "Competing";
+})(ActivityType = exports.ActivityType || (exports.ActivityType = {}));
+/**
+ * https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var ActivityFlags;
+(function (ActivityFlags) {
+ ActivityFlags[ActivityFlags["Instance"] = 1] = "Instance";
+ ActivityFlags[ActivityFlags["Join"] = 2] = "Join";
+ ActivityFlags[ActivityFlags["Spectate"] = 4] = "Spectate";
+ ActivityFlags[ActivityFlags["JoinRequest"] = 8] = "JoinRequest";
+ ActivityFlags[ActivityFlags["Sync"] = 16] = "Sync";
+ ActivityFlags[ActivityFlags["Play"] = 32] = "Play";
+ ActivityFlags[ActivityFlags["PartyPrivacyFriends"] = 64] = "PartyPrivacyFriends";
+ ActivityFlags[ActivityFlags["PartyPrivacyVoiceChannel"] = 128] = "PartyPrivacyVoiceChannel";
+ ActivityFlags[ActivityFlags["Embedded"] = 256] = "Embedded";
+})(ActivityFlags = exports.ActivityFlags || (exports.ActivityFlags = {}));
+//# sourceMappingURL=gateway.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/gateway.js.map b/node_modules/discord-api-types/payloads/v8/gateway.js.map
new file mode 100644
index 0000000..bd0204a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/gateway.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"gateway.js","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAmGH;;GAEG;AACH,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC/B,yCAAiB,CAAA;IACjB,4CAAoB,CAAA;IACpB,qCAAa,CAAA;IACb;;OAEG;IACH,+CAAuB,CAAA;IACvB,2CAAmB,CAAA;AACpB,CAAC,EATW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAS/B;AA+GD;;GAEG;AACH,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC3B,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,iCAAa,CAAA;AACd,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAED;;;;GAIG;AACH,IAAY,YAyBX;AAzBD,WAAY,YAAY;IACvB;;OAEG;IACH,qDAAO,CAAA;IACP;;OAEG;IACH,yDAAS,CAAA;IACT;;OAEG;IACH,yDAAS,CAAA;IACT;;OAEG;IACH,uDAAQ,CAAA;IACR;;OAEG;IACH,mDAAM,CAAA;IACN;;OAEG;IACH,yDAAS,CAAA;AACV,CAAC,EAzBW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAyBvB;AAyDD;;;;GAIG;AACH,IAAY,aAUX;AAVD,WAAY,aAAa;IACxB,yDAAiB,CAAA;IACjB,iDAAa,CAAA;IACb,yDAAiB,CAAA;IACjB,+DAAoB,CAAA;IACpB,kDAAa,CAAA;IACb,kDAAa,CAAA;IACb,gFAA4B,CAAA;IAC5B,2FAAiC,CAAA;IACjC,2DAAiB,CAAA;AAClB,CAAC,EAVW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAUxB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/guild.d.ts b/node_modules/discord-api-types/payloads/v8/guild.d.ts
new file mode 100644
index 0000000..ea672d9
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/guild.d.ts
@@ -0,0 +1,1001 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/guild
+ */
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIChannel } from './channel';
+import type { APIEmoji } from './emoji';
+import type { GatewayPresenceUpdate, PresenceUpdateStatus } from './gateway';
+import type { APIGuildScheduledEvent } from './guildScheduledEvent';
+import type { APIRole } from './permissions';
+import type { APIStageInstance } from './stageInstance';
+import type { APISticker } from './sticker';
+import type { APIUser } from './user';
+import type { GatewayVoiceState } from './voice';
+/**
+ * https://discord.com/developers/docs/resources/guild#unavailable-guild-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIUnavailableGuild {
+ /**
+ * Guild id
+ */
+ id: Snowflake;
+ /**
+ * `true` if this guild is unavailable due to an outage
+ */
+ unavailable: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'>, Pick<APIGuild, 'welcome_screen'> {
+ /**
+ * Guild name (2-100 characters, excluding trailing and leading whitespace)
+ */
+ name: string;
+ /**
+ * Icon hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ icon: string | null;
+ /**
+ * Splash hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ splash: string | null;
+ /**
+ * Banner hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ banner?: string | null;
+ /**
+ * The description for the guild, if the guild is discoverable
+ */
+ description?: string | null;
+ /**
+ * Enabled guild features
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ */
+ features?: GuildFeature[];
+ /**
+ * Verification level required for the guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ */
+ verification_level?: GuildVerificationLevel;
+ /**
+ * The vanity url code for the guild
+ */
+ vanity_url_code?: string | null;
+ /**
+ * `true` if this guild is unavailable due to an outage
+ */
+ unavailable?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuild extends APIPartialGuild {
+ /**
+ * Icon hash, returned when in the template object
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ icon_hash?: string | null;
+ /**
+ * Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ discovery_splash: string | null;
+ /**
+ * `true` if the user is the owner of the guild
+ *
+ * **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds**
+ */
+ owner?: boolean;
+ /**
+ * ID of owner
+ */
+ owner_id: Snowflake;
+ /**
+ * Total permissions for the user in the guild (excludes overrides)
+ *
+ * **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds**
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ permissions?: Permissions;
+ /**
+ * Voice region id for the guild
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-region-object
+ *
+ * @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
+ */
+ region: string;
+ /**
+ * ID of afk channel
+ */
+ afk_channel_id: Snowflake | null;
+ /**
+ * afk timeout in seconds
+ */
+ afk_timeout: number;
+ /**
+ * `true` if the guild widget is enabled
+ */
+ widget_enabled?: boolean;
+ /**
+ * The channel id that the widget will generate an invite to, or `null` if set to no invite
+ */
+ widget_channel_id?: Snowflake | null;
+ /**
+ * Verification level required for the guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ */
+ verification_level: GuildVerificationLevel;
+ /**
+ * Default message notifications level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
+ */
+ default_message_notifications: GuildDefaultMessageNotifications;
+ /**
+ * Explicit content filter level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
+ */
+ explicit_content_filter: GuildExplicitContentFilter;
+ /**
+ * Roles in the guild
+ *
+ * See https://discord.com/developers/docs/topics/permissions#role-object
+ */
+ roles: APIRole[];
+ /**
+ * Custom guild emojis
+ *
+ * See https://discord.com/developers/docs/resources/emoji#emoji-object
+ */
+ emojis: APIEmoji[];
+ /**
+ * Enabled guild features
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ */
+ features: GuildFeature[];
+ /**
+ * Required MFA level for the guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
+ */
+ mfa_level: GuildMFALevel;
+ /**
+ * Application id of the guild creator if it is bot-created
+ */
+ application_id: Snowflake | null;
+ /**
+ * The id of the channel where guild notices such as welcome messages and boost events are posted
+ */
+ system_channel_id: Snowflake | null;
+ /**
+ * System channel flags
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
+ */
+ system_channel_flags: GuildSystemChannelFlags;
+ /**
+ * The id of the channel where Community guilds can display rules and/or guidelines
+ */
+ rules_channel_id: Snowflake | null;
+ /**
+ * When this guild was joined at
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
+ */
+ joined_at?: string;
+ /**
+ * `true` if this is considered a large guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
+ */
+ large?: boolean;
+ /**
+ * Total number of members in this guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
+ */
+ member_count?: number;
+ /**
+ * States of members currently in voice channels; lacks the `guild_id` key
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-state-object
+ */
+ voice_states?: Omit<GatewayVoiceState, 'guild_id'>[];
+ /**
+ * Users in the guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ members?: APIGuildMember[];
+ /**
+ * Channels in the guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object
+ */
+ channels?: APIChannel[];
+ /**
+ * Presences of the members in the guild, will only include non-offline members if the size is greater than `large_threshold`
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
+ *
+ * See https://discord.com/developers/docs/topics/gateway#presence-update
+ */
+ presences?: GatewayPresenceUpdate[];
+ /**
+ * The maximum number of presences for the guild (`null` is always returned, apart from the largest of guilds)
+ */
+ max_presences?: number | null;
+ /**
+ * The maximum number of members for the guild
+ */
+ max_members?: number;
+ /**
+ * The vanity url code for the guild
+ */
+ vanity_url_code: string | null;
+ /**
+ * The description for the guild, if the guild is discoverable
+ */
+ description: string | null;
+ /**
+ * Banner hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ banner: string | null;
+ /**
+ * Premium tier (Server Boost level)
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
+ */
+ premium_tier: GuildPremiumTier;
+ /**
+ * The number of boosts this guild currently has
+ */
+ premium_subscription_count?: number;
+ /**
+ * The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
+ *
+ * @default "en-US"
+ */
+ preferred_locale: string;
+ /**
+ * The id of the channel where admins and moderators of Community guilds receive notices from Discord
+ */
+ public_updates_channel_id: Snowflake | null;
+ /**
+ * The maximum amount of users in a video channel
+ */
+ max_video_channel_users?: number;
+ /**
+ * **This field is only received from https://discord.com/developers/docs/resources/guild#get-guild with the `with_counts` query parameter set to `true`**
+ */
+ approximate_member_count?: number;
+ /**
+ * **This field is only received from https://discord.com/developers/docs/resources/guild#get-guild with the `with_counts` query parameter set to `true`**
+ */
+ approximate_presence_count?: number;
+ /**
+ * The welcome screen of a Community guild, shown to new members
+ *
+ * Returned in the invite object
+ */
+ welcome_screen?: APIGuildWelcomeScreen;
+ /**
+ * The nsfw level of the guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
+ */
+ nsfw_level: GuildNSFWLevel;
+ /**
+ * The stage instances in the guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
+ *
+ * See https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-stage-instance-structure
+ */
+ stage_instances?: APIStageInstance[];
+ /**
+ * Custom guild stickers
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object
+ */
+ stickers: APISticker[];
+ /**
+ * Whether the guild has the boost progress bar enabled.
+ */
+ premium_progress_bar_enabled: boolean;
+ /**
+ * The scheduled events in the guild
+ *
+ * **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
+ *
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object
+ */
+ guild_scheduled_events?: APIGuildScheduledEvent[];
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum GuildDefaultMessageNotifications {
+ AllMessages = 0,
+ OnlyMentions = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum GuildExplicitContentFilter {
+ Disabled = 0,
+ MembersWithoutRoles = 1,
+ AllMembers = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum GuildMFALevel {
+ None = 0,
+ Elevated = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum GuildNSFWLevel {
+ Default = 0,
+ Explicit = 1,
+ Safe = 2,
+ AgeRestricted = 3
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum GuildVerificationLevel {
+ /**
+ * Unrestricted
+ */
+ None = 0,
+ /**
+ * Must have verified email on account
+ */
+ Low = 1,
+ /**
+ * Must be registered on Discord for longer than 5 minutes
+ */
+ Medium = 2,
+ /**
+ * Must be a member of the guild for longer than 10 minutes
+ */
+ High = 3,
+ /**
+ * Must have a verified phone number
+ */
+ VeryHigh = 4
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum GuildPremiumTier {
+ None = 0,
+ Tier1 = 1,
+ Tier2 = 2,
+ Tier3 = 3
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum GuildSystemChannelFlags {
+ /**
+ * Suppress member join notifications
+ */
+ SuppressJoinNotifications = 1,
+ /**
+ * Suppress server boost notifications
+ */
+ SuppressPremiumSubscriptions = 2,
+ /**
+ * Suppress server setup tips
+ */
+ SuppressGuildReminderNotifications = 4,
+ /**
+ * Hide member join sticker reply buttons
+ */
+ SuppressJoinNotificationReplies = 8
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum GuildFeature {
+ /**
+ * Guild has access to set an animated guild banner image
+ */
+ AnimatedBanner = "ANIMATED_BANNER",
+ /**
+ * Guild has access to set an animated guild icon
+ */
+ AnimatedIcon = "ANIMATED_ICON",
+ /**
+ * Guild has access to set a guild banner image
+ */
+ Banner = "BANNER",
+ /**
+ * Guild has access to use commerce features (i.e. create store channels)
+ */
+ Commerce = "COMMERCE",
+ /**
+ * Guild can enable welcome screen, Membership Screening and discovery, and receives community updates
+ */
+ Community = "COMMUNITY",
+ /**
+ * Guild is able to be discovered in the directory
+ */
+ Discoverable = "DISCOVERABLE",
+ /**
+ * Guild is able to be featured in the directory
+ */
+ Featurable = "FEATURABLE",
+ /**
+ * Guild has access to set an invite splash background
+ */
+ InviteSplash = "INVITE_SPLASH",
+ /**
+ * Guild has enabled Membership Screening
+ */
+ MemberVerificationGateEnabled = "MEMBER_VERIFICATION_GATE_ENABLED",
+ /**
+ * Guild has enabled monetization
+ */
+ MonetizationEnabled = "MONETIZATION_ENABLED",
+ /**
+ * Guild has increased custom sticker slots
+ */
+ MoreStickers = "MORE_STICKERS",
+ /**
+ * Guild has access to create news channels
+ */
+ News = "NEWS",
+ /**
+ * Guild is partnered
+ */
+ Partnered = "PARTNERED",
+ /**
+ * Guild can be previewed before joining via Membership Screening or the directory
+ */
+ PreviewEnabled = "PREVIEW_ENABLED",
+ /**
+ * Guild has access to create private threads
+ */
+ PrivateThreads = "PRIVATE_THREADS",
+ RelayEnabled = "RELAY_ENABLED",
+ /**
+ * Guild is able to set role icons
+ */
+ RoleIcons = "ROLE_ICONS",
+ /**
+ * Guild has access to the seven day archive time for threads
+ */
+ SevenDayThreadArchive = "SEVEN_DAY_THREAD_ARCHIVE",
+ /**
+ * Guild has access to the three day archive time for threads
+ */
+ ThreeDayThreadArchive = "THREE_DAY_THREAD_ARCHIVE",
+ /**
+ * Guild has enabled ticketed events
+ */
+ TicketedEventsEnabled = "TICKETED_EVENTS_ENABLED",
+ /**
+ * Guild has access to set a vanity URL
+ */
+ VanityURL = "VANITY_URL",
+ /**
+ * Guild is verified
+ */
+ Verified = "VERIFIED",
+ /**
+ * Guild has access to set 384kbps bitrate in voice (previously VIP voice servers)
+ */
+ VIPRegions = "VIP_REGIONS",
+ /**
+ * Guild has enabled the welcome screen
+ */
+ WelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED"
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-preview-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildPreview {
+ /**
+ * Guild id
+ */
+ id: Snowflake;
+ /**
+ * Guild name (2-100 characters)
+ */
+ name: string;
+ /**
+ * Icon hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ icon: string | null;
+ /**
+ * Splash hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ splash: string | null;
+ /**
+ * Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ discovery_splash: string | null;
+ /**
+ * Custom guild emojis
+ *
+ * See https://discord.com/developers/docs/resources/emoji#emoji-object
+ */
+ emojis: APIEmoji[];
+ /**
+ * Enabled guild features
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ */
+ features: GuildFeature[];
+ /**
+ * Approximate number of members in this guild
+ */
+ approximate_member_count: number;
+ /**
+ * Approximate number of online members in this guild
+ */
+ approximate_presence_count: number;
+ /**
+ * The description for the guild
+ */
+ description: string;
+ /**
+ * Custom guild stickers
+ */
+ stickers: APISticker[];
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-widget-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildWidgetSettings {
+ /**
+ * Whether the widget is enabled
+ */
+ enabled: boolean;
+ /**
+ * The widget channel id
+ */
+ channel_id: Snowflake | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-member-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildMember {
+ /**
+ * The user this guild member represents
+ *
+ * **This field won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.**
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user?: APIUser;
+ /**
+ * This users guild nickname
+ */
+ nick?: string | null;
+ /**
+ * The member's guild avatar hash
+ */
+ avatar?: string | null;
+ /**
+ * Array of role object ids
+ *
+ * See https://discord.com/developers/docs/topics/permissions#role-object
+ */
+ roles: Snowflake[];
+ /**
+ * When the user joined the guild
+ */
+ joined_at: string;
+ /**
+ * When the user started boosting the guild
+ *
+ * See https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting-
+ */
+ premium_since?: string | null;
+ /**
+ * Whether the user is deafened in voice channels
+ */
+ deaf: boolean;
+ /**
+ * Whether the user is muted in voice channels
+ */
+ mute: boolean;
+ /**
+ * Whether the user has not yet passed the guild's Membership Screening requirements
+ *
+ * @remarks If this field is not present, it can be assumed as `false`.
+ */
+ pending?: boolean;
+ /**
+ * Timestamp of when the time out will be removed; until then, they cannot interact with the guild
+ */
+ communication_disabled_until?: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildIntegration {
+ /**
+ * Integration id
+ */
+ id: Snowflake;
+ /**
+ * Integration name
+ */
+ name: string;
+ /**
+ * Integration type
+ */
+ type: APIGuildInteractionType;
+ /**
+ * Is this integration enabled
+ */
+ enabled: boolean;
+ /**
+ * Is this integration syncing
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ syncing?: boolean;
+ /**
+ * ID that this integration uses for "subscribers"
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ role_id?: Snowflake;
+ /**
+ * Whether emoticons should be synced for this integration (`twitch` only currently)
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ enable_emoticons?: boolean;
+ /**
+ * The behavior of expiring subscribers
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ *
+ * See https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
+ */
+ expire_behavior?: IntegrationExpireBehavior;
+ /**
+ * The grace period (in days) before expiring subscribers
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ expire_grace_period?: number;
+ /**
+ * User for this integration
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user?: APIUser;
+ /**
+ * Integration account information
+ *
+ * See https://discord.com/developers/docs/resources/guild#integration-account-object
+ */
+ account: APIIntegrationAccount;
+ /**
+ * When this integration was last synced
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ synced_at?: string;
+ /**
+ * How many subscribers this integration has
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ subscriber_count?: number;
+ /**
+ * Has this integration been revoked
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ revoked?: boolean;
+ /**
+ * The bot/OAuth2 application for discord integrations
+ *
+ * See https://discord.com/developers/docs/resources/guild#integration-application-object
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ application?: APIGuildIntegrationApplication;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIGuildInteractionType = 'twitch' | 'youtube' | 'discord';
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum IntegrationExpireBehavior {
+ RemoveRole = 0,
+ Kick = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-account-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIIntegrationAccount {
+ /**
+ * ID of the account
+ */
+ id: string;
+ /**
+ * Name of the account
+ */
+ name: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-application-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildIntegrationApplication {
+ /**
+ * The id of the app
+ */
+ id: Snowflake;
+ /**
+ * The name of the app
+ */
+ name: string;
+ /**
+ * The icon hash of the app
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ icon: string | null;
+ /**
+ * The description of the app
+ */
+ description: string;
+ /**
+ * The summary of the app
+ *
+ * @deprecated Always an empty string, will be removed in v11
+ */
+ summary: '';
+ /**
+ * The bot associated with this application
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ bot?: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#ban-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIBan {
+ /**
+ * The reason for the ban
+ */
+ reason: string | null;
+ /**
+ * The banned user
+ */
+ user: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildWidget {
+ id: Snowflake;
+ name: string;
+ instant_invite: string | null;
+ channels: APIGuildWidgetChannel[];
+ members: APIGuildWidgetMember[];
+ presence_count: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildWidgetChannel {
+ id: Snowflake;
+ name: string;
+ position: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildWidgetMember {
+ id: string;
+ username: string;
+ discriminator: string;
+ avatar: string | null;
+ status: PresenceUpdateStatus;
+ activity?: {
+ name: string;
+ };
+ avatar_url: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum GuildWidgetStyle {
+ /**
+ * Shield style widget with Discord icon and guild members online count
+ */
+ Shield = "shield",
+ /**
+ * Large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget
+ */
+ Banner1 = "banner1",
+ /**
+ * Smaller widget style with guild icon, name and online count. Split on the right with Discord logo
+ */
+ Banner2 = "banner2",
+ /**
+ * Large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right
+ */
+ Banner3 = "banner3",
+ /**
+ * Large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget
+ * and a "JOIN MY SERVER" button at the bottom
+ */
+ Banner4 = "banner4"
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildWelcomeScreen {
+ /**
+ * The welcome screen short message
+ */
+ description: string | null;
+ /**
+ * Array of suggested channels
+ */
+ welcome_channels: APIGuildWelcomeScreenChannel[];
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildWelcomeScreenChannel {
+ /**
+ * The channel id that is suggested
+ */
+ channel_id: Snowflake;
+ /**
+ * The description shown for the channel
+ */
+ description: string;
+ /**
+ * The emoji id of the emoji that is shown on the left of the channel
+ */
+ emoji_id: Snowflake | null;
+ /**
+ * The emoji name of the emoji that is shown on the left of the channel
+ */
+ emoji_name: string | null;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildMembershipScreening {
+ /**
+ * When the fields were last updated
+ */
+ version: string;
+ /**
+ * The steps in the screening form
+ */
+ form_fields: APIGuildMembershipScreeningField[];
+ /**
+ * The server description shown in the screening form
+ */
+ description: string | null;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildMembershipScreeningField {
+ /**
+ * The type of field
+ */
+ field_type: MembershipScreeningFieldType;
+ /**
+ * The title of the field
+ */
+ label: string;
+ /**
+ * The list of rules
+ */
+ values?: string[];
+ /**
+ * Whether the user has to fill out this field
+ */
+ required: boolean;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum MembershipScreeningFieldType {
+ /**
+ * Server Rules
+ */
+ Terms = "TERMS"
+}
+//# sourceMappingURL=guild.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/guild.d.ts.map b/node_modules/discord-api-types/payloads/v8/guild.d.ts.map
new file mode 100644
index 0000000..b36fd71
--- /dev/null
+++ b/node_modules/discord-api-types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AE,gCAAgC,EAAE,CAAC;IAChD;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAID;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,UAAU,EAAE,4BAA4B,CAAC;IACzC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,oBAAY,4BAA4B;IACvC;;OAEG;IACH,KAAK,UAAU;CACf"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/guild.js b/node_modules/discord-api-types/payloads/v8/guild.js
new file mode 100644
index 0000000..282af00
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/guild.js
@@ -0,0 +1,264 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/guild
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.MembershipScreeningFieldType = exports.GuildWidgetStyle = exports.IntegrationExpireBehavior = exports.GuildFeature = exports.GuildSystemChannelFlags = exports.GuildPremiumTier = exports.GuildVerificationLevel = exports.GuildNSFWLevel = exports.GuildMFALevel = exports.GuildExplicitContentFilter = exports.GuildDefaultMessageNotifications = void 0;
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var GuildDefaultMessageNotifications;
+(function (GuildDefaultMessageNotifications) {
+ GuildDefaultMessageNotifications[GuildDefaultMessageNotifications["AllMessages"] = 0] = "AllMessages";
+ GuildDefaultMessageNotifications[GuildDefaultMessageNotifications["OnlyMentions"] = 1] = "OnlyMentions";
+})(GuildDefaultMessageNotifications = exports.GuildDefaultMessageNotifications || (exports.GuildDefaultMessageNotifications = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var GuildExplicitContentFilter;
+(function (GuildExplicitContentFilter) {
+ GuildExplicitContentFilter[GuildExplicitContentFilter["Disabled"] = 0] = "Disabled";
+ GuildExplicitContentFilter[GuildExplicitContentFilter["MembersWithoutRoles"] = 1] = "MembersWithoutRoles";
+ GuildExplicitContentFilter[GuildExplicitContentFilter["AllMembers"] = 2] = "AllMembers";
+})(GuildExplicitContentFilter = exports.GuildExplicitContentFilter || (exports.GuildExplicitContentFilter = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var GuildMFALevel;
+(function (GuildMFALevel) {
+ GuildMFALevel[GuildMFALevel["None"] = 0] = "None";
+ GuildMFALevel[GuildMFALevel["Elevated"] = 1] = "Elevated";
+})(GuildMFALevel = exports.GuildMFALevel || (exports.GuildMFALevel = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var GuildNSFWLevel;
+(function (GuildNSFWLevel) {
+ GuildNSFWLevel[GuildNSFWLevel["Default"] = 0] = "Default";
+ GuildNSFWLevel[GuildNSFWLevel["Explicit"] = 1] = "Explicit";
+ GuildNSFWLevel[GuildNSFWLevel["Safe"] = 2] = "Safe";
+ GuildNSFWLevel[GuildNSFWLevel["AgeRestricted"] = 3] = "AgeRestricted";
+})(GuildNSFWLevel = exports.GuildNSFWLevel || (exports.GuildNSFWLevel = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var GuildVerificationLevel;
+(function (GuildVerificationLevel) {
+ /**
+ * Unrestricted
+ */
+ GuildVerificationLevel[GuildVerificationLevel["None"] = 0] = "None";
+ /**
+ * Must have verified email on account
+ */
+ GuildVerificationLevel[GuildVerificationLevel["Low"] = 1] = "Low";
+ /**
+ * Must be registered on Discord for longer than 5 minutes
+ */
+ GuildVerificationLevel[GuildVerificationLevel["Medium"] = 2] = "Medium";
+ /**
+ * Must be a member of the guild for longer than 10 minutes
+ */
+ GuildVerificationLevel[GuildVerificationLevel["High"] = 3] = "High";
+ /**
+ * Must have a verified phone number
+ */
+ GuildVerificationLevel[GuildVerificationLevel["VeryHigh"] = 4] = "VeryHigh";
+})(GuildVerificationLevel = exports.GuildVerificationLevel || (exports.GuildVerificationLevel = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var GuildPremiumTier;
+(function (GuildPremiumTier) {
+ GuildPremiumTier[GuildPremiumTier["None"] = 0] = "None";
+ GuildPremiumTier[GuildPremiumTier["Tier1"] = 1] = "Tier1";
+ GuildPremiumTier[GuildPremiumTier["Tier2"] = 2] = "Tier2";
+ GuildPremiumTier[GuildPremiumTier["Tier3"] = 3] = "Tier3";
+})(GuildPremiumTier = exports.GuildPremiumTier || (exports.GuildPremiumTier = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var GuildSystemChannelFlags;
+(function (GuildSystemChannelFlags) {
+ /**
+ * Suppress member join notifications
+ */
+ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressJoinNotifications"] = 1] = "SuppressJoinNotifications";
+ /**
+ * Suppress server boost notifications
+ */
+ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressPremiumSubscriptions"] = 2] = "SuppressPremiumSubscriptions";
+ /**
+ * Suppress server setup tips
+ */
+ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressGuildReminderNotifications"] = 4] = "SuppressGuildReminderNotifications";
+ /**
+ * Hide member join sticker reply buttons
+ */
+ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressJoinNotificationReplies"] = 8] = "SuppressJoinNotificationReplies";
+})(GuildSystemChannelFlags = exports.GuildSystemChannelFlags || (exports.GuildSystemChannelFlags = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var GuildFeature;
+(function (GuildFeature) {
+ /**
+ * Guild has access to set an animated guild banner image
+ */
+ GuildFeature["AnimatedBanner"] = "ANIMATED_BANNER";
+ /**
+ * Guild has access to set an animated guild icon
+ */
+ GuildFeature["AnimatedIcon"] = "ANIMATED_ICON";
+ /**
+ * Guild has access to set a guild banner image
+ */
+ GuildFeature["Banner"] = "BANNER";
+ /**
+ * Guild has access to use commerce features (i.e. create store channels)
+ */
+ GuildFeature["Commerce"] = "COMMERCE";
+ /**
+ * Guild can enable welcome screen, Membership Screening and discovery, and receives community updates
+ */
+ GuildFeature["Community"] = "COMMUNITY";
+ /**
+ * Guild is able to be discovered in the directory
+ */
+ GuildFeature["Discoverable"] = "DISCOVERABLE";
+ /**
+ * Guild is able to be featured in the directory
+ */
+ GuildFeature["Featurable"] = "FEATURABLE";
+ /**
+ * Guild has access to set an invite splash background
+ */
+ GuildFeature["InviteSplash"] = "INVITE_SPLASH";
+ /**
+ * Guild has enabled Membership Screening
+ */
+ GuildFeature["MemberVerificationGateEnabled"] = "MEMBER_VERIFICATION_GATE_ENABLED";
+ /**
+ * Guild has enabled monetization
+ */
+ GuildFeature["MonetizationEnabled"] = "MONETIZATION_ENABLED";
+ /**
+ * Guild has increased custom sticker slots
+ */
+ GuildFeature["MoreStickers"] = "MORE_STICKERS";
+ /**
+ * Guild has access to create news channels
+ */
+ GuildFeature["News"] = "NEWS";
+ /**
+ * Guild is partnered
+ */
+ GuildFeature["Partnered"] = "PARTNERED";
+ /**
+ * Guild can be previewed before joining via Membership Screening or the directory
+ */
+ GuildFeature["PreviewEnabled"] = "PREVIEW_ENABLED";
+ /**
+ * Guild has access to create private threads
+ */
+ GuildFeature["PrivateThreads"] = "PRIVATE_THREADS";
+ GuildFeature["RelayEnabled"] = "RELAY_ENABLED";
+ /**
+ * Guild is able to set role icons
+ */
+ GuildFeature["RoleIcons"] = "ROLE_ICONS";
+ /**
+ * Guild has access to the seven day archive time for threads
+ */
+ GuildFeature["SevenDayThreadArchive"] = "SEVEN_DAY_THREAD_ARCHIVE";
+ /**
+ * Guild has access to the three day archive time for threads
+ */
+ GuildFeature["ThreeDayThreadArchive"] = "THREE_DAY_THREAD_ARCHIVE";
+ /**
+ * Guild has enabled ticketed events
+ */
+ GuildFeature["TicketedEventsEnabled"] = "TICKETED_EVENTS_ENABLED";
+ /**
+ * Guild has access to set a vanity URL
+ */
+ GuildFeature["VanityURL"] = "VANITY_URL";
+ /**
+ * Guild is verified
+ */
+ GuildFeature["Verified"] = "VERIFIED";
+ /**
+ * Guild has access to set 384kbps bitrate in voice (previously VIP voice servers)
+ */
+ GuildFeature["VIPRegions"] = "VIP_REGIONS";
+ /**
+ * Guild has enabled the welcome screen
+ */
+ GuildFeature["WelcomeScreenEnabled"] = "WELCOME_SCREEN_ENABLED";
+})(GuildFeature = exports.GuildFeature || (exports.GuildFeature = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var IntegrationExpireBehavior;
+(function (IntegrationExpireBehavior) {
+ IntegrationExpireBehavior[IntegrationExpireBehavior["RemoveRole"] = 0] = "RemoveRole";
+ IntegrationExpireBehavior[IntegrationExpireBehavior["Kick"] = 1] = "Kick";
+})(IntegrationExpireBehavior = exports.IntegrationExpireBehavior || (exports.IntegrationExpireBehavior = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var GuildWidgetStyle;
+(function (GuildWidgetStyle) {
+ /**
+ * Shield style widget with Discord icon and guild members online count
+ */
+ GuildWidgetStyle["Shield"] = "shield";
+ /**
+ * Large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget
+ */
+ GuildWidgetStyle["Banner1"] = "banner1";
+ /**
+ * Smaller widget style with guild icon, name and online count. Split on the right with Discord logo
+ */
+ GuildWidgetStyle["Banner2"] = "banner2";
+ /**
+ * Large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right
+ */
+ GuildWidgetStyle["Banner3"] = "banner3";
+ /**
+ * Large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget
+ * and a "JOIN MY SERVER" button at the bottom
+ */
+ GuildWidgetStyle["Banner4"] = "banner4";
+})(GuildWidgetStyle = exports.GuildWidgetStyle || (exports.GuildWidgetStyle = {}));
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var MembershipScreeningFieldType;
+(function (MembershipScreeningFieldType) {
+ /**
+ * Server Rules
+ */
+ MembershipScreeningFieldType["Terms"] = "TERMS";
+})(MembershipScreeningFieldType = exports.MembershipScreeningFieldType || (exports.MembershipScreeningFieldType = {}));
+//# sourceMappingURL=guild.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/guild.js.map b/node_modules/discord-api-types/payloads/v8/guild.js.map
new file mode 100644
index 0000000..d940d02
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/guild.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"guild.js","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA2VH;;;;GAIG;AACH,IAAY,gCAGX;AAHD,WAAY,gCAAgC;IAC3C,qGAAW,CAAA;IACX,uGAAY,CAAA;AACb,CAAC,EAHW,gCAAgC,GAAhC,wCAAgC,KAAhC,wCAAgC,QAG3C;AAED;;;;GAIG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,mFAAQ,CAAA;IACR,yGA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AsB3B;AAgFD;;GAEG;AACH,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACvC;;OAEG;IACH,+CAAe,CAAA;AAChB,CAAC,EALW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAKvC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/guildScheduledEvent.d.ts b/node_modules/discord-api-types/payloads/v8/guildScheduledEvent.d.ts
new file mode 100644
index 0000000..0a70864
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/guildScheduledEvent.d.ts
@@ -0,0 +1,163 @@
+import type { Snowflake } from '../../globals';
+import type { APIGuildMember } from './guild';
+import type { APIUser } from './user';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> {
+ /**
+ * The id of the guild event
+ */
+ id: Snowflake;
+ /**
+ * The guild id which the scheduled event belongs to
+ */
+ guild_id: Snowflake;
+ /**
+ * The channel id in which the scheduled event will be hosted, or `null` if entity type is `EXTERNAL`
+ */
+ channel_id: Snowflake | null;
+ /**
+ * The id of the user that created the scheduled event
+ */
+ creator_id?: Snowflake | null;
+ /**
+ * The name of the scheduled event
+ */
+ name: string;
+ /**
+ * The description of the scheduled event
+ */
+ description?: string;
+ /**
+ * The time the scheduled event will start
+ */
+ scheduled_start_time: string;
+ /**
+ * The time at which the guild event will end, or `null` if the event does not have a scheduled time to end
+ */
+ scheduled_end_time: string | null;
+ /**
+ * The privacy level of the scheduled event
+ */
+ privacy_level: GuildScheduledEventPrivacyLevel;
+ /**
+ * The status of the scheduled event
+ */
+ status: GuildScheduledEventStatus;
+ /**
+ * The type of hosting entity associated with the scheduled event
+ */
+ entity_type: Type;
+ /**
+ * The id of the hosting entity associated with the scheduled event
+ */
+ entity_id: Snowflake | null;
+ /**
+ * The entity metadata for the scheduled event
+ */
+ entity_metadata: APIGuildScheduledEventEntityMetadata | null;
+ /**
+ * The user that created the scheduled event
+ */
+ creator?: APIUser;
+ /**
+ * The number of users subscribed to the scheduled event
+ */
+ user_count?: number;
+ /**
+ * The cover image of the scheduled event
+ */
+ image: string | null;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
+ channel_id: Snowflake;
+ entity_metadata: null;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.Voice> {
+ channel_id: Snowflake;
+ entity_metadata: null;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
+ channel_id: null;
+ entity_metadata: Required<APIGuildScheduledEventEntityMetadata>;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIGuildScheduledEvent = APIStageInstanceGuildScheduledEvent | APIVoiceGuildScheduledEvent | APIExternalGuildScheduledEvent;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildScheduledEventEntityMetadata {
+ /**
+ * The location of the scheduled event
+ */
+ location?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum GuildScheduledEventEntityType {
+ StageInstance = 1,
+ Voice = 2,
+ External = 3
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum GuildScheduledEventStatus {
+ Scheduled = 1,
+ Active = 2,
+ Completed = 3,
+ Canceled = 4
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum GuildScheduledEventPrivacyLevel {
+ /**
+ * The scheduled event is only accessible to guild members
+ */
+ GuildOnly = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object-guild-scheduled-event-user-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildScheduledEventUser {
+ /**
+ * The scheduled event id which the user subscribed to
+ */
+ guild_scheduled_event_id: Snowflake;
+ /**
+ * The user which subscribed to the event
+ */
+ user: APIUser;
+ /**
+ * The guild member data for this user for the guild which this event belongs to, if any
+ */
+ member?: APIGuildMember;
+}
+export {};
+//# sourceMappingURL=guildScheduledEvent.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/guildScheduledEvent.d.ts.map b/node_modules/discord-api-types/payloads/v8/guildScheduledEvent.d.ts.map
new file mode 100644
index 0000000..b8a6bac
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/guildScheduledEvent.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"guildScheduledEvent.d.ts","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,UAAU,0BAA0B,CAAC,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AC;IACjB,eAAe,EAAE,QAAQ,CAAC,oCAAoC,CAAC,CAAC;CAChE;AAED;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAC/B,mCAAmC,GACnC,2BAA2B,GAC3B,8BAA8B,CAAC;AAElC;;;;GAIG;AACH,MAAM,WAAW,oCAAoC;IACpD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,oBAAY,6BAA6B;IACxC,aAAa,IAAI;IACjB,KAAK,IAAA;IACL,QAAQ,IAAA;CACR;AAED;;;;GAIG;AACH,oBAAY,yBAAyB;IACpC,SAAS,IAAI;IACb,MAAM,IAAA;IACN,SAAS,IAAA;IACT,QAAQ,IAAA;CACR;AAED;;;;GAIG;AACH,oBAAY,+BAA+B;IAC1C;;OAEG;IACH,SAAS,IAAI;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;OAEG;IACH,wBAAwB,EAAE,SAAS,CAAC;IACpC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;CACxB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/guildScheduledEvent.js b/node_modules/discord-api-types/payloads/v8/guildScheduledEvent.js
new file mode 100644
index 0000000..e94ba9e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/guildScheduledEvent.js
@@ -0,0 +1,39 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.GuildScheduledEventPrivacyLevel = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityType = void 0;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var GuildScheduledEventEntityType;
+(function (GuildScheduledEventEntityType) {
+ GuildScheduledEventEntityType[GuildScheduledEventEntityType["StageInstance"] = 1] = "StageInstance";
+ GuildScheduledEventEntityType[GuildScheduledEventEntityType["Voice"] = 2] = "Voice";
+ GuildScheduledEventEntityType[GuildScheduledEventEntityType["External"] = 3] = "External";
+})(GuildScheduledEventEntityType = exports.GuildScheduledEventEntityType || (exports.GuildScheduledEventEntityType = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var GuildScheduledEventStatus;
+(function (GuildScheduledEventStatus) {
+ GuildScheduledEventStatus[GuildScheduledEventStatus["Scheduled"] = 1] = "Scheduled";
+ GuildScheduledEventStatus[GuildScheduledEventStatus["Active"] = 2] = "Active";
+ GuildScheduledEventStatus[GuildScheduledEventStatus["Completed"] = 3] = "Completed";
+ GuildScheduledEventStatus[GuildScheduledEventStatus["Canceled"] = 4] = "Canceled";
+})(GuildScheduledEventStatus = exports.GuildScheduledEventStatus || (exports.GuildScheduledEventStatus = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var GuildScheduledEventPrivacyLevel;
+(function (GuildScheduledEventPrivacyLevel) {
+ /**
+ * The scheduled event is only accessible to guild members
+ */
+ GuildScheduledEventPrivacyLevel[GuildScheduledEventPrivacyLevel["GuildOnly"] = 2] = "GuildOnly";
+})(GuildScheduledEventPrivacyLevel = exports.GuildScheduledEventPrivacyLevel || (exports.GuildScheduledEventPrivacyLevel = {}));
+//# sourceMappingURL=guildScheduledEvent.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/guildScheduledEvent.js.map b/node_modules/discord-api-types/payloads/v8/guildScheduledEvent.js.map
new file mode 100644
index 0000000..ebcbe9d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/guildScheduledEvent.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"guildScheduledEvent.js","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":";;;AA0HA;;;;GAIG;AACH,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACxC,mGAAiB,CAAA;IACjB,mFAAK,CAAA;IACL,yFAAQ,CAAA;AACT,CAAC,EAJW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAIxC;AAED;;;;GAIG;AACH,IAAY,yBAKX;AALD,WAAY,yBAAyB;IACpC,mFAAa,CAAA;IACb,6EAAM,CAAA;IACN,mFAAS,CAAA;IACT,iFAAQ,CAAA;AACT,CAAC,EALW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAKpC;AAED;;;;GAIG;AACH,IAAY,+BAKX;AALD,WAAY,+BAA+B;IAC1C;;OAEG;IACH,+FAAa,CAAA;AACd,CAAC,EALW,+BAA+B,GAA/B,uCAA+B,KAA/B,uCAA+B,QAK1C"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/index.d.ts b/node_modules/discord-api-types/payloads/v8/index.d.ts
new file mode 100644
index 0000000..7e39180
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/index.d.ts
@@ -0,0 +1,20 @@
+export * from '../common';
+export * from './application';
+export * from './auditLog';
+export * from './channel';
+export * from './emoji';
+export * from './gateway';
+export * from './guild';
+export * from './guildScheduledEvent';
+export * from './interactions';
+export * from './invite';
+export * from './oauth2';
+export * from './permissions';
+export * from './stageInstance';
+export * from './sticker';
+export * from './teams';
+export * from './template';
+export * from './user';
+export * from './voice';
+export * from './webhook';
+//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/index.d.ts.map b/node_modules/discord-api-types/payloads/v8/index.d.ts.map
new file mode 100644
index 0000000..8348638
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/index.js b/node_modules/discord-api-types/payloads/v8/index.js
new file mode 100644
index 0000000..3b3077e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/index.js
@@ -0,0 +1,36 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("../common"), exports);
+__exportStar(require("./application"), exports);
+__exportStar(require("./auditLog"), exports);
+__exportStar(require("./channel"), exports);
+__exportStar(require("./emoji"), exports);
+__exportStar(require("./gateway"), exports);
+__exportStar(require("./guild"), exports);
+__exportStar(require("./guildScheduledEvent"), exports);
+__exportStar(require("./interactions"), exports);
+__exportStar(require("./invite"), exports);
+__exportStar(require("./oauth2"), exports);
+__exportStar(require("./permissions"), exports);
+__exportStar(require("./stageInstance"), exports);
+__exportStar(require("./sticker"), exports);
+__exportStar(require("./teams"), exports);
+__exportStar(require("./template"), exports);
+__exportStar(require("./user"), exports);
+__exportStar(require("./voice"), exports);
+__exportStar(require("./webhook"), exports);
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/index.js.map b/node_modules/discord-api-types/payloads/v8/index.js.map
new file mode 100644
index 0000000..8ab0152
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,gDAA8B;AAC9B,6CAA2B;AAC3B,4CAA0B;AAC1B,0CAAwB;AACxB,4CAA0B;AAC1B,0CAAwB;AACxB,wDAAsC;AACtC,iDAA+B;AAC/B,2CAAyB;AACzB,2CAAyB;AACzB,gDAA8B;AAC9B,kDAAgC;AAChC,4CAA0B;AAC1B,0CAAwB;AACxB,6CAA2B;AAC3B,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/index.mjs b/node_modules/discord-api-types/payloads/v8/index.mjs
new file mode 100644
index 0000000..09e408d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/index.mjs
@@ -0,0 +1,51 @@
+import mod from "./index.js";
+
+export default mod;
+export const ActivityFlags = mod.ActivityFlags;
+export const ActivityPlatform = mod.ActivityPlatform;
+export const ActivityType = mod.ActivityType;
+export const AllowedMentionsTypes = mod.AllowedMentionsTypes;
+export const ApplicationCommandOptionType = mod.ApplicationCommandOptionType;
+export const ApplicationCommandPermissionType = mod.ApplicationCommandPermissionType;
+export const ApplicationCommandType = mod.ApplicationCommandType;
+export const ApplicationFlags = mod.ApplicationFlags;
+export const AuditLogEvent = mod.AuditLogEvent;
+export const AuditLogOptionsType = mod.AuditLogOptionsType;
+export const ButtonStyle = mod.ButtonStyle;
+export const ChannelType = mod.ChannelType;
+export const ComponentType = mod.ComponentType;
+export const ConnectionVisibility = mod.ConnectionVisibility;
+export const EmbedType = mod.EmbedType;
+export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications;
+export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter;
+export const GuildFeature = mod.GuildFeature;
+export const GuildMFALevel = mod.GuildMFALevel;
+export const GuildNSFWLevel = mod.GuildNSFWLevel;
+export const GuildPremiumTier = mod.GuildPremiumTier;
+export const GuildScheduledEventEntityType = mod.GuildScheduledEventEntityType;
+export const GuildScheduledEventPrivacyLevel = mod.GuildScheduledEventPrivacyLevel;
+export const GuildScheduledEventStatus = mod.GuildScheduledEventStatus;
+export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags;
+export const GuildVerificationLevel = mod.GuildVerificationLevel;
+export const GuildWidgetStyle = mod.GuildWidgetStyle;
+export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior;
+export const InteractionResponseType = mod.InteractionResponseType;
+export const InteractionType = mod.InteractionType;
+export const InviteTargetType = mod.InviteTargetType;
+export const MembershipScreeningFieldType = mod.MembershipScreeningFieldType;
+export const MessageActivityType = mod.MessageActivityType;
+export const MessageFlags = mod.MessageFlags;
+export const MessageType = mod.MessageType;
+export const OAuth2Scopes = mod.OAuth2Scopes;
+export const OverwriteType = mod.OverwriteType;
+export const PermissionFlagsBits = mod.PermissionFlagsBits;
+export const PresenceUpdateStatus = mod.PresenceUpdateStatus;
+export const StageInstancePrivacyLevel = mod.StageInstancePrivacyLevel;
+export const StickerFormatType = mod.StickerFormatType;
+export const StickerType = mod.StickerType;
+export const TeamMemberMembershipState = mod.TeamMemberMembershipState;
+export const TextInputStyle = mod.TextInputStyle;
+export const UserFlags = mod.UserFlags;
+export const UserPremiumType = mod.UserPremiumType;
+export const VideoQualityMode = mod.VideoQualityMode;
+export const WebhookType = mod.WebhookType;
diff --git a/node_modules/discord-api-types/payloads/v8/interactions.d.ts b/node_modules/discord-api-types/payloads/v8/interactions.d.ts
new file mode 100644
index 0000000..41d108a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/interactions.d.ts
@@ -0,0 +1,31 @@
+import type { APIApplicationCommandDMInteraction, APIApplicationCommandGuildInteraction, APIApplicationCommandInteraction } from './_interactions/applicationCommands';
+import type { APIApplicationCommandAutocompleteDMInteraction, APIApplicationCommandAutocompleteGuildInteraction, APIApplicationCommandAutocompleteInteraction } from './_interactions/autocomplete';
+import type { APIMessageComponentDMInteraction, APIMessageComponentGuildInteraction, APIMessageComponentInteraction } from './_interactions/messageComponents';
+import type { APIModalSubmitDMInteraction, APIModalSubmitGuildInteraction, APIModalSubmitInteraction } from './_interactions/modalSubmit';
+import type { APIPingInteraction } from './_interactions/ping';
+export * from './_interactions/applicationCommands';
+export * from './_interactions/autocomplete';
+export * from './_interactions/base';
+export * from './_interactions/messageComponents';
+export * from './_interactions/modalSubmit';
+export * from './_interactions/ping';
+export * from './_interactions/responses';
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIInteraction = APIPingInteraction | APIApplicationCommandInteraction | APIMessageComponentInteraction | APIApplicationCommandAutocompleteInteraction | APIModalSubmitInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIDMInteraction = APIApplicationCommandDMInteraction | APIMessageComponentDMInteraction | APIApplicationCommandAutocompleteDMInteraction | APIModalSubmitDMInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIGuildInteraction = APIApplicationCommandGuildInteraction | APIMessageComponentGuildInteraction | APIApplicationCommandAutocompleteGuildInteraction | APIModalSubmitGuildInteraction;
+//# sourceMappingURL=interactions.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/interactions.d.ts.map b/node_modules/discord-api-types/payloads/v8/interactions.d.ts.map
new file mode 100644
index 0000000..58fa3d6
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/interactions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kCAAkC,EAClC,qCAAqC,EACrC,gCAAgC,EAChC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EACX,8CAA8C,EAC9C,iDAAiD,EACjD,4CAA4C,EAC5C,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACX,gCAAgC,EAChC,mCAAmC,EACnC,8BAA8B,EAC9B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACX,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,EACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAE1C;;;;GAIG;AACH,MAAM,MAAM,cAAc,GACvB,kBAAkB,GAClB,gCAAgC,GAChC,8BAA8B,GAC9B,4CAA4C,GAC5C,yBAAyB,CAAC;AAE7B;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACzB,kCAAkC,GAClC,gCAAgC,GAChC,8CAA8C,GAC9C,2BAA2B,CAAC;AAE/B;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAC5B,qCAAqC,GACrC,mCAAmC,GACnC,iDAAiD,GACjD,8BAA8B,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/interactions.js b/node_modules/discord-api-types/payloads/v8/interactions.js
new file mode 100644
index 0000000..4f5b780
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/interactions.js
@@ -0,0 +1,24 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./_interactions/applicationCommands"), exports);
+__exportStar(require("./_interactions/autocomplete"), exports);
+__exportStar(require("./_interactions/base"), exports);
+__exportStar(require("./_interactions/messageComponents"), exports);
+__exportStar(require("./_interactions/modalSubmit"), exports);
+__exportStar(require("./_interactions/ping"), exports);
+__exportStar(require("./_interactions/responses"), exports);
+//# sourceMappingURL=interactions.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/interactions.js.map b/node_modules/discord-api-types/payloads/v8/interactions.js.map
new file mode 100644
index 0000000..8c2bebe
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/interactions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"interactions.js","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAsBA,sEAAoD;AACpD,+DAA6C;AAC7C,uDAAqC;AACrC,oEAAkD;AAClD,8DAA4C;AAC5C,uDAAqC;AACrC,4DAA0C"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/invite.d.ts b/node_modules/discord-api-types/payloads/v8/invite.d.ts
new file mode 100644
index 0000000..a972685
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/invite.d.ts
@@ -0,0 +1,114 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/invite
+ */
+import type { APIApplication } from './application';
+import type { APIPartialChannel } from './channel';
+import type { APIGuild } from './guild';
+import type { APIGuildScheduledEvent } from './guildScheduledEvent';
+import type { APIInviteStageInstance } from './stageInstance';
+import type { APIUser } from './user';
+export type APIInviteGuild = Pick<APIGuild, 'id' | 'name' | 'splash' | 'banner' | 'icon' | 'vanity_url_code' | 'description' | 'features' | 'verification_level' | 'nsfw_level' | 'premium_subscription_count'>;
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIInvite {
+ /**
+ * The invite code (unique ID)
+ */
+ code: string;
+ /**
+ * The guild this invite is for
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object
+ */
+ guild?: APIInviteGuild;
+ /**
+ * The channel this invite is for
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object
+ */
+ channel: Required<APIPartialChannel> | null;
+ /**
+ * The user who created the invite
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ inviter?: APIUser;
+ /**
+ * The type of target for this voice channel invite
+ *
+ * See https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
+ */
+ target_type?: InviteTargetType;
+ /**
+ * The user whose stream to display for this voice channel stream invite
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ target_user?: APIUser;
+ /**
+ * The embedded application to open for this voice channel embedded application invite
+ *
+ * See https://discord.com/developers/docs/topics/oauth2#application
+ */
+ target_application?: Partial<APIApplication>;
+ /**
+ * Approximate count of online members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true`
+ */
+ approximate_presence_count?: number;
+ /**
+ * Approximate count of total members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true`
+ */
+ approximate_member_count?: number;
+ /**
+ * The expiration date of this invite, returned from the `GET /invites/<code>` endpoint when `with_expiration` is `true`
+ */
+ expires_at?: string | null;
+ /**
+ * The stage instance data if there is a public stage instance in the stage channel this invite is for
+ */
+ stage_instance?: APIInviteStageInstance;
+ /**
+ * The guild scheduled event data, returned from the `GET /invites/<code>` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id
+ */
+ guild_scheduled_event?: APIGuildScheduledEvent;
+}
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum InviteTargetType {
+ Stream = 1,
+ EmbeddedApplication = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-metadata-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIExtendedInvite extends APIInvite {
+ /**
+ * Number of times this invite has been used
+ */
+ uses: number;
+ /**
+ * Max number of times this invite can be used
+ */
+ max_uses: number;
+ /**
+ * Duration (in seconds) after which the invite expires
+ */
+ max_age: number;
+ /**
+ * Whether this invite only grants temporary membership
+ */
+ temporary: boolean;
+ /**
+ * When this invite was created
+ */
+ created_at: string;
+}
+//# sourceMappingURL=invite.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/invite.d.ts.map b/node_modules/discord-api-types/payloads/v8/invite.d.ts.map
new file mode 100644
index 0000000..56daae6
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/invite.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;A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B,MAAM,IAAI;IACV,mBAAmB,IAAA;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IACnD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACnB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/invite.js b/node_modules/discord-api-types/payloads/v8/invite.js
new file mode 100644
index 0000000..c1ee82d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/invite.js
@@ -0,0 +1,17 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/invite
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.InviteTargetType = void 0;
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var InviteTargetType;
+(function (InviteTargetType) {
+ InviteTargetType[InviteTargetType["Stream"] = 1] = "Stream";
+ InviteTargetType[InviteTargetType["EmbeddedApplication"] = 2] = "EmbeddedApplication";
+})(InviteTargetType = exports.InviteTargetType || (exports.InviteTargetType = {}));
+//# sourceMappingURL=invite.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/invite.js.map b/node_modules/discord-api-types/payloads/v8/invite.js.map
new file mode 100644
index 0000000..50996ac
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/invite.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"invite.js","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA4FH;;;;GAIG;AACH,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC3B,2DAAU,CAAA;IACV,qFAAmB,CAAA;AACpB,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/oauth2.d.ts b/node_modules/discord-api-types/payloads/v8/oauth2.d.ts
new file mode 100644
index 0000000..1033c55
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/oauth2.d.ts
@@ -0,0 +1,117 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/oauth2
+ */
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum OAuth2Scopes {
+ /**
+ * For oauth2 bots, this puts the bot in the user's selected guild by default
+ */
+ Bot = "bot",
+ /**
+ * Allows [/users/@me/connections](https://discord.com/developers/docs/resources/user#get-user-connections)
+ * to return linked third-party accounts
+ *
+ * See https://discord.com/developers/docs/resources/user#get-user-connections
+ */
+ Connections = "connections",
+ /**
+ * Enables [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) to return an `email`
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user
+ */
+ Email = "email",
+ /**
+ * Allows [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) without `email`
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user
+ */
+ Identify = "identify",
+ /**
+ * Allows [/users/@me/guilds](https://discord.com/developers/docs/resources/user#get-current-user-guilds)
+ * to return basic information about all of a user's guilds
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user-guilds
+ */
+ Guilds = "guilds",
+ /**
+ * Allows [/guilds/{guild.id}/members/{user.id}](https://discord.com/developers/docs/resources/guild#add-guild-member)
+ * to be used for joining users to a guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#add-guild-member
+ */
+ GuildsJoin = "guilds.join",
+ /**
+ * Allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#get-current-user-guild-member
+ */
+ GuildsMembersRead = "guilds.members.read",
+ /**
+ * Allows your app to join users to a group dm
+ *
+ * See https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
+ */
+ GroupDMJoins = "gdm.join",
+ /**
+ * For local rpc server api access, this allows you to read messages from all client channels
+ * (otherwise restricted to channels/guilds your app creates)
+ */
+ MessagesRead = "messages.read",
+ /**
+ * For local rpc server access, this allows you to control a user's local Discord client - requires Discord approval
+ */
+ RPC = "rpc",
+ /**
+ * For local rpc server api access, this allows you to receive notifications pushed out to the user - requires Discord approval
+ */
+ RPCNotificationsRead = "rpc.notifications.read",
+ /**
+ * This generates a webhook that is returned in the oauth token response for authorization code grants
+ */
+ WebhookIncoming = "webhook.incoming",
+ /**
+ * Allows your app to upload/update builds for a user's applications - requires Discord approval
+ */
+ ApplicationsBuildsUpload = "applications.builds.upload",
+ /**
+ * Allows your app to read build data for a user's applications
+ */
+ ApplicationsBuildsRead = "applications.builds.read",
+ /**
+ * Allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications
+ */
+ ApplicationsStoreUpdate = "applications.store.update",
+ /**
+ * Allows your app to read entitlements for a user's applications
+ */
+ ApplicationsEntitlements = "applications.entitlements",
+ /**
+ * Allows your app to know a user's friends and implicit relationships - requires Discord approval
+ */
+ RelationshipsRead = "relationships.read",
+ /**
+ * Allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval
+ */
+ ActivitiesRead = "activities.read",
+ /**
+ * Allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
+ *
+ * See https://discord.com/developers/docs/game-sdk/activities
+ */
+ ActivitiesWrite = "activities.write",
+ /**
+ * Allows your app to use Application Commands in a guild
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands
+ */
+ ApplicationsCommands = "applications.commands",
+ /**
+ * Allows your app to update its Application Commands via this bearer token - client credentials grant only
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands
+ */
+ ApplicationsCommandsUpdate = "applications.commands.update"
+}
+//# sourceMappingURL=oauth2.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/oauth2.d.ts.map b/node_modules/discord-api-types/payloads/v8/oauth2.d.ts.map
new file mode 100644
index 0000000..784e875
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/oauth2.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,oBAAY,YAAY;IACvB;;OAEG;IACH,GAAG,QAAQ;IACX;;;;;OAKG;IACH,WAAW,gBAAgB;IAC3B;;;;OAIG;IACH,KAAK,UAAU;IACf;;;;OAIG;IACH,QAAQ,aAAa;IACrB;;;;;OAKG;IACH,MAAM,WAAW;IACjB;;;;;OAKG;IACH,UAAU,gBAAgB;IAC1B;;;;OAIG;IACH,iBAAiB,wBAAwB;IACzC;;;;OAIG;IACH,YAAY,aAAa;IACzB;;;OAGG;IACH,YAAY,kBAAkB;IAC9B;;OAEG;IACH,GAAG,QAAQ;IACX;;OAEG;IACH,oBAAoB,2BAA2B;IAC/C;;OAEG;IACH,eAAe,qBAAqB;IACpC;;OAEG;IACH,wBAAwB,+BAA+B;IACvD;;OAEG;IACH,sBAAsB,6BAA6B;IACnD;;OAEG;IACH,uBAAuB,8BAA8B;IACrD;;OAEG;IACH,wBAAwB,8BAA8B;IACtD;;OAEG;IACH,iBAAiB,uBAAuB;IACxC;;OAEG;IACH,cAAc,oBAAoB;IAClC;;;;OAIG;IACH,eAAe,qBAAqB;IACpC;;;;OAIG;IACH,oBAAoB,0BAA0B;IAC9C;;;;OAIG;IACH,0BAA0B,iCAAiC;CAC3D"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/oauth2.js b/node_modules/discord-api-types/payloads/v8/oauth2.js
new file mode 100644
index 0000000..d8b8325
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/oauth2.js
@@ -0,0 +1,121 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/oauth2
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OAuth2Scopes = void 0;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var OAuth2Scopes;
+(function (OAuth2Scopes) {
+ /**
+ * For oauth2 bots, this puts the bot in the user's selected guild by default
+ */
+ OAuth2Scopes["Bot"] = "bot";
+ /**
+ * Allows [/users/@me/connections](https://discord.com/developers/docs/resources/user#get-user-connections)
+ * to return linked third-party accounts
+ *
+ * See https://discord.com/developers/docs/resources/user#get-user-connections
+ */
+ OAuth2Scopes["Connections"] = "connections";
+ /**
+ * Enables [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) to return an `email`
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user
+ */
+ OAuth2Scopes["Email"] = "email";
+ /**
+ * Allows [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) without `email`
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user
+ */
+ OAuth2Scopes["Identify"] = "identify";
+ /**
+ * Allows [/users/@me/guilds](https://discord.com/developers/docs/resources/user#get-current-user-guilds)
+ * to return basic information about all of a user's guilds
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user-guilds
+ */
+ OAuth2Scopes["Guilds"] = "guilds";
+ /**
+ * Allows [/guilds/{guild.id}/members/{user.id}](https://discord.com/developers/docs/resources/guild#add-guild-member)
+ * to be used for joining users to a guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#add-guild-member
+ */
+ OAuth2Scopes["GuildsJoin"] = "guilds.join";
+ /**
+ * Allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#get-current-user-guild-member
+ */
+ OAuth2Scopes["GuildsMembersRead"] = "guilds.members.read";
+ /**
+ * Allows your app to join users to a group dm
+ *
+ * See https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
+ */
+ OAuth2Scopes["GroupDMJoins"] = "gdm.join";
+ /**
+ * For local rpc server api access, this allows you to read messages from all client channels
+ * (otherwise restricted to channels/guilds your app creates)
+ */
+ OAuth2Scopes["MessagesRead"] = "messages.read";
+ /**
+ * For local rpc server access, this allows you to control a user's local Discord client - requires Discord approval
+ */
+ OAuth2Scopes["RPC"] = "rpc";
+ /**
+ * For local rpc server api access, this allows you to receive notifications pushed out to the user - requires Discord approval
+ */
+ OAuth2Scopes["RPCNotificationsRead"] = "rpc.notifications.read";
+ /**
+ * This generates a webhook that is returned in the oauth token response for authorization code grants
+ */
+ OAuth2Scopes["WebhookIncoming"] = "webhook.incoming";
+ /**
+ * Allows your app to upload/update builds for a user's applications - requires Discord approval
+ */
+ OAuth2Scopes["ApplicationsBuildsUpload"] = "applications.builds.upload";
+ /**
+ * Allows your app to read build data for a user's applications
+ */
+ OAuth2Scopes["ApplicationsBuildsRead"] = "applications.builds.read";
+ /**
+ * Allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications
+ */
+ OAuth2Scopes["ApplicationsStoreUpdate"] = "applications.store.update";
+ /**
+ * Allows your app to read entitlements for a user's applications
+ */
+ OAuth2Scopes["ApplicationsEntitlements"] = "applications.entitlements";
+ /**
+ * Allows your app to know a user's friends and implicit relationships - requires Discord approval
+ */
+ OAuth2Scopes["RelationshipsRead"] = "relationships.read";
+ /**
+ * Allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval
+ */
+ OAuth2Scopes["ActivitiesRead"] = "activities.read";
+ /**
+ * Allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
+ *
+ * See https://discord.com/developers/docs/game-sdk/activities
+ */
+ OAuth2Scopes["ActivitiesWrite"] = "activities.write";
+ /**
+ * Allows your app to use Application Commands in a guild
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands
+ */
+ OAuth2Scopes["ApplicationsCommands"] = "applications.commands";
+ /**
+ * Allows your app to update its Application Commands via this bearer token - client credentials grant only
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands
+ */
+ OAuth2Scopes["ApplicationsCommandsUpdate"] = "applications.commands.update";
+})(OAuth2Scopes = exports.OAuth2Scopes || (exports.OAuth2Scopes = {}));
+//# sourceMappingURL=oauth2.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/oauth2.js.map b/node_modules/discord-api-types/payloads/v8/oauth2.js.map
new file mode 100644
index 0000000..4cd63f9
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/oauth2.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"oauth2.js","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH;;GAEG;AACH,IAAY,YA6GX;AA7GD,WAAY,YAAY;IACvB;;OAEG;IACH,2BAAW,CAAA;IACX;;;;;OAKG;IACH,2CAA2B,CAAA;IAC3B;;;;OAIG;IACH,+BAAe,CAAA;IACf;;;;OAIG;IACH,qCAAqB,CAAA;IACrB;;;;;OAKG;IACH,iCAAiB,CAAA;IACjB;;;;;OAKG;IACH,0CAA0B,CAAA;IAC1B;;;;OAIG;IACH,yDAAyC,CAAA;IACzC;;;;OAIG;IACH,yCAAyB,CAAA;IACzB;;;OAGG;IACH,8CAA8B,CAAA;IAC9B;;OAEG;IACH,2BAAW,CAAA;IACX;;OAEG;IACH,+DAA+C,CAAA;IAC/C;;OAEG;IACH,oDAAoC,CAAA;IACpC;;OAEG;IACH,uEAAuD,CAAA;IACvD;;OAEG;IACH,mEAAmD,CAAA;IACnD;;OAEG;IACH,qEAAqD,CAAA;IACrD;;OAEG;IACH,sEAAsD,CAAA;IACtD;;OAEG;IACH,wDAAwC,CAAA;IACxC;;OAEG;IACH,kDAAkC,CAAA;IAClC;;;;OAIG;IACH,oDAAoC,CAAA;IACpC;;;;OAIG;IACH,8DAA8C,CAAA;IAC9C;;;;OAIG;IACH,2EAA2D,CAAA;AAC5D,CAAC,EA7GW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QA6GvB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/permissions.d.ts b/node_modules/discord-api-types/payloads/v8/permissions.d.ts
new file mode 100644
index 0000000..c8d15ac
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/permissions.d.ts
@@ -0,0 +1,77 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/permissions
+ */
+import type { Permissions, Snowflake } from '../../globals';
+/**
+ * https://discord.com/developers/docs/topics/permissions#role-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIRole {
+ /**
+ * Role id
+ */
+ id: Snowflake;
+ /**
+ * Role name
+ */
+ name: string;
+ /**
+ * Integer representation of hexadecimal color code
+ */
+ color: number;
+ /**
+ * If this role is pinned in the user listing
+ */
+ hoist: boolean;
+ /**
+ * The role icon hash
+ */
+ icon?: string | null;
+ /**
+ * The role unicode emoji as a standard emoji
+ */
+ unicode_emoji?: string | null;
+ /**
+ * Position of this role
+ */
+ position: number;
+ /**
+ * Permission bit set
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ permissions: Permissions;
+ /**
+ * Whether this role is managed by an integration
+ */
+ managed: boolean;
+ /**
+ * Whether this role is mentionable
+ */
+ mentionable: boolean;
+ /**
+ * The tags this role has
+ */
+ tags?: APIRoleTags;
+}
+/**
+ * https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIRoleTags {
+ /**
+ * The id of the bot this role belongs to
+ */
+ bot_id?: Snowflake;
+ /**
+ * Whether this is the guild's premium subscriber role
+ */
+ premium_subscriber?: null;
+ /**
+ * The id of the integration this role belongs to
+ */
+ integration_id?: Snowflake;
+}
+//# sourceMappingURL=permissions.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/permissions.d.ts.map b/node_modules/discord-api-types/payloads/v8/permissions.d.ts.map
new file mode 100644
index 0000000..1838e8e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/permissions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE5D;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,WAAW,EAAE,WAAW,CAAC;IACzB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,IAAI,CAAC;IAC1B;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;CAC3B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/permissions.js b/node_modules/discord-api-types/payloads/v8/permissions.js
new file mode 100644
index 0000000..ee9af66
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/permissions.js
@@ -0,0 +1,6 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/permissions
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=permissions.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/permissions.js.map b/node_modules/discord-api-types/payloads/v8/permissions.js.map
new file mode 100644
index 0000000..4fbd671
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/permissions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"permissions.js","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":";AAAA;;GAEG"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/stageInstance.d.ts b/node_modules/discord-api-types/payloads/v8/stageInstance.d.ts
new file mode 100644
index 0000000..76af5df
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/stageInstance.d.ts
@@ -0,0 +1,76 @@
+import type { Snowflake } from '../../globals';
+import type { APIGuildMember } from './guild';
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#stage-instance-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIStageInstance {
+ /**
+ * The id of the stage instance
+ */
+ id: Snowflake;
+ /**
+ * The guild id of the associated stage channel
+ */
+ guild_id: Snowflake;
+ /**
+ * The id of the associated stage channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The topic of the stage instance (1-120 characters)
+ */
+ topic: string;
+ /**
+ * The privacy level of the stage instance
+ *
+ * See https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
+ */
+ privacy_level: StageInstancePrivacyLevel;
+ /**
+ * Whether or not stage discovery is disabled
+ */
+ discoverable_disabled: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum StageInstancePrivacyLevel {
+ /**
+ * The stage instance is visible publicly, such as on stage discovery
+ */
+ Public = 1,
+ /**
+ * The stage instance is visible to only guild members
+ */
+ GuildOnly = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-stage-instance-object-invite-stage-instance-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIInviteStageInstance {
+ /**
+ * The topic of the stage instance (1-120 characters)
+ */
+ topic: string;
+ /**
+ * The number of users in the stage
+ */
+ participant_count: number;
+ /**
+ * The number of users speaking in the stage
+ */
+ speaker_count: number;
+ /**
+ * The members speaking in the stage
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure
+ */
+ members: APIGuildMember[];
+}
+//# sourceMappingURL=stageInstance.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/stageInstance.d.ts.map b/node_modules/discord-api-types/payloads/v8/stageInstance.d.ts.map
new file mode 100644
index 0000000..6765dc9
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/stageInstance.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"stageInstance.d.ts","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,EAAE,yBAAyB,CAAC;IACzC;;OAEG;IACH,qBAAqB,EAAE,OAAO,CAAC;CAC/B;AAED;;;;GAIG;AACH,oBAAY,yBAAyB;IACpC;;OAEG;IACH,MAAM,IAAI;IACV;;OAEG;IACH,SAAS,IAAA;CACT;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,OAAO,EAAE,cAAc,EAAE,CAAC;CAC1B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/stageInstance.js b/node_modules/discord-api-types/payloads/v8/stageInstance.js
new file mode 100644
index 0000000..12f6ff4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/stageInstance.js
@@ -0,0 +1,20 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.StageInstancePrivacyLevel = void 0;
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var StageInstancePrivacyLevel;
+(function (StageInstancePrivacyLevel) {
+ /**
+ * The stage instance is visible publicly, such as on stage discovery
+ */
+ StageInstancePrivacyLevel[StageInstancePrivacyLevel["Public"] = 1] = "Public";
+ /**
+ * The stage instance is visible to only guild members
+ */
+ StageInstancePrivacyLevel[StageInstancePrivacyLevel["GuildOnly"] = 2] = "GuildOnly";
+})(StageInstancePrivacyLevel = exports.StageInstancePrivacyLevel || (exports.StageInstancePrivacyLevel = {}));
+//# sourceMappingURL=stageInstance.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/stageInstance.js.map b/node_modules/discord-api-types/payloads/v8/stageInstance.js.map
new file mode 100644
index 0000000..7e1c1ec
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/stageInstance.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"stageInstance.js","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":";;;AAqCA;;;;GAIG;AACH,IAAY,yBASX;AATD,WAAY,yBAAyB;IACpC;;OAEG;IACH,6EAAU,CAAA;IACV;;OAEG;IACH,mFAAS,CAAA;AACV,CAAC,EATW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QASpC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/sticker.d.ts b/node_modules/discord-api-types/payloads/v8/sticker.d.ts
new file mode 100644
index 0000000..b07cacb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/sticker.d.ts
@@ -0,0 +1,133 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/sticker
+ */
+import type { Snowflake } from '../../globals';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APISticker {
+ /**
+ * ID of the sticker
+ */
+ id: Snowflake;
+ /**
+ * For standard stickers, ID of the pack the sticker is from
+ */
+ pack_id?: Snowflake;
+ /**
+ * Name of the sticker
+ */
+ name: string;
+ /**
+ * Description of the sticker
+ */
+ description: string | null;
+ /**
+ * For guild stickers, the Discord name of a unicode emoji representing the sticker's expression. for standard stickers, a comma-separated list of related expressions.
+ */
+ tags: string;
+ /**
+ * Previously the sticker asset hash, now an empty string
+ *
+ * @deprecated
+ */
+ asset: '';
+ /**
+ * Type of sticker
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
+ */
+ type: StickerType;
+ /**
+ * Type of sticker format
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
+ */
+ format_type: StickerFormatType;
+ /**
+ * Whether this guild sticker can be used, may be false due to loss of Server Boosts
+ */
+ available?: boolean;
+ /**
+ * ID of the guild that owns this sticker
+ */
+ guild_id?: Snowflake;
+ /**
+ * The user that uploaded the guild sticker
+ */
+ user?: APIUser;
+ /**
+ * The standard sticker's sort order within its pack
+ */
+ sort_value?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum StickerType {
+ /**
+ * An official sticker in a pack, part of Nitro or in a removed purchasable pack
+ */
+ Standard = 1,
+ /**
+ * A sticker uploaded to a Boosted guild for the guild's members
+ */
+ Guild = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum StickerFormatType {
+ PNG = 1,
+ APNG = 2,
+ Lottie = 3
+}
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-item-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIStickerItem = Pick<APISticker, 'id' | 'name' | 'format_type'>;
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-pack-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIStickerPack {
+ /**
+ * ID of the sticker pack
+ */
+ id: Snowflake;
+ /**
+ * The stickers in the pack
+ */
+ stickers: APISticker[];
+ /**
+ * Name of the sticker pack
+ */
+ name: string;
+ /**
+ * ID of the pack's SKU
+ */
+ sku_id: Snowflake;
+ /**
+ * ID of a sticker in the pack which is shown as the pack's icon
+ */
+ cover_sticker_id?: Snowflake;
+ /**
+ * Description of the sticker pack
+ */
+ description: string;
+ /**
+ * ID of the sticker pack's banner image
+ */
+ banner_asset_id?: Snowflake;
+}
+//# sourceMappingURL=sticker.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/sticker.d.ts.map b/node_modules/discord-api-types/payloads/v8/sticker.d.ts.map
new file mode 100644
index 0000000..810afa5
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/sticker.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"sticker.d.ts","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,UAAU;IAC1B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,EAAE,EAAE,CAAC;IACV;;;;OAIG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;;;OAIG;IACH,WAAW,EAAE,iBAAiB,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,oBAAY,WAAW;IACtB;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,KAAK,IAAA;CACL;AAED;;;;GAIG;AACH,oBAAY,iBAAiB;IAC5B,GAAG,IAAI;IACP,IAAI,IAAA;IACJ,MAAM,IAAA;CACN;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,MAAM,GAAG,aAAa,CAAC,CAAC;AAE7E;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;CAC5B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/sticker.js b/node_modules/discord-api-types/payloads/v8/sticker.js
new file mode 100644
index 0000000..f0940b8
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/sticker.js
@@ -0,0 +1,34 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/sticker
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.StickerFormatType = exports.StickerType = void 0;
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var StickerType;
+(function (StickerType) {
+ /**
+ * An official sticker in a pack, part of Nitro or in a removed purchasable pack
+ */
+ StickerType[StickerType["Standard"] = 1] = "Standard";
+ /**
+ * A sticker uploaded to a Boosted guild for the guild's members
+ */
+ StickerType[StickerType["Guild"] = 2] = "Guild";
+})(StickerType = exports.StickerType || (exports.StickerType = {}));
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var StickerFormatType;
+(function (StickerFormatType) {
+ StickerFormatType[StickerFormatType["PNG"] = 1] = "PNG";
+ StickerFormatType[StickerFormatType["APNG"] = 2] = "APNG";
+ StickerFormatType[StickerFormatType["Lottie"] = 3] = "Lottie";
+})(StickerFormatType = exports.StickerFormatType || (exports.StickerFormatType = {}));
+//# sourceMappingURL=sticker.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/sticker.js.map b/node_modules/discord-api-types/payloads/v8/sticker.js.map
new file mode 100644
index 0000000..c0a4f86
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/sticker.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"sticker.js","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAmEH;;;;GAIG;AACH,IAAY,WASX;AATD,WAAY,WAAW;IACtB;;OAEG;IACH,qDAAY,CAAA;IACZ;;OAEG;IACH,+CAAK,CAAA;AACN,CAAC,EATW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAStB;AAED;;;;GAIG;AACH,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC5B,uDAAO,CAAA;IACP,yDAAI,CAAA;IACJ,6DAAM,CAAA;AACP,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/teams.d.ts b/node_modules/discord-api-types/payloads/v8/teams.d.ts
new file mode 100644
index 0000000..1e9f621
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/teams.d.ts
@@ -0,0 +1,69 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/teams
+ */
+import type { Snowflake } from '../../globals';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/topics/teams#data-models-team-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APITeam {
+ /**
+ * A hash of the image of the team's icon
+ */
+ icon: string | null;
+ /**
+ * The unique id of the team
+ */
+ id: Snowflake;
+ /**
+ * The members of the team
+ */
+ members: APITeamMember[];
+ /**
+ * The name of the team
+ */
+ name: string;
+ /**
+ * The user id of the current team owner
+ */
+ owner_user_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/teams#data-models-team-members-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APITeamMember {
+ /**
+ * The user's membership state on the team
+ *
+ * See https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
+ */
+ membership_state: TeamMemberMembershipState;
+ /**
+ * Will always be `["*"]`
+ */
+ permissions: ['*'];
+ /**
+ * The id of the parent team of which they are a member
+ */
+ team_id: Snowflake;
+ /**
+ * The avatar, discriminator, id, and username of the user
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum TeamMemberMembershipState {
+ Invited = 1,
+ Accepted = 2
+}
+//# sourceMappingURL=teams.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/teams.d.ts.map b/node_modules/discord-api-types/payloads/v8/teams.d.ts.map
new file mode 100644
index 0000000..035ecf8
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/teams.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["teams.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,aAAa,EAAE,SAAS,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC7B;;;;OAIG;IACH,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C;;OAEG;IACH,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC;IACnB;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;CACd;AAED;;;;GAIG;AACH,oBAAY,yBAAyB;IACpC,OAAO,IAAI;IACX,QAAQ,IAAA;CACR"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/teams.js b/node_modules/discord-api-types/payloads/v8/teams.js
new file mode 100644
index 0000000..63cfef5
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/teams.js
@@ -0,0 +1,17 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/teams
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.TeamMemberMembershipState = void 0;
+/**
+ * https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var TeamMemberMembershipState;
+(function (TeamMemberMembershipState) {
+ TeamMemberMembershipState[TeamMemberMembershipState["Invited"] = 1] = "Invited";
+ TeamMemberMembershipState[TeamMemberMembershipState["Accepted"] = 2] = "Accepted";
+})(TeamMemberMembershipState = exports.TeamMemberMembershipState || (exports.TeamMemberMembershipState = {}));
+//# sourceMappingURL=teams.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/teams.js.map b/node_modules/discord-api-types/payloads/v8/teams.js.map
new file mode 100644
index 0000000..9b0c772
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/teams.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"teams.js","sourceRoot":"","sources":["teams.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA6DH;;;;GAIG;AACH,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACpC,+EAAW,CAAA;IACX,iFAAQ,CAAA;AACT,CAAC,EAHW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAGpC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/template.d.ts b/node_modules/discord-api-types/payloads/v8/template.d.ts
new file mode 100644
index 0000000..bb6e81c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/template.d.ts
@@ -0,0 +1,68 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/template
+ */
+import type { Snowflake } from '../../globals';
+import type { RESTPostAPIGuildsJSONBody } from '../../rest/v8/index';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/resources/template#template-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APITemplate {
+ /**
+ * The template code (unique ID)
+ */
+ code: string;
+ /**
+ * Template name
+ */
+ name: string;
+ /**
+ * The description for the template
+ */
+ description: string | null;
+ /**
+ * Number of times this template has been used
+ */
+ usage_count: number;
+ /**
+ * The ID of the user who created the template
+ */
+ creator_id: Snowflake;
+ /**
+ * The user who created the template
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ creator: APIUser;
+ /**
+ * When this template was created
+ */
+ created_at: string;
+ /**
+ * When this template was last synced to the source guild
+ */
+ updated_at: string;
+ /**
+ * The ID of the guild this template is based on
+ */
+ source_guild_id: Snowflake;
+ /**
+ * The guild snapshot this template contains
+ */
+ serialized_source_guild: APITemplateSerializedSourceGuild;
+ /**
+ * Whether the template has unsynced changes
+ */
+ is_dirty: boolean | null;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APITemplateSerializedSourceGuild extends Omit<RESTPostAPIGuildsJSONBody, 'icon'> {
+ description: string | null;
+ preferred_locale: string;
+ icon_hash: string | null;
+}
+//# sourceMappingURL=template.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/template.d.ts.map b/node_modules/discord-api-types/payloads/v8/template.d.ts.map
new file mode 100644
index 0000000..a117895
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/template.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,eAAe,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,uBAAuB,EAAE,gCAAgC,CAAC;IAC1D;;OAEG;IACH,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,gCAAiC,SAAQ,IAAI,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAChG,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/template.js b/node_modules/discord-api-types/payloads/v8/template.js
new file mode 100644
index 0000000..2a316d1
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/template.js
@@ -0,0 +1,6 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/template
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=template.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/template.js.map b/node_modules/discord-api-types/payloads/v8/template.js.map
new file mode 100644
index 0000000..12683e3
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/template.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"template.js","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":";AAAA;;GAEG"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/user.d.ts b/node_modules/discord-api-types/payloads/v8/user.d.ts
new file mode 100644
index 0000000..ea8dd1b
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/user.d.ts
@@ -0,0 +1,228 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/user
+ */
+import type { Snowflake } from '../../globals';
+import type { APIGuildIntegration } from './guild';
+/**
+ * https://discord.com/developers/docs/resources/user#user-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIUser {
+ /**
+ * The user's id
+ */
+ id: Snowflake;
+ /**
+ * The user's username, not unique across the platform
+ */
+ username: string;
+ /**
+ * The user's 4-digit discord-tag
+ */
+ discriminator: string;
+ /**
+ * The user's avatar hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ avatar: string | null;
+ /**
+ * Whether the user belongs to an OAuth2 application
+ */
+ bot?: boolean;
+ /**
+ * Whether the user is an Official Discord System user (part of the urgent message system)
+ */
+ system?: boolean;
+ /**
+ * Whether the user has two factor enabled on their account
+ */
+ mfa_enabled?: boolean;
+ /**
+ * The user's banner hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ banner?: string | null;
+ /**
+ * The user's banner color encoded as an integer representation of hexadecimal color code
+ */
+ accent_color?: number | null;
+ /**
+ * The user's chosen language option
+ */
+ locale?: string;
+ /**
+ * Whether the email on this account has been verified
+ */
+ verified?: boolean;
+ /**
+ * The user's email
+ */
+ email?: string | null;
+ /**
+ * The flags on a user's account
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object-user-flags
+ */
+ flags?: UserFlags;
+ /**
+ * The type of Nitro subscription on a user's account
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object-premium-types
+ */
+ premium_type?: UserPremiumType;
+ /**
+ * The public flags on a user's account
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object-user-flags
+ */
+ public_flags?: UserFlags;
+}
+/**
+ * https://discord.com/developers/docs/resources/user#user-object-user-flags
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum UserFlags {
+ /**
+ * Discord Employee
+ */
+ Staff = 1,
+ /**
+ * Partnered Server Owner
+ */
+ Partner = 2,
+ /**
+ * HypeSquad Events Coordinator
+ */
+ Hypesquad = 4,
+ /**
+ * Bug Hunter Level 1
+ */
+ BugHunterLevel1 = 8,
+ /**
+ * House Bravery Member
+ */
+ HypeSquadOnlineHouse1 = 64,
+ /**
+ * House Brilliance Member
+ */
+ HypeSquadOnlineHouse2 = 128,
+ /**
+ * House Balance MemberW
+ */
+ HypeSquadOnlineHouse3 = 256,
+ /**
+ * Early Nitro Supporter
+ */
+ PremiumEarlySupporter = 512,
+ /**
+ * User is a [team](https://discord.com/developers/docs/topics/teams)
+ */
+ TeamPseudoUser = 1024,
+ /**
+ * Bug Hunter Level 2
+ */
+ BugHunterLevel2 = 16384,
+ /**
+ * Verified Bot
+ */
+ VerifiedBot = 65536,
+ /**
+ * Early Verified Bot Developer
+ */
+ VerifiedDeveloper = 131072,
+ /**
+ * Discord Certified Moderator
+ */
+ CertifiedModerator = 262144,
+ /**
+ * Bot uses only [HTTP interactions](https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction) and is shown in the online member list
+ */
+ BotHTTPInteractions = 524288,
+ /**
+ * User has been identified as spammer
+ *
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ Spammer = 1048576,
+ /**
+ * User's account has been quarantined based on recent activity
+ *
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ Quarantined = 17592186044416
+}
+/**
+ * https://discord.com/developers/docs/resources/user#user-object-premium-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum UserPremiumType {
+ None = 0,
+ NitroClassic = 1,
+ Nitro = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/user#connection-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIConnection {
+ /**
+ * ID of the connection account
+ */
+ id: string;
+ /**
+ * The username of the connection account
+ */
+ name: string;
+ /**
+ * The service of the connection
+ */
+ type: string;
+ /**
+ * Whether the connection is revoked
+ */
+ revoked?: boolean;
+ /**
+ * An array of partial server integrations
+ *
+ * See https://discord.com/developers/docs/resources/guild#integration-object
+ */
+ integrations?: Partial<APIGuildIntegration>[];
+ /**
+ * Whether the connection is verified
+ */
+ verified: boolean;
+ /**
+ * Whether friend sync is enabled for this connection
+ */
+ friend_sync: boolean;
+ /**
+ * Whether activities related to this connection will be shown in presence updates
+ */
+ show_activity: boolean;
+ /**
+ * Visibility of this connection
+ *
+ * See https://discord.com/developers/docs/resources/user#connection-object-visibility-types
+ */
+ visibility: ConnectionVisibility;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum ConnectionVisibility {
+ /**
+ * Invisible to everyone except the user themselves
+ */
+ None = 0,
+ /**
+ * Visible to everyone
+ */
+ Everyone = 1
+}
+//# sourceMappingURL=user.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/user.d.ts.map b/node_modules/discord-api-types/payloads/v8/user.d.ts.map
new file mode 100644
index 0000000..f787980
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/user.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,GAAG,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,aAAa;IAC7B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,EAAE,CAAC;IAC9C;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,UAAU,EAAE,oBAAoB,CAAC;CACjC;AAED;;GAEG;AACH,oBAAY,oBAAoB;IAC/B;;OAEG;IACH,IAAI,IAAA;IACJ;;OAEG;IACH,QAAQ,IAAA;CACR"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/user.js b/node_modules/discord-api-types/payloads/v8/user.js
new file mode 100644
index 0000000..00b8f5f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/user.js
@@ -0,0 +1,108 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/user
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ConnectionVisibility = exports.UserPremiumType = exports.UserFlags = void 0;
+/**
+ * https://discord.com/developers/docs/resources/user#user-object-user-flags
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var UserFlags;
+(function (UserFlags) {
+ /**
+ * Discord Employee
+ */
+ UserFlags[UserFlags["Staff"] = 1] = "Staff";
+ /**
+ * Partnered Server Owner
+ */
+ UserFlags[UserFlags["Partner"] = 2] = "Partner";
+ /**
+ * HypeSquad Events Coordinator
+ */
+ UserFlags[UserFlags["Hypesquad"] = 4] = "Hypesquad";
+ /**
+ * Bug Hunter Level 1
+ */
+ UserFlags[UserFlags["BugHunterLevel1"] = 8] = "BugHunterLevel1";
+ /**
+ * House Bravery Member
+ */
+ UserFlags[UserFlags["HypeSquadOnlineHouse1"] = 64] = "HypeSquadOnlineHouse1";
+ /**
+ * House Brilliance Member
+ */
+ UserFlags[UserFlags["HypeSquadOnlineHouse2"] = 128] = "HypeSquadOnlineHouse2";
+ /**
+ * House Balance MemberW
+ */
+ UserFlags[UserFlags["HypeSquadOnlineHouse3"] = 256] = "HypeSquadOnlineHouse3";
+ /**
+ * Early Nitro Supporter
+ */
+ UserFlags[UserFlags["PremiumEarlySupporter"] = 512] = "PremiumEarlySupporter";
+ /**
+ * User is a [team](https://discord.com/developers/docs/topics/teams)
+ */
+ UserFlags[UserFlags["TeamPseudoUser"] = 1024] = "TeamPseudoUser";
+ /**
+ * Bug Hunter Level 2
+ */
+ UserFlags[UserFlags["BugHunterLevel2"] = 16384] = "BugHunterLevel2";
+ /**
+ * Verified Bot
+ */
+ UserFlags[UserFlags["VerifiedBot"] = 65536] = "VerifiedBot";
+ /**
+ * Early Verified Bot Developer
+ */
+ UserFlags[UserFlags["VerifiedDeveloper"] = 131072] = "VerifiedDeveloper";
+ /**
+ * Discord Certified Moderator
+ */
+ UserFlags[UserFlags["CertifiedModerator"] = 262144] = "CertifiedModerator";
+ /**
+ * Bot uses only [HTTP interactions](https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction) and is shown in the online member list
+ */
+ UserFlags[UserFlags["BotHTTPInteractions"] = 524288] = "BotHTTPInteractions";
+ /**
+ * User has been identified as spammer
+ *
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ UserFlags[UserFlags["Spammer"] = 1048576] = "Spammer";
+ /**
+ * User's account has been quarantined based on recent activity
+ *
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ UserFlags[UserFlags["Quarantined"] = 17592186044416] = "Quarantined";
+})(UserFlags = exports.UserFlags || (exports.UserFlags = {}));
+/**
+ * https://discord.com/developers/docs/resources/user#user-object-premium-types
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var UserPremiumType;
+(function (UserPremiumType) {
+ UserPremiumType[UserPremiumType["None"] = 0] = "None";
+ UserPremiumType[UserPremiumType["NitroClassic"] = 1] = "NitroClassic";
+ UserPremiumType[UserPremiumType["Nitro"] = 2] = "Nitro";
+})(UserPremiumType = exports.UserPremiumType || (exports.UserPremiumType = {}));
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var ConnectionVisibility;
+(function (ConnectionVisibility) {
+ /**
+ * Invisible to everyone except the user themselves
+ */
+ ConnectionVisibility[ConnectionVisibility["None"] = 0] = "None";
+ /**
+ * Visible to everyone
+ */
+ ConnectionVisibility[ConnectionVisibility["Everyone"] = 1] = "Everyone";
+})(ConnectionVisibility = exports.ConnectionVisibility || (exports.ConnectionVisibility = {}));
+//# sourceMappingURL=user.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/user.js.map b/node_modules/discord-api-types/payloads/v8/user.js.map
new file mode 100644
index 0000000..ce0065a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/user.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAmFH;;;;GAIG;AACH,IAAY,SAqEX;AArED,WAAY,SAAS;IACpB;;OAEG;IACH,2CAAc,CAAA;IACd;;OAEG;IACH,+CAAgB,CAAA;IAChB;;OAEG;IACH,mDAAkB,CAAA;IAClB;;OAEG;IACH,+DAAwB,CAAA;IACxB;;OAEG;IACH,4EAA8B,CAAA;IAC9B;;OAEG;IACH,6EAA8B,CAAA;IAC9B;;OAEG;IACH,6EAA8B,CAAA;IAC9B;;OAEG;IACH,6EAA8B,CAAA;IAC9B;;OAEG;IACH,gEAAwB,CAAA;IACxB;;OAEG;IACH,mEAAyB,CAAA;IACzB;;OAEG;IACH,2DAAqB,CAAA;IACrB;;OAEG;IACH,wEAA2B,CAAA;IAC3B;;OAEG;IACH,0EAA4B,CAAA;IAC5B;;OAEG;IACH,4EAA6B,CAAA;IAC7B;;;;OAIG;IACH,qDAAiB,CAAA;IACjB;;;;OAIG;IACH,oEAAqB,CAAA;AACtB,CAAC,EArEW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAqEpB;AAED;;;;GAIG;AACH,IAAY,eAIX;AAJD,WAAY,eAAe;IAC1B,qDAAI,CAAA;IACJ,qEAAY,CAAA;IACZ,uDAAK,CAAA;AACN,CAAC,EAJW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAI1B;AAkDD;;GAEG;AACH,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC/B;;OAEG;IACH,+DAAI,CAAA;IACJ;;OAEG;IACH,uEAAQ,CAAA;AACT,CAAC,EATW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAS/B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/voice.d.ts b/node_modules/discord-api-types/payloads/v8/voice.d.ts
new file mode 100644
index 0000000..44d3789
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/voice.d.ts
@@ -0,0 +1,94 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/voice
+ */
+import type { Snowflake } from '../../globals';
+import type { APIGuildMember } from './guild';
+/**
+ * https://discord.com/developers/docs/resources/voice#voice-state-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface GatewayVoiceState {
+ /**
+ * The guild id this voice state is for
+ */
+ guild_id?: Snowflake;
+ /**
+ * The channel id this user is connected to
+ */
+ channel_id: Snowflake | null;
+ /**
+ * The user id this voice state is for
+ */
+ user_id: Snowflake;
+ /**
+ * The guild member this voice state is for
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ member?: APIGuildMember;
+ /**
+ * The session id for this voice state
+ */
+ session_id: string;
+ /**
+ * Whether this user is deafened by the server
+ */
+ deaf: boolean;
+ /**
+ * Whether this user is muted by the server
+ */
+ mute: boolean;
+ /**
+ * Whether this user is locally deafened
+ */
+ self_deaf: boolean;
+ /**
+ * Whether this user is locally muted
+ */
+ self_mute: boolean;
+ /**
+ * Whether this user is streaming using "Go Live"
+ */
+ self_stream?: boolean;
+ /**
+ * Whether this user's camera is enabled
+ */
+ self_video: boolean;
+ /**
+ * Whether this user is muted by the current user
+ */
+ suppress: boolean;
+ /**
+ * The time at which the user requested to speak
+ */
+ request_to_speak_timestamp: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/voice#voice-region-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIVoiceRegion {
+ /**
+ * Unique ID for the region
+ */
+ id: string;
+ /**
+ * Name of the region
+ */
+ name: string;
+ /**
+ * `true` for a single server that is closest to the current user's client
+ */
+ optimal: boolean;
+ /**
+ * Whether this is a deprecated voice region (avoid switching to these)
+ */
+ deprecated: boolean;
+ /**
+ * Whether this is a custom voice region (used for events/etc)
+ */
+ custom: boolean;
+}
+//# sourceMappingURL=voice.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/voice.d.ts.map b/node_modules/discord-api-types/payloads/v8/voice.d.ts.map
new file mode 100644
index 0000000..ee4d147
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/voice.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,UAAU,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;CAChB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/voice.js b/node_modules/discord-api-types/payloads/v8/voice.js
new file mode 100644
index 0000000..8e67862
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/voice.js
@@ -0,0 +1,6 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/voice
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=voice.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/voice.js.map b/node_modules/discord-api-types/payloads/v8/voice.js.map
new file mode 100644
index 0000000..e54835f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/voice.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"voice.js","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":";AAAA;;GAEG"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/webhook.d.ts b/node_modules/discord-api-types/payloads/v8/webhook.d.ts
new file mode 100644
index 0000000..bdb7ea4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/webhook.d.ts
@@ -0,0 +1,82 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/webhook
+ */
+import type { Snowflake } from '../../globals';
+import type { APIPartialChannel, APIPartialGuild, APIUser } from './index';
+/**
+ * https://discord.com/developers/docs/resources/webhook#webhook-object
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIWebhook {
+ /**
+ * The id of the webhook
+ */
+ id: Snowflake;
+ /**
+ * The type of the webhook
+ *
+ * See https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types
+ */
+ type: WebhookType;
+ /**
+ * The guild id this webhook is for
+ */
+ guild_id?: Snowflake;
+ /**
+ * The channel id this webhook is for
+ */
+ channel_id: Snowflake;
+ /**
+ * The user this webhook was created by (not returned when getting a webhook with its token)
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user?: APIUser;
+ /**
+ * The default name of the webhook
+ */
+ name: string | null;
+ /**
+ * The default avatar of the webhook
+ */
+ avatar: string | null;
+ /**
+ * The secure token of the webhook (returned for Incoming Webhooks)
+ */
+ token?: string;
+ /**
+ * The bot/OAuth2 application that created this webhook
+ */
+ application_id: Snowflake | null;
+ /**
+ * The guild of the channel that this webhook is following (returned for Channel Follower Webhooks)
+ */
+ source_guild?: APIPartialGuild;
+ /**
+ * The channel that this webhook is following (returned for Channel Follower Webhooks)
+ */
+ source_channel?: APIPartialChannel;
+ /**
+ * The url used for executing the webhook (returned by the webhooks OAuth2 flow)
+ */
+ url?: string;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare enum WebhookType {
+ /**
+ * Incoming Webhooks can post messages to channels with a generated token
+ */
+ Incoming = 1,
+ /**
+ * Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels
+ */
+ ChannelFollower = 2,
+ /**
+ * Application webhooks are webhooks used with Interactions
+ */
+ Application = 3
+}
+//# sourceMappingURL=webhook.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/webhook.d.ts.map b/node_modules/discord-api-types/payloads/v8/webhook.d.ts.map
new file mode 100644
index 0000000..39da30e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/webhook.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAE3E;;;;GAIG;AACH,MAAM,WAAW,UAAU;IAC1B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;;;OAIG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,cAAc,EAAE,SAAS,GAAG,IAAI,CAAC;IACjC;;OAEG;IACH,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B;;OAEG;IACH,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,oBAAY,WAAW;IACtB;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,eAAe,IAAA;IACf;;OAEG;IACH,WAAW,IAAA;CACX"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/webhook.js b/node_modules/discord-api-types/payloads/v8/webhook.js
new file mode 100644
index 0000000..ed535be
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/webhook.js
@@ -0,0 +1,25 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/webhook
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.WebhookType = void 0;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+var WebhookType;
+(function (WebhookType) {
+ /**
+ * Incoming Webhooks can post messages to channels with a generated token
+ */
+ WebhookType[WebhookType["Incoming"] = 1] = "Incoming";
+ /**
+ * Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels
+ */
+ WebhookType[WebhookType["ChannelFollower"] = 2] = "ChannelFollower";
+ /**
+ * Application webhooks are webhooks used with Interactions
+ */
+ WebhookType[WebhookType["Application"] = 3] = "Application";
+})(WebhookType = exports.WebhookType || (exports.WebhookType = {}));
+//# sourceMappingURL=webhook.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v8/webhook.js.map b/node_modules/discord-api-types/payloads/v8/webhook.js.map
new file mode 100644
index 0000000..10a4d51
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v8/webhook.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAiEH;;GAEG;AACH,IAAY,WAaX;AAbD,WAAY,WAAW;IACtB;;OAEG;IACH,qDAAY,CAAA;IACZ;;OAEG;IACH,mEAAe,CAAA;IACf;;OAEG;IACH,2DAAW,CAAA;AACZ,CAAC,EAbW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAatB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.d.ts
new file mode 100644
index 0000000..d3d5318
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.d.ts
@@ -0,0 +1,6 @@
+import type { Snowflake } from '../../../../../globals';
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+export type APIApplicationCommandAttachmentOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Attachment>;
+export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Attachment, Snowflake>;
+//# sourceMappingURL=attachment.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map
new file mode 100644
index 0000000..9b6b302
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,qCAAqC,GAChD,+BAA+B,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;AAE1E,MAAM,MAAM,oDAAoD,GAAG,4BAA4B,CAC9F,4BAA4B,CAAC,UAAU,EACvC,SAAS,CACT,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.js b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.js
new file mode 100644
index 0000000..c79ce94
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=attachment.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.js.map
new file mode 100644
index 0000000..0cf9a21
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"attachment.js","sourceRoot":"","sources":["attachment.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.d.ts
new file mode 100644
index 0000000..79cbc57
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.d.ts
@@ -0,0 +1,23 @@
+import type { LocalizationMap } from '../../../../../v9';
+import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
+export interface APIApplicationCommandOptionBase<Type extends ApplicationCommandOptionType> {
+ type: Type;
+ name: string;
+ name_localizations?: LocalizationMap | null;
+ description: string;
+ description_localizations?: LocalizationMap | null;
+ required?: boolean;
+}
+export interface APIInteractionDataOptionBase<T extends ApplicationCommandOptionType, D> {
+ name: string;
+ type: T;
+ value: D;
+}
+export type APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<Base extends APIApplicationCommandOptionBase<ApplicationCommandOptionType>, ChoiceType extends APIApplicationCommandOptionChoice> = (Base & {
+ autocomplete: true;
+ choices?: [];
+}) | (Base & {
+ autocomplete?: false;
+ choices?: ChoiceType[];
+});
+//# sourceMappingURL=base.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.d.ts.map
new file mode 100644
index 0000000..326fa4e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,WAAW,+BAA+B,CAAC,IAAI,SAAS,4BAA4B;IACzF,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,4BAA4B,CAAC,CAAC,SAAS,4BAA4B,EAAE,CAAC;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,CAAC,CAAC;CACT;AAED,MAAM,MAAM,2DAA2D,CACtE,IAAI,SAAS,+BAA+B,CAAC,4BAA4B,CAAC,EAC1E,UAAU,SAAS,iCAAiC,IAElD,CAAC,IAAI,GAAG;IACR,YAAY,EAAE,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,EAAE,CAAC;CACZ,CAAC,GACF,CAAC,IAAI,GAAG;IACR,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.js b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.js
new file mode 100644
index 0000000..1e393c0
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=base.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.js.map
new file mode 100644
index 0000000..755d82e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"base.js","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.d.ts
new file mode 100644
index 0000000..9f5fc46
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.d.ts
@@ -0,0 +1,5 @@
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+export type APIApplicationCommandBooleanOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Boolean>;
+export type APIApplicationCommandInteractionDataBooleanOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Boolean, boolean>;
+//# sourceMappingURL=boolean.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map
new file mode 100644
index 0000000..814d6a2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["boolean.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,kCAAkC,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAEvH,MAAM,MAAM,iDAAiD,GAAG,4BAA4B,CAC3F,4BAA4B,CAAC,OAAO,EACpC,OAAO,CACP,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.js b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.js
new file mode 100644
index 0000000..8b82929
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=boolean.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.js.map
new file mode 100644
index 0000000..2eb5640
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"boolean.js","sourceRoot":"","sources":["boolean.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.d.ts
new file mode 100644
index 0000000..4b64561
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.d.ts
@@ -0,0 +1,9 @@
+import type { Snowflake } from '../../../../../globals';
+import type { ChannelType } from '../../../channel';
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
+ channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>[];
+}
+export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Channel, Snowflake>;
+//# sourceMappingURL=channel.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.d.ts.map
new file mode 100644
index 0000000..e954d0d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,kCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E,aAAa,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;CAC7E;AAED,MAAM,MAAM,iDAAiD,GAAG,4BAA4B,CAC3F,4BAA4B,CAAC,OAAO,EACpC,SAAS,CACT,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.js b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.js
new file mode 100644
index 0000000..7c587bc
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=channel.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.js.map
new file mode 100644
index 0000000..f1057f4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.d.ts
new file mode 100644
index 0000000..1a4f008
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.d.ts
@@ -0,0 +1,18 @@
+import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
+import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
+interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
+ /**
+ * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
+ */
+ min_value?: number;
+ /**
+ * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
+ */
+ max_value?: number;
+}
+export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandIntegerOptionBase, APIApplicationCommandOptionChoice<number>>;
+export interface APIApplicationCommandInteractionDataIntegerOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Integer, number> {
+ focused?: boolean;
+}
+export {};
+//# sourceMappingURL=integer.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.d.ts.map
new file mode 100644
index 0000000..4970fe5
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["integer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,UAAU,sCACT,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,kCAAkC,GAAG,2DAA2D,CAC3G,sCAAsC,EACtC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,iDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,OAAO,EAAE,MAAM,CAAC;IAClF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.js b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.js
new file mode 100644
index 0000000..bdae3b2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=integer.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.js.map
new file mode 100644
index 0000000..525e62f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"integer.js","sourceRoot":"","sources":["integer.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.d.ts
new file mode 100644
index 0000000..385bf4a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.d.ts
@@ -0,0 +1,6 @@
+import type { Snowflake } from '../../../../../globals';
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+export type APIApplicationCommandMentionableOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Mentionable>;
+export type APIApplicationCommandInteractionDataMentionableOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Mentionable, Snowflake>;
+//# sourceMappingURL=mentionable.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map
new file mode 100644
index 0000000..3e93ca5
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"mentionable.d.ts","sourceRoot":"","sources":["mentionable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,sCAAsC,GACjD,+BAA+B,CAAC,4BAA4B,CAAC,WAAW,CAAC,CAAC;AAE3E,MAAM,MAAM,qDAAqD,GAAG,4BAA4B,CAC/F,4BAA4B,CAAC,WAAW,EACxC,SAAS,CACT,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.js b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.js
new file mode 100644
index 0000000..41a60eb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=mentionable.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.js.map
new file mode 100644
index 0000000..f0d8dfb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"mentionable.js","sourceRoot":"","sources":["mentionable.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.d.ts
new file mode 100644
index 0000000..4292b67
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.d.ts
@@ -0,0 +1,18 @@
+import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
+import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
+interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
+ /**
+ * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
+ */
+ min_value?: number;
+ /**
+ * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
+ */
+ max_value?: number;
+}
+export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandNumberOptionBase, APIApplicationCommandOptionChoice<number>>;
+export interface APIApplicationCommandInteractionDataNumberOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Number, number> {
+ focused?: boolean;
+}
+export {};
+//# sourceMappingURL=number.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.d.ts.map
new file mode 100644
index 0000000..e440f36
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,UAAU,qCACT,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC;IAC5E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,iCAAiC,GAAG,2DAA2D,CAC1G,qCAAqC,EACrC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,gDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.js b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.js
new file mode 100644
index 0000000..f779930
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=number.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.js.map
new file mode 100644
index 0000000..28d5b03
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"number.js","sourceRoot":"","sources":["number.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.d.ts
new file mode 100644
index 0000000..0a00fd7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.d.ts
@@ -0,0 +1,6 @@
+import type { Snowflake } from '../../../../../globals';
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+export type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Role>;
+export type APIApplicationCommandInteractionDataRoleOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Role, Snowflake>;
+//# sourceMappingURL=role.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.d.ts.map
new file mode 100644
index 0000000..79188e6
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"role.d.ts","sourceRoot":"","sources":["role.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,+BAA+B,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;AAEjH,MAAM,MAAM,8CAA8C,GAAG,4BAA4B,CACxF,4BAA4B,CAAC,IAAI,EACjC,SAAS,CACT,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.js b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.js
new file mode 100644
index 0000000..db328fc
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=role.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.js.map
new file mode 100644
index 0000000..490c1af
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"role.js","sourceRoot":"","sources":["role.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.d.ts
new file mode 100644
index 0000000..504ad12
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.d.ts
@@ -0,0 +1,26 @@
+import type { LocalizationMap } from '../../../../../v9';
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
+ */
+export declare enum ApplicationCommandOptionType {
+ Subcommand = 1,
+ SubcommandGroup = 2,
+ String = 3,
+ Integer = 4,
+ Boolean = 5,
+ User = 6,
+ Channel = 7,
+ Role = 8,
+ Mentionable = 9,
+ Number = 10,
+ Attachment = 11
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure
+ */
+export interface APIApplicationCommandOptionChoice<ValueType = string | number> {
+ name: string;
+ name_localizations?: LocalizationMap | null;
+ value: ValueType;
+}
+//# sourceMappingURL=shared.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.d.ts.map
new file mode 100644
index 0000000..d785083
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;GAEG;AACH,oBAAY,4BAA4B;IACvC,UAAU,IAAI;IACd,eAAe,IAAA;IACf,MAAM,IAAA;IACN,OAAO,IAAA;IACP,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,WAAW,IAAA;IACX,MAAM,KAAA;IACN,UAAU,KAAA;CACV;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC,CAAC,SAAS,GAAG,MAAM,GAAG,MAAM;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC5C,KAAK,EAAE,SAAS,CAAC;CACjB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.js b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.js
new file mode 100644
index 0000000..e71ad7d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.js
@@ -0,0 +1,21 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ApplicationCommandOptionType = void 0;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
+ */
+var ApplicationCommandOptionType;
+(function (ApplicationCommandOptionType) {
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Subcommand"] = 1] = "Subcommand";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["SubcommandGroup"] = 2] = "SubcommandGroup";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["String"] = 3] = "String";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Integer"] = 4] = "Integer";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Boolean"] = 5] = "Boolean";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["User"] = 6] = "User";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Channel"] = 7] = "Channel";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Role"] = 8] = "Role";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Mentionable"] = 9] = "Mentionable";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Number"] = 10] = "Number";
+ ApplicationCommandOptionType[ApplicationCommandOptionType["Attachment"] = 11] = "Attachment";
+})(ApplicationCommandOptionType = exports.ApplicationCommandOptionType || (exports.ApplicationCommandOptionType = {}));
+//# sourceMappingURL=shared.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.js.map
new file mode 100644
index 0000000..b3672ec
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"shared.js","sourceRoot":"","sources":["shared.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,IAAY,4BAYX;AAZD,WAAY,4BAA4B;IACvC,2FAAc,CAAA;IACd,qGAAe,CAAA;IACf,mFAAM,CAAA;IACN,qFAAO,CAAA;IACP,qFAAO,CAAA;IACP,+EAAI,CAAA;IACJ,qFAAO,CAAA;IACP,+EAAI,CAAA;IACJ,6FAAW,CAAA;IACX,oFAAM,CAAA;IACN,4FAAU,CAAA;AACX,CAAC,EAZW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAYvC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.d.ts
new file mode 100644
index 0000000..be078fb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.d.ts
@@ -0,0 +1,18 @@
+import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
+import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
+interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
+ /**
+ * For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).
+ */
+ min_length?: number;
+ /**
+ * For option type `STRING`, the maximum allowed length (minimum of `1`, maximum of `6000`).
+ */
+ max_length?: number;
+}
+export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandStringOptionBase, APIApplicationCommandOptionChoice<string>>;
+export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
+ focused?: boolean;
+}
+export {};
+//# sourceMappingURL=string.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.d.ts.map
new file mode 100644
index 0000000..295f1e0
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,UAAU,qCACT,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC;IAC5E;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,iCAAiC,GAAG,2DAA2D,CAC1G,qCAAqC,EACrC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,gDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.js b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.js
new file mode 100644
index 0000000..2967e4e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=string.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.js.map
new file mode 100644
index 0000000..84875d4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"string.js","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.d.ts
new file mode 100644
index 0000000..0264fa3
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.d.ts
@@ -0,0 +1,12 @@
+import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput';
+import type { APIApplicationCommandOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
+ options?: APIApplicationCommandBasicOption[];
+}
+export interface APIApplicationCommandInteractionDataSubcommandOption {
+ name: string;
+ type: ApplicationCommandOptionType.Subcommand;
+ options?: APIApplicationCommandInteractionDataBasicOption[];
+}
+//# sourceMappingURL=subcommand.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map
new file mode 100644
index 0000000..32405a2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"subcommand.d.ts","sourceRoot":"","sources":["subcommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gCAAgC,EAAE,+CAA+C,EAAE,MAAM,cAAc,CAAC;AACtH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,qCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,UAAU,CAAC;IAChF,OAAO,CAAC,EAAE,gCAAgC,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,oDAAoD;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,4BAA4B,CAAC,UAAU,CAAC;IAC9C,OAAO,CAAC,EAAE,+CAA+C,EAAE,CAAC;CAC5D"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.js b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.js
new file mode 100644
index 0000000..b82efe7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=subcommand.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.js.map
new file mode 100644
index 0000000..8872d4a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"subcommand.js","sourceRoot":"","sources":["subcommand.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts
new file mode 100644
index 0000000..e5f3aad
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts
@@ -0,0 +1,12 @@
+import type { APIApplicationCommandOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+import type { APIApplicationCommandInteractionDataSubcommandOption, APIApplicationCommandSubcommandOption } from './subcommand';
+export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
+ options?: APIApplicationCommandSubcommandOption[];
+}
+export interface APIApplicationCommandInteractionDataSubcommandGroupOption {
+ name: string;
+ type: ApplicationCommandOptionType.SubcommandGroup;
+ options: APIApplicationCommandInteractionDataSubcommandOption[];
+}
+//# sourceMappingURL=subcommandGroup.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map
new file mode 100644
index 0000000..a3aca65
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"subcommandGroup.d.ts","sourceRoot":"","sources":["subcommandGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EACX,oDAAoD,EACpD,qCAAqC,EACrC,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,0CAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,eAAe,CAAC;IACrF,OAAO,CAAC,EAAE,qCAAqC,EAAE,CAAC;CAClD;AAED,MAAM,WAAW,yDAAyD;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,4BAA4B,CAAC,eAAe,CAAC;IACnD,OAAO,EAAE,oDAAoD,EAAE,CAAC;CAChE"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.js b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.js
new file mode 100644
index 0000000..e06cf57
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=subcommandGroup.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map
new file mode 100644
index 0000000..fcf1472
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"subcommandGroup.js","sourceRoot":"","sources":["subcommandGroup.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.d.ts
new file mode 100644
index 0000000..cf470c6
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.d.ts
@@ -0,0 +1,6 @@
+import type { Snowflake } from '../../../../../globals';
+import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
+import type { ApplicationCommandOptionType } from './shared';
+export type APIApplicationCommandUserOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.User>;
+export type APIApplicationCommandInteractionDataUserOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.User, Snowflake>;
+//# sourceMappingURL=user.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.d.ts.map
new file mode 100644
index 0000000..e6d5c84
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,MAAM,+BAA+B,GAAG,+BAA+B,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;AAEjH,MAAM,MAAM,8CAA8C,GAAG,4BAA4B,CACxF,4BAA4B,CAAC,IAAI,EACjC,SAAS,CACT,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.js b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.js
new file mode 100644
index 0000000..33269d3
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=user.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.js.map
new file mode 100644
index 0000000..ff1a289
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.d.ts
new file mode 100644
index 0000000..3014c11
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.d.ts
@@ -0,0 +1,61 @@
+import type { APIInteractionDataResolved } from '../../index';
+import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands';
+import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base';
+import type { APIApplicationCommandAttachmentOption, APIApplicationCommandInteractionDataAttachmentOption } from './_chatInput/attachment';
+import type { APIApplicationCommandBooleanOption, APIApplicationCommandInteractionDataBooleanOption } from './_chatInput/boolean';
+import type { APIApplicationCommandChannelOption, APIApplicationCommandInteractionDataChannelOption } from './_chatInput/channel';
+import type { APIApplicationCommandIntegerOption, APIApplicationCommandInteractionDataIntegerOption } from './_chatInput/integer';
+import type { APIApplicationCommandInteractionDataMentionableOption, APIApplicationCommandMentionableOption } from './_chatInput/mentionable';
+import type { APIApplicationCommandInteractionDataNumberOption, APIApplicationCommandNumberOption } from './_chatInput/number';
+import type { APIApplicationCommandInteractionDataRoleOption, APIApplicationCommandRoleOption } from './_chatInput/role';
+import type { APIApplicationCommandInteractionDataStringOption, APIApplicationCommandStringOption } from './_chatInput/string';
+import type { APIApplicationCommandInteractionDataSubcommandOption, APIApplicationCommandSubcommandOption } from './_chatInput/subcommand';
+import type { APIApplicationCommandInteractionDataSubcommandGroupOption, APIApplicationCommandSubcommandGroupOption } from './_chatInput/subcommandGroup';
+import type { APIApplicationCommandInteractionDataUserOption, APIApplicationCommandUserOption } from './_chatInput/user';
+import type { APIBaseApplicationCommandInteractionData } from './internals';
+export * from './_chatInput/attachment';
+export * from './_chatInput/base';
+export * from './_chatInput/boolean';
+export * from './_chatInput/channel';
+export * from './_chatInput/integer';
+export * from './_chatInput/mentionable';
+export * from './_chatInput/number';
+export * from './_chatInput/role';
+export * from './_chatInput/shared';
+export * from './_chatInput/string';
+export * from './_chatInput/subcommand';
+export * from './_chatInput/subcommandGroup';
+export * from './_chatInput/user';
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
+ */
+export type APIApplicationCommandBasicOption = APIApplicationCommandStringOption | APIApplicationCommandIntegerOption | APIApplicationCommandBooleanOption | APIApplicationCommandUserOption | APIApplicationCommandChannelOption | APIApplicationCommandRoleOption | APIApplicationCommandMentionableOption | APIApplicationCommandNumberOption | APIApplicationCommandAttachmentOption;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
+ */
+export type APIApplicationCommandOption = APIApplicationCommandSubcommandOption | APIApplicationCommandSubcommandGroupOption | APIApplicationCommandBasicOption;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure
+ */
+export type APIApplicationCommandInteractionDataOption = APIApplicationCommandInteractionDataSubcommandOption | APIApplicationCommandInteractionDataSubcommandGroupOption | APIApplicationCommandInteractionDataBasicOption;
+export type APIApplicationCommandInteractionDataBasicOption = APIApplicationCommandInteractionDataStringOption | APIApplicationCommandInteractionDataIntegerOption | APIApplicationCommandInteractionDataBooleanOption | APIApplicationCommandInteractionDataUserOption | APIApplicationCommandInteractionDataChannelOption | APIApplicationCommandInteractionDataRoleOption | APIApplicationCommandInteractionDataMentionableOption | APIApplicationCommandInteractionDataNumberOption | APIApplicationCommandInteractionDataAttachmentOption;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
+ */
+export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
+ options?: APIApplicationCommandInteractionDataOption[];
+ resolved?: APIInteractionDataResolved;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIChatInputApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIChatInputApplicationCommandInteractionData>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIChatInputApplicationCommandDMInteraction = APIDMInteractionWrapper<APIChatInputApplicationCommandInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIChatInputApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIChatInputApplicationCommandInteraction>;
+//# sourceMappingURL=chatInput.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.d.ts.map
new file mode 100644
index 0000000..a996b1f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"chatInput.d.ts","sourceRoot":"","sources":["chatInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAE,uCAAuC,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC9G,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,KAAK,EACX,qCAAqC,EACrC,oDAAoD,EACpD,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACX,kCAAkC,EAClC,iDAAiD,EACjD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,kCAAkC,EAClC,iDAAiD,EACjD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,kCAAkC,EAClC,iDAAiD,EACjD,MAAM,sBAAsB,C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GACnD,oDAAoD,GACpD,yDAAyD,GACzD,+CAA+C,CAAC;AAEnD,MAAM,MAAM,+CAA+C,GACxD,gDAAgD,GAChD,iDAAiD,GACjD,iDAAiD,GACjD,8CAA8C,GAC9C,iDAAiD,GACjD,8CAA8C,GAC9C,qDAAqD,GACrD,gDAAgD,GAChD,oDAAoD,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,6CAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,SAAS,CAAC;IAClF,OAAO,CAAC,EAAE,0CAA0C,EAAE,CAAC;IACvD,QAAQ,CAAC,EAAE,0BAA0B,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,MAAM,yCAAyC,GACpD,uCAAuC,CAAC,6CAA6C,CAAC,CAAC;AAExF;;GAEG;AACH,MAAM,MAAM,2CAA2C,GACtD,uBAAuB,CAAC,yCAAyC,CAAC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,8CAA8C,GACzD,0BAA0B,CAAC,yCAAyC,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.js b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.js
new file mode 100644
index 0000000..2d3c151
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.js
@@ -0,0 +1,30 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./_chatInput/attachment"), exports);
+__exportStar(require("./_chatInput/base"), exports);
+__exportStar(require("./_chatInput/boolean"), exports);
+__exportStar(require("./_chatInput/channel"), exports);
+__exportStar(require("./_chatInput/integer"), exports);
+__exportStar(require("./_chatInput/mentionable"), exports);
+__exportStar(require("./_chatInput/number"), exports);
+__exportStar(require("./_chatInput/role"), exports);
+__exportStar(require("./_chatInput/shared"), exports);
+__exportStar(require("./_chatInput/string"), exports);
+__exportStar(require("./_chatInput/subcommand"), exports);
+__exportStar(require("./_chatInput/subcommandGroup"), exports);
+__exportStar(require("./_chatInput/user"), exports);
+//# sourceMappingURL=chatInput.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.js.map
new file mode 100644
index 0000000..5c6ed3c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"chatInput.js","sourceRoot":"","sources":["chatInput.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAiDA,0DAAwC;AACxC,oDAAkC;AAClC,uDAAqC;AACrC,uDAAqC;AACrC,uDAAqC;AACrC,2DAAyC;AACzC,sDAAoC;AACpC,oDAAkC;AAClC,sDAAoC;AACpC,sDAAoC;AACpC,0DAAwC;AACxC,+DAA6C;AAC7C,oDAAkC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.d.ts
new file mode 100644
index 0000000..b472856
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.d.ts
@@ -0,0 +1,66 @@
+import type { Snowflake } from '../../../../globals';
+import type { APIMessage } from '../../channel';
+import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands';
+import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIUserInteractionDataResolved } from '../base';
+import type { APIBaseApplicationCommandInteractionData } from './internals';
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
+ */
+export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
+ target_id: Snowflake;
+ resolved: APIUserInteractionDataResolved;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
+ */
+export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
+ target_id: Snowflake;
+ resolved: APIMessageApplicationCommandInteractionDataResolved;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
+ */
+export interface APIMessageApplicationCommandInteractionDataResolved {
+ messages: Record<Snowflake, APIMessage>;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
+ */
+export type APIContextMenuInteractionData = APIUserApplicationCommandInteractionData | APIMessageApplicationCommandInteractionData;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIUserApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIUserApplicationCommandInteractionData>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIUserApplicationCommandDMInteraction = APIDMInteractionWrapper<APIUserApplicationCommandInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIUserApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIUserApplicationCommandInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIMessageApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIMessageApplicationCommandInteractionData>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIMessageApplicationCommandDMInteraction = APIDMInteractionWrapper<APIMessageApplicationCommandInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIMessageApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIMessageApplicationCommandInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIContextMenuInteraction = APIUserApplicationCommandInteraction | APIMessageApplicationCommandInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIContextMenuDMInteraction = APIUserApplicationCommandDMInteraction | APIMessageApplicationCommandDMInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIContextMenuGuildInteraction = APIUserApplicationCommandGuildInteraction | APIMessageApplicationCommandGuildInteraction;
+//# sourceMappingURL=contextMenu.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.d.ts.map
new file mode 100644
index 0000000..80d3a58
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"contextMenu.d.ts","sourceRoot":"","sources":["contextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,uCAAuC,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC9G,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC;AACnH,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,aAAa,CAAC;AAE5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/_interactions/_applicationCommands/contextMenu.js b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.js
new file mode 100644
index 0000000..e96ad8c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=contextMenu.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.js.map
new file mode 100644
index 0000000..c905148
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"contextMenu.js","sourceRoot":"","sources":["contextMenu.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.d.ts
new file mode 100644
index 0000000..7c351c1
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.d.ts
@@ -0,0 +1,9 @@
+import type { Snowflake } from '../../../../globals';
+import type { ApplicationCommandType } from '../applicationCommands';
+export interface APIBaseApplicationCommandInteractionData<Type extends ApplicationCommandType> {
+ id: Snowflake;
+ type: Type;
+ name: string;
+ guild_id?: Snowflake;
+}
+//# sourceMappingURL=internals.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.d.ts.map
new file mode 100644
index 0000000..8b35c6a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"internals.d.ts","sourceRoot":"","sources":["internals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,MAAM,WAAW,wCAAwC,CAAC,IAAI,SAAS,sBAAsB;IAC5F,EAAE,EAAE,SAAS,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.js b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.js
new file mode 100644
index 0000000..00585b4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=internals.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.js.map
new file mode 100644
index 0000000..c4808b2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"internals.js","sourceRoot":"","sources":["internals.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.d.ts
new file mode 100644
index 0000000..431bbbe
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.d.ts
@@ -0,0 +1,55 @@
+import type { Snowflake } from '../../../../globals';
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure
+ */
+export interface APIGuildApplicationCommandPermissions {
+ /**
+ * The id of the command or the application id if that permission applies to all commands
+ */
+ id: Snowflake;
+ /**
+ * The id of the application the command belongs to
+ */
+ application_id: Snowflake;
+ /**
+ * The id of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The permissions for the command in the guild
+ */
+ permissions: APIApplicationCommandPermission[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure
+ */
+export interface APIApplicationCommandPermission {
+ /**
+ * The id of the role, user or channel. Can also be a permission constant
+ */
+ id: Snowflake;
+ /**
+ * Role, user or channel
+ */
+ type: ApplicationCommandPermissionType;
+ /**
+ * `true` to allow, `false`, to disallow
+ */
+ permission: boolean;
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
+ */
+export declare enum ApplicationCommandPermissionType {
+ Role = 1,
+ User = 2,
+ Channel = 3
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants
+ */
+export declare const APIApplicationCommandPermissionsConstant: {
+ Everyone: (guildId: string | bigint) => Snowflake;
+ AllChannels: (guildId: string | bigint) => Snowflake;
+};
+//# sourceMappingURL=permissions.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.d.ts.map
new file mode 100644
index 0000000..4c1bcee
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACrD;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,cAAc,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,+BAA+B,EAAE,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,gCAAgC,CAAC;IACvC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,oBAAY,gCAAgC;IAC3C,IAAI,IAAI;IACR,IAAI,IAAA;IACJ,OAAO,IAAA;CACP;AAED;;GAEG;AACH,eAAO,MAAM,wCAAwC;wBAEhC,MAAM,GAAG,MAAM,KAAG,SAAS;2BACxB,MAAM,GAAG,MAAM,KAAG,SAAS;CAClD,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.js b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.js
new file mode 100644
index 0000000..8ef0aa2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.js
@@ -0,0 +1,21 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.APIApplicationCommandPermissionsConstant = exports.ApplicationCommandPermissionType = void 0;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
+ */
+var ApplicationCommandPermissionType;
+(function (ApplicationCommandPermissionType) {
+ ApplicationCommandPermissionType[ApplicationCommandPermissionType["Role"] = 1] = "Role";
+ ApplicationCommandPermissionType[ApplicationCommandPermissionType["User"] = 2] = "User";
+ ApplicationCommandPermissionType[ApplicationCommandPermissionType["Channel"] = 3] = "Channel";
+})(ApplicationCommandPermissionType = exports.ApplicationCommandPermissionType || (exports.ApplicationCommandPermissionType = {}));
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants
+ */
+exports.APIApplicationCommandPermissionsConstant = {
+ // eslint-disable-next-line unicorn/prefer-native-coercion-functions
+ Everyone: (guildId) => String(guildId),
+ AllChannels: (guildId) => String(BigInt(guildId) - 1n),
+};
+//# sourceMappingURL=permissions.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.js.map
new file mode 100644
index 0000000..f485500
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"permissions.js","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":";;;AA0CA;;GAEG;AACH,IAAY,gCAIX;AAJD,WAAY,gCAAgC;IAC3C,uFAAQ,CAAA;IACR,uFAAI,CAAA;IACJ,6FAAO,CAAA;AACR,CAAC,EAJW,gCAAgC,GAAhC,wCAAgC,KAAhC,wCAAgC,QAI3C;AAED;;GAEG;AACU,QAAA,wCAAwC,GAAG;IACvD,oEAAoE;IACpE,QAAQ,EAAE,CAAC,OAAwB,EAAa,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;IAClE,WAAW,EAAE,CAAC,OAAwB,EAAa,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;CAClF,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.d.ts
new file mode 100644
index 0000000..5433161
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.d.ts
@@ -0,0 +1,111 @@
+import type { Permissions, Snowflake } from '../../../globals';
+import type { LocalizationMap } from '../../../v9';
+import type { APIApplicationCommandOption, APIChatInputApplicationCommandDMInteraction, APIChatInputApplicationCommandGuildInteraction, APIChatInputApplicationCommandInteraction, APIChatInputApplicationCommandInteractionData } from './_applicationCommands/chatInput';
+import type { APIContextMenuDMInteraction, APIContextMenuGuildInteraction, APIContextMenuInteraction, APIContextMenuInteractionData } from './_applicationCommands/contextMenu';
+import type { APIBaseInteraction } from './base';
+import type { InteractionType } from './responses';
+export * from './_applicationCommands/chatInput';
+export * from './_applicationCommands/contextMenu';
+export * from './_applicationCommands/permissions';
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object
+ */
+export interface APIApplicationCommand {
+ /**
+ * Unique id of the command
+ */
+ id: Snowflake;
+ /**
+ * Type of the command
+ */
+ type: ApplicationCommandType;
+ /**
+ * Unique id of the parent application
+ */
+ application_id: Snowflake;
+ /**
+ * Guild id of the command, if not global
+ */
+ guild_id?: Snowflake;
+ /**
+ * 1-32 character name; `CHAT_INPUT` command names must be all lowercase matching `^[-_\p{L}\p{N}\p{sc=Deva}\p{sc=Thai}]{1,32}$`
+ */
+ name: string;
+ /**
+ * Localization dictionary for the name field. Values follow the same restrictions as name
+ */
+ name_localizations?: LocalizationMap | null;
+ /**
+ * The localized name
+ */
+ name_localized?: string;
+ /**
+ * 1-100 character description for `CHAT_INPUT` commands, empty string for `USER` and `MESSAGE` commands
+ */
+ description: string;
+ /**
+ * Localization dictionary for the description field. Values follow the same restrictions as description
+ */
+ description_localizations?: LocalizationMap | null;
+ /**
+ * The localized description
+ */
+ description_localized?: string;
+ /**
+ * The parameters for the `CHAT_INPUT` command, max 25
+ */
+ options?: APIApplicationCommandOption[];
+ /**
+ * Set of permissions represented as a bitset
+ */
+ default_member_permissions: Permissions | null;
+ /**
+ * Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible
+ */
+ dm_permission?: boolean;
+ /**
+ * Whether the command is enabled by default when the app is added to a guild
+ *
+ * If missing, this property should be assumed as `true`
+ *
+ * @deprecated Use `dm_permission` and/or `default_member_permissions` instead
+ */
+ default_permission?: boolean;
+ /**
+ * Indicates whether the command is age-restricted, defaults to `false`
+ */
+ nsfw?: boolean;
+ /**
+ * Autoincrementing version identifier updated during substantial record changes
+ */
+ version: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types
+ */
+export declare enum ApplicationCommandType {
+ ChatInput = 1,
+ User = 2,
+ Message = 3
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
+ */
+export type APIApplicationCommandInteractionData = APIChatInputApplicationCommandInteractionData | APIContextMenuInteractionData;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationCommandInteractionData> = APIBaseInteraction<InteractionType.ApplicationCommand, Data> & Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommand, Data>, 'channel' | 'channel_id' | 'data' | 'app_permissions'>>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIApplicationCommandInteraction = APIChatInputApplicationCommandInteraction | APIContextMenuInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIApplicationCommandDMInteraction = APIChatInputApplicationCommandDMInteraction | APIContextMenuDMInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIApplicationCommandGuildInteraction = APIChatInputApplicationCommandGuildInteraction | APIContextMenuGuildInteraction;
+//# sourceMappingURL=applicationCommands.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.d.ts.map
new file mode 100644
index 0000000..7ebd86e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"applicationCommands.d.ts","sourceRoot":"","sources":["applicationCommands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EACX,2BAA2B,EAC3B,2CAA2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H,oBAAY,sBAAsB;IACjC,SAAS,IAAI;IACb,IAAI,IAAA;IACJ,OAAO,IAAA;CACP;AAED;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAC7C,6CAA6C,GAC7C,6BAA6B,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,uCAAuC,CAAC,IAAI,SAAS,oCAAoC,IACpG,kBAAkB,CAAC,eAAe,CAAC,kBAAkB,EAAE,IAAI,CAAC,GAC3D,QAAQ,CACP,IAAI,CACH,kBAAkB,CAAC,eAAe,CAAC,kBAAkB,EAAE,IAAI,CAAC,EAC5D,SAAS,GAAG,YAAY,GAAG,MAAM,GAAG,iBAAiB,CACrD,CACD,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,yCAAyC,GAAG,yBAAyB,CAAC;AAErH;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC3C,2CAA2C,GAC3C,2BAA2B,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAC9C,8CAA8C,GAC9C,8BAA8B,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.js b/node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.js
new file mode 100644
index 0000000..7113b3c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.js
@@ -0,0 +1,30 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ApplicationCommandType = void 0;
+__exportStar(require("./_applicationCommands/chatInput"), exports);
+__exportStar(require("./_applicationCommands/contextMenu"), exports);
+__exportStar(require("./_applicationCommands/permissions"), exports);
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types
+ */
+var ApplicationCommandType;
+(function (ApplicationCommandType) {
+ ApplicationCommandType[ApplicationCommandType["ChatInput"] = 1] = "ChatInput";
+ ApplicationCommandType[ApplicationCommandType["User"] = 2] = "User";
+ ApplicationCommandType[ApplicationCommandType["Message"] = 3] = "Message";
+})(ApplicationCommandType = exports.ApplicationCommandType || (exports.ApplicationCommandType = {}));
+//# sourceMappingURL=applicationCommands.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.js.map
new file mode 100644
index 0000000..03c85bd
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"applicationCommands.js","sourceRoot":"","sources":["applicationCommands.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAkBA,mEAAiD;AACjD,qEAAmD;AACnD,qEAAmD;AA4EnD;;GAEG;AACH,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IACjC,6EAAa,CAAA;IACb,mEAAI,CAAA;IACJ,yEAAO,CAAA;AACR,CAAC,EAJW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAIjC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.d.ts
new file mode 100644
index 0000000..7b6f60c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.d.ts
@@ -0,0 +1,11 @@
+import type { APIBaseInteraction, APIChatInputApplicationCommandInteractionData, APIDMInteractionWrapper, APIGuildInteractionWrapper, InteractionType } from '../index';
+export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIChatInputApplicationCommandInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>>, 'data'>>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIApplicationCommandAutocompleteDMInteraction = APIDMInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIApplicationCommandAutocompleteGuildInteraction = APIGuildInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
+//# sourceMappingURL=autocomplete.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.d.ts.map
new file mode 100644
index 0000000..ee8a8c9
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["autocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kBAAkB,EAClB,6CAA6C,EAC7C,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,4CAA4C,GAAG,kBAAkB,CAC5E,eAAe,CAAC,8BAA8B,EAC9C,6CAA6C,CAC7C,GACA,QAAQ,CACP,IAAI,CACH,kBAAkB,CACjB,eAAe,CAAC,8BAA8B,EAC9C,QAAQ,CAAC,IAAI,CAAC,6CAA6C,EAAE,SAAS,CAAC,CAAC,CACxE,EACD,MAAM,CACN,CACD,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,8CAA8C,GACzD,uBAAuB,CAAC,4CAA4C,CAAC,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAC5D,0BAA0B,CAAC,4CAA4C,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.js b/node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.js
new file mode 100644
index 0000000..c165ee2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=autocomplete.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.js.map
new file mode 100644
index 0000000..d7f27d6
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"autocomplete.js","sourceRoot":"","sources":["autocomplete.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/base.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/base.d.ts
new file mode 100644
index 0000000..b1ed1d1
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/base.d.ts
@@ -0,0 +1,147 @@
+import type { Permissions, Snowflake } from '../../../globals';
+import type { APIRole, LocaleString } from '../../../v9';
+import type { APIAttachment, APIChannel, APIMessage, APIPartialChannel, APIThreadMetadata } from '../channel';
+import type { APIGuildMember } from '../guild';
+import type { APIUser } from '../user';
+import type { InteractionType } from './responses';
+export type PartialAPIMessageInteractionGuildMember = Pick<APIGuildMember, 'roles' | 'premium_since' | 'pending' | 'nick' | 'mute' | 'joined_at' | 'deaf' | 'communication_disabled_until' | 'avatar'>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object
+ */
+export interface APIMessageInteraction {
+ /**
+ * ID of the interaction
+ */
+ id: Snowflake;
+ /**
+ * The type of interaction
+ */
+ type: InteractionType;
+ /**
+ * The name of the application command, including subcommands and subcommand groups
+ */
+ name: string;
+ /**
+ * The user who invoked the interaction
+ */
+ user: APIUser;
+ /**
+ * The guild member who invoked the interaction, only sent in MESSAGE_CREATE events
+ */
+ member?: PartialAPIMessageInteractionGuildMember;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+export interface APIInteractionGuildMember extends APIGuildMember {
+ permissions: Permissions;
+ user: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export interface APIBaseInteraction<Type extends InteractionType, Data> {
+ /**
+ * ID of the interaction
+ */
+ id: Snowflake;
+ /**
+ * ID of the application this interaction is for
+ */
+ application_id: Snowflake;
+ /**
+ * The type of interaction
+ */
+ type: Type;
+ /**
+ * The command data payload
+ */
+ data?: Data;
+ /**
+ * The guild it was sent from
+ */
+ guild_id?: Snowflake;
+ /**
+ * The channel it was sent from
+ */
+ channel?: Partial<APIChannel> & Pick<APIChannel, 'id' | 'type'>;
+ /**
+ * The id of the channel it was sent from
+ *
+ * @deprecated Use {@apilink APIBaseInteraction#channel} instead
+ */
+ channel_id?: Snowflake;
+ /**
+ * Guild member data for the invoking user, including permissions
+ *
+ * **This is only sent when an interaction is invoked in a guild**
+ */
+ member?: APIInteractionGuildMember;
+ /**
+ * User object for the invoking user, if invoked in a DM
+ */
+ user?: APIUser;
+ /**
+ * A continuation token for responding to the interaction
+ */
+ token: string;
+ /**
+ * Read-only property, always `1`
+ */
+ version: 1;
+ /**
+ * For components, the message they were attached to
+ */
+ message?: APIMessage;
+ /**
+ * Bitwise set of permissions the app or bot has within the channel the interaction was sent from
+ */
+ app_permissions?: Permissions;
+ /**
+ * The selected language of the invoking user
+ */
+ locale: LocaleString;
+ /**
+ * The guild's preferred locale, if invoked in a guild
+ */
+ guild_locale?: LocaleString;
+}
+export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<Original, 'member' | 'guild_id'> & Required<Pick<Original, 'user'>>;
+export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<Original, 'user'> & Required<Pick<Original, 'member' | 'guild_id'>>;
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object
+ */
+export interface APIInteractionDataResolvedChannel extends Required<APIPartialChannel> {
+ thread_metadata?: APIThreadMetadata | null;
+ permissions: Permissions;
+ parent_id?: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'user' | 'deaf' | 'mute'> {
+ permissions: Permissions;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
+ */
+export interface APIInteractionDataResolved {
+ users?: Record<Snowflake, APIUser>;
+ roles?: Record<Snowflake, APIRole>;
+ members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
+ channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
+ attachments?: Record<Snowflake, APIAttachment>;
+}
+/**
+ * @deprecated Renamed to `APIInteractionDataResolved`
+ */
+export type APIChatInputApplicationCommandInteractionDataResolved = APIInteractionDataResolved;
+/**
+ * `users` and optional `members` from APIInteractionDataResolved, for user commands and user selects
+ */
+export type APIUserInteractionDataResolved = Required<Pick<APIInteractionDataResolved, 'users'>> & Pick<APIInteractionDataResolved, 'members'>;
+/**
+ * @deprecated Renamed to `APIUserInteractionDataResolved`
+ */
+export type APIUserApplicationCommandInteractionDataResolved = APIUserInteractionDataResolved;
+//# sourceMappingURL=base.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/base.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/base.d.ts.map
new file mode 100644
index 0000000..7056bb6
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/base.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["base.ts"],"names":[],"mapp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,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAC5G,WAAW,EAAE,WAAW,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,qCAAqC,CAAC,CAAC;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,iCAAiC,CAAC,CAAC;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,MAAM,qDAAqD,GAAG,0BAA0B,CAAC;AAE/F;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,QAAQ,CAAC,IAAI,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC,GAC/F,IAAI,CAAC,0BAA0B,EAAE,SAAS,CAAC,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,gDAAgD,GAAG,8BAA8B,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/base.js b/node_modules/discord-api-types/payloads/v9/_interactions/base.js
new file mode 100644
index 0000000..1e393c0
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/base.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=base.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/base.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/base.js.map
new file mode 100644
index 0000000..755d82e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/base.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"base.js","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.d.ts
new file mode 100644
index 0000000..42a7947
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.d.ts
@@ -0,0 +1,42 @@
+import type { Snowflake } from '../../../globals';
+import type { ComponentType } from '../channel';
+import type { APIBaseInteraction, InteractionType } from '../interactions';
+import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIInteractionDataResolved, APIUserInteractionDataResolved } from './base';
+export type APIMessageComponentInteraction = APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData>, 'channel' | 'channel_id' | 'data' | 'app_permissions' | 'message'>>;
+export type APIMessageComponentButtonInteraction = APIBaseInteraction<InteractionType.MessageComponent, APIMessageButtonInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.MessageComponent, APIMessageButtonInteractionData>, 'channel' | 'channel_id' | 'data' | 'app_permissions' | 'message'>>;
+export type APIMessageComponentSelectMenuInteraction = APIBaseInteraction<InteractionType.MessageComponent, APIMessageSelectMenuInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.MessageComponent, APIMessageSelectMenuInteractionData>, 'channel' | 'channel_id' | 'data' | 'app_permissions' | 'message'>>;
+export type APIMessageComponentInteractionData = APIMessageButtonInteractionData | APIMessageSelectMenuInteractionData;
+export interface APIMessageComponentBaseInteractionData<CType extends ComponentType> {
+ /**
+ * The `custom_id` of the component
+ */
+ custom_id: string;
+ /**
+ * The type of the component
+ */
+ component_type: CType;
+}
+export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>;
+export interface APIMessageStringSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.StringSelect> {
+ values: string[];
+}
+export interface APIMessageUserSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.UserSelect> {
+ values: Snowflake[];
+ resolved: APIUserInteractionDataResolved;
+}
+export interface APIMessageRoleSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.RoleSelect> {
+ values: Snowflake[];
+ resolved: Required<Pick<APIInteractionDataResolved, 'roles'>>;
+}
+export interface APIMessageMentionableSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.MentionableSelect> {
+ values: Snowflake[];
+ resolved: Pick<APIInteractionDataResolved, 'users' | 'members' | 'roles'>;
+}
+export interface APIMessageChannelSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.ChannelSelect> {
+ values: Snowflake[];
+ resolved: Required<Pick<APIInteractionDataResolved, 'channels'>>;
+}
+export type APIMessageSelectMenuInteractionData = APIMessageStringSelectInteractionData | APIMessageUserSelectInteractionData | APIMessageRoleSelectInteractionData | APIMessageMentionableSelectInteractionData | APIMessageChannelSelectInteractionData;
+export type APIMessageComponentDMInteraction = APIDMInteractionWrapper<APIMessageComponentInteraction>;
+export type APIMessageComponentGuildInteraction = APIGuildInteractionWrapper<APIMessageComponentInteraction>;
+//# sourceMappingURL=messageComponents.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.d.ts.map
new file mode 100644
index 0000000..9a5ecd6
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"messageComponents.d.ts","sourceRoot":"","sources":["messageComponents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,KAAK,EACX,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,8BAA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AAC,UAAU,CAAC;IACxE,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,QAAQ,EAAE,8BAA8B,CAAC;CACzC;AAED,MAAM,WAAW,mCAChB,SAAQ,sCAAsC,CAAC,aAAa,CAAC,UAAU,CAAC;IACxE,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC,CAAC;CAC9D;AAED,MAAM,WAAW,0CAChB,SAAQ,sCAAsC,CAAC,aAAa,CAAC,iBAAiB,CAAC;IAC/E,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,QAAQ,EAAE,IAAI,CAAC,0BAA0B,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC;CAC1E;AAED,MAAM,WAAW,sCAChB,SAAQ,sCAAsC,CAAC,aAAa,CAAC,aAAa,CAAC;IAC3E,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,0BAA0B,EAAE,UAAU,CAAC,CAAC,CAAC;CACjE;AAED,MAAM,MAAM,mCAAmC,GAC5C,qCAAqC,GACrC,mCAAmC,GACnC,mCAAmC,GACnC,0CAA0C,GAC1C,sCAAsC,CAAC;AAE1C,MAAM,MAAM,gCAAgC,GAAG,uBAAuB,CAAC,8BAA8B,CAAC,CAAC;AAEvG,MAAM,MAAM,mCAAmC,GAAG,0BAA0B,CAAC,8BAA8B,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.js b/node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.js
new file mode 100644
index 0000000..3f086c7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=messageComponents.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.js.map
new file mode 100644
index 0000000..571b70d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"messageComponents.js","sourceRoot":"","sources":["messageComponents.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.d.ts
new file mode 100644
index 0000000..bd4a6c5
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.d.ts
@@ -0,0 +1,36 @@
+import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel';
+import type { APIBaseInteraction, APIDMInteractionWrapper, APIGuildInteractionWrapper, ComponentType, InteractionType } from '../index';
+export interface ModalSubmitComponent {
+ type: ComponentType;
+ custom_id: string;
+ value: string;
+}
+export interface ModalSubmitActionRowComponent extends Omit<APIActionRowComponent<APIModalActionRowComponent>, 'components'> {
+ components: ModalSubmitComponent[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure
+ */
+export interface APIModalSubmission {
+ /**
+ * A developer-defined identifier for the component, max 100 characters
+ */
+ custom_id: string;
+ /**
+ * A list of child components
+ */
+ components: ModalSubmitActionRowComponent[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIModalSubmitInteraction = APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission> & Required<Pick<APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission>, 'data'>>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIModalSubmitDMInteraction = APIDMInteractionWrapper<APIModalSubmitInteraction>;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIModalSubmitGuildInteraction = APIGuildInteractionWrapper<APIModalSubmitInteraction>;
+//# sourceMappingURL=modalSubmit.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.d.ts.map
new file mode 100644
index 0000000..55d63ef
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"modalSubmit.d.ts","sourceRoot":"","sources":["modalSubmit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,KAAK,EACX,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,aAAa,EACb,eAAe,EACf,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,oBAAoB;IACpC,IAAI,EAAE,aAAa,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,6BAChB,SAAQ,IAAI,CAAC,qBAAqB,CAAC,0BAA0B,CAAC,EAAE,YAAY,CAAC;IAC7E,UAAU,EAAE,oBAAoB,EAAE,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,6BAA6B,EAAE,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,kBAAkB,CAAC,eAAe,CAAC,WAAW,EAAE,kBAAkB,CAAC,GAC1G,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,WAAW,EAAE,kBAAkB,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAE7F;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,uBAAuB,CAAC,yBAAyB,CAAC,CAAC;AAE7F;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,0BAA0B,CAAC,yBAAyB,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.js b/node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.js
new file mode 100644
index 0000000..59c83cb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=modalSubmit.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.js.map
new file mode 100644
index 0000000..ad871d9
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"modalSubmit.js","sourceRoot":"","sources":["modalSubmit.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/ping.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/ping.d.ts
new file mode 100644
index 0000000..f684653
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/ping.d.ts
@@ -0,0 +1,4 @@
+import type { APIBaseInteraction } from './base';
+import type { InteractionType } from './responses';
+export type APIPingInteraction = Omit<APIBaseInteraction<InteractionType.Ping, never>, 'locale'>;
+//# sourceMappingURL=ping.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/ping.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/ping.d.ts.map
new file mode 100644
index 0000000..6ffd8aa
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/ping.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ping.d.ts","sourceRoot":"","sources":["ping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/ping.js b/node_modules/discord-api-types/payloads/v9/_interactions/ping.js
new file mode 100644
index 0000000..c8b17d7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/ping.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=ping.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/ping.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/ping.js.map
new file mode 100644
index 0000000..9246c5a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/ping.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ping.js","sourceRoot":"","sources":["ping.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/responses.d.ts b/node_modules/discord-api-types/payloads/v9/_interactions/responses.d.ts
new file mode 100644
index 0000000..ccd10c2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/responses.d.ts
@@ -0,0 +1,104 @@
+import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v9';
+import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel';
+import type { MessageFlags } from '../index';
+import type { APIApplicationCommandOptionChoice } from './applicationCommands';
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
+ */
+export declare enum InteractionType {
+ Ping = 1,
+ ApplicationCommand = 2,
+ MessageComponent = 3,
+ ApplicationCommandAutocomplete = 4,
+ ModalSubmit = 5
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object
+ */
+export type APIInteractionResponse = APIInteractionResponsePong | APIInteractionResponseChannelMessageWithSource | APIInteractionResponseDeferredChannelMessageWithSource | APIInteractionResponseDeferredMessageUpdate | APIInteractionResponseUpdateMessage | APIApplicationCommandAutocompleteResponse | APIModalInteractionResponse;
+export interface APIInteractionResponsePong {
+ type: InteractionResponseType.Pong;
+}
+export interface APIApplicationCommandAutocompleteResponse {
+ type: InteractionResponseType.ApplicationCommandAutocompleteResult;
+ data: APICommandAutocompleteInteractionResponseCallbackData;
+}
+export interface APIModalInteractionResponse {
+ type: InteractionResponseType.Modal;
+ data: APIModalInteractionResponseCallbackData;
+}
+export interface APIInteractionResponseChannelMessageWithSource {
+ type: InteractionResponseType.ChannelMessageWithSource;
+ data: APIInteractionResponseCallbackData;
+}
+export interface APIInteractionResponseDeferredChannelMessageWithSource {
+ type: InteractionResponseType.DeferredChannelMessageWithSource;
+ data?: Pick<APIInteractionResponseCallbackData, 'flags'>;
+}
+export interface APIInteractionResponseDeferredMessageUpdate {
+ type: InteractionResponseType.DeferredMessageUpdate;
+}
+export interface APIInteractionResponseUpdateMessage {
+ type: InteractionResponseType.UpdateMessage;
+ data?: APIInteractionResponseCallbackData;
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
+ */
+export declare enum InteractionResponseType {
+ /**
+ * ACK a `Ping`
+ */
+ Pong = 1,
+ /**
+ * Respond to an interaction with a message
+ */
+ ChannelMessageWithSource = 4,
+ /**
+ * ACK an interaction and edit to a response later, the user sees a loading state
+ */
+ DeferredChannelMessageWithSource = 5,
+ /**
+ * ACK a button interaction and update it to a loading state
+ */
+ DeferredMessageUpdate = 6,
+ /**
+ * ACK a button interaction and edit the message to which the button was attached
+ */
+ UpdateMessage = 7,
+ /**
+ * For autocomplete interactions
+ */
+ ApplicationCommandAutocompleteResult = 8,
+ /**
+ * Respond to an interaction with an modal for a user to fill-out
+ */
+ Modal = 9
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure
+ */
+export type APIInteractionResponseCallbackData = Omit<RESTPostAPIWebhookWithTokenJSONBody, 'username' | 'avatar_url'> & {
+ flags?: MessageFlags;
+};
+export interface APICommandAutocompleteInteractionResponseCallbackData {
+ choices?: APIApplicationCommandOptionChoice[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal
+ */
+export interface APIModalInteractionResponseCallbackData {
+ /**
+ * A developer-defined identifier for the component, max 100 characters
+ */
+ custom_id: string;
+ /**
+ * The title of the popup modal
+ */
+ title: string;
+ /**
+ * Between 1 and 5 (inclusive) components that make up the modal
+ */
+ components: APIActionRowComponent<APIModalActionRowComponent>[];
+}
+//# sourceMappingURL=responses.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/responses.d.ts.map b/node_modules/discord-api-types/payloads/v9/_interactions/responses.d.ts.map
new file mode 100644
index 0000000..17b719d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/responses.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["responses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AAE/E;;GAEG;AACH,oBAAY,eAAe;IAC1B,IAAI,IAAI;IACR,kBAAkB,IAAA;IAClB,gBAAgB,IAAA;IAChB,8BAA8B,IAAA;IAC9B,WAAW,IAAA;CACX;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAC/B,0BAA0B,GAC1B,8CAA8C,GAC9C,sDAAsD,GACtD,2CAA2C,GAC3C,mCAAmC,GACnC,yCAAyC,GACzC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AAiC,EAAE,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACvD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,UAAU,EAAE,qBAAqB,CAAC,0BAA0B,CAAC,EAAE,CAAC;CAChE"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/responses.js b/node_modules/discord-api-types/payloads/v9/_interactions/responses.js
new file mode 100644
index 0000000..f9c848a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/responses.js
@@ -0,0 +1,49 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.InteractionResponseType = exports.InteractionType = void 0;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
+ */
+var InteractionType;
+(function (InteractionType) {
+ InteractionType[InteractionType["Ping"] = 1] = "Ping";
+ InteractionType[InteractionType["ApplicationCommand"] = 2] = "ApplicationCommand";
+ InteractionType[InteractionType["MessageComponent"] = 3] = "MessageComponent";
+ InteractionType[InteractionType["ApplicationCommandAutocomplete"] = 4] = "ApplicationCommandAutocomplete";
+ InteractionType[InteractionType["ModalSubmit"] = 5] = "ModalSubmit";
+})(InteractionType = exports.InteractionType || (exports.InteractionType = {}));
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
+ */
+var InteractionResponseType;
+(function (InteractionResponseType) {
+ /**
+ * ACK a `Ping`
+ */
+ InteractionResponseType[InteractionResponseType["Pong"] = 1] = "Pong";
+ /**
+ * Respond to an interaction with a message
+ */
+ InteractionResponseType[InteractionResponseType["ChannelMessageWithSource"] = 4] = "ChannelMessageWithSource";
+ /**
+ * ACK an interaction and edit to a response later, the user sees a loading state
+ */
+ InteractionResponseType[InteractionResponseType["DeferredChannelMessageWithSource"] = 5] = "DeferredChannelMessageWithSource";
+ /**
+ * ACK a button interaction and update it to a loading state
+ */
+ InteractionResponseType[InteractionResponseType["DeferredMessageUpdate"] = 6] = "DeferredMessageUpdate";
+ /**
+ * ACK a button interaction and edit the message to which the button was attached
+ */
+ InteractionResponseType[InteractionResponseType["UpdateMessage"] = 7] = "UpdateMessage";
+ /**
+ * For autocomplete interactions
+ */
+ InteractionResponseType[InteractionResponseType["ApplicationCommandAutocompleteResult"] = 8] = "ApplicationCommandAutocompleteResult";
+ /**
+ * Respond to an interaction with an modal for a user to fill-out
+ */
+ InteractionResponseType[InteractionResponseType["Modal"] = 9] = "Modal";
+})(InteractionResponseType = exports.InteractionResponseType || (exports.InteractionResponseType = {}));
+//# sourceMappingURL=responses.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/_interactions/responses.js.map b/node_modules/discord-api-types/payloads/v9/_interactions/responses.js.map
new file mode 100644
index 0000000..d76a355
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/_interactions/responses.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"responses.js","sourceRoot":"","sources":["responses.ts"],"names":[],"mappings":";;;AAKA;;GAEG;AACH,IAAY,eAMX;AAND,WAAY,eAAe;IAC1B,qDAAQ,CAAA;IACR,iFAAkB,CAAA;IAClB,6EAAgB,CAAA;IAChB,yGAA8B,CAAA;IAC9B,mEAAW,CAAA;AACZ,CAAC,EANW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAM1B;AA+CD;;GAEG;AACH,IAAY,uBA6BX;AA7BD,WAAY,uBAAuB;IAClC;;OAEG;IACH,qEAAQ,CAAA;IACR;;OAEG;IACH,6GAA4B,CAAA;IAC5B;;OAEG;IACH,6HAAgC,CAAA;IAChC;;OAEG;IACH,uGAAqB,CAAA;IACrB;;OAEG;IACH,uFAAa,CAAA;IACb;;OAEG;IACH,qIAAoC,CAAA;IACpC;;OAEG;IACH,uEAAK,CAAA;AACN,CAAC,EA7BW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QA6BlC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/application.d.ts b/node_modules/discord-api-types/payloads/v9/application.d.ts
new file mode 100644
index 0000000..d9c2bbd
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/application.d.ts
@@ -0,0 +1,265 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/application
+ */
+import type { Permissions, Snowflake } from '../../globals';
+import type { LocalizationMap } from '../common';
+import type { APIPartialGuild } from './guild';
+import type { OAuth2Scopes } from './oauth2';
+import type { APITeam } from './teams';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/resources/application#application-object
+ */
+export interface APIApplication {
+ /**
+ * The id of the app
+ */
+ id: Snowflake;
+ /**
+ * The name of the app
+ */
+ name: string;
+ /**
+ * The icon hash of the app
+ */
+ icon: string | null;
+ /**
+ * The description of the app
+ */
+ description: string;
+ /**
+ * An array of rpc origin urls, if rpc is enabled
+ */
+ rpc_origins?: string[];
+ /**
+ * When `false` only app owner can join the app's bot to guilds
+ */
+ bot_public: boolean;
+ /**
+ * When `true` the app's bot will only join upon completion of the full oauth2 code grant flow
+ */
+ bot_require_code_grant: boolean;
+ /**
+ * The url of the application's terms of service
+ */
+ terms_of_service_url?: string;
+ /**
+ * The url of the application's privacy policy
+ */
+ privacy_policy_url?: string;
+ /**
+ * Partial user object containing info on the owner of the application
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ owner?: APIUser;
+ /**
+ * An empty string
+ *
+ * @deprecated This field will be removed in v11
+ */
+ summary: string;
+ /**
+ * The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
+ *
+ * See https://discord.com/developers/docs/game-sdk/applications#getticket
+ */
+ verify_key: string;
+ /**
+ * The team this application belongs to
+ *
+ * See https://discord.com/developers/docs/topics/teams#data-models-team-object
+ */
+ team: APITeam | null;
+ /**
+ * If this application is a game sold on Discord, this field will be the guild to which it has been linked
+ */
+ guild_id?: Snowflake;
+ /**
+ * If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists
+ */
+ primary_sku_id?: Snowflake;
+ /**
+ * If this application is a game sold on Discord, this field will be the URL slug that links to the store page
+ */
+ slug?: string;
+ /**
+ * If this application is a game sold on Discord, this field will be the hash of the image on store embeds
+ */
+ cover_image?: string;
+ /**
+ * The application's public flags
+ *
+ * See https://discord.com/developers/docs/resources/application#application-object-application-flags
+ */
+ flags: ApplicationFlags;
+ /**
+ * Up to 5 tags describing the content and functionality of the application
+ */
+ tags?: [string, string?, string?, string?, string?];
+ /**
+ * Settings for the application's default in-app authorization link, if enabled
+ */
+ install_params?: APIApplicationInstallParams;
+ /**
+ * The application's default custom authorization link, if enabled
+ */
+ custom_install_url?: string;
+ /**
+ * The application's role connection verification entry point,
+ * which when configured will render the app as a verification method in the guild role verification configuration
+ */
+ role_connections_verification_url?: string;
+ /**
+ * An approximate count of the app's guild membership
+ * s
+ */
+ approximate_guild_count?: number;
+ /**
+ * A partial object of the associated guild
+ */
+ guild?: APIPartialGuild;
+}
+export interface APIApplicationInstallParams {
+ scopes: OAuth2Scopes[];
+ permissions: Permissions;
+}
+/**
+ * https://discord.com/developers/docs/resources/application#application-object-application-flags
+ */
+export declare enum ApplicationFlags {
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ EmbeddedReleased = 2,
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ManagedEmoji = 4,
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ EmbeddedIAP = 8,
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ GroupDMCreate = 16,
+ /**
+ * Indicates if an app uses the Auto Moderation API
+ */
+ ApplicationAutoModerationRuleCreateBadge = 64,
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ RPCHasConnected = 2048,
+ /**
+ * Intent required for bots in 100 or more servers to receive `presence_update` events
+ */
+ GatewayPresence = 4096,
+ /**
+ * Intent required for bots in under 100 servers to receive `presence_update` events, found in Bot Settings
+ */
+ GatewayPresenceLimited = 8192,
+ /**
+ * Intent required for bots in 100 or more servers to receive member-related events like `guild_member_add`.
+ * See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
+ */
+ GatewayGuildMembers = 16384,
+ /**
+ * Intent required for bots in under 100 servers to receive member-related events like `guild_member_add`, found in Bot Settings.
+ * See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
+ */
+ GatewayGuildMembersLimited = 32768,
+ /**
+ * Indicates unusual growth of an app that prevents verification
+ */
+ VerificationPendingGuildLimit = 65536,
+ /**
+ * Indicates if an app is embedded within the Discord client (currently unavailable publicly)
+ */
+ Embedded = 131072,
+ /**
+ * Intent required for bots in 100 or more servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055)
+ */
+ GatewayMessageContent = 262144,
+ /**
+ * Intent required for bots in under 100 servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055),
+ * found in Bot Settings
+ */
+ GatewayMessageContentLimited = 524288,
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ EmbeddedFirstParty = 1048576,
+ /**
+ * Indicates if an app has registered global [application commands](https://discord.com/developers/docs/interactions/application-commands)
+ */
+ ApplicationCommandBadge = 8388608
+}
+/**
+ * https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-structure
+ */
+export interface APIApplicationRoleConnectionMetadata {
+ /**
+ * Type of metadata value
+ */
+ type: ApplicationRoleConnectionMetadataType;
+ /**
+ * Dictionary key for the metadata field (must be `a-z`, `0-9`, or `_` characters; 1-50 characters)
+ */
+ key: string;
+ /**
+ * Name of the metadata field (1-100 characters)
+ */
+ name: string;
+ /**
+ * Translations of the name
+ */
+ name_localizations?: LocalizationMap;
+ /**
+ * Description of the metadata field (1-200 characters)
+ */
+ description: string;
+ /**
+ * Translations of the description
+ */
+ description_localizations?: LocalizationMap;
+}
+/**
+ * https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type
+ */
+export declare enum ApplicationRoleConnectionMetadataType {
+ /**
+ * The metadata value (`integer`) is less than or equal to the guild's configured value (`integer`)
+ */
+ IntegerLessThanOrEqual = 1,
+ /**
+ * The metadata value (`integer`) is greater than or equal to the guild's configured value (`integer`)
+ */
+ IntegerGreaterThanOrEqual = 2,
+ /**
+ * The metadata value (`integer`) is equal to the guild's configured value (`integer`)
+ */
+ IntegerEqual = 3,
+ /**
+ * The metadata value (`integer`) is not equal to the guild's configured value (`integer`)
+ */
+ IntegerNotEqual = 4,
+ /**
+ * The metadata value (`ISO8601 string`) is less than or equal to the guild's configured value (`integer`; days before current date)
+ */
+ DatetimeLessThanOrEqual = 5,
+ /**
+ * The metadata value (`ISO8601 string`) is greater than or equal to the guild's configured value (`integer`; days before current date)
+ */
+ DatetimeGreaterThanOrEqual = 6,
+ /**
+ * The metadata value (`integer`) is equal to the guild's configured value (`integer`; `1`)
+ */
+ BooleanEqual = 7,
+ /**
+ * The metadata value (`integer`) is not equal to the guild's configured value (`integer`; `1`)
+ */
+ BooleanNotEqual = 8
+}
+//# sourceMappingURL=application.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/application.d.ts.map b/node_modules/discord-api-types/payloads/v9/application.d.ts.map
new file mode 100644
index 0000000..6464f7e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/application.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EA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,oBAAY,qCAAqC;IAChD;;OAEG;IACH,sBAAsB,IAAI;IAC1B;;OAEG;IACH,yBAAyB,IAAA;IACzB;;OAEG;IACH,YAAY,IAAA;IACZ;;OAEG;IACH,eAAe,IAAA;IACf;;OAEG;IACH,uBAAuB,IAAA;IACvB;;OAEG;IACH,0BAA0B,IAAA;IAC1B;;OAEG;IACH,YAAY,IAAA;IACZ;;OAEG;IACH,eAAe,IAAA;CACf"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/application.js b/node_modules/discord-api-types/payloads/v9/application.js
new file mode 100644
index 0000000..d37666b
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/application.js
@@ -0,0 +1,118 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/application
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ApplicationRoleConnectionMetadataType = exports.ApplicationFlags = void 0;
+/**
+ * https://discord.com/developers/docs/resources/application#application-object-application-flags
+ */
+var ApplicationFlags;
+(function (ApplicationFlags) {
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ApplicationFlags[ApplicationFlags["EmbeddedReleased"] = 2] = "EmbeddedReleased";
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ApplicationFlags[ApplicationFlags["ManagedEmoji"] = 4] = "ManagedEmoji";
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ApplicationFlags[ApplicationFlags["EmbeddedIAP"] = 8] = "EmbeddedIAP";
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ApplicationFlags[ApplicationFlags["GroupDMCreate"] = 16] = "GroupDMCreate";
+ /**
+ * Indicates if an app uses the Auto Moderation API
+ */
+ ApplicationFlags[ApplicationFlags["ApplicationAutoModerationRuleCreateBadge"] = 64] = "ApplicationAutoModerationRuleCreateBadge";
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ApplicationFlags[ApplicationFlags["RPCHasConnected"] = 2048] = "RPCHasConnected";
+ /**
+ * Intent required for bots in 100 or more servers to receive `presence_update` events
+ */
+ ApplicationFlags[ApplicationFlags["GatewayPresence"] = 4096] = "GatewayPresence";
+ /**
+ * Intent required for bots in under 100 servers to receive `presence_update` events, found in Bot Settings
+ */
+ ApplicationFlags[ApplicationFlags["GatewayPresenceLimited"] = 8192] = "GatewayPresenceLimited";
+ /**
+ * Intent required for bots in 100 or more servers to receive member-related events like `guild_member_add`.
+ * See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
+ */
+ ApplicationFlags[ApplicationFlags["GatewayGuildMembers"] = 16384] = "GatewayGuildMembers";
+ /**
+ * Intent required for bots in under 100 servers to receive member-related events like `guild_member_add`, found in Bot Settings.
+ * See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
+ */
+ ApplicationFlags[ApplicationFlags["GatewayGuildMembersLimited"] = 32768] = "GatewayGuildMembersLimited";
+ /**
+ * Indicates unusual growth of an app that prevents verification
+ */
+ ApplicationFlags[ApplicationFlags["VerificationPendingGuildLimit"] = 65536] = "VerificationPendingGuildLimit";
+ /**
+ * Indicates if an app is embedded within the Discord client (currently unavailable publicly)
+ */
+ ApplicationFlags[ApplicationFlags["Embedded"] = 131072] = "Embedded";
+ /**
+ * Intent required for bots in 100 or more servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055)
+ */
+ ApplicationFlags[ApplicationFlags["GatewayMessageContent"] = 262144] = "GatewayMessageContent";
+ /**
+ * Intent required for bots in under 100 servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055),
+ * found in Bot Settings
+ */
+ ApplicationFlags[ApplicationFlags["GatewayMessageContentLimited"] = 524288] = "GatewayMessageContentLimited";
+ /**
+ * @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ApplicationFlags[ApplicationFlags["EmbeddedFirstParty"] = 1048576] = "EmbeddedFirstParty";
+ /**
+ * Indicates if an app has registered global [application commands](https://discord.com/developers/docs/interactions/application-commands)
+ */
+ ApplicationFlags[ApplicationFlags["ApplicationCommandBadge"] = 8388608] = "ApplicationCommandBadge";
+})(ApplicationFlags = exports.ApplicationFlags || (exports.ApplicationFlags = {}));
+/**
+ * https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type
+ */
+var ApplicationRoleConnectionMetadataType;
+(function (ApplicationRoleConnectionMetadataType) {
+ /**
+ * The metadata value (`integer`) is less than or equal to the guild's configured value (`integer`)
+ */
+ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["IntegerLessThanOrEqual"] = 1] = "IntegerLessThanOrEqual";
+ /**
+ * The metadata value (`integer`) is greater than or equal to the guild's configured value (`integer`)
+ */
+ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["IntegerGreaterThanOrEqual"] = 2] = "IntegerGreaterThanOrEqual";
+ /**
+ * The metadata value (`integer`) is equal to the guild's configured value (`integer`)
+ */
+ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["IntegerEqual"] = 3] = "IntegerEqual";
+ /**
+ * The metadata value (`integer`) is not equal to the guild's configured value (`integer`)
+ */
+ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["IntegerNotEqual"] = 4] = "IntegerNotEqual";
+ /**
+ * The metadata value (`ISO8601 string`) is less than or equal to the guild's configured value (`integer`; days before current date)
+ */
+ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["DatetimeLessThanOrEqual"] = 5] = "DatetimeLessThanOrEqual";
+ /**
+ * The metadata value (`ISO8601 string`) is greater than or equal to the guild's configured value (`integer`; days before current date)
+ */
+ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["DatetimeGreaterThanOrEqual"] = 6] = "DatetimeGreaterThanOrEqual";
+ /**
+ * The metadata value (`integer`) is equal to the guild's configured value (`integer`; `1`)
+ */
+ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["BooleanEqual"] = 7] = "BooleanEqual";
+ /**
+ * The metadata value (`integer`) is not equal to the guild's configured value (`integer`; `1`)
+ */
+ ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["BooleanNotEqual"] = 8] = "BooleanNotEqual";
+})(ApplicationRoleConnectionMetadataType = exports.ApplicationRoleConnectionMetadataType || (exports.ApplicationRoleConnectionMetadataType = {}));
+//# sourceMappingURL=application.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/application.js.map b/node_modules/discord-api-types/payloads/v9/application.js.map
new file mode 100644
index 0000000..01d0793
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/application.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"application.js","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAgIH;;GAEG;AACH,IAAY,gBAoEX;AApED,WAAY,gBAAgB;IAC3B;;OAEG;IACH,+EAAyB,CAAA;IACzB;;OAEG;IACH,uEAAqB,CAAA;IACrB;;OAEG;IACH,qEAAoB,CAAA;IACpB;;OAEG;IACH,0EAAsB,CAAA;IACtB;;OAEG;IACH,gIAAiD,CAAA;IACjD;;OAEG;IACH,gFAAyB,CAAA;IACzB;;OAEG;IACH,gFAAyB,CAAA;IACzB;;OAEG;IACH,8FAAgC,CAAA;IAChC;;;OAGG;IACH,yFAA6B,CAAA;IAC7B;;;OAGG;IACH,uGAAoC,CAAA;IACpC;;OAEG;IACH,6GAAuC,CAAA;IACvC;;OAEG;IACH,oEAAkB,CAAA;IAClB;;OAEG;IACH,8FAA+B,CAAA;IAC/B;;;OAGG;IACH,4GAAsC,CAAA;IACtC;;OAEG;IACH,yFAA4B,CAAA;IAC5B;;OAEG;IACH,mGAAiC,CAAA;AAClC,CAAC,EApEW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAoE3B;AAgCD;;GAEG;AACH,IAAY,qCAiCX;AAjCD,WAAY,qCAAqC;IAChD;;OAEG;IACH,qIAA0B,CAAA;IAC1B;;OAEG;IACH,2IAAyB,CAAA;IACzB;;OAEG;IACH,iHAAY,CAAA;IACZ;;OAEG;IACH,uHAAe,CAAA;IACf;;OAEG;IACH,uIAAuB,CAAA;IACvB;;OAEG;IACH,6IAA0B,CAAA;IAC1B;;OAEG;IACH,iHAAY,CAAA;IACZ;;OAEG;IACH,uHAAe,CAAA;AAChB,CAAC,EAjCW,qCAAqC,GAArC,6CAAqC,KAArC,6CAAqC,QAiChD"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/auditLog.d.ts b/node_modules/discord-api-types/payloads/v9/auditLog.d.ts
new file mode 100644
index 0000000..8a6c32f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/auditLog.d.ts
@@ -0,0 +1,597 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/audit-log
+ */
+import type { Snowflake } from '../../globals';
+import type { APIAutoModerationAction, APIAutoModerationRule, APIAutoModerationRuleTriggerMetadata, AutoModerationRuleEventType, AutoModerationRuleTriggerType } from './autoModeration';
+import type { APIChannel, APIOverwrite } from './channel';
+import type { APIGuildIntegration, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildMFALevel, GuildVerificationLevel, IntegrationExpireBehavior } from './guild';
+import type { APIGuildScheduledEvent, GuildScheduledEventEntityType, GuildScheduledEventStatus } from './guildScheduledEvent';
+import type { APIApplicationCommand } from './interactions';
+import type { APIRole } from './permissions';
+import type { StageInstancePrivacyLevel } from './stageInstance';
+import type { StickerFormatType } from './sticker';
+import type { APIUser } from './user';
+import type { APIWebhook } from './webhook';
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
+ */
+export interface APIAuditLog {
+ /**
+ * List of application commands found in the audit log
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands#application-command-object
+ */
+ application_commands: APIApplicationCommand[];
+ /**
+ * Webhooks found in the audit log
+ *
+ * See https://discord.com/developers/docs/resources/webhook#webhook-object
+ */
+ webhooks: APIWebhook[];
+ /**
+ * Users found in the audit log
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ users: APIUser[];
+ /**
+ * Audit log entries
+ *
+ * See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object
+ */
+ audit_log_entries: APIAuditLogEntry[];
+ /**
+ * List of auto moderation rules referenced in the audit log
+ *
+ * See https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object
+ */
+ auto_moderation_rules: APIAutoModerationRule[];
+ /**
+ * Partial integration objects
+ *
+ * See https://discord.com/developers/docs/resources/guild#integration-object
+ */
+ integrations: APIGuildIntegration[];
+ /**
+ * Threads found in the audit log
+ *
+ * Threads referenced in THREAD_CREATE and THREAD_UPDATE events are included in the threads map, since archived threads might not be kept in memory by clients.
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object
+ */
+ threads: APIChannel[];
+ /**
+ * The guild scheduled events in the audit log
+ *
+ * See https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object
+ */
+ guild_scheduled_events: APIGuildScheduledEvent[];
+}
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure
+ */
+export interface APIAuditLogEntry {
+ /**
+ * ID of the affected entity (webhook, user, role, etc.)
+ */
+ target_id: string | null;
+ /**
+ * Changes made to the `target_id`
+ *
+ * See https://discord.com/developers/docs/resources/audit-log#audit-log-change-object
+ */
+ changes?: APIAuditLogChange[];
+ /**
+ * The user who made the changes
+ *
+ * This can be `null` in some cases (webhooks deleting themselves by using their own token, for example)
+ */
+ user_id: Snowflake | null;
+ /**
+ * ID of the entry
+ */
+ id: Snowflake;
+ /**
+ * Type of action that occurred
+ *
+ * See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
+ */
+ action_type: AuditLogEvent;
+ /**
+ * Additional info for certain action types
+ *
+ * See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
+ */
+ options?: APIAuditLogOptions;
+ /**
+ * The reason for the change (0-512 characters)
+ */
+ reason?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
+ */
+export declare enum AuditLogEvent {
+ GuildUpdate = 1,
+ ChannelCreate = 10,
+ ChannelUpdate = 11,
+ ChannelDelete = 12,
+ ChannelOverwriteCreate = 13,
+ ChannelOverwriteUpdate = 14,
+ ChannelOverwriteDelete = 15,
+ MemberKick = 20,
+ MemberPrune = 21,
+ MemberBanAdd = 22,
+ MemberBanRemove = 23,
+ MemberUpdate = 24,
+ MemberRoleUpdate = 25,
+ MemberMove = 26,
+ MemberDisconnect = 27,
+ BotAdd = 28,
+ RoleCreate = 30,
+ RoleUpdate = 31,
+ RoleDelete = 32,
+ InviteCreate = 40,
+ InviteUpdate = 41,
+ InviteDelete = 42,
+ WebhookCreate = 50,
+ WebhookUpdate = 51,
+ WebhookDelete = 52,
+ EmojiCreate = 60,
+ EmojiUpdate = 61,
+ EmojiDelete = 62,
+ MessageDelete = 72,
+ MessageBulkDelete = 73,
+ MessagePin = 74,
+ MessageUnpin = 75,
+ IntegrationCreate = 80,
+ IntegrationUpdate = 81,
+ IntegrationDelete = 82,
+ StageInstanceCreate = 83,
+ StageInstanceUpdate = 84,
+ StageInstanceDelete = 85,
+ StickerCreate = 90,
+ StickerUpdate = 91,
+ StickerDelete = 92,
+ GuildScheduledEventCreate = 100,
+ GuildScheduledEventUpdate = 101,
+ GuildScheduledEventDelete = 102,
+ ThreadCreate = 110,
+ ThreadUpdate = 111,
+ ThreadDelete = 112,
+ ApplicationCommandPermissionUpdate = 121,
+ AutoModerationRuleCreate = 140,
+ AutoModerationRuleUpdate = 141,
+ AutoModerationRuleDelete = 142,
+ AutoModerationBlockMessage = 143,
+ AutoModerationFlagToChannel = 144,
+ AutoModerationUserCommunicationDisabled = 145,
+ CreatorMonetizationRequestCreated = 150,
+ CreatorMonetizationTermsAccepted = 151
+}
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
+ */
+export interface APIAuditLogOptions {
+ /**
+ * Name of the Auto Moderation rule that was triggered
+ *
+ * Present from:
+ * - AUTO_MODERATION_BLOCK_MESSAGE
+ * - AUTO_MODERATION_FLAG_TO_CHANNEL
+ * - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
+ */
+ auto_moderation_rule_name?: string;
+ /**
+ * Trigger type of the Auto Moderation rule that was triggered
+ *
+ * Present from:
+ * - AUTO_MODERATION_BLOCK_MESSAGE
+ * - AUTO_MODERATION_FLAG_TO_CHANNEL
+ * - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
+ */
+ auto_moderation_rule_trigger_type?: AuditLogRuleTriggerType;
+ /**
+ * Number of days after which inactive members were kicked
+ *
+ * Present from:
+ * - MEMBER_PRUNE
+ */
+ delete_member_days?: string;
+ /**
+ * Number of members removed by the prune
+ *
+ * Present from:
+ * - MEMBER_PRUNE
+ */
+ members_removed?: string;
+ /**
+ * Channel in which the entities were targeted
+ *
+ * Present from:
+ * - MEMBER_MOVE
+ * - MESSAGE_PIN
+ * - MESSAGE_UNPIN
+ * - MESSAGE_DELETE
+ * - STAGE_INSTANCE_CREATE
+ * - STAGE_INSTANCE_UPDATE
+ * - STAGE_INSTANCE_DELETE
+ * - AUTO_MODERATION_BLOCK_MESSAGE
+ * - AUTO_MODERATION_FLAG_TO_CHANNEL
+ * - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
+ */
+ channel_id?: Snowflake;
+ /**
+ * ID of the message that was targeted
+ *
+ * Present from:
+ * - MESSAGE_PIN
+ * - MESSAGE_UNPIN
+ */
+ message_id?: Snowflake;
+ /**
+ * Number of entities that were targeted
+ *
+ * Present from:
+ * - MESSAGE_DELETE
+ * - MESSAGE_BULK_DELETE
+ * - MEMBER_DISCONNECT
+ * - MEMBER_MOVE
+ */
+ count?: string;
+ /**
+ * ID of the overwritten entity
+ *
+ * Present from:
+ * - CHANNEL_OVERWRITE_CREATE
+ * - CHANNEL_OVERWRITE_UPDATE
+ * - CHANNEL_OVERWRITE_DELETE
+ */
+ id?: Snowflake;
+ /**
+ * Type of overwritten entity - "0" for "role" or "1" for "member"
+ *
+ * Present from:
+ * - CHANNEL_OVERWRITE_CREATE
+ * - CHANNEL_OVERWRITE_UPDATE
+ * - CHANNEL_OVERWRITE_DELETE
+ *
+ * {@link AuditLogOptionsType}
+ */
+ type?: AuditLogOptionsType;
+ /**
+ * Name of the role
+ *
+ * Present from:
+ * - CHANNEL_OVERWRITE_CREATE
+ * - CHANNEL_OVERWRITE_UPDATE
+ * - CHANNEL_OVERWRITE_DELETE
+ *
+ * **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
+ */
+ role_name?: string;
+}
+export declare enum AuditLogOptionsType {
+ Role = "0",
+ Member = "1"
+}
+export type AuditLogRuleTriggerType = `${AutoModerationRuleTriggerType}`;
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure
+ */
+export type APIAuditLogChange = APIAuditLogChangeKeyName | APIAuditLogChangeKeyDescription | APIAuditLogChangeKeyIconHash | APIAuditLogChangeKeyImageHash | APIAuditLogChangeKeySplashHash | APIAuditLogChangeKeyDiscoverySplashHash | APIAuditLogChangeKeyBannerHash | APIAuditLogChangeKeyOwnerId | APIAuditLogChangeKeyRegion | APIAuditLogChangeKeyPreferredLocale | APIAuditLogChangeKeyAFKChannelId | APIAuditLogChangeKeyAFKTimeout | APIAuditLogChangeKeyRulesChannelId | APIAuditLogChangeKeyPublicUpdatesChannelId | APIAuditLogChangeKeyMFALevel | APIAuditLogChangeKeyVerificationLevel | APIAuditLogChangeKeyExplicitContentFilter | APIAuditLogChangeKeyDefaultMessageNotifications | APIAuditLogChangeKeyVanityURLCode | APIAuditLogChangeKey$Add | APIAuditLogChangeKey$Remove | APIAuditLogChangeKeyPruneDeleteDays | APIAuditLogChangeKeyWidgetEnabled | APIAuditLogChangeKeyWidgetChannelId | APIAuditLogChangeKeySystemChannelId | APIAuditLogChangeKeyPosition | APIAuditLogChangeKeyTopic | APIAuditLogChangeKeyBitrate | APIAuditLogChangeKeyPermissionOverwrites | APIAuditLogChangeKeyNSFW | APIAuditLogChangeKeyApplicationId | APIAuditLogChangeKeyRateLimitPerUser | APIAuditLogChangeKeyPermissions | APIAuditLogChangeKeyColor | APIAuditLogChangeKeyHoist | APIAuditLogChangeKeyMentionable | APIAuditLogChangeKeyAllow | APIAuditLogChangeKeyDeny | APIAuditLogChangeKeyCode | APIAuditLogChangeKeyChannelId | APIAuditLogChangeKeyInviterId | APIAuditLogChangeKeyMaxUses | APIAuditLogChangeKeyUses | APIAuditLogChangeKeyMaxAge | APIAuditLogChangeKeyTemporary | APIAuditLogChangeKeyDeaf | APIAuditLogChangeKeyMute | APIAuditLogChangeKeyNick | APIAuditLogChangeKeyAvatarHash | APIAuditLogChangeKeyId | APIAuditLogChangeKeyType | APIAuditLogChangeKeyEnableEmoticons | APIAuditLogChangeKeyExpireBehavior | APIAuditLogChangeKeyExpireGracePeriod | APIAuditLogChangeKeyUserLimit | APIAuditLogChangeKeyPrivacyLevel | APIAuditLogChangeKeyTags | APIAuditLogChangeKeyFormatType | APIAuditLogChangeKeyAsset | APIAuditLogChangeKeyAvailable | APIAuditLogChangeKeyGuildId | APIAuditLogChangeKeyArchived | APIAuditLogChangeKeyLocked | APIAuditLogChangeKeyAutoArchiveDuration | APIAuditLogChangeKeyDefaultAutoArchiveDuration | APIAuditLogChangeKeyEntityType | APIAuditLogChangeKeyStatus | APIAuditLogChangeKeyLocation | APIAuditLogChangeKeyCommunicationDisabledUntil | APIAuditLogChangeKeyTriggerType | APIAuditLogChangeKeyEventType | APIAuditLogChangeKeyTriggerMetadata | APIAuditLogChangeKeyActions | APIAuditLogChangeKeyEnabled | APIAuditLogChangeKeyExemptRoles | APIAuditLogChangeKeyExemptChannels;
+/**
+ * Returned when an entity's name is changed
+ */
+export type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>;
+/**
+ * Returned when a guild's or sticker's or guild scheduled event's description is changed
+ */
+export type APIAuditLogChangeKeyDescription = AuditLogChangeData<'description', string>;
+/**
+ * Returned when a guild's icon is changed
+ */
+export type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', string>;
+/**
+ * Returned when a guild's scheduled event's cover image is changed
+ */
+export type APIAuditLogChangeKeyImageHash = AuditLogChangeData<'image_hash', string>;
+/**
+ * Returned when a guild's splash is changed
+ */
+export type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>;
+/**
+ * Returned when a guild's discovery splash is changed
+ */
+export type APIAuditLogChangeKeyDiscoverySplashHash = AuditLogChangeData<'discovery_splash_hash', string>;
+/**
+ * Returned when a guild's banner hash is changed
+ */
+export type APIAuditLogChangeKeyBannerHash = AuditLogChangeData<'banner_hash', string>;
+/**
+ * Returned when a guild's owner_id is changed
+ */
+export type APIAuditLogChangeKeyOwnerId = AuditLogChangeData<'owner_id', Snowflake>;
+/**
+ * Returned when a guild's region is changed
+ */
+export type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>;
+/**
+ * Returned when a guild's preferred_locale is changed
+ */
+export type APIAuditLogChangeKeyPreferredLocale = AuditLogChangeData<'preferred_locale', string>;
+/**
+ * Returned when a guild's afk_channel_id is changed
+ */
+export type APIAuditLogChangeKeyAFKChannelId = AuditLogChangeData<'afk_channel_id', Snowflake>;
+/**
+ * Returned when a guild's afk_timeout is changed
+ */
+export type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>;
+/**
+ * Returned when a guild's rules_channel_id is changed
+ */
+export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_channel_id', string>;
+/**
+ * Returned when a guild's public_updates_channel_id is changed
+ */
+export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;
+/**
+ * Returned when a guild's safety_alerts_channel_id is changed
+ */
+export type APIAuditLogChangeKeySafetyAlertsChannelId = AuditLogChangeData<'safety_alerts_channel_id', string>;
+/**
+ * Returned when a guild's mfa_level is changed
+ */
+export type APIAuditLogChangeKeyMFALevel = AuditLogChangeData<'mfa_level', GuildMFALevel>;
+/**
+ * Returned when a guild's verification_level is changed
+ */
+export type APIAuditLogChangeKeyVerificationLevel = AuditLogChangeData<'verification_level', GuildVerificationLevel>;
+/**
+ * Returned when a guild's explicit_content_filter is changed
+ */
+export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<'explicit_content_filter', GuildExplicitContentFilter>;
+/**
+ * Returned when a guild's default_message_notifications is changed
+ */
+export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData<'default_message_notifications', GuildDefaultMessageNotifications>;
+/**
+ * Returned when a guild's vanity_url_code is changed
+ */
+export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_code', string>;
+/**
+ * Returned when new role(s) are added
+ */
+export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', APIRole[]>;
+/**
+ * Returned when role(s) are removed
+ */
+export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', APIRole[]>;
+/**
+ * Returned when there is a change in number of days after which inactive and role-unassigned members are kicked
+ */
+export type APIAuditLogChangeKeyPruneDeleteDays = AuditLogChangeData<'prune_delete_days', number>;
+/**
+ * Returned when a guild's widget is enabled
+ */
+export type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabled', boolean>;
+/**
+ * Returned when a guild's widget_channel_id is changed
+ */
+export type APIAuditLogChangeKeyWidgetChannelId = AuditLogChangeData<'widget_channel_id', Snowflake>;
+/**
+ * Returned when a guild's system_channel_id is changed
+ */
+export type APIAuditLogChangeKeySystemChannelId = AuditLogChangeData<'system_channel_id', Snowflake>;
+/**
+ * Returned when a channel's position is changed
+ */
+export type APIAuditLogChangeKeyPosition = AuditLogChangeData<'position', number>;
+/**
+ * Returned when a channel's topic is changed
+ */
+export type APIAuditLogChangeKeyTopic = AuditLogChangeData<'topic', string>;
+/**
+ * Returned when a voice channel's bitrate is changed
+ */
+export type APIAuditLogChangeKeyBitrate = AuditLogChangeData<'bitrate', number>;
+/**
+ * Returned when a channel's permission overwrites is changed
+ */
+export type APIAuditLogChangeKeyPermissionOverwrites = AuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
+/**
+ * Returned when a channel's NSFW restriction is changed
+ */
+export type APIAuditLogChangeKeyNSFW = AuditLogChangeData<'nsfw', boolean>;
+/**
+ * The application ID of the added or removed Webhook or Bot
+ */
+export type APIAuditLogChangeKeyApplicationId = AuditLogChangeData<'application_id', Snowflake>;
+/**
+ * Returned when a channel's amount of seconds a user has to wait before sending another message
+ * is changed
+ */
+export type APIAuditLogChangeKeyRateLimitPerUser = AuditLogChangeData<'rate_limit_per_user', number>;
+/**
+ * Returned when a permission bitfield is changed
+ */
+export type APIAuditLogChangeKeyPermissions = AuditLogChangeData<'permissions', string>;
+/**
+ * Returned when a role's color is changed
+ */
+export type APIAuditLogChangeKeyColor = AuditLogChangeData<'color', number>;
+/**
+ * Represents a change where the key is a snowflake.
+ * Currently, the only known instance of this is returned when permissions for a command were updated (<insert name of object here>)
+ */
+export type APIAuditLogChangeKeySnowflake = AuditLogChangeData<Snowflake, unknown>;
+/**
+ * Returned when a role's hoist status is changed
+ */
+export type APIAuditLogChangeKeyHoist = AuditLogChangeData<'hoist', boolean>;
+/**
+ * Returned when a role's mentionable status is changed
+ */
+export type APIAuditLogChangeKeyMentionable = AuditLogChangeData<'mentionable', boolean>;
+/**
+ * Returned when an overwrite's allowed permissions bitfield is changed
+ */
+export type APIAuditLogChangeKeyAllow = AuditLogChangeData<'allow', string>;
+/**
+ * Returned when an overwrite's denied permissions bitfield is changed
+ */
+export type APIAuditLogChangeKeyDeny = AuditLogChangeData<'deny', string>;
+/**
+ * Returned when an invite's code is changed
+ */
+export type APIAuditLogChangeKeyCode = AuditLogChangeData<'code', string>;
+/**
+ * Returned when an invite's or guild scheduled event's channel_id is changed
+ */
+export type APIAuditLogChangeKeyChannelId = AuditLogChangeData<'channel_id', Snowflake>;
+/**
+ * Returned when an invite's inviter_id is changed
+ */
+export type APIAuditLogChangeKeyInviterId = AuditLogChangeData<'inviter_id', Snowflake>;
+/**
+ * Returned when an invite's max_uses is changed
+ */
+export type APIAuditLogChangeKeyMaxUses = AuditLogChangeData<'max_uses', number>;
+/**
+ * Returned when an invite's uses is changed
+ */
+export type APIAuditLogChangeKeyUses = AuditLogChangeData<'uses', number>;
+/**
+ * Returned when an invite's max_age is changed
+ */
+export type APIAuditLogChangeKeyMaxAge = AuditLogChangeData<'max_age', number>;
+/**
+ * Returned when an invite's temporary status is changed
+ */
+export type APIAuditLogChangeKeyTemporary = AuditLogChangeData<'temporary', boolean>;
+/**
+ * Returned when a user's deaf status is changed
+ */
+export type APIAuditLogChangeKeyDeaf = AuditLogChangeData<'deaf', boolean>;
+/**
+ * Returned when a user's mute status is changed
+ */
+export type APIAuditLogChangeKeyMute = AuditLogChangeData<'mute', boolean>;
+/**
+ * Returned when a user's nick is changed
+ */
+export type APIAuditLogChangeKeyNick = AuditLogChangeData<'nick', string>;
+/**
+ * Returned when a user's avatar_hash is changed
+ */
+export type APIAuditLogChangeKeyAvatarHash = AuditLogChangeData<'avatar_hash', string>;
+/**
+ * The ID of the changed entity - sometimes used in conjunction with other keys
+ */
+export type APIAuditLogChangeKeyId = AuditLogChangeData<'id', Snowflake>;
+/**
+ * The type of entity created
+ */
+export type APIAuditLogChangeKeyType = AuditLogChangeData<'type', number | string>;
+/**
+ * Returned when an integration's enable_emoticons is changed
+ */
+export type APIAuditLogChangeKeyEnableEmoticons = AuditLogChangeData<'enable_emoticons', boolean>;
+/**
+ * Returned when an integration's expire_behavior is changed
+ */
+export type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
+/**
+ * Returned when an integration's expire_grace_period is changed
+ */
+export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>;
+/**
+ * Returned when a voice channel's user_limit is changed
+ */
+export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>;
+/**
+ * Returned when privacy level of a stage instance or guild scheduled event is changed
+ */
+export type APIAuditLogChangeKeyPrivacyLevel = AuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
+/**
+ * Returned when a sticker's related emoji is changed
+ */
+export type APIAuditLogChangeKeyTags = AuditLogChangeData<'tags', string>;
+/**
+ * Returned when a sticker's format_type is changed
+ */
+export type APIAuditLogChangeKeyFormatType = AuditLogChangeData<'format_type', StickerFormatType>;
+/**
+ * Empty string
+ */
+export type APIAuditLogChangeKeyAsset = AuditLogChangeData<'asset', ''>;
+/**
+ * Returned when a sticker's availability is changed
+ */
+export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', boolean>;
+/**
+ * Returned when a sticker's guild_id is changed
+ */
+export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
+export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
+export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
+export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
+export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<'default_auto_archive_duration', number>;
+/**
+ * Returned when entity type of a guild scheduled event is changed
+ */
+export type APIAuditLogChangeKeyEntityType = AuditLogChangeData<'entity_type', GuildScheduledEventEntityType>;
+/**
+ * Returned when status of a guild scheduled event is changed
+ */
+export type APIAuditLogChangeKeyStatus = AuditLogChangeData<'status', GuildScheduledEventStatus>;
+/**
+ * Returned when location of a guild scheduled event is changed
+ */
+export type APIAuditLogChangeKeyLocation = AuditLogChangeData<'location', string>;
+/**
+ * Returned when a user's timeout is changed
+ */
+export type APIAuditLogChangeKeyCommunicationDisabledUntil = AuditLogChangeData<'communication_disabled_until', string>;
+/**
+ * Returned when an auto moderation rule's trigger type is changed (only in rule creation or deletion)
+ */
+export type APIAuditLogChangeKeyTriggerType = AuditLogChangeData<'trigger_type', AutoModerationRuleTriggerType>;
+/**
+ * Returned when an auto moderation rule's event type is changed
+ */
+export type APIAuditLogChangeKeyEventType = AuditLogChangeData<'event_type', AutoModerationRuleEventType>;
+/**
+ * Returned when an auto moderation rule's trigger metadata is changed
+ */
+export type APIAuditLogChangeKeyTriggerMetadata = AuditLogChangeData<'trigger_metadata', APIAutoModerationRuleTriggerMetadata>;
+/**
+ * Returned when an auto moderation rule's actions is changed
+ */
+export type APIAuditLogChangeKeyActions = AuditLogChangeData<'actions', APIAutoModerationAction[]>;
+/**
+ * Returned when an auto moderation rule's enabled status is changed
+ */
+export type APIAuditLogChangeKeyEnabled = AuditLogChangeData<'enabled', boolean>;
+/**
+ * Returned when an auto moderation rule's exempt roles is changed
+ */
+export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles', Snowflake[]>;
+/**
+ * Returned when an auto moderation rule's exempt channels is changed
+ */
+export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>;
+interface AuditLogChangeData<K extends string, D> {
+ key: K;
+ /**
+ * The new value
+ *
+ * If `new_value` is not present in the change object, while `old_value` is,
+ * that means the property that was changed has been reset, or set to `null`
+ */
+ new_value?: D;
+ old_value?: D;
+}
+export {};
+//# sourceMappingURL=auditLog.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/auditLog.d.ts.map b/node_modules/discord-api-types/payloads/v9/auditLog.d.ts.map
new file mode 100644
index 0000000..eff6415
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/auditLog.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"auditLog.d.ts","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,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CAAC,CAAC;AAExH;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,kBAAkB,CAAC,cAAc,EAAE,6BAA6B,CAAC,CAAC;AAEhH;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,kBAAkB,CAAC,YAAY,EAAE,2BAA2B,CAAC,CAAC;AAE1G;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,kBAAkB,CACnE,kBAAkB,EAClB,oCAAoC,CACpC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,kBAAkB,CAAC,SAAS,EAAE,uBAAuB,EAAE,CAAC,CAAC;AAEnG;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,kBAAkB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAEjF;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,kBAAkB,CAAC,cAAc,EAAE,SAAS,EAAE,CAAC,CAAC;AAE9F;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,kBAAkB,CAAC,iBAAiB,EAAE,SAAS,EAAE,CAAC,CAAC;AAEpG,UAAU,kBAAkB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC;IAC/C,GAAG,EAAE,CAAC,CAAC;IACP;;;;;OAKG;IACH,SAAS,CAAC,EAAE,CAAC,CAAC;IACd,SAAS,CAAC,EAAE,CAAC,CAAC;CACd"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/auditLog.js b/node_modules/discord-api-types/payloads/v9/auditLog.js
new file mode 100644
index 0000000..7648caa
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/auditLog.js
@@ -0,0 +1,74 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/audit-log
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AuditLogOptionsType = exports.AuditLogEvent = void 0;
+/**
+ * https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
+ */
+var AuditLogEvent;
+(function (AuditLogEvent) {
+ AuditLogEvent[AuditLogEvent["GuildUpdate"] = 1] = "GuildUpdate";
+ AuditLogEvent[AuditLogEvent["ChannelCreate"] = 10] = "ChannelCreate";
+ AuditLogEvent[AuditLogEvent["ChannelUpdate"] = 11] = "ChannelUpdate";
+ AuditLogEvent[AuditLogEvent["ChannelDelete"] = 12] = "ChannelDelete";
+ AuditLogEvent[AuditLogEvent["ChannelOverwriteCreate"] = 13] = "ChannelOverwriteCreate";
+ AuditLogEvent[AuditLogEvent["ChannelOverwriteUpdate"] = 14] = "ChannelOverwriteUpdate";
+ AuditLogEvent[AuditLogEvent["ChannelOverwriteDelete"] = 15] = "ChannelOverwriteDelete";
+ AuditLogEvent[AuditLogEvent["MemberKick"] = 20] = "MemberKick";
+ AuditLogEvent[AuditLogEvent["MemberPrune"] = 21] = "MemberPrune";
+ AuditLogEvent[AuditLogEvent["MemberBanAdd"] = 22] = "MemberBanAdd";
+ AuditLogEvent[AuditLogEvent["MemberBanRemove"] = 23] = "MemberBanRemove";
+ AuditLogEvent[AuditLogEvent["MemberUpdate"] = 24] = "MemberUpdate";
+ AuditLogEvent[AuditLogEvent["MemberRoleUpdate"] = 25] = "MemberRoleUpdate";
+ AuditLogEvent[AuditLogEvent["MemberMove"] = 26] = "MemberMove";
+ AuditLogEvent[AuditLogEvent["MemberDisconnect"] = 27] = "MemberDisconnect";
+ AuditLogEvent[AuditLogEvent["BotAdd"] = 28] = "BotAdd";
+ AuditLogEvent[AuditLogEvent["RoleCreate"] = 30] = "RoleCreate";
+ AuditLogEvent[AuditLogEvent["RoleUpdate"] = 31] = "RoleUpdate";
+ AuditLogEvent[AuditLogEvent["RoleDelete"] = 32] = "RoleDelete";
+ AuditLogEvent[AuditLogEvent["InviteCreate"] = 40] = "InviteCreate";
+ AuditLogEvent[AuditLogEvent["InviteUpdate"] = 41] = "InviteUpdate";
+ AuditLogEvent[AuditLogEvent["InviteDelete"] = 42] = "InviteDelete";
+ AuditLogEvent[AuditLogEvent["WebhookCreate"] = 50] = "WebhookCreate";
+ AuditLogEvent[AuditLogEvent["WebhookUpdate"] = 51] = "WebhookUpdate";
+ AuditLogEvent[AuditLogEvent["WebhookDelete"] = 52] = "WebhookDelete";
+ AuditLogEvent[AuditLogEvent["EmojiCreate"] = 60] = "EmojiCreate";
+ AuditLogEvent[AuditLogEvent["EmojiUpdate"] = 61] = "EmojiUpdate";
+ AuditLogEvent[AuditLogEvent["EmojiDelete"] = 62] = "EmojiDelete";
+ AuditLogEvent[AuditLogEvent["MessageDelete"] = 72] = "MessageDelete";
+ AuditLogEvent[AuditLogEvent["MessageBulkDelete"] = 73] = "MessageBulkDelete";
+ AuditLogEvent[AuditLogEvent["MessagePin"] = 74] = "MessagePin";
+ AuditLogEvent[AuditLogEvent["MessageUnpin"] = 75] = "MessageUnpin";
+ AuditLogEvent[AuditLogEvent["IntegrationCreate"] = 80] = "IntegrationCreate";
+ AuditLogEvent[AuditLogEvent["IntegrationUpdate"] = 81] = "IntegrationUpdate";
+ AuditLogEvent[AuditLogEvent["IntegrationDelete"] = 82] = "IntegrationDelete";
+ AuditLogEvent[AuditLogEvent["StageInstanceCreate"] = 83] = "StageInstanceCreate";
+ AuditLogEvent[AuditLogEvent["StageInstanceUpdate"] = 84] = "StageInstanceUpdate";
+ AuditLogEvent[AuditLogEvent["StageInstanceDelete"] = 85] = "StageInstanceDelete";
+ AuditLogEvent[AuditLogEvent["StickerCreate"] = 90] = "StickerCreate";
+ AuditLogEvent[AuditLogEvent["StickerUpdate"] = 91] = "StickerUpdate";
+ AuditLogEvent[AuditLogEvent["StickerDelete"] = 92] = "StickerDelete";
+ AuditLogEvent[AuditLogEvent["GuildScheduledEventCreate"] = 100] = "GuildScheduledEventCreate";
+ AuditLogEvent[AuditLogEvent["GuildScheduledEventUpdate"] = 101] = "GuildScheduledEventUpdate";
+ AuditLogEvent[AuditLogEvent["GuildScheduledEventDelete"] = 102] = "GuildScheduledEventDelete";
+ AuditLogEvent[AuditLogEvent["ThreadCreate"] = 110] = "ThreadCreate";
+ AuditLogEvent[AuditLogEvent["ThreadUpdate"] = 111] = "ThreadUpdate";
+ AuditLogEvent[AuditLogEvent["ThreadDelete"] = 112] = "ThreadDelete";
+ AuditLogEvent[AuditLogEvent["ApplicationCommandPermissionUpdate"] = 121] = "ApplicationCommandPermissionUpdate";
+ AuditLogEvent[AuditLogEvent["AutoModerationRuleCreate"] = 140] = "AutoModerationRuleCreate";
+ AuditLogEvent[AuditLogEvent["AutoModerationRuleUpdate"] = 141] = "AutoModerationRuleUpdate";
+ AuditLogEvent[AuditLogEvent["AutoModerationRuleDelete"] = 142] = "AutoModerationRuleDelete";
+ AuditLogEvent[AuditLogEvent["AutoModerationBlockMessage"] = 143] = "AutoModerationBlockMessage";
+ AuditLogEvent[AuditLogEvent["AutoModerationFlagToChannel"] = 144] = "AutoModerationFlagToChannel";
+ AuditLogEvent[AuditLogEvent["AutoModerationUserCommunicationDisabled"] = 145] = "AutoModerationUserCommunicationDisabled";
+ AuditLogEvent[AuditLogEvent["CreatorMonetizationRequestCreated"] = 150] = "CreatorMonetizationRequestCreated";
+ AuditLogEvent[AuditLogEvent["CreatorMonetizationTermsAccepted"] = 151] = "CreatorMonetizationTermsAccepted";
+})(AuditLogEvent = exports.AuditLogEvent || (exports.AuditLogEvent = {}));
+var AuditLogOptionsType;
+(function (AuditLogOptionsType) {
+ AuditLogOptionsType["Role"] = "0";
+ AuditLogOptionsType["Member"] = "1";
+})(AuditLogOptionsType = exports.AuditLogOptionsType || (exports.AuditLogOptionsType = {}));
+//# sourceMappingURL=auditLog.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/auditLog.js.map b/node_modules/discord-api-types/payloads/v9/auditLog.js.map
new file mode 100644
index 0000000..5b3070d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/auditLog.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"auditLog.js","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA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Y,mBAGX;AAHD,WAAY,mBAAmB;IAC9B,iCAAU,CAAA;IACV,mCAAY,CAAA;AACb,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/autoModeration.d.ts b/node_modules/discord-api-types/payloads/v9/autoModeration.d.ts
new file mode 100644
index 0000000..16ee6f2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/autoModeration.d.ts
@@ -0,0 +1,208 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/auto-moderation
+ */
+import type { Snowflake } from '../../globals';
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-auto-moderation-rule-structure
+ */
+export interface APIAutoModerationRule {
+ /**
+ * The id of this rule
+ */
+ id: Snowflake;
+ /**
+ * The guild which this rule belongs to
+ */
+ guild_id: Snowflake;
+ /**
+ * The rule name
+ */
+ name: string;
+ /**
+ * The user id who created this rule
+ */
+ creator_id: Snowflake;
+ /**
+ * The rule event type
+ */
+ event_type: AutoModerationRuleEventType;
+ /**
+ * The rule trigger type
+ */
+ trigger_type: AutoModerationRuleTriggerType;
+ /**
+ * The rule trigger metadata
+ */
+ trigger_metadata: APIAutoModerationRuleTriggerMetadata;
+ /**
+ * The actions which will execute when this rule is triggered
+ */
+ actions: APIAutoModerationAction[];
+ /**
+ * Whether this rule is enabled
+ */
+ enabled: boolean;
+ /**
+ * The role ids that shouldn't be affected by this rule (Maximum of 20)
+ */
+ exempt_roles: Snowflake[];
+ /**
+ * The channel ids that shouldn't be affected by this rule (Maximum of 50)
+ */
+ exempt_channels: Snowflake[];
+}
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types
+ */
+export declare enum AutoModerationRuleTriggerType {
+ /**
+ * Check if content contains words from a user defined list of keywords (Maximum of 6 per guild)
+ */
+ Keyword = 1,
+ /**
+ * Check if content represents generic spam (Maximum of 1 per guild)
+ */
+ Spam = 3,
+ /**
+ * Check if content contains words from internal pre-defined wordsets (Maximum of 1 per guild)
+ */
+ KeywordPreset = 4,
+ /**
+ * Check if content contains more mentions than allowed (Maximum of 1 per guild)
+ */
+ MentionSpam = 5
+}
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata
+ */
+export interface APIAutoModerationRuleTriggerMetadata {
+ /**
+ * Substrings which will be searched for in content (Maximum of 1000)
+ *
+ * A keyword can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less
+ * See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies)
+ *
+ * Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword}
+ */
+ keyword_filter?: string[];
+ /**
+ * The internally pre-defined wordsets which will be searched for in content
+ *
+ * Associated trigger type: {@link AutoModerationRuleTriggerType.KeywordPreset}
+ */
+ presets?: AutoModerationRuleKeywordPresetType[];
+ /**
+ * Substrings which will be exempt from triggering the preset trigger type (Maximum of 1000)
+ *
+ * A allowed-word can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less
+ * See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies)
+ *
+ * Associated trigger type: {@link AutoModerationRuleTriggerType.KeywordPreset}
+ */
+ allow_list?: string[];
+ /**
+ * Regular expression patterns which will be matched against content (Maximum of 10)
+ *
+ * Only Rust flavored regex is currently supported (Maximum of 260 characters)
+ *
+ * Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword}
+ */
+ regex_patterns?: string[];
+ /**
+ * Total number of mentions (role & user) allowed per message (Maximum of 50)
+ *
+ * Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam}
+ */
+ mention_total_limit?: number;
+ /**
+ * Whether to automatically detect mention raids
+ *
+ * Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam}
+ */
+ mention_raid_protection_enabled?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types
+ */
+export declare enum AutoModerationRuleKeywordPresetType {
+ /**
+ * Words that may be considered forms of swearing or cursing
+ */
+ Profanity = 1,
+ /**
+ * Words that refer to sexually explicit behavior or activity
+ */
+ SexualContent = 2,
+ /**
+ * Personal insults or words that may be considered hate speech
+ */
+ Slurs = 3
+}
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types
+ */
+export declare enum AutoModerationRuleEventType {
+ /**
+ * When a member sends or edits a message in the guild
+ */
+ MessageSend = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-auto-moderation-action-structure
+ */
+export interface APIAutoModerationAction {
+ /**
+ * The action type
+ */
+ type: AutoModerationActionType;
+ /**
+ * Additional metadata needed during execution for this specific action type
+ *
+ * Will only be omitted if the action type is {@link AutoModerationActionType.BlockMessage}
+ */
+ metadata?: APIAutoModerationActionMetadata;
+}
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types
+ */
+export declare enum AutoModerationActionType {
+ /**
+ * Blocks a member's message and prevents it from being posted.
+ * A custom explanation can be specified and shown to members whenever their message is blocked
+ */
+ BlockMessage = 1,
+ /**
+ * Logs user content to a specified channel
+ */
+ SendAlertMessage = 2,
+ /**
+ * Timeout user for specified duration, this action type can be set if the bot has `MODERATE_MEMBERS` permission
+ */
+ Timeout = 3
+}
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-metadata
+ */
+export interface APIAutoModerationActionMetadata {
+ /**
+ * Channel to which user content should be logged
+ *
+ * Associated action type: {@link AutoModerationActionType.SendAlertMessage}
+ */
+ channel_id?: Snowflake;
+ /**
+ * Timeout duration in seconds (Maximum of 4 weeks - 2419200 seconds)
+ *
+ * Only available if using {@link AutoModerationRuleTriggerType.Keyword}
+ *
+ * Associated action type: {@link AutoModerationActionType.Timeout}
+ */
+ duration_seconds?: number;
+ /**
+ * Additional explanation that will be shown to members whenever their message is blocked (Maximum 150 characters)
+ *
+ * Associated action type {@link AutoModerationActionType.BlockMessage}
+ */
+ custom_message?: string;
+}
+//# sourceMappingURL=autoModeration.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/autoModeration.d.ts.map b/node_modules/discord-api-types/payloads/v9/autoModeration.d.ts.map
new file mode 100644
index 0000000..c74bc8c
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/autoModeration.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"autoModeration.d.ts","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,2BAA2B,CAAC;IACxC;;OAEG;IACH,YAAY,EAAE,6BAA6B,CAAC;IAC5C;;OAEG;IACH,gBAAgB,EAAE,oCAAoC,CAAC;IACvD;;OAEG;IACH,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,YAAY,EAAE,SAAS,EAAE,CAAC;IAC1B;;OAEG;IACH,eAAe,EAAE,SAAS,EAAE,CAAC;CAC7B;AAED;;GAEG;AACH,oBAAY,6BAA6B;IACxC;;OAEG;IACH,OAAO,IAAI;IACX;;OAEG;IACH,IAAI,IAAI;IACR;;OAEG;IACH,aAAa,IAAA;IACb;;OAEG;IACH,WAAW,IAAA;CACX;AAED;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACpD;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,mCAAmC,EAAE,CAAC;IAChD;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,+BAA+B,CAAC,EAAE,OAAO,CAAC;CAC1C;AAED;;GAEG;AACH,oBAAY,mCAAmC;IAC9C;;OAEG;IACH,SAAS,IAAI;IACb;;OAEG;IACH,aAAa,IAAA;IACb;;OAEG;IACH,KAAK,IAAA;CACL;AAED;;GAEG;AACH,oBAAY,2BAA2B;IACtC;;OAEG;IACH,WAAW,IAAI;CACf;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,IAAI,EAAE,wBAAwB,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,+BAA+B,CAAC;CAC3C;AAED;;GAEG;AACH,oBAAY,wBAAwB;IACnC;;;OAGG;IACH,YAAY,IAAI;IAChB;;OAEG;IACH,gBAAgB,IAAA;IAChB;;OAEG;IACH,OAAO,IAAA;CACP;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/autoModeration.js b/node_modules/discord-api-types/payloads/v9/autoModeration.js
new file mode 100644
index 0000000..0ec10a4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/autoModeration.js
@@ -0,0 +1,76 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/auto-moderation
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AutoModerationActionType = exports.AutoModerationRuleEventType = exports.AutoModerationRuleKeywordPresetType = exports.AutoModerationRuleTriggerType = void 0;
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types
+ */
+var AutoModerationRuleTriggerType;
+(function (AutoModerationRuleTriggerType) {
+ /**
+ * Check if content contains words from a user defined list of keywords (Maximum of 6 per guild)
+ */
+ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["Keyword"] = 1] = "Keyword";
+ /**
+ * Check if content represents generic spam (Maximum of 1 per guild)
+ */
+ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["Spam"] = 3] = "Spam";
+ /**
+ * Check if content contains words from internal pre-defined wordsets (Maximum of 1 per guild)
+ */
+ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["KeywordPreset"] = 4] = "KeywordPreset";
+ /**
+ * Check if content contains more mentions than allowed (Maximum of 1 per guild)
+ */
+ AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["MentionSpam"] = 5] = "MentionSpam";
+})(AutoModerationRuleTriggerType = exports.AutoModerationRuleTriggerType || (exports.AutoModerationRuleTriggerType = {}));
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types
+ */
+var AutoModerationRuleKeywordPresetType;
+(function (AutoModerationRuleKeywordPresetType) {
+ /**
+ * Words that may be considered forms of swearing or cursing
+ */
+ AutoModerationRuleKeywordPresetType[AutoModerationRuleKeywordPresetType["Profanity"] = 1] = "Profanity";
+ /**
+ * Words that refer to sexually explicit behavior or activity
+ */
+ AutoModerationRuleKeywordPresetType[AutoModerationRuleKeywordPresetType["SexualContent"] = 2] = "SexualContent";
+ /**
+ * Personal insults or words that may be considered hate speech
+ */
+ AutoModerationRuleKeywordPresetType[AutoModerationRuleKeywordPresetType["Slurs"] = 3] = "Slurs";
+})(AutoModerationRuleKeywordPresetType = exports.AutoModerationRuleKeywordPresetType || (exports.AutoModerationRuleKeywordPresetType = {}));
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types
+ */
+var AutoModerationRuleEventType;
+(function (AutoModerationRuleEventType) {
+ /**
+ * When a member sends or edits a message in the guild
+ */
+ AutoModerationRuleEventType[AutoModerationRuleEventType["MessageSend"] = 1] = "MessageSend";
+})(AutoModerationRuleEventType = exports.AutoModerationRuleEventType || (exports.AutoModerationRuleEventType = {}));
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types
+ */
+var AutoModerationActionType;
+(function (AutoModerationActionType) {
+ /**
+ * Blocks a member's message and prevents it from being posted.
+ * A custom explanation can be specified and shown to members whenever their message is blocked
+ */
+ AutoModerationActionType[AutoModerationActionType["BlockMessage"] = 1] = "BlockMessage";
+ /**
+ * Logs user content to a specified channel
+ */
+ AutoModerationActionType[AutoModerationActionType["SendAlertMessage"] = 2] = "SendAlertMessage";
+ /**
+ * Timeout user for specified duration, this action type can be set if the bot has `MODERATE_MEMBERS` permission
+ */
+ AutoModerationActionType[AutoModerationActionType["Timeout"] = 3] = "Timeout";
+})(AutoModerationActionType = exports.AutoModerationActionType || (exports.AutoModerationActionType = {}));
+//# sourceMappingURL=autoModeration.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/autoModeration.js.map b/node_modules/discord-api-types/payloads/v9/autoModeration.js.map
new file mode 100644
index 0000000..0310be2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/autoModeration.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"autoModeration.js","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAsDH;;GAEG;AACH,IAAY,6BAiBX;AAjBD,WAAY,6BAA6B;IACxC;;OAEG;IACH,uFAAW,CAAA;IACX;;OAEG;IACH,iFAAQ,CAAA;IACR;;OAEG;IACH,mGAAa,CAAA;IACb;;OAEG;IACH,+FAAW,CAAA;AACZ,CAAC,EAjBW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAiBxC;AAoDD;;GAEG;AACH,IAAY,mCAaX;AAbD,WAAY,mCAAmC;IAC9C;;OAEG;IACH,uGAAa,CAAA;IACb;;OAEG;IACH,+GAAa,CAAA;IACb;;OAEG;IACH,+FAAK,CAAA;AACN,CAAC,EAbW,mCAAmC,GAAnC,2CAAmC,KAAnC,2CAAmC,QAa9C;AAED;;GAEG;AACH,IAAY,2BAKX;AALD,WAAY,2BAA2B;IACtC;;OAEG;IACH,2FAAe,CAAA;AAChB,CAAC,EALW,2BAA2B,GAA3B,mCAA2B,KAA3B,mCAA2B,QAKtC;AAkBD;;GAEG;AACH,IAAY,wBAcX;AAdD,WAAY,wBAAwB;IACnC;;;OAGG;IACH,uFAAgB,CAAA;IAChB;;OAEG;IACH,+FAAgB,CAAA;IAChB;;OAEG;IACH,6EAAO,CAAA;AACR,CAAC,EAdW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAcnC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/channel.d.ts b/node_modules/discord-api-types/payloads/v9/channel.d.ts
new file mode 100644
index 0000000..a09848f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/channel.d.ts
@@ -0,0 +1,1602 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/channel
+ */
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIApplication } from './application';
+import type { APIPartialEmoji } from './emoji';
+import type { APIGuildMember } from './guild';
+import type { APIMessageInteraction } from './interactions';
+import type { APIRole } from './permissions';
+import type { APISticker, APIStickerItem } from './sticker';
+import type { APIUser } from './user';
+/**
+ * Not documented, but partial only includes id, name, and type
+ */
+export interface APIPartialChannel {
+ /**
+ * The id of the channel
+ */
+ id: Snowflake;
+ /**
+ * The type of the channel
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object-channel-types
+ */
+ type: ChannelType;
+ /**
+ * The name of the channel (1-100 characters)
+ */
+ name?: string | null;
+}
+/**
+ * This interface is used to allow easy extension for other channel types. While
+ * also allowing `APIPartialChannel` to be used without breaking.
+ */
+export interface APIChannelBase<T extends ChannelType> extends APIPartialChannel {
+ type: T;
+ flags?: ChannelFlags;
+}
+export type TextChannelType = ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildAnnouncement | ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread | ChannelType.GuildText | ChannelType.GuildForum | ChannelType.GuildVoice | ChannelType.GuildStageVoice;
+export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>;
+export interface APITextBasedChannel<T extends ChannelType> extends APIChannelBase<T> {
+ /**
+ * The id of the last message sent in this channel (may not point to an existing or valid message)
+ */
+ last_message_id?: Snowflake | null;
+ /**
+ * When the last pinned message was pinned.
+ * This may be `null` in events such as `GUILD_CREATE` when a message is not pinned
+ */
+ last_pin_timestamp?: string | null;
+ /**
+ * Amount of seconds a user has to wait before sending another message (0-21600);
+ * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
+ *
+ * `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
+ *
+ * For thread channels, `rate_limit_per_user` is only returned if the field is set to a non-zero and non-null value.
+ * The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
+ */
+ rate_limit_per_user?: number;
+}
+export interface APIGuildChannel<T extends ChannelType> extends Omit<APIChannelBase<T>, 'name'> {
+ /**
+ * The name of the channel (1-100 characters)
+ */
+ name: string;
+ /**
+ * The id of the guild (may be missing for some channel objects received over gateway guild dispatches)
+ */
+ guild_id?: Snowflake;
+ /**
+ * Explicit permission overwrites for members and roles
+ *
+ * See https://discord.com/developers/docs/resources/channel#overwrite-object
+ */
+ permission_overwrites?: APIOverwrite[];
+ /**
+ * Sorting position of the channel
+ */
+ position: number;
+ /**
+ * ID of the parent category for a channel (each parent category can contain up to 50 channels)
+ *
+ * OR
+ *
+ * ID of the parent channel for a thread
+ */
+ parent_id?: Snowflake | null;
+ /**
+ * Whether the channel is nsfw
+ */
+ nsfw?: boolean;
+}
+export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
+export interface APIGuildTextChannel<T extends GuildTextChannelType> extends Omit<APITextBasedChannel<T>, 'name'>, APIGuildChannel<T> {
+ /**
+ * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
+ */
+ default_auto_archive_duration?: ThreadAutoArchiveDuration;
+ /**
+ * The initial `rate_limit_per_user` to set on newly created threads.
+ * This field is copied to the thread at creation time and does not live update
+ */
+ default_thread_rate_limit_per_user?: number;
+ /**
+ * The channel topic (0-1024 characters)
+ */
+ topic?: string | null;
+}
+export type APITextChannel = APIGuildTextChannel<ChannelType.GuildText>;
+export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildAnnouncement>;
+export type APIGuildCategoryChannel = APIGuildChannel<ChannelType.GuildCategory>;
+export interface APIVoiceChannelBase<T extends ChannelType> extends APIGuildChannel<T>, Omit<APITextBasedChannel<T>, 'name' | 'last_pin_timestamp'> {
+ /**
+ * The bitrate (in bits) of the voice or stage channel
+ */
+ bitrate?: number;
+ /**
+ * The user limit of the voice or stage channel
+ */
+ user_limit?: number;
+ /**
+ * Voice region id for the voice or stage channel, automatic when set to `null`
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-region-object
+ */
+ rtc_region?: string | null;
+ /**
+ * The camera video quality mode of the voice or stage channel, `1` when not present
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes
+ */
+ video_quality_mode?: VideoQualityMode;
+}
+export type APIGuildVoiceChannel = APIVoiceChannelBase<ChannelType.GuildVoice>;
+export type APIGuildStageVoiceChannel = APIVoiceChannelBase<ChannelType.GuildStageVoice>;
+export interface APIDMChannelBase<T extends ChannelType> extends Omit<APITextBasedChannel<T>, 'rate_limit_per_user'> {
+ /**
+ * The recipients of the DM
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ recipients?: APIUser[];
+}
+export interface APIDMChannel extends Omit<APIDMChannelBase<ChannelType.DM>, 'name'> {
+ /**
+ * The name of the channel (always null for DM channels)
+ */
+ name: null;
+}
+export interface APIGroupDMChannel extends Omit<APIDMChannelBase<ChannelType.GroupDM>, 'name'> {
+ /**
+ * The name of the channel (1-100 characters)
+ */
+ name: string | null;
+ /**
+ * Application id of the group DM creator if it is bot-created
+ */
+ application_id?: Snowflake;
+ /**
+ * Icon hash
+ */
+ icon?: string | null;
+ /**
+ * ID of the DM creator
+ */
+ owner_id?: Snowflake;
+ /**
+ * Whether the channel is managed by an OAuth2 application
+ */
+ managed?: boolean;
+}
+export interface APIThreadChannel extends Omit<APITextBasedChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread>, 'name'>, APIGuildChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread> {
+ /**
+ * The client users member for the thread, only included in select endpoints
+ */
+ member?: APIThreadMember;
+ /**
+ * The metadata for a thread channel not shared by other channels
+ */
+ thread_metadata?: APIThreadMetadata;
+ /**
+ * Number of messages (not including the initial message or deleted messages) in a thread
+ *
+ * If the thread was created before July 1, 2022, it stops counting at 50 messages
+ */
+ message_count?: number;
+ /**
+ * The approximate member count of the thread, does not count above 50 even if there are more members
+ */
+ member_count?: number;
+ /**
+ * ID of the thread creator
+ */
+ owner_id?: Snowflake;
+ /**
+ * Number of messages ever sent in a thread
+ *
+ * Similar to `message_count` on message creation, but won't decrement when a message is deleted
+ */
+ total_message_sent?: number;
+ /**
+ * The IDs of the set of tags that have been applied to a thread in a forum channel
+ */
+ applied_tags: Snowflake[];
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#forum-tag-object-forum-tag-structure
+ */
+export interface APIGuildForumTag {
+ /**
+ * The id of the tag
+ */
+ id: Snowflake;
+ /**
+ * The name of the tag (0-20 characters)
+ */
+ name: string;
+ /**
+ * Whether this tag can only be added to or removed from threads by a member with the `MANAGE_THREADS` permission
+ */
+ moderated: boolean;
+ /**
+ * The id of a guild's custom emoji
+ */
+ emoji_id: Snowflake | null;
+ /**
+ * The unicode character of the emoji
+ */
+ emoji_name: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#default-reaction-object-default-reaction-structure
+ */
+export interface APIGuildForumDefaultReactionEmoji {
+ /**
+ * The id of a guild's custom emoji
+ */
+ emoji_id: Snowflake | null;
+ /**
+ * The unicode character of the emoji
+ */
+ emoji_name: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel/#channel-object-sort-order-types
+ */
+export declare enum SortOrderType {
+ /**
+ * Sort forum posts by activity
+ */
+ LatestActivity = 0,
+ /**
+ * Sort forum posts by creation time (from most recent to oldest)
+ */
+ CreationDate = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/channel/#channel-object-forum-layout-types
+ */
+export declare enum ForumLayoutType {
+ /**
+ * No default has been set for forum channel
+ */
+ NotSet = 0,
+ /**
+ * Display posts as a list
+ */
+ ListView = 1,
+ /**
+ * Display posts as a collection of tiles
+ */
+ GalleryView = 2
+}
+export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
+ /**
+ * The set of tags that can be used in a forum channel
+ */
+ available_tags: APIGuildForumTag[];
+ /**
+ * The emoji to show in the add reaction button on a thread in a forum channel
+ */
+ default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
+ /**
+ * The default sort order type used to order posts in a forum channel
+ */
+ default_sort_order: SortOrderType | null;
+ /**
+ * The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
+ */
+ default_forum_layout: ForumLayoutType;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object-channel-structure
+ */
+export type APIChannel = APIGroupDMChannel | APIDMChannel | APITextChannel | APINewsChannel | APIGuildVoiceChannel | APIGuildStageVoiceChannel | APIGuildCategoryChannel | APIThreadChannel | APIGuildForumChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object-channel-types
+ */
+export declare enum ChannelType {
+ /**
+ * A text channel within a guild
+ */
+ GuildText = 0,
+ /**
+ * A direct message between users
+ */
+ DM = 1,
+ /**
+ * A voice channel within a guild
+ */
+ GuildVoice = 2,
+ /**
+ * A direct message between multiple users
+ */
+ GroupDM = 3,
+ /**
+ * An organizational category that contains up to 50 channels
+ *
+ * See https://support.discord.com/hc/articles/115001580171
+ */
+ GuildCategory = 4,
+ /**
+ * A channel that users can follow and crosspost into their own guild
+ *
+ * See https://support.discord.com/hc/articles/360032008192
+ */
+ GuildAnnouncement = 5,
+ /**
+ * A temporary sub-channel within a Guild Announcement channel
+ */
+ AnnouncementThread = 10,
+ /**
+ * A temporary sub-channel within a Guild Text or Guild Forum channel
+ */
+ PublicThread = 11,
+ /**
+ * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission
+ */
+ PrivateThread = 12,
+ /**
+ * A voice channel for hosting events with an audience
+ *
+ * See https://support.discord.com/hc/articles/1500005513722
+ */
+ GuildStageVoice = 13,
+ /**
+ * The channel in a Student Hub containing the listed servers
+ *
+ * See https://support.discord.com/hc/articles/4406046651927
+ */
+ GuildDirectory = 14,
+ /**
+ * A channel that can only contain threads
+ */
+ GuildForum = 15,
+ /**
+ * A channel that users can follow and crosspost into their own guild
+ *
+ * @deprecated This is the old name for {@apilink ChannelType#GuildAnnouncement}
+ *
+ * See https://support.discord.com/hc/articles/360032008192
+ */
+ GuildNews = 5,
+ /**
+ * A temporary sub-channel within a Guild Announcement channel
+ *
+ * @deprecated This is the old name for {@apilink ChannelType#AnnouncementThread}
+ */
+ GuildNewsThread = 10,
+ /**
+ * A temporary sub-channel within a Guild Text channel
+ *
+ * @deprecated This is the old name for {@apilink ChannelType#PublicThread}
+ */
+ GuildPublicThread = 11,
+ /**
+ * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission
+ *
+ * @deprecated This is the old name for {@apilink ChannelType#PrivateThread}
+ */
+ GuildPrivateThread = 12
+}
+export declare enum VideoQualityMode {
+ /**
+ * Discord chooses the quality for optimal performance
+ */
+ Auto = 1,
+ /**
+ * 720p
+ */
+ Full = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-structure
+ */
+export interface APIMessage {
+ /**
+ * ID of the message
+ */
+ id: Snowflake;
+ /**
+ * ID of the channel the message was sent in
+ */
+ channel_id: Snowflake;
+ /**
+ * The author of this message (only a valid user in the case where the message is generated by a user or bot user)
+ *
+ * If the message is generated by a webhook, the author object corresponds to the webhook's id,
+ * username, and avatar. You can tell if a message is generated by a webhook by checking for the `webhook_id` property
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ author: APIUser;
+ /**
+ * Contents of the message
+ *
+ * The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field
+ *
+ * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**
+ *
+ * See https://support-dev.discord.com/hc/articles/4404772028055
+ */
+ content: string;
+ /**
+ * When this message was sent
+ */
+ timestamp: string;
+ /**
+ * When this message was edited (or null if never)
+ */
+ edited_timestamp: string | null;
+ /**
+ * Whether this was a TTS message
+ */
+ tts: boolean;
+ /**
+ * Whether this message mentions everyone
+ */
+ mention_everyone: boolean;
+ /**
+ * Users specifically mentioned in the message
+ *
+ * The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
+ * from text-based guild channels
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ mentions: APIUser[];
+ /**
+ * Roles specifically mentioned in this message
+ *
+ * See https://discord.com/developers/docs/topics/permissions#role-object
+ */
+ mention_roles: APIRole['id'][];
+ /**
+ * Channels specifically mentioned in this message
+ *
+ * Not all channel mentions in a message will appear in `mention_channels`.
+ * - Only textual channels that are visible to everyone in a lurkable guild will ever be included
+ * - Only crossposted messages (via Channel Following) currently include `mention_channels` at all
+ *
+ * If no mentions in the message meet these requirements, this field will not be sent
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-mention-object
+ */
+ mention_channels?: APIChannelMention[];
+ /**
+ * Any attached files
+ *
+ * See https://discord.com/developers/docs/resources/channel#attachment-object
+ *
+ * The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field
+ *
+ * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**
+ *
+ * See https://support-dev.discord.com/hc/articles/4404772028055
+ */
+ attachments: APIAttachment[];
+ /**
+ * Any embedded content
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object
+ *
+ * The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field
+ *
+ * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**
+ *
+ * See https://support-dev.discord.com/hc/articles/4404772028055
+ */
+ embeds: APIEmbed[];
+ /**
+ * Reactions to the message
+ *
+ * See https://discord.com/developers/docs/resources/channel#reaction-object
+ */
+ reactions?: APIReaction[];
+ /**
+ * A nonce that can be used for optimistic message sending (up to 25 characters)
+ *
+ * **You will not receive this from further fetches. This is received only once from a `MESSAGE_CREATE`
+ * event to ensure it got sent**
+ */
+ nonce?: string | number;
+ /**
+ * Whether this message is pinned
+ */
+ pinned: boolean;
+ /**
+ * If the message is generated by a webhook, this is the webhook's id
+ */
+ webhook_id?: Snowflake;
+ /**
+ * Type of message
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-types
+ */
+ type: MessageType;
+ /**
+ * Sent with Rich Presence-related chat embeds
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure
+ */
+ activity?: APIMessageActivity;
+ /**
+ * Sent with Rich Presence-related chat embeds
+ *
+ * See https://discord.com/developers/docs/resources/application#application-object
+ */
+ application?: Partial<APIApplication>;
+ /**
+ * If the message is a response to an Interaction, this is the id of the interaction's application
+ */
+ application_id?: Snowflake;
+ /**
+ * Reference data sent with crossposted messages, replies, pins, and thread starter messages
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
+ */
+ message_reference?: APIMessageReference;
+ /**
+ * Message flags combined as a bitfield
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-flags
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ flags?: MessageFlags;
+ /**
+ * The message associated with the `message_reference`
+ *
+ * This field is only returned for messages with a `type` of `19` (REPLY).
+ *
+ * If the message is a reply but the `referenced_message` field is not present,
+ * the backend did not attempt to fetch the message that was being replied to,
+ * so its state is unknown.
+ *
+ * If the field exists but is `null`, the referenced message was deleted
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object
+ */
+ referenced_message?: APIMessage | null;
+ /**
+ * Sent if the message is a response to an Interaction
+ */
+ interaction?: APIMessageInteraction;
+ /**
+ * Sent if a thread was started from this message
+ */
+ thread?: APIChannel;
+ /**
+ * Sent if the message contains components like buttons, action rows, or other interactive components
+ *
+ * The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field
+ *
+ * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**
+ *
+ * See https://support-dev.discord.com/hc/articles/4404772028055
+ */
+ components?: APIActionRowComponent<APIMessageActionRowComponent>[];
+ /**
+ * Sent if the message contains stickers
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-item-object
+ */
+ sticker_items?: APIStickerItem[];
+ /**
+ * The stickers sent with the message
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object
+ *
+ * @deprecated Use `sticker_items` instead
+ */
+ stickers?: APISticker[];
+ /**
+ * A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread
+ *
+ * It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
+ */
+ position?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-types
+ */
+export declare enum MessageType {
+ Default = 0,
+ RecipientAdd = 1,
+ RecipientRemove = 2,
+ Call = 3,
+ ChannelNameChange = 4,
+ ChannelIconChange = 5,
+ ChannelPinnedMessage = 6,
+ UserJoin = 7,
+ GuildBoost = 8,
+ GuildBoostTier1 = 9,
+ GuildBoostTier2 = 10,
+ GuildBoostTier3 = 11,
+ ChannelFollowAdd = 12,
+ GuildDiscoveryDisqualified = 14,
+ GuildDiscoveryRequalified = 15,
+ GuildDiscoveryGracePeriodInitialWarning = 16,
+ GuildDiscoveryGracePeriodFinalWarning = 17,
+ ThreadCreated = 18,
+ Reply = 19,
+ ChatInputCommand = 20,
+ ThreadStarterMessage = 21,
+ GuildInviteReminder = 22,
+ ContextMenuCommand = 23,
+ AutoModerationAction = 24,
+ RoleSubscriptionPurchase = 25,
+ InteractionPremiumUpsell = 26,
+ StageStart = 27,
+ StageEnd = 28,
+ StageSpeaker = 29,
+ /**
+ * @unstable https://github.com/discord/discord-api-docs/pull/5927#discussion_r1107678548
+ */
+ StageRaiseHand = 30,
+ StageTopic = 31,
+ GuildApplicationPremiumSubscription = 32
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure
+ */
+export interface APIMessageActivity {
+ /**
+ * Type of message activity
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
+ */
+ type: MessageActivityType;
+ /**
+ * `party_id` from a Rich Presence event
+ *
+ * See https://discord.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields
+ */
+ party_id?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
+ */
+export interface APIMessageReference {
+ /**
+ * ID of the originating message
+ */
+ message_id?: Snowflake;
+ /**
+ * ID of the originating message's channel
+ */
+ channel_id: Snowflake;
+ /**
+ * ID of the originating message's guild
+ */
+ guild_id?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
+ */
+export declare enum MessageActivityType {
+ Join = 1,
+ Spectate = 2,
+ Listen = 3,
+ JoinRequest = 5
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-flags
+ */
+export declare enum MessageFlags {
+ /**
+ * This message has been published to subscribed channels (via Channel Following)
+ */
+ Crossposted = 1,
+ /**
+ * This message originated from a message in another channel (via Channel Following)
+ */
+ IsCrosspost = 2,
+ /**
+ * Do not include any embeds when serializing this message
+ */
+ SuppressEmbeds = 4,
+ /**
+ * The source message for this crosspost has been deleted (via Channel Following)
+ */
+ SourceMessageDeleted = 8,
+ /**
+ * This message came from the urgent message system
+ */
+ Urgent = 16,
+ /**
+ * This message has an associated thread, which shares its id
+ */
+ HasThread = 32,
+ /**
+ * This message is only visible to the user who invoked the Interaction
+ */
+ Ephemeral = 64,
+ /**
+ * This message is an Interaction Response and the bot is "thinking"
+ */
+ Loading = 128,
+ /**
+ * This message failed to mention some roles and add their members to the thread
+ */
+ FailedToMentionSomeRolesInThread = 256,
+ /**
+ * @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ShouldShowLinkNotDiscordWarning = 1024,
+ /**
+ * This message will not trigger push and desktop notifications
+ */
+ SuppressNotifications = 4096,
+ /**
+ * This message is a voice message
+ */
+ IsVoiceMessage = 8192
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#followed-channel-object
+ */
+export interface APIFollowedChannel {
+ /**
+ * Source channel id
+ */
+ channel_id: Snowflake;
+ /**
+ * Created target webhook id
+ */
+ webhook_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure
+ */
+export interface APIReaction {
+ /**
+ * Times this emoji has been used to react
+ */
+ count: number;
+ /**
+ * Whether the current user reacted using this emoji
+ */
+ me: boolean;
+ /**
+ * Emoji information
+ *
+ * See https://discord.com/developers/docs/resources/emoji#emoji-object
+ */
+ emoji: APIPartialEmoji;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure
+ */
+export interface APIOverwrite {
+ /**
+ * Role or user id
+ */
+ id: Snowflake;
+ /**
+ * Either 0 (role) or 1 (member)
+ *
+ * {@link OverwriteType}
+ */
+ type: OverwriteType;
+ /**
+ * Permission bit set
+ *
+ * See https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ allow: Permissions;
+ /**
+ * Permission bit set
+ *
+ * See https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ deny: Permissions;
+}
+export declare enum OverwriteType {
+ Role = 0,
+ Member = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#thread-metadata-object-thread-metadata-structure
+ */
+export interface APIThreadMetadata {
+ /**
+ * Whether the thread is archived
+ */
+ archived: boolean;
+ /**
+ * Duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080
+ */
+ auto_archive_duration: ThreadAutoArchiveDuration;
+ /**
+ * An ISO8601 timestamp when the thread's archive status was last changed, used for calculating recent activity
+ */
+ archive_timestamp: string;
+ /**
+ * Whether the thread is locked; when a thread is locked, only users with `MANAGE_THREADS` can unarchive it
+ */
+ locked?: boolean;
+ /**
+ * Whether non-moderators can add other non-moderators to the thread; only available on private threads
+ */
+ invitable?: boolean;
+ /**
+ * Timestamp when the thread was created; only populated for threads created after 2022-01-09
+ */
+ create_timestamp?: string;
+}
+export declare enum ThreadAutoArchiveDuration {
+ OneHour = 60,
+ OneDay = 1440,
+ ThreeDays = 4320,
+ OneWeek = 10080
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#thread-member-object-thread-member-structure
+ */
+export interface APIThreadMember {
+ /**
+ * The id of the thread
+ *
+ * **This field is omitted on the member sent within each thread in the `GUILD_CREATE` event**
+ */
+ id?: Snowflake;
+ /**
+ * The id of the member
+ *
+ * **This field is omitted on the member sent within each thread in the `GUILD_CREATE` event**
+ */
+ user_id?: Snowflake;
+ /**
+ * An ISO8601 timestamp for when the member last joined
+ */
+ join_timestamp: string;
+ /**
+ * Member flags combined as a bitfield
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ flags: ThreadMemberFlags;
+ /**
+ * Additional information about the user
+ *
+ * **This field is omitted on the member sent within each thread in the `GUILD_CREATE` event**
+ *
+ * **This field is only present when `with_member` is set to true when calling `List Thread Members` or `Get Thread Member`**
+ */
+ member?: APIGuildMember;
+}
+export declare enum ThreadMemberFlags {
+ /**
+ * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ HasInteracted = 1,
+ /**
+ * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ AllMessages = 2,
+ /**
+ * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ OnlyMentions = 4,
+ /**
+ * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ NoMessages = 8
+}
+export interface APIThreadList {
+ /**
+ * The threads that were fetched
+ */
+ threads: APIChannel[];
+ /**
+ * The members for the client user in each of the fetched threads
+ */
+ members: APIThreadMember[];
+ /**
+ * Whether there are potentially additional threads
+ */
+ has_more?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-structure
+ *
+ * Length limit: 6000 characters
+ */
+export interface APIEmbed {
+ /**
+ * Title of embed
+ *
+ * Length limit: 256 characters
+ */
+ title?: string;
+ /**
+ * Type of embed (always "rich" for webhook embeds)
+ *
+ * @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-types
+ */
+ type?: EmbedType;
+ /**
+ * Description of embed
+ *
+ * Length limit: 4096 characters
+ */
+ description?: string;
+ /**
+ * URL of embed
+ */
+ url?: string;
+ /**
+ * Timestamp of embed content
+ */
+ timestamp?: string;
+ /**
+ * Color code of the embed
+ */
+ color?: number;
+ /**
+ * Footer information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure
+ */
+ footer?: APIEmbedFooter;
+ /**
+ * Image information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure
+ */
+ image?: APIEmbedImage;
+ /**
+ * Thumbnail information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure
+ */
+ thumbnail?: APIEmbedThumbnail;
+ /**
+ * Video information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure
+ */
+ video?: APIEmbedVideo;
+ /**
+ * Provider information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure
+ */
+ provider?: APIEmbedProvider;
+ /**
+ * Author information
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure
+ */
+ author?: APIEmbedAuthor;
+ /**
+ * Fields information
+ *
+ * Length limit: 25 field objects
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure
+ */
+ fields?: APIEmbedField[];
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-types
+ *
+ * @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
+ */
+export declare enum EmbedType {
+ /**
+ * Generic embed rendered from embed attributes
+ */
+ Rich = "rich",
+ /**
+ * Image embed
+ */
+ Image = "image",
+ /**
+ * Video embed
+ */
+ Video = "video",
+ /**
+ * Animated gif image embed rendered as a video embed
+ */
+ GIFV = "gifv",
+ /**
+ * Article embed
+ */
+ Article = "article",
+ /**
+ * Link embed
+ */
+ Link = "link",
+ /**
+ * Auto moderation alert embed
+ *
+ * @unstable This embed type is currently not documented by Discord, but it is returned in the auto moderation system messages.
+ */
+ AutoModerationMessage = "auto_moderation_message"
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure
+ */
+export interface APIEmbedThumbnail {
+ /**
+ * Source url of thumbnail (only supports http(s) and attachments)
+ */
+ url: string;
+ /**
+ * A proxied url of the thumbnail
+ */
+ proxy_url?: string;
+ /**
+ * Height of thumbnail
+ */
+ height?: number;
+ /**
+ * Width of thumbnail
+ */
+ width?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure
+ */
+export interface APIEmbedVideo {
+ /**
+ * Source url of video
+ */
+ url?: string;
+ /**
+ * A proxied url of the video
+ */
+ proxy_url?: string;
+ /**
+ * Height of video
+ */
+ height?: number;
+ /**
+ * Width of video
+ */
+ width?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure
+ */
+export interface APIEmbedImage {
+ /**
+ * Source url of image (only supports http(s) and attachments)
+ */
+ url: string;
+ /**
+ * A proxied url of the image
+ */
+ proxy_url?: string;
+ /**
+ * Height of image
+ */
+ height?: number;
+ /**
+ * Width of image
+ */
+ width?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure
+ */
+export interface APIEmbedProvider {
+ /**
+ * Name of provider
+ */
+ name?: string;
+ /**
+ * URL of provider
+ */
+ url?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure
+ */
+export interface APIEmbedAuthor {
+ /**
+ * Name of author
+ *
+ * Length limit: 256 characters
+ */
+ name: string;
+ /**
+ * URL of author
+ */
+ url?: string;
+ /**
+ * URL of author icon (only supports http(s) and attachments)
+ */
+ icon_url?: string;
+ /**
+ * A proxied url of author icon
+ */
+ proxy_icon_url?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure
+ */
+export interface APIEmbedFooter {
+ /**
+ * Footer text
+ *
+ * Length limit: 2048 characters
+ */
+ text: string;
+ /**
+ * URL of footer icon (only supports http(s) and attachments)
+ */
+ icon_url?: string;
+ /**
+ * A proxied url of footer icon
+ */
+ proxy_icon_url?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure
+ */
+export interface APIEmbedField {
+ /**
+ * Name of the field
+ *
+ * Length limit: 256 characters
+ */
+ name: string;
+ /**
+ * Value of the field
+ *
+ * Length limit: 1024 characters
+ */
+ value: string;
+ /**
+ * Whether or not this field should display inline
+ */
+ inline?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure
+ */
+export interface APIAttachment {
+ /**
+ * Attachment id
+ */
+ id: Snowflake;
+ /**
+ * Name of file attached
+ */
+ filename: string;
+ /**
+ * Description for the file
+ */
+ description?: string;
+ /**
+ * The attachment's media type
+ *
+ * See https://en.wikipedia.org/wiki/Media_type
+ */
+ content_type?: string;
+ /**
+ * Size of file in bytes
+ */
+ size: number;
+ /**
+ * Source url of file
+ */
+ url: string;
+ /**
+ * A proxied url of file
+ */
+ proxy_url: string;
+ /**
+ * Height of file (if image)
+ */
+ height?: number | null;
+ /**
+ * Width of file (if image)
+ */
+ width?: number | null;
+ /**
+ * Whether this attachment is ephemeral
+ */
+ ephemeral?: boolean;
+ /**
+ * The duration of the audio file (currently for voice messages)
+ */
+ duration_secs?: number;
+ /**
+ * Base64 encoded bytearray representing a sampled waveform (currently for voice messages)
+ */
+ waveform?: string;
+ /**
+ * Attachment flags combined as a bitfield
+ */
+ flags?: AttachmentFlags;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags
+ */
+export declare enum AttachmentFlags {
+ /**
+ * This attachment has been edited using the remix feature on mobile
+ */
+ IsRemix = 4
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-mention-object-channel-mention-structure
+ */
+export interface APIChannelMention {
+ /**
+ * ID of the channel
+ */
+ id: Snowflake;
+ /**
+ * ID of the guild containing the channel
+ */
+ guild_id: Snowflake;
+ /**
+ * The type of channel
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object-channel-types
+ */
+ type: ChannelType;
+ /**
+ * The name of the channel
+ */
+ name: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types
+ */
+export declare enum AllowedMentionsTypes {
+ /**
+ * Controls @everyone and @here mentions
+ */
+ Everyone = "everyone",
+ /**
+ * Controls role mentions
+ */
+ Role = "roles",
+ /**
+ * Controls user mentions
+ */
+ User = "users"
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mentions-structure
+ */
+export interface APIAllowedMentions {
+ /**
+ * An array of allowed mention types to parse from the content
+ *
+ * See https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types
+ */
+ parse?: AllowedMentionsTypes[];
+ /**
+ * Array of role_ids to mention (Max size of 100)
+ */
+ roles?: Snowflake[];
+ /**
+ * Array of user_ids to mention (Max size of 100)
+ */
+ users?: Snowflake[];
+ /**
+ * For replies, whether to mention the author of the message being replied to (default false)
+ *
+ * @default false
+ */
+ replied_user?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#component-object
+ */
+export interface APIBaseComponent<T extends ComponentType> {
+ /**
+ * The type of the component
+ */
+ type: T;
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#component-object-component-types
+ */
+export declare enum ComponentType {
+ /**
+ * Action Row component
+ */
+ ActionRow = 1,
+ /**
+ * Button component
+ */
+ Button = 2,
+ /**
+ * Select menu for picking from defined text options
+ */
+ StringSelect = 3,
+ /**
+ * Text Input component
+ */
+ TextInput = 4,
+ /**
+ * Select menu for users
+ */
+ UserSelect = 5,
+ /**
+ * Select menu for roles
+ */
+ RoleSelect = 6,
+ /**
+ * Select menu for users and roles
+ */
+ MentionableSelect = 7,
+ /**
+ * Select menu for channels
+ */
+ ChannelSelect = 8,
+ /**
+ * Select menu for picking from defined text options
+ *
+ * @deprecated This is the old name for {@apilink ComponentType#StringSelect}
+ */
+ SelectMenu = 3
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#action-rows
+ */
+export interface APIActionRowComponent<T extends APIActionRowComponentTypes> extends APIBaseComponent<ComponentType.ActionRow> {
+ /**
+ * The components in the ActionRow
+ */
+ components: T[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#buttons
+ */
+export interface APIButtonComponentBase<Style extends ButtonStyle> extends APIBaseComponent<ComponentType.Button> {
+ /**
+ * The label to be displayed on the button
+ */
+ label?: string;
+ /**
+ * The style of the button
+ */
+ style: Style;
+ /**
+ * The emoji to display to the left of the text
+ */
+ emoji?: APIMessageComponentEmoji;
+ /**
+ * The status of the button
+ */
+ disabled?: boolean;
+}
+export interface APIMessageComponentEmoji {
+ /**
+ * Emoji id
+ */
+ id?: Snowflake;
+ /**
+ * Emoji name
+ */
+ name?: string;
+ /**
+ * Whether this emoji is animated
+ */
+ animated?: boolean;
+}
+export interface APIButtonComponentWithCustomId extends APIButtonComponentBase<ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success | ButtonStyle.Danger> {
+ /**
+ * The custom_id to be sent in the interaction when clicked
+ */
+ custom_id: string;
+}
+export interface APIButtonComponentWithURL extends APIButtonComponentBase<ButtonStyle.Link> {
+ /**
+ * The URL to direct users to when clicked for Link buttons
+ */
+ url: string;
+}
+export type APIButtonComponent = APIButtonComponentWithCustomId | APIButtonComponentWithURL;
+/**
+ * https://discord.com/developers/docs/interactions/message-components#button-object-button-styles
+ */
+export declare enum ButtonStyle {
+ Primary = 1,
+ Secondary = 2,
+ Success = 3,
+ Danger = 4,
+ Link = 5
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-styles
+ */
+export declare enum TextInputStyle {
+ Short = 1,
+ Paragraph = 2
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menus
+ */
+export interface APIBaseSelectMenuComponent<T extends ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect> extends APIBaseComponent<T> {
+ /**
+ * A developer-defined identifier for the select menu, max 100 characters
+ */
+ custom_id: string;
+ /**
+ * Custom placeholder text if nothing is selected, max 150 characters
+ */
+ placeholder?: string;
+ /**
+ * The minimum number of items that must be chosen; min 0, max 25
+ *
+ * @default 1
+ */
+ min_values?: number;
+ /**
+ * The maximum number of items that can be chosen; max 25
+ *
+ * @default 1
+ */
+ max_values?: number;
+ /**
+ * Disable the select
+ *
+ * @default false
+ */
+ disabled?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menus
+ */
+export interface APIStringSelectComponent extends APIBaseSelectMenuComponent<ComponentType.StringSelect> {
+ /**
+ * Specified choices in a select menu; max 25
+ */
+ options: APISelectMenuOption[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menus
+ */
+export type APIUserSelectComponent = APIBaseSelectMenuComponent<ComponentType.UserSelect>;
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menus
+ */
+export type APIRoleSelectComponent = APIBaseSelectMenuComponent<ComponentType.RoleSelect>;
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menus
+ */
+export type APIMentionableSelectComponent = APIBaseSelectMenuComponent<ComponentType.MentionableSelect>;
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menus
+ */
+export interface APIChannelSelectComponent extends APIBaseSelectMenuComponent<ComponentType.ChannelSelect> {
+ /**
+ * List of channel types to include in the ChannelSelect component
+ */
+ channel_types?: ChannelType[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menus
+ */
+export type APISelectMenuComponent = APIStringSelectComponent | APIUserSelectComponent | APIRoleSelectComponent | APIMentionableSelectComponent | APIChannelSelectComponent;
+/**
+ * https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-option-structure
+ */
+export interface APISelectMenuOption {
+ /**
+ * The user-facing name of the option (max 25 chars)
+ */
+ label: string;
+ /**
+ * The dev-defined value of the option (max 100 chars)
+ */
+ value: string;
+ /**
+ * An additional description of the option (max 50 chars)
+ */
+ description?: string;
+ /**
+ * The emoji to display to the left of the option
+ */
+ emoji?: APIMessageComponentEmoji;
+ /**
+ * Whether this option should be already-selected by default
+ */
+ default?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-structure
+ */
+export interface APITextInputComponent extends APIBaseComponent<ComponentType.TextInput> {
+ /**
+ * One of text input styles
+ */
+ style: TextInputStyle;
+ /**
+ * The custom id for the text input
+ */
+ custom_id: string;
+ /**
+ * Text that appears on top of the text input field, max 45 characters
+ */
+ label: string;
+ /**
+ * Placeholder for the text input
+ */
+ placeholder?: string;
+ /**
+ * The pre-filled text in the text input
+ */
+ value?: string;
+ /**
+ * Minimal length of text input
+ */
+ min_length?: number;
+ /**
+ * Maximal length of text input
+ */
+ max_length?: number;
+ /**
+ * Whether or not this text input is required or not
+ */
+ required?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object-channel-flags
+ */
+export declare enum ChannelFlags {
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ GuildFeedRemoved = 1,
+ /**
+ * This thread is pinned to the top of its parent forum channel
+ */
+ Pinned = 2,
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ActiveChannelsRemoved = 4,
+ /**
+ * Whether a tag is required to be specified when creating a thread in a forum channel.
+ * Tags are specified in the `applied_tags` field
+ */
+ RequireTag = 16,
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ IsSpam = 32,
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ IsGuildResourceChannel = 128,
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ClydeAI = 256,
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ IsScheduledForDeletion = 512
+}
+/**
+ * https://discord.com/developers/docs/interactions/message-components#message-components
+ */
+export type APIMessageComponent = APIMessageActionRowComponent | APIActionRowComponent<APIMessageActionRowComponent>;
+export type APIModalComponent = APIModalActionRowComponent | APIActionRowComponent<APIModalActionRowComponent>;
+export type APIActionRowComponentTypes = APIMessageActionRowComponent | APIModalActionRowComponent;
+/**
+ * https://discord.com/developers/docs/interactions/message-components#message-components
+ */
+export type APIMessageActionRowComponent = APIButtonComponent | APISelectMenuComponent;
+export type APIModalActionRowComponent = APITextInputComponent;
+//# sourceMappingURL=channel.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/channel.d.ts.map b/node_modules/discord-api-types/payloads/v9/channel.d.ts.map
new file mode 100644
index 0000000..457b2ab
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/channel.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;;;OAIG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,WAAW,CAAE,SAAQ,iBAAiB;IAC/E,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,CAAC,EAAE,YAAY,CAA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H,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,oBAAY,YAAY;IACvB;;OAEG;IACH,gBAAgB,IAAS;IACzB;;OAEG;IACH,MAAM,IAAS;IACf;;OAEG;IACH,qBAAqB,IAAS;IAC9B;;;OAGG;IACH,UAAU,KAAS;IACnB;;OAEG;IACH,MAAM,KAAS;IACf;;OAEG;IACH,sBAAsB,MAAS;IAC/B;;OAEG;IACH,OAAO,MAAS;IAChB;;OAEG;IACH,sBAAsB,MAAS;CAC/B;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,4BAA4B,GAAG,qBAAqB,CAAC,4BAA4B,CAAC,CAAC;AACrH,MAAM,MAAM,iBAAiB,GAAG,0BAA0B,GAAG,qBAAqB,CAAC,0BAA0B,CAAC,CAAC;AAE/G,MAAM,MAAM,0BAA0B,GAAG,4BAA4B,GAAG,0BAA0B,CAAC;AAEnG;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,kBAAkB,GAAG,sBAAsB,CAAC;AAGvF,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/channel.js b/node_modules/discord-api-types/payloads/v9/channel.js
new file mode 100644
index 0000000..4c513a5
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/channel.js
@@ -0,0 +1,445 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/channel
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ChannelFlags = exports.TextInputStyle = exports.ButtonStyle = exports.ComponentType = exports.AllowedMentionsTypes = exports.AttachmentFlags = exports.EmbedType = exports.ThreadMemberFlags = exports.ThreadAutoArchiveDuration = exports.OverwriteType = exports.MessageFlags = exports.MessageActivityType = exports.MessageType = exports.VideoQualityMode = exports.ChannelType = exports.ForumLayoutType = exports.SortOrderType = void 0;
+/**
+ * https://discord.com/developers/docs/resources/channel/#channel-object-sort-order-types
+ */
+var SortOrderType;
+(function (SortOrderType) {
+ /**
+ * Sort forum posts by activity
+ */
+ SortOrderType[SortOrderType["LatestActivity"] = 0] = "LatestActivity";
+ /**
+ * Sort forum posts by creation time (from most recent to oldest)
+ */
+ SortOrderType[SortOrderType["CreationDate"] = 1] = "CreationDate";
+})(SortOrderType = exports.SortOrderType || (exports.SortOrderType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel/#channel-object-forum-layout-types
+ */
+var ForumLayoutType;
+(function (ForumLayoutType) {
+ /**
+ * No default has been set for forum channel
+ */
+ ForumLayoutType[ForumLayoutType["NotSet"] = 0] = "NotSet";
+ /**
+ * Display posts as a list
+ */
+ ForumLayoutType[ForumLayoutType["ListView"] = 1] = "ListView";
+ /**
+ * Display posts as a collection of tiles
+ */
+ ForumLayoutType[ForumLayoutType["GalleryView"] = 2] = "GalleryView";
+})(ForumLayoutType = exports.ForumLayoutType || (exports.ForumLayoutType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object-channel-types
+ */
+var ChannelType;
+(function (ChannelType) {
+ /**
+ * A text channel within a guild
+ */
+ ChannelType[ChannelType["GuildText"] = 0] = "GuildText";
+ /**
+ * A direct message between users
+ */
+ ChannelType[ChannelType["DM"] = 1] = "DM";
+ /**
+ * A voice channel within a guild
+ */
+ ChannelType[ChannelType["GuildVoice"] = 2] = "GuildVoice";
+ /**
+ * A direct message between multiple users
+ */
+ ChannelType[ChannelType["GroupDM"] = 3] = "GroupDM";
+ /**
+ * An organizational category that contains up to 50 channels
+ *
+ * See https://support.discord.com/hc/articles/115001580171
+ */
+ ChannelType[ChannelType["GuildCategory"] = 4] = "GuildCategory";
+ /**
+ * A channel that users can follow and crosspost into their own guild
+ *
+ * See https://support.discord.com/hc/articles/360032008192
+ */
+ ChannelType[ChannelType["GuildAnnouncement"] = 5] = "GuildAnnouncement";
+ /**
+ * A temporary sub-channel within a Guild Announcement channel
+ */
+ ChannelType[ChannelType["AnnouncementThread"] = 10] = "AnnouncementThread";
+ /**
+ * A temporary sub-channel within a Guild Text or Guild Forum channel
+ */
+ ChannelType[ChannelType["PublicThread"] = 11] = "PublicThread";
+ /**
+ * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission
+ */
+ ChannelType[ChannelType["PrivateThread"] = 12] = "PrivateThread";
+ /**
+ * A voice channel for hosting events with an audience
+ *
+ * See https://support.discord.com/hc/articles/1500005513722
+ */
+ ChannelType[ChannelType["GuildStageVoice"] = 13] = "GuildStageVoice";
+ /**
+ * The channel in a Student Hub containing the listed servers
+ *
+ * See https://support.discord.com/hc/articles/4406046651927
+ */
+ ChannelType[ChannelType["GuildDirectory"] = 14] = "GuildDirectory";
+ /**
+ * A channel that can only contain threads
+ */
+ ChannelType[ChannelType["GuildForum"] = 15] = "GuildForum";
+ // EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS
+ /**
+ * A channel that users can follow and crosspost into their own guild
+ *
+ * @deprecated This is the old name for {@apilink ChannelType#GuildAnnouncement}
+ *
+ * See https://support.discord.com/hc/articles/360032008192
+ */
+ ChannelType[ChannelType["GuildNews"] = 5] = "GuildNews";
+ /**
+ * A temporary sub-channel within a Guild Announcement channel
+ *
+ * @deprecated This is the old name for {@apilink ChannelType#AnnouncementThread}
+ */
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
+ ChannelType[ChannelType["GuildNewsThread"] = 10] = "GuildNewsThread";
+ /**
+ * A temporary sub-channel within a Guild Text channel
+ *
+ * @deprecated This is the old name for {@apilink ChannelType#PublicThread}
+ */
+ ChannelType[ChannelType["GuildPublicThread"] = 11] = "GuildPublicThread";
+ /**
+ * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission
+ *
+ * @deprecated This is the old name for {@apilink ChannelType#PrivateThread}
+ */
+ ChannelType[ChannelType["GuildPrivateThread"] = 12] = "GuildPrivateThread";
+})(ChannelType = exports.ChannelType || (exports.ChannelType = {}));
+var VideoQualityMode;
+(function (VideoQualityMode) {
+ /**
+ * Discord chooses the quality for optimal performance
+ */
+ VideoQualityMode[VideoQualityMode["Auto"] = 1] = "Auto";
+ /**
+ * 720p
+ */
+ VideoQualityMode[VideoQualityMode["Full"] = 2] = "Full";
+})(VideoQualityMode = exports.VideoQualityMode || (exports.VideoQualityMode = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-types
+ */
+var MessageType;
+(function (MessageType) {
+ MessageType[MessageType["Default"] = 0] = "Default";
+ MessageType[MessageType["RecipientAdd"] = 1] = "RecipientAdd";
+ MessageType[MessageType["RecipientRemove"] = 2] = "RecipientRemove";
+ MessageType[MessageType["Call"] = 3] = "Call";
+ MessageType[MessageType["ChannelNameChange"] = 4] = "ChannelNameChange";
+ MessageType[MessageType["ChannelIconChange"] = 5] = "ChannelIconChange";
+ MessageType[MessageType["ChannelPinnedMessage"] = 6] = "ChannelPinnedMessage";
+ MessageType[MessageType["UserJoin"] = 7] = "UserJoin";
+ MessageType[MessageType["GuildBoost"] = 8] = "GuildBoost";
+ MessageType[MessageType["GuildBoostTier1"] = 9] = "GuildBoostTier1";
+ MessageType[MessageType["GuildBoostTier2"] = 10] = "GuildBoostTier2";
+ MessageType[MessageType["GuildBoostTier3"] = 11] = "GuildBoostTier3";
+ MessageType[MessageType["ChannelFollowAdd"] = 12] = "ChannelFollowAdd";
+ MessageType[MessageType["GuildDiscoveryDisqualified"] = 14] = "GuildDiscoveryDisqualified";
+ MessageType[MessageType["GuildDiscoveryRequalified"] = 15] = "GuildDiscoveryRequalified";
+ MessageType[MessageType["GuildDiscoveryGracePeriodInitialWarning"] = 16] = "GuildDiscoveryGracePeriodInitialWarning";
+ MessageType[MessageType["GuildDiscoveryGracePeriodFinalWarning"] = 17] = "GuildDiscoveryGracePeriodFinalWarning";
+ MessageType[MessageType["ThreadCreated"] = 18] = "ThreadCreated";
+ MessageType[MessageType["Reply"] = 19] = "Reply";
+ MessageType[MessageType["ChatInputCommand"] = 20] = "ChatInputCommand";
+ MessageType[MessageType["ThreadStarterMessage"] = 21] = "ThreadStarterMessage";
+ MessageType[MessageType["GuildInviteReminder"] = 22] = "GuildInviteReminder";
+ MessageType[MessageType["ContextMenuCommand"] = 23] = "ContextMenuCommand";
+ MessageType[MessageType["AutoModerationAction"] = 24] = "AutoModerationAction";
+ MessageType[MessageType["RoleSubscriptionPurchase"] = 25] = "RoleSubscriptionPurchase";
+ MessageType[MessageType["InteractionPremiumUpsell"] = 26] = "InteractionPremiumUpsell";
+ MessageType[MessageType["StageStart"] = 27] = "StageStart";
+ MessageType[MessageType["StageEnd"] = 28] = "StageEnd";
+ MessageType[MessageType["StageSpeaker"] = 29] = "StageSpeaker";
+ /**
+ * @unstable https://github.com/discord/discord-api-docs/pull/5927#discussion_r1107678548
+ */
+ MessageType[MessageType["StageRaiseHand"] = 30] = "StageRaiseHand";
+ MessageType[MessageType["StageTopic"] = 31] = "StageTopic";
+ MessageType[MessageType["GuildApplicationPremiumSubscription"] = 32] = "GuildApplicationPremiumSubscription";
+})(MessageType = exports.MessageType || (exports.MessageType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
+ */
+var MessageActivityType;
+(function (MessageActivityType) {
+ MessageActivityType[MessageActivityType["Join"] = 1] = "Join";
+ MessageActivityType[MessageActivityType["Spectate"] = 2] = "Spectate";
+ MessageActivityType[MessageActivityType["Listen"] = 3] = "Listen";
+ MessageActivityType[MessageActivityType["JoinRequest"] = 5] = "JoinRequest";
+})(MessageActivityType = exports.MessageActivityType || (exports.MessageActivityType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-flags
+ */
+var MessageFlags;
+(function (MessageFlags) {
+ /**
+ * This message has been published to subscribed channels (via Channel Following)
+ */
+ MessageFlags[MessageFlags["Crossposted"] = 1] = "Crossposted";
+ /**
+ * This message originated from a message in another channel (via Channel Following)
+ */
+ MessageFlags[MessageFlags["IsCrosspost"] = 2] = "IsCrosspost";
+ /**
+ * Do not include any embeds when serializing this message
+ */
+ MessageFlags[MessageFlags["SuppressEmbeds"] = 4] = "SuppressEmbeds";
+ /**
+ * The source message for this crosspost has been deleted (via Channel Following)
+ */
+ MessageFlags[MessageFlags["SourceMessageDeleted"] = 8] = "SourceMessageDeleted";
+ /**
+ * This message came from the urgent message system
+ */
+ MessageFlags[MessageFlags["Urgent"] = 16] = "Urgent";
+ /**
+ * This message has an associated thread, which shares its id
+ */
+ MessageFlags[MessageFlags["HasThread"] = 32] = "HasThread";
+ /**
+ * This message is only visible to the user who invoked the Interaction
+ */
+ MessageFlags[MessageFlags["Ephemeral"] = 64] = "Ephemeral";
+ /**
+ * This message is an Interaction Response and the bot is "thinking"
+ */
+ MessageFlags[MessageFlags["Loading"] = 128] = "Loading";
+ /**
+ * This message failed to mention some roles and add their members to the thread
+ */
+ MessageFlags[MessageFlags["FailedToMentionSomeRolesInThread"] = 256] = "FailedToMentionSomeRolesInThread";
+ /**
+ * @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ MessageFlags[MessageFlags["ShouldShowLinkNotDiscordWarning"] = 1024] = "ShouldShowLinkNotDiscordWarning";
+ /**
+ * This message will not trigger push and desktop notifications
+ */
+ MessageFlags[MessageFlags["SuppressNotifications"] = 4096] = "SuppressNotifications";
+ /**
+ * This message is a voice message
+ */
+ MessageFlags[MessageFlags["IsVoiceMessage"] = 8192] = "IsVoiceMessage";
+})(MessageFlags = exports.MessageFlags || (exports.MessageFlags = {}));
+var OverwriteType;
+(function (OverwriteType) {
+ OverwriteType[OverwriteType["Role"] = 0] = "Role";
+ OverwriteType[OverwriteType["Member"] = 1] = "Member";
+})(OverwriteType = exports.OverwriteType || (exports.OverwriteType = {}));
+var ThreadAutoArchiveDuration;
+(function (ThreadAutoArchiveDuration) {
+ ThreadAutoArchiveDuration[ThreadAutoArchiveDuration["OneHour"] = 60] = "OneHour";
+ ThreadAutoArchiveDuration[ThreadAutoArchiveDuration["OneDay"] = 1440] = "OneDay";
+ ThreadAutoArchiveDuration[ThreadAutoArchiveDuration["ThreeDays"] = 4320] = "ThreeDays";
+ ThreadAutoArchiveDuration[ThreadAutoArchiveDuration["OneWeek"] = 10080] = "OneWeek";
+})(ThreadAutoArchiveDuration = exports.ThreadAutoArchiveDuration || (exports.ThreadAutoArchiveDuration = {}));
+var ThreadMemberFlags;
+(function (ThreadMemberFlags) {
+ /**
+ * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ThreadMemberFlags[ThreadMemberFlags["HasInteracted"] = 1] = "HasInteracted";
+ /**
+ * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ThreadMemberFlags[ThreadMemberFlags["AllMessages"] = 2] = "AllMessages";
+ /**
+ * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ThreadMemberFlags[ThreadMemberFlags["OnlyMentions"] = 4] = "OnlyMentions";
+ /**
+ * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ThreadMemberFlags[ThreadMemberFlags["NoMessages"] = 8] = "NoMessages";
+})(ThreadMemberFlags = exports.ThreadMemberFlags || (exports.ThreadMemberFlags = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#embed-object-embed-types
+ *
+ * @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
+ */
+var EmbedType;
+(function (EmbedType) {
+ /**
+ * Generic embed rendered from embed attributes
+ */
+ EmbedType["Rich"] = "rich";
+ /**
+ * Image embed
+ */
+ EmbedType["Image"] = "image";
+ /**
+ * Video embed
+ */
+ EmbedType["Video"] = "video";
+ /**
+ * Animated gif image embed rendered as a video embed
+ */
+ EmbedType["GIFV"] = "gifv";
+ /**
+ * Article embed
+ */
+ EmbedType["Article"] = "article";
+ /**
+ * Link embed
+ */
+ EmbedType["Link"] = "link";
+ /**
+ * Auto moderation alert embed
+ *
+ * @unstable This embed type is currently not documented by Discord, but it is returned in the auto moderation system messages.
+ */
+ EmbedType["AutoModerationMessage"] = "auto_moderation_message";
+})(EmbedType = exports.EmbedType || (exports.EmbedType = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags
+ */
+var AttachmentFlags;
+(function (AttachmentFlags) {
+ /**
+ * This attachment has been edited using the remix feature on mobile
+ */
+ AttachmentFlags[AttachmentFlags["IsRemix"] = 4] = "IsRemix";
+})(AttachmentFlags = exports.AttachmentFlags || (exports.AttachmentFlags = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types
+ */
+var AllowedMentionsTypes;
+(function (AllowedMentionsTypes) {
+ /**
+ * Controls @everyone and @here mentions
+ */
+ AllowedMentionsTypes["Everyone"] = "everyone";
+ /**
+ * Controls role mentions
+ */
+ AllowedMentionsTypes["Role"] = "roles";
+ /**
+ * Controls user mentions
+ */
+ AllowedMentionsTypes["User"] = "users";
+})(AllowedMentionsTypes = exports.AllowedMentionsTypes || (exports.AllowedMentionsTypes = {}));
+/**
+ * https://discord.com/developers/docs/interactions/message-components#component-object-component-types
+ */
+var ComponentType;
+(function (ComponentType) {
+ /**
+ * Action Row component
+ */
+ ComponentType[ComponentType["ActionRow"] = 1] = "ActionRow";
+ /**
+ * Button component
+ */
+ ComponentType[ComponentType["Button"] = 2] = "Button";
+ /**
+ * Select menu for picking from defined text options
+ */
+ ComponentType[ComponentType["StringSelect"] = 3] = "StringSelect";
+ /**
+ * Text Input component
+ */
+ ComponentType[ComponentType["TextInput"] = 4] = "TextInput";
+ /**
+ * Select menu for users
+ */
+ ComponentType[ComponentType["UserSelect"] = 5] = "UserSelect";
+ /**
+ * Select menu for roles
+ */
+ ComponentType[ComponentType["RoleSelect"] = 6] = "RoleSelect";
+ /**
+ * Select menu for users and roles
+ */
+ ComponentType[ComponentType["MentionableSelect"] = 7] = "MentionableSelect";
+ /**
+ * Select menu for channels
+ */
+ ComponentType[ComponentType["ChannelSelect"] = 8] = "ChannelSelect";
+ // EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
+ /**
+ * Select menu for picking from defined text options
+ *
+ * @deprecated This is the old name for {@apilink ComponentType#StringSelect}
+ */
+ ComponentType[ComponentType["SelectMenu"] = 3] = "SelectMenu";
+})(ComponentType = exports.ComponentType || (exports.ComponentType = {}));
+/**
+ * https://discord.com/developers/docs/interactions/message-components#button-object-button-styles
+ */
+var ButtonStyle;
+(function (ButtonStyle) {
+ ButtonStyle[ButtonStyle["Primary"] = 1] = "Primary";
+ ButtonStyle[ButtonStyle["Secondary"] = 2] = "Secondary";
+ ButtonStyle[ButtonStyle["Success"] = 3] = "Success";
+ ButtonStyle[ButtonStyle["Danger"] = 4] = "Danger";
+ ButtonStyle[ButtonStyle["Link"] = 5] = "Link";
+})(ButtonStyle = exports.ButtonStyle || (exports.ButtonStyle = {}));
+/**
+ * https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-styles
+ */
+var TextInputStyle;
+(function (TextInputStyle) {
+ TextInputStyle[TextInputStyle["Short"] = 1] = "Short";
+ TextInputStyle[TextInputStyle["Paragraph"] = 2] = "Paragraph";
+})(TextInputStyle = exports.TextInputStyle || (exports.TextInputStyle = {}));
+/**
+ * https://discord.com/developers/docs/resources/channel#channel-object-channel-flags
+ */
+var ChannelFlags;
+(function (ChannelFlags) {
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ChannelFlags[ChannelFlags["GuildFeedRemoved"] = 1] = "GuildFeedRemoved";
+ /**
+ * This thread is pinned to the top of its parent forum channel
+ */
+ ChannelFlags[ChannelFlags["Pinned"] = 2] = "Pinned";
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ChannelFlags[ChannelFlags["ActiveChannelsRemoved"] = 4] = "ActiveChannelsRemoved";
+ /**
+ * Whether a tag is required to be specified when creating a thread in a forum channel.
+ * Tags are specified in the `applied_tags` field
+ */
+ ChannelFlags[ChannelFlags["RequireTag"] = 16] = "RequireTag";
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ChannelFlags[ChannelFlags["IsSpam"] = 32] = "IsSpam";
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ChannelFlags[ChannelFlags["IsGuildResourceChannel"] = 128] = "IsGuildResourceChannel";
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ChannelFlags[ChannelFlags["ClydeAI"] = 256] = "ClydeAI";
+ /**
+ * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ ChannelFlags[ChannelFlags["IsScheduledForDeletion"] = 512] = "IsScheduledForDeletion";
+})(ChannelFlags = exports.ChannelFlags || (exports.ChannelFlags = {}));
+//# sourceMappingURL=channel.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/channel.js.map b/node_modules/discord-api-types/payloads/v9/channel.js.map
new file mode 100644
index 0000000..71cf03d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/channel.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAyRH;;GAEG;AACH,IAAY,aASX;AATD,WAAY,aAAa;IACxB;;OAEG;IACH,qEAAc,CAAA;IACd;;OAEG;IACH,iEAAY,CAAA;AACb,CAAC,EATW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QASxB;AAED;;GAEG;AACH,IAAY,eAaX;AAbD,WAAY,eAAe;IAC1B;;OAEG;IACH,yDAAM,CAAA;IACN;;OAEG;IACH,6DAAQ,CAAA;IACR;;OAEG;IACH,mEAAW,CAAA;AACZ,CAAC,EAbW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAa1B;AAmCD;;GAEG;AACH,IAAY,WAsFX;AAtFD,WAAY,WAAW;IACtB;;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AAA;IACjB;;OAEG;IACH,mEAAa,CAAA;IAEb,6EAA6E;IAE7E;;;;OAIG;IACH,6DAAc,CAAA;AACf,CAAC,EA1CW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QA0CxB;AAqED;;GAEG;AACH,IAAY,WAMX;AAND,WAAY,WAAW;IACtB,mDAAW,CAAA;IACX,uDAAS,CAAA;IACT,mDAAO,CAAA;IACP,iDAAM,CAAA;IACN,6CAAI,CAAA;AACL,CAAC,EANW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAMtB;AAED;;GAEG;AACH,IAAY,cAGX;AAHD,WAAY,cAAc;IACzB,qDAAS,CAAA;IACT,6DAAS,CAAA;AACV,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAsJD;;GAEG;AACH,IAAY,YAkCX;AAlCD,WAAY,YAAY;IACvB;;OAEG;IACH,uEAAyB,CAAA;IACzB;;OAEG;IACH,mDAAe,CAAA;IACf;;OAEG;IACH,iFAA8B,CAAA;IAC9B;;;OAGG;IACH,4DAAmB,CAAA;IACnB;;OAEG;IACH,oDAAe,CAAA;IACf;;OAEG;IACH,qFAA+B,CAAA;IAC/B;;OAEG;IACH,uDAAgB,CAAA;IAChB;;OAEG;IACH,qFAA+B,CAAA;AAChC,CAAC,EAlCW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAkCvB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/emoji.d.ts b/node_modules/discord-api-types/payloads/v9/emoji.d.ts
new file mode 100644
index 0000000..74c1522
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/emoji.d.ts
@@ -0,0 +1,49 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/emoji
+ */
+import type { Snowflake } from '../../globals';
+import type { APIRole } from './permissions';
+import type { APIUser } from './user';
+/**
+ * Not documented but mentioned
+ */
+export interface APIPartialEmoji {
+ /**
+ * Emoji id
+ */
+ id: Snowflake | null;
+ /**
+ * Emoji name (can be null only in reaction emoji objects)
+ */
+ name: string | null;
+ /**
+ * Whether this emoji is animated
+ */
+ animated?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure
+ */
+export interface APIEmoji extends APIPartialEmoji {
+ /**
+ * Roles this emoji is whitelisted to
+ */
+ roles?: APIRole['id'][];
+ /**
+ * User that created this emoji
+ */
+ user?: APIUser;
+ /**
+ * Whether this emoji must be wrapped in colons
+ */
+ require_colons?: boolean;
+ /**
+ * Whether this emoji is managed
+ */
+ managed?: boolean;
+ /**
+ * Whether this emoji can be used, may be false due to loss of Server Boosts
+ */
+ available?: boolean;
+}
+//# sourceMappingURL=emoji.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/emoji.d.ts.map b/node_modules/discord-api-types/payloads/v9/emoji.d.ts.map
new file mode 100644
index 0000000..c211400
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/emoji.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,EAAE,EAAE,SAAS,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,eAAe;IAChD;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/emoji.js b/node_modules/discord-api-types/payloads/v9/emoji.js
new file mode 100644
index 0000000..a640b7e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/emoji.js
@@ -0,0 +1,6 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/emoji
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=emoji.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/emoji.js.map b/node_modules/discord-api-types/payloads/v9/emoji.js.map
new file mode 100644
index 0000000..9037967
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/emoji.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"emoji.js","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":";AAAA;;GAEG"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/gateway.d.ts b/node_modules/discord-api-types/payloads/v9/gateway.d.ts
new file mode 100644
index 0000000..ab19c00
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/gateway.d.ts
@@ -0,0 +1,358 @@
+/**
+ * Types extracted from
+ * - https://discord.com/developers/docs/topics/gateway
+ * - https://discord.com/developers/docs/topics/gateway-events
+ */
+import type { Snowflake } from '../../globals';
+import type { APIChannel, APIThreadMember } from './channel';
+import type { APIEmoji } from './emoji';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/topics/gateway#get-gateway
+ */
+export interface APIGatewayInfo {
+ /**
+ * The WSS URL that can be used for connecting to the gateway
+ */
+ url: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#get-gateway-bot
+ */
+export interface APIGatewayBotInfo extends APIGatewayInfo {
+ /**
+ * The recommended number of shards to use when connecting
+ *
+ * See https://discord.com/developers/docs/topics/gateway#sharding
+ */
+ shards: number;
+ /**
+ * Information on the current session start limit
+ *
+ * See https://discord.com/developers/docs/topics/gateway#session-start-limit-object
+ */
+ session_start_limit: APIGatewaySessionStartLimit;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway#session-start-limit-object
+ */
+export interface APIGatewaySessionStartLimit {
+ /**
+ * The total number of session starts the current user is allowed
+ */
+ total: number;
+ /**
+ * The remaining number of session starts the current user is allowed
+ */
+ remaining: number;
+ /**
+ * The number of milliseconds after which the limit resets
+ */
+ reset_after: number;
+ /**
+ * The number of identify requests allowed per 5 seconds
+ */
+ max_concurrency: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields
+ */
+export interface GatewayPresenceUpdate {
+ /**
+ * The user presence is being updated for
+ *
+ * **The user object within this event can be partial, the only field which must be sent is the `id` field,
+ * everything else is optional.**
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user: Partial<APIUser> & Pick<APIUser, 'id'>;
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * Either "idle", "dnd", "online", or "offline"
+ */
+ status?: PresenceUpdateStatus;
+ /**
+ * User's current activities
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#activity-object
+ */
+ activities?: GatewayActivity[];
+ /**
+ * User's platform-dependent status
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#client-status-object
+ */
+ client_status?: GatewayPresenceClientStatus;
+}
+export declare enum PresenceUpdateStatus {
+ Online = "online",
+ DoNotDisturb = "dnd",
+ Idle = "idle",
+ /**
+ * Invisible and shown as offline
+ */
+ Invisible = "invisible",
+ Offline = "offline"
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#client-status-object
+ */
+export interface GatewayPresenceClientStatus {
+ /**
+ * The user's status set for an active desktop (Windows, Linux, Mac) application session
+ */
+ desktop?: PresenceUpdateStatus;
+ /**
+ * The user's status set for an active mobile (iOS, Android) application session
+ */
+ mobile?: PresenceUpdateStatus;
+ /**
+ * The user's status set for an active web (browser, bot account) application session
+ */
+ web?: PresenceUpdateStatus;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure
+ */
+export interface GatewayActivity {
+ /**
+ * The activity's id
+ */
+ id: string;
+ /**
+ * The activity's name
+ */
+ name: string;
+ /**
+ * Activity type
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
+ */
+ type: ActivityType;
+ /**
+ * Stream url, is validated when type is `1`
+ */
+ url?: string | null;
+ /**
+ * Unix timestamp of when the activity was added to the user's session
+ */
+ created_at: number;
+ /**
+ * Unix timestamps for start and/or end of the game
+ */
+ timestamps?: GatewayActivityTimestamps;
+ sync_id?: string;
+ /**
+ * {@link ActivityPlatform}
+ */
+ platform?: string;
+ /**
+ * Application id for the game
+ */
+ application_id?: Snowflake;
+ /**
+ * What the player is currently doing
+ */
+ details?: string | null;
+ /**
+ * The user's current party status
+ */
+ state?: string | null;
+ /**
+ * The emoji used for a custom status
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji
+ */
+ emoji?: GatewayActivityEmoji;
+ session_id?: string;
+ /**
+ * Information for the current party of the player
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party
+ */
+ party?: GatewayActivityParty;
+ /**
+ * Images for the presence and their hover texts
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets
+ */
+ assets?: GatewayActivityAssets;
+ /**
+ * Secrets for Rich Presence joining and spectating
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets
+ */
+ secrets?: GatewayActivitySecrets;
+ /**
+ * Whether or not the activity is an instanced game session
+ */
+ instance?: boolean;
+ /**
+ * Activity flags `OR`d together, describes what the payload includes
+ *
+ * See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ flags?: ActivityFlags;
+ /**
+ * The custom buttons shown in the Rich Presence (max 2)
+ */
+ buttons?: string[] | GatewayActivityButton[];
+}
+/**
+ * @unstable This enum is currently not documented by Discord but has known values which we will try to keep up to date.
+ * Values might be added or removed without a major version bump.
+ */
+export declare enum ActivityPlatform {
+ Desktop = "desktop",
+ Xbox = "xbox",
+ Samsung = "samsung",
+ IOS = "ios",
+ Android = "android",
+ Embedded = "embedded",
+ PS4 = "ps4",
+ PS5 = "ps5"
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
+ */
+export declare enum ActivityType {
+ /**
+ * Playing {game}
+ */
+ Playing = 0,
+ /**
+ * Streaming {details}
+ */
+ Streaming = 1,
+ /**
+ * Listening to {name}
+ */
+ Listening = 2,
+ /**
+ * Watching {details}
+ */
+ Watching = 3,
+ /**
+ * {emoji} {details}
+ */
+ Custom = 4,
+ /**
+ * Competing in {name}
+ */
+ Competing = 5
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps
+ */
+export interface GatewayActivityTimestamps {
+ /**
+ * Unix time (in milliseconds) of when the activity started
+ */
+ start?: number;
+ /**
+ * Unix time (in milliseconds) of when the activity ends
+ */
+ end?: number;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji
+ */
+export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'id' | 'animated'>> & Pick<APIEmoji, 'name'>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party
+ */
+export interface GatewayActivityParty {
+ /**
+ * The id of the party
+ */
+ id?: string;
+ /**
+ * Used to show the party's current and maximum size
+ */
+ size?: [current_size: number, max_size: number];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets
+ */
+export type GatewayActivityAssets = Partial<Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets
+ */
+export type GatewayActivitySecrets = Partial<Record<'join' | 'spectate' | 'match', string>>;
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags
+ */
+export declare enum ActivityFlags {
+ Instance = 1,
+ Join = 2,
+ Spectate = 4,
+ JoinRequest = 8,
+ Sync = 16,
+ Play = 32,
+ PartyPrivacyFriends = 64,
+ PartyPrivacyVoiceChannel = 128,
+ Embedded = 256
+}
+export interface GatewayActivityButton {
+ /**
+ * The text shown on the button (1-32 characters)
+ */
+ label: string;
+ /**
+ * The url opened when clicking the button (1-512 characters)
+ */
+ url: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-list-sync-thread-list-sync-event-fields
+ */
+export interface GatewayThreadListSync {
+ /**
+ * ID of the guild
+ */
+ guild_id: Snowflake;
+ /**
+ * The ids of all the parent channels whose threads are being synced, otherwise the entire guild
+ */
+ channel_ids?: Snowflake[];
+ /**
+ * Array of the synced threads
+ */
+ threads: APIChannel[];
+ /**
+ * The member objects for the client user in each joined thread that was synced
+ */
+ members: APIThreadMember[];
+}
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#thread-members-update-thread-members-update-event-fields
+ */
+export interface GatewayThreadMembersUpdate {
+ /**
+ * The id of the thread for which members are being synced
+ */
+ id: Snowflake;
+ /**
+ * The id of the guild that the thread is in
+ */
+ guild_id: Snowflake;
+ /**
+ * The approximate member count of the thread, does not count above 50 even if there are more members
+ */
+ member_count: number;
+ /**
+ * The members that were added to the thread
+ */
+ added_members?: APIThreadMember[];
+ /**
+ * The ids of the members that were removed from the thread
+ */
+ removed_member_ids?: Snowflake[];
+}
+//# sourceMappingURL=gateway.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/gateway.d.ts.map b/node_modules/discord-api-types/payloads/v9/gateway.d.ts.map
new file mode 100644
index 0000000..44caa14
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/gateway.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"gateway.d.ts","sourceRoot":"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AS;IACb,IAAI,KAAS;IACb,mBAAmB,KAAS;IAC5B,wBAAwB,MAAS;IACjC,QAAQ,MAAS;CACjB;AAED,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC;IAC1B;;OAEG;IACH,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB;;OAEG;IACH,OAAO,EAAE,eAAe,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,eAAe,EAAE,CAAC;IAClC;;OAEG;IACH,kBAAkB,CAAC,EAAE,SAAS,EAAE,CAAC;CACjC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/gateway.js b/node_modules/discord-api-types/payloads/v9/gateway.js
new file mode 100644
index 0000000..8f1dbf4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/gateway.js
@@ -0,0 +1,80 @@
+"use strict";
+/**
+ * Types extracted from
+ * - https://discord.com/developers/docs/topics/gateway
+ * - https://discord.com/developers/docs/topics/gateway-events
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ActivityFlags = exports.ActivityType = exports.ActivityPlatform = exports.PresenceUpdateStatus = void 0;
+var PresenceUpdateStatus;
+(function (PresenceUpdateStatus) {
+ PresenceUpdateStatus["Online"] = "online";
+ PresenceUpdateStatus["DoNotDisturb"] = "dnd";
+ PresenceUpdateStatus["Idle"] = "idle";
+ /**
+ * Invisible and shown as offline
+ */
+ PresenceUpdateStatus["Invisible"] = "invisible";
+ PresenceUpdateStatus["Offline"] = "offline";
+})(PresenceUpdateStatus = exports.PresenceUpdateStatus || (exports.PresenceUpdateStatus = {}));
+/**
+ * @unstable This enum is currently not documented by Discord but has known values which we will try to keep up to date.
+ * Values might be added or removed without a major version bump.
+ */
+var ActivityPlatform;
+(function (ActivityPlatform) {
+ ActivityPlatform["Desktop"] = "desktop";
+ ActivityPlatform["Xbox"] = "xbox";
+ ActivityPlatform["Samsung"] = "samsung";
+ ActivityPlatform["IOS"] = "ios";
+ ActivityPlatform["Android"] = "android";
+ ActivityPlatform["Embedded"] = "embedded";
+ ActivityPlatform["PS4"] = "ps4";
+ ActivityPlatform["PS5"] = "ps5";
+})(ActivityPlatform = exports.ActivityPlatform || (exports.ActivityPlatform = {}));
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
+ */
+var ActivityType;
+(function (ActivityType) {
+ /**
+ * Playing {game}
+ */
+ ActivityType[ActivityType["Playing"] = 0] = "Playing";
+ /**
+ * Streaming {details}
+ */
+ ActivityType[ActivityType["Streaming"] = 1] = "Streaming";
+ /**
+ * Listening to {name}
+ */
+ ActivityType[ActivityType["Listening"] = 2] = "Listening";
+ /**
+ * Watching {details}
+ */
+ ActivityType[ActivityType["Watching"] = 3] = "Watching";
+ /**
+ * {emoji} {details}
+ */
+ ActivityType[ActivityType["Custom"] = 4] = "Custom";
+ /**
+ * Competing in {name}
+ */
+ ActivityType[ActivityType["Competing"] = 5] = "Competing";
+})(ActivityType = exports.ActivityType || (exports.ActivityType = {}));
+/**
+ * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags
+ */
+var ActivityFlags;
+(function (ActivityFlags) {
+ ActivityFlags[ActivityFlags["Instance"] = 1] = "Instance";
+ ActivityFlags[ActivityFlags["Join"] = 2] = "Join";
+ ActivityFlags[ActivityFlags["Spectate"] = 4] = "Spectate";
+ ActivityFlags[ActivityFlags["JoinRequest"] = 8] = "JoinRequest";
+ ActivityFlags[ActivityFlags["Sync"] = 16] = "Sync";
+ ActivityFlags[ActivityFlags["Play"] = 32] = "Play";
+ ActivityFlags[ActivityFlags["PartyPrivacyFriends"] = 64] = "PartyPrivacyFriends";
+ ActivityFlags[ActivityFlags["PartyPrivacyVoiceChannel"] = 128] = "PartyPrivacyVoiceChannel";
+ ActivityFlags[ActivityFlags["Embedded"] = 256] = "Embedded";
+})(ActivityFlags = exports.ActivityFlags || (exports.ActivityFlags = {}));
+//# sourceMappingURL=gateway.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/gateway.js.map b/node_modules/discord-api-types/payloads/v9/gateway.js.map
new file mode 100644
index 0000000..b4cd3e5
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/gateway.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"gateway.js","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AA4FH,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC/B,yCAAiB,CAAA;IACjB,4CAAoB,CAAA;IACpB,qCAAa,CAAA;IACb;;OAEG;IACH,+CAAuB,CAAA;IACvB,2CAAmB,CAAA;AACpB,CAAC,EATW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAS/B;AA8GD;;;GAGG;AACH,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC3B,uCAAmB,CAAA;IACnB,iCAAa,CAAA;IACb,uCAAmB,CAAA;IACnB,+BAAW,CAAA;IACX,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,+BAAW,CAAA;IACX,+BAAW,CAAA;AACZ,CAAC,EATW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAS3B;AAED;;GAEG;AACH,IAAY,YAyBX;AAzBD,WAAY,YAAY;IACvB;;OAEG;IACH,qDAAO,CAAA;IACP;;OAEG;IACH,yDAAS,CAAA;IACT;;OAEG;IACH,yDAAS,CAAA;IACT;;OAEG;IACH,uDAAQ,CAAA;IACR;;OAEG;IACH,mDAAM,CAAA;IACN;;OAEG;IACH,yDAAS,CAAA;AACV,CAAC,EAzBW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAyBvB;AA+CD;;GAEG;AACH,IAAY,aAUX;AAVD,WAAY,aAAa;IACxB,yDAAiB,CAAA;IACjB,iDAAa,CAAA;IACb,yDAAiB,CAAA;IACjB,+DAAoB,CAAA;IACpB,kDAAa,CAAA;IACb,kDAAa,CAAA;IACb,gFAA4B,CAAA;IAC5B,2FAAiC,CAAA;IACjC,2DAAiB,CAAA;AAClB,CAAC,EAVW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAUxB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/guild.d.ts b/node_modules/discord-api-types/payloads/v9/guild.d.ts
new file mode 100644
index 0000000..1846a5e
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/guild.d.ts
@@ -0,0 +1,1075 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/guild
+ */
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIEmoji, APIPartialEmoji } from './emoji';
+import type { PresenceUpdateStatus } from './gateway';
+import type { OAuth2Scopes } from './oauth2';
+import type { APIRole } from './permissions';
+import type { APISticker } from './sticker';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/resources/guild#unavailable-guild-object
+ */
+export interface APIUnavailableGuild {
+ /**
+ * Guild id
+ */
+ id: Snowflake;
+ /**
+ * `true` if this guild is unavailable due to an outage
+ */
+ unavailable: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
+ */
+export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'>, Pick<APIGuild, 'welcome_screen'> {
+ /**
+ * Guild name (2-100 characters, excluding trailing and leading whitespace)
+ */
+ name: string;
+ /**
+ * Icon hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ icon: string | null;
+ /**
+ * Splash hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ splash: string | null;
+ /**
+ * Banner hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ banner?: string | null;
+ /**
+ * The description for the guild
+ */
+ description?: string | null;
+ /**
+ * Enabled guild features
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ */
+ features?: GuildFeature[];
+ /**
+ * Verification level required for the guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ */
+ verification_level?: GuildVerificationLevel;
+ /**
+ * The vanity url code for the guild
+ */
+ vanity_url_code?: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
+ */
+export interface APIGuild extends APIPartialGuild {
+ /**
+ * Icon hash, returned when in the template object
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ icon_hash?: string | null;
+ /**
+ * Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ discovery_splash: string | null;
+ /**
+ * `true` if the user is the owner of the guild
+ *
+ * **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds**
+ */
+ owner?: boolean;
+ /**
+ * ID of owner
+ */
+ owner_id: Snowflake;
+ /**
+ * Total permissions for the user in the guild (excludes overrides)
+ *
+ * **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds**
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ permissions?: Permissions;
+ /**
+ * Voice region id for the guild
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-region-object
+ *
+ * @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
+ */
+ region: string;
+ /**
+ * ID of afk channel
+ */
+ afk_channel_id: Snowflake | null;
+ /**
+ * afk timeout in seconds, can be set to: `60`, `300`, `900`, `1800`, `3600`
+ */
+ afk_timeout: 60 | 300 | 900 | 1800 | 3600;
+ /**
+ * `true` if the guild widget is enabled
+ */
+ widget_enabled?: boolean;
+ /**
+ * The channel id that the widget will generate an invite to, or `null` if set to no invite
+ */
+ widget_channel_id?: Snowflake | null;
+ /**
+ * Verification level required for the guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ */
+ verification_level: GuildVerificationLevel;
+ /**
+ * Default message notifications level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
+ */
+ default_message_notifications: GuildDefaultMessageNotifications;
+ /**
+ * Explicit content filter level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
+ */
+ explicit_content_filter: GuildExplicitContentFilter;
+ /**
+ * Roles in the guild
+ *
+ * See https://discord.com/developers/docs/topics/permissions#role-object
+ */
+ roles: APIRole[];
+ /**
+ * Custom guild emojis
+ *
+ * See https://discord.com/developers/docs/resources/emoji#emoji-object
+ */
+ emojis: APIEmoji[];
+ /**
+ * Enabled guild features
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ */
+ features: GuildFeature[];
+ /**
+ * Required MFA level for the guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
+ */
+ mfa_level: GuildMFALevel;
+ /**
+ * Application id of the guild creator if it is bot-created
+ */
+ application_id: Snowflake | null;
+ /**
+ * The id of the channel where guild notices such as welcome messages and boost events are posted
+ */
+ system_channel_id: Snowflake | null;
+ /**
+ * System channel flags
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
+ */
+ system_channel_flags: GuildSystemChannelFlags;
+ /**
+ * The id of the channel where Community guilds can display rules and/or guidelines
+ */
+ rules_channel_id: Snowflake | null;
+ /**
+ * The maximum number of presences for the guild (`null` is always returned, apart from the largest of guilds)
+ */
+ max_presences?: number | null;
+ /**
+ * The maximum number of members for the guild
+ */
+ max_members?: number;
+ /**
+ * The vanity url code for the guild
+ */
+ vanity_url_code: string | null;
+ /**
+ * The description for the guild
+ */
+ description: string | null;
+ /**
+ * Banner hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ banner: string | null;
+ /**
+ * Premium tier (Server Boost level)
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
+ */
+ premium_tier: GuildPremiumTier;
+ /**
+ * The number of boosts this guild currently has
+ */
+ premium_subscription_count?: number;
+ /**
+ * The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
+ *
+ * @default "en-US"
+ */
+ preferred_locale: string;
+ /**
+ * The id of the channel where admins and moderators of Community guilds receive notices from Discord
+ */
+ public_updates_channel_id: Snowflake | null;
+ /**
+ * The maximum amount of users in a video channel
+ */
+ max_video_channel_users?: number;
+ /**
+ * The maximum amount of users in a stage video channel
+ */
+ max_stage_video_channel_users?: number;
+ /**
+ * Approximate number of members in this guild,
+ * returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true`
+ */
+ approximate_member_count?: number;
+ /**
+ * Approximate number of non-offline members in this guild,
+ * returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true`
+ */
+ approximate_presence_count?: number;
+ /**
+ * The welcome screen of a Community guild, shown to new members
+ *
+ * Returned in the invite object
+ */
+ welcome_screen?: APIGuildWelcomeScreen;
+ /**
+ * The nsfw level of the guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
+ */
+ nsfw_level: GuildNSFWLevel;
+ /**
+ * Custom guild stickers
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object
+ */
+ stickers: APISticker[];
+ /**
+ * Whether the guild has the boost progress bar enabled.
+ */
+ premium_progress_bar_enabled: boolean;
+ /**
+ * The type of Student Hub the guild is
+ */
+ hub_type: GuildHubType | null;
+ /**
+ * The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
+ */
+ safety_alerts_channel_id: Snowflake | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
+ */
+export declare enum GuildDefaultMessageNotifications {
+ AllMessages = 0,
+ OnlyMentions = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
+ */
+export declare enum GuildExplicitContentFilter {
+ Disabled = 0,
+ MembersWithoutRoles = 1,
+ AllMembers = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
+ */
+export declare enum GuildMFALevel {
+ None = 0,
+ Elevated = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
+ */
+export declare enum GuildNSFWLevel {
+ Default = 0,
+ Explicit = 1,
+ Safe = 2,
+ AgeRestricted = 3
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ */
+export declare enum GuildVerificationLevel {
+ /**
+ * Unrestricted
+ */
+ None = 0,
+ /**
+ * Must have verified email on account
+ */
+ Low = 1,
+ /**
+ * Must be registered on Discord for longer than 5 minutes
+ */
+ Medium = 2,
+ /**
+ * Must be a member of the guild for longer than 10 minutes
+ */
+ High = 3,
+ /**
+ * Must have a verified phone number
+ */
+ VeryHigh = 4
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
+ */
+export declare enum GuildPremiumTier {
+ None = 0,
+ Tier1 = 1,
+ Tier2 = 2,
+ Tier3 = 3
+}
+export declare enum GuildHubType {
+ Default = 0,
+ HighSchool = 1,
+ College = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
+ */
+export declare enum GuildSystemChannelFlags {
+ /**
+ * Suppress member join notifications
+ */
+ SuppressJoinNotifications = 1,
+ /**
+ * Suppress server boost notifications
+ */
+ SuppressPremiumSubscriptions = 2,
+ /**
+ * Suppress server setup tips
+ */
+ SuppressGuildReminderNotifications = 4,
+ /**
+ * Hide member join sticker reply buttons
+ */
+ SuppressJoinNotificationReplies = 8
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ */
+export declare enum GuildFeature {
+ /**
+ * Guild has access to set an animated guild banner image
+ */
+ AnimatedBanner = "ANIMATED_BANNER",
+ /**
+ * Guild has access to set an animated guild icon
+ */
+ AnimatedIcon = "ANIMATED_ICON",
+ /**
+ * Guild is using the old permissions configuration behavior
+ *
+ * See https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes
+ */
+ ApplicationCommandPermissionsV2 = "APPLICATION_COMMAND_PERMISSIONS_V2",
+ /**
+ * Guild has set up auto moderation rules
+ */
+ AutoModeration = "AUTO_MODERATION",
+ /**
+ * Guild has access to set a guild banner image
+ */
+ Banner = "BANNER",
+ /**
+ * Guild can enable welcome screen, Membership Screening and discovery, and receives community updates
+ */
+ Community = "COMMUNITY",
+ /**
+ * Guild has enabled monetization
+ */
+ CreatorMonetizableProvisional = "CREATOR_MONETIZABLE_PROVISIONAL",
+ /**
+ * Guild has enabled the role subscription promo page
+ */
+ CreatorStorePage = "CREATOR_STORE_PAGE",
+ DeveloperSupportServer = "DEVELOPER_SUPPORT_SERVER",
+ /**
+ * Guild is able to be discovered in the directory
+ */
+ Discoverable = "DISCOVERABLE",
+ /**
+ * Guild is able to be featured in the directory
+ */
+ Featurable = "FEATURABLE",
+ /**
+ * Guild is listed in a directory channel
+ */
+ HasDirectoryEntry = "HAS_DIRECTORY_ENTRY",
+ /**
+ * Guild is a Student Hub
+ *
+ * See https://support.discord.com/hc/articles/4406046651927
+ *
+ * @unstable This feature is currently not documented by Discord, but has known value
+ */
+ Hub = "HUB",
+ /**
+ * Guild has disabled invite usage, preventing users from joining
+ */
+ InvitesDisabled = "INVITES_DISABLED",
+ /**
+ * Guild has access to set an invite splash background
+ */
+ InviteSplash = "INVITE_SPLASH",
+ /**
+ * Guild is in a Student Hub
+ *
+ * See https://support.discord.com/hc/articles/4406046651927
+ *
+ * @unstable This feature is currently not documented by Discord, but has known value
+ */
+ LinkedToHub = "LINKED_TO_HUB",
+ /**
+ * Guild has enabled Membership Screening
+ */
+ MemberVerificationGateEnabled = "MEMBER_VERIFICATION_GATE_ENABLED",
+ /**
+ * Guild has enabled monetization
+ *
+ * @unstable This feature is no longer documented by Discord
+ */
+ MonetizationEnabled = "MONETIZATION_ENABLED",
+ /**
+ * Guild has increased custom sticker slots
+ */
+ MoreStickers = "MORE_STICKERS",
+ /**
+ * Guild has access to create news channels
+ */
+ News = "NEWS",
+ /**
+ * Guild is partnered
+ */
+ Partnered = "PARTNERED",
+ /**
+ * Guild can be previewed before joining via Membership Screening or the directory
+ */
+ PreviewEnabled = "PREVIEW_ENABLED",
+ /**
+ * Guild has access to create private threads
+ */
+ PrivateThreads = "PRIVATE_THREADS",
+ /**
+ * Guild has disabled alerts for join raids in the configured safety alerts channel
+ */
+ RaidAlertsDisabled = "RAID_ALERTS_DISABLED",
+ RelayEnabled = "RELAY_ENABLED",
+ /**
+ * Guild is able to set role icons
+ */
+ RoleIcons = "ROLE_ICONS",
+ /**
+ * Guild has role subscriptions that can be purchased
+ */
+ RoleSubscriptionsAvailableForPurchase = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE",
+ /**
+ * Guild has enabled role subscriptions
+ */
+ RoleSubscriptionsEnabled = "ROLE_SUBSCRIPTIONS_ENABLED",
+ /**
+ * Guild has enabled ticketed events
+ */
+ TicketedEventsEnabled = "TICKETED_EVENTS_ENABLED",
+ /**
+ * Guild has access to set a vanity URL
+ */
+ VanityURL = "VANITY_URL",
+ /**
+ * Guild is verified
+ */
+ Verified = "VERIFIED",
+ /**
+ * Guild has access to set 384kbps bitrate in voice (previously VIP voice servers)
+ */
+ VIPRegions = "VIP_REGIONS",
+ /**
+ * Guild has enabled the welcome screen
+ */
+ WelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED"
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-preview-object
+ */
+export interface APIGuildPreview {
+ /**
+ * Guild id
+ */
+ id: Snowflake;
+ /**
+ * Guild name (2-100 characters)
+ */
+ name: string;
+ /**
+ * Icon hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ icon: string | null;
+ /**
+ * Splash hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ splash: string | null;
+ /**
+ * Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ discovery_splash: string | null;
+ /**
+ * Custom guild emojis
+ *
+ * See https://discord.com/developers/docs/resources/emoji#emoji-object
+ */
+ emojis: APIEmoji[];
+ /**
+ * Enabled guild features
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ */
+ features: GuildFeature[];
+ /**
+ * Approximate number of members in this guild
+ */
+ approximate_member_count: number;
+ /**
+ * Approximate number of online members in this guild
+ */
+ approximate_presence_count: number;
+ /**
+ * The description for the guild
+ */
+ description: string;
+ /**
+ * Custom guild stickers
+ */
+ stickers: APISticker[];
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-widget-object
+ */
+export interface APIGuildWidgetSettings {
+ /**
+ * Whether the widget is enabled
+ */
+ enabled: boolean;
+ /**
+ * The widget channel id
+ */
+ channel_id: Snowflake | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+export interface APIGuildMember {
+ /**
+ * The user this guild member represents
+ *
+ * **This field won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.**
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user?: APIUser;
+ /**
+ * This users guild nickname
+ */
+ nick?: string | null;
+ /**
+ * The member's guild avatar hash
+ */
+ avatar?: string | null;
+ /**
+ * Array of role object ids
+ *
+ * See https://discord.com/developers/docs/topics/permissions#role-object
+ */
+ roles: Snowflake[];
+ /**
+ * When the user joined the guild
+ */
+ joined_at: string;
+ /**
+ * When the user started boosting the guild
+ *
+ * See https://support.discord.com/hc/articles/360028038352
+ */
+ premium_since?: string | null;
+ /**
+ * Whether the user is deafened in voice channels
+ */
+ deaf: boolean;
+ /**
+ * Whether the user is muted in voice channels
+ */
+ mute: boolean;
+ /**
+ * Guild member flags represented as a bit set, defaults to `0`
+ */
+ flags: GuildMemberFlags;
+ /**
+ * Whether the user has not yet passed the guild's Membership Screening requirements
+ *
+ * @remarks If this field is not present, it can be assumed as `false`.
+ */
+ pending?: boolean;
+ /**
+ * Timestamp of when the time out will be removed; until then, they cannot interact with the guild
+ */
+ communication_disabled_until?: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags
+ */
+export declare enum GuildMemberFlags {
+ /**
+ * Member has left and rejoined the guild
+ */
+ DidRejoin = 1,
+ /**
+ * Member has completed onboarding
+ */
+ CompletedOnboarding = 2,
+ /**
+ * Member bypasses guild verification requirements
+ */
+ BypassesVerification = 4,
+ /**
+ * Member has started onboarding
+ */
+ StartedOnboarding = 8,
+ /**
+ * @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ StartedHomeActions = 32,
+ /**
+ * @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ CompletedHomeActions = 64,
+ /**
+ * @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ AutomodQuarantinedUsernameOrGuildNickname = 128,
+ /**
+ * @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ AutomodQuarantinedBio = 256
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-object
+ */
+export interface APIGuildIntegration {
+ /**
+ * Integration id
+ */
+ id: Snowflake;
+ /**
+ * Integration name
+ */
+ name: string;
+ /**
+ * Integration type
+ */
+ type: APIGuildIntegrationType;
+ /**
+ * Is this integration enabled
+ */
+ enabled: boolean;
+ /**
+ * Is this integration syncing
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ syncing?: boolean;
+ /**
+ * ID that this integration uses for "subscribers"
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ role_id?: Snowflake;
+ /**
+ * Whether emoticons should be synced for this integration (`twitch` only currently)
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ enable_emoticons?: boolean;
+ /**
+ * The behavior of expiring subscribers
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ *
+ * See https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
+ */
+ expire_behavior?: IntegrationExpireBehavior;
+ /**
+ * The grace period (in days) before expiring subscribers
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ expire_grace_period?: number;
+ /**
+ * User for this integration
+ *
+ * **Some older integrations may not have an attached user.**
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user?: APIUser;
+ /**
+ * Integration account information
+ *
+ * See https://discord.com/developers/docs/resources/guild#integration-account-object
+ */
+ account: APIIntegrationAccount;
+ /**
+ * When this integration was last synced
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ synced_at?: string;
+ /**
+ * How many subscribers this integration has
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ subscriber_count?: number;
+ /**
+ * Has this integration been revoked
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ revoked?: boolean;
+ /**
+ * The bot/OAuth2 application for discord integrations
+ *
+ * See https://discord.com/developers/docs/resources/guild#integration-application-object
+ *
+ * **This field is not provided for `discord` bot integrations.**
+ */
+ application?: APIGuildIntegrationApplication;
+ /**
+ * The scopes the application has been authorized for
+ */
+ scopes?: OAuth2Scopes[];
+}
+export type APIGuildIntegrationType = 'twitch' | 'youtube' | 'discord' | 'guild_subscription';
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
+ */
+export declare enum IntegrationExpireBehavior {
+ RemoveRole = 0,
+ Kick = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-account-object
+ */
+export interface APIIntegrationAccount {
+ /**
+ * ID of the account
+ */
+ id: string;
+ /**
+ * Name of the account
+ */
+ name: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-application-object
+ */
+export interface APIGuildIntegrationApplication {
+ /**
+ * The id of the app
+ */
+ id: Snowflake;
+ /**
+ * The name of the app
+ */
+ name: string;
+ /**
+ * The icon hash of the app
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ icon: string | null;
+ /**
+ * The description of the app
+ */
+ description: string;
+ /**
+ * The bot associated with this application
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ bot?: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#ban-object
+ */
+export interface APIBan {
+ /**
+ * The reason for the ban
+ */
+ reason: string | null;
+ /**
+ * The banned user
+ */
+ user: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-widget-object
+ */
+export interface APIGuildWidget {
+ id: Snowflake;
+ name: string;
+ instant_invite: string | null;
+ channels: APIGuildWidgetChannel[];
+ members: APIGuildWidgetMember[];
+ presence_count: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
+ */
+export interface APIGuildWidgetChannel {
+ id: Snowflake;
+ name: string;
+ position: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
+ */
+export interface APIGuildWidgetMember {
+ id: string;
+ username: string;
+ discriminator: string;
+ avatar: string | null;
+ status: PresenceUpdateStatus;
+ activity?: {
+ name: string;
+ };
+ avatar_url: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options
+ */
+export declare enum GuildWidgetStyle {
+ /**
+ * Shield style widget with Discord icon and guild members online count
+ */
+ Shield = "shield",
+ /**
+ * Large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget
+ */
+ Banner1 = "banner1",
+ /**
+ * Smaller widget style with guild icon, name and online count. Split on the right with Discord logo
+ */
+ Banner2 = "banner2",
+ /**
+ * Large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right
+ */
+ Banner3 = "banner3",
+ /**
+ * Large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget
+ * and a "JOIN MY SERVER" button at the bottom
+ */
+ Banner4 = "banner4"
+}
+export interface APIGuildWelcomeScreen {
+ /**
+ * The welcome screen short message
+ */
+ description: string | null;
+ /**
+ * Array of suggested channels
+ */
+ welcome_channels: APIGuildWelcomeScreenChannel[];
+}
+export interface APIGuildWelcomeScreenChannel {
+ /**
+ * The channel id that is suggested
+ */
+ channel_id: Snowflake;
+ /**
+ * The description shown for the channel
+ */
+ description: string;
+ /**
+ * The emoji id of the emoji that is shown on the left of the channel
+ */
+ emoji_id: Snowflake | null;
+ /**
+ * The emoji name of the emoji that is shown on the left of the channel
+ */
+ emoji_name: string | null;
+}
+export interface APIGuildMembershipScreening {
+ /**
+ * When the fields were last updated
+ */
+ version: string;
+ /**
+ * The steps in the screening form
+ */
+ form_fields: APIGuildMembershipScreeningField[];
+ /**
+ * The server description shown in the screening form
+ */
+ description: string | null;
+}
+export interface APIGuildMembershipScreeningField {
+ /**
+ * The type of field
+ */
+ field_type: MembershipScreeningFieldType;
+ /**
+ * The title of the field
+ */
+ label: string;
+ /**
+ * The list of rules
+ */
+ values?: string[];
+ /**
+ * Whether the user has to fill out this field
+ */
+ required: boolean;
+}
+export declare enum MembershipScreeningFieldType {
+ /**
+ * Server Rules
+ */
+ Terms = "TERMS"
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-guild-onboarding-structure
+ */
+export interface APIGuildOnboarding {
+ /**
+ * Id of the guild this onboarding is part of
+ */
+ guild_id: Snowflake;
+ /**
+ * Prompts shown during onboarding and in customize community
+ */
+ prompts: APIGuildOnboardingPrompt[];
+ /**
+ * Channel ids that members get opted into automatically
+ */
+ default_channel_ids: Snowflake[];
+ /**
+ * Whether onboarding is enabled in the guild
+ */
+ enabled: boolean;
+ /**
+ * Current mode of onboarding
+ */
+ mode: GuildOnboardingMode;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure
+ */
+export interface APIGuildOnboardingPrompt {
+ /**
+ * Id of the prompt
+ */
+ id: Snowflake;
+ /**
+ * Options available within the prompt
+ */
+ options: APIGuildOnboardingPromptOption[];
+ /**
+ * Title of the prompt
+ */
+ title: string;
+ /**
+ * Indicates whether users are limited to selecting one option for the prompt
+ */
+ single_select: boolean;
+ /**
+ * Indicates whether the prompt is required before a user completes the onboarding flow
+ */
+ required: boolean;
+ /**
+ * Indicates whether the prompt is present in the onboarding flow.
+ * If `false`, the prompt will only appear in the Channels & Roles tab
+ */
+ in_onboarding: boolean;
+ /**
+ * Type of prompt
+ */
+ type: GuildOnboardingPromptType;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure
+ */
+export interface APIGuildOnboardingPromptOption {
+ /**
+ * Id of the prompt option
+ */
+ id: Snowflake;
+ /**
+ * Ids for channels a member is added to when the option is selected
+ */
+ channel_ids: Snowflake[];
+ /**
+ * Ids for roles assigned to a member when the option is selected
+ */
+ role_ids: Snowflake[];
+ /**
+ * Emoji of the option
+ */
+ emoji: APIPartialEmoji;
+ /**
+ * Title of the option
+ */
+ title: string;
+ /**
+ * Description of the option
+ */
+ description: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode
+ */
+export declare enum GuildOnboardingMode {
+ /**
+ * Counts only Default Channels towards constraints
+ */
+ OnboardingDefault = 0,
+ /**
+ * Counts Default Channels and Questions towards constraints
+ */
+ OnboardingAdvanced = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
+ */
+export declare enum GuildOnboardingPromptType {
+ MultipleChoice = 0,
+ Dropdown = 1
+}
+//# sourceMappingURL=guild.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/guild.d.ts.map b/node_modules/discord-api-types/payloads/v9/guild.d.ts.map
new file mode 100644
index 0000000..215f7f9
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/guild.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"guild.d.ts","sourceRoot":"","sources":["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IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED;;GAEG;AACH,oBAAY,mBAAmB;IAC9B;;OAEG;IACH,iBAAiB,IAAA;IACjB;;OAEG;IACH,kBAAkB,IAAA;CAClB;AAED;;GAEG;AACH,oBAAY,yBAAyB;IACpC,cAAc,IAAA;IACd,QAAQ,IAAA;CACR"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/guild.js b/node_modules/discord-api-types/payloads/v9/guild.js
new file mode 100644
index 0000000..1dd27c1
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/guild.js
@@ -0,0 +1,355 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/guild
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.GuildOnboardingPromptType = exports.GuildOnboardingMode = exports.MembershipScreeningFieldType = exports.GuildWidgetStyle = exports.IntegrationExpireBehavior = exports.GuildMemberFlags = exports.GuildFeature = exports.GuildSystemChannelFlags = exports.GuildHubType = exports.GuildPremiumTier = exports.GuildVerificationLevel = exports.GuildNSFWLevel = exports.GuildMFALevel = exports.GuildExplicitContentFilter = exports.GuildDefaultMessageNotifications = void 0;
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
+ */
+var GuildDefaultMessageNotifications;
+(function (GuildDefaultMessageNotifications) {
+ GuildDefaultMessageNotifications[GuildDefaultMessageNotifications["AllMessages"] = 0] = "AllMessages";
+ GuildDefaultMessageNotifications[GuildDefaultMessageNotifications["OnlyMentions"] = 1] = "OnlyMentions";
+})(GuildDefaultMessageNotifications = exports.GuildDefaultMessageNotifications || (exports.GuildDefaultMessageNotifications = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
+ */
+var GuildExplicitContentFilter;
+(function (GuildExplicitContentFilter) {
+ GuildExplicitContentFilter[GuildExplicitContentFilter["Disabled"] = 0] = "Disabled";
+ GuildExplicitContentFilter[GuildExplicitContentFilter["MembersWithoutRoles"] = 1] = "MembersWithoutRoles";
+ GuildExplicitContentFilter[GuildExplicitContentFilter["AllMembers"] = 2] = "AllMembers";
+})(GuildExplicitContentFilter = exports.GuildExplicitContentFilter || (exports.GuildExplicitContentFilter = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
+ */
+var GuildMFALevel;
+(function (GuildMFALevel) {
+ GuildMFALevel[GuildMFALevel["None"] = 0] = "None";
+ GuildMFALevel[GuildMFALevel["Elevated"] = 1] = "Elevated";
+})(GuildMFALevel = exports.GuildMFALevel || (exports.GuildMFALevel = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
+ */
+var GuildNSFWLevel;
+(function (GuildNSFWLevel) {
+ GuildNSFWLevel[GuildNSFWLevel["Default"] = 0] = "Default";
+ GuildNSFWLevel[GuildNSFWLevel["Explicit"] = 1] = "Explicit";
+ GuildNSFWLevel[GuildNSFWLevel["Safe"] = 2] = "Safe";
+ GuildNSFWLevel[GuildNSFWLevel["AgeRestricted"] = 3] = "AgeRestricted";
+})(GuildNSFWLevel = exports.GuildNSFWLevel || (exports.GuildNSFWLevel = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ */
+var GuildVerificationLevel;
+(function (GuildVerificationLevel) {
+ /**
+ * Unrestricted
+ */
+ GuildVerificationLevel[GuildVerificationLevel["None"] = 0] = "None";
+ /**
+ * Must have verified email on account
+ */
+ GuildVerificationLevel[GuildVerificationLevel["Low"] = 1] = "Low";
+ /**
+ * Must be registered on Discord for longer than 5 minutes
+ */
+ GuildVerificationLevel[GuildVerificationLevel["Medium"] = 2] = "Medium";
+ /**
+ * Must be a member of the guild for longer than 10 minutes
+ */
+ GuildVerificationLevel[GuildVerificationLevel["High"] = 3] = "High";
+ /**
+ * Must have a verified phone number
+ */
+ GuildVerificationLevel[GuildVerificationLevel["VeryHigh"] = 4] = "VeryHigh";
+})(GuildVerificationLevel = exports.GuildVerificationLevel || (exports.GuildVerificationLevel = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
+ */
+var GuildPremiumTier;
+(function (GuildPremiumTier) {
+ GuildPremiumTier[GuildPremiumTier["None"] = 0] = "None";
+ GuildPremiumTier[GuildPremiumTier["Tier1"] = 1] = "Tier1";
+ GuildPremiumTier[GuildPremiumTier["Tier2"] = 2] = "Tier2";
+ GuildPremiumTier[GuildPremiumTier["Tier3"] = 3] = "Tier3";
+})(GuildPremiumTier = exports.GuildPremiumTier || (exports.GuildPremiumTier = {}));
+var GuildHubType;
+(function (GuildHubType) {
+ GuildHubType[GuildHubType["Default"] = 0] = "Default";
+ GuildHubType[GuildHubType["HighSchool"] = 1] = "HighSchool";
+ GuildHubType[GuildHubType["College"] = 2] = "College";
+})(GuildHubType = exports.GuildHubType || (exports.GuildHubType = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
+ */
+var GuildSystemChannelFlags;
+(function (GuildSystemChannelFlags) {
+ /**
+ * Suppress member join notifications
+ */
+ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressJoinNotifications"] = 1] = "SuppressJoinNotifications";
+ /**
+ * Suppress server boost notifications
+ */
+ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressPremiumSubscriptions"] = 2] = "SuppressPremiumSubscriptions";
+ /**
+ * Suppress server setup tips
+ */
+ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressGuildReminderNotifications"] = 4] = "SuppressGuildReminderNotifications";
+ /**
+ * Hide member join sticker reply buttons
+ */
+ GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressJoinNotificationReplies"] = 8] = "SuppressJoinNotificationReplies";
+})(GuildSystemChannelFlags = exports.GuildSystemChannelFlags || (exports.GuildSystemChannelFlags = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ */
+var GuildFeature;
+(function (GuildFeature) {
+ /**
+ * Guild has access to set an animated guild banner image
+ */
+ GuildFeature["AnimatedBanner"] = "ANIMATED_BANNER";
+ /**
+ * Guild has access to set an animated guild icon
+ */
+ GuildFeature["AnimatedIcon"] = "ANIMATED_ICON";
+ /**
+ * Guild is using the old permissions configuration behavior
+ *
+ * See https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes
+ */
+ GuildFeature["ApplicationCommandPermissionsV2"] = "APPLICATION_COMMAND_PERMISSIONS_V2";
+ /**
+ * Guild has set up auto moderation rules
+ */
+ GuildFeature["AutoModeration"] = "AUTO_MODERATION";
+ /**
+ * Guild has access to set a guild banner image
+ */
+ GuildFeature["Banner"] = "BANNER";
+ /**
+ * Guild can enable welcome screen, Membership Screening and discovery, and receives community updates
+ */
+ GuildFeature["Community"] = "COMMUNITY";
+ /**
+ * Guild has enabled monetization
+ */
+ GuildFeature["CreatorMonetizableProvisional"] = "CREATOR_MONETIZABLE_PROVISIONAL";
+ /**
+ * Guild has enabled the role subscription promo page
+ */
+ GuildFeature["CreatorStorePage"] = "CREATOR_STORE_PAGE";
+ /*
+ * Guild has been set as a support server on the App Directory
+ */
+ GuildFeature["DeveloperSupportServer"] = "DEVELOPER_SUPPORT_SERVER";
+ /**
+ * Guild is able to be discovered in the directory
+ */
+ GuildFeature["Discoverable"] = "DISCOVERABLE";
+ /**
+ * Guild is able to be featured in the directory
+ */
+ GuildFeature["Featurable"] = "FEATURABLE";
+ /**
+ * Guild is listed in a directory channel
+ */
+ GuildFeature["HasDirectoryEntry"] = "HAS_DIRECTORY_ENTRY";
+ /**
+ * Guild is a Student Hub
+ *
+ * See https://support.discord.com/hc/articles/4406046651927
+ *
+ * @unstable This feature is currently not documented by Discord, but has known value
+ */
+ GuildFeature["Hub"] = "HUB";
+ /**
+ * Guild has disabled invite usage, preventing users from joining
+ */
+ GuildFeature["InvitesDisabled"] = "INVITES_DISABLED";
+ /**
+ * Guild has access to set an invite splash background
+ */
+ GuildFeature["InviteSplash"] = "INVITE_SPLASH";
+ /**
+ * Guild is in a Student Hub
+ *
+ * See https://support.discord.com/hc/articles/4406046651927
+ *
+ * @unstable This feature is currently not documented by Discord, but has known value
+ */
+ GuildFeature["LinkedToHub"] = "LINKED_TO_HUB";
+ /**
+ * Guild has enabled Membership Screening
+ */
+ GuildFeature["MemberVerificationGateEnabled"] = "MEMBER_VERIFICATION_GATE_ENABLED";
+ /**
+ * Guild has enabled monetization
+ *
+ * @unstable This feature is no longer documented by Discord
+ */
+ GuildFeature["MonetizationEnabled"] = "MONETIZATION_ENABLED";
+ /**
+ * Guild has increased custom sticker slots
+ */
+ GuildFeature["MoreStickers"] = "MORE_STICKERS";
+ /**
+ * Guild has access to create news channels
+ */
+ GuildFeature["News"] = "NEWS";
+ /**
+ * Guild is partnered
+ */
+ GuildFeature["Partnered"] = "PARTNERED";
+ /**
+ * Guild can be previewed before joining via Membership Screening or the directory
+ */
+ GuildFeature["PreviewEnabled"] = "PREVIEW_ENABLED";
+ /**
+ * Guild has access to create private threads
+ */
+ GuildFeature["PrivateThreads"] = "PRIVATE_THREADS";
+ /**
+ * Guild has disabled alerts for join raids in the configured safety alerts channel
+ */
+ GuildFeature["RaidAlertsDisabled"] = "RAID_ALERTS_DISABLED";
+ GuildFeature["RelayEnabled"] = "RELAY_ENABLED";
+ /**
+ * Guild is able to set role icons
+ */
+ GuildFeature["RoleIcons"] = "ROLE_ICONS";
+ /**
+ * Guild has role subscriptions that can be purchased
+ */
+ GuildFeature["RoleSubscriptionsAvailableForPurchase"] = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE";
+ /**
+ * Guild has enabled role subscriptions
+ */
+ GuildFeature["RoleSubscriptionsEnabled"] = "ROLE_SUBSCRIPTIONS_ENABLED";
+ /**
+ * Guild has enabled ticketed events
+ */
+ GuildFeature["TicketedEventsEnabled"] = "TICKETED_EVENTS_ENABLED";
+ /**
+ * Guild has access to set a vanity URL
+ */
+ GuildFeature["VanityURL"] = "VANITY_URL";
+ /**
+ * Guild is verified
+ */
+ GuildFeature["Verified"] = "VERIFIED";
+ /**
+ * Guild has access to set 384kbps bitrate in voice (previously VIP voice servers)
+ */
+ GuildFeature["VIPRegions"] = "VIP_REGIONS";
+ /**
+ * Guild has enabled the welcome screen
+ */
+ GuildFeature["WelcomeScreenEnabled"] = "WELCOME_SCREEN_ENABLED";
+})(GuildFeature = exports.GuildFeature || (exports.GuildFeature = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags
+ */
+var GuildMemberFlags;
+(function (GuildMemberFlags) {
+ /**
+ * Member has left and rejoined the guild
+ */
+ GuildMemberFlags[GuildMemberFlags["DidRejoin"] = 1] = "DidRejoin";
+ /**
+ * Member has completed onboarding
+ */
+ GuildMemberFlags[GuildMemberFlags["CompletedOnboarding"] = 2] = "CompletedOnboarding";
+ /**
+ * Member bypasses guild verification requirements
+ */
+ GuildMemberFlags[GuildMemberFlags["BypassesVerification"] = 4] = "BypassesVerification";
+ /**
+ * Member has started onboarding
+ */
+ GuildMemberFlags[GuildMemberFlags["StartedOnboarding"] = 8] = "StartedOnboarding";
+ /**
+ * @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ GuildMemberFlags[GuildMemberFlags["StartedHomeActions"] = 32] = "StartedHomeActions";
+ /**
+ * @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ GuildMemberFlags[GuildMemberFlags["CompletedHomeActions"] = 64] = "CompletedHomeActions";
+ /**
+ * @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ GuildMemberFlags[GuildMemberFlags["AutomodQuarantinedUsernameOrGuildNickname"] = 128] = "AutomodQuarantinedUsernameOrGuildNickname";
+ /**
+ * @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ GuildMemberFlags[GuildMemberFlags["AutomodQuarantinedBio"] = 256] = "AutomodQuarantinedBio";
+})(GuildMemberFlags = exports.GuildMemberFlags || (exports.GuildMemberFlags = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
+ */
+var IntegrationExpireBehavior;
+(function (IntegrationExpireBehavior) {
+ IntegrationExpireBehavior[IntegrationExpireBehavior["RemoveRole"] = 0] = "RemoveRole";
+ IntegrationExpireBehavior[IntegrationExpireBehavior["Kick"] = 1] = "Kick";
+})(IntegrationExpireBehavior = exports.IntegrationExpireBehavior || (exports.IntegrationExpireBehavior = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options
+ */
+var GuildWidgetStyle;
+(function (GuildWidgetStyle) {
+ /**
+ * Shield style widget with Discord icon and guild members online count
+ */
+ GuildWidgetStyle["Shield"] = "shield";
+ /**
+ * Large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget
+ */
+ GuildWidgetStyle["Banner1"] = "banner1";
+ /**
+ * Smaller widget style with guild icon, name and online count. Split on the right with Discord logo
+ */
+ GuildWidgetStyle["Banner2"] = "banner2";
+ /**
+ * Large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right
+ */
+ GuildWidgetStyle["Banner3"] = "banner3";
+ /**
+ * Large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget
+ * and a "JOIN MY SERVER" button at the bottom
+ */
+ GuildWidgetStyle["Banner4"] = "banner4";
+})(GuildWidgetStyle = exports.GuildWidgetStyle || (exports.GuildWidgetStyle = {}));
+var MembershipScreeningFieldType;
+(function (MembershipScreeningFieldType) {
+ /**
+ * Server Rules
+ */
+ MembershipScreeningFieldType["Terms"] = "TERMS";
+})(MembershipScreeningFieldType = exports.MembershipScreeningFieldType || (exports.MembershipScreeningFieldType = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode
+ */
+var GuildOnboardingMode;
+(function (GuildOnboardingMode) {
+ /**
+ * Counts only Default Channels towards constraints
+ */
+ GuildOnboardingMode[GuildOnboardingMode["OnboardingDefault"] = 0] = "OnboardingDefault";
+ /**
+ * Counts Default Channels and Questions towards constraints
+ */
+ GuildOnboardingMode[GuildOnboardingMode["OnboardingAdvanced"] = 1] = "OnboardingAdvanced";
+})(GuildOnboardingMode = exports.GuildOnboardingMode || (exports.GuildOnboardingMode = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
+ */
+var GuildOnboardingPromptType;
+(function (GuildOnboardingPromptType) {
+ GuildOnboardingPromptType[GuildOnboardingPromptType["MultipleChoice"] = 0] = "MultipleChoice";
+ GuildOnboardingPromptType[GuildOnboardingPromptType["Dropdown"] = 1] = "Dropdown";
+})(GuildOnboardingPromptType = exports.GuildOnboardingPromptType || (exports.GuildOnboardingPromptType = {}));
+//# sourceMappingURL=guild.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/guild.js.map b/node_modules/discord-api-types/payloads/v9/guild.js.map
new file mode 100644
index 0000000..7242b23
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/guild.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"guild.js","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA0RH;;GAEG;AACH,IAAY,gCAGX;AAHD,WAAY,gCAAgC;IAC3C,qGAAW,CAAA;IACX,uGAAY,CAAA;AACb,CAAC,EAHW,gCAAgC,GAAhC,wCAAgC,KAAhC,wCAAgC,QAG3C;AAED;;GAEG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,mFAAQ,CAAA;IACR,yGAAmB,CAAA;IACnB,uFAAU,CAAA;AACX,CAAC,EAJW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAIrC;AAED;;GAEG;AACH,IAAY,aAGX;AAHD,WAAY,aAAa;IACxB,iDAAI,CAAA;IACJ,yDAAQ,CAAA;AACT,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AAED;;GAEG;AACH,IAAY,cAKX;AALD,WAAY,cAAc;IACzB,yDAAO,CAAA;IACP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ACH,2FAA8B,CAAA;AAC/B,CAAC,EAjCW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAiC3B;AAsGD;;GAEG;AACH,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACpC,qFAAU,CAAA;IACV,yEAAI,CAAA;AACL,CAAC,EAHW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAGpC;AA8FD;;GAEG;AACH,IAAY,gBAsBX;AAtBD,WAAY,gBAAgB;IAC3B;;OAEG;IACH,qCAAiB,CAAA;IACjB;;OAEG;IACH,uCAAmB,CAAA;IACnB;;OAEG;IACH,uCAAmB,CAAA;IACnB;;OAEG;IACH,uCAAmB,CAAA;IACnB;;;OAGG;IACH,uCAAmB,CAAA;AACpB,CAAC,EAtBW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAsB3B;AAoED,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACvC;;OAEG;IACH,+CAAe,CAAA;AAChB,CAAC,EALW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAKvC;AA6FD;;GAEG;AACH,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC9B;;OAEG;IACH,uFAAiB,CAAA;IACjB;;OAEG;IACH,yFAAkB,CAAA;AACnB,CAAC,EATW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAS9B;AAED;;GAEG;AACH,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACpC,6FAAc,CAAA;IACd,iFAAQ,CAAA;AACT,CAAC,EAHW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAGpC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/guildScheduledEvent.d.ts b/node_modules/discord-api-types/payloads/v9/guildScheduledEvent.d.ts
new file mode 100644
index 0000000..a519264
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/guildScheduledEvent.d.ts
@@ -0,0 +1,139 @@
+import type { Snowflake } from '../../globals';
+import type { APIGuildMember } from './guild';
+import type { APIUser } from './user';
+interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> {
+ /**
+ * The id of the guild event
+ */
+ id: Snowflake;
+ /**
+ * The guild id which the scheduled event belongs to
+ */
+ guild_id: Snowflake;
+ /**
+ * The channel id in which the scheduled event will be hosted, or `null` if entity type is `EXTERNAL`
+ */
+ channel_id: Snowflake | null;
+ /**
+ * The id of the user that created the scheduled event
+ */
+ creator_id?: Snowflake | null;
+ /**
+ * The name of the scheduled event
+ */
+ name: string;
+ /**
+ * The description of the scheduled event
+ */
+ description?: string | null;
+ /**
+ * The time the scheduled event will start
+ */
+ scheduled_start_time: string;
+ /**
+ * The time at which the guild event will end, or `null` if the event does not have a scheduled time to end
+ */
+ scheduled_end_time: string | null;
+ /**
+ * The privacy level of the scheduled event
+ */
+ privacy_level: GuildScheduledEventPrivacyLevel;
+ /**
+ * The status of the scheduled event
+ */
+ status: GuildScheduledEventStatus;
+ /**
+ * The type of hosting entity associated with the scheduled event
+ */
+ entity_type: Type;
+ /**
+ * The id of the hosting entity associated with the scheduled event
+ */
+ entity_id: Snowflake | null;
+ /**
+ * The entity metadata for the scheduled event
+ */
+ entity_metadata: APIGuildScheduledEventEntityMetadata | null;
+ /**
+ * The user that created the scheduled event
+ */
+ creator?: APIUser;
+ /**
+ * The number of users subscribed to the scheduled event
+ */
+ user_count?: number;
+ /**
+ * The cover image of the scheduled event
+ */
+ image?: string | null;
+}
+export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
+ channel_id: Snowflake;
+ entity_metadata: null;
+}
+export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.Voice> {
+ channel_id: Snowflake;
+ entity_metadata: null;
+}
+export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
+ channel_id: null;
+ entity_metadata: Required<APIGuildScheduledEventEntityMetadata>;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure
+ */
+export type APIGuildScheduledEvent = APIStageInstanceGuildScheduledEvent | APIVoiceGuildScheduledEvent | APIExternalGuildScheduledEvent;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata
+ */
+export interface APIGuildScheduledEventEntityMetadata {
+ /**
+ * The location of the scheduled event
+ */
+ location?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types
+ */
+export declare enum GuildScheduledEventEntityType {
+ StageInstance = 1,
+ Voice = 2,
+ External = 3
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status
+ */
+export declare enum GuildScheduledEventStatus {
+ Scheduled = 1,
+ Active = 2,
+ Completed = 3,
+ Canceled = 4
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level
+ */
+export declare enum GuildScheduledEventPrivacyLevel {
+ /**
+ * The scheduled event is only accessible to guild members
+ */
+ GuildOnly = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object-guild-scheduled-event-user-structure
+ */
+export interface APIGuildScheduledEventUser {
+ /**
+ * The scheduled event id which the user subscribed to
+ */
+ guild_scheduled_event_id: Snowflake;
+ /**
+ * The user which subscribed to the event
+ */
+ user: APIUser;
+ /**
+ * The guild member data for this user for the guild which this event belongs to, if any
+ */
+ member?: APIGuildMember;
+}
+export {};
+//# sourceMappingURL=guildScheduledEvent.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/guildScheduledEvent.d.ts.map b/node_modules/discord-api-types/payloads/v9/guildScheduledEvent.d.ts.map
new file mode 100644
index 0000000..b8203cf
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/guildScheduledEvent.d.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IACtB,eAAe,EAAE,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,2BAA4B,SAAQ,0BAA0B,CAAC,6BAA6B,CAAC,KAAK,CAAC;IACnH,UAAU,EAAE,SAAS,CAAC;IACtB,eAAe,EAAE,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,8BAChB,SAAQ,0BAA0B,CAAC,6BAA6B,CAAC,QAAQ,CAAC;IAC1E,UAAU,EAAE,IAAI,CAAC;IACjB,eAAe,EAAE,QAAQ,CAAC,oCAAoC,CAAC,CAAC;CAChE;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAC/B,mCAAmC,GACnC,2BAA2B,GAC3B,8BAA8B,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACpD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,oBAAY,6BAA6B;IACxC,aAAa,IAAI;IACjB,KAAK,IAAA;IACL,QAAQ,IAAA;CACR;AAED;;GAEG;AACH,oBAAY,yBAAyB;IACpC,SAAS,IAAI;IACb,MAAM,IAAA;IACN,SAAS,IAAA;IACT,QAAQ,IAAA;CACR;AAED;;GAEG;AACH,oBAAY,+BAA+B;IAC1C;;OAEG;IACH,SAAS,IAAI;CACb;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;OAEG;IACH,wBAAwB,EAAE,SAAS,CAAC;IACpC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;CACxB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/guildScheduledEvent.js b/node_modules/discord-api-types/payloads/v9/guildScheduledEvent.js
new file mode 100644
index 0000000..b5c9a2f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/guildScheduledEvent.js
@@ -0,0 +1,33 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.GuildScheduledEventPrivacyLevel = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityType = void 0;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types
+ */
+var GuildScheduledEventEntityType;
+(function (GuildScheduledEventEntityType) {
+ GuildScheduledEventEntityType[GuildScheduledEventEntityType["StageInstance"] = 1] = "StageInstance";
+ GuildScheduledEventEntityType[GuildScheduledEventEntityType["Voice"] = 2] = "Voice";
+ GuildScheduledEventEntityType[GuildScheduledEventEntityType["External"] = 3] = "External";
+})(GuildScheduledEventEntityType = exports.GuildScheduledEventEntityType || (exports.GuildScheduledEventEntityType = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status
+ */
+var GuildScheduledEventStatus;
+(function (GuildScheduledEventStatus) {
+ GuildScheduledEventStatus[GuildScheduledEventStatus["Scheduled"] = 1] = "Scheduled";
+ GuildScheduledEventStatus[GuildScheduledEventStatus["Active"] = 2] = "Active";
+ GuildScheduledEventStatus[GuildScheduledEventStatus["Completed"] = 3] = "Completed";
+ GuildScheduledEventStatus[GuildScheduledEventStatus["Canceled"] = 4] = "Canceled";
+})(GuildScheduledEventStatus = exports.GuildScheduledEventStatus || (exports.GuildScheduledEventStatus = {}));
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level
+ */
+var GuildScheduledEventPrivacyLevel;
+(function (GuildScheduledEventPrivacyLevel) {
+ /**
+ * The scheduled event is only accessible to guild members
+ */
+ GuildScheduledEventPrivacyLevel[GuildScheduledEventPrivacyLevel["GuildOnly"] = 2] = "GuildOnly";
+})(GuildScheduledEventPrivacyLevel = exports.GuildScheduledEventPrivacyLevel || (exports.GuildScheduledEventPrivacyLevel = {}));
+//# sourceMappingURL=guildScheduledEvent.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/guildScheduledEvent.js.map b/node_modules/discord-api-types/payloads/v9/guildScheduledEvent.js.map
new file mode 100644
index 0000000..0eacccd
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/guildScheduledEvent.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"guildScheduledEvent.js","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":";;;AA0GA;;GAEG;AACH,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACxC,mGAAiB,CAAA;IACjB,mFAAK,CAAA;IACL,yFAAQ,CAAA;AACT,CAAC,EAJW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAIxC;AAED;;GAEG;AACH,IAAY,yBAKX;AALD,WAAY,yBAAyB;IACpC,mFAAa,CAAA;IACb,6EAAM,CAAA;IACN,mFAAS,CAAA;IACT,iFAAQ,CAAA;AACT,CAAC,EALW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAKpC;AAED;;GAEG;AACH,IAAY,+BAKX;AALD,WAAY,+BAA+B;IAC1C;;OAEG;IACH,+FAAa,CAAA;AACd,CAAC,EALW,+BAA+B,GAA/B,uCAA+B,KAA/B,uCAA+B,QAK1C"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/index.d.ts b/node_modules/discord-api-types/payloads/v9/index.d.ts
new file mode 100644
index 0000000..2864f33
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/index.d.ts
@@ -0,0 +1,21 @@
+export * from '../common';
+export * from './application';
+export * from './auditLog';
+export * from './autoModeration';
+export * from './channel';
+export * from './emoji';
+export * from './gateway';
+export * from './guild';
+export * from './guildScheduledEvent';
+export * from './interactions';
+export * from './invite';
+export * from './oauth2';
+export * from './permissions';
+export * from './stageInstance';
+export * from './sticker';
+export * from './teams';
+export * from './template';
+export * from './user';
+export * from './voice';
+export * from './webhook';
+//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/index.d.ts.map b/node_modules/discord-api-types/payloads/v9/index.d.ts.map
new file mode 100644
index 0000000..2bb79bb
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/index.js b/node_modules/discord-api-types/payloads/v9/index.js
new file mode 100644
index 0000000..c9c0e74
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/index.js
@@ -0,0 +1,37 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("../common"), exports);
+__exportStar(require("./application"), exports);
+__exportStar(require("./auditLog"), exports);
+__exportStar(require("./autoModeration"), exports);
+__exportStar(require("./channel"), exports);
+__exportStar(require("./emoji"), exports);
+__exportStar(require("./gateway"), exports);
+__exportStar(require("./guild"), exports);
+__exportStar(require("./guildScheduledEvent"), exports);
+__exportStar(require("./interactions"), exports);
+__exportStar(require("./invite"), exports);
+__exportStar(require("./oauth2"), exports);
+__exportStar(require("./permissions"), exports);
+__exportStar(require("./stageInstance"), exports);
+__exportStar(require("./sticker"), exports);
+__exportStar(require("./teams"), exports);
+__exportStar(require("./template"), exports);
+__exportStar(require("./user"), exports);
+__exportStar(require("./voice"), exports);
+__exportStar(require("./webhook"), exports);
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/index.js.map b/node_modules/discord-api-types/payloads/v9/index.js.map
new file mode 100644
index 0000000..02cfb83
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,gDAA8B;AAC9B,6CAA2B;AAC3B,mDAAiC;AACjC,4CAA0B;AAC1B,0CAAwB;AACxB,4CAA0B;AAC1B,0CAAwB;AACxB,wDAAsC;AACtC,iDAA+B;AAC/B,2CAAyB;AACzB,2CAAyB;AACzB,gDAA8B;AAC9B,kDAAgC;AAChC,4CAA0B;AAC1B,0CAAwB;AACxB,6CAA2B;AAC3B,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/index.mjs b/node_modules/discord-api-types/payloads/v9/index.mjs
new file mode 100644
index 0000000..a5b5a7b
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/index.mjs
@@ -0,0 +1,69 @@
+import mod from "./index.js";
+
+export default mod;
+export const APIApplicationCommandPermissionsConstant = mod.APIApplicationCommandPermissionsConstant;
+export const ActivityFlags = mod.ActivityFlags;
+export const ActivityPlatform = mod.ActivityPlatform;
+export const ActivityType = mod.ActivityType;
+export const AllowedMentionsTypes = mod.AllowedMentionsTypes;
+export const ApplicationCommandOptionType = mod.ApplicationCommandOptionType;
+export const ApplicationCommandPermissionType = mod.ApplicationCommandPermissionType;
+export const ApplicationCommandType = mod.ApplicationCommandType;
+export const ApplicationFlags = mod.ApplicationFlags;
+export const ApplicationRoleConnectionMetadataType = mod.ApplicationRoleConnectionMetadataType;
+export const AttachmentFlags = mod.AttachmentFlags;
+export const AuditLogEvent = mod.AuditLogEvent;
+export const AuditLogOptionsType = mod.AuditLogOptionsType;
+export const AutoModerationActionType = mod.AutoModerationActionType;
+export const AutoModerationRuleEventType = mod.AutoModerationRuleEventType;
+export const AutoModerationRuleKeywordPresetType = mod.AutoModerationRuleKeywordPresetType;
+export const AutoModerationRuleTriggerType = mod.AutoModerationRuleTriggerType;
+export const ButtonStyle = mod.ButtonStyle;
+export const ChannelFlags = mod.ChannelFlags;
+export const ChannelType = mod.ChannelType;
+export const ComponentType = mod.ComponentType;
+export const ConnectionService = mod.ConnectionService;
+export const ConnectionVisibility = mod.ConnectionVisibility;
+export const EmbedType = mod.EmbedType;
+export const ForumLayoutType = mod.ForumLayoutType;
+export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications;
+export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter;
+export const GuildFeature = mod.GuildFeature;
+export const GuildHubType = mod.GuildHubType;
+export const GuildMFALevel = mod.GuildMFALevel;
+export const GuildMemberFlags = mod.GuildMemberFlags;
+export const GuildNSFWLevel = mod.GuildNSFWLevel;
+export const GuildOnboardingMode = mod.GuildOnboardingMode;
+export const GuildOnboardingPromptType = mod.GuildOnboardingPromptType;
+export const GuildPremiumTier = mod.GuildPremiumTier;
+export const GuildScheduledEventEntityType = mod.GuildScheduledEventEntityType;
+export const GuildScheduledEventPrivacyLevel = mod.GuildScheduledEventPrivacyLevel;
+export const GuildScheduledEventStatus = mod.GuildScheduledEventStatus;
+export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags;
+export const GuildVerificationLevel = mod.GuildVerificationLevel;
+export const GuildWidgetStyle = mod.GuildWidgetStyle;
+export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior;
+export const InteractionResponseType = mod.InteractionResponseType;
+export const InteractionType = mod.InteractionType;
+export const InviteTargetType = mod.InviteTargetType;
+export const MembershipScreeningFieldType = mod.MembershipScreeningFieldType;
+export const MessageActivityType = mod.MessageActivityType;
+export const MessageFlags = mod.MessageFlags;
+export const MessageType = mod.MessageType;
+export const OAuth2Scopes = mod.OAuth2Scopes;
+export const OverwriteType = mod.OverwriteType;
+export const PermissionFlagsBits = mod.PermissionFlagsBits;
+export const PresenceUpdateStatus = mod.PresenceUpdateStatus;
+export const RoleFlags = mod.RoleFlags;
+export const SortOrderType = mod.SortOrderType;
+export const StageInstancePrivacyLevel = mod.StageInstancePrivacyLevel;
+export const StickerFormatType = mod.StickerFormatType;
+export const StickerType = mod.StickerType;
+export const TeamMemberMembershipState = mod.TeamMemberMembershipState;
+export const TextInputStyle = mod.TextInputStyle;
+export const ThreadAutoArchiveDuration = mod.ThreadAutoArchiveDuration;
+export const ThreadMemberFlags = mod.ThreadMemberFlags;
+export const UserFlags = mod.UserFlags;
+export const UserPremiumType = mod.UserPremiumType;
+export const VideoQualityMode = mod.VideoQualityMode;
+export const WebhookType = mod.WebhookType;
diff --git a/node_modules/discord-api-types/payloads/v9/interactions.d.ts b/node_modules/discord-api-types/payloads/v9/interactions.d.ts
new file mode 100644
index 0000000..226a841
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/interactions.d.ts
@@ -0,0 +1,25 @@
+import type { APIApplicationCommandDMInteraction, APIApplicationCommandGuildInteraction, APIApplicationCommandInteraction } from './_interactions/applicationCommands';
+import type { APIApplicationCommandAutocompleteDMInteraction, APIApplicationCommandAutocompleteGuildInteraction, APIApplicationCommandAutocompleteInteraction } from './_interactions/autocomplete';
+import type { APIMessageComponentDMInteraction, APIMessageComponentGuildInteraction, APIMessageComponentInteraction } from './_interactions/messageComponents';
+import type { APIModalSubmitDMInteraction, APIModalSubmitGuildInteraction, APIModalSubmitInteraction } from './_interactions/modalSubmit';
+import type { APIPingInteraction } from './_interactions/ping';
+export * from './_interactions/applicationCommands';
+export * from './_interactions/autocomplete';
+export * from './_interactions/base';
+export * from './_interactions/messageComponents';
+export * from './_interactions/modalSubmit';
+export * from './_interactions/ping';
+export * from './_interactions/responses';
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIInteraction = APIPingInteraction | APIApplicationCommandInteraction | APIMessageComponentInteraction | APIApplicationCommandAutocompleteInteraction | APIModalSubmitInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIDMInteraction = APIApplicationCommandDMInteraction | APIMessageComponentDMInteraction | APIApplicationCommandAutocompleteDMInteraction | APIModalSubmitDMInteraction;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
+ */
+export type APIGuildInteraction = APIApplicationCommandGuildInteraction | APIMessageComponentGuildInteraction | APIApplicationCommandAutocompleteGuildInteraction | APIModalSubmitGuildInteraction;
+//# sourceMappingURL=interactions.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/interactions.d.ts.map b/node_modules/discord-api-types/payloads/v9/interactions.d.ts.map
new file mode 100644
index 0000000..afd4500
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/interactions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kCAAkC,EAClC,qCAAqC,EACrC,gCAAgC,EAChC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EACX,8CAA8C,EAC9C,iDAAiD,EACjD,4CAA4C,EAC5C,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACX,gCAAgC,EAChC,mCAAmC,EACnC,8BAA8B,EAC9B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACX,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,EACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,cAAc,GACvB,kBAAkB,GAClB,gCAAgC,GAChC,8BAA8B,GAC9B,4CAA4C,GAC5C,yBAAyB,CAAC;AAE7B;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACzB,kCAAkC,GAClC,gCAAgC,GAChC,8CAA8C,GAC9C,2BAA2B,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC5B,qCAAqC,GACrC,mCAAmC,GACnC,iDAAiD,GACjD,8BAA8B,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/interactions.js b/node_modules/discord-api-types/payloads/v9/interactions.js
new file mode 100644
index 0000000..4f5b780
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/interactions.js
@@ -0,0 +1,24 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./_interactions/applicationCommands"), exports);
+__exportStar(require("./_interactions/autocomplete"), exports);
+__exportStar(require("./_interactions/base"), exports);
+__exportStar(require("./_interactions/messageComponents"), exports);
+__exportStar(require("./_interactions/modalSubmit"), exports);
+__exportStar(require("./_interactions/ping"), exports);
+__exportStar(require("./_interactions/responses"), exports);
+//# sourceMappingURL=interactions.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/interactions.js.map b/node_modules/discord-api-types/payloads/v9/interactions.js.map
new file mode 100644
index 0000000..8c2bebe
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/interactions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"interactions.js","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAsBA,sEAAoD;AACpD,+DAA6C;AAC7C,uDAAqC;AACrC,oEAAkD;AAClD,8DAA4C;AAC5C,uDAAqC;AACrC,4DAA0C"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/invite.d.ts b/node_modules/discord-api-types/payloads/v9/invite.d.ts
new file mode 100644
index 0000000..a247f39
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/invite.d.ts
@@ -0,0 +1,110 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/invite
+ */
+import type { APIApplication } from './application';
+import type { APIPartialChannel } from './channel';
+import type { APIGuild } from './guild';
+import type { APIGuildScheduledEvent } from './guildScheduledEvent';
+import type { APIInviteStageInstance } from './stageInstance';
+import type { APIUser } from './user';
+export type APIInviteGuild = Pick<APIGuild, 'id' | 'name' | 'splash' | 'banner' | 'icon' | 'vanity_url_code' | 'description' | 'features' | 'verification_level' | 'nsfw_level' | 'premium_subscription_count'>;
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-object
+ */
+export interface APIInvite {
+ /**
+ * The invite code (unique ID)
+ */
+ code: string;
+ /**
+ * The guild this invite is for
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object
+ */
+ guild?: APIInviteGuild;
+ /**
+ * The channel this invite is for
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object
+ */
+ channel: Required<APIPartialChannel> | null;
+ /**
+ * The user who created the invite
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ inviter?: APIUser;
+ /**
+ * The type of target for this voice channel invite
+ *
+ * See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
+ */
+ target_type?: InviteTargetType;
+ /**
+ * The user whose stream to display for this voice channel stream invite
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ target_user?: APIUser;
+ /**
+ * The embedded application to open for this voice channel embedded application invite
+ *
+ * See https://discord.com/developers/docs/resources/application#application-object
+ */
+ target_application?: Partial<APIApplication>;
+ /**
+ * Approximate count of online members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true`
+ */
+ approximate_presence_count?: number;
+ /**
+ * Approximate count of total members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true`
+ */
+ approximate_member_count?: number;
+ /**
+ * The expiration date of this invite, returned from the `GET /invites/<code>` endpoint when `with_expiration` is `true`
+ */
+ expires_at?: string | null;
+ /**
+ * The stage instance data if there is a public stage instance in the stage channel this invite is for
+ *
+ * @deprecated
+ */
+ stage_instance?: APIInviteStageInstance;
+ /**
+ * The guild scheduled event data, returned from the `GET /invites/<code>` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id
+ */
+ guild_scheduled_event?: APIGuildScheduledEvent;
+}
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
+ */
+export declare enum InviteTargetType {
+ Stream = 1,
+ EmbeddedApplication = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-metadata-object
+ */
+export interface APIExtendedInvite extends APIInvite {
+ /**
+ * Number of times this invite has been used
+ */
+ uses: number;
+ /**
+ * Max number of times this invite can be used
+ */
+ max_uses: number;
+ /**
+ * Duration (in seconds) after which the invite expires
+ */
+ max_age: number;
+ /**
+ * Whether this invite only grants temporary membership
+ */
+ temporary: boolean;
+ /**
+ * When this invite was created
+ */
+ created_at: string;
+}
+//# sourceMappingURL=invite.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/invite.d.ts.map b/node_modules/discord-api-types/payloads/v9/invite.d.ts.map
new file mode 100644
index 0000000..f80ac05
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/invite.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,MAAM,MAAM,cAAc,GAAG,IAAI,CAChC,QAAQ,EACN,IAAI,GACJ,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,iBAAiB,GACjB,aAAa,GACb,UAAU,GACV,oBAAoB,GACpB,YAAY,GACZ,4BAA4B,CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,SAAS;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB;;;;OAIG;IACH,OAAO,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC;IAC5C;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7C;;OAEG;IACH,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC;;OAEG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;;;OAIG;IACH,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC;;OAEG;IACH,qBAAqB,CAAC,EAAE,sBAAsB,CAAC;CAC/C;AAED;;GAEG;AACH,oBAAY,gBAAgB;IAC3B,MAAM,IAAI;IACV,mBAAmB,IAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IACnD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACnB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/invite.js b/node_modules/discord-api-types/payloads/v9/invite.js
new file mode 100644
index 0000000..e41210d
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/invite.js
@@ -0,0 +1,15 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/invite
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.InviteTargetType = void 0;
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
+ */
+var InviteTargetType;
+(function (InviteTargetType) {
+ InviteTargetType[InviteTargetType["Stream"] = 1] = "Stream";
+ InviteTargetType[InviteTargetType["EmbeddedApplication"] = 2] = "EmbeddedApplication";
+})(InviteTargetType = exports.InviteTargetType || (exports.InviteTargetType = {}));
+//# sourceMappingURL=invite.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/invite.js.map b/node_modules/discord-api-types/payloads/v9/invite.js.map
new file mode 100644
index 0000000..8eb61b0
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/invite.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"invite.js","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA4FH;;GAEG;AACH,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC3B,2DAAU,CAAA;IACV,qFAAmB,CAAA;AACpB,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/oauth2.d.ts b/node_modules/discord-api-types/payloads/v9/oauth2.d.ts
new file mode 100644
index 0000000..aa5c6a9
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/oauth2.d.ts
@@ -0,0 +1,132 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/oauth2
+ */
+export declare enum OAuth2Scopes {
+ /**
+ * For oauth2 bots, this puts the bot in the user's selected guild by default
+ */
+ Bot = "bot",
+ /**
+ * Allows [/users/@me/connections](https://discord.com/developers/docs/resources/user#get-user-connections)
+ * to return linked third-party accounts
+ *
+ * See https://discord.com/developers/docs/resources/user#get-user-connections
+ */
+ Connections = "connections",
+ /**
+ * Allows your app to see information about the user's DMs and group DMs - requires Discord approval
+ */
+ DMChannelsRead = "dm_channels.read",
+ /**
+ * Enables [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) to return an `email`
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user
+ */
+ Email = "email",
+ /**
+ * Allows [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) without `email`
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user
+ */
+ Identify = "identify",
+ /**
+ * Allows [/users/@me/guilds](https://discord.com/developers/docs/resources/user#get-current-user-guilds)
+ * to return basic information about all of a user's guilds
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user-guilds
+ */
+ Guilds = "guilds",
+ /**
+ * Allows [/guilds/{guild.id}/members/{user.id}](https://discord.com/developers/docs/resources/guild#add-guild-member)
+ * to be used for joining users to a guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#add-guild-member
+ */
+ GuildsJoin = "guilds.join",
+ /**
+ * Allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user-guild-member
+ */
+ GuildsMembersRead = "guilds.members.read",
+ /**
+ * Allows your app to join users to a group dm
+ *
+ * See https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
+ */
+ GroupDMJoins = "gdm.join",
+ /**
+ * For local rpc server api access, this allows you to read messages from all client channels
+ * (otherwise restricted to channels/guilds your app creates)
+ */
+ MessagesRead = "messages.read",
+ /**
+ * Allows your app to update a user's connection and metadata for the app
+ */
+ RoleConnectionsWrite = "role_connections.write",
+ /**
+ * For local rpc server access, this allows you to control a user's local Discord client - requires Discord approval
+ */
+ RPC = "rpc",
+ /**
+ * For local rpc server api access, this allows you to receive notifications pushed out to the user - requires Discord approval
+ */
+ RPCNotificationsRead = "rpc.notifications.read",
+ /**
+ * This generates a webhook that is returned in the oauth token response for authorization code grants
+ */
+ WebhookIncoming = "webhook.incoming",
+ /**
+ * Allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval
+ */
+ Voice = "voice",
+ /**
+ * Allows your app to upload/update builds for a user's applications - requires Discord approval
+ */
+ ApplicationsBuildsUpload = "applications.builds.upload",
+ /**
+ * Allows your app to read build data for a user's applications
+ */
+ ApplicationsBuildsRead = "applications.builds.read",
+ /**
+ * Allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications
+ */
+ ApplicationsStoreUpdate = "applications.store.update",
+ /**
+ * Allows your app to read entitlements for a user's applications
+ */
+ ApplicationsEntitlements = "applications.entitlements",
+ /**
+ * Allows your app to know a user's friends and implicit relationships - requires Discord approval
+ */
+ RelationshipsRead = "relationships.read",
+ /**
+ * Allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval
+ */
+ ActivitiesRead = "activities.read",
+ /**
+ * Allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
+ *
+ * See https://discord.com/developers/docs/game-sdk/activities
+ */
+ ActivitiesWrite = "activities.write",
+ /**
+ * Allows your app to use Application Commands in a guild
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands
+ */
+ ApplicationsCommands = "applications.commands",
+ /**
+ * Allows your app to update its Application Commands via this bearer token - client credentials grant only
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands
+ */
+ ApplicationsCommandsUpdate = "applications.commands.update",
+ /**
+ * Allows your app to update permissions for its commands using a Bearer token - client credentials grant only
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands
+ */
+ ApplicationCommandsPermissionsUpdate = "applications.commands.permissions.update"
+}
+//# sourceMappingURL=oauth2.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/oauth2.d.ts.map b/node_modules/discord-api-types/payloads/v9/oauth2.d.ts.map
new file mode 100644
index 0000000..2e95cd0
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/oauth2.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,oBAAY,YAAY;IACvB;;OAEG;IACH,GAAG,QAAQ;IACX;;;;;OAKG;IACH,WAAW,gBAAgB;IAC3B;;OAEG;IACH,cAAc,qBAAqB;IACnC;;;;OAIG;IACH,KAAK,UAAU;IACf;;;;OAIG;IACH,QAAQ,aAAa;IACrB;;;;;OAKG;IACH,MAAM,WAAW;IACjB;;;;;OAKG;IACH,UAAU,gBAAgB;IAC1B;;;;OAIG;IACH,iBAAiB,wBAAwB;IACzC;;;;OAIG;IACH,YAAY,aAAa;IACzB;;;OAGG;IACH,YAAY,kBAAkB;IAC9B;;OAEG;IACH,oBAAoB,2BAA2B;IAC/C;;OAEG;IACH,GAAG,QAAQ;IACX;;OAEG;IACH,oBAAoB,2BAA2B;IAC/C;;OAEG;IACH,eAAe,qBAAqB;IACpC;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,wBAAwB,+BAA+B;IACvD;;OAEG;IACH,sBAAsB,6BAA6B;IACnD;;OAEG;IACH,uBAAuB,8BAA8B;IACrD;;OAEG;IACH,wBAAwB,8BAA8B;IACtD;;OAEG;IACH,iBAAiB,uBAAuB;IACxC;;OAEG;IACH,cAAc,oBAAoB;IAClC;;;;OAIG;IACH,eAAe,qBAAqB;IACpC;;;;OAIG;IACH,oBAAoB,0BAA0B;IAC9C;;;;OAIG;IACH,0BAA0B,iCAAiC;IAC3D;;;;OAIG;IACH,oCAAoC,6CAA6C;CACjF"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/oauth2.js b/node_modules/discord-api-types/payloads/v9/oauth2.js
new file mode 100644
index 0000000..22b368f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/oauth2.js
@@ -0,0 +1,136 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/oauth2
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OAuth2Scopes = void 0;
+var OAuth2Scopes;
+(function (OAuth2Scopes) {
+ /**
+ * For oauth2 bots, this puts the bot in the user's selected guild by default
+ */
+ OAuth2Scopes["Bot"] = "bot";
+ /**
+ * Allows [/users/@me/connections](https://discord.com/developers/docs/resources/user#get-user-connections)
+ * to return linked third-party accounts
+ *
+ * See https://discord.com/developers/docs/resources/user#get-user-connections
+ */
+ OAuth2Scopes["Connections"] = "connections";
+ /**
+ * Allows your app to see information about the user's DMs and group DMs - requires Discord approval
+ */
+ OAuth2Scopes["DMChannelsRead"] = "dm_channels.read";
+ /**
+ * Enables [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) to return an `email`
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user
+ */
+ OAuth2Scopes["Email"] = "email";
+ /**
+ * Allows [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) without `email`
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user
+ */
+ OAuth2Scopes["Identify"] = "identify";
+ /**
+ * Allows [/users/@me/guilds](https://discord.com/developers/docs/resources/user#get-current-user-guilds)
+ * to return basic information about all of a user's guilds
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user-guilds
+ */
+ OAuth2Scopes["Guilds"] = "guilds";
+ /**
+ * Allows [/guilds/{guild.id}/members/{user.id}](https://discord.com/developers/docs/resources/guild#add-guild-member)
+ * to be used for joining users to a guild
+ *
+ * See https://discord.com/developers/docs/resources/guild#add-guild-member
+ */
+ OAuth2Scopes["GuildsJoin"] = "guilds.join";
+ /**
+ * Allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild
+ *
+ * See https://discord.com/developers/docs/resources/user#get-current-user-guild-member
+ */
+ OAuth2Scopes["GuildsMembersRead"] = "guilds.members.read";
+ /**
+ * Allows your app to join users to a group dm
+ *
+ * See https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
+ */
+ OAuth2Scopes["GroupDMJoins"] = "gdm.join";
+ /**
+ * For local rpc server api access, this allows you to read messages from all client channels
+ * (otherwise restricted to channels/guilds your app creates)
+ */
+ OAuth2Scopes["MessagesRead"] = "messages.read";
+ /**
+ * Allows your app to update a user's connection and metadata for the app
+ */
+ OAuth2Scopes["RoleConnectionsWrite"] = "role_connections.write";
+ /**
+ * For local rpc server access, this allows you to control a user's local Discord client - requires Discord approval
+ */
+ OAuth2Scopes["RPC"] = "rpc";
+ /**
+ * For local rpc server api access, this allows you to receive notifications pushed out to the user - requires Discord approval
+ */
+ OAuth2Scopes["RPCNotificationsRead"] = "rpc.notifications.read";
+ /**
+ * This generates a webhook that is returned in the oauth token response for authorization code grants
+ */
+ OAuth2Scopes["WebhookIncoming"] = "webhook.incoming";
+ /**
+ * Allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval
+ */
+ OAuth2Scopes["Voice"] = "voice";
+ /**
+ * Allows your app to upload/update builds for a user's applications - requires Discord approval
+ */
+ OAuth2Scopes["ApplicationsBuildsUpload"] = "applications.builds.upload";
+ /**
+ * Allows your app to read build data for a user's applications
+ */
+ OAuth2Scopes["ApplicationsBuildsRead"] = "applications.builds.read";
+ /**
+ * Allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications
+ */
+ OAuth2Scopes["ApplicationsStoreUpdate"] = "applications.store.update";
+ /**
+ * Allows your app to read entitlements for a user's applications
+ */
+ OAuth2Scopes["ApplicationsEntitlements"] = "applications.entitlements";
+ /**
+ * Allows your app to know a user's friends and implicit relationships - requires Discord approval
+ */
+ OAuth2Scopes["RelationshipsRead"] = "relationships.read";
+ /**
+ * Allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval
+ */
+ OAuth2Scopes["ActivitiesRead"] = "activities.read";
+ /**
+ * Allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
+ *
+ * See https://discord.com/developers/docs/game-sdk/activities
+ */
+ OAuth2Scopes["ActivitiesWrite"] = "activities.write";
+ /**
+ * Allows your app to use Application Commands in a guild
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands
+ */
+ OAuth2Scopes["ApplicationsCommands"] = "applications.commands";
+ /**
+ * Allows your app to update its Application Commands via this bearer token - client credentials grant only
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands
+ */
+ OAuth2Scopes["ApplicationsCommandsUpdate"] = "applications.commands.update";
+ /**
+ * Allows your app to update permissions for its commands using a Bearer token - client credentials grant only
+ *
+ * See https://discord.com/developers/docs/interactions/application-commands
+ */
+ OAuth2Scopes["ApplicationCommandsPermissionsUpdate"] = "applications.commands.permissions.update";
+})(OAuth2Scopes = exports.OAuth2Scopes || (exports.OAuth2Scopes = {}));
+//# sourceMappingURL=oauth2.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/oauth2.js.map b/node_modules/discord-api-types/payloads/v9/oauth2.js.map
new file mode 100644
index 0000000..e289280
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/oauth2.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"oauth2.js","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,IAAY,YA+HX;AA/HD,WAAY,YAAY;IACvB;;OAEG;IACH,2BAAW,CAAA;IACX;;;;;OAKG;IACH,2CAA2B,CAAA;IAC3B;;OAEG;IACH,mDAAmC,CAAA;IACnC;;;;OAIG;IACH,+BAAe,CAAA;IACf;;;;OAIG;IACH,qCAAqB,CAAA;IACrB;;;;;OAKG;IACH,iCAAiB,CAAA;IACjB;;;;;OAKG;IACH,0CAA0B,CAAA;IAC1B;;;;OAIG;IACH,yDAAyC,CAAA;IACzC;;;;OAIG;IACH,yCAAyB,CAAA;IACzB;;;OAGG;IACH,8CAA8B,CAAA;IAC9B;;OAEG;IACH,+DAA+C,CAAA;IAC/C;;OAEG;IACH,2BAAW,CAAA;IACX;;OAEG;IACH,+DAA+C,CAAA;IAC/C;;OAEG;IACH,oDAAoC,CAAA;IACpC;;OAEG;IACH,+BAAe,CAAA;IACf;;OAEG;IACH,uEAAuD,CAAA;IACvD;;OAEG;IACH,mEAAmD,CAAA;IACnD;;OAEG;IACH,qEAAqD,CAAA;IACrD;;OAEG;IACH,sEAAsD,CAAA;IACtD;;OAEG;IACH,wDAAwC,CAAA;IACxC;;OAEG;IACH,kDAAkC,CAAA;IAClC;;;;OAIG;IACH,oDAAoC,CAAA;IACpC;;;;OAIG;IACH,8DAA8C,CAAA;IAC9C;;;;OAIG;IACH,2EAA2D,CAAA;IAC3D;;;;OAIG;IACH,iGAAiF,CAAA;AAClF,CAAC,EA/HW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QA+HvB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/permissions.d.ts b/node_modules/discord-api-types/payloads/v9/permissions.d.ts
new file mode 100644
index 0000000..1d0663f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/permissions.d.ts
@@ -0,0 +1,95 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/permissions
+ */
+import type { Permissions, Snowflake } from '../../globals';
+/**
+ * https://discord.com/developers/docs/topics/permissions#role-object
+ */
+export interface APIRole {
+ /**
+ * Role id
+ */
+ id: Snowflake;
+ /**
+ * Role name
+ */
+ name: string;
+ /**
+ * Integer representation of hexadecimal color code
+ */
+ color: number;
+ /**
+ * If this role is pinned in the user listing
+ */
+ hoist: boolean;
+ /**
+ * The role icon hash
+ */
+ icon?: string | null;
+ /**
+ * The role unicode emoji as a standard emoji
+ */
+ unicode_emoji?: string | null;
+ /**
+ * Position of this role
+ */
+ position: number;
+ /**
+ * Permission bit set
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ */
+ permissions: Permissions;
+ /**
+ * Whether this role is managed by an integration
+ */
+ managed: boolean;
+ /**
+ * Whether this role is mentionable
+ */
+ mentionable: boolean;
+ /**
+ * The tags this role has
+ */
+ tags?: APIRoleTags;
+ /**
+ * Role flags
+ */
+ flags: RoleFlags;
+}
+/**
+ * https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure
+ */
+export interface APIRoleTags {
+ /**
+ * The id of the bot this role belongs to
+ */
+ bot_id?: Snowflake;
+ /**
+ * Whether this is the guild's premium subscriber role
+ */
+ premium_subscriber?: null;
+ /**
+ * The id of the integration this role belongs to
+ */
+ integration_id?: Snowflake;
+ /**
+ * The id of this role's subscription sku and listing
+ */
+ subscription_listing_id?: Snowflake;
+ /**
+ * Whether this role is available for purchase
+ */
+ available_for_purchase?: null;
+ /**
+ * Whether this role is a guild's linked role
+ */
+ guild_connections?: null;
+}
+export declare enum RoleFlags {
+ /**
+ * Role can be selected by members in an onboarding prompt
+ */
+ InPrompt = 1
+}
+//# sourceMappingURL=permissions.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/permissions.d.ts.map b/node_modules/discord-api-types/payloads/v9/permissions.d.ts.map
new file mode 100644
index 0000000..d4d9554
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/permissions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,WAAW,EAAE,WAAW,CAAC;IACzB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,IAAI,CAAC;IAC1B;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,uBAAuB,CAAC,EAAE,SAAS,CAAC;IACpC;;OAEG;IACH,sBAAsB,CAAC,EAAE,IAAI,CAAC;IAC9B;;OAEG;IACH,iBAAiB,CAAC,EAAE,IAAI,CAAC;CACzB;AAED,oBAAY,SAAS;IACpB;;OAEG;IACH,QAAQ,IAAS;CACjB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/permissions.js b/node_modules/discord-api-types/payloads/v9/permissions.js
new file mode 100644
index 0000000..eaa6068
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/permissions.js
@@ -0,0 +1,14 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/permissions
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.RoleFlags = void 0;
+var RoleFlags;
+(function (RoleFlags) {
+ /**
+ * Role can be selected by members in an onboarding prompt
+ */
+ RoleFlags[RoleFlags["InPrompt"] = 1] = "InPrompt";
+})(RoleFlags = exports.RoleFlags || (exports.RoleFlags = {}));
+//# sourceMappingURL=permissions.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/permissions.js.map b/node_modules/discord-api-types/payloads/v9/permissions.js.map
new file mode 100644
index 0000000..eae0aef
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/permissions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"permissions.js","sourceRoot":"","sources":["permissions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA0FH,IAAY,SAKX;AALD,WAAY,SAAS;IACpB;;OAEG;IACH,iDAAiB,CAAA;AAClB,CAAC,EALW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAKpB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/stageInstance.d.ts b/node_modules/discord-api-types/payloads/v9/stageInstance.d.ts
new file mode 100644
index 0000000..9e32468
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/stageInstance.d.ts
@@ -0,0 +1,80 @@
+import type { Snowflake } from '../../globals';
+import type { APIGuildMember } from './guild';
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#stage-instance-object
+ */
+export interface APIStageInstance {
+ /**
+ * The id of the stage instance
+ */
+ id: Snowflake;
+ /**
+ * The guild id of the associated stage channel
+ */
+ guild_id: Snowflake;
+ /**
+ * The id of the associated stage channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The topic of the stage instance (1-120 characters)
+ */
+ topic: string;
+ /**
+ * The privacy level of the stage instance
+ *
+ * See https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
+ */
+ privacy_level: StageInstancePrivacyLevel;
+ /**
+ * Whether or not stage discovery is disabled
+ *
+ * @deprecated
+ */
+ discoverable_disabled: boolean;
+ /**
+ * The id of the scheduled event for this stage instance
+ */
+ guild_scheduled_event_id?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
+ */
+export declare enum StageInstancePrivacyLevel {
+ /**
+ * The stage instance is visible publicly, such as on stage discovery
+ *
+ * @deprecated
+ */
+ Public = 1,
+ /**
+ * The stage instance is visible to only guild members
+ */
+ GuildOnly = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/invite#invite-stage-instance-object-invite-stage-instance-structure
+ *
+ * @deprecated
+ */
+export interface APIInviteStageInstance {
+ /**
+ * The topic of the stage instance (1-120 characters)
+ */
+ topic: string;
+ /**
+ * The number of users in the stage
+ */
+ participant_count: number;
+ /**
+ * The number of users speaking in the stage
+ */
+ speaker_count: number;
+ /**
+ * The members speaking in the stage
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure
+ */
+ members: APIGuildMember[];
+}
+//# sourceMappingURL=stageInstance.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/stageInstance.d.ts.map b/node_modules/discord-api-types/payloads/v9/stageInstance.d.ts.map
new file mode 100644
index 0000000..0486326
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/stageInstance.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"stageInstance.d.ts","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,EAAE,yBAAyB,CAAC;IACzC;;;;OAIG;IACH,qBAAqB,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,wBAAwB,CAAC,EAAE,SAAS,CAAC;CACrC;AAED;;GAEG;AACH,oBAAY,yBAAyB;IACpC;;;;OAIG;IACH,MAAM,IAAI;IACV;;OAEG;IACH,SAAS,IAAA;CACT;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,OAAO,EAAE,cAAc,EAAE,CAAC;CAC1B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/stageInstance.js b/node_modules/discord-api-types/payloads/v9/stageInstance.js
new file mode 100644
index 0000000..7796191
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/stageInstance.js
@@ -0,0 +1,20 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.StageInstancePrivacyLevel = void 0;
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
+ */
+var StageInstancePrivacyLevel;
+(function (StageInstancePrivacyLevel) {
+ /**
+ * The stage instance is visible publicly, such as on stage discovery
+ *
+ * @deprecated
+ */
+ StageInstancePrivacyLevel[StageInstancePrivacyLevel["Public"] = 1] = "Public";
+ /**
+ * The stage instance is visible to only guild members
+ */
+ StageInstancePrivacyLevel[StageInstancePrivacyLevel["GuildOnly"] = 2] = "GuildOnly";
+})(StageInstancePrivacyLevel = exports.StageInstancePrivacyLevel || (exports.StageInstancePrivacyLevel = {}));
+//# sourceMappingURL=stageInstance.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/stageInstance.js.map b/node_modules/discord-api-types/payloads/v9/stageInstance.js.map
new file mode 100644
index 0000000..a8aa834
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/stageInstance.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"stageInstance.js","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":";;;AAyCA;;GAEG;AACH,IAAY,yBAWX;AAXD,WAAY,yBAAyB;IACpC;;;;OAIG;IACH,6EAAU,CAAA;IACV;;OAEG;IACH,mFAAS,CAAA;AACV,CAAC,EAXW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAWpC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/sticker.d.ts b/node_modules/discord-api-types/payloads/v9/sticker.d.ts
new file mode 100644
index 0000000..4edbd78
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/sticker.d.ts
@@ -0,0 +1,124 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/sticker
+ */
+import type { Snowflake } from '../../globals';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-object
+ */
+export interface APISticker {
+ /**
+ * ID of the sticker
+ */
+ id: Snowflake;
+ /**
+ * For standard stickers, ID of the pack the sticker is from
+ */
+ pack_id?: Snowflake;
+ /**
+ * Name of the sticker
+ */
+ name: string;
+ /**
+ * Description of the sticker
+ */
+ description: string | null;
+ /**
+ * For guild stickers, the Discord name of a unicode emoji representing the sticker's expression. for standard stickers, a comma-separated list of related expressions.
+ */
+ tags: string;
+ /**
+ * Previously the sticker asset hash, now an empty string
+ *
+ * @deprecated
+ */
+ asset?: '';
+ /**
+ * Type of sticker
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
+ */
+ type: StickerType;
+ /**
+ * Type of sticker format
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
+ */
+ format_type: StickerFormatType;
+ /**
+ * Whether this guild sticker can be used, may be false due to loss of Server Boosts
+ */
+ available?: boolean;
+ /**
+ * ID of the guild that owns this sticker
+ */
+ guild_id?: Snowflake;
+ /**
+ * The user that uploaded the guild sticker
+ */
+ user?: APIUser;
+ /**
+ * The standard sticker's sort order within its pack
+ */
+ sort_value?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
+ */
+export declare enum StickerType {
+ /**
+ * An official sticker in a pack, part of Nitro or in a removed purchasable pack
+ */
+ Standard = 1,
+ /**
+ * A sticker uploaded to a guild for the guild's members
+ */
+ Guild = 2
+}
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
+ */
+export declare enum StickerFormatType {
+ PNG = 1,
+ APNG = 2,
+ Lottie = 3,
+ GIF = 4
+}
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-item-object
+ */
+export type APIStickerItem = Pick<APISticker, 'id' | 'name' | 'format_type'>;
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-pack-object
+ */
+export interface APIStickerPack {
+ /**
+ * ID of the sticker pack
+ */
+ id: Snowflake;
+ /**
+ * The stickers in the pack
+ */
+ stickers: APISticker[];
+ /**
+ * Name of the sticker pack
+ */
+ name: string;
+ /**
+ * ID of the pack's SKU
+ */
+ sku_id: Snowflake;
+ /**
+ * ID of a sticker in the pack which is shown as the pack's icon
+ */
+ cover_sticker_id?: Snowflake;
+ /**
+ * Description of the sticker pack
+ */
+ description: string;
+ /**
+ * ID of the sticker pack's banner image
+ */
+ banner_asset_id?: Snowflake;
+}
+//# sourceMappingURL=sticker.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/sticker.d.ts.map b/node_modules/discord-api-types/payloads/v9/sticker.d.ts.map
new file mode 100644
index 0000000..8e5d1c0
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/sticker.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"sticker.d.ts","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,CAAC,EAAE,EAAE,CAAC;IACX;;;;OAIG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;;;OAIG;IACH,WAAW,EAAE,iBAAiB,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,oBAAY,WAAW;IACtB;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,KAAK,IAAA;CACL;AAED;;GAEG;AACH,oBAAY,iBAAiB;IAC5B,GAAG,IAAI;IACP,IAAI,IAAA;IACJ,MAAM,IAAA;IACN,GAAG,IAAA;CACH;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,MAAM,GAAG,aAAa,CAAC,CAAC;AAE7E;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;CAC5B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/sticker.js b/node_modules/discord-api-types/payloads/v9/sticker.js
new file mode 100644
index 0000000..7d96714
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/sticker.js
@@ -0,0 +1,31 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/sticker
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.StickerFormatType = exports.StickerType = void 0;
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
+ */
+var StickerType;
+(function (StickerType) {
+ /**
+ * An official sticker in a pack, part of Nitro or in a removed purchasable pack
+ */
+ StickerType[StickerType["Standard"] = 1] = "Standard";
+ /**
+ * A sticker uploaded to a guild for the guild's members
+ */
+ StickerType[StickerType["Guild"] = 2] = "Guild";
+})(StickerType = exports.StickerType || (exports.StickerType = {}));
+/**
+ * https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
+ */
+var StickerFormatType;
+(function (StickerFormatType) {
+ StickerFormatType[StickerFormatType["PNG"] = 1] = "PNG";
+ StickerFormatType[StickerFormatType["APNG"] = 2] = "APNG";
+ StickerFormatType[StickerFormatType["Lottie"] = 3] = "Lottie";
+ StickerFormatType[StickerFormatType["GIF"] = 4] = "GIF";
+})(StickerFormatType = exports.StickerFormatType || (exports.StickerFormatType = {}));
+//# sourceMappingURL=sticker.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/sticker.js.map b/node_modules/discord-api-types/payloads/v9/sticker.js.map
new file mode 100644
index 0000000..c1d2495
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/sticker.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"sticker.js","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAiEH;;GAEG;AACH,IAAY,WASX;AATD,WAAY,WAAW;IACtB;;OAEG;IACH,qDAAY,CAAA;IACZ;;OAEG;IACH,+CAAK,CAAA;AACN,CAAC,EATW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAStB;AAED;;GAEG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC5B,uDAAO,CAAA;IACP,yDAAI,CAAA;IACJ,6DAAM,CAAA;IACN,uDAAG,CAAA;AACJ,CAAC,EALW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAK5B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/teams.d.ts b/node_modules/discord-api-types/payloads/v9/teams.d.ts
new file mode 100644
index 0000000..0f8d0b7
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/teams.d.ts
@@ -0,0 +1,63 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/teams
+ */
+import type { Snowflake } from '../../globals';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/topics/teams#data-models-team-object
+ */
+export interface APITeam {
+ /**
+ * A hash of the image of the team's icon
+ */
+ icon: string | null;
+ /**
+ * The unique id of the team
+ */
+ id: Snowflake;
+ /**
+ * The members of the team
+ */
+ members: APITeamMember[];
+ /**
+ * The name of the team
+ */
+ name: string;
+ /**
+ * The user id of the current team owner
+ */
+ owner_user_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/topics/teams#data-models-team-member-object
+ */
+export interface APITeamMember {
+ /**
+ * The user's membership state on the team
+ *
+ * See https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
+ */
+ membership_state: TeamMemberMembershipState;
+ /**
+ * Will always be `["*"]`
+ */
+ permissions: ['*'];
+ /**
+ * The id of the parent team of which they are a member
+ */
+ team_id: Snowflake;
+ /**
+ * The avatar, discriminator, id, and username of the user
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
+ */
+export declare enum TeamMemberMembershipState {
+ Invited = 1,
+ Accepted = 2
+}
+//# sourceMappingURL=teams.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/teams.d.ts.map b/node_modules/discord-api-types/payloads/v9/teams.d.ts.map
new file mode 100644
index 0000000..a80ab8f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/teams.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["teams.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,aAAa,EAAE,SAAS,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B;;;;OAIG;IACH,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C;;OAEG;IACH,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC;IACnB;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;CACd;AAED;;GAEG;AACH,oBAAY,yBAAyB;IACpC,OAAO,IAAI;IACX,QAAQ,IAAA;CACR"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/teams.js b/node_modules/discord-api-types/payloads/v9/teams.js
new file mode 100644
index 0000000..8218efd
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/teams.js
@@ -0,0 +1,15 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/topics/teams
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.TeamMemberMembershipState = void 0;
+/**
+ * https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
+ */
+var TeamMemberMembershipState;
+(function (TeamMemberMembershipState) {
+ TeamMemberMembershipState[TeamMemberMembershipState["Invited"] = 1] = "Invited";
+ TeamMemberMembershipState[TeamMemberMembershipState["Accepted"] = 2] = "Accepted";
+})(TeamMemberMembershipState = exports.TeamMemberMembershipState || (exports.TeamMemberMembershipState = {}));
+//# sourceMappingURL=teams.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/teams.js.map b/node_modules/discord-api-types/payloads/v9/teams.js.map
new file mode 100644
index 0000000..de84691
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/teams.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"teams.js","sourceRoot":"","sources":["teams.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAyDH;;GAEG;AACH,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACpC,+EAAW,CAAA;IACX,iFAAQ,CAAA;AACT,CAAC,EAHW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAGpC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/template.d.ts b/node_modules/discord-api-types/payloads/v9/template.d.ts
new file mode 100644
index 0000000..ed3c17a
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/template.d.ts
@@ -0,0 +1,63 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/guild-template
+ */
+import type { Snowflake } from '../../globals';
+import type { RESTPostAPIGuildsJSONBody } from '../../rest/v9/index';
+import type { APIUser } from './user';
+/**
+ * https://discord.com/developers/docs/resources/guild-template#template-object
+ */
+export interface APITemplate {
+ /**
+ * The template code (unique ID)
+ */
+ code: string;
+ /**
+ * Template name
+ */
+ name: string;
+ /**
+ * The description for the template
+ */
+ description: string | null;
+ /**
+ * Number of times this template has been used
+ */
+ usage_count: number;
+ /**
+ * The ID of the user who created the template
+ */
+ creator_id: Snowflake;
+ /**
+ * The user who created the template
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ creator: APIUser;
+ /**
+ * When this template was created
+ */
+ created_at: string;
+ /**
+ * When this template was last synced to the source guild
+ */
+ updated_at: string;
+ /**
+ * The ID of the guild this template is based on
+ */
+ source_guild_id: Snowflake;
+ /**
+ * The guild snapshot this template contains
+ */
+ serialized_source_guild: APITemplateSerializedSourceGuild;
+ /**
+ * Whether the template has unsynced changes
+ */
+ is_dirty: boolean | null;
+}
+export interface APITemplateSerializedSourceGuild extends Omit<RESTPostAPIGuildsJSONBody, 'icon'> {
+ description: string | null;
+ preferred_locale: string;
+ icon_hash: string | null;
+}
+//# sourceMappingURL=template.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/template.d.ts.map b/node_modules/discord-api-types/payloads/v9/template.d.ts.map
new file mode 100644
index 0000000..b38bd59
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/template.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,eAAe,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,uBAAuB,EAAE,gCAAgC,CAAC;IAC1D;;OAEG;IACH,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,gCAAiC,SAAQ,IAAI,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAChG,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/template.js b/node_modules/discord-api-types/payloads/v9/template.js
new file mode 100644
index 0000000..1316c33
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/template.js
@@ -0,0 +1,6 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/guild-template
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=template.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/template.js.map b/node_modules/discord-api-types/payloads/v9/template.js.map
new file mode 100644
index 0000000..12683e3
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/template.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"template.js","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":";AAAA;;GAEG"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/user.d.ts b/node_modules/discord-api-types/payloads/v9/user.d.ts
new file mode 100644
index 0000000..c990b07
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/user.d.ts
@@ -0,0 +1,309 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/user
+ */
+import type { Snowflake } from '../../globals';
+import type { APIGuildIntegration } from './guild';
+/**
+ * https://discord.com/developers/docs/resources/user#user-object
+ */
+export interface APIUser {
+ /**
+ * The user's id
+ */
+ id: Snowflake;
+ /**
+ * The user's username, not unique across the platform
+ */
+ username: string;
+ /**
+ * The user's Discord-tag
+ */
+ discriminator: string;
+ /**
+ * The user's display name, if it is set. For bots, this is the application name
+ */
+ global_name: string | null;
+ /**
+ * The user's avatar hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ avatar: string | null;
+ /**
+ * Whether the user belongs to an OAuth2 application
+ */
+ bot?: boolean;
+ /**
+ * Whether the user is an Official Discord System user (part of the urgent message system)
+ */
+ system?: boolean;
+ /**
+ * Whether the user has two factor enabled on their account
+ */
+ mfa_enabled?: boolean;
+ /**
+ * The user's banner hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ banner?: string | null;
+ /**
+ * The user's banner color encoded as an integer representation of hexadecimal color code
+ */
+ accent_color?: number | null;
+ /**
+ * The user's chosen language option
+ */
+ locale?: string;
+ /**
+ * Whether the email on this account has been verified
+ */
+ verified?: boolean;
+ /**
+ * The user's email
+ */
+ email?: string | null;
+ /**
+ * The flags on a user's account
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object-user-flags
+ */
+ flags?: UserFlags;
+ /**
+ * The type of Nitro subscription on a user's account
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object-premium-types
+ */
+ premium_type?: UserPremiumType;
+ /**
+ * The public flags on a user's account
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object-user-flags
+ */
+ public_flags?: UserFlags;
+ /**
+ * The user's avatar decoration hash
+ *
+ * See https://discord.com/developers/docs/reference#image-formatting
+ */
+ avatar_decoration?: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/user#user-object-user-flags
+ */
+export declare enum UserFlags {
+ /**
+ * Discord Employee
+ */
+ Staff = 1,
+ /**
+ * Partnered Server Owner
+ */
+ Partner = 2,
+ /**
+ * HypeSquad Events Member
+ */
+ Hypesquad = 4,
+ /**
+ * Bug Hunter Level 1
+ */
+ BugHunterLevel1 = 8,
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ MFASMS = 16,
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ PremiumPromoDismissed = 32,
+ /**
+ * House Bravery Member
+ */
+ HypeSquadOnlineHouse1 = 64,
+ /**
+ * House Brilliance Member
+ */
+ HypeSquadOnlineHouse2 = 128,
+ /**
+ * House Balance Member
+ */
+ HypeSquadOnlineHouse3 = 256,
+ /**
+ * Early Nitro Supporter
+ */
+ PremiumEarlySupporter = 512,
+ /**
+ * User is a [team](https://discord.com/developers/docs/topics/teams)
+ */
+ TeamPseudoUser = 1024,
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ HasUnreadUrgentMessages = 8192,
+ /**
+ * Bug Hunter Level 2
+ */
+ BugHunterLevel2 = 16384,
+ /**
+ * Verified Bot
+ */
+ VerifiedBot = 65536,
+ /**
+ * Early Verified Bot Developer
+ */
+ VerifiedDeveloper = 131072,
+ /**
+ * Moderator Programs Alumni
+ */
+ CertifiedModerator = 262144,
+ /**
+ * Bot uses only [HTTP interactions](https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction) and is shown in the online member list
+ */
+ BotHTTPInteractions = 524288,
+ /**
+ * User has been identified as spammer
+ *
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ Spammer = 1048576,
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ DisablePremium = 2097152,
+ /**
+ * User is an [Active Developer](https://support-dev.discord.com/hc/articles/10113997751447)
+ */
+ ActiveDeveloper = 4194304,
+ /**
+ * User's account has been [quarantined](https://support.discord.com/hc/articles/6461420677527) based on recent activity
+ *
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ * @privateRemarks
+ *
+ * This value would be 1 << 44, but bit shifting above 1 << 30 requires bigints
+ */
+ Quarantined = 17592186044416,
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ * @privateRemarks
+ *
+ * This value would be 1 << 50, but bit shifting above 1 << 30 requires bigints
+ */
+ Collaborator = 1125899906842624,
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ * @privateRemarks
+ *
+ * This value would be 1 << 51, but bit shifting above 1 << 30 requires bigints
+ */
+ RestrictedCollaborator = 2251799813685248
+}
+/**
+ * https://discord.com/developers/docs/resources/user#user-object-premium-types
+ */
+export declare enum UserPremiumType {
+ None = 0,
+ NitroClassic = 1,
+ Nitro = 2,
+ NitroBasic = 3
+}
+/**
+ * https://discord.com/developers/docs/resources/user#connection-object
+ */
+export interface APIConnection {
+ /**
+ * ID of the connection account
+ */
+ id: string;
+ /**
+ * The username of the connection account
+ */
+ name: string;
+ /**
+ * The service of the connection
+ *
+ * See https://discord.com/developers/docs/resources/user#connection-object-services
+ */
+ type: ConnectionService;
+ /**
+ * Whether the connection is revoked
+ */
+ revoked?: boolean;
+ /**
+ * An array of partial server integrations
+ *
+ * See https://discord.com/developers/docs/resources/guild#integration-object
+ */
+ integrations?: Partial<APIGuildIntegration>[];
+ /**
+ * Whether the connection is verified
+ */
+ verified: boolean;
+ /**
+ * Whether friend sync is enabled for this connection
+ */
+ friend_sync: boolean;
+ /**
+ * Whether activities related to this connection will be shown in presence updates
+ */
+ show_activity: boolean;
+ /**
+ * Whether this connection supports console voice transfer
+ */
+ two_way_link: boolean;
+ /**
+ * Visibility of this connection
+ *
+ * See https://discord.com/developers/docs/resources/user#connection-object-visibility-types
+ */
+ visibility: ConnectionVisibility;
+}
+export declare enum ConnectionService {
+ BattleNet = "battlenet",
+ eBay = "ebay",
+ EpicGames = "epicgames",
+ Facebook = "facebook",
+ GitHub = "github",
+ Instagram = "instagram",
+ LeagueOfLegends = "leagueoflegends",
+ PlayStationNetwork = "playstation",
+ Reddit = "reddit",
+ RiotGames = "riotgames",
+ PayPal = "paypal",
+ Spotify = "spotify",
+ Skype = "skype",
+ Steam = "steam",
+ TikTok = "tiktok",
+ Twitch = "twitch",
+ Twitter = "twitter",
+ Xbox = "xbox",
+ YouTube = "youtube"
+}
+export declare enum ConnectionVisibility {
+ /**
+ * Invisible to everyone except the user themselves
+ */
+ None = 0,
+ /**
+ * Visible to everyone
+ */
+ Everyone = 1
+}
+/**
+ * https://discord.com/developers/docs/resources/user#application-role-connection-object-application-role-connection-structure
+ */
+export interface APIApplicationRoleConnection {
+ /**
+ * The vanity name of the platform a bot has connected (max 50 characters)
+ */
+ platform_name: string | null;
+ /**
+ * The username on the platform a bot has connected (max 100 characters)
+ */
+ platform_username: string | null;
+ /**
+ * Object mapping application role connection metadata keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected
+ */
+ metadata: Record<string, string | number>;
+}
+//# sourceMappingURL=user.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/user.d.ts.map b/node_modules/discord-api-types/payloads/v9/user.d.ts.map
new file mode 100644
index 0000000..3e0f174
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/user.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD;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BAAoB;IACnC,kBAAkB,gBAAgB;IAClC,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,OAAO,YAAY;CACnB;AAED,oBAAY,oBAAoB;IAC/B;;OAEG;IACH,IAAI,IAAA;IACJ;;OAEG;IACH,QAAQ,IAAA;CACR;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CAC1C"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/user.js b/node_modules/discord-api-types/payloads/v9/user.js
new file mode 100644
index 0000000..8a2fde4
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/user.js
@@ -0,0 +1,161 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/user
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ConnectionVisibility = exports.ConnectionService = exports.UserPremiumType = exports.UserFlags = void 0;
+/**
+ * https://discord.com/developers/docs/resources/user#user-object-user-flags
+ */
+var UserFlags;
+(function (UserFlags) {
+ /**
+ * Discord Employee
+ */
+ UserFlags[UserFlags["Staff"] = 1] = "Staff";
+ /**
+ * Partnered Server Owner
+ */
+ UserFlags[UserFlags["Partner"] = 2] = "Partner";
+ /**
+ * HypeSquad Events Member
+ */
+ UserFlags[UserFlags["Hypesquad"] = 4] = "Hypesquad";
+ /**
+ * Bug Hunter Level 1
+ */
+ UserFlags[UserFlags["BugHunterLevel1"] = 8] = "BugHunterLevel1";
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ UserFlags[UserFlags["MFASMS"] = 16] = "MFASMS";
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ UserFlags[UserFlags["PremiumPromoDismissed"] = 32] = "PremiumPromoDismissed";
+ /**
+ * House Bravery Member
+ */
+ UserFlags[UserFlags["HypeSquadOnlineHouse1"] = 64] = "HypeSquadOnlineHouse1";
+ /**
+ * House Brilliance Member
+ */
+ UserFlags[UserFlags["HypeSquadOnlineHouse2"] = 128] = "HypeSquadOnlineHouse2";
+ /**
+ * House Balance Member
+ */
+ UserFlags[UserFlags["HypeSquadOnlineHouse3"] = 256] = "HypeSquadOnlineHouse3";
+ /**
+ * Early Nitro Supporter
+ */
+ UserFlags[UserFlags["PremiumEarlySupporter"] = 512] = "PremiumEarlySupporter";
+ /**
+ * User is a [team](https://discord.com/developers/docs/topics/teams)
+ */
+ UserFlags[UserFlags["TeamPseudoUser"] = 1024] = "TeamPseudoUser";
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ UserFlags[UserFlags["HasUnreadUrgentMessages"] = 8192] = "HasUnreadUrgentMessages";
+ /**
+ * Bug Hunter Level 2
+ */
+ UserFlags[UserFlags["BugHunterLevel2"] = 16384] = "BugHunterLevel2";
+ /**
+ * Verified Bot
+ */
+ UserFlags[UserFlags["VerifiedBot"] = 65536] = "VerifiedBot";
+ /**
+ * Early Verified Bot Developer
+ */
+ UserFlags[UserFlags["VerifiedDeveloper"] = 131072] = "VerifiedDeveloper";
+ /**
+ * Moderator Programs Alumni
+ */
+ UserFlags[UserFlags["CertifiedModerator"] = 262144] = "CertifiedModerator";
+ /**
+ * Bot uses only [HTTP interactions](https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction) and is shown in the online member list
+ */
+ UserFlags[UserFlags["BotHTTPInteractions"] = 524288] = "BotHTTPInteractions";
+ /**
+ * User has been identified as spammer
+ *
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ UserFlags[UserFlags["Spammer"] = 1048576] = "Spammer";
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ */
+ UserFlags[UserFlags["DisablePremium"] = 2097152] = "DisablePremium";
+ /**
+ * User is an [Active Developer](https://support-dev.discord.com/hc/articles/10113997751447)
+ */
+ UserFlags[UserFlags["ActiveDeveloper"] = 4194304] = "ActiveDeveloper";
+ /**
+ * User's account has been [quarantined](https://support.discord.com/hc/articles/6461420677527) based on recent activity
+ *
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ * @privateRemarks
+ *
+ * This value would be 1 << 44, but bit shifting above 1 << 30 requires bigints
+ */
+ UserFlags[UserFlags["Quarantined"] = 17592186044416] = "Quarantined";
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ * @privateRemarks
+ *
+ * This value would be 1 << 50, but bit shifting above 1 << 30 requires bigints
+ */
+ UserFlags[UserFlags["Collaborator"] = 1125899906842624] = "Collaborator";
+ /**
+ * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
+ * @privateRemarks
+ *
+ * This value would be 1 << 51, but bit shifting above 1 << 30 requires bigints
+ */
+ UserFlags[UserFlags["RestrictedCollaborator"] = 2251799813685248] = "RestrictedCollaborator";
+})(UserFlags = exports.UserFlags || (exports.UserFlags = {}));
+/**
+ * https://discord.com/developers/docs/resources/user#user-object-premium-types
+ */
+var UserPremiumType;
+(function (UserPremiumType) {
+ UserPremiumType[UserPremiumType["None"] = 0] = "None";
+ UserPremiumType[UserPremiumType["NitroClassic"] = 1] = "NitroClassic";
+ UserPremiumType[UserPremiumType["Nitro"] = 2] = "Nitro";
+ UserPremiumType[UserPremiumType["NitroBasic"] = 3] = "NitroBasic";
+})(UserPremiumType = exports.UserPremiumType || (exports.UserPremiumType = {}));
+var ConnectionService;
+(function (ConnectionService) {
+ ConnectionService["BattleNet"] = "battlenet";
+ ConnectionService["eBay"] = "ebay";
+ ConnectionService["EpicGames"] = "epicgames";
+ ConnectionService["Facebook"] = "facebook";
+ ConnectionService["GitHub"] = "github";
+ ConnectionService["Instagram"] = "instagram";
+ ConnectionService["LeagueOfLegends"] = "leagueoflegends";
+ ConnectionService["PlayStationNetwork"] = "playstation";
+ ConnectionService["Reddit"] = "reddit";
+ ConnectionService["RiotGames"] = "riotgames";
+ ConnectionService["PayPal"] = "paypal";
+ ConnectionService["Spotify"] = "spotify";
+ ConnectionService["Skype"] = "skype";
+ ConnectionService["Steam"] = "steam";
+ ConnectionService["TikTok"] = "tiktok";
+ ConnectionService["Twitch"] = "twitch";
+ ConnectionService["Twitter"] = "twitter";
+ ConnectionService["Xbox"] = "xbox";
+ ConnectionService["YouTube"] = "youtube";
+})(ConnectionService = exports.ConnectionService || (exports.ConnectionService = {}));
+var ConnectionVisibility;
+(function (ConnectionVisibility) {
+ /**
+ * Invisible to everyone except the user themselves
+ */
+ ConnectionVisibility[ConnectionVisibility["None"] = 0] = "None";
+ /**
+ * Visible to everyone
+ */
+ ConnectionVisibility[ConnectionVisibility["Everyone"] = 1] = "Everyone";
+})(ConnectionVisibility = exports.ConnectionVisibility || (exports.ConnectionVisibility = {}));
+//# sourceMappingURL=user.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/user.js.map b/node_modules/discord-api-types/payloads/v9/user.js.map
new file mode 100644
index 0000000..5f3c4af
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/user.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA2FH;;GAEG;AACH,IAAY,SA0GX;AA1GD,WAAY,SAAS;IACpB;;OAEG;IACH,2CAAc,CAAA;IACd;;OAEG;IACH,+CAAgB,CAAA;IAChB;;OAEG;IACH,mDAAkB,CAAA;IAClB;;OAEG;IACH,+DAAwB,CAAA;IACxB;;OAEG;IACH,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CAAmB,CAAA;IACnB,kCAAa,CAAA;IACb,wCAAmB,CAAA;AACpB,CAAC,EApBW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAoB5B;AAED,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC/B;;OAEG;IACH,+DAAI,CAAA;IACJ;;OAEG;IACH,uEAAQ,CAAA;AACT,CAAC,EATW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAS/B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/voice.d.ts b/node_modules/discord-api-types/payloads/v9/voice.d.ts
new file mode 100644
index 0000000..ca28e61
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/voice.d.ts
@@ -0,0 +1,90 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/voice
+ */
+import type { Snowflake } from '../../globals';
+import type { APIGuildMember } from './guild';
+/**
+ * https://discord.com/developers/docs/resources/voice#voice-state-object
+ */
+export interface GatewayVoiceState {
+ /**
+ * The guild id this voice state is for
+ */
+ guild_id?: Snowflake;
+ /**
+ * The channel id this user is connected to
+ */
+ channel_id: Snowflake | null;
+ /**
+ * The user id this voice state is for
+ */
+ user_id: Snowflake;
+ /**
+ * The guild member this voice state is for
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-member-object
+ */
+ member?: APIGuildMember;
+ /**
+ * The session id for this voice state
+ */
+ session_id: string;
+ /**
+ * Whether this user is deafened by the server
+ */
+ deaf: boolean;
+ /**
+ * Whether this user is muted by the server
+ */
+ mute: boolean;
+ /**
+ * Whether this user is locally deafened
+ */
+ self_deaf: boolean;
+ /**
+ * Whether this user is locally muted
+ */
+ self_mute: boolean;
+ /**
+ * Whether this user is streaming using "Go Live"
+ */
+ self_stream?: boolean;
+ /**
+ * Whether this user's camera is enabled
+ */
+ self_video: boolean;
+ /**
+ * Whether this user is muted by the current user
+ */
+ suppress: boolean;
+ /**
+ * The time at which the user requested to speak
+ */
+ request_to_speak_timestamp: string | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/voice#voice-region-object
+ */
+export interface APIVoiceRegion {
+ /**
+ * Unique ID for the region
+ */
+ id: string;
+ /**
+ * Name of the region
+ */
+ name: string;
+ /**
+ * `true` for a single server that is closest to the current user's client
+ */
+ optimal: boolean;
+ /**
+ * Whether this is a deprecated voice region (avoid switching to these)
+ */
+ deprecated: boolean;
+ /**
+ * Whether this is a custom voice region (used for events/etc)
+ */
+ custom: boolean;
+}
+//# sourceMappingURL=voice.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/voice.d.ts.map b/node_modules/discord-api-types/payloads/v9/voice.d.ts.map
new file mode 100644
index 0000000..966c242
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/voice.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,UAAU,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;CAChB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/voice.js b/node_modules/discord-api-types/payloads/v9/voice.js
new file mode 100644
index 0000000..8e67862
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/voice.js
@@ -0,0 +1,6 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/voice
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=voice.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/voice.js.map b/node_modules/discord-api-types/payloads/v9/voice.js.map
new file mode 100644
index 0000000..e54835f
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/voice.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"voice.js","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":";AAAA;;GAEG"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/webhook.d.ts b/node_modules/discord-api-types/payloads/v9/webhook.d.ts
new file mode 100644
index 0000000..3241e39
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/webhook.d.ts
@@ -0,0 +1,77 @@
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/webhook
+ */
+import type { Snowflake } from '../../globals';
+import type { APIPartialChannel, APIPartialGuild, APIUser } from './index';
+/**
+ * https://discord.com/developers/docs/resources/webhook#webhook-object
+ */
+export interface APIWebhook {
+ /**
+ * The id of the webhook
+ */
+ id: Snowflake;
+ /**
+ * The type of the webhook
+ *
+ * See https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types
+ */
+ type: WebhookType;
+ /**
+ * The guild id this webhook is for
+ */
+ guild_id?: Snowflake;
+ /**
+ * The channel id this webhook is for
+ */
+ channel_id: Snowflake;
+ /**
+ * The user this webhook was created by (not returned when getting a webhook with its token)
+ *
+ * See https://discord.com/developers/docs/resources/user#user-object
+ */
+ user?: APIUser;
+ /**
+ * The default name of the webhook
+ */
+ name: string | null;
+ /**
+ * The default avatar of the webhook
+ */
+ avatar: string | null;
+ /**
+ * The secure token of the webhook (returned for Incoming Webhooks)
+ */
+ token?: string;
+ /**
+ * The bot/OAuth2 application that created this webhook
+ */
+ application_id: Snowflake | null;
+ /**
+ * The guild of the channel that this webhook is following (returned for Channel Follower Webhooks)
+ */
+ source_guild?: APIPartialGuild;
+ /**
+ * The channel that this webhook is following (returned for Channel Follower Webhooks)
+ */
+ source_channel?: APIPartialChannel;
+ /**
+ * The url used for executing the webhook (returned by the webhooks OAuth2 flow)
+ */
+ url?: string;
+}
+export declare enum WebhookType {
+ /**
+ * Incoming Webhooks can post messages to channels with a generated token
+ */
+ Incoming = 1,
+ /**
+ * Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels
+ */
+ ChannelFollower = 2,
+ /**
+ * Application webhooks are webhooks used with Interactions
+ */
+ Application = 3
+}
+//# sourceMappingURL=webhook.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/webhook.d.ts.map b/node_modules/discord-api-types/payloads/v9/webhook.d.ts.map
new file mode 100644
index 0000000..612eae2
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/webhook.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;;;OAIG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,cAAc,EAAE,SAAS,GAAG,IAAI,CAAC;IACjC;;OAEG;IACH,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B;;OAEG;IACH,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED,oBAAY,WAAW;IACtB;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,eAAe,IAAA;IACf;;OAEG;IACH,WAAW,IAAA;CACX"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/webhook.js b/node_modules/discord-api-types/payloads/v9/webhook.js
new file mode 100644
index 0000000..f9a8bbe
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/webhook.js
@@ -0,0 +1,22 @@
+"use strict";
+/**
+ * Types extracted from https://discord.com/developers/docs/resources/webhook
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.WebhookType = void 0;
+var WebhookType;
+(function (WebhookType) {
+ /**
+ * Incoming Webhooks can post messages to channels with a generated token
+ */
+ WebhookType[WebhookType["Incoming"] = 1] = "Incoming";
+ /**
+ * Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels
+ */
+ WebhookType[WebhookType["ChannelFollower"] = 2] = "ChannelFollower";
+ /**
+ * Application webhooks are webhooks used with Interactions
+ */
+ WebhookType[WebhookType["Application"] = 3] = "Application";
+})(WebhookType = exports.WebhookType || (exports.WebhookType = {}));
+//# sourceMappingURL=webhook.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/payloads/v9/webhook.js.map b/node_modules/discord-api-types/payloads/v9/webhook.js.map
new file mode 100644
index 0000000..8c06411
--- /dev/null
+++ b/node_modules/discord-api-types/payloads/v9/webhook.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA+DH,IAAY,WAaX;AAbD,WAAY,WAAW;IACtB;;OAEG;IACH,qDAAY,CAAA;IACZ;;OAEG;IACH,mEAAe,CAAA;IACf;;OAEG;IACH,2DAAW,CAAA;AACZ,CAAC,EAbW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAatB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/common.d.ts b/node_modules/discord-api-types/rest/common.d.ts
new file mode 100644
index 0000000..330dcf3
--- /dev/null
+++ b/node_modules/discord-api-types/rest/common.d.ts
@@ -0,0 +1,244 @@
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#json-json-error-codes
+ */
+export declare enum RESTJSONErrorCodes {
+ GeneralError = 0,
+ UnknownAccount = 10001,
+ UnknownApplication = 10002,
+ UnknownChannel = 10003,
+ UnknownGuild = 10004,
+ UnknownIntegration = 10005,
+ UnknownInvite = 10006,
+ UnknownMember = 10007,
+ UnknownMessage = 10008,
+ UnknownPermissionOverwrite = 10009,
+ UnknownProvider = 10010,
+ UnknownRole = 10011,
+ UnknownToken = 10012,
+ UnknownUser = 10013,
+ UnknownEmoji = 10014,
+ UnknownWebhook = 10015,
+ UnknownWebhookService = 10016,
+ UnknownSession = 10020,
+ UnknownBan = 10026,
+ UnknownSKU = 10027,
+ UnknownStoreListing = 10028,
+ UnknownEntitlement = 10029,
+ UnknownBuild = 10030,
+ UnknownLobby = 10031,
+ UnknownBranch = 10032,
+ UnknownStoreDirectoryLayout = 10033,
+ UnknownRedistributable = 10036,
+ UnknownGiftCode = 10038,
+ UnknownStream = 10049,
+ UnknownPremiumServerSubscribeCooldown = 10050,
+ UnknownGuildTemplate = 10057,
+ UnknownDiscoverableServerCategory = 10059,
+ UnknownSticker = 10060,
+ UnknownInteraction = 10062,
+ UnknownApplicationCommand = 10063,
+ UnknownVoiceState = 10065,
+ UnknownApplicationCommandPermissions = 10066,
+ UnknownStageInstance = 10067,
+ UnknownGuildMemberVerificationForm = 10068,
+ UnknownGuildWelcomeScreen = 10069,
+ UnknownGuildScheduledEvent = 10070,
+ UnknownGuildScheduledEventUser = 10071,
+ UnknownTag = 10087,
+ BotsCannotUseThisEndpoint = 20001,
+ OnlyBotsCanUseThisEndpoint = 20002,
+ ExplicitContentCannotBeSentToTheDesiredRecipient = 20009,
+ NotAuthorizedToPerformThisActionOnThisApplication = 20012,
+ ActionCannotBePerformedDueToSlowmodeRateLimit = 20016,
+ TheMazeIsntMeantForYou = 20017,
+ OnlyTheOwnerOfThisAccountCanPerformThisAction = 20018,
+ AnnouncementEditLimitExceeded = 20022,
+ UnderMinimumAge = 20024,
+ ChannelSendRateLimit = 20028,
+ ServerSendRateLimit = 20029,
+ StageTopicServerNameServerDescriptionOrChannelNamesContainDisallowedWords = 20031,
+ GuildPremiumSubscriptionLevelTooLow = 20035,
+ MaximumNumberOfGuildsReached = 30001,
+ MaximumNumberOfFriendsReached = 30002,
+ MaximumNumberOfPinsReachedForTheChannel = 30003,
+ MaximumNumberOfRecipientsReached = 30004,
+ MaximumNumberOfGuildRolesReached = 30005,
+ MaximumNumberOfWebhooksReached = 30007,
+ MaximumNumberOfEmojisReached = 30008,
+ MaximumNumberOfReactionsReached = 30010,
+ MaximumNumberOfGroupDMsReached = 30011,
+ MaximumNumberOfGuildChannelsReached = 30013,
+ MaximumNumberOfAttachmentsInAMessageReached = 30015,
+ MaximumNumberOfInvitesReached = 30016,
+ MaximumNumberOfAnimatedEmojisReached = 30018,
+ MaximumNumberOfServerMembersReached = 30019,
+ MaximumNumberOfServerCategoriesReached = 30030,
+ GuildAlreadyHasTemplate = 30031,
+ MaximumNumberOfApplicationCommandsReached = 30032,
+ MaximumThreadParticipantsReached = 30033,
+ MaximumDailyApplicationCommandCreatesReached = 30034,
+ MaximumNumberOfNonGuildMemberBansHasBeenExceeded = 30035,
+ MaximumNumberOfBanFetchesHasBeenReached = 30037,
+ MaximumNumberOfUncompletedGuildScheduledEventsReached = 30038,
+ MaximumNumberOfStickersReached = 30039,
+ MaximumNumberOfPruneRequestsHasBeenReached = 30040,
+ MaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached = 30042,
+ MaximumNumberOfEditsToMessagesOlderThanOneHourReached = 30046,
+ MaximumNumberOfPinnedThreadsInForumHasBeenReached = 30047,
+ MaximumNumberOfTagsInForumHasBeenReached = 30048,
+ BitrateIsTooHighForChannelOfThisType = 30052,
+ MaximumNumberOfPremiumEmojisReached = 30056,
+ MaximumNumberOfWebhooksPerGuildReached = 30058,
+ MaximumNumberOfChannelPermissionOverwritesReached = 30060,
+ TheChannelsForThisGuildAreTooLarge = 30061,
+ Unauthorized = 40001,
+ VerifyYourAccount = 40002,
+ OpeningDirectMessagesTooFast = 40003,
+ SendMessagesHasBeenTemporarilyDisabled = 40004,
+ RequestEntityTooLarge = 40005,
+ FeatureTemporarilyDisabledServerSide = 40006,
+ UserBannedFromThisGuild = 40007,
+ ConnectionHasBeenRevoked = 40012,
+ TargetUserIsNotConnectedToVoice = 40032,
+ ThisMessageWasAlreadyCrossposted = 40033,
+ ApplicationCommandWithThatNameAlreadyExists = 40041,
+ ApplicationInteractionFailedToSend = 40043,
+ CannotSendAMessageInAForumChannel = 40058,
+ InteractionHasAlreadyBeenAcknowledged = 40060,
+ TagNamesMustBeUnique = 40061,
+ ServiceResourceIsBeingRateLimited = 40062,
+ ThereAreNoTagsAvailableThatCanBeSetByNonModerators = 40066,
+ TagRequiredToCreateAForumPostInThisChannel = 40067,
+ MissingAccess = 50001,
+ InvalidAccountType = 50002,
+ CannotExecuteActionOnDMChannel = 50003,
+ GuildWidgetDisabled = 50004,
+ CannotEditMessageAuthoredByAnotherUser = 50005,
+ CannotSendAnEmptyMessage = 50006,
+ CannotSendMessagesToThisUser = 50007,
+ CannotSendMessagesInNonTextChannel = 50008,
+ ChannelVerificationLevelTooHighForYouToGainAccess = 50009,
+ OAuth2ApplicationDoesNotHaveBot = 50010,
+ OAuth2ApplicationLimitReached = 50011,
+ InvalidOAuth2State = 50012,
+ MissingPermissions = 50013,
+ InvalidToken = 50014,
+ NoteWasTooLong = 50015,
+ ProvidedTooFewOrTooManyMessagesToDelete = 50016,
+ InvalidMFALevel = 50017,
+ MessageCanOnlyBePinnedInTheChannelItWasSentIn = 50019,
+ InviteCodeInvalidOrTaken = 50020,
+ CannotExecuteActionOnSystemMessage = 50021,
+ CannotExecuteActionOnThisChannelType = 50024,
+ InvalidOAuth2AccessToken = 50025,
+ MissingRequiredOAuth2Scope = 50026,
+ InvalidWebhookToken = 50027,
+ InvalidRole = 50028,
+ InvalidRecipients = 50033,
+ OneOfTheMessagesProvidedWasTooOldForBulkDelete = 50034,
+ InvalidFormBodyOrContentType = 50035,
+ InviteAcceptedToGuildWithoutTheBotBeingIn = 50036,
+ InvalidActivityAction = 50039,
+ InvalidAPIVersion = 50041,
+ FileUploadedExceedsMaximumSize = 50045,
+ InvalidFileUploaded = 50046,
+ CannotSelfRedeemThisGift = 50054,
+ InvalidGuild = 50055,
+ InvalidRequestOrigin = 50067,
+ InvalidMessageType = 50068,
+ PaymentSourceRequiredToRedeemGift = 50070,
+ CannotModifyASystemWebhook = 50073,
+ CannotDeleteChannelRequiredForCommunityGuilds = 50074,
+ CannotEditStickersWithinMessage = 50080,
+ InvalidStickerSent = 50081,
+ InvalidActionOnArchivedThread = 50083,
+ InvalidThreadNotificationSettings = 50084,
+ ParameterEarlierThanCreation = 50085,
+ CommunityServerChannelsMustBeTextChannels = 50086,
+ TheEntityTypeOfTheEventIsDifferentFromTheEntityYouAreTryingToStartTheEventFor = 50091,
+ ServerNotAvailableInYourLocation = 50095,
+ ServerNeedsMonetizationEnabledToPerformThisAction = 50097,
+ ServerNeedsMoreBoostsToPerformThisAction = 50101,
+ RequestBodyContainsInvalidJSON = 50109,
+ OwnerCannotBePendingMember = 50131,
+ OwnershipCannotBeMovedToABotUser = 50132,
+ FailedToResizeAssetBelowTheMinimumSize = 50138,
+ CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji = 50144,
+ CannotConvertBetweenPremiumEmojiAndNormalEmoji = 50145,
+ UploadedFileNotFound = 50146,
+ VoiceMessagesDoNotSupportAdditionalContent = 50159,
+ VoiceMessagesMustHaveASingleAudioAttachment = 50160,
+ VoiceMessagesMustHaveSupportingMetadata = 50161,
+ VoiceMessagesCannotBeEdited = 50162,
+ CannotDeleteGuildSubscriptionIntegration = 50163,
+ YouCannotSendVoiceMessagesInThisChannel = 50173,
+ TheUserAccountMustFirstBeVerified = 50178,
+ YouDoNotHavePermissionToSendThisSticker = 50600,
+ TwoFactorAuthenticationIsRequired = 60003,
+ NoUsersWithDiscordTagExist = 80004,
+ ReactionWasBlocked = 90001,
+ ApplicationNotYetAvailable = 110001,
+ APIResourceOverloaded = 130000,
+ TheStageIsAlreadyOpen = 150006,
+ CannotReplyWithoutPermissionToReadMessageHistory = 160002,
+ ThreadAlreadyCreatedForMessage = 160004,
+ ThreadLocked = 160005,
+ MaximumActiveThreads = 160006,
+ MaximumActiveAnnouncementThreads = 160007,
+ InvalidJSONForUploadedLottieFile = 170001,
+ UploadedLottiesCannotContainRasterizedImages = 170002,
+ StickerMaximumFramerateExceeded = 170003,
+ StickerFrameCountExceedsMaximumOf1000Frames = 170004,
+ LottieAnimationMaximumDimensionsExceeded = 170005,
+ StickerFramerateIsTooSmallOrTooLarge = 170006,
+ StickerAnimationDurationExceedsMaximumOf5Seconds = 170007,
+ CannotUpdateAFinishedEvent = 180000,
+ FailedToCreateStageNeededForStageEvent = 180002,
+ MessageWasBlockedByAutomaticModeration = 200000,
+ TitleWasBlockedByAutomaticModeration = 200001,
+ WebhooksPostedToForumChannelsMustHaveAThreadNameOrThreadId = 220001,
+ WebhooksPostedToForumChannelsCannotHaveBothAThreadNameAndThreadId = 220002,
+ WebhooksCanOnlyCreateThreadsInForumChannels = 220003,
+ WebhookServicesCannotBeUsedInForumChannels = 220004,
+ MessageBlockedByHarmfulLinksFilter = 240000,
+ CannotEnableOnboardingRequirementsAreNotMet = 350000,
+ CannotUpdateOnboardingWhileBelowRequirements = 350001
+}
+/**
+ * https://discord.com/developers/docs/reference#locales
+ */
+export declare enum Locale {
+ Indonesian = "id",
+ EnglishUS = "en-US",
+ EnglishGB = "en-GB",
+ Bulgarian = "bg",
+ ChineseCN = "zh-CN",
+ ChineseTW = "zh-TW",
+ Croatian = "hr",
+ Czech = "cs",
+ Danish = "da",
+ Dutch = "nl",
+ Finnish = "fi",
+ French = "fr",
+ German = "de",
+ Greek = "el",
+ Hindi = "hi",
+ Hungarian = "hu",
+ Italian = "it",
+ Japanese = "ja",
+ Korean = "ko",
+ Lithuanian = "lt",
+ Norwegian = "no",
+ Polish = "pl",
+ PortugueseBR = "pt-BR",
+ Romanian = "ro",
+ Russian = "ru",
+ SpanishES = "es-ES",
+ Swedish = "sv-SE",
+ Thai = "th",
+ Turkish = "tr",
+ Ukrainian = "uk",
+ Vietnamese = "vi"
+}
+export type LocaleString = `${Locale}`;
+//# sourceMappingURL=common.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/common.d.ts.map b/node_modules/discord-api-types/rest/common.d.ts.map
new file mode 100644
index 0000000..657f34c
--- /dev/null
+++ b/node_modules/discord-api-types/rest/common.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,kBAAkB;IAC7B,YAAY,IA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YAAY,SAAA;IACZ,oBAAoB,SAAA;IACpB,gCAAgC,SAAA;IAEhC,gCAAgC,SAAU;IAC1C,4CAA4C,SAAA;IAC5C,+BAA+B,SAAA;IAC/B,2CAA2C,SAAA;IAC3C,wCAAwC,SAAA;IACxC,oCAAoC,SAAA;IACpC,gDAAgD,SAAA;IAEhD,0BAA0B,SAAU;IAEpC,sCAAsC,SAAU;IAEhD,sCAAsC,SAAU;IAChD,oCAAoC,SAAA;IAEpC,0DAA0D,SAAU;IACpE,iEAAiE,SAAA;IACjE,2CAA2C,SAAA;IAC3C,0CAA0C,SAAA;IAE1C,kCAAkC,SAAU;IAE5C,2CAA2C,SAAU;IACrD,4CAA4C,SAAA;CAC5C;AAED;;GAEG;AACH,oBAAY,MAAM;IACjB,UAAU,OAAO;IACjB,SAAS,UAAU;IACnB,SAAS,UAAU;IACnB,SAAS,OAAO;IAChB,SAAS,UAAU;IACnB,SAAS,UAAU;IACnB,QAAQ,OAAO;IACf,KAAK,OAAO;IACZ,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,OAAO,OAAO;IACd,MAAM,OAAO;IACb,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,KAAK,OAAO;IACZ,SAAS,OAAO;IAChB,OAAO,OAAO;IACd,QAAQ,OAAO;IACf,MAAM,OAAO;IACb,UAAU,OAAO;IACjB,SAAS,OAAO;IAChB,MAAM,OAAO;IACb,YAAY,UAAU;IACtB,QAAQ,OAAO;IACf,OAAO,OAAO;IACd,SAAS,UAAU;IACnB,OAAO,UAAU;IACjB,IAAI,OAAO;IACX,OAAO,OAAO;IACd,SAAS,OAAO;IAChB,UAAU,OAAO;CACjB;AAED,MAAM,MAAM,YAAY,GAAG,GAAG,MAAM,EAAE,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/common.js b/node_modules/discord-api-types/rest/common.js
new file mode 100644
index 0000000..73f136d
--- /dev/null
+++ b/node_modules/discord-api-types/rest/common.js
@@ -0,0 +1,248 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Locale = exports.RESTJSONErrorCodes = void 0;
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#json-json-error-codes
+ */
+var RESTJSONErrorCodes;
+(function (RESTJSONErrorCodes) {
+ RESTJSONErrorCodes[RESTJSONErrorCodes["GeneralError"] = 0] = "GeneralError";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownAccount"] = 10001] = "UnknownAccount";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownApplication"] = 10002] = "UnknownApplication";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownChannel"] = 10003] = "UnknownChannel";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownGuild"] = 10004] = "UnknownGuild";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownIntegration"] = 10005] = "UnknownIntegration";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownInvite"] = 10006] = "UnknownInvite";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownMember"] = 10007] = "UnknownMember";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownMessage"] = 10008] = "UnknownMessage";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownPermissionOverwrite"] = 10009] = "UnknownPermissionOverwrite";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownProvider"] = 10010] = "UnknownProvider";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownRole"] = 10011] = "UnknownRole";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownToken"] = 10012] = "UnknownToken";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownUser"] = 10013] = "UnknownUser";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownEmoji"] = 10014] = "UnknownEmoji";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownWebhook"] = 10015] = "UnknownWebhook";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownWebhookService"] = 10016] = "UnknownWebhookService";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownSession"] = 10020] = "UnknownSession";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownBan"] = 10026] = "UnknownBan";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownSKU"] = 10027] = "UnknownSKU";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownStoreListing"] = 10028] = "UnknownStoreListing";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownEntitlement"] = 10029] = "UnknownEntitlement";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownBuild"] = 10030] = "UnknownBuild";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownLobby"] = 10031] = "UnknownLobby";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownBranch"] = 10032] = "UnknownBranch";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownStoreDirectoryLayout"] = 10033] = "UnknownStoreDirectoryLayout";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownRedistributable"] = 10036] = "UnknownRedistributable";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownGiftCode"] = 10038] = "UnknownGiftCode";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownStream"] = 10049] = "UnknownStream";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownPremiumServerSubscribeCooldown"] = 10050] = "UnknownPremiumServerSubscribeCooldown";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownGuildTemplate"] = 10057] = "UnknownGuildTemplate";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownDiscoverableServerCategory"] = 10059] = "UnknownDiscoverableServerCategory";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownSticker"] = 10060] = "UnknownSticker";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownInteraction"] = 10062] = "UnknownInteraction";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownApplicationCommand"] = 10063] = "UnknownApplicationCommand";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownVoiceState"] = 10065] = "UnknownVoiceState";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownApplicationCommandPermissions"] = 10066] = "UnknownApplicationCommandPermissions";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownStageInstance"] = 10067] = "UnknownStageInstance";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownGuildMemberVerificationForm"] = 10068] = "UnknownGuildMemberVerificationForm";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownGuildWelcomeScreen"] = 10069] = "UnknownGuildWelcomeScreen";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownGuildScheduledEvent"] = 10070] = "UnknownGuildScheduledEvent";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownGuildScheduledEventUser"] = 10071] = "UnknownGuildScheduledEventUser";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnknownTag"] = 10087] = "UnknownTag";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["BotsCannotUseThisEndpoint"] = 20001] = "BotsCannotUseThisEndpoint";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["OnlyBotsCanUseThisEndpoint"] = 20002] = "OnlyBotsCanUseThisEndpoint";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ExplicitContentCannotBeSentToTheDesiredRecipient"] = 20009] = "ExplicitContentCannotBeSentToTheDesiredRecipient";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["NotAuthorizedToPerformThisActionOnThisApplication"] = 20012] = "NotAuthorizedToPerformThisActionOnThisApplication";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ActionCannotBePerformedDueToSlowmodeRateLimit"] = 20016] = "ActionCannotBePerformedDueToSlowmodeRateLimit";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["TheMazeIsntMeantForYou"] = 20017] = "TheMazeIsntMeantForYou";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["OnlyTheOwnerOfThisAccountCanPerformThisAction"] = 20018] = "OnlyTheOwnerOfThisAccountCanPerformThisAction";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["AnnouncementEditLimitExceeded"] = 20022] = "AnnouncementEditLimitExceeded";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UnderMinimumAge"] = 20024] = "UnderMinimumAge";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ChannelSendRateLimit"] = 20028] = "ChannelSendRateLimit";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ServerSendRateLimit"] = 20029] = "ServerSendRateLimit";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["StageTopicServerNameServerDescriptionOrChannelNamesContainDisallowedWords"] = 20031] = "StageTopicServerNameServerDescriptionOrChannelNamesContainDisallowedWords";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["GuildPremiumSubscriptionLevelTooLow"] = 20035] = "GuildPremiumSubscriptionLevelTooLow";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfGuildsReached"] = 30001] = "MaximumNumberOfGuildsReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfFriendsReached"] = 30002] = "MaximumNumberOfFriendsReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfPinsReachedForTheChannel"] = 30003] = "MaximumNumberOfPinsReachedForTheChannel";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfRecipientsReached"] = 30004] = "MaximumNumberOfRecipientsReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfGuildRolesReached"] = 30005] = "MaximumNumberOfGuildRolesReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfWebhooksReached"] = 30007] = "MaximumNumberOfWebhooksReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfEmojisReached"] = 30008] = "MaximumNumberOfEmojisReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfReactionsReached"] = 30010] = "MaximumNumberOfReactionsReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfGroupDMsReached"] = 30011] = "MaximumNumberOfGroupDMsReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfGuildChannelsReached"] = 30013] = "MaximumNumberOfGuildChannelsReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfAttachmentsInAMessageReached"] = 30015] = "MaximumNumberOfAttachmentsInAMessageReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfInvitesReached"] = 30016] = "MaximumNumberOfInvitesReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfAnimatedEmojisReached"] = 30018] = "MaximumNumberOfAnimatedEmojisReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfServerMembersReached"] = 30019] = "MaximumNumberOfServerMembersReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfServerCategoriesReached"] = 30030] = "MaximumNumberOfServerCategoriesReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["GuildAlreadyHasTemplate"] = 30031] = "GuildAlreadyHasTemplate";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfApplicationCommandsReached"] = 30032] = "MaximumNumberOfApplicationCommandsReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumThreadParticipantsReached"] = 30033] = "MaximumThreadParticipantsReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumDailyApplicationCommandCreatesReached"] = 30034] = "MaximumDailyApplicationCommandCreatesReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfNonGuildMemberBansHasBeenExceeded"] = 30035] = "MaximumNumberOfNonGuildMemberBansHasBeenExceeded";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfBanFetchesHasBeenReached"] = 30037] = "MaximumNumberOfBanFetchesHasBeenReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfUncompletedGuildScheduledEventsReached"] = 30038] = "MaximumNumberOfUncompletedGuildScheduledEventsReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfStickersReached"] = 30039] = "MaximumNumberOfStickersReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfPruneRequestsHasBeenReached"] = 30040] = "MaximumNumberOfPruneRequestsHasBeenReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached"] = 30042] = "MaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfEditsToMessagesOlderThanOneHourReached"] = 30046] = "MaximumNumberOfEditsToMessagesOlderThanOneHourReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfPinnedThreadsInForumHasBeenReached"] = 30047] = "MaximumNumberOfPinnedThreadsInForumHasBeenReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfTagsInForumHasBeenReached"] = 30048] = "MaximumNumberOfTagsInForumHasBeenReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["BitrateIsTooHighForChannelOfThisType"] = 30052] = "BitrateIsTooHighForChannelOfThisType";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfPremiumEmojisReached"] = 30056] = "MaximumNumberOfPremiumEmojisReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfWebhooksPerGuildReached"] = 30058] = "MaximumNumberOfWebhooksPerGuildReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumNumberOfChannelPermissionOverwritesReached"] = 30060] = "MaximumNumberOfChannelPermissionOverwritesReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["TheChannelsForThisGuildAreTooLarge"] = 30061] = "TheChannelsForThisGuildAreTooLarge";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["Unauthorized"] = 40001] = "Unauthorized";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["VerifyYourAccount"] = 40002] = "VerifyYourAccount";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["OpeningDirectMessagesTooFast"] = 40003] = "OpeningDirectMessagesTooFast";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["SendMessagesHasBeenTemporarilyDisabled"] = 40004] = "SendMessagesHasBeenTemporarilyDisabled";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["RequestEntityTooLarge"] = 40005] = "RequestEntityTooLarge";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["FeatureTemporarilyDisabledServerSide"] = 40006] = "FeatureTemporarilyDisabledServerSide";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UserBannedFromThisGuild"] = 40007] = "UserBannedFromThisGuild";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ConnectionHasBeenRevoked"] = 40012] = "ConnectionHasBeenRevoked";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["TargetUserIsNotConnectedToVoice"] = 40032] = "TargetUserIsNotConnectedToVoice";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ThisMessageWasAlreadyCrossposted"] = 40033] = "ThisMessageWasAlreadyCrossposted";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ApplicationCommandWithThatNameAlreadyExists"] = 40041] = "ApplicationCommandWithThatNameAlreadyExists";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ApplicationInteractionFailedToSend"] = 40043] = "ApplicationInteractionFailedToSend";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotSendAMessageInAForumChannel"] = 40058] = "CannotSendAMessageInAForumChannel";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InteractionHasAlreadyBeenAcknowledged"] = 40060] = "InteractionHasAlreadyBeenAcknowledged";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["TagNamesMustBeUnique"] = 40061] = "TagNamesMustBeUnique";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ServiceResourceIsBeingRateLimited"] = 40062] = "ServiceResourceIsBeingRateLimited";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ThereAreNoTagsAvailableThatCanBeSetByNonModerators"] = 40066] = "ThereAreNoTagsAvailableThatCanBeSetByNonModerators";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["TagRequiredToCreateAForumPostInThisChannel"] = 40067] = "TagRequiredToCreateAForumPostInThisChannel";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MissingAccess"] = 50001] = "MissingAccess";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidAccountType"] = 50002] = "InvalidAccountType";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotExecuteActionOnDMChannel"] = 50003] = "CannotExecuteActionOnDMChannel";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["GuildWidgetDisabled"] = 50004] = "GuildWidgetDisabled";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotEditMessageAuthoredByAnotherUser"] = 50005] = "CannotEditMessageAuthoredByAnotherUser";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotSendAnEmptyMessage"] = 50006] = "CannotSendAnEmptyMessage";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotSendMessagesToThisUser"] = 50007] = "CannotSendMessagesToThisUser";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotSendMessagesInNonTextChannel"] = 50008] = "CannotSendMessagesInNonTextChannel";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ChannelVerificationLevelTooHighForYouToGainAccess"] = 50009] = "ChannelVerificationLevelTooHighForYouToGainAccess";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["OAuth2ApplicationDoesNotHaveBot"] = 50010] = "OAuth2ApplicationDoesNotHaveBot";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["OAuth2ApplicationLimitReached"] = 50011] = "OAuth2ApplicationLimitReached";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidOAuth2State"] = 50012] = "InvalidOAuth2State";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MissingPermissions"] = 50013] = "MissingPermissions";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidToken"] = 50014] = "InvalidToken";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["NoteWasTooLong"] = 50015] = "NoteWasTooLong";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ProvidedTooFewOrTooManyMessagesToDelete"] = 50016] = "ProvidedTooFewOrTooManyMessagesToDelete";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidMFALevel"] = 50017] = "InvalidMFALevel";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MessageCanOnlyBePinnedInTheChannelItWasSentIn"] = 50019] = "MessageCanOnlyBePinnedInTheChannelItWasSentIn";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InviteCodeInvalidOrTaken"] = 50020] = "InviteCodeInvalidOrTaken";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotExecuteActionOnSystemMessage"] = 50021] = "CannotExecuteActionOnSystemMessage";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotExecuteActionOnThisChannelType"] = 50024] = "CannotExecuteActionOnThisChannelType";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidOAuth2AccessToken"] = 50025] = "InvalidOAuth2AccessToken";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MissingRequiredOAuth2Scope"] = 50026] = "MissingRequiredOAuth2Scope";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidWebhookToken"] = 50027] = "InvalidWebhookToken";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidRole"] = 50028] = "InvalidRole";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidRecipients"] = 50033] = "InvalidRecipients";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["OneOfTheMessagesProvidedWasTooOldForBulkDelete"] = 50034] = "OneOfTheMessagesProvidedWasTooOldForBulkDelete";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidFormBodyOrContentType"] = 50035] = "InvalidFormBodyOrContentType";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InviteAcceptedToGuildWithoutTheBotBeingIn"] = 50036] = "InviteAcceptedToGuildWithoutTheBotBeingIn";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidActivityAction"] = 50039] = "InvalidActivityAction";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidAPIVersion"] = 50041] = "InvalidAPIVersion";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["FileUploadedExceedsMaximumSize"] = 50045] = "FileUploadedExceedsMaximumSize";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidFileUploaded"] = 50046] = "InvalidFileUploaded";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotSelfRedeemThisGift"] = 50054] = "CannotSelfRedeemThisGift";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidGuild"] = 50055] = "InvalidGuild";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidRequestOrigin"] = 50067] = "InvalidRequestOrigin";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidMessageType"] = 50068] = "InvalidMessageType";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["PaymentSourceRequiredToRedeemGift"] = 50070] = "PaymentSourceRequiredToRedeemGift";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotModifyASystemWebhook"] = 50073] = "CannotModifyASystemWebhook";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotDeleteChannelRequiredForCommunityGuilds"] = 50074] = "CannotDeleteChannelRequiredForCommunityGuilds";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotEditStickersWithinMessage"] = 50080] = "CannotEditStickersWithinMessage";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidStickerSent"] = 50081] = "InvalidStickerSent";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidActionOnArchivedThread"] = 50083] = "InvalidActionOnArchivedThread";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidThreadNotificationSettings"] = 50084] = "InvalidThreadNotificationSettings";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ParameterEarlierThanCreation"] = 50085] = "ParameterEarlierThanCreation";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CommunityServerChannelsMustBeTextChannels"] = 50086] = "CommunityServerChannelsMustBeTextChannels";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["TheEntityTypeOfTheEventIsDifferentFromTheEntityYouAreTryingToStartTheEventFor"] = 50091] = "TheEntityTypeOfTheEventIsDifferentFromTheEntityYouAreTryingToStartTheEventFor";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ServerNotAvailableInYourLocation"] = 50095] = "ServerNotAvailableInYourLocation";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ServerNeedsMonetizationEnabledToPerformThisAction"] = 50097] = "ServerNeedsMonetizationEnabledToPerformThisAction";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ServerNeedsMoreBoostsToPerformThisAction"] = 50101] = "ServerNeedsMoreBoostsToPerformThisAction";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["RequestBodyContainsInvalidJSON"] = 50109] = "RequestBodyContainsInvalidJSON";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["OwnerCannotBePendingMember"] = 50131] = "OwnerCannotBePendingMember";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["OwnershipCannotBeMovedToABotUser"] = 50132] = "OwnershipCannotBeMovedToABotUser";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["FailedToResizeAssetBelowTheMinimumSize"] = 50138] = "FailedToResizeAssetBelowTheMinimumSize";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji"] = 50144] = "CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotConvertBetweenPremiumEmojiAndNormalEmoji"] = 50145] = "CannotConvertBetweenPremiumEmojiAndNormalEmoji";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UploadedFileNotFound"] = 50146] = "UploadedFileNotFound";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["VoiceMessagesDoNotSupportAdditionalContent"] = 50159] = "VoiceMessagesDoNotSupportAdditionalContent";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["VoiceMessagesMustHaveASingleAudioAttachment"] = 50160] = "VoiceMessagesMustHaveASingleAudioAttachment";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["VoiceMessagesMustHaveSupportingMetadata"] = 50161] = "VoiceMessagesMustHaveSupportingMetadata";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["VoiceMessagesCannotBeEdited"] = 50162] = "VoiceMessagesCannotBeEdited";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotDeleteGuildSubscriptionIntegration"] = 50163] = "CannotDeleteGuildSubscriptionIntegration";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["YouCannotSendVoiceMessagesInThisChannel"] = 50173] = "YouCannotSendVoiceMessagesInThisChannel";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["TheUserAccountMustFirstBeVerified"] = 50178] = "TheUserAccountMustFirstBeVerified";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["YouDoNotHavePermissionToSendThisSticker"] = 50600] = "YouDoNotHavePermissionToSendThisSticker";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["TwoFactorAuthenticationIsRequired"] = 60003] = "TwoFactorAuthenticationIsRequired";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["NoUsersWithDiscordTagExist"] = 80004] = "NoUsersWithDiscordTagExist";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ReactionWasBlocked"] = 90001] = "ReactionWasBlocked";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ApplicationNotYetAvailable"] = 110001] = "ApplicationNotYetAvailable";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["APIResourceOverloaded"] = 130000] = "APIResourceOverloaded";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["TheStageIsAlreadyOpen"] = 150006] = "TheStageIsAlreadyOpen";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotReplyWithoutPermissionToReadMessageHistory"] = 160002] = "CannotReplyWithoutPermissionToReadMessageHistory";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ThreadAlreadyCreatedForMessage"] = 160004] = "ThreadAlreadyCreatedForMessage";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["ThreadLocked"] = 160005] = "ThreadLocked";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumActiveThreads"] = 160006] = "MaximumActiveThreads";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MaximumActiveAnnouncementThreads"] = 160007] = "MaximumActiveAnnouncementThreads";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["InvalidJSONForUploadedLottieFile"] = 170001] = "InvalidJSONForUploadedLottieFile";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["UploadedLottiesCannotContainRasterizedImages"] = 170002] = "UploadedLottiesCannotContainRasterizedImages";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["StickerMaximumFramerateExceeded"] = 170003] = "StickerMaximumFramerateExceeded";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["StickerFrameCountExceedsMaximumOf1000Frames"] = 170004] = "StickerFrameCountExceedsMaximumOf1000Frames";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["LottieAnimationMaximumDimensionsExceeded"] = 170005] = "LottieAnimationMaximumDimensionsExceeded";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["StickerFramerateIsTooSmallOrTooLarge"] = 170006] = "StickerFramerateIsTooSmallOrTooLarge";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["StickerAnimationDurationExceedsMaximumOf5Seconds"] = 170007] = "StickerAnimationDurationExceedsMaximumOf5Seconds";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotUpdateAFinishedEvent"] = 180000] = "CannotUpdateAFinishedEvent";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["FailedToCreateStageNeededForStageEvent"] = 180002] = "FailedToCreateStageNeededForStageEvent";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MessageWasBlockedByAutomaticModeration"] = 200000] = "MessageWasBlockedByAutomaticModeration";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["TitleWasBlockedByAutomaticModeration"] = 200001] = "TitleWasBlockedByAutomaticModeration";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["WebhooksPostedToForumChannelsMustHaveAThreadNameOrThreadId"] = 220001] = "WebhooksPostedToForumChannelsMustHaveAThreadNameOrThreadId";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["WebhooksPostedToForumChannelsCannotHaveBothAThreadNameAndThreadId"] = 220002] = "WebhooksPostedToForumChannelsCannotHaveBothAThreadNameAndThreadId";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["WebhooksCanOnlyCreateThreadsInForumChannels"] = 220003] = "WebhooksCanOnlyCreateThreadsInForumChannels";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["WebhookServicesCannotBeUsedInForumChannels"] = 220004] = "WebhookServicesCannotBeUsedInForumChannels";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["MessageBlockedByHarmfulLinksFilter"] = 240000] = "MessageBlockedByHarmfulLinksFilter";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotEnableOnboardingRequirementsAreNotMet"] = 350000] = "CannotEnableOnboardingRequirementsAreNotMet";
+ RESTJSONErrorCodes[RESTJSONErrorCodes["CannotUpdateOnboardingWhileBelowRequirements"] = 350001] = "CannotUpdateOnboardingWhileBelowRequirements";
+})(RESTJSONErrorCodes = exports.RESTJSONErrorCodes || (exports.RESTJSONErrorCodes = {}));
+/**
+ * https://discord.com/developers/docs/reference#locales
+ */
+var Locale;
+(function (Locale) {
+ Locale["Indonesian"] = "id";
+ Locale["EnglishUS"] = "en-US";
+ Locale["EnglishGB"] = "en-GB";
+ Locale["Bulgarian"] = "bg";
+ Locale["ChineseCN"] = "zh-CN";
+ Locale["ChineseTW"] = "zh-TW";
+ Locale["Croatian"] = "hr";
+ Locale["Czech"] = "cs";
+ Locale["Danish"] = "da";
+ Locale["Dutch"] = "nl";
+ Locale["Finnish"] = "fi";
+ Locale["French"] = "fr";
+ Locale["German"] = "de";
+ Locale["Greek"] = "el";
+ Locale["Hindi"] = "hi";
+ Locale["Hungarian"] = "hu";
+ Locale["Italian"] = "it";
+ Locale["Japanese"] = "ja";
+ Locale["Korean"] = "ko";
+ Locale["Lithuanian"] = "lt";
+ Locale["Norwegian"] = "no";
+ Locale["Polish"] = "pl";
+ Locale["PortugueseBR"] = "pt-BR";
+ Locale["Romanian"] = "ro";
+ Locale["Russian"] = "ru";
+ Locale["SpanishES"] = "es-ES";
+ Locale["Swedish"] = "sv-SE";
+ Locale["Thai"] = "th";
+ Locale["Turkish"] = "tr";
+ Locale["Ukrainian"] = "uk";
+ Locale["Vietnamese"] = "vi";
+})(Locale = exports.Locale || (exports.Locale = {}));
+//# sourceMappingURL=common.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/common.js.map b/node_modules/discord-api-types/rest/common.js.map
new file mode 100644
index 0000000..ef06847
--- /dev/null
+++ b/node_modules/discord-api-types/rest/common.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"common.js","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,kBA+RX;AA/RD,WAAY,kBAAkB;IAC7B,2EAAY,CAAA;IAEZ,mFAAuB,CAAA;IACvB,2FAAkB,CAAA;IAClB,mFAAc,CAAA;IACd,+EAAY,CAAA;IACZ,2FAAkB,CAAA;IAClB,iFAAa,CAAA;IACb,iFAAa,CAAA;IACb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IAC5C,sHAA+B,CAAA;IAC/B,8IAA2C,CAAA;IAC3C,wIAAwC,CAAA;IACxC,gIAAoC,CAAA;IACpC,wJAAgD,CAAA;IAEhD,4GAAoC,CAAA;IAEpC,oIAAgD,CAAA;IAEhD,oIAAgD,CAAA;IAChD,gIAAoC,CAAA;IAEpC,4KAAoE,CAAA;IACpE,0LAAiE,CAAA;IACjE,8IAA2C,CAAA;IAC3C,4IAA0C,CAAA;IAE1C,4HAA4C,CAAA;IAE5C,8IAAqD,CAAA;IACrD,gJAA4C,CAAA;AAC7C,CAAC,EA/RW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QA+R7B;AAED;;GAEG;AACH,IAAY,MAgCX;AAhCD,WAAY,MAAM;IACjB,2BAAiB,CAAA;IACjB,6BAAmB,CAAA;IACnB,6BAAmB,CAAA;IACnB,0BAAgB,CAAA;IAChB,6BAAmB,CAAA;IACnB,6BAAmB,CAAA;IACnB,yBAAe,CAAA;IACf,sBAAY,CAAA;IACZ,uBAAa,CAAA;IACb,sBAAY,CAAA;IACZ,wBAAc,CAAA;IACd,uBAAa,CAAA;IACb,uBAAa,CAAA;IACb,sBAAY,CAAA;IACZ,sBAAY,CAAA;IACZ,0BAAgB,CAAA;IAChB,wBAAc,CAAA;IACd,yBAAe,CAAA;IACf,uBAAa,CAAA;IACb,2BAAiB,CAAA;IACjB,0BAAgB,CAAA;IAChB,uBAAa,CAAA;IACb,gCAAsB,CAAA;IACtB,yBAAe,CAAA;IACf,wBAAc,CAAA;IACd,6BAAmB,CAAA;IACnB,2BAAiB,CAAA;IACjB,qBAAW,CAAA;IACX,wBAAc,CAAA;IACd,0BAAgB,CAAA;IAChB,2BAAiB,CAAA;AAClB,CAAC,EAhCW,MAAM,GAAN,cAAM,KAAN,cAAM,QAgCjB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/index.d.ts b/node_modules/discord-api-types/rest/index.d.ts
new file mode 100644
index 0000000..3fbd05d
--- /dev/null
+++ b/node_modules/discord-api-types/rest/index.d.ts
@@ -0,0 +1,2 @@
+export * from './v10/index';
+//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/index.d.ts.map b/node_modules/discord-api-types/rest/index.d.ts.map
new file mode 100644
index 0000000..574afa8
--- /dev/null
+++ b/node_modules/discord-api-types/rest/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,cAAc,aAAa,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/index.js b/node_modules/discord-api-types/rest/index.js
new file mode 100644
index 0000000..136fd15
--- /dev/null
+++ b/node_modules/discord-api-types/rest/index.js
@@ -0,0 +1,20 @@
+"use strict";
+// This file exports all the types available in the recommended API version
+// Thereby, things MAY break in the future. Try sticking to imports from a specific version
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./v10/index"), exports);
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/index.js.map b/node_modules/discord-api-types/rest/index.js.map
new file mode 100644
index 0000000..83accdf
--- /dev/null
+++ b/node_modules/discord-api-types/rest/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,2FAA2F;;;;;;;;;;;;;;;;AAE3F,8CAA4B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/index.mjs b/node_modules/discord-api-types/rest/index.mjs
new file mode 100644
index 0000000..3f5bba7
--- /dev/null
+++ b/node_modules/discord-api-types/rest/index.mjs
@@ -0,0 +1,12 @@
+import mod from "./index.js";
+
+export default mod;
+export const APIVersion = mod.APIVersion;
+export const CDNRoutes = mod.CDNRoutes;
+export const ImageFormat = mod.ImageFormat;
+export const Locale = mod.Locale;
+export const OAuth2Routes = mod.OAuth2Routes;
+export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes;
+export const RouteBases = mod.RouteBases;
+export const Routes = mod.Routes;
+export const StickerPackApplicationId = mod.StickerPackApplicationId;
diff --git a/node_modules/discord-api-types/rest/v10/application.d.ts b/node_modules/discord-api-types/rest/v10/application.d.ts
new file mode 100644
index 0000000..ac5b4ca
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/application.d.ts
@@ -0,0 +1,18 @@
+import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v10/application';
+/**
+ * https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records
+ */
+export type RESTGetAPIApplicationRoleConnectionMetadataResult = APIApplicationRoleConnectionMetadata[];
+/**
+ * https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records
+ */
+export type RESTPutAPIApplicationRoleConnectionMetadataJSONBody = APIApplicationRoleConnectionMetadata[];
+/**
+ * https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records
+ */
+export type RESTPutAPIApplicationRoleConnectionMetadataResult = APIApplicationRoleConnectionMetadata[];
+/**
+ * https://discord.com/developers/docs/resources/application#get-current-application
+ */
+export type RESTGetCurrentApplicationResult = APIApplication;
+//# sourceMappingURL=application.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/application.d.ts.map b/node_modules/discord-api-types/rest/v10/application.d.ts.map
new file mode 100644
index 0000000..709b387
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/application.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,oCAAoC,EAAE,MAAM,gCAAgC,CAAC;AAE3G;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAAG,oCAAoC,EAAE,CAAC;AAEvG;;GAEG;AACH,MAAM,MAAM,mDAAmD,GAAG,oCAAoC,EAAE,CAAC;AAEzG;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAAG,oCAAoC,EAAE,CAAC;AAEvG;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/application.js b/node_modules/discord-api-types/rest/v10/application.js
new file mode 100644
index 0000000..6a141e1
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/application.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=application.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/application.js.map b/node_modules/discord-api-types/rest/v10/application.js.map
new file mode 100644
index 0000000..200a819
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/application.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"application.js","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/auditLog.d.ts b/node_modules/discord-api-types/rest/v10/auditLog.d.ts
new file mode 100644
index 0000000..d8a1ab9
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/auditLog.d.ts
@@ -0,0 +1,31 @@
+import type { Snowflake } from '../../globals';
+import type { APIAuditLog, AuditLogEvent } from '../../payloads/v10/auditLog';
+/**
+ * https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log
+ */
+export interface RESTGetAPIAuditLogQuery {
+ /**
+ * Filter the log for actions made by a user
+ */
+ user_id?: Snowflake;
+ /**
+ * The type of audit log events
+ */
+ action_type?: AuditLogEvent;
+ /**
+ * Filter the log before a certain entry ID
+ */
+ before?: Snowflake;
+ /**
+ * Filter the log after a certain entry ID
+ */
+ after?: Snowflake;
+ /**
+ * How many entries are returned (default 50, minimum 1, maximum 100)
+ *
+ * @default 50
+ */
+ limit?: number;
+}
+export type RESTGetAPIAuditLogResult = APIAuditLog;
+//# sourceMappingURL=auditLog.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/auditLog.d.ts.map b/node_modules/discord-api-types/rest/v10/auditLog.d.ts.map
new file mode 100644
index 0000000..d58f6f2
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/auditLog.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"auditLog.d.ts","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/auditLog.js b/node_modules/discord-api-types/rest/v10/auditLog.js
new file mode 100644
index 0000000..ea09bf5
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/auditLog.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=auditLog.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/auditLog.js.map b/node_modules/discord-api-types/rest/v10/auditLog.js.map
new file mode 100644
index 0000000..754e232
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/auditLog.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"auditLog.js","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/autoModeration.d.ts b/node_modules/discord-api-types/rest/v10/autoModeration.d.ts
new file mode 100644
index 0000000..2a05d79
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/autoModeration.d.ts
@@ -0,0 +1,68 @@
+import type { Snowflake } from '../../globals';
+import type { APIAutoModerationAction, APIAutoModerationRule, AutoModerationRuleEventType, APIAutoModerationRuleTriggerMetadata, AutoModerationRuleTriggerType } from '../../payloads/v10/index';
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild
+ */
+export type RESTGetAPIAutoModerationRulesResult = APIAutoModerationRule[];
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule
+ */
+export type RESTGetAPIAutoModerationRuleResult = APIAutoModerationRule;
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule
+ */
+export interface RESTPostAPIAutoModerationRuleJSONBody {
+ /**
+ * The rule name
+ */
+ name: string;
+ /**
+ * The rule event type
+ */
+ event_type: AutoModerationRuleEventType;
+ /**
+ * The rule trigger type
+ */
+ trigger_type: AutoModerationRuleTriggerType;
+ /**
+ * The rule trigger metadata
+ *
+ * Can be omitted if the trigger type is {@link AutoModerationRuleTriggerType.HarmfulLink} or {@link AutoModerationRuleTriggerType.Spam}
+ */
+ trigger_metadata?: APIAutoModerationRuleTriggerMetadata | undefined;
+ /**
+ * The actions which will execute when this rule is triggered
+ */
+ actions: APIAutoModerationAction[];
+ /**
+ * Whether this rule is enabled
+ *
+ * @default false
+ */
+ enabled?: boolean | undefined;
+ /**
+ * The role ids that shouldn't be affected by this rule (Maximum of 20)
+ */
+ exempt_roles?: Snowflake[] | undefined;
+ /**
+ * The channel ids that shouldn't be affected by this rule (Maximum of 50)
+ */
+ exempt_channels?: Snowflake[] | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule
+ */
+export type RESTPostAPIAutoModerationRuleResult = APIAutoModerationRule;
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule
+ */
+export type RESTPatchAPIAutoModerationRuleJSONBody = Omit<Partial<RESTPostAPIAutoModerationRuleJSONBody>, 'trigger_type'>;
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule
+ */
+export type RESTPatchAPIAutoModerationRuleResult = APIAutoModerationRule;
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule
+ */
+export type RESTDeleteAPIAutoModerationRuleResult = never;
+//# sourceMappingURL=autoModeration.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/autoModeration.d.ts.map b/node_modules/discord-api-types/rest/v10/autoModeration.d.ts.map
new file mode 100644
index 0000000..e593022
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/autoModeration.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"autoModeration.d.ts","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EACX,uBAAuB,EACvB,qBAAqB,EACrB,2BAA2B,EAC3B,oCAAoC,EACpC,6BAA6B,EAC7B,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,qBAAqB,EAAE,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,qBAAqB,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACrD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,2BAA2B,CAAC;IACxC;;OAEG;IACH,YAAY,EAAE,6BAA6B,CAAC;IAC5C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,oCAAoC,GAAG,SAAS,CAAC;IACpE;;OAEG;IACH,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;IACvC;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,qBAAqB,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,IAAI,CACxD,OAAO,CAAC,qCAAqC,CAAC,EAC9C,cAAc,CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,qBAAqB,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,KAAK,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/autoModeration.js b/node_modules/discord-api-types/rest/v10/autoModeration.js
new file mode 100644
index 0000000..78af1ff
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/autoModeration.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=autoModeration.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/autoModeration.js.map b/node_modules/discord-api-types/rest/v10/autoModeration.js.map
new file mode 100644
index 0000000..e3f54f3
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/autoModeration.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"autoModeration.js","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/channel.d.ts b/node_modules/discord-api-types/rest/v10/channel.d.ts
new file mode 100644
index 0000000..a5451a6
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/channel.d.ts
@@ -0,0 +1,659 @@
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIActionRowComponent, APIAllowedMentions, APIAttachment, APIChannel, APIEmbed, APIExtendedInvite, APIFollowedChannel, APIMessage, APIMessageActionRowComponent, APIMessageReference, APIThreadList, APIThreadMember, APIUser, ChannelType, InviteTargetType, MessageFlags, OverwriteType, ThreadAutoArchiveDuration, VideoQualityMode, APIGuildForumTag, APIGuildForumDefaultReactionEmoji, SortOrderType, ForumLayoutType } from '../../payloads/v10/index';
+import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';
+export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
+ id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#get-channel
+ */
+export type RESTGetAPIChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#modify-channel
+ */
+export interface RESTPatchAPIChannelJSONBody {
+ /**
+ * 1-100 character channel name
+ *
+ * Channel types: all
+ */
+ name?: string | undefined;
+ /**
+ * The type of channel; only conversion between `text` and `news`
+ * is supported and only in guilds with the "NEWS" feature
+ *
+ * Channel types: text, news
+ */
+ type?: ChannelType.GuildAnnouncement | ChannelType.GuildText | undefined;
+ /**
+ * The position of the channel in the left-hand listing
+ *
+ * Channel types: all excluding newsThread, publicThread, privateThread
+ */
+ position?: number | null | undefined;
+ /**
+ * 0-1024 character channel topic (0-4096 characters for forum channels)
+ *
+ * Channel types: text, news, forum
+ */
+ topic?: string | null | undefined;
+ /**
+ * Whether the channel is nsfw
+ *
+ * Channel types: text, voice, news, forum
+ */
+ nsfw?: boolean | null | undefined;
+ /**
+ * Amount of seconds a user has to wait before sending another message (0-21600);
+ * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
+ * are unaffected
+ *
+ * Channel types: text, newsThread, publicThread, privateThread, forum
+ */
+ rate_limit_per_user?: number | null | undefined;
+ /**
+ * The bitrate (in bits) of the voice channel; 8000 to 96000 (128000 for VIP servers)
+ *
+ * Channel types: voice
+ */
+ bitrate?: number | null | undefined;
+ /**
+ * The user limit of the voice channel; 0 refers to no limit, 1 to 99 refers to a user limit
+ *
+ * Channel types: voice
+ */
+ user_limit?: number | null | undefined;
+ /**
+ * Channel or category-specific permissions
+ *
+ * Channel types: all excluding newsThread, publicThread, privateThread
+ */
+ permission_overwrites?: APIChannelPatchOverwrite[] | null | undefined;
+ /**
+ * ID of the new parent category for a channel
+ *
+ * Channel types: text, voice, news
+ */
+ parent_id?: Snowflake | null | undefined;
+ /**
+ * Voice region id for the voice or stage channel, automatic when set to `null`
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-region-object
+ */
+ rtc_region?: string | null | undefined;
+ /**
+ * The camera video quality mode of the voice channel
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes
+ */
+ video_quality_mode?: VideoQualityMode | null | undefined;
+ /**
+ * Whether the thread should be archived
+ *
+ * Channel types: newsThread, publicThread, privateThread
+ */
+ archived?: boolean | undefined;
+ /**
+ * The amount of time in minutes to wait before automatically archiving the thread
+ *
+ * Channel types: newsThread, publicThread, privateThread
+ */
+ auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
+ /**
+ * Whether the thread should be locked
+ *
+ * Channel types: newsThread, publicThread, privateThread
+ */
+ locked?: boolean | undefined;
+ /**
+ * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
+ *
+ * Channel types: text, news
+ */
+ default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
+ /**
+ * Whether non-moderators can add other non-moderators to the thread
+ *
+ * Channel types: privateThread
+ */
+ invitable?: boolean | undefined;
+ /**
+ * The set of tags that can be used in a forum channel; limited to 20
+ *
+ * Channel types: forum
+ */
+ available_tags?: APIGuildForumTag[] | undefined;
+ /**
+ * The emoji to show in the add reaction button on a thread in a forum channel
+ *
+ * Channel types: forum
+ */
+ default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined;
+ /**
+ * The initial `rate_limit_per_user` to set on newly created threads in a channel.
+ * This field is copied to the thread at creation time and does not live update
+ *
+ * Channel types: forum
+ */
+ default_thread_rate_limit_per_user?: number | null | undefined;
+ /**
+ * The default sort order type used to order posts in a forum channel
+ *
+ * Channel types: forum
+ */
+ default_sort_order?: SortOrderType | null | undefined;
+ /**
+ * The default layout type used to display posts in a forum channel
+ *
+ * Channel types: forum
+ */
+ default_forum_layout?: ForumLayoutType | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#modify-channel
+ */
+export type RESTPatchAPIChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#deleteclose-channel
+ */
+export type RESTDeleteAPIChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#get-channel-messages
+ */
+export interface RESTGetAPIChannelMessagesQuery {
+ /**
+ * Get messages around this message ID
+ */
+ around?: Snowflake;
+ /**
+ * Get messages before this message ID
+ */
+ before?: Snowflake;
+ /**
+ * Get messages after this message ID
+ */
+ after?: Snowflake;
+ /**
+ * Max number of messages to return (1-100)
+ *
+ * @default 50
+ */
+ limit?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#get-channel-messages
+ */
+export type RESTGetAPIChannelMessagesResult = APIMessage[];
+/**
+ * https://discord.com/developers/docs/resources/channel#get-channel-message
+ */
+export type RESTGetAPIChannelMessageResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
+ */
+export type APIMessageReferenceSend = StrictPartial<APIMessageReference> & AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Required<Pick<APIMessageReference, 'message_id'>>> & {
+ /**
+ * Whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message
+ *
+ * @default true
+ */
+ fail_if_not_exists?: boolean | undefined;
+};
+/**
+ * https://discord.com/developers/docs/resources/channel#create-message
+ */
+export interface RESTPostAPIChannelMessageJSONBody {
+ /**
+ * The message contents (up to 2000 characters)
+ */
+ content?: string | undefined;
+ /**
+ * A nonce that can be used for optimistic message sending
+ */
+ nonce?: number | string | undefined;
+ /**
+ * `true` if this is a TTS message
+ */
+ tts?: boolean | undefined;
+ /**
+ * Embedded `rich` content (up to 6000 characters)
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object
+ */
+ embeds?: APIEmbed[] | undefined;
+ /**
+ * Allowed mentions for a message
+ *
+ * See https://discord.com/developers/docs/resources/channel#allowed-mentions-object
+ */
+ allowed_mentions?: APIAllowedMentions | undefined;
+ /**
+ * Include to make your message a reply
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
+ */
+ message_reference?: APIMessageReferenceSend | undefined;
+ /**
+ * The components to include with the message
+ *
+ * See https://discord.com/developers/docs/interactions/message-components#component-object
+ */
+ components?: APIActionRowComponent<APIMessageActionRowComponent>[] | undefined;
+ /**
+ * IDs of up to 3 stickers in the server to send in the message
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object
+ */
+ sticker_ids?: [Snowflake] | [Snowflake, Snowflake] | [Snowflake, Snowflake, Snowflake] | undefined;
+ /**
+ * Attachment objects with filename and description
+ */
+ attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
+ /**
+ * Message flags combined as a bitfield
+ */
+ flags?: MessageFlags | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#create-message
+ */
+export type RESTPostAPIChannelMessageFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPostAPIChannelMessageJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/resources/channel#create-message
+ */
+export type RESTPostAPIChannelMessageResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/channel#crosspost-message
+ */
+export type RESTPostAPIChannelMessageCrosspostResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/channel#create-reaction
+ */
+export type RESTPutAPIChannelMessageReactionResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-own-reaction
+ */
+export type RESTDeleteAPIChannelMessageOwnReaction = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-user-reaction
+ */
+export type RESTDeleteAPIChannelMessageUserReactionResult = never;
+export interface RESTGetAPIChannelMessageReactionUsersQuery {
+ /**
+ * Get users after this user ID
+ */
+ after?: Snowflake;
+ /**
+ * Max number of users to return (1-100)
+ *
+ * @default 25
+ */
+ limit?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#get-reactions
+ */
+export type RESTGetAPIChannelMessageReactionUsersResult = APIUser[];
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-all-reactions
+ */
+export type RESTDeleteAPIChannelAllMessageReactionsResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji
+ */
+export type RESTDeleteAPIChannelMessageReactionResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#edit-message
+ */
+export interface RESTPatchAPIChannelMessageJSONBody {
+ /**
+ * The new message contents (up to 2000 characters)
+ */
+ content?: string | null | undefined;
+ /**
+ * Embedded `rich` content (up to 6000 characters)
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object
+ */
+ embeds?: APIEmbed[] | null | undefined;
+ /**
+ * Edit the flags of a message (only `SUPPRESS_EMBEDS` can currently be set/unset)
+ *
+ * When specifying flags, ensure to include all previously set flags/bits
+ * in addition to ones that you are modifying
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-flags
+ */
+ flags?: MessageFlags | null | undefined;
+ /**
+ * Allowed mentions for the message
+ *
+ * See https://discord.com/developers/docs/resources/channel#allowed-mentions-object
+ */
+ allowed_mentions?: APIAllowedMentions | null | undefined;
+ /**
+ * Attached files to keep
+ *
+ * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
+ *
+ * See https://discord.com/developers/docs/resources/channel#attachment-object
+ */
+ attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
+ /**
+ * The components to include with the message
+ *
+ * See https://discord.com/developers/docs/interactions/message-components#component-object
+ */
+ components?: APIActionRowComponent<APIMessageActionRowComponent>[] | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#edit-message
+ */
+export type RESTPatchAPIChannelMessageFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPatchAPIChannelMessageJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/resources/channel#edit-message
+ */
+export type RESTPatchAPIChannelMessageResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-message
+ */
+export type RESTDeleteAPIChannelMessageResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#bulk-delete-messages
+ */
+export interface RESTPostAPIChannelMessagesBulkDeleteJSONBody {
+ /**
+ * An array of message ids to delete (2-100)
+ */
+ messages: Snowflake[];
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#bulk-delete-messages
+ */
+export type RESTPostAPIChannelMessagesBulkDeleteResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#edit-channel-permissions
+ */
+export interface RESTPutAPIChannelPermissionJSONBody {
+ /**
+ * The bitwise value of all allowed permissions
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ *
+ * @default "0"
+ */
+ allow?: Permissions | null | undefined;
+ /**
+ * The bitwise value of all disallowed permissions
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ *
+ * @default "0"
+ */
+ deny?: Permissions | null | undefined;
+ /**
+ * `0` for a role or `1` for a member
+ */
+ type: OverwriteType;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#edit-channel-permissions
+ */
+export type RESTPutAPIChannelPermissionResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#get-channel-invites
+ */
+export type RESTGetAPIChannelInvitesResult = APIExtendedInvite[];
+/**
+ * https://discord.com/developers/docs/resources/channel#create-channel-invite
+ */
+export interface RESTPostAPIChannelInviteJSONBody {
+ /**
+ * Duration of invite in seconds before expiry, or 0 for never
+ *
+ * @default 86400 (24 hours)
+ */
+ max_age?: number | undefined;
+ /**
+ * Max number of uses or 0 for unlimited
+ *
+ * @default 0
+ */
+ max_uses?: number | undefined;
+ /**
+ * Whether this invite only grants temporary membership
+ *
+ * @default false
+ */
+ temporary?: boolean | undefined;
+ /**
+ * If true, don't try to reuse a similar invite
+ * (useful for creating many unique one time use invites)
+ *
+ * @default false
+ */
+ unique?: boolean | undefined;
+ /**
+ * The type of target for this voice channel invite
+ *
+ * See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
+ */
+ target_type?: InviteTargetType | undefined;
+ /**
+ * The id of the user whose stream to display for this invite
+ * - Required if `target_type` is 1
+ * - The user must be streaming in the channel
+ */
+ target_user_id?: Snowflake | undefined;
+ /**
+ * The id of the embedded application to open for this invite
+ * - Required if `target_type` is 2
+ * - The application must have the `EMBEDDED` flag
+ */
+ target_application_id?: Snowflake | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#create-channel-invite
+ */
+export type RESTPostAPIChannelInviteResult = APIExtendedInvite;
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-channel-permission
+ */
+export type RESTDeleteAPIChannelPermissionResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#follow-news-channel
+ */
+export interface RESTPostAPIChannelFollowersJSONBody {
+ /**
+ * ID of target channel
+ */
+ webhook_channel_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#follow-news-channel
+ */
+export type RESTPostAPIChannelFollowersResult = APIFollowedChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#trigger-typing-indicator
+ */
+export type RESTPostAPIChannelTypingResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#get-pinned-messages
+ */
+export type RESTGetAPIChannelPinsResult = APIMessage[];
+/**
+ * https://discord.com/developers/docs/resources/channel#pin-message
+ */
+export type RESTPutAPIChannelPinResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#unpin-message
+ */
+export type RESTDeleteAPIChannelPinResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
+ */
+export interface RESTPutAPIChannelRecipientJSONBody {
+ /**
+ * Access token of a user that has granted your app the `gdm.join` scope
+ */
+ access_token: string;
+ /**
+ * Nickname of the user being added
+ */
+ nick?: string | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
+ */
+export type RESTPutAPIChannelRecipientResult = unknown;
+/**
+ * https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient
+ */
+export type RESTDeleteAPIChannelRecipientResult = unknown;
+/**
+ * https://discord.com/developers/docs/resources/channel#start-thread-from-message
+ */
+export interface RESTPostAPIChannelMessagesThreadsJSONBody {
+ /**
+ * 1-100 character thread name
+ */
+ name: string;
+ /**
+ * The amount of time in minutes to wait before automatically archiving the thread
+ */
+ auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
+ /**
+ * Amount of seconds a user has to wait before sending another message (0-21600)
+ */
+ rate_limit_per_user?: number | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
+ */
+export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
+ /**
+ * First message in the forum thread
+ */
+ message: RESTPostAPIChannelMessageJSONBody;
+ /**
+ * The IDs of the set of tags that have been applied to a thread in a forum channel; limited to 5
+ */
+ applied_tags?: Snowflake[] | undefined;
+};
+/**
+ * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
+ */
+export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
+ /**
+ * First message in the forum thread
+ */
+ message: string;
+};
+/**
+ * https://discord.com/developers/docs/resources/channel#start-thread-from-message
+ */
+export type RESTPostAPIChannelMessagesThreadsResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#start-thread-without-message
+ */
+export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMessagesThreadsJSONBody {
+ /**
+ * The type of thread to create
+ *
+ * In API v9 and v10, `type` defaults to `PRIVATE_THREAD`.
+ * In a future API version this will be changed to be a required field, with no default.
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object-channel-types
+ *
+ * @default ChannelType.PrivateThread
+ */
+ type?: ChannelType.AnnouncementThread | ChannelType.PublicThread | ChannelType.PrivateThread | undefined;
+ /**
+ * Whether non-moderators can add other non-moderators to the thread; only available when creating a private thread
+ */
+ invitable?: boolean | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#start-thread-without-message
+ */
+export type RESTPostAPIChannelThreadsResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#join-thread
+ */
+export type RESTPutAPIChannelThreadMembersResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#leave-thread
+ */
+export type RESTDeleteAPIChannelThreadMembersResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#get-thread-member
+ */
+export interface RESTGetAPIChannelThreadMemberQuery {
+ /**
+ * Whether to include a guild member object for the thread member
+ */
+ with_member?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#get-thread-member
+ */
+export type RESTGetAPIChannelThreadMemberResult = APIThreadMember;
+/**
+ * https://discord.com/developers/docs/resources/channel#list-thread-members
+ */
+export interface RESTGetAPIChannelThreadMembersQuery {
+ /**
+ * Whether to include a guild member object for each thread member
+ */
+ with_member?: boolean;
+ /**
+ * Get thread members after this user ID
+ */
+ after?: Snowflake;
+ /**
+ * Max number of thread members to return (1-100). Defaults to 100
+ */
+ limit?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#list-thread-members
+ */
+export type RESTGetAPIChannelThreadMembersResult = APIThreadMember[];
+export interface RESTGetAPIChannelThreadsArchivedQuery {
+ /**
+ * Get threads before this id or ISO8601 timestamp
+ */
+ before?: Snowflake | string;
+ /**
+ * Max number of thread to return
+ */
+ limit?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#list-public-archived-threads
+ */
+export type RESTGetAPIChannelThreadsArchivedPublicResult = RESTGetAPIChannelUsersThreadsArchivedResult;
+/**
+ * https://discord.com/developers/docs/resources/channel#list-private-archived-threads
+ */
+export type RESTGetAPIChannelThreadsArchivedPrivateResult = RESTGetAPIChannelUsersThreadsArchivedResult;
+/**
+ * https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads
+ */
+export interface RESTGetAPIChannelUsersThreadsArchivedResult extends APIThreadList {
+ /**
+ * Whether there are potentially additional threads
+ */
+ has_more: boolean;
+}
+//# sourceMappingURL=channel.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/channel.d.ts.map b/node_modules/discord-api-types/rest/v10/channel.d.ts.map
new file mode 100644
index 0000000..0246fb1
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/channel.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,4BAA4B,EAC5B,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,iCAAiC,EACjC,aAAa,EACb,eAAe,EACf,MAAM,0BAA0B,CAAC;A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E,SAAS,GAAG,MAAM,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,4CAA4C,GAAG,2CAA2C,CAAC;AAEvG;;GAEG;AACH,MAAM,MAAM,6CAA6C,GAAG,2CAA2C,CAAC;AAExG;;GAEG;AACH,MAAM,WAAW,2CAA4C,SAAQ,aAAa;IACjF;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;CAClB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/channel.js b/node_modules/discord-api-types/rest/v10/channel.js
new file mode 100644
index 0000000..7c587bc
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/channel.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=channel.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/channel.js.map b/node_modules/discord-api-types/rest/v10/channel.js.map
new file mode 100644
index 0000000..f1057f4
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/channel.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/emoji.d.ts b/node_modules/discord-api-types/rest/v10/emoji.d.ts
new file mode 100644
index 0000000..a68a0da
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/emoji.d.ts
@@ -0,0 +1,55 @@
+import type { Snowflake } from '../../globals';
+import type { APIEmoji } from '../../payloads/v10/index';
+/**
+ * https://discord.com/developers/docs/resources/emoji#list-guild-emojis
+ */
+export type RESTGetAPIGuildEmojisResult = APIEmoji[];
+/**
+ * https://discord.com/developers/docs/resources/emoji#get-guild-emoji
+ */
+export type RESTGetAPIGuildEmojiResult = APIEmoji;
+/**
+ * https://discord.com/developers/docs/resources/emoji#create-guild-emoji-json-params
+ */
+export interface RESTPostAPIGuildEmojiJSONBody {
+ /**
+ * Name of the emoji
+ */
+ name: string;
+ /**
+ * The 128x128 emoji image
+ *
+ * https://discord.com/developers/docs/reference#image-data
+ */
+ image: string;
+ /**
+ * Roles for which this emoji will be whitelisted
+ */
+ roles?: Snowflake[] | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/emoji#create-guild-emoji
+ */
+export type RESTPostAPIGuildEmojiResult = APIEmoji;
+/**
+ * https://discord.com/developers/docs/resources/emoji#modify-guild-emoji
+ */
+export interface RESTPatchAPIGuildEmojiJSONBody {
+ /**
+ * Name of the emoji
+ */
+ name?: string | undefined;
+ /**
+ * Roles for which this emoji will be whitelisted
+ */
+ roles?: Snowflake[] | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/emoji#modify-guild-emoji
+ */
+export type RESTPatchAPIGuildEmojiResult = APIEmoji;
+/**
+ * https://discord.com/developers/docs/resources/emoji#delete-guild-emoji
+ */
+export type RESTDeleteAPIGuildEmojiResult = never;
+//# sourceMappingURL=emoji.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/emoji.d.ts.map b/node_modules/discord-api-types/rest/v10/emoji.d.ts.map
new file mode 100644
index 0000000..0b5c029
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/emoji.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,EAAE,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC7C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,QAAQ,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,KAAK,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/emoji.js b/node_modules/discord-api-types/rest/v10/emoji.js
new file mode 100644
index 0000000..9b3d9c9
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/emoji.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=emoji.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/emoji.js.map b/node_modules/discord-api-types/rest/v10/emoji.js.map
new file mode 100644
index 0000000..100b53e
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/emoji.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"emoji.js","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/gateway.d.ts b/node_modules/discord-api-types/rest/v10/gateway.d.ts
new file mode 100644
index 0000000..62a78f3
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/gateway.d.ts
@@ -0,0 +1,10 @@
+import type { APIGatewayBotInfo, APIGatewayInfo } from '../../payloads/v10/index';
+/**
+ * https://discord.com/developers/docs/topics/gateway#get-gateway
+ */
+export type RESTGetAPIGatewayResult = APIGatewayInfo;
+/**
+ * https://discord.com/developers/docs/topics/gateway#get-gateway-bot
+ */
+export type RESTGetAPIGatewayBotResult = APIGatewayBotInfo;
+//# sourceMappingURL=gateway.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/gateway.d.ts.map b/node_modules/discord-api-types/rest/v10/gateway.d.ts.map
new file mode 100644
index 0000000..fef05c0
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/gateway.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAElF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/gateway.js b/node_modules/discord-api-types/rest/v10/gateway.js
new file mode 100644
index 0000000..81495a6
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/gateway.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=gateway.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/gateway.js.map b/node_modules/discord-api-types/rest/v10/gateway.js.map
new file mode 100644
index 0000000..f7127a2
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/gateway.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"gateway.js","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/guild.d.ts b/node_modules/discord-api-types/rest/v10/guild.d.ts
new file mode 100644
index 0000000..6af06a3
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/guild.d.ts
@@ -0,0 +1,811 @@
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIBan, APIChannel, APIDMChannel, APIExtendedInvite, APIGroupDMChannel, APIGuild, APIGuildIntegration, APIGuildMember, APIGuildMembershipScreening, APIGuildOnboarding, APIGuildPreview, APIGuildWelcomeScreen, APIGuildWidget, APIGuildWidgetSettings, APIRole, APIThreadList, APIVoiceRegion, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildFeature, GuildMFALevel, GuildSystemChannelFlags, GuildVerificationLevel, GuildWidgetStyle } from '../../payloads/v10/index';
+import type { DistributiveOmit, DistributivePick, Nullable, StrictPartial, StrictRequired } from '../../utils/internals';
+import type { RESTPutAPIChannelPermissionJSONBody } from './channel';
+export interface APIGuildCreateOverwrite extends RESTPutAPIChannelPermissionJSONBody {
+ id: number | string;
+}
+export type APIGuildChannelResolvable = Exclude<APIChannel, APIDMChannel | APIGroupDMChannel>;
+export type APIGuildCreatePartialChannel = StrictPartial<DistributivePick<APIGuildChannelResolvable, 'type' | 'topic' | 'nsfw' | 'bitrate' | 'user_limit' | 'rate_limit_per_user' | 'default_auto_archive_duration' | 'position' | 'rtc_region' | 'video_quality_mode' | 'flags' | 'default_reaction_emoji' | 'available_tags' | 'default_sort_order' | 'default_forum_layout' | 'default_thread_rate_limit_per_user'>> & {
+ name: string;
+ id?: number | string | undefined;
+ parent_id?: number | string | null | undefined;
+ permission_overwrites?: APIGuildCreateOverwrite[] | undefined;
+};
+export interface APIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody {
+ id: number | string;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild
+ */
+export interface RESTPostAPIGuildsJSONBody {
+ /**
+ * Name of the guild (2-100 characters)
+ */
+ name: string;
+ /**
+ * Voice region id
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-region-object
+ */
+ region?: string | undefined;
+ /**
+ * base64 1024x1024 png/jpeg image for the guild icon
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ icon?: string | undefined;
+ /**
+ * Verification level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ */
+ verification_level?: GuildVerificationLevel | undefined;
+ /**
+ * Default message notification level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
+ */
+ default_message_notifications?: GuildDefaultMessageNotifications | undefined;
+ /**
+ * Explicit content filter level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
+ */
+ explicit_content_filter?: GuildExplicitContentFilter | undefined;
+ /**
+ * New guild roles
+ *
+ * @remarks
+ * When using this parameter, the first member of the array is used to change properties of the guild's `@everyone` role.
+ * If you are trying to bootstrap a guild with additional roles, keep this in mind.
+ *
+ * Also, the required `id` field within each role object is an integer placeholder,
+ * and will be replaced by the API upon consumption. Its purpose is to allow you to overwrite a role's permissions
+ * in a channel when also passing in channels with the channels array.
+ *
+ * See https://discord.com/developers/docs/topics/permissions#role-object
+ */
+ roles?: APIGuildCreateRole[] | undefined;
+ /**
+ * New guild's channels
+ *
+ * @remarks
+ * When using the channels parameter, the `position` field is ignored, and none of the default channels are created.
+ *
+ * Also, the `id` field within each channel object may be set to an integer placeholder,
+ * and will be replaced by the API upon consumption. Its purpose is to allow you to create `GUILD_CATEGORY` channels
+ * by setting the `parent_id` field on any children to the category's id field.
+ * Category channels must be listed before any children.
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object
+ */
+ channels?: APIGuildCreatePartialChannel[] | undefined;
+ /**
+ * ID for afk channel
+ */
+ afk_channel_id?: number | Snowflake | null | undefined;
+ /**
+ * afk timeout in seconds, can be set to: `60`, `300`, `900`, `1800`, `3600`
+ */
+ afk_timeout?: 60 | 300 | 900 | 1800 | 3600 | undefined;
+ /**
+ * The id of the channel where guild notices such as welcome messages and boost events are posted
+ */
+ system_channel_id?: number | Snowflake | null | undefined;
+ /**
+ * System channel flags
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
+ */
+ system_channel_flags?: GuildSystemChannelFlags | undefined;
+ /**
+ * Whether the boosts progress bar should be enabled.
+ */
+ premium_progress_bar_enabled?: boolean | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild
+ */
+export type RESTPostAPIGuildsResult = APIGuild;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level
+ */
+export interface RESTPostAPIGuildsMFAJSONBody {
+ /**
+ * MFA level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
+ */
+ level: GuildMFALevel;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level
+ */
+export type RESTPostAPIGuildsMFAResult = RESTPostAPIGuildsMFAJSONBody;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild
+ */
+export interface RESTGetAPIGuildQuery {
+ /**
+ * When `true`, will return approximate member and presence counts for the guild
+ *
+ * @default false
+ */
+ with_counts?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild
+ */
+export type RESTGetAPIGuildResult = APIGuild;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-preview
+ */
+export type RESTGetAPIGuildPreviewResult = APIGuildPreview;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild
+ */
+export interface RESTPatchAPIGuildJSONBody {
+ /**
+ * New name for the guild (2-100 characters)
+ */
+ name?: string | undefined;
+ /**
+ * Voice region id
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-region-object
+ */
+ region?: string | null | undefined;
+ /**
+ * Verification level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ */
+ verification_level?: GuildVerificationLevel | null | undefined;
+ /**
+ * Default message notification level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
+ */
+ default_message_notifications?: GuildDefaultMessageNotifications | null | undefined;
+ /**
+ * Explicit content filter level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
+ */
+ explicit_content_filter?: GuildExplicitContentFilter | null | undefined;
+ /**
+ * ID for afk channel
+ */
+ afk_channel_id?: Snowflake | null | undefined;
+ /**
+ * afk timeout in seconds, can be set to: `60`, `300`, `900`, `1800`, `3600`
+ */
+ afk_timeout?: 60 | 300 | 900 | 1800 | 3600 | undefined;
+ /**
+ * base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the guild has `ANIMATED_ICON` feature)
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ icon?: string | null | undefined;
+ /**
+ * User id to transfer guild ownership to (must be owner)
+ */
+ owner_id?: Snowflake | undefined;
+ /**
+ * base64 16:9 png/jpeg image for the guild splash (when the guild has `INVITE_SPLASH` feature)
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ splash?: string | null | undefined;
+ /**
+ * base64 png/jpeg image for the guild discovery splash (when the guild has `DISCOVERABLE` feature)
+ */
+ discovery_splash?: string | null | undefined;
+ /**
+ * base64 16:9 png/jpeg image for the guild banner (when the server has the `BANNER` feature; can be animated gif when the server has the `ANIMATED_BANNER` feature)
+ */
+ banner?: string | null | undefined;
+ /**
+ * The id of the channel where guild notices such as welcome messages and boost events are posted
+ */
+ system_channel_id?: Snowflake | null | undefined;
+ /**
+ * System channel flags
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
+ */
+ system_channel_flags?: GuildSystemChannelFlags | undefined;
+ /**
+ * The id of the channel where Community guilds display rules and/or guidelines
+ */
+ rules_channel_id?: Snowflake | null | undefined;
+ /**
+ * The id of the channel where admins and moderators of Community guilds receive notices from Discord
+ */
+ public_updates_channel_id?: Snowflake | null | undefined;
+ /**
+ * The preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US"
+ *
+ * @default "en-US" (if the value is set to `null`)
+ */
+ preferred_locale?: string | null | undefined;
+ /**
+ * Enabled guild features
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ */
+ features?: GuildFeature[] | undefined;
+ /**
+ * The description for the guild
+ */
+ description?: string | null | undefined;
+ /**
+ * Whether the boosts progress bar should be enabled.
+ */
+ premium_progress_bar_enabled?: boolean | undefined;
+ /**
+ * The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
+ */
+ safety_alerts_channel_id?: Snowflake | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild
+ */
+export type RESTPatchAPIGuildResult = APIGuild;
+/**
+ * https://discord.com/developers/docs/resources/guild#delete-guild
+ */
+export type RESTDeleteAPIGuildResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-channels
+ */
+export type RESTGetAPIGuildChannelsResult = APIChannel[];
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-channel
+ */
+export type RESTPostAPIGuildChannelJSONBody = DistributiveOmit<APIGuildCreatePartialChannel, 'id'>;
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-channel
+ */
+export type RESTPostAPIGuildChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions
+ */
+export type RESTPatchAPIGuildChannelPositionsJSONBody = {
+ /**
+ * Channel id
+ */
+ id: Snowflake;
+ /**
+ * Sorting position of the channel
+ */
+ position: number;
+ /**
+ * Sync channel overwrites with the new parent, when moving to a new `parent_id`
+ */
+ lock_permissions?: boolean | undefined;
+ /**
+ * The new parent id of this channel
+ */
+ parent_id?: Snowflake | null | undefined;
+}[];
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions
+ */
+export type RESTPatchAPIGuildChannelPositionsResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#list-active-guild-threads
+ */
+export type RESTGetAPIGuildThreadsResult = APIThreadList;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-member
+ */
+export type RESTGetAPIGuildMemberResult = APIGuildMember;
+/**
+ * https://discord.com/developers/docs/resources/guild#list-guild-members
+ */
+export interface RESTGetAPIGuildMembersQuery {
+ /**
+ * Max number of members to return (1-1000)
+ *
+ * @default 1
+ */
+ limit?: number;
+ /**
+ * The highest user id in the previous page
+ *
+ * @default 0
+ */
+ after?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#list-guild-members
+ */
+export type RESTGetAPIGuildMembersResult = APIGuildMember[];
+/**
+ * https://discord.com/developers/docs/resources/guild#search-guild-members
+ */
+export interface RESTGetAPIGuildMembersSearchQuery {
+ /**
+ * Query string to match username(s) and nickname(s) against
+ */
+ query: string;
+ /**
+ * Max number of members to return (1-1000)
+ *
+ * @default 1
+ */
+ limit?: number;
+}
+export type RESTGetAPIGuildMembersSearchResult = APIGuildMember[];
+/**
+ * https://discord.com/developers/docs/resources/guild#add-guild-member
+ */
+export interface RESTPutAPIGuildMemberJSONBody {
+ /**
+ * An oauth2 access token granted with the `guilds.join` to the bot's application for the user you want to add to the guild
+ */
+ access_token: string;
+ /**
+ * Value to set users nickname to
+ *
+ * Requires `MANAGE_NICKNAMES` permission
+ */
+ nick?: string | undefined;
+ /**
+ * Array of role ids the member is assigned
+ *
+ * Requires `MANAGE_ROLES` permission
+ */
+ roles?: Snowflake[] | undefined;
+ /**
+ * Whether the user is muted in voice channels
+ *
+ * Requires `MUTE_MEMBERS` permission
+ */
+ mute?: boolean | undefined;
+ /**
+ * Whether the user is deafened in voice channels
+ *
+ * Requires `DEAFEN_MEMBERS` permission
+ */
+ deaf?: boolean | undefined;
+}
+export type RESTPutAPIGuildMemberResult = APIGuildMember | never;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-member
+ */
+export interface RESTPatchAPIGuildMemberJSONBody {
+ /**
+ * Value to set users nickname to
+ *
+ * Requires `MANAGE_NICKNAMES` permission
+ */
+ nick?: string | null | undefined;
+ /**
+ * Array of role ids the member is assigned
+ *
+ * Requires `MANAGE_ROLES` permission
+ */
+ roles?: Snowflake[] | null | undefined;
+ /**
+ * Whether the user is muted in voice channels. Will throw a 400 if the user is not in a voice channel
+ *
+ * Requires `MUTE_MEMBERS` permission
+ */
+ mute?: boolean | null | undefined;
+ /**
+ * Whether the user is deafened in voice channels. Will throw a 400 if the user is not in a voice channel
+ *
+ * Requires `DEAFEN_MEMBERS` permission
+ */
+ deaf?: boolean | null | undefined;
+ /**
+ * ID of channel to move user to (if they are connected to voice)
+ *
+ * Requires `MOVE_MEMBERS` permission
+ */
+ channel_id?: Snowflake | null | undefined;
+ /**
+ * Timestamp of when the time out will be removed; until then, they cannot interact with the guild
+ */
+ communication_disabled_until?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#add-guild-member
+ */
+export type RESTPatchAPIGuildMemberResult = APIGuildMember;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-current-user-nick
+ *
+ * @deprecated Use [Modify Current Member](https://discord.com/developers/docs/resources/guild#modify-current-member) instead.
+ */
+export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody {
+ /**
+ * Value to set users nickname to
+ *
+ * Requires `CHANGE_NICKNAME` permission
+ */
+ nick?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-current-member
+ */
+export interface RESTPatchAPICurrentGuildMemberJSONBody {
+ /**
+ * Value to set users nickname to
+ *
+ * Requires `CHANGE_NICKNAME` permission
+ */
+ nick?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-current-user-nick
+ *
+ * @deprecated Use [Modify Current Member](https://discord.com/developers/docs/resources/guild#modify-current-member) instead.
+ */
+export type RESTPatchAPICurrentGuildMemberNicknameResult = StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
+/**
+ * https://discord.com/developers/docs/resources/guild#add-guild-member-role
+ */
+export type RESTPutAPIGuildMemberRoleResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#remove-guild-member-role
+ */
+export type RESTDeleteAPIGuildMemberRoleResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#remove-guild-member
+ */
+export type RESTDeleteAPIGuildMemberResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-bans
+ */
+export type RESTGetAPIGuildBansResult = APIBan[];
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-bans
+ */
+export interface RESTGetAPIGuildBansQuery {
+ /**
+ * Consider only users before given user id
+ */
+ before?: Snowflake;
+ /**
+ * Consider only users after given user id
+ */
+ after?: Snowflake;
+ /**
+ * Number of users to return (1-1000)
+ *
+ * @default 1000
+ */
+ limit?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-ban
+ */
+export type RESTGetAPIGuildBanResult = APIBan;
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-ban
+ */
+export interface RESTPutAPIGuildBanJSONBody {
+ /**
+ * Number of days to delete messages for (0-7)
+ *
+ * @deprecated use `delete_message_seconds` instead
+ */
+ delete_message_days?: number | undefined;
+ /**
+ * Number of seconds to delete messages for, between 0 and 604800 (7 days)
+ */
+ delete_message_seconds?: number | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-ban
+ */
+export type RESTPutAPIGuildBanResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#remove-guild-ban
+ */
+export type RESTDeleteAPIGuildBanResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-roles
+ */
+export type RESTGetAPIGuildRolesResult = APIRole[];
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-role
+ */
+export interface RESTPostAPIGuildRoleJSONBody {
+ /**
+ * Name of the role
+ *
+ * @default "new role"
+ */
+ name?: string | null | undefined;
+ /**
+ * Bitwise value of the enabled/disabled permissions
+ *
+ * @default "default role permissions in guild"
+ */
+ permissions?: Permissions | null | undefined;
+ /**
+ * RGB color value
+ *
+ * @default 0
+ */
+ color?: number | null | undefined;
+ /**
+ * Whether the role should be displayed separately in the sidebar
+ *
+ * @default false
+ */
+ hoist?: boolean | null | undefined;
+ /**
+ * The role's icon image (if the guild has the `ROLE_ICONS` feature)
+ */
+ icon?: string | null | undefined;
+ /**
+ * The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature)
+ */
+ unicode_emoji?: string | null | undefined;
+ /**
+ * Whether the role should be mentionable
+ *
+ * @default false
+ */
+ mentionable?: boolean | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-role
+ */
+export type RESTPostAPIGuildRoleResult = APIRole;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-role-positions
+ */
+export type RESTPatchAPIGuildRolePositionsJSONBody = {
+ /**
+ * Role id
+ */
+ id: Snowflake;
+ /**
+ * Sorting position of the role
+ */
+ position?: number | undefined;
+}[];
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-role-positions
+ */
+export type RESTPatchAPIGuildRolePositionsResult = APIRole[];
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-role
+ */
+export interface RESTPatchAPIGuildRoleJSONBody {
+ /**
+ * Name of the role
+ */
+ name?: string | null | undefined;
+ /**
+ * Bitwise value of the enabled/disabled permissions
+ */
+ permissions?: Permissions | null | undefined;
+ /**
+ * RGB color value
+ */
+ color?: number | null | undefined;
+ /**
+ * Whether the role should be displayed separately in the sidebar
+ */
+ hoist?: boolean | null | undefined;
+ /**
+ * The role's icon image (if the guild has the `ROLE_ICONS` feature)
+ */
+ icon?: string | null | undefined;
+ /**
+ * The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature)
+ */
+ unicode_emoji?: string | null | undefined;
+ /**
+ * Whether the role should be mentionable
+ */
+ mentionable?: boolean | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-role
+ */
+export type RESTPatchAPIGuildRoleResult = APIRole;
+/**
+ * https://discord.com/developers/docs/resources/guild#delete-guild-role
+ */
+export type RESTDeleteAPIGuildRoleResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-prune-count
+ */
+export interface RESTGetAPIGuildPruneCountQuery {
+ /**
+ * Number of days to count prune for (1 or more)
+ *
+ * @default 7
+ */
+ days?: number;
+ /**
+ * Role(s) to include
+ *
+ * While this is typed as a string, it represents an array of
+ * role IDs delimited by commas
+ *
+ * See https://discord.com/developers/docs/resources/guild#get-guild-prune-count-query-string-params
+ */
+ include_roles?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-prune-count
+ */
+export interface RESTGetAPIGuildPruneCountResult {
+ pruned: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#begin-guild-prune
+ */
+export interface RESTPostAPIGuildPruneJSONBody {
+ /**
+ * Number of days to count prune for (1 or more)
+ *
+ * @default 7
+ */
+ days?: number | undefined;
+ /**
+ * Whether `pruned is returned, discouraged for large guilds
+ *
+ * @default true
+ */
+ compute_prune_count?: boolean | undefined;
+ /**
+ * Role(s) to include
+ */
+ include_roles?: Snowflake[] | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#begin-guild-prune
+ */
+export interface RESTPostAPIGuildPruneResult {
+ pruned: number | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-voice-regions
+ */
+export type RESTGetAPIGuildVoiceRegionsResult = APIVoiceRegion[];
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-invites
+ */
+export type RESTGetAPIGuildInvitesResult = APIExtendedInvite[];
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-integrations
+ */
+export type RESTGetAPIGuildIntegrationsResult = APIGuildIntegration[];
+/**
+ * https://discord.com/developers/docs/resources/guild#delete-guild-integration
+ */
+export type RESTDeleteAPIGuildIntegrationResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-settings
+ */
+export type RESTGetAPIGuildWidgetSettingsResult = APIGuildWidgetSettings;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-widget
+ */
+export type RESTPatchAPIGuildWidgetSettingsJSONBody = StrictPartial<APIGuildWidgetSettings>;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-widget
+ */
+export type RESTPatchAPIGuildWidgetSettingsResult = APIGuildWidgetSettings;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget
+ */
+export type RESTGetAPIGuildWidgetJSONResult = APIGuildWidget;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-vanity-url
+ */
+export interface RESTGetAPIGuildVanityUrlResult {
+ code: string | null;
+ uses: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-image
+ */
+export interface RESTGetAPIGuildWidgetImageQuery {
+ /**
+ * Style of the widget image returned
+ *
+ * @default "shield"
+ */
+ style?: GuildWidgetStyle;
+}
+/**
+ * Note: while the return type is `ArrayBuffer`, the expected result is
+ * a buffer of sorts (depends if in browser or on node.js/deno).
+ */
+export type RESTGetAPIGuildWidgetImageResult = ArrayBuffer;
+export type RESTGetAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
+export interface RESTPatchAPIGuildMemberVerificationJSONBody {
+ /**
+ * Whether Membership Screening is enabled
+ */
+ enabled?: boolean | undefined;
+ /**
+ * Array of field objects serialized in a string
+ */
+ form_fields?: string | undefined;
+ /**
+ * The server description to show in the screening form
+ */
+ description?: string | null | undefined;
+}
+export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
+ */
+export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
+ /**
+ * The id of the channel the user is currently in
+ */
+ channel_id?: Snowflake | undefined;
+ /**
+ * Toggles the user's suppress state
+ */
+ suppress?: boolean | undefined;
+ /**
+ * Sets the user's request to speak
+ */
+ request_to_speak_timestamp?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
+ */
+export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-user-voice-state
+ */
+export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
+ /**
+ * The id of the channel the user is currently in
+ */
+ channel_id: Snowflake;
+ /**
+ * Toggles the user's suppress state
+ */
+ suppress?: boolean | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-user-voice-state
+ */
+export type RESTPatchAPIGuildVoiceStateUserResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen
+ */
+export type RESTGetAPIGuildWelcomeScreenResult = APIGuildWelcomeScreen;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen
+ */
+export type RESTPatchAPIGuildWelcomeScreenJSONBody = Nullable<StrictPartial<APIGuildWelcomeScreen>> & {
+ /**
+ * Whether the welcome screen is enabled
+ */
+ enabled?: boolean | null | undefined;
+};
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen
+ */
+export type RESTPatchAPIGuildWelcomeScreenResult = APIGuildWelcomeScreen;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-onboarding
+ */
+export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
+ */
+export type RESTPutAPIGuildOnboardingJSONBody = Pick<APIGuildOnboarding, 'default_channel_ids' | 'enabled' | 'mode' | 'prompts'>;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
+ */
+export type RESTPutAPIGuildOnboardingResult = APIGuildOnboarding;
+//# sourceMappingURL=guild.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/guild.d.ts.map b/node_modules/discord-api-types/rest/v10/guild.d.ts.map
new file mode 100644
index 0000000..efd637e
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/guild.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"guild.d.ts","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EACX,MAAM,EACN,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,2BAA2B,EAC3B,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,sBAAsB,EACtB,OAAO,EACP,aAAa,EACb,cAAc,EACd,gCAAgC,EAChC,0BAA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qB,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,QAAQ,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC,GAAG;IACrG;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;CACrC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,qBAAqB,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,kBAAkB,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,IAAI,CACnD,kBAAkB,EAClB,qBAAqB,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CACtD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,kBAAkB,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/guild.js b/node_modules/discord-api-types/rest/v10/guild.js
new file mode 100644
index 0000000..39864d9
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/guild.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=guild.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/guild.js.map b/node_modules/discord-api-types/rest/v10/guild.js.map
new file mode 100644
index 0000000..22534b0
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/guild.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"guild.js","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/guildScheduledEvent.d.ts b/node_modules/discord-api-types/rest/v10/guildScheduledEvent.d.ts
new file mode 100644
index 0000000..acdddb5
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/guildScheduledEvent.d.ts
@@ -0,0 +1,127 @@
+import type { Snowflake } from '../../globals';
+import type { StrictPartial } from '../../utils/internals';
+import type { APIGuildScheduledEvent, APIGuildScheduledEventEntityMetadata, APIGuildScheduledEventUser, GuildScheduledEventEntityType, GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus } from '../../v10';
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild
+ */
+export interface RESTGetAPIGuildScheduledEventsQuery {
+ /**
+ * Whether to include number of users subscribed to each event
+ */
+ with_user_count?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild
+ */
+export type RESTGetAPIGuildScheduledEventsResult = APIGuildScheduledEvent[];
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event
+ */
+export interface RESTPostAPIGuildScheduledEventJSONBody {
+ /**
+ * The stage channel id of the guild event
+ */
+ channel_id?: Snowflake | undefined;
+ /**
+ * The name of the guild event
+ */
+ name: string;
+ /**
+ * The privacy level of the guild event
+ */
+ privacy_level: GuildScheduledEventPrivacyLevel;
+ /**
+ * The time to schedule the guild event at
+ */
+ scheduled_start_time: string;
+ /**
+ * The time when the scheduled event is scheduled to end
+ */
+ scheduled_end_time?: string | undefined;
+ /**
+ * The description of the guild event
+ */
+ description?: string | undefined;
+ /**
+ * The scheduled entity type of the guild event
+ */
+ entity_type?: GuildScheduledEventEntityType | undefined;
+ /**
+ * The entity metadata of the scheduled event
+ */
+ entity_metadata?: APIGuildScheduledEventEntityMetadata | undefined;
+ /**
+ * The cover image of the scheduled event
+ */
+ image?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event
+ */
+export type RESTPostAPIGuildScheduledEventResult = APIGuildScheduledEvent;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event
+ */
+export interface RESTGetAPIGuildScheduledEventQuery {
+ /**
+ * Whether to include number of users subscribed to this event
+ */
+ with_user_count?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event
+ */
+export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
+ */
+export type RESTPatchAPIGuildScheduledEventJSONBody = StrictPartial<RESTPostAPIGuildScheduledEventJSONBody> & {
+ /**
+ * The status of the scheduled event
+ */
+ status?: GuildScheduledEventStatus | undefined;
+ /**
+ * The entity metadata of the scheduled event
+ */
+ entity_metadata?: APIGuildScheduledEventEntityMetadata | null | undefined;
+ /**
+ * The description of the guild event
+ */
+ description?: string | null | undefined;
+};
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
+ */
+export type RESTPatchAPIGuildScheduledEventResult = APIGuildScheduledEvent;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event
+ */
+export type RESTDeleteAPIGuildScheduledEventResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users
+ */
+export interface RESTGetAPIGuildScheduledEventUsersQuery {
+ /**
+ * Number of users to receive from the event
+ *
+ * @default 100
+ */
+ limit?: number;
+ /**
+ * Whether to include guild member data if it exists
+ */
+ with_member?: boolean;
+ /**
+ * Consider only users before given user id
+ */
+ before?: Snowflake;
+ /**
+ * Consider only users after given user id
+ */
+ after?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users
+ */
+export type RESTGetAPIGuildScheduledEventUsersResult = APIGuildScheduledEventUser[];
+//# sourceMappingURL=guildScheduledEvent.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/guildScheduledEvent.d.ts.map b/node_modules/discord-api-types/rest/v10/guildScheduledEvent.d.ts.map
new file mode 100644
index 0000000..16f4b44
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/guildScheduledEvent.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"guildScheduledEvent.d.ts","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings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sCAAsC,CAAC,GAAG;IAC7G;;OAEG;IACH,MAAM,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;IAC/C;;OAEG;IACH,eAAe,CAAC,EAAE,oCAAoC,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1E;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,sBAAsB,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,KAAK,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACvD;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,wCAAwC,GAAG,0BAA0B,EAAE,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/guildScheduledEvent.js b/node_modules/discord-api-types/rest/v10/guildScheduledEvent.js
new file mode 100644
index 0000000..e9e95e3
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/guildScheduledEvent.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=guildScheduledEvent.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/guildScheduledEvent.js.map b/node_modules/discord-api-types/rest/v10/guildScheduledEvent.js.map
new file mode 100644
index 0000000..98c4d81
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/guildScheduledEvent.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"guildScheduledEvent.js","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/index.d.ts b/node_modules/discord-api-types/rest/v10/index.d.ts
new file mode 100644
index 0000000..14fd6b6
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/index.d.ts
@@ -0,0 +1,815 @@
+import type { Snowflake } from '../../globals';
+export * from '../common';
+export * from './application';
+export * from './auditLog';
+export * from './autoModeration';
+export * from './channel';
+export * from './emoji';
+export * from './gateway';
+export * from './guild';
+export * from './guildScheduledEvent';
+export * from './interactions';
+export * from './invite';
+export * from './oauth2';
+export * from './stageInstance';
+export * from './sticker';
+export * from './template';
+export * from './user';
+export * from './voice';
+export * from './webhook';
+export declare const APIVersion = "10";
+export declare const Routes: {
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/role-connections/metadata`
+ * - PUT `/applications/{application.id}/role-connections/metadata`
+ */
+ applicationRoleConnectionMetadata(applicationId: Snowflake): `/applications/${string}/role-connections/metadata`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/auto-moderation/rules`
+ * - POST `/guilds/{guild.id}/auto-moderation/rules`
+ */
+ guildAutoModerationRules(guildId: Snowflake): `/guilds/${string}/auto-moderation/rules`;
+ /**
+ * Routes for:
+ * - GET `/guilds/{guild.id}/auto-moderation/rules/{rule.id}`
+ * - PATCH `/guilds/{guild.id}/auto-moderation/rules/{rule.id}`
+ * - DELETE `/guilds/{guild.id}/auto-moderation/rules/{rule.id}`
+ */
+ guildAutoModerationRule(guildId: Snowflake, ruleId: Snowflake): `/guilds/${string}/auto-moderation/rules/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/audit-logs`
+ */
+ guildAuditLog(guildId: Snowflake): `/guilds/${string}/audit-logs`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}`
+ * - PATCH `/channels/{channel.id}`
+ * - DELETE `/channels/{channel.id}`
+ */
+ channel(channelId: Snowflake): `/channels/${string}`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages`
+ * - POST `/channels/{channel.id}/messages`
+ */
+ channelMessages(channelId: Snowflake): `/channels/${string}/messages`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages/{message.id}`
+ * - PATCH `/channels/{channel.id}/messages/{message.id}`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}`
+ */
+ channelMessage(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}`;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/messages/{message.id}/crosspost`
+ */
+ channelMessageCrosspost(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}/crosspost`;
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageOwnReaction(channelId: Snowflake, messageId: Snowflake, emoji: string): `/channels/${string}/messages/${string}/reactions/${string}/@me`;
+ /**
+ * Route for:
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/{user.id}`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageUserReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, userId: Snowflake): `/channels/${string}/messages/${string}/reactions/${string}/${string}`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string): `/channels/${string}/messages/${string}/reactions/${string}`;
+ /**
+ * Route for:
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions`
+ */
+ channelMessageAllReactions(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}/reactions`;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/messages/bulk-delete`
+ */
+ channelBulkDelete(channelId: Snowflake): `/channels/${string}/messages/bulk-delete`;
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/permissions/{overwrite.id}`
+ * - DELETE `/channels/{channel.id}/permissions/{overwrite.id}`
+ */
+ channelPermission(channelId: Snowflake, overwriteId: Snowflake): `/channels/${string}/permissions/${string}`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/invites`
+ * - POST `/channels/{channel.id}/invites`
+ */
+ channelInvites(channelId: Snowflake): `/channels/${string}/invites`;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/followers`
+ */
+ channelFollowers(channelId: Snowflake): `/channels/${string}/followers`;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/typing`
+ */
+ channelTyping(channelId: Snowflake): `/channels/${string}/typing`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/pins`
+ */
+ channelPins(channelId: Snowflake): `/channels/${string}/pins`;
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/pins/{message.id}`
+ * - DELETE `/channels/{channel.id}/pins/{message.id}`
+ */
+ channelPin(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/pins/${string}`;
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/recipients/{user.id}`
+ * - DELETE `/channels/{channel.id}/recipients/{user.id}`
+ */
+ channelRecipient(channelId: Snowflake, userId: Snowflake): `/channels/${string}/recipients/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/emojis`
+ * - POST `/guilds/{guild.id}/emojis`
+ */
+ guildEmojis(guildId: Snowflake): `/guilds/${string}/emojis`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/emojis/{emoji.id}`
+ * - PATCH `/guilds/{guild.id}/emojis/{emoji.id}`
+ * - DELETE `/guilds/{guild.id}/emojis/{emoji.id}`
+ */
+ guildEmoji(guildId: Snowflake, emojiId: Snowflake): `/guilds/${string}/emojis/${string}`;
+ /**
+ * Route for:
+ * - POST `/guilds`
+ */
+ guilds(): "/guilds";
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}`
+ * - PATCH `/guilds/{guild.id}`
+ * - DELETE `/guilds/{guild.id}`
+ */
+ guild(guildId: Snowflake): `/guilds/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/preview`
+ */
+ guildPreview(guildId: Snowflake): `/guilds/${string}/preview`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/channels`
+ * - POST `/guilds/{guild.id}/channels`
+ * - PATCH `/guilds/{guild.id}/channels`
+ */
+ guildChannels(guildId: Snowflake): `/guilds/${string}/channels`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members/{user.id}`
+ * - PUT `/guilds/{guild.id}/members/{user.id}`
+ * - PATCH `/guilds/{guild.id}/members/@me`
+ * - PATCH `/guilds/{guild.id}/members/{user.id}`
+ * - DELETE `/guilds/{guild.id}/members/{user.id}`
+ */
+ guildMember(guildId: Snowflake, userId?: Snowflake | '@me'): `/guilds/${string}/members/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members`
+ */
+ guildMembers(guildId: Snowflake): `/guilds/${string}/members`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members/search`
+ */
+ guildMembersSearch(guildId: Snowflake): `/guilds/${string}/members/search`;
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/members/@me/nick`
+ *
+ * @deprecated Use {@link Routes.guildMember} instead.
+ */
+ guildCurrentMemberNickname(guildId: Snowflake): `/guilds/${string}/members/@me/nick`;
+ /**
+ * Route for:
+ * - PUT `/guilds/{guild.id}/members/{user.id}/roles/{role.id}`
+ * - DELETE `/guilds/{guild.id}/members/{user.id}/roles/{role.id}`
+ */
+ guildMemberRole(guildId: Snowflake, memberId: Snowflake, roleId: Snowflake): `/guilds/${string}/members/${string}/roles/${string}`;
+ /**
+ * Route for:
+ * - POST `/guilds/{guild.id}/mfa`
+ */
+ guildMFA(guildId: Snowflake): `/guilds/${string}/mfa`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/bans`
+ */
+ guildBans(guildId: Snowflake): `/guilds/${string}/bans`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/bans/{user.id}`
+ * - PUT `/guilds/{guild.id}/bans/{user.id}`
+ * - DELETE `/guilds/{guild.id}/bans/{user.id}`
+ */
+ guildBan(guildId: Snowflake, userId: Snowflake): `/guilds/${string}/bans/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/roles`
+ * - POST `/guilds/{guild.id}/roles`
+ * - PATCH `/guilds/{guild.id}/roles`
+ */
+ guildRoles(guildId: Snowflake): `/guilds/${string}/roles`;
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/roles/{role.id}`
+ * - DELETE `/guilds/{guild.id}/roles/{role.id}`
+ */
+ guildRole(guildId: Snowflake, roleId: Snowflake): `/guilds/${string}/roles/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/prune`
+ * - POST `/guilds/{guild.id}/prune`
+ */
+ guildPrune(guildId: Snowflake): `/guilds/${string}/prune`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/regions`
+ */
+ guildVoiceRegions(guildId: Snowflake): `/guilds/${string}/regions`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/invites`
+ */
+ guildInvites(guildId: Snowflake): `/guilds/${string}/invites`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/integrations`
+ */
+ guildIntegrations(guildId: Snowflake): `/guilds/${string}/integrations`;
+ /**
+ * Route for:
+ * - DELETE `/guilds/{guild.id}/integrations/{integration.id}`
+ */
+ guildIntegration(guildId: Snowflake, integrationId: Snowflake): `/guilds/${string}/integrations/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget`
+ * - PATCH `/guilds/{guild.id}/widget`
+ */
+ guildWidgetSettings(guildId: Snowflake): `/guilds/${string}/widget`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget.json`
+ */
+ guildWidgetJSON(guildId: Snowflake): `/guilds/${string}/widget.json`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/vanity-url`
+ */
+ guildVanityUrl(guildId: Snowflake): `/guilds/${string}/vanity-url`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget.png`
+ */
+ guildWidgetImage(guildId: Snowflake): `/guilds/${string}/widget.png`;
+ /**
+ * Route for:
+ * - GET `/invites/{invite.code}`
+ * - DELETE `/invites/{invite.code}`
+ */
+ invite(code: string): `/invites/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/templates/{template.code}`
+ * - POST `/guilds/templates/{template.code}`
+ */
+ template(code: string): `/guilds/templates/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/templates`
+ * - POST `/guilds/{guild.id}/templates`
+ */
+ guildTemplates(guildId: Snowflake): `/guilds/${string}/templates`;
+ /**
+ * Route for:
+ * - PUT `/guilds/{guild.id}/templates/{template.code}`
+ * - PATCH `/guilds/{guild.id}/templates/{template.code}`
+ * - DELETE `/guilds/{guild.id}/templates/{template.code}`
+ */
+ guildTemplate(guildId: Snowflake, code: string): `/guilds/${string}/templates/${string}`;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/threads`
+ * - POST `/channels/{channel.id}/messages/{message.id}/threads`
+ */
+ threads(parentId: Snowflake, messageId?: Snowflake): `/channels/${string}/threads` | `/channels/${string}/messages/${string}/threads`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/threads/active`
+ */
+ guildActiveThreads(guildId: Snowflake): `/guilds/${string}/threads/active`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/threads/archived/public`
+ * - GET `/channels/{channel.id}/threads/archived/private`
+ */
+ channelThreads(channelId: Snowflake, archivedStatus: 'public' | 'private'): `/channels/${string}/threads/archived/public` | `/channels/${string}/threads/archived/private`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/users/@me/threads/archived/private`
+ */
+ channelJoinedArchivedThreads(channelId: Snowflake): `/channels/${string}/users/@me/threads/archived/private`;
+ /**
+ * Route for:
+ * - GET `/channels/{thread.id}/thread-members`
+ * - GET `/channels/{thread.id}/thread-members/{user.id}`
+ * - PUT `/channels/{thread.id}/thread-members/@me`
+ * - PUT `/channels/{thread.id}/thread-members/{user.id}`
+ * - DELETE `/channels/{thread.id}/thread-members/@me`
+ * - DELETE `/channels/{thread.id}/thread-members/{user.id}`
+ */
+ threadMembers(threadId: Snowflake, userId?: Snowflake | '@me'): `/channels/${string}/thread-members` | `/channels/${string}/thread-members/${string}`;
+ /**
+ * Route for:
+ * - GET `/users/@me`
+ * - GET `/users/{user.id}`
+ * - PATCH `/users/@me`
+ *
+ * @param [userId] The user ID, defaulted to `@me`
+ */
+ user(userId?: Snowflake | '@me'): `/users/${string}`;
+ /**
+ * Route for:
+ * - GET `/users/@me/applications/{application.id}/role-connection`
+ * - PUT `/users/@me/applications/{application.id}/role-connection`
+ */
+ userApplicationRoleConnection(applicationId: Snowflake): `/users/@me/applications/${string}/role-connection`;
+ /**
+ * Route for:
+ * - GET `/users/@me/guilds`
+ */
+ userGuilds(): "/users/@me/guilds";
+ /**
+ * Route for:
+ * - GET `/users/@me/guilds/{guild.id}/member`
+ */
+ userGuildMember(guildId: Snowflake): `/users/@me/guilds/${string}/member`;
+ /**
+ * Route for:
+ * - DELETE `/users/@me/guilds/{guild.id}`
+ */
+ userGuild(guildId: Snowflake): `/users/@me/guilds/${string}`;
+ /**
+ * Route for:
+ * - POST `/users/@me/channels`
+ */
+ userChannels(): "/users/@me/channels";
+ /**
+ * Route for:
+ * - GET `/users/@me/connections`
+ */
+ userConnections(): "/users/@me/connections";
+ /**
+ * Route for:
+ * - GET `/voice/regions`
+ */
+ voiceRegions(): "/voice/regions";
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/webhooks`
+ * - POST `/channels/{channel.id}/webhooks`
+ */
+ channelWebhooks(channelId: Snowflake): `/channels/${string}/webhooks`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/webhooks`
+ */
+ guildWebhooks(guildId: Snowflake): `/guilds/${string}/webhooks`;
+ /**
+ * Route for:
+ * - GET `/webhooks/{webhook.id}`
+ * - GET `/webhooks/{webhook.id}/{webhook.token}`
+ * - PATCH `/webhooks/{webhook.id}`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}`
+ * - DELETE `/webhooks/{webhook.id}`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}`
+ * - POST `/webhooks/{webhook.id}/{webhook.token}`
+ *
+ * - POST `/webhooks/{application.id}/{interaction.token}`
+ */
+ webhook(webhookId: Snowflake, webhookToken?: string): `/webhooks/${string}` | `/webhooks/${string}/${string}`;
+ /**
+ * Route for:
+ * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ *
+ * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/@original`
+ * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/{message.id}`
+ * - DELETE `/webhooks/{application.id}/{interaction.token}/messages/{message.id}`
+ */
+ webhookMessage(webhookId: Snowflake, webhookToken: string, messageId?: Snowflake | '@original'): `/webhooks/${string}/${string}/messages/${string}`;
+ /**
+ * Route for:
+ * - POST `/webhooks/{webhook.id}/{webhook.token}/github`
+ * - POST `/webhooks/{webhook.id}/{webhook.token}/slack`
+ */
+ webhookPlatform(webhookId: Snowflake, webhookToken: string, platform: 'github' | 'slack'): `/webhooks/${string}/${string}/github` | `/webhooks/${string}/${string}/slack`;
+ /**
+ * Route for:
+ * - GET `/gateway`
+ */
+ gateway(): "/gateway";
+ /**
+ * Route for:
+ * - GET `/gateway/bot`
+ */
+ gatewayBot(): "/gateway/bot";
+ /**
+ * Route for:
+ * - GET `/oauth2/applications/@me`
+ */
+ oauth2CurrentApplication(): "/oauth2/applications/@me";
+ /**
+ * Route for:
+ * - GET `/oauth2/@me`
+ */
+ oauth2CurrentAuthorization(): "/oauth2/@me";
+ /**
+ * Route for:
+ * - GET `/oauth2/authorize`
+ */
+ oauth2Authorization(): "/oauth2/authorize";
+ /**
+ * Route for:
+ * - POST `/oauth2/token`
+ */
+ oauth2TokenExchange(): "/oauth2/token";
+ /**
+ * Route for:
+ * - POST `/oauth2/token/revoke`
+ */
+ oauth2TokenRevocation(): "/oauth2/token/revoke";
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/commands`
+ * - PUT `/applications/{application.id}/commands`
+ * - POST `/applications/{application.id}/commands`
+ */
+ applicationCommands(applicationId: Snowflake): `/applications/${string}/commands`;
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/commands/{command.id}`
+ * - PATCH `/applications/{application.id}/commands/{command.id}`
+ * - DELETE `/applications/{application.id}/commands/{command.id}`
+ */
+ applicationCommand(applicationId: Snowflake, commandId: Snowflake): `/applications/${string}/commands/${string}`;
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands`
+ * - POST `/applications/{application.id}/guilds/{guild.id}/commands`
+ */
+ applicationGuildCommands(applicationId: Snowflake, guildId: Snowflake): `/applications/${string}/guilds/${string}/commands`;
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ * - PATCH `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ * - DELETE `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ */
+ applicationGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake): `/applications/${string}/guilds/${string}/commands/${string}`;
+ /**
+ * Route for:
+ * - POST `/interactions/{interaction.id}/{interaction.token}/callback`
+ */
+ interactionCallback(interactionId: Snowflake, interactionToken: string): `/interactions/${string}/${string}/callback`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/member-verification`
+ * - PATCH `/guilds/{guild.id}/member-verification`
+ */
+ guildMemberVerification(guildId: Snowflake): `/guilds/${string}/member-verification`;
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/voice-states/@me`
+ * - PATCH `/guilds/{guild.id}/voice-states/{user.id}`
+ */
+ guildVoiceState(guildId: Snowflake, userId?: Snowflake | '@me'): `/guilds/${string}/voice-states/${string}`;
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/permissions`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/permissions`
+ */
+ guildApplicationCommandsPermissions(applicationId: Snowflake, guildId: Snowflake): `/applications/${string}/guilds/${string}/commands/permissions`;
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions`
+ */
+ applicationCommandPermissions(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake): `/applications/${string}/guilds/${string}/commands/${string}/permissions`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/welcome-screen`
+ * - PATCH `/guilds/{guild.id}/welcome-screen`
+ */
+ guildWelcomeScreen(guildId: Snowflake): `/guilds/${string}/welcome-screen`;
+ /**
+ * Route for:
+ * - POST `/stage-instances`
+ */
+ stageInstances(): "/stage-instances";
+ /**
+ * Route for:
+ * - GET `/stage-instances/{channel.id}`
+ * - PATCH `/stage-instances/{channel.id}`
+ * - DELETE `/stage-instances/{channel.id}`
+ */
+ stageInstance(channelId: Snowflake): `/stage-instances/${string}`;
+ /**
+ * Route for:
+ * - GET `/stickers/{sticker.id}`
+ */
+ sticker(stickerId: Snowflake): `/stickers/${string}`;
+ /**
+ * Route for:
+ * - GET `/sticker-packs`
+ */
+ nitroStickerPacks(): "/sticker-packs";
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/stickers`
+ * - POST `/guilds/{guild.id}/stickers`
+ */
+ guildStickers(guildId: Snowflake): `/guilds/${string}/stickers`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/stickers/{sticker.id}`
+ * - PATCH `/guilds/{guild.id}/stickers/{sticker.id}`
+ * - DELETE `/guilds/{guild.id}/stickers/{sticker.id}`
+ */
+ guildSticker(guildId: Snowflake, stickerId: Snowflake): `/guilds/${string}/stickers/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events`
+ * - POST `/guilds/{guild.id}/scheduled-events`
+ */
+ guildScheduledEvents(guildId: Snowflake): `/guilds/${string}/scheduled-events`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ * - PATCH `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ * - DELETE `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ */
+ guildScheduledEvent(guildId: Snowflake, guildScheduledEventId: Snowflake): `/guilds/${string}/scheduled-events/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}/users`
+ */
+ guildScheduledEventUsers(guildId: Snowflake, guildScheduledEventId: Snowflake): `/guilds/${string}/scheduled-events/${string}/users`;
+ /**
+ * Route for:
+ * - GET `/guilds/${guild.id}/onboarding`
+ * - PUT `/guilds/${guild.id}/onboarding`
+ */
+ guildOnboarding(guildId: Snowflake): `/guilds/${string}/onboarding`;
+ /**
+ * Route for:
+ * - GET `/applications/@me`
+ */
+ currentApplication(): "/applications/@me";
+};
+export declare const StickerPackApplicationId = "710982414301790216";
+export declare const CDNRoutes: {
+ /**
+ * Route for:
+ * - GET `/emojis/{emoji.id}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ emoji(emojiId: Snowflake, format: EmojiFormat): `/emojis/${string}.jpeg` | `/emojis/${string}.png` | `/emojis/${string}.webp` | `/emojis/${string}.gif`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/icons/{guild.id}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ guildIcon(guildId: Snowflake, guildIcon: string, format: GuildIconFormat): `icons/${string}/${string}.jpeg` | `icons/${string}/${string}.png` | `icons/${string}/${string}.webp` | `icons/${string}/${string}.gif`;
+ /**
+ * Route for:
+ * - GET `/splashes/{guild.id}/{guild.splash}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ guildSplash(guildId: Snowflake, guildSplash: string, format: GuildSplashFormat): `/splashes/${string}/${string}.jpeg` | `/splashes/${string}/${string}.png` | `/splashes/${string}/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/discovery-splashes/{guild.id}/{guild.discovery_splash}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ guildDiscoverySplash(guildId: Snowflake, guildDiscoverySplash: string, format: GuildDiscoverySplashFormat): `/discovery-splashes/${string}/${string}.jpeg` | `/discovery-splashes/${string}/${string}.png` | `/discovery-splashes/${string}/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/banners/{guild.id}/{guild.banner}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ guildBanner(guildId: Snowflake, guildBanner: string, format: GuildBannerFormat): `/banners/${string}/${string}.jpeg` | `/banners/${string}/${string}.png` | `/banners/${string}/${string}.webp` | `/banners/${string}/${string}.gif`;
+ /**
+ * Route for:
+ * - GET `/banners/{user.id}/{user.banner}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ userBanner(userId: Snowflake, userBanner: string, format: UserBannerFormat): `/banners/${string}/${string}.jpeg` | `/banners/${string}/${string}.png` | `/banners/${string}/${string}.webp` | `/banners/${string}/${string}.gif`;
+ /**
+ * Route for:
+ * - GET `/embed/avatars/{index}.png`
+ *
+ * The value for `index` parameter depends on whether the user is [migrated to the new username system](https://discord.com/developers/docs/change-log#unique-usernames-on-discord).
+ * For users on the new username system, `index` will be `(user.id >> 22) % 6`.
+ * For users on the legacy username system, `index` will be `user.discriminator % 5`.
+ *
+ * This route supports the extension: PNG
+ */
+ defaultUserAvatar(index: DefaultUserAvatarAssets): "/embed/avatars/0.png" | "/embed/avatars/2.png" | "/embed/avatars/1.png" | "/embed/avatars/3.png" | "/embed/avatars/4.png" | "/embed/avatars/5.png";
+ /**
+ * Route for:
+ * - GET `/avatars/{user.id}/{user.avatar}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ userAvatar(userId: Snowflake, userAvatar: string, format: UserAvatarFormat): `/avatars/${string}/${string}.jpeg` | `/avatars/${string}/${string}.png` | `/avatars/${string}/${string}.webp` | `/avatars/${string}/${string}.gif`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/users/{user.id}/{guild_member.avatar}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ guildMemberAvatar(guildId: Snowflake, userId: Snowflake, memberAvatar: string, format: GuildMemberAvatarFormat): `/guilds/${string}/users/${string}/avatars/${string}.jpeg` | `/guilds/${string}/users/${string}/avatars/${string}.png` | `/guilds/${string}/users/${string}/avatars/${string}.webp` | `/guilds/${string}/users/${string}/avatars/${string}.gif`;
+ /**
+ * Route for:
+ * - GET `/avatar-decorations/{user.id}/{user.avatar_decoration}.png`
+ *
+ * This route supports the extension: PNG
+ */
+ userAvatarDecoration(userId: Snowflake, userAvatarDecoration: string): `/avatar-decorations/${string}/${string}.png`;
+ /**
+ * Route for:
+ * - GET `/app-icons/{application.id}/{application.icon}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ applicationIcon(applicationId: Snowflake, applicationIcon: string, format: ApplicationIconFormat): `/app-icons/${string}/${string}.jpeg` | `/app-icons/${string}/${string}.png` | `/app-icons/${string}/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/app-icons/{application.id}/{application.cover_image}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ applicationCover(applicationId: Snowflake, applicationCoverImage: string, format: ApplicationCoverFormat): `/app-icons/${string}/${string}.jpeg` | `/app-icons/${string}/${string}.png` | `/app-icons/${string}/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/app-assets/{application.id}/{application.asset_id}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ applicationAsset(applicationId: Snowflake, applicationAssetId: string, format: ApplicationAssetFormat): `/app-assets/${string}/${string}.jpeg` | `/app-assets/${string}/${string}.png` | `/app-assets/${string}/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/app-assets/{application.id}/achievements/{achievement.id}/icons/{achievement.icon}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ achievementIcon(applicationId: Snowflake, achievementId: Snowflake, achievementIconHash: string, format: AchievementIconFormat): `/app-assets/${string}/achievements/${string}/icons/${string}.jpeg` | `/app-assets/${string}/achievements/${string}/icons/${string}.png` | `/app-assets/${string}/achievements/${string}/icons/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/app-assets/710982414301790216/store/{sticker_pack.banner.asset_id}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ stickerPackBanner(stickerPackBannerAssetId: Snowflake, format: StickerPackBannerFormat): `/app-assets/710982414301790216/store/${string}.jpeg` | `/app-assets/710982414301790216/store/${string}.png` | `/app-assets/710982414301790216/store/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/app-assets/${application.id}/store/${asset.id}.{png|jpeg|webp}}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ storePageAsset(applicationId: Snowflake, assetId: string): `/app-assets/${string}/store/${string}.png`;
+ /**
+ * Route for:
+ * - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ teamIcon(teamId: Snowflake, teamIcon: string, format: TeamIconFormat): `/team-icons/${string}/${string}.jpeg` | `/team-icons/${string}/${string}.png` | `/team-icons/${string}/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/stickers/{sticker.id}.{png|json}`
+ *
+ * This route supports the extensions: PNG, Lottie, GIF
+ */
+ sticker(stickerId: Snowflake, format: StickerFormat): `/stickers/${string}.png` | `/stickers/${string}.gif` | `/stickers/${string}.json`;
+ /**
+ * Route for:
+ * - GET `/role-icons/{role.id}/{role.icon}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ roleIcon(roleId: Snowflake, roleIcon: string, format: RoleIconFormat): `/role-icons/${string}/${string}.jpeg` | `/role-icons/${string}/${string}.png` | `/role-icons/${string}/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/guild-events/{guild_scheduled_event.id}/{guild_scheduled_event.image}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ guildScheduledEventCover(guildScheduledEventId: Snowflake, guildScheduledEventCoverImage: string, format: GuildScheduledEventCoverFormat): `/guild-events/${string}/${string}.jpeg` | `/guild-events/${string}/${string}.png` | `/guild-events/${string}/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/guilds/${guild.id}/users/${user.id}/banners/${guild_member.banner}.{png|jpeg|webp|gif}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ guildMemberBanner(guildId: Snowflake, userId: Snowflake, guildMemberBanner: string, format: GuildMemberBannerFormat): `/guilds/${string}/users/${string}/banners/${string}.jpeg` | `/guilds/${string}/users/${string}/banners/${string}.png` | `/guilds/${string}/users/${string}/banners/${string}.webp` | `/guilds/${string}/users/${string}/banners/${string}.gif`;
+};
+export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5;
+export type EmojiFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
+export type GuildIconFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
+export type GuildSplashFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type GuildDiscoverySplashFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type GuildBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
+export type UserBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
+export type DefaultUserAvatar = Extract<ImageFormat, ImageFormat.PNG>;
+export type UserAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
+export type GuildMemberAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
+export type ApplicationIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type ApplicationCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie | ImageFormat.GIF>;
+export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
+export declare enum ImageFormat {
+ JPEG = "jpeg",
+ PNG = "png",
+ WebP = "webp",
+ GIF = "gif",
+ Lottie = "json"
+}
+export interface CDNQuery {
+ /**
+ * The returned image can have the size changed by using this query parameter
+ *
+ * Image size can be any power of two between 16 and 4096
+ */
+ size?: number;
+}
+export declare const RouteBases: {
+ readonly api: "https://discord.com/api/v10";
+ readonly cdn: "https://cdn.discordapp.com";
+ readonly invite: "https://discord.gg";
+ readonly template: "https://discord.new";
+ readonly gift: "https://discord.gift";
+ readonly scheduledEvent: "https://discord.com/events";
+};
+export declare const OAuth2Routes: {
+ readonly authorizationURL: "https://discord.com/api/v10/oauth2/authorize";
+ readonly tokenURL: "https://discord.com/api/v10/oauth2/token";
+ /**
+ * See https://tools.ietf.org/html/rfc7009
+ */
+ readonly tokenRevocationURL: "https://discord.com/api/v10/oauth2/token/revoke";
+};
+//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/index.d.ts.map b/node_modules/discord-api-types/rest/v10/index.d.ts.map
new file mode 100644
index 0000000..eab6a6e
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CA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EAAE,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AAC/F,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AACjG,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AACxF,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,GAAG,GAAG,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AACzG,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AACxF,MAAM,MAAM,8BAA8B,GAAG,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AACxG,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;AAE/E,oBAAY,WAAW;IACtB,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,MAAM,SAAS;CACf;AAED,MAAM,WAAW,QAAQ;IACxB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,UAAU;;;;;;;CAOb,CAAC;AAKX,eAAO,MAAM,YAAY;;;IAGxB;;OAEG;;CAEM,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/index.js b/node_modules/discord-api-types/rest/v10/index.js
new file mode 100644
index 0000000..5528d27
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/index.js
@@ -0,0 +1,1050 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OAuth2Routes = exports.RouteBases = exports.ImageFormat = exports.CDNRoutes = exports.StickerPackApplicationId = exports.Routes = exports.APIVersion = void 0;
+__exportStar(require("../common"), exports);
+__exportStar(require("./application"), exports);
+__exportStar(require("./auditLog"), exports);
+__exportStar(require("./autoModeration"), exports);
+__exportStar(require("./channel"), exports);
+__exportStar(require("./emoji"), exports);
+__exportStar(require("./gateway"), exports);
+__exportStar(require("./guild"), exports);
+__exportStar(require("./guildScheduledEvent"), exports);
+__exportStar(require("./interactions"), exports);
+__exportStar(require("./invite"), exports);
+__exportStar(require("./oauth2"), exports);
+__exportStar(require("./stageInstance"), exports);
+__exportStar(require("./sticker"), exports);
+__exportStar(require("./template"), exports);
+__exportStar(require("./user"), exports);
+__exportStar(require("./voice"), exports);
+__exportStar(require("./webhook"), exports);
+exports.APIVersion = '10';
+exports.Routes = {
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/role-connections/metadata`
+ * - PUT `/applications/{application.id}/role-connections/metadata`
+ */
+ applicationRoleConnectionMetadata(applicationId) {
+ return `/applications/${applicationId}/role-connections/metadata`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/auto-moderation/rules`
+ * - POST `/guilds/{guild.id}/auto-moderation/rules`
+ */
+ guildAutoModerationRules(guildId) {
+ return `/guilds/${guildId}/auto-moderation/rules`;
+ },
+ /**
+ * Routes for:
+ * - GET `/guilds/{guild.id}/auto-moderation/rules/{rule.id}`
+ * - PATCH `/guilds/{guild.id}/auto-moderation/rules/{rule.id}`
+ * - DELETE `/guilds/{guild.id}/auto-moderation/rules/{rule.id}`
+ */
+ guildAutoModerationRule(guildId, ruleId) {
+ return `/guilds/${guildId}/auto-moderation/rules/${ruleId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/audit-logs`
+ */
+ guildAuditLog(guildId) {
+ return `/guilds/${guildId}/audit-logs`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}`
+ * - PATCH `/channels/{channel.id}`
+ * - DELETE `/channels/{channel.id}`
+ */
+ channel(channelId) {
+ return `/channels/${channelId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages`
+ * - POST `/channels/{channel.id}/messages`
+ */
+ channelMessages(channelId) {
+ return `/channels/${channelId}/messages`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages/{message.id}`
+ * - PATCH `/channels/{channel.id}/messages/{message.id}`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}`
+ */
+ channelMessage(channelId, messageId) {
+ return `/channels/${channelId}/messages/${messageId}`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/messages/{message.id}/crosspost`
+ */
+ channelMessageCrosspost(channelId, messageId) {
+ return `/channels/${channelId}/messages/${messageId}/crosspost`;
+ },
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageOwnReaction(channelId, messageId, emoji) {
+ return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}/@me`;
+ },
+ /**
+ * Route for:
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/{user.id}`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageUserReaction(channelId, messageId, emoji, userId) {
+ return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageReaction(channelId, messageId, emoji) {
+ return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}`;
+ },
+ /**
+ * Route for:
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions`
+ */
+ channelMessageAllReactions(channelId, messageId) {
+ return `/channels/${channelId}/messages/${messageId}/reactions`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/messages/bulk-delete`
+ */
+ channelBulkDelete(channelId) {
+ return `/channels/${channelId}/messages/bulk-delete`;
+ },
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/permissions/{overwrite.id}`
+ * - DELETE `/channels/{channel.id}/permissions/{overwrite.id}`
+ */
+ channelPermission(channelId, overwriteId) {
+ return `/channels/${channelId}/permissions/${overwriteId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/invites`
+ * - POST `/channels/{channel.id}/invites`
+ */
+ channelInvites(channelId) {
+ return `/channels/${channelId}/invites`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/followers`
+ */
+ channelFollowers(channelId) {
+ return `/channels/${channelId}/followers`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/typing`
+ */
+ channelTyping(channelId) {
+ return `/channels/${channelId}/typing`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/pins`
+ */
+ channelPins(channelId) {
+ return `/channels/${channelId}/pins`;
+ },
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/pins/{message.id}`
+ * - DELETE `/channels/{channel.id}/pins/{message.id}`
+ */
+ channelPin(channelId, messageId) {
+ return `/channels/${channelId}/pins/${messageId}`;
+ },
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/recipients/{user.id}`
+ * - DELETE `/channels/{channel.id}/recipients/{user.id}`
+ */
+ channelRecipient(channelId, userId) {
+ return `/channels/${channelId}/recipients/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/emojis`
+ * - POST `/guilds/{guild.id}/emojis`
+ */
+ guildEmojis(guildId) {
+ return `/guilds/${guildId}/emojis`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/emojis/{emoji.id}`
+ * - PATCH `/guilds/{guild.id}/emojis/{emoji.id}`
+ * - DELETE `/guilds/{guild.id}/emojis/{emoji.id}`
+ */
+ guildEmoji(guildId, emojiId) {
+ return `/guilds/${guildId}/emojis/${emojiId}`;
+ },
+ /**
+ * Route for:
+ * - POST `/guilds`
+ */
+ guilds() {
+ return '/guilds';
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}`
+ * - PATCH `/guilds/{guild.id}`
+ * - DELETE `/guilds/{guild.id}`
+ */
+ guild(guildId) {
+ return `/guilds/${guildId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/preview`
+ */
+ guildPreview(guildId) {
+ return `/guilds/${guildId}/preview`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/channels`
+ * - POST `/guilds/{guild.id}/channels`
+ * - PATCH `/guilds/{guild.id}/channels`
+ */
+ guildChannels(guildId) {
+ return `/guilds/${guildId}/channels`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members/{user.id}`
+ * - PUT `/guilds/{guild.id}/members/{user.id}`
+ * - PATCH `/guilds/{guild.id}/members/@me`
+ * - PATCH `/guilds/{guild.id}/members/{user.id}`
+ * - DELETE `/guilds/{guild.id}/members/{user.id}`
+ */
+ guildMember(guildId, userId = '@me') {
+ return `/guilds/${guildId}/members/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members`
+ */
+ guildMembers(guildId) {
+ return `/guilds/${guildId}/members`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members/search`
+ */
+ guildMembersSearch(guildId) {
+ return `/guilds/${guildId}/members/search`;
+ },
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/members/@me/nick`
+ *
+ * @deprecated Use {@link Routes.guildMember} instead.
+ */
+ guildCurrentMemberNickname(guildId) {
+ return `/guilds/${guildId}/members/@me/nick`;
+ },
+ /**
+ * Route for:
+ * - PUT `/guilds/{guild.id}/members/{user.id}/roles/{role.id}`
+ * - DELETE `/guilds/{guild.id}/members/{user.id}/roles/{role.id}`
+ */
+ guildMemberRole(guildId, memberId, roleId) {
+ return `/guilds/${guildId}/members/${memberId}/roles/${roleId}`;
+ },
+ /**
+ * Route for:
+ * - POST `/guilds/{guild.id}/mfa`
+ */
+ guildMFA(guildId) {
+ return `/guilds/${guildId}/mfa`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/bans`
+ */
+ guildBans(guildId) {
+ return `/guilds/${guildId}/bans`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/bans/{user.id}`
+ * - PUT `/guilds/{guild.id}/bans/{user.id}`
+ * - DELETE `/guilds/{guild.id}/bans/{user.id}`
+ */
+ guildBan(guildId, userId) {
+ return `/guilds/${guildId}/bans/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/roles`
+ * - POST `/guilds/{guild.id}/roles`
+ * - PATCH `/guilds/{guild.id}/roles`
+ */
+ guildRoles(guildId) {
+ return `/guilds/${guildId}/roles`;
+ },
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/roles/{role.id}`
+ * - DELETE `/guilds/{guild.id}/roles/{role.id}`
+ */
+ guildRole(guildId, roleId) {
+ return `/guilds/${guildId}/roles/${roleId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/prune`
+ * - POST `/guilds/{guild.id}/prune`
+ */
+ guildPrune(guildId) {
+ return `/guilds/${guildId}/prune`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/regions`
+ */
+ guildVoiceRegions(guildId) {
+ return `/guilds/${guildId}/regions`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/invites`
+ */
+ guildInvites(guildId) {
+ return `/guilds/${guildId}/invites`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/integrations`
+ */
+ guildIntegrations(guildId) {
+ return `/guilds/${guildId}/integrations`;
+ },
+ /**
+ * Route for:
+ * - DELETE `/guilds/{guild.id}/integrations/{integration.id}`
+ */
+ guildIntegration(guildId, integrationId) {
+ return `/guilds/${guildId}/integrations/${integrationId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget`
+ * - PATCH `/guilds/{guild.id}/widget`
+ */
+ guildWidgetSettings(guildId) {
+ return `/guilds/${guildId}/widget`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget.json`
+ */
+ guildWidgetJSON(guildId) {
+ return `/guilds/${guildId}/widget.json`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/vanity-url`
+ */
+ guildVanityUrl(guildId) {
+ return `/guilds/${guildId}/vanity-url`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget.png`
+ */
+ guildWidgetImage(guildId) {
+ return `/guilds/${guildId}/widget.png`;
+ },
+ /**
+ * Route for:
+ * - GET `/invites/{invite.code}`
+ * - DELETE `/invites/{invite.code}`
+ */
+ invite(code) {
+ return `/invites/${code}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/templates/{template.code}`
+ * - POST `/guilds/templates/{template.code}`
+ */
+ template(code) {
+ return `/guilds/templates/${code}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/templates`
+ * - POST `/guilds/{guild.id}/templates`
+ */
+ guildTemplates(guildId) {
+ return `/guilds/${guildId}/templates`;
+ },
+ /**
+ * Route for:
+ * - PUT `/guilds/{guild.id}/templates/{template.code}`
+ * - PATCH `/guilds/{guild.id}/templates/{template.code}`
+ * - DELETE `/guilds/{guild.id}/templates/{template.code}`
+ */
+ guildTemplate(guildId, code) {
+ return `/guilds/${guildId}/templates/${code}`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/threads`
+ * - POST `/channels/{channel.id}/messages/{message.id}/threads`
+ */
+ threads(parentId, messageId) {
+ const parts = ['', 'channels', parentId];
+ if (messageId)
+ parts.push('messages', messageId);
+ parts.push('threads');
+ return parts.join('/');
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/threads/active`
+ */
+ guildActiveThreads(guildId) {
+ return `/guilds/${guildId}/threads/active`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/threads/archived/public`
+ * - GET `/channels/{channel.id}/threads/archived/private`
+ */
+ channelThreads(channelId, archivedStatus) {
+ return `/channels/${channelId}/threads/archived/${archivedStatus}`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/users/@me/threads/archived/private`
+ */
+ channelJoinedArchivedThreads(channelId) {
+ return `/channels/${channelId}/users/@me/threads/archived/private`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{thread.id}/thread-members`
+ * - GET `/channels/{thread.id}/thread-members/{user.id}`
+ * - PUT `/channels/{thread.id}/thread-members/@me`
+ * - PUT `/channels/{thread.id}/thread-members/{user.id}`
+ * - DELETE `/channels/{thread.id}/thread-members/@me`
+ * - DELETE `/channels/{thread.id}/thread-members/{user.id}`
+ */
+ threadMembers(threadId, userId) {
+ const parts = ['', 'channels', threadId, 'thread-members'];
+ if (userId)
+ parts.push(userId);
+ return parts.join('/');
+ },
+ /**
+ * Route for:
+ * - GET `/users/@me`
+ * - GET `/users/{user.id}`
+ * - PATCH `/users/@me`
+ *
+ * @param [userId] The user ID, defaulted to `@me`
+ */
+ user(userId = '@me') {
+ return `/users/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/users/@me/applications/{application.id}/role-connection`
+ * - PUT `/users/@me/applications/{application.id}/role-connection`
+ */
+ userApplicationRoleConnection(applicationId) {
+ return `/users/@me/applications/${applicationId}/role-connection`;
+ },
+ /**
+ * Route for:
+ * - GET `/users/@me/guilds`
+ */
+ userGuilds() {
+ return `/users/@me/guilds`;
+ },
+ /**
+ * Route for:
+ * - GET `/users/@me/guilds/{guild.id}/member`
+ */
+ userGuildMember(guildId) {
+ return `/users/@me/guilds/${guildId}/member`;
+ },
+ /**
+ * Route for:
+ * - DELETE `/users/@me/guilds/{guild.id}`
+ */
+ userGuild(guildId) {
+ return `/users/@me/guilds/${guildId}`;
+ },
+ /**
+ * Route for:
+ * - POST `/users/@me/channels`
+ */
+ userChannels() {
+ return `/users/@me/channels`;
+ },
+ /**
+ * Route for:
+ * - GET `/users/@me/connections`
+ */
+ userConnections() {
+ return `/users/@me/connections`;
+ },
+ /**
+ * Route for:
+ * - GET `/voice/regions`
+ */
+ voiceRegions() {
+ return `/voice/regions`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/webhooks`
+ * - POST `/channels/{channel.id}/webhooks`
+ */
+ channelWebhooks(channelId) {
+ return `/channels/${channelId}/webhooks`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/webhooks`
+ */
+ guildWebhooks(guildId) {
+ return `/guilds/${guildId}/webhooks`;
+ },
+ /**
+ * Route for:
+ * - GET `/webhooks/{webhook.id}`
+ * - GET `/webhooks/{webhook.id}/{webhook.token}`
+ * - PATCH `/webhooks/{webhook.id}`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}`
+ * - DELETE `/webhooks/{webhook.id}`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}`
+ * - POST `/webhooks/{webhook.id}/{webhook.token}`
+ *
+ * - POST `/webhooks/{application.id}/{interaction.token}`
+ */
+ webhook(webhookId, webhookToken) {
+ const parts = ['', 'webhooks', webhookId];
+ if (webhookToken)
+ parts.push(webhookToken);
+ return parts.join('/');
+ },
+ /**
+ * Route for:
+ * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ *
+ * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/@original`
+ * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/{message.id}`
+ * - DELETE `/webhooks/{application.id}/{interaction.token}/messages/{message.id}`
+ */
+ webhookMessage(webhookId, webhookToken, messageId = '@original') {
+ return `/webhooks/${webhookId}/${webhookToken}/messages/${messageId}`;
+ },
+ /**
+ * Route for:
+ * - POST `/webhooks/{webhook.id}/{webhook.token}/github`
+ * - POST `/webhooks/{webhook.id}/{webhook.token}/slack`
+ */
+ webhookPlatform(webhookId, webhookToken, platform) {
+ return `/webhooks/${webhookId}/${webhookToken}/${platform}`;
+ },
+ /**
+ * Route for:
+ * - GET `/gateway`
+ */
+ gateway() {
+ return `/gateway`;
+ },
+ /**
+ * Route for:
+ * - GET `/gateway/bot`
+ */
+ gatewayBot() {
+ return `/gateway/bot`;
+ },
+ /**
+ * Route for:
+ * - GET `/oauth2/applications/@me`
+ */
+ oauth2CurrentApplication() {
+ return `/oauth2/applications/@me`;
+ },
+ /**
+ * Route for:
+ * - GET `/oauth2/@me`
+ */
+ oauth2CurrentAuthorization() {
+ return `/oauth2/@me`;
+ },
+ /**
+ * Route for:
+ * - GET `/oauth2/authorize`
+ */
+ oauth2Authorization() {
+ return `/oauth2/authorize`;
+ },
+ /**
+ * Route for:
+ * - POST `/oauth2/token`
+ */
+ oauth2TokenExchange() {
+ return `/oauth2/token`;
+ },
+ /**
+ * Route for:
+ * - POST `/oauth2/token/revoke`
+ */
+ oauth2TokenRevocation() {
+ return `/oauth2/token/revoke`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/commands`
+ * - PUT `/applications/{application.id}/commands`
+ * - POST `/applications/{application.id}/commands`
+ */
+ applicationCommands(applicationId) {
+ return `/applications/${applicationId}/commands`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/commands/{command.id}`
+ * - PATCH `/applications/{application.id}/commands/{command.id}`
+ * - DELETE `/applications/{application.id}/commands/{command.id}`
+ */
+ applicationCommand(applicationId, commandId) {
+ return `/applications/${applicationId}/commands/${commandId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands`
+ * - POST `/applications/{application.id}/guilds/{guild.id}/commands`
+ */
+ applicationGuildCommands(applicationId, guildId) {
+ return `/applications/${applicationId}/guilds/${guildId}/commands`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ * - PATCH `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ * - DELETE `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ */
+ applicationGuildCommand(applicationId, guildId, commandId) {
+ return `/applications/${applicationId}/guilds/${guildId}/commands/${commandId}`;
+ },
+ /**
+ * Route for:
+ * - POST `/interactions/{interaction.id}/{interaction.token}/callback`
+ */
+ interactionCallback(interactionId, interactionToken) {
+ return `/interactions/${interactionId}/${interactionToken}/callback`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/member-verification`
+ * - PATCH `/guilds/{guild.id}/member-verification`
+ */
+ guildMemberVerification(guildId) {
+ return `/guilds/${guildId}/member-verification`;
+ },
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/voice-states/@me`
+ * - PATCH `/guilds/{guild.id}/voice-states/{user.id}`
+ */
+ guildVoiceState(guildId, userId = '@me') {
+ return `/guilds/${guildId}/voice-states/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/permissions`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/permissions`
+ */
+ guildApplicationCommandsPermissions(applicationId, guildId) {
+ return `/applications/${applicationId}/guilds/${guildId}/commands/permissions`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions`
+ */
+ applicationCommandPermissions(applicationId, guildId, commandId) {
+ return `/applications/${applicationId}/guilds/${guildId}/commands/${commandId}/permissions`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/welcome-screen`
+ * - PATCH `/guilds/{guild.id}/welcome-screen`
+ */
+ guildWelcomeScreen(guildId) {
+ return `/guilds/${guildId}/welcome-screen`;
+ },
+ /**
+ * Route for:
+ * - POST `/stage-instances`
+ */
+ stageInstances() {
+ return `/stage-instances`;
+ },
+ /**
+ * Route for:
+ * - GET `/stage-instances/{channel.id}`
+ * - PATCH `/stage-instances/{channel.id}`
+ * - DELETE `/stage-instances/{channel.id}`
+ */
+ stageInstance(channelId) {
+ return `/stage-instances/${channelId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/stickers/{sticker.id}`
+ */
+ sticker(stickerId) {
+ return `/stickers/${stickerId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/sticker-packs`
+ */
+ nitroStickerPacks() {
+ return '/sticker-packs';
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/stickers`
+ * - POST `/guilds/{guild.id}/stickers`
+ */
+ guildStickers(guildId) {
+ return `/guilds/${guildId}/stickers`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/stickers/{sticker.id}`
+ * - PATCH `/guilds/{guild.id}/stickers/{sticker.id}`
+ * - DELETE `/guilds/{guild.id}/stickers/{sticker.id}`
+ */
+ guildSticker(guildId, stickerId) {
+ return `/guilds/${guildId}/stickers/${stickerId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events`
+ * - POST `/guilds/{guild.id}/scheduled-events`
+ */
+ guildScheduledEvents(guildId) {
+ return `/guilds/${guildId}/scheduled-events`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ * - PATCH `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ * - DELETE `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ */
+ guildScheduledEvent(guildId, guildScheduledEventId) {
+ return `/guilds/${guildId}/scheduled-events/${guildScheduledEventId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}/users`
+ */
+ guildScheduledEventUsers(guildId, guildScheduledEventId) {
+ return `/guilds/${guildId}/scheduled-events/${guildScheduledEventId}/users`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/${guild.id}/onboarding`
+ * - PUT `/guilds/${guild.id}/onboarding`
+ */
+ guildOnboarding(guildId) {
+ return `/guilds/${guildId}/onboarding`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/@me`
+ */
+ currentApplication() {
+ return '/applications/@me';
+ },
+};
+exports.StickerPackApplicationId = '710982414301790216';
+exports.CDNRoutes = {
+ /**
+ * Route for:
+ * - GET `/emojis/{emoji.id}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ emoji(emojiId, format) {
+ return `/emojis/${emojiId}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/icons/{guild.id}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ guildIcon(guildId, guildIcon, format) {
+ return `icons/${guildId}/${guildIcon}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/splashes/{guild.id}/{guild.splash}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ guildSplash(guildId, guildSplash, format) {
+ return `/splashes/${guildId}/${guildSplash}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/discovery-splashes/{guild.id}/{guild.discovery_splash}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ guildDiscoverySplash(guildId, guildDiscoverySplash, format) {
+ return `/discovery-splashes/${guildId}/${guildDiscoverySplash}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/banners/{guild.id}/{guild.banner}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ guildBanner(guildId, guildBanner, format) {
+ return `/banners/${guildId}/${guildBanner}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/banners/{user.id}/{user.banner}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ userBanner(userId, userBanner, format) {
+ return `/banners/${userId}/${userBanner}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/embed/avatars/{index}.png`
+ *
+ * The value for `index` parameter depends on whether the user is [migrated to the new username system](https://discord.com/developers/docs/change-log#unique-usernames-on-discord).
+ * For users on the new username system, `index` will be `(user.id >> 22) % 6`.
+ * For users on the legacy username system, `index` will be `user.discriminator % 5`.
+ *
+ * This route supports the extension: PNG
+ */
+ defaultUserAvatar(index) {
+ return `/embed/avatars/${index}.png`;
+ },
+ /**
+ * Route for:
+ * - GET `/avatars/{user.id}/{user.avatar}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ userAvatar(userId, userAvatar, format) {
+ return `/avatars/${userId}/${userAvatar}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/users/{user.id}/{guild_member.avatar}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ guildMemberAvatar(guildId, userId, memberAvatar, format) {
+ return `/guilds/${guildId}/users/${userId}/avatars/${memberAvatar}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/avatar-decorations/{user.id}/{user.avatar_decoration}.png`
+ *
+ * This route supports the extension: PNG
+ */
+ userAvatarDecoration(userId, userAvatarDecoration) {
+ return `/avatar-decorations/${userId}/${userAvatarDecoration}.png`;
+ },
+ /**
+ * Route for:
+ * - GET `/app-icons/{application.id}/{application.icon}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ applicationIcon(applicationId, applicationIcon, format) {
+ return `/app-icons/${applicationId}/${applicationIcon}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/app-icons/{application.id}/{application.cover_image}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ applicationCover(applicationId, applicationCoverImage, format) {
+ return `/app-icons/${applicationId}/${applicationCoverImage}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/app-assets/{application.id}/{application.asset_id}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ applicationAsset(applicationId, applicationAssetId, format) {
+ return `/app-assets/${applicationId}/${applicationAssetId}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/app-assets/{application.id}/achievements/{achievement.id}/icons/{achievement.icon}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ achievementIcon(applicationId, achievementId, achievementIconHash, format) {
+ return `/app-assets/${applicationId}/achievements/${achievementId}/icons/${achievementIconHash}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/app-assets/710982414301790216/store/{sticker_pack.banner.asset_id}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ stickerPackBanner(stickerPackBannerAssetId, format) {
+ return `/app-assets/${exports.StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/app-assets/${application.id}/store/${asset.id}.{png|jpeg|webp}}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ storePageAsset(applicationId, assetId) {
+ return `/app-assets/${applicationId}/store/${assetId}.png`;
+ },
+ /**
+ * Route for:
+ * - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ teamIcon(teamId, teamIcon, format) {
+ return `/team-icons/${teamId}/${teamIcon}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/stickers/{sticker.id}.{png|json}`
+ *
+ * This route supports the extensions: PNG, Lottie, GIF
+ */
+ sticker(stickerId, format) {
+ return `/stickers/${stickerId}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/role-icons/{role.id}/{role.icon}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ roleIcon(roleId, roleIcon, format) {
+ return `/role-icons/${roleId}/${roleIcon}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guild-events/{guild_scheduled_event.id}/{guild_scheduled_event.image}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ guildScheduledEventCover(guildScheduledEventId, guildScheduledEventCoverImage, format) {
+ return `/guild-events/${guildScheduledEventId}/${guildScheduledEventCoverImage}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/${guild.id}/users/${user.id}/banners/${guild_member.banner}.{png|jpeg|webp|gif}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ guildMemberBanner(guildId, userId, guildMemberBanner, format) {
+ return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}`;
+ },
+};
+var ImageFormat;
+(function (ImageFormat) {
+ ImageFormat["JPEG"] = "jpeg";
+ ImageFormat["PNG"] = "png";
+ ImageFormat["WebP"] = "webp";
+ ImageFormat["GIF"] = "gif";
+ ImageFormat["Lottie"] = "json";
+})(ImageFormat = exports.ImageFormat || (exports.ImageFormat = {}));
+exports.RouteBases = {
+ api: `https://discord.com/api/v${exports.APIVersion}`,
+ cdn: 'https://cdn.discordapp.com',
+ invite: 'https://discord.gg',
+ template: 'https://discord.new',
+ gift: 'https://discord.gift',
+ scheduledEvent: 'https://discord.com/events',
+};
+// Freeze bases object
+Object.freeze(exports.RouteBases);
+exports.OAuth2Routes = {
+ authorizationURL: `${exports.RouteBases.api}${exports.Routes.oauth2Authorization()}`,
+ tokenURL: `${exports.RouteBases.api}${exports.Routes.oauth2TokenExchange()}`,
+ /**
+ * See https://tools.ietf.org/html/rfc7009
+ */
+ tokenRevocationURL: `${exports.RouteBases.api}${exports.Routes.oauth2TokenRevocation()}`,
+};
+// Freeze OAuth2 route object
+Object.freeze(exports.OAuth2Routes);
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/index.js.map b/node_modules/discord-api-types/rest/v10/index.js.map
new file mode 100644
index 0000000..3b440fd
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,4CAA0B;AAC1B,gDAA8B;AAC9B,6CAA2B;AAC3B,mDAAiC;AACjC,4CAA0B;AAC1B,0CAAwB;AACxB,4CAA0B;AAC1B,0CAAwB;AACxB,wDAAsC;AACtC,iDAA+B;AAC/B,2CAAyB;AACzB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AQ,EAAE,GAAG,kBAAU,CAAC,GAAG,GAAG,cAAM,CAAC,mBAAmB,EAAE,EAAE;IAC5D;;OAEG;IACH,kBAAkB,EAAE,GAAG,kBAAU,CAAC,GAAG,GAAG,cAAM,CAAC,qBAAqB,EAAE,EAAE;CAC/D,CAAC;AAEX,6BAA6B;AAC7B,MAAM,CAAC,MAAM,CAAC,oBAAY,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/index.mjs b/node_modules/discord-api-types/rest/v10/index.mjs
new file mode 100644
index 0000000..3f5bba7
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/index.mjs
@@ -0,0 +1,12 @@
+import mod from "./index.js";
+
+export default mod;
+export const APIVersion = mod.APIVersion;
+export const CDNRoutes = mod.CDNRoutes;
+export const ImageFormat = mod.ImageFormat;
+export const Locale = mod.Locale;
+export const OAuth2Routes = mod.OAuth2Routes;
+export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes;
+export const RouteBases = mod.RouteBases;
+export const Routes = mod.Routes;
+export const StickerPackApplicationId = mod.StickerPackApplicationId;
diff --git a/node_modules/discord-api-types/rest/v10/interactions.d.ts b/node_modules/discord-api-types/rest/v10/interactions.d.ts
new file mode 100644
index 0000000..79527db
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/interactions.d.ts
@@ -0,0 +1,195 @@
+import type { APIApplicationCommand, APIApplicationCommandPermission, APIGuildApplicationCommandPermissions, APIInteractionResponse, APIInteractionResponseCallbackData, ApplicationCommandType } from '../../payloads/v10/index';
+import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';
+import type { RESTDeleteAPIWebhookWithTokenMessageResult, RESTGetAPIWebhookWithTokenMessageResult, RESTPatchAPIWebhookWithTokenMessageFormDataBody, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageResult, RESTPostAPIWebhookWithTokenWaitResult } from './webhook';
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands
+ */
+export interface RESTGetAPIApplicationCommandsQuery {
+ /**
+ * Whether to include full localization dictionaries (name_localizations and description_localizations)
+ * in the returned objects, instead of the name_localized and description_localized fields.
+ *
+ * @default false
+ */
+ with_localizations?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands
+ */
+export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-global-application-command
+ */
+export type RESTGetAPIApplicationCommandResult = APIApplicationCommand;
+type RESTPostAPIBaseApplicationCommandsJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Omit<APIApplicationCommand, 'id' | 'application_id' | 'description' | 'type' | 'version' | 'guild_id' | 'name_localized' | 'description_localized' | 'default_member_permissions'> & Partial<Pick<APIApplicationCommand, 'default_member_permissions'>>>;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
+ */
+export interface RESTPostAPIChatInputApplicationCommandsJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody {
+ type?: ApplicationCommandType.ChatInput | undefined;
+ description: string;
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
+ */
+export interface RESTPostAPIContextMenuApplicationCommandsJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody {
+ type: ApplicationCommandType.User | ApplicationCommandType.Message;
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
+ */
+export type RESTPostAPIApplicationCommandsJSONBody = RESTPostAPIChatInputApplicationCommandsJSONBody | RESTPostAPIContextMenuApplicationCommandsJSONBody;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
+ */
+export type RESTPostAPIApplicationCommandsResult = APIApplicationCommand;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command
+ */
+export type RESTPatchAPIApplicationCommandJSONBody = StrictPartial<RESTPostAPIApplicationCommandsJSONBody>;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command
+ */
+export type RESTPatchAPIApplicationCommandResult = APIApplicationCommand;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands
+ */
+export type RESTPutAPIApplicationCommandsJSONBody = RESTPostAPIApplicationCommandsJSONBody[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands
+ */
+export type RESTPutAPIApplicationCommandsResult = APIApplicationCommand[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands
+ */
+export type RESTGetAPIApplicationGuildCommandsQuery = RESTGetAPIApplicationCommandsQuery;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands
+ */
+export type RESTGetAPIApplicationGuildCommandsResult = Omit<APIApplicationCommand, 'dm_permission'>[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands
+ */
+export type RESTGetAPIApplicationGuildCommandResult = Omit<APIApplicationCommand, 'dm_permission'>;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command
+ */
+export type RESTPostAPIApplicationGuildCommandsJSONBody = Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'> | Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'>;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command
+ */
+export type RESTPostAPIApplicationGuildCommandsResult = Omit<APIApplicationCommand, 'dm_permission'>;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command
+ */
+export type RESTPatchAPIApplicationGuildCommandJSONBody = StrictPartial<Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'> | Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'>>;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command
+ */
+export type RESTPatchAPIApplicationGuildCommandResult = Omit<APIApplicationCommand, 'dm_permission'>;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
+ */
+export type RESTPutAPIApplicationGuildCommandsJSONBody = ((Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'> & Pick<Partial<APIApplicationCommand>, 'id'>) | (Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'> & Pick<Partial<APIApplicationCommand>, 'id'>))[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
+ */
+export type RESTPutAPIApplicationGuildCommandsResult = Omit<APIApplicationCommand, 'dm_permission'>[];
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
+ */
+export type RESTPostAPIInteractionCallbackJSONBody = APIInteractionResponse;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
+ */
+export type RESTPostAPIInteractionCallbackFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPostAPIInteractionCallbackJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response
+ */
+export type RESTGetAPIInteractionOriginalResponseResult = RESTGetAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response
+ */
+export type RESTPatchAPIInteractionOriginalResponseJSONBody = RESTPatchAPIWebhookWithTokenMessageJSONBody;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response
+ */
+export type RESTPatchAPIInteractionOriginalResponseFormDataBody = RESTPatchAPIWebhookWithTokenMessageFormDataBody;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response
+ */
+export type RESTPatchAPIInteractionOriginalResponseResult = RESTPatchAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#delete-original-interaction-response
+ */
+export type RESTDeleteAPIInteractionOriginalResponseResult = RESTDeleteAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message
+ */
+export type RESTPostAPIInteractionFollowupJSONBody = APIInteractionResponseCallbackData;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message
+ */
+export type RESTPostAPIInteractionFollowupFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPostAPIInteractionFollowupJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message
+ */
+export type RESTPostAPIInteractionFollowupResult = RESTPostAPIWebhookWithTokenWaitResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message
+ */
+export type RESTGetAPIInteractionFollowupResult = RESTGetAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message
+ */
+export type RESTPatchAPIInteractionFollowupJSONBody = RESTPatchAPIWebhookWithTokenMessageJSONBody;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message
+ */
+export type RESTPatchAPIInteractionFollowupFormDataBody = RESTPatchAPIWebhookWithTokenMessageFormDataBody;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message
+ */
+export type RESTPatchAPIInteractionFollowupResult = RESTPatchAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#delete-followup-message
+ */
+export type RESTDeleteAPIInteractionFollowupResult = RESTDeleteAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions
+ */
+export type RESTGetAPIGuildApplicationCommandsPermissionsResult = APIGuildApplicationCommandPermissions[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions
+ */
+export type RESTGetAPIApplicationCommandPermissionsResult = APIGuildApplicationCommandPermissions;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions
+ */
+export interface RESTPutAPIApplicationCommandPermissionsJSONBody {
+ permissions: APIApplicationCommandPermission[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions
+ */
+export type RESTPutAPIApplicationCommandPermissionsResult = APIGuildApplicationCommandPermissions;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions
+ */
+export type RESTPutAPIGuildApplicationCommandsPermissionsJSONBody = Pick<APIGuildApplicationCommandPermissions, 'id' | 'permissions'>[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions
+ */
+export type RESTPutAPIGuildApplicationCommandsPermissionsResult = APIGuildApplicationCommandPermissions[];
+export {};
+//# sourceMappingURL=interactions.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/interactions.d.ts.map b/node_modules/discord-api-types/rest/v10/interactions.d.ts.map
new file mode 100644
index 0000000..2fc603e
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/interactions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,qBAAqB,EACrB,+BAA+B,EAC/B,qCAAqC,EACrC,sBAAsB,EACtB,kCAAkC,EAClC,sBAAsB,EACtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,oDAAoD,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACjH,OAAO,KAAK,EACX,0CAA0C,EAC1C,uCAAuC,EACvC,+CAA+C,EAC/C,2CAA2C,EAC3C,yCAAyC,EACzC,qCAAqC,EACrC,MAAM,WAAW,CAAC;AAEnB;;GAEG;AACH,MAAM,WAAW,kCAAkC;IAClD;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,C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C;CAC/C;AAED;;GAEG;AACH,MAAM,MAAM,6CAA6C,GAAG,qCAAqC,CAAC;AAElG;;GAEG;AACH,MAAM,MAAM,qDAAqD,GAAG,IAAI,CACvE,qCAAqC,EACrC,IAAI,GAAG,aAAa,CACpB,EAAE,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,mDAAmD,GAAG,qCAAqC,EAAE,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/interactions.js b/node_modules/discord-api-types/rest/v10/interactions.js
new file mode 100644
index 0000000..bcad473
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/interactions.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=interactions.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/interactions.js.map b/node_modules/discord-api-types/rest/v10/interactions.js.map
new file mode 100644
index 0000000..e322b3c
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/interactions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"interactions.js","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/invite.d.ts b/node_modules/discord-api-types/rest/v10/invite.d.ts
new file mode 100644
index 0000000..4e88399
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/invite.d.ts
@@ -0,0 +1,25 @@
+import type { Snowflake } from '../../globals';
+import type { APIInvite } from '../../payloads/v10/index';
+/**
+ * https://discord.com/developers/docs/resources/invite#get-invite
+ */
+export interface RESTGetAPIInviteQuery {
+ /**
+ * Whether the invite should contain approximate member counts
+ */
+ with_counts?: boolean;
+ /**
+ * Whether the invite should contain the expiration date
+ */
+ with_expiration?: boolean;
+ /**
+ * The guild scheduled event to include with the invite
+ */
+ guild_scheduled_event_id?: Snowflake;
+}
+export type RESTGetAPIInviteResult = APIInvite;
+/**
+ * https://discord.com/developers/docs/resources/invite#delete-invite
+ */
+export type RESTDeleteAPIInviteResult = APIInvite;
+//# sourceMappingURL=invite.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/invite.d.ts.map b/node_modules/discord-api-types/rest/v10/invite.d.ts.map
new file mode 100644
index 0000000..dae2cf7
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/invite.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,wBAAwB,CAAC,EAAE,SAAS,CAAC;CACrC;AAED,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/invite.js b/node_modules/discord-api-types/rest/v10/invite.js
new file mode 100644
index 0000000..2c05370
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/invite.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=invite.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/invite.js.map b/node_modules/discord-api-types/rest/v10/invite.js.map
new file mode 100644
index 0000000..8fa96d6
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/invite.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"invite.js","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/oauth2.d.ts b/node_modules/discord-api-types/rest/v10/oauth2.d.ts
new file mode 100644
index 0000000..5744d2e
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/oauth2.d.ts
@@ -0,0 +1,173 @@
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from '../../payloads/v10/index';
+/**
+ * https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information
+ */
+export type RESTGetAPIOAuth2CurrentApplicationResult = Omit<APIApplication, 'flags'>;
+/**
+ * https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information
+ */
+export interface RESTGetAPIOAuth2CurrentAuthorizationResult {
+ /**
+ * the current application
+ */
+ application: Partial<APIApplication>;
+ /**
+ * the scopes the user has authorized the application for
+ */
+ scopes: OAuth2Scopes[];
+ /**
+ * when the access token expires
+ */
+ expires: string;
+ /**
+ * the user who has authorized, if the user has authorized with the `identify` scope
+ */
+ user?: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant
+ */
+export interface RESTOAuth2AuthorizationQuery {
+ response_type: 'code';
+ client_id: Snowflake;
+ scope: string;
+ redirect_uri?: string;
+ state?: string;
+ prompt?: 'consent' | 'none';
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
+ */
+export interface RESTOAuth2AuthorizationQueryResult {
+ code: string;
+ state?: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
+ */
+export interface RESTPostOAuth2AccessTokenURLEncodedData {
+ client_id: Snowflake;
+ client_secret: string;
+ grant_type: 'authorization_code';
+ code: string;
+ redirect_uri?: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-access-token-response
+ */
+export interface RESTPostOAuth2AccessTokenResult {
+ access_token: string;
+ token_type: string;
+ expires_in: number;
+ refresh_token: string;
+ scope: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-refresh-token-exchange-example
+ */
+export interface RESTPostOAuth2RefreshTokenURLEncodedData {
+ client_id: Snowflake;
+ client_secret: string;
+ grant_type: 'refresh_token';
+ refresh_token: string;
+}
+export type RESTPostOAuth2RefreshTokenResult = RESTPostOAuth2AccessTokenResult;
+/**
+ * https://discord.com/developers/docs/topics/oauth2#implicit-grant
+ */
+export interface RESTOAuth2ImplicitAuthorizationQuery {
+ response_type: 'token';
+ client_id: Snowflake;
+ scope: string;
+ redirect_uri?: string;
+ state?: string;
+ prompt?: 'consent' | 'none';
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#implicit-grant-redirect-url-example
+ */
+export type RESTOAuth2ImplicitAuthorizationURLFragmentResult = Omit<RESTPostOAuth2AccessTokenResult, 'refresh_token'>;
+/**
+ * https://discord.com/developers/docs/topics/oauth2#client-credentials-grant
+ */
+export interface RESTPostOAuth2ClientCredentialsURLEncodedData {
+ grant_type: 'client_credentials';
+ scope: string;
+}
+export type RESTPostOAuth2ClientCredentialsResult = RESTOAuth2ImplicitAuthorizationURLFragmentResult;
+/**
+ * https://discord.com/developers/docs/topics/oauth2#bot-authorization-flow-bot-auth-parameters
+ */
+export interface RESTOAuth2BotAuthorizationQuery {
+ /**
+ * Your app's client id
+ */
+ client_id: Snowflake;
+ /**
+ * Needs to include bot for the bot flow
+ */
+ scope: OAuth2Scopes.Bot | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}` | `${OAuth2Scopes.Bot}${' ' | '%20'}${string}` | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}${string}${' ' | '%20'}`;
+ /**
+ * The permissions you're requesting
+ *
+ * See https://discord.com/developers/docs/topics/permissions
+ */
+ permissions?: Permissions;
+ /**
+ * Pre-fills the dropdown picker with a guild for the user
+ */
+ guild_id?: Snowflake;
+ /**
+ * `true` or `false`—disallows the user from changing the guild dropdown
+ */
+ disable_guild_select?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization
+ */
+export interface RESTOAuth2AdvancedBotAuthorizationQuery {
+ client_id: Snowflake;
+ /**
+ * This assumes you include the `bot` scope alongside others (like `identify` for example)
+ */
+ scope: OAuth2Scopes.Bot | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}` | `${OAuth2Scopes.Bot}${' ' | '%20'}${string}` | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}${string}${' ' | '%20'}`;
+ /**
+ * The required permissions bitfield, stringified
+ */
+ permissions?: Permissions;
+ guild_id?: Snowflake;
+ disable_guild_select?: boolean;
+ response_type: string;
+ redirect_uri?: string;
+}
+export interface RESTOAuth2AdvancedBotAuthorizationQueryResult {
+ code: string;
+ state?: string;
+ guild_id: Snowflake;
+ permissions: Permissions;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization-extended-bot-authorization-access-token-example
+ */
+export interface RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult {
+ access_token: string;
+ token_type: string;
+ expires_in: number;
+ refresh_token: string;
+ scope: string;
+ guild: APIGuild;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#webhooks-webhook-token-response-example
+ */
+export interface RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult {
+ access_token: string;
+ token_type: string;
+ expires_in: number;
+ refresh_token: string;
+ scope: string;
+ webhook: APIWebhook;
+}
+export type RESTPostOAuth2AccessTokenWithBotAndGuildsAndWebhookIncomingScopeResult = RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult & RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult;
+//# sourceMappingURL=oauth2.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/oauth2.d.ts.map b/node_modules/discord-api-types/rest/v10/oauth2.d.ts.map
new file mode 100644
index 0000000..a041313
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/oauth2.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SA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GAAG,6DAA6D,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/oauth2.js b/node_modules/discord-api-types/rest/v10/oauth2.js
new file mode 100644
index 0000000..6508265
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/oauth2.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=oauth2.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/oauth2.js.map b/node_modules/discord-api-types/rest/v10/oauth2.js.map
new file mode 100644
index 0000000..55386d8
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/oauth2.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"oauth2.js","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/stageInstance.d.ts b/node_modules/discord-api-types/rest/v10/stageInstance.d.ts
new file mode 100644
index 0000000..fa31379
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/stageInstance.d.ts
@@ -0,0 +1,55 @@
+import type { Snowflake } from '../../globals';
+import type { APIStageInstance, StageInstancePrivacyLevel } from '../../payloads/v10/index';
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#create-stage-instance
+ */
+export interface RESTPostAPIStageInstanceJSONBody {
+ /**
+ * The id of the stage channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The topic of the stage instance (1-120 characters)
+ */
+ topic: string;
+ /**
+ * The privacy level of the stage instance
+ *
+ * @default GuildOnly
+ */
+ privacy_level?: StageInstancePrivacyLevel | undefined;
+ /**
+ * Notify @everyone that a stage instance has started
+ */
+ send_start_notification?: boolean | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#create-stage-instance
+ */
+export type RESTPostAPIStageInstanceResult = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#get-stage-instance
+ */
+export type RESTGetAPIStageInstanceResult = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance
+ */
+export interface RESTPatchAPIStageInstanceJSONBody {
+ /**
+ * The topic of the stage instance (1-120 characters)
+ */
+ topic?: string | undefined;
+ /**
+ * The privacy level of the stage instance
+ */
+ privacy_level?: StageInstancePrivacyLevel | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance
+ */
+export type RESTPatchAPIStageInstanceResult = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#delete-stage-instance
+ */
+export type RESTDeleteAPIStageInstanceResult = never;
+//# sourceMappingURL=stageInstance.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/stageInstance.d.ts.map b/node_modules/discord-api-types/rest/v10/stageInstance.d.ts.map
new file mode 100644
index 0000000..8726207
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/stageInstance.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"stageInstance.d.ts","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAE5F;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;IACtD;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,aAAa,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,gBAAgB,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,KAAK,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/stageInstance.js b/node_modules/discord-api-types/rest/v10/stageInstance.js
new file mode 100644
index 0000000..9938b4c
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/stageInstance.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=stageInstance.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/stageInstance.js.map b/node_modules/discord-api-types/rest/v10/stageInstance.js.map
new file mode 100644
index 0000000..0d87730
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/stageInstance.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"stageInstance.js","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/sticker.d.ts b/node_modules/discord-api-types/rest/v10/sticker.d.ts
new file mode 100644
index 0000000..3988234
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/sticker.d.ts
@@ -0,0 +1,72 @@
+import type { APISticker, APIStickerPack } from '../../payloads/v10/index';
+/**
+ * https://discord.com/developers/docs/resources/sticker#get-sticker
+ */
+export type RESTGetAPIStickerResult = APISticker;
+/**
+ * https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs
+ */
+export interface RESTGetNitroStickerPacksResult {
+ sticker_packs: APIStickerPack[];
+}
+/**
+ * https://discord.com/developers/docs/resources/sticker#list-guild-stickers
+ */
+export type RESTGetAPIGuildStickersResult = APISticker[];
+/**
+ * https://discord.com/developers/docs/resources/sticker#get-guild-sticker
+ */
+export type RESTGetAPIGuildStickerResult = APISticker;
+/**
+ * https://discord.com/developers/docs/resources/sticker#create-guild-sticker
+ */
+export interface RESTPostAPIGuildStickerFormDataBody {
+ /**
+ * Name of the sticker (2-30 characters)
+ */
+ name: string;
+ /**
+ * Description of the sticker (empty or 2-100 characters)
+ */
+ description: string;
+ /**
+ * The Discord name of a unicode emoji representing the sticker's expression (2-200 characters)
+ */
+ tags: string;
+ /**
+ * The sticker file to upload, must be a PNG, APNG, GIF, or Lottie JSON file, max 512 KB
+ *
+ * Uploaded stickers are constrained to 5 seconds in length for animated stickers, and 320 x 320 pixels.
+ */
+ file: unknown;
+}
+/**
+ * https://discord.com/developers/docs/resources/sticker#create-guild-sticker
+ */
+export type RESTPostAPIGuildStickerResult = APISticker;
+/**
+ * https://discord.com/developers/docs/resources/sticker#modify-guild-sticker
+ */
+export interface RESTPatchAPIGuildStickerJSONBody {
+ /**
+ * Name of the sticker (2-30 characters)
+ */
+ name?: string | undefined;
+ /**
+ * Description of the sticker (2-100 characters)
+ */
+ description?: string | null | undefined;
+ /**
+ * The Discord name of a unicode emoji representing the sticker's expression (2-200 characters)
+ */
+ tags?: string | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/sticker#modify-guild-sticker
+ */
+export type RESTPatchAPIGuildStickerResult = APISticker;
+/**
+ * https://discord.com/developers/docs/resources/sticker#delete-guild-sticker
+ */
+export type RESTDeleteAPIGuildStickerResult = never;
+//# sourceMappingURL=sticker.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/sticker.d.ts.map b/node_modules/discord-api-types/rest/v10/sticker.d.ts.map
new file mode 100644
index 0000000..cf5842f
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/sticker.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"sticker.d.ts","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C,aAAa,EAAE,cAAc,EAAE,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,UAAU,EAAE,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,UAAU,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,mCAAmC;IACnD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;CACd;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,UAAU,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,UAAU,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,KAAK,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/sticker.js b/node_modules/discord-api-types/rest/v10/sticker.js
new file mode 100644
index 0000000..b6a3125
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/sticker.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=sticker.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/sticker.js.map b/node_modules/discord-api-types/rest/v10/sticker.js.map
new file mode 100644
index 0000000..5c1346f
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/sticker.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"sticker.js","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/template.d.ts b/node_modules/discord-api-types/rest/v10/template.d.ts
new file mode 100644
index 0000000..4b33a8d
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/template.d.ts
@@ -0,0 +1,63 @@
+import type { APIGuild, APITemplate } from '../../payloads/v10/index';
+import type { StrictPartial } from '../../utils/internals';
+/**
+ * https://discord.com/developers/docs/resources/guild-template#get-guild-template
+ */
+export type RESTGetAPITemplateResult = APITemplate;
+/**
+ * https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template
+ */
+export interface RESTPostAPITemplateCreateGuildJSONBody {
+ /**
+ * Name of the guild (2-100 characters)
+ */
+ name: string;
+ /**
+ * base64 1024x1024 png/jpeg image for the guild icon
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ icon?: string | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template
+ */
+export type RESTPostAPITemplateCreateGuildResult = APIGuild;
+/**
+ * https://discord.com/developers/docs/resources/guild-template#get-guild-templates
+ */
+export type RESTGetAPIGuildTemplatesResult = APITemplate[];
+/**
+ * https://discord.com/developers/docs/resources/guild-template#create-guild-template
+ */
+export interface RESTPostAPIGuildTemplatesJSONBody {
+ /**
+ * Name of the template (1-100 characters)
+ */
+ name: string;
+ /**
+ * Description for the template (0-120 characters)
+ */
+ description?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-template#create-guild-template
+ */
+export type RESTPostAPIGuildTemplatesResult = APITemplate;
+/**
+ * https://discord.com/developers/docs/resources/guild-template#sync-guild-template
+ */
+export type RESTPutAPIGuildTemplateSyncResult = APITemplate;
+/**
+ * https://discord.com/developers/docs/resources/guild-template#modify-guild-template
+ */
+export type RESTPatchAPIGuildTemplateJSONBody = StrictPartial<RESTPostAPIGuildTemplatesJSONBody>;
+/**
+ * https://discord.com/developers/docs/resources/guild-template#modify-guild-template
+ */
+export type RESTPatchAPIGuildTemplateResult = APITemplate;
+/**
+ * https://discord.com/developers/docs/resources/guild-template#delete-guild-template
+ */
+export type RESTDeleteAPIGuildTemplateResult = APITemplate;
+//# sourceMappingURL=template.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/template.d.ts.map b/node_modules/discord-api-types/rest/v10/template.d.ts.map
new file mode 100644
index 0000000..b9515b0
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/template.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,sCAAsC;IACtD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,QAAQ,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,WAAW,EAAE,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,WAAW,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,WAAW,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,aAAa,CAAC,iCAAiC,CAAC,CAAC;AAEjG;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,WAAW,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,WAAW,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/template.js b/node_modules/discord-api-types/rest/v10/template.js
new file mode 100644
index 0000000..ea29227
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/template.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=template.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/template.js.map b/node_modules/discord-api-types/rest/v10/template.js.map
new file mode 100644
index 0000000..8cacb36
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/template.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"template.js","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/user.d.ts b/node_modules/discord-api-types/rest/v10/user.d.ts
new file mode 100644
index 0000000..46d9120
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/user.d.ts
@@ -0,0 +1,117 @@
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIChannel, APIConnection, APIGuildMember, APIUser, APIApplicationRoleConnection, GuildFeature } from '../../payloads/v10/index';
+/**
+ * https://discord.com/developers/docs/resources/user#get-current-user
+ */
+export type RESTGetAPICurrentUserResult = APIUser;
+/**
+ * https://discord.com/developers/docs/resources/user#get-user
+ */
+export type RESTGetAPIUserResult = APIUser;
+/**
+ * https://discord.com/developers/docs/resources/user#get-current-user-guild-member
+ */
+export type RESTGetCurrentUserGuildMemberResult = APIGuildMember;
+/**
+ * https://discord.com/developers/docs/resources/user#modify-current-user
+ */
+export interface RESTPatchAPICurrentUserJSONBody {
+ /**
+ * User's username, if changed may cause the user's discriminator to be randomized
+ */
+ username?: string | undefined;
+ /**
+ * If passed, modifies the user's avatar
+ */
+ avatar?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/user#modify-current-user
+ */
+export type RESTPatchAPICurrentUserResult = APIUser;
+/**
+ * https://discord.com/developers/docs/resources/user#get-current-user-guilds
+ */
+export interface RESTGetAPICurrentUserGuildsQuery {
+ /**
+ * Get guilds before this guild ID
+ */
+ before?: Snowflake;
+ /**
+ * Get guilds after this guild ID
+ */
+ after?: Snowflake;
+ /**
+ * Max number of guilds to return (1-200)
+ *
+ * @default 200
+ */
+ limit?: number;
+ /**
+ * Include approximate member and presence counts in response
+ *
+ * @default false
+ */
+ with_counts?: boolean;
+}
+export interface RESTAPIPartialCurrentUserGuild {
+ id: Snowflake;
+ name: string;
+ icon: string | null;
+ owner: boolean;
+ features: GuildFeature[];
+ permissions: Permissions;
+ approximate_member_count?: number;
+ approximate_presence_count?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/user#get-current-user-guilds
+ */
+export type RESTGetAPICurrentUserGuildsResult = RESTAPIPartialCurrentUserGuild[];
+/**
+ * https://discord.com/developers/docs/resources/user#leave-guild
+ */
+export type RESTDeleteAPICurrentUserGuildResult = never;
+/**
+ * https://discord.com/developers/docs/resources/user#create-dm
+ */
+export interface RESTPostAPICurrentUserCreateDMChannelJSONBody {
+ /**
+ * The recipient to open a DM channel with
+ */
+ recipient_id: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/user#create-dm
+ */
+export type RESTPostAPICurrentUserCreateDMChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/user#get-user-connections
+ */
+export type RESTGetAPICurrentUserConnectionsResult = APIConnection[];
+/**
+ * https://discord.com/developers/docs/resources/user#get-user-application-role-connection
+ */
+export type RESTGetAPICurrentUserApplicationRoleConnectionResult = APIApplicationRoleConnection;
+/**
+ * https://discord.com/developers/docs/resources/user#update-user-application-role-connection
+ */
+export interface RESTPutAPICurrentUserApplicationRoleConnectionJSONBody {
+ /**
+ * The vanity name of the platform a bot has connected (max 50 characters)
+ */
+ platform_name?: string | undefined;
+ /**
+ * The username on the platform a bot has connected (max 100 characters)
+ */
+ platform_username?: string | undefined;
+ /**
+ * Object mapping application role connection metadata keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected
+ */
+ metadata?: Record<string, string | number> | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/user#update-user-application-role-connection
+ */
+export type RESTPutAPICurrentUserApplicationRoleConnectionResult = APIApplicationRoleConnection;
+//# sourceMappingURL=user.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/user.d.ts.map b/node_modules/discord-api-types/rest/v10/user.d.ts.map
new file mode 100644
index 0000000..c51ff23
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/user.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EACX,UAAU,EACV,aAAa,EACb,cAAc,EACd,OAAO,EACP,4BAA4B,EAC5B,YAAY,EACZ,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,cAAc,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,OAAO,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,8BAA8B;IAC9C,EAAE,EAAE,SAAS,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,WAAW,EAAE,WAAW,CAAC;IACzB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,8BAA8B,EAAE,CAAC;AAEjF;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,KAAK,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,6CAA6C;IAC7D;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,2CAA2C,GAAG,UAAU,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,aAAa,EAAE,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,oDAAoD,GAAG,4BAA4B,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,sDAAsD;IACtE;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,SAAS,CAAC;CACvD;AAED;;GAEG;AACH,MAAM,MAAM,oDAAoD,GAAG,4BAA4B,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/user.js b/node_modules/discord-api-types/rest/v10/user.js
new file mode 100644
index 0000000..33269d3
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/user.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=user.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/user.js.map b/node_modules/discord-api-types/rest/v10/user.js.map
new file mode 100644
index 0000000..ff1a289
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/user.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/voice.d.ts b/node_modules/discord-api-types/rest/v10/voice.d.ts
new file mode 100644
index 0000000..5d000f5
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/voice.d.ts
@@ -0,0 +1,10 @@
+import type { APIVoiceRegion } from '../../payloads/v10/index';
+/**
+ * https://discord.com/developers/docs/resources/voice#list-voice-regions
+ */
+export type RESTGetAPIVoiceRegionsResult = APIVoiceRegion[];
+/**
+ * @deprecated This was exported with the wrong name, use `RESTGetAPIVoiceRegionsResult` instead
+ */
+export type GetAPIVoiceRegionsResult = RESTGetAPIVoiceRegionsResult;
+//# sourceMappingURL=voice.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/voice.d.ts.map b/node_modules/discord-api-types/rest/v10/voice.d.ts.map
new file mode 100644
index 0000000..1e9706b
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/voice.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,cAAc,EAAE,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,4BAA4B,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/voice.js b/node_modules/discord-api-types/rest/v10/voice.js
new file mode 100644
index 0000000..53e2713
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/voice.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=voice.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/voice.js.map b/node_modules/discord-api-types/rest/v10/voice.js.map
new file mode 100644
index 0000000..561b9f7
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/voice.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"voice.js","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/webhook.d.ts b/node_modules/discord-api-types/rest/v10/webhook.d.ts
new file mode 100644
index 0000000..0261042
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/webhook.d.ts
@@ -0,0 +1,241 @@
+import type { Snowflake } from '../../globals';
+import type { APIAllowedMentions, APIActionRowComponent, APIEmbed, APIMessage, APIWebhook, APIAttachment, MessageFlags, APIMessageActionRowComponent } from '../../payloads/v10/index';
+import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals';
+/**
+ * https://discord.com/developers/docs/resources/webhook#create-webhook
+ */
+export interface RESTPostAPIChannelWebhookJSONBody {
+ /**
+ * Name of the webhook (1-80 characters)
+ */
+ name: string;
+ /**
+ * Image for the default webhook avatar
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ avatar?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/webhook#create-webhook
+ */
+export type RESTPostAPIChannelWebhookResult = APIWebhook;
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-channel-webhooks
+ */
+export type RESTGetAPIChannelWebhooksResult = APIWebhook[];
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-guild-webhooks
+ */
+export type RESTGetAPIGuildWebhooksResult = APIWebhook[];
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-webhook
+ */
+export type RESTGetAPIWebhookResult = APIWebhook;
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-webhook-with-token
+ */
+export type RESTGetAPIWebhookWithTokenResult = Omit<APIWebhook, 'user'>;
+/**
+ * https://discord.com/developers/docs/resources/webhook#modify-webhook
+ */
+export interface RESTPatchAPIWebhookJSONBody {
+ /**
+ * The default name of the webhook
+ */
+ name?: string | undefined;
+ /**
+ * Image for the default webhook avatar
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ avatar?: string | null | undefined;
+ /**
+ * The new channel id this webhook should be moved to
+ */
+ channel_id?: Snowflake | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/webhook#modify-webhook
+ */
+export type RESTPatchAPIWebhookResult = APIWebhook;
+/**
+ * https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token
+ */
+export type RESTPatchAPIWebhookWithTokenJSONBody = Omit<RESTPatchAPIWebhookJSONBody, 'channel_id'>;
+/**
+ * https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token
+ */
+export type RESTPatchAPIWebhookWithTokenResult = RESTGetAPIWebhookWithTokenResult;
+/**
+ * https://discord.com/developers/docs/resources/webhook#delete-webhook
+ */
+export type RESTDeleteAPIWebhookResult = never;
+/**
+ * https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token
+ */
+export type RESTDeleteAPIWebhookWithTokenResult = never;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-webhook
+ */
+export interface RESTPostAPIWebhookWithTokenJSONBody {
+ /**
+ * The message contents (up to 2000 characters)
+ */
+ content?: string | undefined;
+ /**
+ * Override the default username of the webhook
+ */
+ username?: string | undefined;
+ /**
+ * Override the default avatar of the webhook
+ */
+ avatar_url?: string | undefined;
+ /**
+ * `true` if this is a TTS message
+ */
+ tts?: boolean | undefined;
+ /**
+ * Embedded `rich` content
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object
+ */
+ embeds?: APIEmbed[] | undefined;
+ /**
+ * Allowed mentions for the message
+ *
+ * See https://discord.com/developers/docs/resources/channel#allowed-mentions-object
+ */
+ allowed_mentions?: APIAllowedMentions | undefined;
+ /**
+ * The components to include with the message
+ *
+ * Requires an application-owned webhook
+ *
+ * See https://discord.com/developers/docs/interactions/message-components#component-object
+ */
+ components?: APIActionRowComponent<APIMessageActionRowComponent>[] | undefined;
+ /**
+ * Attachment objects with filename and description
+ */
+ attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
+ /**
+ * Message flags combined as a bitfield
+ */
+ flags?: MessageFlags | undefined;
+ /**
+ * Name of thread to create
+ *
+ * Available only if the webhook is in a forum channel and a thread is not specified in {@link RESTPostAPIWebhookWithTokenQuery.thread_id} query parameter
+ */
+ thread_name?: string | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-webhook
+ */
+export type RESTPostAPIWebhookWithTokenFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPostAPIWebhookWithTokenJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-webhook-query-string-params
+ */
+export interface RESTPostAPIWebhookWithTokenQuery {
+ /**
+ * Waits for server confirmation of message send before response, and returns the created message body
+ * (defaults to `false`; when `false` a message that is not saved does not return an error)
+ *
+ * @default false
+ */
+ wait?: boolean;
+ /**
+ * Send a message to the specified thread within a webhook's channel. The thread will automatically be unarchived.
+ *
+ * Available only if the {@link RESTPostAPIWebhookWithTokenJSONBody.thread_name} JSON body property is not specified
+ */
+ thread_id?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-webhook
+ */
+export type RESTPostAPIWebhookWithTokenResult = never;
+/**
+ * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives
+ * the `wait` query parameter set to `true`
+ *
+ * See https://discord.com/developers/docs/resources/webhook#execute-webhook-query-string-params
+ */
+export type RESTPostAPIWebhookWithTokenWaitResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook-query-string-params
+ */
+export type RESTPostAPIWebhookWithTokenSlackQuery = RESTPostAPIWebhookWithTokenQuery;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook
+ */
+export type RESTPostAPIWebhookWithTokenSlackResult = never;
+/**
+ * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives
+ * the `wait` query parameter set to `true`
+ *
+ * See https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook-query-string-params
+ */
+export type RESTPostAPIWebhookWithTokenSlackWaitResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook-query-string-params
+ */
+export type RESTPostAPIWebhookWithTokenGitHubQuery = RESTPostAPIWebhookWithTokenQuery;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook
+ */
+export type RESTPostAPIWebhookWithTokenGitHubResult = never;
+/**
+ * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives
+ * the `wait` query parameter set to `true`
+ *
+ * See https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook-query-string-params
+ */
+export type RESTPostAPIWebhookWithTokenGitHubWaitResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-webhook-message
+ */
+export type RESTGetAPIWebhookWithTokenMessageResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-webhook-message-query-string-params
+ */
+export interface RESTGetAPIWebhookWithTokenMessageQuery {
+ thread_id?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/webhook#edit-webhook-message
+ */
+export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Nullable<Pick<RESTPostAPIWebhookWithTokenJSONBody, 'content' | 'embeds' | 'allowed_mentions' | 'components'>>> & {
+ /**
+ * Attached files to keep
+ *
+ * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
+ *
+ * See https://discord.com/developers/docs/resources/channel#attachment-object
+ */
+ attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
+};
+/**
+ * https://discord.com/developers/docs/resources/webhook#edit-webhook-message
+ */
+export type RESTPatchAPIWebhookWithTokenMessageFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPatchAPIWebhookWithTokenMessageJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/resources/webhook#edit-webhook-message
+ */
+export type RESTPatchAPIWebhookWithTokenMessageResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/webhook#delete-webhook-message
+ */
+export type RESTDeleteAPIWebhookWithTokenMessageResult = never;
+//# sourceMappingURL=webhook.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/webhook.d.ts.map b/node_modules/discord-api-types/rest/v10/webhook.d.ts.map
new file mode 100644
index 0000000..10440ba
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/webhook.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EACX,kBAAkB,EAClB,qBAAqB,EACrB,QAAQ,EACR,UAAU,EACV,UAAU,EACV,aAAa,EACb,YAAY,EACZ,4BAA4B,EAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,oDAAoD,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5G;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,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AEG;AACH,MAAM,MAAM,sCAAsC,GAAG,gCAAgC,CAAC;AAEtF;;GAEG;AACH,MAAM,MAAM,uCAAuC,GAAG,KAAK,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,MAAM,2CAA2C,GAAG,UAAU,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,uCAAuC,GAAG,UAAU,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,sCAAsC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,2CAA2C,GAAG,oDAAoD,CAC7G,QAAQ,CAAC,IAAI,CAAC,mCAAmC,EAAE,SAAS,GAAG,QAAQ,GAAG,kBAAkB,GAAG,YAAY,CAAC,CAAC,CAC7G,GAAG;IACH;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC,EAAE,GAAG,SAAS,CAAC;CACnH,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,+CAA+C,GACxD,CAAC;IACD;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC,GAAG,MAAM,CAAC,SAAS,MAAM,GAAG,EAAE,OAAO,CAAC,CAAC,GACxC,CAAC,2CAA2C,GAAG,MAAM,CAAC,SAAS,MAAM,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;AAEvF;;GAEG;AACH,MAAM,MAAM,yCAAyC,GAAG,UAAU,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,0CAA0C,GAAG,KAAK,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/webhook.js b/node_modules/discord-api-types/rest/v10/webhook.js
new file mode 100644
index 0000000..63886df
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/webhook.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=webhook.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v10/webhook.js.map b/node_modules/discord-api-types/rest/v10/webhook.js.map
new file mode 100644
index 0000000..f2cf863
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v10/webhook.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/auditLog.d.ts b/node_modules/discord-api-types/rest/v6/auditLog.d.ts
new file mode 100644
index 0000000..0823fed
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/auditLog.d.ts
@@ -0,0 +1,17 @@
+import type { APIAuditLog, AuditLogEvent } from '../../payloads/v6/auditLog';
+/**
+ * https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTGetAPIAuditLogQuery {
+ user_id?: string;
+ action_type?: AuditLogEvent;
+ before?: string;
+ limit?: number;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIAuditLogResult = APIAuditLog;
+//# sourceMappingURL=auditLog.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/auditLog.d.ts.map b/node_modules/discord-api-types/rest/v6/auditLog.d.ts.map
new file mode 100644
index 0000000..71871c3
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/auditLog.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"auditLog.d.ts","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE7E;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/auditLog.js b/node_modules/discord-api-types/rest/v6/auditLog.js
new file mode 100644
index 0000000..ea09bf5
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/auditLog.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=auditLog.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/auditLog.js.map b/node_modules/discord-api-types/rest/v6/auditLog.js.map
new file mode 100644
index 0000000..754e232
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/auditLog.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"auditLog.js","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/channel.d.ts b/node_modules/discord-api-types/rest/v6/channel.d.ts
new file mode 100644
index 0000000..6e9d17e
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/channel.d.ts
@@ -0,0 +1,268 @@
+import type { APIChannel, APIEmbed, APIFollowedChannel, APIInvite, APIMessage, APIMessageReference, APIOverwrite, APIUser, ChannelType, InviteTargetUserType, MessageFlags, OverwriteType } from '../../payloads/v6/index';
+/**
+ * https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIOverwriteSend {
+ id: string;
+ type: OverwriteType;
+ allow: number | string;
+ deny: number | string;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare enum AllowedMentionsTypes {
+ Everyone = "everyone",
+ Role = "roles",
+ User = "users"
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mentions-structure
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIAllowedMentionsSend {
+ parse?: AllowedMentionsTypes[];
+ roles?: string[];
+ users?: string[];
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#modify-channel
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPatchAPIChannelJSONBody {
+ name?: string | undefined;
+ type?: ChannelType.GUILD_NEWS | ChannelType.GUILD_TEXT | undefined;
+ position?: number | null | undefined;
+ topic?: string | null | undefined;
+ nsfw?: boolean | null | undefined;
+ rate_limit_per_user?: number | null | undefined;
+ user_limit?: number | null | undefined;
+ permission_overwrites?: APIOverwrite[] | null | undefined;
+ parent_id?: string | null | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIChannelResult = APIChannel;
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIChannelResult = APIChannel;
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPIChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#get-channel-messages
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTGetAPIChannelMessagesQuery {
+ around?: string;
+ before?: string;
+ after?: string;
+ limit?: number;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIChannelMessagesResult = APIMessage[];
+/**
+ * https://discord.com/developers/docs/resources/channel#create-message
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostAPIChannelMessageJSONBody {
+ content?: string | undefined;
+ nonce?: number | string | undefined;
+ tts?: boolean | undefined;
+ embed?: APIEmbed | undefined;
+ allowed_mentions?: APIAllowedMentionsSend | undefined;
+ message_reference?: APIMessageReference | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#create-message
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIChannelMessageFormDataBody = {
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+ /**
+ * The file contents
+ */
+ file: unknown;
+} | {
+ content?: string | undefined;
+ nonce?: number | string | undefined;
+ tts?: boolean | undefined;
+ embed?: APIEmbed | undefined;
+ allowed_mentions?: APIAllowedMentionsSend | undefined;
+ message_reference?: APIMessageReference | undefined;
+ /**
+ * The file contents
+ */
+ file: unknown;
+};
+/**
+ * https://discord.com/developers/docs/resources/channel#edit-message
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPatchAPIChannelMessageJSONBody {
+ content?: string | null | undefined;
+ embed?: APIEmbed | null | undefined;
+ allowed_mentions?: APIAllowedMentionsSend | null | undefined;
+ flags?: MessageFlags | null | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIChannelMessageResult = APIMessage;
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIChannelMessageResult = APIMessage;
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIChannelMessageResult = APIMessage;
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPIChannelMessageResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#get-reactions
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTGetAPIChannelMessageReactionsQuery {
+ before?: string;
+ after?: string;
+ limit?: number;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIChannelMessageReactionsResult = APIUser[];
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPutAPIChannelMessageReactionResult = never;
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPIChannelMessageReactionResult = never;
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPIChannelAllMessageReactionsResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#bulk-delete-messages
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostAPIChannelMessagesBulkDeleteJSONBody {
+ messages: string[];
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIChannelMessagesBulkDeleteResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#edit-channel-permissions
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPutAPIChannelPermissionsJSONBody {
+ allow: number | string;
+ deny: number | string;
+ type: OverwriteType;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPutAPIChannelPermissionsResult = never;
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPIChannelPermissionsResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#get-channel-invites
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIChannelInvitesResult = APIInvite[];
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostAPIChannelInviteJSONBody {
+ max_age?: number | undefined;
+ max_uses?: number | undefined;
+ temporary?: boolean | undefined;
+ unique?: boolean | undefined;
+ target_user_id?: string | undefined;
+ target_user_type?: InviteTargetUserType | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#trigger-typing-indicator
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIChannelTypingResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#get-pinned-messages
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIChannelPinsResult = APIMessage[];
+/**
+ * https://discord.com/developers/docs/resources/channel#add-pinned-channel-message
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPutAPIChannelPinResult = never;
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPIChannelPinResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPutAPIChannelRecipientJSONBody {
+ access_token: string;
+ nick?: string | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPutAPIChannelRecipientResult = unknown;
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPIChannelRecipientResult = unknown;
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIChannelMessageCrosspostResult = APIMessage;
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostAPIChannelFollowersJSONBody {
+ webhook_channel_id: string;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIChannelFollowersResult = APIFollowedChannel;
+//# sourceMappingURL=channel.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/channel.d.ts.map b/node_modules/discord-api-types/rest/v6/channel.d.ts.map
new file mode 100644
index 0000000..380c3c3
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/channel.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":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EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,kBAAkB,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/channel.js b/node_modules/discord-api-types/rest/v6/channel.js
new file mode 100644
index 0000000..be2d8b3
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/channel.js
@@ -0,0 +1,15 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AllowedMentionsTypes = void 0;
+/**
+ * https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+var AllowedMentionsTypes;
+(function (AllowedMentionsTypes) {
+ AllowedMentionsTypes["Everyone"] = "everyone";
+ AllowedMentionsTypes["Role"] = "roles";
+ AllowedMentionsTypes["User"] = "users";
+})(AllowedMentionsTypes = exports.AllowedMentionsTypes || (exports.AllowedMentionsTypes = {}));
+//# sourceMappingURL=channel.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/channel.js.map b/node_modules/discord-api-types/rest/v6/channel.js.map
new file mode 100644
index 0000000..f877704
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/channel.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":";;;AA6BA;;;;GAIG;AACH,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC/B,6CAAqB,CAAA;IACrB,sCAAc,CAAA;IACd,sCAAc,CAAA;AACf,CAAC,EAJW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAI/B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/emoji.d.ts b/node_modules/discord-api-types/rest/v6/emoji.d.ts
new file mode 100644
index 0000000..76778b7
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/emoji.d.ts
@@ -0,0 +1,50 @@
+import type { APIEmoji } from '../../payloads/v6/index';
+/**
+ * https://discord.com/developers/docs/resources/emoji#list-guild-emojis
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildEmojisResult = APIEmoji[];
+/**
+ * https://discord.com/developers/docs/resources/emoji#get-guild-emoji
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildEmojiResult = APIEmoji;
+/**
+ * https://discord.com/developers/docs/resources/emoji#create-guild-emoji-json-params
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostAPIGuildEmojiJSONBody {
+ name: string;
+ /**
+ * The image data, read more [here](https://discord.com/developers/docs/reference#image-data)
+ */
+ image: string;
+ roles?: string[] | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIGuildEmojiResult = APIEmoji;
+/**
+ * https://discord.com/developers/docs/resources/emoji#modify-guild-emoji
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPatchAPIGuildEmojiJSONBody {
+ name?: string | undefined;
+ roles?: string[] | null | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIGuildEmojiResult = APIEmoji;
+/**
+ * https://discord.com/developers/docs/resources/emoji#delete-guild-emoji
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPIGuildEmojiResult = never;
+//# sourceMappingURL=emoji.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/emoji.d.ts.map b/node_modules/discord-api-types/rest/v6/emoji.d.ts.map
new file mode 100644
index 0000000..a70ab48
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/emoji.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,EAAE,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;AAElD;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,8BAA8B;IAC9C,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,QAAQ,CAAC;AAEpD;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG,KAAK,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/emoji.js b/node_modules/discord-api-types/rest/v6/emoji.js
new file mode 100644
index 0000000..9b3d9c9
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/emoji.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=emoji.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/emoji.js.map b/node_modules/discord-api-types/rest/v6/emoji.js.map
new file mode 100644
index 0000000..100b53e
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/emoji.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"emoji.js","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/gateway.d.ts b/node_modules/discord-api-types/rest/v6/gateway.d.ts
new file mode 100644
index 0000000..59223b3
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/gateway.d.ts
@@ -0,0 +1,14 @@
+import type { APIGatewayBotInfo, APIGatewayInfo } from '../../payloads/v6/index';
+/**
+ * https://discord.com/developers/docs/topics/gateway#get-gateway
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGatewayResult = APIGatewayInfo;
+/**
+ * https://discord.com/developers/docs/topics/gateway#get-gateway-bot
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGatewayBotResult = APIGatewayBotInfo;
+//# sourceMappingURL=gateway.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/gateway.d.ts.map b/node_modules/discord-api-types/rest/v6/gateway.d.ts.map
new file mode 100644
index 0000000..bbbf47f
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/gateway.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEjF;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/gateway.js b/node_modules/discord-api-types/rest/v6/gateway.js
new file mode 100644
index 0000000..81495a6
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/gateway.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=gateway.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/gateway.js.map b/node_modules/discord-api-types/rest/v6/gateway.js.map
new file mode 100644
index 0000000..f7127a2
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/gateway.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"gateway.js","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/guild.d.ts b/node_modules/discord-api-types/rest/v6/guild.d.ts
new file mode 100644
index 0000000..3aa1cfa
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/guild.d.ts
@@ -0,0 +1,465 @@
+import type { APIBan, APIChannel, APIGuild, APIGuildIntegration, APIGuildMember, APIGuildPreview, APIGuildWidgetSettings, APIInvite, APIRole, APIVoiceRegion, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildFeature, GuildVerificationLevel, GuildWidgetStyle, IntegrationExpireBehavior } from '../../payloads/v6/index';
+import type { RESTPutAPIChannelPermissionsJSONBody } from './channel';
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIGuildCreateOverwrite extends RESTPutAPIChannelPermissionsJSONBody {
+ id: number | string;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type APIGuildCreatePartialChannel = Partial<Pick<APIChannel, 'type' | 'topic' | 'nsfw' | 'bitrate' | 'user_limit' | 'rate_limit_per_user'>> & {
+ name: string;
+ id?: number | string | undefined;
+ parent_id?: number | string | undefined;
+ permission_overwrites?: APIGuildCreateOverwrite[] | undefined;
+};
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface APIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody {
+ id: number | string;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostAPIGuildsJSONBody {
+ name: string;
+ region?: string | undefined;
+ icon?: string | undefined;
+ verification_level?: GuildVerificationLevel | undefined;
+ default_message_notifications?: GuildDefaultMessageNotifications | undefined;
+ explicit_content_filter?: GuildExplicitContentFilter | undefined;
+ roles?: APIGuildCreateRole[] | undefined;
+ channels?: APIGuildCreatePartialChannel[] | undefined;
+ afk_channel_id?: number | string | undefined;
+ afk_timeout?: number | undefined;
+ system_channel_id?: number | string | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIGuildsResult = APIGuild;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTGetAPIGuildQuery {
+ with_counts?: boolean;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildResult = APIGuild;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-preview
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildPreviewResult = APIGuildPreview;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPatchAPIGuildJSONBody {
+ name?: string | undefined;
+ region?: string | undefined;
+ verification_level?: GuildVerificationLevel | undefined;
+ default_message_notifications?: GuildDefaultMessageNotifications | undefined;
+ explicit_content_filter?: GuildExplicitContentFilter | undefined;
+ afk_channel_id?: string | null | undefined;
+ afk_timeout?: number | undefined;
+ icon?: string | null | undefined;
+ owner_id?: string | undefined;
+ splash?: string | null | undefined;
+ discovery_splash?: string | null | undefined;
+ banner?: string | null | undefined;
+ system_channel_id?: string | null | undefined;
+ rules_channel_id?: string | null | undefined;
+ public_updates_channel_id?: string | null | undefined;
+ preferred_locale?: string | undefined;
+ features?: GuildFeature[] | undefined;
+ description?: string | null | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIGuildResult = APIGuild;
+/**
+ * https://discord.com/developers/docs/resources/guild#delete-guild
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPIGuildResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-channels
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildChannelsResult = APIChannel[];
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-channel
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIGuildChannelJSONBody = Partial<Pick<APIChannel, 'type' | 'permission_overwrites' | 'topic' | 'nsfw' | 'bitrate' | 'user_limit' | 'rate_limit_per_user' | 'parent_id'>> & Required<Pick<APIChannel, 'name'>>;
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIGuildChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIGuildChannelPositionsJSONBody = {
+ id: string;
+ position: number;
+ lock_permissions?: boolean | undefined;
+ parent_id?: string | null | undefined;
+}[];
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIGuildChannelPositionsResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-member
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildMemberResult = APIGuildMember;
+/**
+ * https://discord.com/developers/docs/resources/guild#list-guild-members
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTGetAPIGuildMembersQuery {
+ limit?: number;
+ after?: string;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildMembersResult = APIGuildMember[];
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTGetAPIGuildMembersSearchQuery {
+ query: string;
+ limit?: number;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildMembersSearchResult = APIGuildMember[];
+/**
+ * https://discord.com/developers/docs/resources/guild#add-guild-member
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPutAPIGuildMemberJSONBody {
+ access_token: string;
+ nick?: string | undefined;
+ roles?: string[] | undefined;
+ mute?: boolean | undefined;
+ deaf?: boolean | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPutAPIGuildMemberResult = APIGuildMember | undefined;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-member
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPatchAPIGuildMemberJSONBody {
+ nick?: string | null | undefined;
+ roles?: string[] | null | undefined;
+ mute?: boolean | null | undefined;
+ deaf?: boolean | null | undefined;
+ channel_id?: string | null | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIGuildMemberResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-current-user-nick
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody {
+ nick?: string | null | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPICurrentGuildMemberNicknameResult = Required<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
+/**
+ * https://discord.com/developers/docs/resources/guild#add-guild-member-role
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPutAPIGuildMemberRoleResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#remove-guild-member-role
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPIGuildMemberRoleResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#remove-guild-member
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPIGuildMemberResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-bans
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildBansResult = APIBan[];
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-ban
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildBanResult = APIBan;
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-ban
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPutAPIGuildBanJSONBody {
+ delete_message_days?: number | undefined;
+ reason?: string | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPutAPIGuildBanResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#remove-guild-ban
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPIGuildBanResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-roles
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildRolesResult = APIRole[];
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-role
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostAPIGuildRoleJSONBody {
+ name?: string | null | undefined;
+ permissions?: number | string | null | undefined;
+ color?: number | null | undefined;
+ hoist?: boolean | null | undefined;
+ mentionable?: boolean | null | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIGuildRoleResult = APIRole;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-role-positions
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIGuildRolePositionsJSONBody = {
+ id: string;
+ position?: number | undefined;
+}[];
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIGuildRolePositionsResult = APIRole[];
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-role
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPatchAPIGuildRoleJSONBody {
+ name?: string | undefined;
+ permissions?: number | string | undefined;
+ color?: number | undefined;
+ hoist?: boolean | undefined;
+ mentionable?: boolean | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIGuildRoleResult = APIRole;
+/**
+ * https://discord.com/developers/docs/resources/guild#delete-guild-role
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPIGuildRoleResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-prune-count
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTGetAPIGuildPruneCountQuery {
+ days?: number;
+ /**
+ * While this is typed as a string, it represents an array of
+ * role IDs delimited by commas.
+ *
+ * @see https://discord.com/developers/docs/resources/guild#get-guild-prune-count-query-string-params
+ */
+ include_roles?: string;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTGetAPIGuildPruneCountResult {
+ pruned: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#begin-guild-prune
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostAPIGuildPruneJSONBody {
+ days?: number | undefined;
+ compute_prune_count?: boolean | undefined;
+ include_roles?: string[] | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostAPIGuildPruneResult {
+ pruned: number | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-voice-regions
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildVoiceRegionsResult = APIVoiceRegion[];
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-invites
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildInvitesResult = APIInvite[];
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-integrations
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTGetAPIGuildIntegrationsQuery {
+ include_applications?: boolean;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildIntegrationsResult = APIGuildIntegration[];
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-integration
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostAPIGuildIntegrationJSONBody {
+ type: string;
+ id: string;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIGuildIntegrationResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-integration
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPatchAPIGuildIntegrationJSONBody {
+ expire_behavior?: IntegrationExpireBehavior | null | undefined;
+ expire_grace_period?: number | null | undefined;
+ enable_emoticons?: boolean | null | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIGuildIntegrationResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#delete-guild-integration
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPIGuildIntegrationResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#sync-guild-integration
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIGuildIntegrationSyncResult = never;
+/**
+ * @deprecated Renamed to RESTGetAPIGuildWidgetSettingsResult
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildWidgetResult = APIGuildWidgetSettings;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-settings
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildWidgetSettingsResult = APIGuildWidgetSettings;
+/**
+ * @deprecated Renamed to RESTPatchAPIGuildWidgetSettingsJSONBody
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIGuildWidgetJSONBody = Partial<APIGuildWidgetSettings>;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-widget
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIGuildWidgetSettingsJSONBody = Partial<APIGuildWidgetSettings>;
+/**
+ * @deprecated Use `RESTPatchAPIGuildWidgetSettingsResult` instead
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIGuildWidgetResult = APIGuildWidgetSettings;
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIGuildWidgetSettingsResult = APIGuildWidgetSettings;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-vanity-url
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTGetAPIGuildVanityUrlResult {
+ code: string | null;
+ uses: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-image
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTGetAPIGuildWidgetImageQuery {
+ style?: GuildWidgetStyle;
+}
+/**
+ * Note: while the return type is `ArrayBuffer`, the expected result is
+ * a buffer of sorts (depends if in browser or on node.js/deno).
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildWidgetImageResult = ArrayBuffer;
+//# sourceMappingURL=guild.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/guild.d.ts.map b/node_modules/discord-api-types/rest/v6/guild.d.ts.map
new file mode 100644
index 0000000..7f63a70
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/guild.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"guild.d.ts","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,MAAM,EACN,UAAU,EACV,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,SAAS,EACT,OAAO,EACP,cAAc,EACd,gCAAgC,EAChC,0BAA0B,EAC1B,YAAY,EACZ,sBAAsB,EACtB,gBAAgB,EAChB,yBAAyB,EACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,WAAW,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,oCAAoC;IACpF,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,OAAO,CACjD,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,YAAY,GAAG,qBAAqB,CAAC,CAC9F,GAAG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACxC,qBAAqB,CAAC,EAAE,uBAAuB,EAAE,GAAG,SAAS,CAAC;CAC9D,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,kBAAm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CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,uCAAuC,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAEtF;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG,sBAAsB,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,sBAAsB,CAAC;AAE3E;;;;GAIG;AACH,MAAM,WAAW,8BAA8B;IAC9C,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC/C,KAAK,CAAC,EAAE,gBAAgB,CAAC;CACzB;AAED;;;;;GAKG;AACH,MAAM,MAAM,gCAAgC,GAAG,WAAW,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/guild.js b/node_modules/discord-api-types/rest/v6/guild.js
new file mode 100644
index 0000000..39864d9
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/guild.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=guild.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/guild.js.map b/node_modules/discord-api-types/rest/v6/guild.js.map
new file mode 100644
index 0000000..22534b0
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/guild.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"guild.js","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/index.d.ts b/node_modules/discord-api-types/rest/v6/index.d.ts
new file mode 100644
index 0000000..3ec7f09
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/index.d.ts
@@ -0,0 +1,348 @@
+export * from '../common';
+export * from './auditLog';
+export * from './channel';
+export * from './emoji';
+export * from './gateway';
+export * from './guild';
+export * from './invite';
+export * from './oauth2';
+export * from './user';
+export * from './voice';
+export * from './webhook';
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare const APIVersion = "6";
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export declare const Routes: {
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/audit-logs`
+ */
+ guildAuditLog(guildID: string): string;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}`
+ * - PATCH `/channels/{channel.id}`
+ * - DELETE `/channels/{channel.id}`
+ */
+ channel(channelID: string): string;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages`
+ * - POST `/channels/{channel.id}/messages`
+ */
+ channelMessages(channelID: string): string;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages/{message.id}`
+ * - PATCH `/channels/{channel.id}/messages/{message.id}`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}`
+ */
+ channelMessage(channelID: string, messageID: string): string;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/messages/{message.id}/crosspost`
+ */
+ channelCrosspost(channelID: string, messageID: string): string;
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`
+ *
+ * **Note**: You need to URL encode the emoji yourself.
+ */
+ channelMessageOwnReaction(channelID: string, messageID: string, emoji: string): string;
+ /**
+ * Route for:
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/{user.id}`
+ *
+ * **Note**: You need to URL encode the emoji yourself.
+ */
+ channelMessageUserReaction(channelID: string, messageID: string, emoji: string, userID: string): string;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}`
+ *
+ * **Note**: You need to URL encode the emoji yourself.
+ */
+ channelMessageSpecificReaction(channelID: string, messageID: string, emoji: string): string;
+ /**
+ * Route for:
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions`
+ */
+ channelMessageAllReactions(channelID: string, messageID: string): string;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/messages/bulk-delete`
+ */
+ channelBulkDelete(channelID: string): string;
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/permissions/{overwrite.id}`
+ * - DELETE `/channels/{channel.id}/permissions/{overwrite.id}`
+ */
+ channelPermissions(channelID: string, overwriteID: string): string;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/invites`
+ * - POST `/channels/{channel.id}/invites`
+ */
+ channelInvite(channelID: string): string;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/followers`
+ */
+ channelFollowers(channelID: string): string;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/typing`
+ */
+ channelTyping(channelID: string): string;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/pins`
+ */
+ channelPins(channelID: string): string;
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/pins/{message.id}`
+ * - DELETE `/channels/{channel.id}/pins/{message.id}`
+ */
+ channelPin(channelID: string, messageID: string): string;
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/recipients/{user.id}`
+ * - DELETE `/channels/{channel.id}/recipients/{user.id}`
+ */
+ channelRecipient(channelID: string, userID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/emojis`
+ * - POST `/guilds/{guild.id}/emojis`
+ */
+ guildEmojis(guildID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/emojis/{emoji.id}`
+ * - PATCH `/guilds/{guild.id}/emojis/{emoji.id}`
+ * - DELETE `/guilds/{guild.id}/emojis/{emoji.id}`
+ */
+ guildEmoji(guildID: string, emojiID: string): string;
+ /**
+ * Route for:
+ * - POST `/guilds`
+ */
+ guilds(): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}`
+ * - PATCH `/guilds/{guild.id}`
+ * - DELETE `/guilds/{guild.id}`
+ */
+ guild(guildID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/preview`
+ */
+ guildPreview(guildID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/channels`
+ * - POST `/guilds/{guild.id}/channels`
+ * - PATCH `/guilds/{guild.id}/channels`
+ */
+ guildChannels(guildID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members/{user.id}`
+ * - PUT `/guilds/{guild.id}/members/{user.id}`
+ * - PATCH `/guilds/{guild.id}/members/{user.id}`
+ * - DELETE `/guilds/{guild.id}/members/{user.id}`
+ */
+ guildMember(guildID: string, userID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members`
+ */
+ guildMembers(guildID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members/search`
+ */
+ guildMembersSearch(guildID: string): string;
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/members/@me/nick`
+ */
+ guildCurrentMemberNickname(guildID: string): string;
+ /**
+ * Route for:
+ * - PUT `/guilds/{guild.id}/members/{user.id}/roles/{role.id}`
+ * - DELETE `/guilds/{guild.id}/members/{user.id}/roles/{role.id}`
+ */
+ guildMemberRole(guildID: string, memberID: string, roleID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/bans`
+ */
+ guildBans(guildID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/bans/{user.id}`
+ * - PUT `/guilds/{guild.id}/bans/{user.id}`
+ * - DELETE `/guilds/{guild.id}/bans/{user.id}`
+ */
+ guildBan(guildID: string, userID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/roles`
+ * - POST `/guilds/{guild.id}/roles`
+ * - PATCH `/guilds/{guild.id}/roles`
+ */
+ guildRoles(guildID: string): string;
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/roles/{role.id}`
+ * - DELETE `/guilds/{guild.id}/roles/{role.id}`
+ */
+ guildRole(guildID: string, roleID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/prune`
+ * - POST `/guilds/{guild.id}/prune`
+ */
+ guildPrune(guildID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/regions`
+ */
+ guildVoiceRegions(guildID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/invites`
+ */
+ guildInvites(guildID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/integrations`
+ * - POST `/guilds/{guild.id}/integrations`
+ */
+ guildIntegrations(guildID: string): string;
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/integrations/{integration.id}`
+ * - DELETE `/guilds/{guild.id}/integrations/{integration.id}`
+ */
+ guildIntegration(guildID: string, integrationID: string): string;
+ /**
+ * Route for:
+ * - POST `/guilds/{guild.id}/integrations/{integration.id}/sync`
+ */
+ guildIntegrationSync(guildID: string, integrationID: string): string;
+ /**
+ * @deprecated Use `guildWidgetSettings` instead
+ */
+ guildWidget(guildID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget`
+ * - PATCH `/guilds/{guild.id}/widget`
+ */
+ guildWidgetSettings(guildID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/vanity-url`
+ */
+ guildVanityUrl(guildID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget.png`
+ */
+ guildWidgetImage(guildID: string): string;
+ /**
+ * Route for:
+ * - GET `/invites/{invite.code}`
+ * - DELETE `/invites/{invite.code}`
+ */
+ invite(code: string): string;
+ /**
+ * Route for:
+ * - GET `/users/@me`
+ * - GET `/users/{user.id}`
+ * - PATCH `/users/@me`
+ */
+ user(userID?: string): string;
+ /**
+ * Route for:
+ * - GET `/users/@me/guilds`
+ */
+ userGuilds(): string;
+ /**
+ * Route for:
+ * - DELETE `/users/@me/guilds/{guild.id}`
+ */
+ userGuild(guildID: string): string;
+ /**
+ * Route for:
+ * - POST `/users/@me/channels`
+ */
+ userChannels(): string;
+ /**
+ * Route for:
+ * - GET `/users/@me/connections`
+ */
+ userConnections(): string;
+ /**
+ * Route for:
+ * - GET `/voice/regions`
+ */
+ voiceRegions(): string;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/webhooks`
+ * - GET `/channels/{channel.id}/webhooks`
+ */
+ channelWebhook(channelID: string): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/webhooks`
+ */
+ guildWebhooks(guildID: string): string;
+ /**
+ * Route for:
+ * - GET `/webhooks/{webhook.id}`
+ * - GET `/webhooks/{webhook.id}/{webhook.token}`
+ * - PATCH `/webhooks/{webhook.id}`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}`
+ * - DELETE `/webhooks/{webhook.id}`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}`
+ * - POST `/webhooks/{webhook.id}/{webhook.token}`
+ */
+ webhook(webhookID: string, webhookToken?: string): string;
+ /**
+ * Route for:
+ * - POST `/webhooks/{webhook.id}/{webhook.token}/slack`
+ * - POST `/webhooks/{webhook.id}/{webhook.token}/github`
+ */
+ webhookPlatform(webhookID: string, webhookToken: string, platform: 'github' | 'slack'): string;
+ /**
+ * Route for:
+ * - GET `/gateway`
+ */
+ gateway(): string;
+ /**
+ * Route for:
+ * - GET `/gateway/bot`
+ */
+ gatewayBot(): string;
+ /**
+ * Route for:
+ * - GET `/oauth2/applications/@me`
+ */
+ oauth2CurrentApplication(): string;
+};
+//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/index.d.ts.map b/node_modules/discord-api-types/rest/v6/index.d.ts.map
new file mode 100644
index 0000000..275bd8e
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAE1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,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;wCACiC,MAAM;IAI1C;;;;OAIG;6BACsB,MAAM,YAAY,MAAM,UAAU,MAAM;IAIjE;;;OAGG;uBACgB,MAAM;IAIzB;;;;;OAKG;sBACe,MAAM,UAAU,MAAM;IAIxC;;;;;OAKG;wBACiB,MAAM;IAI1B;;;;OAIG;uBACgB,MAAM,UAAU,MAAM;IAIzC;;;;OAIG;wBACiB,MAAM;IAI1B;;;OAGG;+BACwB,MAAM;IAIjC;;;OAGG;0BACmB,MAAM;IAI5B;;;;OAIG;+BACwB,MAAM;IAIjC;;;;OAIG;8BACuB,MAAM,iBAAiB,MAAM;IAIvD;;;OAGG;kCAC2B,MAAM,iBAAiB,MAAM;IAI3D;;OAEG;yBACkB,MAAM;IAI3B;;;;OAIG;iCAC0B,MAAM;IAInC;;;OAGG;4BACqB,MAAM;IAI9B;;;OAGG;8BACuB,MAAM;IAIhC;;;;OAIG;iBACU,MAAM;IAInB;;;;;OAKG;;IAKH;;;OAGG;;IAKH;;;OAGG;uBACgB,MAAM;IAIzB;;;OAGG;;IAKH;;;OAGG;;IAKH;;;OAGG;;IAKH;;;;OAIG;8BACuB,MAAM;IAIhC;;;OAGG;2BACoB,MAAM;IAI7B;;;;;;;;;OASG;uBACgB,MAAM,iBAAiB,MAAM;IAQhD;;;;OAIG;+BACwB,MAAM,gBAAgB,MAAM,YAAY,QAAQ,GAAG,OAAO;IAIrF;;;OAGG;;IAKH;;;OAGG;;IAKH;;;OAGG;;CAIH,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/index.js b/node_modules/discord-api-types/rest/v6/index.js
new file mode 100644
index 0000000..589f018
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/index.js
@@ -0,0 +1,480 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Routes = exports.APIVersion = void 0;
+__exportStar(require("../common"), exports);
+__exportStar(require("./auditLog"), exports);
+__exportStar(require("./channel"), exports);
+__exportStar(require("./emoji"), exports);
+__exportStar(require("./gateway"), exports);
+__exportStar(require("./guild"), exports);
+__exportStar(require("./invite"), exports);
+__exportStar(require("./oauth2"), exports);
+__exportStar(require("./user"), exports);
+__exportStar(require("./voice"), exports);
+__exportStar(require("./webhook"), exports);
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+exports.APIVersion = '6';
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+exports.Routes = {
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/audit-logs`
+ */
+ guildAuditLog(guildID) {
+ return `/guilds/${guildID}/audit-logs`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}`
+ * - PATCH `/channels/{channel.id}`
+ * - DELETE `/channels/{channel.id}`
+ */
+ channel(channelID) {
+ return `/channels/${channelID}`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages`
+ * - POST `/channels/{channel.id}/messages`
+ */
+ channelMessages(channelID) {
+ return `/channels/${channelID}/messages`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages/{message.id}`
+ * - PATCH `/channels/{channel.id}/messages/{message.id}`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}`
+ */
+ channelMessage(channelID, messageID) {
+ return `/channels/${channelID}/messages/${messageID}`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/messages/{message.id}/crosspost`
+ */
+ channelCrosspost(channelID, messageID) {
+ return `/channels/${channelID}/message/${messageID}/crosspost`;
+ },
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`
+ *
+ * **Note**: You need to URL encode the emoji yourself.
+ */
+ channelMessageOwnReaction(channelID, messageID, emoji) {
+ return `/channels/${channelID}/messages/${messageID}/reactions/${emoji}/@me`;
+ },
+ /**
+ * Route for:
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/{user.id}`
+ *
+ * **Note**: You need to URL encode the emoji yourself.
+ */
+ channelMessageUserReaction(channelID, messageID, emoji, userID) {
+ return `/channels/${channelID}/messages/${messageID}/reactions/${emoji}/${userID}`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}`
+ *
+ * **Note**: You need to URL encode the emoji yourself.
+ */
+ channelMessageSpecificReaction(channelID, messageID, emoji) {
+ return `/channels/${channelID}/messages/${messageID}/reactions/${emoji}`;
+ },
+ /**
+ * Route for:
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions`
+ */
+ channelMessageAllReactions(channelID, messageID) {
+ return `/channels/${channelID}/messages/${messageID}`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/messages/bulk-delete`
+ */
+ channelBulkDelete(channelID) {
+ return `/channels/${channelID}/bulk-delete`;
+ },
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/permissions/{overwrite.id}`
+ * - DELETE `/channels/{channel.id}/permissions/{overwrite.id}`
+ */
+ channelPermissions(channelID, overwriteID) {
+ return `/channels/${channelID}/permissions/${overwriteID}`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/invites`
+ * - POST `/channels/{channel.id}/invites`
+ */
+ channelInvite(channelID) {
+ return `/channels/${channelID}`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/followers`
+ */
+ channelFollowers(channelID) {
+ return `/channels/${channelID}/followers`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/typing`
+ */
+ channelTyping(channelID) {
+ return `/channels/${channelID}/typing`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/pins`
+ */
+ channelPins(channelID) {
+ return `/channels/${channelID}/pins`;
+ },
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/pins/{message.id}`
+ * - DELETE `/channels/{channel.id}/pins/{message.id}`
+ */
+ channelPin(channelID, messageID) {
+ return `/channels/${channelID}/pins/${messageID}`;
+ },
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/recipients/{user.id}`
+ * - DELETE `/channels/{channel.id}/recipients/{user.id}`
+ */
+ channelRecipient(channelID, userID) {
+ return `/channels/${channelID}/recipients/${userID}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/emojis`
+ * - POST `/guilds/{guild.id}/emojis`
+ */
+ guildEmojis(guildID) {
+ return `/guilds/${guildID}/emojis`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/emojis/{emoji.id}`
+ * - PATCH `/guilds/{guild.id}/emojis/{emoji.id}`
+ * - DELETE `/guilds/{guild.id}/emojis/{emoji.id}`
+ */
+ guildEmoji(guildID, emojiID) {
+ return `/guilds/${guildID}/emojis/${emojiID}`;
+ },
+ /**
+ * Route for:
+ * - POST `/guilds`
+ */
+ guilds() {
+ return '/guilds';
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}`
+ * - PATCH `/guilds/{guild.id}`
+ * - DELETE `/guilds/{guild.id}`
+ */
+ guild(guildID) {
+ return `/guilds/${guildID}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/preview`
+ */
+ guildPreview(guildID) {
+ return `/guilds/${guildID}/preview`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/channels`
+ * - POST `/guilds/{guild.id}/channels`
+ * - PATCH `/guilds/{guild.id}/channels`
+ */
+ guildChannels(guildID) {
+ return `/guilds/${guildID}/channels`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members/{user.id}`
+ * - PUT `/guilds/{guild.id}/members/{user.id}`
+ * - PATCH `/guilds/{guild.id}/members/{user.id}`
+ * - DELETE `/guilds/{guild.id}/members/{user.id}`
+ */
+ guildMember(guildID, userID) {
+ return `/guilds/${guildID}/members/${userID}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members`
+ */
+ guildMembers(guildID) {
+ return `/guilds/${guildID}/members`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members/search`
+ */
+ guildMembersSearch(guildID) {
+ return `/guilds/${guildID}/members/search`;
+ },
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/members/@me/nick`
+ */
+ guildCurrentMemberNickname(guildID) {
+ return `/guilds/${guildID}/members/@me/nick`;
+ },
+ /**
+ * Route for:
+ * - PUT `/guilds/{guild.id}/members/{user.id}/roles/{role.id}`
+ * - DELETE `/guilds/{guild.id}/members/{user.id}/roles/{role.id}`
+ */
+ guildMemberRole(guildID, memberID, roleID) {
+ return `/guilds/${guildID}/members/${memberID}/roles/${roleID}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/bans`
+ */
+ guildBans(guildID) {
+ return `/guilds/${guildID}/bans`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/bans/{user.id}`
+ * - PUT `/guilds/{guild.id}/bans/{user.id}`
+ * - DELETE `/guilds/{guild.id}/bans/{user.id}`
+ */
+ guildBan(guildID, userID) {
+ return `/guilds/${guildID}/bans/${userID}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/roles`
+ * - POST `/guilds/{guild.id}/roles`
+ * - PATCH `/guilds/{guild.id}/roles`
+ */
+ guildRoles(guildID) {
+ return `/guilds/${guildID}/roles`;
+ },
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/roles/{role.id}`
+ * - DELETE `/guilds/{guild.id}/roles/{role.id}`
+ */
+ guildRole(guildID, roleID) {
+ return `/guilds/${guildID}/roles/${roleID}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/prune`
+ * - POST `/guilds/{guild.id}/prune`
+ */
+ guildPrune(guildID) {
+ return `/guilds/${guildID}/prune`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/regions`
+ */
+ guildVoiceRegions(guildID) {
+ return `/guilds/${guildID}/regions`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/invites`
+ */
+ guildInvites(guildID) {
+ return `/guilds/${guildID}/invites`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/integrations`
+ * - POST `/guilds/{guild.id}/integrations`
+ */
+ guildIntegrations(guildID) {
+ return `/guilds/${guildID}/integrations`;
+ },
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/integrations/{integration.id}`
+ * - DELETE `/guilds/{guild.id}/integrations/{integration.id}`
+ */
+ guildIntegration(guildID, integrationID) {
+ return `/guilds/${guildID}/integrations/${integrationID}`;
+ },
+ /**
+ * Route for:
+ * - POST `/guilds/{guild.id}/integrations/{integration.id}/sync`
+ */
+ guildIntegrationSync(guildID, integrationID) {
+ return `/guilds/${guildID}/integrations/${integrationID}/sync`;
+ },
+ /**
+ * @deprecated Use `guildWidgetSettings` instead
+ */
+ guildWidget(guildID) {
+ return `/guilds/${guildID}/widget`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget`
+ * - PATCH `/guilds/{guild.id}/widget`
+ */
+ guildWidgetSettings(guildID) {
+ return `/guilds/${guildID}/widget`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/vanity-url`
+ */
+ guildVanityUrl(guildID) {
+ return `/guilds/${guildID}/vanity-url`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget.png`
+ */
+ guildWidgetImage(guildID) {
+ return `/guilds/${guildID}/widget.png`;
+ },
+ /**
+ * Route for:
+ * - GET `/invites/{invite.code}`
+ * - DELETE `/invites/{invite.code}`
+ */
+ invite(code) {
+ return `/invites/${code}`;
+ },
+ /**
+ * Route for:
+ * - GET `/users/@me`
+ * - GET `/users/{user.id}`
+ * - PATCH `/users/@me`
+ */
+ user(userID = '@me') {
+ return `/users/${userID}`;
+ },
+ /**
+ * Route for:
+ * - GET `/users/@me/guilds`
+ */
+ userGuilds() {
+ return `/users/@me/guilds`;
+ },
+ /**
+ * Route for:
+ * - DELETE `/users/@me/guilds/{guild.id}`
+ */
+ userGuild(guildID) {
+ return `/users/@me/guilds/${guildID}`;
+ },
+ /**
+ * Route for:
+ * - POST `/users/@me/channels`
+ */
+ userChannels() {
+ return `/users/@me/channels`;
+ },
+ /**
+ * Route for:
+ * - GET `/users/@me/connections`
+ */
+ userConnections() {
+ return `/users/@me/connections`;
+ },
+ /**
+ * Route for:
+ * - GET `/voice/regions`
+ */
+ voiceRegions() {
+ return `/voice/regions`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/webhooks`
+ * - GET `/channels/{channel.id}/webhooks`
+ */
+ channelWebhook(channelID) {
+ return `/channels/${channelID}/webhooks`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/webhooks`
+ */
+ guildWebhooks(guildID) {
+ return `/guilds/${guildID}/webhooks`;
+ },
+ /**
+ * Route for:
+ * - GET `/webhooks/{webhook.id}`
+ * - GET `/webhooks/{webhook.id}/{webhook.token}`
+ * - PATCH `/webhooks/{webhook.id}`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}`
+ * - DELETE `/webhooks/{webhook.id}`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}`
+ * - POST `/webhooks/{webhook.id}/{webhook.token}`
+ */
+ webhook(webhookID, webhookToken) {
+ const parts = ['', 'webhooks', webhookID];
+ if (webhookToken)
+ parts.push(webhookToken);
+ return parts.join('/');
+ },
+ /**
+ * Route for:
+ * - POST `/webhooks/{webhook.id}/{webhook.token}/slack`
+ * - POST `/webhooks/{webhook.id}/{webhook.token}/github`
+ */
+ webhookPlatform(webhookID, webhookToken, platform) {
+ return `/${webhookID}/${webhookToken}/${platform}`;
+ },
+ /**
+ * Route for:
+ * - GET `/gateway`
+ */
+ gateway() {
+ return `/gateway`;
+ },
+ /**
+ * Route for:
+ * - GET `/gateway/bot`
+ */
+ gatewayBot() {
+ return `/gateway/bot`;
+ },
+ /**
+ * Route for:
+ * - GET `/oauth2/applications/@me`
+ */
+ oauth2CurrentApplication() {
+ return `/oauth2/applications/@me`;
+ },
+};
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/index.js.map b/node_modules/discord-api-types/rest/v6/index.js.map
new file mode 100644
index 0000000..2de39ce
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,4CAA0B;AAE1B,6CAA2B;AAC3B,4CAA0B;AAC1B,0CAAwB;AACxB,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B;AAE1B;;GAEG;AACU,QAAA,UAAU,GAAG,GAAG,CAAC;AAE9B;;GAEG;AACU,QAAA,MAAM,GAAG;IACrB;;;OAGG;IACH,aAAa,CAAC,OAAe;QAC5B,OAAO,WAAW,OAAO,aAAa,CAAC;IACxC,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,SAAiB;QACxB,OAAO,aAAa,SAAS,EAAE,CAAC;IACjC,CAAC;IAED;;;;OAIG;IACH,eAAe,CAAC,SAAiB;QAChC,OAAO,aA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ED;;;;OAIG;IACH,eAAe,CAAC,SAAiB,EAAE,YAAoB,EAAE,QAA4B;QACpF,OAAO,IAAI,SAAS,IAAI,YAAY,IAAI,QAAQ,EAAE,CAAC;IACpD,CAAC;IAED;;;OAGG;IACH,OAAO;QACN,OAAO,UAAU,CAAC;IACnB,CAAC;IAED;;;OAGG;IACH,UAAU;QACT,OAAO,cAAc,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,wBAAwB;QACvB,OAAO,0BAA0B,CAAC;IACnC,CAAC;CACD,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/index.mjs b/node_modules/discord-api-types/rest/v6/index.mjs
new file mode 100644
index 0000000..48f1ed4
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/index.mjs
@@ -0,0 +1,8 @@
+import mod from "./index.js";
+
+export default mod;
+export const APIVersion = mod.APIVersion;
+export const AllowedMentionsTypes = mod.AllowedMentionsTypes;
+export const Locale = mod.Locale;
+export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes;
+export const Routes = mod.Routes;
diff --git a/node_modules/discord-api-types/rest/v6/invite.d.ts b/node_modules/discord-api-types/rest/v6/invite.d.ts
new file mode 100644
index 0000000..d189a35
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/invite.d.ts
@@ -0,0 +1,20 @@
+import type { APIInvite } from '../../payloads/v6/index';
+/**
+ * https://discord.com/developers/docs/resources/invite#get-invite
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTGetAPIInviteQuery {
+ with_counts?: boolean;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIInviteResult = APIInvite;
+/**
+ * https://discord.com/developers/docs/resources/invite#delete-invite
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPIInviteResult = APIInvite;
+//# sourceMappingURL=invite.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/invite.d.ts.map b/node_modules/discord-api-types/rest/v6/invite.d.ts.map
new file mode 100644
index 0000000..3baa343
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/invite.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC;AAE/C;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/invite.js b/node_modules/discord-api-types/rest/v6/invite.js
new file mode 100644
index 0000000..2c05370
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/invite.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=invite.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/invite.js.map b/node_modules/discord-api-types/rest/v6/invite.js.map
new file mode 100644
index 0000000..8fa96d6
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/invite.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"invite.js","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/oauth2.d.ts b/node_modules/discord-api-types/rest/v6/oauth2.d.ts
new file mode 100644
index 0000000..2be418f
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/oauth2.d.ts
@@ -0,0 +1,177 @@
+import type { APIApplication, APIGuild, APIWebhook } from '../../payloads/v6/index';
+/**
+ * https://discord.com/developers/docs/topics/oauth2#get-current-application-information
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIOauth2CurrentApplicationResult = APIApplication;
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTOAuth2AuthorizationQuery {
+ response_type: 'code';
+ client_id: string;
+ scope: string;
+ redirect_uri?: string;
+ state?: string;
+ prompt?: 'consent' | 'none';
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTOAuth2AuthorizationQueryResult {
+ code: string;
+ state?: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostOAuth2AccessTokenURIEncodedData {
+ client_id: string;
+ client_secret: string;
+ grant_type: 'authorization_code';
+ code: string;
+ redirect_uri?: string;
+ scope: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-access-token-response
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostOAuth2AccessTokenResult {
+ access_token: string;
+ token_type: string;
+ expires_in: number;
+ refresh_token: string;
+ scope: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-refresh-token-exchange-example
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostOAuth2RefreshTokenURIEncodedData {
+ client_id: string;
+ client_secret: string;
+ grant_type: 'refresh_token';
+ refresh_token: string;
+ redirect_uri?: string;
+ scope: string;
+}
+export type RESTPostOAuth2RefreshTokenResult = RESTPostOAuth2AccessTokenResult;
+/**
+ * https://discord.com/developers/docs/topics/oauth2#implicit-grant
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTOAuth2ImplicitAuthorizationQuery {
+ response_type: 'token';
+ client_id: string;
+ scope: string;
+ redirect_uri?: string;
+ state?: string;
+ prompt?: 'consent' | 'none';
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#implicit-grant-redirect-url-example
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTOAuth2ImplicitAuthorizationURIFragmentResult = Omit<RESTPostOAuth2AccessTokenResult, 'refresh_token'>;
+/**
+ * https://discord.com/developers/docs/topics/oauth2#client-credentials-grant
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostOAuth2ClientCredentialsURIEncodedData {
+ client_id: string;
+ client_secret: string;
+ grant_type: 'client_credentials';
+ scope: string;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostOAuth2ClientCredentialsResult = RESTOAuth2ImplicitAuthorizationURIFragmentResult;
+/**
+ * https://discord.com/developers/docs/topics/oauth2#bot-authorization-flow-bot-auth-parameters
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTOAuth2BotAuthorizationQuery {
+ client_id: string;
+ scope: string;
+ /**
+ * The required permissions bitfield, stringified
+ */
+ permissions?: string;
+ guild_id?: string;
+ disable_guild_select?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTOAuth2AdvancedBotAuthorizationQuery {
+ client_id: string;
+ /**
+ * This assumes you include the `bot` scope alongside others (like `identify` for example)
+ */
+ scope: string;
+ /**
+ * The required permissions bitfield, stringified
+ */
+ permissions?: string;
+ guild_id?: string;
+ disable_guild_select?: boolean;
+ response_type: string;
+ redirect_uri?: string;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTOAuth2AdvancedBotAuthorizationQueryResult {
+ code: string;
+ state?: string;
+ guild_id: string;
+ permissions: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization-extended-bot-authorization-access-token-example
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult {
+ access_token: string;
+ token_type: string;
+ expires_in: number;
+ refresh_token: string;
+ scope: string;
+ guild: APIGuild;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#webhooks-webhook-token-response-example
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult {
+ access_token: string;
+ token_type: string;
+ expires_in: number;
+ refresh_token: string;
+ scope: string;
+ webhook: APIWebhook;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostOAuth2AccessTokenWithBotAndGuildsAndWebhookIncomingScopeResult = RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult & RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult;
+//# sourceMappingURL=oauth2.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/oauth2.d.ts.map b/node_modules/discord-api-types/rest/v6/oauth2.d.ts.map
new file mode 100644
index 0000000..5ccc529
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/oauth2.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEpF;;;;GAIG;AACH,MAAM,MAAM,wCAAwC,GAAG,cAAc,CAAC;AAEtE;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;I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G;AACH,MAAM,WAAW,6DAA6D;IAC7E,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,UAAU,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,sEAAsE,GACjF,oDAAoD,GAAG,6DAA6D,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/oauth2.js b/node_modules/discord-api-types/rest/v6/oauth2.js
new file mode 100644
index 0000000..6508265
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/oauth2.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=oauth2.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/oauth2.js.map b/node_modules/discord-api-types/rest/v6/oauth2.js.map
new file mode 100644
index 0000000..55386d8
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/oauth2.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"oauth2.js","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/user.d.ts b/node_modules/discord-api-types/rest/v6/user.d.ts
new file mode 100644
index 0000000..93b8a6c
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/user.d.ts
@@ -0,0 +1,80 @@
+import type { APIChannel, APIConnection, APIUser, GuildFeature } from '../../payloads/v6/index';
+/**
+ * https://discord.com/developers/docs/resources/user#get-current-user
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPICurrentUserResult = APIUser;
+/**
+ * https://discord.com/developers/docs/resources/user#get-user
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIUserResult = APIUser;
+/**
+ * https://discord.com/developers/docs/resources/user#modify-current-user
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPatchAPICurrentUserJSONBody {
+ username?: string | undefined;
+ avatar?: string | null | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPICurrentUserResult = APIUser;
+/**
+ * https://discord.com/developers/docs/resources/user#get-current-user-guilds
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTGetAPICurrentUserGuildsQuery {
+ before?: string;
+ after?: string;
+ limit?: number;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTAPIPartialCurrentUserGuild {
+ id: string;
+ name: string;
+ icon: string | null;
+ owner: boolean;
+ features: GuildFeature[];
+ /**
+ * @deprecated Use `permissions_new` instead
+ */
+ permissions: number;
+ permissions_new: string;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPICurrentUserGuildsResult = RESTAPIPartialCurrentUserGuild[];
+/**
+ * https://discord.com/developers/docs/resources/user#leave-guild
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPICurrentUserGuildResult = never;
+/**
+ * https://discord.com/developers/docs/resources/user#create-dm
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostAPICurrentUserCreateDMChannelJSONBody {
+ recipient_id: string;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPICurrentUserCreateDMChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/user#get-user-connections
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPICurrentUserConnectionsResult = APIConnection[];
+//# sourceMappingURL=user.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/user.d.ts.map b/node_modules/discord-api-types/rest/v6/user.d.ts.map
new file mode 100644
index 0000000..336944e
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/user.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEhG;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC;AAElD;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE3C;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC/C,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,OAAO,CAAC;AAEpD;;;;GAIG;AACH,MAAM,WAAW,gCAAgC;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,8BAA8B,EAAE,CAAC;AAEjF;;;;GAIG;AACH,MAAM,MAAM,mCAAmC,GAAG,KAAK,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,6CAA6C;IAC7D,YAAY,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,2CAA2C,GAAG,UAAU,CAAC;AAErE;;;;GAIG;AACH,MAAM,MAAM,sCAAsC,GAAG,aAAa,EAAE,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/user.js b/node_modules/discord-api-types/rest/v6/user.js
new file mode 100644
index 0000000..33269d3
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/user.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=user.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/user.js.map b/node_modules/discord-api-types/rest/v6/user.js.map
new file mode 100644
index 0000000..ff1a289
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/user.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/voice.d.ts b/node_modules/discord-api-types/rest/v6/voice.d.ts
new file mode 100644
index 0000000..d682cc6
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/voice.d.ts
@@ -0,0 +1,8 @@
+import type { APIVoiceRegion } from '../../payloads/v6/index';
+/**
+ * https://discord.com/developers/docs/resources/voice#list-voice-regions
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type GetAPIVoiceRegionsResult = APIVoiceRegion[];
+//# sourceMappingURL=voice.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/voice.d.ts.map b/node_modules/discord-api-types/rest/v6/voice.d.ts.map
new file mode 100644
index 0000000..70489cf
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/voice.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,cAAc,EAAE,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/voice.js b/node_modules/discord-api-types/rest/v6/voice.js
new file mode 100644
index 0000000..53e2713
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/voice.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=voice.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/voice.js.map b/node_modules/discord-api-types/rest/v6/voice.js.map
new file mode 100644
index 0000000..561b9f7
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/voice.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"voice.js","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/webhook.d.ts b/node_modules/discord-api-types/rest/v6/webhook.d.ts
new file mode 100644
index 0000000..0c216e5
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/webhook.d.ts
@@ -0,0 +1,139 @@
+import type { APIEmbed, APIMessage, APIWebhook } from '../../payloads/v6/index';
+import type { APIAllowedMentionsSend } from './channel';
+/**
+ * https://discord.com/developers/docs/resources/webhook#create-webhook
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostAPIChannelWebhookJSONBody {
+ name: string;
+ avatar?: string | null | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIChannelWebhookResult = APIWebhook;
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-channel-webhooks
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIChannelWebhooksResult = APIWebhook[];
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-guild-webhooks
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIGuildWebhooksResult = APIWebhook[];
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-webhook
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIWebhookResult = APIWebhook;
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-webhook-with-token
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTGetAPIWebhookWithTokenResult = Omit<APIWebhook, 'user'>;
+/**
+ * https://discord.com/developers/docs/resources/webhook#modify-webhook
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPatchAPIWebhookJSONBody {
+ name?: string | undefined;
+ avatar?: string | null | undefined;
+ channel_id?: string | undefined;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIWebhookResult = APIWebhook;
+/**
+ * https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIWebhookWithTokenJSONBody = Omit<RESTPatchAPIWebhookJSONBody, 'channel_id'>;
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPatchAPIWebhookWithTokenResult = Omit<APIWebhook, 'user'>;
+/**
+ * https://discord.com/developers/docs/resources/webhook#delete-webhook
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPIWebhookResult = never;
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTDeleteAPIWebhookWithTokenResult = never;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-webhook
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostAPIWebhookWithTokenJSONBody {
+ content?: string | undefined;
+ username?: string | undefined;
+ avatar_url?: string | undefined;
+ tts?: boolean | undefined;
+ embeds?: APIEmbed[] | undefined;
+ allowed_mentions?: APIAllowedMentionsSend | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-webhook
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIWebhookWithTokenFormDataBody = {
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+ /**
+ * The file contents
+ */
+ file: unknown;
+} | (RESTPostAPIWebhookWithTokenJSONBody & {
+ /**
+ * The file contents
+ */
+ file: unknown;
+});
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-webhook-querystring-params
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export interface RESTPostAPIWebhookWithTokenQuery {
+ wait?: boolean;
+}
+/**
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIWebhookWithTokenResult = never;
+/**
+ * Received when a call to POST `/webhooks/{webhook.id}/{webhook.token}` receives
+ * the `wait` query parameter set to `true`
+ *
+ * @see https://discord.com/developers/docs/resources/webhook#execute-webhook-querystring-params
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIWebhookWithTokenWaitResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook-querystring-params
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIWebhookWithTokenSlackQuery = RESTPostAPIWebhookWithTokenQuery;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook-querystring-params
+ *
+ * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8.
+ */
+export type RESTPostAPIWebhookWithTokenGitHubQuery = RESTPostAPIWebhookWithTokenQuery;
+//# sourceMappingURL=webhook.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/webhook.d.ts.map b/node_modules/discord-api-types/rest/v6/webhook.d.ts.map
new file mode 100644
index 0000000..3278b65
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/webhook.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,UAAU,CAAC;AAEzD;;;;GAIG;AACH,MAAM,MAAM,+BAA+B,GAAG,UAAU,EAAE,CAAC;AAE3D;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG,UAAU,EAAE,CAAC;AAEzD;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAEjD;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAExE;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC3C,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAAC;AAEnD;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAAG,IAAI,CAAC,2BAA2B,EAAE,YAAY,CAAC,CAAC;AAEnG;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,KAAK,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,KAAK,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,mCAAmC;IACnD,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,GAAG,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAChC,gBAAgB,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;CACtD;AAED;;;;GAIG;AACH,MAAM,MAAM,uCAAuC,GAChD;IACA;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACb,GACD,CAAC,mCAAmC,GAAG;IACvC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACb,CAAC,CAAC;AAEN;;;;GAIG;AACH,MAAM,WAAW,gCAAgC;IAChD,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,KAAK,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,MAAM,qCAAqC,GAAG,UAAU,CAAC;AAE/D;;;;GAIG;AACH,MAAM,MAAM,qCAAqC,GAAG,gCAAgC,CAAC;AAErF;;;;GAIG;AACH,MAAM,MAAM,sCAAsC,GAAG,gCAAgC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/webhook.js b/node_modules/discord-api-types/rest/v6/webhook.js
new file mode 100644
index 0000000..63886df
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/webhook.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=webhook.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v6/webhook.js.map b/node_modules/discord-api-types/rest/v6/webhook.js.map
new file mode 100644
index 0000000..f2cf863
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v6/webhook.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/auditLog.d.ts b/node_modules/discord-api-types/rest/v8/auditLog.d.ts
new file mode 100644
index 0000000..12b7c5b
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/auditLog.d.ts
@@ -0,0 +1,32 @@
+import type { Snowflake } from '../../globals';
+import type { APIAuditLog, AuditLogEvent } from '../../payloads/v8/auditLog';
+/**
+ * https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTGetAPIAuditLogQuery {
+ /**
+ * Filter the log for actions made by a user
+ */
+ user_id?: Snowflake;
+ /**
+ * The type of audit log events
+ */
+ action_type?: AuditLogEvent;
+ /**
+ * Filter the log before a certain entry ID
+ */
+ before?: Snowflake;
+ /**
+ * How many entries are returned (default 50, minimum 1, maximum 100)
+ *
+ * @default 50
+ */
+ limit?: number;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIAuditLogResult = APIAuditLog;
+//# sourceMappingURL=auditLog.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/auditLog.d.ts.map b/node_modules/discord-api-types/rest/v8/auditLog.d.ts.map
new file mode 100644
index 0000000..aafea15
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/auditLog.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"auditLog.d.ts","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE7E;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/auditLog.js b/node_modules/discord-api-types/rest/v8/auditLog.js
new file mode 100644
index 0000000..ea09bf5
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/auditLog.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=auditLog.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/auditLog.js.map b/node_modules/discord-api-types/rest/v8/auditLog.js.map
new file mode 100644
index 0000000..754e232
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/auditLog.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"auditLog.js","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/channel.d.ts b/node_modules/discord-api-types/rest/v8/channel.d.ts
new file mode 100644
index 0000000..3b08b0e
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/channel.d.ts
@@ -0,0 +1,564 @@
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIActionRowComponent, APIAllowedMentions, APIAttachment, APIChannel, APIEmbed, APIExtendedInvite, APIFollowedChannel, APIMessage, APIMessageActionRowComponent, APIMessageReference, APIUser, ChannelType, InviteTargetType, MessageFlags, OverwriteType, VideoQualityMode } from '../../payloads/v8/index';
+import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
+ id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#get-channel
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#modify-channel
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPatchAPIChannelJSONBody {
+ /**
+ * 1-100 character channel name
+ *
+ * Channel types: all
+ */
+ name?: string | undefined;
+ /**
+ * The type of channel; only conversion between `text` and `news`
+ * is supported and only in guilds with the "NEWS" feature
+ *
+ * Channel types: text, news
+ */
+ type?: ChannelType.GuildNews | ChannelType.GuildText | undefined;
+ /**
+ * The position of the channel in the left-hand listing
+ *
+ * Channel types: all
+ */
+ position?: number | null | undefined;
+ /**
+ * 0-1024 character channel topic
+ *
+ * Channel types: text, news
+ */
+ topic?: string | null | undefined;
+ /**
+ * Whether the channel is nsfw
+ *
+ * Channel types: text, news, store
+ */
+ nsfw?: boolean | null | undefined;
+ /**
+ * Amount of seconds a user has to wait before sending another message (0-21600);
+ * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
+ * are unaffected
+ *
+ * Channel types: text
+ */
+ rate_limit_per_user?: number | null | undefined;
+ /**
+ * The bitrate (in bits) of the voice channel; 8000 to 96000 (128000 for VIP servers)
+ *
+ * Channel types: voice
+ */
+ bitrate?: number | null | undefined;
+ /**
+ * The user limit of the voice channel; 0 refers to no limit, 1 to 99 refers to a user limit
+ *
+ * Channel types: voice
+ */
+ user_limit?: number | null | undefined;
+ /**
+ * Channel or category-specific permissions
+ *
+ * Channel types: all
+ */
+ permission_overwrites?: APIChannelPatchOverwrite[] | null | undefined;
+ /**
+ * ID of the new parent category for a channel
+ *
+ * Channel types: text, news, store, voice
+ */
+ parent_id?: Snowflake | null | undefined;
+ /**
+ * Voice region id for the voice or stage channel, automatic when set to `null`
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-region-object
+ */
+ rtc_region?: string | null | undefined;
+ /**
+ * The camera video quality mode of the voice channel
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes
+ */
+ video_quality_mode?: VideoQualityMode | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#modify-channel
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#deleteclose-channel
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#get-channel-messages
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTGetAPIChannelMessagesQuery {
+ /**
+ * Get messages around this message ID
+ */
+ around?: Snowflake;
+ /**
+ * Get messages before this message ID
+ */
+ before?: Snowflake;
+ /**
+ * Get messages after this message ID
+ */
+ after?: Snowflake;
+ /**
+ * Max number of messages to return (1-100)
+ *
+ * @default 50
+ */
+ limit?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#get-channel-messages
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIChannelMessagesResult = APIMessage[];
+/**
+ * https://discord.com/developers/docs/resources/channel#get-channel-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIChannelMessageResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/channel#message-object-message-reference-structure
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIMessageReferenceSend = StrictPartial<APIMessageReference> & AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Required<Pick<APIMessageReference, 'message_id'>>> & {
+ /**
+ * Whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message
+ *
+ * @default true
+ */
+ fail_if_not_exists?: boolean | undefined;
+};
+/**
+ * https://discord.com/developers/docs/resources/channel#create-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIChannelMessageJSONBody {
+ /**
+ * The message contents (up to 2000 characters)
+ */
+ content?: string | undefined;
+ /**
+ * A nonce that can be used for optimistic message sending
+ */
+ nonce?: number | string | undefined;
+ /**
+ * `true` if this is a TTS message
+ */
+ tts?: boolean | undefined;
+ /**
+ * Embedded `rich` content (up to 6000 characters)
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object
+ */
+ embeds?: APIEmbed[] | undefined;
+ /**
+ * Embedded `rich` content
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object
+ *
+ * @deprecated Use `embeds` instead
+ */
+ embed?: APIEmbed | undefined;
+ /**
+ * Allowed mentions for a message
+ *
+ * See https://discord.com/developers/docs/resources/channel#allowed-mentions-object
+ */
+ allowed_mentions?: APIAllowedMentions | undefined;
+ /**
+ * Include to make your message a reply
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-reference-structure
+ */
+ message_reference?: APIMessageReferenceSend | undefined;
+ /**
+ * The components to include with the message
+ *
+ * See https://discord.com/developers/docs/interactions/message-components#component-object
+ */
+ components?: APIActionRowComponent<APIMessageActionRowComponent>[] | undefined;
+ /**
+ * IDs of up to 3 stickers in the server to send in the message
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object
+ */
+ sticker_ids?: [Snowflake] | [Snowflake, Snowflake] | [Snowflake, Snowflake, Snowflake] | undefined;
+ /**
+ * Attachment objects with filename and description
+ */
+ attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
+ /**
+ * Message flags combined as a bitfield
+ */
+ flags?: MessageFlags | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#create-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIChannelMessageFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPostAPIChannelMessageJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/resources/channel#create-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIChannelMessageResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/channel#crosspost-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIChannelMessageCrosspostResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/channel#create-reaction
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPutAPIChannelMessageReactionResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-own-reaction
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIChannelMessageOwnReaction = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-user-reaction
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIChannelMessageUserReactionResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#get-reactions
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTGetAPIChannelMessageReactionUsersQuery {
+ /**
+ * Get users after this user ID
+ */
+ after?: Snowflake;
+ /**
+ * Max number of users to return (1-100)
+ *
+ * @default 25
+ */
+ limit?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#get-reactions
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIChannelMessageReactionUsersResult = APIUser[];
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-all-reactions
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIChannelAllMessageReactionsResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIChannelMessageReactionResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#edit-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPatchAPIChannelMessageJSONBody {
+ /**
+ * The new message contents (up to 2000 characters)
+ */
+ content?: string | null | undefined;
+ /**
+ * Embedded `rich` content (up to 6000 characters)
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object
+ */
+ embeds?: APIEmbed[] | null | undefined;
+ /**
+ * Embedded `rich` content
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object
+ *
+ * @deprecated Use `embeds` instead
+ */
+ embed?: APIEmbed | null | undefined;
+ /**
+ * Edit the flags of a message (only `SUPPRESS_EMBEDS` can currently be set/unset)
+ *
+ * When specifying flags, ensure to include all previously set flags/bits
+ * in addition to ones that you are modifying
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-flags
+ */
+ flags?: MessageFlags | null | undefined;
+ /**
+ * Allowed mentions for the message
+ *
+ * See https://discord.com/developers/docs/resources/channel#allowed-mentions-object
+ */
+ allowed_mentions?: APIAllowedMentions | null | undefined;
+ /**
+ * Attached files to keep
+ *
+ * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
+ *
+ * See https://discord.com/developers/docs/resources/channel#attachment-object
+ */
+ attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
+ /**
+ * The components to include with the message
+ *
+ * See https://discord.com/developers/docs/interactions/message-components#component-object
+ */
+ components?: APIActionRowComponent<APIMessageActionRowComponent>[] | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#edit-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIChannelMessageFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPatchAPIChannelMessageJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/resources/channel#edit-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIChannelMessageResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIChannelMessageResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#bulk-delete-messages
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIChannelMessagesBulkDeleteJSONBody {
+ /**
+ * An array of message ids to delete (2-100)
+ */
+ messages: Snowflake[];
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#bulk-delete-messages
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIChannelMessagesBulkDeleteResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#edit-channel-permissions
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPutAPIChannelPermissionJSONBody {
+ /**
+ * The bitwise value of all allowed permissions
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ *
+ * @default "0"
+ */
+ allow?: Permissions | null | undefined;
+ /**
+ * The bitwise value of all disallowed permissions
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ *
+ * @default "0"
+ */
+ deny?: Permissions | null | undefined;
+ /**
+ * `0` for a role or `1` for a member
+ */
+ type: OverwriteType;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#edit-channel-permissions
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPutAPIChannelPermissionResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#get-channel-invites
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIChannelInvitesResult = APIExtendedInvite[];
+/**
+ * https://discord.com/developers/docs/resources/channel#create-channel-invite
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIChannelInviteJSONBody {
+ /**
+ * Duration of invite in seconds before expiry, or 0 for never
+ *
+ * @default 86400 (24 hours)
+ */
+ max_age?: number | undefined;
+ /**
+ * Max number of uses or 0 for unlimited
+ *
+ * @default 0
+ */
+ max_uses?: number | undefined;
+ /**
+ * Whether this invite only grants temporary membership
+ *
+ * @default false
+ */
+ temporary?: boolean | undefined;
+ /**
+ * If true, don't try to reuse a similar invite
+ * (useful for creating many unique one time use invites)
+ *
+ * @default false
+ */
+ unique?: boolean | undefined;
+ /**
+ * The type of target for this voice channel invite
+ *
+ * See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
+ */
+ target_type?: InviteTargetType | undefined;
+ /**
+ * The id of the user whose stream to display for this invite
+ * - Required if `target_type` is 1
+ * - The user must be streaming in the channel
+ */
+ target_user_id?: Snowflake | undefined;
+ /**
+ * The id of the embedded application to open for this invite
+ * - Required if `target_type` is 2
+ * - The application must have the `EMBEDDED` flag
+ */
+ target_application_id?: Snowflake | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#create-channel-invite
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIChannelInviteResult = APIExtendedInvite;
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-channel-permission
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIChannelPermissionResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#follow-news-channel
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIChannelFollowersJSONBody {
+ /**
+ * ID of target channel
+ */
+ webhook_channel_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#follow-news-channel
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIChannelFollowersResult = APIFollowedChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#trigger-typing-indicator
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIChannelTypingResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#get-pinned-messages
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIChannelPinsResult = APIMessage[];
+/**
+ * https://discord.com/developers/docs/resources/channel#add-pinned-channel-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPutAPIChannelPinResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-pinned-channel-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIChannelPinResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPutAPIChannelRecipientJSONBody {
+ /**
+ * Access token of a user that has granted your app the `gdm.join` scope
+ */
+ access_token: string;
+ /**
+ * Nickname of the user being added
+ */
+ nick?: string | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPutAPIChannelRecipientResult = unknown;
+/**
+ * https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIChannelRecipientResult = unknown;
+//# sourceMappingURL=channel.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/channel.d.ts.map b/node_modules/discord-api-types/rest/v8/channel.d.ts.map
new file mode 100644
index 0000000..031633e
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/channel.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,4BAA4B,EAC5B,mBAAmB,EACnB,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,oDAAoD,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEjH;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,mCAAmC;IACpF,EAAE,EAAE,SAAS,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAEjD;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC3C;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAA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;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,GAAG,OAAO,CAAC;AAEvD;;;;GAIG;AACH,MAAM,MAAM,mCAAmC,GAAG,OAAO,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/channel.js b/node_modules/discord-api-types/rest/v8/channel.js
new file mode 100644
index 0000000..7c587bc
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/channel.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=channel.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/channel.js.map b/node_modules/discord-api-types/rest/v8/channel.js.map
new file mode 100644
index 0000000..f1057f4
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/channel.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/emoji.d.ts b/node_modules/discord-api-types/rest/v8/emoji.d.ts
new file mode 100644
index 0000000..42f67fd
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/emoji.d.ts
@@ -0,0 +1,69 @@
+import type { Snowflake } from '../../globals';
+import type { APIEmoji } from '../../payloads/v8/index';
+/**
+ * https://discord.com/developers/docs/resources/emoji#list-guild-emojis
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildEmojisResult = APIEmoji[];
+/**
+ * https://discord.com/developers/docs/resources/emoji#get-guild-emoji
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildEmojiResult = APIEmoji;
+/**
+ * https://discord.com/developers/docs/resources/emoji#create-guild-emoji-json-params
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIGuildEmojiJSONBody {
+ /**
+ * Name of the emoji
+ */
+ name: string;
+ /**
+ * The 128x128 emoji image
+ *
+ * https://discord.com/developers/docs/reference#image-data
+ */
+ image: string;
+ /**
+ * Roles for which this emoji will be whitelisted
+ */
+ roles?: Snowflake[] | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/emoji#create-guild-emoji
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIGuildEmojiResult = APIEmoji;
+/**
+ * https://discord.com/developers/docs/resources/emoji#modify-guild-emoji
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPatchAPIGuildEmojiJSONBody {
+ /**
+ * Name of the emoji
+ */
+ name?: string | undefined;
+ /**
+ * Roles for which this emoji will be whitelisted
+ */
+ roles?: Snowflake[] | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/emoji#modify-guild-emoji
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIGuildEmojiResult = APIEmoji;
+/**
+ * https://discord.com/developers/docs/resources/emoji#delete-guild-emoji
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIGuildEmojiResult = never;
+//# sourceMappingURL=emoji.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/emoji.d.ts.map b/node_modules/discord-api-types/rest/v8/emoji.d.ts.map
new file mode 100644
index 0000000..52e3170
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/emoji.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,EAAE,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;AAElD;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC7C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,8BAA8B;IAC9C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;CACvC;AAED;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,GAAG,QAAQ,CAAC;AAEpD;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG,KAAK,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/emoji.js b/node_modules/discord-api-types/rest/v8/emoji.js
new file mode 100644
index 0000000..9b3d9c9
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/emoji.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=emoji.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/emoji.js.map b/node_modules/discord-api-types/rest/v8/emoji.js.map
new file mode 100644
index 0000000..100b53e
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/emoji.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"emoji.js","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/gateway.d.ts b/node_modules/discord-api-types/rest/v8/gateway.d.ts
new file mode 100644
index 0000000..64debcb
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/gateway.d.ts
@@ -0,0 +1,14 @@
+import type { APIGatewayBotInfo, APIGatewayInfo } from '../../payloads/v8/index';
+/**
+ * https://discord.com/developers/docs/topics/gateway#get-gateway
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGatewayResult = APIGatewayInfo;
+/**
+ * https://discord.com/developers/docs/topics/gateway#get-gateway-bot
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGatewayBotResult = APIGatewayBotInfo;
+//# sourceMappingURL=gateway.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/gateway.d.ts.map b/node_modules/discord-api-types/rest/v8/gateway.d.ts.map
new file mode 100644
index 0000000..bbbf47f
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/gateway.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEjF;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/gateway.js b/node_modules/discord-api-types/rest/v8/gateway.js
new file mode 100644
index 0000000..81495a6
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/gateway.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=gateway.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/gateway.js.map b/node_modules/discord-api-types/rest/v8/gateway.js.map
new file mode 100644
index 0000000..f7127a2
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/gateway.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"gateway.js","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/guild.d.ts b/node_modules/discord-api-types/rest/v8/guild.d.ts
new file mode 100644
index 0000000..196a84f
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/guild.d.ts
@@ -0,0 +1,882 @@
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIBan, APIChannel, APIDMChannel, APIExtendedInvite, APIGroupDMChannel, APIGuild, APIGuildIntegration, APIGuildMember, APIGuildMembershipScreening, APIGuildPreview, APIGuildWelcomeScreen, APIGuildWidget, APIGuildWidgetSettings, APIRole, APIVoiceRegion, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildFeature, GuildSystemChannelFlags, GuildVerificationLevel, GuildWidgetStyle } from '../../payloads/v8/index';
+import type { Nullable, StrictPartial, StrictRequired, UnionToIntersection } from '../../utils/internals';
+import type { RESTPutAPIChannelPermissionJSONBody } from './channel';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildCreateOverwrite extends RESTPutAPIChannelPermissionJSONBody {
+ id: number | string;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIGuildChannelResolvable = Exclude<APIChannel, APIDMChannel | APIGroupDMChannel>;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type APIGuildCreatePartialChannel = StrictPartial<Pick<UnionToIntersection<APIGuildChannelResolvable>, 'type' | 'topic' | 'nsfw' | 'bitrate' | 'user_limit' | 'rate_limit_per_user'>> & {
+ name: string;
+ id?: number | string | undefined;
+ parent_id?: number | string | null | undefined;
+ permission_overwrites?: APIGuildCreateOverwrite[] | undefined;
+};
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface APIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody {
+ id: number | string;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIGuildsJSONBody {
+ /**
+ * Name of the guild (2-100 characters)
+ */
+ name: string;
+ /**
+ * Voice region id
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-region-object
+ */
+ region?: string | undefined;
+ /**
+ * base64 1024x1024 png/jpeg image for the guild icon
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ icon?: string | undefined;
+ /**
+ * Verification level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ */
+ verification_level?: GuildVerificationLevel | undefined;
+ /**
+ * Default message notification level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
+ */
+ default_message_notifications?: GuildDefaultMessageNotifications | undefined;
+ /**
+ * Explicit content filter level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
+ */
+ explicit_content_filter?: GuildExplicitContentFilter | undefined;
+ /**
+ * New guild roles
+ *
+ * @remarks
+ * When using this parameter, the first member of the array is used to change properties of the guild's `@everyone` role.
+ * If you are trying to bootstrap a guild with additional roles, keep this in mind.
+ *
+ * Also, the required `id` field within each role object is an integer placeholder,
+ * and will be replaced by the API upon consumption. Its purpose is to allow you to overwrite a role's permissions
+ * in a channel when also passing in channels with the channels array.
+ *
+ * See https://discord.com/developers/docs/topics/permissions#role-object
+ */
+ roles?: APIGuildCreateRole[] | undefined;
+ /**
+ * New guild's channels
+ *
+ * @remarks
+ * When using the channels parameter, the `position` field is ignored, and none of the default channels are created.
+ *
+ * Also, the `id` field within each channel object may be set to an integer placeholder,
+ * and will be replaced by the API upon consumption. Its purpose is to allow you to create `GUILD_CATEGORY` channels
+ * by setting the `parent_id` field on any children to the category's id field.
+ * Category channels must be listed before any children.
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object
+ */
+ channels?: APIGuildCreatePartialChannel[] | undefined;
+ /**
+ * ID for afk channel
+ */
+ afk_channel_id?: number | Snowflake | null | undefined;
+ /**
+ * AFK timeout in seconds
+ */
+ afk_timeout?: number | undefined;
+ /**
+ * The id of the channel where guild notices such as welcome messages and boost events are posted
+ */
+ system_channel_id?: number | Snowflake | null | undefined;
+ /**
+ * System channel flags
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
+ */
+ system_channel_flags?: GuildSystemChannelFlags | undefined;
+ /**
+ * Whether the boosts progress bar should be enabled.
+ */
+ premium_progress_bar_enabled?: boolean | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIGuildsResult = APIGuild;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTGetAPIGuildQuery {
+ /**
+ * When `true`, will return approximate member and presence counts for the guild
+ *
+ * @default false
+ */
+ with_counts?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildResult = APIGuild;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-preview
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildPreviewResult = APIGuildPreview;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPatchAPIGuildJSONBody {
+ /**
+ * New name for the guild (2-100 characters)
+ */
+ name?: string | undefined;
+ /**
+ * Voice region id
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-region-object
+ */
+ region?: string | null | undefined;
+ /**
+ * Verification level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ */
+ verification_level?: GuildVerificationLevel | null | undefined;
+ /**
+ * Default message notification level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
+ */
+ default_message_notifications?: GuildDefaultMessageNotifications | null | undefined;
+ /**
+ * Explicit content filter level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
+ */
+ explicit_content_filter?: GuildExplicitContentFilter | null | undefined;
+ /**
+ * ID for afk channel
+ */
+ afk_channel_id?: Snowflake | null | undefined;
+ /**
+ * AFK timeout in seconds
+ */
+ afk_timeout?: number | undefined;
+ /**
+ * base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the guild has `ANIMATED_ICON` feature)
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ icon?: string | null | undefined;
+ /**
+ * User id to transfer guild ownership to (must be owner)
+ */
+ owner_id?: Snowflake | undefined;
+ /**
+ * base64 16:9 png/jpeg image for the guild splash (when the guild has `INVITE_SPLASH` feature)
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ splash?: string | null | undefined;
+ /**
+ * base64 png/jpeg image for the guild discovery splash (when the guild has `DISCOVERABLE` feature)
+ */
+ discovery_splash?: string | null | undefined;
+ /**
+ * base64 16:9 png/jpeg image for the guild banner (when the server has the `BANNER` feature; can be animated gif when the server has the `ANIMATED_BANNER` feature)
+ */
+ banner?: string | null | undefined;
+ /**
+ * The id of the channel where guild notices such as welcome messages and boost events are posted
+ */
+ system_channel_id?: Snowflake | null | undefined;
+ /**
+ * System channel flags
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
+ */
+ system_channel_flags?: GuildSystemChannelFlags | undefined;
+ /**
+ * The id of the channel where Community guilds display rules and/or guidelines
+ */
+ rules_channel_id?: Snowflake | null | undefined;
+ /**
+ * The id of the channel where admins and moderators of Community guilds receive notices from Discord
+ */
+ public_updates_channel_id?: Snowflake | null | undefined;
+ /**
+ * The preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US"
+ *
+ * @default "en-US" (if the value is set to `null`)
+ */
+ preferred_locale?: string | null | undefined;
+ /**
+ * Enabled guild features
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ */
+ features?: GuildFeature[] | undefined;
+ /**
+ * The description for the guild, if the guild is discoverable
+ */
+ description?: string | null | undefined;
+ /**
+ * Whether the boosts progress bar should be enabled.
+ */
+ premium_progress_bar_enabled?: boolean | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIGuildResult = APIGuild;
+/**
+ * https://discord.com/developers/docs/resources/guild#delete-guild
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIGuildResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-channels
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildChannelsResult = APIChannel[];
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-channel
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIGuildChannelJSONBody = Omit<APIGuildCreatePartialChannel, 'id'>;
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-channel
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIGuildChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIGuildChannelPositionsJSONBody = {
+ /**
+ * Channel id
+ */
+ id: Snowflake;
+ /**
+ * Sorting position of the channel
+ */
+ position: number;
+ /**
+ * Sync channel overwrites with the new parent, when moving to a new `parent_id`
+ */
+ lock_permissions?: boolean | undefined;
+ /**
+ * The new parent id of this channel
+ */
+ parent_id?: Snowflake | null | undefined;
+}[];
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIGuildChannelPositionsResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-member
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildMemberResult = APIGuildMember;
+/**
+ * https://discord.com/developers/docs/resources/guild#list-guild-members
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTGetAPIGuildMembersQuery {
+ /**
+ * Max number of members to return (1-1000)
+ *
+ * @default 1
+ */
+ limit?: number;
+ /**
+ * The highest user id in the previous page
+ *
+ * @default 0
+ */
+ after?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#list-guild-members
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildMembersResult = APIGuildMember[];
+/**
+ * https://discord.com/developers/docs/resources/guild#search-guild-members
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTGetAPIGuildMembersSearchQuery {
+ /**
+ * Query string to match username(s) and nickname(s) against
+ */
+ query: string;
+ /**
+ * Max number of members to return (1-1000)
+ *
+ * @default 1
+ */
+ limit?: number;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildMembersSearchResult = APIGuildMember[];
+/**
+ * https://discord.com/developers/docs/resources/guild#add-guild-member
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPutAPIGuildMemberJSONBody {
+ /**
+ * An oauth2 access token granted with the `guilds.join` to the bot's application for the user you want to add to the guild
+ */
+ access_token: string;
+ /**
+ * Value to set users nickname to
+ *
+ * Requires `MANAGE_NICKNAMES` permission
+ */
+ nick?: string | undefined;
+ /**
+ * Array of role ids the member is assigned
+ *
+ * Requires `MANAGE_ROLES` permission
+ */
+ roles?: Snowflake[] | undefined;
+ /**
+ * Whether the user is muted in voice channels
+ *
+ * Requires `MUTE_MEMBERS` permission
+ */
+ mute?: boolean | undefined;
+ /**
+ * Whether the user is deafened in voice channels
+ *
+ * Requires `DEAFEN_MEMBERS` permission
+ */
+ deaf?: boolean | undefined;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPutAPIGuildMemberResult = APIGuildMember | never;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-member
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPatchAPIGuildMemberJSONBody {
+ /**
+ * Value to set users nickname to
+ *
+ * Requires `MANAGE_NICKNAMES` permission
+ */
+ nick?: string | null | undefined;
+ /**
+ * Array of role ids the member is assigned
+ *
+ * Requires `MANAGE_ROLES` permission
+ */
+ roles?: Snowflake[] | null | undefined;
+ /**
+ * Whether the user is muted in voice channels. Will throw a 400 if the user is not in a voice channel
+ *
+ * Requires `MUTE_MEMBERS` permission
+ */
+ mute?: boolean | null | undefined;
+ /**
+ * Whether the user is deafened in voice channels. Will throw a 400 if the user is not in a voice channel
+ *
+ * Requires `DEAFEN_MEMBERS` permission
+ */
+ deaf?: boolean | null | undefined;
+ /**
+ * ID of channel to move user to (if they are connected to voice)
+ *
+ * Requires `MOVE_MEMBERS` permission
+ */
+ channel_id?: Snowflake | null | undefined;
+ /**
+ * Timestamp of when the time out will be removed; until then, they cannot interact with the guild
+ */
+ communication_disabled_until?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#add-guild-member
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIGuildMemberResult = APIGuildMember;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-current-user-nick
+ *
+ * @deprecated Use [Modify Current Member](https://discord.com/developers/docs/resources/guild#modify-current-member) instead.
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody {
+ /**
+ * Value to set users nickname to
+ *
+ * Requires `CHANGE_NICKNAME` permission
+ */
+ nick?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-current-member
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPatchAPICurrentGuildMemberJSONBody {
+ /**
+ * Value to set users nickname to
+ *
+ * Requires `CHANGE_NICKNAME` permission
+ */
+ nick?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-current-user-nick
+ *
+ * @deprecated Use [Modify Current Member](https://discord.com/developers/docs/resources/guild#modify-current-member) instead.
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPICurrentGuildMemberNicknameResult = StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
+/**
+ * https://discord.com/developers/docs/resources/guild#add-guild-member-role
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPutAPIGuildMemberRoleResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#remove-guild-member-role
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIGuildMemberRoleResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#remove-guild-member
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIGuildMemberResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-bans
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildBansResult = APIBan[];
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-ban
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildBanResult = APIBan;
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-ban
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPutAPIGuildBanJSONBody {
+ /**
+ * Number of days to delete messages for (0-7)
+ */
+ delete_message_days?: number | undefined;
+ /**
+ * Reason for the ban
+ *
+ * @deprecated Removed in API v10, use the `X-Audit-Log-Reason` header instead.
+ */
+ reason?: string | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-ban
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPutAPIGuildBanResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#remove-guild-ban
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIGuildBanResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-roles
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildRolesResult = APIRole[];
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-role
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIGuildRoleJSONBody {
+ /**
+ * Name of the role
+ *
+ * @default "new role"
+ */
+ name?: string | null | undefined;
+ /**
+ * Bitwise value of the enabled/disabled permissions
+ *
+ * @default "default role permissions in guild"
+ */
+ permissions?: Permissions | null | undefined;
+ /**
+ * RGB color value
+ *
+ * @default 0
+ */
+ color?: number | null | undefined;
+ /**
+ * Whether the role should be displayed separately in the sidebar
+ *
+ * @default false
+ */
+ hoist?: boolean | null | undefined;
+ /**
+ * The role's icon image (if the guild has the `ROLE_ICONS` feature)
+ */
+ icon?: string | null | undefined;
+ /**
+ * The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature)
+ */
+ unicode_emoji?: string | null | undefined;
+ /**
+ * Whether the role should be mentionable
+ *
+ * @default false
+ */
+ mentionable?: boolean | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-role
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIGuildRoleResult = APIRole;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-role-positions
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIGuildRolePositionsJSONBody = {
+ /**
+ * Role id
+ */
+ id: Snowflake;
+ /**
+ * Sorting position of the role
+ */
+ position?: number | undefined;
+}[];
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-role-positions
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIGuildRolePositionsResult = APIRole[];
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-role
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPatchAPIGuildRoleJSONBody {
+ /**
+ * Name of the role
+ */
+ name?: string | null | undefined;
+ /**
+ * Bitwise value of the enabled/disabled permissions
+ */
+ permissions?: Permissions | null | undefined;
+ /**
+ * RGB color value
+ */
+ color?: number | null | undefined;
+ /**
+ * Whether the role should be displayed separately in the sidebar
+ */
+ hoist?: boolean | null | undefined;
+ /**
+ * The role's icon image (if the guild has the `ROLE_ICONS` feature)
+ */
+ icon?: string | null | undefined;
+ /**
+ * The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature)
+ */
+ unicode_emoji?: string | null | undefined;
+ /**
+ * Whether the role should be mentionable
+ */
+ mentionable?: boolean | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-role
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIGuildRoleResult = APIRole;
+/**
+ * https://discord.com/developers/docs/resources/guild#delete-guild-role
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIGuildRoleResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-prune-count
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTGetAPIGuildPruneCountQuery {
+ /**
+ * Number of days to count prune for (1 or more)
+ *
+ * @default 7
+ */
+ days?: number;
+ /**
+ * Role(s) to include
+ *
+ * While this is typed as a string, it represents an array of
+ * role IDs delimited by commas
+ *
+ * See https://discord.com/developers/docs/resources/guild#get-guild-prune-count-query-string-params
+ */
+ include_roles?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-prune-count
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTGetAPIGuildPruneCountResult {
+ pruned: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#begin-guild-prune
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIGuildPruneJSONBody {
+ /**
+ * Number of days to count prune for (1 or more)
+ *
+ * @default 7
+ */
+ days?: number | undefined;
+ /**
+ * Whether `pruned is returned, discouraged for large guilds
+ *
+ * @default true
+ */
+ compute_prune_count?: boolean | undefined;
+ /**
+ * Role(s) to include
+ */
+ include_roles?: Snowflake[] | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#begin-guild-prune
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIGuildPruneResult {
+ pruned: number | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-voice-regions
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildVoiceRegionsResult = APIVoiceRegion[];
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-invites
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildInvitesResult = APIExtendedInvite[];
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-integrations
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildIntegrationsResult = APIGuildIntegration[];
+/**
+ * https://discord.com/developers/docs/resources/guild#delete-guild-integration
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIGuildIntegrationResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-settings
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildWidgetSettingsResult = APIGuildWidgetSettings;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-widget
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIGuildWidgetSettingsJSONBody = StrictPartial<APIGuildWidgetSettings>;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-widget
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIGuildWidgetSettingsResult = APIGuildWidgetSettings;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildWidgetJSONResult = APIGuildWidget;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-vanity-url
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTGetAPIGuildVanityUrlResult {
+ code: string | null;
+ uses: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-image
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTGetAPIGuildWidgetImageQuery {
+ /**
+ * Style of the widget image returned
+ *
+ * @default "shield"
+ */
+ style?: GuildWidgetStyle;
+}
+/**
+ * Note: while the return type is `ArrayBuffer`, the expected result is
+ * a buffer of sorts (depends if in browser or on node.js/deno).
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildWidgetImageResult = ArrayBuffer;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPatchAPIGuildMemberVerificationJSONBody {
+ /**
+ * Whether Membership Screening is enabled
+ */
+ enabled?: boolean | undefined;
+ /**
+ * Array of field objects serialized in a string
+ */
+ form_fields?: string | undefined;
+ /**
+ * The server description to show in the screening form
+ */
+ description?: string | null | undefined;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
+ /**
+ * The id of the channel the user is currently in
+ */
+ channel_id: Snowflake;
+ /**
+ * Toggles the user's suppress state
+ */
+ suppress?: boolean | undefined;
+ /**
+ * Sets the user's request to speak
+ */
+ request_to_speak_timestamp?: string | null | undefined;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
+ /**
+ * The id of the channel the user is currently in
+ */
+ channel_id: Snowflake;
+ /**
+ * Toggles the user's suppress state
+ */
+ suppress?: boolean | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildWelcomeScreenResult = APIGuildWelcomeScreen;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIGuildWelcomeScreenJSONBody = Nullable<StrictPartial<APIGuildWelcomeScreen>> & {
+ /**
+ * Whether the welcome screen is enabled
+ */
+ enabled?: boolean | null | undefined;
+};
+//# sourceMappingURL=guild.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/guild.d.ts.map b/node_modules/discord-api-types/rest/v8/guild.d.ts.map
new file mode 100644
index 0000000..9aeb377
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/guild.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"guild.d.ts","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EACX,MAAM,EACN,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,2BAA2B,EAC3B,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,sBAAsB,EACtB,OAAO,EACP,cAAc,EACd,gCAAgC,EAChC,0BAA0B,EAC1B,YAAY,EACZ,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC1G,OAAO,KA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AA2B,CAAC;AAEpF;;GAEG;AACH,MAAM,WAAW,gDAAgD;IAChE;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B;;OAEG;IACH,0BAA0B,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACvD;AAED;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACvD;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,MAAM,kCAAkC,GAAG,qBAAqB,CAAC;AAEvE;;;;GAIG;AACH,MAAM,MAAM,sCAAsC,GAAG,QAAQ,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC,GAAG;IACrG;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;CACrC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/guild.js b/node_modules/discord-api-types/rest/v8/guild.js
new file mode 100644
index 0000000..39864d9
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/guild.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=guild.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/guild.js.map b/node_modules/discord-api-types/rest/v8/guild.js.map
new file mode 100644
index 0000000..22534b0
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/guild.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"guild.js","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/guildScheduledEvent.d.ts b/node_modules/discord-api-types/rest/v8/guildScheduledEvent.d.ts
new file mode 100644
index 0000000..c40268a
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/guildScheduledEvent.d.ts
@@ -0,0 +1,141 @@
+import type { Snowflake } from '../../globals';
+import type { StrictPartial } from '../../utils/internals';
+import type { APIGuildScheduledEvent, APIGuildScheduledEventEntityMetadata, APIGuildScheduledEventUser, GuildScheduledEventEntityType, GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus } from '../../v8';
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTGetAPIGuildScheduledEventsQuery {
+ /**
+ * Whether to include number of users subscribed to each event
+ */
+ with_user_count?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildScheduledEventsResult = APIGuildScheduledEvent[];
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIGuildScheduledEventJSONBody {
+ /**
+ * The stage channel id of the guild event
+ */
+ channel_id?: Snowflake | undefined;
+ /**
+ * The name of the guild event
+ */
+ name: string;
+ /**
+ * The privacy level of the guild event
+ */
+ privacy_level: GuildScheduledEventPrivacyLevel;
+ /**
+ * The time to schedule the guild event at
+ */
+ scheduled_start_time: string;
+ /**
+ * The time when the scheduled event is scheduled to end
+ */
+ scheduled_end_time?: string | undefined;
+ /**
+ * The description of the guild event
+ */
+ description?: string | undefined;
+ /**
+ * The scheduled entity type of the guild event
+ */
+ entity_type?: GuildScheduledEventEntityType | undefined;
+ /**
+ * The entity metadata of the scheduled event
+ */
+ entity_metadata?: APIGuildScheduledEventEntityMetadata | undefined;
+ /**
+ * The cover image of the scheduled event
+ */
+ image?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIGuildScheduledEventResult = APIGuildScheduledEvent;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTGetAPIGuildScheduledEventQuery {
+ /**
+ * Whether to include number of users subscribed to this event
+ */
+ with_user_count?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIGuildScheduledEventJSONBody = StrictPartial<RESTPostAPIGuildScheduledEventJSONBody> & {
+ /**
+ * The status of the scheduled event
+ */
+ status?: GuildScheduledEventStatus | undefined;
+};
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIGuildScheduledEventResult = APIGuildScheduledEvent;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIGuildScheduledEventResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTGetAPIGuildScheduledEventUsersQuery {
+ /**
+ * Number of users to receive from the event
+ *
+ * @default 100
+ */
+ limit?: number;
+ /**
+ * Whether to include guild member data if it exists
+ */
+ with_member?: boolean;
+ /**
+ * Consider only users before given user id
+ */
+ before?: Snowflake;
+ /**
+ * Consider only users after given user id
+ */
+ after?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildScheduledEventUsersResult = APIGuildScheduledEventUser[];
+//# sourceMappingURL=guildScheduledEvent.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/guildScheduledEvent.d.ts.map b/node_modules/discord-api-types/rest/v8/guildScheduledEvent.d.ts.map
new file mode 100644
index 0000000..27cc743
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/guildScheduledEvent.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"guildScheduledEvent.d.ts","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EACX,sBAAsB,EACtB,oCAAoC,EACpC,0BAA0B,EAC1B,6BAA6B,EAC7B,+BAA+B,EAC/B,yBAAyB,EACzB,MAAM,UAAU,CAAC;AAElB;;;;GAIG;AACH,MAAM,WAAW,mCAAmC;IACnD;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAAG,sBAAsB,EAAE,CAAC;AAE5E;;;;GAIG;AACH,MAAM,WAAW,sCAAsC;IACtD;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,aAAa,EAAE,+BAA+B,CAAC;IAC/C;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC;;OAEG;IACH,WAAW,CAAC,EAAE,6BAA6B,GAAG,SAAS,CAAC;IACxD;;OAEG;IACH,eAAe,CAAC,EAAE,oCAAoC,GAAG,SAAS,CAAC;IACnE;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAAG,sBAAsB,CAAC;AAE1E;;;;GAIG;AACH,MAAM,WAAW,kCAAkC;IAClD;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,CAAC;AAEzE;;;;GAIG;AACH,MAAM,MAAM,uCAAuC,GAAG,aAAa,CAAC,sCAAsC,CAAC,GAAG;IAC7G;;OAEG;IACH,MAAM,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;CAC/C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,qCAAqC,GAAG,sBAAsB,CAAC;AAE3E;;;;GAIG;AACH,MAAM,MAAM,sCAAsC,GAAG,KAAK,CAAC;AAE3D;;;;GAIG;AACH,MAAM,WAAW,uCAAuC;IACvD;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,MAAM,wCAAwC,GAAG,0BAA0B,EAAE,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/guildScheduledEvent.js b/node_modules/discord-api-types/rest/v8/guildScheduledEvent.js
new file mode 100644
index 0000000..e9e95e3
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/guildScheduledEvent.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=guildScheduledEvent.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/guildScheduledEvent.js.map b/node_modules/discord-api-types/rest/v8/guildScheduledEvent.js.map
new file mode 100644
index 0000000..98c4d81
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/guildScheduledEvent.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"guildScheduledEvent.js","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/index.d.ts b/node_modules/discord-api-types/rest/v8/index.d.ts
new file mode 100644
index 0000000..c4a862f
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/index.d.ts
@@ -0,0 +1,539 @@
+import type { Snowflake } from '../../globals';
+export * from '../common';
+export * from './auditLog';
+export * from './channel';
+export * from './emoji';
+export * from './gateway';
+export * from './guild';
+export * from './guildScheduledEvent';
+export * from './interactions';
+export * from './invite';
+export * from './oauth2';
+export * from './stageInstance';
+export * from './sticker';
+export * from './template';
+export * from './user';
+export * from './voice';
+export * from './webhook';
+export declare const APIVersion = "8";
+export declare const Routes: {
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/audit-logs`
+ */
+ guildAuditLog(guildId: Snowflake): `/guilds/${string}/audit-logs`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}`
+ * - PATCH `/channels/{channel.id}`
+ * - DELETE `/channels/{channel.id}`
+ */
+ channel(channelId: Snowflake): `/channels/${string}`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages`
+ * - POST `/channels/{channel.id}/messages`
+ */
+ channelMessages(channelId: Snowflake): `/channels/${string}/messages`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages/{message.id}`
+ * - PATCH `/channels/{channel.id}/messages/{message.id}`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}`
+ */
+ channelMessage(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}`;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/messages/{message.id}/crosspost`
+ */
+ channelMessageCrosspost(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}/crosspost`;
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageOwnReaction(channelId: Snowflake, messageId: Snowflake, emoji: string): `/channels/${string}/messages/${string}/reactions/${string}/@me`;
+ /**
+ * Route for:
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/{user.id}`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageUserReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, userId: Snowflake): `/channels/${string}/messages/${string}/reactions/${string}/${string}`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string): `/channels/${string}/messages/${string}/reactions/${string}`;
+ /**
+ * Route for:
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions`
+ */
+ channelMessageAllReactions(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}/reactions`;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/messages/bulk-delete`
+ */
+ channelBulkDelete(channelId: Snowflake): `/channels/${string}/messages/bulk-delete`;
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/permissions/{overwrite.id}`
+ * - DELETE `/channels/{channel.id}/permissions/{overwrite.id}`
+ */
+ channelPermission(channelId: Snowflake, overwriteId: Snowflake): `/channels/${string}/permissions/${string}`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/invites`
+ * - POST `/channels/{channel.id}/invites`
+ */
+ channelInvites(channelId: Snowflake): `/channels/${string}/invites`;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/followers`
+ */
+ channelFollowers(channelId: Snowflake): `/channels/${string}/followers`;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/typing`
+ */
+ channelTyping(channelId: Snowflake): `/channels/${string}/typing`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/pins`
+ */
+ channelPins(channelId: Snowflake): `/channels/${string}/pins`;
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/pins/{message.id}`
+ * - DELETE `/channels/{channel.id}/pins/{message.id}`
+ */
+ channelPin(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/pins/${string}`;
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/recipients/{user.id}`
+ * - DELETE `/channels/{channel.id}/recipients/{user.id}`
+ */
+ channelRecipient(channelId: Snowflake, userId: Snowflake): `/channels/${string}/recipients/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/emojis`
+ * - POST `/guilds/{guild.id}/emojis`
+ */
+ guildEmojis(guildId: Snowflake): `/guilds/${string}/emojis`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/emojis/{emoji.id}`
+ * - PATCH `/guilds/{guild.id}/emojis/{emoji.id}`
+ * - DELETE `/guilds/{guild.id}/emojis/{emoji.id}`
+ */
+ guildEmoji(guildId: Snowflake, emojiId: Snowflake): `/guilds/${string}/emojis/${string}`;
+ /**
+ * Route for:
+ * - POST `/guilds`
+ */
+ guilds(): "/guilds";
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}`
+ * - PATCH `/guilds/{guild.id}`
+ * - DELETE `/guilds/{guild.id}`
+ */
+ guild(guildId: Snowflake): `/guilds/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/preview`
+ */
+ guildPreview(guildId: Snowflake): `/guilds/${string}/preview`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/channels`
+ * - POST `/guilds/{guild.id}/channels`
+ * - PATCH `/guilds/{guild.id}/channels`
+ */
+ guildChannels(guildId: Snowflake): `/guilds/${string}/channels`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members/{user.id}`
+ * - PUT `/guilds/{guild.id}/members/{user.id}`
+ * - PATCH `/guilds/{guild.id}/members/@me`
+ * - PATCH `/guilds/{guild.id}/members/{user.id}`
+ * - DELETE `/guilds/{guild.id}/members/{user.id}`
+ */
+ guildMember(guildId: Snowflake, userId?: Snowflake | '@me'): `/guilds/${string}/members/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members`
+ */
+ guildMembers(guildId: Snowflake): `/guilds/${string}/members`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members/search`
+ */
+ guildMembersSearch(guildId: Snowflake): `/guilds/${string}/members/search`;
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/members/@me/nick`
+ *
+ * @deprecated Use {@link Routes.guildMember} instead.
+ */
+ guildCurrentMemberNickname(guildId: Snowflake): `/guilds/${string}/members/@me/nick`;
+ /**
+ * Route for:
+ * - PUT `/guilds/{guild.id}/members/{user.id}/roles/{role.id}`
+ * - DELETE `/guilds/{guild.id}/members/{user.id}/roles/{role.id}`
+ */
+ guildMemberRole(guildId: Snowflake, memberId: Snowflake, roleId: Snowflake): `/guilds/${string}/members/${string}/roles/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/bans`
+ */
+ guildBans(guildId: Snowflake): `/guilds/${string}/bans`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/bans/{user.id}`
+ * - PUT `/guilds/{guild.id}/bans/{user.id}`
+ * - DELETE `/guilds/{guild.id}/bans/{user.id}`
+ */
+ guildBan(guildId: Snowflake, userId: Snowflake): `/guilds/${string}/bans/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/roles`
+ * - POST `/guilds/{guild.id}/roles`
+ * - PATCH `/guilds/{guild.id}/roles`
+ */
+ guildRoles(guildId: Snowflake): `/guilds/${string}/roles`;
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/roles/{role.id}`
+ * - DELETE `/guilds/{guild.id}/roles/{role.id}`
+ */
+ guildRole(guildId: Snowflake, roleId: Snowflake): `/guilds/${string}/roles/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/prune`
+ * - POST `/guilds/{guild.id}/prune`
+ */
+ guildPrune(guildId: Snowflake): `/guilds/${string}/prune`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/regions`
+ */
+ guildVoiceRegions(guildId: Snowflake): `/guilds/${string}/regions`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/invites`
+ */
+ guildInvites(guildId: Snowflake): `/guilds/${string}/invites`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/integrations`
+ */
+ guildIntegrations(guildId: Snowflake): `/guilds/${string}/integrations`;
+ /**
+ * Route for:
+ * - DELETE `/guilds/{guild.id}/integrations/{integration.id}`
+ */
+ guildIntegration(guildId: Snowflake, integrationId: Snowflake): `/guilds/${string}/integrations/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget`
+ * - PATCH `/guilds/{guild.id}/widget`
+ */
+ guildWidgetSettings(guildId: Snowflake): `/guilds/${string}/widget`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget.json`
+ */
+ guildWidgetJSON(guildId: Snowflake): `/guilds/${string}/widget.json`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/vanity-url`
+ */
+ guildVanityUrl(guildId: Snowflake): `/guilds/${string}/vanity-url`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget.png`
+ */
+ guildWidgetImage(guildId: Snowflake): `/guilds/${string}/widget.png`;
+ /**
+ * Route for:
+ * - GET `/invites/{invite.code}`
+ * - DELETE `/invites/{invite.code}`
+ */
+ invite(code: string): `/invites/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/templates/{template.code}`
+ * - POST `/guilds/templates/{template.code}`
+ */
+ template(code: string): `/guilds/templates/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/templates`
+ * - POST `/guilds/{guild.id}/templates`
+ */
+ guildTemplates(guildId: Snowflake): `/guilds/${string}/templates`;
+ /**
+ * Route for:
+ * - PUT `/guilds/{guild.id}/templates/{template.code}`
+ * - PATCH `/guilds/{guild.id}/templates/{template.code}`
+ * - DELETE `/guilds/{guild.id}/templates/{template.code}`
+ */
+ guildTemplate(guildId: Snowflake, code: string): `/guilds/${string}/templates/${string}`;
+ /**
+ * Route for:
+ * - GET `/users/@me`
+ * - GET `/users/{user.id}`
+ * - PATCH `/users/@me`
+ *
+ * @param [userId] The user ID, defaulted to `@me`
+ */
+ user(userId?: Snowflake | '@me'): `/users/${string}`;
+ /**
+ * Route for:
+ * - GET `/users/@me/guilds`
+ */
+ userGuilds(): "/users/@me/guilds";
+ /**
+ * Route for:
+ * - GET `/users/@me/guilds/{guild.id}/member`
+ */
+ userGuildMember(guildId: Snowflake): `/users/@me/guilds/${string}/member`;
+ /**
+ * Route for:
+ * - DELETE `/users/@me/guilds/{guild.id}`
+ */
+ userGuild(guildId: Snowflake): `/users/@me/guilds/${string}`;
+ /**
+ * Route for:
+ * - POST `/users/@me/channels`
+ */
+ userChannels(): "/users/@me/channels";
+ /**
+ * Route for:
+ * - GET `/users/@me/connections`
+ */
+ userConnections(): "/users/@me/connections";
+ /**
+ * Route for:
+ * - GET `/voice/regions`
+ */
+ voiceRegions(): "/voice/regions";
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/webhooks`
+ * - POST `/channels/{channel.id}/webhooks`
+ */
+ channelWebhooks(channelId: Snowflake): `/channels/${string}/webhooks`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/webhooks`
+ */
+ guildWebhooks(guildId: Snowflake): `/guilds/${string}/webhooks`;
+ /**
+ * Route for:
+ * - GET `/webhooks/{webhook.id}`
+ * - GET `/webhooks/{webhook.id}/{webhook.token}`
+ * - PATCH `/webhooks/{webhook.id}`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}`
+ * - DELETE `/webhooks/{webhook.id}`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}`
+ * - POST `/webhooks/{webhook.id}/{webhook.token}`
+ *
+ * - POST `/webhooks/{application.id}/{interaction.token}`
+ */
+ webhook(webhookId: Snowflake, webhookToken?: string): `/webhooks/${string}` | `/webhooks/${string}/${string}`;
+ /**
+ * Route for:
+ * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ *
+ * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/@original`
+ * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/{message.id}`
+ * - DELETE `/webhooks/{application.id}/{interaction.token}/messages/{message.id}`
+ */
+ webhookMessage(webhookId: Snowflake, webhookToken: string, messageId?: Snowflake | '@original'): `/webhooks/${string}/${string}/messages/${string}`;
+ /**
+ * Route for:
+ * - POST `/webhooks/{webhook.id}/{webhook.token}/github`
+ * - POST `/webhooks/{webhook.id}/{webhook.token}/slack`
+ */
+ webhookPlatform(webhookId: Snowflake, webhookToken: string, platform: 'github' | 'slack'): `/webhooks/${string}/${string}/github` | `/webhooks/${string}/${string}/slack`;
+ /**
+ * Route for:
+ * - GET `/gateway`
+ */
+ gateway(): "/gateway";
+ /**
+ * Route for:
+ * - GET `/gateway/bot`
+ */
+ gatewayBot(): "/gateway/bot";
+ /**
+ * Route for:
+ * - GET `/oauth2/applications/@me`
+ */
+ oauth2CurrentApplication(): "/oauth2/applications/@me";
+ /**
+ * Route for:
+ * - GET `/oauth2/@me`
+ */
+ oauth2CurrentAuthorization(): "/oauth2/@me";
+ /**
+ * Route for:
+ * - GET `/oauth2/authorize`
+ */
+ oauth2Authorization(): "/oauth2/authorize";
+ /**
+ * Route for:
+ * - POST `/oauth2/token`
+ */
+ oauth2TokenExchange(): "/oauth2/token";
+ /**
+ * Route for:
+ * - POST `/oauth2/token/revoke`
+ */
+ oauth2TokenRevocation(): "/oauth2/token/revoke";
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/commands`
+ * - PUT `/applications/{application.id}/commands`
+ * - POST `/applications/{application.id}/commands`
+ */
+ applicationCommands(applicationId: Snowflake): `/applications/${string}/commands`;
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/commands/{command.id}`
+ * - PATCH `/applications/{application.id}/commands/{command.id}`
+ * - DELETE `/applications/{application.id}/commands/{command.id}`
+ */
+ applicationCommand(applicationId: Snowflake, commandId: Snowflake): `/applications/${string}/commands/${string}`;
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands`
+ * - POST `/applications/{application.id}/guilds/{guild.id}/commands`
+ */
+ applicationGuildCommands(applicationId: Snowflake, guildId: Snowflake): `/applications/${string}/guilds/${string}/commands`;
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ * - PATCH `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ * - DELETE `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ */
+ applicationGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake): `/applications/${string}/guilds/${string}/commands/${string}`;
+ /**
+ * Route for:
+ * - POST `/interactions/{interaction.id}/{interaction.token}/callback`
+ */
+ interactionCallback(interactionId: Snowflake, interactionToken: string): `/interactions/${string}/${string}/callback`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/member-verification`
+ * - PATCH `/guilds/{guild.id}/member-verification`
+ */
+ guildMemberVerification(guildId: Snowflake): `/guilds/${string}/member-verification`;
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/voice-states/@me`
+ * - PATCH `/guilds/{guild.id}/voice-states/{user.id}`
+ */
+ guildVoiceState(guildId: Snowflake, userId?: Snowflake | '@me'): `/guilds/${string}/voice-states/${string}`;
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/permissions`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/permissions`
+ */
+ guildApplicationCommandsPermissions(applicationId: Snowflake, guildId: Snowflake): `/applications/${string}/guilds/${string}/commands/permissions`;
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions`
+ */
+ applicationCommandPermissions(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake): `/applications/${string}/guilds/${string}/commands/${string}/permissions`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/welcome-screen`
+ * - PATCH `/guilds/{guild.id}/welcome-screen`
+ */
+ guildWelcomeScreen(guildId: Snowflake): `/guilds/${string}/welcome-screen`;
+ /**
+ * Route for:
+ * - POST `/stage-instances`
+ */
+ stageInstances(): "/stage-instances";
+ /**
+ * Route for:
+ * - GET `/stage-instances/{channel.id}`
+ * - PATCH `/stage-instances/{channel.id}`
+ * - DELETE `/stage-instances/{channel.id}`
+ */
+ stageInstance(channelId: Snowflake): `/stage-instances/${string}`;
+ /**
+ * Route for:
+ * - GET `/stickers/{sticker.id}`
+ */
+ sticker(stickerId: Snowflake): `/stickers/${string}`;
+ /**
+ * Route for:
+ * - GET `/sticker-packs`
+ */
+ nitroStickerPacks(): "/sticker-packs";
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/stickers`
+ * - POST `/guilds/{guild.id}/stickers`
+ */
+ guildStickers(guildId: Snowflake): `/guilds/${string}/stickers`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/stickers/{sticker.id}`
+ * - PATCH `/guilds/{guild.id}/stickers/{sticker.id}`
+ * - DELETE `/guilds/{guild.id}/stickers/{sticker.id}`
+ */
+ guildSticker(guildId: Snowflake, stickerId: Snowflake): `/guilds/${string}/stickers/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events`
+ * - POST `/guilds/{guild.id}/scheduled-events`
+ */
+ guildScheduledEvents(guildId: Snowflake): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ * - PATCH `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ * - DELETE `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ */
+ guildScheduledEvent(guildId: Snowflake, guildScheduledEventId: Snowflake): string;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}/users`
+ */
+ guildScheduledEventUsers(guildId: Snowflake, guildScheduledEventId: Snowflake): string;
+};
+export declare const RouteBases: {
+ readonly api: "https://discord.com/api/v8";
+ readonly cdn: "https://cdn.discordapp.com";
+ readonly invite: "https://discord.gg";
+ readonly template: "https://discord.new";
+ readonly gift: "https://discord.gift";
+ readonly scheduledEvent: "https://discord.com/events";
+};
+export declare const OAuth2Routes: {
+ readonly authorizationURL: "https://discord.com/api/v8/oauth2/authorize";
+ readonly tokenURL: "https://discord.com/api/v8/oauth2/token";
+ /**
+ * See https://tools.ietf.org/html/rfc7009
+ */
+ readonly tokenRevocationURL: "https://discord.com/api/v8/oauth2/token/revoke";
+};
+//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/index.d.ts.map b/node_modules/discord-api-types/rest/v8/index.d.ts.map
new file mode 100644
index 0000000..d3f6df4
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,cAAc,WAAW,CAAC;AAE1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAE1B,eAAO,MAAM,UAAU,MAAM,CAAC;AAE9B,eAAO,MAAM,MAAM;IAClB;;;OAGG;2BACoB,SAAS;IAIhC;;;;;OAKG;uBACgB,SAAS;IAI5B;;;;OAIG;+BACwB,SAAS;IAIpC;;;;;OAKG;8BACuB,SAAS,aAAa,SAAS;IAIzD;;;OAGG;uCACgC,SAAS,aAAa,SAAS;IAIlE;;;;;;OAMG;yCACkC,SAAS,aAAa,SAAS,SAAS,MAAM;IAInF;;;;;OAKG;0CACmC,SAAS,aAAa,SAAS,SAAS,MAAM,UAAU,SAAS;IAIvG;;;;;;OAMG;sCAC+B,SAAS,aAAa,SAAS,SAAS,MAAM;IAIhF;;;OAGG;0CACmC,SAAS,aAAa,SAAS;IAIrE;;;OAGG;iCAC0B,SAAS;IAItC;;;;OAIG;iCAC0B,SAAS,eAAe,SAAS;IAI9D;;;;OAIG;8BACuB,SAAS;IAInC;;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end of file
diff --git a/node_modules/discord-api-types/rest/v8/index.js b/node_modules/discord-api-types/rest/v8/index.js
new file mode 100644
index 0000000..dd3cb52
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/index.js
@@ -0,0 +1,728 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OAuth2Routes = exports.RouteBases = exports.Routes = exports.APIVersion = void 0;
+__exportStar(require("../common"), exports);
+__exportStar(require("./auditLog"), exports);
+__exportStar(require("./channel"), exports);
+__exportStar(require("./emoji"), exports);
+__exportStar(require("./gateway"), exports);
+__exportStar(require("./guild"), exports);
+__exportStar(require("./guildScheduledEvent"), exports);
+__exportStar(require("./interactions"), exports);
+__exportStar(require("./invite"), exports);
+__exportStar(require("./oauth2"), exports);
+__exportStar(require("./stageInstance"), exports);
+__exportStar(require("./sticker"), exports);
+__exportStar(require("./template"), exports);
+__exportStar(require("./user"), exports);
+__exportStar(require("./voice"), exports);
+__exportStar(require("./webhook"), exports);
+exports.APIVersion = '8';
+exports.Routes = {
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/audit-logs`
+ */
+ guildAuditLog(guildId) {
+ return `/guilds/${guildId}/audit-logs`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}`
+ * - PATCH `/channels/{channel.id}`
+ * - DELETE `/channels/{channel.id}`
+ */
+ channel(channelId) {
+ return `/channels/${channelId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages`
+ * - POST `/channels/{channel.id}/messages`
+ */
+ channelMessages(channelId) {
+ return `/channels/${channelId}/messages`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages/{message.id}`
+ * - PATCH `/channels/{channel.id}/messages/{message.id}`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}`
+ */
+ channelMessage(channelId, messageId) {
+ return `/channels/${channelId}/messages/${messageId}`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/messages/{message.id}/crosspost`
+ */
+ channelMessageCrosspost(channelId, messageId) {
+ return `/channels/${channelId}/messages/${messageId}/crosspost`;
+ },
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageOwnReaction(channelId, messageId, emoji) {
+ return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}/@me`;
+ },
+ /**
+ * Route for:
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/{user.id}`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageUserReaction(channelId, messageId, emoji, userId) {
+ return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageReaction(channelId, messageId, emoji) {
+ return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}`;
+ },
+ /**
+ * Route for:
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions`
+ */
+ channelMessageAllReactions(channelId, messageId) {
+ return `/channels/${channelId}/messages/${messageId}/reactions`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/messages/bulk-delete`
+ */
+ channelBulkDelete(channelId) {
+ return `/channels/${channelId}/messages/bulk-delete`;
+ },
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/permissions/{overwrite.id}`
+ * - DELETE `/channels/{channel.id}/permissions/{overwrite.id}`
+ */
+ channelPermission(channelId, overwriteId) {
+ return `/channels/${channelId}/permissions/${overwriteId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/invites`
+ * - POST `/channels/{channel.id}/invites`
+ */
+ channelInvites(channelId) {
+ return `/channels/${channelId}/invites`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/followers`
+ */
+ channelFollowers(channelId) {
+ return `/channels/${channelId}/followers`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/typing`
+ */
+ channelTyping(channelId) {
+ return `/channels/${channelId}/typing`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/pins`
+ */
+ channelPins(channelId) {
+ return `/channels/${channelId}/pins`;
+ },
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/pins/{message.id}`
+ * - DELETE `/channels/{channel.id}/pins/{message.id}`
+ */
+ channelPin(channelId, messageId) {
+ return `/channels/${channelId}/pins/${messageId}`;
+ },
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/recipients/{user.id}`
+ * - DELETE `/channels/{channel.id}/recipients/{user.id}`
+ */
+ channelRecipient(channelId, userId) {
+ return `/channels/${channelId}/recipients/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/emojis`
+ * - POST `/guilds/{guild.id}/emojis`
+ */
+ guildEmojis(guildId) {
+ return `/guilds/${guildId}/emojis`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/emojis/{emoji.id}`
+ * - PATCH `/guilds/{guild.id}/emojis/{emoji.id}`
+ * - DELETE `/guilds/{guild.id}/emojis/{emoji.id}`
+ */
+ guildEmoji(guildId, emojiId) {
+ return `/guilds/${guildId}/emojis/${emojiId}`;
+ },
+ /**
+ * Route for:
+ * - POST `/guilds`
+ */
+ guilds() {
+ return '/guilds';
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}`
+ * - PATCH `/guilds/{guild.id}`
+ * - DELETE `/guilds/{guild.id}`
+ */
+ guild(guildId) {
+ return `/guilds/${guildId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/preview`
+ */
+ guildPreview(guildId) {
+ return `/guilds/${guildId}/preview`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/channels`
+ * - POST `/guilds/{guild.id}/channels`
+ * - PATCH `/guilds/{guild.id}/channels`
+ */
+ guildChannels(guildId) {
+ return `/guilds/${guildId}/channels`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members/{user.id}`
+ * - PUT `/guilds/{guild.id}/members/{user.id}`
+ * - PATCH `/guilds/{guild.id}/members/@me`
+ * - PATCH `/guilds/{guild.id}/members/{user.id}`
+ * - DELETE `/guilds/{guild.id}/members/{user.id}`
+ */
+ guildMember(guildId, userId = '@me') {
+ return `/guilds/${guildId}/members/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members`
+ */
+ guildMembers(guildId) {
+ return `/guilds/${guildId}/members`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members/search`
+ */
+ guildMembersSearch(guildId) {
+ return `/guilds/${guildId}/members/search`;
+ },
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/members/@me/nick`
+ *
+ * @deprecated Use {@link Routes.guildMember} instead.
+ */
+ guildCurrentMemberNickname(guildId) {
+ return `/guilds/${guildId}/members/@me/nick`;
+ },
+ /**
+ * Route for:
+ * - PUT `/guilds/{guild.id}/members/{user.id}/roles/{role.id}`
+ * - DELETE `/guilds/{guild.id}/members/{user.id}/roles/{role.id}`
+ */
+ guildMemberRole(guildId, memberId, roleId) {
+ return `/guilds/${guildId}/members/${memberId}/roles/${roleId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/bans`
+ */
+ guildBans(guildId) {
+ return `/guilds/${guildId}/bans`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/bans/{user.id}`
+ * - PUT `/guilds/{guild.id}/bans/{user.id}`
+ * - DELETE `/guilds/{guild.id}/bans/{user.id}`
+ */
+ guildBan(guildId, userId) {
+ return `/guilds/${guildId}/bans/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/roles`
+ * - POST `/guilds/{guild.id}/roles`
+ * - PATCH `/guilds/{guild.id}/roles`
+ */
+ guildRoles(guildId) {
+ return `/guilds/${guildId}/roles`;
+ },
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/roles/{role.id}`
+ * - DELETE `/guilds/{guild.id}/roles/{role.id}`
+ */
+ guildRole(guildId, roleId) {
+ return `/guilds/${guildId}/roles/${roleId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/prune`
+ * - POST `/guilds/{guild.id}/prune`
+ */
+ guildPrune(guildId) {
+ return `/guilds/${guildId}/prune`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/regions`
+ */
+ guildVoiceRegions(guildId) {
+ return `/guilds/${guildId}/regions`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/invites`
+ */
+ guildInvites(guildId) {
+ return `/guilds/${guildId}/invites`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/integrations`
+ */
+ guildIntegrations(guildId) {
+ return `/guilds/${guildId}/integrations`;
+ },
+ /**
+ * Route for:
+ * - DELETE `/guilds/{guild.id}/integrations/{integration.id}`
+ */
+ guildIntegration(guildId, integrationId) {
+ return `/guilds/${guildId}/integrations/${integrationId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget`
+ * - PATCH `/guilds/{guild.id}/widget`
+ */
+ guildWidgetSettings(guildId) {
+ return `/guilds/${guildId}/widget`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget.json`
+ */
+ guildWidgetJSON(guildId) {
+ return `/guilds/${guildId}/widget.json`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/vanity-url`
+ */
+ guildVanityUrl(guildId) {
+ return `/guilds/${guildId}/vanity-url`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget.png`
+ */
+ guildWidgetImage(guildId) {
+ return `/guilds/${guildId}/widget.png`;
+ },
+ /**
+ * Route for:
+ * - GET `/invites/{invite.code}`
+ * - DELETE `/invites/{invite.code}`
+ */
+ invite(code) {
+ return `/invites/${code}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/templates/{template.code}`
+ * - POST `/guilds/templates/{template.code}`
+ */
+ template(code) {
+ return `/guilds/templates/${code}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/templates`
+ * - POST `/guilds/{guild.id}/templates`
+ */
+ guildTemplates(guildId) {
+ return `/guilds/${guildId}/templates`;
+ },
+ /**
+ * Route for:
+ * - PUT `/guilds/{guild.id}/templates/{template.code}`
+ * - PATCH `/guilds/{guild.id}/templates/{template.code}`
+ * - DELETE `/guilds/{guild.id}/templates/{template.code}`
+ */
+ guildTemplate(guildId, code) {
+ return `/guilds/${guildId}/templates/${code}`;
+ },
+ /**
+ * Route for:
+ * - GET `/users/@me`
+ * - GET `/users/{user.id}`
+ * - PATCH `/users/@me`
+ *
+ * @param [userId] The user ID, defaulted to `@me`
+ */
+ user(userId = '@me') {
+ return `/users/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/users/@me/guilds`
+ */
+ userGuilds() {
+ return `/users/@me/guilds`;
+ },
+ /**
+ * Route for:
+ * - GET `/users/@me/guilds/{guild.id}/member`
+ */
+ userGuildMember(guildId) {
+ return `/users/@me/guilds/${guildId}/member`;
+ },
+ /**
+ * Route for:
+ * - DELETE `/users/@me/guilds/{guild.id}`
+ */
+ userGuild(guildId) {
+ return `/users/@me/guilds/${guildId}`;
+ },
+ /**
+ * Route for:
+ * - POST `/users/@me/channels`
+ */
+ userChannels() {
+ return `/users/@me/channels`;
+ },
+ /**
+ * Route for:
+ * - GET `/users/@me/connections`
+ */
+ userConnections() {
+ return `/users/@me/connections`;
+ },
+ /**
+ * Route for:
+ * - GET `/voice/regions`
+ */
+ voiceRegions() {
+ return `/voice/regions`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/webhooks`
+ * - POST `/channels/{channel.id}/webhooks`
+ */
+ channelWebhooks(channelId) {
+ return `/channels/${channelId}/webhooks`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/webhooks`
+ */
+ guildWebhooks(guildId) {
+ return `/guilds/${guildId}/webhooks`;
+ },
+ /**
+ * Route for:
+ * - GET `/webhooks/{webhook.id}`
+ * - GET `/webhooks/{webhook.id}/{webhook.token}`
+ * - PATCH `/webhooks/{webhook.id}`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}`
+ * - DELETE `/webhooks/{webhook.id}`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}`
+ * - POST `/webhooks/{webhook.id}/{webhook.token}`
+ *
+ * - POST `/webhooks/{application.id}/{interaction.token}`
+ */
+ webhook(webhookId, webhookToken) {
+ const parts = ['', 'webhooks', webhookId];
+ if (webhookToken)
+ parts.push(webhookToken);
+ return parts.join('/');
+ },
+ /**
+ * Route for:
+ * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ *
+ * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/@original`
+ * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/{message.id}`
+ * - DELETE `/webhooks/{application.id}/{interaction.token}/messages/{message.id}`
+ */
+ webhookMessage(webhookId, webhookToken, messageId = '@original') {
+ return `/webhooks/${webhookId}/${webhookToken}/messages/${messageId}`;
+ },
+ /**
+ * Route for:
+ * - POST `/webhooks/{webhook.id}/{webhook.token}/github`
+ * - POST `/webhooks/{webhook.id}/{webhook.token}/slack`
+ */
+ webhookPlatform(webhookId, webhookToken, platform) {
+ return `/webhooks/${webhookId}/${webhookToken}/${platform}`;
+ },
+ /**
+ * Route for:
+ * - GET `/gateway`
+ */
+ gateway() {
+ return `/gateway`;
+ },
+ /**
+ * Route for:
+ * - GET `/gateway/bot`
+ */
+ gatewayBot() {
+ return `/gateway/bot`;
+ },
+ /**
+ * Route for:
+ * - GET `/oauth2/applications/@me`
+ */
+ oauth2CurrentApplication() {
+ return `/oauth2/applications/@me`;
+ },
+ /**
+ * Route for:
+ * - GET `/oauth2/@me`
+ */
+ oauth2CurrentAuthorization() {
+ return `/oauth2/@me`;
+ },
+ /**
+ * Route for:
+ * - GET `/oauth2/authorize`
+ */
+ oauth2Authorization() {
+ return `/oauth2/authorize`;
+ },
+ /**
+ * Route for:
+ * - POST `/oauth2/token`
+ */
+ oauth2TokenExchange() {
+ return `/oauth2/token`;
+ },
+ /**
+ * Route for:
+ * - POST `/oauth2/token/revoke`
+ */
+ oauth2TokenRevocation() {
+ return `/oauth2/token/revoke`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/commands`
+ * - PUT `/applications/{application.id}/commands`
+ * - POST `/applications/{application.id}/commands`
+ */
+ applicationCommands(applicationId) {
+ return `/applications/${applicationId}/commands`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/commands/{command.id}`
+ * - PATCH `/applications/{application.id}/commands/{command.id}`
+ * - DELETE `/applications/{application.id}/commands/{command.id}`
+ */
+ applicationCommand(applicationId, commandId) {
+ return `/applications/${applicationId}/commands/${commandId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands`
+ * - POST `/applications/{application.id}/guilds/{guild.id}/commands`
+ */
+ applicationGuildCommands(applicationId, guildId) {
+ return `/applications/${applicationId}/guilds/${guildId}/commands`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ * - PATCH `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ * - DELETE `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ */
+ applicationGuildCommand(applicationId, guildId, commandId) {
+ return `/applications/${applicationId}/guilds/${guildId}/commands/${commandId}`;
+ },
+ /**
+ * Route for:
+ * - POST `/interactions/{interaction.id}/{interaction.token}/callback`
+ */
+ interactionCallback(interactionId, interactionToken) {
+ return `/interactions/${interactionId}/${interactionToken}/callback`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/member-verification`
+ * - PATCH `/guilds/{guild.id}/member-verification`
+ */
+ guildMemberVerification(guildId) {
+ return `/guilds/${guildId}/member-verification`;
+ },
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/voice-states/@me`
+ * - PATCH `/guilds/{guild.id}/voice-states/{user.id}`
+ */
+ guildVoiceState(guildId, userId = '@me') {
+ return `/guilds/${guildId}/voice-states/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/permissions`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/permissions`
+ */
+ guildApplicationCommandsPermissions(applicationId, guildId) {
+ return `/applications/${applicationId}/guilds/${guildId}/commands/permissions`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions`
+ */
+ applicationCommandPermissions(applicationId, guildId, commandId) {
+ return `/applications/${applicationId}/guilds/${guildId}/commands/${commandId}/permissions`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/welcome-screen`
+ * - PATCH `/guilds/{guild.id}/welcome-screen`
+ */
+ guildWelcomeScreen(guildId) {
+ return `/guilds/${guildId}/welcome-screen`;
+ },
+ /**
+ * Route for:
+ * - POST `/stage-instances`
+ */
+ stageInstances() {
+ return `/stage-instances`;
+ },
+ /**
+ * Route for:
+ * - GET `/stage-instances/{channel.id}`
+ * - PATCH `/stage-instances/{channel.id}`
+ * - DELETE `/stage-instances/{channel.id}`
+ */
+ stageInstance(channelId) {
+ return `/stage-instances/${channelId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/stickers/{sticker.id}`
+ */
+ sticker(stickerId) {
+ return `/stickers/${stickerId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/sticker-packs`
+ */
+ nitroStickerPacks() {
+ return '/sticker-packs';
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/stickers`
+ * - POST `/guilds/{guild.id}/stickers`
+ */
+ guildStickers(guildId) {
+ return `/guilds/${guildId}/stickers`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/stickers/{sticker.id}`
+ * - PATCH `/guilds/{guild.id}/stickers/{sticker.id}`
+ * - DELETE `/guilds/{guild.id}/stickers/{sticker.id}`
+ */
+ guildSticker(guildId, stickerId) {
+ return `/guilds/${guildId}/stickers/${stickerId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events`
+ * - POST `/guilds/{guild.id}/scheduled-events`
+ */
+ guildScheduledEvents(guildId) {
+ return `/guilds/${guildId}/scheduled-events`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ * - PATCH `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ * - DELETE `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ */
+ guildScheduledEvent(guildId, guildScheduledEventId) {
+ return `/guilds/${guildId}/scheduled-events/${guildScheduledEventId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}/users`
+ */
+ guildScheduledEventUsers(guildId, guildScheduledEventId) {
+ return `/guilds/${guildId}/scheduled-events/${guildScheduledEventId}/users`;
+ },
+};
+exports.RouteBases = {
+ api: `https://discord.com/api/v${exports.APIVersion}`,
+ cdn: 'https://cdn.discordapp.com',
+ invite: 'https://discord.gg',
+ template: 'https://discord.new',
+ gift: 'https://discord.gift',
+ scheduledEvent: 'https://discord.com/events',
+};
+// Freeze bases object
+Object.freeze(exports.RouteBases);
+exports.OAuth2Routes = {
+ authorizationURL: `${exports.RouteBases.api}${exports.Routes.oauth2Authorization()}`,
+ tokenURL: `${exports.RouteBases.api}${exports.Routes.oauth2TokenExchange()}`,
+ /**
+ * See https://tools.ietf.org/html/rfc7009
+ */
+ tokenRevocationURL: `${exports.RouteBases.api}${exports.Routes.oauth2TokenRevocation()}`,
+};
+// Freeze OAuth2 route object
+Object.freeze(exports.OAuth2Routes);
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/index.js.map b/node_modules/discord-api-types/rest/v8/index.js.map
new file mode 100644
index 0000000..a295fa9
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,4CAA0B;AAE1B,6CAA2B;AAC3B,4CAA0B;AAC1B,0CAAwB;AACxB,4CAA0B;AAC1B,0CAAwB;AACxB,wDAAsC;AACtC,iDAA+B;AAC/B,2CAAyB;AACzB,2CAAyB;AACzB,kDAAgC;AAChC,4CAA0B;AAC1B,6CAA2B;AAC3B,yCAAuB;AACv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AAC;AAEb,QAAA,YAAY,GAAG;IAC3B,gBAAgB,EAAE,GAAG,kBAAU,CAAC,GAAG,GAAG,cAAM,CAAC,mBAAmB,EAAE,EAAE;IACpE,QAAQ,EAAE,GAAG,kBAAU,CAAC,GAAG,GAAG,cAAM,CAAC,mBAAmB,EAAE,EAAE;IAC5D;;OAEG;IACH,kBAAkB,EAAE,GAAG,kBAAU,CAAC,GAAG,GAAG,cAAM,CAAC,qBAAqB,EAAE,EAAE;CAC/D,CAAC;AAEX,6BAA6B;AAC7B,MAAM,CAAC,MAAM,CAAC,oBAAY,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/index.mjs b/node_modules/discord-api-types/rest/v8/index.mjs
new file mode 100644
index 0000000..dbc83a5
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/index.mjs
@@ -0,0 +1,9 @@
+import mod from "./index.js";
+
+export default mod;
+export const APIVersion = mod.APIVersion;
+export const Locale = mod.Locale;
+export const OAuth2Routes = mod.OAuth2Routes;
+export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes;
+export const RouteBases = mod.RouteBases;
+export const Routes = mod.Routes;
diff --git a/node_modules/discord-api-types/rest/v8/interactions.d.ts b/node_modules/discord-api-types/rest/v8/interactions.d.ts
new file mode 100644
index 0000000..e8e4aba
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/interactions.d.ts
@@ -0,0 +1,257 @@
+import type { APIApplicationCommand, APIApplicationCommandPermission, APIGuildApplicationCommandPermissions, APIInteractionResponse, APIInteractionResponseCallbackData, ApplicationCommandType } from '../../payloads/v8/index';
+import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';
+import type { RESTDeleteAPIWebhookWithTokenMessageResult, RESTGetAPIWebhookWithTokenMessageResult, RESTPatchAPIWebhookWithTokenMessageFormDataBody, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageResult, RESTPostAPIWebhookWithTokenWaitResult } from './webhook';
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-global-application-command
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIApplicationCommandResult = APIApplicationCommand;
+type RESTPostAPIBaseApplicationCommandsJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Omit<APIApplicationCommand, 'id' | 'application_id' | 'description' | 'type' | 'version' | 'guild_id'>>;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIChatInputApplicationCommandsJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody {
+ type?: ApplicationCommandType.ChatInput | undefined;
+ description: string;
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIContextMenuApplicationCommandsJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody {
+ type: ApplicationCommandType.User | ApplicationCommandType.Message;
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIApplicationCommandsJSONBody = RESTPostAPIChatInputApplicationCommandsJSONBody | RESTPostAPIContextMenuApplicationCommandsJSONBody;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIApplicationCommandsResult = APIApplicationCommand;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIApplicationCommandJSONBody = StrictPartial<RESTPostAPIApplicationCommandsJSONBody>;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIApplicationCommandResult = APIApplicationCommand;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPutAPIApplicationCommandsJSONBody = RESTPostAPIApplicationCommandsJSONBody[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPutAPIApplicationCommandsResult = APIApplicationCommand[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIApplicationGuildCommandsResult = APIApplicationCommand[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIApplicationGuildCommandResult = APIApplicationCommand;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIApplicationGuildCommandsJSONBody = RESTPostAPIApplicationCommandsJSONBody;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIApplicationGuildCommandsResult = APIApplicationCommand;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIApplicationGuildCommandJSONBody = StrictPartial<RESTPostAPIApplicationCommandsJSONBody>;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIApplicationGuildCommandResult = APIApplicationCommand;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPutAPIApplicationGuildCommandsJSONBody = RESTPostAPIApplicationCommandsJSONBody[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPutAPIApplicationGuildCommandsResult = APIApplicationCommand[];
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIInteractionCallbackJSONBody = APIInteractionResponse;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIInteractionCallbackFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPostAPIInteractionCallbackJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIInteractionOriginalResponseResult = RESTGetAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIInteractionOriginalResponseJSONBody = RESTPatchAPIWebhookWithTokenMessageJSONBody;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIInteractionOriginalResponseFormDataBody = RESTPatchAPIWebhookWithTokenMessageFormDataBody;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIInteractionOriginalResponseResult = RESTPatchAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#delete-original-interaction-response
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIInteractionOriginalResponseResult = RESTDeleteAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIInteractionFollowupJSONBody = APIInteractionResponseCallbackData;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIInteractionFollowupFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPostAPIInteractionFollowupJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIInteractionFollowupResult = RESTPostAPIWebhookWithTokenWaitResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIInteractionFollowupResult = RESTGetAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIInteractionFollowupJSONBody = RESTPatchAPIWebhookWithTokenMessageJSONBody;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIInteractionFollowupFormDataBody = RESTPatchAPIWebhookWithTokenMessageFormDataBody;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIInteractionFollowupResult = RESTPatchAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#delete-followup-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIInteractionFollowupResult = RESTDeleteAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildApplicationCommandsPermissionsResult = APIGuildApplicationCommandPermissions[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIApplicationCommandPermissionsResult = APIGuildApplicationCommandPermissions;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPutAPIApplicationCommandPermissionsJSONBody {
+ permissions: APIApplicationCommandPermission[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPutAPIApplicationCommandPermissionsResult = APIGuildApplicationCommandPermissions;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPutAPIGuildApplicationCommandsPermissionsJSONBody = Pick<APIGuildApplicationCommandPermissions, 'id' | 'permissions'>[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPutAPIGuildApplicationCommandsPermissionsResult = APIGuildApplicationCommandPermissions[];
+export {};
+//# sourceMappingURL=interactions.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/interactions.d.ts.map b/node_modules/discord-api-types/rest/v8/interactions.d.ts.map
new file mode 100644
index 0000000..23e03fa
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/interactions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,qBAAqB,EACrB,+BAA+B,EAC/B,qCAAqC,EACrC,sBAAsB,EACtB,kCAAkC,EAClC,sBAAsB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,oDAAoD,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACjH,OAAO,KAAK,EACX,0CAA0C,EAC1C,uCAAuC,EACvC,+CAA+C,EAC/C,2CAA2C,EAC3C,yCAAyC,EACzC,qCAAqC,EACrC,MAAM,WAAW,CAAC;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AE,OAAO,CAAC,CAAC,CAAC;AAElF;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAAG,qCAAqC,CAAC;AAEzF;;;;GAIG;AACH,MAAM,MAAM,mCAAmC,GAAG,uCAAuC,CAAC;AAE1F;;;;GAIG;AACH,MAAM,MAAM,uCAAuC,GAAG,2CAA2C,CAAC;AAElG;;;;GAIG;AACH,MAAM,MAAM,2CAA2C,GAAG,+CAA+C,CAAC;AAE1G;;;;GAIG;AACH,MAAM,MAAM,qCAAqC,GAAG,yCAAyC,CAAC;AAE9F;;;;GAIG;AACH,MAAM,MAAM,sCAAsC,GAAG,0CAA0C,CAAC;AAEhG;;;;GAIG;AACH,MAAM,MAAM,mDAAmD,GAAG,qCAAqC,EAAE,CAAC;AAE1G;;;;GAIG;AACH,MAAM,MAAM,6CAA6C,GAAG,qCAAqC,CAAC;AAElG;;;;GAIG;AACH,MAAM,WAAW,+CAA+C;IAC/D,WAAW,EAAE,+BAA+B,EAAE,CAAC;CAC/C;AAED;;;;GAIG;AACH,MAAM,MAAM,6CAA6C,GAAG,qCAAqC,CAAC;AAElG;;;;GAIG;AACH,MAAM,MAAM,qDAAqD,GAAG,IAAI,CACvE,qCAAqC,EACrC,IAAI,GAAG,aAAa,CACpB,EAAE,CAAC;AAEJ;;;;GAIG;AACH,MAAM,MAAM,mDAAmD,GAAG,qCAAqC,EAAE,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/interactions.js b/node_modules/discord-api-types/rest/v8/interactions.js
new file mode 100644
index 0000000..bcad473
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/interactions.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=interactions.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/interactions.js.map b/node_modules/discord-api-types/rest/v8/interactions.js.map
new file mode 100644
index 0000000..e322b3c
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/interactions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"interactions.js","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/invite.d.ts b/node_modules/discord-api-types/rest/v8/invite.d.ts
new file mode 100644
index 0000000..f8ba50e
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/invite.d.ts
@@ -0,0 +1,32 @@
+import type { Snowflake } from '../../globals';
+import type { APIInvite } from '../../payloads/v8/index';
+/**
+ * https://discord.com/developers/docs/resources/invite#get-invite
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTGetAPIInviteQuery {
+ /**
+ * Whether the invite should contain approximate member counts
+ */
+ with_counts?: boolean;
+ /**
+ * Whether the invite should contain the expiration date
+ */
+ with_expiration?: boolean;
+ /**
+ * The guild scheduled event to include with the invite
+ */
+ guild_scheduled_event_id?: Snowflake;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIInviteResult = APIInvite;
+/**
+ * https://discord.com/developers/docs/resources/invite#delete-invite
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIInviteResult = APIInvite;
+//# sourceMappingURL=invite.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/invite.d.ts.map b/node_modules/discord-api-types/rest/v8/invite.d.ts.map
new file mode 100644
index 0000000..0b47f6d
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/invite.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,wBAAwB,CAAC,EAAE,SAAS,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC;AAE/C;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/invite.js b/node_modules/discord-api-types/rest/v8/invite.js
new file mode 100644
index 0000000..2c05370
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/invite.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=invite.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/invite.js.map b/node_modules/discord-api-types/rest/v8/invite.js.map
new file mode 100644
index 0000000..8fa96d6
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/invite.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"invite.js","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/oauth2.d.ts b/node_modules/discord-api-types/rest/v8/oauth2.d.ts
new file mode 100644
index 0000000..fafe2ff
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/oauth2.d.ts
@@ -0,0 +1,213 @@
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from '../../payloads/v8/index';
+/**
+ * https://discord.com/developers/docs/topics/oauth2#get-current-application-information
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIOAuth2CurrentApplicationResult = Omit<APIApplication, 'flags'>;
+/**
+ * https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTGetAPIOAuth2CurrentAuthorizationResult {
+ /**
+ * the current application
+ */
+ application: Partial<APIApplication>;
+ /**
+ * the scopes the user has authorized the application for
+ */
+ scopes: OAuth2Scopes[];
+ /**
+ * when the access token expires
+ */
+ expires: string;
+ /**
+ * the user who has authorized, if the user has authorized with the `identify` scope
+ */
+ user?: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTOAuth2AuthorizationQuery {
+ response_type: 'code';
+ client_id: Snowflake;
+ scope: string;
+ redirect_uri?: string;
+ state?: string;
+ prompt?: 'consent' | 'none';
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTOAuth2AuthorizationQueryResult {
+ code: string;
+ state?: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostOAuth2AccessTokenURLEncodedData {
+ client_id: Snowflake;
+ client_secret: string;
+ grant_type: 'authorization_code';
+ code: string;
+ redirect_uri?: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-access-token-response
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostOAuth2AccessTokenResult {
+ access_token: string;
+ token_type: string;
+ expires_in: number;
+ refresh_token: string;
+ scope: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-refresh-token-exchange-example
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostOAuth2RefreshTokenURLEncodedData {
+ client_id: Snowflake;
+ client_secret: string;
+ grant_type: 'refresh_token';
+ refresh_token: string;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostOAuth2RefreshTokenResult = RESTPostOAuth2AccessTokenResult;
+/**
+ * https://discord.com/developers/docs/topics/oauth2#implicit-grant
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTOAuth2ImplicitAuthorizationQuery {
+ response_type: 'token';
+ client_id: Snowflake;
+ scope: string;
+ redirect_uri?: string;
+ state?: string;
+ prompt?: 'consent' | 'none';
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#implicit-grant-redirect-url-example
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTOAuth2ImplicitAuthorizationURLFragmentResult = Omit<RESTPostOAuth2AccessTokenResult, 'refresh_token'>;
+/**
+ * https://discord.com/developers/docs/topics/oauth2#client-credentials-grant
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostOAuth2ClientCredentialsURLEncodedData {
+ grant_type: 'client_credentials';
+ scope: string;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostOAuth2ClientCredentialsResult = RESTOAuth2ImplicitAuthorizationURLFragmentResult;
+/**
+ * https://discord.com/developers/docs/topics/oauth2#bot-authorization-flow-bot-auth-parameters
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTOAuth2BotAuthorizationQuery {
+ /**
+ * Your app's client id
+ */
+ client_id: Snowflake;
+ /**
+ * Needs to include bot for the bot flow
+ */
+ scope: OAuth2Scopes.Bot | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}` | `${OAuth2Scopes.Bot}${' ' | '%20'}${string}` | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}${string}${' ' | '%20'}`;
+ /**
+ * The permissions you're requesting
+ *
+ * See https://discord.com/developers/docs/topics/permissions
+ */
+ permissions?: Permissions;
+ /**
+ * Pre-fills the dropdown picker with a guild for the user
+ */
+ guild_id?: Snowflake;
+ /**
+ * `true` or `false`—disallows the user from changing the guild dropdown
+ */
+ disable_guild_select?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTOAuth2AdvancedBotAuthorizationQuery {
+ client_id: Snowflake;
+ /**
+ * This assumes you include the `bot` scope alongside others (like `identify` for example)
+ */
+ scope: OAuth2Scopes.Bot | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}` | `${OAuth2Scopes.Bot}${' ' | '%20'}${string}` | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}${string}${' ' | '%20'}`;
+ /**
+ * The required permissions bitfield, stringified
+ */
+ permissions?: Permissions;
+ guild_id?: Snowflake;
+ disable_guild_select?: boolean;
+ response_type: string;
+ redirect_uri?: string;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTOAuth2AdvancedBotAuthorizationQueryResult {
+ code: string;
+ state?: string;
+ guild_id: Snowflake;
+ permissions: Permissions;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization-extended-bot-authorization-access-token-example
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult {
+ access_token: string;
+ token_type: string;
+ expires_in: number;
+ refresh_token: string;
+ scope: string;
+ guild: APIGuild;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#webhooks-webhook-token-response-example
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult {
+ access_token: string;
+ token_type: string;
+ expires_in: number;
+ refresh_token: string;
+ scope: string;
+ webhook: APIWebhook;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostOAuth2AccessTokenWithBotAndGuildsAndWebhookIncomingScopeResult = RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult & RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult;
+//# sourceMappingURL=oauth2.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/oauth2.d.ts.map b/node_modules/discord-api-types/rest/v8/oauth2.d.ts.map
new file mode 100644
index 0000000..f8192df
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/oauth2.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE3G;;;;GAIG;AACH,MAAM,MAAM,wCAAwC,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AAErF;;;;GAIG;AACH,MAAM,WAAW,0CAA0C;IAC1D;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IACrC;;OAEG;IACH,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC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,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,oDAAoD;IACpE,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,QAAQ,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,6DAA6D;IAC7E,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,UAAU,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,sEAAsE,GACjF,oDAAoD,GAAG,6DAA6D,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/oauth2.js b/node_modules/discord-api-types/rest/v8/oauth2.js
new file mode 100644
index 0000000..6508265
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/oauth2.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=oauth2.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/oauth2.js.map b/node_modules/discord-api-types/rest/v8/oauth2.js.map
new file mode 100644
index 0000000..55386d8
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/oauth2.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"oauth2.js","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/stageInstance.d.ts b/node_modules/discord-api-types/rest/v8/stageInstance.d.ts
new file mode 100644
index 0000000..9fc524a
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/stageInstance.d.ts
@@ -0,0 +1,63 @@
+import type { Snowflake } from '../../globals';
+import type { APIStageInstance, StageInstancePrivacyLevel } from '../../payloads/v8/index';
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#create-stage-instance
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIStageInstanceJSONBody {
+ /**
+ * The id of the stage channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The topic of the stage instance (1-120 characters)
+ */
+ topic: string;
+ /**
+ * The privacy level of the stage instance
+ *
+ * @default GuildOnly
+ */
+ privacy_level?: StageInstancePrivacyLevel | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#create-stage-instance
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIStageInstanceResult = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#get-stage-instance
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIStageInstanceResult = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#update-stage-instance
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPatchAPIStageInstanceJSONBody {
+ /**
+ * The topic of the stage instance (1-120 characters)
+ */
+ topic?: string | undefined;
+ /**
+ * The privacy level of the stage instance
+ */
+ privacy_level?: StageInstancePrivacyLevel | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#update-stage-instance
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIStageInstanceResult = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#delete-stage-instance
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIStageInstanceResult = never;
+//# sourceMappingURL=stageInstance.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/stageInstance.d.ts.map b/node_modules/discord-api-types/rest/v8/stageInstance.d.ts.map
new file mode 100644
index 0000000..69e209d
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/stageInstance.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"stageInstance.d.ts","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAE3F;;;;GAIG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;CACtD;AAED;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,CAAC;AAE9D;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAE7D;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,aAAa,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;CACtD;AAED;;;;GAIG;AACH,MAAM,MAAM,+BAA+B,GAAG,gBAAgB,CAAC;AAE/D;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,GAAG,KAAK,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/stageInstance.js b/node_modules/discord-api-types/rest/v8/stageInstance.js
new file mode 100644
index 0000000..9938b4c
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/stageInstance.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=stageInstance.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/stageInstance.js.map b/node_modules/discord-api-types/rest/v8/stageInstance.js.map
new file mode 100644
index 0000000..0d87730
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/stageInstance.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"stageInstance.js","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/sticker.d.ts b/node_modules/discord-api-types/rest/v8/sticker.d.ts
new file mode 100644
index 0000000..179ac26
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/sticker.d.ts
@@ -0,0 +1,70 @@
+import type { APISticker, APIStickerPack } from '../../payloads/v8/index';
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIStickerResult = APISticker;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTGetNitroStickerPacksResult {
+ sticker_packs: APIStickerPack[];
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildStickersResult = APISticker[];
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildStickerResult = APISticker;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIGuildStickerFormDataBody {
+ /**
+ * Name of the sticker (2-30 characters)
+ */
+ name: string;
+ /**
+ * Description of the sticker (empty or 2-100 characters)
+ */
+ description: string;
+ /**
+ * The Discord name of a unicode emoji representing the sticker's expression (2-200 characters)
+ */
+ tags: string;
+ /**
+ * The sticker file to upload, must be a PNG, APNG, or Lottie JSON file, max 500 KB
+ */
+ file: unknown;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIGuildStickerResult = APISticker;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPatchAPIGuildStickerJSONBody {
+ /**
+ * Name of the sticker (2-30 characters)
+ */
+ name?: string | undefined;
+ /**
+ * Description of the sticker (2-100 characters)
+ */
+ description?: string | null | undefined;
+ /**
+ * The Discord name of a unicode emoji representing the sticker's expression (2-200 characters)
+ */
+ tags?: string | undefined;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIGuildStickerResult = APISticker;
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIGuildStickerResult = never;
+//# sourceMappingURL=sticker.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/sticker.d.ts.map b/node_modules/discord-api-types/rest/v8/sticker.d.ts.map
new file mode 100644
index 0000000..dfe0f09
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/sticker.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"sticker.d.ts","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C,aAAa,EAAE,cAAc,EAAE,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,UAAU,EAAE,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,UAAU,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,mCAAmC;IACnD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACd;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,UAAU,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,UAAU,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,KAAK,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/sticker.js b/node_modules/discord-api-types/rest/v8/sticker.js
new file mode 100644
index 0000000..b6a3125
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/sticker.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=sticker.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/sticker.js.map b/node_modules/discord-api-types/rest/v8/sticker.js.map
new file mode 100644
index 0000000..5c1346f
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/sticker.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"sticker.js","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/template.d.ts b/node_modules/discord-api-types/rest/v8/template.d.ts
new file mode 100644
index 0000000..b340a92
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/template.d.ts
@@ -0,0 +1,83 @@
+import type { APIGuild, APITemplate } from '../../payloads/v8/index';
+import type { StrictPartial } from '../../utils/internals';
+/**
+ * https://discord.com/developers/docs/resources/template#get-template
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPITemplateResult = APITemplate;
+/**
+ * https://discord.com/developers/docs/resources/template#create-guild-from-template
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPITemplateCreateGuildJSONBody {
+ /**
+ * Name of the guild (2-100 characters)
+ */
+ name: string;
+ /**
+ * base64 1024x1024 png/jpeg image for the guild icon
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ icon?: string | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/template#create-guild-from-template
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPITemplateCreateGuildResult = APIGuild;
+/**
+ * https://discord.com/developers/docs/resources/template#get-guild-templates
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildTemplatesResult = APITemplate[];
+/**
+ * https://discord.com/developers/docs/resources/template#create-guild-template
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIGuildTemplatesJSONBody {
+ /**
+ * Name of the template (1-100 characters)
+ */
+ name: string;
+ /**
+ * Description for the template (0-120 characters)
+ */
+ description?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/template#create-guild-template
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIGuildTemplatesResult = APITemplate;
+/**
+ * https://discord.com/developers/docs/resources/template#sync-guild-template
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPutAPIGuildTemplateSyncResult = APITemplate;
+/**
+ * https://discord.com/developers/docs/resources/template#modify-guild-template
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIGuildTemplateJSONBody = StrictPartial<RESTPostAPIGuildTemplatesJSONBody>;
+/**
+ * https://discord.com/developers/docs/resources/template#modify-guild-template
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIGuildTemplateResult = APITemplate;
+/**
+ * https://discord.com/developers/docs/resources/template#delete-guild-template
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIGuildTemplateResult = APITemplate;
+//# sourceMappingURL=template.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/template.d.ts.map b/node_modules/discord-api-types/rest/v8/template.d.ts.map
new file mode 100644
index 0000000..4bfdf93
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/template.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,sCAAsC;IACtD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAAG,QAAQ,CAAC;AAE5D;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GAAG,WAAW,EAAE,CAAC;AAE3D;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACxC;AAED;;;;GAIG;AACH,MAAM,MAAM,+BAA+B,GAAG,WAAW,CAAC;AAE1D;;;;GAIG;AACH,MAAM,MAAM,iCAAiC,GAAG,WAAW,CAAC;AAE5D;;;;GAIG;AACH,MAAM,MAAM,iCAAiC,GAAG,aAAa,CAAC,iCAAiC,CAAC,CAAC;AAEjG;;;;GAIG;AACH,MAAM,MAAM,+BAA+B,GAAG,WAAW,CAAC;AAE1D;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,GAAG,WAAW,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/template.js b/node_modules/discord-api-types/rest/v8/template.js
new file mode 100644
index 0000000..ea29227
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/template.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=template.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/template.js.map b/node_modules/discord-api-types/rest/v8/template.js.map
new file mode 100644
index 0000000..8cacb36
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/template.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"template.js","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/user.d.ts b/node_modules/discord-api-types/rest/v8/user.d.ts
new file mode 100644
index 0000000..1e80649
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/user.d.ts
@@ -0,0 +1,109 @@
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIChannel, APIConnection, APIGuildMember, APIUser, GuildFeature } from '../../payloads/v8/index';
+/**
+ * https://discord.com/developers/docs/resources/user#get-current-user
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPICurrentUserResult = APIUser;
+/**
+ * https://discord.com/developers/docs/resources/user#get-user
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIUserResult = APIUser;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-current-user-guild-member
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetCurrentUserGuildMemberResult = APIGuildMember;
+/**
+ * https://discord.com/developers/docs/resources/user#modify-current-user
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPatchAPICurrentUserJSONBody {
+ /**
+ * User's username, if changed may cause the user's discriminator to be randomized
+ */
+ username?: string | undefined;
+ /**
+ * If passed, modifies the user's avatar
+ */
+ avatar?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/user#modify-current-user
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPICurrentUserResult = APIUser;
+/**
+ * https://discord.com/developers/docs/resources/user#get-current-user-guilds
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTGetAPICurrentUserGuildsQuery {
+ /**
+ * Get guilds before this guild ID
+ */
+ before?: Snowflake;
+ /**
+ * Get guilds after this guild ID
+ */
+ after?: Snowflake;
+ /**
+ * Max number of guilds to return (1-100)
+ *
+ * @default 100
+ */
+ limit?: number;
+}
+/**
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTAPIPartialCurrentUserGuild {
+ id: Snowflake;
+ name: string;
+ icon: string | null;
+ owner: boolean;
+ features: GuildFeature[];
+ permissions: Permissions;
+}
+/**
+ * https://discord.com/developers/docs/resources/user#get-current-user-guilds
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPICurrentUserGuildsResult = RESTAPIPartialCurrentUserGuild[];
+/**
+ * https://discord.com/developers/docs/resources/user#leave-guild
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPICurrentUserGuildResult = never;
+/**
+ * https://discord.com/developers/docs/resources/user#create-dm
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPICurrentUserCreateDMChannelJSONBody {
+ /**
+ * The recipient to open a DM channel with
+ */
+ recipient_id: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/user#create-dm
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPICurrentUserCreateDMChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/user#get-user-connections
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPICurrentUserConnectionsResult = APIConnection[];
+//# sourceMappingURL=user.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/user.d.ts.map b/node_modules/discord-api-types/rest/v8/user.d.ts.map
new file mode 100644
index 0000000..0e1e56d
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/user.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEhH;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC;AAElD;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE3C;;;;GAIG;AACH,MAAM,MAAM,mCAAmC,GAAG,cAAc,CAAC;AAEjE;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG,OAAO,CAAC;AAEpD;;;;GAIG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C,EAAE,EAAE,SAAS,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,WAAW,EAAE,WAAW,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,MAAM,iCAAiC,GAAG,8BAA8B,EAAE,CAAC;AAEjF;;;;GAIG;AACH,MAAM,MAAM,mCAAmC,GAAG,KAAK,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,6CAA6C;IAC7D;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,MAAM,2CAA2C,GAAG,UAAU,CAAC;AAErE;;;;GAIG;AACH,MAAM,MAAM,sCAAsC,GAAG,aAAa,EAAE,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/user.js b/node_modules/discord-api-types/rest/v8/user.js
new file mode 100644
index 0000000..33269d3
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/user.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=user.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/user.js.map b/node_modules/discord-api-types/rest/v8/user.js.map
new file mode 100644
index 0000000..ff1a289
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/user.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/voice.d.ts b/node_modules/discord-api-types/rest/v8/voice.d.ts
new file mode 100644
index 0000000..65347b0
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/voice.d.ts
@@ -0,0 +1,8 @@
+import type { APIVoiceRegion } from '../../payloads/v8/index';
+/**
+ * https://discord.com/developers/docs/resources/voice#list-voice-regions
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type GetAPIVoiceRegionsResult = APIVoiceRegion[];
+//# sourceMappingURL=voice.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/voice.d.ts.map b/node_modules/discord-api-types/rest/v8/voice.d.ts.map
new file mode 100644
index 0000000..70489cf
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/voice.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,cAAc,EAAE,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/voice.js b/node_modules/discord-api-types/rest/v8/voice.js
new file mode 100644
index 0000000..53e2713
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/voice.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=voice.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/voice.js.map b/node_modules/discord-api-types/rest/v8/voice.js.map
new file mode 100644
index 0000000..561b9f7
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/voice.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"voice.js","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/webhook.d.ts b/node_modules/discord-api-types/rest/v8/webhook.d.ts
new file mode 100644
index 0000000..b1225c1
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/webhook.d.ts
@@ -0,0 +1,283 @@
+import type { Snowflake } from '../../globals';
+import type { APIActionRowComponent, APIAllowedMentions, APIAttachment, APIEmbed, APIMessage, APIMessageActionRowComponent, APIWebhook, MessageFlags } from '../../payloads/v8/index';
+import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals';
+/**
+ * https://discord.com/developers/docs/resources/webhook#create-webhook
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIChannelWebhookJSONBody {
+ /**
+ * Name of the webhook (1-80 characters)
+ */
+ name: string;
+ /**
+ * Image for the default webhook avatar
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ avatar?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/webhook#create-webhook
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIChannelWebhookResult = APIWebhook;
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-channel-webhooks
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIChannelWebhooksResult = APIWebhook[];
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-guild-webhooks
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIGuildWebhooksResult = APIWebhook[];
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-webhook
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIWebhookResult = APIWebhook;
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-webhook-with-token
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIWebhookWithTokenResult = Omit<APIWebhook, 'user'>;
+/**
+ * https://discord.com/developers/docs/resources/webhook#modify-webhook
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPatchAPIWebhookJSONBody {
+ /**
+ * The default name of the webhook
+ */
+ name?: string | undefined;
+ /**
+ * Image for the default webhook avatar
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ avatar?: string | null | undefined;
+ /**
+ * The new channel id this webhook should be moved to
+ */
+ channel_id?: Snowflake | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/webhook#modify-webhook
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIWebhookResult = APIWebhook;
+/**
+ * https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIWebhookWithTokenJSONBody = Omit<RESTPatchAPIWebhookJSONBody, 'channel_id'>;
+/**
+ * https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIWebhookWithTokenResult = RESTGetAPIWebhookWithTokenResult;
+/**
+ * https://discord.com/developers/docs/resources/webhook#delete-webhook
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIWebhookResult = never;
+/**
+ * https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIWebhookWithTokenResult = never;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-webhook
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIWebhookWithTokenJSONBody {
+ /**
+ * The message contents (up to 2000 characters)
+ */
+ content?: string | undefined;
+ /**
+ * Override the default username of the webhook
+ */
+ username?: string | undefined;
+ /**
+ * Override the default avatar of the webhook
+ */
+ avatar_url?: string | undefined;
+ /**
+ * `true` if this is a TTS message
+ */
+ tts?: boolean | undefined;
+ /**
+ * Embedded `rich` content
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object
+ */
+ embeds?: APIEmbed[] | undefined;
+ /**
+ * Allowed mentions for the message
+ *
+ * See https://discord.com/developers/docs/resources/channel#allowed-mentions-object
+ */
+ allowed_mentions?: APIAllowedMentions | undefined;
+ /**
+ * The components to include with the message
+ *
+ * Requires an application-owned webhook
+ *
+ * See https://discord.com/developers/docs/interactions/message-components#component-object
+ */
+ components?: APIActionRowComponent<APIMessageActionRowComponent>[] | undefined;
+ /**
+ * Attachment objects with filename and description
+ */
+ attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
+ /**
+ * Message flags combined as a bitfield
+ */
+ flags?: MessageFlags | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-webhook
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIWebhookWithTokenFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPostAPIWebhookWithTokenJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-webhook-querystring-params
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export interface RESTPostAPIWebhookWithTokenQuery {
+ /**
+ * Waits for server confirmation of message send before response, and returns the created message body
+ * (defaults to `false`; when `false` a message that is not saved does not return an error)
+ *
+ * @default false
+ */
+ wait?: boolean;
+ /**
+ * Send a message to the specified thread within a webhook's channel. The thread will automatically be unarchived.
+ */
+ thread_id?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-webhook
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIWebhookWithTokenResult = never;
+/**
+ * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives
+ * the `wait` query parameter set to `true`
+ *
+ * See https://discord.com/developers/docs/resources/webhook#execute-webhook-querystring-params
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIWebhookWithTokenWaitResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook-querystring-params
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIWebhookWithTokenSlackQuery = RESTPostAPIWebhookWithTokenQuery;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIWebhookWithTokenSlackResult = never;
+/**
+ * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives
+ * the `wait` query parameter set to `true`
+ *
+ * See https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook-querystring-params
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIWebhookWithTokenSlackWaitResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook-querystring-params
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIWebhookWithTokenGitHubQuery = RESTPostAPIWebhookWithTokenQuery;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIWebhookWithTokenGitHubResult = never;
+/**
+ * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives
+ * the `wait` query parameter set to `true`
+ *
+ * See https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook-querystring-params
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPostAPIWebhookWithTokenGitHubWaitResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-webhook-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTGetAPIWebhookWithTokenMessageResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/webhook#edit-webhook-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Nullable<Pick<RESTPostAPIWebhookWithTokenJSONBody, 'content' | 'embeds' | 'allowed_mentions' | 'components'>>> & {
+ /**
+ * Attached files to keep
+ *
+ * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
+ *
+ * See https://discord.com/developers/docs/resources/channel#attachment-object
+ */
+ attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
+};
+/**
+ * https://discord.com/developers/docs/resources/webhook#edit-webhook-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIWebhookWithTokenMessageFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPatchAPIWebhookWithTokenMessageJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/resources/webhook#edit-webhook-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTPatchAPIWebhookWithTokenMessageResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/webhook#delete-webhook-message
+ *
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export type RESTDeleteAPIWebhookWithTokenMessageResult = never;
+//# sourceMappingURL=webhook.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/webhook.d.ts.map b/node_modules/discord-api-types/rest/v8/webhook.d.ts.map
new file mode 100644
index 0000000..98b6821
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/webhook.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,QAAQ,EACR,UAAU,EACV,4BAA4B,EAC5B,UAAU,EACV,YAAY,EACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,oDAAoD,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5G;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,MAAM,+BAA+B,GAAG,UAAU,CAAC;AAEzD;;;;GAIG;AACH,MAAM,MAAM,+BAA+B,GAAG,UAAU,EAAE,CAAC;AAE3D;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG,UAAU,EAAE,CAAC;AAEzD;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAEjD;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAExE;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC3C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,G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AIG;AACH,MAAM,MAAM,+CAA+C,GACxD,CAAC;IACD;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC,GAAG,MAAM,CAAC,SAAS,MAAM,GAAG,EAAE,OAAO,CAAC,CAAC,GACxC,CAAC,2CAA2C,GAAG,MAAM,CAAC,SAAS,MAAM,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;AAEvF;;;;GAIG;AACH,MAAM,MAAM,yCAAyC,GAAG,UAAU,CAAC;AAEnE;;;;GAIG;AACH,MAAM,MAAM,0CAA0C,GAAG,KAAK,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/webhook.js b/node_modules/discord-api-types/rest/v8/webhook.js
new file mode 100644
index 0000000..63886df
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/webhook.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=webhook.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v8/webhook.js.map b/node_modules/discord-api-types/rest/v8/webhook.js.map
new file mode 100644
index 0000000..f2cf863
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v8/webhook.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/application.d.ts b/node_modules/discord-api-types/rest/v9/application.d.ts
new file mode 100644
index 0000000..0854c37
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/application.d.ts
@@ -0,0 +1,18 @@
+import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v9/application';
+/**
+ * https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records
+ */
+export type RESTGetAPIApplicationRoleConnectionMetadataResult = APIApplicationRoleConnectionMetadata[];
+/**
+ * https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records
+ */
+export type RESTPutAPIApplicationRoleConnectionMetadataJSONBody = APIApplicationRoleConnectionMetadata[];
+/**
+ * https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records
+ */
+export type RESTPutAPIApplicationRoleConnectionMetadataResult = APIApplicationRoleConnectionMetadata[];
+/**
+ * https://discord.com/developers/docs/resources/application#get-current-application
+ */
+export type RESTGetCurrentApplicationResult = APIApplication;
+//# sourceMappingURL=application.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/application.d.ts.map b/node_modules/discord-api-types/rest/v9/application.d.ts.map
new file mode 100644
index 0000000..346371f
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/application.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,oCAAoC,EAAE,MAAM,+BAA+B,CAAC;AAE1G;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAAG,oCAAoC,EAAE,CAAC;AAEvG;;GAEG;AACH,MAAM,MAAM,mDAAmD,GAAG,oCAAoC,EAAE,CAAC;AAEzG;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAAG,oCAAoC,EAAE,CAAC;AAEvG;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/application.js b/node_modules/discord-api-types/rest/v9/application.js
new file mode 100644
index 0000000..6a141e1
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/application.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=application.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/application.js.map b/node_modules/discord-api-types/rest/v9/application.js.map
new file mode 100644
index 0000000..200a819
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/application.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"application.js","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/auditLog.d.ts b/node_modules/discord-api-types/rest/v9/auditLog.d.ts
new file mode 100644
index 0000000..e8063ab
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/auditLog.d.ts
@@ -0,0 +1,31 @@
+import type { Snowflake } from '../../globals';
+import type { APIAuditLog, AuditLogEvent } from '../../payloads/v9/auditLog';
+/**
+ * https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log
+ */
+export interface RESTGetAPIAuditLogQuery {
+ /**
+ * Filter the log for actions made by a user
+ */
+ user_id?: Snowflake;
+ /**
+ * The type of audit log events
+ */
+ action_type?: AuditLogEvent;
+ /**
+ * Filter the log before a certain entry ID
+ */
+ before?: Snowflake;
+ /**
+ * Filter the log after a certain entry ID
+ */
+ after?: Snowflake;
+ /**
+ * How many entries are returned (default 50, minimum 1, maximum 100)
+ *
+ * @default 50
+ */
+ limit?: number;
+}
+export type RESTGetAPIAuditLogResult = APIAuditLog;
+//# sourceMappingURL=auditLog.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/auditLog.d.ts.map b/node_modules/discord-api-types/rest/v9/auditLog.d.ts.map
new file mode 100644
index 0000000..6c000f4
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/auditLog.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"auditLog.d.ts","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE7E;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/auditLog.js b/node_modules/discord-api-types/rest/v9/auditLog.js
new file mode 100644
index 0000000..ea09bf5
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/auditLog.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=auditLog.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/auditLog.js.map b/node_modules/discord-api-types/rest/v9/auditLog.js.map
new file mode 100644
index 0000000..754e232
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/auditLog.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"auditLog.js","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/autoModeration.d.ts b/node_modules/discord-api-types/rest/v9/autoModeration.d.ts
new file mode 100644
index 0000000..4087296
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/autoModeration.d.ts
@@ -0,0 +1,68 @@
+import type { Snowflake } from '../../globals';
+import type { APIAutoModerationAction, APIAutoModerationRule, AutoModerationRuleEventType, APIAutoModerationRuleTriggerMetadata, AutoModerationRuleTriggerType } from '../../payloads/v9/index';
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild
+ */
+export type RESTGetAPIAutoModerationRulesResult = APIAutoModerationRule[];
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule
+ */
+export type RESTGetAPIAutoModerationRuleResult = APIAutoModerationRule;
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule
+ */
+export interface RESTPostAPIAutoModerationRuleJSONBody {
+ /**
+ * The rule name
+ */
+ name: string;
+ /**
+ * The rule event type
+ */
+ event_type: AutoModerationRuleEventType;
+ /**
+ * The rule trigger type
+ */
+ trigger_type: AutoModerationRuleTriggerType;
+ /**
+ * The rule trigger metadata
+ *
+ * Can be omitted if the trigger type is {@link AutoModerationRuleTriggerType.HarmfulLink} or {@link AutoModerationRuleTriggerType.Spam}
+ */
+ trigger_metadata?: APIAutoModerationRuleTriggerMetadata | undefined;
+ /**
+ * The actions which will execute when this rule is triggered
+ */
+ actions: APIAutoModerationAction[];
+ /**
+ * Whether this rule is enabled
+ *
+ * @default false
+ */
+ enabled?: boolean | undefined;
+ /**
+ * The role ids that shouldn't be affected by this rule (Maximum of 20)
+ */
+ exempt_roles?: Snowflake[] | undefined;
+ /**
+ * The channel ids that shouldn't be affected by this rule (Maximum of 50)
+ */
+ exempt_channels?: Snowflake[] | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule
+ */
+export type RESTPostAPIAutoModerationRuleResult = APIAutoModerationRule;
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule
+ */
+export type RESTPatchAPIAutoModerationRuleJSONBody = Omit<Partial<RESTPostAPIAutoModerationRuleJSONBody>, 'trigger_type'>;
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule
+ */
+export type RESTPatchAPIAutoModerationRuleResult = APIAutoModerationRule;
+/**
+ * https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule
+ */
+export type RESTDeleteAPIAutoModerationRuleResult = never;
+//# sourceMappingURL=autoModeration.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/autoModeration.d.ts.map b/node_modules/discord-api-types/rest/v9/autoModeration.d.ts.map
new file mode 100644
index 0000000..9270ec3
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/autoModeration.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"autoModeration.d.ts","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EACX,uBAAuB,EACvB,qBAAqB,EACrB,2BAA2B,EAC3B,oCAAoC,EACpC,6BAA6B,EAC7B,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,qBAAqB,EAAE,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,qBAAqB,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACrD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,2BAA2B,CAAC;IACxC;;OAEG;IACH,YAAY,EAAE,6BAA6B,CAAC;IAC5C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,oCAAoC,GAAG,SAAS,CAAC;IACpE;;OAEG;IACH,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;IACvC;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,qBAAqB,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,IAAI,CACxD,OAAO,CAAC,qCAAqC,CAAC,EAC9C,cAAc,CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,qBAAqB,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,KAAK,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/autoModeration.js b/node_modules/discord-api-types/rest/v9/autoModeration.js
new file mode 100644
index 0000000..78af1ff
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/autoModeration.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=autoModeration.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/autoModeration.js.map b/node_modules/discord-api-types/rest/v9/autoModeration.js.map
new file mode 100644
index 0000000..e3f54f3
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/autoModeration.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"autoModeration.js","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/channel.d.ts b/node_modules/discord-api-types/rest/v9/channel.d.ts
new file mode 100644
index 0000000..cc4b7ca
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/channel.d.ts
@@ -0,0 +1,676 @@
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIActionRowComponent, APIAllowedMentions, APIAttachment, APIChannel, APIEmbed, APIExtendedInvite, APIFollowedChannel, APIMessage, APIMessageActionRowComponent, APIMessageReference, APIThreadList, APIThreadMember, APIUser, ChannelType, InviteTargetType, MessageFlags, OverwriteType, ThreadAutoArchiveDuration, VideoQualityMode, APIGuildForumTag, APIGuildForumDefaultReactionEmoji, SortOrderType, ForumLayoutType } from '../../payloads/v9/index';
+import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';
+export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
+ id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#get-channel
+ */
+export type RESTGetAPIChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#modify-channel
+ */
+export interface RESTPatchAPIChannelJSONBody {
+ /**
+ * 1-100 character channel name
+ *
+ * Channel types: all
+ */
+ name?: string | undefined;
+ /**
+ * The type of channel; only conversion between `text` and `news`
+ * is supported and only in guilds with the "NEWS" feature
+ *
+ * Channel types: text, news
+ */
+ type?: ChannelType.GuildAnnouncement | ChannelType.GuildText | undefined;
+ /**
+ * The position of the channel in the left-hand listing
+ *
+ * Channel types: all excluding newsThread, publicThread, privateThread
+ */
+ position?: number | null | undefined;
+ /**
+ * 0-1024 character channel topic (0-4096 characters for forum channels)
+ *
+ * Channel types: text, news, forum
+ */
+ topic?: string | null | undefined;
+ /**
+ * Whether the channel is nsfw
+ *
+ * Channel types: text, voice, news, forum
+ */
+ nsfw?: boolean | null | undefined;
+ /**
+ * Amount of seconds a user has to wait before sending another message (0-21600);
+ * bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
+ * are unaffected
+ *
+ * Channel types: text, newsThread, publicThread, privateThread, forum
+ */
+ rate_limit_per_user?: number | null | undefined;
+ /**
+ * The bitrate (in bits) of the voice channel; 8000 to 96000 (128000 for VIP servers)
+ *
+ * Channel types: voice
+ */
+ bitrate?: number | null | undefined;
+ /**
+ * The user limit of the voice channel; 0 refers to no limit, 1 to 99 refers to a user limit
+ *
+ * Channel types: voice
+ */
+ user_limit?: number | null | undefined;
+ /**
+ * Channel or category-specific permissions
+ *
+ * Channel types: all excluding newsThread, publicThread, privateThread
+ */
+ permission_overwrites?: APIChannelPatchOverwrite[] | null | undefined;
+ /**
+ * ID of the new parent category for a channel
+ *
+ * Channel types: text, voice, news
+ */
+ parent_id?: Snowflake | null | undefined;
+ /**
+ * Voice region id for the voice or stage channel, automatic when set to `null`
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-region-object
+ */
+ rtc_region?: string | null | undefined;
+ /**
+ * The camera video quality mode of the voice channel
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes
+ */
+ video_quality_mode?: VideoQualityMode | null | undefined;
+ /**
+ * Whether the thread should be archived
+ *
+ * Channel types: newsThread, publicThread, privateThread
+ */
+ archived?: boolean | undefined;
+ /**
+ * The amount of time in minutes to wait before automatically archiving the thread
+ *
+ * Channel types: newsThread, publicThread, privateThread
+ */
+ auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
+ /**
+ * Whether the thread should be locked
+ *
+ * Channel types: newsThread, publicThread, privateThread
+ */
+ locked?: boolean | undefined;
+ /**
+ * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
+ *
+ * Channel types: text, news
+ */
+ default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
+ /**
+ * Whether non-moderators can add other non-moderators to the thread
+ *
+ * Channel types: privateThread
+ */
+ invitable?: boolean | undefined;
+ /**
+ * The set of tags that can be used in a forum channel; limited to 20
+ *
+ * Channel types: forum
+ */
+ available_tags?: APIGuildForumTag[] | undefined;
+ /**
+ * The emoji to show in the add reaction button on a thread in a forum channel
+ *
+ * Channel types: forum
+ */
+ default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined;
+ /**
+ * The initial `rate_limit_per_user` to set on newly created threads in a channel.
+ * This field is copied to the thread at creation time and does not live update
+ *
+ * Channel types: forum
+ */
+ default_thread_rate_limit_per_user?: number | null | undefined;
+ /**
+ * The default sort order type used to order posts in a forum channel
+ *
+ * Channel types: forum
+ */
+ default_sort_order?: SortOrderType | null | undefined;
+ /**
+ * The default layout type used to display posts in a forum channel
+ *
+ * Channel types: forum
+ */
+ default_forum_layout?: ForumLayoutType | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#modify-channel
+ */
+export type RESTPatchAPIChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#deleteclose-channel
+ */
+export type RESTDeleteAPIChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#get-channel-messages
+ */
+export interface RESTGetAPIChannelMessagesQuery {
+ /**
+ * Get messages around this message ID
+ */
+ around?: Snowflake;
+ /**
+ * Get messages before this message ID
+ */
+ before?: Snowflake;
+ /**
+ * Get messages after this message ID
+ */
+ after?: Snowflake;
+ /**
+ * Max number of messages to return (1-100)
+ *
+ * @default 50
+ */
+ limit?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#get-channel-messages
+ */
+export type RESTGetAPIChannelMessagesResult = APIMessage[];
+/**
+ * https://discord.com/developers/docs/resources/channel#get-channel-message
+ */
+export type RESTGetAPIChannelMessageResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
+ */
+export type APIMessageReferenceSend = StrictPartial<APIMessageReference> & AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Required<Pick<APIMessageReference, 'message_id'>>> & {
+ /**
+ * Whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message
+ *
+ * @default true
+ */
+ fail_if_not_exists?: boolean | undefined;
+};
+/**
+ * https://discord.com/developers/docs/resources/channel#create-message
+ */
+export interface RESTPostAPIChannelMessageJSONBody {
+ /**
+ * The message contents (up to 2000 characters)
+ */
+ content?: string | undefined;
+ /**
+ * A nonce that can be used for optimistic message sending
+ */
+ nonce?: number | string | undefined;
+ /**
+ * `true` if this is a TTS message
+ */
+ tts?: boolean | undefined;
+ /**
+ * Embedded `rich` content (up to 6000 characters)
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object
+ */
+ embeds?: APIEmbed[] | undefined;
+ /**
+ * Embedded `rich` content
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object
+ *
+ * @deprecated Use `embeds` instead
+ */
+ embed?: APIEmbed | undefined;
+ /**
+ * Allowed mentions for a message
+ *
+ * See https://discord.com/developers/docs/resources/channel#allowed-mentions-object
+ */
+ allowed_mentions?: APIAllowedMentions | undefined;
+ /**
+ * Include to make your message a reply
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
+ */
+ message_reference?: APIMessageReferenceSend | undefined;
+ /**
+ * The components to include with the message
+ *
+ * See https://discord.com/developers/docs/interactions/message-components#component-object
+ */
+ components?: APIActionRowComponent<APIMessageActionRowComponent>[] | undefined;
+ /**
+ * IDs of up to 3 stickers in the server to send in the message
+ *
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object
+ */
+ sticker_ids?: [Snowflake] | [Snowflake, Snowflake] | [Snowflake, Snowflake, Snowflake] | undefined;
+ /**
+ * Attachment objects with filename and description
+ */
+ attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
+ /**
+ * Message flags combined as a bitfield
+ */
+ flags?: MessageFlags | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#create-message
+ */
+export type RESTPostAPIChannelMessageFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPostAPIChannelMessageJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/resources/channel#create-message
+ */
+export type RESTPostAPIChannelMessageResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/channel#crosspost-message
+ */
+export type RESTPostAPIChannelMessageCrosspostResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/channel#create-reaction
+ */
+export type RESTPutAPIChannelMessageReactionResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-own-reaction
+ */
+export type RESTDeleteAPIChannelMessageOwnReaction = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-user-reaction
+ */
+export type RESTDeleteAPIChannelMessageUserReactionResult = never;
+export interface RESTGetAPIChannelMessageReactionUsersQuery {
+ /**
+ * Get users after this user ID
+ */
+ after?: Snowflake;
+ /**
+ * Max number of users to return (1-100)
+ *
+ * @default 25
+ */
+ limit?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#get-reactions
+ */
+export type RESTGetAPIChannelMessageReactionUsersResult = APIUser[];
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-all-reactions
+ */
+export type RESTDeleteAPIChannelAllMessageReactionsResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji
+ */
+export type RESTDeleteAPIChannelMessageReactionResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#edit-message
+ */
+export interface RESTPatchAPIChannelMessageJSONBody {
+ /**
+ * The new message contents (up to 2000 characters)
+ */
+ content?: string | null | undefined;
+ /**
+ * Embedded `rich` content (up to 6000 characters)
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object
+ */
+ embeds?: APIEmbed[] | null | undefined;
+ /**
+ * Embedded `rich` content
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object
+ *
+ * @deprecated Use `embeds` instead
+ */
+ embed?: APIEmbed | null | undefined;
+ /**
+ * Edit the flags of a message (only `SUPPRESS_EMBEDS` can currently be set/unset)
+ *
+ * When specifying flags, ensure to include all previously set flags/bits
+ * in addition to ones that you are modifying
+ *
+ * See https://discord.com/developers/docs/resources/channel#message-object-message-flags
+ */
+ flags?: MessageFlags | null | undefined;
+ /**
+ * Allowed mentions for the message
+ *
+ * See https://discord.com/developers/docs/resources/channel#allowed-mentions-object
+ */
+ allowed_mentions?: APIAllowedMentions | null | undefined;
+ /**
+ * Attached files to keep
+ *
+ * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
+ *
+ * See https://discord.com/developers/docs/resources/channel#attachment-object
+ */
+ attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
+ /**
+ * The components to include with the message
+ *
+ * See https://discord.com/developers/docs/interactions/message-components#component-object
+ */
+ components?: APIActionRowComponent<APIMessageActionRowComponent>[] | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#edit-message
+ */
+export type RESTPatchAPIChannelMessageFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPatchAPIChannelMessageJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/resources/channel#edit-message
+ */
+export type RESTPatchAPIChannelMessageResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-message
+ */
+export type RESTDeleteAPIChannelMessageResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#bulk-delete-messages
+ */
+export interface RESTPostAPIChannelMessagesBulkDeleteJSONBody {
+ /**
+ * An array of message ids to delete (2-100)
+ */
+ messages: Snowflake[];
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#bulk-delete-messages
+ */
+export type RESTPostAPIChannelMessagesBulkDeleteResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#edit-channel-permissions
+ */
+export interface RESTPutAPIChannelPermissionJSONBody {
+ /**
+ * The bitwise value of all allowed permissions
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ *
+ * @default "0"
+ */
+ allow?: Permissions | null | undefined;
+ /**
+ * The bitwise value of all disallowed permissions
+ *
+ * See https://en.wikipedia.org/wiki/Bit_field
+ *
+ * @default "0"
+ */
+ deny?: Permissions | null | undefined;
+ /**
+ * `0` for a role or `1` for a member
+ */
+ type: OverwriteType;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#edit-channel-permissions
+ */
+export type RESTPutAPIChannelPermissionResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#get-channel-invites
+ */
+export type RESTGetAPIChannelInvitesResult = APIExtendedInvite[];
+/**
+ * https://discord.com/developers/docs/resources/channel#create-channel-invite
+ */
+export interface RESTPostAPIChannelInviteJSONBody {
+ /**
+ * Duration of invite in seconds before expiry, or 0 for never
+ *
+ * @default 86400 (24 hours)
+ */
+ max_age?: number | undefined;
+ /**
+ * Max number of uses or 0 for unlimited
+ *
+ * @default 0
+ */
+ max_uses?: number | undefined;
+ /**
+ * Whether this invite only grants temporary membership
+ *
+ * @default false
+ */
+ temporary?: boolean | undefined;
+ /**
+ * If true, don't try to reuse a similar invite
+ * (useful for creating many unique one time use invites)
+ *
+ * @default false
+ */
+ unique?: boolean | undefined;
+ /**
+ * The type of target for this voice channel invite
+ *
+ * See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
+ */
+ target_type?: InviteTargetType | undefined;
+ /**
+ * The id of the user whose stream to display for this invite
+ * - Required if `target_type` is 1
+ * - The user must be streaming in the channel
+ */
+ target_user_id?: Snowflake | undefined;
+ /**
+ * The id of the embedded application to open for this invite
+ * - Required if `target_type` is 2
+ * - The application must have the `EMBEDDED` flag
+ */
+ target_application_id?: Snowflake | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#create-channel-invite
+ */
+export type RESTPostAPIChannelInviteResult = APIExtendedInvite;
+/**
+ * https://discord.com/developers/docs/resources/channel#delete-channel-permission
+ */
+export type RESTDeleteAPIChannelPermissionResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#follow-news-channel
+ */
+export interface RESTPostAPIChannelFollowersJSONBody {
+ /**
+ * ID of target channel
+ */
+ webhook_channel_id: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#follow-news-channel
+ */
+export type RESTPostAPIChannelFollowersResult = APIFollowedChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#trigger-typing-indicator
+ */
+export type RESTPostAPIChannelTypingResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#get-pinned-messages
+ */
+export type RESTGetAPIChannelPinsResult = APIMessage[];
+/**
+ * https://discord.com/developers/docs/resources/channel#pin-message
+ */
+export type RESTPutAPIChannelPinResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#unpin-message
+ */
+export type RESTDeleteAPIChannelPinResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
+ */
+export interface RESTPutAPIChannelRecipientJSONBody {
+ /**
+ * Access token of a user that has granted your app the `gdm.join` scope
+ */
+ access_token: string;
+ /**
+ * Nickname of the user being added
+ */
+ nick?: string | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
+ */
+export type RESTPutAPIChannelRecipientResult = unknown;
+/**
+ * https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient
+ */
+export type RESTDeleteAPIChannelRecipientResult = unknown;
+/**
+ * https://discord.com/developers/docs/resources/channel#start-thread-from-message
+ */
+export interface RESTPostAPIChannelMessagesThreadsJSONBody {
+ /**
+ * 1-100 character thread name
+ */
+ name: string;
+ /**
+ * The amount of time in minutes to wait before automatically archiving the thread
+ */
+ auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
+ /**
+ * Amount of seconds a user has to wait before sending another message (0-21600)
+ */
+ rate_limit_per_user?: number | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
+ */
+export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
+ /**
+ * First message in the forum thread
+ */
+ message: RESTPostAPIChannelMessageJSONBody;
+ /**
+ * The IDs of the set of tags that have been applied to a thread in a forum channel; limited to 5
+ */
+ applied_tags?: Snowflake[] | undefined;
+};
+/**
+ * https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
+ */
+export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
+ /**
+ * First message in the forum thread
+ */
+ message: string;
+};
+/**
+ * https://discord.com/developers/docs/resources/channel#start-thread-from-message
+ */
+export type RESTPostAPIChannelMessagesThreadsResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#start-thread-without-message
+ */
+export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMessagesThreadsJSONBody {
+ /**
+ * The type of thread to create
+ *
+ * In API v9, `type` defaults to `PRIVATE_THREAD`.
+ * In a future API version this will be changed to be a required field, with no default.
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object-channel-types
+ *
+ * @default ChannelType.PrivateThread
+ */
+ type?: ChannelType.AnnouncementThread | ChannelType.PublicThread | ChannelType.PrivateThread | undefined;
+ /**
+ * Whether non-moderators can add other non-moderators to the thread; only available when creating a private thread
+ */
+ invitable?: boolean | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#start-thread-without-message
+ */
+export type RESTPostAPIChannelThreadsResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/channel#join-thread
+ */
+export type RESTPutAPIChannelThreadMembersResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#leave-thread
+ */
+export type RESTDeleteAPIChannelThreadMembersResult = never;
+/**
+ * https://discord.com/developers/docs/resources/channel#get-thread-member
+ */
+export interface RESTGetAPIChannelThreadMemberQuery {
+ /**
+ * Whether to include a guild member object for the thread member
+ */
+ with_member?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#get-thread-member
+ */
+export type RESTGetAPIChannelThreadMemberResult = APIThreadMember;
+/**
+ * https://discord.com/developers/docs/resources/channel#list-thread-members
+ */
+export interface RESTGetAPIChannelThreadMembersQuery {
+ /**
+ * Whether to include a guild member object for each thread member
+ */
+ with_member?: boolean;
+ /**
+ * Get thread members after this user ID
+ */
+ after?: Snowflake;
+ /**
+ * Max number of thread members to return (1-100). Defaults to 100
+ */
+ limit?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#list-thread-members
+ */
+export type RESTGetAPIChannelThreadMembersResult = APIThreadMember[];
+export interface RESTGetAPIChannelThreadsArchivedQuery {
+ /**
+ * Get threads before this id or ISO8601 timestamp
+ */
+ before?: Snowflake | string;
+ /**
+ * Max number of thread to return
+ */
+ limit?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/channel#list-public-archived-threads
+ */
+export type RESTGetAPIChannelThreadsArchivedPublicResult = RESTGetAPIChannelUsersThreadsArchivedResult;
+/**
+ * https://discord.com/developers/docs/resources/channel#list-private-archived-threads
+ */
+export type RESTGetAPIChannelThreadsArchivedPrivateResult = RESTGetAPIChannelUsersThreadsArchivedResult;
+/**
+ * https://discord.com/developers/docs/resources/channel#list-active-threads
+ *
+ * @deprecated Removed in API v10, use [List Active Guild Threads](https://discord.com/developers/docs/resources/guild#list-active-guild-threads) instead.
+ */
+export type RESTGetAPIChannelThreadsResult = APIThreadList;
+/**
+ * https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads
+ */
+export type RESTGetAPIChannelUsersThreadsArchivedResult = APIThreadList;
+//# sourceMappingURL=channel.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/channel.d.ts.map b/node_modules/discord-api-types/rest/v9/channel.d.ts.map
new file mode 100644
index 0000000..369beac
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/channel.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,4BAA4B,EAC5B,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,iCAAiC,EACjC,aAAa,EACb,eAAe,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,oDAAoD,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEjH,MAAM,WAAW,wBAAyB,SAAQ,mCAAmC;IACpF,EAAE,EAAE,SAAS,CAAC;CACd;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC3C;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,iBAAiB,GAAG,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC;IACzE;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC;;;;OAIG;IACH,KAAK,CAAC,EAAE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AW,iCAAkC,SAAQ,yCAAyC;IACnG;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,kBAAkB,GAAG,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,aAAa,GAAG,SAAS,CAAC;IACzG;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,UAAU,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,KAAK,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,uCAAuC,GAAG,KAAK,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,kCAAkC;IAClD;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,eAAe,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,mCAAmC;IACnD;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,eAAe,EAAE,CAAC;AAKrE,MAAM,WAAW,qCAAqC;IACrD;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,4CAA4C,GAAG,2CAA2C,CAAC;AAEvG;;GAEG;AACH,MAAM,MAAM,6CAA6C,GAAG,2CAA2C,CAAC;AAExG;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,2CAA2C,GAAG,aAAa,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/channel.js b/node_modules/discord-api-types/rest/v9/channel.js
new file mode 100644
index 0000000..7c587bc
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/channel.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=channel.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/channel.js.map b/node_modules/discord-api-types/rest/v9/channel.js.map
new file mode 100644
index 0000000..f1057f4
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/channel.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/emoji.d.ts b/node_modules/discord-api-types/rest/v9/emoji.d.ts
new file mode 100644
index 0000000..429bf74
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/emoji.d.ts
@@ -0,0 +1,55 @@
+import type { Snowflake } from '../../globals';
+import type { APIEmoji } from '../../payloads/v9/index';
+/**
+ * https://discord.com/developers/docs/resources/emoji#list-guild-emojis
+ */
+export type RESTGetAPIGuildEmojisResult = APIEmoji[];
+/**
+ * https://discord.com/developers/docs/resources/emoji#get-guild-emoji
+ */
+export type RESTGetAPIGuildEmojiResult = APIEmoji;
+/**
+ * https://discord.com/developers/docs/resources/emoji#create-guild-emoji-json-params
+ */
+export interface RESTPostAPIGuildEmojiJSONBody {
+ /**
+ * Name of the emoji
+ */
+ name: string;
+ /**
+ * The 128x128 emoji image
+ *
+ * https://discord.com/developers/docs/reference#image-data
+ */
+ image: string;
+ /**
+ * Roles for which this emoji will be whitelisted
+ */
+ roles?: Snowflake[] | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/emoji#create-guild-emoji
+ */
+export type RESTPostAPIGuildEmojiResult = APIEmoji;
+/**
+ * https://discord.com/developers/docs/resources/emoji#modify-guild-emoji
+ */
+export interface RESTPatchAPIGuildEmojiJSONBody {
+ /**
+ * Name of the emoji
+ */
+ name?: string | undefined;
+ /**
+ * Roles for which this emoji will be whitelisted
+ */
+ roles?: Snowflake[] | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/emoji#modify-guild-emoji
+ */
+export type RESTPatchAPIGuildEmojiResult = APIEmoji;
+/**
+ * https://discord.com/developers/docs/resources/emoji#delete-guild-emoji
+ */
+export type RESTDeleteAPIGuildEmojiResult = never;
+//# sourceMappingURL=emoji.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/emoji.d.ts.map b/node_modules/discord-api-types/rest/v9/emoji.d.ts.map
new file mode 100644
index 0000000..831266f
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/emoji.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,EAAE,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC7C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,QAAQ,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,KAAK,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/emoji.js b/node_modules/discord-api-types/rest/v9/emoji.js
new file mode 100644
index 0000000..9b3d9c9
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/emoji.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=emoji.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/emoji.js.map b/node_modules/discord-api-types/rest/v9/emoji.js.map
new file mode 100644
index 0000000..100b53e
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/emoji.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"emoji.js","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/gateway.d.ts b/node_modules/discord-api-types/rest/v9/gateway.d.ts
new file mode 100644
index 0000000..a5232ef
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/gateway.d.ts
@@ -0,0 +1,10 @@
+import type { APIGatewayBotInfo, APIGatewayInfo } from '../../payloads/v9/index';
+/**
+ * https://discord.com/developers/docs/topics/gateway#get-gateway
+ */
+export type RESTGetAPIGatewayResult = APIGatewayInfo;
+/**
+ * https://discord.com/developers/docs/topics/gateway#get-gateway-bot
+ */
+export type RESTGetAPIGatewayBotResult = APIGatewayBotInfo;
+//# sourceMappingURL=gateway.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/gateway.d.ts.map b/node_modules/discord-api-types/rest/v9/gateway.d.ts.map
new file mode 100644
index 0000000..34c7d23
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/gateway.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEjF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/gateway.js b/node_modules/discord-api-types/rest/v9/gateway.js
new file mode 100644
index 0000000..81495a6
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/gateway.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=gateway.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/gateway.js.map b/node_modules/discord-api-types/rest/v9/gateway.js.map
new file mode 100644
index 0000000..f7127a2
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/gateway.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"gateway.js","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/guild.d.ts b/node_modules/discord-api-types/rest/v9/guild.d.ts
new file mode 100644
index 0000000..2993e99
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/guild.d.ts
@@ -0,0 +1,817 @@
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIBan, APIChannel, APIExtendedInvite, APIGuild, APIGuildIntegration, APIGuildMember, APIGuildMembershipScreening, APIGuildOnboarding, APIGuildPreview, APIGuildWelcomeScreen, APIGuildWidget, APIGuildWidgetSettings, APIRole, APIThreadList, APIVoiceRegion, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildFeature, GuildMFALevel, GuildSystemChannelFlags, GuildVerificationLevel, GuildWidgetStyle, APIDMChannel, APIGroupDMChannel } from '../../payloads/v9/index';
+import type { DistributiveOmit, DistributivePick, Nullable, StrictPartial, StrictRequired } from '../../utils/internals';
+import type { RESTPutAPIChannelPermissionJSONBody } from './channel';
+export interface APIGuildCreateOverwrite extends RESTPutAPIChannelPermissionJSONBody {
+ id: number | string;
+}
+export type APIGuildChannelResolvable = Exclude<APIChannel, APIDMChannel | APIGroupDMChannel>;
+export type APIGuildCreatePartialChannel = StrictPartial<DistributivePick<APIGuildChannelResolvable, 'type' | 'topic' | 'nsfw' | 'bitrate' | 'user_limit' | 'rate_limit_per_user' | 'default_auto_archive_duration' | 'position' | 'rtc_region' | 'video_quality_mode' | 'flags' | 'default_reaction_emoji' | 'available_tags' | 'default_sort_order' | 'default_forum_layout' | 'default_thread_rate_limit_per_user'>> & {
+ name: string;
+ id?: number | string | undefined;
+ parent_id?: number | string | null | undefined;
+ permission_overwrites?: APIGuildCreateOverwrite[] | undefined;
+};
+export interface APIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody {
+ id: number | string;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild
+ */
+export interface RESTPostAPIGuildsJSONBody {
+ /**
+ * Name of the guild (2-100 characters)
+ */
+ name: string;
+ /**
+ * Voice region id
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-region-object
+ */
+ region?: string | undefined;
+ /**
+ * base64 1024x1024 png/jpeg image for the guild icon
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ icon?: string | undefined;
+ /**
+ * Verification level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ */
+ verification_level?: GuildVerificationLevel | undefined;
+ /**
+ * Default message notification level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
+ */
+ default_message_notifications?: GuildDefaultMessageNotifications | undefined;
+ /**
+ * Explicit content filter level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
+ */
+ explicit_content_filter?: GuildExplicitContentFilter | undefined;
+ /**
+ * New guild roles
+ *
+ * @remarks
+ * When using this parameter, the first member of the array is used to change properties of the guild's `@everyone` role.
+ * If you are trying to bootstrap a guild with additional roles, keep this in mind.
+ *
+ * Also, the required `id` field within each role object is an integer placeholder,
+ * and will be replaced by the API upon consumption. Its purpose is to allow you to overwrite a role's permissions
+ * in a channel when also passing in channels with the channels array.
+ *
+ * See https://discord.com/developers/docs/topics/permissions#role-object
+ */
+ roles?: APIGuildCreateRole[] | undefined;
+ /**
+ * New guild's channels
+ *
+ * @remarks
+ * When using the channels parameter, the `position` field is ignored, and none of the default channels are created.
+ *
+ * Also, the `id` field within each channel object may be set to an integer placeholder,
+ * and will be replaced by the API upon consumption. Its purpose is to allow you to create `GUILD_CATEGORY` channels
+ * by setting the `parent_id` field on any children to the category's id field.
+ * Category channels must be listed before any children.*
+ *
+ * See https://discord.com/developers/docs/resources/channel#channel-object
+ */
+ channels?: APIGuildCreatePartialChannel[] | undefined;
+ /**
+ * ID for afk channel
+ */
+ afk_channel_id?: number | Snowflake | null | undefined;
+ /**
+ * afk timeout in seconds, can be set to: `60`, `300`, `900`, `1800`, `3600`
+ */
+ afk_timeout?: 60 | 300 | 900 | 1800 | 3600 | undefined;
+ /**
+ * The id of the channel where guild notices such as welcome messages and boost events are posted
+ */
+ system_channel_id?: number | Snowflake | null | undefined;
+ /**
+ * System channel flags
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
+ */
+ system_channel_flags?: GuildSystemChannelFlags | undefined;
+ /**
+ * Whether the boosts progress bar should be enabled.
+ */
+ premium_progress_bar_enabled?: boolean | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild
+ */
+export type RESTPostAPIGuildsResult = APIGuild;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level
+ */
+export interface RESTPostAPIGuildsMFAJSONBody {
+ /**
+ * MFA level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
+ */
+ level: GuildMFALevel;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level
+ */
+export type RESTPostAPIGuildsMFAResult = RESTPostAPIGuildsMFAJSONBody;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild
+ */
+export interface RESTGetAPIGuildQuery {
+ /**
+ * When `true`, will return approximate member and presence counts for the guild
+ *
+ * @default false
+ */
+ with_counts?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild
+ */
+export type RESTGetAPIGuildResult = APIGuild;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-preview
+ */
+export type RESTGetAPIGuildPreviewResult = APIGuildPreview;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild
+ */
+export interface RESTPatchAPIGuildJSONBody {
+ /**
+ * New name for the guild (2-100 characters)
+ */
+ name?: string | undefined;
+ /**
+ * Voice region id
+ *
+ * See https://discord.com/developers/docs/resources/voice#voice-region-object
+ */
+ region?: string | null | undefined;
+ /**
+ * Verification level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
+ */
+ verification_level?: GuildVerificationLevel | null | undefined;
+ /**
+ * Default message notification level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
+ */
+ default_message_notifications?: GuildDefaultMessageNotifications | null | undefined;
+ /**
+ * Explicit content filter level
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
+ */
+ explicit_content_filter?: GuildExplicitContentFilter | null | undefined;
+ /**
+ * ID for afk channel
+ */
+ afk_channel_id?: Snowflake | null | undefined;
+ /**
+ * afk timeout in seconds, can be set to: `60`, `300`, `900`, `1800`, `3600`
+ */
+ afk_timeout?: 60 | 300 | 900 | 1800 | 3600 | undefined;
+ /**
+ * base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the guild has `ANIMATED_ICON` feature)
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ icon?: string | null | undefined;
+ /**
+ * User id to transfer guild ownership to (must be owner)
+ */
+ owner_id?: Snowflake | undefined;
+ /**
+ * base64 16:9 png/jpeg image for the guild splash (when the guild has `INVITE_SPLASH` feature)
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ splash?: string | null | undefined;
+ /**
+ * base64 png/jpeg image for the guild discovery splash (when the guild has `DISCOVERABLE` feature)
+ */
+ discovery_splash?: string | null | undefined;
+ /**
+ * base64 16:9 png/jpeg image for the guild banner (when the server has the `BANNER` feature; can be animated gif when the server has the `ANIMATED_BANNER` feature)
+ */
+ banner?: string | null | undefined;
+ /**
+ * The id of the channel where guild notices such as welcome messages and boost events are posted
+ */
+ system_channel_id?: Snowflake | null | undefined;
+ /**
+ * System channel flags
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
+ */
+ system_channel_flags?: GuildSystemChannelFlags | undefined;
+ /**
+ * The id of the channel where Community guilds display rules and/or guidelines
+ */
+ rules_channel_id?: Snowflake | null | undefined;
+ /**
+ * The id of the channel where admins and moderators of Community guilds receive notices from Discord
+ */
+ public_updates_channel_id?: Snowflake | null | undefined;
+ /**
+ * The preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US"
+ *
+ * @default "en-US" (if the value is set to `null`)
+ */
+ preferred_locale?: string | null | undefined;
+ /**
+ * Enabled guild features
+ *
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
+ */
+ features?: GuildFeature[] | undefined;
+ /**
+ * The description for the guild
+ */
+ description?: string | null | undefined;
+ /**
+ * Whether the boosts progress bar should be enabled.
+ */
+ premium_progress_bar_enabled?: boolean | undefined;
+ /**
+ * The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
+ */
+ safety_alerts_channel_id?: Snowflake | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild
+ */
+export type RESTPatchAPIGuildResult = APIGuild;
+/**
+ * https://discord.com/developers/docs/resources/guild#delete-guild
+ */
+export type RESTDeleteAPIGuildResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-channels
+ */
+export type RESTGetAPIGuildChannelsResult = APIChannel[];
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-channel
+ */
+export type RESTPostAPIGuildChannelJSONBody = DistributiveOmit<APIGuildCreatePartialChannel, 'id'>;
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-channel
+ */
+export type RESTPostAPIGuildChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions
+ */
+export type RESTPatchAPIGuildChannelPositionsJSONBody = {
+ /**
+ * Channel id
+ */
+ id: Snowflake;
+ /**
+ * Sorting position of the channel
+ */
+ position: number;
+ /**
+ * Sync channel overwrites with the new parent, when moving to a new `parent_id`
+ */
+ lock_permissions?: boolean | undefined;
+ /**
+ * The new parent id of this channel
+ */
+ parent_id?: Snowflake | null | undefined;
+}[];
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions
+ */
+export type RESTPatchAPIGuildChannelPositionsResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#list-active-guild-threads
+ */
+export type RESTGetAPIGuildThreadsResult = Omit<APIThreadList, 'has_more'>;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-member
+ */
+export type RESTGetAPIGuildMemberResult = APIGuildMember;
+/**
+ * https://discord.com/developers/docs/resources/guild#list-guild-members
+ */
+export interface RESTGetAPIGuildMembersQuery {
+ /**
+ * Max number of members to return (1-1000)
+ *
+ * @default 1
+ */
+ limit?: number;
+ /**
+ * The highest user id in the previous page
+ *
+ * @default 0
+ */
+ after?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#list-guild-members
+ */
+export type RESTGetAPIGuildMembersResult = APIGuildMember[];
+/**
+ * https://discord.com/developers/docs/resources/guild#search-guild-members
+ */
+export interface RESTGetAPIGuildMembersSearchQuery {
+ /**
+ * Query string to match username(s) and nickname(s) against
+ */
+ query: string;
+ /**
+ * Max number of members to return (1-1000)
+ *
+ * @default 1
+ */
+ limit?: number;
+}
+export type RESTGetAPIGuildMembersSearchResult = APIGuildMember[];
+/**
+ * https://discord.com/developers/docs/resources/guild#add-guild-member
+ */
+export interface RESTPutAPIGuildMemberJSONBody {
+ /**
+ * An oauth2 access token granted with the `guilds.join` to the bot's application for the user you want to add to the guild
+ */
+ access_token: string;
+ /**
+ * Value to set users nickname to
+ *
+ * Requires `MANAGE_NICKNAMES` permission
+ */
+ nick?: string | undefined;
+ /**
+ * Array of role ids the member is assigned
+ *
+ * Requires `MANAGE_ROLES` permission
+ */
+ roles?: Snowflake[] | undefined;
+ /**
+ * Whether the user is muted in voice channels
+ *
+ * Requires `MUTE_MEMBERS` permission
+ */
+ mute?: boolean | undefined;
+ /**
+ * Whether the user is deafened in voice channels
+ *
+ * Requires `DEAFEN_MEMBERS` permission
+ */
+ deaf?: boolean | undefined;
+}
+export type RESTPutAPIGuildMemberResult = APIGuildMember | never;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-member
+ */
+export interface RESTPatchAPIGuildMemberJSONBody {
+ /**
+ * Value to set users nickname to
+ *
+ * Requires `MANAGE_NICKNAMES` permission
+ */
+ nick?: string | null | undefined;
+ /**
+ * Array of role ids the member is assigned
+ *
+ * Requires `MANAGE_ROLES` permission
+ */
+ roles?: Snowflake[] | null | undefined;
+ /**
+ * Whether the user is muted in voice channels. Will throw a 400 if the user is not in a voice channel
+ *
+ * Requires `MUTE_MEMBERS` permission
+ */
+ mute?: boolean | null | undefined;
+ /**
+ * Whether the user is deafened in voice channels. Will throw a 400 if the user is not in a voice channel
+ *
+ * Requires `DEAFEN_MEMBERS` permission
+ */
+ deaf?: boolean | null | undefined;
+ /**
+ * ID of channel to move user to (if they are connected to voice)
+ *
+ * Requires `MOVE_MEMBERS` permission
+ */
+ channel_id?: Snowflake | null | undefined;
+ /**
+ * Timestamp of when the time out will be removed; until then, they cannot interact with the guild
+ */
+ communication_disabled_until?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#add-guild-member
+ */
+export type RESTPatchAPIGuildMemberResult = APIGuildMember;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-current-user-nick
+ *
+ * @deprecated Use [Modify Current Member](https://discord.com/developers/docs/resources/guild#modify-current-member) instead.
+ */
+export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody {
+ /**
+ * Value to set users nickname to
+ *
+ * Requires `CHANGE_NICKNAME` permission
+ */
+ nick?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-current-member
+ */
+export interface RESTPatchAPICurrentGuildMemberJSONBody {
+ /**
+ * Value to set users nickname to
+ *
+ * Requires `CHANGE_NICKNAME` permission
+ */
+ nick?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-current-user-nick
+ *
+ * @deprecated Use [Modify Current Member](https://discord.com/developers/docs/resources/guild#modify-current-member) instead.
+ */
+export type RESTPatchAPICurrentGuildMemberNicknameResult = StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
+/**
+ * https://discord.com/developers/docs/resources/guild#add-guild-member-role
+ */
+export type RESTPutAPIGuildMemberRoleResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#remove-guild-member-role
+ */
+export type RESTDeleteAPIGuildMemberRoleResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#remove-guild-member
+ */
+export type RESTDeleteAPIGuildMemberResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-bans
+ */
+export type RESTGetAPIGuildBansResult = APIBan[];
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-bans
+ */
+export interface RESTGetAPIGuildBansQuery {
+ /**
+ * Consider only users before given user id
+ */
+ before?: Snowflake;
+ /**
+ * Consider only users after given user id
+ */
+ after?: Snowflake;
+ /**
+ * Number of users to return (1-1000)
+ *
+ * @default 1000
+ */
+ limit?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-ban
+ */
+export type RESTGetAPIGuildBanResult = APIBan;
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-ban
+ */
+export interface RESTPutAPIGuildBanJSONBody {
+ /**
+ * Number of days to delete messages for (0-7)
+ *
+ * @deprecated use `delete_message_seconds` instead
+ */
+ delete_message_days?: number | undefined;
+ /**
+ * Number of seconds to delete messages for, between 0 and 604800 (7 days)
+ */
+ delete_message_seconds?: number | undefined;
+ /**
+ * Reason for the ban
+ *
+ * @deprecated Removed in API v10, use the `X-Audit-Log-Reason` header instead.
+ */
+ reason?: string | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-ban
+ */
+export type RESTPutAPIGuildBanResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#remove-guild-ban
+ */
+export type RESTDeleteAPIGuildBanResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-roles
+ */
+export type RESTGetAPIGuildRolesResult = APIRole[];
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-role
+ */
+export interface RESTPostAPIGuildRoleJSONBody {
+ /**
+ * Name of the role
+ *
+ * @default "new role"
+ */
+ name?: string | null | undefined;
+ /**
+ * Bitwise value of the enabled/disabled permissions
+ *
+ * @default "default role permissions in guild"
+ */
+ permissions?: Permissions | null | undefined;
+ /**
+ * RGB color value
+ *
+ * @default 0
+ */
+ color?: number | null | undefined;
+ /**
+ * Whether the role should be displayed separately in the sidebar
+ *
+ * @default false
+ */
+ hoist?: boolean | null | undefined;
+ /**
+ * The role's icon image (if the guild has the `ROLE_ICONS` feature)
+ */
+ icon?: string | null | undefined;
+ /**
+ * The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature)
+ */
+ unicode_emoji?: string | null | undefined;
+ /**
+ * Whether the role should be mentionable
+ *
+ * @default false
+ */
+ mentionable?: boolean | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#create-guild-role
+ */
+export type RESTPostAPIGuildRoleResult = APIRole;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-role-positions
+ */
+export type RESTPatchAPIGuildRolePositionsJSONBody = {
+ /**
+ * Role id
+ */
+ id: Snowflake;
+ /**
+ * Sorting position of the role
+ */
+ position?: number | undefined;
+}[];
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-role-positions
+ */
+export type RESTPatchAPIGuildRolePositionsResult = APIRole[];
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-role
+ */
+export interface RESTPatchAPIGuildRoleJSONBody {
+ /**
+ * Name of the role
+ */
+ name?: string | null | undefined;
+ /**
+ * Bitwise value of the enabled/disabled permissions
+ */
+ permissions?: Permissions | null | undefined;
+ /**
+ * RGB color value
+ */
+ color?: number | null | undefined;
+ /**
+ * Whether the role should be displayed separately in the sidebar
+ */
+ hoist?: boolean | null | undefined;
+ /**
+ * The role's icon image (if the guild has the `ROLE_ICONS` feature)
+ */
+ icon?: string | null | undefined;
+ /**
+ * The role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature)
+ */
+ unicode_emoji?: string | null | undefined;
+ /**
+ * Whether the role should be mentionable
+ */
+ mentionable?: boolean | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-role
+ */
+export type RESTPatchAPIGuildRoleResult = APIRole;
+/**
+ * https://discord.com/developers/docs/resources/guild#delete-guild-role
+ */
+export type RESTDeleteAPIGuildRoleResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-prune-count
+ */
+export interface RESTGetAPIGuildPruneCountQuery {
+ /**
+ * Number of days to count prune for (1 or more)
+ *
+ * @default 7
+ */
+ days?: number;
+ /**
+ * Role(s) to include
+ *
+ * While this is typed as a string, it represents an array of
+ * role IDs delimited by commas
+ *
+ * See https://discord.com/developers/docs/resources/guild#get-guild-prune-count-query-string-params
+ */
+ include_roles?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-prune-count
+ */
+export interface RESTGetAPIGuildPruneCountResult {
+ pruned: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#begin-guild-prune
+ */
+export interface RESTPostAPIGuildPruneJSONBody {
+ /**
+ * Number of days to count prune for (1 or more)
+ *
+ * @default 7
+ */
+ days?: number | undefined;
+ /**
+ * Whether `pruned is returned, discouraged for large guilds
+ *
+ * @default true
+ */
+ compute_prune_count?: boolean | undefined;
+ /**
+ * Role(s) to include
+ */
+ include_roles?: Snowflake[] | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#begin-guild-prune
+ */
+export interface RESTPostAPIGuildPruneResult {
+ pruned: number | null;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-voice-regions
+ */
+export type RESTGetAPIGuildVoiceRegionsResult = APIVoiceRegion[];
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-invites
+ */
+export type RESTGetAPIGuildInvitesResult = APIExtendedInvite[];
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-integrations
+ */
+export type RESTGetAPIGuildIntegrationsResult = APIGuildIntegration[];
+/**
+ * https://discord.com/developers/docs/resources/guild#delete-guild-integration
+ */
+export type RESTDeleteAPIGuildIntegrationResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-settings
+ */
+export type RESTGetAPIGuildWidgetSettingsResult = APIGuildWidgetSettings;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-widget
+ */
+export type RESTPatchAPIGuildWidgetSettingsJSONBody = StrictPartial<APIGuildWidgetSettings>;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-widget
+ */
+export type RESTPatchAPIGuildWidgetSettingsResult = APIGuildWidgetSettings;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget
+ */
+export type RESTGetAPIGuildWidgetJSONResult = APIGuildWidget;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-vanity-url
+ */
+export interface RESTGetAPIGuildVanityUrlResult {
+ code: string | null;
+ uses: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-image
+ */
+export interface RESTGetAPIGuildWidgetImageQuery {
+ /**
+ * Style of the widget image returned
+ *
+ * @default "shield"
+ */
+ style?: GuildWidgetStyle;
+}
+/**
+ * Note: while the return type is `ArrayBuffer`, the expected result is
+ * a buffer of sorts (depends if in browser or on node.js/deno).
+ */
+export type RESTGetAPIGuildWidgetImageResult = ArrayBuffer;
+export type RESTGetAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
+export interface RESTPatchAPIGuildMemberVerificationJSONBody {
+ /**
+ * Whether Membership Screening is enabled
+ */
+ enabled?: boolean | undefined;
+ /**
+ * Array of field objects serialized in a string
+ */
+ form_fields?: string | undefined;
+ /**
+ * The server description to show in the screening form
+ */
+ description?: string | null | undefined;
+}
+export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
+ */
+export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
+ /**
+ * The id of the channel the user is currently in
+ */
+ channel_id?: Snowflake | undefined;
+ /**
+ * Toggles the user's suppress state
+ */
+ suppress?: boolean | undefined;
+ /**
+ * Sets the user's request to speak
+ */
+ request_to_speak_timestamp?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
+ */
+export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-user-voice-state
+ */
+export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
+ /**
+ * The id of the channel the user is currently in
+ */
+ channel_id: Snowflake;
+ /**
+ * Toggles the user's suppress state
+ */
+ suppress?: boolean | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-user-voice-state
+ */
+export type RESTPatchAPIGuildVoiceStateUserResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen
+ */
+export type RESTGetAPIGuildWelcomeScreenResult = APIGuildWelcomeScreen;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen
+ */
+export type RESTPatchAPIGuildWelcomeScreenJSONBody = Nullable<StrictPartial<APIGuildWelcomeScreen>> & {
+ /**
+ * Whether the welcome screen is enabled
+ */
+ enabled?: boolean | null | undefined;
+};
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen
+ */
+export type RESTPatchAPIGuildWelcomeScreenResult = APIGuildWelcomeScreen;
+/**
+ * https://discord.com/developers/docs/resources/guild#get-guild-onboarding
+ */
+export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
+ */
+export type RESTPutAPIGuildOnboardingJSONBody = Pick<APIGuildOnboarding, 'default_channel_ids' | 'enabled' | 'mode' | 'prompts'>;
+/**
+ * https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
+ */
+export type RESTPutAPIGuildOnboardingResult = APIGuildOnboarding;
+//# sourceMappingURL=guild.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/guild.d.ts.map b/node_modules/discord-api-types/rest/v9/guild.d.ts.map
new file mode 100644
index 0000000..0c7cb2f
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/guild.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"guild.d.ts","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EACX,MAAM,EACN,UAAU,EACV,iBAAiB,EACjB,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,2BAA2B,EAC3B,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,sBAAsB,EACtB,OAAO,EACP,aAAa,EACb,cAAc,EACd,gCAAgC,EAChC,0BAA0B,EAC1B,YAAY,EACZ,aAAa,EACb,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACX,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,aAAa,EACb,cAAc,EACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,WAAW,CAA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G,SAAS,CAAC;CACrC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,qBAAqB,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,kBAAkB,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,IAAI,CACnD,kBAAkB,EAClB,qBAAqB,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CACtD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,kBAAkB,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/guild.js b/node_modules/discord-api-types/rest/v9/guild.js
new file mode 100644
index 0000000..39864d9
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/guild.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=guild.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/guild.js.map b/node_modules/discord-api-types/rest/v9/guild.js.map
new file mode 100644
index 0000000..22534b0
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/guild.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"guild.js","sourceRoot":"","sources":["guild.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/guildScheduledEvent.d.ts b/node_modules/discord-api-types/rest/v9/guildScheduledEvent.d.ts
new file mode 100644
index 0000000..e728025
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/guildScheduledEvent.d.ts
@@ -0,0 +1,127 @@
+import type { Snowflake } from '../../globals';
+import type { StrictPartial } from '../../utils/internals';
+import type { APIGuildScheduledEvent, GuildScheduledEventEntityType, GuildScheduledEventPrivacyLevel, APIGuildScheduledEventEntityMetadata, GuildScheduledEventStatus, APIGuildScheduledEventUser } from '../../v9';
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild
+ */
+export interface RESTGetAPIGuildScheduledEventsQuery {
+ /**
+ * Whether to include number of users subscribed to each event
+ */
+ with_user_count?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild
+ */
+export type RESTGetAPIGuildScheduledEventsResult = APIGuildScheduledEvent[];
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event
+ */
+export interface RESTPostAPIGuildScheduledEventJSONBody {
+ /**
+ * The stage channel id of the guild event
+ */
+ channel_id?: Snowflake | undefined;
+ /**
+ * The name of the guild event
+ */
+ name: string;
+ /**
+ * The privacy level of the guild event
+ */
+ privacy_level: GuildScheduledEventPrivacyLevel;
+ /**
+ * The time to schedule the guild event at
+ */
+ scheduled_start_time: string;
+ /**
+ * The time when the scheduled event is scheduled to end
+ */
+ scheduled_end_time?: string | undefined;
+ /**
+ * The description of the guild event
+ */
+ description?: string | undefined;
+ /**
+ * The scheduled entity type of the guild event
+ */
+ entity_type?: GuildScheduledEventEntityType | undefined;
+ /**
+ * The entity metadata of the scheduled event
+ */
+ entity_metadata?: APIGuildScheduledEventEntityMetadata | undefined;
+ /**
+ * The cover image of the scheduled event
+ */
+ image?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event
+ */
+export type RESTPostAPIGuildScheduledEventResult = APIGuildScheduledEvent;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event
+ */
+export interface RESTGetAPIGuildScheduledEventQuery {
+ /**
+ * Whether to include number of users subscribed to this event
+ */
+ with_user_count?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event
+ */
+export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
+ */
+export type RESTPatchAPIGuildScheduledEventJSONBody = StrictPartial<RESTPostAPIGuildScheduledEventJSONBody> & {
+ /**
+ * The status of the scheduled event
+ */
+ status?: GuildScheduledEventStatus | undefined;
+ /**
+ * The entity metadata of the scheduled event
+ */
+ entity_metadata?: APIGuildScheduledEventEntityMetadata | null | undefined;
+ /**
+ * The description of the guild event
+ */
+ description?: string | null | undefined;
+};
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
+ */
+export type RESTPatchAPIGuildScheduledEventResult = APIGuildScheduledEvent;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event
+ */
+export type RESTDeleteAPIGuildScheduledEventResult = never;
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users
+ */
+export interface RESTGetAPIGuildScheduledEventUsersQuery {
+ /**
+ * Number of users to receive from the event
+ *
+ * @default 100
+ */
+ limit?: number;
+ /**
+ * Whether to include guild member data if it exists
+ */
+ with_member?: boolean;
+ /**
+ * Consider only users before given user id
+ */
+ before?: Snowflake;
+ /**
+ * Consider only users after given user id
+ */
+ after?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users
+ */
+export type RESTGetAPIGuildScheduledEventUsersResult = APIGuildScheduledEventUser[];
+//# sourceMappingURL=guildScheduledEvent.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/guildScheduledEvent.d.ts.map b/node_modules/discord-api-types/rest/v9/guildScheduledEvent.d.ts.map
new file mode 100644
index 0000000..9f95a67
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/guildScheduledEvent.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"guildScheduledEvent.d.ts","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EACX,sBAAsB,EACtB,6BAA6B,EAC7B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OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,sBAAsB,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,KAAK,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACvD;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,wCAAwC,GAAG,0BAA0B,EAAE,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/guildScheduledEvent.js b/node_modules/discord-api-types/rest/v9/guildScheduledEvent.js
new file mode 100644
index 0000000..e9e95e3
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/guildScheduledEvent.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=guildScheduledEvent.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/guildScheduledEvent.js.map b/node_modules/discord-api-types/rest/v9/guildScheduledEvent.js.map
new file mode 100644
index 0000000..98c4d81
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/guildScheduledEvent.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"guildScheduledEvent.js","sourceRoot":"","sources":["guildScheduledEvent.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/index.d.ts b/node_modules/discord-api-types/rest/v9/index.d.ts
new file mode 100644
index 0000000..392349b
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/index.d.ts
@@ -0,0 +1,817 @@
+import type { Snowflake } from '../../globals';
+export * from '../common';
+export * from './application';
+export * from './auditLog';
+export * from './autoModeration';
+export * from './channel';
+export * from './emoji';
+export * from './gateway';
+export * from './guild';
+export * from './guildScheduledEvent';
+export * from './interactions';
+export * from './invite';
+export * from './oauth2';
+export * from './stageInstance';
+export * from './sticker';
+export * from './template';
+export * from './user';
+export * from './voice';
+export * from './webhook';
+export declare const APIVersion = "9";
+export declare const Routes: {
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/role-connections/metadata`
+ * - PUT `/applications/{application.id}/role-connections/metadata`
+ */
+ applicationRoleConnectionMetadata(applicationId: Snowflake): `/applications/${string}/role-connections/metadata`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/auto-moderation/rules`
+ * - POST `/guilds/{guild.id}/auto-moderation/rules`
+ */
+ guildAutoModerationRules(guildId: Snowflake): `/guilds/${string}/auto-moderation/rules`;
+ /**
+ * Routes for:
+ * - GET `/guilds/{guild.id}/auto-moderation/rules/{rule.id}`
+ * - PATCH `/guilds/{guild.id}/auto-moderation/rules/{rule.id}`
+ * - DELETE `/guilds/{guild.id}/auto-moderation/rules/{rule.id}`
+ */
+ guildAutoModerationRule(guildId: Snowflake, ruleId: Snowflake): `/guilds/${string}/auto-moderation/rules/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/audit-logs`
+ */
+ guildAuditLog(guildId: Snowflake): `/guilds/${string}/audit-logs`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}`
+ * - PATCH `/channels/{channel.id}`
+ * - DELETE `/channels/{channel.id}`
+ */
+ channel(channelId: Snowflake): `/channels/${string}`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages`
+ * - POST `/channels/{channel.id}/messages`
+ */
+ channelMessages(channelId: Snowflake): `/channels/${string}/messages`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages/{message.id}`
+ * - PATCH `/channels/{channel.id}/messages/{message.id}`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}`
+ */
+ channelMessage(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}`;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/messages/{message.id}/crosspost`
+ */
+ channelMessageCrosspost(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}/crosspost`;
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageOwnReaction(channelId: Snowflake, messageId: Snowflake, emoji: string): `/channels/${string}/messages/${string}/reactions/${string}/@me`;
+ /**
+ * Route for:
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/{user.id}`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageUserReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, userId: Snowflake): `/channels/${string}/messages/${string}/reactions/${string}/${string}`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string): `/channels/${string}/messages/${string}/reactions/${string}`;
+ /**
+ * Route for:
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions`
+ */
+ channelMessageAllReactions(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/messages/${string}/reactions`;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/messages/bulk-delete`
+ */
+ channelBulkDelete(channelId: Snowflake): `/channels/${string}/messages/bulk-delete`;
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/permissions/{overwrite.id}`
+ * - DELETE `/channels/{channel.id}/permissions/{overwrite.id}`
+ */
+ channelPermission(channelId: Snowflake, overwriteId: Snowflake): `/channels/${string}/permissions/${string}`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/invites`
+ * - POST `/channels/{channel.id}/invites`
+ */
+ channelInvites(channelId: Snowflake): `/channels/${string}/invites`;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/followers`
+ */
+ channelFollowers(channelId: Snowflake): `/channels/${string}/followers`;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/typing`
+ */
+ channelTyping(channelId: Snowflake): `/channels/${string}/typing`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/pins`
+ */
+ channelPins(channelId: Snowflake): `/channels/${string}/pins`;
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/pins/{message.id}`
+ * - DELETE `/channels/{channel.id}/pins/{message.id}`
+ */
+ channelPin(channelId: Snowflake, messageId: Snowflake): `/channels/${string}/pins/${string}`;
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/recipients/{user.id}`
+ * - DELETE `/channels/{channel.id}/recipients/{user.id}`
+ */
+ channelRecipient(channelId: Snowflake, userId: Snowflake): `/channels/${string}/recipients/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/emojis`
+ * - POST `/guilds/{guild.id}/emojis`
+ */
+ guildEmojis(guildId: Snowflake): `/guilds/${string}/emojis`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/emojis/{emoji.id}`
+ * - PATCH `/guilds/{guild.id}/emojis/{emoji.id}`
+ * - DELETE `/guilds/{guild.id}/emojis/{emoji.id}`
+ */
+ guildEmoji(guildId: Snowflake, emojiId: Snowflake): `/guilds/${string}/emojis/${string}`;
+ /**
+ * Route for:
+ * - POST `/guilds`
+ */
+ guilds(): "/guilds";
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}`
+ * - PATCH `/guilds/{guild.id}`
+ * - DELETE `/guilds/{guild.id}`
+ */
+ guild(guildId: Snowflake): `/guilds/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/preview`
+ */
+ guildPreview(guildId: Snowflake): `/guilds/${string}/preview`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/channels`
+ * - POST `/guilds/{guild.id}/channels`
+ * - PATCH `/guilds/{guild.id}/channels`
+ */
+ guildChannels(guildId: Snowflake): `/guilds/${string}/channels`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members/{user.id}`
+ * - PUT `/guilds/{guild.id}/members/{user.id}`
+ * - PATCH `/guilds/{guild.id}/members/@me`
+ * - PATCH `/guilds/{guild.id}/members/{user.id}`
+ * - DELETE `/guilds/{guild.id}/members/{user.id}`
+ */
+ guildMember(guildId: Snowflake, userId?: Snowflake | '@me'): `/guilds/${string}/members/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members`
+ */
+ guildMembers(guildId: Snowflake): `/guilds/${string}/members`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members/search`
+ */
+ guildMembersSearch(guildId: Snowflake): `/guilds/${string}/members/search`;
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/members/@me/nick`
+ *
+ * @deprecated Use {@link Routes.guildMember} instead.
+ */
+ guildCurrentMemberNickname(guildId: Snowflake): `/guilds/${string}/members/@me/nick`;
+ /**
+ * Route for:
+ * - PUT `/guilds/{guild.id}/members/{user.id}/roles/{role.id}`
+ * - DELETE `/guilds/{guild.id}/members/{user.id}/roles/{role.id}`
+ */
+ guildMemberRole(guildId: Snowflake, memberId: Snowflake, roleId: Snowflake): `/guilds/${string}/members/${string}/roles/${string}`;
+ /**
+ * Route for:
+ * - POST `/guilds/{guild.id}/mfa`
+ */
+ guildMFA(guildId: Snowflake): `/guilds/${string}/mfa`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/bans`
+ */
+ guildBans(guildId: Snowflake): `/guilds/${string}/bans`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/bans/{user.id}`
+ * - PUT `/guilds/{guild.id}/bans/{user.id}`
+ * - DELETE `/guilds/{guild.id}/bans/{user.id}`
+ */
+ guildBan(guildId: Snowflake, userId: Snowflake): `/guilds/${string}/bans/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/roles`
+ * - POST `/guilds/{guild.id}/roles`
+ * - PATCH `/guilds/{guild.id}/roles`
+ */
+ guildRoles(guildId: Snowflake): `/guilds/${string}/roles`;
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/roles/{role.id}`
+ * - DELETE `/guilds/{guild.id}/roles/{role.id}`
+ */
+ guildRole(guildId: Snowflake, roleId: Snowflake): `/guilds/${string}/roles/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/prune`
+ * - POST `/guilds/{guild.id}/prune`
+ */
+ guildPrune(guildId: Snowflake): `/guilds/${string}/prune`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/regions`
+ */
+ guildVoiceRegions(guildId: Snowflake): `/guilds/${string}/regions`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/invites`
+ */
+ guildInvites(guildId: Snowflake): `/guilds/${string}/invites`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/integrations`
+ */
+ guildIntegrations(guildId: Snowflake): `/guilds/${string}/integrations`;
+ /**
+ * Route for:
+ * - DELETE `/guilds/{guild.id}/integrations/{integration.id}`
+ */
+ guildIntegration(guildId: Snowflake, integrationId: Snowflake): `/guilds/${string}/integrations/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget`
+ * - PATCH `/guilds/{guild.id}/widget`
+ */
+ guildWidgetSettings(guildId: Snowflake): `/guilds/${string}/widget`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget.json`
+ */
+ guildWidgetJSON(guildId: Snowflake): `/guilds/${string}/widget.json`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/vanity-url`
+ */
+ guildVanityUrl(guildId: Snowflake): `/guilds/${string}/vanity-url`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget.png`
+ */
+ guildWidgetImage(guildId: Snowflake): `/guilds/${string}/widget.png`;
+ /**
+ * Route for:
+ * - GET `/invites/{invite.code}`
+ * - DELETE `/invites/{invite.code}`
+ */
+ invite(code: string): `/invites/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/templates/{template.code}`
+ * - POST `/guilds/templates/{template.code}`
+ */
+ template(code: string): `/guilds/templates/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/templates`
+ * - POST `/guilds/{guild.id}/templates`
+ */
+ guildTemplates(guildId: Snowflake): `/guilds/${string}/templates`;
+ /**
+ * Route for:
+ * - PUT `/guilds/{guild.id}/templates/{template.code}`
+ * - PATCH `/guilds/{guild.id}/templates/{template.code}`
+ * - DELETE `/guilds/{guild.id}/templates/{template.code}`
+ */
+ guildTemplate(guildId: Snowflake, code: string): `/guilds/${string}/templates/${string}`;
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/threads`
+ * - POST `/channels/{channel.id}/messages/{message.id}/threads`
+ */
+ threads(parentId: Snowflake, messageId?: Snowflake): `/channels/${string}/threads` | `/channels/${string}/messages/${string}/threads`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/threads/active`
+ */
+ guildActiveThreads(guildId: Snowflake): `/guilds/${string}/threads/active`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/threads/active`
+ * (deprecated, removed in API v10, use [List Active Guild Threads](https://discord.com/developers/docs/resources/guild#list-active-threads) instead.)
+ * - GET `/channels/{channel.id}/threads/archived/public`
+ * - GET `/channels/{channel.id}/threads/archived/private`
+ */
+ channelThreads(channelId: Snowflake, archived?: 'public' | 'private'): `/channels/${string}/threads/active` | `/channels/${string}/threads/archived/public` | `/channels/${string}/threads/archived/private`;
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/users/@me/threads/archived/private`
+ */
+ channelJoinedArchivedThreads(channelId: Snowflake): `/channels/${string}/users/@me/threads/archived/private`;
+ /**
+ * Route for:
+ * - GET `/channels/{thread.id}/thread-members`
+ * - GET `/channels/{thread.id}/thread-members/{user.id}`
+ * - PUT `/channels/{thread.id}/thread-members/@me`
+ * - PUT `/channels/{thread.id}/thread-members/{user.id}`
+ * - DELETE `/channels/{thread.id}/thread-members/@me`
+ * - DELETE `/channels/{thread.id}/thread-members/{user.id}`
+ */
+ threadMembers(threadId: Snowflake, userId?: Snowflake | '@me'): `/channels/${string}/thread-members` | `/channels/${string}/thread-members/${string}`;
+ /**
+ * Route for:
+ * - GET `/users/@me`
+ * - GET `/users/{user.id}`
+ * - PATCH `/users/@me`
+ *
+ * @param [userId] The user ID, defaulted to `@me`
+ */
+ user(userId?: Snowflake | '@me'): `/users/${string}`;
+ /**
+ * Route for:
+ * - GET `/users/@me/applications/{application.id}/role-connection`
+ * - PUT `/users/@me/applications/{application.id}/role-connection`
+ */
+ userApplicationRoleConnection(applicationId: Snowflake): `/users/@me/applications/${string}/role-connection`;
+ /**
+ * Route for:
+ * - GET `/users/@me/guilds`
+ */
+ userGuilds(): "/users/@me/guilds";
+ /**
+ * Route for:
+ * - GET `/users/@me/guilds/{guild.id}/member`
+ */
+ userGuildMember(guildId: Snowflake): `/users/@me/guilds/${string}/member`;
+ /**
+ * Route for:
+ * - DELETE `/users/@me/guilds/{guild.id}`
+ */
+ userGuild(guildId: Snowflake): `/users/@me/guilds/${string}`;
+ /**
+ * Route for:
+ * - POST `/users/@me/channels`
+ */
+ userChannels(): "/users/@me/channels";
+ /**
+ * Route for:
+ * - GET `/users/@me/connections`
+ */
+ userConnections(): "/users/@me/connections";
+ /**
+ * Route for:
+ * - GET `/voice/regions`
+ */
+ voiceRegions(): "/voice/regions";
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/webhooks`
+ * - POST `/channels/{channel.id}/webhooks`
+ */
+ channelWebhooks(channelId: Snowflake): `/channels/${string}/webhooks`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/webhooks`
+ */
+ guildWebhooks(guildId: Snowflake): `/guilds/${string}/webhooks`;
+ /**
+ * Route for:
+ * - GET `/webhooks/{webhook.id}`
+ * - GET `/webhooks/{webhook.id}/{webhook.token}`
+ * - PATCH `/webhooks/{webhook.id}`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}`
+ * - DELETE `/webhooks/{webhook.id}`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}`
+ * - POST `/webhooks/{webhook.id}/{webhook.token}`
+ *
+ * - POST `/webhooks/{application.id}/{interaction.token}`
+ */
+ webhook(webhookId: Snowflake, webhookToken?: string): `/webhooks/${string}` | `/webhooks/${string}/${string}`;
+ /**
+ * Route for:
+ * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ *
+ * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/@original`
+ * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/{message.id}`
+ * - DELETE `/webhooks/{application.id}/{interaction.token}/messages/{message.id}`
+ */
+ webhookMessage(webhookId: Snowflake, webhookToken: string, messageId?: Snowflake | '@original'): `/webhooks/${string}/${string}/messages/${string}`;
+ /**
+ * Route for:
+ * - POST `/webhooks/{webhook.id}/{webhook.token}/github`
+ * - POST `/webhooks/{webhook.id}/{webhook.token}/slack`
+ */
+ webhookPlatform(webhookId: Snowflake, webhookToken: string, platform: 'github' | 'slack'): `/webhooks/${string}/${string}/github` | `/webhooks/${string}/${string}/slack`;
+ /**
+ * Route for:
+ * - GET `/gateway`
+ */
+ gateway(): "/gateway";
+ /**
+ * Route for:
+ * - GET `/gateway/bot`
+ */
+ gatewayBot(): "/gateway/bot";
+ /**
+ * Route for:
+ * - GET `/oauth2/applications/@me`
+ */
+ oauth2CurrentApplication(): "/oauth2/applications/@me";
+ /**
+ * Route for:
+ * - GET `/oauth2/@me`
+ */
+ oauth2CurrentAuthorization(): "/oauth2/@me";
+ /**
+ * Route for:
+ * - GET `/oauth2/authorize`
+ */
+ oauth2Authorization(): "/oauth2/authorize";
+ /**
+ * Route for:
+ * - POST `/oauth2/token`
+ */
+ oauth2TokenExchange(): "/oauth2/token";
+ /**
+ * Route for:
+ * - POST `/oauth2/token/revoke`
+ */
+ oauth2TokenRevocation(): "/oauth2/token/revoke";
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/commands`
+ * - PUT `/applications/{application.id}/commands`
+ * - POST `/applications/{application.id}/commands`
+ */
+ applicationCommands(applicationId: Snowflake): `/applications/${string}/commands`;
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/commands/{command.id}`
+ * - PATCH `/applications/{application.id}/commands/{command.id}`
+ * - DELETE `/applications/{application.id}/commands/{command.id}`
+ */
+ applicationCommand(applicationId: Snowflake, commandId: Snowflake): `/applications/${string}/commands/${string}`;
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands`
+ * - POST `/applications/{application.id}/guilds/{guild.id}/commands`
+ */
+ applicationGuildCommands(applicationId: Snowflake, guildId: Snowflake): `/applications/${string}/guilds/${string}/commands`;
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ * - PATCH `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ * - DELETE `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ */
+ applicationGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake): `/applications/${string}/guilds/${string}/commands/${string}`;
+ /**
+ * Route for:
+ * - POST `/interactions/{interaction.id}/{interaction.token}/callback`
+ */
+ interactionCallback(interactionId: Snowflake, interactionToken: string): `/interactions/${string}/${string}/callback`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/member-verification`
+ * - PATCH `/guilds/{guild.id}/member-verification`
+ */
+ guildMemberVerification(guildId: Snowflake): `/guilds/${string}/member-verification`;
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/voice-states/@me`
+ * - PATCH `/guilds/{guild.id}/voice-states/{user.id}`
+ */
+ guildVoiceState(guildId: Snowflake, userId?: Snowflake | '@me'): `/guilds/${string}/voice-states/${string}`;
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/permissions`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/permissions`
+ */
+ guildApplicationCommandsPermissions(applicationId: Snowflake, guildId: Snowflake): `/applications/${string}/guilds/${string}/commands/permissions`;
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions`
+ */
+ applicationCommandPermissions(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake): `/applications/${string}/guilds/${string}/commands/${string}/permissions`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/welcome-screen`
+ * - PATCH `/guilds/{guild.id}/welcome-screen`
+ */
+ guildWelcomeScreen(guildId: Snowflake): `/guilds/${string}/welcome-screen`;
+ /**
+ * Route for:
+ * - POST `/stage-instances`
+ */
+ stageInstances(): "/stage-instances";
+ /**
+ * Route for:
+ * - GET `/stage-instances/{channel.id}`
+ * - PATCH `/stage-instances/{channel.id}`
+ * - DELETE `/stage-instances/{channel.id}`
+ */
+ stageInstance(channelId: Snowflake): `/stage-instances/${string}`;
+ /**
+ * Route for:
+ * - GET `/stickers/{sticker.id}`
+ */
+ sticker(stickerId: Snowflake): `/stickers/${string}`;
+ /**
+ * Route for:
+ * - GET `/sticker-packs`
+ */
+ nitroStickerPacks(): "/sticker-packs";
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/stickers`
+ * - POST `/guilds/{guild.id}/stickers`
+ */
+ guildStickers(guildId: Snowflake): `/guilds/${string}/stickers`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/stickers/{sticker.id}`
+ * - PATCH `/guilds/{guild.id}/stickers/{sticker.id}`
+ * - DELETE `/guilds/{guild.id}/stickers/{sticker.id}`
+ */
+ guildSticker(guildId: Snowflake, stickerId: Snowflake): `/guilds/${string}/stickers/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events`
+ * - POST `/guilds/{guild.id}/scheduled-events`
+ */
+ guildScheduledEvents(guildId: Snowflake): `/guilds/${string}/scheduled-events`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ * - PATCH `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ * - DELETE `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ */
+ guildScheduledEvent(guildId: Snowflake, guildScheduledEventId: Snowflake): `/guilds/${string}/scheduled-events/${string}`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}/users`
+ */
+ guildScheduledEventUsers(guildId: Snowflake, guildScheduledEventId: Snowflake): `/guilds/${string}/scheduled-events/${string}/users`;
+ /**
+ * Route for:
+ * - GET `/guilds/${guild.id}/onboarding`
+ * - PUT `/guilds/${guild.id}/onboarding`
+ */
+ guildOnboarding(guildId: Snowflake): `/guilds/${string}/onboarding`;
+ /**
+ * Route for:
+ * - GET `/applications/@me`
+ */
+ currentApplication(): "/applications/@me";
+};
+export declare const StickerPackApplicationId = "710982414301790216";
+export declare const CDNRoutes: {
+ /**
+ * Route for:
+ * - GET `/emojis/{emoji.id}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ emoji(emojiId: Snowflake, format: EmojiFormat): `/emojis/${string}.jpeg` | `/emojis/${string}.png` | `/emojis/${string}.webp` | `/emojis/${string}.gif`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/icons/{guild.id}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ guildIcon(guildId: Snowflake, guildIcon: string, format: GuildIconFormat): `icons/${string}/${string}.jpeg` | `icons/${string}/${string}.png` | `icons/${string}/${string}.webp` | `icons/${string}/${string}.gif`;
+ /**
+ * Route for:
+ * - GET `/splashes/{guild.id}/{guild.splash}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ guildSplash(guildId: Snowflake, guildSplash: string, format: GuildSplashFormat): `/splashes/${string}/${string}.jpeg` | `/splashes/${string}/${string}.png` | `/splashes/${string}/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/discovery-splashes/{guild.id}/{guild.discovery_splash}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ guildDiscoverySplash(guildId: Snowflake, guildDiscoverySplash: string, format: GuildDiscoverySplashFormat): `/discovery-splashes/${string}/${string}.jpeg` | `/discovery-splashes/${string}/${string}.png` | `/discovery-splashes/${string}/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/banners/{guild.id}/{guild.banner}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ guildBanner(guildId: Snowflake, guildBanner: string, format: GuildBannerFormat): `/banners/${string}/${string}.jpeg` | `/banners/${string}/${string}.png` | `/banners/${string}/${string}.webp` | `/banners/${string}/${string}.gif`;
+ /**
+ * Route for:
+ * - GET `/banners/{user.id}/{user.banner}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ userBanner(userId: Snowflake, userBanner: string, format: UserBannerFormat): `/banners/${string}/${string}.jpeg` | `/banners/${string}/${string}.png` | `/banners/${string}/${string}.webp` | `/banners/${string}/${string}.gif`;
+ /**
+ * Route for:
+ * - GET `/embed/avatars/{index}.png`
+ *
+ * The value for `index` parameter depends on whether the user is [migrated to the new username system](https://discord.com/developers/docs/change-log#unique-usernames-on-discord).
+ * For users on the new username system, `index` will be `(user.id >> 22) % 6`.
+ * For users on the legacy username system, `index` will be `user.discriminator % 5`.
+ *
+ * This route supports the extension: PNG
+ */
+ defaultUserAvatar(index: DefaultUserAvatarAssets): "/embed/avatars/0.png" | "/embed/avatars/2.png" | "/embed/avatars/1.png" | "/embed/avatars/3.png" | "/embed/avatars/4.png" | "/embed/avatars/5.png";
+ /**
+ * Route for:
+ * - GET `/avatars/{user.id}/{user.avatar}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ userAvatar(userId: Snowflake, userAvatar: string, format: UserAvatarFormat): `/avatars/${string}/${string}.jpeg` | `/avatars/${string}/${string}.png` | `/avatars/${string}/${string}.webp` | `/avatars/${string}/${string}.gif`;
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/users/{user.id}/{guild_member.avatar}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ guildMemberAvatar(guildId: Snowflake, userId: Snowflake, memberAvatar: string, format: GuildMemberAvatarFormat): `/guilds/${string}/users/${string}/avatars/${string}.jpeg` | `/guilds/${string}/users/${string}/avatars/${string}.png` | `/guilds/${string}/users/${string}/avatars/${string}.webp` | `/guilds/${string}/users/${string}/avatars/${string}.gif`;
+ /**
+ * Route for:
+ * - GET `/avatar-decorations/{user.id}/{user.avatar_decoration}.png`
+ *
+ * This route supports the extension: PNG
+ */
+ userAvatarDecoration(userId: Snowflake, userAvatarDecoration: string): `/avatar-decorations/${string}/${string}.png`;
+ /**
+ * Route for:
+ * - GET `/app-icons/{application.id}/{application.icon}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ applicationIcon(applicationId: Snowflake, applicationIcon: string, format: ApplicationIconFormat): `/app-icons/${string}/${string}.jpeg` | `/app-icons/${string}/${string}.png` | `/app-icons/${string}/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/app-icons/{application.id}/{application.cover_image}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ applicationCover(applicationId: Snowflake, applicationCoverImage: string, format: ApplicationCoverFormat): `/app-icons/${string}/${string}.jpeg` | `/app-icons/${string}/${string}.png` | `/app-icons/${string}/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/app-assets/{application.id}/{application.asset_id}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ applicationAsset(applicationId: Snowflake, applicationAssetId: string, format: ApplicationAssetFormat): `/app-assets/${string}/${string}.jpeg` | `/app-assets/${string}/${string}.png` | `/app-assets/${string}/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/app-assets/{application.id}/achievements/{achievement.id}/icons/{achievement.icon}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ achievementIcon(applicationId: Snowflake, achievementId: Snowflake, achievementIconHash: string, format: AchievementIconFormat): `/app-assets/${string}/achievements/${string}/icons/${string}.jpeg` | `/app-assets/${string}/achievements/${string}/icons/${string}.png` | `/app-assets/${string}/achievements/${string}/icons/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/app-assets/710982414301790216/store/{sticker_pack.banner.asset_id}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ stickerPackBanner(stickerPackBannerAssetId: Snowflake, format: StickerPackBannerFormat): `/app-assets/710982414301790216/store/${string}.jpeg` | `/app-assets/710982414301790216/store/${string}.png` | `/app-assets/710982414301790216/store/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/app-assets/${application.id}/store/${asset.id}.{png|jpeg|webp}}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ storePageAsset(applicationId: Snowflake, assetId: string): `/app-assets/${string}/store/${string}.png`;
+ /**
+ * Route for:
+ * - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ teamIcon(teamId: Snowflake, teamIcon: string, format: TeamIconFormat): `/team-icons/${string}/${string}.jpeg` | `/team-icons/${string}/${string}.png` | `/team-icons/${string}/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/stickers/{sticker.id}.{png|json}`
+ *
+ * This route supports the extensions: PNG, Lottie, GIF
+ */
+ sticker(stickerId: Snowflake, format: StickerFormat): `/stickers/${string}.png` | `/stickers/${string}.gif` | `/stickers/${string}.json`;
+ /**
+ * Route for:
+ * - GET `/role-icons/{role.id}/{role.icon}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ roleIcon(roleId: Snowflake, roleIcon: string, format: RoleIconFormat): `/role-icons/${string}/${string}.jpeg` | `/role-icons/${string}/${string}.png` | `/role-icons/${string}/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/guild-events/{guild_scheduled_event.id}/{guild_scheduled_event.image}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ guildScheduledEventCover(guildScheduledEventId: Snowflake, guildScheduledEventCoverImage: string, format: GuildScheduledEventCoverFormat): `/guild-events/${string}/${string}.jpeg` | `/guild-events/${string}/${string}.png` | `/guild-events/${string}/${string}.webp`;
+ /**
+ * Route for:
+ * - GET `/guilds/${guild.id}/users/${user.id}/banners/${guild_member.banner}.{png|jpeg|webp|gif}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ guildMemberBanner(guildId: Snowflake, userId: Snowflake, guildMemberBanner: string, format: GuildMemberBannerFormat): `/guilds/${string}/users/${string}/banners/${string}.jpeg` | `/guilds/${string}/users/${string}/banners/${string}.png` | `/guilds/${string}/users/${string}/banners/${string}.webp` | `/guilds/${string}/users/${string}/banners/${string}.gif`;
+};
+export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5;
+export type EmojiFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
+export type GuildIconFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
+export type GuildSplashFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type GuildDiscoverySplashFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type GuildBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
+export type UserBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
+export type DefaultUserAvatar = Extract<ImageFormat, ImageFormat.PNG>;
+export type UserAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
+export type GuildMemberAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
+export type ApplicationIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type ApplicationCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie | ImageFormat.GIF>;
+export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
+export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
+export declare enum ImageFormat {
+ JPEG = "jpeg",
+ PNG = "png",
+ WebP = "webp",
+ GIF = "gif",
+ Lottie = "json"
+}
+export interface CDNQuery {
+ /**
+ * The returned image can have the size changed by using this query parameter
+ *
+ * Image size can be any power of two between 16 and 4096
+ */
+ size?: number;
+}
+export declare const RouteBases: {
+ readonly api: "https://discord.com/api/v9";
+ readonly cdn: "https://cdn.discordapp.com";
+ readonly invite: "https://discord.gg";
+ readonly template: "https://discord.new";
+ readonly gift: "https://discord.gift";
+ readonly scheduledEvent: "https://discord.com/events";
+};
+export declare const OAuth2Routes: {
+ readonly authorizationURL: "https://discord.com/api/v9/oauth2/authorize";
+ readonly tokenURL: "https://discord.com/api/v9/oauth2/token";
+ /**
+ * See https://tools.ietf.org/html/rfc7009
+ */
+ readonly tokenRevocationURL: "https://discord.com/api/v9/oauth2/token/revoke";
+};
+//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/index.d.ts.map b/node_modules/discord-api-types/rest/v9/index.d.ts.map
new file mode 100644
index 0000000..bdb2ca8
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;A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AC;AAC/F,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AACjG,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AACxF,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,GAAG,GAAG,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AACzG,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AACxF,MAAM,MAAM,8BAA8B,GAAG,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AACxG,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;AAE/E,oBAAY,WAAW;IACtB,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,MAAM,SAAS;CACf;AAED,MAAM,WAAW,QAAQ;IACxB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,UAAU;;;;;;;CAOb,CAAC;AAKX,eAAO,MAAM,YAAY;;;IAGxB;;OAEG;;CAEM,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/index.js b/node_modules/discord-api-types/rest/v9/index.js
new file mode 100644
index 0000000..eeed9aa
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/index.js
@@ -0,0 +1,1057 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OAuth2Routes = exports.RouteBases = exports.ImageFormat = exports.CDNRoutes = exports.StickerPackApplicationId = exports.Routes = exports.APIVersion = void 0;
+__exportStar(require("../common"), exports);
+__exportStar(require("./application"), exports);
+__exportStar(require("./auditLog"), exports);
+__exportStar(require("./autoModeration"), exports);
+__exportStar(require("./channel"), exports);
+__exportStar(require("./emoji"), exports);
+__exportStar(require("./gateway"), exports);
+__exportStar(require("./guild"), exports);
+__exportStar(require("./guildScheduledEvent"), exports);
+__exportStar(require("./interactions"), exports);
+__exportStar(require("./invite"), exports);
+__exportStar(require("./oauth2"), exports);
+__exportStar(require("./stageInstance"), exports);
+__exportStar(require("./sticker"), exports);
+__exportStar(require("./template"), exports);
+__exportStar(require("./user"), exports);
+__exportStar(require("./voice"), exports);
+__exportStar(require("./webhook"), exports);
+exports.APIVersion = '9';
+exports.Routes = {
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/role-connections/metadata`
+ * - PUT `/applications/{application.id}/role-connections/metadata`
+ */
+ applicationRoleConnectionMetadata(applicationId) {
+ return `/applications/${applicationId}/role-connections/metadata`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/auto-moderation/rules`
+ * - POST `/guilds/{guild.id}/auto-moderation/rules`
+ */
+ guildAutoModerationRules(guildId) {
+ return `/guilds/${guildId}/auto-moderation/rules`;
+ },
+ /**
+ * Routes for:
+ * - GET `/guilds/{guild.id}/auto-moderation/rules/{rule.id}`
+ * - PATCH `/guilds/{guild.id}/auto-moderation/rules/{rule.id}`
+ * - DELETE `/guilds/{guild.id}/auto-moderation/rules/{rule.id}`
+ */
+ guildAutoModerationRule(guildId, ruleId) {
+ return `/guilds/${guildId}/auto-moderation/rules/${ruleId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/audit-logs`
+ */
+ guildAuditLog(guildId) {
+ return `/guilds/${guildId}/audit-logs`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}`
+ * - PATCH `/channels/{channel.id}`
+ * - DELETE `/channels/{channel.id}`
+ */
+ channel(channelId) {
+ return `/channels/${channelId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages`
+ * - POST `/channels/{channel.id}/messages`
+ */
+ channelMessages(channelId) {
+ return `/channels/${channelId}/messages`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages/{message.id}`
+ * - PATCH `/channels/{channel.id}/messages/{message.id}`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}`
+ */
+ channelMessage(channelId, messageId) {
+ return `/channels/${channelId}/messages/${messageId}`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/messages/{message.id}/crosspost`
+ */
+ channelMessageCrosspost(channelId, messageId) {
+ return `/channels/${channelId}/messages/${messageId}/crosspost`;
+ },
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageOwnReaction(channelId, messageId, emoji) {
+ return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}/@me`;
+ },
+ /**
+ * Route for:
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/{user.id}`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageUserReaction(channelId, messageId, emoji, userId) {
+ return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}`
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions/{emoji}`
+ *
+ * **Note**: You need to URL encode the emoji yourself
+ */
+ channelMessageReaction(channelId, messageId, emoji) {
+ return `/channels/${channelId}/messages/${messageId}/reactions/${emoji}`;
+ },
+ /**
+ * Route for:
+ * - DELETE `/channels/{channel.id}/messages/{message.id}/reactions`
+ */
+ channelMessageAllReactions(channelId, messageId) {
+ return `/channels/${channelId}/messages/${messageId}/reactions`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/messages/bulk-delete`
+ */
+ channelBulkDelete(channelId) {
+ return `/channels/${channelId}/messages/bulk-delete`;
+ },
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/permissions/{overwrite.id}`
+ * - DELETE `/channels/{channel.id}/permissions/{overwrite.id}`
+ */
+ channelPermission(channelId, overwriteId) {
+ return `/channels/${channelId}/permissions/${overwriteId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/invites`
+ * - POST `/channels/{channel.id}/invites`
+ */
+ channelInvites(channelId) {
+ return `/channels/${channelId}/invites`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/followers`
+ */
+ channelFollowers(channelId) {
+ return `/channels/${channelId}/followers`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/typing`
+ */
+ channelTyping(channelId) {
+ return `/channels/${channelId}/typing`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/pins`
+ */
+ channelPins(channelId) {
+ return `/channels/${channelId}/pins`;
+ },
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/pins/{message.id}`
+ * - DELETE `/channels/{channel.id}/pins/{message.id}`
+ */
+ channelPin(channelId, messageId) {
+ return `/channels/${channelId}/pins/${messageId}`;
+ },
+ /**
+ * Route for:
+ * - PUT `/channels/{channel.id}/recipients/{user.id}`
+ * - DELETE `/channels/{channel.id}/recipients/{user.id}`
+ */
+ channelRecipient(channelId, userId) {
+ return `/channels/${channelId}/recipients/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/emojis`
+ * - POST `/guilds/{guild.id}/emojis`
+ */
+ guildEmojis(guildId) {
+ return `/guilds/${guildId}/emojis`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/emojis/{emoji.id}`
+ * - PATCH `/guilds/{guild.id}/emojis/{emoji.id}`
+ * - DELETE `/guilds/{guild.id}/emojis/{emoji.id}`
+ */
+ guildEmoji(guildId, emojiId) {
+ return `/guilds/${guildId}/emojis/${emojiId}`;
+ },
+ /**
+ * Route for:
+ * - POST `/guilds`
+ */
+ guilds() {
+ return '/guilds';
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}`
+ * - PATCH `/guilds/{guild.id}`
+ * - DELETE `/guilds/{guild.id}`
+ */
+ guild(guildId) {
+ return `/guilds/${guildId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/preview`
+ */
+ guildPreview(guildId) {
+ return `/guilds/${guildId}/preview`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/channels`
+ * - POST `/guilds/{guild.id}/channels`
+ * - PATCH `/guilds/{guild.id}/channels`
+ */
+ guildChannels(guildId) {
+ return `/guilds/${guildId}/channels`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members/{user.id}`
+ * - PUT `/guilds/{guild.id}/members/{user.id}`
+ * - PATCH `/guilds/{guild.id}/members/@me`
+ * - PATCH `/guilds/{guild.id}/members/{user.id}`
+ * - DELETE `/guilds/{guild.id}/members/{user.id}`
+ */
+ guildMember(guildId, userId = '@me') {
+ return `/guilds/${guildId}/members/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members`
+ */
+ guildMembers(guildId) {
+ return `/guilds/${guildId}/members`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/members/search`
+ */
+ guildMembersSearch(guildId) {
+ return `/guilds/${guildId}/members/search`;
+ },
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/members/@me/nick`
+ *
+ * @deprecated Use {@link Routes.guildMember} instead.
+ */
+ guildCurrentMemberNickname(guildId) {
+ return `/guilds/${guildId}/members/@me/nick`;
+ },
+ /**
+ * Route for:
+ * - PUT `/guilds/{guild.id}/members/{user.id}/roles/{role.id}`
+ * - DELETE `/guilds/{guild.id}/members/{user.id}/roles/{role.id}`
+ */
+ guildMemberRole(guildId, memberId, roleId) {
+ return `/guilds/${guildId}/members/${memberId}/roles/${roleId}`;
+ },
+ /**
+ * Route for:
+ * - POST `/guilds/{guild.id}/mfa`
+ */
+ guildMFA(guildId) {
+ return `/guilds/${guildId}/mfa`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/bans`
+ */
+ guildBans(guildId) {
+ return `/guilds/${guildId}/bans`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/bans/{user.id}`
+ * - PUT `/guilds/{guild.id}/bans/{user.id}`
+ * - DELETE `/guilds/{guild.id}/bans/{user.id}`
+ */
+ guildBan(guildId, userId) {
+ return `/guilds/${guildId}/bans/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/roles`
+ * - POST `/guilds/{guild.id}/roles`
+ * - PATCH `/guilds/{guild.id}/roles`
+ */
+ guildRoles(guildId) {
+ return `/guilds/${guildId}/roles`;
+ },
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/roles/{role.id}`
+ * - DELETE `/guilds/{guild.id}/roles/{role.id}`
+ */
+ guildRole(guildId, roleId) {
+ return `/guilds/${guildId}/roles/${roleId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/prune`
+ * - POST `/guilds/{guild.id}/prune`
+ */
+ guildPrune(guildId) {
+ return `/guilds/${guildId}/prune`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/regions`
+ */
+ guildVoiceRegions(guildId) {
+ return `/guilds/${guildId}/regions`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/invites`
+ */
+ guildInvites(guildId) {
+ return `/guilds/${guildId}/invites`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/integrations`
+ */
+ guildIntegrations(guildId) {
+ return `/guilds/${guildId}/integrations`;
+ },
+ /**
+ * Route for:
+ * - DELETE `/guilds/{guild.id}/integrations/{integration.id}`
+ */
+ guildIntegration(guildId, integrationId) {
+ return `/guilds/${guildId}/integrations/${integrationId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget`
+ * - PATCH `/guilds/{guild.id}/widget`
+ */
+ guildWidgetSettings(guildId) {
+ return `/guilds/${guildId}/widget`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget.json`
+ */
+ guildWidgetJSON(guildId) {
+ return `/guilds/${guildId}/widget.json`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/vanity-url`
+ */
+ guildVanityUrl(guildId) {
+ return `/guilds/${guildId}/vanity-url`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/widget.png`
+ */
+ guildWidgetImage(guildId) {
+ return `/guilds/${guildId}/widget.png`;
+ },
+ /**
+ * Route for:
+ * - GET `/invites/{invite.code}`
+ * - DELETE `/invites/{invite.code}`
+ */
+ invite(code) {
+ return `/invites/${code}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/templates/{template.code}`
+ * - POST `/guilds/templates/{template.code}`
+ */
+ template(code) {
+ return `/guilds/templates/${code}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/templates`
+ * - POST `/guilds/{guild.id}/templates`
+ */
+ guildTemplates(guildId) {
+ return `/guilds/${guildId}/templates`;
+ },
+ /**
+ * Route for:
+ * - PUT `/guilds/{guild.id}/templates/{template.code}`
+ * - PATCH `/guilds/{guild.id}/templates/{template.code}`
+ * - DELETE `/guilds/{guild.id}/templates/{template.code}`
+ */
+ guildTemplate(guildId, code) {
+ return `/guilds/${guildId}/templates/${code}`;
+ },
+ /**
+ * Route for:
+ * - POST `/channels/{channel.id}/threads`
+ * - POST `/channels/{channel.id}/messages/{message.id}/threads`
+ */
+ threads(parentId, messageId) {
+ const parts = ['', 'channels', parentId];
+ if (messageId)
+ parts.push('messages', messageId);
+ parts.push('threads');
+ return parts.join('/');
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/threads/active`
+ */
+ guildActiveThreads(guildId) {
+ return `/guilds/${guildId}/threads/active`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/threads/active`
+ * (deprecated, removed in API v10, use [List Active Guild Threads](https://discord.com/developers/docs/resources/guild#list-active-threads) instead.)
+ * - GET `/channels/{channel.id}/threads/archived/public`
+ * - GET `/channels/{channel.id}/threads/archived/private`
+ */
+ channelThreads(channelId, archived) {
+ const parts = ['', 'channels', channelId, 'threads'];
+ if (archived)
+ parts.push('archived', archived);
+ else
+ parts.push('active');
+ return parts.join('/');
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/users/@me/threads/archived/private`
+ */
+ channelJoinedArchivedThreads(channelId) {
+ return `/channels/${channelId}/users/@me/threads/archived/private`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{thread.id}/thread-members`
+ * - GET `/channels/{thread.id}/thread-members/{user.id}`
+ * - PUT `/channels/{thread.id}/thread-members/@me`
+ * - PUT `/channels/{thread.id}/thread-members/{user.id}`
+ * - DELETE `/channels/{thread.id}/thread-members/@me`
+ * - DELETE `/channels/{thread.id}/thread-members/{user.id}`
+ */
+ threadMembers(threadId, userId) {
+ const parts = ['', 'channels', threadId, 'thread-members'];
+ if (userId)
+ parts.push(userId);
+ return parts.join('/');
+ },
+ /**
+ * Route for:
+ * - GET `/users/@me`
+ * - GET `/users/{user.id}`
+ * - PATCH `/users/@me`
+ *
+ * @param [userId] The user ID, defaulted to `@me`
+ */
+ user(userId = '@me') {
+ return `/users/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/users/@me/applications/{application.id}/role-connection`
+ * - PUT `/users/@me/applications/{application.id}/role-connection`
+ */
+ userApplicationRoleConnection(applicationId) {
+ return `/users/@me/applications/${applicationId}/role-connection`;
+ },
+ /**
+ * Route for:
+ * - GET `/users/@me/guilds`
+ */
+ userGuilds() {
+ return `/users/@me/guilds`;
+ },
+ /**
+ * Route for:
+ * - GET `/users/@me/guilds/{guild.id}/member`
+ */
+ userGuildMember(guildId) {
+ return `/users/@me/guilds/${guildId}/member`;
+ },
+ /**
+ * Route for:
+ * - DELETE `/users/@me/guilds/{guild.id}`
+ */
+ userGuild(guildId) {
+ return `/users/@me/guilds/${guildId}`;
+ },
+ /**
+ * Route for:
+ * - POST `/users/@me/channels`
+ */
+ userChannels() {
+ return `/users/@me/channels`;
+ },
+ /**
+ * Route for:
+ * - GET `/users/@me/connections`
+ */
+ userConnections() {
+ return `/users/@me/connections`;
+ },
+ /**
+ * Route for:
+ * - GET `/voice/regions`
+ */
+ voiceRegions() {
+ return `/voice/regions`;
+ },
+ /**
+ * Route for:
+ * - GET `/channels/{channel.id}/webhooks`
+ * - POST `/channels/{channel.id}/webhooks`
+ */
+ channelWebhooks(channelId) {
+ return `/channels/${channelId}/webhooks`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/webhooks`
+ */
+ guildWebhooks(guildId) {
+ return `/guilds/${guildId}/webhooks`;
+ },
+ /**
+ * Route for:
+ * - GET `/webhooks/{webhook.id}`
+ * - GET `/webhooks/{webhook.id}/{webhook.token}`
+ * - PATCH `/webhooks/{webhook.id}`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}`
+ * - DELETE `/webhooks/{webhook.id}`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}`
+ * - POST `/webhooks/{webhook.id}/{webhook.token}`
+ *
+ * - POST `/webhooks/{application.id}/{interaction.token}`
+ */
+ webhook(webhookId, webhookToken) {
+ const parts = ['', 'webhooks', webhookId];
+ if (webhookToken)
+ parts.push(webhookToken);
+ return parts.join('/');
+ },
+ /**
+ * Route for:
+ * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - GET `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - PATCH `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/@original`
+ * - DELETE `/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}`
+ *
+ * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/@original`
+ * - PATCH `/webhooks/{application.id}/{interaction.token}/messages/{message.id}`
+ * - DELETE `/webhooks/{application.id}/{interaction.token}/messages/{message.id}`
+ */
+ webhookMessage(webhookId, webhookToken, messageId = '@original') {
+ return `/webhooks/${webhookId}/${webhookToken}/messages/${messageId}`;
+ },
+ /**
+ * Route for:
+ * - POST `/webhooks/{webhook.id}/{webhook.token}/github`
+ * - POST `/webhooks/{webhook.id}/{webhook.token}/slack`
+ */
+ webhookPlatform(webhookId, webhookToken, platform) {
+ return `/webhooks/${webhookId}/${webhookToken}/${platform}`;
+ },
+ /**
+ * Route for:
+ * - GET `/gateway`
+ */
+ gateway() {
+ return `/gateway`;
+ },
+ /**
+ * Route for:
+ * - GET `/gateway/bot`
+ */
+ gatewayBot() {
+ return `/gateway/bot`;
+ },
+ /**
+ * Route for:
+ * - GET `/oauth2/applications/@me`
+ */
+ oauth2CurrentApplication() {
+ return `/oauth2/applications/@me`;
+ },
+ /**
+ * Route for:
+ * - GET `/oauth2/@me`
+ */
+ oauth2CurrentAuthorization() {
+ return `/oauth2/@me`;
+ },
+ /**
+ * Route for:
+ * - GET `/oauth2/authorize`
+ */
+ oauth2Authorization() {
+ return `/oauth2/authorize`;
+ },
+ /**
+ * Route for:
+ * - POST `/oauth2/token`
+ */
+ oauth2TokenExchange() {
+ return `/oauth2/token`;
+ },
+ /**
+ * Route for:
+ * - POST `/oauth2/token/revoke`
+ */
+ oauth2TokenRevocation() {
+ return `/oauth2/token/revoke`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/commands`
+ * - PUT `/applications/{application.id}/commands`
+ * - POST `/applications/{application.id}/commands`
+ */
+ applicationCommands(applicationId) {
+ return `/applications/${applicationId}/commands`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/commands/{command.id}`
+ * - PATCH `/applications/{application.id}/commands/{command.id}`
+ * - DELETE `/applications/{application.id}/commands/{command.id}`
+ */
+ applicationCommand(applicationId, commandId) {
+ return `/applications/${applicationId}/commands/${commandId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands`
+ * - POST `/applications/{application.id}/guilds/{guild.id}/commands`
+ */
+ applicationGuildCommands(applicationId, guildId) {
+ return `/applications/${applicationId}/guilds/${guildId}/commands`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ * - PATCH `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ * - DELETE `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}`
+ */
+ applicationGuildCommand(applicationId, guildId, commandId) {
+ return `/applications/${applicationId}/guilds/${guildId}/commands/${commandId}`;
+ },
+ /**
+ * Route for:
+ * - POST `/interactions/{interaction.id}/{interaction.token}/callback`
+ */
+ interactionCallback(interactionId, interactionToken) {
+ return `/interactions/${interactionId}/${interactionToken}/callback`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/member-verification`
+ * - PATCH `/guilds/{guild.id}/member-verification`
+ */
+ guildMemberVerification(guildId) {
+ return `/guilds/${guildId}/member-verification`;
+ },
+ /**
+ * Route for:
+ * - PATCH `/guilds/{guild.id}/voice-states/@me`
+ * - PATCH `/guilds/{guild.id}/voice-states/{user.id}`
+ */
+ guildVoiceState(guildId, userId = '@me') {
+ return `/guilds/${guildId}/voice-states/${userId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/permissions`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/permissions`
+ */
+ guildApplicationCommandsPermissions(applicationId, guildId) {
+ return `/applications/${applicationId}/guilds/${guildId}/commands/permissions`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions`
+ * - PUT `/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions`
+ */
+ applicationCommandPermissions(applicationId, guildId, commandId) {
+ return `/applications/${applicationId}/guilds/${guildId}/commands/${commandId}/permissions`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/welcome-screen`
+ * - PATCH `/guilds/{guild.id}/welcome-screen`
+ */
+ guildWelcomeScreen(guildId) {
+ return `/guilds/${guildId}/welcome-screen`;
+ },
+ /**
+ * Route for:
+ * - POST `/stage-instances`
+ */
+ stageInstances() {
+ return `/stage-instances`;
+ },
+ /**
+ * Route for:
+ * - GET `/stage-instances/{channel.id}`
+ * - PATCH `/stage-instances/{channel.id}`
+ * - DELETE `/stage-instances/{channel.id}`
+ */
+ stageInstance(channelId) {
+ return `/stage-instances/${channelId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/stickers/{sticker.id}`
+ */
+ sticker(stickerId) {
+ return `/stickers/${stickerId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/sticker-packs`
+ */
+ nitroStickerPacks() {
+ return '/sticker-packs';
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/stickers`
+ * - POST `/guilds/{guild.id}/stickers`
+ */
+ guildStickers(guildId) {
+ return `/guilds/${guildId}/stickers`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/stickers/{sticker.id}`
+ * - PATCH `/guilds/{guild.id}/stickers/{sticker.id}`
+ * - DELETE `/guilds/{guild.id}/stickers/{sticker.id}`
+ */
+ guildSticker(guildId, stickerId) {
+ return `/guilds/${guildId}/stickers/${stickerId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events`
+ * - POST `/guilds/{guild.id}/scheduled-events`
+ */
+ guildScheduledEvents(guildId) {
+ return `/guilds/${guildId}/scheduled-events`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ * - PATCH `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ * - DELETE `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}`
+ */
+ guildScheduledEvent(guildId, guildScheduledEventId) {
+ return `/guilds/${guildId}/scheduled-events/${guildScheduledEventId}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/scheduled-events/{guildScheduledEvent.id}/users`
+ */
+ guildScheduledEventUsers(guildId, guildScheduledEventId) {
+ return `/guilds/${guildId}/scheduled-events/${guildScheduledEventId}/users`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/${guild.id}/onboarding`
+ * - PUT `/guilds/${guild.id}/onboarding`
+ */
+ guildOnboarding(guildId) {
+ return `/guilds/${guildId}/onboarding`;
+ },
+ /**
+ * Route for:
+ * - GET `/applications/@me`
+ */
+ currentApplication() {
+ return '/applications/@me';
+ },
+};
+exports.StickerPackApplicationId = '710982414301790216';
+exports.CDNRoutes = {
+ /**
+ * Route for:
+ * - GET `/emojis/{emoji.id}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ emoji(emojiId, format) {
+ return `/emojis/${emojiId}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/icons/{guild.id}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ guildIcon(guildId, guildIcon, format) {
+ return `icons/${guildId}/${guildIcon}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/splashes/{guild.id}/{guild.splash}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ guildSplash(guildId, guildSplash, format) {
+ return `/splashes/${guildId}/${guildSplash}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/discovery-splashes/{guild.id}/{guild.discovery_splash}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ guildDiscoverySplash(guildId, guildDiscoverySplash, format) {
+ return `/discovery-splashes/${guildId}/${guildDiscoverySplash}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/banners/{guild.id}/{guild.banner}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ guildBanner(guildId, guildBanner, format) {
+ return `/banners/${guildId}/${guildBanner}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/banners/{user.id}/{user.banner}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ userBanner(userId, userBanner, format) {
+ return `/banners/${userId}/${userBanner}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/embed/avatars/{index}.png`
+ *
+ * The value for `index` parameter depends on whether the user is [migrated to the new username system](https://discord.com/developers/docs/change-log#unique-usernames-on-discord).
+ * For users on the new username system, `index` will be `(user.id >> 22) % 6`.
+ * For users on the legacy username system, `index` will be `user.discriminator % 5`.
+ *
+ * This route supports the extension: PNG
+ */
+ defaultUserAvatar(index) {
+ return `/embed/avatars/${index}.png`;
+ },
+ /**
+ * Route for:
+ * - GET `/avatars/{user.id}/{user.avatar}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ userAvatar(userId, userAvatar, format) {
+ return `/avatars/${userId}/${userAvatar}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/{guild.id}/users/{user.id}/{guild_member.avatar}.{png|jpeg|webp|gif}`
+ *
+ * As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ guildMemberAvatar(guildId, userId, memberAvatar, format) {
+ return `/guilds/${guildId}/users/${userId}/avatars/${memberAvatar}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/avatar-decorations/{user.id}/{user.avatar_decoration}.png`
+ *
+ * This route supports the extension: PNG
+ */
+ userAvatarDecoration(userId, userAvatarDecoration) {
+ return `/avatar-decorations/${userId}/${userAvatarDecoration}.png`;
+ },
+ /**
+ * Route for:
+ * - GET `/app-icons/{application.id}/{application.icon}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ applicationIcon(applicationId, applicationIcon, format) {
+ return `/app-icons/${applicationId}/${applicationIcon}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/app-icons/{application.id}/{application.cover_image}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ applicationCover(applicationId, applicationCoverImage, format) {
+ return `/app-icons/${applicationId}/${applicationCoverImage}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/app-assets/{application.id}/{application.asset_id}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ applicationAsset(applicationId, applicationAssetId, format) {
+ return `/app-assets/${applicationId}/${applicationAssetId}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/app-assets/{application.id}/achievements/{achievement.id}/icons/{achievement.icon}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ achievementIcon(applicationId, achievementId, achievementIconHash, format) {
+ return `/app-assets/${applicationId}/achievements/${achievementId}/icons/${achievementIconHash}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/app-assets/710982414301790216/store/{sticker_pack.banner.asset_id}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ stickerPackBanner(stickerPackBannerAssetId, format) {
+ return `/app-assets/${exports.StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/app-assets/${application.id}/store/${asset.id}.{png|jpeg|webp}}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ storePageAsset(applicationId, assetId) {
+ return `/app-assets/${applicationId}/store/${assetId}.png`;
+ },
+ /**
+ * Route for:
+ * - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ teamIcon(teamId, teamIcon, format) {
+ return `/team-icons/${teamId}/${teamIcon}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/stickers/{sticker.id}.{png|json}`
+ *
+ * This route supports the extensions: PNG, Lottie, GIF
+ */
+ sticker(stickerId, format) {
+ return `/stickers/${stickerId}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/role-icons/{role.id}/{role.icon}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ roleIcon(roleId, roleIcon, format) {
+ return `/role-icons/${roleId}/${roleIcon}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guild-events/{guild_scheduled_event.id}/{guild_scheduled_event.image}.{png|jpeg|webp}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP
+ */
+ guildScheduledEventCover(guildScheduledEventId, guildScheduledEventCoverImage, format) {
+ return `/guild-events/${guildScheduledEventId}/${guildScheduledEventCoverImage}.${format}`;
+ },
+ /**
+ * Route for:
+ * - GET `/guilds/${guild.id}/users/${user.id}/banners/${guild_member.banner}.{png|jpeg|webp|gif}`
+ *
+ * This route supports the extensions: PNG, JPEG, WebP, GIF
+ */
+ guildMemberBanner(guildId, userId, guildMemberBanner, format) {
+ return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}`;
+ },
+};
+var ImageFormat;
+(function (ImageFormat) {
+ ImageFormat["JPEG"] = "jpeg";
+ ImageFormat["PNG"] = "png";
+ ImageFormat["WebP"] = "webp";
+ ImageFormat["GIF"] = "gif";
+ ImageFormat["Lottie"] = "json";
+})(ImageFormat = exports.ImageFormat || (exports.ImageFormat = {}));
+exports.RouteBases = {
+ api: `https://discord.com/api/v${exports.APIVersion}`,
+ cdn: 'https://cdn.discordapp.com',
+ invite: 'https://discord.gg',
+ template: 'https://discord.new',
+ gift: 'https://discord.gift',
+ scheduledEvent: 'https://discord.com/events',
+};
+// Freeze bases object
+Object.freeze(exports.RouteBases);
+exports.OAuth2Routes = {
+ authorizationURL: `${exports.RouteBases.api}${exports.Routes.oauth2Authorization()}`,
+ tokenURL: `${exports.RouteBases.api}${exports.Routes.oauth2TokenExchange()}`,
+ /**
+ * See https://tools.ietf.org/html/rfc7009
+ */
+ tokenRevocationURL: `${exports.RouteBases.api}${exports.Routes.oauth2TokenRevocation()}`,
+};
+// Freeze OAuth2 route object
+Object.freeze(exports.OAuth2Routes);
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/index.js.map b/node_modules/discord-api-types/rest/v9/index.js.map
new file mode 100644
index 0000000..e6ddf06
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,4CAA0B;AAC1B,gDAA8B;AAC9B,6CAA2B;AAC3B,mDAAiC;AACjC,4CAA0B;AAC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AE,4BAA4B;IACjC,MAAM,EAAE,oBAAoB;IAC5B,QAAQ,EAAE,qBAAqB;IAC/B,IAAI,EAAE,sBAAsB;IAC5B,cAAc,EAAE,4BAA4B;CACnC,CAAC;AAEX,sBAAsB;AACtB,MAAM,CAAC,MAAM,CAAC,kBAAU,CAAC,CAAC;AAEb,QAAA,YAAY,GAAG;IAC3B,gBAAgB,EAAE,GAAG,kBAAU,CAAC,GAAG,GAAG,cAAM,CAAC,mBAAmB,EAAE,EAAE;IACpE,QAAQ,EAAE,GAAG,kBAAU,CAAC,GAAG,GAAG,cAAM,CAAC,mBAAmB,EAAE,EAAE;IAC5D;;OAEG;IACH,kBAAkB,EAAE,GAAG,kBAAU,CAAC,GAAG,GAAG,cAAM,CAAC,qBAAqB,EAAE,EAAE;CAC/D,CAAC;AAEX,6BAA6B;AAC7B,MAAM,CAAC,MAAM,CAAC,oBAAY,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/index.mjs b/node_modules/discord-api-types/rest/v9/index.mjs
new file mode 100644
index 0000000..3f5bba7
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/index.mjs
@@ -0,0 +1,12 @@
+import mod from "./index.js";
+
+export default mod;
+export const APIVersion = mod.APIVersion;
+export const CDNRoutes = mod.CDNRoutes;
+export const ImageFormat = mod.ImageFormat;
+export const Locale = mod.Locale;
+export const OAuth2Routes = mod.OAuth2Routes;
+export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes;
+export const RouteBases = mod.RouteBases;
+export const Routes = mod.Routes;
+export const StickerPackApplicationId = mod.StickerPackApplicationId;
diff --git a/node_modules/discord-api-types/rest/v9/interactions.d.ts b/node_modules/discord-api-types/rest/v9/interactions.d.ts
new file mode 100644
index 0000000..2120f72
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/interactions.d.ts
@@ -0,0 +1,195 @@
+import type { APIApplicationCommand, APIApplicationCommandPermission, APIGuildApplicationCommandPermissions, APIInteractionResponse, APIInteractionResponseCallbackData, ApplicationCommandType } from '../../payloads/v9/index';
+import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';
+import type { RESTDeleteAPIWebhookWithTokenMessageResult, RESTGetAPIWebhookWithTokenMessageResult, RESTPatchAPIWebhookWithTokenMessageFormDataBody, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageResult, RESTPostAPIWebhookWithTokenWaitResult } from './webhook';
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands
+ */
+export interface RESTGetAPIApplicationCommandsQuery {
+ /**
+ * Whether to include full localization dictionaries (name_localizations and description_localizations)
+ * in the returned objects, instead of the name_localized and description_localized fields.
+ *
+ * @default false
+ */
+ with_localizations?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands
+ */
+export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-global-application-command
+ */
+export type RESTGetAPIApplicationCommandResult = APIApplicationCommand;
+type RESTPostAPIBaseApplicationCommandsJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Omit<APIApplicationCommand, 'id' | 'application_id' | 'description' | 'type' | 'version' | 'guild_id' | 'name_localized' | 'description_localized' | 'default_member_permissions'> & Partial<Pick<APIApplicationCommand, 'default_member_permissions'>>>;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
+ */
+export interface RESTPostAPIChatInputApplicationCommandsJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody {
+ type?: ApplicationCommandType.ChatInput | undefined;
+ description: string;
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
+ */
+export interface RESTPostAPIContextMenuApplicationCommandsJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody {
+ type: ApplicationCommandType.User | ApplicationCommandType.Message;
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
+ */
+export type RESTPostAPIApplicationCommandsJSONBody = RESTPostAPIChatInputApplicationCommandsJSONBody | RESTPostAPIContextMenuApplicationCommandsJSONBody;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
+ */
+export type RESTPostAPIApplicationCommandsResult = APIApplicationCommand;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command
+ */
+export type RESTPatchAPIApplicationCommandJSONBody = StrictPartial<RESTPostAPIApplicationCommandsJSONBody>;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command
+ */
+export type RESTPatchAPIApplicationCommandResult = APIApplicationCommand;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands
+ */
+export type RESTPutAPIApplicationCommandsJSONBody = RESTPostAPIApplicationCommandsJSONBody[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands
+ */
+export type RESTPutAPIApplicationCommandsResult = APIApplicationCommand[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands
+ */
+export type RESTGetAPIApplicationGuildCommandsQuery = RESTGetAPIApplicationCommandsQuery;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands
+ */
+export type RESTGetAPIApplicationGuildCommandsResult = Omit<APIApplicationCommand, 'dm_permission'>[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands
+ */
+export type RESTGetAPIApplicationGuildCommandResult = Omit<APIApplicationCommand, 'dm_permission'>;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command
+ */
+export type RESTPostAPIApplicationGuildCommandsJSONBody = Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'> | Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'>;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command
+ */
+export type RESTPostAPIApplicationGuildCommandsResult = Omit<APIApplicationCommand, 'dm_permission'>;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command
+ */
+export type RESTPatchAPIApplicationGuildCommandJSONBody = StrictPartial<Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'> | Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'>>;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command
+ */
+export type RESTPatchAPIApplicationGuildCommandResult = Omit<APIApplicationCommand, 'dm_permission'>;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
+ */
+export type RESTPutAPIApplicationGuildCommandsJSONBody = ((Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'> & Pick<Partial<APIApplicationCommand>, 'id'>) | (Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'> & Pick<Partial<APIApplicationCommand>, 'id'>))[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
+ */
+export type RESTPutAPIApplicationGuildCommandsResult = Omit<APIApplicationCommand, 'dm_permission'>[];
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
+ */
+export type RESTPostAPIInteractionCallbackJSONBody = APIInteractionResponse;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
+ */
+export type RESTPostAPIInteractionCallbackFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPostAPIInteractionCallbackJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response
+ */
+export type RESTGetAPIInteractionOriginalResponseResult = RESTGetAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response
+ */
+export type RESTPatchAPIInteractionOriginalResponseJSONBody = RESTPatchAPIWebhookWithTokenMessageJSONBody;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response
+ */
+export type RESTPatchAPIInteractionOriginalResponseFormDataBody = RESTPatchAPIWebhookWithTokenMessageFormDataBody;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response
+ */
+export type RESTPatchAPIInteractionOriginalResponseResult = RESTPatchAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#delete-original-interaction-response
+ */
+export type RESTDeleteAPIInteractionOriginalResponseResult = RESTDeleteAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message
+ */
+export type RESTPostAPIInteractionFollowupJSONBody = APIInteractionResponseCallbackData;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message
+ */
+export type RESTPostAPIInteractionFollowupFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPostAPIInteractionFollowupJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message
+ */
+export type RESTPostAPIInteractionFollowupResult = RESTPostAPIWebhookWithTokenWaitResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message
+ */
+export type RESTGetAPIInteractionFollowupResult = RESTGetAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message
+ */
+export type RESTPatchAPIInteractionFollowupJSONBody = RESTPatchAPIWebhookWithTokenMessageJSONBody;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message
+ */
+export type RESTPatchAPIInteractionFollowupFormDataBody = RESTPatchAPIWebhookWithTokenMessageFormDataBody;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message
+ */
+export type RESTPatchAPIInteractionFollowupResult = RESTPatchAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/receiving-and-responding#delete-followup-message
+ */
+export type RESTDeleteAPIInteractionFollowupResult = RESTDeleteAPIWebhookWithTokenMessageResult;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions
+ */
+export type RESTGetAPIGuildApplicationCommandsPermissionsResult = APIGuildApplicationCommandPermissions[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions
+ */
+export type RESTGetAPIApplicationCommandPermissionsResult = APIGuildApplicationCommandPermissions;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions
+ */
+export interface RESTPutAPIApplicationCommandPermissionsJSONBody {
+ permissions: APIApplicationCommandPermission[];
+}
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions
+ */
+export type RESTPutAPIApplicationCommandPermissionsResult = APIGuildApplicationCommandPermissions;
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions
+ */
+export type RESTPutAPIGuildApplicationCommandsPermissionsJSONBody = Pick<APIGuildApplicationCommandPermissions, 'id' | 'permissions'>[];
+/**
+ * https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions
+ */
+export type RESTPutAPIGuildApplicationCommandsPermissionsResult = APIGuildApplicationCommandPermissions[];
+export {};
+//# sourceMappingURL=interactions.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/interactions.d.ts.map b/node_modules/discord-api-types/rest/v9/interactions.d.ts.map
new file mode 100644
index 0000000..27de6e7
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/interactions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,qBAAqB,EACrB,+BAA+B,EAC/B,qCAAqC,EACrC,sBAAsB,EACtB,kCAAkC,EAClC,sBAAsB,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G;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,yCAAyC,CAAC;AAE9F;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,0CAA0C,CAAC;AAEhG;;GAEG;AACH,MAAM,MAAM,mDAAmD,GAAG,qCAAqC,EAAE,CAAC;AAE1G;;GAEG;AACH,MAAM,MAAM,6CAA6C,GAAG,qCAAqC,CAAC;AAElG;;GAEG;AACH,MAAM,WAAW,+CAA+C;IAC/D,WAAW,EAAE,+BAA+B,EAAE,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,MAAM,6CAA6C,GAAG,qCAAqC,CAAC;AAElG;;GAEG;AACH,MAAM,MAAM,qDAAqD,GAAG,IAAI,CACvE,qCAAqC,EACrC,IAAI,GAAG,aAAa,CACpB,EAAE,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,mDAAmD,GAAG,qCAAqC,EAAE,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/interactions.js b/node_modules/discord-api-types/rest/v9/interactions.js
new file mode 100644
index 0000000..bcad473
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/interactions.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=interactions.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/interactions.js.map b/node_modules/discord-api-types/rest/v9/interactions.js.map
new file mode 100644
index 0000000..e322b3c
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/interactions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"interactions.js","sourceRoot":"","sources":["interactions.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/invite.d.ts b/node_modules/discord-api-types/rest/v9/invite.d.ts
new file mode 100644
index 0000000..3605d6d
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/invite.d.ts
@@ -0,0 +1,25 @@
+import type { Snowflake } from '../../globals';
+import type { APIInvite } from '../../payloads/v9/index';
+/**
+ * https://discord.com/developers/docs/resources/invite#get-invite
+ */
+export interface RESTGetAPIInviteQuery {
+ /**
+ * Whether the invite should contain approximate member counts
+ */
+ with_counts?: boolean;
+ /**
+ * Whether the invite should contain the expiration date
+ */
+ with_expiration?: boolean;
+ /**
+ * The guild scheduled event to include with the invite
+ */
+ guild_scheduled_event_id?: Snowflake;
+}
+export type RESTGetAPIInviteResult = APIInvite;
+/**
+ * https://discord.com/developers/docs/resources/invite#delete-invite
+ */
+export type RESTDeleteAPIInviteResult = APIInvite;
+//# sourceMappingURL=invite.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/invite.d.ts.map b/node_modules/discord-api-types/rest/v9/invite.d.ts.map
new file mode 100644
index 0000000..ae9d6c1
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/invite.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,wBAAwB,CAAC,EAAE,SAAS,CAAC;CACrC;AAED,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/invite.js b/node_modules/discord-api-types/rest/v9/invite.js
new file mode 100644
index 0000000..2c05370
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/invite.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=invite.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/invite.js.map b/node_modules/discord-api-types/rest/v9/invite.js.map
new file mode 100644
index 0000000..8fa96d6
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/invite.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"invite.js","sourceRoot":"","sources":["invite.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/oauth2.d.ts b/node_modules/discord-api-types/rest/v9/oauth2.d.ts
new file mode 100644
index 0000000..9c6be06
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/oauth2.d.ts
@@ -0,0 +1,173 @@
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from '../../payloads/v9/index';
+/**
+ * https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information
+ */
+export type RESTGetAPIOAuth2CurrentApplicationResult = Omit<APIApplication, 'flags'>;
+/**
+ * https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information
+ */
+export interface RESTGetAPIOAuth2CurrentAuthorizationResult {
+ /**
+ * the current application
+ */
+ application: Partial<APIApplication>;
+ /**
+ * the scopes the user has authorized the application for
+ */
+ scopes: OAuth2Scopes[];
+ /**
+ * when the access token expires
+ */
+ expires: string;
+ /**
+ * the user who has authorized, if the user has authorized with the `identify` scope
+ */
+ user?: APIUser;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant
+ */
+export interface RESTOAuth2AuthorizationQuery {
+ response_type: 'code';
+ client_id: Snowflake;
+ scope: string;
+ redirect_uri?: string;
+ state?: string;
+ prompt?: 'consent' | 'none';
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
+ */
+export interface RESTOAuth2AuthorizationQueryResult {
+ code: string;
+ state?: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
+ */
+export interface RESTPostOAuth2AccessTokenURLEncodedData {
+ client_id: Snowflake;
+ client_secret: string;
+ grant_type: 'authorization_code';
+ code: string;
+ redirect_uri?: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-access-token-response
+ */
+export interface RESTPostOAuth2AccessTokenResult {
+ access_token: string;
+ token_type: string;
+ expires_in: number;
+ refresh_token: string;
+ scope: string;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-refresh-token-exchange-example
+ */
+export interface RESTPostOAuth2RefreshTokenURLEncodedData {
+ client_id: Snowflake;
+ client_secret: string;
+ grant_type: 'refresh_token';
+ refresh_token: string;
+}
+export type RESTPostOAuth2RefreshTokenResult = RESTPostOAuth2AccessTokenResult;
+/**
+ * https://discord.com/developers/docs/topics/oauth2#implicit-grant
+ */
+export interface RESTOAuth2ImplicitAuthorizationQuery {
+ response_type: 'token';
+ client_id: Snowflake;
+ scope: string;
+ redirect_uri?: string;
+ state?: string;
+ prompt?: 'consent' | 'none';
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#implicit-grant-redirect-url-example
+ */
+export type RESTOAuth2ImplicitAuthorizationURLFragmentResult = Omit<RESTPostOAuth2AccessTokenResult, 'refresh_token'>;
+/**
+ * https://discord.com/developers/docs/topics/oauth2#client-credentials-grant
+ */
+export interface RESTPostOAuth2ClientCredentialsURLEncodedData {
+ grant_type: 'client_credentials';
+ scope: string;
+}
+export type RESTPostOAuth2ClientCredentialsResult = RESTOAuth2ImplicitAuthorizationURLFragmentResult;
+/**
+ * https://discord.com/developers/docs/topics/oauth2#bot-authorization-flow-bot-auth-parameters
+ */
+export interface RESTOAuth2BotAuthorizationQuery {
+ /**
+ * Your app's client id
+ */
+ client_id: Snowflake;
+ /**
+ * Needs to include bot for the bot flow
+ */
+ scope: OAuth2Scopes.Bot | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}` | `${OAuth2Scopes.Bot}${' ' | '%20'}${string}` | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}${string}${' ' | '%20'}`;
+ /**
+ * The permissions you're requesting
+ *
+ * See https://discord.com/developers/docs/topics/permissions
+ */
+ permissions?: Permissions;
+ /**
+ * Pre-fills the dropdown picker with a guild for the user
+ */
+ guild_id?: Snowflake;
+ /**
+ * `true` or `false`—disallows the user from changing the guild dropdown
+ */
+ disable_guild_select?: boolean;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization
+ */
+export interface RESTOAuth2AdvancedBotAuthorizationQuery {
+ client_id: Snowflake;
+ /**
+ * This assumes you include the `bot` scope alongside others (like `identify` for example)
+ */
+ scope: OAuth2Scopes.Bot | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}` | `${OAuth2Scopes.Bot}${' ' | '%20'}${string}` | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}${string}${' ' | '%20'}`;
+ /**
+ * The required permissions bitfield, stringified
+ */
+ permissions?: Permissions;
+ guild_id?: Snowflake;
+ disable_guild_select?: boolean;
+ response_type: string;
+ redirect_uri?: string;
+}
+export interface RESTOAuth2AdvancedBotAuthorizationQueryResult {
+ code: string;
+ state?: string;
+ guild_id: Snowflake;
+ permissions: Permissions;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization-extended-bot-authorization-access-token-example
+ */
+export interface RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult {
+ access_token: string;
+ token_type: string;
+ expires_in: number;
+ refresh_token: string;
+ scope: string;
+ guild: APIGuild;
+}
+/**
+ * https://discord.com/developers/docs/topics/oauth2#webhooks-webhook-token-response-example
+ */
+export interface RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult {
+ access_token: string;
+ token_type: string;
+ expires_in: number;
+ refresh_token: string;
+ scope: string;
+ webhook: APIWebhook;
+}
+export type RESTPostOAuth2AccessTokenWithBotAndGuildsAndWebhookIncomingScopeResult = RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult & RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult;
+//# sourceMappingURL=oauth2.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/oauth2.d.ts.map b/node_modules/discord-api-types/rest/v9/oauth2.d.ts.map
new file mode 100644
index 0000000..b1a8882
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/oauth2.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE3G;;GAEG;AACH,MAAM,MAAM,wCAAwC,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AAErF;;GAEG;AACH,MAAM,WAAW,0CAA0C;IAC1D;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IACrC;;OAEG;IACH,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,kCAAkC;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACvD,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,EAA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AAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,QAAQ,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,6DAA6D;IAC7E,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,MAAM,sEAAsE,GACjF,oDAAoD,GAAG,6DAA6D,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/oauth2.js b/node_modules/discord-api-types/rest/v9/oauth2.js
new file mode 100644
index 0000000..6508265
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/oauth2.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=oauth2.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/oauth2.js.map b/node_modules/discord-api-types/rest/v9/oauth2.js.map
new file mode 100644
index 0000000..55386d8
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/oauth2.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"oauth2.js","sourceRoot":"","sources":["oauth2.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/stageInstance.d.ts b/node_modules/discord-api-types/rest/v9/stageInstance.d.ts
new file mode 100644
index 0000000..ebdbc04
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/stageInstance.d.ts
@@ -0,0 +1,55 @@
+import type { Snowflake } from '../../globals';
+import type { APIStageInstance, StageInstancePrivacyLevel } from '../../payloads/v9/index';
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#create-stage-instance
+ */
+export interface RESTPostAPIStageInstanceJSONBody {
+ /**
+ * The id of the stage channel
+ */
+ channel_id: Snowflake;
+ /**
+ * The topic of the stage instance (1-120 characters)
+ */
+ topic: string;
+ /**
+ * The privacy level of the stage instance
+ *
+ * @default GuildOnly
+ */
+ privacy_level?: StageInstancePrivacyLevel | undefined;
+ /**
+ * Notify @everyone that a stage instance has started
+ */
+ send_start_notification?: boolean | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#create-stage-instance
+ */
+export type RESTPostAPIStageInstanceResult = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#get-stage-instance
+ */
+export type RESTGetAPIStageInstanceResult = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance
+ */
+export interface RESTPatchAPIStageInstanceJSONBody {
+ /**
+ * The topic of the stage instance (1-120 characters)
+ */
+ topic?: string | undefined;
+ /**
+ * The privacy level of the stage instance
+ */
+ privacy_level?: StageInstancePrivacyLevel | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance
+ */
+export type RESTPatchAPIStageInstanceResult = APIStageInstance;
+/**
+ * https://discord.com/developers/docs/resources/stage-instance#delete-stage-instance
+ */
+export type RESTDeleteAPIStageInstanceResult = never;
+//# sourceMappingURL=stageInstance.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/stageInstance.d.ts.map b/node_modules/discord-api-types/rest/v9/stageInstance.d.ts.map
new file mode 100644
index 0000000..3ad5def
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/stageInstance.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"stageInstance.d.ts","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAE3F;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;IACtD;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,aAAa,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,gBAAgB,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,KAAK,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/stageInstance.js b/node_modules/discord-api-types/rest/v9/stageInstance.js
new file mode 100644
index 0000000..9938b4c
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/stageInstance.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=stageInstance.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/stageInstance.js.map b/node_modules/discord-api-types/rest/v9/stageInstance.js.map
new file mode 100644
index 0000000..0d87730
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/stageInstance.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"stageInstance.js","sourceRoot":"","sources":["stageInstance.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/sticker.d.ts b/node_modules/discord-api-types/rest/v9/sticker.d.ts
new file mode 100644
index 0000000..0a42f46
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/sticker.d.ts
@@ -0,0 +1,72 @@
+import type { APISticker, APIStickerPack } from '../../payloads/v9/index';
+/**
+ * https://discord.com/developers/docs/resources/sticker#get-sticker
+ */
+export type RESTGetAPIStickerResult = APISticker;
+/**
+ * https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs
+ */
+export interface RESTGetNitroStickerPacksResult {
+ sticker_packs: APIStickerPack[];
+}
+/**
+ * https://discord.com/developers/docs/resources/sticker#list-guild-stickers
+ */
+export type RESTGetAPIGuildStickersResult = APISticker[];
+/**
+ * https://discord.com/developers/docs/resources/sticker#get-guild-sticker
+ */
+export type RESTGetAPIGuildStickerResult = APISticker;
+/**
+ * https://discord.com/developers/docs/resources/sticker#create-guild-sticker
+ */
+export interface RESTPostAPIGuildStickerFormDataBody {
+ /**
+ * Name of the sticker (2-30 characters)
+ */
+ name: string;
+ /**
+ * Description of the sticker (empty or 2-100 characters)
+ */
+ description: string;
+ /**
+ * The Discord name of a unicode emoji representing the sticker's expression (2-200 characters)
+ */
+ tags: string;
+ /**
+ * The sticker file to upload, must be a PNG, APNG, GIF, or Lottie JSON file, max 512 KB
+ *
+ * Uploaded stickers are constrained to 5 seconds in length for animated stickers, and 320 x 320 pixels.
+ */
+ file: unknown;
+}
+/**
+ * https://discord.com/developers/docs/resources/sticker#create-guild-sticker
+ */
+export type RESTPostAPIGuildStickerResult = APISticker;
+/**
+ * https://discord.com/developers/docs/resources/sticker#modify-guild-sticker
+ */
+export interface RESTPatchAPIGuildStickerJSONBody {
+ /**
+ * Name of the sticker (2-30 characters)
+ */
+ name?: string | undefined;
+ /**
+ * Description of the sticker (2-100 characters)
+ */
+ description?: string | null | undefined;
+ /**
+ * The Discord name of a unicode emoji representing the sticker's expression (2-200 characters)
+ */
+ tags?: string | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/sticker#modify-guild-sticker
+ */
+export type RESTPatchAPIGuildStickerResult = APISticker;
+/**
+ * https://discord.com/developers/docs/resources/sticker#delete-guild-sticker
+ */
+export type RESTDeleteAPIGuildStickerResult = never;
+//# sourceMappingURL=sticker.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/sticker.d.ts.map b/node_modules/discord-api-types/rest/v9/sticker.d.ts.map
new file mode 100644
index 0000000..726cabc
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/sticker.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"sticker.d.ts","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C,aAAa,EAAE,cAAc,EAAE,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,UAAU,EAAE,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,UAAU,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,mCAAmC;IACnD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;CACd;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,UAAU,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,UAAU,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,KAAK,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/sticker.js b/node_modules/discord-api-types/rest/v9/sticker.js
new file mode 100644
index 0000000..b6a3125
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/sticker.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=sticker.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/sticker.js.map b/node_modules/discord-api-types/rest/v9/sticker.js.map
new file mode 100644
index 0000000..5c1346f
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/sticker.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"sticker.js","sourceRoot":"","sources":["sticker.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/template.d.ts b/node_modules/discord-api-types/rest/v9/template.d.ts
new file mode 100644
index 0000000..f300859
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/template.d.ts
@@ -0,0 +1,63 @@
+import type { APIGuild, APITemplate } from '../../payloads/v9/index';
+import type { StrictPartial } from '../../utils/internals';
+/**
+ * https://discord.com/developers/docs/resources/guild-template#get-guild-template
+ */
+export type RESTGetAPITemplateResult = APITemplate;
+/**
+ * https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template
+ */
+export interface RESTPostAPITemplateCreateGuildJSONBody {
+ /**
+ * Name of the guild (2-100 characters)
+ */
+ name: string;
+ /**
+ * base64 1024x1024 png/jpeg image for the guild icon
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ icon?: string | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template
+ */
+export type RESTPostAPITemplateCreateGuildResult = APIGuild;
+/**
+ * https://discord.com/developers/docs/resources/guild-template#get-guild-templates
+ */
+export type RESTGetAPIGuildTemplatesResult = APITemplate[];
+/**
+ * https://discord.com/developers/docs/resources/guild-template#create-guild-template
+ */
+export interface RESTPostAPIGuildTemplatesJSONBody {
+ /**
+ * Name of the template (1-100 characters)
+ */
+ name: string;
+ /**
+ * Description for the template (0-120 characters)
+ */
+ description?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/guild-template#create-guild-template
+ */
+export type RESTPostAPIGuildTemplatesResult = APITemplate;
+/**
+ * https://discord.com/developers/docs/resources/guild-template#sync-guild-template
+ */
+export type RESTPutAPIGuildTemplateSyncResult = APITemplate;
+/**
+ * https://discord.com/developers/docs/resources/guild-template#modify-guild-template
+ */
+export type RESTPatchAPIGuildTemplateJSONBody = StrictPartial<RESTPostAPIGuildTemplatesJSONBody>;
+/**
+ * https://discord.com/developers/docs/resources/guild-template#modify-guild-template
+ */
+export type RESTPatchAPIGuildTemplateResult = APITemplate;
+/**
+ * https://discord.com/developers/docs/resources/guild-template#delete-guild-template
+ */
+export type RESTDeleteAPIGuildTemplateResult = APITemplate;
+//# sourceMappingURL=template.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/template.d.ts.map b/node_modules/discord-api-types/rest/v9/template.d.ts.map
new file mode 100644
index 0000000..5be8ac6
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/template.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,sCAAsC;IACtD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,QAAQ,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,WAAW,EAAE,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,WAAW,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,WAAW,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,aAAa,CAAC,iCAAiC,CAAC,CAAC;AAEjG;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,WAAW,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,WAAW,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/template.js b/node_modules/discord-api-types/rest/v9/template.js
new file mode 100644
index 0000000..ea29227
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/template.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=template.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/template.js.map b/node_modules/discord-api-types/rest/v9/template.js.map
new file mode 100644
index 0000000..8cacb36
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/template.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"template.js","sourceRoot":"","sources":["template.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/user.d.ts b/node_modules/discord-api-types/rest/v9/user.d.ts
new file mode 100644
index 0000000..df512ea
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/user.d.ts
@@ -0,0 +1,117 @@
+import type { Permissions, Snowflake } from '../../globals';
+import type { APIChannel, APIConnection, APIGuildMember, APIUser, APIApplicationRoleConnection, GuildFeature } from '../../payloads/v9/index';
+/**
+ * https://discord.com/developers/docs/resources/user#get-current-user
+ */
+export type RESTGetAPICurrentUserResult = APIUser;
+/**
+ * https://discord.com/developers/docs/resources/user#get-user
+ */
+export type RESTGetAPIUserResult = APIUser;
+/**
+ * https://discord.com/developers/docs/resources/user#get-current-user-guild-member
+ */
+export type RESTGetCurrentUserGuildMemberResult = APIGuildMember;
+/**
+ * https://discord.com/developers/docs/resources/user#modify-current-user
+ */
+export interface RESTPatchAPICurrentUserJSONBody {
+ /**
+ * User's username, if changed may cause the user's discriminator to be randomized
+ */
+ username?: string | undefined;
+ /**
+ * If passed, modifies the user's avatar
+ */
+ avatar?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/user#modify-current-user
+ */
+export type RESTPatchAPICurrentUserResult = APIUser;
+/**
+ * https://discord.com/developers/docs/resources/user#get-current-user-guilds
+ */
+export interface RESTGetAPICurrentUserGuildsQuery {
+ /**
+ * Get guilds before this guild ID
+ */
+ before?: Snowflake;
+ /**
+ * Get guilds after this guild ID
+ */
+ after?: Snowflake;
+ /**
+ * Max number of guilds to return (1-200)
+ *
+ * @default 200
+ */
+ limit?: number;
+ /**
+ * Include approximate member and presence counts in response
+ *
+ * @default false
+ */
+ with_counts?: boolean;
+}
+export interface RESTAPIPartialCurrentUserGuild {
+ id: Snowflake;
+ name: string;
+ icon: string | null;
+ owner: boolean;
+ features: GuildFeature[];
+ permissions: Permissions;
+ approximate_member_count?: number;
+ approximate_presence_count?: number;
+}
+/**
+ * https://discord.com/developers/docs/resources/user#get-current-user-guilds
+ */
+export type RESTGetAPICurrentUserGuildsResult = RESTAPIPartialCurrentUserGuild[];
+/**
+ * https://discord.com/developers/docs/resources/user#leave-guild
+ */
+export type RESTDeleteAPICurrentUserGuildResult = never;
+/**
+ * https://discord.com/developers/docs/resources/user#create-dm
+ */
+export interface RESTPostAPICurrentUserCreateDMChannelJSONBody {
+ /**
+ * The recipient to open a DM channel with
+ */
+ recipient_id: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/user#create-dm
+ */
+export type RESTPostAPICurrentUserCreateDMChannelResult = APIChannel;
+/**
+ * https://discord.com/developers/docs/resources/user#get-user-connections
+ */
+export type RESTGetAPICurrentUserConnectionsResult = APIConnection[];
+/**
+ * https://discord.com/developers/docs/resources/user#get-user-application-role-connection
+ */
+export type RESTGetAPICurrentUserApplicationRoleConnectionResult = APIApplicationRoleConnection;
+/**
+ * https://discord.com/developers/docs/resources/user#update-user-application-role-connection
+ */
+export interface RESTPutAPICurrentUserApplicationRoleConnectionJSONBody {
+ /**
+ * The vanity name of the platform a bot has connected (max 50 characters)
+ */
+ platform_name?: string | undefined;
+ /**
+ * The username on the platform a bot has connected (max 100 characters)
+ */
+ platform_username?: string | undefined;
+ /**
+ * Object mapping application role connection metadata keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected
+ */
+ metadata?: Record<string, string | number> | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/user#update-user-application-role-connection
+ */
+export type RESTPutAPICurrentUserApplicationRoleConnectionResult = APIApplicationRoleConnection;
+//# sourceMappingURL=user.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/user.d.ts.map b/node_modules/discord-api-types/rest/v9/user.d.ts.map
new file mode 100644
index 0000000..f58a9db
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/user.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EACX,UAAU,EACV,aAAa,EACb,cAAc,EACd,OAAO,EACP,4BAA4B,EAC5B,YAAY,EACZ,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,cAAc,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,QAA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B,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,SAAS,CAAC;CACvD;AAED;;GAEG;AACH,MAAM,MAAM,oDAAoD,GAAG,4BAA4B,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/user.js b/node_modules/discord-api-types/rest/v9/user.js
new file mode 100644
index 0000000..33269d3
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/user.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=user.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/user.js.map b/node_modules/discord-api-types/rest/v9/user.js.map
new file mode 100644
index 0000000..ff1a289
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/user.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"user.js","sourceRoot":"","sources":["user.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/voice.d.ts b/node_modules/discord-api-types/rest/v9/voice.d.ts
new file mode 100644
index 0000000..035af52
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/voice.d.ts
@@ -0,0 +1,10 @@
+import type { APIVoiceRegion } from '../../payloads/v9/index';
+/**
+ * https://discord.com/developers/docs/resources/voice#list-voice-regions
+ */
+export type RESTGetAPIVoiceRegionsResult = APIVoiceRegion[];
+/**
+ * @deprecated This was exported with the wrong name, use `RESTGetAPIVoiceRegionsResult` instead
+ */
+export type GetAPIVoiceRegionsResult = RESTGetAPIVoiceRegionsResult;
+//# sourceMappingURL=voice.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/voice.d.ts.map b/node_modules/discord-api-types/rest/v9/voice.d.ts.map
new file mode 100644
index 0000000..f5eb09a
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/voice.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,cAAc,EAAE,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,4BAA4B,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/voice.js b/node_modules/discord-api-types/rest/v9/voice.js
new file mode 100644
index 0000000..53e2713
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/voice.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=voice.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/voice.js.map b/node_modules/discord-api-types/rest/v9/voice.js.map
new file mode 100644
index 0000000..561b9f7
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/voice.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"voice.js","sourceRoot":"","sources":["voice.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/webhook.d.ts b/node_modules/discord-api-types/rest/v9/webhook.d.ts
new file mode 100644
index 0000000..d92842c
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/webhook.d.ts
@@ -0,0 +1,241 @@
+import type { Snowflake } from '../../globals';
+import type { APIAllowedMentions, APIActionRowComponent, APIEmbed, APIMessage, APIWebhook, APIAttachment, MessageFlags, APIMessageActionRowComponent } from '../../payloads/v9/index';
+import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals';
+/**
+ * https://discord.com/developers/docs/resources/webhook#create-webhook
+ */
+export interface RESTPostAPIChannelWebhookJSONBody {
+ /**
+ * Name of the webhook (1-80 characters)
+ */
+ name: string;
+ /**
+ * Image for the default webhook avatar
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ avatar?: string | null | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/webhook#create-webhook
+ */
+export type RESTPostAPIChannelWebhookResult = APIWebhook;
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-channel-webhooks
+ */
+export type RESTGetAPIChannelWebhooksResult = APIWebhook[];
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-guild-webhooks
+ */
+export type RESTGetAPIGuildWebhooksResult = APIWebhook[];
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-webhook
+ */
+export type RESTGetAPIWebhookResult = APIWebhook;
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-webhook-with-token
+ */
+export type RESTGetAPIWebhookWithTokenResult = Omit<APIWebhook, 'user'>;
+/**
+ * https://discord.com/developers/docs/resources/webhook#modify-webhook
+ */
+export interface RESTPatchAPIWebhookJSONBody {
+ /**
+ * The default name of the webhook
+ */
+ name?: string | undefined;
+ /**
+ * Image for the default webhook avatar
+ *
+ * See https://discord.com/developers/docs/reference#image-data
+ */
+ avatar?: string | null | undefined;
+ /**
+ * The new channel id this webhook should be moved to
+ */
+ channel_id?: Snowflake | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/webhook#modify-webhook
+ */
+export type RESTPatchAPIWebhookResult = APIWebhook;
+/**
+ * https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token
+ */
+export type RESTPatchAPIWebhookWithTokenJSONBody = Omit<RESTPatchAPIWebhookJSONBody, 'channel_id'>;
+/**
+ * https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token
+ */
+export type RESTPatchAPIWebhookWithTokenResult = RESTGetAPIWebhookWithTokenResult;
+/**
+ * https://discord.com/developers/docs/resources/webhook#delete-webhook
+ */
+export type RESTDeleteAPIWebhookResult = never;
+/**
+ * https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token
+ */
+export type RESTDeleteAPIWebhookWithTokenResult = never;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-webhook
+ */
+export interface RESTPostAPIWebhookWithTokenJSONBody {
+ /**
+ * The message contents (up to 2000 characters)
+ */
+ content?: string | undefined;
+ /**
+ * Override the default username of the webhook
+ */
+ username?: string | undefined;
+ /**
+ * Override the default avatar of the webhook
+ */
+ avatar_url?: string | undefined;
+ /**
+ * `true` if this is a TTS message
+ */
+ tts?: boolean | undefined;
+ /**
+ * Embedded `rich` content
+ *
+ * See https://discord.com/developers/docs/resources/channel#embed-object
+ */
+ embeds?: APIEmbed[] | undefined;
+ /**
+ * Allowed mentions for the message
+ *
+ * See https://discord.com/developers/docs/resources/channel#allowed-mentions-object
+ */
+ allowed_mentions?: APIAllowedMentions | undefined;
+ /**
+ * The components to include with the message
+ *
+ * Requires an application-owned webhook
+ *
+ * See https://discord.com/developers/docs/interactions/message-components#component-object
+ */
+ components?: APIActionRowComponent<APIMessageActionRowComponent>[] | undefined;
+ /**
+ * Attachment objects with filename and description
+ */
+ attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
+ /**
+ * Message flags combined as a bitfield
+ */
+ flags?: MessageFlags | undefined;
+ /**
+ * Name of thread to create
+ *
+ * Available only if the webhook is in a forum channel and a thread is not specified in {@link RESTPostAPIWebhookWithTokenQuery.thread_id} query parameter
+ */
+ thread_name?: string | undefined;
+}
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-webhook
+ */
+export type RESTPostAPIWebhookWithTokenFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPostAPIWebhookWithTokenJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-webhook-querystring-params
+ */
+export interface RESTPostAPIWebhookWithTokenQuery {
+ /**
+ * Waits for server confirmation of message send before response, and returns the created message body
+ * (defaults to `false`; when `false` a message that is not saved does not return an error)
+ *
+ * @default false
+ */
+ wait?: boolean;
+ /**
+ * Send a message to the specified thread within a webhook's channel. The thread will automatically be unarchived.
+ *
+ * Available only if the {@link RESTPostAPIWebhookWithTokenJSONBody.thread_name} JSON body property is not specified
+ */
+ thread_id?: Snowflake;
+}
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-webhook
+ */
+export type RESTPostAPIWebhookWithTokenResult = never;
+/**
+ * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives
+ * the `wait` query parameter set to `true`
+ *
+ * See https://discord.com/developers/docs/resources/webhook#execute-webhook-querystring-params
+ */
+export type RESTPostAPIWebhookWithTokenWaitResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook-querystring-params
+ */
+export type RESTPostAPIWebhookWithTokenSlackQuery = RESTPostAPIWebhookWithTokenQuery;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook
+ */
+export type RESTPostAPIWebhookWithTokenSlackResult = never;
+/**
+ * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives
+ * the `wait` query parameter set to `true`
+ *
+ * See https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook-querystring-params
+ */
+export type RESTPostAPIWebhookWithTokenSlackWaitResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook-querystring-params
+ */
+export type RESTPostAPIWebhookWithTokenGitHubQuery = RESTPostAPIWebhookWithTokenQuery;
+/**
+ * https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook
+ */
+export type RESTPostAPIWebhookWithTokenGitHubResult = never;
+/**
+ * Received when a call to https://discord.com/developers/docs/resources/webhook#execute-webhook receives
+ * the `wait` query parameter set to `true`
+ *
+ * See https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook-querystring-params
+ */
+export type RESTPostAPIWebhookWithTokenGitHubWaitResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-webhook-message
+ */
+export type RESTGetAPIWebhookWithTokenMessageResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/webhook#get-webhook-message-query-string-params
+ */
+export interface RESTGetAPIWebhookWithTokenMessageQuery {
+ thread_id?: string;
+}
+/**
+ * https://discord.com/developers/docs/resources/webhook#edit-webhook-message
+ */
+export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Nullable<Pick<RESTPostAPIWebhookWithTokenJSONBody, 'content' | 'embeds' | 'allowed_mentions' | 'components'>>> & {
+ /**
+ * Attached files to keep
+ *
+ * Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
+ *
+ * See https://discord.com/developers/docs/resources/channel#attachment-object
+ */
+ attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
+};
+/**
+ * https://discord.com/developers/docs/resources/webhook#edit-webhook-message
+ */
+export type RESTPatchAPIWebhookWithTokenMessageFormDataBody = ({
+ /**
+ * JSON stringified message body
+ */
+ payload_json?: string | undefined;
+} & Record<`files[${bigint}]`, unknown>) | (RESTPatchAPIWebhookWithTokenMessageJSONBody & Record<`files[${bigint}]`, unknown>);
+/**
+ * https://discord.com/developers/docs/resources/webhook#edit-webhook-message
+ */
+export type RESTPatchAPIWebhookWithTokenMessageResult = APIMessage;
+/**
+ * https://discord.com/developers/docs/resources/webhook#delete-webhook-message
+ */
+export type RESTDeleteAPIWebhookWithTokenMessageResult = never;
+//# sourceMappingURL=webhook.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/webhook.d.ts.map b/node_modules/discord-api-types/rest/v9/webhook.d.ts.map
new file mode 100644
index 0000000..22f7290
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/webhook.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KA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,EAAE,OAAO,CAAC,CAAC,CAAC;AAEvF;;GAEG;AACH,MAAM,MAAM,yCAAyC,GAAG,UAAU,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,0CAA0C,GAAG,KAAK,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/webhook.js b/node_modules/discord-api-types/rest/v9/webhook.js
new file mode 100644
index 0000000..63886df
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/webhook.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=webhook.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rest/v9/webhook.js.map b/node_modules/discord-api-types/rest/v9/webhook.js.map
new file mode 100644
index 0000000..f2cf863
--- /dev/null
+++ b/node_modules/discord-api-types/rest/v9/webhook.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/common.d.ts b/node_modules/discord-api-types/rpc/common.d.ts
new file mode 100644
index 0000000..4820b70
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/common.d.ts
@@ -0,0 +1,33 @@
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#rpc-rpc-error-codes
+ */
+export declare enum RPCErrorCodes {
+ UnknownError = 1000,
+ InvalidPayload = 4000,
+ InvalidCommand = 4002,
+ InvalidGuild = 4003,
+ InvalidEvent = 4004,
+ InvalidChannel = 4005,
+ InvalidPermissions = 4006,
+ InvalidClientId = 4007,
+ InvalidOrigin = 4008,
+ InvalidToken = 4009,
+ InvalidUser = 4010,
+ OAuth2Error = 5000,
+ SelectChannelTimedOut = 5001,
+ GetGuildTimedOut = 5002,
+ SelectVoiceForceRequired = 5003,
+ CaptureShortcutAlreadyListening = 5004
+}
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#rpc-rpc-close-event-codes
+ */
+export declare enum RPCCloseEventCodes {
+ InvalidClientId = 4000,
+ InvalidOrigin = 4001,
+ RateLimited = 4002,
+ TokenRevoked = 4003,
+ InvalidVersion = 4004,
+ InvalidEncoding = 4005
+}
+//# sourceMappingURL=common.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/common.d.ts.map b/node_modules/discord-api-types/rpc/common.d.ts.map
new file mode 100644
index 0000000..d143248
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/common.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,aAAa;IACxB,YAAY,OAAQ;IACpB,cAAc,OAAQ;IACtB,cAAc,OAAQ;IACtB,YAAY,OAAA;IACZ,YAAY,OAAA;IACZ,cAAc,OAAA;IACd,kBAAkB,OAAA;IAClB,eAAe,OAAA;IACf,aAAa,OAAA;IACb,YAAY,OAAA;IACZ,WAAW,OAAA;IACX,WAAW,OAAQ;IACnB,qBAAqB,OAAA;IACrB,gBAAgB,OAAA;IAChB,wBAAwB,OAAA;IACxB,+BAA+B,OAAA;CAC/B;AAED;;GAEG;AACH,oBAAY,kBAAkB;IAC7B,eAAe,OAAQ;IACvB,aAAa,OAAA;IACb,WAAW,OAAA;IACX,YAAY,OAAA;IACZ,cAAc,OAAA;IACd,eAAe,OAAA;CACf"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/common.js b/node_modules/discord-api-types/rpc/common.js
new file mode 100644
index 0000000..dadcb5a
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/common.js
@@ -0,0 +1,38 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.RPCCloseEventCodes = exports.RPCErrorCodes = void 0;
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#rpc-rpc-error-codes
+ */
+var RPCErrorCodes;
+(function (RPCErrorCodes) {
+ RPCErrorCodes[RPCErrorCodes["UnknownError"] = 1000] = "UnknownError";
+ RPCErrorCodes[RPCErrorCodes["InvalidPayload"] = 4000] = "InvalidPayload";
+ RPCErrorCodes[RPCErrorCodes["InvalidCommand"] = 4002] = "InvalidCommand";
+ RPCErrorCodes[RPCErrorCodes["InvalidGuild"] = 4003] = "InvalidGuild";
+ RPCErrorCodes[RPCErrorCodes["InvalidEvent"] = 4004] = "InvalidEvent";
+ RPCErrorCodes[RPCErrorCodes["InvalidChannel"] = 4005] = "InvalidChannel";
+ RPCErrorCodes[RPCErrorCodes["InvalidPermissions"] = 4006] = "InvalidPermissions";
+ RPCErrorCodes[RPCErrorCodes["InvalidClientId"] = 4007] = "InvalidClientId";
+ RPCErrorCodes[RPCErrorCodes["InvalidOrigin"] = 4008] = "InvalidOrigin";
+ RPCErrorCodes[RPCErrorCodes["InvalidToken"] = 4009] = "InvalidToken";
+ RPCErrorCodes[RPCErrorCodes["InvalidUser"] = 4010] = "InvalidUser";
+ RPCErrorCodes[RPCErrorCodes["OAuth2Error"] = 5000] = "OAuth2Error";
+ RPCErrorCodes[RPCErrorCodes["SelectChannelTimedOut"] = 5001] = "SelectChannelTimedOut";
+ RPCErrorCodes[RPCErrorCodes["GetGuildTimedOut"] = 5002] = "GetGuildTimedOut";
+ RPCErrorCodes[RPCErrorCodes["SelectVoiceForceRequired"] = 5003] = "SelectVoiceForceRequired";
+ RPCErrorCodes[RPCErrorCodes["CaptureShortcutAlreadyListening"] = 5004] = "CaptureShortcutAlreadyListening";
+})(RPCErrorCodes = exports.RPCErrorCodes || (exports.RPCErrorCodes = {}));
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#rpc-rpc-close-event-codes
+ */
+var RPCCloseEventCodes;
+(function (RPCCloseEventCodes) {
+ RPCCloseEventCodes[RPCCloseEventCodes["InvalidClientId"] = 4000] = "InvalidClientId";
+ RPCCloseEventCodes[RPCCloseEventCodes["InvalidOrigin"] = 4001] = "InvalidOrigin";
+ RPCCloseEventCodes[RPCCloseEventCodes["RateLimited"] = 4002] = "RateLimited";
+ RPCCloseEventCodes[RPCCloseEventCodes["TokenRevoked"] = 4003] = "TokenRevoked";
+ RPCCloseEventCodes[RPCCloseEventCodes["InvalidVersion"] = 4004] = "InvalidVersion";
+ RPCCloseEventCodes[RPCCloseEventCodes["InvalidEncoding"] = 4005] = "InvalidEncoding";
+})(RPCCloseEventCodes = exports.RPCCloseEventCodes || (exports.RPCCloseEventCodes = {}));
+//# sourceMappingURL=common.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/common.js.map b/node_modules/discord-api-types/rpc/common.js.map
new file mode 100644
index 0000000..ee671f5
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/common.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"common.js","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,aAiBX;AAjBD,WAAY,aAAa;IACxB,oEAAoB,CAAA;IACpB,wEAAsB,CAAA;IACtB,wEAAsB,CAAA;IACtB,oEAAY,CAAA;IACZ,oEAAY,CAAA;IACZ,wEAAc,CAAA;IACd,gFAAkB,CAAA;IAClB,0EAAe,CAAA;IACf,sEAAa,CAAA;IACb,oEAAY,CAAA;IACZ,kEAAW,CAAA;IACX,kEAAmB,CAAA;IACnB,sFAAqB,CAAA;IACrB,4EAAgB,CAAA;IAChB,4FAAwB,CAAA;IACxB,0GAA+B,CAAA;AAChC,CAAC,EAjBW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAiBxB;AAED;;GAEG;AACH,IAAY,kBAOX;AAPD,WAAY,kBAAkB;IAC7B,oFAAuB,CAAA;IACvB,gFAAa,CAAA;IACb,4EAAW,CAAA;IACX,8EAAY,CAAA;IACZ,kFAAc,CAAA;IACd,oFAAe,CAAA;AAChB,CAAC,EAPW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAO7B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/index.d.ts b/node_modules/discord-api-types/rpc/index.d.ts
new file mode 100644
index 0000000..73b8353
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/index.d.ts
@@ -0,0 +1,2 @@
+export * from './v10';
+//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/index.d.ts.map b/node_modules/discord-api-types/rpc/index.d.ts.map
new file mode 100644
index 0000000..ff50635
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,cAAc,OAAO,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/index.js b/node_modules/discord-api-types/rpc/index.js
new file mode 100644
index 0000000..bcc65a2
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/index.js
@@ -0,0 +1,20 @@
+"use strict";
+// This file exports all the types available in the recommended API version
+// Thereby, things MAY break in the future. Try sticking to imports from a specific version
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./v10"), exports);
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/index.js.map b/node_modules/discord-api-types/rpc/index.js.map
new file mode 100644
index 0000000..dcd320d
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,2FAA2F;;;;;;;;;;;;;;;;AAE3F,wCAAsB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/index.mjs b/node_modules/discord-api-types/rpc/index.mjs
new file mode 100644
index 0000000..2bda9be
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/index.mjs
@@ -0,0 +1,5 @@
+import mod from "./index.js";
+
+export default mod;
+export const RPCCloseEventCodes = mod.RPCCloseEventCodes;
+export const RPCErrorCodes = mod.RPCErrorCodes;
diff --git a/node_modules/discord-api-types/rpc/v10.d.ts b/node_modules/discord-api-types/rpc/v10.d.ts
new file mode 100644
index 0000000..99bb661
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/v10.d.ts
@@ -0,0 +1,2 @@
+export * from './common';
+//# sourceMappingURL=v10.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/v10.d.ts.map b/node_modules/discord-api-types/rpc/v10.d.ts.map
new file mode 100644
index 0000000..d286f97
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/v10.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"v10.d.ts","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/v10.js b/node_modules/discord-api-types/rpc/v10.js
new file mode 100644
index 0000000..4117724
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/v10.js
@@ -0,0 +1,18 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./common"), exports);
+//# sourceMappingURL=v10.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/v10.js.map b/node_modules/discord-api-types/rpc/v10.js.map
new file mode 100644
index 0000000..87243e7
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/v10.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"v10.js","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/v10.mjs b/node_modules/discord-api-types/rpc/v10.mjs
new file mode 100644
index 0000000..99ca091
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/v10.mjs
@@ -0,0 +1,5 @@
+import mod from "./v10.js";
+
+export default mod;
+export const RPCCloseEventCodes = mod.RPCCloseEventCodes;
+export const RPCErrorCodes = mod.RPCErrorCodes;
diff --git a/node_modules/discord-api-types/rpc/v8.d.ts b/node_modules/discord-api-types/rpc/v8.d.ts
new file mode 100644
index 0000000..edd3799
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/v8.d.ts
@@ -0,0 +1,2 @@
+export * from './common';
+//# sourceMappingURL=v8.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/v8.d.ts.map b/node_modules/discord-api-types/rpc/v8.d.ts.map
new file mode 100644
index 0000000..9a04756
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/v8.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"v8.d.ts","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/v8.js b/node_modules/discord-api-types/rpc/v8.js
new file mode 100644
index 0000000..80d9a24
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/v8.js
@@ -0,0 +1,18 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./common"), exports);
+//# sourceMappingURL=v8.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/v8.js.map b/node_modules/discord-api-types/rpc/v8.js.map
new file mode 100644
index 0000000..4f56ac3
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/v8.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"v8.js","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/v8.mjs b/node_modules/discord-api-types/rpc/v8.mjs
new file mode 100644
index 0000000..1aa4684
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/v8.mjs
@@ -0,0 +1,5 @@
+import mod from "./v8.js";
+
+export default mod;
+export const RPCCloseEventCodes = mod.RPCCloseEventCodes;
+export const RPCErrorCodes = mod.RPCErrorCodes;
diff --git a/node_modules/discord-api-types/rpc/v9.d.ts b/node_modules/discord-api-types/rpc/v9.d.ts
new file mode 100644
index 0000000..2d97cbe
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/v9.d.ts
@@ -0,0 +1,2 @@
+export * from './common';
+//# sourceMappingURL=v9.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/v9.d.ts.map b/node_modules/discord-api-types/rpc/v9.d.ts.map
new file mode 100644
index 0000000..c492804
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/v9.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"v9.d.ts","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/v9.js b/node_modules/discord-api-types/rpc/v9.js
new file mode 100644
index 0000000..80dd0fc
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/v9.js
@@ -0,0 +1,18 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./common"), exports);
+//# sourceMappingURL=v9.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/v9.js.map b/node_modules/discord-api-types/rpc/v9.js.map
new file mode 100644
index 0000000..aea51d4
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/v9.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"v9.js","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/rpc/v9.mjs b/node_modules/discord-api-types/rpc/v9.mjs
new file mode 100644
index 0000000..56802a3
--- /dev/null
+++ b/node_modules/discord-api-types/rpc/v9.mjs
@@ -0,0 +1,5 @@
+import mod from "./v9.js";
+
+export default mod;
+export const RPCCloseEventCodes = mod.RPCCloseEventCodes;
+export const RPCErrorCodes = mod.RPCErrorCodes;
diff --git a/node_modules/discord-api-types/utils/index.d.ts b/node_modules/discord-api-types/utils/index.d.ts
new file mode 100644
index 0000000..73b8353
--- /dev/null
+++ b/node_modules/discord-api-types/utils/index.d.ts
@@ -0,0 +1,2 @@
+export * from './v10';
+//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/index.d.ts.map b/node_modules/discord-api-types/utils/index.d.ts.map
new file mode 100644
index 0000000..ff50635
--- /dev/null
+++ b/node_modules/discord-api-types/utils/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,cAAc,OAAO,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/index.js b/node_modules/discord-api-types/utils/index.js
new file mode 100644
index 0000000..94abd38
--- /dev/null
+++ b/node_modules/discord-api-types/utils/index.js
@@ -0,0 +1,20 @@
+"use strict";
+// This file exports all the utility functions available in the recommended API / Gateway version
+// Thereby, things MAY break in the future. Try sticking to imports from a specific version
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./v10"), exports);
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/index.js.map b/node_modules/discord-api-types/utils/index.js.map
new file mode 100644
index 0000000..15f04f4
--- /dev/null
+++ b/node_modules/discord-api-types/utils/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,iGAAiG;AACjG,2FAA2F;;;;;;;;;;;;;;;;AAE3F,wCAAsB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/index.mjs b/node_modules/discord-api-types/utils/index.mjs
new file mode 100644
index 0000000..6f51400
--- /dev/null
+++ b/node_modules/discord-api-types/utils/index.mjs
@@ -0,0 +1,16 @@
+import mod from "./index.js";
+
+export default mod;
+export const isApplicationCommandDMInteraction = mod.isApplicationCommandDMInteraction;
+export const isApplicationCommandGuildInteraction = mod.isApplicationCommandGuildInteraction;
+export const isChatInputApplicationCommandInteraction = mod.isChatInputApplicationCommandInteraction;
+export const isContextMenuApplicationCommandInteraction = mod.isContextMenuApplicationCommandInteraction;
+export const isDMInteraction = mod.isDMInteraction;
+export const isGuildInteraction = mod.isGuildInteraction;
+export const isInteractionButton = mod.isInteractionButton;
+export const isLinkButton = mod.isLinkButton;
+export const isMessageComponentButtonInteraction = mod.isMessageComponentButtonInteraction;
+export const isMessageComponentDMInteraction = mod.isMessageComponentDMInteraction;
+export const isMessageComponentGuildInteraction = mod.isMessageComponentGuildInteraction;
+export const isMessageComponentInteraction = mod.isMessageComponentInteraction;
+export const isMessageComponentSelectMenuInteraction = mod.isMessageComponentSelectMenuInteraction;
diff --git a/node_modules/discord-api-types/utils/internals.d.ts b/node_modules/discord-api-types/utils/internals.d.ts
new file mode 100644
index 0000000..929d962
--- /dev/null
+++ b/node_modules/discord-api-types/utils/internals.d.ts
@@ -0,0 +1,29 @@
+export type Nullable<T> = {
+ [P in keyof T]: T[P] | null;
+};
+export type AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Base> = {
+ [K in keyof Base]: Base[K] extends Exclude<Base[K], undefined> ? AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Base[K]> : AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Base[K]> | undefined;
+};
+export type StrictPartial<Base> = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Partial<Base>>;
+export type StrictRequired<Base> = Required<{
+ [K in keyof Base]: Exclude<Base[K], undefined>;
+}>;
+export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
+type Keys<T> = keyof T;
+type DistributiveKeys<T> = T extends unknown ? Keys<T> : never;
+/**
+ * Allows picking of keys from unions that are disjoint
+ */
+export type DistributivePick<T, K extends DistributiveKeys<T>> = T extends unknown ? keyof Pick_<T, K> extends never ? never : {
+ [P in keyof Pick_<T, K>]: Pick_<T, K>[P];
+} : never;
+type Pick_<T, K> = Pick<T, Extract<keyof T, K>>;
+/**
+ * Allows omitting of keys from unions that are disjoint
+ */
+export type DistributiveOmit<T, K extends DistributiveKeys<T>> = T extends unknown ? {
+ [P in keyof Omit_<T, K>]: Omit_<T, K>[P];
+} : never;
+type Omit_<T, K> = Omit<T, Extract<keyof T, K>>;
+export {};
+//# sourceMappingURL=internals.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/internals.d.ts.map b/node_modules/discord-api-types/utils/internals.d.ts.map
new file mode 100644
index 0000000..e84a3e0
--- /dev/null
+++ b/node_modules/discord-api-types/utils/internals.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"internals.d.ts","sourceRoot":"","sources":["internals.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;KACxB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;CAC3B,CAAC;AAEF,MAAM,MAAM,oDAAoD,CAAC,IAAI,IAAI;KACvE,CAAC,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,OAAO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MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,EAAE,CAAC,SAAS,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GAC/E;KAAG,CAAC,IAAI,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAC5C,KAAK,CAAC;AAET,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/internals.js b/node_modules/discord-api-types/utils/internals.js
new file mode 100644
index 0000000..00585b4
--- /dev/null
+++ b/node_modules/discord-api-types/utils/internals.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=internals.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/internals.js.map b/node_modules/discord-api-types/utils/internals.js.map
new file mode 100644
index 0000000..c4808b2
--- /dev/null
+++ b/node_modules/discord-api-types/utils/internals.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"internals.js","sourceRoot":"","sources":["internals.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/v10.d.ts b/node_modules/discord-api-types/utils/v10.d.ts
new file mode 100644
index 0000000..cb5324a
--- /dev/null
+++ b/node_modules/discord-api-types/utils/v10.d.ts
@@ -0,0 +1,93 @@
+import type { APIApplicationCommandDMInteraction, APIApplicationCommandGuildInteraction, APIApplicationCommandInteraction, APIButtonComponent, APIButtonComponentWithCustomId, APIButtonComponentWithURL, APIChatInputApplicationCommandInteraction, APIContextMenuInteraction, APIDMInteraction, APIGuildInteraction, APIInteraction, APIMessageComponentButtonInteraction, APIMessageComponentDMInteraction, APIMessageComponentGuildInteraction, APIMessageComponentInteraction, APIMessageComponentSelectMenuInteraction } from '../payloads/v10/index';
+/**
+ * A type-guard check for DM interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction was received in a DM channel
+ */
+export declare function isDMInteraction(interaction: APIInteraction): interaction is APIDMInteraction;
+/**
+ * A type-guard check for guild interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction was received in a guild
+ */
+export declare function isGuildInteraction(interaction: APIInteraction): interaction is APIGuildInteraction;
+/**
+ * A type-guard check for DM application command interactions
+ *
+ * @param interaction The application command interaction to check against
+ * @returns A boolean that indicates if the application command interaction was received in a DM channel
+ */
+export declare function isApplicationCommandDMInteraction(interaction: APIApplicationCommandInteraction): interaction is APIApplicationCommandDMInteraction;
+/**
+ * A type-guard check for guild application command interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the application command interaction was received in a guild
+ */
+export declare function isApplicationCommandGuildInteraction(interaction: APIApplicationCommandInteraction): interaction is APIApplicationCommandGuildInteraction;
+/**
+ * A type-guard check for DM message component interactions
+ *
+ * @param interaction The message component interaction to check against
+ * @returns A boolean that indicates if the message component interaction was received in a DM channel
+ */
+export declare function isMessageComponentDMInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentDMInteraction;
+/**
+ * A type-guard check for guild message component interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the message component interaction was received in a guild
+ */
+export declare function isMessageComponentGuildInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentGuildInteraction;
+/**
+ * A type-guard check for buttons that have a `url` attached to them.
+ *
+ * @param component The button to check against
+ * @returns A boolean that indicates if the button has a `url` attached to it
+ */
+export declare function isLinkButton(component: APIButtonComponent): component is APIButtonComponentWithURL;
+/**
+ * A type-guard check for buttons that have a `custom_id` attached to them.
+ *
+ * @param component The button to check against
+ * @returns A boolean that indicates if the button has a `custom_id` attached to it
+ */
+export declare function isInteractionButton(component: APIButtonComponent): component is APIButtonComponentWithCustomId;
+/**
+ * A type-guard check for message component interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction is a message component
+ */
+export declare function isMessageComponentInteraction(interaction: APIInteraction): interaction is APIMessageComponentInteraction;
+/**
+ * A type-guard check for button message component interactions
+ *
+ * @param interaction The message component interaction to check against
+ * @returns A boolean that indicates if the message component is a button
+ */
+export declare function isMessageComponentButtonInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentButtonInteraction;
+/**
+ * A type-guard check for select menu message component interactions
+ *
+ * @param interaction The message component interaction to check against
+ * @returns A boolean that indicates if the message component is a select menu
+ */
+export declare function isMessageComponentSelectMenuInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentSelectMenuInteraction;
+/**
+ * A type-guard check for chat input application commands.
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction is a chat input application command
+ */
+export declare function isChatInputApplicationCommandInteraction(interaction: APIApplicationCommandInteraction): interaction is APIChatInputApplicationCommandInteraction;
+/**
+ * A type-guard check for context menu application commands.
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction is a context menu application command
+ */
+export declare function isContextMenuApplicationCommandInteraction(interaction: APIApplicationCommandInteraction): interaction is APIContextMenuInteraction;
+//# sourceMappingURL=v10.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/v10.d.ts.map b/node_modules/discord-api-types/utils/v10.d.ts.map
new file mode 100644
index 0000000..9973841
--- /dev/null
+++ b/node_modules/discord-api-types/utils/v10.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"v10.d.ts","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kCAAkC,EAClC,qCAAqC,EACrC,gCAAgC,EAChC,kBAAkB,EAClB,8BAA8B,EAC9B,yBAAyB,EACzB,yCAAyC,EACzC,yBAAyB,EACzB,gBAAgB,EAChB,mBA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E,gCAAgC,GAC3C,WAAW,IAAI,yCAAyC,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,0CAA0C,CACzD,WAAW,EAAE,gCAAgC,GAC3C,WAAW,IAAI,yBAAyB,CAI1C"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/v10.js b/node_modules/discord-api-types/utils/v10.js
new file mode 100644
index 0000000..65d3114
--- /dev/null
+++ b/node_modules/discord-api-types/utils/v10.js
@@ -0,0 +1,147 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isContextMenuApplicationCommandInteraction = exports.isChatInputApplicationCommandInteraction = exports.isMessageComponentSelectMenuInteraction = exports.isMessageComponentButtonInteraction = exports.isMessageComponentInteraction = exports.isInteractionButton = exports.isLinkButton = exports.isMessageComponentGuildInteraction = exports.isMessageComponentDMInteraction = exports.isApplicationCommandGuildInteraction = exports.isApplicationCommandDMInteraction = exports.isGuildInteraction = exports.isDMInteraction = void 0;
+const index_1 = require("../payloads/v10/index");
+// Interactions
+/**
+ * A type-guard check for DM interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction was received in a DM channel
+ */
+function isDMInteraction(interaction) {
+ return Reflect.has(interaction, 'user');
+}
+exports.isDMInteraction = isDMInteraction;
+/**
+ * A type-guard check for guild interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction was received in a guild
+ */
+function isGuildInteraction(interaction) {
+ return Reflect.has(interaction, 'guild_id');
+}
+exports.isGuildInteraction = isGuildInteraction;
+// ApplicationCommandInteractions
+/**
+ * A type-guard check for DM application command interactions
+ *
+ * @param interaction The application command interaction to check against
+ * @returns A boolean that indicates if the application command interaction was received in a DM channel
+ */
+function isApplicationCommandDMInteraction(interaction) {
+ return isDMInteraction(interaction);
+}
+exports.isApplicationCommandDMInteraction = isApplicationCommandDMInteraction;
+/**
+ * A type-guard check for guild application command interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the application command interaction was received in a guild
+ */
+function isApplicationCommandGuildInteraction(interaction) {
+ return isGuildInteraction(interaction);
+}
+exports.isApplicationCommandGuildInteraction = isApplicationCommandGuildInteraction;
+// MessageComponentInteractions
+/**
+ * A type-guard check for DM message component interactions
+ *
+ * @param interaction The message component interaction to check against
+ * @returns A boolean that indicates if the message component interaction was received in a DM channel
+ */
+function isMessageComponentDMInteraction(interaction) {
+ return isDMInteraction(interaction);
+}
+exports.isMessageComponentDMInteraction = isMessageComponentDMInteraction;
+/**
+ * A type-guard check for guild message component interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the message component interaction was received in a guild
+ */
+function isMessageComponentGuildInteraction(interaction) {
+ return isGuildInteraction(interaction);
+}
+exports.isMessageComponentGuildInteraction = isMessageComponentGuildInteraction;
+// Buttons
+/**
+ * A type-guard check for buttons that have a `url` attached to them.
+ *
+ * @param component The button to check against
+ * @returns A boolean that indicates if the button has a `url` attached to it
+ */
+function isLinkButton(component) {
+ return component.style === index_1.ButtonStyle.Link;
+}
+exports.isLinkButton = isLinkButton;
+/**
+ * A type-guard check for buttons that have a `custom_id` attached to them.
+ *
+ * @param component The button to check against
+ * @returns A boolean that indicates if the button has a `custom_id` attached to it
+ */
+function isInteractionButton(component) {
+ return component.style !== index_1.ButtonStyle.Link;
+}
+exports.isInteractionButton = isInteractionButton;
+// Message Components
+/**
+ * A type-guard check for message component interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction is a message component
+ */
+function isMessageComponentInteraction(interaction) {
+ return interaction.type === index_1.InteractionType.MessageComponent;
+}
+exports.isMessageComponentInteraction = isMessageComponentInteraction;
+/**
+ * A type-guard check for button message component interactions
+ *
+ * @param interaction The message component interaction to check against
+ * @returns A boolean that indicates if the message component is a button
+ */
+function isMessageComponentButtonInteraction(interaction) {
+ return interaction.data.component_type === index_1.ComponentType.Button;
+}
+exports.isMessageComponentButtonInteraction = isMessageComponentButtonInteraction;
+/**
+ * A type-guard check for select menu message component interactions
+ *
+ * @param interaction The message component interaction to check against
+ * @returns A boolean that indicates if the message component is a select menu
+ */
+function isMessageComponentSelectMenuInteraction(interaction) {
+ return [
+ index_1.ComponentType.StringSelect,
+ index_1.ComponentType.UserSelect,
+ index_1.ComponentType.RoleSelect,
+ index_1.ComponentType.MentionableSelect,
+ index_1.ComponentType.ChannelSelect,
+ ].includes(interaction.data.component_type);
+}
+exports.isMessageComponentSelectMenuInteraction = isMessageComponentSelectMenuInteraction;
+// Application Commands
+/**
+ * A type-guard check for chat input application commands.
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction is a chat input application command
+ */
+function isChatInputApplicationCommandInteraction(interaction) {
+ return interaction.data.type === index_1.ApplicationCommandType.ChatInput;
+}
+exports.isChatInputApplicationCommandInteraction = isChatInputApplicationCommandInteraction;
+/**
+ * A type-guard check for context menu application commands.
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction is a context menu application command
+ */
+function isContextMenuApplicationCommandInteraction(interaction) {
+ return (interaction.data.type === index_1.ApplicationCommandType.Message || interaction.data.type === index_1.ApplicationCommandType.User);
+}
+exports.isContextMenuApplicationCommandInteraction = isContextMenuApplicationCommandInteraction;
+//# sourceMappingURL=v10.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/v10.js.map b/node_modules/discord-api-types/utils/v10.js.map
new file mode 100644
index 0000000..818b384
--- /dev/null
+++ b/node_modules/discord-api-types/utils/v10.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"v10.js","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":";;;AAkBA,iDAA4G;AAE5G,eAAe;AAEf;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,WAA2B;IAC1D,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AACzC,CAAC;AAFD,0CAEC;AAED;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,WAA2B;IAC7D,OAAO,OAAO,CAAC,GAAG,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Aa,CAAC,YAAY;QAC1B,qBAAa,CAAC,UAAU;QACxB,qBAAa,CAAC,UAAU;QACxB,qBAAa,CAAC,iBAAiB;QAC/B,qBAAa,CAAC,aAAa;KAC3B,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAC7C,CAAC;AAVD,0FAUC;AAED,uBAAuB;AAEvB;;;;;GAKG;AACH,SAAgB,wCAAwC,CACvD,WAA6C;IAE7C,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,KAAK,8BAAsB,CAAC,SAAS,CAAC;AACnE,CAAC;AAJD,4FAIC;AAED;;;;;GAKG;AACH,SAAgB,0CAA0C,CACzD,WAA6C;IAE7C,OAAO,CACN,WAAW,CAAC,IAAI,CAAC,IAAI,KAAK,8BAAsB,CAAC,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,KAAK,8BAAsB,CAAC,IAAI,CACjH,CAAC;AACH,CAAC;AAND,gGAMC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/v10.mjs b/node_modules/discord-api-types/utils/v10.mjs
new file mode 100644
index 0000000..97d4bc0
--- /dev/null
+++ b/node_modules/discord-api-types/utils/v10.mjs
@@ -0,0 +1,16 @@
+import mod from "./v10.js";
+
+export default mod;
+export const isApplicationCommandDMInteraction = mod.isApplicationCommandDMInteraction;
+export const isApplicationCommandGuildInteraction = mod.isApplicationCommandGuildInteraction;
+export const isChatInputApplicationCommandInteraction = mod.isChatInputApplicationCommandInteraction;
+export const isContextMenuApplicationCommandInteraction = mod.isContextMenuApplicationCommandInteraction;
+export const isDMInteraction = mod.isDMInteraction;
+export const isGuildInteraction = mod.isGuildInteraction;
+export const isInteractionButton = mod.isInteractionButton;
+export const isLinkButton = mod.isLinkButton;
+export const isMessageComponentButtonInteraction = mod.isMessageComponentButtonInteraction;
+export const isMessageComponentDMInteraction = mod.isMessageComponentDMInteraction;
+export const isMessageComponentGuildInteraction = mod.isMessageComponentGuildInteraction;
+export const isMessageComponentInteraction = mod.isMessageComponentInteraction;
+export const isMessageComponentSelectMenuInteraction = mod.isMessageComponentSelectMenuInteraction;
diff --git a/node_modules/discord-api-types/utils/v8.d.ts b/node_modules/discord-api-types/utils/v8.d.ts
new file mode 100644
index 0000000..c0fb387
--- /dev/null
+++ b/node_modules/discord-api-types/utils/v8.d.ts
@@ -0,0 +1,66 @@
+import type { APIApplicationCommandDMInteraction, APIApplicationCommandGuildInteraction, APIApplicationCommandInteraction, APIButtonComponent, APIButtonComponentWithCustomId, APIButtonComponentWithURL, APIDMInteraction, APIGuildInteraction, APIInteraction, APIMessageComponentDMInteraction, APIMessageComponentGuildInteraction, APIMessageComponentInteraction } from '../payloads/v8/index';
+/**
+ * A type-guard check for DM interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction was received in a DM channel
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare function isDMInteraction(interaction: APIInteraction): interaction is APIDMInteraction;
+/**
+ * A type-guard check for guild interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction was received in a guild
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare function isGuildInteraction(interaction: APIInteraction): interaction is APIGuildInteraction;
+/**
+ * A type-guard check for DM application command interactions
+ *
+ * @param interaction The application command interaction to check against
+ * @returns A boolean that indicates if the application command interaction was received in a DM channel
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare function isApplicationCommandDMInteraction(interaction: APIApplicationCommandInteraction): interaction is APIApplicationCommandDMInteraction;
+/**
+ * A type-guard check for guild application command interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the application command interaction was received in a guild
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare function isApplicationCommandGuildInteraction(interaction: APIApplicationCommandInteraction): interaction is APIApplicationCommandGuildInteraction;
+/**
+ * A type-guard check for DM message component interactions
+ *
+ * @param interaction The message component interaction to check against
+ * @returns A boolean that indicates if the message component interaction was received in a DM channel
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare function isMessageComponentDMInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentDMInteraction;
+/**
+ * A type-guard check for guild message component interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the message component interaction was received in a guild
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare function isMessageComponentGuildInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentGuildInteraction;
+/**
+ * A type-guard check for buttons that have a `url` attached to them.
+ *
+ * @param component The button to check against
+ * @returns A boolean that indicates if the button has a `url` attached to it
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare function isLinkButton(component: APIButtonComponent): component is APIButtonComponentWithURL;
+/**
+ * A type-guard check for buttons that have a `custom_id` attached to them.
+ *
+ * @param component The button to check against
+ * @returns A boolean that indicates if the button has a `custom_id` attached to it
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+export declare function isInteractionButton(component: APIButtonComponent): component is APIButtonComponentWithCustomId;
+//# sourceMappingURL=v8.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/v8.d.ts.map b/node_modules/discord-api-types/utils/v8.d.ts.map
new file mode 100644
index 0000000..de7255f
--- /dev/null
+++ b/node_modules/discord-api-types/utils/v8.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"v8.d.ts","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kCAAkC,EAClC,qCAAqC,EACrC,gCAAgC,EAChC,kBAAkB,EAClB,8BAA8B,EAC9B,yBAAyB,EACzB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,gCAAgC,EAChC,mCAAmC,EACnC,8BAA8B,EAC9B,MAAM,sBAAsB,CAAC;AAK9B;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,cAAc,GAAG,WAAW,IAAI,gBAAgB,CAE5F;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,cAAc,GAAG,WAAW,IAAI,mBAAmB,CAElG;AAID;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAChD,WAAW,EAAE,gCAAgC,GAC3C,WAAW,IAAI,kCAAkC,CAEnD;AAED;;;;;;GAMG;AACH,wBAAgB,oCAAoC,CACnD,WAAW,EAAE,gCAAgC,GAC3C,WAAW,IAAI,qCAAqC,CAEtD;AAID;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC9C,WAAW,EAAE,8BAA8B,GACzC,WAAW,IAAI,gCAAgC,CAEjD;AAED;;;;;;GAMG;AACH,wBAAgB,kCAAkC,CACjD,WAAW,EAAE,8BAA8B,GACzC,WAAW,IAAI,mCAAmC,CAEpD;AAID;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,kBAAkB,GAAG,SAAS,IAAI,yBAAyB,CAElG;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,kBAAkB,GAAG,SAAS,IAAI,8BAA8B,CAE9G"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/v8.js b/node_modules/discord-api-types/utils/v8.js
new file mode 100644
index 0000000..769b5df
--- /dev/null
+++ b/node_modules/discord-api-types/utils/v8.js
@@ -0,0 +1,97 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isInteractionButton = exports.isLinkButton = exports.isMessageComponentGuildInteraction = exports.isMessageComponentDMInteraction = exports.isApplicationCommandGuildInteraction = exports.isApplicationCommandDMInteraction = exports.isGuildInteraction = exports.isDMInteraction = void 0;
+const index_1 = require("../payloads/v8/index");
+// Interactions
+/**
+ * A type-guard check for DM interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction was received in a DM channel
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+function isDMInteraction(interaction) {
+ return Reflect.has(interaction, 'user');
+}
+exports.isDMInteraction = isDMInteraction;
+/**
+ * A type-guard check for guild interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction was received in a guild
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+function isGuildInteraction(interaction) {
+ return Reflect.has(interaction, 'guild_id');
+}
+exports.isGuildInteraction = isGuildInteraction;
+// ApplicationCommandInteractions
+/**
+ * A type-guard check for DM application command interactions
+ *
+ * @param interaction The application command interaction to check against
+ * @returns A boolean that indicates if the application command interaction was received in a DM channel
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+function isApplicationCommandDMInteraction(interaction) {
+ return isDMInteraction(interaction);
+}
+exports.isApplicationCommandDMInteraction = isApplicationCommandDMInteraction;
+/**
+ * A type-guard check for guild application command interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the application command interaction was received in a guild
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+function isApplicationCommandGuildInteraction(interaction) {
+ return isGuildInteraction(interaction);
+}
+exports.isApplicationCommandGuildInteraction = isApplicationCommandGuildInteraction;
+// MessageComponentInteractions
+/**
+ * A type-guard check for DM message component interactions
+ *
+ * @param interaction The message component interaction to check against
+ * @returns A boolean that indicates if the message component interaction was received in a DM channel
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+function isMessageComponentDMInteraction(interaction) {
+ return isDMInteraction(interaction);
+}
+exports.isMessageComponentDMInteraction = isMessageComponentDMInteraction;
+/**
+ * A type-guard check for guild message component interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the message component interaction was received in a guild
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+function isMessageComponentGuildInteraction(interaction) {
+ return isGuildInteraction(interaction);
+}
+exports.isMessageComponentGuildInteraction = isMessageComponentGuildInteraction;
+// Buttons
+/**
+ * A type-guard check for buttons that have a `url` attached to them.
+ *
+ * @param component The button to check against
+ * @returns A boolean that indicates if the button has a `url` attached to it
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+function isLinkButton(component) {
+ return component.style === index_1.ButtonStyle.Link;
+}
+exports.isLinkButton = isLinkButton;
+/**
+ * A type-guard check for buttons that have a `custom_id` attached to them.
+ *
+ * @param component The button to check against
+ * @returns A boolean that indicates if the button has a `custom_id` attached to it
+ * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
+ */
+function isInteractionButton(component) {
+ return component.style !== index_1.ButtonStyle.Link;
+}
+exports.isInteractionButton = isInteractionButton;
+//# sourceMappingURL=v8.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/v8.js.map b/node_modules/discord-api-types/utils/v8.js.map
new file mode 100644
index 0000000..d0165a7
--- /dev/null
+++ b/node_modules/discord-api-types/utils/v8.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"v8.js","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":";;;AAcA,gDAAmD;AAEnD,eAAe;AAEf;;;;;;GAMG;AACH,SAAgB,eAAe,CAAC,WAA2B;IAC1D,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AACzC,CAAC;AAFD,0CAEC;AAED;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAAC,WAA2B;IAC7D,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;AAC7C,CAAC;AAFD,gDAEC;AAED,iCAAiC;AAEjC;;;;;;GAMG;AACH,SAAgB,iCAAiC,CAChD,WAA6C;IAE7C,OAAO,eAAe,CAAC,WAAW,CAAC,CAAC;AACrC,CAAC;AAJD,8EAIC;AAED;;;;;;GAMG;AACH,SAAgB,oCAAoC,CACnD,WAA6C;IAE7C,OAAO,kBAAkB,CAAC,WAAW,CAAC,CAAC;AACxC,CAAC;AAJD,oFAIC;AAED,+BAA+B;AAE/B;;;;;;GAMG;AACH,SAAgB,+BAA+B,CAC9C,WAA2C;IAE3C,OAAO,eAAe,CAAC,WAAW,CAAC,CAAC;AACrC,CAAC;AAJD,0EAIC;AAED;;;;;;GAMG;AACH,SAAgB,kCAAkC,CACjD,WAA2C;IAE3C,OAAO,kBAAkB,CAAC,WAAW,CAAC,CAAC;AACxC,CAAC;AAJD,gFAIC;AAED,UAAU;AAEV;;;;;;GAMG;AACH,SAAgB,YAAY,CAAC,SAA6B;IACzD,OAAO,SAAS,CAAC,KAAK,KAAK,mBAAW,CAAC,IAAI,CAAC;AAC7C,CAAC;AAFD,oCAEC;AAED;;;;;;GAMG;AACH,SAAgB,mBAAmB,CAAC,SAA6B;IAChE,OAAO,SAAS,CAAC,KAAK,KAAK,mBAAW,CAAC,IAAI,CAAC;AAC7C,CAAC;AAFD,kDAEC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/v8.mjs b/node_modules/discord-api-types/utils/v8.mjs
new file mode 100644
index 0000000..3aad4fb
--- /dev/null
+++ b/node_modules/discord-api-types/utils/v8.mjs
@@ -0,0 +1,11 @@
+import mod from "./v8.js";
+
+export default mod;
+export const isApplicationCommandDMInteraction = mod.isApplicationCommandDMInteraction;
+export const isApplicationCommandGuildInteraction = mod.isApplicationCommandGuildInteraction;
+export const isDMInteraction = mod.isDMInteraction;
+export const isGuildInteraction = mod.isGuildInteraction;
+export const isInteractionButton = mod.isInteractionButton;
+export const isLinkButton = mod.isLinkButton;
+export const isMessageComponentDMInteraction = mod.isMessageComponentDMInteraction;
+export const isMessageComponentGuildInteraction = mod.isMessageComponentGuildInteraction;
diff --git a/node_modules/discord-api-types/utils/v9.d.ts b/node_modules/discord-api-types/utils/v9.d.ts
new file mode 100644
index 0000000..76854fa
--- /dev/null
+++ b/node_modules/discord-api-types/utils/v9.d.ts
@@ -0,0 +1,93 @@
+import type { APIApplicationCommandDMInteraction, APIApplicationCommandGuildInteraction, APIApplicationCommandInteraction, APIButtonComponent, APIButtonComponentWithCustomId, APIButtonComponentWithURL, APIChatInputApplicationCommandInteraction, APIContextMenuInteraction, APIDMInteraction, APIGuildInteraction, APIInteraction, APIMessageComponentButtonInteraction, APIMessageComponentDMInteraction, APIMessageComponentGuildInteraction, APIMessageComponentInteraction, APIMessageComponentSelectMenuInteraction } from '../payloads/v9/index';
+/**
+ * A type-guard check for DM interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction was received in a DM channel
+ */
+export declare function isDMInteraction(interaction: APIInteraction): interaction is APIDMInteraction;
+/**
+ * A type-guard check for guild interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction was received in a guild
+ */
+export declare function isGuildInteraction(interaction: APIInteraction): interaction is APIGuildInteraction;
+/**
+ * A type-guard check for DM application command interactions
+ *
+ * @param interaction The application command interaction to check against
+ * @returns A boolean that indicates if the application command interaction was received in a DM channel
+ */
+export declare function isApplicationCommandDMInteraction(interaction: APIApplicationCommandInteraction): interaction is APIApplicationCommandDMInteraction;
+/**
+ * A type-guard check for guild application command interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the application command interaction was received in a guild
+ */
+export declare function isApplicationCommandGuildInteraction(interaction: APIApplicationCommandInteraction): interaction is APIApplicationCommandGuildInteraction;
+/**
+ * A type-guard check for DM message component interactions
+ *
+ * @param interaction The message component interaction to check against
+ * @returns A boolean that indicates if the message component interaction was received in a DM channel
+ */
+export declare function isMessageComponentDMInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentDMInteraction;
+/**
+ * A type-guard check for guild message component interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the message component interaction was received in a guild
+ */
+export declare function isMessageComponentGuildInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentGuildInteraction;
+/**
+ * A type-guard check for buttons that have a `url` attached to them.
+ *
+ * @param component The button to check against
+ * @returns A boolean that indicates if the button has a `url` attached to it
+ */
+export declare function isLinkButton(component: APIButtonComponent): component is APIButtonComponentWithURL;
+/**
+ * A type-guard check for buttons that have a `custom_id` attached to them.
+ *
+ * @param component The button to check against
+ * @returns A boolean that indicates if the button has a `custom_id` attached to it
+ */
+export declare function isInteractionButton(component: APIButtonComponent): component is APIButtonComponentWithCustomId;
+/**
+ * A type-guard check for message component interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction is a message component
+ */
+export declare function isMessageComponentInteraction(interaction: APIInteraction): interaction is APIMessageComponentInteraction;
+/**
+ * A type-guard check for button message component interactions
+ *
+ * @param interaction The message component interaction to check against
+ * @returns A boolean that indicates if the message component is a button
+ */
+export declare function isMessageComponentButtonInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentButtonInteraction;
+/**
+ * A type-guard check for select menu message component interactions
+ *
+ * @param interaction The message component interaction to check against
+ * @returns A boolean that indicates if the message component is a select menu
+ */
+export declare function isMessageComponentSelectMenuInteraction(interaction: APIMessageComponentInteraction): interaction is APIMessageComponentSelectMenuInteraction;
+/**
+ * A type-guard check for chat input application commands.
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction is a chat input application command
+ */
+export declare function isChatInputApplicationCommandInteraction(interaction: APIApplicationCommandInteraction): interaction is APIChatInputApplicationCommandInteraction;
+/**
+ * A type-guard check for context menu application commands.
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction is a context menu application command
+ */
+export declare function isContextMenuApplicationCommandInteraction(interaction: APIApplicationCommandInteraction): interaction is APIContextMenuInteraction;
+//# sourceMappingURL=v9.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/v9.d.ts.map b/node_modules/discord-api-types/utils/v9.d.ts.map
new file mode 100644
index 0000000..bbff98f
--- /dev/null
+++ b/node_modules/discord-api-types/utils/v9.d.ts.map
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KG;AACH,wBAAgB,mCAAmC,CAClD,WAAW,EAAE,8BAA8B,GACzC,WAAW,IAAI,oCAAoC,CAErD;AAED;;;;;GAKG;AACH,wBAAgB,uCAAuC,CACtD,WAAW,EAAE,8BAA8B,GACzC,WAAW,IAAI,wCAAwC,CAQzD;AAID;;;;;GAKG;AACH,wBAAgB,wCAAwC,CACvD,WAAW,EAAE,gCAAgC,GAC3C,WAAW,IAAI,yCAAyC,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,0CAA0C,CACzD,WAAW,EAAE,gCAAgC,GAC3C,WAAW,IAAI,yBAAyB,CAI1C"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/v9.js b/node_modules/discord-api-types/utils/v9.js
new file mode 100644
index 0000000..61dde3f
--- /dev/null
+++ b/node_modules/discord-api-types/utils/v9.js
@@ -0,0 +1,147 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isContextMenuApplicationCommandInteraction = exports.isChatInputApplicationCommandInteraction = exports.isMessageComponentSelectMenuInteraction = exports.isMessageComponentButtonInteraction = exports.isMessageComponentInteraction = exports.isInteractionButton = exports.isLinkButton = exports.isMessageComponentGuildInteraction = exports.isMessageComponentDMInteraction = exports.isApplicationCommandGuildInteraction = exports.isApplicationCommandDMInteraction = exports.isGuildInteraction = exports.isDMInteraction = void 0;
+const index_1 = require("../payloads/v9/index");
+// Interactions
+/**
+ * A type-guard check for DM interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction was received in a DM channel
+ */
+function isDMInteraction(interaction) {
+ return Reflect.has(interaction, 'user');
+}
+exports.isDMInteraction = isDMInteraction;
+/**
+ * A type-guard check for guild interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction was received in a guild
+ */
+function isGuildInteraction(interaction) {
+ return Reflect.has(interaction, 'guild_id');
+}
+exports.isGuildInteraction = isGuildInteraction;
+// ApplicationCommandInteractions
+/**
+ * A type-guard check for DM application command interactions
+ *
+ * @param interaction The application command interaction to check against
+ * @returns A boolean that indicates if the application command interaction was received in a DM channel
+ */
+function isApplicationCommandDMInteraction(interaction) {
+ return isDMInteraction(interaction);
+}
+exports.isApplicationCommandDMInteraction = isApplicationCommandDMInteraction;
+/**
+ * A type-guard check for guild application command interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the application command interaction was received in a guild
+ */
+function isApplicationCommandGuildInteraction(interaction) {
+ return isGuildInteraction(interaction);
+}
+exports.isApplicationCommandGuildInteraction = isApplicationCommandGuildInteraction;
+// MessageComponentInteractions
+/**
+ * A type-guard check for DM message component interactions
+ *
+ * @param interaction The message component interaction to check against
+ * @returns A boolean that indicates if the message component interaction was received in a DM channel
+ */
+function isMessageComponentDMInteraction(interaction) {
+ return isDMInteraction(interaction);
+}
+exports.isMessageComponentDMInteraction = isMessageComponentDMInteraction;
+/**
+ * A type-guard check for guild message component interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the message component interaction was received in a guild
+ */
+function isMessageComponentGuildInteraction(interaction) {
+ return isGuildInteraction(interaction);
+}
+exports.isMessageComponentGuildInteraction = isMessageComponentGuildInteraction;
+// Buttons
+/**
+ * A type-guard check for buttons that have a `url` attached to them.
+ *
+ * @param component The button to check against
+ * @returns A boolean that indicates if the button has a `url` attached to it
+ */
+function isLinkButton(component) {
+ return component.style === index_1.ButtonStyle.Link;
+}
+exports.isLinkButton = isLinkButton;
+/**
+ * A type-guard check for buttons that have a `custom_id` attached to them.
+ *
+ * @param component The button to check against
+ * @returns A boolean that indicates if the button has a `custom_id` attached to it
+ */
+function isInteractionButton(component) {
+ return component.style !== index_1.ButtonStyle.Link;
+}
+exports.isInteractionButton = isInteractionButton;
+// Message Components
+/**
+ * A type-guard check for message component interactions
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction is a message component
+ */
+function isMessageComponentInteraction(interaction) {
+ return interaction.type === index_1.InteractionType.MessageComponent;
+}
+exports.isMessageComponentInteraction = isMessageComponentInteraction;
+/**
+ * A type-guard check for button message component interactions
+ *
+ * @param interaction The message component interaction to check against
+ * @returns A boolean that indicates if the message component is a button
+ */
+function isMessageComponentButtonInteraction(interaction) {
+ return interaction.data.component_type === index_1.ComponentType.Button;
+}
+exports.isMessageComponentButtonInteraction = isMessageComponentButtonInteraction;
+/**
+ * A type-guard check for select menu message component interactions
+ *
+ * @param interaction The message component interaction to check against
+ * @returns A boolean that indicates if the message component is a select menu
+ */
+function isMessageComponentSelectMenuInteraction(interaction) {
+ return [
+ index_1.ComponentType.StringSelect,
+ index_1.ComponentType.UserSelect,
+ index_1.ComponentType.RoleSelect,
+ index_1.ComponentType.MentionableSelect,
+ index_1.ComponentType.ChannelSelect,
+ ].includes(interaction.data.component_type);
+}
+exports.isMessageComponentSelectMenuInteraction = isMessageComponentSelectMenuInteraction;
+// Application Commands
+/**
+ * A type-guard check for chat input application commands.
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction is a chat input application command
+ */
+function isChatInputApplicationCommandInteraction(interaction) {
+ return interaction.data.type === index_1.ApplicationCommandType.ChatInput;
+}
+exports.isChatInputApplicationCommandInteraction = isChatInputApplicationCommandInteraction;
+/**
+ * A type-guard check for context menu application commands.
+ *
+ * @param interaction The interaction to check against
+ * @returns A boolean that indicates if the interaction is a context menu application command
+ */
+function isContextMenuApplicationCommandInteraction(interaction) {
+ return (interaction.data.type === index_1.ApplicationCommandType.Message || interaction.data.type === index_1.ApplicationCommandType.User);
+}
+exports.isContextMenuApplicationCommandInteraction = isContextMenuApplicationCommandInteraction;
+//# sourceMappingURL=v9.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/v9.js.map b/node_modules/discord-api-types/utils/v9.js.map
new file mode 100644
index 0000000..5bbf353
--- /dev/null
+++ b/node_modules/discord-api-types/utils/v9.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"v9.js","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":";;;AAkBA,gDAA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AAC;AAJD,sEAIC;AAED;;;;;GAKG;AACH,SAAgB,mCAAmC,CAClD,WAA2C;IAE3C,OAAO,WAAW,CAAC,IAAI,CAAC,cAAc,KAAK,qBAAa,CAAC,MAAM,CAAC;AACjE,CAAC;AAJD,kFAIC;AAED;;;;;GAKG;AACH,SAAgB,uCAAuC,CACtD,WAA2C;IAE3C,OAAO;QACN,qBAAa,CAAC,YAAY;QAC1B,qBAAa,CAAC,UAAU;QACxB,qBAAa,CAAC,UAAU;QACxB,qBAAa,CAAC,iBAAiB;QAC/B,qBAAa,CAAC,aAAa;KAC3B,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAC7C,CAAC;AAVD,0FAUC;AAED,uBAAuB;AAEvB;;;;;GAKG;AACH,SAAgB,wCAAwC,CACvD,WAA6C;IAE7C,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,KAAK,8BAAsB,CAAC,SAAS,CAAC;AACnE,CAAC;AAJD,4FAIC;AAED;;;;;GAKG;AACH,SAAgB,0CAA0C,CACzD,WAA6C;IAE7C,OAAO,CACN,WAAW,CAAC,IAAI,CAAC,IAAI,KAAK,8BAAsB,CAAC,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,KAAK,8BAAsB,CAAC,IAAI,CACjH,CAAC;AACH,CAAC;AAND,gGAMC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/utils/v9.mjs b/node_modules/discord-api-types/utils/v9.mjs
new file mode 100644
index 0000000..30f4b98
--- /dev/null
+++ b/node_modules/discord-api-types/utils/v9.mjs
@@ -0,0 +1,16 @@
+import mod from "./v9.js";
+
+export default mod;
+export const isApplicationCommandDMInteraction = mod.isApplicationCommandDMInteraction;
+export const isApplicationCommandGuildInteraction = mod.isApplicationCommandGuildInteraction;
+export const isChatInputApplicationCommandInteraction = mod.isChatInputApplicationCommandInteraction;
+export const isContextMenuApplicationCommandInteraction = mod.isContextMenuApplicationCommandInteraction;
+export const isDMInteraction = mod.isDMInteraction;
+export const isGuildInteraction = mod.isGuildInteraction;
+export const isInteractionButton = mod.isInteractionButton;
+export const isLinkButton = mod.isLinkButton;
+export const isMessageComponentButtonInteraction = mod.isMessageComponentButtonInteraction;
+export const isMessageComponentDMInteraction = mod.isMessageComponentDMInteraction;
+export const isMessageComponentGuildInteraction = mod.isMessageComponentGuildInteraction;
+export const isMessageComponentInteraction = mod.isMessageComponentInteraction;
+export const isMessageComponentSelectMenuInteraction = mod.isMessageComponentSelectMenuInteraction;
diff --git a/node_modules/discord-api-types/v10.d.ts b/node_modules/discord-api-types/v10.d.ts
new file mode 100644
index 0000000..1eabdfc
--- /dev/null
+++ b/node_modules/discord-api-types/v10.d.ts
@@ -0,0 +1,7 @@
+export * from './gateway/v10';
+export * from './globals';
+export * from './payloads/v10/index';
+export * from './rest/v10/index';
+export * from './rpc/v10';
+export * as Utils from './utils/v10';
+//# sourceMappingURL=v10.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/v10.d.ts.map b/node_modules/discord-api-types/v10.d.ts.map
new file mode 100644
index 0000000..09b8cc4
--- /dev/null
+++ b/node_modules/discord-api-types/v10.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"v10.d.ts","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/v10.js b/node_modules/discord-api-types/v10.js
new file mode 100644
index 0000000..bd0ea59
--- /dev/null
+++ b/node_modules/discord-api-types/v10.js
@@ -0,0 +1,24 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Utils = void 0;
+__exportStar(require("./gateway/v10"), exports);
+__exportStar(require("./globals"), exports);
+__exportStar(require("./payloads/v10/index"), exports);
+__exportStar(require("./rest/v10/index"), exports);
+__exportStar(require("./rpc/v10"), exports);
+exports.Utils = require("./utils/v10");
+//# sourceMappingURL=v10.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/v10.js.map b/node_modules/discord-api-types/v10.js.map
new file mode 100644
index 0000000..9c2005a
--- /dev/null
+++ b/node_modules/discord-api-types/v10.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"v10.js","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,4CAA0B;AAC1B,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,uCAAqC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/v10.mjs b/node_modules/discord-api-types/v10.mjs
new file mode 100644
index 0000000..c950f61
--- /dev/null
+++ b/node_modules/discord-api-types/v10.mjs
@@ -0,0 +1,87 @@
+import mod from "./v10.js";
+
+export default mod;
+export const APIApplicationCommandPermissionsConstant = mod.APIApplicationCommandPermissionsConstant;
+export const APIVersion = mod.APIVersion;
+export const ActivityFlags = mod.ActivityFlags;
+export const ActivityPlatform = mod.ActivityPlatform;
+export const ActivityType = mod.ActivityType;
+export const AllowedMentionsTypes = mod.AllowedMentionsTypes;
+export const ApplicationCommandOptionType = mod.ApplicationCommandOptionType;
+export const ApplicationCommandPermissionType = mod.ApplicationCommandPermissionType;
+export const ApplicationCommandType = mod.ApplicationCommandType;
+export const ApplicationFlags = mod.ApplicationFlags;
+export const ApplicationRoleConnectionMetadataType = mod.ApplicationRoleConnectionMetadataType;
+export const AttachmentFlags = mod.AttachmentFlags;
+export const AuditLogEvent = mod.AuditLogEvent;
+export const AuditLogOptionsType = mod.AuditLogOptionsType;
+export const AutoModerationActionType = mod.AutoModerationActionType;
+export const AutoModerationRuleEventType = mod.AutoModerationRuleEventType;
+export const AutoModerationRuleKeywordPresetType = mod.AutoModerationRuleKeywordPresetType;
+export const AutoModerationRuleTriggerType = mod.AutoModerationRuleTriggerType;
+export const ButtonStyle = mod.ButtonStyle;
+export const CDNRoutes = mod.CDNRoutes;
+export const ChannelFlags = mod.ChannelFlags;
+export const ChannelType = mod.ChannelType;
+export const ComponentType = mod.ComponentType;
+export const ConnectionService = mod.ConnectionService;
+export const ConnectionVisibility = mod.ConnectionVisibility;
+export const EmbedType = mod.EmbedType;
+export const FormattingPatterns = mod.FormattingPatterns;
+export const ForumLayoutType = mod.ForumLayoutType;
+export const GatewayCloseCodes = mod.GatewayCloseCodes;
+export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
+export const GatewayIntentBits = mod.GatewayIntentBits;
+export const GatewayOpcodes = mod.GatewayOpcodes;
+export const GatewayVersion = mod.GatewayVersion;
+export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications;
+export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter;
+export const GuildFeature = mod.GuildFeature;
+export const GuildHubType = mod.GuildHubType;
+export const GuildMFALevel = mod.GuildMFALevel;
+export const GuildMemberFlags = mod.GuildMemberFlags;
+export const GuildNSFWLevel = mod.GuildNSFWLevel;
+export const GuildOnboardingMode = mod.GuildOnboardingMode;
+export const GuildOnboardingPromptType = mod.GuildOnboardingPromptType;
+export const GuildPremiumTier = mod.GuildPremiumTier;
+export const GuildScheduledEventEntityType = mod.GuildScheduledEventEntityType;
+export const GuildScheduledEventPrivacyLevel = mod.GuildScheduledEventPrivacyLevel;
+export const GuildScheduledEventStatus = mod.GuildScheduledEventStatus;
+export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags;
+export const GuildVerificationLevel = mod.GuildVerificationLevel;
+export const GuildWidgetStyle = mod.GuildWidgetStyle;
+export const ImageFormat = mod.ImageFormat;
+export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior;
+export const InteractionResponseType = mod.InteractionResponseType;
+export const InteractionType = mod.InteractionType;
+export const InviteTargetType = mod.InviteTargetType;
+export const Locale = mod.Locale;
+export const MembershipScreeningFieldType = mod.MembershipScreeningFieldType;
+export const MessageActivityType = mod.MessageActivityType;
+export const MessageFlags = mod.MessageFlags;
+export const MessageType = mod.MessageType;
+export const OAuth2Routes = mod.OAuth2Routes;
+export const OAuth2Scopes = mod.OAuth2Scopes;
+export const OverwriteType = mod.OverwriteType;
+export const PermissionFlagsBits = mod.PermissionFlagsBits;
+export const PresenceUpdateStatus = mod.PresenceUpdateStatus;
+export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes;
+export const RPCCloseEventCodes = mod.RPCCloseEventCodes;
+export const RPCErrorCodes = mod.RPCErrorCodes;
+export const RoleFlags = mod.RoleFlags;
+export const RouteBases = mod.RouteBases;
+export const Routes = mod.Routes;
+export const SortOrderType = mod.SortOrderType;
+export const StageInstancePrivacyLevel = mod.StageInstancePrivacyLevel;
+export const StickerFormatType = mod.StickerFormatType;
+export const StickerPackApplicationId = mod.StickerPackApplicationId;
+export const StickerType = mod.StickerType;
+export const TeamMemberMembershipState = mod.TeamMemberMembershipState;
+export const TextInputStyle = mod.TextInputStyle;
+export const ThreadAutoArchiveDuration = mod.ThreadAutoArchiveDuration;
+export const ThreadMemberFlags = mod.ThreadMemberFlags;
+export const UserFlags = mod.UserFlags;
+export const UserPremiumType = mod.UserPremiumType;
+export const Utils = mod.Utils;
+export const VideoQualityMode = mod.VideoQualityMode;
+export const WebhookType = mod.WebhookType;
diff --git a/node_modules/discord-api-types/v6.d.ts b/node_modules/discord-api-types/v6.d.ts
new file mode 100644
index 0000000..fd66bfb
--- /dev/null
+++ b/node_modules/discord-api-types/v6.d.ts
@@ -0,0 +1,5 @@
+export * from './gateway/v6';
+export * from './globals';
+export * from './payloads/v6/index';
+export * from './rest/v6/index';
+//# sourceMappingURL=v6.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/v6.d.ts.map b/node_modules/discord-api-types/v6.d.ts.map
new file mode 100644
index 0000000..ef60251
--- /dev/null
+++ b/node_modules/discord-api-types/v6.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"v6.d.ts","sourceRoot":"","sources":["v6.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/v6.js b/node_modules/discord-api-types/v6.js
new file mode 100644
index 0000000..52d0b1b
--- /dev/null
+++ b/node_modules/discord-api-types/v6.js
@@ -0,0 +1,21 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./gateway/v6"), exports);
+__exportStar(require("./globals"), exports);
+__exportStar(require("./payloads/v6/index"), exports);
+__exportStar(require("./rest/v6/index"), exports);
+//# sourceMappingURL=v6.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/v6.js.map b/node_modules/discord-api-types/v6.js.map
new file mode 100644
index 0000000..cc34895
--- /dev/null
+++ b/node_modules/discord-api-types/v6.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"v6.js","sourceRoot":"","sources":["v6.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,4CAA0B;AAC1B,sDAAoC;AACpC,kDAAgC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/v6.mjs b/node_modules/discord-api-types/v6.mjs
new file mode 100644
index 0000000..dcecbec
--- /dev/null
+++ b/node_modules/discord-api-types/v6.mjs
@@ -0,0 +1,43 @@
+import mod from "./v6.js";
+
+export default mod;
+export const APIVersion = mod.APIVersion;
+export const ActivityFlags = mod.ActivityFlags;
+export const ActivityType = mod.ActivityType;
+export const AllowedMentionsTypes = mod.AllowedMentionsTypes;
+export const AuditLogEvent = mod.AuditLogEvent;
+export const AuditLogOptionsType = mod.AuditLogOptionsType;
+export const ChannelType = mod.ChannelType;
+export const ConnectionVisibility = mod.ConnectionVisibility;
+export const EmbedType = mod.EmbedType;
+export const FormattingPatterns = mod.FormattingPatterns;
+export const GatewayCloseCodes = mod.GatewayCloseCodes;
+export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
+export const GatewayIntentBits = mod.GatewayIntentBits;
+export const GatewayOPCodes = mod.GatewayOPCodes;
+export const GatewayVersion = mod.GatewayVersion;
+export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications;
+export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter;
+export const GuildFeature = mod.GuildFeature;
+export const GuildMFALevel = mod.GuildMFALevel;
+export const GuildPremiumTier = mod.GuildPremiumTier;
+export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags;
+export const GuildVerificationLevel = mod.GuildVerificationLevel;
+export const GuildWidgetStyle = mod.GuildWidgetStyle;
+export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior;
+export const InviteTargetUserType = mod.InviteTargetUserType;
+export const Locale = mod.Locale;
+export const MessageActivityType = mod.MessageActivityType;
+export const MessageFlags = mod.MessageFlags;
+export const MessageType = mod.MessageType;
+export const OverwriteType = mod.OverwriteType;
+export const PermissionFlagsBits = mod.PermissionFlagsBits;
+export const PresenceUpdateStatus = mod.PresenceUpdateStatus;
+export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes;
+export const Routes = mod.Routes;
+export const TeamMemberMembershipState = mod.TeamMemberMembershipState;
+export const UserFlags = mod.UserFlags;
+export const UserPremiumType = mod.UserPremiumType;
+export const VoiceCloseCodes = mod.VoiceCloseCodes;
+export const VoiceOPCodes = mod.VoiceOPCodes;
+export const WebhookType = mod.WebhookType;
diff --git a/node_modules/discord-api-types/v8.d.ts b/node_modules/discord-api-types/v8.d.ts
new file mode 100644
index 0000000..2865f69
--- /dev/null
+++ b/node_modules/discord-api-types/v8.d.ts
@@ -0,0 +1,7 @@
+export * from './gateway/v8';
+export * from './globals';
+export * from './payloads/v8/index';
+export * from './rest/v8/index';
+export * from './rpc/v8';
+export * as Utils from './utils/v8';
+//# sourceMappingURL=v8.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/v8.d.ts.map b/node_modules/discord-api-types/v8.d.ts.map
new file mode 100644
index 0000000..68450db
--- /dev/null
+++ b/node_modules/discord-api-types/v8.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"v8.d.ts","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/v8.js b/node_modules/discord-api-types/v8.js
new file mode 100644
index 0000000..62f9b9d
--- /dev/null
+++ b/node_modules/discord-api-types/v8.js
@@ -0,0 +1,24 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Utils = void 0;
+__exportStar(require("./gateway/v8"), exports);
+__exportStar(require("./globals"), exports);
+__exportStar(require("./payloads/v8/index"), exports);
+__exportStar(require("./rest/v8/index"), exports);
+__exportStar(require("./rpc/v8"), exports);
+exports.Utils = require("./utils/v8");
+//# sourceMappingURL=v8.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/v8.js.map b/node_modules/discord-api-types/v8.js.map
new file mode 100644
index 0000000..92ded5f
--- /dev/null
+++ b/node_modules/discord-api-types/v8.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"v8.js","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,4CAA0B;AAC1B,sDAAoC;AACpC,kDAAgC;AAChC,2CAAyB;AACzB,sCAAoC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/v8.mjs b/node_modules/discord-api-types/v8.mjs
new file mode 100644
index 0000000..acf51c5
--- /dev/null
+++ b/node_modules/discord-api-types/v8.mjs
@@ -0,0 +1,66 @@
+import mod from "./v8.js";
+
+export default mod;
+export const APIVersion = mod.APIVersion;
+export const ActivityFlags = mod.ActivityFlags;
+export const ActivityPlatform = mod.ActivityPlatform;
+export const ActivityType = mod.ActivityType;
+export const AllowedMentionsTypes = mod.AllowedMentionsTypes;
+export const ApplicationCommandOptionType = mod.ApplicationCommandOptionType;
+export const ApplicationCommandPermissionType = mod.ApplicationCommandPermissionType;
+export const ApplicationCommandType = mod.ApplicationCommandType;
+export const ApplicationFlags = mod.ApplicationFlags;
+export const AuditLogEvent = mod.AuditLogEvent;
+export const AuditLogOptionsType = mod.AuditLogOptionsType;
+export const ButtonStyle = mod.ButtonStyle;
+export const ChannelType = mod.ChannelType;
+export const ComponentType = mod.ComponentType;
+export const ConnectionVisibility = mod.ConnectionVisibility;
+export const EmbedType = mod.EmbedType;
+export const FormattingPatterns = mod.FormattingPatterns;
+export const GatewayCloseCodes = mod.GatewayCloseCodes;
+export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
+export const GatewayIntentBits = mod.GatewayIntentBits;
+export const GatewayOpcodes = mod.GatewayOpcodes;
+export const GatewayVersion = mod.GatewayVersion;
+export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications;
+export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter;
+export const GuildFeature = mod.GuildFeature;
+export const GuildMFALevel = mod.GuildMFALevel;
+export const GuildNSFWLevel = mod.GuildNSFWLevel;
+export const GuildPremiumTier = mod.GuildPremiumTier;
+export const GuildScheduledEventEntityType = mod.GuildScheduledEventEntityType;
+export const GuildScheduledEventPrivacyLevel = mod.GuildScheduledEventPrivacyLevel;
+export const GuildScheduledEventStatus = mod.GuildScheduledEventStatus;
+export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags;
+export const GuildVerificationLevel = mod.GuildVerificationLevel;
+export const GuildWidgetStyle = mod.GuildWidgetStyle;
+export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior;
+export const InteractionResponseType = mod.InteractionResponseType;
+export const InteractionType = mod.InteractionType;
+export const InviteTargetType = mod.InviteTargetType;
+export const Locale = mod.Locale;
+export const MembershipScreeningFieldType = mod.MembershipScreeningFieldType;
+export const MessageActivityType = mod.MessageActivityType;
+export const MessageFlags = mod.MessageFlags;
+export const MessageType = mod.MessageType;
+export const OAuth2Routes = mod.OAuth2Routes;
+export const OAuth2Scopes = mod.OAuth2Scopes;
+export const OverwriteType = mod.OverwriteType;
+export const PermissionFlagsBits = mod.PermissionFlagsBits;
+export const PresenceUpdateStatus = mod.PresenceUpdateStatus;
+export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes;
+export const RPCCloseEventCodes = mod.RPCCloseEventCodes;
+export const RPCErrorCodes = mod.RPCErrorCodes;
+export const RouteBases = mod.RouteBases;
+export const Routes = mod.Routes;
+export const StageInstancePrivacyLevel = mod.StageInstancePrivacyLevel;
+export const StickerFormatType = mod.StickerFormatType;
+export const StickerType = mod.StickerType;
+export const TeamMemberMembershipState = mod.TeamMemberMembershipState;
+export const TextInputStyle = mod.TextInputStyle;
+export const UserFlags = mod.UserFlags;
+export const UserPremiumType = mod.UserPremiumType;
+export const Utils = mod.Utils;
+export const VideoQualityMode = mod.VideoQualityMode;
+export const WebhookType = mod.WebhookType;
diff --git a/node_modules/discord-api-types/v9.d.ts b/node_modules/discord-api-types/v9.d.ts
new file mode 100644
index 0000000..d5c7de5
--- /dev/null
+++ b/node_modules/discord-api-types/v9.d.ts
@@ -0,0 +1,7 @@
+export * from './gateway/v9';
+export * from './globals';
+export * from './payloads/v9/index';
+export * from './rest/v9/index';
+export * from './rpc/v9';
+export * as Utils from './utils/v9';
+//# sourceMappingURL=v9.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/v9.d.ts.map b/node_modules/discord-api-types/v9.d.ts.map
new file mode 100644
index 0000000..7a02084
--- /dev/null
+++ b/node_modules/discord-api-types/v9.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"v9.d.ts","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/v9.js b/node_modules/discord-api-types/v9.js
new file mode 100644
index 0000000..1708b60
--- /dev/null
+++ b/node_modules/discord-api-types/v9.js
@@ -0,0 +1,24 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Utils = void 0;
+__exportStar(require("./gateway/v9"), exports);
+__exportStar(require("./globals"), exports);
+__exportStar(require("./payloads/v9/index"), exports);
+__exportStar(require("./rest/v9/index"), exports);
+__exportStar(require("./rpc/v9"), exports);
+exports.Utils = require("./utils/v9");
+//# sourceMappingURL=v9.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/v9.js.map b/node_modules/discord-api-types/v9.js.map
new file mode 100644
index 0000000..fd4d9d4
--- /dev/null
+++ b/node_modules/discord-api-types/v9.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"v9.js","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,4CAA0B;AAC1B,sDAAoC;AACpC,kDAAgC;AAChC,2CAAyB;AACzB,sCAAoC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/v9.mjs b/node_modules/discord-api-types/v9.mjs
new file mode 100644
index 0000000..c55126e
--- /dev/null
+++ b/node_modules/discord-api-types/v9.mjs
@@ -0,0 +1,87 @@
+import mod from "./v9.js";
+
+export default mod;
+export const APIApplicationCommandPermissionsConstant = mod.APIApplicationCommandPermissionsConstant;
+export const APIVersion = mod.APIVersion;
+export const ActivityFlags = mod.ActivityFlags;
+export const ActivityPlatform = mod.ActivityPlatform;
+export const ActivityType = mod.ActivityType;
+export const AllowedMentionsTypes = mod.AllowedMentionsTypes;
+export const ApplicationCommandOptionType = mod.ApplicationCommandOptionType;
+export const ApplicationCommandPermissionType = mod.ApplicationCommandPermissionType;
+export const ApplicationCommandType = mod.ApplicationCommandType;
+export const ApplicationFlags = mod.ApplicationFlags;
+export const ApplicationRoleConnectionMetadataType = mod.ApplicationRoleConnectionMetadataType;
+export const AttachmentFlags = mod.AttachmentFlags;
+export const AuditLogEvent = mod.AuditLogEvent;
+export const AuditLogOptionsType = mod.AuditLogOptionsType;
+export const AutoModerationActionType = mod.AutoModerationActionType;
+export const AutoModerationRuleEventType = mod.AutoModerationRuleEventType;
+export const AutoModerationRuleKeywordPresetType = mod.AutoModerationRuleKeywordPresetType;
+export const AutoModerationRuleTriggerType = mod.AutoModerationRuleTriggerType;
+export const ButtonStyle = mod.ButtonStyle;
+export const CDNRoutes = mod.CDNRoutes;
+export const ChannelFlags = mod.ChannelFlags;
+export const ChannelType = mod.ChannelType;
+export const ComponentType = mod.ComponentType;
+export const ConnectionService = mod.ConnectionService;
+export const ConnectionVisibility = mod.ConnectionVisibility;
+export const EmbedType = mod.EmbedType;
+export const FormattingPatterns = mod.FormattingPatterns;
+export const ForumLayoutType = mod.ForumLayoutType;
+export const GatewayCloseCodes = mod.GatewayCloseCodes;
+export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
+export const GatewayIntentBits = mod.GatewayIntentBits;
+export const GatewayOpcodes = mod.GatewayOpcodes;
+export const GatewayVersion = mod.GatewayVersion;
+export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications;
+export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter;
+export const GuildFeature = mod.GuildFeature;
+export const GuildHubType = mod.GuildHubType;
+export const GuildMFALevel = mod.GuildMFALevel;
+export const GuildMemberFlags = mod.GuildMemberFlags;
+export const GuildNSFWLevel = mod.GuildNSFWLevel;
+export const GuildOnboardingMode = mod.GuildOnboardingMode;
+export const GuildOnboardingPromptType = mod.GuildOnboardingPromptType;
+export const GuildPremiumTier = mod.GuildPremiumTier;
+export const GuildScheduledEventEntityType = mod.GuildScheduledEventEntityType;
+export const GuildScheduledEventPrivacyLevel = mod.GuildScheduledEventPrivacyLevel;
+export const GuildScheduledEventStatus = mod.GuildScheduledEventStatus;
+export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags;
+export const GuildVerificationLevel = mod.GuildVerificationLevel;
+export const GuildWidgetStyle = mod.GuildWidgetStyle;
+export const ImageFormat = mod.ImageFormat;
+export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior;
+export const InteractionResponseType = mod.InteractionResponseType;
+export const InteractionType = mod.InteractionType;
+export const InviteTargetType = mod.InviteTargetType;
+export const Locale = mod.Locale;
+export const MembershipScreeningFieldType = mod.MembershipScreeningFieldType;
+export const MessageActivityType = mod.MessageActivityType;
+export const MessageFlags = mod.MessageFlags;
+export const MessageType = mod.MessageType;
+export const OAuth2Routes = mod.OAuth2Routes;
+export const OAuth2Scopes = mod.OAuth2Scopes;
+export const OverwriteType = mod.OverwriteType;
+export const PermissionFlagsBits = mod.PermissionFlagsBits;
+export const PresenceUpdateStatus = mod.PresenceUpdateStatus;
+export const RESTJSONErrorCodes = mod.RESTJSONErrorCodes;
+export const RPCCloseEventCodes = mod.RPCCloseEventCodes;
+export const RPCErrorCodes = mod.RPCErrorCodes;
+export const RoleFlags = mod.RoleFlags;
+export const RouteBases = mod.RouteBases;
+export const Routes = mod.Routes;
+export const SortOrderType = mod.SortOrderType;
+export const StageInstancePrivacyLevel = mod.StageInstancePrivacyLevel;
+export const StickerFormatType = mod.StickerFormatType;
+export const StickerPackApplicationId = mod.StickerPackApplicationId;
+export const StickerType = mod.StickerType;
+export const TeamMemberMembershipState = mod.TeamMemberMembershipState;
+export const TextInputStyle = mod.TextInputStyle;
+export const ThreadAutoArchiveDuration = mod.ThreadAutoArchiveDuration;
+export const ThreadMemberFlags = mod.ThreadMemberFlags;
+export const UserFlags = mod.UserFlags;
+export const UserPremiumType = mod.UserPremiumType;
+export const Utils = mod.Utils;
+export const VideoQualityMode = mod.VideoQualityMode;
+export const WebhookType = mod.WebhookType;
diff --git a/node_modules/discord-api-types/voice/index.d.ts b/node_modules/discord-api-types/voice/index.d.ts
new file mode 100644
index 0000000..64a7e0a
--- /dev/null
+++ b/node_modules/discord-api-types/voice/index.d.ts
@@ -0,0 +1,2 @@
+export * from './v4';
+//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/voice/index.d.ts.map b/node_modules/discord-api-types/voice/index.d.ts.map
new file mode 100644
index 0000000..c1a119e
--- /dev/null
+++ b/node_modules/discord-api-types/voice/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,cAAc,MAAM,CAAC"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/voice/index.js b/node_modules/discord-api-types/voice/index.js
new file mode 100644
index 0000000..74e30b1
--- /dev/null
+++ b/node_modules/discord-api-types/voice/index.js
@@ -0,0 +1,20 @@
+"use strict";
+// This file exports all the types available in the recommended voice gateway version
+// Thereby, things MAY break in the future. Try sticking to imports from a specific version
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("./v4"), exports);
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/voice/index.js.map b/node_modules/discord-api-types/voice/index.js.map
new file mode 100644
index 0000000..50bd3fd
--- /dev/null
+++ b/node_modules/discord-api-types/voice/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,qFAAqF;AACrF,2FAA2F;;;;;;;;;;;;;;;;AAE3F,uCAAqB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/voice/index.mjs b/node_modules/discord-api-types/voice/index.mjs
new file mode 100644
index 0000000..213aadd
--- /dev/null
+++ b/node_modules/discord-api-types/voice/index.mjs
@@ -0,0 +1,6 @@
+import mod from "./index.js";
+
+export default mod;
+export const VoiceCloseCodes = mod.VoiceCloseCodes;
+export const VoiceGatewayVersion = mod.VoiceGatewayVersion;
+export const VoiceOpcodes = mod.VoiceOpcodes;
diff --git a/node_modules/discord-api-types/voice/v4.d.ts b/node_modules/discord-api-types/voice/v4.d.ts
new file mode 100644
index 0000000..6fc80df
--- /dev/null
+++ b/node_modules/discord-api-types/voice/v4.d.ts
@@ -0,0 +1,108 @@
+export declare const VoiceGatewayVersion = "4";
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes
+ */
+export declare enum VoiceOpcodes {
+ /**
+ * Begin a voice websocket connection
+ */
+ Identify = 0,
+ /**
+ * Select the voice protocol
+ */
+ SelectProtocol = 1,
+ /**
+ * Complete the websocket handshake
+ */
+ Ready = 2,
+ /**
+ * Keep the websocket connection alive
+ */
+ Heartbeat = 3,
+ /**
+ * Describe the session
+ */
+ SessionDescription = 4,
+ /**
+ * Indicate which users are speaking
+ */
+ Speaking = 5,
+ /**
+ * Sent to acknowledge a received client heartbeat
+ */
+ HeartbeatAck = 6,
+ /**
+ * Resume a connection
+ */
+ Resume = 7,
+ /**
+ * Time to wait between sending heartbeats in milliseconds
+ */
+ Hello = 8,
+ /**
+ * Acknowledge a successful session resume
+ */
+ Resumed = 9,
+ /**
+ * A client has connected to the voice channel
+ */
+ ClientConnect = 12,
+ /**
+ * A client has disconnected from the voice channel
+ */
+ ClientDisconnect = 13
+}
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes
+ */
+export declare enum VoiceCloseCodes {
+ /**
+ * You sent an invalid opcode
+ */
+ UnknownOpcode = 4001,
+ /**
+ * You sent a invalid payload in your identifying to the Gateway
+ */
+ FailedToDecode = 4002,
+ /**
+ * You sent a payload before identifying with the Gateway
+ */
+ NotAuthenticated = 4003,
+ /**
+ * The token you sent in your identify payload is incorrect
+ */
+ AuthenticationFailed = 4004,
+ /**
+ * You sent more than one identify payload. Stahp
+ */
+ AlreadyAuthenticated = 4005,
+ /**
+ * Your session is no longer valid
+ */
+ SessionNoLongerValid = 4006,
+ /**
+ * Your session has timed out
+ */
+ SessionTimeout = 4009,
+ /**
+ * We can't find the server you're trying to connect to
+ */
+ ServerNotFound = 4011,
+ /**
+ * We didn't recognize the protocol you sent
+ */
+ UnknownProtocol = 4012,
+ /**
+ * Either the channel was deleted, you were kicked, or the main gateway session was dropped. Should not reconnect
+ */
+ Disconnected = 4014,
+ /**
+ * The server crashed. Our bad! Try resuming
+ */
+ VoiceServerCrashed = 4015,
+ /**
+ * We didn't recognize your encryption
+ */
+ UnknownEncryptionMode = 4016
+}
+//# sourceMappingURL=v4.d.ts.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/voice/v4.d.ts.map b/node_modules/discord-api-types/voice/v4.d.ts.map
new file mode 100644
index 0000000..9311019
--- /dev/null
+++ b/node_modules/discord-api-types/voice/v4.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"v4.d.ts","sourceRoot":"","sources":["v4.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC;;GAEG;AACH,oBAAY,YAAY;IACvB;;OAEG;IACH,QAAQ,IAAA;IACR;;OAEG;IACH,cAAc,IAAA;IACd;;OAEG;IACH,KAAK,IAAA;IACL;;OAEG;IACH,SAAS,IAAA;IACT;;OAEG;IACH,kBAAkB,IAAA;IAClB;;OAEG;IACH,QAAQ,IAAA;IACR;;OAEG;IACH,YAAY,IAAA;IACZ;;OAEG;IACH,MAAM,IAAA;IACN;;OAEG;IACH,KAAK,IAAA;IACL;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,aAAa,KAAK;IAClB;;OAEG;IACH,gBAAgB,KAAA;CAChB;AAED;;GAEG;AACH,oBAAY,eAAe;IAC1B;;OAEG;IACH,aAAa,OAAQ;IACrB;;OAEG;IACH,cAAc,OAAA;IACd;;OAEG;IACH,gBAAgB,OAAA;IAChB;;OAEG;IACH,oBAAoB,OAAA;IACpB;;OAEG;IACH,oBAAoB,OAAA;IACpB;;OAEG;IACH,oBAAoB,OAAA;IACpB;;OAEG;IACH,cAAc,OAAQ;IACtB;;OAEG;IACH,cAAc,OAAQ;IACtB;;OAEG;IACH,eAAe,OAAA;IACf;;OAEG;IACH,YAAY,OAAQ;IACpB;;OAEG;IACH,kBAAkB,OAAA;IAClB;;OAEG;IACH,qBAAqB,OAAA;CACrB"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/voice/v4.js b/node_modules/discord-api-types/voice/v4.js
new file mode 100644
index 0000000..9b7c117
--- /dev/null
+++ b/node_modules/discord-api-types/voice/v4.js
@@ -0,0 +1,113 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.VoiceCloseCodes = exports.VoiceOpcodes = exports.VoiceGatewayVersion = void 0;
+exports.VoiceGatewayVersion = '4';
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes
+ */
+var VoiceOpcodes;
+(function (VoiceOpcodes) {
+ /**
+ * Begin a voice websocket connection
+ */
+ VoiceOpcodes[VoiceOpcodes["Identify"] = 0] = "Identify";
+ /**
+ * Select the voice protocol
+ */
+ VoiceOpcodes[VoiceOpcodes["SelectProtocol"] = 1] = "SelectProtocol";
+ /**
+ * Complete the websocket handshake
+ */
+ VoiceOpcodes[VoiceOpcodes["Ready"] = 2] = "Ready";
+ /**
+ * Keep the websocket connection alive
+ */
+ VoiceOpcodes[VoiceOpcodes["Heartbeat"] = 3] = "Heartbeat";
+ /**
+ * Describe the session
+ */
+ VoiceOpcodes[VoiceOpcodes["SessionDescription"] = 4] = "SessionDescription";
+ /**
+ * Indicate which users are speaking
+ */
+ VoiceOpcodes[VoiceOpcodes["Speaking"] = 5] = "Speaking";
+ /**
+ * Sent to acknowledge a received client heartbeat
+ */
+ VoiceOpcodes[VoiceOpcodes["HeartbeatAck"] = 6] = "HeartbeatAck";
+ /**
+ * Resume a connection
+ */
+ VoiceOpcodes[VoiceOpcodes["Resume"] = 7] = "Resume";
+ /**
+ * Time to wait between sending heartbeats in milliseconds
+ */
+ VoiceOpcodes[VoiceOpcodes["Hello"] = 8] = "Hello";
+ /**
+ * Acknowledge a successful session resume
+ */
+ VoiceOpcodes[VoiceOpcodes["Resumed"] = 9] = "Resumed";
+ /**
+ * A client has connected to the voice channel
+ */
+ VoiceOpcodes[VoiceOpcodes["ClientConnect"] = 12] = "ClientConnect";
+ /**
+ * A client has disconnected from the voice channel
+ */
+ VoiceOpcodes[VoiceOpcodes["ClientDisconnect"] = 13] = "ClientDisconnect";
+})(VoiceOpcodes = exports.VoiceOpcodes || (exports.VoiceOpcodes = {}));
+/**
+ * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes
+ */
+var VoiceCloseCodes;
+(function (VoiceCloseCodes) {
+ /**
+ * You sent an invalid opcode
+ */
+ VoiceCloseCodes[VoiceCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode";
+ /**
+ * You sent a invalid payload in your identifying to the Gateway
+ */
+ VoiceCloseCodes[VoiceCloseCodes["FailedToDecode"] = 4002] = "FailedToDecode";
+ /**
+ * You sent a payload before identifying with the Gateway
+ */
+ VoiceCloseCodes[VoiceCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
+ /**
+ * The token you sent in your identify payload is incorrect
+ */
+ VoiceCloseCodes[VoiceCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed";
+ /**
+ * You sent more than one identify payload. Stahp
+ */
+ VoiceCloseCodes[VoiceCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated";
+ /**
+ * Your session is no longer valid
+ */
+ VoiceCloseCodes[VoiceCloseCodes["SessionNoLongerValid"] = 4006] = "SessionNoLongerValid";
+ /**
+ * Your session has timed out
+ */
+ VoiceCloseCodes[VoiceCloseCodes["SessionTimeout"] = 4009] = "SessionTimeout";
+ /**
+ * We can't find the server you're trying to connect to
+ */
+ VoiceCloseCodes[VoiceCloseCodes["ServerNotFound"] = 4011] = "ServerNotFound";
+ /**
+ * We didn't recognize the protocol you sent
+ */
+ VoiceCloseCodes[VoiceCloseCodes["UnknownProtocol"] = 4012] = "UnknownProtocol";
+ /**
+ * Either the channel was deleted, you were kicked, or the main gateway session was dropped. Should not reconnect
+ */
+ VoiceCloseCodes[VoiceCloseCodes["Disconnected"] = 4014] = "Disconnected";
+ /**
+ * The server crashed. Our bad! Try resuming
+ */
+ VoiceCloseCodes[VoiceCloseCodes["VoiceServerCrashed"] = 4015] = "VoiceServerCrashed";
+ /**
+ * We didn't recognize your encryption
+ */
+ VoiceCloseCodes[VoiceCloseCodes["UnknownEncryptionMode"] = 4016] = "UnknownEncryptionMode";
+})(VoiceCloseCodes = exports.VoiceCloseCodes || (exports.VoiceCloseCodes = {}));
+//# sourceMappingURL=v4.js.map \ No newline at end of file
diff --git a/node_modules/discord-api-types/voice/v4.js.map b/node_modules/discord-api-types/voice/v4.js.map
new file mode 100644
index 0000000..3a5ba0e
--- /dev/null
+++ b/node_modules/discord-api-types/voice/v4.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"v4.js","sourceRoot":"","sources":["v4.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG,GAAG,CAAC;AAEvC;;GAEG;AACH,IAAY,YAiDX;AAjDD,WAAY,YAAY;IACvB;;OAEG;IACH,uDAAQ,CAAA;IACR;;OAEG;IACH,mEAAc,CAAA;IACd;;OAEG;IACH,iDAAK,CAAA;IACL;;OAEG;IACH,yDAAS,CAAA;IACT;;OAEG;IACH,2EAAkB,CAAA;IAClB;;OAEG;IACH,uDAAQ,CAAA;IACR;;OAEG;IACH,+DAAY,CAAA;IACZ;;OAEG;IACH,mDAAM,CAAA;IACN;;OAEG;IACH,iDAAK,CAAA;IACL;;OAEG;IACH,qDAAO,CAAA;IACP;;OAEG;IACH,kEAAkB,CAAA;IAClB;;OAEG;IACH,wEAAgB,CAAA;AACjB,CAAC,EAjDW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAiDvB;AAED;;GAEG;AACH,IAAY,eAiDX;AAjDD,WAAY,eAAe;IAC1B;;OAEG;IACH,0EAAqB,CAAA;IACrB;;OAEG;IACH,4EAAc,CAAA;IACd;;OAEG;IACH,gFAAgB,CAAA;IAChB;;OAEG;IACH,wFAAoB,CAAA;IACpB;;OAEG;IACH,wFAAoB,CAAA;IACpB;;OAEG;IACH,wFAAoB,CAAA;IACpB;;OAEG;IACH,4EAAsB,CAAA;IACtB;;OAEG;IACH,4EAAsB,CAAA;IACtB;;OAEG;IACH,8EAAe,CAAA;IACf;;OAEG;IACH,wEAAoB,CAAA;IACpB;;OAEG;IACH,oFAAkB,CAAA;IAClB;;OAEG;IACH,0FAAqB,CAAA;AACtB,CAAC,EAjDW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAiD1B"} \ No newline at end of file
diff --git a/node_modules/discord-api-types/voice/v4.mjs b/node_modules/discord-api-types/voice/v4.mjs
new file mode 100644
index 0000000..b6f15e2
--- /dev/null
+++ b/node_modules/discord-api-types/voice/v4.mjs
@@ -0,0 +1,6 @@
+import mod from "./v4.js";
+
+export default mod;
+export const VoiceCloseCodes = mod.VoiceCloseCodes;
+export const VoiceGatewayVersion = mod.VoiceGatewayVersion;
+export const VoiceOpcodes = mod.VoiceOpcodes;
diff --git a/node_modules/discord.js/CHANGELOG.md b/node_modules/discord.js/CHANGELOG.md
new file mode 100644
index 0000000..3ab0dfe
--- /dev/null
+++ b/node_modules/discord.js/CHANGELOG.md
@@ -0,0 +1,4899 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+# [14.13.0](https://github.com/discordjs/discord.js/compare/14.12.1...14.13.0) - (2023-08-17)
+
+## Bug Fixes
+
+- **Action:** Do not add the client user as a recipient (#9774) ([24fbb11](https://github.com/discordjs/discord.js/commit/24fbb11ba2f7e8f8f604752159d2053f2cee16ec))
+- **DMChannel:** Correct partial typo (#9773) ([c1ff545](https://github.com/discordjs/discord.js/commit/c1ff545bf1c018875f5a9ceb828c9f84ed391920))
+- **CachedManager:** Allow overriding constructor for makeCache (#9763) ([346fa57](https://github.com/discordjs/discord.js/commit/346fa57f95a99d5b4e1169bb85706c4c25bf71d0))
+- **types:** Fixed CachedManager constructor arguments in type (#9761) ([b3c85d3](https://github.com/discordjs/discord.js/commit/b3c85d34a6ced8a8e2cd15a6e3879fb2dd5121d0))
+- **Action:** Do not set `undefined` values (#9755) ([d8e3755](https://github.com/discordjs/discord.js/commit/d8e37551ceefe9f82566e3f45edc69bb7f9d1463))
+
+## Documentation
+
+- **EmbedBuilder:** `@readonly` length (#9778) ([8f572a6](https://github.com/discordjs/discord.js/commit/8f572a6badd45b916d3a46dd489653d2d6efb2a8))
+- **WebhookEditOptions:** Add all of the types (#9776) ([d5be424](https://github.com/discordjs/discord.js/commit/d5be4242c6a6f90b90af54e27071ecc0f5422944))
+- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6))
+
+## Features
+
+- **Client:** Add deleteWebhook method (#9777) ([d90ba8d](https://github.com/discordjs/discord.js/commit/d90ba8dce8de630db14b77764ec35201998c7ce7))
+- **ClientPresence:** Allow setting activity state (#9743) ([9ed1b59](https://github.com/discordjs/discord.js/commit/9ed1b59df6acb6356d5950b43d04885d5e692887))
+- **ClientApplication:** Approximate guild count and new `GET` route (#9713) ([632a9b4](https://github.com/discordjs/discord.js/commit/632a9b4965cd24ffffdf0f88f1a9eedeb6b284f7))
+- **Role:** Add `flags` (#9694) ([3b18e5b](https://github.com/discordjs/discord.js/commit/3b18e5b08dc3ec2aba37d3e6a55e42ce8af7dbab))
+- **Attachment:** Add `flags` (#9686) ([692f0fc](https://github.com/discordjs/discord.js/commit/692f0fc96d9f92161b64fb83f02b71d43d2d7c9c))
+- Add `Client#webhooksUpdate` (#9732) ([0de071d](https://github.com/discordjs/discord.js/commit/0de071d0a5524ba1fbb8cab5d7e74567103f7129))
+
+## Typings
+
+- **GuildInvitableChannelResolvable:** Allow forum channels (#9775) ([727dc09](https://github.com/discordjs/discord.js/commit/727dc094d52a5b169e46917b64308ab87a7144b1))
+- Make activity name required (#9765) ([0a9a3ed](https://github.com/discordjs/discord.js/commit/0a9a3ede292b92235a103b6776477a707da4d84b))
+- **BaseButtonComponentData:** Narrow component type (#9735) ([a30d46c](https://github.com/discordjs/discord.js/commit/a30d46c5f5909eee86704bbb9e34fb7bb09b2c27))
+
+# [14.12.1](https://github.com/discordjs/discord.js/compare/14.12.0...14.12.1) - (2023-08-01)
+
+## Bug Fixes
+
+- **BaseClient:** Fix destroy method (#9742) ([1af7e5a](https://github.com/discordjs/discord.js/commit/1af7e5a0bb4eca35221cb342c1c53dc18263c789))
+
+# [14.12.0](https://github.com/discordjs/discord.js/compare/14.11.0...14.12.0) - (2023-07-31)
+
+## Bug Fixes
+
+- **ChannelUpdate:** Check against unknown channels (#9697) ([7fb91c5](https://github.com/discordjs/discord.js/commit/7fb91c57f72b74395d67f2207246033c703f1f19))
+- **Action:** Use existing recipients if available (#9653) ([719e54a](https://github.com/discordjs/discord.js/commit/719e54a921f74890519f066a9f56e52fdcfacf07))
+- Everyone role members (#9685) ([0803eb5](https://github.com/discordjs/discord.js/commit/0803eb562bdc7644fa611a0a87dea3e8b0d4c7af))
+- `awaitMessageComponent` with `MessageComponentInteraction`s (#8598) ([b61e4fb](https://github.com/discordjs/discord.js/commit/b61e4fb0dcb9e5d43a7626c5a4760f5801e06fae))
+- **ThreadManager:** Fix internal crash upon conditionally resolving thread members (#9648) ([a6dbe16](https://github.com/discordjs/discord.js/commit/a6dbe163dd3df12ad98465b1dfc040b8eff8805e))
+- **User:** Check global name in equals (#9631) ([8f3bd38](https://github.com/discordjs/discord.js/commit/8f3bd3807233fca2a057948406bdc8aef008b6cb))
+- **WebSocketManager:** Await WebSocket destroy (#9519) ([75308f2](https://github.com/discordjs/discord.js/commit/75308f266933454301b10ee8e1d940d782fdb637))
+- **Client:** Safe call for possibly null WebSocket (#9600) ([24a6149](https://github.com/discordjs/discord.js/commit/24a61495b9bf07887dd535a05ffbec2895faa888))
+- **ThreadManager:** Ensure `fetchActive()` only returns active threads in a channel (#9568) ([53aa24d](https://github.com/discordjs/discord.js/commit/53aa24d41809382c1af57bd1871107c8359e4a15))
+- **LimitedCollection:** Allow items to be stored if keepOverLimit is true when maxSize is 0 (#9534) ([9345d1b](https://github.com/discordjs/discord.js/commit/9345d1b1ac4f7b1f66b919602dff995782151407))
+- **AutocompleteInteraction:** Prevent snake casing of locales (#9565) ([7196fe3](https://github.com/discordjs/discord.js/commit/7196fe36e8089dde7bcaf0db4dd09cf524125e0c))
+
+## Documentation
+
+- Change `Channel` to `BaseChannel` (#9718) ([e5effb6](https://github.com/discordjs/discord.js/commit/e5effb6f6a3e547006eb9bc054cc168844a157f2))
+- **BaseChannel:** Remove `APIChannel` (#9717) ([125405f](https://github.com/discordjs/discord.js/commit/125405f1cf11433c69ff1ae9d6b8f7e713fc37c0))
+- **BuildersSelectMenuOption:** Update link (#9690) ([ede9f4e](https://github.com/discordjs/discord.js/commit/ede9f4e5e203bcfb8820ae7ec3418482735ff9c1))
+- **ClientOptions:** Change default value of sweepers in docs (#9591) ([911e6ef](https://github.com/discordjs/discord.js/commit/911e6eff75f5d05e837d5dfaacf557d6594df16a))
+- **Client:** Correct invite gateway permission checks (#9597) ([e1b6eee](https://github.com/discordjs/discord.js/commit/e1b6eeed0e2e18f9900bc945c9f82d2d05f28a78))
+- Fix broken links to new documentation (#9563) ([d01e8aa](https://github.com/discordjs/discord.js/commit/d01e8aa8af00f5caacffe98caef3ead02e80a9bf))
+
+## Features
+
+- Add ws option support for "buildIdentifyThrottler" (#9728) ([6307f81](https://github.com/discordjs/discord.js/commit/6307f813854ed9dc76d2c4351bd69dd0490d0928))
+- **Client:** Add `guildAvailable` event (#9692) ([3c85fb2](https://github.com/discordjs/discord.js/commit/3c85fb21e62b30e75a7200b704e242c3a0adeda1))
+- User avatar decorations (#8914) ([8d97017](https://github.com/discordjs/discord.js/commit/8d9701745840e23854e8f0b057d21cb10e7d1d54))
+- Add silent option to ShardingManager (#9506) ([df40dcd](https://github.com/discordjs/discord.js/commit/df40dcdb850c398642ebc5cd6e4c48034280f464))
+- **EmbedBuilder:** Add `.length` (#8682) ([53c17e0](https://github.com/discordjs/discord.js/commit/53c17e00c0668c3d1497142dde7384c058c46c64))
+- Guild onboarding (#9120) ([dc73c93](https://github.com/discordjs/discord.js/commit/dc73c938ff9d04a0d7d57630faeb8e81ea343006))
+- Add resume event in shard (#9650) ([a73d54e](https://github.com/discordjs/discord.js/commit/a73d54e43a01719f683e8fd21714e85ffe737add))
+- **presence:** Re-introduce image resolving for other platforms (#9637) ([73c2f8a](https://github.com/discordjs/discord.js/commit/73c2f8aa17aac51b05382444148cb1f60081ee03))
+- Add message to send resume event to shard (#9626) ([a873ec1](https://github.com/discordjs/discord.js/commit/a873ec1e8511829ba95e85bbc9a4074e40c76086))
+- Support new username system (#9512) ([1ab60f9](https://github.com/discordjs/discord.js/commit/1ab60f9da4d6b7ea144fa05b97b029a4bfaeede2))
+- **GuildAuditLogsEntry#extra:** Add missing `channel` property (#9518) ([2272321](https://github.com/discordjs/discord.js/commit/227232112d1cd9f211e177996b7cdee2940f471e))
+
+## Performance
+
+- **Channel:** Linear speed position getter (#9497) ([09b0382](https://github.com/discordjs/discord.js/commit/09b0382c458ed0f3df5b8fa778c504b3e658ac49))
+- **Role:** Improve `members` getter (#9529) ([37181ab](https://github.com/discordjs/discord.js/commit/37181ab2322e48e17ff0d1040bcc510dc7c34e93))
+
+## Refactor
+
+- **User:** Remove deprecation warning from tag (#9660) ([cf8012c](https://github.com/discordjs/discord.js/commit/cf8012c20022aff184d7bce0ad436c136e428d9c))
+- **GuildMember:** Make `_roles` property non-enumerable (#9387) ([46167a7](https://github.com/discordjs/discord.js/commit/46167a79d7d0cac5599459a31c33b2bbcf6e06da))
+- **rest:** Switch api to fetch-like and provide strategies (#9416) ([cdaa0a3](https://github.com/discordjs/discord.js/commit/cdaa0a36f586459f1e5ede868c4250c7da90455c))
+ - **BREAKING CHANGE:** NodeJS v18+ is required when using node due to the use of global `fetch`
+ - **BREAKING CHANGE:** The raw method of REST now returns a web compatible `Respone` object.
+ - **BREAKING CHANGE:** The `parseResponse` utility method has been updated to operate on a web compatible `Response` object.
+ - **BREAKING CHANGE:** Many underlying internals have changed, some of which were exported.
+ - **BREAKING CHANGE:** `DefaultRestOptions` used to contain a default `agent`, which is now set to `null` instead.
+
+## Typings
+
+- **MessageManager:** Allow comparison of messages again (#9612) ([a48d0ef](https://github.com/discordjs/discord.js/commit/a48d0efb09613eac6bf3c1bd996f58f5fff7667c))
+- **AutoModerationActionExecution:** Add forum channels as a possible type in `channel()` (#9623) ([d64330a](https://github.com/discordjs/discord.js/commit/d64330a1570b3a2047ef959a6bce268372c70e99))
+- **ModalSubmitFields:** Components is an array (#9406) ([1cab79f](https://github.com/discordjs/discord.js/commit/1cab79f6fde6f367141c9f7ed91bcb70ed2e5c17))
+- Use `readonly` arrays and `const` type parameters in places (#9641) ([cd69868](https://github.com/discordjs/discord.js/commit/cd6986854f4c2d143d2cd9b81d096738480dfa63))
+- **BaseInteraction:** `appPermissions` not `null` in guilds (#9601) ([6c2242f](https://github.com/discordjs/discord.js/commit/6c2242f4f970b1c75c243f74ae64f30ecbf8ba0d))
+
+# [14.11.0](https://github.com/discordjs/discord.js/compare/14.10.2...14.11.0) - (2023-05-06)
+
+## Bug Fixes
+
+- **WebSocketManager:** Properly emit shard error events (#9521) ([e627468](https://github.com/discordjs/discord.js/commit/e6274681fd10b0d75e1d3b448c94b50ec6810367))
+- **WebSocketManager:** Emit raw ws events again (#9502) ([c429763](https://github.com/discordjs/discord.js/commit/c429763be8e94f0f0cbc630e8bb1d415d46f1465))
+
+## Documentation
+
+- **Client:** Update Sapphire's snowflake utility links (#9501) ([1b7981e](https://github.com/discordjs/discord.js/commit/1b7981e4696b8ae74ceffa876fc0a9be7d0b9f93))
+
+## Features
+
+- **Guild:** Safety alerts channel and mention raid protection (#8959) ([6b2c3fb](https://github.com/discordjs/discord.js/commit/6b2c3fb9d0571de808e990cf064f73240ab93451))
+
+## Performance
+
+- **Role:** Linear speed position getter (#9493) ([8e9a2b4](https://github.com/discordjs/discord.js/commit/8e9a2b4630f78bb9e45345ec2a16812bfac70a20))
+
+## Refactor
+
+- **GuildChannel:** Simplify constructor (#9499) ([f2ad076](https://github.com/discordjs/discord.js/commit/f2ad0762c521422ab64e5b10344a6fd67961031b))
+
+## Typings
+
+- **StringSelectMenuComponentData:** `options` is required (#9515) ([d7b18f0](https://github.com/discordjs/discord.js/commit/d7b18f0681d4147ff192c98108c035d6d0f96cce))
+
+# [14.10.2](https://github.com/discordjs/discord.js/compare/14.10.1...14.10.2) - (2023-05-01)
+
+## Bug Fixes
+
+- Correct `isJSONEncodable()` import (#9495) ([201b002](https://github.com/discordjs/discord.js/commit/201b002ad405b845ace5f708077c1f157bb4126d))
+- **Client:** `generateInvite()` scope validation (#9492) ([b327f49](https://github.com/discordjs/discord.js/commit/b327f4925ff557e0aa8273d7f017aa616226ca06))
+
+# [14.10.1](https://github.com/discordjs/discord.js/compare/14.10.0...14.10.1) - (2023-05-01)
+
+## Bug Fixes
+
+- **Client:** Spelling of InvalidScopesWithPermissions ([ac9bf3a](https://github.com/discordjs/discord.js/commit/ac9bf3ac06ec78dbaca2ce4a82cceb0d82484211))
+
+## Refactor
+
+- **ShardClientUtil:** Logic de-duplication (#9491) ([a9f2bff](https://github.com/discordjs/discord.js/commit/a9f2bff82a18c6a3afdee99e5830e1d7b4da65dc))
+
+# [14.10.0](https://github.com/discordjs/discord.js/compare/14.9.0...14.10.0) - (2023-05-01)
+
+## Bug Fixes
+
+- **ShardClientUtil:** Fix client event names (#9474) ([ad217cc](https://github.com/discordjs/discord.js/commit/ad217cc7604dda6a33df73db82799fd5bb4e85a9))
+- **BaseClient:** Prevent user agent mutation (#9425) ([217e5d8](https://github.com/discordjs/discord.js/commit/217e5d81005a2506c96335f7fb96fa21d7dbb04c))
+- **BitField:** Use only enum names in iterating (#9357) ([40d07fb](https://github.com/discordjs/discord.js/commit/40d07fbbbd51d62793d9ea541f41f157b5dad224))
+- Use new permission name (#9274) ([d2d27ce](https://github.com/discordjs/discord.js/commit/d2d27ce7346bc37b34938c84bd3b106a4fa51f53))
+- **Message#editable:** Fix permissions check in locked threads (#9319) ([d4c1fec](https://github.com/discordjs/discord.js/commit/d4c1fecbe264bc52a70aaf0ec303d35e2f15bbcd))
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Documentation
+
+- **AutoModerationRule:** Update docs (#9464) ([1b15d31](https://github.com/discordjs/discord.js/commit/1b15d31b5ae1b1739716fab00b18083c1d7d389a))
+- **APITypes:** Document role & user select menu components (#9435) ([c6ca5a8](https://github.com/discordjs/discord.js/commit/c6ca5a83e7b72613f95c2145606a1330f64ae894))
+- **BaseMessageOptions:** Fix embeds and components (#9437) ([5c52bb9](https://github.com/discordjs/discord.js/commit/5c52bb95906250518a8813820d543f43dd7abdf9))
+- **InteractionResponses:** ShowModal docs change (#9434) ([7d34100](https://github.com/discordjs/discord.js/commit/7d341000d44b762a2fe0434a6b518f7d63539d34))
+- Use ESM code in examples (#9427) ([ce287f2](https://github.com/discordjs/discord.js/commit/ce287f21d1540da7f17cac8a57dc33a67f391ef3))
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+- **Options:** Fix links and invalid syntax (#9322) ([86e5f5a](https://github.com/discordjs/discord.js/commit/86e5f5a119c6d2588b988a33236d358ded357847))
+- Cleanup MessageCreateOptions and MessageReplyOptions (#9283) ([300059c](https://github.com/discordjs/discord.js/commit/300059cb266e6cca42c30ee7f997c48ab2cc565e))
+- **Events:** Document auto moderation events (#9342) ([79bcdfa](https://github.com/discordjs/discord.js/commit/79bcdfa767e7e842164e1174b6f4834ed731d329))
+- Add `SnowflakeUtil` (#9371) ([8ffcf77](https://github.com/discordjs/discord.js/commit/8ffcf77840b62590fcb4731380d28b22d0b98741))
+- Use stable tag (#9343) ([c0f2dd7](https://github.com/discordjs/discord.js/commit/c0f2dd713151a29c98e1eebad66721a208be1fc0))
+- Remove `JSONEncondable` (#9344) ([b2eec5f](https://github.com/discordjs/discord.js/commit/b2eec5f9fcf37ebb3b7f87a67a6ee3160c182183))
+
+## Features
+
+- **Attachment:** Voice messages (#9392) ([3e01f91](https://github.com/discordjs/discord.js/commit/3e01f91bbba2cbacacc6c921ed664752f679960b))
+- **BaseInteraction:** Support new channel payload (#9337) ([29389e3](https://github.com/discordjs/discord.js/commit/29389e39f479b832e54c7cb3ddd363aebe99674f))
+- **RoleTagData:** Add guildConnections (#9366) ([2dddbe1](https://github.com/discordjs/discord.js/commit/2dddbe1f321f2e2722dba4a28f7d18384cf50353))
+
+## Performance
+
+- **RoleManager:** Dont call Role#position getter twice per role (#9352) ([bfee6c8](https://github.com/discordjs/discord.js/commit/bfee6c8d889502ea39ad919dd9b1e6253a2af571))
+
+## Refactor
+
+- **WebSocketManager:** Use /ws package internally (#9099) ([a9e0de4](https://github.com/discordjs/discord.js/commit/a9e0de4288ea39a6a089b8379dcd44ac0053dac7))
+- Remove `fromInteraction` in internal channel creation (#9335) ([794abe8](https://github.com/discordjs/discord.js/commit/794abe8450bae000cd0544922cdf53e7b3e4c59c))
+
+## Typings
+
+- **AutoModerationActionMetadataOptions:** Make channel property optional (#9460) ([d26df5f](https://github.com/discordjs/discord.js/commit/d26df5fabaf227fb9d10ba5cc1ab326de55aadbc))
+- **CategoryChannel:** Ensure `parent` and `parentId` are `null` (#9327) ([8218ffc](https://github.com/discordjs/discord.js/commit/8218ffc78d23234b32c05a97fde2f4bea64d7aa6))
+- **GuildTextBasedChannel:** Remove unnecessary exclusion of forum channels (#9326) ([7ff3d52](https://github.com/discordjs/discord.js/commit/7ff3d528d942a0daa990194915ff8328dec99149))
+
+# [14.9.0](https://github.com/discordjs/discord.js/compare/14.8.0...14.9.0) - (2023-04-01)
+
+## Bug Fixes
+
+- Add support for new guild feature `GUILD_WEB_PAGE_VANITY_URL` (#9219) ([de1aac6](https://github.com/discordjs/discord.js/commit/de1aac674acb3830124646fcd52cdd98cdb71ba5))
+- Resolving string bitfield (#9262) ([7987565](https://github.com/discordjs/discord.js/commit/79875658cf4a8daa25210c2c620c73a710ca22de))
+- **AutocompleteInteraction:** Send `name_localizations` correctly (#9238) ([1864d37](https://github.com/discordjs/discord.js/commit/1864d37d36e53d127e74b6969a5f542193bfc3c7))
+- Keep symbols in actions manager (#9293) ([984bd55](https://github.com/discordjs/discord.js/commit/984bd55b437507e7ebfdf09ac944c8eba0340d27))
+- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b))
+- **ClientUser:** No mutation on edit (#9259) ([abd6ae9](https://github.com/discordjs/discord.js/commit/abd6ae9fc8ea03722e8b36e29c3fdc1c2cfc93e8))
+- **Message#editable:** Update editable check in threads locked (#9216) ([22e880a](https://github.com/discordjs/discord.js/commit/22e880aaa0d8c644fc8d16a524d17f4f53a056f6))
+- **ThreadManager:** Add `members` and conditionally include `hasMore` (#9164) ([e9a8eb3](https://github.com/discordjs/discord.js/commit/e9a8eb323f3a554dc8f9dab361cd1bac7b88e1cc))
+- **ThreadManager:** Respect `cache` and `force` in fetching (#9239) ([cc57563](https://github.com/discordjs/discord.js/commit/cc57563e73d78a0d71d1444d1ee8215a26a81fa8))
+- **TextBasedChannelTypes:** Add `GuildStageVoice` (#9232) ([51edba7](https://github.com/discordjs/discord.js/commit/51edba78bc4d4cb44b4dd2b79e4bbc515dc46f5b))
+
+## Documentation
+
+- Describe private properties (#8879) ([2792e48](https://github.com/discordjs/discord.js/commit/2792e48119f1cf5fa7d5e6b63369457b0719d4e4))
+- Differ `User#send` (#9251) ([384b4d1](https://github.com/discordjs/discord.js/commit/384b4d10e8642f0f280ea1651f33cd378c341333))
+- Fix compare position example (#9272) ([d16114c](https://github.com/discordjs/discord.js/commit/d16114c52646ca92c53f9b44a0dd10af98dbddcd))
+- **Role:** Fix example for `comparePositionTo()` (#9270) ([bc641fa](https://github.com/discordjs/discord.js/commit/bc641fa9360b851642bc51839cef6bd5600d71f7))
+- Add more examples (#9252) ([bf507ab](https://github.com/discordjs/discord.js/commit/bf507ab2659d95e2991e83293b3834f21283ff33))
+- **FetchArchivedThreadOptions:** `before` respects `archive_timestamp`, not creation timestamp (#9240) ([178c8dc](https://github.com/discordjs/discord.js/commit/178c8dcfeea1c4a6a32835baea389f25feefbac7))
+- Update `APISelectMenuComponent` (#9235) ([56cf138](https://github.com/discordjs/discord.js/commit/56cf138e029e7884a4e7efb606055687ca67b4ac))
+
+## Features
+
+- **Guild:** Add `max_stage_video_channel_users` (#8422) ([34bc36a](https://github.com/discordjs/discord.js/commit/34bc36ac4b04ad033d0dcc3d2701fcf2e682743c))
+- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b))
+- Add GuildBasedTextChannelTypes (#9234) ([5f93dcc](https://github.com/discordjs/discord.js/commit/5f93dcce466286f0fdead8faf4131e98d1c9db55))
+
+## Refactor
+
+- Call `GuildBanManager#create()` directly (#9263) ([f340f3b](https://github.com/discordjs/discord.js/commit/f340f3b1fd719e8f7cf6fa28a41835bc16039fc7))
+- **FetchThreadsOptions:** Remove `active` (#9241) ([519e163](https://github.com/discordjs/discord.js/commit/519e163f8aa3b55420f86d2d60c2584b3a2eb327))
+
+# [14.8.0](https://github.com/discordjs/discord.js/compare/14.7.1...14.8.0) - (2023-03-12)
+
+## Bug Fixes
+
+- **snowflake:** Snowflakes length (#9144) ([955e8fe](https://github.com/discordjs/discord.js/commit/955e8fe312c42ad4937cc1994d1d81e517c413c8))
+- **Actions:** Inject built data by using a symbol (#9203) ([a63ac88](https://github.com/discordjs/discord.js/commit/a63ac88fcca5b61209892a6e560e35d58f5adc3b))
+- **Message#deletable:** Add check for deletable message types (#9168) ([e78b8ad](https://github.com/discordjs/discord.js/commit/e78b8ad3fb6692cba2c565b508254c723f185f0c))
+- **Message:** `bulkDeletable` permissions should be retrieved later for DMs (#9146) ([a9495bd](https://github.com/discordjs/discord.js/commit/a9495bd8f014c8021a214b83ffc531a2af5defef))
+- **AutoModerationActionExecution:** Transform `action` (#9111) ([9156a28](https://github.com/discordjs/discord.js/commit/9156a2889cd0946dfd0b30a5f8365abfbc377b3d))
+- **MessageReaction:** `toJSON()` infinite recursion (#9070) ([f268e1d](https://github.com/discordjs/discord.js/commit/f268e1d9798744e169ae87089ea2e1f214364d95))
+- **ThreadChannel:** Insert starter message from threads created in forum channels (#9100) ([0b76ab4](https://github.com/discordjs/discord.js/commit/0b76ab4c403dd646c71482856ab993b263b7c474))
+- **ApplicationRoleConnectionMetadata:** Export the class correctly (#9076) ([071516c](https://github.com/discordjs/discord.js/commit/071516c35239bd4e1cae572c855d86b335c8536d))
+- Don't auth for interaction `showModal()` (#9046) ([b803a9a](https://github.com/discordjs/discord.js/commit/b803a9a899aaa75a3ea2bc6623c6afb28f495e8c))
+- **WebSocketShard:** Zombie connection fix (#8989) ([876b181](https://github.com/discordjs/discord.js/commit/876b1813128ec702d3ef1e7b0074a4613e88c332))
+- Keep other properties in triggerMetadata (#8977) ([d8dd197](https://github.com/discordjs/discord.js/commit/d8dd197a936dfffc05f9e5bc3184ec9022c56b51))
+- **escapeX:** Emojis with underlines (#8945) ([07b597d](https://github.com/discordjs/discord.js/commit/07b597df16b9412c23ec2387d54564e4d1bcf7ed))
+- **WebSocketShard:** Either start close timeout or emit destroyed but never both (#8956) ([43ce2a5](https://github.com/discordjs/discord.js/commit/43ce2a572eb8977b6994680171ac0c5f9bda1703))
+- **DMChannel:** `recipientId` edge case (#8950) ([7ce9909](https://github.com/discordjs/discord.js/commit/7ce990954e2f73d7a996df0afa42ab287cb12514))
+- Return only boolean for `disabled` (#8965) ([6614603](https://github.com/discordjs/discord.js/commit/66146033268a4db1279b2eaee4bd418f326c0d4b))
+- Export missing `escapeX()` functions (#8944) ([25c27ea](https://github.com/discordjs/discord.js/commit/25c27eac1417e75c9b601b17cf177b1f47b699a9))
+- **WebSocketShard:** Only cleanup the connection if a connection still exists (#8946) ([5eab5fc](https://github.com/discordjs/discord.js/commit/5eab5fc06ca6be36ecf1557f2ad29a670d4d5ae7))
+- Add `@discordjs/formatters` to dependency list (#8939) ([18b3a19](https://github.com/discordjs/discord.js/commit/18b3a19810a6436fa8bb4b490ec5137eaecbd465))
+- **resolveColor:** Invalid colors (#8933) ([c76e170](https://github.com/discordjs/discord.js/commit/c76e17078602914c3e1d227a3acc98eaa99c18d4))
+- **WebSocketShard:** Clear listeners on reconnect (#8927) ([aa8c57d](https://github.com/discordjs/discord.js/commit/aa8c57dab60104549e28451abf35c0387595d67e))
+- Re-export formatters (#8909) ([b14604a](https://github.com/discordjs/discord.js/commit/b14604abdecca575b1fca693c1593e3585bcca8c))
+
+## Documentation
+
+- **MessageManager:** Add clarification to fetch messages (#9222) ([f5ec1ca](https://github.com/discordjs/discord.js/commit/f5ec1cada5ebf0ca4093bdfc81aaf56900c794ef))
+- Make interactionResponse as optional (#9179) ([664cccb](https://github.com/discordjs/discord.js/commit/664cccb2706db33635aa2556954de57f93b3d3db))
+- Fix typos (#9127) ([1ba1f23](https://github.com/discordjs/discord.js/commit/1ba1f238f04221ec890fc921678909b5b7d92c26))
+- **chatInputApplicationCommandMention:** Parameters are not nullable (#9091) ([6f78e82](https://github.com/discordjs/discord.js/commit/6f78e8285b3ce762de010e68d49b377a47dc5a63))
+- No `@type` description and reveal info block (#9097) ([405f940](https://github.com/discordjs/discord.js/commit/405f9400e8e3ffea9f3847ab5abb431a34538a96))
+- **ThreadEditOptions:** Move info tag back to `invitable` (#9020) ([f3fe3ce](https://github.com/discordjs/discord.js/commit/f3fe3ced622676b406a62b43f085aedde7a621aa))
+- Fix a typo in the MentionableSelectMenuInteraction link (#9000) ([6d7a143](https://github.com/discordjs/discord.js/commit/6d7a143667f33ef2ea45d8016ac4738237707881))
+- **ApplicationRoleConnectionMetadata:** Add documentation (#8976) ([2e22b31](https://github.com/discordjs/discord.js/commit/2e22b31892d9b858fcb24fa580b486b4154e823f))
+- Fix malformed overridden documentation (#8954) ([0b8b114](https://github.com/discordjs/discord.js/commit/0b8b114761f961a2bf8e5aae342ed711b154a89e))
+- **GuildForumThreadManager:** Fix `sticker` type (#8940) ([dd62be0](https://github.com/discordjs/discord.js/commit/dd62be077d3e4fbd73a0c10ca344d93d3d19fa38))
+- Fix deprecated links (#8907) ([976b234](https://github.com/discordjs/discord.js/commit/976b234e9dc9999e5dee47b58c85afbc1cd494c2))
+- **UserFlagsBitField:** Make `.Flags` static (#8902) ([c48ff5e](https://github.com/discordjs/discord.js/commit/c48ff5e4205899e3b6cd35812ca857236bef6864))
+
+## Features
+
+- **Collector:** Add lastCollectedTimestamp (#9044) ([4458a13](https://github.com/discordjs/discord.js/commit/4458a13925164762b519ded1037ae8775d879f71))
+- **StageChannel:** Add messages (#9134) ([ffdb197](https://github.com/discordjs/discord.js/commit/ffdb197f988657100e2a9ff0ca17b759339a1dda))
+- **AutoModerationActionExecution:** Add `channel`, `user` and `member` getters (#9142) ([095bd77](https://github.com/discordjs/discord.js/commit/095bd77515aa31bb0e95a350b4355980fea9268d))
+- **AutoModeration:** Support `custom_message` (#9171) ([c1000b8](https://github.com/discordjs/discord.js/commit/c1000b86ed6d5413afcd6ee7e80505e5a845430b))
+- **ThreadMemberManager:** Support pagination fetching (#9035) ([765d5a3](https://github.com/discordjs/discord.js/commit/765d5a3b2d5529c3a2a4b29512f6932264443ed1))
+- **InteractionResponse:** Add new methods (#9132) ([dc9924f](https://github.com/discordjs/discord.js/commit/dc9924fb5f24c8dac963d6b86ba279a89545e73b))
+- **GuildMember:** Add `flags` (#9087) ([76b2116](https://github.com/discordjs/discord.js/commit/76b21162aca7cd4897826437da3063524e1e7553))
+- **Client:** `guildAuditLogEntryCreate` event (#9058) ([9439107](https://github.com/discordjs/discord.js/commit/9439107a1d6a9b77b5f991973d96bc6100da4753))
+- Add role subscription data (#9025) ([1ba22f4](https://github.com/discordjs/discord.js/commit/1ba22f4c9e4173f8866339d3eadb2939d4b32034))
+- **Sticker:** Add support for gif stickers (#9038) ([6a9875d](https://github.com/discordjs/discord.js/commit/6a9875da054a875a4711394547d47439bbe66fb6))
+- **GuildAuditLogs:** Support `after` (#9011) ([0076589](https://github.com/discordjs/discord.js/commit/0076589ccc93e09d77a448874d1ceff5d0e91aa2))
+- Add role subscriptions (#8915) ([3407e1e](https://github.com/discordjs/discord.js/commit/3407e1eea3c8d5629465553f342ac30ceae27a47))
+- Add `not_found` to guild member chunk data (#8975) ([be294ea](https://github.com/discordjs/discord.js/commit/be294eaf9901ea139ce485deeec9178959ffa91f))
+- **ClientApplication:** Add role connections (#8855) ([22e2bbb](https://github.com/discordjs/discord.js/commit/22e2bbb0d24e3f30516f262308d5786f2f666713))
+- **CommandInteractionOptionResolver:** Add `channelTypes` option to `getChannel` (#8934) ([429dbcc](https://github.com/discordjs/discord.js/commit/429dbccc85cabd9986b2e8bf443bf384e4ddc61a))
+- **ForumChannel:** Add `defaultForumLayout` (#8895) ([cbafd47](https://github.com/discordjs/discord.js/commit/cbafd479b331633ed97f7b1a22ef03c6a2f4cf31))
+- Add support for nsfw commands (#7976) ([7a51344](https://github.com/discordjs/discord.js/commit/7a5134459c5f06864bf74631d83b96d9c21b72d8))
+- **InteractionResponse:** CreatedTimestamp (#8917) ([627511d](https://github.com/discordjs/discord.js/commit/627511d6522f772b84c25e6a3f6da06b06bb912e))
+- **Guild:** Add disableInvites method (#8801) ([45faa19](https://github.com/discordjs/discord.js/commit/45faa199820e7c4ccdb2997c7e3b353f566d2312))
+
+## Refactor
+
+- Compare with `undefined` directly (#9191) ([869153c](https://github.com/discordjs/discord.js/commit/869153c3fdf155783e7c0ecebd3627b087c3a026))
+- **GuildMemberManager:** Tidy up fetching guild members (#8972) ([4e0e125](https://github.com/discordjs/discord.js/commit/4e0e1250399aa12c340ac92a86ec2c05704fe2bb))
+- **BitField:** Reverse iterator/toArray responsibilities (#9118) ([f70df91](https://github.com/discordjs/discord.js/commit/f70df910ed12e397066d0bdb27343af21ead4d92))
+- Moved the escapeX functions from discord.js to @discord.js/formatters (#8957) ([13ce78a](https://github.com/discordjs/discord.js/commit/13ce78af6e3aedc793f53a099a6a615df44311f7))
+- Use `deprecate()` directly (#9026) ([1c871b5](https://github.com/discordjs/discord.js/commit/1c871b5b576dddef12c5afacecf416dbd6243dea))
+- **Guild:** Destructure object in guild editing (#8971) ([d3e9f2a](https://github.com/discordjs/discord.js/commit/d3e9f2a355a1f5272d62a507eb6ecd8808904fff))
+- **GuildManager:** Better handling of creation code (#8974) ([d7a09f6](https://github.com/discordjs/discord.js/commit/d7a09f6fcee30c31b4418166bf7bf9e894841f87))
+- **sharding:** Use switch statement (#8928) ([6540914](https://github.com/discordjs/discord.js/commit/6540914b4a7f244f5e40fe2a3b7e73986763d81b))
+- Use consistent naming for options (#8901) ([a7b55c1](https://github.com/discordjs/discord.js/commit/a7b55c1460cf63fb482f7d05657120eec96bee82))
+- **CommandInteractionOptionResolver:** Loosen mentionable checks (#8910) ([1b151db](https://github.com/discordjs/discord.js/commit/1b151db59c4340417f8a28a88064f45336ac8c78))
+
+## Styling
+
+- Run prettier (#9041) ([2798ba1](https://github.com/discordjs/discord.js/commit/2798ba1eb3d734f0cf2eeccd2e16cfba6804873b))
+
+## Typings
+
+- Allow sending messages with `SuppressNotifications` flag (#9177) ([71a427f](https://github.com/discordjs/discord.js/commit/71a427f6322be76fe2d1cb265de09f171b1b354a))
+- Remove `EscapeMarkdownOptions` (#9153) ([fd0246c](https://github.com/discordjs/discord.js/commit/fd0246ca4c75e60d8e117d9ac5af7067c7a63277))
+- **Attachment:** Make `attachment` private (#8982) ([da23cd5](https://github.com/discordjs/discord.js/commit/da23cd5d69de4856d075f00738f75c68c555ae5b))
+- Fix type of Attachment#name (#9101) ([4e0a89f](https://github.com/discordjs/discord.js/commit/4e0a89f58f43f362bfde80d8319dce767c62850f))
+- Allow builders to set channel types in discord.js (#8990) ([7dec892](https://github.com/discordjs/discord.js/commit/7dec892218f7b470a5f8e78732a524a53da24d26))
+- Swap message reaction and emoji identifier types (#8969) ([ad49845](https://github.com/discordjs/discord.js/commit/ad4984526020f2baeefaeeebbded66c6848c4b85))
+- **widget:** Add missing `name` (#8978) ([898b5ac](https://github.com/discordjs/discord.js/commit/898b5ac416cbbb415b125bb27221d0901fdd180e))
+- Use StringSelectMenuOptionBuilder (#8949) ([bec51de](https://github.com/discordjs/discord.js/commit/bec51de1038c35c6edaaa13934781758fe1951de))
+- Fix actions type in automod (#8962) ([5915f39](https://github.com/discordjs/discord.js/commit/5915f39810b712c05a46fa21ab4e12b4cfa3c25a))
+- Subcommand group `options` is required (#8966) ([5dc5e90](https://github.com/discordjs/discord.js/commit/5dc5e902688fc563087cd5061dcb59dd68fd4eda))
+- Add generic to `ActionRowBuilder.from()` (#8414) ([153352a](https://github.com/discordjs/discord.js/commit/153352ad7a1ccb4a9461523cf2597d81df93b69c))
+
+# [14.7.1](https://github.com/discordjs/discord.js/compare/14.7.0...14.7.1) - (2022-12-01)
+
+## Bug Fixes
+
+- Prevent crash on no select menu option (#8881) ([11d195d](https://github.com/discordjs/discord.js/commit/11d195d04ff57d51adb0f0d3a0a7342f9e34aba0))
+
+# [14.7.0](https://github.com/discordjs/discord.js/compare/14.6.0...14.7.0) - (2022-11-28)
+
+## Bug Fixes
+
+- **MessageMentions:** Add `InGuild` generic (#8828) ([f982803](https://github.com/discordjs/discord.js/commit/f9828034cd21e6f702762a46923e0f42115596f6))
+- **Activity:** Fix equals() not checking for differing emoji (#8841) ([7e06f68](https://github.com/discordjs/discord.js/commit/7e06f68185423ba7cb310220b213f445b6571e29))
+- Fixed react/astro/guide/discord.js build, updated dependencies, fix crawlvatar (#8861) ([d0c8256](https://github.com/discordjs/discord.js/commit/d0c82561b8a1765a1daa362ca903f3ffb3fa33ee))
+- **escapeMarkdown:** Fix double escaping (#8798) ([d6873b7](https://github.com/discordjs/discord.js/commit/d6873b7159352479475b3a0daa215bddbdd3a79b))
+- **Transfomers:** Call `.toJSON` in `toSnakeCase` (#8790) ([017f9b1](https://github.com/discordjs/discord.js/commit/017f9b1ed4014dc1db0b78c1a77e463b4403de5d))
+- Censor token in debug output (#8764) ([53d8e87](https://github.com/discordjs/discord.js/commit/53d8e87d7f3a329608250656950bd0a200adb1c7))
+- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4))
+
+## Documentation
+
+- Describe InteractionEditReplyOptions (#8840) ([cb77fd0](https://github.com/discordjs/discord.js/commit/cb77fd02d083438de2aff6f0769baf7d1797bc65))
+- **AutoModerationRuleManager:** Describe cache (#8848) ([d275480](https://github.com/discordjs/discord.js/commit/d2754802cc3479e6288cdbfcd48c76bf57e09a07))
+- Fix message action row components (#8819) ([65bc0ad](https://github.com/discordjs/discord.js/commit/65bc0adbf4d7870d33b92585ca18f964f24bc84e))
+- Specify `ActionRowBuilder` for `components` (#8834) ([8ed5c1b](https://github.com/discordjs/discord.js/commit/8ed5c1beb622f71ce0bd89e4cbeff50e464da8fe))
+- Add `@extends` for select menu classes (#8824) ([09f65b7](https://github.com/discordjs/discord.js/commit/09f65b724b0d2f36bbe89b83570c0d18093b5126))
+- Make WebSocketShard.lastPingTimestamp public (#8768) ([68c9cb3](https://github.com/discordjs/discord.js/commit/68c9cb37bc3df6326b720291827ea477e421faf2))
+- **MessageReplyOptions:** Remove duplicate stickers field (#8766) ([6e348ff](https://github.com/discordjs/discord.js/commit/6e348ffd1d8db8d8ad2da7823460814695e01a43))
+
+## Features
+
+- **Webhook:** Add `channel` property (#8812) ([decbce4](https://github.com/discordjs/discord.js/commit/decbce401062af75f633e6acacc88207b115a719))
+- Auto Moderation (#7938) ([fd4ba5e](https://github.com/discordjs/discord.js/commit/fd4ba5eaba66898699127fc0d5f0ab52c18e3db0))
+- **SelectMenuInteractions:** Add `values` property (#8805) ([b2fabd1](https://github.com/discordjs/discord.js/commit/b2fabd130a76ea54cfbfa1b871ef8659513c2c7a))
+- **ThreadChannel:** Add a helper for pin and unpin (#8786) ([e74aa7f](https://github.com/discordjs/discord.js/commit/e74aa7f6b0fe04e3473fc4a62a73a7db87307685))
+- Add `Message#bulkDeletable` (#8760) ([ff85481](https://github.com/discordjs/discord.js/commit/ff85481d3e7cd6f7c5e38edbe43b27b104e82fba))
+- New select menus (#8793) ([5152abf](https://github.com/discordjs/discord.js/commit/5152abf7285581abf7689e9050fdc56c4abb1e2b))
+- **InteractionResponses:** Add message parameter (#8773) ([8b400ca](https://github.com/discordjs/discord.js/commit/8b400ca975c6bad00060b9c67068f42bd53524ba))
+- Support resume urls (#8784) ([88cd9d9](https://github.com/discordjs/discord.js/commit/88cd9d906074eb79e85df0ef49287f11133d2e0d))
+- Allow deletion of ephemeral messages (#8774) ([fc10774](https://github.com/discordjs/discord.js/commit/fc107744618857bf28c2167f204253baf690ede8))
+- **GuildChannelManager:** Add `.addFollower()` method (#8567) ([caeb1cb](https://github.com/discordjs/discord.js/commit/caeb1cbfdb2f2f007252c4d7e9f47a575c24bcb5))
+
+## Refactor
+
+- **Embed:** Use `embedLength` function from builders (#8735) ([cb3826c](https://github.com/discordjs/discord.js/commit/cb3826ce6dbcd3cf7ab639af6cdfcea80336aa1d))
+
+# [14.6.0](https://github.com/discordjs/discord.js/compare/14.5.0...14.6.0) - (2022-10-10)
+
+## Bug Fixes
+
+- **ClientOptions:** Make `ClientOptions#intents` returns an IntentsBitField (#8617) ([4c2955a](https://github.com/discordjs/discord.js/commit/4c2955a5de6779c29c09e63ba9ad2b235904f842))
+- Correctly construct a builder (#8727) ([e548e6a](https://github.com/discordjs/discord.js/commit/e548e6a10b7e1720f5e8f3c859b0b64d5134a012))
+- **Components:** Error with unknown components (#8724) ([6fd331d](https://github.com/discordjs/discord.js/commit/6fd331dd528e78fd023c908bd58af3faa9ed6c65))
+- **Client:** Don't auth for webhook fetches with token (#8709) ([01d75c8](https://github.com/discordjs/discord.js/commit/01d75c8b8b14f33c95a4da83a8494db848beeb8c))
+- Re-export util (#8699) ([a306219](https://github.com/discordjs/discord.js/commit/a306219673335584accd2ff77ab34d2812ef6c5d))
+- Throw discord.js errors correctly (#8697) ([ace974f](https://github.com/discordjs/discord.js/commit/ace974fc1fdbc5bcaa0d7f6f6d17de185c9f9cbf))
+
+## Documentation
+
+- **Utils:** Remove `private` from `parseEmoji` (#8718) ([a31e605](https://github.com/discordjs/discord.js/commit/a31e605e09064a300e31a3c91466b613654ba98e))
+- Update UserContextMenuCommandInteraction documentation (#8717) ([7556db2](https://github.com/discordjs/discord.js/commit/7556db243d9480949835668fcb5724fdd5d70e08))
+- Fix `AwaitMessageComponentOptions` typedef (#8696) ([9effd82](https://github.com/discordjs/discord.js/commit/9effd82abe82ba71ae627673da21ba07e1ede23e))
+
+## Features
+
+- **Util:** Escape more markdown characters (#8701) ([7b8966b](https://github.com/discordjs/discord.js/commit/7b8966bca156db79933403289741893a6e10ccd5))
+- **GuildChannelManager:** Allow creating channels with a default auto archive duration (#8693) ([628759b](https://github.com/discordjs/discord.js/commit/628759bcff8b0d4c77926cee2b8c18d8fdb4c260))
+- Add `@discordjs/util` (#8591) ([b2ec865](https://github.com/discordjs/discord.js/commit/b2ec865765bf94181473864a627fb63ea8173fd3))
+- **ForumChannel:** Add `defaultSortOrder` (#8633) ([883f6e9](https://github.com/discordjs/discord.js/commit/883f6e9202a559c986f4b15fccb422b5aea7bea8))
+
+## Refactor
+
+- Rename Error to DiscordjsError internally (#8706) ([aec44a0](https://github.com/discordjs/discord.js/commit/aec44a0c93f620b22242f35e626d817e831fc8cb))
+
+## Typings
+
+- Fix events augmentation (#8681) ([ac83ada](https://github.com/discordjs/discord.js/commit/ac83ada306ec153c13260d2bd53e4d704884b68a))
+- **Message:** Remove `& this` from `#inGuild` typeguard (#8704) ([c0f7a1a](https://github.com/discordjs/discord.js/commit/c0f7a1a89a4cf62edc7065bd200b2ce4018e0a27))
+- **ModalBuilder:** Fix constructor typings (#8690) ([2ea2a85](https://github.com/discordjs/discord.js/commit/2ea2a85e6335d57f44689f9b6e284129104de8fc))
+
+# [14.5.0](https://github.com/discordjs/discord.js/compare/14.4.0...14.5.0) - (2022-09-25)
+
+## Bug Fixes
+
+- **ThreadChannel:** Add forum channel to parent (#8664) ([0126d9b](https://github.com/discordjs/discord.js/commit/0126d9b810a156c4bf1b8b93f2121f3319855bac))
+- **GuildChannelManager:** Allow creating webhooks on forums (#8661) ([16fcdc3](https://github.com/discordjs/discord.js/commit/16fcdc36877d1a65ce9995c9fe3502aa268c9388))
+- **ForumChannel:** Implement missing properties and methods (#8662) ([8622939](https://github.com/discordjs/discord.js/commit/862293922924f453f69b0b0f8efe87ddebbd387d))
+- RepliableInteraction respect cached generic (#8667) ([578bc95](https://github.com/discordjs/discord.js/commit/578bc951bdcdc21ec5aee86e7a47a17e8c867dfc))
+- **ThreadChannel:** Allow editing flags (#8671) ([1244854](https://github.com/discordjs/discord.js/commit/1244854e1365d7e4a8d01703a7ec13610ed100c7))
+- **GuildChannelManager:** Typo in `flags` property name when editing (#8669) ([fc8ed81](https://github.com/discordjs/discord.js/commit/fc8ed816e643754a938211a17b41a2cec95df265))
+
+## Documentation
+
+- Fix duplicate typedefs (#8677) ([d79aa2d](https://github.com/discordjs/discord.js/commit/d79aa2d0d0b186bd28cbfc82f3d6ecf3deb41c50))
+- **ForumChannel:** Add `@implements` (#8678) ([8ca407e](https://github.com/discordjs/discord.js/commit/8ca407e089c3050b61a51a52b9100e4613ad1666))
+
+## Features
+
+- **GuildChannelManager:** Allow editing `flags` (#8637) ([abb7226](https://github.com/discordjs/discord.js/commit/abb7226af3445f5b724815bb2f7a121a52a563b5))
+
+## Refactor
+
+- **GuildBanManager:** Add deprecation warning for `deleteMessageDays` (#8659) ([e993122](https://github.com/discordjs/discord.js/commit/e9931229ae62a120ae0761ee2a2c10ea0cb1a6fb))
+
+## Typings
+
+- **GuildChannelManager:** Handle forum channel overload (#8660) ([1486bc9](https://github.com/discordjs/discord.js/commit/1486bc9336369d229972df5e28b9428365b92bff))
+- **Caches:** Allow `GuildForumThreadManager` and `GuildTextThreadManager` (#8665) ([2487e3b](https://github.com/discordjs/discord.js/commit/2487e3bf76260a4a2fbf375e0b01a43f347922a3))
+
+# [14.4.0](https://github.com/discordjs/discord.js/compare/14.3.0...14.4.0) - (2022-09-21)
+
+## Bug Fixes
+
+- Correct applied tags type (#8641) ([f6f15d8](https://github.com/discordjs/discord.js/commit/f6f15d8e877d4ffbe908a093e64809ef9015e0ff))
+- **ThreadChannel:** Make `fetchStarterMessage()` work in forum posts (#8638) ([a7f816e](https://github.com/discordjs/discord.js/commit/a7f816eeb7fa1e193cf0901efbdcaf629f72465f))
+- Update `messageCount`/`totalMessageSent` on message events (#8635) ([145eb2f](https://github.com/discordjs/discord.js/commit/145eb2fc5db5ca739aa9782d5ec5210f81a6aeeb))
+- Footer / sidebar / deprecation alert ([ba3e0ed](https://github.com/discordjs/discord.js/commit/ba3e0ed348258fe8e51eefb4aa7379a1230616a9))
+
+## Documentation
+
+- Correctly overwrite `setRTCRegion` method (#8642) ([f049734](https://github.com/discordjs/discord.js/commit/f0497343f1193635b260b9e2085cac7b43991f74))
+- **GuildTextThreadManager:** Document correct `@extend` (#8639) ([802b239](https://github.com/discordjs/discord.js/commit/802b2394b08151faab6810695fd5c8f27ce84d58))
+- Fix regexps incorrectly being called global (#8624) ([fc9653f](https://github.com/discordjs/discord.js/commit/fc9653f5aea4013da15fb8de0a4452400eaa7739))
+- Update misleading `Client#guildMemberAvailable` event description (#8626) ([22ac6b4](https://github.com/discordjs/discord.js/commit/22ac6b4660db6b02f62b9851e9e3bcfe5fb506b5))
+- **Options:** Update DefaultMakeCacheSettings (#8585) ([3252332](https://github.com/discordjs/discord.js/commit/32523325c6610e95fe3ffcc31d005b3418c6bc68))
+- Change name (#8604) ([dd5a089](https://github.com/discordjs/discord.js/commit/dd5a08944c258a847fc4377f1d5e953264ab47d0))
+
+## Features
+
+- **Widget:** Allow forum channels (#8645) ([b106956](https://github.com/discordjs/discord.js/commit/b1069563086fc616fe21abb789f28f69e57c8851))
+- **WelcomeChannel:** Add forum channel as a type (#8643) ([6f1f465](https://github.com/discordjs/discord.js/commit/6f1f465a77e362e20ec50067be0e634d35946ba5))
+- Allow forum channels in webhook update event (#8646) ([5048a3d](https://github.com/discordjs/discord.js/commit/5048a3d17ace22336e74451d30b513b3db42a26f))
+- Add support for guild forums (#7791) ([8a8d519](https://github.com/discordjs/discord.js/commit/8a8d519c9c4c082370fc6935b56dafb525b873df))
+- **GuildBanManager#create:** Add `deleteMessageSeconds` (#8326) ([03fb5b0](https://github.com/discordjs/discord.js/commit/03fb5b0a2f45275dec7885175ad691a1d9c449c4))
+- Add typeguard to BaseInteraction#isRepliable (#8565) ([55c3ee2](https://github.com/discordjs/discord.js/commit/55c3ee20ae700e78d18a3c4c04b6a7426cffc060))
+- **Integration:** Add `scopes` (#8483) ([8b3d006](https://github.com/discordjs/discord.js/commit/8b3d0061180cfd5d9ba8beae3e8d623b5ce43ea4))
+- Add `chatInputApplicationCommandMention` formatter (#8546) ([d08a57c](https://github.com/discordjs/discord.js/commit/d08a57cadd9d69a734077cc1902d931ab10336db))
+
+## Refactor
+
+- Replace usage of deprecated `ChannelType`s (#8625) ([669c3cd](https://github.com/discordjs/discord.js/commit/669c3cd2566eac68ef38ab522dd6378ba761e8b3))
+- Split message send/edit types/documentation (#8590) ([8e1afae](https://github.com/discordjs/discord.js/commit/8e1afaebdb686033555ca58e53f34bb97f7369c8))
+- Website components (#8600) ([c334157](https://github.com/discordjs/discord.js/commit/c3341570d983aea9ecc419979d5a01de658c9d67))
+
+## Typings
+
+- Narrow channel type in thread managers (#8640) ([14bbc91](https://github.com/discordjs/discord.js/commit/14bbc9150a748e7ac1660c2375c7f065fcc55a6c))
+- **interactions:** Pass `Cached` type to return type of methods (#8619) ([053da5b](https://github.com/discordjs/discord.js/commit/053da5bc91d5cfa8d842b13b0b05083d2f7f086d))
+- Ensure events possess `Client<true>` (#8612) ([a9f003a](https://github.com/discordjs/discord.js/commit/a9f003ac9b56d31166cbf353d02140dad0b2517e))
+- **GuildChannelManager:** Correct `fetch` return type (#8549) ([1d4cdee](https://github.com/discordjs/discord.js/commit/1d4cdee321ab25bb0f109d55a000582825dd79f9))
+- **ThreadChannel:** `fetchStarterMessage` must return a `Message<true>` (#8560) ([b9c62ac](https://github.com/discordjs/discord.js/commit/b9c62ac0f0f534c33f9913135095f8b3d98ec05e))
+- **webhook:** Avatar can be null (#8541) ([f77612a](https://github.com/discordjs/discord.js/commit/f77612a55e9c593a21bc27e58c9fbd03d85787e3))
+
+# [14.3.0](https://github.com/discordjs/discord.js/compare/14.2.0...14.3.0) - (2022-08-22)
+
+## Bug Fixes
+
+- **GuildMemberManager:** `add()` method throws an error (#8539) ([3bef901](https://github.com/discordjs/discord.js/commit/3bef9018c0be3c5dc51d03b796d08b925dc4e1b9))
+- **Guild:** Widget channel types and fixes (#8530) ([23a0b6c](https://github.com/discordjs/discord.js/commit/23a0b6ccf27410963bd4f5c53d9ee2ce019e90a8))
+- **Embed:** Reference video in video (#8473) ([c97977a](https://github.com/discordjs/discord.js/commit/c97977a3e806bd5d8682bc7fb22ebec1a8ceecdc))
+
+## Documentation
+
+- **GuildAuditLogsEntry:** Correct `action` wording (#8499) ([7d25072](https://github.com/discordjs/discord.js/commit/7d2507279cc9d1397c7d61e7c7b856ff4bc17c86))
+
+## Features
+
+- **GuildMemberManager:** AddRole and removeRole (#8510) ([cda3f00](https://github.com/discordjs/discord.js/commit/cda3f005b1546fdb8410e9550526956f840857fc))
+- Deprecate `ActionRow.from()` (#8504) ([f9c25dd](https://github.com/discordjs/discord.js/commit/f9c25ddcfe68f089e13f1090c3df4bd7cd74d2b7))
+- **WebSocketShard:** Support new resume url (#8480) ([bc06cc6](https://github.com/discordjs/discord.js/commit/bc06cc638d2f57ab5c600e8cdb6afc8eb2180166))
+
+## Refactor
+
+- **GuildAuditLogsEntry:** Remove `guild` from application command permission update extra (#8520) ([2b8074d](https://github.com/discordjs/discord.js/commit/2b8074dd12f2f1e957caffb57e5fd4d7be88dc25))
+
+## Typings
+
+- Inference of guild in `MessageManager` (#8538) ([6bb1474](https://github.com/discordjs/discord.js/commit/6bb1474d2001b76773954c959b2c2687e1df0136))
+- Allow choice's value type to be strictly inferred (#8529) ([b3f7c32](https://github.com/discordjs/discord.js/commit/b3f7c32f7f91f12766178f5e17585856e81d9a87))
+- **GuildAuditLogs:** Allow fetching to return all possible values (#8522) ([0dba8ad](https://github.com/discordjs/discord.js/commit/0dba8adbd2e6efd634bd3eb31df09467ba8a8a0d))
+- Correct `EventEmitter.on (static)` return type (#8524) ([16bbc8a](https://github.com/discordjs/discord.js/commit/16bbc8aa208a8a16c22be24696f57d5f7a5faf2b))
+- **GuildAuditLogs:** Remove static `Entry` (#8521) ([7a3d18d](https://github.com/discordjs/discord.js/commit/7a3d18dd6d1fe27393d00019b9ecd35c98b95ee7))
+- Disallow some channel types from webhook creation (#8531) ([4882b17](https://github.com/discordjs/discord.js/commit/4882b17a77484f801faa19fb971f2e6abd88e59f))
+- Implement max/min values for autocomplete (#8498) ([812f7f1](https://github.com/discordjs/discord.js/commit/812f7f1ea86fc953aa796875cbc7ccc434203d77))
+- **ModalMessageModalSubmitInteraction:** ChannelId is not nullable (#8496) ([c31a5cf](https://github.com/discordjs/discord.js/commit/c31a5cfcc82706667768eac77b5f99ba69cf3c91))
+- Change type of ApplicationCommandSubCommand.options (#8476) ([ebaf158](https://github.com/discordjs/discord.js/commit/ebaf158006d3c7db3b8c695e7c027b8af11999ba))
+
+# [14.2.0](https://github.com/discordjs/discord.js/compare/14.1.2...14.2.0) - (2022-08-10)
+
+## Bug Fixes
+
+- **ThreadChannel:** Handle possibly `null` parent (#8466) ([afa27b1](https://github.com/discordjs/discord.js/commit/afa27b15c5b92bc8d55b8285834d8e03f6692d06))
+- Remove DM channels from `Client#messageDeleteBulk`'s types (#8460) ([6c6fe74](https://github.com/discordjs/discord.js/commit/6c6fe74dd84859c5319efa999404e8168f189710))
+- **Transformers:** Do not transform `Date` objects (#8463) ([0e2a095](https://github.com/discordjs/discord.js/commit/0e2a09571c8e5ee61153b04e45334a226a1b4534))
+- **ModalSubmitInteraction:** Allow deferUpdate (#8455) ([0fab869](https://github.com/discordjs/discord.js/commit/0fab869e5179dca7ddec75b5519615278e51ad82))
+- **Guild:** Unable to fetch templates (#8420) ([aac8acc](https://github.com/discordjs/discord.js/commit/aac8acc22be7d7af99933ef099eca7deda43cb40))
+- **MessageMentions:** Infinite loop in `parsedUsers` getter (#8430) ([b8a3136](https://github.com/discordjs/discord.js/commit/b8a31360a220e3d796f5381bd215d30a379ecb7c))
+- **DataResolver:** Make `Buffer` from string (#8416) ([e72b986](https://github.com/discordjs/discord.js/commit/e72b986939e2958547c0e54d6d27472c8d111609))
+
+## Documentation
+
+- Change registration example to use global commands (#8454) ([64a4041](https://github.com/discordjs/discord.js/commit/64a4041a05e9514334a9f9e1f38a1ea18bb676d5))
+- **Colors:** Provide enum descriptions (#8437) ([6ef4754](https://github.com/discordjs/discord.js/commit/6ef4754d40c5ec65715fc1e00e643c52fe0a6209))
+- **AttachmentBuilder:** Fix #8407 (#8421) ([5b053cf](https://github.com/discordjs/discord.js/commit/5b053cf82ec2f2b717a490485af052dc956fe3c9))
+
+## Features
+
+- **Guild:** Add `max_video_channel_users` (#8423) ([3a96ce7](https://github.com/discordjs/discord.js/commit/3a96ce7970947f6268c21a1323d986aac8cb736d))
+
+## Typings
+
+- **Message:** Correct `bulkDelete` return type (#8465) ([c5b96a1](https://github.com/discordjs/discord.js/commit/c5b96a185cb8ba836b7cd10526c14059866f218f))
+- Fix missing types for mentionable options (#8443) ([452e94f](https://github.com/discordjs/discord.js/commit/452e94fd3ecc12de9e3408982c5c7fd931bae634))
+- **ApplicationCommandOption:** Add `ApplicationCommandBooleanOption` (#8434) ([38275fc](https://github.com/discordjs/discord.js/commit/38275fc53d633ce77ed2b142aff788dcbd4fad8c))
+
+# [14.1.2](https://github.com/discordjs/discord.js/compare/14.1.1...14.1.2) - (2022-07-30)
+
+## Bug Fixes
+
+- **errors:** Error codes (#8398) ([480c85c](https://github.com/discordjs/discord.js/commit/480c85c9c3d129204b3399ed726a4e570e0b2852))
+
+## Documentation
+
+- **Embed:** Ensure height and width are numbers (#8396) ([fca3dad](https://github.com/discordjs/discord.js/commit/fca3dada2a565eecfc7e5275cc9317df1d261871))
+
+# [14.1.0](https://github.com/discordjs/discord.js/compare/14.0.3...14.1.0) - (2022-07-29)
+
+## Bug Fixes
+
+- **MessageMentions:** `ignoreRepliedUser` option in `has()` (#8202) ([b4e2c0c](https://github.com/discordjs/discord.js/commit/b4e2c0c4d5538b945f9d597c6410a6f84b315084))
+- **GuildChannelManager:** Allow unsetting rtcRegion (#8359) ([a7d49e5](https://github.com/discordjs/discord.js/commit/a7d49e56fc7c34d2e4548d9e5bf0aec45273506e))
+- **ThreadChannel:** Omit webhook fetching (#8351) ([3839958](https://github.com/discordjs/discord.js/commit/3839958e3f682c715f1017da05436d2fe34900fd))
+- **GuildAuditLogsEntry:** Replace OverwriteType with AuditLogOptionsType (#8345) ([58c1b51](https://github.com/discordjs/discord.js/commit/58c1b51c5ceab137ad9851919b338419eeeab69e))
+- **ShardClientUtil#_respond:** Construct global error (#8348) ([8e520f9](https://github.com/discordjs/discord.js/commit/8e520f946a5b9f93a939290facf4ccca2c05ff21))
+- **Presence:** Do not return NaN for activity timestamp (#8340) ([df42fdf](https://github.com/discordjs/discord.js/commit/df42fdfc421f1190f0a2267a66efd3c921ec2348))
+- **Client:** Omit private properties from toJSON (#8337) ([830c670](https://github.com/discordjs/discord.js/commit/830c670c61dcb17d8ab2a894a3203c68917d27e0))
+- **ApplicationCommandManager:** Allow passing 0n to defaultMemberPermissions (#8311) ([1fb7b30](https://github.com/discordjs/discord.js/commit/1fb7b30963cfe7ea4c05b1f3b42171c879c46a1d))
+
+## Documentation
+
+- **InteractionResponses:** Add `showModal()` return type (#8376) ([0b61dbf](https://github.com/discordjs/discord.js/commit/0b61dbf720e844322b066e30080c3537ab3d8174))
+- **WebhookClient:** Document working options (#8375) ([ba6797e](https://github.com/discordjs/discord.js/commit/ba6797e74209161b64c412de1b6f307cb28736b8))
+- **Message:** Document gateway intent for content (#8364) ([2130aae](https://github.com/discordjs/discord.js/commit/2130aae3210a8eaf91c5ccae5463940d49052c7d))
+- Use info blocks for requirements (#8361) ([80b9738](https://github.com/discordjs/discord.js/commit/80b9738957ebf5b6eb7c9858cec0fb1c897d0a1f))
+- **WebhookClient:** Make constructor a union (#8370) ([e9920a9](https://github.com/discordjs/discord.js/commit/e9920a9c98ffb78bd7d0ae00d486476367296646))
+- Update docs and examples to PascalCase links (#8305) ([34ba9d1](https://github.com/discordjs/discord.js/commit/34ba9d1c4c80eff7e6ac199a40232d07491432cc))
+
+## Features
+
+- Add channel & message URL formatters (#8371) ([a7deb8f](https://github.com/discordjs/discord.js/commit/a7deb8f89830ead6185c5fb46a49688b6d209ed1))
+- Restore missing typeguards (#8328) ([77ed407](https://github.com/discordjs/discord.js/commit/77ed407f6aadb68e729470c5269e9b526cb1b3f0))
+- **GuildMember:** Add dmChannel getter (#8281) ([4fc2c60](https://github.com/discordjs/discord.js/commit/4fc2c60a3bb43671b4b0202ae75eab42aba163ff))
+
+## Refactor
+
+- Deprecate `Formatter` class (#8373) ([7fd9ed8](https://github.com/discordjs/discord.js/commit/7fd9ed8f13d17ce7e98e34f7454d9047054d8467))
+- **PermissionOverwriteManager:** Use `OverwriteType` (#8374) ([6d24805](https://github.com/discordjs/discord.js/commit/6d248051cfd431e9cb1c65cb98f56aa0a6556407))
+
+## Typings
+
+- **GuildAuditLogsEntryExtraField:** Use `AuditLogOptionsType` (#8349) ([200ab91](https://github.com/discordjs/discord.js/commit/200ab91f527d8a5706d277b89a975096f75d141a))
+
+# [14.0.3](https://github.com/discordjs/discord.js/compare/14.0.2...14.0.3) - (2022-07-19)
+
+## Bug Fixes
+
+- **Components:** Support emoji id strings (#8310) ([660e212](https://github.com/discordjs/discord.js/commit/660e212e83df026c684ee2cda7fb4e98870f342e))
+
+# [14.0.2](https://github.com/discordjs/discord.js/compare/14.0.1...14.0.2) - (2022-07-18)
+
+## Bug Fixes
+
+- **DataResolver#resolveImage:** Adjust to updated resolveFile (#8308) ([3a7e93d](https://github.com/discordjs/discord.js/commit/3a7e93df576172c797f1d8bd6483234bb6af2d00))
+
+# [14.0.0](https://github.com/discordjs/discord.js/compare/9.3.1...14.0.0) - (2022-07-17)
+
+## Bug Fixes
+
+- **GuildMemberManager:** Allow setting own nickname (#8066) ([52a9e21](https://github.com/discordjs/discord.js/commit/52a9e213c2dc13ee52ee0234593fdce392f43890))
+- **PermissionOverwriteManager:** Mutates user (#8283) ([3bf30b1](https://github.com/discordjs/discord.js/commit/3bf30b1e6d2d6f583f7069a1e24e7842d59fab2f))
+- **GuildChannelManager:** Access `resolveId` correctly (#8296) ([3648f6d](https://github.com/discordjs/discord.js/commit/3648f6d567cd834c301de913ce19f786a265240d))
+- **GuildChannelManager:** Edit lockPermissions (#8269) ([7876548](https://github.com/discordjs/discord.js/commit/787654816d2b6a5168d199d32cdaeb4ef6d270b9))
+- **`SelectMenuBuilder`:** Properly accept `SelectMenuOptionBuilder`s (#8174) ([31d5930](https://github.com/discordjs/discord.js/commit/31d593046466438c55f5784b0f2098e233c5edc4))
+- Remove global flag on regular expressions (#8177) ([cdd9214](https://github.com/discordjs/discord.js/commit/cdd9214212892e30b3eaa161837c37516c5bcaa0))
+- **MessagePayload:** Guard against `repliedUser` property (#8211) ([fa010b5](https://github.com/discordjs/discord.js/commit/fa010b516254c4ab2762278817f31bf289f0ab6a))
+- **ApplicationCommandManager:** Explicitly allow passing builders to methods (#8209) ([50d55bd](https://github.com/discordjs/discord.js/commit/50d55bd6b819307c86701f4808c087f359c6ccff))
+- **GuildMemberRemove:** Remove member's presence (#8181) ([11b1739](https://github.com/discordjs/discord.js/commit/11b173931968c548f8504649ae7090865892e62d))
+- Edit() data can be partial and `defaultMemberPermissions` can be `null` (#8163) ([0ffbef5](https://github.com/discordjs/discord.js/commit/0ffbef506a97a0bf22cb134fc007c2aec29cbffc))
+- **WebSocketShard:** Keep an error handler on connections (#8150) ([c34c02a](https://github.com/discordjs/discord.js/commit/c34c02ab8d119bf16d8d14d125a9b650b4bb18f4))
+- **DJSError:** Error code validation (#8149) ([31f6582](https://github.com/discordjs/discord.js/commit/31f658247fe0e1047897edab629643d140e77e07))
+- **vcs:** Nsfw property (#8132) ([2eeaad6](https://github.com/discordjs/discord.js/commit/2eeaad6f27fdf8868364fa95ed20755ee09bda87))
+- **WebSocketManager:** Correct error name (#8138) ([db2b033](https://github.com/discordjs/discord.js/commit/db2b0333d912fe83381db2ffe16829d7d03d6c2e))
+- **WebSocketShard:** Disconnected casing (#8117) ([23e183a](https://github.com/discordjs/discord.js/commit/23e183a9ac7aaa3bca2bc4eb8634d1738ec34a26))
+- **webhooks:** Revert webhook caching (and returning Message) (#8038) ([d54bf5d](https://github.com/discordjs/discord.js/commit/d54bf5d286f4057db130901591b192fd4d1668c1))
+- **ApplicationCommand:** Remove `autocomplete` check at the top level and correctly check for `dmPermission` (#8100) ([0a44b05](https://github.com/discordjs/discord.js/commit/0a44b05db83948857afbe18471e7a867da47177a))
+- **ApplicationCommand:** Fix default member permissions assignment (#8067) ([96053ba](https://github.com/discordjs/discord.js/commit/96053babe1bd65ebe1fc6a261f5eb052906afdb9))
+- **scripts:** Read directory and rerun (#8065) ([f527dea](https://github.com/discordjs/discord.js/commit/f527dea36ead194aaae1bf5da1e953df59d692fd))
+- Select menu options to accept both rest and array (#8032) ([fbe67e1](https://github.com/discordjs/discord.js/commit/fbe67e102502b4b49690cbf8ff891ead2232ecf3))
+- **CommandInteractionOptionResolver:** Handle autocompletion interactions (#8058) ([d8077c6](https://github.com/discordjs/discord.js/commit/d8077c6839dc8ceb57d3c3a86bf9746be2a91ada))
+- **scripts:** Add quotes around blob arguments (#8054) ([598f61b](https://github.com/discordjs/discord.js/commit/598f61b992fab1b3fdcab8ff960366f7af0b37ea))
+- **Message:** Force fetching (#8047) ([f2b267c](https://github.com/discordjs/discord.js/commit/f2b267c079dd8aa7277910471f3db2f88af6efb2))
+- **Attachment:** Do not destructure `data` (#8041) ([1afae90](https://github.com/discordjs/discord.js/commit/1afae909d72e648cf48d63d7de2708737a78c126))
+- **DirectoryChannel:** Type `name` and handle `url` (#8023) ([86d8fbc](https://github.com/discordjs/discord.js/commit/86d8fbc023e3925e8f86799d6ebf2d423f7bf2ec))
+- Readd `isThread` type guard (#8019) ([f8ed71b](https://github.com/discordjs/discord.js/commit/f8ed71bfca6e47e3d44ad063e23804354bd23604))
+- Add static method `from` in builders (#7990) ([ad36c0b](https://github.com/discordjs/discord.js/commit/ad36c0be7744ea4214ccf345fe80a5a1a9e89101))
+- Typings (#7965) ([7a1095b](https://github.com/discordjs/discord.js/commit/7a1095b66be3c5d81185e026281e2908c10c1695))
+- **GuildAuditLogs:** Cache guild scheduled events (#7951) ([2f03f9a](https://github.com/discordjs/discord.js/commit/2f03f9ad3f63abee5b5c46d02f1afa8885e8977c))
+- Make sure action row builders create djs builders (#7945) ([adf461b](https://github.com/discordjs/discord.js/commit/adf461baf49be754c7a10c61faf1ef3df333413a))
+- **TextBasedChannel#bulkDelete:** Return deleted message (#7943) ([191510b](https://github.com/discordjs/discord.js/commit/191510b7f87903e4bd93b891649cb290fd50c47e))
+- Remove trailing invites on channel deletion (#7932) ([5e9b757](https://github.com/discordjs/discord.js/commit/5e9b757a3733e6526770eb60a15072612294eb21))
+- **DataResolver:** Fix check for readable streams (#7928) ([28172ca](https://github.com/discordjs/discord.js/commit/28172ca7b57357436d3252ec01ec17dad865d87f))
+- **AuditLog:** Default changes to empty array (#7880) ([19eaed6](https://github.com/discordjs/discord.js/commit/19eaed63905367ef4604366b8839023384524d1f))
+- **Util:** Flatten ignoring certain fields (#7773) ([df64d3e](https://github.com/discordjs/discord.js/commit/df64d3ea382c07e66bc7cc8877ee430206c31d63))
+- Possibly missing (#7829) ([6239d83](https://github.com/discordjs/discord.js/commit/6239d83c4d5f0a396678410d7fef35e39ed29009))
+- `endReason` not being properly set in base Collector (#7833) ([0c18dab](https://github.com/discordjs/discord.js/commit/0c18dab1280205b8855d17d075b7421860d59c14))
+- **SelectMenuBuilder:** Options array (#7826) ([3617093](https://github.com/discordjs/discord.js/commit/361709332bdc871822c2b9919f14fd090d68666a))
+- **Activity:** Platform type (#7805) ([4ac91c6](https://github.com/discordjs/discord.js/commit/4ac91c61d08111ae4d49d1e64caf94e6e49832c8))
+- **ApplicationCommand:** Equal nameLocalizations and descriptionLocalizations (#7802) ([4972bd8](https://github.com/discordjs/discord.js/commit/4972bd87c17cbc6a94c9608ba2ab39c475f9921f))
+- **InteractionResponses:** Use optional chaining on nullable property (#7812) ([c5fb548](https://github.com/discordjs/discord.js/commit/c5fb54852906898ffb19282dd60168dfc6fb2eba))
+- **MessageManager:** Allow caching option of an unspecified limit (#7763) ([1b2d8de](https://github.com/discordjs/discord.js/commit/1b2d8decb638faeae8184119c5cedfcdaf9485e3))
+- **builders:** Add constructor default param (#7788) ([c286650](https://github.com/discordjs/discord.js/commit/c2866504a3824005fe756556fec4b349898b7d22))
+- **MessagePayload:** ResolveBody check body instead of data (#7738) ([3db20ab](https://github.com/discordjs/discord.js/commit/3db20abdd2d502a1ed457842181b164dc6390ba1))
+- **ActionRow:** ToJSON should include components (#7739) ([ebb4dfa](https://github.com/discordjs/discord.js/commit/ebb4dfa262adb2086c83db487002bb2e1ed5ab88))
+- Prevent `NaN` for nullable timestamps (#7750) ([8625d81](https://github.com/discordjs/discord.js/commit/8625d817145eb642aeb0da05184352f438586986))
+- **InteractionCreateAction:** Ensure text-based channel for caching messages (#7755) ([25fdb38](https://github.com/discordjs/discord.js/commit/25fdb3894d33dc395a376a3d962a063eb5735253))
+- Pass `force` correctly (#7721) ([402514f](https://github.com/discordjs/discord.js/commit/402514ff323ccf1f8c95d295f044cf0bb5547c2e))
+- Support reason in setRTCRegion helpers (#7723) ([905a6a1](https://github.com/discordjs/discord.js/commit/905a6a11663f9469ada67f8310a969453ffc5b2a))
+- **GuildMemberManager:** Return type can be null (#7680) ([74bf7d5](https://github.com/discordjs/discord.js/commit/74bf7d57ab959eb820ab1c213ac86ab1ea660398))
+- **gateway:** Use version 10 (#7689) ([8880de0](https://github.com/discordjs/discord.js/commit/8880de0cecdf273fd6df23988e4cb77774a75390))
+- Audit log static reference (#7703) ([85e531f](https://github.com/discordjs/discord.js/commit/85e531f22d7a8f8ad043647ce445726ae0df26c0))
+- Handle possibly missing property (#7641) ([0c32332](https://github.com/discordjs/discord.js/commit/0c32332a5aacbbb6c415da75c166d09cfdb34bbd))
+- **util:** Allow `escapeInlineCode` to escape double backtics (#7638) ([d5369a5](https://github.com/discordjs/discord.js/commit/d5369a56e3fcf50513f3bc582552c2838b04d199))
+- **GuildEditData:** Some fields can be null (#7632) ([4d2b559](https://github.com/discordjs/discord.js/commit/4d2b55955d1a3ff05c3047599232becdc3f2c445))
+- TOKEN_INVALID error not thrown at login with invalid token (#7630) ([cd79bef](https://github.com/discordjs/discord.js/commit/cd79bef2547594f4d0c744faa8fa67fb9fd61526))
+- **GuildScheduledEvent:** Handle missing `image` (#7625) ([c684ac5](https://github.com/discordjs/discord.js/commit/c684ac55e1d225740e67ab7bd5643de1b35f4594))
+- **guild:** Throw if ownerId falsey (#7575) ([98177aa](https://github.com/discordjs/discord.js/commit/98177aa38d3d6516d4c5354d6c7edea925dc881d))
+- Remove Modal export (#7654) ([87a6b84](https://github.com/discordjs/discord.js/commit/87a6b8445bfbf3981cd39813fe961dfa1c7f2bce))
+- **Embed:** Fix incorrect destructuring import (#7615) ([cbdb408](https://github.com/discordjs/discord.js/commit/cbdb408dffd1c7f2193c15989528a3de5fd9f13a))
+- **ThreadMembersUpdate:** Only emit added & removed thread members (#7539) ([c12d61a](https://github.com/discordjs/discord.js/commit/c12d61a3421afcdc41f77c0fddde4efbb257fa69))
+- **Util:** EscapeInlineCode properly (#7587) ([851f380](https://github.com/discordjs/discord.js/commit/851f380eb10d23ffd08e8b845aed4039abbcd03b))
+- **GuildStickerManager:** Correctly access guild ID (#7605) ([4b08d9b](https://github.com/discordjs/discord.js/commit/4b08d9b376bda7a7f4bb3fb8c555d25cca648de4))
+- **MessageManager:** Pin route (#7610) ([cb566c8](https://github.com/discordjs/discord.js/commit/cb566c8b6abff489a944db7952e5c5a48e0c98b0))
+- Handle partial data for `Typing#user` (#7542) ([c6cb5e9](https://github.com/discordjs/discord.js/commit/c6cb5e9ebbf46d81404119a6aa11bb8ebb17d5a4))
+- **guild:** Fix typo accessing user instead of users (#7537) ([8203c5d](https://github.com/discordjs/discord.js/commit/8203c5d843f2431c0f49023282f1bf73d85881d1))
+- **test:** `MessageActionRow` to `ActionRow` (#7523) ([d1d1b07](https://github.com/discordjs/discord.js/commit/d1d1b076bebf7cb706b2436a40d87c6efaed1e1d))
+- **MessagePayload:** Don't set reply flags to target flags (#7514) ([4f30652](https://github.com/discordjs/discord.js/commit/4f306521d829fef21ebd70557b37f8199b82572b))
+- **invite:** Add back channelId property (#7501) ([78aa36f](https://github.com/discordjs/discord.js/commit/78aa36f9f5913b86c82376ecdf20653b15340bbe))
+- Properly serialize `undefined` values (#7497) ([8dbd345](https://github.com/discordjs/discord.js/commit/8dbd34544cbeb499282f01dda9d35ed9bca93591))
+- Allow unsafe embeds to be serialized (#7494) ([942ea1a](https://github.com/discordjs/discord.js/commit/942ea1acbfb49289ccb3a1882b5a2da0a7d0bccf))
+- Attachment types (#7478) ([395a68f](https://github.com/discordjs/discord.js/commit/395a68ff49c622d5136d6b775beaf8e88a2d8610))
+- Use case converter for json component serialization (#7464) ([2d45544](https://github.com/discordjs/discord.js/commit/2d4554440ed9329a5876a9c674c3eb2de0f2f917))
+- **GuildAuditLogs:** Typings and consistency (#7445) ([c1b27f8](https://github.com/discordjs/discord.js/commit/c1b27f8eed8ea04a48bc106453892bddcdc6b73e))
+- **dataresolver:** Ensure fetched file is convert to a buffer (#7457) ([9311fa7](https://github.com/discordjs/discord.js/commit/9311fa7b42b2b5a74e411aa263daa4fbfc270645))
+- **messagepayload:** ResolveFile property names (#7458) ([a8106f7](https://github.com/discordjs/discord.js/commit/a8106f7c586f0ecac76e7f72c53b0da215a6fbf1))
+- **ci:** Ci error (#7454) ([0af9bc8](https://github.com/discordjs/discord.js/commit/0af9bc841ffe1a297d308500d696bad4b85abda9))
+- **threads:** Require being sendable to be unarchivable (#7406) ([861f0e2](https://github.com/discordjs/discord.js/commit/861f0e2134662ab64a11d313130aff58b413d495))
+- **guildmember:** Check if member has administrator permission (#7384) ([81d8b54](https://github.com/discordjs/discord.js/commit/81d8b54ff6b98b0e7ee2c57eaee6bc0b707e135a))
+- **guild:** Remove `maximumPresences` default value (#7440) ([55b388a](https://github.com/discordjs/discord.js/commit/55b388a763dc7223e88b62ae928fe85fe8b8fe58))
+- **guildchannelmanager:** Edit always sets parent to null (#7446) ([b97aedd](https://github.com/discordjs/discord.js/commit/b97aedd8e15f9358960cb59403f3a8ea24b87141))
+- **guildmember:** Make `pending` nullable (#7401) ([fe11ff5](https://github.com/discordjs/discord.js/commit/fe11ff5f6e85571a981e90eba5b9f3bda7a2cd04))
+- **clientpresence:** Fix used opcodes (#7415) ([a921ec7](https://github.com/discordjs/discord.js/commit/a921ec7dc525c58d40b4678e66270f9238abed31))
+- Correctly export UnsafeSelectMenuComponent from builders (#7421) ([aadfbda](https://github.com/discordjs/discord.js/commit/aadfbda586d57a7b775ad26c201f0dc34618180b))
+- MessageReaction.me being false when it shouldn't (#7378) ([04502ce](https://github.com/discordjs/discord.js/commit/04502ce702da53c4b00bf391d0fd936746851381))
+- Fix some typos (#7393) ([92a04f4](https://github.com/discordjs/discord.js/commit/92a04f4d98f6c6760214034cc8f5a1eaa78893c7))
+- **messagementions:** Fix `has` method (#7292) ([3a5ab2c](https://github.com/discordjs/discord.js/commit/3a5ab2c4e54de4e67ab6e323d7eac86482da7382))
+- **guildmembermanager:** Use rest in edit (#7356) ([00ce1c5](https://github.com/discordjs/discord.js/commit/00ce1c56ac224691a8691a3525cb14ae002319c6))
+- **typings:** Mark `RESTOptions` as Partial in `ClientOptions` (#7349) ([e1ecc1a](https://github.com/discordjs/discord.js/commit/e1ecc1a80a9358cdbafbe8542c40b9de8cad467e))
+- **Webhook:** Use correct method name (#7348) ([11e5e5a](https://github.com/discordjs/discord.js/commit/11e5e5ac5b70138f56332eb3e61a42443670b0de))
+- **thread:** Don't assign directly to getters (#7346) ([2db0cdd](https://github.com/discordjs/discord.js/commit/2db0cdd357c3a02decb4fd4168db87888efba283))
+- Missed enums and typings from #7290 (#7331) ([47633f0](https://github.com/discordjs/discord.js/commit/47633f0fd2435d6d8c694d8d37b26039a7b3797a))
+- **guildchannelmanager:** Remove reverse enum lookup (#7304) ([857bba4](https://github.com/discordjs/discord.js/commit/857bba448029f3f070c67fb40b59a3a2a2e5c6f4))
+- Import `clear{Timeout,Interval}` from `node:timers` (#7269) ([8ddd44e](https://github.com/discordjs/discord.js/commit/8ddd44ed85b32c86243efe0ec35b283eaaa8212c))
+- **ApplicationCommand:** Use new ApplicationCommandOptionType enums (#7257) ([06f5210](https://github.com/discordjs/discord.js/commit/06f5210f58bbba6102173033a9f1e6fb004fdf5d))
+- Use enums from discord-api-types (#7258) ([f284a46](https://github.com/discordjs/discord.js/commit/f284a4641fd68de9190bda97ec1eab0981149630))
+- **exports:** Export ApplicationCommandType properly (#7256) ([f753882](https://github.com/discordjs/discord.js/commit/f75388259262bf6b4a64375b97800bd72378f3bc))
+- **Shard:** EventEmitter listener warning (#7240) ([ff3a8b8](https://github.com/discordjs/discord.js/commit/ff3a8b83234d3826fc49c5a8c3cb52ef9f281ffd))
+- **timestamps:** Account for timestamps of 0 when creating Dates (#7226) ([a8509c9](https://github.com/discordjs/discord.js/commit/a8509c91ca0147393b407221405b6b917677961a))
+- **MessageEmbed:** CreatedAt field can be zero (#7218) ([37cad54](https://github.com/discordjs/discord.js/commit/37cad54dbdade39607397b8ad697eca94f1b7197))
+- **BaseClient:** Do not append default options if provided is not an object (#6453) ([b92a7d7](https://github.com/discordjs/discord.js/commit/b92a7d72332c35b607db54aa6aca24b8e10e00ad))
+- Snowflakeutil import (#7219) ([962f4bf](https://github.com/discordjs/discord.js/commit/962f4bf88211dbfb5ad0295a9467dede1e2688ee))
+- **Role:** Remove unused process (#7215) ([63034b4](https://github.com/discordjs/discord.js/commit/63034b44c9849087e391684d9b6c0c6ae9a21113))
+- **WebhookClient:** Updated webhook url regex (#6804) ([1c615d1](https://github.com/discordjs/discord.js/commit/1c615d1bb2606d5f19e55076d4ecab95c619518e))
+- **Sweepers:** Add sweepStickers function (#7213) ([95f8375](https://github.com/discordjs/discord.js/commit/95f8375d425f58f501f32ead03f7927e6596f8e6))
+- **InteractionCreate:** Use ChatInputCommandInteraction instead (#7210) ([49dada3](https://github.com/discordjs/discord.js/commit/49dada35f92470d3e4426362510847b93dd42d1a))
+- **Structues:** Rename old module's name (#7207) ([fbef454](https://github.com/discordjs/discord.js/commit/fbef45489457a2198357dc4dd303740d79036784))
+- **WebSocket:** Remove application command handler (#7202) ([033151c](https://github.com/discordjs/discord.js/commit/033151cf92fe43536b8a4c0f4d7d9ed75a2095c5))
+- **User:** `bannerURL()` should not throw when not present (#6789) ([3872acf](https://github.com/discordjs/discord.js/commit/3872acfeb8390f6f7202d69cf1f7f8616a7b0b34))
+- **VoiceState:** Ensure `suppress` & `streaming` have proper fallback values (#6377) ([a0d5f13](https://github.com/discordjs/discord.js/commit/a0d5f13dd9b27c44f5183a2a9af4c4fdecb312c0))
+- **sweepers:** Provide default for object param (#7182) ([ae2f013](https://github.com/discordjs/discord.js/commit/ae2f013653c8a9f9ffb12ae8fcdb1bb604b39236))
+
+## Deprecation
+
+- **Caching:** Clean up deprecated cache sweeping (#7118) ([12ffa06](https://github.com/discordjs/discord.js/commit/12ffa069aa8b247e945fef16a543f41c2c391bf1))
+
+## Documentation
+
+- Align webhook method return types with implementation (#8253) ([5aeed99](https://github.com/discordjs/discord.js/commit/5aeed9935058241648507d7f651679226a89dbb3))
+- Remove `@private` constructor documentation (#8255) ([452dec5](https://github.com/discordjs/discord.js/commit/452dec57ca422f5e7424a0f0e78c3e152717f413))
+- **ApplicationCommand:** Add `min_length` and `max_length` to ApplicationCommandOptionData (#8239) ([43f62bb](https://github.com/discordjs/discord.js/commit/43f62bb6678ec332795c8cfbe0c01854b95aa61e))
+- **MessageInteraction#commandName:** Updated description (#8212) ([ab238a9](https://github.com/discordjs/discord.js/commit/ab238a9046e0201dbd4755fa41fa69c44b186912))
+- Add missing `@extends` (#8205) ([e0c8282](https://github.com/discordjs/discord.js/commit/e0c82824905dcebf62c2d1afcc5e5590a5594838))
+- **Constants:** Fix SweeperKeys type (#8157) ([af04992](https://github.com/discordjs/discord.js/commit/af04992ed3c2617fda686c2bc7338dcada283dc6))
+- **Channels:** Internally document channel creation (#8154) ([5e5853a](https://github.com/discordjs/discord.js/commit/5e5853a4e885c47e3dde519761dd59a5ec0e06fc))
+- Update threads to use `ThreadAutoArchiveDuration` (#8153) ([ee36d60](https://github.com/discordjs/discord.js/commit/ee36d60dc6714c83569a20716fa8ca8e1bd7de4f))
+- **APITypes:** Remove duplicate type definition (#8144) ([a061233](https://github.com/discordjs/discord.js/commit/a0612335101c7ce2a07d95da4b79f0d4a2b1a6a0))
+- Document missing type definitions (#8130) ([203bc4a](https://github.com/discordjs/discord.js/commit/203bc4a2cf0c2d90a003093318aa0741605610f5))
+- **InteractionResponse:** Fix return (#8141) ([f1ac17c](https://github.com/discordjs/discord.js/commit/f1ac17c961cf95d99e205133605d10d8be5bd737))
+- **PermissionsBitField:** Fix `@name` of bitfield (#8115) ([3a77ce0](https://github.com/discordjs/discord.js/commit/3a77ce0b18c60a0b21ba088590ff89f2ace94087))
+- `TextBasedChannel` -> `TextBasedChannels` typos (#8110) ([db663a5](https://github.com/discordjs/discord.js/commit/db663a55c2ed2faf61e217009158da50dfcf274f))
+- Remove `number`s from enums (#8098) ([0a138da](https://github.com/discordjs/discord.js/commit/0a138dab95a86512f08ac3be356f77f38f2ea880))
+- **GuildAuditLogs:** Fix and reimplement type definitions (#8108) ([4155136](https://github.com/discordjs/discord.js/commit/415513696c7b7e139d1b958e480bf0c7e4d14111))
+- **WebSocketOptions:** Add `version` to docs and typings (#8050) ([386c41f](https://github.com/discordjs/discord.js/commit/386c41f24fb3c9d06967d9c1881a57645c3a71f2))
+- **BaseGuildTextChannel:** Update `setType()`'s parameter type (#8088) ([9c0f190](https://github.com/discordjs/discord.js/commit/9c0f190de1f743d9bd597ffd656503c672db71c1))
+- Update outdated examples (#8081) ([51eadf3](https://github.com/discordjs/discord.js/commit/51eadf37371a6138847efdb4b5b81ee132001cf0))
+- **ThreadMemberManager:** Require `member` in `FetchThreadMemberOptions` (#8079) ([552ec72](https://github.com/discordjs/discord.js/commit/552ec72542ec3b2b3ebf35c9fd84ab502dd746cf))
+- **AutocompleteInteraction:** Change useless log in responds example (#8077) ([ac7bf69](https://github.com/discordjs/discord.js/commit/ac7bf692bfce8204e278205dde811515a51f154b))
+- Description and missing `@typedef` fixes (#8087) ([a2eebf6](https://github.com/discordjs/discord.js/commit/a2eebf6c66f3e4c96ece9d2ae2a1133c84257f42))
+- Ignore docs of unexported functions (#8051) ([94bdcac](https://github.com/discordjs/discord.js/commit/94bdcaca62414a77d4ee0b8b79752a2be937320b))
+- **ClientOptions:** Fix closeTimeout default (#8049) ([b2eea1c](https://github.com/discordjs/discord.js/commit/b2eea1c900ba73d4b98b72f5c196f51e27d3ab8f))
+- **DirectoryChannel:** Extend `Channel` (#8022) ([f3f34f0](https://github.com/discordjs/discord.js/commit/f3f34f07b3b396015b130b8e9d938a3eec688fc3))
+- **Attachment:** Remove constructor doc (#8009) ([0a7953e](https://github.com/discordjs/discord.js/commit/0a7953e46310c77483d277539b47f1a7ab051fd9))
+- **VoiceChannel:** Annotate that it is implementing TextBasedChannel (#8007) ([5987dbe](https://github.com/discordjs/discord.js/commit/5987dbe5cff6991ae6905b0387411fa042d3e9b7))
+- Add missing discord-api-types external types (#8001) ([546d486](https://github.com/discordjs/discord.js/commit/546d48655f36ed9a6c6c5ce3c2eabcca1a86a945))
+- **InteractionResponses:** Replace outdated Embed example for reply (#7875) ([d308c66](https://github.com/discordjs/discord.js/commit/d308c66eeca6bdc3471637ae3aaaaa0a2f5c9989))
+- Require parameter (#7838) ([f4ccc67](https://github.com/discordjs/discord.js/commit/f4ccc6772c15e32489ca22fb2c3e803b85d4dbf9))
+- **ApplicationCommand:** Fix and improve localization docs (#7804) ([61a44c5](https://github.com/discordjs/discord.js/commit/61a44c509c40abaf7ffb95b10942889cbbf155ac))
+- **ApplicationCommand:** Fix ApplicationCommandOptionChoice (#7794) ([f1d0084](https://github.com/discordjs/discord.js/commit/f1d0084da26b0111ca029c789ad9e8e6c2882b4d))
+- Add back static properties and methods (#7706) ([520f471](https://github.com/discordjs/discord.js/commit/520f471ac56cbc01402b79197333a8a34c4ac5c9))
+- **InteractionCollector:** Document channel option type (#7551) ([e787cd5](https://github.com/discordjs/discord.js/commit/e787cd5fa5d013319347392ee4f799a677f6f512))
+- Correctly type getters (#7500) ([ffecf08](https://github.com/discordjs/discord.js/commit/ffecf084956f954cf10e1b844e00326e443a86f2))
+- ApplicationCommandData typedef (#7389) ([d32db88](https://github.com/discordjs/discord.js/commit/d32db8833e1058fb36f2e83af79d5353a9f2f693))
+- **channel:** Fix `isDMBased` docs (#7411) ([f2a7a9f](https://github.com/discordjs/discord.js/commit/f2a7a9f1b30af272a6a8d81825d09f84e749cc24))
+- **messageattachment:** Fix `contentType` docs (#7413) ([2800e07](https://github.com/discordjs/discord.js/commit/2800e07e5974e07b9f8ce043722b9b99a5bcc80d))
+- Add supported option types for autocomplete (#7368) ([8bb3751](https://github.com/discordjs/discord.js/commit/8bb37513400d646d784d59875d6b6a6ec10160cd))
+- Add external builder docs links (#7390) ([0b866c9](https://github.com/discordjs/discord.js/commit/0b866c9fb284971113e288e52327d4506db28011))
+- Add EnumResolvers (#7353) ([72767a1](https://github.com/discordjs/discord.js/commit/72767a1059526bdf617e80d5a9e5da1fbd2936d3))
+- **locales:** Update Discord API docs link (#7266) ([b640272](https://github.com/discordjs/discord.js/commit/b6402723c31bed3c49f8b8cde873b65b9f373fd7))
+- **StageInstance:** Deprecate discoverableDisabled (#7179) ([bd33ebb](https://github.com/discordjs/discord.js/commit/bd33ebb507eab36bc2219103dbd1e0217b9f38c0))
+- **shardingmanager:** Fix type of `execArgv` option (#7284) ([e65da44](https://github.com/discordjs/discord.js/commit/e65da44d9c564d1ffcb0f4df2bcdaf0ce0636f35))
+- **interaction:** Add locale list link (#7261) ([37ec0bd](https://github.com/discordjs/discord.js/commit/37ec0bda6df75fb1dc69b7a1eafbb8ea19e68457))
+- Fix a typo and use milliseconds instead of ms (#7251) ([0dd56af](https://github.com/discordjs/discord.js/commit/0dd56afe1cdf16f1e7d9afe1f8c29c31d1833a25))
+- Fix command interaction docs (#7212) ([137ea24](https://github.com/discordjs/discord.js/commit/137ea249df3aa6b8375ecb42aa456a6fdb811f19))
+- **TextBasedChannel:** Fixed syntax error in examples (#7163) ([b454740](https://github.com/discordjs/discord.js/commit/b454740ae87b6c3c13536181965519c7277e5840))
+- **TextBasedChannel:** Fix #createMessageComponentCollector description (#7168) ([d4e6e03](https://github.com/discordjs/discord.js/commit/d4e6e0370857dff00185d59faf8aaac12b343a7a))
+- Fixes the examples for kick and ban (#7170) ([db669b8](https://github.com/discordjs/discord.js/commit/db669b897132ec458d50ca6c1e3afa761e98ffc3))
+- **RoleManager:** Fix incorrect example (#7174) ([f79ea67](https://github.com/discordjs/discord.js/commit/f79ea67d3a9ba134a9acef0a443bd089c4e173a6))
+
+## Features
+
+- **builder:** Add max min length in string option (#8214) ([96c8d21](https://github.com/discordjs/discord.js/commit/96c8d21f95eb366c46ae23505ba9054f44821b25))
+- **applicationCommand:** Add max min length in string option (#8215) ([94ee60d](https://github.com/discordjs/discord.js/commit/94ee60d3d438f6657bdef51471528769af09624c))
+- Add website documentation early mvp (#8183) ([d95197c](https://github.com/discordjs/discord.js/commit/d95197cc78593df4d0a8d1cc492b0e41b4ab58b8))
+- **BaseInteraction:** Add support for `app_permissions` (#8194) ([002d6a5](https://github.com/discordjs/discord.js/commit/002d6a5aede3d1c0e08bd58eeef38a3b9202f525))
+- **util:** ParseWebhookURL (#8166) ([c4653f9](https://github.com/discordjs/discord.js/commit/c4653f97b1529eb0b99fccdba67c37eb4f467ff9))
+- **AutocompleteInteraction:** Add `commandGuildId` (#8086) ([10a6c42](https://github.com/discordjs/discord.js/commit/10a6c4287dd45a30290814e50fa29a086f85da02))
+- **guild:** Add support for setting MFA level (#8024) ([c5176be](https://github.com/discordjs/discord.js/commit/c5176be14b697ff506eb973c4119644eab544304))
+- **vcs:** Add missing property and methods (#8002) ([0415300](https://github.com/discordjs/discord.js/commit/0415300243877ddbcb501c0a26b1ff65618a1da7))
+- **docgen:** Update typedoc ([b3346f4](https://github.com/discordjs/discord.js/commit/b3346f4b9b3d4f96443506643d4631dc1c6d7b21))
+- Website (#8043) ([127931d](https://github.com/discordjs/discord.js/commit/127931d1df7a2a5c27923c2f2151dbf3824e50cc))
+- Docgen package (#8029) ([8b979c0](https://github.com/discordjs/discord.js/commit/8b979c0245c42fd824d8e98745ee869f5360fc86))
+- Backport handle zombie connection (#7626) ([e1176fa](https://github.com/discordjs/discord.js/commit/e1176faa27898d4f127c293c099201cb294e10ee))
+- **CommandInteraction:** Add 'commandGuildId' (#8018) ([aa59a40](https://github.com/discordjs/discord.js/commit/aa59a409b36c7ef7018d1785d2dba4da17b57864))
+- Allow builders to accept rest params and arrays (#7874) ([ad75be9](https://github.com/discordjs/discord.js/commit/ad75be9a9cf90c8624495df99b75177e6c24022f))
+- **MessageReaction:** Add react method (#7810) ([a328778](https://github.com/discordjs/discord.js/commit/a3287782b57c28b94c390c24e7d5f2d8c303301f))
+- **Collector:** Add `ignore` event (#7644) ([5244fe3](https://github.com/discordjs/discord.js/commit/5244fe3c1cd400985b00e95d8e5ec73823cf4f25))
+- **GuildMemberManager:** Add `GuildMemberManager#fetchMe()` (#7526) ([349766d](https://github.com/discordjs/discord.js/commit/349766dd6925e2d5e5597cc78c73e46f17c56eab))
+- **guildChannelManager:** Add `videoQualityMode` option for `create()` (#7980) ([cdd2ba0](https://github.com/discordjs/discord.js/commit/cdd2ba036ab1559783eb067786c52aff61807557))
+- **EnumResolvers:** Remove Enumresolvers (#7876) ([76694c1](https://github.com/discordjs/discord.js/commit/76694c1497de1b083a792fd1fda20f0eace50c48))
+- Move `me` to `GuildMemberManager` manager (#7669) ([aed687b](https://github.com/discordjs/discord.js/commit/aed687b09f87862eb2f33fb9f95b2cbd0b770585))
+- **rest:** Use undici (#7747) ([d1ec8c3](https://github.com/discordjs/discord.js/commit/d1ec8c37ffb7fe3b63eaa8c382f22ca1fb348c9b))
+- **VoiceChannel:** Add support for text in voice (#6921) ([4ba0f56](https://github.com/discordjs/discord.js/commit/4ba0f56b6af64bac30eea807fb3e9f3c41c3c83c))
+- **SelectMenu:** Allow emojis in options and option constructors (#7797) ([f22245e](https://github.com/discordjs/discord.js/commit/f22245e9d072ac4ef63b0ae0d84d5ba94608ce22))
+- Allow `createMessageComponentCollector` without using `fetchReply` (#7623) ([a58556a](https://github.com/discordjs/discord.js/commit/a58556adc02b2b9239c8f277a4387c743c9d6f04))
+- Add guild directory support (#6788) ([b01f414](https://github.com/discordjs/discord.js/commit/b01f4147d4f3bca021bc269c9f06463f06e3db53))
+- **GuildBanManager:** Support pagination results (#7734) ([fc2a8bb](https://github.com/discordjs/discord.js/commit/fc2a8bb6750919ecd6ee7c872df05f4b677ff5d3))
+- **CommandInteraction:** Add support for localized slash commands (#7684) ([01a423d](https://github.com/discordjs/discord.js/commit/01a423d110cfcddb3d794fcc32579a1547dd472d))
+- Allow emoji strings to be passed through constructors (#7718) ([0faac04](https://github.com/discordjs/discord.js/commit/0faac04b69f1dda3dc860cd584af100e36a40917))
+- **StageInstanceManager:** Add `sendStartNotification` option to create (#7730) ([29f8807](https://github.com/discordjs/discord.js/commit/29f88079559cc02ccfef7a7c16458d481e573fb5))
+- Add `makeURLSearchParams` utility function (#7744) ([8eaec11](https://github.com/discordjs/discord.js/commit/8eaec114a98026024c21545988860c123948c55d))
+- **modal:** Add `awaitModalSubmit` (#7751) ([3037fca](https://github.com/discordjs/discord.js/commit/3037fca196a0f9238d53bb51394daf737bbf3742))
+- **Actions:** Add parent structure to events parameters (#7577) ([3f3e432](https://github.com/discordjs/discord.js/commit/3f3e4327c86da86734c19a96e97115bd505b4532))
+- Export `UnsafeModalBuilder` and `UnsafeTextInputBuilder` (#7628) ([6fec252](https://github.com/discordjs/discord.js/commit/6fec25239dfed46a30826d38dc97f3680f24ec65))
+- **VoiceChannel:** Support `video_quality_mode` (#7722) ([3b3dabf](https://github.com/discordjs/discord.js/commit/3b3dabf3da2e2f24b81967d68b581d7f7452273f))
+- Add API v10 support (#7477) ([72577c4](https://github.com/discordjs/discord.js/commit/72577c4bfd02524a27afb6ff4aebba9301a690d3))
+- **embed:** Remove Embed.setColor (#7662) ([9b0d8cb](https://github.com/discordjs/discord.js/commit/9b0d8cb2d8f7b55753de584eb3a3f347f87596c2))
+- **StageInstance:** Add support for associated guild event (#7576) ([3dff31f](https://github.com/discordjs/discord.js/commit/3dff31f63fe4afdcc818193d737e1917f1ac8105))
+- **VoiceState:** Add edit method (#7569) ([b162f27](https://github.com/discordjs/discord.js/commit/b162f27e46524bfc64515969d753c6e8f30e6c40))
+- **ModalSubmitInteraction:** Add boolean properties (#7596) ([8907390](https://github.com/discordjs/discord.js/commit/89073903a253d9408839573502c72cae93fe70b6))
+- Add Modals and Text Inputs (#7023) ([ed92015](https://github.com/discordjs/discord.js/commit/ed920156344233241a21b0c0b99736a3a855c23c))
+- **discord.js:** Partial transition to undici (#7482) ([5158332](https://github.com/discordjs/discord.js/commit/51583320d3b0f6452cd96bad1021f2a57e4cc6f6))
+- **message:** Add `reason` on pin and unpin (#7520) ([00728f7](https://github.com/discordjs/discord.js/commit/00728f72b36123b607502624b4b02a02ee524d4a))
+- Re-export AuditLogEvent enum (#7528) ([6a2fa70](https://github.com/discordjs/discord.js/commit/6a2fa70b8e79a460be38916eeb605976ad6fe68b))
+- **options:** Add support for custom JSON transformers (#7476) ([dee27db](https://github.com/discordjs/discord.js/commit/dee27db35af379b0835f9fd5cc19563f7bf3dfc0))
+- Add CategoryChannelChildManager (#7320) ([5cf5071](https://github.com/discordjs/discord.js/commit/5cf5071061760c2f9c1e36d7648aef544b03323a))
+ - **Co-authored-by:** Antonio Román <kyradiscord@gmail.com>
+- Attachment application command option type (#7200) ([0034396](https://github.com/discordjs/discord.js/commit/003439671d359dcfe481446ef12b90bd71c57835))
+- **builders:** Add attachment command option type (#7203) ([ae0f35f](https://github.com/discordjs/discord.js/commit/ae0f35f51d68dfa5a7dc43d161ef9365171debdb))
+- **scheduledevents:** Add image option (#7436) ([fbc71ef](https://github.com/discordjs/discord.js/commit/fbc71ef6b668c4b1e2b065d9b65541d9303db0a0))
+- Add methods to managers (#7300) ([dd751ae](https://github.com/discordjs/discord.js/commit/dd751ae19da196cc2f90ccd35c7d8e99878daaf9))
+- **channel:** Add .url getter (#7402) ([f59d630](https://github.com/discordjs/discord.js/commit/f59d6305cb0cd0d154a909f18be76407c4d452d3))
+- **components:** Add unsafe message component builders (#7387) ([6b6222b](https://github.com/discordjs/discord.js/commit/6b6222bf513d1ee8cd98fba0ad313def560b864f))
+- **thread:** Add `newlyCreated` to `threadCreate` event (#7386) ([51beda5](https://github.com/discordjs/discord.js/commit/51beda56f74e44ed013b5d25044b8d5fd1978b29))
+- **channel:** Add isDMBased typeguard (#7362) ([388f535](https://github.com/discordjs/discord.js/commit/388f53550cca7ded7350a050fda03c36e4c1fdf7))
+- **`Interaction`:** Add `.commandType` property to `CommandInteraction` and `AutocompleteInteraction` (#7357) ([567db60](https://github.com/discordjs/discord.js/commit/567db60475c8704661b2e788c9905ef364d6c00c))
+- **scheduledevent:** Add support for event cover images (#7337) ([355f579](https://github.com/discordjs/discord.js/commit/355f579771771a28a293c327a38574c8918d18f8))
+- **enumResolvers:** Strengthen typings (#7344) ([9a566e8](https://github.com/discordjs/discord.js/commit/9a566e8068f28fce87c07861ef1d2877c6ae105f))
+- Allow setting message flags when sending (#7312) ([706db92](https://github.com/discordjs/discord.js/commit/706db9228a91ef42e49d2ec749eac153b9ef75d0))
+- **minor:** Add application_id to Webhook (#7317) ([5ccdb0a](https://github.com/discordjs/discord.js/commit/5ccdb0ab266e4f74c331386ac2d6dd32bc225c62))
+- **threadchannel:** Add `createdTimestamp` field (#7306) ([9a16234](https://github.com/discordjs/discord.js/commit/9a1623425ae2d69f5c16f0096af4951ff5096e80))
+- **GuildPreview:** Add stickers (#7152) ([cf25de9](https://github.com/discordjs/discord.js/commit/cf25de9373df98b3c1cd0ca0a092d9dc8172929d))
+- Enum resolvers & internal enum string removal (#7290) ([213acd7](https://github.com/discordjs/discord.js/commit/213acd799738b888d550cdf3f08906764f8288e0))
+- **guildemojimanager:** Add `delete` and `edit` methods (#7286) ([9181a31](https://github.com/discordjs/discord.js/commit/9181a31e0ba330502052c94da544bb15c8b66f11))
+- **interaction:** Add `isRepliable` type guard (#7259) ([da05a88](https://github.com/discordjs/discord.js/commit/da05a8856b11cc1bf0df424c88a1cf9573e5b654))
+- **Channel:** Improve typeguards (#6957) ([37a22e0](https://github.com/discordjs/discord.js/commit/37a22e04c27724c2a65b05c701e3000ba3653ba1))
+- Add Locales to Interactions (#7131) ([9052e32](https://github.com/discordjs/discord.js/commit/9052e321d1c9c8841962d4e8dc5d9e060b104438))
+- **Permissions:** Remove deprecated thread-related permissions (#6755) ([ab3ff5a](https://github.com/discordjs/discord.js/commit/ab3ff5a262caf7d6225b8d6b54ab2c6b6613c0d0))
+- **VoiceRegion:** Remove the unsent vip field (#6759) ([caaef53](https://github.com/discordjs/discord.js/commit/caaef53dd97ecac9f714072ddba5ae9a99ab1027))
+- **richpresenceassets:** Add YouTube and custom image support (#7184) ([d06d70c](https://github.com/discordjs/discord.js/commit/d06d70ccf26c04c1122fac8430922588a489f95e))
+- **Collector:** Yield all collected values (#7073) ([2b480cb](https://github.com/discordjs/discord.js/commit/2b480cb14e6f52855efcb372da7fb455c15b13b1))
+
+## Refactor
+
+- **Util:** Rename `fetchRecommendedShards` (#8298) ([cafde77](https://github.com/discordjs/discord.js/commit/cafde77d73452d729ba8e2cb1cac3f14235b889b))
+- **Embed:** Add all the types (#8254) ([64f8140](https://github.com/discordjs/discord.js/commit/64f814066cc4adebaca47eb8d7a2040a8df399ae))
+- **rest:** Add content-type(s) to uploads (#8290) ([103a358](https://github.com/discordjs/discord.js/commit/103a3584c95a7b7f57fa62d47b86520d5ec32303))
+- Make `GuildAuditLogsEntry.action` return an `AuditLogEvent` (#8256) ([f0b68d5](https://github.com/discordjs/discord.js/commit/f0b68d57368d7ac3db97925df68c11a945ccd84c))
+- **builder:** Remove `unsafe*Builder`s (#8074) ([a4d1862](https://github.com/discordjs/discord.js/commit/a4d18629828234f43f03d1bd4851d4b727c6903b))
+- Make `ShardEvents` the events of `Shard` (#8185) ([c5750d5](https://github.com/discordjs/discord.js/commit/c5750d59f529ab48a5bc88a73a1c449ef6ddbffd))
+- **Util:** Make single `replace` call in `cleanContent` (#8210) ([6b20645](https://github.com/discordjs/discord.js/commit/6b206457400ce31d566b02a0c135042afb540853))
+- **ApplicationCommandManager:** Use `makeURLSearchParams` (#8196) ([cb3dca4](https://github.com/discordjs/discord.js/commit/cb3dca4ae029724421f3d04a784ace0ae2de75e2))
+- Use `Base` prefix for channel and interaction base classes (#8099) ([e24970e](https://github.com/discordjs/discord.js/commit/e24970e3c3d24f71ba711e59666cd8a49a33e33b))
+- **Constants:** Remove leftover code (#8156) ([cd17aad](https://github.com/discordjs/discord.js/commit/cd17aad720430d23af51c364caeb8b22bf6cb6b5))
+- Errors (#8068) ([e68effa](https://github.com/discordjs/discord.js/commit/e68effa822f064a324ed5b92e797c9fc3ce5e211))
+- **ClientOptions:** Remove `$` prefix from `ws.properties` keys (#8094) ([90a98fe](https://github.com/discordjs/discord.js/commit/90a98fee16b7d1d06768461f4e85127c0edf8419))
+- Use `GuildFeature` enum (#8101) ([e5ec1c4](https://github.com/discordjs/discord.js/commit/e5ec1c4dbc3fa54b2c43d1fec24932d7363e17cb))
+- **util:** Make utility functions top level (#8052) ([e53d162](https://github.com/discordjs/discord.js/commit/e53d1621986035b0c92a1782f6e013d408480e00))
+- **ApplicationCommand:** Permissions v2 (#7857) ([c7391db](https://github.com/discordjs/discord.js/commit/c7391db11b3efd4b1a6904affb26887ad06d6db4))
+- ***:** Include name/reason/etc fields into options/data params (#8026) ([9c8b310](https://github.com/discordjs/discord.js/commit/9c8b3102ce00d1f2c1255c150fb3030f8b6dd026))
+- **ThreadMemberManager:** Consistent thread member fetching (#8021) ([da9107c](https://github.com/discordjs/discord.js/commit/da9107c007536952107bd92943b6c714538d5aeb))
+- **interactions:** Remove redundant interaction typeguards (#8027) ([f57d676](https://github.com/discordjs/discord.js/commit/f57d6768ad24f6e37dc598f9c93709449d3bc4dd))
+- Move all the config files to root (#8033) ([769ea0b](https://github.com/discordjs/discord.js/commit/769ea0bfe78c4f1d413c6b397c604ffe91e39c6a))
+- **channel:** Remove redundant channel type guards (#8012) ([70c733b](https://github.com/discordjs/discord.js/commit/70c733bb9a5bde0f79e6bea0bdc416458bda4c06))
+- Always return `Message` instances in interactions (#7917) ([9720e55](https://github.com/discordjs/discord.js/commit/9720e555340431c3b3ad7bd670ad0ac7eee8865f))
+- **attachment:** Don't return attachment builders from API (#7852) ([dfadcbc](https://github.com/discordjs/discord.js/commit/dfadcbc2fd50be64c8a0c1cae3be10f83678c5ee))
+- Clean up modal submissions (#7994) ([643dab3](https://github.com/discordjs/discord.js/commit/643dab3b1b5305d002fcefed62755bbe11fc3267))
+- **ThreadChannel:** Remove `MAX` helper from threads (#7846) ([dfd9eb2](https://github.com/discordjs/discord.js/commit/dfd9eb20b2d3e0e7db26744b1f15134ac6eda139))
+- **Activity:** Remove undocumented properties (#7844) ([5ba7740](https://github.com/discordjs/discord.js/commit/5ba7740fcfefda1eeba81ace4e6351eac02522a4))
+- **MessageAttachment:** Use `Attachment` instead (#7691) ([ab4c608](https://github.com/discordjs/discord.js/commit/ab4c608b97ff319935e1a7f23564622bfd7ddd57))
+- **Util:** Remove splitting (#7780) ([54e5629](https://github.com/discordjs/discord.js/commit/54e56299865a6746744544ba25d5540a1166d27c))
+- Tidy up builders and components (#7711) ([96a0d83](https://github.com/discordjs/discord.js/commit/96a0d83a1366703ecae40b5e0d5171be9123d079))
+- Remove nickname parsing (#7736) ([78a3afc](https://github.com/discordjs/discord.js/commit/78a3afcd7fdac358e06764cc0d675e1215c785f3))
+- Remove store channels (#7634) ([aedddb8](https://github.com/discordjs/discord.js/commit/aedddb875e740e1f1bd77f06ce1b361fd3b7bc36))
+- **IntegrationApplication:** Remove `summary` (#7729) ([eb6b472](https://github.com/discordjs/discord.js/commit/eb6b472f72488cad7e96befccc00270cf6dc01b8))
+- **GuildAuditLogs:** Remove build (#7704) ([cedd053](https://github.com/discordjs/discord.js/commit/cedd0536baa1301984daf89dfda4e63a7be595a2))
+- **InteractionCollector:** Simplify constructor logic (#7667) ([07b23a9](https://github.com/discordjs/discord.js/commit/07b23a99c7088a7c740f23051f3f755f091519b0))
+- Remove undocumented checks (#7637) ([9a6e691](https://github.com/discordjs/discord.js/commit/9a6e691eaa6c3d133098b2734414590cb838de2e))
+- Allow builders to accept emoji strings (#7616) ([fb9a9c2](https://github.com/discordjs/discord.js/commit/fb9a9c221121ee1c7986f9c775b77b9691a0ae15))
+- Use `static` fields (#7701) ([e805777](https://github.com/discordjs/discord.js/commit/e805777a7a81d1dc7a2edd9741ecb04e685a3886))
+- **EmbedBuilder:** Allow hex strings in setColor (#7673) ([f472975](https://github.com/discordjs/discord.js/commit/f4729759f600372455f062c75859f084e23a5d78))
+- Don't return builders from API data (#7584) ([549716e](https://github.com/discordjs/discord.js/commit/549716e4fcec89ca81216a6d22aa8e623175e37a))
+- **embed:** Allow hex strings in `setColor()` (#7593) ([79d6c04](https://github.com/discordjs/discord.js/commit/79d6c0489c3d563fdd05de63c4fcf93a6deefce1))
+- **InteractionResponses:** Use ClientOptions.jsonTransformer (#7599) ([fac55bc](https://github.com/discordjs/discord.js/commit/fac55bcfd1e8b76aae1273415f74fa6de7aca66d))
+- Deprecate invite stage instance (#7437) ([d2bc9d4](https://github.com/discordjs/discord.js/commit/d2bc9d444f42a70a3c4cc4c68eb107bcaebec509))
+- **guild:** Move `premiumSubscriptionCount` to `AnonymousGuild` (#7451) ([6d3da22](https://github.com/discordjs/discord.js/commit/6d3da226d3c003d137639e719394a807330e4844))
+- **actions:** Use optional chaining (#7460) ([d1bb362](https://github.com/discordjs/discord.js/commit/d1bb36256f2f86022884e6ee9e05b0536cb6384d))
+- **guildbanmanager:** Rename days option to deleteMessageDays (#7447) ([0dfdb2c](https://github.com/discordjs/discord.js/commit/0dfdb2cf11e236e67dd34277108973b5b79790a8))
+- Make public builder props getters (#7422) ([e8252ed](https://github.com/discordjs/discord.js/commit/e8252ed3b981a4b7e4013f12efadd2f5d9318d3e))
+- Remove redundant API defaults (#7449) ([532846b](https://github.com/discordjs/discord.js/commit/532846b1f8260d85022a022d093553310052afc9))
+- Allow discord.js builders to accept camelCase (#7424) ([94bf727](https://github.com/discordjs/discord.js/commit/94bf727cc3a2f11c88e95cdb151b235f775cd1ca))
+- Replace `WSCodes`, `WSEvents`, and `InviteScopes` with `discord-api-types` equivalent (#7409) ([cc25455](https://github.com/discordjs/discord.js/commit/cc25455d2c75177e3eddc880b7fd53cb122387c4))
+- Make constants enums top level and `PascalCase` (#7379) ([d8184f9](https://github.com/discordjs/discord.js/commit/d8184f94dd08daab37195f52828e06af5ed1c1e0))
+- **`Bitfield`:** Use discord-api-types enums instead (#7313) ([fbb1d03](https://github.com/discordjs/discord.js/commit/fbb1d0328bcd517027ad2eedb8753d17489ed851))
+- Use `@discordjs/rest` (#7298) ([ec0fba1](https://github.com/discordjs/discord.js/commit/ec0fba1ed0d3c5b1bb18171ece6fe5ee42d48497))
+- Switch to /builders `Embed` (#7067) ([d2d3a80](https://github.com/discordjs/discord.js/commit/d2d3a80c556a104099a1ddb1b24f1b921c553257))
+- Remove transformPermissions (#7303) ([b4ed8fd](https://github.com/discordjs/discord.js/commit/b4ed8fd3ed953085cd908b2845d4384c8555d3a2))
+- Remove VoiceChannel#editable (#7291) ([164589c](https://github.com/discordjs/discord.js/commit/164589c5516a847457444d11098981d557b6778b))
+- Remove boolean option for `Webhook#fetchMessage` (#7293) ([347ff80](https://github.com/discordjs/discord.js/commit/347ff80bbc9bc5243b7f68ba5d745782eadeba21))
+- **subcommandgroup:** Required default to false (#7217) ([6112767](https://github.com/discordjs/discord.js/commit/6112767128a664f32205425f52ba52220d57834f))
+- **invite:** Make `channel` and `inviter` getters (#7278) ([18b0ed4](https://github.com/discordjs/discord.js/commit/18b0ed4cbe8285637a971c7c99ee49d18060a403))
+- Remove required from getMember (#7188) ([c90e47f](https://github.com/discordjs/discord.js/commit/c90e47f90403e5b1b3499b213dcdf2704fd96b66))
+- Remove djs components and use /builders components instead (#7252) ([101d7c5](https://github.com/discordjs/discord.js/commit/101d7c5ffa03edcf8cb8a0647b77d5c9a38e4bdd))
+- Default *URL methods to animated hash (#7149) ([7c07976](https://github.com/discordjs/discord.js/commit/7c07976018728154be0ce0314d3e8dfe8eb9ed5b))
+- Use setPosition inside edit (#7263) ([0b23b7f](https://github.com/discordjs/discord.js/commit/0b23b7f0394a20596c8d85b82870c3f35ea6b0e0))
+- Don't disable import order lint (#7262) ([0a5d5f3](https://github.com/discordjs/discord.js/commit/0a5d5f38c0b1a249fa2efe16f3b601c90622a4d5))
+- Remove discord.js enums and use discord-api-types enums instead (#7077) ([aa6d1c7](https://github.com/discordjs/discord.js/commit/aa6d1c74de01dd9a8f020c43fb2c193c4729df8d))
+- **application:** Remove fetchAssets (#7250) ([1479e40](https://github.com/discordjs/discord.js/commit/1479e40bcecc4c28ecb9f05fa4fbbdfe3bd387e1))
+- PresenceUpdate and demuxProbe (#7248) ([1745973](https://github.com/discordjs/discord.js/commit/174597302408f13c5bb685e2fb02ae2137cb481d))
+- **embeds:** Don't create new embed instances when unnecessary (#7227) ([822dc67](https://github.com/discordjs/discord.js/commit/822dc678da626de7b4fb22a747cd3cd2e8376732))
+- **GuildMember:** Throw better errors on #kickable and #bannable (#7137) ([4fd127e](https://github.com/discordjs/discord.js/commit/4fd127e79edfa1851f8a10242838f9d7aa68c8c3))
+- **SnowflakeUtil:** Switch to `@sapphire/snowflake` (#7079) ([e082dfb](https://github.com/discordjs/discord.js/commit/e082dfb1584926e4c05face5966d16e4a2921bc5))
+- **InteractionCreate:** Remove interaction event (#6326) ([ae876d9](https://github.com/discordjs/discord.js/commit/ae876d962453ccf843f8e6f70666a98a3173bb75))
+- **MessageCreate:** Remove message event (#6324) ([171e917](https://github.com/discordjs/discord.js/commit/171e917fb96b6bf39a6ad70e83be646f72fe451e))
+- **integration:** Turn undefined into null and consistency (#7209) ([13eb782](https://github.com/discordjs/discord.js/commit/13eb78256da901e6c3c405f546f36617ef5e8239))
+- Remove `deleted` field (#7092) ([cee7fd1](https://github.com/discordjs/discord.js/commit/cee7fd181c464e44eabf20b511d12589f2453722))
+- **Dates:** Save timestamps everywhere and use Date.parse (#7108) ([55e21f5](https://github.com/discordjs/discord.js/commit/55e21f53663a91863c63b6d9f3a8c35564664061))
+- **RoleManager:** Remove `comparePositions()` (#7201) ([fbbac27](https://github.com/discordjs/discord.js/commit/fbbac279789427b2c36869dc47b65fb08431e14d))
+- Better Command Terminology (#7197) ([b7856e7](https://github.com/discordjs/discord.js/commit/b7856e7809ff6fa21fe00286f885808535624f7c))
+- **Actions:** Remove deleted maps (#7076) ([5022b14](https://github.com/discordjs/discord.js/commit/5022b14da09e9b421f947e9bc385a0574cbf07d1))
+- **Client:** Remove applicationCommand events (#6492) ([6085b4f](https://github.com/discordjs/discord.js/commit/6085b4f72723d4ff82f7fea504241d14c94af21e))
+- Remove `Util.removeMentions()` (#6530) ([0c24cc8](https://github.com/discordjs/discord.js/commit/0c24cc8ec0d818315cc8f8bcf74fce060847ac79))
+- **Constants:** Change APPLICATION_COMMAND -> CHAT_INPUT_COMMAND (#7018) ([75616a3](https://github.com/discordjs/discord.js/commit/75616a305f9af33013486b13a872a39212101ce7))
+- **Guild:** Remove deprecated setXPositions methods (#6897) ([43e5e3c](https://github.com/discordjs/discord.js/commit/43e5e3c339a96fa895267d4538eee1d5e5843d05))
+- **UserFlags:** Update flag names (#6938) ([b246fc4](https://github.com/discordjs/discord.js/commit/b246fc4101b8e4957ffd1af8e2e4986a020ca211))
+
+## Styling
+
+- Cleanup tests and tsup configs ([6b8ef20](https://github.com/discordjs/discord.js/commit/6b8ef20cb3af5b5cfd176dd0aa0a1a1e98551629))
+
+## Typings
+
+- **GuildFeature:** Allow feature strings to be passed (#8264) ([b7d4e55](https://github.com/discordjs/discord.js/commit/b7d4e55419207d4e25f5c40cab221c7c04a617bf))
+- **CategoryChannelChildManager:** Fix Holds type (#8288) ([33a7a5c](https://github.com/discordjs/discord.js/commit/33a7a5cbdc00d2a5034dc1ec91fec5da7042f9d0))
+- Remove `MemberMention` (#8292) ([bf65b37](https://github.com/discordjs/discord.js/commit/bf65b37d1a9ea8417e26ad4afacea1eb45a0ff5a))
+- **GuildMemberManager:** Fix placement for `fetchMe()` (#8258) ([7525615](https://github.com/discordjs/discord.js/commit/75256153a9923d94ca709a37aaccc48dfb43c153))
+- Convert `Events` to an enum (#8246) ([feb3bdd](https://github.com/discordjs/discord.js/commit/feb3bdda0a3c3da80378c8cbcafca2968551eef9))
+- **GuildMemberManager:** Non-void return of `edit()` (#8186) ([c7a205f](https://github.com/discordjs/discord.js/commit/c7a205f7b992eea43af13a4638e2a03db7bc0d8a))
+- Add missing shard types (#8180) ([27d8deb](https://github.com/discordjs/discord.js/commit/27d8deb4716a87704370a95103b16fa1b763de18))
+- Implement `GuildChannelEditOptions` (#8184) ([b83e0c0](https://github.com/discordjs/discord.js/commit/b83e0c0caffc2b767aa1ba4412580970a6901899))
+- **Status:** Add missing members (#8179) ([8421f92](https://github.com/discordjs/discord.js/commit/8421f9203bd2d85ef8e64c3fb9a991c74223a75d))
+- **GuildScheduledEvent#scheduledStartAt:** Should be nullish (#8111) ([65dc8d6](https://github.com/discordjs/discord.js/commit/65dc8d677ee81469c0eeb4ecdd83fe2f68cc8982))
+- Fix modal builder constructor data type (#8143) ([7279f9c](https://github.com/discordjs/discord.js/commit/7279f9c31b14bc1e78c63b7298e80e37ca5dfe0c))
+- Use `ThreadAutoArchiveDuration` from discord-api-types (#8145) ([a3799f9](https://github.com/discordjs/discord.js/commit/a3799f9ebb027904830457119708d550e2009200))
+- **Shard#reconnecting:** Fix event name (#8118) ([95e6d6e](https://github.com/discordjs/discord.js/commit/95e6d6ede03c4fb92a8d8027a085e84b043fd895))
+- **ApplicationCommand:** Fix typo in setDMPermission (#8097) ([4df491c](https://github.com/discordjs/discord.js/commit/4df491ce8578a1b01ee8412a4df8137a302e7202))
+- Fix `setType()` parameter and `ChannelData.type` (#8089) ([b4e28a8](https://github.com/discordjs/discord.js/commit/b4e28a8ff6bf165c54a8726d3bc3a3cc0c1e469b))
+- Fix `ApplicationCommandPermissionsUpdate` event typings (#8071) ([9964454](https://github.com/discordjs/discord.js/commit/9964454c2944a0523399481a5f609144486e549b))
+- **AutocompleteOption:** Fix and improve types (#8069) ([476b7d5](https://github.com/discordjs/discord.js/commit/476b7d519c719152ea04e207f6dd09bb23e733db))
+- **ThreadMemberManager:** Fix return type of fetching members with no arguments (#8060) ([2392a6f](https://github.com/discordjs/discord.js/commit/2392a6f5de2efcf6b326173d26295c928b94adb6))
+- Remove isAutocomplete typeguard from typings (#8063) ([c0f079d](https://github.com/discordjs/discord.js/commit/c0f079d2325a636c83ac676c525bfa89ce308b3c))
+- **AttachmentBuilder:** Fix data type (#8016) ([7fa698d](https://github.com/discordjs/discord.js/commit/7fa698d23e548987762c4c66c96c510d9ea56eb4))
+- **modal:** Fix `showModal()` typings (#8014) ([0ccc243](https://github.com/discordjs/discord.js/commit/0ccc243c8ffbf852660c899cc2ad47bd5ebb65cb))
+- Fix some attachment related typings (#8013) ([6aa6232](https://github.com/discordjs/discord.js/commit/6aa623240ee94b117c7e69c1d09b50923a8f7a4c))
+- **AttachmentBuilder:** Remove name parameter from constructor (#8008) ([6266b0c](https://github.com/discordjs/discord.js/commit/6266b0c1e323f9522010f90f34ce6f17fcb6e769))
+- Add types to `EventEmitter` static methods (#7986) ([d60c464](https://github.com/discordjs/discord.js/commit/d60c464e618e4159d2656e7832798909832f33cd))
+- Nullify `guildScheduledEventUpdate`'s old parameter (#7955) ([fdeac9d](https://github.com/discordjs/discord.js/commit/fdeac9d9fba06c532eca296ddd8479047bc732bf))
+- Make `CacheType` generic more accurate for return values (#7868) ([e07b910](https://github.com/discordjs/discord.js/commit/e07b910e684bc3cf71fb93417951ad42351bace4))
+- **guildScheduledEvent:** Mark `entityMetadata` as nullable (#7908) ([64bdf53](https://github.com/discordjs/discord.js/commit/64bdf53116945ffb51764bb8ec539d530aefcfb1))
+- **discord.js:** Export missing enums (#7864) ([5eeef3f](https://github.com/discordjs/discord.js/commit/5eeef3f708eb900ec994d837fb4cd414a4f4b437))
+- Fix return type of `toString()` on channels (#7836) ([ece6289](https://github.com/discordjs/discord.js/commit/ece628986c7eb1a66f46076d8f8518c9ff00aaf3))
+- **Message#activity:** Make `partyId` optional and use enum for `type` (#7845) ([bfeaf85](https://github.com/discordjs/discord.js/commit/bfeaf856f76eb7cb756ac55aac13636ccdb345b6))
+- Cleanup *Data type definitions (#7716) ([585169f](https://github.com/discordjs/discord.js/commit/585169f2f097ffb1940d17f549e4290aa55acde2))
+- Fix BooleanCache never resolving to true (#7809) ([440ac24](https://github.com/discordjs/discord.js/commit/440ac243ca1d6f8cd04603e63e3f2f6ea1722ee8))
+- **CommandInteraction:** Add awaitModalSubmit (#7811) ([a6d9ce5](https://github.com/discordjs/discord.js/commit/a6d9ce57c6cae90d0afc60010cad44fdc2c2d06c))
+- **ThreadChannel:** Fix autoArchiveDuration types (#7816) ([0857476](https://github.com/discordjs/discord.js/commit/08574763eb665b5a43ccfb826929f1e3f0d1c3a7))
+- Add missing typing (#7781) ([f094e33](https://github.com/discordjs/discord.js/commit/f094e338617a1a3c9f48a325e4b8e9b5a405aa91))
+- **VoiceChannel:** Nullify property (#7793) ([446eb39](https://github.com/discordjs/discord.js/commit/446eb390ce58b7e7f60e297b25f53773a55f7fb9))
+- **ModalSubmitInteraction:** Message (#7705) ([b577bcc](https://github.com/discordjs/discord.js/commit/b577bcc1df5c6424fef9984e19a5f11c77371cf3))
+- **Embed:** Add missing getters and add video to EmbedData (#7728) ([fd1dc72](https://github.com/discordjs/discord.js/commit/fd1dc72c0a77dbe18753d8db22972dfa5fe4ab36))
+- **ModalSubmitInteraction:** Fix `components` type (#7732) ([6f4e97b](https://github.com/discordjs/discord.js/commit/6f4e97bfafe4a058f6ec85d321676401d701ee55))
+- **interactionCollector:** Filter should have a collected argument (#7753) ([e4f2705](https://github.com/discordjs/discord.js/commit/e4f27051ca921d299c302b600a8c2917e9356ef6))
+- Fix regressions (#7649) ([5748dbe](https://github.com/discordjs/discord.js/commit/5748dbe08783beb80c526de38ccd105eb0e82664))
+- **Constants:** Add `NonSystemMessageTypes` (#7678) ([9afc030](https://github.com/discordjs/discord.js/commit/9afc03054e4c8973702d6c18e618643f76382dd9))
+- Fix auto archive duration type (#7688) ([8e3b2d7](https://github.com/discordjs/discord.js/commit/8e3b2d7abd38136534969cf77c6a748ee3a20355))
+- **InteractionResponseFields:** Add webhook (#7597) ([daf2829](https://github.com/discordjs/discord.js/commit/daf2829cb58d1a44cb1f1ece21e428d1a23e99c9))
+- **Embed:** Add forgotten `footer` type (#7665) ([8fb9816](https://github.com/discordjs/discord.js/commit/8fb98165a9d098ab316475d6baacb015783eb638))
+- **ColorResolvable:** Simplify string types (#7643) ([2297c2b](https://github.com/discordjs/discord.js/commit/2297c2b9479ace16f5f7155479605a4ac2718e3d))
+- Allow component classes in action row data (#7614) ([230c0c4](https://github.com/discordjs/discord.js/commit/230c0c4cb137882ff7bab783a4aeaa83ae941de5))
+- **ActionRow:** Allow components to be passed to constructors (#7531) ([e71c76c](https://github.com/discordjs/discord.js/commit/e71c76c7f795837dbcc3576e507bd286640b4296))
+- **showModal:** Align types with the documentation (#7600) ([0d7e4ed](https://github.com/discordjs/discord.js/commit/0d7e4edd969513692c061c107be4bbe7e4b54321))
+- Modals type and doc fixes (#7608) ([93854a8](https://github.com/discordjs/discord.js/commit/93854a8013d07234cb849bfcbfa99f74a4c3cdb4))
+- **InteractionResponseFields:** Add boolean properties (#7565) ([53defb8](https://github.com/discordjs/discord.js/commit/53defb82e36108468e35077b887ee28b811891ab))
+- Allow raw components for reply and message options (#7573) ([2d4971b](https://github.com/discordjs/discord.js/commit/2d4971b032a01c05b55c93d6475e61b0d25d69d3))
+- Fix component *Data types (#7536) ([a8321d8](https://github.com/discordjs/discord.js/commit/a8321d8026df2e6a09d867939986bf77f894f3a8))
+- Use discord-api-types `Locale` (#7541) ([8346003](https://github.com/discordjs/discord.js/commit/83460037be840ba623f3b02a3e6f218943f9d2b7))
+- **anychannel:** Add PartialGroupDMChannel (#7472) ([cf66930](https://github.com/discordjs/discord.js/commit/cf669301c7be8eaecf91d7f764eccc67d7a5b4c6))
+- Remove `ApplicationCommandInteractionOptionResolver` (#7491) ([71f4fa8](https://github.com/discordjs/discord.js/commit/71f4fa82ed6206d6843345a5394119f2a728aa35))
+- **embed:** Fix timestamp allowed types (#7470) ([7959a68](https://github.com/discordjs/discord.js/commit/7959a68d8ec600af248f5506f39871cae7eeeb04))
+- Remove duplicate rate limit for thread creation (#7465) ([2d2de1d](https://github.com/discordjs/discord.js/commit/2d2de1d3fd15a098d69e09710e9a7a3352234fef))
+- Correct types for InteractionCollector guild and channel (#7452) ([6ce906a](https://github.com/discordjs/discord.js/commit/6ce906a02fcb051cb6df3e9f453ba9f53db03bd0))
+- Fix `GuildAuditLogsTypes` keys & typos (#7423) ([3d8c776](https://github.com/discordjs/discord.js/commit/3d8c77600be51a86a99b526078bb1b1fcb9a0811))
+- Remove duplicate `GuildChannelOverwriteOptions` interface (#7428) ([83458ff](https://github.com/discordjs/discord.js/commit/83458ff7c782b8efdaaac931d2dee1764dad25bf))
+- Use `GuildFeature` enum from `discord-api-types` (#7397) ([a7b80b9](https://github.com/discordjs/discord.js/commit/a7b80b9d9bf4902bd85b592986771eadf7a765dc))
+- Fix *BitField.Flags properties (#7363) ([e6a26d2](https://github.com/discordjs/discord.js/commit/e6a26d25b3cf8dfcc8aa8997b021f1774f3b754b))
+- Fix MessageMentions channel types (#7316) ([c05b388](https://github.com/discordjs/discord.js/commit/c05b38873bb3c37c6e4ebcb6b6373a8858cc03de))
+- Fix channel create overloads (#7294) ([1c6c944](https://github.com/discordjs/discord.js/commit/1c6c9449ad68601c6c98748d73be8114401d38ef))
+- Fix regressions and inconsistencies (#7260) ([26a9dc3](https://github.com/discordjs/discord.js/commit/26a9dc32062cd071917bbe7264050315b4d6dd3c))
+- **interaction:** Remove renamed typeguards (#7220) ([68b9564](https://github.com/discordjs/discord.js/commit/68b9564f1821726377a1e929a3ca1fc65b4ad598))
+- AssertType -> expectType ([3f36746](https://github.com/discordjs/discord.js/commit/3f36746561a40cd61a7cd2e054b7ef80d58fc707))
+- Fix cache types resolving to `never` (#7164) ([c978dbb](https://github.com/discordjs/discord.js/commit/c978dbb6233bcd85408caf0bca7619c9c5d508f0))
+
+# [14.13.0](https://github.com/discordjs/discord.js/compare/14.12.1...14.13.0) - (2023-08-17)
+
+## Bug Fixes
+
+- **Action:** Do not add the client user as a recipient (#9774) ([24fbb11](https://github.com/discordjs/discord.js/commit/24fbb11ba2f7e8f8f604752159d2053f2cee16ec))
+- **DMChannel:** Correct partial typo (#9773) ([c1ff545](https://github.com/discordjs/discord.js/commit/c1ff545bf1c018875f5a9ceb828c9f84ed391920))
+- **CachedManager:** Allow overriding constructor for makeCache (#9763) ([346fa57](https://github.com/discordjs/discord.js/commit/346fa57f95a99d5b4e1169bb85706c4c25bf71d0))
+- **types:** Fixed CachedManager constructor arguments in type (#9761) ([b3c85d3](https://github.com/discordjs/discord.js/commit/b3c85d34a6ced8a8e2cd15a6e3879fb2dd5121d0))
+- **Action:** Do not set `undefined` values (#9755) ([d8e3755](https://github.com/discordjs/discord.js/commit/d8e37551ceefe9f82566e3f45edc69bb7f9d1463))
+
+## Documentation
+
+- **EmbedBuilder:** `@readonly` length (#9778) ([8f572a6](https://github.com/discordjs/discord.js/commit/8f572a6badd45b916d3a46dd489653d2d6efb2a8))
+- **WebhookEditOptions:** Add all of the types (#9776) ([d5be424](https://github.com/discordjs/discord.js/commit/d5be4242c6a6f90b90af54e27071ecc0f5422944))
+- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6))
+
+## Features
+
+- **Client:** Add deleteWebhook method (#9777) ([d90ba8d](https://github.com/discordjs/discord.js/commit/d90ba8dce8de630db14b77764ec35201998c7ce7))
+- **ClientPresence:** Allow setting activity state (#9743) ([9ed1b59](https://github.com/discordjs/discord.js/commit/9ed1b59df6acb6356d5950b43d04885d5e692887))
+- **ClientApplication:** Approximate guild count and new `GET` route (#9713) ([632a9b4](https://github.com/discordjs/discord.js/commit/632a9b4965cd24ffffdf0f88f1a9eedeb6b284f7))
+- **Role:** Add `flags` (#9694) ([3b18e5b](https://github.com/discordjs/discord.js/commit/3b18e5b08dc3ec2aba37d3e6a55e42ce8af7dbab))
+- **Attachment:** Add `flags` (#9686) ([692f0fc](https://github.com/discordjs/discord.js/commit/692f0fc96d9f92161b64fb83f02b71d43d2d7c9c))
+- Add `Client#webhooksUpdate` (#9732) ([0de071d](https://github.com/discordjs/discord.js/commit/0de071d0a5524ba1fbb8cab5d7e74567103f7129))
+
+## Typings
+
+- **GuildInvitableChannelResolvable:** Allow forum channels (#9775) ([727dc09](https://github.com/discordjs/discord.js/commit/727dc094d52a5b169e46917b64308ab87a7144b1))
+- Make activity name required (#9765) ([0a9a3ed](https://github.com/discordjs/discord.js/commit/0a9a3ede292b92235a103b6776477a707da4d84b))
+- **BaseButtonComponentData:** Narrow component type (#9735) ([a30d46c](https://github.com/discordjs/discord.js/commit/a30d46c5f5909eee86704bbb9e34fb7bb09b2c27))
+
+# [14.12.1](https://github.com/discordjs/discord.js/compare/14.12.0...14.12.1) - (2023-08-01)
+
+## Bug Fixes
+
+- **BaseClient:** Fix destroy method (#9742) ([1af7e5a](https://github.com/discordjs/discord.js/commit/1af7e5a0bb4eca35221cb342c1c53dc18263c789))
+
+# [14.12.0](https://github.com/discordjs/discord.js/compare/14.11.0...14.12.0) - (2023-07-31)
+
+## Bug Fixes
+
+- **ChannelUpdate:** Check against unknown channels (#9697) ([7fb91c5](https://github.com/discordjs/discord.js/commit/7fb91c57f72b74395d67f2207246033c703f1f19))
+- **Action:** Use existing recipients if available (#9653) ([719e54a](https://github.com/discordjs/discord.js/commit/719e54a921f74890519f066a9f56e52fdcfacf07))
+- Everyone role members (#9685) ([0803eb5](https://github.com/discordjs/discord.js/commit/0803eb562bdc7644fa611a0a87dea3e8b0d4c7af))
+- `awaitMessageComponent` with `MessageComponentInteraction`s (#8598) ([b61e4fb](https://github.com/discordjs/discord.js/commit/b61e4fb0dcb9e5d43a7626c5a4760f5801e06fae))
+- **ThreadManager:** Fix internal crash upon conditionally resolving thread members (#9648) ([a6dbe16](https://github.com/discordjs/discord.js/commit/a6dbe163dd3df12ad98465b1dfc040b8eff8805e))
+- **User:** Check global name in equals (#9631) ([8f3bd38](https://github.com/discordjs/discord.js/commit/8f3bd3807233fca2a057948406bdc8aef008b6cb))
+- **WebSocketManager:** Await WebSocket destroy (#9519) ([75308f2](https://github.com/discordjs/discord.js/commit/75308f266933454301b10ee8e1d940d782fdb637))
+- **Client:** Safe call for possibly null WebSocket (#9600) ([24a6149](https://github.com/discordjs/discord.js/commit/24a61495b9bf07887dd535a05ffbec2895faa888))
+- **ThreadManager:** Ensure `fetchActive()` only returns active threads in a channel (#9568) ([53aa24d](https://github.com/discordjs/discord.js/commit/53aa24d41809382c1af57bd1871107c8359e4a15))
+- **LimitedCollection:** Allow items to be stored if keepOverLimit is true when maxSize is 0 (#9534) ([9345d1b](https://github.com/discordjs/discord.js/commit/9345d1b1ac4f7b1f66b919602dff995782151407))
+- **AutocompleteInteraction:** Prevent snake casing of locales (#9565) ([7196fe3](https://github.com/discordjs/discord.js/commit/7196fe36e8089dde7bcaf0db4dd09cf524125e0c))
+
+## Documentation
+
+- Change `Channel` to `BaseChannel` (#9718) ([e5effb6](https://github.com/discordjs/discord.js/commit/e5effb6f6a3e547006eb9bc054cc168844a157f2))
+- **BaseChannel:** Remove `APIChannel` (#9717) ([125405f](https://github.com/discordjs/discord.js/commit/125405f1cf11433c69ff1ae9d6b8f7e713fc37c0))
+- **BuildersSelectMenuOption:** Update link (#9690) ([ede9f4e](https://github.com/discordjs/discord.js/commit/ede9f4e5e203bcfb8820ae7ec3418482735ff9c1))
+- **ClientOptions:** Change default value of sweepers in docs (#9591) ([911e6ef](https://github.com/discordjs/discord.js/commit/911e6eff75f5d05e837d5dfaacf557d6594df16a))
+- **Client:** Correct invite gateway permission checks (#9597) ([e1b6eee](https://github.com/discordjs/discord.js/commit/e1b6eeed0e2e18f9900bc945c9f82d2d05f28a78))
+- Fix broken links to new documentation (#9563) ([d01e8aa](https://github.com/discordjs/discord.js/commit/d01e8aa8af00f5caacffe98caef3ead02e80a9bf))
+
+## Features
+
+- Add ws option support for "buildIdentifyThrottler" (#9728) ([6307f81](https://github.com/discordjs/discord.js/commit/6307f813854ed9dc76d2c4351bd69dd0490d0928))
+- **Client:** Add `guildAvailable` event (#9692) ([3c85fb2](https://github.com/discordjs/discord.js/commit/3c85fb21e62b30e75a7200b704e242c3a0adeda1))
+- User avatar decorations (#8914) ([8d97017](https://github.com/discordjs/discord.js/commit/8d9701745840e23854e8f0b057d21cb10e7d1d54))
+- Add silent option to ShardingManager (#9506) ([df40dcd](https://github.com/discordjs/discord.js/commit/df40dcdb850c398642ebc5cd6e4c48034280f464))
+- **EmbedBuilder:** Add `.length` (#8682) ([53c17e0](https://github.com/discordjs/discord.js/commit/53c17e00c0668c3d1497142dde7384c058c46c64))
+- Guild onboarding (#9120) ([dc73c93](https://github.com/discordjs/discord.js/commit/dc73c938ff9d04a0d7d57630faeb8e81ea343006))
+- Add resume event in shard (#9650) ([a73d54e](https://github.com/discordjs/discord.js/commit/a73d54e43a01719f683e8fd21714e85ffe737add))
+- **presence:** Re-introduce image resolving for other platforms (#9637) ([73c2f8a](https://github.com/discordjs/discord.js/commit/73c2f8aa17aac51b05382444148cb1f60081ee03))
+- Add message to send resume event to shard (#9626) ([a873ec1](https://github.com/discordjs/discord.js/commit/a873ec1e8511829ba95e85bbc9a4074e40c76086))
+- Support new username system (#9512) ([1ab60f9](https://github.com/discordjs/discord.js/commit/1ab60f9da4d6b7ea144fa05b97b029a4bfaeede2))
+- **GuildAuditLogsEntry#extra:** Add missing `channel` property (#9518) ([2272321](https://github.com/discordjs/discord.js/commit/227232112d1cd9f211e177996b7cdee2940f471e))
+
+## Performance
+
+- **Channel:** Linear speed position getter (#9497) ([09b0382](https://github.com/discordjs/discord.js/commit/09b0382c458ed0f3df5b8fa778c504b3e658ac49))
+- **Role:** Improve `members` getter (#9529) ([37181ab](https://github.com/discordjs/discord.js/commit/37181ab2322e48e17ff0d1040bcc510dc7c34e93))
+
+## Refactor
+
+- **User:** Remove deprecation warning from tag (#9660) ([cf8012c](https://github.com/discordjs/discord.js/commit/cf8012c20022aff184d7bce0ad436c136e428d9c))
+- **GuildMember:** Make `_roles` property non-enumerable (#9387) ([46167a7](https://github.com/discordjs/discord.js/commit/46167a79d7d0cac5599459a31c33b2bbcf6e06da))
+- **rest:** Switch api to fetch-like and provide strategies (#9416) ([cdaa0a3](https://github.com/discordjs/discord.js/commit/cdaa0a36f586459f1e5ede868c4250c7da90455c))
+ - **BREAKING CHANGE:** NodeJS v18+ is required when using node due to the use of global `fetch`
+ - **BREAKING CHANGE:** The raw method of REST now returns a web compatible `Respone` object.
+ - **BREAKING CHANGE:** The `parseResponse` utility method has been updated to operate on a web compatible `Response` object.
+ - **BREAKING CHANGE:** Many underlying internals have changed, some of which were exported.
+ - **BREAKING CHANGE:** `DefaultRestOptions` used to contain a default `agent`, which is now set to `null` instead.
+
+## Typings
+
+- **MessageManager:** Allow comparison of messages again (#9612) ([a48d0ef](https://github.com/discordjs/discord.js/commit/a48d0efb09613eac6bf3c1bd996f58f5fff7667c))
+- **AutoModerationActionExecution:** Add forum channels as a possible type in `channel()` (#9623) ([d64330a](https://github.com/discordjs/discord.js/commit/d64330a1570b3a2047ef959a6bce268372c70e99))
+- **ModalSubmitFields:** Components is an array (#9406) ([1cab79f](https://github.com/discordjs/discord.js/commit/1cab79f6fde6f367141c9f7ed91bcb70ed2e5c17))
+- Use `readonly` arrays and `const` type parameters in places (#9641) ([cd69868](https://github.com/discordjs/discord.js/commit/cd6986854f4c2d143d2cd9b81d096738480dfa63))
+- **BaseInteraction:** `appPermissions` not `null` in guilds (#9601) ([6c2242f](https://github.com/discordjs/discord.js/commit/6c2242f4f970b1c75c243f74ae64f30ecbf8ba0d))
+
+# [14.11.0](https://github.com/discordjs/discord.js/compare/14.10.2...14.11.0) - (2023-05-06)
+
+## Bug Fixes
+
+- **WebSocketManager:** Properly emit shard error events (#9521) ([e627468](https://github.com/discordjs/discord.js/commit/e6274681fd10b0d75e1d3b448c94b50ec6810367))
+- **WebSocketManager:** Emit raw ws events again (#9502) ([c429763](https://github.com/discordjs/discord.js/commit/c429763be8e94f0f0cbc630e8bb1d415d46f1465))
+
+## Documentation
+
+- **Client:** Update Sapphire's snowflake utility links (#9501) ([1b7981e](https://github.com/discordjs/discord.js/commit/1b7981e4696b8ae74ceffa876fc0a9be7d0b9f93))
+
+## Features
+
+- **Guild:** Safety alerts channel and mention raid protection (#8959) ([6b2c3fb](https://github.com/discordjs/discord.js/commit/6b2c3fb9d0571de808e990cf064f73240ab93451))
+
+## Performance
+
+- **Role:** Linear speed position getter (#9493) ([8e9a2b4](https://github.com/discordjs/discord.js/commit/8e9a2b4630f78bb9e45345ec2a16812bfac70a20))
+
+## Refactor
+
+- **GuildChannel:** Simplify constructor (#9499) ([f2ad076](https://github.com/discordjs/discord.js/commit/f2ad0762c521422ab64e5b10344a6fd67961031b))
+
+## Typings
+
+- **StringSelectMenuComponentData:** `options` is required (#9515) ([d7b18f0](https://github.com/discordjs/discord.js/commit/d7b18f0681d4147ff192c98108c035d6d0f96cce))
+
+# [14.10.2](https://github.com/discordjs/discord.js/compare/14.10.1...14.10.2) - (2023-05-01)
+
+## Bug Fixes
+
+- Correct `isJSONEncodable()` import (#9495) ([201b002](https://github.com/discordjs/discord.js/commit/201b002ad405b845ace5f708077c1f157bb4126d))
+- **Client:** `generateInvite()` scope validation (#9492) ([b327f49](https://github.com/discordjs/discord.js/commit/b327f4925ff557e0aa8273d7f017aa616226ca06))
+
+# [14.10.1](https://github.com/discordjs/discord.js/compare/14.10.0...14.10.1) - (2023-05-01)
+
+## Bug Fixes
+
+- **Client:** Spelling of InvalidScopesWithPermissions ([ac9bf3a](https://github.com/discordjs/discord.js/commit/ac9bf3ac06ec78dbaca2ce4a82cceb0d82484211))
+
+## Refactor
+
+- **ShardClientUtil:** Logic de-duplication (#9491) ([a9f2bff](https://github.com/discordjs/discord.js/commit/a9f2bff82a18c6a3afdee99e5830e1d7b4da65dc))
+
+# [14.10.0](https://github.com/discordjs/discord.js/compare/14.9.0...14.10.0) - (2023-05-01)
+
+## Bug Fixes
+
+- **ShardClientUtil:** Fix client event names (#9474) ([ad217cc](https://github.com/discordjs/discord.js/commit/ad217cc7604dda6a33df73db82799fd5bb4e85a9))
+- **BaseClient:** Prevent user agent mutation (#9425) ([217e5d8](https://github.com/discordjs/discord.js/commit/217e5d81005a2506c96335f7fb96fa21d7dbb04c))
+- **BitField:** Use only enum names in iterating (#9357) ([40d07fb](https://github.com/discordjs/discord.js/commit/40d07fbbbd51d62793d9ea541f41f157b5dad224))
+- Use new permission name (#9274) ([d2d27ce](https://github.com/discordjs/discord.js/commit/d2d27ce7346bc37b34938c84bd3b106a4fa51f53))
+- **Message#editable:** Fix permissions check in locked threads (#9319) ([d4c1fec](https://github.com/discordjs/discord.js/commit/d4c1fecbe264bc52a70aaf0ec303d35e2f15bbcd))
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Documentation
+
+- **AutoModerationRule:** Update docs (#9464) ([1b15d31](https://github.com/discordjs/discord.js/commit/1b15d31b5ae1b1739716fab00b18083c1d7d389a))
+- **APITypes:** Document role & user select menu components (#9435) ([c6ca5a8](https://github.com/discordjs/discord.js/commit/c6ca5a83e7b72613f95c2145606a1330f64ae894))
+- **BaseMessageOptions:** Fix embeds and components (#9437) ([5c52bb9](https://github.com/discordjs/discord.js/commit/5c52bb95906250518a8813820d543f43dd7abdf9))
+- **InteractionResponses:** ShowModal docs change (#9434) ([7d34100](https://github.com/discordjs/discord.js/commit/7d341000d44b762a2fe0434a6b518f7d63539d34))
+- Use ESM code in examples (#9427) ([ce287f2](https://github.com/discordjs/discord.js/commit/ce287f21d1540da7f17cac8a57dc33a67f391ef3))
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+- **Options:** Fix links and invalid syntax (#9322) ([86e5f5a](https://github.com/discordjs/discord.js/commit/86e5f5a119c6d2588b988a33236d358ded357847))
+- Cleanup MessageCreateOptions and MessageReplyOptions (#9283) ([300059c](https://github.com/discordjs/discord.js/commit/300059cb266e6cca42c30ee7f997c48ab2cc565e))
+- **Events:** Document auto moderation events (#9342) ([79bcdfa](https://github.com/discordjs/discord.js/commit/79bcdfa767e7e842164e1174b6f4834ed731d329))
+- Add `SnowflakeUtil` (#9371) ([8ffcf77](https://github.com/discordjs/discord.js/commit/8ffcf77840b62590fcb4731380d28b22d0b98741))
+- Use stable tag (#9343) ([c0f2dd7](https://github.com/discordjs/discord.js/commit/c0f2dd713151a29c98e1eebad66721a208be1fc0))
+- Remove `JSONEncondable` (#9344) ([b2eec5f](https://github.com/discordjs/discord.js/commit/b2eec5f9fcf37ebb3b7f87a67a6ee3160c182183))
+
+## Features
+
+- **Attachment:** Voice messages (#9392) ([3e01f91](https://github.com/discordjs/discord.js/commit/3e01f91bbba2cbacacc6c921ed664752f679960b))
+- **BaseInteraction:** Support new channel payload (#9337) ([29389e3](https://github.com/discordjs/discord.js/commit/29389e39f479b832e54c7cb3ddd363aebe99674f))
+- **RoleTagData:** Add guildConnections (#9366) ([2dddbe1](https://github.com/discordjs/discord.js/commit/2dddbe1f321f2e2722dba4a28f7d18384cf50353))
+
+## Performance
+
+- **RoleManager:** Dont call Role#position getter twice per role (#9352) ([bfee6c8](https://github.com/discordjs/discord.js/commit/bfee6c8d889502ea39ad919dd9b1e6253a2af571))
+
+## Refactor
+
+- **WebSocketManager:** Use /ws package internally (#9099) ([a9e0de4](https://github.com/discordjs/discord.js/commit/a9e0de4288ea39a6a089b8379dcd44ac0053dac7))
+- Remove `fromInteraction` in internal channel creation (#9335) ([794abe8](https://github.com/discordjs/discord.js/commit/794abe8450bae000cd0544922cdf53e7b3e4c59c))
+
+## Typings
+
+- **AutoModerationActionMetadataOptions:** Make channel property optional (#9460) ([d26df5f](https://github.com/discordjs/discord.js/commit/d26df5fabaf227fb9d10ba5cc1ab326de55aadbc))
+- **CategoryChannel:** Ensure `parent` and `parentId` are `null` (#9327) ([8218ffc](https://github.com/discordjs/discord.js/commit/8218ffc78d23234b32c05a97fde2f4bea64d7aa6))
+- **GuildTextBasedChannel:** Remove unnecessary exclusion of forum channels (#9326) ([7ff3d52](https://github.com/discordjs/discord.js/commit/7ff3d528d942a0daa990194915ff8328dec99149))
+
+# [14.9.0](https://github.com/discordjs/discord.js/compare/14.8.0...14.9.0) - (2023-04-01)
+
+## Bug Fixes
+
+- Add support for new guild feature `GUILD_WEB_PAGE_VANITY_URL` (#9219) ([de1aac6](https://github.com/discordjs/discord.js/commit/de1aac674acb3830124646fcd52cdd98cdb71ba5))
+- Resolving string bitfield (#9262) ([7987565](https://github.com/discordjs/discord.js/commit/79875658cf4a8daa25210c2c620c73a710ca22de))
+- **AutocompleteInteraction:** Send `name_localizations` correctly (#9238) ([1864d37](https://github.com/discordjs/discord.js/commit/1864d37d36e53d127e74b6969a5f542193bfc3c7))
+- Keep symbols in actions manager (#9293) ([984bd55](https://github.com/discordjs/discord.js/commit/984bd55b437507e7ebfdf09ac944c8eba0340d27))
+- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b))
+- **ClientUser:** No mutation on edit (#9259) ([abd6ae9](https://github.com/discordjs/discord.js/commit/abd6ae9fc8ea03722e8b36e29c3fdc1c2cfc93e8))
+- **Message#editable:** Update editable check in threads locked (#9216) ([22e880a](https://github.com/discordjs/discord.js/commit/22e880aaa0d8c644fc8d16a524d17f4f53a056f6))
+- **ThreadManager:** Add `members` and conditionally include `hasMore` (#9164) ([e9a8eb3](https://github.com/discordjs/discord.js/commit/e9a8eb323f3a554dc8f9dab361cd1bac7b88e1cc))
+- **ThreadManager:** Respect `cache` and `force` in fetching (#9239) ([cc57563](https://github.com/discordjs/discord.js/commit/cc57563e73d78a0d71d1444d1ee8215a26a81fa8))
+- **TextBasedChannelTypes:** Add `GuildStageVoice` (#9232) ([51edba7](https://github.com/discordjs/discord.js/commit/51edba78bc4d4cb44b4dd2b79e4bbc515dc46f5b))
+
+## Documentation
+
+- Describe private properties (#8879) ([2792e48](https://github.com/discordjs/discord.js/commit/2792e48119f1cf5fa7d5e6b63369457b0719d4e4))
+- Differ `User#send` (#9251) ([384b4d1](https://github.com/discordjs/discord.js/commit/384b4d10e8642f0f280ea1651f33cd378c341333))
+- Fix compare position example (#9272) ([d16114c](https://github.com/discordjs/discord.js/commit/d16114c52646ca92c53f9b44a0dd10af98dbddcd))
+- **Role:** Fix example for `comparePositionTo()` (#9270) ([bc641fa](https://github.com/discordjs/discord.js/commit/bc641fa9360b851642bc51839cef6bd5600d71f7))
+- Add more examples (#9252) ([bf507ab](https://github.com/discordjs/discord.js/commit/bf507ab2659d95e2991e83293b3834f21283ff33))
+- **FetchArchivedThreadOptions:** `before` respects `archive_timestamp`, not creation timestamp (#9240) ([178c8dc](https://github.com/discordjs/discord.js/commit/178c8dcfeea1c4a6a32835baea389f25feefbac7))
+- Update `APISelectMenuComponent` (#9235) ([56cf138](https://github.com/discordjs/discord.js/commit/56cf138e029e7884a4e7efb606055687ca67b4ac))
+
+## Features
+
+- **Guild:** Add `max_stage_video_channel_users` (#8422) ([34bc36a](https://github.com/discordjs/discord.js/commit/34bc36ac4b04ad033d0dcc3d2701fcf2e682743c))
+- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b))
+- Add GuildBasedTextChannelTypes (#9234) ([5f93dcc](https://github.com/discordjs/discord.js/commit/5f93dcce466286f0fdead8faf4131e98d1c9db55))
+
+## Refactor
+
+- Call `GuildBanManager#create()` directly (#9263) ([f340f3b](https://github.com/discordjs/discord.js/commit/f340f3b1fd719e8f7cf6fa28a41835bc16039fc7))
+- **FetchThreadsOptions:** Remove `active` (#9241) ([519e163](https://github.com/discordjs/discord.js/commit/519e163f8aa3b55420f86d2d60c2584b3a2eb327))
+
+# [14.8.0](https://github.com/discordjs/discord.js/compare/14.7.1...14.8.0) - (2023-03-12)
+
+## Bug Fixes
+
+- **snowflake:** Snowflakes length (#9144) ([955e8fe](https://github.com/discordjs/discord.js/commit/955e8fe312c42ad4937cc1994d1d81e517c413c8))
+- **Actions:** Inject built data by using a symbol (#9203) ([a63ac88](https://github.com/discordjs/discord.js/commit/a63ac88fcca5b61209892a6e560e35d58f5adc3b))
+- **Message#deletable:** Add check for deletable message types (#9168) ([e78b8ad](https://github.com/discordjs/discord.js/commit/e78b8ad3fb6692cba2c565b508254c723f185f0c))
+- **Message:** `bulkDeletable` permissions should be retrieved later for DMs (#9146) ([a9495bd](https://github.com/discordjs/discord.js/commit/a9495bd8f014c8021a214b83ffc531a2af5defef))
+- **AutoModerationActionExecution:** Transform `action` (#9111) ([9156a28](https://github.com/discordjs/discord.js/commit/9156a2889cd0946dfd0b30a5f8365abfbc377b3d))
+- **MessageReaction:** `toJSON()` infinite recursion (#9070) ([f268e1d](https://github.com/discordjs/discord.js/commit/f268e1d9798744e169ae87089ea2e1f214364d95))
+- **ThreadChannel:** Insert starter message from threads created in forum channels (#9100) ([0b76ab4](https://github.com/discordjs/discord.js/commit/0b76ab4c403dd646c71482856ab993b263b7c474))
+- **ApplicationRoleConnectionMetadata:** Export the class correctly (#9076) ([071516c](https://github.com/discordjs/discord.js/commit/071516c35239bd4e1cae572c855d86b335c8536d))
+- Don't auth for interaction `showModal()` (#9046) ([b803a9a](https://github.com/discordjs/discord.js/commit/b803a9a899aaa75a3ea2bc6623c6afb28f495e8c))
+- **WebSocketShard:** Zombie connection fix (#8989) ([876b181](https://github.com/discordjs/discord.js/commit/876b1813128ec702d3ef1e7b0074a4613e88c332))
+- Keep other properties in triggerMetadata (#8977) ([d8dd197](https://github.com/discordjs/discord.js/commit/d8dd197a936dfffc05f9e5bc3184ec9022c56b51))
+- **escapeX:** Emojis with underlines (#8945) ([07b597d](https://github.com/discordjs/discord.js/commit/07b597df16b9412c23ec2387d54564e4d1bcf7ed))
+- **WebSocketShard:** Either start close timeout or emit destroyed but never both (#8956) ([43ce2a5](https://github.com/discordjs/discord.js/commit/43ce2a572eb8977b6994680171ac0c5f9bda1703))
+- **DMChannel:** `recipientId` edge case (#8950) ([7ce9909](https://github.com/discordjs/discord.js/commit/7ce990954e2f73d7a996df0afa42ab287cb12514))
+- Return only boolean for `disabled` (#8965) ([6614603](https://github.com/discordjs/discord.js/commit/66146033268a4db1279b2eaee4bd418f326c0d4b))
+- Export missing `escapeX()` functions (#8944) ([25c27ea](https://github.com/discordjs/discord.js/commit/25c27eac1417e75c9b601b17cf177b1f47b699a9))
+- **WebSocketShard:** Only cleanup the connection if a connection still exists (#8946) ([5eab5fc](https://github.com/discordjs/discord.js/commit/5eab5fc06ca6be36ecf1557f2ad29a670d4d5ae7))
+- Add `@discordjs/formatters` to dependency list (#8939) ([18b3a19](https://github.com/discordjs/discord.js/commit/18b3a19810a6436fa8bb4b490ec5137eaecbd465))
+- **resolveColor:** Invalid colors (#8933) ([c76e170](https://github.com/discordjs/discord.js/commit/c76e17078602914c3e1d227a3acc98eaa99c18d4))
+- **WebSocketShard:** Clear listeners on reconnect (#8927) ([aa8c57d](https://github.com/discordjs/discord.js/commit/aa8c57dab60104549e28451abf35c0387595d67e))
+- Re-export formatters (#8909) ([b14604a](https://github.com/discordjs/discord.js/commit/b14604abdecca575b1fca693c1593e3585bcca8c))
+
+## Documentation
+
+- **MessageManager:** Add clarification to fetch messages (#9222) ([f5ec1ca](https://github.com/discordjs/discord.js/commit/f5ec1cada5ebf0ca4093bdfc81aaf56900c794ef))
+- Make interactionResponse as optional (#9179) ([664cccb](https://github.com/discordjs/discord.js/commit/664cccb2706db33635aa2556954de57f93b3d3db))
+- Fix typos (#9127) ([1ba1f23](https://github.com/discordjs/discord.js/commit/1ba1f238f04221ec890fc921678909b5b7d92c26))
+- **chatInputApplicationCommandMention:** Parameters are not nullable (#9091) ([6f78e82](https://github.com/discordjs/discord.js/commit/6f78e8285b3ce762de010e68d49b377a47dc5a63))
+- No `@type` description and reveal info block (#9097) ([405f940](https://github.com/discordjs/discord.js/commit/405f9400e8e3ffea9f3847ab5abb431a34538a96))
+- **ThreadEditOptions:** Move info tag back to `invitable` (#9020) ([f3fe3ce](https://github.com/discordjs/discord.js/commit/f3fe3ced622676b406a62b43f085aedde7a621aa))
+- Fix a typo in the MentionableSelectMenuInteraction link (#9000) ([6d7a143](https://github.com/discordjs/discord.js/commit/6d7a143667f33ef2ea45d8016ac4738237707881))
+- **ApplicationRoleConnectionMetadata:** Add documentation (#8976) ([2e22b31](https://github.com/discordjs/discord.js/commit/2e22b31892d9b858fcb24fa580b486b4154e823f))
+- Fix malformed overridden documentation (#8954) ([0b8b114](https://github.com/discordjs/discord.js/commit/0b8b114761f961a2bf8e5aae342ed711b154a89e))
+- **GuildForumThreadManager:** Fix `sticker` type (#8940) ([dd62be0](https://github.com/discordjs/discord.js/commit/dd62be077d3e4fbd73a0c10ca344d93d3d19fa38))
+- Fix deprecated links (#8907) ([976b234](https://github.com/discordjs/discord.js/commit/976b234e9dc9999e5dee47b58c85afbc1cd494c2))
+- **UserFlagsBitField:** Make `.Flags` static (#8902) ([c48ff5e](https://github.com/discordjs/discord.js/commit/c48ff5e4205899e3b6cd35812ca857236bef6864))
+
+## Features
+
+- **Collector:** Add lastCollectedTimestamp (#9044) ([4458a13](https://github.com/discordjs/discord.js/commit/4458a13925164762b519ded1037ae8775d879f71))
+- **StageChannel:** Add messages (#9134) ([ffdb197](https://github.com/discordjs/discord.js/commit/ffdb197f988657100e2a9ff0ca17b759339a1dda))
+- **AutoModerationActionExecution:** Add `channel`, `user` and `member` getters (#9142) ([095bd77](https://github.com/discordjs/discord.js/commit/095bd77515aa31bb0e95a350b4355980fea9268d))
+- **AutoModeration:** Support `custom_message` (#9171) ([c1000b8](https://github.com/discordjs/discord.js/commit/c1000b86ed6d5413afcd6ee7e80505e5a845430b))
+- **ThreadMemberManager:** Support pagination fetching (#9035) ([765d5a3](https://github.com/discordjs/discord.js/commit/765d5a3b2d5529c3a2a4b29512f6932264443ed1))
+- **InteractionResponse:** Add new methods (#9132) ([dc9924f](https://github.com/discordjs/discord.js/commit/dc9924fb5f24c8dac963d6b86ba279a89545e73b))
+- **GuildMember:** Add `flags` (#9087) ([76b2116](https://github.com/discordjs/discord.js/commit/76b21162aca7cd4897826437da3063524e1e7553))
+- **Client:** `guildAuditLogEntryCreate` event (#9058) ([9439107](https://github.com/discordjs/discord.js/commit/9439107a1d6a9b77b5f991973d96bc6100da4753))
+- Add role subscription data (#9025) ([1ba22f4](https://github.com/discordjs/discord.js/commit/1ba22f4c9e4173f8866339d3eadb2939d4b32034))
+- **Sticker:** Add support for gif stickers (#9038) ([6a9875d](https://github.com/discordjs/discord.js/commit/6a9875da054a875a4711394547d47439bbe66fb6))
+- **GuildAuditLogs:** Support `after` (#9011) ([0076589](https://github.com/discordjs/discord.js/commit/0076589ccc93e09d77a448874d1ceff5d0e91aa2))
+- Add role subscriptions (#8915) ([3407e1e](https://github.com/discordjs/discord.js/commit/3407e1eea3c8d5629465553f342ac30ceae27a47))
+- Add `not_found` to guild member chunk data (#8975) ([be294ea](https://github.com/discordjs/discord.js/commit/be294eaf9901ea139ce485deeec9178959ffa91f))
+- **ClientApplication:** Add role connections (#8855) ([22e2bbb](https://github.com/discordjs/discord.js/commit/22e2bbb0d24e3f30516f262308d5786f2f666713))
+- **CommandInteractionOptionResolver:** Add `channelTypes` option to `getChannel` (#8934) ([429dbcc](https://github.com/discordjs/discord.js/commit/429dbccc85cabd9986b2e8bf443bf384e4ddc61a))
+- **ForumChannel:** Add `defaultForumLayout` (#8895) ([cbafd47](https://github.com/discordjs/discord.js/commit/cbafd479b331633ed97f7b1a22ef03c6a2f4cf31))
+- Add support for nsfw commands (#7976) ([7a51344](https://github.com/discordjs/discord.js/commit/7a5134459c5f06864bf74631d83b96d9c21b72d8))
+- **InteractionResponse:** CreatedTimestamp (#8917) ([627511d](https://github.com/discordjs/discord.js/commit/627511d6522f772b84c25e6a3f6da06b06bb912e))
+- **Guild:** Add disableInvites method (#8801) ([45faa19](https://github.com/discordjs/discord.js/commit/45faa199820e7c4ccdb2997c7e3b353f566d2312))
+
+## Refactor
+
+- Compare with `undefined` directly (#9191) ([869153c](https://github.com/discordjs/discord.js/commit/869153c3fdf155783e7c0ecebd3627b087c3a026))
+- **GuildMemberManager:** Tidy up fetching guild members (#8972) ([4e0e125](https://github.com/discordjs/discord.js/commit/4e0e1250399aa12c340ac92a86ec2c05704fe2bb))
+- **BitField:** Reverse iterator/toArray responsibilities (#9118) ([f70df91](https://github.com/discordjs/discord.js/commit/f70df910ed12e397066d0bdb27343af21ead4d92))
+- Moved the escapeX functions from discord.js to @discord.js/formatters (#8957) ([13ce78a](https://github.com/discordjs/discord.js/commit/13ce78af6e3aedc793f53a099a6a615df44311f7))
+- Use `deprecate()` directly (#9026) ([1c871b5](https://github.com/discordjs/discord.js/commit/1c871b5b576dddef12c5afacecf416dbd6243dea))
+- **Guild:** Destructure object in guild editing (#8971) ([d3e9f2a](https://github.com/discordjs/discord.js/commit/d3e9f2a355a1f5272d62a507eb6ecd8808904fff))
+- **GuildManager:** Better handling of creation code (#8974) ([d7a09f6](https://github.com/discordjs/discord.js/commit/d7a09f6fcee30c31b4418166bf7bf9e894841f87))
+- **sharding:** Use switch statement (#8928) ([6540914](https://github.com/discordjs/discord.js/commit/6540914b4a7f244f5e40fe2a3b7e73986763d81b))
+- Use consistent naming for options (#8901) ([a7b55c1](https://github.com/discordjs/discord.js/commit/a7b55c1460cf63fb482f7d05657120eec96bee82))
+- **CommandInteractionOptionResolver:** Loosen mentionable checks (#8910) ([1b151db](https://github.com/discordjs/discord.js/commit/1b151db59c4340417f8a28a88064f45336ac8c78))
+
+## Styling
+
+- Run prettier (#9041) ([2798ba1](https://github.com/discordjs/discord.js/commit/2798ba1eb3d734f0cf2eeccd2e16cfba6804873b))
+
+## Typings
+
+- Allow sending messages with `SuppressNotifications` flag (#9177) ([71a427f](https://github.com/discordjs/discord.js/commit/71a427f6322be76fe2d1cb265de09f171b1b354a))
+- Remove `EscapeMarkdownOptions` (#9153) ([fd0246c](https://github.com/discordjs/discord.js/commit/fd0246ca4c75e60d8e117d9ac5af7067c7a63277))
+- **Attachment:** Make `attachment` private (#8982) ([da23cd5](https://github.com/discordjs/discord.js/commit/da23cd5d69de4856d075f00738f75c68c555ae5b))
+- Fix type of Attachment#name (#9101) ([4e0a89f](https://github.com/discordjs/discord.js/commit/4e0a89f58f43f362bfde80d8319dce767c62850f))
+- Allow builders to set channel types in discord.js (#8990) ([7dec892](https://github.com/discordjs/discord.js/commit/7dec892218f7b470a5f8e78732a524a53da24d26))
+- Swap message reaction and emoji identifier types (#8969) ([ad49845](https://github.com/discordjs/discord.js/commit/ad4984526020f2baeefaeeebbded66c6848c4b85))
+- **widget:** Add missing `name` (#8978) ([898b5ac](https://github.com/discordjs/discord.js/commit/898b5ac416cbbb415b125bb27221d0901fdd180e))
+- Use StringSelectMenuOptionBuilder (#8949) ([bec51de](https://github.com/discordjs/discord.js/commit/bec51de1038c35c6edaaa13934781758fe1951de))
+- Fix actions type in automod (#8962) ([5915f39](https://github.com/discordjs/discord.js/commit/5915f39810b712c05a46fa21ab4e12b4cfa3c25a))
+- Subcommand group `options` is required (#8966) ([5dc5e90](https://github.com/discordjs/discord.js/commit/5dc5e902688fc563087cd5061dcb59dd68fd4eda))
+- Add generic to `ActionRowBuilder.from()` (#8414) ([153352a](https://github.com/discordjs/discord.js/commit/153352ad7a1ccb4a9461523cf2597d81df93b69c))
+
+# [14.7.1](https://github.com/discordjs/discord.js/compare/14.7.0...14.7.1) - (2022-12-01)
+
+## Bug Fixes
+
+- Prevent crash on no select menu option (#8881) ([11d195d](https://github.com/discordjs/discord.js/commit/11d195d04ff57d51adb0f0d3a0a7342f9e34aba0))
+
+# [14.7.0](https://github.com/discordjs/discord.js/compare/14.6.0...14.7.0) - (2022-11-28)
+
+## Bug Fixes
+
+- **MessageMentions:** Add `InGuild` generic (#8828) ([f982803](https://github.com/discordjs/discord.js/commit/f9828034cd21e6f702762a46923e0f42115596f6))
+- **Activity:** Fix equals() not checking for differing emoji (#8841) ([7e06f68](https://github.com/discordjs/discord.js/commit/7e06f68185423ba7cb310220b213f445b6571e29))
+- Fixed react/astro/guide/discord.js build, updated dependencies, fix crawlvatar (#8861) ([d0c8256](https://github.com/discordjs/discord.js/commit/d0c82561b8a1765a1daa362ca903f3ffb3fa33ee))
+- **escapeMarkdown:** Fix double escaping (#8798) ([d6873b7](https://github.com/discordjs/discord.js/commit/d6873b7159352479475b3a0daa215bddbdd3a79b))
+- **Transfomers:** Call `.toJSON` in `toSnakeCase` (#8790) ([017f9b1](https://github.com/discordjs/discord.js/commit/017f9b1ed4014dc1db0b78c1a77e463b4403de5d))
+- Censor token in debug output (#8764) ([53d8e87](https://github.com/discordjs/discord.js/commit/53d8e87d7f3a329608250656950bd0a200adb1c7))
+- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4))
+
+## Documentation
+
+- Describe InteractionEditReplyOptions (#8840) ([cb77fd0](https://github.com/discordjs/discord.js/commit/cb77fd02d083438de2aff6f0769baf7d1797bc65))
+- **AutoModerationRuleManager:** Describe cache (#8848) ([d275480](https://github.com/discordjs/discord.js/commit/d2754802cc3479e6288cdbfcd48c76bf57e09a07))
+- Fix message action row components (#8819) ([65bc0ad](https://github.com/discordjs/discord.js/commit/65bc0adbf4d7870d33b92585ca18f964f24bc84e))
+- Specify `ActionRowBuilder` for `components` (#8834) ([8ed5c1b](https://github.com/discordjs/discord.js/commit/8ed5c1beb622f71ce0bd89e4cbeff50e464da8fe))
+- Add `@extends` for select menu classes (#8824) ([09f65b7](https://github.com/discordjs/discord.js/commit/09f65b724b0d2f36bbe89b83570c0d18093b5126))
+- Make WebSocketShard.lastPingTimestamp public (#8768) ([68c9cb3](https://github.com/discordjs/discord.js/commit/68c9cb37bc3df6326b720291827ea477e421faf2))
+- **MessageReplyOptions:** Remove duplicate stickers field (#8766) ([6e348ff](https://github.com/discordjs/discord.js/commit/6e348ffd1d8db8d8ad2da7823460814695e01a43))
+
+## Features
+
+- **Webhook:** Add `channel` property (#8812) ([decbce4](https://github.com/discordjs/discord.js/commit/decbce401062af75f633e6acacc88207b115a719))
+- Auto Moderation (#7938) ([fd4ba5e](https://github.com/discordjs/discord.js/commit/fd4ba5eaba66898699127fc0d5f0ab52c18e3db0))
+- **SelectMenuInteractions:** Add `values` property (#8805) ([b2fabd1](https://github.com/discordjs/discord.js/commit/b2fabd130a76ea54cfbfa1b871ef8659513c2c7a))
+- **ThreadChannel:** Add a helper for pin and unpin (#8786) ([e74aa7f](https://github.com/discordjs/discord.js/commit/e74aa7f6b0fe04e3473fc4a62a73a7db87307685))
+- Add `Message#bulkDeletable` (#8760) ([ff85481](https://github.com/discordjs/discord.js/commit/ff85481d3e7cd6f7c5e38edbe43b27b104e82fba))
+- New select menus (#8793) ([5152abf](https://github.com/discordjs/discord.js/commit/5152abf7285581abf7689e9050fdc56c4abb1e2b))
+- **InteractionResponses:** Add message parameter (#8773) ([8b400ca](https://github.com/discordjs/discord.js/commit/8b400ca975c6bad00060b9c67068f42bd53524ba))
+- Support resume urls (#8784) ([88cd9d9](https://github.com/discordjs/discord.js/commit/88cd9d906074eb79e85df0ef49287f11133d2e0d))
+- Allow deletion of ephemeral messages (#8774) ([fc10774](https://github.com/discordjs/discord.js/commit/fc107744618857bf28c2167f204253baf690ede8))
+- **GuildChannelManager:** Add `.addFollower()` method (#8567) ([caeb1cb](https://github.com/discordjs/discord.js/commit/caeb1cbfdb2f2f007252c4d7e9f47a575c24bcb5))
+
+## Refactor
+
+- **Embed:** Use `embedLength` function from builders (#8735) ([cb3826c](https://github.com/discordjs/discord.js/commit/cb3826ce6dbcd3cf7ab639af6cdfcea80336aa1d))
+
+# [14.6.0](https://github.com/discordjs/discord.js/compare/14.5.0...14.6.0) - (2022-10-10)
+
+## Bug Fixes
+
+- **ClientOptions:** Make `ClientOptions#intents` returns an IntentsBitField (#8617) ([4c2955a](https://github.com/discordjs/discord.js/commit/4c2955a5de6779c29c09e63ba9ad2b235904f842))
+- Correctly construct a builder (#8727) ([e548e6a](https://github.com/discordjs/discord.js/commit/e548e6a10b7e1720f5e8f3c859b0b64d5134a012))
+- **Components:** Error with unknown components (#8724) ([6fd331d](https://github.com/discordjs/discord.js/commit/6fd331dd528e78fd023c908bd58af3faa9ed6c65))
+- **Client:** Don't auth for webhook fetches with token (#8709) ([01d75c8](https://github.com/discordjs/discord.js/commit/01d75c8b8b14f33c95a4da83a8494db848beeb8c))
+- Re-export util (#8699) ([a306219](https://github.com/discordjs/discord.js/commit/a306219673335584accd2ff77ab34d2812ef6c5d))
+- Throw discord.js errors correctly (#8697) ([ace974f](https://github.com/discordjs/discord.js/commit/ace974fc1fdbc5bcaa0d7f6f6d17de185c9f9cbf))
+
+## Documentation
+
+- **Utils:** Remove `private` from `parseEmoji` (#8718) ([a31e605](https://github.com/discordjs/discord.js/commit/a31e605e09064a300e31a3c91466b613654ba98e))
+- Update UserContextMenuCommandInteraction documentation (#8717) ([7556db2](https://github.com/discordjs/discord.js/commit/7556db243d9480949835668fcb5724fdd5d70e08))
+- Fix `AwaitMessageComponentOptions` typedef (#8696) ([9effd82](https://github.com/discordjs/discord.js/commit/9effd82abe82ba71ae627673da21ba07e1ede23e))
+
+## Features
+
+- **Util:** Escape more markdown characters (#8701) ([7b8966b](https://github.com/discordjs/discord.js/commit/7b8966bca156db79933403289741893a6e10ccd5))
+- **GuildChannelManager:** Allow creating channels with a default auto archive duration (#8693) ([628759b](https://github.com/discordjs/discord.js/commit/628759bcff8b0d4c77926cee2b8c18d8fdb4c260))
+- Add `@discordjs/util` (#8591) ([b2ec865](https://github.com/discordjs/discord.js/commit/b2ec865765bf94181473864a627fb63ea8173fd3))
+- **ForumChannel:** Add `defaultSortOrder` (#8633) ([883f6e9](https://github.com/discordjs/discord.js/commit/883f6e9202a559c986f4b15fccb422b5aea7bea8))
+
+## Refactor
+
+- Rename Error to DiscordjsError internally (#8706) ([aec44a0](https://github.com/discordjs/discord.js/commit/aec44a0c93f620b22242f35e626d817e831fc8cb))
+
+## Typings
+
+- Fix events augmentation (#8681) ([ac83ada](https://github.com/discordjs/discord.js/commit/ac83ada306ec153c13260d2bd53e4d704884b68a))
+- **Message:** Remove `& this` from `#inGuild` typeguard (#8704) ([c0f7a1a](https://github.com/discordjs/discord.js/commit/c0f7a1a89a4cf62edc7065bd200b2ce4018e0a27))
+- **ModalBuilder:** Fix constructor typings (#8690) ([2ea2a85](https://github.com/discordjs/discord.js/commit/2ea2a85e6335d57f44689f9b6e284129104de8fc))
+
+# [14.5.0](https://github.com/discordjs/discord.js/compare/14.4.0...14.5.0) - (2022-09-25)
+
+## Bug Fixes
+
+- **ThreadChannel:** Add forum channel to parent (#8664) ([0126d9b](https://github.com/discordjs/discord.js/commit/0126d9b810a156c4bf1b8b93f2121f3319855bac))
+- **GuildChannelManager:** Allow creating webhooks on forums (#8661) ([16fcdc3](https://github.com/discordjs/discord.js/commit/16fcdc36877d1a65ce9995c9fe3502aa268c9388))
+- **ForumChannel:** Implement missing properties and methods (#8662) ([8622939](https://github.com/discordjs/discord.js/commit/862293922924f453f69b0b0f8efe87ddebbd387d))
+- RepliableInteraction respect cached generic (#8667) ([578bc95](https://github.com/discordjs/discord.js/commit/578bc951bdcdc21ec5aee86e7a47a17e8c867dfc))
+- **ThreadChannel:** Allow editing flags (#8671) ([1244854](https://github.com/discordjs/discord.js/commit/1244854e1365d7e4a8d01703a7ec13610ed100c7))
+- **GuildChannelManager:** Typo in `flags` property name when editing (#8669) ([fc8ed81](https://github.com/discordjs/discord.js/commit/fc8ed816e643754a938211a17b41a2cec95df265))
+
+## Documentation
+
+- Fix duplicate typedefs (#8677) ([d79aa2d](https://github.com/discordjs/discord.js/commit/d79aa2d0d0b186bd28cbfc82f3d6ecf3deb41c50))
+- **ForumChannel:** Add `@implements` (#8678) ([8ca407e](https://github.com/discordjs/discord.js/commit/8ca407e089c3050b61a51a52b9100e4613ad1666))
+
+## Features
+
+- **GuildChannelManager:** Allow editing `flags` (#8637) ([abb7226](https://github.com/discordjs/discord.js/commit/abb7226af3445f5b724815bb2f7a121a52a563b5))
+
+## Refactor
+
+- **GuildBanManager:** Add deprecation warning for `deleteMessageDays` (#8659) ([e993122](https://github.com/discordjs/discord.js/commit/e9931229ae62a120ae0761ee2a2c10ea0cb1a6fb))
+
+## Typings
+
+- **GuildChannelManager:** Handle forum channel overload (#8660) ([1486bc9](https://github.com/discordjs/discord.js/commit/1486bc9336369d229972df5e28b9428365b92bff))
+- **Caches:** Allow `GuildForumThreadManager` and `GuildTextThreadManager` (#8665) ([2487e3b](https://github.com/discordjs/discord.js/commit/2487e3bf76260a4a2fbf375e0b01a43f347922a3))
+
+# [14.4.0](https://github.com/discordjs/discord.js/compare/14.3.0...14.4.0) - (2022-09-21)
+
+## Bug Fixes
+
+- Correct applied tags type (#8641) ([f6f15d8](https://github.com/discordjs/discord.js/commit/f6f15d8e877d4ffbe908a093e64809ef9015e0ff))
+- **ThreadChannel:** Make `fetchStarterMessage()` work in forum posts (#8638) ([a7f816e](https://github.com/discordjs/discord.js/commit/a7f816eeb7fa1e193cf0901efbdcaf629f72465f))
+- Update `messageCount`/`totalMessageSent` on message events (#8635) ([145eb2f](https://github.com/discordjs/discord.js/commit/145eb2fc5db5ca739aa9782d5ec5210f81a6aeeb))
+- Footer / sidebar / deprecation alert ([ba3e0ed](https://github.com/discordjs/discord.js/commit/ba3e0ed348258fe8e51eefb4aa7379a1230616a9))
+
+## Documentation
+
+- Correctly overwrite `setRTCRegion` method (#8642) ([f049734](https://github.com/discordjs/discord.js/commit/f0497343f1193635b260b9e2085cac7b43991f74))
+- **GuildTextThreadManager:** Document correct `@extend` (#8639) ([802b239](https://github.com/discordjs/discord.js/commit/802b2394b08151faab6810695fd5c8f27ce84d58))
+- Fix regexps incorrectly being called global (#8624) ([fc9653f](https://github.com/discordjs/discord.js/commit/fc9653f5aea4013da15fb8de0a4452400eaa7739))
+- Update misleading `Client#guildMemberAvailable` event description (#8626) ([22ac6b4](https://github.com/discordjs/discord.js/commit/22ac6b4660db6b02f62b9851e9e3bcfe5fb506b5))
+- **Options:** Update DefaultMakeCacheSettings (#8585) ([3252332](https://github.com/discordjs/discord.js/commit/32523325c6610e95fe3ffcc31d005b3418c6bc68))
+- Change name (#8604) ([dd5a089](https://github.com/discordjs/discord.js/commit/dd5a08944c258a847fc4377f1d5e953264ab47d0))
+
+## Features
+
+- **Widget:** Allow forum channels (#8645) ([b106956](https://github.com/discordjs/discord.js/commit/b1069563086fc616fe21abb789f28f69e57c8851))
+- **WelcomeChannel:** Add forum channel as a type (#8643) ([6f1f465](https://github.com/discordjs/discord.js/commit/6f1f465a77e362e20ec50067be0e634d35946ba5))
+- Allow forum channels in webhook update event (#8646) ([5048a3d](https://github.com/discordjs/discord.js/commit/5048a3d17ace22336e74451d30b513b3db42a26f))
+- Add support for guild forums (#7791) ([8a8d519](https://github.com/discordjs/discord.js/commit/8a8d519c9c4c082370fc6935b56dafb525b873df))
+- **GuildBanManager#create:** Add `deleteMessageSeconds` (#8326) ([03fb5b0](https://github.com/discordjs/discord.js/commit/03fb5b0a2f45275dec7885175ad691a1d9c449c4))
+- Add typeguard to BaseInteraction#isRepliable (#8565) ([55c3ee2](https://github.com/discordjs/discord.js/commit/55c3ee20ae700e78d18a3c4c04b6a7426cffc060))
+- **Integration:** Add `scopes` (#8483) ([8b3d006](https://github.com/discordjs/discord.js/commit/8b3d0061180cfd5d9ba8beae3e8d623b5ce43ea4))
+- Add `chatInputApplicationCommandMention` formatter (#8546) ([d08a57c](https://github.com/discordjs/discord.js/commit/d08a57cadd9d69a734077cc1902d931ab10336db))
+
+## Refactor
+
+- Replace usage of deprecated `ChannelType`s (#8625) ([669c3cd](https://github.com/discordjs/discord.js/commit/669c3cd2566eac68ef38ab522dd6378ba761e8b3))
+- Split message send/edit types/documentation (#8590) ([8e1afae](https://github.com/discordjs/discord.js/commit/8e1afaebdb686033555ca58e53f34bb97f7369c8))
+- Website components (#8600) ([c334157](https://github.com/discordjs/discord.js/commit/c3341570d983aea9ecc419979d5a01de658c9d67))
+
+## Typings
+
+- Narrow channel type in thread managers (#8640) ([14bbc91](https://github.com/discordjs/discord.js/commit/14bbc9150a748e7ac1660c2375c7f065fcc55a6c))
+- **interactions:** Pass `Cached` type to return type of methods (#8619) ([053da5b](https://github.com/discordjs/discord.js/commit/053da5bc91d5cfa8d842b13b0b05083d2f7f086d))
+- Ensure events possess `Client<true>` (#8612) ([a9f003a](https://github.com/discordjs/discord.js/commit/a9f003ac9b56d31166cbf353d02140dad0b2517e))
+- **GuildChannelManager:** Correct `fetch` return type (#8549) ([1d4cdee](https://github.com/discordjs/discord.js/commit/1d4cdee321ab25bb0f109d55a000582825dd79f9))
+- **ThreadChannel:** `fetchStarterMessage` must return a `Message<true>` (#8560) ([b9c62ac](https://github.com/discordjs/discord.js/commit/b9c62ac0f0f534c33f9913135095f8b3d98ec05e))
+- **webhook:** Avatar can be null (#8541) ([f77612a](https://github.com/discordjs/discord.js/commit/f77612a55e9c593a21bc27e58c9fbd03d85787e3))
+
+# [14.3.0](https://github.com/discordjs/discord.js/compare/14.2.0...14.3.0) - (2022-08-22)
+
+## Bug Fixes
+
+- **GuildMemberManager:** `add()` method throws an error (#8539) ([3bef901](https://github.com/discordjs/discord.js/commit/3bef9018c0be3c5dc51d03b796d08b925dc4e1b9))
+- **Guild:** Widget channel types and fixes (#8530) ([23a0b6c](https://github.com/discordjs/discord.js/commit/23a0b6ccf27410963bd4f5c53d9ee2ce019e90a8))
+- **Embed:** Reference video in video (#8473) ([c97977a](https://github.com/discordjs/discord.js/commit/c97977a3e806bd5d8682bc7fb22ebec1a8ceecdc))
+
+## Documentation
+
+- **GuildAuditLogsEntry:** Correct `action` wording (#8499) ([7d25072](https://github.com/discordjs/discord.js/commit/7d2507279cc9d1397c7d61e7c7b856ff4bc17c86))
+
+## Features
+
+- **GuildMemberManager:** AddRole and removeRole (#8510) ([cda3f00](https://github.com/discordjs/discord.js/commit/cda3f005b1546fdb8410e9550526956f840857fc))
+- Deprecate `ActionRow.from()` (#8504) ([f9c25dd](https://github.com/discordjs/discord.js/commit/f9c25ddcfe68f089e13f1090c3df4bd7cd74d2b7))
+- **WebSocketShard:** Support new resume url (#8480) ([bc06cc6](https://github.com/discordjs/discord.js/commit/bc06cc638d2f57ab5c600e8cdb6afc8eb2180166))
+
+## Refactor
+
+- **GuildAuditLogsEntry:** Remove `guild` from application command permission update extra (#8520) ([2b8074d](https://github.com/discordjs/discord.js/commit/2b8074dd12f2f1e957caffb57e5fd4d7be88dc25))
+
+## Typings
+
+- Inference of guild in `MessageManager` (#8538) ([6bb1474](https://github.com/discordjs/discord.js/commit/6bb1474d2001b76773954c959b2c2687e1df0136))
+- Allow choice's value type to be strictly inferred (#8529) ([b3f7c32](https://github.com/discordjs/discord.js/commit/b3f7c32f7f91f12766178f5e17585856e81d9a87))
+- **GuildAuditLogs:** Allow fetching to return all possible values (#8522) ([0dba8ad](https://github.com/discordjs/discord.js/commit/0dba8adbd2e6efd634bd3eb31df09467ba8a8a0d))
+- Correct `EventEmitter.on (static)` return type (#8524) ([16bbc8a](https://github.com/discordjs/discord.js/commit/16bbc8aa208a8a16c22be24696f57d5f7a5faf2b))
+- **GuildAuditLogs:** Remove static `Entry` (#8521) ([7a3d18d](https://github.com/discordjs/discord.js/commit/7a3d18dd6d1fe27393d00019b9ecd35c98b95ee7))
+- Disallow some channel types from webhook creation (#8531) ([4882b17](https://github.com/discordjs/discord.js/commit/4882b17a77484f801faa19fb971f2e6abd88e59f))
+- Implement max/min values for autocomplete (#8498) ([812f7f1](https://github.com/discordjs/discord.js/commit/812f7f1ea86fc953aa796875cbc7ccc434203d77))
+- **ModalMessageModalSubmitInteraction:** ChannelId is not nullable (#8496) ([c31a5cf](https://github.com/discordjs/discord.js/commit/c31a5cfcc82706667768eac77b5f99ba69cf3c91))
+- Change type of ApplicationCommandSubCommand.options (#8476) ([ebaf158](https://github.com/discordjs/discord.js/commit/ebaf158006d3c7db3b8c695e7c027b8af11999ba))
+
+# [14.2.0](https://github.com/discordjs/discord.js/compare/14.1.2...14.2.0) - (2022-08-10)
+
+## Bug Fixes
+
+- **ThreadChannel:** Handle possibly `null` parent (#8466) ([afa27b1](https://github.com/discordjs/discord.js/commit/afa27b15c5b92bc8d55b8285834d8e03f6692d06))
+- Remove DM channels from `Client#messageDeleteBulk`'s types (#8460) ([6c6fe74](https://github.com/discordjs/discord.js/commit/6c6fe74dd84859c5319efa999404e8168f189710))
+- **Transformers:** Do not transform `Date` objects (#8463) ([0e2a095](https://github.com/discordjs/discord.js/commit/0e2a09571c8e5ee61153b04e45334a226a1b4534))
+- **ModalSubmitInteraction:** Allow deferUpdate (#8455) ([0fab869](https://github.com/discordjs/discord.js/commit/0fab869e5179dca7ddec75b5519615278e51ad82))
+- **Guild:** Unable to fetch templates (#8420) ([aac8acc](https://github.com/discordjs/discord.js/commit/aac8acc22be7d7af99933ef099eca7deda43cb40))
+- **MessageMentions:** Infinite loop in `parsedUsers` getter (#8430) ([b8a3136](https://github.com/discordjs/discord.js/commit/b8a31360a220e3d796f5381bd215d30a379ecb7c))
+- **DataResolver:** Make `Buffer` from string (#8416) ([e72b986](https://github.com/discordjs/discord.js/commit/e72b986939e2958547c0e54d6d27472c8d111609))
+
+## Documentation
+
+- Change registration example to use global commands (#8454) ([64a4041](https://github.com/discordjs/discord.js/commit/64a4041a05e9514334a9f9e1f38a1ea18bb676d5))
+- **Colors:** Provide enum descriptions (#8437) ([6ef4754](https://github.com/discordjs/discord.js/commit/6ef4754d40c5ec65715fc1e00e643c52fe0a6209))
+- **AttachmentBuilder:** Fix #8407 (#8421) ([5b053cf](https://github.com/discordjs/discord.js/commit/5b053cf82ec2f2b717a490485af052dc956fe3c9))
+
+## Features
+
+- **Guild:** Add `max_video_channel_users` (#8423) ([3a96ce7](https://github.com/discordjs/discord.js/commit/3a96ce7970947f6268c21a1323d986aac8cb736d))
+
+## Typings
+
+- **Message:** Correct `bulkDelete` return type (#8465) ([c5b96a1](https://github.com/discordjs/discord.js/commit/c5b96a185cb8ba836b7cd10526c14059866f218f))
+- Fix missing types for mentionable options (#8443) ([452e94f](https://github.com/discordjs/discord.js/commit/452e94fd3ecc12de9e3408982c5c7fd931bae634))
+- **ApplicationCommandOption:** Add `ApplicationCommandBooleanOption` (#8434) ([38275fc](https://github.com/discordjs/discord.js/commit/38275fc53d633ce77ed2b142aff788dcbd4fad8c))
+
+# [14.1.2](https://github.com/discordjs/discord.js/compare/14.1.1...14.1.2) - (2022-07-30)
+
+## Bug Fixes
+
+- **errors:** Error codes (#8398) ([480c85c](https://github.com/discordjs/discord.js/commit/480c85c9c3d129204b3399ed726a4e570e0b2852))
+
+## Documentation
+
+- **Embed:** Ensure height and width are numbers (#8396) ([fca3dad](https://github.com/discordjs/discord.js/commit/fca3dada2a565eecfc7e5275cc9317df1d261871))
+
+# [14.1.0](https://github.com/discordjs/discord.js/compare/14.0.3...14.1.0) - (2022-07-29)
+
+## Bug Fixes
+
+- **MessageMentions:** `ignoreRepliedUser` option in `has()` (#8202) ([b4e2c0c](https://github.com/discordjs/discord.js/commit/b4e2c0c4d5538b945f9d597c6410a6f84b315084))
+- **GuildChannelManager:** Allow unsetting rtcRegion (#8359) ([a7d49e5](https://github.com/discordjs/discord.js/commit/a7d49e56fc7c34d2e4548d9e5bf0aec45273506e))
+- **ThreadChannel:** Omit webhook fetching (#8351) ([3839958](https://github.com/discordjs/discord.js/commit/3839958e3f682c715f1017da05436d2fe34900fd))
+- **GuildAuditLogsEntry:** Replace OverwriteType with AuditLogOptionsType (#8345) ([58c1b51](https://github.com/discordjs/discord.js/commit/58c1b51c5ceab137ad9851919b338419eeeab69e))
+- **ShardClientUtil#_respond:** Construct global error (#8348) ([8e520f9](https://github.com/discordjs/discord.js/commit/8e520f946a5b9f93a939290facf4ccca2c05ff21))
+- **Presence:** Do not return NaN for activity timestamp (#8340) ([df42fdf](https://github.com/discordjs/discord.js/commit/df42fdfc421f1190f0a2267a66efd3c921ec2348))
+- **Client:** Omit private properties from toJSON (#8337) ([830c670](https://github.com/discordjs/discord.js/commit/830c670c61dcb17d8ab2a894a3203c68917d27e0))
+- **ApplicationCommandManager:** Allow passing 0n to defaultMemberPermissions (#8311) ([1fb7b30](https://github.com/discordjs/discord.js/commit/1fb7b30963cfe7ea4c05b1f3b42171c879c46a1d))
+
+## Documentation
+
+- **InteractionResponses:** Add `showModal()` return type (#8376) ([0b61dbf](https://github.com/discordjs/discord.js/commit/0b61dbf720e844322b066e30080c3537ab3d8174))
+- **WebhookClient:** Document working options (#8375) ([ba6797e](https://github.com/discordjs/discord.js/commit/ba6797e74209161b64c412de1b6f307cb28736b8))
+- **Message:** Document gateway intent for content (#8364) ([2130aae](https://github.com/discordjs/discord.js/commit/2130aae3210a8eaf91c5ccae5463940d49052c7d))
+- Use info blocks for requirements (#8361) ([80b9738](https://github.com/discordjs/discord.js/commit/80b9738957ebf5b6eb7c9858cec0fb1c897d0a1f))
+- **WebhookClient:** Make constructor a union (#8370) ([e9920a9](https://github.com/discordjs/discord.js/commit/e9920a9c98ffb78bd7d0ae00d486476367296646))
+- Update docs and examples to PascalCase links (#8305) ([34ba9d1](https://github.com/discordjs/discord.js/commit/34ba9d1c4c80eff7e6ac199a40232d07491432cc))
+
+## Features
+
+- Add channel & message URL formatters (#8371) ([a7deb8f](https://github.com/discordjs/discord.js/commit/a7deb8f89830ead6185c5fb46a49688b6d209ed1))
+- Restore missing typeguards (#8328) ([77ed407](https://github.com/discordjs/discord.js/commit/77ed407f6aadb68e729470c5269e9b526cb1b3f0))
+- **GuildMember:** Add dmChannel getter (#8281) ([4fc2c60](https://github.com/discordjs/discord.js/commit/4fc2c60a3bb43671b4b0202ae75eab42aba163ff))
+
+## Refactor
+
+- Deprecate `Formatter` class (#8373) ([7fd9ed8](https://github.com/discordjs/discord.js/commit/7fd9ed8f13d17ce7e98e34f7454d9047054d8467))
+- **PermissionOverwriteManager:** Use `OverwriteType` (#8374) ([6d24805](https://github.com/discordjs/discord.js/commit/6d248051cfd431e9cb1c65cb98f56aa0a6556407))
+
+## Typings
+
+- **GuildAuditLogsEntryExtraField:** Use `AuditLogOptionsType` (#8349) ([200ab91](https://github.com/discordjs/discord.js/commit/200ab91f527d8a5706d277b89a975096f75d141a))
+
+# [14.0.3](https://github.com/discordjs/discord.js/compare/14.0.2...14.0.3) - (2022-07-19)
+
+## Bug Fixes
+
+- **Components:** Support emoji id strings (#8310) ([660e212](https://github.com/discordjs/discord.js/commit/660e212e83df026c684ee2cda7fb4e98870f342e))
+
+# [14.0.2](https://github.com/discordjs/discord.js/compare/14.0.1...14.0.2) - (2022-07-18)
+
+## Bug Fixes
+
+- **DataResolver#resolveImage:** Adjust to updated resolveFile (#8308) ([3a7e93d](https://github.com/discordjs/discord.js/commit/3a7e93df576172c797f1d8bd6483234bb6af2d00))
+
+# [14.0.0](https://github.com/discordjs/discord.js/compare/9.3.1...14.0.0) - (2022-07-17)
+
+## Bug Fixes
+
+- **GuildMemberManager:** Allow setting own nickname (#8066) ([52a9e21](https://github.com/discordjs/discord.js/commit/52a9e213c2dc13ee52ee0234593fdce392f43890))
+- **PermissionOverwriteManager:** Mutates user (#8283) ([3bf30b1](https://github.com/discordjs/discord.js/commit/3bf30b1e6d2d6f583f7069a1e24e7842d59fab2f))
+- **GuildChannelManager:** Access `resolveId` correctly (#8296) ([3648f6d](https://github.com/discordjs/discord.js/commit/3648f6d567cd834c301de913ce19f786a265240d))
+- **GuildChannelManager:** Edit lockPermissions (#8269) ([7876548](https://github.com/discordjs/discord.js/commit/787654816d2b6a5168d199d32cdaeb4ef6d270b9))
+- **`SelectMenuBuilder`:** Properly accept `SelectMenuOptionBuilder`s (#8174) ([31d5930](https://github.com/discordjs/discord.js/commit/31d593046466438c55f5784b0f2098e233c5edc4))
+- Remove global flag on regular expressions (#8177) ([cdd9214](https://github.com/discordjs/discord.js/commit/cdd9214212892e30b3eaa161837c37516c5bcaa0))
+- **MessagePayload:** Guard against `repliedUser` property (#8211) ([fa010b5](https://github.com/discordjs/discord.js/commit/fa010b516254c4ab2762278817f31bf289f0ab6a))
+- **ApplicationCommandManager:** Explicitly allow passing builders to methods (#8209) ([50d55bd](https://github.com/discordjs/discord.js/commit/50d55bd6b819307c86701f4808c087f359c6ccff))
+- **GuildMemberRemove:** Remove member's presence (#8181) ([11b1739](https://github.com/discordjs/discord.js/commit/11b173931968c548f8504649ae7090865892e62d))
+- Edit() data can be partial and `defaultMemberPermissions` can be `null` (#8163) ([0ffbef5](https://github.com/discordjs/discord.js/commit/0ffbef506a97a0bf22cb134fc007c2aec29cbffc))
+- **WebSocketShard:** Keep an error handler on connections (#8150) ([c34c02a](https://github.com/discordjs/discord.js/commit/c34c02ab8d119bf16d8d14d125a9b650b4bb18f4))
+- **DJSError:** Error code validation (#8149) ([31f6582](https://github.com/discordjs/discord.js/commit/31f658247fe0e1047897edab629643d140e77e07))
+- **vcs:** Nsfw property (#8132) ([2eeaad6](https://github.com/discordjs/discord.js/commit/2eeaad6f27fdf8868364fa95ed20755ee09bda87))
+- **WebSocketManager:** Correct error name (#8138) ([db2b033](https://github.com/discordjs/discord.js/commit/db2b0333d912fe83381db2ffe16829d7d03d6c2e))
+- **WebSocketShard:** Disconnected casing (#8117) ([23e183a](https://github.com/discordjs/discord.js/commit/23e183a9ac7aaa3bca2bc4eb8634d1738ec34a26))
+- **webhooks:** Revert webhook caching (and returning Message) (#8038) ([d54bf5d](https://github.com/discordjs/discord.js/commit/d54bf5d286f4057db130901591b192fd4d1668c1))
+- **ApplicationCommand:** Remove `autocomplete` check at the top level and correctly check for `dmPermission` (#8100) ([0a44b05](https://github.com/discordjs/discord.js/commit/0a44b05db83948857afbe18471e7a867da47177a))
+- **ApplicationCommand:** Fix default member permissions assignment (#8067) ([96053ba](https://github.com/discordjs/discord.js/commit/96053babe1bd65ebe1fc6a261f5eb052906afdb9))
+- **scripts:** Read directory and rerun (#8065) ([f527dea](https://github.com/discordjs/discord.js/commit/f527dea36ead194aaae1bf5da1e953df59d692fd))
+- Select menu options to accept both rest and array (#8032) ([fbe67e1](https://github.com/discordjs/discord.js/commit/fbe67e102502b4b49690cbf8ff891ead2232ecf3))
+- **CommandInteractionOptionResolver:** Handle autocompletion interactions (#8058) ([d8077c6](https://github.com/discordjs/discord.js/commit/d8077c6839dc8ceb57d3c3a86bf9746be2a91ada))
+- **scripts:** Add quotes around blob arguments (#8054) ([598f61b](https://github.com/discordjs/discord.js/commit/598f61b992fab1b3fdcab8ff960366f7af0b37ea))
+- **Message:** Force fetching (#8047) ([f2b267c](https://github.com/discordjs/discord.js/commit/f2b267c079dd8aa7277910471f3db2f88af6efb2))
+- **Attachment:** Do not destructure `data` (#8041) ([1afae90](https://github.com/discordjs/discord.js/commit/1afae909d72e648cf48d63d7de2708737a78c126))
+- **DirectoryChannel:** Type `name` and handle `url` (#8023) ([86d8fbc](https://github.com/discordjs/discord.js/commit/86d8fbc023e3925e8f86799d6ebf2d423f7bf2ec))
+- Readd `isThread` type guard (#8019) ([f8ed71b](https://github.com/discordjs/discord.js/commit/f8ed71bfca6e47e3d44ad063e23804354bd23604))
+- Add static method `from` in builders (#7990) ([ad36c0b](https://github.com/discordjs/discord.js/commit/ad36c0be7744ea4214ccf345fe80a5a1a9e89101))
+- Typings (#7965) ([7a1095b](https://github.com/discordjs/discord.js/commit/7a1095b66be3c5d81185e026281e2908c10c1695))
+- **GuildAuditLogs:** Cache guild scheduled events (#7951) ([2f03f9a](https://github.com/discordjs/discord.js/commit/2f03f9ad3f63abee5b5c46d02f1afa8885e8977c))
+- Make sure action row builders create djs builders (#7945) ([adf461b](https://github.com/discordjs/discord.js/commit/adf461baf49be754c7a10c61faf1ef3df333413a))
+- **TextBasedChannel#bulkDelete:** Return deleted message (#7943) ([191510b](https://github.com/discordjs/discord.js/commit/191510b7f87903e4bd93b891649cb290fd50c47e))
+- Remove trailing invites on channel deletion (#7932) ([5e9b757](https://github.com/discordjs/discord.js/commit/5e9b757a3733e6526770eb60a15072612294eb21))
+- **DataResolver:** Fix check for readable streams (#7928) ([28172ca](https://github.com/discordjs/discord.js/commit/28172ca7b57357436d3252ec01ec17dad865d87f))
+- **AuditLog:** Default changes to empty array (#7880) ([19eaed6](https://github.com/discordjs/discord.js/commit/19eaed63905367ef4604366b8839023384524d1f))
+- **Util:** Flatten ignoring certain fields (#7773) ([df64d3e](https://github.com/discordjs/discord.js/commit/df64d3ea382c07e66bc7cc8877ee430206c31d63))
+- Possibly missing (#7829) ([6239d83](https://github.com/discordjs/discord.js/commit/6239d83c4d5f0a396678410d7fef35e39ed29009))
+- `endReason` not being properly set in base Collector (#7833) ([0c18dab](https://github.com/discordjs/discord.js/commit/0c18dab1280205b8855d17d075b7421860d59c14))
+- **SelectMenuBuilder:** Options array (#7826) ([3617093](https://github.com/discordjs/discord.js/commit/361709332bdc871822c2b9919f14fd090d68666a))
+- **Activity:** Platform type (#7805) ([4ac91c6](https://github.com/discordjs/discord.js/commit/4ac91c61d08111ae4d49d1e64caf94e6e49832c8))
+- **ApplicationCommand:** Equal nameLocalizations and descriptionLocalizations (#7802) ([4972bd8](https://github.com/discordjs/discord.js/commit/4972bd87c17cbc6a94c9608ba2ab39c475f9921f))
+- **InteractionResponses:** Use optional chaining on nullable property (#7812) ([c5fb548](https://github.com/discordjs/discord.js/commit/c5fb54852906898ffb19282dd60168dfc6fb2eba))
+- **MessageManager:** Allow caching option of an unspecified limit (#7763) ([1b2d8de](https://github.com/discordjs/discord.js/commit/1b2d8decb638faeae8184119c5cedfcdaf9485e3))
+- **builders:** Add constructor default param (#7788) ([c286650](https://github.com/discordjs/discord.js/commit/c2866504a3824005fe756556fec4b349898b7d22))
+- **MessagePayload:** ResolveBody check body instead of data (#7738) ([3db20ab](https://github.com/discordjs/discord.js/commit/3db20abdd2d502a1ed457842181b164dc6390ba1))
+- **ActionRow:** ToJSON should include components (#7739) ([ebb4dfa](https://github.com/discordjs/discord.js/commit/ebb4dfa262adb2086c83db487002bb2e1ed5ab88))
+- Prevent `NaN` for nullable timestamps (#7750) ([8625d81](https://github.com/discordjs/discord.js/commit/8625d817145eb642aeb0da05184352f438586986))
+- **InteractionCreateAction:** Ensure text-based channel for caching messages (#7755) ([25fdb38](https://github.com/discordjs/discord.js/commit/25fdb3894d33dc395a376a3d962a063eb5735253))
+- Pass `force` correctly (#7721) ([402514f](https://github.com/discordjs/discord.js/commit/402514ff323ccf1f8c95d295f044cf0bb5547c2e))
+- Support reason in setRTCRegion helpers (#7723) ([905a6a1](https://github.com/discordjs/discord.js/commit/905a6a11663f9469ada67f8310a969453ffc5b2a))
+- **GuildMemberManager:** Return type can be null (#7680) ([74bf7d5](https://github.com/discordjs/discord.js/commit/74bf7d57ab959eb820ab1c213ac86ab1ea660398))
+- **gateway:** Use version 10 (#7689) ([8880de0](https://github.com/discordjs/discord.js/commit/8880de0cecdf273fd6df23988e4cb77774a75390))
+- Audit log static reference (#7703) ([85e531f](https://github.com/discordjs/discord.js/commit/85e531f22d7a8f8ad043647ce445726ae0df26c0))
+- Handle possibly missing property (#7641) ([0c32332](https://github.com/discordjs/discord.js/commit/0c32332a5aacbbb6c415da75c166d09cfdb34bbd))
+- **util:** Allow `escapeInlineCode` to escape double backtics (#7638) ([d5369a5](https://github.com/discordjs/discord.js/commit/d5369a56e3fcf50513f3bc582552c2838b04d199))
+- **GuildEditData:** Some fields can be null (#7632) ([4d2b559](https://github.com/discordjs/discord.js/commit/4d2b55955d1a3ff05c3047599232becdc3f2c445))
+- TOKEN_INVALID error not thrown at login with invalid token (#7630) ([cd79bef](https://github.com/discordjs/discord.js/commit/cd79bef2547594f4d0c744faa8fa67fb9fd61526))
+- **GuildScheduledEvent:** Handle missing `image` (#7625) ([c684ac5](https://github.com/discordjs/discord.js/commit/c684ac55e1d225740e67ab7bd5643de1b35f4594))
+- **guild:** Throw if ownerId falsey (#7575) ([98177aa](https://github.com/discordjs/discord.js/commit/98177aa38d3d6516d4c5354d6c7edea925dc881d))
+- Remove Modal export (#7654) ([87a6b84](https://github.com/discordjs/discord.js/commit/87a6b8445bfbf3981cd39813fe961dfa1c7f2bce))
+- **Embed:** Fix incorrect destructuring import (#7615) ([cbdb408](https://github.com/discordjs/discord.js/commit/cbdb408dffd1c7f2193c15989528a3de5fd9f13a))
+- **ThreadMembersUpdate:** Only emit added & removed thread members (#7539) ([c12d61a](https://github.com/discordjs/discord.js/commit/c12d61a3421afcdc41f77c0fddde4efbb257fa69))
+- **Util:** EscapeInlineCode properly (#7587) ([851f380](https://github.com/discordjs/discord.js/commit/851f380eb10d23ffd08e8b845aed4039abbcd03b))
+- **GuildStickerManager:** Correctly access guild ID (#7605) ([4b08d9b](https://github.com/discordjs/discord.js/commit/4b08d9b376bda7a7f4bb3fb8c555d25cca648de4))
+- **MessageManager:** Pin route (#7610) ([cb566c8](https://github.com/discordjs/discord.js/commit/cb566c8b6abff489a944db7952e5c5a48e0c98b0))
+- Handle partial data for `Typing#user` (#7542) ([c6cb5e9](https://github.com/discordjs/discord.js/commit/c6cb5e9ebbf46d81404119a6aa11bb8ebb17d5a4))
+- **guild:** Fix typo accessing user instead of users (#7537) ([8203c5d](https://github.com/discordjs/discord.js/commit/8203c5d843f2431c0f49023282f1bf73d85881d1))
+- **test:** `MessageActionRow` to `ActionRow` (#7523) ([d1d1b07](https://github.com/discordjs/discord.js/commit/d1d1b076bebf7cb706b2436a40d87c6efaed1e1d))
+- **MessagePayload:** Don't set reply flags to target flags (#7514) ([4f30652](https://github.com/discordjs/discord.js/commit/4f306521d829fef21ebd70557b37f8199b82572b))
+- **invite:** Add back channelId property (#7501) ([78aa36f](https://github.com/discordjs/discord.js/commit/78aa36f9f5913b86c82376ecdf20653b15340bbe))
+- Properly serialize `undefined` values (#7497) ([8dbd345](https://github.com/discordjs/discord.js/commit/8dbd34544cbeb499282f01dda9d35ed9bca93591))
+- Allow unsafe embeds to be serialized (#7494) ([942ea1a](https://github.com/discordjs/discord.js/commit/942ea1acbfb49289ccb3a1882b5a2da0a7d0bccf))
+- Attachment types (#7478) ([395a68f](https://github.com/discordjs/discord.js/commit/395a68ff49c622d5136d6b775beaf8e88a2d8610))
+- Use case converter for json component serialization (#7464) ([2d45544](https://github.com/discordjs/discord.js/commit/2d4554440ed9329a5876a9c674c3eb2de0f2f917))
+- **GuildAuditLogs:** Typings and consistency (#7445) ([c1b27f8](https://github.com/discordjs/discord.js/commit/c1b27f8eed8ea04a48bc106453892bddcdc6b73e))
+- **dataresolver:** Ensure fetched file is convert to a buffer (#7457) ([9311fa7](https://github.com/discordjs/discord.js/commit/9311fa7b42b2b5a74e411aa263daa4fbfc270645))
+- **messagepayload:** ResolveFile property names (#7458) ([a8106f7](https://github.com/discordjs/discord.js/commit/a8106f7c586f0ecac76e7f72c53b0da215a6fbf1))
+- **ci:** Ci error (#7454) ([0af9bc8](https://github.com/discordjs/discord.js/commit/0af9bc841ffe1a297d308500d696bad4b85abda9))
+- **threads:** Require being sendable to be unarchivable (#7406) ([861f0e2](https://github.com/discordjs/discord.js/commit/861f0e2134662ab64a11d313130aff58b413d495))
+- **guildmember:** Check if member has administrator permission (#7384) ([81d8b54](https://github.com/discordjs/discord.js/commit/81d8b54ff6b98b0e7ee2c57eaee6bc0b707e135a))
+- **guild:** Remove `maximumPresences` default value (#7440) ([55b388a](https://github.com/discordjs/discord.js/commit/55b388a763dc7223e88b62ae928fe85fe8b8fe58))
+- **guildchannelmanager:** Edit always sets parent to null (#7446) ([b97aedd](https://github.com/discordjs/discord.js/commit/b97aedd8e15f9358960cb59403f3a8ea24b87141))
+- **guildmember:** Make `pending` nullable (#7401) ([fe11ff5](https://github.com/discordjs/discord.js/commit/fe11ff5f6e85571a981e90eba5b9f3bda7a2cd04))
+- **clientpresence:** Fix used opcodes (#7415) ([a921ec7](https://github.com/discordjs/discord.js/commit/a921ec7dc525c58d40b4678e66270f9238abed31))
+- Correctly export UnsafeSelectMenuComponent from builders (#7421) ([aadfbda](https://github.com/discordjs/discord.js/commit/aadfbda586d57a7b775ad26c201f0dc34618180b))
+- MessageReaction.me being false when it shouldn't (#7378) ([04502ce](https://github.com/discordjs/discord.js/commit/04502ce702da53c4b00bf391d0fd936746851381))
+- Fix some typos (#7393) ([92a04f4](https://github.com/discordjs/discord.js/commit/92a04f4d98f6c6760214034cc8f5a1eaa78893c7))
+- **messagementions:** Fix `has` method (#7292) ([3a5ab2c](https://github.com/discordjs/discord.js/commit/3a5ab2c4e54de4e67ab6e323d7eac86482da7382))
+- **guildmembermanager:** Use rest in edit (#7356) ([00ce1c5](https://github.com/discordjs/discord.js/commit/00ce1c56ac224691a8691a3525cb14ae002319c6))
+- **typings:** Mark `RESTOptions` as Partial in `ClientOptions` (#7349) ([e1ecc1a](https://github.com/discordjs/discord.js/commit/e1ecc1a80a9358cdbafbe8542c40b9de8cad467e))
+- **Webhook:** Use correct method name (#7348) ([11e5e5a](https://github.com/discordjs/discord.js/commit/11e5e5ac5b70138f56332eb3e61a42443670b0de))
+- **thread:** Don't assign directly to getters (#7346) ([2db0cdd](https://github.com/discordjs/discord.js/commit/2db0cdd357c3a02decb4fd4168db87888efba283))
+- Missed enums and typings from #7290 (#7331) ([47633f0](https://github.com/discordjs/discord.js/commit/47633f0fd2435d6d8c694d8d37b26039a7b3797a))
+- **guildchannelmanager:** Remove reverse enum lookup (#7304) ([857bba4](https://github.com/discordjs/discord.js/commit/857bba448029f3f070c67fb40b59a3a2a2e5c6f4))
+- Import `clear{Timeout,Interval}` from `node:timers` (#7269) ([8ddd44e](https://github.com/discordjs/discord.js/commit/8ddd44ed85b32c86243efe0ec35b283eaaa8212c))
+- **ApplicationCommand:** Use new ApplicationCommandOptionType enums (#7257) ([06f5210](https://github.com/discordjs/discord.js/commit/06f5210f58bbba6102173033a9f1e6fb004fdf5d))
+- Use enums from discord-api-types (#7258) ([f284a46](https://github.com/discordjs/discord.js/commit/f284a4641fd68de9190bda97ec1eab0981149630))
+- **exports:** Export ApplicationCommandType properly (#7256) ([f753882](https://github.com/discordjs/discord.js/commit/f75388259262bf6b4a64375b97800bd72378f3bc))
+- **Shard:** EventEmitter listener warning (#7240) ([ff3a8b8](https://github.com/discordjs/discord.js/commit/ff3a8b83234d3826fc49c5a8c3cb52ef9f281ffd))
+- **timestamps:** Account for timestamps of 0 when creating Dates (#7226) ([a8509c9](https://github.com/discordjs/discord.js/commit/a8509c91ca0147393b407221405b6b917677961a))
+- **MessageEmbed:** CreatedAt field can be zero (#7218) ([37cad54](https://github.com/discordjs/discord.js/commit/37cad54dbdade39607397b8ad697eca94f1b7197))
+- **BaseClient:** Do not append default options if provided is not an object (#6453) ([b92a7d7](https://github.com/discordjs/discord.js/commit/b92a7d72332c35b607db54aa6aca24b8e10e00ad))
+- Snowflakeutil import (#7219) ([962f4bf](https://github.com/discordjs/discord.js/commit/962f4bf88211dbfb5ad0295a9467dede1e2688ee))
+- **Role:** Remove unused process (#7215) ([63034b4](https://github.com/discordjs/discord.js/commit/63034b44c9849087e391684d9b6c0c6ae9a21113))
+- **WebhookClient:** Updated webhook url regex (#6804) ([1c615d1](https://github.com/discordjs/discord.js/commit/1c615d1bb2606d5f19e55076d4ecab95c619518e))
+- **Sweepers:** Add sweepStickers function (#7213) ([95f8375](https://github.com/discordjs/discord.js/commit/95f8375d425f58f501f32ead03f7927e6596f8e6))
+- **InteractionCreate:** Use ChatInputCommandInteraction instead (#7210) ([49dada3](https://github.com/discordjs/discord.js/commit/49dada35f92470d3e4426362510847b93dd42d1a))
+- **Structues:** Rename old module's name (#7207) ([fbef454](https://github.com/discordjs/discord.js/commit/fbef45489457a2198357dc4dd303740d79036784))
+- **WebSocket:** Remove application command handler (#7202) ([033151c](https://github.com/discordjs/discord.js/commit/033151cf92fe43536b8a4c0f4d7d9ed75a2095c5))
+- **User:** `bannerURL()` should not throw when not present (#6789) ([3872acf](https://github.com/discordjs/discord.js/commit/3872acfeb8390f6f7202d69cf1f7f8616a7b0b34))
+- **VoiceState:** Ensure `suppress` & `streaming` have proper fallback values (#6377) ([a0d5f13](https://github.com/discordjs/discord.js/commit/a0d5f13dd9b27c44f5183a2a9af4c4fdecb312c0))
+- **sweepers:** Provide default for object param (#7182) ([ae2f013](https://github.com/discordjs/discord.js/commit/ae2f013653c8a9f9ffb12ae8fcdb1bb604b39236))
+
+## Deprecation
+
+- **Caching:** Clean up deprecated cache sweeping (#7118) ([12ffa06](https://github.com/discordjs/discord.js/commit/12ffa069aa8b247e945fef16a543f41c2c391bf1))
+
+## Documentation
+
+- Align webhook method return types with implementation (#8253) ([5aeed99](https://github.com/discordjs/discord.js/commit/5aeed9935058241648507d7f651679226a89dbb3))
+- Remove `@private` constructor documentation (#8255) ([452dec5](https://github.com/discordjs/discord.js/commit/452dec57ca422f5e7424a0f0e78c3e152717f413))
+- **ApplicationCommand:** Add `min_length` and `max_length` to ApplicationCommandOptionData (#8239) ([43f62bb](https://github.com/discordjs/discord.js/commit/43f62bb6678ec332795c8cfbe0c01854b95aa61e))
+- **MessageInteraction#commandName:** Updated description (#8212) ([ab238a9](https://github.com/discordjs/discord.js/commit/ab238a9046e0201dbd4755fa41fa69c44b186912))
+- Add missing `@extends` (#8205) ([e0c8282](https://github.com/discordjs/discord.js/commit/e0c82824905dcebf62c2d1afcc5e5590a5594838))
+- **Constants:** Fix SweeperKeys type (#8157) ([af04992](https://github.com/discordjs/discord.js/commit/af04992ed3c2617fda686c2bc7338dcada283dc6))
+- **Channels:** Internally document channel creation (#8154) ([5e5853a](https://github.com/discordjs/discord.js/commit/5e5853a4e885c47e3dde519761dd59a5ec0e06fc))
+- Update threads to use `ThreadAutoArchiveDuration` (#8153) ([ee36d60](https://github.com/discordjs/discord.js/commit/ee36d60dc6714c83569a20716fa8ca8e1bd7de4f))
+- **APITypes:** Remove duplicate type definition (#8144) ([a061233](https://github.com/discordjs/discord.js/commit/a0612335101c7ce2a07d95da4b79f0d4a2b1a6a0))
+- Document missing type definitions (#8130) ([203bc4a](https://github.com/discordjs/discord.js/commit/203bc4a2cf0c2d90a003093318aa0741605610f5))
+- **InteractionResponse:** Fix return (#8141) ([f1ac17c](https://github.com/discordjs/discord.js/commit/f1ac17c961cf95d99e205133605d10d8be5bd737))
+- **PermissionsBitField:** Fix `@name` of bitfield (#8115) ([3a77ce0](https://github.com/discordjs/discord.js/commit/3a77ce0b18c60a0b21ba088590ff89f2ace94087))
+- `TextBasedChannel` -> `TextBasedChannels` typos (#8110) ([db663a5](https://github.com/discordjs/discord.js/commit/db663a55c2ed2faf61e217009158da50dfcf274f))
+- Remove `number`s from enums (#8098) ([0a138da](https://github.com/discordjs/discord.js/commit/0a138dab95a86512f08ac3be356f77f38f2ea880))
+- **GuildAuditLogs:** Fix and reimplement type definitions (#8108) ([4155136](https://github.com/discordjs/discord.js/commit/415513696c7b7e139d1b958e480bf0c7e4d14111))
+- **WebSocketOptions:** Add `version` to docs and typings (#8050) ([386c41f](https://github.com/discordjs/discord.js/commit/386c41f24fb3c9d06967d9c1881a57645c3a71f2))
+- **BaseGuildTextChannel:** Update `setType()`'s parameter type (#8088) ([9c0f190](https://github.com/discordjs/discord.js/commit/9c0f190de1f743d9bd597ffd656503c672db71c1))
+- Update outdated examples (#8081) ([51eadf3](https://github.com/discordjs/discord.js/commit/51eadf37371a6138847efdb4b5b81ee132001cf0))
+- **ThreadMemberManager:** Require `member` in `FetchThreadMemberOptions` (#8079) ([552ec72](https://github.com/discordjs/discord.js/commit/552ec72542ec3b2b3ebf35c9fd84ab502dd746cf))
+- **AutocompleteInteraction:** Change useless log in responds example (#8077) ([ac7bf69](https://github.com/discordjs/discord.js/commit/ac7bf692bfce8204e278205dde811515a51f154b))
+- Description and missing `@typedef` fixes (#8087) ([a2eebf6](https://github.com/discordjs/discord.js/commit/a2eebf6c66f3e4c96ece9d2ae2a1133c84257f42))
+- Ignore docs of unexported functions (#8051) ([94bdcac](https://github.com/discordjs/discord.js/commit/94bdcaca62414a77d4ee0b8b79752a2be937320b))
+- **ClientOptions:** Fix closeTimeout default (#8049) ([b2eea1c](https://github.com/discordjs/discord.js/commit/b2eea1c900ba73d4b98b72f5c196f51e27d3ab8f))
+- **DirectoryChannel:** Extend `Channel` (#8022) ([f3f34f0](https://github.com/discordjs/discord.js/commit/f3f34f07b3b396015b130b8e9d938a3eec688fc3))
+- **Attachment:** Remove constructor doc (#8009) ([0a7953e](https://github.com/discordjs/discord.js/commit/0a7953e46310c77483d277539b47f1a7ab051fd9))
+- **VoiceChannel:** Annotate that it is implementing TextBasedChannel (#8007) ([5987dbe](https://github.com/discordjs/discord.js/commit/5987dbe5cff6991ae6905b0387411fa042d3e9b7))
+- Add missing discord-api-types external types (#8001) ([546d486](https://github.com/discordjs/discord.js/commit/546d48655f36ed9a6c6c5ce3c2eabcca1a86a945))
+- **InteractionResponses:** Replace outdated Embed example for reply (#7875) ([d308c66](https://github.com/discordjs/discord.js/commit/d308c66eeca6bdc3471637ae3aaaaa0a2f5c9989))
+- Require parameter (#7838) ([f4ccc67](https://github.com/discordjs/discord.js/commit/f4ccc6772c15e32489ca22fb2c3e803b85d4dbf9))
+- **ApplicationCommand:** Fix and improve localization docs (#7804) ([61a44c5](https://github.com/discordjs/discord.js/commit/61a44c509c40abaf7ffb95b10942889cbbf155ac))
+- **ApplicationCommand:** Fix ApplicationCommandOptionChoice (#7794) ([f1d0084](https://github.com/discordjs/discord.js/commit/f1d0084da26b0111ca029c789ad9e8e6c2882b4d))
+- Add back static properties and methods (#7706) ([520f471](https://github.com/discordjs/discord.js/commit/520f471ac56cbc01402b79197333a8a34c4ac5c9))
+- **InteractionCollector:** Document channel option type (#7551) ([e787cd5](https://github.com/discordjs/discord.js/commit/e787cd5fa5d013319347392ee4f799a677f6f512))
+- Correctly type getters (#7500) ([ffecf08](https://github.com/discordjs/discord.js/commit/ffecf084956f954cf10e1b844e00326e443a86f2))
+- ApplicationCommandData typedef (#7389) ([d32db88](https://github.com/discordjs/discord.js/commit/d32db8833e1058fb36f2e83af79d5353a9f2f693))
+- **channel:** Fix `isDMBased` docs (#7411) ([f2a7a9f](https://github.com/discordjs/discord.js/commit/f2a7a9f1b30af272a6a8d81825d09f84e749cc24))
+- **messageattachment:** Fix `contentType` docs (#7413) ([2800e07](https://github.com/discordjs/discord.js/commit/2800e07e5974e07b9f8ce043722b9b99a5bcc80d))
+- Add supported option types for autocomplete (#7368) ([8bb3751](https://github.com/discordjs/discord.js/commit/8bb37513400d646d784d59875d6b6a6ec10160cd))
+- Add external builder docs links (#7390) ([0b866c9](https://github.com/discordjs/discord.js/commit/0b866c9fb284971113e288e52327d4506db28011))
+- Add EnumResolvers (#7353) ([72767a1](https://github.com/discordjs/discord.js/commit/72767a1059526bdf617e80d5a9e5da1fbd2936d3))
+- **locales:** Update Discord API docs link (#7266) ([b640272](https://github.com/discordjs/discord.js/commit/b6402723c31bed3c49f8b8cde873b65b9f373fd7))
+- **StageInstance:** Deprecate discoverableDisabled (#7179) ([bd33ebb](https://github.com/discordjs/discord.js/commit/bd33ebb507eab36bc2219103dbd1e0217b9f38c0))
+- **shardingmanager:** Fix type of `execArgv` option (#7284) ([e65da44](https://github.com/discordjs/discord.js/commit/e65da44d9c564d1ffcb0f4df2bcdaf0ce0636f35))
+- **interaction:** Add locale list link (#7261) ([37ec0bd](https://github.com/discordjs/discord.js/commit/37ec0bda6df75fb1dc69b7a1eafbb8ea19e68457))
+- Fix a typo and use milliseconds instead of ms (#7251) ([0dd56af](https://github.com/discordjs/discord.js/commit/0dd56afe1cdf16f1e7d9afe1f8c29c31d1833a25))
+- Fix command interaction docs (#7212) ([137ea24](https://github.com/discordjs/discord.js/commit/137ea249df3aa6b8375ecb42aa456a6fdb811f19))
+- **TextBasedChannel:** Fixed syntax error in examples (#7163) ([b454740](https://github.com/discordjs/discord.js/commit/b454740ae87b6c3c13536181965519c7277e5840))
+- **TextBasedChannel:** Fix #createMessageComponentCollector description (#7168) ([d4e6e03](https://github.com/discordjs/discord.js/commit/d4e6e0370857dff00185d59faf8aaac12b343a7a))
+- Fixes the examples for kick and ban (#7170) ([db669b8](https://github.com/discordjs/discord.js/commit/db669b897132ec458d50ca6c1e3afa761e98ffc3))
+- **RoleManager:** Fix incorrect example (#7174) ([f79ea67](https://github.com/discordjs/discord.js/commit/f79ea67d3a9ba134a9acef0a443bd089c4e173a6))
+
+## Features
+
+- **builder:** Add max min length in string option (#8214) ([96c8d21](https://github.com/discordjs/discord.js/commit/96c8d21f95eb366c46ae23505ba9054f44821b25))
+- **applicationCommand:** Add max min length in string option (#8215) ([94ee60d](https://github.com/discordjs/discord.js/commit/94ee60d3d438f6657bdef51471528769af09624c))
+- Add website documentation early mvp (#8183) ([d95197c](https://github.com/discordjs/discord.js/commit/d95197cc78593df4d0a8d1cc492b0e41b4ab58b8))
+- **BaseInteraction:** Add support for `app_permissions` (#8194) ([002d6a5](https://github.com/discordjs/discord.js/commit/002d6a5aede3d1c0e08bd58eeef38a3b9202f525))
+- **util:** ParseWebhookURL (#8166) ([c4653f9](https://github.com/discordjs/discord.js/commit/c4653f97b1529eb0b99fccdba67c37eb4f467ff9))
+- **AutocompleteInteraction:** Add `commandGuildId` (#8086) ([10a6c42](https://github.com/discordjs/discord.js/commit/10a6c4287dd45a30290814e50fa29a086f85da02))
+- **guild:** Add support for setting MFA level (#8024) ([c5176be](https://github.com/discordjs/discord.js/commit/c5176be14b697ff506eb973c4119644eab544304))
+- **vcs:** Add missing property and methods (#8002) ([0415300](https://github.com/discordjs/discord.js/commit/0415300243877ddbcb501c0a26b1ff65618a1da7))
+- **docgen:** Update typedoc ([b3346f4](https://github.com/discordjs/discord.js/commit/b3346f4b9b3d4f96443506643d4631dc1c6d7b21))
+- Website (#8043) ([127931d](https://github.com/discordjs/discord.js/commit/127931d1df7a2a5c27923c2f2151dbf3824e50cc))
+- Docgen package (#8029) ([8b979c0](https://github.com/discordjs/discord.js/commit/8b979c0245c42fd824d8e98745ee869f5360fc86))
+- Backport handle zombie connection (#7626) ([e1176fa](https://github.com/discordjs/discord.js/commit/e1176faa27898d4f127c293c099201cb294e10ee))
+- **CommandInteraction:** Add 'commandGuildId' (#8018) ([aa59a40](https://github.com/discordjs/discord.js/commit/aa59a409b36c7ef7018d1785d2dba4da17b57864))
+- Allow builders to accept rest params and arrays (#7874) ([ad75be9](https://github.com/discordjs/discord.js/commit/ad75be9a9cf90c8624495df99b75177e6c24022f))
+- **MessageReaction:** Add react method (#7810) ([a328778](https://github.com/discordjs/discord.js/commit/a3287782b57c28b94c390c24e7d5f2d8c303301f))
+- **Collector:** Add `ignore` event (#7644) ([5244fe3](https://github.com/discordjs/discord.js/commit/5244fe3c1cd400985b00e95d8e5ec73823cf4f25))
+- **GuildMemberManager:** Add `GuildMemberManager#fetchMe()` (#7526) ([349766d](https://github.com/discordjs/discord.js/commit/349766dd6925e2d5e5597cc78c73e46f17c56eab))
+- **guildChannelManager:** Add `videoQualityMode` option for `create()` (#7980) ([cdd2ba0](https://github.com/discordjs/discord.js/commit/cdd2ba036ab1559783eb067786c52aff61807557))
+- **EnumResolvers:** Remove Enumresolvers (#7876) ([76694c1](https://github.com/discordjs/discord.js/commit/76694c1497de1b083a792fd1fda20f0eace50c48))
+- Move `me` to `GuildMemberManager` manager (#7669) ([aed687b](https://github.com/discordjs/discord.js/commit/aed687b09f87862eb2f33fb9f95b2cbd0b770585))
+- **rest:** Use undici (#7747) ([d1ec8c3](https://github.com/discordjs/discord.js/commit/d1ec8c37ffb7fe3b63eaa8c382f22ca1fb348c9b))
+- **VoiceChannel:** Add support for text in voice (#6921) ([4ba0f56](https://github.com/discordjs/discord.js/commit/4ba0f56b6af64bac30eea807fb3e9f3c41c3c83c))
+- **SelectMenu:** Allow emojis in options and option constructors (#7797) ([f22245e](https://github.com/discordjs/discord.js/commit/f22245e9d072ac4ef63b0ae0d84d5ba94608ce22))
+- Allow `createMessageComponentCollector` without using `fetchReply` (#7623) ([a58556a](https://github.com/discordjs/discord.js/commit/a58556adc02b2b9239c8f277a4387c743c9d6f04))
+- Add guild directory support (#6788) ([b01f414](https://github.com/discordjs/discord.js/commit/b01f4147d4f3bca021bc269c9f06463f06e3db53))
+- **GuildBanManager:** Support pagination results (#7734) ([fc2a8bb](https://github.com/discordjs/discord.js/commit/fc2a8bb6750919ecd6ee7c872df05f4b677ff5d3))
+- **CommandInteraction:** Add support for localized slash commands (#7684) ([01a423d](https://github.com/discordjs/discord.js/commit/01a423d110cfcddb3d794fcc32579a1547dd472d))
+- Allow emoji strings to be passed through constructors (#7718) ([0faac04](https://github.com/discordjs/discord.js/commit/0faac04b69f1dda3dc860cd584af100e36a40917))
+- **StageInstanceManager:** Add `sendStartNotification` option to create (#7730) ([29f8807](https://github.com/discordjs/discord.js/commit/29f88079559cc02ccfef7a7c16458d481e573fb5))
+- Add `makeURLSearchParams` utility function (#7744) ([8eaec11](https://github.com/discordjs/discord.js/commit/8eaec114a98026024c21545988860c123948c55d))
+- **modal:** Add `awaitModalSubmit` (#7751) ([3037fca](https://github.com/discordjs/discord.js/commit/3037fca196a0f9238d53bb51394daf737bbf3742))
+- **Actions:** Add parent structure to events parameters (#7577) ([3f3e432](https://github.com/discordjs/discord.js/commit/3f3e4327c86da86734c19a96e97115bd505b4532))
+- Export `UnsafeModalBuilder` and `UnsafeTextInputBuilder` (#7628) ([6fec252](https://github.com/discordjs/discord.js/commit/6fec25239dfed46a30826d38dc97f3680f24ec65))
+- **VoiceChannel:** Support `video_quality_mode` (#7722) ([3b3dabf](https://github.com/discordjs/discord.js/commit/3b3dabf3da2e2f24b81967d68b581d7f7452273f))
+- Add API v10 support (#7477) ([72577c4](https://github.com/discordjs/discord.js/commit/72577c4bfd02524a27afb6ff4aebba9301a690d3))
+- **embed:** Remove Embed.setColor (#7662) ([9b0d8cb](https://github.com/discordjs/discord.js/commit/9b0d8cb2d8f7b55753de584eb3a3f347f87596c2))
+- **StageInstance:** Add support for associated guild event (#7576) ([3dff31f](https://github.com/discordjs/discord.js/commit/3dff31f63fe4afdcc818193d737e1917f1ac8105))
+- **VoiceState:** Add edit method (#7569) ([b162f27](https://github.com/discordjs/discord.js/commit/b162f27e46524bfc64515969d753c6e8f30e6c40))
+- **ModalSubmitInteraction:** Add boolean properties (#7596) ([8907390](https://github.com/discordjs/discord.js/commit/89073903a253d9408839573502c72cae93fe70b6))
+- Add Modals and Text Inputs (#7023) ([ed92015](https://github.com/discordjs/discord.js/commit/ed920156344233241a21b0c0b99736a3a855c23c))
+- **discord.js:** Partial transition to undici (#7482) ([5158332](https://github.com/discordjs/discord.js/commit/51583320d3b0f6452cd96bad1021f2a57e4cc6f6))
+- **message:** Add `reason` on pin and unpin (#7520) ([00728f7](https://github.com/discordjs/discord.js/commit/00728f72b36123b607502624b4b02a02ee524d4a))
+- Re-export AuditLogEvent enum (#7528) ([6a2fa70](https://github.com/discordjs/discord.js/commit/6a2fa70b8e79a460be38916eeb605976ad6fe68b))
+- **options:** Add support for custom JSON transformers (#7476) ([dee27db](https://github.com/discordjs/discord.js/commit/dee27db35af379b0835f9fd5cc19563f7bf3dfc0))
+- Add CategoryChannelChildManager (#7320) ([5cf5071](https://github.com/discordjs/discord.js/commit/5cf5071061760c2f9c1e36d7648aef544b03323a))
+ - **Co-authored-by:** Antonio Román <kyradiscord@gmail.com>
+- Attachment application command option type (#7200) ([0034396](https://github.com/discordjs/discord.js/commit/003439671d359dcfe481446ef12b90bd71c57835))
+- **builders:** Add attachment command option type (#7203) ([ae0f35f](https://github.com/discordjs/discord.js/commit/ae0f35f51d68dfa5a7dc43d161ef9365171debdb))
+- **scheduledevents:** Add image option (#7436) ([fbc71ef](https://github.com/discordjs/discord.js/commit/fbc71ef6b668c4b1e2b065d9b65541d9303db0a0))
+- Add methods to managers (#7300) ([dd751ae](https://github.com/discordjs/discord.js/commit/dd751ae19da196cc2f90ccd35c7d8e99878daaf9))
+- **channel:** Add .url getter (#7402) ([f59d630](https://github.com/discordjs/discord.js/commit/f59d6305cb0cd0d154a909f18be76407c4d452d3))
+- **components:** Add unsafe message component builders (#7387) ([6b6222b](https://github.com/discordjs/discord.js/commit/6b6222bf513d1ee8cd98fba0ad313def560b864f))
+- **thread:** Add `newlyCreated` to `threadCreate` event (#7386) ([51beda5](https://github.com/discordjs/discord.js/commit/51beda56f74e44ed013b5d25044b8d5fd1978b29))
+- **channel:** Add isDMBased typeguard (#7362) ([388f535](https://github.com/discordjs/discord.js/commit/388f53550cca7ded7350a050fda03c36e4c1fdf7))
+- **`Interaction`:** Add `.commandType` property to `CommandInteraction` and `AutocompleteInteraction` (#7357) ([567db60](https://github.com/discordjs/discord.js/commit/567db60475c8704661b2e788c9905ef364d6c00c))
+- **scheduledevent:** Add support for event cover images (#7337) ([355f579](https://github.com/discordjs/discord.js/commit/355f579771771a28a293c327a38574c8918d18f8))
+- **enumResolvers:** Strengthen typings (#7344) ([9a566e8](https://github.com/discordjs/discord.js/commit/9a566e8068f28fce87c07861ef1d2877c6ae105f))
+- Allow setting message flags when sending (#7312) ([706db92](https://github.com/discordjs/discord.js/commit/706db9228a91ef42e49d2ec749eac153b9ef75d0))
+- **minor:** Add application_id to Webhook (#7317) ([5ccdb0a](https://github.com/discordjs/discord.js/commit/5ccdb0ab266e4f74c331386ac2d6dd32bc225c62))
+- **threadchannel:** Add `createdTimestamp` field (#7306) ([9a16234](https://github.com/discordjs/discord.js/commit/9a1623425ae2d69f5c16f0096af4951ff5096e80))
+- **GuildPreview:** Add stickers (#7152) ([cf25de9](https://github.com/discordjs/discord.js/commit/cf25de9373df98b3c1cd0ca0a092d9dc8172929d))
+- Enum resolvers & internal enum string removal (#7290) ([213acd7](https://github.com/discordjs/discord.js/commit/213acd799738b888d550cdf3f08906764f8288e0))
+- **guildemojimanager:** Add `delete` and `edit` methods (#7286) ([9181a31](https://github.com/discordjs/discord.js/commit/9181a31e0ba330502052c94da544bb15c8b66f11))
+- **interaction:** Add `isRepliable` type guard (#7259) ([da05a88](https://github.com/discordjs/discord.js/commit/da05a8856b11cc1bf0df424c88a1cf9573e5b654))
+- **Channel:** Improve typeguards (#6957) ([37a22e0](https://github.com/discordjs/discord.js/commit/37a22e04c27724c2a65b05c701e3000ba3653ba1))
+- Add Locales to Interactions (#7131) ([9052e32](https://github.com/discordjs/discord.js/commit/9052e321d1c9c8841962d4e8dc5d9e060b104438))
+- **Permissions:** Remove deprecated thread-related permissions (#6755) ([ab3ff5a](https://github.com/discordjs/discord.js/commit/ab3ff5a262caf7d6225b8d6b54ab2c6b6613c0d0))
+- **VoiceRegion:** Remove the unsent vip field (#6759) ([caaef53](https://github.com/discordjs/discord.js/commit/caaef53dd97ecac9f714072ddba5ae9a99ab1027))
+- **richpresenceassets:** Add YouTube and custom image support (#7184) ([d06d70c](https://github.com/discordjs/discord.js/commit/d06d70ccf26c04c1122fac8430922588a489f95e))
+- **Collector:** Yield all collected values (#7073) ([2b480cb](https://github.com/discordjs/discord.js/commit/2b480cb14e6f52855efcb372da7fb455c15b13b1))
+
+## Refactor
+
+- **Util:** Rename `fetchRecommendedShards` (#8298) ([cafde77](https://github.com/discordjs/discord.js/commit/cafde77d73452d729ba8e2cb1cac3f14235b889b))
+- **Embed:** Add all the types (#8254) ([64f8140](https://github.com/discordjs/discord.js/commit/64f814066cc4adebaca47eb8d7a2040a8df399ae))
+- **rest:** Add content-type(s) to uploads (#8290) ([103a358](https://github.com/discordjs/discord.js/commit/103a3584c95a7b7f57fa62d47b86520d5ec32303))
+- Make `GuildAuditLogsEntry.action` return an `AuditLogEvent` (#8256) ([f0b68d5](https://github.com/discordjs/discord.js/commit/f0b68d57368d7ac3db97925df68c11a945ccd84c))
+- **builder:** Remove `unsafe*Builder`s (#8074) ([a4d1862](https://github.com/discordjs/discord.js/commit/a4d18629828234f43f03d1bd4851d4b727c6903b))
+- Make `ShardEvents` the events of `Shard` (#8185) ([c5750d5](https://github.com/discordjs/discord.js/commit/c5750d59f529ab48a5bc88a73a1c449ef6ddbffd))
+- **Util:** Make single `replace` call in `cleanContent` (#8210) ([6b20645](https://github.com/discordjs/discord.js/commit/6b206457400ce31d566b02a0c135042afb540853))
+- **ApplicationCommandManager:** Use `makeURLSearchParams` (#8196) ([cb3dca4](https://github.com/discordjs/discord.js/commit/cb3dca4ae029724421f3d04a784ace0ae2de75e2))
+- Use `Base` prefix for channel and interaction base classes (#8099) ([e24970e](https://github.com/discordjs/discord.js/commit/e24970e3c3d24f71ba711e59666cd8a49a33e33b))
+- **Constants:** Remove leftover code (#8156) ([cd17aad](https://github.com/discordjs/discord.js/commit/cd17aad720430d23af51c364caeb8b22bf6cb6b5))
+- Errors (#8068) ([e68effa](https://github.com/discordjs/discord.js/commit/e68effa822f064a324ed5b92e797c9fc3ce5e211))
+- **ClientOptions:** Remove `$` prefix from `ws.properties` keys (#8094) ([90a98fe](https://github.com/discordjs/discord.js/commit/90a98fee16b7d1d06768461f4e85127c0edf8419))
+- Use `GuildFeature` enum (#8101) ([e5ec1c4](https://github.com/discordjs/discord.js/commit/e5ec1c4dbc3fa54b2c43d1fec24932d7363e17cb))
+- **util:** Make utility functions top level (#8052) ([e53d162](https://github.com/discordjs/discord.js/commit/e53d1621986035b0c92a1782f6e013d408480e00))
+- **ApplicationCommand:** Permissions v2 (#7857) ([c7391db](https://github.com/discordjs/discord.js/commit/c7391db11b3efd4b1a6904affb26887ad06d6db4))
+- ***:** Include name/reason/etc fields into options/data params (#8026) ([9c8b310](https://github.com/discordjs/discord.js/commit/9c8b3102ce00d1f2c1255c150fb3030f8b6dd026))
+- **ThreadMemberManager:** Consistent thread member fetching (#8021) ([da9107c](https://github.com/discordjs/discord.js/commit/da9107c007536952107bd92943b6c714538d5aeb))
+- **interactions:** Remove redundant interaction typeguards (#8027) ([f57d676](https://github.com/discordjs/discord.js/commit/f57d6768ad24f6e37dc598f9c93709449d3bc4dd))
+- Move all the config files to root (#8033) ([769ea0b](https://github.com/discordjs/discord.js/commit/769ea0bfe78c4f1d413c6b397c604ffe91e39c6a))
+- **channel:** Remove redundant channel type guards (#8012) ([70c733b](https://github.com/discordjs/discord.js/commit/70c733bb9a5bde0f79e6bea0bdc416458bda4c06))
+- Always return `Message` instances in interactions (#7917) ([9720e55](https://github.com/discordjs/discord.js/commit/9720e555340431c3b3ad7bd670ad0ac7eee8865f))
+- **attachment:** Don't return attachment builders from API (#7852) ([dfadcbc](https://github.com/discordjs/discord.js/commit/dfadcbc2fd50be64c8a0c1cae3be10f83678c5ee))
+- Clean up modal submissions (#7994) ([643dab3](https://github.com/discordjs/discord.js/commit/643dab3b1b5305d002fcefed62755bbe11fc3267))
+- **ThreadChannel:** Remove `MAX` helper from threads (#7846) ([dfd9eb2](https://github.com/discordjs/discord.js/commit/dfd9eb20b2d3e0e7db26744b1f15134ac6eda139))
+- **Activity:** Remove undocumented properties (#7844) ([5ba7740](https://github.com/discordjs/discord.js/commit/5ba7740fcfefda1eeba81ace4e6351eac02522a4))
+- **MessageAttachment:** Use `Attachment` instead (#7691) ([ab4c608](https://github.com/discordjs/discord.js/commit/ab4c608b97ff319935e1a7f23564622bfd7ddd57))
+- **Util:** Remove splitting (#7780) ([54e5629](https://github.com/discordjs/discord.js/commit/54e56299865a6746744544ba25d5540a1166d27c))
+- Tidy up builders and components (#7711) ([96a0d83](https://github.com/discordjs/discord.js/commit/96a0d83a1366703ecae40b5e0d5171be9123d079))
+- Remove nickname parsing (#7736) ([78a3afc](https://github.com/discordjs/discord.js/commit/78a3afcd7fdac358e06764cc0d675e1215c785f3))
+- Remove store channels (#7634) ([aedddb8](https://github.com/discordjs/discord.js/commit/aedddb875e740e1f1bd77f06ce1b361fd3b7bc36))
+- **IntegrationApplication:** Remove `summary` (#7729) ([eb6b472](https://github.com/discordjs/discord.js/commit/eb6b472f72488cad7e96befccc00270cf6dc01b8))
+- **GuildAuditLogs:** Remove build (#7704) ([cedd053](https://github.com/discordjs/discord.js/commit/cedd0536baa1301984daf89dfda4e63a7be595a2))
+- **InteractionCollector:** Simplify constructor logic (#7667) ([07b23a9](https://github.com/discordjs/discord.js/commit/07b23a99c7088a7c740f23051f3f755f091519b0))
+- Remove undocumented checks (#7637) ([9a6e691](https://github.com/discordjs/discord.js/commit/9a6e691eaa6c3d133098b2734414590cb838de2e))
+- Allow builders to accept emoji strings (#7616) ([fb9a9c2](https://github.com/discordjs/discord.js/commit/fb9a9c221121ee1c7986f9c775b77b9691a0ae15))
+- Use `static` fields (#7701) ([e805777](https://github.com/discordjs/discord.js/commit/e805777a7a81d1dc7a2edd9741ecb04e685a3886))
+- **EmbedBuilder:** Allow hex strings in setColor (#7673) ([f472975](https://github.com/discordjs/discord.js/commit/f4729759f600372455f062c75859f084e23a5d78))
+- Don't return builders from API data (#7584) ([549716e](https://github.com/discordjs/discord.js/commit/549716e4fcec89ca81216a6d22aa8e623175e37a))
+- **embed:** Allow hex strings in `setColor()` (#7593) ([79d6c04](https://github.com/discordjs/discord.js/commit/79d6c0489c3d563fdd05de63c4fcf93a6deefce1))
+- **InteractionResponses:** Use ClientOptions.jsonTransformer (#7599) ([fac55bc](https://github.com/discordjs/discord.js/commit/fac55bcfd1e8b76aae1273415f74fa6de7aca66d))
+- Deprecate invite stage instance (#7437) ([d2bc9d4](https://github.com/discordjs/discord.js/commit/d2bc9d444f42a70a3c4cc4c68eb107bcaebec509))
+- **guild:** Move `premiumSubscriptionCount` to `AnonymousGuild` (#7451) ([6d3da22](https://github.com/discordjs/discord.js/commit/6d3da226d3c003d137639e719394a807330e4844))
+- **actions:** Use optional chaining (#7460) ([d1bb362](https://github.com/discordjs/discord.js/commit/d1bb36256f2f86022884e6ee9e05b0536cb6384d))
+- **guildbanmanager:** Rename days option to deleteMessageDays (#7447) ([0dfdb2c](https://github.com/discordjs/discord.js/commit/0dfdb2cf11e236e67dd34277108973b5b79790a8))
+- Make public builder props getters (#7422) ([e8252ed](https://github.com/discordjs/discord.js/commit/e8252ed3b981a4b7e4013f12efadd2f5d9318d3e))
+- Remove redundant API defaults (#7449) ([532846b](https://github.com/discordjs/discord.js/commit/532846b1f8260d85022a022d093553310052afc9))
+- Allow discord.js builders to accept camelCase (#7424) ([94bf727](https://github.com/discordjs/discord.js/commit/94bf727cc3a2f11c88e95cdb151b235f775cd1ca))
+- Replace `WSCodes`, `WSEvents`, and `InviteScopes` with `discord-api-types` equivalent (#7409) ([cc25455](https://github.com/discordjs/discord.js/commit/cc25455d2c75177e3eddc880b7fd53cb122387c4))
+- Make constants enums top level and `PascalCase` (#7379) ([d8184f9](https://github.com/discordjs/discord.js/commit/d8184f94dd08daab37195f52828e06af5ed1c1e0))
+- **`Bitfield`:** Use discord-api-types enums instead (#7313) ([fbb1d03](https://github.com/discordjs/discord.js/commit/fbb1d0328bcd517027ad2eedb8753d17489ed851))
+- Use `@discordjs/rest` (#7298) ([ec0fba1](https://github.com/discordjs/discord.js/commit/ec0fba1ed0d3c5b1bb18171ece6fe5ee42d48497))
+- Switch to /builders `Embed` (#7067) ([d2d3a80](https://github.com/discordjs/discord.js/commit/d2d3a80c556a104099a1ddb1b24f1b921c553257))
+- Remove transformPermissions (#7303) ([b4ed8fd](https://github.com/discordjs/discord.js/commit/b4ed8fd3ed953085cd908b2845d4384c8555d3a2))
+- Remove VoiceChannel#editable (#7291) ([164589c](https://github.com/discordjs/discord.js/commit/164589c5516a847457444d11098981d557b6778b))
+- Remove boolean option for `Webhook#fetchMessage` (#7293) ([347ff80](https://github.com/discordjs/discord.js/commit/347ff80bbc9bc5243b7f68ba5d745782eadeba21))
+- **subcommandgroup:** Required default to false (#7217) ([6112767](https://github.com/discordjs/discord.js/commit/6112767128a664f32205425f52ba52220d57834f))
+- **invite:** Make `channel` and `inviter` getters (#7278) ([18b0ed4](https://github.com/discordjs/discord.js/commit/18b0ed4cbe8285637a971c7c99ee49d18060a403))
+- Remove required from getMember (#7188) ([c90e47f](https://github.com/discordjs/discord.js/commit/c90e47f90403e5b1b3499b213dcdf2704fd96b66))
+- Remove djs components and use /builders components instead (#7252) ([101d7c5](https://github.com/discordjs/discord.js/commit/101d7c5ffa03edcf8cb8a0647b77d5c9a38e4bdd))
+- Default *URL methods to animated hash (#7149) ([7c07976](https://github.com/discordjs/discord.js/commit/7c07976018728154be0ce0314d3e8dfe8eb9ed5b))
+- Use setPosition inside edit (#7263) ([0b23b7f](https://github.com/discordjs/discord.js/commit/0b23b7f0394a20596c8d85b82870c3f35ea6b0e0))
+- Don't disable import order lint (#7262) ([0a5d5f3](https://github.com/discordjs/discord.js/commit/0a5d5f38c0b1a249fa2efe16f3b601c90622a4d5))
+- Remove discord.js enums and use discord-api-types enums instead (#7077) ([aa6d1c7](https://github.com/discordjs/discord.js/commit/aa6d1c74de01dd9a8f020c43fb2c193c4729df8d))
+- **application:** Remove fetchAssets (#7250) ([1479e40](https://github.com/discordjs/discord.js/commit/1479e40bcecc4c28ecb9f05fa4fbbdfe3bd387e1))
+- PresenceUpdate and demuxProbe (#7248) ([1745973](https://github.com/discordjs/discord.js/commit/174597302408f13c5bb685e2fb02ae2137cb481d))
+- **embeds:** Don't create new embed instances when unnecessary (#7227) ([822dc67](https://github.com/discordjs/discord.js/commit/822dc678da626de7b4fb22a747cd3cd2e8376732))
+- **GuildMember:** Throw better errors on #kickable and #bannable (#7137) ([4fd127e](https://github.com/discordjs/discord.js/commit/4fd127e79edfa1851f8a10242838f9d7aa68c8c3))
+- **SnowflakeUtil:** Switch to `@sapphire/snowflake` (#7079) ([e082dfb](https://github.com/discordjs/discord.js/commit/e082dfb1584926e4c05face5966d16e4a2921bc5))
+- **InteractionCreate:** Remove interaction event (#6326) ([ae876d9](https://github.com/discordjs/discord.js/commit/ae876d962453ccf843f8e6f70666a98a3173bb75))
+- **MessageCreate:** Remove message event (#6324) ([171e917](https://github.com/discordjs/discord.js/commit/171e917fb96b6bf39a6ad70e83be646f72fe451e))
+- **integration:** Turn undefined into null and consistency (#7209) ([13eb782](https://github.com/discordjs/discord.js/commit/13eb78256da901e6c3c405f546f36617ef5e8239))
+- Remove `deleted` field (#7092) ([cee7fd1](https://github.com/discordjs/discord.js/commit/cee7fd181c464e44eabf20b511d12589f2453722))
+- **Dates:** Save timestamps everywhere and use Date.parse (#7108) ([55e21f5](https://github.com/discordjs/discord.js/commit/55e21f53663a91863c63b6d9f3a8c35564664061))
+- **RoleManager:** Remove `comparePositions()` (#7201) ([fbbac27](https://github.com/discordjs/discord.js/commit/fbbac279789427b2c36869dc47b65fb08431e14d))
+- Better Command Terminology (#7197) ([b7856e7](https://github.com/discordjs/discord.js/commit/b7856e7809ff6fa21fe00286f885808535624f7c))
+- **Actions:** Remove deleted maps (#7076) ([5022b14](https://github.com/discordjs/discord.js/commit/5022b14da09e9b421f947e9bc385a0574cbf07d1))
+- **Client:** Remove applicationCommand events (#6492) ([6085b4f](https://github.com/discordjs/discord.js/commit/6085b4f72723d4ff82f7fea504241d14c94af21e))
+- Remove `Util.removeMentions()` (#6530) ([0c24cc8](https://github.com/discordjs/discord.js/commit/0c24cc8ec0d818315cc8f8bcf74fce060847ac79))
+- **Constants:** Change APPLICATION_COMMAND -> CHAT_INPUT_COMMAND (#7018) ([75616a3](https://github.com/discordjs/discord.js/commit/75616a305f9af33013486b13a872a39212101ce7))
+- **Guild:** Remove deprecated setXPositions methods (#6897) ([43e5e3c](https://github.com/discordjs/discord.js/commit/43e5e3c339a96fa895267d4538eee1d5e5843d05))
+- **UserFlags:** Update flag names (#6938) ([b246fc4](https://github.com/discordjs/discord.js/commit/b246fc4101b8e4957ffd1af8e2e4986a020ca211))
+
+## Styling
+
+- Cleanup tests and tsup configs ([6b8ef20](https://github.com/discordjs/discord.js/commit/6b8ef20cb3af5b5cfd176dd0aa0a1a1e98551629))
+
+## Typings
+
+- **GuildFeature:** Allow feature strings to be passed (#8264) ([b7d4e55](https://github.com/discordjs/discord.js/commit/b7d4e55419207d4e25f5c40cab221c7c04a617bf))
+- **CategoryChannelChildManager:** Fix Holds type (#8288) ([33a7a5c](https://github.com/discordjs/discord.js/commit/33a7a5cbdc00d2a5034dc1ec91fec5da7042f9d0))
+- Remove `MemberMention` (#8292) ([bf65b37](https://github.com/discordjs/discord.js/commit/bf65b37d1a9ea8417e26ad4afacea1eb45a0ff5a))
+- **GuildMemberManager:** Fix placement for `fetchMe()` (#8258) ([7525615](https://github.com/discordjs/discord.js/commit/75256153a9923d94ca709a37aaccc48dfb43c153))
+- Convert `Events` to an enum (#8246) ([feb3bdd](https://github.com/discordjs/discord.js/commit/feb3bdda0a3c3da80378c8cbcafca2968551eef9))
+- **GuildMemberManager:** Non-void return of `edit()` (#8186) ([c7a205f](https://github.com/discordjs/discord.js/commit/c7a205f7b992eea43af13a4638e2a03db7bc0d8a))
+- Add missing shard types (#8180) ([27d8deb](https://github.com/discordjs/discord.js/commit/27d8deb4716a87704370a95103b16fa1b763de18))
+- Implement `GuildChannelEditOptions` (#8184) ([b83e0c0](https://github.com/discordjs/discord.js/commit/b83e0c0caffc2b767aa1ba4412580970a6901899))
+- **Status:** Add missing members (#8179) ([8421f92](https://github.com/discordjs/discord.js/commit/8421f9203bd2d85ef8e64c3fb9a991c74223a75d))
+- **GuildScheduledEvent#scheduledStartAt:** Should be nullish (#8111) ([65dc8d6](https://github.com/discordjs/discord.js/commit/65dc8d677ee81469c0eeb4ecdd83fe2f68cc8982))
+- Fix modal builder constructor data type (#8143) ([7279f9c](https://github.com/discordjs/discord.js/commit/7279f9c31b14bc1e78c63b7298e80e37ca5dfe0c))
+- Use `ThreadAutoArchiveDuration` from discord-api-types (#8145) ([a3799f9](https://github.com/discordjs/discord.js/commit/a3799f9ebb027904830457119708d550e2009200))
+- **Shard#reconnecting:** Fix event name (#8118) ([95e6d6e](https://github.com/discordjs/discord.js/commit/95e6d6ede03c4fb92a8d8027a085e84b043fd895))
+- **ApplicationCommand:** Fix typo in setDMPermission (#8097) ([4df491c](https://github.com/discordjs/discord.js/commit/4df491ce8578a1b01ee8412a4df8137a302e7202))
+- Fix `setType()` parameter and `ChannelData.type` (#8089) ([b4e28a8](https://github.com/discordjs/discord.js/commit/b4e28a8ff6bf165c54a8726d3bc3a3cc0c1e469b))
+- Fix `ApplicationCommandPermissionsUpdate` event typings (#8071) ([9964454](https://github.com/discordjs/discord.js/commit/9964454c2944a0523399481a5f609144486e549b))
+- **AutocompleteOption:** Fix and improve types (#8069) ([476b7d5](https://github.com/discordjs/discord.js/commit/476b7d519c719152ea04e207f6dd09bb23e733db))
+- **ThreadMemberManager:** Fix return type of fetching members with no arguments (#8060) ([2392a6f](https://github.com/discordjs/discord.js/commit/2392a6f5de2efcf6b326173d26295c928b94adb6))
+- Remove isAutocomplete typeguard from typings (#8063) ([c0f079d](https://github.com/discordjs/discord.js/commit/c0f079d2325a636c83ac676c525bfa89ce308b3c))
+- **AttachmentBuilder:** Fix data type (#8016) ([7fa698d](https://github.com/discordjs/discord.js/commit/7fa698d23e548987762c4c66c96c510d9ea56eb4))
+- **modal:** Fix `showModal()` typings (#8014) ([0ccc243](https://github.com/discordjs/discord.js/commit/0ccc243c8ffbf852660c899cc2ad47bd5ebb65cb))
+- Fix some attachment related typings (#8013) ([6aa6232](https://github.com/discordjs/discord.js/commit/6aa623240ee94b117c7e69c1d09b50923a8f7a4c))
+- **AttachmentBuilder:** Remove name parameter from constructor (#8008) ([6266b0c](https://github.com/discordjs/discord.js/commit/6266b0c1e323f9522010f90f34ce6f17fcb6e769))
+- Add types to `EventEmitter` static methods (#7986) ([d60c464](https://github.com/discordjs/discord.js/commit/d60c464e618e4159d2656e7832798909832f33cd))
+- Nullify `guildScheduledEventUpdate`'s old parameter (#7955) ([fdeac9d](https://github.com/discordjs/discord.js/commit/fdeac9d9fba06c532eca296ddd8479047bc732bf))
+- Make `CacheType` generic more accurate for return values (#7868) ([e07b910](https://github.com/discordjs/discord.js/commit/e07b910e684bc3cf71fb93417951ad42351bace4))
+- **guildScheduledEvent:** Mark `entityMetadata` as nullable (#7908) ([64bdf53](https://github.com/discordjs/discord.js/commit/64bdf53116945ffb51764bb8ec539d530aefcfb1))
+- **discord.js:** Export missing enums (#7864) ([5eeef3f](https://github.com/discordjs/discord.js/commit/5eeef3f708eb900ec994d837fb4cd414a4f4b437))
+- Fix return type of `toString()` on channels (#7836) ([ece6289](https://github.com/discordjs/discord.js/commit/ece628986c7eb1a66f46076d8f8518c9ff00aaf3))
+- **Message#activity:** Make `partyId` optional and use enum for `type` (#7845) ([bfeaf85](https://github.com/discordjs/discord.js/commit/bfeaf856f76eb7cb756ac55aac13636ccdb345b6))
+- Cleanup *Data type definitions (#7716) ([585169f](https://github.com/discordjs/discord.js/commit/585169f2f097ffb1940d17f549e4290aa55acde2))
+- Fix BooleanCache never resolving to true (#7809) ([440ac24](https://github.com/discordjs/discord.js/commit/440ac243ca1d6f8cd04603e63e3f2f6ea1722ee8))
+- **CommandInteraction:** Add awaitModalSubmit (#7811) ([a6d9ce5](https://github.com/discordjs/discord.js/commit/a6d9ce57c6cae90d0afc60010cad44fdc2c2d06c))
+- **ThreadChannel:** Fix autoArchiveDuration types (#7816) ([0857476](https://github.com/discordjs/discord.js/commit/08574763eb665b5a43ccfb826929f1e3f0d1c3a7))
+- Add missing typing (#7781) ([f094e33](https://github.com/discordjs/discord.js/commit/f094e338617a1a3c9f48a325e4b8e9b5a405aa91))
+- **VoiceChannel:** Nullify property (#7793) ([446eb39](https://github.com/discordjs/discord.js/commit/446eb390ce58b7e7f60e297b25f53773a55f7fb9))
+- **ModalSubmitInteraction:** Message (#7705) ([b577bcc](https://github.com/discordjs/discord.js/commit/b577bcc1df5c6424fef9984e19a5f11c77371cf3))
+- **Embed:** Add missing getters and add video to EmbedData (#7728) ([fd1dc72](https://github.com/discordjs/discord.js/commit/fd1dc72c0a77dbe18753d8db22972dfa5fe4ab36))
+- **ModalSubmitInteraction:** Fix `components` type (#7732) ([6f4e97b](https://github.com/discordjs/discord.js/commit/6f4e97bfafe4a058f6ec85d321676401d701ee55))
+- **interactionCollector:** Filter should have a collected argument (#7753) ([e4f2705](https://github.com/discordjs/discord.js/commit/e4f27051ca921d299c302b600a8c2917e9356ef6))
+- Fix regressions (#7649) ([5748dbe](https://github.com/discordjs/discord.js/commit/5748dbe08783beb80c526de38ccd105eb0e82664))
+- **Constants:** Add `NonSystemMessageTypes` (#7678) ([9afc030](https://github.com/discordjs/discord.js/commit/9afc03054e4c8973702d6c18e618643f76382dd9))
+- Fix auto archive duration type (#7688) ([8e3b2d7](https://github.com/discordjs/discord.js/commit/8e3b2d7abd38136534969cf77c6a748ee3a20355))
+- **InteractionResponseFields:** Add webhook (#7597) ([daf2829](https://github.com/discordjs/discord.js/commit/daf2829cb58d1a44cb1f1ece21e428d1a23e99c9))
+- **Embed:** Add forgotten `footer` type (#7665) ([8fb9816](https://github.com/discordjs/discord.js/commit/8fb98165a9d098ab316475d6baacb015783eb638))
+- **ColorResolvable:** Simplify string types (#7643) ([2297c2b](https://github.com/discordjs/discord.js/commit/2297c2b9479ace16f5f7155479605a4ac2718e3d))
+- Allow component classes in action row data (#7614) ([230c0c4](https://github.com/discordjs/discord.js/commit/230c0c4cb137882ff7bab783a4aeaa83ae941de5))
+- **ActionRow:** Allow components to be passed to constructors (#7531) ([e71c76c](https://github.com/discordjs/discord.js/commit/e71c76c7f795837dbcc3576e507bd286640b4296))
+- **showModal:** Align types with the documentation (#7600) ([0d7e4ed](https://github.com/discordjs/discord.js/commit/0d7e4edd969513692c061c107be4bbe7e4b54321))
+- Modals type and doc fixes (#7608) ([93854a8](https://github.com/discordjs/discord.js/commit/93854a8013d07234cb849bfcbfa99f74a4c3cdb4))
+- **InteractionResponseFields:** Add boolean properties (#7565) ([53defb8](https://github.com/discordjs/discord.js/commit/53defb82e36108468e35077b887ee28b811891ab))
+- Allow raw components for reply and message options (#7573) ([2d4971b](https://github.com/discordjs/discord.js/commit/2d4971b032a01c05b55c93d6475e61b0d25d69d3))
+- Fix component *Data types (#7536) ([a8321d8](https://github.com/discordjs/discord.js/commit/a8321d8026df2e6a09d867939986bf77f894f3a8))
+- Use discord-api-types `Locale` (#7541) ([8346003](https://github.com/discordjs/discord.js/commit/83460037be840ba623f3b02a3e6f218943f9d2b7))
+- **anychannel:** Add PartialGroupDMChannel (#7472) ([cf66930](https://github.com/discordjs/discord.js/commit/cf669301c7be8eaecf91d7f764eccc67d7a5b4c6))
+- Remove `ApplicationCommandInteractionOptionResolver` (#7491) ([71f4fa8](https://github.com/discordjs/discord.js/commit/71f4fa82ed6206d6843345a5394119f2a728aa35))
+- **embed:** Fix timestamp allowed types (#7470) ([7959a68](https://github.com/discordjs/discord.js/commit/7959a68d8ec600af248f5506f39871cae7eeeb04))
+- Remove duplicate rate limit for thread creation (#7465) ([2d2de1d](https://github.com/discordjs/discord.js/commit/2d2de1d3fd15a098d69e09710e9a7a3352234fef))
+- Correct types for InteractionCollector guild and channel (#7452) ([6ce906a](https://github.com/discordjs/discord.js/commit/6ce906a02fcb051cb6df3e9f453ba9f53db03bd0))
+- Fix `GuildAuditLogsTypes` keys & typos (#7423) ([3d8c776](https://github.com/discordjs/discord.js/commit/3d8c77600be51a86a99b526078bb1b1fcb9a0811))
+- Remove duplicate `GuildChannelOverwriteOptions` interface (#7428) ([83458ff](https://github.com/discordjs/discord.js/commit/83458ff7c782b8efdaaac931d2dee1764dad25bf))
+- Use `GuildFeature` enum from `discord-api-types` (#7397) ([a7b80b9](https://github.com/discordjs/discord.js/commit/a7b80b9d9bf4902bd85b592986771eadf7a765dc))
+- Fix *BitField.Flags properties (#7363) ([e6a26d2](https://github.com/discordjs/discord.js/commit/e6a26d25b3cf8dfcc8aa8997b021f1774f3b754b))
+- Fix MessageMentions channel types (#7316) ([c05b388](https://github.com/discordjs/discord.js/commit/c05b38873bb3c37c6e4ebcb6b6373a8858cc03de))
+- Fix channel create overloads (#7294) ([1c6c944](https://github.com/discordjs/discord.js/commit/1c6c9449ad68601c6c98748d73be8114401d38ef))
+- Fix regressions and inconsistencies (#7260) ([26a9dc3](https://github.com/discordjs/discord.js/commit/26a9dc32062cd071917bbe7264050315b4d6dd3c))
+- **interaction:** Remove renamed typeguards (#7220) ([68b9564](https://github.com/discordjs/discord.js/commit/68b9564f1821726377a1e929a3ca1fc65b4ad598))
+- AssertType -> expectType ([3f36746](https://github.com/discordjs/discord.js/commit/3f36746561a40cd61a7cd2e054b7ef80d58fc707))
+- Fix cache types resolving to `never` (#7164) ([c978dbb](https://github.com/discordjs/discord.js/commit/c978dbb6233bcd85408caf0bca7619c9c5d508f0))
+
+# [14.12.1](https://github.com/discordjs/discord.js/compare/14.12.0...14.12.1) - (2023-08-01)
+
+## Bug Fixes
+
+- **BaseClient:** Fix destroy method (#9742) ([1af7e5a](https://github.com/discordjs/discord.js/commit/1af7e5a0bb4eca35221cb342c1c53dc18263c789))
+
+# [14.12.0](https://github.com/discordjs/discord.js/compare/14.11.0...14.12.0) - (2023-07-31)
+
+## Bug Fixes
+
+- **ChannelUpdate:** Check against unknown channels (#9697) ([7fb91c5](https://github.com/discordjs/discord.js/commit/7fb91c57f72b74395d67f2207246033c703f1f19))
+- **Action:** Use existing recipients if available (#9653) ([719e54a](https://github.com/discordjs/discord.js/commit/719e54a921f74890519f066a9f56e52fdcfacf07))
+- Everyone role members (#9685) ([0803eb5](https://github.com/discordjs/discord.js/commit/0803eb562bdc7644fa611a0a87dea3e8b0d4c7af))
+- `awaitMessageComponent` with `MessageComponentInteraction`s (#8598) ([b61e4fb](https://github.com/discordjs/discord.js/commit/b61e4fb0dcb9e5d43a7626c5a4760f5801e06fae))
+- **ThreadManager:** Fix internal crash upon conditionally resolving thread members (#9648) ([a6dbe16](https://github.com/discordjs/discord.js/commit/a6dbe163dd3df12ad98465b1dfc040b8eff8805e))
+- **User:** Check global name in equals (#9631) ([8f3bd38](https://github.com/discordjs/discord.js/commit/8f3bd3807233fca2a057948406bdc8aef008b6cb))
+- **WebSocketManager:** Await WebSocket destroy (#9519) ([75308f2](https://github.com/discordjs/discord.js/commit/75308f266933454301b10ee8e1d940d782fdb637))
+- **Client:** Safe call for possibly null WebSocket (#9600) ([24a6149](https://github.com/discordjs/discord.js/commit/24a61495b9bf07887dd535a05ffbec2895faa888))
+- **ThreadManager:** Ensure `fetchActive()` only returns active threads in a channel (#9568) ([53aa24d](https://github.com/discordjs/discord.js/commit/53aa24d41809382c1af57bd1871107c8359e4a15))
+- **LimitedCollection:** Allow items to be stored if keepOverLimit is true when maxSize is 0 (#9534) ([9345d1b](https://github.com/discordjs/discord.js/commit/9345d1b1ac4f7b1f66b919602dff995782151407))
+- **AutocompleteInteraction:** Prevent snake casing of locales (#9565) ([7196fe3](https://github.com/discordjs/discord.js/commit/7196fe36e8089dde7bcaf0db4dd09cf524125e0c))
+
+## Documentation
+
+- Change `Channel` to `BaseChannel` (#9718) ([e5effb6](https://github.com/discordjs/discord.js/commit/e5effb6f6a3e547006eb9bc054cc168844a157f2))
+- **BaseChannel:** Remove `APIChannel` (#9717) ([125405f](https://github.com/discordjs/discord.js/commit/125405f1cf11433c69ff1ae9d6b8f7e713fc37c0))
+- **BuildersSelectMenuOption:** Update link (#9690) ([ede9f4e](https://github.com/discordjs/discord.js/commit/ede9f4e5e203bcfb8820ae7ec3418482735ff9c1))
+- **ClientOptions:** Change default value of sweepers in docs (#9591) ([911e6ef](https://github.com/discordjs/discord.js/commit/911e6eff75f5d05e837d5dfaacf557d6594df16a))
+- **Client:** Correct invite gateway permission checks (#9597) ([e1b6eee](https://github.com/discordjs/discord.js/commit/e1b6eeed0e2e18f9900bc945c9f82d2d05f28a78))
+- Fix broken links to new documentation (#9563) ([d01e8aa](https://github.com/discordjs/discord.js/commit/d01e8aa8af00f5caacffe98caef3ead02e80a9bf))
+
+## Features
+
+- Add ws option support for "buildIdentifyThrottler" (#9728) ([6307f81](https://github.com/discordjs/discord.js/commit/6307f813854ed9dc76d2c4351bd69dd0490d0928))
+- **Client:** Add `guildAvailable` event (#9692) ([3c85fb2](https://github.com/discordjs/discord.js/commit/3c85fb21e62b30e75a7200b704e242c3a0adeda1))
+- User avatar decorations (#8914) ([8d97017](https://github.com/discordjs/discord.js/commit/8d9701745840e23854e8f0b057d21cb10e7d1d54))
+- Add silent option to ShardingManager (#9506) ([df40dcd](https://github.com/discordjs/discord.js/commit/df40dcdb850c398642ebc5cd6e4c48034280f464))
+- **EmbedBuilder:** Add `.length` (#8682) ([53c17e0](https://github.com/discordjs/discord.js/commit/53c17e00c0668c3d1497142dde7384c058c46c64))
+- Guild onboarding (#9120) ([dc73c93](https://github.com/discordjs/discord.js/commit/dc73c938ff9d04a0d7d57630faeb8e81ea343006))
+- Add resume event in shard (#9650) ([a73d54e](https://github.com/discordjs/discord.js/commit/a73d54e43a01719f683e8fd21714e85ffe737add))
+- **presence:** Re-introduce image resolving for other platforms (#9637) ([73c2f8a](https://github.com/discordjs/discord.js/commit/73c2f8aa17aac51b05382444148cb1f60081ee03))
+- Add message to send resume event to shard (#9626) ([a873ec1](https://github.com/discordjs/discord.js/commit/a873ec1e8511829ba95e85bbc9a4074e40c76086))
+- Support new username system (#9512) ([1ab60f9](https://github.com/discordjs/discord.js/commit/1ab60f9da4d6b7ea144fa05b97b029a4bfaeede2))
+- **GuildAuditLogsEntry#extra:** Add missing `channel` property (#9518) ([2272321](https://github.com/discordjs/discord.js/commit/227232112d1cd9f211e177996b7cdee2940f471e))
+
+## Performance
+
+- **Channel:** Linear speed position getter (#9497) ([09b0382](https://github.com/discordjs/discord.js/commit/09b0382c458ed0f3df5b8fa778c504b3e658ac49))
+- **Role:** Improve `members` getter (#9529) ([37181ab](https://github.com/discordjs/discord.js/commit/37181ab2322e48e17ff0d1040bcc510dc7c34e93))
+
+## Refactor
+
+- **User:** Remove deprecation warning from tag (#9660) ([cf8012c](https://github.com/discordjs/discord.js/commit/cf8012c20022aff184d7bce0ad436c136e428d9c))
+- **GuildMember:** Make `_roles` property non-enumerable (#9387) ([46167a7](https://github.com/discordjs/discord.js/commit/46167a79d7d0cac5599459a31c33b2bbcf6e06da))
+- **rest:** Switch api to fetch-like and provide strategies (#9416) ([cdaa0a3](https://github.com/discordjs/discord.js/commit/cdaa0a36f586459f1e5ede868c4250c7da90455c))
+ - **BREAKING CHANGE:** NodeJS v18+ is required when using node due to the use of global `fetch`
+ - **BREAKING CHANGE:** The raw method of REST now returns a web compatible `Respone` object.
+ - **BREAKING CHANGE:** The `parseResponse` utility method has been updated to operate on a web compatible `Response` object.
+ - **BREAKING CHANGE:** Many underlying internals have changed, some of which were exported.
+ - **BREAKING CHANGE:** `DefaultRestOptions` used to contain a default `agent`, which is now set to `null` instead.
+
+## Typings
+
+- **MessageManager:** Allow comparison of messages again (#9612) ([a48d0ef](https://github.com/discordjs/discord.js/commit/a48d0efb09613eac6bf3c1bd996f58f5fff7667c))
+- **AutoModerationActionExecution:** Add forum channels as a possible type in `channel()` (#9623) ([d64330a](https://github.com/discordjs/discord.js/commit/d64330a1570b3a2047ef959a6bce268372c70e99))
+- **ModalSubmitFields:** Components is an array (#9406) ([1cab79f](https://github.com/discordjs/discord.js/commit/1cab79f6fde6f367141c9f7ed91bcb70ed2e5c17))
+- Use `readonly` arrays and `const` type parameters in places (#9641) ([cd69868](https://github.com/discordjs/discord.js/commit/cd6986854f4c2d143d2cd9b81d096738480dfa63))
+- **BaseInteraction:** `appPermissions` not `null` in guilds (#9601) ([6c2242f](https://github.com/discordjs/discord.js/commit/6c2242f4f970b1c75c243f74ae64f30ecbf8ba0d))
+
+# [14.11.0](https://github.com/discordjs/discord.js/compare/14.10.2...14.11.0) - (2023-05-06)
+
+## Bug Fixes
+
+- **WebSocketManager:** Properly emit shard error events (#9521) ([e627468](https://github.com/discordjs/discord.js/commit/e6274681fd10b0d75e1d3b448c94b50ec6810367))
+- **WebSocketManager:** Emit raw ws events again (#9502) ([c429763](https://github.com/discordjs/discord.js/commit/c429763be8e94f0f0cbc630e8bb1d415d46f1465))
+
+## Documentation
+
+- **Client:** Update Sapphire's snowflake utility links (#9501) ([1b7981e](https://github.com/discordjs/discord.js/commit/1b7981e4696b8ae74ceffa876fc0a9be7d0b9f93))
+
+## Features
+
+- **Guild:** Safety alerts channel and mention raid protection (#8959) ([6b2c3fb](https://github.com/discordjs/discord.js/commit/6b2c3fb9d0571de808e990cf064f73240ab93451))
+
+## Performance
+
+- **Role:** Linear speed position getter (#9493) ([8e9a2b4](https://github.com/discordjs/discord.js/commit/8e9a2b4630f78bb9e45345ec2a16812bfac70a20))
+
+## Refactor
+
+- **GuildChannel:** Simplify constructor (#9499) ([f2ad076](https://github.com/discordjs/discord.js/commit/f2ad0762c521422ab64e5b10344a6fd67961031b))
+
+## Typings
+
+- **StringSelectMenuComponentData:** `options` is required (#9515) ([d7b18f0](https://github.com/discordjs/discord.js/commit/d7b18f0681d4147ff192c98108c035d6d0f96cce))
+
+# [14.10.2](https://github.com/discordjs/discord.js/compare/14.10.1...14.10.2) - (2023-05-01)
+
+## Bug Fixes
+
+- Correct `isJSONEncodable()` import (#9495) ([201b002](https://github.com/discordjs/discord.js/commit/201b002ad405b845ace5f708077c1f157bb4126d))
+- **Client:** `generateInvite()` scope validation (#9492) ([b327f49](https://github.com/discordjs/discord.js/commit/b327f4925ff557e0aa8273d7f017aa616226ca06))
+
+# [14.10.1](https://github.com/discordjs/discord.js/compare/14.10.0...14.10.1) - (2023-05-01)
+
+## Bug Fixes
+
+- **Client:** Spelling of InvalidScopesWithPermissions ([ac9bf3a](https://github.com/discordjs/discord.js/commit/ac9bf3ac06ec78dbaca2ce4a82cceb0d82484211))
+
+## Refactor
+
+- **ShardClientUtil:** Logic de-duplication (#9491) ([a9f2bff](https://github.com/discordjs/discord.js/commit/a9f2bff82a18c6a3afdee99e5830e1d7b4da65dc))
+
+# [14.10.0](https://github.com/discordjs/discord.js/compare/14.9.0...14.10.0) - (2023-05-01)
+
+## Bug Fixes
+
+- **ShardClientUtil:** Fix client event names (#9474) ([ad217cc](https://github.com/discordjs/discord.js/commit/ad217cc7604dda6a33df73db82799fd5bb4e85a9))
+- **BaseClient:** Prevent user agent mutation (#9425) ([217e5d8](https://github.com/discordjs/discord.js/commit/217e5d81005a2506c96335f7fb96fa21d7dbb04c))
+- **BitField:** Use only enum names in iterating (#9357) ([40d07fb](https://github.com/discordjs/discord.js/commit/40d07fbbbd51d62793d9ea541f41f157b5dad224))
+- Use new permission name (#9274) ([d2d27ce](https://github.com/discordjs/discord.js/commit/d2d27ce7346bc37b34938c84bd3b106a4fa51f53))
+- **Message#editable:** Fix permissions check in locked threads (#9319) ([d4c1fec](https://github.com/discordjs/discord.js/commit/d4c1fecbe264bc52a70aaf0ec303d35e2f15bbcd))
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Documentation
+
+- **AutoModerationRule:** Update docs (#9464) ([1b15d31](https://github.com/discordjs/discord.js/commit/1b15d31b5ae1b1739716fab00b18083c1d7d389a))
+- **APITypes:** Document role & user select menu components (#9435) ([c6ca5a8](https://github.com/discordjs/discord.js/commit/c6ca5a83e7b72613f95c2145606a1330f64ae894))
+- **BaseMessageOptions:** Fix embeds and components (#9437) ([5c52bb9](https://github.com/discordjs/discord.js/commit/5c52bb95906250518a8813820d543f43dd7abdf9))
+- **InteractionResponses:** ShowModal docs change (#9434) ([7d34100](https://github.com/discordjs/discord.js/commit/7d341000d44b762a2fe0434a6b518f7d63539d34))
+- Use ESM code in examples (#9427) ([ce287f2](https://github.com/discordjs/discord.js/commit/ce287f21d1540da7f17cac8a57dc33a67f391ef3))
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+- **Options:** Fix links and invalid syntax (#9322) ([86e5f5a](https://github.com/discordjs/discord.js/commit/86e5f5a119c6d2588b988a33236d358ded357847))
+- Cleanup MessageCreateOptions and MessageReplyOptions (#9283) ([300059c](https://github.com/discordjs/discord.js/commit/300059cb266e6cca42c30ee7f997c48ab2cc565e))
+- **Events:** Document auto moderation events (#9342) ([79bcdfa](https://github.com/discordjs/discord.js/commit/79bcdfa767e7e842164e1174b6f4834ed731d329))
+- Add `SnowflakeUtil` (#9371) ([8ffcf77](https://github.com/discordjs/discord.js/commit/8ffcf77840b62590fcb4731380d28b22d0b98741))
+- Use stable tag (#9343) ([c0f2dd7](https://github.com/discordjs/discord.js/commit/c0f2dd713151a29c98e1eebad66721a208be1fc0))
+- Remove `JSONEncondable` (#9344) ([b2eec5f](https://github.com/discordjs/discord.js/commit/b2eec5f9fcf37ebb3b7f87a67a6ee3160c182183))
+
+## Features
+
+- **Attachment:** Voice messages (#9392) ([3e01f91](https://github.com/discordjs/discord.js/commit/3e01f91bbba2cbacacc6c921ed664752f679960b))
+- **BaseInteraction:** Support new channel payload (#9337) ([29389e3](https://github.com/discordjs/discord.js/commit/29389e39f479b832e54c7cb3ddd363aebe99674f))
+- **RoleTagData:** Add guildConnections (#9366) ([2dddbe1](https://github.com/discordjs/discord.js/commit/2dddbe1f321f2e2722dba4a28f7d18384cf50353))
+
+## Performance
+
+- **RoleManager:** Dont call Role#position getter twice per role (#9352) ([bfee6c8](https://github.com/discordjs/discord.js/commit/bfee6c8d889502ea39ad919dd9b1e6253a2af571))
+
+## Refactor
+
+- **WebSocketManager:** Use /ws package internally (#9099) ([a9e0de4](https://github.com/discordjs/discord.js/commit/a9e0de4288ea39a6a089b8379dcd44ac0053dac7))
+- Remove `fromInteraction` in internal channel creation (#9335) ([794abe8](https://github.com/discordjs/discord.js/commit/794abe8450bae000cd0544922cdf53e7b3e4c59c))
+
+## Typings
+
+- **AutoModerationActionMetadataOptions:** Make channel property optional (#9460) ([d26df5f](https://github.com/discordjs/discord.js/commit/d26df5fabaf227fb9d10ba5cc1ab326de55aadbc))
+- **CategoryChannel:** Ensure `parent` and `parentId` are `null` (#9327) ([8218ffc](https://github.com/discordjs/discord.js/commit/8218ffc78d23234b32c05a97fde2f4bea64d7aa6))
+- **GuildTextBasedChannel:** Remove unnecessary exclusion of forum channels (#9326) ([7ff3d52](https://github.com/discordjs/discord.js/commit/7ff3d528d942a0daa990194915ff8328dec99149))
+
+# [14.9.0](https://github.com/discordjs/discord.js/compare/14.8.0...14.9.0) - (2023-04-01)
+
+## Bug Fixes
+
+- Add support for new guild feature `GUILD_WEB_PAGE_VANITY_URL` (#9219) ([de1aac6](https://github.com/discordjs/discord.js/commit/de1aac674acb3830124646fcd52cdd98cdb71ba5))
+- Resolving string bitfield (#9262) ([7987565](https://github.com/discordjs/discord.js/commit/79875658cf4a8daa25210c2c620c73a710ca22de))
+- **AutocompleteInteraction:** Send `name_localizations` correctly (#9238) ([1864d37](https://github.com/discordjs/discord.js/commit/1864d37d36e53d127e74b6969a5f542193bfc3c7))
+- Keep symbols in actions manager (#9293) ([984bd55](https://github.com/discordjs/discord.js/commit/984bd55b437507e7ebfdf09ac944c8eba0340d27))
+- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b))
+- **ClientUser:** No mutation on edit (#9259) ([abd6ae9](https://github.com/discordjs/discord.js/commit/abd6ae9fc8ea03722e8b36e29c3fdc1c2cfc93e8))
+- **Message#editable:** Update editable check in threads locked (#9216) ([22e880a](https://github.com/discordjs/discord.js/commit/22e880aaa0d8c644fc8d16a524d17f4f53a056f6))
+- **ThreadManager:** Add `members` and conditionally include `hasMore` (#9164) ([e9a8eb3](https://github.com/discordjs/discord.js/commit/e9a8eb323f3a554dc8f9dab361cd1bac7b88e1cc))
+- **ThreadManager:** Respect `cache` and `force` in fetching (#9239) ([cc57563](https://github.com/discordjs/discord.js/commit/cc57563e73d78a0d71d1444d1ee8215a26a81fa8))
+- **TextBasedChannelTypes:** Add `GuildStageVoice` (#9232) ([51edba7](https://github.com/discordjs/discord.js/commit/51edba78bc4d4cb44b4dd2b79e4bbc515dc46f5b))
+
+## Documentation
+
+- Describe private properties (#8879) ([2792e48](https://github.com/discordjs/discord.js/commit/2792e48119f1cf5fa7d5e6b63369457b0719d4e4))
+- Differ `User#send` (#9251) ([384b4d1](https://github.com/discordjs/discord.js/commit/384b4d10e8642f0f280ea1651f33cd378c341333))
+- Fix compare position example (#9272) ([d16114c](https://github.com/discordjs/discord.js/commit/d16114c52646ca92c53f9b44a0dd10af98dbddcd))
+- **Role:** Fix example for `comparePositionTo()` (#9270) ([bc641fa](https://github.com/discordjs/discord.js/commit/bc641fa9360b851642bc51839cef6bd5600d71f7))
+- Add more examples (#9252) ([bf507ab](https://github.com/discordjs/discord.js/commit/bf507ab2659d95e2991e83293b3834f21283ff33))
+- **FetchArchivedThreadOptions:** `before` respects `archive_timestamp`, not creation timestamp (#9240) ([178c8dc](https://github.com/discordjs/discord.js/commit/178c8dcfeea1c4a6a32835baea389f25feefbac7))
+- Update `APISelectMenuComponent` (#9235) ([56cf138](https://github.com/discordjs/discord.js/commit/56cf138e029e7884a4e7efb606055687ca67b4ac))
+
+## Features
+
+- **Guild:** Add `max_stage_video_channel_users` (#8422) ([34bc36a](https://github.com/discordjs/discord.js/commit/34bc36ac4b04ad033d0dcc3d2701fcf2e682743c))
+- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b))
+- Add GuildBasedTextChannelTypes (#9234) ([5f93dcc](https://github.com/discordjs/discord.js/commit/5f93dcce466286f0fdead8faf4131e98d1c9db55))
+
+## Refactor
+
+- Call `GuildBanManager#create()` directly (#9263) ([f340f3b](https://github.com/discordjs/discord.js/commit/f340f3b1fd719e8f7cf6fa28a41835bc16039fc7))
+- **FetchThreadsOptions:** Remove `active` (#9241) ([519e163](https://github.com/discordjs/discord.js/commit/519e163f8aa3b55420f86d2d60c2584b3a2eb327))
+
+# [14.8.0](https://github.com/discordjs/discord.js/compare/14.7.1...14.8.0) - (2023-03-12)
+
+## Bug Fixes
+
+- **snowflake:** Snowflakes length (#9144) ([955e8fe](https://github.com/discordjs/discord.js/commit/955e8fe312c42ad4937cc1994d1d81e517c413c8))
+- **Actions:** Inject built data by using a symbol (#9203) ([a63ac88](https://github.com/discordjs/discord.js/commit/a63ac88fcca5b61209892a6e560e35d58f5adc3b))
+- **Message#deletable:** Add check for deletable message types (#9168) ([e78b8ad](https://github.com/discordjs/discord.js/commit/e78b8ad3fb6692cba2c565b508254c723f185f0c))
+- **Message:** `bulkDeletable` permissions should be retrieved later for DMs (#9146) ([a9495bd](https://github.com/discordjs/discord.js/commit/a9495bd8f014c8021a214b83ffc531a2af5defef))
+- **AutoModerationActionExecution:** Transform `action` (#9111) ([9156a28](https://github.com/discordjs/discord.js/commit/9156a2889cd0946dfd0b30a5f8365abfbc377b3d))
+- **MessageReaction:** `toJSON()` infinite recursion (#9070) ([f268e1d](https://github.com/discordjs/discord.js/commit/f268e1d9798744e169ae87089ea2e1f214364d95))
+- **ThreadChannel:** Insert starter message from threads created in forum channels (#9100) ([0b76ab4](https://github.com/discordjs/discord.js/commit/0b76ab4c403dd646c71482856ab993b263b7c474))
+- **ApplicationRoleConnectionMetadata:** Export the class correctly (#9076) ([071516c](https://github.com/discordjs/discord.js/commit/071516c35239bd4e1cae572c855d86b335c8536d))
+- Don't auth for interaction `showModal()` (#9046) ([b803a9a](https://github.com/discordjs/discord.js/commit/b803a9a899aaa75a3ea2bc6623c6afb28f495e8c))
+- **WebSocketShard:** Zombie connection fix (#8989) ([876b181](https://github.com/discordjs/discord.js/commit/876b1813128ec702d3ef1e7b0074a4613e88c332))
+- Keep other properties in triggerMetadata (#8977) ([d8dd197](https://github.com/discordjs/discord.js/commit/d8dd197a936dfffc05f9e5bc3184ec9022c56b51))
+- **escapeX:** Emojis with underlines (#8945) ([07b597d](https://github.com/discordjs/discord.js/commit/07b597df16b9412c23ec2387d54564e4d1bcf7ed))
+- **WebSocketShard:** Either start close timeout or emit destroyed but never both (#8956) ([43ce2a5](https://github.com/discordjs/discord.js/commit/43ce2a572eb8977b6994680171ac0c5f9bda1703))
+- **DMChannel:** `recipientId` edge case (#8950) ([7ce9909](https://github.com/discordjs/discord.js/commit/7ce990954e2f73d7a996df0afa42ab287cb12514))
+- Return only boolean for `disabled` (#8965) ([6614603](https://github.com/discordjs/discord.js/commit/66146033268a4db1279b2eaee4bd418f326c0d4b))
+- Export missing `escapeX()` functions (#8944) ([25c27ea](https://github.com/discordjs/discord.js/commit/25c27eac1417e75c9b601b17cf177b1f47b699a9))
+- **WebSocketShard:** Only cleanup the connection if a connection still exists (#8946) ([5eab5fc](https://github.com/discordjs/discord.js/commit/5eab5fc06ca6be36ecf1557f2ad29a670d4d5ae7))
+- Add `@discordjs/formatters` to dependency list (#8939) ([18b3a19](https://github.com/discordjs/discord.js/commit/18b3a19810a6436fa8bb4b490ec5137eaecbd465))
+- **resolveColor:** Invalid colors (#8933) ([c76e170](https://github.com/discordjs/discord.js/commit/c76e17078602914c3e1d227a3acc98eaa99c18d4))
+- **WebSocketShard:** Clear listeners on reconnect (#8927) ([aa8c57d](https://github.com/discordjs/discord.js/commit/aa8c57dab60104549e28451abf35c0387595d67e))
+- Re-export formatters (#8909) ([b14604a](https://github.com/discordjs/discord.js/commit/b14604abdecca575b1fca693c1593e3585bcca8c))
+
+## Documentation
+
+- **MessageManager:** Add clarification to fetch messages (#9222) ([f5ec1ca](https://github.com/discordjs/discord.js/commit/f5ec1cada5ebf0ca4093bdfc81aaf56900c794ef))
+- Make interactionResponse as optional (#9179) ([664cccb](https://github.com/discordjs/discord.js/commit/664cccb2706db33635aa2556954de57f93b3d3db))
+- Fix typos (#9127) ([1ba1f23](https://github.com/discordjs/discord.js/commit/1ba1f238f04221ec890fc921678909b5b7d92c26))
+- **chatInputApplicationCommandMention:** Parameters are not nullable (#9091) ([6f78e82](https://github.com/discordjs/discord.js/commit/6f78e8285b3ce762de010e68d49b377a47dc5a63))
+- No `@type` description and reveal info block (#9097) ([405f940](https://github.com/discordjs/discord.js/commit/405f9400e8e3ffea9f3847ab5abb431a34538a96))
+- **ThreadEditOptions:** Move info tag back to `invitable` (#9020) ([f3fe3ce](https://github.com/discordjs/discord.js/commit/f3fe3ced622676b406a62b43f085aedde7a621aa))
+- Fix a typo in the MentionableSelectMenuInteraction link (#9000) ([6d7a143](https://github.com/discordjs/discord.js/commit/6d7a143667f33ef2ea45d8016ac4738237707881))
+- **ApplicationRoleConnectionMetadata:** Add documentation (#8976) ([2e22b31](https://github.com/discordjs/discord.js/commit/2e22b31892d9b858fcb24fa580b486b4154e823f))
+- Fix malformed overridden documentation (#8954) ([0b8b114](https://github.com/discordjs/discord.js/commit/0b8b114761f961a2bf8e5aae342ed711b154a89e))
+- **GuildForumThreadManager:** Fix `sticker` type (#8940) ([dd62be0](https://github.com/discordjs/discord.js/commit/dd62be077d3e4fbd73a0c10ca344d93d3d19fa38))
+- Fix deprecated links (#8907) ([976b234](https://github.com/discordjs/discord.js/commit/976b234e9dc9999e5dee47b58c85afbc1cd494c2))
+- **UserFlagsBitField:** Make `.Flags` static (#8902) ([c48ff5e](https://github.com/discordjs/discord.js/commit/c48ff5e4205899e3b6cd35812ca857236bef6864))
+
+## Features
+
+- **Collector:** Add lastCollectedTimestamp (#9044) ([4458a13](https://github.com/discordjs/discord.js/commit/4458a13925164762b519ded1037ae8775d879f71))
+- **StageChannel:** Add messages (#9134) ([ffdb197](https://github.com/discordjs/discord.js/commit/ffdb197f988657100e2a9ff0ca17b759339a1dda))
+- **AutoModerationActionExecution:** Add `channel`, `user` and `member` getters (#9142) ([095bd77](https://github.com/discordjs/discord.js/commit/095bd77515aa31bb0e95a350b4355980fea9268d))
+- **AutoModeration:** Support `custom_message` (#9171) ([c1000b8](https://github.com/discordjs/discord.js/commit/c1000b86ed6d5413afcd6ee7e80505e5a845430b))
+- **ThreadMemberManager:** Support pagination fetching (#9035) ([765d5a3](https://github.com/discordjs/discord.js/commit/765d5a3b2d5529c3a2a4b29512f6932264443ed1))
+- **InteractionResponse:** Add new methods (#9132) ([dc9924f](https://github.com/discordjs/discord.js/commit/dc9924fb5f24c8dac963d6b86ba279a89545e73b))
+- **GuildMember:** Add `flags` (#9087) ([76b2116](https://github.com/discordjs/discord.js/commit/76b21162aca7cd4897826437da3063524e1e7553))
+- **Client:** `guildAuditLogEntryCreate` event (#9058) ([9439107](https://github.com/discordjs/discord.js/commit/9439107a1d6a9b77b5f991973d96bc6100da4753))
+- Add role subscription data (#9025) ([1ba22f4](https://github.com/discordjs/discord.js/commit/1ba22f4c9e4173f8866339d3eadb2939d4b32034))
+- **Sticker:** Add support for gif stickers (#9038) ([6a9875d](https://github.com/discordjs/discord.js/commit/6a9875da054a875a4711394547d47439bbe66fb6))
+- **GuildAuditLogs:** Support `after` (#9011) ([0076589](https://github.com/discordjs/discord.js/commit/0076589ccc93e09d77a448874d1ceff5d0e91aa2))
+- Add role subscriptions (#8915) ([3407e1e](https://github.com/discordjs/discord.js/commit/3407e1eea3c8d5629465553f342ac30ceae27a47))
+- Add `not_found` to guild member chunk data (#8975) ([be294ea](https://github.com/discordjs/discord.js/commit/be294eaf9901ea139ce485deeec9178959ffa91f))
+- **ClientApplication:** Add role connections (#8855) ([22e2bbb](https://github.com/discordjs/discord.js/commit/22e2bbb0d24e3f30516f262308d5786f2f666713))
+- **CommandInteractionOptionResolver:** Add `channelTypes` option to `getChannel` (#8934) ([429dbcc](https://github.com/discordjs/discord.js/commit/429dbccc85cabd9986b2e8bf443bf384e4ddc61a))
+- **ForumChannel:** Add `defaultForumLayout` (#8895) ([cbafd47](https://github.com/discordjs/discord.js/commit/cbafd479b331633ed97f7b1a22ef03c6a2f4cf31))
+- Add support for nsfw commands (#7976) ([7a51344](https://github.com/discordjs/discord.js/commit/7a5134459c5f06864bf74631d83b96d9c21b72d8))
+- **InteractionResponse:** CreatedTimestamp (#8917) ([627511d](https://github.com/discordjs/discord.js/commit/627511d6522f772b84c25e6a3f6da06b06bb912e))
+- **Guild:** Add disableInvites method (#8801) ([45faa19](https://github.com/discordjs/discord.js/commit/45faa199820e7c4ccdb2997c7e3b353f566d2312))
+
+## Refactor
+
+- Compare with `undefined` directly (#9191) ([869153c](https://github.com/discordjs/discord.js/commit/869153c3fdf155783e7c0ecebd3627b087c3a026))
+- **GuildMemberManager:** Tidy up fetching guild members (#8972) ([4e0e125](https://github.com/discordjs/discord.js/commit/4e0e1250399aa12c340ac92a86ec2c05704fe2bb))
+- **BitField:** Reverse iterator/toArray responsibilities (#9118) ([f70df91](https://github.com/discordjs/discord.js/commit/f70df910ed12e397066d0bdb27343af21ead4d92))
+- Moved the escapeX functions from discord.js to @discord.js/formatters (#8957) ([13ce78a](https://github.com/discordjs/discord.js/commit/13ce78af6e3aedc793f53a099a6a615df44311f7))
+- Use `deprecate()` directly (#9026) ([1c871b5](https://github.com/discordjs/discord.js/commit/1c871b5b576dddef12c5afacecf416dbd6243dea))
+- **Guild:** Destructure object in guild editing (#8971) ([d3e9f2a](https://github.com/discordjs/discord.js/commit/d3e9f2a355a1f5272d62a507eb6ecd8808904fff))
+- **GuildManager:** Better handling of creation code (#8974) ([d7a09f6](https://github.com/discordjs/discord.js/commit/d7a09f6fcee30c31b4418166bf7bf9e894841f87))
+- **sharding:** Use switch statement (#8928) ([6540914](https://github.com/discordjs/discord.js/commit/6540914b4a7f244f5e40fe2a3b7e73986763d81b))
+- Use consistent naming for options (#8901) ([a7b55c1](https://github.com/discordjs/discord.js/commit/a7b55c1460cf63fb482f7d05657120eec96bee82))
+- **CommandInteractionOptionResolver:** Loosen mentionable checks (#8910) ([1b151db](https://github.com/discordjs/discord.js/commit/1b151db59c4340417f8a28a88064f45336ac8c78))
+
+## Styling
+
+- Run prettier (#9041) ([2798ba1](https://github.com/discordjs/discord.js/commit/2798ba1eb3d734f0cf2eeccd2e16cfba6804873b))
+
+## Typings
+
+- Allow sending messages with `SuppressNotifications` flag (#9177) ([71a427f](https://github.com/discordjs/discord.js/commit/71a427f6322be76fe2d1cb265de09f171b1b354a))
+- Remove `EscapeMarkdownOptions` (#9153) ([fd0246c](https://github.com/discordjs/discord.js/commit/fd0246ca4c75e60d8e117d9ac5af7067c7a63277))
+- **Attachment:** Make `attachment` private (#8982) ([da23cd5](https://github.com/discordjs/discord.js/commit/da23cd5d69de4856d075f00738f75c68c555ae5b))
+- Fix type of Attachment#name (#9101) ([4e0a89f](https://github.com/discordjs/discord.js/commit/4e0a89f58f43f362bfde80d8319dce767c62850f))
+- Allow builders to set channel types in discord.js (#8990) ([7dec892](https://github.com/discordjs/discord.js/commit/7dec892218f7b470a5f8e78732a524a53da24d26))
+- Swap message reaction and emoji identifier types (#8969) ([ad49845](https://github.com/discordjs/discord.js/commit/ad4984526020f2baeefaeeebbded66c6848c4b85))
+- **widget:** Add missing `name` (#8978) ([898b5ac](https://github.com/discordjs/discord.js/commit/898b5ac416cbbb415b125bb27221d0901fdd180e))
+- Use StringSelectMenuOptionBuilder (#8949) ([bec51de](https://github.com/discordjs/discord.js/commit/bec51de1038c35c6edaaa13934781758fe1951de))
+- Fix actions type in automod (#8962) ([5915f39](https://github.com/discordjs/discord.js/commit/5915f39810b712c05a46fa21ab4e12b4cfa3c25a))
+- Subcommand group `options` is required (#8966) ([5dc5e90](https://github.com/discordjs/discord.js/commit/5dc5e902688fc563087cd5061dcb59dd68fd4eda))
+- Add generic to `ActionRowBuilder.from()` (#8414) ([153352a](https://github.com/discordjs/discord.js/commit/153352ad7a1ccb4a9461523cf2597d81df93b69c))
+
+# [14.7.1](https://github.com/discordjs/discord.js/compare/14.7.0...14.7.1) - (2022-12-01)
+
+## Bug Fixes
+
+- Prevent crash on no select menu option (#8881) ([11d195d](https://github.com/discordjs/discord.js/commit/11d195d04ff57d51adb0f0d3a0a7342f9e34aba0))
+
+# [14.7.0](https://github.com/discordjs/discord.js/compare/14.6.0...14.7.0) - (2022-11-28)
+
+## Bug Fixes
+
+- **MessageMentions:** Add `InGuild` generic (#8828) ([f982803](https://github.com/discordjs/discord.js/commit/f9828034cd21e6f702762a46923e0f42115596f6))
+- **Activity:** Fix equals() not checking for differing emoji (#8841) ([7e06f68](https://github.com/discordjs/discord.js/commit/7e06f68185423ba7cb310220b213f445b6571e29))
+- Fixed react/astro/guide/discord.js build, updated dependencies, fix crawlvatar (#8861) ([d0c8256](https://github.com/discordjs/discord.js/commit/d0c82561b8a1765a1daa362ca903f3ffb3fa33ee))
+- **escapeMarkdown:** Fix double escaping (#8798) ([d6873b7](https://github.com/discordjs/discord.js/commit/d6873b7159352479475b3a0daa215bddbdd3a79b))
+- **Transfomers:** Call `.toJSON` in `toSnakeCase` (#8790) ([017f9b1](https://github.com/discordjs/discord.js/commit/017f9b1ed4014dc1db0b78c1a77e463b4403de5d))
+- Censor token in debug output (#8764) ([53d8e87](https://github.com/discordjs/discord.js/commit/53d8e87d7f3a329608250656950bd0a200adb1c7))
+- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4))
+
+## Documentation
+
+- Describe InteractionEditReplyOptions (#8840) ([cb77fd0](https://github.com/discordjs/discord.js/commit/cb77fd02d083438de2aff6f0769baf7d1797bc65))
+- **AutoModerationRuleManager:** Describe cache (#8848) ([d275480](https://github.com/discordjs/discord.js/commit/d2754802cc3479e6288cdbfcd48c76bf57e09a07))
+- Fix message action row components (#8819) ([65bc0ad](https://github.com/discordjs/discord.js/commit/65bc0adbf4d7870d33b92585ca18f964f24bc84e))
+- Specify `ActionRowBuilder` for `components` (#8834) ([8ed5c1b](https://github.com/discordjs/discord.js/commit/8ed5c1beb622f71ce0bd89e4cbeff50e464da8fe))
+- Add `@extends` for select menu classes (#8824) ([09f65b7](https://github.com/discordjs/discord.js/commit/09f65b724b0d2f36bbe89b83570c0d18093b5126))
+- Make WebSocketShard.lastPingTimestamp public (#8768) ([68c9cb3](https://github.com/discordjs/discord.js/commit/68c9cb37bc3df6326b720291827ea477e421faf2))
+- **MessageReplyOptions:** Remove duplicate stickers field (#8766) ([6e348ff](https://github.com/discordjs/discord.js/commit/6e348ffd1d8db8d8ad2da7823460814695e01a43))
+
+## Features
+
+- **Webhook:** Add `channel` property (#8812) ([decbce4](https://github.com/discordjs/discord.js/commit/decbce401062af75f633e6acacc88207b115a719))
+- Auto Moderation (#7938) ([fd4ba5e](https://github.com/discordjs/discord.js/commit/fd4ba5eaba66898699127fc0d5f0ab52c18e3db0))
+- **SelectMenuInteractions:** Add `values` property (#8805) ([b2fabd1](https://github.com/discordjs/discord.js/commit/b2fabd130a76ea54cfbfa1b871ef8659513c2c7a))
+- **ThreadChannel:** Add a helper for pin and unpin (#8786) ([e74aa7f](https://github.com/discordjs/discord.js/commit/e74aa7f6b0fe04e3473fc4a62a73a7db87307685))
+- Add `Message#bulkDeletable` (#8760) ([ff85481](https://github.com/discordjs/discord.js/commit/ff85481d3e7cd6f7c5e38edbe43b27b104e82fba))
+- New select menus (#8793) ([5152abf](https://github.com/discordjs/discord.js/commit/5152abf7285581abf7689e9050fdc56c4abb1e2b))
+- **InteractionResponses:** Add message parameter (#8773) ([8b400ca](https://github.com/discordjs/discord.js/commit/8b400ca975c6bad00060b9c67068f42bd53524ba))
+- Support resume urls (#8784) ([88cd9d9](https://github.com/discordjs/discord.js/commit/88cd9d906074eb79e85df0ef49287f11133d2e0d))
+- Allow deletion of ephemeral messages (#8774) ([fc10774](https://github.com/discordjs/discord.js/commit/fc107744618857bf28c2167f204253baf690ede8))
+- **GuildChannelManager:** Add `.addFollower()` method (#8567) ([caeb1cb](https://github.com/discordjs/discord.js/commit/caeb1cbfdb2f2f007252c4d7e9f47a575c24bcb5))
+
+## Refactor
+
+- **Embed:** Use `embedLength` function from builders (#8735) ([cb3826c](https://github.com/discordjs/discord.js/commit/cb3826ce6dbcd3cf7ab639af6cdfcea80336aa1d))
+
+# [14.6.0](https://github.com/discordjs/discord.js/compare/14.5.0...14.6.0) - (2022-10-10)
+
+## Bug Fixes
+
+- **ClientOptions:** Make `ClientOptions#intents` returns an IntentsBitField (#8617) ([4c2955a](https://github.com/discordjs/discord.js/commit/4c2955a5de6779c29c09e63ba9ad2b235904f842))
+- Correctly construct a builder (#8727) ([e548e6a](https://github.com/discordjs/discord.js/commit/e548e6a10b7e1720f5e8f3c859b0b64d5134a012))
+- **Components:** Error with unknown components (#8724) ([6fd331d](https://github.com/discordjs/discord.js/commit/6fd331dd528e78fd023c908bd58af3faa9ed6c65))
+- **Client:** Don't auth for webhook fetches with token (#8709) ([01d75c8](https://github.com/discordjs/discord.js/commit/01d75c8b8b14f33c95a4da83a8494db848beeb8c))
+- Re-export util (#8699) ([a306219](https://github.com/discordjs/discord.js/commit/a306219673335584accd2ff77ab34d2812ef6c5d))
+- Throw discord.js errors correctly (#8697) ([ace974f](https://github.com/discordjs/discord.js/commit/ace974fc1fdbc5bcaa0d7f6f6d17de185c9f9cbf))
+
+## Documentation
+
+- **Utils:** Remove `private` from `parseEmoji` (#8718) ([a31e605](https://github.com/discordjs/discord.js/commit/a31e605e09064a300e31a3c91466b613654ba98e))
+- Update UserContextMenuCommandInteraction documentation (#8717) ([7556db2](https://github.com/discordjs/discord.js/commit/7556db243d9480949835668fcb5724fdd5d70e08))
+- Fix `AwaitMessageComponentOptions` typedef (#8696) ([9effd82](https://github.com/discordjs/discord.js/commit/9effd82abe82ba71ae627673da21ba07e1ede23e))
+
+## Features
+
+- **Util:** Escape more markdown characters (#8701) ([7b8966b](https://github.com/discordjs/discord.js/commit/7b8966bca156db79933403289741893a6e10ccd5))
+- **GuildChannelManager:** Allow creating channels with a default auto archive duration (#8693) ([628759b](https://github.com/discordjs/discord.js/commit/628759bcff8b0d4c77926cee2b8c18d8fdb4c260))
+- Add `@discordjs/util` (#8591) ([b2ec865](https://github.com/discordjs/discord.js/commit/b2ec865765bf94181473864a627fb63ea8173fd3))
+- **ForumChannel:** Add `defaultSortOrder` (#8633) ([883f6e9](https://github.com/discordjs/discord.js/commit/883f6e9202a559c986f4b15fccb422b5aea7bea8))
+
+## Refactor
+
+- Rename Error to DiscordjsError internally (#8706) ([aec44a0](https://github.com/discordjs/discord.js/commit/aec44a0c93f620b22242f35e626d817e831fc8cb))
+
+## Typings
+
+- Fix events augmentation (#8681) ([ac83ada](https://github.com/discordjs/discord.js/commit/ac83ada306ec153c13260d2bd53e4d704884b68a))
+- **Message:** Remove `& this` from `#inGuild` typeguard (#8704) ([c0f7a1a](https://github.com/discordjs/discord.js/commit/c0f7a1a89a4cf62edc7065bd200b2ce4018e0a27))
+- **ModalBuilder:** Fix constructor typings (#8690) ([2ea2a85](https://github.com/discordjs/discord.js/commit/2ea2a85e6335d57f44689f9b6e284129104de8fc))
+
+# [14.5.0](https://github.com/discordjs/discord.js/compare/14.4.0...14.5.0) - (2022-09-25)
+
+## Bug Fixes
+
+- **ThreadChannel:** Add forum channel to parent (#8664) ([0126d9b](https://github.com/discordjs/discord.js/commit/0126d9b810a156c4bf1b8b93f2121f3319855bac))
+- **GuildChannelManager:** Allow creating webhooks on forums (#8661) ([16fcdc3](https://github.com/discordjs/discord.js/commit/16fcdc36877d1a65ce9995c9fe3502aa268c9388))
+- **ForumChannel:** Implement missing properties and methods (#8662) ([8622939](https://github.com/discordjs/discord.js/commit/862293922924f453f69b0b0f8efe87ddebbd387d))
+- RepliableInteraction respect cached generic (#8667) ([578bc95](https://github.com/discordjs/discord.js/commit/578bc951bdcdc21ec5aee86e7a47a17e8c867dfc))
+- **ThreadChannel:** Allow editing flags (#8671) ([1244854](https://github.com/discordjs/discord.js/commit/1244854e1365d7e4a8d01703a7ec13610ed100c7))
+- **GuildChannelManager:** Typo in `flags` property name when editing (#8669) ([fc8ed81](https://github.com/discordjs/discord.js/commit/fc8ed816e643754a938211a17b41a2cec95df265))
+
+## Documentation
+
+- Fix duplicate typedefs (#8677) ([d79aa2d](https://github.com/discordjs/discord.js/commit/d79aa2d0d0b186bd28cbfc82f3d6ecf3deb41c50))
+- **ForumChannel:** Add `@implements` (#8678) ([8ca407e](https://github.com/discordjs/discord.js/commit/8ca407e089c3050b61a51a52b9100e4613ad1666))
+
+## Features
+
+- **GuildChannelManager:** Allow editing `flags` (#8637) ([abb7226](https://github.com/discordjs/discord.js/commit/abb7226af3445f5b724815bb2f7a121a52a563b5))
+
+## Refactor
+
+- **GuildBanManager:** Add deprecation warning for `deleteMessageDays` (#8659) ([e993122](https://github.com/discordjs/discord.js/commit/e9931229ae62a120ae0761ee2a2c10ea0cb1a6fb))
+
+## Typings
+
+- **GuildChannelManager:** Handle forum channel overload (#8660) ([1486bc9](https://github.com/discordjs/discord.js/commit/1486bc9336369d229972df5e28b9428365b92bff))
+- **Caches:** Allow `GuildForumThreadManager` and `GuildTextThreadManager` (#8665) ([2487e3b](https://github.com/discordjs/discord.js/commit/2487e3bf76260a4a2fbf375e0b01a43f347922a3))
+
+# [14.4.0](https://github.com/discordjs/discord.js/compare/14.3.0...14.4.0) - (2022-09-21)
+
+## Bug Fixes
+
+- Correct applied tags type (#8641) ([f6f15d8](https://github.com/discordjs/discord.js/commit/f6f15d8e877d4ffbe908a093e64809ef9015e0ff))
+- **ThreadChannel:** Make `fetchStarterMessage()` work in forum posts (#8638) ([a7f816e](https://github.com/discordjs/discord.js/commit/a7f816eeb7fa1e193cf0901efbdcaf629f72465f))
+- Update `messageCount`/`totalMessageSent` on message events (#8635) ([145eb2f](https://github.com/discordjs/discord.js/commit/145eb2fc5db5ca739aa9782d5ec5210f81a6aeeb))
+- Footer / sidebar / deprecation alert ([ba3e0ed](https://github.com/discordjs/discord.js/commit/ba3e0ed348258fe8e51eefb4aa7379a1230616a9))
+
+## Documentation
+
+- Correctly overwrite `setRTCRegion` method (#8642) ([f049734](https://github.com/discordjs/discord.js/commit/f0497343f1193635b260b9e2085cac7b43991f74))
+- **GuildTextThreadManager:** Document correct `@extend` (#8639) ([802b239](https://github.com/discordjs/discord.js/commit/802b2394b08151faab6810695fd5c8f27ce84d58))
+- Fix regexps incorrectly being called global (#8624) ([fc9653f](https://github.com/discordjs/discord.js/commit/fc9653f5aea4013da15fb8de0a4452400eaa7739))
+- Update misleading `Client#guildMemberAvailable` event description (#8626) ([22ac6b4](https://github.com/discordjs/discord.js/commit/22ac6b4660db6b02f62b9851e9e3bcfe5fb506b5))
+- **Options:** Update DefaultMakeCacheSettings (#8585) ([3252332](https://github.com/discordjs/discord.js/commit/32523325c6610e95fe3ffcc31d005b3418c6bc68))
+- Change name (#8604) ([dd5a089](https://github.com/discordjs/discord.js/commit/dd5a08944c258a847fc4377f1d5e953264ab47d0))
+
+## Features
+
+- **Widget:** Allow forum channels (#8645) ([b106956](https://github.com/discordjs/discord.js/commit/b1069563086fc616fe21abb789f28f69e57c8851))
+- **WelcomeChannel:** Add forum channel as a type (#8643) ([6f1f465](https://github.com/discordjs/discord.js/commit/6f1f465a77e362e20ec50067be0e634d35946ba5))
+- Allow forum channels in webhook update event (#8646) ([5048a3d](https://github.com/discordjs/discord.js/commit/5048a3d17ace22336e74451d30b513b3db42a26f))
+- Add support for guild forums (#7791) ([8a8d519](https://github.com/discordjs/discord.js/commit/8a8d519c9c4c082370fc6935b56dafb525b873df))
+- **GuildBanManager#create:** Add `deleteMessageSeconds` (#8326) ([03fb5b0](https://github.com/discordjs/discord.js/commit/03fb5b0a2f45275dec7885175ad691a1d9c449c4))
+- Add typeguard to BaseInteraction#isRepliable (#8565) ([55c3ee2](https://github.com/discordjs/discord.js/commit/55c3ee20ae700e78d18a3c4c04b6a7426cffc060))
+- **Integration:** Add `scopes` (#8483) ([8b3d006](https://github.com/discordjs/discord.js/commit/8b3d0061180cfd5d9ba8beae3e8d623b5ce43ea4))
+- Add `chatInputApplicationCommandMention` formatter (#8546) ([d08a57c](https://github.com/discordjs/discord.js/commit/d08a57cadd9d69a734077cc1902d931ab10336db))
+
+## Refactor
+
+- Replace usage of deprecated `ChannelType`s (#8625) ([669c3cd](https://github.com/discordjs/discord.js/commit/669c3cd2566eac68ef38ab522dd6378ba761e8b3))
+- Split message send/edit types/documentation (#8590) ([8e1afae](https://github.com/discordjs/discord.js/commit/8e1afaebdb686033555ca58e53f34bb97f7369c8))
+- Website components (#8600) ([c334157](https://github.com/discordjs/discord.js/commit/c3341570d983aea9ecc419979d5a01de658c9d67))
+
+## Typings
+
+- Narrow channel type in thread managers (#8640) ([14bbc91](https://github.com/discordjs/discord.js/commit/14bbc9150a748e7ac1660c2375c7f065fcc55a6c))
+- **interactions:** Pass `Cached` type to return type of methods (#8619) ([053da5b](https://github.com/discordjs/discord.js/commit/053da5bc91d5cfa8d842b13b0b05083d2f7f086d))
+- Ensure events possess `Client<true>` (#8612) ([a9f003a](https://github.com/discordjs/discord.js/commit/a9f003ac9b56d31166cbf353d02140dad0b2517e))
+- **GuildChannelManager:** Correct `fetch` return type (#8549) ([1d4cdee](https://github.com/discordjs/discord.js/commit/1d4cdee321ab25bb0f109d55a000582825dd79f9))
+- **ThreadChannel:** `fetchStarterMessage` must return a `Message<true>` (#8560) ([b9c62ac](https://github.com/discordjs/discord.js/commit/b9c62ac0f0f534c33f9913135095f8b3d98ec05e))
+- **webhook:** Avatar can be null (#8541) ([f77612a](https://github.com/discordjs/discord.js/commit/f77612a55e9c593a21bc27e58c9fbd03d85787e3))
+
+# [14.3.0](https://github.com/discordjs/discord.js/compare/14.2.0...14.3.0) - (2022-08-22)
+
+## Bug Fixes
+
+- **GuildMemberManager:** `add()` method throws an error (#8539) ([3bef901](https://github.com/discordjs/discord.js/commit/3bef9018c0be3c5dc51d03b796d08b925dc4e1b9))
+- **Guild:** Widget channel types and fixes (#8530) ([23a0b6c](https://github.com/discordjs/discord.js/commit/23a0b6ccf27410963bd4f5c53d9ee2ce019e90a8))
+- **Embed:** Reference video in video (#8473) ([c97977a](https://github.com/discordjs/discord.js/commit/c97977a3e806bd5d8682bc7fb22ebec1a8ceecdc))
+
+## Documentation
+
+- **GuildAuditLogsEntry:** Correct `action` wording (#8499) ([7d25072](https://github.com/discordjs/discord.js/commit/7d2507279cc9d1397c7d61e7c7b856ff4bc17c86))
+
+## Features
+
+- **GuildMemberManager:** AddRole and removeRole (#8510) ([cda3f00](https://github.com/discordjs/discord.js/commit/cda3f005b1546fdb8410e9550526956f840857fc))
+- Deprecate `ActionRow.from()` (#8504) ([f9c25dd](https://github.com/discordjs/discord.js/commit/f9c25ddcfe68f089e13f1090c3df4bd7cd74d2b7))
+- **WebSocketShard:** Support new resume url (#8480) ([bc06cc6](https://github.com/discordjs/discord.js/commit/bc06cc638d2f57ab5c600e8cdb6afc8eb2180166))
+
+## Refactor
+
+- **GuildAuditLogsEntry:** Remove `guild` from application command permission update extra (#8520) ([2b8074d](https://github.com/discordjs/discord.js/commit/2b8074dd12f2f1e957caffb57e5fd4d7be88dc25))
+
+## Typings
+
+- Inference of guild in `MessageManager` (#8538) ([6bb1474](https://github.com/discordjs/discord.js/commit/6bb1474d2001b76773954c959b2c2687e1df0136))
+- Allow choice's value type to be strictly inferred (#8529) ([b3f7c32](https://github.com/discordjs/discord.js/commit/b3f7c32f7f91f12766178f5e17585856e81d9a87))
+- **GuildAuditLogs:** Allow fetching to return all possible values (#8522) ([0dba8ad](https://github.com/discordjs/discord.js/commit/0dba8adbd2e6efd634bd3eb31df09467ba8a8a0d))
+- Correct `EventEmitter.on (static)` return type (#8524) ([16bbc8a](https://github.com/discordjs/discord.js/commit/16bbc8aa208a8a16c22be24696f57d5f7a5faf2b))
+- **GuildAuditLogs:** Remove static `Entry` (#8521) ([7a3d18d](https://github.com/discordjs/discord.js/commit/7a3d18dd6d1fe27393d00019b9ecd35c98b95ee7))
+- Disallow some channel types from webhook creation (#8531) ([4882b17](https://github.com/discordjs/discord.js/commit/4882b17a77484f801faa19fb971f2e6abd88e59f))
+- Implement max/min values for autocomplete (#8498) ([812f7f1](https://github.com/discordjs/discord.js/commit/812f7f1ea86fc953aa796875cbc7ccc434203d77))
+- **ModalMessageModalSubmitInteraction:** ChannelId is not nullable (#8496) ([c31a5cf](https://github.com/discordjs/discord.js/commit/c31a5cfcc82706667768eac77b5f99ba69cf3c91))
+- Change type of ApplicationCommandSubCommand.options (#8476) ([ebaf158](https://github.com/discordjs/discord.js/commit/ebaf158006d3c7db3b8c695e7c027b8af11999ba))
+
+# [14.2.0](https://github.com/discordjs/discord.js/compare/14.1.2...14.2.0) - (2022-08-10)
+
+## Bug Fixes
+
+- **ThreadChannel:** Handle possibly `null` parent (#8466) ([afa27b1](https://github.com/discordjs/discord.js/commit/afa27b15c5b92bc8d55b8285834d8e03f6692d06))
+- Remove DM channels from `Client#messageDeleteBulk`'s types (#8460) ([6c6fe74](https://github.com/discordjs/discord.js/commit/6c6fe74dd84859c5319efa999404e8168f189710))
+- **Transformers:** Do not transform `Date` objects (#8463) ([0e2a095](https://github.com/discordjs/discord.js/commit/0e2a09571c8e5ee61153b04e45334a226a1b4534))
+- **ModalSubmitInteraction:** Allow deferUpdate (#8455) ([0fab869](https://github.com/discordjs/discord.js/commit/0fab869e5179dca7ddec75b5519615278e51ad82))
+- **Guild:** Unable to fetch templates (#8420) ([aac8acc](https://github.com/discordjs/discord.js/commit/aac8acc22be7d7af99933ef099eca7deda43cb40))
+- **MessageMentions:** Infinite loop in `parsedUsers` getter (#8430) ([b8a3136](https://github.com/discordjs/discord.js/commit/b8a31360a220e3d796f5381bd215d30a379ecb7c))
+- **DataResolver:** Make `Buffer` from string (#8416) ([e72b986](https://github.com/discordjs/discord.js/commit/e72b986939e2958547c0e54d6d27472c8d111609))
+
+## Documentation
+
+- Change registration example to use global commands (#8454) ([64a4041](https://github.com/discordjs/discord.js/commit/64a4041a05e9514334a9f9e1f38a1ea18bb676d5))
+- **Colors:** Provide enum descriptions (#8437) ([6ef4754](https://github.com/discordjs/discord.js/commit/6ef4754d40c5ec65715fc1e00e643c52fe0a6209))
+- **AttachmentBuilder:** Fix #8407 (#8421) ([5b053cf](https://github.com/discordjs/discord.js/commit/5b053cf82ec2f2b717a490485af052dc956fe3c9))
+
+## Features
+
+- **Guild:** Add `max_video_channel_users` (#8423) ([3a96ce7](https://github.com/discordjs/discord.js/commit/3a96ce7970947f6268c21a1323d986aac8cb736d))
+
+## Typings
+
+- **Message:** Correct `bulkDelete` return type (#8465) ([c5b96a1](https://github.com/discordjs/discord.js/commit/c5b96a185cb8ba836b7cd10526c14059866f218f))
+- Fix missing types for mentionable options (#8443) ([452e94f](https://github.com/discordjs/discord.js/commit/452e94fd3ecc12de9e3408982c5c7fd931bae634))
+- **ApplicationCommandOption:** Add `ApplicationCommandBooleanOption` (#8434) ([38275fc](https://github.com/discordjs/discord.js/commit/38275fc53d633ce77ed2b142aff788dcbd4fad8c))
+
+# [14.1.2](https://github.com/discordjs/discord.js/compare/14.1.1...14.1.2) - (2022-07-30)
+
+## Bug Fixes
+
+- **errors:** Error codes (#8398) ([480c85c](https://github.com/discordjs/discord.js/commit/480c85c9c3d129204b3399ed726a4e570e0b2852))
+
+## Documentation
+
+- **Embed:** Ensure height and width are numbers (#8396) ([fca3dad](https://github.com/discordjs/discord.js/commit/fca3dada2a565eecfc7e5275cc9317df1d261871))
+
+# [14.1.0](https://github.com/discordjs/discord.js/compare/14.0.3...14.1.0) - (2022-07-29)
+
+## Bug Fixes
+
+- **MessageMentions:** `ignoreRepliedUser` option in `has()` (#8202) ([b4e2c0c](https://github.com/discordjs/discord.js/commit/b4e2c0c4d5538b945f9d597c6410a6f84b315084))
+- **GuildChannelManager:** Allow unsetting rtcRegion (#8359) ([a7d49e5](https://github.com/discordjs/discord.js/commit/a7d49e56fc7c34d2e4548d9e5bf0aec45273506e))
+- **ThreadChannel:** Omit webhook fetching (#8351) ([3839958](https://github.com/discordjs/discord.js/commit/3839958e3f682c715f1017da05436d2fe34900fd))
+- **GuildAuditLogsEntry:** Replace OverwriteType with AuditLogOptionsType (#8345) ([58c1b51](https://github.com/discordjs/discord.js/commit/58c1b51c5ceab137ad9851919b338419eeeab69e))
+- **ShardClientUtil#_respond:** Construct global error (#8348) ([8e520f9](https://github.com/discordjs/discord.js/commit/8e520f946a5b9f93a939290facf4ccca2c05ff21))
+- **Presence:** Do not return NaN for activity timestamp (#8340) ([df42fdf](https://github.com/discordjs/discord.js/commit/df42fdfc421f1190f0a2267a66efd3c921ec2348))
+- **Client:** Omit private properties from toJSON (#8337) ([830c670](https://github.com/discordjs/discord.js/commit/830c670c61dcb17d8ab2a894a3203c68917d27e0))
+- **ApplicationCommandManager:** Allow passing 0n to defaultMemberPermissions (#8311) ([1fb7b30](https://github.com/discordjs/discord.js/commit/1fb7b30963cfe7ea4c05b1f3b42171c879c46a1d))
+
+## Documentation
+
+- **InteractionResponses:** Add `showModal()` return type (#8376) ([0b61dbf](https://github.com/discordjs/discord.js/commit/0b61dbf720e844322b066e30080c3537ab3d8174))
+- **WebhookClient:** Document working options (#8375) ([ba6797e](https://github.com/discordjs/discord.js/commit/ba6797e74209161b64c412de1b6f307cb28736b8))
+- **Message:** Document gateway intent for content (#8364) ([2130aae](https://github.com/discordjs/discord.js/commit/2130aae3210a8eaf91c5ccae5463940d49052c7d))
+- Use info blocks for requirements (#8361) ([80b9738](https://github.com/discordjs/discord.js/commit/80b9738957ebf5b6eb7c9858cec0fb1c897d0a1f))
+- **WebhookClient:** Make constructor a union (#8370) ([e9920a9](https://github.com/discordjs/discord.js/commit/e9920a9c98ffb78bd7d0ae00d486476367296646))
+- Update docs and examples to PascalCase links (#8305) ([34ba9d1](https://github.com/discordjs/discord.js/commit/34ba9d1c4c80eff7e6ac199a40232d07491432cc))
+
+## Features
+
+- Add channel & message URL formatters (#8371) ([a7deb8f](https://github.com/discordjs/discord.js/commit/a7deb8f89830ead6185c5fb46a49688b6d209ed1))
+- Restore missing typeguards (#8328) ([77ed407](https://github.com/discordjs/discord.js/commit/77ed407f6aadb68e729470c5269e9b526cb1b3f0))
+- **GuildMember:** Add dmChannel getter (#8281) ([4fc2c60](https://github.com/discordjs/discord.js/commit/4fc2c60a3bb43671b4b0202ae75eab42aba163ff))
+
+## Refactor
+
+- Deprecate `Formatter` class (#8373) ([7fd9ed8](https://github.com/discordjs/discord.js/commit/7fd9ed8f13d17ce7e98e34f7454d9047054d8467))
+- **PermissionOverwriteManager:** Use `OverwriteType` (#8374) ([6d24805](https://github.com/discordjs/discord.js/commit/6d248051cfd431e9cb1c65cb98f56aa0a6556407))
+
+## Typings
+
+- **GuildAuditLogsEntryExtraField:** Use `AuditLogOptionsType` (#8349) ([200ab91](https://github.com/discordjs/discord.js/commit/200ab91f527d8a5706d277b89a975096f75d141a))
+
+# [14.0.3](https://github.com/discordjs/discord.js/compare/14.0.2...14.0.3) - (2022-07-19)
+
+## Bug Fixes
+
+- **Components:** Support emoji id strings (#8310) ([660e212](https://github.com/discordjs/discord.js/commit/660e212e83df026c684ee2cda7fb4e98870f342e))
+
+# [14.0.2](https://github.com/discordjs/discord.js/compare/14.0.1...14.0.2) - (2022-07-18)
+
+## Bug Fixes
+
+- **DataResolver#resolveImage:** Adjust to updated resolveFile (#8308) ([3a7e93d](https://github.com/discordjs/discord.js/commit/3a7e93df576172c797f1d8bd6483234bb6af2d00))
+
+# [14.0.0](https://github.com/discordjs/discord.js/compare/9.3.1...14.0.0) - (2022-07-17)
+
+## Bug Fixes
+
+- **GuildMemberManager:** Allow setting own nickname (#8066) ([52a9e21](https://github.com/discordjs/discord.js/commit/52a9e213c2dc13ee52ee0234593fdce392f43890))
+- **PermissionOverwriteManager:** Mutates user (#8283) ([3bf30b1](https://github.com/discordjs/discord.js/commit/3bf30b1e6d2d6f583f7069a1e24e7842d59fab2f))
+- **GuildChannelManager:** Access `resolveId` correctly (#8296) ([3648f6d](https://github.com/discordjs/discord.js/commit/3648f6d567cd834c301de913ce19f786a265240d))
+- **GuildChannelManager:** Edit lockPermissions (#8269) ([7876548](https://github.com/discordjs/discord.js/commit/787654816d2b6a5168d199d32cdaeb4ef6d270b9))
+- **`SelectMenuBuilder`:** Properly accept `SelectMenuOptionBuilder`s (#8174) ([31d5930](https://github.com/discordjs/discord.js/commit/31d593046466438c55f5784b0f2098e233c5edc4))
+- Remove global flag on regular expressions (#8177) ([cdd9214](https://github.com/discordjs/discord.js/commit/cdd9214212892e30b3eaa161837c37516c5bcaa0))
+- **MessagePayload:** Guard against `repliedUser` property (#8211) ([fa010b5](https://github.com/discordjs/discord.js/commit/fa010b516254c4ab2762278817f31bf289f0ab6a))
+- **ApplicationCommandManager:** Explicitly allow passing builders to methods (#8209) ([50d55bd](https://github.com/discordjs/discord.js/commit/50d55bd6b819307c86701f4808c087f359c6ccff))
+- **GuildMemberRemove:** Remove member's presence (#8181) ([11b1739](https://github.com/discordjs/discord.js/commit/11b173931968c548f8504649ae7090865892e62d))
+- Edit() data can be partial and `defaultMemberPermissions` can be `null` (#8163) ([0ffbef5](https://github.com/discordjs/discord.js/commit/0ffbef506a97a0bf22cb134fc007c2aec29cbffc))
+- **WebSocketShard:** Keep an error handler on connections (#8150) ([c34c02a](https://github.com/discordjs/discord.js/commit/c34c02ab8d119bf16d8d14d125a9b650b4bb18f4))
+- **DJSError:** Error code validation (#8149) ([31f6582](https://github.com/discordjs/discord.js/commit/31f658247fe0e1047897edab629643d140e77e07))
+- **vcs:** Nsfw property (#8132) ([2eeaad6](https://github.com/discordjs/discord.js/commit/2eeaad6f27fdf8868364fa95ed20755ee09bda87))
+- **WebSocketManager:** Correct error name (#8138) ([db2b033](https://github.com/discordjs/discord.js/commit/db2b0333d912fe83381db2ffe16829d7d03d6c2e))
+- **WebSocketShard:** Disconnected casing (#8117) ([23e183a](https://github.com/discordjs/discord.js/commit/23e183a9ac7aaa3bca2bc4eb8634d1738ec34a26))
+- **webhooks:** Revert webhook caching (and returning Message) (#8038) ([d54bf5d](https://github.com/discordjs/discord.js/commit/d54bf5d286f4057db130901591b192fd4d1668c1))
+- **ApplicationCommand:** Remove `autocomplete` check at the top level and correctly check for `dmPermission` (#8100) ([0a44b05](https://github.com/discordjs/discord.js/commit/0a44b05db83948857afbe18471e7a867da47177a))
+- **ApplicationCommand:** Fix default member permissions assignment (#8067) ([96053ba](https://github.com/discordjs/discord.js/commit/96053babe1bd65ebe1fc6a261f5eb052906afdb9))
+- **scripts:** Read directory and rerun (#8065) ([f527dea](https://github.com/discordjs/discord.js/commit/f527dea36ead194aaae1bf5da1e953df59d692fd))
+- Select menu options to accept both rest and array (#8032) ([fbe67e1](https://github.com/discordjs/discord.js/commit/fbe67e102502b4b49690cbf8ff891ead2232ecf3))
+- **CommandInteractionOptionResolver:** Handle autocompletion interactions (#8058) ([d8077c6](https://github.com/discordjs/discord.js/commit/d8077c6839dc8ceb57d3c3a86bf9746be2a91ada))
+- **scripts:** Add quotes around blob arguments (#8054) ([598f61b](https://github.com/discordjs/discord.js/commit/598f61b992fab1b3fdcab8ff960366f7af0b37ea))
+- **Message:** Force fetching (#8047) ([f2b267c](https://github.com/discordjs/discord.js/commit/f2b267c079dd8aa7277910471f3db2f88af6efb2))
+- **Attachment:** Do not destructure `data` (#8041) ([1afae90](https://github.com/discordjs/discord.js/commit/1afae909d72e648cf48d63d7de2708737a78c126))
+- **DirectoryChannel:** Type `name` and handle `url` (#8023) ([86d8fbc](https://github.com/discordjs/discord.js/commit/86d8fbc023e3925e8f86799d6ebf2d423f7bf2ec))
+- Readd `isThread` type guard (#8019) ([f8ed71b](https://github.com/discordjs/discord.js/commit/f8ed71bfca6e47e3d44ad063e23804354bd23604))
+- Add static method `from` in builders (#7990) ([ad36c0b](https://github.com/discordjs/discord.js/commit/ad36c0be7744ea4214ccf345fe80a5a1a9e89101))
+- Typings (#7965) ([7a1095b](https://github.com/discordjs/discord.js/commit/7a1095b66be3c5d81185e026281e2908c10c1695))
+- **GuildAuditLogs:** Cache guild scheduled events (#7951) ([2f03f9a](https://github.com/discordjs/discord.js/commit/2f03f9ad3f63abee5b5c46d02f1afa8885e8977c))
+- Make sure action row builders create djs builders (#7945) ([adf461b](https://github.com/discordjs/discord.js/commit/adf461baf49be754c7a10c61faf1ef3df333413a))
+- **TextBasedChannel#bulkDelete:** Return deleted message (#7943) ([191510b](https://github.com/discordjs/discord.js/commit/191510b7f87903e4bd93b891649cb290fd50c47e))
+- Remove trailing invites on channel deletion (#7932) ([5e9b757](https://github.com/discordjs/discord.js/commit/5e9b757a3733e6526770eb60a15072612294eb21))
+- **DataResolver:** Fix check for readable streams (#7928) ([28172ca](https://github.com/discordjs/discord.js/commit/28172ca7b57357436d3252ec01ec17dad865d87f))
+- **AuditLog:** Default changes to empty array (#7880) ([19eaed6](https://github.com/discordjs/discord.js/commit/19eaed63905367ef4604366b8839023384524d1f))
+- **Util:** Flatten ignoring certain fields (#7773) ([df64d3e](https://github.com/discordjs/discord.js/commit/df64d3ea382c07e66bc7cc8877ee430206c31d63))
+- Possibly missing (#7829) ([6239d83](https://github.com/discordjs/discord.js/commit/6239d83c4d5f0a396678410d7fef35e39ed29009))
+- `endReason` not being properly set in base Collector (#7833) ([0c18dab](https://github.com/discordjs/discord.js/commit/0c18dab1280205b8855d17d075b7421860d59c14))
+- **SelectMenuBuilder:** Options array (#7826) ([3617093](https://github.com/discordjs/discord.js/commit/361709332bdc871822c2b9919f14fd090d68666a))
+- **Activity:** Platform type (#7805) ([4ac91c6](https://github.com/discordjs/discord.js/commit/4ac91c61d08111ae4d49d1e64caf94e6e49832c8))
+- **ApplicationCommand:** Equal nameLocalizations and descriptionLocalizations (#7802) ([4972bd8](https://github.com/discordjs/discord.js/commit/4972bd87c17cbc6a94c9608ba2ab39c475f9921f))
+- **InteractionResponses:** Use optional chaining on nullable property (#7812) ([c5fb548](https://github.com/discordjs/discord.js/commit/c5fb54852906898ffb19282dd60168dfc6fb2eba))
+- **MessageManager:** Allow caching option of an unspecified limit (#7763) ([1b2d8de](https://github.com/discordjs/discord.js/commit/1b2d8decb638faeae8184119c5cedfcdaf9485e3))
+- **builders:** Add constructor default param (#7788) ([c286650](https://github.com/discordjs/discord.js/commit/c2866504a3824005fe756556fec4b349898b7d22))
+- **MessagePayload:** ResolveBody check body instead of data (#7738) ([3db20ab](https://github.com/discordjs/discord.js/commit/3db20abdd2d502a1ed457842181b164dc6390ba1))
+- **ActionRow:** ToJSON should include components (#7739) ([ebb4dfa](https://github.com/discordjs/discord.js/commit/ebb4dfa262adb2086c83db487002bb2e1ed5ab88))
+- Prevent `NaN` for nullable timestamps (#7750) ([8625d81](https://github.com/discordjs/discord.js/commit/8625d817145eb642aeb0da05184352f438586986))
+- **InteractionCreateAction:** Ensure text-based channel for caching messages (#7755) ([25fdb38](https://github.com/discordjs/discord.js/commit/25fdb3894d33dc395a376a3d962a063eb5735253))
+- Pass `force` correctly (#7721) ([402514f](https://github.com/discordjs/discord.js/commit/402514ff323ccf1f8c95d295f044cf0bb5547c2e))
+- Support reason in setRTCRegion helpers (#7723) ([905a6a1](https://github.com/discordjs/discord.js/commit/905a6a11663f9469ada67f8310a969453ffc5b2a))
+- **GuildMemberManager:** Return type can be null (#7680) ([74bf7d5](https://github.com/discordjs/discord.js/commit/74bf7d57ab959eb820ab1c213ac86ab1ea660398))
+- **gateway:** Use version 10 (#7689) ([8880de0](https://github.com/discordjs/discord.js/commit/8880de0cecdf273fd6df23988e4cb77774a75390))
+- Audit log static reference (#7703) ([85e531f](https://github.com/discordjs/discord.js/commit/85e531f22d7a8f8ad043647ce445726ae0df26c0))
+- Handle possibly missing property (#7641) ([0c32332](https://github.com/discordjs/discord.js/commit/0c32332a5aacbbb6c415da75c166d09cfdb34bbd))
+- **util:** Allow `escapeInlineCode` to escape double backtics (#7638) ([d5369a5](https://github.com/discordjs/discord.js/commit/d5369a56e3fcf50513f3bc582552c2838b04d199))
+- **GuildEditData:** Some fields can be null (#7632) ([4d2b559](https://github.com/discordjs/discord.js/commit/4d2b55955d1a3ff05c3047599232becdc3f2c445))
+- TOKEN_INVALID error not thrown at login with invalid token (#7630) ([cd79bef](https://github.com/discordjs/discord.js/commit/cd79bef2547594f4d0c744faa8fa67fb9fd61526))
+- **GuildScheduledEvent:** Handle missing `image` (#7625) ([c684ac5](https://github.com/discordjs/discord.js/commit/c684ac55e1d225740e67ab7bd5643de1b35f4594))
+- **guild:** Throw if ownerId falsey (#7575) ([98177aa](https://github.com/discordjs/discord.js/commit/98177aa38d3d6516d4c5354d6c7edea925dc881d))
+- Remove Modal export (#7654) ([87a6b84](https://github.com/discordjs/discord.js/commit/87a6b8445bfbf3981cd39813fe961dfa1c7f2bce))
+- **Embed:** Fix incorrect destructuring import (#7615) ([cbdb408](https://github.com/discordjs/discord.js/commit/cbdb408dffd1c7f2193c15989528a3de5fd9f13a))
+- **ThreadMembersUpdate:** Only emit added & removed thread members (#7539) ([c12d61a](https://github.com/discordjs/discord.js/commit/c12d61a3421afcdc41f77c0fddde4efbb257fa69))
+- **Util:** EscapeInlineCode properly (#7587) ([851f380](https://github.com/discordjs/discord.js/commit/851f380eb10d23ffd08e8b845aed4039abbcd03b))
+- **GuildStickerManager:** Correctly access guild ID (#7605) ([4b08d9b](https://github.com/discordjs/discord.js/commit/4b08d9b376bda7a7f4bb3fb8c555d25cca648de4))
+- **MessageManager:** Pin route (#7610) ([cb566c8](https://github.com/discordjs/discord.js/commit/cb566c8b6abff489a944db7952e5c5a48e0c98b0))
+- Handle partial data for `Typing#user` (#7542) ([c6cb5e9](https://github.com/discordjs/discord.js/commit/c6cb5e9ebbf46d81404119a6aa11bb8ebb17d5a4))
+- **guild:** Fix typo accessing user instead of users (#7537) ([8203c5d](https://github.com/discordjs/discord.js/commit/8203c5d843f2431c0f49023282f1bf73d85881d1))
+- **test:** `MessageActionRow` to `ActionRow` (#7523) ([d1d1b07](https://github.com/discordjs/discord.js/commit/d1d1b076bebf7cb706b2436a40d87c6efaed1e1d))
+- **MessagePayload:** Don't set reply flags to target flags (#7514) ([4f30652](https://github.com/discordjs/discord.js/commit/4f306521d829fef21ebd70557b37f8199b82572b))
+- **invite:** Add back channelId property (#7501) ([78aa36f](https://github.com/discordjs/discord.js/commit/78aa36f9f5913b86c82376ecdf20653b15340bbe))
+- Properly serialize `undefined` values (#7497) ([8dbd345](https://github.com/discordjs/discord.js/commit/8dbd34544cbeb499282f01dda9d35ed9bca93591))
+- Allow unsafe embeds to be serialized (#7494) ([942ea1a](https://github.com/discordjs/discord.js/commit/942ea1acbfb49289ccb3a1882b5a2da0a7d0bccf))
+- Attachment types (#7478) ([395a68f](https://github.com/discordjs/discord.js/commit/395a68ff49c622d5136d6b775beaf8e88a2d8610))
+- Use case converter for json component serialization (#7464) ([2d45544](https://github.com/discordjs/discord.js/commit/2d4554440ed9329a5876a9c674c3eb2de0f2f917))
+- **GuildAuditLogs:** Typings and consistency (#7445) ([c1b27f8](https://github.com/discordjs/discord.js/commit/c1b27f8eed8ea04a48bc106453892bddcdc6b73e))
+- **dataresolver:** Ensure fetched file is convert to a buffer (#7457) ([9311fa7](https://github.com/discordjs/discord.js/commit/9311fa7b42b2b5a74e411aa263daa4fbfc270645))
+- **messagepayload:** ResolveFile property names (#7458) ([a8106f7](https://github.com/discordjs/discord.js/commit/a8106f7c586f0ecac76e7f72c53b0da215a6fbf1))
+- **ci:** Ci error (#7454) ([0af9bc8](https://github.com/discordjs/discord.js/commit/0af9bc841ffe1a297d308500d696bad4b85abda9))
+- **threads:** Require being sendable to be unarchivable (#7406) ([861f0e2](https://github.com/discordjs/discord.js/commit/861f0e2134662ab64a11d313130aff58b413d495))
+- **guildmember:** Check if member has administrator permission (#7384) ([81d8b54](https://github.com/discordjs/discord.js/commit/81d8b54ff6b98b0e7ee2c57eaee6bc0b707e135a))
+- **guild:** Remove `maximumPresences` default value (#7440) ([55b388a](https://github.com/discordjs/discord.js/commit/55b388a763dc7223e88b62ae928fe85fe8b8fe58))
+- **guildchannelmanager:** Edit always sets parent to null (#7446) ([b97aedd](https://github.com/discordjs/discord.js/commit/b97aedd8e15f9358960cb59403f3a8ea24b87141))
+- **guildmember:** Make `pending` nullable (#7401) ([fe11ff5](https://github.com/discordjs/discord.js/commit/fe11ff5f6e85571a981e90eba5b9f3bda7a2cd04))
+- **clientpresence:** Fix used opcodes (#7415) ([a921ec7](https://github.com/discordjs/discord.js/commit/a921ec7dc525c58d40b4678e66270f9238abed31))
+- Correctly export UnsafeSelectMenuComponent from builders (#7421) ([aadfbda](https://github.com/discordjs/discord.js/commit/aadfbda586d57a7b775ad26c201f0dc34618180b))
+- MessageReaction.me being false when it shouldn't (#7378) ([04502ce](https://github.com/discordjs/discord.js/commit/04502ce702da53c4b00bf391d0fd936746851381))
+- Fix some typos (#7393) ([92a04f4](https://github.com/discordjs/discord.js/commit/92a04f4d98f6c6760214034cc8f5a1eaa78893c7))
+- **messagementions:** Fix `has` method (#7292) ([3a5ab2c](https://github.com/discordjs/discord.js/commit/3a5ab2c4e54de4e67ab6e323d7eac86482da7382))
+- **guildmembermanager:** Use rest in edit (#7356) ([00ce1c5](https://github.com/discordjs/discord.js/commit/00ce1c56ac224691a8691a3525cb14ae002319c6))
+- **typings:** Mark `RESTOptions` as Partial in `ClientOptions` (#7349) ([e1ecc1a](https://github.com/discordjs/discord.js/commit/e1ecc1a80a9358cdbafbe8542c40b9de8cad467e))
+- **Webhook:** Use correct method name (#7348) ([11e5e5a](https://github.com/discordjs/discord.js/commit/11e5e5ac5b70138f56332eb3e61a42443670b0de))
+- **thread:** Don't assign directly to getters (#7346) ([2db0cdd](https://github.com/discordjs/discord.js/commit/2db0cdd357c3a02decb4fd4168db87888efba283))
+- Missed enums and typings from #7290 (#7331) ([47633f0](https://github.com/discordjs/discord.js/commit/47633f0fd2435d6d8c694d8d37b26039a7b3797a))
+- **guildchannelmanager:** Remove reverse enum lookup (#7304) ([857bba4](https://github.com/discordjs/discord.js/commit/857bba448029f3f070c67fb40b59a3a2a2e5c6f4))
+- Import `clear{Timeout,Interval}` from `node:timers` (#7269) ([8ddd44e](https://github.com/discordjs/discord.js/commit/8ddd44ed85b32c86243efe0ec35b283eaaa8212c))
+- **ApplicationCommand:** Use new ApplicationCommandOptionType enums (#7257) ([06f5210](https://github.com/discordjs/discord.js/commit/06f5210f58bbba6102173033a9f1e6fb004fdf5d))
+- Use enums from discord-api-types (#7258) ([f284a46](https://github.com/discordjs/discord.js/commit/f284a4641fd68de9190bda97ec1eab0981149630))
+- **exports:** Export ApplicationCommandType properly (#7256) ([f753882](https://github.com/discordjs/discord.js/commit/f75388259262bf6b4a64375b97800bd72378f3bc))
+- **Shard:** EventEmitter listener warning (#7240) ([ff3a8b8](https://github.com/discordjs/discord.js/commit/ff3a8b83234d3826fc49c5a8c3cb52ef9f281ffd))
+- **timestamps:** Account for timestamps of 0 when creating Dates (#7226) ([a8509c9](https://github.com/discordjs/discord.js/commit/a8509c91ca0147393b407221405b6b917677961a))
+- **MessageEmbed:** CreatedAt field can be zero (#7218) ([37cad54](https://github.com/discordjs/discord.js/commit/37cad54dbdade39607397b8ad697eca94f1b7197))
+- **BaseClient:** Do not append default options if provided is not an object (#6453) ([b92a7d7](https://github.com/discordjs/discord.js/commit/b92a7d72332c35b607db54aa6aca24b8e10e00ad))
+- Snowflakeutil import (#7219) ([962f4bf](https://github.com/discordjs/discord.js/commit/962f4bf88211dbfb5ad0295a9467dede1e2688ee))
+- **Role:** Remove unused process (#7215) ([63034b4](https://github.com/discordjs/discord.js/commit/63034b44c9849087e391684d9b6c0c6ae9a21113))
+- **WebhookClient:** Updated webhook url regex (#6804) ([1c615d1](https://github.com/discordjs/discord.js/commit/1c615d1bb2606d5f19e55076d4ecab95c619518e))
+- **Sweepers:** Add sweepStickers function (#7213) ([95f8375](https://github.com/discordjs/discord.js/commit/95f8375d425f58f501f32ead03f7927e6596f8e6))
+- **InteractionCreate:** Use ChatInputCommandInteraction instead (#7210) ([49dada3](https://github.com/discordjs/discord.js/commit/49dada35f92470d3e4426362510847b93dd42d1a))
+- **Structues:** Rename old module's name (#7207) ([fbef454](https://github.com/discordjs/discord.js/commit/fbef45489457a2198357dc4dd303740d79036784))
+- **WebSocket:** Remove application command handler (#7202) ([033151c](https://github.com/discordjs/discord.js/commit/033151cf92fe43536b8a4c0f4d7d9ed75a2095c5))
+- **User:** `bannerURL()` should not throw when not present (#6789) ([3872acf](https://github.com/discordjs/discord.js/commit/3872acfeb8390f6f7202d69cf1f7f8616a7b0b34))
+- **VoiceState:** Ensure `suppress` & `streaming` have proper fallback values (#6377) ([a0d5f13](https://github.com/discordjs/discord.js/commit/a0d5f13dd9b27c44f5183a2a9af4c4fdecb312c0))
+- **sweepers:** Provide default for object param (#7182) ([ae2f013](https://github.com/discordjs/discord.js/commit/ae2f013653c8a9f9ffb12ae8fcdb1bb604b39236))
+
+## Deprecation
+
+- **Caching:** Clean up deprecated cache sweeping (#7118) ([12ffa06](https://github.com/discordjs/discord.js/commit/12ffa069aa8b247e945fef16a543f41c2c391bf1))
+
+## Documentation
+
+- Align webhook method return types with implementation (#8253) ([5aeed99](https://github.com/discordjs/discord.js/commit/5aeed9935058241648507d7f651679226a89dbb3))
+- Remove `@private` constructor documentation (#8255) ([452dec5](https://github.com/discordjs/discord.js/commit/452dec57ca422f5e7424a0f0e78c3e152717f413))
+- **ApplicationCommand:** Add `min_length` and `max_length` to ApplicationCommandOptionData (#8239) ([43f62bb](https://github.com/discordjs/discord.js/commit/43f62bb6678ec332795c8cfbe0c01854b95aa61e))
+- **MessageInteraction#commandName:** Updated description (#8212) ([ab238a9](https://github.com/discordjs/discord.js/commit/ab238a9046e0201dbd4755fa41fa69c44b186912))
+- Add missing `@extends` (#8205) ([e0c8282](https://github.com/discordjs/discord.js/commit/e0c82824905dcebf62c2d1afcc5e5590a5594838))
+- **Constants:** Fix SweeperKeys type (#8157) ([af04992](https://github.com/discordjs/discord.js/commit/af04992ed3c2617fda686c2bc7338dcada283dc6))
+- **Channels:** Internally document channel creation (#8154) ([5e5853a](https://github.com/discordjs/discord.js/commit/5e5853a4e885c47e3dde519761dd59a5ec0e06fc))
+- Update threads to use `ThreadAutoArchiveDuration` (#8153) ([ee36d60](https://github.com/discordjs/discord.js/commit/ee36d60dc6714c83569a20716fa8ca8e1bd7de4f))
+- **APITypes:** Remove duplicate type definition (#8144) ([a061233](https://github.com/discordjs/discord.js/commit/a0612335101c7ce2a07d95da4b79f0d4a2b1a6a0))
+- Document missing type definitions (#8130) ([203bc4a](https://github.com/discordjs/discord.js/commit/203bc4a2cf0c2d90a003093318aa0741605610f5))
+- **InteractionResponse:** Fix return (#8141) ([f1ac17c](https://github.com/discordjs/discord.js/commit/f1ac17c961cf95d99e205133605d10d8be5bd737))
+- **PermissionsBitField:** Fix `@name` of bitfield (#8115) ([3a77ce0](https://github.com/discordjs/discord.js/commit/3a77ce0b18c60a0b21ba088590ff89f2ace94087))
+- `TextBasedChannel` -> `TextBasedChannels` typos (#8110) ([db663a5](https://github.com/discordjs/discord.js/commit/db663a55c2ed2faf61e217009158da50dfcf274f))
+- Remove `number`s from enums (#8098) ([0a138da](https://github.com/discordjs/discord.js/commit/0a138dab95a86512f08ac3be356f77f38f2ea880))
+- **GuildAuditLogs:** Fix and reimplement type definitions (#8108) ([4155136](https://github.com/discordjs/discord.js/commit/415513696c7b7e139d1b958e480bf0c7e4d14111))
+- **WebSocketOptions:** Add `version` to docs and typings (#8050) ([386c41f](https://github.com/discordjs/discord.js/commit/386c41f24fb3c9d06967d9c1881a57645c3a71f2))
+- **BaseGuildTextChannel:** Update `setType()`'s parameter type (#8088) ([9c0f190](https://github.com/discordjs/discord.js/commit/9c0f190de1f743d9bd597ffd656503c672db71c1))
+- Update outdated examples (#8081) ([51eadf3](https://github.com/discordjs/discord.js/commit/51eadf37371a6138847efdb4b5b81ee132001cf0))
+- **ThreadMemberManager:** Require `member` in `FetchThreadMemberOptions` (#8079) ([552ec72](https://github.com/discordjs/discord.js/commit/552ec72542ec3b2b3ebf35c9fd84ab502dd746cf))
+- **AutocompleteInteraction:** Change useless log in responds example (#8077) ([ac7bf69](https://github.com/discordjs/discord.js/commit/ac7bf692bfce8204e278205dde811515a51f154b))
+- Description and missing `@typedef` fixes (#8087) ([a2eebf6](https://github.com/discordjs/discord.js/commit/a2eebf6c66f3e4c96ece9d2ae2a1133c84257f42))
+- Ignore docs of unexported functions (#8051) ([94bdcac](https://github.com/discordjs/discord.js/commit/94bdcaca62414a77d4ee0b8b79752a2be937320b))
+- **ClientOptions:** Fix closeTimeout default (#8049) ([b2eea1c](https://github.com/discordjs/discord.js/commit/b2eea1c900ba73d4b98b72f5c196f51e27d3ab8f))
+- **DirectoryChannel:** Extend `Channel` (#8022) ([f3f34f0](https://github.com/discordjs/discord.js/commit/f3f34f07b3b396015b130b8e9d938a3eec688fc3))
+- **Attachment:** Remove constructor doc (#8009) ([0a7953e](https://github.com/discordjs/discord.js/commit/0a7953e46310c77483d277539b47f1a7ab051fd9))
+- **VoiceChannel:** Annotate that it is implementing TextBasedChannel (#8007) ([5987dbe](https://github.com/discordjs/discord.js/commit/5987dbe5cff6991ae6905b0387411fa042d3e9b7))
+- Add missing discord-api-types external types (#8001) ([546d486](https://github.com/discordjs/discord.js/commit/546d48655f36ed9a6c6c5ce3c2eabcca1a86a945))
+- **InteractionResponses:** Replace outdated Embed example for reply (#7875) ([d308c66](https://github.com/discordjs/discord.js/commit/d308c66eeca6bdc3471637ae3aaaaa0a2f5c9989))
+- Require parameter (#7838) ([f4ccc67](https://github.com/discordjs/discord.js/commit/f4ccc6772c15e32489ca22fb2c3e803b85d4dbf9))
+- **ApplicationCommand:** Fix and improve localization docs (#7804) ([61a44c5](https://github.com/discordjs/discord.js/commit/61a44c509c40abaf7ffb95b10942889cbbf155ac))
+- **ApplicationCommand:** Fix ApplicationCommandOptionChoice (#7794) ([f1d0084](https://github.com/discordjs/discord.js/commit/f1d0084da26b0111ca029c789ad9e8e6c2882b4d))
+- Add back static properties and methods (#7706) ([520f471](https://github.com/discordjs/discord.js/commit/520f471ac56cbc01402b79197333a8a34c4ac5c9))
+- **InteractionCollector:** Document channel option type (#7551) ([e787cd5](https://github.com/discordjs/discord.js/commit/e787cd5fa5d013319347392ee4f799a677f6f512))
+- Correctly type getters (#7500) ([ffecf08](https://github.com/discordjs/discord.js/commit/ffecf084956f954cf10e1b844e00326e443a86f2))
+- ApplicationCommandData typedef (#7389) ([d32db88](https://github.com/discordjs/discord.js/commit/d32db8833e1058fb36f2e83af79d5353a9f2f693))
+- **channel:** Fix `isDMBased` docs (#7411) ([f2a7a9f](https://github.com/discordjs/discord.js/commit/f2a7a9f1b30af272a6a8d81825d09f84e749cc24))
+- **messageattachment:** Fix `contentType` docs (#7413) ([2800e07](https://github.com/discordjs/discord.js/commit/2800e07e5974e07b9f8ce043722b9b99a5bcc80d))
+- Add supported option types for autocomplete (#7368) ([8bb3751](https://github.com/discordjs/discord.js/commit/8bb37513400d646d784d59875d6b6a6ec10160cd))
+- Add external builder docs links (#7390) ([0b866c9](https://github.com/discordjs/discord.js/commit/0b866c9fb284971113e288e52327d4506db28011))
+- Add EnumResolvers (#7353) ([72767a1](https://github.com/discordjs/discord.js/commit/72767a1059526bdf617e80d5a9e5da1fbd2936d3))
+- **locales:** Update Discord API docs link (#7266) ([b640272](https://github.com/discordjs/discord.js/commit/b6402723c31bed3c49f8b8cde873b65b9f373fd7))
+- **StageInstance:** Deprecate discoverableDisabled (#7179) ([bd33ebb](https://github.com/discordjs/discord.js/commit/bd33ebb507eab36bc2219103dbd1e0217b9f38c0))
+- **shardingmanager:** Fix type of `execArgv` option (#7284) ([e65da44](https://github.com/discordjs/discord.js/commit/e65da44d9c564d1ffcb0f4df2bcdaf0ce0636f35))
+- **interaction:** Add locale list link (#7261) ([37ec0bd](https://github.com/discordjs/discord.js/commit/37ec0bda6df75fb1dc69b7a1eafbb8ea19e68457))
+- Fix a typo and use milliseconds instead of ms (#7251) ([0dd56af](https://github.com/discordjs/discord.js/commit/0dd56afe1cdf16f1e7d9afe1f8c29c31d1833a25))
+- Fix command interaction docs (#7212) ([137ea24](https://github.com/discordjs/discord.js/commit/137ea249df3aa6b8375ecb42aa456a6fdb811f19))
+- **TextBasedChannel:** Fixed syntax error in examples (#7163) ([b454740](https://github.com/discordjs/discord.js/commit/b454740ae87b6c3c13536181965519c7277e5840))
+- **TextBasedChannel:** Fix #createMessageComponentCollector description (#7168) ([d4e6e03](https://github.com/discordjs/discord.js/commit/d4e6e0370857dff00185d59faf8aaac12b343a7a))
+- Fixes the examples for kick and ban (#7170) ([db669b8](https://github.com/discordjs/discord.js/commit/db669b897132ec458d50ca6c1e3afa761e98ffc3))
+- **RoleManager:** Fix incorrect example (#7174) ([f79ea67](https://github.com/discordjs/discord.js/commit/f79ea67d3a9ba134a9acef0a443bd089c4e173a6))
+
+## Features
+
+- **builder:** Add max min length in string option (#8214) ([96c8d21](https://github.com/discordjs/discord.js/commit/96c8d21f95eb366c46ae23505ba9054f44821b25))
+- **applicationCommand:** Add max min length in string option (#8215) ([94ee60d](https://github.com/discordjs/discord.js/commit/94ee60d3d438f6657bdef51471528769af09624c))
+- Add website documentation early mvp (#8183) ([d95197c](https://github.com/discordjs/discord.js/commit/d95197cc78593df4d0a8d1cc492b0e41b4ab58b8))
+- **BaseInteraction:** Add support for `app_permissions` (#8194) ([002d6a5](https://github.com/discordjs/discord.js/commit/002d6a5aede3d1c0e08bd58eeef38a3b9202f525))
+- **util:** ParseWebhookURL (#8166) ([c4653f9](https://github.com/discordjs/discord.js/commit/c4653f97b1529eb0b99fccdba67c37eb4f467ff9))
+- **AutocompleteInteraction:** Add `commandGuildId` (#8086) ([10a6c42](https://github.com/discordjs/discord.js/commit/10a6c4287dd45a30290814e50fa29a086f85da02))
+- **guild:** Add support for setting MFA level (#8024) ([c5176be](https://github.com/discordjs/discord.js/commit/c5176be14b697ff506eb973c4119644eab544304))
+- **vcs:** Add missing property and methods (#8002) ([0415300](https://github.com/discordjs/discord.js/commit/0415300243877ddbcb501c0a26b1ff65618a1da7))
+- **docgen:** Update typedoc ([b3346f4](https://github.com/discordjs/discord.js/commit/b3346f4b9b3d4f96443506643d4631dc1c6d7b21))
+- Website (#8043) ([127931d](https://github.com/discordjs/discord.js/commit/127931d1df7a2a5c27923c2f2151dbf3824e50cc))
+- Docgen package (#8029) ([8b979c0](https://github.com/discordjs/discord.js/commit/8b979c0245c42fd824d8e98745ee869f5360fc86))
+- Backport handle zombie connection (#7626) ([e1176fa](https://github.com/discordjs/discord.js/commit/e1176faa27898d4f127c293c099201cb294e10ee))
+- **CommandInteraction:** Add 'commandGuildId' (#8018) ([aa59a40](https://github.com/discordjs/discord.js/commit/aa59a409b36c7ef7018d1785d2dba4da17b57864))
+- Allow builders to accept rest params and arrays (#7874) ([ad75be9](https://github.com/discordjs/discord.js/commit/ad75be9a9cf90c8624495df99b75177e6c24022f))
+- **MessageReaction:** Add react method (#7810) ([a328778](https://github.com/discordjs/discord.js/commit/a3287782b57c28b94c390c24e7d5f2d8c303301f))
+- **Collector:** Add `ignore` event (#7644) ([5244fe3](https://github.com/discordjs/discord.js/commit/5244fe3c1cd400985b00e95d8e5ec73823cf4f25))
+- **GuildMemberManager:** Add `GuildMemberManager#fetchMe()` (#7526) ([349766d](https://github.com/discordjs/discord.js/commit/349766dd6925e2d5e5597cc78c73e46f17c56eab))
+- **guildChannelManager:** Add `videoQualityMode` option for `create()` (#7980) ([cdd2ba0](https://github.com/discordjs/discord.js/commit/cdd2ba036ab1559783eb067786c52aff61807557))
+- **EnumResolvers:** Remove Enumresolvers (#7876) ([76694c1](https://github.com/discordjs/discord.js/commit/76694c1497de1b083a792fd1fda20f0eace50c48))
+- Move `me` to `GuildMemberManager` manager (#7669) ([aed687b](https://github.com/discordjs/discord.js/commit/aed687b09f87862eb2f33fb9f95b2cbd0b770585))
+- **rest:** Use undici (#7747) ([d1ec8c3](https://github.com/discordjs/discord.js/commit/d1ec8c37ffb7fe3b63eaa8c382f22ca1fb348c9b))
+- **VoiceChannel:** Add support for text in voice (#6921) ([4ba0f56](https://github.com/discordjs/discord.js/commit/4ba0f56b6af64bac30eea807fb3e9f3c41c3c83c))
+- **SelectMenu:** Allow emojis in options and option constructors (#7797) ([f22245e](https://github.com/discordjs/discord.js/commit/f22245e9d072ac4ef63b0ae0d84d5ba94608ce22))
+- Allow `createMessageComponentCollector` without using `fetchReply` (#7623) ([a58556a](https://github.com/discordjs/discord.js/commit/a58556adc02b2b9239c8f277a4387c743c9d6f04))
+- Add guild directory support (#6788) ([b01f414](https://github.com/discordjs/discord.js/commit/b01f4147d4f3bca021bc269c9f06463f06e3db53))
+- **GuildBanManager:** Support pagination results (#7734) ([fc2a8bb](https://github.com/discordjs/discord.js/commit/fc2a8bb6750919ecd6ee7c872df05f4b677ff5d3))
+- **CommandInteraction:** Add support for localized slash commands (#7684) ([01a423d](https://github.com/discordjs/discord.js/commit/01a423d110cfcddb3d794fcc32579a1547dd472d))
+- Allow emoji strings to be passed through constructors (#7718) ([0faac04](https://github.com/discordjs/discord.js/commit/0faac04b69f1dda3dc860cd584af100e36a40917))
+- **StageInstanceManager:** Add `sendStartNotification` option to create (#7730) ([29f8807](https://github.com/discordjs/discord.js/commit/29f88079559cc02ccfef7a7c16458d481e573fb5))
+- Add `makeURLSearchParams` utility function (#7744) ([8eaec11](https://github.com/discordjs/discord.js/commit/8eaec114a98026024c21545988860c123948c55d))
+- **modal:** Add `awaitModalSubmit` (#7751) ([3037fca](https://github.com/discordjs/discord.js/commit/3037fca196a0f9238d53bb51394daf737bbf3742))
+- **Actions:** Add parent structure to events parameters (#7577) ([3f3e432](https://github.com/discordjs/discord.js/commit/3f3e4327c86da86734c19a96e97115bd505b4532))
+- Export `UnsafeModalBuilder` and `UnsafeTextInputBuilder` (#7628) ([6fec252](https://github.com/discordjs/discord.js/commit/6fec25239dfed46a30826d38dc97f3680f24ec65))
+- **VoiceChannel:** Support `video_quality_mode` (#7722) ([3b3dabf](https://github.com/discordjs/discord.js/commit/3b3dabf3da2e2f24b81967d68b581d7f7452273f))
+- Add API v10 support (#7477) ([72577c4](https://github.com/discordjs/discord.js/commit/72577c4bfd02524a27afb6ff4aebba9301a690d3))
+- **embed:** Remove Embed.setColor (#7662) ([9b0d8cb](https://github.com/discordjs/discord.js/commit/9b0d8cb2d8f7b55753de584eb3a3f347f87596c2))
+- **StageInstance:** Add support for associated guild event (#7576) ([3dff31f](https://github.com/discordjs/discord.js/commit/3dff31f63fe4afdcc818193d737e1917f1ac8105))
+- **VoiceState:** Add edit method (#7569) ([b162f27](https://github.com/discordjs/discord.js/commit/b162f27e46524bfc64515969d753c6e8f30e6c40))
+- **ModalSubmitInteraction:** Add boolean properties (#7596) ([8907390](https://github.com/discordjs/discord.js/commit/89073903a253d9408839573502c72cae93fe70b6))
+- Add Modals and Text Inputs (#7023) ([ed92015](https://github.com/discordjs/discord.js/commit/ed920156344233241a21b0c0b99736a3a855c23c))
+- **discord.js:** Partial transition to undici (#7482) ([5158332](https://github.com/discordjs/discord.js/commit/51583320d3b0f6452cd96bad1021f2a57e4cc6f6))
+- **message:** Add `reason` on pin and unpin (#7520) ([00728f7](https://github.com/discordjs/discord.js/commit/00728f72b36123b607502624b4b02a02ee524d4a))
+- Re-export AuditLogEvent enum (#7528) ([6a2fa70](https://github.com/discordjs/discord.js/commit/6a2fa70b8e79a460be38916eeb605976ad6fe68b))
+- **options:** Add support for custom JSON transformers (#7476) ([dee27db](https://github.com/discordjs/discord.js/commit/dee27db35af379b0835f9fd5cc19563f7bf3dfc0))
+- Add CategoryChannelChildManager (#7320) ([5cf5071](https://github.com/discordjs/discord.js/commit/5cf5071061760c2f9c1e36d7648aef544b03323a))
+ - **Co-authored-by:** Antonio Román <kyradiscord@gmail.com>
+- Attachment application command option type (#7200) ([0034396](https://github.com/discordjs/discord.js/commit/003439671d359dcfe481446ef12b90bd71c57835))
+- **builders:** Add attachment command option type (#7203) ([ae0f35f](https://github.com/discordjs/discord.js/commit/ae0f35f51d68dfa5a7dc43d161ef9365171debdb))
+- **scheduledevents:** Add image option (#7436) ([fbc71ef](https://github.com/discordjs/discord.js/commit/fbc71ef6b668c4b1e2b065d9b65541d9303db0a0))
+- Add methods to managers (#7300) ([dd751ae](https://github.com/discordjs/discord.js/commit/dd751ae19da196cc2f90ccd35c7d8e99878daaf9))
+- **channel:** Add .url getter (#7402) ([f59d630](https://github.com/discordjs/discord.js/commit/f59d6305cb0cd0d154a909f18be76407c4d452d3))
+- **components:** Add unsafe message component builders (#7387) ([6b6222b](https://github.com/discordjs/discord.js/commit/6b6222bf513d1ee8cd98fba0ad313def560b864f))
+- **thread:** Add `newlyCreated` to `threadCreate` event (#7386) ([51beda5](https://github.com/discordjs/discord.js/commit/51beda56f74e44ed013b5d25044b8d5fd1978b29))
+- **channel:** Add isDMBased typeguard (#7362) ([388f535](https://github.com/discordjs/discord.js/commit/388f53550cca7ded7350a050fda03c36e4c1fdf7))
+- **`Interaction`:** Add `.commandType` property to `CommandInteraction` and `AutocompleteInteraction` (#7357) ([567db60](https://github.com/discordjs/discord.js/commit/567db60475c8704661b2e788c9905ef364d6c00c))
+- **scheduledevent:** Add support for event cover images (#7337) ([355f579](https://github.com/discordjs/discord.js/commit/355f579771771a28a293c327a38574c8918d18f8))
+- **enumResolvers:** Strengthen typings (#7344) ([9a566e8](https://github.com/discordjs/discord.js/commit/9a566e8068f28fce87c07861ef1d2877c6ae105f))
+- Allow setting message flags when sending (#7312) ([706db92](https://github.com/discordjs/discord.js/commit/706db9228a91ef42e49d2ec749eac153b9ef75d0))
+- **minor:** Add application_id to Webhook (#7317) ([5ccdb0a](https://github.com/discordjs/discord.js/commit/5ccdb0ab266e4f74c331386ac2d6dd32bc225c62))
+- **threadchannel:** Add `createdTimestamp` field (#7306) ([9a16234](https://github.com/discordjs/discord.js/commit/9a1623425ae2d69f5c16f0096af4951ff5096e80))
+- **GuildPreview:** Add stickers (#7152) ([cf25de9](https://github.com/discordjs/discord.js/commit/cf25de9373df98b3c1cd0ca0a092d9dc8172929d))
+- Enum resolvers & internal enum string removal (#7290) ([213acd7](https://github.com/discordjs/discord.js/commit/213acd799738b888d550cdf3f08906764f8288e0))
+- **guildemojimanager:** Add `delete` and `edit` methods (#7286) ([9181a31](https://github.com/discordjs/discord.js/commit/9181a31e0ba330502052c94da544bb15c8b66f11))
+- **interaction:** Add `isRepliable` type guard (#7259) ([da05a88](https://github.com/discordjs/discord.js/commit/da05a8856b11cc1bf0df424c88a1cf9573e5b654))
+- **Channel:** Improve typeguards (#6957) ([37a22e0](https://github.com/discordjs/discord.js/commit/37a22e04c27724c2a65b05c701e3000ba3653ba1))
+- Add Locales to Interactions (#7131) ([9052e32](https://github.com/discordjs/discord.js/commit/9052e321d1c9c8841962d4e8dc5d9e060b104438))
+- **Permissions:** Remove deprecated thread-related permissions (#6755) ([ab3ff5a](https://github.com/discordjs/discord.js/commit/ab3ff5a262caf7d6225b8d6b54ab2c6b6613c0d0))
+- **VoiceRegion:** Remove the unsent vip field (#6759) ([caaef53](https://github.com/discordjs/discord.js/commit/caaef53dd97ecac9f714072ddba5ae9a99ab1027))
+- **richpresenceassets:** Add YouTube and custom image support (#7184) ([d06d70c](https://github.com/discordjs/discord.js/commit/d06d70ccf26c04c1122fac8430922588a489f95e))
+- **Collector:** Yield all collected values (#7073) ([2b480cb](https://github.com/discordjs/discord.js/commit/2b480cb14e6f52855efcb372da7fb455c15b13b1))
+
+## Refactor
+
+- **Util:** Rename `fetchRecommendedShards` (#8298) ([cafde77](https://github.com/discordjs/discord.js/commit/cafde77d73452d729ba8e2cb1cac3f14235b889b))
+- **Embed:** Add all the types (#8254) ([64f8140](https://github.com/discordjs/discord.js/commit/64f814066cc4adebaca47eb8d7a2040a8df399ae))
+- **rest:** Add content-type(s) to uploads (#8290) ([103a358](https://github.com/discordjs/discord.js/commit/103a3584c95a7b7f57fa62d47b86520d5ec32303))
+- Make `GuildAuditLogsEntry.action` return an `AuditLogEvent` (#8256) ([f0b68d5](https://github.com/discordjs/discord.js/commit/f0b68d57368d7ac3db97925df68c11a945ccd84c))
+- **builder:** Remove `unsafe*Builder`s (#8074) ([a4d1862](https://github.com/discordjs/discord.js/commit/a4d18629828234f43f03d1bd4851d4b727c6903b))
+- Make `ShardEvents` the events of `Shard` (#8185) ([c5750d5](https://github.com/discordjs/discord.js/commit/c5750d59f529ab48a5bc88a73a1c449ef6ddbffd))
+- **Util:** Make single `replace` call in `cleanContent` (#8210) ([6b20645](https://github.com/discordjs/discord.js/commit/6b206457400ce31d566b02a0c135042afb540853))
+- **ApplicationCommandManager:** Use `makeURLSearchParams` (#8196) ([cb3dca4](https://github.com/discordjs/discord.js/commit/cb3dca4ae029724421f3d04a784ace0ae2de75e2))
+- Use `Base` prefix for channel and interaction base classes (#8099) ([e24970e](https://github.com/discordjs/discord.js/commit/e24970e3c3d24f71ba711e59666cd8a49a33e33b))
+- **Constants:** Remove leftover code (#8156) ([cd17aad](https://github.com/discordjs/discord.js/commit/cd17aad720430d23af51c364caeb8b22bf6cb6b5))
+- Errors (#8068) ([e68effa](https://github.com/discordjs/discord.js/commit/e68effa822f064a324ed5b92e797c9fc3ce5e211))
+- **ClientOptions:** Remove `$` prefix from `ws.properties` keys (#8094) ([90a98fe](https://github.com/discordjs/discord.js/commit/90a98fee16b7d1d06768461f4e85127c0edf8419))
+- Use `GuildFeature` enum (#8101) ([e5ec1c4](https://github.com/discordjs/discord.js/commit/e5ec1c4dbc3fa54b2c43d1fec24932d7363e17cb))
+- **util:** Make utility functions top level (#8052) ([e53d162](https://github.com/discordjs/discord.js/commit/e53d1621986035b0c92a1782f6e013d408480e00))
+- **ApplicationCommand:** Permissions v2 (#7857) ([c7391db](https://github.com/discordjs/discord.js/commit/c7391db11b3efd4b1a6904affb26887ad06d6db4))
+- ***:** Include name/reason/etc fields into options/data params (#8026) ([9c8b310](https://github.com/discordjs/discord.js/commit/9c8b3102ce00d1f2c1255c150fb3030f8b6dd026))
+- **ThreadMemberManager:** Consistent thread member fetching (#8021) ([da9107c](https://github.com/discordjs/discord.js/commit/da9107c007536952107bd92943b6c714538d5aeb))
+- **interactions:** Remove redundant interaction typeguards (#8027) ([f57d676](https://github.com/discordjs/discord.js/commit/f57d6768ad24f6e37dc598f9c93709449d3bc4dd))
+- Move all the config files to root (#8033) ([769ea0b](https://github.com/discordjs/discord.js/commit/769ea0bfe78c4f1d413c6b397c604ffe91e39c6a))
+- **channel:** Remove redundant channel type guards (#8012) ([70c733b](https://github.com/discordjs/discord.js/commit/70c733bb9a5bde0f79e6bea0bdc416458bda4c06))
+- Always return `Message` instances in interactions (#7917) ([9720e55](https://github.com/discordjs/discord.js/commit/9720e555340431c3b3ad7bd670ad0ac7eee8865f))
+- **attachment:** Don't return attachment builders from API (#7852) ([dfadcbc](https://github.com/discordjs/discord.js/commit/dfadcbc2fd50be64c8a0c1cae3be10f83678c5ee))
+- Clean up modal submissions (#7994) ([643dab3](https://github.com/discordjs/discord.js/commit/643dab3b1b5305d002fcefed62755bbe11fc3267))
+- **ThreadChannel:** Remove `MAX` helper from threads (#7846) ([dfd9eb2](https://github.com/discordjs/discord.js/commit/dfd9eb20b2d3e0e7db26744b1f15134ac6eda139))
+- **Activity:** Remove undocumented properties (#7844) ([5ba7740](https://github.com/discordjs/discord.js/commit/5ba7740fcfefda1eeba81ace4e6351eac02522a4))
+- **MessageAttachment:** Use `Attachment` instead (#7691) ([ab4c608](https://github.com/discordjs/discord.js/commit/ab4c608b97ff319935e1a7f23564622bfd7ddd57))
+- **Util:** Remove splitting (#7780) ([54e5629](https://github.com/discordjs/discord.js/commit/54e56299865a6746744544ba25d5540a1166d27c))
+- Tidy up builders and components (#7711) ([96a0d83](https://github.com/discordjs/discord.js/commit/96a0d83a1366703ecae40b5e0d5171be9123d079))
+- Remove nickname parsing (#7736) ([78a3afc](https://github.com/discordjs/discord.js/commit/78a3afcd7fdac358e06764cc0d675e1215c785f3))
+- Remove store channels (#7634) ([aedddb8](https://github.com/discordjs/discord.js/commit/aedddb875e740e1f1bd77f06ce1b361fd3b7bc36))
+- **IntegrationApplication:** Remove `summary` (#7729) ([eb6b472](https://github.com/discordjs/discord.js/commit/eb6b472f72488cad7e96befccc00270cf6dc01b8))
+- **GuildAuditLogs:** Remove build (#7704) ([cedd053](https://github.com/discordjs/discord.js/commit/cedd0536baa1301984daf89dfda4e63a7be595a2))
+- **InteractionCollector:** Simplify constructor logic (#7667) ([07b23a9](https://github.com/discordjs/discord.js/commit/07b23a99c7088a7c740f23051f3f755f091519b0))
+- Remove undocumented checks (#7637) ([9a6e691](https://github.com/discordjs/discord.js/commit/9a6e691eaa6c3d133098b2734414590cb838de2e))
+- Allow builders to accept emoji strings (#7616) ([fb9a9c2](https://github.com/discordjs/discord.js/commit/fb9a9c221121ee1c7986f9c775b77b9691a0ae15))
+- Use `static` fields (#7701) ([e805777](https://github.com/discordjs/discord.js/commit/e805777a7a81d1dc7a2edd9741ecb04e685a3886))
+- **EmbedBuilder:** Allow hex strings in setColor (#7673) ([f472975](https://github.com/discordjs/discord.js/commit/f4729759f600372455f062c75859f084e23a5d78))
+- Don't return builders from API data (#7584) ([549716e](https://github.com/discordjs/discord.js/commit/549716e4fcec89ca81216a6d22aa8e623175e37a))
+- **embed:** Allow hex strings in `setColor()` (#7593) ([79d6c04](https://github.com/discordjs/discord.js/commit/79d6c0489c3d563fdd05de63c4fcf93a6deefce1))
+- **InteractionResponses:** Use ClientOptions.jsonTransformer (#7599) ([fac55bc](https://github.com/discordjs/discord.js/commit/fac55bcfd1e8b76aae1273415f74fa6de7aca66d))
+- Deprecate invite stage instance (#7437) ([d2bc9d4](https://github.com/discordjs/discord.js/commit/d2bc9d444f42a70a3c4cc4c68eb107bcaebec509))
+- **guild:** Move `premiumSubscriptionCount` to `AnonymousGuild` (#7451) ([6d3da22](https://github.com/discordjs/discord.js/commit/6d3da226d3c003d137639e719394a807330e4844))
+- **actions:** Use optional chaining (#7460) ([d1bb362](https://github.com/discordjs/discord.js/commit/d1bb36256f2f86022884e6ee9e05b0536cb6384d))
+- **guildbanmanager:** Rename days option to deleteMessageDays (#7447) ([0dfdb2c](https://github.com/discordjs/discord.js/commit/0dfdb2cf11e236e67dd34277108973b5b79790a8))
+- Make public builder props getters (#7422) ([e8252ed](https://github.com/discordjs/discord.js/commit/e8252ed3b981a4b7e4013f12efadd2f5d9318d3e))
+- Remove redundant API defaults (#7449) ([532846b](https://github.com/discordjs/discord.js/commit/532846b1f8260d85022a022d093553310052afc9))
+- Allow discord.js builders to accept camelCase (#7424) ([94bf727](https://github.com/discordjs/discord.js/commit/94bf727cc3a2f11c88e95cdb151b235f775cd1ca))
+- Replace `WSCodes`, `WSEvents`, and `InviteScopes` with `discord-api-types` equivalent (#7409) ([cc25455](https://github.com/discordjs/discord.js/commit/cc25455d2c75177e3eddc880b7fd53cb122387c4))
+- Make constants enums top level and `PascalCase` (#7379) ([d8184f9](https://github.com/discordjs/discord.js/commit/d8184f94dd08daab37195f52828e06af5ed1c1e0))
+- **`Bitfield`:** Use discord-api-types enums instead (#7313) ([fbb1d03](https://github.com/discordjs/discord.js/commit/fbb1d0328bcd517027ad2eedb8753d17489ed851))
+- Use `@discordjs/rest` (#7298) ([ec0fba1](https://github.com/discordjs/discord.js/commit/ec0fba1ed0d3c5b1bb18171ece6fe5ee42d48497))
+- Switch to /builders `Embed` (#7067) ([d2d3a80](https://github.com/discordjs/discord.js/commit/d2d3a80c556a104099a1ddb1b24f1b921c553257))
+- Remove transformPermissions (#7303) ([b4ed8fd](https://github.com/discordjs/discord.js/commit/b4ed8fd3ed953085cd908b2845d4384c8555d3a2))
+- Remove VoiceChannel#editable (#7291) ([164589c](https://github.com/discordjs/discord.js/commit/164589c5516a847457444d11098981d557b6778b))
+- Remove boolean option for `Webhook#fetchMessage` (#7293) ([347ff80](https://github.com/discordjs/discord.js/commit/347ff80bbc9bc5243b7f68ba5d745782eadeba21))
+- **subcommandgroup:** Required default to false (#7217) ([6112767](https://github.com/discordjs/discord.js/commit/6112767128a664f32205425f52ba52220d57834f))
+- **invite:** Make `channel` and `inviter` getters (#7278) ([18b0ed4](https://github.com/discordjs/discord.js/commit/18b0ed4cbe8285637a971c7c99ee49d18060a403))
+- Remove required from getMember (#7188) ([c90e47f](https://github.com/discordjs/discord.js/commit/c90e47f90403e5b1b3499b213dcdf2704fd96b66))
+- Remove djs components and use /builders components instead (#7252) ([101d7c5](https://github.com/discordjs/discord.js/commit/101d7c5ffa03edcf8cb8a0647b77d5c9a38e4bdd))
+- Default *URL methods to animated hash (#7149) ([7c07976](https://github.com/discordjs/discord.js/commit/7c07976018728154be0ce0314d3e8dfe8eb9ed5b))
+- Use setPosition inside edit (#7263) ([0b23b7f](https://github.com/discordjs/discord.js/commit/0b23b7f0394a20596c8d85b82870c3f35ea6b0e0))
+- Don't disable import order lint (#7262) ([0a5d5f3](https://github.com/discordjs/discord.js/commit/0a5d5f38c0b1a249fa2efe16f3b601c90622a4d5))
+- Remove discord.js enums and use discord-api-types enums instead (#7077) ([aa6d1c7](https://github.com/discordjs/discord.js/commit/aa6d1c74de01dd9a8f020c43fb2c193c4729df8d))
+- **application:** Remove fetchAssets (#7250) ([1479e40](https://github.com/discordjs/discord.js/commit/1479e40bcecc4c28ecb9f05fa4fbbdfe3bd387e1))
+- PresenceUpdate and demuxProbe (#7248) ([1745973](https://github.com/discordjs/discord.js/commit/174597302408f13c5bb685e2fb02ae2137cb481d))
+- **embeds:** Don't create new embed instances when unnecessary (#7227) ([822dc67](https://github.com/discordjs/discord.js/commit/822dc678da626de7b4fb22a747cd3cd2e8376732))
+- **GuildMember:** Throw better errors on #kickable and #bannable (#7137) ([4fd127e](https://github.com/discordjs/discord.js/commit/4fd127e79edfa1851f8a10242838f9d7aa68c8c3))
+- **SnowflakeUtil:** Switch to `@sapphire/snowflake` (#7079) ([e082dfb](https://github.com/discordjs/discord.js/commit/e082dfb1584926e4c05face5966d16e4a2921bc5))
+- **InteractionCreate:** Remove interaction event (#6326) ([ae876d9](https://github.com/discordjs/discord.js/commit/ae876d962453ccf843f8e6f70666a98a3173bb75))
+- **MessageCreate:** Remove message event (#6324) ([171e917](https://github.com/discordjs/discord.js/commit/171e917fb96b6bf39a6ad70e83be646f72fe451e))
+- **integration:** Turn undefined into null and consistency (#7209) ([13eb782](https://github.com/discordjs/discord.js/commit/13eb78256da901e6c3c405f546f36617ef5e8239))
+- Remove `deleted` field (#7092) ([cee7fd1](https://github.com/discordjs/discord.js/commit/cee7fd181c464e44eabf20b511d12589f2453722))
+- **Dates:** Save timestamps everywhere and use Date.parse (#7108) ([55e21f5](https://github.com/discordjs/discord.js/commit/55e21f53663a91863c63b6d9f3a8c35564664061))
+- **RoleManager:** Remove `comparePositions()` (#7201) ([fbbac27](https://github.com/discordjs/discord.js/commit/fbbac279789427b2c36869dc47b65fb08431e14d))
+- Better Command Terminology (#7197) ([b7856e7](https://github.com/discordjs/discord.js/commit/b7856e7809ff6fa21fe00286f885808535624f7c))
+- **Actions:** Remove deleted maps (#7076) ([5022b14](https://github.com/discordjs/discord.js/commit/5022b14da09e9b421f947e9bc385a0574cbf07d1))
+- **Client:** Remove applicationCommand events (#6492) ([6085b4f](https://github.com/discordjs/discord.js/commit/6085b4f72723d4ff82f7fea504241d14c94af21e))
+- Remove `Util.removeMentions()` (#6530) ([0c24cc8](https://github.com/discordjs/discord.js/commit/0c24cc8ec0d818315cc8f8bcf74fce060847ac79))
+- **Constants:** Change APPLICATION_COMMAND -> CHAT_INPUT_COMMAND (#7018) ([75616a3](https://github.com/discordjs/discord.js/commit/75616a305f9af33013486b13a872a39212101ce7))
+- **Guild:** Remove deprecated setXPositions methods (#6897) ([43e5e3c](https://github.com/discordjs/discord.js/commit/43e5e3c339a96fa895267d4538eee1d5e5843d05))
+- **UserFlags:** Update flag names (#6938) ([b246fc4](https://github.com/discordjs/discord.js/commit/b246fc4101b8e4957ffd1af8e2e4986a020ca211))
+
+## Styling
+
+- Cleanup tests and tsup configs ([6b8ef20](https://github.com/discordjs/discord.js/commit/6b8ef20cb3af5b5cfd176dd0aa0a1a1e98551629))
+
+## Typings
+
+- **GuildFeature:** Allow feature strings to be passed (#8264) ([b7d4e55](https://github.com/discordjs/discord.js/commit/b7d4e55419207d4e25f5c40cab221c7c04a617bf))
+- **CategoryChannelChildManager:** Fix Holds type (#8288) ([33a7a5c](https://github.com/discordjs/discord.js/commit/33a7a5cbdc00d2a5034dc1ec91fec5da7042f9d0))
+- Remove `MemberMention` (#8292) ([bf65b37](https://github.com/discordjs/discord.js/commit/bf65b37d1a9ea8417e26ad4afacea1eb45a0ff5a))
+- **GuildMemberManager:** Fix placement for `fetchMe()` (#8258) ([7525615](https://github.com/discordjs/discord.js/commit/75256153a9923d94ca709a37aaccc48dfb43c153))
+- Convert `Events` to an enum (#8246) ([feb3bdd](https://github.com/discordjs/discord.js/commit/feb3bdda0a3c3da80378c8cbcafca2968551eef9))
+- **GuildMemberManager:** Non-void return of `edit()` (#8186) ([c7a205f](https://github.com/discordjs/discord.js/commit/c7a205f7b992eea43af13a4638e2a03db7bc0d8a))
+- Add missing shard types (#8180) ([27d8deb](https://github.com/discordjs/discord.js/commit/27d8deb4716a87704370a95103b16fa1b763de18))
+- Implement `GuildChannelEditOptions` (#8184) ([b83e0c0](https://github.com/discordjs/discord.js/commit/b83e0c0caffc2b767aa1ba4412580970a6901899))
+- **Status:** Add missing members (#8179) ([8421f92](https://github.com/discordjs/discord.js/commit/8421f9203bd2d85ef8e64c3fb9a991c74223a75d))
+- **GuildScheduledEvent#scheduledStartAt:** Should be nullish (#8111) ([65dc8d6](https://github.com/discordjs/discord.js/commit/65dc8d677ee81469c0eeb4ecdd83fe2f68cc8982))
+- Fix modal builder constructor data type (#8143) ([7279f9c](https://github.com/discordjs/discord.js/commit/7279f9c31b14bc1e78c63b7298e80e37ca5dfe0c))
+- Use `ThreadAutoArchiveDuration` from discord-api-types (#8145) ([a3799f9](https://github.com/discordjs/discord.js/commit/a3799f9ebb027904830457119708d550e2009200))
+- **Shard#reconnecting:** Fix event name (#8118) ([95e6d6e](https://github.com/discordjs/discord.js/commit/95e6d6ede03c4fb92a8d8027a085e84b043fd895))
+- **ApplicationCommand:** Fix typo in setDMPermission (#8097) ([4df491c](https://github.com/discordjs/discord.js/commit/4df491ce8578a1b01ee8412a4df8137a302e7202))
+- Fix `setType()` parameter and `ChannelData.type` (#8089) ([b4e28a8](https://github.com/discordjs/discord.js/commit/b4e28a8ff6bf165c54a8726d3bc3a3cc0c1e469b))
+- Fix `ApplicationCommandPermissionsUpdate` event typings (#8071) ([9964454](https://github.com/discordjs/discord.js/commit/9964454c2944a0523399481a5f609144486e549b))
+- **AutocompleteOption:** Fix and improve types (#8069) ([476b7d5](https://github.com/discordjs/discord.js/commit/476b7d519c719152ea04e207f6dd09bb23e733db))
+- **ThreadMemberManager:** Fix return type of fetching members with no arguments (#8060) ([2392a6f](https://github.com/discordjs/discord.js/commit/2392a6f5de2efcf6b326173d26295c928b94adb6))
+- Remove isAutocomplete typeguard from typings (#8063) ([c0f079d](https://github.com/discordjs/discord.js/commit/c0f079d2325a636c83ac676c525bfa89ce308b3c))
+- **AttachmentBuilder:** Fix data type (#8016) ([7fa698d](https://github.com/discordjs/discord.js/commit/7fa698d23e548987762c4c66c96c510d9ea56eb4))
+- **modal:** Fix `showModal()` typings (#8014) ([0ccc243](https://github.com/discordjs/discord.js/commit/0ccc243c8ffbf852660c899cc2ad47bd5ebb65cb))
+- Fix some attachment related typings (#8013) ([6aa6232](https://github.com/discordjs/discord.js/commit/6aa623240ee94b117c7e69c1d09b50923a8f7a4c))
+- **AttachmentBuilder:** Remove name parameter from constructor (#8008) ([6266b0c](https://github.com/discordjs/discord.js/commit/6266b0c1e323f9522010f90f34ce6f17fcb6e769))
+- Add types to `EventEmitter` static methods (#7986) ([d60c464](https://github.com/discordjs/discord.js/commit/d60c464e618e4159d2656e7832798909832f33cd))
+- Nullify `guildScheduledEventUpdate`'s old parameter (#7955) ([fdeac9d](https://github.com/discordjs/discord.js/commit/fdeac9d9fba06c532eca296ddd8479047bc732bf))
+- Make `CacheType` generic more accurate for return values (#7868) ([e07b910](https://github.com/discordjs/discord.js/commit/e07b910e684bc3cf71fb93417951ad42351bace4))
+- **guildScheduledEvent:** Mark `entityMetadata` as nullable (#7908) ([64bdf53](https://github.com/discordjs/discord.js/commit/64bdf53116945ffb51764bb8ec539d530aefcfb1))
+- **discord.js:** Export missing enums (#7864) ([5eeef3f](https://github.com/discordjs/discord.js/commit/5eeef3f708eb900ec994d837fb4cd414a4f4b437))
+- Fix return type of `toString()` on channels (#7836) ([ece6289](https://github.com/discordjs/discord.js/commit/ece628986c7eb1a66f46076d8f8518c9ff00aaf3))
+- **Message#activity:** Make `partyId` optional and use enum for `type` (#7845) ([bfeaf85](https://github.com/discordjs/discord.js/commit/bfeaf856f76eb7cb756ac55aac13636ccdb345b6))
+- Cleanup *Data type definitions (#7716) ([585169f](https://github.com/discordjs/discord.js/commit/585169f2f097ffb1940d17f549e4290aa55acde2))
+- Fix BooleanCache never resolving to true (#7809) ([440ac24](https://github.com/discordjs/discord.js/commit/440ac243ca1d6f8cd04603e63e3f2f6ea1722ee8))
+- **CommandInteraction:** Add awaitModalSubmit (#7811) ([a6d9ce5](https://github.com/discordjs/discord.js/commit/a6d9ce57c6cae90d0afc60010cad44fdc2c2d06c))
+- **ThreadChannel:** Fix autoArchiveDuration types (#7816) ([0857476](https://github.com/discordjs/discord.js/commit/08574763eb665b5a43ccfb826929f1e3f0d1c3a7))
+- Add missing typing (#7781) ([f094e33](https://github.com/discordjs/discord.js/commit/f094e338617a1a3c9f48a325e4b8e9b5a405aa91))
+- **VoiceChannel:** Nullify property (#7793) ([446eb39](https://github.com/discordjs/discord.js/commit/446eb390ce58b7e7f60e297b25f53773a55f7fb9))
+- **ModalSubmitInteraction:** Message (#7705) ([b577bcc](https://github.com/discordjs/discord.js/commit/b577bcc1df5c6424fef9984e19a5f11c77371cf3))
+- **Embed:** Add missing getters and add video to EmbedData (#7728) ([fd1dc72](https://github.com/discordjs/discord.js/commit/fd1dc72c0a77dbe18753d8db22972dfa5fe4ab36))
+- **ModalSubmitInteraction:** Fix `components` type (#7732) ([6f4e97b](https://github.com/discordjs/discord.js/commit/6f4e97bfafe4a058f6ec85d321676401d701ee55))
+- **interactionCollector:** Filter should have a collected argument (#7753) ([e4f2705](https://github.com/discordjs/discord.js/commit/e4f27051ca921d299c302b600a8c2917e9356ef6))
+- Fix regressions (#7649) ([5748dbe](https://github.com/discordjs/discord.js/commit/5748dbe08783beb80c526de38ccd105eb0e82664))
+- **Constants:** Add `NonSystemMessageTypes` (#7678) ([9afc030](https://github.com/discordjs/discord.js/commit/9afc03054e4c8973702d6c18e618643f76382dd9))
+- Fix auto archive duration type (#7688) ([8e3b2d7](https://github.com/discordjs/discord.js/commit/8e3b2d7abd38136534969cf77c6a748ee3a20355))
+- **InteractionResponseFields:** Add webhook (#7597) ([daf2829](https://github.com/discordjs/discord.js/commit/daf2829cb58d1a44cb1f1ece21e428d1a23e99c9))
+- **Embed:** Add forgotten `footer` type (#7665) ([8fb9816](https://github.com/discordjs/discord.js/commit/8fb98165a9d098ab316475d6baacb015783eb638))
+- **ColorResolvable:** Simplify string types (#7643) ([2297c2b](https://github.com/discordjs/discord.js/commit/2297c2b9479ace16f5f7155479605a4ac2718e3d))
+- Allow component classes in action row data (#7614) ([230c0c4](https://github.com/discordjs/discord.js/commit/230c0c4cb137882ff7bab783a4aeaa83ae941de5))
+- **ActionRow:** Allow components to be passed to constructors (#7531) ([e71c76c](https://github.com/discordjs/discord.js/commit/e71c76c7f795837dbcc3576e507bd286640b4296))
+- **showModal:** Align types with the documentation (#7600) ([0d7e4ed](https://github.com/discordjs/discord.js/commit/0d7e4edd969513692c061c107be4bbe7e4b54321))
+- Modals type and doc fixes (#7608) ([93854a8](https://github.com/discordjs/discord.js/commit/93854a8013d07234cb849bfcbfa99f74a4c3cdb4))
+- **InteractionResponseFields:** Add boolean properties (#7565) ([53defb8](https://github.com/discordjs/discord.js/commit/53defb82e36108468e35077b887ee28b811891ab))
+- Allow raw components for reply and message options (#7573) ([2d4971b](https://github.com/discordjs/discord.js/commit/2d4971b032a01c05b55c93d6475e61b0d25d69d3))
+- Fix component *Data types (#7536) ([a8321d8](https://github.com/discordjs/discord.js/commit/a8321d8026df2e6a09d867939986bf77f894f3a8))
+- Use discord-api-types `Locale` (#7541) ([8346003](https://github.com/discordjs/discord.js/commit/83460037be840ba623f3b02a3e6f218943f9d2b7))
+- **anychannel:** Add PartialGroupDMChannel (#7472) ([cf66930](https://github.com/discordjs/discord.js/commit/cf669301c7be8eaecf91d7f764eccc67d7a5b4c6))
+- Remove `ApplicationCommandInteractionOptionResolver` (#7491) ([71f4fa8](https://github.com/discordjs/discord.js/commit/71f4fa82ed6206d6843345a5394119f2a728aa35))
+- **embed:** Fix timestamp allowed types (#7470) ([7959a68](https://github.com/discordjs/discord.js/commit/7959a68d8ec600af248f5506f39871cae7eeeb04))
+- Remove duplicate rate limit for thread creation (#7465) ([2d2de1d](https://github.com/discordjs/discord.js/commit/2d2de1d3fd15a098d69e09710e9a7a3352234fef))
+- Correct types for InteractionCollector guild and channel (#7452) ([6ce906a](https://github.com/discordjs/discord.js/commit/6ce906a02fcb051cb6df3e9f453ba9f53db03bd0))
+- Fix `GuildAuditLogsTypes` keys & typos (#7423) ([3d8c776](https://github.com/discordjs/discord.js/commit/3d8c77600be51a86a99b526078bb1b1fcb9a0811))
+- Remove duplicate `GuildChannelOverwriteOptions` interface (#7428) ([83458ff](https://github.com/discordjs/discord.js/commit/83458ff7c782b8efdaaac931d2dee1764dad25bf))
+- Use `GuildFeature` enum from `discord-api-types` (#7397) ([a7b80b9](https://github.com/discordjs/discord.js/commit/a7b80b9d9bf4902bd85b592986771eadf7a765dc))
+- Fix *BitField.Flags properties (#7363) ([e6a26d2](https://github.com/discordjs/discord.js/commit/e6a26d25b3cf8dfcc8aa8997b021f1774f3b754b))
+- Fix MessageMentions channel types (#7316) ([c05b388](https://github.com/discordjs/discord.js/commit/c05b38873bb3c37c6e4ebcb6b6373a8858cc03de))
+- Fix channel create overloads (#7294) ([1c6c944](https://github.com/discordjs/discord.js/commit/1c6c9449ad68601c6c98748d73be8114401d38ef))
+- Fix regressions and inconsistencies (#7260) ([26a9dc3](https://github.com/discordjs/discord.js/commit/26a9dc32062cd071917bbe7264050315b4d6dd3c))
+- **interaction:** Remove renamed typeguards (#7220) ([68b9564](https://github.com/discordjs/discord.js/commit/68b9564f1821726377a1e929a3ca1fc65b4ad598))
+- AssertType -> expectType ([3f36746](https://github.com/discordjs/discord.js/commit/3f36746561a40cd61a7cd2e054b7ef80d58fc707))
+- Fix cache types resolving to `never` (#7164) ([c978dbb](https://github.com/discordjs/discord.js/commit/c978dbb6233bcd85408caf0bca7619c9c5d508f0))
+
+# [14.12.1](https://github.com/discordjs/discord.js/compare/14.12.0...14.12.1) - (2023-08-01)
+
+## Bug Fixes
+
+- **BaseClient:** Fix destroy method (#9742) ([1af7e5a](https://github.com/discordjs/discord.js/commit/1af7e5a0bb4eca35221cb342c1c53dc18263c789))
+
+# [14.12.0](https://github.com/discordjs/discord.js/compare/14.11.0...14.12.0) - (2023-07-31)
+
+## Bug Fixes
+
+- **ChannelUpdate:** Check against unknown channels (#9697) ([7fb91c5](https://github.com/discordjs/discord.js/commit/7fb91c57f72b74395d67f2207246033c703f1f19))
+- **Action:** Use existing recipients if available (#9653) ([719e54a](https://github.com/discordjs/discord.js/commit/719e54a921f74890519f066a9f56e52fdcfacf07))
+- Everyone role members (#9685) ([0803eb5](https://github.com/discordjs/discord.js/commit/0803eb562bdc7644fa611a0a87dea3e8b0d4c7af))
+- `awaitMessageComponent` with `MessageComponentInteraction`s (#8598) ([b61e4fb](https://github.com/discordjs/discord.js/commit/b61e4fb0dcb9e5d43a7626c5a4760f5801e06fae))
+- **ThreadManager:** Fix internal crash upon conditionally resolving thread members (#9648) ([a6dbe16](https://github.com/discordjs/discord.js/commit/a6dbe163dd3df12ad98465b1dfc040b8eff8805e))
+- **User:** Check global name in equals (#9631) ([8f3bd38](https://github.com/discordjs/discord.js/commit/8f3bd3807233fca2a057948406bdc8aef008b6cb))
+- **WebSocketManager:** Await WebSocket destroy (#9519) ([75308f2](https://github.com/discordjs/discord.js/commit/75308f266933454301b10ee8e1d940d782fdb637))
+- **Client:** Safe call for possibly null WebSocket (#9600) ([24a6149](https://github.com/discordjs/discord.js/commit/24a61495b9bf07887dd535a05ffbec2895faa888))
+- **ThreadManager:** Ensure `fetchActive()` only returns active threads in a channel (#9568) ([53aa24d](https://github.com/discordjs/discord.js/commit/53aa24d41809382c1af57bd1871107c8359e4a15))
+- **LimitedCollection:** Allow items to be stored if keepOverLimit is true when maxSize is 0 (#9534) ([9345d1b](https://github.com/discordjs/discord.js/commit/9345d1b1ac4f7b1f66b919602dff995782151407))
+- **AutocompleteInteraction:** Prevent snake casing of locales (#9565) ([7196fe3](https://github.com/discordjs/discord.js/commit/7196fe36e8089dde7bcaf0db4dd09cf524125e0c))
+
+## Documentation
+
+- Change `Channel` to `BaseChannel` (#9718) ([e5effb6](https://github.com/discordjs/discord.js/commit/e5effb6f6a3e547006eb9bc054cc168844a157f2))
+- **BaseChannel:** Remove `APIChannel` (#9717) ([125405f](https://github.com/discordjs/discord.js/commit/125405f1cf11433c69ff1ae9d6b8f7e713fc37c0))
+- **BuildersSelectMenuOption:** Update link (#9690) ([ede9f4e](https://github.com/discordjs/discord.js/commit/ede9f4e5e203bcfb8820ae7ec3418482735ff9c1))
+- **ClientOptions:** Change default value of sweepers in docs (#9591) ([911e6ef](https://github.com/discordjs/discord.js/commit/911e6eff75f5d05e837d5dfaacf557d6594df16a))
+- **Client:** Correct invite gateway permission checks (#9597) ([e1b6eee](https://github.com/discordjs/discord.js/commit/e1b6eeed0e2e18f9900bc945c9f82d2d05f28a78))
+- Fix broken links to new documentation (#9563) ([d01e8aa](https://github.com/discordjs/discord.js/commit/d01e8aa8af00f5caacffe98caef3ead02e80a9bf))
+
+## Features
+
+- Add ws option support for "buildIdentifyThrottler" (#9728) ([6307f81](https://github.com/discordjs/discord.js/commit/6307f813854ed9dc76d2c4351bd69dd0490d0928))
+- **Client:** Add `guildAvailable` event (#9692) ([3c85fb2](https://github.com/discordjs/discord.js/commit/3c85fb21e62b30e75a7200b704e242c3a0adeda1))
+- User avatar decorations (#8914) ([8d97017](https://github.com/discordjs/discord.js/commit/8d9701745840e23854e8f0b057d21cb10e7d1d54))
+- Add silent option to ShardingManager (#9506) ([df40dcd](https://github.com/discordjs/discord.js/commit/df40dcdb850c398642ebc5cd6e4c48034280f464))
+- **EmbedBuilder:** Add `.length` (#8682) ([53c17e0](https://github.com/discordjs/discord.js/commit/53c17e00c0668c3d1497142dde7384c058c46c64))
+- Guild onboarding (#9120) ([dc73c93](https://github.com/discordjs/discord.js/commit/dc73c938ff9d04a0d7d57630faeb8e81ea343006))
+- Add resume event in shard (#9650) ([a73d54e](https://github.com/discordjs/discord.js/commit/a73d54e43a01719f683e8fd21714e85ffe737add))
+- **presence:** Re-introduce image resolving for other platforms (#9637) ([73c2f8a](https://github.com/discordjs/discord.js/commit/73c2f8aa17aac51b05382444148cb1f60081ee03))
+- Add message to send resume event to shard (#9626) ([a873ec1](https://github.com/discordjs/discord.js/commit/a873ec1e8511829ba95e85bbc9a4074e40c76086))
+- Support new username system (#9512) ([1ab60f9](https://github.com/discordjs/discord.js/commit/1ab60f9da4d6b7ea144fa05b97b029a4bfaeede2))
+- **GuildAuditLogsEntry#extra:** Add missing `channel` property (#9518) ([2272321](https://github.com/discordjs/discord.js/commit/227232112d1cd9f211e177996b7cdee2940f471e))
+
+## Performance
+
+- **Channel:** Linear speed position getter (#9497) ([09b0382](https://github.com/discordjs/discord.js/commit/09b0382c458ed0f3df5b8fa778c504b3e658ac49))
+- **Role:** Improve `members` getter (#9529) ([37181ab](https://github.com/discordjs/discord.js/commit/37181ab2322e48e17ff0d1040bcc510dc7c34e93))
+
+## Refactor
+
+- **User:** Remove deprecation warning from tag (#9660) ([cf8012c](https://github.com/discordjs/discord.js/commit/cf8012c20022aff184d7bce0ad436c136e428d9c))
+- **GuildMember:** Make `_roles` property non-enumerable (#9387) ([46167a7](https://github.com/discordjs/discord.js/commit/46167a79d7d0cac5599459a31c33b2bbcf6e06da))
+- **rest:** Switch api to fetch-like and provide strategies (#9416) ([cdaa0a3](https://github.com/discordjs/discord.js/commit/cdaa0a36f586459f1e5ede868c4250c7da90455c))
+ - **BREAKING CHANGE:** NodeJS v18+ is required when using node due to the use of global `fetch`
+ - **BREAKING CHANGE:** The raw method of REST now returns a web compatible `Respone` object.
+ - **BREAKING CHANGE:** The `parseResponse` utility method has been updated to operate on a web compatible `Response` object.
+ - **BREAKING CHANGE:** Many underlying internals have changed, some of which were exported.
+ - **BREAKING CHANGE:** `DefaultRestOptions` used to contain a default `agent`, which is now set to `null` instead.
+
+## Typings
+
+- **MessageManager:** Allow comparison of messages again (#9612) ([a48d0ef](https://github.com/discordjs/discord.js/commit/a48d0efb09613eac6bf3c1bd996f58f5fff7667c))
+- **AutoModerationActionExecution:** Add forum channels as a possible type in `channel()` (#9623) ([d64330a](https://github.com/discordjs/discord.js/commit/d64330a1570b3a2047ef959a6bce268372c70e99))
+- **ModalSubmitFields:** Components is an array (#9406) ([1cab79f](https://github.com/discordjs/discord.js/commit/1cab79f6fde6f367141c9f7ed91bcb70ed2e5c17))
+- Use `readonly` arrays and `const` type parameters in places (#9641) ([cd69868](https://github.com/discordjs/discord.js/commit/cd6986854f4c2d143d2cd9b81d096738480dfa63))
+- **BaseInteraction:** `appPermissions` not `null` in guilds (#9601) ([6c2242f](https://github.com/discordjs/discord.js/commit/6c2242f4f970b1c75c243f74ae64f30ecbf8ba0d))
+
+# [14.11.0](https://github.com/discordjs/discord.js/compare/14.10.2...14.11.0) - (2023-05-06)
+
+## Bug Fixes
+
+- **WebSocketManager:** Properly emit shard error events (#9521) ([e627468](https://github.com/discordjs/discord.js/commit/e6274681fd10b0d75e1d3b448c94b50ec6810367))
+- **WebSocketManager:** Emit raw ws events again (#9502) ([c429763](https://github.com/discordjs/discord.js/commit/c429763be8e94f0f0cbc630e8bb1d415d46f1465))
+
+## Documentation
+
+- **Client:** Update Sapphire's snowflake utility links (#9501) ([1b7981e](https://github.com/discordjs/discord.js/commit/1b7981e4696b8ae74ceffa876fc0a9be7d0b9f93))
+
+## Features
+
+- **Guild:** Safety alerts channel and mention raid protection (#8959) ([6b2c3fb](https://github.com/discordjs/discord.js/commit/6b2c3fb9d0571de808e990cf064f73240ab93451))
+
+## Performance
+
+- **Role:** Linear speed position getter (#9493) ([8e9a2b4](https://github.com/discordjs/discord.js/commit/8e9a2b4630f78bb9e45345ec2a16812bfac70a20))
+
+## Refactor
+
+- **GuildChannel:** Simplify constructor (#9499) ([f2ad076](https://github.com/discordjs/discord.js/commit/f2ad0762c521422ab64e5b10344a6fd67961031b))
+
+## Typings
+
+- **StringSelectMenuComponentData:** `options` is required (#9515) ([d7b18f0](https://github.com/discordjs/discord.js/commit/d7b18f0681d4147ff192c98108c035d6d0f96cce))
+
+# [14.10.2](https://github.com/discordjs/discord.js/compare/14.10.1...14.10.2) - (2023-05-01)
+
+## Bug Fixes
+
+- Correct `isJSONEncodable()` import (#9495) ([201b002](https://github.com/discordjs/discord.js/commit/201b002ad405b845ace5f708077c1f157bb4126d))
+- **Client:** `generateInvite()` scope validation (#9492) ([b327f49](https://github.com/discordjs/discord.js/commit/b327f4925ff557e0aa8273d7f017aa616226ca06))
+
+# [14.10.1](https://github.com/discordjs/discord.js/compare/14.10.0...14.10.1) - (2023-05-01)
+
+## Bug Fixes
+
+- **Client:** Spelling of InvalidScopesWithPermissions ([ac9bf3a](https://github.com/discordjs/discord.js/commit/ac9bf3ac06ec78dbaca2ce4a82cceb0d82484211))
+
+## Refactor
+
+- **ShardClientUtil:** Logic de-duplication (#9491) ([a9f2bff](https://github.com/discordjs/discord.js/commit/a9f2bff82a18c6a3afdee99e5830e1d7b4da65dc))
+
+# [14.10.0](https://github.com/discordjs/discord.js/compare/14.9.0...14.10.0) - (2023-05-01)
+
+## Bug Fixes
+
+- **ShardClientUtil:** Fix client event names (#9474) ([ad217cc](https://github.com/discordjs/discord.js/commit/ad217cc7604dda6a33df73db82799fd5bb4e85a9))
+- **BaseClient:** Prevent user agent mutation (#9425) ([217e5d8](https://github.com/discordjs/discord.js/commit/217e5d81005a2506c96335f7fb96fa21d7dbb04c))
+- **BitField:** Use only enum names in iterating (#9357) ([40d07fb](https://github.com/discordjs/discord.js/commit/40d07fbbbd51d62793d9ea541f41f157b5dad224))
+- Use new permission name (#9274) ([d2d27ce](https://github.com/discordjs/discord.js/commit/d2d27ce7346bc37b34938c84bd3b106a4fa51f53))
+- **Message#editable:** Fix permissions check in locked threads (#9319) ([d4c1fec](https://github.com/discordjs/discord.js/commit/d4c1fecbe264bc52a70aaf0ec303d35e2f15bbcd))
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Documentation
+
+- **AutoModerationRule:** Update docs (#9464) ([1b15d31](https://github.com/discordjs/discord.js/commit/1b15d31b5ae1b1739716fab00b18083c1d7d389a))
+- **APITypes:** Document role & user select menu components (#9435) ([c6ca5a8](https://github.com/discordjs/discord.js/commit/c6ca5a83e7b72613f95c2145606a1330f64ae894))
+- **BaseMessageOptions:** Fix embeds and components (#9437) ([5c52bb9](https://github.com/discordjs/discord.js/commit/5c52bb95906250518a8813820d543f43dd7abdf9))
+- **InteractionResponses:** ShowModal docs change (#9434) ([7d34100](https://github.com/discordjs/discord.js/commit/7d341000d44b762a2fe0434a6b518f7d63539d34))
+- Use ESM code in examples (#9427) ([ce287f2](https://github.com/discordjs/discord.js/commit/ce287f21d1540da7f17cac8a57dc33a67f391ef3))
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+- **Options:** Fix links and invalid syntax (#9322) ([86e5f5a](https://github.com/discordjs/discord.js/commit/86e5f5a119c6d2588b988a33236d358ded357847))
+- Cleanup MessageCreateOptions and MessageReplyOptions (#9283) ([300059c](https://github.com/discordjs/discord.js/commit/300059cb266e6cca42c30ee7f997c48ab2cc565e))
+- **Events:** Document auto moderation events (#9342) ([79bcdfa](https://github.com/discordjs/discord.js/commit/79bcdfa767e7e842164e1174b6f4834ed731d329))
+- Add `SnowflakeUtil` (#9371) ([8ffcf77](https://github.com/discordjs/discord.js/commit/8ffcf77840b62590fcb4731380d28b22d0b98741))
+- Use stable tag (#9343) ([c0f2dd7](https://github.com/discordjs/discord.js/commit/c0f2dd713151a29c98e1eebad66721a208be1fc0))
+- Remove `JSONEncondable` (#9344) ([b2eec5f](https://github.com/discordjs/discord.js/commit/b2eec5f9fcf37ebb3b7f87a67a6ee3160c182183))
+
+## Features
+
+- **Attachment:** Voice messages (#9392) ([3e01f91](https://github.com/discordjs/discord.js/commit/3e01f91bbba2cbacacc6c921ed664752f679960b))
+- **BaseInteraction:** Support new channel payload (#9337) ([29389e3](https://github.com/discordjs/discord.js/commit/29389e39f479b832e54c7cb3ddd363aebe99674f))
+- **RoleTagData:** Add guildConnections (#9366) ([2dddbe1](https://github.com/discordjs/discord.js/commit/2dddbe1f321f2e2722dba4a28f7d18384cf50353))
+
+## Performance
+
+- **RoleManager:** Dont call Role#position getter twice per role (#9352) ([bfee6c8](https://github.com/discordjs/discord.js/commit/bfee6c8d889502ea39ad919dd9b1e6253a2af571))
+
+## Refactor
+
+- **WebSocketManager:** Use /ws package internally (#9099) ([a9e0de4](https://github.com/discordjs/discord.js/commit/a9e0de4288ea39a6a089b8379dcd44ac0053dac7))
+- Remove `fromInteraction` in internal channel creation (#9335) ([794abe8](https://github.com/discordjs/discord.js/commit/794abe8450bae000cd0544922cdf53e7b3e4c59c))
+
+## Typings
+
+- **AutoModerationActionMetadataOptions:** Make channel property optional (#9460) ([d26df5f](https://github.com/discordjs/discord.js/commit/d26df5fabaf227fb9d10ba5cc1ab326de55aadbc))
+- **CategoryChannel:** Ensure `parent` and `parentId` are `null` (#9327) ([8218ffc](https://github.com/discordjs/discord.js/commit/8218ffc78d23234b32c05a97fde2f4bea64d7aa6))
+- **GuildTextBasedChannel:** Remove unnecessary exclusion of forum channels (#9326) ([7ff3d52](https://github.com/discordjs/discord.js/commit/7ff3d528d942a0daa990194915ff8328dec99149))
+
+# [14.9.0](https://github.com/discordjs/discord.js/compare/14.8.0...14.9.0) - (2023-04-01)
+
+## Bug Fixes
+
+- Add support for new guild feature `GUILD_WEB_PAGE_VANITY_URL` (#9219) ([de1aac6](https://github.com/discordjs/discord.js/commit/de1aac674acb3830124646fcd52cdd98cdb71ba5))
+- Resolving string bitfield (#9262) ([7987565](https://github.com/discordjs/discord.js/commit/79875658cf4a8daa25210c2c620c73a710ca22de))
+- **AutocompleteInteraction:** Send `name_localizations` correctly (#9238) ([1864d37](https://github.com/discordjs/discord.js/commit/1864d37d36e53d127e74b6969a5f542193bfc3c7))
+- Keep symbols in actions manager (#9293) ([984bd55](https://github.com/discordjs/discord.js/commit/984bd55b437507e7ebfdf09ac944c8eba0340d27))
+- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b))
+- **ClientUser:** No mutation on edit (#9259) ([abd6ae9](https://github.com/discordjs/discord.js/commit/abd6ae9fc8ea03722e8b36e29c3fdc1c2cfc93e8))
+- **Message#editable:** Update editable check in threads locked (#9216) ([22e880a](https://github.com/discordjs/discord.js/commit/22e880aaa0d8c644fc8d16a524d17f4f53a056f6))
+- **ThreadManager:** Add `members` and conditionally include `hasMore` (#9164) ([e9a8eb3](https://github.com/discordjs/discord.js/commit/e9a8eb323f3a554dc8f9dab361cd1bac7b88e1cc))
+- **ThreadManager:** Respect `cache` and `force` in fetching (#9239) ([cc57563](https://github.com/discordjs/discord.js/commit/cc57563e73d78a0d71d1444d1ee8215a26a81fa8))
+- **TextBasedChannelTypes:** Add `GuildStageVoice` (#9232) ([51edba7](https://github.com/discordjs/discord.js/commit/51edba78bc4d4cb44b4dd2b79e4bbc515dc46f5b))
+
+## Documentation
+
+- Describe private properties (#8879) ([2792e48](https://github.com/discordjs/discord.js/commit/2792e48119f1cf5fa7d5e6b63369457b0719d4e4))
+- Differ `User#send` (#9251) ([384b4d1](https://github.com/discordjs/discord.js/commit/384b4d10e8642f0f280ea1651f33cd378c341333))
+- Fix compare position example (#9272) ([d16114c](https://github.com/discordjs/discord.js/commit/d16114c52646ca92c53f9b44a0dd10af98dbddcd))
+- **Role:** Fix example for `comparePositionTo()` (#9270) ([bc641fa](https://github.com/discordjs/discord.js/commit/bc641fa9360b851642bc51839cef6bd5600d71f7))
+- Add more examples (#9252) ([bf507ab](https://github.com/discordjs/discord.js/commit/bf507ab2659d95e2991e83293b3834f21283ff33))
+- **FetchArchivedThreadOptions:** `before` respects `archive_timestamp`, not creation timestamp (#9240) ([178c8dc](https://github.com/discordjs/discord.js/commit/178c8dcfeea1c4a6a32835baea389f25feefbac7))
+- Update `APISelectMenuComponent` (#9235) ([56cf138](https://github.com/discordjs/discord.js/commit/56cf138e029e7884a4e7efb606055687ca67b4ac))
+
+## Features
+
+- **Guild:** Add `max_stage_video_channel_users` (#8422) ([34bc36a](https://github.com/discordjs/discord.js/commit/34bc36ac4b04ad033d0dcc3d2701fcf2e682743c))
+- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b))
+- Add GuildBasedTextChannelTypes (#9234) ([5f93dcc](https://github.com/discordjs/discord.js/commit/5f93dcce466286f0fdead8faf4131e98d1c9db55))
+
+## Refactor
+
+- Call `GuildBanManager#create()` directly (#9263) ([f340f3b](https://github.com/discordjs/discord.js/commit/f340f3b1fd719e8f7cf6fa28a41835bc16039fc7))
+- **FetchThreadsOptions:** Remove `active` (#9241) ([519e163](https://github.com/discordjs/discord.js/commit/519e163f8aa3b55420f86d2d60c2584b3a2eb327))
+
+# [14.8.0](https://github.com/discordjs/discord.js/compare/14.7.1...14.8.0) - (2023-03-12)
+
+## Bug Fixes
+
+- **snowflake:** Snowflakes length (#9144) ([955e8fe](https://github.com/discordjs/discord.js/commit/955e8fe312c42ad4937cc1994d1d81e517c413c8))
+- **Actions:** Inject built data by using a symbol (#9203) ([a63ac88](https://github.com/discordjs/discord.js/commit/a63ac88fcca5b61209892a6e560e35d58f5adc3b))
+- **Message#deletable:** Add check for deletable message types (#9168) ([e78b8ad](https://github.com/discordjs/discord.js/commit/e78b8ad3fb6692cba2c565b508254c723f185f0c))
+- **Message:** `bulkDeletable` permissions should be retrieved later for DMs (#9146) ([a9495bd](https://github.com/discordjs/discord.js/commit/a9495bd8f014c8021a214b83ffc531a2af5defef))
+- **AutoModerationActionExecution:** Transform `action` (#9111) ([9156a28](https://github.com/discordjs/discord.js/commit/9156a2889cd0946dfd0b30a5f8365abfbc377b3d))
+- **MessageReaction:** `toJSON()` infinite recursion (#9070) ([f268e1d](https://github.com/discordjs/discord.js/commit/f268e1d9798744e169ae87089ea2e1f214364d95))
+- **ThreadChannel:** Insert starter message from threads created in forum channels (#9100) ([0b76ab4](https://github.com/discordjs/discord.js/commit/0b76ab4c403dd646c71482856ab993b263b7c474))
+- **ApplicationRoleConnectionMetadata:** Export the class correctly (#9076) ([071516c](https://github.com/discordjs/discord.js/commit/071516c35239bd4e1cae572c855d86b335c8536d))
+- Don't auth for interaction `showModal()` (#9046) ([b803a9a](https://github.com/discordjs/discord.js/commit/b803a9a899aaa75a3ea2bc6623c6afb28f495e8c))
+- **WebSocketShard:** Zombie connection fix (#8989) ([876b181](https://github.com/discordjs/discord.js/commit/876b1813128ec702d3ef1e7b0074a4613e88c332))
+- Keep other properties in triggerMetadata (#8977) ([d8dd197](https://github.com/discordjs/discord.js/commit/d8dd197a936dfffc05f9e5bc3184ec9022c56b51))
+- **escapeX:** Emojis with underlines (#8945) ([07b597d](https://github.com/discordjs/discord.js/commit/07b597df16b9412c23ec2387d54564e4d1bcf7ed))
+- **WebSocketShard:** Either start close timeout or emit destroyed but never both (#8956) ([43ce2a5](https://github.com/discordjs/discord.js/commit/43ce2a572eb8977b6994680171ac0c5f9bda1703))
+- **DMChannel:** `recipientId` edge case (#8950) ([7ce9909](https://github.com/discordjs/discord.js/commit/7ce990954e2f73d7a996df0afa42ab287cb12514))
+- Return only boolean for `disabled` (#8965) ([6614603](https://github.com/discordjs/discord.js/commit/66146033268a4db1279b2eaee4bd418f326c0d4b))
+- Export missing `escapeX()` functions (#8944) ([25c27ea](https://github.com/discordjs/discord.js/commit/25c27eac1417e75c9b601b17cf177b1f47b699a9))
+- **WebSocketShard:** Only cleanup the connection if a connection still exists (#8946) ([5eab5fc](https://github.com/discordjs/discord.js/commit/5eab5fc06ca6be36ecf1557f2ad29a670d4d5ae7))
+- Add `@discordjs/formatters` to dependency list (#8939) ([18b3a19](https://github.com/discordjs/discord.js/commit/18b3a19810a6436fa8bb4b490ec5137eaecbd465))
+- **resolveColor:** Invalid colors (#8933) ([c76e170](https://github.com/discordjs/discord.js/commit/c76e17078602914c3e1d227a3acc98eaa99c18d4))
+- **WebSocketShard:** Clear listeners on reconnect (#8927) ([aa8c57d](https://github.com/discordjs/discord.js/commit/aa8c57dab60104549e28451abf35c0387595d67e))
+- Re-export formatters (#8909) ([b14604a](https://github.com/discordjs/discord.js/commit/b14604abdecca575b1fca693c1593e3585bcca8c))
+
+## Documentation
+
+- **MessageManager:** Add clarification to fetch messages (#9222) ([f5ec1ca](https://github.com/discordjs/discord.js/commit/f5ec1cada5ebf0ca4093bdfc81aaf56900c794ef))
+- Make interactionResponse as optional (#9179) ([664cccb](https://github.com/discordjs/discord.js/commit/664cccb2706db33635aa2556954de57f93b3d3db))
+- Fix typos (#9127) ([1ba1f23](https://github.com/discordjs/discord.js/commit/1ba1f238f04221ec890fc921678909b5b7d92c26))
+- **chatInputApplicationCommandMention:** Parameters are not nullable (#9091) ([6f78e82](https://github.com/discordjs/discord.js/commit/6f78e8285b3ce762de010e68d49b377a47dc5a63))
+- No `@type` description and reveal info block (#9097) ([405f940](https://github.com/discordjs/discord.js/commit/405f9400e8e3ffea9f3847ab5abb431a34538a96))
+- **ThreadEditOptions:** Move info tag back to `invitable` (#9020) ([f3fe3ce](https://github.com/discordjs/discord.js/commit/f3fe3ced622676b406a62b43f085aedde7a621aa))
+- Fix a typo in the MentionableSelectMenuInteraction link (#9000) ([6d7a143](https://github.com/discordjs/discord.js/commit/6d7a143667f33ef2ea45d8016ac4738237707881))
+- **ApplicationRoleConnectionMetadata:** Add documentation (#8976) ([2e22b31](https://github.com/discordjs/discord.js/commit/2e22b31892d9b858fcb24fa580b486b4154e823f))
+- Fix malformed overridden documentation (#8954) ([0b8b114](https://github.com/discordjs/discord.js/commit/0b8b114761f961a2bf8e5aae342ed711b154a89e))
+- **GuildForumThreadManager:** Fix `sticker` type (#8940) ([dd62be0](https://github.com/discordjs/discord.js/commit/dd62be077d3e4fbd73a0c10ca344d93d3d19fa38))
+- Fix deprecated links (#8907) ([976b234](https://github.com/discordjs/discord.js/commit/976b234e9dc9999e5dee47b58c85afbc1cd494c2))
+- **UserFlagsBitField:** Make `.Flags` static (#8902) ([c48ff5e](https://github.com/discordjs/discord.js/commit/c48ff5e4205899e3b6cd35812ca857236bef6864))
+
+## Features
+
+- **Collector:** Add lastCollectedTimestamp (#9044) ([4458a13](https://github.com/discordjs/discord.js/commit/4458a13925164762b519ded1037ae8775d879f71))
+- **StageChannel:** Add messages (#9134) ([ffdb197](https://github.com/discordjs/discord.js/commit/ffdb197f988657100e2a9ff0ca17b759339a1dda))
+- **AutoModerationActionExecution:** Add `channel`, `user` and `member` getters (#9142) ([095bd77](https://github.com/discordjs/discord.js/commit/095bd77515aa31bb0e95a350b4355980fea9268d))
+- **AutoModeration:** Support `custom_message` (#9171) ([c1000b8](https://github.com/discordjs/discord.js/commit/c1000b86ed6d5413afcd6ee7e80505e5a845430b))
+- **ThreadMemberManager:** Support pagination fetching (#9035) ([765d5a3](https://github.com/discordjs/discord.js/commit/765d5a3b2d5529c3a2a4b29512f6932264443ed1))
+- **InteractionResponse:** Add new methods (#9132) ([dc9924f](https://github.com/discordjs/discord.js/commit/dc9924fb5f24c8dac963d6b86ba279a89545e73b))
+- **GuildMember:** Add `flags` (#9087) ([76b2116](https://github.com/discordjs/discord.js/commit/76b21162aca7cd4897826437da3063524e1e7553))
+- **Client:** `guildAuditLogEntryCreate` event (#9058) ([9439107](https://github.com/discordjs/discord.js/commit/9439107a1d6a9b77b5f991973d96bc6100da4753))
+- Add role subscription data (#9025) ([1ba22f4](https://github.com/discordjs/discord.js/commit/1ba22f4c9e4173f8866339d3eadb2939d4b32034))
+- **Sticker:** Add support for gif stickers (#9038) ([6a9875d](https://github.com/discordjs/discord.js/commit/6a9875da054a875a4711394547d47439bbe66fb6))
+- **GuildAuditLogs:** Support `after` (#9011) ([0076589](https://github.com/discordjs/discord.js/commit/0076589ccc93e09d77a448874d1ceff5d0e91aa2))
+- Add role subscriptions (#8915) ([3407e1e](https://github.com/discordjs/discord.js/commit/3407e1eea3c8d5629465553f342ac30ceae27a47))
+- Add `not_found` to guild member chunk data (#8975) ([be294ea](https://github.com/discordjs/discord.js/commit/be294eaf9901ea139ce485deeec9178959ffa91f))
+- **ClientApplication:** Add role connections (#8855) ([22e2bbb](https://github.com/discordjs/discord.js/commit/22e2bbb0d24e3f30516f262308d5786f2f666713))
+- **CommandInteractionOptionResolver:** Add `channelTypes` option to `getChannel` (#8934) ([429dbcc](https://github.com/discordjs/discord.js/commit/429dbccc85cabd9986b2e8bf443bf384e4ddc61a))
+- **ForumChannel:** Add `defaultForumLayout` (#8895) ([cbafd47](https://github.com/discordjs/discord.js/commit/cbafd479b331633ed97f7b1a22ef03c6a2f4cf31))
+- Add support for nsfw commands (#7976) ([7a51344](https://github.com/discordjs/discord.js/commit/7a5134459c5f06864bf74631d83b96d9c21b72d8))
+- **InteractionResponse:** CreatedTimestamp (#8917) ([627511d](https://github.com/discordjs/discord.js/commit/627511d6522f772b84c25e6a3f6da06b06bb912e))
+- **Guild:** Add disableInvites method (#8801) ([45faa19](https://github.com/discordjs/discord.js/commit/45faa199820e7c4ccdb2997c7e3b353f566d2312))
+
+## Refactor
+
+- Compare with `undefined` directly (#9191) ([869153c](https://github.com/discordjs/discord.js/commit/869153c3fdf155783e7c0ecebd3627b087c3a026))
+- **GuildMemberManager:** Tidy up fetching guild members (#8972) ([4e0e125](https://github.com/discordjs/discord.js/commit/4e0e1250399aa12c340ac92a86ec2c05704fe2bb))
+- **BitField:** Reverse iterator/toArray responsibilities (#9118) ([f70df91](https://github.com/discordjs/discord.js/commit/f70df910ed12e397066d0bdb27343af21ead4d92))
+- Moved the escapeX functions from discord.js to @discord.js/formatters (#8957) ([13ce78a](https://github.com/discordjs/discord.js/commit/13ce78af6e3aedc793f53a099a6a615df44311f7))
+- Use `deprecate()` directly (#9026) ([1c871b5](https://github.com/discordjs/discord.js/commit/1c871b5b576dddef12c5afacecf416dbd6243dea))
+- **Guild:** Destructure object in guild editing (#8971) ([d3e9f2a](https://github.com/discordjs/discord.js/commit/d3e9f2a355a1f5272d62a507eb6ecd8808904fff))
+- **GuildManager:** Better handling of creation code (#8974) ([d7a09f6](https://github.com/discordjs/discord.js/commit/d7a09f6fcee30c31b4418166bf7bf9e894841f87))
+- **sharding:** Use switch statement (#8928) ([6540914](https://github.com/discordjs/discord.js/commit/6540914b4a7f244f5e40fe2a3b7e73986763d81b))
+- Use consistent naming for options (#8901) ([a7b55c1](https://github.com/discordjs/discord.js/commit/a7b55c1460cf63fb482f7d05657120eec96bee82))
+- **CommandInteractionOptionResolver:** Loosen mentionable checks (#8910) ([1b151db](https://github.com/discordjs/discord.js/commit/1b151db59c4340417f8a28a88064f45336ac8c78))
+
+## Styling
+
+- Run prettier (#9041) ([2798ba1](https://github.com/discordjs/discord.js/commit/2798ba1eb3d734f0cf2eeccd2e16cfba6804873b))
+
+## Typings
+
+- Allow sending messages with `SuppressNotifications` flag (#9177) ([71a427f](https://github.com/discordjs/discord.js/commit/71a427f6322be76fe2d1cb265de09f171b1b354a))
+- Remove `EscapeMarkdownOptions` (#9153) ([fd0246c](https://github.com/discordjs/discord.js/commit/fd0246ca4c75e60d8e117d9ac5af7067c7a63277))
+- **Attachment:** Make `attachment` private (#8982) ([da23cd5](https://github.com/discordjs/discord.js/commit/da23cd5d69de4856d075f00738f75c68c555ae5b))
+- Fix type of Attachment#name (#9101) ([4e0a89f](https://github.com/discordjs/discord.js/commit/4e0a89f58f43f362bfde80d8319dce767c62850f))
+- Allow builders to set channel types in discord.js (#8990) ([7dec892](https://github.com/discordjs/discord.js/commit/7dec892218f7b470a5f8e78732a524a53da24d26))
+- Swap message reaction and emoji identifier types (#8969) ([ad49845](https://github.com/discordjs/discord.js/commit/ad4984526020f2baeefaeeebbded66c6848c4b85))
+- **widget:** Add missing `name` (#8978) ([898b5ac](https://github.com/discordjs/discord.js/commit/898b5ac416cbbb415b125bb27221d0901fdd180e))
+- Use StringSelectMenuOptionBuilder (#8949) ([bec51de](https://github.com/discordjs/discord.js/commit/bec51de1038c35c6edaaa13934781758fe1951de))
+- Fix actions type in automod (#8962) ([5915f39](https://github.com/discordjs/discord.js/commit/5915f39810b712c05a46fa21ab4e12b4cfa3c25a))
+- Subcommand group `options` is required (#8966) ([5dc5e90](https://github.com/discordjs/discord.js/commit/5dc5e902688fc563087cd5061dcb59dd68fd4eda))
+- Add generic to `ActionRowBuilder.from()` (#8414) ([153352a](https://github.com/discordjs/discord.js/commit/153352ad7a1ccb4a9461523cf2597d81df93b69c))
+
+# [14.7.1](https://github.com/discordjs/discord.js/compare/14.7.0...14.7.1) - (2022-12-01)
+
+## Bug Fixes
+
+- Prevent crash on no select menu option (#8881) ([11d195d](https://github.com/discordjs/discord.js/commit/11d195d04ff57d51adb0f0d3a0a7342f9e34aba0))
+
+# [14.7.0](https://github.com/discordjs/discord.js/compare/14.6.0...14.7.0) - (2022-11-28)
+
+## Bug Fixes
+
+- **MessageMentions:** Add `InGuild` generic (#8828) ([f982803](https://github.com/discordjs/discord.js/commit/f9828034cd21e6f702762a46923e0f42115596f6))
+- **Activity:** Fix equals() not checking for differing emoji (#8841) ([7e06f68](https://github.com/discordjs/discord.js/commit/7e06f68185423ba7cb310220b213f445b6571e29))
+- Fixed react/astro/guide/discord.js build, updated dependencies, fix crawlvatar (#8861) ([d0c8256](https://github.com/discordjs/discord.js/commit/d0c82561b8a1765a1daa362ca903f3ffb3fa33ee))
+- **escapeMarkdown:** Fix double escaping (#8798) ([d6873b7](https://github.com/discordjs/discord.js/commit/d6873b7159352479475b3a0daa215bddbdd3a79b))
+- **Transfomers:** Call `.toJSON` in `toSnakeCase` (#8790) ([017f9b1](https://github.com/discordjs/discord.js/commit/017f9b1ed4014dc1db0b78c1a77e463b4403de5d))
+- Censor token in debug output (#8764) ([53d8e87](https://github.com/discordjs/discord.js/commit/53d8e87d7f3a329608250656950bd0a200adb1c7))
+- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4))
+
+## Documentation
+
+- Describe InteractionEditReplyOptions (#8840) ([cb77fd0](https://github.com/discordjs/discord.js/commit/cb77fd02d083438de2aff6f0769baf7d1797bc65))
+- **AutoModerationRuleManager:** Describe cache (#8848) ([d275480](https://github.com/discordjs/discord.js/commit/d2754802cc3479e6288cdbfcd48c76bf57e09a07))
+- Fix message action row components (#8819) ([65bc0ad](https://github.com/discordjs/discord.js/commit/65bc0adbf4d7870d33b92585ca18f964f24bc84e))
+- Specify `ActionRowBuilder` for `components` (#8834) ([8ed5c1b](https://github.com/discordjs/discord.js/commit/8ed5c1beb622f71ce0bd89e4cbeff50e464da8fe))
+- Add `@extends` for select menu classes (#8824) ([09f65b7](https://github.com/discordjs/discord.js/commit/09f65b724b0d2f36bbe89b83570c0d18093b5126))
+- Make WebSocketShard.lastPingTimestamp public (#8768) ([68c9cb3](https://github.com/discordjs/discord.js/commit/68c9cb37bc3df6326b720291827ea477e421faf2))
+- **MessageReplyOptions:** Remove duplicate stickers field (#8766) ([6e348ff](https://github.com/discordjs/discord.js/commit/6e348ffd1d8db8d8ad2da7823460814695e01a43))
+
+## Features
+
+- **Webhook:** Add `channel` property (#8812) ([decbce4](https://github.com/discordjs/discord.js/commit/decbce401062af75f633e6acacc88207b115a719))
+- Auto Moderation (#7938) ([fd4ba5e](https://github.com/discordjs/discord.js/commit/fd4ba5eaba66898699127fc0d5f0ab52c18e3db0))
+- **SelectMenuInteractions:** Add `values` property (#8805) ([b2fabd1](https://github.com/discordjs/discord.js/commit/b2fabd130a76ea54cfbfa1b871ef8659513c2c7a))
+- **ThreadChannel:** Add a helper for pin and unpin (#8786) ([e74aa7f](https://github.com/discordjs/discord.js/commit/e74aa7f6b0fe04e3473fc4a62a73a7db87307685))
+- Add `Message#bulkDeletable` (#8760) ([ff85481](https://github.com/discordjs/discord.js/commit/ff85481d3e7cd6f7c5e38edbe43b27b104e82fba))
+- New select menus (#8793) ([5152abf](https://github.com/discordjs/discord.js/commit/5152abf7285581abf7689e9050fdc56c4abb1e2b))
+- **InteractionResponses:** Add message parameter (#8773) ([8b400ca](https://github.com/discordjs/discord.js/commit/8b400ca975c6bad00060b9c67068f42bd53524ba))
+- Support resume urls (#8784) ([88cd9d9](https://github.com/discordjs/discord.js/commit/88cd9d906074eb79e85df0ef49287f11133d2e0d))
+- Allow deletion of ephemeral messages (#8774) ([fc10774](https://github.com/discordjs/discord.js/commit/fc107744618857bf28c2167f204253baf690ede8))
+- **GuildChannelManager:** Add `.addFollower()` method (#8567) ([caeb1cb](https://github.com/discordjs/discord.js/commit/caeb1cbfdb2f2f007252c4d7e9f47a575c24bcb5))
+
+## Refactor
+
+- **Embed:** Use `embedLength` function from builders (#8735) ([cb3826c](https://github.com/discordjs/discord.js/commit/cb3826ce6dbcd3cf7ab639af6cdfcea80336aa1d))
+
+# [14.6.0](https://github.com/discordjs/discord.js/compare/14.5.0...14.6.0) - (2022-10-10)
+
+## Bug Fixes
+
+- **ClientOptions:** Make `ClientOptions#intents` returns an IntentsBitField (#8617) ([4c2955a](https://github.com/discordjs/discord.js/commit/4c2955a5de6779c29c09e63ba9ad2b235904f842))
+- Correctly construct a builder (#8727) ([e548e6a](https://github.com/discordjs/discord.js/commit/e548e6a10b7e1720f5e8f3c859b0b64d5134a012))
+- **Components:** Error with unknown components (#8724) ([6fd331d](https://github.com/discordjs/discord.js/commit/6fd331dd528e78fd023c908bd58af3faa9ed6c65))
+- **Client:** Don't auth for webhook fetches with token (#8709) ([01d75c8](https://github.com/discordjs/discord.js/commit/01d75c8b8b14f33c95a4da83a8494db848beeb8c))
+- Re-export util (#8699) ([a306219](https://github.com/discordjs/discord.js/commit/a306219673335584accd2ff77ab34d2812ef6c5d))
+- Throw discord.js errors correctly (#8697) ([ace974f](https://github.com/discordjs/discord.js/commit/ace974fc1fdbc5bcaa0d7f6f6d17de185c9f9cbf))
+
+## Documentation
+
+- **Utils:** Remove `private` from `parseEmoji` (#8718) ([a31e605](https://github.com/discordjs/discord.js/commit/a31e605e09064a300e31a3c91466b613654ba98e))
+- Update UserContextMenuCommandInteraction documentation (#8717) ([7556db2](https://github.com/discordjs/discord.js/commit/7556db243d9480949835668fcb5724fdd5d70e08))
+- Fix `AwaitMessageComponentOptions` typedef (#8696) ([9effd82](https://github.com/discordjs/discord.js/commit/9effd82abe82ba71ae627673da21ba07e1ede23e))
+
+## Features
+
+- **Util:** Escape more markdown characters (#8701) ([7b8966b](https://github.com/discordjs/discord.js/commit/7b8966bca156db79933403289741893a6e10ccd5))
+- **GuildChannelManager:** Allow creating channels with a default auto archive duration (#8693) ([628759b](https://github.com/discordjs/discord.js/commit/628759bcff8b0d4c77926cee2b8c18d8fdb4c260))
+- Add `@discordjs/util` (#8591) ([b2ec865](https://github.com/discordjs/discord.js/commit/b2ec865765bf94181473864a627fb63ea8173fd3))
+- **ForumChannel:** Add `defaultSortOrder` (#8633) ([883f6e9](https://github.com/discordjs/discord.js/commit/883f6e9202a559c986f4b15fccb422b5aea7bea8))
+
+## Refactor
+
+- Rename Error to DiscordjsError internally (#8706) ([aec44a0](https://github.com/discordjs/discord.js/commit/aec44a0c93f620b22242f35e626d817e831fc8cb))
+
+## Typings
+
+- Fix events augmentation (#8681) ([ac83ada](https://github.com/discordjs/discord.js/commit/ac83ada306ec153c13260d2bd53e4d704884b68a))
+- **Message:** Remove `& this` from `#inGuild` typeguard (#8704) ([c0f7a1a](https://github.com/discordjs/discord.js/commit/c0f7a1a89a4cf62edc7065bd200b2ce4018e0a27))
+- **ModalBuilder:** Fix constructor typings (#8690) ([2ea2a85](https://github.com/discordjs/discord.js/commit/2ea2a85e6335d57f44689f9b6e284129104de8fc))
+
+# [14.5.0](https://github.com/discordjs/discord.js/compare/14.4.0...14.5.0) - (2022-09-25)
+
+## Bug Fixes
+
+- **ThreadChannel:** Add forum channel to parent (#8664) ([0126d9b](https://github.com/discordjs/discord.js/commit/0126d9b810a156c4bf1b8b93f2121f3319855bac))
+- **GuildChannelManager:** Allow creating webhooks on forums (#8661) ([16fcdc3](https://github.com/discordjs/discord.js/commit/16fcdc36877d1a65ce9995c9fe3502aa268c9388))
+- **ForumChannel:** Implement missing properties and methods (#8662) ([8622939](https://github.com/discordjs/discord.js/commit/862293922924f453f69b0b0f8efe87ddebbd387d))
+- RepliableInteraction respect cached generic (#8667) ([578bc95](https://github.com/discordjs/discord.js/commit/578bc951bdcdc21ec5aee86e7a47a17e8c867dfc))
+- **ThreadChannel:** Allow editing flags (#8671) ([1244854](https://github.com/discordjs/discord.js/commit/1244854e1365d7e4a8d01703a7ec13610ed100c7))
+- **GuildChannelManager:** Typo in `flags` property name when editing (#8669) ([fc8ed81](https://github.com/discordjs/discord.js/commit/fc8ed816e643754a938211a17b41a2cec95df265))
+
+## Documentation
+
+- Fix duplicate typedefs (#8677) ([d79aa2d](https://github.com/discordjs/discord.js/commit/d79aa2d0d0b186bd28cbfc82f3d6ecf3deb41c50))
+- **ForumChannel:** Add `@implements` (#8678) ([8ca407e](https://github.com/discordjs/discord.js/commit/8ca407e089c3050b61a51a52b9100e4613ad1666))
+
+## Features
+
+- **GuildChannelManager:** Allow editing `flags` (#8637) ([abb7226](https://github.com/discordjs/discord.js/commit/abb7226af3445f5b724815bb2f7a121a52a563b5))
+
+## Refactor
+
+- **GuildBanManager:** Add deprecation warning for `deleteMessageDays` (#8659) ([e993122](https://github.com/discordjs/discord.js/commit/e9931229ae62a120ae0761ee2a2c10ea0cb1a6fb))
+
+## Typings
+
+- **GuildChannelManager:** Handle forum channel overload (#8660) ([1486bc9](https://github.com/discordjs/discord.js/commit/1486bc9336369d229972df5e28b9428365b92bff))
+- **Caches:** Allow `GuildForumThreadManager` and `GuildTextThreadManager` (#8665) ([2487e3b](https://github.com/discordjs/discord.js/commit/2487e3bf76260a4a2fbf375e0b01a43f347922a3))
+
+# [14.4.0](https://github.com/discordjs/discord.js/compare/14.3.0...14.4.0) - (2022-09-21)
+
+## Bug Fixes
+
+- Correct applied tags type (#8641) ([f6f15d8](https://github.com/discordjs/discord.js/commit/f6f15d8e877d4ffbe908a093e64809ef9015e0ff))
+- **ThreadChannel:** Make `fetchStarterMessage()` work in forum posts (#8638) ([a7f816e](https://github.com/discordjs/discord.js/commit/a7f816eeb7fa1e193cf0901efbdcaf629f72465f))
+- Update `messageCount`/`totalMessageSent` on message events (#8635) ([145eb2f](https://github.com/discordjs/discord.js/commit/145eb2fc5db5ca739aa9782d5ec5210f81a6aeeb))
+- Footer / sidebar / deprecation alert ([ba3e0ed](https://github.com/discordjs/discord.js/commit/ba3e0ed348258fe8e51eefb4aa7379a1230616a9))
+
+## Documentation
+
+- Correctly overwrite `setRTCRegion` method (#8642) ([f049734](https://github.com/discordjs/discord.js/commit/f0497343f1193635b260b9e2085cac7b43991f74))
+- **GuildTextThreadManager:** Document correct `@extend` (#8639) ([802b239](https://github.com/discordjs/discord.js/commit/802b2394b08151faab6810695fd5c8f27ce84d58))
+- Fix regexps incorrectly being called global (#8624) ([fc9653f](https://github.com/discordjs/discord.js/commit/fc9653f5aea4013da15fb8de0a4452400eaa7739))
+- Update misleading `Client#guildMemberAvailable` event description (#8626) ([22ac6b4](https://github.com/discordjs/discord.js/commit/22ac6b4660db6b02f62b9851e9e3bcfe5fb506b5))
+- **Options:** Update DefaultMakeCacheSettings (#8585) ([3252332](https://github.com/discordjs/discord.js/commit/32523325c6610e95fe3ffcc31d005b3418c6bc68))
+- Change name (#8604) ([dd5a089](https://github.com/discordjs/discord.js/commit/dd5a08944c258a847fc4377f1d5e953264ab47d0))
+
+## Features
+
+- **Widget:** Allow forum channels (#8645) ([b106956](https://github.com/discordjs/discord.js/commit/b1069563086fc616fe21abb789f28f69e57c8851))
+- **WelcomeChannel:** Add forum channel as a type (#8643) ([6f1f465](https://github.com/discordjs/discord.js/commit/6f1f465a77e362e20ec50067be0e634d35946ba5))
+- Allow forum channels in webhook update event (#8646) ([5048a3d](https://github.com/discordjs/discord.js/commit/5048a3d17ace22336e74451d30b513b3db42a26f))
+- Add support for guild forums (#7791) ([8a8d519](https://github.com/discordjs/discord.js/commit/8a8d519c9c4c082370fc6935b56dafb525b873df))
+- **GuildBanManager#create:** Add `deleteMessageSeconds` (#8326) ([03fb5b0](https://github.com/discordjs/discord.js/commit/03fb5b0a2f45275dec7885175ad691a1d9c449c4))
+- Add typeguard to BaseInteraction#isRepliable (#8565) ([55c3ee2](https://github.com/discordjs/discord.js/commit/55c3ee20ae700e78d18a3c4c04b6a7426cffc060))
+- **Integration:** Add `scopes` (#8483) ([8b3d006](https://github.com/discordjs/discord.js/commit/8b3d0061180cfd5d9ba8beae3e8d623b5ce43ea4))
+- Add `chatInputApplicationCommandMention` formatter (#8546) ([d08a57c](https://github.com/discordjs/discord.js/commit/d08a57cadd9d69a734077cc1902d931ab10336db))
+
+## Refactor
+
+- Replace usage of deprecated `ChannelType`s (#8625) ([669c3cd](https://github.com/discordjs/discord.js/commit/669c3cd2566eac68ef38ab522dd6378ba761e8b3))
+- Split message send/edit types/documentation (#8590) ([8e1afae](https://github.com/discordjs/discord.js/commit/8e1afaebdb686033555ca58e53f34bb97f7369c8))
+- Website components (#8600) ([c334157](https://github.com/discordjs/discord.js/commit/c3341570d983aea9ecc419979d5a01de658c9d67))
+
+## Typings
+
+- Narrow channel type in thread managers (#8640) ([14bbc91](https://github.com/discordjs/discord.js/commit/14bbc9150a748e7ac1660c2375c7f065fcc55a6c))
+- **interactions:** Pass `Cached` type to return type of methods (#8619) ([053da5b](https://github.com/discordjs/discord.js/commit/053da5bc91d5cfa8d842b13b0b05083d2f7f086d))
+- Ensure events possess `Client<true>` (#8612) ([a9f003a](https://github.com/discordjs/discord.js/commit/a9f003ac9b56d31166cbf353d02140dad0b2517e))
+- **GuildChannelManager:** Correct `fetch` return type (#8549) ([1d4cdee](https://github.com/discordjs/discord.js/commit/1d4cdee321ab25bb0f109d55a000582825dd79f9))
+- **ThreadChannel:** `fetchStarterMessage` must return a `Message<true>` (#8560) ([b9c62ac](https://github.com/discordjs/discord.js/commit/b9c62ac0f0f534c33f9913135095f8b3d98ec05e))
+- **webhook:** Avatar can be null (#8541) ([f77612a](https://github.com/discordjs/discord.js/commit/f77612a55e9c593a21bc27e58c9fbd03d85787e3))
+
+# [14.3.0](https://github.com/discordjs/discord.js/compare/14.2.0...14.3.0) - (2022-08-22)
+
+## Bug Fixes
+
+- **GuildMemberManager:** `add()` method throws an error (#8539) ([3bef901](https://github.com/discordjs/discord.js/commit/3bef9018c0be3c5dc51d03b796d08b925dc4e1b9))
+- **Guild:** Widget channel types and fixes (#8530) ([23a0b6c](https://github.com/discordjs/discord.js/commit/23a0b6ccf27410963bd4f5c53d9ee2ce019e90a8))
+- **Embed:** Reference video in video (#8473) ([c97977a](https://github.com/discordjs/discord.js/commit/c97977a3e806bd5d8682bc7fb22ebec1a8ceecdc))
+
+## Documentation
+
+- **GuildAuditLogsEntry:** Correct `action` wording (#8499) ([7d25072](https://github.com/discordjs/discord.js/commit/7d2507279cc9d1397c7d61e7c7b856ff4bc17c86))
+
+## Features
+
+- **GuildMemberManager:** AddRole and removeRole (#8510) ([cda3f00](https://github.com/discordjs/discord.js/commit/cda3f005b1546fdb8410e9550526956f840857fc))
+- Deprecate `ActionRow.from()` (#8504) ([f9c25dd](https://github.com/discordjs/discord.js/commit/f9c25ddcfe68f089e13f1090c3df4bd7cd74d2b7))
+- **WebSocketShard:** Support new resume url (#8480) ([bc06cc6](https://github.com/discordjs/discord.js/commit/bc06cc638d2f57ab5c600e8cdb6afc8eb2180166))
+
+## Refactor
+
+- **GuildAuditLogsEntry:** Remove `guild` from application command permission update extra (#8520) ([2b8074d](https://github.com/discordjs/discord.js/commit/2b8074dd12f2f1e957caffb57e5fd4d7be88dc25))
+
+## Typings
+
+- Inference of guild in `MessageManager` (#8538) ([6bb1474](https://github.com/discordjs/discord.js/commit/6bb1474d2001b76773954c959b2c2687e1df0136))
+- Allow choice's value type to be strictly inferred (#8529) ([b3f7c32](https://github.com/discordjs/discord.js/commit/b3f7c32f7f91f12766178f5e17585856e81d9a87))
+- **GuildAuditLogs:** Allow fetching to return all possible values (#8522) ([0dba8ad](https://github.com/discordjs/discord.js/commit/0dba8adbd2e6efd634bd3eb31df09467ba8a8a0d))
+- Correct `EventEmitter.on (static)` return type (#8524) ([16bbc8a](https://github.com/discordjs/discord.js/commit/16bbc8aa208a8a16c22be24696f57d5f7a5faf2b))
+- **GuildAuditLogs:** Remove static `Entry` (#8521) ([7a3d18d](https://github.com/discordjs/discord.js/commit/7a3d18dd6d1fe27393d00019b9ecd35c98b95ee7))
+- Disallow some channel types from webhook creation (#8531) ([4882b17](https://github.com/discordjs/discord.js/commit/4882b17a77484f801faa19fb971f2e6abd88e59f))
+- Implement max/min values for autocomplete (#8498) ([812f7f1](https://github.com/discordjs/discord.js/commit/812f7f1ea86fc953aa796875cbc7ccc434203d77))
+- **ModalMessageModalSubmitInteraction:** ChannelId is not nullable (#8496) ([c31a5cf](https://github.com/discordjs/discord.js/commit/c31a5cfcc82706667768eac77b5f99ba69cf3c91))
+- Change type of ApplicationCommandSubCommand.options (#8476) ([ebaf158](https://github.com/discordjs/discord.js/commit/ebaf158006d3c7db3b8c695e7c027b8af11999ba))
+
+# [14.2.0](https://github.com/discordjs/discord.js/compare/14.1.2...14.2.0) - (2022-08-10)
+
+## Bug Fixes
+
+- **ThreadChannel:** Handle possibly `null` parent (#8466) ([afa27b1](https://github.com/discordjs/discord.js/commit/afa27b15c5b92bc8d55b8285834d8e03f6692d06))
+- Remove DM channels from `Client#messageDeleteBulk`'s types (#8460) ([6c6fe74](https://github.com/discordjs/discord.js/commit/6c6fe74dd84859c5319efa999404e8168f189710))
+- **Transformers:** Do not transform `Date` objects (#8463) ([0e2a095](https://github.com/discordjs/discord.js/commit/0e2a09571c8e5ee61153b04e45334a226a1b4534))
+- **ModalSubmitInteraction:** Allow deferUpdate (#8455) ([0fab869](https://github.com/discordjs/discord.js/commit/0fab869e5179dca7ddec75b5519615278e51ad82))
+- **Guild:** Unable to fetch templates (#8420) ([aac8acc](https://github.com/discordjs/discord.js/commit/aac8acc22be7d7af99933ef099eca7deda43cb40))
+- **MessageMentions:** Infinite loop in `parsedUsers` getter (#8430) ([b8a3136](https://github.com/discordjs/discord.js/commit/b8a31360a220e3d796f5381bd215d30a379ecb7c))
+- **DataResolver:** Make `Buffer` from string (#8416) ([e72b986](https://github.com/discordjs/discord.js/commit/e72b986939e2958547c0e54d6d27472c8d111609))
+
+## Documentation
+
+- Change registration example to use global commands (#8454) ([64a4041](https://github.com/discordjs/discord.js/commit/64a4041a05e9514334a9f9e1f38a1ea18bb676d5))
+- **Colors:** Provide enum descriptions (#8437) ([6ef4754](https://github.com/discordjs/discord.js/commit/6ef4754d40c5ec65715fc1e00e643c52fe0a6209))
+- **AttachmentBuilder:** Fix #8407 (#8421) ([5b053cf](https://github.com/discordjs/discord.js/commit/5b053cf82ec2f2b717a490485af052dc956fe3c9))
+
+## Features
+
+- **Guild:** Add `max_video_channel_users` (#8423) ([3a96ce7](https://github.com/discordjs/discord.js/commit/3a96ce7970947f6268c21a1323d986aac8cb736d))
+
+## Typings
+
+- **Message:** Correct `bulkDelete` return type (#8465) ([c5b96a1](https://github.com/discordjs/discord.js/commit/c5b96a185cb8ba836b7cd10526c14059866f218f))
+- Fix missing types for mentionable options (#8443) ([452e94f](https://github.com/discordjs/discord.js/commit/452e94fd3ecc12de9e3408982c5c7fd931bae634))
+- **ApplicationCommandOption:** Add `ApplicationCommandBooleanOption` (#8434) ([38275fc](https://github.com/discordjs/discord.js/commit/38275fc53d633ce77ed2b142aff788dcbd4fad8c))
+
+# [14.1.2](https://github.com/discordjs/discord.js/compare/14.1.1...14.1.2) - (2022-07-30)
+
+## Bug Fixes
+
+- **errors:** Error codes (#8398) ([480c85c](https://github.com/discordjs/discord.js/commit/480c85c9c3d129204b3399ed726a4e570e0b2852))
+
+## Documentation
+
+- **Embed:** Ensure height and width are numbers (#8396) ([fca3dad](https://github.com/discordjs/discord.js/commit/fca3dada2a565eecfc7e5275cc9317df1d261871))
+
+# [14.1.0](https://github.com/discordjs/discord.js/compare/14.0.3...14.1.0) - (2022-07-29)
+
+## Bug Fixes
+
+- **MessageMentions:** `ignoreRepliedUser` option in `has()` (#8202) ([b4e2c0c](https://github.com/discordjs/discord.js/commit/b4e2c0c4d5538b945f9d597c6410a6f84b315084))
+- **GuildChannelManager:** Allow unsetting rtcRegion (#8359) ([a7d49e5](https://github.com/discordjs/discord.js/commit/a7d49e56fc7c34d2e4548d9e5bf0aec45273506e))
+- **ThreadChannel:** Omit webhook fetching (#8351) ([3839958](https://github.com/discordjs/discord.js/commit/3839958e3f682c715f1017da05436d2fe34900fd))
+- **GuildAuditLogsEntry:** Replace OverwriteType with AuditLogOptionsType (#8345) ([58c1b51](https://github.com/discordjs/discord.js/commit/58c1b51c5ceab137ad9851919b338419eeeab69e))
+- **ShardClientUtil#_respond:** Construct global error (#8348) ([8e520f9](https://github.com/discordjs/discord.js/commit/8e520f946a5b9f93a939290facf4ccca2c05ff21))
+- **Presence:** Do not return NaN for activity timestamp (#8340) ([df42fdf](https://github.com/discordjs/discord.js/commit/df42fdfc421f1190f0a2267a66efd3c921ec2348))
+- **Client:** Omit private properties from toJSON (#8337) ([830c670](https://github.com/discordjs/discord.js/commit/830c670c61dcb17d8ab2a894a3203c68917d27e0))
+- **ApplicationCommandManager:** Allow passing 0n to defaultMemberPermissions (#8311) ([1fb7b30](https://github.com/discordjs/discord.js/commit/1fb7b30963cfe7ea4c05b1f3b42171c879c46a1d))
+
+## Documentation
+
+- **InteractionResponses:** Add `showModal()` return type (#8376) ([0b61dbf](https://github.com/discordjs/discord.js/commit/0b61dbf720e844322b066e30080c3537ab3d8174))
+- **WebhookClient:** Document working options (#8375) ([ba6797e](https://github.com/discordjs/discord.js/commit/ba6797e74209161b64c412de1b6f307cb28736b8))
+- **Message:** Document gateway intent for content (#8364) ([2130aae](https://github.com/discordjs/discord.js/commit/2130aae3210a8eaf91c5ccae5463940d49052c7d))
+- Use info blocks for requirements (#8361) ([80b9738](https://github.com/discordjs/discord.js/commit/80b9738957ebf5b6eb7c9858cec0fb1c897d0a1f))
+- **WebhookClient:** Make constructor a union (#8370) ([e9920a9](https://github.com/discordjs/discord.js/commit/e9920a9c98ffb78bd7d0ae00d486476367296646))
+- Update docs and examples to PascalCase links (#8305) ([34ba9d1](https://github.com/discordjs/discord.js/commit/34ba9d1c4c80eff7e6ac199a40232d07491432cc))
+
+## Features
+
+- Add channel & message URL formatters (#8371) ([a7deb8f](https://github.com/discordjs/discord.js/commit/a7deb8f89830ead6185c5fb46a49688b6d209ed1))
+- Restore missing typeguards (#8328) ([77ed407](https://github.com/discordjs/discord.js/commit/77ed407f6aadb68e729470c5269e9b526cb1b3f0))
+- **GuildMember:** Add dmChannel getter (#8281) ([4fc2c60](https://github.com/discordjs/discord.js/commit/4fc2c60a3bb43671b4b0202ae75eab42aba163ff))
+
+## Refactor
+
+- Deprecate `Formatter` class (#8373) ([7fd9ed8](https://github.com/discordjs/discord.js/commit/7fd9ed8f13d17ce7e98e34f7454d9047054d8467))
+- **PermissionOverwriteManager:** Use `OverwriteType` (#8374) ([6d24805](https://github.com/discordjs/discord.js/commit/6d248051cfd431e9cb1c65cb98f56aa0a6556407))
+
+## Typings
+
+- **GuildAuditLogsEntryExtraField:** Use `AuditLogOptionsType` (#8349) ([200ab91](https://github.com/discordjs/discord.js/commit/200ab91f527d8a5706d277b89a975096f75d141a))
+
+# [14.0.3](https://github.com/discordjs/discord.js/compare/14.0.2...14.0.3) - (2022-07-19)
+
+## Bug Fixes
+
+- **Components:** Support emoji id strings (#8310) ([660e212](https://github.com/discordjs/discord.js/commit/660e212e83df026c684ee2cda7fb4e98870f342e))
+
+# [14.0.2](https://github.com/discordjs/discord.js/compare/14.0.1...14.0.2) - (2022-07-18)
+
+## Bug Fixes
+
+- **DataResolver#resolveImage:** Adjust to updated resolveFile (#8308) ([3a7e93d](https://github.com/discordjs/discord.js/commit/3a7e93df576172c797f1d8bd6483234bb6af2d00))
+
+# [14.0.0](https://github.com/discordjs/discord.js/compare/9.3.1...14.0.0) - (2022-07-17)
+
+## Bug Fixes
+
+- **GuildMemberManager:** Allow setting own nickname (#8066) ([52a9e21](https://github.com/discordjs/discord.js/commit/52a9e213c2dc13ee52ee0234593fdce392f43890))
+- **PermissionOverwriteManager:** Mutates user (#8283) ([3bf30b1](https://github.com/discordjs/discord.js/commit/3bf30b1e6d2d6f583f7069a1e24e7842d59fab2f))
+- **GuildChannelManager:** Access `resolveId` correctly (#8296) ([3648f6d](https://github.com/discordjs/discord.js/commit/3648f6d567cd834c301de913ce19f786a265240d))
+- **GuildChannelManager:** Edit lockPermissions (#8269) ([7876548](https://github.com/discordjs/discord.js/commit/787654816d2b6a5168d199d32cdaeb4ef6d270b9))
+- **`SelectMenuBuilder`:** Properly accept `SelectMenuOptionBuilder`s (#8174) ([31d5930](https://github.com/discordjs/discord.js/commit/31d593046466438c55f5784b0f2098e233c5edc4))
+- Remove global flag on regular expressions (#8177) ([cdd9214](https://github.com/discordjs/discord.js/commit/cdd9214212892e30b3eaa161837c37516c5bcaa0))
+- **MessagePayload:** Guard against `repliedUser` property (#8211) ([fa010b5](https://github.com/discordjs/discord.js/commit/fa010b516254c4ab2762278817f31bf289f0ab6a))
+- **ApplicationCommandManager:** Explicitly allow passing builders to methods (#8209) ([50d55bd](https://github.com/discordjs/discord.js/commit/50d55bd6b819307c86701f4808c087f359c6ccff))
+- **GuildMemberRemove:** Remove member's presence (#8181) ([11b1739](https://github.com/discordjs/discord.js/commit/11b173931968c548f8504649ae7090865892e62d))
+- Edit() data can be partial and `defaultMemberPermissions` can be `null` (#8163) ([0ffbef5](https://github.com/discordjs/discord.js/commit/0ffbef506a97a0bf22cb134fc007c2aec29cbffc))
+- **WebSocketShard:** Keep an error handler on connections (#8150) ([c34c02a](https://github.com/discordjs/discord.js/commit/c34c02ab8d119bf16d8d14d125a9b650b4bb18f4))
+- **DJSError:** Error code validation (#8149) ([31f6582](https://github.com/discordjs/discord.js/commit/31f658247fe0e1047897edab629643d140e77e07))
+- **vcs:** Nsfw property (#8132) ([2eeaad6](https://github.com/discordjs/discord.js/commit/2eeaad6f27fdf8868364fa95ed20755ee09bda87))
+- **WebSocketManager:** Correct error name (#8138) ([db2b033](https://github.com/discordjs/discord.js/commit/db2b0333d912fe83381db2ffe16829d7d03d6c2e))
+- **WebSocketShard:** Disconnected casing (#8117) ([23e183a](https://github.com/discordjs/discord.js/commit/23e183a9ac7aaa3bca2bc4eb8634d1738ec34a26))
+- **webhooks:** Revert webhook caching (and returning Message) (#8038) ([d54bf5d](https://github.com/discordjs/discord.js/commit/d54bf5d286f4057db130901591b192fd4d1668c1))
+- **ApplicationCommand:** Remove `autocomplete` check at the top level and correctly check for `dmPermission` (#8100) ([0a44b05](https://github.com/discordjs/discord.js/commit/0a44b05db83948857afbe18471e7a867da47177a))
+- **ApplicationCommand:** Fix default member permissions assignment (#8067) ([96053ba](https://github.com/discordjs/discord.js/commit/96053babe1bd65ebe1fc6a261f5eb052906afdb9))
+- **scripts:** Read directory and rerun (#8065) ([f527dea](https://github.com/discordjs/discord.js/commit/f527dea36ead194aaae1bf5da1e953df59d692fd))
+- Select menu options to accept both rest and array (#8032) ([fbe67e1](https://github.com/discordjs/discord.js/commit/fbe67e102502b4b49690cbf8ff891ead2232ecf3))
+- **CommandInteractionOptionResolver:** Handle autocompletion interactions (#8058) ([d8077c6](https://github.com/discordjs/discord.js/commit/d8077c6839dc8ceb57d3c3a86bf9746be2a91ada))
+- **scripts:** Add quotes around blob arguments (#8054) ([598f61b](https://github.com/discordjs/discord.js/commit/598f61b992fab1b3fdcab8ff960366f7af0b37ea))
+- **Message:** Force fetching (#8047) ([f2b267c](https://github.com/discordjs/discord.js/commit/f2b267c079dd8aa7277910471f3db2f88af6efb2))
+- **Attachment:** Do not destructure `data` (#8041) ([1afae90](https://github.com/discordjs/discord.js/commit/1afae909d72e648cf48d63d7de2708737a78c126))
+- **DirectoryChannel:** Type `name` and handle `url` (#8023) ([86d8fbc](https://github.com/discordjs/discord.js/commit/86d8fbc023e3925e8f86799d6ebf2d423f7bf2ec))
+- Readd `isThread` type guard (#8019) ([f8ed71b](https://github.com/discordjs/discord.js/commit/f8ed71bfca6e47e3d44ad063e23804354bd23604))
+- Add static method `from` in builders (#7990) ([ad36c0b](https://github.com/discordjs/discord.js/commit/ad36c0be7744ea4214ccf345fe80a5a1a9e89101))
+- Typings (#7965) ([7a1095b](https://github.com/discordjs/discord.js/commit/7a1095b66be3c5d81185e026281e2908c10c1695))
+- **GuildAuditLogs:** Cache guild scheduled events (#7951) ([2f03f9a](https://github.com/discordjs/discord.js/commit/2f03f9ad3f63abee5b5c46d02f1afa8885e8977c))
+- Make sure action row builders create djs builders (#7945) ([adf461b](https://github.com/discordjs/discord.js/commit/adf461baf49be754c7a10c61faf1ef3df333413a))
+- **TextBasedChannel#bulkDelete:** Return deleted message (#7943) ([191510b](https://github.com/discordjs/discord.js/commit/191510b7f87903e4bd93b891649cb290fd50c47e))
+- Remove trailing invites on channel deletion (#7932) ([5e9b757](https://github.com/discordjs/discord.js/commit/5e9b757a3733e6526770eb60a15072612294eb21))
+- **DataResolver:** Fix check for readable streams (#7928) ([28172ca](https://github.com/discordjs/discord.js/commit/28172ca7b57357436d3252ec01ec17dad865d87f))
+- **AuditLog:** Default changes to empty array (#7880) ([19eaed6](https://github.com/discordjs/discord.js/commit/19eaed63905367ef4604366b8839023384524d1f))
+- **Util:** Flatten ignoring certain fields (#7773) ([df64d3e](https://github.com/discordjs/discord.js/commit/df64d3ea382c07e66bc7cc8877ee430206c31d63))
+- Possibly missing (#7829) ([6239d83](https://github.com/discordjs/discord.js/commit/6239d83c4d5f0a396678410d7fef35e39ed29009))
+- `endReason` not being properly set in base Collector (#7833) ([0c18dab](https://github.com/discordjs/discord.js/commit/0c18dab1280205b8855d17d075b7421860d59c14))
+- **SelectMenuBuilder:** Options array (#7826) ([3617093](https://github.com/discordjs/discord.js/commit/361709332bdc871822c2b9919f14fd090d68666a))
+- **Activity:** Platform type (#7805) ([4ac91c6](https://github.com/discordjs/discord.js/commit/4ac91c61d08111ae4d49d1e64caf94e6e49832c8))
+- **ApplicationCommand:** Equal nameLocalizations and descriptionLocalizations (#7802) ([4972bd8](https://github.com/discordjs/discord.js/commit/4972bd87c17cbc6a94c9608ba2ab39c475f9921f))
+- **InteractionResponses:** Use optional chaining on nullable property (#7812) ([c5fb548](https://github.com/discordjs/discord.js/commit/c5fb54852906898ffb19282dd60168dfc6fb2eba))
+- **MessageManager:** Allow caching option of an unspecified limit (#7763) ([1b2d8de](https://github.com/discordjs/discord.js/commit/1b2d8decb638faeae8184119c5cedfcdaf9485e3))
+- **builders:** Add constructor default param (#7788) ([c286650](https://github.com/discordjs/discord.js/commit/c2866504a3824005fe756556fec4b349898b7d22))
+- **MessagePayload:** ResolveBody check body instead of data (#7738) ([3db20ab](https://github.com/discordjs/discord.js/commit/3db20abdd2d502a1ed457842181b164dc6390ba1))
+- **ActionRow:** ToJSON should include components (#7739) ([ebb4dfa](https://github.com/discordjs/discord.js/commit/ebb4dfa262adb2086c83db487002bb2e1ed5ab88))
+- Prevent `NaN` for nullable timestamps (#7750) ([8625d81](https://github.com/discordjs/discord.js/commit/8625d817145eb642aeb0da05184352f438586986))
+- **InteractionCreateAction:** Ensure text-based channel for caching messages (#7755) ([25fdb38](https://github.com/discordjs/discord.js/commit/25fdb3894d33dc395a376a3d962a063eb5735253))
+- Pass `force` correctly (#7721) ([402514f](https://github.com/discordjs/discord.js/commit/402514ff323ccf1f8c95d295f044cf0bb5547c2e))
+- Support reason in setRTCRegion helpers (#7723) ([905a6a1](https://github.com/discordjs/discord.js/commit/905a6a11663f9469ada67f8310a969453ffc5b2a))
+- **GuildMemberManager:** Return type can be null (#7680) ([74bf7d5](https://github.com/discordjs/discord.js/commit/74bf7d57ab959eb820ab1c213ac86ab1ea660398))
+- **gateway:** Use version 10 (#7689) ([8880de0](https://github.com/discordjs/discord.js/commit/8880de0cecdf273fd6df23988e4cb77774a75390))
+- Audit log static reference (#7703) ([85e531f](https://github.com/discordjs/discord.js/commit/85e531f22d7a8f8ad043647ce445726ae0df26c0))
+- Handle possibly missing property (#7641) ([0c32332](https://github.com/discordjs/discord.js/commit/0c32332a5aacbbb6c415da75c166d09cfdb34bbd))
+- **util:** Allow `escapeInlineCode` to escape double backtics (#7638) ([d5369a5](https://github.com/discordjs/discord.js/commit/d5369a56e3fcf50513f3bc582552c2838b04d199))
+- **GuildEditData:** Some fields can be null (#7632) ([4d2b559](https://github.com/discordjs/discord.js/commit/4d2b55955d1a3ff05c3047599232becdc3f2c445))
+- TOKEN_INVALID error not thrown at login with invalid token (#7630) ([cd79bef](https://github.com/discordjs/discord.js/commit/cd79bef2547594f4d0c744faa8fa67fb9fd61526))
+- **GuildScheduledEvent:** Handle missing `image` (#7625) ([c684ac5](https://github.com/discordjs/discord.js/commit/c684ac55e1d225740e67ab7bd5643de1b35f4594))
+- **guild:** Throw if ownerId falsey (#7575) ([98177aa](https://github.com/discordjs/discord.js/commit/98177aa38d3d6516d4c5354d6c7edea925dc881d))
+- Remove Modal export (#7654) ([87a6b84](https://github.com/discordjs/discord.js/commit/87a6b8445bfbf3981cd39813fe961dfa1c7f2bce))
+- **Embed:** Fix incorrect destructuring import (#7615) ([cbdb408](https://github.com/discordjs/discord.js/commit/cbdb408dffd1c7f2193c15989528a3de5fd9f13a))
+- **ThreadMembersUpdate:** Only emit added & removed thread members (#7539) ([c12d61a](https://github.com/discordjs/discord.js/commit/c12d61a3421afcdc41f77c0fddde4efbb257fa69))
+- **Util:** EscapeInlineCode properly (#7587) ([851f380](https://github.com/discordjs/discord.js/commit/851f380eb10d23ffd08e8b845aed4039abbcd03b))
+- **GuildStickerManager:** Correctly access guild ID (#7605) ([4b08d9b](https://github.com/discordjs/discord.js/commit/4b08d9b376bda7a7f4bb3fb8c555d25cca648de4))
+- **MessageManager:** Pin route (#7610) ([cb566c8](https://github.com/discordjs/discord.js/commit/cb566c8b6abff489a944db7952e5c5a48e0c98b0))
+- Handle partial data for `Typing#user` (#7542) ([c6cb5e9](https://github.com/discordjs/discord.js/commit/c6cb5e9ebbf46d81404119a6aa11bb8ebb17d5a4))
+- **guild:** Fix typo accessing user instead of users (#7537) ([8203c5d](https://github.com/discordjs/discord.js/commit/8203c5d843f2431c0f49023282f1bf73d85881d1))
+- **test:** `MessageActionRow` to `ActionRow` (#7523) ([d1d1b07](https://github.com/discordjs/discord.js/commit/d1d1b076bebf7cb706b2436a40d87c6efaed1e1d))
+- **MessagePayload:** Don't set reply flags to target flags (#7514) ([4f30652](https://github.com/discordjs/discord.js/commit/4f306521d829fef21ebd70557b37f8199b82572b))
+- **invite:** Add back channelId property (#7501) ([78aa36f](https://github.com/discordjs/discord.js/commit/78aa36f9f5913b86c82376ecdf20653b15340bbe))
+- Properly serialize `undefined` values (#7497) ([8dbd345](https://github.com/discordjs/discord.js/commit/8dbd34544cbeb499282f01dda9d35ed9bca93591))
+- Allow unsafe embeds to be serialized (#7494) ([942ea1a](https://github.com/discordjs/discord.js/commit/942ea1acbfb49289ccb3a1882b5a2da0a7d0bccf))
+- Attachment types (#7478) ([395a68f](https://github.com/discordjs/discord.js/commit/395a68ff49c622d5136d6b775beaf8e88a2d8610))
+- Use case converter for json component serialization (#7464) ([2d45544](https://github.com/discordjs/discord.js/commit/2d4554440ed9329a5876a9c674c3eb2de0f2f917))
+- **GuildAuditLogs:** Typings and consistency (#7445) ([c1b27f8](https://github.com/discordjs/discord.js/commit/c1b27f8eed8ea04a48bc106453892bddcdc6b73e))
+- **dataresolver:** Ensure fetched file is convert to a buffer (#7457) ([9311fa7](https://github.com/discordjs/discord.js/commit/9311fa7b42b2b5a74e411aa263daa4fbfc270645))
+- **messagepayload:** ResolveFile property names (#7458) ([a8106f7](https://github.com/discordjs/discord.js/commit/a8106f7c586f0ecac76e7f72c53b0da215a6fbf1))
+- **ci:** Ci error (#7454) ([0af9bc8](https://github.com/discordjs/discord.js/commit/0af9bc841ffe1a297d308500d696bad4b85abda9))
+- **threads:** Require being sendable to be unarchivable (#7406) ([861f0e2](https://github.com/discordjs/discord.js/commit/861f0e2134662ab64a11d313130aff58b413d495))
+- **guildmember:** Check if member has administrator permission (#7384) ([81d8b54](https://github.com/discordjs/discord.js/commit/81d8b54ff6b98b0e7ee2c57eaee6bc0b707e135a))
+- **guild:** Remove `maximumPresences` default value (#7440) ([55b388a](https://github.com/discordjs/discord.js/commit/55b388a763dc7223e88b62ae928fe85fe8b8fe58))
+- **guildchannelmanager:** Edit always sets parent to null (#7446) ([b97aedd](https://github.com/discordjs/discord.js/commit/b97aedd8e15f9358960cb59403f3a8ea24b87141))
+- **guildmember:** Make `pending` nullable (#7401) ([fe11ff5](https://github.com/discordjs/discord.js/commit/fe11ff5f6e85571a981e90eba5b9f3bda7a2cd04))
+- **clientpresence:** Fix used opcodes (#7415) ([a921ec7](https://github.com/discordjs/discord.js/commit/a921ec7dc525c58d40b4678e66270f9238abed31))
+- Correctly export UnsafeSelectMenuComponent from builders (#7421) ([aadfbda](https://github.com/discordjs/discord.js/commit/aadfbda586d57a7b775ad26c201f0dc34618180b))
+- MessageReaction.me being false when it shouldn't (#7378) ([04502ce](https://github.com/discordjs/discord.js/commit/04502ce702da53c4b00bf391d0fd936746851381))
+- Fix some typos (#7393) ([92a04f4](https://github.com/discordjs/discord.js/commit/92a04f4d98f6c6760214034cc8f5a1eaa78893c7))
+- **messagementions:** Fix `has` method (#7292) ([3a5ab2c](https://github.com/discordjs/discord.js/commit/3a5ab2c4e54de4e67ab6e323d7eac86482da7382))
+- **guildmembermanager:** Use rest in edit (#7356) ([00ce1c5](https://github.com/discordjs/discord.js/commit/00ce1c56ac224691a8691a3525cb14ae002319c6))
+- **typings:** Mark `RESTOptions` as Partial in `ClientOptions` (#7349) ([e1ecc1a](https://github.com/discordjs/discord.js/commit/e1ecc1a80a9358cdbafbe8542c40b9de8cad467e))
+- **Webhook:** Use correct method name (#7348) ([11e5e5a](https://github.com/discordjs/discord.js/commit/11e5e5ac5b70138f56332eb3e61a42443670b0de))
+- **thread:** Don't assign directly to getters (#7346) ([2db0cdd](https://github.com/discordjs/discord.js/commit/2db0cdd357c3a02decb4fd4168db87888efba283))
+- Missed enums and typings from #7290 (#7331) ([47633f0](https://github.com/discordjs/discord.js/commit/47633f0fd2435d6d8c694d8d37b26039a7b3797a))
+- **guildchannelmanager:** Remove reverse enum lookup (#7304) ([857bba4](https://github.com/discordjs/discord.js/commit/857bba448029f3f070c67fb40b59a3a2a2e5c6f4))
+- Import `clear{Timeout,Interval}` from `node:timers` (#7269) ([8ddd44e](https://github.com/discordjs/discord.js/commit/8ddd44ed85b32c86243efe0ec35b283eaaa8212c))
+- **ApplicationCommand:** Use new ApplicationCommandOptionType enums (#7257) ([06f5210](https://github.com/discordjs/discord.js/commit/06f5210f58bbba6102173033a9f1e6fb004fdf5d))
+- Use enums from discord-api-types (#7258) ([f284a46](https://github.com/discordjs/discord.js/commit/f284a4641fd68de9190bda97ec1eab0981149630))
+- **exports:** Export ApplicationCommandType properly (#7256) ([f753882](https://github.com/discordjs/discord.js/commit/f75388259262bf6b4a64375b97800bd72378f3bc))
+- **Shard:** EventEmitter listener warning (#7240) ([ff3a8b8](https://github.com/discordjs/discord.js/commit/ff3a8b83234d3826fc49c5a8c3cb52ef9f281ffd))
+- **timestamps:** Account for timestamps of 0 when creating Dates (#7226) ([a8509c9](https://github.com/discordjs/discord.js/commit/a8509c91ca0147393b407221405b6b917677961a))
+- **MessageEmbed:** CreatedAt field can be zero (#7218) ([37cad54](https://github.com/discordjs/discord.js/commit/37cad54dbdade39607397b8ad697eca94f1b7197))
+- **BaseClient:** Do not append default options if provided is not an object (#6453) ([b92a7d7](https://github.com/discordjs/discord.js/commit/b92a7d72332c35b607db54aa6aca24b8e10e00ad))
+- Snowflakeutil import (#7219) ([962f4bf](https://github.com/discordjs/discord.js/commit/962f4bf88211dbfb5ad0295a9467dede1e2688ee))
+- **Role:** Remove unused process (#7215) ([63034b4](https://github.com/discordjs/discord.js/commit/63034b44c9849087e391684d9b6c0c6ae9a21113))
+- **WebhookClient:** Updated webhook url regex (#6804) ([1c615d1](https://github.com/discordjs/discord.js/commit/1c615d1bb2606d5f19e55076d4ecab95c619518e))
+- **Sweepers:** Add sweepStickers function (#7213) ([95f8375](https://github.com/discordjs/discord.js/commit/95f8375d425f58f501f32ead03f7927e6596f8e6))
+- **InteractionCreate:** Use ChatInputCommandInteraction instead (#7210) ([49dada3](https://github.com/discordjs/discord.js/commit/49dada35f92470d3e4426362510847b93dd42d1a))
+- **Structues:** Rename old module's name (#7207) ([fbef454](https://github.com/discordjs/discord.js/commit/fbef45489457a2198357dc4dd303740d79036784))
+- **WebSocket:** Remove application command handler (#7202) ([033151c](https://github.com/discordjs/discord.js/commit/033151cf92fe43536b8a4c0f4d7d9ed75a2095c5))
+- **User:** `bannerURL()` should not throw when not present (#6789) ([3872acf](https://github.com/discordjs/discord.js/commit/3872acfeb8390f6f7202d69cf1f7f8616a7b0b34))
+- **VoiceState:** Ensure `suppress` & `streaming` have proper fallback values (#6377) ([a0d5f13](https://github.com/discordjs/discord.js/commit/a0d5f13dd9b27c44f5183a2a9af4c4fdecb312c0))
+- **sweepers:** Provide default for object param (#7182) ([ae2f013](https://github.com/discordjs/discord.js/commit/ae2f013653c8a9f9ffb12ae8fcdb1bb604b39236))
+
+## Deprecation
+
+- **Caching:** Clean up deprecated cache sweeping (#7118) ([12ffa06](https://github.com/discordjs/discord.js/commit/12ffa069aa8b247e945fef16a543f41c2c391bf1))
+
+## Documentation
+
+- Align webhook method return types with implementation (#8253) ([5aeed99](https://github.com/discordjs/discord.js/commit/5aeed9935058241648507d7f651679226a89dbb3))
+- Remove `@private` constructor documentation (#8255) ([452dec5](https://github.com/discordjs/discord.js/commit/452dec57ca422f5e7424a0f0e78c3e152717f413))
+- **ApplicationCommand:** Add `min_length` and `max_length` to ApplicationCommandOptionData (#8239) ([43f62bb](https://github.com/discordjs/discord.js/commit/43f62bb6678ec332795c8cfbe0c01854b95aa61e))
+- **MessageInteraction#commandName:** Updated description (#8212) ([ab238a9](https://github.com/discordjs/discord.js/commit/ab238a9046e0201dbd4755fa41fa69c44b186912))
+- Add missing `@extends` (#8205) ([e0c8282](https://github.com/discordjs/discord.js/commit/e0c82824905dcebf62c2d1afcc5e5590a5594838))
+- **Constants:** Fix SweeperKeys type (#8157) ([af04992](https://github.com/discordjs/discord.js/commit/af04992ed3c2617fda686c2bc7338dcada283dc6))
+- **Channels:** Internally document channel creation (#8154) ([5e5853a](https://github.com/discordjs/discord.js/commit/5e5853a4e885c47e3dde519761dd59a5ec0e06fc))
+- Update threads to use `ThreadAutoArchiveDuration` (#8153) ([ee36d60](https://github.com/discordjs/discord.js/commit/ee36d60dc6714c83569a20716fa8ca8e1bd7de4f))
+- **APITypes:** Remove duplicate type definition (#8144) ([a061233](https://github.com/discordjs/discord.js/commit/a0612335101c7ce2a07d95da4b79f0d4a2b1a6a0))
+- Document missing type definitions (#8130) ([203bc4a](https://github.com/discordjs/discord.js/commit/203bc4a2cf0c2d90a003093318aa0741605610f5))
+- **InteractionResponse:** Fix return (#8141) ([f1ac17c](https://github.com/discordjs/discord.js/commit/f1ac17c961cf95d99e205133605d10d8be5bd737))
+- **PermissionsBitField:** Fix `@name` of bitfield (#8115) ([3a77ce0](https://github.com/discordjs/discord.js/commit/3a77ce0b18c60a0b21ba088590ff89f2ace94087))
+- `TextBasedChannel` -> `TextBasedChannels` typos (#8110) ([db663a5](https://github.com/discordjs/discord.js/commit/db663a55c2ed2faf61e217009158da50dfcf274f))
+- Remove `number`s from enums (#8098) ([0a138da](https://github.com/discordjs/discord.js/commit/0a138dab95a86512f08ac3be356f77f38f2ea880))
+- **GuildAuditLogs:** Fix and reimplement type definitions (#8108) ([4155136](https://github.com/discordjs/discord.js/commit/415513696c7b7e139d1b958e480bf0c7e4d14111))
+- **WebSocketOptions:** Add `version` to docs and typings (#8050) ([386c41f](https://github.com/discordjs/discord.js/commit/386c41f24fb3c9d06967d9c1881a57645c3a71f2))
+- **BaseGuildTextChannel:** Update `setType()`'s parameter type (#8088) ([9c0f190](https://github.com/discordjs/discord.js/commit/9c0f190de1f743d9bd597ffd656503c672db71c1))
+- Update outdated examples (#8081) ([51eadf3](https://github.com/discordjs/discord.js/commit/51eadf37371a6138847efdb4b5b81ee132001cf0))
+- **ThreadMemberManager:** Require `member` in `FetchThreadMemberOptions` (#8079) ([552ec72](https://github.com/discordjs/discord.js/commit/552ec72542ec3b2b3ebf35c9fd84ab502dd746cf))
+- **AutocompleteInteraction:** Change useless log in responds example (#8077) ([ac7bf69](https://github.com/discordjs/discord.js/commit/ac7bf692bfce8204e278205dde811515a51f154b))
+- Description and missing `@typedef` fixes (#8087) ([a2eebf6](https://github.com/discordjs/discord.js/commit/a2eebf6c66f3e4c96ece9d2ae2a1133c84257f42))
+- Ignore docs of unexported functions (#8051) ([94bdcac](https://github.com/discordjs/discord.js/commit/94bdcaca62414a77d4ee0b8b79752a2be937320b))
+- **ClientOptions:** Fix closeTimeout default (#8049) ([b2eea1c](https://github.com/discordjs/discord.js/commit/b2eea1c900ba73d4b98b72f5c196f51e27d3ab8f))
+- **DirectoryChannel:** Extend `Channel` (#8022) ([f3f34f0](https://github.com/discordjs/discord.js/commit/f3f34f07b3b396015b130b8e9d938a3eec688fc3))
+- **Attachment:** Remove constructor doc (#8009) ([0a7953e](https://github.com/discordjs/discord.js/commit/0a7953e46310c77483d277539b47f1a7ab051fd9))
+- **VoiceChannel:** Annotate that it is implementing TextBasedChannel (#8007) ([5987dbe](https://github.com/discordjs/discord.js/commit/5987dbe5cff6991ae6905b0387411fa042d3e9b7))
+- Add missing discord-api-types external types (#8001) ([546d486](https://github.com/discordjs/discord.js/commit/546d48655f36ed9a6c6c5ce3c2eabcca1a86a945))
+- **InteractionResponses:** Replace outdated Embed example for reply (#7875) ([d308c66](https://github.com/discordjs/discord.js/commit/d308c66eeca6bdc3471637ae3aaaaa0a2f5c9989))
+- Require parameter (#7838) ([f4ccc67](https://github.com/discordjs/discord.js/commit/f4ccc6772c15e32489ca22fb2c3e803b85d4dbf9))
+- **ApplicationCommand:** Fix and improve localization docs (#7804) ([61a44c5](https://github.com/discordjs/discord.js/commit/61a44c509c40abaf7ffb95b10942889cbbf155ac))
+- **ApplicationCommand:** Fix ApplicationCommandOptionChoice (#7794) ([f1d0084](https://github.com/discordjs/discord.js/commit/f1d0084da26b0111ca029c789ad9e8e6c2882b4d))
+- Add back static properties and methods (#7706) ([520f471](https://github.com/discordjs/discord.js/commit/520f471ac56cbc01402b79197333a8a34c4ac5c9))
+- **InteractionCollector:** Document channel option type (#7551) ([e787cd5](https://github.com/discordjs/discord.js/commit/e787cd5fa5d013319347392ee4f799a677f6f512))
+- Correctly type getters (#7500) ([ffecf08](https://github.com/discordjs/discord.js/commit/ffecf084956f954cf10e1b844e00326e443a86f2))
+- ApplicationCommandData typedef (#7389) ([d32db88](https://github.com/discordjs/discord.js/commit/d32db8833e1058fb36f2e83af79d5353a9f2f693))
+- **channel:** Fix `isDMBased` docs (#7411) ([f2a7a9f](https://github.com/discordjs/discord.js/commit/f2a7a9f1b30af272a6a8d81825d09f84e749cc24))
+- **messageattachment:** Fix `contentType` docs (#7413) ([2800e07](https://github.com/discordjs/discord.js/commit/2800e07e5974e07b9f8ce043722b9b99a5bcc80d))
+- Add supported option types for autocomplete (#7368) ([8bb3751](https://github.com/discordjs/discord.js/commit/8bb37513400d646d784d59875d6b6a6ec10160cd))
+- Add external builder docs links (#7390) ([0b866c9](https://github.com/discordjs/discord.js/commit/0b866c9fb284971113e288e52327d4506db28011))
+- Add EnumResolvers (#7353) ([72767a1](https://github.com/discordjs/discord.js/commit/72767a1059526bdf617e80d5a9e5da1fbd2936d3))
+- **locales:** Update Discord API docs link (#7266) ([b640272](https://github.com/discordjs/discord.js/commit/b6402723c31bed3c49f8b8cde873b65b9f373fd7))
+- **StageInstance:** Deprecate discoverableDisabled (#7179) ([bd33ebb](https://github.com/discordjs/discord.js/commit/bd33ebb507eab36bc2219103dbd1e0217b9f38c0))
+- **shardingmanager:** Fix type of `execArgv` option (#7284) ([e65da44](https://github.com/discordjs/discord.js/commit/e65da44d9c564d1ffcb0f4df2bcdaf0ce0636f35))
+- **interaction:** Add locale list link (#7261) ([37ec0bd](https://github.com/discordjs/discord.js/commit/37ec0bda6df75fb1dc69b7a1eafbb8ea19e68457))
+- Fix a typo and use milliseconds instead of ms (#7251) ([0dd56af](https://github.com/discordjs/discord.js/commit/0dd56afe1cdf16f1e7d9afe1f8c29c31d1833a25))
+- Fix command interaction docs (#7212) ([137ea24](https://github.com/discordjs/discord.js/commit/137ea249df3aa6b8375ecb42aa456a6fdb811f19))
+- **TextBasedChannel:** Fixed syntax error in examples (#7163) ([b454740](https://github.com/discordjs/discord.js/commit/b454740ae87b6c3c13536181965519c7277e5840))
+- **TextBasedChannel:** Fix #createMessageComponentCollector description (#7168) ([d4e6e03](https://github.com/discordjs/discord.js/commit/d4e6e0370857dff00185d59faf8aaac12b343a7a))
+- Fixes the examples for kick and ban (#7170) ([db669b8](https://github.com/discordjs/discord.js/commit/db669b897132ec458d50ca6c1e3afa761e98ffc3))
+- **RoleManager:** Fix incorrect example (#7174) ([f79ea67](https://github.com/discordjs/discord.js/commit/f79ea67d3a9ba134a9acef0a443bd089c4e173a6))
+
+## Features
+
+- **builder:** Add max min length in string option (#8214) ([96c8d21](https://github.com/discordjs/discord.js/commit/96c8d21f95eb366c46ae23505ba9054f44821b25))
+- **applicationCommand:** Add max min length in string option (#8215) ([94ee60d](https://github.com/discordjs/discord.js/commit/94ee60d3d438f6657bdef51471528769af09624c))
+- Add website documentation early mvp (#8183) ([d95197c](https://github.com/discordjs/discord.js/commit/d95197cc78593df4d0a8d1cc492b0e41b4ab58b8))
+- **BaseInteraction:** Add support for `app_permissions` (#8194) ([002d6a5](https://github.com/discordjs/discord.js/commit/002d6a5aede3d1c0e08bd58eeef38a3b9202f525))
+- **util:** ParseWebhookURL (#8166) ([c4653f9](https://github.com/discordjs/discord.js/commit/c4653f97b1529eb0b99fccdba67c37eb4f467ff9))
+- **AutocompleteInteraction:** Add `commandGuildId` (#8086) ([10a6c42](https://github.com/discordjs/discord.js/commit/10a6c4287dd45a30290814e50fa29a086f85da02))
+- **guild:** Add support for setting MFA level (#8024) ([c5176be](https://github.com/discordjs/discord.js/commit/c5176be14b697ff506eb973c4119644eab544304))
+- **vcs:** Add missing property and methods (#8002) ([0415300](https://github.com/discordjs/discord.js/commit/0415300243877ddbcb501c0a26b1ff65618a1da7))
+- **docgen:** Update typedoc ([b3346f4](https://github.com/discordjs/discord.js/commit/b3346f4b9b3d4f96443506643d4631dc1c6d7b21))
+- Website (#8043) ([127931d](https://github.com/discordjs/discord.js/commit/127931d1df7a2a5c27923c2f2151dbf3824e50cc))
+- Docgen package (#8029) ([8b979c0](https://github.com/discordjs/discord.js/commit/8b979c0245c42fd824d8e98745ee869f5360fc86))
+- Backport handle zombie connection (#7626) ([e1176fa](https://github.com/discordjs/discord.js/commit/e1176faa27898d4f127c293c099201cb294e10ee))
+- **CommandInteraction:** Add 'commandGuildId' (#8018) ([aa59a40](https://github.com/discordjs/discord.js/commit/aa59a409b36c7ef7018d1785d2dba4da17b57864))
+- Allow builders to accept rest params and arrays (#7874) ([ad75be9](https://github.com/discordjs/discord.js/commit/ad75be9a9cf90c8624495df99b75177e6c24022f))
+- **MessageReaction:** Add react method (#7810) ([a328778](https://github.com/discordjs/discord.js/commit/a3287782b57c28b94c390c24e7d5f2d8c303301f))
+- **Collector:** Add `ignore` event (#7644) ([5244fe3](https://github.com/discordjs/discord.js/commit/5244fe3c1cd400985b00e95d8e5ec73823cf4f25))
+- **GuildMemberManager:** Add `GuildMemberManager#fetchMe()` (#7526) ([349766d](https://github.com/discordjs/discord.js/commit/349766dd6925e2d5e5597cc78c73e46f17c56eab))
+- **guildChannelManager:** Add `videoQualityMode` option for `create()` (#7980) ([cdd2ba0](https://github.com/discordjs/discord.js/commit/cdd2ba036ab1559783eb067786c52aff61807557))
+- **EnumResolvers:** Remove Enumresolvers (#7876) ([76694c1](https://github.com/discordjs/discord.js/commit/76694c1497de1b083a792fd1fda20f0eace50c48))
+- Move `me` to `GuildMemberManager` manager (#7669) ([aed687b](https://github.com/discordjs/discord.js/commit/aed687b09f87862eb2f33fb9f95b2cbd0b770585))
+- **rest:** Use undici (#7747) ([d1ec8c3](https://github.com/discordjs/discord.js/commit/d1ec8c37ffb7fe3b63eaa8c382f22ca1fb348c9b))
+- **VoiceChannel:** Add support for text in voice (#6921) ([4ba0f56](https://github.com/discordjs/discord.js/commit/4ba0f56b6af64bac30eea807fb3e9f3c41c3c83c))
+- **SelectMenu:** Allow emojis in options and option constructors (#7797) ([f22245e](https://github.com/discordjs/discord.js/commit/f22245e9d072ac4ef63b0ae0d84d5ba94608ce22))
+- Allow `createMessageComponentCollector` without using `fetchReply` (#7623) ([a58556a](https://github.com/discordjs/discord.js/commit/a58556adc02b2b9239c8f277a4387c743c9d6f04))
+- Add guild directory support (#6788) ([b01f414](https://github.com/discordjs/discord.js/commit/b01f4147d4f3bca021bc269c9f06463f06e3db53))
+- **GuildBanManager:** Support pagination results (#7734) ([fc2a8bb](https://github.com/discordjs/discord.js/commit/fc2a8bb6750919ecd6ee7c872df05f4b677ff5d3))
+- **CommandInteraction:** Add support for localized slash commands (#7684) ([01a423d](https://github.com/discordjs/discord.js/commit/01a423d110cfcddb3d794fcc32579a1547dd472d))
+- Allow emoji strings to be passed through constructors (#7718) ([0faac04](https://github.com/discordjs/discord.js/commit/0faac04b69f1dda3dc860cd584af100e36a40917))
+- **StageInstanceManager:** Add `sendStartNotification` option to create (#7730) ([29f8807](https://github.com/discordjs/discord.js/commit/29f88079559cc02ccfef7a7c16458d481e573fb5))
+- Add `makeURLSearchParams` utility function (#7744) ([8eaec11](https://github.com/discordjs/discord.js/commit/8eaec114a98026024c21545988860c123948c55d))
+- **modal:** Add `awaitModalSubmit` (#7751) ([3037fca](https://github.com/discordjs/discord.js/commit/3037fca196a0f9238d53bb51394daf737bbf3742))
+- **Actions:** Add parent structure to events parameters (#7577) ([3f3e432](https://github.com/discordjs/discord.js/commit/3f3e4327c86da86734c19a96e97115bd505b4532))
+- Export `UnsafeModalBuilder` and `UnsafeTextInputBuilder` (#7628) ([6fec252](https://github.com/discordjs/discord.js/commit/6fec25239dfed46a30826d38dc97f3680f24ec65))
+- **VoiceChannel:** Support `video_quality_mode` (#7722) ([3b3dabf](https://github.com/discordjs/discord.js/commit/3b3dabf3da2e2f24b81967d68b581d7f7452273f))
+- Add API v10 support (#7477) ([72577c4](https://github.com/discordjs/discord.js/commit/72577c4bfd02524a27afb6ff4aebba9301a690d3))
+- **embed:** Remove Embed.setColor (#7662) ([9b0d8cb](https://github.com/discordjs/discord.js/commit/9b0d8cb2d8f7b55753de584eb3a3f347f87596c2))
+- **StageInstance:** Add support for associated guild event (#7576) ([3dff31f](https://github.com/discordjs/discord.js/commit/3dff31f63fe4afdcc818193d737e1917f1ac8105))
+- **VoiceState:** Add edit method (#7569) ([b162f27](https://github.com/discordjs/discord.js/commit/b162f27e46524bfc64515969d753c6e8f30e6c40))
+- **ModalSubmitInteraction:** Add boolean properties (#7596) ([8907390](https://github.com/discordjs/discord.js/commit/89073903a253d9408839573502c72cae93fe70b6))
+- Add Modals and Text Inputs (#7023) ([ed92015](https://github.com/discordjs/discord.js/commit/ed920156344233241a21b0c0b99736a3a855c23c))
+- **discord.js:** Partial transition to undici (#7482) ([5158332](https://github.com/discordjs/discord.js/commit/51583320d3b0f6452cd96bad1021f2a57e4cc6f6))
+- **message:** Add `reason` on pin and unpin (#7520) ([00728f7](https://github.com/discordjs/discord.js/commit/00728f72b36123b607502624b4b02a02ee524d4a))
+- Re-export AuditLogEvent enum (#7528) ([6a2fa70](https://github.com/discordjs/discord.js/commit/6a2fa70b8e79a460be38916eeb605976ad6fe68b))
+- **options:** Add support for custom JSON transformers (#7476) ([dee27db](https://github.com/discordjs/discord.js/commit/dee27db35af379b0835f9fd5cc19563f7bf3dfc0))
+- Add CategoryChannelChildManager (#7320) ([5cf5071](https://github.com/discordjs/discord.js/commit/5cf5071061760c2f9c1e36d7648aef544b03323a))
+ - **Co-authored-by:** Antonio Román <kyradiscord@gmail.com>
+- Attachment application command option type (#7200) ([0034396](https://github.com/discordjs/discord.js/commit/003439671d359dcfe481446ef12b90bd71c57835))
+- **builders:** Add attachment command option type (#7203) ([ae0f35f](https://github.com/discordjs/discord.js/commit/ae0f35f51d68dfa5a7dc43d161ef9365171debdb))
+- **scheduledevents:** Add image option (#7436) ([fbc71ef](https://github.com/discordjs/discord.js/commit/fbc71ef6b668c4b1e2b065d9b65541d9303db0a0))
+- Add methods to managers (#7300) ([dd751ae](https://github.com/discordjs/discord.js/commit/dd751ae19da196cc2f90ccd35c7d8e99878daaf9))
+- **channel:** Add .url getter (#7402) ([f59d630](https://github.com/discordjs/discord.js/commit/f59d6305cb0cd0d154a909f18be76407c4d452d3))
+- **components:** Add unsafe message component builders (#7387) ([6b6222b](https://github.com/discordjs/discord.js/commit/6b6222bf513d1ee8cd98fba0ad313def560b864f))
+- **thread:** Add `newlyCreated` to `threadCreate` event (#7386) ([51beda5](https://github.com/discordjs/discord.js/commit/51beda56f74e44ed013b5d25044b8d5fd1978b29))
+- **channel:** Add isDMBased typeguard (#7362) ([388f535](https://github.com/discordjs/discord.js/commit/388f53550cca7ded7350a050fda03c36e4c1fdf7))
+- **`Interaction`:** Add `.commandType` property to `CommandInteraction` and `AutocompleteInteraction` (#7357) ([567db60](https://github.com/discordjs/discord.js/commit/567db60475c8704661b2e788c9905ef364d6c00c))
+- **scheduledevent:** Add support for event cover images (#7337) ([355f579](https://github.com/discordjs/discord.js/commit/355f579771771a28a293c327a38574c8918d18f8))
+- **enumResolvers:** Strengthen typings (#7344) ([9a566e8](https://github.com/discordjs/discord.js/commit/9a566e8068f28fce87c07861ef1d2877c6ae105f))
+- Allow setting message flags when sending (#7312) ([706db92](https://github.com/discordjs/discord.js/commit/706db9228a91ef42e49d2ec749eac153b9ef75d0))
+- **minor:** Add application_id to Webhook (#7317) ([5ccdb0a](https://github.com/discordjs/discord.js/commit/5ccdb0ab266e4f74c331386ac2d6dd32bc225c62))
+- **threadchannel:** Add `createdTimestamp` field (#7306) ([9a16234](https://github.com/discordjs/discord.js/commit/9a1623425ae2d69f5c16f0096af4951ff5096e80))
+- **GuildPreview:** Add stickers (#7152) ([cf25de9](https://github.com/discordjs/discord.js/commit/cf25de9373df98b3c1cd0ca0a092d9dc8172929d))
+- Enum resolvers & internal enum string removal (#7290) ([213acd7](https://github.com/discordjs/discord.js/commit/213acd799738b888d550cdf3f08906764f8288e0))
+- **guildemojimanager:** Add `delete` and `edit` methods (#7286) ([9181a31](https://github.com/discordjs/discord.js/commit/9181a31e0ba330502052c94da544bb15c8b66f11))
+- **interaction:** Add `isRepliable` type guard (#7259) ([da05a88](https://github.com/discordjs/discord.js/commit/da05a8856b11cc1bf0df424c88a1cf9573e5b654))
+- **Channel:** Improve typeguards (#6957) ([37a22e0](https://github.com/discordjs/discord.js/commit/37a22e04c27724c2a65b05c701e3000ba3653ba1))
+- Add Locales to Interactions (#7131) ([9052e32](https://github.com/discordjs/discord.js/commit/9052e321d1c9c8841962d4e8dc5d9e060b104438))
+- **Permissions:** Remove deprecated thread-related permissions (#6755) ([ab3ff5a](https://github.com/discordjs/discord.js/commit/ab3ff5a262caf7d6225b8d6b54ab2c6b6613c0d0))
+- **VoiceRegion:** Remove the unsent vip field (#6759) ([caaef53](https://github.com/discordjs/discord.js/commit/caaef53dd97ecac9f714072ddba5ae9a99ab1027))
+- **richpresenceassets:** Add YouTube and custom image support (#7184) ([d06d70c](https://github.com/discordjs/discord.js/commit/d06d70ccf26c04c1122fac8430922588a489f95e))
+- **Collector:** Yield all collected values (#7073) ([2b480cb](https://github.com/discordjs/discord.js/commit/2b480cb14e6f52855efcb372da7fb455c15b13b1))
+
+## Refactor
+
+- **Util:** Rename `fetchRecommendedShards` (#8298) ([cafde77](https://github.com/discordjs/discord.js/commit/cafde77d73452d729ba8e2cb1cac3f14235b889b))
+- **Embed:** Add all the types (#8254) ([64f8140](https://github.com/discordjs/discord.js/commit/64f814066cc4adebaca47eb8d7a2040a8df399ae))
+- **rest:** Add content-type(s) to uploads (#8290) ([103a358](https://github.com/discordjs/discord.js/commit/103a3584c95a7b7f57fa62d47b86520d5ec32303))
+- Make `GuildAuditLogsEntry.action` return an `AuditLogEvent` (#8256) ([f0b68d5](https://github.com/discordjs/discord.js/commit/f0b68d57368d7ac3db97925df68c11a945ccd84c))
+- **builder:** Remove `unsafe*Builder`s (#8074) ([a4d1862](https://github.com/discordjs/discord.js/commit/a4d18629828234f43f03d1bd4851d4b727c6903b))
+- Make `ShardEvents` the events of `Shard` (#8185) ([c5750d5](https://github.com/discordjs/discord.js/commit/c5750d59f529ab48a5bc88a73a1c449ef6ddbffd))
+- **Util:** Make single `replace` call in `cleanContent` (#8210) ([6b20645](https://github.com/discordjs/discord.js/commit/6b206457400ce31d566b02a0c135042afb540853))
+- **ApplicationCommandManager:** Use `makeURLSearchParams` (#8196) ([cb3dca4](https://github.com/discordjs/discord.js/commit/cb3dca4ae029724421f3d04a784ace0ae2de75e2))
+- Use `Base` prefix for channel and interaction base classes (#8099) ([e24970e](https://github.com/discordjs/discord.js/commit/e24970e3c3d24f71ba711e59666cd8a49a33e33b))
+- **Constants:** Remove leftover code (#8156) ([cd17aad](https://github.com/discordjs/discord.js/commit/cd17aad720430d23af51c364caeb8b22bf6cb6b5))
+- Errors (#8068) ([e68effa](https://github.com/discordjs/discord.js/commit/e68effa822f064a324ed5b92e797c9fc3ce5e211))
+- **ClientOptions:** Remove `$` prefix from `ws.properties` keys (#8094) ([90a98fe](https://github.com/discordjs/discord.js/commit/90a98fee16b7d1d06768461f4e85127c0edf8419))
+- Use `GuildFeature` enum (#8101) ([e5ec1c4](https://github.com/discordjs/discord.js/commit/e5ec1c4dbc3fa54b2c43d1fec24932d7363e17cb))
+- **util:** Make utility functions top level (#8052) ([e53d162](https://github.com/discordjs/discord.js/commit/e53d1621986035b0c92a1782f6e013d408480e00))
+- **ApplicationCommand:** Permissions v2 (#7857) ([c7391db](https://github.com/discordjs/discord.js/commit/c7391db11b3efd4b1a6904affb26887ad06d6db4))
+- ***:** Include name/reason/etc fields into options/data params (#8026) ([9c8b310](https://github.com/discordjs/discord.js/commit/9c8b3102ce00d1f2c1255c150fb3030f8b6dd026))
+- **ThreadMemberManager:** Consistent thread member fetching (#8021) ([da9107c](https://github.com/discordjs/discord.js/commit/da9107c007536952107bd92943b6c714538d5aeb))
+- **interactions:** Remove redundant interaction typeguards (#8027) ([f57d676](https://github.com/discordjs/discord.js/commit/f57d6768ad24f6e37dc598f9c93709449d3bc4dd))
+- Move all the config files to root (#8033) ([769ea0b](https://github.com/discordjs/discord.js/commit/769ea0bfe78c4f1d413c6b397c604ffe91e39c6a))
+- **channel:** Remove redundant channel type guards (#8012) ([70c733b](https://github.com/discordjs/discord.js/commit/70c733bb9a5bde0f79e6bea0bdc416458bda4c06))
+- Always return `Message` instances in interactions (#7917) ([9720e55](https://github.com/discordjs/discord.js/commit/9720e555340431c3b3ad7bd670ad0ac7eee8865f))
+- **attachment:** Don't return attachment builders from API (#7852) ([dfadcbc](https://github.com/discordjs/discord.js/commit/dfadcbc2fd50be64c8a0c1cae3be10f83678c5ee))
+- Clean up modal submissions (#7994) ([643dab3](https://github.com/discordjs/discord.js/commit/643dab3b1b5305d002fcefed62755bbe11fc3267))
+- **ThreadChannel:** Remove `MAX` helper from threads (#7846) ([dfd9eb2](https://github.com/discordjs/discord.js/commit/dfd9eb20b2d3e0e7db26744b1f15134ac6eda139))
+- **Activity:** Remove undocumented properties (#7844) ([5ba7740](https://github.com/discordjs/discord.js/commit/5ba7740fcfefda1eeba81ace4e6351eac02522a4))
+- **MessageAttachment:** Use `Attachment` instead (#7691) ([ab4c608](https://github.com/discordjs/discord.js/commit/ab4c608b97ff319935e1a7f23564622bfd7ddd57))
+- **Util:** Remove splitting (#7780) ([54e5629](https://github.com/discordjs/discord.js/commit/54e56299865a6746744544ba25d5540a1166d27c))
+- Tidy up builders and components (#7711) ([96a0d83](https://github.com/discordjs/discord.js/commit/96a0d83a1366703ecae40b5e0d5171be9123d079))
+- Remove nickname parsing (#7736) ([78a3afc](https://github.com/discordjs/discord.js/commit/78a3afcd7fdac358e06764cc0d675e1215c785f3))
+- Remove store channels (#7634) ([aedddb8](https://github.com/discordjs/discord.js/commit/aedddb875e740e1f1bd77f06ce1b361fd3b7bc36))
+- **IntegrationApplication:** Remove `summary` (#7729) ([eb6b472](https://github.com/discordjs/discord.js/commit/eb6b472f72488cad7e96befccc00270cf6dc01b8))
+- **GuildAuditLogs:** Remove build (#7704) ([cedd053](https://github.com/discordjs/discord.js/commit/cedd0536baa1301984daf89dfda4e63a7be595a2))
+- **InteractionCollector:** Simplify constructor logic (#7667) ([07b23a9](https://github.com/discordjs/discord.js/commit/07b23a99c7088a7c740f23051f3f755f091519b0))
+- Remove undocumented checks (#7637) ([9a6e691](https://github.com/discordjs/discord.js/commit/9a6e691eaa6c3d133098b2734414590cb838de2e))
+- Allow builders to accept emoji strings (#7616) ([fb9a9c2](https://github.com/discordjs/discord.js/commit/fb9a9c221121ee1c7986f9c775b77b9691a0ae15))
+- Use `static` fields (#7701) ([e805777](https://github.com/discordjs/discord.js/commit/e805777a7a81d1dc7a2edd9741ecb04e685a3886))
+- **EmbedBuilder:** Allow hex strings in setColor (#7673) ([f472975](https://github.com/discordjs/discord.js/commit/f4729759f600372455f062c75859f084e23a5d78))
+- Don't return builders from API data (#7584) ([549716e](https://github.com/discordjs/discord.js/commit/549716e4fcec89ca81216a6d22aa8e623175e37a))
+- **embed:** Allow hex strings in `setColor()` (#7593) ([79d6c04](https://github.com/discordjs/discord.js/commit/79d6c0489c3d563fdd05de63c4fcf93a6deefce1))
+- **InteractionResponses:** Use ClientOptions.jsonTransformer (#7599) ([fac55bc](https://github.com/discordjs/discord.js/commit/fac55bcfd1e8b76aae1273415f74fa6de7aca66d))
+- Deprecate invite stage instance (#7437) ([d2bc9d4](https://github.com/discordjs/discord.js/commit/d2bc9d444f42a70a3c4cc4c68eb107bcaebec509))
+- **guild:** Move `premiumSubscriptionCount` to `AnonymousGuild` (#7451) ([6d3da22](https://github.com/discordjs/discord.js/commit/6d3da226d3c003d137639e719394a807330e4844))
+- **actions:** Use optional chaining (#7460) ([d1bb362](https://github.com/discordjs/discord.js/commit/d1bb36256f2f86022884e6ee9e05b0536cb6384d))
+- **guildbanmanager:** Rename days option to deleteMessageDays (#7447) ([0dfdb2c](https://github.com/discordjs/discord.js/commit/0dfdb2cf11e236e67dd34277108973b5b79790a8))
+- Make public builder props getters (#7422) ([e8252ed](https://github.com/discordjs/discord.js/commit/e8252ed3b981a4b7e4013f12efadd2f5d9318d3e))
+- Remove redundant API defaults (#7449) ([532846b](https://github.com/discordjs/discord.js/commit/532846b1f8260d85022a022d093553310052afc9))
+- Allow discord.js builders to accept camelCase (#7424) ([94bf727](https://github.com/discordjs/discord.js/commit/94bf727cc3a2f11c88e95cdb151b235f775cd1ca))
+- Replace `WSCodes`, `WSEvents`, and `InviteScopes` with `discord-api-types` equivalent (#7409) ([cc25455](https://github.com/discordjs/discord.js/commit/cc25455d2c75177e3eddc880b7fd53cb122387c4))
+- Make constants enums top level and `PascalCase` (#7379) ([d8184f9](https://github.com/discordjs/discord.js/commit/d8184f94dd08daab37195f52828e06af5ed1c1e0))
+- **`Bitfield`:** Use discord-api-types enums instead (#7313) ([fbb1d03](https://github.com/discordjs/discord.js/commit/fbb1d0328bcd517027ad2eedb8753d17489ed851))
+- Use `@discordjs/rest` (#7298) ([ec0fba1](https://github.com/discordjs/discord.js/commit/ec0fba1ed0d3c5b1bb18171ece6fe5ee42d48497))
+- Switch to /builders `Embed` (#7067) ([d2d3a80](https://github.com/discordjs/discord.js/commit/d2d3a80c556a104099a1ddb1b24f1b921c553257))
+- Remove transformPermissions (#7303) ([b4ed8fd](https://github.com/discordjs/discord.js/commit/b4ed8fd3ed953085cd908b2845d4384c8555d3a2))
+- Remove VoiceChannel#editable (#7291) ([164589c](https://github.com/discordjs/discord.js/commit/164589c5516a847457444d11098981d557b6778b))
+- Remove boolean option for `Webhook#fetchMessage` (#7293) ([347ff80](https://github.com/discordjs/discord.js/commit/347ff80bbc9bc5243b7f68ba5d745782eadeba21))
+- **subcommandgroup:** Required default to false (#7217) ([6112767](https://github.com/discordjs/discord.js/commit/6112767128a664f32205425f52ba52220d57834f))
+- **invite:** Make `channel` and `inviter` getters (#7278) ([18b0ed4](https://github.com/discordjs/discord.js/commit/18b0ed4cbe8285637a971c7c99ee49d18060a403))
+- Remove required from getMember (#7188) ([c90e47f](https://github.com/discordjs/discord.js/commit/c90e47f90403e5b1b3499b213dcdf2704fd96b66))
+- Remove djs components and use /builders components instead (#7252) ([101d7c5](https://github.com/discordjs/discord.js/commit/101d7c5ffa03edcf8cb8a0647b77d5c9a38e4bdd))
+- Default *URL methods to animated hash (#7149) ([7c07976](https://github.com/discordjs/discord.js/commit/7c07976018728154be0ce0314d3e8dfe8eb9ed5b))
+- Use setPosition inside edit (#7263) ([0b23b7f](https://github.com/discordjs/discord.js/commit/0b23b7f0394a20596c8d85b82870c3f35ea6b0e0))
+- Don't disable import order lint (#7262) ([0a5d5f3](https://github.com/discordjs/discord.js/commit/0a5d5f38c0b1a249fa2efe16f3b601c90622a4d5))
+- Remove discord.js enums and use discord-api-types enums instead (#7077) ([aa6d1c7](https://github.com/discordjs/discord.js/commit/aa6d1c74de01dd9a8f020c43fb2c193c4729df8d))
+- **application:** Remove fetchAssets (#7250) ([1479e40](https://github.com/discordjs/discord.js/commit/1479e40bcecc4c28ecb9f05fa4fbbdfe3bd387e1))
+- PresenceUpdate and demuxProbe (#7248) ([1745973](https://github.com/discordjs/discord.js/commit/174597302408f13c5bb685e2fb02ae2137cb481d))
+- **embeds:** Don't create new embed instances when unnecessary (#7227) ([822dc67](https://github.com/discordjs/discord.js/commit/822dc678da626de7b4fb22a747cd3cd2e8376732))
+- **GuildMember:** Throw better errors on #kickable and #bannable (#7137) ([4fd127e](https://github.com/discordjs/discord.js/commit/4fd127e79edfa1851f8a10242838f9d7aa68c8c3))
+- **SnowflakeUtil:** Switch to `@sapphire/snowflake` (#7079) ([e082dfb](https://github.com/discordjs/discord.js/commit/e082dfb1584926e4c05face5966d16e4a2921bc5))
+- **InteractionCreate:** Remove interaction event (#6326) ([ae876d9](https://github.com/discordjs/discord.js/commit/ae876d962453ccf843f8e6f70666a98a3173bb75))
+- **MessageCreate:** Remove message event (#6324) ([171e917](https://github.com/discordjs/discord.js/commit/171e917fb96b6bf39a6ad70e83be646f72fe451e))
+- **integration:** Turn undefined into null and consistency (#7209) ([13eb782](https://github.com/discordjs/discord.js/commit/13eb78256da901e6c3c405f546f36617ef5e8239))
+- Remove `deleted` field (#7092) ([cee7fd1](https://github.com/discordjs/discord.js/commit/cee7fd181c464e44eabf20b511d12589f2453722))
+- **Dates:** Save timestamps everywhere and use Date.parse (#7108) ([55e21f5](https://github.com/discordjs/discord.js/commit/55e21f53663a91863c63b6d9f3a8c35564664061))
+- **RoleManager:** Remove `comparePositions()` (#7201) ([fbbac27](https://github.com/discordjs/discord.js/commit/fbbac279789427b2c36869dc47b65fb08431e14d))
+- Better Command Terminology (#7197) ([b7856e7](https://github.com/discordjs/discord.js/commit/b7856e7809ff6fa21fe00286f885808535624f7c))
+- **Actions:** Remove deleted maps (#7076) ([5022b14](https://github.com/discordjs/discord.js/commit/5022b14da09e9b421f947e9bc385a0574cbf07d1))
+- **Client:** Remove applicationCommand events (#6492) ([6085b4f](https://github.com/discordjs/discord.js/commit/6085b4f72723d4ff82f7fea504241d14c94af21e))
+- Remove `Util.removeMentions()` (#6530) ([0c24cc8](https://github.com/discordjs/discord.js/commit/0c24cc8ec0d818315cc8f8bcf74fce060847ac79))
+- **Constants:** Change APPLICATION_COMMAND -> CHAT_INPUT_COMMAND (#7018) ([75616a3](https://github.com/discordjs/discord.js/commit/75616a305f9af33013486b13a872a39212101ce7))
+- **Guild:** Remove deprecated setXPositions methods (#6897) ([43e5e3c](https://github.com/discordjs/discord.js/commit/43e5e3c339a96fa895267d4538eee1d5e5843d05))
+- **UserFlags:** Update flag names (#6938) ([b246fc4](https://github.com/discordjs/discord.js/commit/b246fc4101b8e4957ffd1af8e2e4986a020ca211))
+
+## Styling
+
+- Cleanup tests and tsup configs ([6b8ef20](https://github.com/discordjs/discord.js/commit/6b8ef20cb3af5b5cfd176dd0aa0a1a1e98551629))
+
+## Typings
+
+- **GuildFeature:** Allow feature strings to be passed (#8264) ([b7d4e55](https://github.com/discordjs/discord.js/commit/b7d4e55419207d4e25f5c40cab221c7c04a617bf))
+- **CategoryChannelChildManager:** Fix Holds type (#8288) ([33a7a5c](https://github.com/discordjs/discord.js/commit/33a7a5cbdc00d2a5034dc1ec91fec5da7042f9d0))
+- Remove `MemberMention` (#8292) ([bf65b37](https://github.com/discordjs/discord.js/commit/bf65b37d1a9ea8417e26ad4afacea1eb45a0ff5a))
+- **GuildMemberManager:** Fix placement for `fetchMe()` (#8258) ([7525615](https://github.com/discordjs/discord.js/commit/75256153a9923d94ca709a37aaccc48dfb43c153))
+- Convert `Events` to an enum (#8246) ([feb3bdd](https://github.com/discordjs/discord.js/commit/feb3bdda0a3c3da80378c8cbcafca2968551eef9))
+- **GuildMemberManager:** Non-void return of `edit()` (#8186) ([c7a205f](https://github.com/discordjs/discord.js/commit/c7a205f7b992eea43af13a4638e2a03db7bc0d8a))
+- Add missing shard types (#8180) ([27d8deb](https://github.com/discordjs/discord.js/commit/27d8deb4716a87704370a95103b16fa1b763de18))
+- Implement `GuildChannelEditOptions` (#8184) ([b83e0c0](https://github.com/discordjs/discord.js/commit/b83e0c0caffc2b767aa1ba4412580970a6901899))
+- **Status:** Add missing members (#8179) ([8421f92](https://github.com/discordjs/discord.js/commit/8421f9203bd2d85ef8e64c3fb9a991c74223a75d))
+- **GuildScheduledEvent#scheduledStartAt:** Should be nullish (#8111) ([65dc8d6](https://github.com/discordjs/discord.js/commit/65dc8d677ee81469c0eeb4ecdd83fe2f68cc8982))
+- Fix modal builder constructor data type (#8143) ([7279f9c](https://github.com/discordjs/discord.js/commit/7279f9c31b14bc1e78c63b7298e80e37ca5dfe0c))
+- Use `ThreadAutoArchiveDuration` from discord-api-types (#8145) ([a3799f9](https://github.com/discordjs/discord.js/commit/a3799f9ebb027904830457119708d550e2009200))
+- **Shard#reconnecting:** Fix event name (#8118) ([95e6d6e](https://github.com/discordjs/discord.js/commit/95e6d6ede03c4fb92a8d8027a085e84b043fd895))
+- **ApplicationCommand:** Fix typo in setDMPermission (#8097) ([4df491c](https://github.com/discordjs/discord.js/commit/4df491ce8578a1b01ee8412a4df8137a302e7202))
+- Fix `setType()` parameter and `ChannelData.type` (#8089) ([b4e28a8](https://github.com/discordjs/discord.js/commit/b4e28a8ff6bf165c54a8726d3bc3a3cc0c1e469b))
+- Fix `ApplicationCommandPermissionsUpdate` event typings (#8071) ([9964454](https://github.com/discordjs/discord.js/commit/9964454c2944a0523399481a5f609144486e549b))
+- **AutocompleteOption:** Fix and improve types (#8069) ([476b7d5](https://github.com/discordjs/discord.js/commit/476b7d519c719152ea04e207f6dd09bb23e733db))
+- **ThreadMemberManager:** Fix return type of fetching members with no arguments (#8060) ([2392a6f](https://github.com/discordjs/discord.js/commit/2392a6f5de2efcf6b326173d26295c928b94adb6))
+- Remove isAutocomplete typeguard from typings (#8063) ([c0f079d](https://github.com/discordjs/discord.js/commit/c0f079d2325a636c83ac676c525bfa89ce308b3c))
+- **AttachmentBuilder:** Fix data type (#8016) ([7fa698d](https://github.com/discordjs/discord.js/commit/7fa698d23e548987762c4c66c96c510d9ea56eb4))
+- **modal:** Fix `showModal()` typings (#8014) ([0ccc243](https://github.com/discordjs/discord.js/commit/0ccc243c8ffbf852660c899cc2ad47bd5ebb65cb))
+- Fix some attachment related typings (#8013) ([6aa6232](https://github.com/discordjs/discord.js/commit/6aa623240ee94b117c7e69c1d09b50923a8f7a4c))
+- **AttachmentBuilder:** Remove name parameter from constructor (#8008) ([6266b0c](https://github.com/discordjs/discord.js/commit/6266b0c1e323f9522010f90f34ce6f17fcb6e769))
+- Add types to `EventEmitter` static methods (#7986) ([d60c464](https://github.com/discordjs/discord.js/commit/d60c464e618e4159d2656e7832798909832f33cd))
+- Nullify `guildScheduledEventUpdate`'s old parameter (#7955) ([fdeac9d](https://github.com/discordjs/discord.js/commit/fdeac9d9fba06c532eca296ddd8479047bc732bf))
+- Make `CacheType` generic more accurate for return values (#7868) ([e07b910](https://github.com/discordjs/discord.js/commit/e07b910e684bc3cf71fb93417951ad42351bace4))
+- **guildScheduledEvent:** Mark `entityMetadata` as nullable (#7908) ([64bdf53](https://github.com/discordjs/discord.js/commit/64bdf53116945ffb51764bb8ec539d530aefcfb1))
+- **discord.js:** Export missing enums (#7864) ([5eeef3f](https://github.com/discordjs/discord.js/commit/5eeef3f708eb900ec994d837fb4cd414a4f4b437))
+- Fix return type of `toString()` on channels (#7836) ([ece6289](https://github.com/discordjs/discord.js/commit/ece628986c7eb1a66f46076d8f8518c9ff00aaf3))
+- **Message#activity:** Make `partyId` optional and use enum for `type` (#7845) ([bfeaf85](https://github.com/discordjs/discord.js/commit/bfeaf856f76eb7cb756ac55aac13636ccdb345b6))
+- Cleanup *Data type definitions (#7716) ([585169f](https://github.com/discordjs/discord.js/commit/585169f2f097ffb1940d17f549e4290aa55acde2))
+- Fix BooleanCache never resolving to true (#7809) ([440ac24](https://github.com/discordjs/discord.js/commit/440ac243ca1d6f8cd04603e63e3f2f6ea1722ee8))
+- **CommandInteraction:** Add awaitModalSubmit (#7811) ([a6d9ce5](https://github.com/discordjs/discord.js/commit/a6d9ce57c6cae90d0afc60010cad44fdc2c2d06c))
+- **ThreadChannel:** Fix autoArchiveDuration types (#7816) ([0857476](https://github.com/discordjs/discord.js/commit/08574763eb665b5a43ccfb826929f1e3f0d1c3a7))
+- Add missing typing (#7781) ([f094e33](https://github.com/discordjs/discord.js/commit/f094e338617a1a3c9f48a325e4b8e9b5a405aa91))
+- **VoiceChannel:** Nullify property (#7793) ([446eb39](https://github.com/discordjs/discord.js/commit/446eb390ce58b7e7f60e297b25f53773a55f7fb9))
+- **ModalSubmitInteraction:** Message (#7705) ([b577bcc](https://github.com/discordjs/discord.js/commit/b577bcc1df5c6424fef9984e19a5f11c77371cf3))
+- **Embed:** Add missing getters and add video to EmbedData (#7728) ([fd1dc72](https://github.com/discordjs/discord.js/commit/fd1dc72c0a77dbe18753d8db22972dfa5fe4ab36))
+- **ModalSubmitInteraction:** Fix `components` type (#7732) ([6f4e97b](https://github.com/discordjs/discord.js/commit/6f4e97bfafe4a058f6ec85d321676401d701ee55))
+- **interactionCollector:** Filter should have a collected argument (#7753) ([e4f2705](https://github.com/discordjs/discord.js/commit/e4f27051ca921d299c302b600a8c2917e9356ef6))
+- Fix regressions (#7649) ([5748dbe](https://github.com/discordjs/discord.js/commit/5748dbe08783beb80c526de38ccd105eb0e82664))
+- **Constants:** Add `NonSystemMessageTypes` (#7678) ([9afc030](https://github.com/discordjs/discord.js/commit/9afc03054e4c8973702d6c18e618643f76382dd9))
+- Fix auto archive duration type (#7688) ([8e3b2d7](https://github.com/discordjs/discord.js/commit/8e3b2d7abd38136534969cf77c6a748ee3a20355))
+- **InteractionResponseFields:** Add webhook (#7597) ([daf2829](https://github.com/discordjs/discord.js/commit/daf2829cb58d1a44cb1f1ece21e428d1a23e99c9))
+- **Embed:** Add forgotten `footer` type (#7665) ([8fb9816](https://github.com/discordjs/discord.js/commit/8fb98165a9d098ab316475d6baacb015783eb638))
+- **ColorResolvable:** Simplify string types (#7643) ([2297c2b](https://github.com/discordjs/discord.js/commit/2297c2b9479ace16f5f7155479605a4ac2718e3d))
+- Allow component classes in action row data (#7614) ([230c0c4](https://github.com/discordjs/discord.js/commit/230c0c4cb137882ff7bab783a4aeaa83ae941de5))
+- **ActionRow:** Allow components to be passed to constructors (#7531) ([e71c76c](https://github.com/discordjs/discord.js/commit/e71c76c7f795837dbcc3576e507bd286640b4296))
+- **showModal:** Align types with the documentation (#7600) ([0d7e4ed](https://github.com/discordjs/discord.js/commit/0d7e4edd969513692c061c107be4bbe7e4b54321))
+- Modals type and doc fixes (#7608) ([93854a8](https://github.com/discordjs/discord.js/commit/93854a8013d07234cb849bfcbfa99f74a4c3cdb4))
+- **InteractionResponseFields:** Add boolean properties (#7565) ([53defb8](https://github.com/discordjs/discord.js/commit/53defb82e36108468e35077b887ee28b811891ab))
+- Allow raw components for reply and message options (#7573) ([2d4971b](https://github.com/discordjs/discord.js/commit/2d4971b032a01c05b55c93d6475e61b0d25d69d3))
+- Fix component *Data types (#7536) ([a8321d8](https://github.com/discordjs/discord.js/commit/a8321d8026df2e6a09d867939986bf77f894f3a8))
+- Use discord-api-types `Locale` (#7541) ([8346003](https://github.com/discordjs/discord.js/commit/83460037be840ba623f3b02a3e6f218943f9d2b7))
+- **anychannel:** Add PartialGroupDMChannel (#7472) ([cf66930](https://github.com/discordjs/discord.js/commit/cf669301c7be8eaecf91d7f764eccc67d7a5b4c6))
+- Remove `ApplicationCommandInteractionOptionResolver` (#7491) ([71f4fa8](https://github.com/discordjs/discord.js/commit/71f4fa82ed6206d6843345a5394119f2a728aa35))
+- **embed:** Fix timestamp allowed types (#7470) ([7959a68](https://github.com/discordjs/discord.js/commit/7959a68d8ec600af248f5506f39871cae7eeeb04))
+- Remove duplicate rate limit for thread creation (#7465) ([2d2de1d](https://github.com/discordjs/discord.js/commit/2d2de1d3fd15a098d69e09710e9a7a3352234fef))
+- Correct types for InteractionCollector guild and channel (#7452) ([6ce906a](https://github.com/discordjs/discord.js/commit/6ce906a02fcb051cb6df3e9f453ba9f53db03bd0))
+- Fix `GuildAuditLogsTypes` keys & typos (#7423) ([3d8c776](https://github.com/discordjs/discord.js/commit/3d8c77600be51a86a99b526078bb1b1fcb9a0811))
+- Remove duplicate `GuildChannelOverwriteOptions` interface (#7428) ([83458ff](https://github.com/discordjs/discord.js/commit/83458ff7c782b8efdaaac931d2dee1764dad25bf))
+- Use `GuildFeature` enum from `discord-api-types` (#7397) ([a7b80b9](https://github.com/discordjs/discord.js/commit/a7b80b9d9bf4902bd85b592986771eadf7a765dc))
+- Fix *BitField.Flags properties (#7363) ([e6a26d2](https://github.com/discordjs/discord.js/commit/e6a26d25b3cf8dfcc8aa8997b021f1774f3b754b))
+- Fix MessageMentions channel types (#7316) ([c05b388](https://github.com/discordjs/discord.js/commit/c05b38873bb3c37c6e4ebcb6b6373a8858cc03de))
+- Fix channel create overloads (#7294) ([1c6c944](https://github.com/discordjs/discord.js/commit/1c6c9449ad68601c6c98748d73be8114401d38ef))
+- Fix regressions and inconsistencies (#7260) ([26a9dc3](https://github.com/discordjs/discord.js/commit/26a9dc32062cd071917bbe7264050315b4d6dd3c))
+- **interaction:** Remove renamed typeguards (#7220) ([68b9564](https://github.com/discordjs/discord.js/commit/68b9564f1821726377a1e929a3ca1fc65b4ad598))
+- AssertType -> expectType ([3f36746](https://github.com/discordjs/discord.js/commit/3f36746561a40cd61a7cd2e054b7ef80d58fc707))
+- Fix cache types resolving to `never` (#7164) ([c978dbb](https://github.com/discordjs/discord.js/commit/c978dbb6233bcd85408caf0bca7619c9c5d508f0))
+
+# [14.12.0](https://github.com/discordjs/discord.js/compare/14.11.0...14.12.0) - (2023-07-31)
+
+## Bug Fixes
+
+- **ChannelUpdate:** Check against unknown channels (#9697) ([7fb91c5](https://github.com/discordjs/discord.js/commit/7fb91c57f72b74395d67f2207246033c703f1f19))
+- **Action:** Use existing recipients if available (#9653) ([719e54a](https://github.com/discordjs/discord.js/commit/719e54a921f74890519f066a9f56e52fdcfacf07))
+- Everyone role members (#9685) ([0803eb5](https://github.com/discordjs/discord.js/commit/0803eb562bdc7644fa611a0a87dea3e8b0d4c7af))
+- `awaitMessageComponent` with `MessageComponentInteraction`s (#8598) ([b61e4fb](https://github.com/discordjs/discord.js/commit/b61e4fb0dcb9e5d43a7626c5a4760f5801e06fae))
+- **ThreadManager:** Fix internal crash upon conditionally resolving thread members (#9648) ([a6dbe16](https://github.com/discordjs/discord.js/commit/a6dbe163dd3df12ad98465b1dfc040b8eff8805e))
+- **User:** Check global name in equals (#9631) ([8f3bd38](https://github.com/discordjs/discord.js/commit/8f3bd3807233fca2a057948406bdc8aef008b6cb))
+- **WebSocketManager:** Await WebSocket destroy (#9519) ([75308f2](https://github.com/discordjs/discord.js/commit/75308f266933454301b10ee8e1d940d782fdb637))
+- **Client:** Safe call for possibly null WebSocket (#9600) ([24a6149](https://github.com/discordjs/discord.js/commit/24a61495b9bf07887dd535a05ffbec2895faa888))
+- **ThreadManager:** Ensure `fetchActive()` only returns active threads in a channel (#9568) ([53aa24d](https://github.com/discordjs/discord.js/commit/53aa24d41809382c1af57bd1871107c8359e4a15))
+- **LimitedCollection:** Allow items to be stored if keepOverLimit is true when maxSize is 0 (#9534) ([9345d1b](https://github.com/discordjs/discord.js/commit/9345d1b1ac4f7b1f66b919602dff995782151407))
+- **AutocompleteInteraction:** Prevent snake casing of locales (#9565) ([7196fe3](https://github.com/discordjs/discord.js/commit/7196fe36e8089dde7bcaf0db4dd09cf524125e0c))
+
+## Documentation
+
+- Change `Channel` to `BaseChannel` (#9718) ([e5effb6](https://github.com/discordjs/discord.js/commit/e5effb6f6a3e547006eb9bc054cc168844a157f2))
+- **BaseChannel:** Remove `APIChannel` (#9717) ([125405f](https://github.com/discordjs/discord.js/commit/125405f1cf11433c69ff1ae9d6b8f7e713fc37c0))
+- **BuildersSelectMenuOption:** Update link (#9690) ([ede9f4e](https://github.com/discordjs/discord.js/commit/ede9f4e5e203bcfb8820ae7ec3418482735ff9c1))
+- **ClientOptions:** Change default value of sweepers in docs (#9591) ([911e6ef](https://github.com/discordjs/discord.js/commit/911e6eff75f5d05e837d5dfaacf557d6594df16a))
+- **Client:** Correct invite gateway permission checks (#9597) ([e1b6eee](https://github.com/discordjs/discord.js/commit/e1b6eeed0e2e18f9900bc945c9f82d2d05f28a78))
+- Fix broken links to new documentation (#9563) ([d01e8aa](https://github.com/discordjs/discord.js/commit/d01e8aa8af00f5caacffe98caef3ead02e80a9bf))
+
+## Features
+
+- Add ws option support for "buildIdentifyThrottler" (#9728) ([6307f81](https://github.com/discordjs/discord.js/commit/6307f813854ed9dc76d2c4351bd69dd0490d0928))
+- **Client:** Add `guildAvailable` event (#9692) ([3c85fb2](https://github.com/discordjs/discord.js/commit/3c85fb21e62b30e75a7200b704e242c3a0adeda1))
+- User avatar decorations (#8914) ([8d97017](https://github.com/discordjs/discord.js/commit/8d9701745840e23854e8f0b057d21cb10e7d1d54))
+- Add silent option to ShardingManager (#9506) ([df40dcd](https://github.com/discordjs/discord.js/commit/df40dcdb850c398642ebc5cd6e4c48034280f464))
+- **EmbedBuilder:** Add `.length` (#8682) ([53c17e0](https://github.com/discordjs/discord.js/commit/53c17e00c0668c3d1497142dde7384c058c46c64))
+- Guild onboarding (#9120) ([dc73c93](https://github.com/discordjs/discord.js/commit/dc73c938ff9d04a0d7d57630faeb8e81ea343006))
+- Add resume event in shard (#9650) ([a73d54e](https://github.com/discordjs/discord.js/commit/a73d54e43a01719f683e8fd21714e85ffe737add))
+- **presence:** Re-introduce image resolving for other platforms (#9637) ([73c2f8a](https://github.com/discordjs/discord.js/commit/73c2f8aa17aac51b05382444148cb1f60081ee03))
+- Add message to send resume event to shard (#9626) ([a873ec1](https://github.com/discordjs/discord.js/commit/a873ec1e8511829ba95e85bbc9a4074e40c76086))
+- Support new username system (#9512) ([1ab60f9](https://github.com/discordjs/discord.js/commit/1ab60f9da4d6b7ea144fa05b97b029a4bfaeede2))
+- **GuildAuditLogsEntry#extra:** Add missing `channel` property (#9518) ([2272321](https://github.com/discordjs/discord.js/commit/227232112d1cd9f211e177996b7cdee2940f471e))
+
+## Performance
+
+- **Channel:** Linear speed position getter (#9497) ([09b0382](https://github.com/discordjs/discord.js/commit/09b0382c458ed0f3df5b8fa778c504b3e658ac49))
+- **Role:** Improve `members` getter (#9529) ([37181ab](https://github.com/discordjs/discord.js/commit/37181ab2322e48e17ff0d1040bcc510dc7c34e93))
+
+## Refactor
+
+- **User:** Remove deprecation warning from tag (#9660) ([cf8012c](https://github.com/discordjs/discord.js/commit/cf8012c20022aff184d7bce0ad436c136e428d9c))
+- **GuildMember:** Make `_roles` property non-enumerable (#9387) ([46167a7](https://github.com/discordjs/discord.js/commit/46167a79d7d0cac5599459a31c33b2bbcf6e06da))
+- **rest:** Switch api to fetch-like and provide strategies (#9416) ([cdaa0a3](https://github.com/discordjs/discord.js/commit/cdaa0a36f586459f1e5ede868c4250c7da90455c))
+
+## Typings
+
+- **MessageManager:** Allow comparison of messages again (#9612) ([a48d0ef](https://github.com/discordjs/discord.js/commit/a48d0efb09613eac6bf3c1bd996f58f5fff7667c))
+- **AutoModerationActionExecution:** Add forum channels as a possible type in `channel()` (#9623) ([d64330a](https://github.com/discordjs/discord.js/commit/d64330a1570b3a2047ef959a6bce268372c70e99))
+- **ModalSubmitFields:** Components is an array (#9406) ([1cab79f](https://github.com/discordjs/discord.js/commit/1cab79f6fde6f367141c9f7ed91bcb70ed2e5c17))
+- Use `readonly` arrays and `const` type parameters in places (#9641) ([cd69868](https://github.com/discordjs/discord.js/commit/cd6986854f4c2d143d2cd9b81d096738480dfa63))
+- **BaseInteraction:** `appPermissions` not `null` in guilds (#9601) ([6c2242f](https://github.com/discordjs/discord.js/commit/6c2242f4f970b1c75c243f74ae64f30ecbf8ba0d))
+
+# [14.11.0](https://github.com/discordjs/discord.js/compare/14.10.2...14.11.0) - (2023-05-06)
+
+## Bug Fixes
+
+- **WebSocketManager:** Properly emit shard error events (#9521) ([e627468](https://github.com/discordjs/discord.js/commit/e6274681fd10b0d75e1d3b448c94b50ec6810367))
+- **WebSocketManager:** Emit raw ws events again (#9502) ([c429763](https://github.com/discordjs/discord.js/commit/c429763be8e94f0f0cbc630e8bb1d415d46f1465))
+
+## Documentation
+
+- **Client:** Update Sapphire's snowflake utility links (#9501) ([1b7981e](https://github.com/discordjs/discord.js/commit/1b7981e4696b8ae74ceffa876fc0a9be7d0b9f93))
+
+## Features
+
+- **Guild:** Safety alerts channel and mention raid protection (#8959) ([6b2c3fb](https://github.com/discordjs/discord.js/commit/6b2c3fb9d0571de808e990cf064f73240ab93451))
+
+## Performance
+
+- **Role:** Linear speed position getter (#9493) ([8e9a2b4](https://github.com/discordjs/discord.js/commit/8e9a2b4630f78bb9e45345ec2a16812bfac70a20))
+
+## Refactor
+
+- **GuildChannel:** Simplify constructor (#9499) ([f2ad076](https://github.com/discordjs/discord.js/commit/f2ad0762c521422ab64e5b10344a6fd67961031b))
+
+## Typings
+
+- **StringSelectMenuComponentData:** `options` is required (#9515) ([d7b18f0](https://github.com/discordjs/discord.js/commit/d7b18f0681d4147ff192c98108c035d6d0f96cce))
+
+# [14.10.2](https://github.com/discordjs/discord.js/compare/14.10.1...14.10.2) - (2023-05-01)
+
+## Bug Fixes
+
+- Correct `isJSONEncodable()` import (#9495) ([201b002](https://github.com/discordjs/discord.js/commit/201b002ad405b845ace5f708077c1f157bb4126d))
+- **Client:** `generateInvite()` scope validation (#9492) ([b327f49](https://github.com/discordjs/discord.js/commit/b327f4925ff557e0aa8273d7f017aa616226ca06))
+
+# [14.10.1](https://github.com/discordjs/discord.js/compare/14.10.0...14.10.1) - (2023-05-01)
+
+## Bug Fixes
+
+- **Client:** Spelling of InvalidScopesWithPermissions ([ac9bf3a](https://github.com/discordjs/discord.js/commit/ac9bf3ac06ec78dbaca2ce4a82cceb0d82484211))
+
+## Refactor
+
+- **ShardClientUtil:** Logic de-duplication (#9491) ([a9f2bff](https://github.com/discordjs/discord.js/commit/a9f2bff82a18c6a3afdee99e5830e1d7b4da65dc))
+
+# [14.10.0](https://github.com/discordjs/discord.js/compare/14.9.0...14.10.0) - (2023-05-01)
+
+## Bug Fixes
+
+- **ShardClientUtil:** Fix client event names (#9474) ([ad217cc](https://github.com/discordjs/discord.js/commit/ad217cc7604dda6a33df73db82799fd5bb4e85a9))
+- **BaseClient:** Prevent user agent mutation (#9425) ([217e5d8](https://github.com/discordjs/discord.js/commit/217e5d81005a2506c96335f7fb96fa21d7dbb04c))
+- **BitField:** Use only enum names in iterating (#9357) ([40d07fb](https://github.com/discordjs/discord.js/commit/40d07fbbbd51d62793d9ea541f41f157b5dad224))
+- Use new permission name (#9274) ([d2d27ce](https://github.com/discordjs/discord.js/commit/d2d27ce7346bc37b34938c84bd3b106a4fa51f53))
+- **Message#editable:** Fix permissions check in locked threads (#9319) ([d4c1fec](https://github.com/discordjs/discord.js/commit/d4c1fecbe264bc52a70aaf0ec303d35e2f15bbcd))
+- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
+
+## Documentation
+
+- **AutoModerationRule:** Update docs (#9464) ([1b15d31](https://github.com/discordjs/discord.js/commit/1b15d31b5ae1b1739716fab00b18083c1d7d389a))
+- **APITypes:** Document role & user select menu components (#9435) ([c6ca5a8](https://github.com/discordjs/discord.js/commit/c6ca5a83e7b72613f95c2145606a1330f64ae894))
+- **BaseMessageOptions:** Fix embeds and components (#9437) ([5c52bb9](https://github.com/discordjs/discord.js/commit/5c52bb95906250518a8813820d543f43dd7abdf9))
+- **InteractionResponses:** ShowModal docs change (#9434) ([7d34100](https://github.com/discordjs/discord.js/commit/7d341000d44b762a2fe0434a6b518f7d63539d34))
+- Use ESM code in examples (#9427) ([ce287f2](https://github.com/discordjs/discord.js/commit/ce287f21d1540da7f17cac8a57dc33a67f391ef3))
+- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
+- **Options:** Fix links and invalid syntax (#9322) ([86e5f5a](https://github.com/discordjs/discord.js/commit/86e5f5a119c6d2588b988a33236d358ded357847))
+- Cleanup MessageCreateOptions and MessageReplyOptions (#9283) ([300059c](https://github.com/discordjs/discord.js/commit/300059cb266e6cca42c30ee7f997c48ab2cc565e))
+- **Events:** Document auto moderation events (#9342) ([79bcdfa](https://github.com/discordjs/discord.js/commit/79bcdfa767e7e842164e1174b6f4834ed731d329))
+- Add `SnowflakeUtil` (#9371) ([8ffcf77](https://github.com/discordjs/discord.js/commit/8ffcf77840b62590fcb4731380d28b22d0b98741))
+- Use stable tag (#9343) ([c0f2dd7](https://github.com/discordjs/discord.js/commit/c0f2dd713151a29c98e1eebad66721a208be1fc0))
+- Remove `JSONEncondable` (#9344) ([b2eec5f](https://github.com/discordjs/discord.js/commit/b2eec5f9fcf37ebb3b7f87a67a6ee3160c182183))
+
+## Features
+
+- **Attachment:** Voice messages (#9392) ([3e01f91](https://github.com/discordjs/discord.js/commit/3e01f91bbba2cbacacc6c921ed664752f679960b))
+- **BaseInteraction:** Support new channel payload (#9337) ([29389e3](https://github.com/discordjs/discord.js/commit/29389e39f479b832e54c7cb3ddd363aebe99674f))
+- **RoleTagData:** Add guildConnections (#9366) ([2dddbe1](https://github.com/discordjs/discord.js/commit/2dddbe1f321f2e2722dba4a28f7d18384cf50353))
+
+## Performance
+
+- **RoleManager:** Dont call Role#position getter twice per role (#9352) ([bfee6c8](https://github.com/discordjs/discord.js/commit/bfee6c8d889502ea39ad919dd9b1e6253a2af571))
+
+## Refactor
+
+- **WebSocketManager:** Use /ws package internally (#9099) ([a9e0de4](https://github.com/discordjs/discord.js/commit/a9e0de4288ea39a6a089b8379dcd44ac0053dac7))
+- Remove `fromInteraction` in internal channel creation (#9335) ([794abe8](https://github.com/discordjs/discord.js/commit/794abe8450bae000cd0544922cdf53e7b3e4c59c))
+
+## Typings
+
+- **AutoModerationActionMetadataOptions:** Make channel property optional (#9460) ([d26df5f](https://github.com/discordjs/discord.js/commit/d26df5fabaf227fb9d10ba5cc1ab326de55aadbc))
+- **CategoryChannel:** Ensure `parent` and `parentId` are `null` (#9327) ([8218ffc](https://github.com/discordjs/discord.js/commit/8218ffc78d23234b32c05a97fde2f4bea64d7aa6))
+- **GuildTextBasedChannel:** Remove unnecessary exclusion of forum channels (#9326) ([7ff3d52](https://github.com/discordjs/discord.js/commit/7ff3d528d942a0daa990194915ff8328dec99149))
+
+# [14.9.0](https://github.com/discordjs/discord.js/compare/14.8.0...14.9.0) - (2023-04-01)
+
+## Bug Fixes
+
+- Add support for new guild feature `GUILD_WEB_PAGE_VANITY_URL` (#9219) ([de1aac6](https://github.com/discordjs/discord.js/commit/de1aac674acb3830124646fcd52cdd98cdb71ba5))
+- Resolving string bitfield (#9262) ([7987565](https://github.com/discordjs/discord.js/commit/79875658cf4a8daa25210c2c620c73a710ca22de))
+- **AutocompleteInteraction:** Send `name_localizations` correctly (#9238) ([1864d37](https://github.com/discordjs/discord.js/commit/1864d37d36e53d127e74b6969a5f542193bfc3c7))
+- Keep symbols in actions manager (#9293) ([984bd55](https://github.com/discordjs/discord.js/commit/984bd55b437507e7ebfdf09ac944c8eba0340d27))
+- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b))
+- **ClientUser:** No mutation on edit (#9259) ([abd6ae9](https://github.com/discordjs/discord.js/commit/abd6ae9fc8ea03722e8b36e29c3fdc1c2cfc93e8))
+- **Message#editable:** Update editable check in threads locked (#9216) ([22e880a](https://github.com/discordjs/discord.js/commit/22e880aaa0d8c644fc8d16a524d17f4f53a056f6))
+- **ThreadManager:** Add `members` and conditionally include `hasMore` (#9164) ([e9a8eb3](https://github.com/discordjs/discord.js/commit/e9a8eb323f3a554dc8f9dab361cd1bac7b88e1cc))
+- **ThreadManager:** Respect `cache` and `force` in fetching (#9239) ([cc57563](https://github.com/discordjs/discord.js/commit/cc57563e73d78a0d71d1444d1ee8215a26a81fa8))
+- **TextBasedChannelTypes:** Add `GuildStageVoice` (#9232) ([51edba7](https://github.com/discordjs/discord.js/commit/51edba78bc4d4cb44b4dd2b79e4bbc515dc46f5b))
+
+## Documentation
+
+- Describe private properties (#8879) ([2792e48](https://github.com/discordjs/discord.js/commit/2792e48119f1cf5fa7d5e6b63369457b0719d4e4))
+- Differ `User#send` (#9251) ([384b4d1](https://github.com/discordjs/discord.js/commit/384b4d10e8642f0f280ea1651f33cd378c341333))
+- Fix compare position example (#9272) ([d16114c](https://github.com/discordjs/discord.js/commit/d16114c52646ca92c53f9b44a0dd10af98dbddcd))
+- **Role:** Fix example for `comparePositionTo()` (#9270) ([bc641fa](https://github.com/discordjs/discord.js/commit/bc641fa9360b851642bc51839cef6bd5600d71f7))
+- Add more examples (#9252) ([bf507ab](https://github.com/discordjs/discord.js/commit/bf507ab2659d95e2991e83293b3834f21283ff33))
+- **FetchArchivedThreadOptions:** `before` respects `archive_timestamp`, not creation timestamp (#9240) ([178c8dc](https://github.com/discordjs/discord.js/commit/178c8dcfeea1c4a6a32835baea389f25feefbac7))
+- Update `APISelectMenuComponent` (#9235) ([56cf138](https://github.com/discordjs/discord.js/commit/56cf138e029e7884a4e7efb606055687ca67b4ac))
+
+## Features
+
+- **Guild:** Add `max_stage_video_channel_users` (#8422) ([34bc36a](https://github.com/discordjs/discord.js/commit/34bc36ac4b04ad033d0dcc3d2701fcf2e682743c))
+- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b))
+- Add GuildBasedTextChannelTypes (#9234) ([5f93dcc](https://github.com/discordjs/discord.js/commit/5f93dcce466286f0fdead8faf4131e98d1c9db55))
+
+## Refactor
+
+- Call `GuildBanManager#create()` directly (#9263) ([f340f3b](https://github.com/discordjs/discord.js/commit/f340f3b1fd719e8f7cf6fa28a41835bc16039fc7))
+- **FetchThreadsOptions:** Remove `active` (#9241) ([519e163](https://github.com/discordjs/discord.js/commit/519e163f8aa3b55420f86d2d60c2584b3a2eb327))
+
+# [14.8.0](https://github.com/discordjs/discord.js/compare/14.7.1...14.8.0) - (2023-03-12)
+
+## Bug Fixes
+
+- **snowflake:** Snowflakes length (#9144) ([955e8fe](https://github.com/discordjs/discord.js/commit/955e8fe312c42ad4937cc1994d1d81e517c413c8))
+- **Actions:** Inject built data by using a symbol (#9203) ([a63ac88](https://github.com/discordjs/discord.js/commit/a63ac88fcca5b61209892a6e560e35d58f5adc3b))
+- **Message#deletable:** Add check for deletable message types (#9168) ([e78b8ad](https://github.com/discordjs/discord.js/commit/e78b8ad3fb6692cba2c565b508254c723f185f0c))
+- **Message:** `bulkDeletable` permissions should be retrieved later for DMs (#9146) ([a9495bd](https://github.com/discordjs/discord.js/commit/a9495bd8f014c8021a214b83ffc531a2af5defef))
+- **AutoModerationActionExecution:** Transform `action` (#9111) ([9156a28](https://github.com/discordjs/discord.js/commit/9156a2889cd0946dfd0b30a5f8365abfbc377b3d))
+- **MessageReaction:** `toJSON()` infinite recursion (#9070) ([f268e1d](https://github.com/discordjs/discord.js/commit/f268e1d9798744e169ae87089ea2e1f214364d95))
+- **ThreadChannel:** Insert starter message from threads created in forum channels (#9100) ([0b76ab4](https://github.com/discordjs/discord.js/commit/0b76ab4c403dd646c71482856ab993b263b7c474))
+- **ApplicationRoleConnectionMetadata:** Export the class correctly (#9076) ([071516c](https://github.com/discordjs/discord.js/commit/071516c35239bd4e1cae572c855d86b335c8536d))
+- Don't auth for interaction `showModal()` (#9046) ([b803a9a](https://github.com/discordjs/discord.js/commit/b803a9a899aaa75a3ea2bc6623c6afb28f495e8c))
+- **WebSocketShard:** Zombie connection fix (#8989) ([876b181](https://github.com/discordjs/discord.js/commit/876b1813128ec702d3ef1e7b0074a4613e88c332))
+- Keep other properties in triggerMetadata (#8977) ([d8dd197](https://github.com/discordjs/discord.js/commit/d8dd197a936dfffc05f9e5bc3184ec9022c56b51))
+- **escapeX:** Emojis with underlines (#8945) ([07b597d](https://github.com/discordjs/discord.js/commit/07b597df16b9412c23ec2387d54564e4d1bcf7ed))
+- **WebSocketShard:** Either start close timeout or emit destroyed but never both (#8956) ([43ce2a5](https://github.com/discordjs/discord.js/commit/43ce2a572eb8977b6994680171ac0c5f9bda1703))
+- **DMChannel:** `recipientId` edge case (#8950) ([7ce9909](https://github.com/discordjs/discord.js/commit/7ce990954e2f73d7a996df0afa42ab287cb12514))
+- Return only boolean for `disabled` (#8965) ([6614603](https://github.com/discordjs/discord.js/commit/66146033268a4db1279b2eaee4bd418f326c0d4b))
+- Export missing `escapeX()` functions (#8944) ([25c27ea](https://github.com/discordjs/discord.js/commit/25c27eac1417e75c9b601b17cf177b1f47b699a9))
+- **WebSocketShard:** Only cleanup the connection if a connection still exists (#8946) ([5eab5fc](https://github.com/discordjs/discord.js/commit/5eab5fc06ca6be36ecf1557f2ad29a670d4d5ae7))
+- Add `@discordjs/formatters` to dependency list (#8939) ([18b3a19](https://github.com/discordjs/discord.js/commit/18b3a19810a6436fa8bb4b490ec5137eaecbd465))
+- **resolveColor:** Invalid colors (#8933) ([c76e170](https://github.com/discordjs/discord.js/commit/c76e17078602914c3e1d227a3acc98eaa99c18d4))
+- **WebSocketShard:** Clear listeners on reconnect (#8927) ([aa8c57d](https://github.com/discordjs/discord.js/commit/aa8c57dab60104549e28451abf35c0387595d67e))
+- Re-export formatters (#8909) ([b14604a](https://github.com/discordjs/discord.js/commit/b14604abdecca575b1fca693c1593e3585bcca8c))
+
+## Documentation
+
+- **MessageManager:** Add clarification to fetch messages (#9222) ([f5ec1ca](https://github.com/discordjs/discord.js/commit/f5ec1cada5ebf0ca4093bdfc81aaf56900c794ef))
+- Make interactionResponse as optional (#9179) ([664cccb](https://github.com/discordjs/discord.js/commit/664cccb2706db33635aa2556954de57f93b3d3db))
+- Fix typos (#9127) ([1ba1f23](https://github.com/discordjs/discord.js/commit/1ba1f238f04221ec890fc921678909b5b7d92c26))
+- **chatInputApplicationCommandMention:** Parameters are not nullable (#9091) ([6f78e82](https://github.com/discordjs/discord.js/commit/6f78e8285b3ce762de010e68d49b377a47dc5a63))
+- No `@type` description and reveal info block (#9097) ([405f940](https://github.com/discordjs/discord.js/commit/405f9400e8e3ffea9f3847ab5abb431a34538a96))
+- **ThreadEditOptions:** Move info tag back to `invitable` (#9020) ([f3fe3ce](https://github.com/discordjs/discord.js/commit/f3fe3ced622676b406a62b43f085aedde7a621aa))
+- Fix a typo in the MentionableSelectMenuInteraction link (#9000) ([6d7a143](https://github.com/discordjs/discord.js/commit/6d7a143667f33ef2ea45d8016ac4738237707881))
+- **ApplicationRoleConnectionMetadata:** Add documentation (#8976) ([2e22b31](https://github.com/discordjs/discord.js/commit/2e22b31892d9b858fcb24fa580b486b4154e823f))
+- Fix malformed overridden documentation (#8954) ([0b8b114](https://github.com/discordjs/discord.js/commit/0b8b114761f961a2bf8e5aae342ed711b154a89e))
+- **GuildForumThreadManager:** Fix `sticker` type (#8940) ([dd62be0](https://github.com/discordjs/discord.js/commit/dd62be077d3e4fbd73a0c10ca344d93d3d19fa38))
+- Fix deprecated links (#8907) ([976b234](https://github.com/discordjs/discord.js/commit/976b234e9dc9999e5dee47b58c85afbc1cd494c2))
+- **UserFlagsBitField:** Make `.Flags` static (#8902) ([c48ff5e](https://github.com/discordjs/discord.js/commit/c48ff5e4205899e3b6cd35812ca857236bef6864))
+
+## Features
+
+- **Collector:** Add lastCollectedTimestamp (#9044) ([4458a13](https://github.com/discordjs/discord.js/commit/4458a13925164762b519ded1037ae8775d879f71))
+- **StageChannel:** Add messages (#9134) ([ffdb197](https://github.com/discordjs/discord.js/commit/ffdb197f988657100e2a9ff0ca17b759339a1dda))
+- **AutoModerationActionExecution:** Add `channel`, `user` and `member` getters (#9142) ([095bd77](https://github.com/discordjs/discord.js/commit/095bd77515aa31bb0e95a350b4355980fea9268d))
+- **AutoModeration:** Support `custom_message` (#9171) ([c1000b8](https://github.com/discordjs/discord.js/commit/c1000b86ed6d5413afcd6ee7e80505e5a845430b))
+- **ThreadMemberManager:** Support pagination fetching (#9035) ([765d5a3](https://github.com/discordjs/discord.js/commit/765d5a3b2d5529c3a2a4b29512f6932264443ed1))
+- **InteractionResponse:** Add new methods (#9132) ([dc9924f](https://github.com/discordjs/discord.js/commit/dc9924fb5f24c8dac963d6b86ba279a89545e73b))
+- **GuildMember:** Add `flags` (#9087) ([76b2116](https://github.com/discordjs/discord.js/commit/76b21162aca7cd4897826437da3063524e1e7553))
+- **Client:** `guildAuditLogEntryCreate` event (#9058) ([9439107](https://github.com/discordjs/discord.js/commit/9439107a1d6a9b77b5f991973d96bc6100da4753))
+- Add role subscription data (#9025) ([1ba22f4](https://github.com/discordjs/discord.js/commit/1ba22f4c9e4173f8866339d3eadb2939d4b32034))
+- **Sticker:** Add support for gif stickers (#9038) ([6a9875d](https://github.com/discordjs/discord.js/commit/6a9875da054a875a4711394547d47439bbe66fb6))
+- **GuildAuditLogs:** Support `after` (#9011) ([0076589](https://github.com/discordjs/discord.js/commit/0076589ccc93e09d77a448874d1ceff5d0e91aa2))
+- Add role subscriptions (#8915) ([3407e1e](https://github.com/discordjs/discord.js/commit/3407e1eea3c8d5629465553f342ac30ceae27a47))
+- Add `not_found` to guild member chunk data (#8975) ([be294ea](https://github.com/discordjs/discord.js/commit/be294eaf9901ea139ce485deeec9178959ffa91f))
+- **ClientApplication:** Add role connections (#8855) ([22e2bbb](https://github.com/discordjs/discord.js/commit/22e2bbb0d24e3f30516f262308d5786f2f666713))
+- **CommandInteractionOptionResolver:** Add `channelTypes` option to `getChannel` (#8934) ([429dbcc](https://github.com/discordjs/discord.js/commit/429dbccc85cabd9986b2e8bf443bf384e4ddc61a))
+- **ForumChannel:** Add `defaultForumLayout` (#8895) ([cbafd47](https://github.com/discordjs/discord.js/commit/cbafd479b331633ed97f7b1a22ef03c6a2f4cf31))
+- Add support for nsfw commands (#7976) ([7a51344](https://github.com/discordjs/discord.js/commit/7a5134459c5f06864bf74631d83b96d9c21b72d8))
+- **InteractionResponse:** CreatedTimestamp (#8917) ([627511d](https://github.com/discordjs/discord.js/commit/627511d6522f772b84c25e6a3f6da06b06bb912e))
+- **Guild:** Add disableInvites method (#8801) ([45faa19](https://github.com/discordjs/discord.js/commit/45faa199820e7c4ccdb2997c7e3b353f566d2312))
+
+## Refactor
+
+- Compare with `undefined` directly (#9191) ([869153c](https://github.com/discordjs/discord.js/commit/869153c3fdf155783e7c0ecebd3627b087c3a026))
+- **GuildMemberManager:** Tidy up fetching guild members (#8972) ([4e0e125](https://github.com/discordjs/discord.js/commit/4e0e1250399aa12c340ac92a86ec2c05704fe2bb))
+- **BitField:** Reverse iterator/toArray responsibilities (#9118) ([f70df91](https://github.com/discordjs/discord.js/commit/f70df910ed12e397066d0bdb27343af21ead4d92))
+- Moved the escapeX functions from discord.js to @discord.js/formatters (#8957) ([13ce78a](https://github.com/discordjs/discord.js/commit/13ce78af6e3aedc793f53a099a6a615df44311f7))
+- Use `deprecate()` directly (#9026) ([1c871b5](https://github.com/discordjs/discord.js/commit/1c871b5b576dddef12c5afacecf416dbd6243dea))
+- **Guild:** Destructure object in guild editing (#8971) ([d3e9f2a](https://github.com/discordjs/discord.js/commit/d3e9f2a355a1f5272d62a507eb6ecd8808904fff))
+- **GuildManager:** Better handling of creation code (#8974) ([d7a09f6](https://github.com/discordjs/discord.js/commit/d7a09f6fcee30c31b4418166bf7bf9e894841f87))
+- **sharding:** Use switch statement (#8928) ([6540914](https://github.com/discordjs/discord.js/commit/6540914b4a7f244f5e40fe2a3b7e73986763d81b))
+- Use consistent naming for options (#8901) ([a7b55c1](https://github.com/discordjs/discord.js/commit/a7b55c1460cf63fb482f7d05657120eec96bee82))
+- **CommandInteractionOptionResolver:** Loosen mentionable checks (#8910) ([1b151db](https://github.com/discordjs/discord.js/commit/1b151db59c4340417f8a28a88064f45336ac8c78))
+
+## Styling
+
+- Run prettier (#9041) ([2798ba1](https://github.com/discordjs/discord.js/commit/2798ba1eb3d734f0cf2eeccd2e16cfba6804873b))
+
+## Typings
+
+- Allow sending messages with `SuppressNotifications` flag (#9177) ([71a427f](https://github.com/discordjs/discord.js/commit/71a427f6322be76fe2d1cb265de09f171b1b354a))
+- Remove `EscapeMarkdownOptions` (#9153) ([fd0246c](https://github.com/discordjs/discord.js/commit/fd0246ca4c75e60d8e117d9ac5af7067c7a63277))
+- **Attachment:** Make `attachment` private (#8982) ([da23cd5](https://github.com/discordjs/discord.js/commit/da23cd5d69de4856d075f00738f75c68c555ae5b))
+- Fix type of Attachment#name (#9101) ([4e0a89f](https://github.com/discordjs/discord.js/commit/4e0a89f58f43f362bfde80d8319dce767c62850f))
+- Allow builders to set channel types in discord.js (#8990) ([7dec892](https://github.com/discordjs/discord.js/commit/7dec892218f7b470a5f8e78732a524a53da24d26))
+- Swap message reaction and emoji identifier types (#8969) ([ad49845](https://github.com/discordjs/discord.js/commit/ad4984526020f2baeefaeeebbded66c6848c4b85))
+- **widget:** Add missing `name` (#8978) ([898b5ac](https://github.com/discordjs/discord.js/commit/898b5ac416cbbb415b125bb27221d0901fdd180e))
+- Use StringSelectMenuOptionBuilder (#8949) ([bec51de](https://github.com/discordjs/discord.js/commit/bec51de1038c35c6edaaa13934781758fe1951de))
+- Fix actions type in automod (#8962) ([5915f39](https://github.com/discordjs/discord.js/commit/5915f39810b712c05a46fa21ab4e12b4cfa3c25a))
+- Subcommand group `options` is required (#8966) ([5dc5e90](https://github.com/discordjs/discord.js/commit/5dc5e902688fc563087cd5061dcb59dd68fd4eda))
+- Add generic to `ActionRowBuilder.from()` (#8414) ([153352a](https://github.com/discordjs/discord.js/commit/153352ad7a1ccb4a9461523cf2597d81df93b69c))
+
+# [14.7.1](https://github.com/discordjs/discord.js/compare/14.7.0...14.7.1) - (2022-12-01)
+
+## Bug Fixes
+
+- Prevent crash on no select menu option (#8881) ([11d195d](https://github.com/discordjs/discord.js/commit/11d195d04ff57d51adb0f0d3a0a7342f9e34aba0))
+
+# [14.7.0](https://github.com/discordjs/discord.js/compare/14.6.0...14.7.0) - (2022-11-28)
+
+## Bug Fixes
+
+- **MessageMentions:** Add `InGuild` generic (#8828) ([f982803](https://github.com/discordjs/discord.js/commit/f9828034cd21e6f702762a46923e0f42115596f6))
+- **Activity:** Fix equals() not checking for differing emoji (#8841) ([7e06f68](https://github.com/discordjs/discord.js/commit/7e06f68185423ba7cb310220b213f445b6571e29))
+- Fixed react/astro/guide/discord.js build, updated dependencies, fix crawlvatar (#8861) ([d0c8256](https://github.com/discordjs/discord.js/commit/d0c82561b8a1765a1daa362ca903f3ffb3fa33ee))
+- **escapeMarkdown:** Fix double escaping (#8798) ([d6873b7](https://github.com/discordjs/discord.js/commit/d6873b7159352479475b3a0daa215bddbdd3a79b))
+- **Transfomers:** Call `.toJSON` in `toSnakeCase` (#8790) ([017f9b1](https://github.com/discordjs/discord.js/commit/017f9b1ed4014dc1db0b78c1a77e463b4403de5d))
+- Censor token in debug output (#8764) ([53d8e87](https://github.com/discordjs/discord.js/commit/53d8e87d7f3a329608250656950bd0a200adb1c7))
+- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4))
+
+## Documentation
+
+- Describe InteractionEditReplyOptions (#8840) ([cb77fd0](https://github.com/discordjs/discord.js/commit/cb77fd02d083438de2aff6f0769baf7d1797bc65))
+- **AutoModerationRuleManager:** Describe cache (#8848) ([d275480](https://github.com/discordjs/discord.js/commit/d2754802cc3479e6288cdbfcd48c76bf57e09a07))
+- Fix message action row components (#8819) ([65bc0ad](https://github.com/discordjs/discord.js/commit/65bc0adbf4d7870d33b92585ca18f964f24bc84e))
+- Specify `ActionRowBuilder` for `components` (#8834) ([8ed5c1b](https://github.com/discordjs/discord.js/commit/8ed5c1beb622f71ce0bd89e4cbeff50e464da8fe))
+- Add `@extends` for select menu classes (#8824) ([09f65b7](https://github.com/discordjs/discord.js/commit/09f65b724b0d2f36bbe89b83570c0d18093b5126))
+- Make WebSocketShard.lastPingTimestamp public (#8768) ([68c9cb3](https://github.com/discordjs/discord.js/commit/68c9cb37bc3df6326b720291827ea477e421faf2))
+- **MessageReplyOptions:** Remove duplicate stickers field (#8766) ([6e348ff](https://github.com/discordjs/discord.js/commit/6e348ffd1d8db8d8ad2da7823460814695e01a43))
+
+## Features
+
+- **Webhook:** Add `channel` property (#8812) ([decbce4](https://github.com/discordjs/discord.js/commit/decbce401062af75f633e6acacc88207b115a719))
+- Auto Moderation (#7938) ([fd4ba5e](https://github.com/discordjs/discord.js/commit/fd4ba5eaba66898699127fc0d5f0ab52c18e3db0))
+- **SelectMenuInteractions:** Add `values` property (#8805) ([b2fabd1](https://github.com/discordjs/discord.js/commit/b2fabd130a76ea54cfbfa1b871ef8659513c2c7a))
+- **ThreadChannel:** Add a helper for pin and unpin (#8786) ([e74aa7f](https://github.com/discordjs/discord.js/commit/e74aa7f6b0fe04e3473fc4a62a73a7db87307685))
+- Add `Message#bulkDeletable` (#8760) ([ff85481](https://github.com/discordjs/discord.js/commit/ff85481d3e7cd6f7c5e38edbe43b27b104e82fba))
+- New select menus (#8793) ([5152abf](https://github.com/discordjs/discord.js/commit/5152abf7285581abf7689e9050fdc56c4abb1e2b))
+- **InteractionResponses:** Add message parameter (#8773) ([8b400ca](https://github.com/discordjs/discord.js/commit/8b400ca975c6bad00060b9c67068f42bd53524ba))
+- Support resume urls (#8784) ([88cd9d9](https://github.com/discordjs/discord.js/commit/88cd9d906074eb79e85df0ef49287f11133d2e0d))
+- Allow deletion of ephemeral messages (#8774) ([fc10774](https://github.com/discordjs/discord.js/commit/fc107744618857bf28c2167f204253baf690ede8))
+- **GuildChannelManager:** Add `.addFollower()` method (#8567) ([caeb1cb](https://github.com/discordjs/discord.js/commit/caeb1cbfdb2f2f007252c4d7e9f47a575c24bcb5))
+
+## Refactor
+
+- **Embed:** Use `embedLength` function from builders (#8735) ([cb3826c](https://github.com/discordjs/discord.js/commit/cb3826ce6dbcd3cf7ab639af6cdfcea80336aa1d))
+
+# [14.6.0](https://github.com/discordjs/discord.js/compare/14.5.0...14.6.0) - (2022-10-10)
+
+## Bug Fixes
+
+- **ClientOptions:** Make `ClientOptions#intents` returns an IntentsBitField (#8617) ([4c2955a](https://github.com/discordjs/discord.js/commit/4c2955a5de6779c29c09e63ba9ad2b235904f842))
+- Correctly construct a builder (#8727) ([e548e6a](https://github.com/discordjs/discord.js/commit/e548e6a10b7e1720f5e8f3c859b0b64d5134a012))
+- **Components:** Error with unknown components (#8724) ([6fd331d](https://github.com/discordjs/discord.js/commit/6fd331dd528e78fd023c908bd58af3faa9ed6c65))
+- **Client:** Don't auth for webhook fetches with token (#8709) ([01d75c8](https://github.com/discordjs/discord.js/commit/01d75c8b8b14f33c95a4da83a8494db848beeb8c))
+- Re-export util (#8699) ([a306219](https://github.com/discordjs/discord.js/commit/a306219673335584accd2ff77ab34d2812ef6c5d))
+- Throw discord.js errors correctly (#8697) ([ace974f](https://github.com/discordjs/discord.js/commit/ace974fc1fdbc5bcaa0d7f6f6d17de185c9f9cbf))
+
+## Documentation
+
+- **Utils:** Remove `private` from `parseEmoji` (#8718) ([a31e605](https://github.com/discordjs/discord.js/commit/a31e605e09064a300e31a3c91466b613654ba98e))
+- Update UserContextMenuCommandInteraction documentation (#8717) ([7556db2](https://github.com/discordjs/discord.js/commit/7556db243d9480949835668fcb5724fdd5d70e08))
+- Fix `AwaitMessageComponentOptions` typedef (#8696) ([9effd82](https://github.com/discordjs/discord.js/commit/9effd82abe82ba71ae627673da21ba07e1ede23e))
+
+## Features
+
+- **Util:** Escape more markdown characters (#8701) ([7b8966b](https://github.com/discordjs/discord.js/commit/7b8966bca156db79933403289741893a6e10ccd5))
+- **GuildChannelManager:** Allow creating channels with a default auto archive duration (#8693) ([628759b](https://github.com/discordjs/discord.js/commit/628759bcff8b0d4c77926cee2b8c18d8fdb4c260))
+- Add `@discordjs/util` (#8591) ([b2ec865](https://github.com/discordjs/discord.js/commit/b2ec865765bf94181473864a627fb63ea8173fd3))
+- **ForumChannel:** Add `defaultSortOrder` (#8633) ([883f6e9](https://github.com/discordjs/discord.js/commit/883f6e9202a559c986f4b15fccb422b5aea7bea8))
+
+## Refactor
+
+- Rename Error to DiscordjsError internally (#8706) ([aec44a0](https://github.com/discordjs/discord.js/commit/aec44a0c93f620b22242f35e626d817e831fc8cb))
+
+## Typings
+
+- Fix events augmentation (#8681) ([ac83ada](https://github.com/discordjs/discord.js/commit/ac83ada306ec153c13260d2bd53e4d704884b68a))
+- **Message:** Remove `& this` from `#inGuild` typeguard (#8704) ([c0f7a1a](https://github.com/discordjs/discord.js/commit/c0f7a1a89a4cf62edc7065bd200b2ce4018e0a27))
+- **ModalBuilder:** Fix constructor typings (#8690) ([2ea2a85](https://github.com/discordjs/discord.js/commit/2ea2a85e6335d57f44689f9b6e284129104de8fc))
+
+# [14.5.0](https://github.com/discordjs/discord.js/compare/14.4.0...14.5.0) - (2022-09-25)
+
+## Bug Fixes
+
+- **ThreadChannel:** Add forum channel to parent (#8664) ([0126d9b](https://github.com/discordjs/discord.js/commit/0126d9b810a156c4bf1b8b93f2121f3319855bac))
+- **GuildChannelManager:** Allow creating webhooks on forums (#8661) ([16fcdc3](https://github.com/discordjs/discord.js/commit/16fcdc36877d1a65ce9995c9fe3502aa268c9388))
+- **ForumChannel:** Implement missing properties and methods (#8662) ([8622939](https://github.com/discordjs/discord.js/commit/862293922924f453f69b0b0f8efe87ddebbd387d))
+- RepliableInteraction respect cached generic (#8667) ([578bc95](https://github.com/discordjs/discord.js/commit/578bc951bdcdc21ec5aee86e7a47a17e8c867dfc))
+- **ThreadChannel:** Allow editing flags (#8671) ([1244854](https://github.com/discordjs/discord.js/commit/1244854e1365d7e4a8d01703a7ec13610ed100c7))
+- **GuildChannelManager:** Typo in `flags` property name when editing (#8669) ([fc8ed81](https://github.com/discordjs/discord.js/commit/fc8ed816e643754a938211a17b41a2cec95df265))
+
+## Documentation
+
+- Fix duplicate typedefs (#8677) ([d79aa2d](https://github.com/discordjs/discord.js/commit/d79aa2d0d0b186bd28cbfc82f3d6ecf3deb41c50))
+- **ForumChannel:** Add `@implements` (#8678) ([8ca407e](https://github.com/discordjs/discord.js/commit/8ca407e089c3050b61a51a52b9100e4613ad1666))
+
+## Features
+
+- **GuildChannelManager:** Allow editing `flags` (#8637) ([abb7226](https://github.com/discordjs/discord.js/commit/abb7226af3445f5b724815bb2f7a121a52a563b5))
+
+## Refactor
+
+- **GuildBanManager:** Add deprecation warning for `deleteMessageDays` (#8659) ([e993122](https://github.com/discordjs/discord.js/commit/e9931229ae62a120ae0761ee2a2c10ea0cb1a6fb))
+
+## Typings
+
+- **GuildChannelManager:** Handle forum channel overload (#8660) ([1486bc9](https://github.com/discordjs/discord.js/commit/1486bc9336369d229972df5e28b9428365b92bff))
+- **Caches:** Allow `GuildForumThreadManager` and `GuildTextThreadManager` (#8665) ([2487e3b](https://github.com/discordjs/discord.js/commit/2487e3bf76260a4a2fbf375e0b01a43f347922a3))
+
+# [14.4.0](https://github.com/discordjs/discord.js/compare/14.3.0...14.4.0) - (2022-09-21)
+
+## Bug Fixes
+
+- Correct applied tags type (#8641) ([f6f15d8](https://github.com/discordjs/discord.js/commit/f6f15d8e877d4ffbe908a093e64809ef9015e0ff))
+- **ThreadChannel:** Make `fetchStarterMessage()` work in forum posts (#8638) ([a7f816e](https://github.com/discordjs/discord.js/commit/a7f816eeb7fa1e193cf0901efbdcaf629f72465f))
+- Update `messageCount`/`totalMessageSent` on message events (#8635) ([145eb2f](https://github.com/discordjs/discord.js/commit/145eb2fc5db5ca739aa9782d5ec5210f81a6aeeb))
+- Footer / sidebar / deprecation alert ([ba3e0ed](https://github.com/discordjs/discord.js/commit/ba3e0ed348258fe8e51eefb4aa7379a1230616a9))
+
+## Documentation
+
+- Correctly overwrite `setRTCRegion` method (#8642) ([f049734](https://github.com/discordjs/discord.js/commit/f0497343f1193635b260b9e2085cac7b43991f74))
+- **GuildTextThreadManager:** Document correct `@extend` (#8639) ([802b239](https://github.com/discordjs/discord.js/commit/802b2394b08151faab6810695fd5c8f27ce84d58))
+- Fix regexps incorrectly being called global (#8624) ([fc9653f](https://github.com/discordjs/discord.js/commit/fc9653f5aea4013da15fb8de0a4452400eaa7739))
+- Update misleading `Client#guildMemberAvailable` event description (#8626) ([22ac6b4](https://github.com/discordjs/discord.js/commit/22ac6b4660db6b02f62b9851e9e3bcfe5fb506b5))
+- **Options:** Update DefaultMakeCacheSettings (#8585) ([3252332](https://github.com/discordjs/discord.js/commit/32523325c6610e95fe3ffcc31d005b3418c6bc68))
+- Change name (#8604) ([dd5a089](https://github.com/discordjs/discord.js/commit/dd5a08944c258a847fc4377f1d5e953264ab47d0))
+
+## Features
+
+- **Widget:** Allow forum channels (#8645) ([b106956](https://github.com/discordjs/discord.js/commit/b1069563086fc616fe21abb789f28f69e57c8851))
+- **WelcomeChannel:** Add forum channel as a type (#8643) ([6f1f465](https://github.com/discordjs/discord.js/commit/6f1f465a77e362e20ec50067be0e634d35946ba5))
+- Allow forum channels in webhook update event (#8646) ([5048a3d](https://github.com/discordjs/discord.js/commit/5048a3d17ace22336e74451d30b513b3db42a26f))
+- Add support for guild forums (#7791) ([8a8d519](https://github.com/discordjs/discord.js/commit/8a8d519c9c4c082370fc6935b56dafb525b873df))
+- **GuildBanManager#create:** Add `deleteMessageSeconds` (#8326) ([03fb5b0](https://github.com/discordjs/discord.js/commit/03fb5b0a2f45275dec7885175ad691a1d9c449c4))
+- Add typeguard to BaseInteraction#isRepliable (#8565) ([55c3ee2](https://github.com/discordjs/discord.js/commit/55c3ee20ae700e78d18a3c4c04b6a7426cffc060))
+- **Integration:** Add `scopes` (#8483) ([8b3d006](https://github.com/discordjs/discord.js/commit/8b3d0061180cfd5d9ba8beae3e8d623b5ce43ea4))
+- Add `chatInputApplicationCommandMention` formatter (#8546) ([d08a57c](https://github.com/discordjs/discord.js/commit/d08a57cadd9d69a734077cc1902d931ab10336db))
+
+## Refactor
+
+- Replace usage of deprecated `ChannelType`s (#8625) ([669c3cd](https://github.com/discordjs/discord.js/commit/669c3cd2566eac68ef38ab522dd6378ba761e8b3))
+- Split message send/edit types/documentation (#8590) ([8e1afae](https://github.com/discordjs/discord.js/commit/8e1afaebdb686033555ca58e53f34bb97f7369c8))
+- Website components (#8600) ([c334157](https://github.com/discordjs/discord.js/commit/c3341570d983aea9ecc419979d5a01de658c9d67))
+
+## Typings
+
+- Narrow channel type in thread managers (#8640) ([14bbc91](https://github.com/discordjs/discord.js/commit/14bbc9150a748e7ac1660c2375c7f065fcc55a6c))
+- **interactions:** Pass `Cached` type to return type of methods (#8619) ([053da5b](https://github.com/discordjs/discord.js/commit/053da5bc91d5cfa8d842b13b0b05083d2f7f086d))
+- Ensure events possess `Client<true>` (#8612) ([a9f003a](https://github.com/discordjs/discord.js/commit/a9f003ac9b56d31166cbf353d02140dad0b2517e))
+- **GuildChannelManager:** Correct `fetch` return type (#8549) ([1d4cdee](https://github.com/discordjs/discord.js/commit/1d4cdee321ab25bb0f109d55a000582825dd79f9))
+- **ThreadChannel:** `fetchStarterMessage` must return a `Message<true>` (#8560) ([b9c62ac](https://github.com/discordjs/discord.js/commit/b9c62ac0f0f534c33f9913135095f8b3d98ec05e))
+- **webhook:** Avatar can be null (#8541) ([f77612a](https://github.com/discordjs/discord.js/commit/f77612a55e9c593a21bc27e58c9fbd03d85787e3))
+
+# [14.3.0](https://github.com/discordjs/discord.js/compare/14.2.0...14.3.0) - (2022-08-22)
+
+## Bug Fixes
+
+- **GuildMemberManager:** `add()` method throws an error (#8539) ([3bef901](https://github.com/discordjs/discord.js/commit/3bef9018c0be3c5dc51d03b796d08b925dc4e1b9))
+- **Guild:** Widget channel types and fixes (#8530) ([23a0b6c](https://github.com/discordjs/discord.js/commit/23a0b6ccf27410963bd4f5c53d9ee2ce019e90a8))
+- **Embed:** Reference video in video (#8473) ([c97977a](https://github.com/discordjs/discord.js/commit/c97977a3e806bd5d8682bc7fb22ebec1a8ceecdc))
+
+## Documentation
+
+- **GuildAuditLogsEntry:** Correct `action` wording (#8499) ([7d25072](https://github.com/discordjs/discord.js/commit/7d2507279cc9d1397c7d61e7c7b856ff4bc17c86))
+
+## Features
+
+- **GuildMemberManager:** AddRole and removeRole (#8510) ([cda3f00](https://github.com/discordjs/discord.js/commit/cda3f005b1546fdb8410e9550526956f840857fc))
+- Deprecate `ActionRow.from()` (#8504) ([f9c25dd](https://github.com/discordjs/discord.js/commit/f9c25ddcfe68f089e13f1090c3df4bd7cd74d2b7))
+- **WebSocketShard:** Support new resume url (#8480) ([bc06cc6](https://github.com/discordjs/discord.js/commit/bc06cc638d2f57ab5c600e8cdb6afc8eb2180166))
+
+## Refactor
+
+- **GuildAuditLogsEntry:** Remove `guild` from application command permission update extra (#8520) ([2b8074d](https://github.com/discordjs/discord.js/commit/2b8074dd12f2f1e957caffb57e5fd4d7be88dc25))
+
+## Typings
+
+- Inference of guild in `MessageManager` (#8538) ([6bb1474](https://github.com/discordjs/discord.js/commit/6bb1474d2001b76773954c959b2c2687e1df0136))
+- Allow choice's value type to be strictly inferred (#8529) ([b3f7c32](https://github.com/discordjs/discord.js/commit/b3f7c32f7f91f12766178f5e17585856e81d9a87))
+- **GuildAuditLogs:** Allow fetching to return all possible values (#8522) ([0dba8ad](https://github.com/discordjs/discord.js/commit/0dba8adbd2e6efd634bd3eb31df09467ba8a8a0d))
+- Correct `EventEmitter.on (static)` return type (#8524) ([16bbc8a](https://github.com/discordjs/discord.js/commit/16bbc8aa208a8a16c22be24696f57d5f7a5faf2b))
+- **GuildAuditLogs:** Remove static `Entry` (#8521) ([7a3d18d](https://github.com/discordjs/discord.js/commit/7a3d18dd6d1fe27393d00019b9ecd35c98b95ee7))
+- Disallow some channel types from webhook creation (#8531) ([4882b17](https://github.com/discordjs/discord.js/commit/4882b17a77484f801faa19fb971f2e6abd88e59f))
+- Implement max/min values for autocomplete (#8498) ([812f7f1](https://github.com/discordjs/discord.js/commit/812f7f1ea86fc953aa796875cbc7ccc434203d77))
+- **ModalMessageModalSubmitInteraction:** ChannelId is not nullable (#8496) ([c31a5cf](https://github.com/discordjs/discord.js/commit/c31a5cfcc82706667768eac77b5f99ba69cf3c91))
+- Change type of ApplicationCommandSubCommand.options (#8476) ([ebaf158](https://github.com/discordjs/discord.js/commit/ebaf158006d3c7db3b8c695e7c027b8af11999ba))
+
+# [14.2.0](https://github.com/discordjs/discord.js/compare/14.1.2...14.2.0) - (2022-08-10)
+
+## Bug Fixes
+
+- **ThreadChannel:** Handle possibly `null` parent (#8466) ([afa27b1](https://github.com/discordjs/discord.js/commit/afa27b15c5b92bc8d55b8285834d8e03f6692d06))
+- Remove DM channels from `Client#messageDeleteBulk`'s types (#8460) ([6c6fe74](https://github.com/discordjs/discord.js/commit/6c6fe74dd84859c5319efa999404e8168f189710))
+- **Transformers:** Do not transform `Date` objects (#8463) ([0e2a095](https://github.com/discordjs/discord.js/commit/0e2a09571c8e5ee61153b04e45334a226a1b4534))
+- **ModalSubmitInteraction:** Allow deferUpdate (#8455) ([0fab869](https://github.com/discordjs/discord.js/commit/0fab869e5179dca7ddec75b5519615278e51ad82))
+- **Guild:** Unable to fetch templates (#8420) ([aac8acc](https://github.com/discordjs/discord.js/commit/aac8acc22be7d7af99933ef099eca7deda43cb40))
+- **MessageMentions:** Infinite loop in `parsedUsers` getter (#8430) ([b8a3136](https://github.com/discordjs/discord.js/commit/b8a31360a220e3d796f5381bd215d30a379ecb7c))
+- **DataResolver:** Make `Buffer` from string (#8416) ([e72b986](https://github.com/discordjs/discord.js/commit/e72b986939e2958547c0e54d6d27472c8d111609))
+
+## Documentation
+
+- Change registration example to use global commands (#8454) ([64a4041](https://github.com/discordjs/discord.js/commit/64a4041a05e9514334a9f9e1f38a1ea18bb676d5))
+- **Colors:** Provide enum descriptions (#8437) ([6ef4754](https://github.com/discordjs/discord.js/commit/6ef4754d40c5ec65715fc1e00e643c52fe0a6209))
+- **AttachmentBuilder:** Fix #8407 (#8421) ([5b053cf](https://github.com/discordjs/discord.js/commit/5b053cf82ec2f2b717a490485af052dc956fe3c9))
+
+## Features
+
+- **Guild:** Add `max_video_channel_users` (#8423) ([3a96ce7](https://github.com/discordjs/discord.js/commit/3a96ce7970947f6268c21a1323d986aac8cb736d))
+
+## Typings
+
+- **Message:** Correct `bulkDelete` return type (#8465) ([c5b96a1](https://github.com/discordjs/discord.js/commit/c5b96a185cb8ba836b7cd10526c14059866f218f))
+- Fix missing types for mentionable options (#8443) ([452e94f](https://github.com/discordjs/discord.js/commit/452e94fd3ecc12de9e3408982c5c7fd931bae634))
+- **ApplicationCommandOption:** Add `ApplicationCommandBooleanOption` (#8434) ([38275fc](https://github.com/discordjs/discord.js/commit/38275fc53d633ce77ed2b142aff788dcbd4fad8c))
+
+# [14.1.2](https://github.com/discordjs/discord.js/compare/14.1.1...14.1.2) - (2022-07-30)
+
+## Bug Fixes
+
+- **errors:** Error codes (#8398) ([480c85c](https://github.com/discordjs/discord.js/commit/480c85c9c3d129204b3399ed726a4e570e0b2852))
+
+## Documentation
+
+- **Embed:** Ensure height and width are numbers (#8396) ([fca3dad](https://github.com/discordjs/discord.js/commit/fca3dada2a565eecfc7e5275cc9317df1d261871))
+
+# [14.1.0](https://github.com/discordjs/discord.js/compare/14.0.3...14.1.0) - (2022-07-29)
+
+## Bug Fixes
+
+- **MessageMentions:** `ignoreRepliedUser` option in `has()` (#8202) ([b4e2c0c](https://github.com/discordjs/discord.js/commit/b4e2c0c4d5538b945f9d597c6410a6f84b315084))
+- **GuildChannelManager:** Allow unsetting rtcRegion (#8359) ([a7d49e5](https://github.com/discordjs/discord.js/commit/a7d49e56fc7c34d2e4548d9e5bf0aec45273506e))
+- **ThreadChannel:** Omit webhook fetching (#8351) ([3839958](https://github.com/discordjs/discord.js/commit/3839958e3f682c715f1017da05436d2fe34900fd))
+- **GuildAuditLogsEntry:** Replace OverwriteType with AuditLogOptionsType (#8345) ([58c1b51](https://github.com/discordjs/discord.js/commit/58c1b51c5ceab137ad9851919b338419eeeab69e))
+- **ShardClientUtil#_respond:** Construct global error (#8348) ([8e520f9](https://github.com/discordjs/discord.js/commit/8e520f946a5b9f93a939290facf4ccca2c05ff21))
+- **Presence:** Do not return NaN for activity timestamp (#8340) ([df42fdf](https://github.com/discordjs/discord.js/commit/df42fdfc421f1190f0a2267a66efd3c921ec2348))
+- **Client:** Omit private properties from toJSON (#8337) ([830c670](https://github.com/discordjs/discord.js/commit/830c670c61dcb17d8ab2a894a3203c68917d27e0))
+- **ApplicationCommandManager:** Allow passing 0n to defaultMemberPermissions (#8311) ([1fb7b30](https://github.com/discordjs/discord.js/commit/1fb7b30963cfe7ea4c05b1f3b42171c879c46a1d))
+
+## Documentation
+
+- **InteractionResponses:** Add `showModal()` return type (#8376) ([0b61dbf](https://github.com/discordjs/discord.js/commit/0b61dbf720e844322b066e30080c3537ab3d8174))
+- **WebhookClient:** Document working options (#8375) ([ba6797e](https://github.com/discordjs/discord.js/commit/ba6797e74209161b64c412de1b6f307cb28736b8))
+- **Message:** Document gateway intent for content (#8364) ([2130aae](https://github.com/discordjs/discord.js/commit/2130aae3210a8eaf91c5ccae5463940d49052c7d))
+- Use info blocks for requirements (#8361) ([80b9738](https://github.com/discordjs/discord.js/commit/80b9738957ebf5b6eb7c9858cec0fb1c897d0a1f))
+- **WebhookClient:** Make constructor a union (#8370) ([e9920a9](https://github.com/discordjs/discord.js/commit/e9920a9c98ffb78bd7d0ae00d486476367296646))
+- Update docs and examples to PascalCase links (#8305) ([34ba9d1](https://github.com/discordjs/discord.js/commit/34ba9d1c4c80eff7e6ac199a40232d07491432cc))
+
+## Features
+
+- Add channel & message URL formatters (#8371) ([a7deb8f](https://github.com/discordjs/discord.js/commit/a7deb8f89830ead6185c5fb46a49688b6d209ed1))
+- Restore missing typeguards (#8328) ([77ed407](https://github.com/discordjs/discord.js/commit/77ed407f6aadb68e729470c5269e9b526cb1b3f0))
+- **GuildMember:** Add dmChannel getter (#8281) ([4fc2c60](https://github.com/discordjs/discord.js/commit/4fc2c60a3bb43671b4b0202ae75eab42aba163ff))
+
+## Refactor
+
+- Deprecate `Formatter` class (#8373) ([7fd9ed8](https://github.com/discordjs/discord.js/commit/7fd9ed8f13d17ce7e98e34f7454d9047054d8467))
+- **PermissionOverwriteManager:** Use `OverwriteType` (#8374) ([6d24805](https://github.com/discordjs/discord.js/commit/6d248051cfd431e9cb1c65cb98f56aa0a6556407))
+
+## Typings
+
+- **GuildAuditLogsEntryExtraField:** Use `AuditLogOptionsType` (#8349) ([200ab91](https://github.com/discordjs/discord.js/commit/200ab91f527d8a5706d277b89a975096f75d141a))
+
+# [14.0.3](https://github.com/discordjs/discord.js/compare/14.0.2...14.0.3) - (2022-07-19)
+
+## Bug Fixes
+
+- **Components:** Support emoji id strings (#8310) ([660e212](https://github.com/discordjs/discord.js/commit/660e212e83df026c684ee2cda7fb4e98870f342e))
+
+# [14.0.2](https://github.com/discordjs/discord.js/compare/14.0.1...14.0.2) - (2022-07-18)
+
+## Bug Fixes
+
+- **DataResolver#resolveImage:** Adjust to updated resolveFile (#8308) ([3a7e93d](https://github.com/discordjs/discord.js/commit/3a7e93df576172c797f1d8bd6483234bb6af2d00))
+
+# [14.0.0](https://github.com/discordjs/discord.js/compare/9.3.1...14.0.0) - (2022-07-17)
+
+## Bug Fixes
+
+- **GuildMemberManager:** Allow setting own nickname (#8066) ([52a9e21](https://github.com/discordjs/discord.js/commit/52a9e213c2dc13ee52ee0234593fdce392f43890))
+- **PermissionOverwriteManager:** Mutates user (#8283) ([3bf30b1](https://github.com/discordjs/discord.js/commit/3bf30b1e6d2d6f583f7069a1e24e7842d59fab2f))
+- **GuildChannelManager:** Access `resolveId` correctly (#8296) ([3648f6d](https://github.com/discordjs/discord.js/commit/3648f6d567cd834c301de913ce19f786a265240d))
+- **GuildChannelManager:** Edit lockPermissions (#8269) ([7876548](https://github.com/discordjs/discord.js/commit/787654816d2b6a5168d199d32cdaeb4ef6d270b9))
+- **`SelectMenuBuilder`:** Properly accept `SelectMenuOptionBuilder`s (#8174) ([31d5930](https://github.com/discordjs/discord.js/commit/31d593046466438c55f5784b0f2098e233c5edc4))
+- Remove global flag on regular expressions (#8177) ([cdd9214](https://github.com/discordjs/discord.js/commit/cdd9214212892e30b3eaa161837c37516c5bcaa0))
+- **MessagePayload:** Guard against `repliedUser` property (#8211) ([fa010b5](https://github.com/discordjs/discord.js/commit/fa010b516254c4ab2762278817f31bf289f0ab6a))
+- **ApplicationCommandManager:** Explicitly allow passing builders to methods (#8209) ([50d55bd](https://github.com/discordjs/discord.js/commit/50d55bd6b819307c86701f4808c087f359c6ccff))
+- **GuildMemberRemove:** Remove member's presence (#8181) ([11b1739](https://github.com/discordjs/discord.js/commit/11b173931968c548f8504649ae7090865892e62d))
+- Edit() data can be partial and `defaultMemberPermissions` can be `null` (#8163) ([0ffbef5](https://github.com/discordjs/discord.js/commit/0ffbef506a97a0bf22cb134fc007c2aec29cbffc))
+- **WebSocketShard:** Keep an error handler on connections (#8150) ([c34c02a](https://github.com/discordjs/discord.js/commit/c34c02ab8d119bf16d8d14d125a9b650b4bb18f4))
+- **DJSError:** Error code validation (#8149) ([31f6582](https://github.com/discordjs/discord.js/commit/31f658247fe0e1047897edab629643d140e77e07))
+- **vcs:** Nsfw property (#8132) ([2eeaad6](https://github.com/discordjs/discord.js/commit/2eeaad6f27fdf8868364fa95ed20755ee09bda87))
+- **WebSocketManager:** Correct error name (#8138) ([db2b033](https://github.com/discordjs/discord.js/commit/db2b0333d912fe83381db2ffe16829d7d03d6c2e))
+- **WebSocketShard:** Disconnected casing (#8117) ([23e183a](https://github.com/discordjs/discord.js/commit/23e183a9ac7aaa3bca2bc4eb8634d1738ec34a26))
+- **webhooks:** Revert webhook caching (and returning Message) (#8038) ([d54bf5d](https://github.com/discordjs/discord.js/commit/d54bf5d286f4057db130901591b192fd4d1668c1))
+- **ApplicationCommand:** Remove `autocomplete` check at the top level and correctly check for `dmPermission` (#8100) ([0a44b05](https://github.com/discordjs/discord.js/commit/0a44b05db83948857afbe18471e7a867da47177a))
+- **ApplicationCommand:** Fix default member permissions assignment (#8067) ([96053ba](https://github.com/discordjs/discord.js/commit/96053babe1bd65ebe1fc6a261f5eb052906afdb9))
+- **scripts:** Read directory and rerun (#8065) ([f527dea](https://github.com/discordjs/discord.js/commit/f527dea36ead194aaae1bf5da1e953df59d692fd))
+- Select menu options to accept both rest and array (#8032) ([fbe67e1](https://github.com/discordjs/discord.js/commit/fbe67e102502b4b49690cbf8ff891ead2232ecf3))
+- **CommandInteractionOptionResolver:** Handle autocompletion interactions (#8058) ([d8077c6](https://github.com/discordjs/discord.js/commit/d8077c6839dc8ceb57d3c3a86bf9746be2a91ada))
+- **scripts:** Add quotes around blob arguments (#8054) ([598f61b](https://github.com/discordjs/discord.js/commit/598f61b992fab1b3fdcab8ff960366f7af0b37ea))
+- **Message:** Force fetching (#8047) ([f2b267c](https://github.com/discordjs/discord.js/commit/f2b267c079dd8aa7277910471f3db2f88af6efb2))
+- **Attachment:** Do not destructure `data` (#8041) ([1afae90](https://github.com/discordjs/discord.js/commit/1afae909d72e648cf48d63d7de2708737a78c126))
+- **DirectoryChannel:** Type `name` and handle `url` (#8023) ([86d8fbc](https://github.com/discordjs/discord.js/commit/86d8fbc023e3925e8f86799d6ebf2d423f7bf2ec))
+- Readd `isThread` type guard (#8019) ([f8ed71b](https://github.com/discordjs/discord.js/commit/f8ed71bfca6e47e3d44ad063e23804354bd23604))
+- Add static method `from` in builders (#7990) ([ad36c0b](https://github.com/discordjs/discord.js/commit/ad36c0be7744ea4214ccf345fe80a5a1a9e89101))
+- Typings (#7965) ([7a1095b](https://github.com/discordjs/discord.js/commit/7a1095b66be3c5d81185e026281e2908c10c1695))
+- **GuildAuditLogs:** Cache guild scheduled events (#7951) ([2f03f9a](https://github.com/discordjs/discord.js/commit/2f03f9ad3f63abee5b5c46d02f1afa8885e8977c))
+- Make sure action row builders create djs builders (#7945) ([adf461b](https://github.com/discordjs/discord.js/commit/adf461baf49be754c7a10c61faf1ef3df333413a))
+- **TextBasedChannel#bulkDelete:** Return deleted message (#7943) ([191510b](https://github.com/discordjs/discord.js/commit/191510b7f87903e4bd93b891649cb290fd50c47e))
+- Remove trailing invites on channel deletion (#7932) ([5e9b757](https://github.com/discordjs/discord.js/commit/5e9b757a3733e6526770eb60a15072612294eb21))
+- **DataResolver:** Fix check for readable streams (#7928) ([28172ca](https://github.com/discordjs/discord.js/commit/28172ca7b57357436d3252ec01ec17dad865d87f))
+- **AuditLog:** Default changes to empty array (#7880) ([19eaed6](https://github.com/discordjs/discord.js/commit/19eaed63905367ef4604366b8839023384524d1f))
+- **Util:** Flatten ignoring certain fields (#7773) ([df64d3e](https://github.com/discordjs/discord.js/commit/df64d3ea382c07e66bc7cc8877ee430206c31d63))
+- Possibly missing (#7829) ([6239d83](https://github.com/discordjs/discord.js/commit/6239d83c4d5f0a396678410d7fef35e39ed29009))
+- `endReason` not being properly set in base Collector (#7833) ([0c18dab](https://github.com/discordjs/discord.js/commit/0c18dab1280205b8855d17d075b7421860d59c14))
+- **SelectMenuBuilder:** Options array (#7826) ([3617093](https://github.com/discordjs/discord.js/commit/361709332bdc871822c2b9919f14fd090d68666a))
+- **Activity:** Platform type (#7805) ([4ac91c6](https://github.com/discordjs/discord.js/commit/4ac91c61d08111ae4d49d1e64caf94e6e49832c8))
+- **ApplicationCommand:** Equal nameLocalizations and descriptionLocalizations (#7802) ([4972bd8](https://github.com/discordjs/discord.js/commit/4972bd87c17cbc6a94c9608ba2ab39c475f9921f))
+- **InteractionResponses:** Use optional chaining on nullable property (#7812) ([c5fb548](https://github.com/discordjs/discord.js/commit/c5fb54852906898ffb19282dd60168dfc6fb2eba))
+- **MessageManager:** Allow caching option of an unspecified limit (#7763) ([1b2d8de](https://github.com/discordjs/discord.js/commit/1b2d8decb638faeae8184119c5cedfcdaf9485e3))
+- **builders:** Add constructor default param (#7788) ([c286650](https://github.com/discordjs/discord.js/commit/c2866504a3824005fe756556fec4b349898b7d22))
+- **MessagePayload:** ResolveBody check body instead of data (#7738) ([3db20ab](https://github.com/discordjs/discord.js/commit/3db20abdd2d502a1ed457842181b164dc6390ba1))
+- **ActionRow:** ToJSON should include components (#7739) ([ebb4dfa](https://github.com/discordjs/discord.js/commit/ebb4dfa262adb2086c83db487002bb2e1ed5ab88))
+- Prevent `NaN` for nullable timestamps (#7750) ([8625d81](https://github.com/discordjs/discord.js/commit/8625d817145eb642aeb0da05184352f438586986))
+- **InteractionCreateAction:** Ensure text-based channel for caching messages (#7755) ([25fdb38](https://github.com/discordjs/discord.js/commit/25fdb3894d33dc395a376a3d962a063eb5735253))
+- Pass `force` correctly (#7721) ([402514f](https://github.com/discordjs/discord.js/commit/402514ff323ccf1f8c95d295f044cf0bb5547c2e))
+- Support reason in setRTCRegion helpers (#7723) ([905a6a1](https://github.com/discordjs/discord.js/commit/905a6a11663f9469ada67f8310a969453ffc5b2a))
+- **GuildMemberManager:** Return type can be null (#7680) ([74bf7d5](https://github.com/discordjs/discord.js/commit/74bf7d57ab959eb820ab1c213ac86ab1ea660398))
+- **gateway:** Use version 10 (#7689) ([8880de0](https://github.com/discordjs/discord.js/commit/8880de0cecdf273fd6df23988e4cb77774a75390))
+- Audit log static reference (#7703) ([85e531f](https://github.com/discordjs/discord.js/commit/85e531f22d7a8f8ad043647ce445726ae0df26c0))
+- Handle possibly missing property (#7641) ([0c32332](https://github.com/discordjs/discord.js/commit/0c32332a5aacbbb6c415da75c166d09cfdb34bbd))
+- **util:** Allow `escapeInlineCode` to escape double backtics (#7638) ([d5369a5](https://github.com/discordjs/discord.js/commit/d5369a56e3fcf50513f3bc582552c2838b04d199))
+- **GuildEditData:** Some fields can be null (#7632) ([4d2b559](https://github.com/discordjs/discord.js/commit/4d2b55955d1a3ff05c3047599232becdc3f2c445))
+- TOKEN_INVALID error not thrown at login with invalid token (#7630) ([cd79bef](https://github.com/discordjs/discord.js/commit/cd79bef2547594f4d0c744faa8fa67fb9fd61526))
+- **GuildScheduledEvent:** Handle missing `image` (#7625) ([c684ac5](https://github.com/discordjs/discord.js/commit/c684ac55e1d225740e67ab7bd5643de1b35f4594))
+- **guild:** Throw if ownerId falsey (#7575) ([98177aa](https://github.com/discordjs/discord.js/commit/98177aa38d3d6516d4c5354d6c7edea925dc881d))
+- Remove Modal export (#7654) ([87a6b84](https://github.com/discordjs/discord.js/commit/87a6b8445bfbf3981cd39813fe961dfa1c7f2bce))
+- **Embed:** Fix incorrect destructuring import (#7615) ([cbdb408](https://github.com/discordjs/discord.js/commit/cbdb408dffd1c7f2193c15989528a3de5fd9f13a))
+- **ThreadMembersUpdate:** Only emit added & removed thread members (#7539) ([c12d61a](https://github.com/discordjs/discord.js/commit/c12d61a3421afcdc41f77c0fddde4efbb257fa69))
+- **Util:** EscapeInlineCode properly (#7587) ([851f380](https://github.com/discordjs/discord.js/commit/851f380eb10d23ffd08e8b845aed4039abbcd03b))
+- **GuildStickerManager:** Correctly access guild ID (#7605) ([4b08d9b](https://github.com/discordjs/discord.js/commit/4b08d9b376bda7a7f4bb3fb8c555d25cca648de4))
+- **MessageManager:** Pin route (#7610) ([cb566c8](https://github.com/discordjs/discord.js/commit/cb566c8b6abff489a944db7952e5c5a48e0c98b0))
+- Handle partial data for `Typing#user` (#7542) ([c6cb5e9](https://github.com/discordjs/discord.js/commit/c6cb5e9ebbf46d81404119a6aa11bb8ebb17d5a4))
+- **guild:** Fix typo accessing user instead of users (#7537) ([8203c5d](https://github.com/discordjs/discord.js/commit/8203c5d843f2431c0f49023282f1bf73d85881d1))
+- **test:** `MessageActionRow` to `ActionRow` (#7523) ([d1d1b07](https://github.com/discordjs/discord.js/commit/d1d1b076bebf7cb706b2436a40d87c6efaed1e1d))
+- **MessagePayload:** Don't set reply flags to target flags (#7514) ([4f30652](https://github.com/discordjs/discord.js/commit/4f306521d829fef21ebd70557b37f8199b82572b))
+- **invite:** Add back channelId property (#7501) ([78aa36f](https://github.com/discordjs/discord.js/commit/78aa36f9f5913b86c82376ecdf20653b15340bbe))
+- Properly serialize `undefined` values (#7497) ([8dbd345](https://github.com/discordjs/discord.js/commit/8dbd34544cbeb499282f01dda9d35ed9bca93591))
+- Allow unsafe embeds to be serialized (#7494) ([942ea1a](https://github.com/discordjs/discord.js/commit/942ea1acbfb49289ccb3a1882b5a2da0a7d0bccf))
+- Attachment types (#7478) ([395a68f](https://github.com/discordjs/discord.js/commit/395a68ff49c622d5136d6b775beaf8e88a2d8610))
+- Use case converter for json component serialization (#7464) ([2d45544](https://github.com/discordjs/discord.js/commit/2d4554440ed9329a5876a9c674c3eb2de0f2f917))
+- **GuildAuditLogs:** Typings and consistency (#7445) ([c1b27f8](https://github.com/discordjs/discord.js/commit/c1b27f8eed8ea04a48bc106453892bddcdc6b73e))
+- **dataresolver:** Ensure fetched file is convert to a buffer (#7457) ([9311fa7](https://github.com/discordjs/discord.js/commit/9311fa7b42b2b5a74e411aa263daa4fbfc270645))
+- **messagepayload:** ResolveFile property names (#7458) ([a8106f7](https://github.com/discordjs/discord.js/commit/a8106f7c586f0ecac76e7f72c53b0da215a6fbf1))
+- **ci:** Ci error (#7454) ([0af9bc8](https://github.com/discordjs/discord.js/commit/0af9bc841ffe1a297d308500d696bad4b85abda9))
+- **threads:** Require being sendable to be unarchivable (#7406) ([861f0e2](https://github.com/discordjs/discord.js/commit/861f0e2134662ab64a11d313130aff58b413d495))
+- **guildmember:** Check if member has administrator permission (#7384) ([81d8b54](https://github.com/discordjs/discord.js/commit/81d8b54ff6b98b0e7ee2c57eaee6bc0b707e135a))
+- **guild:** Remove `maximumPresences` default value (#7440) ([55b388a](https://github.com/discordjs/discord.js/commit/55b388a763dc7223e88b62ae928fe85fe8b8fe58))
+- **guildchannelmanager:** Edit always sets parent to null (#7446) ([b97aedd](https://github.com/discordjs/discord.js/commit/b97aedd8e15f9358960cb59403f3a8ea24b87141))
+- **guildmember:** Make `pending` nullable (#7401) ([fe11ff5](https://github.com/discordjs/discord.js/commit/fe11ff5f6e85571a981e90eba5b9f3bda7a2cd04))
+- **clientpresence:** Fix used opcodes (#7415) ([a921ec7](https://github.com/discordjs/discord.js/commit/a921ec7dc525c58d40b4678e66270f9238abed31))
+- Correctly export UnsafeSelectMenuComponent from builders (#7421) ([aadfbda](https://github.com/discordjs/discord.js/commit/aadfbda586d57a7b775ad26c201f0dc34618180b))
+- MessageReaction.me being false when it shouldn't (#7378) ([04502ce](https://github.com/discordjs/discord.js/commit/04502ce702da53c4b00bf391d0fd936746851381))
+- Fix some typos (#7393) ([92a04f4](https://github.com/discordjs/discord.js/commit/92a04f4d98f6c6760214034cc8f5a1eaa78893c7))
+- **messagementions:** Fix `has` method (#7292) ([3a5ab2c](https://github.com/discordjs/discord.js/commit/3a5ab2c4e54de4e67ab6e323d7eac86482da7382))
+- **guildmembermanager:** Use rest in edit (#7356) ([00ce1c5](https://github.com/discordjs/discord.js/commit/00ce1c56ac224691a8691a3525cb14ae002319c6))
+- **typings:** Mark `RESTOptions` as Partial in `ClientOptions` (#7349) ([e1ecc1a](https://github.com/discordjs/discord.js/commit/e1ecc1a80a9358cdbafbe8542c40b9de8cad467e))
+- **Webhook:** Use correct method name (#7348) ([11e5e5a](https://github.com/discordjs/discord.js/commit/11e5e5ac5b70138f56332eb3e61a42443670b0de))
+- **thread:** Don't assign directly to getters (#7346) ([2db0cdd](https://github.com/discordjs/discord.js/commit/2db0cdd357c3a02decb4fd4168db87888efba283))
+- Missed enums and typings from #7290 (#7331) ([47633f0](https://github.com/discordjs/discord.js/commit/47633f0fd2435d6d8c694d8d37b26039a7b3797a))
+- **guildchannelmanager:** Remove reverse enum lookup (#7304) ([857bba4](https://github.com/discordjs/discord.js/commit/857bba448029f3f070c67fb40b59a3a2a2e5c6f4))
+- Import `clear{Timeout,Interval}` from `node:timers` (#7269) ([8ddd44e](https://github.com/discordjs/discord.js/commit/8ddd44ed85b32c86243efe0ec35b283eaaa8212c))
+- **ApplicationCommand:** Use new ApplicationCommandOptionType enums (#7257) ([06f5210](https://github.com/discordjs/discord.js/commit/06f5210f58bbba6102173033a9f1e6fb004fdf5d))
+- Use enums from discord-api-types (#7258) ([f284a46](https://github.com/discordjs/discord.js/commit/f284a4641fd68de9190bda97ec1eab0981149630))
+- **exports:** Export ApplicationCommandType properly (#7256) ([f753882](https://github.com/discordjs/discord.js/commit/f75388259262bf6b4a64375b97800bd72378f3bc))
+- **Shard:** EventEmitter listener warning (#7240) ([ff3a8b8](https://github.com/discordjs/discord.js/commit/ff3a8b83234d3826fc49c5a8c3cb52ef9f281ffd))
+- **timestamps:** Account for timestamps of 0 when creating Dates (#7226) ([a8509c9](https://github.com/discordjs/discord.js/commit/a8509c91ca0147393b407221405b6b917677961a))
+- **MessageEmbed:** CreatedAt field can be zero (#7218) ([37cad54](https://github.com/discordjs/discord.js/commit/37cad54dbdade39607397b8ad697eca94f1b7197))
+- **BaseClient:** Do not append default options if provided is not an object (#6453) ([b92a7d7](https://github.com/discordjs/discord.js/commit/b92a7d72332c35b607db54aa6aca24b8e10e00ad))
+- Snowflakeutil import (#7219) ([962f4bf](https://github.com/discordjs/discord.js/commit/962f4bf88211dbfb5ad0295a9467dede1e2688ee))
+- **Role:** Remove unused process (#7215) ([63034b4](https://github.com/discordjs/discord.js/commit/63034b44c9849087e391684d9b6c0c6ae9a21113))
+- **WebhookClient:** Updated webhook url regex (#6804) ([1c615d1](https://github.com/discordjs/discord.js/commit/1c615d1bb2606d5f19e55076d4ecab95c619518e))
+- **Sweepers:** Add sweepStickers function (#7213) ([95f8375](https://github.com/discordjs/discord.js/commit/95f8375d425f58f501f32ead03f7927e6596f8e6))
+- **InteractionCreate:** Use ChatInputCommandInteraction instead (#7210) ([49dada3](https://github.com/discordjs/discord.js/commit/49dada35f92470d3e4426362510847b93dd42d1a))
+- **Structues:** Rename old module's name (#7207) ([fbef454](https://github.com/discordjs/discord.js/commit/fbef45489457a2198357dc4dd303740d79036784))
+- **WebSocket:** Remove application command handler (#7202) ([033151c](https://github.com/discordjs/discord.js/commit/033151cf92fe43536b8a4c0f4d7d9ed75a2095c5))
+- **User:** `bannerURL()` should not throw when not present (#6789) ([3872acf](https://github.com/discordjs/discord.js/commit/3872acfeb8390f6f7202d69cf1f7f8616a7b0b34))
+- **VoiceState:** Ensure `suppress` & `streaming` have proper fallback values (#6377) ([a0d5f13](https://github.com/discordjs/discord.js/commit/a0d5f13dd9b27c44f5183a2a9af4c4fdecb312c0))
+- **sweepers:** Provide default for object param (#7182) ([ae2f013](https://github.com/discordjs/discord.js/commit/ae2f013653c8a9f9ffb12ae8fcdb1bb604b39236))
+
+## Deprecation
+
+- **Caching:** Clean up deprecated cache sweeping (#7118) ([12ffa06](https://github.com/discordjs/discord.js/commit/12ffa069aa8b247e945fef16a543f41c2c391bf1))
+
+## Documentation
+
+- Align webhook method return types with implementation (#8253) ([5aeed99](https://github.com/discordjs/discord.js/commit/5aeed9935058241648507d7f651679226a89dbb3))
+- Remove `@private` constructor documentation (#8255) ([452dec5](https://github.com/discordjs/discord.js/commit/452dec57ca422f5e7424a0f0e78c3e152717f413))
+- **ApplicationCommand:** Add `min_length` and `max_length` to ApplicationCommandOptionData (#8239) ([43f62bb](https://github.com/discordjs/discord.js/commit/43f62bb6678ec332795c8cfbe0c01854b95aa61e))
+- **MessageInteraction#commandName:** Updated description (#8212) ([ab238a9](https://github.com/discordjs/discord.js/commit/ab238a9046e0201dbd4755fa41fa69c44b186912))
+- Add missing `@extends` (#8205) ([e0c8282](https://github.com/discordjs/discord.js/commit/e0c82824905dcebf62c2d1afcc5e5590a5594838))
+- **Constants:** Fix SweeperKeys type (#8157) ([af04992](https://github.com/discordjs/discord.js/commit/af04992ed3c2617fda686c2bc7338dcada283dc6))
+- **Channels:** Internally document channel creation (#8154) ([5e5853a](https://github.com/discordjs/discord.js/commit/5e5853a4e885c47e3dde519761dd59a5ec0e06fc))
+- Update threads to use `ThreadAutoArchiveDuration` (#8153) ([ee36d60](https://github.com/discordjs/discord.js/commit/ee36d60dc6714c83569a20716fa8ca8e1bd7de4f))
+- **APITypes:** Remove duplicate type definition (#8144) ([a061233](https://github.com/discordjs/discord.js/commit/a0612335101c7ce2a07d95da4b79f0d4a2b1a6a0))
+- Document missing type definitions (#8130) ([203bc4a](https://github.com/discordjs/discord.js/commit/203bc4a2cf0c2d90a003093318aa0741605610f5))
+- **InteractionResponse:** Fix return (#8141) ([f1ac17c](https://github.com/discordjs/discord.js/commit/f1ac17c961cf95d99e205133605d10d8be5bd737))
+- **PermissionsBitField:** Fix `@name` of bitfield (#8115) ([3a77ce0](https://github.com/discordjs/discord.js/commit/3a77ce0b18c60a0b21ba088590ff89f2ace94087))
+- `TextBasedChannel` -> `TextBasedChannels` typos (#8110) ([db663a5](https://github.com/discordjs/discord.js/commit/db663a55c2ed2faf61e217009158da50dfcf274f))
+- Remove `number`s from enums (#8098) ([0a138da](https://github.com/discordjs/discord.js/commit/0a138dab95a86512f08ac3be356f77f38f2ea880))
+- **GuildAuditLogs:** Fix and reimplement type definitions (#8108) ([4155136](https://github.com/discordjs/discord.js/commit/415513696c7b7e139d1b958e480bf0c7e4d14111))
+- **WebSocketOptions:** Add `version` to docs and typings (#8050) ([386c41f](https://github.com/discordjs/discord.js/commit/386c41f24fb3c9d06967d9c1881a57645c3a71f2))
+- **BaseGuildTextChannel:** Update `setType()`'s parameter type (#8088) ([9c0f190](https://github.com/discordjs/discord.js/commit/9c0f190de1f743d9bd597ffd656503c672db71c1))
+- Update outdated examples (#8081) ([51eadf3](https://github.com/discordjs/discord.js/commit/51eadf37371a6138847efdb4b5b81ee132001cf0))
+- **ThreadMemberManager:** Require `member` in `FetchThreadMemberOptions` (#8079) ([552ec72](https://github.com/discordjs/discord.js/commit/552ec72542ec3b2b3ebf35c9fd84ab502dd746cf))
+- **AutocompleteInteraction:** Change useless log in responds example (#8077) ([ac7bf69](https://github.com/discordjs/discord.js/commit/ac7bf692bfce8204e278205dde811515a51f154b))
+- Description and missing `@typedef` fixes (#8087) ([a2eebf6](https://github.com/discordjs/discord.js/commit/a2eebf6c66f3e4c96ece9d2ae2a1133c84257f42))
+- Ignore docs of unexported functions (#8051) ([94bdcac](https://github.com/discordjs/discord.js/commit/94bdcaca62414a77d4ee0b8b79752a2be937320b))
+- **ClientOptions:** Fix closeTimeout default (#8049) ([b2eea1c](https://github.com/discordjs/discord.js/commit/b2eea1c900ba73d4b98b72f5c196f51e27d3ab8f))
+- **DirectoryChannel:** Extend `Channel` (#8022) ([f3f34f0](https://github.com/discordjs/discord.js/commit/f3f34f07b3b396015b130b8e9d938a3eec688fc3))
+- **Attachment:** Remove constructor doc (#8009) ([0a7953e](https://github.com/discordjs/discord.js/commit/0a7953e46310c77483d277539b47f1a7ab051fd9))
+- **VoiceChannel:** Annotate that it is implementing TextBasedChannel (#8007) ([5987dbe](https://github.com/discordjs/discord.js/commit/5987dbe5cff6991ae6905b0387411fa042d3e9b7))
+- Add missing discord-api-types external types (#8001) ([546d486](https://github.com/discordjs/discord.js/commit/546d48655f36ed9a6c6c5ce3c2eabcca1a86a945))
+- **InteractionResponses:** Replace outdated Embed example for reply (#7875) ([d308c66](https://github.com/discordjs/discord.js/commit/d308c66eeca6bdc3471637ae3aaaaa0a2f5c9989))
+- Require parameter (#7838) ([f4ccc67](https://github.com/discordjs/discord.js/commit/f4ccc6772c15e32489ca22fb2c3e803b85d4dbf9))
+- **ApplicationCommand:** Fix and improve localization docs (#7804) ([61a44c5](https://github.com/discordjs/discord.js/commit/61a44c509c40abaf7ffb95b10942889cbbf155ac))
+- **ApplicationCommand:** Fix ApplicationCommandOptionChoice (#7794) ([f1d0084](https://github.com/discordjs/discord.js/commit/f1d0084da26b0111ca029c789ad9e8e6c2882b4d))
+- Add back static properties and methods (#7706) ([520f471](https://github.com/discordjs/discord.js/commit/520f471ac56cbc01402b79197333a8a34c4ac5c9))
+- **InteractionCollector:** Document channel option type (#7551) ([e787cd5](https://github.com/discordjs/discord.js/commit/e787cd5fa5d013319347392ee4f799a677f6f512))
+- Correctly type getters (#7500) ([ffecf08](https://github.com/discordjs/discord.js/commit/ffecf084956f954cf10e1b844e00326e443a86f2))
+- ApplicationCommandData typedef (#7389) ([d32db88](https://github.com/discordjs/discord.js/commit/d32db8833e1058fb36f2e83af79d5353a9f2f693))
+- **channel:** Fix `isDMBased` docs (#7411) ([f2a7a9f](https://github.com/discordjs/discord.js/commit/f2a7a9f1b30af272a6a8d81825d09f84e749cc24))
+- **messageattachment:** Fix `contentType` docs (#7413) ([2800e07](https://github.com/discordjs/discord.js/commit/2800e07e5974e07b9f8ce043722b9b99a5bcc80d))
+- Add supported option types for autocomplete (#7368) ([8bb3751](https://github.com/discordjs/discord.js/commit/8bb37513400d646d784d59875d6b6a6ec10160cd))
+- Add external builder docs links (#7390) ([0b866c9](https://github.com/discordjs/discord.js/commit/0b866c9fb284971113e288e52327d4506db28011))
+- Add EnumResolvers (#7353) ([72767a1](https://github.com/discordjs/discord.js/commit/72767a1059526bdf617e80d5a9e5da1fbd2936d3))
+- **locales:** Update Discord API docs link (#7266) ([b640272](https://github.com/discordjs/discord.js/commit/b6402723c31bed3c49f8b8cde873b65b9f373fd7))
+- **StageInstance:** Deprecate discoverableDisabled (#7179) ([bd33ebb](https://github.com/discordjs/discord.js/commit/bd33ebb507eab36bc2219103dbd1e0217b9f38c0))
+- **shardingmanager:** Fix type of `execArgv` option (#7284) ([e65da44](https://github.com/discordjs/discord.js/commit/e65da44d9c564d1ffcb0f4df2bcdaf0ce0636f35))
+- **interaction:** Add locale list link (#7261) ([37ec0bd](https://github.com/discordjs/discord.js/commit/37ec0bda6df75fb1dc69b7a1eafbb8ea19e68457))
+- Fix a typo and use milliseconds instead of ms (#7251) ([0dd56af](https://github.com/discordjs/discord.js/commit/0dd56afe1cdf16f1e7d9afe1f8c29c31d1833a25))
+- Fix command interaction docs (#7212) ([137ea24](https://github.com/discordjs/discord.js/commit/137ea249df3aa6b8375ecb42aa456a6fdb811f19))
+- **TextBasedChannel:** Fixed syntax error in examples (#7163) ([b454740](https://github.com/discordjs/discord.js/commit/b454740ae87b6c3c13536181965519c7277e5840))
+- **TextBasedChannel:** Fix #createMessageComponentCollector description (#7168) ([d4e6e03](https://github.com/discordjs/discord.js/commit/d4e6e0370857dff00185d59faf8aaac12b343a7a))
+- Fixes the examples for kick and ban (#7170) ([db669b8](https://github.com/discordjs/discord.js/commit/db669b897132ec458d50ca6c1e3afa761e98ffc3))
+- **RoleManager:** Fix incorrect example (#7174) ([f79ea67](https://github.com/discordjs/discord.js/commit/f79ea67d3a9ba134a9acef0a443bd089c4e173a6))
+
+## Features
+
+- **builder:** Add max min length in string option (#8214) ([96c8d21](https://github.com/discordjs/discord.js/commit/96c8d21f95eb366c46ae23505ba9054f44821b25))
+- **applicationCommand:** Add max min length in string option (#8215) ([94ee60d](https://github.com/discordjs/discord.js/commit/94ee60d3d438f6657bdef51471528769af09624c))
+- Add website documentation early mvp (#8183) ([d95197c](https://github.com/discordjs/discord.js/commit/d95197cc78593df4d0a8d1cc492b0e41b4ab58b8))
+- **BaseInteraction:** Add support for `app_permissions` (#8194) ([002d6a5](https://github.com/discordjs/discord.js/commit/002d6a5aede3d1c0e08bd58eeef38a3b9202f525))
+- **util:** ParseWebhookURL (#8166) ([c4653f9](https://github.com/discordjs/discord.js/commit/c4653f97b1529eb0b99fccdba67c37eb4f467ff9))
+- **AutocompleteInteraction:** Add `commandGuildId` (#8086) ([10a6c42](https://github.com/discordjs/discord.js/commit/10a6c4287dd45a30290814e50fa29a086f85da02))
+- **guild:** Add support for setting MFA level (#8024) ([c5176be](https://github.com/discordjs/discord.js/commit/c5176be14b697ff506eb973c4119644eab544304))
+- **vcs:** Add missing property and methods (#8002) ([0415300](https://github.com/discordjs/discord.js/commit/0415300243877ddbcb501c0a26b1ff65618a1da7))
+- **docgen:** Update typedoc ([b3346f4](https://github.com/discordjs/discord.js/commit/b3346f4b9b3d4f96443506643d4631dc1c6d7b21))
+- Website (#8043) ([127931d](https://github.com/discordjs/discord.js/commit/127931d1df7a2a5c27923c2f2151dbf3824e50cc))
+- Docgen package (#8029) ([8b979c0](https://github.com/discordjs/discord.js/commit/8b979c0245c42fd824d8e98745ee869f5360fc86))
+- Backport handle zombie connection (#7626) ([e1176fa](https://github.com/discordjs/discord.js/commit/e1176faa27898d4f127c293c099201cb294e10ee))
+- **CommandInteraction:** Add 'commandGuildId' (#8018) ([aa59a40](https://github.com/discordjs/discord.js/commit/aa59a409b36c7ef7018d1785d2dba4da17b57864))
+- Allow builders to accept rest params and arrays (#7874) ([ad75be9](https://github.com/discordjs/discord.js/commit/ad75be9a9cf90c8624495df99b75177e6c24022f))
+- **MessageReaction:** Add react method (#7810) ([a328778](https://github.com/discordjs/discord.js/commit/a3287782b57c28b94c390c24e7d5f2d8c303301f))
+- **Collector:** Add `ignore` event (#7644) ([5244fe3](https://github.com/discordjs/discord.js/commit/5244fe3c1cd400985b00e95d8e5ec73823cf4f25))
+- **GuildMemberManager:** Add `GuildMemberManager#fetchMe()` (#7526) ([349766d](https://github.com/discordjs/discord.js/commit/349766dd6925e2d5e5597cc78c73e46f17c56eab))
+- **guildChannelManager:** Add `videoQualityMode` option for `create()` (#7980) ([cdd2ba0](https://github.com/discordjs/discord.js/commit/cdd2ba036ab1559783eb067786c52aff61807557))
+- **EnumResolvers:** Remove Enumresolvers (#7876) ([76694c1](https://github.com/discordjs/discord.js/commit/76694c1497de1b083a792fd1fda20f0eace50c48))
+- Move `me` to `GuildMemberManager` manager (#7669) ([aed687b](https://github.com/discordjs/discord.js/commit/aed687b09f87862eb2f33fb9f95b2cbd0b770585))
+- **rest:** Use undici (#7747) ([d1ec8c3](https://github.com/discordjs/discord.js/commit/d1ec8c37ffb7fe3b63eaa8c382f22ca1fb348c9b))
+- **VoiceChannel:** Add support for text in voice (#6921) ([4ba0f56](https://github.com/discordjs/discord.js/commit/4ba0f56b6af64bac30eea807fb3e9f3c41c3c83c))
+- **SelectMenu:** Allow emojis in options and option constructors (#7797) ([f22245e](https://github.com/discordjs/discord.js/commit/f22245e9d072ac4ef63b0ae0d84d5ba94608ce22))
+- Allow `createMessageComponentCollector` without using `fetchReply` (#7623) ([a58556a](https://github.com/discordjs/discord.js/commit/a58556adc02b2b9239c8f277a4387c743c9d6f04))
+- Add guild directory support (#6788) ([b01f414](https://github.com/discordjs/discord.js/commit/b01f4147d4f3bca021bc269c9f06463f06e3db53))
+- **GuildBanManager:** Support pagination results (#7734) ([fc2a8bb](https://github.com/discordjs/discord.js/commit/fc2a8bb6750919ecd6ee7c872df05f4b677ff5d3))
+- **CommandInteraction:** Add support for localized slash commands (#7684) ([01a423d](https://github.com/discordjs/discord.js/commit/01a423d110cfcddb3d794fcc32579a1547dd472d))
+- Allow emoji strings to be passed through constructors (#7718) ([0faac04](https://github.com/discordjs/discord.js/commit/0faac04b69f1dda3dc860cd584af100e36a40917))
+- **StageInstanceManager:** Add `sendStartNotification` option to create (#7730) ([29f8807](https://github.com/discordjs/discord.js/commit/29f88079559cc02ccfef7a7c16458d481e573fb5))
+- Add `makeURLSearchParams` utility function (#7744) ([8eaec11](https://github.com/discordjs/discord.js/commit/8eaec114a98026024c21545988860c123948c55d))
+- **modal:** Add `awaitModalSubmit` (#7751) ([3037fca](https://github.com/discordjs/discord.js/commit/3037fca196a0f9238d53bb51394daf737bbf3742))
+- **Actions:** Add parent structure to events parameters (#7577) ([3f3e432](https://github.com/discordjs/discord.js/commit/3f3e4327c86da86734c19a96e97115bd505b4532))
+- Export `UnsafeModalBuilder` and `UnsafeTextInputBuilder` (#7628) ([6fec252](https://github.com/discordjs/discord.js/commit/6fec25239dfed46a30826d38dc97f3680f24ec65))
+- **VoiceChannel:** Support `video_quality_mode` (#7722) ([3b3dabf](https://github.com/discordjs/discord.js/commit/3b3dabf3da2e2f24b81967d68b581d7f7452273f))
+- Add API v10 support (#7477) ([72577c4](https://github.com/discordjs/discord.js/commit/72577c4bfd02524a27afb6ff4aebba9301a690d3))
+- **embed:** Remove Embed.setColor (#7662) ([9b0d8cb](https://github.com/discordjs/discord.js/commit/9b0d8cb2d8f7b55753de584eb3a3f347f87596c2))
+- **StageInstance:** Add support for associated guild event (#7576) ([3dff31f](https://github.com/discordjs/discord.js/commit/3dff31f63fe4afdcc818193d737e1917f1ac8105))
+- **VoiceState:** Add edit method (#7569) ([b162f27](https://github.com/discordjs/discord.js/commit/b162f27e46524bfc64515969d753c6e8f30e6c40))
+- **ModalSubmitInteraction:** Add boolean properties (#7596) ([8907390](https://github.com/discordjs/discord.js/commit/89073903a253d9408839573502c72cae93fe70b6))
+- Add Modals and Text Inputs (#7023) ([ed92015](https://github.com/discordjs/discord.js/commit/ed920156344233241a21b0c0b99736a3a855c23c))
+- **discord.js:** Partial transition to undici (#7482) ([5158332](https://github.com/discordjs/discord.js/commit/51583320d3b0f6452cd96bad1021f2a57e4cc6f6))
+- **message:** Add `reason` on pin and unpin (#7520) ([00728f7](https://github.com/discordjs/discord.js/commit/00728f72b36123b607502624b4b02a02ee524d4a))
+- Re-export AuditLogEvent enum (#7528) ([6a2fa70](https://github.com/discordjs/discord.js/commit/6a2fa70b8e79a460be38916eeb605976ad6fe68b))
+- **options:** Add support for custom JSON transformers (#7476) ([dee27db](https://github.com/discordjs/discord.js/commit/dee27db35af379b0835f9fd5cc19563f7bf3dfc0))
+- Add CategoryChannelChildManager (#7320) ([5cf5071](https://github.com/discordjs/discord.js/commit/5cf5071061760c2f9c1e36d7648aef544b03323a))
+ - **Co-authored-by:** Antonio Román <kyradiscord@gmail.com>
+- Attachment application command option type (#7200) ([0034396](https://github.com/discordjs/discord.js/commit/003439671d359dcfe481446ef12b90bd71c57835))
+- **builders:** Add attachment command option type (#7203) ([ae0f35f](https://github.com/discordjs/discord.js/commit/ae0f35f51d68dfa5a7dc43d161ef9365171debdb))
+- **scheduledevents:** Add image option (#7436) ([fbc71ef](https://github.com/discordjs/discord.js/commit/fbc71ef6b668c4b1e2b065d9b65541d9303db0a0))
+- Add methods to managers (#7300) ([dd751ae](https://github.com/discordjs/discord.js/commit/dd751ae19da196cc2f90ccd35c7d8e99878daaf9))
+- **channel:** Add .url getter (#7402) ([f59d630](https://github.com/discordjs/discord.js/commit/f59d6305cb0cd0d154a909f18be76407c4d452d3))
+- **components:** Add unsafe message component builders (#7387) ([6b6222b](https://github.com/discordjs/discord.js/commit/6b6222bf513d1ee8cd98fba0ad313def560b864f))
+- **thread:** Add `newlyCreated` to `threadCreate` event (#7386) ([51beda5](https://github.com/discordjs/discord.js/commit/51beda56f74e44ed013b5d25044b8d5fd1978b29))
+- **channel:** Add isDMBased typeguard (#7362) ([388f535](https://github.com/discordjs/discord.js/commit/388f53550cca7ded7350a050fda03c36e4c1fdf7))
+- **`Interaction`:** Add `.commandType` property to `CommandInteraction` and `AutocompleteInteraction` (#7357) ([567db60](https://github.com/discordjs/discord.js/commit/567db60475c8704661b2e788c9905ef364d6c00c))
+- **scheduledevent:** Add support for event cover images (#7337) ([355f579](https://github.com/discordjs/discord.js/commit/355f579771771a28a293c327a38574c8918d18f8))
+- **enumResolvers:** Strengthen typings (#7344) ([9a566e8](https://github.com/discordjs/discord.js/commit/9a566e8068f28fce87c07861ef1d2877c6ae105f))
+- Allow setting message flags when sending (#7312) ([706db92](https://github.com/discordjs/discord.js/commit/706db9228a91ef42e49d2ec749eac153b9ef75d0))
+- **minor:** Add application_id to Webhook (#7317) ([5ccdb0a](https://github.com/discordjs/discord.js/commit/5ccdb0ab266e4f74c331386ac2d6dd32bc225c62))
+- **threadchannel:** Add `createdTimestamp` field (#7306) ([9a16234](https://github.com/discordjs/discord.js/commit/9a1623425ae2d69f5c16f0096af4951ff5096e80))
+- **GuildPreview:** Add stickers (#7152) ([cf25de9](https://github.com/discordjs/discord.js/commit/cf25de9373df98b3c1cd0ca0a092d9dc8172929d))
+- Enum resolvers & internal enum string removal (#7290) ([213acd7](https://github.com/discordjs/discord.js/commit/213acd799738b888d550cdf3f08906764f8288e0))
+- **guildemojimanager:** Add `delete` and `edit` methods (#7286) ([9181a31](https://github.com/discordjs/discord.js/commit/9181a31e0ba330502052c94da544bb15c8b66f11))
+- **interaction:** Add `isRepliable` type guard (#7259) ([da05a88](https://github.com/discordjs/discord.js/commit/da05a8856b11cc1bf0df424c88a1cf9573e5b654))
+- **Channel:** Improve typeguards (#6957) ([37a22e0](https://github.com/discordjs/discord.js/commit/37a22e04c27724c2a65b05c701e3000ba3653ba1))
+- Add Locales to Interactions (#7131) ([9052e32](https://github.com/discordjs/discord.js/commit/9052e321d1c9c8841962d4e8dc5d9e060b104438))
+- **Permissions:** Remove deprecated thread-related permissions (#6755) ([ab3ff5a](https://github.com/discordjs/discord.js/commit/ab3ff5a262caf7d6225b8d6b54ab2c6b6613c0d0))
+- **VoiceRegion:** Remove the unsent vip field (#6759) ([caaef53](https://github.com/discordjs/discord.js/commit/caaef53dd97ecac9f714072ddba5ae9a99ab1027))
+- **richpresenceassets:** Add YouTube and custom image support (#7184) ([d06d70c](https://github.com/discordjs/discord.js/commit/d06d70ccf26c04c1122fac8430922588a489f95e))
+- **Collector:** Yield all collected values (#7073) ([2b480cb](https://github.com/discordjs/discord.js/commit/2b480cb14e6f52855efcb372da7fb455c15b13b1))
+
+## Refactor
+
+- **Util:** Rename `fetchRecommendedShards` (#8298) ([cafde77](https://github.com/discordjs/discord.js/commit/cafde77d73452d729ba8e2cb1cac3f14235b889b))
+- **Embed:** Add all the types (#8254) ([64f8140](https://github.com/discordjs/discord.js/commit/64f814066cc4adebaca47eb8d7a2040a8df399ae))
+- **rest:** Add content-type(s) to uploads (#8290) ([103a358](https://github.com/discordjs/discord.js/commit/103a3584c95a7b7f57fa62d47b86520d5ec32303))
+- Make `GuildAuditLogsEntry.action` return an `AuditLogEvent` (#8256) ([f0b68d5](https://github.com/discordjs/discord.js/commit/f0b68d57368d7ac3db97925df68c11a945ccd84c))
+- **builder:** Remove `unsafe*Builder`s (#8074) ([a4d1862](https://github.com/discordjs/discord.js/commit/a4d18629828234f43f03d1bd4851d4b727c6903b))
+- Make `ShardEvents` the events of `Shard` (#8185) ([c5750d5](https://github.com/discordjs/discord.js/commit/c5750d59f529ab48a5bc88a73a1c449ef6ddbffd))
+- **Util:** Make single `replace` call in `cleanContent` (#8210) ([6b20645](https://github.com/discordjs/discord.js/commit/6b206457400ce31d566b02a0c135042afb540853))
+- **ApplicationCommandManager:** Use `makeURLSearchParams` (#8196) ([cb3dca4](https://github.com/discordjs/discord.js/commit/cb3dca4ae029724421f3d04a784ace0ae2de75e2))
+- Use `Base` prefix for channel and interaction base classes (#8099) ([e24970e](https://github.com/discordjs/discord.js/commit/e24970e3c3d24f71ba711e59666cd8a49a33e33b))
+- **Constants:** Remove leftover code (#8156) ([cd17aad](https://github.com/discordjs/discord.js/commit/cd17aad720430d23af51c364caeb8b22bf6cb6b5))
+- Errors (#8068) ([e68effa](https://github.com/discordjs/discord.js/commit/e68effa822f064a324ed5b92e797c9fc3ce5e211))
+- **ClientOptions:** Remove `$` prefix from `ws.properties` keys (#8094) ([90a98fe](https://github.com/discordjs/discord.js/commit/90a98fee16b7d1d06768461f4e85127c0edf8419))
+- Use `GuildFeature` enum (#8101) ([e5ec1c4](https://github.com/discordjs/discord.js/commit/e5ec1c4dbc3fa54b2c43d1fec24932d7363e17cb))
+- **util:** Make utility functions top level (#8052) ([e53d162](https://github.com/discordjs/discord.js/commit/e53d1621986035b0c92a1782f6e013d408480e00))
+- **ApplicationCommand:** Permissions v2 (#7857) ([c7391db](https://github.com/discordjs/discord.js/commit/c7391db11b3efd4b1a6904affb26887ad06d6db4))
+- ***:** Include name/reason/etc fields into options/data params (#8026) ([9c8b310](https://github.com/discordjs/discord.js/commit/9c8b3102ce00d1f2c1255c150fb3030f8b6dd026))
+- **ThreadMemberManager:** Consistent thread member fetching (#8021) ([da9107c](https://github.com/discordjs/discord.js/commit/da9107c007536952107bd92943b6c714538d5aeb))
+- **interactions:** Remove redundant interaction typeguards (#8027) ([f57d676](https://github.com/discordjs/discord.js/commit/f57d6768ad24f6e37dc598f9c93709449d3bc4dd))
+- Move all the config files to root (#8033) ([769ea0b](https://github.com/discordjs/discord.js/commit/769ea0bfe78c4f1d413c6b397c604ffe91e39c6a))
+- **channel:** Remove redundant channel type guards (#8012) ([70c733b](https://github.com/discordjs/discord.js/commit/70c733bb9a5bde0f79e6bea0bdc416458bda4c06))
+- Always return `Message` instances in interactions (#7917) ([9720e55](https://github.com/discordjs/discord.js/commit/9720e555340431c3b3ad7bd670ad0ac7eee8865f))
+- **attachment:** Don't return attachment builders from API (#7852) ([dfadcbc](https://github.com/discordjs/discord.js/commit/dfadcbc2fd50be64c8a0c1cae3be10f83678c5ee))
+- Clean up modal submissions (#7994) ([643dab3](https://github.com/discordjs/discord.js/commit/643dab3b1b5305d002fcefed62755bbe11fc3267))
+- **ThreadChannel:** Remove `MAX` helper from threads (#7846) ([dfd9eb2](https://github.com/discordjs/discord.js/commit/dfd9eb20b2d3e0e7db26744b1f15134ac6eda139))
+- **Activity:** Remove undocumented properties (#7844) ([5ba7740](https://github.com/discordjs/discord.js/commit/5ba7740fcfefda1eeba81ace4e6351eac02522a4))
+- **MessageAttachment:** Use `Attachment` instead (#7691) ([ab4c608](https://github.com/discordjs/discord.js/commit/ab4c608b97ff319935e1a7f23564622bfd7ddd57))
+- **Util:** Remove splitting (#7780) ([54e5629](https://github.com/discordjs/discord.js/commit/54e56299865a6746744544ba25d5540a1166d27c))
+- Tidy up builders and components (#7711) ([96a0d83](https://github.com/discordjs/discord.js/commit/96a0d83a1366703ecae40b5e0d5171be9123d079))
+- Remove nickname parsing (#7736) ([78a3afc](https://github.com/discordjs/discord.js/commit/78a3afcd7fdac358e06764cc0d675e1215c785f3))
+- Remove store channels (#7634) ([aedddb8](https://github.com/discordjs/discord.js/commit/aedddb875e740e1f1bd77f06ce1b361fd3b7bc36))
+- **IntegrationApplication:** Remove `summary` (#7729) ([eb6b472](https://github.com/discordjs/discord.js/commit/eb6b472f72488cad7e96befccc00270cf6dc01b8))
+- **GuildAuditLogs:** Remove build (#7704) ([cedd053](https://github.com/discordjs/discord.js/commit/cedd0536baa1301984daf89dfda4e63a7be595a2))
+- **InteractionCollector:** Simplify constructor logic (#7667) ([07b23a9](https://github.com/discordjs/discord.js/commit/07b23a99c7088a7c740f23051f3f755f091519b0))
+- Remove undocumented checks (#7637) ([9a6e691](https://github.com/discordjs/discord.js/commit/9a6e691eaa6c3d133098b2734414590cb838de2e))
+- Allow builders to accept emoji strings (#7616) ([fb9a9c2](https://github.com/discordjs/discord.js/commit/fb9a9c221121ee1c7986f9c775b77b9691a0ae15))
+- Use `static` fields (#7701) ([e805777](https://github.com/discordjs/discord.js/commit/e805777a7a81d1dc7a2edd9741ecb04e685a3886))
+- **EmbedBuilder:** Allow hex strings in setColor (#7673) ([f472975](https://github.com/discordjs/discord.js/commit/f4729759f600372455f062c75859f084e23a5d78))
+- Don't return builders from API data (#7584) ([549716e](https://github.com/discordjs/discord.js/commit/549716e4fcec89ca81216a6d22aa8e623175e37a))
+- **embed:** Allow hex strings in `setColor()` (#7593) ([79d6c04](https://github.com/discordjs/discord.js/commit/79d6c0489c3d563fdd05de63c4fcf93a6deefce1))
+- **InteractionResponses:** Use ClientOptions.jsonTransformer (#7599) ([fac55bc](https://github.com/discordjs/discord.js/commit/fac55bcfd1e8b76aae1273415f74fa6de7aca66d))
+- Deprecate invite stage instance (#7437) ([d2bc9d4](https://github.com/discordjs/discord.js/commit/d2bc9d444f42a70a3c4cc4c68eb107bcaebec509))
+- **guild:** Move `premiumSubscriptionCount` to `AnonymousGuild` (#7451) ([6d3da22](https://github.com/discordjs/discord.js/commit/6d3da226d3c003d137639e719394a807330e4844))
+- **actions:** Use optional chaining (#7460) ([d1bb362](https://github.com/discordjs/discord.js/commit/d1bb36256f2f86022884e6ee9e05b0536cb6384d))
+- **guildbanmanager:** Rename days option to deleteMessageDays (#7447) ([0dfdb2c](https://github.com/discordjs/discord.js/commit/0dfdb2cf11e236e67dd34277108973b5b79790a8))
+- Make public builder props getters (#7422) ([e8252ed](https://github.com/discordjs/discord.js/commit/e8252ed3b981a4b7e4013f12efadd2f5d9318d3e))
+- Remove redundant API defaults (#7449) ([532846b](https://github.com/discordjs/discord.js/commit/532846b1f8260d85022a022d093553310052afc9))
+- Allow discord.js builders to accept camelCase (#7424) ([94bf727](https://github.com/discordjs/discord.js/commit/94bf727cc3a2f11c88e95cdb151b235f775cd1ca))
+- Replace `WSCodes`, `WSEvents`, and `InviteScopes` with `discord-api-types` equivalent (#7409) ([cc25455](https://github.com/discordjs/discord.js/commit/cc25455d2c75177e3eddc880b7fd53cb122387c4))
+- Make constants enums top level and `PascalCase` (#7379) ([d8184f9](https://github.com/discordjs/discord.js/commit/d8184f94dd08daab37195f52828e06af5ed1c1e0))
+- **`Bitfield`:** Use discord-api-types enums instead (#7313) ([fbb1d03](https://github.com/discordjs/discord.js/commit/fbb1d0328bcd517027ad2eedb8753d17489ed851))
+- Use `@discordjs/rest` (#7298) ([ec0fba1](https://github.com/discordjs/discord.js/commit/ec0fba1ed0d3c5b1bb18171ece6fe5ee42d48497))
+- Switch to /builders `Embed` (#7067) ([d2d3a80](https://github.com/discordjs/discord.js/commit/d2d3a80c556a104099a1ddb1b24f1b921c553257))
+- Remove transformPermissions (#7303) ([b4ed8fd](https://github.com/discordjs/discord.js/commit/b4ed8fd3ed953085cd908b2845d4384c8555d3a2))
+- Remove VoiceChannel#editable (#7291) ([164589c](https://github.com/discordjs/discord.js/commit/164589c5516a847457444d11098981d557b6778b))
+- Remove boolean option for `Webhook#fetchMessage` (#7293) ([347ff80](https://github.com/discordjs/discord.js/commit/347ff80bbc9bc5243b7f68ba5d745782eadeba21))
+- **subcommandgroup:** Required default to false (#7217) ([6112767](https://github.com/discordjs/discord.js/commit/6112767128a664f32205425f52ba52220d57834f))
+- **invite:** Make `channel` and `inviter` getters (#7278) ([18b0ed4](https://github.com/discordjs/discord.js/commit/18b0ed4cbe8285637a971c7c99ee49d18060a403))
+- Remove required from getMember (#7188) ([c90e47f](https://github.com/discordjs/discord.js/commit/c90e47f90403e5b1b3499b213dcdf2704fd96b66))
+- Remove djs components and use /builders components instead (#7252) ([101d7c5](https://github.com/discordjs/discord.js/commit/101d7c5ffa03edcf8cb8a0647b77d5c9a38e4bdd))
+- Default *URL methods to animated hash (#7149) ([7c07976](https://github.com/discordjs/discord.js/commit/7c07976018728154be0ce0314d3e8dfe8eb9ed5b))
+- Use setPosition inside edit (#7263) ([0b23b7f](https://github.com/discordjs/discord.js/commit/0b23b7f0394a20596c8d85b82870c3f35ea6b0e0))
+- Don't disable import order lint (#7262) ([0a5d5f3](https://github.com/discordjs/discord.js/commit/0a5d5f38c0b1a249fa2efe16f3b601c90622a4d5))
+- Remove discord.js enums and use discord-api-types enums instead (#7077) ([aa6d1c7](https://github.com/discordjs/discord.js/commit/aa6d1c74de01dd9a8f020c43fb2c193c4729df8d))
+- **application:** Remove fetchAssets (#7250) ([1479e40](https://github.com/discordjs/discord.js/commit/1479e40bcecc4c28ecb9f05fa4fbbdfe3bd387e1))
+- PresenceUpdate and demuxProbe (#7248) ([1745973](https://github.com/discordjs/discord.js/commit/174597302408f13c5bb685e2fb02ae2137cb481d))
+- **embeds:** Don't create new embed instances when unnecessary (#7227) ([822dc67](https://github.com/discordjs/discord.js/commit/822dc678da626de7b4fb22a747cd3cd2e8376732))
+- **GuildMember:** Throw better errors on #kickable and #bannable (#7137) ([4fd127e](https://github.com/discordjs/discord.js/commit/4fd127e79edfa1851f8a10242838f9d7aa68c8c3))
+- **SnowflakeUtil:** Switch to `@sapphire/snowflake` (#7079) ([e082dfb](https://github.com/discordjs/discord.js/commit/e082dfb1584926e4c05face5966d16e4a2921bc5))
+- **InteractionCreate:** Remove interaction event (#6326) ([ae876d9](https://github.com/discordjs/discord.js/commit/ae876d962453ccf843f8e6f70666a98a3173bb75))
+- **MessageCreate:** Remove message event (#6324) ([171e917](https://github.com/discordjs/discord.js/commit/171e917fb96b6bf39a6ad70e83be646f72fe451e))
+- **integration:** Turn undefined into null and consistency (#7209) ([13eb782](https://github.com/discordjs/discord.js/commit/13eb78256da901e6c3c405f546f36617ef5e8239))
+- Remove `deleted` field (#7092) ([cee7fd1](https://github.com/discordjs/discord.js/commit/cee7fd181c464e44eabf20b511d12589f2453722))
+- **Dates:** Save timestamps everywhere and use Date.parse (#7108) ([55e21f5](https://github.com/discordjs/discord.js/commit/55e21f53663a91863c63b6d9f3a8c35564664061))
+- **RoleManager:** Remove `comparePositions()` (#7201) ([fbbac27](https://github.com/discordjs/discord.js/commit/fbbac279789427b2c36869dc47b65fb08431e14d))
+- Better Command Terminology (#7197) ([b7856e7](https://github.com/discordjs/discord.js/commit/b7856e7809ff6fa21fe00286f885808535624f7c))
+- **Actions:** Remove deleted maps (#7076) ([5022b14](https://github.com/discordjs/discord.js/commit/5022b14da09e9b421f947e9bc385a0574cbf07d1))
+- **Client:** Remove applicationCommand events (#6492) ([6085b4f](https://github.com/discordjs/discord.js/commit/6085b4f72723d4ff82f7fea504241d14c94af21e))
+- Remove `Util.removeMentions()` (#6530) ([0c24cc8](https://github.com/discordjs/discord.js/commit/0c24cc8ec0d818315cc8f8bcf74fce060847ac79))
+- **Constants:** Change APPLICATION_COMMAND -> CHAT_INPUT_COMMAND (#7018) ([75616a3](https://github.com/discordjs/discord.js/commit/75616a305f9af33013486b13a872a39212101ce7))
+- **Guild:** Remove deprecated setXPositions methods (#6897) ([43e5e3c](https://github.com/discordjs/discord.js/commit/43e5e3c339a96fa895267d4538eee1d5e5843d05))
+- **UserFlags:** Update flag names (#6938) ([b246fc4](https://github.com/discordjs/discord.js/commit/b246fc4101b8e4957ffd1af8e2e4986a020ca211))
+
+## Styling
+
+- Cleanup tests and tsup configs ([6b8ef20](https://github.com/discordjs/discord.js/commit/6b8ef20cb3af5b5cfd176dd0aa0a1a1e98551629))
+
+## Typings
+
+- **GuildFeature:** Allow feature strings to be passed (#8264) ([b7d4e55](https://github.com/discordjs/discord.js/commit/b7d4e55419207d4e25f5c40cab221c7c04a617bf))
+- **CategoryChannelChildManager:** Fix Holds type (#8288) ([33a7a5c](https://github.com/discordjs/discord.js/commit/33a7a5cbdc00d2a5034dc1ec91fec5da7042f9d0))
+- Remove `MemberMention` (#8292) ([bf65b37](https://github.com/discordjs/discord.js/commit/bf65b37d1a9ea8417e26ad4afacea1eb45a0ff5a))
+- **GuildMemberManager:** Fix placement for `fetchMe()` (#8258) ([7525615](https://github.com/discordjs/discord.js/commit/75256153a9923d94ca709a37aaccc48dfb43c153))
+- Convert `Events` to an enum (#8246) ([feb3bdd](https://github.com/discordjs/discord.js/commit/feb3bdda0a3c3da80378c8cbcafca2968551eef9))
+- **GuildMemberManager:** Non-void return of `edit()` (#8186) ([c7a205f](https://github.com/discordjs/discord.js/commit/c7a205f7b992eea43af13a4638e2a03db7bc0d8a))
+- Add missing shard types (#8180) ([27d8deb](https://github.com/discordjs/discord.js/commit/27d8deb4716a87704370a95103b16fa1b763de18))
+- Implement `GuildChannelEditOptions` (#8184) ([b83e0c0](https://github.com/discordjs/discord.js/commit/b83e0c0caffc2b767aa1ba4412580970a6901899))
+- **Status:** Add missing members (#8179) ([8421f92](https://github.com/discordjs/discord.js/commit/8421f9203bd2d85ef8e64c3fb9a991c74223a75d))
+- **GuildScheduledEvent#scheduledStartAt:** Should be nullish (#8111) ([65dc8d6](https://github.com/discordjs/discord.js/commit/65dc8d677ee81469c0eeb4ecdd83fe2f68cc8982))
+- Fix modal builder constructor data type (#8143) ([7279f9c](https://github.com/discordjs/discord.js/commit/7279f9c31b14bc1e78c63b7298e80e37ca5dfe0c))
+- Use `ThreadAutoArchiveDuration` from discord-api-types (#8145) ([a3799f9](https://github.com/discordjs/discord.js/commit/a3799f9ebb027904830457119708d550e2009200))
+- **Shard#reconnecting:** Fix event name (#8118) ([95e6d6e](https://github.com/discordjs/discord.js/commit/95e6d6ede03c4fb92a8d8027a085e84b043fd895))
+- **ApplicationCommand:** Fix typo in setDMPermission (#8097) ([4df491c](https://github.com/discordjs/discord.js/commit/4df491ce8578a1b01ee8412a4df8137a302e7202))
+- Fix `setType()` parameter and `ChannelData.type` (#8089) ([b4e28a8](https://github.com/discordjs/discord.js/commit/b4e28a8ff6bf165c54a8726d3bc3a3cc0c1e469b))
+- Fix `ApplicationCommandPermissionsUpdate` event typings (#8071) ([9964454](https://github.com/discordjs/discord.js/commit/9964454c2944a0523399481a5f609144486e549b))
+- **AutocompleteOption:** Fix and improve types (#8069) ([476b7d5](https://github.com/discordjs/discord.js/commit/476b7d519c719152ea04e207f6dd09bb23e733db))
+- **ThreadMemberManager:** Fix return type of fetching members with no arguments (#8060) ([2392a6f](https://github.com/discordjs/discord.js/commit/2392a6f5de2efcf6b326173d26295c928b94adb6))
+- Remove isAutocomplete typeguard from typings (#8063) ([c0f079d](https://github.com/discordjs/discord.js/commit/c0f079d2325a636c83ac676c525bfa89ce308b3c))
+- **AttachmentBuilder:** Fix data type (#8016) ([7fa698d](https://github.com/discordjs/discord.js/commit/7fa698d23e548987762c4c66c96c510d9ea56eb4))
+- **modal:** Fix `showModal()` typings (#8014) ([0ccc243](https://github.com/discordjs/discord.js/commit/0ccc243c8ffbf852660c899cc2ad47bd5ebb65cb))
+- Fix some attachment related typings (#8013) ([6aa6232](https://github.com/discordjs/discord.js/commit/6aa623240ee94b117c7e69c1d09b50923a8f7a4c))
+- **AttachmentBuilder:** Remove name parameter from constructor (#8008) ([6266b0c](https://github.com/discordjs/discord.js/commit/6266b0c1e323f9522010f90f34ce6f17fcb6e769))
+- Add types to `EventEmitter` static methods (#7986) ([d60c464](https://github.com/discordjs/discord.js/commit/d60c464e618e4159d2656e7832798909832f33cd))
+- Nullify `guildScheduledEventUpdate`'s old parameter (#7955) ([fdeac9d](https://github.com/discordjs/discord.js/commit/fdeac9d9fba06c532eca296ddd8479047bc732bf))
+- Make `CacheType` generic more accurate for return values (#7868) ([e07b910](https://github.com/discordjs/discord.js/commit/e07b910e684bc3cf71fb93417951ad42351bace4))
+- **guildScheduledEvent:** Mark `entityMetadata` as nullable (#7908) ([64bdf53](https://github.com/discordjs/discord.js/commit/64bdf53116945ffb51764bb8ec539d530aefcfb1))
+- **discord.js:** Export missing enums (#7864) ([5eeef3f](https://github.com/discordjs/discord.js/commit/5eeef3f708eb900ec994d837fb4cd414a4f4b437))
+- Fix return type of `toString()` on channels (#7836) ([ece6289](https://github.com/discordjs/discord.js/commit/ece628986c7eb1a66f46076d8f8518c9ff00aaf3))
+- **Message#activity:** Make `partyId` optional and use enum for `type` (#7845) ([bfeaf85](https://github.com/discordjs/discord.js/commit/bfeaf856f76eb7cb756ac55aac13636ccdb345b6))
+- Cleanup *Data type definitions (#7716) ([585169f](https://github.com/discordjs/discord.js/commit/585169f2f097ffb1940d17f549e4290aa55acde2))
+- Fix BooleanCache never resolving to true (#7809) ([440ac24](https://github.com/discordjs/discord.js/commit/440ac243ca1d6f8cd04603e63e3f2f6ea1722ee8))
+- **CommandInteraction:** Add awaitModalSubmit (#7811) ([a6d9ce5](https://github.com/discordjs/discord.js/commit/a6d9ce57c6cae90d0afc60010cad44fdc2c2d06c))
+- **ThreadChannel:** Fix autoArchiveDuration types (#7816) ([0857476](https://github.com/discordjs/discord.js/commit/08574763eb665b5a43ccfb826929f1e3f0d1c3a7))
+- Add missing typing (#7781) ([f094e33](https://github.com/discordjs/discord.js/commit/f094e338617a1a3c9f48a325e4b8e9b5a405aa91))
+- **VoiceChannel:** Nullify property (#7793) ([446eb39](https://github.com/discordjs/discord.js/commit/446eb390ce58b7e7f60e297b25f53773a55f7fb9))
+- **ModalSubmitInteraction:** Message (#7705) ([b577bcc](https://github.com/discordjs/discord.js/commit/b577bcc1df5c6424fef9984e19a5f11c77371cf3))
+- **Embed:** Add missing getters and add video to EmbedData (#7728) ([fd1dc72](https://github.com/discordjs/discord.js/commit/fd1dc72c0a77dbe18753d8db22972dfa5fe4ab36))
+- **ModalSubmitInteraction:** Fix `components` type (#7732) ([6f4e97b](https://github.com/discordjs/discord.js/commit/6f4e97bfafe4a058f6ec85d321676401d701ee55))
+- **interactionCollector:** Filter should have a collected argument (#7753) ([e4f2705](https://github.com/discordjs/discord.js/commit/e4f27051ca921d299c302b600a8c2917e9356ef6))
+- Fix regressions (#7649) ([5748dbe](https://github.com/discordjs/discord.js/commit/5748dbe08783beb80c526de38ccd105eb0e82664))
+- **Constants:** Add `NonSystemMessageTypes` (#7678) ([9afc030](https://github.com/discordjs/discord.js/commit/9afc03054e4c8973702d6c18e618643f76382dd9))
+- Fix auto archive duration type (#7688) ([8e3b2d7](https://github.com/discordjs/discord.js/commit/8e3b2d7abd38136534969cf77c6a748ee3a20355))
+- **InteractionResponseFields:** Add webhook (#7597) ([daf2829](https://github.com/discordjs/discord.js/commit/daf2829cb58d1a44cb1f1ece21e428d1a23e99c9))
+- **Embed:** Add forgotten `footer` type (#7665) ([8fb9816](https://github.com/discordjs/discord.js/commit/8fb98165a9d098ab316475d6baacb015783eb638))
+- **ColorResolvable:** Simplify string types (#7643) ([2297c2b](https://github.com/discordjs/discord.js/commit/2297c2b9479ace16f5f7155479605a4ac2718e3d))
+- Allow component classes in action row data (#7614) ([230c0c4](https://github.com/discordjs/discord.js/commit/230c0c4cb137882ff7bab783a4aeaa83ae941de5))
+- **ActionRow:** Allow components to be passed to constructors (#7531) ([e71c76c](https://github.com/discordjs/discord.js/commit/e71c76c7f795837dbcc3576e507bd286640b4296))
+- **showModal:** Align types with the documentation (#7600) ([0d7e4ed](https://github.com/discordjs/discord.js/commit/0d7e4edd969513692c061c107be4bbe7e4b54321))
+- Modals type and doc fixes (#7608) ([93854a8](https://github.com/discordjs/discord.js/commit/93854a8013d07234cb849bfcbfa99f74a4c3cdb4))
+- **InteractionResponseFields:** Add boolean properties (#7565) ([53defb8](https://github.com/discordjs/discord.js/commit/53defb82e36108468e35077b887ee28b811891ab))
+- Allow raw components for reply and message options (#7573) ([2d4971b](https://github.com/discordjs/discord.js/commit/2d4971b032a01c05b55c93d6475e61b0d25d69d3))
+- Fix component *Data types (#7536) ([a8321d8](https://github.com/discordjs/discord.js/commit/a8321d8026df2e6a09d867939986bf77f894f3a8))
+- Use discord-api-types `Locale` (#7541) ([8346003](https://github.com/discordjs/discord.js/commit/83460037be840ba623f3b02a3e6f218943f9d2b7))
+- **anychannel:** Add PartialGroupDMChannel (#7472) ([cf66930](https://github.com/discordjs/discord.js/commit/cf669301c7be8eaecf91d7f764eccc67d7a5b4c6))
+- Remove `ApplicationCommandInteractionOptionResolver` (#7491) ([71f4fa8](https://github.com/discordjs/discord.js/commit/71f4fa82ed6206d6843345a5394119f2a728aa35))
+- **embed:** Fix timestamp allowed types (#7470) ([7959a68](https://github.com/discordjs/discord.js/commit/7959a68d8ec600af248f5506f39871cae7eeeb04))
+- Remove duplicate rate limit for thread creation (#7465) ([2d2de1d](https://github.com/discordjs/discord.js/commit/2d2de1d3fd15a098d69e09710e9a7a3352234fef))
+- Correct types for InteractionCollector guild and channel (#7452) ([6ce906a](https://github.com/discordjs/discord.js/commit/6ce906a02fcb051cb6df3e9f453ba9f53db03bd0))
+- Fix `GuildAuditLogsTypes` keys & typos (#7423) ([3d8c776](https://github.com/discordjs/discord.js/commit/3d8c77600be51a86a99b526078bb1b1fcb9a0811))
+- Remove duplicate `GuildChannelOverwriteOptions` interface (#7428) ([83458ff](https://github.com/discordjs/discord.js/commit/83458ff7c782b8efdaaac931d2dee1764dad25bf))
+- Use `GuildFeature` enum from `discord-api-types` (#7397) ([a7b80b9](https://github.com/discordjs/discord.js/commit/a7b80b9d9bf4902bd85b592986771eadf7a765dc))
+- Fix *BitField.Flags properties (#7363) ([e6a26d2](https://github.com/discordjs/discord.js/commit/e6a26d25b3cf8dfcc8aa8997b021f1774f3b754b))
+- Fix MessageMentions channel types (#7316) ([c05b388](https://github.com/discordjs/discord.js/commit/c05b38873bb3c37c6e4ebcb6b6373a8858cc03de))
+- Fix channel create overloads (#7294) ([1c6c944](https://github.com/discordjs/discord.js/commit/1c6c9449ad68601c6c98748d73be8114401d38ef))
+- Fix regressions and inconsistencies (#7260) ([26a9dc3](https://github.com/discordjs/discord.js/commit/26a9dc32062cd071917bbe7264050315b4d6dd3c))
+- **interaction:** Remove renamed typeguards (#7220) ([68b9564](https://github.com/discordjs/discord.js/commit/68b9564f1821726377a1e929a3ca1fc65b4ad598))
+- AssertType -> expectType ([3f36746](https://github.com/discordjs/discord.js/commit/3f36746561a40cd61a7cd2e054b7ef80d58fc707))
+- Fix cache types resolving to `never` (#7164) ([c978dbb](https://github.com/discordjs/discord.js/commit/c978dbb6233bcd85408caf0bca7619c9c5d508f0))
diff --git a/node_modules/discord.js/LICENSE b/node_modules/discord.js/LICENSE
new file mode 100644
index 0000000..d21f37a
--- /dev/null
+++ b/node_modules/discord.js/LICENSE
@@ -0,0 +1,191 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright 2021 Noel Buechler
+ Copyright 2015 Amish Shah
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/node_modules/discord.js/README.md b/node_modules/discord.js/README.md
new file mode 100644
index 0000000..377d40c
--- /dev/null
+++ b/node_modules/discord.js/README.md
@@ -0,0 +1,142 @@
+<div align="center">
+ <br />
+ <p>
+ <a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
+ </p>
+ <br />
+ <p>
+ <a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
+ <a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/v/discord.js.svg?maxAge=3600" alt="npm version" /></a>
+ <a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/dt/discord.js.svg?maxAge=3600" alt="npm downloads" /></a>
+ <a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Tests status" /></a>
+ <a href="https://codecov.io/gh/discordjs/discord.js" ><img src="https://codecov.io/gh/discordjs/discord.js/branch/main/graph/badge.svg?precision=2" alt="Code coverage" /></a>
+ </p>
+ <p>
+ <a href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-vercel.svg" alt="Vercel" /></a>
+ <a href="https://www.cloudflare.com"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-workers.png" alt="Cloudflare Workers" height="44" /></a>
+ </p>
+</div>
+
+## About
+
+discord.js is a powerful [Node.js](https://nodejs.org) module that allows you to easily interact with the
+[Discord API](https://discord.com/developers/docs/intro).
+
+- Object-oriented
+- Predictable abstractions
+- Performant
+- 100% coverage of the Discord API
+
+## Installation
+
+**Node.js 16.11.0 or newer is required.**
+
+```sh
+npm install discord.js
+yarn add discord.js
+pnpm add discord.js
+```
+
+### Optional packages
+
+- [zlib-sync](https://www.npmjs.com/package/zlib-sync) for WebSocket data compression and inflation (`npm install zlib-sync`)
+- [bufferutil](https://www.npmjs.com/package/bufferutil) for a much faster WebSocket connection (`npm install bufferutil`)
+- [utf-8-validate](https://www.npmjs.com/package/utf-8-validate) in combination with `bufferutil` for much faster WebSocket processing (`npm install utf-8-validate`)
+- [@discordjs/voice](https://www.npmjs.com/package/@discordjs/voice) for interacting with the Discord Voice API (`npm install @discordjs/voice`)
+
+## Example usage
+
+Install discord.js:
+
+```sh
+npm install discord.js
+yarn add discord.js
+pnpm add discord.js
+```
+
+Register a slash command against the Discord API:
+
+```js
+import { REST, Routes } from 'discord.js';
+
+const commands = [
+ {
+ name: 'ping',
+ description: 'Replies with Pong!',
+ },
+];
+
+const rest = new REST({ version: '10' }).setToken(TOKEN);
+
+try {
+ console.log('Started refreshing application (/) commands.');
+
+ await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands });
+
+ console.log('Successfully reloaded application (/) commands.');
+} catch (error) {
+ console.error(error);
+}
+```
+
+Afterwards we can create a quite simple example bot:
+
+```js
+import { Client, GatewayIntentBits } from 'discord.js';
+const client = new Client({ intents: [GatewayIntentBits.Guilds] });
+
+client.on('ready', () => {
+ console.log(`Logged in as ${client.user.tag}!`);
+});
+
+client.on('interactionCreate', async interaction => {
+ if (!interaction.isChatInputCommand()) return;
+
+ if (interaction.commandName === 'ping') {
+ await interaction.reply('Pong!');
+ }
+});
+
+client.login(TOKEN);
+```
+
+## Links
+
+- [Website][website] ([source][website-source])
+- [Documentation][documentation]
+- [Guide][guide] ([source][guide-source])
+ Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library.
+- [discord.js Discord server][discord]
+- [Discord API Discord server][discord-api]
+- [GitHub][source]
+- [npm][npm]
+- [Related libraries][related-libs]
+
+### Extensions
+
+- [RPC][rpc] ([source][rpc-source])
+
+## Contributing
+
+Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
+[documentation][documentation].
+See [the contribution guide][contributing] if you'd like to submit a PR.
+
+## Help
+
+If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord].
+
+[website]: https://discord.js.org
+[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
+[documentation]: https://discord.js.org/docs/packages/discord.js/stable
+[guide]: https://discordjs.guide/
+[guide-source]: https://github.com/discordjs/guide
+[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
+[discord]: https://discord.gg/djs
+[discord-api]: https://discord.gg/discord-api
+[source]: https://github.com/discordjs/discord.js/tree/main/packages/discord.js
+[npm]: https://www.npmjs.com/package/discord.js
+[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries
+[rpc]: https://www.npmjs.com/package/discord-rpc
+[rpc-source]: https://github.com/discordjs/RPC
+[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md
diff --git a/node_modules/discord.js/package.json b/node_modules/discord.js/package.json
new file mode 100644
index 0000000..c2ddab1
--- /dev/null
+++ b/node_modules/discord.js/package.json
@@ -0,0 +1,85 @@
+{
+ "name": "discord.js",
+ "version": "14.13.0",
+ "description": "A powerful library for interacting with the Discord API",
+ "scripts": {
+ "test": "yarn docs:test && yarn test:typescript",
+ "test:typescript": "tsc --noEmit && tsd",
+ "lint": "prettier --check . && tslint typings/index.d.ts && eslint src --format=pretty",
+ "format": "prettier --write . && eslint src --fix --format=pretty",
+ "fmt": "yarn format",
+ "docs": "docgen -i './src/*.js' './src/**/*.js' -c ./docs/index.json -r ../../ -o ./docs/docs.json",
+ "docs:test": "docgen -i './src/*.js' './src/**/*.js' -c ./docs/index.json -r ../../",
+ "prepack": "yarn lint && yarn test",
+ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/discord.js/*'",
+ "release": "cliff-jumper"
+ },
+ "main": "./src/index.js",
+ "types": "./typings/index.d.ts",
+ "directories": {
+ "lib": "src",
+ "test": "test"
+ },
+ "files": [
+ "src",
+ "typings"
+ ],
+ "contributors": [
+ "Crawl <icrawltogo@gmail.com>",
+ "Amish Shah <amishshah.2k@gmail.com>",
+ "Vlad Frangu <kingdgrizzle@gmail.com>",
+ "SpaceEEC <spaceeec@yahoo.com>",
+ "Aura Román <kyradiscord@gmail.com>"
+ ],
+ "license": "Apache-2.0",
+ "keywords": [
+ "discord",
+ "api",
+ "bot",
+ "client",
+ "node",
+ "discordapp"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/discordjs/discord.js.git",
+ "directory": "packages/discord.js"
+ },
+ "bugs": {
+ "url": "https://github.com/discordjs/discord.js/issues"
+ },
+ "homepage": "https://discord.js.org",
+ "dependencies": {
+ "@discordjs/builders": "^1.6.5",
+ "@discordjs/collection": "^1.5.3",
+ "@discordjs/formatters": "^0.3.2",
+ "@discordjs/rest": "^2.0.1",
+ "@discordjs/util": "^1.0.1",
+ "@discordjs/ws": "^1.0.1",
+ "@sapphire/snowflake": "^3.5.1",
+ "@types/ws": "^8.5.5",
+ "discord-api-types": "0.37.50",
+ "fast-deep-equal": "^3.1.3",
+ "lodash.snakecase": "^4.1.1",
+ "tslib": "^2.6.1",
+ "undici": "5.22.1",
+ "ws": "^8.13.0"
+ },
+ "devDependencies": {
+ "@discordjs/docgen": "^0.12.1",
+ "@favware/cliff-jumper": "^2.1.1",
+ "@types/node": "16.18.40",
+ "dtslint": "^4.2.1",
+ "eslint": "^8.47.0",
+ "eslint-formatter-pretty": "^5.0.0",
+ "jest": "^29.6.2",
+ "prettier": "^2.8.8",
+ "tsd": "^0.28.1",
+ "tslint": "^6.1.3",
+ "turbo": "^1.10.12",
+ "typescript": "^5.1.6"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ }
+} \ No newline at end of file
diff --git a/node_modules/discord.js/src/client/BaseClient.js b/node_modules/discord.js/src/client/BaseClient.js
new file mode 100644
index 0000000..631748c
--- /dev/null
+++ b/node_modules/discord.js/src/client/BaseClient.js
@@ -0,0 +1,83 @@
+'use strict';
+
+const EventEmitter = require('node:events');
+const { REST } = require('@discordjs/rest');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+const Options = require('../util/Options');
+const { mergeDefault, flatten } = require('../util/Util');
+
+/**
+ * The base class for all clients.
+ * @extends {EventEmitter}
+ */
+class BaseClient extends EventEmitter {
+ constructor(options = {}) {
+ super({ captureRejections: true });
+
+ if (typeof options !== 'object' || options === null) {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true);
+ }
+
+ /**
+ * The options the client was instantiated with
+ * @type {ClientOptions}
+ */
+ this.options = mergeDefault(Options.createDefault(), {
+ ...options,
+ rest: {
+ ...options.rest,
+ userAgentAppendix: options.rest?.userAgentAppendix
+ ? `${Options.userAgentAppendix} ${options.rest.userAgentAppendix}`
+ : undefined,
+ },
+ });
+
+ /**
+ * The REST manager of the client
+ * @type {REST}
+ */
+ this.rest = new REST(this.options.rest);
+ }
+
+ /**
+ * Destroys all assets used by the base client.
+ * @returns {void}
+ */
+ destroy() {
+ this.rest.clearHashSweeper();
+ this.rest.clearHandlerSweeper();
+ }
+
+ /**
+ * Increments max listeners by one, if they are not zero.
+ * @private
+ */
+ incrementMaxListeners() {
+ const maxListeners = this.getMaxListeners();
+ if (maxListeners !== 0) {
+ this.setMaxListeners(maxListeners + 1);
+ }
+ }
+
+ /**
+ * Decrements max listeners by one, if they are not zero.
+ * @private
+ */
+ decrementMaxListeners() {
+ const maxListeners = this.getMaxListeners();
+ if (maxListeners !== 0) {
+ this.setMaxListeners(maxListeners - 1);
+ }
+ }
+
+ toJSON(...props) {
+ return flatten(this, ...props);
+ }
+}
+
+module.exports = BaseClient;
+
+/**
+ * @external REST
+ * @see {@link https://discord.js.org/docs/packages/rest/stable/REST:Class}
+ */
diff --git a/node_modules/discord.js/src/client/Client.js b/node_modules/discord.js/src/client/Client.js
new file mode 100644
index 0000000..80719e8
--- /dev/null
+++ b/node_modules/discord.js/src/client/Client.js
@@ -0,0 +1,608 @@
+'use strict';
+
+const process = require('node:process');
+const { Collection } = require('@discordjs/collection');
+const { makeURLSearchParams } = require('@discordjs/rest');
+const { OAuth2Scopes, Routes } = require('discord-api-types/v10');
+const BaseClient = require('./BaseClient');
+const ActionsManager = require('./actions/ActionsManager');
+const ClientVoiceManager = require('./voice/ClientVoiceManager');
+const WebSocketManager = require('./websocket/WebSocketManager');
+const { DiscordjsError, DiscordjsTypeError, DiscordjsRangeError, ErrorCodes } = require('../errors');
+const BaseGuildEmojiManager = require('../managers/BaseGuildEmojiManager');
+const ChannelManager = require('../managers/ChannelManager');
+const GuildManager = require('../managers/GuildManager');
+const UserManager = require('../managers/UserManager');
+const ShardClientUtil = require('../sharding/ShardClientUtil');
+const ClientPresence = require('../structures/ClientPresence');
+const GuildPreview = require('../structures/GuildPreview');
+const GuildTemplate = require('../structures/GuildTemplate');
+const Invite = require('../structures/Invite');
+const { Sticker } = require('../structures/Sticker');
+const StickerPack = require('../structures/StickerPack');
+const VoiceRegion = require('../structures/VoiceRegion');
+const Webhook = require('../structures/Webhook');
+const Widget = require('../structures/Widget');
+const DataResolver = require('../util/DataResolver');
+const Events = require('../util/Events');
+const IntentsBitField = require('../util/IntentsBitField');
+const Options = require('../util/Options');
+const PermissionsBitField = require('../util/PermissionsBitField');
+const Status = require('../util/Status');
+const Sweepers = require('../util/Sweepers');
+
+/**
+ * The main hub for interacting with the Discord API, and the starting point for any bot.
+ * @extends {BaseClient}
+ */
+class Client extends BaseClient {
+ /**
+ * @param {ClientOptions} options Options for the client
+ */
+ constructor(options) {
+ super(options);
+
+ const data = require('node:worker_threads').workerData ?? process.env;
+ const defaults = Options.createDefault();
+
+ if (this.options.shards === defaults.shards) {
+ if ('SHARDS' in data) {
+ this.options.shards = JSON.parse(data.SHARDS);
+ }
+ }
+
+ if (this.options.shardCount === defaults.shardCount) {
+ if ('SHARD_COUNT' in data) {
+ this.options.shardCount = Number(data.SHARD_COUNT);
+ } else if (Array.isArray(this.options.shards)) {
+ this.options.shardCount = this.options.shards.length;
+ }
+ }
+
+ const typeofShards = typeof this.options.shards;
+
+ if (typeofShards === 'undefined' && typeof this.options.shardCount === 'number') {
+ this.options.shards = Array.from({ length: this.options.shardCount }, (_, i) => i);
+ }
+
+ if (typeofShards === 'number') this.options.shards = [this.options.shards];
+
+ if (Array.isArray(this.options.shards)) {
+ this.options.shards = [
+ ...new Set(
+ this.options.shards.filter(item => !isNaN(item) && item >= 0 && item < Infinity && item === (item | 0)),
+ ),
+ ];
+ }
+
+ this._validateOptions();
+
+ /**
+ * The WebSocket manager of the client
+ * @type {WebSocketManager}
+ */
+ this.ws = new WebSocketManager(this);
+
+ /**
+ * The action manager of the client
+ * @type {ActionsManager}
+ * @private
+ */
+ this.actions = new ActionsManager(this);
+
+ /**
+ * The voice manager of the client
+ * @type {ClientVoiceManager}
+ */
+ this.voice = new ClientVoiceManager(this);
+
+ /**
+ * Shard helpers for the client (only if the process was spawned from a {@link ShardingManager})
+ * @type {?ShardClientUtil}
+ */
+ this.shard = process.env.SHARDING_MANAGER
+ ? ShardClientUtil.singleton(this, process.env.SHARDING_MANAGER_MODE)
+ : null;
+
+ /**
+ * All of the {@link User} objects that have been cached at any point, mapped by their ids
+ * @type {UserManager}
+ */
+ this.users = new UserManager(this);
+
+ /**
+ * All of the guilds the client is currently handling, mapped by their ids -
+ * as long as sharding isn't being used, this will be *every* guild the bot is a member of
+ * @type {GuildManager}
+ */
+ this.guilds = new GuildManager(this);
+
+ /**
+ * All of the {@link BaseChannel}s that the client is currently handling, mapped by their ids -
+ * as long as sharding isn't being used, this will be *every* channel in *every* guild the bot
+ * is a member of. Note that DM channels will not be initially cached, and thus not be present
+ * in the Manager without their explicit fetching or use.
+ * @type {ChannelManager}
+ */
+ this.channels = new ChannelManager(this);
+
+ /**
+ * The sweeping functions and their intervals used to periodically sweep caches
+ * @type {Sweepers}
+ */
+ this.sweepers = new Sweepers(this, this.options.sweepers);
+
+ /**
+ * The presence of the Client
+ * @private
+ * @type {ClientPresence}
+ */
+ this.presence = new ClientPresence(this, this.options.presence);
+
+ Object.defineProperty(this, 'token', { writable: true });
+ if (!this.token && 'DISCORD_TOKEN' in process.env) {
+ /**
+ * Authorization token for the logged in bot.
+ * If present, this defaults to `process.env.DISCORD_TOKEN` when instantiating the client
+ * <warn>This should be kept private at all times.</warn>
+ * @type {?string}
+ */
+ this.token = process.env.DISCORD_TOKEN;
+ } else {
+ this.token = null;
+ }
+
+ /**
+ * User that the client is logged in as
+ * @type {?ClientUser}
+ */
+ this.user = null;
+
+ /**
+ * The application of this bot
+ * @type {?ClientApplication}
+ */
+ this.application = null;
+
+ /**
+ * Timestamp of the time the client was last {@link Status.Ready} at
+ * @type {?number}
+ */
+ this.readyTimestamp = null;
+ }
+
+ /**
+ * All custom emojis that the client has access to, mapped by their ids
+ * @type {BaseGuildEmojiManager}
+ * @readonly
+ */
+ get emojis() {
+ const emojis = new BaseGuildEmojiManager(this);
+ for (const guild of this.guilds.cache.values()) {
+ if (guild.available) for (const emoji of guild.emojis.cache.values()) emojis.cache.set(emoji.id, emoji);
+ }
+ return emojis;
+ }
+
+ /**
+ * Time at which the client was last regarded as being in the {@link Status.Ready} state
+ * (each time the client disconnects and successfully reconnects, this will be overwritten)
+ * @type {?Date}
+ * @readonly
+ */
+ get readyAt() {
+ return this.readyTimestamp && new Date(this.readyTimestamp);
+ }
+
+ /**
+ * How long it has been since the client last entered the {@link Status.Ready} state in milliseconds
+ * @type {?number}
+ * @readonly
+ */
+ get uptime() {
+ return this.readyTimestamp && Date.now() - this.readyTimestamp;
+ }
+
+ /**
+ * Logs the client in, establishing a WebSocket connection to Discord.
+ * @param {string} [token=this.token] Token of the account to log in with
+ * @returns {Promise<string>} Token of the account used
+ * @example
+ * client.login('my token');
+ */
+ async login(token = this.token) {
+ if (!token || typeof token !== 'string') throw new DiscordjsError(ErrorCodes.TokenInvalid);
+ this.token = token = token.replace(/^(Bot|Bearer)\s*/i, '');
+ this.rest.setToken(token);
+ this.emit(Events.Debug, `Provided token: ${this._censoredToken}`);
+
+ if (this.options.presence) {
+ this.options.ws.presence = this.presence._parse(this.options.presence);
+ }
+
+ this.emit(Events.Debug, 'Preparing to connect to the gateway...');
+
+ try {
+ await this.ws.connect();
+ return this.token;
+ } catch (error) {
+ await this.destroy();
+ throw error;
+ }
+ }
+
+ /**
+ * Returns whether the client has logged in, indicative of being able to access
+ * properties such as `user` and `application`.
+ * @returns {boolean}
+ */
+ isReady() {
+ return this.ws.status === Status.Ready;
+ }
+
+ /**
+ * Logs out, terminates the connection to Discord, and destroys the client.
+ * @returns {Promise<void>}
+ */
+ async destroy() {
+ super.destroy();
+
+ this.sweepers.destroy();
+ await this.ws.destroy();
+ this.token = null;
+ this.rest.setToken(null);
+ }
+
+ /**
+ * Options used for deleting a webhook.
+ * @typedef {Object} WebhookDeleteOptions
+ * @property {string} [token] Token of the webhook
+ * @property {string} [reason] The reason for deleting the webhook
+ */
+
+ /**
+ * Deletes a webhook.
+ * @param {Snowflake} id The webhook's id
+ * @param {WebhookDeleteOptions} [options] Options for deleting the webhook
+ * @returns {Promise<void>}
+ */
+ async deleteWebhook(id, { token, reason } = {}) {
+ await this.rest.delete(Routes.webhook(id, token), { auth: !token, reason });
+ }
+
+ /**
+ * Options used when fetching an invite from Discord.
+ * @typedef {Object} ClientFetchInviteOptions
+ * @property {Snowflake} [guildScheduledEventId] The id of the guild scheduled event to include with
+ * the invite
+ */
+
+ /**
+ * Obtains an invite from Discord.
+ * @param {InviteResolvable} invite Invite code or URL
+ * @param {ClientFetchInviteOptions} [options] Options for fetching the invite
+ * @returns {Promise<Invite>}
+ * @example
+ * client.fetchInvite('https://discord.gg/djs')
+ * .then(invite => console.log(`Obtained invite with code: ${invite.code}`))
+ * .catch(console.error);
+ */
+ async fetchInvite(invite, options) {
+ const code = DataResolver.resolveInviteCode(invite);
+ const query = makeURLSearchParams({
+ with_counts: true,
+ with_expiration: true,
+ guild_scheduled_event_id: options?.guildScheduledEventId,
+ });
+ const data = await this.rest.get(Routes.invite(code), { query });
+ return new Invite(this, data);
+ }
+
+ /**
+ * Obtains a template from Discord.
+ * @param {GuildTemplateResolvable} template Template code or URL
+ * @returns {Promise<GuildTemplate>}
+ * @example
+ * client.fetchGuildTemplate('https://discord.new/FKvmczH2HyUf')
+ * .then(template => console.log(`Obtained template with code: ${template.code}`))
+ * .catch(console.error);
+ */
+ async fetchGuildTemplate(template) {
+ const code = DataResolver.resolveGuildTemplateCode(template);
+ const data = await this.rest.get(Routes.template(code));
+ return new GuildTemplate(this, data);
+ }
+
+ /**
+ * Obtains a webhook from Discord.
+ * @param {Snowflake} id The webhook's id
+ * @param {string} [token] Token for the webhook
+ * @returns {Promise<Webhook>}
+ * @example
+ * client.fetchWebhook('id', 'token')
+ * .then(webhook => console.log(`Obtained webhook with name: ${webhook.name}`))
+ * .catch(console.error);
+ */
+ async fetchWebhook(id, token) {
+ const data = await this.rest.get(Routes.webhook(id, token), { auth: token === undefined });
+ return new Webhook(this, { token, ...data });
+ }
+
+ /**
+ * Obtains the available voice regions from Discord.
+ * @returns {Promise<Collection<string, VoiceRegion>>}
+ * @example
+ * client.fetchVoiceRegions()
+ * .then(regions => console.log(`Available regions are: ${regions.map(region => region.name).join(', ')}`))
+ * .catch(console.error);
+ */
+ async fetchVoiceRegions() {
+ const apiRegions = await this.rest.get(Routes.voiceRegions());
+ const regions = new Collection();
+ for (const region of apiRegions) regions.set(region.id, new VoiceRegion(region));
+ return regions;
+ }
+
+ /**
+ * Obtains a sticker from Discord.
+ * @param {Snowflake} id The sticker's id
+ * @returns {Promise<Sticker>}
+ * @example
+ * client.fetchSticker('id')
+ * .then(sticker => console.log(`Obtained sticker with name: ${sticker.name}`))
+ * .catch(console.error);
+ */
+ async fetchSticker(id) {
+ const data = await this.rest.get(Routes.sticker(id));
+ return new Sticker(this, data);
+ }
+
+ /**
+ * Obtains the list of sticker packs available to Nitro subscribers from Discord.
+ * @returns {Promise<Collection<Snowflake, StickerPack>>}
+ * @example
+ * client.fetchPremiumStickerPacks()
+ * .then(packs => console.log(`Available sticker packs are: ${packs.map(pack => pack.name).join(', ')}`))
+ * .catch(console.error);
+ */
+ async fetchPremiumStickerPacks() {
+ const data = await this.rest.get(Routes.nitroStickerPacks());
+ return new Collection(data.sticker_packs.map(p => [p.id, new StickerPack(this, p)]));
+ }
+
+ /**
+ * Obtains a guild preview from Discord, available for all guilds the bot is in and all Discoverable guilds.
+ * @param {GuildResolvable} guild The guild to fetch the preview for
+ * @returns {Promise<GuildPreview>}
+ */
+ async fetchGuildPreview(guild) {
+ const id = this.guilds.resolveId(guild);
+ if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'guild', 'GuildResolvable');
+ const data = await this.rest.get(Routes.guildPreview(id));
+ return new GuildPreview(this, data);
+ }
+
+ /**
+ * Obtains the widget data of a guild from Discord, available for guilds with the widget enabled.
+ * @param {GuildResolvable} guild The guild to fetch the widget data for
+ * @returns {Promise<Widget>}
+ */
+ async fetchGuildWidget(guild) {
+ const id = this.guilds.resolveId(guild);
+ if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'guild', 'GuildResolvable');
+ const data = await this.rest.get(Routes.guildWidgetJSON(id));
+ return new Widget(this, data);
+ }
+
+ /**
+ * Options for {@link Client#generateInvite}.
+ * @typedef {Object} InviteGenerationOptions
+ * @property {OAuth2Scopes[]} scopes Scopes that should be requested
+ * @property {PermissionResolvable} [permissions] Permissions to request
+ * @property {GuildResolvable} [guild] Guild to preselect
+ * @property {boolean} [disableGuildSelect] Whether to disable the guild selection
+ */
+
+ /**
+ * Generates a link that can be used to invite the bot to a guild.
+ * @param {InviteGenerationOptions} [options={}] Options for the invite
+ * @returns {string}
+ * @example
+ * const link = client.generateInvite({
+ * scopes: [OAuth2Scopes.ApplicationsCommands],
+ * });
+ * console.log(`Generated application invite link: ${link}`);
+ * @example
+ * const link = client.generateInvite({
+ * permissions: [
+ * PermissionFlagsBits.SendMessages,
+ * PermissionFlagsBits.ManageGuild,
+ * PermissionFlagsBits.MentionEveryone,
+ * ],
+ * scopes: [OAuth2Scopes.Bot],
+ * });
+ * console.log(`Generated bot invite link: ${link}`);
+ */
+ generateInvite(options = {}) {
+ if (typeof options !== 'object') throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true);
+ if (!this.application) throw new DiscordjsError(ErrorCodes.ClientNotReady, 'generate an invite link');
+
+ const { scopes } = options;
+ if (scopes === undefined) {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidMissingScopes);
+ }
+ if (!Array.isArray(scopes)) {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'scopes', 'Array of Invite Scopes', true);
+ }
+ if (!scopes.some(scope => [OAuth2Scopes.Bot, OAuth2Scopes.ApplicationsCommands].includes(scope))) {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidMissingScopes);
+ }
+ if (!scopes.includes(OAuth2Scopes.Bot) && options.permissions) {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidScopesWithPermissions);
+ }
+ const validScopes = Object.values(OAuth2Scopes);
+ const invalidScope = scopes.find(scope => !validScopes.includes(scope));
+ if (invalidScope) {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array', 'scopes', invalidScope);
+ }
+
+ const query = makeURLSearchParams({
+ client_id: this.application.id,
+ scope: scopes.join(' '),
+ disable_guild_select: options.disableGuildSelect,
+ });
+
+ if (options.permissions) {
+ const permissions = PermissionsBitField.resolve(options.permissions);
+ if (permissions) query.set('permissions', permissions.toString());
+ }
+
+ if (options.guild) {
+ const guildId = this.guilds.resolveId(options.guild);
+ if (!guildId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options.guild', 'GuildResolvable');
+ query.set('guild_id', guildId);
+ }
+
+ return `${this.options.rest.api}${Routes.oauth2Authorization()}?${query}`;
+ }
+
+ toJSON() {
+ return super.toJSON({
+ actions: false,
+ presence: false,
+ });
+ }
+
+ /**
+ * Partially censored client token for debug logging purposes.
+ * @type {?string}
+ * @readonly
+ * @private
+ */
+ get _censoredToken() {
+ if (!this.token) return null;
+
+ return this.token
+ .split('.')
+ .map((val, i) => (i > 1 ? val.replace(/./g, '*') : val))
+ .join('.');
+ }
+
+ /**
+ * Calls {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval} on a script
+ * with the client as `this`.
+ * @param {string} script Script to eval
+ * @returns {*}
+ * @private
+ */
+ _eval(script) {
+ return eval(script);
+ }
+
+ /**
+ * Validates the client options.
+ * @param {ClientOptions} [options=this.options] Options to validate
+ * @private
+ */
+ _validateOptions(options = this.options) {
+ if (options.intents === undefined) {
+ throw new DiscordjsTypeError(ErrorCodes.ClientMissingIntents);
+ } else {
+ options.intents = new IntentsBitField(options.intents).freeze();
+ }
+ if (typeof options.shardCount !== 'number' || isNaN(options.shardCount) || options.shardCount < 1) {
+ throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'shardCount', 'a number greater than or equal to 1');
+ }
+ if (options.shards && !(options.shards === 'auto' || Array.isArray(options.shards))) {
+ throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'shards', "'auto', a number or array of numbers");
+ }
+ if (options.shards && !options.shards.length) throw new DiscordjsRangeError(ErrorCodes.ClientInvalidProvidedShards);
+ if (typeof options.makeCache !== 'function') {
+ throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'makeCache', 'a function');
+ }
+ if (typeof options.sweepers !== 'object' || options.sweepers === null) {
+ throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'sweepers', 'an object');
+ }
+ if (!Array.isArray(options.partials)) {
+ throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'partials', 'an Array');
+ }
+ if (typeof options.waitGuildTimeout !== 'number' || isNaN(options.waitGuildTimeout)) {
+ throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'waitGuildTimeout', 'a number');
+ }
+ if (typeof options.failIfNotExists !== 'boolean') {
+ throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'failIfNotExists', 'a boolean');
+ }
+ if (
+ (typeof options.allowedMentions !== 'object' && options.allowedMentions !== undefined) ||
+ options.allowedMentions === null
+ ) {
+ throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'allowedMentions', 'an object');
+ }
+ if (typeof options.presence !== 'object' || options.presence === null) {
+ throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'presence', 'an object');
+ }
+ if (typeof options.ws !== 'object' || options.ws === null) {
+ throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'ws', 'an object');
+ }
+ if (typeof options.rest !== 'object' || options.rest === null) {
+ throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'rest', 'an object');
+ }
+ if (typeof options.jsonTransformer !== 'function') {
+ throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'jsonTransformer', 'a function');
+ }
+ }
+}
+
+module.exports = Client;
+
+/**
+ * @class SnowflakeUtil
+ * @classdesc This class is an alias for {@link https://www.npmjs.com/package/@sapphire/snowflake @sapphire/snowflake}'s
+ * `DiscordSnowflake` class.
+ *
+ * Check their documentation
+ * {@link https://www.sapphirejs.dev/docs/Documentation/api-utilities/classes/sapphire_snowflake.Snowflake here}
+ * ({@link https://www.sapphirejs.dev/docs/Guide/utilities/snowflake guide})
+ * to see what you can do.
+ * @hideconstructor
+ */
+
+/**
+ * A {@link https://developer.twitter.com/en/docs/twitter-ids Twitter snowflake},
+ * except the epoch is 2015-01-01T00:00:00.000Z.
+ *
+ * If we have a snowflake '266241948824764416' we can represent it as binary:
+ * ```
+ * 64 22 17 12 0
+ * 000000111011000111100001101001000101000000 00001 00000 000000000000
+ * number of milliseconds since Discord epoch worker pid increment
+ * ```
+ * @typedef {string} Snowflake
+ */
+
+/**
+ * Emitted for general debugging information.
+ * @event Client#debug
+ * @param {string} info The debug information
+ */
+
+/**
+ * Emitted for general warnings.
+ * @event Client#warn
+ * @param {string} info The warning
+ */
+
+/**
+ * @external Collection
+ * @see {@link https://discord.js.org/docs/packages/collection/stable/Collection:Class}
+ */
+
+/**
+ * @external ImageURLOptions
+ * @see {@link https://discord.js.org/docs/packages/rest/stable/ImageURLOptions:Interface}
+ */
+
+/**
+ * @external BaseImageURLOptions
+ * @see {@link https://discord.js.org/docs/packages/rest/stable/BaseImageURLOptions:Interface}
+ */
diff --git a/node_modules/discord.js/src/client/WebhookClient.js b/node_modules/discord.js/src/client/WebhookClient.js
new file mode 100644
index 0000000..5bb6412
--- /dev/null
+++ b/node_modules/discord.js/src/client/WebhookClient.js
@@ -0,0 +1,103 @@
+'use strict';
+
+const BaseClient = require('./BaseClient');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+const Webhook = require('../structures/Webhook');
+const { parseWebhookURL } = require('../util/Util');
+
+/**
+ * The webhook client.
+ * @implements {Webhook}
+ * @extends {BaseClient}
+ */
+class WebhookClient extends BaseClient {
+ /**
+ * Represents the credentials used for a webhook in the form of its id and token.
+ * @typedef {Object} WebhookClientDataIdWithToken
+ * @property {Snowflake} id The webhook's id
+ * @property {string} token The webhook's token
+ */
+
+ /**
+ * Represents the credentials used for a webhook in the form of a URL.
+ * @typedef {Object} WebhookClientDataURL
+ * @property {string} url The full URL for the webhook
+ */
+
+ /**
+ * Represents the credentials used for a webhook.
+ * @typedef {WebhookClientDataIdWithToken|WebhookClientDataURL} WebhookClientData
+ */
+
+ /**
+ * Options for a webhook client.
+ * @typedef {Object} WebhookClientOptions
+ * @property {MessageMentionOptions} [allowedMentions] Default value for {@link BaseMessageOptions#allowedMentions}
+ * @property {RESTOptions} [rest] Options for the REST manager
+ */
+
+ /**
+ * @param {WebhookClientData} data The data of the webhook
+ * @param {WebhookClientOptions} [options] Options for the webhook client
+ */
+ constructor(data, options) {
+ super(options);
+ Object.defineProperty(this, 'client', { value: this });
+ let { id, token } = data;
+
+ if ('url' in data) {
+ const parsed = parseWebhookURL(data.url);
+ if (!parsed) {
+ throw new DiscordjsError(ErrorCodes.WebhookURLInvalid);
+ }
+
+ ({ id, token } = parsed);
+ }
+
+ this.id = id;
+ Object.defineProperty(this, 'token', { value: token, writable: true, configurable: true });
+ }
+
+ /**
+ * The options the webhook client was instantiated with.
+ * @type {WebhookClientOptions}
+ * @name WebhookClient#options
+ */
+
+ // These are here only for documentation purposes - they are implemented by Webhook
+ /* eslint-disable no-empty-function, valid-jsdoc */
+ /**
+ * Sends a message with this webhook.
+ * @param {string|MessagePayload|WebhookMessageCreateOptions} options The content for the reply
+ * @returns {Promise<APIMessage>}
+ */
+ send() {}
+
+ /**
+ * Gets a message that was sent by this webhook.
+ * @param {Snowflake} message The id of the message to fetch
+ * @param {WebhookFetchMessageOptions} [options={}] The options to provide to fetch the message.
+ * @returns {Promise<APIMessage>} Returns the message sent by this webhook
+ */
+ fetchMessage() {}
+
+ /**
+ * Edits a message that was sent by this webhook.
+ * @param {MessageResolvable} message The message to edit
+ * @param {string|MessagePayload|WebhookMessageEditOptions} options The options to provide
+ * @returns {Promise<APIMessage>} Returns the message edited by this webhook
+ */
+ editMessage() {}
+
+ sendSlackMessage() {}
+ edit() {}
+ delete() {}
+ deleteMessage() {}
+ get createdTimestamp() {}
+ get createdAt() {}
+ get url() {}
+}
+
+Webhook.applyToClass(WebhookClient);
+
+module.exports = WebhookClient;
diff --git a/node_modules/discord.js/src/client/actions/Action.js b/node_modules/discord.js/src/client/actions/Action.js
new file mode 100644
index 0000000..6c04a64
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/Action.js
@@ -0,0 +1,120 @@
+'use strict';
+
+const Partials = require('../../util/Partials');
+
+/*
+
+ABOUT ACTIONS
+
+Actions are similar to WebSocket Packet Handlers, but since introducing
+the REST API methods, in order to prevent rewriting code to handle data,
+"actions" have been introduced. They're basically what Packet Handlers
+used to be but they're strictly for manipulating data and making sure
+that WebSocket events don't clash with REST methods.
+
+*/
+
+class GenericAction {
+ constructor(client) {
+ this.client = client;
+ }
+
+ handle(data) {
+ return data;
+ }
+
+ getPayload(data, manager, id, partialType, cache) {
+ return this.client.options.partials.includes(partialType) ? manager._add(data, cache) : manager.cache.get(id);
+ }
+
+ getChannel(data) {
+ const payloadData = {};
+ const id = data.channel_id ?? data.id;
+
+ if ('recipients' in data) {
+ payloadData.recipients = data.recipients;
+ } else {
+ // Try to resolve the recipient, but do not add the client user.
+ const recipient = data.author ?? data.user ?? { id: data.user_id };
+ if (recipient.id !== this.client.user.id) payloadData.recipients = [recipient];
+ }
+
+ if (id !== undefined) payloadData.id = id;
+ if ('guild_id' in data) payloadData.guild_id = data.guild_id;
+ if ('last_message_id' in data) payloadData.last_message_id = data.last_message_id;
+
+ return (
+ data[this.client.actions.injectedChannel] ??
+ this.getPayload(payloadData, this.client.channels, id, Partials.Channel)
+ );
+ }
+
+ getMessage(data, channel, cache) {
+ const id = data.message_id ?? data.id;
+ return (
+ data[this.client.actions.injectedMessage] ??
+ this.getPayload(
+ {
+ id,
+ channel_id: channel.id,
+ guild_id: data.guild_id ?? channel.guild?.id,
+ },
+ channel.messages,
+ id,
+ Partials.Message,
+ cache,
+ )
+ );
+ }
+
+ getReaction(data, message, user) {
+ const id = data.emoji.id ?? decodeURIComponent(data.emoji.name);
+ return this.getPayload(
+ {
+ emoji: data.emoji,
+ count: message.partial ? null : 0,
+ me: user?.id === this.client.user.id,
+ },
+ message.reactions,
+ id,
+ Partials.Reaction,
+ );
+ }
+
+ getMember(data, guild) {
+ return this.getPayload(data, guild.members, data.user.id, Partials.GuildMember);
+ }
+
+ getUser(data) {
+ const id = data.user_id;
+ return data[this.client.actions.injectedUser] ?? this.getPayload({ id }, this.client.users, id, Partials.User);
+ }
+
+ getUserFromMember(data) {
+ if (data.guild_id && data.member?.user) {
+ const guild = this.client.guilds.cache.get(data.guild_id);
+ if (guild) {
+ return guild.members._add(data.member).user;
+ } else {
+ return this.client.users._add(data.member.user);
+ }
+ }
+ return this.getUser(data);
+ }
+
+ getScheduledEvent(data, guild) {
+ const id = data.guild_scheduled_event_id ?? data.id;
+ return this.getPayload(
+ { id, guild_id: data.guild_id ?? guild.id },
+ guild.scheduledEvents,
+ id,
+ Partials.GuildScheduledEvent,
+ );
+ }
+
+ getThreadMember(id, manager) {
+ return this.getPayload({ user_id: id }, manager, id, Partials.ThreadMember, false);
+ }
+}
+
+module.exports = GenericAction;
diff --git a/node_modules/discord.js/src/client/actions/ActionsManager.js b/node_modules/discord.js/src/client/actions/ActionsManager.js
new file mode 100644
index 0000000..301a6a9
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/ActionsManager.js
@@ -0,0 +1,79 @@
+'use strict';
+
+class ActionsManager {
+ // These symbols represent fully built data that we inject at times when calling actions manually.
+ // Action#getUser, for example, will return the injected data (which is assumed to be a built structure)
+ // instead of trying to make it from provided data
+ injectedUser = Symbol('djs.actions.injectedUser');
+ injectedChannel = Symbol('djs.actions.injectedChannel');
+ injectedMessage = Symbol('djs.actions.injectedMessage');
+
+ constructor(client) {
+ this.client = client;
+
+ this.register(require('./ApplicationCommandPermissionsUpdate'));
+ this.register(require('./AutoModerationActionExecution'));
+ this.register(require('./AutoModerationRuleCreate'));
+ this.register(require('./AutoModerationRuleDelete'));
+ this.register(require('./AutoModerationRuleUpdate'));
+ this.register(require('./ChannelCreate'));
+ this.register(require('./ChannelDelete'));
+ this.register(require('./ChannelUpdate'));
+ this.register(require('./GuildAuditLogEntryCreate'));
+ this.register(require('./GuildBanAdd'));
+ this.register(require('./GuildBanRemove'));
+ this.register(require('./GuildChannelsPositionUpdate'));
+ this.register(require('./GuildDelete'));
+ this.register(require('./GuildEmojiCreate'));
+ this.register(require('./GuildEmojiDelete'));
+ this.register(require('./GuildEmojiUpdate'));
+ this.register(require('./GuildEmojisUpdate'));
+ this.register(require('./GuildIntegrationsUpdate'));
+ this.register(require('./GuildMemberRemove'));
+ this.register(require('./GuildMemberUpdate'));
+ this.register(require('./GuildRoleCreate'));
+ this.register(require('./GuildRoleDelete'));
+ this.register(require('./GuildRoleUpdate'));
+ this.register(require('./GuildRolesPositionUpdate'));
+ this.register(require('./GuildScheduledEventCreate'));
+ this.register(require('./GuildScheduledEventDelete'));
+ this.register(require('./GuildScheduledEventUpdate'));
+ this.register(require('./GuildScheduledEventUserAdd'));
+ this.register(require('./GuildScheduledEventUserRemove'));
+ this.register(require('./GuildStickerCreate'));
+ this.register(require('./GuildStickerDelete'));
+ this.register(require('./GuildStickerUpdate'));
+ this.register(require('./GuildStickersUpdate'));
+ this.register(require('./GuildUpdate'));
+ this.register(require('./InteractionCreate'));
+ this.register(require('./InviteCreate'));
+ this.register(require('./InviteDelete'));
+ this.register(require('./MessageCreate'));
+ this.register(require('./MessageDelete'));
+ this.register(require('./MessageDeleteBulk'));
+ this.register(require('./MessageReactionAdd'));
+ this.register(require('./MessageReactionRemove'));
+ this.register(require('./MessageReactionRemoveAll'));
+ this.register(require('./MessageReactionRemoveEmoji'));
+ this.register(require('./MessageUpdate'));
+ this.register(require('./PresenceUpdate'));
+ this.register(require('./StageInstanceCreate'));
+ this.register(require('./StageInstanceDelete'));
+ this.register(require('./StageInstanceUpdate'));
+ this.register(require('./ThreadCreate'));
+ this.register(require('./ThreadDelete'));
+ this.register(require('./ThreadListSync'));
+ this.register(require('./ThreadMemberUpdate'));
+ this.register(require('./ThreadMembersUpdate'));
+ this.register(require('./TypingStart'));
+ this.register(require('./UserUpdate'));
+ this.register(require('./VoiceStateUpdate'));
+ this.register(require('./WebhooksUpdate'));
+ }
+
+ register(Action) {
+ this[Action.name.replace(/Action$/, '')] = new Action(this.client);
+ }
+}
+
+module.exports = ActionsManager;
diff --git a/node_modules/discord.js/src/client/actions/ApplicationCommandPermissionsUpdate.js b/node_modules/discord.js/src/client/actions/ApplicationCommandPermissionsUpdate.js
new file mode 100644
index 0000000..f2bc214
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/ApplicationCommandPermissionsUpdate.js
@@ -0,0 +1,34 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+/**
+ * The data received in the {@link Client#event:applicationCommandPermissionsUpdate} event
+ * @typedef {Object} ApplicationCommandPermissionsUpdateData
+ * @property {Snowflake} id The id of the command or global entity that was updated
+ * @property {Snowflake} guildId The id of the guild in which permissions were updated
+ * @property {Snowflake} applicationId The id of the application that owns the command or entity being updated
+ * @property {ApplicationCommandPermissions[]} permissions The updated permissions
+ */
+
+class ApplicationCommandPermissionsUpdateAction extends Action {
+ handle(data) {
+ const client = this.client;
+ /**
+ * Emitted whenever permissions for an application command in a guild were updated.
+ * <warn>This includes permission updates for other applications in addition to the logged in client,
+ * check `data.applicationId` to verify which application the update is for</warn>
+ * @event Client#applicationCommandPermissionsUpdate
+ * @param {ApplicationCommandPermissionsUpdateData} data The updated permissions
+ */
+ client.emit(Events.ApplicationCommandPermissionsUpdate, {
+ permissions: data.permissions,
+ id: data.id,
+ guildId: data.guild_id,
+ applicationId: data.application_id,
+ });
+ }
+}
+
+module.exports = ApplicationCommandPermissionsUpdateAction;
diff --git a/node_modules/discord.js/src/client/actions/AutoModerationActionExecution.js b/node_modules/discord.js/src/client/actions/AutoModerationActionExecution.js
new file mode 100644
index 0000000..ad60116
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/AutoModerationActionExecution.js
@@ -0,0 +1,26 @@
+'use strict';
+
+const Action = require('./Action');
+const AutoModerationActionExecution = require('../../structures/AutoModerationActionExecution');
+const Events = require('../../util/Events');
+
+class AutoModerationActionExecutionAction extends Action {
+ handle(data) {
+ const { client } = this;
+ const guild = client.guilds.cache.get(data.guild_id);
+
+ if (guild) {
+ /**
+ * Emitted whenever an auto moderation rule is triggered.
+ * <info>This event requires the {@link PermissionFlagsBits.ManageGuild} permission.</info>
+ * @event Client#autoModerationActionExecution
+ * @param {AutoModerationActionExecution} autoModerationActionExecution The data of the execution
+ */
+ client.emit(Events.AutoModerationActionExecution, new AutoModerationActionExecution(data, guild));
+ }
+
+ return {};
+ }
+}
+
+module.exports = AutoModerationActionExecutionAction;
diff --git a/node_modules/discord.js/src/client/actions/AutoModerationRuleCreate.js b/node_modules/discord.js/src/client/actions/AutoModerationRuleCreate.js
new file mode 100644
index 0000000..775b1d3
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/AutoModerationRuleCreate.js
@@ -0,0 +1,27 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class AutoModerationRuleCreateAction extends Action {
+ handle(data) {
+ const { client } = this;
+ const guild = client.guilds.cache.get(data.guild_id);
+
+ if (guild) {
+ const autoModerationRule = guild.autoModerationRules._add(data);
+
+ /**
+ * Emitted whenever an auto moderation rule is created.
+ * <info>This event requires the {@link PermissionFlagsBits.ManageGuild} permission.</info>
+ * @event Client#autoModerationRuleCreate
+ * @param {AutoModerationRule} autoModerationRule The created auto moderation rule
+ */
+ client.emit(Events.AutoModerationRuleCreate, autoModerationRule);
+ }
+
+ return {};
+ }
+}
+
+module.exports = AutoModerationRuleCreateAction;
diff --git a/node_modules/discord.js/src/client/actions/AutoModerationRuleDelete.js b/node_modules/discord.js/src/client/actions/AutoModerationRuleDelete.js
new file mode 100644
index 0000000..641822c
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/AutoModerationRuleDelete.js
@@ -0,0 +1,31 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class AutoModerationRuleDeleteAction extends Action {
+ handle(data) {
+ const { client } = this;
+ const guild = client.guilds.cache.get(data.guild_id);
+
+ if (guild) {
+ const autoModerationRule = guild.autoModerationRules.cache.get(data.id);
+
+ if (autoModerationRule) {
+ guild.autoModerationRules.cache.delete(autoModerationRule.id);
+
+ /**
+ * Emitted whenever an auto moderation rule is deleted.
+ * <info>This event requires the {@link PermissionFlagsBits.ManageGuild} permission.</info>
+ * @event Client#autoModerationRuleDelete
+ * @param {AutoModerationRule} autoModerationRule The deleted auto moderation rule
+ */
+ client.emit(Events.AutoModerationRuleDelete, autoModerationRule);
+ }
+ }
+
+ return {};
+ }
+}
+
+module.exports = AutoModerationRuleDeleteAction;
diff --git a/node_modules/discord.js/src/client/actions/AutoModerationRuleUpdate.js b/node_modules/discord.js/src/client/actions/AutoModerationRuleUpdate.js
new file mode 100644
index 0000000..56e3956
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/AutoModerationRuleUpdate.js
@@ -0,0 +1,29 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class AutoModerationRuleUpdateAction extends Action {
+ handle(data) {
+ const { client } = this;
+ const guild = client.guilds.cache.get(data.guild_id);
+
+ if (guild) {
+ const oldAutoModerationRule = guild.autoModerationRules.cache.get(data.id)?._clone() ?? null;
+ const newAutoModerationRule = guild.autoModerationRules._add(data);
+
+ /**
+ * Emitted whenever an auto moderation rule gets updated.
+ * <info>This event requires the {@link PermissionFlagsBits.ManageGuild} permission.</info>
+ * @event Client#autoModerationRuleUpdate
+ * @param {?AutoModerationRule} oldAutoModerationRule The auto moderation rule before the update
+ * @param {AutoModerationRule} newAutoModerationRule The auto moderation rule after the update
+ */
+ client.emit(Events.AutoModerationRuleUpdate, oldAutoModerationRule, newAutoModerationRule);
+ }
+
+ return {};
+ }
+}
+
+module.exports = AutoModerationRuleUpdateAction;
diff --git a/node_modules/discord.js/src/client/actions/ChannelCreate.js b/node_modules/discord.js/src/client/actions/ChannelCreate.js
new file mode 100644
index 0000000..fdf8ddd
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/ChannelCreate.js
@@ -0,0 +1,23 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class ChannelCreateAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const existing = client.channels.cache.has(data.id);
+ const channel = client.channels._add(data);
+ if (!existing && channel) {
+ /**
+ * Emitted whenever a guild channel is created.
+ * @event Client#channelCreate
+ * @param {GuildChannel} channel The channel that was created
+ */
+ client.emit(Events.ChannelCreate, channel);
+ }
+ return { channel };
+ }
+}
+
+module.exports = ChannelCreateAction;
diff --git a/node_modules/discord.js/src/client/actions/ChannelDelete.js b/node_modules/discord.js/src/client/actions/ChannelDelete.js
new file mode 100644
index 0000000..acf03d9
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/ChannelDelete.js
@@ -0,0 +1,23 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class ChannelDeleteAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const channel = client.channels.cache.get(data.id);
+
+ if (channel) {
+ client.channels._remove(channel.id);
+ /**
+ * Emitted whenever a channel is deleted.
+ * @event Client#channelDelete
+ * @param {DMChannel|GuildChannel} channel The channel that was deleted
+ */
+ client.emit(Events.ChannelDelete, channel);
+ }
+ }
+}
+
+module.exports = ChannelDeleteAction;
diff --git a/node_modules/discord.js/src/client/actions/ChannelUpdate.js b/node_modules/discord.js/src/client/actions/ChannelUpdate.js
new file mode 100644
index 0000000..7ca331a
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/ChannelUpdate.js
@@ -0,0 +1,42 @@
+'use strict';
+
+const Action = require('./Action');
+const { createChannel } = require('../../util/Channels');
+
+class ChannelUpdateAction extends Action {
+ handle(data) {
+ const client = this.client;
+ let channel = client.channels.cache.get(data.id);
+
+ if (channel) {
+ const old = channel._update(data);
+
+ if (channel.type !== data.type) {
+ const newChannel = createChannel(this.client, data, channel.guild);
+
+ if (!newChannel) {
+ this.client.channels.cache.delete(channel.id);
+ return {};
+ }
+
+ if (channel.isTextBased() && newChannel.isTextBased()) {
+ for (const [id, message] of channel.messages.cache) newChannel.messages.cache.set(id, message);
+ }
+
+ channel = newChannel;
+ this.client.channels.cache.set(channel.id, channel);
+ }
+
+ return {
+ old,
+ updated: channel,
+ };
+ } else {
+ client.channels._add(data);
+ }
+
+ return {};
+ }
+}
+
+module.exports = ChannelUpdateAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildAuditLogEntryCreate.js b/node_modules/discord.js/src/client/actions/GuildAuditLogEntryCreate.js
new file mode 100644
index 0000000..fa16de6
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildAuditLogEntryCreate.js
@@ -0,0 +1,29 @@
+'use strict';
+
+const Action = require('./Action');
+const GuildAuditLogsEntry = require('../../structures/GuildAuditLogsEntry');
+const Events = require('../../util/Events');
+
+class GuildAuditLogEntryCreateAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const guild = client.guilds.cache.get(data.guild_id);
+ let auditLogEntry;
+
+ if (guild) {
+ auditLogEntry = new GuildAuditLogsEntry(guild, data);
+
+ /**
+ * Emitted whenever a guild audit log entry is created.
+ * @event Client#guildAuditLogEntryCreate
+ * @param {GuildAuditLogsEntry} auditLogEntry The entry that was created
+ * @param {Guild} guild The guild where the entry was created
+ */
+ client.emit(Events.GuildAuditLogEntryCreate, auditLogEntry, guild);
+ }
+
+ return { auditLogEntry };
+ }
+}
+
+module.exports = GuildAuditLogEntryCreateAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildBanAdd.js b/node_modules/discord.js/src/client/actions/GuildBanAdd.js
new file mode 100644
index 0000000..2ef4b11
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildBanAdd.js
@@ -0,0 +1,20 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildBanAdd extends Action {
+ handle(data) {
+ const client = this.client;
+ const guild = client.guilds.cache.get(data.guild_id);
+
+ /**
+ * Emitted whenever a member is banned from a guild.
+ * @event Client#guildBanAdd
+ * @param {GuildBan} ban The ban that occurred
+ */
+ if (guild) client.emit(Events.GuildBanAdd, guild.bans._add(data));
+ }
+}
+
+module.exports = GuildBanAdd;
diff --git a/node_modules/discord.js/src/client/actions/GuildBanRemove.js b/node_modules/discord.js/src/client/actions/GuildBanRemove.js
new file mode 100644
index 0000000..8048efd
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildBanRemove.js
@@ -0,0 +1,25 @@
+'use strict';
+
+const Action = require('./Action');
+const GuildBan = require('../../structures/GuildBan');
+const Events = require('../../util/Events');
+
+class GuildBanRemove extends Action {
+ handle(data) {
+ const client = this.client;
+ const guild = client.guilds.cache.get(data.guild_id);
+
+ /**
+ * Emitted whenever a member is unbanned from a guild.
+ * @event Client#guildBanRemove
+ * @param {GuildBan} ban The ban that was removed
+ */
+ if (guild) {
+ const ban = guild.bans.cache.get(data.user.id) ?? new GuildBan(client, data, guild);
+ guild.bans.cache.delete(ban.user.id);
+ client.emit(Events.GuildBanRemove, ban);
+ }
+ }
+}
+
+module.exports = GuildBanRemove;
diff --git a/node_modules/discord.js/src/client/actions/GuildChannelsPositionUpdate.js b/node_modules/discord.js/src/client/actions/GuildChannelsPositionUpdate.js
new file mode 100644
index 0000000..a393167
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildChannelsPositionUpdate.js
@@ -0,0 +1,21 @@
+'use strict';
+
+const Action = require('./Action');
+
+class GuildChannelsPositionUpdate extends Action {
+ handle(data) {
+ const client = this.client;
+
+ const guild = client.guilds.cache.get(data.guild_id);
+ if (guild) {
+ for (const partialChannel of data.channels) {
+ const channel = guild.channels.cache.get(partialChannel.id);
+ if (channel) channel.rawPosition = partialChannel.position;
+ }
+ }
+
+ return { guild };
+ }
+}
+
+module.exports = GuildChannelsPositionUpdate;
diff --git a/node_modules/discord.js/src/client/actions/GuildDelete.js b/node_modules/discord.js/src/client/actions/GuildDelete.js
new file mode 100644
index 0000000..eb0a44d
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildDelete.js
@@ -0,0 +1,44 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildDeleteAction extends Action {
+ handle(data) {
+ const client = this.client;
+
+ let guild = client.guilds.cache.get(data.id);
+ if (guild) {
+ if (data.unavailable) {
+ // Guild is unavailable
+ guild.available = false;
+
+ /**
+ * Emitted whenever a guild becomes unavailable, likely due to a server outage.
+ * @event Client#guildUnavailable
+ * @param {Guild} guild The guild that has become unavailable
+ */
+ client.emit(Events.GuildUnavailable, guild);
+
+ // Stops the GuildDelete packet thinking a guild was actually deleted,
+ // handles emitting of event itself
+ return;
+ }
+
+ for (const channel of guild.channels.cache.values()) this.client.channels._remove(channel.id);
+ client.voice.adapters.get(data.id)?.destroy();
+
+ // Delete guild
+ client.guilds.cache.delete(guild.id);
+
+ /**
+ * Emitted whenever a guild kicks the client or the guild is deleted/left.
+ * @event Client#guildDelete
+ * @param {Guild} guild The guild that was deleted
+ */
+ client.emit(Events.GuildDelete, guild);
+ }
+ }
+}
+
+module.exports = GuildDeleteAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildEmojiCreate.js b/node_modules/discord.js/src/client/actions/GuildEmojiCreate.js
new file mode 100644
index 0000000..61858cf
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildEmojiCreate.js
@@ -0,0 +1,20 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildEmojiCreateAction extends Action {
+ handle(guild, createdEmoji) {
+ const already = guild.emojis.cache.has(createdEmoji.id);
+ const emoji = guild.emojis._add(createdEmoji);
+ /**
+ * Emitted whenever a custom emoji is created in a guild.
+ * @event Client#emojiCreate
+ * @param {GuildEmoji} emoji The emoji that was created
+ */
+ if (!already) this.client.emit(Events.GuildEmojiCreate, emoji);
+ return { emoji };
+ }
+}
+
+module.exports = GuildEmojiCreateAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildEmojiDelete.js b/node_modules/discord.js/src/client/actions/GuildEmojiDelete.js
new file mode 100644
index 0000000..e3373c2
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildEmojiDelete.js
@@ -0,0 +1,19 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildEmojiDeleteAction extends Action {
+ handle(emoji) {
+ emoji.guild.emojis.cache.delete(emoji.id);
+ /**
+ * Emitted whenever a custom emoji is deleted in a guild.
+ * @event Client#emojiDelete
+ * @param {GuildEmoji} emoji The emoji that was deleted
+ */
+ this.client.emit(Events.GuildEmojiDelete, emoji);
+ return { emoji };
+ }
+}
+
+module.exports = GuildEmojiDeleteAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildEmojiUpdate.js b/node_modules/discord.js/src/client/actions/GuildEmojiUpdate.js
new file mode 100644
index 0000000..6bf9657
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildEmojiUpdate.js
@@ -0,0 +1,20 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildEmojiUpdateAction extends Action {
+ handle(current, data) {
+ const old = current._update(data);
+ /**
+ * Emitted whenever a custom emoji is updated in a guild.
+ * @event Client#emojiUpdate
+ * @param {GuildEmoji} oldEmoji The old emoji
+ * @param {GuildEmoji} newEmoji The new emoji
+ */
+ this.client.emit(Events.GuildEmojiUpdate, old, current);
+ return { emoji: current };
+ }
+}
+
+module.exports = GuildEmojiUpdateAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildEmojisUpdate.js b/node_modules/discord.js/src/client/actions/GuildEmojisUpdate.js
new file mode 100644
index 0000000..7829db1
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildEmojisUpdate.js
@@ -0,0 +1,34 @@
+'use strict';
+
+const Action = require('./Action');
+
+class GuildEmojisUpdateAction extends Action {
+ handle(data) {
+ const guild = this.client.guilds.cache.get(data.guild_id);
+ if (!guild?.emojis) return;
+
+ const deletions = new Map(guild.emojis.cache);
+
+ for (const emoji of data.emojis) {
+ // Determine type of emoji event
+ const cachedEmoji = guild.emojis.cache.get(emoji.id);
+ if (cachedEmoji) {
+ deletions.delete(emoji.id);
+ if (!cachedEmoji.equals(emoji)) {
+ // Emoji updated
+ this.client.actions.GuildEmojiUpdate.handle(cachedEmoji, emoji);
+ }
+ } else {
+ // Emoji added
+ this.client.actions.GuildEmojiCreate.handle(guild, emoji);
+ }
+ }
+
+ for (const emoji of deletions.values()) {
+ // Emoji deleted
+ this.client.actions.GuildEmojiDelete.handle(emoji);
+ }
+ }
+}
+
+module.exports = GuildEmojisUpdateAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildIntegrationsUpdate.js b/node_modules/discord.js/src/client/actions/GuildIntegrationsUpdate.js
new file mode 100644
index 0000000..28b9bbb
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildIntegrationsUpdate.js
@@ -0,0 +1,19 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildIntegrationsUpdate extends Action {
+ handle(data) {
+ const client = this.client;
+ const guild = client.guilds.cache.get(data.guild_id);
+ /**
+ * Emitted whenever a guild integration is updated
+ * @event Client#guildIntegrationsUpdate
+ * @param {Guild} guild The guild whose integrations were updated
+ */
+ if (guild) client.emit(Events.GuildIntegrationsUpdate, guild);
+ }
+}
+
+module.exports = GuildIntegrationsUpdate;
diff --git a/node_modules/discord.js/src/client/actions/GuildMemberRemove.js b/node_modules/discord.js/src/client/actions/GuildMemberRemove.js
new file mode 100644
index 0000000..45eb6c4
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildMemberRemove.js
@@ -0,0 +1,31 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+const Status = require('../../util/Status');
+
+class GuildMemberRemoveAction extends Action {
+ handle(data, shard) {
+ const client = this.client;
+ const guild = client.guilds.cache.get(data.guild_id);
+ let member = null;
+ if (guild) {
+ member = this.getMember({ user: data.user }, guild);
+ guild.memberCount--;
+ if (member) {
+ guild.members.cache.delete(member.id);
+ /**
+ * Emitted whenever a member leaves a guild, or is kicked.
+ * @event Client#guildMemberRemove
+ * @param {GuildMember} member The member that has left/been kicked from the guild
+ */
+ if (shard.status === Status.Ready) client.emit(Events.GuildMemberRemove, member);
+ }
+ guild.presences.cache.delete(data.user.id);
+ guild.voiceStates.cache.delete(data.user.id);
+ }
+ return { guild, member };
+ }
+}
+
+module.exports = GuildMemberRemoveAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildMemberUpdate.js b/node_modules/discord.js/src/client/actions/GuildMemberUpdate.js
new file mode 100644
index 0000000..491b361
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildMemberUpdate.js
@@ -0,0 +1,44 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+const Status = require('../../util/Status');
+
+class GuildMemberUpdateAction extends Action {
+ handle(data, shard) {
+ const { client } = this;
+ if (data.user.username) {
+ const user = client.users.cache.get(data.user.id);
+ if (!user) {
+ client.users._add(data.user);
+ } else if (!user._equals(data.user)) {
+ client.actions.UserUpdate.handle(data.user);
+ }
+ }
+
+ const guild = client.guilds.cache.get(data.guild_id);
+ if (guild) {
+ const member = this.getMember({ user: data.user }, guild);
+ if (member) {
+ const old = member._update(data);
+ /**
+ * Emitted whenever a guild member changes - i.e. new role, removed role, nickname.
+ * @event Client#guildMemberUpdate
+ * @param {GuildMember} oldMember The member before the update
+ * @param {GuildMember} newMember The member after the update
+ */
+ if (shard.status === Status.Ready && !member.equals(old)) client.emit(Events.GuildMemberUpdate, old, member);
+ } else {
+ const newMember = guild.members._add(data);
+ /**
+ * Emitted whenever a member becomes available.
+ * @event Client#guildMemberAvailable
+ * @param {GuildMember} member The member that became available
+ */
+ this.client.emit(Events.GuildMemberAvailable, newMember);
+ }
+ }
+ }
+}
+
+module.exports = GuildMemberUpdateAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildRoleCreate.js b/node_modules/discord.js/src/client/actions/GuildRoleCreate.js
new file mode 100644
index 0000000..461443b
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildRoleCreate.js
@@ -0,0 +1,25 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildRoleCreate extends Action {
+ handle(data) {
+ const client = this.client;
+ const guild = client.guilds.cache.get(data.guild_id);
+ let role;
+ if (guild) {
+ const already = guild.roles.cache.has(data.role.id);
+ role = guild.roles._add(data.role);
+ /**
+ * Emitted whenever a role is created.
+ * @event Client#roleCreate
+ * @param {Role} role The role that was created
+ */
+ if (!already) client.emit(Events.GuildRoleCreate, role);
+ }
+ return { role };
+ }
+}
+
+module.exports = GuildRoleCreate;
diff --git a/node_modules/discord.js/src/client/actions/GuildRoleDelete.js b/node_modules/discord.js/src/client/actions/GuildRoleDelete.js
new file mode 100644
index 0000000..e043a1a
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildRoleDelete.js
@@ -0,0 +1,29 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildRoleDeleteAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const guild = client.guilds.cache.get(data.guild_id);
+ let role;
+
+ if (guild) {
+ role = guild.roles.cache.get(data.role_id);
+ if (role) {
+ guild.roles.cache.delete(data.role_id);
+ /**
+ * Emitted whenever a guild role is deleted.
+ * @event Client#roleDelete
+ * @param {Role} role The role that was deleted
+ */
+ client.emit(Events.GuildRoleDelete, role);
+ }
+ }
+
+ return { role };
+ }
+}
+
+module.exports = GuildRoleDeleteAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildRoleUpdate.js b/node_modules/discord.js/src/client/actions/GuildRoleUpdate.js
new file mode 100644
index 0000000..b0632c5
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildRoleUpdate.js
@@ -0,0 +1,39 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildRoleUpdateAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const guild = client.guilds.cache.get(data.guild_id);
+
+ if (guild) {
+ let old = null;
+
+ const role = guild.roles.cache.get(data.role.id);
+ if (role) {
+ old = role._update(data.role);
+ /**
+ * Emitted whenever a guild role is updated.
+ * @event Client#roleUpdate
+ * @param {Role} oldRole The role before the update
+ * @param {Role} newRole The role after the update
+ */
+ client.emit(Events.GuildRoleUpdate, old, role);
+ }
+
+ return {
+ old,
+ updated: role,
+ };
+ }
+
+ return {
+ old: null,
+ updated: null,
+ };
+ }
+}
+
+module.exports = GuildRoleUpdateAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildRolesPositionUpdate.js b/node_modules/discord.js/src/client/actions/GuildRolesPositionUpdate.js
new file mode 100644
index 0000000..d7abca9
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildRolesPositionUpdate.js
@@ -0,0 +1,21 @@
+'use strict';
+
+const Action = require('./Action');
+
+class GuildRolesPositionUpdate extends Action {
+ handle(data) {
+ const client = this.client;
+
+ const guild = client.guilds.cache.get(data.guild_id);
+ if (guild) {
+ for (const partialRole of data.roles) {
+ const role = guild.roles.cache.get(partialRole.id);
+ if (role) role.rawPosition = partialRole.position;
+ }
+ }
+
+ return { guild };
+ }
+}
+
+module.exports = GuildRolesPositionUpdate;
diff --git a/node_modules/discord.js/src/client/actions/GuildScheduledEventCreate.js b/node_modules/discord.js/src/client/actions/GuildScheduledEventCreate.js
new file mode 100644
index 0000000..0a2fb9b
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildScheduledEventCreate.js
@@ -0,0 +1,27 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildScheduledEventCreateAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const guild = client.guilds.cache.get(data.guild_id);
+ if (guild) {
+ const guildScheduledEvent = guild.scheduledEvents._add(data);
+
+ /**
+ * Emitted whenever a guild scheduled event is created.
+ * @event Client#guildScheduledEventCreate
+ * @param {GuildScheduledEvent} guildScheduledEvent The created guild scheduled event
+ */
+ client.emit(Events.GuildScheduledEventCreate, guildScheduledEvent);
+
+ return { guildScheduledEvent };
+ }
+
+ return {};
+ }
+}
+
+module.exports = GuildScheduledEventCreateAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildScheduledEventDelete.js b/node_modules/discord.js/src/client/actions/GuildScheduledEventDelete.js
new file mode 100644
index 0000000..636bfc5
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildScheduledEventDelete.js
@@ -0,0 +1,31 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildScheduledEventDeleteAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const guild = client.guilds.cache.get(data.guild_id);
+
+ if (guild) {
+ const guildScheduledEvent = this.getScheduledEvent(data, guild);
+ if (guildScheduledEvent) {
+ guild.scheduledEvents.cache.delete(guildScheduledEvent.id);
+
+ /**
+ * Emitted whenever a guild scheduled event is deleted.
+ * @event Client#guildScheduledEventDelete
+ * @param {GuildScheduledEvent} guildScheduledEvent The deleted guild scheduled event
+ */
+ client.emit(Events.GuildScheduledEventDelete, guildScheduledEvent);
+
+ return { guildScheduledEvent };
+ }
+ }
+
+ return {};
+ }
+}
+
+module.exports = GuildScheduledEventDeleteAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildScheduledEventUpdate.js b/node_modules/discord.js/src/client/actions/GuildScheduledEventUpdate.js
new file mode 100644
index 0000000..7cabd85
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildScheduledEventUpdate.js
@@ -0,0 +1,30 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildScheduledEventUpdateAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const guild = client.guilds.cache.get(data.guild_id);
+
+ if (guild) {
+ const oldGuildScheduledEvent = guild.scheduledEvents.cache.get(data.id)?._clone() ?? null;
+ const newGuildScheduledEvent = guild.scheduledEvents._add(data);
+
+ /**
+ * Emitted whenever a guild scheduled event gets updated.
+ * @event Client#guildScheduledEventUpdate
+ * @param {?GuildScheduledEvent} oldGuildScheduledEvent The guild scheduled event object before the update
+ * @param {GuildScheduledEvent} newGuildScheduledEvent The guild scheduled event object after the update
+ */
+ client.emit(Events.GuildScheduledEventUpdate, oldGuildScheduledEvent, newGuildScheduledEvent);
+
+ return { oldGuildScheduledEvent, newGuildScheduledEvent };
+ }
+
+ return {};
+ }
+}
+
+module.exports = GuildScheduledEventUpdateAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildScheduledEventUserAdd.js b/node_modules/discord.js/src/client/actions/GuildScheduledEventUserAdd.js
new file mode 100644
index 0000000..03520db
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildScheduledEventUserAdd.js
@@ -0,0 +1,32 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildScheduledEventUserAddAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const guild = client.guilds.cache.get(data.guild_id);
+
+ if (guild) {
+ const guildScheduledEvent = this.getScheduledEvent(data, guild);
+ const user = this.getUser(data);
+
+ if (guildScheduledEvent && user) {
+ /**
+ * Emitted whenever a user subscribes to a guild scheduled event
+ * @event Client#guildScheduledEventUserAdd
+ * @param {GuildScheduledEvent} guildScheduledEvent The guild scheduled event
+ * @param {User} user The user who subscribed
+ */
+ client.emit(Events.GuildScheduledEventUserAdd, guildScheduledEvent, user);
+
+ return { guildScheduledEvent, user };
+ }
+ }
+
+ return {};
+ }
+}
+
+module.exports = GuildScheduledEventUserAddAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildScheduledEventUserRemove.js b/node_modules/discord.js/src/client/actions/GuildScheduledEventUserRemove.js
new file mode 100644
index 0000000..2a04849
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildScheduledEventUserRemove.js
@@ -0,0 +1,32 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildScheduledEventUserRemoveAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const guild = client.guilds.cache.get(data.guild_id);
+
+ if (guild) {
+ const guildScheduledEvent = this.getScheduledEvent(data, guild);
+ const user = this.getUser(data);
+
+ if (guildScheduledEvent && user) {
+ /**
+ * Emitted whenever a user unsubscribes from a guild scheduled event
+ * @event Client#guildScheduledEventUserRemove
+ * @param {GuildScheduledEvent} guildScheduledEvent The guild scheduled event
+ * @param {User} user The user who unsubscribed
+ */
+ client.emit(Events.GuildScheduledEventUserRemove, guildScheduledEvent, user);
+
+ return { guildScheduledEvent, user };
+ }
+ }
+
+ return {};
+ }
+}
+
+module.exports = GuildScheduledEventUserRemoveAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildStickerCreate.js b/node_modules/discord.js/src/client/actions/GuildStickerCreate.js
new file mode 100644
index 0000000..7d81de9
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildStickerCreate.js
@@ -0,0 +1,20 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildStickerCreateAction extends Action {
+ handle(guild, createdSticker) {
+ const already = guild.stickers.cache.has(createdSticker.id);
+ const sticker = guild.stickers._add(createdSticker);
+ /**
+ * Emitted whenever a custom sticker is created in a guild.
+ * @event Client#stickerCreate
+ * @param {Sticker} sticker The sticker that was created
+ */
+ if (!already) this.client.emit(Events.GuildStickerCreate, sticker);
+ return { sticker };
+ }
+}
+
+module.exports = GuildStickerCreateAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildStickerDelete.js b/node_modules/discord.js/src/client/actions/GuildStickerDelete.js
new file mode 100644
index 0000000..7fd6b57
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildStickerDelete.js
@@ -0,0 +1,19 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildStickerDeleteAction extends Action {
+ handle(sticker) {
+ sticker.guild.stickers.cache.delete(sticker.id);
+ /**
+ * Emitted whenever a custom sticker is deleted in a guild.
+ * @event Client#stickerDelete
+ * @param {Sticker} sticker The sticker that was deleted
+ */
+ this.client.emit(Events.GuildStickerDelete, sticker);
+ return { sticker };
+ }
+}
+
+module.exports = GuildStickerDeleteAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildStickerUpdate.js b/node_modules/discord.js/src/client/actions/GuildStickerUpdate.js
new file mode 100644
index 0000000..5561c7e
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildStickerUpdate.js
@@ -0,0 +1,20 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildStickerUpdateAction extends Action {
+ handle(current, data) {
+ const old = current._update(data);
+ /**
+ * Emitted whenever a custom sticker is updated in a guild.
+ * @event Client#stickerUpdate
+ * @param {Sticker} oldSticker The old sticker
+ * @param {Sticker} newSticker The new sticker
+ */
+ this.client.emit(Events.GuildStickerUpdate, old, current);
+ return { sticker: current };
+ }
+}
+
+module.exports = GuildStickerUpdateAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildStickersUpdate.js b/node_modules/discord.js/src/client/actions/GuildStickersUpdate.js
new file mode 100644
index 0000000..ccf1d63
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildStickersUpdate.js
@@ -0,0 +1,34 @@
+'use strict';
+
+const Action = require('./Action');
+
+class GuildStickersUpdateAction extends Action {
+ handle(data) {
+ const guild = this.client.guilds.cache.get(data.guild_id);
+ if (!guild?.stickers) return;
+
+ const deletions = new Map(guild.stickers.cache);
+
+ for (const sticker of data.stickers) {
+ // Determine type of sticker event
+ const cachedSticker = guild.stickers.cache.get(sticker.id);
+ if (cachedSticker) {
+ deletions.delete(sticker.id);
+ if (!cachedSticker.equals(sticker)) {
+ // Sticker updated
+ this.client.actions.GuildStickerUpdate.handle(cachedSticker, sticker);
+ }
+ } else {
+ // Sticker added
+ this.client.actions.GuildStickerCreate.handle(guild, sticker);
+ }
+ }
+
+ for (const sticker of deletions.values()) {
+ // Sticker deleted
+ this.client.actions.GuildStickerDelete.handle(sticker);
+ }
+ }
+}
+
+module.exports = GuildStickersUpdateAction;
diff --git a/node_modules/discord.js/src/client/actions/GuildUpdate.js b/node_modules/discord.js/src/client/actions/GuildUpdate.js
new file mode 100644
index 0000000..ef1f51b
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/GuildUpdate.js
@@ -0,0 +1,33 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class GuildUpdateAction extends Action {
+ handle(data) {
+ const client = this.client;
+
+ const guild = client.guilds.cache.get(data.id);
+ if (guild) {
+ const old = guild._update(data);
+ /**
+ * Emitted whenever a guild is updated - e.g. name change.
+ * @event Client#guildUpdate
+ * @param {Guild} oldGuild The guild before the update
+ * @param {Guild} newGuild The guild after the update
+ */
+ client.emit(Events.GuildUpdate, old, guild);
+ return {
+ old,
+ updated: guild,
+ };
+ }
+
+ return {
+ old: null,
+ updated: null,
+ };
+ }
+}
+
+module.exports = GuildUpdateAction;
diff --git a/node_modules/discord.js/src/client/actions/InteractionCreate.js b/node_modules/discord.js/src/client/actions/InteractionCreate.js
new file mode 100644
index 0000000..434fb0c
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/InteractionCreate.js
@@ -0,0 +1,101 @@
+'use strict';
+
+const { InteractionType, ComponentType, ApplicationCommandType } = require('discord-api-types/v10');
+const Action = require('./Action');
+const AutocompleteInteraction = require('../../structures/AutocompleteInteraction');
+const ButtonInteraction = require('../../structures/ButtonInteraction');
+const ChannelSelectMenuInteraction = require('../../structures/ChannelSelectMenuInteraction');
+const ChatInputCommandInteraction = require('../../structures/ChatInputCommandInteraction');
+const MentionableSelectMenuInteraction = require('../../structures/MentionableSelectMenuInteraction');
+const MessageContextMenuCommandInteraction = require('../../structures/MessageContextMenuCommandInteraction');
+const ModalSubmitInteraction = require('../../structures/ModalSubmitInteraction');
+const RoleSelectMenuInteraction = require('../../structures/RoleSelectMenuInteraction');
+const StringSelectMenuInteraction = require('../../structures/StringSelectMenuInteraction');
+const UserContextMenuCommandInteraction = require('../../structures/UserContextMenuCommandInteraction');
+const UserSelectMenuInteraction = require('../../structures/UserSelectMenuInteraction');
+const Events = require('../../util/Events');
+
+class InteractionCreateAction extends Action {
+ handle(data) {
+ const client = this.client;
+
+ // Resolve and cache partial channels for Interaction#channel getter
+ const channel = data.channel && this.getChannel(data.channel);
+
+ // Do not emit this for interactions that cache messages that are non-text-based.
+ let InteractionClass;
+
+ switch (data.type) {
+ case InteractionType.ApplicationCommand:
+ switch (data.data.type) {
+ case ApplicationCommandType.ChatInput:
+ InteractionClass = ChatInputCommandInteraction;
+ break;
+ case ApplicationCommandType.User:
+ InteractionClass = UserContextMenuCommandInteraction;
+ break;
+ case ApplicationCommandType.Message:
+ if (channel && !channel.isTextBased()) return;
+ InteractionClass = MessageContextMenuCommandInteraction;
+ break;
+ default:
+ client.emit(
+ Events.Debug,
+ `[INTERACTION] Received application command interaction with unknown type: ${data.data.type}`,
+ );
+ return;
+ }
+ break;
+ case InteractionType.MessageComponent:
+ if (channel && !channel.isTextBased()) return;
+
+ switch (data.data.component_type) {
+ case ComponentType.Button:
+ InteractionClass = ButtonInteraction;
+ break;
+ case ComponentType.StringSelect:
+ InteractionClass = StringSelectMenuInteraction;
+ break;
+ case ComponentType.UserSelect:
+ InteractionClass = UserSelectMenuInteraction;
+ break;
+ case ComponentType.RoleSelect:
+ InteractionClass = RoleSelectMenuInteraction;
+ break;
+ case ComponentType.MentionableSelect:
+ InteractionClass = MentionableSelectMenuInteraction;
+ break;
+ case ComponentType.ChannelSelect:
+ InteractionClass = ChannelSelectMenuInteraction;
+ break;
+ default:
+ client.emit(
+ Events.Debug,
+ `[INTERACTION] Received component interaction with unknown type: ${data.data.component_type}`,
+ );
+ return;
+ }
+ break;
+ case InteractionType.ApplicationCommandAutocomplete:
+ InteractionClass = AutocompleteInteraction;
+ break;
+ case InteractionType.ModalSubmit:
+ InteractionClass = ModalSubmitInteraction;
+ break;
+ default:
+ client.emit(Events.Debug, `[INTERACTION] Received interaction with unknown type: ${data.type}`);
+ return;
+ }
+
+ const interaction = new InteractionClass(client, data);
+
+ /**
+ * Emitted when an interaction is created.
+ * @event Client#interactionCreate
+ * @param {BaseInteraction} interaction The interaction which was created
+ */
+ client.emit(Events.InteractionCreate, interaction);
+ }
+}
+
+module.exports = InteractionCreateAction;
diff --git a/node_modules/discord.js/src/client/actions/InviteCreate.js b/node_modules/discord.js/src/client/actions/InviteCreate.js
new file mode 100644
index 0000000..dc03f07
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/InviteCreate.js
@@ -0,0 +1,27 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class InviteCreateAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const channel = client.channels.cache.get(data.channel_id);
+ const guild = client.guilds.cache.get(data.guild_id);
+ if (!channel) return false;
+
+ const inviteData = Object.assign(data, { channel, guild });
+ const invite = guild.invites._add(inviteData);
+
+ /**
+ * Emitted when an invite is created.
+ * <info>This event requires the {@link PermissionFlagsBits.ManageChannels} permission for the channel.</info>
+ * @event Client#inviteCreate
+ * @param {Invite} invite The invite that was created
+ */
+ client.emit(Events.InviteCreate, invite);
+ return { invite };
+ }
+}
+
+module.exports = InviteCreateAction;
diff --git a/node_modules/discord.js/src/client/actions/InviteDelete.js b/node_modules/discord.js/src/client/actions/InviteDelete.js
new file mode 100644
index 0000000..58be00c
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/InviteDelete.js
@@ -0,0 +1,29 @@
+'use strict';
+
+const Action = require('./Action');
+const Invite = require('../../structures/Invite');
+const Events = require('../../util/Events');
+
+class InviteDeleteAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const channel = client.channels.cache.get(data.channel_id);
+ const guild = client.guilds.cache.get(data.guild_id);
+ if (!channel) return false;
+
+ const inviteData = Object.assign(data, { channel, guild });
+ const invite = new Invite(client, inviteData);
+ guild.invites.cache.delete(invite.code);
+
+ /**
+ * Emitted when an invite is deleted.
+ * <info>This event requires the {@link PermissionFlagsBits.ManageChannels} permission for the channel.</info>
+ * @event Client#inviteDelete
+ * @param {Invite} invite The invite that was deleted
+ */
+ client.emit(Events.InviteDelete, invite);
+ return { invite };
+ }
+}
+
+module.exports = InviteDeleteAction;
diff --git a/node_modules/discord.js/src/client/actions/MessageCreate.js b/node_modules/discord.js/src/client/actions/MessageCreate.js
new file mode 100644
index 0000000..8e011fc
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/MessageCreate.js
@@ -0,0 +1,37 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class MessageCreateAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const channel = this.getChannel(data);
+ if (channel) {
+ if (!channel.isTextBased()) return {};
+
+ if (channel.isThread()) {
+ channel.messageCount++;
+ channel.totalMessageSent++;
+ }
+
+ const existing = channel.messages.cache.get(data.id);
+ if (existing) return { message: existing };
+ const message = channel.messages._add(data);
+ channel.lastMessageId = data.id;
+
+ /**
+ * Emitted whenever a message is created.
+ * @event Client#messageCreate
+ * @param {Message} message The created message
+ */
+ client.emit(Events.MessageCreate, message);
+
+ return { message };
+ }
+
+ return {};
+ }
+}
+
+module.exports = MessageCreateAction;
diff --git a/node_modules/discord.js/src/client/actions/MessageDelete.js b/node_modules/discord.js/src/client/actions/MessageDelete.js
new file mode 100644
index 0000000..f0c74d7
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/MessageDelete.js
@@ -0,0 +1,32 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class MessageDeleteAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const channel = this.getChannel(data);
+ let message;
+ if (channel) {
+ if (!channel.isTextBased()) return {};
+
+ if (channel.isThread()) channel.messageCount--;
+
+ message = this.getMessage(data, channel);
+ if (message) {
+ channel.messages.cache.delete(message.id);
+ /**
+ * Emitted whenever a message is deleted.
+ * @event Client#messageDelete
+ * @param {Message} message The deleted message
+ */
+ client.emit(Events.MessageDelete, message);
+ }
+ }
+
+ return { message };
+ }
+}
+
+module.exports = MessageDeleteAction;
diff --git a/node_modules/discord.js/src/client/actions/MessageDeleteBulk.js b/node_modules/discord.js/src/client/actions/MessageDeleteBulk.js
new file mode 100644
index 0000000..5f61d19
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/MessageDeleteBulk.js
@@ -0,0 +1,47 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class MessageDeleteBulkAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const channel = client.channels.cache.get(data.channel_id);
+
+ if (channel) {
+ if (!channel.isTextBased()) return {};
+
+ if (channel.isThread()) channel.messageCount -= data.ids.length;
+
+ const ids = data.ids;
+ const messages = new Collection();
+ for (const id of ids) {
+ const message = this.getMessage(
+ {
+ id,
+ guild_id: data.guild_id,
+ },
+ channel,
+ false,
+ );
+ if (message) {
+ messages.set(message.id, message);
+ channel.messages.cache.delete(id);
+ }
+ }
+
+ /**
+ * Emitted whenever messages are deleted in bulk.
+ * @event Client#messageDeleteBulk
+ * @param {Collection<Snowflake, Message>} messages The deleted messages, mapped by their id
+ * @param {GuildTextBasedChannel} channel The channel that the messages were deleted in
+ */
+ if (messages.size > 0) client.emit(Events.MessageBulkDelete, messages, channel);
+ return { messages };
+ }
+ return {};
+ }
+}
+
+module.exports = MessageDeleteBulkAction;
diff --git a/node_modules/discord.js/src/client/actions/MessageReactionAdd.js b/node_modules/discord.js/src/client/actions/MessageReactionAdd.js
new file mode 100644
index 0000000..ea97bd6
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/MessageReactionAdd.js
@@ -0,0 +1,55 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+const Partials = require('../../util/Partials');
+
+/*
+{ user_id: 'id',
+ message_id: 'id',
+ emoji: { name: '�', id: null },
+ channel_id: 'id',
+ // If originating from a guild
+ guild_id: 'id',
+ member: { ..., user: { ... } } }
+*/
+
+class MessageReactionAdd extends Action {
+ handle(data, fromStructure = false) {
+ if (!data.emoji) return false;
+
+ const user = this.getUserFromMember(data);
+ if (!user) return false;
+
+ // Verify channel
+ const channel = this.getChannel(data);
+ if (!channel?.isTextBased()) return false;
+
+ // Verify message
+ const message = this.getMessage(data, channel);
+ if (!message) return false;
+
+ // Verify reaction
+ const includePartial = this.client.options.partials.includes(Partials.Reaction);
+ if (message.partial && !includePartial) return false;
+ const reaction = message.reactions._add({
+ emoji: data.emoji,
+ count: message.partial ? null : 0,
+ me: user.id === this.client.user.id,
+ });
+ if (!reaction) return false;
+ reaction._add(user);
+ if (fromStructure) return { message, reaction, user };
+ /**
+ * Emitted whenever a reaction is added to a cached message.
+ * @event Client#messageReactionAdd
+ * @param {MessageReaction} messageReaction The reaction object
+ * @param {User} user The user that applied the guild or reaction emoji
+ */
+ this.client.emit(Events.MessageReactionAdd, reaction, user);
+
+ return { message, reaction, user };
+ }
+}
+
+module.exports = MessageReactionAdd;
diff --git a/node_modules/discord.js/src/client/actions/MessageReactionRemove.js b/node_modules/discord.js/src/client/actions/MessageReactionRemove.js
new file mode 100644
index 0000000..9ca3a8e
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/MessageReactionRemove.js
@@ -0,0 +1,45 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+/*
+{ user_id: 'id',
+ message_id: 'id',
+ emoji: { name: '�', id: null },
+ channel_id: 'id',
+ guild_id: 'id' }
+*/
+
+class MessageReactionRemove extends Action {
+ handle(data) {
+ if (!data.emoji) return false;
+
+ const user = this.getUser(data);
+ if (!user) return false;
+
+ // Verify channel
+ const channel = this.getChannel(data);
+ if (!channel?.isTextBased()) return false;
+
+ // Verify message
+ const message = this.getMessage(data, channel);
+ if (!message) return false;
+
+ // Verify reaction
+ const reaction = this.getReaction(data, message, user);
+ if (!reaction) return false;
+ reaction._remove(user);
+ /**
+ * Emitted whenever a reaction is removed from a cached message.
+ * @event Client#messageReactionRemove
+ * @param {MessageReaction} messageReaction The reaction object
+ * @param {User} user The user whose emoji or reaction emoji was removed
+ */
+ this.client.emit(Events.MessageReactionRemove, reaction, user);
+
+ return { message, reaction, user };
+ }
+}
+
+module.exports = MessageReactionRemove;
diff --git a/node_modules/discord.js/src/client/actions/MessageReactionRemoveAll.js b/node_modules/discord.js/src/client/actions/MessageReactionRemoveAll.js
new file mode 100644
index 0000000..b1c023f
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/MessageReactionRemoveAll.js
@@ -0,0 +1,33 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class MessageReactionRemoveAll extends Action {
+ handle(data) {
+ // Verify channel
+ const channel = this.getChannel(data);
+ if (!channel?.isTextBased()) return false;
+
+ // Verify message
+ const message = this.getMessage(data, channel);
+ if (!message) return false;
+
+ // Copy removed reactions to emit for the event.
+ const removed = message.reactions.cache.clone();
+
+ message.reactions.cache.clear();
+ this.client.emit(Events.MessageReactionRemoveAll, message, removed);
+
+ return { message };
+ }
+}
+
+/**
+ * Emitted whenever all reactions are removed from a cached message.
+ * @event Client#messageReactionRemoveAll
+ * @param {Message} message The message the reactions were removed from
+ * @param {Collection<string|Snowflake, MessageReaction>} reactions The cached message reactions that were removed.
+ */
+
+module.exports = MessageReactionRemoveAll;
diff --git a/node_modules/discord.js/src/client/actions/MessageReactionRemoveEmoji.js b/node_modules/discord.js/src/client/actions/MessageReactionRemoveEmoji.js
new file mode 100644
index 0000000..3290214
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/MessageReactionRemoveEmoji.js
@@ -0,0 +1,28 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class MessageReactionRemoveEmoji extends Action {
+ handle(data) {
+ const channel = this.getChannel(data);
+ if (!channel?.isTextBased()) return false;
+
+ const message = this.getMessage(data, channel);
+ if (!message) return false;
+
+ const reaction = this.getReaction(data, message);
+ if (!reaction) return false;
+ if (!message.partial) message.reactions.cache.delete(reaction.emoji.id ?? reaction.emoji.name);
+
+ /**
+ * Emitted when a bot removes an emoji reaction from a cached message.
+ * @event Client#messageReactionRemoveEmoji
+ * @param {MessageReaction} reaction The reaction that was removed
+ */
+ this.client.emit(Events.MessageReactionRemoveEmoji, reaction);
+ return { reaction };
+ }
+}
+
+module.exports = MessageReactionRemoveEmoji;
diff --git a/node_modules/discord.js/src/client/actions/MessageUpdate.js b/node_modules/discord.js/src/client/actions/MessageUpdate.js
new file mode 100644
index 0000000..fe757c0
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/MessageUpdate.js
@@ -0,0 +1,26 @@
+'use strict';
+
+const Action = require('./Action');
+
+class MessageUpdateAction extends Action {
+ handle(data) {
+ const channel = this.getChannel(data);
+ if (channel) {
+ if (!channel.isTextBased()) return {};
+
+ const { id, channel_id, guild_id, author, timestamp, type } = data;
+ const message = this.getMessage({ id, channel_id, guild_id, author, timestamp, type }, channel);
+ if (message) {
+ const old = message._update(data);
+ return {
+ old,
+ updated: message,
+ };
+ }
+ }
+
+ return {};
+ }
+}
+
+module.exports = MessageUpdateAction;
diff --git a/node_modules/discord.js/src/client/actions/PresenceUpdate.js b/node_modules/discord.js/src/client/actions/PresenceUpdate.js
new file mode 100644
index 0000000..0b4aaab
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/PresenceUpdate.js
@@ -0,0 +1,42 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class PresenceUpdateAction extends Action {
+ handle(data) {
+ let user = this.client.users.cache.get(data.user.id);
+ if (!user && data.user.username) user = this.client.users._add(data.user);
+ if (!user) return;
+
+ if (data.user.username) {
+ if (!user._equals(data.user)) this.client.actions.UserUpdate.handle(data.user);
+ }
+
+ const guild = this.client.guilds.cache.get(data.guild_id);
+ if (!guild) return;
+
+ const oldPresence = guild.presences.cache.get(user.id)?._clone() ?? null;
+ let member = guild.members.cache.get(user.id);
+ if (!member && data.status !== 'offline') {
+ member = guild.members._add({
+ user,
+ deaf: false,
+ mute: false,
+ });
+ this.client.emit(Events.GuildMemberAvailable, member);
+ }
+ const newPresence = guild.presences._add(Object.assign(data, { guild }));
+ if (this.client.listenerCount(Events.PresenceUpdate) && !newPresence.equals(oldPresence)) {
+ /**
+ * Emitted whenever a guild member's presence (e.g. status, activity) is changed.
+ * @event Client#presenceUpdate
+ * @param {?Presence} oldPresence The presence before the update, if one at all
+ * @param {Presence} newPresence The presence after the update
+ */
+ this.client.emit(Events.PresenceUpdate, oldPresence, newPresence);
+ }
+ }
+}
+
+module.exports = PresenceUpdateAction;
diff --git a/node_modules/discord.js/src/client/actions/StageInstanceCreate.js b/node_modules/discord.js/src/client/actions/StageInstanceCreate.js
new file mode 100644
index 0000000..4edd530
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/StageInstanceCreate.js
@@ -0,0 +1,28 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class StageInstanceCreateAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const channel = this.getChannel(data);
+
+ if (channel) {
+ const stageInstance = channel.guild.stageInstances._add(data);
+
+ /**
+ * Emitted whenever a stage instance is created.
+ * @event Client#stageInstanceCreate
+ * @param {StageInstance} stageInstance The created stage instance
+ */
+ client.emit(Events.StageInstanceCreate, stageInstance);
+
+ return { stageInstance };
+ }
+
+ return {};
+ }
+}
+
+module.exports = StageInstanceCreateAction;
diff --git a/node_modules/discord.js/src/client/actions/StageInstanceDelete.js b/node_modules/discord.js/src/client/actions/StageInstanceDelete.js
new file mode 100644
index 0000000..0d5da38
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/StageInstanceDelete.js
@@ -0,0 +1,31 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class StageInstanceDeleteAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const channel = this.getChannel(data);
+
+ if (channel) {
+ const stageInstance = channel.guild.stageInstances._add(data);
+ if (stageInstance) {
+ channel.guild.stageInstances.cache.delete(stageInstance.id);
+
+ /**
+ * Emitted whenever a stage instance is deleted.
+ * @event Client#stageInstanceDelete
+ * @param {StageInstance} stageInstance The deleted stage instance
+ */
+ client.emit(Events.StageInstanceDelete, stageInstance);
+
+ return { stageInstance };
+ }
+ }
+
+ return {};
+ }
+}
+
+module.exports = StageInstanceDeleteAction;
diff --git a/node_modules/discord.js/src/client/actions/StageInstanceUpdate.js b/node_modules/discord.js/src/client/actions/StageInstanceUpdate.js
new file mode 100644
index 0000000..008a53c
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/StageInstanceUpdate.js
@@ -0,0 +1,30 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class StageInstanceUpdateAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const channel = this.getChannel(data);
+
+ if (channel) {
+ const oldStageInstance = channel.guild.stageInstances.cache.get(data.id)?._clone() ?? null;
+ const newStageInstance = channel.guild.stageInstances._add(data);
+
+ /**
+ * Emitted whenever a stage instance gets updated - e.g. change in topic or privacy level
+ * @event Client#stageInstanceUpdate
+ * @param {?StageInstance} oldStageInstance The stage instance before the update
+ * @param {StageInstance} newStageInstance The stage instance after the update
+ */
+ client.emit(Events.StageInstanceUpdate, oldStageInstance, newStageInstance);
+
+ return { oldStageInstance, newStageInstance };
+ }
+
+ return {};
+ }
+}
+
+module.exports = StageInstanceUpdateAction;
diff --git a/node_modules/discord.js/src/client/actions/ThreadCreate.js b/node_modules/discord.js/src/client/actions/ThreadCreate.js
new file mode 100644
index 0000000..a8ff6c6
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/ThreadCreate.js
@@ -0,0 +1,24 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class ThreadCreateAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const existing = client.channels.cache.has(data.id);
+ const thread = client.channels._add(data);
+ if (!existing && thread) {
+ /**
+ * Emitted whenever a thread is created or when the client user is added to a thread.
+ * @event Client#threadCreate
+ * @param {ThreadChannel} thread The thread that was created
+ * @param {boolean} newlyCreated Whether the thread was newly created
+ */
+ client.emit(Events.ThreadCreate, thread, data.newly_created ?? false);
+ }
+ return { thread };
+ }
+}
+
+module.exports = ThreadCreateAction;
diff --git a/node_modules/discord.js/src/client/actions/ThreadDelete.js b/node_modules/discord.js/src/client/actions/ThreadDelete.js
new file mode 100644
index 0000000..3ec81a4
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/ThreadDelete.js
@@ -0,0 +1,26 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class ThreadDeleteAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const thread = client.channels.cache.get(data.id);
+
+ if (thread) {
+ client.channels._remove(thread.id);
+
+ /**
+ * Emitted whenever a thread is deleted.
+ * @event Client#threadDelete
+ * @param {ThreadChannel} thread The thread that was deleted
+ */
+ client.emit(Events.ThreadDelete, thread);
+ }
+
+ return { thread };
+ }
+}
+
+module.exports = ThreadDeleteAction;
diff --git a/node_modules/discord.js/src/client/actions/ThreadListSync.js b/node_modules/discord.js/src/client/actions/ThreadListSync.js
new file mode 100644
index 0000000..b16fb85
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/ThreadListSync.js
@@ -0,0 +1,60 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class ThreadListSyncAction extends Action {
+ handle(data) {
+ const client = this.client;
+
+ const guild = client.guilds.cache.get(data.guild_id);
+ if (!guild) return {};
+
+ if (data.channel_ids) {
+ for (const id of data.channel_ids) {
+ const channel = client.channels.resolve(id);
+ if (channel) this.removeStale(channel);
+ }
+ } else {
+ for (const channel of guild.channels.cache.values()) {
+ this.removeStale(channel);
+ }
+ }
+
+ const syncedThreads = data.threads.reduce((coll, rawThread) => {
+ const thread = client.channels._add(rawThread);
+ return coll.set(thread.id, thread);
+ }, new Collection());
+
+ for (const rawMember of Object.values(data.members)) {
+ // Discord sends the thread id as id in this object
+ const thread = client.channels.cache.get(rawMember.id);
+ if (thread) {
+ thread.members._add(rawMember);
+ }
+ }
+
+ /**
+ * Emitted whenever the client user gains access to a text or news channel that contains threads
+ * @event Client#threadListSync
+ * @param {Collection<Snowflake, ThreadChannel>} threads The threads that were synced
+ * @param {Guild} guild The guild that the threads were synced in
+ */
+ client.emit(Events.ThreadListSync, syncedThreads, guild);
+
+ return {
+ syncedThreads,
+ };
+ }
+
+ removeStale(channel) {
+ channel.threads?.cache.forEach(thread => {
+ if (!thread.archived) {
+ this.client.channels._remove(thread.id);
+ }
+ });
+ }
+}
+
+module.exports = ThreadListSyncAction;
diff --git a/node_modules/discord.js/src/client/actions/ThreadMemberUpdate.js b/node_modules/discord.js/src/client/actions/ThreadMemberUpdate.js
new file mode 100644
index 0000000..0b17f70
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/ThreadMemberUpdate.js
@@ -0,0 +1,30 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class ThreadMemberUpdateAction extends Action {
+ handle(data) {
+ const client = this.client;
+ // Discord sends the thread id as id in this object
+ const thread = client.channels.cache.get(data.id);
+ if (thread) {
+ const member = thread.members.cache.get(data.user_id);
+ if (!member) {
+ const newMember = thread.members._add(data);
+ return { newMember };
+ }
+ const old = member._update(data);
+ /**
+ * Emitted whenever the client user's thread member is updated.
+ * @event Client#threadMemberUpdate
+ * @param {ThreadMember} oldMember The member before the update
+ * @param {ThreadMember} newMember The member after the update
+ */
+ client.emit(Events.ThreadMemberUpdate, old, member);
+ }
+ return {};
+ }
+}
+
+module.exports = ThreadMemberUpdateAction;
diff --git a/node_modules/discord.js/src/client/actions/ThreadMembersUpdate.js b/node_modules/discord.js/src/client/actions/ThreadMembersUpdate.js
new file mode 100644
index 0000000..c1781b9
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/ThreadMembersUpdate.js
@@ -0,0 +1,47 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class ThreadMembersUpdateAction extends Action {
+ handle(data) {
+ const client = this.client;
+ const thread = client.channels.cache.get(data.id);
+ if (thread) {
+ thread.memberCount = data.member_count;
+ const addedMembers = new Collection();
+ const removedMembers = new Collection();
+
+ data.added_members?.reduce(
+ (_addedMembers, addedMember) => _addedMembers.set(addedMember.user_id, thread.members._add(addedMember)),
+ addedMembers,
+ );
+
+ data.removed_member_ids?.reduce((removedMembersIds, removedMembersId) => {
+ const threadMember = this.getThreadMember(removedMembersId, thread.members);
+ if (threadMember) removedMembersIds.set(threadMember.id, threadMember);
+ thread.members.cache.delete(removedMembersId);
+ return removedMembersIds;
+ }, removedMembers);
+
+ if (addedMembers.size === 0 && removedMembers.size === 0) {
+ // Uncached thread member(s) left.
+ return {};
+ }
+
+ /**
+ * Emitted whenever members are added or removed from a thread.
+ * <info>This event requires the {@link GatewayIntentBits.GuildMembers} privileged gateway intent.</info>
+ * @event Client#threadMembersUpdate
+ * @param {Collection<Snowflake, ThreadMember>} addedMembers The members that were added
+ * @param {Collection<Snowflake, ThreadMember>} removedMembers The members that were removed
+ * @param {ThreadChannel} thread The thread where members got updated
+ */
+ client.emit(Events.ThreadMembersUpdate, addedMembers, removedMembers, thread);
+ }
+ return {};
+ }
+}
+
+module.exports = ThreadMembersUpdateAction;
diff --git a/node_modules/discord.js/src/client/actions/TypingStart.js b/node_modules/discord.js/src/client/actions/TypingStart.js
new file mode 100644
index 0000000..4e79920
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/TypingStart.js
@@ -0,0 +1,29 @@
+'use strict';
+
+const Action = require('./Action');
+const Typing = require('../../structures/Typing');
+const Events = require('../../util/Events');
+
+class TypingStart extends Action {
+ handle(data) {
+ const channel = this.getChannel(data);
+ if (!channel) return;
+
+ if (!channel.isTextBased()) {
+ this.client.emit(Events.Warn, `Discord sent a typing packet to a ${channel.type} channel ${channel.id}`);
+ return;
+ }
+
+ const user = this.getUserFromMember(data);
+ if (user) {
+ /**
+ * Emitted whenever a user starts typing in a channel.
+ * @event Client#typingStart
+ * @param {Typing} typing The typing state
+ */
+ this.client.emit(Events.TypingStart, new Typing(channel, user, data));
+ }
+ }
+}
+
+module.exports = TypingStart;
diff --git a/node_modules/discord.js/src/client/actions/UserUpdate.js b/node_modules/discord.js/src/client/actions/UserUpdate.js
new file mode 100644
index 0000000..923ddf5
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/UserUpdate.js
@@ -0,0 +1,36 @@
+'use strict';
+
+const Action = require('./Action');
+const Events = require('../../util/Events');
+
+class UserUpdateAction extends Action {
+ handle(data) {
+ const client = this.client;
+
+ const newUser = data.id === client.user.id ? client.user : client.users.cache.get(data.id);
+ const oldUser = newUser._update(data);
+
+ if (!oldUser.equals(newUser)) {
+ /**
+ * Emitted whenever a user's details (e.g. username) are changed.
+ * Triggered by the Discord gateway events {@link Events.UserUpdate},
+ * {@link Events.GuildMemberUpdate}, and {@link Events.PresenceUpdate}.
+ * @event Client#userUpdate
+ * @param {User} oldUser The user before the update
+ * @param {User} newUser The user after the update
+ */
+ client.emit(Events.UserUpdate, oldUser, newUser);
+ return {
+ old: oldUser,
+ updated: newUser,
+ };
+ }
+
+ return {
+ old: null,
+ updated: null,
+ };
+ }
+}
+
+module.exports = UserUpdateAction;
diff --git a/node_modules/discord.js/src/client/actions/VoiceStateUpdate.js b/node_modules/discord.js/src/client/actions/VoiceStateUpdate.js
new file mode 100644
index 0000000..fc7400f
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/VoiceStateUpdate.js
@@ -0,0 +1,43 @@
+'use strict';
+
+const Action = require('./Action');
+const VoiceState = require('../../structures/VoiceState');
+const Events = require('../../util/Events');
+
+class VoiceStateUpdate extends Action {
+ handle(data) {
+ const client = this.client;
+ const guild = client.guilds.cache.get(data.guild_id);
+ if (guild) {
+ // Update the state
+ const oldState =
+ guild.voiceStates.cache.get(data.user_id)?._clone() ?? new VoiceState(guild, { user_id: data.user_id });
+
+ const newState = guild.voiceStates._add(data);
+
+ // Get the member
+ let member = guild.members.cache.get(data.user_id);
+ if (member && data.member) {
+ member._patch(data.member);
+ } else if (data.member?.user && data.member.joined_at) {
+ member = guild.members._add(data.member);
+ }
+
+ // Emit event
+ if (member?.user.id === client.user.id) {
+ client.emit('debug', `[VOICE] received voice state update: ${JSON.stringify(data)}`);
+ client.voice.onVoiceStateUpdate(data);
+ }
+
+ /**
+ * Emitted whenever a member changes voice state - e.g. joins/leaves a channel, mutes/unmutes.
+ * @event Client#voiceStateUpdate
+ * @param {VoiceState} oldState The voice state before the update
+ * @param {VoiceState} newState The voice state after the update
+ */
+ client.emit(Events.VoiceStateUpdate, oldState, newState);
+ }
+ }
+}
+
+module.exports = VoiceStateUpdate;
diff --git a/node_modules/discord.js/src/client/actions/WebhooksUpdate.js b/node_modules/discord.js/src/client/actions/WebhooksUpdate.js
new file mode 100644
index 0000000..2bf41ba
--- /dev/null
+++ b/node_modules/discord.js/src/client/actions/WebhooksUpdate.js
@@ -0,0 +1,37 @@
+'use strict';
+
+const process = require('node:process');
+const Action = require('./Action');
+
+let deprecationEmitted = false;
+
+class WebhooksUpdate extends Action {
+ handle(data) {
+ const client = this.client;
+ const channel = client.channels.cache.get(data.channel_id);
+ if (!channel) return;
+
+ // TODO: change to Events.WebhooksUpdate in the next major version
+ /**
+ * Emitted whenever a channel has its webhooks changed.
+ * @event Client#webhooksUpdate
+ * @param {TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel} channel
+ * The channel that had a webhook update
+ */
+ client.emit('webhooksUpdate', channel);
+
+ /**
+ * Emitted whenever a channel has its webhooks changed.
+ * @event Client#webhookUpdate
+ * @param {TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel} channel
+ * The channel that had a webhook update
+ * @deprecated Use {@link Client#event:webhooksUpdate} instead.
+ */
+ if (client.emit('webhookUpdate', channel) && !deprecationEmitted) {
+ deprecationEmitted = true;
+ process.emitWarning('The webhookUpdate event is deprecated. Use webhooksUpdate instead.', 'DeprecationWarning');
+ }
+ }
+}
+
+module.exports = WebhooksUpdate;
diff --git a/node_modules/discord.js/src/client/voice/ClientVoiceManager.js b/node_modules/discord.js/src/client/voice/ClientVoiceManager.js
new file mode 100644
index 0000000..192e700
--- /dev/null
+++ b/node_modules/discord.js/src/client/voice/ClientVoiceManager.js
@@ -0,0 +1,44 @@
+'use strict';
+
+const Events = require('../../util/Events');
+
+/**
+ * Manages voice connections for the client
+ */
+class ClientVoiceManager {
+ constructor(client) {
+ /**
+ * The client that instantiated this voice manager
+ * @type {Client}
+ * @readonly
+ * @name ClientVoiceManager#client
+ */
+ Object.defineProperty(this, 'client', { value: client });
+
+ /**
+ * Maps guild ids to voice adapters created for use with @discordjs/voice.
+ * @type {Map<Snowflake, Object>}
+ */
+ this.adapters = new Map();
+
+ client.on(Events.ShardDisconnect, (_, shardId) => {
+ for (const [guildId, adapter] of this.adapters.entries()) {
+ if (client.guilds.cache.get(guildId)?.shardId === shardId) {
+ adapter.destroy();
+ }
+ }
+ });
+ }
+
+ onVoiceServer(payload) {
+ this.adapters.get(payload.guild_id)?.onVoiceServerUpdate(payload);
+ }
+
+ onVoiceStateUpdate(payload) {
+ if (payload.guild_id && payload.session_id && payload.user_id === this.client.user?.id) {
+ this.adapters.get(payload.guild_id)?.onVoiceStateUpdate(payload);
+ }
+ }
+}
+
+module.exports = ClientVoiceManager;
diff --git a/node_modules/discord.js/src/client/websocket/WebSocketManager.js b/node_modules/discord.js/src/client/websocket/WebSocketManager.js
new file mode 100644
index 0000000..f62610b
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/WebSocketManager.js
@@ -0,0 +1,394 @@
+'use strict';
+
+const EventEmitter = require('node:events');
+const process = require('node:process');
+const { setImmediate } = require('node:timers');
+const { Collection } = require('@discordjs/collection');
+const {
+ WebSocketManager: WSWebSocketManager,
+ WebSocketShardEvents: WSWebSocketShardEvents,
+ CompressionMethod,
+ CloseCodes,
+} = require('@discordjs/ws');
+const { GatewayCloseCodes, GatewayDispatchEvents } = require('discord-api-types/v10');
+const WebSocketShard = require('./WebSocketShard');
+const PacketHandlers = require('./handlers');
+const { DiscordjsError, ErrorCodes } = require('../../errors');
+const Events = require('../../util/Events');
+const Status = require('../../util/Status');
+const WebSocketShardEvents = require('../../util/WebSocketShardEvents');
+
+let zlib;
+
+try {
+ zlib = require('zlib-sync');
+} catch {} // eslint-disable-line no-empty
+
+const BeforeReadyWhitelist = [
+ GatewayDispatchEvents.Ready,
+ GatewayDispatchEvents.Resumed,
+ GatewayDispatchEvents.GuildCreate,
+ GatewayDispatchEvents.GuildDelete,
+ GatewayDispatchEvents.GuildMembersChunk,
+ GatewayDispatchEvents.GuildMemberAdd,
+ GatewayDispatchEvents.GuildMemberRemove,
+];
+
+const WaitingForGuildEvents = [GatewayDispatchEvents.GuildCreate, GatewayDispatchEvents.GuildDelete];
+
+const UNRESUMABLE_CLOSE_CODES = [
+ CloseCodes.Normal,
+ GatewayCloseCodes.AlreadyAuthenticated,
+ GatewayCloseCodes.InvalidSeq,
+];
+
+const reasonIsDeprecated = 'the reason property is deprecated, use the code property to determine the reason';
+let deprecationEmittedForInvalidSessionEvent = false;
+let deprecationEmittedForDestroyedEvent = false;
+
+/**
+ * The WebSocket manager for this client.
+ * <info>This class forwards raw dispatch events,
+ * read more about it here {@link https://discord.com/developers/docs/topics/gateway}</info>
+ * @extends {EventEmitter}
+ */
+class WebSocketManager extends EventEmitter {
+ constructor(client) {
+ super();
+
+ /**
+ * The client that instantiated this WebSocketManager
+ * @type {Client}
+ * @readonly
+ * @name WebSocketManager#client
+ */
+ Object.defineProperty(this, 'client', { value: client });
+
+ /**
+ * The gateway this manager uses
+ * @type {?string}
+ */
+ this.gateway = null;
+
+ /**
+ * A collection of all shards this manager handles
+ * @type {Collection<number, WebSocketShard>}
+ */
+ this.shards = new Collection();
+
+ /**
+ * An array of queued events before this WebSocketManager became ready
+ * @type {Object[]}
+ * @private
+ * @name WebSocketManager#packetQueue
+ */
+ Object.defineProperty(this, 'packetQueue', { value: [] });
+
+ /**
+ * The current status of this WebSocketManager
+ * @type {Status}
+ */
+ this.status = Status.Idle;
+
+ /**
+ * If this manager was destroyed. It will prevent shards from reconnecting
+ * @type {boolean}
+ * @private
+ */
+ this.destroyed = false;
+
+ /**
+ * The internal WebSocketManager from `@discordjs/ws`.
+ * @type {WSWebSocketManager}
+ * @private
+ */
+ this._ws = null;
+ }
+
+ /**
+ * The average ping of all WebSocketShards
+ * @type {number}
+ * @readonly
+ */
+ get ping() {
+ const sum = this.shards.reduce((a, b) => a + b.ping, 0);
+ return sum / this.shards.size;
+ }
+
+ /**
+ * Emits a debug message.
+ * @param {string} message The debug message
+ * @param {?number} [shardId] The id of the shard that emitted this message, if any
+ * @private
+ */
+ debug(message, shardId) {
+ this.client.emit(
+ Events.Debug,
+ `[WS => ${typeof shardId === 'number' ? `Shard ${shardId}` : 'Manager'}] ${message}`,
+ );
+ }
+
+ /**
+ * Connects this manager to the gateway.
+ * @private
+ */
+ async connect() {
+ const invalidToken = new DiscordjsError(ErrorCodes.TokenInvalid);
+ const { shards, shardCount, intents, ws } = this.client.options;
+ if (this._ws && this._ws.options.token !== this.client.token) {
+ await this._ws.destroy({ code: CloseCodes.Normal, reason: 'Login with differing token requested' });
+ this._ws = null;
+ }
+ if (!this._ws) {
+ const wsOptions = {
+ intents: intents.bitfield,
+ rest: this.client.rest,
+ token: this.client.token,
+ largeThreshold: ws.large_threshold,
+ version: ws.version,
+ shardIds: shards === 'auto' ? null : shards,
+ shardCount: shards === 'auto' ? null : shardCount,
+ initialPresence: ws.presence,
+ retrieveSessionInfo: shardId => this.shards.get(shardId).sessionInfo,
+ updateSessionInfo: (shardId, sessionInfo) => {
+ this.shards.get(shardId).sessionInfo = sessionInfo;
+ },
+ compression: zlib ? CompressionMethod.ZlibStream : null,
+ };
+ if (ws.buildIdentifyThrottler) wsOptions.buildIdentifyThrottler = ws.buildIdentifyThrottler;
+ if (ws.buildStrategy) wsOptions.buildStrategy = ws.buildStrategy;
+ this._ws = new WSWebSocketManager(wsOptions);
+ this.attachEvents();
+ }
+
+ const {
+ url: gatewayURL,
+ shards: recommendedShards,
+ session_start_limit: sessionStartLimit,
+ } = await this._ws.fetchGatewayInformation().catch(error => {
+ throw error.status === 401 ? invalidToken : error;
+ });
+
+ const { total, remaining } = sessionStartLimit;
+
+ this.debug(`Fetched Gateway Information
+ URL: ${gatewayURL}
+ Recommended Shards: ${recommendedShards}`);
+
+ this.debug(`Session Limit Information
+ Total: ${total}
+ Remaining: ${remaining}`);
+
+ this.gateway = `${gatewayURL}/`;
+
+ this.client.options.shardCount = await this._ws.getShardCount();
+ this.client.options.shards = await this._ws.getShardIds();
+ this.totalShards = this.client.options.shards.length;
+ for (const id of this.client.options.shards) {
+ if (!this.shards.has(id)) {
+ const shard = new WebSocketShard(this, id);
+ this.shards.set(id, shard);
+
+ shard.on(WebSocketShardEvents.AllReady, unavailableGuilds => {
+ /**
+ * Emitted when a shard turns ready.
+ * @event Client#shardReady
+ * @param {number} id The shard id that turned ready
+ * @param {?Set<Snowflake>} unavailableGuilds Set of unavailable guild ids, if any
+ */
+ this.client.emit(Events.ShardReady, shard.id, unavailableGuilds);
+
+ this.checkShardsReady();
+ });
+ shard.status = Status.Connecting;
+ }
+ }
+
+ await this._ws.connect();
+
+ this.shards.forEach(shard => {
+ if (shard.listenerCount(WebSocketShardEvents.InvalidSession) > 0 && !deprecationEmittedForInvalidSessionEvent) {
+ process.emitWarning(
+ 'The WebSocketShard#invalidSession event is deprecated and will never emit.',
+ 'DeprecationWarning',
+ );
+
+ deprecationEmittedForInvalidSessionEvent = true;
+ }
+ if (shard.listenerCount(WebSocketShardEvents.Destroyed) > 0 && !deprecationEmittedForDestroyedEvent) {
+ process.emitWarning(
+ 'The WebSocketShard#destroyed event is deprecated and will never emit.',
+ 'DeprecationWarning',
+ );
+
+ deprecationEmittedForDestroyedEvent = true;
+ }
+ });
+ }
+
+ /**
+ * Attaches event handlers to the internal WebSocketShardManager from `@discordjs/ws`.
+ * @private
+ */
+ attachEvents() {
+ this._ws.on(WSWebSocketShardEvents.Debug, ({ message, shardId }) => this.debug(message, shardId));
+ this._ws.on(WSWebSocketShardEvents.Dispatch, ({ data, shardId }) => {
+ this.client.emit(Events.Raw, data, shardId);
+ this.emit(data.t, data.d, shardId);
+ const shard = this.shards.get(shardId);
+ this.handlePacket(data, shard);
+ if (shard.status === Status.WaitingForGuilds && WaitingForGuildEvents.includes(data.t)) {
+ shard.gotGuild(data.d.id);
+ }
+ });
+
+ this._ws.on(WSWebSocketShardEvents.Ready, ({ data, shardId }) => {
+ this.shards.get(shardId).onReadyPacket(data);
+ });
+
+ this._ws.on(WSWebSocketShardEvents.Closed, ({ code, shardId }) => {
+ const shard = this.shards.get(shardId);
+ shard.emit(WebSocketShardEvents.Close, { code, reason: reasonIsDeprecated, wasClean: true });
+ if (UNRESUMABLE_CLOSE_CODES.includes(code) && this.destroyed) {
+ shard.status = Status.Disconnected;
+ /**
+ * Emitted when a shard's WebSocket disconnects and will no longer reconnect.
+ * @event Client#shardDisconnect
+ * @param {CloseEvent} event The WebSocket close event
+ * @param {number} id The shard id that disconnected
+ */
+ this.client.emit(Events.ShardDisconnect, { code, reason: reasonIsDeprecated, wasClean: true }, shardId);
+ this.debug(GatewayCloseCodes[code], shardId);
+ return;
+ }
+
+ this.shards.get(shardId).status = Status.Connecting;
+ /**
+ * Emitted when a shard is attempting to reconnect or re-identify.
+ * @event Client#shardReconnecting
+ * @param {number} id The shard id that is attempting to reconnect
+ */
+ this.client.emit(Events.ShardReconnecting, shardId);
+ });
+ this._ws.on(WSWebSocketShardEvents.Hello, ({ shardId }) => {
+ const shard = this.shards.get(shardId);
+ if (shard.sessionInfo) {
+ shard.closeSequence = shard.sessionInfo.sequence;
+ shard.status = Status.Resuming;
+ } else {
+ shard.status = Status.Identifying;
+ }
+ });
+
+ this._ws.on(WSWebSocketShardEvents.Resumed, ({ shardId }) => {
+ const shard = this.shards.get(shardId);
+ shard.status = Status.Ready;
+ /**
+ * Emitted when the shard resumes successfully
+ * @event WebSocketShard#resumed
+ */
+ shard.emit(WebSocketShardEvents.Resumed);
+ });
+
+ this._ws.on(WSWebSocketShardEvents.HeartbeatComplete, ({ heartbeatAt, latency, shardId }) => {
+ this.debug(`Heartbeat acknowledged, latency of ${latency}ms.`, shardId);
+ const shard = this.shards.get(shardId);
+ shard.lastPingTimestamp = heartbeatAt;
+ shard.ping = latency;
+ });
+
+ this._ws.on(WSWebSocketShardEvents.Error, ({ error, shardId }) => {
+ /**
+ * Emitted whenever a shard's WebSocket encounters a connection error.
+ * @event Client#shardError
+ * @param {Error} error The encountered error
+ * @param {number} shardId The shard that encountered this error
+ */
+ this.client.emit(Events.ShardError, error, shardId);
+ });
+ }
+
+ /**
+ * Broadcasts a packet to every shard this manager handles.
+ * @param {Object} packet The packet to send
+ * @private
+ */
+ broadcast(packet) {
+ for (const shardId of this.shards.keys()) this._ws.send(shardId, packet);
+ }
+
+ /**
+ * Destroys this manager and all its shards.
+ * @private
+ */
+ async destroy() {
+ if (this.destroyed) return;
+ // TODO: Make a util for getting a stack
+ this.debug(`Manager was destroyed. Called by:\n${new Error().stack}`);
+ this.destroyed = true;
+ await this._ws?.destroy({ code: CloseCodes.Normal });
+ }
+
+ /**
+ * Processes a packet and queues it if this WebSocketManager is not ready.
+ * @param {Object} [packet] The packet to be handled
+ * @param {WebSocketShard} [shard] The shard that will handle this packet
+ * @returns {boolean}
+ * @private
+ */
+ handlePacket(packet, shard) {
+ if (packet && this.status !== Status.Ready) {
+ if (!BeforeReadyWhitelist.includes(packet.t)) {
+ this.packetQueue.push({ packet, shard });
+ return false;
+ }
+ }
+
+ if (this.packetQueue.length) {
+ const item = this.packetQueue.shift();
+ setImmediate(() => {
+ this.handlePacket(item.packet, item.shard);
+ }).unref();
+ }
+
+ if (packet && PacketHandlers[packet.t]) {
+ PacketHandlers[packet.t](this.client, packet, shard);
+ }
+
+ return true;
+ }
+
+ /**
+ * Checks whether the client is ready to be marked as ready.
+ * @private
+ */
+ checkShardsReady() {
+ if (this.status === Status.Ready) return;
+ if (this.shards.size !== this.totalShards || this.shards.some(s => s.status !== Status.Ready)) {
+ return;
+ }
+
+ this.triggerClientReady();
+ }
+
+ /**
+ * Causes the client to be marked as ready and emits the ready event.
+ * @private
+ */
+ triggerClientReady() {
+ this.status = Status.Ready;
+
+ this.client.readyTimestamp = Date.now();
+
+ /**
+ * Emitted when the client becomes ready to start working.
+ * @event Client#ready
+ * @param {Client} client The client
+ */
+ this.client.emit(Events.ClientReady, this.client);
+
+ this.handlePacket();
+ }
+}
+
+module.exports = WebSocketManager;
diff --git a/node_modules/discord.js/src/client/websocket/WebSocketShard.js b/node_modules/discord.js/src/client/websocket/WebSocketShard.js
new file mode 100644
index 0000000..05bc225
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/WebSocketShard.js
@@ -0,0 +1,231 @@
+'use strict';
+
+const EventEmitter = require('node:events');
+const process = require('node:process');
+const { setTimeout, clearTimeout } = require('node:timers');
+const { GatewayIntentBits } = require('discord-api-types/v10');
+const Status = require('../../util/Status');
+const WebSocketShardEvents = require('../../util/WebSocketShardEvents');
+
+let deprecationEmittedForImportant = false;
+/**
+ * Represents a Shard's WebSocket connection
+ * @extends {EventEmitter}
+ */
+class WebSocketShard extends EventEmitter {
+ constructor(manager, id) {
+ super();
+
+ /**
+ * The WebSocketManager of the shard
+ * @type {WebSocketManager}
+ */
+ this.manager = manager;
+
+ /**
+ * The shard's id
+ * @type {number}
+ */
+ this.id = id;
+
+ /**
+ * The current status of the shard
+ * @type {Status}
+ */
+ this.status = Status.Idle;
+
+ /**
+ * The sequence of the shard after close
+ * @type {number}
+ * @private
+ */
+ this.closeSequence = 0;
+
+ /**
+ * The previous heartbeat ping of the shard
+ * @type {number}
+ */
+ this.ping = -1;
+
+ /**
+ * The last time a ping was sent (a timestamp)
+ * @type {number}
+ */
+ this.lastPingTimestamp = -1;
+
+ /**
+ * A set of guild ids this shard expects to receive
+ * @name WebSocketShard#expectedGuilds
+ * @type {?Set<string>}
+ * @private
+ */
+ Object.defineProperty(this, 'expectedGuilds', { value: null, writable: true });
+
+ /**
+ * The ready timeout
+ * @name WebSocketShard#readyTimeout
+ * @type {?NodeJS.Timeout}
+ * @private
+ */
+ Object.defineProperty(this, 'readyTimeout', { value: null, writable: true });
+
+ /**
+ * @external SessionInfo
+ * @see {@link https://discord.js.org/docs/packages/ws/stable/SessionInfo:Interface}
+ */
+
+ /**
+ * The session info used by `@discordjs/ws` package.
+ * @name WebSocketShard#sessionInfo
+ * @type {?SessionInfo}
+ * @private
+ */
+ Object.defineProperty(this, 'sessionInfo', { value: null, writable: true });
+ }
+
+ /**
+ * Emits a debug event.
+ * @param {string} message The debug message
+ * @private
+ */
+ debug(message) {
+ this.manager.debug(message, this.id);
+ }
+
+ /**
+ * @external CloseEvent
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}
+ */
+
+ /**
+ * This method is responsible to emit close event for this shard.
+ * This method helps the shard reconnect.
+ * @param {CloseEvent} [event] Close event that was received
+ * @deprecated
+ */
+ emitClose(
+ event = {
+ code: 1011,
+ reason: 'INTERNAL_ERROR',
+ wasClean: false,
+ },
+ ) {
+ this.debug(`[CLOSE]
+ Event Code: ${event.code}
+ Clean : ${event.wasClean}
+ Reason : ${event.reason ?? 'No reason received'}`);
+ /**
+ * Emitted when a shard's WebSocket closes.
+ * @private
+ * @event WebSocketShard#close
+ * @param {CloseEvent} event The received event
+ */
+ this.emit(WebSocketShardEvents.Close, event);
+ }
+
+ /**
+ * Called when the shard receives the READY payload.
+ * @param {Object} packet The received packet
+ * @private
+ */
+ onReadyPacket(packet) {
+ if (!packet) {
+ this.debug(`Received broken packet: '${packet}'.`);
+ return;
+ }
+
+ /**
+ * Emitted when the shard receives the READY payload and is now waiting for guilds
+ * @event WebSocketShard#ready
+ */
+ this.emit(WebSocketShardEvents.Ready);
+
+ this.expectedGuilds = new Set(packet.guilds.map(d => d.id));
+ this.status = Status.WaitingForGuilds;
+ }
+
+ /**
+ * Called when a GuildCreate or GuildDelete for this shard was sent after READY payload was received,
+ * but before we emitted the READY event.
+ * @param {Snowflake} guildId the id of the Guild sent in the payload
+ * @private
+ */
+ gotGuild(guildId) {
+ this.expectedGuilds.delete(guildId);
+ this.checkReady();
+ }
+
+ /**
+ * Checks if the shard can be marked as ready
+ * @private
+ */
+ checkReady() {
+ // Step 0. Clear the ready timeout, if it exists
+ if (this.readyTimeout) {
+ clearTimeout(this.readyTimeout);
+ this.readyTimeout = null;
+ }
+ // Step 1. If we don't have any other guilds pending, we are ready
+ if (!this.expectedGuilds.size) {
+ this.debug('Shard received all its guilds. Marking as fully ready.');
+ this.status = Status.Ready;
+
+ /**
+ * Emitted when the shard is fully ready.
+ * This event is emitted if:
+ * * all guilds were received by this shard
+ * * the ready timeout expired, and some guilds are unavailable
+ * @event WebSocketShard#allReady
+ * @param {?Set<string>} unavailableGuilds Set of unavailable guilds, if any
+ */
+ this.emit(WebSocketShardEvents.AllReady);
+ return;
+ }
+ const hasGuildsIntent = this.manager.client.options.intents.has(GatewayIntentBits.Guilds);
+ // Step 2. Create a timeout that will mark the shard as ready if there are still unavailable guilds
+ // * The timeout is 15 seconds by default
+ // * This can be optionally changed in the client options via the `waitGuildTimeout` option
+ // * a timeout time of zero will skip this timeout, which potentially could cause the Client to miss guilds.
+
+ const { waitGuildTimeout } = this.manager.client.options;
+
+ this.readyTimeout = setTimeout(
+ () => {
+ this.debug(
+ `Shard ${hasGuildsIntent ? 'did' : 'will'} not receive any more guild packets` +
+ `${hasGuildsIntent ? ` in ${waitGuildTimeout} ms` : ''}.\nUnavailable guild count: ${
+ this.expectedGuilds.size
+ }`,
+ );
+
+ this.readyTimeout = null;
+ this.status = Status.Ready;
+
+ this.emit(WebSocketShardEvents.AllReady, this.expectedGuilds);
+ },
+ hasGuildsIntent ? waitGuildTimeout : 0,
+ ).unref();
+ }
+
+ /**
+ * Adds a packet to the queue to be sent to the gateway.
+ * <warn>If you use this method, make sure you understand that you need to provide
+ * a full [Payload](https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-commands).
+ * Do not use this method if you don't know what you're doing.</warn>
+ * @param {Object} data The full packet to send
+ * @param {boolean} [important=false] If this packet should be added first in queue
+ * <warn>This parameter is **deprecated**. Important payloads are determined by their opcode instead.</warn>
+ */
+ send(data, important = false) {
+ if (important && !deprecationEmittedForImportant) {
+ process.emitWarning(
+ 'Sending important payloads explicitly is deprecated. They are determined by their opcode implicitly now.',
+ 'DeprecationWarning',
+ );
+ deprecationEmittedForImportant = true;
+ }
+ this.manager._ws.send(this.id, data);
+ }
+}
+
+module.exports = WebSocketShard;
diff --git a/node_modules/discord.js/src/client/websocket/handlers/APPLICATION_COMMAND_PERMISSIONS_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/APPLICATION_COMMAND_PERMISSIONS_UPDATE.js
new file mode 100644
index 0000000..73d4ec4
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/APPLICATION_COMMAND_PERMISSIONS_UPDATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.ApplicationCommandPermissionsUpdate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_ACTION_EXECUTION.js b/node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_ACTION_EXECUTION.js
new file mode 100644
index 0000000..22463b6
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_ACTION_EXECUTION.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.AutoModerationActionExecution.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_CREATE.js b/node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_CREATE.js
new file mode 100644
index 0000000..af64b9c
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_CREATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.AutoModerationRuleCreate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_DELETE.js b/node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_DELETE.js
new file mode 100644
index 0000000..56ec504
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_DELETE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.AutoModerationRuleDelete.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_UPDATE.js
new file mode 100644
index 0000000..3caf6ba
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_UPDATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.AutoModerationRuleUpdate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/CHANNEL_CREATE.js b/node_modules/discord.js/src/client/websocket/handlers/CHANNEL_CREATE.js
new file mode 100644
index 0000000..d6d560d
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/CHANNEL_CREATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.ChannelCreate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/CHANNEL_DELETE.js b/node_modules/discord.js/src/client/websocket/handlers/CHANNEL_DELETE.js
new file mode 100644
index 0000000..cb9f3d8
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/CHANNEL_DELETE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.ChannelDelete.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/CHANNEL_PINS_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/CHANNEL_PINS_UPDATE.js
new file mode 100644
index 0000000..c46e527
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/CHANNEL_PINS_UPDATE.js
@@ -0,0 +1,22 @@
+'use strict';
+
+const Events = require('../../../util/Events');
+
+module.exports = (client, { d: data }) => {
+ const channel = client.channels.cache.get(data.channel_id);
+ const time = data.last_pin_timestamp ? Date.parse(data.last_pin_timestamp) : null;
+
+ if (channel) {
+ // Discord sends null for last_pin_timestamp if the last pinned message was removed
+ channel.lastPinTimestamp = time;
+
+ /**
+ * Emitted whenever the pins of a channel are updated. Due to the nature of the WebSocket event,
+ * not much information can be provided easily here - you need to manually check the pins yourself.
+ * @event Client#channelPinsUpdate
+ * @param {TextBasedChannels} channel The channel that the pins update occurred in
+ * @param {Date} time The time of the pins update
+ */
+ client.emit(Events.ChannelPinsUpdate, channel, time);
+ }
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/CHANNEL_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/CHANNEL_UPDATE.js
new file mode 100644
index 0000000..8f35121
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/CHANNEL_UPDATE.js
@@ -0,0 +1,16 @@
+'use strict';
+
+const Events = require('../../../util/Events');
+
+module.exports = (client, packet) => {
+ const { old, updated } = client.actions.ChannelUpdate.handle(packet.d);
+ if (old && updated) {
+ /**
+ * Emitted whenever a channel is updated - e.g. name change, topic change, channel type change.
+ * @event Client#channelUpdate
+ * @param {DMChannel|GuildChannel} oldChannel The channel before the update
+ * @param {DMChannel|GuildChannel} newChannel The channel after the update
+ */
+ client.emit(Events.ChannelUpdate, old, updated);
+ }
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_AUDIT_LOG_ENTRY_CREATE.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_AUDIT_LOG_ENTRY_CREATE.js
new file mode 100644
index 0000000..8623141
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_AUDIT_LOG_ENTRY_CREATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.GuildAuditLogEntryCreate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_BAN_ADD.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_BAN_ADD.js
new file mode 100644
index 0000000..d8dc0f9
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_BAN_ADD.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.GuildBanAdd.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_BAN_REMOVE.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_BAN_REMOVE.js
new file mode 100644
index 0000000..8389e46
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_BAN_REMOVE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.GuildBanRemove.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_CREATE.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_CREATE.js
new file mode 100644
index 0000000..141f0ab
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_CREATE.js
@@ -0,0 +1,33 @@
+'use strict';
+
+const Events = require('../../../util/Events');
+const Status = require('../../../util/Status');
+
+module.exports = (client, { d: data }, shard) => {
+ let guild = client.guilds.cache.get(data.id);
+ if (guild) {
+ if (!guild.available && !data.unavailable) {
+ // A newly available guild
+ guild._patch(data);
+
+ /**
+ * Emitted whenever a guild becomes available.
+ * @event Client#guildAvailable
+ * @param {Guild} guild The guild that became available
+ */
+ client.emit(Events.GuildAvailable, guild);
+ }
+ } else {
+ // A new guild
+ data.shardId = shard.id;
+ guild = client.guilds._add(data);
+ if (client.ws.status === Status.Ready) {
+ /**
+ * Emitted whenever the client joins a guild.
+ * @event Client#guildCreate
+ * @param {Guild} guild The created guild
+ */
+ client.emit(Events.GuildCreate, guild);
+ }
+ }
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_DELETE.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_DELETE.js
new file mode 100644
index 0000000..27a3256
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_DELETE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.GuildDelete.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_EMOJIS_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_EMOJIS_UPDATE.js
new file mode 100644
index 0000000..e23b671
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_EMOJIS_UPDATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.GuildEmojisUpdate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_INTEGRATIONS_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_INTEGRATIONS_UPDATE.js
new file mode 100644
index 0000000..e90a72c
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_INTEGRATIONS_UPDATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.GuildIntegrationsUpdate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBERS_CHUNK.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBERS_CHUNK.js
new file mode 100644
index 0000000..2f61a1e
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBERS_CHUNK.js
@@ -0,0 +1,39 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const Events = require('../../../util/Events');
+
+module.exports = (client, { d: data }) => {
+ const guild = client.guilds.cache.get(data.guild_id);
+ if (!guild) return;
+ const members = new Collection();
+
+ for (const member of data.members) members.set(member.user.id, guild.members._add(member));
+ if (data.presences) {
+ for (const presence of data.presences) guild.presences._add(Object.assign(presence, { guild }));
+ }
+
+ /**
+ * Represents the properties of a guild members chunk
+ * @typedef {Object} GuildMembersChunk
+ * @property {number} index Index of the received chunk
+ * @property {number} count Number of chunks the client should receive
+ * @property {Array<*>} notFound An array of whatever could not be found
+ * when using {@link GatewayOpcodes.RequestGuildMembers}
+ * @property {?string} nonce Nonce for this chunk
+ */
+
+ /**
+ * Emitted whenever a chunk of guild members is received (all members come from the same guild).
+ * @event Client#guildMembersChunk
+ * @param {Collection<Snowflake, GuildMember>} members The members in the chunk
+ * @param {Guild} guild The guild related to the member chunk
+ * @param {GuildMembersChunk} chunk Properties of the received chunk
+ */
+ client.emit(Events.GuildMembersChunk, members, guild, {
+ index: data.chunk_index,
+ count: data.chunk_count,
+ notFound: data.not_found,
+ nonce: data.nonce,
+ });
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_ADD.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_ADD.js
new file mode 100644
index 0000000..fece5d7
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_ADD.js
@@ -0,0 +1,20 @@
+'use strict';
+
+const Events = require('../../../util/Events');
+const Status = require('../../../util/Status');
+
+module.exports = (client, { d: data }, shard) => {
+ const guild = client.guilds.cache.get(data.guild_id);
+ if (guild) {
+ guild.memberCount++;
+ const member = guild.members._add(data);
+ if (shard.status === Status.Ready) {
+ /**
+ * Emitted whenever a user joins a guild.
+ * @event Client#guildMemberAdd
+ * @param {GuildMember} member The member that has joined a guild
+ */
+ client.emit(Events.GuildMemberAdd, member);
+ }
+ }
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_REMOVE.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_REMOVE.js
new file mode 100644
index 0000000..72432af
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_REMOVE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet, shard) => {
+ client.actions.GuildMemberRemove.handle(packet.d, shard);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_UPDATE.js
new file mode 100644
index 0000000..cafc6bd
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_UPDATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet, shard) => {
+ client.actions.GuildMemberUpdate.handle(packet.d, shard);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_CREATE.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_CREATE.js
new file mode 100644
index 0000000..da9e7bc
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_CREATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.GuildRoleCreate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_DELETE.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_DELETE.js
new file mode 100644
index 0000000..cdc6353
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_DELETE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.GuildRoleDelete.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_UPDATE.js
new file mode 100644
index 0000000..3a9b62e
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_UPDATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.GuildRoleUpdate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_CREATE.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_CREATE.js
new file mode 100644
index 0000000..04ff2df
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_CREATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.GuildScheduledEventCreate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_DELETE.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_DELETE.js
new file mode 100644
index 0000000..b660c09
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_DELETE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.GuildScheduledEventDelete.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_UPDATE.js
new file mode 100644
index 0000000..0064708
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_UPDATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.GuildScheduledEventUpdate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_USER_ADD.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_USER_ADD.js
new file mode 100644
index 0000000..d5adca2
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_USER_ADD.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.GuildScheduledEventUserAdd.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_USER_REMOVE.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_USER_REMOVE.js
new file mode 100644
index 0000000..114df68
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_USER_REMOVE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.GuildScheduledEventUserRemove.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_STICKERS_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_STICKERS_UPDATE.js
new file mode 100644
index 0000000..e3aba61
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_STICKERS_UPDATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.GuildStickersUpdate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/GUILD_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/GUILD_UPDATE.js
new file mode 100644
index 0000000..fd0012a
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/GUILD_UPDATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.GuildUpdate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js b/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js
new file mode 100644
index 0000000..5bf30fc
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.InteractionCreate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/INVITE_CREATE.js b/node_modules/discord.js/src/client/websocket/handlers/INVITE_CREATE.js
new file mode 100644
index 0000000..50a2e72
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/INVITE_CREATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.InviteCreate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/INVITE_DELETE.js b/node_modules/discord.js/src/client/websocket/handlers/INVITE_DELETE.js
new file mode 100644
index 0000000..5971852
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/INVITE_DELETE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.InviteDelete.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js b/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js
new file mode 100644
index 0000000..c9b79a8
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.MessageCreate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_DELETE.js b/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_DELETE.js
new file mode 100644
index 0000000..85ae2bc
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_DELETE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.MessageDelete.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_DELETE_BULK.js b/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_DELETE_BULK.js
new file mode 100644
index 0000000..fbcf80f
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_DELETE_BULK.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.MessageDeleteBulk.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_ADD.js b/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_ADD.js
new file mode 100644
index 0000000..e219b4a
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_ADD.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.MessageReactionAdd.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE.js b/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE.js
new file mode 100644
index 0000000..2980e69
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.MessageReactionRemove.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE_ALL.js b/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE_ALL.js
new file mode 100644
index 0000000..ead80f7
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE_ALL.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.MessageReactionRemoveAll.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE_EMOJI.js b/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE_EMOJI.js
new file mode 100644
index 0000000..579444c
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE_EMOJI.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.MessageReactionRemoveEmoji.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_UPDATE.js
new file mode 100644
index 0000000..c2a470b
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_UPDATE.js
@@ -0,0 +1,16 @@
+'use strict';
+
+const Events = require('../../../util/Events');
+
+module.exports = (client, packet) => {
+ const { old, updated } = client.actions.MessageUpdate.handle(packet.d);
+ if (old && updated) {
+ /**
+ * Emitted whenever a message is updated - e.g. embed or content change.
+ * @event Client#messageUpdate
+ * @param {Message} oldMessage The message before the update
+ * @param {Message} newMessage The message after the update
+ */
+ client.emit(Events.MessageUpdate, old, updated);
+ }
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/PRESENCE_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/PRESENCE_UPDATE.js
new file mode 100644
index 0000000..bde3629
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/PRESENCE_UPDATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.PresenceUpdate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/READY.js b/node_modules/discord.js/src/client/websocket/handlers/READY.js
new file mode 100644
index 0000000..82da01c
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/READY.js
@@ -0,0 +1,27 @@
+'use strict';
+
+const ClientApplication = require('../../../structures/ClientApplication');
+let ClientUser;
+
+module.exports = (client, { d: data }, shard) => {
+ if (client.user) {
+ client.user._patch(data.user);
+ } else {
+ ClientUser ??= require('../../../structures/ClientUser');
+ client.user = new ClientUser(client, data.user);
+ client.users.cache.set(client.user.id, client.user);
+ }
+
+ for (const guild of data.guilds) {
+ guild.shardId = shard.id;
+ client.guilds._add(guild);
+ }
+
+ if (client.application) {
+ client.application._patch(data.application);
+ } else {
+ client.application = new ClientApplication(client, data.application);
+ }
+
+ shard.checkReady();
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/RESUMED.js b/node_modules/discord.js/src/client/websocket/handlers/RESUMED.js
new file mode 100644
index 0000000..27ed7dd
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/RESUMED.js
@@ -0,0 +1,14 @@
+'use strict';
+
+const Events = require('../../../util/Events');
+
+module.exports = (client, packet, shard) => {
+ const replayed = shard.sessionInfo.sequence - shard.closeSequence;
+ /**
+ * Emitted when a shard resumes successfully.
+ * @event Client#shardResume
+ * @param {number} id The shard id that resumed
+ * @param {number} replayedEvents The amount of replayed events
+ */
+ client.emit(Events.ShardResume, shard.id, replayed);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_CREATE.js b/node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_CREATE.js
new file mode 100644
index 0000000..77ae2ff
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_CREATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.StageInstanceCreate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_DELETE.js b/node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_DELETE.js
new file mode 100644
index 0000000..e2bb627
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_DELETE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.StageInstanceDelete.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_UPDATE.js
new file mode 100644
index 0000000..fabc84a
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_UPDATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.StageInstanceUpdate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/THREAD_CREATE.js b/node_modules/discord.js/src/client/websocket/handlers/THREAD_CREATE.js
new file mode 100644
index 0000000..d92cab0
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/THREAD_CREATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.ThreadCreate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/THREAD_DELETE.js b/node_modules/discord.js/src/client/websocket/handlers/THREAD_DELETE.js
new file mode 100644
index 0000000..1140a08
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/THREAD_DELETE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.ThreadDelete.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/THREAD_LIST_SYNC.js b/node_modules/discord.js/src/client/websocket/handlers/THREAD_LIST_SYNC.js
new file mode 100644
index 0000000..17b173a
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/THREAD_LIST_SYNC.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.ThreadListSync.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/THREAD_MEMBERS_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/THREAD_MEMBERS_UPDATE.js
new file mode 100644
index 0000000..f3c7a73
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/THREAD_MEMBERS_UPDATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.ThreadMembersUpdate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/THREAD_MEMBER_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/THREAD_MEMBER_UPDATE.js
new file mode 100644
index 0000000..a111b0a
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/THREAD_MEMBER_UPDATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.ThreadMemberUpdate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/THREAD_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/THREAD_UPDATE.js
new file mode 100644
index 0000000..481dcd4
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/THREAD_UPDATE.js
@@ -0,0 +1,16 @@
+'use strict';
+
+const Events = require('../../../util/Events');
+
+module.exports = (client, packet) => {
+ const { old, updated } = client.actions.ChannelUpdate.handle(packet.d);
+ if (old && updated) {
+ /**
+ * Emitted whenever a thread is updated - e.g. name change, archive state change, locked state change.
+ * @event Client#threadUpdate
+ * @param {ThreadChannel} oldThread The thread before the update
+ * @param {ThreadChannel} newThread The thread after the update
+ */
+ client.emit(Events.ThreadUpdate, old, updated);
+ }
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/TYPING_START.js b/node_modules/discord.js/src/client/websocket/handlers/TYPING_START.js
new file mode 100644
index 0000000..9a56a54
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/TYPING_START.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.TypingStart.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/USER_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/USER_UPDATE.js
new file mode 100644
index 0000000..a02bf58
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/USER_UPDATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.UserUpdate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/VOICE_SERVER_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/VOICE_SERVER_UPDATE.js
new file mode 100644
index 0000000..f9cf534
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/VOICE_SERVER_UPDATE.js
@@ -0,0 +1,6 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.emit('debug', `[VOICE] received voice server: ${JSON.stringify(packet)}`);
+ client.voice.onVoiceServer(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/VOICE_STATE_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/VOICE_STATE_UPDATE.js
new file mode 100644
index 0000000..dbff6ea
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/VOICE_STATE_UPDATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.VoiceStateUpdate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/WEBHOOKS_UPDATE.js b/node_modules/discord.js/src/client/websocket/handlers/WEBHOOKS_UPDATE.js
new file mode 100644
index 0000000..46cacee
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/WEBHOOKS_UPDATE.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = (client, packet) => {
+ client.actions.WebhooksUpdate.handle(packet.d);
+};
diff --git a/node_modules/discord.js/src/client/websocket/handlers/index.js b/node_modules/discord.js/src/client/websocket/handlers/index.js
new file mode 100644
index 0000000..f175dbe
--- /dev/null
+++ b/node_modules/discord.js/src/client/websocket/handlers/index.js
@@ -0,0 +1,64 @@
+'use strict';
+
+const handlers = Object.fromEntries([
+ ['APPLICATION_COMMAND_PERMISSIONS_UPDATE', require('./APPLICATION_COMMAND_PERMISSIONS_UPDATE')],
+ ['AUTO_MODERATION_ACTION_EXECUTION', require('./AUTO_MODERATION_ACTION_EXECUTION')],
+ ['AUTO_MODERATION_RULE_CREATE', require('./AUTO_MODERATION_RULE_CREATE')],
+ ['AUTO_MODERATION_RULE_DELETE', require('./AUTO_MODERATION_RULE_DELETE')],
+ ['AUTO_MODERATION_RULE_UPDATE', require('./AUTO_MODERATION_RULE_UPDATE')],
+ ['CHANNEL_CREATE', require('./CHANNEL_CREATE')],
+ ['CHANNEL_DELETE', require('./CHANNEL_DELETE')],
+ ['CHANNEL_PINS_UPDATE', require('./CHANNEL_PINS_UPDATE')],
+ ['CHANNEL_UPDATE', require('./CHANNEL_UPDATE')],
+ ['GUILD_AUDIT_LOG_ENTRY_CREATE', require('./GUILD_AUDIT_LOG_ENTRY_CREATE')],
+ ['GUILD_BAN_ADD', require('./GUILD_BAN_ADD')],
+ ['GUILD_BAN_REMOVE', require('./GUILD_BAN_REMOVE')],
+ ['GUILD_CREATE', require('./GUILD_CREATE')],
+ ['GUILD_DELETE', require('./GUILD_DELETE')],
+ ['GUILD_EMOJIS_UPDATE', require('./GUILD_EMOJIS_UPDATE')],
+ ['GUILD_INTEGRATIONS_UPDATE', require('./GUILD_INTEGRATIONS_UPDATE')],
+ ['GUILD_MEMBERS_CHUNK', require('./GUILD_MEMBERS_CHUNK')],
+ ['GUILD_MEMBER_ADD', require('./GUILD_MEMBER_ADD')],
+ ['GUILD_MEMBER_REMOVE', require('./GUILD_MEMBER_REMOVE')],
+ ['GUILD_MEMBER_UPDATE', require('./GUILD_MEMBER_UPDATE')],
+ ['GUILD_ROLE_CREATE', require('./GUILD_ROLE_CREATE')],
+ ['GUILD_ROLE_DELETE', require('./GUILD_ROLE_DELETE')],
+ ['GUILD_ROLE_UPDATE', require('./GUILD_ROLE_UPDATE')],
+ ['GUILD_SCHEDULED_EVENT_CREATE', require('./GUILD_SCHEDULED_EVENT_CREATE')],
+ ['GUILD_SCHEDULED_EVENT_DELETE', require('./GUILD_SCHEDULED_EVENT_DELETE')],
+ ['GUILD_SCHEDULED_EVENT_UPDATE', require('./GUILD_SCHEDULED_EVENT_UPDATE')],
+ ['GUILD_SCHEDULED_EVENT_USER_ADD', require('./GUILD_SCHEDULED_EVENT_USER_ADD')],
+ ['GUILD_SCHEDULED_EVENT_USER_REMOVE', require('./GUILD_SCHEDULED_EVENT_USER_REMOVE')],
+ ['GUILD_STICKERS_UPDATE', require('./GUILD_STICKERS_UPDATE')],
+ ['GUILD_UPDATE', require('./GUILD_UPDATE')],
+ ['INTERACTION_CREATE', require('./INTERACTION_CREATE')],
+ ['INVITE_CREATE', require('./INVITE_CREATE')],
+ ['INVITE_DELETE', require('./INVITE_DELETE')],
+ ['MESSAGE_CREATE', require('./MESSAGE_CREATE')],
+ ['MESSAGE_DELETE', require('./MESSAGE_DELETE')],
+ ['MESSAGE_DELETE_BULK', require('./MESSAGE_DELETE_BULK')],
+ ['MESSAGE_REACTION_ADD', require('./MESSAGE_REACTION_ADD')],
+ ['MESSAGE_REACTION_REMOVE', require('./MESSAGE_REACTION_REMOVE')],
+ ['MESSAGE_REACTION_REMOVE_ALL', require('./MESSAGE_REACTION_REMOVE_ALL')],
+ ['MESSAGE_REACTION_REMOVE_EMOJI', require('./MESSAGE_REACTION_REMOVE_EMOJI')],
+ ['MESSAGE_UPDATE', require('./MESSAGE_UPDATE')],
+ ['PRESENCE_UPDATE', require('./PRESENCE_UPDATE')],
+ ['READY', require('./READY')],
+ ['RESUMED', require('./RESUMED')],
+ ['STAGE_INSTANCE_CREATE', require('./STAGE_INSTANCE_CREATE')],
+ ['STAGE_INSTANCE_DELETE', require('./STAGE_INSTANCE_DELETE')],
+ ['STAGE_INSTANCE_UPDATE', require('./STAGE_INSTANCE_UPDATE')],
+ ['THREAD_CREATE', require('./THREAD_CREATE')],
+ ['THREAD_DELETE', require('./THREAD_DELETE')],
+ ['THREAD_LIST_SYNC', require('./THREAD_LIST_SYNC')],
+ ['THREAD_MEMBERS_UPDATE', require('./THREAD_MEMBERS_UPDATE')],
+ ['THREAD_MEMBER_UPDATE', require('./THREAD_MEMBER_UPDATE')],
+ ['THREAD_UPDATE', require('./THREAD_UPDATE')],
+ ['TYPING_START', require('./TYPING_START')],
+ ['USER_UPDATE', require('./USER_UPDATE')],
+ ['VOICE_SERVER_UPDATE', require('./VOICE_SERVER_UPDATE')],
+ ['VOICE_STATE_UPDATE', require('./VOICE_STATE_UPDATE')],
+ ['WEBHOOKS_UPDATE', require('./WEBHOOKS_UPDATE')],
+]);
+
+module.exports = handlers;
diff --git a/node_modules/discord.js/src/errors/DJSError.js b/node_modules/discord.js/src/errors/DJSError.js
new file mode 100644
index 0000000..88e0e72
--- /dev/null
+++ b/node_modules/discord.js/src/errors/DJSError.js
@@ -0,0 +1,48 @@
+'use strict';
+
+// Heavily inspired by node's `internal/errors` module
+const ErrorCodes = require('./ErrorCodes');
+const Messages = require('./Messages');
+
+/**
+ * Extend an error of some sort into a DiscordjsError.
+ * @param {Error} Base Base error to extend
+ * @returns {DiscordjsError}
+ * @ignore
+ */
+function makeDiscordjsError(Base) {
+ return class DiscordjsError extends Base {
+ constructor(code, ...args) {
+ super(message(code, args));
+ this.code = code;
+ Error.captureStackTrace?.(this, DiscordjsError);
+ }
+
+ get name() {
+ return `${super.name} [${this.code}]`;
+ }
+ };
+}
+
+/**
+ * Format the message for an error.
+ * @param {string} code The error code
+ * @param {Array<*>} args Arguments to pass for util format or as function args
+ * @returns {string} Formatted string
+ * @ignore
+ */
+function message(code, args) {
+ if (!(code in ErrorCodes)) throw new Error('Error code must be a valid DiscordjsErrorCodes');
+ const msg = Messages[code];
+ if (!msg) throw new Error(`No message associated with error code: ${code}.`);
+ if (typeof msg === 'function') return msg(...args);
+ if (!args?.length) return msg;
+ args.unshift(msg);
+ return String(...args);
+}
+
+module.exports = {
+ DiscordjsError: makeDiscordjsError(Error),
+ DiscordjsTypeError: makeDiscordjsError(TypeError),
+ DiscordjsRangeError: makeDiscordjsError(RangeError),
+};
diff --git a/node_modules/discord.js/src/errors/ErrorCodes.js b/node_modules/discord.js/src/errors/ErrorCodes.js
new file mode 100644
index 0000000..9cd2f4d
--- /dev/null
+++ b/node_modules/discord.js/src/errors/ErrorCodes.js
@@ -0,0 +1,319 @@
+'use strict';
+
+/**
+ * @typedef {Object} DiscordjsErrorCodes
+
+ * @property {'ClientInvalidOption'} ClientInvalidOption
+ * @property {'ClientInvalidProvidedShards'} ClientInvalidProvidedShards
+ * @property {'ClientMissingIntents'} ClientMissingIntents
+ * @property {'ClientNotReady'} ClientNotReady
+
+ * @property {'TokenInvalid'} TokenInvalid
+ * @property {'TokenMissing'} TokenMissing
+ * @property {'ApplicationCommandPermissionsTokenMissing'} ApplicationCommandPermissionsTokenMissing
+
+ * @property {'WSCloseRequested'} WSCloseRequested
+ * <warn>This property is deprecated.</warn>
+ * @property {'WSConnectionExists'} WSConnectionExists
+ * <warn>This property is deprecated.</warn>
+ * @property {'WSNotOpen'} WSNotOpen
+ * <warn>This property is deprecated.</warn>
+ * @property {'ManagerDestroyed'} ManagerDestroyed
+
+ * @property {'BitFieldInvalid'} BitFieldInvalid
+
+ * @property {'ShardingInvalid'} ShardingInvalid
+ * <warn>This property is deprecated.</warn>
+ * @property {'ShardingRequired'} ShardingRequired
+ * <warn>This property is deprecated.</warn>
+ * @property {'InvalidIntents'} InvalidIntents
+ * <warn>This property is deprecated.</warn>
+ * @property {'DisallowedIntents'} DisallowedIntents
+ * <warn>This property is deprecated.</warn>
+ * @property {'ShardingNoShards'} ShardingNoShards
+ * @property {'ShardingInProcess'} ShardingInProcess
+ * @property {'ShardingInvalidEvalBroadcast'} ShardingInvalidEvalBroadcast
+ * @property {'ShardingShardNotFound'} ShardingShardNotFound
+ * @property {'ShardingAlreadySpawned'} ShardingAlreadySpawned
+ * @property {'ShardingProcessExists'} ShardingProcessExists
+ * @property {'ShardingWorkerExists'} ShardingWorkerExists
+ * @property {'ShardingReadyTimeout'} ShardingReadyTimeout
+ * @property {'ShardingReadyDisconnected'} ShardingReadyDisconnected
+ * @property {'ShardingReadyDied'} ShardingReadyDied
+ * @property {'ShardingNoChildExists'} ShardingNoChildExists
+ * @property {'ShardingShardMiscalculation'} ShardingShardMiscalculation
+
+ * @property {'ColorRange'} ColorRange
+ * @property {'ColorConvert'} ColorConvert
+
+ * @property {'InviteOptionsMissingChannel'} InviteOptionsMissingChannel
+
+ * @property {'ButtonLabel'} ButtonLabel
+ * @property {'ButtonURL'} ButtonURL
+ * @property {'ButtonCustomId'} ButtonCustomId
+
+ * @property {'SelectMenuCustomId'} SelectMenuCustomId
+ * @property {'SelectMenuPlaceholder'} SelectMenuPlaceholder
+ * @property {'SelectOptionLabel'} SelectOptionLabel
+ * @property {'SelectOptionValue'} SelectOptionValue
+ * @property {'SelectOptionDescription'} SelectOptionDescription
+
+ * @property {'InteractionCollectorError'} InteractionCollectorError
+
+ * @property {'FileNotFound'} FileNotFound
+
+ * @property {'UserBannerNotFetched'} UserBannerNotFetched
+ * @property {'UserNoDMChannel'} UserNoDMChannel
+
+ * @property {'VoiceNotStageChannel'} VoiceNotStageChannel
+
+ * @property {'VoiceStateNotOwn'} VoiceStateNotOwn
+ * @property {'VoiceStateInvalidType'} VoiceStateInvalidType
+
+ * @property {'ReqResourceType'} ReqResourceType
+
+ * @property {'ImageFormat'} ImageFormat
+ * @property {'ImageSize'} ImageSize
+
+ * @property {'MessageBulkDeleteType'} MessageBulkDeleteType
+ * @property {'MessageNonceType'} MessageNonceType
+ * @property {'MessageContentType'} MessageContentType
+
+ * @property {'SplitMaxLen'} SplitMaxLen
+
+ * @property {'BanResolveId'} BanResolveId
+ * @property {'FetchBanResolveId'} FetchBanResolveId
+
+ * @property {'PruneDaysType'} PruneDaysType
+
+ * @property {'GuildChannelResolve'} GuildChannelResolve
+ * @property {'GuildVoiceChannelResolve'} GuildVoiceChannelResolve
+ * @property {'GuildChannelOrphan'} GuildChannelOrphan
+ * @property {'GuildChannelUnowned'} GuildChannelUnowned
+ * @property {'GuildOwned'} GuildOwned
+ * @property {'GuildMembersTimeout'} GuildMembersTimeout
+ * @property {'GuildUncachedMe'} GuildUncachedMe
+ * @property {'ChannelNotCached'} ChannelNotCached
+ * @property {'StageChannelResolve'} StageChannelResolve
+ * @property {'GuildScheduledEventResolve'} GuildScheduledEventResolve
+ * @property {'FetchOwnerId'} FetchOwnerId
+
+ * @property {'InvalidType'} InvalidType
+ * @property {'InvalidElement'} InvalidElement
+
+ * @property {'MessageThreadParent'} MessageThreadParent
+ * @property {'MessageExistingThread'} MessageExistingThread
+ * @property {'ThreadInvitableType'} ThreadInvitableType
+
+ * @property {'WebhookMessage'} WebhookMessage
+ * @property {'WebhookTokenUnavailable'} WebhookTokenUnavailable
+ * @property {'WebhookURLInvalid'} WebhookURLInvalid
+ * @property {'WebhookApplication'} WebhookApplication
+ * @property {'MessageReferenceMissing'} MessageReferenceMissing
+
+ * @property {'EmojiType'} EmojiType
+ * @property {'EmojiManaged'} EmojiManaged
+ * @property {'MissingManageGuildExpressionsPermission'} MissingManageGuildExpressionsPermission
+ * @property {'MissingManageEmojisAndStickersPermission'} MissingManageEmojisAndStickersPermission
+ * <warn>This property is deprecated. Use `MissingManageGuildExpressionsPermission` instead.</warn>
+ *
+ * @property {'NotGuildSticker'} NotGuildSticker
+
+ * @property {'ReactionResolveUser'} ReactionResolveUser
+
+ * @property {'VanityURL'} VanityURL
+
+ * @property {'InviteResolveCode'} InviteResolveCode
+
+ * @property {'InviteNotFound'} InviteNotFound
+
+ * @property {'DeleteGroupDMChannel'} DeleteGroupDMChannel
+ * @property {'FetchGroupDMChannel'} FetchGroupDMChannel
+
+ * @property {'MemberFetchNonceLength'} MemberFetchNonceLength
+
+ * @property {'GlobalCommandPermissions'} GlobalCommandPermissions
+ * @property {'GuildUncachedEntityResolve'} GuildUncachedEntityResolve
+
+ * @property {'InteractionAlreadyReplied'} InteractionAlreadyReplied
+ * @property {'InteractionNotReplied'} InteractionNotReplied
+ * @property {'InteractionEphemeralReplied'} InteractionEphemeralReplied
+ * <warn>This property is deprecated.</warn>
+
+ * @property {'CommandInteractionOptionNotFound'} CommandInteractionOptionNotFound
+ * @property {'CommandInteractionOptionType'} CommandInteractionOptionType
+ * @property {'CommandInteractionOptionEmpty'} CommandInteractionOptionEmpty
+ * @property {'CommandInteractionOptionNoSubcommand'} CommandInteractionOptionNoSubcommand
+ * @property {'CommandInteractionOptionNoSubcommandGroup'} CommandInteractionOptionNoSubcommandGroup
+ * @property {'CommandInteractionOptionInvalidChannelType'} CommandInteractionOptionInvalidChannelType
+ * @property {'AutocompleteInteractionOptionNoFocusedOption'} AutocompleteInteractionOptionNoFocusedOption
+
+ * @property {'ModalSubmitInteractionFieldNotFound'} ModalSubmitInteractionFieldNotFound
+ * @property {'ModalSubmitInteractionFieldType'} ModalSubmitInteractionFieldType
+
+ * @property {'InvalidMissingScopes'} InvalidMissingScopes
+ * @property {'InvalidScopesWithPermissions'} InvalidScopesWithPermissions
+
+ * @property {'NotImplemented'} NotImplemented
+
+ * @property {'GuildForumMessageRequired'} GuildForumMessageRequired
+
+ * @property {'SweepFilterReturn'} SweepFilterReturn
+ */
+
+const keys = [
+ 'ClientInvalidOption',
+ 'ClientInvalidProvidedShards',
+ 'ClientMissingIntents',
+ 'ClientNotReady',
+
+ 'TokenInvalid',
+ 'TokenMissing',
+ 'ApplicationCommandPermissionsTokenMissing',
+
+ 'WSCloseRequested',
+ 'WSConnectionExists',
+ 'WSNotOpen',
+ 'ManagerDestroyed',
+
+ 'BitFieldInvalid',
+
+ 'ShardingInvalid',
+ 'ShardingRequired',
+ 'InvalidIntents',
+ 'DisallowedIntents',
+ 'ShardingNoShards',
+ 'ShardingInProcess',
+ 'ShardingInvalidEvalBroadcast',
+ 'ShardingShardNotFound',
+ 'ShardingAlreadySpawned',
+ 'ShardingProcessExists',
+ 'ShardingWorkerExists',
+ 'ShardingReadyTimeout',
+ 'ShardingReadyDisconnected',
+ 'ShardingReadyDied',
+ 'ShardingNoChildExists',
+ 'ShardingShardMiscalculation',
+
+ 'ColorRange',
+ 'ColorConvert',
+
+ 'InviteOptionsMissingChannel',
+
+ 'ButtonLabel',
+ 'ButtonURL',
+ 'ButtonCustomId',
+
+ 'SelectMenuCustomId',
+ 'SelectMenuPlaceholder',
+ 'SelectOptionLabel',
+ 'SelectOptionValue',
+ 'SelectOptionDescription',
+
+ 'InteractionCollectorError',
+
+ 'FileNotFound',
+
+ 'UserBannerNotFetched',
+ 'UserNoDMChannel',
+
+ 'VoiceNotStageChannel',
+
+ 'VoiceStateNotOwn',
+ 'VoiceStateInvalidType',
+
+ 'ReqResourceType',
+
+ 'ImageFormat',
+ 'ImageSize',
+
+ 'MessageBulkDeleteType',
+ 'MessageNonceType',
+ 'MessageContentType',
+
+ 'SplitMaxLen',
+
+ 'BanResolveId',
+ 'FetchBanResolveId',
+
+ 'PruneDaysType',
+
+ 'GuildChannelResolve',
+ 'GuildVoiceChannelResolve',
+ 'GuildChannelOrphan',
+ 'GuildChannelUnowned',
+ 'GuildOwned',
+ 'GuildMembersTimeout',
+ 'GuildUncachedMe',
+ 'ChannelNotCached',
+ 'StageChannelResolve',
+ 'GuildScheduledEventResolve',
+ 'FetchOwnerId',
+
+ 'InvalidType',
+ 'InvalidElement',
+
+ 'MessageThreadParent',
+ 'MessageExistingThread',
+ 'ThreadInvitableType',
+
+ 'WebhookMessage',
+ 'WebhookTokenUnavailable',
+ 'WebhookURLInvalid',
+ 'WebhookApplication',
+ 'MessageReferenceMissing',
+
+ 'EmojiType',
+ 'EmojiManaged',
+ 'MissingManageGuildExpressionsPermission',
+ 'MissingManageEmojisAndStickersPermission',
+
+ 'NotGuildSticker',
+
+ 'ReactionResolveUser',
+
+ 'VanityURL',
+
+ 'InviteResolveCode',
+
+ 'InviteNotFound',
+
+ 'DeleteGroupDMChannel',
+ 'FetchGroupDMChannel',
+
+ 'MemberFetchNonceLength',
+
+ 'GlobalCommandPermissions',
+ 'GuildUncachedEntityResolve',
+
+ 'InteractionAlreadyReplied',
+ 'InteractionNotReplied',
+ 'InteractionEphemeralReplied',
+
+ 'CommandInteractionOptionNotFound',
+ 'CommandInteractionOptionType',
+ 'CommandInteractionOptionEmpty',
+ 'CommandInteractionOptionNoSubcommand',
+ 'CommandInteractionOptionNoSubcommandGroup',
+ 'CommandInteractionOptionInvalidChannelType',
+ 'AutocompleteInteractionOptionNoFocusedOption',
+
+ 'ModalSubmitInteractionFieldNotFound',
+ 'ModalSubmitInteractionFieldType',
+
+ 'InvalidMissingScopes',
+ 'InvalidScopesWithPermissions',
+
+ 'NotImplemented',
+
+ 'SweepFilterReturn',
+
+ 'GuildForumMessageRequired',
+];
+
+// JSDoc for IntelliSense purposes
+/**
+ * @type {DiscordjsErrorCodes}
+ * @ignore
+ */
+module.exports = Object.fromEntries(keys.map(key => [key, key]));
diff --git a/node_modules/discord.js/src/errors/Messages.js b/node_modules/discord.js/src/errors/Messages.js
new file mode 100644
index 0000000..550219f
--- /dev/null
+++ b/node_modules/discord.js/src/errors/Messages.js
@@ -0,0 +1,170 @@
+'use strict';
+
+const DjsErrorCodes = require('./ErrorCodes');
+
+const Messages = {
+ [DjsErrorCodes.ClientInvalidOption]: (prop, must) => `The ${prop} option must be ${must}`,
+ [DjsErrorCodes.ClientInvalidProvidedShards]: 'None of the provided shards were valid.',
+ [DjsErrorCodes.ClientMissingIntents]: 'Valid intents must be provided for the Client.',
+ [DjsErrorCodes.ClientNotReady]: action => `The client needs to be logged in to ${action}.`,
+
+ [DjsErrorCodes.TokenInvalid]: 'An invalid token was provided.',
+ [DjsErrorCodes.TokenMissing]: 'Request to use token, but token was unavailable to the client.',
+ [DjsErrorCodes.ApplicationCommandPermissionsTokenMissing]:
+ 'Editing application command permissions requires an OAuth2 bearer token, but none was provided.',
+
+ [DjsErrorCodes.WSCloseRequested]: 'WebSocket closed due to user request.',
+ [DjsErrorCodes.WSConnectionExists]: 'There is already an existing WebSocket connection.',
+ [DjsErrorCodes.WSNotOpen]: (data = 'data') => `WebSocket not open to send ${data}`,
+ [DjsErrorCodes.ManagerDestroyed]: 'Manager was destroyed.',
+
+ [DjsErrorCodes.BitFieldInvalid]: bit => `Invalid bitfield flag or number: ${bit}.`,
+
+ [DjsErrorCodes.ShardingInvalid]: 'Invalid shard settings were provided.',
+ [DjsErrorCodes.ShardingRequired]: 'This session would have handled too many guilds - Sharding is required.',
+ [DjsErrorCodes.InvalidIntents]: 'Invalid intent provided for WebSocket intents.',
+ [DjsErrorCodes.DisallowedIntents]: 'Privileged intent provided is not enabled or whitelisted.',
+ [DjsErrorCodes.ShardingNoShards]: 'No shards have been spawned.',
+ [DjsErrorCodes.ShardingInProcess]: 'Shards are still being spawned.',
+ [DjsErrorCodes.ShardingInvalidEvalBroadcast]: 'Script to evaluate must be a function',
+ [DjsErrorCodes.ShardingShardNotFound]: id => `Shard ${id} could not be found.`,
+ [DjsErrorCodes.ShardingAlreadySpawned]: count => `Already spawned ${count} shards.`,
+ [DjsErrorCodes.ShardingProcessExists]: id => `Shard ${id} already has an active process.`,
+ [DjsErrorCodes.ShardingWorkerExists]: id => `Shard ${id} already has an active worker.`,
+ [DjsErrorCodes.ShardingReadyTimeout]: id => `Shard ${id}'s Client took too long to become ready.`,
+ [DjsErrorCodes.ShardingReadyDisconnected]: id => `Shard ${id}'s Client disconnected before becoming ready.`,
+ [DjsErrorCodes.ShardingReadyDied]: id => `Shard ${id}'s process exited before its Client became ready.`,
+ [DjsErrorCodes.ShardingNoChildExists]: id => `Shard ${id} has no active process or worker.`,
+ [DjsErrorCodes.ShardingShardMiscalculation]: (shard, guild, count) =>
+ `Calculated invalid shard ${shard} for guild ${guild} with ${count} shards.`,
+
+ [DjsErrorCodes.ColorRange]: 'Color must be within the range 0 - 16777215 (0xFFFFFF).',
+ [DjsErrorCodes.ColorConvert]: 'Unable to convert color to a number.',
+
+ [DjsErrorCodes.InviteOptionsMissingChannel]:
+ 'A valid guild channel must be provided when GuildScheduledEvent is EXTERNAL.',
+
+ [DjsErrorCodes.ButtonLabel]: 'MessageButton label must be a string',
+ [DjsErrorCodes.ButtonURL]: 'MessageButton URL must be a string',
+ [DjsErrorCodes.ButtonCustomId]: 'MessageButton customId must be a string',
+
+ [DjsErrorCodes.SelectMenuCustomId]: 'MessageSelectMenu customId must be a string',
+ [DjsErrorCodes.SelectMenuPlaceholder]: 'MessageSelectMenu placeholder must be a string',
+ [DjsErrorCodes.SelectOptionLabel]: 'MessageSelectOption label must be a string',
+ [DjsErrorCodes.SelectOptionValue]: 'MessageSelectOption value must be a string',
+ [DjsErrorCodes.SelectOptionDescription]: 'MessageSelectOption description must be a string',
+
+ [DjsErrorCodes.InteractionCollectorError]: reason =>
+ `Collector received no interactions before ending with reason: ${reason}`,
+
+ [DjsErrorCodes.FileNotFound]: file => `File could not be found: ${file}`,
+
+ [DjsErrorCodes.UserBannerNotFetched]: "You must fetch this user's banner before trying to generate its URL!",
+ [DjsErrorCodes.UserNoDMChannel]: 'No DM Channel exists!',
+
+ [DjsErrorCodes.VoiceNotStageChannel]: 'You are only allowed to do this in stage channels.',
+
+ [DjsErrorCodes.VoiceStateNotOwn]:
+ 'You cannot self-deafen/mute/request to speak on VoiceStates that do not belong to the ClientUser.',
+ [DjsErrorCodes.VoiceStateInvalidType]: name => `${name} must be a boolean.`,
+
+ [DjsErrorCodes.ReqResourceType]: 'The resource must be a string, Buffer or a valid file stream.',
+
+ [DjsErrorCodes.ImageFormat]: format => `Invalid image format: ${format}`,
+ [DjsErrorCodes.ImageSize]: size => `Invalid image size: ${size}`,
+
+ [DjsErrorCodes.MessageBulkDeleteType]: 'The messages must be an Array, Collection, or number.',
+ [DjsErrorCodes.MessageNonceType]: 'Message nonce must be an integer or a string.',
+ [DjsErrorCodes.MessageContentType]: 'Message content must be a string.',
+
+ [DjsErrorCodes.SplitMaxLen]: 'Chunk exceeds the max length and contains no split characters.',
+
+ [DjsErrorCodes.BanResolveId]: (ban = false) => `Couldn't resolve the user id to ${ban ? 'ban' : 'unban'}.`,
+ [DjsErrorCodes.FetchBanResolveId]: "Couldn't resolve the user id to fetch the ban.",
+
+ [DjsErrorCodes.PruneDaysType]: 'Days must be a number',
+
+ [DjsErrorCodes.GuildChannelResolve]: 'Could not resolve channel to a guild channel.',
+ [DjsErrorCodes.GuildVoiceChannelResolve]: 'Could not resolve channel to a guild voice channel.',
+ [DjsErrorCodes.GuildChannelOrphan]: 'Could not find a parent to this guild channel.',
+ [DjsErrorCodes.GuildChannelUnowned]: "The fetched channel does not belong to this manager's guild.",
+ [DjsErrorCodes.GuildOwned]: 'Guild is owned by the client.',
+ [DjsErrorCodes.GuildMembersTimeout]: "Members didn't arrive in time.",
+ [DjsErrorCodes.GuildUncachedMe]: 'The client user as a member of this guild is uncached.',
+ [DjsErrorCodes.ChannelNotCached]: 'Could not find the channel where this message came from in the cache!',
+ [DjsErrorCodes.StageChannelResolve]: 'Could not resolve channel to a stage channel.',
+ [DjsErrorCodes.GuildScheduledEventResolve]: 'Could not resolve the guild scheduled event.',
+ [DjsErrorCodes.FetchOwnerId]: "Couldn't resolve the guild ownerId to fetch the member.",
+
+ [DjsErrorCodes.InvalidType]: (name, expected, an = false) => `Supplied ${name} is not a${an ? 'n' : ''} ${expected}.`,
+ [DjsErrorCodes.InvalidElement]: (type, name, elem) => `Supplied ${type} ${name} includes an invalid element: ${elem}`,
+
+ [DjsErrorCodes.MessageThreadParent]: 'The message was not sent in a guild text or news channel',
+ [DjsErrorCodes.MessageExistingThread]: 'The message already has a thread',
+ [DjsErrorCodes.ThreadInvitableType]: type => `Invitable cannot be edited on ${type}`,
+
+ [DjsErrorCodes.WebhookMessage]: 'The message was not sent by a webhook.',
+ [DjsErrorCodes.WebhookTokenUnavailable]: 'This action requires a webhook token, but none is available.',
+ [DjsErrorCodes.WebhookURLInvalid]: 'The provided webhook URL is not valid.',
+ [DjsErrorCodes.WebhookApplication]: 'This message webhook belongs to an application and cannot be fetched.',
+ [DjsErrorCodes.MessageReferenceMissing]: 'The message does not reference another message',
+
+ [DjsErrorCodes.EmojiType]: 'Emoji must be a string or GuildEmoji/ReactionEmoji',
+ [DjsErrorCodes.EmojiManaged]: 'Emoji is managed and has no Author.',
+ [DjsErrorCodes.MissingManageGuildExpressionsPermission]: guild =>
+ `Client must have Manage Guild Expressions permission in guild ${guild} to see emoji authors.`,
+ [DjsErrorCodes.MissingManageEmojisAndStickersPermission]: guild =>
+ `Client must have Manage Emojis and Stickers permission in guild ${guild} to see emoji authors.`,
+
+ [DjsErrorCodes.NotGuildSticker]: 'Sticker is a standard (non-guild) sticker and has no author.',
+
+ [DjsErrorCodes.ReactionResolveUser]: "Couldn't resolve the user id to remove from the reaction.",
+
+ [DjsErrorCodes.VanityURL]: 'This guild does not have the vanity URL feature enabled.',
+
+ [DjsErrorCodes.InviteResolveCode]: 'Could not resolve the code to fetch the invite.',
+
+ [DjsErrorCodes.InviteNotFound]: 'Could not find the requested invite.',
+
+ [DjsErrorCodes.DeleteGroupDMChannel]: "Bots don't have access to Group DM Channels and cannot delete them",
+ [DjsErrorCodes.FetchGroupDMChannel]: "Bots don't have access to Group DM Channels and cannot fetch them",
+
+ [DjsErrorCodes.MemberFetchNonceLength]: 'Nonce length must not exceed 32 characters.',
+
+ [DjsErrorCodes.GlobalCommandPermissions]:
+ 'Permissions for global commands may only be fetched or modified by providing a GuildResolvable ' +
+ "or from a guild's application command manager.",
+ [DjsErrorCodes.GuildUncachedEntityResolve]: type =>
+ `Cannot resolve ${type} from an arbitrary guild, provide an id instead`,
+
+ [DjsErrorCodes.InteractionAlreadyReplied]: 'The reply to this interaction has already been sent or deferred.',
+ [DjsErrorCodes.InteractionNotReplied]: 'The reply to this interaction has not been sent or deferred.',
+ [DjsErrorCodes.InteractionEphemeralReplied]: 'Ephemeral responses cannot be deleted.',
+
+ [DjsErrorCodes.CommandInteractionOptionNotFound]: name => `Required option "${name}" not found.`,
+ [DjsErrorCodes.CommandInteractionOptionType]: (name, type, expected) =>
+ `Option "${name}" is of type: ${type}; expected ${expected}.`,
+ [DjsErrorCodes.CommandInteractionOptionEmpty]: (name, type) =>
+ `Required option "${name}" is of type: ${type}; expected a non-empty value.`,
+ [DjsErrorCodes.CommandInteractionOptionNoSubcommand]: 'No subcommand specified for interaction.',
+ [DjsErrorCodes.CommandInteractionOptionNoSubcommandGroup]: 'No subcommand group specified for interaction.',
+ [DjsErrorCodes.CommandInteractionOptionInvalidChannelType]: (name, type, expected) =>
+ `The type of channel of the option "${name}" is: ${type}; expected ${expected}.`,
+ [DjsErrorCodes.AutocompleteInteractionOptionNoFocusedOption]: 'No focused option for autocomplete interaction.',
+
+ [DjsErrorCodes.ModalSubmitInteractionFieldNotFound]: customId =>
+ `Required field with custom id "${customId}" not found.`,
+ [DjsErrorCodes.ModalSubmitInteractionFieldType]: (customId, type, expected) =>
+ `Field with custom id "${customId}" is of type: ${type}; expected ${expected}.`,
+
+ [DjsErrorCodes.InvalidMissingScopes]: 'At least one valid scope must be provided for the invite',
+ [DjsErrorCodes.InvalidScopesWithPermissions]: 'Permissions cannot be set without the bot scope.',
+
+ [DjsErrorCodes.NotImplemented]: (what, name) => `Method ${what} not implemented on ${name}.`,
+
+ [DjsErrorCodes.SweepFilterReturn]: 'The return value of the sweepFilter function was not false or a Function',
+
+ [DjsErrorCodes.GuildForumMessageRequired]: 'You must provide a message to create a guild forum thread',
+};
+
+module.exports = Messages;
diff --git a/node_modules/discord.js/src/errors/index.js b/node_modules/discord.js/src/errors/index.js
new file mode 100644
index 0000000..78dc5c6
--- /dev/null
+++ b/node_modules/discord.js/src/errors/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = require('./DJSError');
+module.exports.ErrorCodes = require('./ErrorCodes');
+module.exports.Messages = require('./Messages');
diff --git a/node_modules/discord.js/src/index.js b/node_modules/discord.js/src/index.js
new file mode 100644
index 0000000..5021331
--- /dev/null
+++ b/node_modules/discord.js/src/index.js
@@ -0,0 +1,220 @@
+'use strict';
+
+const { __exportStar } = require('tslib');
+
+// "Root" classes (starting points)
+exports.BaseClient = require('./client/BaseClient');
+exports.Client = require('./client/Client');
+exports.Shard = require('./sharding/Shard');
+exports.ShardClientUtil = require('./sharding/ShardClientUtil');
+exports.ShardingManager = require('./sharding/ShardingManager');
+exports.WebhookClient = require('./client/WebhookClient');
+
+// Errors
+exports.DiscordjsError = require('./errors/DJSError').DiscordjsError;
+exports.DiscordjsTypeError = require('./errors/DJSError').DiscordjsTypeError;
+exports.DiscordjsRangeError = require('./errors/DJSError').DiscordjsRangeError;
+exports.DiscordjsErrorCodes = require('./errors/ErrorCodes');
+
+// Utilities
+exports.ActivityFlagsBitField = require('./util/ActivityFlagsBitField');
+exports.ApplicationFlagsBitField = require('./util/ApplicationFlagsBitField');
+exports.AttachmentFlagsBitField = require('./util/AttachmentFlagsBitField');
+exports.BaseManager = require('./managers/BaseManager');
+exports.BitField = require('./util/BitField');
+exports.ChannelFlagsBitField = require('./util/ChannelFlagsBitField');
+exports.Collection = require('@discordjs/collection').Collection;
+exports.Constants = require('./util/Constants');
+exports.Colors = require('./util/Colors');
+exports.DataResolver = require('./util/DataResolver');
+exports.Events = require('./util/Events');
+exports.Formatters = require('./util/Formatters');
+exports.GuildMemberFlagsBitField = require('./util/GuildMemberFlagsBitField').GuildMemberFlagsBitField;
+exports.IntentsBitField = require('./util/IntentsBitField');
+exports.LimitedCollection = require('./util/LimitedCollection');
+exports.MessageFlagsBitField = require('./util/MessageFlagsBitField');
+exports.Options = require('./util/Options');
+exports.Partials = require('./util/Partials');
+exports.PermissionsBitField = require('./util/PermissionsBitField');
+exports.RoleFlagsBitField = require('./util/RoleFlagsBitField');
+exports.ShardEvents = require('./util/ShardEvents');
+exports.Status = require('./util/Status');
+exports.SnowflakeUtil = require('@sapphire/snowflake').DiscordSnowflake;
+exports.Sweepers = require('./util/Sweepers');
+exports.SystemChannelFlagsBitField = require('./util/SystemChannelFlagsBitField');
+exports.ThreadMemberFlagsBitField = require('./util/ThreadMemberFlagsBitField');
+exports.UserFlagsBitField = require('./util/UserFlagsBitField');
+__exportStar(require('./util/Util.js'), exports);
+exports.WebSocketShardEvents = require('./util/WebSocketShardEvents');
+exports.version = require('../package.json').version;
+
+// Managers
+exports.ApplicationCommandManager = require('./managers/ApplicationCommandManager');
+exports.ApplicationCommandPermissionsManager = require('./managers/ApplicationCommandPermissionsManager');
+exports.AutoModerationRuleManager = require('./managers/AutoModerationRuleManager');
+exports.BaseGuildEmojiManager = require('./managers/BaseGuildEmojiManager');
+exports.CachedManager = require('./managers/CachedManager');
+exports.ChannelManager = require('./managers/ChannelManager');
+exports.ClientVoiceManager = require('./client/voice/ClientVoiceManager');
+exports.DataManager = require('./managers/DataManager');
+exports.DMMessageManager = require('./managers/DMMessageManager');
+exports.GuildApplicationCommandManager = require('./managers/GuildApplicationCommandManager');
+exports.GuildBanManager = require('./managers/GuildBanManager');
+exports.GuildChannelManager = require('./managers/GuildChannelManager');
+exports.GuildEmojiManager = require('./managers/GuildEmojiManager');
+exports.GuildEmojiRoleManager = require('./managers/GuildEmojiRoleManager');
+exports.GuildForumThreadManager = require('./managers/GuildForumThreadManager');
+exports.GuildInviteManager = require('./managers/GuildInviteManager');
+exports.GuildManager = require('./managers/GuildManager');
+exports.GuildMemberManager = require('./managers/GuildMemberManager');
+exports.GuildMemberRoleManager = require('./managers/GuildMemberRoleManager');
+exports.GuildMessageManager = require('./managers/GuildMessageManager');
+exports.GuildScheduledEventManager = require('./managers/GuildScheduledEventManager');
+exports.GuildStickerManager = require('./managers/GuildStickerManager');
+exports.GuildTextThreadManager = require('./managers/GuildTextThreadManager');
+exports.MessageManager = require('./managers/MessageManager');
+exports.PermissionOverwriteManager = require('./managers/PermissionOverwriteManager');
+exports.PresenceManager = require('./managers/PresenceManager');
+exports.ReactionManager = require('./managers/ReactionManager');
+exports.ReactionUserManager = require('./managers/ReactionUserManager');
+exports.RoleManager = require('./managers/RoleManager');
+exports.StageInstanceManager = require('./managers/StageInstanceManager');
+exports.ThreadManager = require('./managers/ThreadManager');
+exports.ThreadMemberManager = require('./managers/ThreadMemberManager');
+exports.UserManager = require('./managers/UserManager');
+exports.VoiceStateManager = require('./managers/VoiceStateManager');
+exports.WebSocketManager = require('./client/websocket/WebSocketManager');
+exports.WebSocketShard = require('./client/websocket/WebSocketShard');
+
+// Structures
+exports.ActionRow = require('./structures/ActionRow');
+exports.ActionRowBuilder = require('./structures/ActionRowBuilder');
+exports.Activity = require('./structures/Presence').Activity;
+exports.AnonymousGuild = require('./structures/AnonymousGuild');
+exports.Application = require('./structures/interfaces/Application');
+exports.ApplicationCommand = require('./structures/ApplicationCommand');
+exports.ApplicationRoleConnectionMetadata =
+ require('./structures/ApplicationRoleConnectionMetadata').ApplicationRoleConnectionMetadata;
+exports.AutocompleteInteraction = require('./structures/AutocompleteInteraction');
+exports.AutoModerationActionExecution = require('./structures/AutoModerationActionExecution');
+exports.AutoModerationRule = require('./structures/AutoModerationRule');
+exports.Base = require('./structures/Base');
+exports.BaseGuild = require('./structures/BaseGuild');
+exports.BaseGuildEmoji = require('./structures/BaseGuildEmoji');
+exports.BaseGuildTextChannel = require('./structures/BaseGuildTextChannel');
+exports.BaseGuildVoiceChannel = require('./structures/BaseGuildVoiceChannel');
+exports.ButtonBuilder = require('./structures/ButtonBuilder');
+exports.ButtonComponent = require('./structures/ButtonComponent');
+exports.ButtonInteraction = require('./structures/ButtonInteraction');
+exports.CategoryChannel = require('./structures/CategoryChannel');
+exports.BaseChannel = require('./structures/BaseChannel').BaseChannel;
+exports.ChatInputCommandInteraction = require('./structures/ChatInputCommandInteraction');
+exports.ClientApplication = require('./structures/ClientApplication');
+exports.ClientPresence = require('./structures/ClientPresence');
+exports.ClientUser = require('./structures/ClientUser');
+exports.CommandInteraction = require('./structures/CommandInteraction');
+exports.Collector = require('./structures/interfaces/Collector');
+exports.CommandInteractionOptionResolver = require('./structures/CommandInteractionOptionResolver');
+exports.Component = require('./structures/Component');
+exports.ContextMenuCommandInteraction = require('./structures/ContextMenuCommandInteraction');
+exports.DMChannel = require('./structures/DMChannel');
+exports.Embed = require('./structures/Embed');
+exports.EmbedBuilder = require('./structures/EmbedBuilder');
+exports.Emoji = require('./structures/Emoji').Emoji;
+exports.ForumChannel = require('./structures/ForumChannel');
+exports.Guild = require('./structures/Guild').Guild;
+exports.GuildAuditLogs = require('./structures/GuildAuditLogs');
+exports.GuildAuditLogsEntry = require('./structures/GuildAuditLogsEntry');
+exports.GuildBan = require('./structures/GuildBan');
+exports.GuildChannel = require('./structures/GuildChannel');
+exports.GuildEmoji = require('./structures/GuildEmoji');
+exports.GuildMember = require('./structures/GuildMember').GuildMember;
+exports.GuildOnboarding = require('./structures/GuildOnboarding').GuildOnboarding;
+exports.GuildOnboardingPrompt = require('./structures/GuildOnboardingPrompt').GuildOnboardingPrompt;
+exports.GuildOnboardingPromptOption = require('./structures/GuildOnboardingPromptOption').GuildOnboardingPromptOption;
+exports.GuildPreview = require('./structures/GuildPreview');
+exports.GuildPreviewEmoji = require('./structures/GuildPreviewEmoji');
+exports.GuildScheduledEvent = require('./structures/GuildScheduledEvent').GuildScheduledEvent;
+exports.GuildTemplate = require('./structures/GuildTemplate');
+exports.Integration = require('./structures/Integration');
+exports.IntegrationApplication = require('./structures/IntegrationApplication');
+exports.BaseInteraction = require('./structures/BaseInteraction');
+exports.InteractionCollector = require('./structures/InteractionCollector');
+exports.InteractionResponse = require('./structures/InteractionResponse');
+exports.InteractionWebhook = require('./structures/InteractionWebhook');
+exports.Invite = require('./structures/Invite');
+exports.InviteStageInstance = require('./structures/InviteStageInstance');
+exports.InviteGuild = require('./structures/InviteGuild');
+exports.Message = require('./structures/Message').Message;
+exports.Attachment = require('./structures/Attachment');
+exports.AttachmentBuilder = require('./structures/AttachmentBuilder');
+exports.ModalBuilder = require('./structures/ModalBuilder');
+exports.MessageCollector = require('./structures/MessageCollector');
+exports.MessageComponentInteraction = require('./structures/MessageComponentInteraction');
+exports.MessageContextMenuCommandInteraction = require('./structures/MessageContextMenuCommandInteraction');
+exports.MessageMentions = require('./structures/MessageMentions');
+exports.MessagePayload = require('./structures/MessagePayload');
+exports.MessageReaction = require('./structures/MessageReaction');
+exports.ModalSubmitInteraction = require('./structures/ModalSubmitInteraction');
+exports.ModalSubmitFields = require('./structures/ModalSubmitFields');
+exports.NewsChannel = require('./structures/NewsChannel');
+exports.OAuth2Guild = require('./structures/OAuth2Guild');
+exports.PartialGroupDMChannel = require('./structures/PartialGroupDMChannel');
+exports.PermissionOverwrites = require('./structures/PermissionOverwrites');
+exports.Presence = require('./structures/Presence').Presence;
+exports.ReactionCollector = require('./structures/ReactionCollector');
+exports.ReactionEmoji = require('./structures/ReactionEmoji');
+exports.RichPresenceAssets = require('./structures/Presence').RichPresenceAssets;
+exports.Role = require('./structures/Role').Role;
+exports.SelectMenuBuilder = require('./structures/SelectMenuBuilder');
+exports.ChannelSelectMenuBuilder = require('./structures/ChannelSelectMenuBuilder');
+exports.MentionableSelectMenuBuilder = require('./structures/MentionableSelectMenuBuilder');
+exports.RoleSelectMenuBuilder = require('./structures/RoleSelectMenuBuilder');
+exports.StringSelectMenuBuilder = require('./structures/StringSelectMenuBuilder');
+exports.UserSelectMenuBuilder = require('./structures/UserSelectMenuBuilder');
+exports.BaseSelectMenuComponent = require('./structures/BaseSelectMenuComponent');
+exports.SelectMenuComponent = require('./structures/SelectMenuComponent');
+exports.ChannelSelectMenuComponent = require('./structures/ChannelSelectMenuComponent');
+exports.MentionableSelectMenuComponent = require('./structures/MentionableSelectMenuComponent');
+exports.RoleSelectMenuComponent = require('./structures/RoleSelectMenuComponent');
+exports.StringSelectMenuComponent = require('./structures/StringSelectMenuComponent');
+exports.UserSelectMenuComponent = require('./structures/UserSelectMenuComponent');
+exports.SelectMenuInteraction = require('./structures/SelectMenuInteraction');
+exports.ChannelSelectMenuInteraction = require('./structures/ChannelSelectMenuInteraction');
+exports.MentionableSelectMenuInteraction = require('./structures/MentionableSelectMenuInteraction');
+exports.MentionableSelectMenuInteraction = require('./structures/MentionableSelectMenuInteraction');
+exports.RoleSelectMenuInteraction = require('./structures/RoleSelectMenuInteraction');
+exports.StringSelectMenuInteraction = require('./structures/StringSelectMenuInteraction');
+exports.UserSelectMenuInteraction = require('./structures/UserSelectMenuInteraction');
+exports.SelectMenuOptionBuilder = require('./structures/SelectMenuOptionBuilder');
+exports.StringSelectMenuOptionBuilder = require('./structures/StringSelectMenuOptionBuilder');
+exports.StageChannel = require('./structures/StageChannel');
+exports.StageInstance = require('./structures/StageInstance').StageInstance;
+exports.Sticker = require('./structures/Sticker').Sticker;
+exports.StickerPack = require('./structures/StickerPack');
+exports.Team = require('./structures/Team');
+exports.TeamMember = require('./structures/TeamMember');
+exports.TextChannel = require('./structures/TextChannel');
+exports.TextInputBuilder = require('./structures/TextInputBuilder');
+exports.TextInputComponent = require('./structures/TextInputComponent');
+exports.ThreadChannel = require('./structures/ThreadChannel');
+exports.ThreadMember = require('./structures/ThreadMember');
+exports.Typing = require('./structures/Typing');
+exports.User = require('./structures/User');
+exports.UserContextMenuCommandInteraction = require('./structures/UserContextMenuCommandInteraction');
+exports.VoiceChannel = require('./structures/VoiceChannel');
+exports.VoiceRegion = require('./structures/VoiceRegion');
+exports.VoiceState = require('./structures/VoiceState');
+exports.Webhook = require('./structures/Webhook');
+exports.Widget = require('./structures/Widget');
+exports.WidgetMember = require('./structures/WidgetMember');
+exports.WelcomeChannel = require('./structures/WelcomeChannel');
+exports.WelcomeScreen = require('./structures/WelcomeScreen');
+
+// External
+__exportStar(require('discord-api-types/v10'), exports);
+__exportStar(require('@discordjs/builders'), exports);
+__exportStar(require('@discordjs/formatters'), exports);
+__exportStar(require('@discordjs/rest'), exports);
+__exportStar(require('@discordjs/util'), exports);
+__exportStar(require('@discordjs/ws'), exports);
diff --git a/node_modules/discord.js/src/managers/ApplicationCommandManager.js b/node_modules/discord.js/src/managers/ApplicationCommandManager.js
new file mode 100644
index 0000000..417afc4
--- /dev/null
+++ b/node_modules/discord.js/src/managers/ApplicationCommandManager.js
@@ -0,0 +1,263 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { makeURLSearchParams } = require('@discordjs/rest');
+const { isJSONEncodable } = require('@discordjs/util');
+const { Routes } = require('discord-api-types/v10');
+const ApplicationCommandPermissionsManager = require('./ApplicationCommandPermissionsManager');
+const CachedManager = require('./CachedManager');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+const ApplicationCommand = require('../structures/ApplicationCommand');
+const PermissionsBitField = require('../util/PermissionsBitField');
+
+/**
+ * Manages API methods for application commands and stores their cache.
+ * @extends {CachedManager}
+ */
+class ApplicationCommandManager extends CachedManager {
+ constructor(client, iterable) {
+ super(client, ApplicationCommand, iterable);
+
+ /**
+ * The manager for permissions of arbitrary commands on arbitrary guilds
+ * @type {ApplicationCommandPermissionsManager}
+ */
+ this.permissions = new ApplicationCommandPermissionsManager(this);
+ }
+
+ /**
+ * The cache of this manager
+ * @type {Collection<Snowflake, ApplicationCommand>}
+ * @name ApplicationCommandManager#cache
+ */
+
+ _add(data, cache, guildId) {
+ return super._add(data, cache, { extras: [this.guild, guildId] });
+ }
+
+ /**
+ * The APIRouter path to the commands
+ * @param {Snowflake} [options.id] The application command's id
+ * @param {Snowflake} [options.guildId] The guild's id to use in the path,
+ * ignored when using a {@link GuildApplicationCommandManager}
+ * @returns {string}
+ * @private
+ */
+ commandPath({ id, guildId } = {}) {
+ if (this.guild ?? guildId) {
+ if (id) {
+ return Routes.applicationGuildCommand(this.client.application.id, this.guild?.id ?? guildId, id);
+ }
+
+ return Routes.applicationGuildCommands(this.client.application.id, this.guild?.id ?? guildId);
+ }
+
+ if (id) {
+ return Routes.applicationCommand(this.client.application.id, id);
+ }
+
+ return Routes.applicationCommands(this.client.application.id);
+ }
+
+ /**
+ * Data that resolves to give an ApplicationCommand object. This can be:
+ * * An ApplicationCommand object
+ * * A Snowflake
+ * @typedef {ApplicationCommand|Snowflake} ApplicationCommandResolvable
+ */
+
+ /**
+ * Data that resolves to the data of an ApplicationCommand
+ * @typedef {ApplicationCommandData|APIApplicationCommand} ApplicationCommandDataResolvable
+ */
+
+ /**
+ * Options used to fetch data from Discord
+ * @typedef {Object} BaseFetchOptions
+ * @property {boolean} [cache=true] Whether to cache the fetched data if it wasn't already
+ * @property {boolean} [force=false] Whether to skip the cache check and request the API
+ */
+
+ /**
+ * Options used to fetch Application Commands from Discord
+ * @typedef {BaseFetchOptions} FetchApplicationCommandOptions
+ * @property {Snowflake} [guildId] The guild's id to fetch commands for, for when the guild is not cached
+ * @property {LocaleString} [locale] The locale to use when fetching this command
+ * @property {boolean} [withLocalizations] Whether to fetch all localization data
+ */
+
+ /**
+ * Obtains one or multiple application commands from Discord, or the cache if it's already available.
+ * @param {Snowflake} [id] The application command's id
+ * @param {FetchApplicationCommandOptions} [options] Additional options for this fetch
+ * @returns {Promise<ApplicationCommand|Collection<Snowflake, ApplicationCommand>>}
+ * @example
+ * // Fetch a single command
+ * client.application.commands.fetch('123456789012345678')
+ * .then(command => console.log(`Fetched command ${command.name}`))
+ * .catch(console.error);
+ * @example
+ * // Fetch all commands
+ * guild.commands.fetch()
+ * .then(commands => console.log(`Fetched ${commands.size} commands`))
+ * .catch(console.error);
+ */
+ async fetch(id, { guildId, cache = true, force = false, locale, withLocalizations } = {}) {
+ if (typeof id === 'object') {
+ ({ guildId, cache = true, locale, withLocalizations } = id);
+ } else if (id) {
+ if (!force) {
+ const existing = this.cache.get(id);
+ if (existing) return existing;
+ }
+ const command = await this.client.rest.get(this.commandPath({ id, guildId }));
+ return this._add(command, cache);
+ }
+
+ const data = await this.client.rest.get(this.commandPath({ guildId }), {
+ headers: {
+ 'X-Discord-Locale': locale,
+ },
+ query: makeURLSearchParams({ with_localizations: withLocalizations }),
+ });
+ return data.reduce((coll, command) => coll.set(command.id, this._add(command, cache, guildId)), new Collection());
+ }
+
+ /**
+ * Creates an application command.
+ * @param {ApplicationCommandDataResolvable} command The command
+ * @param {Snowflake} [guildId] The guild's id to create this command in,
+ * ignored when using a {@link GuildApplicationCommandManager}
+ * @returns {Promise<ApplicationCommand>}
+ * @example
+ * // Create a new command
+ * client.application.commands.create({
+ * name: 'test',
+ * description: 'A test command',
+ * })
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async create(command, guildId) {
+ const data = await this.client.rest.post(this.commandPath({ guildId }), {
+ body: this.constructor.transformCommand(command),
+ });
+ return this._add(data, true, guildId);
+ }
+
+ /**
+ * Sets all the commands for this application or guild.
+ * @param {ApplicationCommandDataResolvable[]} commands The commands
+ * @param {Snowflake} [guildId] The guild's id to create the commands in,
+ * ignored when using a {@link GuildApplicationCommandManager}
+ * @returns {Promise<Collection<Snowflake, ApplicationCommand>>}
+ * @example
+ * // Set all commands to just this one
+ * client.application.commands.set([
+ * {
+ * name: 'test',
+ * description: 'A test command',
+ * },
+ * ])
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Remove all commands
+ * guild.commands.set([])
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async set(commands, guildId) {
+ const data = await this.client.rest.put(this.commandPath({ guildId }), {
+ body: commands.map(c => this.constructor.transformCommand(c)),
+ });
+ return data.reduce((coll, command) => coll.set(command.id, this._add(command, true, guildId)), new Collection());
+ }
+
+ /**
+ * Edits an application command.
+ * @param {ApplicationCommandResolvable} command The command to edit
+ * @param {Partial<ApplicationCommandDataResolvable>} data The data to update the command with
+ * @param {Snowflake} [guildId] The guild's id where the command registered,
+ * ignored when using a {@link GuildApplicationCommandManager}
+ * @returns {Promise<ApplicationCommand>}
+ * @example
+ * // Edit an existing command
+ * client.application.commands.edit('123456789012345678', {
+ * description: 'New description',
+ * })
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async edit(command, data, guildId) {
+ const id = this.resolveId(command);
+ if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'command', 'ApplicationCommandResolvable');
+
+ const patched = await this.client.rest.patch(this.commandPath({ id, guildId }), {
+ body: this.constructor.transformCommand(data),
+ });
+ return this._add(patched, true, guildId);
+ }
+
+ /**
+ * Deletes an application command.
+ * @param {ApplicationCommandResolvable} command The command to delete
+ * @param {Snowflake} [guildId] The guild's id where the command is registered,
+ * ignored when using a {@link GuildApplicationCommandManager}
+ * @returns {Promise<?ApplicationCommand>}
+ * @example
+ * // Delete a command
+ * guild.commands.delete('123456789012345678')
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async delete(command, guildId) {
+ const id = this.resolveId(command);
+ if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'command', 'ApplicationCommandResolvable');
+
+ await this.client.rest.delete(this.commandPath({ id, guildId }));
+
+ const cached = this.cache.get(id);
+ this.cache.delete(id);
+ return cached ?? null;
+ }
+
+ /**
+ * Transforms an {@link ApplicationCommandData} object into something that can be used with the API.
+ * @param {ApplicationCommandDataResolvable} command The command to transform
+ * @returns {APIApplicationCommand}
+ * @private
+ */
+ static transformCommand(command) {
+ if (isJSONEncodable(command)) return command.toJSON();
+
+ let default_member_permissions;
+
+ if ('default_member_permissions' in command) {
+ default_member_permissions = command.default_member_permissions
+ ? new PermissionsBitField(BigInt(command.default_member_permissions)).bitfield.toString()
+ : command.default_member_permissions;
+ }
+
+ if ('defaultMemberPermissions' in command) {
+ default_member_permissions =
+ command.defaultMemberPermissions !== null
+ ? new PermissionsBitField(command.defaultMemberPermissions).bitfield.toString()
+ : command.defaultMemberPermissions;
+ }
+
+ return {
+ name: command.name,
+ name_localizations: command.nameLocalizations ?? command.name_localizations,
+ description: command.description,
+ nsfw: command.nsfw,
+ description_localizations: command.descriptionLocalizations ?? command.description_localizations,
+ type: command.type,
+ options: command.options?.map(o => ApplicationCommand.transformOption(o)),
+ default_member_permissions,
+ dm_permission: command.dmPermission ?? command.dm_permission,
+ };
+ }
+}
+
+module.exports = ApplicationCommandManager;
diff --git a/node_modules/discord.js/src/managers/ApplicationCommandPermissionsManager.js b/node_modules/discord.js/src/managers/ApplicationCommandPermissionsManager.js
new file mode 100644
index 0000000..2f7279a
--- /dev/null
+++ b/node_modules/discord.js/src/managers/ApplicationCommandPermissionsManager.js
@@ -0,0 +1,434 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { ApplicationCommandPermissionType, RESTJSONErrorCodes, Routes } = require('discord-api-types/v10');
+const BaseManager = require('./BaseManager');
+const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors');
+
+/**
+ * Manages API methods for permissions of Application Commands.
+ * @extends {BaseManager}
+ */
+class ApplicationCommandPermissionsManager extends BaseManager {
+ constructor(manager) {
+ super(manager.client);
+
+ /**
+ * The manager or command that this manager belongs to
+ * @type {ApplicationCommandManager|ApplicationCommand}
+ * @private
+ */
+ this.manager = manager;
+
+ /**
+ * The guild that this manager acts on
+ * @type {?Guild}
+ */
+ this.guild = manager.guild ?? null;
+
+ /**
+ * The id of the guild that this manager acts on
+ * @type {?Snowflake}
+ */
+ this.guildId = manager.guildId ?? manager.guild?.id ?? null;
+
+ /**
+ * The id of the command this manager acts on
+ * @type {?Snowflake}
+ */
+ this.commandId = manager.id ?? null;
+ }
+
+ /**
+ * The APIRouter path to the commands
+ * @param {Snowflake} guildId The guild's id to use in the path,
+ * @param {Snowflake} [commandId] The application command's id
+ * @returns {string}
+ * @private
+ */
+ permissionsPath(guildId, commandId) {
+ if (commandId) {
+ return Routes.applicationCommandPermissions(this.client.application.id, guildId, commandId);
+ }
+
+ return Routes.guildApplicationCommandsPermissions(this.client.application.id, guildId);
+ }
+
+ /* eslint-disable max-len */
+ /**
+ * The object returned when fetching permissions for an application command.
+ * @typedef {Object} ApplicationCommandPermissions
+ * @property {Snowflake} id The role, user, or channel's id. Can also be a
+ * {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants permission constant}.
+ * @property {ApplicationCommandPermissionType} type Whether this permission is for a role or a user
+ * @property {boolean} permission Whether the role or user has the permission to use this command
+ */
+ /* eslint-enable max-len */
+
+ /**
+ * Options for managing permissions for one or more Application Commands
+ * <warn>When passing these options to a manager where `guildId` is `null`,
+ * `guild` is a required parameter</warn>
+ * @typedef {Object} BaseApplicationCommandPermissionsOptions
+ * @property {GuildResolvable} [guild] The guild to modify / check permissions for
+ * <warn>Ignored when the manager has a non-null `guildId` property</warn>
+ * @property {ApplicationCommandResolvable} [command] The command to modify / check permissions for
+ * <warn>Ignored when the manager has a non-null `commandId` property</warn>
+ */
+
+ /**
+ * Fetches the permissions for one or multiple commands. Providing the client's id as the "command id" will fetch
+ * *only* the guild level permissions
+ * @param {BaseApplicationCommandPermissionsOptions} [options] Options used to fetch permissions
+ * @returns {Promise<ApplicationCommandPermissions[]|Collection<Snowflake, ApplicationCommandPermissions[]>>}
+ * @example
+ * // Fetch permissions for one command
+ * guild.commands.permissions.fetch({ command: '123456789012345678' })
+ * .then(perms => console.log(`Fetched ${perms.length} overwrites`))
+ * .catch(console.error);
+ * @example
+ * // Fetch permissions for all commands in a guild
+ * client.application.commands.permissions.fetch({ guild: '123456789012345678' })
+ * .then(perms => console.log(`Fetched permissions for ${perms.size} commands`))
+ * .catch(console.error);
+ * @example
+ * // Fetch guild level permissions
+ * guild.commands.permissions.fetch({ command: client.user.id })
+ * .then(perms => console.log(`Fetched ${perms.length} guild level permissions`))
+ * .catch(console.error);
+ */
+ async fetch({ guild, command } = {}) {
+ const { guildId, commandId } = this._validateOptions(guild, command);
+ if (commandId) {
+ const data = await this.client.rest.get(this.permissionsPath(guildId, commandId));
+ return data.permissions;
+ }
+
+ const data = await this.client.rest.get(this.permissionsPath(guildId));
+ return data.reduce((coll, perm) => coll.set(perm.id, perm.permissions), new Collection());
+ }
+
+ /**
+ * Options used to set permissions for one or more Application Commands in a guild
+ * <warn>Omitting the `command` parameter edits the guild wide permissions
+ * when the manager's `commandId` is `null`</warn>
+ * @typedef {BaseApplicationCommandPermissionsOptions} ApplicationCommandPermissionsEditOptions
+ * @property {ApplicationCommandPermissions[]} permissions The new permissions for the guild or overwrite
+ * @property {string} token The bearer token to use that authorizes the permission edit
+ */
+
+ /**
+ * Sets the permissions for the guild or a command overwrite.
+ * @param {ApplicationCommandPermissionsEditOptions} options Options used to set permissions
+ * @returns {Promise<ApplicationCommandPermissions[]|Collection<Snowflake, ApplicationCommandPermissions[]>>}
+ * @example
+ * // Set a permission overwrite for a command
+ * client.application.commands.permissions.set({
+ * guild: '892455839386304532',
+ * command: '123456789012345678',
+ * token: 'TotallyRealToken',
+ * permissions: [
+ * {
+ * id: '876543210987654321',
+ * type: ApplicationCommandPermissionType.User,
+ * permission: false,
+ * },
+ * ]})
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Set the permissions used for the guild (commands without overwrites)
+ * guild.commands.permissions.set({ token: 'TotallyRealToken', permissions: [
+ * {
+ * id: '123456789012345678',
+ * permissions: [{
+ * id: '876543210987654321',
+ * type: ApplicationCommandPermissionType.User,
+ * permission: false,
+ * }],
+ * },
+ * ]})
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async set({ guild, command, permissions, token } = {}) {
+ if (!token) {
+ throw new DiscordjsError(ErrorCodes.ApplicationCommandPermissionsTokenMissing);
+ }
+ let { guildId, commandId } = this._validateOptions(guild, command);
+
+ if (!Array.isArray(permissions)) {
+ throw new DiscordjsTypeError(
+ ErrorCodes.InvalidType,
+ 'permissions',
+ 'Array of ApplicationCommandPermissions',
+ true,
+ );
+ }
+
+ if (!commandId) {
+ commandId = this.client.user.id;
+ }
+ const data = await this.client.rest.put(this.permissionsPath(guildId, commandId), {
+ body: { permissions },
+ auth: false,
+ headers: { Authorization: `Bearer ${token}` },
+ });
+ return data.permissions;
+ }
+
+ /**
+ * Add permissions to a command.
+ * @param {ApplicationCommandPermissionsEditOptions} options Options used to add permissions
+ * @returns {Promise<ApplicationCommandPermissions[]>}
+ * @example
+ * // Add a rule to block a role from using a command
+ * guild.commands.permissions.add({ command: '123456789012345678', token: 'TotallyRealToken', permissions: [
+ * {
+ * id: '876543211234567890',
+ * type: ApplicationCommandPermissionType.Role,
+ * permission: false
+ * },
+ * ]})
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async add({ guild, command, permissions, token } = {}) {
+ if (!token) {
+ throw new DiscordjsError(ErrorCodes.ApplicationCommandPermissionsTokenMissing);
+ }
+ let { guildId, commandId } = this._validateOptions(guild, command);
+ if (!commandId) {
+ commandId = this.client.user.id;
+ }
+ if (!Array.isArray(permissions)) {
+ throw new DiscordjsTypeError(
+ ErrorCodes.InvalidType,
+ 'permissions',
+ 'Array of ApplicationCommandPermissions',
+ true,
+ );
+ }
+
+ let existing = [];
+ try {
+ existing = await this.fetch({ guild: guildId, command: commandId });
+ } catch (error) {
+ if (error.code !== RESTJSONErrorCodes.UnknownApplicationCommandPermissions) throw error;
+ }
+
+ const newPermissions = permissions.slice();
+ for (const perm of existing) {
+ if (!newPermissions.some(x => x.id === perm.id)) {
+ newPermissions.push(perm);
+ }
+ }
+
+ return this.set({ guild: guildId, command: commandId, permissions: newPermissions, token });
+ }
+
+ /**
+ * A static snowflake that identifies the everyone role for application command permissions.
+ * It is the same as the guild id
+ * @typedef {Snowflake} RolePermissionConstant
+ */
+
+ /**
+ * A static snowflake that identifies the "all channels" entity for application command permissions.
+ * It will be the result of the calculation `guildId - 1`
+ * @typedef {Snowflake} ChannelPermissionConstant
+ */
+
+ /**
+ * Options used to remove permissions from a command
+ * <warn>Omitting the `command` parameter removes from the guild wide permissions
+ * when the managers `commandId` is `null`</warn>
+ * <warn>At least one of `users`, `roles`, and `channels` is required</warn>
+ * @typedef {BaseApplicationCommandPermissionsOptions} RemoveApplicationCommandPermissionsOptions
+ * @property {string} token The bearer token to use that authorizes the permission removal
+ * @property {UserResolvable[]} [users] The user(s) to remove
+ * @property {Array<RoleResolvable|RolePermissionConstant>} [roles] The role(s) to remove
+ * @property {Array<GuildChannelResolvable|ChannelPermissionConstant>} [channels] The channel(s) to remove
+ */
+
+ /**
+ * Remove permissions from a command.
+ * @param {RemoveApplicationCommandPermissionsOptions} options Options used to remove permissions
+ * @returns {Promise<ApplicationCommandPermissions[]>}
+ * @example
+ * // Remove a user permission from this command
+ * guild.commands.permissions.remove({
+ * command: '123456789012345678', users: '876543210123456789', token: 'TotallyRealToken',
+ * })
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Remove multiple roles from this command
+ * guild.commands.permissions.remove({
+ * command: '123456789012345678', roles: ['876543210123456789', '765432101234567890'], token: 'TotallyRealToken',
+ * })
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async remove({ guild, command, users, roles, channels, token } = {}) {
+ if (!token) {
+ throw new DiscordjsError(ErrorCodes.ApplicationCommandPermissionsTokenMissing);
+ }
+ let { guildId, commandId } = this._validateOptions(guild, command);
+ if (!commandId) {
+ commandId = this.client.user.id;
+ }
+
+ if (!users && !roles && !channels) {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'users OR roles OR channels', 'Array or Resolvable', true);
+ }
+
+ let resolvedUserIds = [];
+ if (Array.isArray(users)) {
+ for (const user of users) {
+ const userId = this.client.users.resolveId(user);
+ if (!userId) throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array', 'users', user);
+ resolvedUserIds.push(userId);
+ }
+ }
+
+ let resolvedRoleIds = [];
+ if (Array.isArray(roles)) {
+ for (const role of roles) {
+ if (typeof role === 'string') {
+ resolvedRoleIds.push(role);
+ continue;
+ }
+ if (!this.guild) throw new DiscordjsError(ErrorCodes.GuildUncachedEntityResolve, 'roles');
+ const roleId = this.guild.roles.resolveId(role);
+ if (!roleId) throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array', 'users', role);
+ resolvedRoleIds.push(roleId);
+ }
+ }
+
+ let resolvedChannelIds = [];
+ if (Array.isArray(channels)) {
+ for (const channel of channels) {
+ if (typeof channel === 'string') {
+ resolvedChannelIds.push(channel);
+ continue;
+ }
+ if (!this.guild) throw new DiscordjsError(ErrorCodes.GuildUncachedEntityResolve, 'channels');
+ const channelId = this.guild.channels.resolveId(channel);
+ if (!channelId) throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array', 'channels', channel);
+ resolvedChannelIds.push(channelId);
+ }
+ }
+
+ let existing = [];
+ try {
+ existing = await this.fetch({ guild: guildId, command: commandId });
+ } catch (error) {
+ if (error.code !== RESTJSONErrorCodes.UnknownApplicationCommandPermissions) throw error;
+ }
+
+ const permissions = existing.filter(perm => {
+ switch (perm.type) {
+ case ApplicationCommandPermissionType.Role:
+ return !resolvedRoleIds.includes(perm.id);
+ case ApplicationCommandPermissionType.User:
+ return !resolvedUserIds.includes(perm.id);
+ case ApplicationCommandPermissionType.Channel:
+ return !resolvedChannelIds.includes(perm.id);
+ }
+ return true;
+ });
+
+ return this.set({ guild: guildId, command: commandId, permissions, token });
+ }
+
+ /**
+ * Options used to check the existence of permissions on a command
+ * <warn>The `command` parameter is not optional when the managers `commandId` is `null`</warn>
+ * @typedef {BaseApplicationCommandPermissionsOptions} HasApplicationCommandPermissionsOptions
+ * @property {ApplicationCommandPermissionIdResolvable} permissionId The entity to check if a permission exists for
+ * on this command.
+ * @property {ApplicationCommandPermissionType} [permissionType] Check for a specific type of permission
+ */
+
+ /**
+ * Check whether a permission exists for a user, role, or channel
+ * @param {HasApplicationCommandPermissionsOptions} options Options used to check permissions
+ * @returns {Promise<boolean>}
+ * @example
+ * // Check whether a user has permission to use a command
+ * guild.commands.permissions.has({ command: '123456789012345678', permissionId: '876543210123456789' })
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async has({ guild, command, permissionId, permissionType }) {
+ const { guildId, commandId } = this._validateOptions(guild, command);
+ if (!commandId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'command', 'ApplicationCommandResolvable');
+
+ if (!permissionId) {
+ throw new DiscordjsTypeError(
+ ErrorCodes.InvalidType,
+ 'permissionId',
+ 'UserResolvable, RoleResolvable, ChannelResolvable, or Permission Constant',
+ );
+ }
+ let resolvedId = permissionId;
+ if (typeof permissionId !== 'string') {
+ resolvedId = this.client.users.resolveId(permissionId);
+ if (!resolvedId) {
+ if (!this.guild) throw new DiscordjsError(ErrorCodes.GuildUncachedEntityResolve, 'roles');
+ resolvedId = this.guild.roles.resolveId(permissionId);
+ }
+ if (!resolvedId) {
+ resolvedId = this.guild.channels.resolveId(permissionId);
+ }
+ if (!resolvedId) {
+ throw new DiscordjsTypeError(
+ ErrorCodes.InvalidType,
+ 'permissionId',
+ 'UserResolvable, RoleResolvable, ChannelResolvable, or Permission Constant',
+ );
+ }
+ }
+
+ let existing = [];
+ try {
+ existing = await this.fetch({ guild: guildId, command: commandId });
+ } catch (error) {
+ if (error.code !== RESTJSONErrorCodes.UnknownApplicationCommandPermissions) throw error;
+ }
+
+ // Check permission type if provided for the single edge case where a channel id is the same as the everyone role id
+ return existing.some(perm => perm.id === resolvedId && (permissionType ?? perm.type) === perm.type);
+ }
+
+ _validateOptions(guild, command) {
+ const guildId = this.guildId ?? this.client.guilds.resolveId(guild);
+ if (!guildId) throw new DiscordjsError(ErrorCodes.GlobalCommandPermissions);
+ let commandId = this.commandId;
+ if (command && !commandId) {
+ commandId = this.manager.resolveId?.(command);
+ if (!commandId && this.guild) {
+ commandId = this.guild.commands.resolveId(command);
+ }
+ commandId ??= this.client.application?.commands.resolveId(command);
+ if (!commandId) {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'command', 'ApplicationCommandResolvable', true);
+ }
+ }
+ return { guildId, commandId };
+ }
+}
+
+module.exports = ApplicationCommandPermissionsManager;
+
+/* eslint-disable max-len */
+/**
+ * @external APIApplicationCommandPermissions
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure}
+ */
+
+/**
+ * Data that resolves to an id used for an application command permission
+ * @typedef {UserResolvable|RoleResolvable|GuildChannelResolvable|RolePermissionConstant|ChannelPermissionConstant} ApplicationCommandPermissionIdResolvable
+ */
diff --git a/node_modules/discord.js/src/managers/AutoModerationRuleManager.js b/node_modules/discord.js/src/managers/AutoModerationRuleManager.js
new file mode 100644
index 0000000..dd0ee4e
--- /dev/null
+++ b/node_modules/discord.js/src/managers/AutoModerationRuleManager.js
@@ -0,0 +1,288 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { Routes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const AutoModerationRule = require('../structures/AutoModerationRule');
+
+/**
+ * Manages API methods for auto moderation rules and stores their cache.
+ * @extends {CachedManager}
+ */
+class AutoModerationRuleManager extends CachedManager {
+ constructor(guild, iterable) {
+ super(guild.client, AutoModerationRule, iterable);
+
+ /**
+ * The guild this manager belongs to.
+ * @type {Guild}
+ */
+ this.guild = guild;
+ }
+
+ /**
+ * The cache of this manager
+ * @type {Collection<Snowflake, AutoModerationRule>}
+ * @name AutoModerationRuleManager#cache
+ */
+
+ /**
+ * Resolves an {@link AutoModerationRuleResolvable} to an {@link AutoModerationRule} object.
+ * @method resolve
+ * @memberof AutoModerationRuleManager
+ * @instance
+ * @param {AutoModerationRuleResolvable} autoModerationRule The AutoModerationRule resolvable to resolve
+ * @returns {?AutoModerationRule}
+ */
+
+ /**
+ * Resolves an {@link AutoModerationRuleResolvable} to a {@link AutoModerationRule} id.
+ * @method resolveId
+ * @memberof AutoModerationRuleManager
+ * @instance
+ * @param {AutoModerationRuleResolvable} autoModerationRule The AutoModerationRule resolvable to resolve
+ * @returns {?Snowflake}
+ */
+
+ _add(data, cache) {
+ return super._add(data, cache, { extras: [this.guild] });
+ }
+
+ /**
+ * Options used to set the trigger metadata of an auto moderation rule.
+ * @typedef {Object} AutoModerationTriggerMetadataOptions
+ * @property {string[]} [keywordFilter] The substrings that will be searched for in the content
+ * @property {string[]} [regexPatterns] The regular expression patterns which will be matched against the content
+ * <info>Only Rust-flavored regular expressions are supported.</info>
+ * @property {AutoModerationRuleKeywordPresetType[]} [presets]
+ * The internally pre-defined wordsets which will be searched for in the content
+ * @property {string[]} [allowList] The substrings that will be exempt from triggering
+ * {@link AutoModerationRuleTriggerType.Keyword} and {@link AutoModerationRuleTriggerType.KeywordPreset}
+ * @property {?number} [mentionTotalLimit] The total number of role & user mentions allowed per message
+ * @property {boolean} [mentionRaidProtectionEnabled] Whether to automatically detect mention raids
+ */
+
+ /**
+ * Options used to set the actions of an auto moderation rule.
+ * @typedef {Object} AutoModerationActionOptions
+ * @property {AutoModerationActionType} type The type of this auto moderation rule action
+ * @property {AutoModerationActionMetadataOptions} [metadata] Additional metadata needed during execution
+ * <info>This property is required if using a `type` of
+ * {@link AutoModerationActionType.SendAlertMessage} or {@link AutoModerationActionType.Timeout}.</info>
+ */
+
+ /**
+ * Options used to set the metadata of an auto moderation rule action.
+ * @typedef {Object} AutoModerationActionMetadataOptions
+ * @property {GuildTextChannelResolvable|ThreadChannel} [channel] The channel to which content will be logged
+ * @property {number} [durationSeconds] The timeout duration in seconds
+ * @property {string} [customMessage] The custom message that is shown whenever a message is blocked
+ */
+
+ /**
+ * Options used to create an auto moderation rule.
+ * @typedef {Object} AutoModerationRuleCreateOptions
+ * @property {string} name The name of the auto moderation rule
+ * @property {AutoModerationRuleEventType} eventType The event type of the auto moderation rule
+ * @property {AutoModerationRuleTriggerType} triggerType The trigger type of the auto moderation rule
+ * @property {AutoModerationTriggerMetadataOptions} [triggerMetadata] The trigger metadata of the auto moderation rule
+ * <info>This property is required if using a `triggerType` of
+ * {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.KeywordPreset},
+ * or {@link AutoModerationRuleTriggerType.MentionSpam}.</info>
+ * @property {AutoModerationActionOptions[]} actions
+ * The actions that will execute when the auto moderation rule is triggered
+ * @property {boolean} [enabled] Whether the auto moderation rule should be enabled
+ * @property {Collection<Snowflake, Role>|RoleResolvable[]} [exemptRoles]
+ * The roles that should not be affected by the auto moderation rule
+ * @property {Collection<Snowflake, GuildChannel|ThreadChannel>|GuildChannelResolvable[]} [exemptChannels]
+ * The channels that should not be affected by the auto moderation rule
+ * @property {string} [reason] The reason for creating the auto moderation rule
+ */
+
+ /**
+ * Creates a new auto moderation rule.
+ * @param {AutoModerationRuleCreateOptions} options Options for creating the auto moderation rule
+ * @returns {Promise<AutoModerationRule>}
+ */
+ async create({
+ name,
+ eventType,
+ triggerType,
+ triggerMetadata,
+ actions,
+ enabled,
+ exemptRoles,
+ exemptChannels,
+ reason,
+ }) {
+ const data = await this.client.rest.post(Routes.guildAutoModerationRules(this.guild.id), {
+ body: {
+ name,
+ event_type: eventType,
+ trigger_type: triggerType,
+ trigger_metadata: triggerMetadata && {
+ keyword_filter: triggerMetadata.keywordFilter,
+ regex_patterns: triggerMetadata.regexPatterns,
+ presets: triggerMetadata.presets,
+ allow_list: triggerMetadata.allowList,
+ mention_total_limit: triggerMetadata.mentionTotalLimit,
+ mention_raid_protection_enabled: triggerMetadata.mentionRaidProtectionEnabled,
+ },
+ actions: actions.map(action => ({
+ type: action.type,
+ metadata: {
+ duration_seconds: action.metadata?.durationSeconds,
+ channel_id: action.metadata?.channel && this.guild.channels.resolveId(action.metadata.channel),
+ custom_message: action.metadata?.customMessage,
+ },
+ })),
+ enabled,
+ exempt_roles: exemptRoles?.map(exemptRole => this.guild.roles.resolveId(exemptRole)),
+ exempt_channels: exemptChannels?.map(exemptChannel => this.guild.channels.resolveId(exemptChannel)),
+ },
+ reason,
+ });
+
+ return this._add(data);
+ }
+
+ /**
+ * Options used to edit an auto moderation rule.
+ * @typedef {Object} AutoModerationRuleEditOptions
+ * @property {string} [name] The name of the auto moderation rule
+ * @property {AutoModerationRuleEventType} [eventType] The event type of the auto moderation rule
+ * @property {AutoModerationTriggerMetadataOptions} [triggerMetadata] The trigger metadata of the auto moderation rule
+ * @property {AutoModerationActionOptions[]} [actions]
+ * The actions that will execute when the auto moderation rule is triggered
+ * @property {boolean} [enabled] Whether the auto moderation rule should be enabled
+ * @property {Collection<Snowflake, Role>|RoleResolvable[]} [exemptRoles]
+ * The roles that should not be affected by the auto moderation rule
+ * @property {Collection<Snowflake, GuildChannel|ThreadChannel>|GuildChannelResolvable[]} [exemptChannels]
+ * The channels that should not be affected by the auto moderation rule
+ * @property {string} [reason] The reason for creating the auto moderation rule
+ */
+
+ /**
+ * Edits an auto moderation rule.
+ * @param {AutoModerationRuleResolvable} autoModerationRule The auto moderation rule to edit
+ * @param {AutoModerationRuleEditOptions} options Options for editing the auto moderation rule
+ * @returns {Promise<AutoModerationRule>}
+ */
+ async edit(
+ autoModerationRule,
+ { name, eventType, triggerMetadata, actions, enabled, exemptRoles, exemptChannels, reason },
+ ) {
+ const autoModerationRuleId = this.resolveId(autoModerationRule);
+
+ const data = await this.client.rest.patch(Routes.guildAutoModerationRule(this.guild.id, autoModerationRuleId), {
+ body: {
+ name,
+ event_type: eventType,
+ trigger_metadata: triggerMetadata && {
+ keyword_filter: triggerMetadata.keywordFilter,
+ regex_patterns: triggerMetadata.regexPatterns,
+ presets: triggerMetadata.presets,
+ allow_list: triggerMetadata.allowList,
+ mention_total_limit: triggerMetadata.mentionTotalLimit,
+ mention_raid_protection_enabled: triggerMetadata.mentionRaidProtectionEnabled,
+ },
+ actions: actions?.map(action => ({
+ type: action.type,
+ metadata: {
+ duration_seconds: action.metadata?.durationSeconds,
+ channel_id: action.metadata?.channel && this.guild.channels.resolveId(action.metadata.channel),
+ custom_message: action.metadata?.customMessage,
+ },
+ })),
+ enabled,
+ exempt_roles: exemptRoles?.map(exemptRole => this.guild.roles.resolveId(exemptRole)),
+ exempt_channels: exemptChannels?.map(exemptChannel => this.guild.channels.resolveId(exemptChannel)),
+ },
+ reason,
+ });
+
+ return this._add(data);
+ }
+
+ /**
+ * Data that can be resolved to give an AutoModerationRule object. This can be:
+ * * An AutoModerationRule
+ * * A Snowflake
+ * @typedef {AutoModerationRule|Snowflake} AutoModerationRuleResolvable
+ */
+
+ /**
+ * Options used to fetch a single auto moderation rule from a guild.
+ * @typedef {BaseFetchOptions} FetchAutoModerationRuleOptions
+ * @property {AutoModerationRuleResolvable} autoModerationRule The auto moderation rule to fetch
+ */
+
+ /**
+ * Options used to fetch all auto moderation rules from a guild.
+ * @typedef {Object} FetchAutoModerationRulesOptions
+ * @property {boolean} [cache] Whether to cache the fetched auto moderation rules
+ */
+
+ /**
+ * Fetches auto moderation rules from Discord.
+ * @param {AutoModerationRuleResolvable|FetchAutoModerationRuleOptions|FetchAutoModerationRulesOptions} [options]
+ * Options for fetching auto moderation rule(s)
+ * @returns {Promise<AutoModerationRule|Collection<Snowflake, AutoModerationRule>>}
+ * @example
+ * // Fetch all auto moderation rules from a guild without caching
+ * guild.autoModerationRules.fetch({ cache: false })
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Fetch a single auto moderation rule
+ * guild.autoModerationRules.fetch('979083472868098119')
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Fetch a single auto moderation rule without checking cache and without caching
+ * guild.autoModerationRules.fetch({ autoModerationRule: '979083472868098119', cache: false, force: true })
+ * .then(console.log)
+ * .catch(console.error)
+ */
+ fetch(options) {
+ if (!options) return this._fetchMany();
+ const { autoModerationRule, cache, force } = options;
+ const resolvedAutoModerationRule = this.resolveId(autoModerationRule ?? options);
+ if (resolvedAutoModerationRule) {
+ return this._fetchSingle({ autoModerationRule: resolvedAutoModerationRule, cache, force });
+ }
+ return this._fetchMany(options);
+ }
+
+ async _fetchSingle({ autoModerationRule, cache, force = false }) {
+ if (!force) {
+ const existing = this.cache.get(autoModerationRule);
+ if (existing) return existing;
+ }
+
+ const data = await this.client.rest.get(Routes.guildAutoModerationRule(this.guild.id, autoModerationRule));
+ return this._add(data, cache);
+ }
+
+ async _fetchMany(options = {}) {
+ const data = await this.client.rest.get(Routes.guildAutoModerationRules(this.guild.id));
+
+ return data.reduce(
+ (col, autoModerationRule) => col.set(autoModerationRule.id, this._add(autoModerationRule, options.cache)),
+ new Collection(),
+ );
+ }
+
+ /**
+ * Deletes an auto moderation rule.
+ * @param {AutoModerationRuleResolvable} autoModerationRule The auto moderation rule to delete
+ * @param {string} [reason] The reason for deleting the auto moderation rule
+ * @returns {Promise<void>}
+ */
+ async delete(autoModerationRule, reason) {
+ const autoModerationRuleId = this.resolveId(autoModerationRule);
+ await this.client.rest.delete(Routes.guildAutoModerationRule(this.guild.id, autoModerationRuleId), { reason });
+ }
+}
+
+module.exports = AutoModerationRuleManager;
diff --git a/node_modules/discord.js/src/managers/BaseGuildEmojiManager.js b/node_modules/discord.js/src/managers/BaseGuildEmojiManager.js
new file mode 100644
index 0000000..89eee4c
--- /dev/null
+++ b/node_modules/discord.js/src/managers/BaseGuildEmojiManager.js
@@ -0,0 +1,80 @@
+'use strict';
+
+const CachedManager = require('./CachedManager');
+const GuildEmoji = require('../structures/GuildEmoji');
+const ReactionEmoji = require('../structures/ReactionEmoji');
+const { parseEmoji } = require('../util/Util');
+
+/**
+ * Holds methods to resolve GuildEmojis and stores their cache.
+ * @extends {CachedManager}
+ */
+class BaseGuildEmojiManager extends CachedManager {
+ constructor(client, iterable) {
+ super(client, GuildEmoji, iterable);
+ }
+
+ /**
+ * The cache of GuildEmojis
+ * @type {Collection<Snowflake, GuildEmoji>}
+ * @name BaseGuildEmojiManager#cache
+ */
+
+ /**
+ * Data that can be resolved into a GuildEmoji object. This can be:
+ * * A Snowflake
+ * * A GuildEmoji object
+ * * A ReactionEmoji object
+ * @typedef {Snowflake|GuildEmoji|ReactionEmoji} EmojiResolvable
+ */
+
+ /**
+ * Resolves an EmojiResolvable to an Emoji object.
+ * @param {EmojiResolvable} emoji The Emoji resolvable to identify
+ * @returns {?GuildEmoji}
+ */
+ resolve(emoji) {
+ if (emoji instanceof ReactionEmoji) return super.resolve(emoji.id);
+ return super.resolve(emoji);
+ }
+
+ /**
+ * Resolves an EmojiResolvable to an Emoji id string.
+ * @param {EmojiResolvable} emoji The Emoji resolvable to identify
+ * @returns {?Snowflake}
+ */
+ resolveId(emoji) {
+ if (emoji instanceof ReactionEmoji) return emoji.id;
+ return super.resolveId(emoji);
+ }
+
+ /**
+ * Data that can be resolved to give an emoji identifier. This can be:
+ * * An EmojiResolvable
+ * * The `<a:name:id>`, `<:name:id>`, `a:name:id` or `name:id` emoji identifier string of an emoji
+ * * The Unicode representation of an emoji
+ * @typedef {string|EmojiResolvable} EmojiIdentifierResolvable
+ */
+
+ /**
+ * Resolves an EmojiResolvable to an emoji identifier.
+ * @param {EmojiIdentifierResolvable} emoji The emoji resolvable to resolve
+ * @returns {?string}
+ */
+ resolveIdentifier(emoji) {
+ const emojiResolvable = this.resolve(emoji);
+ if (emojiResolvable) return emojiResolvable.identifier;
+ if (emoji instanceof ReactionEmoji) return emoji.identifier;
+ if (typeof emoji === 'string') {
+ const res = parseEmoji(emoji);
+ if (res?.name.length) {
+ emoji = `${res.animated ? 'a:' : ''}${res.name}${res.id ? `:${res.id}` : ''}`;
+ }
+ if (!emoji.includes('%')) return encodeURIComponent(emoji);
+ return emoji;
+ }
+ return null;
+ }
+}
+
+module.exports = BaseGuildEmojiManager;
diff --git a/node_modules/discord.js/src/managers/BaseManager.js b/node_modules/discord.js/src/managers/BaseManager.js
new file mode 100644
index 0000000..0651401
--- /dev/null
+++ b/node_modules/discord.js/src/managers/BaseManager.js
@@ -0,0 +1,19 @@
+'use strict';
+
+/**
+ * Manages the API methods of a data model.
+ * @abstract
+ */
+class BaseManager {
+ constructor(client) {
+ /**
+ * The client that instantiated this Manager
+ * @name BaseManager#client
+ * @type {Client}
+ * @readonly
+ */
+ Object.defineProperty(this, 'client', { value: client });
+ }
+}
+
+module.exports = BaseManager;
diff --git a/node_modules/discord.js/src/managers/CachedManager.js b/node_modules/discord.js/src/managers/CachedManager.js
new file mode 100644
index 0000000..b4c50b1
--- /dev/null
+++ b/node_modules/discord.js/src/managers/CachedManager.js
@@ -0,0 +1,64 @@
+'use strict';
+
+const DataManager = require('./DataManager');
+const { MakeCacheOverrideSymbol } = require('../util/Symbols');
+
+/**
+ * Manages the API methods of a data model with a mutable cache of instances.
+ * @extends {DataManager}
+ * @abstract
+ */
+class CachedManager extends DataManager {
+ constructor(client, holds, iterable) {
+ super(client, holds);
+
+ /**
+ * The private cache of items for this manager.
+ * @type {Collection}
+ * @private
+ * @readonly
+ * @name CachedManager#_cache
+ */
+ Object.defineProperty(this, '_cache', {
+ value: this.client.options.makeCache(
+ this.constructor[MakeCacheOverrideSymbol] ?? this.constructor,
+ this.holds,
+ this.constructor,
+ ),
+ });
+
+ if (iterable) {
+ for (const item of iterable) {
+ this._add(item);
+ }
+ }
+ }
+
+ /**
+ * The cache of items for this manager.
+ * @type {Collection}
+ * @abstract
+ */
+ get cache() {
+ return this._cache;
+ }
+
+ _add(data, cache = true, { id, extras = [] } = {}) {
+ const existing = this.cache.get(id ?? data.id);
+ if (existing) {
+ if (cache) {
+ existing._patch(data);
+ return existing;
+ }
+ const clone = existing._clone();
+ clone._patch(data);
+ return clone;
+ }
+
+ const entry = this.holds ? new this.holds(this.client, data, ...extras) : data;
+ if (cache) this.cache.set(id ?? entry.id, entry);
+ return entry;
+ }
+}
+
+module.exports = CachedManager;
diff --git a/node_modules/discord.js/src/managers/CategoryChannelChildManager.js b/node_modules/discord.js/src/managers/CategoryChannelChildManager.js
new file mode 100644
index 0000000..347526a
--- /dev/null
+++ b/node_modules/discord.js/src/managers/CategoryChannelChildManager.js
@@ -0,0 +1,77 @@
+'use strict';
+
+const DataManager = require('./DataManager');
+const GuildChannel = require('../structures/GuildChannel');
+
+/**
+ * Manages API methods for CategoryChannels' children.
+ * @extends {DataManager}
+ */
+class CategoryChannelChildManager extends DataManager {
+ constructor(channel) {
+ super(channel.client, GuildChannel);
+ /**
+ * The category channel this manager belongs to
+ * @type {CategoryChannel}
+ */
+ this.channel = channel;
+ }
+
+ /**
+ * The channels that are a part of this category
+ * @type {Collection<Snowflake, GuildChannel>}
+ * @readonly
+ */
+ get cache() {
+ return this.guild.channels.cache.filter(c => c.parentId === this.channel.id);
+ }
+
+ /**
+ * The guild this manager belongs to
+ * @type {Guild}
+ * @readonly
+ */
+ get guild() {
+ return this.channel.guild;
+ }
+
+ /**
+ * Options for creating a channel using {@link CategoryChannel#createChannel}.
+ * @typedef {Object} CategoryCreateChannelOptions
+ * @property {string} name The name for the new channel
+ * @property {ChannelType} [type=ChannelType.GuildText] The type of the new channel.
+ * @property {string} [topic] The topic for the new channel
+ * @property {boolean} [nsfw] Whether the new channel is NSFW
+ * @property {number} [bitrate] Bitrate of the new channel in bits (only voice)
+ * @property {number} [userLimit] Maximum amount of users allowed in the new channel (only voice)
+ * @property {OverwriteResolvable[]|Collection<Snowflake, OverwriteResolvable>} [permissionOverwrites]
+ * Permission overwrites of the new channel
+ * @property {number} [position] Position of the new channel
+ * @property {number} [rateLimitPerUser] The rate limit per user (slowmode) for the new channel in seconds
+ * @property {string} [rtcRegion] The specific region of the new channel.
+ * @property {VideoQualityMode} [videoQualityMode] The camera video quality mode of the voice channel
+ * @property {GuildForumTagData[]} [availableTags] The tags that can be used in this channel (forum only).
+ * @property {DefaultReactionEmoji} [defaultReactionEmoji]
+ * The emoji to show in the add reaction button on a thread in a guild forum channel.
+ * @property {ThreadAutoArchiveDuration} [defaultAutoArchiveDuration]
+ * The default auto archive duration for all new threads in this channel
+ * @property {SortOrderType} [defaultSortOrder] The default sort order mode used to order posts (forum only).
+ * @property {ForumLayoutType} [defaultForumLayout] The default layout used to display posts (forum only).
+ * @property {string} [reason] Reason for creating the new channel
+ */
+
+ /**
+ * Creates a new channel within this category.
+ * <info>You cannot create a channel of type {@link ChannelType.GuildCategory} inside a CategoryChannel.</info>
+ * @param {CategoryCreateChannelOptions} options Options for creating the new channel
+ * @returns {Promise<GuildChannel>}
+ */
+ create(options) {
+ return this.guild.channels.create({
+ ...options,
+ parent: this.channel.id,
+ });
+ }
+}
+
+module.exports = CategoryChannelChildManager;
diff --git a/node_modules/discord.js/src/managers/ChannelManager.js b/node_modules/discord.js/src/managers/ChannelManager.js
new file mode 100644
index 0000000..0126d91
--- /dev/null
+++ b/node_modules/discord.js/src/managers/ChannelManager.js
@@ -0,0 +1,128 @@
+'use strict';
+
+const process = require('node:process');
+const { Routes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const { BaseChannel } = require('../structures/BaseChannel');
+const { createChannel } = require('../util/Channels');
+const { ThreadChannelTypes } = require('../util/Constants');
+const Events = require('../util/Events');
+
+let cacheWarningEmitted = false;
+
+/**
+ * A manager of channels belonging to a client
+ * @extends {CachedManager}
+ */
+class ChannelManager extends CachedManager {
+ constructor(client, iterable) {
+ super(client, BaseChannel, iterable);
+ const defaultCaching =
+ this._cache.constructor.name === 'Collection' ||
+ this._cache.maxSize === undefined ||
+ this._cache.maxSize === Infinity;
+ if (!cacheWarningEmitted && !defaultCaching) {
+ cacheWarningEmitted = true;
+ process.emitWarning(
+ `Overriding the cache handling for ${this.constructor.name} is unsupported and breaks functionality.`,
+ 'UnsupportedCacheOverwriteWarning',
+ );
+ }
+ }
+
+ /**
+ * The cache of Channels
+ * @type {Collection<Snowflake, BaseChannel>}
+ * @name ChannelManager#cache
+ */
+
+ _add(data, guild, { cache = true, allowUnknownGuild = false } = {}) {
+ const existing = this.cache.get(data.id);
+ if (existing) {
+ if (cache) existing._patch(data);
+ guild?.channels?._add(existing);
+ if (ThreadChannelTypes.includes(existing.type)) {
+ existing.parent?.threads?._add(existing);
+ }
+ return existing;
+ }
+
+ const channel = createChannel(this.client, data, guild, { allowUnknownGuild });
+
+ if (!channel) {
+ this.client.emit(Events.Debug, `Failed to find guild, or unknown type for channel ${data.id} ${data.type}`);
+ return null;
+ }
+
+ if (cache && !allowUnknownGuild) this.cache.set(channel.id, channel);
+
+ return channel;
+ }
+
+ _remove(id) {
+ const channel = this.cache.get(id);
+ channel?.guild?.channels.cache.delete(id);
+
+ for (const [code, invite] of channel?.guild?.invites.cache ?? []) {
+ if (invite.channelId === id) channel.guild.invites.cache.delete(code);
+ }
+
+ channel?.parent?.threads?.cache.delete(id);
+ this.cache.delete(id);
+ }
+
+ /**
+ * Data that can be resolved to give a Channel object. This can be:
+ * * A Channel object
+ * * A Snowflake
+ * @typedef {BaseChannel|Snowflake} ChannelResolvable
+ */
+
+ /**
+ * Resolves a ChannelResolvable to a Channel object.
+ * @method resolve
+ * @memberof ChannelManager
+ * @instance
+ * @param {ChannelResolvable} channel The channel resolvable to resolve
+ * @returns {?BaseChannel}
+ */
+
+ /**
+ * Resolves a ChannelResolvable to a channel id string.
+ * @method resolveId
+ * @memberof ChannelManager
+ * @instance
+ * @param {ChannelResolvable} channel The channel resolvable to resolve
+ * @returns {?Snowflake}
+ */
+
+ /**
+ * Options for fetching a channel from Discord
+ * @typedef {BaseFetchOptions} FetchChannelOptions
+ * @property {boolean} [allowUnknownGuild=false] Allows the channel to be returned even if the guild is not in cache,
+ * it will not be cached. <warn>Many of the properties and methods on the returned channel will throw errors</warn>
+ */
+
+ /**
+ * Obtains a channel from Discord, or the channel cache if it's already available.
+ * @param {Snowflake} id The channel's id
+ * @param {FetchChannelOptions} [options] Additional options for this fetch
+ * @returns {Promise<?BaseChannel>}
+ * @example
+ * // Fetch a channel by its id
+ * client.channels.fetch('222109930545610754')
+ * .then(channel => console.log(channel.name))
+ * .catch(console.error);
+ */
+ async fetch(id, { allowUnknownGuild = false, cache = true, force = false } = {}) {
+ if (!force) {
+ const existing = this.cache.get(id);
+ if (existing && !existing.partial) return existing;
+ }
+
+ const data = await this.client.rest.get(Routes.channel(id));
+ return this._add(data, null, { cache, allowUnknownGuild });
+ }
+}
+
+module.exports = ChannelManager;
diff --git a/node_modules/discord.js/src/managers/DMMessageManager.js b/node_modules/discord.js/src/managers/DMMessageManager.js
new file mode 100644
index 0000000..f0b3a33
--- /dev/null
+++ b/node_modules/discord.js/src/managers/DMMessageManager.js
@@ -0,0 +1,17 @@
+'use strict';
+
+const MessageManager = require('./MessageManager');
+
+/**
+ * Manages API methods for messages in direct message channels and holds their cache.
+ * @extends {MessageManager}
+ */
+class DMMessageManager extends MessageManager {
+ /**
+ * The channel that the messages belong to
+ * @name DMMessageManager#channel
+ * @type {DMChannel}
+ */
+}
+
+module.exports = DMMessageManager;
diff --git a/node_modules/discord.js/src/managers/DataManager.js b/node_modules/discord.js/src/managers/DataManager.js
new file mode 100644
index 0000000..383844e
--- /dev/null
+++ b/node_modules/discord.js/src/managers/DataManager.js
@@ -0,0 +1,61 @@
+'use strict';
+
+const BaseManager = require('./BaseManager');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+
+/**
+ * Manages the API methods of a data model along with a collection of instances.
+ * @extends {BaseManager}
+ * @abstract
+ */
+class DataManager extends BaseManager {
+ constructor(client, holds) {
+ super(client);
+
+ /**
+ * The data structure belonging to this manager.
+ * @name DataManager#holds
+ * @type {Function}
+ * @private
+ * @readonly
+ */
+ Object.defineProperty(this, 'holds', { value: holds });
+ }
+
+ /**
+ * The cache of items for this manager.
+ * @type {Collection}
+ * @abstract
+ */
+ get cache() {
+ throw new DiscordjsError(ErrorCodes.NotImplemented, 'get cache', this.constructor.name);
+ }
+
+ /**
+ * Resolves a data entry to a data Object.
+ * @param {string|Object} idOrInstance The id or instance of something in this Manager
+ * @returns {?Object} An instance from this Manager
+ */
+ resolve(idOrInstance) {
+ if (idOrInstance instanceof this.holds) return idOrInstance;
+ if (typeof idOrInstance === 'string') return this.cache.get(idOrInstance) ?? null;
+ return null;
+ }
+
+ /**
+ * Resolves a data entry to an instance id.
+ * @param {string|Object} idOrInstance The id or instance of something in this Manager
+ * @returns {?Snowflake}
+ */
+ resolveId(idOrInstance) {
+ if (idOrInstance instanceof this.holds) return idOrInstance.id;
+ if (typeof idOrInstance === 'string') return idOrInstance;
+ return null;
+ }
+
+ valueOf() {
+ return this.cache;
+ }
+}
+
+module.exports = DataManager;
diff --git a/node_modules/discord.js/src/managers/GuildApplicationCommandManager.js b/node_modules/discord.js/src/managers/GuildApplicationCommandManager.js
new file mode 100644
index 0000000..97fea5e
--- /dev/null
+++ b/node_modules/discord.js/src/managers/GuildApplicationCommandManager.js
@@ -0,0 +1,28 @@
+'use strict';
+
+const ApplicationCommandManager = require('./ApplicationCommandManager');
+const ApplicationCommandPermissionsManager = require('./ApplicationCommandPermissionsManager');
+
+/**
+ * An extension for guild-specific application commands.
+ * @extends {ApplicationCommandManager}
+ */
+class GuildApplicationCommandManager extends ApplicationCommandManager {
+ constructor(guild, iterable) {
+ super(guild.client, iterable);
+
+ /**
+ * The guild that this manager belongs to
+ * @type {Guild}
+ */
+ this.guild = guild;
+
+ /**
+ * The manager for permissions of arbitrary commands on this guild
+ * @type {ApplicationCommandPermissionsManager}
+ */
+ this.permissions = new ApplicationCommandPermissionsManager(this);
+ }
+}
+
+module.exports = GuildApplicationCommandManager;
diff --git a/node_modules/discord.js/src/managers/GuildBanManager.js b/node_modules/discord.js/src/managers/GuildBanManager.js
new file mode 100644
index 0000000..d3c8a00
--- /dev/null
+++ b/node_modules/discord.js/src/managers/GuildBanManager.js
@@ -0,0 +1,204 @@
+'use strict';
+
+const process = require('node:process');
+const { Collection } = require('@discordjs/collection');
+const { makeURLSearchParams } = require('@discordjs/rest');
+const { Routes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const { DiscordjsTypeError, DiscordjsError, ErrorCodes } = require('../errors');
+const GuildBan = require('../structures/GuildBan');
+const { GuildMember } = require('../structures/GuildMember');
+
+let deprecationEmittedForDeleteMessageDays = false;
+
+/**
+ * Manages API methods for guild bans and stores their cache.
+ * @extends {CachedManager}
+ */
+class GuildBanManager extends CachedManager {
+ constructor(guild, iterable) {
+ super(guild.client, GuildBan, iterable);
+
+ /**
+ * The guild this Manager belongs to
+ * @type {Guild}
+ */
+ this.guild = guild;
+ }
+
+ /**
+ * The cache of this Manager
+ * @type {Collection<Snowflake, GuildBan>}
+ * @name GuildBanManager#cache
+ */
+
+ _add(data, cache) {
+ return super._add(data, cache, { id: data.user.id, extras: [this.guild] });
+ }
+
+ /**
+ * Data that resolves to give a GuildBan object. This can be:
+ * * A GuildBan object
+ * * A User resolvable
+ * @typedef {GuildBan|UserResolvable} GuildBanResolvable
+ */
+
+ /**
+ * Resolves a GuildBanResolvable to a GuildBan object.
+ * @param {GuildBanResolvable} ban The ban that is in the guild
+ * @returns {?GuildBan}
+ */
+ resolve(ban) {
+ return super.resolve(ban) ?? super.resolve(this.client.users.resolveId(ban));
+ }
+
+ /**
+ * Options used to fetch a single ban from a guild.
+ * @typedef {BaseFetchOptions} FetchBanOptions
+ * @property {UserResolvable} user The ban to fetch
+ */
+
+ /**
+ * Options used to fetch multiple bans from a guild.
+ * @typedef {Object} FetchBansOptions
+ * @property {number} [limit] The maximum number of bans to return
+ * @property {Snowflake} [before] Consider only bans before this id
+ * @property {Snowflake} [after] Consider only bans after this id
+ * @property {boolean} [cache] Whether to cache the fetched bans
+ */
+
+ /**
+ * Fetches ban(s) from Discord.
+ * @param {UserResolvable|FetchBanOptions|FetchBansOptions} [options] Options for fetching guild ban(s)
+ * @returns {Promise<GuildBan|Collection<Snowflake, GuildBan>>}
+ * @example
+ * // Fetch multiple bans from a guild
+ * guild.bans.fetch()
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Fetch a maximum of 5 bans from a guild without caching
+ * guild.bans.fetch({ limit: 5, cache: false })
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Fetch a single ban
+ * guild.bans.fetch('351871113346809860')
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Fetch a single ban without checking cache
+ * guild.bans.fetch({ user, force: true })
+ * .then(console.log)
+ * .catch(console.error)
+ * @example
+ * // Fetch a single ban without caching
+ * guild.bans.fetch({ user, cache: false })
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ fetch(options) {
+ if (!options) return this._fetchMany();
+ const { user, cache, force, limit, before, after } = options;
+ const resolvedUser = this.client.users.resolveId(user ?? options);
+ if (resolvedUser) return this._fetchSingle({ user: resolvedUser, cache, force });
+
+ if (!before && !after && !limit && cache === undefined) {
+ return Promise.reject(new DiscordjsError(ErrorCodes.FetchBanResolveId));
+ }
+
+ return this._fetchMany(options);
+ }
+
+ async _fetchSingle({ user, cache, force = false }) {
+ if (!force) {
+ const existing = this.cache.get(user);
+ if (existing && !existing.partial) return existing;
+ }
+
+ const data = await this.client.rest.get(Routes.guildBan(this.guild.id, user));
+ return this._add(data, cache);
+ }
+
+ async _fetchMany(options = {}) {
+ const data = await this.client.rest.get(Routes.guildBans(this.guild.id), {
+ query: makeURLSearchParams(options),
+ });
+
+ return data.reduce((col, ban) => col.set(ban.user.id, this._add(ban, options.cache)), new Collection());
+ }
+
+ /**
+ * Options used to ban a user from a guild.
+ * @typedef {Object} BanOptions
+ * @property {number} [deleteMessageDays] Number of days of messages to delete, must be between 0 and 7, inclusive
+ * <warn>This property is deprecated. Use `deleteMessageSeconds` instead.</warn>
+ * @property {number} [deleteMessageSeconds] Number of seconds of messages to delete,
+ * must be between 0 and 604800 (7 days), inclusive
+ * @property {string} [reason] The reason for the ban
+ */
+
+ /**
+ * Bans a user from the guild.
+ * @param {UserResolvable} user The user to ban
+ * @param {BanOptions} [options] Options for the ban
+ * @returns {Promise<GuildMember|User|Snowflake>} Result object will be resolved as specifically as possible.
+ * If the GuildMember cannot be resolved, the User will instead be attempted to be resolved. If that also cannot
+ * be resolved, the user id will be the result.
+ * @example
+ * // Ban a user by id (or with a user/guild member object)
+ * guild.bans.create('84484653687267328')
+ * .then(banInfo => console.log(`Banned ${banInfo.user?.tag ?? banInfo.tag ?? banInfo}`))
+ * .catch(console.error);
+ */
+ async create(user, options = {}) {
+ if (typeof options !== 'object') throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true);
+ const id = this.client.users.resolveId(user);
+ if (!id) throw new DiscordjsError(ErrorCodes.BanResolveId, true);
+
+ if (options.deleteMessageDays !== undefined && !deprecationEmittedForDeleteMessageDays) {
+ process.emitWarning(
+ // eslint-disable-next-line max-len
+ 'The deleteMessageDays option for GuildBanManager#create() is deprecated. Use the deleteMessageSeconds option instead.',
+ 'DeprecationWarning',
+ );
+
+ deprecationEmittedForDeleteMessageDays = true;
+ }
+
+ await this.client.rest.put(Routes.guildBan(this.guild.id, id), {
+ body: {
+ delete_message_seconds:
+ options.deleteMessageSeconds ??
+ (options.deleteMessageDays ? options.deleteMessageDays * 24 * 60 * 60 : undefined),
+ },
+ reason: options.reason,
+ });
+ if (user instanceof GuildMember) return user;
+ const _user = this.client.users.resolve(id);
+ if (_user) {
+ return this.guild.members.resolve(_user) ?? _user;
+ }
+ return id;
+ }
+
+ /**
+ * Unbans a user from the guild.
+ * @param {UserResolvable} user The user to unban
+ * @param {string} [reason] Reason for unbanning user
+ * @returns {Promise<?User>}
+ * @example
+ * // Unban a user by id (or with a user/guild member object)
+ * guild.bans.remove('84484653687267328')
+ * .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))
+ * .catch(console.error);
+ */
+ async remove(user, reason) {
+ const id = this.client.users.resolveId(user);
+ if (!id) throw new DiscordjsError(ErrorCodes.BanResolveId);
+ await this.client.rest.delete(Routes.guildBan(this.guild.id, id), { reason });
+ return this.client.users.resolve(user);
+ }
+}
+
+module.exports = GuildBanManager;
diff --git a/node_modules/discord.js/src/managers/GuildChannelManager.js b/node_modules/discord.js/src/managers/GuildChannelManager.js
new file mode 100644
index 0000000..7ca9287
--- /dev/null
+++ b/node_modules/discord.js/src/managers/GuildChannelManager.js
@@ -0,0 +1,503 @@
+'use strict';
+
+const process = require('node:process');
+const { Collection } = require('@discordjs/collection');
+const { ChannelType, Routes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const GuildTextThreadManager = require('./GuildTextThreadManager');
+const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors');
+const GuildChannel = require('../structures/GuildChannel');
+const PermissionOverwrites = require('../structures/PermissionOverwrites');
+const ThreadChannel = require('../structures/ThreadChannel');
+const Webhook = require('../structures/Webhook');
+const ChannelFlagsBitField = require('../util/ChannelFlagsBitField');
+const { transformGuildForumTag, transformGuildDefaultReaction } = require('../util/Channels');
+const { ThreadChannelTypes } = require('../util/Constants');
+const DataResolver = require('../util/DataResolver');
+const { setPosition } = require('../util/Util');
+
+let cacheWarningEmitted = false;
+
+/**
+ * Manages API methods for GuildChannels and stores their cache.
+ * @extends {CachedManager}
+ */
+class GuildChannelManager extends CachedManager {
+ constructor(guild, iterable) {
+ super(guild.client, GuildChannel, iterable);
+ const defaultCaching =
+ this._cache.constructor.name === 'Collection' ||
+ this._cache.maxSize === undefined ||
+ this._cache.maxSize === Infinity;
+ if (!cacheWarningEmitted && !defaultCaching) {
+ cacheWarningEmitted = true;
+ process.emitWarning(
+ `Overriding the cache handling for ${this.constructor.name} is unsupported and breaks functionality.`,
+ 'UnsupportedCacheOverwriteWarning',
+ );
+ }
+
+ /**
+ * The guild this Manager belongs to
+ * @type {Guild}
+ */
+ this.guild = guild;
+ }
+
+ /**
+ * The number of channels in this managers cache excluding thread channels
+ * that do not count towards a guild's maximum channels restriction.
+ * @type {number}
+ * @readonly
+ */
+ get channelCountWithoutThreads() {
+ return this.cache.reduce((acc, channel) => {
+ if (ThreadChannelTypes.includes(channel.type)) return acc;
+ return ++acc;
+ }, 0);
+ }
+
+ /**
+ * The cache of this Manager
+ * @type {Collection<Snowflake, GuildChannel|ThreadChannel>}
+ * @name GuildChannelManager#cache
+ */
+
+ _add(channel) {
+ const existing = this.cache.get(channel.id);
+ if (existing) return existing;
+ this.cache.set(channel.id, channel);
+ return channel;
+ }
+
+ /**
+ * Data that can be resolved to give a Guild Channel object. This can be:
+ * * A GuildChannel object
+ * * A ThreadChannel object
+ * * A Snowflake
+ * @typedef {GuildChannel|ThreadChannel|Snowflake} GuildChannelResolvable
+ */
+
+ /**
+ * Resolves a GuildChannelResolvable to a Channel object.
+ * @param {GuildChannelResolvable} channel The GuildChannel resolvable to resolve
+ * @returns {?(GuildChannel|ThreadChannel)}
+ */
+ resolve(channel) {
+ if (channel instanceof ThreadChannel) return super.resolve(channel.id);
+ return super.resolve(channel);
+ }
+
+ /**
+ * Resolves a GuildChannelResolvable to a channel id.
+ * @param {GuildChannelResolvable} channel The GuildChannel resolvable to resolve
+ * @returns {?Snowflake}
+ */
+ resolveId(channel) {
+ if (channel instanceof ThreadChannel) return super.resolveId(channel.id);
+ return super.resolveId(channel);
+ }
+
+ /**
+ * Adds the target channel to a channel's followers.
+ * @param {NewsChannel|Snowflake} channel The channel to follow
+ * @param {TextChannelResolvable} targetChannel The channel where published announcements will be posted at
+ * @param {string} [reason] Reason for creating the webhook
+ * @returns {Promise<Snowflake>} Returns created target webhook id.
+ */
+ async addFollower(channel, targetChannel, reason) {
+ const channelId = this.resolveId(channel);
+ const targetChannelId = this.resolveId(targetChannel);
+ if (!channelId || !targetChannelId) throw new Error(ErrorCodes.GuildChannelResolve);
+ const { webhook_id } = await this.client.rest.post(Routes.channelFollowers(channelId), {
+ body: { webhook_channel_id: targetChannelId },
+ reason,
+ });
+ return webhook_id;
+ }
+
+ /**
+ * Options used to create a new channel in a guild.
+ * @typedef {CategoryCreateChannelOptions} GuildChannelCreateOptions
+ * @property {?CategoryChannelResolvable} [parent] Parent of the new channel
+ */
+
+ /**
+ * Creates a new channel in the guild.
+ * @param {GuildChannelCreateOptions} options Options for creating the new channel
+ * @returns {Promise<GuildChannel>}
+ * @example
+ * // Create a new text channel
+ * guild.channels.create({ name: 'new-general', reason: 'Needed a cool new channel' })
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Create a new channel with permission overwrites
+ * guild.channels.create({
+ * name: 'new-general',
+ * type: ChannelType.GuildVoice,
+ * permissionOverwrites: [
+ * {
+ * id: message.author.id,
+ * deny: [PermissionFlagsBits.ViewChannel],
+ * },
+ * ],
+ * })
+ */
+ async create({
+ name,
+ type,
+ topic,
+ nsfw,
+ bitrate,
+ userLimit,
+ parent,
+ permissionOverwrites,
+ position,
+ rateLimitPerUser,
+ rtcRegion,
+ videoQualityMode,
+ availableTags,
+ defaultReactionEmoji,
+ defaultAutoArchiveDuration,
+ defaultSortOrder,
+ defaultForumLayout,
+ reason,
+ }) {
+ parent &&= this.client.channels.resolveId(parent);
+ permissionOverwrites &&= permissionOverwrites.map(o => PermissionOverwrites.resolve(o, this.guild));
+
+ const data = await this.client.rest.post(Routes.guildChannels(this.guild.id), {
+ body: {
+ name,
+ topic,
+ type,
+ nsfw,
+ bitrate,
+ user_limit: userLimit,
+ parent_id: parent,
+ position,
+ permission_overwrites: permissionOverwrites,
+ rate_limit_per_user: rateLimitPerUser,
+ rtc_region: rtcRegion,
+ video_quality_mode: videoQualityMode,
+ available_tags: availableTags?.map(availableTag => transformGuildForumTag(availableTag)),
+ default_reaction_emoji: defaultReactionEmoji && transformGuildDefaultReaction(defaultReactionEmoji),
+ default_auto_archive_duration: defaultAutoArchiveDuration,
+ default_sort_order: defaultSortOrder,
+ default_forum_layout: defaultForumLayout,
+ },
+ reason,
+ });
+ return this.client.actions.ChannelCreate.handle(data).channel;
+ }
+
+ /**
+ * @typedef {ChannelWebhookCreateOptions} WebhookCreateOptions
+ * @property {TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel|Snowflake} channel
+ * The channel to create the webhook for
+ */
+
+ /**
+ * Creates a webhook for the channel.
+ * @param {WebhookCreateOptions} options Options for creating the webhook
+ * @returns {Promise<Webhook>} Returns the created Webhook
+ * @example
+ * // Create a webhook for the current channel
+ * guild.channels.createWebhook({
+ * channel: '222197033908436994',
+ * name: 'Snek',
+ * avatar: 'https://i.imgur.com/mI8XcpG.jpg',
+ * reason: 'Needed a cool new Webhook'
+ * })
+ * .then(console.log)
+ * .catch(console.error)
+ */
+ async createWebhook({ channel, name, avatar, reason }) {
+ const id = this.resolveId(channel);
+ if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'channel', 'GuildChannelResolvable');
+ if (typeof avatar === 'string' && !avatar.startsWith('data:')) {
+ avatar = await DataResolver.resolveImage(avatar);
+ }
+ const data = await this.client.rest.post(Routes.channelWebhooks(id), {
+ body: {
+ name,
+ avatar,
+ },
+ reason,
+ });
+ return new Webhook(this.client, data);
+ }
+
+ /**
+ * Options used to edit a guild channel.
+ * @typedef {Object} GuildChannelEditOptions
+ * @property {string} [name] The name of the channel
+ * @property {ChannelType} [type] The type of the channel (only conversion between text and news is supported)
+ * @property {number} [position] The position of the channel
+ * @property {?string} [topic] The topic of the text channel
+ * @property {boolean} [nsfw] Whether the channel is NSFW
+ * @property {number} [bitrate] The bitrate of the voice channel
+ * @property {number} [userLimit] The user limit of the voice channel
+ * @property {?CategoryChannelResolvable} [parent] The parent of the channel
+ * @property {boolean} [lockPermissions]
+ * Lock the permissions of the channel to what the parent's permissions are
+ * @property {OverwriteResolvable[]|Collection<Snowflake, OverwriteResolvable>} [permissionOverwrites]
+ * Permission overwrites for the channel
+ * @property {number} [rateLimitPerUser] The rate limit per user (slowmode) for the channel in seconds
+ * @property {ThreadAutoArchiveDuration} [defaultAutoArchiveDuration]
+ * The default auto archive duration for all new threads in this channel
+ * @property {?string} [rtcRegion] The RTC region of the channel
+ * @property {?VideoQualityMode} [videoQualityMode] The camera video quality mode of the channel
+ * @property {GuildForumTagData[]} [availableTags] The tags to set as available in a forum channel
+ * @property {?DefaultReactionEmoji} [defaultReactionEmoji] The emoji to set as the default reaction emoji
+ * @property {number} [defaultThreadRateLimitPerUser] The rate limit per user (slowmode) to set on forum posts
+ * @property {ChannelFlagsResolvable} [flags] The flags to set on the channel
+ * @property {?SortOrderType} [defaultSortOrder] The default sort order mode to set on the channel
+ * @property {ForumLayoutType} [defaultForumLayout] The default forum layout to set on the channel
+ * @property {string} [reason] Reason for editing this channel
+ */
+
+ /**
+ * Edits the channel.
+ * @param {GuildChannelResolvable} channel The channel to edit
+ * @param {GuildChannelEditOptions} options Options for editing the channel
+ * @returns {Promise<GuildChannel>}
+ * @example
+ * // Edit a channel
+ * guild.channels.edit('222197033908436994', { name: 'new-channel' })
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async edit(channel, options) {
+ channel = this.resolve(channel);
+ if (!channel) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'channel', 'GuildChannelResolvable');
+
+ const parent = options.parent && this.client.channels.resolveId(options.parent);
+
+ if (options.position !== undefined) {
+ await this.setPosition(channel, options.position, { position: options.position, reason: options.reason });
+ }
+
+ let permission_overwrites = options.permissionOverwrites?.map(o => PermissionOverwrites.resolve(o, this.guild));
+
+ if (options.lockPermissions) {
+ if (parent) {
+ const newParent = this.guild.channels.resolve(parent);
+ if (newParent?.type === ChannelType.GuildCategory) {
+ permission_overwrites = newParent.permissionOverwrites.cache.map(o =>
+ PermissionOverwrites.resolve(o, this.guild),
+ );
+ }
+ } else if (channel.parent) {
+ permission_overwrites = channel.parent.permissionOverwrites.cache.map(o =>
+ PermissionOverwrites.resolve(o, this.guild),
+ );
+ }
+ }
+
+ const newData = await this.client.rest.patch(Routes.channel(channel.id), {
+ body: {
+ name: (options.name ?? channel.name).trim(),
+ type: options.type,
+ topic: options.topic,
+ nsfw: options.nsfw,
+ bitrate: options.bitrate ?? channel.bitrate,
+ user_limit: options.userLimit ?? channel.userLimit,
+ rtc_region: 'rtcRegion' in options ? options.rtcRegion : channel.rtcRegion,
+ video_quality_mode: options.videoQualityMode,
+ parent_id: parent,
+ lock_permissions: options.lockPermissions,
+ rate_limit_per_user: options.rateLimitPerUser,
+ default_auto_archive_duration: options.defaultAutoArchiveDuration,
+ permission_overwrites,
+ available_tags: options.availableTags?.map(availableTag => transformGuildForumTag(availableTag)),
+ default_reaction_emoji:
+ options.defaultReactionEmoji && transformGuildDefaultReaction(options.defaultReactionEmoji),
+ default_thread_rate_limit_per_user: options.defaultThreadRateLimitPerUser,
+ flags: 'flags' in options ? ChannelFlagsBitField.resolve(options.flags) : undefined,
+ default_sort_order: options.defaultSortOrder,
+ default_forum_layout: options.defaultForumLayout,
+ },
+ reason: options.reason,
+ });
+
+ return this.client.actions.ChannelUpdate.handle(newData).updated;
+ }
+
+ /**
+ * Sets a new position for the guild channel.
+ * @param {GuildChannelResolvable} channel The channel to set the position for
+ * @param {number} position The new position for the guild channel
+ * @param {SetChannelPositionOptions} options Options for setting position
+ * @returns {Promise<GuildChannel>}
+ * @example
+ * // Set a new channel position
+ * guild.channels.setPosition('222078374472843266', 2)
+ * .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))
+ * .catch(console.error);
+ */
+ async setPosition(channel, position, { relative, reason } = {}) {
+ channel = this.resolve(channel);
+ if (!channel) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'channel', 'GuildChannelResolvable');
+ const updatedChannels = await setPosition(
+ channel,
+ position,
+ relative,
+ this.guild._sortedChannels(channel),
+ this.client,
+ Routes.guildChannels(this.guild.id),
+ reason,
+ );
+
+ this.client.actions.GuildChannelsPositionUpdate.handle({
+ guild_id: this.guild.id,
+ channels: updatedChannels,
+ });
+ return channel;
+ }
+
+ /**
+ * Obtains one or more guild channels from Discord, or the channel cache if they're already available.
+ * @param {Snowflake} [id] The channel's id
+ * @param {BaseFetchOptions} [options] Additional options for this fetch
+ * @returns {Promise<?GuildChannel|ThreadChannel|Collection<Snowflake, ?GuildChannel>>}
+ * @example
+ * // Fetch all channels from the guild (excluding threads)
+ * message.guild.channels.fetch()
+ * .then(channels => console.log(`There are ${channels.size} channels.`))
+ * .catch(console.error);
+ * @example
+ * // Fetch a single channel
+ * message.guild.channels.fetch('222197033908436994')
+ * .then(channel => console.log(`The channel name is: ${channel.name}`))
+ * .catch(console.error);
+ */
+ async fetch(id, { cache = true, force = false } = {}) {
+ if (id && !force) {
+ const existing = this.cache.get(id);
+ if (existing) return existing;
+ }
+
+ if (id) {
+ const data = await this.client.rest.get(Routes.channel(id));
+ // Since this is the guild manager, throw if on a different guild
+ if (this.guild.id !== data.guild_id) throw new DiscordjsError(ErrorCodes.GuildChannelUnowned);
+ return this.client.channels._add(data, this.guild, { cache });
+ }
+
+ const data = await this.client.rest.get(Routes.guildChannels(this.guild.id));
+ const channels = new Collection();
+ for (const channel of data) channels.set(channel.id, this.client.channels._add(channel, this.guild, { cache }));
+ return channels;
+ }
+
+ /**
+ * Fetches all webhooks for the channel.
+ * @param {GuildChannelResolvable} channel The channel to fetch webhooks for
+ * @returns {Promise<Collection<Snowflake, Webhook>>}
+ * @example
+ * // Fetch webhooks
+ * guild.channels.fetchWebhooks('769862166131245066')
+ * .then(hooks => console.log(`This channel has ${hooks.size} hooks`))
+ * .catch(console.error);
+ */
+ async fetchWebhooks(channel) {
+ const id = this.resolveId(channel);
+ if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'channel', 'GuildChannelResolvable');
+ const data = await this.client.rest.get(Routes.channelWebhooks(id));
+ return data.reduce((hooks, hook) => hooks.set(hook.id, new Webhook(this.client, hook)), new Collection());
+ }
+
+ /**
+ * Data that can be resolved to give a Category Channel object. This can be:
+ * * A CategoryChannel object
+ * * A Snowflake
+ * @typedef {CategoryChannel|Snowflake} CategoryChannelResolvable
+ */
+
+ /**
+ * The data needed for updating a channel's position.
+ * @typedef {Object} ChannelPosition
+ * @property {GuildChannel|Snowflake} channel Channel to update
+ * @property {number} [position] New position for the channel
+ * @property {CategoryChannelResolvable} [parent] Parent channel for this channel
+ * @property {boolean} [lockPermissions] If the overwrites should be locked to the parents overwrites
+ */
+
+ /**
+ * Batch-updates the guild's channels' positions.
+ * <info>Only one channel's parent can be changed at a time</info>
+ * @param {ChannelPosition[]} channelPositions Channel positions to update
+ * @returns {Promise<Guild>}
+ * @example
+ * guild.channels.setPositions([{ channel: channelId, position: newChannelIndex }])
+ * .then(guild => console.log(`Updated channel positions for ${guild}`))
+ * .catch(console.error);
+ */
+ async setPositions(channelPositions) {
+ channelPositions = channelPositions.map(r => ({
+ id: this.client.channels.resolveId(r.channel),
+ position: r.position,
+ lock_permissions: r.lockPermissions,
+ parent_id: r.parent !== undefined ? this.resolveId(r.parent) : undefined,
+ }));
+
+ await this.client.rest.patch(Routes.guildChannels(this.guild.id), { body: channelPositions });
+ return this.client.actions.GuildChannelsPositionUpdate.handle({
+ guild_id: this.guild.id,
+ channels: channelPositions,
+ }).guild;
+ }
+
+ /**
+ * Data returned from fetching threads.
+ * @typedef {Object} FetchedThreads
+ * @property {Collection<Snowflake, ThreadChannel>} threads The threads that were fetched
+ * @property {Collection<Snowflake, ThreadMember>} members The thread members in the received threads
+ */
+
+ /**
+ * Obtains all active thread channels in the guild.
+ * @param {boolean} [cache=true] Whether to cache the fetched data
+ * @returns {Promise<FetchedThreads>}
+ * @example
+ * // Fetch all threads from the guild
+ * message.guild.channels.fetchActiveThreads()
+ * .then(fetched => console.log(`There are ${fetched.threads.size} threads.`))
+ * .catch(console.error);
+ */
+ async fetchActiveThreads(cache = true) {
+ const data = await this.rawFetchGuildActiveThreads();
+ return GuildTextThreadManager._mapThreads(data, this.client, { guild: this.guild, cache });
+ }
+
+ /**
+ * `GET /guilds/{guild.id}/threads/active`
+ * @private
+ * @returns {Promise<RESTGetAPIGuildThreadsResult>}
+ */
+ rawFetchGuildActiveThreads() {
+ return this.client.rest.get(Routes.guildActiveThreads(this.guild.id));
+ }
+
+ /**
+ * Deletes the channel.
+ * @param {GuildChannelResolvable} channel The channel to delete
+ * @param {string} [reason] Reason for deleting this channel
+ * @returns {Promise<void>}
+ * @example
+ * // Delete the channel
+ * guild.channels.delete('858850993013260338', 'making room for new channels')
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async delete(channel, reason) {
+ const id = this.resolveId(channel);
+ if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'channel', 'GuildChannelResolvable');
+ await this.client.rest.delete(Routes.channel(id), { reason });
+ this.client.actions.ChannelDelete.handle({ id });
+ }
+}
+
+module.exports = GuildChannelManager;
diff --git a/node_modules/discord.js/src/managers/GuildEmojiManager.js b/node_modules/discord.js/src/managers/GuildEmojiManager.js
new file mode 100644
index 0000000..61f5050
--- /dev/null
+++ b/node_modules/discord.js/src/managers/GuildEmojiManager.js
@@ -0,0 +1,174 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { Routes, PermissionFlagsBits } = require('discord-api-types/v10');
+const BaseGuildEmojiManager = require('./BaseGuildEmojiManager');
+const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors');
+const DataResolver = require('../util/DataResolver');
+
+/**
+ * Manages API methods for GuildEmojis and stores their cache.
+ * @extends {BaseGuildEmojiManager}
+ */
+class GuildEmojiManager extends BaseGuildEmojiManager {
+ constructor(guild, iterable) {
+ super(guild.client, iterable);
+
+ /**
+ * The guild this manager belongs to
+ * @type {Guild}
+ */
+ this.guild = guild;
+ }
+
+ _add(data, cache) {
+ return super._add(data, cache, { extras: [this.guild] });
+ }
+
+ /**
+ * Options used for creating an emoji in a guild.
+ * @typedef {Object} GuildEmojiCreateOptions
+ * @property {BufferResolvable|Base64Resolvable} attachment The image for the emoji
+ * @property {string} name The name for the emoji
+ * @property {Collection<Snowflake, Role>|RoleResolvable[]} [roles] The roles to limit the emoji to
+ * @property {string} [reason] The reason for creating the emoji
+ */
+
+ /**
+ * Creates a new custom emoji in the guild.
+ * @param {GuildEmojiCreateOptions} options Options for creating the emoji
+ * @returns {Promise<Emoji>} The created emoji
+ * @example
+ * // Create a new emoji from a URL
+ * guild.emojis.create({ attachment: 'https://i.imgur.com/w3duR07.png', name: 'rip' })
+ * .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))
+ * .catch(console.error);
+ * @example
+ * // Create a new emoji from a file on your computer
+ * guild.emojis.create({ attachment: './memes/banana.png', name: 'banana' })
+ * .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))
+ * .catch(console.error);
+ */
+ async create({ attachment, name, roles, reason }) {
+ attachment = await DataResolver.resolveImage(attachment);
+ if (!attachment) throw new DiscordjsTypeError(ErrorCodes.ReqResourceType);
+
+ const body = { image: attachment, name };
+ if (roles) {
+ if (!Array.isArray(roles) && !(roles instanceof Collection)) {
+ throw new DiscordjsTypeError(
+ ErrorCodes.InvalidType,
+ 'options.roles',
+ 'Array or Collection of Roles or Snowflakes',
+ true,
+ );
+ }
+ body.roles = [];
+ for (const role of roles.values()) {
+ const resolvedRole = this.guild.roles.resolveId(role);
+ if (!resolvedRole) {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array or Collection', 'options.roles', role);
+ }
+ body.roles.push(resolvedRole);
+ }
+ }
+
+ const emoji = await this.client.rest.post(Routes.guildEmojis(this.guild.id), { body, reason });
+ return this.client.actions.GuildEmojiCreate.handle(this.guild, emoji).emoji;
+ }
+
+ /**
+ * Obtains one or more emojis from Discord, or the emoji cache if they're already available.
+ * @param {Snowflake} [id] The emoji's id
+ * @param {BaseFetchOptions} [options] Additional options for this fetch
+ * @returns {Promise<GuildEmoji|Collection<Snowflake, GuildEmoji>>}
+ * @example
+ * // Fetch all emojis from the guild
+ * message.guild.emojis.fetch()
+ * .then(emojis => console.log(`There are ${emojis.size} emojis.`))
+ * .catch(console.error);
+ * @example
+ * // Fetch a single emoji
+ * message.guild.emojis.fetch('222078108977594368')
+ * .then(emoji => console.log(`The emoji name is: ${emoji.name}`))
+ * .catch(console.error);
+ */
+ async fetch(id, { cache = true, force = false } = {}) {
+ if (id) {
+ if (!force) {
+ const existing = this.cache.get(id);
+ if (existing) return existing;
+ }
+ const emoji = await this.client.rest.get(Routes.guildEmoji(this.guild.id, id));
+ return this._add(emoji, cache);
+ }
+
+ const data = await this.client.rest.get(Routes.guildEmojis(this.guild.id));
+ const emojis = new Collection();
+ for (const emoji of data) emojis.set(emoji.id, this._add(emoji, cache));
+ return emojis;
+ }
+
+ /**
+ * Deletes an emoji.
+ * @param {EmojiResolvable} emoji The Emoji resolvable to delete
+ * @param {string} [reason] Reason for deleting the emoji
+ * @returns {Promise<void>}
+ */
+ async delete(emoji, reason) {
+ const id = this.resolveId(emoji);
+ if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'emoji', 'EmojiResolvable', true);
+ await this.client.rest.delete(Routes.guildEmoji(this.guild.id, id), { reason });
+ }
+
+ /**
+ * Edits an emoji.
+ * @param {EmojiResolvable} emoji The Emoji resolvable to edit
+ * @param {GuildEmojiEditOptions} options The options to provide
+ * @returns {Promise<GuildEmoji>}
+ */
+ async edit(emoji, options) {
+ const id = this.resolveId(emoji);
+ if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'emoji', 'EmojiResolvable', true);
+ const roles = options.roles?.map(r => this.guild.roles.resolveId(r));
+ const newData = await this.client.rest.patch(Routes.guildEmoji(this.guild.id, id), {
+ body: {
+ name: options.name,
+ roles,
+ },
+ reason: options.reason,
+ });
+ const existing = this.cache.get(id);
+ if (existing) {
+ const clone = existing._clone();
+ clone._patch(newData);
+ return clone;
+ }
+ return this._add(newData);
+ }
+
+ /**
+ * Fetches the author for this emoji
+ * @param {EmojiResolvable} emoji The emoji to fetch the author of
+ * @returns {Promise<User>}
+ */
+ async fetchAuthor(emoji) {
+ emoji = this.resolve(emoji);
+ if (!emoji) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'emoji', 'EmojiResolvable', true);
+ if (emoji.managed) {
+ throw new DiscordjsError(ErrorCodes.EmojiManaged);
+ }
+
+ const { me } = this.guild.members;
+ if (!me) throw new DiscordjsError(ErrorCodes.GuildUncachedMe);
+ if (!me.permissions.has(PermissionFlagsBits.ManageGuildExpressions)) {
+ throw new DiscordjsError(ErrorCodes.MissingManageGuildExpressionsPermission, this.guild);
+ }
+
+ const data = await this.client.rest.get(Routes.guildEmoji(this.guild.id, emoji.id));
+ emoji._patch(data);
+ return emoji.author;
+ }
+}
+
+module.exports = GuildEmojiManager;
diff --git a/node_modules/discord.js/src/managers/GuildEmojiRoleManager.js b/node_modules/discord.js/src/managers/GuildEmojiRoleManager.js
new file mode 100644
index 0000000..7b97f41
--- /dev/null
+++ b/node_modules/discord.js/src/managers/GuildEmojiRoleManager.js
@@ -0,0 +1,118 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const DataManager = require('./DataManager');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+const { Role } = require('../structures/Role');
+
+/**
+ * Manages API methods for roles belonging to emojis and stores their cache.
+ * @extends {DataManager}
+ */
+class GuildEmojiRoleManager extends DataManager {
+ constructor(emoji) {
+ super(emoji.client, Role);
+
+ /**
+ * The emoji belonging to this manager
+ * @type {GuildEmoji}
+ */
+ this.emoji = emoji;
+ /**
+ * The guild belonging to this manager
+ * @type {Guild}
+ */
+ this.guild = emoji.guild;
+ }
+
+ /**
+ * The cache of roles belonging to this emoji
+ * @type {Collection<Snowflake, Role>}
+ * @readonly
+ */
+ get cache() {
+ return this.guild.roles.cache.filter(role => this.emoji._roles.includes(role.id));
+ }
+
+ /**
+ * Adds a role (or multiple roles) to the list of roles that can use this emoji.
+ * @param {RoleResolvable|RoleResolvable[]|Collection<Snowflake, Role>} roleOrRoles The role or roles to add
+ * @returns {Promise<GuildEmoji>}
+ */
+ add(roleOrRoles) {
+ if (!Array.isArray(roleOrRoles) && !(roleOrRoles instanceof Collection)) roleOrRoles = [roleOrRoles];
+
+ const resolvedRoles = [];
+ for (const role of roleOrRoles.values()) {
+ const resolvedRole = this.guild.roles.resolveId(role);
+ if (!resolvedRole) {
+ return Promise.reject(new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array or Collection', 'roles', role));
+ }
+ resolvedRoles.push(resolvedRole);
+ }
+
+ const newRoles = [...new Set(resolvedRoles.concat(...this.cache.keys()))];
+ return this.set(newRoles);
+ }
+
+ /**
+ * Removes a role (or multiple roles) from the list of roles that can use this emoji.
+ * @param {RoleResolvable|RoleResolvable[]|Collection<Snowflake, Role>} roleOrRoles The role or roles to remove
+ * @returns {Promise<GuildEmoji>}
+ */
+ remove(roleOrRoles) {
+ if (!Array.isArray(roleOrRoles) && !(roleOrRoles instanceof Collection)) roleOrRoles = [roleOrRoles];
+
+ const resolvedRoleIds = [];
+ for (const role of roleOrRoles.values()) {
+ const roleId = this.guild.roles.resolveId(role);
+ if (!roleId) {
+ return Promise.reject(new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array or Collection', 'roles', role));
+ }
+ resolvedRoleIds.push(roleId);
+ }
+
+ const newRoles = [...this.cache.keys()].filter(id => !resolvedRoleIds.includes(id));
+ return this.set(newRoles);
+ }
+
+ /**
+ * Sets the role(s) that can use this emoji.
+ * @param {Collection<Snowflake, Role>|RoleResolvable[]} roles The roles or role ids to apply
+ * @returns {Promise<GuildEmoji>}
+ * @example
+ * // Set the emoji's roles to a single role
+ * guildEmoji.roles.set(['391156570408615936'])
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Remove all roles from an emoji
+ * guildEmoji.roles.set([])
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ set(roles) {
+ return this.emoji.edit({ roles });
+ }
+
+ clone() {
+ const clone = new this.constructor(this.emoji);
+ clone._patch([...this.cache.keys()]);
+ return clone;
+ }
+
+ /**
+ * Patches the roles for this manager's cache
+ * @param {Snowflake[]} roles The new roles
+ * @private
+ */
+ _patch(roles) {
+ this.emoji._roles = roles;
+ }
+
+ valueOf() {
+ return this.cache;
+ }
+}
+
+module.exports = GuildEmojiRoleManager;
diff --git a/node_modules/discord.js/src/managers/GuildForumThreadManager.js b/node_modules/discord.js/src/managers/GuildForumThreadManager.js
new file mode 100644
index 0000000..f830b98
--- /dev/null
+++ b/node_modules/discord.js/src/managers/GuildForumThreadManager.js
@@ -0,0 +1,83 @@
+'use strict';
+
+const { Routes } = require('discord-api-types/v10');
+const ThreadManager = require('./ThreadManager');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+const MessagePayload = require('../structures/MessagePayload');
+
+/**
+ * Manages API methods for threads in forum channels and stores their cache.
+ * @extends {ThreadManager}
+ */
+class GuildForumThreadManager extends ThreadManager {
+ /**
+ * The channel this Manager belongs to
+ * @name GuildForumThreadManager#channel
+ * @type {ForumChannel}
+ */
+
+ /**
+ * @typedef {BaseMessageOptions} GuildForumThreadMessageCreateOptions
+ * @property {StickerResolvable} [stickers] The stickers to send with the message
+ * @property {BitFieldResolvable} [flags] The flags to send with the message
+ * <info>Only `MessageFlags.SuppressEmbeds` and `MessageFlags.SuppressNotifications` can be set.</info>
+ */
+
+ /**
+ * Options for creating a thread.
+ * @typedef {StartThreadOptions} GuildForumThreadCreateOptions
+ * @property {GuildForumThreadMessageCreateOptions|MessagePayload} message The message associated with the thread post
+ * @property {Snowflake[]} [appliedTags] The tags to apply to the thread
+ */
+
+ /**
+ * Creates a new thread in the channel.
+ * @param {GuildForumThreadCreateOptions} [options] Options to create a new thread
+ * @returns {Promise<ThreadChannel>}
+ * @example
+ * // Create a new forum post
+ * forum.threads
+ * .create({
+ * name: 'Food Talk',
+ * autoArchiveDuration: ThreadAutoArchiveDuration.OneHour,
+ * message: {
+ * content: 'Discuss your favorite food!',
+ * },
+ * reason: 'Needed a separate thread for food',
+ * })
+ * .then(threadChannel => console.log(threadChannel))
+ * .catch(console.error);
+ */
+ async create({
+ name,
+ autoArchiveDuration = this.channel.defaultAutoArchiveDuration,
+ message,
+ reason,
+ rateLimitPerUser,
+ appliedTags,
+ } = {}) {
+ if (!message) {
+ throw new DiscordjsTypeError(ErrorCodes.GuildForumMessageRequired);
+ }
+
+ const { body, files } = await (message instanceof MessagePayload ? message : MessagePayload.create(this, message))
+ .resolveBody()
+ .resolveFiles();
+
+ const data = await this.client.rest.post(Routes.threads(this.channel.id), {
+ body: {
+ name,
+ auto_archive_duration: autoArchiveDuration,
+ rate_limit_per_user: rateLimitPerUser,
+ applied_tags: appliedTags,
+ message: body,
+ },
+ files,
+ reason,
+ });
+
+ return this.client.actions.ThreadCreate.handle(data).thread;
+ }
+}
+
+module.exports = GuildForumThreadManager;
diff --git a/node_modules/discord.js/src/managers/GuildInviteManager.js b/node_modules/discord.js/src/managers/GuildInviteManager.js
new file mode 100644
index 0000000..f1fe3eb
--- /dev/null
+++ b/node_modules/discord.js/src/managers/GuildInviteManager.js
@@ -0,0 +1,214 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { Routes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+const Invite = require('../structures/Invite');
+const DataResolver = require('../util/DataResolver');
+
+/**
+ * Manages API methods for GuildInvites and stores their cache.
+ * @extends {CachedManager}
+ */
+class GuildInviteManager extends CachedManager {
+ constructor(guild, iterable) {
+ super(guild.client, Invite, iterable);
+
+ /**
+ * The guild this Manager belongs to
+ * @type {Guild}
+ */
+ this.guild = guild;
+ }
+
+ /**
+ * The cache of this Manager
+ * @type {Collection<string, Invite>}
+ * @name GuildInviteManager#cache
+ */
+
+ _add(data, cache) {
+ return super._add(data, cache, { id: data.code, extras: [this.guild] });
+ }
+
+ /**
+ * Data that resolves to give an Invite object. This can be:
+ * * An invite code
+ * * An invite URL
+ * @typedef {string} InviteResolvable
+ */
+
+ /**
+ * Data that can be resolved to a channel that an invite can be created on. This can be:
+ * * TextChannel
+ * * VoiceChannel
+ * * NewsChannel
+ * * StageChannel
+ * * ForumChannel
+ * * Snowflake
+ * @typedef {TextChannel|VoiceChannel|NewsChannel|StageChannel|ForumChannel|Snowflake}
+ * GuildInvitableChannelResolvable
+ */
+
+ /**
+ * Resolves an InviteResolvable to an Invite object.
+ * @method resolve
+ * @memberof GuildInviteManager
+ * @instance
+ * @param {InviteResolvable} invite The invite resolvable to resolve
+ * @returns {?Invite}
+ */
+
+ /**
+ * Resolves an InviteResolvable to an invite code string.
+ * @method resolveId
+ * @memberof GuildInviteManager
+ * @instance
+ * @param {InviteResolvable} invite The invite resolvable to resolve
+ * @returns {?string}
+ */
+
+ /**
+ * Options used to fetch a single invite from a guild.
+ * @typedef {Object} FetchInviteOptions
+ * @property {InviteResolvable} code The invite to fetch
+ * @property {boolean} [cache=true] Whether or not to cache the fetched invite
+ * @property {boolean} [force=false] Whether to skip the cache check and request the API
+ */
+
+ /**
+ * Options used to fetch all invites from a guild.
+ * @typedef {Object} FetchInvitesOptions
+ * @property {GuildInvitableChannelResolvable} [channelId]
+ * The channel to fetch all invites from
+ * @property {boolean} [cache=true] Whether or not to cache the fetched invites
+ */
+
+ /**
+ * Fetches invite(s) from Discord.
+ * @param {InviteResolvable|FetchInviteOptions|FetchInvitesOptions} [options] Options for fetching guild invite(s)
+ * @returns {Promise<Invite|Collection<string, Invite>>}
+ * @example
+ * // Fetch all invites from a guild
+ * guild.invites.fetch()
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Fetch all invites from a guild without caching
+ * guild.invites.fetch({ cache: false })
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Fetch all invites from a channel
+ * guild.invites.fetch({ channelId: '222197033908436994' })
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Fetch a single invite
+ * guild.invites.fetch('bRCvFy9')
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Fetch a single invite without checking cache
+ * guild.invites.fetch({ code: 'bRCvFy9', force: true })
+ * .then(console.log)
+ * .catch(console.error)
+ * @example
+ * // Fetch a single invite without caching
+ * guild.invites.fetch({ code: 'bRCvFy9', cache: false })
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ fetch(options) {
+ if (!options) return this._fetchMany();
+ if (typeof options === 'string') {
+ const code = DataResolver.resolveInviteCode(options);
+ if (!code) return Promise.reject(new DiscordjsError(ErrorCodes.InviteResolveCode));
+ return this._fetchSingle({ code, cache: true });
+ }
+ if (!options.code) {
+ if (options.channelId) {
+ const id = this.guild.channels.resolveId(options.channelId);
+ if (!id) return Promise.reject(new DiscordjsError(ErrorCodes.GuildChannelResolve));
+ return this._fetchChannelMany(id, options.cache);
+ }
+
+ if ('cache' in options) return this._fetchMany(options.cache);
+ return Promise.reject(new DiscordjsError(ErrorCodes.InviteResolveCode));
+ }
+ return this._fetchSingle({
+ ...options,
+ code: DataResolver.resolveInviteCode(options.code),
+ });
+ }
+
+ async _fetchSingle({ code, cache, force = false }) {
+ if (!force) {
+ const existing = this.cache.get(code);
+ if (existing) return existing;
+ }
+
+ const invites = await this._fetchMany(cache);
+ const invite = invites.get(code);
+ if (!invite) throw new DiscordjsError(ErrorCodes.InviteNotFound);
+ return invite;
+ }
+
+ async _fetchMany(cache) {
+ const data = await this.client.rest.get(Routes.guildInvites(this.guild.id));
+ return data.reduce((col, invite) => col.set(invite.code, this._add(invite, cache)), new Collection());
+ }
+
+ async _fetchChannelMany(channelId, cache) {
+ const data = await this.client.rest.get(Routes.channelInvites(channelId));
+ return data.reduce((col, invite) => col.set(invite.code, this._add(invite, cache)), new Collection());
+ }
+
+ /**
+ * Create an invite to the guild from the provided channel.
+ * @param {GuildInvitableChannelResolvable} channel The options for creating the invite from a channel.
+ * @param {InviteCreateOptions} [options={}] The options for creating the invite from a channel.
+ * @returns {Promise<Invite>}
+ * @example
+ * // Create an invite to a selected channel
+ * guild.invites.create('599942732013764608')
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async create(
+ channel,
+ { temporary, maxAge, maxUses, unique, targetUser, targetApplication, targetType, reason } = {},
+ ) {
+ const id = this.guild.channels.resolveId(channel);
+ if (!id) throw new DiscordjsError(ErrorCodes.GuildChannelResolve);
+
+ const invite = await this.client.rest.post(Routes.channelInvites(id), {
+ body: {
+ temporary,
+ max_age: maxAge,
+ max_uses: maxUses,
+ unique,
+ target_user_id: this.client.users.resolveId(targetUser),
+ target_application_id: targetApplication?.id ?? targetApplication?.applicationId ?? targetApplication,
+ target_type: targetType,
+ },
+ reason,
+ });
+ return new Invite(this.client, invite);
+ }
+
+ /**
+ * Deletes an invite.
+ * @param {InviteResolvable} invite The invite to delete
+ * @param {string} [reason] Reason for deleting the invite
+ * @returns {Promise<void>}
+ */
+ async delete(invite, reason) {
+ const code = DataResolver.resolveInviteCode(invite);
+
+ await this.client.rest.delete(Routes.invite(code), { reason });
+ }
+}
+
+module.exports = GuildInviteManager;
diff --git a/node_modules/discord.js/src/managers/GuildManager.js b/node_modules/discord.js/src/managers/GuildManager.js
new file mode 100644
index 0000000..1d2d4ba
--- /dev/null
+++ b/node_modules/discord.js/src/managers/GuildManager.js
@@ -0,0 +1,283 @@
+'use strict';
+
+const process = require('node:process');
+const { setTimeout, clearTimeout } = require('node:timers');
+const { Collection } = require('@discordjs/collection');
+const { makeURLSearchParams } = require('@discordjs/rest');
+const { Routes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const { Guild } = require('../structures/Guild');
+const GuildChannel = require('../structures/GuildChannel');
+const GuildEmoji = require('../structures/GuildEmoji');
+const { GuildMember } = require('../structures/GuildMember');
+const Invite = require('../structures/Invite');
+const OAuth2Guild = require('../structures/OAuth2Guild');
+const { Role } = require('../structures/Role');
+const DataResolver = require('../util/DataResolver');
+const Events = require('../util/Events');
+const PermissionsBitField = require('../util/PermissionsBitField');
+const SystemChannelFlagsBitField = require('../util/SystemChannelFlagsBitField');
+const { resolveColor } = require('../util/Util');
+
+let cacheWarningEmitted = false;
+
+/**
+ * Manages API methods for Guilds and stores their cache.
+ * @extends {CachedManager}
+ */
+class GuildManager extends CachedManager {
+ constructor(client, iterable) {
+ super(client, Guild, iterable);
+ if (!cacheWarningEmitted && this._cache.constructor.name !== 'Collection') {
+ cacheWarningEmitted = true;
+ process.emitWarning(
+ `Overriding the cache handling for ${this.constructor.name} is unsupported and breaks functionality.`,
+ 'UnsupportedCacheOverwriteWarning',
+ );
+ }
+ }
+
+ /**
+ * The cache of this Manager
+ * @type {Collection<Snowflake, Guild>}
+ * @name GuildManager#cache
+ */
+
+ /**
+ * Data that resolves to give a Guild object. This can be:
+ * * A Guild object
+ * * A GuildChannel object
+ * * A GuildEmoji object
+ * * A Role object
+ * * A Snowflake
+ * * An Invite object
+ * @typedef {Guild|GuildChannel|GuildMember|GuildEmoji|Role|Snowflake|Invite} GuildResolvable
+ */
+
+ /**
+ * Partial data for a Role.
+ * @typedef {Object} PartialRoleData
+ * @property {Snowflake|number} [id] The role's id, used to set channel overrides.
+ * This is a placeholder and will be replaced by the API after consumption
+ * @property {string} [name] The name of the role
+ * @property {ColorResolvable} [color] The color of the role, either a hex string or a base 10 number
+ * @property {boolean} [hoist] Whether the role should be hoisted
+ * @property {number} [position] The position of the role
+ * @property {PermissionResolvable} [permissions] The permissions of the role
+ * @property {boolean} [mentionable] Whether the role should be mentionable
+ */
+
+ /**
+ * Partial overwrite data.
+ * @typedef {Object} PartialOverwriteData
+ * @property {Snowflake|number} id The id of the {@link Role} or {@link User} this overwrite belongs to
+ * @property {OverwriteType} [type] The type of this overwrite
+ * @property {PermissionResolvable} [allow] The permissions to allow
+ * @property {PermissionResolvable} [deny] The permissions to deny
+ */
+
+ /**
+ * Partial data for a Channel.
+ * @typedef {Object} PartialChannelData
+ * @property {Snowflake|number} [id] The channel's id, used to set its parent.
+ * This is a placeholder and will be replaced by the API after consumption
+ * @property {Snowflake|number} [parentId] The parent id for this channel
+ * @property {ChannelType.GuildText|ChannelType.GuildVoice|ChannelType.GuildCategory} [type] The type of the channel
+ * @property {string} name The name of the channel
+ * @property {?string} [topic] The topic of the text channel
+ * @property {boolean} [nsfw] Whether the channel is NSFW
+ * @property {number} [bitrate] The bitrate of the voice channel
+ * @property {number} [userLimit] The user limit of the channel
+ * @property {?string} [rtcRegion] The RTC region of the channel
+ * @property {VideoQualityMode} [videoQualityMode] The camera video quality mode of the channel
+ * @property {PartialOverwriteData[]} [permissionOverwrites]
+ * Overwrites of the channel
+ * @property {number} [rateLimitPerUser] The rate limit per user (slowmode) of the channel in seconds
+ */
+
+ /**
+ * Resolves a GuildResolvable to a Guild object.
+ * @method resolve
+ * @memberof GuildManager
+ * @instance
+ * @param {GuildResolvable} guild The guild resolvable to identify
+ * @returns {?Guild}
+ */
+ resolve(guild) {
+ if (
+ guild instanceof GuildChannel ||
+ guild instanceof GuildMember ||
+ guild instanceof GuildEmoji ||
+ guild instanceof Role ||
+ (guild instanceof Invite && guild.guild)
+ ) {
+ return super.resolve(guild.guild);
+ }
+ return super.resolve(guild);
+ }
+
+ /**
+ * Resolves a {@link GuildResolvable} to a {@link Guild} id string.
+ * @method resolveId
+ * @memberof GuildManager
+ * @instance
+ * @param {GuildResolvable} guild The guild resolvable to identify
+ * @returns {?Snowflake}
+ */
+ resolveId(guild) {
+ if (
+ guild instanceof GuildChannel ||
+ guild instanceof GuildMember ||
+ guild instanceof GuildEmoji ||
+ guild instanceof Role ||
+ (guild instanceof Invite && guild.guild)
+ ) {
+ return super.resolveId(guild.guild.id);
+ }
+ return super.resolveId(guild);
+ }
+
+ /**
+ * Options used to create a guild.
+ * @typedef {Object} GuildCreateOptions
+ * @property {string} name The name of the guild
+ * @property {?(BufferResolvable|Base64Resolvable)} [icon=null] The icon for the guild
+ * @property {GuildVerificationLevel} [verificationLevel] The verification level for the guild
+ * @property {GuildDefaultMessageNotifications} [defaultMessageNotifications] The default message notifications
+ * for the guild
+ * @property {GuildExplicitContentFilter} [explicitContentFilter] The explicit content filter level for the guild
+ * @property {PartialRoleData[]} [roles=[]] The roles for this guild,
+ * @property {PartialChannelData[]} [channels=[]] The channels for this guild
+ * @property {Snowflake|number} [afkChannelId] The AFK channel's id
+ * @property {number} [afkTimeout] The AFK timeout in seconds
+ * the first element of this array is used to change properties of the guild's everyone role.
+ * @property {Snowflake|number} [systemChannelId] The system channel's id
+ * @property {SystemChannelFlagsResolvable} [systemChannelFlags] The flags of the system channel
+ */
+ /* eslint-enable max-len */
+
+ /**
+ * Creates a guild.
+ * <warn>This is only available to bots in fewer than 10 guilds.</warn>
+ * @param {GuildCreateOptions} options Options for creating the guild
+ * @returns {Promise<Guild>} The guild that was created
+ */
+ async create({
+ name,
+ icon = null,
+ verificationLevel,
+ defaultMessageNotifications,
+ explicitContentFilter,
+ roles = [],
+ channels = [],
+ afkChannelId,
+ afkTimeout,
+ systemChannelId,
+ systemChannelFlags,
+ }) {
+ const data = await this.client.rest.post(Routes.guilds(), {
+ body: {
+ name,
+ icon: icon && (await DataResolver.resolveImage(icon)),
+ verification_level: verificationLevel,
+ default_message_notifications: defaultMessageNotifications,
+ explicit_content_filter: explicitContentFilter,
+ roles: roles.map(({ color, permissions, ...options }) => ({
+ ...options,
+ color: color && resolveColor(color),
+ permissions: permissions === undefined ? undefined : PermissionsBitField.resolve(permissions).toString(),
+ })),
+ channels: channels.map(
+ ({
+ parentId,
+ userLimit,
+ rtcRegion,
+ videoQualityMode,
+ permissionOverwrites,
+ rateLimitPerUser,
+ ...options
+ }) => ({
+ ...options,
+ parent_id: parentId,
+ user_limit: userLimit,
+ rtc_region: rtcRegion,
+ video_quality_mode: videoQualityMode,
+ permission_overwrites: permissionOverwrites?.map(({ allow, deny, ...permissionOverwriteOptions }) => ({
+ ...permissionOverwriteOptions,
+ allow: allow === undefined ? undefined : PermissionsBitField.resolve(allow).toString(),
+ deny: deny === undefined ? undefined : PermissionsBitField.resolve(deny).toString(),
+ })),
+ rate_limit_per_user: rateLimitPerUser,
+ }),
+ ),
+ afk_channel_id: afkChannelId,
+ afk_timeout: afkTimeout,
+ system_channel_id: systemChannelId,
+ system_channel_flags:
+ systemChannelFlags === undefined ? undefined : SystemChannelFlagsBitField.resolve(systemChannelFlags),
+ },
+ });
+
+ return (
+ this.client.guilds.cache.get(data.id) ??
+ new Promise(resolve => {
+ const handleGuild = guild => {
+ if (guild.id === data.id) {
+ clearTimeout(timeout);
+ this.client.decrementMaxListeners();
+ resolve(guild);
+ }
+ };
+ this.client.incrementMaxListeners();
+ this.client.once(Events.GuildCreate, handleGuild);
+
+ const timeout = setTimeout(() => {
+ this.client.removeListener(Events.GuildCreate, handleGuild);
+ this.client.decrementMaxListeners();
+ resolve(this.client.guilds._add(data));
+ }, 10_000).unref();
+ })
+ );
+ }
+
+ /**
+ * Options used to fetch a single guild.
+ * @typedef {BaseFetchOptions} FetchGuildOptions
+ * @property {GuildResolvable} guild The guild to fetch
+ * @property {boolean} [withCounts=true] Whether the approximate member and presence counts should be returned
+ */
+
+ /**
+ * Options used to fetch multiple guilds.
+ * @typedef {Object} FetchGuildsOptions
+ * @property {Snowflake} [before] Get guilds before this guild id
+ * @property {Snowflake} [after] Get guilds after this guild id
+ * @property {number} [limit] Maximum number of guilds to request (1-200)
+ */
+
+ /**
+ * Obtains one or multiple guilds from Discord, or the guild cache if it's already available.
+ * @param {GuildResolvable|FetchGuildOptions|FetchGuildsOptions} [options] The guild's id or options
+ * @returns {Promise<Guild|Collection<Snowflake, OAuth2Guild>>}
+ */
+ async fetch(options = {}) {
+ const id = this.resolveId(options) ?? this.resolveId(options.guild);
+
+ if (id) {
+ if (!options.force) {
+ const existing = this.cache.get(id);
+ if (existing) return existing;
+ }
+
+ const data = await this.client.rest.get(Routes.guild(id), {
+ query: makeURLSearchParams({ with_counts: options.withCounts ?? true }),
+ });
+ return this._add(data, options.cache);
+ }
+
+ const data = await this.client.rest.get(Routes.userGuilds(), { query: makeURLSearchParams(options) });
+ return data.reduce((coll, guild) => coll.set(guild.id, new OAuth2Guild(this.client, guild)), new Collection());
+ }
+}
+
+module.exports = GuildManager;
diff --git a/node_modules/discord.js/src/managers/GuildMemberManager.js b/node_modules/discord.js/src/managers/GuildMemberManager.js
new file mode 100644
index 0000000..a4cf09b
--- /dev/null
+++ b/node_modules/discord.js/src/managers/GuildMemberManager.js
@@ -0,0 +1,540 @@
+'use strict';
+
+const { setTimeout, clearTimeout } = require('node:timers');
+const { Collection } = require('@discordjs/collection');
+const { makeURLSearchParams } = require('@discordjs/rest');
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const { Routes, GatewayOpcodes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const { DiscordjsError, DiscordjsTypeError, DiscordjsRangeError, ErrorCodes } = require('../errors');
+const BaseGuildVoiceChannel = require('../structures/BaseGuildVoiceChannel');
+const { GuildMember } = require('../structures/GuildMember');
+const { Role } = require('../structures/Role');
+const Events = require('../util/Events');
+const { GuildMemberFlagsBitField } = require('../util/GuildMemberFlagsBitField');
+const Partials = require('../util/Partials');
+
+/**
+ * Manages API methods for GuildMembers and stores their cache.
+ * @extends {CachedManager}
+ */
+class GuildMemberManager extends CachedManager {
+ constructor(guild, iterable) {
+ super(guild.client, GuildMember, iterable);
+
+ /**
+ * The guild this manager belongs to
+ * @type {Guild}
+ */
+ this.guild = guild;
+ }
+
+ /**
+ * The cache of this Manager
+ * @type {Collection<Snowflake, GuildMember>}
+ * @name GuildMemberManager#cache
+ */
+
+ _add(data, cache = true) {
+ return super._add(data, cache, { id: data.user.id, extras: [this.guild] });
+ }
+
+ /**
+ * Data that resolves to give a GuildMember object. This can be:
+ * * A GuildMember object
+ * * A User resolvable
+ * @typedef {GuildMember|UserResolvable} GuildMemberResolvable
+ */
+
+ /**
+ * Resolves a {@link GuildMemberResolvable} to a {@link GuildMember} object.
+ * @param {GuildMemberResolvable} member The user that is part of the guild
+ * @returns {?GuildMember}
+ */
+ resolve(member) {
+ const memberResolvable = super.resolve(member);
+ if (memberResolvable) return memberResolvable;
+ const userResolvable = this.client.users.resolveId(member);
+ if (userResolvable) return super.resolve(userResolvable);
+ return null;
+ }
+
+ /**
+ * Resolves a {@link GuildMemberResolvable} to a member id.
+ * @param {GuildMemberResolvable} member The user that is part of the guild
+ * @returns {?Snowflake}
+ */
+ resolveId(member) {
+ const memberResolvable = super.resolveId(member);
+ if (memberResolvable) return memberResolvable;
+ const userResolvable = this.client.users.resolveId(member);
+ return this.cache.has(userResolvable) ? userResolvable : null;
+ }
+
+ /**
+ * Options used to add a user to a guild using OAuth2.
+ * @typedef {Object} AddGuildMemberOptions
+ * @property {string} accessToken An OAuth2 access token for the user with the {@link OAuth2Scopes.GuildsJoin}
+ * scope granted to the bot's application
+ * @property {string} [nick] The nickname to give to the member
+ * <info>This property requires the {@link PermissionFlagsBits.ManageNicknames} permission.</info>
+ * @property {Collection<Snowflake, Role>|RoleResolvable[]} [roles] The roles to add to the member
+ * <info>This property requires the {@link PermissionFlagsBits.ManageRoles} permission.</info>
+ * @property {boolean} [mute] Whether the member should be muted
+ * <info>This property requires the {@link PermissionFlagsBits.MuteMembers} permission.</info>
+ * @property {boolean} [deaf] Whether the member should be deafened
+ * <info>This property requires the {@link PermissionFlagsBits.MuteMembers} permission.</info>
+ * @property {boolean} [force] Whether to skip the cache check and request the API directly
+ * @property {boolean} [fetchWhenExisting=true] Whether to fetch the user if not cached and already a member
+ */
+
+ /**
+ * Adds a user to the guild using OAuth2.
+ * <info>This method requires the {@link PermissionFlagsBits.CreateInstantInvite} permission.
+ * @param {UserResolvable} user The user to add to the guild
+ * @param {AddGuildMemberOptions} options Options for adding the user to the guild
+ * @returns {Promise<GuildMember|null>}
+ */
+ async add(user, options) {
+ const userId = this.client.users.resolveId(user);
+ if (!userId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'user', 'UserResolvable');
+ if (!options.force) {
+ const cachedUser = this.cache.get(userId);
+ if (cachedUser) return cachedUser;
+ }
+ const resolvedOptions = {
+ access_token: options.accessToken,
+ nick: options.nick,
+ mute: options.mute,
+ deaf: options.deaf,
+ };
+ if (options.roles) {
+ if (!Array.isArray(options.roles) && !(options.roles instanceof Collection)) {
+ throw new DiscordjsTypeError(
+ ErrorCodes.InvalidType,
+ 'options.roles',
+ 'Array or Collection of Roles or Snowflakes',
+ true,
+ );
+ }
+ const resolvedRoles = [];
+ for (const role of options.roles.values()) {
+ const resolvedRole = this.guild.roles.resolveId(role);
+ if (!resolvedRole) {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array or Collection', 'options.roles', role);
+ }
+ resolvedRoles.push(resolvedRole);
+ }
+ resolvedOptions.roles = resolvedRoles;
+ }
+ const data = await this.client.rest.put(Routes.guildMember(this.guild.id, userId), { body: resolvedOptions });
+ // Data is an empty Uint8Array if the member is already part of the guild.
+ return data instanceof Uint8Array
+ ? options.fetchWhenExisting === false
+ ? null
+ : this.fetch(userId)
+ : this._add(data);
+ }
+
+ /**
+ * The client user as a GuildMember of this guild
+ * @type {?GuildMember}
+ * @readonly
+ */
+ get me() {
+ return (
+ this.resolve(this.client.user.id) ??
+ (this.client.options.partials.includes(Partials.GuildMember)
+ ? this._add({ user: { id: this.client.user.id } }, true)
+ : null)
+ );
+ }
+
+ /**
+ * Options used to fetch a single member from a guild.
+ * @typedef {BaseFetchOptions} FetchMemberOptions
+ * @property {UserResolvable} user The user to fetch
+ */
+
+ /**
+ * Options used to fetch multiple members from a guild.
+ * @typedef {Object} FetchMembersOptions
+ * @property {UserResolvable|UserResolvable[]} [user] The user(s) to fetch
+ * @property {?string} [query] Limit fetch to members with similar usernames
+ * @property {number} [limit=0] Maximum number of members to request
+ * @property {boolean} [withPresences=false] Whether to include the presences
+ * @property {number} [time=120e3] Timeout for receipt of members
+ * @property {?string} [nonce] Nonce for this request (32 characters max - default to base 16 now timestamp)
+ */
+
+ /**
+ * Fetches member(s) from a guild.
+ * @param {UserResolvable|FetchMemberOptions|FetchMembersOptions} [options] Options for fetching member(s).
+ * Omitting the parameter or providing `undefined` will fetch all members.
+ * @returns {Promise<GuildMember|Collection<Snowflake, GuildMember>>}
+ * @example
+ * // Fetch all members from a guild
+ * guild.members.fetch()
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Fetch a single member
+ * guild.members.fetch('66564597481480192')
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Fetch a single member without checking cache
+ * guild.members.fetch({ user, force: true })
+ * .then(console.log)
+ * .catch(console.error)
+ * @example
+ * // Fetch a single member without caching
+ * guild.members.fetch({ user, cache: false })
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Fetch by an array of users including their presences
+ * guild.members.fetch({ user: ['66564597481480192', '191615925336670208'], withPresences: true })
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Fetch by query
+ * guild.members.fetch({ query: 'hydra', limit: 1 })
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ fetch(options) {
+ if (!options) return this._fetchMany();
+ const { user: users, limit, withPresences, cache, force } = options;
+ const resolvedUser = this.client.users.resolveId(users ?? options);
+ if (resolvedUser && !limit && !withPresences) return this._fetchSingle({ user: resolvedUser, cache, force });
+ const resolvedUsers = users?.map?.(user => this.client.users.resolveId(user)) ?? resolvedUser ?? undefined;
+ return this._fetchMany({ ...options, users: resolvedUsers });
+ }
+
+ async _fetchSingle({ user, cache, force = false }) {
+ if (!force) {
+ const existing = this.cache.get(user);
+ if (existing && !existing.partial) return existing;
+ }
+
+ const data = await this.client.rest.get(Routes.guildMember(this.guild.id, user));
+ return this._add(data, cache);
+ }
+
+ _fetchMany({
+ limit = 0,
+ withPresences: presences,
+ users,
+ query,
+ time = 120e3,
+ nonce = DiscordSnowflake.generate().toString(),
+ } = {}) {
+ if (nonce.length > 32) return Promise.reject(new DiscordjsRangeError(ErrorCodes.MemberFetchNonceLength));
+
+ return new Promise((resolve, reject) => {
+ if (!query && !users) query = '';
+ this.guild.shard.send({
+ op: GatewayOpcodes.RequestGuildMembers,
+ d: {
+ guild_id: this.guild.id,
+ presences,
+ user_ids: users,
+ query,
+ nonce,
+ limit,
+ },
+ });
+ const fetchedMembers = new Collection();
+ let i = 0;
+ const handler = (members, _, chunk) => {
+ if (chunk.nonce !== nonce) return;
+ timeout.refresh();
+ i++;
+ for (const member of members.values()) {
+ fetchedMembers.set(member.id, member);
+ }
+ if (members.size < 1_000 || (limit && fetchedMembers.size >= limit) || i === chunk.count) {
+ clearTimeout(timeout);
+ this.client.removeListener(Events.GuildMembersChunk, handler);
+ this.client.decrementMaxListeners();
+ resolve(users && !Array.isArray(users) && fetchedMembers.size ? fetchedMembers.first() : fetchedMembers);
+ }
+ };
+ const timeout = setTimeout(() => {
+ this.client.removeListener(Events.GuildMembersChunk, handler);
+ this.client.decrementMaxListeners();
+ reject(new DiscordjsError(ErrorCodes.GuildMembersTimeout));
+ }, time).unref();
+ this.client.incrementMaxListeners();
+ this.client.on(Events.GuildMembersChunk, handler);
+ });
+ }
+
+ /**
+ * Fetches the client user as a GuildMember of the guild.
+ * @param {BaseFetchOptions} [options] The options for fetching the member
+ * @returns {Promise<GuildMember>}
+ */
+ fetchMe(options) {
+ return this.fetch({ ...options, user: this.client.user.id });
+ }
+
+ /**
+ * Options used for searching guild members.
+ * @typedef {Object} GuildSearchMembersOptions
+ * @property {string} query Filter members whose username or nickname start with this query
+ * @property {number} [limit] Maximum number of members to search
+ * @property {boolean} [cache=true] Whether or not to cache the fetched member(s)
+ */
+
+ /**
+ * Searches for members in the guild based on a query.
+ * @param {GuildSearchMembersOptions} options Options for searching members
+ * @returns {Promise<Collection<Snowflake, GuildMember>>}
+ */
+ async search({ query, limit, cache = true } = {}) {
+ const data = await this.client.rest.get(Routes.guildMembersSearch(this.guild.id), {
+ query: makeURLSearchParams({ query, limit }),
+ });
+ return data.reduce((col, member) => col.set(member.user.id, this._add(member, cache)), new Collection());
+ }
+
+ /**
+ * Options used for listing guild members.
+ * @typedef {Object} GuildListMembersOptions
+ * @property {Snowflake} [after] Limit fetching members to those with an id greater than the supplied id
+ * @property {number} [limit] Maximum number of members to list
+ * @property {boolean} [cache=true] Whether or not to cache the fetched member(s)
+ */
+
+ /**
+ * Lists up to 1000 members of the guild.
+ * @param {GuildListMembersOptions} [options] Options for listing members
+ * @returns {Promise<Collection<Snowflake, GuildMember>>}
+ */
+ async list({ after, limit, cache = true } = {}) {
+ const query = makeURLSearchParams({ limit, after });
+ const data = await this.client.rest.get(Routes.guildMembers(this.guild.id), { query });
+ return data.reduce((col, member) => col.set(member.user.id, this._add(member, cache)), new Collection());
+ }
+
+ /**
+ * The data for editing a guild member.
+ * @typedef {Object} GuildMemberEditOptions
+ * @property {?string} [nick] The nickname to set for the member
+ * @property {Collection<Snowflake, Role>|RoleResolvable[]} [roles] The roles or role ids to apply
+ * @property {boolean} [mute] Whether or not the member should be muted
+ * @property {boolean} [deaf] Whether or not the member should be deafened
+ * @property {GuildVoiceChannelResolvable|null} [channel] Channel to move the member to
+ * (if they are connected to voice), or `null` if you want to disconnect them from voice
+ * @property {DateResolvable|null} [communicationDisabledUntil] The date or timestamp
+ * for the member's communication to be disabled until. Provide `null` to enable communication again.
+ * @property {GuildMemberFlagsResolvable} [flags] The flags to set for the member
+ * @property {string} [reason] Reason for editing this user
+ */
+
+ /**
+ * Edits a member of the guild.
+ * <info>The user must be a member of the guild</info>
+ * @param {UserResolvable} user The member to edit
+ * @param {GuildMemberEditOptions} options The options to provide
+ * @returns {Promise<GuildMember>}
+ */
+ async edit(user, { reason, ...options }) {
+ const id = this.client.users.resolveId(user);
+ if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'user', 'UserResolvable');
+
+ if (options.channel) {
+ options.channel = this.guild.channels.resolve(options.channel);
+ if (!(options.channel instanceof BaseGuildVoiceChannel)) {
+ throw new DiscordjsError(ErrorCodes.GuildVoiceChannelResolve);
+ }
+ options.channel_id = options.channel.id;
+ options.channel = undefined;
+ } else if (options.channel === null) {
+ options.channel_id = null;
+ options.channel = undefined;
+ }
+ options.roles &&= options.roles.map(role => (role instanceof Role ? role.id : role));
+
+ if (options.communicationDisabledUntil !== undefined) {
+ options.communication_disabled_until =
+ // eslint-disable-next-line eqeqeq
+ options.communicationDisabledUntil != null
+ ? new Date(options.communicationDisabledUntil).toISOString()
+ : options.communicationDisabledUntil;
+ }
+
+ if (options.flags !== undefined) {
+ options.flags = GuildMemberFlagsBitField.resolve(options.flags);
+ }
+
+ let endpoint;
+ if (id === this.client.user.id) {
+ const keys = Object.keys(options);
+ if (keys.length === 1 && keys[0] === 'nick') endpoint = Routes.guildMember(this.guild.id);
+ else endpoint = Routes.guildMember(this.guild.id, id);
+ } else {
+ endpoint = Routes.guildMember(this.guild.id, id);
+ }
+ const d = await this.client.rest.patch(endpoint, { body: options, reason });
+
+ const clone = this.cache.get(id)?._clone();
+ clone?._patch(d);
+ return clone ?? this._add(d, false);
+ }
+
+ /**
+ * Options used for pruning guild members.
+ * <info>It's recommended to set {@link GuildPruneMembersOptions#count options.count}
+ * to `false` for large guilds.</info>
+ * @typedef {Object} GuildPruneMembersOptions
+ * @property {number} [days] Number of days of inactivity required to kick
+ * @property {boolean} [dry=false] Get the number of users that will be kicked, without actually kicking them
+ * @property {boolean} [count] Whether or not to return the number of users that have been kicked.
+ * @property {RoleResolvable[]} [roles] Array of roles to bypass the "...and no roles" constraint when pruning
+ * @property {string} [reason] Reason for this prune
+ */
+
+ /**
+ * Prunes members from the guild based on how long they have been inactive.
+ * @param {GuildPruneMembersOptions} [options] Options for pruning
+ * @returns {Promise<number|null>} The number of members that were/will be kicked
+ * @example
+ * // See how many members will be pruned
+ * guild.members.prune({ dry: true })
+ * .then(pruned => console.log(`This will prune ${pruned} people!`))
+ * .catch(console.error);
+ * @example
+ * // Actually prune the members
+ * guild.members.prune({ days: 1, reason: 'too many people!' })
+ * .then(pruned => console.log(`I just pruned ${pruned} people!`))
+ * .catch(console.error);
+ * @example
+ * // Include members with a specified role
+ * guild.members.prune({ days: 7, roles: ['657259391652855808'] })
+ * .then(pruned => console.log(`I just pruned ${pruned} people!`))
+ * .catch(console.error);
+ */
+ async prune({ days, dry = false, count: compute_prune_count, roles = [], reason } = {}) {
+ if (typeof days !== 'number') throw new DiscordjsTypeError(ErrorCodes.PruneDaysType);
+
+ const query = { days };
+ const resolvedRoles = [];
+
+ for (const role of roles) {
+ const resolvedRole = this.guild.roles.resolveId(role);
+ if (!resolvedRole) {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array', 'options.roles', role);
+ }
+ resolvedRoles.push(resolvedRole);
+ }
+
+ if (resolvedRoles.length) {
+ query.include_roles = dry ? resolvedRoles.join(',') : resolvedRoles;
+ }
+
+ const endpoint = Routes.guildPrune(this.guild.id);
+
+ const { pruned } = await (dry
+ ? this.client.rest.get(endpoint, { query: makeURLSearchParams(query), reason })
+ : this.client.rest.post(endpoint, { body: { ...query, compute_prune_count }, reason }));
+
+ return pruned;
+ }
+
+ /**
+ * Kicks a user from the guild.
+ * <info>The user must be a member of the guild</info>
+ * @param {UserResolvable} user The member to kick
+ * @param {string} [reason] Reason for kicking
+ * @returns {Promise<GuildMember|User|Snowflake>} Result object will be resolved as specifically as possible.
+ * If the GuildMember cannot be resolved, the User will instead be attempted to be resolved. If that also cannot
+ * be resolved, the user's id will be the result.
+ * @example
+ * // Kick a user by id (or with a user/guild member object)
+ * guild.members.kick('84484653687267328')
+ * .then(kickInfo => console.log(`Kicked ${kickInfo.user?.tag ?? kickInfo.tag ?? kickInfo}`))
+ * .catch(console.error);
+ */
+ async kick(user, reason) {
+ const id = this.client.users.resolveId(user);
+ if (!id) return Promise.reject(new DiscordjsTypeError(ErrorCodes.InvalidType, 'user', 'UserResolvable'));
+
+ await this.client.rest.delete(Routes.guildMember(this.guild.id, id), { reason });
+
+ return this.resolve(user) ?? this.client.users.resolve(user) ?? id;
+ }
+
+ /**
+ * Bans a user from the guild.
+ * @param {UserResolvable} user The user to ban
+ * @param {BanOptions} [options] Options for the ban
+ * @returns {Promise<GuildMember|User|Snowflake>} Result object will be resolved as specifically as possible.
+ * If the GuildMember cannot be resolved, the User will instead be attempted to be resolved. If that also cannot
+ * be resolved, the user id will be the result.
+ * Internally calls the GuildBanManager#create method.
+ * @example
+ * // Ban a user by id (or with a user/guild member object)
+ * guild.members.ban('84484653687267328')
+ * .then(banInfo => console.log(`Banned ${banInfo.user?.tag ?? banInfo.tag ?? banInfo}`))
+ * .catch(console.error);
+ */
+ ban(user, options) {
+ return this.guild.bans.create(user, options);
+ }
+
+ /**
+ * Unbans a user from the guild. Internally calls the {@link GuildBanManager#remove} method.
+ * @param {UserResolvable} user The user to unban
+ * @param {string} [reason] Reason for unbanning user
+ * @returns {Promise<?User>} The user that was unbanned
+ * @example
+ * // Unban a user by id (or with a user/guild member object)
+ * guild.members.unban('84484653687267328')
+ * .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))
+ * .catch(console.error);
+ */
+ unban(user, reason) {
+ return this.guild.bans.remove(user, reason);
+ }
+
+ /**
+ * Options used for adding or removing a role from a member.
+ * @typedef {Object} AddOrRemoveGuildMemberRoleOptions
+ * @property {GuildMemberResolvable} user The user to add/remove the role from
+ * @property {RoleResolvable} role The role to add/remove
+ * @property {string} [reason] Reason for adding/removing the role
+ */
+
+ /**
+ * Adds a role to a member.
+ * @param {AddOrRemoveGuildMemberRoleOptions} options Options for adding the role
+ * @returns {Promise<GuildMember|User|Snowflake>}
+ */
+ async addRole(options) {
+ const { user, role, reason } = options;
+ const userId = this.guild.members.resolveId(user);
+ const roleId = this.guild.roles.resolveId(role);
+ await this.client.rest.put(Routes.guildMemberRole(this.guild.id, userId, roleId), { reason });
+
+ return this.resolve(user) ?? this.client.users.resolve(user) ?? userId;
+ }
+
+ /**
+ * Removes a role from a member.
+ * @param {AddOrRemoveGuildMemberRoleOptions} options Options for removing the role
+ * @returns {Promise<GuildMember|User|Snowflake>}
+ */
+ async removeRole(options) {
+ const { user, role, reason } = options;
+ const userId = this.guild.members.resolveId(user);
+ const roleId = this.guild.roles.resolveId(role);
+ await this.client.rest.delete(Routes.guildMemberRole(this.guild.id, userId, roleId), { reason });
+
+ return this.resolve(user) ?? this.client.users.resolve(user) ?? userId;
+ }
+}
+
+module.exports = GuildMemberManager;
diff --git a/node_modules/discord.js/src/managers/GuildMemberRoleManager.js b/node_modules/discord.js/src/managers/GuildMemberRoleManager.js
new file mode 100644
index 0000000..e530268
--- /dev/null
+++ b/node_modules/discord.js/src/managers/GuildMemberRoleManager.js
@@ -0,0 +1,204 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { Routes } = require('discord-api-types/v10');
+const DataManager = require('./DataManager');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+const { Role } = require('../structures/Role');
+
+/**
+ * Manages API methods for roles of a GuildMember and stores their cache.
+ * @extends {DataManager}
+ */
+class GuildMemberRoleManager extends DataManager {
+ constructor(member) {
+ super(member.client, Role);
+
+ /**
+ * The GuildMember this manager belongs to
+ * @type {GuildMember}
+ */
+ this.member = member;
+
+ /**
+ * The Guild this manager belongs to
+ * @type {Guild}
+ */
+ this.guild = member.guild;
+ }
+
+ /**
+ * The roles of this member
+ * @type {Collection<Snowflake, Role>}
+ * @readonly
+ */
+ get cache() {
+ const everyone = this.guild.roles.everyone;
+ return this.guild.roles.cache.filter(role => this.member._roles.includes(role.id)).set(everyone.id, everyone);
+ }
+
+ /**
+ * The role of the member used to hoist them in a separate category in the users list
+ * @type {?Role}
+ * @readonly
+ */
+ get hoist() {
+ const hoistedRoles = this.cache.filter(role => role.hoist);
+ if (!hoistedRoles.size) return null;
+ return hoistedRoles.reduce((prev, role) => (role.comparePositionTo(prev) > 0 ? role : prev));
+ }
+
+ /**
+ * The role of the member used to set their role icon
+ * @type {?Role}
+ * @readonly
+ */
+ get icon() {
+ const iconRoles = this.cache.filter(role => role.icon || role.unicodeEmoji);
+ if (!iconRoles.size) return null;
+ return iconRoles.reduce((prev, role) => (role.comparePositionTo(prev) > 0 ? role : prev));
+ }
+
+ /**
+ * The role of the member used to set their color
+ * @type {?Role}
+ * @readonly
+ */
+ get color() {
+ const coloredRoles = this.cache.filter(role => role.color);
+ if (!coloredRoles.size) return null;
+ return coloredRoles.reduce((prev, role) => (role.comparePositionTo(prev) > 0 ? role : prev));
+ }
+
+ /**
+ * The role of the member with the highest position
+ * @type {Role}
+ * @readonly
+ */
+ get highest() {
+ return this.cache.reduce((prev, role) => (role.comparePositionTo(prev) > 0 ? role : prev), this.cache.first());
+ }
+
+ /**
+ * The premium subscriber role of the guild, if present on the member
+ * @type {?Role}
+ * @readonly
+ */
+ get premiumSubscriberRole() {
+ return this.cache.find(role => role.tags?.premiumSubscriberRole) ?? null;
+ }
+
+ /**
+ * The managed role this member created when joining the guild, if any
+ * <info>Only ever available on bots</info>
+ * @type {?Role}
+ * @readonly
+ */
+ get botRole() {
+ if (!this.member.user.bot) return null;
+ return this.cache.find(role => role.tags?.botId === this.member.user.id) ?? null;
+ }
+
+ /**
+ * Adds a role (or multiple roles) to the member.
+ * @param {RoleResolvable|RoleResolvable[]|Collection<Snowflake, Role>} roleOrRoles The role or roles to add
+ * @param {string} [reason] Reason for adding the role(s)
+ * @returns {Promise<GuildMember>}
+ */
+ async add(roleOrRoles, reason) {
+ if (roleOrRoles instanceof Collection || Array.isArray(roleOrRoles)) {
+ const resolvedRoles = [];
+ for (const role of roleOrRoles.values()) {
+ const resolvedRole = this.guild.roles.resolveId(role);
+ if (!resolvedRole) {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array or Collection', 'roles', role);
+ }
+ resolvedRoles.push(resolvedRole);
+ }
+
+ const newRoles = [...new Set(resolvedRoles.concat(...this.cache.keys()))];
+ return this.set(newRoles, reason);
+ } else {
+ roleOrRoles = this.guild.roles.resolveId(roleOrRoles);
+ if (roleOrRoles === null) {
+ throw new DiscordjsTypeError(
+ ErrorCodes.InvalidType,
+ 'roles',
+ 'Role, Snowflake or Array or Collection of Roles or Snowflakes',
+ );
+ }
+
+ await this.client.rest.put(Routes.guildMemberRole(this.guild.id, this.member.id, roleOrRoles), { reason });
+
+ const clone = this.member._clone();
+ clone._roles = [...this.cache.keys(), roleOrRoles];
+ return clone;
+ }
+ }
+
+ /**
+ * Removes a role (or multiple roles) from the member.
+ * @param {RoleResolvable|RoleResolvable[]|Collection<Snowflake, Role>} roleOrRoles The role or roles to remove
+ * @param {string} [reason] Reason for removing the role(s)
+ * @returns {Promise<GuildMember>}
+ */
+ async remove(roleOrRoles, reason) {
+ if (roleOrRoles instanceof Collection || Array.isArray(roleOrRoles)) {
+ const resolvedRoles = [];
+ for (const role of roleOrRoles.values()) {
+ const resolvedRole = this.guild.roles.resolveId(role);
+ if (!resolvedRole) {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidElement, 'Array or Collection', 'roles', role);
+ }
+ resolvedRoles.push(resolvedRole);
+ }
+
+ const newRoles = this.cache.filter(role => !resolvedRoles.includes(role.id));
+ return this.set(newRoles, reason);
+ } else {
+ roleOrRoles = this.guild.roles.resolveId(roleOrRoles);
+ if (roleOrRoles === null) {
+ throw new DiscordjsTypeError(
+ ErrorCodes.InvalidType,
+ 'roles',
+ 'Role, Snowflake or Array or Collection of Roles or Snowflakes',
+ );
+ }
+
+ await this.client.rest.delete(Routes.guildMemberRole(this.guild.id, this.member.id, roleOrRoles), { reason });
+
+ const clone = this.member._clone();
+ const newRoles = this.cache.filter(role => role.id !== roleOrRoles);
+ clone._roles = [...newRoles.keys()];
+ return clone;
+ }
+ }
+
+ /**
+ * Sets the roles applied to the member.
+ * @param {Collection<Snowflake, Role>|RoleResolvable[]} roles The roles or role ids to apply
+ * @param {string} [reason] Reason for applying the roles
+ * @returns {Promise<GuildMember>}
+ * @example
+ * // Set the member's roles to a single role
+ * guildMember.roles.set(['391156570408615936'])
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Remove all the roles from a member
+ * guildMember.roles.set([])
+ * .then(member => console.log(`Member roles is now of ${member.roles.cache.size} size`))
+ * .catch(console.error);
+ */
+ set(roles, reason) {
+ return this.member.edit({ roles, reason });
+ }
+
+ clone() {
+ const clone = new this.constructor(this.member);
+ clone.member._roles = [...this.cache.keys()];
+ return clone;
+ }
+}
+
+module.exports = GuildMemberRoleManager;
diff --git a/node_modules/discord.js/src/managers/GuildMessageManager.js b/node_modules/discord.js/src/managers/GuildMessageManager.js
new file mode 100644
index 0000000..7a93c99
--- /dev/null
+++ b/node_modules/discord.js/src/managers/GuildMessageManager.js
@@ -0,0 +1,17 @@
+'use strict';
+
+const MessageManager = require('./MessageManager');
+
+/**
+ * Manages API methods for messages in a guild and holds their cache.
+ * @extends {MessageManager}
+ */
+class GuildMessageManager extends MessageManager {
+ /**
+ * The channel that the messages belong to
+ * @name GuildMessageManager#channel
+ * @type {GuildTextBasedChannel}
+ */
+}
+
+module.exports = GuildMessageManager;
diff --git a/node_modules/discord.js/src/managers/GuildScheduledEventManager.js b/node_modules/discord.js/src/managers/GuildScheduledEventManager.js
new file mode 100644
index 0000000..9071b60
--- /dev/null
+++ b/node_modules/discord.js/src/managers/GuildScheduledEventManager.js
@@ -0,0 +1,297 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { makeURLSearchParams } = require('@discordjs/rest');
+const { GuildScheduledEventEntityType, Routes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const { DiscordjsTypeError, DiscordjsError, ErrorCodes } = require('../errors');
+const { GuildScheduledEvent } = require('../structures/GuildScheduledEvent');
+const DataResolver = require('../util/DataResolver');
+
+/**
+ * Manages API methods for GuildScheduledEvents and stores their cache.
+ * @extends {CachedManager}
+ */
+class GuildScheduledEventManager extends CachedManager {
+ constructor(guild, iterable) {
+ super(guild.client, GuildScheduledEvent, iterable);
+
+ /**
+ * The guild this manager belongs to
+ * @type {Guild}
+ */
+ this.guild = guild;
+ }
+
+ /**
+ * The cache of this manager
+ * @type {Collection<Snowflake, GuildScheduledEvent>}
+ * @name GuildScheduledEventManager#cache
+ */
+
+ /**
+ * Data that resolves to give a GuildScheduledEvent object. This can be:
+ * * A Snowflake
+ * * A GuildScheduledEvent object
+ * @typedef {Snowflake|GuildScheduledEvent} GuildScheduledEventResolvable
+ */
+
+ /**
+ * Options used to create a guild scheduled event.
+ * @typedef {Object} GuildScheduledEventCreateOptions
+ * @property {string} name The name of the guild scheduled event
+ * @property {DateResolvable} scheduledStartTime The time to schedule the event at
+ * @property {DateResolvable} [scheduledEndTime] The time to end the event at
+ * <warn>This is required if `entityType` is {@link GuildScheduledEventEntityType.External}</warn>
+ * @property {GuildScheduledEventPrivacyLevel} privacyLevel The privacy level of the guild scheduled event
+ * @property {GuildScheduledEventEntityType} entityType The scheduled entity type of the event
+ * @property {string} [description] The description of the guild scheduled event
+ * @property {GuildVoiceChannelResolvable} [channel] The channel of the guild scheduled event
+ * <warn>This is required if `entityType` is {@link GuildScheduledEventEntityType.StageInstance} or
+ * {@link GuildScheduledEventEntityType.Voice}</warn>
+ * @property {GuildScheduledEventEntityMetadataOptions} [entityMetadata] The entity metadata of the
+ * guild scheduled event
+ * <warn>This is required if `entityType` is {@link GuildScheduledEventEntityType.External}</warn>
+ * @property {?(BufferResolvable|Base64Resolvable)} [image] The cover image of the guild scheduled event
+ * @property {string} [reason] The reason for creating the guild scheduled event
+ */
+
+ /**
+ * Options used to set entity metadata of a guild scheduled event.
+ * @typedef {Object} GuildScheduledEventEntityMetadataOptions
+ * @property {string} [location] The location of the guild scheduled event
+ * <warn>This is required if `entityType` is {@link GuildScheduledEventEntityType.External}</warn>
+ */
+
+ /**
+ * Creates a new guild scheduled event.
+ * @param {GuildScheduledEventCreateOptions} options Options for creating the guild scheduled event
+ * @returns {Promise<GuildScheduledEvent>}
+ */
+ async create(options) {
+ if (typeof options !== 'object') throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true);
+ let {
+ privacyLevel,
+ entityType,
+ channel,
+ name,
+ scheduledStartTime,
+ description,
+ scheduledEndTime,
+ entityMetadata,
+ reason,
+ image,
+ } = options;
+
+ let entity_metadata, channel_id;
+ if (entityType === GuildScheduledEventEntityType.External) {
+ channel_id = channel === undefined ? channel : null;
+ entity_metadata = { location: entityMetadata?.location };
+ } else {
+ channel_id = this.guild.channels.resolveId(channel);
+ if (!channel_id) throw new DiscordjsError(ErrorCodes.GuildVoiceChannelResolve);
+ entity_metadata = entityMetadata === undefined ? entityMetadata : null;
+ }
+
+ const data = await this.client.rest.post(Routes.guildScheduledEvents(this.guild.id), {
+ body: {
+ channel_id,
+ name,
+ privacy_level: privacyLevel,
+ scheduled_start_time: new Date(scheduledStartTime).toISOString(),
+ scheduled_end_time: scheduledEndTime ? new Date(scheduledEndTime).toISOString() : scheduledEndTime,
+ description,
+ entity_type: entityType,
+ entity_metadata,
+ image: image && (await DataResolver.resolveImage(image)),
+ },
+ reason,
+ });
+
+ return this._add(data);
+ }
+
+ /**
+ * Options used to fetch a single guild scheduled event from a guild.
+ * @typedef {BaseFetchOptions} FetchGuildScheduledEventOptions
+ * @property {GuildScheduledEventResolvable} guildScheduledEvent The guild scheduled event to fetch
+ * @property {boolean} [withUserCount=true] Whether to fetch the number of users subscribed to the scheduled event
+ */
+
+ /**
+ * Options used to fetch multiple guild scheduled events from a guild.
+ * @typedef {Object} FetchGuildScheduledEventsOptions
+ * @property {boolean} [cache] Whether or not to cache the fetched guild scheduled events
+ * @property {boolean} [withUserCount=true] Whether to fetch the number of users subscribed to each scheduled event
+ * should be returned
+ */
+
+ /**
+ * Obtains one or more guild scheduled events from Discord, or the guild cache if it's already available.
+ * @param {GuildScheduledEventResolvable|FetchGuildScheduledEventOptions|FetchGuildScheduledEventsOptions} [options]
+ * The id of the guild scheduled event or options
+ * @returns {Promise<GuildScheduledEvent|Collection<Snowflake, GuildScheduledEvent>>}
+ */
+ async fetch(options = {}) {
+ const id = this.resolveId(options.guildScheduledEvent ?? options);
+
+ if (id) {
+ if (!options.force) {
+ const existing = this.cache.get(id);
+ if (existing) return existing;
+ }
+
+ const data = await this.client.rest.get(Routes.guildScheduledEvent(this.guild.id, id), {
+ query: makeURLSearchParams({ with_user_count: options.withUserCount ?? true }),
+ });
+ return this._add(data, options.cache);
+ }
+
+ const data = await this.client.rest.get(Routes.guildScheduledEvents(this.guild.id), {
+ query: makeURLSearchParams({ with_user_count: options.withUserCount ?? true }),
+ });
+
+ return data.reduce(
+ (coll, rawGuildScheduledEventData) =>
+ coll.set(
+ rawGuildScheduledEventData.id,
+ this.guild.scheduledEvents._add(rawGuildScheduledEventData, options.cache),
+ ),
+ new Collection(),
+ );
+ }
+
+ /**
+ * Options used to edit a guild scheduled event.
+ * @typedef {Object} GuildScheduledEventEditOptions
+ * @property {string} [name] The name of the guild scheduled event
+ * @property {DateResolvable} [scheduledStartTime] The time to schedule the event at
+ * @property {DateResolvable} [scheduledEndTime] The time to end the event at
+ * @property {GuildScheduledEventPrivacyLevel} [privacyLevel] The privacy level of the guild scheduled event
+ * @property {GuildScheduledEventEntityType} [entityType] The scheduled entity type of the event
+ * @property {string} [description] The description of the guild scheduled event
+ * @property {?GuildVoiceChannelResolvable} [channel] The channel of the guild scheduled event
+ * @property {GuildScheduledEventStatus} [status] The status of the guild scheduled event
+ * @property {GuildScheduledEventEntityMetadataOptions} [entityMetadata] The entity metadata of the
+ * guild scheduled event
+ * <warn>This can be modified only if `entityType` of the `GuildScheduledEvent` to be edited is
+ * {@link GuildScheduledEventEntityType.External}</warn>
+ * @property {?(BufferResolvable|Base64Resolvable)} [image] The cover image of the guild scheduled event
+ * @property {string} [reason] The reason for editing the guild scheduled event
+ */
+
+ /**
+ * Edits a guild scheduled event.
+ * @param {GuildScheduledEventResolvable} guildScheduledEvent The guild scheduled event to edit
+ * @param {GuildScheduledEventEditOptions} options Options to edit the guild scheduled event
+ * @returns {Promise<GuildScheduledEvent>}
+ */
+ async edit(guildScheduledEvent, options) {
+ const guildScheduledEventId = this.resolveId(guildScheduledEvent);
+ if (!guildScheduledEventId) throw new DiscordjsError(ErrorCodes.GuildScheduledEventResolve);
+
+ if (typeof options !== 'object') throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true);
+ let {
+ privacyLevel,
+ entityType,
+ channel,
+ status,
+ name,
+ scheduledStartTime,
+ description,
+ scheduledEndTime,
+ entityMetadata,
+ reason,
+ image,
+ } = options;
+
+ let entity_metadata;
+ if (entityMetadata) {
+ entity_metadata = {
+ location: entityMetadata.location,
+ };
+ }
+
+ const data = await this.client.rest.patch(Routes.guildScheduledEvent(this.guild.id, guildScheduledEventId), {
+ body: {
+ channel_id: channel === undefined ? channel : this.guild.channels.resolveId(channel),
+ name,
+ privacy_level: privacyLevel,
+ scheduled_start_time: scheduledStartTime ? new Date(scheduledStartTime).toISOString() : undefined,
+ scheduled_end_time: scheduledEndTime ? new Date(scheduledEndTime).toISOString() : scheduledEndTime,
+ description,
+ entity_type: entityType,
+ status,
+ image: image && (await DataResolver.resolveImage(image)),
+ entity_metadata,
+ },
+ reason,
+ });
+
+ return this._add(data);
+ }
+
+ /**
+ * Deletes a guild scheduled event.
+ * @param {GuildScheduledEventResolvable} guildScheduledEvent The guild scheduled event to delete
+ * @returns {Promise<void>}
+ */
+ async delete(guildScheduledEvent) {
+ const guildScheduledEventId = this.resolveId(guildScheduledEvent);
+ if (!guildScheduledEventId) throw new DiscordjsError(ErrorCodes.GuildScheduledEventResolve);
+
+ await this.client.rest.delete(Routes.guildScheduledEvent(this.guild.id, guildScheduledEventId));
+ }
+
+ /**
+ * Options used to fetch subscribers of a guild scheduled event
+ * @typedef {Object} FetchGuildScheduledEventSubscribersOptions
+ * @property {number} [limit] The maximum numbers of users to fetch
+ * @property {boolean} [withMember] Whether to fetch guild member data of the users
+ * @property {Snowflake} [before] Consider only users before this user id
+ * @property {Snowflake} [after] Consider only users after this user id
+ * <warn>If both `before` and `after` are provided, only `before` is respected</warn>
+ */
+
+ /**
+ * Represents a subscriber of a {@link GuildScheduledEvent}
+ * @typedef {Object} GuildScheduledEventUser
+ * @property {Snowflake} guildScheduledEventId The id of the guild scheduled event which the user subscribed to
+ * @property {User} user The user that subscribed to the guild scheduled event
+ * @property {?GuildMember} member The guild member associated with the user, if any
+ */
+
+ /**
+ * Fetches subscribers of a guild scheduled event.
+ * @param {GuildScheduledEventResolvable} guildScheduledEvent The guild scheduled event to fetch subscribers of
+ * @param {FetchGuildScheduledEventSubscribersOptions} [options={}] Options for fetching the subscribers
+ * @returns {Promise<Collection<Snowflake, GuildScheduledEventUser>>}
+ */
+ async fetchSubscribers(guildScheduledEvent, options = {}) {
+ const guildScheduledEventId = this.resolveId(guildScheduledEvent);
+ if (!guildScheduledEventId) throw new DiscordjsError(ErrorCodes.GuildScheduledEventResolve);
+
+ const query = makeURLSearchParams({
+ limit: options.limit,
+ with_member: options.withMember,
+ before: options.before,
+ after: options.after,
+ });
+
+ const data = await this.client.rest.get(Routes.guildScheduledEventUsers(this.guild.id, guildScheduledEventId), {
+ query,
+ });
+
+ return data.reduce(
+ (coll, rawData) =>
+ coll.set(rawData.user.id, {
+ guildScheduledEventId: rawData.guild_scheduled_event_id,
+ user: this.client.users._add(rawData.user),
+ member: rawData.member ? this.guild.members._add({ ...rawData.member, user: rawData.user }) : null,
+ }),
+ new Collection(),
+ );
+ }
+}
+
+module.exports = GuildScheduledEventManager;
diff --git a/node_modules/discord.js/src/managers/GuildStickerManager.js b/node_modules/discord.js/src/managers/GuildStickerManager.js
new file mode 100644
index 0000000..a4974ec
--- /dev/null
+++ b/node_modules/discord.js/src/managers/GuildStickerManager.js
@@ -0,0 +1,182 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { Routes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+const MessagePayload = require('../structures/MessagePayload');
+const { Sticker } = require('../structures/Sticker');
+
+/**
+ * Manages API methods for Guild Stickers and stores their cache.
+ * @extends {CachedManager}
+ */
+class GuildStickerManager extends CachedManager {
+ constructor(guild, iterable) {
+ super(guild.client, Sticker, iterable);
+
+ /**
+ * The guild this manager belongs to
+ * @type {Guild}
+ */
+ this.guild = guild;
+ }
+
+ /**
+ * The cache of Guild Stickers
+ * @type {Collection<Snowflake, Sticker>}
+ * @name GuildStickerManager#cache
+ */
+
+ _add(data, cache) {
+ return super._add(data, cache, { extras: [this.guild] });
+ }
+
+ /**
+ * Options used to create a guild sticker.
+ * @typedef {Object} GuildStickerCreateOptions
+ * @property {AttachmentPayload|BufferResolvable|Stream} file The file for the sticker
+ * @property {string} name The name for the sticker
+ * @property {string} tags The Discord name of a unicode emoji representing the sticker's expression
+ * @property {?string} [description] The description for the sticker
+ * @property {string} [reason] Reason for creating the sticker
+ */
+
+ /**
+ * Creates a new custom sticker in the guild.
+ * @param {GuildStickerCreateOptions} options Options for creating a guild sticker
+ * @returns {Promise<Sticker>} The created sticker
+ * @example
+ * // Create a new sticker from a URL
+ * guild.stickers.create({ file: 'https://i.imgur.com/w3duR07.png', name: 'rip', tags: 'headstone' })
+ * .then(sticker => console.log(`Created new sticker with name ${sticker.name}!`))
+ * .catch(console.error);
+ * @example
+ * // Create a new sticker from a file on your computer
+ * guild.stickers.create({ file: './memes/banana.png', name: 'banana', tags: 'banana' })
+ * .then(sticker => console.log(`Created new sticker with name ${sticker.name}!`))
+ * .catch(console.error);
+ */
+ async create({ file, name, tags, description, reason } = {}) {
+ const resolvedFile = await MessagePayload.resolveFile(file);
+ if (!resolvedFile) throw new DiscordjsTypeError(ErrorCodes.ReqResourceType);
+ file = { ...resolvedFile, key: 'file' };
+
+ const body = { name, tags, description: description ?? '' };
+
+ const sticker = await this.client.rest.post(Routes.guildStickers(this.guild.id), {
+ appendToFormData: true,
+ body,
+ files: [file],
+ reason,
+ });
+ return this.client.actions.GuildStickerCreate.handle(this.guild, sticker).sticker;
+ }
+
+ /**
+ * Data that resolves to give a Sticker object. This can be:
+ * * A Sticker object
+ * * A Snowflake
+ * @typedef {Sticker|Snowflake} StickerResolvable
+ */
+
+ /**
+ * Resolves a StickerResolvable to a Sticker object.
+ * @method resolve
+ * @memberof GuildStickerManager
+ * @instance
+ * @param {StickerResolvable} sticker The Sticker resolvable to identify
+ * @returns {?Sticker}
+ */
+
+ /**
+ * Resolves a StickerResolvable to a Sticker id string.
+ * @method resolveId
+ * @memberof GuildStickerManager
+ * @instance
+ * @param {StickerResolvable} sticker The Sticker resolvable to identify
+ * @returns {?Snowflake}
+ */
+
+ /**
+ * Edits a sticker.
+ * @param {StickerResolvable} sticker The sticker to edit
+ * @param {GuildStickerEditOptions} [options={}] The new data for the sticker
+ * @returns {Promise<Sticker>}
+ */
+ async edit(sticker, options = {}) {
+ const stickerId = this.resolveId(sticker);
+ if (!stickerId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'sticker', 'StickerResolvable');
+
+ const d = await this.client.rest.patch(Routes.guildSticker(this.guild.id, stickerId), {
+ body: options,
+ reason: options.reason,
+ });
+
+ const existing = this.cache.get(stickerId);
+ if (existing) {
+ const clone = existing._clone();
+ clone._patch(d);
+ return clone;
+ }
+ return this._add(d);
+ }
+
+ /**
+ * Deletes a sticker.
+ * @param {StickerResolvable} sticker The sticker to delete
+ * @param {string} [reason] Reason for deleting this sticker
+ * @returns {Promise<void>}
+ */
+ async delete(sticker, reason) {
+ sticker = this.resolveId(sticker);
+ if (!sticker) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'sticker', 'StickerResolvable');
+
+ await this.client.rest.delete(Routes.guildSticker(this.guild.id, sticker), { reason });
+ }
+
+ /**
+ * Obtains one or more stickers from Discord, or the sticker cache if they're already available.
+ * @param {Snowflake} [id] The Sticker's id
+ * @param {BaseFetchOptions} [options] Additional options for this fetch
+ * @returns {Promise<Sticker|Collection<Snowflake, Sticker>>}
+ * @example
+ * // Fetch all stickers from the guild
+ * message.guild.stickers.fetch()
+ * .then(stickers => console.log(`There are ${stickers.size} stickers.`))
+ * .catch(console.error);
+ * @example
+ * // Fetch a single sticker
+ * message.guild.stickers.fetch('222078108977594368')
+ * .then(sticker => console.log(`The sticker name is: ${sticker.name}`))
+ * .catch(console.error);
+ */
+ async fetch(id, { cache = true, force = false } = {}) {
+ if (id) {
+ if (!force) {
+ const existing = this.cache.get(id);
+ if (existing) return existing;
+ }
+ const sticker = await this.client.rest.get(Routes.guildSticker(this.guild.id, id));
+ return this._add(sticker, cache);
+ }
+
+ const data = await this.client.rest.get(Routes.guildStickers(this.guild.id));
+ return new Collection(data.map(sticker => [sticker.id, this._add(sticker, cache)]));
+ }
+
+ /**
+ * Fetches the user who uploaded this sticker, if this is a guild sticker.
+ * @param {StickerResolvable} sticker The sticker to fetch the user for
+ * @returns {Promise<?User>}
+ */
+ async fetchUser(sticker) {
+ sticker = this.resolve(sticker);
+ if (!sticker) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'sticker', 'StickerResolvable');
+ const data = await this.client.rest.get(Routes.guildSticker(this.guild.id, sticker.id));
+ sticker._patch(data);
+ return sticker.user;
+ }
+}
+
+module.exports = GuildStickerManager;
diff --git a/node_modules/discord.js/src/managers/GuildTextThreadManager.js b/node_modules/discord.js/src/managers/GuildTextThreadManager.js
new file mode 100644
index 0000000..5591845
--- /dev/null
+++ b/node_modules/discord.js/src/managers/GuildTextThreadManager.js
@@ -0,0 +1,91 @@
+'use strict';
+
+const { ChannelType, Routes } = require('discord-api-types/v10');
+const ThreadManager = require('./ThreadManager');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+
+/**
+ * Manages API methods for {@link ThreadChannel} objects and stores their cache.
+ * @extends {ThreadManager}
+ */
+class GuildTextThreadManager extends ThreadManager {
+ /**
+ * The channel this Manager belongs to
+ * @name GuildTextThreadManager#channel
+ * @type {TextChannel|NewsChannel}
+ */
+
+ /**
+ * Options for creating a thread. <warn>Only one of `startMessage` or `type` can be defined.</warn>
+ * @typedef {StartThreadOptions} ThreadCreateOptions
+ * @property {MessageResolvable} [startMessage] The message to start a thread from.
+ * <warn>If this is defined, then the `type` of thread gets inferred automatically and cannot be changed.</warn>
+ * @property {ThreadChannelTypes} [type] The type of thread to create.
+ * Defaults to {@link ChannelType.PublicThread} if created in a {@link TextChannel}
+ * <warn>When creating threads in a {@link NewsChannel}, this is ignored and is always
+ * {@link ChannelType.AnnouncementThread}</warn>
+ * @property {boolean} [invitable] Whether non-moderators can add other non-moderators to the thread
+ * <info>Can only be set when type will be {@link ChannelType.PrivateThread}</info>
+ */
+
+ /**
+ * Creates a new thread in the channel.
+ * @param {ThreadCreateOptions} [options] Options to create a new thread
+ * @returns {Promise<ThreadChannel>}
+ * @example
+ * // Create a new public thread
+ * channel.threads
+ * .create({
+ * name: 'food-talk',
+ * autoArchiveDuration: ThreadAutoArchiveDuration.OneHour,
+ * reason: 'Needed a separate thread for food',
+ * })
+ * .then(threadChannel => console.log(threadChannel))
+ * .catch(console.error);
+ * @example
+ * // Create a new private thread
+ * channel.threads
+ * .create({
+ * name: 'mod-talk',
+ * autoArchiveDuration: ThreadAutoArchiveDuration.OneHour,
+ * type: ChannelType.PrivateThread,
+ * reason: 'Needed a separate thread for moderation',
+ * })
+ * .then(threadChannel => console.log(threadChannel))
+ * .catch(console.error);
+ */
+ async create({
+ name,
+ autoArchiveDuration = this.channel.defaultAutoArchiveDuration,
+ startMessage,
+ type,
+ invitable,
+ reason,
+ rateLimitPerUser,
+ } = {}) {
+ let resolvedType =
+ this.channel.type === ChannelType.GuildAnnouncement ? ChannelType.AnnouncementThread : ChannelType.PublicThread;
+ let startMessageId;
+ if (startMessage) {
+ startMessageId = this.channel.messages.resolveId(startMessage);
+ if (!startMessageId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'startMessage', 'MessageResolvable');
+ } else if (this.channel.type !== ChannelType.GuildAnnouncement) {
+ resolvedType = type ?? resolvedType;
+ }
+
+ const data = await this.client.rest.post(Routes.threads(this.channel.id, startMessageId), {
+ body: {
+ name,
+ auto_archive_duration: autoArchiveDuration,
+ type: resolvedType,
+ invitable: resolvedType === ChannelType.PrivateThread ? invitable : undefined,
+ rate_limit_per_user: rateLimitPerUser,
+ },
+ reason,
+ });
+
+ return this.client.actions.ThreadCreate.handle(data).thread;
+ }
+}
+
+module.exports = GuildTextThreadManager;
diff --git a/node_modules/discord.js/src/managers/MessageManager.js b/node_modules/discord.js/src/managers/MessageManager.js
new file mode 100644
index 0000000..6fb95eb
--- /dev/null
+++ b/node_modules/discord.js/src/managers/MessageManager.js
@@ -0,0 +1,263 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { makeURLSearchParams } = require('@discordjs/rest');
+const { Routes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+const { Message } = require('../structures/Message');
+const MessagePayload = require('../structures/MessagePayload');
+const { MakeCacheOverrideSymbol } = require('../util/Symbols');
+const { resolvePartialEmoji } = require('../util/Util');
+
+/**
+ * Manages API methods for Messages and holds their cache.
+ * @extends {CachedManager}
+ * @abstract
+ */
+class MessageManager extends CachedManager {
+ static [MakeCacheOverrideSymbol] = MessageManager;
+
+ constructor(channel, iterable) {
+ super(channel.client, Message, iterable);
+
+ /**
+ * The channel that the messages belong to
+ * @type {TextBasedChannels}
+ */
+ this.channel = channel;
+ }
+
+ /**
+ * The cache of Messages
+ * @type {Collection<Snowflake, Message>}
+ * @name MessageManager#cache
+ */
+
+ _add(data, cache) {
+ return super._add(data, cache);
+ }
+
+ /**
+ * Data that can be resolved to a Message object. This can be:
+ * * A Message
+ * * A Snowflake
+ * @typedef {Message|Snowflake} MessageResolvable
+ */
+
+ /**
+ * Options used to fetch a message.
+ * @typedef {BaseFetchOptions} FetchMessageOptions
+ * @property {MessageResolvable} message The message to fetch
+ */
+
+ /**
+ * Options used to fetch multiple messages.
+ * <info>The `before`, `after`, and `around` parameters are mutually exclusive.</info>
+ * @typedef {Object} FetchMessagesOptions
+ * @property {number} [limit] The maximum number of messages to return
+ * @property {Snowflake} [before] Consider only messages before this id
+ * @property {Snowflake} [after] Consider only messages after this id
+ * @property {Snowflake} [around] Consider only messages around this id
+ * @property {boolean} [cache] Whether to cache the fetched messages
+ */
+
+ /**
+ * Fetches message(s) from a channel.
+ * <info>The returned Collection does not contain reaction users of the messages if they were not cached.
+ * Those need to be fetched separately in such a case.</info>
+ * @param {MessageResolvable|FetchMessageOptions|FetchMessagesOptions} [options] Options for fetching message(s)
+ * @returns {Promise<Message|Collection<Snowflake, Message>>}
+ * @example
+ * // Fetch a message
+ * channel.messages.fetch('99539446449315840')
+ * .then(message => console.log(message.content))
+ * .catch(console.error);
+ * @example
+ * // Fetch a maximum of 10 messages without caching
+ * channel.messages.fetch({ limit: 10, cache: false })
+ * .then(messages => console.log(`Received ${messages.size} messages`))
+ * .catch(console.error);
+ * @example
+ * // Fetch a maximum of 10 messages without caching around a message id
+ * channel.messages.fetch({ limit: 10, cache: false, around: '99539446449315840' })
+ * .then(messages => console.log(`Received ${messages.size} messages`))
+ * .catch(console.error);
+ * @example
+ * // Fetch messages and filter by a user id
+ * channel.messages.fetch()
+ * .then(messages => console.log(`${messages.filter(m => m.author.id === '84484653687267328').size} messages`))
+ * .catch(console.error);
+ */
+ fetch(options) {
+ if (!options) return this._fetchMany();
+ const { message, cache, force } = options;
+ const resolvedMessage = this.resolveId(message ?? options);
+ if (resolvedMessage) return this._fetchSingle({ message: resolvedMessage, cache, force });
+ return this._fetchMany(options);
+ }
+
+ async _fetchSingle({ message, cache, force = false }) {
+ if (!force) {
+ const existing = this.cache.get(message);
+ if (existing && !existing.partial) return existing;
+ }
+
+ const data = await this.client.rest.get(Routes.channelMessage(this.channel.id, message));
+ return this._add(data, cache);
+ }
+
+ async _fetchMany(options = {}) {
+ const data = await this.client.rest.get(Routes.channelMessages(this.channel.id), {
+ query: makeURLSearchParams(options),
+ });
+
+ return data.reduce((_data, message) => _data.set(message.id, this._add(message, options.cache)), new Collection());
+ }
+
+ /**
+ * Fetches the pinned messages of this channel and returns a collection of them.
+ * <info>The returned Collection does not contain any reaction data of the messages.
+ * Those need to be fetched separately.</info>
+ * @param {boolean} [cache=true] Whether to cache the message(s)
+ * @returns {Promise<Collection<Snowflake, Message>>}
+ * @example
+ * // Get pinned messages
+ * channel.messages.fetchPinned()
+ * .then(messages => console.log(`Received ${messages.size} messages`))
+ * .catch(console.error);
+ */
+ async fetchPinned(cache = true) {
+ const data = await this.client.rest.get(Routes.channelPins(this.channel.id));
+ const messages = new Collection();
+ for (const message of data) messages.set(message.id, this._add(message, cache));
+ return messages;
+ }
+
+ /**
+ * Resolves a {@link MessageResolvable} to a {@link Message} object.
+ * @method resolve
+ * @memberof MessageManager
+ * @instance
+ * @param {MessageResolvable} message The message resolvable to resolve
+ * @returns {?Message}
+ */
+
+ /**
+ * Resolves a {@link MessageResolvable} to a {@link Message} id.
+ * @method resolveId
+ * @memberof MessageManager
+ * @instance
+ * @param {MessageResolvable} message The message resolvable to resolve
+ * @returns {?Snowflake}
+ */
+
+ /**
+ * Options that can be passed to edit a message.
+ * @typedef {BaseMessageOptions} MessageEditOptions
+ * @property {AttachmentPayload[]} [attachments] An array of attachments to keep,
+ * all attachments will be kept if omitted
+ * @property {MessageFlags} [flags] Which flags to set for the message
+ * <info>Only the {@link MessageFlags.SuppressEmbeds} flag can be modified.</info>
+ */
+
+ /**
+ * Edits a message, even if it's not cached.
+ * @param {MessageResolvable} message The message to edit
+ * @param {string|MessageEditOptions|MessagePayload} options The options to edit the message
+ * @returns {Promise<Message>}
+ */
+ async edit(message, options) {
+ const messageId = this.resolveId(message);
+ if (!messageId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'message', 'MessageResolvable');
+
+ const { body, files } = await (options instanceof MessagePayload
+ ? options
+ : MessagePayload.create(message instanceof Message ? message : this, options)
+ )
+ .resolveBody()
+ .resolveFiles();
+ const d = await this.client.rest.patch(Routes.channelMessage(this.channel.id, messageId), { body, files });
+
+ const existing = this.cache.get(messageId);
+ if (existing) {
+ const clone = existing._clone();
+ clone._patch(d);
+ return clone;
+ }
+ return this._add(d);
+ }
+
+ /**
+ * Publishes a message in an announcement channel to all channels following it, even if it's not cached.
+ * @param {MessageResolvable} message The message to publish
+ * @returns {Promise<Message>}
+ */
+ async crosspost(message) {
+ message = this.resolveId(message);
+ if (!message) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'message', 'MessageResolvable');
+
+ const data = await this.client.rest.post(Routes.channelMessageCrosspost(this.channel.id, message));
+ return this.cache.get(data.id) ?? this._add(data);
+ }
+
+ /**
+ * Pins a message to the channel's pinned messages, even if it's not cached.
+ * @param {MessageResolvable} message The message to pin
+ * @param {string} [reason] Reason for pinning
+ * @returns {Promise<void>}
+ */
+ async pin(message, reason) {
+ message = this.resolveId(message);
+ if (!message) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'message', 'MessageResolvable');
+
+ await this.client.rest.put(Routes.channelPin(this.channel.id, message), { reason });
+ }
+
+ /**
+ * Unpins a message from the channel's pinned messages, even if it's not cached.
+ * @param {MessageResolvable} message The message to unpin
+ * @param {string} [reason] Reason for unpinning
+ * @returns {Promise<void>}
+ */
+ async unpin(message, reason) {
+ message = this.resolveId(message);
+ if (!message) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'message', 'MessageResolvable');
+
+ await this.client.rest.delete(Routes.channelPin(this.channel.id, message), { reason });
+ }
+
+ /**
+ * Adds a reaction to a message, even if it's not cached.
+ * @param {MessageResolvable} message The message to react to
+ * @param {EmojiIdentifierResolvable} emoji The emoji to react with
+ * @returns {Promise<void>}
+ */
+ async react(message, emoji) {
+ message = this.resolveId(message);
+ if (!message) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'message', 'MessageResolvable');
+
+ emoji = resolvePartialEmoji(emoji);
+ if (!emoji) throw new DiscordjsTypeError(ErrorCodes.EmojiType, 'emoji', 'EmojiIdentifierResolvable');
+
+ const emojiId = emoji.id
+ ? `${emoji.animated ? 'a:' : ''}${emoji.name}:${emoji.id}`
+ : encodeURIComponent(emoji.name);
+
+ await this.client.rest.put(Routes.channelMessageOwnReaction(this.channel.id, message, emojiId));
+ }
+
+ /**
+ * Deletes a message, even if it's not cached.
+ * @param {MessageResolvable} message The message to delete
+ * @returns {Promise<void>}
+ */
+ async delete(message) {
+ message = this.resolveId(message);
+ if (!message) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'message', 'MessageResolvable');
+
+ await this.client.rest.delete(Routes.channelMessage(this.channel.id, message));
+ }
+}
+
+module.exports = MessageManager;
diff --git a/node_modules/discord.js/src/managers/PermissionOverwriteManager.js b/node_modules/discord.js/src/managers/PermissionOverwriteManager.js
new file mode 100644
index 0000000..011a649
--- /dev/null
+++ b/node_modules/discord.js/src/managers/PermissionOverwriteManager.js
@@ -0,0 +1,168 @@
+'use strict';
+
+const process = require('node:process');
+const { Collection } = require('@discordjs/collection');
+const { OverwriteType, Routes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+const PermissionOverwrites = require('../structures/PermissionOverwrites');
+const { Role } = require('../structures/Role');
+
+let cacheWarningEmitted = false;
+
+/**
+ * Manages API methods for guild channel permission overwrites and stores their cache.
+ * @extends {CachedManager}
+ */
+class PermissionOverwriteManager extends CachedManager {
+ constructor(channel, iterable) {
+ super(channel.client, PermissionOverwrites);
+ if (!cacheWarningEmitted && this._cache.constructor.name !== 'Collection') {
+ cacheWarningEmitted = true;
+ process.emitWarning(
+ `Overriding the cache handling for ${this.constructor.name} is unsupported and breaks functionality.`,
+ 'UnsupportedCacheOverwriteWarning',
+ );
+ }
+
+ /**
+ * The channel of the permission overwrite this manager belongs to
+ * @type {GuildChannel}
+ */
+ this.channel = channel;
+
+ if (iterable) {
+ for (const item of iterable) {
+ this._add(item);
+ }
+ }
+ }
+
+ /**
+ * The cache of this Manager
+ * @type {Collection<Snowflake, PermissionOverwrites>}
+ * @name PermissionOverwriteManager#cache
+ */
+
+ _add(data, cache) {
+ return super._add(data, cache, { extras: [this.channel] });
+ }
+
+ /**
+ * Replaces the permission overwrites in this channel.
+ * @param {OverwriteResolvable[]|Collection<Snowflake, OverwriteResolvable>} overwrites
+ * Permission overwrites the channel gets updated with
+ * @param {string} [reason] Reason for updating the channel overwrites
+ * @returns {Promise<GuildChannel>}
+ * @example
+ * message.channel.permissionOverwrites.set([
+ * {
+ * id: message.author.id,
+ * deny: [PermissionsFlagsBit.ViewChannel],
+ * },
+ * ], 'Needed to change permissions');
+ */
+ set(overwrites, reason) {
+ if (!Array.isArray(overwrites) && !(overwrites instanceof Collection)) {
+ return Promise.reject(
+ new DiscordjsTypeError(
+ ErrorCodes.InvalidType,
+ 'overwrites',
+ 'Array or Collection of Permission Overwrites',
+ true,
+ ),
+ );
+ }
+ return this.channel.edit({ permissionOverwrites: overwrites, reason });
+ }
+
+ /**
+ * Extra information about the overwrite.
+ * @typedef {Object} GuildChannelOverwriteOptions
+ * @property {string} [reason] The reason for creating/editing this overwrite
+ * @property {OverwriteType} [type] The type of overwrite. Use this to bypass automatic resolution of `type`
+ * that results in an error for an uncached structure
+ */
+
+ /**
+ * Creates or edits permission overwrites for a user or role in this channel.
+ * @param {RoleResolvable|UserResolvable} userOrRole The user or role to update
+ * @param {PermissionOverwriteOptions} options The options for the update
+ * @param {GuildChannelOverwriteOptions} [overwriteOptions] The extra information for the update
+ * @param {PermissionOverwrites} [existing] The existing overwrites to merge with this update
+ * @returns {Promise<GuildChannel>}
+ * @private
+ */
+ async upsert(userOrRole, options, overwriteOptions = {}, existing) {
+ let userOrRoleId = this.channel.guild.roles.resolveId(userOrRole) ?? this.client.users.resolveId(userOrRole);
+ let { type, reason } = overwriteOptions;
+ if (typeof type !== 'number') {
+ userOrRole = this.channel.guild.roles.resolve(userOrRole) ?? this.client.users.resolve(userOrRole);
+ if (!userOrRole) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'parameter', 'User nor a Role');
+ type = userOrRole instanceof Role ? OverwriteType.Role : OverwriteType.Member;
+ }
+
+ const { allow, deny } = PermissionOverwrites.resolveOverwriteOptions(options, existing);
+
+ await this.client.rest.put(Routes.channelPermission(this.channel.id, userOrRoleId), {
+ body: { id: userOrRoleId, type, allow, deny },
+ reason,
+ });
+ return this.channel;
+ }
+
+ /**
+ * Creates permission overwrites for a user or role in this channel, or replaces them if already present.
+ * @param {RoleResolvable|UserResolvable} userOrRole The user or role to update
+ * @param {PermissionOverwriteOptions} options The options for the update
+ * @param {GuildChannelOverwriteOptions} [overwriteOptions] The extra information for the update
+ * @returns {Promise<GuildChannel>}
+ * @example
+ * // Create or Replace permission overwrites for a message author
+ * message.channel.permissionOverwrites.create(message.author, {
+ * SendMessages: false
+ * })
+ * .then(channel => console.log(channel.permissionOverwrites.cache.get(message.author.id)))
+ * .catch(console.error);
+ */
+ create(userOrRole, options, overwriteOptions) {
+ return this.upsert(userOrRole, options, overwriteOptions);
+ }
+
+ /**
+ * Edits permission overwrites for a user or role in this channel, or creates an entry if not already present.
+ * @param {RoleResolvable|UserResolvable} userOrRole The user or role to update
+ * @param {PermissionOverwriteOptions} options The options for the update
+ * @param {GuildChannelOverwriteOptions} [overwriteOptions] The extra information for the update
+ * @returns {Promise<GuildChannel>}
+ * @example
+ * // Edit or Create permission overwrites for a message author
+ * message.channel.permissionOverwrites.edit(message.author, {
+ * SendMessages: false
+ * })
+ * .then(channel => console.log(channel.permissionOverwrites.cache.get(message.author.id)))
+ * .catch(console.error);
+ */
+ edit(userOrRole, options, overwriteOptions) {
+ const existing = this.cache.get(
+ this.channel.guild.roles.resolveId(userOrRole) ?? this.client.users.resolveId(userOrRole),
+ );
+ return this.upsert(userOrRole, options, overwriteOptions, existing);
+ }
+
+ /**
+ * Deletes permission overwrites for a user or role in this channel.
+ * @param {UserResolvable|RoleResolvable} userOrRole The user or role to delete
+ * @param {string} [reason] The reason for deleting the overwrite
+ * @returns {Promise<GuildChannel>}
+ */
+ async delete(userOrRole, reason) {
+ const userOrRoleId = this.channel.guild.roles.resolveId(userOrRole) ?? this.client.users.resolveId(userOrRole);
+ if (!userOrRoleId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'parameter', 'User nor a Role');
+
+ await this.client.rest.delete(Routes.channelPermission(this.channel.id, userOrRoleId), { reason });
+ return this.channel;
+ }
+}
+
+module.exports = PermissionOverwriteManager;
diff --git a/node_modules/discord.js/src/managers/PresenceManager.js b/node_modules/discord.js/src/managers/PresenceManager.js
new file mode 100644
index 0000000..2d64834
--- /dev/null
+++ b/node_modules/discord.js/src/managers/PresenceManager.js
@@ -0,0 +1,58 @@
+'use strict';
+
+const CachedManager = require('./CachedManager');
+const { Presence } = require('../structures/Presence');
+
+/**
+ * Manages API methods for Presences and holds their cache.
+ * @extends {CachedManager}
+ */
+class PresenceManager extends CachedManager {
+ constructor(client, iterable) {
+ super(client, Presence, iterable);
+ }
+
+ /**
+ * The cache of Presences
+ * @type {Collection<Snowflake, Presence>}
+ * @name PresenceManager#cache
+ */
+
+ _add(data, cache) {
+ return super._add(data, cache, { id: data.user.id });
+ }
+
+ /**
+ * Data that can be resolved to a Presence object. This can be:
+ * * A Presence
+ * * A UserResolvable
+ * * A Snowflake
+ * @typedef {Presence|UserResolvable|Snowflake} PresenceResolvable
+ */
+
+ /**
+ * Resolves a {@link PresenceResolvable} to a {@link Presence} object.
+ * @param {PresenceResolvable} presence The presence resolvable to resolve
+ * @returns {?Presence}
+ */
+ resolve(presence) {
+ const presenceResolvable = super.resolve(presence);
+ if (presenceResolvable) return presenceResolvable;
+ const UserResolvable = this.client.users.resolveId(presence);
+ return super.resolve(UserResolvable);
+ }
+
+ /**
+ * Resolves a {@link PresenceResolvable} to a {@link Presence} id.
+ * @param {PresenceResolvable} presence The presence resolvable to resolve
+ * @returns {?Snowflake}
+ */
+ resolveId(presence) {
+ const presenceResolvable = super.resolveId(presence);
+ if (presenceResolvable) return presenceResolvable;
+ const userResolvable = this.client.users.resolveId(presence);
+ return this.cache.has(userResolvable) ? userResolvable : null;
+ }
+}
+
+module.exports = PresenceManager;
diff --git a/node_modules/discord.js/src/managers/ReactionManager.js b/node_modules/discord.js/src/managers/ReactionManager.js
new file mode 100644
index 0000000..5535882
--- /dev/null
+++ b/node_modules/discord.js/src/managers/ReactionManager.js
@@ -0,0 +1,68 @@
+'use strict';
+
+const { Routes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const MessageReaction = require('../structures/MessageReaction');
+
+/**
+ * Manages API methods for reactions and holds their cache.
+ * @extends {CachedManager}
+ */
+class ReactionManager extends CachedManager {
+ constructor(message, iterable) {
+ super(message.client, MessageReaction, iterable);
+
+ /**
+ * The message that this manager belongs to
+ * @type {Message}
+ */
+ this.message = message;
+ }
+
+ _add(data, cache) {
+ return super._add(data, cache, { id: data.emoji.id ?? data.emoji.name, extras: [this.message] });
+ }
+
+ /**
+ * The reaction cache of this manager
+ * @type {Collection<string|Snowflake, MessageReaction>}
+ * @name ReactionManager#cache
+ */
+
+ /**
+ * Data that can be resolved to a MessageReaction object. This can be:
+ * * A MessageReaction
+ * * A Snowflake
+ * * The Unicode representation of an emoji
+ * @typedef {MessageReaction|Snowflake} MessageReactionResolvable
+ */
+
+ /**
+ * Resolves a {@link MessageReactionResolvable} to a {@link MessageReaction} object.
+ * @method resolve
+ * @memberof ReactionManager
+ * @instance
+ * @param {MessageReactionResolvable} reaction The MessageReaction to resolve
+ * @returns {?MessageReaction}
+ */
+
+ /**
+ * Resolves a {@link MessageReactionResolvable} to a {@link MessageReaction} id.
+ * @method resolveId
+ * @memberof ReactionManager
+ * @instance
+ * @param {MessageReactionResolvable} reaction The MessageReaction to resolve
+ * @returns {?Snowflake}
+ */
+
+ /**
+ * Removes all reactions from a message.
+ * @returns {Promise<Message>}
+ */
+ async removeAll() {
+ await this.client.rest.delete(Routes.channelMessageAllReactions(this.message.channelId, this.message.id));
+ return this.message;
+ }
+}
+
+module.exports = ReactionManager;
diff --git a/node_modules/discord.js/src/managers/ReactionUserManager.js b/node_modules/discord.js/src/managers/ReactionUserManager.js
new file mode 100644
index 0000000..014cea8
--- /dev/null
+++ b/node_modules/discord.js/src/managers/ReactionUserManager.js
@@ -0,0 +1,77 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { makeURLSearchParams } = require('@discordjs/rest');
+const { Routes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+const User = require('../structures/User');
+
+/**
+ * Manages API methods for users who reacted to a reaction and stores their cache.
+ * @extends {CachedManager}
+ */
+class ReactionUserManager extends CachedManager {
+ constructor(reaction, iterable) {
+ super(reaction.client, User, iterable);
+
+ /**
+ * The reaction that this manager belongs to
+ * @type {MessageReaction}
+ */
+ this.reaction = reaction;
+ }
+
+ /**
+ * The cache of this manager
+ * @type {Collection<Snowflake, User>}
+ * @name ReactionUserManager#cache
+ */
+
+ /**
+ * Options used to fetch users who gave a reaction.
+ * @typedef {Object} FetchReactionUsersOptions
+ * @property {number} [limit=100] The maximum amount of users to fetch, defaults to `100`
+ * @property {Snowflake} [after] Limit fetching users to those with an id greater than the supplied id
+ */
+
+ /**
+ * Fetches all the users that gave this reaction. Resolves with a collection of users, mapped by their ids.
+ * @param {FetchReactionUsersOptions} [options] Options for fetching the users
+ * @returns {Promise<Collection<Snowflake, User>>}
+ */
+ async fetch({ limit = 100, after } = {}) {
+ const message = this.reaction.message;
+ const query = makeURLSearchParams({ limit, after });
+ const data = await this.client.rest.get(
+ Routes.channelMessageReaction(message.channelId, message.id, this.reaction.emoji.identifier),
+ { query },
+ );
+ const users = new Collection();
+ for (const rawUser of data) {
+ const user = this.client.users._add(rawUser);
+ this.cache.set(user.id, user);
+ users.set(user.id, user);
+ }
+ return users;
+ }
+
+ /**
+ * Removes a user from this reaction.
+ * @param {UserResolvable} [user=this.client.user] The user to remove the reaction of
+ * @returns {Promise<MessageReaction>}
+ */
+ async remove(user = this.client.user) {
+ const userId = this.client.users.resolveId(user);
+ if (!userId) throw new DiscordjsError(ErrorCodes.ReactionResolveUser);
+ const message = this.reaction.message;
+ const route =
+ userId === this.client.user.id
+ ? Routes.channelMessageOwnReaction(message.channelId, message.id, this.reaction.emoji.identifier)
+ : Routes.channelMessageUserReaction(message.channelId, message.id, this.reaction.emoji.identifier, userId);
+ await this.client.rest.delete(route);
+ return this.reaction;
+ }
+}
+
+module.exports = ReactionUserManager;
diff --git a/node_modules/discord.js/src/managers/RoleManager.js b/node_modules/discord.js/src/managers/RoleManager.js
new file mode 100644
index 0000000..e0c4ed7
--- /dev/null
+++ b/node_modules/discord.js/src/managers/RoleManager.js
@@ -0,0 +1,360 @@
+'use strict';
+
+const process = require('node:process');
+const { Collection } = require('@discordjs/collection');
+const { Routes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+const { Role } = require('../structures/Role');
+const DataResolver = require('../util/DataResolver');
+const PermissionsBitField = require('../util/PermissionsBitField');
+const { setPosition, resolveColor } = require('../util/Util');
+
+let cacheWarningEmitted = false;
+
+/**
+ * Manages API methods for roles and stores their cache.
+ * @extends {CachedManager}
+ */
+class RoleManager extends CachedManager {
+ constructor(guild, iterable) {
+ super(guild.client, Role, iterable);
+ if (!cacheWarningEmitted && this._cache.constructor.name !== 'Collection') {
+ cacheWarningEmitted = true;
+ process.emitWarning(
+ `Overriding the cache handling for ${this.constructor.name} is unsupported and breaks functionality.`,
+ 'UnsupportedCacheOverwriteWarning',
+ );
+ }
+
+ /**
+ * The guild belonging to this manager
+ * @type {Guild}
+ */
+ this.guild = guild;
+ }
+
+ /**
+ * The role cache of this manager
+ * @type {Collection<Snowflake, Role>}
+ * @name RoleManager#cache
+ */
+
+ _add(data, cache) {
+ return super._add(data, cache, { extras: [this.guild] });
+ }
+
+ /**
+ * Obtains a role from Discord, or the role cache if they're already available.
+ * @param {Snowflake} [id] The role's id
+ * @param {BaseFetchOptions} [options] Additional options for this fetch
+ * @returns {Promise<?Role|Collection<Snowflake, Role>>}
+ * @example
+ * // Fetch all roles from the guild
+ * message.guild.roles.fetch()
+ * .then(roles => console.log(`There are ${roles.size} roles.`))
+ * .catch(console.error);
+ * @example
+ * // Fetch a single role
+ * message.guild.roles.fetch('222078108977594368')
+ * .then(role => console.log(`The role color is: ${role.color}`))
+ * .catch(console.error);
+ */
+ async fetch(id, { cache = true, force = false } = {}) {
+ if (id && !force) {
+ const existing = this.cache.get(id);
+ if (existing) return existing;
+ }
+
+ // We cannot fetch a single role, as of this commit's date, Discord API throws with 405
+ const data = await this.client.rest.get(Routes.guildRoles(this.guild.id));
+ const roles = new Collection();
+ for (const role of data) roles.set(role.id, this._add(role, cache));
+ return id ? roles.get(id) ?? null : roles;
+ }
+
+ /**
+ * Data that can be resolved to a Role object. This can be:
+ * * A Role
+ * * A Snowflake
+ * @typedef {Role|Snowflake} RoleResolvable
+ */
+
+ /**
+ * Resolves a {@link RoleResolvable} to a {@link Role} object.
+ * @method resolve
+ * @memberof RoleManager
+ * @instance
+ * @param {RoleResolvable} role The role resolvable to resolve
+ * @returns {?Role}
+ */
+
+ /**
+ * Resolves a {@link RoleResolvable} to a {@link Role} id.
+ * @method resolveId
+ * @memberof RoleManager
+ * @instance
+ * @param {RoleResolvable} role The role resolvable to resolve
+ * @returns {?Snowflake}
+ */
+
+ /**
+ * Options used to create a new role.
+ * @typedef {Object} RoleCreateOptions
+ * @property {string} [name] The name of the new role
+ * @property {ColorResolvable} [color] The data to create the role with
+ * @property {boolean} [hoist] Whether or not the new role should be hoisted
+ * @property {PermissionResolvable} [permissions] The permissions for the new role
+ * @property {number} [position] The position of the new role
+ * @property {boolean} [mentionable] Whether or not the new role should be mentionable
+ * @property {?(BufferResolvable|Base64Resolvable|EmojiResolvable)} [icon] The icon for the role
+ * <warn>The `EmojiResolvable` should belong to the same guild as the role.
+ * If not, pass the emoji's URL directly</warn>
+ * @property {?string} [unicodeEmoji] The unicode emoji for the role
+ * @property {string} [reason] The reason for creating this role
+ */
+
+ /**
+ * Creates a new role in the guild with given information.
+ * <warn>The position will silently reset to 1 if an invalid one is provided, or none.</warn>
+ * @param {RoleCreateOptions} [options] Options for creating the new role
+ * @returns {Promise<Role>}
+ * @example
+ * // Create a new role
+ * guild.roles.create()
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Create a new role with data and a reason
+ * guild.roles.create({
+ * name: 'Super Cool Blue People',
+ * color: Colors.Blue,
+ * reason: 'we needed a role for Super Cool People',
+ * })
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async create(options = {}) {
+ let { name, color, hoist, permissions, position, mentionable, reason, icon, unicodeEmoji } = options;
+ color &&= resolveColor(color);
+ if (permissions !== undefined) permissions = new PermissionsBitField(permissions);
+ if (icon) {
+ const guildEmojiURL = this.guild.emojis.resolve(icon)?.url;
+ icon = guildEmojiURL ? await DataResolver.resolveImage(guildEmojiURL) : await DataResolver.resolveImage(icon);
+ if (typeof icon !== 'string') icon = undefined;
+ }
+
+ const data = await this.client.rest.post(Routes.guildRoles(this.guild.id), {
+ body: {
+ name,
+ color,
+ hoist,
+ permissions,
+ mentionable,
+ icon,
+ unicode_emoji: unicodeEmoji,
+ },
+ reason,
+ });
+ const { role } = this.client.actions.GuildRoleCreate.handle({
+ guild_id: this.guild.id,
+ role: data,
+ });
+ if (position) return this.setPosition(role, position, { reason });
+ return role;
+ }
+
+ /**
+ * Options for editing a role
+ * @typedef {RoleData} RoleEditOptions
+ * @property {string} [reason] The reason for editing this role
+ */
+
+ /**
+ * Edits a role of the guild.
+ * @param {RoleResolvable} role The role to edit
+ * @param {RoleEditOptions} options The options to provide
+ * @returns {Promise<Role>}
+ * @example
+ * // Edit a role
+ * guild.roles.edit('222079219327434752', { name: 'buddies' })
+ * .then(updated => console.log(`Edited role name to ${updated.name}`))
+ * .catch(console.error);
+ */
+ async edit(role, options) {
+ role = this.resolve(role);
+ if (!role) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'role', 'RoleResolvable');
+
+ if (typeof options.position === 'number') {
+ await this.setPosition(role, options.position, { reason: options.reason });
+ }
+
+ let icon = options.icon;
+ if (icon) {
+ const guildEmojiURL = this.guild.emojis.resolve(icon)?.url;
+ icon = guildEmojiURL ? await DataResolver.resolveImage(guildEmojiURL) : await DataResolver.resolveImage(icon);
+ if (typeof icon !== 'string') icon = undefined;
+ }
+
+ const body = {
+ name: options.name,
+ color: options.color === undefined ? undefined : resolveColor(options.color),
+ hoist: options.hoist,
+ permissions: options.permissions === undefined ? undefined : new PermissionsBitField(options.permissions),
+ mentionable: options.mentionable,
+ icon,
+ unicode_emoji: options.unicodeEmoji,
+ };
+
+ const d = await this.client.rest.patch(Routes.guildRole(this.guild.id, role.id), { body, reason: options.reason });
+
+ const clone = role._clone();
+ clone._patch(d);
+ return clone;
+ }
+
+ /**
+ * Deletes a role.
+ * @param {RoleResolvable} role The role to delete
+ * @param {string} [reason] Reason for deleting the role
+ * @returns {Promise<void>}
+ * @example
+ * // Delete a role
+ * guild.roles.delete('222079219327434752', 'The role needed to go')
+ * .then(() => console.log('Deleted the role'))
+ * .catch(console.error);
+ */
+ async delete(role, reason) {
+ const id = this.resolveId(role);
+ await this.client.rest.delete(Routes.guildRole(this.guild.id, id), { reason });
+ this.client.actions.GuildRoleDelete.handle({ guild_id: this.guild.id, role_id: id });
+ }
+
+ /**
+ * Sets the new position of the role.
+ * @param {RoleResolvable} role The role to change the position of
+ * @param {number} position The new position for the role
+ * @param {SetRolePositionOptions} [options] Options for setting the position
+ * @returns {Promise<Role>}
+ * @example
+ * // Set the position of the role
+ * guild.roles.setPosition('222197033908436994', 1)
+ * .then(updated => console.log(`Role position: ${updated.position}`))
+ * .catch(console.error);
+ */
+ async setPosition(role, position, { relative, reason } = {}) {
+ role = this.resolve(role);
+ if (!role) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'role', 'RoleResolvable');
+ const updatedRoles = await setPosition(
+ role,
+ position,
+ relative,
+ this.guild._sortedRoles(),
+ this.client,
+ Routes.guildRoles(this.guild.id),
+ reason,
+ );
+
+ this.client.actions.GuildRolesPositionUpdate.handle({
+ guild_id: this.guild.id,
+ roles: updatedRoles,
+ });
+ return role;
+ }
+
+ /**
+ * The data needed for updating a guild role's position
+ * @typedef {Object} GuildRolePosition
+ * @property {RoleResolvable} role The role's id
+ * @property {number} position The position to update
+ */
+
+ /**
+ * Batch-updates the guild's role positions
+ * @param {GuildRolePosition[]} rolePositions Role positions to update
+ * @returns {Promise<Guild>}
+ * @example
+ * guild.roles.setPositions([{ role: roleId, position: updatedRoleIndex }])
+ * .then(guild => console.log(`Role positions updated for ${guild}`))
+ * .catch(console.error);
+ */
+ async setPositions(rolePositions) {
+ // Make sure rolePositions are prepared for API
+ rolePositions = rolePositions.map(o => ({
+ id: this.resolveId(o.role),
+ position: o.position,
+ }));
+
+ // Call the API to update role positions
+ await this.client.rest.patch(Routes.guildRoles(this.guild.id), { body: rolePositions });
+ return this.client.actions.GuildRolesPositionUpdate.handle({
+ guild_id: this.guild.id,
+ roles: rolePositions,
+ }).guild;
+ }
+
+ /**
+ * Compares the positions of two roles.
+ * @param {RoleResolvable} role1 First role to compare
+ * @param {RoleResolvable} role2 Second role to compare
+ * @returns {number} Negative number if the first role's position is lower (second role's is higher),
+ * positive number if the first's is higher (second's is lower), 0 if equal
+ */
+ comparePositions(role1, role2) {
+ const resolvedRole1 = this.resolve(role1);
+ const resolvedRole2 = this.resolve(role2);
+ if (!resolvedRole1 || !resolvedRole2) {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'role', 'Role nor a Snowflake');
+ }
+
+ const role1Position = resolvedRole1.position;
+ const role2Position = resolvedRole2.position;
+
+ if (role1Position === role2Position) {
+ return Number(BigInt(resolvedRole2.id) - BigInt(resolvedRole1.id));
+ }
+
+ return role1Position - role2Position;
+ }
+
+ /**
+ * Gets the managed role a user created when joining the guild, if any
+ * <info>Only ever available for bots</info>
+ * @param {UserResolvable} user The user to access the bot role for
+ * @returns {?Role}
+ */
+ botRoleFor(user) {
+ const userId = this.client.users.resolveId(user);
+ if (!userId) return null;
+ return this.cache.find(role => role.tags?.botId === userId) ?? null;
+ }
+
+ /**
+ * The `@everyone` role of the guild
+ * @type {Role}
+ * @readonly
+ */
+ get everyone() {
+ return this.cache.get(this.guild.id);
+ }
+
+ /**
+ * The premium subscriber role of the guild, if any
+ * @type {?Role}
+ * @readonly
+ */
+ get premiumSubscriberRole() {
+ return this.cache.find(role => role.tags?.premiumSubscriberRole) ?? null;
+ }
+
+ /**
+ * The role with the highest position in the cache
+ * @type {Role}
+ * @readonly
+ */
+ get highest() {
+ return this.cache.reduce((prev, role) => (role.comparePositionTo(prev) > 0 ? role : prev), this.cache.first());
+ }
+}
+
+module.exports = RoleManager;
diff --git a/node_modules/discord.js/src/managers/StageInstanceManager.js b/node_modules/discord.js/src/managers/StageInstanceManager.js
new file mode 100644
index 0000000..ea037cf
--- /dev/null
+++ b/node_modules/discord.js/src/managers/StageInstanceManager.js
@@ -0,0 +1,154 @@
+'use strict';
+
+const { Routes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const { DiscordjsTypeError, DiscordjsError, ErrorCodes } = require('../errors');
+const { StageInstance } = require('../structures/StageInstance');
+
+/**
+ * Manages API methods for {@link StageInstance} objects and holds their cache.
+ * @extends {CachedManager}
+ */
+class StageInstanceManager extends CachedManager {
+ constructor(guild, iterable) {
+ super(guild.client, StageInstance, iterable);
+
+ /**
+ * The guild this manager belongs to
+ * @type {Guild}
+ */
+ this.guild = guild;
+ }
+
+ /**
+ * The cache of this Manager
+ * @type {Collection<Snowflake, StageInstance>}
+ * @name StageInstanceManager#cache
+ */
+
+ /**
+ * Options used to create a stage instance.
+ * @typedef {Object} StageInstanceCreateOptions
+ * @property {string} topic The topic of the stage instance
+ * @property {StageInstancePrivacyLevel} [privacyLevel] The privacy level of the stage instance
+ * @property {boolean} [sendStartNotification] Whether to notify `@everyone` that the stage instance has started
+ */
+
+ /**
+ * Data that can be resolved to a Stage Channel object. This can be:
+ * * A StageChannel
+ * * A Snowflake
+ * @typedef {StageChannel|Snowflake} StageChannelResolvable
+ */
+
+ /**
+ * Creates a new stage instance.
+ * @param {StageChannelResolvable} channel The stage channel to associate the created stage instance to
+ * @param {StageInstanceCreateOptions} options The options to create the stage instance
+ * @returns {Promise<StageInstance>}
+ * @example
+ * // Create a stage instance
+ * guild.stageInstances.create('1234567890123456789', {
+ * topic: 'A very creative topic',
+ * privacyLevel: GuildPrivacyLevel.GuildOnly
+ * })
+ * .then(stageInstance => console.log(stageInstance))
+ * .catch(console.error);
+ */
+ async create(channel, options) {
+ const channelId = this.guild.channels.resolveId(channel);
+ if (!channelId) throw new DiscordjsError(ErrorCodes.StageChannelResolve);
+ if (typeof options !== 'object') throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true);
+ let { topic, privacyLevel, sendStartNotification } = options;
+
+ const data = await this.client.rest.post(Routes.stageInstances(), {
+ body: {
+ channel_id: channelId,
+ topic,
+ privacy_level: privacyLevel,
+ send_start_notification: sendStartNotification,
+ },
+ });
+
+ return this._add(data);
+ }
+
+ /**
+ * Fetches the stage instance associated with a stage channel, if it exists.
+ * @param {StageChannelResolvable} channel The stage channel whose associated stage instance is to be fetched
+ * @param {BaseFetchOptions} [options] Additional options for this fetch
+ * @returns {Promise<StageInstance>}
+ * @example
+ * // Fetch a stage instance
+ * guild.stageInstances.fetch('1234567890123456789')
+ * .then(stageInstance => console.log(stageInstance))
+ * .catch(console.error);
+ */
+ async fetch(channel, { cache = true, force = false } = {}) {
+ const channelId = this.guild.channels.resolveId(channel);
+ if (!channelId) throw new DiscordjsError(ErrorCodes.StageChannelResolve);
+
+ if (!force) {
+ const existing = this.cache.find(stageInstance => stageInstance.channelId === channelId);
+ if (existing) return existing;
+ }
+
+ const data = await this.client.rest.get(Routes.stageInstance(channelId));
+ return this._add(data, cache);
+ }
+
+ /**
+ * Options used to edit an existing stage instance.
+ * @typedef {Object} StageInstanceEditOptions
+ * @property {string} [topic] The new topic of the stage instance
+ * @property {StageInstancePrivacyLevel} [privacyLevel] The new privacy level of the stage instance
+ */
+
+ /**
+ * Edits an existing stage instance.
+ * @param {StageChannelResolvable} channel The stage channel whose associated stage instance is to be edited
+ * @param {StageInstanceEditOptions} options The options to edit the stage instance
+ * @returns {Promise<StageInstance>}
+ * @example
+ * // Edit a stage instance
+ * guild.stageInstances.edit('1234567890123456789', { topic: 'new topic' })
+ * .then(stageInstance => console.log(stageInstance))
+ * .catch(console.error);
+ */
+ async edit(channel, options) {
+ if (typeof options !== 'object') throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true);
+ const channelId = this.guild.channels.resolveId(channel);
+ if (!channelId) throw new DiscordjsError(ErrorCodes.StageChannelResolve);
+
+ let { topic, privacyLevel } = options;
+
+ const data = await this.client.rest.patch(Routes.stageInstance(channelId), {
+ body: {
+ topic,
+ privacy_level: privacyLevel,
+ },
+ });
+
+ if (this.cache.has(data.id)) {
+ const clone = this.cache.get(data.id)._clone();
+ clone._patch(data);
+ return clone;
+ }
+
+ return this._add(data);
+ }
+
+ /**
+ * Deletes an existing stage instance.
+ * @param {StageChannelResolvable} channel The stage channel whose associated stage instance is to be deleted
+ * @returns {Promise<void>}
+ */
+ async delete(channel) {
+ const channelId = this.guild.channels.resolveId(channel);
+ if (!channelId) throw new DiscordjsError(ErrorCodes.StageChannelResolve);
+
+ await this.client.rest.delete(Routes.stageInstance(channelId));
+ }
+}
+
+module.exports = StageInstanceManager;
diff --git a/node_modules/discord.js/src/managers/ThreadManager.js b/node_modules/discord.js/src/managers/ThreadManager.js
new file mode 100644
index 0000000..17569f5
--- /dev/null
+++ b/node_modules/discord.js/src/managers/ThreadManager.js
@@ -0,0 +1,207 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { makeURLSearchParams } = require('@discordjs/rest');
+const { Routes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+const ThreadChannel = require('../structures/ThreadChannel');
+const { MakeCacheOverrideSymbol } = require('../util/Symbols');
+
+/**
+ * Manages API methods for thread-based channels and stores their cache.
+ * @extends {CachedManager}
+ */
+class ThreadManager extends CachedManager {
+ static [MakeCacheOverrideSymbol] = ThreadManager;
+
+ constructor(channel, iterable) {
+ super(channel.client, ThreadChannel, iterable);
+
+ /**
+ * The channel this Manager belongs to
+ * @type {TextChannel|NewsChannel|ForumChannel}
+ */
+ this.channel = channel;
+ }
+
+ /**
+ * Data that can be resolved to a Thread Channel object. This can be:
+ * * A ThreadChannel object
+ * * A Snowflake
+ * @typedef {ThreadChannel|Snowflake} ThreadChannelResolvable
+ */
+
+ /**
+ * The cache of this Manager
+ * @type {Collection<Snowflake, ThreadChannel>}
+ * @name ThreadManager#cache
+ */
+
+ _add(thread) {
+ const existing = this.cache.get(thread.id);
+ if (existing) return existing;
+ this.cache.set(thread.id, thread);
+ return thread;
+ }
+
+ /**
+ * Resolves a {@link ThreadChannelResolvable} to a {@link ThreadChannel} object.
+ * @method resolve
+ * @memberof ThreadManager
+ * @instance
+ * @param {ThreadChannelResolvable} thread The ThreadChannel resolvable to resolve
+ * @returns {?ThreadChannel}
+ */
+
+ /**
+ * Resolves a {@link ThreadChannelResolvable} to a {@link ThreadChannel} id.
+ * @method resolveId
+ * @memberof ThreadManager
+ * @instance
+ * @param {ThreadChannelResolvable} thread The ThreadChannel resolvable to resolve
+ * @returns {?Snowflake}
+ */
+
+ /**
+ * Options for creating a thread. <warn>Only one of `startMessage` or `type` can be defined.</warn>
+ * @typedef {StartThreadOptions} ThreadCreateOptions
+ * @property {MessageResolvable} [startMessage] The message to start a thread from. <warn>If this is defined then type
+ * of thread gets automatically defined and cannot be changed. The provided `type` field will be ignored</warn>
+ * @property {ChannelType.AnnouncementThread|ChannelType.PublicThread|ChannelType.PrivateThread} [type]
+ * The type of thread to create.
+ * Defaults to {@link ChannelType.PublicThread} if created in a {@link TextChannel}
+ * <warn>When creating threads in a {@link NewsChannel} this is ignored and is always
+ * {@link ChannelType.AnnouncementThread}</warn>
+ * @property {boolean} [invitable] Whether non-moderators can add other non-moderators to the thread
+ * <info>Can only be set when type will be {@link ChannelType.PrivateThread}</info>
+ */
+
+ /**
+ * Options for fetching multiple threads.
+ * @typedef {Object} FetchThreadsOptions
+ * @property {FetchArchivedThreadOptions} [archived] Options used to fetch archived threads
+ */
+
+ /**
+ * Obtains a thread from Discord, or the channel cache if it's already available.
+ * @param {ThreadChannelResolvable|FetchThreadsOptions} [options] The options to fetch threads. If it is a
+ * ThreadChannelResolvable then the specified thread will be fetched. Fetches all active threads if `undefined`
+ * @param {BaseFetchOptions} [cacheOptions] Additional options for this fetch. <warn>The `force` field gets ignored
+ * if `options` is not a {@link ThreadChannelResolvable}</warn>
+ * @returns {Promise<?(ThreadChannel|FetchedThreads|FetchedThreadsMore)>}
+ * {@link FetchedThreads} if active & {@link FetchedThreadsMore} if archived.
+ * @example
+ * // Fetch a thread by its id
+ * channel.threads.fetch('831955138126104859')
+ * .then(channel => console.log(channel.name))
+ * .catch(console.error);
+ */
+ fetch(options, { cache, force } = {}) {
+ if (!options) return this.fetchActive(cache);
+ const channel = this.client.channels.resolveId(options);
+ if (channel) return this.client.channels.fetch(channel, { cache, force });
+ if (options.archived) {
+ return this.fetchArchived(options.archived, cache);
+ }
+ return this.fetchActive(cache);
+ }
+
+ /**
+ * Data that can be resolved to a Date object. This can be:
+ * * A Date object
+ * * A number representing a timestamp
+ * * An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string
+ * @typedef {Date|number|string} DateResolvable
+ */
+
+ /**
+ * The options used to fetch archived threads.
+ * @typedef {Object} FetchArchivedThreadOptions
+ * @property {string} [type='public'] The type of threads to fetch (`public` or `private`)
+ * @property {boolean} [fetchAll=false] Whether to fetch **all** archived threads when `type` is `private`
+ * <info>This property requires the {@link PermissionFlagsBits.ManageThreads} permission if `true`.</info>
+ * @property {DateResolvable|ThreadChannelResolvable} [before] Only return threads that were archived before this Date
+ * or Snowflake
+ * <warn>Must be a {@link ThreadChannelResolvable} when `type` is `private` and `fetchAll` is `false`.</warn>
+ * @property {number} [limit] Maximum number of threads to return
+ */
+
+ /**
+ * Data returned from fetching multiple threads.
+ * @typedef {FetchedThreads} FetchedThreadsMore
+ * @property {?boolean} hasMore Whether there are potentially additional threads that require a subsequent call
+ */
+
+ /**
+ * Obtains a set of archived threads from Discord.
+ * <info>This method requires the {@link PermissionFlagsBits.ReadMessageHistory} permission
+ * in the parent channel.</info>
+ * @param {FetchArchivedThreadOptions} [options] The options to fetch archived threads
+ * @param {boolean} [cache=true] Whether to cache the new thread objects if they aren't already
+ * @returns {Promise<FetchedThreadsMore>}
+ */
+ async fetchArchived({ type = 'public', fetchAll = false, before, limit } = {}, cache = true) {
+ let path = Routes.channelThreads(this.channel.id, type);
+ if (type === 'private' && !fetchAll) {
+ path = Routes.channelJoinedArchivedThreads(this.channel.id);
+ }
+ let timestamp;
+ let id;
+ const query = makeURLSearchParams({ limit });
+ if (before !== undefined) {
+ if (before instanceof ThreadChannel || /^\d{17,19}$/.test(String(before))) {
+ id = this.resolveId(before);
+ timestamp = this.resolve(before)?.archivedAt?.toISOString();
+ const toUse = type === 'private' && !fetchAll ? id : timestamp;
+ if (toUse) {
+ query.set('before', toUse);
+ }
+ } else {
+ try {
+ timestamp = new Date(before).toISOString();
+ if (type === 'public' || fetchAll) {
+ query.set('before', timestamp);
+ }
+ } catch {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'before', 'DateResolvable or ThreadChannelResolvable');
+ }
+ }
+ }
+
+ const raw = await this.client.rest.get(path, { query });
+ return this.constructor._mapThreads(raw, this.client, { parent: this.channel, cache });
+ }
+
+ /**
+ * Obtains all active threads in the channel.
+ * @param {boolean} [cache=true] Whether to cache the fetched data
+ * @returns {Promise<FetchedThreads>}
+ */
+ async fetchActive(cache = true) {
+ const data = await this.channel.guild.channels.rawFetchGuildActiveThreads();
+ return this.constructor._mapThreads(data, this.client, { parent: this.channel, cache });
+ }
+
+ static _mapThreads(rawThreads, client, { parent, guild, cache }) {
+ const threads = rawThreads.threads.reduce((coll, raw) => {
+ const thread = client.channels._add(raw, guild ?? parent?.guild, { cache });
+ if (parent && thread.parentId !== parent.id) return coll;
+ return coll.set(thread.id, thread);
+ }, new Collection());
+
+ // Discord sends the thread id as id in this object
+ const threadMembers = rawThreads.members.reduce((coll, raw) => {
+ const thread = threads.get(raw.id);
+ return thread ? coll.set(raw.user_id, thread.members._add(raw)) : coll;
+ }, new Collection());
+
+ const response = { threads, members: threadMembers };
+
+ // The GET `/guilds/{guild.id}/threads/active` route does not return `has_more`.
+ if ('has_more' in rawThreads) response.hasMore = rawThreads.has_more;
+ return response;
+ }
+}
+
+module.exports = ThreadManager;
diff --git a/node_modules/discord.js/src/managers/ThreadMemberManager.js b/node_modules/discord.js/src/managers/ThreadMemberManager.js
new file mode 100644
index 0000000..c138aa3
--- /dev/null
+++ b/node_modules/discord.js/src/managers/ThreadMemberManager.js
@@ -0,0 +1,182 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { makeURLSearchParams } = require('@discordjs/rest');
+const { Routes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+const ThreadMember = require('../structures/ThreadMember');
+
+/**
+ * Manages API methods for GuildMembers and stores their cache.
+ * @extends {CachedManager}
+ */
+class ThreadMemberManager extends CachedManager {
+ constructor(thread, iterable) {
+ super(thread.client, ThreadMember, iterable);
+
+ /**
+ * The thread this manager belongs to
+ * @type {ThreadChannel}
+ */
+ this.thread = thread;
+ }
+
+ /**
+ * The cache of this Manager
+ * @type {Collection<Snowflake, ThreadMember>}
+ * @name ThreadMemberManager#cache
+ */
+
+ _add(data, cache = true) {
+ const existing = this.cache.get(data.user_id);
+ if (cache) existing?._patch(data, { cache });
+ if (existing) return existing;
+
+ const member = new ThreadMember(this.thread, data, { cache });
+ if (cache) this.cache.set(data.user_id, member);
+ return member;
+ }
+
+ /**
+ * Fetches the client user as a ThreadMember of the thread.
+ * @param {BaseFetchOptions} [options] The options for fetching the member
+ * @returns {Promise<ThreadMember>}
+ */
+ fetchMe(options) {
+ return this.fetch({ ...options, member: this.client.user.id });
+ }
+
+ /**
+ * The client user as a ThreadMember of this ThreadChannel
+ * @type {?ThreadMember}
+ * @readonly
+ */
+ get me() {
+ return this.resolve(this.client.user.id);
+ }
+
+ /**
+ * Data that resolves to give a ThreadMember object. This can be:
+ * * A ThreadMember object
+ * * A User resolvable
+ * @typedef {ThreadMember|UserResolvable} ThreadMemberResolvable
+ */
+
+ /**
+ * Resolves a {@link ThreadMemberResolvable} to a {@link ThreadMember} object.
+ * @param {ThreadMemberResolvable} member The user that is part of the thread
+ * @returns {?GuildMember}
+ */
+ resolve(member) {
+ const memberResolvable = super.resolve(member);
+ if (memberResolvable) return memberResolvable;
+ const userResolvable = this.client.users.resolveId(member);
+ if (userResolvable) return super.resolve(userResolvable);
+ return null;
+ }
+
+ /**
+ * Resolves a {@link ThreadMemberResolvable} to a {@link ThreadMember} id string.
+ * @param {ThreadMemberResolvable} member The user that is part of the guild
+ * @returns {?Snowflake}
+ */
+ resolveId(member) {
+ const memberResolvable = super.resolveId(member);
+ if (memberResolvable) return memberResolvable;
+ const userResolvable = this.client.users.resolveId(member);
+ return this.cache.has(userResolvable) ? userResolvable : null;
+ }
+
+ /**
+ * Adds a member to the thread.
+ * @param {UserResolvable|'@me'} member The member to add
+ * @param {string} [reason] The reason for adding this member
+ * @returns {Promise<Snowflake>}
+ */
+ async add(member, reason) {
+ const id = member === '@me' ? member : this.client.users.resolveId(member);
+ if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'member', 'UserResolvable');
+ await this.client.rest.put(Routes.threadMembers(this.thread.id, id), { reason });
+ return id;
+ }
+
+ /**
+ * Remove a user from the thread.
+ * @param {Snowflake|'@me'} id The id of the member to remove
+ * @param {string} [reason] The reason for removing this member from the thread
+ * @returns {Promise<Snowflake>}
+ */
+ async remove(id, reason) {
+ await this.client.rest.delete(Routes.threadMembers(this.thread.id, id), { reason });
+ return id;
+ }
+
+ /**
+ * Options used to fetch a thread member.
+ * @typedef {BaseFetchOptions} FetchThreadMemberOptions
+ * @property {ThreadMemberResolvable} member The thread member to fetch
+ * @property {boolean} [withMember] Whether to also return the guild member associated with this thread member
+ */
+
+ /**
+ * Options used to fetch multiple thread members with guild member data.
+ * <info>With `withMember` set to `true`, pagination is enabled.</info>
+ * @typedef {Object} FetchThreadMembersWithGuildMemberDataOptions
+ * @property {true} withMember Whether to also return the guild member data
+ * @property {Snowflake} [after] Consider only thread members after this id
+ * @property {number} [limit] The maximum number of thread members to return
+ * @property {boolean} [cache] Whether to cache the fetched thread members and guild members
+ */
+
+ /**
+ * Options used to fetch multiple thread members without guild member data.
+ * @typedef {Object} FetchThreadMembersWithoutGuildMemberDataOptions
+ * @property {false} [withMember] Whether to also return the guild member data
+ * @property {boolean} [cache] Whether to cache the fetched thread members
+ */
+
+ /**
+ * Options used to fetch multiple thread members.
+ * @typedef {FetchThreadMembersWithGuildMemberDataOptions|
+ * FetchThreadMembersWithoutGuildMemberDataOptions} FetchThreadMembersOptions
+ */
+
+ /**
+ * Fetches thread member(s) from Discord.
+ * <info>This method requires the {@link GatewayIntentBits.GuildMembers} privileged gateway intent.</info>
+ * @param {ThreadMemberResolvable|FetchThreadMemberOptions|FetchThreadMembersOptions} [options]
+ * Options for fetching thread member(s)
+ * @returns {Promise<ThreadMember|Collection<Snowflake, ThreadMember>>}
+ */
+ fetch(options) {
+ if (!options) return this._fetchMany();
+ const { member, withMember, cache, force } = options;
+ const resolvedMember = this.resolveId(member ?? options);
+ if (resolvedMember) return this._fetchSingle({ member: resolvedMember, withMember, cache, force });
+ return this._fetchMany(options);
+ }
+
+ async _fetchSingle({ member, withMember, cache, force = false }) {
+ if (!force) {
+ const existing = this.cache.get(member);
+ if (existing) return existing;
+ }
+
+ const data = await this.client.rest.get(Routes.threadMembers(this.thread.id, member), {
+ query: makeURLSearchParams({ with_member: withMember }),
+ });
+
+ return this._add(data, cache);
+ }
+
+ async _fetchMany({ withMember, after, limit, cache } = {}) {
+ const data = await this.client.rest.get(Routes.threadMembers(this.thread.id), {
+ query: makeURLSearchParams({ with_member: withMember, after, limit }),
+ });
+
+ return data.reduce((col, member) => col.set(member.user_id, this._add(member, cache)), new Collection());
+ }
+}
+
+module.exports = ThreadMemberManager;
diff --git a/node_modules/discord.js/src/managers/UserManager.js b/node_modules/discord.js/src/managers/UserManager.js
new file mode 100644
index 0000000..24478f6
--- /dev/null
+++ b/node_modules/discord.js/src/managers/UserManager.js
@@ -0,0 +1,139 @@
+'use strict';
+
+const { ChannelType, Routes } = require('discord-api-types/v10');
+const CachedManager = require('./CachedManager');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+const { GuildMember } = require('../structures/GuildMember');
+const { Message } = require('../structures/Message');
+const ThreadMember = require('../structures/ThreadMember');
+const User = require('../structures/User');
+
+/**
+ * Manages API methods for users and stores their cache.
+ * @extends {CachedManager}
+ */
+class UserManager extends CachedManager {
+ constructor(client, iterable) {
+ super(client, User, iterable);
+ }
+
+ /**
+ * The cache of this manager
+ * @type {Collection<Snowflake, User>}
+ * @name UserManager#cache
+ */
+
+ /**
+ * Data that resolves to give a User object. This can be:
+ * * A User object
+ * * A Snowflake
+ * * A Message object (resolves to the message author)
+ * * A GuildMember object
+ * * A ThreadMember object
+ * @typedef {User|Snowflake|Message|GuildMember|ThreadMember} UserResolvable
+ */
+
+ /**
+ * The DM between the client's user and a user
+ * @param {Snowflake} userId The user id
+ * @returns {?DMChannel}
+ * @private
+ */
+ dmChannel(userId) {
+ return this.client.channels.cache.find(c => c.type === ChannelType.DM && c.recipientId === userId) ?? null;
+ }
+
+ /**
+ * Creates a {@link DMChannel} between the client and a user.
+ * @param {UserResolvable} user The UserResolvable to identify
+ * @param {BaseFetchOptions} [options] Additional options for this fetch
+ * @returns {Promise<DMChannel>}
+ */
+ async createDM(user, { cache = true, force = false } = {}) {
+ const id = this.resolveId(user);
+
+ if (!force) {
+ const dmChannel = this.dmChannel(id);
+ if (dmChannel && !dmChannel.partial) return dmChannel;
+ }
+
+ const data = await this.client.rest.post(Routes.userChannels(), { body: { recipient_id: id } });
+ return this.client.channels._add(data, null, { cache });
+ }
+
+ /**
+ * Deletes a {@link DMChannel} (if one exists) between the client and a user. Resolves with the channel if successful.
+ * @param {UserResolvable} user The UserResolvable to identify
+ * @returns {Promise<DMChannel>}
+ */
+ async deleteDM(user) {
+ const id = this.resolveId(user);
+ const dmChannel = this.dmChannel(id);
+ if (!dmChannel) throw new DiscordjsError(ErrorCodes.UserNoDMChannel);
+ await this.client.rest.delete(Routes.channel(dmChannel.id));
+ this.client.channels._remove(dmChannel.id);
+ return dmChannel;
+ }
+
+ /**
+ * Obtains a user from Discord, or the user cache if it's already available.
+ * @param {UserResolvable} user The user to fetch
+ * @param {BaseFetchOptions} [options] Additional options for this fetch
+ * @returns {Promise<User>}
+ */
+ async fetch(user, { cache = true, force = false } = {}) {
+ const id = this.resolveId(user);
+ if (!force) {
+ const existing = this.cache.get(id);
+ if (existing && !existing.partial) return existing;
+ }
+
+ const data = await this.client.rest.get(Routes.user(id));
+ return this._add(data, cache);
+ }
+
+ /**
+ * Fetches a user's flags.
+ * @param {UserResolvable} user The UserResolvable to identify
+ * @param {BaseFetchOptions} [options] Additional options for this fetch
+ * @returns {Promise<UserFlagsBitField>}
+ */
+ async fetchFlags(user, options) {
+ return (await this.fetch(user, options)).flags;
+ }
+
+ /**
+ * Sends a message to a user.
+ * @param {UserResolvable} user The UserResolvable to identify
+ * @param {string|MessagePayload|MessageCreateOptions} options The options to provide
+ * @returns {Promise<Message>}
+ */
+ async send(user, options) {
+ return (await this.createDM(user)).send(options);
+ }
+
+ /**
+ * Resolves a {@link UserResolvable} to a {@link User} object.
+ * @param {UserResolvable} user The UserResolvable to identify
+ * @returns {?User}
+ */
+ resolve(user) {
+ if (user instanceof GuildMember || user instanceof ThreadMember) return user.user;
+ if (user instanceof Message) return user.author;
+ return super.resolve(user);
+ }
+
+ /**
+ * Resolves a {@link UserResolvable} to a {@link User} id.
+ * @param {UserResolvable} user The UserResolvable to identify
+ * @returns {?Snowflake}
+ */
+ resolveId(user) {
+ if (user instanceof ThreadMember) return user.id;
+ if (user instanceof GuildMember) return user.user.id;
+ if (user instanceof Message) return user.author.id;
+ return super.resolveId(user);
+ }
+}
+
+module.exports = UserManager;
diff --git a/node_modules/discord.js/src/managers/VoiceStateManager.js b/node_modules/discord.js/src/managers/VoiceStateManager.js
new file mode 100644
index 0000000..c42fdd2
--- /dev/null
+++ b/node_modules/discord.js/src/managers/VoiceStateManager.js
@@ -0,0 +1,37 @@
+'use strict';
+
+const CachedManager = require('./CachedManager');
+const VoiceState = require('../structures/VoiceState');
+
+/**
+ * Manages API methods for VoiceStates and stores their cache.
+ * @extends {CachedManager}
+ */
+class VoiceStateManager extends CachedManager {
+ constructor(guild, iterable) {
+ super(guild.client, VoiceState, iterable);
+
+ /**
+ * The guild this manager belongs to
+ * @type {Guild}
+ */
+ this.guild = guild;
+ }
+
+ /**
+ * The cache of this manager
+ * @type {Collection<Snowflake, VoiceState>}
+ * @name VoiceStateManager#cache
+ */
+
+ _add(data, cache = true) {
+ const existing = this.cache.get(data.user_id);
+ if (existing) return existing._patch(data);
+
+ const entry = new this.holds(this.guild, data);
+ if (cache) this.cache.set(data.user_id, entry);
+ return entry;
+ }
+}
+
+module.exports = VoiceStateManager;
diff --git a/node_modules/discord.js/src/sharding/Shard.js b/node_modules/discord.js/src/sharding/Shard.js
new file mode 100644
index 0000000..f833309
--- /dev/null
+++ b/node_modules/discord.js/src/sharding/Shard.js
@@ -0,0 +1,475 @@
+'use strict';
+
+const EventEmitter = require('node:events');
+const path = require('node:path');
+const process = require('node:process');
+const { setTimeout, clearTimeout } = require('node:timers');
+const { setTimeout: sleep } = require('node:timers/promises');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+const ShardEvents = require('../util/ShardEvents');
+const { makeError, makePlainError } = require('../util/Util');
+let childProcess = null;
+let Worker = null;
+
+/**
+ * A self-contained shard created by the {@link ShardingManager}. Each one has a {@link ChildProcess} that contains
+ * an instance of the bot and its {@link Client}. When its child process/worker exits for any reason, the shard will
+ * spawn a new one to replace it as necessary.
+ * @extends {EventEmitter}
+ */
+class Shard extends EventEmitter {
+ constructor(manager, id) {
+ super();
+
+ switch (manager.mode) {
+ case 'process':
+ childProcess = require('node:child_process');
+ break;
+ case 'worker':
+ Worker = require('node:worker_threads').Worker;
+ break;
+ }
+
+ /**
+ * Manager that created the shard
+ * @type {ShardingManager}
+ */
+ this.manager = manager;
+
+ /**
+ * The shard's id in the manager
+ * @type {number}
+ */
+ this.id = id;
+
+ /**
+ * Whether to pass silent flag to the shard's process (only when {@link ShardingManager#mode} is `process`)
+ * @type {boolean}
+ */
+ this.silent = manager.silent;
+
+ /**
+ * Arguments for the shard's process (only when {@link ShardingManager#mode} is `process`)
+ * @type {string[]}
+ */
+ this.args = manager.shardArgs ?? [];
+
+ /**
+ * Arguments for the shard's process executable (only when {@link ShardingManager#mode} is `process`)
+ * @type {string[]}
+ */
+ this.execArgv = manager.execArgv;
+
+ /**
+ * Environment variables for the shard's process, or workerData for the shard's worker
+ * @type {Object}
+ */
+ this.env = Object.assign({}, process.env, {
+ SHARDING_MANAGER: true,
+ SHARDS: this.id,
+ SHARD_COUNT: this.manager.totalShards,
+ DISCORD_TOKEN: this.manager.token,
+ });
+
+ /**
+ * Whether the shard's {@link Client} is ready
+ * @type {boolean}
+ */
+ this.ready = false;
+
+ /**
+ * Process of the shard (if {@link ShardingManager#mode} is `process`)
+ * @type {?ChildProcess}
+ */
+ this.process = null;
+
+ /**
+ * Worker of the shard (if {@link ShardingManager#mode} is `worker`)
+ * @type {?Worker}
+ */
+ this.worker = null;
+
+ /**
+ * Ongoing promises for calls to {@link Shard#eval}, mapped by the `script` they were called with
+ * @type {Map<string, Promise>}
+ * @private
+ */
+ this._evals = new Map();
+
+ /**
+ * Ongoing promises for calls to {@link Shard#fetchClientValue}, mapped by the `prop` they were called with
+ * @type {Map<string, Promise>}
+ * @private
+ */
+ this._fetches = new Map();
+
+ /**
+ * Listener function for the {@link ChildProcess}' `exit` event
+ * @type {Function}
+ * @private
+ */
+ this._exitListener = null;
+ }
+
+ /**
+ * Forks a child process or creates a worker thread for the shard.
+ * <warn>You should not need to call this manually.</warn>
+ * @param {number} [timeout=30000] The amount in milliseconds to wait until the {@link Client} has become ready
+ * before resolving (`-1` or `Infinity` for no wait)
+ * @returns {Promise<ChildProcess>}
+ */
+ spawn(timeout = 30_000) {
+ if (this.process) throw new DiscordjsError(ErrorCodes.ShardingProcessExists, this.id);
+ if (this.worker) throw new DiscordjsError(ErrorCodes.ShardingWorkerExists, this.id);
+
+ this._exitListener = this._handleExit.bind(this, undefined, timeout);
+
+ switch (this.manager.mode) {
+ case 'process':
+ this.process = childProcess
+ .fork(path.resolve(this.manager.file), this.args, {
+ env: this.env,
+ execArgv: this.execArgv,
+ silent: this.silent,
+ })
+ .on('message', this._handleMessage.bind(this))
+ .on('exit', this._exitListener);
+ break;
+ case 'worker':
+ this.worker = new Worker(path.resolve(this.manager.file), { workerData: this.env })
+ .on('message', this._handleMessage.bind(this))
+ .on('exit', this._exitListener);
+ break;
+ }
+
+ this._evals.clear();
+ this._fetches.clear();
+
+ const child = this.process ?? this.worker;
+
+ /**
+ * Emitted upon the creation of the shard's child process/worker.
+ * @event Shard#spawn
+ * @param {ChildProcess|Worker} process Child process/worker that was created
+ */
+ this.emit(ShardEvents.Spawn, child);
+
+ if (timeout === -1 || timeout === Infinity) return Promise.resolve(child);
+ return new Promise((resolve, reject) => {
+ const cleanup = () => {
+ clearTimeout(spawnTimeoutTimer);
+ this.off('ready', onReady);
+ this.off('disconnect', onDisconnect);
+ this.off('death', onDeath);
+ };
+
+ const onReady = () => {
+ cleanup();
+ resolve(child);
+ };
+
+ const onDisconnect = () => {
+ cleanup();
+ reject(new DiscordjsError(ErrorCodes.ShardingReadyDisconnected, this.id));
+ };
+
+ const onDeath = () => {
+ cleanup();
+ reject(new DiscordjsError(ErrorCodes.ShardingReadyDied, this.id));
+ };
+
+ const onTimeout = () => {
+ cleanup();
+ reject(new DiscordjsError(ErrorCodes.ShardingReadyTimeout, this.id));
+ };
+
+ const spawnTimeoutTimer = setTimeout(onTimeout, timeout);
+ this.once('ready', onReady);
+ this.once('disconnect', onDisconnect);
+ this.once('death', onDeath);
+ });
+ }
+
+ /**
+ * Immediately kills the shard's process/worker and does not restart it.
+ */
+ kill() {
+ if (this.process) {
+ this.process.removeListener('exit', this._exitListener);
+ this.process.kill();
+ } else {
+ this.worker.removeListener('exit', this._exitListener);
+ this.worker.terminate();
+ }
+
+ this._handleExit(false);
+ }
+
+ /**
+ * Options used to respawn a shard.
+ * @typedef {Object} ShardRespawnOptions
+ * @property {number} [delay=500] How long to wait between killing the process/worker and
+ * restarting it (in milliseconds)
+ * @property {number} [timeout=30000] The amount in milliseconds to wait until the {@link Client}
+ * has become ready before resolving (`-1` or `Infinity` for no wait)
+ */
+
+ /**
+ * Kills and restarts the shard's process/worker.
+ * @param {ShardRespawnOptions} [options] Options for respawning the shard
+ * @returns {Promise<ChildProcess>}
+ */
+ async respawn({ delay = 500, timeout = 30_000 } = {}) {
+ this.kill();
+ if (delay > 0) await sleep(delay);
+ return this.spawn(timeout);
+ }
+
+ /**
+ * Sends a message to the shard's process/worker.
+ * @param {*} message Message to send to the shard
+ * @returns {Promise<Shard>}
+ */
+ send(message) {
+ return new Promise((resolve, reject) => {
+ if (this.process) {
+ this.process.send(message, err => {
+ if (err) reject(err);
+ else resolve(this);
+ });
+ } else {
+ this.worker.postMessage(message);
+ resolve(this);
+ }
+ });
+ }
+
+ /**
+ * Fetches a client property value of the shard.
+ * @param {string} prop Name of the client property to get, using periods for nesting
+ * @returns {Promise<*>}
+ * @example
+ * shard.fetchClientValue('guilds.cache.size')
+ * .then(count => console.log(`${count} guilds in shard ${shard.id}`))
+ * .catch(console.error);
+ */
+ fetchClientValue(prop) {
+ // Shard is dead (maybe respawning), don't cache anything and error immediately
+ if (!this.process && !this.worker) {
+ return Promise.reject(new DiscordjsError(ErrorCodes.ShardingNoChildExists, this.id));
+ }
+
+ // Cached promise from previous call
+ if (this._fetches.has(prop)) return this._fetches.get(prop);
+
+ const promise = new Promise((resolve, reject) => {
+ const child = this.process ?? this.worker;
+
+ const listener = message => {
+ if (message?._fetchProp !== prop) return;
+ child.removeListener('message', listener);
+ this.decrementMaxListeners(child);
+ this._fetches.delete(prop);
+ if (!message._error) resolve(message._result);
+ else reject(makeError(message._error));
+ };
+
+ this.incrementMaxListeners(child);
+ child.on('message', listener);
+
+ this.send({ _fetchProp: prop }).catch(err => {
+ child.removeListener('message', listener);
+ this.decrementMaxListeners(child);
+ this._fetches.delete(prop);
+ reject(err);
+ });
+ });
+
+ this._fetches.set(prop, promise);
+ return promise;
+ }
+
+ /**
+ * Evaluates a script or function on the shard, in the context of the {@link Client}.
+ * @param {string|Function} script JavaScript to run on the shard
+ * @param {*} [context] The context for the eval
+ * @returns {Promise<*>} Result of the script execution
+ */
+ eval(script, context) {
+ // Stringify the script if it's a Function
+ const _eval = typeof script === 'function' ? `(${script})(this, ${JSON.stringify(context)})` : script;
+
+ // Shard is dead (maybe respawning), don't cache anything and error immediately
+ if (!this.process && !this.worker) {
+ return Promise.reject(new DiscordjsError(ErrorCodes.ShardingNoChildExists, this.id));
+ }
+
+ // Cached promise from previous call
+ if (this._evals.has(_eval)) return this._evals.get(_eval);
+
+ const promise = new Promise((resolve, reject) => {
+ const child = this.process ?? this.worker;
+
+ const listener = message => {
+ if (message?._eval !== _eval) return;
+ child.removeListener('message', listener);
+ this.decrementMaxListeners(child);
+ this._evals.delete(_eval);
+ if (!message._error) resolve(message._result);
+ else reject(makeError(message._error));
+ };
+
+ this.incrementMaxListeners(child);
+ child.on('message', listener);
+
+ this.send({ _eval }).catch(err => {
+ child.removeListener('message', listener);
+ this.decrementMaxListeners(child);
+ this._evals.delete(_eval);
+ reject(err);
+ });
+ });
+
+ this._evals.set(_eval, promise);
+ return promise;
+ }
+
+ /**
+ * Handles a message received from the child process/worker.
+ * @param {*} message Message received
+ * @private
+ */
+ _handleMessage(message) {
+ if (message) {
+ // Shard is ready
+ if (message._ready) {
+ this.ready = true;
+ /**
+ * Emitted upon the shard's {@link Client#event:shardReady} event.
+ * @event Shard#ready
+ */
+ this.emit(ShardEvents.Ready);
+ return;
+ }
+
+ // Shard has disconnected
+ if (message._disconnect) {
+ this.ready = false;
+ /**
+ * Emitted upon the shard's {@link Client#event:shardDisconnect} event.
+ * @event Shard#disconnect
+ */
+ this.emit(ShardEvents.Disconnect);
+ return;
+ }
+
+ // Shard is attempting to reconnect
+ if (message._reconnecting) {
+ this.ready = false;
+ /**
+ * Emitted upon the shard's {@link Client#event:shardReconnecting} event.
+ * @event Shard#reconnecting
+ */
+ this.emit(ShardEvents.Reconnecting);
+ return;
+ }
+
+ // Shard has resumed
+ if (message._resume) {
+ this.ready = true;
+ /**
+ * Emitted upon the shard's {@link Client#event:shardResume} event.
+ * @event Shard#resume
+ */
+ this.emit(ShardEvents.Resume);
+ return;
+ }
+
+ // Shard is requesting a property fetch
+ if (message._sFetchProp) {
+ const resp = { _sFetchProp: message._sFetchProp, _sFetchPropShard: message._sFetchPropShard };
+ this.manager.fetchClientValues(message._sFetchProp, message._sFetchPropShard).then(
+ results => this.send({ ...resp, _result: results }),
+ err => this.send({ ...resp, _error: makePlainError(err) }),
+ );
+ return;
+ }
+
+ // Shard is requesting an eval broadcast
+ if (message._sEval) {
+ const resp = { _sEval: message._sEval, _sEvalShard: message._sEvalShard };
+ this.manager._performOnShards('eval', [message._sEval], message._sEvalShard).then(
+ results => this.send({ ...resp, _result: results }),
+ err => this.send({ ...resp, _error: makePlainError(err) }),
+ );
+ return;
+ }
+
+ // Shard is requesting a respawn of all shards
+ if (message._sRespawnAll) {
+ const { shardDelay, respawnDelay, timeout } = message._sRespawnAll;
+ this.manager.respawnAll({ shardDelay, respawnDelay, timeout }).catch(() => {
+ // Do nothing
+ });
+ return;
+ }
+ }
+
+ /**
+ * Emitted upon receiving a message from the child process/worker.
+ * @event Shard#message
+ * @param {*} message Message that was received
+ */
+ this.emit(ShardEvents.Message, message);
+ }
+
+ /**
+ * Handles the shard's process/worker exiting.
+ * @param {boolean} [respawn=this.manager.respawn] Whether to spawn the shard again
+ * @param {number} [timeout] The amount in milliseconds to wait until the {@link Client}
+ * has become ready (`-1` or `Infinity` for no wait)
+ * @private
+ */
+ _handleExit(respawn = this.manager.respawn, timeout) {
+ /**
+ * Emitted upon the shard's child process/worker exiting.
+ * @event Shard#death
+ * @param {ChildProcess|Worker} process Child process/worker that exited
+ */
+ this.emit(ShardEvents.Death, this.process ?? this.worker);
+
+ this.ready = false;
+ this.process = null;
+ this.worker = null;
+ this._evals.clear();
+ this._fetches.clear();
+
+ if (respawn) this.spawn(timeout).catch(err => this.emit(ShardEvents.Error, err));
+ }
+
+ /**
+ * Increments max listeners by one for a given emitter, if they are not zero.
+ * @param {EventEmitter|process} emitter The emitter that emits the events.
+ * @private
+ */
+ incrementMaxListeners(emitter) {
+ const maxListeners = emitter.getMaxListeners();
+ if (maxListeners !== 0) {
+ emitter.setMaxListeners(maxListeners + 1);
+ }
+ }
+
+ /**
+ * Decrements max listeners by one for a given emitter, if they are not zero.
+ * @param {EventEmitter|process} emitter The emitter that emits the events.
+ * @private
+ */
+ decrementMaxListeners(emitter) {
+ const maxListeners = emitter.getMaxListeners();
+ if (maxListeners !== 0) {
+ emitter.setMaxListeners(maxListeners - 1);
+ }
+ }
+}
+
+module.exports = Shard;
diff --git a/node_modules/discord.js/src/sharding/ShardClientUtil.js b/node_modules/discord.js/src/sharding/ShardClientUtil.js
new file mode 100644
index 0000000..c1bd4a8
--- /dev/null
+++ b/node_modules/discord.js/src/sharding/ShardClientUtil.js
@@ -0,0 +1,291 @@
+'use strict';
+
+const process = require('node:process');
+const { calculateShardId } = require('@discordjs/util');
+const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors');
+const Events = require('../util/Events');
+const { makeError, makePlainError } = require('../util/Util');
+
+/**
+ * Helper class for sharded clients spawned as a child process/worker, such as from a {@link ShardingManager}.
+ * Utilises IPC to send and receive data to/from the master process and other shards.
+ */
+class ShardClientUtil {
+ constructor(client, mode) {
+ /**
+ * Client for the shard
+ * @type {Client}
+ */
+ this.client = client;
+
+ /**
+ * Mode the shard was spawned with
+ * @type {ShardingManagerMode}
+ */
+ this.mode = mode;
+
+ /**
+ * Message port for the master process (only when {@link ShardClientUtil#mode} is `worker`)
+ * @type {?MessagePort}
+ */
+ this.parentPort = null;
+
+ switch (mode) {
+ case 'process':
+ process.on('message', this._handleMessage.bind(this));
+ client.on(Events.ShardReady, () => {
+ process.send({ _ready: true });
+ });
+ client.on(Events.ShardDisconnect, () => {
+ process.send({ _disconnect: true });
+ });
+ client.on(Events.ShardReconnecting, () => {
+ process.send({ _reconnecting: true });
+ });
+ client.on(Events.ShardResume, () => {
+ process.send({ _resume: true });
+ });
+ break;
+ case 'worker':
+ this.parentPort = require('node:worker_threads').parentPort;
+ this.parentPort.on('message', this._handleMessage.bind(this));
+ client.on(Events.ShardReady, () => {
+ this.parentPort.postMessage({ _ready: true });
+ });
+ client.on(Events.ShardDisconnect, () => {
+ this.parentPort.postMessage({ _disconnect: true });
+ });
+ client.on(Events.ShardReconnecting, () => {
+ this.parentPort.postMessage({ _reconnecting: true });
+ });
+ client.on(Events.ShardResume, () => {
+ this.parentPort.postMessage({ _resume: true });
+ });
+ break;
+ }
+ }
+
+ /**
+ * Array of shard ids of this client
+ * @type {number[]}
+ * @readonly
+ */
+ get ids() {
+ return this.client.options.shards;
+ }
+
+ /**
+ * Total number of shards
+ * @type {number}
+ * @readonly
+ */
+ get count() {
+ return this.client.options.shardCount;
+ }
+
+ /**
+ * Sends a message to the master process.
+ * @param {*} message Message to send
+ * @returns {Promise<void>}
+ * @emits Shard#message
+ */
+ send(message) {
+ return new Promise((resolve, reject) => {
+ switch (this.mode) {
+ case 'process':
+ process.send(message, err => {
+ if (err) reject(err);
+ else resolve();
+ });
+ break;
+ case 'worker':
+ this.parentPort.postMessage(message);
+ resolve();
+ break;
+ }
+ });
+ }
+
+ /**
+ * Fetches a client property value of each shard, or a given shard.
+ * @param {string} prop Name of the client property to get, using periods for nesting
+ * @param {number} [shard] Shard to fetch property from, all if undefined
+ * @returns {Promise<*|Array<*>>}
+ * @example
+ * client.shard.fetchClientValues('guilds.cache.size')
+ * .then(results => console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`))
+ * .catch(console.error);
+ * @see {@link ShardingManager#fetchClientValues}
+ */
+ fetchClientValues(prop, shard) {
+ return new Promise((resolve, reject) => {
+ const parent = this.parentPort ?? process;
+
+ const listener = message => {
+ if (message?._sFetchProp !== prop || message._sFetchPropShard !== shard) return;
+ parent.removeListener('message', listener);
+ this.decrementMaxListeners(parent);
+ if (!message._error) resolve(message._result);
+ else reject(makeError(message._error));
+ };
+ this.incrementMaxListeners(parent);
+ parent.on('message', listener);
+
+ this.send({ _sFetchProp: prop, _sFetchPropShard: shard }).catch(err => {
+ parent.removeListener('message', listener);
+ this.decrementMaxListeners(parent);
+ reject(err);
+ });
+ });
+ }
+
+ /**
+ * Evaluates a script or function on all shards, or a given shard, in the context of the {@link Client}s.
+ * @param {Function} script JavaScript to run on each shard
+ * @param {BroadcastEvalOptions} [options={}] The options for the broadcast
+ * @returns {Promise<*|Array<*>>} Results of the script execution
+ * @example
+ * client.shard.broadcastEval(client => client.guilds.cache.size)
+ * .then(results => console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`))
+ * .catch(console.error);
+ * @see {@link ShardingManager#broadcastEval}
+ */
+ broadcastEval(script, options = {}) {
+ return new Promise((resolve, reject) => {
+ const parent = this.parentPort ?? process;
+ if (typeof script !== 'function') {
+ reject(new DiscordjsTypeError(ErrorCodes.ShardingInvalidEvalBroadcast));
+ return;
+ }
+ script = `(${script})(this, ${JSON.stringify(options.context)})`;
+
+ const listener = message => {
+ if (message?._sEval !== script || message._sEvalShard !== options.shard) return;
+ parent.removeListener('message', listener);
+ this.decrementMaxListeners(parent);
+ if (!message._error) resolve(message._result);
+ else reject(makeError(message._error));
+ };
+ this.incrementMaxListeners(parent);
+ parent.on('message', listener);
+ this.send({ _sEval: script, _sEvalShard: options.shard }).catch(err => {
+ parent.removeListener('message', listener);
+ this.decrementMaxListeners(parent);
+ reject(err);
+ });
+ });
+ }
+
+ /**
+ * Requests a respawn of all shards.
+ * @param {MultipleShardRespawnOptions} [options] Options for respawning shards
+ * @returns {Promise<void>} Resolves upon the message being sent
+ * @see {@link ShardingManager#respawnAll}
+ */
+ respawnAll({ shardDelay = 5_000, respawnDelay = 500, timeout = 30_000 } = {}) {
+ return this.send({ _sRespawnAll: { shardDelay, respawnDelay, timeout } });
+ }
+
+ /**
+ * Handles an IPC message.
+ * @param {*} message Message received
+ * @private
+ */
+ async _handleMessage(message) {
+ if (!message) return;
+ if (message._fetchProp) {
+ try {
+ const props = message._fetchProp.split('.');
+ let value = this.client;
+ for (const prop of props) value = value[prop];
+ this._respond('fetchProp', { _fetchProp: message._fetchProp, _result: value });
+ } catch (err) {
+ this._respond('fetchProp', { _fetchProp: message._fetchProp, _error: makePlainError(err) });
+ }
+ } else if (message._eval) {
+ try {
+ this._respond('eval', { _eval: message._eval, _result: await this.client._eval(message._eval) });
+ } catch (err) {
+ this._respond('eval', { _eval: message._eval, _error: makePlainError(err) });
+ }
+ }
+ }
+
+ /**
+ * Sends a message to the master process, emitting an error from the client upon failure.
+ * @param {string} type Type of response to send
+ * @param {*} message Message to send
+ * @private
+ */
+ _respond(type, message) {
+ this.send(message).catch(err => {
+ const error = new Error(`Error when sending ${type} response to master process: ${err.message}`);
+ error.stack = err.stack;
+ /**
+ * Emitted when the client encounters an error.
+ * <warn>Errors thrown within this event do not have a catch handler, it is
+ * recommended to not use async functions as `error` event handlers. See the
+ * [Node.js docs](https://nodejs.org/api/events.html#capture-rejections-of-promises) for details.</warn>
+ * @event Client#error
+ * @param {Error} error The error encountered
+ */
+ this.client.emit(Events.Error, error);
+ });
+ }
+
+ /**
+ * Creates/gets the singleton of this class.
+ * @param {Client} client The client to use
+ * @param {ShardingManagerMode} mode Mode the shard was spawned with
+ * @returns {ShardClientUtil}
+ */
+ static singleton(client, mode) {
+ if (!this._singleton) {
+ this._singleton = new this(client, mode);
+ } else {
+ client.emit(
+ Events.Warn,
+ 'Multiple clients created in child process/worker; only the first will handle sharding helpers.',
+ );
+ }
+ return this._singleton;
+ }
+
+ /**
+ * Get the shard id for a given guild id.
+ * @param {Snowflake} guildId Snowflake guild id to get shard id for
+ * @param {number} shardCount Number of shards
+ * @returns {number}
+ */
+ static shardIdForGuildId(guildId, shardCount) {
+ const shard = calculateShardId(guildId, shardCount);
+ if (shard < 0) throw new DiscordjsError(ErrorCodes.ShardingShardMiscalculation, shard, guildId, shardCount);
+ return shard;
+ }
+
+ /**
+ * Increments max listeners by one for a given emitter, if they are not zero.
+ * @param {EventEmitter|process} emitter The emitter that emits the events.
+ * @private
+ */
+ incrementMaxListeners(emitter) {
+ const maxListeners = emitter.getMaxListeners();
+ if (maxListeners !== 0) {
+ emitter.setMaxListeners(maxListeners + 1);
+ }
+ }
+
+ /**
+ * Decrements max listeners by one for a given emitter, if they are not zero.
+ * @param {EventEmitter|process} emitter The emitter that emits the events.
+ * @private
+ */
+ decrementMaxListeners(emitter) {
+ const maxListeners = emitter.getMaxListeners();
+ if (maxListeners !== 0) {
+ emitter.setMaxListeners(maxListeners - 1);
+ }
+ }
+}
+
+module.exports = ShardClientUtil;
diff --git a/node_modules/discord.js/src/sharding/ShardingManager.js b/node_modules/discord.js/src/sharding/ShardingManager.js
new file mode 100644
index 0000000..288456a
--- /dev/null
+++ b/node_modules/discord.js/src/sharding/ShardingManager.js
@@ -0,0 +1,335 @@
+'use strict';
+
+const EventEmitter = require('node:events');
+const fs = require('node:fs');
+const path = require('node:path');
+const process = require('node:process');
+const { setTimeout: sleep } = require('node:timers/promises');
+const { Collection } = require('@discordjs/collection');
+const Shard = require('./Shard');
+const { DiscordjsError, DiscordjsTypeError, DiscordjsRangeError, ErrorCodes } = require('../errors');
+const { mergeDefault, fetchRecommendedShardCount } = require('../util/Util');
+
+/**
+ * This is a utility class that makes multi-process sharding of a bot an easy and painless experience.
+ * It works by spawning a self-contained {@link ChildProcess} or {@link Worker} for each individual shard, each
+ * containing its own instance of your bot's {@link Client}. They all have a line of communication with the master
+ * process, and there are several useful methods that utilise it in order to simplify tasks that are normally difficult
+ * with sharding. It can spawn a specific number of shards or the amount that Discord suggests for the bot, and takes a
+ * path to your main bot script to launch for each one.
+ * @extends {EventEmitter}
+ */
+class ShardingManager extends EventEmitter {
+ /**
+ * The mode to spawn shards with for a {@link ShardingManager}. Can be either one of:
+ * * 'process' to use child processes
+ * * 'worker' to use [Worker threads](https://nodejs.org/api/worker_threads.html)
+ * @typedef {string} ShardingManagerMode
+ */
+
+ /**
+ * The options to spawn shards with for a {@link ShardingManager}.
+ * @typedef {Object} ShardingManagerOptions
+ * @property {string|number} [totalShards='auto'] Number of total shards of all shard managers or "auto"
+ * @property {string|number[]} [shardList='auto'] List of shards to spawn or "auto"
+ * @property {ShardingManagerMode} [mode='process'] Which mode to use for shards
+ * @property {boolean} [respawn=true] Whether shards should automatically respawn upon exiting
+ * @property {boolean} [silent=false] Whether to pass the silent flag to child process
+ * (only available when mode is set to 'process')
+ * @property {string[]} [shardArgs=[]] Arguments to pass to the shard script when spawning
+ * (only available when mode is set to 'process')
+ * @property {string[]} [execArgv=[]] Arguments to pass to the shard script executable when spawning
+ * (only available when mode is set to 'process')
+ * @property {string} [token] Token to use for automatic shard count and passing to shards
+ */
+
+ /**
+ * @param {string} file Path to your shard script file
+ * @param {ShardingManagerOptions} [options] Options for the sharding manager
+ */
+ constructor(file, options = {}) {
+ super();
+ options = mergeDefault(
+ {
+ totalShards: 'auto',
+ mode: 'process',
+ respawn: true,
+ silent: false,
+ shardArgs: [],
+ execArgv: [],
+ token: process.env.DISCORD_TOKEN,
+ },
+ options,
+ );
+
+ /**
+ * Path to the shard script file
+ * @type {string}
+ */
+ this.file = file;
+ if (!file) throw new DiscordjsError(ErrorCodes.ClientInvalidOption, 'File', 'specified.');
+ if (!path.isAbsolute(file)) this.file = path.resolve(process.cwd(), file);
+ const stats = fs.statSync(this.file);
+ if (!stats.isFile()) throw new DiscordjsError(ErrorCodes.ClientInvalidOption, 'File', 'a file');
+
+ /**
+ * List of shards this sharding manager spawns
+ * @type {string|number[]}
+ */
+ this.shardList = options.shardList ?? 'auto';
+ if (this.shardList !== 'auto') {
+ if (!Array.isArray(this.shardList)) {
+ throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'shardList', 'an array.');
+ }
+ this.shardList = [...new Set(this.shardList)];
+ if (this.shardList.length < 1) {
+ throw new DiscordjsRangeError(ErrorCodes.ClientInvalidOption, 'shardList', 'at least 1 id.');
+ }
+ if (
+ this.shardList.some(
+ shardId => typeof shardId !== 'number' || isNaN(shardId) || !Number.isInteger(shardId) || shardId < 0,
+ )
+ ) {
+ throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'shardList', 'an array of positive integers.');
+ }
+ }
+
+ /**
+ * Amount of shards that all sharding managers spawn in total
+ * @type {number}
+ */
+ this.totalShards = options.totalShards || 'auto';
+ if (this.totalShards !== 'auto') {
+ if (typeof this.totalShards !== 'number' || isNaN(this.totalShards)) {
+ throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'Amount of shards', 'a number.');
+ }
+ if (this.totalShards < 1) {
+ throw new DiscordjsRangeError(ErrorCodes.ClientInvalidOption, 'Amount of shards', 'at least 1.');
+ }
+ if (!Number.isInteger(this.totalShards)) {
+ throw new DiscordjsRangeError(ErrorCodes.ClientInvalidOption, 'Amount of shards', 'an integer.');
+ }
+ }
+
+ /**
+ * Mode for shards to spawn with
+ * @type {ShardingManagerMode}
+ */
+ this.mode = options.mode;
+ if (this.mode !== 'process' && this.mode !== 'worker') {
+ throw new DiscordjsRangeError(ErrorCodes.ClientInvalidOption, 'Sharding mode', '"process" or "worker"');
+ }
+
+ /**
+ * Whether shards should automatically respawn upon exiting
+ * @type {boolean}
+ */
+ this.respawn = options.respawn;
+
+ /**
+ * Whether to pass the silent flag to child process (only when {@link ShardingManager#mode} is `process`)
+ * @type {boolean}
+ */
+ this.silent = options.silent;
+
+ /**
+ * An array of arguments to pass to shards (only when {@link ShardingManager#mode} is `process`)
+ * @type {string[]}
+ */
+ this.shardArgs = options.shardArgs;
+
+ /**
+ * An array of arguments to pass to the executable (only when {@link ShardingManager#mode} is `process`)
+ * @type {string[]}
+ */
+ this.execArgv = options.execArgv;
+
+ /**
+ * Token to use for obtaining the automatic shard count, and passing to shards
+ * @type {?string}
+ */
+ this.token = options.token?.replace(/^Bot\s*/i, '') ?? null;
+
+ /**
+ * A collection of shards that this manager has spawned
+ * @type {Collection<number, Shard>}
+ */
+ this.shards = new Collection();
+
+ process.env.SHARDING_MANAGER = true;
+ process.env.SHARDING_MANAGER_MODE = this.mode;
+ process.env.DISCORD_TOKEN = this.token;
+ }
+
+ /**
+ * Creates a single shard.
+ * <warn>Using this method is usually not necessary if you use the spawn method.</warn>
+ * @param {number} [id=this.shards.size] Id of the shard to create
+ * <info>This is usually not necessary to manually specify.</info>
+ * @returns {Shard} Note that the created shard needs to be explicitly spawned using its spawn method.
+ */
+ createShard(id = this.shards.size) {
+ const shard = new Shard(this, id);
+ this.shards.set(id, shard);
+ /**
+ * Emitted upon creating a shard.
+ * @event ShardingManager#shardCreate
+ * @param {Shard} shard Shard that was created
+ */
+ this.emit('shardCreate', shard);
+ return shard;
+ }
+
+ /**
+ * Options used to spawn multiple shards.
+ * @typedef {Object} MultipleShardSpawnOptions
+ * @property {number|string} [amount=this.totalShards] Number of shards to spawn
+ * @property {number} [delay=5500] How long to wait in between spawning each shard (in milliseconds)
+ * @property {number} [timeout=30000] The amount in milliseconds to wait until the {@link Client} has become ready
+ */
+
+ /**
+ * Spawns multiple shards.
+ * @param {MultipleShardSpawnOptions} [options] Options for spawning shards
+ * @returns {Promise<Collection<number, Shard>>}
+ */
+ async spawn({ amount = this.totalShards, delay = 5500, timeout = 30_000 } = {}) {
+ // Obtain/verify the number of shards to spawn
+ if (amount === 'auto') {
+ amount = await fetchRecommendedShardCount(this.token);
+ } else {
+ if (typeof amount !== 'number' || isNaN(amount)) {
+ throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'Amount of shards', 'a number.');
+ }
+ if (amount < 1) throw new DiscordjsRangeError(ErrorCodes.ClientInvalidOption, 'Amount of shards', 'at least 1.');
+ if (!Number.isInteger(amount)) {
+ throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'Amount of shards', 'an integer.');
+ }
+ }
+
+ // Make sure this many shards haven't already been spawned
+ if (this.shards.size >= amount) throw new DiscordjsError(ErrorCodes.ShardingAlreadySpawned, this.shards.size);
+ if (this.shardList === 'auto' || this.totalShards === 'auto' || this.totalShards !== amount) {
+ this.shardList = [...Array(amount).keys()];
+ }
+ if (this.totalShards === 'auto' || this.totalShards !== amount) {
+ this.totalShards = amount;
+ }
+
+ if (this.shardList.some(shardId => shardId >= amount)) {
+ throw new DiscordjsRangeError(
+ ErrorCodes.ClientInvalidOption,
+ 'Amount of shards',
+ 'bigger than the highest shardId in the shardList option.',
+ );
+ }
+
+ // Spawn the shards
+ for (const shardId of this.shardList) {
+ const promises = [];
+ const shard = this.createShard(shardId);
+ promises.push(shard.spawn(timeout));
+ if (delay > 0 && this.shards.size !== this.shardList.length) promises.push(sleep(delay));
+ await Promise.all(promises); // eslint-disable-line no-await-in-loop
+ }
+
+ return this.shards;
+ }
+
+ /**
+ * Sends a message to all shards.
+ * @param {*} message Message to be sent to the shards
+ * @returns {Promise<Shard[]>}
+ */
+ broadcast(message) {
+ const promises = [];
+ for (const shard of this.shards.values()) promises.push(shard.send(message));
+ return Promise.all(promises);
+ }
+
+ /**
+ * Options for {@link ShardingManager#broadcastEval} and {@link ShardClientUtil#broadcastEval}.
+ * @typedef {Object} BroadcastEvalOptions
+ * @property {number} [shard] Shard to run script on, all if undefined
+ * @property {*} [context] The JSON-serializable values to call the script with
+ */
+
+ /**
+ * Evaluates a script on all shards, or a given shard, in the context of the {@link Client}s.
+ * @param {Function} script JavaScript to run on each shard
+ * @param {BroadcastEvalOptions} [options={}] The options for the broadcast
+ * @returns {Promise<*|Array<*>>} Results of the script execution
+ */
+ broadcastEval(script, options = {}) {
+ if (typeof script !== 'function') {
+ return Promise.reject(new DiscordjsTypeError(ErrorCodes.ShardingInvalidEvalBroadcast));
+ }
+ return this._performOnShards('eval', [`(${script})(this, ${JSON.stringify(options.context)})`], options.shard);
+ }
+
+ /**
+ * Fetches a client property value of each shard, or a given shard.
+ * @param {string} prop Name of the client property to get, using periods for nesting
+ * @param {number} [shard] Shard to fetch property from, all if undefined
+ * @returns {Promise<*|Array<*>>}
+ * @example
+ * manager.fetchClientValues('guilds.cache.size')
+ * .then(results => console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`))
+ * .catch(console.error);
+ */
+ fetchClientValues(prop, shard) {
+ return this._performOnShards('fetchClientValue', [prop], shard);
+ }
+
+ /**
+ * Runs a method with given arguments on all shards, or a given shard.
+ * @param {string} method Method name to run on each shard
+ * @param {Array<*>} args Arguments to pass through to the method call
+ * @param {number} [shard] Shard to run on, all if undefined
+ * @returns {Promise<*|Array<*>>} Results of the method execution
+ * @private
+ */
+ _performOnShards(method, args, shard) {
+ if (this.shards.size === 0) return Promise.reject(new DiscordjsError(ErrorCodes.ShardingNoShards));
+
+ if (typeof shard === 'number') {
+ if (this.shards.has(shard)) return this.shards.get(shard)[method](...args);
+ return Promise.reject(new DiscordjsError(ErrorCodes.ShardingShardNotFound, shard));
+ }
+
+ if (this.shards.size !== this.shardList.length) {
+ return Promise.reject(new DiscordjsError(ErrorCodes.ShardingInProcess));
+ }
+
+ const promises = [];
+ for (const sh of this.shards.values()) promises.push(sh[method](...args));
+ return Promise.all(promises);
+ }
+
+ /**
+ * Options used to respawn all shards.
+ * @typedef {Object} MultipleShardRespawnOptions
+ * @property {number} [shardDelay=5000] How long to wait between shards (in milliseconds)
+ * @property {number} [respawnDelay=500] How long to wait between killing a shard's process and restarting it
+ * (in milliseconds)
+ * @property {number} [timeout=30000] The amount in milliseconds to wait for a shard to become ready before
+ * continuing to another (`-1` or `Infinity` for no wait)
+ */
+
+ /**
+ * Kills all running shards and respawns them.
+ * @param {MultipleShardRespawnOptions} [options] Options for respawning shards
+ * @returns {Promise<Collection<number, Shard>>}
+ */
+ async respawnAll({ shardDelay = 5_000, respawnDelay = 500, timeout = 30_000 } = {}) {
+ let s = 0;
+ for (const shard of this.shards.values()) {
+ const promises = [shard.respawn({ delay: respawnDelay, timeout })];
+ if (++s < this.shards.size && shardDelay > 0) promises.push(sleep(shardDelay));
+ await Promise.all(promises); // eslint-disable-line no-await-in-loop
+ }
+ return this.shards;
+ }
+}
+
+module.exports = ShardingManager;
diff --git a/node_modules/discord.js/src/structures/ActionRow.js b/node_modules/discord.js/src/structures/ActionRow.js
new file mode 100644
index 0000000..3f39691
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ActionRow.js
@@ -0,0 +1,46 @@
+'use strict';
+
+const { deprecate } = require('node:util');
+const { isJSONEncodable } = require('@discordjs/util');
+const Component = require('./Component');
+const { createComponent } = require('../util/Components');
+
+/**
+ * Represents an action row
+ * @extends {Component}
+ */
+class ActionRow extends Component {
+ constructor({ components, ...data }) {
+ super(data);
+
+ /**
+ * The components in this action row
+ * @type {Component[]}
+ * @readonly
+ */
+ this.components = components.map(c => createComponent(c));
+ }
+
+ /**
+ * Creates a new action row builder from JSON data
+ * @method from
+ * @memberof ActionRow
+ * @param {ActionRowBuilder|ActionRow|APIActionRowComponent} other The other data
+ * @returns {ActionRowBuilder}
+ * @deprecated Use {@link ActionRowBuilder.from} instead.
+ */
+ static from = deprecate(
+ other => new this(isJSONEncodable(other) ? other.toJSON() : other),
+ 'ActionRow.from() is deprecated. Use ActionRowBuilder.from() instead.',
+ );
+
+ /**
+ * Returns the API-compatible JSON for this component
+ * @returns {APIActionRowComponent}
+ */
+ toJSON() {
+ return { ...this.data, components: this.components.map(c => c.toJSON()) };
+ }
+}
+
+module.exports = ActionRow;
diff --git a/node_modules/discord.js/src/structures/ActionRowBuilder.js b/node_modules/discord.js/src/structures/ActionRowBuilder.js
new file mode 100644
index 0000000..962a378
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ActionRowBuilder.js
@@ -0,0 +1,35 @@
+'use strict';
+
+const { ActionRowBuilder: BuildersActionRow } = require('@discordjs/builders');
+const { isJSONEncodable } = require('@discordjs/util');
+const { createComponentBuilder } = require('../util/Components');
+const { toSnakeCase } = require('../util/Transformers');
+
+/**
+ * Represents an action row builder.
+ * @extends {BuildersActionRow}
+ */
+class ActionRowBuilder extends BuildersActionRow {
+ constructor({ components, ...data } = {}) {
+ super({
+ ...toSnakeCase(data),
+ components: components?.map(c => createComponentBuilder(c)),
+ });
+ }
+
+ /**
+ * Creates a new action row builder from JSON data
+ * @param {ActionRow|ActionRowBuilder|APIActionRowComponent} other The other data
+ * @returns {ActionRowBuilder}
+ */
+ static from(other) {
+ return new this(isJSONEncodable(other) ? other.toJSON() : other);
+ }
+}
+
+module.exports = ActionRowBuilder;
+
+/**
+ * @external BuildersActionRow
+ * @see {@link https://discord.js.org/docs/packages/builders/stable/ActionRowBuilder:Class}
+ */
diff --git a/node_modules/discord.js/src/structures/AnonymousGuild.js b/node_modules/discord.js/src/structures/AnonymousGuild.js
new file mode 100644
index 0000000..70931bd
--- /dev/null
+++ b/node_modules/discord.js/src/structures/AnonymousGuild.js
@@ -0,0 +1,97 @@
+'use strict';
+
+const BaseGuild = require('./BaseGuild');
+
+/**
+ * Bundles common attributes and methods between {@link Guild} and {@link InviteGuild}
+ * @extends {BaseGuild}
+ * @abstract
+ */
+class AnonymousGuild extends BaseGuild {
+ constructor(client, data, immediatePatch = true) {
+ super(client, data);
+ if (immediatePatch) this._patch(data);
+ }
+
+ _patch(data) {
+ if ('features' in data) this.features = data.features;
+
+ if ('splash' in data) {
+ /**
+ * The hash of the guild invite splash image
+ * @type {?string}
+ */
+ this.splash = data.splash;
+ }
+
+ if ('banner' in data) {
+ /**
+ * The hash of the guild banner
+ * @type {?string}
+ */
+ this.banner = data.banner;
+ }
+
+ if ('description' in data) {
+ /**
+ * The description of the guild, if any
+ * @type {?string}
+ */
+ this.description = data.description;
+ }
+
+ if ('verification_level' in data) {
+ /**
+ * The verification level of the guild
+ * @type {GuildVerificationLevel}
+ */
+ this.verificationLevel = data.verification_level;
+ }
+
+ if ('vanity_url_code' in data) {
+ /**
+ * The vanity invite code of the guild, if any
+ * @type {?string}
+ */
+ this.vanityURLCode = data.vanity_url_code;
+ }
+
+ if ('nsfw_level' in data) {
+ /**
+ * The NSFW level of this guild
+ * @type {GuildNSFWLevel}
+ */
+ this.nsfwLevel = data.nsfw_level;
+ }
+
+ if ('premium_subscription_count' in data) {
+ /**
+ * The total number of boosts for this server
+ * @type {?number}
+ */
+ this.premiumSubscriptionCount = data.premium_subscription_count;
+ } else {
+ this.premiumSubscriptionCount ??= null;
+ }
+ }
+
+ /**
+ * The URL to this guild's banner.
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ bannerURL(options = {}) {
+ return this.banner && this.client.rest.cdn.banner(this.id, this.banner, options);
+ }
+
+ /**
+ * The URL to this guild's invite splash image.
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ splashURL(options = {}) {
+ return this.splash && this.client.rest.cdn.splash(this.id, this.splash, options);
+ }
+}
+
+module.exports = AnonymousGuild;
diff --git a/node_modules/discord.js/src/structures/ApplicationCommand.js b/node_modules/discord.js/src/structures/ApplicationCommand.js
new file mode 100644
index 0000000..bd87281
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ApplicationCommand.js
@@ -0,0 +1,606 @@
+'use strict';
+
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const { ApplicationCommandOptionType } = require('discord-api-types/v10');
+const isEqual = require('fast-deep-equal');
+const Base = require('./Base');
+const ApplicationCommandPermissionsManager = require('../managers/ApplicationCommandPermissionsManager');
+const PermissionsBitField = require('../util/PermissionsBitField');
+
+/**
+ * Represents an application command.
+ * @extends {Base}
+ */
+class ApplicationCommand extends Base {
+ constructor(client, data, guild, guildId) {
+ super(client);
+
+ /**
+ * The command's id
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+
+ /**
+ * The parent application's id
+ * @type {Snowflake}
+ */
+ this.applicationId = data.application_id;
+
+ /**
+ * The guild this command is part of
+ * @type {?Guild}
+ */
+ this.guild = guild ?? null;
+
+ /**
+ * The guild's id this command is part of, this may be non-null when `guild` is `null` if the command
+ * was fetched from the `ApplicationCommandManager`
+ * @type {?Snowflake}
+ */
+ this.guildId = guild?.id ?? guildId ?? null;
+
+ /**
+ * The manager for permissions of this command on its guild or arbitrary guilds when the command is global
+ * @type {ApplicationCommandPermissionsManager}
+ */
+ this.permissions = new ApplicationCommandPermissionsManager(this);
+
+ /**
+ * The type of this application command
+ * @type {ApplicationCommandType}
+ */
+ this.type = data.type;
+
+ /**
+ * Whether this command is age-restricted (18+)
+ * @type {boolean}
+ */
+ this.nsfw = data.nsfw ?? false;
+
+ this._patch(data);
+ }
+
+ _patch(data) {
+ if ('name' in data) {
+ /**
+ * The name of this command
+ * @type {string}
+ */
+ this.name = data.name;
+ }
+
+ if ('name_localizations' in data) {
+ /**
+ * The name localizations for this command
+ * @type {?Object<Locale, string>}
+ */
+ this.nameLocalizations = data.name_localizations;
+ } else {
+ this.nameLocalizations ??= null;
+ }
+
+ if ('name_localized' in data) {
+ /**
+ * The localized name for this command
+ * @type {?string}
+ */
+ this.nameLocalized = data.name_localized;
+ } else {
+ this.nameLocalized ??= null;
+ }
+
+ if ('description' in data) {
+ /**
+ * The description of this command
+ * @type {string}
+ */
+ this.description = data.description;
+ }
+
+ if ('description_localizations' in data) {
+ /**
+ * The description localizations for this command
+ * @type {?Object<Locale, string>}
+ */
+ this.descriptionLocalizations = data.description_localizations;
+ } else {
+ this.descriptionLocalizations ??= null;
+ }
+
+ if ('description_localized' in data) {
+ /**
+ * The localized description for this command
+ * @type {?string}
+ */
+ this.descriptionLocalized = data.description_localized;
+ } else {
+ this.descriptionLocalized ??= null;
+ }
+
+ if ('options' in data) {
+ /**
+ * The options of this command
+ * @type {ApplicationCommandOption[]}
+ */
+ this.options = data.options.map(o => this.constructor.transformOption(o, true));
+ } else {
+ this.options ??= [];
+ }
+
+ if ('default_member_permissions' in data) {
+ /**
+ * The default bitfield used to determine whether this command be used in a guild
+ * @type {?Readonly<PermissionsBitField>}
+ */
+ this.defaultMemberPermissions = data.default_member_permissions
+ ? new PermissionsBitField(BigInt(data.default_member_permissions)).freeze()
+ : null;
+ } else {
+ this.defaultMemberPermissions ??= null;
+ }
+
+ if ('dm_permission' in data) {
+ /**
+ * Whether the command can be used in DMs
+ * <info>This property is always `null` on guild commands</info>
+ * @type {boolean|null}
+ */
+ this.dmPermission = data.dm_permission;
+ } else {
+ this.dmPermission ??= null;
+ }
+
+ if ('version' in data) {
+ /**
+ * Autoincrementing version identifier updated during substantial record changes
+ * @type {Snowflake}
+ */
+ this.version = data.version;
+ }
+ }
+
+ /**
+ * The timestamp the command was created at
+ * @type {number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return DiscordSnowflake.timestampFrom(this.id);
+ }
+
+ /**
+ * The time the command was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ /**
+ * The manager that this command belongs to
+ * @type {ApplicationCommandManager}
+ * @readonly
+ */
+ get manager() {
+ return (this.guild ?? this.client.application).commands;
+ }
+
+ /**
+ * Data for creating or editing an application command.
+ * @typedef {Object} ApplicationCommandData
+ * @property {string} name The name of the command, must be in all lowercase if type is
+ * {@link ApplicationCommandType.ChatInput}
+ * @property {Object<Locale, string>} [nameLocalizations] The localizations for the command name
+ * @property {string} description The description of the command, if type is {@link ApplicationCommandType.ChatInput}
+ * @property {boolean} [nsfw] Whether the command is age-restricted
+ * @property {Object<Locale, string>} [descriptionLocalizations] The localizations for the command description,
+ * if type is {@link ApplicationCommandType.ChatInput}
+ * @property {ApplicationCommandType} [type=ApplicationCommandType.ChatInput] The type of the command
+ * @property {ApplicationCommandOptionData[]} [options] Options for the command
+ * @property {?PermissionResolvable} [defaultMemberPermissions] The bitfield used to determine the default permissions
+ * a member needs in order to run the command
+ * @property {boolean} [dmPermission] Whether the command is enabled in DMs
+ */
+
+ /**
+ * An option for an application command or subcommand.
+ * <info>In addition to the listed properties, when used as a parameter,
+ * API style `snake_case` properties can be used for compatibility with generators like `@discordjs/builders`.</info>
+ * <warn>Note that providing a value for the `camelCase` counterpart for any `snake_case` property
+ * will discard the provided `snake_case` property.</warn>
+ * @typedef {Object} ApplicationCommandOptionData
+ * @property {ApplicationCommandOptionType} type The type of the option
+ * @property {string} name The name of the option
+ * @property {Object<Locale, string>} [nameLocalizations] The name localizations for the option
+ * @property {string} description The description of the option
+ * @property {Object<Locale, string>} [descriptionLocalizations] The description localizations for the option
+ * @property {boolean} [autocomplete] Whether the autocomplete interaction is enabled for a
+ * {@link ApplicationCommandOptionType.String}, {@link ApplicationCommandOptionType.Integer} or
+ * {@link ApplicationCommandOptionType.Number} option
+ * @property {boolean} [required] Whether the option is required
+ * @property {ApplicationCommandOptionChoiceData[]} [choices] The choices of the option for the user to pick from
+ * @property {ApplicationCommandOptionData[]} [options] Additional options if this option is a subcommand (group)
+ * @property {ChannelType[]} [channelTypes] When the option type is channel,
+ * the allowed types of channels that can be selected
+ * @property {number} [minValue] The minimum value for an {@link ApplicationCommandOptionType.Integer} or
+ * {@link ApplicationCommandOptionType.Number} option
+ * @property {number} [maxValue] The maximum value for an {@link ApplicationCommandOptionType.Integer} or
+ * {@link ApplicationCommandOptionType.Number} option
+ * @property {number} [minLength] The minimum length for an {@link ApplicationCommandOptionType.String} option
+ * (maximum of `6000`)
+ * @property {number} [maxLength] The maximum length for an {@link ApplicationCommandOptionType.String} option
+ * (maximum of `6000`)
+ */
+
+ /**
+ * @typedef {Object} ApplicationCommandOptionChoiceData
+ * @property {string} name The name of the choice
+ * @property {Object<Locale, string>} [nameLocalizations] The localized names for this choice
+ * @property {string|number} value The value of the choice
+ */
+
+ /**
+ * Edits this application command.
+ * @param {Partial<ApplicationCommandData>} data The data to update the command with
+ * @returns {Promise<ApplicationCommand>}
+ * @example
+ * // Edit the description of this command
+ * command.edit({
+ * description: 'New description',
+ * })
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ edit(data) {
+ return this.manager.edit(this, data, this.guildId);
+ }
+
+ /**
+ * Edits the name of this ApplicationCommand
+ * @param {string} name The new name of the command
+ * @returns {Promise<ApplicationCommand>}
+ */
+ setName(name) {
+ return this.edit({ name });
+ }
+
+ /**
+ * Edits the localized names of this ApplicationCommand
+ * @param {Object<Locale, string>} nameLocalizations The new localized names for the command
+ * @returns {Promise<ApplicationCommand>}
+ * @example
+ * // Edit the name localizations of this command
+ * command.setLocalizedNames({
+ * 'en-GB': 'test',
+ * 'pt-BR': 'teste',
+ * })
+ * .then(console.log)
+ * .catch(console.error)
+ */
+ setNameLocalizations(nameLocalizations) {
+ return this.edit({ nameLocalizations });
+ }
+
+ /**
+ * Edits the description of this ApplicationCommand
+ * @param {string} description The new description of the command
+ * @returns {Promise<ApplicationCommand>}
+ */
+ setDescription(description) {
+ return this.edit({ description });
+ }
+
+ /**
+ * Edits the localized descriptions of this ApplicationCommand
+ * @param {Object<Locale, string>} descriptionLocalizations The new localized descriptions for the command
+ * @returns {Promise<ApplicationCommand>}
+ * @example
+ * // Edit the description localizations of this command
+ * command.setDescriptionLocalizations({
+ * 'en-GB': 'A test command',
+ * 'pt-BR': 'Um comando de teste',
+ * })
+ * .then(console.log)
+ * .catch(console.error)
+ */
+ setDescriptionLocalizations(descriptionLocalizations) {
+ return this.edit({ descriptionLocalizations });
+ }
+
+ /**
+ * Edits the default member permissions of this ApplicationCommand
+ * @param {?PermissionResolvable} defaultMemberPermissions The default member permissions required to run this command
+ * @returns {Promise<ApplicationCommand>}
+ */
+ setDefaultMemberPermissions(defaultMemberPermissions) {
+ return this.edit({ defaultMemberPermissions });
+ }
+
+ /**
+ * Edits the DM permission of this ApplicationCommand
+ * @param {boolean} [dmPermission=true] Whether the command can be used in DMs
+ * @returns {Promise<ApplicationCommand>}
+ */
+ setDMPermission(dmPermission = true) {
+ return this.edit({ dmPermission });
+ }
+
+ /**
+ * Edits the options of this ApplicationCommand
+ * @param {ApplicationCommandOptionData[]} options The options to set for this command
+ * @returns {Promise<ApplicationCommand>}
+ */
+ setOptions(options) {
+ return this.edit({ options });
+ }
+
+ /**
+ * Deletes this command.
+ * @returns {Promise<ApplicationCommand>}
+ * @example
+ * // Delete this command
+ * command.delete()
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ delete() {
+ return this.manager.delete(this, this.guildId);
+ }
+
+ /**
+ * Whether this command equals another command. It compares all properties, so for most operations
+ * it is advisable to just compare `command.id === command2.id` as it is much faster and is often
+ * what most users need.
+ * @param {ApplicationCommand|ApplicationCommandData|APIApplicationCommand} command The command to compare with
+ * @param {boolean} [enforceOptionOrder=false] Whether to strictly check that options and choices are in the same
+ * order in the array <info>The client may not always respect this ordering!</info>
+ * @returns {boolean}
+ */
+ equals(command, enforceOptionOrder = false) {
+ // If given an id, check if the id matches
+ if (command.id && this.id !== command.id) return false;
+
+ let defaultMemberPermissions = null;
+ let dmPermission = command.dmPermission ?? command.dm_permission;
+
+ if ('default_member_permissions' in command) {
+ defaultMemberPermissions = command.default_member_permissions
+ ? new PermissionsBitField(BigInt(command.default_member_permissions)).bitfield
+ : null;
+ }
+
+ if ('defaultMemberPermissions' in command) {
+ defaultMemberPermissions =
+ command.defaultMemberPermissions !== null
+ ? new PermissionsBitField(command.defaultMemberPermissions).bitfield
+ : null;
+ }
+
+ // Check top level parameters
+ if (
+ command.name !== this.name ||
+ ('description' in command && command.description !== this.description) ||
+ ('version' in command && command.version !== this.version) ||
+ (command.type && command.type !== this.type) ||
+ ('nsfw' in command && command.nsfw !== this.nsfw) ||
+ // Future proof for options being nullable
+ // TODO: remove ?? 0 on each when nullable
+ (command.options?.length ?? 0) !== (this.options?.length ?? 0) ||
+ defaultMemberPermissions !== (this.defaultMemberPermissions?.bitfield ?? null) ||
+ (dmPermission !== undefined && dmPermission !== this.dmPermission) ||
+ !isEqual(command.nameLocalizations ?? command.name_localizations ?? {}, this.nameLocalizations ?? {}) ||
+ !isEqual(
+ command.descriptionLocalizations ?? command.description_localizations ?? {},
+ this.descriptionLocalizations ?? {},
+ )
+ ) {
+ return false;
+ }
+
+ if (command.options) {
+ return this.constructor.optionsEqual(this.options, command.options, enforceOptionOrder);
+ }
+ return true;
+ }
+
+ /**
+ * Recursively checks that all options for an {@link ApplicationCommand} are equal to the provided options.
+ * In most cases it is better to compare using {@link ApplicationCommand#equals}
+ * @param {ApplicationCommandOptionData[]} existing The options on the existing command,
+ * should be {@link ApplicationCommand#options}
+ * @param {ApplicationCommandOptionData[]|APIApplicationCommandOption[]} options The options to compare against
+ * @param {boolean} [enforceOptionOrder=false] Whether to strictly check that options and choices are in the same
+ * order in the array <info>The client may not always respect this ordering!</info>
+ * @returns {boolean}
+ */
+ static optionsEqual(existing, options, enforceOptionOrder = false) {
+ if (existing.length !== options.length) return false;
+ if (enforceOptionOrder) {
+ return existing.every((option, index) => this._optionEquals(option, options[index], enforceOptionOrder));
+ }
+ const newOptions = new Map(options.map(option => [option.name, option]));
+ for (const option of existing) {
+ const foundOption = newOptions.get(option.name);
+ if (!foundOption || !this._optionEquals(option, foundOption)) return false;
+ }
+ return true;
+ }
+
+ /**
+ * Checks that an option for an {@link ApplicationCommand} is equal to the provided option
+ * In most cases it is better to compare using {@link ApplicationCommand#equals}
+ * @param {ApplicationCommandOptionData} existing The option on the existing command,
+ * should be from {@link ApplicationCommand#options}
+ * @param {ApplicationCommandOptionData|APIApplicationCommandOption} option The option to compare against
+ * @param {boolean} [enforceOptionOrder=false] Whether to strictly check that options or choices are in the same
+ * order in their array <info>The client may not always respect this ordering!</info>
+ * @returns {boolean}
+ * @private
+ */
+ static _optionEquals(existing, option, enforceOptionOrder = false) {
+ if (
+ option.name !== existing.name ||
+ option.type !== existing.type ||
+ option.description !== existing.description ||
+ option.autocomplete !== existing.autocomplete ||
+ (option.required ??
+ ([ApplicationCommandOptionType.Subcommand, ApplicationCommandOptionType.SubcommandGroup].includes(option.type)
+ ? undefined
+ : false)) !== existing.required ||
+ option.choices?.length !== existing.choices?.length ||
+ option.options?.length !== existing.options?.length ||
+ (option.channelTypes ?? option.channel_types)?.length !== existing.channelTypes?.length ||
+ (option.minValue ?? option.min_value) !== existing.minValue ||
+ (option.maxValue ?? option.max_value) !== existing.maxValue ||
+ (option.minLength ?? option.min_length) !== existing.minLength ||
+ (option.maxLength ?? option.max_length) !== existing.maxLength ||
+ !isEqual(option.nameLocalizations ?? option.name_localizations ?? {}, existing.nameLocalizations ?? {}) ||
+ !isEqual(
+ option.descriptionLocalizations ?? option.description_localizations ?? {},
+ existing.descriptionLocalizations ?? {},
+ )
+ ) {
+ return false;
+ }
+
+ if (existing.choices) {
+ if (
+ enforceOptionOrder &&
+ !existing.choices.every(
+ (choice, index) =>
+ choice.name === option.choices[index].name &&
+ choice.value === option.choices[index].value &&
+ isEqual(
+ choice.nameLocalizations ?? {},
+ option.choices[index].nameLocalizations ?? option.choices[index].name_localizations ?? {},
+ ),
+ )
+ ) {
+ return false;
+ }
+ if (!enforceOptionOrder) {
+ const newChoices = new Map(option.choices.map(choice => [choice.name, choice]));
+ for (const choice of existing.choices) {
+ const foundChoice = newChoices.get(choice.name);
+ if (!foundChoice || foundChoice.value !== choice.value) return false;
+ }
+ }
+ }
+
+ if (existing.channelTypes) {
+ const newTypes = option.channelTypes ?? option.channel_types;
+ for (const type of existing.channelTypes) {
+ if (!newTypes.includes(type)) return false;
+ }
+ }
+
+ if (existing.options) {
+ return this.optionsEqual(existing.options, option.options, enforceOptionOrder);
+ }
+ return true;
+ }
+
+ /**
+ * An option for an application command or subcommand.
+ * @typedef {Object} ApplicationCommandOption
+ * @property {ApplicationCommandOptionType} type The type of the option
+ * @property {string} name The name of the option
+ * @property {Object<Locale, string>} [nameLocalizations] The localizations for the option name
+ * @property {string} [nameLocalized] The localized name for this option
+ * @property {string} description The description of the option
+ * @property {Object<Locale, string>} [descriptionLocalizations] The localizations for the option description
+ * @property {string} [descriptionLocalized] The localized description for this option
+ * @property {boolean} [required] Whether the option is required
+ * @property {boolean} [autocomplete] Whether the autocomplete interaction is enabled for a
+ * {@link ApplicationCommandOptionType.String}, {@link ApplicationCommandOptionType.Integer} or
+ * {@link ApplicationCommandOptionType.Number} option
+ * @property {ApplicationCommandOptionChoice[]} [choices] The choices of the option for the user to pick from
+ * @property {ApplicationCommandOption[]} [options] Additional options if this option is a subcommand (group)
+ * @property {ApplicationCommandOptionAllowedChannelTypes[]} [channelTypes] When the option type is channel,
+ * the allowed types of channels that can be selected
+ * @property {number} [minValue] The minimum value for an {@link ApplicationCommandOptionType.Integer} or
+ * {@link ApplicationCommandOptionType.Number} option
+ * @property {number} [maxValue] The maximum value for an {@link ApplicationCommandOptionType.Integer} or
+ * {@link ApplicationCommandOptionType.Number} option
+ * @property {number} [minLength] The minimum length for an {@link ApplicationCommandOptionType.String} option
+ * (maximum of `6000`)
+ * @property {number} [maxLength] The maximum length for an {@link ApplicationCommandOptionType.String} option
+ * (maximum of `6000`)
+ */
+
+ /**
+ * A choice for an application command option.
+ * @typedef {Object} ApplicationCommandOptionChoice
+ * @property {string} name The name of the choice
+ * @property {?string} nameLocalized The localized name of the choice in the provided locale, if any
+ * @property {?Object<string, string>} [nameLocalizations] The localized names for this choice
+ * @property {string|number} value The value of the choice
+ */
+
+ /**
+ * Transforms an {@link ApplicationCommandOptionData} object into something that can be used with the API.
+ * @param {ApplicationCommandOptionData|ApplicationCommandOption} option The option to transform
+ * @param {boolean} [received] Whether this option has been received from Discord
+ * @returns {APIApplicationCommandOption}
+ * @private
+ */
+ static transformOption(option, received) {
+ const channelTypesKey = received ? 'channelTypes' : 'channel_types';
+ const minValueKey = received ? 'minValue' : 'min_value';
+ const maxValueKey = received ? 'maxValue' : 'max_value';
+ const minLengthKey = received ? 'minLength' : 'min_length';
+ const maxLengthKey = received ? 'maxLength' : 'max_length';
+ const nameLocalizationsKey = received ? 'nameLocalizations' : 'name_localizations';
+ const nameLocalizedKey = received ? 'nameLocalized' : 'name_localized';
+ const descriptionLocalizationsKey = received ? 'descriptionLocalizations' : 'description_localizations';
+ const descriptionLocalizedKey = received ? 'descriptionLocalized' : 'description_localized';
+ return {
+ type: option.type,
+ name: option.name,
+ [nameLocalizationsKey]: option.nameLocalizations ?? option.name_localizations,
+ [nameLocalizedKey]: option.nameLocalized ?? option.name_localized,
+ description: option.description,
+ [descriptionLocalizationsKey]: option.descriptionLocalizations ?? option.description_localizations,
+ [descriptionLocalizedKey]: option.descriptionLocalized ?? option.description_localized,
+ required:
+ option.required ??
+ (option.type === ApplicationCommandOptionType.Subcommand ||
+ option.type === ApplicationCommandOptionType.SubcommandGroup
+ ? undefined
+ : false),
+ autocomplete: option.autocomplete,
+ choices: option.choices?.map(choice => ({
+ name: choice.name,
+ [nameLocalizedKey]: choice.nameLocalized ?? choice.name_localized,
+ [nameLocalizationsKey]: choice.nameLocalizations ?? choice.name_localizations,
+ value: choice.value,
+ })),
+ options: option.options?.map(o => this.transformOption(o, received)),
+ [channelTypesKey]: option.channelTypes ?? option.channel_types,
+ [minValueKey]: option.minValue ?? option.min_value,
+ [maxValueKey]: option.maxValue ?? option.max_value,
+ [minLengthKey]: option.minLength ?? option.min_length,
+ [maxLengthKey]: option.maxLength ?? option.max_length,
+ };
+ }
+}
+
+module.exports = ApplicationCommand;
+
+/* eslint-disable max-len */
+/**
+ * @external APIApplicationCommand
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-structure}
+ */
+
+/**
+ * @external APIApplicationCommandOption
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure}
+ */
+
+/**
+ * @external ApplicationCommandOptionAllowedChannelTypes
+ * @see {@link https://discord.js.org/docs/packages/builders/stable/ApplicationCommandOptionAllowedChannelTypes:TypeAlias}
+ */
diff --git a/node_modules/discord.js/src/structures/ApplicationRoleConnectionMetadata.js b/node_modules/discord.js/src/structures/ApplicationRoleConnectionMetadata.js
new file mode 100644
index 0000000..7ed9b33
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ApplicationRoleConnectionMetadata.js
@@ -0,0 +1,46 @@
+'use strict';
+
+/**
+ * Role connection metadata object for an application.
+ */
+class ApplicationRoleConnectionMetadata {
+ constructor(data) {
+ /**
+ * The name of this metadata field
+ * @type {string}
+ */
+ this.name = data.name;
+
+ /**
+ * The name localizations for this metadata field
+ * @type {?Object<Locale, string>}
+ */
+ this.nameLocalizations = data.name_localizations ?? null;
+
+ /**
+ * The description of this metadata field
+ * @type {string}
+ */
+ this.description = data.description;
+
+ /**
+ * The description localizations for this metadata field
+ * @type {?Object<Locale, string>}
+ */
+ this.descriptionLocalizations = data.description_localizations ?? null;
+
+ /**
+ * The dictionary key for this metadata field
+ * @type {string}
+ */
+ this.key = data.key;
+
+ /**
+ * The type of this metadata field
+ * @type {ApplicationRoleConnectionMetadataType}
+ */
+ this.type = data.type;
+ }
+}
+
+exports.ApplicationRoleConnectionMetadata = ApplicationRoleConnectionMetadata;
diff --git a/node_modules/discord.js/src/structures/Attachment.js b/node_modules/discord.js/src/structures/Attachment.js
new file mode 100644
index 0000000..2576ff5
--- /dev/null
+++ b/node_modules/discord.js/src/structures/Attachment.js
@@ -0,0 +1,151 @@
+'use strict';
+
+const AttachmentFlagsBitField = require('../util/AttachmentFlagsBitField.js');
+const { basename, flatten } = require('../util/Util');
+
+/**
+ * @typedef {Object} AttachmentPayload
+ * @property {?string} name The name of the attachment
+ * @property {Stream|BufferResolvable} attachment The attachment in this payload
+ * @property {?string} description The description of the attachment
+ */
+
+/**
+ * Represents an attachment
+ */
+class Attachment {
+ constructor(data) {
+ this.attachment = data.url;
+ /**
+ * The name of this attachment
+ * @type {string}
+ */
+ this.name = data.filename;
+ this._patch(data);
+ }
+
+ _patch(data) {
+ /**
+ * The attachment's id
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+
+ if ('size' in data) {
+ /**
+ * The size of this attachment in bytes
+ * @type {number}
+ */
+ this.size = data.size;
+ }
+
+ if ('url' in data) {
+ /**
+ * The URL to this attachment
+ * @type {string}
+ */
+ this.url = data.url;
+ }
+
+ if ('proxy_url' in data) {
+ /**
+ * The Proxy URL to this attachment
+ * @type {string}
+ */
+ this.proxyURL = data.proxy_url;
+ }
+
+ if ('height' in data) {
+ /**
+ * The height of this attachment (if an image or video)
+ * @type {?number}
+ */
+ this.height = data.height;
+ } else {
+ this.height ??= null;
+ }
+
+ if ('width' in data) {
+ /**
+ * The width of this attachment (if an image or video)
+ * @type {?number}
+ */
+ this.width = data.width;
+ } else {
+ this.width ??= null;
+ }
+
+ if ('content_type' in data) {
+ /**
+ * The media type of this attachment
+ * @type {?string}
+ */
+ this.contentType = data.content_type;
+ } else {
+ this.contentType ??= null;
+ }
+
+ if ('description' in data) {
+ /**
+ * The description (alt text) of this attachment
+ * @type {?string}
+ */
+ this.description = data.description;
+ } else {
+ this.description ??= null;
+ }
+
+ /**
+ * Whether this attachment is ephemeral
+ * @type {boolean}
+ */
+ this.ephemeral = data.ephemeral ?? false;
+
+ if ('duration_secs' in data) {
+ /**
+ * The duration of this attachment in seconds
+ * <info>This will only be available if the attachment is an audio file.</info>
+ * @type {?number}
+ */
+ this.duration = data.duration_secs;
+ } else {
+ this.duration ??= null;
+ }
+
+ if ('waveform' in data) {
+ /**
+ * The base64 encoded byte array representing a sampled waveform
+ * <info>This will only be available if the attachment is an audio file.</info>
+ * @type {?string}
+ */
+ this.waveform = data.waveform;
+ } else {
+ this.waveform ??= null;
+ }
+
+ if ('flags' in data) {
+ /**
+ * The flags of this attachment
+ * @type {Readonly<AttachmentFlagsBitField>}
+ */
+ this.flags = new AttachmentFlagsBitField(data.flags).freeze();
+ } else {
+ this.flags ??= new AttachmentFlagsBitField().freeze();
+ }
+ }
+
+ /**
+ * Whether or not this attachment has been marked as a spoiler
+ * @type {boolean}
+ * @readonly
+ */
+ get spoiler() {
+ return basename(this.url ?? this.name).startsWith('SPOILER_');
+ }
+
+ toJSON() {
+ return flatten(this);
+ }
+}
+
+module.exports = Attachment;
diff --git a/node_modules/discord.js/src/structures/AttachmentBuilder.js b/node_modules/discord.js/src/structures/AttachmentBuilder.js
new file mode 100644
index 0000000..6c63810
--- /dev/null
+++ b/node_modules/discord.js/src/structures/AttachmentBuilder.js
@@ -0,0 +1,116 @@
+'use strict';
+
+const { basename, flatten } = require('../util/Util');
+
+/**
+ * Represents an attachment builder
+ */
+class AttachmentBuilder {
+ /**
+ * @param {BufferResolvable|Stream} attachment The file
+ * @param {AttachmentData} [data] Extra data
+ */
+ constructor(attachment, data = {}) {
+ /**
+ * The file associated with this attachment.
+ * @type {BufferResolvable|Stream}
+ */
+ this.attachment = attachment;
+ /**
+ * The name of this attachment
+ * @type {?string}
+ */
+ this.name = data.name;
+ /**
+ * The description of the attachment
+ * @type {?string}
+ */
+ this.description = data.description;
+ }
+
+ /**
+ * Sets the description of this attachment.
+ * @param {string} description The description of the file
+ * @returns {AttachmentBuilder} This attachment
+ */
+ setDescription(description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Sets the file of this attachment.
+ * @param {BufferResolvable|Stream} attachment The file
+ * @returns {AttachmentBuilder} This attachment
+ */
+ setFile(attachment) {
+ this.attachment = attachment;
+ return this;
+ }
+
+ /**
+ * Sets the name of this attachment.
+ * @param {string} name The name of the file
+ * @returns {AttachmentBuilder} This attachment
+ */
+ setName(name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Sets whether this attachment is a spoiler
+ * @param {boolean} [spoiler=true] Whether the attachment should be marked as a spoiler
+ * @returns {AttachmentBuilder} This attachment
+ */
+ setSpoiler(spoiler = true) {
+ if (spoiler === this.spoiler) return this;
+
+ if (!spoiler) {
+ while (this.spoiler) {
+ this.name = this.name.slice('SPOILER_'.length);
+ }
+ return this;
+ }
+ this.name = `SPOILER_${this.name}`;
+ return this;
+ }
+
+ /**
+ * Whether or not this attachment has been marked as a spoiler
+ * @type {boolean}
+ * @readonly
+ */
+ get spoiler() {
+ return basename(this.name).startsWith('SPOILER_');
+ }
+
+ toJSON() {
+ return flatten(this);
+ }
+
+ /**
+ * Makes a new builder instance from a preexisting attachment structure.
+ * @param {AttachmentBuilder|Attachment|AttachmentPayload} other The builder to construct a new instance from
+ * @returns {AttachmentBuilder}
+ */
+ static from(other) {
+ return new AttachmentBuilder(other.attachment, {
+ name: other.name,
+ description: other.description,
+ });
+ }
+}
+
+module.exports = AttachmentBuilder;
+
+/**
+ * @external APIAttachment
+ * @see {@link https://discord.com/developers/docs/resources/channel#attachment-object}
+ */
+
+/**
+ * @typedef {Object} AttachmentData
+ * @property {string} [name] The name of the attachment
+ * @property {string} [description] The description of the attachment
+ */
diff --git a/node_modules/discord.js/src/structures/AutoModerationActionExecution.js b/node_modules/discord.js/src/structures/AutoModerationActionExecution.js
new file mode 100644
index 0000000..fcbc617
--- /dev/null
+++ b/node_modules/discord.js/src/structures/AutoModerationActionExecution.js
@@ -0,0 +1,116 @@
+'use strict';
+
+const { _transformAPIAutoModerationAction } = require('../util/Transformers');
+
+/**
+ * Represents the structure of an executed action when an {@link AutoModerationRule} is triggered.
+ */
+class AutoModerationActionExecution {
+ constructor(data, guild) {
+ /**
+ * The guild where this action was executed from.
+ * @type {Guild}
+ */
+ this.guild = guild;
+
+ /**
+ * The action that was executed.
+ * @type {AutoModerationAction}
+ */
+ this.action = _transformAPIAutoModerationAction(data.action);
+
+ /**
+ * The id of the auto moderation rule this action belongs to.
+ * @type {Snowflake}
+ */
+ this.ruleId = data.rule_id;
+
+ /**
+ * The trigger type of the auto moderation rule which was triggered.
+ * @type {AutoModerationRuleTriggerType}
+ */
+ this.ruleTriggerType = data.rule_trigger_type;
+
+ /**
+ * The id of the user that triggered this action.
+ * @type {Snowflake}
+ */
+ this.userId = data.user_id;
+
+ /**
+ * The id of the channel where this action was triggered from.
+ * @type {?Snowflake}
+ */
+ this.channelId = data.channel_id ?? null;
+
+ /**
+ * The id of the message that triggered this action.
+ * <info>This will not be present if the message was blocked or the content was not part of any message.</info>
+ * @type {?Snowflake}
+ */
+ this.messageId = data.message_id ?? null;
+
+ /**
+ * The id of any system auto moderation messages posted as a result of this action.
+ * @type {?Snowflake}
+ */
+ this.alertSystemMessageId = data.alert_system_message_id ?? null;
+
+ /**
+ * The content that triggered this action.
+ * <info>This property requires the {@link GatewayIntentBits.MessageContent} privileged gateway intent.</info>
+ * @type {string}
+ */
+ this.content = data.content;
+
+ /**
+ * The word or phrase configured in the rule that triggered this action.
+ * @type {?string}
+ */
+ this.matchedKeyword = data.matched_keyword ?? null;
+
+ /**
+ * The substring in content that triggered this action.
+ * @type {?string}
+ */
+ this.matchedContent = data.matched_content ?? null;
+ }
+
+ /**
+ * The auto moderation rule this action belongs to.
+ * @type {?AutoModerationRule}
+ * @readonly
+ */
+ get autoModerationRule() {
+ return this.guild.autoModerationRules.cache.get(this.ruleId) ?? null;
+ }
+
+ /**
+ * The channel where this action was triggered from.
+ * @type {?(GuildTextBasedChannel|ForumChannel)}
+ * @readonly
+ */
+ get channel() {
+ return this.guild.channels.cache.get(this.channelId) ?? null;
+ }
+
+ /**
+ * The user that triggered this action.
+ * @type {?User}
+ * @readonly
+ */
+ get user() {
+ return this.guild.client.users.cache.get(this.userId) ?? null;
+ }
+
+ /**
+ * The guild member that triggered this action.
+ * @type {?GuildMember}
+ * @readonly
+ */
+ get member() {
+ return this.guild.members.cache.get(this.userId) ?? null;
+ }
+}
+
+module.exports = AutoModerationActionExecution;
diff --git a/node_modules/discord.js/src/structures/AutoModerationRule.js b/node_modules/discord.js/src/structures/AutoModerationRule.js
new file mode 100644
index 0000000..e87f547
--- /dev/null
+++ b/node_modules/discord.js/src/structures/AutoModerationRule.js
@@ -0,0 +1,284 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const Base = require('./Base');
+const { _transformAPIAutoModerationAction } = require('../util/Transformers');
+
+/**
+ * Represents an auto moderation rule.
+ * @extends {Base}
+ */
+class AutoModerationRule extends Base {
+ constructor(client, data, guild) {
+ super(client);
+
+ /**
+ * The id of this auto moderation rule.
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+
+ /**
+ * The guild this auto moderation rule is for.
+ * @type {Guild}
+ */
+ this.guild = guild;
+
+ /**
+ * The user that created this auto moderation rule.
+ * @type {Snowflake}
+ */
+ this.creatorId = data.creator_id;
+
+ /**
+ * The trigger type of this auto moderation rule.
+ * @type {AutoModerationRuleTriggerType}
+ */
+ this.triggerType = data.trigger_type;
+
+ this._patch(data);
+ }
+
+ _patch(data) {
+ if ('name' in data) {
+ /**
+ * The name of this auto moderation rule.
+ * @type {string}
+ */
+ this.name = data.name;
+ }
+
+ if ('event_type' in data) {
+ /**
+ * The event type of this auto moderation rule.
+ * @type {AutoModerationRuleEventType}
+ */
+ this.eventType = data.event_type;
+ }
+
+ if ('trigger_metadata' in data) {
+ /**
+ * Additional data used to determine whether an auto moderation rule should be triggered.
+ * @typedef {Object} AutoModerationTriggerMetadata
+ * @property {string[]} keywordFilter The substrings that will be searched for in the content
+ * @property {string[]} regexPatterns The regular expression patterns which will be matched against the content
+ * <info>Only Rust-flavored regular expressions are supported.</info>
+ * @property {AutoModerationRuleKeywordPresetType[]} presets
+ * The internally pre-defined wordsets which will be searched for in the content
+ * @property {string[]} allowList The substrings that will be exempt from triggering
+ * {@link AutoModerationRuleTriggerType.Keyword} and {@link AutoModerationRuleTriggerType.KeywordPreset}
+ * @property {?number} mentionTotalLimit The total number of role & user mentions allowed per message
+ * @property {boolean} mentionRaidProtectionEnabled Whether mention raid protection is enabled
+ */
+
+ /**
+ * The trigger metadata of the rule.
+ * @type {AutoModerationTriggerMetadata}
+ */
+ this.triggerMetadata = {
+ keywordFilter: data.trigger_metadata.keyword_filter ?? [],
+ regexPatterns: data.trigger_metadata.regex_patterns ?? [],
+ presets: data.trigger_metadata.presets ?? [],
+ allowList: data.trigger_metadata.allow_list ?? [],
+ mentionTotalLimit: data.trigger_metadata.mention_total_limit ?? null,
+ mentionRaidProtectionEnabled: data.trigger_metadata.mention_raid_protection_enabled ?? false,
+ };
+ }
+
+ if ('actions' in data) {
+ /**
+ * An object containing information about an auto moderation rule action.
+ * @typedef {Object} AutoModerationAction
+ * @property {AutoModerationActionType} type The type of this auto moderation rule action
+ * @property {AutoModerationActionMetadata} metadata Additional metadata needed during execution
+ */
+
+ /**
+ * Additional data used when an auto moderation rule is executed.
+ * @typedef {Object} AutoModerationActionMetadata
+ * @property {?Snowflake} channelId The id of the channel to which content will be logged
+ * @property {?number} durationSeconds The timeout duration in seconds
+ * @property {?string} customMessage The custom message that is shown whenever a message is blocked
+ */
+
+ /**
+ * The actions of this auto moderation rule.
+ * @type {AutoModerationAction[]}
+ */
+ this.actions = data.actions.map(action => _transformAPIAutoModerationAction(action));
+ }
+
+ if ('enabled' in data) {
+ /**
+ * Whether this auto moderation rule is enabled.
+ * @type {boolean}
+ */
+ this.enabled = data.enabled;
+ }
+
+ if ('exempt_roles' in data) {
+ /**
+ * The roles exempt by this auto moderation rule.
+ * @type {Collection<Snowflake, Role>}
+ */
+ this.exemptRoles = new Collection(
+ data.exempt_roles.map(exemptRole => [exemptRole, this.guild.roles.cache.get(exemptRole)]),
+ );
+ }
+
+ if ('exempt_channels' in data) {
+ /**
+ * The channels exempt by this auto moderation rule.
+ * @type {Collection<Snowflake, GuildChannel|ThreadChannel>}
+ */
+ this.exemptChannels = new Collection(
+ data.exempt_channels.map(exemptChannel => [exemptChannel, this.guild.channels.cache.get(exemptChannel)]),
+ );
+ }
+ }
+
+ /**
+ * Edits this auto moderation rule.
+ * @param {AutoModerationRuleEditOptions} options Options for editing this auto moderation rule
+ * @returns {Promise<AutoModerationRule>}
+ */
+ edit(options) {
+ return this.guild.autoModerationRules.edit(this.id, options);
+ }
+
+ /**
+ * Deletes this auto moderation rule.
+ * @param {string} [reason] The reason for deleting this auto moderation rule
+ * @returns {Promise<void>}
+ */
+ delete(reason) {
+ return this.guild.autoModerationRules.delete(this.id, reason);
+ }
+
+ /**
+ * Sets the name for this auto moderation rule.
+ * @param {string} name The name of this auto moderation rule
+ * @param {string} [reason] The reason for changing the name of this auto moderation rule
+ * @returns {Promise<AutoModerationRule>}
+ */
+ setName(name, reason) {
+ return this.edit({ name, reason });
+ }
+
+ /**
+ * Sets the event type for this auto moderation rule.
+ * @param {AutoModerationRuleEventType} eventType The event type of this auto moderation rule
+ * @param {string} [reason] The reason for changing the event type of this auto moderation rule
+ * @returns {Promise<AutoModerationRule>}
+ */
+ setEventType(eventType, reason) {
+ return this.edit({ eventType, reason });
+ }
+
+ /**
+ * Sets the keyword filter for this auto moderation rule.
+ * @param {string[]} keywordFilter The keyword filter of this auto moderation rule
+ * @param {string} [reason] The reason for changing the keyword filter of this auto moderation rule
+ * @returns {Promise<AutoModerationRule>}
+ */
+ setKeywordFilter(keywordFilter, reason) {
+ return this.edit({ triggerMetadata: { ...this.triggerMetadata, keywordFilter }, reason });
+ }
+
+ /**
+ * Sets the regular expression patterns for this auto moderation rule.
+ * @param {string[]} regexPatterns The regular expression patterns of this auto moderation rule
+ * <info>Only Rust-flavored regular expressions are supported.</info>
+ * @param {string} [reason] The reason for changing the regular expression patterns of this auto moderation rule
+ * @returns {Promise<AutoModerationRule>}
+ */
+ setRegexPatterns(regexPatterns, reason) {
+ return this.edit({ triggerMetadata: { ...this.triggerMetadata, regexPatterns }, reason });
+ }
+
+ /**
+ * Sets the presets for this auto moderation rule.
+ * @param {AutoModerationRuleKeywordPresetType[]} presets The presets of this auto moderation rule
+ * @param {string} [reason] The reason for changing the presets of this auto moderation rule
+ * @returns {Promise<AutoModerationRule>}
+ */
+ setPresets(presets, reason) {
+ return this.edit({ triggerMetadata: { ...this.triggerMetadata, presets }, reason });
+ }
+
+ /**
+ * Sets the allow list for this auto moderation rule.
+ * @param {string[]} allowList The substrings that will be exempt from triggering
+ * {@link AutoModerationRuleTriggerType.Keyword} and {@link AutoModerationRuleTriggerType.KeywordPreset}
+ * @param {string} [reason] The reason for changing the allow list of this auto moderation rule
+ * @returns {Promise<AutoModerationRule>}
+ */
+ setAllowList(allowList, reason) {
+ return this.edit({ triggerMetadata: { ...this.triggerMetadata, allowList }, reason });
+ }
+
+ /**
+ * Sets the mention total limit for this auto moderation rule.
+ * @param {number} mentionTotalLimit The total number of unique role and user mentions allowed per message
+ * @param {string} [reason] The reason for changing the mention total limit of this auto moderation rule
+ * @returns {Promise<AutoModerationRule>}
+ */
+ setMentionTotalLimit(mentionTotalLimit, reason) {
+ return this.edit({ triggerMetadata: { ...this.triggerMetadata, mentionTotalLimit }, reason });
+ }
+
+ /**
+ * Sets whether to enable mention raid protection for this auto moderation rule.
+ * @param {boolean} mentionRaidProtectionEnabled
+ * Whether to enable mention raid protection for this auto moderation rule
+ * @param {string} [reason] The reason for changing the mention raid protection of this auto moderation rule
+ * @returns {Promise<AutoModerationRule>}
+ */
+ setMentionRaidProtectionEnabled(mentionRaidProtectionEnabled, reason) {
+ return this.edit({ triggerMetadata: { ...this.triggerMetadata, mentionRaidProtectionEnabled }, reason });
+ }
+
+ /**
+ * Sets the actions for this auto moderation rule.
+ * @param {AutoModerationActionOptions[]} actions The actions of this auto moderation rule
+ * @param {string} [reason] The reason for changing the actions of this auto moderation rule
+ * @returns {Promise<AutoModerationRule>}
+ */
+ setActions(actions, reason) {
+ return this.edit({ actions, reason });
+ }
+
+ /**
+ * Sets whether this auto moderation rule should be enabled.
+ * @param {boolean} [enabled=true] Whether to enable this auto moderation rule
+ * @param {string} [reason] The reason for enabling or disabling this auto moderation rule
+ * @returns {Promise<AutoModerationRule>}
+ */
+ setEnabled(enabled = true, reason) {
+ return this.edit({ enabled, reason });
+ }
+
+ /**
+ * Sets the exempt roles for this auto moderation rule.
+ * @param {Collection<Snowflake, Role>|RoleResolvable[]} [exemptRoles]
+ * The roles that should not be affected by the auto moderation rule
+ * @param {string} [reason] The reason for changing the exempt roles of this auto moderation rule
+ * @returns {Promise<AutoModerationRule>}
+ */
+ setExemptRoles(exemptRoles, reason) {
+ return this.edit({ exemptRoles, reason });
+ }
+
+ /**
+ * Sets the exempt channels for this auto moderation rule.
+ * @param {Collection<Snowflake, GuildChannel|ThreadChannel>|GuildChannelResolvable[]} [exemptChannels]
+ * The channels that should not be affected by the auto moderation rule
+ * @param {string} [reason] The reason for changing the exempt channels of this auto moderation rule
+ * @returns {Promise<AutoModerationRule>}
+ */
+ setExemptChannels(exemptChannels, reason) {
+ return this.edit({ exemptChannels, reason });
+ }
+}
+
+module.exports = AutoModerationRule;
diff --git a/node_modules/discord.js/src/structures/AutocompleteInteraction.js b/node_modules/discord.js/src/structures/AutocompleteInteraction.js
new file mode 100644
index 0000000..4b7e39e
--- /dev/null
+++ b/node_modules/discord.js/src/structures/AutocompleteInteraction.js
@@ -0,0 +1,102 @@
+'use strict';
+
+const { InteractionResponseType, Routes } = require('discord-api-types/v10');
+const BaseInteraction = require('./BaseInteraction');
+const CommandInteractionOptionResolver = require('./CommandInteractionOptionResolver');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+
+/**
+ * Represents an autocomplete interaction.
+ * @extends {BaseInteraction}
+ */
+class AutocompleteInteraction extends BaseInteraction {
+ constructor(client, data) {
+ super(client, data);
+
+ /**
+ * The id of the channel this interaction was sent in
+ * @type {Snowflake}
+ * @name AutocompleteInteraction#channelId
+ */
+
+ /**
+ * The invoked application command's id
+ * @type {Snowflake}
+ */
+ this.commandId = data.data.id;
+
+ /**
+ * The invoked application command's name
+ * @type {string}
+ */
+ this.commandName = data.data.name;
+
+ /**
+ * The invoked application command's type
+ * @type {ApplicationCommandType}
+ */
+ this.commandType = data.data.type;
+
+ /**
+ * The id of the guild the invoked application command is registered to
+ * @type {?Snowflake}
+ */
+ this.commandGuildId = data.data.guild_id ?? null;
+
+ /**
+ * Whether this interaction has already received a response
+ * @type {boolean}
+ */
+ this.responded = false;
+
+ /**
+ * The options passed to the command
+ * @type {CommandInteractionOptionResolver}
+ */
+ this.options = new CommandInteractionOptionResolver(this.client, data.data.options ?? []);
+ }
+
+ /**
+ * The invoked application command, if it was fetched before
+ * @type {?ApplicationCommand}
+ */
+ get command() {
+ const id = this.commandId;
+ return this.guild?.commands.cache.get(id) ?? this.client.application.commands.cache.get(id) ?? null;
+ }
+
+ /**
+ * Sends results for the autocomplete of this interaction.
+ * @param {ApplicationCommandOptionChoiceData[]} options The options for the autocomplete
+ * @returns {Promise<void>}
+ * @example
+ * // respond to autocomplete interaction
+ * interaction.respond([
+ * {
+ * name: 'Option 1',
+ * value: 'option1',
+ * },
+ * ])
+ * .then(() => console.log('Successfully responded to the autocomplete interaction'))
+ * .catch(console.error);
+ */
+ async respond(options) {
+ if (this.responded) throw new DiscordjsError(ErrorCodes.InteractionAlreadyReplied);
+
+ await this.client.rest.post(Routes.interactionCallback(this.id, this.token), {
+ body: {
+ type: InteractionResponseType.ApplicationCommandAutocompleteResult,
+ data: {
+ choices: options.map(({ nameLocalizations, ...option }) => ({
+ ...this.client.options.jsonTransformer(option),
+ name_localizations: nameLocalizations,
+ })),
+ },
+ },
+ auth: false,
+ });
+ this.responded = true;
+ }
+}
+
+module.exports = AutocompleteInteraction;
diff --git a/node_modules/discord.js/src/structures/Base.js b/node_modules/discord.js/src/structures/Base.js
new file mode 100644
index 0000000..102fb21
--- /dev/null
+++ b/node_modules/discord.js/src/structures/Base.js
@@ -0,0 +1,43 @@
+'use strict';
+
+const { flatten } = require('../util/Util');
+
+/**
+ * Represents a data model that is identifiable by a Snowflake (i.e. Discord API data models).
+ * @abstract
+ */
+class Base {
+ constructor(client) {
+ /**
+ * The client that instantiated this
+ * @name Base#client
+ * @type {Client}
+ * @readonly
+ */
+ Object.defineProperty(this, 'client', { value: client });
+ }
+
+ _clone() {
+ return Object.assign(Object.create(this), this);
+ }
+
+ _patch(data) {
+ return data;
+ }
+
+ _update(data) {
+ const clone = this._clone();
+ this._patch(data);
+ return clone;
+ }
+
+ toJSON(...props) {
+ return flatten(this, ...props);
+ }
+
+ valueOf() {
+ return this.id;
+ }
+}
+
+module.exports = Base;
diff --git a/node_modules/discord.js/src/structures/BaseChannel.js b/node_modules/discord.js/src/structures/BaseChannel.js
new file mode 100644
index 0000000..346f763
--- /dev/null
+++ b/node_modules/discord.js/src/structures/BaseChannel.js
@@ -0,0 +1,155 @@
+'use strict';
+
+const { channelLink } = require('@discordjs/builders');
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const { ChannelType, Routes } = require('discord-api-types/v10');
+const Base = require('./Base');
+const ChannelFlagsBitField = require('../util/ChannelFlagsBitField');
+const { ThreadChannelTypes } = require('../util/Constants');
+
+/**
+ * Represents any channel on Discord.
+ * @extends {Base}
+ * @abstract
+ */
+class BaseChannel extends Base {
+ constructor(client, data, immediatePatch = true) {
+ super(client);
+
+ /**
+ * The type of the channel
+ * @type {ChannelType}
+ */
+ this.type = data.type;
+
+ if (data && immediatePatch) this._patch(data);
+ }
+
+ _patch(data) {
+ if ('flags' in data) {
+ /**
+ * The flags that are applied to the channel.
+ * <info>This is only `null` in a {@link PartialGroupDMChannel}. In all other cases, it is not `null`.</info>
+ * @type {?Readonly<ChannelFlagsBitField>}
+ */
+ this.flags = new ChannelFlagsBitField(data.flags).freeze();
+ } else {
+ this.flags ??= new ChannelFlagsBitField().freeze();
+ }
+
+ /**
+ * The channel's id
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+ }
+
+ /**
+ * The timestamp the channel was created at
+ * @type {number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return DiscordSnowflake.timestampFrom(this.id);
+ }
+
+ /**
+ * The time the channel was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ /**
+ * The URL to the channel
+ * @type {string}
+ * @readonly
+ */
+ get url() {
+ return this.isDMBased() ? channelLink(this.id) : channelLink(this.id, this.guildId);
+ }
+
+ /**
+ * Whether this Channel is a partial
+ * <info>This is always false outside of DM channels.</info>
+ * @type {boolean}
+ * @readonly
+ */
+ get partial() {
+ return false;
+ }
+
+ /**
+ * When concatenated with a string, this automatically returns the channel's mention instead of the Channel object.
+ * @returns {string}
+ * @example
+ * // Logs: Hello from <#123456789012345678>!
+ * console.log(`Hello from ${channel}!`);
+ */
+ toString() {
+ return `<#${this.id}>`;
+ }
+
+ /**
+ * Deletes this channel.
+ * @returns {Promise<BaseChannel>}
+ * @example
+ * // Delete the channel
+ * channel.delete()
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async delete() {
+ await this.client.rest.delete(Routes.channel(this.id));
+ return this;
+ }
+
+ /**
+ * Fetches this channel.
+ * @param {boolean} [force=true] Whether to skip the cache check and request the API
+ * @returns {Promise<BaseChannel>}
+ */
+ fetch(force = true) {
+ return this.client.channels.fetch(this.id, { force });
+ }
+
+ /**
+ * Indicates whether this channel is a {@link ThreadChannel}.
+ * @returns {boolean}
+ */
+ isThread() {
+ return ThreadChannelTypes.includes(this.type);
+ }
+
+ /**
+ * Indicates whether this channel is {@link TextBasedChannels text-based}.
+ * @returns {boolean}
+ */
+ isTextBased() {
+ return 'messages' in this;
+ }
+
+ /**
+ * Indicates whether this channel is DM-based (either a {@link DMChannel} or a {@link PartialGroupDMChannel}).
+ * @returns {boolean}
+ */
+ isDMBased() {
+ return [ChannelType.DM, ChannelType.GroupDM].includes(this.type);
+ }
+
+ /**
+ * Indicates whether this channel is {@link BaseGuildVoiceChannel voice-based}.
+ * @returns {boolean}
+ */
+ isVoiceBased() {
+ return 'bitrate' in this;
+ }
+
+ toJSON(...props) {
+ return super.toJSON({ createdTimestamp: true }, ...props);
+ }
+}
+
+exports.BaseChannel = BaseChannel;
diff --git a/node_modules/discord.js/src/structures/BaseGuild.js b/node_modules/discord.js/src/structures/BaseGuild.js
new file mode 100644
index 0000000..b12ca44
--- /dev/null
+++ b/node_modules/discord.js/src/structures/BaseGuild.js
@@ -0,0 +1,119 @@
+'use strict';
+
+const { makeURLSearchParams } = require('@discordjs/rest');
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const { Routes, GuildFeature } = require('discord-api-types/v10');
+const Base = require('./Base');
+
+/**
+ * The base class for {@link Guild}, {@link OAuth2Guild} and {@link InviteGuild}.
+ * @extends {Base}
+ * @abstract
+ */
+class BaseGuild extends Base {
+ constructor(client, data) {
+ super(client);
+
+ /**
+ * The guild's id
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+
+ /**
+ * The name of this guild
+ * @type {string}
+ */
+ this.name = data.name;
+
+ /**
+ * The icon hash of this guild
+ * @type {?string}
+ */
+ this.icon = data.icon;
+
+ /**
+ * An array of features available to this guild
+ * @type {GuildFeature[]}
+ */
+ this.features = data.features;
+ }
+
+ /**
+ * The timestamp this guild was created at
+ * @type {number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return DiscordSnowflake.timestampFrom(this.id);
+ }
+
+ /**
+ * The time this guild was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ /**
+ * The acronym that shows up in place of a guild icon
+ * @type {string}
+ * @readonly
+ */
+ get nameAcronym() {
+ return this.name
+ .replace(/'s /g, ' ')
+ .replace(/\w+/g, e => e[0])
+ .replace(/\s/g, '');
+ }
+
+ /**
+ * Whether this guild is partnered
+ * @type {boolean}
+ * @readonly
+ */
+ get partnered() {
+ return this.features.includes(GuildFeature.Partnered);
+ }
+
+ /**
+ * Whether this guild is verified
+ * @type {boolean}
+ * @readonly
+ */
+ get verified() {
+ return this.features.includes(GuildFeature.Verified);
+ }
+
+ /**
+ * The URL to this guild's icon.
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ iconURL(options = {}) {
+ return this.icon && this.client.rest.cdn.icon(this.id, this.icon, options);
+ }
+
+ /**
+ * Fetches this guild.
+ * @returns {Promise<Guild>}
+ */
+ async fetch() {
+ const data = await this.client.rest.get(Routes.guild(this.id), {
+ query: makeURLSearchParams({ with_counts: true }),
+ });
+ return this.client.guilds._add(data);
+ }
+
+ /**
+ * When concatenated with a string, this automatically returns the guild's name instead of the Guild object.
+ * @returns {string}
+ */
+ toString() {
+ return this.name;
+ }
+}
+
+module.exports = BaseGuild;
diff --git a/node_modules/discord.js/src/structures/BaseGuildEmoji.js b/node_modules/discord.js/src/structures/BaseGuildEmoji.js
new file mode 100644
index 0000000..5a12bd9
--- /dev/null
+++ b/node_modules/discord.js/src/structures/BaseGuildEmoji.js
@@ -0,0 +1,56 @@
+'use strict';
+
+const { Emoji } = require('./Emoji');
+
+/**
+ * Parent class for {@link GuildEmoji} and {@link GuildPreviewEmoji}.
+ * @extends {Emoji}
+ * @abstract
+ */
+class BaseGuildEmoji extends Emoji {
+ constructor(client, data, guild) {
+ super(client, data);
+
+ /**
+ * The guild this emoji is a part of
+ * @type {Guild|GuildPreview}
+ */
+ this.guild = guild;
+
+ this.requiresColons = null;
+ this.managed = null;
+ this.available = null;
+
+ this._patch(data);
+ }
+
+ _patch(data) {
+ if ('name' in data) this.name = data.name;
+
+ if ('require_colons' in data) {
+ /**
+ * Whether or not this emoji requires colons surrounding it
+ * @type {?boolean}
+ */
+ this.requiresColons = data.require_colons;
+ }
+
+ if ('managed' in data) {
+ /**
+ * Whether this emoji is managed by an external service
+ * @type {?boolean}
+ */
+ this.managed = data.managed;
+ }
+
+ if ('available' in data) {
+ /**
+ * Whether this emoji is available
+ * @type {?boolean}
+ */
+ this.available = data.available;
+ }
+ }
+}
+
+module.exports = BaseGuildEmoji;
diff --git a/node_modules/discord.js/src/structures/BaseGuildTextChannel.js b/node_modules/discord.js/src/structures/BaseGuildTextChannel.js
new file mode 100644
index 0000000..f7d9d69
--- /dev/null
+++ b/node_modules/discord.js/src/structures/BaseGuildTextChannel.js
@@ -0,0 +1,186 @@
+'use strict';
+
+const GuildChannel = require('./GuildChannel');
+const TextBasedChannel = require('./interfaces/TextBasedChannel');
+const GuildMessageManager = require('../managers/GuildMessageManager');
+const GuildTextThreadManager = require('../managers/GuildTextThreadManager');
+
+/**
+ * Represents a text-based guild channel on Discord.
+ * @extends {GuildChannel}
+ * @implements {TextBasedChannel}
+ */
+class BaseGuildTextChannel extends GuildChannel {
+ constructor(guild, data, client) {
+ super(guild, data, client, false);
+
+ /**
+ * A manager of the messages sent to this channel
+ * @type {GuildMessageManager}
+ */
+ this.messages = new GuildMessageManager(this);
+
+ /**
+ * A manager of the threads belonging to this channel
+ * @type {GuildTextThreadManager}
+ */
+ this.threads = new GuildTextThreadManager(this);
+
+ /**
+ * If the guild considers this channel NSFW
+ * @type {boolean}
+ */
+ this.nsfw = Boolean(data.nsfw);
+
+ this._patch(data);
+ }
+
+ _patch(data) {
+ super._patch(data);
+
+ if ('topic' in data) {
+ /**
+ * The topic of the text channel
+ * @type {?string}
+ */
+ this.topic = data.topic;
+ }
+
+ if ('nsfw' in data) {
+ this.nsfw = Boolean(data.nsfw);
+ }
+
+ if ('last_message_id' in data) {
+ /**
+ * The last message id sent in the channel, if one was sent
+ * @type {?Snowflake}
+ */
+ this.lastMessageId = data.last_message_id;
+ }
+
+ if ('last_pin_timestamp' in data) {
+ /**
+ * The timestamp when the last pinned message was pinned, if there was one
+ * @type {?number}
+ */
+ this.lastPinTimestamp = data.last_pin_timestamp ? Date.parse(data.last_pin_timestamp) : null;
+ }
+
+ if ('default_auto_archive_duration' in data) {
+ /**
+ * The default auto archive duration for newly created threads in this channel
+ * @type {?ThreadAutoArchiveDuration}
+ */
+ this.defaultAutoArchiveDuration = data.default_auto_archive_duration;
+ }
+
+ if ('messages' in data) {
+ for (const message of data.messages) this.messages._add(message);
+ }
+ }
+
+ /**
+ * Sets the default auto archive duration for all newly created threads in this channel.
+ * @param {ThreadAutoArchiveDuration} defaultAutoArchiveDuration The new default auto archive duration
+ * @param {string} [reason] Reason for changing the channel's default auto archive duration
+ * @returns {Promise<TextChannel>}
+ */
+ setDefaultAutoArchiveDuration(defaultAutoArchiveDuration, reason) {
+ return this.edit({ defaultAutoArchiveDuration, reason });
+ }
+
+ /**
+ * Sets the type of this channel.
+ * <info>Only conversion between {@link TextChannel} and {@link NewsChannel} is supported.</info>
+ * @param {ChannelType.GuildText|ChannelType.GuildAnnouncement} type The new channel type
+ * @param {string} [reason] Reason for changing the channel's type
+ * @returns {Promise<GuildChannel>}
+ */
+ setType(type, reason) {
+ return this.edit({ type, reason });
+ }
+
+ /**
+ * Sets a new topic for the guild channel.
+ * @param {?string} topic The new topic for the guild channel
+ * @param {string} [reason] Reason for changing the guild channel's topic
+ * @returns {Promise<GuildChannel>}
+ * @example
+ * // Set a new channel topic
+ * channel.setTopic('needs more rate limiting')
+ * .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))
+ * .catch(console.error);
+ */
+ setTopic(topic, reason) {
+ return this.edit({ topic, reason });
+ }
+
+ /**
+ * Data that can be resolved to an Application. This can be:
+ * * An Application
+ * * An Activity with associated Application
+ * * A Snowflake
+ * @typedef {Application|Snowflake} ApplicationResolvable
+ */
+
+ /**
+ * Options used to create an invite to a guild channel.
+ * @typedef {Object} InviteCreateOptions
+ * @property {boolean} [temporary] Whether members that joined via the invite should be automatically
+ * kicked after 24 hours if they have not yet received a role
+ * @property {number} [maxAge] How long the invite should last (in seconds, 0 for forever)
+ * @property {number} [maxUses] Maximum number of uses
+ * @property {boolean} [unique] Create a unique invite, or use an existing one with similar settings
+ * @property {UserResolvable} [targetUser] The user whose stream to display for this invite,
+ * required if `targetType` is {@link InviteTargetType.Stream}, the user must be streaming in the channel
+ * @property {ApplicationResolvable} [targetApplication] The embedded application to open for this invite,
+ * required if `targetType` is {@link InviteTargetType.Stream}, the application must have the
+ * {@link InviteTargetType.EmbeddedApplication} flag
+ * @property {InviteTargetType} [targetType] The type of the target for this voice channel invite
+ * @property {string} [reason] The reason for creating the invite
+ */
+
+ /**
+ * Creates an invite to this guild channel.
+ * @param {InviteCreateOptions} [options={}] The options for creating the invite
+ * @returns {Promise<Invite>}
+ * @example
+ * // Create an invite to a channel
+ * channel.createInvite()
+ * .then(invite => console.log(`Created an invite with a code of ${invite.code}`))
+ * .catch(console.error);
+ */
+ createInvite(options) {
+ return this.guild.invites.create(this.id, options);
+ }
+
+ /**
+ * Fetches a collection of invites to this guild channel.
+ * Resolves with a collection mapping invites by their codes.
+ * @param {boolean} [cache=true] Whether or not to cache the fetched invites
+ * @returns {Promise<Collection<string, Invite>>}
+ */
+ fetchInvites(cache = true) {
+ return this.guild.invites.fetch({ channelId: this.id, cache });
+ }
+
+ // These are here only for documentation purposes - they are implemented by TextBasedChannel
+ /* eslint-disable no-empty-function */
+ get lastMessage() {}
+ get lastPinAt() {}
+ send() {}
+ sendTyping() {}
+ createMessageCollector() {}
+ awaitMessages() {}
+ createMessageComponentCollector() {}
+ awaitMessageComponent() {}
+ bulkDelete() {}
+ fetchWebhooks() {}
+ createWebhook() {}
+ setRateLimitPerUser() {}
+ setNSFW() {}
+}
+
+TextBasedChannel.applyToClass(BaseGuildTextChannel, true);
+
+module.exports = BaseGuildTextChannel;
diff --git a/node_modules/discord.js/src/structures/BaseGuildVoiceChannel.js b/node_modules/discord.js/src/structures/BaseGuildVoiceChannel.js
new file mode 100644
index 0000000..220ac6c
--- /dev/null
+++ b/node_modules/discord.js/src/structures/BaseGuildVoiceChannel.js
@@ -0,0 +1,234 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { PermissionFlagsBits } = require('discord-api-types/v10');
+const GuildChannel = require('./GuildChannel');
+const TextBasedChannel = require('./interfaces/TextBasedChannel');
+const GuildMessageManager = require('../managers/GuildMessageManager');
+
+/**
+ * Represents a voice-based guild channel on Discord.
+ * @extends {GuildChannel}
+ * @implements {TextBasedChannel}
+ */
+class BaseGuildVoiceChannel extends GuildChannel {
+ constructor(guild, data, client) {
+ super(guild, data, client, false);
+ /**
+ * A manager of the messages sent to this channel
+ * @type {GuildMessageManager}
+ */
+ this.messages = new GuildMessageManager(this);
+
+ /**
+ * If the guild considers this channel NSFW
+ * @type {boolean}
+ */
+ this.nsfw = Boolean(data.nsfw);
+
+ this._patch(data);
+ }
+
+ _patch(data) {
+ super._patch(data);
+
+ if ('rtc_region' in data) {
+ /**
+ * The RTC region for this voice-based channel. This region is automatically selected if `null`.
+ * @type {?string}
+ */
+ this.rtcRegion = data.rtc_region;
+ }
+
+ if ('bitrate' in data) {
+ /**
+ * The bitrate of this voice-based channel
+ * @type {number}
+ */
+ this.bitrate = data.bitrate;
+ }
+
+ if ('user_limit' in data) {
+ /**
+ * The maximum amount of users allowed in this channel.
+ * @type {number}
+ */
+ this.userLimit = data.user_limit;
+ }
+
+ if ('video_quality_mode' in data) {
+ /**
+ * The camera video quality mode of the channel.
+ * @type {?VideoQualityMode}
+ */
+ this.videoQualityMode = data.video_quality_mode;
+ } else {
+ this.videoQualityMode ??= null;
+ }
+
+ if ('last_message_id' in data) {
+ /**
+ * The last message id sent in the channel, if one was sent
+ * @type {?Snowflake}
+ */
+ this.lastMessageId = data.last_message_id;
+ }
+
+ if ('messages' in data) {
+ for (const message of data.messages) this.messages._add(message);
+ }
+
+ if ('rate_limit_per_user' in data) {
+ /**
+ * The rate limit per user (slowmode) for this channel in seconds
+ * @type {number}
+ */
+ this.rateLimitPerUser = data.rate_limit_per_user;
+ }
+
+ if ('nsfw' in data) {
+ this.nsfw = data.nsfw;
+ }
+ }
+
+ /**
+ * The members in this voice-based channel
+ * @type {Collection<Snowflake, GuildMember>}
+ * @readonly
+ */
+ get members() {
+ const coll = new Collection();
+ for (const state of this.guild.voiceStates.cache.values()) {
+ if (state.channelId === this.id && state.member) {
+ coll.set(state.id, state.member);
+ }
+ }
+ return coll;
+ }
+
+ /**
+ * Checks if the voice-based channel is full
+ * @type {boolean}
+ * @readonly
+ */
+ get full() {
+ return this.userLimit > 0 && this.members.size >= this.userLimit;
+ }
+
+ /**
+ * Whether the channel is joinable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get joinable() {
+ if (!this.viewable) return false;
+ const permissions = this.permissionsFor(this.client.user);
+ if (!permissions) return false;
+
+ // This flag allows joining even if timed out
+ if (permissions.has(PermissionFlagsBits.Administrator, false)) return true;
+
+ return (
+ this.guild.members.me.communicationDisabledUntilTimestamp < Date.now() &&
+ permissions.has(PermissionFlagsBits.Connect, false)
+ );
+ }
+
+ /**
+ * Creates an invite to this guild channel.
+ * @param {InviteCreateOptions} [options={}] The options for creating the invite
+ * @returns {Promise<Invite>}
+ * @example
+ * // Create an invite to a channel
+ * channel.createInvite()
+ * .then(invite => console.log(`Created an invite with a code of ${invite.code}`))
+ * .catch(console.error);
+ */
+ createInvite(options) {
+ return this.guild.invites.create(this.id, options);
+ }
+
+ /**
+ * Fetches a collection of invites to this guild channel.
+ * @param {boolean} [cache=true] Whether to cache the fetched invites
+ * @returns {Promise<Collection<string, Invite>>}
+ */
+ fetchInvites(cache = true) {
+ return this.guild.invites.fetch({ channelId: this.id, cache });
+ }
+
+ /**
+ * Sets the bitrate of the channel.
+ * @param {number} bitrate The new bitrate
+ * @param {string} [reason] Reason for changing the channel's bitrate
+ * @returns {Promise<BaseGuildVoiceChannel>}
+ * @example
+ * // Set the bitrate of a voice channel
+ * channel.setBitrate(48_000)
+ * .then(channel => console.log(`Set bitrate to ${channel.bitrate}bps for ${channel.name}`))
+ * .catch(console.error);
+ */
+ setBitrate(bitrate, reason) {
+ return this.edit({ bitrate, reason });
+ }
+
+ /**
+ * Sets the RTC region of the channel.
+ * @param {?string} rtcRegion The new region of the channel. Set to `null` to remove a specific region for the channel
+ * @param {string} [reason] The reason for modifying this region.
+ * @returns {Promise<BaseGuildVoiceChannel>}
+ * @example
+ * // Set the RTC region to sydney
+ * channel.setRTCRegion('sydney');
+ * @example
+ * // Remove a fixed region for this channel - let Discord decide automatically
+ * channel.setRTCRegion(null, 'We want to let Discord decide.');
+ */
+ setRTCRegion(rtcRegion, reason) {
+ return this.edit({ rtcRegion, reason });
+ }
+
+ /**
+ * Sets the user limit of the channel.
+ * @param {number} userLimit The new user limit
+ * @param {string} [reason] Reason for changing the user limit
+ * @returns {Promise<BaseGuildVoiceChannel>}
+ * @example
+ * // Set the user limit of a voice channel
+ * channel.setUserLimit(42)
+ * .then(channel => console.log(`Set user limit to ${channel.userLimit} for ${channel.name}`))
+ * .catch(console.error);
+ */
+ setUserLimit(userLimit, reason) {
+ return this.edit({ userLimit, reason });
+ }
+
+ /**
+ * Sets the camera video quality mode of the channel.
+ * @param {VideoQualityMode} videoQualityMode The new camera video quality mode.
+ * @param {string} [reason] Reason for changing the camera video quality mode.
+ * @returns {Promise<BaseGuildVoiceChannel>}
+ */
+ setVideoQualityMode(videoQualityMode, reason) {
+ return this.edit({ videoQualityMode, reason });
+ }
+
+ // These are here only for documentation purposes - they are implemented by TextBasedChannel
+ /* eslint-disable no-empty-function */
+ get lastMessage() {}
+ send() {}
+ sendTyping() {}
+ createMessageCollector() {}
+ awaitMessages() {}
+ createMessageComponentCollector() {}
+ awaitMessageComponent() {}
+ bulkDelete() {}
+ fetchWebhooks() {}
+ createWebhook() {}
+ setRateLimitPerUser() {}
+ setNSFW() {}
+}
+
+TextBasedChannel.applyToClass(BaseGuildVoiceChannel, true, ['lastPinAt']);
+
+module.exports = BaseGuildVoiceChannel;
diff --git a/node_modules/discord.js/src/structures/BaseInteraction.js b/node_modules/discord.js/src/structures/BaseInteraction.js
new file mode 100644
index 0000000..967350f
--- /dev/null
+++ b/node_modules/discord.js/src/structures/BaseInteraction.js
@@ -0,0 +1,344 @@
+'use strict';
+
+const { deprecate } = require('node:util');
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const { InteractionType, ApplicationCommandType, ComponentType } = require('discord-api-types/v10');
+const Base = require('./Base');
+const { SelectMenuTypes } = require('../util/Constants');
+const PermissionsBitField = require('../util/PermissionsBitField');
+
+/**
+ * Represents an interaction.
+ * @extends {Base}
+ * @abstract
+ */
+class BaseInteraction extends Base {
+ constructor(client, data) {
+ super(client);
+
+ /**
+ * The interaction's type
+ * @type {InteractionType}
+ */
+ this.type = data.type;
+
+ /**
+ * The interaction's id
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+
+ /**
+ * The interaction's token
+ * @type {string}
+ * @name BaseInteraction#token
+ * @readonly
+ */
+ Object.defineProperty(this, 'token', { value: data.token });
+
+ /**
+ * The application's id
+ * @type {Snowflake}
+ */
+ this.applicationId = data.application_id;
+
+ /**
+ * The id of the channel this interaction was sent in
+ * @type {?Snowflake}
+ */
+ this.channelId = data.channel?.id ?? null;
+
+ /**
+ * The id of the guild this interaction was sent in
+ * @type {?Snowflake}
+ */
+ this.guildId = data.guild_id ?? null;
+
+ /**
+ * The user who created this interaction
+ * @type {User}
+ */
+ this.user = this.client.users._add(data.user ?? data.member.user);
+
+ /**
+ * If this interaction was sent in a guild, the member which sent it
+ * @type {?(GuildMember|APIGuildMember)}
+ */
+ this.member = data.member ? this.guild?.members._add(data.member) ?? data.member : null;
+
+ /**
+ * The version
+ * @type {number}
+ */
+ this.version = data.version;
+
+ /**
+ * Set of permissions the application or bot has within the channel the interaction was sent from
+ * @type {?Readonly<PermissionsBitField>}
+ */
+ this.appPermissions = data.app_permissions ? new PermissionsBitField(data.app_permissions).freeze() : null;
+
+ /**
+ * The permissions of the member, if one exists, in the channel this interaction was executed in
+ * @type {?Readonly<PermissionsBitField>}
+ */
+ this.memberPermissions = data.member?.permissions
+ ? new PermissionsBitField(data.member.permissions).freeze()
+ : null;
+
+ /**
+ * A Discord locale string, possible values are:
+ * * en-US (English, US)
+ * * en-GB (English, UK)
+ * * bg (Bulgarian)
+ * * zh-CN (Chinese, China)
+ * * zh-TW (Chinese, Taiwan)
+ * * hr (Croatian)
+ * * cs (Czech)
+ * * da (Danish)
+ * * nl (Dutch)
+ * * fi (Finnish)
+ * * fr (French)
+ * * de (German)
+ * * el (Greek)
+ * * hi (Hindi)
+ * * hu (Hungarian)
+ * * it (Italian)
+ * * ja (Japanese)
+ * * ko (Korean)
+ * * lt (Lithuanian)
+ * * no (Norwegian)
+ * * pl (Polish)
+ * * pt-BR (Portuguese, Brazilian)
+ * * ro (Romanian, Romania)
+ * * ru (Russian)
+ * * es-ES (Spanish)
+ * * sv-SE (Swedish)
+ * * th (Thai)
+ * * tr (Turkish)
+ * * uk (Ukrainian)
+ * * vi (Vietnamese)
+ * @see {@link https://discord.com/developers/docs/reference#locales}
+ * @typedef {string} Locale
+ */
+
+ /**
+ * The locale of the user who invoked this interaction
+ * @type {Locale}
+ */
+ this.locale = data.locale;
+
+ /**
+ * The preferred locale from the guild this interaction was sent in
+ * @type {?Locale}
+ */
+ this.guildLocale = data.guild_locale ?? null;
+ }
+
+ /**
+ * The timestamp the interaction was created at
+ * @type {number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return DiscordSnowflake.timestampFrom(this.id);
+ }
+
+ /**
+ * The time the interaction was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ /**
+ * The channel this interaction was sent in
+ * @type {?TextBasedChannels}
+ * @readonly
+ */
+ get channel() {
+ return this.client.channels.cache.get(this.channelId) ?? null;
+ }
+
+ /**
+ * The guild this interaction was sent in
+ * @type {?Guild}
+ * @readonly
+ */
+ get guild() {
+ return this.client.guilds.cache.get(this.guildId) ?? null;
+ }
+
+ /**
+ * Indicates whether this interaction is received from a guild.
+ * @returns {boolean}
+ */
+ inGuild() {
+ return Boolean(this.guildId && this.member);
+ }
+
+ /**
+ * Indicates whether or not this interaction is both cached and received from a guild.
+ * @returns {boolean}
+ */
+ inCachedGuild() {
+ return Boolean(this.guild && this.member);
+ }
+
+ /**
+ * Indicates whether or not this interaction is received from an uncached guild.
+ * @returns {boolean}
+ */
+ inRawGuild() {
+ return Boolean(this.guildId && !this.guild && this.member);
+ }
+
+ /**
+ * Indicates whether this interaction is an {@link AutocompleteInteraction}
+ * @returns {boolean}
+ */
+ isAutocomplete() {
+ return this.type === InteractionType.ApplicationCommandAutocomplete;
+ }
+
+ /**
+ * Indicates whether this interaction is a {@link CommandInteraction}
+ * @returns {boolean}
+ */
+ isCommand() {
+ return this.type === InteractionType.ApplicationCommand;
+ }
+
+ /**
+ * Indicates whether this interaction is a {@link ChatInputCommandInteraction}.
+ * @returns {boolean}
+ */
+ isChatInputCommand() {
+ return this.type === InteractionType.ApplicationCommand && this.commandType === ApplicationCommandType.ChatInput;
+ }
+
+ /**
+ * Indicates whether this interaction is a {@link ContextMenuCommandInteraction}
+ * @returns {boolean}
+ */
+ isContextMenuCommand() {
+ return (
+ this.type === InteractionType.ApplicationCommand &&
+ [ApplicationCommandType.User, ApplicationCommandType.Message].includes(this.commandType)
+ );
+ }
+
+ /**
+ * Indicates whether this interaction is a {@link MessageComponentInteraction}
+ * @returns {boolean}
+ */
+ isMessageComponent() {
+ return this.type === InteractionType.MessageComponent;
+ }
+
+ /**
+ * Indicates whether this interaction is a {@link ModalSubmitInteraction}
+ * @returns {boolean}
+ */
+ isModalSubmit() {
+ return this.type === InteractionType.ModalSubmit;
+ }
+
+ /**
+ * Indicates whether this interaction is a {@link UserContextMenuCommandInteraction}
+ * @returns {boolean}
+ */
+ isUserContextMenuCommand() {
+ return this.isContextMenuCommand() && this.commandType === ApplicationCommandType.User;
+ }
+
+ /**
+ * Indicates whether this interaction is a {@link MessageContextMenuCommandInteraction}
+ * @returns {boolean}
+ */
+ isMessageContextMenuCommand() {
+ return this.isContextMenuCommand() && this.commandType === ApplicationCommandType.Message;
+ }
+
+ /**
+ * Indicates whether this interaction is a {@link ButtonInteraction}.
+ * @returns {boolean}
+ */
+ isButton() {
+ return this.type === InteractionType.MessageComponent && this.componentType === ComponentType.Button;
+ }
+
+ /**
+ * Indicates whether this interaction is a {@link StringSelectMenuInteraction}.
+ * @returns {boolean}
+ * @deprecated Use {@link BaseInteraction#isStringSelectMenu} instead.
+ */
+ isSelectMenu() {
+ return this.isStringSelectMenu();
+ }
+
+ /**
+ * Indicates whether this interaction is a select menu of any known type.
+ * @returns {boolean}
+ */
+ isAnySelectMenu() {
+ return this.type === InteractionType.MessageComponent && SelectMenuTypes.includes(this.componentType);
+ }
+
+ /**
+ * Indicates whether this interaction is a {@link StringSelectMenuInteraction}.
+ * @returns {boolean}
+ */
+ isStringSelectMenu() {
+ return this.type === InteractionType.MessageComponent && this.componentType === ComponentType.StringSelect;
+ }
+
+ /**
+ * Indicates whether this interaction is a {@link UserSelectMenuInteraction}
+ * @returns {boolean}
+ */
+ isUserSelectMenu() {
+ return this.type === InteractionType.MessageComponent && this.componentType === ComponentType.UserSelect;
+ }
+
+ /**
+ * Indicates whether this interaction is a {@link RoleSelectMenuInteraction}
+ * @returns {boolean}
+ */
+ isRoleSelectMenu() {
+ return this.type === InteractionType.MessageComponent && this.componentType === ComponentType.RoleSelect;
+ }
+
+ /**
+ * Indicates whether this interaction is a {@link ChannelSelectMenuInteraction}
+ * @returns {boolean}
+ */
+ isChannelSelectMenu() {
+ return this.type === InteractionType.MessageComponent && this.componentType === ComponentType.ChannelSelect;
+ }
+
+ /**
+ * Indicates whether this interaction is a {@link MentionableSelectMenuInteraction}
+ * @returns {boolean}
+ */
+ isMentionableSelectMenu() {
+ return this.type === InteractionType.MessageComponent && this.componentType === ComponentType.MentionableSelect;
+ }
+
+ /**
+ * Indicates whether this interaction can be replied to.
+ * @returns {boolean}
+ */
+ isRepliable() {
+ return ![InteractionType.Ping, InteractionType.ApplicationCommandAutocomplete].includes(this.type);
+ }
+}
+
+BaseInteraction.prototype.isSelectMenu = deprecate(
+ BaseInteraction.prototype.isSelectMenu,
+ 'BaseInteraction#isSelectMenu() is deprecated. Use BaseInteraction#isStringSelectMenu() instead.',
+);
+
+module.exports = BaseInteraction;
diff --git a/node_modules/discord.js/src/structures/BaseSelectMenuComponent.js b/node_modules/discord.js/src/structures/BaseSelectMenuComponent.js
new file mode 100644
index 0000000..7177f43
--- /dev/null
+++ b/node_modules/discord.js/src/structures/BaseSelectMenuComponent.js
@@ -0,0 +1,56 @@
+'use strict';
+
+const Component = require('./Component');
+
+/**
+ * Represents a select menu component
+ * @extends {Component}
+ */
+class BaseSelectMenuComponent extends Component {
+ /**
+ * The placeholder for this select menu
+ * @type {?string}
+ * @readonly
+ */
+ get placeholder() {
+ return this.data.placeholder ?? null;
+ }
+
+ /**
+ * The maximum amount of options that can be selected
+ * @type {?number}
+ * @readonly
+ */
+ get maxValues() {
+ return this.data.max_values ?? null;
+ }
+
+ /**
+ * The minimum amount of options that must be selected
+ * @type {?number}
+ * @readonly
+ */
+ get minValues() {
+ return this.data.min_values ?? null;
+ }
+
+ /**
+ * The custom id of this select menu
+ * @type {string}
+ * @readonly
+ */
+ get customId() {
+ return this.data.custom_id;
+ }
+
+ /**
+ * Whether this select menu is disabled
+ * @type {boolean}
+ * @readonly
+ */
+ get disabled() {
+ return this.data.disabled ?? false;
+ }
+}
+
+module.exports = BaseSelectMenuComponent;
diff --git a/node_modules/discord.js/src/structures/ButtonBuilder.js b/node_modules/discord.js/src/structures/ButtonBuilder.js
new file mode 100644
index 0000000..ada4188
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ButtonBuilder.js
@@ -0,0 +1,44 @@
+'use strict';
+
+const { ButtonBuilder: BuildersButton } = require('@discordjs/builders');
+const { isJSONEncodable } = require('@discordjs/util');
+const { toSnakeCase } = require('../util/Transformers');
+const { resolvePartialEmoji } = require('../util/Util');
+
+/**
+ * Represents a button builder.
+ * @extends {BuildersButton}
+ */
+class ButtonBuilder extends BuildersButton {
+ constructor({ emoji, ...data } = {}) {
+ super(toSnakeCase({ ...data, emoji: emoji && typeof emoji === 'string' ? resolvePartialEmoji(emoji) : emoji }));
+ }
+
+ /**
+ * Sets the emoji to display on this button
+ * @param {string|APIMessageComponentEmoji} emoji The emoji to display on this button
+ * @returns {ButtonBuilder}
+ */
+ setEmoji(emoji) {
+ if (typeof emoji === 'string') {
+ return super.setEmoji(resolvePartialEmoji(emoji));
+ }
+ return super.setEmoji(emoji);
+ }
+
+ /**
+ * Creates a new button builder from JSON data
+ * @param {ButtonBuilder|ButtonComponent|APIButtonComponent} other The other data
+ * @returns {ButtonBuilder}
+ */
+ static from(other) {
+ return new this(isJSONEncodable(other) ? other.toJSON() : other);
+ }
+}
+
+module.exports = ButtonBuilder;
+
+/**
+ * @external BuildersButton
+ * @see {@link https://discord.js.org/docs/packages/builders/stable/ButtonBuilder:Class}
+ */
diff --git a/node_modules/discord.js/src/structures/ButtonComponent.js b/node_modules/discord.js/src/structures/ButtonComponent.js
new file mode 100644
index 0000000..7319c3a
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ButtonComponent.js
@@ -0,0 +1,65 @@
+'use strict';
+
+const Component = require('./Component');
+
+/**
+ * Represents a button component
+ * @extends {Component}
+ */
+class ButtonComponent extends Component {
+ /**
+ * The style of this button
+ * @type {ButtonStyle}
+ * @readonly
+ */
+ get style() {
+ return this.data.style;
+ }
+
+ /**
+ * The label of this button
+ * @type {?string}
+ * @readonly
+ */
+ get label() {
+ return this.data.label ?? null;
+ }
+
+ /**
+ * The emoji used in this button
+ * @type {?APIMessageComponentEmoji}
+ * @readonly
+ */
+ get emoji() {
+ return this.data.emoji ?? null;
+ }
+
+ /**
+ * Whether this button is disabled
+ * @type {boolean}
+ * @readonly
+ */
+ get disabled() {
+ return this.data.disabled ?? false;
+ }
+
+ /**
+ * The custom id of this button (only defined on non-link buttons)
+ * @type {?string}
+ * @readonly
+ */
+ get customId() {
+ return this.data.custom_id ?? null;
+ }
+
+ /**
+ * The URL of this button (only defined on link buttons)
+ * @type {?string}
+ * @readonly
+ */
+ get url() {
+ return this.data.url ?? null;
+ }
+}
+
+module.exports = ButtonComponent;
diff --git a/node_modules/discord.js/src/structures/ButtonInteraction.js b/node_modules/discord.js/src/structures/ButtonInteraction.js
new file mode 100644
index 0000000..db57592
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ButtonInteraction.js
@@ -0,0 +1,11 @@
+'use strict';
+
+const MessageComponentInteraction = require('./MessageComponentInteraction');
+
+/**
+ * Represents a button interaction.
+ * @extends {MessageComponentInteraction}
+ */
+class ButtonInteraction extends MessageComponentInteraction {}
+
+module.exports = ButtonInteraction;
diff --git a/node_modules/discord.js/src/structures/CategoryChannel.js b/node_modules/discord.js/src/structures/CategoryChannel.js
new file mode 100644
index 0000000..d038044
--- /dev/null
+++ b/node_modules/discord.js/src/structures/CategoryChannel.js
@@ -0,0 +1,45 @@
+'use strict';
+
+const GuildChannel = require('./GuildChannel');
+const CategoryChannelChildManager = require('../managers/CategoryChannelChildManager');
+
+/**
+ * Represents a guild category channel on Discord.
+ * @extends {GuildChannel}
+ */
+class CategoryChannel extends GuildChannel {
+ /**
+ * The id of the parent of this channel.
+ * @name CategoryChannel#parentId
+ * @type {null}
+ */
+
+ /**
+ * The parent of this channel.
+ * @name CategoryChannel#parent
+ * @type {null}
+ * @readonly
+ */
+
+ /**
+ * Sets the category parent of this channel.
+ * <warn>It is not possible to set the parent of a CategoryChannel.</warn>
+ * @method setParent
+ * @memberof CategoryChannel
+ * @instance
+ * @param {?CategoryChannelResolvable} channel The channel to set as parent
+ * @param {SetParentOptions} [options={}] The options for setting the parent
+ * @returns {Promise<GuildChannel>}
+ */
+
+ /**
+ * A manager of the channels belonging to this category
+ * @type {CategoryChannelChildManager}
+ * @readonly
+ */
+ get children() {
+ return new CategoryChannelChildManager(this);
+ }
+}
+
+module.exports = CategoryChannel;
diff --git a/node_modules/discord.js/src/structures/ChannelSelectMenuBuilder.js b/node_modules/discord.js/src/structures/ChannelSelectMenuBuilder.js
new file mode 100644
index 0000000..6d99474
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ChannelSelectMenuBuilder.js
@@ -0,0 +1,31 @@
+'use strict';
+
+const { ChannelSelectMenuBuilder: BuildersChannelSelectMenu } = require('@discordjs/builders');
+const { isJSONEncodable } = require('@discordjs/util');
+const { toSnakeCase } = require('../util/Transformers');
+
+/**
+ * Class used to build select menu components to be sent through the API
+ * @extends {BuildersChannelSelectMenu}
+ */
+class ChannelSelectMenuBuilder extends BuildersChannelSelectMenu {
+ constructor(data = {}) {
+ super(toSnakeCase(data));
+ }
+
+ /**
+ * Creates a new select menu builder from JSON data
+ * @param {ChannelSelectMenuBuilder|ChannelSelectMenuComponent|APIChannelSelectComponent} other The other data
+ * @returns {ChannelSelectMenuBuilder}
+ */
+ static from(other) {
+ return new this(isJSONEncodable(other) ? other.toJSON() : other);
+ }
+}
+
+module.exports = ChannelSelectMenuBuilder;
+
+/**
+ * @external BuildersChannelSelectMenu
+ * @see {@link https://discord.js.org/docs/packages/builders/stable/ChannelSelectMenuBuilder:Class}
+ */
diff --git a/node_modules/discord.js/src/structures/ChannelSelectMenuComponent.js b/node_modules/discord.js/src/structures/ChannelSelectMenuComponent.js
new file mode 100644
index 0000000..90a7063
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ChannelSelectMenuComponent.js
@@ -0,0 +1,20 @@
+'use strict';
+
+const BaseSelectMenuComponent = require('./BaseSelectMenuComponent');
+
+/**
+ * Represents a channel select menu component
+ * @extends {BaseSelectMenuComponent}
+ */
+class ChannelSelectMenuComponent extends BaseSelectMenuComponent {
+ /**
+ * The options in this select menu
+ * @type {?(ChannelType[])}
+ * @readonly
+ */
+ get channelTypes() {
+ return this.data.channel_types ?? null;
+ }
+}
+
+module.exports = ChannelSelectMenuComponent;
diff --git a/node_modules/discord.js/src/structures/ChannelSelectMenuInteraction.js b/node_modules/discord.js/src/structures/ChannelSelectMenuInteraction.js
new file mode 100644
index 0000000..a5e9c99
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ChannelSelectMenuInteraction.js
@@ -0,0 +1,33 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const MessageComponentInteraction = require('./MessageComponentInteraction');
+
+/**
+ * Represents a {@link ComponentType.ChannelSelect} select menu interaction.
+ * @extends {MessageComponentInteraction}
+ */
+class ChannelSelectMenuInteraction extends MessageComponentInteraction {
+ constructor(client, data) {
+ super(client, data);
+ const { resolved, values } = data.data;
+
+ /**
+ * An array of the selected channel ids
+ * @type {Snowflake[]}
+ */
+ this.values = values ?? [];
+
+ /**
+ * Collection of the selected channels
+ * @type {Collection<Snowflake, BaseChannel|APIChannel>}
+ */
+ this.channels = new Collection();
+
+ for (const channel of Object.values(resolved?.channels ?? {})) {
+ this.channels.set(channel.id, this.client.channels._add(channel, this.guild) ?? channel);
+ }
+ }
+}
+
+module.exports = ChannelSelectMenuInteraction;
diff --git a/node_modules/discord.js/src/structures/ChatInputCommandInteraction.js b/node_modules/discord.js/src/structures/ChatInputCommandInteraction.js
new file mode 100644
index 0000000..35175e4
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ChatInputCommandInteraction.js
@@ -0,0 +1,41 @@
+'use strict';
+
+const CommandInteraction = require('./CommandInteraction');
+const CommandInteractionOptionResolver = require('./CommandInteractionOptionResolver');
+
+/**
+ * Represents a command interaction.
+ * @extends {CommandInteraction}
+ */
+class ChatInputCommandInteraction extends CommandInteraction {
+ constructor(client, data) {
+ super(client, data);
+
+ /**
+ * The options passed to the command.
+ * @type {CommandInteractionOptionResolver}
+ */
+ this.options = new CommandInteractionOptionResolver(
+ this.client,
+ data.data.options?.map(option => this.transformOption(option, data.data.resolved)) ?? [],
+ this.transformResolved(data.data.resolved ?? {}),
+ );
+ }
+
+ /**
+ * Returns a string representation of the command interaction.
+ * This can then be copied by a user and executed again in a new command while keeping the option order.
+ * @returns {string}
+ */
+ toString() {
+ const properties = [
+ this.commandName,
+ this.options._group,
+ this.options._subcommand,
+ ...this.options._hoistedOptions.map(o => `${o.name}:${o.value}`),
+ ];
+ return `/${properties.filter(Boolean).join(' ')}`;
+ }
+}
+
+module.exports = ChatInputCommandInteraction;
diff --git a/node_modules/discord.js/src/structures/ClientApplication.js b/node_modules/discord.js/src/structures/ClientApplication.js
new file mode 100644
index 0000000..69f5134
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ClientApplication.js
@@ -0,0 +1,222 @@
+'use strict';
+
+const { Routes } = require('discord-api-types/v10');
+const { ApplicationRoleConnectionMetadata } = require('./ApplicationRoleConnectionMetadata');
+const Team = require('./Team');
+const Application = require('./interfaces/Application');
+const ApplicationCommandManager = require('../managers/ApplicationCommandManager');
+const ApplicationFlagsBitField = require('../util/ApplicationFlagsBitField');
+const PermissionsBitField = require('../util/PermissionsBitField');
+
+/**
+ * @typedef {Object} ClientApplicationInstallParams
+ * @property {OAuth2Scopes[]} scopes The scopes to add the application to the server with
+ * @property {Readonly<PermissionsBitField>} permissions The permissions this bot will request upon joining
+ */
+
+/**
+ * Represents a client application.
+ * @extends {Application}
+ */
+class ClientApplication extends Application {
+ constructor(client, data) {
+ super(client, data);
+
+ /**
+ * The application command manager for this application
+ * @type {ApplicationCommandManager}
+ */
+ this.commands = new ApplicationCommandManager(this.client);
+ }
+
+ _patch(data) {
+ super._patch(data);
+
+ /**
+ * The tags this application has (max of 5)
+ * @type {string[]}
+ */
+ this.tags = data.tags ?? [];
+
+ if ('install_params' in data) {
+ /**
+ * Settings for this application's default in-app authorization
+ * @type {?ClientApplicationInstallParams}
+ */
+ this.installParams = {
+ scopes: data.install_params.scopes,
+ permissions: new PermissionsBitField(data.install_params.permissions).freeze(),
+ };
+ } else {
+ this.installParams ??= null;
+ }
+
+ if ('custom_install_url' in data) {
+ /**
+ * This application's custom installation URL
+ * @type {?string}
+ */
+ this.customInstallURL = data.custom_install_url;
+ } else {
+ this.customInstallURL = null;
+ }
+
+ if ('flags' in data) {
+ /**
+ * The flags this application has
+ * @type {ApplicationFlagsBitField}
+ */
+ this.flags = new ApplicationFlagsBitField(data.flags).freeze();
+ }
+
+ if ('approximate_guild_count' in data) {
+ /**
+ * An approximate amount of guilds this application is in.
+ * @type {?number}
+ */
+ this.approximateGuildCount = data.approximate_guild_count;
+ } else {
+ this.approximateGuildCount ??= null;
+ }
+
+ if ('guild_id' in data) {
+ /**
+ * The id of the guild associated with this application.
+ * @type {?Snowflake}
+ */
+ this.guildId = data.guild_id;
+ } else {
+ this.guildId ??= null;
+ }
+
+ if ('cover_image' in data) {
+ /**
+ * The hash of the application's cover image
+ * @type {?string}
+ */
+ this.cover = data.cover_image;
+ } else {
+ this.cover ??= null;
+ }
+
+ if ('rpc_origins' in data) {
+ /**
+ * The application's RPC origins, if enabled
+ * @type {string[]}
+ */
+ this.rpcOrigins = data.rpc_origins;
+ } else {
+ this.rpcOrigins ??= [];
+ }
+
+ if ('bot_require_code_grant' in data) {
+ /**
+ * If this application's bot requires a code grant when using the OAuth2 flow
+ * @type {?boolean}
+ */
+ this.botRequireCodeGrant = data.bot_require_code_grant;
+ } else {
+ this.botRequireCodeGrant ??= null;
+ }
+
+ if ('bot_public' in data) {
+ /**
+ * If this application's bot is public
+ * @type {?boolean}
+ */
+ this.botPublic = data.bot_public;
+ } else {
+ this.botPublic ??= null;
+ }
+
+ if ('role_connections_verification_url' in data) {
+ /**
+ * This application's role connection verification entry point URL
+ * @type {?string}
+ */
+ this.roleConnectionsVerificationURL = data.role_connections_verification_url;
+ } else {
+ this.roleConnectionsVerificationURL ??= null;
+ }
+
+ /**
+ * The owner of this OAuth application
+ * @type {?(User|Team)}
+ */
+ this.owner = data.team
+ ? new Team(this.client, data.team)
+ : data.owner
+ ? this.client.users._add(data.owner)
+ : this.owner ?? null;
+ }
+
+ /**
+ * The guild associated with this application.
+ * @type {?Guild}
+ * @readonly
+ */
+ get guild() {
+ return this.client.guilds.cache.get(this.guildId) ?? null;
+ }
+
+ /**
+ * Whether this application is partial
+ * @type {boolean}
+ * @readonly
+ */
+ get partial() {
+ return !this.name;
+ }
+
+ /**
+ * Obtains this application from Discord.
+ * @returns {Promise<ClientApplication>}
+ */
+ async fetch() {
+ const data = await this.client.rest.get(Routes.currentApplication());
+ this._patch(data);
+ return this;
+ }
+
+ /**
+ * Gets this application's role connection metadata records
+ * @returns {Promise<ApplicationRoleConnectionMetadata[]>}
+ */
+ async fetchRoleConnectionMetadataRecords() {
+ const metadata = await this.client.rest.get(Routes.applicationRoleConnectionMetadata(this.client.user.id));
+ return metadata.map(data => new ApplicationRoleConnectionMetadata(data));
+ }
+
+ /**
+ * Data for creating or editing an application role connection metadata.
+ * @typedef {Object} ApplicationRoleConnectionMetadataEditOptions
+ * @property {string} name The name of the metadata field
+ * @property {?Object<Locale, string>} [nameLocalizations] The name localizations for the metadata field
+ * @property {string} description The description of the metadata field
+ * @property {?Object<Locale, string>} [descriptionLocalizations] The description localizations for the metadata field
+ * @property {string} key The dictionary key of the metadata field
+ * @property {ApplicationRoleConnectionMetadataType} type The type of the metadata field
+ */
+
+ /**
+ * Updates this application's role connection metadata records
+ * @param {ApplicationRoleConnectionMetadataEditOptions[]} records The new role connection metadata records
+ * @returns {Promise<ApplicationRoleConnectionMetadata[]>}
+ */
+ async editRoleConnectionMetadataRecords(records) {
+ const newRecords = await this.client.rest.put(Routes.applicationRoleConnectionMetadata(this.client.user.id), {
+ body: records.map(record => ({
+ type: record.type,
+ key: record.key,
+ name: record.name,
+ name_localizations: record.nameLocalizations,
+ description: record.description,
+ description_localizations: record.descriptionLocalizations,
+ })),
+ });
+
+ return newRecords.map(data => new ApplicationRoleConnectionMetadata(data));
+ }
+}
+
+module.exports = ClientApplication;
diff --git a/node_modules/discord.js/src/structures/ClientPresence.js b/node_modules/discord.js/src/structures/ClientPresence.js
new file mode 100644
index 0000000..6dd72ee
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ClientPresence.js
@@ -0,0 +1,90 @@
+'use strict';
+
+const { GatewayOpcodes, ActivityType } = require('discord-api-types/v10');
+const { Presence } = require('./Presence');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+
+/**
+ * Represents the client's presence.
+ * @extends {Presence}
+ */
+class ClientPresence extends Presence {
+ constructor(client, data = {}) {
+ super(client, Object.assign(data, { status: data.status ?? 'online', user: { id: null } }));
+ }
+
+ /**
+ * Sets the client's presence
+ * @param {PresenceData} presence The data to set the presence to
+ * @returns {ClientPresence}
+ */
+ set(presence) {
+ const packet = this._parse(presence);
+ this._patch(packet);
+ if (presence.shardId === undefined) {
+ this.client.ws.broadcast({ op: GatewayOpcodes.PresenceUpdate, d: packet });
+ } else if (Array.isArray(presence.shardId)) {
+ for (const shardId of presence.shardId) {
+ this.client.ws.shards.get(shardId).send({ op: GatewayOpcodes.PresenceUpdate, d: packet });
+ }
+ } else {
+ this.client.ws.shards.get(presence.shardId).send({ op: GatewayOpcodes.PresenceUpdate, d: packet });
+ }
+ return this;
+ }
+
+ /**
+ * Parses presence data into a packet ready to be sent to Discord
+ * @param {PresenceData} presence The data to parse
+ * @returns {APIPresence}
+ * @private
+ */
+ _parse({ status, since, afk, activities }) {
+ const data = {
+ activities: [],
+ afk: typeof afk === 'boolean' ? afk : false,
+ since: typeof since === 'number' && !Number.isNaN(since) ? since : null,
+ status: status ?? this.status,
+ };
+ if (activities?.length) {
+ for (const [i, activity] of activities.entries()) {
+ if (typeof activity.name !== 'string') {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, `activities[${i}].name`, 'string');
+ }
+
+ activity.type ??= ActivityType.Playing;
+
+ if (activity.type === ActivityType.Custom && !activity.state) {
+ activity.state = activity.name;
+ activity.name = 'Custom Status';
+ }
+
+ data.activities.push({
+ type: activity.type,
+ name: activity.name,
+ state: activity.state,
+ url: activity.url,
+ });
+ }
+ } else if (!activities && (status || afk || since) && this.activities.length) {
+ data.activities.push(
+ ...this.activities.map(a => ({
+ name: a.name,
+ state: a.state ?? undefined,
+ type: a.type,
+ url: a.url ?? undefined,
+ })),
+ );
+ }
+
+ return data;
+ }
+}
+
+module.exports = ClientPresence;
+
+/* eslint-disable max-len */
+/**
+ * @external APIPresence
+ * @see {@link https://discord.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields}
+ */
diff --git a/node_modules/discord.js/src/structures/ClientUser.js b/node_modules/discord.js/src/structures/ClientUser.js
new file mode 100644
index 0000000..b93904c
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ClientUser.js
@@ -0,0 +1,187 @@
+'use strict';
+
+const { Routes } = require('discord-api-types/v10');
+const User = require('./User');
+const DataResolver = require('../util/DataResolver');
+
+/**
+ * Represents the logged in client's Discord user.
+ * @extends {User}
+ */
+class ClientUser extends User {
+ _patch(data) {
+ super._patch(data);
+
+ if ('verified' in data) {
+ /**
+ * Whether or not this account has been verified
+ * @type {boolean}
+ */
+ this.verified = data.verified;
+ }
+
+ if ('mfa_enabled' in data) {
+ /**
+ * If the bot's {@link ClientApplication#owner Owner} has MFA enabled on their account
+ * @type {?boolean}
+ */
+ this.mfaEnabled = typeof data.mfa_enabled === 'boolean' ? data.mfa_enabled : null;
+ } else {
+ this.mfaEnabled ??= null;
+ }
+
+ if ('token' in data) this.client.token = data.token;
+ }
+
+ /**
+ * Represents the client user's presence
+ * @type {ClientPresence}
+ * @readonly
+ */
+ get presence() {
+ return this.client.presence;
+ }
+
+ /**
+ * Data used to edit the logged in client
+ * @typedef {Object} ClientUserEditOptions
+ * @property {string} [username] The new username
+ * @property {?(BufferResolvable|Base64Resolvable)} [avatar] The new avatar
+ */
+
+ /**
+ * Edits the logged in client.
+ * @param {ClientUserEditOptions} options The options to provide
+ * @returns {Promise<ClientUser>}
+ */
+ async edit({ username, avatar }) {
+ const data = await this.client.rest.patch(Routes.user(), {
+ body: { username, avatar: avatar && (await DataResolver.resolveImage(avatar)) },
+ });
+
+ this.client.token = data.token;
+ this.client.rest.setToken(data.token);
+ const { updated } = this.client.actions.UserUpdate.handle(data);
+ return updated ?? this;
+ }
+
+ /**
+ * Sets the username of the logged in client.
+ * <info>Changing usernames in Discord is heavily rate limited, with only 2 requests
+ * every hour. Use this sparingly!</info>
+ * @param {string} username The new username
+ * @returns {Promise<ClientUser>}
+ * @example
+ * // Set username
+ * client.user.setUsername('discordjs')
+ * .then(user => console.log(`My new username is ${user.username}`))
+ * .catch(console.error);
+ */
+ setUsername(username) {
+ return this.edit({ username });
+ }
+
+ /**
+ * Sets the avatar of the logged in client.
+ * @param {?(BufferResolvable|Base64Resolvable)} avatar The new avatar
+ * @returns {Promise<ClientUser>}
+ * @example
+ * // Set avatar
+ * client.user.setAvatar('./avatar.png')
+ * .then(user => console.log(`New avatar set!`))
+ * .catch(console.error);
+ */
+ setAvatar(avatar) {
+ return this.edit({ avatar });
+ }
+
+ /**
+ * Options for setting activities
+ * @typedef {Object} ActivitiesOptions
+ * @property {string} name Name of the activity
+ * @property {string} [state] State of the activity
+ * @property {ActivityType} [type] Type of the activity
+ * @property {string} [url] Twitch / YouTube stream URL
+ */
+
+ /**
+ * Data resembling a raw Discord presence.
+ * @typedef {Object} PresenceData
+ * @property {PresenceStatusData} [status] Status of the user
+ * @property {boolean} [afk] Whether the user is AFK
+ * @property {ActivitiesOptions[]} [activities] Activity the user is playing
+ * @property {number|number[]} [shardId] Shard id(s) to have the activity set on
+ */
+
+ /**
+ * Sets the full presence of the client user.
+ * @param {PresenceData} data Data for the presence
+ * @returns {ClientPresence}
+ * @example
+ * // Set the client user's presence
+ * client.user.setPresence({ activities: [{ name: 'with discord.js' }], status: 'idle' });
+ */
+ setPresence(data) {
+ return this.client.presence.set(data);
+ }
+
+ /**
+ * A user's status. Must be one of:
+ * * `online`
+ * * `idle`
+ * * `invisible`
+ * * `dnd` (do not disturb)
+ * @typedef {string} PresenceStatusData
+ */
+
+ /**
+ * Sets the status of the client user.
+ * @param {PresenceStatusData} status Status to change to
+ * @param {number|number[]} [shardId] Shard id(s) to have the activity set on
+ * @returns {ClientPresence}
+ * @example
+ * // Set the client user's status
+ * client.user.setStatus('idle');
+ */
+ setStatus(status, shardId) {
+ return this.setPresence({ status, shardId });
+ }
+
+ /**
+ * Options for setting an activity.
+ * @typedef {Object} ActivityOptions
+ * @property {string} name Name of the activity
+ * @property {string} [state] State of the activity
+ * @property {string} [url] Twitch / YouTube stream URL
+ * @property {ActivityType} [type] Type of the activity
+ * @property {number|number[]} [shardId] Shard Id(s) to have the activity set on
+ */
+
+ /**
+ * Sets the activity the client user is playing.
+ * @param {string|ActivityOptions} name Activity being played, or options for setting the activity
+ * @param {ActivityOptions} [options] Options for setting the activity
+ * @returns {ClientPresence}
+ * @example
+ * // Set the client user's activity
+ * client.user.setActivity('discord.js', { type: ActivityType.Watching });
+ */
+ setActivity(name, options = {}) {
+ if (!name) return this.setPresence({ activities: [], shardId: options.shardId });
+
+ const activity = Object.assign({}, options, typeof name === 'object' ? name : { name });
+ return this.setPresence({ activities: [activity], shardId: activity.shardId });
+ }
+
+ /**
+ * Sets/removes the AFK flag for the client user.
+ * @param {boolean} [afk=true] Whether or not the user is AFK
+ * @param {number|number[]} [shardId] Shard Id(s) to have the AFK flag set on
+ * @returns {ClientPresence}
+ */
+ setAFK(afk = true, shardId) {
+ return this.setPresence({ afk, shardId });
+ }
+}
+
+module.exports = ClientUser;
diff --git a/node_modules/discord.js/src/structures/CommandInteraction.js b/node_modules/discord.js/src/structures/CommandInteraction.js
new file mode 100644
index 0000000..ec6ef40
--- /dev/null
+++ b/node_modules/discord.js/src/structures/CommandInteraction.js
@@ -0,0 +1,224 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const Attachment = require('./Attachment');
+const BaseInteraction = require('./BaseInteraction');
+const InteractionWebhook = require('./InteractionWebhook');
+const InteractionResponses = require('./interfaces/InteractionResponses');
+
+/**
+ * Represents a command interaction.
+ * @extends {BaseInteraction}
+ * @implements {InteractionResponses}
+ * @abstract
+ */
+class CommandInteraction extends BaseInteraction {
+ constructor(client, data) {
+ super(client, data);
+
+ /**
+ * The id of the channel this interaction was sent in
+ * @type {Snowflake}
+ * @name CommandInteraction#channelId
+ */
+
+ /**
+ * The invoked application command's id
+ * @type {Snowflake}
+ */
+ this.commandId = data.data.id;
+
+ /**
+ * The invoked application command's name
+ * @type {string}
+ */
+ this.commandName = data.data.name;
+
+ /**
+ * The invoked application command's type
+ * @type {ApplicationCommandType}
+ */
+ this.commandType = data.data.type;
+
+ /**
+ * The id of the guild the invoked application command is registered to
+ * @type {?Snowflake}
+ */
+ this.commandGuildId = data.data.guild_id ?? null;
+
+ /**
+ * Whether the reply to this interaction has been deferred
+ * @type {boolean}
+ */
+ this.deferred = false;
+
+ /**
+ * Whether this interaction has already been replied to
+ * @type {boolean}
+ */
+ this.replied = false;
+
+ /**
+ * Whether the reply to this interaction is ephemeral
+ * @type {?boolean}
+ */
+ this.ephemeral = null;
+
+ /**
+ * An associated interaction webhook, can be used to further interact with this interaction
+ * @type {InteractionWebhook}
+ */
+ this.webhook = new InteractionWebhook(this.client, this.applicationId, this.token);
+ }
+
+ /**
+ * The invoked application command, if it was fetched before
+ * @type {?ApplicationCommand}
+ */
+ get command() {
+ const id = this.commandId;
+ return this.guild?.commands.cache.get(id) ?? this.client.application.commands.cache.get(id) ?? null;
+ }
+
+ /**
+ * Represents the resolved data of a received command interaction.
+ * @typedef {Object} CommandInteractionResolvedData
+ * @property {Collection<Snowflake, User>} [users] The resolved users
+ * @property {Collection<Snowflake, GuildMember|APIGuildMember>} [members] The resolved guild members
+ * @property {Collection<Snowflake, Role|APIRole>} [roles] The resolved roles
+ * @property {Collection<Snowflake, BaseChannel|APIChannel>} [channels] The resolved channels
+ * @property {Collection<Snowflake, Message|APIMessage>} [messages] The resolved messages
+ * @property {Collection<Snowflake, Attachment>} [attachments] The resolved attachments
+ */
+
+ /**
+ * Transforms the resolved received from the API.
+ * @param {APIInteractionDataResolved} resolved The received resolved objects
+ * @returns {CommandInteractionResolvedData}
+ * @private
+ */
+ transformResolved({ members, users, channels, roles, messages, attachments }) {
+ const result = {};
+
+ if (members) {
+ result.members = new Collection();
+ for (const [id, member] of Object.entries(members)) {
+ const user = users[id];
+ result.members.set(id, this.guild?.members._add({ user, ...member }) ?? member);
+ }
+ }
+
+ if (users) {
+ result.users = new Collection();
+ for (const user of Object.values(users)) {
+ result.users.set(user.id, this.client.users._add(user));
+ }
+ }
+
+ if (roles) {
+ result.roles = new Collection();
+ for (const role of Object.values(roles)) {
+ result.roles.set(role.id, this.guild?.roles._add(role) ?? role);
+ }
+ }
+
+ if (channels) {
+ result.channels = new Collection();
+ for (const channel of Object.values(channels)) {
+ result.channels.set(channel.id, this.client.channels._add(channel, this.guild) ?? channel);
+ }
+ }
+
+ if (messages) {
+ result.messages = new Collection();
+ for (const message of Object.values(messages)) {
+ result.messages.set(message.id, this.channel?.messages?._add(message) ?? message);
+ }
+ }
+
+ if (attachments) {
+ result.attachments = new Collection();
+ for (const attachment of Object.values(attachments)) {
+ const patched = new Attachment(attachment);
+ result.attachments.set(attachment.id, patched);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Represents an option of a received command interaction.
+ * @typedef {Object} CommandInteractionOption
+ * @property {string} name The name of the option
+ * @property {ApplicationCommandOptionType} type The type of the option
+ * @property {boolean} [autocomplete] Whether the autocomplete interaction is enabled for a
+ * {@link ApplicationCommandOptionType.String}, {@link ApplicationCommandOptionType.Integer} or
+ * {@link ApplicationCommandOptionType.Number} option
+ * @property {string|number|boolean} [value] The value of the option
+ * @property {CommandInteractionOption[]} [options] Additional options if this option is a
+ * subcommand (group)
+ * @property {User} [user] The resolved user
+ * @property {GuildMember|APIGuildMember} [member] The resolved member
+ * @property {GuildChannel|ThreadChannel|APIChannel} [channel] The resolved channel
+ * @property {Role|APIRole} [role] The resolved role
+ * @property {Attachment} [attachment] The resolved attachment
+ */
+
+ /**
+ * Transforms an option received from the API.
+ * @param {APIApplicationCommandOption} option The received option
+ * @param {APIInteractionDataResolved} resolved The resolved interaction data
+ * @returns {CommandInteractionOption}
+ * @private
+ */
+ transformOption(option, resolved) {
+ const result = {
+ name: option.name,
+ type: option.type,
+ };
+
+ if ('value' in option) result.value = option.value;
+ if ('options' in option) result.options = option.options.map(opt => this.transformOption(opt, resolved));
+
+ if (resolved) {
+ const user = resolved.users?.[option.value];
+ if (user) result.user = this.client.users._add(user);
+
+ const member = resolved.members?.[option.value];
+ if (member) result.member = this.guild?.members._add({ user, ...member }) ?? member;
+
+ const channel = resolved.channels?.[option.value];
+ if (channel) result.channel = this.client.channels._add(channel, this.guild) ?? channel;
+
+ const role = resolved.roles?.[option.value];
+ if (role) result.role = this.guild?.roles._add(role) ?? role;
+
+ const attachment = resolved.attachments?.[option.value];
+ if (attachment) result.attachment = new Attachment(attachment);
+ }
+
+ return result;
+ }
+
+ // These are here only for documentation purposes - they are implemented by InteractionResponses
+ /* eslint-disable no-empty-function */
+ deferReply() {}
+ reply() {}
+ fetchReply() {}
+ editReply() {}
+ deleteReply() {}
+ followUp() {}
+ showModal() {}
+ awaitModalSubmit() {}
+}
+
+InteractionResponses.applyToClass(CommandInteraction, ['deferUpdate', 'update']);
+
+module.exports = CommandInteraction;
+
+/* eslint-disable max-len */
+/**
+ * @external APIInteractionDataResolved
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure}
+ */
diff --git a/node_modules/discord.js/src/structures/CommandInteractionOptionResolver.js b/node_modules/discord.js/src/structures/CommandInteractionOptionResolver.js
new file mode 100644
index 0000000..621dbf4
--- /dev/null
+++ b/node_modules/discord.js/src/structures/CommandInteractionOptionResolver.js
@@ -0,0 +1,308 @@
+'use strict';
+
+const { ApplicationCommandOptionType } = require('discord-api-types/v10');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+
+/**
+ * A resolver for command interaction options.
+ */
+class CommandInteractionOptionResolver {
+ constructor(client, options, resolved) {
+ /**
+ * The client that instantiated this.
+ * @name CommandInteractionOptionResolver#client
+ * @type {Client}
+ * @readonly
+ */
+ Object.defineProperty(this, 'client', { value: client });
+
+ /**
+ * The name of the subcommand group.
+ * @type {?string}
+ * @private
+ */
+ this._group = null;
+
+ /**
+ * The name of the subcommand.
+ * @type {?string}
+ * @private
+ */
+ this._subcommand = null;
+
+ /**
+ * The bottom-level options for the interaction.
+ * If there is a subcommand (or subcommand and group), this is the options for the subcommand.
+ * @type {CommandInteractionOption[]}
+ * @private
+ */
+ this._hoistedOptions = options;
+
+ // Hoist subcommand group if present
+ if (this._hoistedOptions[0]?.type === ApplicationCommandOptionType.SubcommandGroup) {
+ this._group = this._hoistedOptions[0].name;
+ this._hoistedOptions = this._hoistedOptions[0].options ?? [];
+ }
+ // Hoist subcommand if present
+ if (this._hoistedOptions[0]?.type === ApplicationCommandOptionType.Subcommand) {
+ this._subcommand = this._hoistedOptions[0].name;
+ this._hoistedOptions = this._hoistedOptions[0].options ?? [];
+ }
+
+ /**
+ * The interaction options array.
+ * @name CommandInteractionOptionResolver#data
+ * @type {ReadonlyArray<CommandInteractionOption>}
+ * @readonly
+ */
+ Object.defineProperty(this, 'data', { value: Object.freeze([...options]) });
+
+ /**
+ * The interaction resolved data
+ * @name CommandInteractionOptionResolver#resolved
+ * @type {?Readonly<CommandInteractionResolvedData>}
+ */
+ Object.defineProperty(this, 'resolved', { value: resolved ? Object.freeze(resolved) : null });
+ }
+
+ /**
+ * Gets an option by its name.
+ * @param {string} name The name of the option.
+ * @param {boolean} [required=false] Whether to throw an error if the option is not found.
+ * @returns {?CommandInteractionOption} The option, if found.
+ */
+ get(name, required = false) {
+ const option = this._hoistedOptions.find(opt => opt.name === name);
+ if (!option) {
+ if (required) {
+ throw new DiscordjsTypeError(ErrorCodes.CommandInteractionOptionNotFound, name);
+ }
+ return null;
+ }
+ return option;
+ }
+
+ /**
+ * Gets an option by name and property and checks its type.
+ * @param {string} name The name of the option.
+ * @param {ApplicationCommandOptionType[]} allowedTypes The allowed types of the option.
+ * @param {string[]} properties The properties to check for for `required`.
+ * @param {boolean} required Whether to throw an error if the option is not found.
+ * @returns {?CommandInteractionOption} The option, if found.
+ * @private
+ */
+ _getTypedOption(name, allowedTypes, properties, required) {
+ const option = this.get(name, required);
+ if (!option) {
+ return null;
+ } else if (!allowedTypes.includes(option.type)) {
+ throw new DiscordjsTypeError(ErrorCodes.CommandInteractionOptionType, name, option.type, allowedTypes.join(', '));
+ } else if (required && properties.every(prop => option[prop] === null || option[prop] === undefined)) {
+ throw new DiscordjsTypeError(ErrorCodes.CommandInteractionOptionEmpty, name, option.type);
+ }
+ return option;
+ }
+
+ /**
+ * Gets the selected subcommand.
+ * @param {boolean} [required=true] Whether to throw an error if there is no subcommand.
+ * @returns {?string} The name of the selected subcommand, or null if not set and not required.
+ */
+ getSubcommand(required = true) {
+ if (required && !this._subcommand) {
+ throw new DiscordjsTypeError(ErrorCodes.CommandInteractionOptionNoSubcommand);
+ }
+ return this._subcommand;
+ }
+
+ /**
+ * Gets the selected subcommand group.
+ * @param {boolean} [required=false] Whether to throw an error if there is no subcommand group.
+ * @returns {?string} The name of the selected subcommand group, or null if not set and not required.
+ */
+ getSubcommandGroup(required = false) {
+ if (required && !this._group) {
+ throw new DiscordjsTypeError(ErrorCodes.CommandInteractionOptionNoSubcommandGroup);
+ }
+ return this._group;
+ }
+
+ /**
+ * Gets a boolean option.
+ * @param {string} name The name of the option.
+ * @param {boolean} [required=false] Whether to throw an error if the option is not found.
+ * @returns {?boolean} The value of the option, or null if not set and not required.
+ */
+ getBoolean(name, required = false) {
+ const option = this._getTypedOption(name, [ApplicationCommandOptionType.Boolean], ['value'], required);
+ return option?.value ?? null;
+ }
+
+ /**
+ * Gets a channel option.
+ * @param {string} name The name of the option.
+ * @param {boolean} [required=false] Whether to throw an error if the option is not found.
+ * @param {ChannelType[]} [channelTypes=[]] The allowed types of channels. If empty, all channel types are allowed.
+ * @returns {?(GuildChannel|ThreadChannel|APIChannel)}
+ * The value of the option, or null if not set and not required.
+ */
+ getChannel(name, required = false, channelTypes = []) {
+ const option = this._getTypedOption(name, [ApplicationCommandOptionType.Channel], ['channel'], required);
+ const channel = option?.channel ?? null;
+
+ if (channel && channelTypes.length > 0 && !channelTypes.includes(channel.type)) {
+ throw new DiscordjsTypeError(
+ ErrorCodes.CommandInteractionOptionInvalidChannelType,
+ name,
+ channel.type,
+ channelTypes.join(', '),
+ );
+ }
+
+ return channel;
+ }
+
+ /**
+ * Gets a string option.
+ * @param {string} name The name of the option.
+ * @param {boolean} [required=false] Whether to throw an error if the option is not found.
+ * @returns {?string} The value of the option, or null if not set and not required.
+ */
+ getString(name, required = false) {
+ const option = this._getTypedOption(name, [ApplicationCommandOptionType.String], ['value'], required);
+ return option?.value ?? null;
+ }
+
+ /**
+ * Gets an integer option.
+ * @param {string} name The name of the option.
+ * @param {boolean} [required=false] Whether to throw an error if the option is not found.
+ * @returns {?number} The value of the option, or null if not set and not required.
+ */
+ getInteger(name, required = false) {
+ const option = this._getTypedOption(name, [ApplicationCommandOptionType.Integer], ['value'], required);
+ return option?.value ?? null;
+ }
+
+ /**
+ * Gets a number option.
+ * @param {string} name The name of the option.
+ * @param {boolean} [required=false] Whether to throw an error if the option is not found.
+ * @returns {?number} The value of the option, or null if not set and not required.
+ */
+ getNumber(name, required = false) {
+ const option = this._getTypedOption(name, [ApplicationCommandOptionType.Number], ['value'], required);
+ return option?.value ?? null;
+ }
+
+ /**
+ * Gets a user option.
+ * @param {string} name The name of the option.
+ * @param {boolean} [required=false] Whether to throw an error if the option is not found.
+ * @returns {?User} The value of the option, or null if not set and not required.
+ */
+ getUser(name, required = false) {
+ const option = this._getTypedOption(
+ name,
+ [ApplicationCommandOptionType.User, ApplicationCommandOptionType.Mentionable],
+ ['user'],
+ required,
+ );
+ return option?.user ?? null;
+ }
+
+ /**
+ * Gets a member option.
+ * @param {string} name The name of the option.
+ * @returns {?(GuildMember|APIGuildMember)}
+ * The value of the option, or null if the user is not present in the guild or the option is not set.
+ */
+ getMember(name) {
+ const option = this._getTypedOption(
+ name,
+ [ApplicationCommandOptionType.User, ApplicationCommandOptionType.Mentionable],
+ ['member'],
+ false,
+ );
+ return option?.member ?? null;
+ }
+
+ /**
+ * Gets a role option.
+ * @param {string} name The name of the option.
+ * @param {boolean} [required=false] Whether to throw an error if the option is not found.
+ * @returns {?(Role|APIRole)} The value of the option, or null if not set and not required.
+ */
+ getRole(name, required = false) {
+ const option = this._getTypedOption(
+ name,
+ [ApplicationCommandOptionType.Role, ApplicationCommandOptionType.Mentionable],
+ ['role'],
+ required,
+ );
+ return option?.role ?? null;
+ }
+
+ /**
+ * Gets an attachment option.
+ * @param {string} name The name of the option.
+ * @param {boolean} [required=false] Whether to throw an error if the option is not found.
+ * @returns {?Attachment} The value of the option, or null if not set and not required.
+ */
+ getAttachment(name, required = false) {
+ const option = this._getTypedOption(name, [ApplicationCommandOptionType.Attachment], ['attachment'], required);
+ return option?.attachment ?? null;
+ }
+
+ /**
+ * Gets a mentionable option.
+ * @param {string} name The name of the option.
+ * @param {boolean} [required=false] Whether to throw an error if the option is not found.
+ * @returns {?(User|GuildMember|APIGuildMember|Role|APIRole)}
+ * The value of the option, or null if not set and not required.
+ */
+ getMentionable(name, required = false) {
+ const option = this._getTypedOption(
+ name,
+ [ApplicationCommandOptionType.Mentionable],
+ ['user', 'member', 'role'],
+ required,
+ );
+ return option?.member ?? option?.user ?? option?.role ?? null;
+ }
+
+ /**
+ * Gets a message option.
+ * @param {string} name The name of the option.
+ * @param {boolean} [required=false] Whether to throw an error if the option is not found.
+ * @returns {?Message}
+ * The value of the option, or null if not set and not required.
+ */
+ getMessage(name, required = false) {
+ const option = this._getTypedOption(name, ['_MESSAGE'], ['message'], required);
+ return option?.message ?? null;
+ }
+
+ /**
+ * The full autocomplete option object.
+ * @typedef {Object} AutocompleteFocusedOption
+ * @property {string} name The name of the option
+ * @property {ApplicationCommandOptionType} type The type of the application command option
+ * @property {string} value The value of the option
+ * @property {boolean} focused Whether this option is currently in focus for autocomplete
+ */
+
+ /**
+ * Gets the focused option.
+ * @param {boolean} [getFull=false] Whether to get the full option object
+ * @returns {string|AutocompleteFocusedOption}
+ * The value of the option, or the whole option if getFull is true
+ */
+ getFocused(getFull = false) {
+ const focusedOption = this._hoistedOptions.find(option => option.focused);
+ if (!focusedOption) throw new DiscordjsTypeError(ErrorCodes.AutocompleteInteractionOptionNoFocusedOption);
+ return getFull ? focusedOption : focusedOption.value;
+ }
+}
+
+module.exports = CommandInteractionOptionResolver;
diff --git a/node_modules/discord.js/src/structures/Component.js b/node_modules/discord.js/src/structures/Component.js
new file mode 100644
index 0000000..10ba27d
--- /dev/null
+++ b/node_modules/discord.js/src/structures/Component.js
@@ -0,0 +1,47 @@
+'use strict';
+
+const isEqual = require('fast-deep-equal');
+
+/**
+ * Represents a component
+ */
+class Component {
+ constructor(data) {
+ /**
+ * The API data associated with this component
+ * @type {APIMessageComponent}
+ */
+ this.data = data;
+ }
+
+ /**
+ * The type of the component
+ * @type {ComponentType}
+ * @readonly
+ */
+ get type() {
+ return this.data.type;
+ }
+
+ /**
+ * Whether or not the given components are equal
+ * @param {Component|APIMessageComponent} other The component to compare against
+ * @returns {boolean}
+ */
+ equals(other) {
+ if (other instanceof Component) {
+ return isEqual(other.data, this.data);
+ }
+ return isEqual(other, this.data);
+ }
+
+ /**
+ * Returns the API-compatible JSON for this component
+ * @returns {APIMessageComponent}
+ */
+ toJSON() {
+ return { ...this.data };
+ }
+}
+
+module.exports = Component;
diff --git a/node_modules/discord.js/src/structures/ContextMenuCommandInteraction.js b/node_modules/discord.js/src/structures/ContextMenuCommandInteraction.js
new file mode 100644
index 0000000..fc49ca5
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ContextMenuCommandInteraction.js
@@ -0,0 +1,64 @@
+'use strict';
+
+const { lazy } = require('@discordjs/util');
+const { ApplicationCommandOptionType } = require('discord-api-types/v10');
+const CommandInteraction = require('./CommandInteraction');
+const CommandInteractionOptionResolver = require('./CommandInteractionOptionResolver');
+
+const getMessage = lazy(() => require('./Message').Message);
+
+/**
+ * Represents a context menu interaction.
+ * @extends {CommandInteraction}
+ */
+class ContextMenuCommandInteraction extends CommandInteraction {
+ constructor(client, data) {
+ super(client, data);
+ /**
+ * The target of the interaction, parsed into options
+ * @type {CommandInteractionOptionResolver}
+ */
+ this.options = new CommandInteractionOptionResolver(
+ this.client,
+ this.resolveContextMenuOptions(data.data),
+ this.transformResolved(data.data.resolved),
+ );
+
+ /**
+ * The id of the target of this interaction
+ * @type {Snowflake}
+ */
+ this.targetId = data.data.target_id;
+ }
+
+ /**
+ * Resolves and transforms options received from the API for a context menu interaction.
+ * @param {APIApplicationCommandInteractionData} data The interaction data
+ * @returns {CommandInteractionOption[]}
+ * @private
+ */
+ resolveContextMenuOptions({ target_id, resolved }) {
+ const result = [];
+
+ if (resolved.users?.[target_id]) {
+ result.push(
+ this.transformOption({ name: 'user', type: ApplicationCommandOptionType.User, value: target_id }, resolved),
+ );
+ }
+
+ if (resolved.messages?.[target_id]) {
+ result.push({
+ name: 'message',
+ type: '_MESSAGE',
+ value: target_id,
+ message:
+ this.channel?.messages._add(resolved.messages[target_id]) ??
+ new (getMessage())(this.client, resolved.messages[target_id]),
+ });
+ }
+
+ return result;
+ }
+}
+
+module.exports = ContextMenuCommandInteraction;
diff --git a/node_modules/discord.js/src/structures/DMChannel.js b/node_modules/discord.js/src/structures/DMChannel.js
new file mode 100644
index 0000000..2c917c4
--- /dev/null
+++ b/node_modules/discord.js/src/structures/DMChannel.js
@@ -0,0 +1,129 @@
+'use strict';
+
+const { userMention } = require('@discordjs/builders');
+const { ChannelType } = require('discord-api-types/v10');
+const { BaseChannel } = require('./BaseChannel');
+const TextBasedChannel = require('./interfaces/TextBasedChannel');
+const DMMessageManager = require('../managers/DMMessageManager');
+const Partials = require('../util/Partials');
+
+/**
+ * Represents a direct message channel between two users.
+ * @extends {BaseChannel}
+ * @implements {TextBasedChannel}
+ */
+class DMChannel extends BaseChannel {
+ constructor(client, data) {
+ super(client, data);
+
+ // Override the channel type so partials have a known type
+ this.type = ChannelType.DM;
+
+ /**
+ * A manager of the messages belonging to this channel
+ * @type {DMMessageManager}
+ */
+ this.messages = new DMMessageManager(this);
+ }
+
+ _patch(data) {
+ super._patch(data);
+
+ if (data.recipients) {
+ const recipient = data.recipients[0];
+
+ /**
+ * The recipient's id
+ * @type {Snowflake}
+ */
+ this.recipientId = recipient.id;
+
+ if ('username' in recipient || this.client.options.partials.includes(Partials.User)) {
+ this.client.users._add(recipient);
+ }
+ }
+
+ if ('last_message_id' in data) {
+ /**
+ * The channel's last message id, if one was sent
+ * @type {?Snowflake}
+ */
+ this.lastMessageId = data.last_message_id;
+ }
+
+ if ('last_pin_timestamp' in data) {
+ /**
+ * The timestamp when the last pinned message was pinned, if there was one
+ * @type {?number}
+ */
+ this.lastPinTimestamp = Date.parse(data.last_pin_timestamp);
+ } else {
+ this.lastPinTimestamp ??= null;
+ }
+ }
+
+ /**
+ * Whether this DMChannel is a partial
+ * @type {boolean}
+ * @readonly
+ */
+ get partial() {
+ return this.lastMessageId === undefined;
+ }
+
+ /**
+ * The recipient on the other end of the DM
+ * @type {?User}
+ * @readonly
+ */
+ get recipient() {
+ return this.client.users.resolve(this.recipientId);
+ }
+
+ /**
+ * Fetch this DMChannel.
+ * @param {boolean} [force=true] Whether to skip the cache check and request the API
+ * @returns {Promise<DMChannel>}
+ */
+ fetch(force = true) {
+ return this.client.users.createDM(this.recipientId, { force });
+ }
+
+ /**
+ * When concatenated with a string, this automatically returns the recipient's mention instead of the
+ * DMChannel object.
+ * @returns {string}
+ * @example
+ * // Logs: Hello from <@123456789012345678>!
+ * console.log(`Hello from ${channel}!`);
+ */
+ toString() {
+ return userMention(this.recipientId);
+ }
+
+ // These are here only for documentation purposes - they are implemented by TextBasedChannel
+ /* eslint-disable no-empty-function */
+ get lastMessage() {}
+ get lastPinAt() {}
+ send() {}
+ sendTyping() {}
+ createMessageCollector() {}
+ awaitMessages() {}
+ createMessageComponentCollector() {}
+ awaitMessageComponent() {}
+ // Doesn't work on DM channels; bulkDelete() {}
+ // Doesn't work on DM channels; fetchWebhooks() {}
+ // Doesn't work on DM channels; createWebhook() {}
+ // Doesn't work on DM channels; setRateLimitPerUser() {}
+ // Doesn't work on DM channels; setNSFW() {}
+}
+
+TextBasedChannel.applyToClass(DMChannel, true, [
+ 'bulkDelete',
+ 'fetchWebhooks',
+ 'createWebhook',
+ 'setRateLimitPerUser',
+ 'setNSFW',
+]);
+
+module.exports = DMChannel;
diff --git a/node_modules/discord.js/src/structures/DirectoryChannel.js b/node_modules/discord.js/src/structures/DirectoryChannel.js
new file mode 100644
index 0000000..870eff9
--- /dev/null
+++ b/node_modules/discord.js/src/structures/DirectoryChannel.js
@@ -0,0 +1,36 @@
+'use strict';
+
+const { BaseChannel } = require('./BaseChannel');
+
+/**
+ * Represents a channel that displays a directory of guilds.
+ * @extends {BaseChannel}
+ */
+class DirectoryChannel extends BaseChannel {
+ constructor(guild, data, client) {
+ super(client, data);
+
+ /**
+ * The guild the channel is in
+ * @type {InviteGuild}
+ */
+ this.guild = guild;
+
+ /**
+ * The id of the guild the channel is in
+ * @type {Snowflake}
+ */
+ this.guildId = guild.id;
+ }
+
+ _patch(data) {
+ super._patch(data);
+ /**
+ * The channel's name
+ * @type {string}
+ */
+ this.name = data.name;
+ }
+}
+
+module.exports = DirectoryChannel;
diff --git a/node_modules/discord.js/src/structures/Embed.js b/node_modules/discord.js/src/structures/Embed.js
new file mode 100644
index 0000000..dd68120
--- /dev/null
+++ b/node_modules/discord.js/src/structures/Embed.js
@@ -0,0 +1,220 @@
+'use strict';
+
+const { embedLength } = require('@discordjs/builders');
+const isEqual = require('fast-deep-equal');
+
+/**
+ * Represents an embed.
+ */
+class Embed {
+ constructor(data) {
+ /**
+ * The API embed data.
+ * @type {APIEmbed}
+ * @readonly
+ */
+ this.data = { ...data };
+ }
+
+ /**
+ * An array of fields of this embed.
+ * @type {Array<APIEmbedField>}
+ * @readonly
+ */
+ get fields() {
+ return this.data.fields ?? [];
+ }
+
+ /**
+ * The title of this embed.
+ * @type {?string}
+ * @readonly
+ */
+ get title() {
+ return this.data.title ?? null;
+ }
+
+ /**
+ * The description of this embed.
+ * @type {?string}
+ * @readonly
+ */
+ get description() {
+ return this.data.description ?? null;
+ }
+
+ /**
+ * The URL of this embed.
+ * @type {?string}
+ * @readonly
+ */
+ get url() {
+ return this.data.url ?? null;
+ }
+
+ /**
+ * The color of this embed.
+ * @type {?number}
+ * @readonly
+ */
+ get color() {
+ return this.data.color ?? null;
+ }
+
+ /**
+ * The timestamp of this embed. This is in an ISO 8601 format.
+ * @type {?string}
+ * @readonly
+ */
+ get timestamp() {
+ return this.data.timestamp ?? null;
+ }
+
+ /**
+ * @typedef {Object} EmbedAssetData
+ * @property {?string} url The URL of the image
+ * @property {?string} proxyURL The proxy URL of the image
+ * @property {?number} height The height of the image
+ * @property {?number} width The width of the image
+ */
+
+ /**
+ * The thumbnail of this embed.
+ * @type {?EmbedAssetData}
+ * @readonly
+ */
+ get thumbnail() {
+ if (!this.data.thumbnail) return null;
+ return {
+ url: this.data.thumbnail.url,
+ proxyURL: this.data.thumbnail.proxy_url,
+ height: this.data.thumbnail.height,
+ width: this.data.thumbnail.width,
+ };
+ }
+
+ /**
+ * The image of this embed.
+ * @type {?EmbedAssetData}
+ * @readonly
+ */
+ get image() {
+ if (!this.data.image) return null;
+ return {
+ url: this.data.image.url,
+ proxyURL: this.data.image.proxy_url,
+ height: this.data.image.height,
+ width: this.data.image.width,
+ };
+ }
+
+ /**
+ * The video of this embed.
+ * @type {?EmbedAssetData}
+ * @readonly
+ */
+ get video() {
+ if (!this.data.video) return null;
+ return {
+ url: this.data.video.url,
+ proxyURL: this.data.video.proxy_url,
+ height: this.data.video.height,
+ width: this.data.video.width,
+ };
+ }
+
+ /**
+ * @typedef {Object} EmbedAuthorData
+ * @property {string} name The name of the author
+ * @property {?string} url The URL of the author
+ * @property {?string} iconURL The icon URL of the author
+ * @property {?string} proxyIconURL The proxy icon URL of the author
+ */
+
+ /**
+ * The author of this embed.
+ * @type {?EmbedAuthorData}
+ * @readonly
+ */
+ get author() {
+ if (!this.data.author) return null;
+ return {
+ name: this.data.author.name,
+ url: this.data.author.url,
+ iconURL: this.data.author.icon_url,
+ proxyIconURL: this.data.author.proxy_icon_url,
+ };
+ }
+
+ /**
+ * The provider of this embed.
+ * @type {?APIEmbedProvider}
+ * @readonly
+ */
+ get provider() {
+ return this.data.provider ?? null;
+ }
+
+ /**
+ * @typedef {Object} EmbedFooterData
+ * @property {string} text The text of the footer
+ * @property {?string} iconURL The URL of the icon
+ * @property {?string} proxyIconURL The proxy URL of the icon
+ */
+
+ /**
+ * The footer of this embed.
+ * @type {?EmbedFooterData}
+ * @readonly
+ */
+ get footer() {
+ if (!this.data.footer) return null;
+ return {
+ text: this.data.footer.text,
+ iconURL: this.data.footer.icon_url,
+ proxyIconURL: this.data.footer.proxy_icon_url,
+ };
+ }
+
+ /**
+ * The accumulated length for the embed title, description, fields, footer text, and author name.
+ * @type {number}
+ * @readonly
+ */
+ get length() {
+ return embedLength(this.data);
+ }
+
+ /**
+ * The hex color of this embed.
+ * @type {?string}
+ * @readonly
+ */
+ get hexColor() {
+ return typeof this.data.color === 'number'
+ ? `#${this.data.color.toString(16).padStart(6, '0')}`
+ : this.data.color ?? null;
+ }
+
+ /**
+ * Returns the API-compatible JSON for this embed.
+ * @returns {APIEmbed}
+ */
+ toJSON() {
+ return { ...this.data };
+ }
+
+ /**
+ * Whether the given embeds are equal.
+ * @param {Embed|APIEmbed} other The embed to compare against
+ * @returns {boolean}
+ */
+ equals(other) {
+ if (other instanceof Embed) {
+ return isEqual(other.data, this.data);
+ }
+ return isEqual(other, this.data);
+ }
+}
+
+module.exports = Embed;
diff --git a/node_modules/discord.js/src/structures/EmbedBuilder.js b/node_modules/discord.js/src/structures/EmbedBuilder.js
new file mode 100644
index 0000000..10e445c
--- /dev/null
+++ b/node_modules/discord.js/src/structures/EmbedBuilder.js
@@ -0,0 +1,50 @@
+'use strict';
+
+const { EmbedBuilder: BuildersEmbed, embedLength } = require('@discordjs/builders');
+const { isJSONEncodable } = require('@discordjs/util');
+const { toSnakeCase } = require('../util/Transformers');
+const { resolveColor } = require('../util/Util');
+
+/**
+ * Represents an embed builder.
+ * @extends {BuildersEmbed}
+ */
+class EmbedBuilder extends BuildersEmbed {
+ constructor(data) {
+ super(toSnakeCase(data));
+ }
+
+ /**
+ * Sets the color of this embed
+ * @param {?ColorResolvable} color The color of the embed
+ * @returns {EmbedBuilder}
+ */
+ setColor(color) {
+ return super.setColor(color && resolveColor(color));
+ }
+
+ /**
+ * Creates a new embed builder from JSON data
+ * @param {EmbedBuilder|Embed|APIEmbed} other The other data
+ * @returns {EmbedBuilder}
+ */
+ static from(other) {
+ return new this(isJSONEncodable(other) ? other.toJSON() : other);
+ }
+
+ /**
+ * The accumulated length for the embed title, description, fields, footer text, and author name.
+ * @type {number}
+ * @readonly
+ */
+ get length() {
+ return embedLength(this.data);
+ }
+}
+
+module.exports = EmbedBuilder;
+
+/**
+ * @external BuildersEmbed
+ * @see {@link https://discord.js.org/docs/packages/builders/stable/EmbedBuilder:Class}
+ */
diff --git a/node_modules/discord.js/src/structures/Emoji.js b/node_modules/discord.js/src/structures/Emoji.js
new file mode 100644
index 0000000..409d292
--- /dev/null
+++ b/node_modules/discord.js/src/structures/Emoji.js
@@ -0,0 +1,108 @@
+'use strict';
+
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const Base = require('./Base');
+
+/**
+ * Represents raw emoji data from the API
+ * @typedef {APIEmoji} RawEmoji
+ * @property {?Snowflake} id The emoji's id
+ * @property {?string} name The emoji's name
+ * @property {?boolean} animated Whether the emoji is animated
+ */
+
+/**
+ * Represents an emoji, see {@link GuildEmoji} and {@link ReactionEmoji}.
+ * @extends {Base}
+ */
+class Emoji extends Base {
+ constructor(client, emoji) {
+ super(client);
+ /**
+ * Whether or not the emoji is animated
+ * @type {?boolean}
+ */
+ this.animated = emoji.animated ?? null;
+
+ /**
+ * The emoji's name
+ * @type {?string}
+ */
+ this.name = emoji.name ?? null;
+
+ /**
+ * The emoji's id
+ * @type {?Snowflake}
+ */
+ this.id = emoji.id;
+ }
+
+ /**
+ * The identifier of this emoji, used for message reactions
+ * @type {string}
+ * @readonly
+ */
+ get identifier() {
+ if (this.id) return `${this.animated ? 'a:' : ''}${this.name}:${this.id}`;
+ return encodeURIComponent(this.name);
+ }
+
+ /**
+ * The URL to the emoji file if it's a custom emoji
+ * @type {?string}
+ * @readonly
+ */
+ get url() {
+ return this.id && this.client.rest.cdn.emoji(this.id, this.animated ? 'gif' : 'png');
+ }
+
+ /**
+ * The timestamp the emoji was created at, or null if unicode
+ * @type {?number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return this.id && DiscordSnowflake.timestampFrom(this.id);
+ }
+
+ /**
+ * The time the emoji was created at, or null if unicode
+ * @type {?Date}
+ * @readonly
+ */
+ get createdAt() {
+ return this.id && new Date(this.createdTimestamp);
+ }
+
+ /**
+ * When concatenated with a string, this automatically returns the text required to form a graphical emoji on Discord
+ * instead of the Emoji object.
+ * @returns {string}
+ * @example
+ * // Send a custom emoji from a guild:
+ * const emoji = guild.emojis.cache.first();
+ * msg.channel.send(`Hello! ${emoji}`);
+ * @example
+ * // Send the emoji used in a reaction to the channel the reaction is part of
+ * reaction.message.channel.send(`The emoji used was: ${reaction.emoji}`);
+ */
+ toString() {
+ return this.id ? `<${this.animated ? 'a' : ''}:${this.name}:${this.id}>` : this.name;
+ }
+
+ toJSON() {
+ return super.toJSON({
+ guild: 'guildId',
+ createdTimestamp: true,
+ url: true,
+ identifier: true,
+ });
+ }
+}
+
+exports.Emoji = Emoji;
+
+/**
+ * @external APIEmoji
+ * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object}
+ */
diff --git a/node_modules/discord.js/src/structures/ForumChannel.js b/node_modules/discord.js/src/structures/ForumChannel.js
new file mode 100644
index 0000000..87e6478
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ForumChannel.js
@@ -0,0 +1,264 @@
+'use strict';
+
+const GuildChannel = require('./GuildChannel');
+const TextBasedChannel = require('./interfaces/TextBasedChannel');
+const GuildForumThreadManager = require('../managers/GuildForumThreadManager');
+const { transformAPIGuildForumTag, transformAPIGuildDefaultReaction } = require('../util/Channels');
+
+/**
+ * @typedef {Object} GuildForumTagEmoji
+ * @property {?Snowflake} id The id of a guild's custom emoji
+ * @property {?string} name The unicode character of the emoji
+ */
+
+/**
+ * @typedef {Object} GuildForumTag
+ * @property {Snowflake} id The id of the tag
+ * @property {string} name The name of the tag
+ * @property {boolean} moderated Whether this tag can only be added to or removed from threads
+ * by a member with the `ManageThreads` permission
+ * @property {?GuildForumTagEmoji} emoji The emoji of this tag
+ */
+
+/**
+ * @typedef {Object} GuildForumTagData
+ * @property {Snowflake} [id] The id of the tag
+ * @property {string} name The name of the tag
+ * @property {boolean} [moderated] Whether this tag can only be added to or removed from threads
+ * by a member with the `ManageThreads` permission
+ * @property {?GuildForumTagEmoji} [emoji] The emoji of this tag
+ */
+
+/**
+ * @typedef {Object} DefaultReactionEmoji
+ * @property {?Snowflake} id The id of a guild's custom emoji
+ * @property {?string} name The unicode character of the emoji
+ */
+
+/**
+ * Represents a channel that only contains threads
+ * @extends {GuildChannel}
+ * @implements {TextBasedChannel}
+ */
+class ForumChannel extends GuildChannel {
+ constructor(guild, data, client) {
+ super(guild, data, client, false);
+
+ /**
+ * A manager of the threads belonging to this channel
+ * @type {GuildForumThreadManager}
+ */
+ this.threads = new GuildForumThreadManager(this);
+
+ this._patch(data);
+ }
+
+ _patch(data) {
+ super._patch(data);
+ if ('available_tags' in data) {
+ /**
+ * The set of tags that can be used in this channel.
+ * @type {GuildForumTag[]}
+ */
+ this.availableTags = data.available_tags.map(tag => transformAPIGuildForumTag(tag));
+ } else {
+ this.availableTags ??= [];
+ }
+
+ if ('default_reaction_emoji' in data) {
+ /**
+ * The emoji to show in the add reaction button on a thread in a guild forum channel
+ * @type {?DefaultReactionEmoji}
+ */
+ this.defaultReactionEmoji = data.default_reaction_emoji
+ ? transformAPIGuildDefaultReaction(data.default_reaction_emoji)
+ : null;
+ } else {
+ this.defaultReactionEmoji ??= null;
+ }
+
+ if ('default_thread_rate_limit_per_user' in data) {
+ /**
+ * The initial rate limit per user (slowmode) to set on newly created threads in a channel.
+ * @type {?number}
+ */
+ this.defaultThreadRateLimitPerUser = data.default_thread_rate_limit_per_user;
+ } else {
+ this.defaultThreadRateLimitPerUser ??= null;
+ }
+
+ if ('rate_limit_per_user' in data) {
+ /**
+ * The rate limit per user (slowmode) for this channel.
+ * @type {?number}
+ */
+ this.rateLimitPerUser = data.rate_limit_per_user;
+ } else {
+ this.rateLimitPerUser ??= null;
+ }
+
+ if ('default_auto_archive_duration' in data) {
+ /**
+ * The default auto archive duration for newly created threads in this channel.
+ * @type {?ThreadAutoArchiveDuration}
+ */
+ this.defaultAutoArchiveDuration = data.default_auto_archive_duration;
+ } else {
+ this.defaultAutoArchiveDuration ??= null;
+ }
+
+ if ('nsfw' in data) {
+ /**
+ * If this channel is considered NSFW.
+ * @type {boolean}
+ */
+ this.nsfw = data.nsfw;
+ } else {
+ this.nsfw ??= false;
+ }
+
+ if ('topic' in data) {
+ /**
+ * The topic of this channel.
+ * @type {?string}
+ */
+ this.topic = data.topic;
+ }
+
+ if ('default_sort_order' in data) {
+ /**
+ * The default sort order mode used to order posts
+ * @type {?SortOrderType}
+ */
+ this.defaultSortOrder = data.default_sort_order;
+ } else {
+ this.defaultSortOrder ??= null;
+ }
+
+ /**
+ * The default layout type used to display posts
+ * @type {ForumLayoutType}
+ */
+ this.defaultForumLayout = data.default_forum_layout;
+ }
+
+ /**
+ * Sets the available tags for this forum channel
+ * @param {GuildForumTagData[]} availableTags The tags to set as available in this channel
+ * @param {string} [reason] Reason for changing the available tags
+ * @returns {Promise<ForumChannel>}
+ */
+ setAvailableTags(availableTags, reason) {
+ return this.edit({ availableTags, reason });
+ }
+
+ /**
+ * Sets the default reaction emoji for this channel
+ * @param {?DefaultReactionEmoji} defaultReactionEmoji The emoji to set as the default reaction emoji
+ * @param {string} [reason] Reason for changing the default reaction emoji
+ * @returns {Promise<ForumChannel>}
+ */
+ setDefaultReactionEmoji(defaultReactionEmoji, reason) {
+ return this.edit({ defaultReactionEmoji, reason });
+ }
+
+ /**
+ * Sets the default rate limit per user (slowmode) for new threads in this channel
+ * @param {number} defaultThreadRateLimitPerUser The rate limit to set on newly created threads in this channel
+ * @param {string} [reason] Reason for changing the default rate limit
+ * @returns {Promise<ForumChannel>}
+ */
+ setDefaultThreadRateLimitPerUser(defaultThreadRateLimitPerUser, reason) {
+ return this.edit({ defaultThreadRateLimitPerUser, reason });
+ }
+
+ /**
+ * Creates an invite to this guild channel.
+ * @param {InviteCreateOptions} [options={}] The options for creating the invite
+ * @returns {Promise<Invite>}
+ * @example
+ * // Create an invite to a channel
+ * channel.createInvite()
+ * .then(invite => console.log(`Created an invite with a code of ${invite.code}`))
+ * .catch(console.error);
+ */
+ createInvite(options) {
+ return this.guild.invites.create(this.id, options);
+ }
+
+ /**
+ * Fetches a collection of invites to this guild channel.
+ * Resolves with a collection mapping invites by their codes.
+ * @param {boolean} [cache=true] Whether to cache the fetched invites
+ * @returns {Promise<Collection<string, Invite>>}
+ */
+ fetchInvites(cache) {
+ return this.guild.invites.fetch({ channelId: this.id, cache });
+ }
+
+ /**
+ * Sets the default auto archive duration for all newly created threads in this channel.
+ * @param {ThreadAutoArchiveDuration} defaultAutoArchiveDuration The new default auto archive duration
+ * @param {string} [reason] Reason for changing the channel's default auto archive duration
+ * @returns {Promise<ForumChannel>}
+ */
+ setDefaultAutoArchiveDuration(defaultAutoArchiveDuration, reason) {
+ return this.edit({ defaultAutoArchiveDuration, reason });
+ }
+
+ /**
+ * Sets a new topic for the guild channel.
+ * @param {?string} topic The new topic for the guild channel
+ * @param {string} [reason] Reason for changing the guild channel's topic
+ * @returns {Promise<ForumChannel>}
+ * @example
+ * // Set a new channel topic
+ * channel.setTopic('needs more rate limiting')
+ * .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))
+ * .catch(console.error);
+ */
+ setTopic(topic, reason) {
+ return this.edit({ topic, reason });
+ }
+
+ /**
+ * Sets the default sort order mode used to order posts
+ * @param {?SortOrderType} defaultSortOrder The default sort order mode to set on this channel
+ * @param {string} [reason] Reason for changing the default sort order
+ * @returns {Promise<ForumChannel>}
+ */
+ setDefaultSortOrder(defaultSortOrder, reason) {
+ return this.edit({ defaultSortOrder, reason });
+ }
+
+ /**
+ * Sets the default forum layout type used to display posts
+ * @param {ForumLayoutType} defaultForumLayout The default forum layout type to set on this channel
+ * @param {string} [reason] Reason for changing the default forum layout
+ * @returns {Promise<ForumChannel>}
+ */
+ setDefaultForumLayout(defaultForumLayout, reason) {
+ return this.edit({ defaultForumLayout, reason });
+ }
+
+ // These are here only for documentation purposes - they are implemented by TextBasedChannel
+ /* eslint-disable no-empty-function */
+ createWebhook() {}
+ fetchWebhooks() {}
+ setNSFW() {}
+ setRateLimitPerUser() {}
+}
+
+TextBasedChannel.applyToClass(ForumChannel, true, [
+ 'send',
+ 'lastMessage',
+ 'lastPinAt',
+ 'bulkDelete',
+ 'sendTyping',
+ 'createMessageCollector',
+ 'awaitMessages',
+ 'createMessageComponentCollector',
+ 'awaitMessageComponent',
+]);
+
+module.exports = ForumChannel;
diff --git a/node_modules/discord.js/src/structures/Guild.js b/node_modules/discord.js/src/structures/Guild.js
new file mode 100644
index 0000000..f07e9b4
--- /dev/null
+++ b/node_modules/discord.js/src/structures/Guild.js
@@ -0,0 +1,1367 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { makeURLSearchParams } = require('@discordjs/rest');
+const { ChannelType, GuildPremiumTier, Routes, GuildFeature } = require('discord-api-types/v10');
+const AnonymousGuild = require('./AnonymousGuild');
+const GuildAuditLogs = require('./GuildAuditLogs');
+const { GuildOnboarding } = require('./GuildOnboarding');
+const GuildPreview = require('./GuildPreview');
+const GuildTemplate = require('./GuildTemplate');
+const Integration = require('./Integration');
+const Webhook = require('./Webhook');
+const WelcomeScreen = require('./WelcomeScreen');
+const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors');
+const AutoModerationRuleManager = require('../managers/AutoModerationRuleManager');
+const GuildApplicationCommandManager = require('../managers/GuildApplicationCommandManager');
+const GuildBanManager = require('../managers/GuildBanManager');
+const GuildChannelManager = require('../managers/GuildChannelManager');
+const GuildEmojiManager = require('../managers/GuildEmojiManager');
+const GuildInviteManager = require('../managers/GuildInviteManager');
+const GuildMemberManager = require('../managers/GuildMemberManager');
+const GuildScheduledEventManager = require('../managers/GuildScheduledEventManager');
+const GuildStickerManager = require('../managers/GuildStickerManager');
+const PresenceManager = require('../managers/PresenceManager');
+const RoleManager = require('../managers/RoleManager');
+const StageInstanceManager = require('../managers/StageInstanceManager');
+const VoiceStateManager = require('../managers/VoiceStateManager');
+const DataResolver = require('../util/DataResolver');
+const Status = require('../util/Status');
+const SystemChannelFlagsBitField = require('../util/SystemChannelFlagsBitField');
+const { discordSort, getSortableGroupTypes } = require('../util/Util');
+
+/**
+ * Represents a guild (or a server) on Discord.
+ * <info>It's recommended to see if a guild is available before performing operations or reading data from it. You can
+ * check this with {@link Guild#available}.</info>
+ * @extends {AnonymousGuild}
+ */
+class Guild extends AnonymousGuild {
+ constructor(client, data) {
+ super(client, data, false);
+
+ /**
+ * A manager of the application commands belonging to this guild
+ * @type {GuildApplicationCommandManager}
+ */
+ this.commands = new GuildApplicationCommandManager(this);
+
+ /**
+ * A manager of the members belonging to this guild
+ * @type {GuildMemberManager}
+ */
+ this.members = new GuildMemberManager(this);
+
+ /**
+ * A manager of the channels belonging to this guild
+ * @type {GuildChannelManager}
+ */
+ this.channels = new GuildChannelManager(this);
+
+ /**
+ * A manager of the bans belonging to this guild
+ * @type {GuildBanManager}
+ */
+ this.bans = new GuildBanManager(this);
+
+ /**
+ * A manager of the roles belonging to this guild
+ * @type {RoleManager}
+ */
+ this.roles = new RoleManager(this);
+
+ /**
+ * A manager of the presences belonging to this guild
+ * @type {PresenceManager}
+ */
+ this.presences = new PresenceManager(this.client);
+
+ /**
+ * A manager of the voice states of this guild
+ * @type {VoiceStateManager}
+ */
+ this.voiceStates = new VoiceStateManager(this);
+
+ /**
+ * A manager of the stage instances of this guild
+ * @type {StageInstanceManager}
+ */
+ this.stageInstances = new StageInstanceManager(this);
+
+ /**
+ * A manager of the invites of this guild
+ * @type {GuildInviteManager}
+ */
+ this.invites = new GuildInviteManager(this);
+
+ /**
+ * A manager of the scheduled events of this guild
+ * @type {GuildScheduledEventManager}
+ */
+ this.scheduledEvents = new GuildScheduledEventManager(this);
+
+ /**
+ * A manager of the auto moderation rules of this guild.
+ * @type {AutoModerationRuleManager}
+ */
+ this.autoModerationRules = new AutoModerationRuleManager(this);
+
+ if (!data) return;
+ if (data.unavailable) {
+ /**
+ * Whether the guild is available to access. If it is not available, it indicates a server outage
+ * @type {boolean}
+ */
+ this.available = false;
+ } else {
+ this._patch(data);
+ if (!data.channels) this.available = false;
+ }
+
+ /**
+ * The id of the shard this Guild belongs to.
+ * @type {number}
+ */
+ this.shardId = data.shardId;
+ }
+
+ /**
+ * The Shard this Guild belongs to.
+ * @type {WebSocketShard}
+ * @readonly
+ */
+ get shard() {
+ return this.client.ws.shards.get(this.shardId);
+ }
+
+ _patch(data) {
+ super._patch(data);
+ this.id = data.id;
+ if ('name' in data) this.name = data.name;
+ if ('icon' in data) this.icon = data.icon;
+ if ('unavailable' in data) {
+ this.available = !data.unavailable;
+ } else {
+ this.available ??= true;
+ }
+
+ if ('discovery_splash' in data) {
+ /**
+ * The hash of the guild discovery splash image
+ * @type {?string}
+ */
+ this.discoverySplash = data.discovery_splash;
+ }
+
+ if ('member_count' in data) {
+ /**
+ * The full amount of members in this guild
+ * @type {number}
+ */
+ this.memberCount = data.member_count;
+ }
+
+ if ('large' in data) {
+ /**
+ * Whether the guild is "large" (has more than {@link WebsocketOptions large_threshold} members, 50 by default)
+ * @type {boolean}
+ */
+ this.large = Boolean(data.large);
+ }
+
+ if ('premium_progress_bar_enabled' in data) {
+ /**
+ * Whether this guild has its premium (boost) progress bar enabled
+ * @type {boolean}
+ */
+ this.premiumProgressBarEnabled = data.premium_progress_bar_enabled;
+ }
+
+ if ('application_id' in data) {
+ /**
+ * The id of the application that created this guild (if applicable)
+ * @type {?Snowflake}
+ */
+ this.applicationId = data.application_id;
+ }
+
+ if ('afk_timeout' in data) {
+ /**
+ * The time in seconds before a user is counted as "away from keyboard"
+ * @type {?number}
+ */
+ this.afkTimeout = data.afk_timeout;
+ }
+
+ if ('afk_channel_id' in data) {
+ /**
+ * The id of the voice channel where AFK members are moved
+ * @type {?Snowflake}
+ */
+ this.afkChannelId = data.afk_channel_id;
+ }
+
+ if ('system_channel_id' in data) {
+ /**
+ * The system channel's id
+ * @type {?Snowflake}
+ */
+ this.systemChannelId = data.system_channel_id;
+ }
+
+ if ('premium_tier' in data) {
+ /**
+ * The premium tier of this guild
+ * @type {GuildPremiumTier}
+ */
+ this.premiumTier = data.premium_tier;
+ }
+
+ if ('widget_enabled' in data) {
+ /**
+ * Whether widget images are enabled on this guild
+ * @type {?boolean}
+ */
+ this.widgetEnabled = data.widget_enabled;
+ } else {
+ this.widgetEnabled ??= null;
+ }
+
+ if ('widget_channel_id' in data) {
+ /**
+ * The widget channel's id, if enabled
+ * @type {?string}
+ */
+ this.widgetChannelId = data.widget_channel_id;
+ } else {
+ this.widgetChannelId ??= null;
+ }
+
+ if ('explicit_content_filter' in data) {
+ /**
+ * The explicit content filter level of the guild
+ * @type {GuildExplicitContentFilter}
+ */
+ this.explicitContentFilter = data.explicit_content_filter;
+ }
+
+ if ('mfa_level' in data) {
+ /**
+ * The required MFA level for this guild
+ * @type {GuildMFALevel}
+ */
+ this.mfaLevel = data.mfa_level;
+ }
+
+ if ('joined_at' in data) {
+ /**
+ * The timestamp the client user joined the guild at
+ * @type {number}
+ */
+ this.joinedTimestamp = Date.parse(data.joined_at);
+ }
+
+ if ('default_message_notifications' in data) {
+ /**
+ * The default message notification level of the guild
+ * @type {GuildDefaultMessageNotifications}
+ */
+ this.defaultMessageNotifications = data.default_message_notifications;
+ }
+
+ if ('system_channel_flags' in data) {
+ /**
+ * The value set for the guild's system channel flags
+ * @type {Readonly<SystemChannelFlagsBitField>}
+ */
+ this.systemChannelFlags = new SystemChannelFlagsBitField(data.system_channel_flags).freeze();
+ }
+
+ if ('max_members' in data) {
+ /**
+ * The maximum amount of members the guild can have
+ * @type {?number}
+ */
+ this.maximumMembers = data.max_members;
+ } else {
+ this.maximumMembers ??= null;
+ }
+
+ if ('max_presences' in data) {
+ /**
+ * The maximum amount of presences the guild can have (this is `null` for all but the largest of guilds)
+ * <info>You will need to fetch the guild using {@link Guild#fetch} if you want to receive this parameter</info>
+ * @type {?number}
+ */
+ this.maximumPresences = data.max_presences;
+ } else {
+ this.maximumPresences ??= null;
+ }
+
+ if ('max_video_channel_users' in data) {
+ /**
+ * The maximum amount of users allowed in a video channel.
+ * @type {?number}
+ */
+ this.maxVideoChannelUsers = data.max_video_channel_users;
+ } else {
+ this.maxVideoChannelUsers ??= null;
+ }
+
+ if ('max_stage_video_channel_users' in data) {
+ /**
+ * The maximum amount of users allowed in a stage video channel.
+ * @type {?number}
+ */
+ this.maxStageVideoChannelUsers = data.max_stage_video_channel_users;
+ } else {
+ this.maxStageVideoChannelUsers ??= null;
+ }
+
+ if ('approximate_member_count' in data) {
+ /**
+ * The approximate amount of members the guild has
+ * <info>You will need to fetch the guild using {@link Guild#fetch} if you want to receive this parameter</info>
+ * @type {?number}
+ */
+ this.approximateMemberCount = data.approximate_member_count;
+ } else {
+ this.approximateMemberCount ??= null;
+ }
+
+ if ('approximate_presence_count' in data) {
+ /**
+ * The approximate amount of presences the guild has
+ * <info>You will need to fetch the guild using {@link Guild#fetch} if you want to receive this parameter</info>
+ * @type {?number}
+ */
+ this.approximatePresenceCount = data.approximate_presence_count;
+ } else {
+ this.approximatePresenceCount ??= null;
+ }
+
+ /**
+ * The use count of the vanity URL code of the guild, if any
+ * <info>You will need to fetch this parameter using {@link Guild#fetchVanityData} if you want to receive it</info>
+ * @type {?number}
+ */
+ this.vanityURLUses ??= null;
+
+ if ('rules_channel_id' in data) {
+ /**
+ * The rules channel's id for the guild
+ * @type {?Snowflake}
+ */
+ this.rulesChannelId = data.rules_channel_id;
+ }
+
+ if ('public_updates_channel_id' in data) {
+ /**
+ * The community updates channel's id for the guild
+ * @type {?Snowflake}
+ */
+ this.publicUpdatesChannelId = data.public_updates_channel_id;
+ }
+
+ if ('preferred_locale' in data) {
+ /**
+ * The preferred locale of the guild, defaults to `en-US`
+ * @type {Locale}
+ */
+ this.preferredLocale = data.preferred_locale;
+ }
+
+ if ('safety_alerts_channel_id' in data) {
+ /**
+ * The safety alerts channel's id for the guild
+ * @type {?Snowflake}
+ */
+ this.safetyAlertsChannelId = data.safety_alerts_channel_id;
+ } else {
+ this.safetyAlertsChannelId ??= null;
+ }
+
+ if (data.channels) {
+ this.channels.cache.clear();
+ for (const rawChannel of data.channels) {
+ this.client.channels._add(rawChannel, this);
+ }
+ }
+
+ if (data.threads) {
+ for (const rawThread of data.threads) {
+ this.client.channels._add(rawThread, this);
+ }
+ }
+
+ if (data.roles) {
+ this.roles.cache.clear();
+ for (const role of data.roles) this.roles._add(role);
+ }
+
+ if (data.members) {
+ this.members.cache.clear();
+ for (const guildUser of data.members) this.members._add(guildUser);
+ }
+
+ if ('owner_id' in data) {
+ /**
+ * The user id of this guild's owner
+ * @type {Snowflake}
+ */
+ this.ownerId = data.owner_id;
+ }
+
+ if (data.presences) {
+ for (const presence of data.presences) {
+ this.presences._add(Object.assign(presence, { guild: this }));
+ }
+ }
+
+ if (data.stage_instances) {
+ this.stageInstances.cache.clear();
+ for (const stageInstance of data.stage_instances) {
+ this.stageInstances._add(stageInstance);
+ }
+ }
+
+ if (data.guild_scheduled_events) {
+ this.scheduledEvents.cache.clear();
+ for (const scheduledEvent of data.guild_scheduled_events) {
+ this.scheduledEvents._add(scheduledEvent);
+ }
+ }
+
+ if (data.voice_states) {
+ this.voiceStates.cache.clear();
+ for (const voiceState of data.voice_states) {
+ this.voiceStates._add(voiceState);
+ }
+ }
+
+ if (!this.emojis) {
+ /**
+ * A manager of the emojis belonging to this guild
+ * @type {GuildEmojiManager}
+ */
+ this.emojis = new GuildEmojiManager(this);
+ if (data.emojis) for (const emoji of data.emojis) this.emojis._add(emoji);
+ } else if (data.emojis) {
+ this.client.actions.GuildEmojisUpdate.handle({
+ guild_id: this.id,
+ emojis: data.emojis,
+ });
+ }
+
+ if (!this.stickers) {
+ /**
+ * A manager of the stickers belonging to this guild
+ * @type {GuildStickerManager}
+ */
+ this.stickers = new GuildStickerManager(this);
+ if (data.stickers) for (const sticker of data.stickers) this.stickers._add(sticker);
+ } else if (data.stickers) {
+ this.client.actions.GuildStickersUpdate.handle({
+ guild_id: this.id,
+ stickers: data.stickers,
+ });
+ }
+ }
+
+ /**
+ * The time the client user joined the guild
+ * @type {Date}
+ * @readonly
+ */
+ get joinedAt() {
+ return new Date(this.joinedTimestamp);
+ }
+
+ /**
+ * The URL to this guild's discovery splash image.
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ discoverySplashURL(options = {}) {
+ return this.discoverySplash && this.client.rest.cdn.discoverySplash(this.id, this.discoverySplash, options);
+ }
+
+ /**
+ * Fetches the owner of the guild.
+ * If the member object isn't needed, use {@link Guild#ownerId} instead.
+ * @param {BaseFetchOptions} [options] The options for fetching the member
+ * @returns {Promise<GuildMember>}
+ */
+ async fetchOwner(options) {
+ if (!this.ownerId) {
+ throw new DiscordjsError(ErrorCodes.FetchOwnerId);
+ }
+ const member = await this.members.fetch({ ...options, user: this.ownerId });
+ return member;
+ }
+
+ /**
+ * AFK voice channel for this guild
+ * @type {?VoiceChannel}
+ * @readonly
+ */
+ get afkChannel() {
+ return this.client.channels.resolve(this.afkChannelId);
+ }
+
+ /**
+ * System channel for this guild
+ * @type {?TextChannel}
+ * @readonly
+ */
+ get systemChannel() {
+ return this.client.channels.resolve(this.systemChannelId);
+ }
+
+ /**
+ * Widget channel for this guild
+ * @type {?(TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel)}
+ * @readonly
+ */
+ get widgetChannel() {
+ return this.client.channels.resolve(this.widgetChannelId);
+ }
+
+ /**
+ * Rules channel for this guild
+ * @type {?TextChannel}
+ * @readonly
+ */
+ get rulesChannel() {
+ return this.client.channels.resolve(this.rulesChannelId);
+ }
+
+ /**
+ * Public updates channel for this guild
+ * @type {?TextChannel}
+ * @readonly
+ */
+ get publicUpdatesChannel() {
+ return this.client.channels.resolve(this.publicUpdatesChannelId);
+ }
+
+ /**
+ * Safety alerts channel for this guild
+ * @type {?TextChannel}
+ * @readonly
+ */
+ get safetyAlertsChannel() {
+ return this.client.channels.resolve(this.safetyAlertsChannelId);
+ }
+
+ /**
+ * The maximum bitrate available for this guild
+ * @type {number}
+ * @readonly
+ */
+ get maximumBitrate() {
+ if (this.features.includes(GuildFeature.VIPRegions)) {
+ return 384_000;
+ }
+
+ switch (this.premiumTier) {
+ case GuildPremiumTier.Tier1:
+ return 128_000;
+ case GuildPremiumTier.Tier2:
+ return 256_000;
+ case GuildPremiumTier.Tier3:
+ return 384_000;
+ default:
+ return 96_000;
+ }
+ }
+
+ /**
+ * Fetches a collection of integrations to this guild.
+ * Resolves with a collection mapping integrations by their ids.
+ * @returns {Promise<Collection<Snowflake|string, Integration>>}
+ * @example
+ * // Fetch integrations
+ * guild.fetchIntegrations()
+ * .then(integrations => console.log(`Fetched ${integrations.size} integrations`))
+ * .catch(console.error);
+ */
+ async fetchIntegrations() {
+ const data = await this.client.rest.get(Routes.guildIntegrations(this.id));
+ return data.reduce(
+ (collection, integration) => collection.set(integration.id, new Integration(this.client, integration, this)),
+ new Collection(),
+ );
+ }
+
+ /**
+ * Fetches a collection of templates from this guild.
+ * Resolves with a collection mapping templates by their codes.
+ * @returns {Promise<Collection<string, GuildTemplate>>}
+ */
+ async fetchTemplates() {
+ const templates = await this.client.rest.get(Routes.guildTemplates(this.id));
+ return templates.reduce((col, data) => col.set(data.code, new GuildTemplate(this.client, data)), new Collection());
+ }
+
+ /**
+ * Fetches the welcome screen for this guild.
+ * @returns {Promise<WelcomeScreen>}
+ */
+ async fetchWelcomeScreen() {
+ const data = await this.client.rest.get(Routes.guildWelcomeScreen(this.id));
+ return new WelcomeScreen(this, data);
+ }
+
+ /**
+ * Creates a template for the guild.
+ * @param {string} name The name for the template
+ * @param {string} [description] The description for the template
+ * @returns {Promise<GuildTemplate>}
+ */
+ async createTemplate(name, description) {
+ const data = await this.client.rest.post(Routes.guildTemplates(this.id), { body: { name, description } });
+ return new GuildTemplate(this.client, data);
+ }
+
+ /**
+ * Obtains a guild preview for this guild from Discord.
+ * @returns {Promise<GuildPreview>}
+ */
+ async fetchPreview() {
+ const data = await this.client.rest.get(Routes.guildPreview(this.id));
+ return new GuildPreview(this.client, data);
+ }
+
+ /**
+ * An object containing information about a guild's vanity invite.
+ * @typedef {Object} Vanity
+ * @property {?string} code Vanity invite code
+ * @property {number} uses How many times this invite has been used
+ */
+
+ /**
+ * Fetches the vanity URL invite object to this guild.
+ * Resolves with an object containing the vanity URL invite code and the use count
+ * @returns {Promise<Vanity>}
+ * @example
+ * // Fetch invite data
+ * guild.fetchVanityData()
+ * .then(res => {
+ * console.log(`Vanity URL: https://discord.gg/${res.code} with ${res.uses} uses`);
+ * })
+ * .catch(console.error);
+ */
+ async fetchVanityData() {
+ const data = await this.client.rest.get(Routes.guildVanityUrl(this.id));
+ this.vanityURLCode = data.code;
+ this.vanityURLUses = data.uses;
+
+ return data;
+ }
+
+ /**
+ * Fetches all webhooks for the guild.
+ * @returns {Promise<Collection<Snowflake, Webhook>>}
+ * @example
+ * // Fetch webhooks
+ * guild.fetchWebhooks()
+ * .then(webhooks => console.log(`Fetched ${webhooks.size} webhooks`))
+ * .catch(console.error);
+ */
+ async fetchWebhooks() {
+ const apiHooks = await this.client.rest.get(Routes.guildWebhooks(this.id));
+ const hooks = new Collection();
+ for (const hook of apiHooks) hooks.set(hook.id, new Webhook(this.client, hook));
+ return hooks;
+ }
+
+ /**
+ * Fetches the guild widget data, requires the widget to be enabled.
+ * @returns {Promise<Widget>}
+ * @example
+ * // Fetches the guild widget data
+ * guild.fetchWidget()
+ * .then(widget => console.log(`The widget shows ${widget.channels.size} channels`))
+ * .catch(console.error);
+ */
+ fetchWidget() {
+ return this.client.fetchGuildWidget(this.id);
+ }
+
+ /**
+ * Data for the Guild Widget Settings object
+ * @typedef {Object} GuildWidgetSettings
+ * @property {boolean} enabled Whether the widget is enabled
+ * @property {?(TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel)} channel The widget invite channel
+ */
+
+ /**
+ * The Guild Widget Settings object
+ * @typedef {Object} GuildWidgetSettingsData
+ * @property {boolean} enabled Whether the widget is enabled
+ * @property {?(TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel|Snowflake)} channel
+ * The widget invite channel
+ */
+
+ /**
+ * Fetches the guild widget settings.
+ * @returns {Promise<GuildWidgetSettings>}
+ * @example
+ * // Fetches the guild widget settings
+ * guild.fetchWidgetSettings()
+ * .then(widget => console.log(`The widget is ${widget.enabled ? 'enabled' : 'disabled'}`))
+ * .catch(console.error);
+ */
+ async fetchWidgetSettings() {
+ const data = await this.client.rest.get(Routes.guildWidgetSettings(this.id));
+ this.widgetEnabled = data.enabled;
+ this.widgetChannelId = data.channel_id;
+ return {
+ enabled: data.enabled,
+ channel: data.channel_id ? this.channels.cache.get(data.channel_id) : null,
+ };
+ }
+
+ /**
+ * Options used to fetch audit logs.
+ * @typedef {Object} GuildAuditLogsFetchOptions
+ * @property {Snowflake|GuildAuditLogsEntry} [before] Consider only entries before this entry
+ * @property {Snowflake|GuildAuditLogsEntry} [after] Consider only entries after this entry
+ * @property {number} [limit] The number of entries to return
+ * @property {UserResolvable} [user] Only return entries for actions made by this user
+ * @property {?AuditLogEvent} [type] Only return entries for this action type
+ */
+
+ /**
+ * Fetches audit logs for this guild.
+ * @param {GuildAuditLogsFetchOptions} [options={}] Options for fetching audit logs
+ * @returns {Promise<GuildAuditLogs>}
+ * @example
+ * // Output audit log entries
+ * guild.fetchAuditLogs()
+ * .then(audit => console.log(audit.entries.first()))
+ * .catch(console.error);
+ */
+ async fetchAuditLogs({ before, after, limit, user, type } = {}) {
+ const query = makeURLSearchParams({
+ before: before?.id ?? before,
+ after: after?.id ?? after,
+ limit,
+ action_type: type,
+ });
+
+ if (user) {
+ const userId = this.client.users.resolveId(user);
+ if (!userId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'user', 'UserResolvable');
+ query.set('user_id', userId);
+ }
+
+ const data = await this.client.rest.get(Routes.guildAuditLog(this.id), { query });
+ return new GuildAuditLogs(this, data);
+ }
+
+ /**
+ * Fetches the guild onboarding data for this guild.
+ * @returns {Promise<GuildOnboarding>}
+ */
+ async fetchOnboarding() {
+ const data = await this.client.rest.get(Routes.guildOnboarding(this.id));
+ return new GuildOnboarding(this.client, data);
+ }
+
+ /**
+ * The data for editing a guild.
+ * @typedef {Object} GuildEditOptions
+ * @property {string} [name] The name of the guild
+ * @property {?GuildVerificationLevel} [verificationLevel] The verification level of the guild
+ * @property {?GuildDefaultMessageNotifications} [defaultMessageNotifications] The default message
+ * notification level of the guild
+ * @property {?GuildExplicitContentFilter} [explicitContentFilter] The level of the explicit content filter
+ * @property {?VoiceChannelResolvable} [afkChannel] The AFK channel of the guild
+ * @property {number} [afkTimeout] The AFK timeout of the guild
+ * @property {?(BufferResolvable|Base64Resolvable)} [icon] The icon of the guild
+ * @property {GuildMemberResolvable} [owner] The owner of the guild
+ * @property {?(BufferResolvable|Base64Resolvable)} [splash] The invite splash image of the guild
+ * @property {?(BufferResolvable|Base64Resolvable)} [discoverySplash] The discovery splash image of the guild
+ * @property {?(BufferResolvable|Base64Resolvable)} [banner] The banner of the guild
+ * @property {?TextChannelResolvable} [systemChannel] The system channel of the guild
+ * @property {SystemChannelFlagsResolvable} [systemChannelFlags] The system channel flags of the guild
+ * @property {?TextChannelResolvable} [rulesChannel] The rules channel of the guild
+ * @property {?TextChannelResolvable} [publicUpdatesChannel] The community updates channel of the guild
+ * @property {?TextChannelResolvable} [safetyAlertsChannel] The safety alerts channel of the guild
+ * @property {?string} [preferredLocale] The preferred locale of the guild
+ * @property {GuildFeature[]} [features] The features of the guild
+ * @property {?string} [description] The discovery description of the guild
+ * @property {boolean} [premiumProgressBarEnabled] Whether the guild's premium progress bar is enabled
+ * @property {string} [reason] Reason for editing this guild
+ */
+
+ /**
+ * Data that can be resolved to a Text Channel object. This can be:
+ * * A TextChannel
+ * * A Snowflake
+ * @typedef {TextChannel|Snowflake} TextChannelResolvable
+ */
+
+ /**
+ * Data that can be resolved to a Voice Channel object. This can be:
+ * * A VoiceChannel
+ * * A Snowflake
+ * @typedef {VoiceChannel|Snowflake} VoiceChannelResolvable
+ */
+
+ /**
+ * Updates the guild with new information - e.g. a new name.
+ * @param {GuildEditOptions} options The options to provide
+ * @returns {Promise<Guild>}
+ * @example
+ * // Set the guild name
+ * guild.edit({
+ * name: 'Discord Guild',
+ * })
+ * .then(updated => console.log(`New guild name ${updated}`))
+ * .catch(console.error);
+ */
+ async edit({
+ verificationLevel,
+ defaultMessageNotifications,
+ explicitContentFilter,
+ afkChannel,
+ afkTimeout,
+ icon,
+ owner,
+ splash,
+ discoverySplash,
+ banner,
+ systemChannel,
+ systemChannelFlags,
+ rulesChannel,
+ publicUpdatesChannel,
+ preferredLocale,
+ premiumProgressBarEnabled,
+ safetyAlertsChannel,
+ ...options
+ }) {
+ const data = await this.client.rest.patch(Routes.guild(this.id), {
+ body: {
+ ...options,
+ verification_level: verificationLevel,
+ default_message_notifications: defaultMessageNotifications,
+ explicit_content_filter: explicitContentFilter,
+ afk_channel_id: afkChannel && this.client.channels.resolveId(afkChannel),
+ afk_timeout: afkTimeout,
+ icon: icon && (await DataResolver.resolveImage(icon)),
+ owner_id: owner && this.client.users.resolveId(owner),
+ splash: splash && (await DataResolver.resolveImage(splash)),
+ discovery_splash: discoverySplash && (await DataResolver.resolveImage(discoverySplash)),
+ banner: banner && (await DataResolver.resolveImage(banner)),
+ system_channel_id: systemChannel && this.client.channels.resolveId(systemChannel),
+ system_channel_flags:
+ systemChannelFlags === undefined ? undefined : SystemChannelFlagsBitField.resolve(systemChannelFlags),
+ rules_channel_id: rulesChannel && this.client.channels.resolveId(rulesChannel),
+ public_updates_channel_id: publicUpdatesChannel && this.client.channels.resolveId(publicUpdatesChannel),
+ preferred_locale: preferredLocale,
+ premium_progress_bar_enabled: premiumProgressBarEnabled,
+ safety_alerts_channel_id: safetyAlertsChannel && this.client.channels.resolveId(safetyAlertsChannel),
+ },
+ reason: options.reason,
+ });
+
+ return this.client.actions.GuildUpdate.handle(data).updated;
+ }
+
+ /**
+ * Welcome channel data
+ * @typedef {Object} WelcomeChannelData
+ * @property {string} description The description to show for this welcome channel
+ * @property {TextChannel|NewsChannel|ForumChannel|Snowflake} channel The channel to link for this welcome channel
+ * @property {EmojiIdentifierResolvable} [emoji] The emoji to display for this welcome channel
+ */
+
+ /**
+ * Welcome screen edit data
+ * @typedef {Object} WelcomeScreenEditOptions
+ * @property {boolean} [enabled] Whether the welcome screen is enabled
+ * @property {string} [description] The description for the welcome screen
+ * @property {WelcomeChannelData[]} [welcomeChannels] The welcome channel data for the welcome screen
+ */
+
+ /**
+ * Data that can be resolved to a GuildTextChannel object. This can be:
+ * * A TextChannel
+ * * A NewsChannel
+ * * A Snowflake
+ * @typedef {TextChannel|NewsChannel|Snowflake} GuildTextChannelResolvable
+ */
+
+ /**
+ * Data that can be resolved to a GuildVoiceChannel object. This can be:
+ * * A VoiceChannel
+ * * A StageChannel
+ * * A Snowflake
+ * @typedef {VoiceChannel|StageChannel|Snowflake} GuildVoiceChannelResolvable
+ */
+
+ /**
+ * Updates the guild's welcome screen
+ * @param {WelcomeScreenEditOptions} options The options to provide
+ * @returns {Promise<WelcomeScreen>}
+ * @example
+ * guild.editWelcomeScreen({
+ * description: 'Hello World',
+ * enabled: true,
+ * welcomeChannels: [
+ * {
+ * description: 'foobar',
+ * channel: '222197033908436994',
+ * }
+ * ],
+ * })
+ */
+ async editWelcomeScreen(options) {
+ const { enabled, description, welcomeChannels } = options;
+ const welcome_channels = welcomeChannels?.map(welcomeChannelData => {
+ const emoji = this.emojis.resolve(welcomeChannelData.emoji);
+ return {
+ emoji_id: emoji?.id,
+ emoji_name: emoji?.name ?? welcomeChannelData.emoji,
+ channel_id: this.channels.resolveId(welcomeChannelData.channel),
+ description: welcomeChannelData.description,
+ };
+ });
+
+ const patchData = await this.client.rest.patch(Routes.guildWelcomeScreen(this.id), {
+ body: {
+ welcome_channels,
+ description,
+ enabled,
+ },
+ });
+ return new WelcomeScreen(this, patchData);
+ }
+
+ /**
+ * Edits the level of the explicit content filter.
+ * @param {?GuildExplicitContentFilter} explicitContentFilter The new level of the explicit content filter
+ * @param {string} [reason] Reason for changing the level of the guild's explicit content filter
+ * @returns {Promise<Guild>}
+ */
+ setExplicitContentFilter(explicitContentFilter, reason) {
+ return this.edit({ explicitContentFilter, reason });
+ }
+
+ /**
+ * Edits the setting of the default message notifications of the guild.
+ * @param {?GuildDefaultMessageNotifications} defaultMessageNotifications
+ * The new default message notification level of the guild
+ * @param {string} [reason] Reason for changing the setting of the default message notifications
+ * @returns {Promise<Guild>}
+ */
+ setDefaultMessageNotifications(defaultMessageNotifications, reason) {
+ return this.edit({ defaultMessageNotifications, reason });
+ }
+
+ /**
+ * Edits the flags of the default message notifications of the guild.
+ * @param {SystemChannelFlagsResolvable} systemChannelFlags The new flags for the default message notifications
+ * @param {string} [reason] Reason for changing the flags of the default message notifications
+ * @returns {Promise<Guild>}
+ */
+ setSystemChannelFlags(systemChannelFlags, reason) {
+ return this.edit({ systemChannelFlags, reason });
+ }
+
+ /**
+ * Edits the name of the guild.
+ * @param {string} name The new name of the guild
+ * @param {string} [reason] Reason for changing the guild's name
+ * @returns {Promise<Guild>}
+ * @example
+ * // Edit the guild name
+ * guild.setName('Discord Guild')
+ * .then(updated => console.log(`Updated guild name to ${updated.name}`))
+ * .catch(console.error);
+ */
+ setName(name, reason) {
+ return this.edit({ name, reason });
+ }
+
+ /**
+ * Edits the verification level of the guild.
+ * @param {?GuildVerificationLevel} verificationLevel The new verification level of the guild
+ * @param {string} [reason] Reason for changing the guild's verification level
+ * @returns {Promise<Guild>}
+ * @example
+ * // Edit the guild verification level
+ * guild.setVerificationLevel(1)
+ * .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))
+ * .catch(console.error);
+ */
+ setVerificationLevel(verificationLevel, reason) {
+ return this.edit({ verificationLevel, reason });
+ }
+
+ /**
+ * Edits the AFK channel of the guild.
+ * @param {?VoiceChannelResolvable} afkChannel The new AFK channel
+ * @param {string} [reason] Reason for changing the guild's AFK channel
+ * @returns {Promise<Guild>}
+ * @example
+ * // Edit the guild AFK channel
+ * guild.setAFKChannel(channel)
+ * .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel.name}`))
+ * .catch(console.error);
+ */
+ setAFKChannel(afkChannel, reason) {
+ return this.edit({ afkChannel, reason });
+ }
+
+ /**
+ * Edits the system channel of the guild.
+ * @param {?TextChannelResolvable} systemChannel The new system channel
+ * @param {string} [reason] Reason for changing the guild's system channel
+ * @returns {Promise<Guild>}
+ * @example
+ * // Edit the guild system channel
+ * guild.setSystemChannel(channel)
+ * .then(updated => console.log(`Updated guild system channel to ${guild.systemChannel.name}`))
+ * .catch(console.error);
+ */
+ setSystemChannel(systemChannel, reason) {
+ return this.edit({ systemChannel, reason });
+ }
+
+ /**
+ * Edits the AFK timeout of the guild.
+ * @param {number} afkTimeout The time in seconds that a user must be idle to be considered AFK
+ * @param {string} [reason] Reason for changing the guild's AFK timeout
+ * @returns {Promise<Guild>}
+ * @example
+ * // Edit the guild AFK channel
+ * guild.setAFKTimeout(60)
+ * .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))
+ * .catch(console.error);
+ */
+ setAFKTimeout(afkTimeout, reason) {
+ return this.edit({ afkTimeout, reason });
+ }
+
+ /**
+ * Sets a new guild icon.
+ * @param {?(Base64Resolvable|BufferResolvable)} icon The new icon of the guild
+ * @param {string} [reason] Reason for changing the guild's icon
+ * @returns {Promise<Guild>}
+ * @example
+ * // Edit the guild icon
+ * guild.setIcon('./icon.png')
+ * .then(updated => console.log('Updated the guild icon'))
+ * .catch(console.error);
+ */
+ setIcon(icon, reason) {
+ return this.edit({ icon, reason });
+ }
+
+ /**
+ * Sets a new owner of the guild.
+ * @param {GuildMemberResolvable} owner The new owner of the guild
+ * @param {string} [reason] Reason for setting the new owner
+ * @returns {Promise<Guild>}
+ * @example
+ * // Edit the guild owner
+ * guild.setOwner(guild.members.cache.first())
+ * .then(guild => guild.fetchOwner())
+ * .then(owner => console.log(`Updated the guild owner to ${owner.displayName}`))
+ * .catch(console.error);
+ */
+ setOwner(owner, reason) {
+ return this.edit({ owner, reason });
+ }
+
+ /**
+ * Sets a new guild invite splash image.
+ * @param {?(Base64Resolvable|BufferResolvable)} splash The new invite splash image of the guild
+ * @param {string} [reason] Reason for changing the guild's invite splash image
+ * @returns {Promise<Guild>}
+ * @example
+ * // Edit the guild splash
+ * guild.setSplash('./splash.png')
+ * .then(updated => console.log('Updated the guild splash'))
+ * .catch(console.error);
+ */
+ setSplash(splash, reason) {
+ return this.edit({ splash, reason });
+ }
+
+ /**
+ * Sets a new guild discovery splash image.
+ * @param {?(Base64Resolvable|BufferResolvable)} discoverySplash The new discovery splash image of the guild
+ * @param {string} [reason] Reason for changing the guild's discovery splash image
+ * @returns {Promise<Guild>}
+ * @example
+ * // Edit the guild discovery splash
+ * guild.setDiscoverySplash('./discoverysplash.png')
+ * .then(updated => console.log('Updated the guild discovery splash'))
+ * .catch(console.error);
+ */
+ setDiscoverySplash(discoverySplash, reason) {
+ return this.edit({ discoverySplash, reason });
+ }
+
+ /**
+ * Sets a new guild banner.
+ * @param {?(Base64Resolvable|BufferResolvable)} banner The new banner of the guild
+ * @param {string} [reason] Reason for changing the guild's banner
+ * @returns {Promise<Guild>}
+ * @example
+ * guild.setBanner('./banner.png')
+ * .then(updated => console.log('Updated the guild banner'))
+ * .catch(console.error);
+ */
+ setBanner(banner, reason) {
+ return this.edit({ banner, reason });
+ }
+
+ /**
+ * Edits the rules channel of the guild.
+ * @param {?TextChannelResolvable} rulesChannel The new rules channel
+ * @param {string} [reason] Reason for changing the guild's rules channel
+ * @returns {Promise<Guild>}
+ * @example
+ * // Edit the guild rules channel
+ * guild.setRulesChannel(channel)
+ * .then(updated => console.log(`Updated guild rules channel to ${guild.rulesChannel.name}`))
+ * .catch(console.error);
+ */
+ setRulesChannel(rulesChannel, reason) {
+ return this.edit({ rulesChannel, reason });
+ }
+
+ /**
+ * Edits the community updates channel of the guild.
+ * @param {?TextChannelResolvable} publicUpdatesChannel The new community updates channel
+ * @param {string} [reason] Reason for changing the guild's community updates channel
+ * @returns {Promise<Guild>}
+ * @example
+ * // Edit the guild community updates channel
+ * guild.setPublicUpdatesChannel(channel)
+ * .then(updated => console.log(`Updated guild community updates channel to ${guild.publicUpdatesChannel.name}`))
+ * .catch(console.error);
+ */
+ setPublicUpdatesChannel(publicUpdatesChannel, reason) {
+ return this.edit({ publicUpdatesChannel, reason });
+ }
+
+ /**
+ * Edits the preferred locale of the guild.
+ * @param {?Locale} preferredLocale The new preferred locale of the guild
+ * @param {string} [reason] Reason for changing the guild's preferred locale
+ * @returns {Promise<Guild>}
+ * @example
+ * // Edit the guild preferred locale
+ * guild.setPreferredLocale('en-US')
+ * .then(updated => console.log(`Updated guild preferred locale to ${guild.preferredLocale}`))
+ * .catch(console.error);
+ */
+ setPreferredLocale(preferredLocale, reason) {
+ return this.edit({ preferredLocale, reason });
+ }
+
+ /**
+ * Edits the enabled state of the guild's premium progress bar
+ * @param {boolean} [enabled=true] The new enabled state of the guild's premium progress bar
+ * @param {string} [reason] Reason for changing the state of the guild's premium progress bar
+ * @returns {Promise<Guild>}
+ */
+ setPremiumProgressBarEnabled(enabled = true, reason) {
+ return this.edit({ premiumProgressBarEnabled: enabled, reason });
+ }
+
+ /**
+ * Edits the safety alerts channel of the guild.
+ * @param {?TextChannelResolvable} safetyAlertsChannel The new safety alerts channel
+ * @param {string} [reason] Reason for changing the guild's safety alerts channel
+ * @returns {Promise<Guild>}
+ * @example
+ * // Edit the guild safety alerts channel
+ * guild.setSafetyAlertsChannel(channel)
+ * .then(updated => console.log(`Updated guild safety alerts channel to ${updated.safetyAlertsChannel.name}`))
+ * .catch(console.error);
+ */
+ setSafetyAlertsChannel(safetyAlertsChannel, reason) {
+ return this.edit({ safetyAlertsChannel, reason });
+ }
+
+ /**
+ * Edits the guild's widget settings.
+ * @param {GuildWidgetSettingsData} settings The widget settings for the guild
+ * @param {string} [reason] Reason for changing the guild's widget settings
+ * @returns {Promise<Guild>}
+ */
+ async setWidgetSettings(settings, reason) {
+ await this.client.rest.patch(Routes.guildWidgetSettings(this.id), {
+ body: {
+ enabled: settings.enabled,
+ channel_id: this.channels.resolveId(settings.channel),
+ },
+ reason,
+ });
+ return this;
+ }
+
+ /**
+ * Sets the guild's MFA level
+ * <info>An elevated MFA level requires guild moderators to have 2FA enabled.</info>
+ * @param {GuildMFALevel} level The MFA level
+ * @param {string} [reason] Reason for changing the guild's MFA level
+ * @returns {Promise<Guild>}
+ * @example
+ * // Set the MFA level of the guild to Elevated
+ * guild.setMFALevel(GuildMFALevel.Elevated)
+ * .then(guild => console.log("Set guild's MFA level to Elevated"))
+ * .catch(console.error);
+ */
+ async setMFALevel(level, reason) {
+ await this.client.rest.post(Routes.guildMFA(this.id), {
+ body: {
+ level,
+ },
+ reason,
+ });
+ return this;
+ }
+
+ /**
+ * Leaves the guild.
+ * @returns {Promise<Guild>}
+ * @example
+ * // Leave a guild
+ * guild.leave()
+ * .then(guild => console.log(`Left the guild: ${guild.name}`))
+ * .catch(console.error);
+ */
+ async leave() {
+ if (this.ownerId === this.client.user.id) throw new DiscordjsError(ErrorCodes.GuildOwned);
+ await this.client.rest.delete(Routes.userGuild(this.id));
+ return this;
+ }
+
+ /**
+ * Deletes the guild.
+ * @returns {Promise<Guild>}
+ * @example
+ * // Delete a guild
+ * guild.delete()
+ * .then(g => console.log(`Deleted the guild ${g}`))
+ * .catch(console.error);
+ */
+ async delete() {
+ await this.client.rest.delete(Routes.guild(this.id));
+ return this;
+ }
+
+ /**
+ * Sets whether this guild's invites are disabled.
+ * @param {boolean} [disabled=true] Whether the invites are disabled
+ * @returns {Promise<Guild>}
+ */
+ async disableInvites(disabled = true) {
+ const features = this.features.filter(feature => feature !== GuildFeature.InvitesDisabled);
+ if (disabled) features.push(GuildFeature.InvitesDisabled);
+ return this.edit({ features });
+ }
+
+ /**
+ * Whether this guild equals another guild. It compares all properties, so for most operations
+ * it is advisable to just compare `guild.id === guild2.id` as it is much faster and is often
+ * what most users need.
+ * @param {Guild} guild The guild to compare with
+ * @returns {boolean}
+ */
+ equals(guild) {
+ return (
+ guild &&
+ guild instanceof this.constructor &&
+ this.id === guild.id &&
+ this.available === guild.available &&
+ this.splash === guild.splash &&
+ this.discoverySplash === guild.discoverySplash &&
+ this.name === guild.name &&
+ this.memberCount === guild.memberCount &&
+ this.large === guild.large &&
+ this.icon === guild.icon &&
+ this.ownerId === guild.ownerId &&
+ this.verificationLevel === guild.verificationLevel &&
+ (this.features === guild.features ||
+ (this.features.length === guild.features.length &&
+ this.features.every((feat, i) => feat === guild.features[i])))
+ );
+ }
+
+ toJSON() {
+ const json = super.toJSON({
+ available: false,
+ createdTimestamp: true,
+ nameAcronym: true,
+ presences: false,
+ voiceStates: false,
+ });
+ json.iconURL = this.iconURL();
+ json.splashURL = this.splashURL();
+ json.discoverySplashURL = this.discoverySplashURL();
+ json.bannerURL = this.bannerURL();
+ return json;
+ }
+
+ /**
+ * The voice state adapter for this guild that can be used with @discordjs/voice to play audio in voice
+ * and stage channels.
+ * @type {Function}
+ * @readonly
+ */
+ get voiceAdapterCreator() {
+ return methods => {
+ this.client.voice.adapters.set(this.id, methods);
+ return {
+ sendPayload: data => {
+ if (this.shard.status !== Status.Ready) return false;
+ this.shard.send(data);
+ return true;
+ },
+ destroy: () => {
+ this.client.voice.adapters.delete(this.id);
+ },
+ };
+ };
+ }
+
+ /**
+ * Creates a collection of this guild's roles, sorted by their position and ids.
+ * @returns {Collection<Snowflake, Role>}
+ * @private
+ */
+ _sortedRoles() {
+ return discordSort(this.roles.cache);
+ }
+
+ /**
+ * Creates a collection of this guild's or a specific category's channels, sorted by their position and ids.
+ * @param {GuildChannel} [channel] Category to get the channels of
+ * @returns {Collection<Snowflake, GuildChannel>}
+ * @private
+ */
+ _sortedChannels(channel) {
+ const channelIsCategory = channel.type === ChannelType.GuildCategory;
+ const types = getSortableGroupTypes(channel.type);
+ return discordSort(
+ this.channels.cache.filter(c => types.includes(c.type) && (channelIsCategory || c.parentId === channel.parentId)),
+ );
+ }
+}
+
+exports.Guild = Guild;
+
+/**
+ * @external APIGuild
+ * @see {@link https://discord.com/developers/docs/resources/guild#guild-object}
+ */
diff --git a/node_modules/discord.js/src/structures/GuildAuditLogs.js b/node_modules/discord.js/src/structures/GuildAuditLogs.js
new file mode 100644
index 0000000..2ce13a8
--- /dev/null
+++ b/node_modules/discord.js/src/structures/GuildAuditLogs.js
@@ -0,0 +1,91 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const ApplicationCommand = require('./ApplicationCommand');
+const GuildAuditLogsEntry = require('./GuildAuditLogsEntry');
+const Integration = require('./Integration');
+const Webhook = require('./Webhook');
+const { flatten } = require('../util/Util');
+
+/**
+ * Audit logs entries are held in this class.
+ */
+class GuildAuditLogs {
+ constructor(guild, data) {
+ if (data.users) for (const user of data.users) guild.client.users._add(user);
+ if (data.threads) for (const thread of data.threads) guild.client.channels._add(thread, guild);
+ /**
+ * Cached webhooks
+ * @type {Collection<Snowflake, Webhook>}
+ * @private
+ */
+ this.webhooks = new Collection();
+ if (data.webhooks) {
+ for (const hook of data.webhooks) {
+ this.webhooks.set(hook.id, new Webhook(guild.client, hook));
+ }
+ }
+
+ /**
+ * Cached integrations
+ * @type {Collection<Snowflake|string, Integration>}
+ * @private
+ */
+ this.integrations = new Collection();
+ if (data.integrations) {
+ for (const integration of data.integrations) {
+ this.integrations.set(integration.id, new Integration(guild.client, integration, guild));
+ }
+ }
+
+ /**
+ * Cached {@link GuildScheduledEvent}s.
+ * @type {Collection<Snowflake, GuildScheduledEvent>}
+ * @private
+ */
+ this.guildScheduledEvents = data.guild_scheduled_events.reduce(
+ (guildScheduledEvents, guildScheduledEvent) =>
+ guildScheduledEvents.set(guildScheduledEvent.id, guild.scheduledEvents._add(guildScheduledEvent)),
+ new Collection(),
+ );
+
+ /**
+ * Cached application commands, includes application commands from other applications
+ * @type {Collection<Snowflake, ApplicationCommand>}
+ * @private
+ */
+ this.applicationCommands = new Collection();
+ if (data.application_commands) {
+ for (const command of data.application_commands) {
+ this.applicationCommands.set(command.id, new ApplicationCommand(guild.client, command, guild));
+ }
+ }
+
+ /**
+ * Cached auto moderation rules.
+ * @type {Collection<Snowflake, AutoModerationRule>}
+ * @private
+ */
+ this.autoModerationRules = data.auto_moderation_rules.reduce(
+ (autoModerationRules, autoModerationRule) =>
+ autoModerationRules.set(autoModerationRule.id, guild.autoModerationRules._add(autoModerationRule)),
+ new Collection(),
+ );
+
+ /**
+ * The entries for this guild's audit logs
+ * @type {Collection<Snowflake, GuildAuditLogsEntry>}
+ */
+ this.entries = new Collection();
+ for (const item of data.audit_log_entries) {
+ const entry = new GuildAuditLogsEntry(guild, item, this);
+ this.entries.set(entry.id, entry);
+ }
+ }
+
+ toJSON() {
+ return flatten(this);
+ }
+}
+
+module.exports = GuildAuditLogs;
diff --git a/node_modules/discord.js/src/structures/GuildAuditLogsEntry.js b/node_modules/discord.js/src/structures/GuildAuditLogsEntry.js
new file mode 100644
index 0000000..febbd12
--- /dev/null
+++ b/node_modules/discord.js/src/structures/GuildAuditLogsEntry.js
@@ -0,0 +1,528 @@
+'use strict';
+
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const { AuditLogOptionsType, AuditLogEvent } = require('discord-api-types/v10');
+const AutoModerationRule = require('./AutoModerationRule');
+const { GuildScheduledEvent } = require('./GuildScheduledEvent');
+const Integration = require('./Integration');
+const Invite = require('./Invite');
+const { StageInstance } = require('./StageInstance');
+const { Sticker } = require('./Sticker');
+const Webhook = require('./Webhook');
+const Partials = require('../util/Partials');
+const { flatten } = require('../util/Util');
+
+const Targets = {
+ All: 'All',
+ Guild: 'Guild',
+ GuildScheduledEvent: 'GuildScheduledEvent',
+ Channel: 'Channel',
+ User: 'User',
+ Role: 'Role',
+ Invite: 'Invite',
+ Webhook: 'Webhook',
+ Emoji: 'Emoji',
+ Message: 'Message',
+ Integration: 'Integration',
+ StageInstance: 'StageInstance',
+ Sticker: 'Sticker',
+ Thread: 'Thread',
+ ApplicationCommand: 'ApplicationCommand',
+ AutoModeration: 'AutoModeration',
+ Unknown: 'Unknown',
+};
+
+/**
+ * The target of a guild audit log entry. It can be one of:
+ * * A guild
+ * * A channel
+ * * A user
+ * * A role
+ * * An invite
+ * * A webhook
+ * * An emoji
+ * * A message
+ * * An integration
+ * * A stage instance
+ * * A sticker
+ * * A guild scheduled event
+ * * A thread
+ * * An application command
+ * * An auto moderation rule
+ * * An object with an id key if target was deleted or fake entity
+ * * An object where the keys represent either the new value or the old value
+ * @typedef {?(Object|Guild|BaseChannel|User|Role|Invite|Webhook|GuildEmoji|Message|Integration|StageInstance|Sticker|
+ * GuildScheduledEvent|ApplicationCommand|AutoModerationRule)} AuditLogEntryTarget
+ */
+
+/**
+ * The action type of an entry, e.g. `Create`. Here are the available types:
+ * * Create
+ * * Delete
+ * * Update
+ * * All
+ * @typedef {string} AuditLogActionType
+ */
+
+/**
+ * The target type of an entry. Here are the available types:
+ * * Guild
+ * * Channel
+ * * User
+ * * Role
+ * * Invite
+ * * Webhook
+ * * Emoji
+ * * Message
+ * * Integration
+ * * StageInstance
+ * * Sticker
+ * * Thread
+ * * GuildScheduledEvent
+ * * ApplicationCommandPermission
+ * @typedef {string} AuditLogTargetType
+ */
+
+/**
+ * Audit logs entry.
+ */
+class GuildAuditLogsEntry {
+ /**
+ * Key mirror of all available audit log targets.
+ * @type {Object<string, string>}
+ * @memberof GuildAuditLogsEntry
+ */
+ static Targets = Targets;
+
+ constructor(guild, data, logs) {
+ /**
+ * The target type of this entry
+ * @type {AuditLogTargetType}
+ */
+ this.targetType = GuildAuditLogsEntry.targetType(data.action_type);
+ const targetType = this.targetType;
+
+ /**
+ * The action type of this entry
+ * @type {AuditLogActionType}
+ */
+ this.actionType = GuildAuditLogsEntry.actionType(data.action_type);
+
+ /**
+ * The type of action that occurred.
+ * @type {AuditLogEvent}
+ */
+ this.action = data.action_type;
+
+ /**
+ * The reason of this entry
+ * @type {?string}
+ */
+ this.reason = data.reason ?? null;
+
+ /**
+ * The id of the user that executed this entry
+ * @type {?Snowflake}
+ */
+ this.executorId = data.user_id;
+
+ /**
+ * The user that executed this entry
+ * @type {?User}
+ */
+ this.executor = data.user_id
+ ? guild.client.options.partials.includes(Partials.User)
+ ? guild.client.users._add({ id: data.user_id })
+ : guild.client.users.cache.get(data.user_id) ?? null
+ : null;
+
+ /**
+ * An entry in the audit log representing a specific change.
+ * @typedef {Object} AuditLogChange
+ * @property {string} key The property that was changed, e.g. `nick` for nickname changes
+ * <warn>For application command permissions updates the key is the id of the user, channel,
+ * role, or a permission constant that was updated instead of an actual property name</warn>
+ * @property {*} [old] The old value of the change, e.g. for nicknames, the old nickname
+ * @property {*} [new] The new value of the change, e.g. for nicknames, the new nickname
+ */
+
+ /**
+ * Specific property changes
+ * @type {AuditLogChange[]}
+ */
+ this.changes = data.changes?.map(c => ({ key: c.key, old: c.old_value, new: c.new_value })) ?? [];
+
+ /**
+ * The entry's id
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+
+ /**
+ * Any extra data from the entry
+ * @type {?(Object|Role|GuildMember)}
+ */
+ this.extra = null;
+ switch (data.action_type) {
+ case AuditLogEvent.MemberPrune:
+ this.extra = {
+ removed: Number(data.options.members_removed),
+ days: Number(data.options.delete_member_days),
+ };
+ break;
+
+ case AuditLogEvent.MemberMove:
+ case AuditLogEvent.MessageDelete:
+ case AuditLogEvent.MessageBulkDelete:
+ this.extra = {
+ channel: guild.channels.cache.get(data.options.channel_id) ?? { id: data.options.channel_id },
+ count: Number(data.options.count),
+ };
+ break;
+
+ case AuditLogEvent.MessagePin:
+ case AuditLogEvent.MessageUnpin:
+ this.extra = {
+ channel: guild.client.channels.cache.get(data.options.channel_id) ?? { id: data.options.channel_id },
+ messageId: data.options.message_id,
+ };
+ break;
+
+ case AuditLogEvent.MemberDisconnect:
+ this.extra = {
+ count: Number(data.options.count),
+ };
+ break;
+
+ case AuditLogEvent.ChannelOverwriteCreate:
+ case AuditLogEvent.ChannelOverwriteUpdate:
+ case AuditLogEvent.ChannelOverwriteDelete:
+ switch (data.options.type) {
+ case AuditLogOptionsType.Role:
+ this.extra = guild.roles.cache.get(data.options.id) ?? {
+ id: data.options.id,
+ name: data.options.role_name,
+ type: AuditLogOptionsType.Role,
+ };
+ break;
+
+ case AuditLogOptionsType.Member:
+ this.extra = guild.members.cache.get(data.options.id) ?? {
+ id: data.options.id,
+ type: AuditLogOptionsType.Member,
+ };
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ case AuditLogEvent.StageInstanceCreate:
+ case AuditLogEvent.StageInstanceDelete:
+ case AuditLogEvent.StageInstanceUpdate:
+ this.extra = {
+ channel: guild.client.channels.cache.get(data.options?.channel_id) ?? { id: data.options?.channel_id },
+ };
+ break;
+
+ case AuditLogEvent.ApplicationCommandPermissionUpdate:
+ this.extra = {
+ applicationId: data.options.application_id,
+ };
+ break;
+
+ case AuditLogEvent.AutoModerationBlockMessage:
+ case AuditLogEvent.AutoModerationFlagToChannel:
+ case AuditLogEvent.AutoModerationUserCommunicationDisabled:
+ this.extra = {
+ autoModerationRuleName: data.options.auto_moderation_rule_name,
+ autoModerationRuleTriggerType: data.options.auto_moderation_rule_trigger_type,
+ channel: guild.client.channels.cache.get(data.options?.channel_id) ?? { id: data.options?.channel_id },
+ };
+ break;
+
+ default:
+ break;
+ }
+
+ /**
+ * The id of the target of this entry
+ * @type {?Snowflake}
+ */
+ this.targetId = data.target_id;
+
+ /**
+ * The target of this entry
+ * @type {?AuditLogEntryTarget}
+ */
+ this.target = null;
+ if (targetType === Targets.Unknown) {
+ this.target = this.changes.reduce((o, c) => {
+ o[c.key] = c.new ?? c.old;
+ return o;
+ }, {});
+ this.target.id = data.target_id;
+ // MemberDisconnect and similar types do not provide a target_id.
+ } else if (targetType === Targets.User && data.target_id) {
+ this.target = guild.client.options.partials.includes(Partials.User)
+ ? guild.client.users._add({ id: data.target_id })
+ : guild.client.users.cache.get(data.target_id) ?? null;
+ } else if (targetType === Targets.Guild) {
+ this.target = guild.client.guilds.cache.get(data.target_id);
+ } else if (targetType === Targets.Webhook) {
+ this.target =
+ logs?.webhooks.get(data.target_id) ??
+ new Webhook(
+ guild.client,
+ this.changes.reduce(
+ (o, c) => {
+ o[c.key] = c.new ?? c.old;
+ return o;
+ },
+ {
+ id: data.target_id,
+ guild_id: guild.id,
+ },
+ ),
+ );
+ } else if (targetType === Targets.Invite) {
+ let change = this.changes.find(c => c.key === 'code');
+ change = change.new ?? change.old;
+
+ this.target =
+ guild.invites.cache.get(change) ??
+ new Invite(
+ guild.client,
+ this.changes.reduce(
+ (o, c) => {
+ o[c.key] = c.new ?? c.old;
+ return o;
+ },
+ { guild },
+ ),
+ );
+ } else if (targetType === Targets.Message) {
+ // Discord sends a channel id for the MessageBulkDelete action type.
+ this.target =
+ data.action_type === AuditLogEvent.MessageBulkDelete
+ ? guild.channels.cache.get(data.target_id) ?? { id: data.target_id }
+ : guild.client.users.cache.get(data.target_id) ?? null;
+ } else if (targetType === Targets.Integration) {
+ this.target =
+ logs?.integrations.get(data.target_id) ??
+ new Integration(
+ guild.client,
+ this.changes.reduce(
+ (o, c) => {
+ o[c.key] = c.new ?? c.old;
+ return o;
+ },
+ { id: data.target_id },
+ ),
+ guild,
+ );
+ } else if (targetType === Targets.Channel || targetType === Targets.Thread) {
+ this.target =
+ guild.channels.cache.get(data.target_id) ??
+ this.changes.reduce(
+ (o, c) => {
+ o[c.key] = c.new ?? c.old;
+ return o;
+ },
+ { id: data.target_id },
+ );
+ } else if (targetType === Targets.StageInstance) {
+ this.target =
+ guild.stageInstances.cache.get(data.target_id) ??
+ new StageInstance(
+ guild.client,
+ this.changes.reduce(
+ (o, c) => {
+ o[c.key] = c.new ?? c.old;
+ return o;
+ },
+ {
+ id: data.target_id,
+ channel_id: data.options?.channel_id,
+ guild_id: guild.id,
+ },
+ ),
+ );
+ } else if (targetType === Targets.Sticker) {
+ this.target =
+ guild.stickers.cache.get(data.target_id) ??
+ new Sticker(
+ guild.client,
+ this.changes.reduce(
+ (o, c) => {
+ o[c.key] = c.new ?? c.old;
+ return o;
+ },
+ { id: data.target_id },
+ ),
+ );
+ } else if (targetType === Targets.GuildScheduledEvent) {
+ this.target =
+ guild.scheduledEvents.cache.get(data.target_id) ??
+ new GuildScheduledEvent(
+ guild.client,
+ this.changes.reduce(
+ (o, c) => {
+ o[c.key] = c.new ?? c.old;
+ return o;
+ },
+ { id: data.target_id, guild_id: guild.id },
+ ),
+ );
+ } else if (targetType === Targets.ApplicationCommand) {
+ this.target = logs?.applicationCommands.get(data.target_id) ?? { id: data.target_id };
+ } else if (targetType === Targets.AutoModeration) {
+ this.target =
+ guild.autoModerationRules.cache.get(data.target_id) ??
+ new AutoModerationRule(
+ guild.client,
+ this.changes.reduce(
+ (o, c) => {
+ o[c.key] = c.new ?? c.old;
+ return o;
+ },
+ { id: data.target_id, guild_id: guild.id },
+ ),
+ guild,
+ );
+ } else if (data.target_id) {
+ this.target = guild[`${targetType.toLowerCase()}s`]?.cache.get(data.target_id) ?? { id: data.target_id };
+ }
+ }
+
+ /**
+ * Finds the target type of a guild audit log entry.
+ * @param {AuditLogEvent} target The action target
+ * @returns {AuditLogTargetType}
+ */
+ static targetType(target) {
+ if (target < 10) return Targets.Guild;
+ if (target < 20) return Targets.Channel;
+ if (target < 30) return Targets.User;
+ if (target < 40) return Targets.Role;
+ if (target < 50) return Targets.Invite;
+ if (target < 60) return Targets.Webhook;
+ if (target < 70) return Targets.Emoji;
+ if (target < 80) return Targets.Message;
+ if (target < 83) return Targets.Integration;
+ if (target < 86) return Targets.StageInstance;
+ if (target < 100) return Targets.Sticker;
+ if (target < 110) return Targets.GuildScheduledEvent;
+ if (target < 120) return Targets.Thread;
+ if (target < 130) return Targets.ApplicationCommand;
+ if (target >= 140 && target < 150) return Targets.AutoModeration;
+ return Targets.Unknown;
+ }
+
+ /**
+ * Finds the action type from the guild audit log entry action.
+ * @param {AuditLogEvent} action The action target
+ * @returns {AuditLogActionType}
+ */
+ static actionType(action) {
+ if (
+ [
+ AuditLogEvent.ChannelCreate,
+ AuditLogEvent.ChannelOverwriteCreate,
+ AuditLogEvent.MemberBanRemove,
+ AuditLogEvent.BotAdd,
+ AuditLogEvent.RoleCreate,
+ AuditLogEvent.InviteCreate,
+ AuditLogEvent.WebhookCreate,
+ AuditLogEvent.EmojiCreate,
+ AuditLogEvent.MessagePin,
+ AuditLogEvent.IntegrationCreate,
+ AuditLogEvent.StageInstanceCreate,
+ AuditLogEvent.StickerCreate,
+ AuditLogEvent.GuildScheduledEventCreate,
+ AuditLogEvent.ThreadCreate,
+ AuditLogEvent.AutoModerationRuleCreate,
+ AuditLogEvent.AutoModerationBlockMessage,
+ ].includes(action)
+ ) {
+ return 'Create';
+ }
+
+ if (
+ [
+ AuditLogEvent.ChannelDelete,
+ AuditLogEvent.ChannelOverwriteDelete,
+ AuditLogEvent.MemberKick,
+ AuditLogEvent.MemberPrune,
+ AuditLogEvent.MemberBanAdd,
+ AuditLogEvent.MemberDisconnect,
+ AuditLogEvent.RoleDelete,
+ AuditLogEvent.InviteDelete,
+ AuditLogEvent.WebhookDelete,
+ AuditLogEvent.EmojiDelete,
+ AuditLogEvent.MessageDelete,
+ AuditLogEvent.MessageBulkDelete,
+ AuditLogEvent.MessageUnpin,
+ AuditLogEvent.IntegrationDelete,
+ AuditLogEvent.StageInstanceDelete,
+ AuditLogEvent.StickerDelete,
+ AuditLogEvent.GuildScheduledEventDelete,
+ AuditLogEvent.ThreadDelete,
+ AuditLogEvent.AutoModerationRuleDelete,
+ ].includes(action)
+ ) {
+ return 'Delete';
+ }
+
+ if (
+ [
+ AuditLogEvent.GuildUpdate,
+ AuditLogEvent.ChannelUpdate,
+ AuditLogEvent.ChannelOverwriteUpdate,
+ AuditLogEvent.MemberUpdate,
+ AuditLogEvent.MemberRoleUpdate,
+ AuditLogEvent.MemberMove,
+ AuditLogEvent.RoleUpdate,
+ AuditLogEvent.InviteUpdate,
+ AuditLogEvent.WebhookUpdate,
+ AuditLogEvent.EmojiUpdate,
+ AuditLogEvent.IntegrationUpdate,
+ AuditLogEvent.StageInstanceUpdate,
+ AuditLogEvent.StickerUpdate,
+ AuditLogEvent.GuildScheduledEventUpdate,
+ AuditLogEvent.ThreadUpdate,
+ AuditLogEvent.ApplicationCommandPermissionUpdate,
+ AuditLogEvent.AutoModerationRuleUpdate,
+ ].includes(action)
+ ) {
+ return 'Update';
+ }
+
+ return 'All';
+ }
+
+ /**
+ * The timestamp this entry was created at
+ * @type {number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return DiscordSnowflake.timestampFrom(this.id);
+ }
+
+ /**
+ * The time this entry was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ toJSON() {
+ return flatten(this, { createdTimestamp: true });
+ }
+}
+
+module.exports = GuildAuditLogsEntry;
diff --git a/node_modules/discord.js/src/structures/GuildBan.js b/node_modules/discord.js/src/structures/GuildBan.js
new file mode 100644
index 0000000..9c5a10e
--- /dev/null
+++ b/node_modules/discord.js/src/structures/GuildBan.js
@@ -0,0 +1,59 @@
+'use strict';
+
+const Base = require('./Base');
+
+/**
+ * Represents a ban in a guild on Discord.
+ * @extends {Base}
+ */
+class GuildBan extends Base {
+ constructor(client, data, guild) {
+ super(client);
+
+ /**
+ * The guild in which the ban is
+ * @type {Guild}
+ */
+ this.guild = guild;
+
+ this._patch(data);
+ }
+
+ _patch(data) {
+ if ('user' in data) {
+ /**
+ * The user this ban applies to
+ * @type {User}
+ */
+ this.user = this.client.users._add(data.user, true);
+ }
+
+ if ('reason' in data) {
+ /**
+ * The reason for the ban
+ * @type {?string}
+ */
+ this.reason = data.reason;
+ }
+ }
+
+ /**
+ * Whether this GuildBan is partial. If the reason is not provided the value is null
+ * @type {boolean}
+ * @readonly
+ */
+ get partial() {
+ return !('reason' in this);
+ }
+
+ /**
+ * Fetches this GuildBan.
+ * @param {boolean} [force=true] Whether to skip the cache check and request the API
+ * @returns {Promise<GuildBan>}
+ */
+ fetch(force = true) {
+ return this.guild.bans.fetch({ user: this.user, cache: true, force });
+ }
+}
+
+module.exports = GuildBan;
diff --git a/node_modules/discord.js/src/structures/GuildChannel.js b/node_modules/discord.js/src/structures/GuildChannel.js
new file mode 100644
index 0000000..c066c71
--- /dev/null
+++ b/node_modules/discord.js/src/structures/GuildChannel.js
@@ -0,0 +1,472 @@
+'use strict';
+
+const { Snowflake } = require('@sapphire/snowflake');
+const { PermissionFlagsBits, ChannelType } = require('discord-api-types/v10');
+const { BaseChannel } = require('./BaseChannel');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+const PermissionOverwriteManager = require('../managers/PermissionOverwriteManager');
+const { VoiceBasedChannelTypes } = require('../util/Constants');
+const PermissionsBitField = require('../util/PermissionsBitField');
+const { getSortableGroupTypes } = require('../util/Util');
+
+/**
+ * Represents a guild channel from any of the following:
+ * - {@link TextChannel}
+ * - {@link VoiceChannel}
+ * - {@link CategoryChannel}
+ * - {@link NewsChannel}
+ * - {@link StageChannel}
+ * - {@link ForumChannel}
+ * @extends {BaseChannel}
+ * @abstract
+ */
+class GuildChannel extends BaseChannel {
+ constructor(guild, data, client, immediatePatch = true) {
+ super(client, data, false);
+
+ /**
+ * The guild the channel is in
+ * @type {Guild}
+ */
+ this.guild = guild;
+
+ /**
+ * The id of the guild the channel is in
+ * @type {Snowflake}
+ */
+ this.guildId = guild?.id ?? data.guild_id;
+ /**
+ * A manager of permission overwrites that belong to this channel
+ * @type {PermissionOverwriteManager}
+ */
+ this.permissionOverwrites = new PermissionOverwriteManager(this);
+
+ if (data && immediatePatch) this._patch(data);
+ }
+
+ _patch(data) {
+ super._patch(data);
+
+ if ('name' in data) {
+ /**
+ * The name of the guild channel
+ * @type {string}
+ */
+ this.name = data.name;
+ }
+
+ if ('position' in data) {
+ /**
+ * The raw position of the channel from Discord
+ * @type {number}
+ */
+ this.rawPosition = data.position;
+ }
+
+ if ('guild_id' in data) {
+ this.guildId = data.guild_id;
+ }
+
+ if ('parent_id' in data) {
+ /**
+ * The id of the category parent of this channel
+ * @type {?Snowflake}
+ */
+ this.parentId = data.parent_id;
+ } else {
+ this.parentId ??= null;
+ }
+
+ if ('permission_overwrites' in data) {
+ this.permissionOverwrites.cache.clear();
+ for (const overwrite of data.permission_overwrites) {
+ this.permissionOverwrites._add(overwrite);
+ }
+ }
+ }
+
+ _clone() {
+ const clone = super._clone();
+ clone.permissionOverwrites = new PermissionOverwriteManager(clone, this.permissionOverwrites.cache.values());
+ return clone;
+ }
+
+ /**
+ * The category parent of this channel
+ * @type {?CategoryChannel}
+ * @readonly
+ */
+ get parent() {
+ return this.guild.channels.resolve(this.parentId);
+ }
+
+ /**
+ * If the permissionOverwrites match the parent channel, null if no parent
+ * @type {?boolean}
+ * @readonly
+ */
+ get permissionsLocked() {
+ if (!this.parent) return null;
+
+ // Get all overwrites
+ const overwriteIds = new Set([
+ ...this.permissionOverwrites.cache.keys(),
+ ...this.parent.permissionOverwrites.cache.keys(),
+ ]);
+
+ // Compare all overwrites
+ return [...overwriteIds].every(key => {
+ const channelVal = this.permissionOverwrites.cache.get(key);
+ const parentVal = this.parent.permissionOverwrites.cache.get(key);
+
+ // Handle empty overwrite
+ if (
+ (!channelVal &&
+ parentVal.deny.bitfield === PermissionsBitField.DefaultBit &&
+ parentVal.allow.bitfield === PermissionsBitField.DefaultBit) ||
+ (!parentVal &&
+ channelVal.deny.bitfield === PermissionsBitField.DefaultBit &&
+ channelVal.allow.bitfield === PermissionsBitField.DefaultBit)
+ ) {
+ return true;
+ }
+
+ // Compare overwrites
+ return (
+ channelVal !== undefined &&
+ parentVal !== undefined &&
+ channelVal.deny.bitfield === parentVal.deny.bitfield &&
+ channelVal.allow.bitfield === parentVal.allow.bitfield
+ );
+ });
+ }
+
+ /**
+ * The position of the channel
+ * @type {number}
+ * @readonly
+ */
+ get position() {
+ const selfIsCategory = this.type === ChannelType.GuildCategory;
+ const types = getSortableGroupTypes(this.type);
+
+ let count = 0;
+ for (const channel of this.guild.channels.cache.values()) {
+ if (!types.includes(channel.type)) continue;
+ if (!selfIsCategory && channel.parentId !== this.parentId) continue;
+ if (this.rawPosition === channel.rawPosition) {
+ if (Snowflake.compare(channel.id, this.id) === -1) count++;
+ } else if (this.rawPosition > channel.rawPosition) {
+ count++;
+ }
+ }
+
+ return count;
+ }
+
+ /**
+ * Gets the overall set of permissions for a member or role in this channel, taking into account channel overwrites.
+ * @param {GuildMemberResolvable|RoleResolvable} memberOrRole The member or role to obtain the overall permissions for
+ * @param {boolean} [checkAdmin=true] Whether having the {@link PermissionFlagsBits.Administrator} permission
+ * will return all permissions
+ * @returns {?Readonly<PermissionsBitField>}
+ */
+ permissionsFor(memberOrRole, checkAdmin = true) {
+ const member = this.guild.members.resolve(memberOrRole);
+ if (member) return this.memberPermissions(member, checkAdmin);
+ const role = this.guild.roles.resolve(memberOrRole);
+ return role && this.rolePermissions(role, checkAdmin);
+ }
+
+ overwritesFor(member, verified = false, roles = null) {
+ if (!verified) member = this.guild.members.resolve(member);
+ if (!member) return [];
+
+ roles ??= member.roles.cache;
+ const roleOverwrites = [];
+ let memberOverwrites;
+ let everyoneOverwrites;
+
+ for (const overwrite of this.permissionOverwrites.cache.values()) {
+ if (overwrite.id === this.guild.id) {
+ everyoneOverwrites = overwrite;
+ } else if (roles.has(overwrite.id)) {
+ roleOverwrites.push(overwrite);
+ } else if (overwrite.id === member.id) {
+ memberOverwrites = overwrite;
+ }
+ }
+
+ return {
+ everyone: everyoneOverwrites,
+ roles: roleOverwrites,
+ member: memberOverwrites,
+ };
+ }
+
+ /**
+ * Gets the overall set of permissions for a member in this channel, taking into account channel overwrites.
+ * @param {GuildMember} member The member to obtain the overall permissions for
+ * @param {boolean} checkAdmin Whether having the {@link PermissionFlagsBits.Administrator} permission
+ * will return all permissions
+ * @returns {Readonly<PermissionsBitField>}
+ * @private
+ */
+ memberPermissions(member, checkAdmin) {
+ if (checkAdmin && member.id === this.guild.ownerId) {
+ return new PermissionsBitField(PermissionsBitField.All).freeze();
+ }
+
+ const roles = member.roles.cache;
+ const permissions = new PermissionsBitField(roles.map(role => role.permissions));
+
+ if (checkAdmin && permissions.has(PermissionFlagsBits.Administrator)) {
+ return new PermissionsBitField(PermissionsBitField.All).freeze();
+ }
+
+ const overwrites = this.overwritesFor(member, true, roles);
+
+ return permissions
+ .remove(overwrites.everyone?.deny ?? PermissionsBitField.DefaultBit)
+ .add(overwrites.everyone?.allow ?? PermissionsBitField.DefaultBit)
+ .remove(overwrites.roles.length > 0 ? overwrites.roles.map(role => role.deny) : PermissionsBitField.DefaultBit)
+ .add(overwrites.roles.length > 0 ? overwrites.roles.map(role => role.allow) : PermissionsBitField.DefaultBit)
+ .remove(overwrites.member?.deny ?? PermissionsBitField.DefaultBit)
+ .add(overwrites.member?.allow ?? PermissionsBitField.DefaultBit)
+ .freeze();
+ }
+
+ /**
+ * Gets the overall set of permissions for a role in this channel, taking into account channel overwrites.
+ * @param {Role} role The role to obtain the overall permissions for
+ * @param {boolean} checkAdmin Whether having the {@link PermissionFlagsBits.Administrator} permission
+ * will return all permissions
+ * @returns {Readonly<PermissionsBitField>}
+ * @private
+ */
+ rolePermissions(role, checkAdmin) {
+ if (checkAdmin && role.permissions.has(PermissionFlagsBits.Administrator)) {
+ return new PermissionsBitField(PermissionsBitField.All).freeze();
+ }
+
+ const everyoneOverwrites = this.permissionOverwrites.cache.get(this.guild.id);
+ const roleOverwrites = this.permissionOverwrites.cache.get(role.id);
+
+ return role.permissions
+ .remove(everyoneOverwrites?.deny ?? PermissionsBitField.DefaultBit)
+ .add(everyoneOverwrites?.allow ?? PermissionsBitField.DefaultBit)
+ .remove(roleOverwrites?.deny ?? PermissionsBitField.DefaultBit)
+ .add(roleOverwrites?.allow ?? PermissionsBitField.DefaultBit)
+ .freeze();
+ }
+
+ /**
+ * Locks in the permission overwrites from the parent channel.
+ * @returns {Promise<GuildChannel>}
+ */
+ lockPermissions() {
+ if (!this.parent) return Promise.reject(new DiscordjsError(ErrorCodes.GuildChannelOrphan));
+ const permissionOverwrites = this.parent.permissionOverwrites.cache.map(overwrite => overwrite.toJSON());
+ return this.edit({ permissionOverwrites });
+ }
+
+ /**
+ * A collection of cached members of this channel, mapped by their ids.
+ * Members that can view this channel, if the channel is text-based.
+ * Members in the channel, if the channel is voice-based.
+ * @type {Collection<Snowflake, GuildMember>}
+ * @readonly
+ */
+ get members() {
+ return this.guild.members.cache.filter(m => this.permissionsFor(m).has(PermissionFlagsBits.ViewChannel, false));
+ }
+
+ /**
+ * Edits the channel.
+ * @param {GuildChannelEditOptions} options The options to provide
+ * @returns {Promise<GuildChannel>}
+ * @example
+ * // Edit a channel
+ * channel.edit({ name: 'new-channel' })
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ edit(options) {
+ return this.guild.channels.edit(this, options);
+ }
+
+ /**
+ * Sets a new name for the guild channel.
+ * @param {string} name The new name for the guild channel
+ * @param {string} [reason] Reason for changing the guild channel's name
+ * @returns {Promise<GuildChannel>}
+ * @example
+ * // Set a new channel name
+ * channel.setName('not_general')
+ * .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))
+ * .catch(console.error);
+ */
+ setName(name, reason) {
+ return this.edit({ name, reason });
+ }
+
+ /**
+ * Options used to set the parent of a channel.
+ * @typedef {Object} SetParentOptions
+ * @property {boolean} [lockPermissions=true] Whether to lock the permissions to what the parent's permissions are
+ * @property {string} [reason] The reason for modifying the parent of the channel
+ */
+
+ /**
+ * Sets the parent of this channel.
+ * @param {?CategoryChannelResolvable} channel The category channel to set as the parent
+ * @param {SetParentOptions} [options={}] The options for setting the parent
+ * @returns {Promise<GuildChannel>}
+ * @example
+ * // Add a parent to a channel
+ * message.channel.setParent('355908108431917066', { lockPermissions: false })
+ * .then(channel => console.log(`New parent of ${message.channel.name}: ${channel.name}`))
+ * .catch(console.error);
+ */
+ setParent(channel, { lockPermissions = true, reason } = {}) {
+ return this.edit({
+ parent: channel ?? null,
+ lockPermissions,
+ reason,
+ });
+ }
+
+ /**
+ * Options used to set the position of a channel.
+ * @typedef {Object} SetChannelPositionOptions
+ * @property {boolean} [relative=false] Whether or not to change the position relative to its current value
+ * @property {string} [reason] The reason for changing the position
+ */
+
+ /**
+ * Sets a new position for the guild channel.
+ * @param {number} position The new position for the guild channel
+ * @param {SetChannelPositionOptions} [options] Options for setting position
+ * @returns {Promise<GuildChannel>}
+ * @example
+ * // Set a new channel position
+ * channel.setPosition(2)
+ * .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))
+ * .catch(console.error);
+ */
+ setPosition(position, options = {}) {
+ return this.guild.channels.setPosition(this, position, options);
+ }
+
+ /**
+ * Options used to clone a guild channel.
+ * @typedef {GuildChannelCreateOptions} GuildChannelCloneOptions
+ * @property {string} [name=this.name] Name of the new channel
+ */
+
+ /**
+ * Clones this channel.
+ * @param {GuildChannelCloneOptions} [options] The options for cloning this channel
+ * @returns {Promise<GuildChannel>}
+ */
+ clone(options = {}) {
+ return this.guild.channels.create({
+ name: options.name ?? this.name,
+ permissionOverwrites: this.permissionOverwrites.cache,
+ topic: this.topic,
+ type: this.type,
+ nsfw: this.nsfw,
+ parent: this.parent,
+ bitrate: this.bitrate,
+ userLimit: this.userLimit,
+ rateLimitPerUser: this.rateLimitPerUser,
+ position: this.rawPosition,
+ reason: null,
+ ...options,
+ });
+ }
+
+ /**
+ * Checks if this channel has the same type, topic, position, name, overwrites, and id as another channel.
+ * In most cases, a simple `channel.id === channel2.id` will do, and is much faster too.
+ * @param {GuildChannel} channel Channel to compare with
+ * @returns {boolean}
+ */
+ equals(channel) {
+ let equal =
+ channel &&
+ this.id === channel.id &&
+ this.type === channel.type &&
+ this.topic === channel.topic &&
+ this.position === channel.position &&
+ this.name === channel.name;
+
+ if (equal) {
+ if (this.permissionOverwrites && channel.permissionOverwrites) {
+ equal = this.permissionOverwrites.cache.equals(channel.permissionOverwrites.cache);
+ } else {
+ equal = !this.permissionOverwrites && !channel.permissionOverwrites;
+ }
+ }
+
+ return equal;
+ }
+
+ /**
+ * Whether the channel is deletable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get deletable() {
+ return this.manageable && this.guild.rulesChannelId !== this.id && this.guild.publicUpdatesChannelId !== this.id;
+ }
+
+ /**
+ * Whether the channel is manageable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get manageable() {
+ if (this.client.user.id === this.guild.ownerId) return true;
+ const permissions = this.permissionsFor(this.client.user);
+ if (!permissions) return false;
+
+ // This flag allows managing even if timed out
+ if (permissions.has(PermissionFlagsBits.Administrator, false)) return true;
+ if (this.guild.members.me.communicationDisabledUntilTimestamp > Date.now()) return false;
+
+ const bitfield = VoiceBasedChannelTypes.includes(this.type)
+ ? PermissionFlagsBits.ManageChannels | PermissionFlagsBits.Connect
+ : PermissionFlagsBits.ViewChannel | PermissionFlagsBits.ManageChannels;
+ return permissions.has(bitfield, false);
+ }
+
+ /**
+ * Whether the channel is viewable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get viewable() {
+ if (this.client.user.id === this.guild.ownerId) return true;
+ const permissions = this.permissionsFor(this.client.user);
+ if (!permissions) return false;
+ return permissions.has(PermissionFlagsBits.ViewChannel, false);
+ }
+
+ /**
+ * Deletes this channel.
+ * @param {string} [reason] Reason for deleting this channel
+ * @returns {Promise<GuildChannel>}
+ * @example
+ * // Delete the channel
+ * channel.delete('making room for new channels')
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async delete(reason) {
+ await this.guild.channels.delete(this.id, reason);
+ return this;
+ }
+}
+
+module.exports = GuildChannel;
diff --git a/node_modules/discord.js/src/structures/GuildEmoji.js b/node_modules/discord.js/src/structures/GuildEmoji.js
new file mode 100644
index 0000000..0035a36
--- /dev/null
+++ b/node_modules/discord.js/src/structures/GuildEmoji.js
@@ -0,0 +1,148 @@
+'use strict';
+
+const { PermissionFlagsBits } = require('discord-api-types/v10');
+const BaseGuildEmoji = require('./BaseGuildEmoji');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+const GuildEmojiRoleManager = require('../managers/GuildEmojiRoleManager');
+
+/**
+ * Represents a custom emoji.
+ * @extends {BaseGuildEmoji}
+ */
+class GuildEmoji extends BaseGuildEmoji {
+ constructor(client, data, guild) {
+ super(client, data, guild);
+
+ /**
+ * The user who created this emoji
+ * @type {?User}
+ */
+ this.author = null;
+
+ /**
+ * Array of role ids this emoji is active for
+ * @name GuildEmoji#_roles
+ * @type {Snowflake[]}
+ * @private
+ */
+ Object.defineProperty(this, '_roles', { value: [], writable: true });
+
+ this._patch(data);
+ }
+
+ /**
+ * The guild this emoji is part of
+ * @type {Guild}
+ * @name GuildEmoji#guild
+ */
+
+ _clone() {
+ const clone = super._clone();
+ clone._roles = this._roles.slice();
+ return clone;
+ }
+
+ _patch(data) {
+ super._patch(data);
+
+ if (data.user) this.author = this.client.users._add(data.user);
+ if (data.roles) this._roles = data.roles;
+ }
+
+ /**
+ * Whether the emoji is deletable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get deletable() {
+ if (!this.guild.members.me) throw new DiscordjsError(ErrorCodes.GuildUncachedMe);
+ return !this.managed && this.guild.members.me.permissions.has(PermissionFlagsBits.ManageGuildExpressions);
+ }
+
+ /**
+ * A manager for roles this emoji is active for.
+ * @type {GuildEmojiRoleManager}
+ * @readonly
+ */
+ get roles() {
+ return new GuildEmojiRoleManager(this);
+ }
+
+ /**
+ * Fetches the author for this emoji
+ * @returns {Promise<User>}
+ */
+ fetchAuthor() {
+ return this.guild.emojis.fetchAuthor(this);
+ }
+
+ /**
+ * Data for editing an emoji.
+ * @typedef {Object} GuildEmojiEditOptions
+ * @property {string} [name] The name of the emoji
+ * @property {Collection<Snowflake, Role>|RoleResolvable[]} [roles] Roles to restrict emoji to
+ * @property {string} [reason] Reason for editing this emoji
+ */
+
+ /**
+ * Edits the emoji.
+ * @param {GuildEmojiEditOptions} options The options to provide
+ * @returns {Promise<GuildEmoji>}
+ * @example
+ * // Edit an emoji
+ * emoji.edit({ name: 'newemoji' })
+ * .then(e => console.log(`Edited emoji ${e}`))
+ * .catch(console.error);
+ */
+ edit(options) {
+ return this.guild.emojis.edit(this.id, options);
+ }
+
+ /**
+ * Sets the name of the emoji.
+ * @param {string} name The new name for the emoji
+ * @param {string} [reason] Reason for changing the emoji's name
+ * @returns {Promise<GuildEmoji>}
+ */
+ setName(name, reason) {
+ return this.edit({ name, reason });
+ }
+
+ /**
+ * Deletes the emoji.
+ * @param {string} [reason] Reason for deleting the emoji
+ * @returns {Promise<GuildEmoji>}
+ */
+ async delete(reason) {
+ await this.guild.emojis.delete(this.id, reason);
+ return this;
+ }
+
+ /**
+ * Whether this emoji is the same as another one.
+ * @param {GuildEmoji|APIEmoji} other The emoji to compare it to
+ * @returns {boolean}
+ */
+ equals(other) {
+ if (other instanceof GuildEmoji) {
+ return (
+ other.id === this.id &&
+ other.name === this.name &&
+ other.managed === this.managed &&
+ other.available === this.available &&
+ other.requiresColons === this.requiresColons &&
+ other.roles.cache.size === this.roles.cache.size &&
+ other.roles.cache.every(role => this.roles.cache.has(role.id))
+ );
+ } else {
+ return (
+ other.id === this.id &&
+ other.name === this.name &&
+ other.roles.length === this.roles.cache.size &&
+ other.roles.every(role => this.roles.cache.has(role))
+ );
+ }
+ }
+}
+
+module.exports = GuildEmoji;
diff --git a/node_modules/discord.js/src/structures/GuildMember.js b/node_modules/discord.js/src/structures/GuildMember.js
new file mode 100644
index 0000000..8806b50
--- /dev/null
+++ b/node_modules/discord.js/src/structures/GuildMember.js
@@ -0,0 +1,520 @@
+'use strict';
+
+const { PermissionFlagsBits } = require('discord-api-types/v10');
+const Base = require('./Base');
+const VoiceState = require('./VoiceState');
+const TextBasedChannel = require('./interfaces/TextBasedChannel');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+const GuildMemberRoleManager = require('../managers/GuildMemberRoleManager');
+const { GuildMemberFlagsBitField } = require('../util/GuildMemberFlagsBitField');
+const PermissionsBitField = require('../util/PermissionsBitField');
+
+/**
+ * Represents a member of a guild on Discord.
+ * @implements {TextBasedChannel}
+ * @extends {Base}
+ */
+class GuildMember extends Base {
+ constructor(client, data, guild) {
+ super(client);
+
+ /**
+ * The guild that this member is part of
+ * @type {Guild}
+ */
+ this.guild = guild;
+
+ /**
+ * The timestamp the member joined the guild at
+ * @type {?number}
+ */
+ this.joinedTimestamp = null;
+
+ /**
+ * The last timestamp this member started boosting the guild
+ * @type {?number}
+ */
+ this.premiumSinceTimestamp = null;
+
+ /**
+ * The nickname of this member, if they have one
+ * @type {?string}
+ */
+ this.nickname = null;
+
+ /**
+ * Whether this member has yet to pass the guild's membership gate
+ * @type {?boolean}
+ */
+ this.pending = null;
+
+ /**
+ * The timestamp this member's timeout will be removed
+ * @type {?number}
+ */
+ this.communicationDisabledUntilTimestamp = null;
+
+ /**
+ * The role ids of the member
+ * @name GuildMember#_roles
+ * @type {Snowflake[]}
+ * @private
+ */
+ Object.defineProperty(this, '_roles', { value: [], writable: true });
+
+ if (data) this._patch(data);
+ }
+
+ _patch(data) {
+ if ('user' in data) {
+ /**
+ * The user that this guild member instance represents
+ * @type {?User}
+ */
+ this.user = this.client.users._add(data.user, true);
+ }
+
+ if ('nick' in data) this.nickname = data.nick;
+ if ('avatar' in data) {
+ /**
+ * The guild member's avatar hash
+ * @type {?string}
+ */
+ this.avatar = data.avatar;
+ } else if (typeof this.avatar !== 'string') {
+ this.avatar = null;
+ }
+ if ('joined_at' in data) this.joinedTimestamp = Date.parse(data.joined_at);
+ if ('premium_since' in data) {
+ this.premiumSinceTimestamp = data.premium_since ? Date.parse(data.premium_since) : null;
+ }
+ if ('roles' in data) this._roles = data.roles;
+
+ if ('pending' in data) {
+ this.pending = data.pending;
+ } else if (!this.partial) {
+ // See https://github.com/discordjs/discord.js/issues/6546 for more info.
+ this.pending ??= false;
+ }
+
+ if ('communication_disabled_until' in data) {
+ this.communicationDisabledUntilTimestamp =
+ data.communication_disabled_until && Date.parse(data.communication_disabled_until);
+ }
+
+ if ('flags' in data) {
+ /**
+ * The flags of this member
+ * @type {Readonly<GuildMemberFlagsBitField>}
+ */
+ this.flags = new GuildMemberFlagsBitField(data.flags).freeze();
+ } else {
+ this.flags ??= new GuildMemberFlagsBitField().freeze();
+ }
+ }
+
+ _clone() {
+ const clone = super._clone();
+ clone._roles = this._roles.slice();
+ return clone;
+ }
+
+ /**
+ * Whether this GuildMember is a partial
+ * @type {boolean}
+ * @readonly
+ */
+ get partial() {
+ return this.joinedTimestamp === null;
+ }
+
+ /**
+ * A manager for the roles belonging to this member
+ * @type {GuildMemberRoleManager}
+ * @readonly
+ */
+ get roles() {
+ return new GuildMemberRoleManager(this);
+ }
+
+ /**
+ * The voice state of this member
+ * @type {VoiceState}
+ * @readonly
+ */
+ get voice() {
+ return this.guild.voiceStates.cache.get(this.id) ?? new VoiceState(this.guild, { user_id: this.id });
+ }
+
+ /**
+ * A link to the member's guild avatar.
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ avatarURL(options = {}) {
+ return this.avatar && this.client.rest.cdn.guildMemberAvatar(this.guild.id, this.id, this.avatar, options);
+ }
+
+ /**
+ * A link to the member's guild avatar if they have one.
+ * Otherwise, a link to their {@link User#displayAvatarURL} will be returned.
+ * @param {ImageURLOptions} [options={}] Options for the Image URL
+ * @returns {string}
+ */
+ displayAvatarURL(options) {
+ return this.avatarURL(options) ?? this.user.displayAvatarURL(options);
+ }
+
+ /**
+ * The time this member joined the guild
+ * @type {?Date}
+ * @readonly
+ */
+ get joinedAt() {
+ return this.joinedTimestamp && new Date(this.joinedTimestamp);
+ }
+
+ /**
+ * The time this member's timeout will be removed
+ * @type {?Date}
+ * @readonly
+ */
+ get communicationDisabledUntil() {
+ return this.communicationDisabledUntilTimestamp && new Date(this.communicationDisabledUntilTimestamp);
+ }
+
+ /**
+ * The last time this member started boosting the guild
+ * @type {?Date}
+ * @readonly
+ */
+ get premiumSince() {
+ return this.premiumSinceTimestamp && new Date(this.premiumSinceTimestamp);
+ }
+
+ /**
+ * The presence of this guild member
+ * @type {?Presence}
+ * @readonly
+ */
+ get presence() {
+ return this.guild.presences.resolve(this.id);
+ }
+
+ /**
+ * The displayed color of this member in base 10
+ * @type {number}
+ * @readonly
+ */
+ get displayColor() {
+ return this.roles.color?.color ?? 0;
+ }
+
+ /**
+ * The displayed color of this member in hexadecimal
+ * @type {string}
+ * @readonly
+ */
+ get displayHexColor() {
+ return this.roles.color?.hexColor ?? '#000000';
+ }
+
+ /**
+ * The member's id
+ * @type {Snowflake}
+ * @readonly
+ */
+ get id() {
+ return this.user.id;
+ }
+
+ /**
+ * The DM between the client's user and this member
+ * @type {?DMChannel}
+ * @readonly
+ */
+ get dmChannel() {
+ return this.client.users.dmChannel(this.id);
+ }
+
+ /**
+ * The nickname of this member, or their user display name if they don't have one
+ * @type {?string}
+ * @readonly
+ */
+ get displayName() {
+ return this.nickname ?? this.user.displayName;
+ }
+
+ /**
+ * The overall set of permissions for this member, taking only roles and owner status into account
+ * @type {Readonly<PermissionsBitField>}
+ * @readonly
+ */
+ get permissions() {
+ if (this.user.id === this.guild.ownerId) return new PermissionsBitField(PermissionsBitField.All).freeze();
+ return new PermissionsBitField(this.roles.cache.map(role => role.permissions)).freeze();
+ }
+
+ /**
+ * Whether the client user is above this user in the hierarchy, according to role position and guild ownership.
+ * This is a prerequisite for many moderative actions.
+ * @type {boolean}
+ * @readonly
+ */
+ get manageable() {
+ if (this.user.id === this.guild.ownerId) return false;
+ if (this.user.id === this.client.user.id) return false;
+ if (this.client.user.id === this.guild.ownerId) return true;
+ if (!this.guild.members.me) throw new DiscordjsError(ErrorCodes.GuildUncachedMe);
+ return this.guild.members.me.roles.highest.comparePositionTo(this.roles.highest) > 0;
+ }
+
+ /**
+ * Whether this member is kickable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get kickable() {
+ if (!this.guild.members.me) throw new DiscordjsError(ErrorCodes.GuildUncachedMe);
+ return this.manageable && this.guild.members.me.permissions.has(PermissionFlagsBits.KickMembers);
+ }
+
+ /**
+ * Whether this member is bannable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get bannable() {
+ if (!this.guild.members.me) throw new DiscordjsError(ErrorCodes.GuildUncachedMe);
+ return this.manageable && this.guild.members.me.permissions.has(PermissionFlagsBits.BanMembers);
+ }
+
+ /**
+ * Whether this member is moderatable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get moderatable() {
+ return (
+ !this.permissions.has(PermissionFlagsBits.Administrator) &&
+ this.manageable &&
+ (this.guild.members.me?.permissions.has(PermissionFlagsBits.ModerateMembers) ?? false)
+ );
+ }
+
+ /**
+ * Whether this member is currently timed out
+ * @returns {boolean}
+ */
+ isCommunicationDisabled() {
+ return this.communicationDisabledUntilTimestamp > Date.now();
+ }
+
+ /**
+ * Returns `channel.permissionsFor(guildMember)`. Returns permissions for a member in a guild channel,
+ * taking into account roles and permission overwrites.
+ * @param {GuildChannelResolvable} channel The guild channel to use as context
+ * @returns {Readonly<PermissionsBitField>}
+ */
+ permissionsIn(channel) {
+ channel = this.guild.channels.resolve(channel);
+ if (!channel) throw new DiscordjsError(ErrorCodes.GuildChannelResolve);
+ return channel.permissionsFor(this);
+ }
+
+ /**
+ * Edits this member.
+ * @param {GuildMemberEditOptions} options The options to provide
+ * @returns {Promise<GuildMember>}
+ */
+ edit(options) {
+ return this.guild.members.edit(this, options);
+ }
+
+ /**
+ * Sets the flags for this member.
+ * @param {GuildMemberFlagsResolvable} flags The flags to set
+ * @param {string} [reason] Reason for setting the flags
+ * @returns {Promise<GuildMember>}
+ */
+ setFlags(flags, reason) {
+ return this.edit({ flags, reason });
+ }
+
+ /**
+ * Sets the nickname for this member.
+ * @param {?string} nick The nickname for the guild member, or `null` if you want to reset their nickname
+ * @param {string} [reason] Reason for setting the nickname
+ * @returns {Promise<GuildMember>}
+ * @example
+ * // Set a nickname for a guild member
+ * guildMember.setNickname('cool nickname', 'Needed a new nickname')
+ * .then(member => console.log(`Set nickname of ${member.user.username}`))
+ * .catch(console.error);
+ * @example
+ * // Remove a nickname for a guild member
+ * guildMember.setNickname(null, 'No nicknames allowed!')
+ * .then(member => console.log(`Removed nickname for ${member.user.username}`))
+ * .catch(console.error);
+ */
+ setNickname(nick, reason) {
+ return this.edit({ nick, reason });
+ }
+
+ /**
+ * Creates a DM channel between the client and this member.
+ * @param {boolean} [force=false] Whether to skip the cache check and request the API
+ * @returns {Promise<DMChannel>}
+ */
+ createDM(force = false) {
+ return this.user.createDM(force);
+ }
+
+ /**
+ * Deletes any DMs with this member.
+ * @returns {Promise<DMChannel>}
+ */
+ deleteDM() {
+ return this.user.deleteDM();
+ }
+
+ /**
+ * Kicks this member from the guild.
+ * @param {string} [reason] Reason for kicking user
+ * @returns {Promise<GuildMember>}
+ */
+ kick(reason) {
+ return this.guild.members.kick(this, reason);
+ }
+
+ /**
+ * Bans this guild member.
+ * @param {BanOptions} [options] Options for the ban
+ * @returns {Promise<GuildMember>}
+ * @example
+ * // Ban a guild member, deleting a week's worth of messages
+ * guildMember.ban({ deleteMessageSeconds: 60 * 60 * 24 * 7, reason: 'They deserved it' })
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ ban(options) {
+ return this.guild.bans.create(this, options);
+ }
+
+ /**
+ * Times this guild member out.
+ * @param {DateResolvable|null} communicationDisabledUntil The date or timestamp
+ * for the member's communication to be disabled until. Provide `null` to remove the timeout.
+ * @param {string} [reason] The reason for this timeout.
+ * @returns {Promise<GuildMember>}
+ * @example
+ * // Time a guild member out for 5 minutes
+ * guildMember.disableCommunicationUntil(Date.now() + (5 * 60 * 1000), 'They deserved it')
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Remove the timeout of a guild member
+ * guildMember.disableCommunicationUntil(null)
+ * .then(member => console.log(`Removed timeout for ${member.displayName}`))
+ * .catch(console.error);
+ */
+ disableCommunicationUntil(communicationDisabledUntil, reason) {
+ return this.edit({ communicationDisabledUntil, reason });
+ }
+
+ /**
+ * Times this guild member out.
+ * @param {number|null} timeout The time in milliseconds
+ * for the member's communication to be disabled until. Provide `null` to remove the timeout.
+ * @param {string} [reason] The reason for this timeout.
+ * @returns {Promise<GuildMember>}
+ * @example
+ * // Time a guild member out for 5 minutes
+ * guildMember.timeout(5 * 60 * 1000, 'They deserved it')
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ timeout(timeout, reason) {
+ return this.disableCommunicationUntil(timeout && Date.now() + timeout, reason);
+ }
+
+ /**
+ * Fetches this GuildMember.
+ * @param {boolean} [force=true] Whether to skip the cache check and request the API
+ * @returns {Promise<GuildMember>}
+ */
+ fetch(force = true) {
+ return this.guild.members.fetch({ user: this.id, cache: true, force });
+ }
+
+ /**
+ * Whether this guild member equals another guild member. It compares all properties, so for most
+ * comparison it is advisable to just compare `member.id === member2.id` as it is significantly faster
+ * and is often what most users need.
+ * @param {GuildMember} member The member to compare with
+ * @returns {boolean}
+ */
+ equals(member) {
+ return (
+ member instanceof this.constructor &&
+ this.id === member.id &&
+ this.partial === member.partial &&
+ this.guild.id === member.guild.id &&
+ this.joinedTimestamp === member.joinedTimestamp &&
+ this.nickname === member.nickname &&
+ this.avatar === member.avatar &&
+ this.pending === member.pending &&
+ this.communicationDisabledUntilTimestamp === member.communicationDisabledUntilTimestamp &&
+ this.flags.bitfield === member.flags.bitfield &&
+ (this._roles === member._roles ||
+ (this._roles.length === member._roles.length && this._roles.every((role, i) => role === member._roles[i])))
+ );
+ }
+
+ /**
+ * When concatenated with a string, this automatically returns the user's mention instead of the GuildMember object.
+ * @returns {string}
+ * @example
+ * // Logs: Hello from <@123456789012345678>!
+ * console.log(`Hello from ${member}!`);
+ */
+ toString() {
+ return this.user.toString();
+ }
+
+ toJSON() {
+ const json = super.toJSON({
+ guild: 'guildId',
+ user: 'userId',
+ displayName: true,
+ roles: true,
+ });
+ json.avatarURL = this.avatarURL();
+ json.displayAvatarURL = this.displayAvatarURL();
+ return json;
+ }
+}
+
+/**
+ * Sends a message to this user.
+ * @method send
+ * @memberof GuildMember
+ * @instance
+ * @param {string|MessagePayload|MessageCreateOptions} options The options to provide
+ * @returns {Promise<Message>}
+ * @example
+ * // Send a direct message
+ * guildMember.send('Hello!')
+ * .then(message => console.log(`Sent message: ${message.content} to ${guildMember.displayName}`))
+ * .catch(console.error);
+ */
+
+TextBasedChannel.applyToClass(GuildMember);
+
+exports.GuildMember = GuildMember;
+
+/**
+ * @external APIGuildMember
+ * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
+ */
diff --git a/node_modules/discord.js/src/structures/GuildOnboarding.js b/node_modules/discord.js/src/structures/GuildOnboarding.js
new file mode 100644
index 0000000..119f905
--- /dev/null
+++ b/node_modules/discord.js/src/structures/GuildOnboarding.js
@@ -0,0 +1,58 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const Base = require('./Base');
+const { GuildOnboardingPrompt } = require('./GuildOnboardingPrompt');
+
+/**
+ * Represents the onboarding data of a guild.
+ * @extends {Base}
+ */
+class GuildOnboarding extends Base {
+ constructor(client, data) {
+ super(client);
+
+ /**
+ * The id of the guild this onboarding data is for
+ * @type {Snowflake}
+ */
+ this.guildId = data.guild_id;
+
+ const guild = this.guild;
+
+ /**
+ * The prompts shown during onboarding and in customize community
+ * @type {Collection<Snowflake, GuildOnboardingPrompt>}
+ */
+ this.prompts = data.prompts.reduce(
+ (prompts, prompt) => prompts.set(prompt.id, new GuildOnboardingPrompt(client, prompt, this.guildId)),
+ new Collection(),
+ );
+
+ /**
+ * The ids of the channels that new members get opted into automatically
+ * @type {Collection<Snowflake, GuildChannel>}
+ */
+ this.defaultChannels = data.default_channel_ids.reduce(
+ (channels, channelId) => channels.set(channelId, guild.channels.cache.get(channelId)),
+ new Collection(),
+ );
+
+ /**
+ * Whether onboarding is enabled
+ * @type {boolean}
+ */
+ this.enabled = data.enabled;
+ }
+
+ /**
+ * The guild this onboarding is from
+ * @type {Guild}
+ * @readonly
+ */
+ get guild() {
+ return this.client.guilds.cache.get(this.guildId);
+ }
+}
+
+exports.GuildOnboarding = GuildOnboarding;
diff --git a/node_modules/discord.js/src/structures/GuildOnboardingPrompt.js b/node_modules/discord.js/src/structures/GuildOnboardingPrompt.js
new file mode 100644
index 0000000..4de3f5d
--- /dev/null
+++ b/node_modules/discord.js/src/structures/GuildOnboardingPrompt.js
@@ -0,0 +1,78 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const Base = require('./Base');
+const { GuildOnboardingPromptOption } = require('./GuildOnboardingPromptOption');
+
+/**
+ * Represents the data of a prompt of a guilds onboarding.
+ * @extends {Base}
+ */
+class GuildOnboardingPrompt extends Base {
+ constructor(client, data, guildId) {
+ super(client);
+
+ /**
+ * The id of the guild this onboarding prompt is from
+ * @type {Snowflake}
+ */
+ this.guildId = guildId;
+
+ /**
+ * The id of the prompt
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+
+ /**
+ * The options available within the prompt
+ * @type {Collection<Snowflake, GuildOnboardingPromptOption>}
+ */
+ this.options = data.options.reduce(
+ (options, option) => options.set(option.id, new GuildOnboardingPromptOption(client, option, guildId)),
+ new Collection(),
+ );
+
+ /**
+ * The title of the prompt
+ * @type {string}
+ */
+ this.title = data.title;
+
+ /**
+ * Whether users are limited to selecting one option for the prompt
+ * @type {boolean}
+ */
+ this.singleSelect = data.single_select;
+
+ /**
+ * Whether the prompt is required before a user completes the onboarding flow
+ * @type {boolean}
+ */
+ this.required = data.required;
+
+ /**
+ * Whether the prompt is present in the onboarding flow.
+ * If `false`, the prompt will only appear in the Channels & Roles tab
+ * @type {boolean}
+ */
+ this.inOnboarding = data.in_onboarding;
+
+ /**
+ * The type of the prompt
+ * @type {GuildOnboardingPromptType}
+ */
+ this.type = data.type;
+ }
+
+ /**
+ * The guild this onboarding prompt is from
+ * @type {Guild}
+ * @readonly
+ */
+ get guild() {
+ return this.client.guilds.cache.get(this.guildId);
+ }
+}
+
+exports.GuildOnboardingPrompt = GuildOnboardingPrompt;
diff --git a/node_modules/discord.js/src/structures/GuildOnboardingPromptOption.js b/node_modules/discord.js/src/structures/GuildOnboardingPromptOption.js
new file mode 100644
index 0000000..3002144
--- /dev/null
+++ b/node_modules/discord.js/src/structures/GuildOnboardingPromptOption.js
@@ -0,0 +1,84 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const Base = require('./Base');
+const { resolvePartialEmoji } = require('../util/Util');
+
+/**
+ * Represents the data of an option from a prompt of a guilds onboarding.
+ * @extends {Base}
+ */
+class GuildOnboardingPromptOption extends Base {
+ constructor(client, data, guildId) {
+ super(client);
+
+ /**
+ * The id of the guild this onboarding prompt option is from
+ * @type {Snowflake}
+ */
+ this.guildId = guildId;
+
+ const guild = this.guild;
+
+ /**
+ * The id of the option
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+
+ /**
+ * The channels a member is added to when the option is selected
+ * @type {Collection<Snowflake, GuildChannel>}
+ */
+ this.channels = data.channel_ids.reduce(
+ (channels, channelId) => channels.set(channelId, guild.channels.cache.get(channelId)),
+ new Collection(),
+ );
+
+ /**
+ * The roles assigned to a member when the option is selected
+ * @type {Collection<Snowflake, Role>}
+ */
+ this.roles = data.role_ids.reduce(
+ (roles, roleId) => roles.set(roleId, guild.roles.cache.get(roleId)),
+ new Collection(),
+ );
+
+ /**
+ * The data for an emoji of a guilds onboarding prompt option
+ * @typedef {Object} GuildOnboardingPromptOptionEmoji
+ * @property {?Snowflake} id The id of the emoji
+ * @property {string} name The name of the emoji
+ * @property {boolean} animated Whether the emoji is animated
+ */
+
+ /**
+ * The emoji of the option
+ * @type {?GuildOnboardingPromptOptionEmoji}
+ */
+ this.emoji = resolvePartialEmoji(data.emoji);
+
+ /**
+ * The title of the option
+ * @type {string}
+ */
+ this.title = data.title;
+
+ /**
+ * The description of the option
+ * @type {?string}
+ */
+ this.description = data.description;
+ }
+
+ /**
+ * The guild this onboarding prompt option is from
+ * @type {Guild}
+ * @readonly
+ */
+ get guild() {
+ return this.client.guilds.cache.get(this.guildId);
+ }
+}
+
+exports.GuildOnboardingPromptOption = GuildOnboardingPromptOption;
diff --git a/node_modules/discord.js/src/structures/GuildPreview.js b/node_modules/discord.js/src/structures/GuildPreview.js
new file mode 100644
index 0000000..6ff2026
--- /dev/null
+++ b/node_modules/discord.js/src/structures/GuildPreview.js
@@ -0,0 +1,193 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const { Routes } = require('discord-api-types/v10');
+const Base = require('./Base');
+const GuildPreviewEmoji = require('./GuildPreviewEmoji');
+const { Sticker } = require('./Sticker');
+
+/**
+ * Represents the data about the guild any bot can preview, connected to the specified guild.
+ * @extends {Base}
+ */
+class GuildPreview extends Base {
+ constructor(client, data) {
+ super(client);
+
+ if (!data) return;
+
+ this._patch(data);
+ }
+
+ _patch(data) {
+ /**
+ * The id of this guild
+ * @type {string}
+ */
+ this.id = data.id;
+
+ if ('name' in data) {
+ /**
+ * The name of this guild
+ * @type {string}
+ */
+ this.name = data.name;
+ }
+
+ if ('icon' in data) {
+ /**
+ * The icon of this guild
+ * @type {?string}
+ */
+ this.icon = data.icon;
+ }
+
+ if ('splash' in data) {
+ /**
+ * The splash icon of this guild
+ * @type {?string}
+ */
+ this.splash = data.splash;
+ }
+
+ if ('discovery_splash' in data) {
+ /**
+ * The discovery splash icon of this guild
+ * @type {?string}
+ */
+ this.discoverySplash = data.discovery_splash;
+ }
+
+ if ('features' in data) {
+ /**
+ * An array of enabled guild features
+ * @type {GuildFeature[]}
+ */
+ this.features = data.features;
+ }
+
+ if ('approximate_member_count' in data) {
+ /**
+ * The approximate count of members in this guild
+ * @type {number}
+ */
+ this.approximateMemberCount = data.approximate_member_count;
+ }
+
+ if ('approximate_presence_count' in data) {
+ /**
+ * The approximate count of online members in this guild
+ * @type {number}
+ */
+ this.approximatePresenceCount = data.approximate_presence_count;
+ }
+
+ if ('description' in data) {
+ /**
+ * The description for this guild
+ * @type {?string}
+ */
+ this.description = data.description;
+ } else {
+ this.description ??= null;
+ }
+
+ if (!this.emojis) {
+ /**
+ * Collection of emojis belonging to this guild
+ * @type {Collection<Snowflake, GuildPreviewEmoji>}
+ */
+ this.emojis = new Collection();
+ } else {
+ this.emojis.clear();
+ }
+ for (const emoji of data.emojis) {
+ this.emojis.set(emoji.id, new GuildPreviewEmoji(this.client, emoji, this));
+ }
+
+ /**
+ * Collection of stickers belonging to this guild
+ * @type {Collection<Snowflake, Sticker>}
+ */
+ this.stickers = data.stickers.reduce(
+ (stickers, sticker) => stickers.set(sticker.id, new Sticker(this.client, sticker)),
+ new Collection(),
+ );
+ }
+
+ /**
+ * The timestamp this guild was created at
+ * @type {number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return DiscordSnowflake.timestampFrom(this.id);
+ }
+
+ /**
+ * The time this guild was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ /**
+ * The URL to this guild's splash.
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ splashURL(options = {}) {
+ return this.splash && this.client.rest.cdn.splash(this.id, this.splash, options);
+ }
+
+ /**
+ * The URL to this guild's discovery splash.
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ discoverySplashURL(options = {}) {
+ return this.discoverySplash && this.client.rest.cdn.discoverySplash(this.id, this.discoverySplash, options);
+ }
+
+ /**
+ * The URL to this guild's icon.
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ iconURL(options = {}) {
+ return this.icon && this.client.rest.cdn.icon(this.id, this.icon, options);
+ }
+
+ /**
+ * Fetches this guild.
+ * @returns {Promise<GuildPreview>}
+ */
+ async fetch() {
+ const data = await this.client.rest.get(Routes.guildPreview(this.id));
+ this._patch(data);
+ return this;
+ }
+
+ /**
+ * When concatenated with a string, this automatically returns the guild's name instead of the Guild object.
+ * @returns {string}
+ * @example
+ * // Logs: Hello from My Guild!
+ * console.log(`Hello from ${previewGuild}!`);
+ */
+ toString() {
+ return this.name;
+ }
+
+ toJSON() {
+ const json = super.toJSON();
+ json.iconURL = this.iconURL();
+ json.splashURL = this.splashURL();
+ return json;
+ }
+}
+
+module.exports = GuildPreview;
diff --git a/node_modules/discord.js/src/structures/GuildPreviewEmoji.js b/node_modules/discord.js/src/structures/GuildPreviewEmoji.js
new file mode 100644
index 0000000..144b41d
--- /dev/null
+++ b/node_modules/discord.js/src/structures/GuildPreviewEmoji.js
@@ -0,0 +1,27 @@
+'use strict';
+
+const BaseGuildEmoji = require('./BaseGuildEmoji');
+
+/**
+ * Represents an instance of an emoji belonging to a public guild obtained through Discord's preview endpoint.
+ * @extends {BaseGuildEmoji}
+ */
+class GuildPreviewEmoji extends BaseGuildEmoji {
+ /**
+ * The public guild this emoji is part of
+ * @type {GuildPreview}
+ * @name GuildPreviewEmoji#guild
+ */
+
+ constructor(client, data, guild) {
+ super(client, data, guild);
+
+ /**
+ * The roles this emoji is active for
+ * @type {Snowflake[]}
+ */
+ this.roles = data.roles;
+ }
+}
+
+module.exports = GuildPreviewEmoji;
diff --git a/node_modules/discord.js/src/structures/GuildScheduledEvent.js b/node_modules/discord.js/src/structures/GuildScheduledEvent.js
new file mode 100644
index 0000000..e9a37b2
--- /dev/null
+++ b/node_modules/discord.js/src/structures/GuildScheduledEvent.js
@@ -0,0 +1,439 @@
+'use strict';
+
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const { GuildScheduledEventStatus, GuildScheduledEventEntityType, RouteBases } = require('discord-api-types/v10');
+const Base = require('./Base');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+
+/**
+ * Represents a scheduled event in a {@link Guild}.
+ * @extends {Base}
+ */
+class GuildScheduledEvent extends Base {
+ constructor(client, data) {
+ super(client);
+
+ /**
+ * The id of the guild scheduled event
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+
+ /**
+ * The id of the guild this guild scheduled event belongs to
+ * @type {Snowflake}
+ */
+ this.guildId = data.guild_id;
+
+ this._patch(data);
+ }
+
+ _patch(data) {
+ if ('channel_id' in data) {
+ /**
+ * The channel id in which the scheduled event will be hosted,
+ * or `null` if entity type is {@link GuildScheduledEventEntityType.External}
+ * @type {?Snowflake}
+ */
+ this.channelId = data.channel_id;
+ } else {
+ this.channelId ??= null;
+ }
+
+ if ('creator_id' in data) {
+ /**
+ * The id of the user that created this guild scheduled event
+ * @type {?Snowflake}
+ */
+ this.creatorId = data.creator_id;
+ } else {
+ this.creatorId ??= null;
+ }
+
+ /**
+ * The name of the guild scheduled event
+ * @type {string}
+ */
+ this.name = data.name;
+
+ if ('description' in data) {
+ /**
+ * The description of the guild scheduled event
+ * @type {?string}
+ */
+ this.description = data.description;
+ } else {
+ this.description ??= null;
+ }
+
+ /**
+ * The timestamp the guild scheduled event will start at
+ * <info>This can be potentially `null` only when it's an {@link AuditLogEntryTarget}</info>
+ * @type {?number}
+ */
+ this.scheduledStartTimestamp = data.scheduled_start_time ? Date.parse(data.scheduled_start_time) : null;
+
+ /**
+ * The timestamp the guild scheduled event will end at,
+ * or `null` if the event does not have a scheduled time to end
+ * @type {?number}
+ */
+ this.scheduledEndTimestamp = data.scheduled_end_time ? Date.parse(data.scheduled_end_time) : null;
+
+ /**
+ * The privacy level of the guild scheduled event
+ * @type {GuildScheduledEventPrivacyLevel}
+ */
+ this.privacyLevel = data.privacy_level;
+
+ /**
+ * The status of the guild scheduled event
+ * @type {GuildScheduledEventStatus}
+ */
+ this.status = data.status;
+
+ /**
+ * The type of hosting entity associated with the scheduled event
+ * @type {GuildScheduledEventEntityType}
+ */
+ this.entityType = data.entity_type;
+
+ if ('entity_id' in data) {
+ /**
+ * The id of the hosting entity associated with the scheduled event
+ * @type {?Snowflake}
+ */
+ this.entityId = data.entity_id;
+ } else {
+ this.entityId ??= null;
+ }
+
+ if ('user_count' in data) {
+ /**
+ * The number of users who are subscribed to this guild scheduled event
+ * @type {?number}
+ */
+ this.userCount = data.user_count;
+ } else {
+ this.userCount ??= null;
+ }
+
+ if ('creator' in data) {
+ /**
+ * The user that created this guild scheduled event
+ * @type {?User}
+ */
+ this.creator = this.client.users._add(data.creator);
+ } else {
+ this.creator ??= this.client.users.resolve(this.creatorId);
+ }
+
+ /* eslint-disable max-len */
+ /**
+ * Represents the additional metadata for a {@link GuildScheduledEvent}
+ * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata}
+ * @typedef {Object} GuildScheduledEventEntityMetadata
+ * @property {?string} location The location of the guild scheduled event
+ */
+ /* eslint-enable max-len */
+
+ if ('entity_metadata' in data) {
+ if (data.entity_metadata) {
+ /**
+ * Additional metadata
+ * @type {?GuildScheduledEventEntityMetadata}
+ */
+ this.entityMetadata = {
+ location: data.entity_metadata.location ?? this.entityMetadata?.location ?? null,
+ };
+ } else {
+ this.entityMetadata = null;
+ }
+ } else {
+ this.entityMetadata ??= null;
+ }
+
+ if ('image' in data) {
+ /**
+ * The cover image hash for this scheduled event
+ * @type {?string}
+ */
+ this.image = data.image;
+ } else {
+ this.image ??= null;
+ }
+ }
+
+ /**
+ * The URL of this scheduled event's cover image
+ * @param {BaseImageURLOptions} [options={}] Options for image URL
+ * @returns {?string}
+ */
+ coverImageURL(options = {}) {
+ return this.image && this.client.rest.cdn.guildScheduledEventCover(this.id, this.image, options);
+ }
+
+ /**
+ * The timestamp the guild scheduled event was created at
+ * @type {number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return DiscordSnowflake.timestampFrom(this.id);
+ }
+
+ /**
+ * The time the guild scheduled event was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ /**
+ * The time the guild scheduled event will start at
+ * <info>This can be potentially `null` only when it's an {@link AuditLogEntryTarget}</info>
+ * @type {?Date}
+ * @readonly
+ */
+ get scheduledStartAt() {
+ return this.scheduledStartTimestamp && new Date(this.scheduledStartTimestamp);
+ }
+
+ /**
+ * The time the guild scheduled event will end at,
+ * or `null` if the event does not have a scheduled time to end
+ * @type {?Date}
+ * @readonly
+ */
+ get scheduledEndAt() {
+ return this.scheduledEndTimestamp && new Date(this.scheduledEndTimestamp);
+ }
+
+ /**
+ * The channel associated with this scheduled event
+ * @type {?(VoiceChannel|StageChannel)}
+ * @readonly
+ */
+ get channel() {
+ return this.client.channels.resolve(this.channelId);
+ }
+
+ /**
+ * The guild this scheduled event belongs to
+ * @type {?Guild}
+ * @readonly
+ */
+ get guild() {
+ return this.client.guilds.resolve(this.guildId);
+ }
+
+ /**
+ * The URL to the guild scheduled event
+ * @type {string}
+ * @readonly
+ */
+ get url() {
+ return `${RouteBases.scheduledEvent}/${this.guildId}/${this.id}`;
+ }
+
+ /**
+ * Options used to create an invite URL to a {@link GuildScheduledEvent}
+ * @typedef {InviteCreateOptions} GuildScheduledEventInviteURLCreateOptions
+ * @property {GuildInvitableChannelResolvable} [channel] The channel to create the invite in.
+ * <warn>This is required when the `entityType` of `GuildScheduledEvent` is
+ * {@link GuildScheduledEventEntityType.External}, gets ignored otherwise</warn>
+ */
+
+ /**
+ * Creates an invite URL to this guild scheduled event.
+ * @param {GuildScheduledEventInviteURLCreateOptions} [options] The options to create the invite
+ * @returns {Promise<string>}
+ */
+ async createInviteURL(options) {
+ let channelId = this.channelId;
+ if (this.entityType === GuildScheduledEventEntityType.External) {
+ if (!options?.channel) throw new DiscordjsError(ErrorCodes.InviteOptionsMissingChannel);
+ channelId = this.guild.channels.resolveId(options.channel);
+ if (!channelId) throw new DiscordjsError(ErrorCodes.GuildChannelResolve);
+ }
+ const invite = await this.guild.invites.create(channelId, options);
+ return `${RouteBases.invite}/${invite.code}?event=${this.id}`;
+ }
+
+ /**
+ * Edits this guild scheduled event.
+ * @param {GuildScheduledEventEditOptions} options The options to edit the guild scheduled event
+ * @returns {Promise<GuildScheduledEvent>}
+ * @example
+ * // Edit a guild scheduled event
+ * guildScheduledEvent.edit({ name: 'Party' })
+ * .then(guildScheduledEvent => console.log(guildScheduledEvent))
+ * .catch(console.error);
+ */
+ edit(options) {
+ return this.guild.scheduledEvents.edit(this.id, options);
+ }
+
+ /**
+ * Deletes this guild scheduled event.
+ * @returns {Promise<GuildScheduledEvent>}
+ * @example
+ * // Delete a guild scheduled event
+ * guildScheduledEvent.delete()
+ * .then(guildScheduledEvent => console.log(guildScheduledEvent))
+ * .catch(console.error);
+ */
+ async delete() {
+ await this.guild.scheduledEvents.delete(this.id);
+ return this;
+ }
+
+ /**
+ * Sets a new name for the guild scheduled event.
+ * @param {string} name The new name of the guild scheduled event
+ * @param {string} [reason] The reason for changing the name
+ * @returns {Promise<GuildScheduledEvent>}
+ * @example
+ * // Set name of a guild scheduled event
+ * guildScheduledEvent.setName('Birthday Party')
+ * .then(guildScheduledEvent => console.log(`Set the name to: ${guildScheduledEvent.name}`))
+ * .catch(console.error);
+ */
+ setName(name, reason) {
+ return this.edit({ name, reason });
+ }
+
+ /**
+ * Sets a new time to schedule the event at.
+ * @param {DateResolvable} scheduledStartTime The time to schedule the event at
+ * @param {string} [reason] The reason for changing the scheduled start time
+ * @returns {Promise<GuildScheduledEvent>}
+ * @example
+ * // Set start time of a guild scheduled event
+ * guildScheduledEvent.setScheduledStartTime('2022-09-24T00:00:00+05:30')
+ * .then(guildScheduledEvent => console.log(`Set the start time to: ${guildScheduledEvent.scheduledStartTime}`))
+ * .catch(console.error);
+ */
+ setScheduledStartTime(scheduledStartTime, reason) {
+ return this.edit({ scheduledStartTime, reason });
+ }
+
+ // TODO: scheduledEndTime gets reset on passing null but it hasn't been documented
+ /**
+ * Sets a new time to end the event at.
+ * @param {DateResolvable} scheduledEndTime The time to end the event at
+ * @param {string} [reason] The reason for changing the scheduled end time
+ * @returns {Promise<GuildScheduledEvent>}
+ * @example
+ * // Set end time of a guild scheduled event
+ * guildScheduledEvent.setScheduledEndTime('2022-09-25T00:00:00+05:30')
+ * .then(guildScheduledEvent => console.log(`Set the end time to: ${guildScheduledEvent.scheduledEndTime}`))
+ * .catch(console.error);
+ */
+ setScheduledEndTime(scheduledEndTime, reason) {
+ return this.edit({ scheduledEndTime, reason });
+ }
+
+ /**
+ * Sets the new description of the guild scheduled event.
+ * @param {string} description The description of the guild scheduled event
+ * @param {string} [reason] The reason for changing the description
+ * @returns {Promise<GuildScheduledEvent>}
+ * @example
+ * // Set description of a guild scheduled event
+ * guildScheduledEvent.setDescription('A virtual birthday party')
+ * .then(guildScheduledEvent => console.log(`Set the description to: ${guildScheduledEvent.description}`))
+ * .catch(console.error);
+ */
+ setDescription(description, reason) {
+ return this.edit({ description, reason });
+ }
+
+ /**
+ * Sets the new status of the guild scheduled event.
+ * <info>If you're working with TypeScript, use this method in conjunction with status type-guards
+ * like {@link GuildScheduledEvent#isScheduled} to get only valid status as suggestion</info>
+ * @param {GuildScheduledEventStatus} status The status of the guild scheduled event
+ * @param {string} [reason] The reason for changing the status
+ * @returns {Promise<GuildScheduledEvent>}
+ * @example
+ * // Set status of a guild scheduled event
+ * guildScheduledEvent.setStatus(GuildScheduledEventStatus.Active)
+ * .then(guildScheduledEvent => console.log(`Set the status to: ${guildScheduledEvent.status}`))
+ * .catch(console.error);
+ */
+ setStatus(status, reason) {
+ return this.edit({ status, reason });
+ }
+
+ /**
+ * Sets the new location of the guild scheduled event.
+ * @param {string} location The location of the guild scheduled event
+ * @param {string} [reason] The reason for changing the location
+ * @returns {Promise<GuildScheduledEvent>}
+ * @example
+ * // Set location of a guild scheduled event
+ * guildScheduledEvent.setLocation('Earth')
+ * .then(guildScheduledEvent => console.log(`Set the location to: ${guildScheduledEvent.entityMetadata.location}`))
+ * .catch(console.error);
+ */
+ setLocation(location, reason) {
+ return this.edit({ entityMetadata: { location }, reason });
+ }
+
+ /**
+ * Fetches subscribers of this guild scheduled event.
+ * @param {FetchGuildScheduledEventSubscribersOptions} [options] Options for fetching the subscribers
+ * @returns {Promise<Collection<Snowflake, GuildScheduledEventUser>>}
+ */
+ fetchSubscribers(options) {
+ return this.guild.scheduledEvents.fetchSubscribers(this.id, options);
+ }
+
+ /**
+ * When concatenated with a string, this automatically concatenates the event's URL instead of the object.
+ * @returns {string}
+ * @example
+ * // Logs: Event: https://discord.com/events/412345678901234567/499876543211234567
+ * console.log(`Event: ${guildScheduledEvent}`);
+ */
+ toString() {
+ return this.url;
+ }
+
+ /**
+ * Indicates whether this guild scheduled event has an {@link GuildScheduledEventStatus.Active} status.
+ * @returns {boolean}
+ */
+ isActive() {
+ return this.status === GuildScheduledEventStatus.Active;
+ }
+
+ /**
+ * Indicates whether this guild scheduled event has a {@link GuildScheduledEventStatus.Canceled} status.
+ * @returns {boolean}
+ */
+ isCanceled() {
+ return this.status === GuildScheduledEventStatus.Canceled;
+ }
+
+ /**
+ * Indicates whether this guild scheduled event has a {@link GuildScheduledEventStatus.Completed} status.
+ * @returns {boolean}
+ */
+ isCompleted() {
+ return this.status === GuildScheduledEventStatus.Completed;
+ }
+
+ /**
+ * Indicates whether this guild scheduled event has a {@link GuildScheduledEventStatus.Scheduled} status.
+ * @returns {boolean}
+ */
+ isScheduled() {
+ return this.status === GuildScheduledEventStatus.Scheduled;
+ }
+}
+
+exports.GuildScheduledEvent = GuildScheduledEvent;
diff --git a/node_modules/discord.js/src/structures/GuildTemplate.js b/node_modules/discord.js/src/structures/GuildTemplate.js
new file mode 100644
index 0000000..c1e219b
--- /dev/null
+++ b/node_modules/discord.js/src/structures/GuildTemplate.js
@@ -0,0 +1,241 @@
+'use strict';
+
+const { setTimeout, clearTimeout } = require('node:timers');
+const { RouteBases, Routes } = require('discord-api-types/v10');
+const Base = require('./Base');
+const DataResolver = require('../util/DataResolver');
+const Events = require('../util/Events');
+
+/**
+ * Represents the template for a guild.
+ * @extends {Base}
+ */
+class GuildTemplate extends Base {
+ /**
+ * A regular expression that matches guild template links.
+ * The `code` group property is present on the `exec()` result of this expression.
+ * @type {RegExp}
+ * @memberof GuildTemplate
+ */
+ static GuildTemplatesPattern = /discord(?:app)?\.(?:com\/template|new)\/(?<code>[\w-]{2,255})/i;
+
+ constructor(client, data) {
+ super(client);
+ this._patch(data);
+ }
+
+ _patch(data) {
+ if ('code' in data) {
+ /**
+ * The unique code of this template
+ * @type {string}
+ */
+ this.code = data.code;
+ }
+
+ if ('name' in data) {
+ /**
+ * The name of this template
+ * @type {string}
+ */
+ this.name = data.name;
+ }
+
+ if ('description' in data) {
+ /**
+ * The description of this template
+ * @type {?string}
+ */
+ this.description = data.description;
+ }
+
+ if ('usage_count' in data) {
+ /**
+ * The amount of times this template has been used
+ * @type {number}
+ */
+ this.usageCount = data.usage_count;
+ }
+
+ if ('creator_id' in data) {
+ /**
+ * The id of the user that created this template
+ * @type {Snowflake}
+ */
+ this.creatorId = data.creator_id;
+ }
+
+ if ('creator' in data) {
+ /**
+ * The user that created this template
+ * @type {User}
+ */
+ this.creator = this.client.users._add(data.creator);
+ }
+
+ if ('created_at' in data) {
+ /**
+ * The timestamp of when this template was created at
+ * @type {number}
+ */
+ this.createdTimestamp = Date.parse(data.created_at);
+ }
+
+ if ('updated_at' in data) {
+ /**
+ * The timestamp of when this template was last synced to the guild
+ * @type {number}
+ */
+ this.updatedTimestamp = Date.parse(data.updated_at);
+ }
+
+ if ('source_guild_id' in data) {
+ /**
+ * The id of the guild that this template belongs to
+ * @type {Snowflake}
+ */
+ this.guildId = data.source_guild_id;
+ }
+
+ if ('serialized_source_guild' in data) {
+ /**
+ * The data of the guild that this template would create
+ * @type {APIGuild}
+ */
+ this.serializedGuild = data.serialized_source_guild;
+ }
+
+ /**
+ * Whether this template has unsynced changes
+ * @type {?boolean}
+ */
+ this.unSynced = 'is_dirty' in data ? Boolean(data.is_dirty) : null;
+
+ return this;
+ }
+
+ /**
+ * Creates a guild based on this template.
+ * <warn>This is only available to bots in fewer than 10 guilds.</warn>
+ * @param {string} name The name of the guild
+ * @param {BufferResolvable|Base64Resolvable} [icon] The icon for the guild
+ * @returns {Promise<Guild>}
+ */
+ async createGuild(name, icon) {
+ const { client } = this;
+ const data = await client.rest.post(Routes.template(this.code), {
+ body: {
+ name,
+ icon: await DataResolver.resolveImage(icon),
+ },
+ });
+
+ if (client.guilds.cache.has(data.id)) return client.guilds.cache.get(data.id);
+
+ return new Promise(resolve => {
+ const resolveGuild = guild => {
+ client.off(Events.GuildCreate, handleGuild);
+ client.decrementMaxListeners();
+ resolve(guild);
+ };
+
+ const handleGuild = guild => {
+ if (guild.id === data.id) {
+ clearTimeout(timeout);
+ resolveGuild(guild);
+ }
+ };
+
+ client.incrementMaxListeners();
+ client.on(Events.GuildCreate, handleGuild);
+
+ const timeout = setTimeout(() => resolveGuild(client.guilds._add(data)), 10_000).unref();
+ });
+ }
+
+ /**
+ * Options used to edit a guild template.
+ * @typedef {Object} GuildTemplateEditOptions
+ * @property {string} [name] The name of this template
+ * @property {string} [description] The description of this template
+ */
+
+ /**
+ * Updates the metadata of this template.
+ * @param {GuildTemplateEditOptions} [options] Options for editing the template
+ * @returns {Promise<GuildTemplate>}
+ */
+ async edit({ name, description } = {}) {
+ const data = await this.client.rest.patch(Routes.guildTemplate(this.guildId, this.code), {
+ body: { name, description },
+ });
+ return this._patch(data);
+ }
+
+ /**
+ * Deletes this template.
+ * @returns {Promise<GuildTemplate>}
+ */
+ async delete() {
+ await this.client.rest.delete(Routes.guildTemplate(this.guildId, this.code));
+ return this;
+ }
+
+ /**
+ * Syncs this template to the current state of the guild.
+ * @returns {Promise<GuildTemplate>}
+ */
+ async sync() {
+ const data = await this.client.rest.put(Routes.guildTemplate(this.guildId, this.code));
+ return this._patch(data);
+ }
+
+ /**
+ * The time when this template was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ /**
+ * The time when this template was last synced to the guild
+ * @type {Date}
+ * @readonly
+ */
+ get updatedAt() {
+ return new Date(this.updatedTimestamp);
+ }
+
+ /**
+ * The guild that this template belongs to
+ * @type {?Guild}
+ * @readonly
+ */
+ get guild() {
+ return this.client.guilds.resolve(this.guildId);
+ }
+
+ /**
+ * The URL of this template
+ * @type {string}
+ * @readonly
+ */
+ get url() {
+ return `${RouteBases.template}/${this.code}`;
+ }
+
+ /**
+ * When concatenated with a string, this automatically returns the template's code instead of the template object.
+ * @returns {string}
+ * @example
+ * // Logs: Template: FKvmczH2HyUf
+ * console.log(`Template: ${guildTemplate}!`);
+ */
+ toString() {
+ return this.code;
+ }
+}
+
+module.exports = GuildTemplate;
diff --git a/node_modules/discord.js/src/structures/Integration.js b/node_modules/discord.js/src/structures/Integration.js
new file mode 100644
index 0000000..fa9777b
--- /dev/null
+++ b/node_modules/discord.js/src/structures/Integration.js
@@ -0,0 +1,220 @@
+'use strict';
+
+const { Routes } = require('discord-api-types/v10');
+const Base = require('./Base');
+const IntegrationApplication = require('./IntegrationApplication');
+
+/**
+ * The information account for an integration
+ * @typedef {Object} IntegrationAccount
+ * @property {Snowflake|string} id The id of the account
+ * @property {string} name The name of the account
+ */
+
+/**
+ * The type of an {@link Integration}. This can be:
+ * * `twitch`
+ * * `youtube`
+ * * `discord`
+ * * `guild_subscription`
+ * @typedef {string} IntegrationType
+ */
+
+/**
+ * Represents a guild integration.
+ * @extends {Base}
+ */
+class Integration extends Base {
+ constructor(client, data, guild) {
+ super(client);
+
+ /**
+ * The guild this integration belongs to
+ * @type {Guild}
+ */
+ this.guild = guild;
+
+ /**
+ * The integration id
+ * @type {Snowflake|string}
+ */
+ this.id = data.id;
+
+ /**
+ * The integration name
+ * @type {string}
+ */
+ this.name = data.name;
+
+ /**
+ * The integration type
+ * @type {IntegrationType}
+ */
+ this.type = data.type;
+
+ /**
+ * Whether this integration is enabled
+ * @type {?boolean}
+ */
+ this.enabled = data.enabled ?? null;
+
+ if ('syncing' in data) {
+ /**
+ * Whether this integration is syncing
+ * @type {?boolean}
+ */
+ this.syncing = data.syncing;
+ } else {
+ this.syncing ??= null;
+ }
+
+ /**
+ * The role that this integration uses for subscribers
+ * @type {?Role}
+ */
+ this.role = this.guild.roles.resolve(data.role_id);
+
+ if ('enable_emoticons' in data) {
+ /**
+ * Whether emoticons should be synced for this integration (twitch only currently)
+ * @type {?boolean}
+ */
+ this.enableEmoticons = data.enable_emoticons;
+ } else {
+ this.enableEmoticons ??= null;
+ }
+
+ if (data.user) {
+ /**
+ * The user for this integration
+ * @type {?User}
+ */
+ this.user = this.client.users._add(data.user);
+ } else {
+ this.user ??= null;
+ }
+
+ /**
+ * The account integration information
+ * @type {IntegrationAccount}
+ */
+ this.account = data.account;
+
+ if ('synced_at' in data) {
+ /**
+ * The timestamp at which this integration was last synced at
+ * @type {?number}
+ */
+ this.syncedTimestamp = Date.parse(data.synced_at);
+ } else {
+ this.syncedTimestamp ??= null;
+ }
+
+ if ('subscriber_count' in data) {
+ /**
+ * How many subscribers this integration has
+ * @type {?number}
+ */
+ this.subscriberCount = data.subscriber_count;
+ } else {
+ this.subscriberCount ??= null;
+ }
+
+ if ('revoked' in data) {
+ /**
+ * Whether this integration has been revoked
+ * @type {?boolean}
+ */
+ this.revoked = data.revoked;
+ } else {
+ this.revoked ??= null;
+ }
+
+ this._patch(data);
+ }
+
+ /**
+ * The date at which this integration was last synced at
+ * @type {?Date}
+ * @readonly
+ */
+ get syncedAt() {
+ return this.syncedTimestamp && new Date(this.syncedTimestamp);
+ }
+
+ /**
+ * All roles that are managed by this integration
+ * @type {Collection<Snowflake, Role>}
+ * @readonly
+ */
+ get roles() {
+ const roles = this.guild.roles.cache;
+ return roles.filter(role => role.tags?.integrationId === this.id);
+ }
+
+ _patch(data) {
+ if ('expire_behavior' in data) {
+ /**
+ * The behavior of expiring subscribers
+ * @type {?IntegrationExpireBehavior}
+ */
+ this.expireBehavior = data.expire_behavior;
+ } else {
+ this.expireBehavior ??= null;
+ }
+
+ if ('expire_grace_period' in data) {
+ /**
+ * The grace period (in days) before expiring subscribers
+ * @type {?number}
+ */
+ this.expireGracePeriod = data.expire_grace_period;
+ } else {
+ this.expireGracePeriod ??= null;
+ }
+
+ if ('application' in data) {
+ if (this.application) {
+ this.application._patch(data.application);
+ } else {
+ /**
+ * The application for this integration
+ * @type {?IntegrationApplication}
+ */
+ this.application = new IntegrationApplication(this.client, data.application);
+ }
+ } else {
+ this.application ??= null;
+ }
+
+ if ('scopes' in data) {
+ /**
+ * The scopes this application has been authorized for
+ * @type {OAuth2Scopes[]}
+ */
+ this.scopes = data.scopes;
+ } else {
+ this.scopes ??= [];
+ }
+ }
+
+ /**
+ * Deletes this integration.
+ * @returns {Promise<Integration>}
+ * @param {string} [reason] Reason for deleting this integration
+ */
+ async delete(reason) {
+ await this.client.rest.delete(Routes.guildIntegration(this.guild.id, this.id), { reason });
+ return this;
+ }
+
+ toJSON() {
+ return super.toJSON({
+ role: 'roleId',
+ guild: 'guildId',
+ user: 'userId',
+ });
+ }
+}
+
+module.exports = Integration;
diff --git a/node_modules/discord.js/src/structures/IntegrationApplication.js b/node_modules/discord.js/src/structures/IntegrationApplication.js
new file mode 100644
index 0000000..4985008
--- /dev/null
+++ b/node_modules/discord.js/src/structures/IntegrationApplication.js
@@ -0,0 +1,85 @@
+'use strict';
+
+const Application = require('./interfaces/Application');
+
+/**
+ * Represents an Integration's OAuth2 Application.
+ * @extends {Application}
+ */
+class IntegrationApplication extends Application {
+ _patch(data) {
+ super._patch(data);
+
+ if ('bot' in data) {
+ /**
+ * The bot user for this application
+ * @type {?User}
+ */
+ this.bot = this.client.users._add(data.bot);
+ } else {
+ this.bot ??= null;
+ }
+
+ if ('terms_of_service_url' in data) {
+ /**
+ * The URL of the application's terms of service
+ * @type {?string}
+ */
+ this.termsOfServiceURL = data.terms_of_service_url;
+ } else {
+ this.termsOfServiceURL ??= null;
+ }
+
+ if ('privacy_policy_url' in data) {
+ /**
+ * The URL of the application's privacy policy
+ * @type {?string}
+ */
+ this.privacyPolicyURL = data.privacy_policy_url;
+ } else {
+ this.privacyPolicyURL ??= null;
+ }
+
+ if ('rpc_origins' in data) {
+ /**
+ * The Array of RPC origin URLs
+ * @type {string[]}
+ */
+ this.rpcOrigins = data.rpc_origins;
+ } else {
+ this.rpcOrigins ??= [];
+ }
+
+ if ('hook' in data) {
+ /**
+ * Whether the application can be default hooked by the client
+ * @type {?boolean}
+ */
+ this.hook = data.hook;
+ } else {
+ this.hook ??= null;
+ }
+
+ if ('cover_image' in data) {
+ /**
+ * The hash of the application's cover image
+ * @type {?string}
+ */
+ this.cover = data.cover_image;
+ } else {
+ this.cover ??= null;
+ }
+
+ if ('verify_key' in data) {
+ /**
+ * The hex-encoded key for verification in interactions and the GameSDK's GetTicket
+ * @type {?string}
+ */
+ this.verifyKey = data.verify_key;
+ } else {
+ this.verifyKey ??= null;
+ }
+ }
+}
+
+module.exports = IntegrationApplication;
diff --git a/node_modules/discord.js/src/structures/InteractionCollector.js b/node_modules/discord.js/src/structures/InteractionCollector.js
new file mode 100644
index 0000000..bb8e6c7
--- /dev/null
+++ b/node_modules/discord.js/src/structures/InteractionCollector.js
@@ -0,0 +1,269 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const Collector = require('./interfaces/Collector');
+const Events = require('../util/Events');
+
+/**
+ * @typedef {CollectorOptions} InteractionCollectorOptions
+ * @property {TextBasedChannelsResolvable} [channel] The channel to listen to interactions from
+ * @property {ComponentType} [componentType] The type of component to listen for
+ * @property {GuildResolvable} [guild] The guild to listen to interactions from
+ * @property {InteractionType} [interactionType] The type of interaction to listen for
+ * @property {number} [max] The maximum total amount of interactions to collect
+ * @property {number} [maxComponents] The maximum number of components to collect
+ * @property {number} [maxUsers] The maximum number of users to interact
+ * @property {Message|APIMessage} [message] The message to listen to interactions from
+ * @property {InteractionResponse} [interactionResponse] The interaction response to listen
+ * to message component interactions from
+ */
+
+/**
+ * Collects interactions.
+ * Will automatically stop if the message ({@link Client#event:messageDelete messageDelete} or
+ * {@link Client#event:messageDeleteBulk messageDeleteBulk}),
+ * channel ({@link Client#event:channelDelete channelDelete}), or
+ * guild ({@link Client#event:guildDelete guildDelete}) is deleted.
+ * <info>Interaction collectors that do not specify `time` or `idle` may be prone to always running.
+ * Ensure your interaction collectors end via either of these options or manual cancellation.</info>
+ * @extends {Collector}
+ */
+class InteractionCollector extends Collector {
+ /**
+ * @param {Client} client The client on which to collect interactions
+ * @param {InteractionCollectorOptions} [options={}] The options to apply to this collector
+ */
+ constructor(client, options = {}) {
+ super(client, options);
+
+ /**
+ * The message from which to collect interactions, if provided
+ * @type {?Snowflake}
+ */
+ this.messageId = options.message?.id ?? options.interactionResponse?.interaction.message?.id ?? null;
+
+ /**
+ * The message interaction id from which to collect interactions, if provided
+ * @type {?Snowflake}
+ */
+ this.messageInteractionId = options.interactionResponse?.id ?? null;
+
+ /**
+ * The channel from which to collect interactions, if provided
+ * @type {?Snowflake}
+ */
+ this.channelId =
+ options.interactionResponse?.interaction.channelId ??
+ options.message?.channelId ??
+ options.message?.channel_id ??
+ this.client.channels.resolveId(options.channel);
+
+ /**
+ * The guild from which to collect interactions, if provided
+ * @type {?Snowflake}
+ */
+ this.guildId =
+ options.interactionResponse?.interaction.guildId ??
+ options.message?.guildId ??
+ options.message?.guild_id ??
+ this.client.guilds.resolveId(options.channel?.guild) ??
+ this.client.guilds.resolveId(options.guild);
+
+ /**
+ * The type of interaction to collect
+ * @type {?InteractionType}
+ */
+ this.interactionType = options.interactionType ?? null;
+
+ /**
+ * The type of component to collect
+ * @type {?ComponentType}
+ */
+ this.componentType = options.componentType ?? null;
+
+ /**
+ * The users that have interacted with this collector
+ * @type {Collection<Snowflake, User>}
+ */
+ this.users = new Collection();
+
+ /**
+ * The total number of interactions collected
+ * @type {number}
+ */
+ this.total = 0;
+
+ this.client.incrementMaxListeners();
+
+ const bulkDeleteListener = messages => {
+ if (messages.has(this.messageId)) this.stop('messageDelete');
+ };
+
+ if (this.messageId || this.messageInteractionId) {
+ this._handleMessageDeletion = this._handleMessageDeletion.bind(this);
+ this.client.on(Events.MessageDelete, this._handleMessageDeletion);
+ this.client.on(Events.MessageBulkDelete, bulkDeleteListener);
+ }
+
+ if (this.channelId) {
+ this._handleChannelDeletion = this._handleChannelDeletion.bind(this);
+ this._handleThreadDeletion = this._handleThreadDeletion.bind(this);
+ this.client.on(Events.ChannelDelete, this._handleChannelDeletion);
+ this.client.on(Events.ThreadDelete, this._handleThreadDeletion);
+ }
+
+ if (this.guildId) {
+ this._handleGuildDeletion = this._handleGuildDeletion.bind(this);
+ this.client.on(Events.GuildDelete, this._handleGuildDeletion);
+ }
+
+ this.client.on(Events.InteractionCreate, this.handleCollect);
+
+ this.once('end', () => {
+ this.client.removeListener(Events.InteractionCreate, this.handleCollect);
+ this.client.removeListener(Events.MessageDelete, this._handleMessageDeletion);
+ this.client.removeListener(Events.MessageBulkDelete, bulkDeleteListener);
+ this.client.removeListener(Events.ChannelDelete, this._handleChannelDeletion);
+ this.client.removeListener(Events.ThreadDelete, this._handleThreadDeletion);
+ this.client.removeListener(Events.GuildDelete, this._handleGuildDeletion);
+ this.client.decrementMaxListeners();
+ });
+
+ this.on('collect', interaction => {
+ this.total++;
+ this.users.set(interaction.user.id, interaction.user);
+ });
+ }
+
+ /**
+ * Handles an incoming interaction for possible collection.
+ * @param {BaseInteraction} interaction The interaction to possibly collect
+ * @returns {?Snowflake}
+ * @private
+ */
+ collect(interaction) {
+ /**
+ * Emitted whenever an interaction is collected.
+ * @event InteractionCollector#collect
+ * @param {BaseInteraction} interaction The interaction that was collected
+ */
+
+ if (this.interactionType && interaction.type !== this.interactionType) return null;
+ if (this.componentType && interaction.componentType !== this.componentType) return null;
+ if (this.messageId && interaction.message?.id !== this.messageId) return null;
+ if (
+ this.messageInteractionId &&
+ interaction.message?.interaction?.id &&
+ interaction.message.interaction.id !== this.messageInteractionId
+ ) {
+ return null;
+ }
+ if (this.channelId && interaction.channelId !== this.channelId) return null;
+ if (this.guildId && interaction.guildId !== this.guildId) return null;
+
+ return interaction.id;
+ }
+
+ /**
+ * Handles an interaction for possible disposal.
+ * @param {BaseInteraction} interaction The interaction that could be disposed of
+ * @returns {?Snowflake}
+ */
+ dispose(interaction) {
+ /**
+ * Emitted whenever an interaction is disposed of.
+ * @event InteractionCollector#dispose
+ * @param {BaseInteraction} interaction The interaction that was disposed of
+ */
+ if (this.type && interaction.type !== this.type) return null;
+ if (this.componentType && interaction.componentType !== this.componentType) return null;
+ if (this.messageId && interaction.message?.id !== this.messageId) return null;
+ if (
+ this.messageInteractionId &&
+ interaction.message?.interaction?.id &&
+ interaction.message.interaction.id !== this.messageInteractionId
+ ) {
+ return null;
+ }
+ if (this.channelId && interaction.channelId !== this.channelId) return null;
+ if (this.guildId && interaction.guildId !== this.guildId) return null;
+
+ return interaction.id;
+ }
+
+ /**
+ * Empties this interaction collector.
+ */
+ empty() {
+ this.total = 0;
+ this.collected.clear();
+ this.users.clear();
+ this.checkEnd();
+ }
+
+ /**
+ * The reason this collector has ended with, or null if it hasn't ended yet
+ * @type {?string}
+ * @readonly
+ */
+ get endReason() {
+ if (this.options.max && this.total >= this.options.max) return 'limit';
+ if (this.options.maxComponents && this.collected.size >= this.options.maxComponents) return 'componentLimit';
+ if (this.options.maxUsers && this.users.size >= this.options.maxUsers) return 'userLimit';
+ return super.endReason;
+ }
+
+ /**
+ * Handles checking if the message has been deleted, and if so, stops the collector with the reason 'messageDelete'.
+ * @private
+ * @param {Message} message The message that was deleted
+ * @returns {void}
+ */
+ _handleMessageDeletion(message) {
+ if (message.id === this.messageId) {
+ this.stop('messageDelete');
+ }
+
+ if (message.interaction?.id === this.messageInteractionId) {
+ this.stop('messageDelete');
+ }
+ }
+
+ /**
+ * Handles checking if the channel has been deleted, and if so, stops the collector with the reason 'channelDelete'.
+ * @private
+ * @param {GuildChannel} channel The channel that was deleted
+ * @returns {void}
+ */
+ _handleChannelDeletion(channel) {
+ if (channel.id === this.channelId || channel.threads?.cache.has(this.channelId)) {
+ this.stop('channelDelete');
+ }
+ }
+
+ /**
+ * Handles checking if the thread has been deleted, and if so, stops the collector with the reason 'threadDelete'.
+ * @private
+ * @param {ThreadChannel} thread The thread that was deleted
+ * @returns {void}
+ */
+ _handleThreadDeletion(thread) {
+ if (thread.id === this.channelId) {
+ this.stop('threadDelete');
+ }
+ }
+
+ /**
+ * Handles checking if the guild has been deleted, and if so, stops the collector with the reason 'guildDelete'.
+ * @private
+ * @param {Guild} guild The guild that was deleted
+ * @returns {void}
+ */
+ _handleGuildDeletion(guild) {
+ if (guild.id === this.guildId) {
+ this.stop('guildDelete');
+ }
+ }
+}
+
+module.exports = InteractionCollector;
diff --git a/node_modules/discord.js/src/structures/InteractionResponse.js b/node_modules/discord.js/src/structures/InteractionResponse.js
new file mode 100644
index 0000000..9b372e3
--- /dev/null
+++ b/node_modules/discord.js/src/structures/InteractionResponse.js
@@ -0,0 +1,102 @@
+'use strict';
+
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const { InteractionType } = require('discord-api-types/v10');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+
+/**
+ * Represents an interaction's response
+ */
+class InteractionResponse {
+ constructor(interaction, id) {
+ /**
+ * The interaction associated with the interaction response
+ * @type {BaseInteraction}
+ */
+ this.interaction = interaction;
+ /**
+ * The id of the original interaction response
+ * @type {Snowflake}
+ */
+ this.id = id ?? interaction.id;
+ this.client = interaction.client;
+ }
+
+ /**
+ * The timestamp the interaction response was created at
+ * @type {number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return DiscordSnowflake.timestampFrom(this.id);
+ }
+
+ /**
+ * The time the interaction response was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ /**
+ * Collects a single component interaction that passes the filter.
+ * The Promise will reject if the time expires.
+ * @param {AwaitMessageComponentOptions} [options={}] Options to pass to the internal collector
+ * @returns {Promise<MessageComponentInteraction>}
+ */
+ awaitMessageComponent(options = {}) {
+ const _options = { ...options, max: 1 };
+ return new Promise((resolve, reject) => {
+ const collector = this.createMessageComponentCollector(_options);
+ collector.once('end', (interactions, reason) => {
+ const interaction = interactions.first();
+ if (interaction) resolve(interaction);
+ else reject(new DiscordjsError(ErrorCodes.InteractionCollectorError, reason));
+ });
+ });
+ }
+
+ /**
+ * Creates a message component interaction collector
+ * @param {MessageComponentCollectorOptions} [options={}] Options to send to the collector
+ * @returns {InteractionCollector}
+ */
+ createMessageComponentCollector(options = {}) {
+ return new InteractionCollector(this.client, {
+ ...options,
+ interactionResponse: this,
+ interactionType: InteractionType.MessageComponent,
+ });
+ }
+
+ /**
+ * Fetches the response as a {@link Message} object.
+ * @returns {Promise<Message>}
+ */
+ fetch() {
+ return this.interaction.fetchReply();
+ }
+
+ /**
+ * Deletes the response.
+ * @returns {Promise<void>}
+ */
+ delete() {
+ return this.interaction.deleteReply();
+ }
+
+ /**
+ * Edits the response.
+ * @param {string|MessagePayload|WebhookMessageEditOptions} options The new options for the response.
+ * @returns {Promise<Message>}
+ */
+ edit(options) {
+ return this.interaction.editReply(options);
+ }
+}
+
+// eslint-disable-next-line import/order
+const InteractionCollector = require('./InteractionCollector');
+module.exports = InteractionResponse;
diff --git a/node_modules/discord.js/src/structures/InteractionWebhook.js b/node_modules/discord.js/src/structures/InteractionWebhook.js
new file mode 100644
index 0000000..58eb531
--- /dev/null
+++ b/node_modules/discord.js/src/structures/InteractionWebhook.js
@@ -0,0 +1,59 @@
+'use strict';
+
+const Webhook = require('./Webhook');
+
+/**
+ * Represents a webhook for an Interaction
+ * @implements {Webhook}
+ */
+class InteractionWebhook {
+ /**
+ * @param {Client} client The instantiating client
+ * @param {Snowflake} id The application's id
+ * @param {string} token The interaction's token
+ */
+ constructor(client, id, token) {
+ /**
+ * The client that instantiated the interaction webhook
+ * @name InteractionWebhook#client
+ * @type {Client}
+ * @readonly
+ */
+ Object.defineProperty(this, 'client', { value: client });
+ this.id = id;
+ Object.defineProperty(this, 'token', { value: token, writable: true, configurable: true });
+ }
+
+ // These are here only for documentation purposes - they are implemented by Webhook
+ /* eslint-disable no-empty-function */
+ /**
+ * Sends a message with this webhook.
+ * @param {string|MessagePayload|InteractionReplyOptions} options The content for the reply
+ * @returns {Promise<Message>}
+ */
+
+ send() {}
+
+ /**
+ * Gets a message that was sent by this webhook.
+ * @param {Snowflake|'@original'} message The id of the message to fetch
+ * @returns {Promise<Message>} Returns the message sent by this webhook
+ */
+
+ fetchMessage() {}
+
+ /**
+ * Edits a message that was sent by this webhook.
+ * @param {MessageResolvable|'@original'} message The message to edit
+ * @param {string|MessagePayload|WebhookMessageEditOptions} options The options to provide
+ * @returns {Promise<Message>} Returns the message edited by this webhook
+ */
+
+ editMessage() {}
+ deleteMessage() {}
+ get url() {}
+}
+
+Webhook.applyToClass(InteractionWebhook, ['sendSlackMessage', 'edit', 'delete', 'createdTimestamp', 'createdAt']);
+
+module.exports = InteractionWebhook;
diff --git a/node_modules/discord.js/src/structures/Invite.js b/node_modules/discord.js/src/structures/Invite.js
new file mode 100644
index 0000000..19014ff
--- /dev/null
+++ b/node_modules/discord.js/src/structures/Invite.js
@@ -0,0 +1,322 @@
+'use strict';
+
+const { RouteBases, Routes, PermissionFlagsBits } = require('discord-api-types/v10');
+const Base = require('./Base');
+const { GuildScheduledEvent } = require('./GuildScheduledEvent');
+const IntegrationApplication = require('./IntegrationApplication');
+const InviteStageInstance = require('./InviteStageInstance');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+
+/**
+ * Represents an invitation to a guild channel.
+ * @extends {Base}
+ */
+class Invite extends Base {
+ /**
+ * A regular expression that matches Discord invite links.
+ * The `code` group property is present on the `exec()` result of this expression.
+ * @type {RegExp}
+ * @memberof Invite
+ */
+ static InvitesPattern = /discord(?:(?:app)?\.com\/invite|\.gg(?:\/invite)?)\/(?<code>[\w-]{2,255})/i;
+
+ constructor(client, data) {
+ super(client);
+ this._patch(data);
+ }
+
+ _patch(data) {
+ const InviteGuild = require('./InviteGuild');
+ /**
+ * The guild the invite is for including welcome screen data if present
+ * @type {?(Guild|InviteGuild)}
+ */
+ this.guild ??= null;
+ if (data.guild) {
+ this.guild = this.client.guilds.resolve(data.guild.id) ?? new InviteGuild(this.client, data.guild);
+ }
+
+ if ('code' in data) {
+ /**
+ * The code for this invite
+ * @type {string}
+ */
+ this.code = data.code;
+ }
+
+ if ('approximate_presence_count' in data) {
+ /**
+ * The approximate number of online members of the guild this invite is for
+ * <info>This is only available when the invite was fetched through {@link Client#fetchInvite}.</info>
+ * @type {?number}
+ */
+ this.presenceCount = data.approximate_presence_count;
+ } else {
+ this.presenceCount ??= null;
+ }
+
+ if ('approximate_member_count' in data) {
+ /**
+ * The approximate total number of members of the guild this invite is for
+ * <info>This is only available when the invite was fetched through {@link Client#fetchInvite}.</info>
+ * @type {?number}
+ */
+ this.memberCount = data.approximate_member_count;
+ } else {
+ this.memberCount ??= null;
+ }
+
+ if ('temporary' in data) {
+ /**
+ * Whether or not this invite only grants temporary membership
+ * <info>This is only available when the invite was fetched through {@link GuildInviteManager#fetch}
+ * or created through {@link GuildInviteManager#create}.</info>
+ * @type {?boolean}
+ */
+ this.temporary = data.temporary ?? null;
+ } else {
+ this.temporary ??= null;
+ }
+
+ if ('max_age' in data) {
+ /**
+ * The maximum age of the invite, in seconds, 0 if never expires
+ * <info>This is only available when the invite was fetched through {@link GuildInviteManager#fetch}
+ * or created through {@link GuildInviteManager#create}.</info>
+ * @type {?number}
+ */
+ this.maxAge = data.max_age;
+ } else {
+ this.maxAge ??= null;
+ }
+
+ if ('uses' in data) {
+ /**
+ * How many times this invite has been used
+ * <info>This is only available when the invite was fetched through {@link GuildInviteManager#fetch}
+ * or created through {@link GuildInviteManager#create}.</info>
+ * @type {?number}
+ */
+ this.uses = data.uses;
+ } else {
+ this.uses ??= null;
+ }
+
+ if ('max_uses' in data) {
+ /**
+ * The maximum uses of this invite
+ * <info>This is only available when the invite was fetched through {@link GuildInviteManager#fetch}
+ * or created through {@link GuildInviteManager#create}.</info>
+ * @type {?number}
+ */
+ this.maxUses = data.max_uses;
+ } else {
+ this.maxUses ??= null;
+ }
+
+ if ('inviter_id' in data) {
+ /**
+ * The user's id who created this invite
+ * @type {?Snowflake}
+ */
+ this.inviterId = data.inviter_id;
+ } else {
+ this.inviterId ??= null;
+ }
+
+ if ('inviter' in data) {
+ this.client.users._add(data.inviter);
+ this.inviterId = data.inviter.id;
+ }
+
+ if ('target_user' in data) {
+ /**
+ * The user whose stream to display for this voice channel stream invite
+ * @type {?User}
+ */
+ this.targetUser = this.client.users._add(data.target_user);
+ } else {
+ this.targetUser ??= null;
+ }
+
+ if ('target_application' in data) {
+ /**
+ * The embedded application to open for this voice channel embedded application invite
+ * @type {?IntegrationApplication}
+ */
+ this.targetApplication = new IntegrationApplication(this.client, data.target_application);
+ } else {
+ this.targetApplication ??= null;
+ }
+
+ if ('target_type' in data) {
+ /**
+ * The target type
+ * @type {?InviteTargetType}
+ */
+ this.targetType = data.target_type;
+ } else {
+ this.targetType ??= null;
+ }
+
+ if ('channel_id' in data) {
+ /**
+ * The id of the channel this invite is for
+ * @type {?Snowflake}
+ */
+ this.channelId = data.channel_id;
+ }
+
+ if ('channel' in data) {
+ /**
+ * The channel this invite is for
+ * @type {?BaseChannel}
+ */
+ this.channel =
+ this.client.channels._add(data.channel, this.guild, { cache: false }) ??
+ this.client.channels.resolve(this.channelId);
+
+ this.channelId ??= data.channel.id;
+ }
+
+ if ('created_at' in data) {
+ /**
+ * The timestamp this invite was created at
+ * @type {?number}
+ */
+ this.createdTimestamp = Date.parse(data.created_at);
+ } else {
+ this.createdTimestamp ??= null;
+ }
+
+ if ('expires_at' in data) {
+ this._expiresTimestamp = data.expires_at && Date.parse(data.expires_at);
+ } else {
+ this._expiresTimestamp ??= null;
+ }
+
+ if ('stage_instance' in data) {
+ /**
+ * The stage instance data if there is a public {@link StageInstance} in the stage channel this invite is for
+ * @type {?InviteStageInstance}
+ * @deprecated
+ */
+ this.stageInstance = new InviteStageInstance(this.client, data.stage_instance, this.channel.id, this.guild.id);
+ } else {
+ this.stageInstance ??= null;
+ }
+
+ if ('guild_scheduled_event' in data) {
+ /**
+ * The guild scheduled event data if there is a {@link GuildScheduledEvent} in the channel this invite is for
+ * @type {?GuildScheduledEvent}
+ */
+ this.guildScheduledEvent = new GuildScheduledEvent(this.client, data.guild_scheduled_event);
+ } else {
+ this.guildScheduledEvent ??= null;
+ }
+ }
+
+ /**
+ * The time the invite was created at
+ * @type {?Date}
+ * @readonly
+ */
+ get createdAt() {
+ return this.createdTimestamp && new Date(this.createdTimestamp);
+ }
+
+ /**
+ * Whether the invite is deletable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get deletable() {
+ const guild = this.guild;
+ if (!guild || !this.client.guilds.cache.has(guild.id)) return false;
+ if (!guild.members.me) throw new DiscordjsError(ErrorCodes.GuildUncachedMe);
+ return Boolean(
+ this.channel?.permissionsFor(this.client.user).has(PermissionFlagsBits.ManageChannels, false) ||
+ guild.members.me.permissions.has(PermissionFlagsBits.ManageGuild),
+ );
+ }
+
+ /**
+ * The timestamp the invite will expire at
+ * @type {?number}
+ * @readonly
+ */
+ get expiresTimestamp() {
+ return (
+ this._expiresTimestamp ??
+ (this.createdTimestamp && this.maxAge ? this.createdTimestamp + this.maxAge * 1_000 : null)
+ );
+ }
+
+ /**
+ * The time the invite will expire at
+ * @type {?Date}
+ * @readonly
+ */
+ get expiresAt() {
+ return this.expiresTimestamp && new Date(this.expiresTimestamp);
+ }
+
+ /**
+ * The user who created this invite
+ * @type {?User}
+ * @readonly
+ */
+ get inviter() {
+ return this.inviterId && this.client.users.resolve(this.inviterId);
+ }
+
+ /**
+ * The URL to the invite
+ * @type {string}
+ * @readonly
+ */
+ get url() {
+ return `${RouteBases.invite}/${this.code}`;
+ }
+
+ /**
+ * Deletes this invite.
+ * @param {string} [reason] Reason for deleting this invite
+ * @returns {Promise<Invite>}
+ */
+ async delete(reason) {
+ await this.client.rest.delete(Routes.invite(this.code), { reason });
+ return this;
+ }
+
+ /**
+ * When concatenated with a string, this automatically concatenates the invite's URL instead of the object.
+ * @returns {string}
+ * @example
+ * // Logs: Invite: https://discord.gg/A1b2C3
+ * console.log(`Invite: ${invite}`);
+ */
+ toString() {
+ return this.url;
+ }
+
+ toJSON() {
+ return super.toJSON({
+ url: true,
+ expiresTimestamp: true,
+ presenceCount: false,
+ memberCount: false,
+ uses: false,
+ channel: 'channelId',
+ inviter: 'inviterId',
+ guild: 'guildId',
+ });
+ }
+
+ valueOf() {
+ return this.code;
+ }
+}
+
+module.exports = Invite;
diff --git a/node_modules/discord.js/src/structures/InviteGuild.js b/node_modules/discord.js/src/structures/InviteGuild.js
new file mode 100644
index 0000000..8efd980
--- /dev/null
+++ b/node_modules/discord.js/src/structures/InviteGuild.js
@@ -0,0 +1,22 @@
+'use strict';
+
+const AnonymousGuild = require('./AnonymousGuild');
+const WelcomeScreen = require('./WelcomeScreen');
+
+/**
+ * Represents a guild received from an invite, includes welcome screen data if available.
+ * @extends {AnonymousGuild}
+ */
+class InviteGuild extends AnonymousGuild {
+ constructor(client, data) {
+ super(client, data);
+
+ /**
+ * The welcome screen for this invite guild
+ * @type {?WelcomeScreen}
+ */
+ this.welcomeScreen = data.welcome_screen !== undefined ? new WelcomeScreen(this, data.welcome_screen) : null;
+ }
+}
+
+module.exports = InviteGuild;
diff --git a/node_modules/discord.js/src/structures/InviteStageInstance.js b/node_modules/discord.js/src/structures/InviteStageInstance.js
new file mode 100644
index 0000000..21ede43
--- /dev/null
+++ b/node_modules/discord.js/src/structures/InviteStageInstance.js
@@ -0,0 +1,87 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const Base = require('./Base');
+
+/**
+ * Represents the data about a public {@link StageInstance} in an {@link Invite}.
+ * @extends {Base}
+ * @deprecated
+ */
+class InviteStageInstance extends Base {
+ constructor(client, data, channelId, guildId) {
+ super(client);
+
+ /**
+ * The id of the stage channel this invite is for
+ * @type {Snowflake}
+ */
+ this.channelId = channelId;
+
+ /**
+ * The stage channel's guild id
+ * @type {Snowflake}
+ */
+ this.guildId = guildId;
+
+ /**
+ * The members speaking in the stage channel
+ * @type {Collection<Snowflake, GuildMember>}
+ */
+ this.members = new Collection();
+
+ this._patch(data);
+ }
+
+ _patch(data) {
+ if ('topic' in data) {
+ /**
+ * The topic of the stage instance
+ * @type {string}
+ */
+ this.topic = data.topic;
+ }
+
+ if ('participant_count' in data) {
+ /**
+ * The number of users in the stage channel
+ * @type {number}
+ */
+ this.participantCount = data.participant_count;
+ }
+
+ if ('speaker_count' in data) {
+ /**
+ * The number of users speaking in the stage channel
+ * @type {number}
+ */
+ this.speakerCount = data.speaker_count;
+ }
+
+ this.members.clear();
+ for (const rawMember of data.members) {
+ const member = this.guild.members._add(rawMember);
+ this.members.set(member.id, member);
+ }
+ }
+
+ /**
+ * The stage channel this invite is for
+ * @type {?StageChannel}
+ * @readonly
+ */
+ get channel() {
+ return this.client.channels.resolve(this.channelId);
+ }
+
+ /**
+ * The guild of the stage channel this invite is for
+ * @type {?Guild}
+ * @readonly
+ */
+ get guild() {
+ return this.client.guilds.resolve(this.guildId);
+ }
+}
+
+module.exports = InviteStageInstance;
diff --git a/node_modules/discord.js/src/structures/MentionableSelectMenuBuilder.js b/node_modules/discord.js/src/structures/MentionableSelectMenuBuilder.js
new file mode 100644
index 0000000..b22f600
--- /dev/null
+++ b/node_modules/discord.js/src/structures/MentionableSelectMenuBuilder.js
@@ -0,0 +1,32 @@
+'use strict';
+
+const { MentionableSelectMenuBuilder: BuildersMentionableSelectMenu } = require('@discordjs/builders');
+const { isJSONEncodable } = require('@discordjs/util');
+const { toSnakeCase } = require('../util/Transformers');
+
+/**
+ * Class used to build select menu components to be sent through the API
+ * @extends {BuildersMentionableSelectMenu}
+ */
+class MentionableSelectMenuBuilder extends BuildersMentionableSelectMenu {
+ constructor(data = {}) {
+ super(toSnakeCase(data));
+ }
+
+ /**
+ * Creates a new select menu builder from JSON data
+ * @param {MentionableSelectMenuBuilder|MentionableSelectMenuComponent|APIMentionableSelectComponent} other
+ * The other data
+ * @returns {MentionableSelectMenuBuilder}
+ */
+ static from(other) {
+ return new this(isJSONEncodable(other) ? other.toJSON() : other);
+ }
+}
+
+module.exports = MentionableSelectMenuBuilder;
+
+/**
+ * @external BuildersMentionableSelectMenu
+ * @see {@link https://discord.js.org/docs/packages/builders/stable/MentionableSelectMenuBuilder:Class}
+ */
diff --git a/node_modules/discord.js/src/structures/MentionableSelectMenuComponent.js b/node_modules/discord.js/src/structures/MentionableSelectMenuComponent.js
new file mode 100644
index 0000000..d0f75c3
--- /dev/null
+++ b/node_modules/discord.js/src/structures/MentionableSelectMenuComponent.js
@@ -0,0 +1,11 @@
+'use strict';
+
+const BaseSelectMenuComponent = require('./BaseSelectMenuComponent');
+
+/**
+ * Represents a mentionable select menu component
+ * @extends {BaseSelectMenuComponent}
+ */
+class MentionableSelectMenuComponent extends BaseSelectMenuComponent {}
+
+module.exports = MentionableSelectMenuComponent;
diff --git a/node_modules/discord.js/src/structures/MentionableSelectMenuInteraction.js b/node_modules/discord.js/src/structures/MentionableSelectMenuInteraction.js
new file mode 100644
index 0000000..416d5ce
--- /dev/null
+++ b/node_modules/discord.js/src/structures/MentionableSelectMenuInteraction.js
@@ -0,0 +1,71 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const MessageComponentInteraction = require('./MessageComponentInteraction');
+const Events = require('../util/Events');
+
+/**
+ * Represents a {@link ComponentType.MentionableSelect} select menu interaction.
+ * @extends {MessageComponentInteraction}
+ */
+class MentionableSelectMenuInteraction extends MessageComponentInteraction {
+ constructor(client, data) {
+ super(client, data);
+ const { resolved, values } = data.data;
+ const { members, users, roles } = resolved ?? {};
+
+ /**
+ * An array of the selected user and role ids
+ * @type {Snowflake[]}
+ */
+ this.values = values ?? [];
+
+ /**
+ * Collection of the selected users
+ * @type {Collection<Snowflake, User>}
+ */
+ this.users = new Collection();
+
+ /**
+ * Collection of the selected users
+ * @type {Collection<Snowflake, GuildMember|APIGuildMember>}
+ */
+ this.members = new Collection();
+
+ /**
+ * Collection of the selected roles
+ * @type {Collection<Snowflake, Role|APIRole>}
+ */
+ this.roles = new Collection();
+
+ if (members) {
+ for (const [id, member] of Object.entries(members)) {
+ const user = users[id];
+ if (!user) {
+ this.client.emit(
+ Events.Debug,
+ `[MentionableSelectMenuInteraction] Received a member without a user, skipping ${id}`,
+ );
+
+ continue;
+ }
+
+ this.members.set(id, this.guild?.members._add({ user, ...member }) ?? { user, ...member });
+ }
+ }
+
+ if (users) {
+ for (const user of Object.values(users)) {
+ this.users.set(user.id, this.client.users._add(user));
+ }
+ }
+
+ if (roles) {
+ for (const role of Object.values(roles)) {
+ this.roles.set(role.id, this.guild?.roles._add(role) ?? role);
+ }
+ }
+ }
+}
+
+module.exports = MentionableSelectMenuInteraction;
diff --git a/node_modules/discord.js/src/structures/Message.js b/node_modules/discord.js/src/structures/Message.js
new file mode 100644
index 0000000..c82c177
--- /dev/null
+++ b/node_modules/discord.js/src/structures/Message.js
@@ -0,0 +1,997 @@
+'use strict';
+
+const { messageLink } = require('@discordjs/builders');
+const { Collection } = require('@discordjs/collection');
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const {
+ InteractionType,
+ ChannelType,
+ MessageType,
+ MessageFlags,
+ PermissionFlagsBits,
+} = require('discord-api-types/v10');
+const Attachment = require('./Attachment');
+const Base = require('./Base');
+const ClientApplication = require('./ClientApplication');
+const Embed = require('./Embed');
+const InteractionCollector = require('./InteractionCollector');
+const Mentions = require('./MessageMentions');
+const MessagePayload = require('./MessagePayload');
+const ReactionCollector = require('./ReactionCollector');
+const { Sticker } = require('./Sticker');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+const ReactionManager = require('../managers/ReactionManager');
+const { createComponent } = require('../util/Components');
+const { NonSystemMessageTypes, MaxBulkDeletableMessageAge, DeletableMessageTypes } = require('../util/Constants');
+const MessageFlagsBitField = require('../util/MessageFlagsBitField');
+const PermissionsBitField = require('../util/PermissionsBitField');
+const { cleanContent, resolvePartialEmoji } = require('../util/Util');
+
+/**
+ * Represents a message on Discord.
+ * @extends {Base}
+ */
+class Message extends Base {
+ constructor(client, data) {
+ super(client);
+
+ /**
+ * The id of the channel the message was sent in
+ * @type {Snowflake}
+ */
+ this.channelId = data.channel_id;
+
+ /**
+ * The id of the guild the message was sent in, if any
+ * @type {?Snowflake}
+ */
+ this.guildId = data.guild_id ?? this.channel?.guild?.id ?? null;
+
+ this._patch(data);
+ }
+
+ _patch(data) {
+ /**
+ * The message's id
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+
+ /**
+ * The timestamp the message was sent at
+ * @type {number}
+ */
+ this.createdTimestamp = DiscordSnowflake.timestampFrom(this.id);
+
+ if ('type' in data) {
+ /**
+ * The type of the message
+ * @type {?MessageType}
+ */
+ this.type = data.type;
+
+ /**
+ * Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)
+ * @type {?boolean}
+ */
+ this.system = !NonSystemMessageTypes.includes(this.type);
+ } else {
+ this.system ??= null;
+ this.type ??= null;
+ }
+
+ if ('content' in data) {
+ /**
+ * The content of the message.
+ * <info>This property requires the {@link GatewayIntentBits.MessageContent} privileged intent
+ * in a guild for messages that do not mention the client.</info>
+ * @type {?string}
+ */
+ this.content = data.content;
+ } else {
+ this.content ??= null;
+ }
+
+ if ('author' in data) {
+ /**
+ * The author of the message
+ * @type {?User}
+ */
+ this.author = this.client.users._add(data.author, !data.webhook_id);
+ } else {
+ this.author ??= null;
+ }
+
+ if ('pinned' in data) {
+ /**
+ * Whether or not this message is pinned
+ * @type {?boolean}
+ */
+ this.pinned = Boolean(data.pinned);
+ } else {
+ this.pinned ??= null;
+ }
+
+ if ('tts' in data) {
+ /**
+ * Whether or not the message was Text-To-Speech
+ * @type {?boolean}
+ */
+ this.tts = data.tts;
+ } else {
+ this.tts ??= null;
+ }
+
+ if ('nonce' in data) {
+ /**
+ * A random number or string used for checking message delivery
+ * <warn>This is only received after the message was sent successfully, and
+ * lost if re-fetched</warn>
+ * @type {?string}
+ */
+ this.nonce = data.nonce;
+ } else {
+ this.nonce ??= null;
+ }
+
+ if ('embeds' in data) {
+ /**
+ * An array of embeds in the message - e.g. YouTube Player.
+ * <info>This property requires the {@link GatewayIntentBits.MessageContent} privileged intent
+ * in a guild for messages that do not mention the client.</info>
+ * @type {Embed[]}
+ */
+ this.embeds = data.embeds.map(e => new Embed(e));
+ } else {
+ this.embeds = this.embeds?.slice() ?? [];
+ }
+
+ if ('components' in data) {
+ /**
+ * An array of of action rows in the message.
+ * <info>This property requires the {@link GatewayIntentBits.MessageContent} privileged intent
+ * in a guild for messages that do not mention the client.</info>
+ * @type {ActionRow[]}
+ */
+ this.components = data.components.map(c => createComponent(c));
+ } else {
+ this.components = this.components?.slice() ?? [];
+ }
+
+ if ('attachments' in data) {
+ /**
+ * A collection of attachments in the message - e.g. Pictures - mapped by their ids.
+ * <info>This property requires the {@link GatewayIntentBits.MessageContent} privileged intent
+ * in a guild for messages that do not mention the client.</info>
+ * @type {Collection<Snowflake, Attachment>}
+ */
+ this.attachments = new Collection();
+ if (data.attachments) {
+ for (const attachment of data.attachments) {
+ this.attachments.set(attachment.id, new Attachment(attachment));
+ }
+ }
+ } else {
+ this.attachments = new Collection(this.attachments);
+ }
+
+ if ('sticker_items' in data || 'stickers' in data) {
+ /**
+ * A collection of stickers in the message
+ * @type {Collection<Snowflake, Sticker>}
+ */
+ this.stickers = new Collection(
+ (data.sticker_items ?? data.stickers)?.map(s => [s.id, new Sticker(this.client, s)]),
+ );
+ } else {
+ this.stickers = new Collection(this.stickers);
+ }
+
+ if ('position' in data) {
+ /**
+ * A generally increasing integer (there may be gaps or duplicates) that represents
+ * the approximate position of the message in a thread.
+ * @type {?number}
+ */
+ this.position = data.position;
+ } else {
+ this.position ??= null;
+ }
+
+ if ('role_subscription_data' in data) {
+ /**
+ * Role subscription data found on {@link MessageType.RoleSubscriptionPurchase} messages.
+ * @typedef {Object} RoleSubscriptionData
+ * @property {Snowflake} roleSubscriptionListingId The id of the SKU and listing the user is subscribed to
+ * @property {string} tierName The name of the tier the user is subscribed to
+ * @property {number} totalMonthsSubscribed The total number of months the user has been subscribed for
+ * @property {boolean} isRenewal Whether this notification is a renewal
+ */
+
+ /**
+ * The data of the role subscription purchase or renewal.
+ * <info>This is present on {@link MessageType.RoleSubscriptionPurchase} messages.</info>
+ * @type {?RoleSubscriptionData}
+ */
+ this.roleSubscriptionData = {
+ roleSubscriptionListingId: data.role_subscription_data.role_subscription_listing_id,
+ tierName: data.role_subscription_data.tier_name,
+ totalMonthsSubscribed: data.role_subscription_data.total_months_subscribed,
+ isRenewal: data.role_subscription_data.is_renewal,
+ };
+ } else {
+ this.roleSubscriptionData ??= null;
+ }
+
+ // Discord sends null if the message has not been edited
+ if (data.edited_timestamp) {
+ /**
+ * The timestamp the message was last edited at (if applicable)
+ * @type {?number}
+ */
+ this.editedTimestamp = Date.parse(data.edited_timestamp);
+ } else {
+ this.editedTimestamp ??= null;
+ }
+
+ if ('reactions' in data) {
+ /**
+ * A manager of the reactions belonging to this message
+ * @type {ReactionManager}
+ */
+ this.reactions = new ReactionManager(this);
+ if (data.reactions?.length > 0) {
+ for (const reaction of data.reactions) {
+ this.reactions._add(reaction);
+ }
+ }
+ } else {
+ this.reactions ??= new ReactionManager(this);
+ }
+
+ if (!this.mentions) {
+ /**
+ * All valid mentions that the message contains
+ * @type {MessageMentions}
+ */
+ this.mentions = new Mentions(
+ this,
+ data.mentions,
+ data.mention_roles,
+ data.mention_everyone,
+ data.mention_channels,
+ data.referenced_message?.author,
+ );
+ } else {
+ this.mentions = new Mentions(
+ this,
+ data.mentions ?? this.mentions.users,
+ data.mention_roles ?? this.mentions.roles,
+ data.mention_everyone ?? this.mentions.everyone,
+ data.mention_channels ?? this.mentions.crosspostedChannels,
+ data.referenced_message?.author ?? this.mentions.repliedUser,
+ );
+ }
+
+ if ('webhook_id' in data) {
+ /**
+ * The id of the webhook that sent the message, if applicable
+ * @type {?Snowflake}
+ */
+ this.webhookId = data.webhook_id;
+ } else {
+ this.webhookId ??= null;
+ }
+
+ if ('application' in data) {
+ /**
+ * Supplemental application information for group activities
+ * @type {?ClientApplication}
+ */
+ this.groupActivityApplication = new ClientApplication(this.client, data.application);
+ } else {
+ this.groupActivityApplication ??= null;
+ }
+
+ if ('application_id' in data) {
+ /**
+ * The id of the application of the interaction that sent this message, if any
+ * @type {?Snowflake}
+ */
+ this.applicationId = data.application_id;
+ } else {
+ this.applicationId ??= null;
+ }
+
+ if ('activity' in data) {
+ /**
+ * Group activity
+ * @type {?MessageActivity}
+ */
+ this.activity = {
+ partyId: data.activity.party_id,
+ type: data.activity.type,
+ };
+ } else {
+ this.activity ??= null;
+ }
+
+ if ('thread' in data) {
+ this.client.channels._add(data.thread, this.guild);
+ }
+
+ if (this.member && data.member) {
+ this.member._patch(data.member);
+ } else if (data.member && this.guild && this.author) {
+ this.guild.members._add(Object.assign(data.member, { user: this.author }));
+ }
+
+ if ('flags' in data) {
+ /**
+ * Flags that are applied to the message
+ * @type {Readonly<MessageFlagsBitField>}
+ */
+ this.flags = new MessageFlagsBitField(data.flags).freeze();
+ } else {
+ this.flags = new MessageFlagsBitField(this.flags).freeze();
+ }
+
+ /**
+ * Reference data sent in a message that contains ids identifying the referenced message.
+ * This can be present in the following types of message:
+ * * Crossposted messages (`MessageFlags.Crossposted`)
+ * * {@link MessageType.ChannelFollowAdd}
+ * * {@link MessageType.ChannelPinnedMessage}
+ * * {@link MessageType.Reply}
+ * * {@link MessageType.ThreadStarterMessage}
+ * @see {@link https://discord.com/developers/docs/resources/channel#message-types}
+ * @typedef {Object} MessageReference
+ * @property {Snowflake} channelId The channel's id the message was referenced
+ * @property {?Snowflake} guildId The guild's id the message was referenced
+ * @property {?Snowflake} messageId The message's id that was referenced
+ */
+
+ if ('message_reference' in data) {
+ /**
+ * Message reference data
+ * @type {?MessageReference}
+ */
+ this.reference = {
+ channelId: data.message_reference.channel_id,
+ guildId: data.message_reference.guild_id,
+ messageId: data.message_reference.message_id,
+ };
+ } else {
+ this.reference ??= null;
+ }
+
+ if (data.referenced_message) {
+ this.channel?.messages._add({ guild_id: data.message_reference?.guild_id, ...data.referenced_message });
+ }
+
+ /**
+ * Partial data of the interaction that a message is a reply to
+ * @typedef {Object} MessageInteraction
+ * @property {Snowflake} id The interaction's id
+ * @property {InteractionType} type The type of the interaction
+ * @property {string} commandName The name of the interaction's application command,
+ * as well as the subcommand and subcommand group, where applicable
+ * @property {User} user The user that invoked the interaction
+ */
+
+ if (data.interaction) {
+ /**
+ * Partial data of the interaction that this message is a reply to
+ * @type {?MessageInteraction}
+ */
+ this.interaction = {
+ id: data.interaction.id,
+ type: data.interaction.type,
+ commandName: data.interaction.name,
+ user: this.client.users._add(data.interaction.user),
+ };
+ } else {
+ this.interaction ??= null;
+ }
+ }
+
+ /**
+ * The channel that the message was sent in
+ * @type {TextBasedChannels}
+ * @readonly
+ */
+ get channel() {
+ return this.client.channels.resolve(this.channelId);
+ }
+
+ /**
+ * Whether or not this message is a partial
+ * @type {boolean}
+ * @readonly
+ */
+ get partial() {
+ return typeof this.content !== 'string' || !this.author;
+ }
+
+ /**
+ * Represents the author of the message as a guild member.
+ * Only available if the message comes from a guild where the author is still a member
+ * @type {?GuildMember}
+ * @readonly
+ */
+ get member() {
+ return this.guild?.members.resolve(this.author) ?? null;
+ }
+
+ /**
+ * The time the message was sent at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ /**
+ * The time the message was last edited at (if applicable)
+ * @type {?Date}
+ * @readonly
+ */
+ get editedAt() {
+ return this.editedTimestamp && new Date(this.editedTimestamp);
+ }
+
+ /**
+ * The guild the message was sent in (if in a guild channel)
+ * @type {?Guild}
+ * @readonly
+ */
+ get guild() {
+ return this.client.guilds.resolve(this.guildId) ?? this.channel?.guild ?? null;
+ }
+
+ /**
+ * Whether this message has a thread associated with it
+ * @type {boolean}
+ * @readonly
+ */
+ get hasThread() {
+ return this.flags.has(MessageFlags.HasThread);
+ }
+
+ /**
+ * The thread started by this message
+ * <info>This property is not suitable for checking whether a message has a thread,
+ * use {@link Message#hasThread} instead.</info>
+ * @type {?ThreadChannel}
+ * @readonly
+ */
+ get thread() {
+ return this.channel?.threads?.resolve(this.id) ?? null;
+ }
+
+ /**
+ * The URL to jump to this message
+ * @type {string}
+ * @readonly
+ */
+ get url() {
+ return this.inGuild() ? messageLink(this.channelId, this.id, this.guildId) : messageLink(this.channelId, this.id);
+ }
+
+ /**
+ * The message contents with all mentions replaced by the equivalent text.
+ * If mentions cannot be resolved to a name, the relevant mention in the message content will not be converted.
+ * @type {?string}
+ * @readonly
+ */
+ get cleanContent() {
+ // eslint-disable-next-line eqeqeq
+ return this.content != null ? cleanContent(this.content, this.channel) : null;
+ }
+
+ /**
+ * Creates a reaction collector.
+ * @param {ReactionCollectorOptions} [options={}] Options to send to the collector
+ * @returns {ReactionCollector}
+ * @example
+ * // Create a reaction collector
+ * const filter = (reaction, user) => reaction.emoji.name === '👌' && user.id === 'someId';
+ * const collector = message.createReactionCollector({ filter, time: 15_000 });
+ * collector.on('collect', r => console.log(`Collected ${r.emoji.name}`));
+ * collector.on('end', collected => console.log(`Collected ${collected.size} items`));
+ */
+ createReactionCollector(options = {}) {
+ return new ReactionCollector(this, options);
+ }
+
+ /**
+ * An object containing the same properties as CollectorOptions, but a few more:
+ * @typedef {ReactionCollectorOptions} AwaitReactionsOptions
+ * @property {string[]} [errors] Stop/end reasons that cause the promise to reject
+ */
+
+ /**
+ * Similar to createReactionCollector but in promise form.
+ * Resolves with a collection of reactions that pass the specified filter.
+ * @param {AwaitReactionsOptions} [options={}] Optional options to pass to the internal collector
+ * @returns {Promise<Collection<string | Snowflake, MessageReaction>>}
+ * @example
+ * // Create a reaction collector
+ * const filter = (reaction, user) => reaction.emoji.name === '👌' && user.id === 'someId'
+ * message.awaitReactions({ filter, time: 15_000 })
+ * .then(collected => console.log(`Collected ${collected.size} reactions`))
+ * .catch(console.error);
+ */
+ awaitReactions(options = {}) {
+ return new Promise((resolve, reject) => {
+ const collector = this.createReactionCollector(options);
+ collector.once('end', (reactions, reason) => {
+ if (options.errors?.includes(reason)) reject(reactions);
+ else resolve(reactions);
+ });
+ });
+ }
+
+ /**
+ * @typedef {CollectorOptions} MessageComponentCollectorOptions
+ * @property {ComponentType} [componentType] The type of component to listen for
+ * @property {number} [max] The maximum total amount of interactions to collect
+ * @property {number} [maxComponents] The maximum number of components to collect
+ * @property {number} [maxUsers] The maximum number of users to interact
+ */
+
+ /**
+ * Creates a message component interaction collector.
+ * @param {MessageComponentCollectorOptions} [options={}] Options to send to the collector
+ * @returns {InteractionCollector}
+ * @example
+ * // Create a message component interaction collector
+ * const filter = (interaction) => interaction.customId === 'button' && interaction.user.id === 'someId';
+ * const collector = message.createMessageComponentCollector({ filter, time: 15_000 });
+ * collector.on('collect', i => console.log(`Collected ${i.customId}`));
+ * collector.on('end', collected => console.log(`Collected ${collected.size} items`));
+ */
+ createMessageComponentCollector(options = {}) {
+ return new InteractionCollector(this.client, {
+ ...options,
+ interactionType: InteractionType.MessageComponent,
+ message: this,
+ });
+ }
+
+ /**
+ * An object containing the same properties as CollectorOptions, but a few more:
+ * @typedef {Object} AwaitMessageComponentOptions
+ * @property {CollectorFilter} [filter] The filter applied to this collector
+ * @property {number} [time] Time to wait for an interaction before rejecting
+ * @property {ComponentType} [componentType] The type of component interaction to collect
+ * @property {number} [idle] Time to wait without another message component interaction before ending the collector
+ * @property {boolean} [dispose] Whether to remove the message component interaction after collecting
+ * @property {InteractionResponse} [interactionResponse] The interaction response to collect interactions from
+ */
+
+ /**
+ * Collects a single component interaction that passes the filter.
+ * The Promise will reject if the time expires.
+ * @param {AwaitMessageComponentOptions} [options={}] Options to pass to the internal collector
+ * @returns {Promise<MessageComponentInteraction>}
+ * @example
+ * // Collect a message component interaction
+ * const filter = (interaction) => interaction.customId === 'button' && interaction.user.id === 'someId';
+ * message.awaitMessageComponent({ filter, time: 15_000 })
+ * .then(interaction => console.log(`${interaction.customId} was clicked!`))
+ * .catch(console.error);
+ */
+ awaitMessageComponent(options = {}) {
+ const _options = { ...options, max: 1 };
+ return new Promise((resolve, reject) => {
+ const collector = this.createMessageComponentCollector(_options);
+ collector.once('end', (interactions, reason) => {
+ const interaction = interactions.first();
+ if (interaction) resolve(interaction);
+ else reject(new DiscordjsError(ErrorCodes.InteractionCollectorError, reason));
+ });
+ });
+ }
+
+ /**
+ * Whether the message is editable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get editable() {
+ const precheck = Boolean(this.author.id === this.client.user.id && (!this.guild || this.channel?.viewable));
+
+ // Regardless of permissions thread messages cannot be edited if
+ // the thread is archived or the thread is locked and the bot does not have permission to manage threads.
+ if (this.channel?.isThread()) {
+ if (this.channel.archived) return false;
+ if (this.channel.locked) {
+ const permissions = this.channel.permissionsFor(this.client.user);
+ if (!permissions?.has(PermissionFlagsBits.ManageThreads, true)) return false;
+ }
+ }
+
+ return precheck;
+ }
+
+ /**
+ * Whether the message is deletable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get deletable() {
+ if (!DeletableMessageTypes.includes(this.type)) return false;
+
+ if (!this.guild) {
+ return this.author.id === this.client.user.id;
+ }
+ // DMChannel does not have viewable property, so check viewable after proved that message is on a guild.
+ if (!this.channel?.viewable) {
+ return false;
+ }
+
+ const permissions = this.channel?.permissionsFor(this.client.user);
+ if (!permissions) return false;
+ // This flag allows deleting even if timed out
+ if (permissions.has(PermissionFlagsBits.Administrator, false)) return true;
+
+ // The auto moderation action message author is the reference message author
+ return (
+ (this.type !== MessageType.AutoModerationAction && this.author.id === this.client.user.id) ||
+ (permissions.has(PermissionFlagsBits.ManageMessages, false) && !this.guild.members.me.isCommunicationDisabled())
+ );
+ }
+
+ /**
+ * Whether the message is bulk deletable by the client user
+ * @type {boolean}
+ * @readonly
+ * @example
+ * // Filter for bulk deletable messages
+ * channel.bulkDelete(messages.filter(message => message.bulkDeletable));
+ */
+ get bulkDeletable() {
+ return (
+ (this.inGuild() &&
+ Date.now() - this.createdTimestamp < MaxBulkDeletableMessageAge &&
+ this.deletable &&
+ this.channel?.permissionsFor(this.client.user).has(PermissionFlagsBits.ManageMessages, false)) ??
+ false
+ );
+ }
+
+ /**
+ * Whether the message is pinnable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get pinnable() {
+ const { channel } = this;
+ return Boolean(
+ !this.system &&
+ (!this.guild ||
+ (channel?.viewable &&
+ channel?.permissionsFor(this.client.user)?.has(PermissionFlagsBits.ManageMessages, false))),
+ );
+ }
+
+ /**
+ * Fetches the Message this crosspost/reply/pin-add references, if available to the client
+ * @returns {Promise<Message>}
+ */
+ async fetchReference() {
+ if (!this.reference) throw new DiscordjsError(ErrorCodes.MessageReferenceMissing);
+ const { channelId, messageId } = this.reference;
+ const channel = this.client.channels.resolve(channelId);
+ if (!channel) throw new DiscordjsError(ErrorCodes.GuildChannelResolve);
+ const message = await channel.messages.fetch(messageId);
+ return message;
+ }
+
+ /**
+ * Whether the message is crosspostable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get crosspostable() {
+ const bitfield =
+ PermissionFlagsBits.SendMessages |
+ (this.author.id === this.client.user.id ? PermissionsBitField.DefaultBit : PermissionFlagsBits.ManageMessages);
+ const { channel } = this;
+ return Boolean(
+ channel?.type === ChannelType.GuildAnnouncement &&
+ !this.flags.has(MessageFlags.Crossposted) &&
+ this.type === MessageType.Default &&
+ channel.viewable &&
+ channel.permissionsFor(this.client.user)?.has(bitfield, false),
+ );
+ }
+
+ /**
+ * Edits the content of the message.
+ * @param {string|MessagePayload|MessageEditOptions} options The options to provide
+ * @returns {Promise<Message>}
+ * @example
+ * // Update the content of a message
+ * message.edit('This is my new content!')
+ * .then(msg => console.log(`Updated the content of a message to ${msg.content}`))
+ * .catch(console.error);
+ */
+ edit(options) {
+ if (!this.channel) return Promise.reject(new DiscordjsError(ErrorCodes.ChannelNotCached));
+ return this.channel.messages.edit(this, options);
+ }
+
+ /**
+ * Publishes a message in an announcement channel to all channels following it.
+ * @returns {Promise<Message>}
+ * @example
+ * // Crosspost a message
+ * if (message.channel.type === ChannelType.GuildAnnouncement) {
+ * message.crosspost()
+ * .then(() => console.log('Crossposted message'))
+ * .catch(console.error);
+ * }
+ */
+ crosspost() {
+ if (!this.channel) return Promise.reject(new DiscordjsError(ErrorCodes.ChannelNotCached));
+ return this.channel.messages.crosspost(this.id);
+ }
+
+ /**
+ * Pins this message to the channel's pinned messages.
+ * @param {string} [reason] Reason for pinning
+ * @returns {Promise<Message>}
+ * @example
+ * // Pin a message
+ * message.pin()
+ * .then(console.log)
+ * .catch(console.error)
+ */
+ async pin(reason) {
+ if (!this.channel) throw new DiscordjsError(ErrorCodes.ChannelNotCached);
+ await this.channel.messages.pin(this.id, reason);
+ return this;
+ }
+
+ /**
+ * Unpins this message from the channel's pinned messages.
+ * @param {string} [reason] Reason for unpinning
+ * @returns {Promise<Message>}
+ * @example
+ * // Unpin a message
+ * message.unpin()
+ * .then(console.log)
+ * .catch(console.error)
+ */
+ async unpin(reason) {
+ if (!this.channel) throw new DiscordjsError(ErrorCodes.ChannelNotCached);
+ await this.channel.messages.unpin(this.id, reason);
+ return this;
+ }
+
+ /**
+ * Adds a reaction to the message.
+ * @param {EmojiIdentifierResolvable} emoji The emoji to react with
+ * @returns {Promise<MessageReaction>}
+ * @example
+ * // React to a message with a unicode emoji
+ * message.react('🤔')
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // React to a message with a custom emoji
+ * message.react(message.guild.emojis.cache.get('123456789012345678'))
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async react(emoji) {
+ if (!this.channel) throw new DiscordjsError(ErrorCodes.ChannelNotCached);
+ await this.channel.messages.react(this.id, emoji);
+
+ return this.client.actions.MessageReactionAdd.handle(
+ {
+ [this.client.actions.injectedUser]: this.client.user,
+ [this.client.actions.injectedChannel]: this.channel,
+ [this.client.actions.injectedMessage]: this,
+ emoji: resolvePartialEmoji(emoji),
+ },
+ true,
+ ).reaction;
+ }
+
+ /**
+ * Deletes the message.
+ * @returns {Promise<Message>}
+ * @example
+ * // Delete a message
+ * message.delete()
+ * .then(msg => console.log(`Deleted message from ${msg.author.username}`))
+ * .catch(console.error);
+ */
+ async delete() {
+ if (!this.channel) throw new DiscordjsError(ErrorCodes.ChannelNotCached);
+ await this.channel.messages.delete(this.id);
+ return this;
+ }
+
+ /**
+ * Options provided when sending a message as an inline reply.
+ * @typedef {BaseMessageCreateOptions} MessageReplyOptions
+ * @property {boolean} [failIfNotExists=this.client.options.failIfNotExists] Whether to error if the referenced
+ * message does not exist (creates a standard message in this case when false)
+ */
+
+ /**
+ * Send an inline reply to this message.
+ * @param {string|MessagePayload|MessageReplyOptions} options The options to provide
+ * @returns {Promise<Message>}
+ * @example
+ * // Reply to a message
+ * message.reply('This is a reply!')
+ * .then(() => console.log(`Replied to message "${message.content}"`))
+ * .catch(console.error);
+ */
+ reply(options) {
+ if (!this.channel) return Promise.reject(new DiscordjsError(ErrorCodes.ChannelNotCached));
+ let data;
+
+ if (options instanceof MessagePayload) {
+ data = options;
+ } else {
+ data = MessagePayload.create(this, options, {
+ reply: {
+ messageReference: this,
+ failIfNotExists: options?.failIfNotExists ?? this.client.options.failIfNotExists,
+ },
+ });
+ }
+ return this.channel.send(data);
+ }
+
+ /**
+ * Options for starting a thread on a message.
+ * @typedef {Object} StartThreadOptions
+ * @property {string} name The name of the new thread
+ * @property {ThreadAutoArchiveDuration} [autoArchiveDuration=this.channel.defaultAutoArchiveDuration] The amount of
+ * time after which the thread should automatically archive in case of no recent activity
+ * @property {string} [reason] Reason for creating the thread
+ * @property {number} [rateLimitPerUser] The rate limit per user (slowmode) for the thread in seconds
+ */
+
+ /**
+ * Create a new public thread from this message
+ * @see GuildTextThreadManager#create
+ * @param {StartThreadOptions} [options] Options for starting a thread on this message
+ * @returns {Promise<ThreadChannel>}
+ */
+ startThread(options = {}) {
+ if (!this.channel) return Promise.reject(new DiscordjsError(ErrorCodes.ChannelNotCached));
+ if (![ChannelType.GuildText, ChannelType.GuildAnnouncement].includes(this.channel.type)) {
+ return Promise.reject(new DiscordjsError(ErrorCodes.MessageThreadParent));
+ }
+ if (this.hasThread) return Promise.reject(new DiscordjsError(ErrorCodes.MessageExistingThread));
+ return this.channel.threads.create({ ...options, startMessage: this });
+ }
+
+ /**
+ * Fetch this message.
+ * @param {boolean} [force=true] Whether to skip the cache check and request the API
+ * @returns {Promise<Message>}
+ */
+ fetch(force = true) {
+ if (!this.channel) return Promise.reject(new DiscordjsError(ErrorCodes.ChannelNotCached));
+ return this.channel.messages.fetch({ message: this.id, force });
+ }
+
+ /**
+ * Fetches the webhook used to create this message.
+ * @returns {Promise<?Webhook>}
+ */
+ fetchWebhook() {
+ if (!this.webhookId) return Promise.reject(new DiscordjsError(ErrorCodes.WebhookMessage));
+ if (this.webhookId === this.applicationId) return Promise.reject(new DiscordjsError(ErrorCodes.WebhookApplication));
+ return this.client.fetchWebhook(this.webhookId);
+ }
+
+ /**
+ * Suppresses or unsuppresses embeds on a message.
+ * @param {boolean} [suppress=true] If the embeds should be suppressed or not
+ * @returns {Promise<Message>}
+ */
+ suppressEmbeds(suppress = true) {
+ const flags = new MessageFlagsBitField(this.flags.bitfield);
+
+ if (suppress) {
+ flags.add(MessageFlags.SuppressEmbeds);
+ } else {
+ flags.remove(MessageFlags.SuppressEmbeds);
+ }
+
+ return this.edit({ flags });
+ }
+
+ /**
+ * Removes the attachments from this message.
+ * @returns {Promise<Message>}
+ */
+ removeAttachments() {
+ return this.edit({ attachments: [] });
+ }
+
+ /**
+ * Resolves a component by a custom id.
+ * @param {string} customId The custom id to resolve against
+ * @returns {?MessageActionRowComponent}
+ */
+ resolveComponent(customId) {
+ return this.components.flatMap(row => row.components).find(component => component.customId === customId) ?? null;
+ }
+
+ /**
+ * Used mainly internally. Whether two messages are identical in properties. If you want to compare messages
+ * without checking all the properties, use `message.id === message2.id`, which is much more efficient. This
+ * method allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.
+ * @param {Message} message The message to compare it to
+ * @param {APIMessage} rawData Raw data passed through the WebSocket about this message
+ * @returns {boolean}
+ */
+ equals(message, rawData) {
+ if (!message) return false;
+ const embedUpdate = !message.author && !message.attachments;
+ if (embedUpdate) return this.id === message.id && this.embeds.length === message.embeds.length;
+
+ let equal =
+ this.id === message.id &&
+ this.author.id === message.author.id &&
+ this.content === message.content &&
+ this.tts === message.tts &&
+ this.nonce === message.nonce &&
+ this.embeds.length === message.embeds.length &&
+ this.attachments.length === message.attachments.length;
+
+ if (equal && rawData) {
+ equal =
+ this.mentions.everyone === message.mentions.everyone &&
+ this.createdTimestamp === Date.parse(rawData.timestamp) &&
+ this.editedTimestamp === Date.parse(rawData.edited_timestamp);
+ }
+
+ return equal;
+ }
+
+ /**
+ * Whether this message is from a guild.
+ * @returns {boolean}
+ */
+ inGuild() {
+ return Boolean(this.guildId);
+ }
+
+ /**
+ * When concatenated with a string, this automatically concatenates the message's content instead of the object.
+ * @returns {string}
+ * @example
+ * // Logs: Message: This is a message!
+ * console.log(`Message: ${message}`);
+ */
+ toString() {
+ return this.content;
+ }
+
+ toJSON() {
+ return super.toJSON({
+ channel: 'channelId',
+ author: 'authorId',
+ groupActivityApplication: 'groupActivityApplicationId',
+ guild: 'guildId',
+ cleanContent: true,
+ member: false,
+ reactions: false,
+ });
+ }
+}
+
+exports.Message = Message;
diff --git a/node_modules/discord.js/src/structures/MessageCollector.js b/node_modules/discord.js/src/structures/MessageCollector.js
new file mode 100644
index 0000000..7101965
--- /dev/null
+++ b/node_modules/discord.js/src/structures/MessageCollector.js
@@ -0,0 +1,146 @@
+'use strict';
+
+const Collector = require('./interfaces/Collector');
+const Events = require('../util/Events');
+
+/**
+ * @typedef {CollectorOptions} MessageCollectorOptions
+ * @property {number} max The maximum amount of messages to collect
+ * @property {number} maxProcessed The maximum amount of messages to process
+ */
+
+/**
+ * Collects messages on a channel.
+ * Will automatically stop if the channel ({@link Client#event:channelDelete channelDelete}),
+ * thread ({@link Client#event:threadDelete threadDelete}), or
+ * guild ({@link Client#event:guildDelete guildDelete}) is deleted.
+ * @extends {Collector}
+ */
+class MessageCollector extends Collector {
+ /**
+ * @param {TextBasedChannels} channel The channel
+ * @param {MessageCollectorOptions} options The options to be applied to this collector
+ * @emits MessageCollector#message
+ */
+ constructor(channel, options = {}) {
+ super(channel.client, options);
+
+ /**
+ * The channel
+ * @type {TextBasedChannels}
+ */
+ this.channel = channel;
+
+ /**
+ * Total number of messages that were received in the channel during message collection
+ * @type {number}
+ */
+ this.received = 0;
+
+ const bulkDeleteListener = messages => {
+ for (const message of messages.values()) this.handleDispose(message);
+ };
+
+ this._handleChannelDeletion = this._handleChannelDeletion.bind(this);
+ this._handleThreadDeletion = this._handleThreadDeletion.bind(this);
+ this._handleGuildDeletion = this._handleGuildDeletion.bind(this);
+
+ this.client.incrementMaxListeners();
+ this.client.on(Events.MessageCreate, this.handleCollect);
+ this.client.on(Events.MessageDelete, this.handleDispose);
+ this.client.on(Events.MessageBulkDelete, bulkDeleteListener);
+ this.client.on(Events.ChannelDelete, this._handleChannelDeletion);
+ this.client.on(Events.ThreadDelete, this._handleThreadDeletion);
+ this.client.on(Events.GuildDelete, this._handleGuildDeletion);
+
+ this.once('end', () => {
+ this.client.removeListener(Events.MessageCreate, this.handleCollect);
+ this.client.removeListener(Events.MessageDelete, this.handleDispose);
+ this.client.removeListener(Events.MessageBulkDelete, bulkDeleteListener);
+ this.client.removeListener(Events.ChannelDelete, this._handleChannelDeletion);
+ this.client.removeListener(Events.ThreadDelete, this._handleThreadDeletion);
+ this.client.removeListener(Events.GuildDelete, this._handleGuildDeletion);
+ this.client.decrementMaxListeners();
+ });
+ }
+
+ /**
+ * Handles a message for possible collection.
+ * @param {Message} message The message that could be collected
+ * @returns {?Snowflake}
+ * @private
+ */
+ collect(message) {
+ /**
+ * Emitted whenever a message is collected.
+ * @event MessageCollector#collect
+ * @param {Message} message The message that was collected
+ */
+ if (message.channelId !== this.channel.id) return null;
+ this.received++;
+ return message.id;
+ }
+
+ /**
+ * Handles a message for possible disposal.
+ * @param {Message} message The message that could be disposed of
+ * @returns {?Snowflake}
+ */
+ dispose(message) {
+ /**
+ * Emitted whenever a message is disposed of.
+ * @event MessageCollector#dispose
+ * @param {Message} message The message that was disposed of
+ */
+ return message.channelId === this.channel.id ? message.id : null;
+ }
+
+ /**
+ * The reason this collector has ended with, or null if it hasn't ended yet
+ * @type {?string}
+ * @readonly
+ */
+ get endReason() {
+ if (this.options.max && this.collected.size >= this.options.max) return 'limit';
+ if (this.options.maxProcessed && this.received === this.options.maxProcessed) return 'processedLimit';
+ return super.endReason;
+ }
+
+ /**
+ * Handles checking if the channel has been deleted, and if so, stops the collector with the reason 'channelDelete'.
+ * @private
+ * @param {GuildChannel} channel The channel that was deleted
+ * @returns {void}
+ */
+ _handleChannelDeletion(channel) {
+ if (channel.id === this.channel.id || channel.id === this.channel.parentId) {
+ this.stop('channelDelete');
+ }
+ }
+
+ /**
+ * Handles checking if the thread has been deleted, and if so, stops the collector with the reason 'threadDelete'.
+ * @private
+ * @param {ThreadChannel} thread The thread that was deleted
+ * @returns {void}
+ */
+ _handleThreadDeletion(thread) {
+ if (thread.id === this.channel.id) {
+ this.stop('threadDelete');
+ }
+ }
+
+ /**
+ * Handles checking if the guild has been deleted, and if so, stops the collector with the reason 'guildDelete'.
+ * @private
+ * @param {Guild} guild The guild that was deleted
+ * @returns {void}
+ */
+ _handleGuildDeletion(guild) {
+ if (guild.id === this.channel.guild?.id) {
+ this.stop('guildDelete');
+ }
+ }
+}
+
+module.exports = MessageCollector;
diff --git a/node_modules/discord.js/src/structures/MessageComponentInteraction.js b/node_modules/discord.js/src/structures/MessageComponentInteraction.js
new file mode 100644
index 0000000..47b31e0
--- /dev/null
+++ b/node_modules/discord.js/src/structures/MessageComponentInteraction.js
@@ -0,0 +1,107 @@
+'use strict';
+
+const { lazy } = require('@discordjs/util');
+const BaseInteraction = require('./BaseInteraction');
+const InteractionWebhook = require('./InteractionWebhook');
+const InteractionResponses = require('./interfaces/InteractionResponses');
+
+const getMessage = lazy(() => require('./Message').Message);
+
+/**
+ * Represents a message component interaction.
+ * @extends {BaseInteraction}
+ * @implements {InteractionResponses}
+ */
+class MessageComponentInteraction extends BaseInteraction {
+ constructor(client, data) {
+ super(client, data);
+
+ /**
+ * The id of the channel this interaction was sent in
+ * @type {Snowflake}
+ * @name MessageComponentInteraction#channelId
+ */
+
+ /**
+ * The message to which the component was attached
+ * @type {Message}
+ */
+ this.message = this.channel?.messages._add(data.message) ?? new (getMessage())(client, data.message);
+
+ /**
+ * The custom id of the component which was interacted with
+ * @type {string}
+ */
+ this.customId = data.data.custom_id;
+
+ /**
+ * The type of component which was interacted with
+ * @type {ComponentType}
+ */
+ this.componentType = data.data.component_type;
+
+ /**
+ * Whether the reply to this interaction has been deferred
+ * @type {boolean}
+ */
+ this.deferred = false;
+
+ /**
+ * Whether the reply to this interaction is ephemeral
+ * @type {?boolean}
+ */
+ this.ephemeral = null;
+
+ /**
+ * Whether this interaction has already been replied to
+ * @type {boolean}
+ */
+ this.replied = false;
+
+ /**
+ * An associated interaction webhook, can be used to further interact with this interaction
+ * @type {InteractionWebhook}
+ */
+ this.webhook = new InteractionWebhook(this.client, this.applicationId, this.token);
+ }
+
+ /**
+ * Components that can be placed in an action row for messages.
+ * * ButtonComponent
+ * * StringSelectMenuComponent
+ * * UserSelectMenuComponent
+ * * RoleSelectMenuComponent
+ * * MentionableSelectMenuComponent
+ * * ChannelSelectMenuComponent
+ * @typedef {ButtonComponent|StringSelectMenuComponent|UserSelectMenuComponent|
+ * RoleSelectMenuComponent|MentionableSelectMenuComponent|ChannelSelectMenuComponent} MessageActionRowComponent
+ */
+
+ /**
+ * The component which was interacted with
+ * @type {MessageActionRowComponent|APIMessageActionRowComponent}
+ * @readonly
+ */
+ get component() {
+ return this.message.components
+ .flatMap(row => row.components)
+ .find(component => (component.customId ?? component.custom_id) === this.customId);
+ }
+
+ // These are here only for documentation purposes - they are implemented by InteractionResponses
+ /* eslint-disable no-empty-function */
+ deferReply() {}
+ reply() {}
+ fetchReply() {}
+ editReply() {}
+ deleteReply() {}
+ followUp() {}
+ deferUpdate() {}
+ update() {}
+ showModal() {}
+ awaitModalSubmit() {}
+}
+
+InteractionResponses.applyToClass(MessageComponentInteraction);
+
+module.exports = MessageComponentInteraction;
diff --git a/node_modules/discord.js/src/structures/MessageContextMenuCommandInteraction.js b/node_modules/discord.js/src/structures/MessageContextMenuCommandInteraction.js
new file mode 100644
index 0000000..1100591
--- /dev/null
+++ b/node_modules/discord.js/src/structures/MessageContextMenuCommandInteraction.js
@@ -0,0 +1,20 @@
+'use strict';
+
+const ContextMenuCommandInteraction = require('./ContextMenuCommandInteraction');
+
+/**
+ * Represents a message context menu interaction.
+ * @extends {ContextMenuCommandInteraction}
+ */
+class MessageContextMenuCommandInteraction extends ContextMenuCommandInteraction {
+ /**
+ * The message this interaction was sent from
+ * @type {Message|APIMessage}
+ * @readonly
+ */
+ get targetMessage() {
+ return this.options.getMessage('message');
+ }
+}
+
+module.exports = MessageContextMenuCommandInteraction;
diff --git a/node_modules/discord.js/src/structures/MessageMentions.js b/node_modules/discord.js/src/structures/MessageMentions.js
new file mode 100644
index 0000000..a07e77f
--- /dev/null
+++ b/node_modules/discord.js/src/structures/MessageMentions.js
@@ -0,0 +1,297 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { FormattingPatterns } = require('discord-api-types/v10');
+const { flatten } = require('../util/Util');
+
+/**
+ * Keeps track of mentions in a {@link Message}.
+ */
+class MessageMentions {
+ /**
+ * A regular expression that matches `@everyone` and `@here`.
+ * The `mention` group property is present on the `exec` result of this expression.
+ * @type {RegExp}
+ * @memberof MessageMentions
+ */
+ static EveryonePattern = /@(?<mention>everyone|here)/;
+
+ /**
+ * A regular expression that matches user mentions like `<@81440962496172032>`.
+ * The `id` group property is present on the `exec` result of this expression.
+ * @type {RegExp}
+ * @memberof MessageMentions
+ */
+ static UsersPattern = FormattingPatterns.UserWithOptionalNickname;
+
+ /**
+ * A regular expression that matches role mentions like `<@&297577916114403338>`.
+ * The `id` group property is present on the `exec` result of this expression.
+ * @type {RegExp}
+ * @memberof MessageMentions
+ */
+ static RolesPattern = FormattingPatterns.Role;
+
+ /**
+ * A regular expression that matches channel mentions like `<#222079895583457280>`.
+ * The `id` group property is present on the `exec` result of this expression.
+ * @type {RegExp}
+ * @memberof MessageMentions
+ */
+ static ChannelsPattern = FormattingPatterns.Channel;
+
+ /**
+ * A global regular expression variant of {@link MessageMentions.ChannelsPattern}.
+ * @type {RegExp}
+ * @memberof MessageMentions
+ * @private
+ */
+ static GlobalChannelsPattern = new RegExp(this.ChannelsPattern.source, 'g');
+
+ /**
+ * A global regular expression variant of {@link MessageMentions.UsersPattern}.
+ * @type {RegExp}
+ * @memberof MessageMentions
+ * @private
+ */
+ static GlobalUsersPattern = new RegExp(this.UsersPattern.source, 'g');
+
+ constructor(message, users, roles, everyone, crosspostedChannels, repliedUser) {
+ /**
+ * The client the message is from
+ * @type {Client}
+ * @readonly
+ */
+ Object.defineProperty(this, 'client', { value: message.client });
+
+ /**
+ * The guild the message is in
+ * @type {?Guild}
+ * @readonly
+ */
+ Object.defineProperty(this, 'guild', { value: message.guild });
+
+ /**
+ * The initial message content
+ * @type {string}
+ * @readonly
+ * @private
+ */
+ Object.defineProperty(this, '_content', { value: message.content });
+
+ /**
+ * Whether `@everyone` or `@here` were mentioned
+ * @type {boolean}
+ */
+ this.everyone = Boolean(everyone);
+
+ if (users) {
+ if (users instanceof Collection) {
+ /**
+ * Any users that were mentioned
+ * <info>Order as received from the API, not as they appear in the message content</info>
+ * @type {Collection<Snowflake, User>}
+ */
+ this.users = new Collection(users);
+ } else {
+ this.users = new Collection();
+ for (const mention of users) {
+ if (mention.member && message.guild) {
+ message.guild.members._add(Object.assign(mention.member, { user: mention }));
+ }
+ const user = message.client.users._add(mention);
+ this.users.set(user.id, user);
+ }
+ }
+ } else {
+ this.users = new Collection();
+ }
+
+ if (roles instanceof Collection) {
+ /**
+ * Any roles that were mentioned
+ * <info>Order as received from the API, not as they appear in the message content</info>
+ * @type {Collection<Snowflake, Role>}
+ */
+ this.roles = new Collection(roles);
+ } else if (roles) {
+ this.roles = new Collection();
+ const guild = message.guild;
+ if (guild) {
+ for (const mention of roles) {
+ const role = guild.roles.cache.get(mention);
+ if (role) this.roles.set(role.id, role);
+ }
+ }
+ } else {
+ this.roles = new Collection();
+ }
+
+ /**
+ * Cached members for {@link MessageMentions#members}
+ * @type {?Collection<Snowflake, GuildMember>}
+ * @private
+ */
+ this._members = null;
+
+ /**
+ * Cached channels for {@link MessageMentions#channels}
+ * @type {?Collection<Snowflake, BaseChannel>}
+ * @private
+ */
+ this._channels = null;
+
+ /**
+ * Cached users for {@link MessageMentions#parsedUsers}
+ * @type {?Collection<Snowflake, User>}
+ * @private
+ */
+ this._parsedUsers = null;
+
+ /**
+ * Crossposted channel data.
+ * @typedef {Object} CrosspostedChannel
+ * @property {Snowflake} channelId The mentioned channel's id
+ * @property {Snowflake} guildId The id of the guild that has the channel
+ * @property {ChannelType} type The channel's type
+ * @property {string} name The channel's name
+ */
+
+ if (crosspostedChannels) {
+ if (crosspostedChannels instanceof Collection) {
+ /**
+ * A collection of crossposted channels
+ * <info>Order as received from the API, not as they appear in the message content</info>
+ * @type {Collection<Snowflake, CrosspostedChannel>}
+ */
+ this.crosspostedChannels = new Collection(crosspostedChannels);
+ } else {
+ this.crosspostedChannels = new Collection();
+ for (const d of crosspostedChannels) {
+ this.crosspostedChannels.set(d.id, {
+ channelId: d.id,
+ guildId: d.guild_id,
+ type: d.type,
+ name: d.name,
+ });
+ }
+ }
+ } else {
+ this.crosspostedChannels = new Collection();
+ }
+
+ /**
+ * The author of the message that this message is a reply to
+ * @type {?User}
+ */
+ this.repliedUser = repliedUser ? this.client.users._add(repliedUser) : null;
+ }
+
+ /**
+ * Any members that were mentioned (only in {@link Guild}s)
+ * <info>Order as received from the API, not as they appear in the message content</info>
+ * @type {?Collection<Snowflake, GuildMember>}
+ * @readonly
+ */
+ get members() {
+ if (this._members) return this._members;
+ if (!this.guild) return null;
+ this._members = new Collection();
+ this.users.forEach(user => {
+ const member = this.guild.members.resolve(user);
+ if (member) this._members.set(member.user.id, member);
+ });
+ return this._members;
+ }
+
+ /**
+ * Any channels that were mentioned
+ * <info>Order as they appear first in the message content</info>
+ * @type {Collection<Snowflake, BaseChannel>}
+ * @readonly
+ */
+ get channels() {
+ if (this._channels) return this._channels;
+ this._channels = new Collection();
+ let matches;
+
+ while ((matches = this.constructor.GlobalChannelsPattern.exec(this._content)) !== null) {
+ const channel = this.client.channels.cache.get(matches.groups.id);
+ if (channel) this._channels.set(channel.id, channel);
+ }
+
+ return this._channels;
+ }
+
+ /**
+ * Any user mentions that were included in the message content
+ * <info>Order as they appear first in the message content</info>
+ * @type {Collection<Snowflake, User>}
+ * @readonly
+ */
+ get parsedUsers() {
+ if (this._parsedUsers) return this._parsedUsers;
+ this._parsedUsers = new Collection();
+ let matches;
+ while ((matches = this.constructor.GlobalUsersPattern.exec(this._content)) !== null) {
+ const user = this.client.users.cache.get(matches[1]);
+ if (user) this._parsedUsers.set(user.id, user);
+ }
+ return this._parsedUsers;
+ }
+
+ /**
+ * Options used to check for a mention.
+ * @typedef {Object} MessageMentionsHasOptions
+ * @property {boolean} [ignoreDirect=false] Whether to ignore direct mentions to the item
+ * @property {boolean} [ignoreRoles=false] Whether to ignore role mentions to a guild member
+ * @property {boolean} [ignoreRepliedUser=false] Whether to ignore replied user mention to an user
+ * @property {boolean} [ignoreEveryone=false] Whether to ignore `@everyone`/`@here` mentions
+ */
+
+ /**
+ * Checks if a user, guild member, thread member, role, or channel is mentioned.
+ * Takes into account user mentions, role mentions, channel mentions,
+ * replied user mention, and `@everyone`/`@here` mentions.
+ * @param {UserResolvable|RoleResolvable|ChannelResolvable} data The User/Role/Channel to check for
+ * @param {MessageMentionsHasOptions} [options] The options for the check
+ * @returns {boolean}
+ */
+ has(data, { ignoreDirect = false, ignoreRoles = false, ignoreRepliedUser = false, ignoreEveryone = false } = {}) {
+ const user = this.client.users.resolve(data);
+
+ if (!ignoreEveryone && user && this.everyone) return true;
+
+ const userWasRepliedTo = user && this.repliedUser?.id === user.id;
+
+ if (!ignoreRepliedUser && userWasRepliedTo && this.users.has(user.id)) return true;
+
+ if (!ignoreDirect) {
+ if (user && (!ignoreRepliedUser || this.parsedUsers.has(user.id)) && this.users.has(user.id)) return true;
+
+ const role = this.guild?.roles.resolve(data);
+ if (role && this.roles.has(role.id)) return true;
+
+ const channel = this.client.channels.resolve(data);
+ if (channel && this.channels.has(channel.id)) return true;
+ }
+
+ if (!ignoreRoles) {
+ const member = this.guild?.members.resolve(data);
+ if (member) {
+ for (const mentionedRole of this.roles.values()) if (member.roles.cache.has(mentionedRole.id)) return true;
+ }
+ }
+
+ return false;
+ }
+
+ toJSON() {
+ return flatten(this, {
+ members: true,
+ channels: true,
+ });
+ }
+}
+
+module.exports = MessageMentions;
diff --git a/node_modules/discord.js/src/structures/MessagePayload.js b/node_modules/discord.js/src/structures/MessagePayload.js
new file mode 100644
index 0000000..e237309
--- /dev/null
+++ b/node_modules/discord.js/src/structures/MessagePayload.js
@@ -0,0 +1,299 @@
+'use strict';
+
+const { Buffer } = require('node:buffer');
+const { lazy, isJSONEncodable } = require('@discordjs/util');
+const { MessageFlags } = require('discord-api-types/v10');
+const ActionRowBuilder = require('./ActionRowBuilder');
+const { DiscordjsRangeError, ErrorCodes } = require('../errors');
+const DataResolver = require('../util/DataResolver');
+const MessageFlagsBitField = require('../util/MessageFlagsBitField');
+const { basename, verifyString } = require('../util/Util');
+
+const getBaseInteraction = lazy(() => require('./BaseInteraction'));
+
+/**
+ * Represents a message to be sent to the API.
+ */
+class MessagePayload {
+ /**
+ * @param {MessageTarget} target The target for this message to be sent to
+ * @param {MessagePayloadOption} options The payload of this message
+ */
+ constructor(target, options) {
+ /**
+ * The target for this message to be sent to
+ * @type {MessageTarget}
+ */
+ this.target = target;
+
+ /**
+ * The payload of this message.
+ * @type {MessagePayloadOption}
+ */
+ this.options = options;
+
+ /**
+ * Body sendable to the API
+ * @type {?APIMessage}
+ */
+ this.body = null;
+
+ /**
+ * Files sendable to the API
+ * @type {?RawFile[]}
+ */
+ this.files = null;
+ }
+
+ /**
+ * Whether or not the target is a {@link Webhook} or a {@link WebhookClient}
+ * @type {boolean}
+ * @readonly
+ */
+ get isWebhook() {
+ const Webhook = require('./Webhook');
+ const WebhookClient = require('../client/WebhookClient');
+ return this.target instanceof Webhook || this.target instanceof WebhookClient;
+ }
+
+ /**
+ * Whether or not the target is a {@link User}
+ * @type {boolean}
+ * @readonly
+ */
+ get isUser() {
+ const User = require('./User');
+ const { GuildMember } = require('./GuildMember');
+ return this.target instanceof User || this.target instanceof GuildMember;
+ }
+
+ /**
+ * Whether or not the target is a {@link Message}
+ * @type {boolean}
+ * @readonly
+ */
+ get isMessage() {
+ const { Message } = require('./Message');
+ return this.target instanceof Message;
+ }
+
+ /**
+ * Whether or not the target is a {@link MessageManager}
+ * @type {boolean}
+ * @readonly
+ */
+ get isMessageManager() {
+ const MessageManager = require('../managers/MessageManager');
+ return this.target instanceof MessageManager;
+ }
+
+ /**
+ * Whether or not the target is an {@link BaseInteraction} or an {@link InteractionWebhook}
+ * @type {boolean}
+ * @readonly
+ */
+ get isInteraction() {
+ const BaseInteraction = getBaseInteraction();
+ const InteractionWebhook = require('./InteractionWebhook');
+ return this.target instanceof BaseInteraction || this.target instanceof InteractionWebhook;
+ }
+
+ /**
+ * Makes the content of this message.
+ * @returns {?string}
+ */
+ makeContent() {
+ let content;
+ if (this.options.content === null) {
+ content = '';
+ } else if (this.options.content !== undefined) {
+ content = verifyString(this.options.content, DiscordjsRangeError, ErrorCodes.MessageContentType, true);
+ }
+
+ return content;
+ }
+
+ /**
+ * Resolves the body.
+ * @returns {MessagePayload}
+ */
+ resolveBody() {
+ if (this.body) return this;
+ const isInteraction = this.isInteraction;
+ const isWebhook = this.isWebhook;
+
+ const content = this.makeContent();
+ const tts = Boolean(this.options.tts);
+
+ let nonce;
+ if (this.options.nonce !== undefined) {
+ nonce = this.options.nonce;
+ if (typeof nonce === 'number' ? !Number.isInteger(nonce) : typeof nonce !== 'string') {
+ throw new DiscordjsRangeError(ErrorCodes.MessageNonceType);
+ }
+ }
+
+ const components = this.options.components?.map(c => (isJSONEncodable(c) ? c : new ActionRowBuilder(c)).toJSON());
+
+ let username;
+ let avatarURL;
+ let threadName;
+ if (isWebhook) {
+ username = this.options.username ?? this.target.name;
+ if (this.options.avatarURL) avatarURL = this.options.avatarURL;
+ if (this.options.threadName) threadName = this.options.threadName;
+ }
+
+ let flags;
+ if (
+ this.options.flags !== undefined ||
+ (this.isMessage && this.options.reply === undefined) ||
+ this.isMessageManager
+ ) {
+ flags =
+ // eslint-disable-next-line eqeqeq
+ this.options.flags != null
+ ? new MessageFlagsBitField(this.options.flags).bitfield
+ : this.target.flags?.bitfield;
+ }
+
+ if (isInteraction && this.options.ephemeral) {
+ flags |= MessageFlags.Ephemeral;
+ }
+
+ let allowedMentions =
+ this.options.allowedMentions === undefined
+ ? this.target.client.options.allowedMentions
+ : this.options.allowedMentions;
+
+ if (allowedMentions?.repliedUser !== undefined) {
+ allowedMentions = { ...allowedMentions, replied_user: allowedMentions.repliedUser };
+ delete allowedMentions.repliedUser;
+ }
+
+ let message_reference;
+ if (typeof this.options.reply === 'object') {
+ const reference = this.options.reply.messageReference;
+ const message_id = this.isMessage ? reference.id ?? reference : this.target.messages.resolveId(reference);
+ if (message_id) {
+ message_reference = {
+ message_id,
+ fail_if_not_exists: this.options.reply.failIfNotExists ?? this.target.client.options.failIfNotExists,
+ };
+ }
+ }
+
+ const attachments = this.options.files?.map((file, index) => ({
+ id: index.toString(),
+ description: file.description,
+ }));
+ if (Array.isArray(this.options.attachments)) {
+ this.options.attachments.push(...(attachments ?? []));
+ } else {
+ this.options.attachments = attachments;
+ }
+
+ this.body = {
+ content,
+ tts,
+ nonce,
+ embeds: this.options.embeds?.map(embed =>
+ isJSONEncodable(embed) ? embed.toJSON() : this.target.client.options.jsonTransformer(embed),
+ ),
+ components,
+ username,
+ avatar_url: avatarURL,
+ allowed_mentions: content === undefined && message_reference === undefined ? undefined : allowedMentions,
+ flags,
+ message_reference,
+ attachments: this.options.attachments,
+ sticker_ids: this.options.stickers?.map(sticker => sticker.id ?? sticker),
+ thread_name: threadName,
+ };
+ return this;
+ }
+
+ /**
+ * Resolves files.
+ * @returns {Promise<MessagePayload>}
+ */
+ async resolveFiles() {
+ if (this.files) return this;
+
+ this.files = await Promise.all(this.options.files?.map(file => this.constructor.resolveFile(file)) ?? []);
+ return this;
+ }
+
+ /**
+ * Resolves a single file into an object sendable to the API.
+ * @param {AttachmentPayload|BufferResolvable|Stream} fileLike Something that could be resolved to a file
+ * @returns {Promise<RawFile>}
+ */
+ static async resolveFile(fileLike) {
+ let attachment;
+ let name;
+
+ const findName = thing => {
+ if (typeof thing === 'string') {
+ return basename(thing);
+ }
+
+ if (thing.path) {
+ return basename(thing.path);
+ }
+
+ return 'file.jpg';
+ };
+
+ const ownAttachment =
+ typeof fileLike === 'string' || fileLike instanceof Buffer || typeof fileLike.pipe === 'function';
+ if (ownAttachment) {
+ attachment = fileLike;
+ name = findName(attachment);
+ } else {
+ attachment = fileLike.attachment;
+ name = fileLike.name ?? findName(attachment);
+ }
+
+ const { data, contentType } = await DataResolver.resolveFile(attachment);
+ return { data, name, contentType };
+ }
+
+ /**
+ * Creates a {@link MessagePayload} from user-level arguments.
+ * @param {MessageTarget} target Target to send to
+ * @param {string|MessagePayloadOption} options Options or content to use
+ * @param {MessagePayloadOption} [extra={}] Extra options to add onto specified options
+ * @returns {MessagePayload}
+ */
+ static create(target, options, extra = {}) {
+ return new this(
+ target,
+ typeof options !== 'object' || options === null ? { content: options, ...extra } : { ...options, ...extra },
+ );
+ }
+}
+
+module.exports = MessagePayload;
+
+/**
+ * A target for a message.
+ * @typedef {TextBasedChannels|User|GuildMember|Webhook|WebhookClient|BaseInteraction|InteractionWebhook|
+ * Message|MessageManager} MessageTarget
+ */
+
+/**
+ * A possible payload option.
+ * @typedef {MessageCreateOptions|MessageEditOptions|WebhookMessageCreateOptions|WebhookMessageEditOptions|
+ * InteractionReplyOptions|InteractionUpdateOptions} MessagePayloadOption
+ */
+
+/**
+ * @external APIMessage
+ * @see {@link https://discord.com/developers/docs/resources/channel#message-object}
+ */
+
+/**
+ * @external RawFile
+ * @see {@link https://discord.js.org/docs/packages/rest/stable/RawFile:Interface}
+ */
diff --git a/node_modules/discord.js/src/structures/MessageReaction.js b/node_modules/discord.js/src/structures/MessageReaction.js
new file mode 100644
index 0000000..43f05e3
--- /dev/null
+++ b/node_modules/discord.js/src/structures/MessageReaction.js
@@ -0,0 +1,142 @@
+'use strict';
+
+const { Routes } = require('discord-api-types/v10');
+const GuildEmoji = require('./GuildEmoji');
+const ReactionEmoji = require('./ReactionEmoji');
+const ReactionUserManager = require('../managers/ReactionUserManager');
+const { flatten } = require('../util/Util');
+
+/**
+ * Represents a reaction to a message.
+ */
+class MessageReaction {
+ constructor(client, data, message) {
+ /**
+ * The client that instantiated this message reaction
+ * @name MessageReaction#client
+ * @type {Client}
+ * @readonly
+ */
+ Object.defineProperty(this, 'client', { value: client });
+
+ /**
+ * The message that this reaction refers to
+ * @type {Message}
+ */
+ this.message = message;
+
+ /**
+ * Whether the client has given this reaction
+ * @type {boolean}
+ */
+ this.me = data.me;
+
+ /**
+ * A manager of the users that have given this reaction
+ * @type {ReactionUserManager}
+ */
+ this.users = new ReactionUserManager(this, this.me ? [client.user] : []);
+
+ this._emoji = new ReactionEmoji(this, data.emoji);
+
+ this._patch(data);
+ }
+
+ _patch(data) {
+ if ('count' in data) {
+ /**
+ * The number of people that have given the same reaction
+ * @type {?number}
+ */
+ this.count ??= data.count;
+ }
+ }
+
+ /**
+ * Makes the client user react with this reaction
+ * @returns {Promise<MessageReaction>}
+ */
+ react() {
+ return this.message.react(this.emoji);
+ }
+
+ /**
+ * Removes all users from this reaction.
+ * @returns {Promise<MessageReaction>}
+ */
+ async remove() {
+ await this.client.rest.delete(
+ Routes.channelMessageReaction(this.message.channelId, this.message.id, this._emoji.identifier),
+ );
+ return this;
+ }
+
+ /**
+ * The emoji of this reaction. Either a {@link GuildEmoji} object for known custom emojis, or a {@link ReactionEmoji}
+ * object which has fewer properties. Whatever the prototype of the emoji, it will still have
+ * `name`, `id`, `identifier` and `toString()`
+ * @type {GuildEmoji|ReactionEmoji}
+ * @readonly
+ */
+ get emoji() {
+ if (this._emoji instanceof GuildEmoji) return this._emoji;
+ // Check to see if the emoji has become known to the client
+ if (this._emoji.id) {
+ const emojis = this.message.client.emojis.cache;
+ if (emojis.has(this._emoji.id)) {
+ const emoji = emojis.get(this._emoji.id);
+ this._emoji = emoji;
+ return emoji;
+ }
+ }
+ return this._emoji;
+ }
+
+ /**
+ * Whether or not this reaction is a partial
+ * @type {boolean}
+ * @readonly
+ */
+ get partial() {
+ return this.count === null;
+ }
+
+ /**
+ * Fetch this reaction.
+ * @returns {Promise<MessageReaction>}
+ */
+ async fetch() {
+ const message = await this.message.fetch();
+ const existing = message.reactions.cache.get(this.emoji.id ?? this.emoji.name);
+ // The reaction won't get set when it has been completely removed
+ this._patch(existing ?? { count: 0 });
+ return this;
+ }
+
+ toJSON() {
+ return flatten(this, { emoji: 'emojiId', message: 'messageId' });
+ }
+
+ valueOf() {
+ return this._emoji.id ?? this._emoji.name;
+ }
+
+ _add(user) {
+ if (this.partial) return;
+ this.users.cache.set(user.id, user);
+ if (!this.me || user.id !== this.message.client.user.id || this.count === 0) this.count++;
+ this.me ||= user.id === this.message.client.user.id;
+ }
+
+ _remove(user) {
+ if (this.partial) return;
+ this.users.cache.delete(user.id);
+ if (!this.me || user.id !== this.message.client.user.id) this.count--;
+ if (user.id === this.message.client.user.id) this.me = false;
+ if (this.count <= 0 && this.users.cache.size === 0) {
+ this.message.reactions.cache.delete(this.emoji.id ?? this.emoji.name);
+ }
+ }
+}
+
+module.exports = MessageReaction;
diff --git a/node_modules/discord.js/src/structures/ModalBuilder.js b/node_modules/discord.js/src/structures/ModalBuilder.js
new file mode 100644
index 0000000..535b4a5
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ModalBuilder.js
@@ -0,0 +1,34 @@
+'use strict';
+
+const { ModalBuilder: BuildersModal, ComponentBuilder } = require('@discordjs/builders');
+const { isJSONEncodable } = require('@discordjs/util');
+const { toSnakeCase } = require('../util/Transformers');
+
+/**
+ * Represents a modal builder.
+ * @extends {BuildersModal}
+ */
+class ModalBuilder extends BuildersModal {
+ constructor({ components, ...data } = {}) {
+ super({
+ ...toSnakeCase(data),
+ components: components?.map(c => (c instanceof ComponentBuilder ? c : toSnakeCase(c))),
+ });
+ }
+
+ /**
+ * Creates a new modal builder from JSON data
+ * @param {ModalBuilder|APIModalComponent} other The other data
+ * @returns {ModalBuilder}
+ */
+ static from(other) {
+ return new this(isJSONEncodable(other) ? other.toJSON() : other);
+ }
+}
+
+module.exports = ModalBuilder;
+
+/**
+ * @external BuildersModal
+ * @see {@link https://discord.js.org/docs/packages/builders/stable/ModalBuilder:Class}
+ */
diff --git a/node_modules/discord.js/src/structures/ModalSubmitFields.js b/node_modules/discord.js/src/structures/ModalSubmitFields.js
new file mode 100644
index 0000000..8e67b21
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ModalSubmitFields.js
@@ -0,0 +1,55 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { ComponentType } = require('discord-api-types/v10');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+
+/**
+ * Represents the serialized fields from a modal submit interaction
+ */
+class ModalSubmitFields {
+ constructor(components) {
+ /**
+ * The components within the modal
+ * @type {ActionRowModalData[]}
+ */
+ this.components = components;
+
+ /**
+ * The extracted fields from the modal
+ * @type {Collection<string, ModalData>}
+ */
+ this.fields = components.reduce((accumulator, next) => {
+ next.components.forEach(c => accumulator.set(c.customId, c));
+ return accumulator;
+ }, new Collection());
+ }
+
+ /**
+ * Gets a field given a custom id from a component
+ * @param {string} customId The custom id of the component
+ * @param {ComponentType} [type] The type of the component
+ * @returns {ModalData}
+ */
+ getField(customId, type) {
+ const field = this.fields.get(customId);
+ if (!field) throw new DiscordjsTypeError(ErrorCodes.ModalSubmitInteractionFieldNotFound, customId);
+
+ if (type !== undefined && type !== field.type) {
+ throw new DiscordjsTypeError(ErrorCodes.ModalSubmitInteractionFieldType, customId, field.type, type);
+ }
+
+ return field;
+ }
+
+ /**
+ * Gets the value of a text input component given a custom id
+ * @param {string} customId The custom id of the text input component
+ * @returns {string}
+ */
+ getTextInputValue(customId) {
+ return this.getField(customId, ComponentType.TextInput).value;
+ }
+}
+
+module.exports = ModalSubmitFields;
diff --git a/node_modules/discord.js/src/structures/ModalSubmitInteraction.js b/node_modules/discord.js/src/structures/ModalSubmitInteraction.js
new file mode 100644
index 0000000..8f0ccf1
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ModalSubmitInteraction.js
@@ -0,0 +1,122 @@
+'use strict';
+
+const { lazy } = require('@discordjs/util');
+const BaseInteraction = require('./BaseInteraction');
+const InteractionWebhook = require('./InteractionWebhook');
+const ModalSubmitFields = require('./ModalSubmitFields');
+const InteractionResponses = require('./interfaces/InteractionResponses');
+
+const getMessage = lazy(() => require('./Message').Message);
+
+/**
+ * @typedef {Object} ModalData
+ * @property {string} value The value of the field
+ * @property {ComponentType} type The component type of the field
+ * @property {string} customId The custom id of the field
+ */
+
+/**
+ * @typedef {Object} ActionRowModalData
+ * @property {ModalData[]} components The components of this action row
+ * @property {ComponentType} type The component type of the action row
+ */
+
+/**
+ * Represents a modal interaction
+ * @extends {BaseInteraction}
+ * @implements {InteractionResponses}
+ */
+class ModalSubmitInteraction extends BaseInteraction {
+ constructor(client, data) {
+ super(client, data);
+ /**
+ * The custom id of the modal.
+ * @type {string}
+ */
+ this.customId = data.data.custom_id;
+
+ if ('message' in data) {
+ /**
+ * The message associated with this interaction
+ * @type {?Message}
+ */
+ this.message = this.channel?.messages._add(data.message) ?? new (getMessage())(this.client, data.message);
+ } else {
+ this.message = null;
+ }
+
+ /**
+ * The components within the modal
+ * @type {ActionRowModalData[]}
+ */
+ this.components = data.data.components?.map(c => ModalSubmitInteraction.transformComponent(c));
+
+ /**
+ * The fields within the modal
+ * @type {ModalSubmitFields}
+ */
+ this.fields = new ModalSubmitFields(this.components);
+
+ /**
+ * Whether the reply to this interaction has been deferred
+ * @type {boolean}
+ */
+ this.deferred = false;
+
+ /**
+ * Whether this interaction has already been replied to
+ * @type {boolean}
+ */
+ this.replied = false;
+
+ /**
+ * Whether the reply to this interaction is ephemeral
+ * @type {?boolean}
+ */
+ this.ephemeral = null;
+
+ /**
+ * An associated interaction webhook, can be used to further interact with this interaction
+ * @type {InteractionWebhook}
+ */
+ this.webhook = new InteractionWebhook(this.client, this.applicationId, this.token);
+ }
+
+ /**
+ * Transforms component data to discord.js-compatible data
+ * @param {*} rawComponent The data to transform
+ * @returns {ModalData[]}
+ */
+ static transformComponent(rawComponent) {
+ return rawComponent.components
+ ? { type: rawComponent.type, components: rawComponent.components.map(c => this.transformComponent(c)) }
+ : {
+ value: rawComponent.value,
+ type: rawComponent.type,
+ customId: rawComponent.custom_id,
+ };
+ }
+
+ /**
+ * Whether this is from a {@link MessageComponentInteraction}.
+ * @returns {boolean}
+ */
+ isFromMessage() {
+ return Boolean(this.message);
+ }
+
+ // These are here only for documentation purposes - they are implemented by InteractionResponses
+ /* eslint-disable no-empty-function */
+ deferReply() {}
+ reply() {}
+ fetchReply() {}
+ editReply() {}
+ deleteReply() {}
+ followUp() {}
+ deferUpdate() {}
+ update() {}
+}
+
+InteractionResponses.applyToClass(ModalSubmitInteraction, 'showModal');
+
+module.exports = ModalSubmitInteraction;
diff --git a/node_modules/discord.js/src/structures/NewsChannel.js b/node_modules/discord.js/src/structures/NewsChannel.js
new file mode 100644
index 0000000..3f5aff3
--- /dev/null
+++ b/node_modules/discord.js/src/structures/NewsChannel.js
@@ -0,0 +1,32 @@
+'use strict';
+
+const { Routes } = require('discord-api-types/v10');
+const BaseGuildTextChannel = require('./BaseGuildTextChannel');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+
+/**
+ * Represents a guild news channel on Discord.
+ * @extends {BaseGuildTextChannel}
+ */
+class NewsChannel extends BaseGuildTextChannel {
+ /**
+ * Adds the target to this channel's followers.
+ * @param {TextChannelResolvable} channel The channel where the webhook should be created
+ * @param {string} [reason] Reason for creating the webhook
+ * @returns {Promise<NewsChannel>}
+ * @example
+ * if (channel.type === ChannelType.GuildAnnouncement) {
+ * channel.addFollower('222197033908436994', 'Important announcements')
+ * .then(() => console.log('Added follower'))
+ * .catch(console.error);
+ * }
+ */
+ async addFollower(channel, reason) {
+ const channelId = this.guild.channels.resolveId(channel);
+ if (!channelId) throw new DiscordjsError(ErrorCodes.GuildChannelResolve);
+ await this.client.rest.post(Routes.channelFollowers(this.id), { body: { webhook_channel_id: channelId }, reason });
+ return this;
+ }
+}
+
+module.exports = NewsChannel;
diff --git a/node_modules/discord.js/src/structures/OAuth2Guild.js b/node_modules/discord.js/src/structures/OAuth2Guild.js
new file mode 100644
index 0000000..d5104ac
--- /dev/null
+++ b/node_modules/discord.js/src/structures/OAuth2Guild.js
@@ -0,0 +1,28 @@
+'use strict';
+
+const BaseGuild = require('./BaseGuild');
+const PermissionsBitField = require('../util/PermissionsBitField');
+
+/**
+ * A partial guild received when using {@link GuildManager#fetch} to fetch multiple guilds.
+ * @extends {BaseGuild}
+ */
+class OAuth2Guild extends BaseGuild {
+ constructor(client, data) {
+ super(client, data);
+
+ /**
+ * Whether the client user is the owner of the guild
+ * @type {boolean}
+ */
+ this.owner = data.owner;
+
+ /**
+ * The permissions that the client user has in this guild
+ * @type {Readonly<PermissionsBitField>}
+ */
+ this.permissions = new PermissionsBitField(BigInt(data.permissions)).freeze();
+ }
+}
+
+module.exports = OAuth2Guild;
diff --git a/node_modules/discord.js/src/structures/PartialGroupDMChannel.js b/node_modules/discord.js/src/structures/PartialGroupDMChannel.js
new file mode 100644
index 0000000..ecbb878
--- /dev/null
+++ b/node_modules/discord.js/src/structures/PartialGroupDMChannel.js
@@ -0,0 +1,60 @@
+'use strict';
+
+const { BaseChannel } = require('./BaseChannel');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+
+/**
+ * Represents a Partial Group DM Channel on Discord.
+ * @extends {BaseChannel}
+ */
+class PartialGroupDMChannel extends BaseChannel {
+ constructor(client, data) {
+ super(client, data);
+
+ // No flags are present when fetching partial group DM channels.
+ this.flags = null;
+
+ /**
+ * The name of this Group DM Channel
+ * @type {?string}
+ */
+ this.name = data.name;
+
+ /**
+ * The hash of the channel icon
+ * @type {?string}
+ */
+ this.icon = data.icon;
+
+ /**
+ * Recipient data received in a {@link PartialGroupDMChannel}.
+ * @typedef {Object} PartialRecipient
+ * @property {string} username The username of the recipient
+ */
+
+ /**
+ * The recipients of this Group DM Channel.
+ * @type {PartialRecipient[]}
+ */
+ this.recipients = data.recipients;
+ }
+
+ /**
+ * The URL to this channel's icon.
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ iconURL(options = {}) {
+ return this.icon && this.client.rest.cdn.channelIcon(this.id, this.icon, options);
+ }
+
+ delete() {
+ return Promise.reject(new DiscordjsError(ErrorCodes.DeleteGroupDMChannel));
+ }
+
+ fetch() {
+ return Promise.reject(new DiscordjsError(ErrorCodes.FetchGroupDMChannel));
+ }
+}
+
+module.exports = PartialGroupDMChannel;
diff --git a/node_modules/discord.js/src/structures/PermissionOverwrites.js b/node_modules/discord.js/src/structures/PermissionOverwrites.js
new file mode 100644
index 0000000..2cdc827
--- /dev/null
+++ b/node_modules/discord.js/src/structures/PermissionOverwrites.js
@@ -0,0 +1,196 @@
+'use strict';
+
+const { OverwriteType } = require('discord-api-types/v10');
+const Base = require('./Base');
+const { Role } = require('./Role');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+const PermissionsBitField = require('../util/PermissionsBitField');
+
+/**
+ * Represents a permission overwrite for a role or member in a guild channel.
+ * @extends {Base}
+ */
+class PermissionOverwrites extends Base {
+ constructor(client, data, channel) {
+ super(client);
+
+ /**
+ * The GuildChannel this overwrite is for
+ * @name PermissionOverwrites#channel
+ * @type {GuildChannel}
+ * @readonly
+ */
+ Object.defineProperty(this, 'channel', { value: channel });
+
+ if (data) this._patch(data);
+ }
+
+ _patch(data) {
+ /**
+ * The overwrite's id, either a {@link User} or a {@link Role} id
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+
+ if ('type' in data) {
+ /**
+ * The type of this overwrite
+ * @type {OverwriteType}
+ */
+ this.type = data.type;
+ }
+
+ if ('deny' in data) {
+ /**
+ * The permissions that are denied for the user or role.
+ * @type {Readonly<PermissionsBitField>}
+ */
+ this.deny = new PermissionsBitField(BigInt(data.deny)).freeze();
+ }
+
+ if ('allow' in data) {
+ /**
+ * The permissions that are allowed for the user or role.
+ * @type {Readonly<PermissionsBitField>}
+ */
+ this.allow = new PermissionsBitField(BigInt(data.allow)).freeze();
+ }
+ }
+
+ /**
+ * Edits this Permission Overwrite.
+ * @param {PermissionOverwriteOptions} options The options for the update
+ * @param {string} [reason] Reason for creating/editing this overwrite
+ * @returns {Promise<PermissionOverwrites>}
+ * @example
+ * // Update permission overwrites
+ * permissionOverwrites.edit({
+ * SendMessages: false
+ * })
+ * .then(channel => console.log(channel.permissionOverwrites.get(message.author.id)))
+ * .catch(console.error);
+ */
+ async edit(options, reason) {
+ await this.channel.permissionOverwrites.upsert(this.id, options, { type: this.type, reason }, this);
+ return this;
+ }
+
+ /**
+ * Deletes this Permission Overwrite.
+ * @param {string} [reason] Reason for deleting this overwrite
+ * @returns {Promise<PermissionOverwrites>}
+ */
+ async delete(reason) {
+ await this.channel.permissionOverwrites.delete(this.id, reason);
+ return this;
+ }
+
+ toJSON() {
+ return {
+ id: this.id,
+ type: this.type,
+ allow: this.allow,
+ deny: this.deny,
+ };
+ }
+
+ /**
+ * An object mapping permission flags to `true` (enabled), `null` (unset) or `false` (disabled).
+ * ```js
+ * {
+ * 'SendMessages': true,
+ * 'EmbedLinks': null,
+ * 'AttachFiles': false,
+ * }
+ * ```
+ * @typedef {Object} PermissionOverwriteOptions
+ */
+
+ /**
+ * @typedef {Object} ResolvedOverwriteOptions
+ * @property {PermissionsBitField} allow The allowed permissions
+ * @property {PermissionsBitField} deny The denied permissions
+ */
+
+ /**
+ * Resolves bitfield permissions overwrites from an object.
+ * @param {PermissionOverwriteOptions} options The options for the update
+ * @param {ResolvedOverwriteOptions} initialPermissions The initial permissions
+ * @returns {ResolvedOverwriteOptions}
+ */
+ static resolveOverwriteOptions(options, { allow, deny } = {}) {
+ allow = new PermissionsBitField(allow);
+ deny = new PermissionsBitField(deny);
+
+ for (const [perm, value] of Object.entries(options)) {
+ if (value === true) {
+ allow.add(perm);
+ deny.remove(perm);
+ } else if (value === false) {
+ allow.remove(perm);
+ deny.add(perm);
+ } else if (value === null) {
+ allow.remove(perm);
+ deny.remove(perm);
+ }
+ }
+
+ return { allow, deny };
+ }
+
+ /**
+ * The raw data for a permission overwrite
+ * @typedef {Object} RawOverwriteData
+ * @property {Snowflake} id The id of the {@link Role} or {@link User} this overwrite belongs to
+ * @property {string} allow The permissions to allow
+ * @property {string} deny The permissions to deny
+ * @property {number} type The type of this OverwriteData
+ */
+
+ /**
+ * Data that can be resolved into {@link RawOverwriteData}. This can be:
+ * * PermissionOverwrites
+ * * OverwriteData
+ * @typedef {PermissionOverwrites|OverwriteData} OverwriteResolvable
+ */
+
+ /**
+ * Data that can be used for a permission overwrite
+ * @typedef {Object} OverwriteData
+ * @property {GuildMemberResolvable|RoleResolvable} id Member or role this overwrite is for
+ * @property {PermissionResolvable} [allow] The permissions to allow
+ * @property {PermissionResolvable} [deny] The permissions to deny
+ * @property {OverwriteType} [type] The type of this OverwriteData
+ */
+
+ /**
+ * Resolves an overwrite into {@link RawOverwriteData}.
+ * @param {OverwriteResolvable} overwrite The overwrite-like data to resolve
+ * @param {Guild} [guild] The guild to resolve from
+ * @returns {RawOverwriteData}
+ */
+ static resolve(overwrite, guild) {
+ if (overwrite instanceof this) return overwrite.toJSON();
+ if (typeof overwrite.id === 'string' && overwrite.type in OverwriteType) {
+ return {
+ id: overwrite.id,
+ type: overwrite.type,
+ allow: PermissionsBitField.resolve(overwrite.allow ?? PermissionsBitField.DefaultBit).toString(),
+ deny: PermissionsBitField.resolve(overwrite.deny ?? PermissionsBitField.DefaultBit).toString(),
+ };
+ }
+
+ const userOrRole = guild.roles.resolve(overwrite.id) ?? guild.client.users.resolve(overwrite.id);
+ if (!userOrRole) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'parameter', 'User nor a Role');
+ const type = userOrRole instanceof Role ? OverwriteType.Role : OverwriteType.Member;
+
+ return {
+ id: userOrRole.id,
+ type,
+ allow: PermissionsBitField.resolve(overwrite.allow ?? PermissionsBitField.DefaultBit).toString(),
+ deny: PermissionsBitField.resolve(overwrite.deny ?? PermissionsBitField.DefaultBit).toString(),
+ };
+ }
+}
+
+module.exports = PermissionOverwrites;
diff --git a/node_modules/discord.js/src/structures/Presence.js b/node_modules/discord.js/src/structures/Presence.js
new file mode 100644
index 0000000..79ecb29
--- /dev/null
+++ b/node_modules/discord.js/src/structures/Presence.js
@@ -0,0 +1,378 @@
+'use strict';
+
+const Base = require('./Base');
+const { Emoji } = require('./Emoji');
+const ActivityFlagsBitField = require('../util/ActivityFlagsBitField');
+const { flatten } = require('../util/Util');
+
+/**
+ * Activity sent in a message.
+ * @typedef {Object} MessageActivity
+ * @property {string} [partyId] Id of the party represented in activity
+ * @property {MessageActivityType} type Type of activity sent
+ */
+
+/**
+ * The status of this presence:
+ * * **`online`** - user is online
+ * * **`idle`** - user is AFK
+ * * **`offline`** - user is offline or invisible
+ * * **`dnd`** - user is in Do Not Disturb
+ * @typedef {string} PresenceStatus
+ */
+
+/**
+ * The status of this presence:
+ * * **`online`** - user is online
+ * * **`idle`** - user is AFK
+ * * **`dnd`** - user is in Do Not Disturb
+ * @typedef {string} ClientPresenceStatus
+ */
+
+/**
+ * Represents a user's presence.
+ * @extends {Base}
+ */
+class Presence extends Base {
+ constructor(client, data = {}) {
+ super(client);
+
+ /**
+ * The presence's user id
+ * @type {Snowflake}
+ */
+ this.userId = data.user.id;
+
+ /**
+ * The guild this presence is in
+ * @type {?Guild}
+ */
+ this.guild = data.guild ?? null;
+
+ this._patch(data);
+ }
+
+ /**
+ * The user of this presence
+ * @type {?User}
+ * @readonly
+ */
+ get user() {
+ return this.client.users.resolve(this.userId);
+ }
+
+ /**
+ * The member of this presence
+ * @type {?GuildMember}
+ * @readonly
+ */
+ get member() {
+ return this.guild.members.resolve(this.userId);
+ }
+
+ _patch(data) {
+ if ('status' in data) {
+ /**
+ * The status of this presence
+ * @type {PresenceStatus}
+ */
+ this.status = data.status;
+ } else {
+ this.status ??= 'offline';
+ }
+
+ if ('activities' in data) {
+ /**
+ * The activities of this presence
+ * @type {Activity[]}
+ */
+ this.activities = data.activities.map(activity => new Activity(this, activity));
+ } else {
+ this.activities ??= [];
+ }
+
+ if ('client_status' in data) {
+ /**
+ * The devices this presence is on
+ * @type {?Object}
+ * @property {?ClientPresenceStatus} web The current presence in the web application
+ * @property {?ClientPresenceStatus} mobile The current presence in the mobile application
+ * @property {?ClientPresenceStatus} desktop The current presence in the desktop application
+ */
+ this.clientStatus = data.client_status;
+ } else {
+ this.clientStatus ??= null;
+ }
+
+ return this;
+ }
+
+ _clone() {
+ const clone = Object.assign(Object.create(this), this);
+ clone.activities = this.activities.map(activity => activity._clone());
+ return clone;
+ }
+
+ /**
+ * Whether this presence is equal to another.
+ * @param {Presence} presence The presence to compare with
+ * @returns {boolean}
+ */
+ equals(presence) {
+ return (
+ this === presence ||
+ (presence &&
+ this.status === presence.status &&
+ this.activities.length === presence.activities.length &&
+ this.activities.every((activity, index) => activity.equals(presence.activities[index])) &&
+ this.clientStatus?.web === presence.clientStatus?.web &&
+ this.clientStatus?.mobile === presence.clientStatus?.mobile &&
+ this.clientStatus?.desktop === presence.clientStatus?.desktop)
+ );
+ }
+
+ toJSON() {
+ return flatten(this);
+ }
+}
+
+/**
+ * Represents an activity that is part of a user's presence.
+ */
+class Activity {
+ constructor(presence, data) {
+ /**
+ * The presence of the Activity
+ * @type {Presence}
+ * @readonly
+ * @name Activity#presence
+ */
+ Object.defineProperty(this, 'presence', { value: presence });
+
+ /**
+ * The activity's name
+ * @type {string}
+ */
+ this.name = data.name;
+
+ /**
+ * The activity status's type
+ * @type {ActivityType}
+ */
+ this.type = data.type;
+
+ /**
+ * If the activity is being streamed, a link to the stream
+ * @type {?string}
+ */
+ this.url = data.url ?? null;
+
+ /**
+ * Details about the activity
+ * @type {?string}
+ */
+ this.details = data.details ?? null;
+
+ /**
+ * State of the activity
+ * @type {?string}
+ */
+ this.state = data.state ?? null;
+
+ /**
+ * The id of the application associated with this activity
+ * @type {?Snowflake}
+ */
+ this.applicationId = data.application_id ?? null;
+
+ /**
+ * Represents timestamps of an activity
+ * @typedef {Object} ActivityTimestamps
+ * @property {?Date} start When the activity started
+ * @property {?Date} end When the activity will end
+ */
+
+ /**
+ * Timestamps for the activity
+ * @type {?ActivityTimestamps}
+ */
+ this.timestamps = data.timestamps
+ ? {
+ start: data.timestamps.start ? new Date(Number(data.timestamps.start)) : null,
+ end: data.timestamps.end ? new Date(Number(data.timestamps.end)) : null,
+ }
+ : null;
+
+ /**
+ * Represents a party of an activity
+ * @typedef {Object} ActivityParty
+ * @property {?string} id The party's id
+ * @property {number[]} size Size of the party as `[current, max]`
+ */
+
+ /**
+ * Party of the activity
+ * @type {?ActivityParty}
+ */
+ this.party = data.party ?? null;
+
+ /**
+ * Assets for rich presence
+ * @type {?RichPresenceAssets}
+ */
+ this.assets = data.assets ? new RichPresenceAssets(this, data.assets) : null;
+
+ /**
+ * Flags that describe the activity
+ * @type {Readonly<ActivityFlagsBitField>}
+ */
+ this.flags = new ActivityFlagsBitField(data.flags).freeze();
+
+ /**
+ * Emoji for a custom activity
+ * @type {?Emoji}
+ */
+ this.emoji = data.emoji ? new Emoji(presence.client, data.emoji) : null;
+
+ /**
+ * The labels of the buttons of this rich presence
+ * @type {string[]}
+ */
+ this.buttons = data.buttons ?? [];
+
+ /**
+ * Creation date of the activity
+ * @type {number}
+ */
+ this.createdTimestamp = data.created_at;
+ }
+
+ /**
+ * Whether this activity is equal to another activity.
+ * @param {Activity} activity The activity to compare with
+ * @returns {boolean}
+ */
+ equals(activity) {
+ return (
+ this === activity ||
+ (activity &&
+ this.name === activity.name &&
+ this.type === activity.type &&
+ this.url === activity.url &&
+ this.state === activity.state &&
+ this.details === activity.details &&
+ this.emoji?.id === activity.emoji?.id &&
+ this.emoji?.name === activity.emoji?.name)
+ );
+ }
+
+ /**
+ * The time the activity was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ /**
+ * When concatenated with a string, this automatically returns the activity's name instead of the Activity object.
+ * @returns {string}
+ */
+ toString() {
+ return this.name;
+ }
+
+ _clone() {
+ return Object.assign(Object.create(this), this);
+ }
+}
+
+/**
+ * Assets for a rich presence
+ */
+class RichPresenceAssets {
+ constructor(activity, assets) {
+ /**
+ * The activity of the RichPresenceAssets
+ * @type {Activity}
+ * @readonly
+ * @name RichPresenceAssets#activity
+ */
+ Object.defineProperty(this, 'activity', { value: activity });
+
+ /**
+ * Hover text for the large image
+ * @type {?string}
+ */
+ this.largeText = assets.large_text ?? null;
+
+ /**
+ * Hover text for the small image
+ * @type {?string}
+ */
+ this.smallText = assets.small_text ?? null;
+
+ /**
+ * The large image asset's id
+ * @type {?Snowflake}
+ */
+ this.largeImage = assets.large_image ?? null;
+
+ /**
+ * The small image asset's id
+ * @type {?Snowflake}
+ */
+ this.smallImage = assets.small_image ?? null;
+ }
+
+ /**
+ * Gets the URL of the small image asset
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ smallImageURL(options = {}) {
+ if (!this.smallImage) return null;
+ if (this.smallImage.includes(':')) {
+ const [platform, id] = this.smallImage.split(':');
+ switch (platform) {
+ case 'mp':
+ return `https://media.discordapp.net/${id}`;
+ default:
+ return null;
+ }
+ }
+
+ return this.activity.presence.client.rest.cdn.appAsset(this.activity.applicationId, this.smallImage, options);
+ }
+
+ /**
+ * Gets the URL of the large image asset
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ largeImageURL(options = {}) {
+ if (!this.largeImage) return null;
+ if (this.largeImage.includes(':')) {
+ const [platform, id] = this.largeImage.split(':');
+ switch (platform) {
+ case 'mp':
+ return `https://media.discordapp.net/${id}`;
+ case 'spotify':
+ return `https://i.scdn.co/image/${id}`;
+ case 'youtube':
+ return `https://i.ytimg.com/vi/${id}/hqdefault_live.jpg`;
+ case 'twitch':
+ return `https://static-cdn.jtvnw.net/previews-ttv/live_user_${id}.png`;
+ default:
+ return null;
+ }
+ }
+
+ return this.activity.presence.client.rest.cdn.appAsset(this.activity.applicationId, this.largeImage, options);
+ }
+}
+
+exports.Presence = Presence;
+exports.Activity = Activity;
+exports.RichPresenceAssets = RichPresenceAssets;
diff --git a/node_modules/discord.js/src/structures/ReactionCollector.js b/node_modules/discord.js/src/structures/ReactionCollector.js
new file mode 100644
index 0000000..924b33b
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ReactionCollector.js
@@ -0,0 +1,229 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const Collector = require('./interfaces/Collector');
+const Events = require('../util/Events');
+
+/**
+ * @typedef {CollectorOptions} ReactionCollectorOptions
+ * @property {number} max The maximum total amount of reactions to collect
+ * @property {number} maxEmojis The maximum number of emojis to collect
+ * @property {number} maxUsers The maximum number of users to react
+ */
+
+/**
+ * Collects reactions on messages.
+ * Will automatically stop if the message ({@link Client#event:messageDelete messageDelete} or
+ * {@link Client#event:messageDeleteBulk messageDeleteBulk}),
+ * channel ({@link Client#event:channelDelete channelDelete}),
+ * thread ({@link Client#event:threadDelete threadDelete}), or
+ * guild ({@link Client#event:guildDelete guildDelete}) is deleted.
+ * @extends {Collector}
+ */
+class ReactionCollector extends Collector {
+ /**
+ * @param {Message} message The message upon which to collect reactions
+ * @param {ReactionCollectorOptions} [options={}] The options to apply to this collector
+ */
+ constructor(message, options = {}) {
+ super(message.client, options);
+
+ /**
+ * The message upon which to collect reactions
+ * @type {Message}
+ */
+ this.message = message;
+
+ /**
+ * The users that have reacted to this message
+ * @type {Collection}
+ */
+ this.users = new Collection();
+
+ /**
+ * The total number of reactions collected
+ * @type {number}
+ */
+ this.total = 0;
+
+ this.empty = this.empty.bind(this);
+ this._handleChannelDeletion = this._handleChannelDeletion.bind(this);
+ this._handleThreadDeletion = this._handleThreadDeletion.bind(this);
+ this._handleGuildDeletion = this._handleGuildDeletion.bind(this);
+ this._handleMessageDeletion = this._handleMessageDeletion.bind(this);
+
+ const bulkDeleteListener = messages => {
+ if (messages.has(this.message.id)) this.stop('messageDelete');
+ };
+
+ this.client.incrementMaxListeners();
+ this.client.on(Events.MessageReactionAdd, this.handleCollect);
+ this.client.on(Events.MessageReactionRemove, this.handleDispose);
+ this.client.on(Events.MessageReactionRemoveAll, this.empty);
+ this.client.on(Events.MessageDelete, this._handleMessageDeletion);
+ this.client.on(Events.MessageBulkDelete, bulkDeleteListener);
+ this.client.on(Events.ChannelDelete, this._handleChannelDeletion);
+ this.client.on(Events.ThreadDelete, this._handleThreadDeletion);
+ this.client.on(Events.GuildDelete, this._handleGuildDeletion);
+
+ this.once('end', () => {
+ this.client.removeListener(Events.MessageReactionAdd, this.handleCollect);
+ this.client.removeListener(Events.MessageReactionRemove, this.handleDispose);
+ this.client.removeListener(Events.MessageReactionRemoveAll, this.empty);
+ this.client.removeListener(Events.MessageDelete, this._handleMessageDeletion);
+ this.client.removeListener(Events.MessageBulkDelete, bulkDeleteListener);
+ this.client.removeListener(Events.ChannelDelete, this._handleChannelDeletion);
+ this.client.removeListener(Events.ThreadDelete, this._handleThreadDeletion);
+ this.client.removeListener(Events.GuildDelete, this._handleGuildDeletion);
+ this.client.decrementMaxListeners();
+ });
+
+ this.on('collect', (reaction, user) => {
+ /**
+ * Emitted whenever a reaction is newly created on a message. Will emit only when a new reaction is
+ * added to the message, as opposed to {@link Collector#collect} which will
+ * be emitted even when a reaction has already been added to the message.
+ * @event ReactionCollector#create
+ * @param {MessageReaction} reaction The reaction that was added
+ * @param {User} user The user that added the reaction
+ */
+ if (reaction.count === 1) {
+ this.emit('create', reaction, user);
+ }
+ this.total++;
+ this.users.set(user.id, user);
+ });
+
+ this.on('remove', (reaction, user) => {
+ this.total--;
+ if (!this.collected.some(r => r.users.cache.has(user.id))) this.users.delete(user.id);
+ });
+ }
+
+ /**
+ * Handles an incoming reaction for possible collection.
+ * @param {MessageReaction} reaction The reaction to possibly collect
+ * @param {User} user The user that added the reaction
+ * @returns {?(Snowflake|string)}
+ * @private
+ */
+ collect(reaction) {
+ /**
+ * Emitted whenever a reaction is collected.
+ * @event ReactionCollector#collect
+ * @param {MessageReaction} reaction The reaction that was collected
+ * @param {User} user The user that added the reaction
+ */
+ if (reaction.message.id !== this.message.id) return null;
+
+ return ReactionCollector.key(reaction);
+ }
+
+ /**
+ * Handles a reaction deletion for possible disposal.
+ * @param {MessageReaction} reaction The reaction to possibly dispose of
+ * @param {User} user The user that removed the reaction
+ * @returns {?(Snowflake|string)}
+ */
+ dispose(reaction, user) {
+ /**
+ * Emitted when the reaction had all the users removed and the `dispose` option is set to true.
+ * @event ReactionCollector#dispose
+ * @param {MessageReaction} reaction The reaction that was disposed of
+ * @param {User} user The user that removed the reaction
+ */
+ if (reaction.message.id !== this.message.id) return null;
+
+ /**
+ * Emitted when the reaction had one user removed and the `dispose` option is set to true.
+ * @event ReactionCollector#remove
+ * @param {MessageReaction} reaction The reaction that was removed
+ * @param {User} user The user that removed the reaction
+ */
+ if (this.collected.has(ReactionCollector.key(reaction)) && this.users.has(user.id)) {
+ this.emit('remove', reaction, user);
+ }
+ return reaction.count ? null : ReactionCollector.key(reaction);
+ }
+
+ /**
+ * Empties this reaction collector.
+ */
+ empty() {
+ this.total = 0;
+ this.collected.clear();
+ this.users.clear();
+ this.checkEnd();
+ }
+
+ /**
+ * The reason this collector has ended with, or null if it hasn't ended yet
+ * @type {?string}
+ * @readonly
+ */
+ get endReason() {
+ if (this.options.max && this.total >= this.options.max) return 'limit';
+ if (this.options.maxEmojis && this.collected.size >= this.options.maxEmojis) return 'emojiLimit';
+ if (this.options.maxUsers && this.users.size >= this.options.maxUsers) return 'userLimit';
+ return super.endReason;
+ }
+
+ /**
+ * Handles checking if the message has been deleted, and if so, stops the collector with the reason 'messageDelete'.
+ * @private
+ * @param {Message} message The message that was deleted
+ * @returns {void}
+ */
+ _handleMessageDeletion(message) {
+ if (message.id === this.message.id) {
+ this.stop('messageDelete');
+ }
+ }
+
+ /**
+ * Handles checking if the channel has been deleted, and if so, stops the collector with the reason 'channelDelete'.
+ * @private
+ * @param {GuildChannel} channel The channel that was deleted
+ * @returns {void}
+ */
+ _handleChannelDeletion(channel) {
+ if (channel.id === this.message.channelId || channel.threads?.cache.has(this.message.channelId)) {
+ this.stop('channelDelete');
+ }
+ }
+
+ /**
+ * Handles checking if the thread has been deleted, and if so, stops the collector with the reason 'threadDelete'.
+ * @private
+ * @param {ThreadChannel} thread The thread that was deleted
+ * @returns {void}
+ */
+ _handleThreadDeletion(thread) {
+ if (thread.id === this.message.channelId) {
+ this.stop('threadDelete');
+ }
+ }
+
+ /**
+ * Handles checking if the guild has been deleted, and if so, stops the collector with the reason 'guildDelete'.
+ * @private
+ * @param {Guild} guild The guild that was deleted
+ * @returns {void}
+ */
+ _handleGuildDeletion(guild) {
+ if (guild.id === this.message.guild?.id) {
+ this.stop('guildDelete');
+ }
+ }
+
+ /**
+ * Gets the collector key for a reaction.
+ * @param {MessageReaction} reaction The message reaction to get the key for
+ * @returns {Snowflake|string}
+ */
+ static key(reaction) {
+ return reaction.emoji.id ?? reaction.emoji.name;
+ }
+}
+
+module.exports = ReactionCollector;
diff --git a/node_modules/discord.js/src/structures/ReactionEmoji.js b/node_modules/discord.js/src/structures/ReactionEmoji.js
new file mode 100644
index 0000000..08e2ea0
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ReactionEmoji.js
@@ -0,0 +1,31 @@
+'use strict';
+
+const { Emoji } = require('./Emoji');
+const { flatten } = require('../util/Util');
+
+/**
+ * Represents a limited emoji set used for both custom and unicode emojis. Custom emojis
+ * will use this class opposed to the Emoji class when the client doesn't know enough
+ * information about them.
+ * @extends {Emoji}
+ */
+class ReactionEmoji extends Emoji {
+ constructor(reaction, emoji) {
+ super(reaction.message.client, emoji);
+ /**
+ * The message reaction this emoji refers to
+ * @type {MessageReaction}
+ */
+ this.reaction = reaction;
+ }
+
+ toJSON() {
+ return flatten(this, { identifier: true });
+ }
+
+ valueOf() {
+ return this.id;
+ }
+}
+
+module.exports = ReactionEmoji;
diff --git a/node_modules/discord.js/src/structures/Role.js b/node_modules/discord.js/src/structures/Role.js
new file mode 100644
index 0000000..09a2a52
--- /dev/null
+++ b/node_modules/discord.js/src/structures/Role.js
@@ -0,0 +1,471 @@
+'use strict';
+
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const { PermissionFlagsBits } = require('discord-api-types/v10');
+const Base = require('./Base');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+const PermissionsBitField = require('../util/PermissionsBitField');
+const RoleFlagsBitField = require('../util/RoleFlagsBitField');
+
+/**
+ * Represents a role on Discord.
+ * @extends {Base}
+ */
+class Role extends Base {
+ constructor(client, data, guild) {
+ super(client);
+
+ /**
+ * The guild that the role belongs to
+ * @type {Guild}
+ */
+ this.guild = guild;
+
+ /**
+ * The icon hash of the role
+ * @type {?string}
+ */
+ this.icon = null;
+
+ /**
+ * The unicode emoji for the role
+ * @type {?string}
+ */
+ this.unicodeEmoji = null;
+
+ if (data) this._patch(data);
+ }
+
+ _patch(data) {
+ /**
+ * The role's id (unique to the guild it is part of)
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+ if ('name' in data) {
+ /**
+ * The name of the role
+ * @type {string}
+ */
+ this.name = data.name;
+ }
+
+ if ('color' in data) {
+ /**
+ * The base 10 color of the role
+ * @type {number}
+ */
+ this.color = data.color;
+ }
+
+ if ('hoist' in data) {
+ /**
+ * If true, users that are part of this role will appear in a separate category in the users list
+ * @type {boolean}
+ */
+ this.hoist = data.hoist;
+ }
+
+ if ('position' in data) {
+ /**
+ * The raw position of the role from the API
+ * @type {number}
+ */
+ this.rawPosition = data.position;
+ }
+
+ if ('permissions' in data) {
+ /**
+ * The permissions of the role
+ * @type {Readonly<PermissionsBitField>}
+ */
+ this.permissions = new PermissionsBitField(BigInt(data.permissions)).freeze();
+ }
+
+ if ('managed' in data) {
+ /**
+ * Whether or not the role is managed by an external service
+ * @type {boolean}
+ */
+ this.managed = data.managed;
+ }
+
+ if ('mentionable' in data) {
+ /**
+ * Whether or not the role can be mentioned by anyone
+ * @type {boolean}
+ */
+ this.mentionable = data.mentionable;
+ }
+
+ if ('icon' in data) this.icon = data.icon;
+
+ if ('unicode_emoji' in data) this.unicodeEmoji = data.unicode_emoji;
+
+ if ('flags' in data) {
+ /**
+ * The flags of this role
+ * @type {Readonly<RoleFlagsBitField>}
+ */
+ this.flags = new RoleFlagsBitField(data.flags).freeze();
+ } else {
+ this.flags ??= new RoleFlagsBitField().freeze();
+ }
+
+ /**
+ * The tags this role has
+ * @type {?Object}
+ * @property {Snowflake} [botId] The id of the bot this role belongs to
+ * @property {Snowflake|string} [integrationId] The id of the integration this role belongs to
+ * @property {true} [premiumSubscriberRole] Whether this is the guild's premium subscription role
+ * @property {Snowflake} [subscriptionListingId] The id of this role's subscription SKU and listing
+ * @property {true} [availableForPurchase] Whether this role is available for purchase
+ * @property {true} [guildConnections] Whether this role is a guild's linked role
+ */
+ this.tags = data.tags ? {} : null;
+ if (data.tags) {
+ if ('bot_id' in data.tags) {
+ this.tags.botId = data.tags.bot_id;
+ }
+ if ('integration_id' in data.tags) {
+ this.tags.integrationId = data.tags.integration_id;
+ }
+ if ('premium_subscriber' in data.tags) {
+ this.tags.premiumSubscriberRole = true;
+ }
+ if ('subscription_listing_id' in data.tags) {
+ this.tags.subscriptionListingId = data.tags.subscription_listing_id;
+ }
+ if ('available_for_purchase' in data.tags) {
+ this.tags.availableForPurchase = true;
+ }
+ if ('guild_connections' in data.tags) {
+ this.tags.guildConnections = true;
+ }
+ }
+ }
+
+ /**
+ * The timestamp the role was created at
+ * @type {number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return DiscordSnowflake.timestampFrom(this.id);
+ }
+
+ /**
+ * The time the role was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ /**
+ * The hexadecimal version of the role color, with a leading hashtag
+ * @type {string}
+ * @readonly
+ */
+ get hexColor() {
+ return `#${this.color.toString(16).padStart(6, '0')}`;
+ }
+
+ /**
+ * The cached guild members that have this role
+ * @type {Collection<Snowflake, GuildMember>}
+ * @readonly
+ */
+ get members() {
+ return this.id === this.guild.id
+ ? this.guild.members.cache.clone()
+ : this.guild.members.cache.filter(m => m._roles.includes(this.id));
+ }
+
+ /**
+ * Whether the role is editable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get editable() {
+ if (this.managed) return false;
+ const clientMember = this.guild.members.resolve(this.client.user);
+ if (!clientMember.permissions.has(PermissionFlagsBits.ManageRoles)) return false;
+ return clientMember.roles.highest.comparePositionTo(this) > 0;
+ }
+
+ /**
+ * The position of the role in the role manager
+ * @type {number}
+ * @readonly
+ */
+ get position() {
+ return this.guild.roles.cache.reduce(
+ (acc, role) =>
+ acc +
+ (this.rawPosition === role.rawPosition
+ ? BigInt(this.id) > BigInt(role.id)
+ : this.rawPosition > role.rawPosition),
+ 0,
+ );
+ }
+
+ /**
+ * Compares this role's position to another role's.
+ * @param {RoleResolvable} role Role to compare to this one
+ * @returns {number} Negative number if this role's position is lower (other role's is higher),
+ * positive number if this one is higher (other's is lower), 0 if equal
+ * @example
+ * // Compare the position of a role to another
+ * const roleCompare = role.comparePositionTo(otherRole);
+ * if (roleCompare >= 1) console.log(`${role.name} is higher than ${otherRole.name}`);
+ */
+ comparePositionTo(role) {
+ return this.guild.roles.comparePositions(this, role);
+ }
+
+ /**
+ * The data for a role.
+ * @typedef {Object} RoleData
+ * @property {string} [name] The name of the role
+ * @property {ColorResolvable} [color] The color of the role, either a hex string or a base 10 number
+ * @property {boolean} [hoist] Whether or not the role should be hoisted
+ * @property {number} [position] The position of the role
+ * @property {PermissionResolvable} [permissions] The permissions of the role
+ * @property {boolean} [mentionable] Whether or not the role should be mentionable
+ * @property {?(BufferResolvable|Base64Resolvable|EmojiResolvable)} [icon] The icon for the role
+ * <warn>The `EmojiResolvable` should belong to the same guild as the role.
+ * If not, pass the emoji's URL directly</warn>
+ * @property {?string} [unicodeEmoji] The unicode emoji for the role
+ */
+
+ /**
+ * Edits the role.
+ * @param {RoleEditOptions} options The options to provide
+ * @returns {Promise<Role>}
+ * @example
+ * // Edit a role
+ * role.edit({ name: 'new role' })
+ * .then(updated => console.log(`Edited role name to ${updated.name}`))
+ * .catch(console.error);
+ */
+ edit(options) {
+ return this.guild.roles.edit(this, options);
+ }
+
+ /**
+ * Returns `channel.permissionsFor(role)`. Returns permissions for a role in a guild channel,
+ * taking into account permission overwrites.
+ * @param {GuildChannel|Snowflake} channel The guild channel to use as context
+ * @param {boolean} [checkAdmin=true] Whether having the {@link PermissionFlagsBits.Administrator} permission
+ * will return all permissions
+ * @returns {Readonly<PermissionsBitField>}
+ */
+ permissionsIn(channel, checkAdmin = true) {
+ channel = this.guild.channels.resolve(channel);
+ if (!channel) throw new DiscordjsError(ErrorCodes.GuildChannelResolve);
+ return channel.rolePermissions(this, checkAdmin);
+ }
+
+ /**
+ * Sets a new name for the role.
+ * @param {string} name The new name of the role
+ * @param {string} [reason] Reason for changing the role's name
+ * @returns {Promise<Role>}
+ * @example
+ * // Set the name of the role
+ * role.setName('new role')
+ * .then(updated => console.log(`Updated role name to ${updated.name}`))
+ * .catch(console.error);
+ */
+ setName(name, reason) {
+ return this.edit({ name, reason });
+ }
+
+ /**
+ * Sets a new color for the role.
+ * @param {ColorResolvable} color The color of the role
+ * @param {string} [reason] Reason for changing the role's color
+ * @returns {Promise<Role>}
+ * @example
+ * // Set the color of a role
+ * role.setColor('#FF0000')
+ * .then(updated => console.log(`Set color of role to ${updated.color}`))
+ * .catch(console.error);
+ */
+ setColor(color, reason) {
+ return this.edit({ color, reason });
+ }
+
+ /**
+ * Sets whether or not the role should be hoisted.
+ * @param {boolean} [hoist=true] Whether or not to hoist the role
+ * @param {string} [reason] Reason for setting whether or not the role should be hoisted
+ * @returns {Promise<Role>}
+ * @example
+ * // Set the hoist of the role
+ * role.setHoist(true)
+ * .then(updated => console.log(`Role hoisted: ${updated.hoist}`))
+ * .catch(console.error);
+ */
+ setHoist(hoist = true, reason) {
+ return this.edit({ hoist, reason });
+ }
+
+ /**
+ * Sets the permissions of the role.
+ * @param {PermissionResolvable} permissions The permissions of the role
+ * @param {string} [reason] Reason for changing the role's permissions
+ * @returns {Promise<Role>}
+ * @example
+ * // Set the permissions of the role
+ * role.setPermissions([PermissionFlagsBits.KickMembers, PermissionFlagsBits.BanMembers])
+ * .then(updated => console.log(`Updated permissions to ${updated.permissions.bitfield}`))
+ * .catch(console.error);
+ * @example
+ * // Remove all permissions from a role
+ * role.setPermissions(0n)
+ * .then(updated => console.log(`Updated permissions to ${updated.permissions.bitfield}`))
+ * .catch(console.error);
+ */
+ setPermissions(permissions, reason) {
+ return this.edit({ permissions, reason });
+ }
+
+ /**
+ * Sets whether this role is mentionable.
+ * @param {boolean} [mentionable=true] Whether this role should be mentionable
+ * @param {string} [reason] Reason for setting whether or not this role should be mentionable
+ * @returns {Promise<Role>}
+ * @example
+ * // Make the role mentionable
+ * role.setMentionable(true)
+ * .then(updated => console.log(`Role updated ${updated.name}`))
+ * .catch(console.error);
+ */
+ setMentionable(mentionable = true, reason) {
+ return this.edit({ mentionable, reason });
+ }
+
+ /**
+ * Sets a new icon for the role.
+ * @param {?(BufferResolvable|Base64Resolvable|EmojiResolvable)} icon The icon for the role
+ * <warn>The `EmojiResolvable` should belong to the same guild as the role.
+ * If not, pass the emoji's URL directly</warn>
+ * @param {string} [reason] Reason for changing the role's icon
+ * @returns {Promise<Role>}
+ */
+ setIcon(icon, reason) {
+ return this.edit({ icon, reason });
+ }
+
+ /**
+ * Sets a new unicode emoji for the role.
+ * @param {?string} unicodeEmoji The new unicode emoji for the role
+ * @param {string} [reason] Reason for changing the role's unicode emoji
+ * @returns {Promise<Role>}
+ * @example
+ * // Set a new unicode emoji for the role
+ * role.setUnicodeEmoji('🤖')
+ * .then(updated => console.log(`Set unicode emoji for the role to ${updated.unicodeEmoji}`))
+ * .catch(console.error);
+ */
+ setUnicodeEmoji(unicodeEmoji, reason) {
+ return this.edit({ unicodeEmoji, reason });
+ }
+
+ /**
+ * Options used to set the position of a role.
+ * @typedef {Object} SetRolePositionOptions
+ * @property {boolean} [relative=false] Whether to change the position relative to its current value or not
+ * @property {string} [reason] The reason for changing the position
+ */
+
+ /**
+ * Sets the new position of the role.
+ * @param {number} position The new position for the role
+ * @param {SetRolePositionOptions} [options] Options for setting the position
+ * @returns {Promise<Role>}
+ * @example
+ * // Set the position of the role
+ * role.setPosition(1)
+ * .then(updated => console.log(`Role position: ${updated.position}`))
+ * .catch(console.error);
+ */
+ setPosition(position, options = {}) {
+ return this.guild.roles.setPosition(this, position, options);
+ }
+
+ /**
+ * Deletes the role.
+ * @param {string} [reason] Reason for deleting this role
+ * @returns {Promise<Role>}
+ * @example
+ * // Delete a role
+ * role.delete('The role needed to go')
+ * .then(deleted => console.log(`Deleted role ${deleted.name}`))
+ * .catch(console.error);
+ */
+ async delete(reason) {
+ await this.guild.roles.delete(this.id, reason);
+ return this;
+ }
+
+ /**
+ * A link to the role's icon
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ iconURL(options = {}) {
+ return this.icon && this.client.rest.cdn.roleIcon(this.id, this.icon, options);
+ }
+
+ /**
+ * Whether this role equals another role. It compares all properties, so for most operations
+ * it is advisable to just compare `role.id === role2.id` as it is much faster and is often
+ * what most users need.
+ * @param {Role} role Role to compare with
+ * @returns {boolean}
+ */
+ equals(role) {
+ return (
+ role &&
+ this.id === role.id &&
+ this.name === role.name &&
+ this.color === role.color &&
+ this.hoist === role.hoist &&
+ this.position === role.position &&
+ this.permissions.bitfield === role.permissions.bitfield &&
+ this.managed === role.managed &&
+ this.icon === role.icon &&
+ this.unicodeEmoji === role.unicodeEmoji
+ );
+ }
+
+ /**
+ * When concatenated with a string, this automatically returns the role's mention instead of the Role object.
+ * @returns {string}
+ * @example
+ * // Logs: Role: <@&123456789012345678>
+ * console.log(`Role: ${role}`);
+ */
+ toString() {
+ if (this.id === this.guild.id) return '@everyone';
+ return `<@&${this.id}>`;
+ }
+
+ toJSON() {
+ return {
+ ...super.toJSON({ createdTimestamp: true }),
+ permissions: this.permissions.toJSON(),
+ };
+ }
+}
+
+exports.Role = Role;
+
+/**
+ * @external APIRole
+ * @see {@link https://discord.com/developers/docs/topics/permissions#role-object}
+ */
diff --git a/node_modules/discord.js/src/structures/RoleSelectMenuBuilder.js b/node_modules/discord.js/src/structures/RoleSelectMenuBuilder.js
new file mode 100644
index 0000000..0d80de5
--- /dev/null
+++ b/node_modules/discord.js/src/structures/RoleSelectMenuBuilder.js
@@ -0,0 +1,31 @@
+'use strict';
+
+const { RoleSelectMenuBuilder: BuildersRoleSelectMenu } = require('@discordjs/builders');
+const { isJSONEncodable } = require('@discordjs/util');
+const { toSnakeCase } = require('../util/Transformers');
+
+/**
+ * Class used to build select menu components to be sent through the API
+ * @extends {BuildersRoleSelectMenu}
+ */
+class RoleSelectMenuBuilder extends BuildersRoleSelectMenu {
+ constructor(data = {}) {
+ super(toSnakeCase(data));
+ }
+
+ /**
+ * Creates a new select menu builder from JSON data
+ * @param {RoleSelectMenuBuilder|RoleSelectMenuComponent|APIRoleSelectComponent} other The other data
+ * @returns {RoleSelectMenuBuilder}
+ */
+ static from(other) {
+ return new this(isJSONEncodable(other) ? other.toJSON() : other);
+ }
+}
+
+module.exports = RoleSelectMenuBuilder;
+
+/**
+ * @external BuildersRoleSelectMenu
+ * @see {@link https://discord.js.org/docs/packages/builders/stable/RoleSelectMenuBuilder:Class}
+ */
diff --git a/node_modules/discord.js/src/structures/RoleSelectMenuComponent.js b/node_modules/discord.js/src/structures/RoleSelectMenuComponent.js
new file mode 100644
index 0000000..1b27942
--- /dev/null
+++ b/node_modules/discord.js/src/structures/RoleSelectMenuComponent.js
@@ -0,0 +1,11 @@
+'use strict';
+
+const BaseSelectMenuComponent = require('./BaseSelectMenuComponent');
+
+/**
+ * Represents a role select menu component
+ * @extends {BaseSelectMenuComponent}
+ */
+class RoleSelectMenuComponent extends BaseSelectMenuComponent {}
+
+module.exports = RoleSelectMenuComponent;
diff --git a/node_modules/discord.js/src/structures/RoleSelectMenuInteraction.js b/node_modules/discord.js/src/structures/RoleSelectMenuInteraction.js
new file mode 100644
index 0000000..eb42eff
--- /dev/null
+++ b/node_modules/discord.js/src/structures/RoleSelectMenuInteraction.js
@@ -0,0 +1,33 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const MessageComponentInteraction = require('./MessageComponentInteraction');
+
+/**
+ * Represents a {@link ComponentType.RoleSelect} select menu interaction.
+ * @extends {MessageComponentInteraction}
+ */
+class RoleSelectMenuInteraction extends MessageComponentInteraction {
+ constructor(client, data) {
+ super(client, data);
+ const { resolved, values } = data.data;
+
+ /**
+ * An array of the selected role ids
+ * @type {Snowflake[]}
+ */
+ this.values = values ?? [];
+
+ /**
+ * Collection of the selected roles
+ * @type {Collection<Snowflake, Role|APIRole>}
+ */
+ this.roles = new Collection();
+
+ for (const role of Object.values(resolved?.roles ?? {})) {
+ this.roles.set(role.id, this.guild?.roles._add(role) ?? role);
+ }
+ }
+}
+
+module.exports = RoleSelectMenuInteraction;
diff --git a/node_modules/discord.js/src/structures/SelectMenuBuilder.js b/node_modules/discord.js/src/structures/SelectMenuBuilder.js
new file mode 100644
index 0000000..a779370
--- /dev/null
+++ b/node_modules/discord.js/src/structures/SelectMenuBuilder.js
@@ -0,0 +1,26 @@
+'use strict';
+
+const process = require('node:process');
+const StringSelectMenuBuilder = require('./StringSelectMenuBuilder');
+
+let deprecationEmitted = false;
+
+/**
+ * @deprecated Use {@link StringSelectMenuBuilder} instead.
+ * @extends {StringSelectMenuBuilder}
+ */
+class SelectMenuBuilder extends StringSelectMenuBuilder {
+ constructor(...params) {
+ super(...params);
+
+ if (!deprecationEmitted) {
+ process.emitWarning(
+ 'The SelectMenuBuilder class is deprecated. Use StringSelectMenuBuilder instead.',
+ 'DeprecationWarning',
+ );
+ deprecationEmitted = true;
+ }
+ }
+}
+
+module.exports = SelectMenuBuilder;
diff --git a/node_modules/discord.js/src/structures/SelectMenuComponent.js b/node_modules/discord.js/src/structures/SelectMenuComponent.js
new file mode 100644
index 0000000..2cd8097
--- /dev/null
+++ b/node_modules/discord.js/src/structures/SelectMenuComponent.js
@@ -0,0 +1,26 @@
+'use strict';
+
+const process = require('node:process');
+const StringSelectMenuComponent = require('./StringSelectMenuComponent');
+
+let deprecationEmitted = false;
+
+/**
+ * @deprecated Use {@link StringSelectMenuComponent} instead.
+ * @extends {StringSelectMenuComponent}
+ */
+class SelectMenuComponent extends StringSelectMenuComponent {
+ constructor(...params) {
+ super(...params);
+
+ if (!deprecationEmitted) {
+ process.emitWarning(
+ 'The SelectMenuComponent class is deprecated. Use StringSelectMenuComponent instead.',
+ 'DeprecationWarning',
+ );
+ deprecationEmitted = true;
+ }
+ }
+}
+
+module.exports = SelectMenuComponent;
diff --git a/node_modules/discord.js/src/structures/SelectMenuInteraction.js b/node_modules/discord.js/src/structures/SelectMenuInteraction.js
new file mode 100644
index 0000000..a096559
--- /dev/null
+++ b/node_modules/discord.js/src/structures/SelectMenuInteraction.js
@@ -0,0 +1,26 @@
+'use strict';
+
+const process = require('node:process');
+const StringSelectMenuInteraction = require('./StringSelectMenuInteraction');
+
+let deprecationEmitted = false;
+
+/**
+ * @deprecated Use {@link StringSelectMenuInteraction} instead.
+ * @extends {StringSelectMenuInteraction}
+ */
+class SelectMenuInteraction extends StringSelectMenuInteraction {
+ constructor(...params) {
+ super(...params);
+
+ if (!deprecationEmitted) {
+ process.emitWarning(
+ 'The SelectMenuInteraction class is deprecated. Use StringSelectMenuInteraction instead.',
+ 'DeprecationWarning',
+ );
+ deprecationEmitted = true;
+ }
+ }
+}
+
+module.exports = SelectMenuInteraction;
diff --git a/node_modules/discord.js/src/structures/SelectMenuOptionBuilder.js b/node_modules/discord.js/src/structures/SelectMenuOptionBuilder.js
new file mode 100644
index 0000000..85309d1
--- /dev/null
+++ b/node_modules/discord.js/src/structures/SelectMenuOptionBuilder.js
@@ -0,0 +1,26 @@
+'use strict';
+
+const process = require('node:process');
+const StringSelectMenuOptionBuilder = require('./StringSelectMenuOptionBuilder');
+
+let deprecationEmitted = false;
+
+/**
+ * @deprecated Use {@link StringSelectMenuOptionBuilder} instead.
+ * @extends {StringSelectMenuOptionBuilder}
+ */
+class SelectMenuOptionBuilder extends StringSelectMenuOptionBuilder {
+ constructor(...params) {
+ super(...params);
+
+ if (!deprecationEmitted) {
+ process.emitWarning(
+ 'The SelectMenuOptionBuilder class is deprecated. Use StringSelectMenuOptionBuilder instead.',
+ 'DeprecationWarning',
+ );
+ deprecationEmitted = true;
+ }
+ }
+}
+
+module.exports = SelectMenuOptionBuilder;
diff --git a/node_modules/discord.js/src/structures/StageChannel.js b/node_modules/discord.js/src/structures/StageChannel.js
new file mode 100644
index 0000000..2661489
--- /dev/null
+++ b/node_modules/discord.js/src/structures/StageChannel.js
@@ -0,0 +1,112 @@
+'use strict';
+
+const BaseGuildVoiceChannel = require('./BaseGuildVoiceChannel');
+
+/**
+ * Represents a guild stage channel on Discord.
+ * @extends {BaseGuildVoiceChannel}
+ */
+class StageChannel extends BaseGuildVoiceChannel {
+ _patch(data) {
+ super._patch(data);
+
+ if ('topic' in data) {
+ /**
+ * The topic of the stage channel
+ * @type {?string}
+ */
+ this.topic = data.topic;
+ }
+ }
+
+ /**
+ * The stage instance of this stage channel, if it exists
+ * @type {?StageInstance}
+ * @readonly
+ */
+ get stageInstance() {
+ return this.guild.stageInstances.cache.find(stageInstance => stageInstance.channelId === this.id) ?? null;
+ }
+
+ /**
+ * Creates a stage instance associated with this stage channel.
+ * @param {StageInstanceCreateOptions} options The options to create the stage instance
+ * @returns {Promise<StageInstance>}
+ */
+ createStageInstance(options) {
+ return this.guild.stageInstances.create(this.id, options);
+ }
+
+ /**
+ * Sets a new topic for the guild channel.
+ * @param {?string} topic The new topic for the guild channel
+ * @param {string} [reason] Reason for changing the guild channel's topic
+ * @returns {Promise<StageChannel>}
+ * @example
+ * // Set a new channel topic
+ * stageChannel.setTopic('needs more rate limiting')
+ * .then(channel => console.log(`Channel's new topic is ${channel.topic}`))
+ * .catch(console.error);
+ */
+ setTopic(topic, reason) {
+ return this.edit({ topic, reason });
+ }
+}
+
+/**
+ * Sets the bitrate of the channel.
+ * @method setBitrate
+ * @memberof StageChannel
+ * @instance
+ * @param {number} bitrate The new bitrate
+ * @param {string} [reason] Reason for changing the channel's bitrate
+ * @returns {Promise<StageChannel>}
+ * @example
+ * // Set the bitrate of a voice channel
+ * stageChannel.setBitrate(48_000)
+ * .then(channel => console.log(`Set bitrate to ${channel.bitrate}bps for ${channel.name}`))
+ * .catch(console.error);
+ */
+
+/**
+ * Sets the RTC region of the channel.
+ * @method setRTCRegion
+ * @memberof StageChannel
+ * @instance
+ * @param {?string} rtcRegion The new region of the channel. Set to `null` to remove a specific region for the channel
+ * @param {string} [reason] The reason for modifying this region.
+ * @returns {Promise<StageChannel>}
+ * @example
+ * // Set the RTC region to sydney
+ * stageChannel.setRTCRegion('sydney');
+ * @example
+ * // Remove a fixed region for this channel - let Discord decide automatically
+ * stageChannel.setRTCRegion(null, 'We want to let Discord decide.');
+ */
+
+/**
+ * Sets the user limit of the channel.
+ * @method setUserLimit
+ * @memberof StageChannel
+ * @instance
+ * @param {number} userLimit The new user limit
+ * @param {string} [reason] Reason for changing the user limit
+ * @returns {Promise<StageChannel>}
+ * @example
+ * // Set the user limit of a voice channel
+ * stageChannel.setUserLimit(42)
+ * .then(channel => console.log(`Set user limit to ${channel.userLimit} for ${channel.name}`))
+ * .catch(console.error);
+ */
+
+/**
+ * Sets the camera video quality mode of the channel.
+ * @method setVideoQualityMode
+ * @memberof StageChannel
+ * @instance
+ * @param {VideoQualityMode} videoQualityMode The new camera video quality mode.
+ * @param {string} [reason] Reason for changing the camera video quality mode.
+ * @returns {Promise<StageChannel>}
+ */
+
+module.exports = StageChannel;
diff --git a/node_modules/discord.js/src/structures/StageInstance.js b/node_modules/discord.js/src/structures/StageInstance.js
new file mode 100644
index 0000000..97f65df
--- /dev/null
+++ b/node_modules/discord.js/src/structures/StageInstance.js
@@ -0,0 +1,167 @@
+'use strict';
+
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const Base = require('./Base');
+
+/**
+ * Represents a stage instance.
+ * @extends {Base}
+ */
+class StageInstance extends Base {
+ constructor(client, data) {
+ super(client);
+
+ /**
+ * The stage instance's id
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+
+ this._patch(data);
+ }
+
+ _patch(data) {
+ if ('guild_id' in data) {
+ /**
+ * The id of the guild associated with the stage channel
+ * @type {Snowflake}
+ */
+ this.guildId = data.guild_id;
+ }
+
+ if ('channel_id' in data) {
+ /**
+ * The id of the channel associated with the stage channel
+ * @type {Snowflake}
+ */
+ this.channelId = data.channel_id;
+ }
+
+ if ('topic' in data) {
+ /**
+ * The topic of the stage instance
+ * @type {string}
+ */
+ this.topic = data.topic;
+ }
+
+ if ('privacy_level' in data) {
+ /**
+ * The privacy level of the stage instance
+ * @type {StageInstancePrivacyLevel}
+ */
+ this.privacyLevel = data.privacy_level;
+ }
+
+ if ('discoverable_disabled' in data) {
+ /**
+ * Whether or not stage discovery is disabled
+ * @type {?boolean}
+ * @deprecated See https://github.com/discord/discord-api-docs/pull/4296 for more information
+ */
+ this.discoverableDisabled = data.discoverable_disabled;
+ } else {
+ this.discoverableDisabled ??= null;
+ }
+
+ if ('guild_scheduled_event_id' in data) {
+ /**
+ * The associated guild scheduled event id of this stage instance
+ * @type {?Snowflake}
+ */
+ this.guildScheduledEventId = data.guild_scheduled_event_id;
+ } else {
+ this.guildScheduledEventId ??= null;
+ }
+ }
+
+ /**
+ * The stage channel associated with this stage instance
+ * @type {?StageChannel}
+ * @readonly
+ */
+ get channel() {
+ return this.client.channels.resolve(this.channelId);
+ }
+
+ /**
+ * The guild this stage instance belongs to
+ * @type {?Guild}
+ * @readonly
+ */
+ get guild() {
+ return this.client.guilds.resolve(this.guildId);
+ }
+
+ /**
+ * The associated guild scheduled event of this stage instance
+ * @type {?GuildScheduledEvent}
+ * @readonly
+ */
+ get guildScheduledEvent() {
+ return this.guild?.scheduledEvents.resolve(this.guildScheduledEventId) ?? null;
+ }
+
+ /**
+ * Edits this stage instance.
+ * @param {StageInstanceEditOptions} options The options to edit the stage instance
+ * @returns {Promise<StageInstance>}
+ * @example
+ * // Edit a stage instance
+ * stageInstance.edit({ topic: 'new topic' })
+ * .then(stageInstance => console.log(stageInstance))
+ * .catch(console.error)
+ */
+ edit(options) {
+ return this.guild.stageInstances.edit(this.channelId, options);
+ }
+
+ /**
+ * Deletes this stage instance.
+ * @returns {Promise<StageInstance>}
+ * @example
+ * // Delete a stage instance
+ * stageInstance.delete()
+ * .then(stageInstance => console.log(stageInstance))
+ * .catch(console.error);
+ */
+ async delete() {
+ await this.guild.stageInstances.delete(this.channelId);
+ const clone = this._clone();
+ return clone;
+ }
+
+ /**
+ * Sets the topic of this stage instance.
+ * @param {string} topic The topic for the stage instance
+ * @returns {Promise<StageInstance>}
+ * @example
+ * // Set topic of a stage instance
+ * stageInstance.setTopic('new topic')
+ * .then(stageInstance => console.log(`Set the topic to: ${stageInstance.topic}`))
+ * .catch(console.error);
+ */
+ setTopic(topic) {
+ return this.guild.stageInstances.edit(this.channelId, { topic });
+ }
+
+ /**
+ * The timestamp this stage instances was created at
+ * @type {number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return DiscordSnowflake.timestampFrom(this.id);
+ }
+
+ /**
+ * The time this stage instance was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+}
+
+exports.StageInstance = StageInstance;
diff --git a/node_modules/discord.js/src/structures/Sticker.js b/node_modules/discord.js/src/structures/Sticker.js
new file mode 100644
index 0000000..b0f2ef6
--- /dev/null
+++ b/node_modules/discord.js/src/structures/Sticker.js
@@ -0,0 +1,272 @@
+'use strict';
+
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const { Routes } = require('discord-api-types/v10');
+const Base = require('./Base');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+const { StickerFormatExtensionMap } = require('../util/Constants');
+
+/**
+ * Represents a Sticker.
+ * @extends {Base}
+ */
+class Sticker extends Base {
+ constructor(client, sticker) {
+ super(client);
+
+ this._patch(sticker);
+ }
+
+ _patch(sticker) {
+ /**
+ * The sticker's id
+ * @type {Snowflake}
+ */
+ this.id = sticker.id;
+
+ if ('description' in sticker) {
+ /**
+ * The description of the sticker
+ * @type {?string}
+ */
+ this.description = sticker.description;
+ } else {
+ this.description ??= null;
+ }
+
+ if ('type' in sticker) {
+ /**
+ * The type of the sticker
+ * @type {?StickerType}
+ */
+ this.type = sticker.type;
+ } else {
+ this.type ??= null;
+ }
+
+ if ('format_type' in sticker) {
+ /**
+ * The format of the sticker
+ * @type {StickerFormatType}
+ */
+ this.format = sticker.format_type;
+ }
+
+ if ('name' in sticker) {
+ /**
+ * The name of the sticker
+ * @type {string}
+ */
+ this.name = sticker.name;
+ }
+
+ if ('pack_id' in sticker) {
+ /**
+ * The id of the pack the sticker is from, for standard stickers
+ * @type {?Snowflake}
+ */
+ this.packId = sticker.pack_id;
+ } else {
+ this.packId ??= null;
+ }
+
+ if ('tags' in sticker) {
+ /**
+ * Autocomplete/suggestions for the sticker
+ * @type {?string}
+ */
+ this.tags = sticker.tags;
+ } else {
+ this.tags ??= null;
+ }
+
+ if ('available' in sticker) {
+ /**
+ * Whether or not the guild sticker is available
+ * @type {?boolean}
+ */
+ this.available = sticker.available;
+ } else {
+ this.available ??= null;
+ }
+
+ if ('guild_id' in sticker) {
+ /**
+ * The id of the guild that owns this sticker
+ * @type {?Snowflake}
+ */
+ this.guildId = sticker.guild_id;
+ } else {
+ this.guildId ??= null;
+ }
+
+ if ('user' in sticker) {
+ /**
+ * The user that uploaded the guild sticker
+ * @type {?User}
+ */
+ this.user = this.client.users._add(sticker.user);
+ } else {
+ this.user ??= null;
+ }
+
+ if ('sort_value' in sticker) {
+ /**
+ * The standard sticker's sort order within its pack
+ * @type {?number}
+ */
+ this.sortValue = sticker.sort_value;
+ } else {
+ this.sortValue ??= null;
+ }
+ }
+
+ /**
+ * The timestamp the sticker was created at
+ * @type {number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return DiscordSnowflake.timestampFrom(this.id);
+ }
+
+ /**
+ * The time the sticker was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ /**
+ * Whether this sticker is partial
+ * @type {boolean}
+ * @readonly
+ */
+ get partial() {
+ return !this.type;
+ }
+
+ /**
+ * The guild that owns this sticker
+ * @type {?Guild}
+ * @readonly
+ */
+ get guild() {
+ return this.client.guilds.resolve(this.guildId);
+ }
+
+ /**
+ * A link to the sticker
+ * <info>If the sticker's format is {@link StickerFormatType.Lottie}, it returns
+ * the URL of the Lottie JSON file.</info>
+ * @type {string}
+ * @readonly
+ */
+ get url() {
+ return this.client.rest.cdn.sticker(this.id, StickerFormatExtensionMap[this.format]);
+ }
+
+ /**
+ * Fetches this sticker.
+ * @returns {Promise<Sticker>}
+ */
+ async fetch() {
+ const data = await this.client.rest.get(Routes.sticker(this.id));
+ this._patch(data);
+ return this;
+ }
+
+ /**
+ * Fetches the pack this sticker is part of from Discord, if this is a Nitro sticker.
+ * @returns {Promise<?StickerPack>}
+ */
+ async fetchPack() {
+ return (this.packId && (await this.client.fetchPremiumStickerPacks()).get(this.packId)) ?? null;
+ }
+
+ /**
+ * Fetches the user who uploaded this sticker, if this is a guild sticker.
+ * @returns {Promise<?User>}
+ */
+ async fetchUser() {
+ if (this.partial) await this.fetch();
+ if (!this.guildId) throw new DiscordjsError(ErrorCodes.NotGuildSticker);
+ return this.guild.stickers.fetchUser(this);
+ }
+
+ /**
+ * Data for editing a sticker.
+ * @typedef {Object} GuildStickerEditOptions
+ * @property {string} [name] The name of the sticker
+ * @property {?string} [description] The description of the sticker
+ * @property {string} [tags] The Discord name of a unicode emoji representing the sticker's expression
+ * @property {string} [reason] Reason for editing this sticker
+ */
+
+ /**
+ * Edits the sticker.
+ * @param {GuildStickerEditOptions} options The options to provide
+ * @returns {Promise<Sticker>}
+ * @example
+ * // Update the name of a sticker
+ * sticker.edit({ name: 'new name' })
+ * .then(s => console.log(`Updated the name of the sticker to ${s.name}`))
+ * .catch(console.error);
+ */
+ edit(options) {
+ return this.guild.stickers.edit(this, options);
+ }
+
+ /**
+ * Deletes the sticker.
+ * @returns {Promise<Sticker>}
+ * @param {string} [reason] Reason for deleting this sticker
+ * @example
+ * // Delete a message
+ * sticker.delete()
+ * .then(s => console.log(`Deleted sticker ${s.name}`))
+ * .catch(console.error);
+ */
+ async delete(reason) {
+ await this.guild.stickers.delete(this, reason);
+ return this;
+ }
+
+ /**
+ * Whether this sticker is the same as another one.
+ * @param {Sticker|APISticker} other The sticker to compare it to
+ * @returns {boolean}
+ */
+ equals(other) {
+ if (other instanceof Sticker) {
+ return (
+ other.id === this.id &&
+ other.description === this.description &&
+ other.type === this.type &&
+ other.format === this.format &&
+ other.name === this.name &&
+ other.packId === this.packId &&
+ other.tags === this.tags &&
+ other.available === this.available &&
+ other.guildId === this.guildId &&
+ other.sortValue === this.sortValue
+ );
+ } else {
+ return (
+ other.id === this.id &&
+ other.description === this.description &&
+ other.name === this.name &&
+ other.tags === this.tags
+ );
+ }
+ }
+}
+
+exports.Sticker = Sticker;
+
+/**
+ * @external APISticker
+ * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
+ */
diff --git a/node_modules/discord.js/src/structures/StickerPack.js b/node_modules/discord.js/src/structures/StickerPack.js
new file mode 100644
index 0000000..7e599b7
--- /dev/null
+++ b/node_modules/discord.js/src/structures/StickerPack.js
@@ -0,0 +1,95 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const Base = require('./Base');
+const { Sticker } = require('./Sticker');
+
+/**
+ * Represents a pack of standard stickers.
+ * @extends {Base}
+ */
+class StickerPack extends Base {
+ constructor(client, pack) {
+ super(client);
+ /**
+ * The Sticker pack's id
+ * @type {Snowflake}
+ */
+ this.id = pack.id;
+
+ /**
+ * The stickers in the pack
+ * @type {Collection<Snowflake, Sticker>}
+ */
+ this.stickers = new Collection(pack.stickers.map(s => [s.id, new Sticker(client, s)]));
+
+ /**
+ * The name of the sticker pack
+ * @type {string}
+ */
+ this.name = pack.name;
+
+ /**
+ * The id of the pack's SKU
+ * @type {Snowflake}
+ */
+ this.skuId = pack.sku_id;
+
+ /**
+ * The id of a sticker in the pack which is shown as the pack's icon
+ * @type {?Snowflake}
+ */
+ this.coverStickerId = pack.cover_sticker_id ?? null;
+
+ /**
+ * The description of the sticker pack
+ * @type {string}
+ */
+ this.description = pack.description;
+
+ /**
+ * The id of the sticker pack's banner image
+ * @type {?Snowflake}
+ */
+ this.bannerId = pack.banner_asset_id ?? null;
+ }
+
+ /**
+ * The timestamp the sticker was created at
+ * @type {number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return DiscordSnowflake.timestampFrom(this.id);
+ }
+
+ /**
+ * The time the sticker was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ /**
+ * The sticker which is shown as the pack's icon
+ * @type {?Sticker}
+ * @readonly
+ */
+ get coverSticker() {
+ return this.coverStickerId && this.stickers.get(this.coverStickerId);
+ }
+
+ /**
+ * The URL to this sticker pack's banner.
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ bannerURL(options = {}) {
+ return this.bannerId && this.client.rest.cdn.stickerPackBanner(this.bannerId, options);
+ }
+}
+
+module.exports = StickerPack;
diff --git a/node_modules/discord.js/src/structures/StringSelectMenuBuilder.js b/node_modules/discord.js/src/structures/StringSelectMenuBuilder.js
new file mode 100644
index 0000000..ac555e7
--- /dev/null
+++ b/node_modules/discord.js/src/structures/StringSelectMenuBuilder.js
@@ -0,0 +1,79 @@
+'use strict';
+
+const { SelectMenuBuilder: BuildersSelectMenu, normalizeArray } = require('@discordjs/builders');
+const { isJSONEncodable } = require('@discordjs/util');
+const { toSnakeCase } = require('../util/Transformers');
+const { resolvePartialEmoji } = require('../util/Util');
+
+/**
+ * Class used to build select menu components to be sent through the API
+ * @extends {BuildersSelectMenu}
+ */
+class StringSelectMenuBuilder extends BuildersSelectMenu {
+ constructor({ options, ...data } = {}) {
+ super(
+ toSnakeCase({
+ ...data,
+ options: options?.map(({ emoji, ...option }) => ({
+ ...option,
+ emoji: emoji && typeof emoji === 'string' ? resolvePartialEmoji(emoji) : emoji,
+ })),
+ }),
+ );
+ }
+
+ /**
+ * Normalizes a select menu option emoji
+ * @param {SelectMenuOptionData|APISelectMenuOption} selectMenuOption The option to normalize
+ * @returns {SelectMenuOptionBuilder|APISelectMenuOption}
+ * @private
+ */
+ static normalizeEmoji(selectMenuOption) {
+ if (isJSONEncodable(selectMenuOption)) {
+ return selectMenuOption;
+ }
+
+ const { emoji, ...option } = selectMenuOption;
+ return {
+ ...option,
+ emoji: typeof emoji === 'string' ? resolvePartialEmoji(emoji) : emoji,
+ };
+ }
+
+ /**
+ * Adds options to this select menu
+ * @param {RestOrArray<APISelectMenuOption>} options The options to add to this select menu
+ * @returns {StringSelectMenuBuilder}
+ */
+ addOptions(...options) {
+ return super.addOptions(normalizeArray(options).map(option => StringSelectMenuBuilder.normalizeEmoji(option)));
+ }
+
+ /**
+ * Sets the options on this select menu
+ * @param {RestOrArray<APISelectMenuOption>} options The options to set on this select menu
+ * @returns {StringSelectMenuBuilder}
+ */
+ setOptions(...options) {
+ return super.setOptions(normalizeArray(options).map(option => StringSelectMenuBuilder.normalizeEmoji(option)));
+ }
+
+ /**
+ * Creates a new select menu builder from json data
+ * @param {StringSelectMenuBuilder|StringSelectMenuComponent|APIStringSelectComponent} other The other data
+ * @returns {StringSelectMenuBuilder}
+ */
+ static from(other) {
+ if (isJSONEncodable(other)) {
+ return new this(other.toJSON());
+ }
+ return new this(other);
+ }
+}
+
+module.exports = StringSelectMenuBuilder;
+
+/**
+ * @external BuildersSelectMenu
+ * @see {@link https://discord.js.org/docs/packages/builders/stable/StringSelectMenuBuilder:Class}
+ */
diff --git a/node_modules/discord.js/src/structures/StringSelectMenuComponent.js b/node_modules/discord.js/src/structures/StringSelectMenuComponent.js
new file mode 100644
index 0000000..e008ae5
--- /dev/null
+++ b/node_modules/discord.js/src/structures/StringSelectMenuComponent.js
@@ -0,0 +1,20 @@
+'use strict';
+
+const BaseSelectMenuComponent = require('./BaseSelectMenuComponent');
+
+/**
+ * Represents a string select menu component
+ * @extends {BaseSelectMenuComponent}
+ */
+class StringSelectMenuComponent extends BaseSelectMenuComponent {
+ /**
+ * The options in this select menu
+ * @type {APISelectMenuOption[]}
+ * @readonly
+ */
+ get options() {
+ return this.data.options;
+ }
+}
+
+module.exports = StringSelectMenuComponent;
diff --git a/node_modules/discord.js/src/structures/StringSelectMenuInteraction.js b/node_modules/discord.js/src/structures/StringSelectMenuInteraction.js
new file mode 100644
index 0000000..1db8c28
--- /dev/null
+++ b/node_modules/discord.js/src/structures/StringSelectMenuInteraction.js
@@ -0,0 +1,21 @@
+'use strict';
+
+const MessageComponentInteraction = require('./MessageComponentInteraction');
+
+/**
+ * Represents a {@link ComponentType.StringSelect} select menu interaction.
+ * @extends {MessageComponentInteraction}
+ */
+class StringSelectMenuInteraction extends MessageComponentInteraction {
+ constructor(client, data) {
+ super(client, data);
+
+ /**
+ * The values selected
+ * @type {string[]}
+ */
+ this.values = data.data.values ?? [];
+ }
+}
+
+module.exports = StringSelectMenuInteraction;
diff --git a/node_modules/discord.js/src/structures/StringSelectMenuOptionBuilder.js b/node_modules/discord.js/src/structures/StringSelectMenuOptionBuilder.js
new file mode 100644
index 0000000..cc85750
--- /dev/null
+++ b/node_modules/discord.js/src/structures/StringSelectMenuOptionBuilder.js
@@ -0,0 +1,49 @@
+'use strict';
+
+const { SelectMenuOptionBuilder: BuildersSelectMenuOption } = require('@discordjs/builders');
+const { isJSONEncodable } = require('@discordjs/util');
+const { toSnakeCase } = require('../util/Transformers');
+const { resolvePartialEmoji } = require('../util/Util');
+
+/**
+ * Represents a select menu option builder.
+ * @extends {BuildersSelectMenuOption}
+ */
+class StringSelectMenuOptionBuilder extends BuildersSelectMenuOption {
+ constructor({ emoji, ...data } = {}) {
+ super(
+ toSnakeCase({
+ ...data,
+ emoji: emoji && typeof emoji === 'string' ? resolvePartialEmoji(emoji) : emoji,
+ }),
+ );
+ }
+
+ /**
+ * Sets the emoji to display on this option
+ * @param {ComponentEmojiResolvable} emoji The emoji to display on this option
+ * @returns {StringSelectMenuOptionBuilder}
+ */
+ setEmoji(emoji) {
+ if (typeof emoji === 'string') {
+ return super.setEmoji(resolvePartialEmoji(emoji));
+ }
+ return super.setEmoji(emoji);
+ }
+
+ /**
+ * Creates a new select menu option builder from JSON data
+ * @param {StringSelectMenuOptionBuilder|APISelectMenuOption} other The other data
+ * @returns {StringSelectMenuOptionBuilder}
+ */
+ static from(other) {
+ return new this(isJSONEncodable(other) ? other.toJSON() : other);
+ }
+}
+
+module.exports = StringSelectMenuOptionBuilder;
+
+/**
+ * @external BuildersSelectMenuOption
+ * @see {@link https://discord.js.org/docs/packages/builders/stable/StringSelectMenuOptionBuilder:Class}
+ */
diff --git a/node_modules/discord.js/src/structures/Team.js b/node_modules/discord.js/src/structures/Team.js
new file mode 100644
index 0000000..98eb199
--- /dev/null
+++ b/node_modules/discord.js/src/structures/Team.js
@@ -0,0 +1,117 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const Base = require('./Base');
+const TeamMember = require('./TeamMember');
+
+/**
+ * Represents a Client OAuth2 Application Team.
+ * @extends {Base}
+ */
+class Team extends Base {
+ constructor(client, data) {
+ super(client);
+ this._patch(data);
+ }
+
+ _patch(data) {
+ /**
+ * The Team's id
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+
+ if ('name' in data) {
+ /**
+ * The name of the Team
+ * @type {string}
+ */
+ this.name = data.name;
+ }
+
+ if ('icon' in data) {
+ /**
+ * The Team's icon hash
+ * @type {?string}
+ */
+ this.icon = data.icon;
+ } else {
+ this.icon ??= null;
+ }
+
+ if ('owner_user_id' in data) {
+ /**
+ * The Team's owner id
+ * @type {?Snowflake}
+ */
+ this.ownerId = data.owner_user_id;
+ } else {
+ this.ownerId ??= null;
+ }
+ /**
+ * The Team's members
+ * @type {Collection<Snowflake, TeamMember>}
+ */
+ this.members = new Collection();
+
+ for (const memberData of data.members) {
+ const member = new TeamMember(this, memberData);
+ this.members.set(member.id, member);
+ }
+ }
+
+ /**
+ * The owner of this team
+ * @type {?TeamMember}
+ * @readonly
+ */
+ get owner() {
+ return this.members.get(this.ownerId) ?? null;
+ }
+
+ /**
+ * The timestamp the team was created at
+ * @type {number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return DiscordSnowflake.timestampFrom(this.id);
+ }
+
+ /**
+ * The time the team was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ /**
+ * A link to the team's icon.
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ iconURL(options = {}) {
+ return this.icon && this.client.rest.cdn.teamIcon(this.id, this.icon, options);
+ }
+
+ /**
+ * When concatenated with a string, this automatically returns the Team's name instead of the
+ * Team object.
+ * @returns {string}
+ * @example
+ * // Logs: Team name: My Team
+ * console.log(`Team name: ${team}`);
+ */
+ toString() {
+ return this.name;
+ }
+
+ toJSON() {
+ return super.toJSON({ createdTimestamp: true });
+ }
+}
+
+module.exports = Team;
diff --git a/node_modules/discord.js/src/structures/TeamMember.js b/node_modules/discord.js/src/structures/TeamMember.js
new file mode 100644
index 0000000..9270418
--- /dev/null
+++ b/node_modules/discord.js/src/structures/TeamMember.js
@@ -0,0 +1,70 @@
+'use strict';
+
+const Base = require('./Base');
+
+/**
+ * Represents a Client OAuth2 Application Team Member.
+ * @extends {Base}
+ */
+class TeamMember extends Base {
+ constructor(team, data) {
+ super(team.client);
+
+ /**
+ * The Team this member is part of
+ * @type {Team}
+ */
+ this.team = team;
+
+ this._patch(data);
+ }
+
+ _patch(data) {
+ if ('permissions' in data) {
+ /**
+ * The permissions this Team Member has with regard to the team
+ * @type {string[]}
+ */
+ this.permissions = data.permissions;
+ }
+
+ if ('membership_state' in data) {
+ /**
+ * The permissions this Team Member has with regard to the team
+ * @type {TeamMemberMembershipState}
+ */
+ this.membershipState = data.membership_state;
+ }
+
+ if ('user' in data) {
+ /**
+ * The user for this Team Member
+ * @type {User}
+ */
+ this.user = this.client.users._add(data.user);
+ }
+ }
+
+ /**
+ * The Team Member's id
+ * @type {Snowflake}
+ * @readonly
+ */
+ get id() {
+ return this.user.id;
+ }
+
+ /**
+ * When concatenated with a string, this automatically returns the team member's mention instead of the
+ * TeamMember object.
+ * @returns {string}
+ * @example
+ * // Logs: Team Member's mention: <@123456789012345678>
+ * console.log(`Team Member's mention: ${teamMember}`);
+ */
+ toString() {
+ return this.user.toString();
+ }
+}
+
+module.exports = TeamMember;
diff --git a/node_modules/discord.js/src/structures/TextChannel.js b/node_modules/discord.js/src/structures/TextChannel.js
new file mode 100644
index 0000000..66cc8c4
--- /dev/null
+++ b/node_modules/discord.js/src/structures/TextChannel.js
@@ -0,0 +1,33 @@
+'use strict';
+
+const BaseGuildTextChannel = require('./BaseGuildTextChannel');
+
+/**
+ * Represents a guild text channel on Discord.
+ * @extends {BaseGuildTextChannel}
+ */
+class TextChannel extends BaseGuildTextChannel {
+ _patch(data) {
+ super._patch(data);
+
+ if ('rate_limit_per_user' in data) {
+ /**
+ * The rate limit per user (slowmode) for this channel in seconds
+ * @type {number}
+ */
+ this.rateLimitPerUser = data.rate_limit_per_user;
+ }
+ }
+
+ /**
+ * Sets the rate limit per user (slowmode) for this channel.
+ * @param {number} rateLimitPerUser The new rate limit in seconds
+ * @param {string} [reason] Reason for changing the channel's rate limit
+ * @returns {Promise<TextChannel>}
+ */
+ setRateLimitPerUser(rateLimitPerUser, reason) {
+ return this.edit({ rateLimitPerUser, reason });
+ }
+}
+
+module.exports = TextChannel;
diff --git a/node_modules/discord.js/src/structures/TextInputBuilder.js b/node_modules/discord.js/src/structures/TextInputBuilder.js
new file mode 100644
index 0000000..9382154
--- /dev/null
+++ b/node_modules/discord.js/src/structures/TextInputBuilder.js
@@ -0,0 +1,31 @@
+'use strict';
+
+const { TextInputBuilder: BuildersTextInput } = require('@discordjs/builders');
+const { isJSONEncodable } = require('@discordjs/util');
+const { toSnakeCase } = require('../util/Transformers');
+
+/**
+ * Represents a text input builder.
+ * @extends {BuildersTextInput}
+ */
+class TextInputBuilder extends BuildersTextInput {
+ constructor(data) {
+ super(toSnakeCase(data));
+ }
+
+ /**
+ * Creates a new text input builder from JSON data
+ * @param {TextInputBuilder|TextInputComponent|APITextInputComponent} other The other data
+ * @returns {TextInputBuilder}
+ */
+ static from(other) {
+ return new this(isJSONEncodable(other) ? other.toJSON() : other);
+ }
+}
+
+module.exports = TextInputBuilder;
+
+/**
+ * @external BuildersTextInput
+ * @see {@link https://discord.js.org/docs/packages/builders/stable/TextInputBuilder:Class}
+ */
diff --git a/node_modules/discord.js/src/structures/TextInputComponent.js b/node_modules/discord.js/src/structures/TextInputComponent.js
new file mode 100644
index 0000000..3cc3115
--- /dev/null
+++ b/node_modules/discord.js/src/structures/TextInputComponent.js
@@ -0,0 +1,29 @@
+'use strict';
+
+const Component = require('./Component');
+
+/**
+ * Represents a text input component.
+ * @extends {Component}
+ */
+class TextInputComponent extends Component {
+ /**
+ * The custom id of this text input
+ * @type {string}
+ * @readonly
+ */
+ get customId() {
+ return this.data.custom_id;
+ }
+
+ /**
+ * The value for this text input
+ * @type {string}
+ * @readonly
+ */
+ get value() {
+ return this.data.value;
+ }
+}
+
+module.exports = TextInputComponent;
diff --git a/node_modules/discord.js/src/structures/ThreadChannel.js b/node_modules/discord.js/src/structures/ThreadChannel.js
new file mode 100644
index 0000000..96b4087
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ThreadChannel.js
@@ -0,0 +1,606 @@
+'use strict';
+
+const { ChannelType, PermissionFlagsBits, Routes, ChannelFlags } = require('discord-api-types/v10');
+const { BaseChannel } = require('./BaseChannel');
+const TextBasedChannel = require('./interfaces/TextBasedChannel');
+const { DiscordjsRangeError, ErrorCodes } = require('../errors');
+const GuildMessageManager = require('../managers/GuildMessageManager');
+const ThreadMemberManager = require('../managers/ThreadMemberManager');
+const ChannelFlagsBitField = require('../util/ChannelFlagsBitField');
+
+/**
+ * Represents a thread channel on Discord.
+ * @extends {BaseChannel}
+ * @implements {TextBasedChannel}
+ */
+class ThreadChannel extends BaseChannel {
+ constructor(guild, data, client) {
+ super(guild?.client ?? client, data, false);
+
+ /**
+ * The guild the thread is in
+ * @type {Guild}
+ */
+ this.guild = guild;
+
+ /**
+ * The id of the guild the channel is in
+ * @type {Snowflake}
+ */
+ this.guildId = guild?.id ?? data.guild_id;
+
+ /**
+ * A manager of the messages sent to this thread
+ * @type {GuildMessageManager}
+ */
+ this.messages = new GuildMessageManager(this);
+
+ /**
+ * A manager of the members that are part of this thread
+ * @type {ThreadMemberManager}
+ */
+ this.members = new ThreadMemberManager(this);
+ if (data) this._patch(data);
+ }
+
+ _patch(data) {
+ super._patch(data);
+
+ if ('message' in data) this.messages._add(data.message);
+
+ if ('name' in data) {
+ /**
+ * The name of the thread
+ * @type {string}
+ */
+ this.name = data.name;
+ }
+
+ if ('guild_id' in data) {
+ this.guildId = data.guild_id;
+ }
+
+ if ('parent_id' in data) {
+ /**
+ * The id of the parent channel of this thread
+ * @type {?Snowflake}
+ */
+ this.parentId = data.parent_id;
+ } else {
+ this.parentId ??= null;
+ }
+
+ if ('thread_metadata' in data) {
+ /**
+ * Whether the thread is locked
+ * @type {?boolean}
+ */
+ this.locked = data.thread_metadata.locked ?? false;
+
+ /**
+ * Whether members without the {@link PermissionFlagsBits.ManageThreads} permission
+ * can invite other members to this thread.
+ * <info>This property is always `null` in public threads.</info>
+ * @type {?boolean}
+ */
+ this.invitable = this.type === ChannelType.PrivateThread ? data.thread_metadata.invitable ?? false : null;
+
+ /**
+ * Whether the thread is archived
+ * @type {?boolean}
+ */
+ this.archived = data.thread_metadata.archived;
+
+ /**
+ * The amount of time (in minutes) after which the thread will automatically archive in case of no recent activity
+ * @type {?ThreadAutoArchiveDuration}
+ */
+ this.autoArchiveDuration = data.thread_metadata.auto_archive_duration;
+
+ /**
+ * The timestamp when the thread's archive status was last changed
+ * <info>If the thread was never archived or unarchived, this is the timestamp at which the thread was
+ * created</info>
+ * @type {?number}
+ */
+ this.archiveTimestamp = Date.parse(data.thread_metadata.archive_timestamp);
+
+ if ('create_timestamp' in data.thread_metadata) {
+ // Note: this is needed because we can't assign directly to getters
+ this._createdTimestamp = Date.parse(data.thread_metadata.create_timestamp);
+ }
+ } else {
+ this.locked ??= null;
+ this.archived ??= null;
+ this.autoArchiveDuration ??= null;
+ this.archiveTimestamp ??= null;
+ this.invitable ??= null;
+ }
+
+ this._createdTimestamp ??= this.type === ChannelType.PrivateThread ? super.createdTimestamp : null;
+
+ if ('owner_id' in data) {
+ /**
+ * The id of the member who created this thread
+ * @type {?Snowflake}
+ */
+ this.ownerId = data.owner_id;
+ } else {
+ this.ownerId ??= null;
+ }
+
+ if ('last_message_id' in data) {
+ /**
+ * The last message id sent in this thread, if one was sent
+ * @type {?Snowflake}
+ */
+ this.lastMessageId = data.last_message_id;
+ } else {
+ this.lastMessageId ??= null;
+ }
+
+ if ('last_pin_timestamp' in data) {
+ /**
+ * The timestamp when the last pinned message was pinned, if there was one
+ * @type {?number}
+ */
+ this.lastPinTimestamp = data.last_pin_timestamp ? Date.parse(data.last_pin_timestamp) : null;
+ } else {
+ this.lastPinTimestamp ??= null;
+ }
+
+ if ('rate_limit_per_user' in data) {
+ /**
+ * The rate limit per user (slowmode) for this thread in seconds
+ * @type {?number}
+ */
+ this.rateLimitPerUser = data.rate_limit_per_user ?? 0;
+ } else {
+ this.rateLimitPerUser ??= null;
+ }
+
+ if ('message_count' in data) {
+ /**
+ * The approximate count of messages in this thread
+ * <info>Threads created before July 1, 2022 may have an inaccurate count.
+ * If you need an approximate value higher than that, use `ThreadChannel#messages.cache.size`</info>
+ * @type {?number}
+ */
+ this.messageCount = data.message_count;
+ } else {
+ this.messageCount ??= null;
+ }
+
+ if ('member_count' in data) {
+ /**
+ * The approximate count of users in this thread
+ * <info>This stops counting at 50. If you need an approximate value higher than that, use
+ * `ThreadChannel#members.cache.size`</info>
+ * @type {?number}
+ */
+ this.memberCount = data.member_count;
+ } else {
+ this.memberCount ??= null;
+ }
+
+ if ('total_message_sent' in data) {
+ /**
+ * The number of messages ever sent in a thread, similar to {@link ThreadChannel#messageCount} except it
+ * will not decrement whenever a message is deleted
+ * @type {?number}
+ */
+ this.totalMessageSent = data.total_message_sent;
+ } else {
+ this.totalMessageSent ??= null;
+ }
+
+ if (data.member && this.client.user) this.members._add({ user_id: this.client.user.id, ...data.member });
+ if (data.messages) for (const message of data.messages) this.messages._add(message);
+
+ if ('applied_tags' in data) {
+ /**
+ * The tags applied to this thread
+ * @type {Snowflake[]}
+ */
+ this.appliedTags = data.applied_tags;
+ } else {
+ this.appliedTags ??= [];
+ }
+ }
+
+ /**
+ * The timestamp when this thread was created. This isn't available for threads
+ * created before 2022-01-09
+ * @type {?number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return this._createdTimestamp;
+ }
+
+ /**
+ * A collection of associated guild member objects of this thread's members
+ * @type {Collection<Snowflake, GuildMember>}
+ * @readonly
+ */
+ get guildMembers() {
+ return this.members.cache.mapValues(member => member.guildMember);
+ }
+
+ /**
+ * The time at which this thread's archive status was last changed
+ * <info>If the thread was never archived or unarchived, this is the time at which the thread was created</info>
+ * @type {?Date}
+ * @readonly
+ */
+ get archivedAt() {
+ return this.archiveTimestamp && new Date(this.archiveTimestamp);
+ }
+
+ /**
+ * The time the thread was created at
+ * @type {?Date}
+ * @readonly
+ */
+ get createdAt() {
+ return this.createdTimestamp && new Date(this.createdTimestamp);
+ }
+
+ /**
+ * The parent channel of this thread
+ * @type {?(NewsChannel|TextChannel|ForumChannel)}
+ * @readonly
+ */
+ get parent() {
+ return this.guild.channels.resolve(this.parentId);
+ }
+
+ /**
+ * Makes the client user join the thread.
+ * @returns {Promise<ThreadChannel>}
+ */
+ async join() {
+ await this.members.add('@me');
+ return this;
+ }
+
+ /**
+ * Makes the client user leave the thread.
+ * @returns {Promise<ThreadChannel>}
+ */
+ async leave() {
+ await this.members.remove('@me');
+ return this;
+ }
+
+ /**
+ * Gets the overall set of permissions for a member or role in this thread's parent channel, taking overwrites into
+ * account.
+ * @param {GuildMemberResolvable|RoleResolvable} memberOrRole The member or role to obtain the overall permissions for
+ * @param {boolean} [checkAdmin=true] Whether having the {@link PermissionFlagsBits.Administrator} permission
+ * will return all permissions
+ * @returns {?Readonly<PermissionsBitField>}
+ */
+ permissionsFor(memberOrRole, checkAdmin) {
+ return this.parent?.permissionsFor(memberOrRole, checkAdmin) ?? null;
+ }
+
+ /**
+ * Fetches the owner of this thread. If the thread member object isn't needed,
+ * use {@link ThreadChannel#ownerId} instead.
+ * @param {BaseFetchOptions} [options] The options for fetching the member
+ * @returns {Promise<?ThreadMember>}
+ */
+ async fetchOwner({ cache = true, force = false } = {}) {
+ if (!force) {
+ const existing = this.members.cache.get(this.ownerId);
+ if (existing) return existing;
+ }
+
+ // We cannot fetch a single thread member, as of this commit's date, Discord API responds with 405
+ const members = await this.members.fetch({ cache });
+ return members.get(this.ownerId) ?? null;
+ }
+
+ /**
+ * Fetches the message that started this thread, if any.
+ * <info>The `Promise` will reject if the original message in a forum post is deleted
+ * or when the original message in the parent channel is deleted.
+ * If you just need the id of that message, use {@link ThreadChannel#id} instead.</info>
+ * @param {BaseFetchOptions} [options] Additional options for this fetch
+ * @returns {Promise<Message<true>|null>}
+ */
+ // eslint-disable-next-line require-await
+ async fetchStarterMessage(options) {
+ const channel = this.parent?.type === ChannelType.GuildForum ? this : this.parent;
+ return channel?.messages.fetch({ message: this.id, ...options }) ?? null;
+ }
+
+ /**
+ * The options used to edit a thread channel
+ * @typedef {Object} ThreadEditOptions
+ * @property {string} [name] The new name for the thread
+ * @property {boolean} [archived] Whether the thread is archived
+ * @property {ThreadAutoArchiveDuration} [autoArchiveDuration] The amount of time after which the thread
+ * should automatically archive in case of no recent activity
+ * @property {number} [rateLimitPerUser] The rate limit per user (slowmode) for the thread in seconds
+ * @property {boolean} [locked] Whether the thread is locked
+ * @property {boolean} [invitable] Whether non-moderators can add other non-moderators to a thread
+ * <info>Can only be edited on {@link ChannelType.PrivateThread}</info>
+ * @property {Snowflake[]} [appliedTags] The tags to apply to the thread
+ * @property {ChannelFlagsResolvable} [flags] The flags to set on the channel
+ * @property {string} [reason] Reason for editing the thread
+ */
+
+ /**
+ * Edits this thread.
+ * @param {ThreadEditOptions} options The options to provide
+ * @returns {Promise<ThreadChannel>}
+ * @example
+ * // Edit a thread
+ * thread.edit({ name: 'new-thread' })
+ * .then(editedThread => console.log(editedThread))
+ * .catch(console.error);
+ */
+ async edit(options) {
+ const newData = await this.client.rest.patch(Routes.channel(this.id), {
+ body: {
+ name: (options.name ?? this.name).trim(),
+ archived: options.archived,
+ auto_archive_duration: options.autoArchiveDuration,
+ rate_limit_per_user: options.rateLimitPerUser,
+ locked: options.locked,
+ invitable: this.type === ChannelType.PrivateThread ? options.invitable : undefined,
+ applied_tags: options.appliedTags,
+ flags: 'flags' in options ? ChannelFlagsBitField.resolve(options.flags) : undefined,
+ },
+ reason: options.reason,
+ });
+
+ return this.client.actions.ChannelUpdate.handle(newData).updated;
+ }
+
+ /**
+ * Sets whether the thread is archived.
+ * @param {boolean} [archived=true] Whether the thread is archived
+ * @param {string} [reason] Reason for archiving or unarchiving
+ * @returns {Promise<ThreadChannel>}
+ * @example
+ * // Archive the thread
+ * thread.setArchived(true)
+ * .then(newThread => console.log(`Thread is now ${newThread.archived ? 'archived' : 'active'}`))
+ * .catch(console.error);
+ */
+ setArchived(archived = true, reason) {
+ return this.edit({ archived, reason });
+ }
+
+ /**
+ * Sets the duration after which the thread will automatically archive in case of no recent activity.
+ * @param {ThreadAutoArchiveDuration} autoArchiveDuration The amount of time after which the thread
+ * should automatically archive in case of no recent activity
+ * @param {string} [reason] Reason for changing the auto archive duration
+ * @returns {Promise<ThreadChannel>}
+ * @example
+ * // Set the thread's auto archive time to 1 hour
+ * thread.setAutoArchiveDuration(ThreadAutoArchiveDuration.OneHour)
+ * .then(newThread => {
+ * console.log(`Thread will now archive after ${newThread.autoArchiveDuration} minutes of inactivity`);
+ * });
+ * .catch(console.error);
+ */
+ setAutoArchiveDuration(autoArchiveDuration, reason) {
+ return this.edit({ autoArchiveDuration, reason });
+ }
+
+ /**
+ * Sets whether members without the {@link PermissionFlagsBits.ManageThreads} permission
+ * can invite other members to this thread.
+ * @param {boolean} [invitable=true] Whether non-moderators can invite non-moderators to this thread
+ * @param {string} [reason] Reason for changing invite
+ * @returns {Promise<ThreadChannel>}
+ */
+ setInvitable(invitable = true, reason) {
+ if (this.type !== ChannelType.PrivateThread) {
+ return Promise.reject(new DiscordjsRangeError(ErrorCodes.ThreadInvitableType, this.type));
+ }
+ return this.edit({ invitable, reason });
+ }
+
+ /**
+ * Sets whether the thread can be **unarchived** by anyone with the
+ * {@link PermissionFlagsBits.SendMessages} permission. When a thread is locked, only members with the
+ * {@link PermissionFlagsBits.ManageThreads} permission can unarchive it.
+ * @param {boolean} [locked=true] Whether the thread is locked
+ * @param {string} [reason] Reason for locking or unlocking the thread
+ * @returns {Promise<ThreadChannel>}
+ * @example
+ * // Set the thread to locked
+ * thread.setLocked(true)
+ * .then(newThread => console.log(`Thread is now ${newThread.locked ? 'locked' : 'unlocked'}`))
+ * .catch(console.error);
+ */
+ setLocked(locked = true, reason) {
+ return this.edit({ locked, reason });
+ }
+
+ /**
+ * Sets a new name for this thread.
+ * @param {string} name The new name for the thread
+ * @param {string} [reason] Reason for changing the thread's name
+ * @returns {Promise<ThreadChannel>}
+ * @example
+ * // Change the thread's name
+ * thread.setName('not_general')
+ * .then(newThread => console.log(`Thread's new name is ${newThread.name}`))
+ * .catch(console.error);
+ */
+ setName(name, reason) {
+ return this.edit({ name, reason });
+ }
+
+ /**
+ * Sets the rate limit per user (slowmode) for this thread.
+ * @param {number} rateLimitPerUser The new rate limit in seconds
+ * @param {string} [reason] Reason for changing the thread's rate limit
+ * @returns {Promise<ThreadChannel>}
+ */
+ setRateLimitPerUser(rateLimitPerUser, reason) {
+ return this.edit({ rateLimitPerUser, reason });
+ }
+
+ /**
+ * Set the applied tags for this channel (only applicable to forum threads)
+ * @param {Snowflake[]} appliedTags The tags to set for this channel
+ * @param {string} [reason] Reason for changing the thread's applied tags
+ * @returns {Promise<ThreadChannel>}
+ */
+ setAppliedTags(appliedTags, reason) {
+ return this.edit({ appliedTags, reason });
+ }
+
+ /**
+ * Pins this thread from the forum channel (only applicable to forum threads).
+ * @param {string} [reason] Reason for pinning
+ * @returns {Promise<ThreadChannel>}
+ */
+ pin(reason) {
+ return this.edit({ flags: this.flags.add(ChannelFlags.Pinned), reason });
+ }
+
+ /**
+ * Unpins this thread from the forum channel (only applicable to forum threads).
+ * @param {string} [reason] Reason for unpinning
+ * @returns {Promise<ThreadChannel>}
+ */
+ unpin(reason) {
+ return this.edit({ flags: this.flags.remove(ChannelFlags.Pinned), reason });
+ }
+
+ /**
+ * Whether the client user is a member of the thread.
+ * @type {boolean}
+ * @readonly
+ */
+ get joined() {
+ return this.members.cache.has(this.client.user?.id);
+ }
+
+ /**
+ * Whether the thread is editable by the client user (name, archived, autoArchiveDuration)
+ * @type {boolean}
+ * @readonly
+ */
+ get editable() {
+ return (
+ (this.ownerId === this.client.user.id && (this.type !== ChannelType.PrivateThread || this.joined)) ||
+ this.manageable
+ );
+ }
+
+ /**
+ * Whether the thread is joinable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get joinable() {
+ return (
+ !this.archived &&
+ !this.joined &&
+ this.permissionsFor(this.client.user)?.has(
+ this.type === ChannelType.PrivateThread ? PermissionFlagsBits.ManageThreads : PermissionFlagsBits.ViewChannel,
+ false,
+ )
+ );
+ }
+
+ /**
+ * Whether the thread is manageable by the client user, for deleting or editing rateLimitPerUser or locked.
+ * @type {boolean}
+ * @readonly
+ */
+ get manageable() {
+ const permissions = this.permissionsFor(this.client.user);
+ if (!permissions) return false;
+ // This flag allows managing even if timed out
+ if (permissions.has(PermissionFlagsBits.Administrator, false)) return true;
+
+ return (
+ this.guild.members.me.communicationDisabledUntilTimestamp < Date.now() &&
+ permissions.has(PermissionFlagsBits.ManageThreads, false)
+ );
+ }
+
+ /**
+ * Whether the thread is viewable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get viewable() {
+ if (this.client.user.id === this.guild.ownerId) return true;
+ const permissions = this.permissionsFor(this.client.user);
+ if (!permissions) return false;
+ return permissions.has(PermissionFlagsBits.ViewChannel, false);
+ }
+
+ /**
+ * Whether the client user can send messages in this thread
+ * @type {boolean}
+ * @readonly
+ */
+ get sendable() {
+ const permissions = this.permissionsFor(this.client.user);
+ if (!permissions) return false;
+ // This flag allows sending even if timed out
+ if (permissions.has(PermissionFlagsBits.Administrator, false)) return true;
+
+ return (
+ !(this.archived && this.locked && !this.manageable) &&
+ (this.type !== ChannelType.PrivateThread || this.joined || this.manageable) &&
+ permissions.has(PermissionFlagsBits.SendMessagesInThreads, false) &&
+ this.guild.members.me.communicationDisabledUntilTimestamp < Date.now()
+ );
+ }
+
+ /**
+ * Whether the thread is unarchivable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get unarchivable() {
+ return this.archived && this.sendable && (!this.locked || this.manageable);
+ }
+
+ /**
+ * Deletes this thread.
+ * @param {string} [reason] Reason for deleting this thread
+ * @returns {Promise<ThreadChannel>}
+ * @example
+ * // Delete the thread
+ * thread.delete('cleaning out old threads')
+ * .then(deletedThread => console.log(deletedThread))
+ * .catch(console.error);
+ */
+ async delete(reason) {
+ await this.guild.channels.delete(this.id, reason);
+ return this;
+ }
+
+ // These are here only for documentation purposes - they are implemented by TextBasedChannel
+ /* eslint-disable no-empty-function */
+ get lastMessage() {}
+ get lastPinAt() {}
+ send() {}
+ sendTyping() {}
+ createMessageCollector() {}
+ awaitMessages() {}
+ createMessageComponentCollector() {}
+ awaitMessageComponent() {}
+ bulkDelete() {}
+ // Doesn't work on Thread channels; setRateLimitPerUser() {}
+ // Doesn't work on Thread channels; setNSFW() {}
+}
+
+TextBasedChannel.applyToClass(ThreadChannel, true, ['fetchWebhooks', 'setRateLimitPerUser', 'setNSFW']);
+
+module.exports = ThreadChannel;
diff --git a/node_modules/discord.js/src/structures/ThreadMember.js b/node_modules/discord.js/src/structures/ThreadMember.js
new file mode 100644
index 0000000..fc79dd0
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ThreadMember.js
@@ -0,0 +1,113 @@
+'use strict';
+
+const Base = require('./Base');
+const ThreadMemberFlagsBitField = require('../util/ThreadMemberFlagsBitField');
+
+/**
+ * Represents a Member for a Thread.
+ * @extends {Base}
+ */
+class ThreadMember extends Base {
+ constructor(thread, data, extra = {}) {
+ super(thread.client);
+
+ /**
+ * The thread that this member is a part of
+ * @type {ThreadChannel}
+ */
+ this.thread = thread;
+
+ /**
+ * The timestamp the member last joined the thread at
+ * @type {?number}
+ */
+ this.joinedTimestamp = null;
+
+ /**
+ * The flags for this thread member. This will be `null` if partial.
+ * @type {?ThreadMemberFlagsBitField}
+ */
+ this.flags = null;
+
+ /**
+ * The id of the thread member
+ * @type {Snowflake}
+ */
+ this.id = data.user_id;
+
+ this._patch(data, extra);
+ }
+
+ _patch(data, extra = {}) {
+ if ('join_timestamp' in data) this.joinedTimestamp = Date.parse(data.join_timestamp);
+ if ('flags' in data) this.flags = new ThreadMemberFlagsBitField(data.flags).freeze();
+
+ if ('member' in data) {
+ /**
+ * The guild member associated with this thread member.
+ * @type {?GuildMember}
+ * @private
+ */
+ this.member = this.thread.guild.members._add(data.member, extra.cache);
+ } else {
+ this.member ??= null;
+ }
+ }
+
+ /**
+ * Whether this thread member is a partial
+ * @type {boolean}
+ * @readonly
+ */
+ get partial() {
+ return this.flags === null;
+ }
+
+ /**
+ * The guild member associated with this thread member
+ * @type {?GuildMember}
+ * @readonly
+ */
+ get guildMember() {
+ return this.member ?? this.thread.guild.members.resolve(this.id);
+ }
+
+ /**
+ * The last time this member joined the thread
+ * @type {?Date}
+ * @readonly
+ */
+ get joinedAt() {
+ return this.joinedTimestamp && new Date(this.joinedTimestamp);
+ }
+
+ /**
+ * The user associated with this thread member
+ * @type {?User}
+ * @readonly
+ */
+ get user() {
+ return this.client.users.resolve(this.id);
+ }
+
+ /**
+ * Whether the client user can manage this thread member
+ * @type {boolean}
+ * @readonly
+ */
+ get manageable() {
+ return !this.thread.archived && this.thread.editable;
+ }
+
+ /**
+ * Removes this member from the thread.
+ * @param {string} [reason] Reason for removing the member
+ * @returns {ThreadMember}
+ */
+ async remove(reason) {
+ await this.thread.members.remove(this.id, reason);
+ return this;
+ }
+}
+
+module.exports = ThreadMember;
diff --git a/node_modules/discord.js/src/structures/Typing.js b/node_modules/discord.js/src/structures/Typing.js
new file mode 100644
index 0000000..341d7ca
--- /dev/null
+++ b/node_modules/discord.js/src/structures/Typing.js
@@ -0,0 +1,74 @@
+'use strict';
+
+const Base = require('./Base');
+
+/**
+ * Represents a typing state for a user in a channel.
+ * @extends {Base}
+ */
+class Typing extends Base {
+ constructor(channel, user, data) {
+ super(channel.client);
+
+ /**
+ * The channel the status is from
+ * @type {TextBasedChannels}
+ */
+ this.channel = channel;
+
+ /**
+ * The user who is typing
+ * @type {User}
+ */
+ this.user = user;
+
+ this._patch(data);
+ }
+
+ _patch(data) {
+ if ('timestamp' in data) {
+ /**
+ * The UNIX timestamp in milliseconds the user started typing at
+ * @type {number}
+ */
+ this.startedTimestamp = data.timestamp * 1_000;
+ }
+ }
+
+ /**
+ * Indicates whether the status is received from a guild.
+ * @returns {boolean}
+ */
+ inGuild() {
+ return this.guild !== null;
+ }
+
+ /**
+ * The time the user started typing at
+ * @type {Date}
+ * @readonly
+ */
+ get startedAt() {
+ return new Date(this.startedTimestamp);
+ }
+
+ /**
+ * The guild the status is from
+ * @type {?Guild}
+ * @readonly
+ */
+ get guild() {
+ return this.channel.guild ?? null;
+ }
+
+ /**
+ * The member who is typing
+ * @type {?GuildMember}
+ * @readonly
+ */
+ get member() {
+ return this.guild?.members.resolve(this.user) ?? null;
+ }
+}
+
+module.exports = Typing;
diff --git a/node_modules/discord.js/src/structures/User.js b/node_modules/discord.js/src/structures/User.js
new file mode 100644
index 0000000..4e38d2d
--- /dev/null
+++ b/node_modules/discord.js/src/structures/User.js
@@ -0,0 +1,380 @@
+'use strict';
+
+const { userMention } = require('@discordjs/builders');
+const { calculateUserDefaultAvatarIndex } = require('@discordjs/rest');
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const Base = require('./Base');
+const TextBasedChannel = require('./interfaces/TextBasedChannel');
+const UserFlagsBitField = require('../util/UserFlagsBitField');
+
+/**
+ * Represents a user on Discord.
+ * @implements {TextBasedChannel}
+ * @extends {Base}
+ */
+class User extends Base {
+ constructor(client, data) {
+ super(client);
+
+ /**
+ * The user's id
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+
+ this.bot = null;
+
+ this.system = null;
+
+ this.flags = null;
+
+ this._patch(data);
+ }
+
+ _patch(data) {
+ if ('username' in data) {
+ /**
+ * The username of the user
+ * @type {?string}
+ */
+ this.username = data.username;
+ } else {
+ this.username ??= null;
+ }
+
+ if ('global_name' in data) {
+ /**
+ * The global name of this user
+ * @type {?string}
+ */
+ this.globalName = data.global_name;
+ } else {
+ this.globalName ??= null;
+ }
+
+ if ('bot' in data) {
+ /**
+ * Whether or not the user is a bot
+ * @type {?boolean}
+ */
+ this.bot = Boolean(data.bot);
+ } else if (!this.partial && typeof this.bot !== 'boolean') {
+ this.bot = false;
+ }
+
+ if ('discriminator' in data) {
+ /**
+ * The discriminator of this user
+ * <info>`'0'`, or a 4-digit stringified number if they're using the legacy username system</info>
+ * @type {?string}
+ */
+ this.discriminator = data.discriminator;
+ } else {
+ this.discriminator ??= null;
+ }
+
+ if ('avatar' in data) {
+ /**
+ * The user avatar's hash
+ * @type {?string}
+ */
+ this.avatar = data.avatar;
+ } else {
+ this.avatar ??= null;
+ }
+
+ if ('banner' in data) {
+ /**
+ * The user banner's hash
+ * <info>The user must be force fetched for this property to be present or be updated</info>
+ * @type {?string}
+ */
+ this.banner = data.banner;
+ } else if (this.banner !== null) {
+ this.banner ??= undefined;
+ }
+
+ if ('accent_color' in data) {
+ /**
+ * The base 10 accent color of the user's banner
+ * <info>The user must be force fetched for this property to be present or be updated</info>
+ * @type {?number}
+ */
+ this.accentColor = data.accent_color;
+ } else if (this.accentColor !== null) {
+ this.accentColor ??= undefined;
+ }
+
+ if ('system' in data) {
+ /**
+ * Whether the user is an Official Discord System user (part of the urgent message system)
+ * @type {?boolean}
+ */
+ this.system = Boolean(data.system);
+ } else if (!this.partial && typeof this.system !== 'boolean') {
+ this.system = false;
+ }
+
+ if ('public_flags' in data) {
+ /**
+ * The flags for this user
+ * @type {?UserFlagsBitField}
+ */
+ this.flags = new UserFlagsBitField(data.public_flags);
+ }
+
+ if ('avatar_decoration' in data) {
+ /**
+ * The user avatar decoration's hash
+ * @type {?string}
+ */
+ this.avatarDecoration = data.avatar_decoration;
+ } else {
+ this.avatarDecoration ??= null;
+ }
+ }
+
+ /**
+ * Whether this User is a partial
+ * @type {boolean}
+ * @readonly
+ */
+ get partial() {
+ return typeof this.username !== 'string';
+ }
+
+ /**
+ * The timestamp the user was created at
+ * @type {number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return DiscordSnowflake.timestampFrom(this.id);
+ }
+
+ /**
+ * The time the user was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ /**
+ * A link to the user's avatar.
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ avatarURL(options = {}) {
+ return this.avatar && this.client.rest.cdn.avatar(this.id, this.avatar, options);
+ }
+
+ /**
+ * A link to the user's avatar decoration.
+ * @param {BaseImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ avatarDecorationURL(options = {}) {
+ return this.avatarDecoration && this.client.rest.cdn.avatarDecoration(this.id, this.avatarDecoration, options);
+ }
+
+ /**
+ * A link to the user's default avatar
+ * @type {string}
+ * @readonly
+ */
+ get defaultAvatarURL() {
+ const index = this.discriminator === '0' ? calculateUserDefaultAvatarIndex(this.id) : this.discriminator % 5;
+ return this.client.rest.cdn.defaultAvatar(index);
+ }
+
+ /**
+ * A link to the user's avatar if they have one.
+ * Otherwise a link to their default avatar will be returned.
+ * @param {ImageURLOptions} [options={}] Options for the Image URL
+ * @returns {string}
+ */
+ displayAvatarURL(options) {
+ return this.avatarURL(options) ?? this.defaultAvatarURL;
+ }
+
+ /**
+ * The hexadecimal version of the user accent color, with a leading hash
+ * <info>The user must be force fetched for this property to be present</info>
+ * @type {?string}
+ * @readonly
+ */
+ get hexAccentColor() {
+ if (typeof this.accentColor !== 'number') return this.accentColor;
+ return `#${this.accentColor.toString(16).padStart(6, '0')}`;
+ }
+
+ /**
+ * A link to the user's banner. See {@link User#banner} for more info
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ bannerURL(options = {}) {
+ return this.banner && this.client.rest.cdn.banner(this.id, this.banner, options);
+ }
+
+ /**
+ * The tag of this user
+ * <info>This user's username, or their legacy tag (e.g. `hydrabolt#0001`)
+ * if they're using the legacy username system</info>
+ * @type {?string}
+ * @readonly
+ */
+ get tag() {
+ return typeof this.username === 'string'
+ ? this.discriminator === '0'
+ ? this.username
+ : `${this.username}#${this.discriminator}`
+ : null;
+ }
+
+ /**
+ * The global name of this user, or their username if they don't have one
+ * @type {?string}
+ * @readonly
+ */
+ get displayName() {
+ return this.globalName ?? this.username;
+ }
+
+ /**
+ * The DM between the client's user and this user
+ * @type {?DMChannel}
+ * @readonly
+ */
+ get dmChannel() {
+ return this.client.users.dmChannel(this.id);
+ }
+
+ /**
+ * Creates a DM channel between the client and the user.
+ * @param {boolean} [force=false] Whether to skip the cache check and request the API
+ * @returns {Promise<DMChannel>}
+ */
+ createDM(force = false) {
+ return this.client.users.createDM(this.id, { force });
+ }
+
+ /**
+ * Deletes a DM channel (if one exists) between the client and the user. Resolves with the channel if successful.
+ * @returns {Promise<DMChannel>}
+ */
+ deleteDM() {
+ return this.client.users.deleteDM(this.id);
+ }
+
+ /**
+ * Checks if the user is equal to another.
+ * It compares id, username, discriminator, avatar, banner, accent color, and bot flags.
+ * It is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.
+ * @param {User} user User to compare with
+ * @returns {boolean}
+ */
+ equals(user) {
+ return (
+ user &&
+ this.id === user.id &&
+ this.username === user.username &&
+ this.discriminator === user.discriminator &&
+ this.globalName === user.globalName &&
+ this.avatar === user.avatar &&
+ this.flags?.bitfield === user.flags?.bitfield &&
+ this.banner === user.banner &&
+ this.accentColor === user.accentColor
+ );
+ }
+
+ /**
+ * Compares the user with an API user object
+ * @param {APIUser} user The API user object to compare
+ * @returns {boolean}
+ * @private
+ */
+ _equals(user) {
+ return (
+ user &&
+ this.id === user.id &&
+ this.username === user.username &&
+ this.discriminator === user.discriminator &&
+ this.globalName === user.global_name &&
+ this.avatar === user.avatar &&
+ this.flags?.bitfield === user.public_flags &&
+ ('banner' in user ? this.banner === user.banner : true) &&
+ ('accent_color' in user ? this.accentColor === user.accent_color : true)
+ );
+ }
+
+ /**
+ * Fetches this user's flags.
+ * @param {boolean} [force=false] Whether to skip the cache check and request the API
+ * @returns {Promise<UserFlagsBitField>}
+ */
+ fetchFlags(force = false) {
+ return this.client.users.fetchFlags(this.id, { force });
+ }
+
+ /**
+ * Fetches this user.
+ * @param {boolean} [force=true] Whether to skip the cache check and request the API
+ * @returns {Promise<User>}
+ */
+ fetch(force = true) {
+ return this.client.users.fetch(this.id, { force });
+ }
+
+ /**
+ * When concatenated with a string, this automatically returns the user's mention instead of the User object.
+ * @returns {string}
+ * @example
+ * // Logs: Hello from <@123456789012345678>!
+ * console.log(`Hello from ${user}!`);
+ */
+ toString() {
+ return userMention(this.id);
+ }
+
+ toJSON(...props) {
+ const json = super.toJSON(
+ {
+ createdTimestamp: true,
+ defaultAvatarURL: true,
+ hexAccentColor: true,
+ tag: true,
+ },
+ ...props,
+ );
+ json.avatarURL = this.avatarURL();
+ json.displayAvatarURL = this.displayAvatarURL();
+ json.bannerURL = this.banner ? this.bannerURL() : this.banner;
+ return json;
+ }
+}
+
+/**
+ * Sends a message to this user.
+ * @method send
+ * @memberof User
+ * @instance
+ * @param {string|MessagePayload|MessageCreateOptions} options The options to provide
+ * @returns {Promise<Message>}
+ * @example
+ * // Send a direct message
+ * user.send('Hello!')
+ * .then(message => console.log(`Sent message: ${message.content} to ${user.tag}`))
+ * .catch(console.error);
+ */
+
+TextBasedChannel.applyToClass(User);
+
+module.exports = User;
+
+/**
+ * @external APIUser
+ * @see {@link https://discord.com/developers/docs/resources/user#user-object}
+ */
diff --git a/node_modules/discord.js/src/structures/UserContextMenuCommandInteraction.js b/node_modules/discord.js/src/structures/UserContextMenuCommandInteraction.js
new file mode 100644
index 0000000..2e9dc7c
--- /dev/null
+++ b/node_modules/discord.js/src/structures/UserContextMenuCommandInteraction.js
@@ -0,0 +1,29 @@
+'use strict';
+
+const ContextMenuCommandInteraction = require('./ContextMenuCommandInteraction');
+
+/**
+ * Represents a user context menu interaction.
+ * @extends {ContextMenuCommandInteraction}
+ */
+class UserContextMenuCommandInteraction extends ContextMenuCommandInteraction {
+ /**
+ * The target user from this interaction
+ * @type {User}
+ * @readonly
+ */
+ get targetUser() {
+ return this.options.getUser('user');
+ }
+
+ /**
+ * The target member from this interaction
+ * @type {?(GuildMember|APIGuildMember)}
+ * @readonly
+ */
+ get targetMember() {
+ return this.options.getMember('user');
+ }
+}
+
+module.exports = UserContextMenuCommandInteraction;
diff --git a/node_modules/discord.js/src/structures/UserSelectMenuBuilder.js b/node_modules/discord.js/src/structures/UserSelectMenuBuilder.js
new file mode 100644
index 0000000..61bdbb8
--- /dev/null
+++ b/node_modules/discord.js/src/structures/UserSelectMenuBuilder.js
@@ -0,0 +1,31 @@
+'use strict';
+
+const { UserSelectMenuBuilder: BuildersUserSelectMenu } = require('@discordjs/builders');
+const { isJSONEncodable } = require('@discordjs/util');
+const { toSnakeCase } = require('../util/Transformers');
+
+/**
+ * Class used to build select menu components to be sent through the API
+ * @extends {BuildersUserSelectMenu}
+ */
+class UserSelectMenuBuilder extends BuildersUserSelectMenu {
+ constructor(data = {}) {
+ super(toSnakeCase(data));
+ }
+
+ /**
+ * Creates a new select menu builder from JSON data
+ * @param {UserSelectMenuBuilder|UserSelectMenuComponent|APIUserSelectComponent} other The other data
+ * @returns {UserSelectMenuBuilder}
+ */
+ static from(other) {
+ return new this(isJSONEncodable(other) ? other.toJSON() : other);
+ }
+}
+
+module.exports = UserSelectMenuBuilder;
+
+/**
+ * @external BuildersUserSelectMenu
+ * @see {@link https://discord.js.org/docs/packages/builders/stable/UserSelectMenuBuilder:Class}
+ */
diff --git a/node_modules/discord.js/src/structures/UserSelectMenuComponent.js b/node_modules/discord.js/src/structures/UserSelectMenuComponent.js
new file mode 100644
index 0000000..0acacdf
--- /dev/null
+++ b/node_modules/discord.js/src/structures/UserSelectMenuComponent.js
@@ -0,0 +1,11 @@
+'use strict';
+
+const BaseSelectMenuComponent = require('./BaseSelectMenuComponent');
+
+/**
+ * Represents a user select menu component
+ * @extends {BaseSelectMenuComponent}
+ */
+class UserSelectMenuComponent extends BaseSelectMenuComponent {}
+
+module.exports = UserSelectMenuComponent;
diff --git a/node_modules/discord.js/src/structures/UserSelectMenuInteraction.js b/node_modules/discord.js/src/structures/UserSelectMenuInteraction.js
new file mode 100644
index 0000000..5e23239
--- /dev/null
+++ b/node_modules/discord.js/src/structures/UserSelectMenuInteraction.js
@@ -0,0 +1,51 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const MessageComponentInteraction = require('./MessageComponentInteraction');
+const Events = require('../util/Events');
+
+/**
+ * Represents a {@link ComponentType.UserSelect} select menu interaction.
+ * @extends {MessageComponentInteraction}
+ */
+class UserSelectMenuInteraction extends MessageComponentInteraction {
+ constructor(client, data) {
+ super(client, data);
+ const { resolved, values } = data.data;
+
+ /**
+ * An array of the selected user ids
+ * @type {Snowflake[]}
+ */
+ this.values = values ?? [];
+
+ /**
+ * Collection of the selected users
+ * @type {Collection<Snowflake, User>}
+ */
+ this.users = new Collection();
+
+ /**
+ * Collection of the selected members
+ * @type {Collection<Snowflake, GuildMember|APIGuildMember>}
+ */
+ this.members = new Collection();
+
+ for (const user of Object.values(resolved?.users ?? {})) {
+ this.users.set(user.id, this.client.users._add(user));
+ }
+
+ for (const [id, member] of Object.entries(resolved?.members ?? {})) {
+ const user = resolved.users[id];
+
+ if (!user) {
+ this.client.emit(Events.Debug, `[UserSelectMenuInteraction] Received a member without a user, skipping ${id}`);
+ continue;
+ }
+
+ this.members.set(id, this.guild?.members._add({ user, ...member }) ?? { user, ...member });
+ }
+ }
+}
+
+module.exports = UserSelectMenuInteraction;
diff --git a/node_modules/discord.js/src/structures/VoiceChannel.js b/node_modules/discord.js/src/structures/VoiceChannel.js
new file mode 100644
index 0000000..d4f33ca
--- /dev/null
+++ b/node_modules/discord.js/src/structures/VoiceChannel.js
@@ -0,0 +1,96 @@
+'use strict';
+
+const { PermissionFlagsBits } = require('discord-api-types/v10');
+const BaseGuildVoiceChannel = require('./BaseGuildVoiceChannel');
+
+/**
+ * Represents a guild voice channel on Discord.
+ * @extends {BaseGuildVoiceChannel}
+ */
+class VoiceChannel extends BaseGuildVoiceChannel {
+ /**
+ * Whether the channel is joinable by the client user
+ * @type {boolean}
+ * @readonly
+ */
+ get joinable() {
+ if (!super.joinable) return false;
+ if (this.full && !this.permissionsFor(this.client.user).has(PermissionFlagsBits.MoveMembers, false)) return false;
+ return true;
+ }
+
+ /**
+ * Checks if the client has permission to send audio to the voice channel
+ * @type {boolean}
+ * @readonly
+ */
+ get speakable() {
+ const permissions = this.permissionsFor(this.client.user);
+ if (!permissions) return false;
+ // This flag allows speaking even if timed out
+ if (permissions.has(PermissionFlagsBits.Administrator, false)) return true;
+
+ return (
+ this.guild.members.me.communicationDisabledUntilTimestamp < Date.now() &&
+ permissions.has(PermissionFlagsBits.Speak, false)
+ );
+ }
+}
+
+/**
+ * Sets the bitrate of the channel.
+ * @method setBitrate
+ * @memberof VoiceChannel
+ * @instance
+ * @param {number} bitrate The new bitrate
+ * @param {string} [reason] Reason for changing the channel's bitrate
+ * @returns {Promise<VoiceChannel>}
+ * @example
+ * // Set the bitrate of a voice channel
+ * voiceChannel.setBitrate(48_000)
+ * .then(channel => console.log(`Set bitrate to ${channel.bitrate}bps for ${channel.name}`))
+ * .catch(console.error);
+ */
+
+/**
+ * Sets the RTC region of the channel.
+ * @method setRTCRegion
+ * @memberof VoiceChannel
+ * @instance
+ * @param {?string} rtcRegion The new region of the channel. Set to `null` to remove a specific region for the channel
+ * @param {string} [reason] The reason for modifying this region.
+ * @returns {Promise<VoiceChannel>}
+ * @example
+ * // Set the RTC region to sydney
+ * voiceChannel.setRTCRegion('sydney');
+ * @example
+ * // Remove a fixed region for this channel - let Discord decide automatically
+ * voiceChannel.setRTCRegion(null, 'We want to let Discord decide.');
+ */
+
+/**
+ * Sets the user limit of the channel.
+ * @method setUserLimit
+ * @memberof VoiceChannel
+ * @instance
+ * @param {number} userLimit The new user limit
+ * @param {string} [reason] Reason for changing the user limit
+ * @returns {Promise<VoiceChannel>}
+ * @example
+ * // Set the user limit of a voice channel
+ * voiceChannel.setUserLimit(42)
+ * .then(channel => console.log(`Set user limit to ${channel.userLimit} for ${channel.name}`))
+ * .catch(console.error);
+ */
+
+/**
+ * Sets the camera video quality mode of the channel.
+ * @method setVideoQualityMode
+ * @memberof VoiceChannel
+ * @instance
+ * @param {VideoQualityMode} videoQualityMode The new camera video quality mode.
+ * @param {string} [reason] Reason for changing the camera video quality mode.
+ * @returns {Promise<VoiceChannel>}
+ */
+
+module.exports = VoiceChannel;
diff --git a/node_modules/discord.js/src/structures/VoiceRegion.js b/node_modules/discord.js/src/structures/VoiceRegion.js
new file mode 100644
index 0000000..1f5652a
--- /dev/null
+++ b/node_modules/discord.js/src/structures/VoiceRegion.js
@@ -0,0 +1,46 @@
+'use strict';
+
+const { flatten } = require('../util/Util');
+
+/**
+ * Represents a Discord voice region for guilds.
+ */
+class VoiceRegion {
+ constructor(data) {
+ /**
+ * The region's id
+ * @type {string}
+ */
+ this.id = data.id;
+
+ /**
+ * Name of the region
+ * @type {string}
+ */
+ this.name = data.name;
+
+ /**
+ * Whether the region is deprecated
+ * @type {boolean}
+ */
+ this.deprecated = data.deprecated;
+
+ /**
+ * Whether the region is optimal
+ * @type {boolean}
+ */
+ this.optimal = data.optimal;
+
+ /**
+ * Whether the region is custom
+ * @type {boolean}
+ */
+ this.custom = data.custom;
+ }
+
+ toJSON() {
+ return flatten(this);
+ }
+}
+
+module.exports = VoiceRegion;
diff --git a/node_modules/discord.js/src/structures/VoiceState.js b/node_modules/discord.js/src/structures/VoiceState.js
new file mode 100644
index 0000000..ae510f2
--- /dev/null
+++ b/node_modules/discord.js/src/structures/VoiceState.js
@@ -0,0 +1,303 @@
+'use strict';
+
+const { ChannelType, Routes } = require('discord-api-types/v10');
+const Base = require('./Base');
+const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors');
+
+/**
+ * Represents the voice state for a Guild Member.
+ * @extends {Base}
+ */
+class VoiceState extends Base {
+ constructor(guild, data) {
+ super(guild.client);
+ /**
+ * The guild of this voice state
+ * @type {Guild}
+ */
+ this.guild = guild;
+ /**
+ * The id of the member of this voice state
+ * @type {Snowflake}
+ */
+ this.id = data.user_id;
+ this._patch(data);
+ }
+
+ _patch(data) {
+ if ('deaf' in data) {
+ /**
+ * Whether this member is deafened server-wide
+ * @type {?boolean}
+ */
+ this.serverDeaf = data.deaf;
+ } else {
+ this.serverDeaf ??= null;
+ }
+
+ if ('mute' in data) {
+ /**
+ * Whether this member is muted server-wide
+ * @type {?boolean}
+ */
+ this.serverMute = data.mute;
+ } else {
+ this.serverMute ??= null;
+ }
+
+ if ('self_deaf' in data) {
+ /**
+ * Whether this member is self-deafened
+ * @type {?boolean}
+ */
+ this.selfDeaf = data.self_deaf;
+ } else {
+ this.selfDeaf ??= null;
+ }
+
+ if ('self_mute' in data) {
+ /**
+ * Whether this member is self-muted
+ * @type {?boolean}
+ */
+ this.selfMute = data.self_mute;
+ } else {
+ this.selfMute ??= null;
+ }
+
+ if ('self_video' in data) {
+ /**
+ * Whether this member's camera is enabled
+ * @type {?boolean}
+ */
+ this.selfVideo = data.self_video;
+ } else {
+ this.selfVideo ??= null;
+ }
+
+ if ('session_id' in data) {
+ /**
+ * The session id for this member's connection
+ * @type {?string}
+ */
+ this.sessionId = data.session_id;
+ } else {
+ this.sessionId ??= null;
+ }
+
+ // The self_stream is property is omitted if false, check for another property
+ // here to avoid incorrectly clearing this when partial data is specified
+ if ('self_video' in data) {
+ /**
+ * Whether this member is streaming using "Screen Share"
+ * @type {?boolean}
+ */
+ this.streaming = data.self_stream ?? false;
+ } else {
+ this.streaming ??= null;
+ }
+
+ if ('channel_id' in data) {
+ /**
+ * The {@link VoiceChannel} or {@link StageChannel} id the member is in
+ * @type {?Snowflake}
+ */
+ this.channelId = data.channel_id;
+ } else {
+ this.channelId ??= null;
+ }
+
+ if ('suppress' in data) {
+ /**
+ * Whether this member is suppressed from speaking. This property is specific to stage channels only.
+ * @type {?boolean}
+ */
+ this.suppress = data.suppress;
+ } else {
+ this.suppress ??= null;
+ }
+
+ if ('request_to_speak_timestamp' in data) {
+ /**
+ * The time at which the member requested to speak. This property is specific to stage channels only.
+ * @type {?number}
+ */
+ this.requestToSpeakTimestamp = data.request_to_speak_timestamp && Date.parse(data.request_to_speak_timestamp);
+ } else {
+ this.requestToSpeakTimestamp ??= null;
+ }
+
+ return this;
+ }
+
+ /**
+ * The member that this voice state belongs to
+ * @type {?GuildMember}
+ * @readonly
+ */
+ get member() {
+ return this.guild.members.cache.get(this.id) ?? null;
+ }
+
+ /**
+ * The channel that the member is connected to
+ * @type {?(VoiceChannel|StageChannel)}
+ * @readonly
+ */
+ get channel() {
+ return this.guild.channels.cache.get(this.channelId) ?? null;
+ }
+
+ /**
+ * Whether this member is either self-deafened or server-deafened
+ * @type {?boolean}
+ * @readonly
+ */
+ get deaf() {
+ return this.serverDeaf || this.selfDeaf;
+ }
+
+ /**
+ * Whether this member is either self-muted or server-muted
+ * @type {?boolean}
+ * @readonly
+ */
+ get mute() {
+ return this.serverMute || this.selfMute;
+ }
+
+ /**
+ * Mutes/unmutes the member of this voice state.
+ * @param {boolean} [mute=true] Whether or not the member should be muted
+ * @param {string} [reason] Reason for muting or unmuting
+ * @returns {Promise<GuildMember>}
+ */
+ setMute(mute = true, reason) {
+ return this.guild.members.edit(this.id, { mute, reason });
+ }
+
+ /**
+ * Deafens/undeafens the member of this voice state.
+ * @param {boolean} [deaf=true] Whether or not the member should be deafened
+ * @param {string} [reason] Reason for deafening or undeafening
+ * @returns {Promise<GuildMember>}
+ */
+ setDeaf(deaf = true, reason) {
+ return this.guild.members.edit(this.id, { deaf, reason });
+ }
+
+ /**
+ * Disconnects the member from the channel.
+ * @param {string} [reason] Reason for disconnecting the member from the channel
+ * @returns {Promise<GuildMember>}
+ */
+ disconnect(reason) {
+ return this.setChannel(null, reason);
+ }
+
+ /**
+ * Moves the member to a different channel, or disconnects them from the one they're in.
+ * @param {GuildVoiceChannelResolvable|null} channel Channel to move the member to, or `null` if you want to
+ * disconnect them from voice.
+ * @param {string} [reason] Reason for moving member to another channel or disconnecting
+ * @returns {Promise<GuildMember>}
+ */
+ setChannel(channel, reason) {
+ return this.guild.members.edit(this.id, { channel, reason });
+ }
+
+ /**
+ * Data to edit the logged in user's own voice state with, when in a stage channel
+ * @typedef {Object} VoiceStateEditOptions
+ * @property {boolean} [requestToSpeak] Whether or not the client is requesting to become a speaker.
+ * <info>Only available to the logged in user's own voice state.</info>
+ * @property {boolean} [suppressed] Whether or not the user should be suppressed.
+ */
+
+ /**
+ * Edits this voice state. Currently only available when in a stage channel
+ * @param {VoiceStateEditOptions} options The options to provide
+ * @returns {Promise<VoiceState>}
+ */
+ async edit(options) {
+ if (this.channel?.type !== ChannelType.GuildStageVoice) throw new DiscordjsError(ErrorCodes.VoiceNotStageChannel);
+
+ const target = this.client.user.id === this.id ? '@me' : this.id;
+
+ if (target !== '@me' && options.requestToSpeak !== undefined) {
+ throw new DiscordjsError(ErrorCodes.VoiceStateNotOwn);
+ }
+
+ if (!['boolean', 'undefined'].includes(typeof options.requestToSpeak)) {
+ throw new DiscordjsTypeError(ErrorCodes.VoiceStateInvalidType, 'requestToSpeak');
+ }
+
+ if (!['boolean', 'undefined'].includes(typeof options.suppressed)) {
+ throw new DiscordjsTypeError(ErrorCodes.VoiceStateInvalidType, 'suppressed');
+ }
+
+ await this.client.rest.patch(Routes.guildVoiceState(this.guild.id, target), {
+ body: {
+ channel_id: this.channelId,
+ request_to_speak_timestamp: options.requestToSpeak
+ ? new Date().toISOString()
+ : options.requestToSpeak === false
+ ? null
+ : undefined,
+ suppress: options.suppressed,
+ },
+ });
+ return this;
+ }
+
+ /**
+ * Toggles the request to speak in the channel.
+ * Only applicable for stage channels and for the client's own voice state.
+ * @param {boolean} [requestToSpeak=true] Whether or not the client is requesting to become a speaker.
+ * @example
+ * // Making the client request to speak in a stage channel (raise its hand)
+ * guild.members.me.voice.setRequestToSpeak(true);
+ * @example
+ * // Making the client cancel a request to speak
+ * guild.members.me.voice.setRequestToSpeak(false);
+ * @returns {Promise<VoiceState>}
+ */
+ setRequestToSpeak(requestToSpeak = true) {
+ return this.edit({ requestToSpeak });
+ }
+
+ /**
+ * Suppress/unsuppress the user. Only applicable for stage channels.
+ * @param {boolean} [suppressed=true] Whether or not the user should be suppressed.
+ * @example
+ * // Making the client a speaker
+ * guild.members.me.voice.setSuppressed(false);
+ * @example
+ * // Making the client an audience member
+ * guild.members.me.voice.setSuppressed(true);
+ * @example
+ * // Inviting another user to speak
+ * voiceState.setSuppressed(false);
+ * @example
+ * // Moving another user to the audience, or cancelling their invite to speak
+ * voiceState.setSuppressed(true);
+ * @returns {Promise<VoiceState>}
+ */
+ setSuppressed(suppressed = true) {
+ return this.edit({ suppressed });
+ }
+
+ toJSON() {
+ return super.toJSON({
+ id: true,
+ serverDeaf: true,
+ serverMute: true,
+ selfDeaf: true,
+ selfMute: true,
+ sessionId: true,
+ channelId: 'channel',
+ });
+ }
+}
+
+module.exports = VoiceState;
diff --git a/node_modules/discord.js/src/structures/Webhook.js b/node_modules/discord.js/src/structures/Webhook.js
new file mode 100644
index 0000000..738d9e7
--- /dev/null
+++ b/node_modules/discord.js/src/structures/Webhook.js
@@ -0,0 +1,479 @@
+'use strict';
+
+const { makeURLSearchParams } = require('@discordjs/rest');
+const { lazy } = require('@discordjs/util');
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const { Routes, WebhookType } = require('discord-api-types/v10');
+const MessagePayload = require('./MessagePayload');
+const { DiscordjsError, ErrorCodes } = require('../errors');
+const DataResolver = require('../util/DataResolver');
+
+const getMessage = lazy(() => require('./Message').Message);
+
+/**
+ * Represents a webhook.
+ */
+class Webhook {
+ constructor(client, data) {
+ /**
+ * The client that instantiated the webhook
+ * @name Webhook#client
+ * @type {Client}
+ * @readonly
+ */
+ Object.defineProperty(this, 'client', { value: client });
+ if (data) this._patch(data);
+ }
+
+ _patch(data) {
+ if ('name' in data) {
+ /**
+ * The name of the webhook
+ * @type {string}
+ */
+ this.name = data.name;
+ }
+
+ /**
+ * The token for the webhook, unavailable for follower webhooks and webhooks owned by another application.
+ * @name Webhook#token
+ * @type {?string}
+ */
+ Object.defineProperty(this, 'token', {
+ value: data.token ?? null,
+ writable: true,
+ configurable: true,
+ });
+
+ if ('avatar' in data) {
+ /**
+ * The avatar for the webhook
+ * @type {?string}
+ */
+ this.avatar = data.avatar;
+ }
+
+ /**
+ * The webhook's id
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+
+ if ('type' in data) {
+ /**
+ * The type of the webhook
+ * @type {WebhookType}
+ */
+ this.type = data.type;
+ }
+
+ if ('guild_id' in data) {
+ /**
+ * The guild the webhook belongs to
+ * @type {Snowflake}
+ */
+ this.guildId = data.guild_id;
+ }
+
+ if ('channel_id' in data) {
+ /**
+ * The id of the channel the webhook belongs to
+ * @type {Snowflake}
+ */
+ this.channelId = data.channel_id;
+ }
+
+ if ('user' in data) {
+ /**
+ * The owner of the webhook
+ * @type {?(User|APIUser)}
+ */
+ this.owner = this.client.users?._add(data.user) ?? data.user;
+ } else {
+ this.owner ??= null;
+ }
+
+ if ('application_id' in data) {
+ /**
+ * The application that created this webhook
+ * @type {?Snowflake}
+ */
+ this.applicationId = data.application_id;
+ } else {
+ this.applicationId ??= null;
+ }
+
+ if ('source_guild' in data) {
+ /**
+ * The source guild of the webhook
+ * @type {?(Guild|APIGuild)}
+ */
+ this.sourceGuild = this.client.guilds?.resolve(data.source_guild.id) ?? data.source_guild;
+ } else {
+ this.sourceGuild ??= null;
+ }
+
+ if ('source_channel' in data) {
+ /**
+ * The source channel of the webhook
+ * @type {?(NewsChannel|APIChannel)}
+ */
+ this.sourceChannel = this.client.channels?.resolve(data.source_channel?.id) ?? data.source_channel;
+ } else {
+ this.sourceChannel ??= null;
+ }
+ }
+
+ /**
+ * Options that can be passed into send.
+ * @typedef {BaseMessageOptions} WebhookMessageCreateOptions
+ * @property {boolean} [tts=false] Whether the message should be spoken aloud
+ * @property {MessageFlags} [flags] Which flags to set for the message.
+ * <info>Only the {@link MessageFlags.SuppressEmbeds} flag can be set.</info>
+ * @property {string} [username=this.name] Username override for the message
+ * @property {string} [avatarURL] Avatar URL override for the message
+ * @property {Snowflake} [threadId] The id of the thread in the channel to send to.
+ * <info>For interaction webhooks, this property is ignored</info>
+ * @property {string} [threadName] Name of the thread to create (only available if webhook is in a forum channel)
+ */
+
+ /**
+ * Options that can be passed into editMessage.
+ * @typedef {BaseMessageOptions} WebhookMessageEditOptions
+ * @property {Attachment[]} [attachments] Attachments to send with the message
+ * @property {Snowflake} [threadId] The id of the thread this message belongs to
+ * <info>For interaction webhooks, this property is ignored</info>
+ */
+
+ /**
+ * The channel the webhook belongs to
+ * @type {?(TextChannel|VoiceChannel|StageChannel|NewsChannel|ForumChannel)}
+ * @readonly
+ */
+ get channel() {
+ return this.client.channels.resolve(this.channelId);
+ }
+
+ /**
+ * Sends a message with this webhook.
+ * @param {string|MessagePayload|WebhookMessageCreateOptions} options The options to provide
+ * @returns {Promise<Message>}
+ * @example
+ * // Send a basic message
+ * webhook.send('hello!')
+ * .then(message => console.log(`Sent message: ${message.content}`))
+ * .catch(console.error);
+ * @example
+ * // Send a basic message in a thread
+ * webhook.send({ content: 'hello!', threadId: '836856309672348295' })
+ * .then(message => console.log(`Sent message: ${message.content}`))
+ * .catch(console.error);
+ * @example
+ * // Send a remote file
+ * webhook.send({
+ * files: ['https://cdn.discordapp.com/icons/222078108977594368/6e1019b3179d71046e463a75915e7244.png?size=2048']
+ * })
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Send a local file
+ * webhook.send({
+ * files: [{
+ * attachment: 'entire/path/to/file.jpg',
+ * name: 'file.jpg'
+ * }]
+ * })
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Send an embed with a local image inside
+ * webhook.send({
+ * content: 'This is an embed',
+ * embeds: [{
+ * thumbnail: {
+ * url: 'attachment://file.jpg'
+ * }
+ * }],
+ * files: [{
+ * attachment: 'entire/path/to/file.jpg',
+ * name: 'file.jpg'
+ * }]
+ * })
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async send(options) {
+ if (!this.token) throw new DiscordjsError(ErrorCodes.WebhookTokenUnavailable);
+
+ let messagePayload;
+
+ if (options instanceof MessagePayload) {
+ messagePayload = options.resolveBody();
+ } else {
+ messagePayload = MessagePayload.create(this, options).resolveBody();
+ }
+
+ const query = makeURLSearchParams({
+ wait: true,
+ thread_id: messagePayload.options.threadId,
+ });
+
+ const { body, files } = await messagePayload.resolveFiles();
+ const d = await this.client.rest.post(Routes.webhook(this.id, this.token), {
+ body,
+ files,
+ query,
+ auth: false,
+ });
+
+ if (!this.client.channels) return d;
+ return this.client.channels.cache.get(d.channel_id)?.messages._add(d, false) ?? new (getMessage())(this.client, d);
+ }
+
+ /**
+ * Sends a raw slack message with this webhook.
+ * @param {Object} body The raw body to send
+ * @returns {Promise<boolean>}
+ * @example
+ * // Send a slack message
+ * webhook.sendSlackMessage({
+ * 'username': 'Wumpus',
+ * 'attachments': [{
+ * 'pretext': 'this looks pretty cool',
+ * 'color': '#F0F',
+ * 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',
+ * 'footer': 'Powered by sneks',
+ * 'ts': Date.now() / 1_000
+ * }]
+ * }).catch(console.error);
+ * @see {@link https://api.slack.com/messaging/webhooks}
+ */
+ async sendSlackMessage(body) {
+ if (!this.token) throw new DiscordjsError(ErrorCodes.WebhookTokenUnavailable);
+
+ const data = await this.client.rest.post(Routes.webhookPlatform(this.id, this.token, 'slack'), {
+ query: makeURLSearchParams({ wait: true }),
+ auth: false,
+ body,
+ });
+ return data.toString() === 'ok';
+ }
+
+ /**
+ * Options used to edit a {@link Webhook}.
+ * @typedef {Object} WebhookEditOptions
+ * @property {string} [name=this.name] The new name for the webhook
+ * @property {?(BufferResolvable)} [avatar] The new avatar for the webhook
+ * @property {GuildTextChannelResolvable|VoiceChannel|StageChannel|ForumChannel} [channel]
+ * The new channel for the webhook
+ * @property {string} [reason] Reason for editing the webhook
+ */
+
+ /**
+ * Edits this webhook.
+ * @param {WebhookEditOptions} options Options for editing the webhook
+ * @returns {Promise<Webhook>}
+ */
+ async edit({ name = this.name, avatar, channel, reason }) {
+ if (avatar && !(typeof avatar === 'string' && avatar.startsWith('data:'))) {
+ avatar = await DataResolver.resolveImage(avatar);
+ }
+ channel &&= channel.id ?? channel;
+ const data = await this.client.rest.patch(Routes.webhook(this.id, channel ? undefined : this.token), {
+ body: { name, avatar, channel_id: channel },
+ reason,
+ auth: !this.token || Boolean(channel),
+ });
+
+ this.name = data.name;
+ this.avatar = data.avatar;
+ this.channelId = data.channel_id;
+ return this;
+ }
+
+ /**
+ * Options that can be passed into fetchMessage.
+ * @typedef {options} WebhookFetchMessageOptions
+ * @property {boolean} [cache=true] Whether to cache the message.
+ * @property {Snowflake} [threadId] The id of the thread this message belongs to.
+ * <info>For interaction webhooks, this property is ignored</info>
+ */
+
+ /**
+ * Gets a message that was sent by this webhook.
+ * @param {Snowflake|'@original'} message The id of the message to fetch
+ * @param {WebhookFetchMessageOptions} [options={}] The options to provide to fetch the message.
+ * @returns {Promise<Message>} Returns the message sent by this webhook
+ */
+ async fetchMessage(message, { threadId } = {}) {
+ if (!this.token) throw new DiscordjsError(ErrorCodes.WebhookTokenUnavailable);
+
+ const data = await this.client.rest.get(Routes.webhookMessage(this.id, this.token, message), {
+ query: threadId ? makeURLSearchParams({ thread_id: threadId }) : undefined,
+ auth: false,
+ });
+
+ if (!this.client.channels) return data;
+ return (
+ this.client.channels.cache.get(data.channel_id)?.messages._add(data, false) ??
+ new (getMessage())(this.client, data)
+ );
+ }
+
+ /**
+ * Edits a message that was sent by this webhook.
+ * @param {MessageResolvable|'@original'} message The message to edit
+ * @param {string|MessagePayload|WebhookMessageEditOptions} options The options to provide
+ * @returns {Promise<Message>} Returns the message edited by this webhook
+ */
+ async editMessage(message, options) {
+ if (!this.token) throw new DiscordjsError(ErrorCodes.WebhookTokenUnavailable);
+
+ let messagePayload;
+
+ if (options instanceof MessagePayload) messagePayload = options;
+ else messagePayload = MessagePayload.create(this, options);
+
+ const { body, files } = await messagePayload.resolveBody().resolveFiles();
+
+ const d = await this.client.rest.patch(
+ Routes.webhookMessage(this.id, this.token, typeof message === 'string' ? message : message.id),
+ {
+ body,
+ files,
+ query: messagePayload.options.threadId
+ ? makeURLSearchParams({ thread_id: messagePayload.options.threadId })
+ : undefined,
+ auth: false,
+ },
+ );
+
+ const channelManager = this.client.channels;
+ if (!channelManager) return d;
+
+ const messageManager = channelManager.cache.get(d.channel_id)?.messages;
+ if (!messageManager) return new (getMessage())(this.client, d);
+
+ const existing = messageManager.cache.get(d.id);
+ if (!existing) return messageManager._add(d);
+
+ const clone = existing._clone();
+ clone._patch(d);
+ return clone;
+ }
+
+ /**
+ * Deletes the webhook.
+ * @param {string} [reason] Reason for deleting this webhook
+ * @returns {Promise<void>}
+ */
+ delete(reason) {
+ return this.client.deleteWebhook(this.id, { token: this.token, reason });
+ }
+
+ /**
+ * Delete a message that was sent by this webhook.
+ * @param {MessageResolvable|'@original'} message The message to delete
+ * @param {Snowflake} [threadId] The id of the thread this message belongs to
+ * @returns {Promise<void>}
+ */
+ async deleteMessage(message, threadId) {
+ if (!this.token) throw new DiscordjsError(ErrorCodes.WebhookTokenUnavailable);
+
+ await this.client.rest.delete(
+ Routes.webhookMessage(this.id, this.token, typeof message === 'string' ? message : message.id),
+ {
+ query: threadId ? makeURLSearchParams({ thread_id: threadId }) : undefined,
+ auth: false,
+ },
+ );
+ }
+
+ /**
+ * The timestamp the webhook was created at
+ * @type {number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return DiscordSnowflake.timestampFrom(this.id);
+ }
+
+ /**
+ * The time the webhook was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ /**
+ * The URL of this webhook
+ * @type {string}
+ * @readonly
+ */
+ get url() {
+ return this.client.options.rest.api + Routes.webhook(this.id, this.token);
+ }
+
+ /**
+ * A link to the webhook's avatar.
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ avatarURL(options = {}) {
+ return this.avatar && this.client.rest.cdn.avatar(this.id, this.avatar, options);
+ }
+
+ /**
+ * Whether this webhook is created by a user.
+ * @returns {boolean}
+ */
+ isUserCreated() {
+ return Boolean(this.type === WebhookType.Incoming && this.owner && !this.owner.bot);
+ }
+
+ /**
+ * Whether this webhook is created by an application.
+ * @returns {boolean}
+ */
+ isApplicationCreated() {
+ return this.type === WebhookType.Application;
+ }
+
+ /**
+ * Whether or not this webhook is a channel follower webhook.
+ * @returns {boolean}
+ */
+ isChannelFollower() {
+ return this.type === WebhookType.ChannelFollower;
+ }
+
+ /**
+ * Whether or not this webhook is an incoming webhook.
+ * @returns {boolean}
+ */
+ isIncoming() {
+ return this.type === WebhookType.Incoming;
+ }
+
+ static applyToClass(structure, ignore = []) {
+ for (const prop of [
+ 'send',
+ 'sendSlackMessage',
+ 'fetchMessage',
+ 'edit',
+ 'editMessage',
+ 'delete',
+ 'deleteMessage',
+ 'createdTimestamp',
+ 'createdAt',
+ 'url',
+ ]) {
+ if (ignore.includes(prop)) continue;
+ Object.defineProperty(structure.prototype, prop, Object.getOwnPropertyDescriptor(Webhook.prototype, prop));
+ }
+ }
+}
+
+module.exports = Webhook;
diff --git a/node_modules/discord.js/src/structures/WelcomeChannel.js b/node_modules/discord.js/src/structures/WelcomeChannel.js
new file mode 100644
index 0000000..d783e06
--- /dev/null
+++ b/node_modules/discord.js/src/structures/WelcomeChannel.js
@@ -0,0 +1,60 @@
+'use strict';
+
+const Base = require('./Base');
+const { Emoji } = require('./Emoji');
+
+/**
+ * Represents a channel link in a guild's welcome screen.
+ * @extends {Base}
+ */
+class WelcomeChannel extends Base {
+ constructor(guild, data) {
+ super(guild.client);
+
+ /**
+ * The guild for this welcome channel
+ * @type {Guild|InviteGuild}
+ */
+ this.guild = guild;
+
+ /**
+ * The description of this welcome channel
+ * @type {string}
+ */
+ this.description = data.description;
+
+ /**
+ * The raw emoji data
+ * @type {Object}
+ * @private
+ */
+ this._emoji = {
+ name: data.emoji_name,
+ id: data.emoji_id,
+ };
+
+ /**
+ * The id of this welcome channel
+ * @type {Snowflake}
+ */
+ this.channelId = data.channel_id;
+ }
+
+ /**
+ * The channel of this welcome channel
+ * @type {?(TextChannel|NewsChannel|ForumChannel)}
+ */
+ get channel() {
+ return this.client.channels.resolve(this.channelId);
+ }
+
+ /**
+ * The emoji of this welcome channel
+ * @type {GuildEmoji|Emoji}
+ */
+ get emoji() {
+ return this.client.emojis.resolve(this._emoji.id) ?? new Emoji(this.client, this._emoji);
+ }
+}
+
+module.exports = WelcomeChannel;
diff --git a/node_modules/discord.js/src/structures/WelcomeScreen.js b/node_modules/discord.js/src/structures/WelcomeScreen.js
new file mode 100644
index 0000000..9ff79bc
--- /dev/null
+++ b/node_modules/discord.js/src/structures/WelcomeScreen.js
@@ -0,0 +1,49 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { GuildFeature } = require('discord-api-types/v10');
+const Base = require('./Base');
+const WelcomeChannel = require('./WelcomeChannel');
+
+/**
+ * Represents a welcome screen.
+ * @extends {Base}
+ */
+class WelcomeScreen extends Base {
+ constructor(guild, data) {
+ super(guild.client);
+
+ /**
+ * The guild for this welcome screen
+ * @type {Guild}
+ */
+ this.guild = guild;
+
+ /**
+ * The description of this welcome screen
+ * @type {?string}
+ */
+ this.description = data.description ?? null;
+
+ /**
+ * Collection of welcome channels belonging to this welcome screen
+ * @type {Collection<Snowflake, WelcomeChannel>}
+ */
+ this.welcomeChannels = new Collection();
+
+ for (const channel of data.welcome_channels) {
+ const welcomeChannel = new WelcomeChannel(this.guild, channel);
+ this.welcomeChannels.set(welcomeChannel.channelId, welcomeChannel);
+ }
+ }
+
+ /**
+ * Whether the welcome screen is enabled on the guild
+ * @type {boolean}
+ */
+ get enabled() {
+ return this.guild.features.includes(GuildFeature.WelcomeScreenEnabled);
+ }
+}
+
+module.exports = WelcomeScreen;
diff --git a/node_modules/discord.js/src/structures/Widget.js b/node_modules/discord.js/src/structures/Widget.js
new file mode 100644
index 0000000..344c81a
--- /dev/null
+++ b/node_modules/discord.js/src/structures/Widget.js
@@ -0,0 +1,88 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { Routes } = require('discord-api-types/v10');
+const Base = require('./Base');
+const WidgetMember = require('./WidgetMember');
+
+/**
+ * Represents a Widget.
+ * @extends {Base}
+ */
+class Widget extends Base {
+ constructor(client, data) {
+ super(client);
+ this._patch(data);
+ }
+
+ /**
+ * Represents a channel in a Widget
+ * @typedef {Object} WidgetChannel
+ * @property {Snowflake} id Id of the channel
+ * @property {string} name Name of the channel
+ * @property {number} position Position of the channel
+ */
+
+ _patch(data) {
+ /**
+ * The id of the guild.
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+
+ if ('name' in data) {
+ /**
+ * The name of the guild.
+ * @type {string}
+ */
+ this.name = data.name;
+ }
+
+ if ('instant_invite' in data) {
+ /**
+ * The invite of the guild.
+ * @type {?string}
+ */
+ this.instantInvite = data.instant_invite;
+ }
+
+ /**
+ * The list of channels in the guild.
+ * @type {Collection<Snowflake, WidgetChannel>}
+ */
+ this.channels = new Collection();
+ for (const channel of data.channels) {
+ this.channels.set(channel.id, channel);
+ }
+
+ /**
+ * The list of members in the guild.
+ * These strings are just arbitrary numbers, they aren't Snowflakes.
+ * @type {Collection<string, WidgetMember>}
+ */
+ this.members = new Collection();
+ for (const member of data.members) {
+ this.members.set(member.id, new WidgetMember(this.client, member));
+ }
+
+ if ('presence_count' in data) {
+ /**
+ * The number of members online.
+ * @type {number}
+ */
+ this.presenceCount = data.presence_count;
+ }
+ }
+
+ /**
+ * Update the Widget.
+ * @returns {Promise<Widget>}
+ */
+ async fetch() {
+ const data = await this.client.rest.get(Routes.guildWidgetJSON(this.id));
+ this._patch(data);
+ return this;
+ }
+}
+
+module.exports = Widget;
diff --git a/node_modules/discord.js/src/structures/WidgetMember.js b/node_modules/discord.js/src/structures/WidgetMember.js
new file mode 100644
index 0000000..d7aca21
--- /dev/null
+++ b/node_modules/discord.js/src/structures/WidgetMember.js
@@ -0,0 +1,99 @@
+'use strict';
+
+const Base = require('./Base');
+
+/**
+ * Represents a WidgetMember.
+ * @extends {Base}
+ */
+class WidgetMember extends Base {
+ /**
+ * Activity sent in a {@link WidgetMember}.
+ * @typedef {Object} WidgetActivity
+ * @property {string} name The name of the activity
+ */
+
+ constructor(client, data) {
+ super(client);
+
+ /**
+ * The id of the user. It's an arbitrary number.
+ * @type {string}
+ */
+ this.id = data.id;
+
+ /**
+ * The username of the member.
+ * @type {string}
+ */
+ this.username = data.username;
+
+ /**
+ * The discriminator of the member.
+ * @type {string}
+ */
+ this.discriminator = data.discriminator;
+
+ /**
+ * The avatar of the member.
+ * @type {?string}
+ */
+ this.avatar = data.avatar;
+
+ /**
+ * The status of the member.
+ * @type {PresenceStatus}
+ */
+ this.status = data.status;
+
+ /**
+ * If the member is server deafened
+ * @type {?boolean}
+ */
+ this.deaf = data.deaf ?? null;
+
+ /**
+ * If the member is server muted
+ * @type {?boolean}
+ */
+ this.mute = data.mute ?? null;
+
+ /**
+ * If the member is self deafened
+ * @type {?boolean}
+ */
+ this.selfDeaf = data.self_deaf ?? null;
+
+ /**
+ * If the member is self muted
+ * @type {?boolean}
+ */
+ this.selfMute = data.self_mute ?? null;
+
+ /**
+ * If the member is suppressed
+ * @type {?boolean}
+ */
+ this.suppress = data.suppress ?? null;
+
+ /**
+ * The id of the voice channel the member is in, if any
+ * @type {?Snowflake}
+ */
+ this.channelId = data.channel_id ?? null;
+
+ /**
+ * The avatar URL of the member.
+ * @type {string}
+ */
+ this.avatarURL = data.avatar_url;
+
+ /**
+ * The activity of the member.
+ * @type {?WidgetActivity}
+ */
+ this.activity = data.activity ?? null;
+ }
+}
+
+module.exports = WidgetMember;
diff --git a/node_modules/discord.js/src/structures/interfaces/Application.js b/node_modules/discord.js/src/structures/interfaces/Application.js
new file mode 100644
index 0000000..5e81465
--- /dev/null
+++ b/node_modules/discord.js/src/structures/interfaces/Application.js
@@ -0,0 +1,108 @@
+'use strict';
+
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const Base = require('../Base');
+
+/**
+ * Represents an OAuth2 Application.
+ * @extends {Base}
+ * @abstract
+ */
+class Application extends Base {
+ constructor(client, data) {
+ super(client);
+ this._patch(data);
+ }
+
+ _patch(data) {
+ /**
+ * The application's id
+ * @type {Snowflake}
+ */
+ this.id = data.id;
+
+ if ('name' in data) {
+ /**
+ * The name of the application
+ * @type {?string}
+ */
+ this.name = data.name;
+ } else {
+ this.name ??= null;
+ }
+
+ if ('description' in data) {
+ /**
+ * The application's description
+ * @type {?string}
+ */
+ this.description = data.description;
+ } else {
+ this.description ??= null;
+ }
+
+ if ('icon' in data) {
+ /**
+ * The application's icon hash
+ * @type {?string}
+ */
+ this.icon = data.icon;
+ } else {
+ this.icon ??= null;
+ }
+ }
+
+ /**
+ * The timestamp the application was created at
+ * @type {number}
+ * @readonly
+ */
+ get createdTimestamp() {
+ return DiscordSnowflake.timestampFrom(this.id);
+ }
+
+ /**
+ * The time the application was created at
+ * @type {Date}
+ * @readonly
+ */
+ get createdAt() {
+ return new Date(this.createdTimestamp);
+ }
+
+ /**
+ * A link to the application's icon.
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ iconURL(options = {}) {
+ return this.icon && this.client.rest.cdn.appIcon(this.id, this.icon, options);
+ }
+
+ /**
+ * A link to this application's cover image.
+ * @param {ImageURLOptions} [options={}] Options for the image URL
+ * @returns {?string}
+ */
+ coverURL(options = {}) {
+ return this.cover && this.client.rest.cdn.appIcon(this.id, this.cover, options);
+ }
+
+ /**
+ * When concatenated with a string, this automatically returns the application's name instead of the
+ * Application object.
+ * @returns {?string}
+ * @example
+ * // Logs: Application name: My App
+ * console.log(`Application name: ${application}`);
+ */
+ toString() {
+ return this.name;
+ }
+
+ toJSON() {
+ return super.toJSON({ createdTimestamp: true });
+ }
+}
+
+module.exports = Application;
diff --git a/node_modules/discord.js/src/structures/interfaces/Collector.js b/node_modules/discord.js/src/structures/interfaces/Collector.js
new file mode 100644
index 0000000..65f4117
--- /dev/null
+++ b/node_modules/discord.js/src/structures/interfaces/Collector.js
@@ -0,0 +1,335 @@
+'use strict';
+
+const EventEmitter = require('node:events');
+const { setTimeout, clearTimeout } = require('node:timers');
+const { Collection } = require('@discordjs/collection');
+const { DiscordjsTypeError, ErrorCodes } = require('../../errors');
+const { flatten } = require('../../util/Util');
+
+/**
+ * Filter to be applied to the collector.
+ * @typedef {Function} CollectorFilter
+ * @param {...*} args Any arguments received by the listener
+ * @param {Collection} collection The items collected by this collector
+ * @returns {boolean|Promise<boolean>}
+ */
+
+/**
+ * Options to be applied to the collector.
+ * @typedef {Object} CollectorOptions
+ * @property {CollectorFilter} [filter] The filter applied to this collector
+ * @property {number} [time] How long to run the collector for in milliseconds
+ * @property {number} [idle] How long to stop the collector after inactivity in milliseconds
+ * @property {boolean} [dispose=false] Whether to dispose data when it's deleted
+ */
+
+/**
+ * Abstract class for defining a new Collector.
+ * @extends {EventEmitter}
+ * @abstract
+ */
+class Collector extends EventEmitter {
+ constructor(client, options = {}) {
+ super();
+
+ /**
+ * The client that instantiated this Collector
+ * @name Collector#client
+ * @type {Client}
+ * @readonly
+ */
+ Object.defineProperty(this, 'client', { value: client });
+
+ /**
+ * The filter applied to this collector
+ * @type {CollectorFilter}
+ * @returns {boolean|Promise<boolean>}
+ */
+ this.filter = options.filter ?? (() => true);
+
+ /**
+ * The options of this collector
+ * @type {CollectorOptions}
+ */
+ this.options = options;
+
+ /**
+ * The items collected by this collector
+ * @type {Collection}
+ */
+ this.collected = new Collection();
+
+ /**
+ * Whether this collector has finished collecting
+ * @type {boolean}
+ */
+ this.ended = false;
+
+ /**
+ * Timeout for cleanup
+ * @type {?Timeout}
+ * @private
+ */
+ this._timeout = null;
+
+ /**
+ * Timeout for cleanup due to inactivity
+ * @type {?Timeout}
+ * @private
+ */
+ this._idletimeout = null;
+
+ /**
+ * The reason the collector ended
+ * @type {string|null}
+ * @private
+ */
+ this._endReason = null;
+
+ if (typeof this.filter !== 'function') {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options.filter', 'function');
+ }
+
+ this.handleCollect = this.handleCollect.bind(this);
+ this.handleDispose = this.handleDispose.bind(this);
+
+ if (options.time) this._timeout = setTimeout(() => this.stop('time'), options.time).unref();
+ if (options.idle) this._idletimeout = setTimeout(() => this.stop('idle'), options.idle).unref();
+
+ /**
+ * The timestamp at which this collector last collected an item
+ * @type {?number}
+ */
+ this.lastCollectedTimestamp = null;
+ }
+
+ /**
+ * The Date at which this collector last collected an item
+ * @type {?Date}
+ */
+ get lastCollectedAt() {
+ return this.lastCollectedTimestamp && new Date(this.lastCollectedTimestamp);
+ }
+
+ /**
+ * Call this to handle an event as a collectable element. Accepts any event data as parameters.
+ * @param {...*} args The arguments emitted by the listener
+ * @returns {Promise<void>}
+ * @emits Collector#collect
+ */
+ async handleCollect(...args) {
+ const collectedId = await this.collect(...args);
+
+ if (collectedId) {
+ const filterResult = await this.filter(...args, this.collected);
+ if (filterResult) {
+ this.collected.set(collectedId, args[0]);
+
+ /**
+ * Emitted whenever an element is collected.
+ * @event Collector#collect
+ * @param {...*} args The arguments emitted by the listener
+ */
+ this.emit('collect', ...args);
+
+ this.lastCollectedTimestamp = Date.now();
+ if (this._idletimeout) {
+ clearTimeout(this._idletimeout);
+ this._idletimeout = setTimeout(() => this.stop('idle'), this.options.idle).unref();
+ }
+ } else {
+ /**
+ * Emitted whenever an element is not collected by the collector.
+ * @event Collector#ignore
+ * @param {...*} args The arguments emitted by the listener
+ */
+ this.emit('ignore', ...args);
+ }
+ }
+ this.checkEnd();
+ }
+
+ /**
+ * Call this to remove an element from the collection. Accepts any event data as parameters.
+ * @param {...*} args The arguments emitted by the listener
+ * @returns {Promise<void>}
+ * @emits Collector#dispose
+ */
+ async handleDispose(...args) {
+ if (!this.options.dispose) return;
+
+ const dispose = this.dispose(...args);
+ if (!dispose || !(await this.filter(...args)) || !this.collected.has(dispose)) return;
+ this.collected.delete(dispose);
+
+ /**
+ * Emitted whenever an element is disposed of.
+ * @event Collector#dispose
+ * @param {...*} args The arguments emitted by the listener
+ */
+ this.emit('dispose', ...args);
+ this.checkEnd();
+ }
+
+ /**
+ * Returns a promise that resolves with the next collected element;
+ * rejects with collected elements if the collector finishes without receiving a next element
+ * @type {Promise}
+ * @readonly
+ */
+ get next() {
+ return new Promise((resolve, reject) => {
+ if (this.ended) {
+ reject(this.collected);
+ return;
+ }
+
+ const cleanup = () => {
+ this.removeListener('collect', onCollect);
+ this.removeListener('end', onEnd);
+ };
+
+ const onCollect = item => {
+ cleanup();
+ resolve(item);
+ };
+
+ const onEnd = () => {
+ cleanup();
+ reject(this.collected);
+ };
+
+ this.on('collect', onCollect);
+ this.on('end', onEnd);
+ });
+ }
+
+ /**
+ * Stops this collector and emits the `end` event.
+ * @param {string} [reason='user'] The reason this collector is ending
+ * @emits Collector#end
+ */
+ stop(reason = 'user') {
+ if (this.ended) return;
+
+ if (this._timeout) {
+ clearTimeout(this._timeout);
+ this._timeout = null;
+ }
+ if (this._idletimeout) {
+ clearTimeout(this._idletimeout);
+ this._idletimeout = null;
+ }
+
+ this._endReason = reason;
+ this.ended = true;
+
+ /**
+ * Emitted when the collector is finished collecting.
+ * @event Collector#end
+ * @param {Collection} collected The elements collected by the collector
+ * @param {string} reason The reason the collector ended
+ */
+ this.emit('end', this.collected, reason);
+ }
+
+ /**
+ * Options used to reset the timeout and idle timer of a {@link Collector}.
+ * @typedef {Object} CollectorResetTimerOptions
+ * @property {number} [time] How long to run the collector for (in milliseconds)
+ * @property {number} [idle] How long to wait to stop the collector after inactivity (in milliseconds)
+ */
+
+ /**
+ * Resets the collector's timeout and idle timer.
+ * @param {CollectorResetTimerOptions} [options] Options for resetting
+ */
+ resetTimer({ time, idle } = {}) {
+ if (this._timeout) {
+ clearTimeout(this._timeout);
+ this._timeout = setTimeout(() => this.stop('time'), time ?? this.options.time).unref();
+ }
+ if (this._idletimeout) {
+ clearTimeout(this._idletimeout);
+ this._idletimeout = setTimeout(() => this.stop('idle'), idle ?? this.options.idle).unref();
+ }
+ }
+
+ /**
+ * Checks whether the collector should end, and if so, ends it.
+ * @returns {boolean} Whether the collector ended or not
+ */
+ checkEnd() {
+ const reason = this.endReason;
+ if (reason) this.stop(reason);
+ return Boolean(reason);
+ }
+
+ /**
+ * Allows collectors to be consumed with for-await-of loops
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of}
+ */
+ async *[Symbol.asyncIterator]() {
+ const queue = [];
+ const onCollect = (...item) => queue.push(item);
+ this.on('collect', onCollect);
+
+ try {
+ while (queue.length || !this.ended) {
+ if (queue.length) {
+ yield queue.shift();
+ } else {
+ // eslint-disable-next-line no-await-in-loop
+ await new Promise(resolve => {
+ const tick = () => {
+ this.removeListener('collect', tick);
+ this.removeListener('end', tick);
+ return resolve();
+ };
+ this.on('collect', tick);
+ this.on('end', tick);
+ });
+ }
+ }
+ } finally {
+ this.removeListener('collect', onCollect);
+ }
+ }
+
+ toJSON() {
+ return flatten(this);
+ }
+
+ /* eslint-disable no-empty-function */
+ /**
+ * The reason this collector has ended with, or null if it hasn't ended yet
+ * @type {?string}
+ * @readonly
+ */
+ get endReason() {
+ return this._endReason;
+ }
+
+ /**
+ * Handles incoming events from the `handleCollect` function. Returns null if the event should not
+ * be collected, or returns an object describing the data that should be stored.
+ * @see Collector#handleCollect
+ * @param {...*} args Any args the event listener emits
+ * @returns {?(*|Promise<?*>)} Data to insert into collection, if any
+ * @abstract
+ */
+ collect() {}
+
+ /**
+ * Handles incoming events from the `handleDispose`. Returns null if the event should not
+ * be disposed, or returns the key that should be removed.
+ * @see Collector#handleDispose
+ * @param {...*} args Any args the event listener emits
+ * @returns {?*} Key to remove from the collection, if any
+ * @abstract
+ */
+ dispose() {}
+ /* eslint-enable no-empty-function */
+}
+
+module.exports = Collector;
diff --git a/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js b/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js
new file mode 100644
index 0000000..15256e3
--- /dev/null
+++ b/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js
@@ -0,0 +1,320 @@
+'use strict';
+
+const { isJSONEncodable } = require('@discordjs/util');
+const { InteractionResponseType, MessageFlags, Routes, InteractionType } = require('discord-api-types/v10');
+const { DiscordjsError, ErrorCodes } = require('../../errors');
+const InteractionCollector = require('../InteractionCollector');
+const InteractionResponse = require('../InteractionResponse');
+const MessagePayload = require('../MessagePayload');
+
+/**
+ * @typedef {Object} ModalComponentData
+ * @property {string} title The title of the modal
+ * @property {string} customId The custom id of the modal
+ * @property {ActionRow[]} components The components within this modal
+ */
+
+/**
+ * Interface for classes that support shared interaction response types.
+ * @interface
+ */
+class InteractionResponses {
+ /**
+ * Options for deferring the reply to an {@link BaseInteraction}.
+ * @typedef {Object} InteractionDeferReplyOptions
+ * @property {boolean} [ephemeral] Whether the reply should be ephemeral
+ * @property {boolean} [fetchReply] Whether to fetch the reply
+ */
+
+ /**
+ * Options for deferring and updating the reply to a {@link MessageComponentInteraction}.
+ * @typedef {Object} InteractionDeferUpdateOptions
+ * @property {boolean} [fetchReply] Whether to fetch the reply
+ */
+
+ /**
+ * Options for a reply to a {@link BaseInteraction}.
+ * @typedef {BaseMessageOptions} InteractionReplyOptions
+ * @property {boolean} [tts=false] Whether the message should be spoken aloud
+ * @property {boolean} [ephemeral] Whether the reply should be ephemeral
+ * @property {boolean} [fetchReply] Whether to fetch the reply
+ * @property {MessageFlags} [flags] Which flags to set for the message.
+ * <info>Only `MessageFlags.SuppressEmbeds` and `MessageFlags.Ephemeral` can be set.</info>
+ */
+
+ /**
+ * Options for updating the message received from a {@link MessageComponentInteraction}.
+ * @typedef {MessageEditOptions} InteractionUpdateOptions
+ * @property {boolean} [fetchReply] Whether to fetch the reply
+ */
+
+ /**
+ * Defers the reply to this interaction.
+ * @param {InteractionDeferReplyOptions} [options] Options for deferring the reply to this interaction
+ * @returns {Promise<Message|InteractionResponse>}
+ * @example
+ * // Defer the reply to this interaction
+ * interaction.deferReply()
+ * .then(console.log)
+ * .catch(console.error)
+ * @example
+ * // Defer to send an ephemeral reply later
+ * interaction.deferReply({ ephemeral: true })
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async deferReply(options = {}) {
+ if (this.deferred || this.replied) throw new DiscordjsError(ErrorCodes.InteractionAlreadyReplied);
+ this.ephemeral = options.ephemeral ?? false;
+ await this.client.rest.post(Routes.interactionCallback(this.id, this.token), {
+ body: {
+ type: InteractionResponseType.DeferredChannelMessageWithSource,
+ data: {
+ flags: options.ephemeral ? MessageFlags.Ephemeral : undefined,
+ },
+ },
+ auth: false,
+ });
+ this.deferred = true;
+
+ return options.fetchReply ? this.fetchReply() : new InteractionResponse(this);
+ }
+
+ /**
+ * Creates a reply to this interaction.
+ * <info>Use the `fetchReply` option to get the bot's reply message.</info>
+ * @param {string|MessagePayload|InteractionReplyOptions} options The options for the reply
+ * @returns {Promise<Message|InteractionResponse>}
+ * @example
+ * // Reply to the interaction and fetch the response
+ * interaction.reply({ content: 'Pong!', fetchReply: true })
+ * .then((message) => console.log(`Reply sent with content ${message.content}`))
+ * .catch(console.error);
+ * @example
+ * // Create an ephemeral reply with an embed
+ * const embed = new EmbedBuilder().setDescription('Pong!');
+ *
+ * interaction.reply({ embeds: [embed], ephemeral: true })
+ * .then(() => console.log('Reply sent.'))
+ * .catch(console.error);
+ */
+ async reply(options) {
+ if (this.deferred || this.replied) throw new DiscordjsError(ErrorCodes.InteractionAlreadyReplied);
+ this.ephemeral = options.ephemeral ?? false;
+
+ let messagePayload;
+ if (options instanceof MessagePayload) messagePayload = options;
+ else messagePayload = MessagePayload.create(this, options);
+
+ const { body: data, files } = await messagePayload.resolveBody().resolveFiles();
+
+ await this.client.rest.post(Routes.interactionCallback(this.id, this.token), {
+ body: {
+ type: InteractionResponseType.ChannelMessageWithSource,
+ data,
+ },
+ files,
+ auth: false,
+ });
+ this.replied = true;
+
+ return options.fetchReply ? this.fetchReply() : new InteractionResponse(this);
+ }
+
+ /**
+ * Fetches a reply to this interaction.
+ * @see Webhook#fetchMessage
+ * @param {Snowflake|'@original'} [message='@original'] The response to fetch
+ * @returns {Promise<Message>}
+ * @example
+ * // Fetch the initial reply to this interaction
+ * interaction.fetchReply()
+ * .then(reply => console.log(`Replied with ${reply.content}`))
+ * .catch(console.error);
+ */
+ fetchReply(message = '@original') {
+ return this.webhook.fetchMessage(message);
+ }
+
+ /**
+ * Options that can be passed into {@link InteractionResponses#editReply}.
+ * @typedef {WebhookMessageEditOptions} InteractionEditReplyOptions
+ * @property {MessageResolvable|'@original'} [message='@original'] The response to edit
+ */
+
+ /**
+ * Edits a reply to this interaction.
+ * @see Webhook#editMessage
+ * @param {string|MessagePayload|InteractionEditReplyOptions} options The new options for the message
+ * @returns {Promise<Message>}
+ * @example
+ * // Edit the initial reply to this interaction
+ * interaction.editReply('New content')
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async editReply(options) {
+ if (!this.deferred && !this.replied) throw new DiscordjsError(ErrorCodes.InteractionNotReplied);
+ const msg = await this.webhook.editMessage(options.message ?? '@original', options);
+ this.replied = true;
+ return msg;
+ }
+
+ /**
+ * Deletes a reply to this interaction.
+ * @see Webhook#deleteMessage
+ * @param {MessageResolvable|'@original'} [message='@original'] The response to delete
+ * @returns {Promise<void>}
+ * @example
+ * // Delete the initial reply to this interaction
+ * interaction.deleteReply()
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async deleteReply(message = '@original') {
+ await this.webhook.deleteMessage(message);
+ }
+
+ /**
+ * Send a follow-up message to this interaction.
+ * @param {string|MessagePayload|InteractionReplyOptions} options The options for the reply
+ * @returns {Promise<Message>}
+ */
+ followUp(options) {
+ if (!this.deferred && !this.replied) return Promise.reject(new DiscordjsError(ErrorCodes.InteractionNotReplied));
+ return this.webhook.send(options);
+ }
+
+ /**
+ * Defers an update to the message to which the component was attached.
+ * @param {InteractionDeferUpdateOptions} [options] Options for deferring the update to this interaction
+ * @returns {Promise<Message|InteractionResponse>}
+ * @example
+ * // Defer updating and reset the component's loading state
+ * interaction.deferUpdate()
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async deferUpdate(options = {}) {
+ if (this.deferred || this.replied) throw new DiscordjsError(ErrorCodes.InteractionAlreadyReplied);
+ await this.client.rest.post(Routes.interactionCallback(this.id, this.token), {
+ body: {
+ type: InteractionResponseType.DeferredMessageUpdate,
+ },
+ auth: false,
+ });
+ this.deferred = true;
+
+ return options.fetchReply ? this.fetchReply() : new InteractionResponse(this, this.message?.interaction?.id);
+ }
+
+ /**
+ * Updates the original message of the component on which the interaction was received on.
+ * @param {string|MessagePayload|InteractionUpdateOptions} options The options for the updated message
+ * @returns {Promise<Message|void>}
+ * @example
+ * // Remove the components from the message
+ * interaction.update({
+ * content: "A component interaction was received",
+ * components: []
+ * })
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async update(options) {
+ if (this.deferred || this.replied) throw new DiscordjsError(ErrorCodes.InteractionAlreadyReplied);
+
+ let messagePayload;
+ if (options instanceof MessagePayload) messagePayload = options;
+ else messagePayload = MessagePayload.create(this, options);
+
+ const { body: data, files } = await messagePayload.resolveBody().resolveFiles();
+
+ await this.client.rest.post(Routes.interactionCallback(this.id, this.token), {
+ body: {
+ type: InteractionResponseType.UpdateMessage,
+ data,
+ },
+ files,
+ auth: false,
+ });
+ this.replied = true;
+
+ return options.fetchReply ? this.fetchReply() : new InteractionResponse(this, this.message.interaction?.id);
+ }
+
+ /**
+ * Shows a modal component
+ * @param {ModalBuilder|ModalComponentData|APIModalInteractionResponseCallbackData} modal The modal to show
+ * @returns {Promise<void>}
+ */
+ async showModal(modal) {
+ if (this.deferred || this.replied) throw new DiscordjsError(ErrorCodes.InteractionAlreadyReplied);
+ await this.client.rest.post(Routes.interactionCallback(this.id, this.token), {
+ body: {
+ type: InteractionResponseType.Modal,
+ data: isJSONEncodable(modal) ? modal.toJSON() : this.client.options.jsonTransformer(modal),
+ },
+ auth: false,
+ });
+ this.replied = true;
+ }
+
+ /**
+ * An object containing the same properties as {@link CollectorOptions}, but a few less:
+ * @typedef {Object} AwaitModalSubmitOptions
+ * @property {CollectorFilter} [filter] The filter applied to this collector
+ * @property {number} time Time in milliseconds to wait for an interaction before rejecting
+ */
+
+ /**
+ * Collects a single modal submit interaction that passes the filter.
+ * The Promise will reject if the time expires.
+ * @param {AwaitModalSubmitOptions} options Options to pass to the internal collector
+ * @returns {Promise<ModalSubmitInteraction>}
+ * @example
+ * // Collect a modal submit interaction
+ * const filter = (interaction) => interaction.customId === 'modal';
+ * interaction.awaitModalSubmit({ filter, time: 15_000 })
+ * .then(interaction => console.log(`${interaction.customId} was submitted!`))
+ * .catch(console.error);
+ */
+ awaitModalSubmit(options) {
+ if (typeof options.time !== 'number') throw new DiscordjsError(ErrorCodes.InvalidType, 'time', 'number');
+ const _options = { ...options, max: 1, interactionType: InteractionType.ModalSubmit };
+ return new Promise((resolve, reject) => {
+ const collector = new InteractionCollector(this.client, _options);
+ collector.once('end', (interactions, reason) => {
+ const interaction = interactions.first();
+ if (interaction) resolve(interaction);
+ else reject(new DiscordjsError(ErrorCodes.InteractionCollectorError, reason));
+ });
+ });
+ }
+
+ static applyToClass(structure, ignore = []) {
+ const props = [
+ 'deferReply',
+ 'reply',
+ 'fetchReply',
+ 'editReply',
+ 'deleteReply',
+ 'followUp',
+ 'deferUpdate',
+ 'update',
+ 'showModal',
+ 'awaitModalSubmit',
+ ];
+
+ for (const prop of props) {
+ if (ignore.includes(prop)) continue;
+ Object.defineProperty(
+ structure.prototype,
+ prop,
+ Object.getOwnPropertyDescriptor(InteractionResponses.prototype, prop),
+ );
+ }
+ }
+}
+
+module.exports = InteractionResponses;
diff --git a/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js b/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js
new file mode 100644
index 0000000..cf455b9
--- /dev/null
+++ b/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js
@@ -0,0 +1,413 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { DiscordSnowflake } = require('@sapphire/snowflake');
+const { InteractionType, Routes } = require('discord-api-types/v10');
+const { DiscordjsTypeError, DiscordjsError, ErrorCodes } = require('../../errors');
+const { MaxBulkDeletableMessageAge } = require('../../util/Constants');
+const InteractionCollector = require('../InteractionCollector');
+const MessageCollector = require('../MessageCollector');
+const MessagePayload = require('../MessagePayload');
+
+/**
+ * Interface for classes that have text-channel-like features.
+ * @interface
+ */
+class TextBasedChannel {
+ constructor() {
+ /**
+ * A manager of the messages sent to this channel
+ * @type {GuildMessageManager}
+ */
+ this.messages = new GuildMessageManager(this);
+
+ /**
+ * The channel's last message id, if one was sent
+ * @type {?Snowflake}
+ */
+ this.lastMessageId = null;
+
+ /**
+ * The timestamp when the last pinned message was pinned, if there was one
+ * @type {?number}
+ */
+ this.lastPinTimestamp = null;
+ }
+
+ /**
+ * The Message object of the last message in the channel, if one was sent
+ * @type {?Message}
+ * @readonly
+ */
+ get lastMessage() {
+ return this.messages.resolve(this.lastMessageId);
+ }
+
+ /**
+ * The date when the last pinned message was pinned, if there was one
+ * @type {?Date}
+ * @readonly
+ */
+ get lastPinAt() {
+ return this.lastPinTimestamp && new Date(this.lastPinTimestamp);
+ }
+
+ /**
+ * The base message options for messages.
+ * @typedef {Object} BaseMessageOptions
+ * @property {string|null} [content=''] The content for the message. This can only be `null` when editing a message.
+ * @property {Array<(EmbedBuilder|Embed|APIEmbed)>} [embeds] The embeds for the message
+ * @property {MessageMentionOptions} [allowedMentions] Which mentions should be parsed from the message content
+ * (see [here](https://discord.com/developers/docs/resources/channel#allowed-mentions-object) for more details)
+ * @property {Array<(AttachmentBuilder|Attachment|AttachmentPayload|BufferResolvable)>} [files]
+ * The files to send with the message.
+ * @property {Array<(ActionRowBuilder|ActionRow|APIActionRowComponent)>} [components]
+ * Action rows containing interactive components for the message (buttons, select menus)
+ */
+
+ /**
+ * Options for sending a message with a reply.
+ * @typedef {Object} ReplyOptions
+ * @property {MessageResolvable} messageReference The message to reply to (must be in the same channel and not system)
+ * @property {boolean} [failIfNotExists=this.client.options.failIfNotExists] Whether to error if the referenced
+ * message does not exist (creates a standard message in this case when false)
+ */
+
+ /**
+ * The options for sending a message.
+ * @typedef {BaseMessageOptions} BaseMessageCreateOptions
+ * @property {boolean} [tts=false] Whether the message should be spoken aloud
+ * @property {string} [nonce=''] The nonce for the message
+ * @property {StickerResolvable[]} [stickers=[]] The stickers to send in the message
+ * @property {MessageFlags} [flags] Which flags to set for the message.
+ * <info>Only `MessageFlags.SuppressEmbeds` and `MessageFlags.SuppressNotifications` can be set.</info>
+ */
+
+ /**
+ * The options for sending a message.
+ * @typedef {BaseMessageCreateOptions} MessageCreateOptions
+ * @property {ReplyOptions} [reply] The options for replying to a message
+ */
+
+ /**
+ * Options provided to control parsing of mentions by Discord
+ * @typedef {Object} MessageMentionOptions
+ * @property {MessageMentionTypes[]} [parse] Types of mentions to be parsed
+ * @property {Snowflake[]} [users] Snowflakes of Users to be parsed as mentions
+ * @property {Snowflake[]} [roles] Snowflakes of Roles to be parsed as mentions
+ * @property {boolean} [repliedUser=true] Whether the author of the Message being replied to should be pinged
+ */
+
+ /**
+ * Types of mentions to enable in MessageMentionOptions.
+ * - `roles`
+ * - `users`
+ * - `everyone`
+ * @typedef {string} MessageMentionTypes
+ */
+
+ /**
+ * @typedef {Object} FileOptions
+ * @property {BufferResolvable} attachment File to attach
+ * @property {string} [name='file.jpg'] Filename of the attachment
+ * @property {string} description The description of the file
+ */
+
+ /**
+ * Sends a message to this channel.
+ * @param {string|MessagePayload|MessageCreateOptions} options The options to provide
+ * @returns {Promise<Message>}
+ * @example
+ * // Send a basic message
+ * channel.send('hello!')
+ * .then(message => console.log(`Sent message: ${message.content}`))
+ * .catch(console.error);
+ * @example
+ * // Send a remote file
+ * channel.send({
+ * files: ['https://cdn.discordapp.com/icons/222078108977594368/6e1019b3179d71046e463a75915e7244.png?size=2048']
+ * })
+ * .then(console.log)
+ * .catch(console.error);
+ * @example
+ * // Send a local file
+ * channel.send({
+ * files: [{
+ * attachment: 'entire/path/to/file.jpg',
+ * name: 'file.jpg',
+ * description: 'A description of the file'
+ * }]
+ * })
+ * .then(console.log)
+ * .catch(console.error);
+ */
+ async send(options) {
+ const User = require('../User');
+ const { GuildMember } = require('../GuildMember');
+
+ if (this instanceof User || this instanceof GuildMember) {
+ const dm = await this.createDM();
+ return dm.send(options);
+ }
+
+ let messagePayload;
+
+ if (options instanceof MessagePayload) {
+ messagePayload = options.resolveBody();
+ } else {
+ messagePayload = MessagePayload.create(this, options).resolveBody();
+ }
+
+ const { body, files } = await messagePayload.resolveFiles();
+ const d = await this.client.rest.post(Routes.channelMessages(this.id), { body, files });
+
+ return this.messages.cache.get(d.id) ?? this.messages._add(d);
+ }
+
+ /**
+ * Sends a typing indicator in the channel.
+ * @returns {Promise<void>} Resolves upon the typing status being sent
+ * @example
+ * // Start typing in a channel
+ * channel.sendTyping();
+ */
+ async sendTyping() {
+ await this.client.rest.post(Routes.channelTyping(this.id));
+ }
+
+ /**
+ * Creates a Message Collector.
+ * @param {MessageCollectorOptions} [options={}] The options to pass to the collector
+ * @returns {MessageCollector}
+ * @example
+ * // Create a message collector
+ * const filter = m => m.content.includes('discord');
+ * const collector = channel.createMessageCollector({ filter, time: 15_000 });
+ * collector.on('collect', m => console.log(`Collected ${m.content}`));
+ * collector.on('end', collected => console.log(`Collected ${collected.size} items`));
+ */
+ createMessageCollector(options = {}) {
+ return new MessageCollector(this, options);
+ }
+
+ /**
+ * An object containing the same properties as CollectorOptions, but a few more:
+ * @typedef {MessageCollectorOptions} AwaitMessagesOptions
+ * @property {string[]} [errors] Stop/end reasons that cause the promise to reject
+ */
+
+ /**
+ * Similar to createMessageCollector but in promise form.
+ * Resolves with a collection of messages that pass the specified filter.
+ * @param {AwaitMessagesOptions} [options={}] Optional options to pass to the internal collector
+ * @returns {Promise<Collection<Snowflake, Message>>}
+ * @example
+ * // Await !vote messages
+ * const filter = m => m.content.startsWith('!vote');
+ * // Errors: ['time'] treats ending because of the time limit as an error
+ * channel.awaitMessages({ filter, max: 4, time: 60_000, errors: ['time'] })
+ * .then(collected => console.log(collected.size))
+ * .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));
+ */
+ awaitMessages(options = {}) {
+ return new Promise((resolve, reject) => {
+ const collector = this.createMessageCollector(options);
+ collector.once('end', (collection, reason) => {
+ if (options.errors?.includes(reason)) {
+ reject(collection);
+ } else {
+ resolve(collection);
+ }
+ });
+ });
+ }
+
+ /**
+ * Creates a component interaction collector.
+ * @param {MessageComponentCollectorOptions} [options={}] Options to send to the collector
+ * @returns {InteractionCollector}
+ * @example
+ * // Create a button interaction collector
+ * const filter = (interaction) => interaction.customId === 'button' && interaction.user.id === 'someId';
+ * const collector = channel.createMessageComponentCollector({ filter, time: 15_000 });
+ * collector.on('collect', i => console.log(`Collected ${i.customId}`));
+ * collector.on('end', collected => console.log(`Collected ${collected.size} items`));
+ */
+ createMessageComponentCollector(options = {}) {
+ return new InteractionCollector(this.client, {
+ ...options,
+ interactionType: InteractionType.MessageComponent,
+ channel: this,
+ });
+ }
+
+ /**
+ * Collects a single component interaction that passes the filter.
+ * The Promise will reject if the time expires.
+ * @param {AwaitMessageComponentOptions} [options={}] Options to pass to the internal collector
+ * @returns {Promise<MessageComponentInteraction>}
+ * @example
+ * // Collect a message component interaction
+ * const filter = (interaction) => interaction.customId === 'button' && interaction.user.id === 'someId';
+ * channel.awaitMessageComponent({ filter, time: 15_000 })
+ * .then(interaction => console.log(`${interaction.customId} was clicked!`))
+ * .catch(console.error);
+ */
+ awaitMessageComponent(options = {}) {
+ const _options = { ...options, max: 1 };
+ return new Promise((resolve, reject) => {
+ const collector = this.createMessageComponentCollector(_options);
+ collector.once('end', (interactions, reason) => {
+ const interaction = interactions.first();
+ if (interaction) resolve(interaction);
+ else reject(new DiscordjsError(ErrorCodes.InteractionCollectorError, reason));
+ });
+ });
+ }
+
+ /**
+ * Bulk deletes given messages that are newer than two weeks.
+ * @param {Collection<Snowflake, Message>|MessageResolvable[]|number} messages
+ * Messages or number of messages to delete
+ * @param {boolean} [filterOld=false] Filter messages to remove those which are older than two weeks automatically
+ * @returns {Promise<Collection<Snowflake, Message|undefined>>} Returns the deleted messages
+ * @example
+ * // Bulk delete messages
+ * channel.bulkDelete(5)
+ * .then(messages => console.log(`Bulk deleted ${messages.size} messages`))
+ * .catch(console.error);
+ */
+ async bulkDelete(messages, filterOld = false) {
+ if (Array.isArray(messages) || messages instanceof Collection) {
+ let messageIds = messages instanceof Collection ? [...messages.keys()] : messages.map(m => m.id ?? m);
+ if (filterOld) {
+ messageIds = messageIds.filter(
+ id => Date.now() - DiscordSnowflake.timestampFrom(id) < MaxBulkDeletableMessageAge,
+ );
+ }
+ if (messageIds.length === 0) return new Collection();
+ if (messageIds.length === 1) {
+ const message = this.client.actions.MessageDelete.getMessage(
+ {
+ message_id: messageIds[0],
+ },
+ this,
+ );
+ await this.client.rest.delete(Routes.channelMessage(this.id, messageIds[0]));
+ return message ? new Collection([[message.id, message]]) : new Collection();
+ }
+ await this.client.rest.post(Routes.channelBulkDelete(this.id), { body: { messages: messageIds } });
+ return messageIds.reduce(
+ (col, id) =>
+ col.set(
+ id,
+ this.client.actions.MessageDeleteBulk.getMessage(
+ {
+ message_id: id,
+ },
+ this,
+ ),
+ ),
+ new Collection(),
+ );
+ }
+ if (!isNaN(messages)) {
+ const msgs = await this.messages.fetch({ limit: messages });
+ return this.bulkDelete(msgs, filterOld);
+ }
+ throw new DiscordjsTypeError(ErrorCodes.MessageBulkDeleteType);
+ }
+
+ /**
+ * Fetches all webhooks for the channel.
+ * @returns {Promise<Collection<Snowflake, Webhook>>}
+ * @example
+ * // Fetch webhooks
+ * channel.fetchWebhooks()
+ * .then(hooks => console.log(`This channel has ${hooks.size} hooks`))
+ * .catch(console.error);
+ */
+ fetchWebhooks() {
+ return this.guild.channels.fetchWebhooks(this.id);
+ }
+
+ /**
+ * Options used to create a {@link Webhook}.
+ * @typedef {Object} ChannelWebhookCreateOptions
+ * @property {string} name The name of the webhook
+ * @property {?(BufferResolvable|Base64Resolvable)} [avatar] Avatar for the webhook
+ * @property {string} [reason] Reason for creating the webhook
+ */
+
+ /**
+ * Creates a webhook for the channel.
+ * @param {ChannelWebhookCreateOptions} [options] Options for creating the webhook
+ * @returns {Promise<Webhook>} Returns the created Webhook
+ * @example
+ * // Create a webhook for the current channel
+ * channel.createWebhook({
+ * name: 'Snek',
+ * avatar: 'https://i.imgur.com/mI8XcpG.jpg',
+ * reason: 'Needed a cool new Webhook'
+ * })
+ * .then(console.log)
+ * .catch(console.error)
+ */
+ createWebhook(options) {
+ return this.guild.channels.createWebhook({ channel: this.id, ...options });
+ }
+
+ /**
+ * Sets the rate limit per user (slowmode) for this channel.
+ * @param {number} rateLimitPerUser The new rate limit in seconds
+ * @param {string} [reason] Reason for changing the channel's rate limit
+ * @returns {Promise<this>}
+ */
+ setRateLimitPerUser(rateLimitPerUser, reason) {
+ return this.edit({ rateLimitPerUser, reason });
+ }
+
+ /**
+ * Sets whether this channel is flagged as NSFW.
+ * @param {boolean} [nsfw=true] Whether the channel should be considered NSFW
+ * @param {string} [reason] Reason for changing the channel's NSFW flag
+ * @returns {Promise<this>}
+ */
+ setNSFW(nsfw = true, reason) {
+ return this.edit({ nsfw, reason });
+ }
+
+ static applyToClass(structure, full = false, ignore = []) {
+ const props = ['send'];
+ if (full) {
+ props.push(
+ 'lastMessage',
+ 'lastPinAt',
+ 'bulkDelete',
+ 'sendTyping',
+ 'createMessageCollector',
+ 'awaitMessages',
+ 'createMessageComponentCollector',
+ 'awaitMessageComponent',
+ 'fetchWebhooks',
+ 'createWebhook',
+ 'setRateLimitPerUser',
+ 'setNSFW',
+ );
+ }
+ for (const prop of props) {
+ if (ignore.includes(prop)) continue;
+ Object.defineProperty(
+ structure.prototype,
+ prop,
+ Object.getOwnPropertyDescriptor(TextBasedChannel.prototype, prop),
+ );
+ }
+ }
+}
+
+module.exports = TextBasedChannel;
+
+// Fixes Circular
+// eslint-disable-next-line import/order
+const GuildMessageManager = require('../../managers/GuildMessageManager');
diff --git a/node_modules/discord.js/src/util/APITypes.js b/node_modules/discord.js/src/util/APITypes.js
new file mode 100644
index 0000000..e8ab25a
--- /dev/null
+++ b/node_modules/discord.js/src/util/APITypes.js
@@ -0,0 +1,476 @@
+/* eslint-disable max-len */
+
+/**
+ * @external ActivityFlags
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ActivityFlags}
+ */
+
+/**
+ * @external ActivityType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ActivityType}
+ */
+
+/**
+ * @external APIActionRowComponent
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIActionRowComponent}
+ */
+
+/**
+ * @external APIApplication
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIApplication}
+ */
+
+/**
+ * @external APIApplicationCommand
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIApplicationCommand}
+ */
+
+/**
+ * @external APIApplicationCommandOption
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIApplicationCommandOption}
+ */
+
+/**
+ * @external APIAutoModerationAction
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIAutoModerationAction}
+ */
+
+/**
+ * @external APIButtonComponent
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIButtonComponent}
+ */
+
+/**
+ * @external APIChannel
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIChannel}
+ */
+
+/**
+ * @external APIChannelSelectComponent
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIChannelSelectComponent}
+ */
+
+/**
+ * @external APIEmbed
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIEmbed}
+ */
+
+/**
+ * @external APIEmbedField
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIEmbedField}
+ */
+
+/**
+ * @external APIEmbedProvider
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIEmbedProvider}
+ */
+
+/**
+ * @external APIEmoji
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIEmoji}
+ */
+
+/**
+ * @external APIGuild
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIGuild}
+ */
+
+/**
+ * @external APIGuildForumDefaultReactionEmoji
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIGuildForumDefaultReactionEmoji}
+ */
+
+/**
+ * @external APIGuildForumTag
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIGuildForumTag}
+ */
+
+/**
+ * @external APIInteraction
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIInteraction}
+ */
+
+/**
+ * @external APIInteractionDataResolvedChannel
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIInteractionDataResolvedChannel}
+ */
+
+/**
+ * @external APIInteractionDataResolvedGuildMember
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIInteractionDataResolvedGuildMember}
+ */
+
+/**
+ * @external APIInteractionGuildMember
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIInteractionGuildMember}
+ */
+
+/**
+ * @external APIMentionableSelectComponent
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIMentionableSelectComponent}
+ */
+
+/**
+ * @external APIMessage
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIMessage}
+ */
+
+/**
+ * @external APIMessageActionRowComponent
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIMessageActionRowComponent}
+ */
+
+/**
+ * @external APIMessageComponent
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIMessageComponent}
+ */
+
+/**
+ * @external APIMessageComponentEmoji
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIMessageComponentEmoji}
+ */
+
+/**
+ * @external APIModalInteractionResponse
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIModalInteractionResponse}
+ */
+
+/**
+ * @external APIModalInteractionResponseCallbackData
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIModalInteractionResponseCallbackData}
+ */
+
+/**
+ * @external APIModalComponent
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIModalComponent}
+ */
+
+/**
+ * @external APIModalSubmission
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIModalSubmission}
+ */
+
+/**
+ * @external APIPresence
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIPresence}
+ */
+
+/**
+ * @external APIRoleSelectComponent
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIRoleSelectComponent}
+ */
+
+/**
+ * @external APISelectMenuOption
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APISelectMenuOption}
+ */
+
+/**
+ * @external APIStringSelectComponent
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIStringSelectComponent}
+ */
+
+/**
+ * @external APITextInputComponent
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APITextInputComponent}
+ */
+
+/**
+ * @external APIUser
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIUser}
+ */
+
+/**
+ * @external APIUserSelectComponent
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIUserSelectComponent}
+ */
+
+/**
+ * @external ApplicationCommandType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ApplicationCommandType}
+ */
+
+/**
+ * @external ApplicationCommandOptionType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ApplicationCommandOptionType}
+ */
+
+/**
+ * @external ApplicationCommandPermissionType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ApplicationCommandPermissionType}
+ */
+
+/**
+ * @external ApplicationFlags
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ApplicationFlags}
+ */
+
+/**
+ * @external ApplicationRoleConnectionMetadataType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ApplicationRoleConnectionMetadataType}
+ */
+
+/**
+ * @external AttachmentFlags
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AttachmentFlags}
+ */
+
+/**
+ * @external AutoModerationActionType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AutoModerationActionType}
+ */
+
+/**
+ * @external AutoModerationRuleEventType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AutoModerationRuleEventType}
+ */
+
+/**
+ * @external AutoModerationRuleTriggerType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AutoModerationRuleTriggerType}
+ */
+
+/**
+ * @external AutoModerationRuleKeywordPresetType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AutoModerationRuleKeywordPresetType}
+ */
+
+/**
+ * @external AuditLogEvent
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AuditLogEvent}
+ */
+
+/**
+ * @external ButtonStyle
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ButtonStyle}
+ */
+
+/**
+ * @external ChannelFlags
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ChannelFlags}
+ */
+
+/**
+ * @external ChannelType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ChannelType}
+ */
+
+/**
+ * @external ComponentType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ComponentType}
+ */
+
+/**
+ * @external ForumLayoutType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ForumLayoutType}
+ */
+
+/**
+ * @external GatewayCloseCodes
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GatewayCloseCodes}
+ */
+
+/**
+ * @external GatewayDispatchEvents
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GatewayDispatchEvents}
+ */
+
+/**
+ * @external GatewayIntentBits
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GatewayIntentBits}
+ */
+
+/**
+ * @external GatewayOpcodes
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GatewayOpcodes}
+ */
+
+/**
+ * @external GuildDefaultMessageNotifications
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildDefaultMessageNotifications}
+ */
+
+/**
+ * @external GuildExplicitContentFilter
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildExplicitContentFilter}
+ */
+
+/**
+ * @external GuildFeature
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildFeature}
+ */
+
+/**
+ * @external GuildMFALevel
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildMFALevel}
+ */
+
+/**
+ * @external GuildMemberFlags
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildMemberFlags}
+ */
+
+/**
+ * @external GuildNSFWLevel
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildNSFWLevel}
+ */
+
+/**
+ * @external GuildOnboardingPromptType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildOnboardingPromptType}
+ */
+
+/**
+ * @external GuildPremiumTier
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildPremiumTier}
+ */
+
+/**
+ * @external GuildScheduledEventEntityType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildScheduledEventEntityType}
+ */
+
+/**
+ * @external GuildScheduledEventPrivacyLevel
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildScheduledEventPrivacyLevel}
+ */
+
+/**
+ * @external GuildScheduledEventStatus
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildScheduledEventStatus}
+ */
+
+/**
+ * @external GuildSystemChannelFlags
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildSystemChannelFlags}
+ */
+
+/**
+ * @external GuildVerificationLevel
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildVerificationLevel}
+ */
+
+/**
+ * @external IntegrationExpireBehavior
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/IntegrationExpireBehavior}
+ */
+
+/**
+ * @external InteractionType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/InteractionType}
+ */
+
+/**
+ * @external InteractionResponseType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/InteractionResponseType}
+ */
+
+/**
+ * @external InviteTargetType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/InviteTargetType}
+ */
+
+/**
+ * @external Locale
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-rest/common/enum/Locale}
+ */
+
+/**
+ * @external LocaleString
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-rest/common#LocaleString}
+ */
+
+/**
+ * @external MessageActivityType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/MessageActivityType}
+ */
+
+/**
+ * @external MessageType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/MessageType}
+ */
+
+/**
+ * @external MessageFlags
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/MessageFlags}
+ */
+
+/**
+ * @external OAuth2Scopes
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/OAuth2Scopes}
+ */
+
+/**
+ * @external OverwriteType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/OverwriteType}
+ */
+
+/**
+ * @external PermissionFlagsBits
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-payloads/common#PermissionFlagsBits}
+ */
+
+/**
+ * @external RoleFlags
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/RoleFlags}
+ */
+
+/**
+ * @external RESTGetAPIGuildThreadsResult
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#RESTGetAPIGuildThreadsResult}
+ */
+
+/**
+ * @external RESTJSONErrorCodes
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-rest/common/enum/RESTJSONErrorCodes}
+ */
+
+/**
+ * @external SortOrderType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/SortOrderType}
+ */
+
+/**
+ * @external StageInstancePrivacyLevel
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/StageInstancePrivacyLevel}
+ */
+
+/**
+ * @external StickerType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/StickerType}
+ */
+
+/**
+ * @external StickerFormatType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/StickerFormatType}
+ */
+
+/**
+ * @external TeamMemberMembershipState
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/TeamMemberMembershipState}
+ */
+
+/**
+ * @external TextInputStyle
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/TextInputStyle}
+ */
+
+/**
+ * @external ThreadAutoArchiveDuration
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ThreadAutoArchiveDuration}
+ */
+
+/**
+ * @external UserFlags
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/UserFlags}
+ */
+
+/**
+ * @external VideoQualityMode
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/VideoQualityMode}
+ */
+
+/**
+ * @external WebhookType
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/WebhookType}
+ */
diff --git a/node_modules/discord.js/src/util/ActivityFlagsBitField.js b/node_modules/discord.js/src/util/ActivityFlagsBitField.js
new file mode 100644
index 0000000..7c0ef76
--- /dev/null
+++ b/node_modules/discord.js/src/util/ActivityFlagsBitField.js
@@ -0,0 +1,26 @@
+'use strict';
+
+const { ActivityFlags } = require('discord-api-types/v10');
+const BitField = require('./BitField');
+
+/**
+ * Data structure that makes it easy to interact with an {@link Activity#flags} bitfield.
+ * @extends {BitField}
+ */
+class ActivityFlagsBitField extends BitField {
+ /**
+ * Numeric activity flags.
+ * @type {ActivityFlags}
+ * @memberof ActivityFlagsBitField
+ */
+ static Flags = ActivityFlags;
+}
+
+/**
+ * @name ActivityFlagsBitField
+ * @kind constructor
+ * @memberof ActivityFlagsBitField
+ * @param {BitFieldResolvable} [bits=0] Bit(s) to read from
+ */
+
+module.exports = ActivityFlagsBitField;
diff --git a/node_modules/discord.js/src/util/ApplicationFlagsBitField.js b/node_modules/discord.js/src/util/ApplicationFlagsBitField.js
new file mode 100644
index 0000000..6a5a9fe
--- /dev/null
+++ b/node_modules/discord.js/src/util/ApplicationFlagsBitField.js
@@ -0,0 +1,26 @@
+'use strict';
+
+const { ApplicationFlags } = require('discord-api-types/v10');
+const BitField = require('./BitField');
+
+/**
+ * Data structure that makes it easy to interact with a {@link ClientApplication#flags} bitfield.
+ * @extends {BitField}
+ */
+class ApplicationFlagsBitField extends BitField {
+ /**
+ * Numeric application flags. All available properties:
+ * @type {ApplicationFlags}
+ * @memberof ApplicationFlagsBitField
+ */
+ static Flags = ApplicationFlags;
+}
+
+/**
+ * @name ApplicationFlagsBitField
+ * @kind constructor
+ * @memberof ApplicationFlagsBitField
+ * @param {BitFieldResolvable} [bits=0] Bit(s) to read from
+ */
+
+module.exports = ApplicationFlagsBitField;
diff --git a/node_modules/discord.js/src/util/AttachmentFlagsBitField.js b/node_modules/discord.js/src/util/AttachmentFlagsBitField.js
new file mode 100644
index 0000000..f7f2bd2
--- /dev/null
+++ b/node_modules/discord.js/src/util/AttachmentFlagsBitField.js
@@ -0,0 +1,26 @@
+'use strict';
+
+const { AttachmentFlags } = require('discord-api-types/v10');
+const BitField = require('./BitField');
+
+/**
+ * Data structure that makes it easy to interact with an {@link Attachment#flags} bitfield.
+ * @extends {BitField}
+ */
+class AttachmentFlagsBitField extends BitField {
+ /**
+ * Numeric attachment flags.
+ * @type {AttachmentFlags}
+ * @memberof AttachmentFlagsBitField
+ */
+ static Flags = AttachmentFlags;
+}
+
+/**
+ * @name AttachmentFlagsBitField
+ * @kind constructor
+ * @memberof AttachmentFlagsBitField
+ * @param {BitFieldResolvable} [bits=0] Bit(s) to read from
+ */
+
+module.exports = AttachmentFlagsBitField;
diff --git a/node_modules/discord.js/src/util/BitField.js b/node_modules/discord.js/src/util/BitField.js
new file mode 100644
index 0000000..f0778f6
--- /dev/null
+++ b/node_modules/discord.js/src/util/BitField.js
@@ -0,0 +1,176 @@
+'use strict';
+
+const { DiscordjsRangeError, ErrorCodes } = require('../errors');
+
+/**
+ * Data structure that makes it easy to interact with a bitfield.
+ */
+class BitField {
+ /**
+ * Numeric bitfield flags.
+ * <info>Defined in extension classes</info>
+ * @type {Object}
+ * @memberof BitField
+ * @abstract
+ */
+ static Flags = {};
+
+ /**
+ * @type {number|bigint}
+ * @memberof BitField
+ * @private
+ */
+ static DefaultBit = 0;
+
+ /**
+ * @param {BitFieldResolvable} [bits=this.constructor.DefaultBit] Bit(s) to read from
+ */
+ constructor(bits = this.constructor.DefaultBit) {
+ /**
+ * Bitfield of the packed bits
+ * @type {number|bigint}
+ */
+ this.bitfield = this.constructor.resolve(bits);
+ }
+
+ /**
+ * Checks whether the bitfield has a bit, or any of multiple bits.
+ * @param {BitFieldResolvable} bit Bit(s) to check for
+ * @returns {boolean}
+ */
+ any(bit) {
+ return (this.bitfield & this.constructor.resolve(bit)) !== this.constructor.DefaultBit;
+ }
+
+ /**
+ * Checks if this bitfield equals another
+ * @param {BitFieldResolvable} bit Bit(s) to check for
+ * @returns {boolean}
+ */
+ equals(bit) {
+ return this.bitfield === this.constructor.resolve(bit);
+ }
+
+ /**
+ * Checks whether the bitfield has a bit, or multiple bits.
+ * @param {BitFieldResolvable} bit Bit(s) to check for
+ * @returns {boolean}
+ */
+ has(bit) {
+ bit = this.constructor.resolve(bit);
+ return (this.bitfield & bit) === bit;
+ }
+
+ /**
+ * Gets all given bits that are missing from the bitfield.
+ * @param {BitFieldResolvable} bits Bit(s) to check for
+ * @param {...*} hasParams Additional parameters for the has method, if any
+ * @returns {string[]}
+ */
+ missing(bits, ...hasParams) {
+ return new this.constructor(bits).remove(this).toArray(...hasParams);
+ }
+
+ /**
+ * Freezes these bits, making them immutable.
+ * @returns {Readonly<BitField>}
+ */
+ freeze() {
+ return Object.freeze(this);
+ }
+
+ /**
+ * Adds bits to these ones.
+ * @param {...BitFieldResolvable} [bits] Bits to add
+ * @returns {BitField} These bits or new BitField if the instance is frozen.
+ */
+ add(...bits) {
+ let total = this.constructor.DefaultBit;
+ for (const bit of bits) {
+ total |= this.constructor.resolve(bit);
+ }
+ if (Object.isFrozen(this)) return new this.constructor(this.bitfield | total);
+ this.bitfield |= total;
+ return this;
+ }
+
+ /**
+ * Removes bits from these.
+ * @param {...BitFieldResolvable} [bits] Bits to remove
+ * @returns {BitField} These bits or new BitField if the instance is frozen.
+ */
+ remove(...bits) {
+ let total = this.constructor.DefaultBit;
+ for (const bit of bits) {
+ total |= this.constructor.resolve(bit);
+ }
+ if (Object.isFrozen(this)) return new this.constructor(this.bitfield & ~total);
+ this.bitfield &= ~total;
+ return this;
+ }
+
+ /**
+ * Gets an object mapping field names to a {@link boolean} indicating whether the
+ * bit is available.
+ * @param {...*} hasParams Additional parameters for the has method, if any
+ * @returns {Object}
+ */
+ serialize(...hasParams) {
+ const serialized = {};
+ for (const [flag, bit] of Object.entries(this.constructor.Flags)) {
+ if (isNaN(flag)) serialized[flag] = this.has(bit, ...hasParams);
+ }
+ return serialized;
+ }
+
+ /**
+ * Gets an {@link Array} of bitfield names based on the bits available.
+ * @param {...*} hasParams Additional parameters for the has method, if any
+ * @returns {string[]}
+ */
+ toArray(...hasParams) {
+ return [...this[Symbol.iterator](...hasParams)];
+ }
+
+ toJSON() {
+ return typeof this.bitfield === 'number' ? this.bitfield : this.bitfield.toString();
+ }
+
+ valueOf() {
+ return this.bitfield;
+ }
+
+ *[Symbol.iterator](...hasParams) {
+ for (const bitName of Object.keys(this.constructor.Flags)) {
+ if (isNaN(bitName) && this.has(bitName, ...hasParams)) yield bitName;
+ }
+ }
+
+ /**
+ * Data that can be resolved to give a bitfield. This can be:
+ * * A bit number (this can be a number literal or a value taken from {@link BitField.Flags})
+ * * A string bit number
+ * * An instance of BitField
+ * * An Array of BitFieldResolvable
+ * @typedef {number|string|bigint|BitField|BitFieldResolvable[]} BitFieldResolvable
+ */
+
+ /**
+ * Resolves bitfields to their numeric form.
+ * @param {BitFieldResolvable} [bit] bit(s) to resolve
+ * @returns {number|bigint}
+ */
+ static resolve(bit) {
+ const { DefaultBit } = this;
+ if (typeof DefaultBit === typeof bit && bit >= DefaultBit) return bit;
+ if (bit instanceof BitField) return bit.bitfield;
+ if (Array.isArray(bit)) return bit.map(p => this.resolve(p)).reduce((prev, p) => prev | p, DefaultBit);
+ if (typeof bit === 'string') {
+ if (!isNaN(bit)) return typeof DefaultBit === 'bigint' ? BigInt(bit) : Number(bit);
+ if (this.Flags[bit] !== undefined) return this.Flags[bit];
+ }
+ throw new DiscordjsRangeError(ErrorCodes.BitFieldInvalid, bit);
+ }
+}
+
+module.exports = BitField;
diff --git a/node_modules/discord.js/src/util/ChannelFlagsBitField.js b/node_modules/discord.js/src/util/ChannelFlagsBitField.js
new file mode 100644
index 0000000..ad987e1
--- /dev/null
+++ b/node_modules/discord.js/src/util/ChannelFlagsBitField.js
@@ -0,0 +1,41 @@
+'use strict';
+
+const { ChannelFlags } = require('discord-api-types/v10');
+const BitField = require('./BitField');
+
+/**
+ * Data structure that makes it easy to interact with a {@link BaseChannel#flags} bitfield.
+ * @extends {BitField}
+ */
+class ChannelFlagsBitField extends BitField {
+ /**
+ * Numeric guild channel flags.
+ * @type {ChannelFlags}
+ * @memberof ChannelFlagsBitField
+ */
+ static Flags = ChannelFlags;
+}
+
+/**
+ * @name ChannelFlagsBitField
+ * @kind constructor
+ * @memberof ChannelFlagsBitField
+ * @param {BitFieldResolvable} [bits=0] Bit(s) to read from
+ */
+
+/**
+ * Bitfield of the packed bits
+ * @type {number}
+ * @name ChannelFlagsBitField#bitfield
+ */
+
+/**
+ * Data that can be resolved to give a channel flag bitfield. This can be:
+ * * A string (see {@link ChannelFlagsBitField.Flags})
+ * * A channel flag
+ * * An instance of ChannelFlagsBitField
+ * * An Array of ChannelFlagsResolvable
+ * @typedef {string|number|ChannelFlagsBitField|ChannelFlagsResolvable[]} ChannelFlagsResolvable
+ */
+
+module.exports = ChannelFlagsBitField;
diff --git a/node_modules/discord.js/src/util/Channels.js b/node_modules/discord.js/src/util/Channels.js
new file mode 100644
index 0000000..8d070bd
--- /dev/null
+++ b/node_modules/discord.js/src/util/Channels.js
@@ -0,0 +1,150 @@
+'use strict';
+
+const { lazy } = require('@discordjs/util');
+const { ChannelType } = require('discord-api-types/v10');
+
+const getCategoryChannel = lazy(() => require('../structures/CategoryChannel'));
+const getDMChannel = lazy(() => require('../structures/DMChannel'));
+const getNewsChannel = lazy(() => require('../structures/NewsChannel'));
+const getStageChannel = lazy(() => require('../structures/StageChannel'));
+const getTextChannel = lazy(() => require('../structures/TextChannel'));
+const getThreadChannel = lazy(() => require('../structures/ThreadChannel'));
+const getVoiceChannel = lazy(() => require('../structures/VoiceChannel'));
+const getDirectoryChannel = lazy(() => require('../structures/DirectoryChannel'));
+const getPartialGroupDMChannel = lazy(() => require('../structures/PartialGroupDMChannel'));
+const getForumChannel = lazy(() => require('../structures/ForumChannel'));
+
+/**
+ * Creates a discord.js channel from data received from the API.
+ * @param {Client} client The client
+ * @param {APIChannel} data The data of the channel to create
+ * @param {Guild} [guild] The guild where this channel belongs
+ * @param {Object} [extras] Extra information to supply for creating this channel
+ * @returns {BaseChannel} Any kind of channel.
+ * @ignore
+ */
+function createChannel(client, data, guild, { allowUnknownGuild } = {}) {
+ let channel;
+ if (!data.guild_id && !guild) {
+ if ((data.recipients && data.type !== ChannelType.GroupDM) || data.type === ChannelType.DM) {
+ channel = new (getDMChannel())(client, data);
+ } else if (data.type === ChannelType.GroupDM) {
+ channel = new (getPartialGroupDMChannel())(client, data);
+ }
+ } else {
+ guild ??= client.guilds.cache.get(data.guild_id);
+
+ if (guild || allowUnknownGuild) {
+ switch (data.type) {
+ case ChannelType.GuildText: {
+ channel = new (getTextChannel())(guild, data, client);
+ break;
+ }
+ case ChannelType.GuildVoice: {
+ channel = new (getVoiceChannel())(guild, data, client);
+ break;
+ }
+ case ChannelType.GuildCategory: {
+ channel = new (getCategoryChannel())(guild, data, client);
+ break;
+ }
+ case ChannelType.GuildAnnouncement: {
+ channel = new (getNewsChannel())(guild, data, client);
+ break;
+ }
+ case ChannelType.GuildStageVoice: {
+ channel = new (getStageChannel())(guild, data, client);
+ break;
+ }
+ case ChannelType.AnnouncementThread:
+ case ChannelType.PublicThread:
+ case ChannelType.PrivateThread: {
+ channel = new (getThreadChannel())(guild, data, client);
+ if (!allowUnknownGuild) channel.parent?.threads.cache.set(channel.id, channel);
+ break;
+ }
+ case ChannelType.GuildDirectory:
+ channel = new (getDirectoryChannel())(guild, data, client);
+ break;
+ case ChannelType.GuildForum:
+ channel = new (getForumChannel())(guild, data, client);
+ break;
+ }
+ if (channel && !allowUnknownGuild) guild.channels?.cache.set(channel.id, channel);
+ }
+ }
+ return channel;
+}
+
+/**
+ * Transforms an API guild forum tag to camel-cased guild forum tag.
+ * @param {APIGuildForumTag} tag The tag to transform
+ * @returns {GuildForumTag}
+ * @ignore
+ */
+function transformAPIGuildForumTag(tag) {
+ return {
+ id: tag.id,
+ name: tag.name,
+ moderated: tag.moderated,
+ emoji:
+ tag.emoji_id ?? tag.emoji_name
+ ? {
+ id: tag.emoji_id,
+ name: tag.emoji_name,
+ }
+ : null,
+ };
+}
+
+/**
+ * Transforms a camel-cased guild forum tag to an API guild forum tag.
+ * @param {GuildForumTag} tag The tag to transform
+ * @returns {APIGuildForumTag}
+ * @ignore
+ */
+function transformGuildForumTag(tag) {
+ return {
+ id: tag.id,
+ name: tag.name,
+ moderated: tag.moderated,
+ emoji_id: tag.emoji?.id ?? null,
+ emoji_name: tag.emoji?.name ?? null,
+ };
+}
+
+/**
+ * Transforms an API guild forum default reaction object to a
+ * camel-cased guild forum default reaction object.
+ * @param {APIGuildForumDefaultReactionEmoji} defaultReaction The default reaction to transform
+ * @returns {DefaultReactionEmoji}
+ * @ignore
+ */
+function transformAPIGuildDefaultReaction(defaultReaction) {
+ return {
+ id: defaultReaction.emoji_id,
+ name: defaultReaction.emoji_name,
+ };
+}
+
+/**
+ * Transforms a camel-cased guild forum default reaction object to an
+ * API guild forum default reaction object.
+ * @param {DefaultReactionEmoji} defaultReaction The default reaction to transform
+ * @returns {APIGuildForumDefaultReactionEmoji}
+ * @ignore
+ */
+function transformGuildDefaultReaction(defaultReaction) {
+ return {
+ emoji_id: defaultReaction.id,
+ emoji_name: defaultReaction.name,
+ };
+}
+
+module.exports = {
+ createChannel,
+ transformAPIGuildForumTag,
+ transformGuildForumTag,
+ transformAPIGuildDefaultReaction,
+ transformGuildDefaultReaction,
+};
diff --git a/node_modules/discord.js/src/util/Colors.js b/node_modules/discord.js/src/util/Colors.js
new file mode 100644
index 0000000..a2d35e5
--- /dev/null
+++ b/node_modules/discord.js/src/util/Colors.js
@@ -0,0 +1,73 @@
+'use strict';
+
+/**
+ * @typedef {Object} Colors
+ * @property {number} Default 0x000000 | rgb(0,0,0)
+ * @property {number} White 0xFFFFFF | rgb(255,255,255)
+ * @property {number} Aqua 0x1ABC9C | rgb(26,188,156)
+ * @property {number} Green 0x57F287 | rgb(87,242,135)
+ * @property {number} Blue 0x3498DB | rgb(52,152,219)
+ * @property {number} Yellow 0xFEE75C | rgb(254,231,92)
+ * @property {number} Purple 0x9B59B6 | rgb(155,89,182)
+ * @property {number} LuminousVividPink 0xE91E63 | rgb(233,30,99)
+ * @property {number} Fuchsia 0xEB459E | rgb(235,69,158)
+ * @property {number} Gold 0xF1C40F | rgb(241,196,15)
+ * @property {number} Orange 0xE67E22 | rgb(230,126,34)
+ * @property {number} Red 0xED4245 | rgb(237,66,69)
+ * @property {number} Grey 0x95A5A6 | rgb(149,165,166)
+ * @property {number} Navy 0x34495E | rgb(52,73,94)
+ * @property {number} DarkAqua 0x11806A | rgb(17,128,106)
+ * @property {number} DarkGreen 0x1F8B4C | rgb(31,139,76)
+ * @property {number} DarkBlue 0x206694 | rgb(32,102,148)
+ * @property {number} DarkPurple 0x71368A | rgb(113,54,138)
+ * @property {number} DarkVividPink 0xAD1457 | rgb(173,20,87)
+ * @property {number} DarkGold 0xC27C0E | rgb(194,124,14)
+ * @property {number} DarkOrange 0xA84300 | rgb(168,67,0)
+ * @property {number} DarkRed 0x992D22 | rgb(153,45,34)
+ * @property {number} DarkGrey 0x979C9F | rgb(151,156,159)
+ * @property {number} DarkerGrey 0x7F8C8D | rgb(127,140,141)
+ * @property {number} LightGrey 0xBCC0C0 | rgb(188,192,192)
+ * @property {number} DarkNavy 0x2C3E50 | rgb(44,62,80)
+ * @property {number} Blurple 0x5865F2 | rgb(88,101,242)
+ * @property {number} Greyple 0x99AAb5 | rgb(153,170,181)
+ * @property {number} DarkButNotBlack 0x2C2F33 | rgb(44,47,51)
+ * @property {number} NotQuiteBlack 0x23272A | rgb(35,39,42)
+ */
+
+// JSDoc for IntelliSense purposes
+/**
+ * @type {Colors}
+ * @ignore
+ */
+module.exports = {
+ Default: 0x000000,
+ White: 0xffffff,
+ Aqua: 0x1abc9c,
+ Green: 0x57f287,
+ Blue: 0x3498db,
+ Yellow: 0xfee75c,
+ Purple: 0x9b59b6,
+ LuminousVividPink: 0xe91e63,
+ Fuchsia: 0xeb459e,
+ Gold: 0xf1c40f,
+ Orange: 0xe67e22,
+ Red: 0xed4245,
+ Grey: 0x95a5a6,
+ Navy: 0x34495e,
+ DarkAqua: 0x11806a,
+ DarkGreen: 0x1f8b4c,
+ DarkBlue: 0x206694,
+ DarkPurple: 0x71368a,
+ DarkVividPink: 0xad1457,
+ DarkGold: 0xc27c0e,
+ DarkOrange: 0xa84300,
+ DarkRed: 0x992d22,
+ DarkGrey: 0x979c9f,
+ DarkerGrey: 0x7f8c8d,
+ LightGrey: 0xbcc0c0,
+ DarkNavy: 0x2c3e50,
+ Blurple: 0x5865f2,
+ Greyple: 0x99aab5,
+ DarkButNotBlack: 0x2c2f33,
+ NotQuiteBlack: 0x23272a,
+};
diff --git a/node_modules/discord.js/src/util/Components.js b/node_modules/discord.js/src/util/Components.js
new file mode 100644
index 0000000..1a2ccbc
--- /dev/null
+++ b/node_modules/discord.js/src/util/Components.js
@@ -0,0 +1,152 @@
+'use strict';
+
+// This file contains the typedefs for camel-cased JSON data
+const { ComponentBuilder } = require('@discordjs/builders');
+const { ComponentType } = require('discord-api-types/v10');
+/**
+ * @typedef {Object} BaseComponentData
+ * @property {ComponentType} type The type of component
+ */
+
+/**
+ * @typedef {BaseComponentData} ActionRowData
+ * @property {ComponentData[]} components The components in this action row
+ */
+
+/**
+ * @typedef {BaseComponentData} ButtonComponentData
+ * @property {ButtonStyle} style The style of the button
+ * @property {?boolean} disabled Whether this button is disabled
+ * @property {string} label The label of this button
+ * @property {?APIMessageComponentEmoji} emoji The emoji on this button
+ * @property {?string} customId The custom id of the button
+ * @property {?string} url The URL of the button
+ */
+
+/**
+ * @typedef {object} SelectMenuComponentOptionData
+ * @property {string} label The label of the option
+ * @property {string} value The value of the option
+ * @property {?string} description The description of the option
+ * @property {?APIMessageComponentEmoji} emoji The emoji on the option
+ * @property {?boolean} default Whether this option is selected by default
+ */
+
+/**
+ * @typedef {BaseComponentData} SelectMenuComponentData
+ * @property {string} customId The custom id of the select menu
+ * @property {?boolean} disabled Whether the select menu is disabled or not
+ * @property {?number} maxValues The maximum amount of options that can be selected
+ * @property {?number} minValues The minimum amount of options that can be selected
+ * @property {?SelectMenuComponentOptionData[]} options The options in this select menu
+ * @property {?string} placeholder The placeholder of the select menu
+ */
+
+/**
+ * @typedef {ActionRowData|ButtonComponentData|SelectMenuComponentData} MessageComponentData
+ */
+
+/**
+ * @typedef {BaseComponentData} TextInputComponentData
+ * @property {string} customId The custom id of the text input
+ * @property {TextInputStyle} style The style of the text input
+ * @property {string} label The text that appears on top of the text input field
+ * @property {?number} minLength The minimum number of characters that can be entered in the text input
+ * @property {?number} maxLength The maximum number of characters that can be entered in the text input
+ * @property {?boolean} required Whether or not the text input is required or not
+ * @property {?string} value The pre-filled text in the text input
+ * @property {?string} placeholder Placeholder for the text input
+ */
+
+/**
+ * @typedef {ActionRowData|ButtonComponentData|SelectMenuComponentData|TextInputComponentData} ComponentData
+ */
+
+/**
+ * Any emoji data that can be used within a button
+ * @typedef {APIMessageComponentEmoji|string} ComponentEmojiResolvable
+ */
+
+/**
+ * Transforms API data into a component
+ * @param {APIMessageComponent|Component} data The data to create the component from
+ * @returns {Component}
+ */
+function createComponent(data) {
+ if (data instanceof Component) {
+ return data;
+ }
+
+ switch (data.type) {
+ case ComponentType.ActionRow:
+ return new ActionRow(data);
+ case ComponentType.Button:
+ return new ButtonComponent(data);
+ case ComponentType.StringSelect:
+ return new StringSelectMenuComponent(data);
+ case ComponentType.TextInput:
+ return new TextInputComponent(data);
+ case ComponentType.UserSelect:
+ return new UserSelectMenuComponent(data);
+ case ComponentType.RoleSelect:
+ return new RoleSelectMenuComponent(data);
+ case ComponentType.MentionableSelect:
+ return new MentionableSelectMenuComponent(data);
+ case ComponentType.ChannelSelect:
+ return new ChannelSelectMenuComponent(data);
+ default:
+ return new Component(data);
+ }
+}
+
+/**
+ * Transforms API data into a component builder
+ * @param {APIMessageComponent|ComponentBuilder} data The data to create the component from
+ * @returns {ComponentBuilder}
+ */
+function createComponentBuilder(data) {
+ if (data instanceof ComponentBuilder) {
+ return data;
+ }
+
+ switch (data.type) {
+ case ComponentType.ActionRow:
+ return new ActionRowBuilder(data);
+ case ComponentType.Button:
+ return new ButtonBuilder(data);
+ case ComponentType.StringSelect:
+ return new StringSelectMenuBuilder(data);
+ case ComponentType.TextInput:
+ return new TextInputBuilder(data);
+ case ComponentType.UserSelect:
+ return new UserSelectMenuBuilder(data);
+ case ComponentType.RoleSelect:
+ return new RoleSelectMenuBuilder(data);
+ case ComponentType.MentionableSelect:
+ return new MentionableSelectMenuBuilder(data);
+ case ComponentType.ChannelSelect:
+ return new ChannelSelectMenuBuilder(data);
+ default:
+ return new ComponentBuilder(data);
+ }
+}
+
+module.exports = { createComponent, createComponentBuilder };
+
+const ActionRow = require('../structures/ActionRow');
+const ActionRowBuilder = require('../structures/ActionRowBuilder');
+const ButtonBuilder = require('../structures/ButtonBuilder');
+const ButtonComponent = require('../structures/ButtonComponent');
+const ChannelSelectMenuBuilder = require('../structures/ChannelSelectMenuBuilder');
+const ChannelSelectMenuComponent = require('../structures/ChannelSelectMenuComponent');
+const Component = require('../structures/Component');
+const MentionableSelectMenuBuilder = require('../structures/MentionableSelectMenuBuilder');
+const MentionableSelectMenuComponent = require('../structures/MentionableSelectMenuComponent');
+const RoleSelectMenuBuilder = require('../structures/RoleSelectMenuBuilder');
+const RoleSelectMenuComponent = require('../structures/RoleSelectMenuComponent');
+const StringSelectMenuBuilder = require('../structures/StringSelectMenuBuilder');
+const StringSelectMenuComponent = require('../structures/StringSelectMenuComponent');
+const TextInputBuilder = require('../structures/TextInputBuilder');
+const TextInputComponent = require('../structures/TextInputComponent');
+const UserSelectMenuBuilder = require('../structures/UserSelectMenuBuilder');
+const UserSelectMenuComponent = require('../structures/UserSelectMenuComponent');
diff --git a/node_modules/discord.js/src/util/Constants.js b/node_modules/discord.js/src/util/Constants.js
new file mode 100644
index 0000000..c2d3da9
--- /dev/null
+++ b/node_modules/discord.js/src/util/Constants.js
@@ -0,0 +1,230 @@
+'use strict';
+
+const { ChannelType, MessageType, ComponentType, ImageFormat, StickerFormatType } = require('discord-api-types/v10');
+
+/**
+ * Max bulk deletable message age
+ * @typedef {number} MaxBulkDeletableMessageAge
+ */
+exports.MaxBulkDeletableMessageAge = 1_209_600_000;
+
+/**
+ * The name of an item to be swept in Sweepers
+ * * `autoModerationRules`
+ * * `applicationCommands` - both global and guild commands
+ * * `bans`
+ * * `emojis`
+ * * `invites` - accepts the `lifetime` property, using it will sweep based on expires timestamp
+ * * `guildMembers`
+ * * `messages` - accepts the `lifetime` property, using it will sweep based on edited or created timestamp
+ * * `presences`
+ * * `reactions`
+ * * `stageInstances`
+ * * `stickers`
+ * * `threadMembers`
+ * * `threads` - accepts the `lifetime` property, using it will sweep archived threads based on archived timestamp
+ * * `users`
+ * * `voiceStates`
+ * @typedef {string} SweeperKey
+ */
+exports.SweeperKeys = [
+ 'autoModerationRules',
+ 'applicationCommands',
+ 'bans',
+ 'emojis',
+ 'invites',
+ 'guildMembers',
+ 'messages',
+ 'presences',
+ 'reactions',
+ 'stageInstances',
+ 'stickers',
+ 'threadMembers',
+ 'threads',
+ 'users',
+ 'voiceStates',
+];
+
+/**
+ * The types of messages that are not `System`. The available types are:
+ * * {@link MessageType.Default}
+ * * {@link MessageType.Reply}
+ * * {@link MessageType.ChatInputCommand}
+ * * {@link MessageType.ContextMenuCommand}
+ * @typedef {MessageType[]} NonSystemMessageTypes
+ */
+exports.NonSystemMessageTypes = [
+ MessageType.Default,
+ MessageType.Reply,
+ MessageType.ChatInputCommand,
+ MessageType.ContextMenuCommand,
+];
+
+/**
+ * The guild channels that are text-based.
+ * * TextChannel
+ * * NewsChannel
+ * * ThreadChannel
+ * * VoiceChannel
+ * * StageChannel
+ * @typedef {TextChannel|NewsChannel|ThreadChannel|VoiceChannel|StageChannel} GuildTextBasedChannel
+ */
+
+/**
+ * The types of guild channels that are text-based. The available types are:
+ * * {@link ChannelType.GuildText}
+ * * {@link ChannelType.GuildAnnouncement}
+ * * {@link ChannelType.AnnouncementThread}
+ * * {@link ChannelType.PublicThread}
+ * * {@link ChannelType.PrivateThread}
+ * * {@link ChannelType.GuildVoice}
+ * * {@link ChannelType.GuildStageVoice}
+ * @typedef {ChannelType[]} GuildTextBasedChannelTypes
+ */
+exports.GuildTextBasedChannelTypes = [
+ ChannelType.GuildText,
+ ChannelType.GuildAnnouncement,
+ ChannelType.AnnouncementThread,
+ ChannelType.PublicThread,
+ ChannelType.PrivateThread,
+ ChannelType.GuildVoice,
+ ChannelType.GuildStageVoice,
+];
+
+/**
+ * The channels that are text-based.
+ * * DMChannel
+ * * GuildTextBasedChannel
+ * @typedef {DMChannel|GuildTextBasedChannel} TextBasedChannels
+ */
+
+/**
+ * Data that resolves to give a text-based channel. This can be:
+ * * A text-based channel
+ * * A snowflake
+ * @typedef {TextBasedChannels|Snowflake} TextBasedChannelsResolvable
+ */
+
+/**
+ * The types of channels that are text-based. The available types are:
+ * * {@link ChannelType.DM}
+ * * {@link ChannelType.GuildText}
+ * * {@link ChannelType.GuildAnnouncement}
+ * * {@link ChannelType.AnnouncementThread}
+ * * {@link ChannelType.PublicThread}
+ * * {@link ChannelType.PrivateThread}
+ * * {@link ChannelType.GuildVoice}
+ * * {@link ChannelType.GuildStageVoice}
+ * @typedef {ChannelType[]} TextBasedChannelTypes
+ */
+exports.TextBasedChannelTypes = [...exports.GuildTextBasedChannelTypes, ChannelType.DM];
+
+/**
+ * The types of channels that are threads. The available types are:
+ * * {@link ChannelType.AnnouncementThread}
+ * * {@link ChannelType.PublicThread}
+ * * {@link ChannelType.PrivateThread}
+ * @typedef {ChannelType[]} ThreadChannelTypes
+ */
+exports.ThreadChannelTypes = [ChannelType.AnnouncementThread, ChannelType.PublicThread, ChannelType.PrivateThread];
+
+/**
+ * The types of channels that are voice-based. The available types are:
+ * * {@link ChannelType.GuildVoice}
+ * * {@link ChannelType.GuildStageVoice}
+ * @typedef {ChannelType[]} VoiceBasedChannelTypes
+ */
+exports.VoiceBasedChannelTypes = [ChannelType.GuildVoice, ChannelType.GuildStageVoice];
+
+/**
+ * The types of select menus. The available types are:
+ * * {@link ComponentType.StringSelect}
+ * * {@link ComponentType.UserSelect}
+ * * {@link ComponentType.RoleSelect}
+ * * {@link ComponentType.MentionableSelect}
+ * * {@link ComponentType.ChannelSelect}
+ * @typedef {ComponentType[]} SelectMenuTypes
+ */
+exports.SelectMenuTypes = [
+ ComponentType.StringSelect,
+ ComponentType.UserSelect,
+ ComponentType.RoleSelect,
+ ComponentType.MentionableSelect,
+ ComponentType.ChannelSelect,
+];
+
+/**
+ * The types of messages that can be deleted. The available types are:
+ * * {@link MessageType.AutoModerationAction}
+ * * {@link MessageType.ChannelFollowAdd}
+ * * {@link MessageType.ChannelPinnedMessage}
+ * * {@link MessageType.ChatInputCommand}
+ * * {@link MessageType.ContextMenuCommand}
+ * * {@link MessageType.Default}
+ * * {@link MessageType.GuildBoost}
+ * * {@link MessageType.GuildBoostTier1}
+ * * {@link MessageType.GuildBoostTier2}
+ * * {@link MessageType.GuildBoostTier3}
+ * * {@link MessageType.GuildInviteReminder}
+ * * {@link MessageType.InteractionPremiumUpsell}
+ * * {@link MessageType.Reply}
+ * * {@link MessageType.RoleSubscriptionPurchase}
+ * * {@link MessageType.StageEnd}
+ * * {@link MessageType.StageRaiseHand}
+ * * {@link MessageType.StageSpeaker}
+ * * {@link MessageType.StageStart}
+ * * {@link MessageType.StageTopic}
+ * * {@link MessageType.ThreadCreated}
+ * * {@link MessageType.UserJoin}
+ * @typedef {MessageType[]} DeletableMessageTypes
+ */
+exports.DeletableMessageTypes = [
+ MessageType.AutoModerationAction,
+ MessageType.ChannelFollowAdd,
+ MessageType.ChannelPinnedMessage,
+ MessageType.ChatInputCommand,
+ MessageType.ContextMenuCommand,
+ MessageType.Default,
+ MessageType.GuildBoost,
+ MessageType.GuildBoostTier1,
+ MessageType.GuildBoostTier2,
+ MessageType.GuildBoostTier3,
+ MessageType.GuildInviteReminder,
+ MessageType.InteractionPremiumUpsell,
+ MessageType.Reply,
+ MessageType.RoleSubscriptionPurchase,
+ MessageType.StageEnd,
+ MessageType.StageRaiseHand,
+ MessageType.StageSpeaker,
+ MessageType.StageStart,
+ MessageType.StageTopic,
+ MessageType.ThreadCreated,
+ MessageType.UserJoin,
+];
+
+/**
+ * A mapping between sticker formats and their respective image formats.
+ * * {@link StickerFormatType.PNG} -> {@link ImageFormat.PNG}
+ * * {@link StickerFormatType.APNG} -> {@link ImageFormat.PNG}
+ * * {@link StickerFormatType.Lottie} -> {@link ImageFormat.Lottie}
+ * * {@link StickerFormatType.GIF} -> {@link ImageFormat.GIF}
+ * @typedef {Object} StickerFormatExtensionMap
+ */
+exports.StickerFormatExtensionMap = {
+ [StickerFormatType.PNG]: ImageFormat.PNG,
+ [StickerFormatType.APNG]: ImageFormat.PNG,
+ [StickerFormatType.Lottie]: ImageFormat.Lottie,
+ [StickerFormatType.GIF]: ImageFormat.GIF,
+};
+
+/**
+ * @typedef {Object} Constants Constants that can be used in an enum or object-like way.
+ * @property {number} MaxBulkDeletableMessageAge Max bulk deletable message age
+ * @property {SweeperKey[]} SweeperKeys The possible names of items that can be swept in sweepers
+ * @property {NonSystemMessageTypes} NonSystemMessageTypes The types of messages that are not deemed a system type
+ * @property {TextBasedChannelTypes} TextBasedChannelTypes The types of channels that are text-based
+ * @property {ThreadChannelTypes} ThreadChannelTypes The types of channels that are threads
+ * @property {VoiceBasedChannelTypes} VoiceBasedChannelTypes The types of channels that are voice-based
+ * @property {SelectMenuTypes} SelectMenuTypes The types of components that are select menus.
+ * @property {Object} StickerFormatExtensionMap A mapping between sticker formats and their respective image formats.
+ */
diff --git a/node_modules/discord.js/src/util/DataResolver.js b/node_modules/discord.js/src/util/DataResolver.js
new file mode 100644
index 0000000..6b8a64c
--- /dev/null
+++ b/node_modules/discord.js/src/util/DataResolver.js
@@ -0,0 +1,140 @@
+'use strict';
+
+const { Buffer } = require('node:buffer');
+const fs = require('node:fs/promises');
+const path = require('node:path');
+const { fetch } = require('undici');
+const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors');
+const Invite = require('../structures/Invite');
+
+/**
+ * The DataResolver identifies different objects and tries to resolve a specific piece of information from them.
+ * @private
+ */
+class DataResolver extends null {
+ /**
+ * Data that can be resolved to give an invite code. This can be:
+ * * An invite code
+ * * An invite URL
+ * @typedef {string} InviteResolvable
+ */
+
+ /**
+ * Data that can be resolved to give a template code. This can be:
+ * * A template code
+ * * A template URL
+ * @typedef {string} GuildTemplateResolvable
+ */
+
+ /**
+ * Resolves the string to a code based on the passed regex.
+ * @param {string} data The string to resolve
+ * @param {RegExp} regex The RegExp used to extract the code
+ * @returns {string}
+ */
+ static resolveCode(data, regex) {
+ return regex.exec(data)?.[1] ?? data;
+ }
+
+ /**
+ * Resolves InviteResolvable to an invite code.
+ * @param {InviteResolvable} data The invite resolvable to resolve
+ * @returns {string}
+ */
+ static resolveInviteCode(data) {
+ return this.resolveCode(data, Invite.InvitesPattern);
+ }
+
+ /**
+ * Resolves GuildTemplateResolvable to a template code.
+ * @param {GuildTemplateResolvable} data The template resolvable to resolve
+ * @returns {string}
+ */
+ static resolveGuildTemplateCode(data) {
+ const GuildTemplate = require('../structures/GuildTemplate');
+ return this.resolveCode(data, GuildTemplate.GuildTemplatesPattern);
+ }
+
+ /**
+ * Resolves a Base64Resolvable, a string, or a BufferResolvable to a Base 64 image.
+ * @param {BufferResolvable|Base64Resolvable} image The image to be resolved
+ * @returns {Promise<?string>}
+ */
+ static async resolveImage(image) {
+ if (!image) return null;
+ if (typeof image === 'string' && image.startsWith('data:')) {
+ return image;
+ }
+ const file = await this.resolveFile(image);
+ return this.resolveBase64(file.data);
+ }
+
+ /**
+ * Data that resolves to give a Base64 string, typically for image uploading. This can be:
+ * * A Buffer
+ * * A base64 string
+ * @typedef {Buffer|string} Base64Resolvable
+ */
+
+ /**
+ * Resolves a Base64Resolvable to a Base 64 image.
+ * @param {Base64Resolvable} data The base 64 resolvable you want to resolve
+ * @returns {?string}
+ */
+ static resolveBase64(data) {
+ if (Buffer.isBuffer(data)) return `data:image/jpg;base64,${data.toString('base64')}`;
+ return data;
+ }
+
+ /**
+ * Data that can be resolved to give a Buffer. This can be:
+ * * A Buffer
+ * * The path to a local file
+ * * A URL <warn>When provided a URL, discord.js will fetch the URL internally in order to create a Buffer.
+ * This can pose a security risk when the URL has not been sanitized</warn>
+ * @typedef {string|Buffer} BufferResolvable
+ */
+
+ /**
+ * @external Stream
+ * @see {@link https://nodejs.org/api/stream.html}
+ */
+
+ /**
+ * @typedef {Object} ResolvedFile
+ * @property {Buffer} data Buffer containing the file data
+ * @property {string} [contentType] Content type of the file
+ */
+
+ /**
+ * Resolves a BufferResolvable to a Buffer.
+ * @param {BufferResolvable|Stream} resource The buffer or stream resolvable to resolve
+ * @returns {Promise<ResolvedFile>}
+ */
+ static async resolveFile(resource) {
+ if (Buffer.isBuffer(resource)) return { data: resource };
+
+ if (typeof resource[Symbol.asyncIterator] === 'function') {
+ const buffers = [];
+ for await (const data of resource) buffers.push(Buffer.from(data));
+ return { data: Buffer.concat(buffers) };
+ }
+
+ if (typeof resource === 'string') {
+ if (/^https?:\/\//.test(resource)) {
+ const res = await fetch(resource);
+ return { data: Buffer.from(await res.arrayBuffer()), contentType: res.headers.get('content-type') };
+ }
+
+ const file = path.resolve(resource);
+
+ const stats = await fs.stat(file);
+ if (!stats.isFile()) throw new DiscordjsError(ErrorCodes.FileNotFound, file);
+ return { data: await fs.readFile(file) };
+ }
+
+ throw new DiscordjsTypeError(ErrorCodes.ReqResourceType);
+ }
+}
+
+module.exports = DataResolver;
diff --git a/node_modules/discord.js/src/util/Enums.js b/node_modules/discord.js/src/util/Enums.js
new file mode 100644
index 0000000..e3e5cac
--- /dev/null
+++ b/node_modules/discord.js/src/util/Enums.js
@@ -0,0 +1,13 @@
+'use strict';
+
+function createEnum(keys) {
+ const obj = {};
+ for (const [index, key] of keys.entries()) {
+ if (key === null) continue;
+ obj[key] = index;
+ obj[index] = key;
+ }
+ return obj;
+}
+
+module.exports = { createEnum };
diff --git a/node_modules/discord.js/src/util/Events.js b/node_modules/discord.js/src/util/Events.js
new file mode 100644
index 0000000..1a83ec8
--- /dev/null
+++ b/node_modules/discord.js/src/util/Events.js
@@ -0,0 +1,162 @@
+'use strict';
+
+/**
+ * @typedef {Object} Events
+ * @property {string} ApplicationCommandPermissionsUpdate applicationCommandPermissionsUpdate
+ * @property {string} AutoModerationActionExecution autoModerationActionExecution
+ * @property {string} AutoModerationRuleCreate autoModerationRuleCreate
+ * @property {string} AutoModerationRuleDelete autoModerationRuleDelete
+ * @property {string} AutoModerationRuleUpdate autoModerationRuleUpdate
+ * @property {string} CacheSweep cacheSweep
+ * @property {string} ChannelCreate channelCreate
+ * @property {string} ChannelDelete channelDelete
+ * @property {string} ChannelPinsUpdate channelPinsUpdate
+ * @property {string} ChannelUpdate channelUpdate
+ * @property {string} ClientReady ready
+ * @property {string} Debug debug
+ * @property {string} Error error
+ * @property {string} GuildAuditLogEntryCreate guildAuditLogEntryCreate
+ * @property {string} GuildAvailable guildAvailable
+ * @property {string} GuildBanAdd guildBanAdd
+ * @property {string} GuildBanRemove guildBanRemove
+ * @property {string} GuildCreate guildCreate
+ * @property {string} GuildDelete guildDelete
+ * @property {string} GuildEmojiCreate emojiCreate
+ * @property {string} GuildEmojiDelete emojiDelete
+ * @property {string} GuildEmojiUpdate emojiUpdate
+ * @property {string} GuildIntegrationsUpdate guildIntegrationsUpdate
+ * @property {string} GuildMemberAdd guildMemberAdd
+ * @property {string} GuildMemberAvailable guildMemberAvailable
+ * @property {string} GuildMemberRemove guildMemberRemove
+ * @property {string} GuildMembersChunk guildMembersChunk
+ * @property {string} GuildMemberUpdate guildMemberUpdate
+ * @property {string} GuildRoleCreate roleCreate
+ * @property {string} GuildRoleDelete roleDelete
+ * @property {string} GuildRoleUpdate roleUpdate
+ * @property {string} GuildScheduledEventCreate guildScheduledEventCreate
+ * @property {string} GuildScheduledEventDelete guildScheduledEventDelete
+ * @property {string} GuildScheduledEventUpdate guildScheduledEventUpdate
+ * @property {string} GuildScheduledEventUserAdd guildScheduledEventUserAdd
+ * @property {string} GuildScheduledEventUserRemove guildScheduledEventUserRemove
+ * @property {string} GuildStickerCreate stickerCreate
+ * @property {string} GuildStickerDelete stickerDelete
+ * @property {string} GuildStickerUpdate stickerUpdate
+ * @property {string} GuildUnavailable guildUnavailable
+ * @property {string} GuildUpdate guildUpdate
+ * @property {string} InteractionCreate interactionCreate
+ * @property {string} Invalidated invalidated
+ * @property {string} InviteCreate inviteCreate
+ * @property {string} InviteDelete inviteDelete
+ * @property {string} MessageBulkDelete messageDeleteBulk
+ * @property {string} MessageCreate messageCreate
+ * @property {string} MessageDelete messageDelete
+ * @property {string} MessageReactionAdd messageReactionAdd
+ * @property {string} MessageReactionRemove messageReactionRemove
+ * @property {string} MessageReactionRemoveAll messageReactionRemoveAll
+ * @property {string} MessageReactionRemoveEmoji messageReactionRemoveEmoji
+ * @property {string} MessageUpdate messageUpdate
+ * @property {string} PresenceUpdate presenceUpdate
+ * @property {string} ShardDisconnect shardDisconnect
+ * @property {string} ShardError shardError
+ * @property {string} ShardReady shardReady
+ * @property {string} ShardReconnecting shardReconnecting
+ * @property {string} ShardResume shardResume
+ * @property {string} StageInstanceCreate stageInstanceCreate
+ * @property {string} StageInstanceDelete stageInstanceDelete
+ * @property {string} StageInstanceUpdate stageInstanceUpdate
+ * @property {string} ThreadCreate threadCreate
+ * @property {string} ThreadDelete threadDelete
+ * @property {string} ThreadListSync threadListSync
+ * @property {string} ThreadMembersUpdate threadMembersUpdate
+ * @property {string} ThreadMemberUpdate threadMemberUpdate
+ * @property {string} ThreadUpdate threadUpdate
+ * @property {string} TypingStart typingStart
+ * @property {string} UserUpdate userUpdate
+ * @property {string} VoiceServerUpdate voiceServerUpdate
+ * @property {string} VoiceStateUpdate voiceStateUpdate
+ * @property {string} Warn warn
+ * @property {string} WebhooksUpdate webhookUpdate
+ */
+
+// JSDoc for IntelliSense purposes
+/**
+ * @type {Events}
+ * @ignore
+ */
+module.exports = {
+ ApplicationCommandPermissionsUpdate: 'applicationCommandPermissionsUpdate',
+ AutoModerationActionExecution: 'autoModerationActionExecution',
+ AutoModerationRuleCreate: 'autoModerationRuleCreate',
+ AutoModerationRuleDelete: 'autoModerationRuleDelete',
+ AutoModerationRuleUpdate: 'autoModerationRuleUpdate',
+ CacheSweep: 'cacheSweep',
+ ChannelCreate: 'channelCreate',
+ ChannelDelete: 'channelDelete',
+ ChannelPinsUpdate: 'channelPinsUpdate',
+ ChannelUpdate: 'channelUpdate',
+ ClientReady: 'ready',
+ Debug: 'debug',
+ Error: 'error',
+ GuildAuditLogEntryCreate: 'guildAuditLogEntryCreate',
+ GuildAvailable: 'guildAvailable',
+ GuildBanAdd: 'guildBanAdd',
+ GuildBanRemove: 'guildBanRemove',
+ GuildCreate: 'guildCreate',
+ GuildDelete: 'guildDelete',
+ GuildEmojiCreate: 'emojiCreate',
+ GuildEmojiDelete: 'emojiDelete',
+ GuildEmojiUpdate: 'emojiUpdate',
+ GuildIntegrationsUpdate: 'guildIntegrationsUpdate',
+ GuildMemberAdd: 'guildMemberAdd',
+ GuildMemberAvailable: 'guildMemberAvailable',
+ GuildMemberRemove: 'guildMemberRemove',
+ GuildMembersChunk: 'guildMembersChunk',
+ GuildMemberUpdate: 'guildMemberUpdate',
+ GuildRoleCreate: 'roleCreate',
+ GuildRoleDelete: 'roleDelete',
+ GuildRoleUpdate: 'roleUpdate',
+ GuildScheduledEventCreate: 'guildScheduledEventCreate',
+ GuildScheduledEventDelete: 'guildScheduledEventDelete',
+ GuildScheduledEventUpdate: 'guildScheduledEventUpdate',
+ GuildScheduledEventUserAdd: 'guildScheduledEventUserAdd',
+ GuildScheduledEventUserRemove: 'guildScheduledEventUserRemove',
+ GuildStickerCreate: 'stickerCreate',
+ GuildStickerDelete: 'stickerDelete',
+ GuildStickerUpdate: 'stickerUpdate',
+ GuildUnavailable: 'guildUnavailable',
+ GuildUpdate: 'guildUpdate',
+ InteractionCreate: 'interactionCreate',
+ Invalidated: 'invalidated',
+ InviteCreate: 'inviteCreate',
+ InviteDelete: 'inviteDelete',
+ MessageBulkDelete: 'messageDeleteBulk',
+ MessageCreate: 'messageCreate',
+ MessageDelete: 'messageDelete',
+ MessageReactionAdd: 'messageReactionAdd',
+ MessageReactionRemove: 'messageReactionRemove',
+ MessageReactionRemoveAll: 'messageReactionRemoveAll',
+ MessageReactionRemoveEmoji: 'messageReactionRemoveEmoji',
+ MessageUpdate: 'messageUpdate',
+ PresenceUpdate: 'presenceUpdate',
+ Raw: 'raw',
+ ShardDisconnect: 'shardDisconnect',
+ ShardError: 'shardError',
+ ShardReady: 'shardReady',
+ ShardReconnecting: 'shardReconnecting',
+ ShardResume: 'shardResume',
+ StageInstanceCreate: 'stageInstanceCreate',
+ StageInstanceDelete: 'stageInstanceDelete',
+ StageInstanceUpdate: 'stageInstanceUpdate',
+ ThreadCreate: 'threadCreate',
+ ThreadDelete: 'threadDelete',
+ ThreadListSync: 'threadListSync',
+ ThreadMembersUpdate: 'threadMembersUpdate',
+ ThreadMemberUpdate: 'threadMemberUpdate',
+ ThreadUpdate: 'threadUpdate',
+ TypingStart: 'typingStart',
+ UserUpdate: 'userUpdate',
+ VoiceServerUpdate: 'voiceServerUpdate',
+ VoiceStateUpdate: 'voiceStateUpdate',
+ Warn: 'warn',
+ WebhooksUpdate: 'webhookUpdate',
+};
diff --git a/node_modules/discord.js/src/util/Formatters.js b/node_modules/discord.js/src/util/Formatters.js
new file mode 100644
index 0000000..bd93a36
--- /dev/null
+++ b/node_modules/discord.js/src/util/Formatters.js
@@ -0,0 +1,413 @@
+'use strict';
+
+const { deprecate } = require('node:util');
+const {
+ blockQuote,
+ bold,
+ channelMention,
+ codeBlock,
+ formatEmoji,
+ hideLinkEmbed,
+ hyperlink,
+ inlineCode,
+ italic,
+ quote,
+ roleMention,
+ spoiler,
+ strikethrough,
+ time,
+ TimestampStyles,
+ underscore,
+ userMention,
+} = require('@discordjs/builders');
+
+/**
+ * Formats an application command name and id into an application command mention.
+ * @method chatInputApplicationCommandMention
+ * @param {string} commandName The name of the application command
+ * @param {string|Snowflake} subcommandGroupOrSubOrId
+ * The subcommand group name, subcommand name, or application command id
+ * @param {string|Snowflake} [subcommandNameOrId] The subcommand name or application command id
+ * @param {string} [commandId] The id of the application command
+ * @returns {string}
+ */
+
+/**
+ * Wraps the content inside a code block with an optional language.
+ * @method codeBlock
+ * @param {string} contentOrLanguage The language to use or content if a second parameter isn't provided
+ * @param {string} [content] The content to wrap
+ * @returns {string}
+ */
+
+/**
+ * Wraps the content inside \`backticks\`, which formats it as inline code.
+ * @method inlineCode
+ * @param {string} content The content to wrap
+ * @returns {string}
+ */
+
+/**
+ * Formats the content into italic text.
+ * @method italic
+ * @param {string} content The content to wrap
+ * @returns {string}
+ */
+
+/**
+ * Formats the content into bold text.
+ * @method bold
+ * @param {string} content The content to wrap
+ * @returns {string}
+ */
+
+/**
+ * Formats the content into underscored text.
+ * @method underscore
+ * @param {string} content The content to wrap
+ * @returns {string}
+ */
+
+/**
+ * Formats the content into strike-through text.
+ * @method strikethrough
+ * @param {string} content The content to wrap
+ * @returns {string}
+ */
+
+/**
+ * Formats the content into a quote.
+ * <info>This needs to be at the start of the line for Discord to format it.</info>
+ * @method quote
+ * @param {string} content The content to wrap
+ * @returns {string}
+ */
+
+/**
+ * Formats the content into a block quote.
+ * <info>This needs to be at the start of the line for Discord to format it.</info>
+ * @method blockQuote
+ * @param {string} content The content to wrap
+ * @returns {string}
+ */
+
+/**
+ * Wraps the URL into `<>`, which stops it from embedding.
+ * @method hideLinkEmbed
+ * @param {string} content The content to wrap
+ * @returns {string}
+ */
+
+/**
+ * Formats the content and the URL into a masked URL with an optional title.
+ * @method hyperlink
+ * @param {string} content The content to display
+ * @param {string} url The URL the content links to
+ * @param {string} [title] The title shown when hovering on the masked link
+ * @returns {string}
+ */
+
+/**
+ * Formats the content into spoiler text.
+ * @method spoiler
+ * @param {string} content The content to spoiler
+ * @returns {string}
+ */
+
+/**
+ * Formats a user id into a user mention.
+ * @method userMention
+ * @param {Snowflake} userId The user id to format
+ * @returns {string}
+ */
+
+/**
+ * Formats a channel id into a channel mention.
+ * @method channelMention
+ * @param {Snowflake} channelId The channel id to format
+ * @returns {string}
+ */
+
+/**
+ * Formats a role id into a role mention.
+ * @method roleMention
+ * @param {Snowflake} roleId The role id to format
+ * @returns {string}
+ */
+
+/**
+ * Formats an emoji id into a fully qualified emoji identifier.
+ * @method formatEmoji
+ * @param {Snowflake} emojiId The emoji id to format
+ * @param {boolean} [animated=false] Whether the emoji is animated
+ * @returns {string}
+ */
+
+/**
+ * Formats a channel link for a channel.
+ * @method channelLink
+ * @param {Snowflake} channelId The id of the channel
+ * @param {Snowflake} [guildId] The id of the guild
+ * @returns {string}
+ */
+
+/**
+ * Formats a message link for a channel.
+ * @method messageLink
+ * @param {Snowflake} channelId The id of the channel
+ * @param {Snowflake} messageId The id of the message
+ * @param {Snowflake} [guildId] The id of the guild
+ * @returns {string}
+ */
+
+/**
+ * A message formatting timestamp style, as defined in
+ * [here](https://discord.com/developers/docs/reference#message-formatting-timestamp-styles).
+ * * `t` Short time format, consisting of hours and minutes, e.g. 16:20.
+ * * `T` Long time format, consisting of hours, minutes, and seconds, e.g. 16:20:30.
+ * * `d` Short date format, consisting of day, month, and year, e.g. 20/04/2021.
+ * * `D` Long date format, consisting of day, month, and year, e.g. 20 April 2021.
+ * * `f` Short date-time format, consisting of short date and short time formats, e.g. 20 April 2021 16:20.
+ * * `F` Long date-time format, consisting of long date and short time formats, e.g. Tuesday, 20 April 2021 16:20.
+ * * `R` Relative time format, consisting of a relative duration format, e.g. 2 months ago.
+ * @typedef {string} TimestampStylesString
+ */
+
+/**
+ * Formats a date into a short date-time string.
+ * @method time
+ * @param {number|Date} [date] The date to format
+ * @param {TimestampStylesString} [style] The style to use
+ * @returns {string}
+ */
+
+/**
+ * Contains various Discord-specific functions for formatting messages.
+ * @deprecated This class is redundant as all methods of the class can be imported from discord.js directly.
+ */
+class Formatters extends null {
+ /**
+ * Formats the content into a block quote.
+ * <info>This needs to be at the start of the line for Discord to format it.</info>
+ * @method blockQuote
+ * @memberof Formatters
+ * @param {string} content The content to wrap
+ * @returns {string}
+ * @deprecated Import this method directly from discord.js instead.
+ */
+ static blockQuote = deprecate(
+ blockQuote,
+ 'Formatters.blockQuote() is deprecated. Import this method directly from discord.js instead.',
+ );
+
+ /**
+ * Formats the content into bold text.
+ * @method bold
+ * @memberof Formatters
+ * @param {string} content The content to wrap
+ * @returns {string}
+ * @deprecated Import this method directly from discord.js instead.
+ */
+ static bold = deprecate(
+ bold,
+ 'Formatters.bold() is deprecated. Import this method directly from discord.js instead.',
+ );
+
+ /**
+ * Formats a channel id into a channel mention.
+ * @method channelMention
+ * @memberof Formatters
+ * @param {Snowflake} channelId The channel id to format
+ * @returns {string}
+ * @deprecated Import this method directly from discord.js instead.
+ */
+ static channelMention = deprecate(
+ channelMention,
+ 'Formatters.channelMention() is deprecated. Import this method directly from discord.js instead.',
+ );
+
+ /**
+ * Wraps the content inside a code block with an optional language.
+ * @method codeBlock
+ * @memberof Formatters
+ * @param {string} contentOrLanguage The language to use or content if a second parameter isn't provided
+ * @param {string} [content] The content to wrap
+ * @returns {string}
+ * @deprecated Import this method directly from discord.js instead.
+ */
+ static codeBlock = deprecate(
+ codeBlock,
+ 'Formatters.codeBlock() is deprecated. Import this method directly from discord.js instead.',
+ );
+
+ /**
+ * Formats an emoji id into a fully qualified emoji identifier.
+ * @method formatEmoji
+ * @memberof Formatters
+ * @param {string} emojiId The emoji id to format
+ * @param {boolean} [animated=false] Whether the emoji is animated
+ * @returns {string}
+ * @deprecated Import this method directly from discord.js instead.
+ */
+ static formatEmoji = deprecate(
+ formatEmoji,
+ 'Formatters.formatEmoji() is deprecated. Import this method directly from discord.js instead.',
+ );
+
+ /**
+ * Wraps the URL into `<>`, which stops it from embedding.
+ * @method hideLinkEmbed
+ * @memberof Formatters
+ * @param {string} content The content to wrap
+ * @returns {string}
+ * @deprecated Import this method directly from discord.js instead.
+ */
+ static hideLinkEmbed = deprecate(
+ hideLinkEmbed,
+ 'Formatters.hideLinkEmbed() is deprecated. Import this method directly from discord.js instead.',
+ );
+
+ /**
+ * Formats the content and the URL into a masked URL with an optional title.
+ * @method hyperlink
+ * @memberof Formatters
+ * @param {string} content The content to display
+ * @param {string} url The URL the content links to
+ * @param {string} [title] The title shown when hovering on the masked link
+ * @returns {string}
+ * @deprecated Import this method directly from discord.js instead.
+ */
+ static hyperlink = deprecate(
+ hyperlink,
+ 'Formatters.hyperlink() is deprecated. Import this method directly from discord.js instead.',
+ );
+
+ /**
+ * Wraps the content inside \`backticks\`, which formats it as inline code.
+ * @method inlineCode
+ * @memberof Formatters
+ * @param {string} content The content to wrap
+ * @returns {string}
+ * @deprecated Import this method directly from discord.js instead.
+ */
+ static inlineCode = deprecate(
+ inlineCode,
+ 'Formatters.inlineCode() is deprecated. Import this method directly from discord.js instead.',
+ );
+
+ /**
+ * Formats the content into italic text.
+ * @method italic
+ * @memberof Formatters
+ * @param {string} content The content to wrap
+ * @returns {string}
+ * @deprecated Import this method directly from discord.js instead.
+ */
+ static italic = deprecate(
+ italic,
+ 'Formatters.italic() is deprecated. Import this method directly from discord.js instead.',
+ );
+
+ /**
+ * Formats the content into a quote. This needs to be at the start of the line for Discord to format it.
+ * @method quote
+ * @memberof Formatters
+ * @param {string} content The content to wrap
+ * @returns {string}
+ * @deprecated Import this method directly from discord.js instead.
+ */
+ static quote = deprecate(
+ quote,
+ 'Formatters.quote() is deprecated. Import this method directly from discord.js instead.',
+ );
+
+ /**
+ * Formats a role id into a role mention.
+ * @method roleMention
+ * @memberof Formatters
+ * @param {Snowflake} roleId The role id to format
+ * @returns {string}
+ * @deprecated Import this method directly from discord.js instead.
+ */
+ static roleMention = deprecate(
+ roleMention,
+ 'Formatters.roleMention() is deprecated. Import this method directly from discord.js instead.',
+ );
+
+ /**
+ * Formats the content into spoiler text.
+ * @method spoiler
+ * @memberof Formatters
+ * @param {string} content The content to spoiler
+ * @returns {string}
+ * @deprecated Import this method directly from discord.js instead.
+ */
+ static spoiler = deprecate(
+ spoiler,
+ 'Formatters.spoiler() is deprecated. Import this method directly from discord.js instead.',
+ );
+
+ /**
+ * Formats the content into strike-through text.
+ * @method strikethrough
+ * @memberof Formatters
+ * @param {string} content The content to wrap
+ * @returns {string}
+ * @deprecated Import this method directly from discord.js instead.
+ */
+ static strikethrough = deprecate(
+ strikethrough,
+ 'Formatters.strikethrough() is deprecated. Import this method directly from discord.js instead.',
+ );
+
+ /**
+ * Formats a date into a short date-time string.
+ * @method time
+ * @memberof Formatters
+ * @param {number|Date} [date] The date to format
+ * @param {TimestampStylesString} [style] The style to use
+ * @returns {string}
+ * @deprecated Import this method directly from discord.js instead.
+ */
+ static time = deprecate(
+ time,
+ 'Formatters.time() is deprecated. Import this method directly from discord.js instead.',
+ );
+
+ /**
+ * The message formatting timestamp
+ * [styles](https://discord.com/developers/docs/reference#message-formatting-timestamp-styles) supported by Discord.
+ * @type {Object<string, TimestampStylesString>}
+ * @memberof Formatters
+ * @deprecated Import this property directly from discord.js instead.
+ */
+ static TimestampStyles = TimestampStyles;
+
+ /**
+ * Formats the content into underscored text.
+ * @method underscore
+ * @memberof Formatters
+ * @param {string} content The content to wrap
+ * @returns {string}
+ * @deprecated Import this method directly from discord.js instead.
+ */
+ static underscore = deprecate(
+ underscore,
+ 'Formatters.underscore() is deprecated. Import this method directly from discord.js instead.',
+ );
+
+ /**
+ * Formats a user id into a user mention.
+ * @method userMention
+ * @memberof Formatters
+ * @param {Snowflake} userId The user id to format
+ * @returns {string}
+ * @deprecated Import this method directly from discord.js instead.
+ */
+ static userMention = deprecate(
+ userMention,
+ 'Formatters.userMention() is deprecated. Import this method directly from discord.js instead.',
+ );
+}
+
+module.exports = Formatters;
diff --git a/node_modules/discord.js/src/util/GuildMemberFlagsBitField.js b/node_modules/discord.js/src/util/GuildMemberFlagsBitField.js
new file mode 100644
index 0000000..84ce6b9
--- /dev/null
+++ b/node_modules/discord.js/src/util/GuildMemberFlagsBitField.js
@@ -0,0 +1,41 @@
+'use strict';
+
+const { GuildMemberFlags } = require('discord-api-types/v10');
+const BitField = require('./BitField');
+
+/**
+ * Data structure that makes it easy to interact with a {@link GuildMember#flags} bitfield.
+ * @extends {BitField}
+ */
+class GuildMemberFlagsBitField extends BitField {
+ /**
+ * Numeric guild guild member flags.
+ * @type {GuildMemberFlags}
+ * @memberof GuildMemberFlagsBitField
+ */
+ static Flags = GuildMemberFlags;
+}
+
+/**
+ * @name GuildMemberFlagsBitField
+ * @kind constructor
+ * @memberof GuildMemberFlagsBitField
+ * @param {BitFieldResolvable} [bits=0] Bit(s) to read from
+ */
+
+/**
+ * Bitfield of the packed bits
+ * @type {number}
+ * @name GuildMemberFlagsBitField#bitfield
+ */
+
+/**
+ * Data that can be resolved to give a guild member flag bitfield. This can be:
+ * * A string (see {@link GuildMemberFlagsBitField.Flags})
+ * * A guild member flag
+ * * An instance of GuildMemberFlagsBitField
+ * * An Array of GuildMemberFlagsResolvable
+ * @typedef {string|number|GuildMemberFlagsBitField|GuildMemberFlagsResolvable[]} GuildMemberFlagsResolvable
+ */
+
+exports.GuildMemberFlagsBitField = GuildMemberFlagsBitField;
diff --git a/node_modules/discord.js/src/util/IntentsBitField.js b/node_modules/discord.js/src/util/IntentsBitField.js
new file mode 100644
index 0000000..ea908b6
--- /dev/null
+++ b/node_modules/discord.js/src/util/IntentsBitField.js
@@ -0,0 +1,34 @@
+'use strict';
+const { GatewayIntentBits } = require('discord-api-types/v10');
+const BitField = require('./BitField');
+
+/**
+ * Data structure that makes it easy to calculate intents.
+ * @extends {BitField}
+ */
+class IntentsBitField extends BitField {
+ /**
+ * Numeric WebSocket intents
+ * @type {GatewayIntentBits}
+ * @memberof IntentsBitField
+ */
+ static Flags = GatewayIntentBits;
+}
+
+/**
+ * @name IntentsBitField
+ * @kind constructor
+ * @memberof IntentsBitField
+ * @param {IntentsResolvable} [bits=0] Bit(s) to read from
+ */
+
+/**
+ * Data that can be resolved to give a permission number. This can be:
+ * * A string (see {@link IntentsBitField.Flags})
+ * * An intents flag
+ * * An instance of {@link IntentsBitField}
+ * * An array of IntentsResolvable
+ * @typedef {string|number|IntentsBitField|IntentsResolvable[]} IntentsResolvable
+ */
+
+module.exports = IntentsBitField;
diff --git a/node_modules/discord.js/src/util/LimitedCollection.js b/node_modules/discord.js/src/util/LimitedCollection.js
new file mode 100644
index 0000000..12a8360
--- /dev/null
+++ b/node_modules/discord.js/src/util/LimitedCollection.js
@@ -0,0 +1,68 @@
+'use strict';
+
+const { Collection } = require('@discordjs/collection');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+
+/**
+ * Options for defining the behavior of a LimitedCollection
+ * @typedef {Object} LimitedCollectionOptions
+ * @property {?number} [maxSize=Infinity] The maximum size of the Collection
+ * @property {?Function} [keepOverLimit=null] A function, which is passed the value and key of an entry, ran to decide
+ * to keep an entry past the maximum size
+ */
+
+/**
+ * A Collection which holds a max amount of entries.
+ * @extends {Collection}
+ * @param {LimitedCollectionOptions} [options={}] Options for constructing the Collection.
+ * @param {Iterable} [iterable=null] Optional entries passed to the Map constructor.
+ */
+class LimitedCollection extends Collection {
+ constructor(options = {}, iterable) {
+ if (typeof options !== 'object' || options === null) {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true);
+ }
+ const { maxSize = Infinity, keepOverLimit = null } = options;
+
+ if (typeof maxSize !== 'number') {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'maxSize', 'number');
+ }
+ if (keepOverLimit !== null && typeof keepOverLimit !== 'function') {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'keepOverLimit', 'function');
+ }
+
+ super(iterable);
+
+ /**
+ * The max size of the Collection.
+ * @type {number}
+ */
+ this.maxSize = maxSize;
+
+ /**
+ * A function called to check if an entry should be kept when the Collection is at max size.
+ * @type {?Function}
+ */
+ this.keepOverLimit = keepOverLimit;
+ }
+
+ set(key, value) {
+ if (this.maxSize === 0 && !this.keepOverLimit?.(value, key, this)) return this;
+ if (this.size >= this.maxSize && !this.has(key)) {
+ for (const [k, v] of this.entries()) {
+ const keep = this.keepOverLimit?.(v, k, this) ?? false;
+ if (!keep) {
+ this.delete(k);
+ break;
+ }
+ }
+ }
+ return super.set(key, value);
+ }
+
+ static get [Symbol.species]() {
+ return Collection;
+ }
+}
+
+module.exports = LimitedCollection;
diff --git a/node_modules/discord.js/src/util/MessageFlagsBitField.js b/node_modules/discord.js/src/util/MessageFlagsBitField.js
new file mode 100644
index 0000000..71f1fd6
--- /dev/null
+++ b/node_modules/discord.js/src/util/MessageFlagsBitField.js
@@ -0,0 +1,32 @@
+'use strict';
+
+const { MessageFlags } = require('discord-api-types/v10');
+const BitField = require('./BitField');
+
+/**
+ * Data structure that makes it easy to interact with a {@link Message#flags} bitfield.
+ * @extends {BitField}
+ */
+class MessageFlagsBitField extends BitField {
+ /**
+ * Numeric message flags.
+ * @type {MessageFlags}
+ * @memberof MessageFlagsBitField
+ */
+ static Flags = MessageFlags;
+}
+
+/**
+ * @name MessageFlagsBitField
+ * @kind constructor
+ * @memberof MessageFlagsBitField
+ * @param {BitFieldResolvable} [bits=0] Bit(s) to read from
+ */
+
+/**
+ * Bitfield of the packed bits
+ * @type {number}
+ * @name MessageFlagsBitField#bitfield
+ */
+
+module.exports = MessageFlagsBitField;
diff --git a/node_modules/discord.js/src/util/Options.js b/node_modules/discord.js/src/util/Options.js
new file mode 100644
index 0000000..9d1ce50
--- /dev/null
+++ b/node_modules/discord.js/src/util/Options.js
@@ -0,0 +1,237 @@
+'use strict';
+
+const { DefaultRestOptions, DefaultUserAgentAppendix } = require('@discordjs/rest');
+const { toSnakeCase } = require('./Transformers');
+const { version } = require('../../package.json');
+
+// TODO(ckohen): switch order of params so full manager is first and "type" is optional
+/**
+ * @typedef {Function} CacheFactory
+ * @param {Function} managerType The base manager class the cache is being requested from.
+ * @param {Function} holds The class that the cache will hold.
+ * @param {Function} manager The fully extended manager class the cache is being requested from.
+ * @returns {Collection} A Collection used to store the cache of the manager.
+ */
+
+/**
+ * Options for a client.
+ * @typedef {Object} ClientOptions
+ * @property {number|number[]|string} [shards] The shard's id to run, or an array of shard ids. If not specified,
+ * the client will spawn {@link ClientOptions#shardCount} shards. If set to `auto`, it will fetch the
+ * recommended amount of shards from Discord and spawn that amount
+ * @property {number} [closeTimeout=5_000] The amount of time in milliseconds to wait for the close frame to be received
+ * from the WebSocket. Don't have this too high/low. Its best to have it between 2_000-6_000 ms.
+ * @property {number} [shardCount=1] The total amount of shards used by all processes of this bot
+ * (e.g. recommended shard count, shard count of the ShardingManager)
+ * @property {CacheFactory} [makeCache] Function to create a cache.
+ * You can use your own function, or the {@link Options} class to customize the Collection used for the cache.
+ * <warn>Overriding the cache used in `GuildManager`, `ChannelManager`, `GuildChannelManager`, `RoleManager`,
+ * and `PermissionOverwriteManager` is unsupported and **will** break functionality</warn>
+ * @property {MessageMentionOptions} [allowedMentions] The default value for {@link BaseMessageOptions#allowedMentions}
+ * @property {Partials[]} [partials] Structures allowed to be partial. This means events can be emitted even when
+ * they're missing all the data for a particular structure. See the "Partial Structures" topic on the
+ * [guide](https://discordjs.guide/popular-topics/partials.html) for some
+ * important usage information, as partials require you to put checks in place when handling data.
+ * @property {boolean} [failIfNotExists=true] The default value for {@link MessageReplyOptions#failIfNotExists}
+ * @property {PresenceData} [presence={}] Presence data to use upon login
+ * @property {IntentsResolvable} intents Intents to enable for this connection
+ * @property {number} [waitGuildTimeout=15_000] Time in milliseconds that clients with the
+ * {@link GatewayIntentBits.Guilds} gateway intent should wait for missing guilds to be received before being ready.
+ * @property {SweeperOptions} [sweepers=this.DefaultSweeperSettings] Options for cache sweeping
+ * @property {WebsocketOptions} [ws] Options for the WebSocket
+ * @property {RESTOptions} [rest] Options for the REST manager
+ * @property {Function} [jsonTransformer] A function used to transform outgoing json data
+ */
+
+/**
+ * Options for {@link Sweepers} defining the behavior of cache sweeping
+ * @typedef {Object<SweeperKey, SweepOptions>} SweeperOptions
+ */
+
+/**
+ * Options for sweeping a single type of item from cache
+ * @typedef {Object} SweepOptions
+ * @property {number} interval The interval (in seconds) at which to perform sweeping of the item
+ * @property {number} [lifetime] How long an item should stay in cache until it is considered sweepable.
+ * <warn>This property is only valid for the `invites`, `messages`, and `threads` keys. The `filter` property
+ * is mutually exclusive to this property and takes priority</warn>
+ * @property {GlobalSweepFilter} filter The function used to determine the function passed to the sweep method
+ * <info>This property is optional when the key is `invites`, `messages`, or `threads` and `lifetime` is set</info>
+ */
+
+/**
+ * A function to determine what strategy to use for sharding internally.
+ * ```js
+ * (manager) => new WorkerShardingStrategy(manager, { shardsPerWorker: 2 })
+ * ```
+ * @typedef {Function} BuildStrategyFunction
+ * @param {WSWebSocketManager} manager The WebSocketManager that is going to initiate the sharding
+ * @returns {IShardingStrategy} The strategy to use for sharding
+ */
+
+/**
+ * A function to change the concurrency handling for shard identifies of this manager
+ * ```js
+ * async (manager) => {
+ * const gateway = await manager.fetchGatewayInformation();
+ * return new SimpleIdentifyThrottler(gateway.session_start_limit.max_concurrency);
+ * }
+ * ```
+ * @typedef {Function} IdentifyThrottlerFunction
+ * @param {WSWebSocketManager} manager The WebSocketManager that is going to initiate the sharding
+ * @returns {Awaitable<IIdentifyThrottler>} The identify throttler that this ws manager will use
+ */
+
+/**
+ * WebSocket options (these are left as snake_case to match the API)
+ * @typedef {Object} WebsocketOptions
+ * @property {number} [large_threshold=50] Number of members in a guild after which offline users will no longer be
+ * sent in the initial guild member list, must be between 50 and 250
+ * @property {number} [version=10] The Discord gateway version to use <warn>Changing this can break the library;
+ * only set this if you know what you are doing</warn>
+ * @property {BuildStrategyFunction} [buildStrategy] Builds the strategy to use for sharding
+ * @property {IdentifyThrottlerFunction} [buildIdentifyThrottler] Builds the identify throttler to use for sharding
+ */
+
+/**
+ * Contains various utilities for client options.
+ */
+class Options extends null {
+ /**
+ * The default user agent appendix.
+ * @type {string}
+ * @memberof Options
+ * @private
+ */
+ static userAgentAppendix = `discord.js/${version} ${DefaultUserAgentAppendix}`.trimEnd();
+
+ /**
+ * The default client options.
+ * @returns {ClientOptions}
+ */
+ static createDefault() {
+ return {
+ closeTimeout: 5_000,
+ waitGuildTimeout: 15_000,
+ shardCount: 1,
+ makeCache: this.cacheWithLimits(this.DefaultMakeCacheSettings),
+ partials: [],
+ failIfNotExists: true,
+ presence: {},
+ sweepers: this.DefaultSweeperSettings,
+ ws: {
+ large_threshold: 50,
+ version: 10,
+ },
+ rest: {
+ ...DefaultRestOptions,
+ userAgentAppendix: this.userAgentAppendix,
+ },
+ jsonTransformer: toSnakeCase,
+ };
+ }
+
+ /**
+ * Create a cache factory using predefined settings to sweep or limit.
+ * @param {Object<string, LimitedCollectionOptions|number>} [settings={}] Settings passed to the relevant constructor.
+ * If no setting is provided for a manager, it uses Collection.
+ * If a number is provided for a manager, it uses that number as the max size for a LimitedCollection.
+ * If LimitedCollectionOptions are provided for a manager, it uses those settings to form a LimitedCollection.
+ * @returns {CacheFactory}
+ * @example
+ * // Store up to 200 messages per channel and 200 members per guild, always keeping the client member.
+ * Options.cacheWithLimits({
+ * MessageManager: 200,
+ * GuildMemberManager: {
+ * maxSize: 200,
+ * keepOverLimit: (member) => member.id === client.user.id,
+ * },
+ * });
+ */
+ static cacheWithLimits(settings = {}) {
+ const { Collection } = require('@discordjs/collection');
+ const LimitedCollection = require('./LimitedCollection');
+
+ return (managerType, _, manager) => {
+ const setting = settings[manager.name] ?? settings[managerType.name];
+ /* eslint-disable-next-line eqeqeq */
+ if (setting == null) {
+ return new Collection();
+ }
+ if (typeof setting === 'number') {
+ if (setting === Infinity) {
+ return new Collection();
+ }
+ return new LimitedCollection({ maxSize: setting });
+ }
+ /* eslint-disable-next-line eqeqeq */
+ const noLimit = setting.maxSize == null || setting.maxSize === Infinity;
+ if (noLimit) {
+ return new Collection();
+ }
+ return new LimitedCollection(setting);
+ };
+ }
+
+ /**
+ * Create a cache factory that always caches everything.
+ * @returns {CacheFactory}
+ */
+ static cacheEverything() {
+ const { Collection } = require('@discordjs/collection');
+ return () => new Collection();
+ }
+
+ /**
+ * The default settings passed to {@link ClientOptions.makeCache}.
+ * The caches that this changes are:
+ * * `MessageManager` - Limit to 200 messages
+ * <info>If you want to keep default behavior and add on top of it you can use this object and add on to it, e.g.
+ * `makeCache: Options.cacheWithLimits({ ...Options.DefaultMakeCacheSettings, ReactionManager: 0 })`</info>
+ * @type {Object<string, LimitedCollectionOptions|number>}
+ */
+ static get DefaultMakeCacheSettings() {
+ return {
+ MessageManager: 200,
+ };
+ }
+
+ /**
+ * The default settings passed to {@link ClientOptions.sweepers}.
+ * The sweepers that this changes are:
+ * * `threads` - Sweep archived threads every hour, removing those archived more than 4 hours ago
+ * <info>If you want to keep default behavior and add on top of it you can use this object and add on to it, e.g.
+ * `sweepers: { ...Options.DefaultSweeperSettings, messages: { interval: 300, lifetime: 600 } }`</info>
+ * @type {SweeperOptions}
+ */
+ static get DefaultSweeperSettings() {
+ return {
+ threads: {
+ interval: 3600,
+ lifetime: 14400,
+ },
+ };
+ }
+}
+
+module.exports = Options;
+
+/**
+ * @external RESTOptions
+ * @see {@link https://discord.js.org/docs/packages/rest/stable/RESTOptions:Interface}
+ */
+
+/**
+ * @external WSWebSocketManager
+ * @see {@link https://discord.js.org/docs/packages/ws/stable/WebSocketManager:Class}
+ */
+
+/**
+ * @external IShardingStrategy
+ * @see {@link https://discord.js.org/docs/packages/ws/stable/IShardingStrategy:Interface}
+ */
+
+/**
+ * @external IIdentifyThrottler
+ * @see {@link https://discord.js.org/docs/packages/ws/stable/IIdentifyThrottler:Interface}
+ */
diff --git a/node_modules/discord.js/src/util/Partials.js b/node_modules/discord.js/src/util/Partials.js
new file mode 100644
index 0000000..31d9223
--- /dev/null
+++ b/node_modules/discord.js/src/util/Partials.js
@@ -0,0 +1,44 @@
+'use strict';
+
+const { createEnum } = require('./Enums');
+
+/**
+ * The enumeration for partials.
+ * ```js
+ * import { Client, Partials } from 'discord.js';
+ *
+ * const client = new Client({
+ * intents: [
+ * // Intents...
+ * ],
+ * partials: [
+ * Partials.User, // We want to receive uncached users!
+ * Partials.Message // We want to receive uncached messages!
+ * ]
+ * });
+ * ```
+ * @typedef {Object} Partials
+ * @property {number} User The partial to receive uncached users.
+ * @property {number} Channel The partial to receive uncached channels.
+ * <info>This is required to receive direct messages!</info>
+ * @property {number} GuildMember The partial to receive uncached guild members.
+ * @property {number} Message The partial to receive uncached messages.
+ * @property {number} Reaction The partial to receive uncached reactions.
+ * @property {number} GuildScheduledEvent The partial to receive uncached guild scheduled events.
+ * @property {number} ThreadMember The partial to receive uncached thread members.
+ */
+
+// JSDoc for IntelliSense purposes
+/**
+ * @type {Partials}
+ * @ignore
+ */
+module.exports = createEnum([
+ 'User',
+ 'Channel',
+ 'GuildMember',
+ 'Message',
+ 'Reaction',
+ 'GuildScheduledEvent',
+ 'ThreadMember',
+]);
diff --git a/node_modules/discord.js/src/util/PermissionsBitField.js b/node_modules/discord.js/src/util/PermissionsBitField.js
new file mode 100644
index 0000000..c1ec72d
--- /dev/null
+++ b/node_modules/discord.js/src/util/PermissionsBitField.js
@@ -0,0 +1,104 @@
+'use strict';
+
+const { PermissionFlagsBits } = require('discord-api-types/v10');
+const BitField = require('./BitField');
+
+/**
+ * Data structure that makes it easy to interact with a permission bitfield. All {@link GuildMember}s have a set of
+ * permissions in their guild, and each channel in the guild may also have {@link PermissionOverwrites} for the member
+ * that override their default permissions.
+ * @extends {BitField}
+ */
+class PermissionsBitField extends BitField {
+ /**
+ * Numeric permission flags.
+ * @type {PermissionFlagsBits}
+ * @memberof PermissionsBitField
+ * @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags}
+ */
+ static Flags = PermissionFlagsBits;
+
+ /**
+ * Bitfield representing every permission combined
+ * @type {bigint}
+ * @memberof PermissionsBitField
+ */
+ static All = Object.values(PermissionFlagsBits).reduce((all, p) => all | p, 0n);
+
+ /**
+ * Bitfield representing the default permissions for users
+ * @type {bigint}
+ * @memberof PermissionsBitField
+ */
+ static Default = BigInt(104324673);
+
+ /**
+ * Bitfield representing the permissions required for moderators of stage channels
+ * @type {bigint}
+ * @memberof PermissionsBitField
+ */
+ static StageModerator =
+ PermissionFlagsBits.ManageChannels | PermissionFlagsBits.MuteMembers | PermissionFlagsBits.MoveMembers;
+
+ /**
+ * @type {bigint}
+ * @memberof PermissionsBitField
+ * @private
+ */
+ static DefaultBit = BigInt(0);
+
+ /**
+ * Bitfield of the packed bits
+ * @type {bigint}
+ * @name PermissionsBitField#bitfield
+ */
+
+ /**
+ * Data that can be resolved to give a permission number. This can be:
+ * * A string (see {@link PermissionsBitField.Flags})
+ * * A permission number
+ * * An instance of {@link PermissionsBitField}
+ * * An Array of PermissionResolvable
+ * @typedef {string|bigint|PermissionsBitField|PermissionResolvable[]} PermissionResolvable
+ */
+
+ /**
+ * Gets all given bits that are missing from the bitfield.
+ * @param {BitFieldResolvable} bits Bit(s) to check for
+ * @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override
+ * @returns {string[]}
+ */
+ missing(bits, checkAdmin = true) {
+ return checkAdmin && this.has(PermissionFlagsBits.Administrator) ? [] : super.missing(bits);
+ }
+
+ /**
+ * Checks whether the bitfield has a permission, or any of multiple permissions.
+ * @param {PermissionResolvable} permission Permission(s) to check for
+ * @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override
+ * @returns {boolean}
+ */
+ any(permission, checkAdmin = true) {
+ return (checkAdmin && super.has(PermissionFlagsBits.Administrator)) || super.any(permission);
+ }
+
+ /**
+ * Checks whether the bitfield has a permission, or multiple permissions.
+ * @param {PermissionResolvable} permission Permission(s) to check for
+ * @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override
+ * @returns {boolean}
+ */
+ has(permission, checkAdmin = true) {
+ return (checkAdmin && super.has(PermissionFlagsBits.Administrator)) || super.has(permission);
+ }
+
+ /**
+ * Gets an {@link Array} of bitfield names based on the permissions available.
+ * @returns {string[]}
+ */
+ toArray() {
+ return super.toArray(false);
+ }
+}
+
+module.exports = PermissionsBitField;
diff --git a/node_modules/discord.js/src/util/RoleFlagsBitField.js b/node_modules/discord.js/src/util/RoleFlagsBitField.js
new file mode 100644
index 0000000..1e0f895
--- /dev/null
+++ b/node_modules/discord.js/src/util/RoleFlagsBitField.js
@@ -0,0 +1,26 @@
+'use strict';
+
+const { RoleFlags } = require('discord-api-types/v10');
+const BitField = require('./BitField');
+
+/**
+ * Data structure that makes it easy to interact with a {@link Role#flags} bitfield.
+ * @extends {BitField}
+ */
+class RoleFlagsBitField extends BitField {
+ /**
+ * Numeric role flags.
+ * @type {RoleFlags}
+ * @memberof RoleFlagsBitField
+ */
+ static Flags = RoleFlags;
+}
+
+/**
+ * @name RoleFlagsBitField
+ * @kind constructor
+ * @memberof RoleFlagsBitField
+ * @param {BitFieldResolvable} [bits=0] Bit(s) to read from
+ */
+
+module.exports = RoleFlagsBitField;
diff --git a/node_modules/discord.js/src/util/ShardEvents.js b/node_modules/discord.js/src/util/ShardEvents.js
new file mode 100644
index 0000000..f5ba961
--- /dev/null
+++ b/node_modules/discord.js/src/util/ShardEvents.js
@@ -0,0 +1,29 @@
+'use strict';
+
+/**
+ * @typedef {Object} ShardEvents
+ * @property {string} Death death
+ * @property {string} Disconnect disconnect
+ * @property {string} Error error
+ * @property {string} Message message
+ * @property {string} Ready ready
+ * @property {string} Reconnecting reconnecting
+ * @property {string} Resume resume
+ * @property {string} Spawn spawn
+ */
+
+// JSDoc for IntelliSense purposes
+/**
+ * @type {ShardEvents}
+ * @ignore
+ */
+module.exports = {
+ Death: 'death',
+ Disconnect: 'disconnect',
+ Error: 'error',
+ Message: 'message',
+ Ready: 'ready',
+ Reconnecting: 'reconnecting',
+ Resume: 'resume',
+ Spawn: 'spawn',
+};
diff --git a/node_modules/discord.js/src/util/Status.js b/node_modules/discord.js/src/util/Status.js
new file mode 100644
index 0000000..e524197
--- /dev/null
+++ b/node_modules/discord.js/src/util/Status.js
@@ -0,0 +1,33 @@
+'use strict';
+
+const { createEnum } = require('./Enums');
+
+/**
+ * @typedef {Object} Status
+ * @property {number} Ready
+ * @property {number} Connecting
+ * @property {number} Reconnecting
+ * @property {number} Idle
+ * @property {number} Nearly
+ * @property {number} Disconnected
+ * @property {number} WaitingForGuilds
+ * @property {number} Identifying
+ * @property {number} Resuming
+ */
+
+// JSDoc for IntelliSense purposes
+/**
+ * @type {Status}
+ * @ignore
+ */
+module.exports = createEnum([
+ 'Ready',
+ 'Connecting',
+ 'Reconnecting',
+ 'Idle',
+ 'Nearly',
+ 'Disconnected',
+ 'WaitingForGuilds',
+ 'Identifying',
+ 'Resuming',
+]);
diff --git a/node_modules/discord.js/src/util/Sweepers.js b/node_modules/discord.js/src/util/Sweepers.js
new file mode 100644
index 0000000..6eb2dc6
--- /dev/null
+++ b/node_modules/discord.js/src/util/Sweepers.js
@@ -0,0 +1,467 @@
+'use strict';
+
+const { setInterval, clearInterval } = require('node:timers');
+const { ThreadChannelTypes, SweeperKeys } = require('./Constants');
+const Events = require('./Events');
+const { DiscordjsTypeError, ErrorCodes } = require('../errors');
+
+/**
+ * @typedef {Function} GlobalSweepFilter
+ * @returns {Function|null} Return `null` to skip sweeping, otherwise a function passed to `sweep()`,
+ * See {@link [Collection#sweep](https://discord.js.org/docs/packages/collection/stable/Collection:Class#sweep)}
+ * for the definition of this function.
+ */
+
+/**
+ * A container for all cache sweeping intervals and their associated sweep methods.
+ */
+class Sweepers {
+ constructor(client, options) {
+ /**
+ * The client that instantiated this
+ * @type {Client}
+ * @readonly
+ */
+ Object.defineProperty(this, 'client', { value: client });
+
+ /**
+ * The options the sweepers were instantiated with
+ * @type {SweeperOptions}
+ */
+ this.options = options;
+
+ /**
+ * A record of interval timeout that is used to sweep the indicated items, or null if not being swept
+ * @type {Object<SweeperKey, ?Timeout>}
+ */
+ this.intervals = Object.fromEntries(SweeperKeys.map(key => [key, null]));
+
+ for (const key of SweeperKeys) {
+ if (!(key in options)) continue;
+
+ this._validateProperties(key);
+
+ const clonedOptions = { ...this.options[key] };
+
+ // Handle cases that have a "lifetime"
+ if (!('filter' in clonedOptions)) {
+ switch (key) {
+ case 'invites':
+ clonedOptions.filter = this.constructor.expiredInviteSweepFilter(clonedOptions.lifetime);
+ break;
+ case 'messages':
+ clonedOptions.filter = this.constructor.outdatedMessageSweepFilter(clonedOptions.lifetime);
+ break;
+ case 'threads':
+ clonedOptions.filter = this.constructor.archivedThreadSweepFilter(clonedOptions.lifetime);
+ }
+ }
+
+ this._initInterval(key, `sweep${key[0].toUpperCase()}${key.slice(1)}`, clonedOptions);
+ }
+ }
+
+ /**
+ * Sweeps all guild and global application commands and removes the ones which are indicated by the filter.
+ * @param {Function} filter The function used to determine which commands will be removed from the caches.
+ * @returns {number} Amount of commands that were removed from the caches
+ */
+ sweepApplicationCommands(filter) {
+ const { guilds, items: guildCommands } = this._sweepGuildDirectProp('commands', filter, { emit: false });
+
+ const globalCommands = this.client.application?.commands.cache.sweep(filter) ?? 0;
+
+ this.client.emit(
+ Events.CacheSweep,
+ `Swept ${globalCommands} global application commands and ${guildCommands} guild commands in ${guilds} guilds.`,
+ );
+ return guildCommands + globalCommands;
+ }
+
+ /**
+ * Sweeps all auto moderation rules and removes the ones which are indicated by the filter.
+ * @param {Function} filter The function used to determine
+ * which auto moderation rules will be removed from the caches
+ * @returns {number} Amount of auto moderation rules that were removed from the caches
+ */
+ sweepAutoModerationRules(filter) {
+ return this._sweepGuildDirectProp('autoModerationRules', filter).items;
+ }
+
+ /**
+ * Sweeps all guild bans and removes the ones which are indicated by the filter.
+ * @param {Function} filter The function used to determine which bans will be removed from the caches.
+ * @returns {number} Amount of bans that were removed from the caches
+ */
+ sweepBans(filter) {
+ return this._sweepGuildDirectProp('bans', filter).items;
+ }
+
+ /**
+ * Sweeps all guild emojis and removes the ones which are indicated by the filter.
+ * @param {Function} filter The function used to determine which emojis will be removed from the caches.
+ * @returns {number} Amount of emojis that were removed from the caches
+ */
+ sweepEmojis(filter) {
+ return this._sweepGuildDirectProp('emojis', filter).items;
+ }
+
+ /**
+ * Sweeps all guild invites and removes the ones which are indicated by the filter.
+ * @param {Function} filter The function used to determine which invites will be removed from the caches.
+ * @returns {number} Amount of invites that were removed from the caches
+ */
+ sweepInvites(filter) {
+ return this._sweepGuildDirectProp('invites', filter).items;
+ }
+
+ /**
+ * Sweeps all guild members and removes the ones which are indicated by the filter.
+ * <info>It is highly recommended to keep the client guild member cached</info>
+ * @param {Function} filter The function used to determine which guild members will be removed from the caches.
+ * @returns {number} Amount of guild members that were removed from the caches
+ */
+ sweepGuildMembers(filter) {
+ return this._sweepGuildDirectProp('members', filter, { outputName: 'guild members' }).items;
+ }
+
+ /**
+ * Sweeps all text-based channels' messages and removes the ones which are indicated by the filter.
+ * @param {Function} filter The function used to determine which messages will be removed from the caches.
+ * @returns {number} Amount of messages that were removed from the caches
+ * @example
+ * // Remove all messages older than 1800 seconds from the messages cache
+ * const amount = sweepers.sweepMessages(
+ * Sweepers.filterByLifetime({
+ * lifetime: 1800,
+ * getComparisonTimestamp: m => m.editedTimestamp ?? m.createdTimestamp,
+ * })(),
+ * );
+ * console.log(`Successfully removed ${amount} messages from the cache.`);
+ */
+ sweepMessages(filter) {
+ if (typeof filter !== 'function') {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'filter', 'function');
+ }
+ let channels = 0;
+ let messages = 0;
+
+ for (const channel of this.client.channels.cache.values()) {
+ if (!channel.isTextBased()) continue;
+
+ channels++;
+ messages += channel.messages.cache.sweep(filter);
+ }
+ this.client.emit(Events.CacheSweep, `Swept ${messages} messages in ${channels} text-based channels.`);
+ return messages;
+ }
+
+ /**
+ * Sweeps all presences and removes the ones which are indicated by the filter.
+ * @param {Function} filter The function used to determine which presences will be removed from the caches.
+ * @returns {number} Amount of presences that were removed from the caches
+ */
+ sweepPresences(filter) {
+ return this._sweepGuildDirectProp('presences', filter).items;
+ }
+
+ /**
+ * Sweeps all message reactions and removes the ones which are indicated by the filter.
+ * @param {Function} filter The function used to determine which reactions will be removed from the caches.
+ * @returns {number} Amount of reactions that were removed from the caches
+ */
+ sweepReactions(filter) {
+ if (typeof filter !== 'function') {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'filter', 'function');
+ }
+ let channels = 0;
+ let messages = 0;
+ let reactions = 0;
+
+ for (const channel of this.client.channels.cache.values()) {
+ if (!channel.isTextBased()) continue;
+ channels++;
+
+ for (const message of channel.messages.cache.values()) {
+ messages++;
+ reactions += message.reactions.cache.sweep(filter);
+ }
+ }
+ this.client.emit(
+ Events.CacheSweep,
+ `Swept ${reactions} reactions on ${messages} messages in ${channels} text-based channels.`,
+ );
+ return reactions;
+ }
+
+ /**
+ * Sweeps all guild stage instances and removes the ones which are indicated by the filter.
+ * @param {Function} filter The function used to determine which stage instances will be removed from the caches.
+ * @returns {number} Amount of stage instances that were removed from the caches
+ */
+ sweepStageInstances(filter) {
+ return this._sweepGuildDirectProp('stageInstances', filter, { outputName: 'stage instances' }).items;
+ }
+
+ /**
+ * Sweeps all guild stickers and removes the ones which are indicated by the filter.
+ * @param {Function} filter The function used to determine which stickers will be removed from the caches.
+ * @returns {number} Amount of stickers that were removed from the caches
+ */
+ sweepStickers(filter) {
+ return this._sweepGuildDirectProp('stickers', filter).items;
+ }
+
+ /**
+ * Sweeps all thread members and removes the ones which are indicated by the filter.
+ * <info>It is highly recommended to keep the client thread member cached</info>
+ * @param {Function} filter The function used to determine which thread members will be removed from the caches.
+ * @returns {number} Amount of thread members that were removed from the caches
+ */
+ sweepThreadMembers(filter) {
+ if (typeof filter !== 'function') {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'filter', 'function');
+ }
+
+ let threads = 0;
+ let members = 0;
+ for (const channel of this.client.channels.cache.values()) {
+ if (!ThreadChannelTypes.includes(channel.type)) continue;
+ threads++;
+ members += channel.members.cache.sweep(filter);
+ }
+ this.client.emit(Events.CacheSweep, `Swept ${members} thread members in ${threads} threads.`);
+ return members;
+ }
+
+ /**
+ * Sweeps all threads and removes the ones which are indicated by the filter.
+ * @param {Function} filter The function used to determine which threads will be removed from the caches.
+ * @returns {number} filter Amount of threads that were removed from the caches
+ * @example
+ * // Remove all threads archived greater than 1 day ago from all the channel caches
+ * const amount = sweepers.sweepThreads(
+ * Sweepers.filterByLifetime({
+ * getComparisonTimestamp: t => t.archivedTimestamp,
+ * excludeFromSweep: t => !t.archived,
+ * })(),
+ * );
+ * console.log(`Successfully removed ${amount} threads from the cache.`);
+ */
+ sweepThreads(filter) {
+ if (typeof filter !== 'function') {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'filter', 'function');
+ }
+
+ let threads = 0;
+ for (const [key, val] of this.client.channels.cache.entries()) {
+ if (!ThreadChannelTypes.includes(val.type)) continue;
+ if (filter(val, key, this.client.channels.cache)) {
+ threads++;
+ this.client.channels._remove(key);
+ }
+ }
+ this.client.emit(Events.CacheSweep, `Swept ${threads} threads.`);
+ return threads;
+ }
+
+ /**
+ * Sweeps all users and removes the ones which are indicated by the filter.
+ * @param {Function} filter The function used to determine which users will be removed from the caches.
+ * @returns {number} Amount of users that were removed from the caches
+ */
+ sweepUsers(filter) {
+ if (typeof filter !== 'function') {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'filter', 'function');
+ }
+
+ const users = this.client.users.cache.sweep(filter);
+
+ this.client.emit(Events.CacheSweep, `Swept ${users} users.`);
+
+ return users;
+ }
+
+ /**
+ * Sweeps all guild voice states and removes the ones which are indicated by the filter.
+ * @param {Function} filter The function used to determine which voice states will be removed from the caches.
+ * @returns {number} Amount of voice states that were removed from the caches
+ */
+ sweepVoiceStates(filter) {
+ return this._sweepGuildDirectProp('voiceStates', filter, { outputName: 'voice states' }).items;
+ }
+
+ /**
+ * Cancels all sweeping intervals
+ * @returns {void}
+ */
+ destroy() {
+ for (const key of SweeperKeys) {
+ if (this.intervals[key]) clearInterval(this.intervals[key]);
+ }
+ }
+
+ /**
+ * Options for generating a filter function based on lifetime
+ * @typedef {Object} LifetimeFilterOptions
+ * @property {number} [lifetime=14400] How long, in seconds, an entry should stay in the collection
+ * before it is considered sweepable.
+ * @property {Function} [getComparisonTimestamp=e => e?.createdTimestamp] A function that takes an entry, key,
+ * and the collection and returns a timestamp to compare against in order to determine the lifetime of the entry.
+ * @property {Function} [excludeFromSweep=() => false] A function that takes an entry, key, and the collection
+ * and returns a boolean, `true` when the entry should not be checked for sweepability.
+ */
+
+ /**
+ * Create a sweepFilter function that uses a lifetime to determine sweepability.
+ * @param {LifetimeFilterOptions} [options={}] The options used to generate the filter function
+ * @returns {GlobalSweepFilter}
+ */
+ static filterByLifetime({
+ lifetime = 14400,
+ getComparisonTimestamp = e => e?.createdTimestamp,
+ excludeFromSweep = () => false,
+ } = {}) {
+ if (typeof lifetime !== 'number') {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'lifetime', 'number');
+ }
+ if (typeof getComparisonTimestamp !== 'function') {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'getComparisonTimestamp', 'function');
+ }
+ if (typeof excludeFromSweep !== 'function') {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'excludeFromSweep', 'function');
+ }
+ return () => {
+ if (lifetime <= 0) return null;
+ const lifetimeMs = lifetime * 1_000;
+ const now = Date.now();
+ return (entry, key, coll) => {
+ if (excludeFromSweep(entry, key, coll)) {
+ return false;
+ }
+ const comparisonTimestamp = getComparisonTimestamp(entry, key, coll);
+ if (!comparisonTimestamp || typeof comparisonTimestamp !== 'number') return false;
+ return now - comparisonTimestamp > lifetimeMs;
+ };
+ };
+ }
+
+ /**
+ * Creates a sweep filter that sweeps archived threads
+ * @param {number} [lifetime=14400] How long a thread has to be archived to be valid for sweeping
+ * @returns {GlobalSweepFilter}
+ */
+ static archivedThreadSweepFilter(lifetime = 14400) {
+ return this.filterByLifetime({
+ lifetime,
+ getComparisonTimestamp: e => e.archiveTimestamp,
+ excludeFromSweep: e => !e.archived,
+ });
+ }
+
+ /**
+ * Creates a sweep filter that sweeps expired invites
+ * @param {number} [lifetime=14400] How long ago an invite has to have expired to be valid for sweeping
+ * @returns {GlobalSweepFilter}
+ */
+ static expiredInviteSweepFilter(lifetime = 14400) {
+ return this.filterByLifetime({
+ lifetime,
+ getComparisonTimestamp: i => i.expiresTimestamp,
+ });
+ }
+
+ /**
+ * Creates a sweep filter that sweeps outdated messages (edits taken into account)
+ * @param {number} [lifetime=3600] How long ago a message has to have been sent or edited to be valid for sweeping
+ * @returns {GlobalSweepFilter}
+ */
+ static outdatedMessageSweepFilter(lifetime = 3600) {
+ return this.filterByLifetime({
+ lifetime,
+ getComparisonTimestamp: m => m.editedTimestamp ?? m.createdTimestamp,
+ });
+ }
+
+ /**
+ * Configuration options for emitting the cache sweep client event
+ * @typedef {Object} SweepEventOptions
+ * @property {boolean} [emit=true] Whether to emit the client event in this method
+ * @property {string} [outputName] A name to output in the client event if it should differ from the key
+ * @private
+ */
+
+ /**
+ * Sweep a direct sub property of all guilds
+ * @param {string} key The name of the property
+ * @param {Function} filter Filter function passed to sweep
+ * @param {SweepEventOptions} [eventOptions={}] Options for the Client event emitted here
+ * @returns {Object} Object containing the number of guilds swept and the number of items swept
+ * @private
+ */
+ _sweepGuildDirectProp(key, filter, { emit = true, outputName } = {}) {
+ if (typeof filter !== 'function') {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'filter', 'function');
+ }
+
+ let guilds = 0;
+ let items = 0;
+
+ for (const guild of this.client.guilds.cache.values()) {
+ const { cache } = guild[key];
+
+ guilds++;
+ items += cache.sweep(filter);
+ }
+
+ if (emit) {
+ this.client.emit(Events.CacheSweep, `Swept ${items} ${outputName ?? key} in ${guilds} guilds.`);
+ }
+
+ return { guilds, items };
+ }
+
+ /**
+ * Validates a set of properties
+ * @param {string} key Key of the options object to check
+ * @private
+ */
+ _validateProperties(key) {
+ const props = this.options[key];
+ if (typeof props !== 'object') {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, `sweepers.${key}`, 'object', true);
+ }
+ if (typeof props.interval !== 'number') {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, `sweepers.${key}.interval`, 'number');
+ }
+ // Invites, Messages, and Threads can be provided a lifetime parameter, which we use to generate the filter
+ if (['invites', 'messages', 'threads'].includes(key) && !('filter' in props)) {
+ if (typeof props.lifetime !== 'number') {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, `sweepers.${key}.lifetime`, 'number');
+ }
+ return;
+ }
+ if (typeof props.filter !== 'function') {
+ throw new DiscordjsTypeError(ErrorCodes.InvalidType, `sweepers.${key}.filter`, 'function');
+ }
+ }
+
+ /**
+ * Initialize an interval for sweeping
+ * @param {string} intervalKey The name of the property that stores the interval for this sweeper
+ * @param {string} sweepKey The name of the function that sweeps the desired caches
+ * @param {Object} opts Validated options for a sweep
+ * @private
+ */
+ _initInterval(intervalKey, sweepKey, opts) {
+ if (opts.interval <= 0 || opts.interval === Infinity) return;
+ this.intervals[intervalKey] = setInterval(() => {
+ const sweepFn = opts.filter();
+ if (sweepFn === null) return;
+ if (typeof sweepFn !== 'function') throw new DiscordjsTypeError(ErrorCodes.SweepFilterReturn);
+ this[sweepKey](sweepFn);
+ }, opts.interval * 1_000).unref();
+ }
+}
+
+module.exports = Sweepers;
diff --git a/node_modules/discord.js/src/util/Symbols.js b/node_modules/discord.js/src/util/Symbols.js
new file mode 100644
index 0000000..36d4ed8
--- /dev/null
+++ b/node_modules/discord.js/src/util/Symbols.js
@@ -0,0 +1,3 @@
+'use strict';
+
+exports.MakeCacheOverrideSymbol = Symbol('djs.managers.makeCacheOverride');
diff --git a/node_modules/discord.js/src/util/SystemChannelFlagsBitField.js b/node_modules/discord.js/src/util/SystemChannelFlagsBitField.js
new file mode 100644
index 0000000..cbca48f
--- /dev/null
+++ b/node_modules/discord.js/src/util/SystemChannelFlagsBitField.js
@@ -0,0 +1,43 @@
+'use strict';
+
+const { GuildSystemChannelFlags } = require('discord-api-types/v10');
+const BitField = require('./BitField');
+
+/**
+ * Data structure that makes it easy to interact with a {@link Guild#systemChannelFlags} bitfield.
+ * <info>Note that all event message types are enabled by default,
+ * and by setting their corresponding flags you are disabling them</info>
+ * @extends {BitField}
+ */
+class SystemChannelFlagsBitField extends BitField {
+ /**
+ * Numeric system channel flags.
+ * @type {GuildSystemChannelFlags}
+ * @memberof SystemChannelFlagsBitField
+ */
+ static Flags = GuildSystemChannelFlags;
+}
+
+/**
+ * @name SystemChannelFlagsBitField
+ * @kind constructor
+ * @memberof SystemChannelFlagsBitField
+ * @param {SystemChannelFlagsResolvable} [bits=0] Bit(s) to read from
+ */
+
+/**
+ * Bitfield of the packed bits
+ * @type {number}
+ * @name SystemChannelFlagsBitField#bitfield
+ */
+
+/**
+ * Data that can be resolved to give a system channel flag bitfield. This can be:
+ * * A string (see {@link SystemChannelFlagsBitField.Flags})
+ * * A system channel flag
+ * * An instance of SystemChannelFlagsBitField
+ * * An Array of SystemChannelFlagsResolvable
+ * @typedef {string|number|SystemChannelFlagsBitField|SystemChannelFlagsResolvable[]} SystemChannelFlagsResolvable
+ */
+
+module.exports = SystemChannelFlagsBitField;
diff --git a/node_modules/discord.js/src/util/ThreadMemberFlagsBitField.js b/node_modules/discord.js/src/util/ThreadMemberFlagsBitField.js
new file mode 100644
index 0000000..c5073a8
--- /dev/null
+++ b/node_modules/discord.js/src/util/ThreadMemberFlagsBitField.js
@@ -0,0 +1,31 @@
+'use strict';
+
+const BitField = require('./BitField');
+
+/**
+ * Data structure that makes it easy to interact with a {@link ThreadMember#flags} bitfield.
+ * @extends {BitField}
+ */
+class ThreadMemberFlagsBitField extends BitField {
+ /**
+ * Numeric thread member flags. There are currently no bitflags relevant to bots for this.
+ * @type {Object<string, number>}
+ * @memberof ThreadMemberFlagsBitField
+ */
+ static Flags = {};
+}
+
+/**
+ * @name ThreadMemberFlagsBitField
+ * @kind constructor
+ * @memberof ThreadMemberFlagsBitField
+ * @param {BitFieldResolvable} [bits=0] Bit(s) to read from
+ */
+
+/**
+ * Bitfield of the packed bits
+ * @type {number}
+ * @name ThreadMemberFlagsBitField#bitfield
+ */
+
+module.exports = ThreadMemberFlagsBitField;
diff --git a/node_modules/discord.js/src/util/Transformers.js b/node_modules/discord.js/src/util/Transformers.js
new file mode 100644
index 0000000..f4d7af0
--- /dev/null
+++ b/node_modules/discord.js/src/util/Transformers.js
@@ -0,0 +1,36 @@
+'use strict';
+
+const { isJSONEncodable } = require('@discordjs/util');
+const snakeCase = require('lodash.snakecase');
+
+/**
+ * Transforms camel-cased keys into snake cased keys
+ * @param {*} obj The object to transform
+ * @returns {*}
+ */
+function toSnakeCase(obj) {
+ if (typeof obj !== 'object' || !obj) return obj;
+ if (obj instanceof Date) return obj;
+ if (isJSONEncodable(obj)) return toSnakeCase(obj.toJSON());
+ if (Array.isArray(obj)) return obj.map(toSnakeCase);
+ return Object.fromEntries(Object.entries(obj).map(([key, value]) => [snakeCase(key), toSnakeCase(value)]));
+}
+
+/**
+ * Transforms an API auto moderation action object to a camel-cased variant.
+ * @param {APIAutoModerationAction} autoModerationAction The action to transform
+ * @returns {AutoModerationAction}
+ * @ignore
+ */
+function _transformAPIAutoModerationAction(autoModerationAction) {
+ return {
+ type: autoModerationAction.type,
+ metadata: {
+ durationSeconds: autoModerationAction.metadata.duration_seconds ?? null,
+ channelId: autoModerationAction.metadata.channel_id ?? null,
+ customMessage: autoModerationAction.metadata.custom_message ?? null,
+ },
+ };
+}
+
+module.exports = { toSnakeCase, _transformAPIAutoModerationAction };
diff --git a/node_modules/discord.js/src/util/UserFlagsBitField.js b/node_modules/discord.js/src/util/UserFlagsBitField.js
new file mode 100644
index 0000000..ea9f835
--- /dev/null
+++ b/node_modules/discord.js/src/util/UserFlagsBitField.js
@@ -0,0 +1,32 @@
+'use strict';
+
+const { UserFlags } = require('discord-api-types/v10');
+const BitField = require('./BitField');
+
+/**
+ * Data structure that makes it easy to interact with a {@link User#flags} bitfield.
+ * @extends {BitField}
+ */
+class UserFlagsBitField extends BitField {
+ /**
+ * Numeric user flags.
+ * @type {UserFlags}
+ * @memberof UserFlagsBitField
+ */
+ static Flags = UserFlags;
+}
+
+/**
+ * @name UserFlagsBitField
+ * @kind constructor
+ * @memberof UserFlagsBitField
+ * @param {BitFieldResolvable} [bits=0] Bit(s) to read from
+ */
+
+/**
+ * Bitfield of the packed bits
+ * @type {number}
+ * @name UserFlagsBitField#bitfield
+ */
+
+module.exports = UserFlagsBitField;
diff --git a/node_modules/discord.js/src/util/Util.js b/node_modules/discord.js/src/util/Util.js
new file mode 100644
index 0000000..e42bc5a
--- /dev/null
+++ b/node_modules/discord.js/src/util/Util.js
@@ -0,0 +1,424 @@
+'use strict';
+
+const { parse } = require('node:path');
+const { Collection } = require('@discordjs/collection');
+const { ChannelType, RouteBases, Routes } = require('discord-api-types/v10');
+const { fetch } = require('undici');
+const Colors = require('./Colors');
+const { DiscordjsError, DiscordjsRangeError, DiscordjsTypeError, ErrorCodes } = require('../errors');
+const isObject = d => typeof d === 'object' && d !== null;
+
+/**
+ * Flatten an object. Any properties that are collections will get converted to an array of keys.
+ * @param {Object} obj The object to flatten.
+ * @param {...Object<string, boolean|string>} [props] Specific properties to include/exclude.
+ * @returns {Object}
+ */
+function flatten(obj, ...props) {
+ if (!isObject(obj)) return obj;
+
+ const objProps = Object.keys(obj)
+ .filter(k => !k.startsWith('_'))
+ .map(k => ({ [k]: true }));
+
+ props = objProps.length ? Object.assign(...objProps, ...props) : Object.assign({}, ...props);
+
+ const out = {};
+
+ for (let [prop, newProp] of Object.entries(props)) {
+ if (!newProp) continue;
+ newProp = newProp === true ? prop : newProp;
+
+ const element = obj[prop];
+ const elemIsObj = isObject(element);
+ const valueOf = elemIsObj && typeof element.valueOf === 'function' ? element.valueOf() : null;
+ const hasToJSON = elemIsObj && typeof element.toJSON === 'function';
+
+ // If it's a Collection, make the array of keys
+ if (element instanceof Collection) out[newProp] = Array.from(element.keys());
+ // If the valueOf is a Collection, use its array of keys
+ else if (valueOf instanceof Collection) out[newProp] = Array.from(valueOf.keys());
+ // If it's an array, call toJSON function on each element if present, otherwise flatten each element
+ else if (Array.isArray(element)) out[newProp] = element.map(e => e.toJSON?.() ?? flatten(e));
+ // If it's an object with a primitive `valueOf`, use that value
+ else if (typeof valueOf !== 'object') out[newProp] = valueOf;
+ // If it's an object with a toJSON function, use the return value of it
+ else if (hasToJSON) out[newProp] = element.toJSON();
+ // If element is an object, use the flattened version of it
+ else if (typeof element === 'object') out[newProp] = flatten(element);
+ // If it's a primitive
+ else if (!elemIsObj) out[newProp] = element;
+ }
+
+ return out;
+}
+
+/**
+ * @typedef {Object} FetchRecommendedShardCountOptions
+ * @property {number} [guildsPerShard=1000] Number of guilds assigned per shard
+ * @property {number} [multipleOf=1] The multiple the shard count should round up to. (16 for large bot sharding)
+ */
+
+/**
+ * Gets the recommended shard count from Discord.
+ * @param {string} token Discord auth token
+ * @param {FetchRecommendedShardCountOptions} [options] Options for fetching the recommended shard count
+ * @returns {Promise<number>} The recommended number of shards
+ */
+async function fetchRecommendedShardCount(token, { guildsPerShard = 1_000, multipleOf = 1 } = {}) {
+ if (!token) throw new DiscordjsError(ErrorCodes.TokenMissing);
+ const response = await fetch(RouteBases.api + Routes.gatewayBot(), {
+ method: 'GET',
+ headers: { Authorization: `Bot ${token.replace(/^Bot\s*/i, '')}` },
+ });
+ if (!response.ok) {
+ if (response.status === 401) throw new DiscordjsError(ErrorCodes.TokenInvalid);
+ throw response;
+ }
+ const { shards } = await response.json();
+ return Math.ceil((shards * (1_000 / guildsPerShard)) / multipleOf) * multipleOf;
+}
+
+/**
+ * Parses emoji info out of a string. The string must be one of:
+ * * A UTF-8 emoji (no id)
+ * * A URL-encoded UTF-8 emoji (no id)
+ * * A Discord custom emoji (`<:name:id>` or `<a:name:id>`)
+ * @param {string} text Emoji string to parse
+ * @returns {APIEmoji} Object with `animated`, `name`, and `id` properties
+ */
+function parseEmoji(text) {
+ if (text.includes('%')) text = decodeURIComponent(text);
+ if (!text.includes(':')) return { animated: false, name: text, id: undefined };
+ const match = text.match(/<?(?:(a):)?(\w{2,32}):(\d{17,19})?>?/);
+ return match && { animated: Boolean(match[1]), name: match[2], id: match[3] };
+}
+
+/**
+ * Resolves a partial emoji object from an {@link EmojiIdentifierResolvable}, without checking a Client.
+ * @param {EmojiIdentifierResolvable} emoji Emoji identifier to resolve
+ * @returns {?RawEmoji}
+ * @private
+ */
+function resolvePartialEmoji(emoji) {
+ if (!emoji) return null;
+ if (typeof emoji === 'string') return /^\d{17,19}$/.test(emoji) ? { id: emoji } : parseEmoji(emoji);
+ const { id, name, animated } = emoji;
+ if (!id && !name) return null;
+ return { id, name, animated: Boolean(animated) };
+}
+
+/**
+ * Sets default properties on an object that aren't already specified.
+ * @param {Object} def Default properties
+ * @param {Object} given Object to assign defaults to
+ * @returns {Object}
+ * @private
+ */
+function mergeDefault(def, given) {
+ if (!given) return def;
+ for (const key in def) {
+ if (!Object.hasOwn(given, key) || given[key] === undefined) {
+ given[key] = def[key];
+ } else if (given[key] === Object(given[key])) {
+ given[key] = mergeDefault(def[key], given[key]);
+ }
+ }
+
+ return given;
+}
+
+/**
+ * Options used to make an error object.
+ * @typedef {Object} MakeErrorOptions
+ * @property {string} name Error type
+ * @property {string} message Message for the error
+ * @property {string} stack Stack for the error
+ */
+
+/**
+ * Makes an Error from a plain info object.
+ * @param {MakeErrorOptions} obj Error info
+ * @returns {Error}
+ * @private
+ */
+function makeError(obj) {
+ const err = new Error(obj.message);
+ err.name = obj.name;
+ err.stack = obj.stack;
+ return err;
+}
+
+/**
+ * Makes a plain error info object from an Error.
+ * @param {Error} err Error to get info from
+ * @returns {MakeErrorOptions}
+ * @private
+ */
+function makePlainError(err) {
+ return {
+ name: err.name,
+ message: err.message,
+ stack: err.stack,
+ };
+}
+
+const TextSortableGroupTypes = [ChannelType.GuildText, ChannelType.GuildAnnouncement, ChannelType.GuildForum];
+const VoiceSortableGroupTypes = [ChannelType.GuildVoice, ChannelType.GuildStageVoice];
+const CategorySortableGroupTypes = [ChannelType.GuildCategory];
+
+/**
+ * Gets an array of the channel types that can be moved in the channel group. For example, a GuildText channel would
+ * return an array containing the types that can be ordered within the text channels (always at the top), and a voice
+ * channel would return an array containing the types that can be ordered within the voice channels (always at the
+ * bottom).
+ * @param {ChannelType} type The type of the channel
+ * @returns {ChannelType[]}
+ * @private
+ */
+function getSortableGroupTypes(type) {
+ switch (type) {
+ case ChannelType.GuildText:
+ case ChannelType.GuildAnnouncement:
+ case ChannelType.GuildForum:
+ return TextSortableGroupTypes;
+ case ChannelType.GuildVoice:
+ case ChannelType.GuildStageVoice:
+ return VoiceSortableGroupTypes;
+ case ChannelType.GuildCategory:
+ return CategorySortableGroupTypes;
+ default:
+ return [type];
+ }
+}
+
+/**
+ * Moves an element in an array *in place*.
+ * @param {Array<*>} array Array to modify
+ * @param {*} element Element to move
+ * @param {number} newIndex Index or offset to move the element to
+ * @param {boolean} [offset=false] Move the element by an offset amount rather than to a set index
+ * @returns {number}
+ * @private
+ */
+function moveElementInArray(array, element, newIndex, offset = false) {
+ const index = array.indexOf(element);
+ newIndex = (offset ? index : 0) + newIndex;
+ if (newIndex > -1 && newIndex < array.length) {
+ const removedElement = array.splice(index, 1)[0];
+ array.splice(newIndex, 0, removedElement);
+ }
+ return array.indexOf(element);
+}
+
+/**
+ * Verifies the provided data is a string, otherwise throws provided error.
+ * @param {string} data The string resolvable to resolve
+ * @param {Function} [error] The Error constructor to instantiate. Defaults to Error
+ * @param {string} [errorMessage] The error message to throw with. Defaults to "Expected string, got <data> instead."
+ * @param {boolean} [allowEmpty=true] Whether an empty string should be allowed
+ * @returns {string}
+ */
+function verifyString(
+ data,
+ error = Error,
+ errorMessage = `Expected a string, got ${data} instead.`,
+ allowEmpty = true,
+) {
+ if (typeof data !== 'string') throw new error(errorMessage);
+ if (!allowEmpty && data.length === 0) throw new error(errorMessage);
+ return data;
+}
+
+/**
+ * Can be a number, hex string, an RGB array like:
+ * ```js
+ * [255, 0, 255] // purple
+ * ```
+ * or one of the following strings:
+ * - `Default`
+ * - `White`
+ * - `Aqua`
+ * - `Green`
+ * - `Blue`
+ * - `Yellow`
+ * - `Purple`
+ * - `LuminousVividPink`
+ * - `Fuchsia`
+ * - `Gold`
+ * - `Orange`
+ * - `Red`
+ * - `Grey`
+ * - `Navy`
+ * - `DarkAqua`
+ * - `DarkGreen`
+ * - `DarkBlue`
+ * - `DarkPurple`
+ * - `DarkVividPink`
+ * - `DarkGold`
+ * - `DarkOrange`
+ * - `DarkRed`
+ * - `DarkGrey`
+ * - `DarkerGrey`
+ * - `LightGrey`
+ * - `DarkNavy`
+ * - `Blurple`
+ * - `Greyple`
+ * - `DarkButNotBlack`
+ * - `NotQuiteBlack`
+ * - `Random`
+ * @typedef {string|number|number[]} ColorResolvable
+ */
+
+/**
+ * Resolves a ColorResolvable into a color number.
+ * @param {ColorResolvable} color Color to resolve
+ * @returns {number} A color
+ */
+function resolveColor(color) {
+ if (typeof color === 'string') {
+ if (color === 'Random') return Math.floor(Math.random() * (0xffffff + 1));
+ if (color === 'Default') return 0;
+ if (/^#?[\da-f]{6}$/i.test(color)) return parseInt(color.replace('#', ''), 16);
+ color = Colors[color];
+ } else if (Array.isArray(color)) {
+ color = (color[0] << 16) + (color[1] << 8) + color[2];
+ }
+
+ if (color < 0 || color > 0xffffff) throw new DiscordjsRangeError(ErrorCodes.ColorRange);
+ if (typeof color !== 'number' || Number.isNaN(color)) throw new DiscordjsTypeError(ErrorCodes.ColorConvert);
+
+ return color;
+}
+
+/**
+ * Sorts by Discord's position and id.
+ * @param {Collection} collection Collection of objects to sort
+ * @returns {Collection}
+ */
+function discordSort(collection) {
+ const isGuildChannel = collection.first() instanceof GuildChannel;
+ return collection.sorted(
+ isGuildChannel
+ ? (a, b) => a.rawPosition - b.rawPosition || Number(BigInt(a.id) - BigInt(b.id))
+ : (a, b) => a.rawPosition - b.rawPosition || Number(BigInt(b.id) - BigInt(a.id)),
+ );
+}
+
+/**
+ * Sets the position of a Channel or Role.
+ * @param {BaseChannel|Role} item Object to set the position of
+ * @param {number} position New position for the object
+ * @param {boolean} relative Whether `position` is relative to its current position
+ * @param {Collection<string, BaseChannel|Role>} sorted A collection of the objects sorted properly
+ * @param {Client} client The client to use to patch the data
+ * @param {string} route Route to call PATCH on
+ * @param {string} [reason] Reason for the change
+ * @returns {Promise<BaseChannel[]|Role[]>} Updated item list, with `id` and `position` properties
+ * @private
+ */
+async function setPosition(item, position, relative, sorted, client, route, reason) {
+ let updatedItems = [...sorted.values()];
+ moveElementInArray(updatedItems, item, position, relative);
+ updatedItems = updatedItems.map((r, i) => ({ id: r.id, position: i }));
+ await client.rest.patch(route, { body: updatedItems, reason });
+ return updatedItems;
+}
+
+/**
+ * Alternative to Node's `path.basename`, removing query string after the extension if it exists.
+ * @param {string} path Path to get the basename of
+ * @param {string} [ext] File extension to remove
+ * @returns {string} Basename of the path
+ * @private
+ */
+function basename(path, ext) {
+ const res = parse(path);
+ return ext && res.ext.startsWith(ext) ? res.name : res.base.split('?')[0];
+}
+
+/**
+ * The content to have all mentions replaced by the equivalent text.
+ * @param {string} str The string to be converted
+ * @param {TextBasedChannels} channel The channel the string was sent in
+ * @returns {string}
+ */
+function cleanContent(str, channel) {
+ return str.replaceAll(/<(@[!&]?|#)(\d{17,19})>/g, (match, type, id) => {
+ switch (type) {
+ case '@':
+ case '@!': {
+ const member = channel.guild?.members.cache.get(id);
+ if (member) {
+ return `@${member.displayName}`;
+ }
+
+ const user = channel.client.users.cache.get(id);
+ return user ? `@${user.username}` : match;
+ }
+ case '@&': {
+ if (channel.type === ChannelType.DM) return match;
+ const role = channel.guild.roles.cache.get(id);
+ return role ? `@${role.name}` : match;
+ }
+ case '#': {
+ const mentionedChannel = channel.client.channels.cache.get(id);
+ return mentionedChannel ? `#${mentionedChannel.name}` : match;
+ }
+ default: {
+ return match;
+ }
+ }
+ });
+}
+
+/**
+ * The content to put in a code block with all code block fences replaced by the equivalent backticks.
+ * @param {string} text The string to be converted
+ * @returns {string}
+ */
+function cleanCodeBlockContent(text) {
+ return text.replaceAll('```', '`\u200b``');
+}
+
+/**
+ * Parses a webhook URL for the id and token.
+ * @param {string} url The URL to parse
+ * @returns {?WebhookClientDataIdWithToken} `null` if the URL is invalid, otherwise the id and the token
+ */
+function parseWebhookURL(url) {
+ const matches = url.match(
+ /https?:\/\/(?:ptb\.|canary\.)?discord\.com\/api(?:\/v\d{1,2})?\/webhooks\/(\d{17,19})\/([\w-]{68})/i,
+ );
+
+ if (!matches || matches.length <= 2) return null;
+
+ const [, id, token] = matches;
+ return {
+ id,
+ token,
+ };
+}
+
+module.exports = {
+ flatten,
+ fetchRecommendedShardCount,
+ parseEmoji,
+ resolvePartialEmoji,
+ mergeDefault,
+ makeError,
+ makePlainError,
+ getSortableGroupTypes,
+ moveElementInArray,
+ verifyString,
+ resolveColor,
+ discordSort,
+ setPosition,
+ basename,
+ cleanContent,
+ cleanCodeBlockContent,
+ parseWebhookURL,
+};
+
+// Fixes Circular
+const GuildChannel = require('../structures/GuildChannel');
diff --git a/node_modules/discord.js/src/util/WebSocketShardEvents.js b/node_modules/discord.js/src/util/WebSocketShardEvents.js
new file mode 100644
index 0000000..81e05f2
--- /dev/null
+++ b/node_modules/discord.js/src/util/WebSocketShardEvents.js
@@ -0,0 +1,25 @@
+'use strict';
+
+/**
+ * @typedef {Object} WebSocketShardEvents
+ * @property {string} Close close
+ * @property {string} Destroyed destroyed
+ * @property {string} InvalidSession invalidSession
+ * @property {string} Ready ready
+ * @property {string} Resumed resumed
+ * @property {string} AllReady allReady
+ */
+
+// JSDoc for IntelliSense purposes
+/**
+ * @type {WebSocketShardEvents}
+ * @ignore
+ */
+module.exports = {
+ Close: 'close',
+ Destroyed: 'destroyed',
+ InvalidSession: 'invalidSession',
+ Ready: 'ready',
+ Resumed: 'resumed',
+ AllReady: 'allReady',
+};
diff --git a/node_modules/discord.js/typings/index.d.ts b/node_modules/discord.js/typings/index.d.ts
new file mode 100644
index 0000000..fda9b4c
--- /dev/null
+++ b/node_modules/discord.js/typings/index.d.ts
@@ -0,0 +1,6520 @@
+// DOM types required for undici
+/// <reference lib="dom" />
+
+import {
+ ActionRowBuilder as BuilderActionRow,
+ MessageActionRowComponentBuilder,
+ blockQuote,
+ bold,
+ ButtonBuilder as BuilderButtonComponent,
+ channelMention,
+ codeBlock,
+ EmbedBuilder as BuildersEmbed,
+ formatEmoji,
+ hideLinkEmbed,
+ hyperlink,
+ inlineCode,
+ italic,
+ quote,
+ roleMention,
+ ChannelSelectMenuBuilder as BuilderChannelSelectMenuComponent,
+ MentionableSelectMenuBuilder as BuilderMentionableSelectMenuComponent,
+ RoleSelectMenuBuilder as BuilderRoleSelectMenuComponent,
+ StringSelectMenuBuilder as BuilderStringSelectMenuComponent,
+ UserSelectMenuBuilder as BuilderUserSelectMenuComponent,
+ TextInputBuilder as BuilderTextInputComponent,
+ SelectMenuOptionBuilder as BuildersSelectMenuOption,
+ spoiler,
+ strikethrough,
+ time,
+ TimestampStyles,
+ underscore,
+ userMention,
+ ModalActionRowComponentBuilder,
+ ModalBuilder as BuildersModal,
+ AnyComponentBuilder,
+ ComponentBuilder,
+ type RestOrArray,
+ ApplicationCommandOptionAllowedChannelTypes,
+} from '@discordjs/builders';
+import { Awaitable, JSONEncodable } from '@discordjs/util';
+import { Collection } from '@discordjs/collection';
+import { BaseImageURLOptions, ImageURLOptions, RawFile, REST, RESTOptions } from '@discordjs/rest';
+import {
+ WebSocketManager as WSWebSocketManager,
+ IShardingStrategy,
+ IIdentifyThrottler,
+ SessionInfo,
+} from '@discordjs/ws';
+import {
+ APIActionRowComponent,
+ APIApplicationCommandInteractionData,
+ APIApplicationCommandOption,
+ APIAuditLogChange,
+ APIButtonComponent,
+ APIEmbed,
+ APIEmoji,
+ APIInteractionDataResolvedChannel,
+ APIInteractionDataResolvedGuildMember,
+ APIInteractionGuildMember,
+ APIMessage,
+ APIMessageComponent,
+ APIOverwrite,
+ APIPartialChannel,
+ APIPartialEmoji,
+ APIPartialGuild,
+ APIRole,
+ APISelectMenuComponent,
+ APITemplateSerializedSourceGuild,
+ APIUser,
+ ButtonStyle,
+ ChannelType,
+ ComponentType,
+ GatewayDispatchEvents,
+ GatewayVoiceServerUpdateDispatchData,
+ GatewayVoiceStateUpdateDispatchData,
+ GuildFeature,
+ GuildMFALevel,
+ GuildNSFWLevel,
+ GuildPremiumTier,
+ GuildVerificationLevel,
+ Locale,
+ InteractionType,
+ InviteTargetType,
+ MessageType,
+ OAuth2Scopes,
+ RESTPostAPIApplicationCommandsJSONBody,
+ Snowflake,
+ StageInstancePrivacyLevel,
+ StickerFormatType,
+ StickerType,
+ TeamMemberMembershipState,
+ WebhookType,
+ OverwriteType,
+ GuildExplicitContentFilter,
+ GuildDefaultMessageNotifications,
+ ApplicationCommandPermissionType,
+ ApplicationCommandOptionType,
+ ApplicationCommandType,
+ ActivityType,
+ GuildScheduledEventEntityType,
+ GuildScheduledEventPrivacyLevel,
+ GuildScheduledEventStatus,
+ IntegrationExpireBehavior,
+ ApplicationFlags,
+ PermissionFlagsBits,
+ ThreadMemberFlags,
+ UserFlags,
+ MessageFlags,
+ GuildSystemChannelFlags,
+ GatewayIntentBits,
+ ActivityFlags,
+ AuditLogEvent,
+ APIMessageComponentEmoji,
+ EmbedType,
+ APIActionRowComponentTypes,
+ APIModalInteractionResponseCallbackData,
+ APIModalSubmitInteraction,
+ APIMessageActionRowComponent,
+ TextInputStyle,
+ APITextInputComponent,
+ APIModalActionRowComponent,
+ APIModalComponent,
+ APISelectMenuOption,
+ APIEmbedField,
+ APIEmbedAuthor,
+ APIEmbedFooter,
+ APIEmbedImage,
+ VideoQualityMode,
+ LocalizationMap,
+ LocaleString,
+ MessageActivityType,
+ APIAttachment,
+ APIChannel,
+ ThreadAutoArchiveDuration,
+ FormattingPatterns,
+ APIEmbedProvider,
+ AuditLogOptionsType,
+ TextChannelType,
+ ChannelFlags,
+ SortOrderType,
+ APIMessageStringSelectInteractionData,
+ APIMessageUserSelectInteractionData,
+ APIStringSelectComponent,
+ APIUserSelectComponent,
+ APIRoleSelectComponent,
+ APIMentionableSelectComponent,
+ APIChannelSelectComponent,
+ APIGuildMember,
+ APIMessageRoleSelectInteractionData,
+ APIMessageMentionableSelectInteractionData,
+ APIMessageChannelSelectInteractionData,
+ AutoModerationRuleKeywordPresetType,
+ AutoModerationActionType,
+ AutoModerationRuleEventType,
+ AutoModerationRuleTriggerType,
+ AuditLogRuleTriggerType,
+ GatewayAutoModerationActionExecutionDispatchData,
+ APIAutoModerationRule,
+ ForumLayoutType,
+ ApplicationRoleConnectionMetadataType,
+ APIApplicationRoleConnectionMetadata,
+ ImageFormat,
+ GuildMemberFlags,
+ RESTGetAPIGuildThreadsResult,
+ RESTGetAPIGuildOnboardingResult,
+ APIGuildOnboardingPrompt,
+ APIGuildOnboardingPromptOption,
+ GuildOnboardingPromptType,
+ AttachmentFlags,
+ RoleFlags,
+} from 'discord-api-types/v10';
+import { ChildProcess } from 'node:child_process';
+import { EventEmitter } from 'node:events';
+import { Stream } from 'node:stream';
+import { MessagePort, Worker } from 'node:worker_threads';
+import * as WebSocket from 'ws';
+import {
+ RawActivityData,
+ RawAnonymousGuildData,
+ RawApplicationCommandData,
+ RawApplicationData,
+ RawBaseGuildData,
+ RawChannelData,
+ RawClientApplicationData,
+ RawDMChannelData,
+ RawEmojiData,
+ RawGuildAuditLogData,
+ RawGuildAuditLogEntryData,
+ RawGuildBanData,
+ RawGuildChannelData,
+ RawGuildData,
+ RawGuildEmojiData,
+ RawGuildMemberData,
+ RawGuildPreviewData,
+ RawGuildScheduledEventData,
+ RawGuildTemplateData,
+ RawIntegrationApplicationData,
+ RawIntegrationData,
+ RawInteractionData,
+ RawInviteData,
+ RawInviteGuildData,
+ RawInviteStageInstance,
+ RawMessageButtonInteractionData,
+ RawMessageComponentInteractionData,
+ RawMessageData,
+ RawMessagePayloadData,
+ RawMessageReactionData,
+ RawOAuth2GuildData,
+ RawPartialGroupDMChannelData,
+ RawPartialMessageData,
+ RawPermissionOverwriteData,
+ RawPresenceData,
+ RawReactionEmojiData,
+ RawRichPresenceAssets,
+ RawRoleData,
+ RawStageInstanceData,
+ RawStickerData,
+ RawStickerPackData,
+ RawTeamData,
+ RawTeamMemberData,
+ RawThreadChannelData,
+ RawThreadMemberData,
+ RawTypingData,
+ RawUserData,
+ RawVoiceRegionData,
+ RawVoiceStateData,
+ RawWebhookData,
+ RawWelcomeChannelData,
+ RawWelcomeScreenData,
+ RawWidgetData,
+ RawWidgetMemberData,
+} from './rawDataTypes';
+
+declare module 'node:events' {
+ class EventEmitter {
+ // Add type overloads for client events.
+ public static once<E extends EventEmitter, K extends keyof ClientEvents>(
+ eventEmitter: E,
+ eventName: E extends Client ? K : string,
+ ): Promise<E extends Client ? ClientEvents[K] : any[]>;
+ public static on<E extends EventEmitter, K extends keyof ClientEvents>(
+ eventEmitter: E,
+ eventName: E extends Client ? K : string,
+ ): AsyncIterableIterator<E extends Client ? ClientEvents[K] : any>;
+ }
+}
+
+//#region Classes
+
+export class Activity {
+ private constructor(presence: Presence, data?: RawActivityData);
+ public readonly presence: Presence;
+ public applicationId: Snowflake | null;
+ public assets: RichPresenceAssets | null;
+ public buttons: string[];
+ public get createdAt(): Date;
+ public createdTimestamp: number;
+ public details: string | null;
+ public emoji: Emoji | null;
+ public flags: Readonly<ActivityFlagsBitField>;
+ public name: string;
+ public party: {
+ id: string | null;
+ size: [number, number];
+ } | null;
+ public state: string | null;
+ public timestamps: {
+ start: Date | null;
+ end: Date | null;
+ } | null;
+ public type: ActivityType;
+ public url: string | null;
+ public equals(activity: Activity): boolean;
+ public toString(): string;
+}
+
+export type ActivityFlagsString = keyof typeof ActivityFlags;
+
+export interface BaseComponentData {
+ type: ComponentType;
+}
+
+export type MessageActionRowComponentData =
+ | JSONEncodable<APIMessageActionRowComponent>
+ | ButtonComponentData
+ | StringSelectMenuComponentData
+ | UserSelectMenuComponentData
+ | RoleSelectMenuComponentData
+ | MentionableSelectMenuComponentData
+ | ChannelSelectMenuComponentData;
+
+export type ModalActionRowComponentData = JSONEncodable<APIModalActionRowComponent> | TextInputComponentData;
+
+export type ActionRowComponentData = MessageActionRowComponentData | ModalActionRowComponentData;
+
+export type ActionRowComponent = MessageActionRowComponent | ModalActionRowComponent;
+
+export interface ActionRowData<T extends JSONEncodable<APIActionRowComponentTypes> | ActionRowComponentData>
+ extends BaseComponentData {
+ components: T[];
+}
+
+export class ActionRowBuilder<T extends AnyComponentBuilder = AnyComponentBuilder> extends BuilderActionRow<T> {
+ constructor(
+ data?: Partial<
+ | ActionRowData<ActionRowComponentData | JSONEncodable<APIActionRowComponentTypes>>
+ | APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>
+ >,
+ );
+ public static from<T extends AnyComponentBuilder = AnyComponentBuilder>(
+ other:
+ | JSONEncodable<APIActionRowComponent<ReturnType<T['toJSON']>>>
+ | APIActionRowComponent<ReturnType<T['toJSON']>>,
+ ): ActionRowBuilder<T>;
+}
+
+export type MessageActionRowComponent =
+ | ButtonComponent
+ | StringSelectMenuComponent
+ | UserSelectMenuComponent
+ | RoleSelectMenuComponent
+ | MentionableSelectMenuComponent
+ | ChannelSelectMenuComponent;
+export type ModalActionRowComponent = TextInputComponent;
+
+export class ActionRow<T extends MessageActionRowComponent | ModalActionRowComponent> extends Component<
+ APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>
+> {
+ private constructor(data: APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>);
+ public readonly components: T[];
+ public toJSON(): APIActionRowComponent<ReturnType<T['toJSON']>>;
+}
+
+export class ActivityFlagsBitField extends BitField<ActivityFlagsString> {
+ public static Flags: typeof ActivityFlags;
+ public static resolve(bit?: BitFieldResolvable<ActivityFlagsString, number>): number;
+}
+
+export abstract class AnonymousGuild extends BaseGuild {
+ protected constructor(client: Client<true>, data: RawAnonymousGuildData, immediatePatch?: boolean);
+ public banner: string | null;
+ public description: string | null;
+ public nsfwLevel: GuildNSFWLevel;
+ public premiumSubscriptionCount: number | null;
+ public splash: string | null;
+ public vanityURLCode: string | null;
+ public verificationLevel: GuildVerificationLevel;
+ public bannerURL(options?: ImageURLOptions): string | null;
+ public splashURL(options?: ImageURLOptions): string | null;
+}
+
+export class AutoModerationActionExecution {
+ private constructor(data: GatewayAutoModerationActionExecutionDispatchData, guild: Guild);
+ public guild: Guild;
+ public action: AutoModerationAction;
+ public ruleId: Snowflake;
+ public ruleTriggerType: AutoModerationRuleTriggerType;
+ public get user(): User | null;
+ public userId: Snowflake;
+ public get channel(): GuildTextBasedChannel | ForumChannel | null;
+ public channelId: Snowflake | null;
+ public get member(): GuildMember | null;
+ public messageId: Snowflake | null;
+ public alertSystemMessageId: Snowflake | null;
+ public content: string;
+ public matchedKeyword: string | null;
+ public matchedContent: string | null;
+ public get autoModerationRule(): AutoModerationRule | null;
+}
+
+export class AutoModerationRule extends Base {
+ private constructor(client: Client<true>, data: APIAutoModerationRule, guild: Guild);
+ public id: Snowflake;
+ public guild: Guild;
+ public name: string;
+ public creatorId: Snowflake;
+ public eventType: AutoModerationRuleEventType;
+ public triggerType: AutoModerationRuleTriggerType;
+ public triggerMetadata: AutoModerationTriggerMetadata;
+ public actions: AutoModerationAction[];
+ public enabled: boolean;
+ public exemptRoles: Collection<Snowflake, Role>;
+ public exemptChannels: Collection<Snowflake, GuildBasedChannel>;
+ public edit(options: AutoModerationRuleEditOptions): Promise<AutoModerationRule>;
+ public delete(reason?: string): Promise<void>;
+ public setName(name: string, reason?: string): Promise<AutoModerationRule>;
+ public setEventType(eventType: AutoModerationRuleEventType, reason?: string): Promise<AutoModerationRule>;
+ public setKeywordFilter(keywordFilter: string[], reason?: string): Promise<AutoModerationRule>;
+ public setRegexPatterns(regexPatterns: string[], reason?: string): Promise<AutoModerationRule>;
+ public setPresets(presets: AutoModerationRuleKeywordPresetType[], reason?: string): Promise<AutoModerationRule>;
+ public setAllowList(allowList: string[], reason?: string): Promise<AutoModerationRule>;
+ public setMentionTotalLimit(mentionTotalLimit: number, reason?: string): Promise<AutoModerationRule>;
+ public setMentionRaidProtectionEnabled(
+ mentionRaidProtectionEnabled: boolean,
+ reason?: string,
+ ): Promise<AutoModerationRule>;
+ public setActions(actions: AutoModerationActionOptions[], reason?: string): Promise<AutoModerationRule>;
+ public setEnabled(enabled?: boolean, reason?: string): Promise<AutoModerationRule>;
+ public setExemptRoles(
+ roles: Collection<Snowflake, Role> | RoleResolvable[],
+ reason?: string,
+ ): Promise<AutoModerationRule>;
+ public setExemptChannels(
+ channels: Collection<Snowflake, GuildBasedChannel> | GuildChannelResolvable[],
+ reason?: string,
+ ): Promise<AutoModerationRule>;
+}
+
+export abstract class Application extends Base {
+ protected constructor(client: Client<true>, data: RawApplicationData);
+ public get createdAt(): Date;
+ public get createdTimestamp(): number;
+ public description: string | null;
+ public icon: string | null;
+ public id: Snowflake;
+ public name: string | null;
+ public coverURL(options?: ImageURLOptions): string | null;
+ public iconURL(options?: ImageURLOptions): string | null;
+ public toJSON(): unknown;
+ public toString(): string | null;
+}
+
+export class ApplicationCommand<PermissionsFetchType = {}> extends Base {
+ private constructor(client: Client<true>, data: RawApplicationCommandData, guild?: Guild, guildId?: Snowflake);
+ public applicationId: Snowflake;
+ public get createdAt(): Date;
+ public get createdTimestamp(): number;
+ public defaultMemberPermissions: Readonly<PermissionsBitField> | null;
+ public description: string;
+ public descriptionLocalizations: LocalizationMap | null;
+ public descriptionLocalized: string | null;
+ public dmPermission: boolean | null;
+ public guild: Guild | null;
+ public guildId: Snowflake | null;
+ public get manager(): ApplicationCommandManager;
+ public id: Snowflake;
+ public name: string;
+ public nameLocalizations: LocalizationMap | null;
+ public nameLocalized: string | null;
+ public options: (ApplicationCommandOption & { nameLocalized?: string; descriptionLocalized?: string })[];
+ public permissions: ApplicationCommandPermissionsManager<
+ PermissionsFetchType,
+ PermissionsFetchType,
+ Guild | null,
+ Snowflake
+ >;
+ public type: ApplicationCommandType;
+ public version: Snowflake;
+ public nsfw: boolean;
+ public delete(): Promise<ApplicationCommand<PermissionsFetchType>>;
+ public edit(data: Partial<ApplicationCommandData>): Promise<ApplicationCommand<PermissionsFetchType>>;
+ public setName(name: string): Promise<ApplicationCommand<PermissionsFetchType>>;
+ public setNameLocalizations(nameLocalizations: LocalizationMap): Promise<ApplicationCommand<PermissionsFetchType>>;
+ public setDescription(description: string): Promise<ApplicationCommand<PermissionsFetchType>>;
+ public setDescriptionLocalizations(
+ descriptionLocalizations: LocalizationMap,
+ ): Promise<ApplicationCommand<PermissionsFetchType>>;
+ public setDefaultMemberPermissions(
+ defaultMemberPermissions: PermissionResolvable | null,
+ ): Promise<ApplicationCommand<PermissionsFetchType>>;
+ public setDMPermission(dmPermission?: boolean): Promise<ApplicationCommand<PermissionsFetchType>>;
+ public setOptions(options: ApplicationCommandOptionData[]): Promise<ApplicationCommand<PermissionsFetchType>>;
+ public equals(
+ command: ApplicationCommand | ApplicationCommandData | RawApplicationCommandData,
+ enforceOptionOrder?: boolean,
+ ): boolean;
+ public static optionsEqual(
+ existing: ApplicationCommandOption[],
+ options: ApplicationCommandOption[] | ApplicationCommandOptionData[] | APIApplicationCommandOption[],
+ enforceOptionOrder?: boolean,
+ ): boolean;
+ private static _optionEquals(
+ existing: ApplicationCommandOption,
+ options: ApplicationCommandOption | ApplicationCommandOptionData | APIApplicationCommandOption,
+ enforceOptionOrder?: boolean,
+ ): boolean;
+ private static transformOption(option: ApplicationCommandOptionData, received?: boolean): unknown;
+ private static transformCommand(command: ApplicationCommandData): RESTPostAPIApplicationCommandsJSONBody;
+ private static isAPICommandData(command: object): command is RESTPostAPIApplicationCommandsJSONBody;
+}
+
+export class ApplicationRoleConnectionMetadata {
+ private constructor(data: APIApplicationRoleConnectionMetadata);
+ public name: string;
+ public nameLocalizations: LocalizationMap | null;
+ public description: string;
+ public descriptionLocalizations: LocalizationMap | null;
+ public key: string;
+ public type: ApplicationRoleConnectionMetadataType;
+}
+
+export type ApplicationResolvable = Application | Activity | Snowflake;
+
+export class ApplicationFlagsBitField extends BitField<ApplicationFlagsString> {
+ public static Flags: typeof ApplicationFlags;
+ public static resolve(bit?: BitFieldResolvable<ApplicationFlagsString, number>): number;
+}
+
+export type AutoModerationRuleResolvable = AutoModerationRule | Snowflake;
+
+export abstract class Base {
+ public constructor(client: Client<true>);
+ public readonly client: Client<true>;
+ public toJSON(...props: Record<string, boolean | string>[]): unknown;
+ public valueOf(): string;
+}
+
+export class BaseClient extends EventEmitter {
+ public constructor(options?: ClientOptions | WebhookClientOptions);
+ private decrementMaxListeners(): void;
+ private incrementMaxListeners(): void;
+
+ public options: ClientOptions | WebhookClientOptions;
+ public rest: REST;
+ public destroy(): void;
+ public toJSON(...props: Record<string, boolean | string>[]): unknown;
+}
+
+export type GuildCacheMessage<Cached extends CacheType> = CacheTypeReducer<
+ Cached,
+ Message<true>,
+ APIMessage,
+ Message | APIMessage,
+ Message | APIMessage
+>;
+
+export type BooleanCache<T extends CacheType> = T extends 'cached' ? true : false;
+
+export abstract class CommandInteraction<Cached extends CacheType = CacheType> extends BaseInteraction<Cached> {
+ public type: InteractionType.ApplicationCommand;
+ public get command(): ApplicationCommand | ApplicationCommand<{ guild: GuildResolvable }> | null;
+ public options: Omit<
+ CommandInteractionOptionResolver<Cached>,
+ | 'getMessage'
+ | 'getFocused'
+ | 'getMentionable'
+ | 'getRole'
+ | 'getAttachment'
+ | 'getNumber'
+ | 'getInteger'
+ | 'getString'
+ | 'getChannel'
+ | 'getBoolean'
+ | 'getSubcommandGroup'
+ | 'getSubcommand'
+ >;
+ public channelId: Snowflake;
+ public commandId: Snowflake;
+ public commandName: string;
+ public commandType: ApplicationCommandType;
+ public commandGuildId: Snowflake | null;
+ public deferred: boolean;
+ public ephemeral: boolean | null;
+ public replied: boolean;
+ public webhook: InteractionWebhook;
+ public inGuild(): this is CommandInteraction<'raw' | 'cached'>;
+ public inCachedGuild(): this is CommandInteraction<'cached'>;
+ public inRawGuild(): this is CommandInteraction<'raw'>;
+ public deferReply(
+ options: InteractionDeferReplyOptions & { fetchReply: true },
+ ): Promise<Message<BooleanCache<Cached>>>;
+ public deferReply(options?: InteractionDeferReplyOptions): Promise<InteractionResponse<BooleanCache<Cached>>>;
+ public deleteReply(message?: MessageResolvable | '@original'): Promise<void>;
+ public editReply(
+ options: string | MessagePayload | InteractionEditReplyOptions,
+ ): Promise<Message<BooleanCache<Cached>>>;
+ public fetchReply(message?: Snowflake | '@original'): Promise<Message<BooleanCache<Cached>>>;
+ public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message<BooleanCache<Cached>>>;
+ public reply(options: InteractionReplyOptions & { fetchReply: true }): Promise<Message<BooleanCache<Cached>>>;
+ public reply(
+ options: string | MessagePayload | InteractionReplyOptions,
+ ): Promise<InteractionResponse<BooleanCache<Cached>>>;
+ public showModal(
+ modal:
+ | JSONEncodable<APIModalInteractionResponseCallbackData>
+ | ModalComponentData
+ | APIModalInteractionResponseCallbackData,
+ ): Promise<void>;
+ public awaitModalSubmit(
+ options: AwaitModalSubmitOptions<ModalSubmitInteraction>,
+ ): Promise<ModalSubmitInteraction<Cached>>;
+ private transformOption(
+ option: APIApplicationCommandOption,
+ resolved: APIApplicationCommandInteractionData['resolved'],
+ ): CommandInteractionOption<Cached>;
+ private transformResolved(
+ resolved: APIApplicationCommandInteractionData['resolved'],
+ ): CommandInteractionResolvedData<Cached>;
+}
+
+export class InteractionResponse<Cached extends boolean = boolean> {
+ private constructor(interaction: Interaction, id?: Snowflake);
+ public interaction: Interaction<WrapBooleanCache<Cached>>;
+ public client: Client;
+ public id: Snowflake;
+ public get createdAt(): Date;
+ public get createdTimestamp(): number;
+ public awaitMessageComponent<T extends MessageComponentType>(
+ options?: AwaitMessageCollectorOptionsParams<T, Cached>,
+ ): Promise<MappedInteractionTypes<Cached>[T]>;
+ public createMessageComponentCollector<T extends MessageComponentType>(
+ options?: MessageCollectorOptionsParams<T, Cached>,
+ ): InteractionCollector<MappedInteractionTypes<Cached>[T]>;
+ public delete(): Promise<void>;
+ public edit(options: string | MessagePayload | WebhookMessageEditOptions): Promise<Message>;
+ public fetch(): Promise<Message>;
+}
+
+export abstract class BaseGuild extends Base {
+ protected constructor(client: Client<true>, data: RawBaseGuildData);
+ public get createdAt(): Date;
+ public get createdTimestamp(): number;
+ public features: `${GuildFeature}`[];
+ public icon: string | null;
+ public id: Snowflake;
+ public name: string;
+ public get nameAcronym(): string;
+ public get partnered(): boolean;
+ public get verified(): boolean;
+ public fetch(): Promise<Guild>;
+ public iconURL(options?: ImageURLOptions): string | null;
+ public toString(): string;
+}
+
+export class BaseGuildEmoji extends Emoji {
+ protected constructor(client: Client<true>, data: RawGuildEmojiData, guild: Guild | GuildPreview);
+ public available: boolean | null;
+ public get createdAt(): Date;
+ public get createdTimestamp(): number;
+ public guild: Guild | GuildPreview;
+ public id: Snowflake;
+ public managed: boolean | null;
+ public requiresColons: boolean | null;
+}
+
+export class BaseGuildTextChannel extends TextBasedChannelMixin(GuildChannel, true) {
+ protected constructor(guild: Guild, data?: RawGuildChannelData, client?: Client<true>, immediatePatch?: boolean);
+ public defaultAutoArchiveDuration?: ThreadAutoArchiveDuration;
+ public rateLimitPerUser: number | null;
+ public nsfw: boolean;
+ public threads: GuildTextThreadManager<AllowedThreadTypeForTextChannel | AllowedThreadTypeForNewsChannel>;
+ public topic: string | null;
+ public createInvite(options?: InviteCreateOptions): Promise<Invite>;
+ public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>;
+ public setDefaultAutoArchiveDuration(
+ defaultAutoArchiveDuration: ThreadAutoArchiveDuration,
+ reason?: string,
+ ): Promise<this>;
+ public setTopic(topic: string | null, reason?: string): Promise<this>;
+ public setType(type: ChannelType.GuildText, reason?: string): Promise<TextChannel>;
+ public setType(type: ChannelType.GuildAnnouncement, reason?: string): Promise<NewsChannel>;
+}
+
+export class BaseGuildVoiceChannel extends TextBasedChannelMixin(GuildChannel, true, [
+ 'lastPinTimestamp',
+ 'lastPinAt',
+]) {
+ public constructor(guild: Guild, data?: RawGuildChannelData);
+ public bitrate: number;
+ public get full(): boolean;
+ public get joinable(): boolean;
+ public get members(): Collection<Snowflake, GuildMember>;
+ public nsfw: boolean;
+ public rateLimitPerUser: number | null;
+ public rtcRegion: string | null;
+ public userLimit: number;
+ public videoQualityMode: VideoQualityMode | null;
+ public createInvite(options?: InviteCreateOptions): Promise<Invite>;
+ public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>;
+ public setBitrate(bitrate: number, reason?: string): Promise<this>;
+ public setRTCRegion(rtcRegion: string | null, reason?: string): Promise<this>;
+ public setUserLimit(userLimit: number, reason?: string): Promise<this>;
+ public setVideoQualityMode(videoQualityMode: VideoQualityMode, reason?: string): Promise<this>;
+}
+
+export type EnumLike<E, V> = Record<keyof E, V>;
+
+export class BitField<S extends string, N extends number | bigint = number> {
+ public constructor(bits?: BitFieldResolvable<S, N>);
+ public bitfield: N;
+ public add(...bits: BitFieldResolvable<S, N>[]): BitField<S, N>;
+ public any(bit: BitFieldResolvable<S, N>): boolean;
+ public equals(bit: BitFieldResolvable<S, N>): boolean;
+ public freeze(): Readonly<BitField<S, N>>;
+ public has(bit: BitFieldResolvable<S, N>): boolean;
+ public missing(bits: BitFieldResolvable<S, N>, ...hasParams: readonly unknown[]): S[];
+ public remove(...bits: BitFieldResolvable<S, N>[]): BitField<S, N>;
+ public serialize(...hasParams: readonly unknown[]): Record<S, boolean>;
+ public toArray(...hasParams: readonly unknown[]): S[];
+ public toJSON(): N extends number ? number : string;
+ public valueOf(): N;
+ public [Symbol.iterator](): IterableIterator<S>;
+ public static Flags: EnumLike<unknown, number | bigint>;
+ public static resolve(bit?: BitFieldResolvable<string, number | bigint>): number | bigint;
+}
+
+export class ButtonInteraction<Cached extends CacheType = CacheType> extends MessageComponentInteraction<Cached> {
+ private constructor(client: Client<true>, data: RawMessageButtonInteractionData);
+ public componentType: ComponentType.Button;
+ public get component(): CacheTypeReducer<
+ Cached,
+ ButtonComponent,
+ APIButtonComponent,
+ ButtonComponent | APIButtonComponent,
+ ButtonComponent | APIButtonComponent
+ >;
+ public inGuild(): this is ButtonInteraction<'raw' | 'cached'>;
+ public inCachedGuild(): this is ButtonInteraction<'cached'>;
+ public inRawGuild(): this is ButtonInteraction<'raw'>;
+}
+
+export type AnyComponent =
+ | APIMessageComponent
+ | APIModalComponent
+ | APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>;
+
+export class Component<T extends AnyComponent = AnyComponent> {
+ public readonly data: Readonly<T>;
+ public get type(): T['type'];
+ public toJSON(): T;
+ public equals(other: this | T): boolean;
+}
+
+export class ButtonComponent extends Component<APIButtonComponent> {
+ private constructor(data: APIButtonComponent);
+ public get style(): ButtonStyle;
+ public get label(): string | null;
+ public get emoji(): APIMessageComponentEmoji | null;
+ public get disabled(): boolean;
+ public get customId(): string | null;
+ public get url(): string | null;
+}
+
+export type ComponentEmojiResolvable = APIMessageComponentEmoji | string;
+
+export class ButtonBuilder extends BuilderButtonComponent {
+ public constructor(data?: Partial<ButtonComponentData> | Partial<APIButtonComponent>);
+ public static from(other: JSONEncodable<APIButtonComponent> | APIButtonComponent): ButtonBuilder;
+ public override setEmoji(emoji: ComponentEmojiResolvable): this;
+}
+
+export class StringSelectMenuBuilder extends BuilderStringSelectMenuComponent {
+ public constructor(data?: Partial<StringSelectMenuComponentData | APIStringSelectComponent>);
+ private static normalizeEmoji(
+ selectMenuOption: JSONEncodable<APISelectMenuOption> | SelectMenuComponentOptionData,
+ ): (APISelectMenuOption | StringSelectMenuOptionBuilder)[];
+ public override addOptions(
+ ...options: RestOrArray<BuildersSelectMenuOption | SelectMenuComponentOptionData | APISelectMenuOption>
+ ): this;
+ public override setOptions(
+ ...options: RestOrArray<BuildersSelectMenuOption | SelectMenuComponentOptionData | APISelectMenuOption>
+ ): this;
+ public static from(other: JSONEncodable<APISelectMenuComponent> | APISelectMenuComponent): StringSelectMenuBuilder;
+}
+
+export {
+ /** @deprecated Use {@link StringSelectMenuBuilder} instead */
+ StringSelectMenuBuilder as SelectMenuBuilder,
+ /** @deprecated Use {@link StringSelectMenuOptionBuilder} instead */
+ StringSelectMenuOptionBuilder as SelectMenuOptionBuilder,
+};
+
+export class UserSelectMenuBuilder extends BuilderUserSelectMenuComponent {
+ public constructor(data?: Partial<UserSelectMenuComponentData | APIUserSelectComponent>);
+ public static from(other: JSONEncodable<APISelectMenuComponent> | APISelectMenuComponent): UserSelectMenuBuilder;
+}
+
+export class RoleSelectMenuBuilder extends BuilderRoleSelectMenuComponent {
+ public constructor(data?: Partial<RoleSelectMenuComponentData | APIRoleSelectComponent>);
+ public static from(other: JSONEncodable<APISelectMenuComponent> | APISelectMenuComponent): RoleSelectMenuBuilder;
+}
+
+export class MentionableSelectMenuBuilder extends BuilderMentionableSelectMenuComponent {
+ public constructor(data?: Partial<MentionableSelectMenuComponentData | APIMentionableSelectComponent>);
+ public static from(
+ other: JSONEncodable<APISelectMenuComponent> | APISelectMenuComponent,
+ ): MentionableSelectMenuBuilder;
+}
+
+export class ChannelSelectMenuBuilder extends BuilderChannelSelectMenuComponent {
+ public constructor(data?: Partial<ChannelSelectMenuComponentData | APIChannelSelectComponent>);
+ public static from(other: JSONEncodable<APISelectMenuComponent> | APISelectMenuComponent): ChannelSelectMenuBuilder;
+}
+
+export class StringSelectMenuOptionBuilder extends BuildersSelectMenuOption {
+ public constructor(data?: SelectMenuComponentOptionData | APISelectMenuOption);
+ public override setEmoji(emoji: ComponentEmojiResolvable): this;
+ public static from(other: JSONEncodable<APISelectMenuOption> | APISelectMenuOption): StringSelectMenuOptionBuilder;
+}
+
+export class ModalBuilder extends BuildersModal {
+ public constructor(data?: Partial<ModalComponentData> | Partial<APIModalInteractionResponseCallbackData>);
+ public static from(other: JSONEncodable<APIModalComponent> | APIModalComponent): ModalBuilder;
+}
+
+export class TextInputBuilder extends BuilderTextInputComponent {
+ public constructor(data?: Partial<TextInputComponentData | APITextInputComponent>);
+ public static from(other: JSONEncodable<APITextInputComponent> | APITextInputComponent): TextInputBuilder;
+}
+
+export class TextInputComponent extends Component<APITextInputComponent> {
+ public get customId(): string;
+ public get value(): string;
+}
+
+export class BaseSelectMenuComponent<Data extends APISelectMenuComponent> extends Component<Data> {
+ protected constructor(data: Data);
+ public get placeholder(): string | null;
+ public get maxValues(): number | null;
+ public get minValues(): number | null;
+ public get customId(): string;
+ public get disabled(): boolean;
+}
+
+export class StringSelectMenuComponent extends BaseSelectMenuComponent<APIStringSelectComponent> {
+ public get options(): APISelectMenuOption[];
+}
+
+export {
+ /** @deprecated Use {@link StringSelectMenuComponent} instead */
+ StringSelectMenuComponent as SelectMenuComponent,
+};
+
+export class UserSelectMenuComponent extends BaseSelectMenuComponent<APIUserSelectComponent> {}
+
+export class RoleSelectMenuComponent extends BaseSelectMenuComponent<APIRoleSelectComponent> {}
+
+export class MentionableSelectMenuComponent extends BaseSelectMenuComponent<APIMentionableSelectComponent> {}
+
+export class ChannelSelectMenuComponent extends BaseSelectMenuComponent<APIChannelSelectComponent> {
+ public getChannelTypes(): ChannelType[] | null;
+}
+
+export interface EmbedData {
+ title?: string;
+ type?: EmbedType;
+ description?: string;
+ url?: string;
+ timestamp?: string | number | Date;
+ color?: number;
+ footer?: EmbedFooterData;
+ image?: EmbedAssetData;
+ thumbnail?: EmbedAssetData;
+ provider?: APIEmbedProvider;
+ author?: EmbedAuthorData;
+ fields?: APIEmbedField[];
+ video?: EmbedAssetData;
+}
+
+export interface IconData {
+ iconURL?: string;
+ proxyIconURL?: string;
+}
+
+export type EmbedAuthorData = Omit<APIEmbedAuthor, 'icon_url' | 'proxy_icon_url'> & IconData;
+
+export type EmbedFooterData = Omit<APIEmbedFooter, 'icon_url' | 'proxy_icon_url'> & IconData;
+
+export interface EmbedAssetData extends Omit<APIEmbedImage, 'proxy_url'> {
+ proxyURL?: string;
+}
+
+export class EmbedBuilder extends BuildersEmbed {
+ public constructor(data?: EmbedData | APIEmbed);
+ public override setColor(color: ColorResolvable | null): this;
+ public static from(other: JSONEncodable<APIEmbed> | APIEmbed): EmbedBuilder;
+ public get length(): number;
+}
+
+export class Embed {
+ private constructor(data: APIEmbed);
+ public readonly data: Readonly<APIEmbed>;
+ public get fields(): APIEmbedField[];
+ public get footer(): EmbedFooterData | null;
+ public get title(): string | null;
+ public get description(): string | null;
+ public get url(): string | null;
+ public get color(): number | null;
+ public get hexColor(): string | null;
+ public get timestamp(): string | null;
+ public get thumbnail(): EmbedAssetData | null;
+ public get image(): EmbedAssetData | null;
+ public get author(): EmbedAuthorData | null;
+ public get provider(): APIEmbedProvider | null;
+ public get video(): EmbedAssetData | null;
+ public get length(): number;
+ public equals(other: Embed | APIEmbed): boolean;
+ public toJSON(): APIEmbed;
+}
+
+export interface MappedChannelCategoryTypes {
+ [ChannelType.GuildAnnouncement]: NewsChannel;
+ [ChannelType.GuildVoice]: VoiceChannel;
+ [ChannelType.GuildText]: TextChannel;
+ [ChannelType.GuildStageVoice]: StageChannel;
+ [ChannelType.GuildForum]: ForumChannel;
+}
+
+export type CategoryChannelType = Exclude<
+ ChannelType,
+ | ChannelType.DM
+ | ChannelType.GroupDM
+ | ChannelType.PublicThread
+ | ChannelType.AnnouncementThread
+ | ChannelType.PrivateThread
+ | ChannelType.GuildCategory
+ | ChannelType.GuildDirectory
+>;
+
+export class CategoryChannel extends GuildChannel {
+ public get children(): CategoryChannelChildManager;
+ public type: ChannelType.GuildCategory;
+ public get parent(): null;
+ public parentId: null;
+}
+
+export type CategoryChannelResolvable = Snowflake | CategoryChannel;
+
+export type ChannelFlagsString = keyof typeof ChannelFlags;
+
+export type ChannelFlagsResolvable = BitFieldResolvable<ChannelFlagsString, number>;
+
+export class ChannelFlagsBitField extends BitField<ChannelFlagsString> {
+ public static Flags: typeof ChannelFlags;
+ public static resolve(bit?: BitFieldResolvable<ChannelFlagsString, ChannelFlags>): number;
+}
+
+export abstract class BaseChannel extends Base {
+ public constructor(client: Client<true>, data?: RawChannelData, immediatePatch?: boolean);
+ public get createdAt(): Date | null;
+ public get createdTimestamp(): number | null;
+ public id: Snowflake;
+ public flags: Readonly<ChannelFlagsBitField> | null;
+ public get partial(): false;
+ public type: ChannelType;
+ public get url(): string;
+ public delete(): Promise<this>;
+ public fetch(force?: boolean): Promise<this>;
+ public isThread(): this is AnyThreadChannel;
+ public isTextBased(): this is TextBasedChannel;
+ public isDMBased(): this is PartialGroupDMChannel | DMChannel | PartialDMChannel;
+ public isVoiceBased(): this is VoiceBasedChannel;
+ public toString(): ChannelMention | UserMention;
+}
+
+export type If<T extends boolean, A, B = null> = T extends true ? A : T extends false ? B : A | B;
+
+export class Client<Ready extends boolean = boolean> extends BaseClient {
+ public constructor(options: ClientOptions);
+ private actions: unknown;
+ private presence: ClientPresence;
+ private _eval(script: string): unknown;
+ private _validateOptions(options: ClientOptions): void;
+ private get _censoredToken(): string | null;
+
+ public application: If<Ready, ClientApplication>;
+ public channels: ChannelManager;
+ public get emojis(): BaseGuildEmojiManager;
+ public guilds: GuildManager;
+ public options: Omit<ClientOptions, 'intents'> & { intents: IntentsBitField };
+ public get readyAt(): If<Ready, Date>;
+ public readyTimestamp: If<Ready, number>;
+ public sweepers: Sweepers;
+ public shard: ShardClientUtil | null;
+ public token: If<Ready, string, string | null>;
+ public get uptime(): If<Ready, number>;
+ public user: If<Ready, ClientUser>;
+ public users: UserManager;
+ public voice: ClientVoiceManager;
+ public ws: WebSocketManager;
+ public destroy(): Promise<void>;
+ public deleteWebhook(id: Snowflake, options?: WebhookDeleteOptions): Promise<void>;
+ public fetchGuildPreview(guild: GuildResolvable): Promise<GuildPreview>;
+ public fetchInvite(invite: InviteResolvable, options?: ClientFetchInviteOptions): Promise<Invite>;
+ public fetchGuildTemplate(template: GuildTemplateResolvable): Promise<GuildTemplate>;
+ public fetchVoiceRegions(): Promise<Collection<string, VoiceRegion>>;
+ public fetchSticker(id: Snowflake): Promise<Sticker>;
+ public fetchPremiumStickerPacks(): Promise<Collection<Snowflake, StickerPack>>;
+ public fetchWebhook(id: Snowflake, token?: string): Promise<Webhook>;
+ public fetchGuildWidget(guild: GuildResolvable): Promise<Widget>;
+ public generateInvite(options?: InviteGenerationOptions): string;
+ public login(token?: string): Promise<string>;
+ public isReady(): this is Client<true>;
+ public toJSON(): unknown;
+
+ public on<K extends keyof ClientEvents>(event: K, listener: (...args: ClientEvents[K]) => Awaitable<void>): this;
+ public on<S extends string | symbol>(
+ event: Exclude<S, keyof ClientEvents>,
+ listener: (...args: any[]) => Awaitable<void>,
+ ): this;
+
+ public once<K extends keyof ClientEvents>(event: K, listener: (...args: ClientEvents[K]) => Awaitable<void>): this;
+ public once<S extends string | symbol>(
+ event: Exclude<S, keyof ClientEvents>,
+ listener: (...args: any[]) => Awaitable<void>,
+ ): this;
+
+ public emit<K extends keyof ClientEvents>(event: K, ...args: ClientEvents[K]): boolean;
+ public emit<S extends string | symbol>(event: Exclude<S, keyof ClientEvents>, ...args: unknown[]): boolean;
+
+ public off<K extends keyof ClientEvents>(event: K, listener: (...args: ClientEvents[K]) => Awaitable<void>): this;
+ public off<S extends string | symbol>(
+ event: Exclude<S, keyof ClientEvents>,
+ listener: (...args: any[]) => Awaitable<void>,
+ ): this;
+
+ public removeAllListeners<K extends keyof ClientEvents>(event?: K): this;
+ public removeAllListeners<S extends string | symbol>(event?: Exclude<S, keyof ClientEvents>): this;
+}
+
+export class ClientApplication extends Application {
+ private constructor(client: Client<true>, data: RawClientApplicationData);
+ public botPublic: boolean | null;
+ public botRequireCodeGrant: boolean | null;
+ public commands: ApplicationCommandManager;
+ public guildId: Snowflake | null;
+ public get guild(): Guild | null;
+ public cover: string | null;
+ public flags: Readonly<ApplicationFlagsBitField>;
+ public approximateGuildCount: number | null;
+ public tags: string[];
+ public installParams: ClientApplicationInstallParams | null;
+ public customInstallURL: string | null;
+ public owner: User | Team | null;
+ public get partial(): boolean;
+ public roleConnectionsVerificationURL: string | null;
+ public rpcOrigins: string[];
+ public fetch(): Promise<ClientApplication>;
+ public fetchRoleConnectionMetadataRecords(): Promise<ApplicationRoleConnectionMetadata[]>;
+ public editRoleConnectionMetadataRecords(
+ records: ApplicationRoleConnectionMetadataEditOptions[],
+ ): Promise<ApplicationRoleConnectionMetadata[]>;
+}
+
+export class ClientPresence extends Presence {
+ private constructor(client: Client<true>, data: RawPresenceData);
+ private _parse(data: PresenceData): RawPresenceData;
+
+ public set(presence: PresenceData): ClientPresence;
+}
+
+export class ClientUser extends User {
+ public mfaEnabled: boolean;
+ public get presence(): ClientPresence;
+ public verified: boolean;
+ public edit(options: ClientUserEditOptions): Promise<this>;
+ public setActivity(options?: ActivityOptions): ClientPresence;
+ public setActivity(name: string, options?: Omit<ActivityOptions, 'name'>): ClientPresence;
+ public setAFK(afk?: boolean, shardId?: number | number[]): ClientPresence;
+ public setAvatar(avatar: BufferResolvable | Base64Resolvable | null): Promise<this>;
+ public setPresence(data: PresenceData): ClientPresence;
+ public setStatus(status: PresenceStatusData, shardId?: number | number[]): ClientPresence;
+ public setUsername(username: string): Promise<this>;
+}
+
+export class Options extends null {
+ private constructor();
+ private static userAgentAppendix: string;
+ public static get DefaultMakeCacheSettings(): CacheWithLimitsOptions;
+ public static get DefaultSweeperSettings(): SweeperOptions;
+ public static createDefault(): ClientOptions;
+ public static cacheWithLimits(settings?: CacheWithLimitsOptions): CacheFactory;
+ public static cacheEverything(): CacheFactory;
+}
+
+export class ClientVoiceManager {
+ private constructor(client: Client);
+ public readonly client: Client;
+ public adapters: Map<Snowflake, InternalDiscordGatewayAdapterLibraryMethods>;
+}
+
+export { Collection } from '@discordjs/collection';
+
+export interface CollectorEventTypes<K, V, F extends unknown[] = []> {
+ collect: [V, ...F];
+ ignore: [V, ...F];
+ dispose: [V, ...F];
+ end: [collected: Collection<K, V>, reason: string];
+}
+
+export abstract class Collector<K, V, F extends unknown[] = []> extends EventEmitter {
+ protected constructor(client: Client<true>, options?: CollectorOptions<[V, ...F]>);
+ private _timeout: NodeJS.Timeout | null;
+ private _idletimeout: NodeJS.Timeout | null;
+ private _endReason: string | null;
+
+ public readonly client: Client;
+ public collected: Collection<K, V>;
+ public lastCollectedTimestamp: number | null;
+ public get lastCollectedAt(): Date | null;
+ public ended: boolean;
+ public get endReason(): string | null;
+ public filter: CollectorFilter<[V, ...F]>;
+ public get next(): Promise<V>;
+ public options: CollectorOptions<[V, ...F]>;
+ public checkEnd(): boolean;
+ public handleCollect(...args: unknown[]): Promise<void>;
+ public handleDispose(...args: unknown[]): Promise<void>;
+ public stop(reason?: string): void;
+ public resetTimer(options?: CollectorResetTimerOptions): void;
+ public [Symbol.asyncIterator](): AsyncIterableIterator<[V, ...F]>;
+ public toJSON(): unknown;
+
+ protected listener: (...args: any[]) => void;
+ public abstract collect(...args: unknown[]): K | null | Promise<K | null>;
+ public abstract dispose(...args: unknown[]): K | null;
+
+ public on<EventKey extends keyof CollectorEventTypes<K, V, F>>(
+ event: EventKey,
+ listener: (...args: CollectorEventTypes<K, V, F>[EventKey]) => Awaitable<void>,
+ ): this;
+
+ public once<EventKey extends keyof CollectorEventTypes<K, V, F>>(
+ event: EventKey,
+ listener: (...args: CollectorEventTypes<K, V, F>[EventKey]) => Awaitable<void>,
+ ): this;
+}
+
+export class ChatInputCommandInteraction<Cached extends CacheType = CacheType> extends CommandInteraction<Cached> {
+ public commandType: ApplicationCommandType.ChatInput;
+ public options: Omit<CommandInteractionOptionResolver<Cached>, 'getMessage' | 'getFocused'>;
+ public inGuild(): this is ChatInputCommandInteraction<'raw' | 'cached'>;
+ public inCachedGuild(): this is ChatInputCommandInteraction<'cached'>;
+ public inRawGuild(): this is ChatInputCommandInteraction<'raw'>;
+ public toString(): string;
+}
+
+export class AutocompleteInteraction<Cached extends CacheType = CacheType> extends BaseInteraction<Cached> {
+ public type: InteractionType.ApplicationCommandAutocomplete;
+ public get command(): ApplicationCommand | ApplicationCommand<{ guild: GuildResolvable }> | null;
+ public channelId: Snowflake;
+ public commandId: Snowflake;
+ public commandName: string;
+ public commandType: ApplicationCommandType.ChatInput;
+ public commandGuildId: Snowflake | null;
+ public responded: boolean;
+ public options: Omit<
+ CommandInteractionOptionResolver<Cached>,
+ 'getMessage' | 'getUser' | 'getAttachment' | 'getChannel' | 'getMember' | 'getMentionable' | 'getRole'
+ >;
+ public inGuild(): this is AutocompleteInteraction<'raw' | 'cached'>;
+ public inCachedGuild(): this is AutocompleteInteraction<'cached'>;
+ public inRawGuild(): this is AutocompleteInteraction<'raw'>;
+ public respond(options: ApplicationCommandOptionChoiceData[]): Promise<void>;
+}
+
+export class CommandInteractionOptionResolver<Cached extends CacheType = CacheType> {
+ private constructor(
+ client: Client<true>,
+ options: CommandInteractionOption[],
+ resolved: CommandInteractionResolvedData,
+ );
+ public readonly client: Client;
+ public readonly data: readonly CommandInteractionOption<Cached>[];
+ public readonly resolved: Readonly<CommandInteractionResolvedData<Cached>> | null;
+ private _group: string | null;
+ private _hoistedOptions: CommandInteractionOption<Cached>[];
+ private _subcommand: string | null;
+ private _getTypedOption(
+ name: string,
+ allowedTypes: ApplicationCommandOptionType[],
+ properties: (keyof ApplicationCommandOption)[],
+ required: true,
+ ): CommandInteractionOption<Cached>;
+ private _getTypedOption(
+ name: string,
+ allowedTypes: ApplicationCommandOptionType[],
+ properties: (keyof ApplicationCommandOption)[],
+ required: boolean,
+ ): CommandInteractionOption<Cached> | null;
+
+ public get(name: string, required: true): CommandInteractionOption<Cached>;
+ public get(name: string, required?: boolean): CommandInteractionOption<Cached> | null;
+
+ public getSubcommand(required?: true): string;
+ public getSubcommand(required: boolean): string | null;
+ public getSubcommandGroup(required: true): string;
+ public getSubcommandGroup(required?: boolean): string | null;
+ public getBoolean(name: string, required: true): boolean;
+ public getBoolean(name: string, required?: boolean): boolean | null;
+ public getChannel<const T extends ChannelType = ChannelType>(
+ name: string,
+ required: true,
+ channelTypes?: readonly T[],
+ ): Extract<
+ NonNullable<CommandInteractionOption<Cached>['channel']>,
+ {
+ // The `type` property of the PublicThreadChannel class is typed as `ChannelType.PublicThread | ChannelType.AnnouncementThread`
+ // If the user only passed one of those channel types, the Extract<> would have resolved to `never`
+ // Hence the need for this ternary
+ type: T extends ChannelType.PublicThread | ChannelType.AnnouncementThread
+ ? ChannelType.PublicThread | ChannelType.AnnouncementThread
+ : T;
+ }
+ >;
+ public getChannel<const T extends ChannelType = ChannelType>(
+ name: string,
+ required?: boolean,
+ channelTypes?: readonly T[],
+ ): Extract<
+ NonNullable<CommandInteractionOption<Cached>['channel']>,
+ {
+ // The `type` property of the PublicThreadChannel class is typed as `ChannelType.PublicThread | ChannelType.AnnouncementThread`
+ // If the user only passed one of those channel types, the Extract<> would have resolved to `never`
+ // Hence the need for this ternary
+ type: T extends ChannelType.PublicThread | ChannelType.AnnouncementThread
+ ? ChannelType.PublicThread | ChannelType.AnnouncementThread
+ : T;
+ }
+ > | null;
+ public getString(name: string, required: true): string;
+ public getString(name: string, required?: boolean): string | null;
+ public getInteger(name: string, required: true): number;
+ public getInteger(name: string, required?: boolean): number | null;
+ public getNumber(name: string, required: true): number;
+ public getNumber(name: string, required?: boolean): number | null;
+ public getUser(name: string, required: true): NonNullable<CommandInteractionOption<Cached>['user']>;
+ public getUser(name: string, required?: boolean): NonNullable<CommandInteractionOption<Cached>['user']> | null;
+ public getMember(name: string): NonNullable<CommandInteractionOption<Cached>['member']> | null;
+ public getRole(name: string, required: true): NonNullable<CommandInteractionOption<Cached>['role']>;
+ public getRole(name: string, required?: boolean): NonNullable<CommandInteractionOption<Cached>['role']> | null;
+ public getAttachment(name: string, required: true): NonNullable<CommandInteractionOption<Cached>['attachment']>;
+ public getAttachment(
+ name: string,
+ required?: boolean,
+ ): NonNullable<CommandInteractionOption<Cached>['attachment']> | null;
+ public getMentionable(
+ name: string,
+ required: true,
+ ): NonNullable<CommandInteractionOption<Cached>['member' | 'role' | 'user']>;
+ public getMentionable(
+ name: string,
+ required?: boolean,
+ ): NonNullable<CommandInteractionOption<Cached>['member' | 'role' | 'user']> | null;
+ public getMessage(name: string, required: true): NonNullable<CommandInteractionOption<Cached>['message']>;
+ public getMessage(name: string, required?: boolean): NonNullable<CommandInteractionOption<Cached>['message']> | null;
+ public getFocused(getFull: true): AutocompleteFocusedOption;
+ public getFocused(getFull?: boolean): string;
+}
+
+export class ContextMenuCommandInteraction<Cached extends CacheType = CacheType> extends CommandInteraction<Cached> {
+ public commandType: ApplicationCommandType.Message | ApplicationCommandType.User;
+ public options: Omit<
+ CommandInteractionOptionResolver<Cached>,
+ | 'getFocused'
+ | 'getMentionable'
+ | 'getRole'
+ | 'getNumber'
+ | 'getInteger'
+ | 'getString'
+ | 'getChannel'
+ | 'getBoolean'
+ | 'getSubcommandGroup'
+ | 'getSubcommand'
+ >;
+ public targetId: Snowflake;
+ public inGuild(): this is ContextMenuCommandInteraction<'raw' | 'cached'>;
+ public inCachedGuild(): this is ContextMenuCommandInteraction<'cached'>;
+ public inRawGuild(): this is ContextMenuCommandInteraction<'raw'>;
+ private resolveContextMenuOptions(data: APIApplicationCommandInteractionData): CommandInteractionOption<Cached>[];
+}
+
+export interface ResolvedFile {
+ data: Buffer;
+ contentType?: string;
+}
+
+export class DataResolver extends null {
+ private constructor();
+ public static resolveBase64(data: Base64Resolvable): string;
+ public static resolveCode(data: string, regex: RegExp): string;
+ public static resolveFile(resource: BufferResolvable | Stream): Promise<ResolvedFile>;
+ public static resolveImage(resource: BufferResolvable | Base64Resolvable): Promise<string | null>;
+ public static resolveInviteCode(data: InviteResolvable): string;
+ public static resolveGuildTemplateCode(data: GuildTemplateResolvable): string;
+}
+
+export class DMChannel extends TextBasedChannelMixin(BaseChannel, false, [
+ 'bulkDelete',
+ 'fetchWebhooks',
+ 'createWebhook',
+ 'setRateLimitPerUser',
+ 'setNSFW',
+]) {
+ private constructor(client: Client<true>, data?: RawDMChannelData);
+ public flags: Readonly<ChannelFlagsBitField>;
+ public recipientId: Snowflake;
+ public get recipient(): User | null;
+ public type: ChannelType.DM;
+ public fetch(force?: boolean): Promise<this>;
+ public toString(): UserMention;
+}
+
+export class Emoji extends Base {
+ protected constructor(client: Client<true>, emoji: RawEmojiData);
+ public animated: boolean | null;
+ public get createdAt(): Date | null;
+ public get createdTimestamp(): number | null;
+ public id: Snowflake | null;
+ public name: string | null;
+ public get identifier(): string;
+ public get url(): string | null;
+ public toJSON(): unknown;
+ public toString(): string;
+}
+
+export class Guild extends AnonymousGuild {
+ private constructor(client: Client<true>, data: RawGuildData);
+ private _sortedRoles(): Collection<Snowflake, Role>;
+ private _sortedChannels(channel: NonThreadGuildBasedChannel): Collection<Snowflake, NonThreadGuildBasedChannel>;
+
+ public get afkChannel(): VoiceChannel | null;
+ public afkChannelId: Snowflake | null;
+ public afkTimeout: number;
+ public applicationId: Snowflake | null;
+ public maxVideoChannelUsers: number | null;
+ public approximateMemberCount: number | null;
+ public approximatePresenceCount: number | null;
+ public autoModerationRules: AutoModerationRuleManager;
+ public available: boolean;
+ public bans: GuildBanManager;
+ public channels: GuildChannelManager;
+ public commands: GuildApplicationCommandManager;
+ public defaultMessageNotifications: GuildDefaultMessageNotifications;
+ public discoverySplash: string | null;
+ public emojis: GuildEmojiManager;
+ public explicitContentFilter: GuildExplicitContentFilter;
+ public invites: GuildInviteManager;
+ public get joinedAt(): Date;
+ public joinedTimestamp: number;
+ public large: boolean;
+ public maximumMembers: number | null;
+ public maximumPresences: number | null;
+ public maxStageVideoChannelUsers: number | null;
+ public memberCount: number;
+ public members: GuildMemberManager;
+ public mfaLevel: GuildMFALevel;
+ public ownerId: Snowflake;
+ public preferredLocale: Locale;
+ public premiumProgressBarEnabled: boolean;
+ public premiumTier: GuildPremiumTier;
+ public presences: PresenceManager;
+ public get publicUpdatesChannel(): TextChannel | null;
+ public publicUpdatesChannelId: Snowflake | null;
+ public roles: RoleManager;
+ public get rulesChannel(): TextChannel | null;
+ public rulesChannelId: Snowflake | null;
+ public get safetyAlertsChannel(): TextChannel | null;
+ public safetyAlertsChannelId: Snowflake | null;
+ public scheduledEvents: GuildScheduledEventManager;
+ public get shard(): WebSocketShard;
+ public shardId: number;
+ public stageInstances: StageInstanceManager;
+ public stickers: GuildStickerManager;
+ public get systemChannel(): TextChannel | null;
+ public systemChannelFlags: Readonly<SystemChannelFlagsBitField>;
+ public systemChannelId: Snowflake | null;
+ public vanityURLUses: number | null;
+ public get voiceAdapterCreator(): InternalDiscordGatewayAdapterCreator;
+ public voiceStates: VoiceStateManager;
+ public get widgetChannel(): TextChannel | NewsChannel | VoiceBasedChannel | ForumChannel | null;
+ public widgetChannelId: Snowflake | null;
+ public widgetEnabled: boolean | null;
+ public get maximumBitrate(): number;
+ public createTemplate(name: string, description?: string): Promise<GuildTemplate>;
+ public delete(): Promise<Guild>;
+ public discoverySplashURL(options?: ImageURLOptions): string | null;
+ public edit(options: GuildEditOptions): Promise<Guild>;
+ public editWelcomeScreen(options: WelcomeScreenEditOptions): Promise<WelcomeScreen>;
+ public equals(guild: Guild): boolean;
+ public fetchAuditLogs<T extends GuildAuditLogsResolvable = null>(
+ options?: GuildAuditLogsFetchOptions<T>,
+ ): Promise<GuildAuditLogs<T>>;
+ public fetchIntegrations(): Promise<Collection<Snowflake | string, Integration>>;
+ public fetchOnboarding(): Promise<GuildOnboarding>;
+ public fetchOwner(options?: BaseFetchOptions): Promise<GuildMember>;
+ public fetchPreview(): Promise<GuildPreview>;
+ public fetchTemplates(): Promise<Collection<GuildTemplate['code'], GuildTemplate>>;
+ public fetchVanityData(): Promise<Vanity>;
+ public fetchWebhooks(): Promise<Collection<Snowflake, Webhook>>;
+ public fetchWelcomeScreen(): Promise<WelcomeScreen>;
+ public fetchWidget(): Promise<Widget>;
+ public fetchWidgetSettings(): Promise<GuildWidgetSettings>;
+ public leave(): Promise<Guild>;
+ public disableInvites(disabled?: boolean): Promise<Guild>;
+ public setAFKChannel(afkChannel: VoiceChannelResolvable | null, reason?: string): Promise<Guild>;
+ public setAFKTimeout(afkTimeout: number, reason?: string): Promise<Guild>;
+ public setBanner(banner: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>;
+ public setDefaultMessageNotifications(
+ defaultMessageNotifications: GuildDefaultMessageNotifications | null,
+ reason?: string,
+ ): Promise<Guild>;
+ public setDiscoverySplash(
+ discoverySplash: BufferResolvable | Base64Resolvable | null,
+ reason?: string,
+ ): Promise<Guild>;
+ public setExplicitContentFilter(
+ explicitContentFilter: GuildExplicitContentFilter | null,
+ reason?: string,
+ ): Promise<Guild>;
+ public setIcon(icon: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>;
+ public setName(name: string, reason?: string): Promise<Guild>;
+ public setOwner(owner: GuildMemberResolvable, reason?: string): Promise<Guild>;
+ public setPreferredLocale(preferredLocale: Locale | null, reason?: string): Promise<Guild>;
+ public setPublicUpdatesChannel(publicUpdatesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
+ public setRulesChannel(rulesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
+ public setSafetyAlertsChannel(safetyAlertsChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
+ public setSplash(splash: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>;
+ public setSystemChannel(systemChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
+ public setSystemChannelFlags(systemChannelFlags: SystemChannelFlagsResolvable, reason?: string): Promise<Guild>;
+ public setVerificationLevel(verificationLevel: GuildVerificationLevel | null, reason?: string): Promise<Guild>;
+ public setPremiumProgressBarEnabled(enabled?: boolean, reason?: string): Promise<Guild>;
+ public setWidgetSettings(settings: GuildWidgetSettingsData, reason?: string): Promise<Guild>;
+ public setMFALevel(level: GuildMFALevel, reason?: string): Promise<Guild>;
+ public toJSON(): unknown;
+}
+
+export class GuildAuditLogs<T extends GuildAuditLogsResolvable = AuditLogEvent> {
+ private constructor(guild: Guild, data: RawGuildAuditLogData);
+ private applicationCommands: Collection<Snowflake, ApplicationCommand>;
+ private webhooks: Collection<Snowflake, Webhook>;
+ private integrations: Collection<Snowflake | string, Integration>;
+ private guildScheduledEvents: Collection<Snowflake, GuildScheduledEvent>;
+ private autoModerationRules: Collection<Snowflake, AutoModerationRule>;
+ public entries: Collection<Snowflake, GuildAuditLogsEntry<T>>;
+ public toJSON(): unknown;
+}
+
+export class GuildAuditLogsEntry<
+ TAction extends GuildAuditLogsResolvable = AuditLogEvent,
+ TActionType extends GuildAuditLogsActionType = TAction extends keyof GuildAuditLogsTypes
+ ? GuildAuditLogsTypes[TAction][1]
+ : GuildAuditLogsActionType,
+ TTargetType extends GuildAuditLogsTargetType = TAction extends keyof GuildAuditLogsTypes
+ ? GuildAuditLogsTypes[TAction][0]
+ : GuildAuditLogsTargetType,
+ TResolvedType = TAction extends null ? AuditLogEvent : TAction,
+> {
+ private constructor(guild: Guild, data: RawGuildAuditLogEntryData, logs?: GuildAuditLogs);
+ public static Targets: GuildAuditLogsTargets;
+ public action: TResolvedType;
+ public actionType: TActionType;
+ public changes: AuditLogChange[];
+ public get createdAt(): Date;
+ public get createdTimestamp(): number;
+ public executorId: Snowflake | null;
+ public executor: User | null;
+ public extra: TResolvedType extends keyof GuildAuditLogsEntryExtraField
+ ? GuildAuditLogsEntryExtraField[TResolvedType]
+ : null;
+ public id: Snowflake;
+ public reason: string | null;
+ public targetId: Snowflake | null;
+ public target: TTargetType extends keyof GuildAuditLogsEntryTargetField<TActionType>
+ ? GuildAuditLogsEntryTargetField<TActionType>[TTargetType]
+ : Role | GuildEmoji | { id: Snowflake } | null;
+ public targetType: TTargetType;
+ public static actionType(action: AuditLogEvent): GuildAuditLogsActionType;
+ public static targetType(target: AuditLogEvent): GuildAuditLogsTargetType;
+ public toJSON(): unknown;
+}
+
+export class GuildBan extends Base {
+ private constructor(client: Client<true>, data: RawGuildBanData, guild: Guild);
+ public guild: Guild;
+ public user: User;
+ public get partial(): boolean;
+ public reason?: string | null;
+ public fetch(force?: boolean): Promise<GuildBan>;
+}
+
+export abstract class GuildChannel extends BaseChannel {
+ public constructor(guild: Guild, data?: RawGuildChannelData, client?: Client<true>, immediatePatch?: boolean);
+ private memberPermissions(member: GuildMember, checkAdmin: boolean): Readonly<PermissionsBitField>;
+ private rolePermissions(role: Role, checkAdmin: boolean): Readonly<PermissionsBitField>;
+ public get createdAt(): Date;
+ public get createdTimestamp(): number;
+ public get deletable(): boolean;
+ public flags: Readonly<ChannelFlagsBitField>;
+ public guild: Guild;
+ public guildId: Snowflake;
+ public get manageable(): boolean;
+ public get members(): Collection<Snowflake, GuildMember>;
+ public name: string;
+ public get parent(): CategoryChannel | null;
+ public parentId: Snowflake | null;
+ public permissionOverwrites: PermissionOverwriteManager;
+ public get permissionsLocked(): boolean | null;
+ public get position(): number;
+ public rawPosition: number;
+ public type: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>;
+ public get viewable(): boolean;
+ public clone(options?: GuildChannelCloneOptions): Promise<this>;
+ public delete(reason?: string): Promise<this>;
+ public edit(options: GuildChannelEditOptions): Promise<this>;
+ public equals(channel: GuildChannel): boolean;
+ public lockPermissions(): Promise<this>;
+ public permissionsFor(memberOrRole: GuildMember | Role, checkAdmin?: boolean): Readonly<PermissionsBitField>;
+ public permissionsFor(
+ memberOrRole: GuildMemberResolvable | RoleResolvable,
+ checkAdmin?: boolean,
+ ): Readonly<PermissionsBitField> | null;
+ public setName(name: string, reason?: string): Promise<this>;
+ public setParent(channel: CategoryChannelResolvable | null, options?: SetParentOptions): Promise<this>;
+ public setPosition(position: number, options?: SetChannelPositionOptions): Promise<this>;
+ public isTextBased(): this is GuildBasedChannel & TextBasedChannel;
+ public toString(): ChannelMention;
+}
+
+export class GuildEmoji extends BaseGuildEmoji {
+ private constructor(client: Client<true>, data: RawGuildEmojiData, guild: Guild);
+ private _roles: Snowflake[];
+
+ public get deletable(): boolean;
+ public guild: Guild;
+ public author: User | null;
+ public get roles(): GuildEmojiRoleManager;
+ public get url(): string;
+ public delete(reason?: string): Promise<GuildEmoji>;
+ public edit(options: GuildEmojiEditOptions): Promise<GuildEmoji>;
+ public equals(other: GuildEmoji | unknown): boolean;
+ public fetchAuthor(): Promise<User>;
+ public setName(name: string, reason?: string): Promise<GuildEmoji>;
+}
+
+export type GuildMemberFlagsString = keyof typeof GuildMemberFlags;
+
+export type GuildMemberFlagsResolvable = BitFieldResolvable<GuildMemberFlagsString, number>;
+
+export class GuildMemberFlagsBitField extends BitField<GuildMemberFlagsString> {
+ public static Flags: GuildMemberFlags;
+ public static resolve(bit?: BitFieldResolvable<GuildMemberFlagsString, GuildMemberFlags>): number;
+}
+
+export class GuildMember extends PartialTextBasedChannel(Base) {
+ private constructor(client: Client<true>, data: RawGuildMemberData, guild: Guild);
+ private _roles: Snowflake[];
+ public avatar: string | null;
+ public get bannable(): boolean;
+ public get dmChannel(): DMChannel | null;
+ public get displayColor(): number;
+ public get displayHexColor(): HexColorString;
+ public get displayName(): string;
+ public guild: Guild;
+ public get id(): Snowflake;
+ public pending: boolean;
+ public get communicationDisabledUntil(): Date | null;
+ public communicationDisabledUntilTimestamp: number | null;
+ public flags: Readonly<GuildMemberFlagsBitField>;
+ public get joinedAt(): Date | null;
+ public joinedTimestamp: number | null;
+ public get kickable(): boolean;
+ public get manageable(): boolean;
+ public get moderatable(): boolean;
+ public nickname: string | null;
+ public get partial(): false;
+ public get permissions(): Readonly<PermissionsBitField>;
+ public get premiumSince(): Date | null;
+ public premiumSinceTimestamp: number | null;
+ public get presence(): Presence | null;
+ public get roles(): GuildMemberRoleManager;
+ public user: User;
+ public get voice(): VoiceState;
+ public avatarURL(options?: ImageURLOptions): string | null;
+ public ban(options?: BanOptions): Promise<GuildMember>;
+ public disableCommunicationUntil(timeout: DateResolvable | null, reason?: string): Promise<GuildMember>;
+ public timeout(timeout: number | null, reason?: string): Promise<GuildMember>;
+ public fetch(force?: boolean): Promise<GuildMember>;
+ public createDM(force?: boolean): Promise<DMChannel>;
+ public deleteDM(): Promise<DMChannel>;
+ public displayAvatarURL(options?: ImageURLOptions): string;
+ public edit(options: GuildMemberEditOptions): Promise<GuildMember>;
+ public isCommunicationDisabled(): this is GuildMember & {
+ communicationDisabledUntilTimestamp: number;
+ readonly communicationDisabledUntil: Date;
+ };
+ public kick(reason?: string): Promise<GuildMember>;
+ public permissionsIn(channel: GuildChannelResolvable): Readonly<PermissionsBitField>;
+ public setFlags(flags: GuildMemberFlagsResolvable, reason?: string): Promise<GuildMember>;
+ public setNickname(nickname: string | null, reason?: string): Promise<GuildMember>;
+ public toJSON(): unknown;
+ public toString(): UserMention;
+ public valueOf(): string;
+}
+
+export class GuildOnboarding extends Base {
+ private constructor(client: Client, data: RESTGetAPIGuildOnboardingResult);
+ public get guild(): Guild;
+ public guildId: Snowflake;
+ public prompts: Collection<Snowflake, GuildOnboardingPrompt>;
+ public defaultChannels: Collection<Snowflake, GuildChannel>;
+ public enabled: boolean;
+}
+
+export class GuildOnboardingPrompt extends Base {
+ private constructor(client: Client, data: APIGuildOnboardingPrompt, guildId: Snowflake);
+ public id: Snowflake;
+ public get guild(): Guild;
+ public guildId: Snowflake;
+ public options: Collection<Snowflake, GuildOnboardingPromptOption>;
+ public title: string;
+ public singleSelect: boolean;
+ public required: boolean;
+ public inOnboarding: boolean;
+ public type: GuildOnboardingPromptType;
+}
+
+export class GuildOnboardingPromptOption extends Base {
+ private constructor(client: Client, data: APIGuildOnboardingPromptOption, guildId: Snowflake);
+ public id: Snowflake;
+ public get guild(): Guild;
+ public guildId: Snowflake;
+ public channels: Collection<Snowflake, GuildChannel>;
+ public roles: Collection<Snowflake, Role>;
+ public emoji: GuildOnboardingPromptOptionEmoji | null;
+ public title: string;
+ public description: string | null;
+}
+
+export class GuildPreview extends Base {
+ private constructor(client: Client<true>, data: RawGuildPreviewData);
+ public approximateMemberCount: number;
+ public approximatePresenceCount: number;
+ public get createdAt(): Date;
+ public get createdTimestamp(): number;
+ public description: string | null;
+ public discoverySplash: string | null;
+ public emojis: Collection<Snowflake, GuildPreviewEmoji>;
+ public stickers: Collection<Snowflake, Sticker>;
+ public features: `${GuildFeature}`[];
+ public icon: string | null;
+ public id: Snowflake;
+ public name: string;
+ public splash: string | null;
+ public discoverySplashURL(options?: ImageURLOptions): string | null;
+ public iconURL(options?: ImageURLOptions): string | null;
+ public splashURL(options?: ImageURLOptions): string | null;
+ public fetch(): Promise<GuildPreview>;
+ public toJSON(): unknown;
+ public toString(): string;
+}
+
+export class GuildScheduledEvent<S extends GuildScheduledEventStatus = GuildScheduledEventStatus> extends Base {
+ private constructor(client: Client<true>, data: RawGuildScheduledEventData);
+ public id: Snowflake;
+ public guildId: Snowflake;
+ public channelId: Snowflake | null;
+ public creatorId: Snowflake | null;
+ public name: string;
+ public description: string | null;
+ public scheduledStartTimestamp: number | null;
+ public scheduledEndTimestamp: number | null;
+ public privacyLevel: GuildScheduledEventPrivacyLevel;
+ public status: S;
+ public entityType: GuildScheduledEventEntityType;
+ public entityId: Snowflake | null;
+ public entityMetadata: GuildScheduledEventEntityMetadata | null;
+ public userCount: number | null;
+ public creator: User | null;
+ public get createdTimestamp(): number;
+ public get createdAt(): Date;
+ public get scheduledStartAt(): Date | null;
+ public get scheduledEndAt(): Date | null;
+ public get channel(): VoiceChannel | StageChannel | null;
+ public get guild(): Guild | null;
+ public get url(): string;
+ public image: string | null;
+ public coverImageURL(options?: Readonly<BaseImageURLOptions>): string | null;
+ public createInviteURL(options?: GuildScheduledEventInviteURLCreateOptions): Promise<string>;
+ public edit<T extends GuildScheduledEventSetStatusArg<S>>(
+ options: GuildScheduledEventEditOptions<S, T>,
+ ): Promise<GuildScheduledEvent<T>>;
+ public delete(): Promise<GuildScheduledEvent<S>>;
+ public setName(name: string, reason?: string): Promise<GuildScheduledEvent<S>>;
+ public setScheduledStartTime(scheduledStartTime: DateResolvable, reason?: string): Promise<GuildScheduledEvent<S>>;
+ public setScheduledEndTime(scheduledEndTime: DateResolvable, reason?: string): Promise<GuildScheduledEvent<S>>;
+ public setDescription(description: string, reason?: string): Promise<GuildScheduledEvent<S>>;
+ public setStatus<T extends GuildScheduledEventSetStatusArg<S>>(
+ status: T,
+ reason?: string,
+ ): Promise<GuildScheduledEvent<T>>;
+ public setLocation(location: string, reason?: string): Promise<GuildScheduledEvent<S>>;
+ public fetchSubscribers<T extends FetchGuildScheduledEventSubscribersOptions>(
+ options?: T,
+ ): Promise<GuildScheduledEventManagerFetchSubscribersResult<T>>;
+ public toString(): string;
+ public isActive(): this is GuildScheduledEvent<GuildScheduledEventStatus.Active>;
+ public isCanceled(): this is GuildScheduledEvent<GuildScheduledEventStatus.Canceled>;
+ public isCompleted(): this is GuildScheduledEvent<GuildScheduledEventStatus.Completed>;
+ public isScheduled(): this is GuildScheduledEvent<GuildScheduledEventStatus.Scheduled>;
+}
+
+export class GuildTemplate extends Base {
+ private constructor(client: Client<true>, data: RawGuildTemplateData);
+ public createdTimestamp: number;
+ public updatedTimestamp: number;
+ public get url(): string;
+ public code: string;
+ public name: string;
+ public description: string | null;
+ public usageCount: number;
+ public creator: User;
+ public creatorId: Snowflake;
+ public get createdAt(): Date;
+ public get updatedAt(): Date;
+ public get guild(): Guild | null;
+ public guildId: Snowflake;
+ public serializedGuild: APITemplateSerializedSourceGuild;
+ public unSynced: boolean | null;
+ public createGuild(name: string, icon?: BufferResolvable | Base64Resolvable): Promise<Guild>;
+ public delete(): Promise<GuildTemplate>;
+ public edit(options?: GuildTemplateEditOptions): Promise<GuildTemplate>;
+ public sync(): Promise<GuildTemplate>;
+ public static GuildTemplatesPattern: RegExp;
+}
+
+export class GuildPreviewEmoji extends BaseGuildEmoji {
+ private constructor(client: Client<true>, data: RawGuildEmojiData, guild: GuildPreview);
+ public guild: GuildPreview;
+ public roles: Snowflake[];
+}
+
+export class Integration extends Base {
+ private constructor(client: Client<true>, data: RawIntegrationData, guild: Guild);
+ public account: IntegrationAccount;
+ public application: IntegrationApplication | null;
+ public enabled: boolean | null;
+ public expireBehavior: IntegrationExpireBehavior | null;
+ public expireGracePeriod: number | null;
+ public guild: Guild;
+ public id: Snowflake | string;
+ public name: string;
+ public role: Role | null;
+ public enableEmoticons: boolean | null;
+ public get roles(): Collection<Snowflake, Role>;
+ public scopes: OAuth2Scopes[];
+ public get syncedAt(): Date | null;
+ public syncedTimestamp: number | null;
+ public syncing: boolean | null;
+ public type: IntegrationType;
+ public user: User | null;
+ public subscriberCount: number | null;
+ public revoked: boolean | null;
+ public delete(reason?: string): Promise<Integration>;
+}
+
+export class IntegrationApplication extends Application {
+ private constructor(client: Client<true>, data: RawIntegrationApplicationData);
+ public bot: User | null;
+ public termsOfServiceURL: string | null;
+ public privacyPolicyURL: string | null;
+ public rpcOrigins: string[];
+ public hook: boolean | null;
+ public cover: string | null;
+ public verifyKey: string | null;
+}
+
+export type GatewayIntentsString = keyof typeof GatewayIntentBits;
+
+export class IntentsBitField extends BitField<GatewayIntentsString> {
+ public static Flags: typeof GatewayIntentBits;
+ public static resolve(bit?: BitFieldResolvable<GatewayIntentsString, number>): number;
+}
+
+export type CacheType = 'cached' | 'raw' | undefined;
+
+export type CacheTypeReducer<
+ State extends CacheType,
+ CachedType,
+ RawType = CachedType,
+ PresentType = CachedType | RawType,
+ Fallback = PresentType | null,
+> = [State] extends ['cached']
+ ? CachedType
+ : [State] extends ['raw']
+ ? RawType
+ : [State] extends ['raw' | 'cached']
+ ? PresentType
+ : Fallback;
+
+export type Interaction<Cached extends CacheType = CacheType> =
+ | ChatInputCommandInteraction<Cached>
+ | MessageContextMenuCommandInteraction<Cached>
+ | UserContextMenuCommandInteraction<Cached>
+ | AnySelectMenuInteraction<Cached>
+ | ButtonInteraction<Cached>
+ | AutocompleteInteraction<Cached>
+ | ModalSubmitInteraction<Cached>;
+
+export type RepliableInteraction<Cached extends CacheType = CacheType> = Exclude<
+ Interaction<Cached>,
+ AutocompleteInteraction<Cached>
+>;
+
+export class BaseInteraction<Cached extends CacheType = CacheType> extends Base {
+ // This a technique used to brand different cached types. Or else we'll get `never` errors on typeguard checks.
+ private readonly _cacheType: Cached;
+ protected constructor(client: Client<true>, data: RawInteractionData);
+ public applicationId: Snowflake;
+ public get channel(): CacheTypeReducer<
+ Cached,
+ GuildTextBasedChannel | null,
+ GuildTextBasedChannel | null,
+ GuildTextBasedChannel | null,
+ TextBasedChannel | null
+ >;
+ public channelId: Snowflake | null;
+ public get createdAt(): Date;
+ public get createdTimestamp(): number;
+ public get guild(): CacheTypeReducer<Cached, Guild, null>;
+ public guildId: CacheTypeReducer<Cached, Snowflake>;
+ public id: Snowflake;
+ public member: CacheTypeReducer<Cached, GuildMember, APIInteractionGuildMember>;
+ public readonly token: string;
+ public type: InteractionType;
+ public user: User;
+ public version: number;
+ public appPermissions: CacheTypeReducer<Cached, Readonly<PermissionsBitField>>;
+ public memberPermissions: CacheTypeReducer<Cached, Readonly<PermissionsBitField>>;
+ public locale: Locale;
+ public guildLocale: CacheTypeReducer<Cached, Locale>;
+ public inGuild(): this is BaseInteraction<'raw' | 'cached'>;
+ public inCachedGuild(): this is BaseInteraction<'cached'>;
+ public inRawGuild(): this is BaseInteraction<'raw'>;
+ public isButton(): this is ButtonInteraction<Cached>;
+ public isAutocomplete(): this is AutocompleteInteraction<Cached>;
+ public isChatInputCommand(): this is ChatInputCommandInteraction<Cached>;
+ public isCommand(): this is CommandInteraction<Cached>;
+ public isContextMenuCommand(): this is ContextMenuCommandInteraction<Cached>;
+ public isMessageComponent(): this is MessageComponentInteraction<Cached>;
+ public isMessageContextMenuCommand(): this is MessageContextMenuCommandInteraction<Cached>;
+ public isModalSubmit(): this is ModalSubmitInteraction<Cached>;
+ public isUserContextMenuCommand(): this is UserContextMenuCommandInteraction<Cached>;
+ /** @deprecated Use {@link isStringSelectMenu} instead. */
+ public isSelectMenu(): this is StringSelectMenuInteraction<Cached>;
+ public isAnySelectMenu(): this is AnySelectMenuInteraction<Cached>;
+ public isStringSelectMenu(): this is StringSelectMenuInteraction<Cached>;
+ public isUserSelectMenu(): this is UserSelectMenuInteraction<Cached>;
+ public isRoleSelectMenu(): this is RoleSelectMenuInteraction<Cached>;
+ public isMentionableSelectMenu(): this is MentionableSelectMenuInteraction<Cached>;
+ public isChannelSelectMenu(): this is ChannelSelectMenuInteraction<Cached>;
+ public isRepliable(): this is RepliableInteraction<Cached>;
+}
+
+export class InteractionCollector<T extends CollectedInteraction> extends Collector<
+ Snowflake,
+ T,
+ [Collection<Snowflake, T>]
+> {
+ public constructor(client: Client<true>, options?: InteractionCollectorOptions<T>);
+ private _handleMessageDeletion(message: Message): void;
+ private _handleChannelDeletion(channel: NonThreadGuildBasedChannel): void;
+ private _handleGuildDeletion(guild: Guild): void;
+
+ public channelId: Snowflake | null;
+ public messageInteractionId: Snowflake | null;
+ public componentType: ComponentType | null;
+ public guildId: Snowflake | null;
+ public interactionType: InteractionType | null;
+ public messageId: Snowflake | null;
+ public options: InteractionCollectorOptions<T>;
+ public total: number;
+ public users: Collection<Snowflake, User>;
+
+ public collect(interaction: Interaction): Snowflake;
+ public empty(): void;
+ public dispose(interaction: Interaction): Snowflake;
+ public on(event: 'collect' | 'dispose' | 'ignore', listener: (interaction: T) => Awaitable<void>): this;
+ public on(event: 'end', listener: (collected: Collection<Snowflake, T>, reason: string) => Awaitable<void>): this;
+ public on(event: string, listener: (...args: any[]) => Awaitable<void>): this;
+
+ public once(event: 'collect' | 'dispose' | 'ignore', listener: (interaction: T) => Awaitable<void>): this;
+ public once(event: 'end', listener: (collected: Collection<Snowflake, T>, reason: string) => Awaitable<void>): this;
+ public once(event: string, listener: (...args: any[]) => Awaitable<void>): this;
+}
+
+export class InteractionWebhook extends PartialWebhookMixin() {
+ public constructor(client: Client<true>, id: Snowflake, token: string);
+ public token: string;
+ public send(options: string | MessagePayload | InteractionReplyOptions): Promise<Message>;
+ public editMessage(
+ message: MessageResolvable | '@original',
+ options: string | MessagePayload | WebhookMessageEditOptions,
+ ): Promise<Message>;
+ public fetchMessage(message: Snowflake | '@original'): Promise<Message>;
+}
+
+export class Invite extends Base {
+ private constructor(client: Client<true>, data: RawInviteData);
+ public channel: NonThreadGuildBasedChannel | PartialGroupDMChannel | null;
+ public channelId: Snowflake | null;
+ public code: string;
+ public get deletable(): boolean;
+ public get createdAt(): Date | null;
+ public createdTimestamp: number | null;
+ public get expiresAt(): Date | null;
+ public get expiresTimestamp(): number | null;
+ public guild: InviteGuild | Guild | null;
+ public get inviter(): User | null;
+ public inviterId: Snowflake | null;
+ public maxAge: number | null;
+ public maxUses: number | null;
+ public memberCount: number;
+ public presenceCount: number;
+ public targetApplication: IntegrationApplication | null;
+ public targetUser: User | null;
+ public targetType: InviteTargetType | null;
+ public temporary: boolean | null;
+ public get url(): string;
+ public uses: number | null;
+ public delete(reason?: string): Promise<Invite>;
+ public toJSON(): unknown;
+ public toString(): string;
+ public static InvitesPattern: RegExp;
+ /** @deprecated */
+ public stageInstance: InviteStageInstance | null;
+ public guildScheduledEvent: GuildScheduledEvent | null;
+}
+
+/** @deprecated */
+export class InviteStageInstance extends Base {
+ private constructor(client: Client<true>, data: RawInviteStageInstance, channelId: Snowflake, guildId: Snowflake);
+ public channelId: Snowflake;
+ public guildId: Snowflake;
+ public members: Collection<Snowflake, GuildMember>;
+ public topic: string;
+ public participantCount: number;
+ public speakerCount: number;
+ public get channel(): StageChannel | null;
+ public get guild(): Guild | null;
+}
+
+export class InviteGuild extends AnonymousGuild {
+ private constructor(client: Client<true>, data: RawInviteGuildData);
+ public welcomeScreen: WelcomeScreen | null;
+}
+
+export class LimitedCollection<K, V> extends Collection<K, V> {
+ public constructor(options?: LimitedCollectionOptions<K, V>, iterable?: Iterable<readonly [K, V]>);
+ public maxSize: number;
+ public keepOverLimit: ((value: V, key: K, collection: this) => boolean) | null;
+}
+
+export type MessageComponentType = Exclude<ComponentType, ComponentType.TextInput | ComponentType.ActionRow>;
+
+export type MessageCollectorOptionsParams<T extends MessageComponentType, Cached extends boolean = boolean> =
+ | {
+ componentType?: T;
+ } & MessageComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
+
+export type MessageChannelCollectorOptionsParams<T extends MessageComponentType, Cached extends boolean = boolean> =
+ | {
+ componentType?: T;
+ } & MessageChannelComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
+
+export type AwaitMessageCollectorOptionsParams<T extends MessageComponentType, Cached extends boolean = boolean> =
+ | { componentType?: T } & Pick<
+ InteractionCollectorOptions<MappedInteractionTypes<Cached>[T]>,
+ keyof AwaitMessageComponentOptions<any>
+ >;
+
+export interface StringMappedInteractionTypes<Cached extends CacheType = CacheType> {
+ Button: ButtonInteraction<Cached>;
+ StringSelectMenu: StringSelectMenuInteraction<Cached>;
+ UserSelectMenu: UserSelectMenuInteraction<Cached>;
+ RoleSelectMenu: RoleSelectMenuInteraction<Cached>;
+ MentionableSelectMenu: MentionableSelectMenuInteraction<Cached>;
+ ChannelSelectMenu: ChannelSelectMenuInteraction<Cached>;
+ ActionRow: MessageComponentInteraction<Cached>;
+}
+
+export type WrapBooleanCache<T extends boolean> = If<T, 'cached', CacheType>;
+
+export interface MappedInteractionTypes<Cached extends boolean = boolean> {
+ [ComponentType.Button]: ButtonInteraction<WrapBooleanCache<Cached>>;
+ [ComponentType.StringSelect]: StringSelectMenuInteraction<WrapBooleanCache<Cached>>;
+ [ComponentType.UserSelect]: UserSelectMenuInteraction<WrapBooleanCache<Cached>>;
+ [ComponentType.RoleSelect]: RoleSelectMenuInteraction<WrapBooleanCache<Cached>>;
+ [ComponentType.MentionableSelect]: MentionableSelectMenuInteraction<WrapBooleanCache<Cached>>;
+ [ComponentType.ChannelSelect]: ChannelSelectMenuInteraction<WrapBooleanCache<Cached>>;
+}
+
+export class Message<InGuild extends boolean = boolean> extends Base {
+ private readonly _cacheType: InGuild;
+ private constructor(client: Client<true>, data: RawMessageData);
+ private _patch(data: RawPartialMessageData | RawMessageData): void;
+
+ public activity: MessageActivity | null;
+ public applicationId: Snowflake | null;
+ public attachments: Collection<Snowflake, Attachment>;
+ public author: User;
+ public get bulkDeletable(): boolean;
+ public get channel(): If<InGuild, GuildTextBasedChannel, TextBasedChannel>;
+ public channelId: Snowflake;
+ public get cleanContent(): string;
+ public components: ActionRow<MessageActionRowComponent>[];
+ public content: string;
+ public get createdAt(): Date;
+ public createdTimestamp: number;
+ public get crosspostable(): boolean;
+ public get deletable(): boolean;
+ public get editable(): boolean;
+ public get editedAt(): Date | null;
+ public editedTimestamp: number | null;
+ public embeds: Embed[];
+ public groupActivityApplication: ClientApplication | null;
+ public guildId: If<InGuild, Snowflake>;
+ public get guild(): If<InGuild, Guild>;
+ public get hasThread(): boolean;
+ public id: Snowflake;
+ public interaction: MessageInteraction | null;
+ public get member(): GuildMember | null;
+ public mentions: MessageMentions<InGuild>;
+ public nonce: string | number | null;
+ public get partial(): false;
+ public get pinnable(): boolean;
+ public pinned: boolean;
+ public reactions: ReactionManager;
+ public stickers: Collection<Snowflake, Sticker>;
+ public position: number | null;
+ public roleSubscriptionData: RoleSubscriptionData | null;
+ public system: boolean;
+ public get thread(): AnyThreadChannel | null;
+ public tts: boolean;
+ public type: MessageType;
+ public get url(): string;
+ public webhookId: Snowflake | null;
+ public flags: Readonly<MessageFlagsBitField>;
+ public reference: MessageReference | null;
+ public awaitMessageComponent<T extends MessageComponentType>(
+ options?: AwaitMessageCollectorOptionsParams<T, InGuild>,
+ ): Promise<MappedInteractionTypes<InGuild>[T]>;
+ public awaitReactions(options?: AwaitReactionsOptions): Promise<Collection<Snowflake | string, MessageReaction>>;
+ public createReactionCollector(options?: ReactionCollectorOptions): ReactionCollector;
+ public createMessageComponentCollector<T extends MessageComponentType>(
+ options?: MessageCollectorOptionsParams<T, InGuild>,
+ ): InteractionCollector<MappedInteractionTypes<InGuild>[T]>;
+ public delete(): Promise<Message<InGuild>>;
+ public edit(content: string | MessageEditOptions | MessagePayload): Promise<Message<InGuild>>;
+ public equals(message: Message, rawData: unknown): boolean;
+ public fetchReference(): Promise<Message<InGuild>>;
+ public fetchWebhook(): Promise<Webhook>;
+ public crosspost(): Promise<Message<InGuild>>;
+ public fetch(force?: boolean): Promise<Message<InGuild>>;
+ public pin(reason?: string): Promise<Message<InGuild>>;
+ public react(emoji: EmojiIdentifierResolvable): Promise<MessageReaction>;
+ public removeAttachments(): Promise<Message<InGuild>>;
+ public reply(options: string | MessagePayload | MessageReplyOptions): Promise<Message<InGuild>>;
+ public resolveComponent(customId: string): MessageActionRowComponent | null;
+ public startThread(options: StartThreadOptions): Promise<AnyThreadChannel>;
+ public suppressEmbeds(suppress?: boolean): Promise<Message<InGuild>>;
+ public toJSON(): unknown;
+ public toString(): string;
+ public unpin(reason?: string): Promise<Message<InGuild>>;
+ public inGuild(): this is Message<true>;
+}
+
+export class AttachmentBuilder {
+ public constructor(attachment: BufferResolvable | Stream, data?: AttachmentData);
+ public attachment: BufferResolvable | Stream;
+ public description: string | null;
+ public name: string | null;
+ public get spoiler(): boolean;
+ public setDescription(description: string): this;
+ public setFile(attachment: BufferResolvable | Stream, name?: string): this;
+ public setName(name: string): this;
+ public setSpoiler(spoiler?: boolean): this;
+ public toJSON(): unknown;
+ public static from(other: JSONEncodable<AttachmentPayload>): AttachmentBuilder;
+}
+
+export class Attachment {
+ private constructor(data: APIAttachment);
+ private attachment: BufferResolvable | Stream;
+ public contentType: string | null;
+ public description: string | null;
+ public duration: number | null;
+ public ephemeral: boolean;
+ public flags: AttachmentFlagsBitField;
+ public height: number | null;
+ public id: Snowflake;
+ public name: string;
+ public proxyURL: string;
+ public size: number;
+ public get spoiler(): boolean;
+ public url: string;
+ public waveform: string | null;
+ public width: number | null;
+ public toJSON(): unknown;
+}
+
+export type AttachmentFlagsString = keyof typeof AttachmentFlags;
+
+export class AttachmentFlagsBitField extends BitField<AttachmentFlagsString> {
+ public static Flags: Record<AttachmentFlagsString, number>;
+ public static resolve(bit?: BitFieldResolvable<AttachmentFlagsString, number>): number;
+}
+
+export class MessageCollector extends Collector<Snowflake, Message, [Collection<Snowflake, Message>]> {
+ public constructor(channel: TextBasedChannel, options?: MessageCollectorOptions);
+ private _handleChannelDeletion(channel: NonThreadGuildBasedChannel): void;
+ private _handleGuildDeletion(guild: Guild): void;
+
+ public channel: TextBasedChannel;
+ public options: MessageCollectorOptions;
+ public received: number;
+
+ public collect(message: Message): Snowflake | null;
+ public dispose(message: Message): Snowflake | null;
+}
+
+export class MessageComponentInteraction<Cached extends CacheType = CacheType> extends BaseInteraction<Cached> {
+ protected constructor(client: Client<true>, data: RawMessageComponentInteractionData);
+ public type: InteractionType.MessageComponent;
+ public get component(): CacheTypeReducer<
+ Cached,
+ MessageActionRowComponent,
+ Exclude<APIMessageComponent, APIActionRowComponent<APIMessageActionRowComponent>>,
+ MessageActionRowComponent | Exclude<APIMessageComponent, APIActionRowComponent<APIMessageActionRowComponent>>,
+ MessageActionRowComponent | Exclude<APIMessageComponent, APIActionRowComponent<APIMessageActionRowComponent>>
+ >;
+ public componentType: Exclude<ComponentType, ComponentType.ActionRow | ComponentType.TextInput>;
+ public customId: string;
+ public channelId: Snowflake;
+ public deferred: boolean;
+ public ephemeral: boolean | null;
+ public message: Message<BooleanCache<Cached>>;
+ public replied: boolean;
+ public webhook: InteractionWebhook;
+ public inGuild(): this is MessageComponentInteraction<'raw' | 'cached'>;
+ public inCachedGuild(): this is MessageComponentInteraction<'cached'>;
+ public inRawGuild(): this is MessageComponentInteraction<'raw'>;
+ public deferReply(
+ options: InteractionDeferReplyOptions & { fetchReply: true },
+ ): Promise<Message<BooleanCache<Cached>>>;
+ public deferReply(options?: InteractionDeferReplyOptions): Promise<InteractionResponse<BooleanCache<Cached>>>;
+ public deferUpdate(
+ options: InteractionDeferUpdateOptions & { fetchReply: true },
+ ): Promise<Message<BooleanCache<Cached>>>;
+ public deferUpdate(options?: InteractionDeferUpdateOptions): Promise<InteractionResponse<BooleanCache<Cached>>>;
+ public deleteReply(message?: MessageResolvable | '@original'): Promise<void>;
+ public editReply(
+ options: string | MessagePayload | InteractionEditReplyOptions,
+ ): Promise<Message<BooleanCache<Cached>>>;
+ public fetchReply(message?: Snowflake | '@original'): Promise<Message<BooleanCache<Cached>>>;
+ public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message<BooleanCache<Cached>>>;
+ public reply(options: InteractionReplyOptions & { fetchReply: true }): Promise<Message<BooleanCache<Cached>>>;
+ public reply(
+ options: string | MessagePayload | InteractionReplyOptions,
+ ): Promise<InteractionResponse<BooleanCache<Cached>>>;
+ public update(options: InteractionUpdateOptions & { fetchReply: true }): Promise<Message<BooleanCache<Cached>>>;
+ public update(
+ options: string | MessagePayload | InteractionUpdateOptions,
+ ): Promise<InteractionResponse<BooleanCache<Cached>>>;
+ public showModal(
+ modal:
+ | JSONEncodable<APIModalInteractionResponseCallbackData>
+ | ModalComponentData
+ | APIModalInteractionResponseCallbackData,
+ ): Promise<void>;
+ public awaitModalSubmit(
+ options: AwaitModalSubmitOptions<ModalSubmitInteraction>,
+ ): Promise<ModalSubmitInteraction<Cached>>;
+}
+
+export class MessageContextMenuCommandInteraction<
+ Cached extends CacheType = CacheType,
+> extends ContextMenuCommandInteraction<Cached> {
+ public commandType: ApplicationCommandType.Message;
+ public get targetMessage(): NonNullable<CommandInteractionOption<Cached>['message']>;
+ public inGuild(): this is MessageContextMenuCommandInteraction<'raw' | 'cached'>;
+ public inCachedGuild(): this is MessageContextMenuCommandInteraction<'cached'>;
+ public inRawGuild(): this is MessageContextMenuCommandInteraction<'raw'>;
+}
+
+export type MessageFlagsString = keyof typeof MessageFlags;
+
+export class MessageFlagsBitField extends BitField<MessageFlagsString> {
+ public static Flags: typeof MessageFlags;
+ public static resolve(bit?: BitFieldResolvable<MessageFlagsString, number>): number;
+}
+
+export class MessageMentions<InGuild extends boolean = boolean> {
+ private constructor(
+ message: Message,
+ users: APIUser[] | Collection<Snowflake, User>,
+ roles: Snowflake[] | Collection<Snowflake, Role>,
+ everyone: boolean,
+ repliedUser?: APIUser | User,
+ );
+ private _channels: Collection<Snowflake, Channel> | null;
+ private readonly _content: string;
+ private _members: Collection<Snowflake, GuildMember> | null;
+ private _parsedUsers: Collection<Snowflake, User> | null;
+
+ public get channels(): Collection<Snowflake, Channel>;
+ public readonly client: Client;
+ public everyone: boolean;
+ public readonly guild: If<InGuild, Guild>;
+ public has(data: UserResolvable | RoleResolvable | ChannelResolvable, options?: MessageMentionsHasOptions): boolean;
+ public get members(): If<InGuild, Collection<Snowflake, GuildMember>>;
+ public get parsedUsers(): Collection<Snowflake, User>;
+ public repliedUser: User | null;
+ public roles: Collection<Snowflake, Role>;
+ public users: Collection<Snowflake, User>;
+ public crosspostedChannels: Collection<Snowflake, CrosspostedChannel>;
+ public toJSON(): unknown;
+
+ private static GlobalChannelsPattern: RegExp;
+ private static GlobalUsersPattern: RegExp;
+ public static ChannelsPattern: typeof FormattingPatterns.Channel;
+ public static EveryonePattern: RegExp;
+ public static RolesPattern: typeof FormattingPatterns.Role;
+ public static UsersPattern: typeof FormattingPatterns.User;
+}
+
+export type MessagePayloadOption =
+ | MessageCreateOptions
+ | MessageEditOptions
+ | WebhookMessageCreateOptions
+ | WebhookMessageEditOptions
+ | InteractionReplyOptions
+ | InteractionUpdateOptions;
+
+export class MessagePayload {
+ public constructor(target: MessageTarget, options: MessagePayloadOption);
+ public body: RawMessagePayloadData | null;
+ public get isUser(): boolean;
+ public get isWebhook(): boolean;
+ public get isMessage(): boolean;
+ public get isMessageManager(): boolean;
+ public get isInteraction(): boolean;
+ public files: RawFile[] | null;
+ public options: MessagePayloadOption;
+ public target: MessageTarget;
+
+ public static create(
+ target: MessageTarget,
+ options: string | MessagePayloadOption,
+ extra?: MessagePayloadOption,
+ ): MessagePayload;
+ public static resolveFile(
+ fileLike: BufferResolvable | Stream | AttachmentPayload | JSONEncodable<AttachmentPayload>,
+ ): Promise<RawFile>;
+
+ public makeContent(): string | undefined;
+ public resolveBody(): this;
+ public resolveFiles(): Promise<this>;
+}
+
+export class MessageReaction {
+ private constructor(client: Client<true>, data: RawMessageReactionData, message: Message);
+ private _emoji: GuildEmoji | ReactionEmoji;
+
+ public readonly client: Client<true>;
+ public count: number;
+ public get emoji(): GuildEmoji | ReactionEmoji;
+ public me: boolean;
+ public message: Message | PartialMessage;
+ public get partial(): false;
+ public users: ReactionUserManager;
+ public react(): Promise<MessageReaction>;
+ public remove(): Promise<MessageReaction>;
+ public fetch(): Promise<MessageReaction>;
+ public toJSON(): unknown;
+ public valueOf(): Snowflake | string;
+}
+
+export interface ModalComponentData {
+ customId: string;
+ title: string;
+ components: (
+ | JSONEncodable<APIActionRowComponent<APIModalActionRowComponent>>
+ | ActionRowData<ModalActionRowComponentData>
+ )[];
+}
+
+export interface BaseModalData {
+ customId: string;
+ type: ComponentType;
+}
+
+export interface TextInputModalData extends BaseModalData {
+ type: ComponentType.TextInput;
+ value: string;
+}
+
+export interface ActionRowModalData {
+ type: ComponentType.ActionRow;
+ components: TextInputModalData[];
+}
+
+export class ModalSubmitFields {
+ constructor(components: ModalActionRowComponent[][]);
+ public components: ActionRowModalData[];
+ public fields: Collection<string, ModalActionRowComponent>;
+ public getField<T extends ComponentType>(customId: string, type: T): { type: T } & TextInputModalData;
+ public getField(customId: string, type?: ComponentType): TextInputModalData;
+ public getTextInputValue(customId: string): string;
+}
+
+export interface ModalMessageModalSubmitInteraction<Cached extends CacheType = CacheType>
+ extends ModalSubmitInteraction<Cached> {
+ message: Message<BooleanCache<Cached>>;
+ channelId: Snowflake;
+ update(options: InteractionUpdateOptions & { fetchReply: true }): Promise<Message>;
+ update(
+ options: string | MessagePayload | InteractionUpdateOptions,
+ ): Promise<InteractionResponse<BooleanCache<Cached>>>;
+ inGuild(): this is ModalMessageModalSubmitInteraction<'raw' | 'cached'>;
+ inCachedGuild(): this is ModalMessageModalSubmitInteraction<'cached'>;
+ inRawGuild(): this is ModalMessageModalSubmitInteraction<'raw'>;
+}
+
+export class ModalSubmitInteraction<Cached extends CacheType = CacheType> extends BaseInteraction<Cached> {
+ private constructor(client: Client<true>, data: APIModalSubmitInteraction);
+ public type: InteractionType.ModalSubmit;
+ public readonly customId: string;
+ public readonly components: ActionRowModalData[];
+ public readonly fields: ModalSubmitFields;
+ public deferred: boolean;
+ public ephemeral: boolean | null;
+ public message: Message<BooleanCache<Cached>> | null;
+ public replied: boolean;
+ public readonly webhook: InteractionWebhook;
+ public reply(options: InteractionReplyOptions & { fetchReply: true }): Promise<Message<BooleanCache<Cached>>>;
+ public reply(
+ options: string | MessagePayload | InteractionReplyOptions,
+ ): Promise<InteractionResponse<BooleanCache<Cached>>>;
+ public deleteReply(message?: MessageResolvable | '@original'): Promise<void>;
+ public editReply(
+ options: string | MessagePayload | InteractionEditReplyOptions,
+ ): Promise<Message<BooleanCache<Cached>>>;
+ public deferReply(
+ options: InteractionDeferReplyOptions & { fetchReply: true },
+ ): Promise<Message<BooleanCache<Cached>>>;
+ public deferReply(options?: InteractionDeferReplyOptions): Promise<InteractionResponse<BooleanCache<Cached>>>;
+ public fetchReply(message?: Snowflake | '@original'): Promise<Message<BooleanCache<Cached>>>;
+ public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message<BooleanCache<Cached>>>;
+ public deferUpdate(
+ options: InteractionDeferUpdateOptions & { fetchReply: true },
+ ): Promise<Message<BooleanCache<Cached>>>;
+ public deferUpdate(options?: InteractionDeferUpdateOptions): Promise<InteractionResponse<BooleanCache<Cached>>>;
+ public inGuild(): this is ModalSubmitInteraction<'raw' | 'cached'>;
+ public inCachedGuild(): this is ModalSubmitInteraction<'cached'>;
+ public inRawGuild(): this is ModalSubmitInteraction<'raw'>;
+ public isFromMessage(): this is ModalMessageModalSubmitInteraction<Cached>;
+}
+
+export class NewsChannel extends BaseGuildTextChannel {
+ public threads: GuildTextThreadManager<AllowedThreadTypeForNewsChannel>;
+ public type: ChannelType.GuildAnnouncement;
+ public addFollower(channel: TextChannelResolvable, reason?: string): Promise<NewsChannel>;
+}
+
+export class OAuth2Guild extends BaseGuild {
+ private constructor(client: Client<true>, data: RawOAuth2GuildData);
+ public owner: boolean;
+ public permissions: Readonly<PermissionsBitField>;
+}
+
+export class PartialGroupDMChannel extends BaseChannel {
+ private constructor(client: Client<true>, data: RawPartialGroupDMChannelData);
+ public type: ChannelType.GroupDM;
+ public flags: null;
+ public name: string | null;
+ public icon: string | null;
+ public recipients: PartialRecipient[];
+ public iconURL(options?: ImageURLOptions): string | null;
+ public toString(): ChannelMention;
+}
+
+export interface GuildForumTagEmoji {
+ id: Snowflake | null;
+ name: string | null;
+}
+
+export interface GuildForumTag {
+ id: Snowflake;
+ name: string;
+ moderated: boolean;
+ emoji: GuildForumTagEmoji | null;
+}
+
+export type GuildForumTagData = Partial<GuildForumTag> & { name: string };
+
+export interface DefaultReactionEmoji {
+ id: Snowflake | null;
+ name: string | null;
+}
+
+export class ForumChannel extends TextBasedChannelMixin(GuildChannel, true, [
+ 'send',
+ 'lastMessage',
+ 'lastPinAt',
+ 'bulkDelete',
+ 'sendTyping',
+ 'createMessageCollector',
+ 'awaitMessages',
+ 'createMessageComponentCollector',
+ 'awaitMessageComponent',
+]) {
+ public type: ChannelType.GuildForum;
+ public threads: GuildForumThreadManager;
+ public availableTags: GuildForumTag[];
+ public defaultReactionEmoji: DefaultReactionEmoji | null;
+ public defaultThreadRateLimitPerUser: number | null;
+ public rateLimitPerUser: number | null;
+ public defaultAutoArchiveDuration: ThreadAutoArchiveDuration | null;
+ public nsfw: boolean;
+ public topic: string | null;
+ public defaultSortOrder: SortOrderType | null;
+ public defaultForumLayout: ForumLayoutType;
+
+ public setAvailableTags(tags: GuildForumTagData[], reason?: string): Promise<this>;
+ public setDefaultReactionEmoji(emojiId: DefaultReactionEmoji | null, reason?: string): Promise<this>;
+ public setDefaultThreadRateLimitPerUser(rateLimit: number, reason?: string): Promise<this>;
+ public createInvite(options?: InviteCreateOptions): Promise<Invite>;
+ public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>;
+ public setDefaultAutoArchiveDuration(
+ defaultAutoArchiveDuration: ThreadAutoArchiveDuration,
+ reason?: string,
+ ): Promise<this>;
+ public setTopic(topic: string | null, reason?: string): Promise<this>;
+ public setDefaultSortOrder(defaultSortOrder: SortOrderType | null, reason?: string): Promise<this>;
+ public setDefaultForumLayout(defaultForumLayout: ForumLayoutType, reason?: string): Promise<this>;
+}
+
+export class PermissionOverwrites extends Base {
+ private constructor(client: Client<true>, data: RawPermissionOverwriteData, channel: NonThreadGuildBasedChannel);
+ public allow: Readonly<PermissionsBitField>;
+ public readonly channel: NonThreadGuildBasedChannel;
+ public deny: Readonly<PermissionsBitField>;
+ public id: Snowflake;
+ public type: OverwriteType;
+ public edit(options: PermissionOverwriteOptions, reason?: string): Promise<PermissionOverwrites>;
+ public delete(reason?: string): Promise<PermissionOverwrites>;
+ public toJSON(): unknown;
+ public static resolveOverwriteOptions(
+ options: PermissionOverwriteOptions,
+ initialPermissions: { allow?: PermissionResolvable; deny?: PermissionResolvable },
+ ): ResolvedOverwriteOptions;
+ public static resolve(overwrite: OverwriteResolvable, guild: Guild): APIOverwrite;
+}
+
+export type PermissionsString = keyof typeof PermissionFlagsBits;
+
+export class PermissionsBitField extends BitField<PermissionsString, bigint> {
+ public any(permission: PermissionResolvable, checkAdmin?: boolean): boolean;
+ public has(permission: PermissionResolvable, checkAdmin?: boolean): boolean;
+ public missing(bits: BitFieldResolvable<PermissionsString, bigint>, checkAdmin?: boolean): PermissionsString[];
+ public serialize(checkAdmin?: boolean): Record<PermissionsString, boolean>;
+ public toArray(): PermissionsString[];
+
+ public static All: bigint;
+ public static Default: bigint;
+ public static StageModerator: bigint;
+ public static Flags: typeof PermissionFlagsBits;
+ public static resolve(permission?: PermissionResolvable): bigint;
+}
+
+export class Presence extends Base {
+ protected constructor(client: Client<true>, data?: RawPresenceData);
+ public activities: Activity[];
+ public clientStatus: ClientPresenceStatusData | null;
+ public guild: Guild | null;
+ public get member(): GuildMember | null;
+ public status: PresenceStatus;
+ public get user(): User | null;
+ public userId: Snowflake;
+ public equals(presence: Presence): boolean;
+}
+
+export class ReactionCollector extends Collector<Snowflake | string, MessageReaction, [User]> {
+ public constructor(message: Message, options?: ReactionCollectorOptions);
+ private _handleChannelDeletion(channel: NonThreadGuildBasedChannel): void;
+ private _handleGuildDeletion(guild: Guild): void;
+ private _handleMessageDeletion(message: Message): void;
+
+ public message: Message;
+ public options: ReactionCollectorOptions;
+ public total: number;
+ public users: Collection<Snowflake, User>;
+
+ public static key(reaction: MessageReaction): Snowflake | string;
+
+ public collect(reaction: MessageReaction, user: User): Snowflake | string | null;
+ public dispose(reaction: MessageReaction, user: User): Snowflake | string | null;
+ public empty(): void;
+
+ public on(
+ event: 'collect' | 'dispose' | 'remove' | 'ignore',
+ listener: (reaction: MessageReaction, user: User) => void,
+ ): this;
+ public on(event: 'end', listener: (collected: Collection<Snowflake, MessageReaction>, reason: string) => void): this;
+ public on(event: string, listener: (...args: any[]) => void): this;
+
+ public once(
+ event: 'collect' | 'dispose' | 'remove' | 'ignore',
+ listener: (reaction: MessageReaction, user: User) => void,
+ ): this;
+ public once(
+ event: 'end',
+ listener: (collected: Collection<Snowflake, MessageReaction>, reason: string) => void,
+ ): this;
+ public once(event: string, listener: (...args: any[]) => void): this;
+}
+
+export class ReactionEmoji extends Emoji {
+ private constructor(reaction: MessageReaction, emoji: RawReactionEmojiData);
+ public reaction: MessageReaction;
+ public toJSON(): unknown;
+}
+
+export class RichPresenceAssets {
+ private constructor(activity: Activity, assets: RawRichPresenceAssets);
+ public readonly activity: Activity;
+ public largeImage: Snowflake | null;
+ public largeText: string | null;
+ public smallImage: Snowflake | null;
+ public smallText: string | null;
+ public largeImageURL(options?: ImageURLOptions): string | null;
+ public smallImageURL(options?: ImageURLOptions): string | null;
+}
+
+export class Role extends Base {
+ private constructor(client: Client<true>, data: RawRoleData, guild: Guild);
+ public color: number;
+ public get createdAt(): Date;
+ public get createdTimestamp(): number;
+ public get editable(): boolean;
+ public flags: RoleFlagsBitField;
+ public guild: Guild;
+ public get hexColor(): HexColorString;
+ public hoist: boolean;
+ public id: Snowflake;
+ public managed: boolean;
+ public get members(): Collection<Snowflake, GuildMember>;
+ public mentionable: boolean;
+ public name: string;
+ public permissions: Readonly<PermissionsBitField>;
+ public get position(): number;
+ public rawPosition: number;
+ public tags: RoleTagData | null;
+ public comparePositionTo(role: RoleResolvable): number;
+ public icon: string | null;
+ public unicodeEmoji: string | null;
+ public delete(reason?: string): Promise<Role>;
+ public edit(options: RoleEditOptions): Promise<Role>;
+ public equals(role: Role): boolean;
+ public iconURL(options?: ImageURLOptions): string | null;
+ public permissionsIn(
+ channel: NonThreadGuildBasedChannel | Snowflake,
+ checkAdmin?: boolean,
+ ): Readonly<PermissionsBitField>;
+ public setColor(color: ColorResolvable, reason?: string): Promise<Role>;
+ public setHoist(hoist?: boolean, reason?: string): Promise<Role>;
+ public setMentionable(mentionable?: boolean, reason?: string): Promise<Role>;
+ public setName(name: string, reason?: string): Promise<Role>;
+ public setPermissions(permissions: PermissionResolvable, reason?: string): Promise<Role>;
+ public setIcon(icon: BufferResolvable | Base64Resolvable | EmojiResolvable | null, reason?: string): Promise<Role>;
+ public setPosition(position: number, options?: SetRolePositionOptions): Promise<Role>;
+ public setUnicodeEmoji(unicodeEmoji: string | null, reason?: string): Promise<Role>;
+ public toJSON(): unknown;
+ public toString(): RoleMention;
+}
+
+export type RoleFlagsString = keyof typeof RoleFlags;
+
+export class RoleFlagsBitField extends BitField<RoleFlagsString> {
+ public static Flags: typeof RoleFlags;
+ public static resolve(bit?: BitFieldResolvable<RoleFlagsString, number>): number;
+}
+
+export class StringSelectMenuInteraction<
+ Cached extends CacheType = CacheType,
+> extends MessageComponentInteraction<Cached> {
+ public constructor(client: Client<true>, data: APIMessageStringSelectInteractionData);
+ public get component(): CacheTypeReducer<
+ Cached,
+ StringSelectMenuComponent,
+ APIStringSelectComponent,
+ StringSelectMenuComponent | APIStringSelectComponent,
+ StringSelectMenuComponent | APIStringSelectComponent
+ >;
+ public componentType: ComponentType.StringSelect;
+ public values: string[];
+ public inGuild(): this is StringSelectMenuInteraction<'raw' | 'cached'>;
+ public inCachedGuild(): this is StringSelectMenuInteraction<'cached'>;
+ public inRawGuild(): this is StringSelectMenuInteraction<'raw'>;
+}
+
+export {
+ /** @deprecated Use {@link StringSelectMenuInteraction} instead */
+ StringSelectMenuInteraction as SelectMenuInteraction,
+};
+
+export class UserSelectMenuInteraction<
+ Cached extends CacheType = CacheType,
+> extends MessageComponentInteraction<Cached> {
+ public constructor(client: Client<true>, data: APIMessageUserSelectInteractionData);
+ public get component(): CacheTypeReducer<
+ Cached,
+ UserSelectMenuComponent,
+ APIUserSelectComponent,
+ UserSelectMenuComponent | APIUserSelectComponent,
+ UserSelectMenuComponent | APIUserSelectComponent
+ >;
+ public componentType: ComponentType.UserSelect;
+ public values: Snowflake[];
+ public users: Collection<Snowflake, User>;
+ public members: Collection<
+ Snowflake,
+ CacheTypeReducer<Cached, GuildMember, APIGuildMember, GuildMember | APIGuildMember, GuildMember | APIGuildMember>
+ >;
+ public inGuild(): this is UserSelectMenuInteraction<'raw' | 'cached'>;
+ public inCachedGuild(): this is UserSelectMenuInteraction<'cached'>;
+ public inRawGuild(): this is UserSelectMenuInteraction<'raw'>;
+}
+
+export class RoleSelectMenuInteraction<
+ Cached extends CacheType = CacheType,
+> extends MessageComponentInteraction<Cached> {
+ public constructor(client: Client<true>, data: APIMessageRoleSelectInteractionData);
+ public get component(): CacheTypeReducer<
+ Cached,
+ RoleSelectMenuComponent,
+ APIRoleSelectComponent,
+ RoleSelectMenuComponent | APIRoleSelectComponent,
+ RoleSelectMenuComponent | APIRoleSelectComponent
+ >;
+ public componentType: ComponentType.RoleSelect;
+ public values: Snowflake[];
+ public roles: Collection<Snowflake, CacheTypeReducer<Cached, Role, APIRole, Role | APIRole, Role | APIRole>>;
+ public inGuild(): this is RoleSelectMenuInteraction<'raw' | 'cached'>;
+ public inCachedGuild(): this is RoleSelectMenuInteraction<'cached'>;
+ public inRawGuild(): this is RoleSelectMenuInteraction<'raw'>;
+}
+
+export class MentionableSelectMenuInteraction<
+ Cached extends CacheType = CacheType,
+> extends MessageComponentInteraction<Cached> {
+ public constructor(client: Client<true>, data: APIMessageMentionableSelectInteractionData);
+ public get component(): CacheTypeReducer<
+ Cached,
+ MentionableSelectMenuComponent,
+ APIMentionableSelectComponent,
+ MentionableSelectMenuComponent | APIMentionableSelectComponent,
+ MentionableSelectMenuComponent | APIMentionableSelectComponent
+ >;
+ public componentType: ComponentType.MentionableSelect;
+ public values: Snowflake[];
+ public users: Collection<Snowflake, User>;
+ public members: Collection<
+ Snowflake,
+ CacheTypeReducer<Cached, GuildMember, APIGuildMember, GuildMember | APIGuildMember, GuildMember | APIGuildMember>
+ >;
+ public roles: Collection<Snowflake, CacheTypeReducer<Cached, Role, APIRole, Role | APIRole, Role | APIRole>>;
+ public inGuild(): this is MentionableSelectMenuInteraction<'raw' | 'cached'>;
+ public inCachedGuild(): this is MentionableSelectMenuInteraction<'cached'>;
+ public inRawGuild(): this is MentionableSelectMenuInteraction<'raw'>;
+}
+
+export class ChannelSelectMenuInteraction<
+ Cached extends CacheType = CacheType,
+> extends MessageComponentInteraction<Cached> {
+ public constructor(client: Client<true>, data: APIMessageChannelSelectInteractionData);
+ public get component(): CacheTypeReducer<
+ Cached,
+ ChannelSelectMenuComponent,
+ APIChannelSelectComponent,
+ ChannelSelectMenuComponent | APIChannelSelectComponent,
+ ChannelSelectMenuComponent | APIChannelSelectComponent
+ >;
+ public componentType: ComponentType.ChannelSelect;
+ public values: Snowflake[];
+ public channels: Collection<
+ Snowflake,
+ CacheTypeReducer<Cached, Channel, APIChannel, Channel | APIChannel, Channel | APIChannel>
+ >;
+ public inGuild(): this is ChannelSelectMenuInteraction<'raw' | 'cached'>;
+ public inCachedGuild(): this is ChannelSelectMenuInteraction<'cached'>;
+ public inRawGuild(): this is ChannelSelectMenuInteraction<'raw'>;
+}
+
+// Ideally this should be named SelectMenuInteraction, but that's the name of the "old" StringSelectMenuInteraction, meaning
+// the type name is reserved as a re-export to prevent a breaking change from being made, as such:
+// TODO: Rename this to SelectMenuInteraction in the next major
+export type AnySelectMenuInteraction<Cached extends CacheType = CacheType> =
+ | StringSelectMenuInteraction<Cached>
+ | UserSelectMenuInteraction<Cached>
+ | RoleSelectMenuInteraction<Cached>
+ | MentionableSelectMenuInteraction<Cached>
+ | ChannelSelectMenuInteraction<Cached>;
+
+export type SelectMenuType = APISelectMenuComponent['type'];
+
+export interface ShardEventTypes {
+ death: [process: ChildProcess | Worker];
+ disconnect: [];
+ error: [error: Error];
+ message: [message: any];
+ ready: [];
+ reconnecting: [];
+ resume: [];
+ spawn: [process: ChildProcess | Worker];
+}
+
+export class Shard extends EventEmitter {
+ private constructor(manager: ShardingManager, id: number);
+ private _evals: Map<string, Promise<unknown>>;
+ private _exitListener: (...args: any[]) => void;
+ private _fetches: Map<string, Promise<unknown>>;
+ private _handleExit(respawn?: boolean, timeout?: number): void;
+ private _handleMessage(message: unknown): void;
+ private incrementMaxListeners(emitter: EventEmitter | ChildProcess): void;
+ private decrementMaxListeners(emitter: EventEmitter | ChildProcess): void;
+
+ public args: string[];
+ public execArgv: string[];
+ public env: unknown;
+ public id: number;
+ public manager: ShardingManager;
+ public process: ChildProcess | null;
+ public ready: boolean;
+ public silent: boolean;
+ public worker: Worker | null;
+ public eval(script: string): Promise<unknown>;
+ public eval<T>(fn: (client: Client) => T): Promise<T>;
+ public eval<T, P>(fn: (client: Client<true>, context: Serialized<P>) => T, context: P): Promise<T>;
+ public fetchClientValue(prop: string): Promise<unknown>;
+ public kill(): void;
+ public respawn(options?: { delay?: number; timeout?: number }): Promise<ChildProcess>;
+ public send(message: unknown): Promise<Shard>;
+ public spawn(timeout?: number): Promise<ChildProcess>;
+
+ public on<K extends keyof ShardEventTypes>(
+ event: K,
+ listener: (...args: ShardEventTypes[K]) => Awaitable<void>,
+ ): this;
+
+ public once<K extends keyof ShardEventTypes>(
+ event: K,
+ listener: (...args: ShardEventTypes[K]) => Awaitable<void>,
+ ): this;
+}
+
+export class ShardClientUtil {
+ private constructor(client: Client<true>, mode: ShardingManagerMode);
+ private _handleMessage(message: unknown): void;
+ private _respond(type: string, message: unknown): void;
+ private incrementMaxListeners(emitter: EventEmitter | ChildProcess): void;
+ private decrementMaxListeners(emitter: EventEmitter | ChildProcess): void;
+
+ public client: Client;
+ public get count(): number;
+ public get ids(): number[];
+ public mode: ShardingManagerMode;
+ public parentPort: MessagePort | null;
+ public broadcastEval<T>(fn: (client: Client) => Awaitable<T>): Promise<Serialized<T>[]>;
+ public broadcastEval<T>(fn: (client: Client) => Awaitable<T>, options: { shard: number }): Promise<Serialized<T>>;
+ public broadcastEval<T, P>(
+ fn: (client: Client<true>, context: Serialized<P>) => Awaitable<T>,
+ options: { context: P },
+ ): Promise<Serialized<T>[]>;
+ public broadcastEval<T, P>(
+ fn: (client: Client<true>, context: Serialized<P>) => Awaitable<T>,
+ options: { context: P; shard: number },
+ ): Promise<Serialized<T>>;
+ public fetchClientValues(prop: string): Promise<unknown[]>;
+ public fetchClientValues(prop: string, shard: number): Promise<unknown>;
+ public respawnAll(options?: MultipleShardRespawnOptions): Promise<void>;
+ public send(message: unknown): Promise<void>;
+
+ public static singleton(client: Client<true>, mode: ShardingManagerMode): ShardClientUtil;
+ public static shardIdForGuildId(guildId: Snowflake, shardCount: number): number;
+}
+
+export class ShardingManager extends EventEmitter {
+ public constructor(file: string, options?: ShardingManagerOptions);
+ private _performOnShards(method: string, args: unknown[]): Promise<unknown[]>;
+ private _performOnShards(method: string, args: unknown[], shard: number): Promise<unknown>;
+
+ public file: string;
+ public respawn: boolean;
+ public silent: boolean;
+ public shardArgs: string[];
+ public shards: Collection<number, Shard>;
+ public token: string | null;
+ public totalShards: number | 'auto';
+ public shardList: number[] | 'auto';
+ public broadcast(message: unknown): Promise<Shard[]>;
+ public broadcastEval<T>(fn: (client: Client) => Awaitable<T>): Promise<Serialized<T>[]>;
+ public broadcastEval<T>(fn: (client: Client) => Awaitable<T>, options: { shard: number }): Promise<Serialized<T>>;
+ public broadcastEval<T, P>(
+ fn: (client: Client<true>, context: Serialized<P>) => Awaitable<T>,
+ options: { context: P },
+ ): Promise<Serialized<T>[]>;
+ public broadcastEval<T, P>(
+ fn: (client: Client<true>, context: Serialized<P>) => Awaitable<T>,
+ options: { context: P; shard: number },
+ ): Promise<Serialized<T>>;
+ public createShard(id: number): Shard;
+ public fetchClientValues(prop: string): Promise<unknown[]>;
+ public fetchClientValues(prop: string, shard: number): Promise<unknown>;
+ public respawnAll(options?: MultipleShardRespawnOptions): Promise<Collection<number, Shard>>;
+ public spawn(options?: MultipleShardSpawnOptions): Promise<Collection<number, Shard>>;
+
+ public on(event: 'shardCreate', listener: (shard: Shard) => Awaitable<void>): this;
+
+ public once(event: 'shardCreate', listener: (shard: Shard) => Awaitable<void>): this;
+}
+
+export interface FetchRecommendedShardCountOptions {
+ guildsPerShard?: number;
+ multipleOf?: number;
+}
+
+export {
+ DiscordSnowflake as SnowflakeUtil,
+ SnowflakeGenerateOptions,
+ DeconstructedSnowflake,
+} from '@sapphire/snowflake';
+
+export class StageChannel extends BaseGuildVoiceChannel {
+ public get stageInstance(): StageInstance | null;
+ public topic: string | null;
+ public type: ChannelType.GuildStageVoice;
+ public createStageInstance(options: StageInstanceCreateOptions): Promise<StageInstance>;
+ public setTopic(topic: string): Promise<StageChannel>;
+}
+
+export class DirectoryChannel extends BaseChannel {
+ public flags: Readonly<ChannelFlagsBitField>;
+ public guild: InviteGuild;
+ public guildId: Snowflake;
+ public name: string;
+}
+
+export class StageInstance extends Base {
+ private constructor(client: Client<true>, data: RawStageInstanceData, channel: StageChannel);
+ public id: Snowflake;
+ public guildId: Snowflake;
+ public channelId: Snowflake;
+ public topic: string;
+ public privacyLevel: StageInstancePrivacyLevel;
+ /** @deprecated See https://github.com/discord/discord-api-docs/pull/4296 for more information */
+ public discoverableDisabled: boolean | null;
+ public guildScheduledEventId?: Snowflake;
+ public get channel(): StageChannel | null;
+ public get guild(): Guild | null;
+ public get guildScheduledEvent(): GuildScheduledEvent | null;
+ public edit(options: StageInstanceEditOptions): Promise<StageInstance>;
+ public delete(): Promise<StageInstance>;
+ public setTopic(topic: string): Promise<StageInstance>;
+ public get createdTimestamp(): number;
+ public get createdAt(): Date;
+}
+
+export class Sticker extends Base {
+ private constructor(client: Client<true>, data: RawStickerData);
+ public get createdTimestamp(): number;
+ public get createdAt(): Date;
+ public available: boolean | null;
+ public description: string | null;
+ public format: StickerFormatType;
+ public get guild(): Guild | null;
+ public guildId: Snowflake | null;
+ public id: Snowflake;
+ public name: string;
+ public packId: Snowflake | null;
+ public get partial(): boolean;
+ public sortValue: number | null;
+ public tags: string | null;
+ public type: StickerType | null;
+ public user: User | null;
+ public get url(): string;
+ public fetch(): Promise<Sticker>;
+ public fetchPack(): Promise<StickerPack | null>;
+ public fetchUser(): Promise<User | null>;
+ public edit(options?: GuildStickerEditOptions): Promise<Sticker>;
+ public delete(reason?: string): Promise<Sticker>;
+ public equals(other: Sticker | unknown): boolean;
+}
+
+export class StickerPack extends Base {
+ private constructor(client: Client<true>, data: RawStickerPackData);
+ public get createdTimestamp(): number;
+ public get createdAt(): Date;
+ public bannerId: Snowflake | null;
+ public get coverSticker(): Sticker | null;
+ public coverStickerId: Snowflake | null;
+ public description: string;
+ public id: Snowflake;
+ public name: string;
+ public skuId: Snowflake;
+ public stickers: Collection<Snowflake, Sticker>;
+ public bannerURL(options?: ImageURLOptions): string | null;
+}
+
+export class Sweepers {
+ public constructor(client: Client<true>, options: SweeperOptions);
+ public readonly client: Client;
+ public intervals: Record<SweeperKey, NodeJS.Timeout | null>;
+ public options: SweeperOptions;
+
+ public sweepApplicationCommands(
+ filter: CollectionSweepFilter<
+ SweeperDefinitions['applicationCommands'][0],
+ SweeperDefinitions['applicationCommands'][1]
+ >,
+ ): number;
+ public sweepAutoModerationRules(
+ filter: CollectionSweepFilter<
+ SweeperDefinitions['autoModerationRules'][0],
+ SweeperDefinitions['autoModerationRules'][1]
+ >,
+ ): number;
+ public sweepBans(filter: CollectionSweepFilter<SweeperDefinitions['bans'][0], SweeperDefinitions['bans'][1]>): number;
+ public sweepEmojis(
+ filter: CollectionSweepFilter<SweeperDefinitions['emojis'][0], SweeperDefinitions['emojis'][1]>,
+ ): number;
+ public sweepInvites(
+ filter: CollectionSweepFilter<SweeperDefinitions['invites'][0], SweeperDefinitions['invites'][1]>,
+ ): number;
+ public sweepGuildMembers(
+ filter: CollectionSweepFilter<SweeperDefinitions['guildMembers'][0], SweeperDefinitions['guildMembers'][1]>,
+ ): number;
+ public sweepMessages(
+ filter: CollectionSweepFilter<SweeperDefinitions['messages'][0], SweeperDefinitions['messages'][1]>,
+ ): number;
+ public sweepPresences(
+ filter: CollectionSweepFilter<SweeperDefinitions['presences'][0], SweeperDefinitions['presences'][1]>,
+ ): number;
+ public sweepReactions(
+ filter: CollectionSweepFilter<SweeperDefinitions['reactions'][0], SweeperDefinitions['reactions'][1]>,
+ ): number;
+ public sweepStageInstances(
+ filter: CollectionSweepFilter<SweeperDefinitions['stageInstances'][0], SweeperDefinitions['stageInstances'][1]>,
+ ): number;
+ public sweepStickers(
+ filter: CollectionSweepFilter<SweeperDefinitions['stickers'][0], SweeperDefinitions['stickers'][1]>,
+ ): number;
+ public sweepThreadMembers(
+ filter: CollectionSweepFilter<SweeperDefinitions['threadMembers'][0], SweeperDefinitions['threadMembers'][1]>,
+ ): number;
+ public sweepThreads(
+ filter: CollectionSweepFilter<SweeperDefinitions['threads'][0], SweeperDefinitions['threads'][1]>,
+ ): number;
+ public sweepUsers(
+ filter: CollectionSweepFilter<SweeperDefinitions['users'][0], SweeperDefinitions['users'][1]>,
+ ): number;
+ public sweepVoiceStates(
+ filter: CollectionSweepFilter<SweeperDefinitions['voiceStates'][0], SweeperDefinitions['voiceStates'][1]>,
+ ): number;
+
+ public static archivedThreadSweepFilter(
+ lifetime?: number,
+ ): GlobalSweepFilter<SweeperDefinitions['threads'][0], SweeperDefinitions['threads'][1]>;
+ public static expiredInviteSweepFilter(
+ lifetime?: number,
+ ): GlobalSweepFilter<SweeperDefinitions['invites'][0], SweeperDefinitions['invites'][1]>;
+ public static filterByLifetime<K, V>(options?: LifetimeFilterOptions<K, V>): GlobalSweepFilter<K, V>;
+ public static outdatedMessageSweepFilter(
+ lifetime?: number,
+ ): GlobalSweepFilter<SweeperDefinitions['messages'][0], SweeperDefinitions['messages'][1]>;
+}
+
+export type SystemChannelFlagsString = keyof typeof GuildSystemChannelFlags;
+
+export class SystemChannelFlagsBitField extends BitField<SystemChannelFlagsString> {
+ public static Flags: typeof GuildSystemChannelFlags;
+ public static resolve(bit?: BitFieldResolvable<SystemChannelFlagsString, number>): number;
+}
+
+export class Team extends Base {
+ private constructor(client: Client<true>, data: RawTeamData);
+ public id: Snowflake;
+ public name: string;
+ public icon: string | null;
+ public ownerId: Snowflake | null;
+ public members: Collection<Snowflake, TeamMember>;
+ public get owner(): TeamMember | null;
+ public get createdAt(): Date;
+ public get createdTimestamp(): number;
+
+ public iconURL(options?: ImageURLOptions): string | null;
+ public toJSON(): unknown;
+ public toString(): string;
+}
+
+export class TeamMember extends Base {
+ private constructor(team: Team, data: RawTeamMemberData);
+ public team: Team;
+ public get id(): Snowflake;
+ public permissions: string[];
+ public membershipState: TeamMemberMembershipState;
+ public user: User;
+
+ public toString(): UserMention;
+}
+
+export class TextChannel extends BaseGuildTextChannel {
+ public rateLimitPerUser: number;
+ public threads: GuildTextThreadManager<AllowedThreadTypeForTextChannel>;
+ public type: ChannelType.GuildText;
+}
+
+export type AnyThreadChannel<Forum extends boolean = boolean> = PublicThreadChannel<Forum> | PrivateThreadChannel;
+
+export interface PublicThreadChannel<Forum extends boolean = boolean> extends ThreadChannel<Forum> {
+ type: ChannelType.PublicThread | ChannelType.AnnouncementThread;
+}
+
+export interface PrivateThreadChannel extends ThreadChannel<false> {
+ get createdTimestamp(): number;
+ get createdAt(): Date;
+ type: ChannelType.PrivateThread;
+}
+
+export class ThreadChannel<Forum extends boolean = boolean> extends TextBasedChannelMixin(BaseChannel, true, [
+ 'fetchWebhooks',
+ 'createWebhook',
+ 'setNSFW',
+]) {
+ private constructor(guild: Guild, data?: RawThreadChannelData, client?: Client<true>);
+ public archived: boolean | null;
+ public get archivedAt(): Date | null;
+ public archiveTimestamp: number | null;
+ public get createdAt(): Date | null;
+ private _createdTimestamp: number | null;
+ public get createdTimestamp(): number | null;
+ public autoArchiveDuration: ThreadAutoArchiveDuration | null;
+ public get editable(): boolean;
+ public flags: Readonly<ChannelFlagsBitField>;
+ public guild: Guild;
+ public guildId: Snowflake;
+ public get guildMembers(): Collection<Snowflake, GuildMember>;
+ public invitable: boolean | null;
+ public get joinable(): boolean;
+ public get joined(): boolean;
+ public locked: boolean | null;
+ public get manageable(): boolean;
+ public get viewable(): boolean;
+ public get sendable(): boolean;
+ public memberCount: number | null;
+ public messageCount: number | null;
+ public appliedTags: Snowflake[];
+ public totalMessageSent: number | null;
+ public members: ThreadMemberManager;
+ public name: string;
+ public ownerId: Snowflake | null;
+ public get parent(): If<Forum, ForumChannel, TextChannel | NewsChannel> | null;
+ public parentId: Snowflake | null;
+ public rateLimitPerUser: number | null;
+ public type: ThreadChannelType;
+ public get unarchivable(): boolean;
+ public delete(reason?: string): Promise<this>;
+ public edit(options: ThreadEditOptions): Promise<AnyThreadChannel>;
+ public join(): Promise<AnyThreadChannel>;
+ public leave(): Promise<AnyThreadChannel>;
+ public permissionsFor(memberOrRole: GuildMember | Role, checkAdmin?: boolean): Readonly<PermissionsBitField>;
+ public permissionsFor(
+ memberOrRole: GuildMemberResolvable | RoleResolvable,
+ checkAdmin?: boolean,
+ ): Readonly<PermissionsBitField> | null;
+ public fetchOwner(options?: BaseFetchOptions): Promise<ThreadMember | null>;
+ public fetchStarterMessage(options?: BaseFetchOptions): Promise<Message<true> | null>;
+ public setArchived(archived?: boolean, reason?: string): Promise<AnyThreadChannel>;
+ public setAutoArchiveDuration(
+ autoArchiveDuration: ThreadAutoArchiveDuration,
+ reason?: string,
+ ): Promise<AnyThreadChannel>;
+ public setInvitable(invitable?: boolean, reason?: string): Promise<AnyThreadChannel>;
+ public setLocked(locked?: boolean, reason?: string): Promise<AnyThreadChannel>;
+ public setName(name: string, reason?: string): Promise<AnyThreadChannel>;
+ // The following 3 methods can only be run on forum threads.
+ public setAppliedTags(appliedTags: Snowflake[], reason?: string): Promise<ThreadChannel<true>>;
+ public pin(reason?: string): Promise<ThreadChannel<true>>;
+ public unpin(reason?: string): Promise<ThreadChannel<true>>;
+ public toString(): ChannelMention;
+}
+
+export class ThreadMember<HasMemberData extends boolean = boolean> extends Base {
+ private constructor(thread: ThreadChannel, data: RawThreadMemberData, extra?: unknown);
+ public flags: ThreadMemberFlagsBitField;
+ private member: If<HasMemberData, GuildMember>;
+ public get guildMember(): HasMemberData extends true ? GuildMember : GuildMember | null;
+ public id: Snowflake;
+ public get joinedAt(): Date | null;
+ public joinedTimestamp: number | null;
+ public get manageable(): boolean;
+ public thread: AnyThreadChannel;
+ public get user(): User | null;
+ public get partial(): false;
+ public remove(reason?: string): Promise<ThreadMember>;
+}
+
+export type ThreadMemberFlagsString = keyof typeof ThreadMemberFlags;
+
+export class ThreadMemberFlagsBitField extends BitField<ThreadMemberFlagsString> {
+ public static Flags: typeof ThreadMemberFlags;
+ public static resolve(bit?: BitFieldResolvable<ThreadMemberFlagsString, number>): number;
+}
+
+export class Typing extends Base {
+ private constructor(channel: TextBasedChannel, user: PartialUser, data?: RawTypingData);
+ public channel: TextBasedChannel;
+ public user: User | PartialUser;
+ public startedTimestamp: number;
+ public get startedAt(): Date;
+ public get guild(): Guild | null;
+ public get member(): GuildMember | null;
+ public inGuild(): this is this & {
+ channel: TextChannel | NewsChannel | ThreadChannel;
+ get guild(): Guild;
+ };
+}
+
+export class User extends PartialTextBasedChannel(Base) {
+ protected constructor(client: Client<true>, data: RawUserData);
+ private _equals(user: APIUser): boolean;
+
+ public accentColor: number | null | undefined;
+ public avatar: string | null;
+ public avatarDecoration: string | null;
+ public banner: string | null | undefined;
+ public bot: boolean;
+ public get createdAt(): Date;
+ public get createdTimestamp(): number;
+ public discriminator: string;
+ public get displayName(): string;
+ public get defaultAvatarURL(): string;
+ public get dmChannel(): DMChannel | null;
+ public flags: Readonly<UserFlagsBitField> | null;
+ public globalName: string | null;
+ public get hexAccentColor(): HexColorString | null | undefined;
+ public id: Snowflake;
+ public get partial(): false;
+ public system: boolean;
+ public get tag(): string;
+ public username: string;
+ public avatarURL(options?: ImageURLOptions): string | null;
+ public avatarDecorationURL(options?: BaseImageURLOptions): string | null;
+ public bannerURL(options?: ImageURLOptions): string | null | undefined;
+ public createDM(force?: boolean): Promise<DMChannel>;
+ public deleteDM(): Promise<DMChannel>;
+ public displayAvatarURL(options?: ImageURLOptions): string;
+ public equals(user: User): boolean;
+ public fetch(force?: boolean): Promise<User>;
+ public fetchFlags(force?: boolean): Promise<UserFlagsBitField>;
+ public toString(): UserMention;
+}
+
+export class UserContextMenuCommandInteraction<
+ Cached extends CacheType = CacheType,
+> extends ContextMenuCommandInteraction<Cached> {
+ public commandType: ApplicationCommandType.User;
+ public get targetUser(): User;
+ public get targetMember(): CacheTypeReducer<Cached, GuildMember, APIInteractionGuildMember>;
+ public inGuild(): this is UserContextMenuCommandInteraction<'raw' | 'cached'>;
+ public inCachedGuild(): this is UserContextMenuCommandInteraction<'cached'>;
+ public inRawGuild(): this is UserContextMenuCommandInteraction<'raw'>;
+}
+
+export type UserFlagsString = keyof typeof UserFlags;
+
+export class UserFlagsBitField extends BitField<UserFlagsString> {
+ public static Flags: typeof UserFlags;
+ public static resolve(bit?: BitFieldResolvable<UserFlagsString, number>): number;
+}
+
+export function basename(path: string, ext?: string): string;
+export function cleanContent(str: string, channel: TextBasedChannel): string;
+export function discordSort<K, V extends { rawPosition: number; id: Snowflake }>(
+ collection: Collection<K, V>,
+): Collection<K, V>;
+export function cleanCodeBlockContent(text: string): string;
+export function fetchRecommendedShardCount(token: string, options?: FetchRecommendedShardCountOptions): Promise<number>;
+export function flatten(obj: unknown, ...props: Record<string, boolean | string>[]): unknown;
+export function makeError(obj: MakeErrorOptions): Error;
+export function makePlainError(err: Error): MakeErrorOptions;
+export function mergeDefault(def: unknown, given: unknown): unknown;
+export function moveElementInArray(array: unknown[], element: unknown, newIndex: number, offset?: boolean): number;
+export function parseEmoji(text: string): { animated: boolean; name: string; id: Snowflake | null } | null;
+export function resolveColor(color: ColorResolvable): number;
+export function resolvePartialEmoji(emoji: EmojiIdentifierResolvable): Partial<APIPartialEmoji> | null;
+export function verifyString(data: string, error?: typeof Error, errorMessage?: string, allowEmpty?: boolean): string;
+export function setPosition<T extends Channel | Role>(
+ item: T,
+ position: number,
+ relative: boolean,
+ sorted: Collection<Snowflake, T>,
+ client: Client<true>,
+ route: string,
+ reason?: string,
+): Promise<{ id: Snowflake; position: number }[]>;
+export function parseWebhookURL(url: string): WebhookClientDataIdWithToken | null;
+
+export interface MappedComponentBuilderTypes {
+ [ComponentType.Button]: ButtonBuilder;
+ [ComponentType.StringSelect]: StringSelectMenuBuilder;
+ [ComponentType.UserSelect]: UserSelectMenuBuilder;
+ [ComponentType.RoleSelect]: RoleSelectMenuBuilder;
+ [ComponentType.MentionableSelect]: MentionableSelectMenuBuilder;
+ [ComponentType.ChannelSelect]: ChannelSelectMenuBuilder;
+ [ComponentType.ActionRow]: ActionRowBuilder;
+ [ComponentType.TextInput]: TextInputBuilder;
+}
+
+export interface MappedComponentTypes {
+ [ComponentType.Button]: ButtonComponent;
+ [ComponentType.StringSelect]: StringSelectMenuComponent;
+ [ComponentType.UserSelect]: UserSelectMenuComponent;
+ [ComponentType.RoleSelect]: RoleSelectMenuComponent;
+ [ComponentType.MentionableSelect]: MentionableSelectMenuComponent;
+ [ComponentType.ChannelSelect]: ChannelSelectMenuComponent;
+ [ComponentType.ActionRow]: ActionRowComponent;
+ [ComponentType.TextInput]: TextInputComponent;
+}
+
+export interface ChannelCreateOptions {
+ allowFromUnknownGuild?: boolean;
+}
+
+export function createChannel(client: Client<true>, data: APIChannel, options?: ChannelCreateOptions): Channel;
+
+export function createComponent<T extends keyof MappedComponentTypes>(
+ data: APIMessageComponent & { type: T },
+): MappedComponentTypes[T];
+export function createComponent<C extends Component>(data: C): C;
+export function createComponent(data: APIMessageComponent | Component): Component;
+export function createComponentBuilder<T extends keyof MappedComponentBuilderTypes>(
+ data: APIMessageComponent & { type: T },
+): MappedComponentBuilderTypes[T];
+export function createComponentBuilder<C extends ComponentBuilder>(data: C): C;
+export function createComponentBuilder(data: APIMessageComponent | ComponentBuilder): ComponentBuilder;
+
+/** @deprecated This class is redundant as all methods of the class can be imported from discord.js directly. */
+export class Formatters extends null {
+ /** @deprecated Import this method directly from discord.js instead. */
+ public static blockQuote: typeof blockQuote;
+ /** @deprecated Import this method directly from discord.js instead. */
+ public static bold: typeof bold;
+ /** @deprecated Import this method directly from discord.js instead. */
+ public static channelMention: typeof channelMention;
+ /** @deprecated Import this method directly from discord.js instead. */
+ public static codeBlock: typeof codeBlock;
+ /** @deprecated Import this method directly from discord.js instead. */
+ public static formatEmoji: typeof formatEmoji;
+ /** @deprecated Import this method directly from discord.js instead. */
+ public static hideLinkEmbed: typeof hideLinkEmbed;
+ /** @deprecated Import this method directly from discord.js instead. */
+ public static hyperlink: typeof hyperlink;
+ /** @deprecated Import this method directly from discord.js instead. */
+ public static inlineCode: typeof inlineCode;
+ /** @deprecated Import this method directly from discord.js instead. */
+ public static italic: typeof italic;
+ /** @deprecated Import this method directly from discord.js instead. */
+ public static quote: typeof quote;
+ /** @deprecated Import this method directly from discord.js instead. */
+ public static roleMention: typeof roleMention;
+ /** @deprecated Import this method directly from discord.js instead. */
+ public static spoiler: typeof spoiler;
+ /** @deprecated Import this method directly from discord.js instead. */
+ public static strikethrough: typeof strikethrough;
+ /** @deprecated Import this method directly from discord.js instead. */
+ public static time: typeof time;
+ /** @deprecated Import this property directly from discord.js instead. */
+ public static TimestampStyles: typeof TimestampStyles;
+ /** @deprecated Import this method directly from discord.js instead. */
+ public static underscore: typeof underscore;
+ /** @deprecated Import this method directly from discord.js instead. */
+ public static userMention: typeof userMention;
+}
+
+export type ComponentData =
+ | MessageActionRowComponentData
+ | ModalActionRowComponentData
+ | ActionRowData<MessageActionRowComponentData | ModalActionRowComponentData>;
+
+export class VoiceChannel extends BaseGuildVoiceChannel {
+ public get speakable(): boolean;
+ public type: ChannelType.GuildVoice;
+}
+
+export class VoiceRegion {
+ private constructor(data: RawVoiceRegionData);
+ public custom: boolean;
+ public deprecated: boolean;
+ public id: string;
+ public name: string;
+ public optimal: boolean;
+ public toJSON(): unknown;
+}
+
+export class VoiceState extends Base {
+ private constructor(guild: Guild, data: RawVoiceStateData);
+ public get channel(): VoiceBasedChannel | null;
+ public channelId: Snowflake | null;
+ public get deaf(): boolean | null;
+ public guild: Guild;
+ public id: Snowflake;
+ public get member(): GuildMember | null;
+ public get mute(): boolean | null;
+ public selfDeaf: boolean | null;
+ public selfMute: boolean | null;
+ public serverDeaf: boolean | null;
+ public serverMute: boolean | null;
+ public sessionId: string | null;
+ public streaming: boolean | null;
+ public selfVideo: boolean | null;
+ public suppress: boolean | null;
+ public requestToSpeakTimestamp: number | null;
+
+ public setDeaf(deaf?: boolean, reason?: string): Promise<GuildMember>;
+ public setMute(mute?: boolean, reason?: string): Promise<GuildMember>;
+ public disconnect(reason?: string): Promise<GuildMember>;
+ public setChannel(channel: GuildVoiceChannelResolvable | null, reason?: string): Promise<GuildMember>;
+ public setRequestToSpeak(request?: boolean): Promise<this>;
+ public setSuppressed(suppressed?: boolean): Promise<this>;
+ public edit(options: VoiceStateEditOptions): Promise<this>;
+}
+
+export class Webhook extends WebhookMixin() {
+ private constructor(client: Client<true>, data?: RawWebhookData);
+ public avatar: string | null;
+ public avatarURL(options?: ImageURLOptions): string | null;
+ public channelId: Snowflake;
+ public readonly client: Client;
+ public guildId: Snowflake;
+ public name: string;
+ public owner: User | APIUser | null;
+ public sourceGuild: Guild | APIPartialGuild | null;
+ public sourceChannel: NewsChannel | APIPartialChannel | null;
+ public token: string | null;
+ public type: WebhookType;
+ public applicationId: Snowflake | null;
+ public get channel(): TextChannel | VoiceChannel | NewsChannel | ForumChannel | StageChannel | null;
+ public isUserCreated(): this is this & {
+ type: WebhookType.Incoming;
+ applicationId: null;
+ owner: User | APIUser;
+ };
+ public isApplicationCreated(): this is this & {
+ type: WebhookType.Application;
+ applicationId: Snowflake;
+ owner: User | APIUser;
+ };
+ public isIncoming(): this is this & {
+ type: WebhookType.Incoming;
+ token: string;
+ };
+ public isChannelFollower(): this is this & {
+ type: WebhookType.ChannelFollower;
+ sourceGuild: Guild | APIPartialGuild;
+ sourceChannel: NewsChannel | APIPartialChannel;
+ token: null;
+ applicationId: null;
+ owner: User | APIUser;
+ };
+
+ public editMessage(
+ message: MessageResolvable,
+ options: string | MessagePayload | WebhookMessageEditOptions,
+ ): Promise<Message>;
+ public fetchMessage(message: Snowflake, options?: WebhookFetchMessageOptions): Promise<Message>;
+ public send(options: string | MessagePayload | WebhookMessageCreateOptions): Promise<Message>;
+}
+
+export class WebhookClient extends WebhookMixin(BaseClient) {
+ public constructor(data: WebhookClientData, options?: WebhookClientOptions);
+ public readonly client: this;
+ public options: WebhookClientOptions;
+ public token: string;
+ public editMessage(
+ message: MessageResolvable,
+ options: string | MessagePayload | WebhookMessageEditOptions,
+ ): Promise<APIMessage>;
+ public fetchMessage(message: Snowflake, options?: WebhookFetchMessageOptions): Promise<APIMessage>;
+ public send(options: string | MessagePayload | WebhookMessageCreateOptions): Promise<APIMessage>;
+}
+
+export class WebSocketManager extends EventEmitter {
+ private constructor(client: Client);
+ private readonly packetQueue: unknown[];
+ private destroyed: boolean;
+
+ public readonly client: Client;
+ public gateway: string | null;
+ public shards: Collection<number, WebSocketShard>;
+ public status: Status;
+ public get ping(): number;
+
+ public on(event: GatewayDispatchEvents, listener: (data: any, shardId: number) => void): this;
+ public once(event: GatewayDispatchEvents, listener: (data: any, shardId: number) => void): this;
+
+ private debug(message: string, shardId?: number): void;
+ private connect(): Promise<void>;
+ private broadcast(packet: unknown): void;
+ private destroy(): Promise<void>;
+ private handlePacket(packet?: unknown, shard?: WebSocketShard): boolean;
+ private checkShardsReady(): void;
+ private triggerClientReady(): void;
+}
+
+export interface WebSocketShardEventTypes {
+ ready: [];
+ resumed: [];
+ invalidSession: [];
+ destroyed: [];
+ close: [event: CloseEvent];
+ allReady: [unavailableGuilds?: Set<Snowflake>];
+}
+
+export class WebSocketShard extends EventEmitter {
+ private constructor(manager: WebSocketManager, id: number);
+ private closeSequence: number;
+ private sessionInfo: SessionInfo | null;
+ public lastPingTimestamp: number;
+ private expectedGuilds: Set<Snowflake> | null;
+ private readyTimeout: NodeJS.Timeout | null;
+
+ public manager: WebSocketManager;
+ public id: number;
+ public status: Status;
+ public ping: number;
+
+ private debug(message: string): void;
+ private onReadyPacket(packet: unknown): void;
+ private gotGuild(guildId: Snowflake): void;
+ private checkReady(): void;
+ private emitClose(event?: CloseEvent): void;
+
+ public send(data: unknown, important?: boolean): void;
+
+ public on<K extends keyof WebSocketShardEventTypes>(
+ event: K,
+ listener: (...args: WebSocketShardEventTypes[K]) => Awaitable<void>,
+ ): this;
+
+ public once<K extends keyof WebSocketShardEventTypes>(
+ event: K,
+ listener: (...args: WebSocketShardEventTypes[K]) => Awaitable<void>,
+ ): this;
+}
+
+export class Widget extends Base {
+ private constructor(client: Client<true>, data: RawWidgetData);
+ private _patch(data: RawWidgetData): void;
+ public fetch(): Promise<Widget>;
+ public id: Snowflake;
+ public name: string;
+ public instantInvite?: string;
+ public channels: Collection<Snowflake, WidgetChannel>;
+ public members: Collection<string, WidgetMember>;
+ public presenceCount: number;
+}
+
+export class WidgetMember extends Base {
+ private constructor(client: Client<true>, data: RawWidgetMemberData);
+ public id: string;
+ public username: string;
+ public discriminator: string;
+ public avatar: string | null;
+ public status: PresenceStatus;
+ public deaf: boolean | null;
+ public mute: boolean | null;
+ public selfDeaf: boolean | null;
+ public selfMute: boolean | null;
+ public suppress: boolean | null;
+ public channelId: Snowflake | null;
+ public avatarURL: string;
+ public activity: WidgetActivity | null;
+}
+
+export class WelcomeChannel extends Base {
+ private constructor(guild: Guild, data: RawWelcomeChannelData);
+ private _emoji: Omit<APIEmoji, 'animated'>;
+ public channelId: Snowflake;
+ public guild: Guild | InviteGuild;
+ public description: string;
+ public get channel(): TextChannel | NewsChannel | ForumChannel | null;
+ public get emoji(): GuildEmoji | Emoji;
+}
+
+export class WelcomeScreen extends Base {
+ private constructor(guild: Guild, data: RawWelcomeScreenData);
+ public get enabled(): boolean;
+ public guild: Guild | InviteGuild;
+ public description: string | null;
+ public welcomeChannels: Collection<Snowflake, WelcomeChannel>;
+}
+
+//#endregion
+
+//#region Constants
+
+export type NonSystemMessageType =
+ | MessageType.Default
+ | MessageType.Reply
+ | MessageType.ChatInputCommand
+ | MessageType.ContextMenuCommand;
+
+export type DeletableMessageType =
+ | MessageType.AutoModerationAction
+ | MessageType.ChannelFollowAdd
+ | MessageType.ChannelPinnedMessage
+ | MessageType.ChatInputCommand
+ | MessageType.ContextMenuCommand
+ | MessageType.Default
+ | MessageType.GuildBoost
+ | MessageType.GuildBoostTier1
+ | MessageType.GuildBoostTier2
+ | MessageType.GuildBoostTier3
+ | MessageType.GuildInviteReminder
+ | MessageType.InteractionPremiumUpsell
+ | MessageType.Reply
+ | MessageType.RoleSubscriptionPurchase
+ | MessageType.StageEnd
+ | MessageType.StageRaiseHand
+ | MessageType.StageSpeaker
+ | MessageType.StageStart
+ | MessageType.StageTopic
+ | MessageType.ThreadCreated
+ | MessageType.UserJoin;
+
+export const Constants: {
+ MaxBulkDeletableMessageAge: 1_209_600_000;
+ SweeperKeys: SweeperKey[];
+ NonSystemMessageTypes: NonSystemMessageType[];
+ TextBasedChannelTypes: TextBasedChannelTypes[];
+ GuildTextBasedChannelTypes: GuildTextBasedChannelTypes[];
+ ThreadChannelTypes: ThreadChannelType[];
+ VoiceBasedChannelTypes: VoiceBasedChannelTypes[];
+ SelectMenuTypes: SelectMenuType[];
+ DeletableMessageTypes: DeletableMessageType[];
+ StickerFormatExtensionMap: Record<StickerFormatType, ImageFormat>;
+};
+
+export const version: string;
+
+//#endregion
+
+//#region Errors
+export enum DiscordjsErrorCodes {
+ ClientInvalidOption = 'ClientInvalidOption',
+ ClientInvalidProvidedShards = 'ClientInvalidProvidedShards',
+ ClientMissingIntents = 'ClientMissingIntents',
+ ClientNotReady = 'ClientNotReady',
+
+ TokenInvalid = 'TokenInvalid',
+ TokenMissing = 'TokenMissing',
+ ApplicationCommandPermissionsTokenMissing = 'ApplicationCommandPermissionsTokenMissing',
+
+ /** @deprecated */
+ WSCloseRequested = 'WSCloseRequested',
+ /** @deprecated */
+ WSConnectionExists = 'WSConnectionExists',
+ /** @deprecated */
+ WSNotOpen = 'WSNotOpen',
+ ManagerDestroyed = 'ManagerDestroyed',
+
+ BitFieldInvalid = 'BitFieldInvalid',
+
+ /** @deprecated */
+ ShardingInvalid = 'ShardingInvalid',
+ /** @deprecated */
+ ShardingRequired = 'ShardingRequired',
+ /** @deprecated */
+ InvalidIntents = 'InvalidIntents',
+ /** @deprecated */
+ DisallowedIntents = 'DisallowedIntents',
+ ShardingNoShards = 'ShardingNoShards',
+ ShardingInProcess = 'ShardingInProcess',
+ ShardingInvalidEvalBroadcast = 'ShardingInvalidEvalBroadcast',
+ ShardingShardNotFound = 'ShardingShardNotFound',
+ ShardingAlreadySpawned = 'ShardingAlreadySpawned',
+ ShardingProcessExists = 'ShardingProcessExists',
+ ShardingWorkerExists = 'ShardingWorkerExists',
+ ShardingReadyTimeout = 'ShardingReadyTimeout',
+ ShardingReadyDisconnected = 'ShardingReadyDisconnected',
+ ShardingReadyDied = 'ShardingReadyDied',
+ ShardingNoChildExists = 'ShardingNoChildExists',
+ ShardingShardMiscalculation = 'ShardingShardMiscalculation',
+
+ ColorRange = 'ColorRange',
+ ColorConvert = 'ColorConvert',
+
+ InviteOptionsMissingChannel = 'InviteOptionsMissingChannel',
+
+ ButtonLabel = 'ButtonLabel',
+ ButtonURL = 'ButtonURL',
+ ButtonCustomId = 'ButtonCustomId',
+
+ SelectMenuCustomId = 'SelectMenuCustomId',
+ SelectMenuPlaceholder = 'SelectMenuPlaceholder',
+ SelectOptionLabel = 'SelectOptionLabel',
+ SelectOptionValue = 'SelectOptionValue',
+ SelectOptionDescription = 'SelectOptionDescription',
+
+ InteractionCollectorError = 'InteractionCollectorError',
+
+ FileNotFound = 'FileNotFound',
+
+ UserBannerNotFetched = 'UserBannerNotFetched',
+ UserNoDMChannel = 'UserNoDMChannel',
+
+ VoiceNotStageChannel = 'VoiceNotStageChannel',
+
+ VoiceStateNotOwn = 'VoiceStateNotOwn',
+ VoiceStateInvalidType = 'VoiceStateInvalidType',
+
+ ReqResourceType = 'ReqResourceType',
+
+ ImageFormat = 'ImageFormat',
+ ImageSize = 'ImageSize',
+
+ MessageBulkDeleteType = 'MessageBulkDeleteType',
+ MessageNonceType = 'MessageNonceType',
+ MessageContentType = 'MessageContentType',
+
+ SplitMaxLen = 'SplitMaxLen',
+
+ BanResolveId = 'BanResolveId',
+ FetchBanResolveId = 'FetchBanResolveId',
+
+ PruneDaysType = 'PruneDaysType',
+
+ GuildChannelResolve = 'GuildChannelResolve',
+ GuildVoiceChannelResolve = 'GuildVoiceChannelResolve',
+ GuildChannelOrphan = 'GuildChannelOrphan',
+ GuildChannelUnowned = 'GuildChannelUnowned',
+ GuildOwned = 'GuildOwned',
+ GuildMembersTimeout = 'GuildMembersTimeout',
+ GuildUncachedMe = 'GuildUncachedMe',
+ ChannelNotCached = 'ChannelNotCached',
+ StageChannelResolve = 'StageChannelResolve',
+ GuildScheduledEventResolve = 'GuildScheduledEventResolve',
+ FetchOwnerId = 'FetchOwnerId',
+
+ InvalidType = 'InvalidType',
+ InvalidElement = 'InvalidElement',
+
+ MessageThreadParent = 'MessageThreadParent',
+ MessageExistingThread = 'MessageExistingThread',
+ ThreadInvitableType = 'ThreadInvitableType',
+
+ WebhookMessage = 'WebhookMessage',
+ WebhookTokenUnavailable = 'WebhookTokenUnavailable',
+ WebhookURLInvalid = 'WebhookURLInvalid',
+ WebhookApplication = 'WebhookApplication',
+ MessageReferenceMissing = 'MessageReferenceMissing',
+
+ EmojiType = 'EmojiType',
+ EmojiManaged = 'EmojiManaged',
+ MissingManageGuildExpressionsPermission = 'MissingManageGuildExpressionsPermission',
+ /** @deprecated Use {@link MissingManageGuildExpressionsPermission} instead. */
+ MissingManageEmojisAndStickersPermission = 'MissingManageEmojisAndStickersPermission',
+
+ NotGuildSticker = 'NotGuildSticker',
+
+ ReactionResolveUser = 'ReactionResolveUser',
+
+ VanityURL = 'VanityURL',
+
+ InviteResolveCode = 'InviteResolveCode',
+
+ InviteNotFound = 'InviteNotFound',
+
+ DeleteGroupDMChannel = 'DeleteGroupDMChannel',
+ FetchGroupDMChannel = 'FetchGroupDMChannel',
+
+ MemberFetchNonceLength = 'MemberFetchNonceLength',
+
+ GlobalCommandPermissions = 'GlobalCommandPermissions',
+ GuildUncachedEntityResolve = 'GuildUncachedEntityResolve',
+
+ InteractionAlreadyReplied = 'InteractionAlreadyReplied',
+ InteractionNotReplied = 'InteractionNotReplied',
+ /** @deprecated */
+ InteractionEphemeralReplied = 'InteractionEphemeralReplied',
+
+ CommandInteractionOptionNotFound = 'CommandInteractionOptionNotFound',
+ CommandInteractionOptionType = 'CommandInteractionOptionType',
+ CommandInteractionOptionEmpty = 'CommandInteractionOptionEmpty',
+ CommandInteractionOptionNoSubcommand = 'CommandInteractionOptionNoSubcommand',
+ CommandInteractionOptionNoSubcommandGroup = 'CommandInteractionOptionNoSubcommandGroup',
+ AutocompleteInteractionOptionNoFocusedOption = 'AutocompleteInteractionOptionNoFocusedOption',
+
+ ModalSubmitInteractionFieldNotFound = 'ModalSubmitInteractionFieldNotFound',
+ ModalSubmitInteractionFieldType = 'ModalSubmitInteractionFieldType',
+
+ InvalidMissingScopes = 'InvalidMissingScopes',
+ InvalidScopesWithPermissions = 'InvalidScopesWithPermissions',
+
+ NotImplemented = 'NotImplemented',
+
+ SweepFilterReturn = 'SweepFilterReturn',
+
+ GuildForumMessageRequired = 'GuildForumMessageRequired',
+}
+
+export interface DiscordjsErrorFields<Name extends string> {
+ readonly name: `${Name} [${DiscordjsErrorCodes}]`;
+ get code(): DiscordjsErrorCodes;
+}
+
+export function DiscordjsErrorMixin<T, N extends string>(
+ Base: Constructable<T>,
+ name: N,
+): Constructable<T & DiscordjsErrorFields<N>>;
+
+export class DiscordjsError extends DiscordjsErrorMixin(Error, 'Error') {}
+
+export class DiscordjsTypeError extends DiscordjsErrorMixin(TypeError, 'TypeError') {}
+
+export class DiscordjsRangeError extends DiscordjsErrorMixin(RangeError, 'RangeError') {}
+
+//#endregion
+
+//#region Managers
+
+export abstract class BaseManager {
+ protected constructor(client: Client);
+ public readonly client: Client;
+}
+
+export abstract class DataManager<K, Holds, R> extends BaseManager {
+ protected constructor(client: Client<true>, holds: Constructable<Holds>);
+ public readonly holds: Constructable<Holds>;
+ public get cache(): Collection<K, Holds>;
+ public resolve(resolvable: Holds): Holds;
+ public resolve(resolvable: R): Holds | null;
+ public resolveId(resolvable: K | Holds): K;
+ public resolveId(resolvable: R): K | null;
+ public valueOf(): Collection<K, Holds>;
+}
+
+export abstract class CachedManager<K, Holds, R> extends DataManager<K, Holds, R> {
+ protected constructor(client: Client<true>, holds: Constructable<Holds>, iterable?: Iterable<Holds>);
+ private readonly _cache: Collection<K, Holds>;
+ private _add(data: unknown, cache?: boolean, { id, extras }?: { id: K; extras: unknown[] }): Holds;
+}
+
+export type ApplicationCommandDataResolvable =
+ | ApplicationCommandData
+ | RESTPostAPIApplicationCommandsJSONBody
+ | JSONEncodable<RESTPostAPIApplicationCommandsJSONBody>;
+
+export class ApplicationCommandManager<
+ ApplicationCommandScope = ApplicationCommand<{ guild: GuildResolvable }>,
+ PermissionsOptionsExtras = { guild: GuildResolvable },
+ PermissionsGuildType = null,
+> extends CachedManager<Snowflake, ApplicationCommandScope, ApplicationCommandResolvable> {
+ protected constructor(client: Client<true>, iterable?: Iterable<unknown>);
+ public permissions: ApplicationCommandPermissionsManager<
+ { command?: ApplicationCommandResolvable } & PermissionsOptionsExtras,
+ { command: ApplicationCommandResolvable } & PermissionsOptionsExtras,
+ PermissionsGuildType,
+ null
+ >;
+ private commandPath({ id, guildId }: { id?: Snowflake; guildId?: Snowflake }): string;
+ public create(command: ApplicationCommandDataResolvable, guildId?: Snowflake): Promise<ApplicationCommandScope>;
+ public delete(command: ApplicationCommandResolvable, guildId?: Snowflake): Promise<ApplicationCommandScope | null>;
+ public edit(
+ command: ApplicationCommandResolvable,
+ data: Partial<ApplicationCommandDataResolvable>,
+ ): Promise<ApplicationCommandScope>;
+ public edit(
+ command: ApplicationCommandResolvable,
+ data: Partial<ApplicationCommandDataResolvable>,
+ guildId: Snowflake,
+ ): Promise<ApplicationCommand>;
+ public fetch(
+ id: Snowflake,
+ options: FetchApplicationCommandOptions & { guildId: Snowflake },
+ ): Promise<ApplicationCommand>;
+ public fetch(options: FetchApplicationCommandOptions): Promise<Collection<string, ApplicationCommandScope>>;
+ public fetch(id: Snowflake, options?: FetchApplicationCommandOptions): Promise<ApplicationCommandScope>;
+ public fetch(
+ id?: Snowflake,
+ options?: FetchApplicationCommandOptions,
+ ): Promise<Collection<Snowflake, ApplicationCommandScope>>;
+ public set(
+ commands: readonly ApplicationCommandDataResolvable[],
+ ): Promise<Collection<Snowflake, ApplicationCommandScope>>;
+ public set(
+ commands: readonly ApplicationCommandDataResolvable[],
+ guildId: Snowflake,
+ ): Promise<Collection<Snowflake, ApplicationCommand>>;
+ private static transformCommand(command: ApplicationCommandDataResolvable): RESTPostAPIApplicationCommandsJSONBody;
+}
+
+export class ApplicationCommandPermissionsManager<
+ BaseOptions,
+ FetchSingleOptions,
+ GuildType,
+ CommandIdType,
+> extends BaseManager {
+ private constructor(manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand);
+ private manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand;
+
+ public commandId: CommandIdType;
+ public guild: GuildType;
+ public guildId: Snowflake | null;
+ public add(
+ options: FetchSingleOptions & EditApplicationCommandPermissionsMixin,
+ ): Promise<ApplicationCommandPermissions[]>;
+ public has(
+ options: FetchSingleOptions & {
+ permissionId: ApplicationCommandPermissionIdResolvable;
+ permissionType?: ApplicationCommandPermissionType;
+ },
+ ): Promise<boolean>;
+ public fetch(options: FetchSingleOptions): Promise<ApplicationCommandPermissions[]>;
+ public fetch(options: BaseOptions): Promise<Collection<Snowflake, ApplicationCommandPermissions[]>>;
+ public remove(
+ options:
+ | (FetchSingleOptions & {
+ token: string;
+ channels?: readonly (GuildChannelResolvable | ChannelPermissionConstant)[];
+ roles?: readonly (RoleResolvable | RolePermissionConstant)[];
+ users: readonly UserResolvable[];
+ })
+ | (FetchSingleOptions & {
+ token: string;
+ channels?: readonly (GuildChannelResolvable | ChannelPermissionConstant)[];
+ roles: readonly (RoleResolvable | RolePermissionConstant)[];
+ users?: readonly UserResolvable[];
+ })
+ | (FetchSingleOptions & {
+ token: string;
+ channels: readonly (GuildChannelResolvable | ChannelPermissionConstant)[];
+ roles?: readonly (RoleResolvable | RolePermissionConstant)[];
+ users?: readonly UserResolvable[];
+ }),
+ ): Promise<ApplicationCommandPermissions[]>;
+ public set(
+ options: FetchSingleOptions & EditApplicationCommandPermissionsMixin,
+ ): Promise<ApplicationCommandPermissions[]>;
+ private permissionsPath(guildId: Snowflake, commandId?: Snowflake): string;
+}
+
+export class AutoModerationRuleManager extends CachedManager<
+ Snowflake,
+ AutoModerationRule,
+ AutoModerationRuleResolvable
+> {
+ private constructor(guild: Guild, iterable: unknown);
+ public guild: Guild;
+ public create(options: AutoModerationRuleCreateOptions): Promise<AutoModerationRule>;
+ public edit(
+ autoModerationRule: AutoModerationRuleResolvable,
+ options: AutoModerationRuleEditOptions,
+ ): Promise<AutoModerationRule>;
+ public fetch(options: AutoModerationRuleResolvable | FetchAutoModerationRuleOptions): Promise<AutoModerationRule>;
+ public fetch(options?: FetchAutoModerationRulesOptions): Promise<Collection<Snowflake, AutoModerationRule>>;
+ public delete(autoModerationRule: AutoModerationRuleResolvable, reason?: string): Promise<void>;
+}
+
+export class BaseGuildEmojiManager extends CachedManager<Snowflake, GuildEmoji, EmojiResolvable> {
+ protected constructor(client: Client<true>, iterable?: Iterable<RawGuildEmojiData>);
+ public resolveIdentifier(emoji: EmojiIdentifierResolvable): string | null;
+}
+
+export class CategoryChannelChildManager extends DataManager<Snowflake, CategoryChildChannel, GuildChannelResolvable> {
+ private constructor(channel: CategoryChannel);
+
+ public channel: CategoryChannel;
+ public get guild(): Guild;
+ public create<T extends CategoryChannelType>(
+ options: CategoryCreateChannelOptions & { type: T },
+ ): Promise<MappedChannelCategoryTypes[T]>;
+ public create(options: CategoryCreateChannelOptions): Promise<TextChannel>;
+}
+
+export class ChannelManager extends CachedManager<Snowflake, Channel, ChannelResolvable> {
+ private constructor(client: Client<true>, iterable: Iterable<RawChannelData>);
+ public fetch(id: Snowflake, options?: FetchChannelOptions): Promise<Channel | null>;
+}
+
+export type FetchGuildApplicationCommandFetchOptions = Omit<FetchApplicationCommandOptions, 'guildId'>;
+
+export class GuildApplicationCommandManager extends ApplicationCommandManager<ApplicationCommand, {}, Guild> {
+ private constructor(guild: Guild, iterable?: Iterable<RawApplicationCommandData>);
+ public guild: Guild;
+ public create(command: ApplicationCommandDataResolvable): Promise<ApplicationCommand>;
+ public delete(command: ApplicationCommandResolvable): Promise<ApplicationCommand | null>;
+ public edit(
+ command: ApplicationCommandResolvable,
+ data: Partial<ApplicationCommandDataResolvable>,
+ ): Promise<ApplicationCommand>;
+ public fetch(id: Snowflake, options?: FetchGuildApplicationCommandFetchOptions): Promise<ApplicationCommand>;
+ public fetch(options: FetchGuildApplicationCommandFetchOptions): Promise<Collection<Snowflake, ApplicationCommand>>;
+ public fetch(
+ id?: undefined,
+ options?: FetchGuildApplicationCommandFetchOptions,
+ ): Promise<Collection<Snowflake, ApplicationCommand>>;
+ public set(commands: ApplicationCommandDataResolvable[]): Promise<Collection<Snowflake, ApplicationCommand>>;
+}
+
+export type MappedGuildChannelTypes = {
+ [ChannelType.GuildCategory]: CategoryChannel;
+} & MappedChannelCategoryTypes;
+
+export type GuildChannelTypes = CategoryChannelType | ChannelType.GuildCategory;
+
+export class GuildChannelManager extends CachedManager<Snowflake, GuildBasedChannel, GuildChannelResolvable> {
+ private constructor(guild: Guild, iterable?: Iterable<RawGuildChannelData>);
+ public get channelCountWithoutThreads(): number;
+ public guild: Guild;
+
+ public addFollower(
+ channel: NewsChannel | Snowflake,
+ targetChannel: TextChannelResolvable,
+ reason?: string,
+ ): Promise<Snowflake>;
+ public create<T extends GuildChannelTypes>(
+ options: GuildChannelCreateOptions & { type: T },
+ ): Promise<MappedGuildChannelTypes[T]>;
+ public create(options: GuildChannelCreateOptions): Promise<TextChannel>;
+ public createWebhook(options: WebhookCreateOptions): Promise<Webhook>;
+ public edit(channel: GuildChannelResolvable, data: GuildChannelEditOptions): Promise<GuildChannel>;
+ public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<GuildBasedChannel | null>;
+ public fetch(
+ id?: undefined,
+ options?: BaseFetchOptions,
+ ): Promise<Collection<Snowflake, NonThreadGuildBasedChannel | null>>;
+ public fetchWebhooks(channel: GuildChannelResolvable): Promise<Collection<Snowflake, Webhook>>;
+ public setPosition(
+ channel: GuildChannelResolvable,
+ position: number,
+ options?: SetChannelPositionOptions,
+ ): Promise<GuildChannel>;
+ public setPositions(channelPositions: readonly ChannelPosition[]): Promise<Guild>;
+ public fetchActiveThreads(cache?: boolean): Promise<FetchedThreads>;
+ private rawFetchGuildActiveThreads(): Promise<RESTGetAPIGuildThreadsResult>;
+ public delete(channel: GuildChannelResolvable, reason?: string): Promise<void>;
+}
+
+export class GuildEmojiManager extends BaseGuildEmojiManager {
+ private constructor(guild: Guild, iterable?: Iterable<RawGuildEmojiData>);
+ public guild: Guild;
+ public create(options: GuildEmojiCreateOptions): Promise<GuildEmoji>;
+ public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<GuildEmoji>;
+ public fetch(id?: undefined, options?: BaseFetchOptions): Promise<Collection<Snowflake, GuildEmoji>>;
+ public fetchAuthor(emoji: EmojiResolvable): Promise<User>;
+ public delete(emoji: EmojiResolvable, reason?: string): Promise<void>;
+ public edit(emoji: EmojiResolvable, options: GuildEmojiEditOptions): Promise<GuildEmoji>;
+}
+
+export class GuildEmojiRoleManager extends DataManager<Snowflake, Role, RoleResolvable> {
+ private constructor(emoji: GuildEmoji);
+ public emoji: GuildEmoji;
+ public guild: Guild;
+ public add(
+ roleOrRoles: RoleResolvable | readonly RoleResolvable[] | Collection<Snowflake, Role>,
+ ): Promise<GuildEmoji>;
+ public set(roles: readonly RoleResolvable[] | Collection<Snowflake, Role>): Promise<GuildEmoji>;
+ public remove(
+ roleOrRoles: RoleResolvable | readonly RoleResolvable[] | Collection<Snowflake, Role>,
+ ): Promise<GuildEmoji>;
+}
+
+export class GuildManager extends CachedManager<Snowflake, Guild, GuildResolvable> {
+ private constructor(client: Client<true>, iterable?: Iterable<RawGuildData>);
+ public create(options: GuildCreateOptions): Promise<Guild>;
+ public fetch(options: Snowflake | FetchGuildOptions): Promise<Guild>;
+ public fetch(options?: FetchGuildsOptions): Promise<Collection<Snowflake, OAuth2Guild>>;
+}
+
+export interface AddOrRemoveGuildMemberRoleOptions {
+ user: GuildMemberResolvable;
+ role: RoleResolvable;
+ reason?: string;
+}
+
+export class GuildMemberManager extends CachedManager<Snowflake, GuildMember, GuildMemberResolvable> {
+ private constructor(guild: Guild, iterable?: Iterable<RawGuildMemberData>);
+ public guild: Guild;
+ public get me(): GuildMember | null;
+ public add(
+ user: UserResolvable,
+ options: AddGuildMemberOptions & { fetchWhenExisting: false },
+ ): Promise<GuildMember | null>;
+ public add(user: UserResolvable, options: AddGuildMemberOptions): Promise<GuildMember>;
+ public ban(user: UserResolvable, options?: BanOptions): Promise<GuildMember | User | Snowflake>;
+ public edit(user: UserResolvable, options: GuildMemberEditOptions): Promise<GuildMember>;
+ public fetch(
+ options: UserResolvable | FetchMemberOptions | (FetchMembersOptions & { user: UserResolvable }),
+ ): Promise<GuildMember>;
+ public fetch(options?: FetchMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
+ public fetchMe(options?: BaseFetchOptions): Promise<GuildMember>;
+ public kick(user: UserResolvable, reason?: string): Promise<GuildMember | User | Snowflake>;
+ public list(options?: GuildListMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
+ public prune(options: GuildPruneMembersOptions & { dry?: false; count: false }): Promise<null>;
+ public prune(options?: GuildPruneMembersOptions): Promise<number>;
+ public search(options: GuildSearchMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
+ public unban(user: UserResolvable, reason?: string): Promise<User | null>;
+ public addRole(options: AddOrRemoveGuildMemberRoleOptions): Promise<GuildMember | User | Snowflake>;
+ public removeRole(options: AddOrRemoveGuildMemberRoleOptions): Promise<GuildMember | User | Snowflake>;
+}
+
+export class GuildBanManager extends CachedManager<Snowflake, GuildBan, GuildBanResolvable> {
+ private constructor(guild: Guild, iterable?: Iterable<RawGuildBanData>);
+ public guild: Guild;
+ public create(user: UserResolvable, options?: BanOptions): Promise<GuildMember | User | Snowflake>;
+ public fetch(options: UserResolvable | FetchBanOptions): Promise<GuildBan>;
+ public fetch(options?: FetchBansOptions): Promise<Collection<Snowflake, GuildBan>>;
+ public remove(user: UserResolvable, reason?: string): Promise<User | null>;
+}
+
+export class GuildInviteManager extends DataManager<string, Invite, InviteResolvable> {
+ private constructor(guild: Guild, iterable?: Iterable<RawInviteData>);
+ public guild: Guild;
+ public create(channel: GuildInvitableChannelResolvable, options?: InviteCreateOptions): Promise<Invite>;
+ public fetch(options: InviteResolvable | FetchInviteOptions): Promise<Invite>;
+ public fetch(options?: FetchInvitesOptions): Promise<Collection<string, Invite>>;
+ public delete(invite: InviteResolvable, reason?: string): Promise<Invite>;
+}
+
+export class GuildScheduledEventManager extends CachedManager<
+ Snowflake,
+ GuildScheduledEvent,
+ GuildScheduledEventResolvable
+> {
+ private constructor(guild: Guild, iterable?: Iterable<RawGuildScheduledEventData>);
+ public guild: Guild;
+ public create(options: GuildScheduledEventCreateOptions): Promise<GuildScheduledEvent>;
+ public fetch(): Promise<Collection<Snowflake, GuildScheduledEvent>>;
+ public fetch<
+ T extends GuildScheduledEventResolvable | FetchGuildScheduledEventOptions | FetchGuildScheduledEventsOptions,
+ >(options?: T): Promise<GuildScheduledEventManagerFetchResult<T>>;
+ public edit<S extends GuildScheduledEventStatus, T extends GuildScheduledEventSetStatusArg<S>>(
+ guildScheduledEvent: GuildScheduledEventResolvable,
+ options: GuildScheduledEventEditOptions<S, T>,
+ ): Promise<GuildScheduledEvent<T>>;
+ public delete(guildScheduledEvent: GuildScheduledEventResolvable): Promise<void>;
+ public fetchSubscribers<T extends FetchGuildScheduledEventSubscribersOptions>(
+ guildScheduledEvent: GuildScheduledEventResolvable,
+ options?: T,
+ ): Promise<GuildScheduledEventManagerFetchSubscribersResult<T>>;
+}
+
+export class GuildStickerManager extends CachedManager<Snowflake, Sticker, StickerResolvable> {
+ private constructor(guild: Guild, iterable?: Iterable<RawStickerData>);
+ public guild: Guild;
+ public create(options: GuildStickerCreateOptions): Promise<Sticker>;
+ public edit(sticker: StickerResolvable, data?: GuildStickerEditOptions): Promise<Sticker>;
+ public delete(sticker: StickerResolvable, reason?: string): Promise<void>;
+ public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<Sticker>;
+ public fetch(id?: Snowflake, options?: BaseFetchOptions): Promise<Collection<Snowflake, Sticker>>;
+ public fetchUser(sticker: StickerResolvable): Promise<User | null>;
+}
+
+export class GuildMemberRoleManager extends DataManager<Snowflake, Role, RoleResolvable> {
+ private constructor(member: GuildMember);
+ public get hoist(): Role | null;
+ public get icon(): Role | null;
+ public get color(): Role | null;
+ public get highest(): Role;
+ public get premiumSubscriberRole(): Role | null;
+ public get botRole(): Role | null;
+ public member: GuildMember;
+ public guild: Guild;
+
+ public add(
+ roleOrRoles: RoleResolvable | readonly RoleResolvable[] | Collection<Snowflake, Role>,
+ reason?: string,
+ ): Promise<GuildMember>;
+ public set(roles: readonly RoleResolvable[] | Collection<Snowflake, Role>, reason?: string): Promise<GuildMember>;
+ public remove(
+ roleOrRoles: RoleResolvable | readonly RoleResolvable[] | Collection<Snowflake, Role>,
+ reason?: string,
+ ): Promise<GuildMember>;
+}
+
+export abstract class MessageManager<InGuild extends boolean = boolean> extends CachedManager<
+ Snowflake,
+ Message<InGuild>,
+ MessageResolvable
+> {
+ protected constructor(channel: TextBasedChannel, iterable?: Iterable<RawMessageData>);
+ public channel: TextBasedChannel;
+ public delete(message: MessageResolvable): Promise<void>;
+ public edit(
+ message: MessageResolvable,
+ options: string | MessagePayload | MessageEditOptions,
+ ): Promise<Message<InGuild>>;
+ public fetch(options: MessageResolvable | FetchMessageOptions): Promise<Message<InGuild>>;
+ public fetch(options?: FetchMessagesOptions): Promise<Collection<Snowflake, Message<InGuild>>>;
+ public fetchPinned(cache?: boolean): Promise<Collection<Snowflake, Message<InGuild>>>;
+ public react(message: MessageResolvable, emoji: EmojiIdentifierResolvable): Promise<void>;
+ public pin(message: MessageResolvable, reason?: string): Promise<void>;
+ public unpin(message: MessageResolvable, reason?: string): Promise<void>;
+}
+
+export class DMMessageManager extends MessageManager {
+ public channel: DMChannel;
+}
+
+export class GuildMessageManager extends MessageManager<true> {
+ public channel: GuildTextBasedChannel;
+ public crosspost(message: MessageResolvable): Promise<Message<true>>;
+}
+
+export class PermissionOverwriteManager extends CachedManager<
+ Snowflake,
+ PermissionOverwrites,
+ PermissionOverwriteResolvable
+> {
+ private constructor(client: Client<true>, iterable?: Iterable<RawPermissionOverwriteData>);
+ public set(
+ overwrites: readonly OverwriteResolvable[] | Collection<Snowflake, OverwriteResolvable>,
+ reason?: string,
+ ): Promise<NonThreadGuildBasedChannel>;
+ private upsert(
+ userOrRole: RoleResolvable | UserResolvable,
+ options: PermissionOverwriteOptions,
+ overwriteOptions?: GuildChannelOverwriteOptions,
+ existing?: PermissionOverwrites,
+ ): Promise<NonThreadGuildBasedChannel>;
+ public create(
+ userOrRole: RoleResolvable | UserResolvable,
+ options: PermissionOverwriteOptions,
+ overwriteOptions?: GuildChannelOverwriteOptions,
+ ): Promise<NonThreadGuildBasedChannel>;
+ public edit(
+ userOrRole: RoleResolvable | UserResolvable,
+ options: PermissionOverwriteOptions,
+ overwriteOptions?: GuildChannelOverwriteOptions,
+ ): Promise<NonThreadGuildBasedChannel>;
+ public delete(userOrRole: RoleResolvable | UserResolvable, reason?: string): Promise<NonThreadGuildBasedChannel>;
+}
+
+export class PresenceManager extends CachedManager<Snowflake, Presence, PresenceResolvable> {
+ private constructor(client: Client<true>, iterable?: Iterable<RawPresenceData>);
+}
+
+export class ReactionManager extends CachedManager<Snowflake | string, MessageReaction, MessageReactionResolvable> {
+ private constructor(message: Message, iterable?: Iterable<RawMessageReactionData>);
+ public message: Message;
+ public removeAll(): Promise<Message>;
+}
+
+export class ReactionUserManager extends CachedManager<Snowflake, User, UserResolvable> {
+ private constructor(reaction: MessageReaction, iterable?: Iterable<RawUserData>);
+ public reaction: MessageReaction;
+ public fetch(options?: FetchReactionUsersOptions): Promise<Collection<Snowflake, User>>;
+ public remove(user?: UserResolvable): Promise<MessageReaction>;
+}
+
+export class RoleManager extends CachedManager<Snowflake, Role, RoleResolvable> {
+ private constructor(guild: Guild, iterable?: Iterable<RawRoleData>);
+ public get everyone(): Role;
+ public get highest(): Role;
+ public guild: Guild;
+ public get premiumSubscriberRole(): Role | null;
+ public botRoleFor(user: UserResolvable): Role | null;
+ public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<Role | null>;
+ public fetch(id?: undefined, options?: BaseFetchOptions): Promise<Collection<Snowflake, Role>>;
+ public create(options?: RoleCreateOptions): Promise<Role>;
+ public edit(role: RoleResolvable, options: RoleEditOptions): Promise<Role>;
+ public delete(role: RoleResolvable, reason?: string): Promise<void>;
+ public setPosition(role: RoleResolvable, position: number, options?: SetRolePositionOptions): Promise<Role>;
+ public setPositions(rolePositions: readonly RolePosition[]): Promise<Guild>;
+ public comparePositions(role1: RoleResolvable, role2: RoleResolvable): number;
+}
+
+export class StageInstanceManager extends CachedManager<Snowflake, StageInstance, StageInstanceResolvable> {
+ private constructor(guild: Guild, iterable?: Iterable<RawStageInstanceData>);
+ public guild: Guild;
+ public create(channel: StageChannelResolvable, options: StageInstanceCreateOptions): Promise<StageInstance>;
+ public fetch(channel: StageChannelResolvable, options?: BaseFetchOptions): Promise<StageInstance>;
+ public edit(channel: StageChannelResolvable, options: StageInstanceEditOptions): Promise<StageInstance>;
+ public delete(channel: StageChannelResolvable): Promise<void>;
+}
+
+export class ThreadManager<Forum extends boolean = boolean> extends CachedManager<
+ Snowflake,
+ ThreadChannel<Forum>,
+ ThreadChannelResolvable
+> {
+ protected constructor(channel: TextChannel | NewsChannel | ForumChannel, iterable?: Iterable<RawThreadChannelData>);
+ public channel: If<Forum, ForumChannel, TextChannel | NewsChannel>;
+ public fetch(options: ThreadChannelResolvable, cacheOptions?: BaseFetchOptions): Promise<AnyThreadChannel | null>;
+ public fetch(
+ options: FetchThreadsOptions & { archived: FetchArchivedThreadOptions },
+ cacheOptions?: { cache?: boolean },
+ ): Promise<FetchedThreadsMore>;
+ public fetch(options?: FetchThreadsOptions, cacheOptions?: { cache?: boolean }): Promise<FetchedThreads>;
+ public fetchArchived(options?: FetchArchivedThreadOptions, cache?: boolean): Promise<FetchedThreadsMore>;
+ public fetchActive(cache?: boolean): Promise<FetchedThreads>;
+}
+
+export class GuildTextThreadManager<AllowedThreadType> extends ThreadManager<false> {
+ public create(options: GuildTextThreadCreateOptions<AllowedThreadType>): Promise<ThreadChannel>;
+}
+
+export class GuildForumThreadManager extends ThreadManager<true> {
+ public create(options: GuildForumThreadCreateOptions): Promise<ThreadChannel>;
+}
+
+export class ThreadMemberManager extends CachedManager<Snowflake, ThreadMember, ThreadMemberResolvable> {
+ private constructor(thread: ThreadChannel, iterable?: Iterable<RawThreadMemberData>);
+ public thread: AnyThreadChannel;
+ public get me(): ThreadMember | null;
+ public add(member: UserResolvable | '@me', reason?: string): Promise<Snowflake>;
+
+ public fetch(
+ options: ThreadMember<true> | ((FetchThreadMemberOptions & { withMember: true }) | { member: ThreadMember<true> }),
+ ): Promise<ThreadMember<true>>;
+
+ public fetch(options: ThreadMemberResolvable | FetchThreadMemberOptions): Promise<ThreadMember>;
+
+ public fetch(
+ options: FetchThreadMembersWithGuildMemberDataOptions,
+ ): Promise<Collection<Snowflake, ThreadMember<true>>>;
+
+ public fetch(options?: FetchThreadMembersWithoutGuildMemberDataOptions): Promise<Collection<Snowflake, ThreadMember>>;
+ public fetchMe(options?: BaseFetchOptions): Promise<ThreadMember>;
+ public remove(id: Snowflake | '@me', reason?: string): Promise<Snowflake>;
+}
+
+export class UserManager extends CachedManager<Snowflake, User, UserResolvable> {
+ private constructor(client: Client<true>, iterable?: Iterable<RawUserData>);
+ private dmChannel(userId: Snowflake): DMChannel | null;
+ public createDM(user: UserResolvable, options?: BaseFetchOptions): Promise<DMChannel>;
+ public deleteDM(user: UserResolvable): Promise<DMChannel>;
+ public fetch(user: UserResolvable, options?: BaseFetchOptions): Promise<User>;
+ public fetchFlags(user: UserResolvable, options?: BaseFetchOptions): Promise<UserFlagsBitField>;
+ public send(user: UserResolvable, options: string | MessagePayload | MessageCreateOptions): Promise<Message>;
+}
+
+export class VoiceStateManager extends CachedManager<Snowflake, VoiceState, typeof VoiceState> {
+ private constructor(guild: Guild, iterable?: Iterable<RawVoiceStateData>);
+ public guild: Guild;
+}
+
+//#endregion
+
+//#region Mixins
+
+// Model the TextBasedChannel mixin system, allowing application of these fields
+// to the classes that use these methods without having to manually add them
+// to each of those classes
+
+export type Constructable<T> = abstract new (...args: any[]) => T;
+export function PartialTextBasedChannel<T>(
+ Base?: Constructable<T>,
+): Constructable<T & PartialTextBasedChannelFields<false>>;
+
+export function TextBasedChannelMixin<
+ T,
+ InGuild extends boolean = boolean,
+ I extends keyof TextBasedChannelFields<InGuild> = never,
+>(
+ Base?: Constructable<T>,
+ inGuild?: InGuild,
+ ignore?: I[],
+): Constructable<T & Omit<TextBasedChannelFields<InGuild>, I>>;
+
+export interface PartialTextBasedChannelFields<InGuild extends boolean = boolean> {
+ send(options: string | MessagePayload | MessageCreateOptions): Promise<Message<InGuild>>;
+}
+
+export interface TextBasedChannelFields<InGuild extends boolean = boolean>
+ extends PartialTextBasedChannelFields<InGuild> {
+ lastMessageId: Snowflake | null;
+ get lastMessage(): Message | null;
+ lastPinTimestamp: number | null;
+ get lastPinAt(): Date | null;
+ messages: If<InGuild, GuildMessageManager, DMMessageManager>;
+ awaitMessageComponent<T extends MessageComponentType>(
+ options?: AwaitMessageCollectorOptionsParams<T, true>,
+ ): Promise<MappedInteractionTypes[T]>;
+ awaitMessages(options?: AwaitMessagesOptions): Promise<Collection<Snowflake, Message>>;
+ bulkDelete(
+ messages: Collection<Snowflake, Message> | readonly MessageResolvable[] | number,
+ filterOld?: boolean,
+ ): Promise<Collection<Snowflake, Message | PartialMessage | undefined>>;
+ createMessageComponentCollector<T extends MessageComponentType>(
+ options?: MessageChannelCollectorOptionsParams<T, true>,
+ ): InteractionCollector<MappedInteractionTypes[T]>;
+ createMessageCollector(options?: MessageCollectorOptions): MessageCollector;
+ createWebhook(options: ChannelWebhookCreateOptions): Promise<Webhook>;
+ fetchWebhooks(): Promise<Collection<Snowflake, Webhook>>;
+ sendTyping(): Promise<void>;
+ setRateLimitPerUser(rateLimitPerUser: number, reason?: string): Promise<this>;
+ setNSFW(nsfw?: boolean, reason?: string): Promise<this>;
+}
+
+export function PartialWebhookMixin<T>(Base?: Constructable<T>): Constructable<T & PartialWebhookFields>;
+export function WebhookMixin<T>(Base?: Constructable<T>): Constructable<T & WebhookFields>;
+
+export interface PartialWebhookFields {
+ id: Snowflake;
+ get url(): string;
+ deleteMessage(message: MessageResolvable | APIMessage | '@original', threadId?: Snowflake): Promise<void>;
+ editMessage(
+ message: MessageResolvable | '@original',
+ options: string | MessagePayload | WebhookMessageEditOptions,
+ ): Promise<APIMessage | Message>;
+ fetchMessage(message: Snowflake | '@original', options?: WebhookFetchMessageOptions): Promise<APIMessage | Message>;
+ send(
+ options: string | MessagePayload | InteractionReplyOptions | WebhookMessageCreateOptions,
+ ): Promise<APIMessage | Message>;
+}
+
+export interface WebhookFields extends PartialWebhookFields {
+ get createdAt(): Date;
+ get createdTimestamp(): number;
+ delete(reason?: string): Promise<void>;
+ edit(options: WebhookEditOptions): Promise<Webhook>;
+ sendSlackMessage(body: unknown): Promise<boolean>;
+}
+
+//#endregion
+
+//#region Typedefs
+
+export type ActivitiesOptions = Omit<ActivityOptions, 'shardId'>;
+
+export interface ActivityOptions {
+ name: string;
+ state?: string;
+ url?: string;
+ type?: ActivityType;
+ shardId?: number | readonly number[];
+}
+
+export interface AddGuildMemberOptions {
+ accessToken: string;
+ nick?: string;
+ roles?: Collection<Snowflake, Role> | RoleResolvable[];
+ mute?: boolean;
+ deaf?: boolean;
+ force?: boolean;
+ fetchWhenExisting?: boolean;
+}
+
+export type AllowedPartial = User | Channel | GuildMember | Message | MessageReaction | ThreadMember;
+
+export type AllowedThreadTypeForNewsChannel = ChannelType.AnnouncementThread;
+
+export type AllowedThreadTypeForTextChannel = ChannelType.PublicThread | ChannelType.PrivateThread;
+
+export interface BaseApplicationCommandData {
+ name: string;
+ nameLocalizations?: LocalizationMap;
+ dmPermission?: boolean;
+ defaultMemberPermissions?: PermissionResolvable | null;
+ nsfw?: boolean;
+}
+
+export interface AttachmentData {
+ name?: string;
+ description?: string;
+}
+
+export type CommandOptionDataTypeResolvable = ApplicationCommandOptionType;
+
+export type CommandOptionChannelResolvableType = ApplicationCommandOptionType.Channel;
+
+export type CommandOptionChoiceResolvableType =
+ | ApplicationCommandOptionType.String
+ | CommandOptionNumericResolvableType;
+
+export type CommandOptionNumericResolvableType =
+ | ApplicationCommandOptionType.Number
+ | ApplicationCommandOptionType.Integer;
+
+export type CommandOptionSubOptionResolvableType =
+ | ApplicationCommandOptionType.Subcommand
+ | ApplicationCommandOptionType.SubcommandGroup;
+
+export type CommandOptionNonChoiceResolvableType = Exclude<
+ CommandOptionDataTypeResolvable,
+ CommandOptionChoiceResolvableType | CommandOptionSubOptionResolvableType | CommandOptionChannelResolvableType
+>;
+
+export interface BaseApplicationCommandOptionsData {
+ name: string;
+ nameLocalizations?: LocalizationMap;
+ description: string;
+ descriptionLocalizations?: LocalizationMap;
+ required?: boolean;
+ autocomplete?: never;
+}
+
+export interface UserApplicationCommandData extends BaseApplicationCommandData {
+ type: ApplicationCommandType.User;
+}
+
+export interface MessageApplicationCommandData extends BaseApplicationCommandData {
+ type: ApplicationCommandType.Message;
+}
+
+export interface ChatInputApplicationCommandData extends BaseApplicationCommandData {
+ description: string;
+ descriptionLocalizations?: LocalizationMap;
+ type?: ApplicationCommandType.ChatInput;
+ options?: readonly ApplicationCommandOptionData[];
+}
+
+export type ApplicationCommandData =
+ | UserApplicationCommandData
+ | MessageApplicationCommandData
+ | ChatInputApplicationCommandData;
+
+export interface ApplicationCommandChannelOptionData extends BaseApplicationCommandOptionsData {
+ type: CommandOptionChannelResolvableType;
+ channelTypes?: readonly ApplicationCommandOptionAllowedChannelTypes[];
+ channel_types?: readonly ApplicationCommandOptionAllowedChannelTypes[];
+}
+
+export interface ApplicationCommandChannelOption extends BaseApplicationCommandOptionsData {
+ type: ApplicationCommandOptionType.Channel;
+ channelTypes?: readonly ApplicationCommandOptionAllowedChannelTypes[];
+}
+
+export interface ApplicationCommandRoleOptionData extends BaseApplicationCommandOptionsData {
+ type: ApplicationCommandOptionType.Role;
+}
+
+export interface ApplicationCommandRoleOption extends BaseApplicationCommandOptionsData {
+ type: ApplicationCommandOptionType.Role;
+}
+
+export interface ApplicationCommandUserOptionData extends BaseApplicationCommandOptionsData {
+ type: ApplicationCommandOptionType.User;
+}
+
+export interface ApplicationCommandUserOption extends BaseApplicationCommandOptionsData {
+ type: ApplicationCommandOptionType.User;
+}
+
+export interface ApplicationCommandMentionableOptionData extends BaseApplicationCommandOptionsData {
+ type: ApplicationCommandOptionType.Mentionable;
+}
+
+export interface ApplicationCommandMentionableOption extends BaseApplicationCommandOptionsData {
+ type: ApplicationCommandOptionType.Mentionable;
+}
+
+export interface ApplicationCommandAttachmentOption extends BaseApplicationCommandOptionsData {
+ type: ApplicationCommandOptionType.Attachment;
+}
+
+export interface ApplicationCommandAutocompleteNumericOption
+ extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> {
+ type: CommandOptionNumericResolvableType;
+ minValue?: number;
+ maxValue?: number;
+ autocomplete: true;
+}
+
+export interface ApplicationCommandAutocompleteStringOption
+ extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> {
+ type: ApplicationCommandOptionType.String;
+ minLength?: number;
+ maxLength?: number;
+ autocomplete: true;
+}
+
+export interface ApplicationCommandAutocompleteNumericOptionData
+ extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> {
+ type: CommandOptionNumericResolvableType;
+ minValue?: number;
+ min_value?: number;
+ maxValue?: number;
+ max_value?: number;
+ autocomplete: true;
+}
+
+export interface ApplicationCommandAutocompleteStringOptionData
+ extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> {
+ type: ApplicationCommandOptionType.String;
+ minLength?: number;
+ min_length?: number;
+ maxLength?: number;
+ max_length?: number;
+ autocomplete: true;
+}
+
+export interface ApplicationCommandChoicesData<Type extends string | number = string | number>
+ extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> {
+ type: CommandOptionChoiceResolvableType;
+ choices?: readonly ApplicationCommandOptionChoiceData<Type>[];
+ autocomplete?: false;
+}
+
+export interface ApplicationCommandChoicesOption<Type extends string | number = string | number>
+ extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> {
+ type: CommandOptionChoiceResolvableType;
+ choices?: readonly ApplicationCommandOptionChoiceData<Type>[];
+ autocomplete?: false;
+}
+
+export interface ApplicationCommandNumericOptionData extends ApplicationCommandChoicesData<number> {
+ type: CommandOptionNumericResolvableType;
+ minValue?: number;
+ min_value?: number;
+ maxValue?: number;
+ max_value?: number;
+}
+
+export interface ApplicationCommandStringOptionData extends ApplicationCommandChoicesData<string> {
+ type: ApplicationCommandOptionType.String;
+ minLength?: number;
+ min_length?: number;
+ maxLength?: number;
+ max_length?: number;
+}
+
+export interface ApplicationCommandBooleanOptionData extends BaseApplicationCommandOptionsData {
+ type: ApplicationCommandOptionType.Boolean;
+}
+
+export interface ApplicationCommandNumericOption extends ApplicationCommandChoicesOption<number> {
+ type: CommandOptionNumericResolvableType;
+ minValue?: number;
+ maxValue?: number;
+}
+
+export interface ApplicationCommandStringOption extends ApplicationCommandChoicesOption<string> {
+ type: ApplicationCommandOptionType.String;
+ minLength?: number;
+ maxLength?: number;
+}
+
+export interface ApplicationCommandBooleanOption extends BaseApplicationCommandOptionsData {
+ type: ApplicationCommandOptionType.Boolean;
+}
+
+export interface ApplicationCommandSubGroupData extends Omit<BaseApplicationCommandOptionsData, 'required'> {
+ type: ApplicationCommandOptionType.SubcommandGroup;
+ options: readonly ApplicationCommandSubCommandData[];
+}
+
+export interface ApplicationCommandSubGroup extends Omit<BaseApplicationCommandOptionsData, 'required'> {
+ type: ApplicationCommandOptionType.SubcommandGroup;
+ options?: readonly ApplicationCommandSubCommand[];
+}
+
+export interface ApplicationCommandSubCommandData extends Omit<BaseApplicationCommandOptionsData, 'required'> {
+ type: ApplicationCommandOptionType.Subcommand;
+ options?: readonly Exclude<
+ ApplicationCommandOptionData,
+ ApplicationCommandSubGroupData | ApplicationCommandSubCommandData
+ >[];
+}
+
+export interface ApplicationCommandSubCommand extends Omit<BaseApplicationCommandOptionsData, 'required'> {
+ type: ApplicationCommandOptionType.Subcommand;
+ options?: readonly Exclude<ApplicationCommandOption, ApplicationCommandSubGroup | ApplicationCommandSubCommand>[];
+}
+
+export interface ApplicationCommandNonOptionsData extends BaseApplicationCommandOptionsData {
+ type: CommandOptionNonChoiceResolvableType;
+}
+
+export interface ApplicationCommandNonOptions extends BaseApplicationCommandOptionsData {
+ type: Exclude<CommandOptionNonChoiceResolvableType, ApplicationCommandOptionType>;
+}
+
+export type ApplicationCommandOptionData =
+ | ApplicationCommandSubGroupData
+ | ApplicationCommandNonOptionsData
+ | ApplicationCommandChannelOptionData
+ | ApplicationCommandAutocompleteNumericOptionData
+ | ApplicationCommandAutocompleteStringOptionData
+ | ApplicationCommandNumericOptionData
+ | ApplicationCommandStringOptionData
+ | ApplicationCommandRoleOptionData
+ | ApplicationCommandUserOptionData
+ | ApplicationCommandMentionableOptionData
+ | ApplicationCommandBooleanOptionData
+ | ApplicationCommandSubCommandData;
+
+export type ApplicationCommandOption =
+ | ApplicationCommandSubGroup
+ | ApplicationCommandAutocompleteNumericOption
+ | ApplicationCommandAutocompleteStringOption
+ | ApplicationCommandNonOptions
+ | ApplicationCommandChannelOption
+ | ApplicationCommandNumericOption
+ | ApplicationCommandStringOption
+ | ApplicationCommandRoleOption
+ | ApplicationCommandUserOption
+ | ApplicationCommandMentionableOption
+ | ApplicationCommandBooleanOption
+ | ApplicationCommandAttachmentOption
+ | ApplicationCommandSubCommand;
+
+export interface ApplicationCommandOptionChoiceData<Value extends string | number = string | number> {
+ name: string;
+ nameLocalizations?: LocalizationMap;
+ value: Value;
+}
+
+export interface ApplicationCommandPermissions {
+ id: Snowflake;
+ type: ApplicationCommandPermissionType;
+ permission: boolean;
+}
+
+export interface ApplicationCommandPermissionsUpdateData {
+ id: Snowflake;
+ guildId: Snowflake;
+ applicationId: Snowflake;
+ permissions: readonly ApplicationCommandPermissions[];
+}
+
+export interface EditApplicationCommandPermissionsMixin {
+ permissions: readonly ApplicationCommandPermissions[];
+ token: string;
+}
+
+export type ChannelPermissionConstant = Snowflake;
+
+export type RolePermissionConstant = Snowflake;
+
+export type ApplicationCommandPermissionIdResolvable =
+ | GuildChannelResolvable
+ | RoleResolvable
+ | UserResolvable
+ | ChannelPermissionConstant
+ | RolePermissionConstant;
+
+export type ApplicationCommandResolvable = ApplicationCommand | Snowflake;
+
+export type ApplicationFlagsString = keyof typeof ApplicationFlags;
+
+export interface ApplicationRoleConnectionMetadataEditOptions {
+ name: string;
+ nameLocalizations?: LocalizationMap | null;
+ description: string;
+ descriptionLocalizations?: LocalizationMap | null;
+ key: string;
+ type: ApplicationRoleConnectionMetadataType;
+}
+
+export interface AuditLogChange {
+ key: APIAuditLogChange['key'];
+ old?: APIAuditLogChange['old_value'];
+ new?: APIAuditLogChange['new_value'];
+}
+
+export interface AutoModerationAction {
+ type: AutoModerationActionType;
+ metadata: AutoModerationActionMetadata;
+}
+
+export interface AutoModerationActionMetadata {
+ channelId: Snowflake | null;
+ durationSeconds: number | null;
+ customMessage: string | null;
+}
+
+export interface AutoModerationTriggerMetadata {
+ keywordFilter: string[];
+ regexPatterns: string[];
+ presets: AutoModerationRuleKeywordPresetType[];
+ allowList: string[];
+ mentionTotalLimit: number | null;
+ mentionRaidProtectionEnabled: boolean;
+}
+
+export type AwaitMessageComponentOptions<T extends CollectedMessageInteraction> = Omit<
+ MessageComponentCollectorOptions<T>,
+ 'max' | 'maxComponents' | 'maxUsers'
+>;
+
+export type ModalSubmitInteractionCollectorOptions<T extends ModalSubmitInteraction> = Omit<
+ InteractionCollectorOptions<T>,
+ 'channel' | 'message' | 'guild' | 'interactionType'
+>;
+
+export type AwaitModalSubmitOptions<T extends ModalSubmitInteraction> = Omit<
+ ModalSubmitInteractionCollectorOptions<T>,
+ 'max' | 'maxComponents' | 'maxUsers'
+> & {
+ time: number;
+};
+
+export interface AwaitMessagesOptions extends MessageCollectorOptions {
+ errors?: string[];
+}
+
+export interface AwaitReactionsOptions extends ReactionCollectorOptions {
+ errors?: string[];
+}
+
+export interface BanOptions {
+ /** @deprecated Use {@link deleteMessageSeconds} instead. */
+ deleteMessageDays?: number;
+ deleteMessageSeconds?: number;
+ reason?: string;
+}
+
+export type Base64Resolvable = Buffer | Base64String;
+
+export type Base64String = string;
+
+export interface BaseFetchOptions {
+ cache?: boolean;
+ force?: boolean;
+}
+
+export type BitFieldResolvable<T extends string, N extends number | bigint> =
+ | RecursiveReadonlyArray<T | N | `${bigint}` | Readonly<BitField<T, N>>>
+ | T
+ | N
+ | `${bigint}`
+ | Readonly<BitField<T, N>>;
+
+export type BufferResolvable = Buffer | string;
+
+export interface Caches {
+ AutoModerationRuleManager: [manager: typeof AutoModerationRuleManager, holds: typeof AutoModerationRule];
+ ApplicationCommandManager: [manager: typeof ApplicationCommandManager, holds: typeof ApplicationCommand];
+ BaseGuildEmojiManager: [manager: typeof BaseGuildEmojiManager, holds: typeof GuildEmoji];
+ DMMessageManager: [manager: typeof MessageManager, holds: typeof Message<false>];
+ GuildEmojiManager: [manager: typeof GuildEmojiManager, holds: typeof GuildEmoji];
+ // TODO: ChannelManager: [manager: typeof ChannelManager, holds: typeof Channel];
+ // TODO: GuildChannelManager: [manager: typeof GuildChannelManager, holds: typeof GuildChannel];
+ // TODO: GuildManager: [manager: typeof GuildManager, holds: typeof Guild];
+ GuildMemberManager: [manager: typeof GuildMemberManager, holds: typeof GuildMember];
+ GuildBanManager: [manager: typeof GuildBanManager, holds: typeof GuildBan];
+ GuildForumThreadManager: [manager: typeof GuildForumThreadManager, holds: typeof ThreadChannel<true>];
+ GuildInviteManager: [manager: typeof GuildInviteManager, holds: typeof Invite];
+ GuildMessageManager: [manager: typeof GuildMessageManager, holds: typeof Message<true>];
+ GuildScheduledEventManager: [manager: typeof GuildScheduledEventManager, holds: typeof GuildScheduledEvent];
+ GuildStickerManager: [manager: typeof GuildStickerManager, holds: typeof Sticker];
+ GuildTextThreadManager: [manager: typeof GuildTextThreadManager, holds: typeof ThreadChannel<false>];
+ MessageManager: [manager: typeof MessageManager, holds: typeof Message];
+ // TODO: PermissionOverwriteManager: [manager: typeof PermissionOverwriteManager, holds: typeof PermissionOverwrites];
+ PresenceManager: [manager: typeof PresenceManager, holds: typeof Presence];
+ ReactionManager: [manager: typeof ReactionManager, holds: typeof MessageReaction];
+ ReactionUserManager: [manager: typeof ReactionUserManager, holds: typeof User];
+ // TODO: RoleManager: [manager: typeof RoleManager, holds: typeof Role];
+ StageInstanceManager: [manager: typeof StageInstanceManager, holds: typeof StageInstance];
+ ThreadManager: [manager: typeof ThreadManager, holds: typeof ThreadChannel];
+ ThreadMemberManager: [manager: typeof ThreadMemberManager, holds: typeof ThreadMember];
+ UserManager: [manager: typeof UserManager, holds: typeof User];
+ VoiceStateManager: [manager: typeof VoiceStateManager, holds: typeof VoiceState];
+}
+
+export type CacheConstructors = {
+ [K in keyof Caches]: Caches[K][0] & { name: K };
+};
+
+type OverriddenCaches =
+ | 'DMMessageManager'
+ | 'GuildForumThreadManager'
+ | 'GuildMessageManager'
+ | 'GuildTextThreadManager';
+
+// This doesn't actually work the way it looks 😢.
+// Narrowing the type of `manager.name` doesn't propagate type information to `holds` and the return type.
+export type CacheFactory = (
+ managerType: CacheConstructors[Exclude<keyof Caches, OverriddenCaches>],
+ holds: Caches[(typeof manager)['name']][1],
+ manager: CacheConstructors[keyof Caches],
+) => (typeof manager)['prototype'] extends DataManager<infer K, infer V, any> ? Collection<K, V> : never;
+
+export type CacheWithLimitsOptions = {
+ [K in keyof Caches]?: Caches[K][0]['prototype'] extends DataManager<infer K, infer V, any>
+ ? LimitedCollectionOptions<K, V> | number
+ : never;
+};
+
+export interface CategoryCreateChannelOptions {
+ name: string;
+ permissionOverwrites?: OverwriteResolvable[] | Collection<Snowflake, OverwriteResolvable>;
+ topic?: string;
+ type?: CategoryChannelType;
+ nsfw?: boolean;
+ bitrate?: number;
+ userLimit?: number;
+ rateLimitPerUser?: number;
+ position?: number;
+ rtcRegion?: string;
+ videoQualityMode?: VideoQualityMode;
+ availableTags?: GuildForumTagData[];
+ defaultReactionEmoji?: DefaultReactionEmoji;
+ defaultAutoArchiveDuration?: ThreadAutoArchiveDuration;
+ defaultSortOrder?: SortOrderType;
+ defaultForumLayout?: ForumLayoutType;
+ reason?: string;
+}
+
+export interface ChannelCreationOverwrites {
+ allow?: PermissionResolvable;
+ deny?: PermissionResolvable;
+ id: RoleResolvable | UserResolvable;
+}
+
+export type ChannelMention = `<#${Snowflake}>`;
+
+export interface ChannelPosition {
+ channel: NonThreadGuildBasedChannel | Snowflake;
+ lockPermissions?: boolean;
+ parent?: CategoryChannelResolvable | null;
+ position?: number;
+}
+
+export type GuildTextChannelResolvable = TextChannel | NewsChannel | Snowflake;
+export type ChannelResolvable = Channel | Snowflake;
+
+export interface ChannelWebhookCreateOptions {
+ name: string;
+ avatar?: BufferResolvable | Base64Resolvable | null;
+ reason?: string;
+}
+
+export interface WebhookCreateOptions extends ChannelWebhookCreateOptions {
+ channel: TextChannel | NewsChannel | VoiceChannel | StageChannel | ForumChannel | Snowflake;
+}
+
+export interface ClientEvents {
+ applicationCommandPermissionsUpdate: [data: ApplicationCommandPermissionsUpdateData];
+ autoModerationActionExecution: [autoModerationActionExecution: AutoModerationActionExecution];
+ autoModerationRuleCreate: [autoModerationRule: AutoModerationRule];
+ autoModerationRuleDelete: [autoModerationRule: AutoModerationRule];
+ autoModerationRuleUpdate: [
+ oldAutoModerationRule: AutoModerationRule | null,
+ newAutoModerationRule: AutoModerationRule,
+ ];
+ cacheSweep: [message: string];
+ channelCreate: [channel: NonThreadGuildBasedChannel];
+ channelDelete: [channel: DMChannel | NonThreadGuildBasedChannel];
+ channelPinsUpdate: [channel: TextBasedChannel, date: Date];
+ channelUpdate: [
+ oldChannel: DMChannel | NonThreadGuildBasedChannel,
+ newChannel: DMChannel | NonThreadGuildBasedChannel,
+ ];
+ debug: [message: string];
+ warn: [message: string];
+ emojiCreate: [emoji: GuildEmoji];
+ emojiDelete: [emoji: GuildEmoji];
+ emojiUpdate: [oldEmoji: GuildEmoji, newEmoji: GuildEmoji];
+ error: [error: Error];
+ guildAuditLogEntryCreate: [auditLogEntry: GuildAuditLogsEntry, guild: Guild];
+ guildAvailable: [guild: Guild];
+ guildBanAdd: [ban: GuildBan];
+ guildBanRemove: [ban: GuildBan];
+ guildCreate: [guild: Guild];
+ guildDelete: [guild: Guild];
+ guildUnavailable: [guild: Guild];
+ guildIntegrationsUpdate: [guild: Guild];
+ guildMemberAdd: [member: GuildMember];
+ guildMemberAvailable: [member: GuildMember | PartialGuildMember];
+ guildMemberRemove: [member: GuildMember | PartialGuildMember];
+ guildMembersChunk: [
+ members: Collection<Snowflake, GuildMember>,
+ guild: Guild,
+ data: { index: number; count: number; notFound: unknown[]; nonce: string | undefined },
+ ];
+ guildMemberUpdate: [oldMember: GuildMember | PartialGuildMember, newMember: GuildMember];
+ guildUpdate: [oldGuild: Guild, newGuild: Guild];
+ inviteCreate: [invite: Invite];
+ inviteDelete: [invite: Invite];
+ messageCreate: [message: Message];
+ messageDelete: [message: Message | PartialMessage];
+ messageReactionRemoveAll: [
+ message: Message | PartialMessage,
+ reactions: Collection<string | Snowflake, MessageReaction>,
+ ];
+ messageReactionRemoveEmoji: [reaction: MessageReaction | PartialMessageReaction];
+ messageDeleteBulk: [messages: Collection<Snowflake, Message | PartialMessage>, channel: GuildTextBasedChannel];
+ messageReactionAdd: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
+ messageReactionRemove: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
+ messageUpdate: [oldMessage: Message | PartialMessage, newMessage: Message | PartialMessage];
+ presenceUpdate: [oldPresence: Presence | null, newPresence: Presence];
+ ready: [client: Client<true>];
+ invalidated: [];
+ roleCreate: [role: Role];
+ roleDelete: [role: Role];
+ roleUpdate: [oldRole: Role, newRole: Role];
+ threadCreate: [thread: AnyThreadChannel, newlyCreated: boolean];
+ threadDelete: [thread: AnyThreadChannel];
+ threadListSync: [threads: Collection<Snowflake, AnyThreadChannel>, guild: Guild];
+ threadMemberUpdate: [oldMember: ThreadMember, newMember: ThreadMember];
+ threadMembersUpdate: [
+ addedMembers: Collection<Snowflake, ThreadMember>,
+ removedMembers: Collection<Snowflake, ThreadMember | PartialThreadMember>,
+ thread: AnyThreadChannel,
+ ];
+ threadUpdate: [oldThread: AnyThreadChannel, newThread: AnyThreadChannel];
+ typingStart: [typing: Typing];
+ userUpdate: [oldUser: User | PartialUser, newUser: User];
+ voiceStateUpdate: [oldState: VoiceState, newState: VoiceState];
+ /** @deprecated Use {@link webhooksUpdate} instead. */
+ webhookUpdate: ClientEvents['webhooksUpdate'];
+ webhooksUpdate: [channel: TextChannel | NewsChannel | VoiceChannel | ForumChannel];
+ interactionCreate: [interaction: Interaction];
+ shardDisconnect: [closeEvent: CloseEvent, shardId: number];
+ shardError: [error: Error, shardId: number];
+ shardReady: [shardId: number, unavailableGuilds: Set<Snowflake> | undefined];
+ shardReconnecting: [shardId: number];
+ shardResume: [shardId: number, replayedEvents: number];
+ stageInstanceCreate: [stageInstance: StageInstance];
+ stageInstanceUpdate: [oldStageInstance: StageInstance | null, newStageInstance: StageInstance];
+ stageInstanceDelete: [stageInstance: StageInstance];
+ stickerCreate: [sticker: Sticker];
+ stickerDelete: [sticker: Sticker];
+ stickerUpdate: [oldSticker: Sticker, newSticker: Sticker];
+ guildScheduledEventCreate: [guildScheduledEvent: GuildScheduledEvent];
+ guildScheduledEventUpdate: [
+ oldGuildScheduledEvent: GuildScheduledEvent | null,
+ newGuildScheduledEvent: GuildScheduledEvent,
+ ];
+ guildScheduledEventDelete: [guildScheduledEvent: GuildScheduledEvent];
+ guildScheduledEventUserAdd: [guildScheduledEvent: GuildScheduledEvent, user: User];
+ guildScheduledEventUserRemove: [guildScheduledEvent: GuildScheduledEvent, user: User];
+}
+
+export interface ClientFetchInviteOptions {
+ guildScheduledEventId?: Snowflake;
+}
+
+export interface ClientOptions {
+ shards?: number | number[] | 'auto';
+ shardCount?: number;
+ closeTimeout?: number;
+ makeCache?: CacheFactory;
+ allowedMentions?: MessageMentionOptions;
+ partials?: Partials[];
+ failIfNotExists?: boolean;
+ presence?: PresenceData;
+ intents: BitFieldResolvable<GatewayIntentsString, number>;
+ waitGuildTimeout?: number;
+ sweepers?: SweeperOptions;
+ ws?: WebSocketOptions;
+ rest?: Partial<RESTOptions>;
+ jsonTransformer?: (obj: unknown) => unknown;
+}
+
+export type ClientPresenceStatus = 'online' | 'idle' | 'dnd';
+
+export interface ClientPresenceStatusData {
+ web?: ClientPresenceStatus;
+ mobile?: ClientPresenceStatus;
+ desktop?: ClientPresenceStatus;
+}
+
+export interface ClientUserEditOptions {
+ username?: string;
+ avatar?: BufferResolvable | Base64Resolvable | null;
+}
+
+export interface CloseEvent {
+ /** @deprecated */
+ wasClean: boolean;
+ code: number;
+ /** @deprecated */
+ reason: string;
+}
+
+export type CollectorFilter<T extends unknown[]> = (...args: T) => boolean | Promise<boolean>;
+
+export interface CollectorOptions<T extends unknown[]> {
+ filter?: CollectorFilter<T>;
+ time?: number;
+ idle?: number;
+ dispose?: boolean;
+}
+
+export interface CollectorResetTimerOptions {
+ time?: number;
+ idle?: number;
+}
+
+export type ColorResolvable =
+ | keyof typeof Colors
+ | 'Random'
+ | readonly [red: number, green: number, blue: number]
+ | number
+ | HexColorString;
+
+export interface CommandInteractionOption<Cached extends CacheType = CacheType> {
+ name: string;
+ type: ApplicationCommandOptionType;
+ value?: string | number | boolean;
+ focused?: boolean;
+ autocomplete?: boolean;
+ options?: CommandInteractionOption[];
+ user?: User;
+ member?: CacheTypeReducer<Cached, GuildMember, APIInteractionDataResolvedGuildMember>;
+ channel?: CacheTypeReducer<Cached, GuildBasedChannel, APIInteractionDataResolvedChannel>;
+ role?: CacheTypeReducer<Cached, Role, APIRole>;
+ attachment?: Attachment;
+ message?: Message<BooleanCache<Cached>>;
+}
+
+export interface CommandInteractionResolvedData<Cached extends CacheType = CacheType> {
+ users?: Collection<Snowflake, User>;
+ members?: Collection<Snowflake, CacheTypeReducer<Cached, GuildMember, APIInteractionDataResolvedGuildMember>>;
+ roles?: Collection<Snowflake, CacheTypeReducer<Cached, Role, APIRole>>;
+ channels?: Collection<Snowflake, CacheTypeReducer<Cached, Channel, APIInteractionDataResolvedChannel>>;
+ messages?: Collection<Snowflake, CacheTypeReducer<Cached, Message, APIMessage>>;
+ attachments?: Collection<Snowflake, Attachment>;
+}
+
+export type AutocompleteFocusedOption = Pick<CommandInteractionOption, 'name'> & {
+ focused: true;
+ type:
+ | ApplicationCommandOptionType.String
+ | ApplicationCommandOptionType.Integer
+ | ApplicationCommandOptionType.Number;
+ value: string;
+};
+
+export declare const Colors: {
+ Default: 0x000000;
+ White: 0xffffff;
+ Aqua: 0x1abc9c;
+ Green: 0x57f287;
+ Blue: 0x3498db;
+ Yellow: 0xfee75c;
+ Purple: 0x9b59b6;
+ LuminousVividPink: 0xe91e63;
+ Fuchsia: 0xeb459e;
+ Gold: 0xf1c40f;
+ Orange: 0xe67e22;
+ Red: 0xed4245;
+ Grey: 0x95a5a6;
+ Navy: 0x34495e;
+ DarkAqua: 0x11806a;
+ DarkGreen: 0x1f8b4c;
+ DarkBlue: 0x206694;
+ DarkPurple: 0x71368a;
+ DarkVividPink: 0xad1457;
+ DarkGold: 0xc27c0e;
+ DarkOrange: 0xa84300;
+ DarkRed: 0x992d22;
+ DarkGrey: 0x979c9f;
+ DarkerGrey: 0x7f8c8d;
+ LightGrey: 0xbcc0c0;
+ DarkNavy: 0x2c3e50;
+ Blurple: 0x5865f2;
+ Greyple: 0x99aab5;
+ DarkButNotBlack: 0x2c2f33;
+ NotQuiteBlack: 0x23272a;
+};
+
+export enum Events {
+ ApplicationCommandPermissionsUpdate = 'applicationCommandPermissionsUpdate',
+ AutoModerationActionExecution = 'autoModerationActionExecution',
+ AutoModerationRuleCreate = 'autoModerationRuleCreate',
+ AutoModerationRuleDelete = 'autoModerationRuleDelete',
+ AutoModerationRuleUpdate = 'autoModerationRuleUpdate',
+ ClientReady = 'ready',
+ GuildAuditLogEntryCreate = 'guildAuditLogEntryCreate',
+ GuildAvailable = 'guildAvailable',
+ GuildCreate = 'guildCreate',
+ GuildDelete = 'guildDelete',
+ GuildUpdate = 'guildUpdate',
+ GuildUnavailable = 'guildUnavailable',
+ GuildMemberAdd = 'guildMemberAdd',
+ GuildMemberRemove = 'guildMemberRemove',
+ GuildMemberUpdate = 'guildMemberUpdate',
+ GuildMemberAvailable = 'guildMemberAvailable',
+ GuildMembersChunk = 'guildMembersChunk',
+ GuildIntegrationsUpdate = 'guildIntegrationsUpdate',
+ GuildRoleCreate = 'roleCreate',
+ GuildRoleDelete = 'roleDelete',
+ InviteCreate = 'inviteCreate',
+ InviteDelete = 'inviteDelete',
+ GuildRoleUpdate = 'roleUpdate',
+ GuildEmojiCreate = 'emojiCreate',
+ GuildEmojiDelete = 'emojiDelete',
+ GuildEmojiUpdate = 'emojiUpdate',
+ GuildBanAdd = 'guildBanAdd',
+ GuildBanRemove = 'guildBanRemove',
+ ChannelCreate = 'channelCreate',
+ ChannelDelete = 'channelDelete',
+ ChannelUpdate = 'channelUpdate',
+ ChannelPinsUpdate = 'channelPinsUpdate',
+ MessageCreate = 'messageCreate',
+ MessageDelete = 'messageDelete',
+ MessageUpdate = 'messageUpdate',
+ MessageBulkDelete = 'messageDeleteBulk',
+ MessageReactionAdd = 'messageReactionAdd',
+ MessageReactionRemove = 'messageReactionRemove',
+ MessageReactionRemoveAll = 'messageReactionRemoveAll',
+ MessageReactionRemoveEmoji = 'messageReactionRemoveEmoji',
+ ThreadCreate = 'threadCreate',
+ ThreadDelete = 'threadDelete',
+ ThreadUpdate = 'threadUpdate',
+ ThreadListSync = 'threadListSync',
+ ThreadMemberUpdate = 'threadMemberUpdate',
+ ThreadMembersUpdate = 'threadMembersUpdate',
+ UserUpdate = 'userUpdate',
+ PresenceUpdate = 'presenceUpdate',
+ VoiceServerUpdate = 'voiceServerUpdate',
+ VoiceStateUpdate = 'voiceStateUpdate',
+ TypingStart = 'typingStart',
+ WebhooksUpdate = 'webhookUpdate',
+ InteractionCreate = 'interactionCreate',
+ Error = 'error',
+ Warn = 'warn',
+ Debug = 'debug',
+ CacheSweep = 'cacheSweep',
+ ShardDisconnect = 'shardDisconnect',
+ ShardError = 'shardError',
+ ShardReconnecting = 'shardReconnecting',
+ ShardReady = 'shardReady',
+ ShardResume = 'shardResume',
+ Invalidated = 'invalidated',
+ Raw = 'raw',
+ StageInstanceCreate = 'stageInstanceCreate',
+ StageInstanceUpdate = 'stageInstanceUpdate',
+ StageInstanceDelete = 'stageInstanceDelete',
+ GuildStickerCreate = 'stickerCreate',
+ GuildStickerDelete = 'stickerDelete',
+ GuildStickerUpdate = 'stickerUpdate',
+ GuildScheduledEventCreate = 'guildScheduledEventCreate',
+ GuildScheduledEventUpdate = 'guildScheduledEventUpdate',
+ GuildScheduledEventDelete = 'guildScheduledEventDelete',
+ GuildScheduledEventUserAdd = 'guildScheduledEventUserAdd',
+ GuildScheduledEventUserRemove = 'guildScheduledEventUserRemove',
+}
+
+export enum ShardEvents {
+ Death = 'death',
+ Disconnect = 'disconnect',
+ Error = 'error',
+ Message = 'message',
+ Ready = 'ready',
+ Reconnecting = 'reconnecting',
+ Resume = 'resume',
+ Spawn = 'spawn',
+}
+
+export enum WebSocketShardEvents {
+ Close = 'close',
+ Destroyed = 'destroyed',
+ InvalidSession = 'invalidSession',
+ Ready = 'ready',
+ Resumed = 'resumed',
+ AllReady = 'allReady',
+}
+
+export enum Status {
+ Ready = 0,
+ Connecting = 1,
+ Reconnecting = 2,
+ Idle = 3,
+ Nearly = 4,
+ Disconnected = 5,
+ WaitingForGuilds = 6,
+ Identifying = 7,
+ Resuming = 8,
+}
+
+export interface GuildScheduledEventInviteURLCreateOptions extends InviteCreateOptions {
+ channel?: GuildInvitableChannelResolvable;
+}
+
+export interface RoleCreateOptions extends RoleData {
+ reason?: string;
+}
+
+export interface RoleEditOptions extends RoleData {
+ reason?: string;
+}
+
+export interface StageInstanceCreateOptions {
+ topic: string;
+ privacyLevel?: StageInstancePrivacyLevel;
+ sendStartNotification?: boolean;
+}
+
+export interface CrosspostedChannel {
+ channelId: Snowflake;
+ guildId: Snowflake;
+ type: ChannelType;
+ name: string;
+}
+
+export type DateResolvable = Date | number | string;
+
+export interface GuildTemplateEditOptions {
+ name?: string;
+ description?: string;
+}
+
+export interface EmbedField {
+ name: string;
+ value: string;
+ inline: boolean;
+}
+
+export type EmojiIdentifierResolvable =
+ | EmojiResolvable
+ | `${'' | 'a:'}${string}:${Snowflake}`
+ | `<${'' | 'a'}:${string}:${Snowflake}>`
+ | string;
+
+export type EmojiResolvable = Snowflake | GuildEmoji | ReactionEmoji;
+
+export interface ErrorEvent {
+ error: unknown;
+ message: string;
+ type: string;
+ target: WebSocket;
+}
+
+export interface FetchApplicationCommandOptions extends BaseFetchOptions {
+ guildId?: Snowflake;
+ locale?: LocaleString;
+ withLocalizations?: boolean;
+}
+
+export interface FetchArchivedThreadOptions {
+ type?: 'public' | 'private';
+ fetchAll?: boolean;
+ before?: ThreadChannelResolvable | DateResolvable;
+ limit?: number;
+}
+
+export interface FetchAutoModerationRuleOptions extends BaseFetchOptions {
+ autoModerationRule: AutoModerationRuleResolvable;
+}
+
+export interface FetchAutoModerationRulesOptions {
+ cache?: boolean;
+}
+
+export interface FetchBanOptions extends BaseFetchOptions {
+ user: UserResolvable;
+}
+
+export interface FetchBansOptions {
+ limit?: number;
+ before?: Snowflake;
+ after?: Snowflake;
+ cache?: boolean;
+}
+
+export interface FetchChannelOptions extends BaseFetchOptions {
+ allowUnknownGuild?: boolean;
+}
+
+export interface FetchedThreads {
+ threads: Collection<Snowflake, AnyThreadChannel>;
+ members: Collection<Snowflake, ThreadMember>;
+}
+
+export interface FetchedThreadsMore extends FetchedThreads {
+ hasMore: boolean;
+}
+
+export interface FetchGuildOptions extends BaseFetchOptions {
+ guild: GuildResolvable;
+ withCounts?: boolean;
+}
+
+export interface FetchGuildsOptions {
+ before?: Snowflake;
+ after?: Snowflake;
+ limit?: number;
+}
+
+export interface FetchGuildScheduledEventOptions extends BaseFetchOptions {
+ guildScheduledEvent: GuildScheduledEventResolvable;
+ withUserCount?: boolean;
+}
+
+export interface FetchGuildScheduledEventsOptions {
+ cache?: boolean;
+ withUserCount?: boolean;
+}
+
+export interface FetchGuildScheduledEventSubscribersOptions {
+ limit?: number;
+ withMember?: boolean;
+}
+
+interface FetchInviteOptions extends BaseFetchOptions {
+ code: string;
+}
+
+interface FetchInvitesOptions {
+ channelId?: GuildInvitableChannelResolvable;
+ cache?: boolean;
+}
+
+export interface FetchMemberOptions extends BaseFetchOptions {
+ user: UserResolvable;
+}
+
+export interface FetchMembersOptions {
+ user?: UserResolvable | UserResolvable[];
+ query?: string;
+ limit?: number;
+ withPresences?: boolean;
+ time?: number;
+ nonce?: string;
+}
+
+export interface FetchMessageOptions extends BaseFetchOptions {
+ message: MessageResolvable;
+}
+
+export interface FetchMessagesOptions {
+ limit?: number;
+ before?: Snowflake;
+ after?: Snowflake;
+ around?: Snowflake;
+ cache?: boolean;
+}
+
+export interface FetchReactionUsersOptions {
+ limit?: number;
+ after?: Snowflake;
+}
+
+export interface FetchThreadMemberOptions extends BaseFetchOptions {
+ member: ThreadMemberResolvable;
+ withMember?: boolean;
+}
+
+export interface FetchThreadMembersWithGuildMemberDataOptions {
+ withMember: true;
+ after?: Snowflake;
+ limit?: number;
+ cache?: boolean;
+}
+
+export interface FetchThreadMembersWithoutGuildMemberDataOptions {
+ withMember?: false;
+ cache?: boolean;
+}
+
+export type FetchThreadMembersOptions =
+ | FetchThreadMembersWithGuildMemberDataOptions
+ | FetchThreadMembersWithoutGuildMemberDataOptions;
+
+export interface FetchThreadsOptions {
+ archived?: FetchArchivedThreadOptions;
+}
+
+export interface AttachmentPayload {
+ attachment: BufferResolvable | Stream;
+ name?: string;
+ description?: string;
+}
+
+export type GlobalSweepFilter<K, V> = () => ((value: V, key: K, collection: Collection<K, V>) => boolean) | null;
+
+interface GuildAuditLogsTypes {
+ [AuditLogEvent.GuildUpdate]: ['Guild', 'Update'];
+ [AuditLogEvent.ChannelCreate]: ['Channel', 'Create'];
+ [AuditLogEvent.ChannelUpdate]: ['Channel', 'Update'];
+ [AuditLogEvent.ChannelDelete]: ['Channel', 'Delete'];
+ [AuditLogEvent.ChannelOverwriteCreate]: ['Channel', 'Create'];
+ [AuditLogEvent.ChannelOverwriteUpdate]: ['Channel', 'Update'];
+ [AuditLogEvent.ChannelOverwriteDelete]: ['Channel', 'Delete'];
+ [AuditLogEvent.MemberKick]: ['User', 'Delete'];
+ [AuditLogEvent.MemberPrune]: ['User', 'Delete'];
+ [AuditLogEvent.MemberBanAdd]: ['User', 'Delete'];
+ [AuditLogEvent.MemberBanRemove]: ['User', 'Create'];
+ [AuditLogEvent.MemberUpdate]: ['User', 'Update'];
+ [AuditLogEvent.MemberRoleUpdate]: ['User', 'Update'];
+ [AuditLogEvent.MemberMove]: ['User', 'Update'];
+ [AuditLogEvent.MemberDisconnect]: ['User', 'Delete'];
+ [AuditLogEvent.BotAdd]: ['User', 'Create'];
+ [AuditLogEvent.RoleCreate]: ['Role', 'Create'];
+ [AuditLogEvent.RoleUpdate]: ['Role', 'Update'];
+ [AuditLogEvent.RoleDelete]: ['Role', 'Delete'];
+ [AuditLogEvent.InviteCreate]: ['Invite', 'Create'];
+ [AuditLogEvent.InviteUpdate]: ['Invite', 'Update'];
+ [AuditLogEvent.InviteDelete]: ['Invite', 'Delete'];
+ [AuditLogEvent.WebhookCreate]: ['Webhook', 'Create'];
+ [AuditLogEvent.WebhookUpdate]: ['Webhook', 'Update'];
+ [AuditLogEvent.WebhookDelete]: ['Webhook', 'Delete'];
+ [AuditLogEvent.EmojiCreate]: ['Emoji', 'Create'];
+ [AuditLogEvent.EmojiUpdate]: ['Emoji', 'Update'];
+ [AuditLogEvent.EmojiDelete]: ['Emoji', 'Delete'];
+ [AuditLogEvent.MessageDelete]: ['Message', 'Delete'];
+ [AuditLogEvent.MessageBulkDelete]: ['Message', 'Delete'];
+ [AuditLogEvent.MessagePin]: ['Message', 'Create'];
+ [AuditLogEvent.MessageUnpin]: ['Message', 'Delete'];
+ [AuditLogEvent.IntegrationCreate]: ['Integration', 'Create'];
+ [AuditLogEvent.IntegrationUpdate]: ['Integration', 'Update'];
+ [AuditLogEvent.IntegrationDelete]: ['Integration', 'Delete'];
+ [AuditLogEvent.StageInstanceCreate]: ['StageInstance', 'Create'];
+ [AuditLogEvent.StageInstanceUpdate]: ['StageInstance', 'Update'];
+ [AuditLogEvent.StageInstanceDelete]: ['StageInstance', 'Delete'];
+ [AuditLogEvent.StickerCreate]: ['Sticker', 'Create'];
+ [AuditLogEvent.StickerUpdate]: ['Sticker', 'Update'];
+ [AuditLogEvent.StickerDelete]: ['Sticker', 'Delete'];
+ [AuditLogEvent.GuildScheduledEventCreate]: ['GuildScheduledEvent', 'Create'];
+ [AuditLogEvent.GuildScheduledEventUpdate]: ['GuildScheduledEvent', 'Update'];
+ [AuditLogEvent.GuildScheduledEventDelete]: ['GuildScheduledEvent', 'Delete'];
+ [AuditLogEvent.ThreadCreate]: ['Thread', 'Create'];
+ [AuditLogEvent.ThreadUpdate]: ['Thread', 'Update'];
+ [AuditLogEvent.ThreadDelete]: ['Thread', 'Delete'];
+ [AuditLogEvent.ApplicationCommandPermissionUpdate]: ['ApplicationCommand', 'Update'];
+ [AuditLogEvent.AutoModerationRuleCreate]: ['AutoModerationRule', 'Create'];
+ [AuditLogEvent.AutoModerationRuleUpdate]: ['AutoModerationRule', 'Update'];
+ [AuditLogEvent.AutoModerationRuleDelete]: ['AutoModerationRule', 'Delete'];
+ [AuditLogEvent.AutoModerationBlockMessage]: ['AutoModerationRule', 'Create'];
+ [AuditLogEvent.AutoModerationFlagToChannel]: ['AutoModerationRule', 'Create'];
+ [AuditLogEvent.AutoModerationUserCommunicationDisabled]: ['AutoModerationRule', 'Create'];
+}
+
+export type GuildAuditLogsActionType = GuildAuditLogsTypes[keyof GuildAuditLogsTypes][1] | 'All';
+
+export interface GuildAuditLogsEntryExtraField {
+ [AuditLogEvent.MemberPrune]: { removed: number; days: number };
+ [AuditLogEvent.MemberMove]: { channel: VoiceBasedChannel | { id: Snowflake }; count: number };
+ [AuditLogEvent.MessageDelete]: { channel: GuildTextBasedChannel | { id: Snowflake }; count: number };
+ [AuditLogEvent.MessageBulkDelete]: { channel: GuildTextBasedChannel | { id: Snowflake }; count: number };
+ [AuditLogEvent.MessagePin]: { channel: GuildTextBasedChannel | { id: Snowflake }; messageId: Snowflake };
+ [AuditLogEvent.MessageUnpin]: { channel: GuildTextBasedChannel | { id: Snowflake }; messageId: Snowflake };
+ [AuditLogEvent.MemberDisconnect]: { count: number };
+ [AuditLogEvent.ChannelOverwriteCreate]:
+ | Role
+ | GuildMember
+ | { id: Snowflake; name: string; type: AuditLogOptionsType.Role }
+ | { id: Snowflake; type: AuditLogOptionsType.Member };
+ [AuditLogEvent.ChannelOverwriteUpdate]:
+ | Role
+ | GuildMember
+ | { id: Snowflake; name: string; type: AuditLogOptionsType.Role }
+ | { id: Snowflake; type: AuditLogOptionsType.Member };
+ [AuditLogEvent.ChannelOverwriteDelete]:
+ | Role
+ | GuildMember
+ | { id: Snowflake; name: string; type: AuditLogOptionsType.Role }
+ | { id: Snowflake; type: AuditLogOptionsType.Member };
+ [AuditLogEvent.StageInstanceCreate]: StageChannel | { id: Snowflake };
+ [AuditLogEvent.StageInstanceDelete]: StageChannel | { id: Snowflake };
+ [AuditLogEvent.StageInstanceUpdate]: StageChannel | { id: Snowflake };
+ [AuditLogEvent.ApplicationCommandPermissionUpdate]: { applicationId: Snowflake };
+ [AuditLogEvent.AutoModerationBlockMessage]: {
+ autoModerationRuleName: string;
+ autoModerationRuleTriggerType: AuditLogRuleTriggerType;
+ channel: GuildTextBasedChannel | { id: Snowflake };
+ };
+ [AuditLogEvent.AutoModerationFlagToChannel]: {
+ autoModerationRuleName: string;
+ autoModerationRuleTriggerType: AuditLogRuleTriggerType;
+ channel: GuildTextBasedChannel | { id: Snowflake };
+ };
+ [AuditLogEvent.AutoModerationUserCommunicationDisabled]: {
+ autoModerationRuleName: string;
+ autoModerationRuleTriggerType: AuditLogRuleTriggerType;
+ channel: GuildTextBasedChannel | { id: Snowflake };
+ };
+}
+
+export interface GuildAuditLogsEntryTargetField<TActionType extends GuildAuditLogsActionType> {
+ User: User | null;
+ Guild: Guild;
+ Webhook: Webhook;
+ Invite: Invite;
+ Message: TActionType extends AuditLogEvent.MessageBulkDelete ? Guild | { id: Snowflake } : User;
+ Integration: Integration;
+ Channel: NonThreadGuildBasedChannel | { id: Snowflake; [x: string]: unknown };
+ Thread: AnyThreadChannel | { id: Snowflake; [x: string]: unknown };
+ StageInstance: StageInstance;
+ Sticker: Sticker;
+ GuildScheduledEvent: GuildScheduledEvent;
+ ApplicationCommand: ApplicationCommand | { id: Snowflake };
+ AutoModerationRule: AutoModerationRule;
+}
+
+export interface GuildAuditLogsFetchOptions<T extends GuildAuditLogsResolvable> {
+ before?: Snowflake | GuildAuditLogsEntry;
+ after?: Snowflake | GuildAuditLogsEntry;
+ limit?: number;
+ user?: UserResolvable;
+ type?: T;
+}
+
+export type GuildAuditLogsResolvable = AuditLogEvent | null;
+
+export type GuildAuditLogsTargetType = GuildAuditLogsTypes[keyof GuildAuditLogsTypes][0] | 'All' | 'Unknown';
+
+export type GuildAuditLogsTargets = {
+ [key in GuildAuditLogsTargetType]: GuildAuditLogsTargetType;
+};
+
+export type GuildBanResolvable = GuildBan | UserResolvable;
+
+export type GuildChannelResolvable = Snowflake | GuildBasedChannel;
+
+export interface AutoModerationRuleCreateOptions {
+ name: string;
+ eventType: AutoModerationRuleEventType;
+ triggerType: AutoModerationRuleTriggerType;
+ triggerMetadata?: AutoModerationTriggerMetadataOptions;
+ actions: AutoModerationActionOptions[];
+ enabled?: boolean;
+ exemptRoles?: Collection<Snowflake, Role> | RoleResolvable[];
+ exemptChannels?: Collection<Snowflake, GuildBasedChannel> | GuildChannelResolvable[];
+ reason?: string;
+}
+
+export interface AutoModerationRuleEditOptions extends Partial<Omit<AutoModerationRuleCreateOptions, 'triggerType'>> {}
+
+export interface AutoModerationTriggerMetadataOptions extends Partial<AutoModerationTriggerMetadata> {}
+
+export interface AutoModerationActionOptions {
+ type: AutoModerationActionType;
+ metadata?: AutoModerationActionMetadataOptions;
+}
+
+export interface AutoModerationActionMetadataOptions extends Partial<Omit<AutoModerationActionMetadata, 'channelId'>> {
+ channel?: GuildTextChannelResolvable | ThreadChannel;
+}
+
+export interface GuildChannelCreateOptions extends Omit<CategoryCreateChannelOptions, 'type'> {
+ parent?: CategoryChannelResolvable | null;
+ type?: Exclude<
+ ChannelType,
+ | ChannelType.DM
+ | ChannelType.GroupDM
+ | ChannelType.PublicThread
+ | ChannelType.AnnouncementThread
+ | ChannelType.PrivateThread
+ >;
+}
+
+export interface GuildChannelCloneOptions extends Omit<GuildChannelCreateOptions, 'name'> {
+ name?: string;
+}
+
+export interface GuildChannelEditOptions {
+ name?: string;
+ type?: ChannelType.GuildText | ChannelType.GuildAnnouncement;
+ position?: number;
+ topic?: string | null;
+ nsfw?: boolean;
+ bitrate?: number;
+ userLimit?: number;
+ parent?: CategoryChannelResolvable | null;
+ rateLimitPerUser?: number;
+ lockPermissions?: boolean;
+ permissionOverwrites?: readonly OverwriteResolvable[] | Collection<Snowflake, OverwriteResolvable>;
+ defaultAutoArchiveDuration?: ThreadAutoArchiveDuration;
+ rtcRegion?: string | null;
+ videoQualityMode?: VideoQualityMode | null;
+ availableTags?: GuildForumTagData[];
+ defaultReactionEmoji?: DefaultReactionEmoji | null;
+ defaultThreadRateLimitPerUser?: number;
+ flags?: ChannelFlagsResolvable;
+ defaultSortOrder?: SortOrderType | null;
+ defaultForumLayout?: ForumLayoutType;
+ reason?: string;
+}
+
+export interface GuildChannelOverwriteOptions {
+ reason?: string;
+ type?: OverwriteType;
+}
+
+export interface GuildCreateOptions {
+ name: string;
+ icon?: BufferResolvable | Base64Resolvable | null;
+ verificationLevel?: GuildVerificationLevel;
+ defaultMessageNotifications?: GuildDefaultMessageNotifications;
+ explicitContentFilter?: GuildExplicitContentFilter;
+ roles?: PartialRoleData[];
+ channels?: PartialChannelData[];
+ afkChannelId?: Snowflake | number;
+ afkTimeout?: number;
+ systemChannelId?: Snowflake | number;
+ systemChannelFlags?: SystemChannelFlagsResolvable;
+}
+
+export interface GuildWidgetSettings {
+ enabled: boolean;
+ channel: TextChannel | NewsChannel | VoiceBasedChannel | ForumChannel | null;
+}
+
+export interface GuildEditOptions {
+ name?: string;
+ verificationLevel?: GuildVerificationLevel | null;
+ defaultMessageNotifications?: GuildDefaultMessageNotifications | null;
+ explicitContentFilter?: GuildExplicitContentFilter | null;
+ afkTimeout?: number;
+ afkChannel?: VoiceChannelResolvable | null;
+ icon?: BufferResolvable | Base64Resolvable | null;
+ owner?: GuildMemberResolvable;
+ splash?: BufferResolvable | Base64Resolvable | null;
+ discoverySplash?: BufferResolvable | Base64Resolvable | null;
+ banner?: BufferResolvable | Base64Resolvable | null;
+ systemChannel?: TextChannelResolvable | null;
+ systemChannelFlags?: SystemChannelFlagsResolvable;
+ rulesChannel?: TextChannelResolvable | null;
+ publicUpdatesChannel?: TextChannelResolvable | null;
+ safetyAlertsChannel?: TextChannelResolvable | null;
+ preferredLocale?: Locale | null;
+ features?: `${GuildFeature}`[];
+ description?: string | null;
+ premiumProgressBarEnabled?: boolean;
+ reason?: string;
+}
+
+export interface GuildEmojiCreateOptions {
+ attachment: BufferResolvable | Base64Resolvable;
+ name: string;
+ roles?: Collection<Snowflake, Role> | RoleResolvable[];
+ reason?: string;
+}
+
+export interface GuildEmojiEditOptions {
+ name?: string;
+ roles?: Collection<Snowflake, Role> | RoleResolvable[];
+ reason?: string;
+}
+
+export interface GuildStickerCreateOptions {
+ file: BufferResolvable | Stream | AttachmentPayload | JSONEncodable<AttachmentBuilder>;
+ name: string;
+ tags: string;
+ description?: string | null;
+ reason?: string;
+}
+
+export interface GuildStickerEditOptions {
+ name?: string;
+ description?: string | null;
+ tags?: string;
+ reason?: string;
+}
+
+export interface GuildMemberEditOptions {
+ nick?: string | null;
+ roles?: Collection<Snowflake, Role> | readonly RoleResolvable[];
+ mute?: boolean;
+ deaf?: boolean;
+ channel?: GuildVoiceChannelResolvable | null;
+ communicationDisabledUntil?: DateResolvable | null;
+ flags?: GuildMemberFlagsResolvable;
+ reason?: string;
+}
+
+export type GuildMemberResolvable = GuildMember | UserResolvable;
+
+export type GuildResolvable = Guild | NonThreadGuildBasedChannel | GuildMember | GuildEmoji | Invite | Role | Snowflake;
+
+export interface GuildPruneMembersOptions {
+ count?: boolean;
+ days?: number;
+ dry?: boolean;
+ reason?: string;
+ roles?: RoleResolvable[];
+}
+
+export interface GuildWidgetSettingsData {
+ enabled: boolean;
+ channel: TextChannel | NewsChannel | VoiceBasedChannel | ForumChannel | Snowflake | null;
+}
+
+export interface GuildSearchMembersOptions {
+ query: string;
+ limit?: number;
+ cache?: boolean;
+}
+
+export interface GuildListMembersOptions {
+ after?: Snowflake;
+ limit?: number;
+ cache?: boolean;
+}
+
+// TODO: use conditional types for better TS support
+export interface GuildScheduledEventCreateOptions {
+ name: string;
+ scheduledStartTime: DateResolvable;
+ scheduledEndTime?: DateResolvable;
+ privacyLevel: GuildScheduledEventPrivacyLevel;
+ entityType: GuildScheduledEventEntityType;
+ description?: string;
+ channel?: GuildVoiceChannelResolvable;
+ entityMetadata?: GuildScheduledEventEntityMetadataOptions;
+ image?: BufferResolvable | Base64Resolvable | null;
+ reason?: string;
+}
+
+export interface GuildScheduledEventEditOptions<
+ S extends GuildScheduledEventStatus,
+ T extends GuildScheduledEventSetStatusArg<S>,
+> extends Omit<Partial<GuildScheduledEventCreateOptions>, 'channel'> {
+ channel?: GuildVoiceChannelResolvable | null;
+ status?: T;
+}
+
+export interface GuildScheduledEventEntityMetadata {
+ location: string | null;
+}
+
+export interface GuildScheduledEventEntityMetadataOptions {
+ location?: string;
+}
+
+export type GuildScheduledEventManagerFetchResult<
+ T extends GuildScheduledEventResolvable | FetchGuildScheduledEventOptions | FetchGuildScheduledEventsOptions,
+> = T extends GuildScheduledEventResolvable | FetchGuildScheduledEventOptions
+ ? GuildScheduledEvent
+ : Collection<Snowflake, GuildScheduledEvent>;
+
+export type GuildScheduledEventManagerFetchSubscribersResult<T extends FetchGuildScheduledEventSubscribersOptions> =
+ T extends { withMember: true }
+ ? Collection<Snowflake, GuildScheduledEventUser<true>>
+ : Collection<Snowflake, GuildScheduledEventUser<false>>;
+
+export type GuildScheduledEventResolvable = Snowflake | GuildScheduledEvent;
+
+export type GuildScheduledEventSetStatusArg<T extends GuildScheduledEventStatus> =
+ T extends GuildScheduledEventStatus.Scheduled
+ ? GuildScheduledEventStatus.Active | GuildScheduledEventStatus.Canceled
+ : T extends GuildScheduledEventStatus.Active
+ ? GuildScheduledEventStatus.Completed
+ : never;
+
+export interface GuildScheduledEventUser<T> {
+ guildScheduledEventId: Snowflake;
+ user: User;
+ member: T extends true ? GuildMember : null;
+}
+
+export type GuildTemplateResolvable = string;
+
+export type GuildVoiceChannelResolvable = VoiceBasedChannel | Snowflake;
+
+export interface GuildOnboardingPromptOptionEmoji {
+ id: Snowflake | null;
+ name: string;
+ animated: boolean;
+}
+
+export type HexColorString = `#${string}`;
+
+export interface IntegrationAccount {
+ id: string | Snowflake;
+ name: string;
+}
+
+export type IntegrationType = 'twitch' | 'youtube' | 'discord' | 'guild_subscription';
+
+export type CollectedInteraction<Cached extends CacheType = CacheType> =
+ | StringSelectMenuInteraction<Cached>
+ | UserSelectMenuInteraction<Cached>
+ | RoleSelectMenuInteraction<Cached>
+ | MentionableSelectMenuInteraction<Cached>
+ | ChannelSelectMenuInteraction<Cached>
+ | ButtonInteraction<Cached>
+ | ModalSubmitInteraction<Cached>;
+
+export interface InteractionCollectorOptions<T extends CollectedInteraction, Cached extends CacheType = CacheType>
+ extends CollectorOptions<[T, Collection<Snowflake, T>]> {
+ channel?: TextBasedChannelResolvable;
+ componentType?: ComponentType;
+ guild?: GuildResolvable;
+ interactionType?: InteractionType;
+ max?: number;
+ maxComponents?: number;
+ maxUsers?: number;
+ message?: CacheTypeReducer<Cached, Message, APIMessage>;
+ interactionResponse?: InteractionResponse<BooleanCache<Cached>>;
+}
+
+export interface InteractionDeferReplyOptions {
+ ephemeral?: boolean;
+ fetchReply?: boolean;
+}
+
+export type InteractionDeferUpdateOptions = Omit<InteractionDeferReplyOptions, 'ephemeral'>;
+
+export interface InteractionReplyOptions extends BaseMessageOptions {
+ tts?: boolean;
+ ephemeral?: boolean;
+ fetchReply?: boolean;
+ flags?: BitFieldResolvable<
+ Extract<MessageFlagsString, 'Ephemeral' | 'SuppressEmbeds'>,
+ MessageFlags.Ephemeral | MessageFlags.SuppressEmbeds
+ >;
+}
+
+export interface InteractionUpdateOptions extends MessageEditOptions {
+ fetchReply?: boolean;
+}
+
+export interface InviteGenerationOptions {
+ permissions?: PermissionResolvable;
+ guild?: GuildResolvable;
+ disableGuildSelect?: boolean;
+ scopes: OAuth2Scopes[];
+}
+
+export type GuildInvitableChannelResolvable =
+ | TextChannel
+ | VoiceChannel
+ | NewsChannel
+ | StageChannel
+ | ForumChannel
+ | Snowflake;
+
+export interface InviteCreateOptions {
+ temporary?: boolean;
+ maxAge?: number;
+ maxUses?: number;
+ unique?: boolean;
+ reason?: string;
+ targetApplication?: ApplicationResolvable;
+ targetUser?: UserResolvable;
+ targetType?: InviteTargetType;
+}
+
+export type InviteResolvable = string;
+
+export interface LifetimeFilterOptions<K, V> {
+ excludeFromSweep?: (value: V, key: K, collection: LimitedCollection<K, V>) => boolean;
+ getComparisonTimestamp?: (value: V, key: K, collection: LimitedCollection<K, V>) => number;
+ lifetime?: number;
+}
+
+export interface MakeErrorOptions {
+ name: string;
+ message: string;
+ stack: string;
+}
+
+export type ActionRowComponentOptions =
+ | ButtonComponentData
+ | StringSelectMenuComponentData
+ | UserSelectMenuComponentData
+ | RoleSelectMenuComponentData
+ | MentionableSelectMenuComponentData
+ | ChannelSelectMenuComponentData;
+
+export type MessageActionRowComponentResolvable = MessageActionRowComponent | ActionRowComponentOptions;
+
+export interface MessageActivity {
+ partyId?: string;
+ type: MessageActivityType;
+}
+
+export interface BaseButtonComponentData extends BaseComponentData {
+ type: ComponentType.Button;
+ style: ButtonStyle;
+ disabled?: boolean;
+ emoji?: ComponentEmojiResolvable;
+ label?: string;
+}
+
+export interface LinkButtonComponentData extends BaseButtonComponentData {
+ style: ButtonStyle.Link;
+ url: string;
+}
+
+export interface InteractionButtonComponentData extends BaseButtonComponentData {
+ style: Exclude<ButtonStyle, ButtonStyle.Link>;
+ customId: string;
+}
+
+export type ButtonComponentData = InteractionButtonComponentData | LinkButtonComponentData;
+
+export interface MessageCollectorOptions extends CollectorOptions<[Message, Collection<Snowflake, Message>]> {
+ max?: number;
+ maxProcessed?: number;
+}
+
+export type MessageComponent =
+ | Component
+ | ActionRowBuilder<MessageActionRowComponentBuilder | ModalActionRowComponentBuilder>
+ | ButtonComponent
+ | StringSelectMenuComponent
+ | UserSelectMenuComponent
+ | RoleSelectMenuComponent
+ | MentionableSelectMenuComponent
+ | ChannelSelectMenuComponent;
+
+export type CollectedMessageInteraction<Cached extends CacheType = CacheType> = Exclude<
+ CollectedInteraction<Cached>,
+ ModalSubmitInteraction
+>;
+
+export type MessageComponentCollectorOptions<T extends CollectedMessageInteraction> = Omit<
+ InteractionCollectorOptions<T>,
+ 'channel' | 'message' | 'guild' | 'interactionType'
+>;
+
+export type MessageChannelComponentCollectorOptions<T extends CollectedMessageInteraction> = Omit<
+ InteractionCollectorOptions<T>,
+ 'channel' | 'guild' | 'interactionType'
+>;
+
+export interface MessageEvent {
+ data: WebSocket.Data;
+ type: string;
+ target: WebSocket;
+}
+
+export interface MessageInteraction {
+ id: Snowflake;
+ type: InteractionType;
+ commandName: string;
+ user: User;
+}
+
+export interface MessageMentionsHasOptions {
+ ignoreDirect?: boolean;
+ ignoreRoles?: boolean;
+ ignoreRepliedUser?: boolean;
+ ignoreEveryone?: boolean;
+}
+
+export interface MessageMentionOptions {
+ parse?: MessageMentionTypes[];
+ roles?: Snowflake[];
+ users?: Snowflake[];
+ repliedUser?: boolean;
+}
+
+export type MessageMentionTypes = 'roles' | 'users' | 'everyone';
+
+export interface BaseMessageOptions {
+ content?: string;
+ embeds?: (JSONEncodable<APIEmbed> | APIEmbed)[];
+ allowedMentions?: MessageMentionOptions;
+ files?: (
+ | BufferResolvable
+ | Stream
+ | JSONEncodable<APIAttachment>
+ | Attachment
+ | AttachmentBuilder
+ | AttachmentPayload
+ )[];
+ components?: (
+ | JSONEncodable<APIActionRowComponent<APIMessageActionRowComponent>>
+ | ActionRowData<MessageActionRowComponentData | MessageActionRowComponentBuilder>
+ | APIActionRowComponent<APIMessageActionRowComponent>
+ )[];
+}
+
+export interface MessageCreateOptions extends BaseMessageOptions {
+ tts?: boolean;
+ nonce?: string | number;
+ reply?: ReplyOptions;
+ stickers?: StickerResolvable[];
+ flags?: BitFieldResolvable<
+ Extract<MessageFlagsString, 'SuppressEmbeds' | 'SuppressNotifications'>,
+ MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications
+ >;
+}
+
+export type GuildForumThreadMessageCreateOptions = BaseMessageOptions &
+ Pick<MessageCreateOptions, 'flags' | 'stickers'>;
+
+export interface MessageEditOptions extends Omit<BaseMessageOptions, 'content'> {
+ content?: string | null;
+ attachments?: JSONEncodable<AttachmentPayload>[];
+ flags?: BitFieldResolvable<Extract<MessageFlagsString, 'SuppressEmbeds'>, MessageFlags.SuppressEmbeds>;
+}
+
+export type MessageReactionResolvable = MessageReaction | Snowflake | string;
+
+export interface MessageReference {
+ channelId: Snowflake;
+ guildId: Snowflake | undefined;
+ messageId: Snowflake | undefined;
+}
+
+export type MessageResolvable = Message | Snowflake;
+
+export interface BaseSelectMenuComponentData extends BaseComponentData {
+ customId: string;
+ disabled?: boolean;
+ maxValues?: number;
+ minValues?: number;
+ placeholder?: string;
+}
+
+export interface StringSelectMenuComponentData extends BaseSelectMenuComponentData {
+ type: ComponentType.StringSelect;
+ options: SelectMenuComponentOptionData[];
+}
+
+export interface UserSelectMenuComponentData extends BaseSelectMenuComponentData {
+ type: ComponentType.UserSelect;
+}
+
+export interface RoleSelectMenuComponentData extends BaseSelectMenuComponentData {
+ type: ComponentType.RoleSelect;
+}
+
+export interface MentionableSelectMenuComponentData extends BaseSelectMenuComponentData {
+ type: ComponentType.MentionableSelect;
+}
+
+export interface ChannelSelectMenuComponentData extends BaseSelectMenuComponentData {
+ type: ComponentType.ChannelSelect;
+ channelTypes?: ChannelType[];
+}
+
+export interface MessageSelectOption {
+ default: boolean;
+ description: string | null;
+ emoji: APIPartialEmoji | null;
+ label: string;
+ value: string;
+}
+
+export interface SelectMenuComponentOptionData {
+ default?: boolean;
+ description?: string;
+ emoji?: ComponentEmojiResolvable;
+ label: string;
+ value: string;
+}
+
+export interface TextInputComponentData extends BaseComponentData {
+ type: ComponentType.TextInput;
+ customId: string;
+ style: TextInputStyle;
+ label: string;
+ minLength?: number;
+ maxLength?: number;
+ required?: boolean;
+ value?: string;
+ placeholder?: string;
+}
+
+export type MessageTarget =
+ | Interaction
+ | InteractionWebhook
+ | TextBasedChannel
+ | User
+ | GuildMember
+ | Webhook
+ | WebhookClient
+ | Message
+ | MessageManager;
+
+export interface MultipleShardRespawnOptions {
+ shardDelay?: number;
+ respawnDelay?: number;
+ timeout?: number;
+}
+
+export interface MultipleShardSpawnOptions {
+ amount?: number | 'auto';
+ delay?: number;
+ timeout?: number;
+}
+
+export interface OverwriteData {
+ allow?: PermissionResolvable;
+ deny?: PermissionResolvable;
+ id: GuildMemberResolvable | RoleResolvable;
+ type?: OverwriteType;
+}
+
+export type OverwriteResolvable = PermissionOverwrites | OverwriteData;
+
+export type PermissionFlags = Record<keyof typeof PermissionFlagsBits, bigint>;
+
+export type PermissionOverwriteOptions = Partial<Record<keyof typeof PermissionFlagsBits, boolean | null>>;
+
+export type PermissionResolvable = BitFieldResolvable<keyof typeof PermissionFlagsBits, bigint>;
+
+export type PermissionOverwriteResolvable = UserResolvable | RoleResolvable | PermissionOverwrites;
+
+export type RecursiveArray<T> = ReadonlyArray<T | RecursiveArray<T>>;
+
+export type RecursiveReadonlyArray<T> = ReadonlyArray<T | RecursiveReadonlyArray<T>>;
+
+export interface PartialRecipient {
+ username: string;
+}
+
+export interface PresenceData {
+ status?: PresenceStatusData;
+ afk?: boolean;
+ activities?: ActivitiesOptions[];
+ shardId?: number | number[];
+}
+
+export type PresenceResolvable = Presence | UserResolvable | Snowflake;
+
+export interface PartialChannelData {
+ id?: Snowflake | number;
+ parentId?: Snowflake | number;
+ type?: ChannelType.GuildText | ChannelType.GuildVoice | ChannelType.GuildCategory;
+ name: string;
+ topic?: string | null;
+ nsfw?: boolean;
+ bitrate?: number;
+ userLimit?: number;
+ rtcRegion?: string | null;
+ videoQualityMode?: VideoQualityMode;
+ permissionOverwrites?: PartialOverwriteData[];
+ rateLimitPerUser?: number;
+}
+
+export type Partialize<
+ T extends AllowedPartial,
+ N extends keyof T | null = null,
+ M extends keyof T | null = null,
+ E extends keyof T | '' = '',
+> = {
+ readonly client: Client<true>;
+ id: Snowflake;
+ partial: true;
+} & {
+ [K in keyof Omit<T, 'client' | 'id' | 'partial' | E>]: K extends N ? null : K extends M ? T[K] | null : T[K];
+};
+
+export interface PartialDMChannel extends Partialize<DMChannel, null, null, 'lastMessageId'> {
+ lastMessageId: undefined;
+}
+
+export interface PartialGuildMember extends Partialize<GuildMember, 'joinedAt' | 'joinedTimestamp' | 'pending'> {}
+
+export interface PartialMessage
+ extends Partialize<Message, 'type' | 'system' | 'pinned' | 'tts', 'content' | 'cleanContent' | 'author'> {}
+
+export interface PartialMessageReaction extends Partialize<MessageReaction, 'count'> {}
+
+export interface PartialThreadMember extends Partialize<ThreadMember, 'flags' | 'joinedAt' | 'joinedTimestamp'> {}
+
+export interface PartialOverwriteData {
+ id: Snowflake | number;
+ type?: OverwriteType;
+ allow?: PermissionResolvable;
+ deny?: PermissionResolvable;
+}
+
+export interface PartialRoleData extends RoleData {
+ id?: Snowflake | number;
+}
+
+export enum Partials {
+ User,
+ Channel,
+ GuildMember,
+ Message,
+ Reaction,
+ GuildScheduledEvent,
+ ThreadMember,
+}
+
+export interface PartialUser extends Partialize<User, 'username' | 'tag' | 'discriminator'> {}
+
+export type PresenceStatusData = ClientPresenceStatus | 'invisible';
+
+export type PresenceStatus = PresenceStatusData | 'offline';
+
+export interface ReactionCollectorOptions extends CollectorOptions<[MessageReaction, User]> {
+ max?: number;
+ maxEmojis?: number;
+ maxUsers?: number;
+}
+
+export interface ReplyOptions {
+ messageReference: MessageResolvable;
+ failIfNotExists?: boolean;
+}
+
+export interface MessageReplyOptions extends Omit<MessageCreateOptions, 'reply'> {
+ failIfNotExists?: boolean;
+}
+
+export interface ResolvedOverwriteOptions {
+ allow: PermissionsBitField;
+ deny: PermissionsBitField;
+}
+
+export interface RoleData {
+ name?: string;
+ color?: ColorResolvable;
+ hoist?: boolean;
+ position?: number;
+ permissions?: PermissionResolvable;
+ mentionable?: boolean;
+ icon?: BufferResolvable | Base64Resolvable | EmojiResolvable | null;
+ unicodeEmoji?: string | null;
+}
+
+export type RoleMention = '@everyone' | `<@&${Snowflake}>`;
+
+export interface RolePosition {
+ role: RoleResolvable;
+ position: number;
+}
+
+export type RoleResolvable = Role | Snowflake;
+
+export interface RoleSubscriptionData {
+ roleSubscriptionListingId: Snowflake;
+ tierName: string;
+ totalMonthsSubscribed: number;
+ isRenewal: boolean;
+}
+
+export interface RoleTagData {
+ botId?: Snowflake;
+ integrationId?: Snowflake;
+ premiumSubscriberRole?: true;
+ subscriptionListingId?: Snowflake;
+ availableForPurchase?: true;
+ guildConnections?: true;
+}
+
+export interface SetChannelPositionOptions {
+ relative?: boolean;
+ reason?: string;
+}
+
+export interface SetParentOptions {
+ lockPermissions?: boolean;
+ reason?: string;
+}
+
+export interface SetRolePositionOptions {
+ relative?: boolean;
+ reason?: string;
+}
+
+export type ShardingManagerMode = 'process' | 'worker';
+
+export interface ShardingManagerOptions {
+ totalShards?: number | 'auto';
+ shardList?: number[] | 'auto';
+ mode?: ShardingManagerMode;
+ respawn?: boolean;
+ silent?: boolean;
+ shardArgs?: string[];
+ token?: string;
+ execArgv?: string[];
+}
+
+export { Snowflake };
+
+export type StageInstanceResolvable = StageInstance | Snowflake;
+
+export interface StartThreadOptions {
+ name: string;
+ autoArchiveDuration?: ThreadAutoArchiveDuration;
+ reason?: string;
+ rateLimitPerUser?: number;
+}
+
+export type ClientStatus = number;
+
+export type StickerResolvable = Sticker | Snowflake;
+
+export type SystemChannelFlagsResolvable = BitFieldResolvable<SystemChannelFlagsString, number>;
+
+export type StageChannelResolvable = StageChannel | Snowflake;
+
+export interface StageInstanceEditOptions {
+ topic?: string;
+ privacyLevel?: StageInstancePrivacyLevel;
+}
+
+export type SweeperKey = keyof SweeperDefinitions;
+
+export type CollectionSweepFilter<K, V> = (value: V, key: K, collection: Collection<K, V>) => boolean;
+
+export interface SweepOptions<K, V> {
+ interval: number;
+ filter: GlobalSweepFilter<K, V>;
+}
+
+export interface LifetimeSweepOptions {
+ interval: number;
+ lifetime: number;
+ filter?: never;
+}
+
+export interface SweeperDefinitions {
+ applicationCommands: [Snowflake, ApplicationCommand];
+ autoModerationRules: [Snowflake, AutoModerationRule];
+ bans: [Snowflake, GuildBan];
+ emojis: [Snowflake, GuildEmoji];
+ invites: [string, Invite, true];
+ guildMembers: [Snowflake, GuildMember];
+ messages: [Snowflake, Message, true];
+ presences: [Snowflake, Presence];
+ reactions: [string | Snowflake, MessageReaction];
+ stageInstances: [Snowflake, StageInstance];
+ stickers: [Snowflake, Sticker];
+ threadMembers: [Snowflake, ThreadMember];
+ threads: [Snowflake, AnyThreadChannel, true];
+ users: [Snowflake, User];
+ voiceStates: [Snowflake, VoiceState];
+}
+
+export type SweeperOptions = {
+ [K in keyof SweeperDefinitions]?: SweeperDefinitions[K][2] extends true
+ ? SweepOptions<SweeperDefinitions[K][0], SweeperDefinitions[K][1]> | LifetimeSweepOptions
+ : SweepOptions<SweeperDefinitions[K][0], SweeperDefinitions[K][1]>;
+};
+
+export interface LimitedCollectionOptions<K, V> {
+ maxSize?: number;
+ keepOverLimit?: (value: V, key: K, collection: LimitedCollection<K, V>) => boolean;
+}
+
+export type Channel =
+ | CategoryChannel
+ | DMChannel
+ | PartialDMChannel
+ | PartialGroupDMChannel
+ | NewsChannel
+ | StageChannel
+ | TextChannel
+ | AnyThreadChannel
+ | VoiceChannel
+ | ForumChannel;
+
+export type TextBasedChannel = Exclude<
+ Extract<Channel, { type: TextChannelType }>,
+ PartialGroupDMChannel | ForumChannel
+>;
+
+export type TextBasedChannelTypes = TextBasedChannel['type'];
+
+export type GuildTextBasedChannelTypes = Exclude<TextBasedChannelTypes, ChannelType.DM>;
+
+export type VoiceBasedChannel = Extract<Channel, { bitrate: number }>;
+
+export type GuildBasedChannel = Extract<Channel, { guild: Guild }>;
+
+export type CategoryChildChannel = Exclude<Extract<Channel, { parent: CategoryChannel | null }>, CategoryChannel>;
+
+export type NonThreadGuildBasedChannel = Exclude<GuildBasedChannel, AnyThreadChannel>;
+
+export type GuildTextBasedChannel = Extract<GuildBasedChannel, TextBasedChannel>;
+
+export type TextChannelResolvable = Snowflake | TextChannel;
+
+export type TextBasedChannelResolvable = Snowflake | TextBasedChannel;
+
+export type ThreadChannelResolvable = AnyThreadChannel | Snowflake;
+
+export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PublicThread | ChannelType.PrivateThread;
+
+export interface GuildTextThreadCreateOptions<AllowedThreadType> extends StartThreadOptions {
+ startMessage?: MessageResolvable;
+ type?: AllowedThreadType;
+ invitable?: AllowedThreadType extends ChannelType.PrivateThread ? boolean : never;
+}
+
+export interface GuildForumThreadCreateOptions extends StartThreadOptions {
+ message: GuildForumThreadMessageCreateOptions | MessagePayload;
+ appliedTags?: Snowflake[];
+}
+
+export interface ThreadEditOptions {
+ name?: string;
+ archived?: boolean;
+ autoArchiveDuration?: ThreadAutoArchiveDuration;
+ rateLimitPerUser?: number;
+ locked?: boolean;
+ invitable?: boolean;
+ appliedTags?: Snowflake[];
+ flags?: ChannelFlagsResolvable;
+ reason?: string;
+}
+
+export type ThreadMemberResolvable = ThreadMember | UserResolvable;
+
+export type UserMention = `<@${Snowflake}>`;
+
+export type UserResolvable = User | Snowflake | Message | GuildMember | ThreadMember;
+
+export interface Vanity {
+ code: string | null;
+ uses: number;
+}
+
+export type VoiceBasedChannelTypes = VoiceBasedChannel['type'];
+
+export type VoiceChannelResolvable = Snowflake | VoiceChannel;
+
+export interface VoiceStateEditOptions {
+ requestToSpeak?: boolean;
+ suppressed?: boolean;
+}
+
+export type WebhookClientData = WebhookClientDataIdWithToken | WebhookClientDataURL;
+
+export interface WebhookClientDataIdWithToken {
+ id: Snowflake;
+ token: string;
+}
+
+export interface WebhookClientDataURL {
+ url: string;
+}
+
+export type WebhookClientOptions = Pick<ClientOptions, 'allowedMentions' | 'rest'>;
+
+export interface WebhookDeleteOptions {
+ token?: string;
+ reason?: string;
+}
+
+export interface WebhookEditOptions {
+ name?: string;
+ avatar?: BufferResolvable | null;
+ channel?: GuildTextChannelResolvable | VoiceChannel | ForumChannel | StageChannel;
+ reason?: string;
+}
+
+export interface WebhookMessageEditOptions extends Omit<MessageEditOptions, 'flags'> {
+ threadId?: Snowflake;
+}
+
+export interface InteractionEditReplyOptions extends WebhookMessageEditOptions {
+ message?: MessageResolvable | '@original';
+}
+
+export interface WebhookFetchMessageOptions {
+ threadId?: Snowflake;
+}
+
+export interface WebhookMessageCreateOptions extends Omit<MessageCreateOptions, 'nonce' | 'reply' | 'stickers'> {
+ username?: string;
+ avatarURL?: string;
+ threadId?: Snowflake;
+ threadName?: string;
+}
+
+export interface WebSocketOptions {
+ large_threshold?: number;
+ version?: number;
+ buildStrategy?(manager: WSWebSocketManager): IShardingStrategy;
+ buildIdentifyThrottler?(manager: WSWebSocketManager): Awaitable<IIdentifyThrottler>;
+}
+
+export interface WidgetActivity {
+ name: string;
+}
+
+export interface WidgetChannel {
+ id: Snowflake;
+ name: string;
+ position: number;
+}
+
+export interface WelcomeChannelData {
+ description: string;
+ channel: TextChannel | NewsChannel | ForumChannel | Snowflake;
+ emoji?: EmojiIdentifierResolvable;
+}
+
+export interface WelcomeScreenEditOptions {
+ enabled?: boolean;
+ description?: string;
+ welcomeChannels?: WelcomeChannelData[];
+}
+
+export interface ClientApplicationInstallParams {
+ scopes: OAuth2Scopes[];
+ permissions: Readonly<PermissionsBitField>;
+}
+
+export type Serialized<T> = T extends symbol | bigint | (() => any)
+ ? never
+ : T extends number | string | boolean | undefined
+ ? T
+ : T extends { toJSON(): infer R }
+ ? R
+ : T extends ReadonlyArray<infer V>
+ ? Serialized<V>[]
+ : T extends ReadonlyMap<unknown, unknown> | ReadonlySet<unknown>
+ ? {}
+ : { [K in keyof T]: Serialized<T[K]> };
+
+//#endregion
+
+//#region Voice
+
+/**
+ * @internal Use `DiscordGatewayAdapterLibraryMethods` from `@discordjs/voice` instead.
+ */
+export interface InternalDiscordGatewayAdapterLibraryMethods {
+ onVoiceServerUpdate(data: GatewayVoiceServerUpdateDispatchData): void;
+ onVoiceStateUpdate(data: GatewayVoiceStateUpdateDispatchData): void;
+ destroy(): void;
+}
+
+/**
+ * @internal Use `DiscordGatewayAdapterImplementerMethods` from `@discordjs/voice` instead.
+ */
+export interface InternalDiscordGatewayAdapterImplementerMethods {
+ sendPayload(payload: unknown): boolean;
+ destroy(): void;
+}
+
+/**
+ * @internal Use `DiscordGatewayAdapterCreator` from `@discordjs/voice` instead.
+ */
+export type InternalDiscordGatewayAdapterCreator = (
+ methods: InternalDiscordGatewayAdapterLibraryMethods,
+) => InternalDiscordGatewayAdapterImplementerMethods;
+
+//#endregion
+
+// External
+export * from 'discord-api-types/v10';
+export * from '@discordjs/builders';
+export * from '@discordjs/formatters';
+export * from '@discordjs/rest';
+export * from '@discordjs/util';
+export * from '@discordjs/ws';
diff --git a/node_modules/discord.js/typings/index.test-d.ts b/node_modules/discord.js/typings/index.test-d.ts
new file mode 100644
index 0000000..86b2824
--- /dev/null
+++ b/node_modules/discord.js/typings/index.test-d.ts
@@ -0,0 +1,2311 @@
+import type { ChildProcess } from 'node:child_process';
+import type { Worker } from 'node:worker_threads';
+import {
+ APIInteractionGuildMember,
+ APIPartialChannel,
+ APIPartialGuild,
+ APIInteractionDataResolvedGuildMember,
+ APIInteractionDataResolvedChannel,
+ APIRole,
+ APIButtonComponent,
+ APISelectMenuComponent,
+ ApplicationCommandOptionType,
+ ComponentType,
+ ApplicationCommandPermissionType,
+ ChannelType,
+ InteractionType,
+ GatewayIntentBits,
+ Locale,
+ PermissionFlagsBits,
+ AuditLogEvent,
+ ButtonStyle,
+ TextInputStyle,
+ APITextInputComponent,
+ APIEmbed,
+ ApplicationCommandType,
+ APIMessage,
+ APIActionRowComponent,
+ APIActionRowComponentTypes,
+ APIStringSelectComponent,
+} from 'discord-api-types/v10';
+import {
+ ApplicationCommand,
+ ApplicationCommandData,
+ ApplicationCommandManager,
+ ApplicationCommandOptionData,
+ ApplicationCommandResolvable,
+ ApplicationCommandSubCommandData,
+ ApplicationCommandSubGroupData,
+ CommandInteraction,
+ ButtonInteraction,
+ CacheType,
+ CategoryChannel,
+ Client,
+ ClientApplication,
+ ClientUser,
+ CloseEvent,
+ Collection,
+ ChatInputCommandInteraction,
+ CommandInteractionOption,
+ CommandInteractionOptionResolver,
+ CommandOptionNonChoiceResolvableType,
+ ContextMenuCommandInteraction,
+ DMChannel,
+ Guild,
+ GuildApplicationCommandManager,
+ GuildChannelManager,
+ GuildEmoji,
+ GuildEmojiManager,
+ GuildMember,
+ GuildResolvable,
+ IntentsBitField,
+ Interaction,
+ InteractionCollector,
+ Message,
+ AttachmentBuilder,
+ MessageCollector,
+ MessageComponentInteraction,
+ MessageReaction,
+ ModalBuilder,
+ NewsChannel,
+ Options,
+ PartialTextBasedChannelFields,
+ PartialUser,
+ PermissionsBitField,
+ ReactionCollector,
+ Role,
+ RoleManager,
+ Serialized,
+ ShardClientUtil,
+ ShardingManager,
+ Snowflake,
+ StageChannel,
+ TextBasedChannelFields,
+ TextBasedChannel,
+ TextBasedChannelTypes,
+ VoiceBasedChannel,
+ GuildBasedChannel,
+ NonThreadGuildBasedChannel,
+ GuildTextBasedChannel,
+ TextChannel,
+ ThreadChannel,
+ ThreadMember,
+ Typing,
+ User,
+ VoiceChannel,
+ Shard,
+ WebSocketShard,
+ Collector,
+ GuildAuditLogsEntry,
+ GuildAuditLogs,
+ StageInstance,
+ ActionRowBuilder,
+ ButtonComponent,
+ SelectMenuComponent,
+ RepliableInteraction,
+ ThreadChannelType,
+ Events,
+ WebSocketShardEvents,
+ Status,
+ CategoryChannelChildManager,
+ ActionRowData,
+ MessageActionRowComponentData,
+ PartialThreadMember,
+ ThreadMemberFlagsBitField,
+ ButtonBuilder,
+ EmbedBuilder,
+ MessageActionRowComponent,
+ StringSelectMenuBuilder,
+ TextInputBuilder,
+ TextInputComponent,
+ Embed,
+ MessageActionRowComponentBuilder,
+ GuildBanManager,
+ GuildBan,
+ MessageManager,
+ ChannelMention,
+ UserMention,
+ PartialGroupDMChannel,
+ Attachment,
+ MessageContextMenuCommandInteraction,
+ UserContextMenuCommandInteraction,
+ AnyThreadChannel,
+ ThreadMemberManager,
+ CollectedMessageInteraction,
+ ShardEvents,
+ Webhook,
+ WebhookClient,
+ InteractionWebhook,
+ ActionRowComponent,
+ ActionRow,
+ GuildAuditLogsActionType,
+ GuildAuditLogsTargetType,
+ ModalSubmitInteraction,
+ ForumChannel,
+ ChannelFlagsBitField,
+ GuildForumThreadManager,
+ GuildTextThreadManager,
+ AnySelectMenuInteraction,
+ StringSelectMenuInteraction,
+ StringSelectMenuComponent,
+ UserSelectMenuInteraction,
+ RoleSelectMenuInteraction,
+ ChannelSelectMenuInteraction,
+ MentionableSelectMenuInteraction,
+ MessageMentions,
+ AutoModerationActionExecution,
+ AutoModerationRule,
+ AutoModerationRuleManager,
+ PrivateThreadChannel,
+ PublicThreadChannel,
+ GuildMemberManager,
+ GuildMemberFlagsBitField,
+ ThreadManager,
+ FetchedThreads,
+ FetchedThreadsMore,
+ DMMessageManager,
+ GuildMessageManager,
+ ApplicationCommandChannelOptionData,
+ ApplicationCommandChannelOption,
+ ApplicationCommandChoicesOption,
+ ApplicationCommandChoicesData,
+ ApplicationCommandSubGroup,
+ ApplicationCommandSubCommand,
+ ChatInputApplicationCommandData,
+ ApplicationCommandPermissionsManager,
+ GuildOnboarding,
+ StringSelectMenuComponentData,
+ ButtonComponentData,
+} from '.';
+import { expectAssignable, expectNotAssignable, expectNotType, expectType } from 'tsd';
+import type { ContextMenuCommandBuilder, SlashCommandBuilder } from '@discordjs/builders';
+
+// Test type transformation:
+declare const serialize: <T>(value: T) => Serialized<T>;
+declare const notPropertyOf: <T, P extends PropertyKey>(value: T, property: P & Exclude<P, keyof T>) => void;
+
+const client: Client = new Client({
+ intents: GatewayIntentBits.Guilds,
+ makeCache: Options.cacheWithLimits({
+ MessageManager: 200,
+ // @ts-expect-error
+ Message: 100,
+ GuildMemberManager: {
+ maxSize: 200,
+ keepOverLimit: member => member.id === client.user?.id,
+ },
+ }),
+});
+
+const testGuildId = '222078108977594368'; // DJS
+const testUserId = '987654321098765432'; // example id
+const globalCommandId = '123456789012345678'; // example id
+const guildCommandId = '234567890123456789'; // example id
+
+client.on('autoModerationActionExecution', autoModerationActionExecution =>
+ expectType<AutoModerationActionExecution>(autoModerationActionExecution),
+);
+
+client.on('autoModerationRuleCreate', ({ client }) => expectType<Client<true>>(client));
+client.on('autoModerationRuleDelete', ({ client }) => expectType<Client<true>>(client));
+
+client.on('autoModerationRuleUpdate', (oldAutoModerationRule, { client: newClient }) => {
+ expectType<Client<true>>(oldAutoModerationRule!.client);
+ expectType<Client<true>>(newClient);
+});
+
+client.on('channelCreate', ({ client }) => expectType<Client<true>>(client));
+client.on('channelDelete', ({ client }) => expectType<Client<true>>(client));
+client.on('channelPinsUpdate', ({ client }) => expectType<Client<true>>(client));
+
+client.on('channelUpdate', ({ client: oldClient }, { client: newClient }) => {
+ expectType<Client<true>>(oldClient);
+ expectType<Client<true>>(newClient);
+});
+
+client.on('emojiCreate', ({ client }) => expectType<Client<true>>(client));
+client.on('emojiDelete', ({ client }) => expectType<Client<true>>(client));
+
+client.on('emojiUpdate', ({ client: oldClient }, { client: newClient }) => {
+ expectType<Client<true>>(oldClient);
+ expectType<Client<true>>(newClient);
+});
+
+client.on('guildBanAdd', ({ client }) => expectType<Client<true>>(client));
+client.on('guildBanRemove', ({ client }) => expectType<Client<true>>(client));
+client.on('guildDelete', ({ client }) => expectType<Client<true>>(client));
+client.on('guildIntegrationsUpdate', ({ client }) => expectType<Client<true>>(client));
+client.on('guildMemberAdd', ({ client }) => expectType<Client<true>>(client));
+client.on('guildMemberAvailable', ({ client }) => expectType<Client<true>>(client));
+
+client.on('guildMemberRemove', member => {
+ expectType<Client<true>>(member.client);
+ if (member.partial) return expectType<null>(member.joinedAt);
+ expectType<Date | null>(member.joinedAt);
+});
+
+client.on('guildMembersChunk', (members, { client }) => {
+ expectType<Client<true>>(members.first()!.client);
+ expectType<Client<true>>(client);
+});
+
+client.on('guildMemberUpdate', ({ client: oldClient }, { client: newClient }) => {
+ expectType<Client<true>>(oldClient);
+ expectType<Client<true>>(newClient);
+});
+
+client.on('guildScheduledEventCreate', ({ client }) => expectType<Client<true>>(client));
+client.on('guildScheduledEventDelete', ({ client }) => expectType<Client<true>>(client));
+
+client.on('guildScheduledEventUpdate', (oldGuildScheduledEvent, { client }) => {
+ expectType<Client<true>>(oldGuildScheduledEvent!.client);
+ expectType<Client<true>>(client);
+});
+
+client.on('guildScheduledEventUserAdd', ({ client: oldClient }, { client: newClient }) => {
+ expectType<Client<true>>(oldClient);
+ expectType<Client<true>>(newClient);
+});
+
+client.on('guildScheduledEventUserRemove', ({ client: oldClient }, { client: newClient }) => {
+ expectType<Client<true>>(oldClient);
+ expectType<Client<true>>(newClient);
+});
+
+client.on('guildUnavailable', ({ client }) => expectType<Client<true>>(client));
+
+client.on('guildUpdate', ({ client: oldClient }, { client: newClient }) => {
+ expectType<Client<true>>(oldClient);
+ expectType<Client<true>>(newClient);
+});
+
+client.on('interactionCreate', async interaction => {
+ expectType<Client<true>>(interaction.client);
+ expectType<Snowflake | null>(interaction.guildId);
+ expectType<Snowflake | null>(interaction.channelId);
+ expectType<GuildMember | APIInteractionGuildMember | null>(interaction.member);
+
+ if (interaction.type === InteractionType.MessageComponent) {
+ expectType<Snowflake>(interaction.channelId);
+ }
+
+ if (interaction.type !== InteractionType.ApplicationCommand) return;
+
+ void new ActionRowBuilder<MessageActionRowComponentBuilder>();
+
+ const button = new ButtonBuilder();
+
+ const actionRow = new ActionRowBuilder<MessageActionRowComponentBuilder>({
+ type: ComponentType.ActionRow,
+ components: [button.toJSON()],
+ });
+
+ actionRow.toJSON();
+
+ await interaction.reply({ content: 'Hi!', components: [actionRow] });
+
+ // @ts-expect-error
+ interaction.reply({ content: 'Hi!', components: [[button]] });
+
+ void new ActionRowBuilder({});
+
+ // @ts-expect-error
+ await interaction.reply({ content: 'Hi!', components: [button] });
+
+ await interaction.reply({
+ content: 'test',
+ components: [
+ {
+ components: [
+ {
+ custom_id: 'abc',
+ label: 'abc',
+ style: ButtonStyle.Primary,
+ type: ComponentType.Button,
+ },
+ ],
+ type: ComponentType.ActionRow,
+ },
+ ],
+ });
+
+ // This is for testing never type resolution
+ if (!interaction.inGuild()) {
+ return;
+ }
+
+ if (interaction.inRawGuild()) {
+ expectNotType<never>(interaction);
+ return;
+ }
+
+ if (interaction.inCachedGuild()) {
+ expectNotType<never>(interaction);
+ return;
+ }
+});
+
+client.on('inviteCreate', ({ client }) => expectType<Client<true>>(client));
+client.on('inviteDelete', ({ client }) => expectType<Client<true>>(client));
+
+// This is to check that stuff is the right type
+declare const assertIsMessage: (m: Promise<Message>) => void;
+
+client.on('messageCreate', async message => {
+ const { client, channel } = message;
+
+ // https://github.com/discordjs/discord.js/issues/8545
+ {
+ // These should not throw any errors when comparing messages from any source.
+ channel.messages.cache.filter(m => m);
+ (await channel.messages.fetch()).filter(m => m.author.id === message.author.id);
+
+ if (channel.isDMBased()) {
+ expectType<DMMessageManager>(channel.messages.channel.messages);
+ } else {
+ expectType<GuildMessageManager>(channel.messages.channel.messages);
+ }
+ }
+
+ if (!message.inGuild() && message.partial) {
+ expectNotType<never>(message);
+ }
+
+ expectType<Client<true>>(client);
+ assertIsMessage(channel.send('string'));
+ assertIsMessage(channel.send({}));
+ assertIsMessage(channel.send({ embeds: [] }));
+
+ const attachment = new AttachmentBuilder('file.png');
+ const embed = new EmbedBuilder();
+ assertIsMessage(channel.send({ files: [attachment] }));
+ assertIsMessage(channel.send({ embeds: [embed] }));
+ assertIsMessage(channel.send({ embeds: [embed], files: [attachment] }));
+
+ if (message.inGuild()) {
+ expectAssignable<Message<true>>(message);
+ const component = await message.awaitMessageComponent({ componentType: ComponentType.Button });
+ expectType<ButtonInteraction<'cached'>>(component);
+ expectType<Message<true>>(await component.reply({ fetchReply: true }));
+
+ const buttonCollector = message.createMessageComponentCollector({ componentType: ComponentType.Button });
+ expectType<InteractionCollector<ButtonInteraction<'cached'>>>(buttonCollector);
+ expectAssignable<
+ (
+ test: ButtonInteraction<'cached'>,
+ items: Collection<Snowflake, ButtonInteraction<'cached'>>,
+ ) => boolean | Promise<boolean>
+ >(buttonCollector.filter);
+ expectType<GuildTextBasedChannel>(message.channel);
+ expectType<Guild>(message.guild);
+ expectType<GuildMember | null>(message.member);
+
+ expectType<MessageMentions<true>>(message.mentions);
+ expectType<Guild>(message.guild);
+ expectType<Collection<Snowflake, GuildMember>>(message.mentions.members);
+ }
+
+ expectType<TextBasedChannel>(message.channel);
+ expectNotType<GuildTextBasedChannel>(message.channel);
+
+ // @ts-expect-error
+ channel.send();
+ // @ts-expect-error
+ channel.send({ another: 'property' });
+
+ // Check collector creations.
+
+ // Verify that buttons interactions are inferred.
+ const buttonCollector = message.createMessageComponentCollector({ componentType: ComponentType.Button });
+ expectAssignable<Promise<ButtonInteraction>>(message.awaitMessageComponent({ componentType: ComponentType.Button }));
+ expectAssignable<Promise<ButtonInteraction>>(channel.awaitMessageComponent({ componentType: ComponentType.Button }));
+ expectAssignable<InteractionCollector<ButtonInteraction>>(buttonCollector);
+
+ // Verify that select menus interaction are inferred.
+ const selectMenuCollector = message.createMessageComponentCollector({ componentType: ComponentType.StringSelect });
+ expectAssignable<Promise<StringSelectMenuInteraction>>(
+ message.awaitMessageComponent({ componentType: ComponentType.StringSelect }),
+ );
+ expectAssignable<Promise<StringSelectMenuInteraction>>(
+ channel.awaitMessageComponent({ componentType: ComponentType.StringSelect }),
+ );
+ expectAssignable<InteractionCollector<StringSelectMenuInteraction>>(selectMenuCollector);
+
+ // Verify that message component interactions are default collected types.
+ const defaultCollector = message.createMessageComponentCollector();
+ expectAssignable<Promise<MessageComponentInteraction>>(message.awaitMessageComponent());
+ expectAssignable<Promise<MessageComponentInteraction>>(channel.awaitMessageComponent());
+ expectAssignable<InteractionCollector<CollectedMessageInteraction>>(defaultCollector);
+
+ // Verify that additional options don't affect default collector types.
+ const semiDefaultCollector = message.createMessageComponentCollector({ time: 10000 });
+ expectType<InteractionCollector<CollectedMessageInteraction>>(semiDefaultCollector);
+ const semiDefaultCollectorChannel = message.createMessageComponentCollector({ time: 10000 });
+ expectType<InteractionCollector<CollectedMessageInteraction>>(semiDefaultCollectorChannel);
+
+ // Verify that interaction collector options can't be used.
+ message.createMessageComponentCollector({
+ // @ts-expect-error
+ interactionType: InteractionType.ApplicationCommand,
+ });
+
+ // Make sure filter parameters are properly inferred.
+ message.createMessageComponentCollector({
+ filter: i => {
+ expectType<CollectedMessageInteraction>(i);
+ return true;
+ },
+ });
+
+ message.createMessageComponentCollector({
+ componentType: ComponentType.Button,
+ filter: i => {
+ expectType<ButtonInteraction>(i);
+ return true;
+ },
+ });
+
+ message.createMessageComponentCollector({
+ componentType: ComponentType.StringSelect,
+ filter: i => {
+ expectType<StringSelectMenuInteraction>(i);
+ return true;
+ },
+ });
+
+ message.awaitMessageComponent({
+ filter: i => {
+ expectType<CollectedMessageInteraction>(i);
+ return true;
+ },
+ });
+
+ message.awaitMessageComponent({
+ componentType: ComponentType.Button,
+ filter: i => {
+ expectType<ButtonInteraction>(i);
+ return true;
+ },
+ });
+
+ message.awaitMessageComponent({
+ componentType: ComponentType.StringSelect,
+ filter: i => {
+ expectType<StringSelectMenuInteraction>(i);
+ return true;
+ },
+ });
+
+ const webhook = await message.fetchWebhook();
+
+ if (webhook.isChannelFollower()) {
+ expectAssignable<Guild | APIPartialGuild>(webhook.sourceGuild);
+ expectAssignable<NewsChannel | APIPartialChannel>(webhook.sourceChannel);
+ } else if (webhook.isIncoming()) {
+ expectType<string>(webhook.token);
+ }
+
+ expectNotType<Guild | APIPartialGuild>(webhook.sourceGuild);
+ expectNotType<NewsChannel | APIPartialChannel>(webhook.sourceChannel);
+ expectNotType<string>(webhook.token);
+
+ channel.awaitMessageComponent({
+ filter: i => {
+ expectType<CollectedMessageInteraction<'cached'>>(i);
+ return true;
+ },
+ });
+
+ channel.awaitMessageComponent({
+ componentType: ComponentType.Button,
+ filter: i => {
+ expectType<ButtonInteraction<'cached'>>(i);
+ return true;
+ },
+ });
+
+ channel.awaitMessageComponent({
+ componentType: ComponentType.StringSelect,
+ filter: i => {
+ expectType<StringSelectMenuInteraction<'cached'>>(i);
+ return true;
+ },
+ });
+
+ // Check that both builders and builder data can be sent in messages
+ const row = new ActionRowBuilder<MessageActionRowComponentBuilder>();
+
+ const rawButtonsRow: ActionRowData<ButtonComponentData> = {
+ type: ComponentType.ActionRow,
+ components: [
+ { type: ComponentType.Button, label: 'test', style: ButtonStyle.Primary, customId: 'test' },
+ {
+ type: ComponentType.Button,
+ label: 'another test',
+ style: ButtonStyle.Link,
+ url: 'https://discord.js.org',
+ },
+ ],
+ };
+
+ const buttonsRow: ActionRowData<ButtonBuilder> = {
+ type: ComponentType.ActionRow,
+ components: [new ButtonBuilder()],
+ };
+
+ const rawStringSelectMenuRow: ActionRowData<StringSelectMenuComponentData> = {
+ type: ComponentType.ActionRow,
+ components: [
+ {
+ type: ComponentType.StringSelect,
+ options: [{ label: 'test', value: 'test' }],
+ customId: 'test',
+ },
+ ],
+ };
+
+ const stringSelectRow: ActionRowData<StringSelectMenuBuilder> = {
+ type: ComponentType.ActionRow,
+ components: [new StringSelectMenuBuilder()],
+ };
+
+ const embedData = { description: 'test', color: 0xff0000 };
+
+ channel.send({
+ components: [row, rawButtonsRow, buttonsRow, rawStringSelectMenuRow, stringSelectRow],
+ embeds: [embed, embedData],
+ });
+});
+
+client.on('messageDelete', ({ client }) => expectType<Client<true>>(client));
+
+client.on('messageDeleteBulk', (messages, { client }) => {
+ expectType<Client<true>>(messages.first()!.client);
+ expectType<Client<true>>(client);
+});
+
+client.on('messageReactionAdd', async (reaction, { client }) => {
+ expectType<Client<true>>(reaction.client);
+ expectType<Client<true>>(client);
+
+ if (reaction.partial) {
+ expectType<null>(reaction.count);
+ reaction = await reaction.fetch();
+ }
+
+ expectType<number>(reaction.count);
+ if (reaction.message.partial) return expectType<string | null>(reaction.message.content);
+ expectType<string>(reaction.message.content);
+});
+
+client.on('messageReactionRemove', ({ client: oldClient }, { client: newClient }) => {
+ expectType<Client<true>>(oldClient);
+ expectType<Client<true>>(newClient);
+});
+
+client.on('messageReactionRemoveAll', async (message, reactions) => {
+ console.log(`messageReactionRemoveAll - id: ${message.id} (${message.id.length})`);
+ if (message.partial) message = await message.fetch();
+ console.log(`messageReactionRemoveAll - content: ${message.content}`);
+ expectType<Client<true>>(message.client);
+ expectType<Client<true>>(reactions.first()!.client);
+});
+
+client.on('messageReactionRemoveEmoji', ({ client }) => expectType<Client<true>>(client));
+
+client.on('messageUpdate', ({ client: oldClient }, { client: newClient }) => {
+ expectType<Client<true>>(oldClient);
+ expectType<Client<true>>(newClient);
+});
+
+client.on('presenceUpdate', (oldPresence, { client }) => {
+ expectType<Client<true>>(oldPresence!.client);
+ expectType<Client<true>>(client);
+});
+
+declare const slashCommandBuilder: SlashCommandBuilder;
+declare const contextMenuCommandBuilder: ContextMenuCommandBuilder;
+
+client.on('ready', async client => {
+ expectType<Client<true>>(client);
+ console.log(`Client is logged in as ${client.user.tag} and ready!`);
+
+ // Test fetching all global commands and ones from one guild
+ expectType<Collection<string, ApplicationCommand<{ guild: GuildResolvable }>>>(
+ await client.application!.commands.fetch(),
+ );
+ expectType<Collection<string, ApplicationCommand<{ guild: GuildResolvable }>>>(
+ await client.application!.commands.fetch({ guildId: testGuildId }),
+ );
+
+ // Test command manager methods
+ const globalCommand = await client.application?.commands.fetch(globalCommandId);
+ const guildCommandFromGlobal = await client.application?.commands.fetch(guildCommandId, { guildId: testGuildId });
+ const guildCommandFromGuild = await client.guilds.cache.get(testGuildId)?.commands.fetch(guildCommandId);
+
+ await client.application?.commands.create(slashCommandBuilder);
+ await client.application?.commands.create(contextMenuCommandBuilder);
+ await guild.commands.create(slashCommandBuilder);
+ await guild.commands.create(contextMenuCommandBuilder);
+
+ await client.application?.commands.edit(globalCommandId, slashCommandBuilder);
+ await client.application?.commands.edit(globalCommandId, contextMenuCommandBuilder);
+ await guild.commands.edit(guildCommandId, slashCommandBuilder);
+ await guild.commands.edit(guildCommandId, contextMenuCommandBuilder);
+
+ await client.application?.commands.edit(globalCommandId, { defaultMemberPermissions: null });
+ await globalCommand?.edit({ defaultMemberPermissions: null });
+ await globalCommand?.setDefaultMemberPermissions(null);
+ await guildCommandFromGlobal?.edit({ dmPermission: false });
+
+ // @ts-expect-error
+ await client.guilds.cache.get(testGuildId)?.commands.fetch(guildCommandId, { guildId: testGuildId });
+
+ // Test command permissions
+ const globalPermissionsManager = client.application?.commands.permissions;
+ const guildPermissionsManager = client.guilds.cache.get(testGuildId)?.commands.permissions;
+
+ // Permissions from global manager
+ await globalPermissionsManager?.add({
+ command: globalCommandId,
+ guild: testGuildId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+ await globalPermissionsManager?.has({ command: globalCommandId, guild: testGuildId, permissionId: testGuildId });
+ await globalPermissionsManager?.fetch({ guild: testGuildId });
+ await globalPermissionsManager?.fetch({ command: globalCommandId, guild: testGuildId });
+ await globalPermissionsManager?.remove({
+ command: globalCommandId,
+ guild: testGuildId,
+ roles: [testGuildId],
+ token: 'VeryRealToken',
+ });
+ await globalPermissionsManager?.remove({
+ command: globalCommandId,
+ guild: testGuildId,
+ users: [testUserId],
+ token: 'VeryRealToken',
+ });
+ await globalPermissionsManager?.remove({
+ command: globalCommandId,
+ guild: testGuildId,
+ channels: [testGuildId],
+ token: 'VeryRealToken',
+ });
+ await globalPermissionsManager?.remove({
+ command: globalCommandId,
+ guild: testGuildId,
+ roles: [testGuildId],
+ users: [testUserId],
+ channels: [testGuildId],
+ token: 'VeryRealToken',
+ });
+ await globalPermissionsManager?.set({
+ command: globalCommandId,
+ guild: testGuildId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+
+ // @ts-expect-error
+ await globalPermissionsManager?.add({
+ command: globalCommandId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+ // @ts-expect-error
+ await globalPermissionsManager?.has({ command: globalCommandId, permissionId: testGuildId });
+ // @ts-expect-error
+ await globalPermissionsManager?.fetch();
+ // @ts-expect-error
+ await globalPermissionsManager?.fetch({ command: globalCommandId });
+ // @ts-expect-error
+ await globalPermissionsManager?.remove({ command: globalCommandId, roles: [testGuildId], token: 'VeryRealToken' });
+ // @ts-expect-error
+ await globalPermissionsManager?.remove({ command: globalCommandId, users: [testUserId], token: 'VeryRealToken' });
+ // @ts-expect-error
+ await globalPermissionsManager?.remove({
+ command: globalCommandId,
+ roles: [testGuildId],
+ users: [testUserId],
+ token: 'VeryRealToken',
+ });
+ // @ts-expect-error
+ await globalPermissionsManager?.set({
+ command: globalCommandId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+
+ // @ts-expect-error
+ await globalPermissionsManager?.add({
+ guild: testGuildId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+ // @ts-expect-error
+ await globalPermissionsManager?.has({ guild: testGuildId, permissionId: testGuildId });
+ // @ts-expect-error
+ await globalPermissionsManager?.remove({ guild: testGuildId, roles: [testGuildId], token: 'VeryRealToken' });
+ // @ts-expect-error
+ await globalPermissionsManager?.remove({ guild: testGuildId, users: [testUserId], token: 'VeryRealToken' });
+ // @ts-expect-error
+ await globalPermissionsManager?.remove({
+ guild: testGuildId,
+ roles: [testGuildId],
+ users: [testUserId],
+ token: 'VeryRealToken',
+ });
+ // @ts-expect-error
+ await globalPermissionsManager?.set({
+ guild: testGuildId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+
+ // Permissions from guild manager
+ await guildPermissionsManager?.add({
+ command: globalCommandId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+ await guildPermissionsManager?.has({ command: globalCommandId, permissionId: testGuildId });
+ await guildPermissionsManager?.fetch({});
+ await guildPermissionsManager?.fetch({ command: globalCommandId });
+ await guildPermissionsManager?.remove({ command: globalCommandId, roles: [testGuildId], token: 'VeryRealToken' });
+ await guildPermissionsManager?.remove({ command: globalCommandId, users: [testUserId], token: 'VeryRealToken' });
+ await guildPermissionsManager?.remove({ command: globalCommandId, channels: [testGuildId], token: 'VeryRealToken' });
+ await guildPermissionsManager?.remove({
+ command: globalCommandId,
+ roles: [testGuildId],
+ users: [testUserId],
+ channels: [testGuildId],
+ token: 'VeryRealToken',
+ });
+ await guildPermissionsManager?.set({
+ command: globalCommandId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+
+ await guildPermissionsManager?.add({
+ command: globalCommandId,
+ // @ts-expect-error
+ guild: testGuildId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+ // @ts-expect-error
+ await guildPermissionsManager?.has({ command: globalCommandId, guild: testGuildId, permissionId: testGuildId });
+ // @ts-expect-error
+ await guildPermissionsManager?.fetch({ guild: testGuildId });
+ // @ts-expect-error
+ await guildPermissionsManager?.fetch({ command: globalCommandId, guild: testGuildId });
+ await guildPermissionsManager?.remove({
+ command: globalCommandId,
+ // @ts-expect-error
+ guild: testGuildId,
+ roles: [testGuildId],
+ token: 'VeryRealToken',
+ });
+ await guildPermissionsManager?.remove({
+ command: globalCommandId,
+ // @ts-expect-error
+ guild: testGuildId,
+ users: [testUserId],
+ token: 'VeryRealToken',
+ });
+ await guildPermissionsManager?.remove({
+ command: globalCommandId,
+ // @ts-expect-error
+ guild: testGuildId,
+ roles: [testGuildId],
+ users: [testUserId],
+ token: 'VeryRealToken',
+ });
+ await guildPermissionsManager?.set({
+ command: globalCommandId,
+ // @ts-expect-error
+ guild: testGuildId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+
+ // @ts-expect-error
+ await guildPermissionsManager?.add({
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+ // @ts-expect-error
+ await guildPermissionsManager?.has({ permissionId: testGuildId });
+ // @ts-expect-error
+ await guildPermissionsManager?.remove({ roles: [testGuildId], token: 'VeryRealToken' });
+ // @ts-expect-error
+ await guildPermissionsManager?.remove({ users: [testUserId], token: 'VeryRealToken' });
+ // @ts-expect-error
+ await guildPermissionsManager?.remove({ roles: [testGuildId], users: [testUserId], token: 'VeryRealToken' });
+ // @ts-expect-error
+ await guildPermissionsManager?.set({
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+
+ // Permissions from cached global ApplicationCommand
+ await globalCommand?.permissions.add({
+ guild: testGuildId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+ await globalCommand?.permissions.has({ guild: testGuildId, permissionId: testGuildId });
+ await globalCommand?.permissions.fetch({ guild: testGuildId });
+ await globalCommand?.permissions.remove({ guild: testGuildId, roles: [testGuildId], token: 'VeryRealToken' });
+ await globalCommand?.permissions.remove({ guild: testGuildId, users: [testUserId], token: 'VeryRealToken' });
+ await globalCommand?.permissions.remove({
+ guild: testGuildId,
+ roles: [testGuildId],
+ users: [testUserId],
+ token: 'VeryRealToken',
+ });
+ await globalCommand?.permissions.set({
+ guild: testGuildId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+
+ await globalCommand?.permissions.add({
+ // @ts-expect-error
+ command: globalCommandId,
+ guild: testGuildId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+ await globalCommand?.permissions.has({
+ // @ts-expect-error
+ command: globalCommandId,
+ guild: testGuildId,
+ permissionId: testGuildId,
+ token: 'VeryRealToken',
+ });
+ // @ts-expect-error
+ await globalCommand?.permissions.fetch({ command: globalCommandId, guild: testGuildId, token: 'VeryRealToken' });
+ await globalCommand?.permissions.remove({
+ // @ts-expect-error
+ command: globalCommandId,
+ guild: testGuildId,
+ roles: [testGuildId],
+ token: 'VeryRealToken',
+ });
+ await globalCommand?.permissions.remove({
+ // @ts-expect-error
+ command: globalCommandId,
+ guild: testGuildId,
+ users: [testUserId],
+ token: 'VeryRealToken',
+ });
+ await globalCommand?.permissions.remove({
+ // @ts-expect-error
+ command: globalCommandId,
+ guild: testGuildId,
+ roles: [testGuildId],
+ users: [testUserId],
+ token: 'VeryRealToken',
+ });
+ await globalCommand?.permissions.set({
+ // @ts-expect-error
+ command: globalCommandId,
+ guild: testGuildId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+
+ // @ts-expect-error
+ await globalCommand?.permissions.add({
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+ // @ts-expect-error
+ await globalCommand?.permissions.has({ permissionId: testGuildId });
+ // @ts-expect-error
+ await globalCommand?.permissions.fetch({});
+ // @ts-expect-error
+ await globalCommand?.permissions.remove({ roles: [testGuildId], token: 'VeryRealToken' });
+ // @ts-expect-error
+ await globalCommand?.permissions.remove({ users: [testUserId], token: 'VeryRealToken' });
+ // @ts-expect-error
+ await globalCommand?.permissions.remove({ roles: [testGuildId], users: [testUserId], token: 'VeryRealToken' });
+ // @ts-expect-error
+ await globalCommand?.permissions.set({
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ });
+
+ // Permissions from cached guild ApplicationCommand
+ await guildCommandFromGlobal?.permissions.add({
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+ await guildCommandFromGlobal?.permissions.has({ permissionId: testGuildId });
+ await guildCommandFromGlobal?.permissions.fetch({});
+ await guildCommandFromGlobal?.permissions.remove({ roles: [testGuildId], token: 'VeryRealToken' });
+ await guildCommandFromGlobal?.permissions.remove({ users: [testUserId], token: 'VeryRealToken' });
+ await guildCommandFromGlobal?.permissions.remove({
+ roles: [testGuildId],
+ users: [testUserId],
+ token: 'VeryRealToken',
+ });
+ await guildCommandFromGlobal?.permissions.set({
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+
+ await guildCommandFromGlobal?.permissions.add({
+ // @ts-expect-error
+ command: globalCommandId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+ // @ts-expect-error
+ await guildCommandFromGlobal?.permissions.has({ command: guildCommandId, permissionId: testGuildId });
+ await guildCommandFromGlobal?.permissions.remove({
+ // @ts-expect-error
+ command: guildCommandId,
+ roles: [testGuildId],
+ token: 'VeryRealToken',
+ });
+ await guildCommandFromGlobal?.permissions.remove({
+ // @ts-expect-error
+ command: guildCommandId,
+ users: [testUserId],
+ token: 'VeryRealToken',
+ });
+ await guildCommandFromGlobal?.permissions.remove({
+ // @ts-expect-error
+ command: guildCommandId,
+ roles: [testGuildId],
+ users: [testUserId],
+ token: 'VeryRealToken',
+ });
+ await guildCommandFromGlobal?.permissions.set({
+ // @ts-expect-error
+ command: guildCommandId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+
+ await guildCommandFromGlobal?.permissions.add({
+ // @ts-expect-error
+ guild: testGuildId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+ // @ts-expect-error
+ await guildCommandFromGlobal?.permissions.has({ guild: testGuildId, permissionId: testGuildId });
+ await guildCommandFromGlobal?.permissions.remove({
+ // @ts-expect-error
+ guild: testGuildId,
+ roles: [testGuildId],
+ token: 'VeryRealToken',
+ });
+ // @ts-expect-error
+ await guildCommandFromGlobal?.permissions.remove({ guild: testGuildId, users: [testUserId], token: 'VeryRealToken' });
+ await guildCommandFromGlobal?.permissions.remove({
+ // @ts-expect-error
+ guild: testGuildId,
+ roles: [testGuildId],
+ users: [testUserId],
+ token: 'VeryRealToken',
+ });
+ await guildCommandFromGlobal?.permissions.set({
+ // @ts-expect-error
+ guild: testGuildId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+
+ await guildCommandFromGuild?.permissions.add({
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+ await guildCommandFromGuild?.permissions.has({ permissionId: testGuildId });
+ await guildCommandFromGuild?.permissions.fetch({});
+ await guildCommandFromGuild?.permissions.remove({ roles: [testGuildId], token: 'VeryRealToken' });
+ await guildCommandFromGuild?.permissions.remove({ users: [testUserId], token: 'VeryRealToken' });
+ await guildCommandFromGuild?.permissions.remove({
+ roles: [testGuildId],
+ users: [testUserId],
+ token: 'VeryRealToken',
+ });
+ await guildCommandFromGuild?.permissions.set({
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+
+ await guildCommandFromGuild?.permissions.add({
+ // @ts-expect-error
+ command: globalCommandId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+ // @ts-expect-error
+ await guildCommandFromGuild?.permissions.has({ command: guildCommandId, permissionId: testGuildId });
+ await guildCommandFromGuild?.permissions.remove({
+ // @ts-expect-error
+ command: guildCommandId,
+ roles: [testGuildId],
+ token: 'VeryRealToken',
+ });
+ await guildCommandFromGuild?.permissions.remove({
+ // @ts-expect-error
+ command: guildCommandId,
+ users: [testUserId],
+ token: 'VeryRealToken',
+ });
+ await guildCommandFromGuild?.permissions.remove({
+ // @ts-expect-error
+ command: guildCommandId,
+ roles: [testGuildId],
+ users: [testUserId],
+ token: 'VeryRealToken',
+ });
+ await guildCommandFromGuild?.permissions.set({
+ // @ts-expect-error
+ command: guildCommandId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+
+ await guildCommandFromGuild?.permissions.add({
+ // @ts-expect-error
+ guild: testGuildId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+ // @ts-expect-error
+ await guildCommandFromGuild?.permissions.has({ guild: testGuildId, permissionId: testGuildId });
+ // @ts-expect-error
+ await guildCommandFromGuild?.permissions.remove({ guild: testGuildId, roles: [testGuildId], token: 'VeryRealToken' });
+ // @ts-expect-error
+ await guildCommandFromGuild?.permissions.remove({ guild: testGuildId, users: [testUserId], token: 'VeryRealToken' });
+ await guildCommandFromGuild?.permissions.remove({
+ // @ts-expect-error
+ guild: testGuildId,
+ roles: [testGuildId],
+ users: [testUserId],
+ token: 'VeryRealToken',
+ });
+ await guildCommandFromGuild?.permissions.set({
+ // @ts-expect-error
+ guild: testGuildId,
+ permissions: [{ type: ApplicationCommandPermissionType.Role, id: testGuildId, permission: true }],
+ token: 'VeryRealToken',
+ });
+});
+
+client.on('roleCreate', ({ client }) => expectType<Client<true>>(client));
+client.on('roleDelete', ({ client }) => expectType<Client<true>>(client));
+
+client.on('roleUpdate', ({ client: oldClient }, { client: newClient }) => {
+ expectType<Client<true>>(oldClient);
+ expectType<Client<true>>(newClient);
+});
+
+client.on('stageInstanceCreate', ({ client }) => expectType<Client<true>>(client));
+client.on('stageInstanceDelete', ({ client }) => expectType<Client<true>>(client));
+
+client.on('stageInstanceUpdate', (oldStageInstance, { client }) => {
+ expectType<Client<true>>(oldStageInstance!.client);
+ expectType<Client<true>>(client);
+});
+
+client.on('stickerCreate', ({ client }) => expectType<Client<true>>(client));
+client.on('stickerDelete', ({ client }) => expectType<Client<true>>(client));
+
+client.on('stickerUpdate', ({ client: oldClient }, { client: newClient }) => {
+ expectType<Client<true>>(oldClient);
+ expectType<Client<true>>(newClient);
+});
+
+client.on('threadCreate', thread => {
+ expectType<Client<true>>(thread.client);
+
+ if (thread.type === ChannelType.PrivateThread) {
+ expectType<number>(thread.createdTimestamp);
+ expectType<Date>(thread.createdAt);
+ } else {
+ expectType<number | null>(thread.createdTimestamp);
+ expectType<Date | null>(thread.createdAt);
+ }
+});
+
+client.on('threadDelete', ({ client }) => expectType<Client<true>>(client));
+
+client.on('threadListSync', (threads, { client }) => {
+ expectType<Client<true>>(threads.first()!.client);
+ expectType<Client<true>>(client);
+});
+
+client.on('threadMembersUpdate', (addedMembers, removedMembers, thread) => {
+ expectType<Client<true>>(addedMembers.first()!.client);
+ expectType<Client<true>>(removedMembers.first()!.client);
+ expectType<Client<true>>(thread.client);
+ expectType<Collection<Snowflake, ThreadMember>>(addedMembers);
+ expectType<Collection<Snowflake, ThreadMember | PartialThreadMember>>(removedMembers);
+ expectType<AnyThreadChannel>(thread);
+ const left = removedMembers.first();
+ if (!left) return;
+
+ if (left.partial) {
+ expectType<PartialThreadMember>(left);
+ expectType<null>(left.flags);
+ } else {
+ expectType<ThreadMember>(left);
+ expectType<ThreadMemberFlagsBitField>(left.flags);
+ }
+});
+
+client.on('threadMemberUpdate', ({ client: oldClient }, { client: newClient }) => {
+ expectType<Client<true>>(oldClient);
+ expectType<Client<true>>(newClient);
+});
+
+client.on('threadUpdate', ({ client: oldClient }, { client: newClient }) => {
+ expectType<Client<true>>(oldClient);
+ expectType<Client<true>>(newClient);
+});
+
+client.on('typingStart', ({ client }) => expectType<Client<true>>(client));
+
+client.on('userUpdate', ({ client: oldClient }, { client: newClient }) => {
+ expectType<Client<true>>(oldClient);
+ expectType<Client<true>>(newClient);
+});
+
+client.on('voiceStateUpdate', ({ client: oldClient }, { client: newClient }) => {
+ expectType<Client<true>>(oldClient);
+ expectType<Client<true>>(newClient);
+});
+
+client.on('webhooksUpdate', ({ client }) => expectType<Client<true>>(client));
+
+client.on('guildCreate', async g => {
+ expectType<Client<true>>(g.client);
+ const channel = g.channels.cache.random();
+ if (!channel) return;
+
+ if (channel.type === ChannelType.GuildText) {
+ const row: ActionRowData<MessageActionRowComponentData> = {
+ type: ComponentType.ActionRow,
+ components: [
+ new ButtonBuilder(),
+ { type: ComponentType.Button, style: ButtonStyle.Primary, label: 'string', customId: 'foo' },
+ { type: ComponentType.Button, style: ButtonStyle.Link, label: 'test', url: 'test' },
+ { type: ComponentType.StringSelect, customId: 'foo', options: [{ label: 'label', value: 'value' }] },
+ new StringSelectMenuBuilder(),
+ // @ts-expect-error
+ { type: ComponentType.TextInput, style: TextInputStyle.Paragraph, customId: 'foo', label: 'test' },
+ // @ts-expect-error
+ new TextInputBuilder(),
+ ],
+ };
+
+ const row2 = new ActionRowBuilder<MessageActionRowComponentBuilder>({
+ type: ComponentType.ActionRow,
+ components: [
+ { type: ComponentType.Button, style: ButtonStyle.Primary, label: 'string', customId: 'foo' },
+ { type: ComponentType.Button, style: ButtonStyle.Link, label: 'test', url: 'test' },
+ { type: ComponentType.StringSelect, customId: 'foo', options: [{ label: 'label', value: 'value' }] },
+ ],
+ });
+
+ channel.send({ components: [row, row2] });
+ }
+
+ channel.setName('foo').then(updatedChannel => {
+ console.log(`New channel name: ${updatedChannel.name}`);
+ });
+
+ // @ts-expect-error no options
+ expectNotType<Promise<GuildMember>>(g.members.add(testUserId));
+
+ // @ts-expect-error no access token
+ expectNotType<Promise<GuildMember>>(g.members.add(testUserId, {}));
+
+ expectNotType<Promise<GuildMember>>(
+ // @ts-expect-error invalid role resolvable
+ g.members.add(testUserId, { accessToken: 'totallyRealAccessToken', roles: [g.roles.cache] }),
+ );
+
+ expectType<Promise<GuildMember | null>>(
+ g.members.add(testUserId, { accessToken: 'totallyRealAccessToken', fetchWhenExisting: false }),
+ );
+
+ expectType<Promise<GuildMember>>(g.members.add(testUserId, { accessToken: 'totallyRealAccessToken' }));
+
+ expectType<Promise<GuildMember>>(
+ g.members.add(testUserId, {
+ accessToken: 'totallyRealAccessToken',
+ mute: true,
+ deaf: false,
+ roles: [g.roles.cache.first()!],
+ force: true,
+ fetchWhenExisting: true,
+ }),
+ );
+});
+
+client.login('absolutely-valid-token');
+
+declare const loggedInClient: Client<true>;
+expectType<ClientApplication>(loggedInClient.application);
+expectType<Date>(loggedInClient.readyAt);
+expectType<number>(loggedInClient.readyTimestamp);
+expectType<string>(loggedInClient.token);
+expectType<number>(loggedInClient.uptime);
+expectType<ClientUser>(loggedInClient.user);
+
+declare const loggedOutClient: Client<false>;
+expectType<null>(loggedOutClient.application);
+expectType<null>(loggedOutClient.readyAt);
+expectType<null>(loggedOutClient.readyTimestamp);
+expectType<string | null>(loggedOutClient.token);
+expectType<null>(loggedOutClient.uptime);
+expectType<null>(loggedOutClient.user);
+
+expectType<undefined>(serialize(undefined));
+expectType<null>(serialize(null));
+expectType<number[]>(serialize([1, 2, 3]));
+expectType<{}>(serialize(new Set([1, 2, 3])));
+expectType<{}>(
+ serialize(
+ new Map([
+ [1, '2'],
+ [2, '4'],
+ ]),
+ ),
+);
+expectType<string>(serialize(new PermissionsBitField(PermissionFlagsBits.AttachFiles)));
+expectType<number>(serialize(new IntentsBitField(GatewayIntentBits.Guilds)));
+expectAssignable<unknown>(
+ serialize(
+ new Collection([
+ [1, '2'],
+ [2, '4'],
+ ]),
+ ),
+);
+expectType<never>(serialize(Symbol('a')));
+expectType<never>(serialize(() => {}));
+expectType<never>(serialize(BigInt(42)));
+
+// Test type return of broadcastEval:
+declare const shardClientUtil: ShardClientUtil;
+declare const shardingManager: ShardingManager;
+
+expectType<Promise<number[]>>(shardingManager.broadcastEval(() => 1));
+expectType<Promise<number[]>>(shardClientUtil.broadcastEval(() => 1));
+expectType<Promise<number[]>>(shardingManager.broadcastEval(async () => 1));
+expectType<Promise<number[]>>(shardClientUtil.broadcastEval(async () => 1));
+
+declare const dmChannel: DMChannel;
+declare const threadChannel: ThreadChannel;
+declare const threadChannelFromForum: ThreadChannel<true>;
+declare const threadChannelNotFromForum: ThreadChannel<false>;
+declare const newsChannel: NewsChannel;
+declare const textChannel: TextChannel;
+declare const voiceChannel: VoiceChannel;
+declare const guild: Guild;
+declare const user: User;
+declare const guildMember: GuildMember;
+
+// Test thread channels' parent inference
+expectType<TextChannel | NewsChannel | ForumChannel | null>(threadChannel.parent);
+expectType<ForumChannel | null>(threadChannelFromForum.parent);
+expectType<TextChannel | NewsChannel | null>(threadChannelNotFromForum.parent);
+
+// Test whether the structures implement send
+expectType<TextBasedChannelFields<false>['send']>(dmChannel.send);
+expectType<TextBasedChannelFields<true>['send']>(threadChannel.send);
+expectType<TextBasedChannelFields<true>['send']>(newsChannel.send);
+expectType<TextBasedChannelFields<true>['send']>(textChannel.send);
+expectType<TextBasedChannelFields<true>['send']>(voiceChannel.send);
+expectAssignable<PartialTextBasedChannelFields>(user);
+expectAssignable<PartialTextBasedChannelFields>(guildMember);
+
+expectType<Promise<NewsChannel>>(textChannel.setType(ChannelType.GuildAnnouncement));
+expectType<Promise<TextChannel>>(newsChannel.setType(ChannelType.GuildText));
+
+expectType<Message | null>(dmChannel.lastMessage);
+expectType<Message | null>(threadChannel.lastMessage);
+expectType<Message | null>(newsChannel.lastMessage);
+expectType<Message | null>(textChannel.lastMessage);
+expectType<Message | null>(voiceChannel.lastMessage);
+
+notPropertyOf(user, 'lastMessage');
+notPropertyOf(user, 'lastMessageId');
+notPropertyOf(guildMember, 'lastMessage');
+notPropertyOf(guildMember, 'lastMessageId');
+
+// Test collector event parameters
+declare const messageCollector: MessageCollector;
+messageCollector.on('collect', (...args) => {
+ expectType<[Message, Collection<Snowflake, Message>]>(args);
+});
+
+(async () => {
+ for await (const value of messageCollector) {
+ expectType<[Message<boolean>, Collection<Snowflake, Message>]>(value);
+ }
+})();
+
+declare const reactionCollector: ReactionCollector;
+reactionCollector.on('dispose', (...args) => {
+ expectType<[MessageReaction, User]>(args);
+});
+
+(async () => {
+ for await (const value of reactionCollector) {
+ expectType<[MessageReaction, User]>(value);
+ }
+})();
+
+// Make sure the properties are typed correctly, and that no backwards properties
+// (K -> V and V -> K) exist:
+expectAssignable<'messageCreate'>(Events.MessageCreate);
+expectAssignable<'close'>(WebSocketShardEvents.Close);
+expectAssignable<'death'>(ShardEvents.Death);
+expectAssignable<1>(Status.Connecting);
+
+declare const applicationCommandData: ApplicationCommandData;
+declare const applicationCommandOptionData: ApplicationCommandOptionData;
+declare const applicationCommandResolvable: ApplicationCommandResolvable;
+declare const applicationCommandManager: ApplicationCommandManager;
+{
+ type ApplicationCommandScope = ApplicationCommand<{ guild: GuildResolvable }>;
+
+ expectType<Promise<ApplicationCommandScope>>(applicationCommandManager.create(applicationCommandData));
+ expectAssignable<Promise<ApplicationCommand>>(applicationCommandManager.create(applicationCommandData, '0'));
+ expectType<Promise<ApplicationCommandScope>>(
+ applicationCommandManager.edit(applicationCommandResolvable, applicationCommandData),
+ );
+ expectType<Promise<ApplicationCommand>>(
+ applicationCommandManager.edit(applicationCommandResolvable, applicationCommandData, '0'),
+ );
+ expectType<Promise<Collection<Snowflake, ApplicationCommandScope>>>(
+ applicationCommandManager.set([applicationCommandData]),
+ );
+ expectType<Promise<Collection<Snowflake, ApplicationCommand>>>(
+ applicationCommandManager.set([applicationCommandData] as const, '0'),
+ );
+
+ // Test inference of choice values.
+ if ('choices' in applicationCommandOptionData) {
+ if (applicationCommandOptionData.type === ApplicationCommandOptionType.String) {
+ expectType<string>(applicationCommandOptionData.choices[0]!.value);
+ expectNotType<number>(applicationCommandOptionData.choices[0]!.value);
+ }
+
+ if (applicationCommandOptionData.type === ApplicationCommandOptionType.Integer) {
+ expectType<number>(applicationCommandOptionData.choices[0]!.value);
+ expectNotType<string>(applicationCommandOptionData.choices[0]!.value);
+ }
+
+ if (applicationCommandOptionData.type === ApplicationCommandOptionType.Number) {
+ expectType<number>(applicationCommandOptionData.choices[0]!.value);
+ expectNotType<string>(applicationCommandOptionData.choices[0]!.value);
+ }
+ }
+}
+
+declare const applicationCommandPermissionsManager: ApplicationCommandPermissionsManager<
+ {},
+ {},
+ Guild | null,
+ Snowflake
+>;
+{
+ applicationCommandPermissionsManager.add({ permissions: [], token: '' });
+ applicationCommandPermissionsManager.add({ permissions: [] as const, token: '' });
+ applicationCommandPermissionsManager.set({ permissions: [], token: '' });
+ applicationCommandPermissionsManager.set({ permissions: [] as const, token: '' });
+ applicationCommandPermissionsManager.remove({ channels: [], roles: [], users: [], token: '' });
+
+ applicationCommandPermissionsManager.remove({
+ channels: [] as const,
+ roles: [] as const,
+ users: [] as const,
+ token: '',
+ });
+}
+
+declare const chatInputApplicationCommandData: ChatInputApplicationCommandData;
+{
+ chatInputApplicationCommandData.options = [];
+ chatInputApplicationCommandData.options = [] as const;
+}
+
+declare const applicationCommandChannelOptionData: ApplicationCommandChannelOptionData;
+declare const applicationCommandChannelOption: ApplicationCommandChannelOption;
+{
+ applicationCommandChannelOptionData.channelTypes = [] as const;
+ applicationCommandChannelOptionData.channel_types = [] as const;
+ applicationCommandChannelOption.channelTypes = [] as const;
+}
+
+declare const applicationNonChoiceOptionData: ApplicationCommandOptionData & {
+ type: CommandOptionNonChoiceResolvableType;
+};
+{
+ // Options aren't allowed on this command type.
+
+ // @ts-expect-error
+ applicationNonChoiceOptionData.choices;
+}
+
+declare const applicationCommandChoicesData: ApplicationCommandChoicesData;
+declare const applicationCommandChoicesOption: ApplicationCommandChoicesOption;
+{
+ applicationCommandChoicesData.choices = [];
+ applicationCommandChoicesData.choices = [] as const;
+ applicationCommandChoicesOption.choices = [];
+ applicationCommandChoicesOption.choices = [] as const;
+}
+
+declare const applicationCommandSubCommandData: ApplicationCommandSubCommandData;
+declare const applicationCommandSubCommand: ApplicationCommandSubCommand;
+{
+ applicationCommandSubCommandData.options = [];
+ applicationCommandSubCommandData.options = [] as const;
+ applicationCommandSubCommand.options = [];
+ applicationCommandSubCommand.options = [] as const;
+}
+
+declare const applicationSubGroupCommandData: ApplicationCommandSubGroupData;
+declare const applicationCommandSubGroup: ApplicationCommandSubGroup;
+{
+ expectType<ApplicationCommandOptionType.SubcommandGroup>(applicationSubGroupCommandData.type);
+ applicationSubGroupCommandData.options = [];
+ applicationSubGroupCommandData.options = [] as const;
+ applicationCommandSubGroup.options = [];
+ applicationCommandSubGroup.options = [] as const;
+}
+
+declare const autoModerationRuleManager: AutoModerationRuleManager;
+{
+ expectType<Promise<AutoModerationRule>>(autoModerationRuleManager.fetch('1234567890'));
+ expectType<Promise<AutoModerationRule>>(autoModerationRuleManager.fetch({ autoModerationRule: '1234567890' }));
+ expectType<Promise<AutoModerationRule>>(
+ autoModerationRuleManager.fetch({ autoModerationRule: '1234567890', cache: false }),
+ );
+ expectType<Promise<AutoModerationRule>>(
+ autoModerationRuleManager.fetch({ autoModerationRule: '1234567890', force: true }),
+ );
+ expectType<Promise<AutoModerationRule>>(
+ autoModerationRuleManager.fetch({ autoModerationRule: '1234567890', cache: false, force: true }),
+ );
+ expectType<Promise<Collection<Snowflake, AutoModerationRule>>>(autoModerationRuleManager.fetch());
+ expectType<Promise<Collection<Snowflake, AutoModerationRule>>>(autoModerationRuleManager.fetch({}));
+ expectType<Promise<Collection<Snowflake, AutoModerationRule>>>(autoModerationRuleManager.fetch({ cache: false }));
+ // @ts-expect-error The `force` option cannot be used alongside fetching all auto moderation rules.
+ autoModerationRuleManager.fetch({ force: false });
+}
+
+declare const guildApplicationCommandManager: GuildApplicationCommandManager;
+expectType<Promise<Collection<Snowflake, ApplicationCommand>>>(guildApplicationCommandManager.fetch());
+expectType<Promise<Collection<Snowflake, ApplicationCommand>>>(guildApplicationCommandManager.fetch(undefined, {}));
+expectType<Promise<ApplicationCommand>>(guildApplicationCommandManager.fetch('0'));
+
+declare const categoryChannelChildManager: CategoryChannelChildManager;
+{
+ expectType<Promise<VoiceChannel>>(categoryChannelChildManager.create({ name: 'name', type: ChannelType.GuildVoice }));
+ expectType<Promise<TextChannel>>(categoryChannelChildManager.create({ name: 'name', type: ChannelType.GuildText }));
+ expectType<Promise<NewsChannel>>(
+ categoryChannelChildManager.create({ name: 'name', type: ChannelType.GuildAnnouncement }),
+ );
+ expectType<Promise<StageChannel>>(
+ categoryChannelChildManager.create({ name: 'name', type: ChannelType.GuildStageVoice }),
+ );
+ expectType<Promise<TextChannel>>(categoryChannelChildManager.create({ name: 'name' }));
+ expectType<Promise<TextChannel>>(categoryChannelChildManager.create({ name: 'name' }));
+}
+
+declare const guildChannelManager: GuildChannelManager;
+{
+ expectType<Promise<TextChannel>>(guildChannelManager.create({ name: 'name' }));
+ expectType<Promise<TextChannel>>(guildChannelManager.create({ name: 'name' }));
+ expectType<Promise<VoiceChannel>>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildVoice }));
+ expectType<Promise<CategoryChannel>>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildCategory }));
+ expectType<Promise<TextChannel>>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildText }));
+ expectType<Promise<NewsChannel>>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildAnnouncement }));
+ expectType<Promise<StageChannel>>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildStageVoice }));
+ expectType<Promise<ForumChannel>>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildForum }));
+
+ expectType<Promise<Collection<Snowflake, NonThreadGuildBasedChannel | null>>>(guildChannelManager.fetch());
+ expectType<Promise<Collection<Snowflake, NonThreadGuildBasedChannel | null>>>(
+ guildChannelManager.fetch(undefined, {}),
+ );
+ expectType<Promise<GuildBasedChannel | null>>(guildChannelManager.fetch('0'));
+
+ const channel = guildChannelManager.cache.first()!;
+
+ if (channel.isTextBased()) {
+ const { messages } = channel;
+ const message = await messages.fetch('123');
+ expectType<GuildMessageManager>(messages);
+ expectType<Promise<Message<true>>>(messages.crosspost('1234567890'));
+ expectType<Promise<Message<true>>>(messages.edit('1234567890', 'text'));
+ expectType<Promise<Message<true>>>(messages.fetch('1234567890'));
+ expectType<Promise<Collection<Snowflake, Message<true>>>>(messages.fetchPinned());
+ expectType<Guild>(message.guild);
+ expectType<Snowflake>(message.guildId);
+ expectType<GuildTextBasedChannel>(message.channel.messages.channel);
+ }
+}
+
+{
+ const { messages } = dmChannel;
+ const message = await messages.fetch('123');
+ expectType<DMMessageManager>(messages);
+ expectType<Promise<Message>>(messages.edit('1234567890', 'text'));
+ expectType<Promise<Message>>(messages.fetch('1234567890'));
+ expectType<Promise<Collection<Snowflake, Message>>>(messages.fetchPinned());
+ expectType<Guild | null>(message.guild);
+ expectType<Snowflake | null>(message.guildId);
+ expectType<DMChannel | GuildTextBasedChannel>(message.channel.messages.channel);
+ expectType<MessageMentions>(message.mentions);
+ expectType<Guild | null>(message.mentions.guild);
+ expectType<Collection<Snowflake, GuildMember> | null>(message.mentions.members);
+
+ if (messages.channel.isDMBased()) {
+ expectType<DMChannel>(messages.channel);
+ expectType<DMChannel>(messages.channel.messages.channel);
+ }
+
+ // @ts-expect-error Crossposting is not possible in direct messages.
+ messages.crosspost('1234567890');
+}
+
+declare const threadManager: ThreadManager;
+{
+ expectType<Promise<AnyThreadChannel | null>>(threadManager.fetch('12345678901234567'));
+ expectType<Promise<AnyThreadChannel | null>>(threadManager.fetch('12345678901234567', { cache: true, force: false }));
+ expectType<Promise<FetchedThreads>>(threadManager.fetch());
+ expectType<Promise<FetchedThreads>>(threadManager.fetch({}));
+ expectType<Promise<FetchedThreadsMore>>(threadManager.fetch({ archived: { limit: 4 } }));
+
+ // @ts-expect-error The force option has no effect here.
+ threadManager.fetch({ archived: {} }, { force: true });
+}
+
+declare const guildForumThreadManager: GuildForumThreadManager;
+expectType<ForumChannel>(guildForumThreadManager.channel);
+
+declare const guildTextThreadManager: GuildTextThreadManager<
+ ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread
+>;
+expectType<TextChannel | NewsChannel>(guildTextThreadManager.channel);
+
+declare const guildMemberManager: GuildMemberManager;
+{
+ expectType<Promise<GuildMember>>(guildMemberManager.fetch('12345678901234567'));
+ expectType<Promise<GuildMember>>(guildMemberManager.fetch({ user: '12345678901234567' }));
+ expectType<Promise<GuildMember>>(guildMemberManager.fetch({ user: '12345678901234567', cache: true, force: false }));
+ expectType<Promise<GuildMember>>(guildMemberManager.fetch({ user: '12345678901234567', cache: true, force: false }));
+ expectType<Promise<Collection<Snowflake, GuildMember>>>(guildMemberManager.fetch());
+ expectType<Promise<Collection<Snowflake, GuildMember>>>(guildMemberManager.fetch({}));
+ expectType<Promise<Collection<Snowflake, GuildMember>>>(guildMemberManager.fetch({ user: ['12345678901234567'] }));
+ expectType<Promise<Collection<Snowflake, GuildMember>>>(guildMemberManager.fetch({ withPresences: false }));
+ expectType<Promise<GuildMember>>(guildMemberManager.fetch({ user: '12345678901234567', withPresences: true }));
+
+ expectType<Promise<Collection<Snowflake, GuildMember>>>(
+ guildMemberManager.fetch({ query: 'test', user: ['12345678901234567'], nonce: 'test' }),
+ );
+
+ // @ts-expect-error The cache & force options have no effect here.
+ guildMemberManager.fetch({ cache: true, force: false });
+ // @ts-expect-error The force option has no effect here.
+ guildMemberManager.fetch({ user: ['12345678901234567'], cache: true, force: false });
+}
+
+declare const messageManager: MessageManager;
+{
+ expectType<Promise<Message>>(messageManager.fetch('1234567890'));
+ expectType<Promise<Message>>(messageManager.fetch({ message: '1234567890' }));
+ expectType<Promise<Message>>(messageManager.fetch({ message: '1234567890', cache: true, force: false }));
+ expectType<Promise<Collection<Snowflake, Message>>>(messageManager.fetch());
+ expectType<Promise<Collection<Snowflake, Message>>>(messageManager.fetch({}));
+ expectType<Promise<Collection<Snowflake, Message>>>(
+ messageManager.fetch({ limit: 100, before: '1234567890', cache: false }),
+ );
+ // @ts-expect-error
+ messageManager.fetch({ cache: true, force: false });
+ // @ts-expect-error
+ messageManager.fetch({ message: '1234567890', after: '1234567890', cache: true, force: false });
+}
+
+declare const roleManager: RoleManager;
+expectType<Promise<Collection<Snowflake, Role>>>(roleManager.fetch());
+expectType<Promise<Collection<Snowflake, Role>>>(roleManager.fetch(undefined, {}));
+expectType<Promise<Role | null>>(roleManager.fetch('0'));
+
+declare const guildEmojiManager: GuildEmojiManager;
+expectType<Promise<Collection<Snowflake, GuildEmoji>>>(guildEmojiManager.fetch());
+expectType<Promise<Collection<Snowflake, GuildEmoji>>>(guildEmojiManager.fetch(undefined, {}));
+expectType<Promise<GuildEmoji>>(guildEmojiManager.fetch('0'));
+
+declare const guildBanManager: GuildBanManager;
+{
+ expectType<Promise<GuildBan>>(guildBanManager.fetch('1234567890'));
+ expectType<Promise<GuildBan>>(guildBanManager.fetch({ user: '1234567890' }));
+ expectType<Promise<GuildBan>>(guildBanManager.fetch({ user: '1234567890', cache: true, force: false }));
+ expectType<Promise<Collection<Snowflake, GuildBan>>>(guildBanManager.fetch());
+ expectType<Promise<Collection<Snowflake, GuildBan>>>(guildBanManager.fetch({}));
+ expectType<Promise<Collection<Snowflake, GuildBan>>>(guildBanManager.fetch({ limit: 100, before: '1234567890' }));
+ // @ts-expect-error
+ guildBanManager.fetch({ cache: true, force: false });
+ // @ts-expect-error
+ guildBanManager.fetch({ user: '1234567890', after: '1234567890', cache: true, force: false });
+}
+
+declare const threadMemberWithGuildMember: ThreadMember<true>;
+declare const threadMemberManager: ThreadMemberManager;
+{
+ expectType<Promise<ThreadMember>>(threadMemberManager.fetch('12345678'));
+ expectType<Promise<ThreadMember>>(threadMemberManager.fetch({ member: '12345678', cache: false }));
+ expectType<Promise<ThreadMember>>(threadMemberManager.fetch({ member: '12345678', force: true }));
+ expectType<Promise<ThreadMember<true>>>(threadMemberManager.fetch({ member: threadMemberWithGuildMember }));
+ expectType<Promise<ThreadMember<true>>>(threadMemberManager.fetch({ member: '12345678901234567', withMember: true }));
+ expectType<Promise<Collection<Snowflake, ThreadMember>>>(threadMemberManager.fetch());
+ expectType<Promise<Collection<Snowflake, ThreadMember>>>(threadMemberManager.fetch({}));
+
+ expectType<Promise<Collection<Snowflake, ThreadMember<true>>>>(
+ threadMemberManager.fetch({ cache: true, limit: 50, withMember: true, after: '12345678901234567' }),
+ );
+
+ expectType<Promise<Collection<Snowflake, ThreadMember>>>(
+ threadMemberManager.fetch({ cache: true, withMember: false }),
+ );
+
+ // @ts-expect-error The `force` option cannot be used alongside fetching all thread members.
+ threadMemberManager.fetch({ cache: true, force: false });
+ // @ts-expect-error `withMember` needs to be `true` to receive paginated results.
+ threadMemberManager.fetch({ withMember: false, limit: 5, after: '12345678901234567' });
+}
+
+declare const typing: Typing;
+expectType<User | PartialUser>(typing.user);
+if (typing.user.partial) expectType<null>(typing.user.username);
+if (!typing.user.partial) expectType<string>(typing.user.tag);
+
+expectType<TextBasedChannel>(typing.channel);
+if (typing.channel.partial) expectType<undefined>(typing.channel.lastMessageId);
+
+expectType<GuildMember | null>(typing.member);
+expectType<Guild | null>(typing.guild);
+
+if (typing.inGuild()) {
+ expectType<Guild>(typing.channel.guild);
+ expectType<Guild>(typing.guild);
+}
+
+// Test interactions
+declare const interaction: Interaction;
+declare const booleanValue: boolean;
+if (interaction.inGuild()) {
+ expectType<Snowflake>(interaction.guildId);
+} else {
+ expectType<Snowflake | null>(interaction.guildId);
+}
+
+client.on('interactionCreate', async interaction => {
+ if (interaction.type === InteractionType.MessageComponent) {
+ expectType<AnySelectMenuInteraction | ButtonInteraction>(interaction);
+ expectType<MessageActionRowComponent | APIButtonComponent | APISelectMenuComponent>(interaction.component);
+ expectType<Message>(interaction.message);
+ if (interaction.inCachedGuild()) {
+ expectAssignable<MessageComponentInteraction>(interaction);
+ expectType<MessageActionRowComponent>(interaction.component);
+ expectType<Message<true>>(interaction.message);
+ expectType<Guild>(interaction.guild);
+ expectType<Promise<Message<true>>>(interaction.reply({ content: 'a', fetchReply: true }));
+ expectType<Promise<Message<true>>>(interaction.deferReply({ fetchReply: true }));
+ expectType<Promise<Message<true>>>(interaction.editReply({ content: 'a' }));
+ expectType<Promise<Message<true>>>(interaction.fetchReply());
+ expectType<Promise<Message<true>>>(interaction.update({ content: 'a', fetchReply: true }));
+ expectType<Promise<Message<true>>>(interaction.deferUpdate({ fetchReply: true }));
+ expectType<Promise<Message<true>>>(interaction.followUp({ content: 'a' }));
+ } else if (interaction.inRawGuild()) {
+ expectAssignable<MessageComponentInteraction>(interaction);
+ expectType<APIButtonComponent | APISelectMenuComponent>(interaction.component);
+ expectType<Message<false>>(interaction.message);
+ expectType<null>(interaction.guild);
+ expectType<Promise<Message<false>>>(interaction.reply({ content: 'a', fetchReply: true }));
+ expectType<Promise<Message<false>>>(interaction.deferReply({ fetchReply: true }));
+ expectType<Promise<Message<false>>>(interaction.editReply({ content: 'a' }));
+ expectType<Promise<Message<false>>>(interaction.fetchReply());
+ expectType<Promise<Message<false>>>(interaction.update({ content: 'a', fetchReply: true }));
+ expectType<Promise<Message<false>>>(interaction.deferUpdate({ fetchReply: true }));
+ expectType<Promise<Message<false>>>(interaction.followUp({ content: 'a' }));
+ } else if (interaction.inGuild()) {
+ expectAssignable<MessageComponentInteraction>(interaction);
+ expectType<MessageActionRowComponent | APIButtonComponent | APISelectMenuComponent>(interaction.component);
+ expectType<Message>(interaction.message);
+ expectType<Guild | null>(interaction.guild);
+ expectType<Promise<Message>>(interaction.reply({ content: 'a', fetchReply: true }));
+ expectType<Promise<Message>>(interaction.deferReply({ fetchReply: true }));
+ expectType<Promise<Message>>(interaction.editReply({ content: 'a' }));
+ expectType<Promise<Message>>(interaction.fetchReply());
+ expectType<Promise<Message>>(interaction.update({ content: 'a', fetchReply: true }));
+ expectType<Promise<Message>>(interaction.deferUpdate({ fetchReply: true }));
+ expectType<Promise<Message>>(interaction.followUp({ content: 'a' }));
+ }
+ }
+
+ if (interaction.inCachedGuild()) {
+ expectAssignable<GuildMember>(interaction.member);
+ expectNotType<ChatInputCommandInteraction<'cached'>>(interaction);
+ expectAssignable<Interaction>(interaction);
+ expectType<Locale>(interaction.guildLocale);
+ } else if (interaction.inRawGuild()) {
+ expectAssignable<APIInteractionGuildMember>(interaction.member);
+ expectNotAssignable<Interaction<'cached'>>(interaction);
+ expectType<Locale>(interaction.guildLocale);
+ } else if (interaction.inGuild()) {
+ expectType<Locale>(interaction.guildLocale);
+ } else {
+ expectType<APIInteractionGuildMember | GuildMember | null>(interaction.member);
+ expectNotAssignable<Interaction<'cached'>>(interaction);
+ expectType<string | null>(interaction.guildId);
+ }
+
+ if (
+ interaction.type === InteractionType.ApplicationCommand &&
+ (interaction.commandType === ApplicationCommandType.User ||
+ interaction.commandType === ApplicationCommandType.Message)
+ ) {
+ expectType<MessageContextMenuCommandInteraction | UserContextMenuCommandInteraction>(interaction);
+ if (interaction.inCachedGuild()) {
+ expectAssignable<ContextMenuCommandInteraction>(interaction);
+ expectAssignable<Guild>(interaction.guild);
+ expectAssignable<CommandInteraction<'cached'>>(interaction);
+ expectType<Promise<Message<true>>>(interaction.reply({ content: 'a', fetchReply: true }));
+ expectType<Promise<Message<true>>>(interaction.deferReply({ fetchReply: true }));
+ expectType<Promise<Message<true>>>(interaction.editReply({ content: 'a' }));
+ expectType<Promise<Message<true>>>(interaction.fetchReply());
+ expectType<Promise<Message<true>>>(interaction.followUp({ content: 'a' }));
+ } else if (interaction.inRawGuild()) {
+ expectAssignable<ContextMenuCommandInteraction>(interaction);
+ expectType<null>(interaction.guild);
+ expectType<Promise<Message<false>>>(interaction.reply({ content: 'a', fetchReply: true }));
+ expectType<Promise<Message<false>>>(interaction.deferReply({ fetchReply: true }));
+ expectType<Promise<Message<false>>>(interaction.editReply({ content: 'a' }));
+ expectType<Promise<Message<false>>>(interaction.fetchReply());
+ expectType<Promise<Message<false>>>(interaction.followUp({ content: 'a' }));
+ } else if (interaction.inGuild()) {
+ expectAssignable<ContextMenuCommandInteraction>(interaction);
+ expectType<Guild | null>(interaction.guild);
+ expectType<Promise<Message>>(interaction.reply({ content: 'a', fetchReply: true }));
+ expectType<Promise<Message>>(interaction.deferReply({ fetchReply: true }));
+ expectType<Promise<Message>>(interaction.editReply({ content: 'a' }));
+ expectType<Promise<Message>>(interaction.fetchReply());
+ expectType<Promise<Message>>(interaction.followUp({ content: 'a' }));
+ }
+ }
+
+ if (
+ interaction.type === InteractionType.ApplicationCommand &&
+ interaction.commandType === ApplicationCommandType.Message
+ ) {
+ expectType<Message>(interaction.targetMessage);
+ if (interaction.inCachedGuild()) {
+ expectType<Message<true>>(interaction.targetMessage);
+ } else if (interaction.inRawGuild()) {
+ expectType<Message<false>>(interaction.targetMessage);
+ } else if (interaction.inGuild()) {
+ expectType<Message>(interaction.targetMessage);
+ }
+ }
+
+ if (interaction.type === InteractionType.MessageComponent && interaction.componentType === ComponentType.Button) {
+ expectType<ButtonInteraction>(interaction);
+ expectType<ButtonComponent | APIButtonComponent>(interaction.component);
+ expectType<Message>(interaction.message);
+ if (interaction.inCachedGuild()) {
+ expectAssignable<ButtonInteraction>(interaction);
+ expectType<ButtonComponent>(interaction.component);
+ expectType<Message<true>>(interaction.message);
+ expectType<Guild>(interaction.guild);
+ expectType<Promise<Message<true>>>(interaction.reply({ fetchReply: true }));
+ } else if (interaction.inRawGuild()) {
+ expectAssignable<ButtonInteraction>(interaction);
+ expectType<APIButtonComponent>(interaction.component);
+ expectType<Message<false>>(interaction.message);
+ expectType<null>(interaction.guild);
+ expectType<Promise<Message<false>>>(interaction.reply({ fetchReply: true }));
+ } else if (interaction.inGuild()) {
+ expectAssignable<ButtonInteraction>(interaction);
+ expectType<ButtonComponent | APIButtonComponent>(interaction.component);
+ expectType<Message>(interaction.message);
+ expectAssignable<Guild | null>(interaction.guild);
+ expectType<Promise<Message>>(interaction.reply({ fetchReply: true }));
+ }
+ }
+
+ if (
+ interaction.type === InteractionType.MessageComponent &&
+ interaction.componentType === ComponentType.StringSelect
+ ) {
+ expectType<StringSelectMenuInteraction>(interaction);
+ expectType<StringSelectMenuComponent | APIStringSelectComponent>(interaction.component);
+ expectType<Message>(interaction.message);
+ if (interaction.inCachedGuild()) {
+ expectAssignable<StringSelectMenuInteraction>(interaction);
+ expectType<SelectMenuComponent>(interaction.component);
+ expectType<Message<true>>(interaction.message);
+ expectType<Guild>(interaction.guild);
+ expectType<Promise<Message<true>>>(interaction.reply({ fetchReply: true }));
+ } else if (interaction.inRawGuild()) {
+ expectAssignable<StringSelectMenuInteraction>(interaction);
+ expectType<APIStringSelectComponent>(interaction.component);
+ expectType<Message<false>>(interaction.message);
+ expectType<null>(interaction.guild);
+ expectType<Promise<Message<false>>>(interaction.reply({ fetchReply: true }));
+ } else if (interaction.inGuild()) {
+ expectAssignable<StringSelectMenuInteraction>(interaction);
+ expectType<SelectMenuComponent | APIStringSelectComponent>(interaction.component);
+ expectType<Message>(interaction.message);
+ expectType<Guild | null>(interaction.guild);
+ expectType<Promise<Message>>(interaction.reply({ fetchReply: true }));
+ }
+ }
+
+ if (
+ interaction.type === InteractionType.ApplicationCommand &&
+ interaction.commandType === ApplicationCommandType.ChatInput
+ ) {
+ if (interaction.inRawGuild()) {
+ expectNotAssignable<Interaction<'cached'>>(interaction);
+ expectAssignable<ChatInputCommandInteraction>(interaction);
+ expectType<Promise<Message<false>>>(interaction.reply({ fetchReply: true }));
+ expectType<APIInteractionDataResolvedGuildMember | null>(interaction.options.getMember('test'));
+
+ expectType<APIInteractionDataResolvedChannel>(interaction.options.getChannel('test', true));
+ expectType<APIRole>(interaction.options.getRole('test', true));
+ } else if (interaction.inCachedGuild()) {
+ const msg = await interaction.reply({ fetchReply: true });
+ const btn = await msg.awaitMessageComponent({ componentType: ComponentType.Button });
+
+ expectType<Message<true>>(msg);
+ expectType<ButtonInteraction<'cached'>>(btn);
+
+ expectType<GuildMember | null>(interaction.options.getMember('test'));
+ expectAssignable<ChatInputCommandInteraction>(interaction);
+ expectType<Promise<Message<true>>>(interaction.reply({ fetchReply: true }));
+
+ expectType<GuildBasedChannel>(interaction.options.getChannel('test', true));
+ expectType<Role>(interaction.options.getRole('test', true));
+
+ expectType<PublicThreadChannel>(interaction.options.getChannel('test', true, [ChannelType.PublicThread]));
+ expectType<PublicThreadChannel>(interaction.options.getChannel('test', true, [ChannelType.AnnouncementThread]));
+ expectType<PublicThreadChannel>(
+ interaction.options.getChannel('test', true, [ChannelType.PublicThread, ChannelType.AnnouncementThread]),
+ );
+ expectType<PrivateThreadChannel>(interaction.options.getChannel('test', true, [ChannelType.PrivateThread]));
+
+ expectType<TextChannel>(interaction.options.getChannel('test', true, [ChannelType.GuildText]));
+ expectType<TextChannel | null>(interaction.options.getChannel('test', false, [ChannelType.GuildText]));
+ expectType<ForumChannel | VoiceChannel>(
+ interaction.options.getChannel('test', true, [ChannelType.GuildForum, ChannelType.GuildVoice]),
+ );
+ expectType<TextChannel>(interaction.options.getChannel('test', true, [ChannelType.GuildText] as const));
+ expectType<ForumChannel | VoiceChannel | null>(
+ interaction.options.getChannel('test', false, [ChannelType.GuildForum, ChannelType.GuildVoice]),
+ );
+ } else {
+ // @ts-expect-error
+ consumeCachedCommand(interaction);
+ expectType<ChatInputCommandInteraction>(interaction);
+ expectType<Promise<Message>>(interaction.reply({ fetchReply: true }));
+ expectType<APIInteractionDataResolvedGuildMember | GuildMember | null>(interaction.options.getMember('test'));
+
+ expectType<GuildBasedChannel | APIInteractionDataResolvedChannel>(interaction.options.getChannel('test', true));
+ expectType<APIRole | Role>(interaction.options.getRole('test', true));
+ }
+
+ expectType<ChatInputCommandInteraction>(interaction);
+ expectType<Omit<CommandInteractionOptionResolver<CacheType>, 'getFocused' | 'getMessage'>>(interaction.options);
+ expectType<readonly CommandInteractionOption[]>(interaction.options.data);
+
+ const optionalOption = interaction.options.get('name');
+ const requiredOption = interaction.options.get('name', true);
+ expectType<CommandInteractionOption | null>(optionalOption);
+ expectType<CommandInteractionOption>(requiredOption);
+ expectType<CommandInteractionOption[] | undefined>(requiredOption.options);
+
+ expectType<string | null>(interaction.options.getString('name', booleanValue));
+ expectType<string | null>(interaction.options.getString('name', false));
+ expectType<string>(interaction.options.getString('name', true));
+
+ expectType<string>(interaction.options.getSubcommand());
+ expectType<string>(interaction.options.getSubcommand(true));
+ expectType<string | null>(interaction.options.getSubcommand(booleanValue));
+ expectType<string | null>(interaction.options.getSubcommand(false));
+
+ expectType<string>(interaction.options.getSubcommandGroup(true));
+ expectType<string | null>(interaction.options.getSubcommandGroup());
+ expectType<string | null>(interaction.options.getSubcommandGroup(booleanValue));
+ expectType<string | null>(interaction.options.getSubcommandGroup(false));
+ }
+
+ if (interaction.isRepliable()) {
+ expectAssignable<RepliableInteraction>(interaction);
+ interaction.reply('test');
+ }
+
+ if (
+ interaction.type === InteractionType.ApplicationCommand &&
+ interaction.commandType === ApplicationCommandType.ChatInput &&
+ interaction.isRepliable()
+ ) {
+ expectAssignable<CommandInteraction>(interaction);
+ expectAssignable<RepliableInteraction>(interaction);
+ }
+
+ if (interaction.type === InteractionType.ModalSubmit && interaction.isRepliable()) {
+ expectType<ModalSubmitInteraction>(interaction);
+ if (interaction.inCachedGuild()) {
+ expectAssignable<ModalSubmitInteraction>(interaction);
+ expectType<Guild>(interaction.guild);
+ expectType<Promise<Message<true>>>(interaction.reply({ content: 'a', fetchReply: true }));
+ expectType<Promise<Message<true>>>(interaction.deferReply({ fetchReply: true }));
+ expectType<Promise<Message<true>>>(interaction.editReply({ content: 'a' }));
+ expectType<Promise<Message<true>>>(interaction.fetchReply());
+ expectType<Promise<Message<true>>>(interaction.deferUpdate({ fetchReply: true }));
+ expectType<Promise<Message<true>>>(interaction.followUp({ content: 'a' }));
+ } else if (interaction.inRawGuild()) {
+ expectAssignable<ModalSubmitInteraction>(interaction);
+ expectType<null>(interaction.guild);
+ expectType<Promise<Message<false>>>(interaction.reply({ content: 'a', fetchReply: true }));
+ expectType<Promise<Message<false>>>(interaction.deferReply({ fetchReply: true }));
+ expectType<Promise<Message<false>>>(interaction.editReply({ content: 'a' }));
+ expectType<Promise<Message<false>>>(interaction.fetchReply());
+ expectType<Promise<Message<false>>>(interaction.deferUpdate({ fetchReply: true }));
+ expectType<Promise<Message<false>>>(interaction.followUp({ content: 'a' }));
+ } else if (interaction.inGuild()) {
+ expectAssignable<ModalSubmitInteraction>(interaction);
+ expectType<Guild | null>(interaction.guild);
+ expectType<Promise<Message>>(interaction.reply({ content: 'a', fetchReply: true }));
+ expectType<Promise<Message>>(interaction.deferReply({ fetchReply: true }));
+ expectType<Promise<Message>>(interaction.editReply({ content: 'a' }));
+ expectType<Promise<Message>>(interaction.fetchReply());
+ expectType<Promise<Message>>(interaction.deferUpdate({ fetchReply: true }));
+ expectType<Promise<Message>>(interaction.followUp({ content: 'a' }));
+ }
+ }
+});
+
+declare const shard: Shard;
+
+shard.on('death', process => {
+ expectType<ChildProcess | Worker>(process);
+});
+
+declare const webSocketShard: WebSocketShard;
+
+webSocketShard.on('close', event => {
+ expectType<CloseEvent>(event);
+});
+
+declare const collector: Collector<string, Interaction, string[]>;
+
+collector.on('collect', (collected, ...other) => {
+ expectType<Interaction>(collected);
+ expectType<string[]>(other);
+});
+
+collector.on('dispose', (vals, ...other) => {
+ expectType<Interaction>(vals);
+ expectType<string[]>(other);
+});
+
+collector.on('end', (collection, reason) => {
+ expectType<Collection<string, Interaction>>(collection);
+ expectType<string>(reason);
+});
+
+(async () => {
+ for await (const value of collector) {
+ expectType<[Interaction, ...string[]]>(value);
+ }
+})();
+
+expectType<Promise<number | null>>(shard.eval(c => c.readyTimestamp));
+
+// Test audit logs
+expectType<Promise<GuildAuditLogs<AuditLogEvent.MemberKick>>>(guild.fetchAuditLogs({ type: AuditLogEvent.MemberKick }));
+
+expectType<Promise<GuildAuditLogs<AuditLogEvent.ChannelCreate>>>(
+ guild.fetchAuditLogs({ type: AuditLogEvent.ChannelCreate }),
+);
+
+expectType<Promise<GuildAuditLogs<AuditLogEvent.IntegrationUpdate>>>(
+ guild.fetchAuditLogs({ type: AuditLogEvent.IntegrationUpdate }),
+);
+
+expectType<Promise<GuildAuditLogs<null>>>(guild.fetchAuditLogs({ type: null }));
+expectType<Promise<GuildAuditLogs<AuditLogEvent>>>(guild.fetchAuditLogs());
+
+expectType<Promise<GuildAuditLogsEntry<AuditLogEvent.MemberKick, 'Delete', 'User'> | undefined>>(
+ guild.fetchAuditLogs({ type: AuditLogEvent.MemberKick }).then(al => al.entries.first()),
+);
+expectAssignable<Promise<GuildAuditLogsEntry<AuditLogEvent.MemberKick, 'Delete', 'User'> | undefined>>(
+ guild.fetchAuditLogs({ type: AuditLogEvent.MemberKick }).then(al => al.entries.first()),
+);
+
+expectType<Promise<GuildAuditLogsEntry<null, GuildAuditLogsActionType, GuildAuditLogsTargetType> | undefined>>(
+ guild.fetchAuditLogs({ type: null }).then(al => al.entries.first()),
+);
+expectType<Promise<GuildAuditLogsEntry<null, GuildAuditLogsActionType, GuildAuditLogsTargetType> | undefined>>(
+ guild.fetchAuditLogs().then(al => al.entries.first()),
+);
+
+expectType<Promise<null | undefined>>(
+ guild.fetchAuditLogs({ type: AuditLogEvent.MemberKick }).then(al => al.entries.first()?.extra),
+);
+expectType<Promise<StageChannel | { id: Snowflake } | undefined>>(
+ guild.fetchAuditLogs({ type: AuditLogEvent.StageInstanceCreate }).then(al => al.entries.first()?.extra),
+);
+expectType<Promise<{ channel: GuildTextBasedChannel | { id: Snowflake }; count: number } | undefined>>(
+ guild.fetchAuditLogs({ type: AuditLogEvent.MessageDelete }).then(al => al.entries.first()?.extra),
+);
+
+expectType<Promise<User | null | undefined>>(
+ guild.fetchAuditLogs({ type: AuditLogEvent.MemberKick }).then(al => al.entries.first()?.target),
+);
+expectType<Promise<StageInstance | undefined>>(
+ guild.fetchAuditLogs({ type: AuditLogEvent.StageInstanceCreate }).then(al => al.entries.first()?.target),
+);
+expectType<Promise<User | undefined>>(
+ guild.fetchAuditLogs({ type: AuditLogEvent.MessageDelete }).then(al => al.entries.first()?.target),
+);
+
+declare const TextBasedChannel: TextBasedChannel;
+declare const TextBasedChannelTypes: TextBasedChannelTypes;
+declare const VoiceBasedChannel: VoiceBasedChannel;
+declare const GuildBasedChannel: GuildBasedChannel;
+declare const NonThreadGuildBasedChannel: NonThreadGuildBasedChannel;
+declare const GuildTextBasedChannel: GuildTextBasedChannel;
+
+expectType<TextBasedChannel>(TextBasedChannel);
+expectType<
+ | ChannelType.GuildText
+ | ChannelType.DM
+ | ChannelType.GuildAnnouncement
+ | ChannelType.GuildVoice
+ | ChannelType.GuildStageVoice
+ | ThreadChannelType
+>(TextBasedChannelTypes);
+expectType<StageChannel | VoiceChannel>(VoiceBasedChannel);
+expectType<GuildBasedChannel>(GuildBasedChannel);
+expectType<CategoryChannel | NewsChannel | StageChannel | TextChannel | VoiceChannel | ForumChannel>(
+ NonThreadGuildBasedChannel,
+);
+expectType<GuildTextBasedChannel>(GuildTextBasedChannel);
+
+const button = new ButtonBuilder({
+ label: 'test',
+ style: ButtonStyle.Primary,
+ customId: 'test',
+});
+
+const selectMenu = new StringSelectMenuBuilder({
+ maxValues: 10,
+ minValues: 2,
+ customId: 'test',
+});
+
+new ActionRowBuilder({
+ components: [selectMenu.toJSON(), button.toJSON()],
+});
+
+new StringSelectMenuBuilder({
+ customId: 'foo',
+});
+
+new ButtonBuilder({
+ style: ButtonStyle.Danger,
+})
+ .setEmoji('<a:foo:123>')
+ .setEmoji('<:foo:123>')
+ .setEmoji('foobar:123')
+ .setEmoji('😏')
+ .setEmoji({
+ name: 'test',
+ id: '123',
+ animated: false,
+ });
+
+// @ts-expect-error
+new EmbedBuilder().setColor('abc');
+
+new EmbedBuilder().setColor('#ffffff');
+
+expectNotAssignable<ActionRowData<MessageActionRowComponentData>>({
+ type: ComponentType.ActionRow,
+ components: [
+ {
+ type: ComponentType.Button,
+ },
+ ],
+});
+
+declare const chatInputInteraction: ChatInputCommandInteraction;
+
+expectType<Attachment>(chatInputInteraction.options.getAttachment('attachment', true));
+expectType<Attachment | null>(chatInputInteraction.options.getAttachment('attachment'));
+
+declare const modal: ModalBuilder;
+
+chatInputInteraction.showModal(modal);
+
+chatInputInteraction.showModal({
+ title: 'abc',
+ custom_id: 'abc',
+ components: [
+ {
+ components: [
+ {
+ custom_id: 'aa',
+ label: 'label',
+ style: TextInputStyle.Short,
+ type: ComponentType.TextInput,
+ },
+ ],
+ type: ComponentType.ActionRow,
+ },
+ ],
+});
+
+declare const selectMenuData: APISelectMenuComponent;
+StringSelectMenuBuilder.from(selectMenuData);
+
+declare const selectMenuComp: SelectMenuComponent;
+StringSelectMenuBuilder.from(selectMenuComp);
+
+declare const buttonData: APIButtonComponent;
+ButtonBuilder.from(buttonData);
+
+declare const buttonComp: ButtonComponent;
+ButtonBuilder.from(buttonComp);
+
+declare const textInputData: APITextInputComponent;
+TextInputBuilder.from(textInputData);
+
+declare const textInputComp: TextInputComponent;
+TextInputBuilder.from(textInputComp);
+
+declare const embedData: APIEmbed;
+EmbedBuilder.from(embedData);
+
+declare const embedComp: Embed;
+EmbedBuilder.from(embedComp);
+
+declare const actionRowData: APIActionRowComponent<APIActionRowComponentTypes>;
+ActionRowBuilder.from(actionRowData);
+
+declare const actionRowComp: ActionRow<ActionRowComponent>;
+ActionRowBuilder.from(actionRowComp);
+
+declare const buttonsActionRowData: APIActionRowComponent<APIButtonComponent>;
+declare const buttonsActionRowComp: ActionRow<ButtonComponent>;
+
+expectType<ActionRowBuilder<ButtonBuilder>>(ActionRowBuilder.from<ButtonBuilder>(buttonsActionRowData));
+expectType<ActionRowBuilder<ButtonBuilder>>(ActionRowBuilder.from<ButtonBuilder>(buttonsActionRowComp));
+
+declare const anyComponentsActionRowData: APIActionRowComponent<APIActionRowComponentTypes>;
+declare const anyComponentsActionRowComp: ActionRow<ActionRowComponent>;
+
+expectType<ActionRowBuilder>(ActionRowBuilder.from(anyComponentsActionRowData));
+expectType<ActionRowBuilder>(ActionRowBuilder.from(anyComponentsActionRowComp));
+
+declare const stageChannel: StageChannel;
+declare const partialGroupDMChannel: PartialGroupDMChannel;
+
+expectType<ChannelMention>(textChannel.toString());
+expectType<ChannelMention>(voiceChannel.toString());
+expectType<ChannelMention>(newsChannel.toString());
+expectType<ChannelMention>(threadChannel.toString());
+expectType<ChannelMention>(stageChannel.toString());
+expectType<ChannelMention>(partialGroupDMChannel.toString());
+expectType<UserMention>(dmChannel.toString());
+expectType<UserMention>(user.toString());
+expectType<UserMention>(guildMember.toString());
+
+declare const webhook: Webhook;
+declare const webhookClient: WebhookClient;
+declare const interactionWebhook: InteractionWebhook;
+declare const snowflake: Snowflake;
+
+expectType<Promise<Message>>(webhook.send('content'));
+expectType<Promise<Message>>(webhook.editMessage(snowflake, 'content'));
+expectType<Promise<Message>>(webhook.fetchMessage(snowflake));
+
+expectType<Promise<APIMessage>>(webhookClient.send('content'));
+expectType<Promise<APIMessage>>(webhookClient.editMessage(snowflake, 'content'));
+expectType<Promise<APIMessage>>(webhookClient.fetchMessage(snowflake));
+
+expectType<Promise<Message>>(interactionWebhook.send('content'));
+expectType<Promise<Message>>(interactionWebhook.editMessage(snowflake, 'content'));
+expectType<Promise<Message>>(interactionWebhook.fetchMessage(snowflake));
+
+declare const categoryChannel: CategoryChannel;
+declare const forumChannel: ForumChannel;
+
+await forumChannel.edit({
+ availableTags: [...forumChannel.availableTags, { name: 'tag' }],
+});
+
+await forumChannel.setAvailableTags([{ ...forumChannel.availableTags, name: 'tag' }]);
+await forumChannel.setAvailableTags([{ name: 'tag' }]);
+
+expectType<Readonly<ChannelFlagsBitField>>(textChannel.flags);
+expectType<Readonly<ChannelFlagsBitField>>(voiceChannel.flags);
+expectType<Readonly<ChannelFlagsBitField>>(stageChannel.flags);
+expectType<Readonly<ChannelFlagsBitField>>(forumChannel.flags);
+expectType<Readonly<ChannelFlagsBitField>>(dmChannel.flags);
+expectType<Readonly<ChannelFlagsBitField>>(categoryChannel.flags);
+expectType<Readonly<ChannelFlagsBitField>>(newsChannel.flags);
+expectType<Readonly<ChannelFlagsBitField>>(categoryChannel.flags);
+expectType<Readonly<ChannelFlagsBitField>>(threadChannel.flags);
+
+expectType<null>(partialGroupDMChannel.flags);
+
+// Select menu type narrowing
+if (interaction.isAnySelectMenu()) {
+ expectType<AnySelectMenuInteraction>(interaction);
+}
+
+declare const anySelectMenu: AnySelectMenuInteraction;
+
+if (anySelectMenu.isStringSelectMenu()) {
+ expectType<StringSelectMenuInteraction>(anySelectMenu);
+} else if (anySelectMenu.isUserSelectMenu()) {
+ expectType<UserSelectMenuInteraction>(anySelectMenu);
+} else if (anySelectMenu.isRoleSelectMenu()) {
+ expectType<RoleSelectMenuInteraction>(anySelectMenu);
+} else if (anySelectMenu.isChannelSelectMenu()) {
+ expectType<ChannelSelectMenuInteraction>(anySelectMenu);
+} else if (anySelectMenu.isMentionableSelectMenu()) {
+ expectType<MentionableSelectMenuInteraction>(anySelectMenu);
+}
+
+client.on('guildAuditLogEntryCreate', (auditLogEntry, guild) => {
+ expectType<GuildAuditLogsEntry>(auditLogEntry);
+ expectType<Guild>(guild);
+});
+
+expectType<Readonly<GuildMemberFlagsBitField>>(guildMember.flags);
+
+{
+ const onboarding = await guild.fetchOnboarding();
+ expectType<GuildOnboarding>(onboarding);
+}
diff --git a/node_modules/discord.js/typings/rawDataTypes.d.ts b/node_modules/discord.js/typings/rawDataTypes.d.ts
new file mode 100644
index 0000000..d1075e2
--- /dev/null
+++ b/node_modules/discord.js/typings/rawDataTypes.d.ts
@@ -0,0 +1,210 @@
+// These are aggregate types that are used in the typings file but do not exist as actual exported values.
+// To prevent them from showing up in an editor, they are imported from here instead of exporting them there directly.
+
+import {
+ APIApplication,
+ APIApplicationCommand,
+ APIApplicationCommandInteraction,
+ APIAttachment,
+ APIAuditLog,
+ APIAuditLogEntry,
+ APIBan,
+ APIChannel,
+ APIEmoji,
+ APIExtendedInvite,
+ APIGuild,
+ APIGuildIntegration,
+ APIGuildIntegrationApplication,
+ APIGuildMember,
+ APIGuildPreview,
+ APIGuildWelcomeScreen,
+ APIGuildWelcomeScreenChannel,
+ APIGuildWidget,
+ APIGuildWidgetMember,
+ APIInteractionDataResolvedChannel,
+ APIInteractionDataResolvedGuildMember,
+ APIInteractionGuildMember,
+ APIInvite,
+ APIInviteStageInstance,
+ APIMessage,
+ APIMessageButtonInteractionData,
+ APIMessageComponentInteraction,
+ APIMessageSelectMenuInteractionData,
+ APIOverwrite,
+ APIPartialChannel,
+ APIPartialEmoji,
+ APIPartialGuild,
+ APIReaction,
+ APIRole,
+ APIStageInstance,
+ APISticker,
+ APIStickerItem,
+ APIStickerPack,
+ APITeam,
+ APITeamMember,
+ APITemplate,
+ APIThreadMember,
+ APIUnavailableGuild,
+ APIUser,
+ APIVoiceRegion,
+ APIWebhook,
+ GatewayActivity,
+ GatewayActivityAssets,
+ GatewayActivityEmoji,
+ GatewayGuildBanAddDispatchData,
+ GatewayGuildMemberAddDispatchData,
+ GatewayGuildMemberUpdateDispatchData,
+ GatewayInteractionCreateDispatchData,
+ GatewayInviteCreateDispatchData,
+ GatewayInviteDeleteDispatchData,
+ GatewayMessageReactionAddDispatchData,
+ GatewayMessageUpdateDispatchData,
+ GatewayPresenceUpdate,
+ GatewayReadyDispatchData,
+ GatewayTypingStartDispatchData,
+ GatewayVoiceState,
+ RESTAPIPartialCurrentUserGuild,
+ RESTGetAPIWebhookWithTokenResult,
+ RESTPatchAPIChannelMessageJSONBody,
+ RESTPatchAPICurrentGuildMemberNicknameJSONBody,
+ RESTPatchAPIInteractionFollowupJSONBody,
+ RESTPatchAPIInteractionOriginalResponseJSONBody,
+ RESTPatchAPIWebhookWithTokenJSONBody,
+ RESTPostAPIChannelMessageJSONBody,
+ RESTPostAPIInteractionCallbackFormDataBody,
+ RESTPostAPIInteractionFollowupJSONBody,
+ RESTPostAPIWebhookWithTokenJSONBody,
+ Snowflake,
+ APIGuildScheduledEvent,
+} from 'discord-api-types/v10';
+import { GuildChannel, Guild, PermissionOverwrites } from '.';
+
+export type RawActivityData = GatewayActivity;
+
+export type RawApplicationData = RawClientApplicationData | RawIntegrationApplicationData;
+export type RawClientApplicationData = GatewayReadyDispatchData['application'] | APIMessage['application'];
+export type RawIntegrationApplicationData = APIGuildIntegrationApplication | Partial<APIApplication>;
+
+export type RawApplicationCommandData = APIApplicationCommand;
+
+export type RawChannelData =
+ | RawGuildChannelData
+ | RawThreadChannelData
+ | RawDMChannelData
+ | RawPartialGroupDMChannelData;
+export type RawDMChannelData = APIChannel | APIInteractionDataResolvedChannel;
+export type RawGuildChannelData = APIChannel | APIInteractionDataResolvedChannel | Required<APIPartialChannel>;
+export type RawPartialGroupDMChannelData = APIChannel | Required<APIPartialChannel>;
+export type RawThreadChannelData = APIChannel | APIInteractionDataResolvedChannel;
+
+export type RawEmojiData =
+ | RawGuildEmojiData
+ | RawReactionEmojiData
+ | GatewayActivityEmoji
+ | Omit<Partial<APIPartialEmoji>, 'animated'>;
+export type RawGuildEmojiData = APIEmoji;
+export type RawReactionEmojiData = APIEmoji | APIPartialEmoji;
+
+export type RawGuildAuditLogData = APIAuditLog;
+
+export type RawGuildAuditLogEntryData = APIAuditLogEntry;
+
+export type RawGuildBanData = GatewayGuildBanAddDispatchData | APIBan;
+
+export type RawGuildData = APIGuild | APIUnavailableGuild;
+export type RawAnonymousGuildData = RawGuildData | RawInviteGuildData;
+export type RawBaseGuildData = RawAnonymousGuildData | RawOAuth2GuildData;
+export type RawInviteGuildData = APIPartialGuild;
+export type RawOAuth2GuildData = RESTAPIPartialCurrentUserGuild;
+
+export type RawGuildMemberData =
+ | APIGuildMember
+ | APIInteractionGuildMember
+ | APIInteractionDataResolvedGuildMember
+ | GatewayGuildMemberAddDispatchData
+ | GatewayGuildMemberUpdateDispatchData
+ | Required<RESTPatchAPICurrentGuildMemberNicknameJSONBody>
+ | { user: { id: Snowflake } };
+export type RawThreadMemberData = APIThreadMember;
+
+export type RawGuildPreviewData = APIGuildPreview;
+
+export type RawGuildScheduledEventData = APIGuildScheduledEvent;
+
+export type RawGuildTemplateData = APITemplate;
+
+export type RawIntegrationData = APIGuildIntegration;
+
+export type RawInteractionData = GatewayInteractionCreateDispatchData;
+export type RawCommandInteractionData = APIApplicationCommandInteraction;
+export type RawMessageComponentInteractionData = APIMessageComponentInteraction;
+export type RawMessageButtonInteractionData = APIMessageButtonInteractionData;
+export type RawMessageSelectMenuInteractionData = APIMessageSelectMenuInteractionData;
+
+export type RawInviteData =
+ | APIExtendedInvite
+ | APIInvite
+ | (GatewayInviteCreateDispatchData & { channel: GuildChannel; guild: Guild })
+ | (GatewayInviteDeleteDispatchData & { channel: GuildChannel; guild: Guild });
+
+export type RawInviteStageInstance = APIInviteStageInstance;
+
+export type RawMessageData = APIMessage;
+export type RawPartialMessageData = GatewayMessageUpdateDispatchData;
+
+export type RawAttachmentData = APIAttachment;
+
+export type RawMessagePayloadData =
+ | RESTPostAPIChannelMessageJSONBody
+ | RESTPatchAPIChannelMessageJSONBody
+ | RESTPostAPIWebhookWithTokenJSONBody
+ | RESTPatchAPIWebhookWithTokenJSONBody
+ | RESTPostAPIInteractionCallbackFormDataBody
+ | RESTPatchAPIInteractionOriginalResponseJSONBody
+ | RESTPostAPIInteractionFollowupJSONBody
+ | RESTPatchAPIInteractionFollowupJSONBody;
+
+export type RawMessageReactionData = APIReaction | GatewayMessageReactionAddDispatchData;
+
+export type RawPermissionOverwriteData = APIOverwrite | PermissionOverwrites;
+
+export type RawPresenceData = GatewayPresenceUpdate;
+
+export type RawRoleData = APIRole;
+
+export type RawRichPresenceAssets = GatewayActivityAssets;
+
+export type RawStageInstanceData =
+ | APIStageInstance
+ | (Partial<APIStageInstance> & Pick<APIStageInstance, 'id' | 'channel_id' | 'guild_id'>);
+
+export type RawStickerData = APISticker | APIStickerItem;
+
+export type RawStickerPackData = APIStickerPack;
+
+export type RawTeamData = APITeam;
+
+export type RawTeamMemberData = APITeamMember;
+
+export type RawTypingData = GatewayTypingStartDispatchData;
+
+export type RawUserData =
+ | (APIUser & { member?: Omit<APIGuildMember, 'user'> })
+ | (GatewayPresenceUpdate['user'] & Pick<APIUser, 'username'>);
+
+export type RawVoiceRegionData = APIVoiceRegion;
+
+export type RawVoiceStateData = GatewayVoiceState | Omit<GatewayVoiceState, 'guild_id'>;
+
+export type RawWebhookData =
+ | APIWebhook
+ | RESTGetAPIWebhookWithTokenResult
+ | (Partial<APIWebhook> & Required<Pick<APIWebhook, 'id' | 'guild_id'>>);
+
+export type RawWelcomeChannelData = APIGuildWelcomeScreenChannel;
+
+export type RawWelcomeScreenData = APIGuildWelcomeScreen;
+
+export type RawWidgetData = APIGuildWidget;
+
+export type RawWidgetMemberData = APIGuildWidgetMember;
diff --git a/node_modules/fast-deep-equal/LICENSE b/node_modules/fast-deep-equal/LICENSE
new file mode 100644
index 0000000..7f15435
--- /dev/null
+++ b/node_modules/fast-deep-equal/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Evgeny Poberezkin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/fast-deep-equal/README.md b/node_modules/fast-deep-equal/README.md
new file mode 100644
index 0000000..d3f4ffc
--- /dev/null
+++ b/node_modules/fast-deep-equal/README.md
@@ -0,0 +1,96 @@
+# fast-deep-equal
+The fastest deep equal with ES6 Map, Set and Typed arrays support.
+
+[![Build Status](https://travis-ci.org/epoberezkin/fast-deep-equal.svg?branch=master)](https://travis-ci.org/epoberezkin/fast-deep-equal)
+[![npm](https://img.shields.io/npm/v/fast-deep-equal.svg)](https://www.npmjs.com/package/fast-deep-equal)
+[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/fast-deep-equal/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/fast-deep-equal?branch=master)
+
+
+## Install
+
+```bash
+npm install fast-deep-equal
+```
+
+
+## Features
+
+- ES5 compatible
+- works in node.js (8+) and browsers (IE9+)
+- checks equality of Date and RegExp objects by value.
+
+ES6 equal (`require('fast-deep-equal/es6')`) also supports:
+- Maps
+- Sets
+- Typed arrays
+
+
+## Usage
+
+```javascript
+var equal = require('fast-deep-equal');
+console.log(equal({foo: 'bar'}, {foo: 'bar'})); // true
+```
+
+To support ES6 Maps, Sets and Typed arrays equality use:
+
+```javascript
+var equal = require('fast-deep-equal/es6');
+console.log(equal(Int16Array([1, 2]), Int16Array([1, 2]))); // true
+```
+
+To use with React (avoiding the traversal of React elements' _owner
+property that contains circular references and is not needed when
+comparing the elements - borrowed from [react-fast-compare](https://github.com/FormidableLabs/react-fast-compare)):
+
+```javascript
+var equal = require('fast-deep-equal/react');
+var equal = require('fast-deep-equal/es6/react');
+```
+
+
+## Performance benchmark
+
+Node.js v12.6.0:
+
+```
+fast-deep-equal x 261,950 ops/sec ±0.52% (89 runs sampled)
+fast-deep-equal/es6 x 212,991 ops/sec ±0.34% (92 runs sampled)
+fast-equals x 230,957 ops/sec ±0.83% (85 runs sampled)
+nano-equal x 187,995 ops/sec ±0.53% (88 runs sampled)
+shallow-equal-fuzzy x 138,302 ops/sec ±0.49% (90 runs sampled)
+underscore.isEqual x 74,423 ops/sec ±0.38% (89 runs sampled)
+lodash.isEqual x 36,637 ops/sec ±0.72% (90 runs sampled)
+deep-equal x 2,310 ops/sec ±0.37% (90 runs sampled)
+deep-eql x 35,312 ops/sec ±0.67% (91 runs sampled)
+ramda.equals x 12,054 ops/sec ±0.40% (91 runs sampled)
+util.isDeepStrictEqual x 46,440 ops/sec ±0.43% (90 runs sampled)
+assert.deepStrictEqual x 456 ops/sec ±0.71% (88 runs sampled)
+
+The fastest is fast-deep-equal
+```
+
+To run benchmark (requires node.js 6+):
+
+```bash
+npm run benchmark
+```
+
+__Please note__: this benchmark runs against the available test cases. To choose the most performant library for your application, it is recommended to benchmark against your data and to NOT expect this benchmark to reflect the performance difference in your application.
+
+
+## Enterprise support
+
+fast-deep-equal package is a part of [Tidelift enterprise subscription](https://tidelift.com/subscription/pkg/npm-fast-deep-equal?utm_source=npm-fast-deep-equal&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - it provides a centralised commercial support to open-source software users, in addition to the support provided by software maintainers.
+
+
+## Security contact
+
+To report a security vulnerability, please use the
+[Tidelift security contact](https://tidelift.com/security).
+Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerability via GitHub issues.
+
+
+## License
+
+[MIT](https://github.com/epoberezkin/fast-deep-equal/blob/master/LICENSE)
diff --git a/node_modules/fast-deep-equal/es6/index.d.ts b/node_modules/fast-deep-equal/es6/index.d.ts
new file mode 100644
index 0000000..c7eb9c7
--- /dev/null
+++ b/node_modules/fast-deep-equal/es6/index.d.ts
@@ -0,0 +1,2 @@
+declare const equal: (a: any, b: any) => boolean;
+export = equal;
diff --git a/node_modules/fast-deep-equal/es6/index.js b/node_modules/fast-deep-equal/es6/index.js
new file mode 100644
index 0000000..d980be2
--- /dev/null
+++ b/node_modules/fast-deep-equal/es6/index.js
@@ -0,0 +1,72 @@
+'use strict';
+
+// do not edit .js files directly - edit src/index.jst
+
+
+ var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';
+
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
+ if (a.constructor !== b.constructor) return false;
+
+ var length, i, keys;
+ if (Array.isArray(a)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+
+ if ((a instanceof Map) && (b instanceof Map)) {
+ if (a.size !== b.size) return false;
+ for (i of a.entries())
+ if (!b.has(i[0])) return false;
+ for (i of a.entries())
+ if (!equal(i[1], b.get(i[0]))) return false;
+ return true;
+ }
+
+ if ((a instanceof Set) && (b instanceof Set)) {
+ if (a.size !== b.size) return false;
+ for (i of a.entries())
+ if (!b.has(i[0])) return false;
+ return true;
+ }
+
+ if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (a[i] !== b[i]) return false;
+ return true;
+ }
+
+
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
+
+ keys = Object.keys(a);
+ length = keys.length;
+ if (length !== Object.keys(b).length) return false;
+
+ for (i = length; i-- !== 0;)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
+
+ for (i = length; i-- !== 0;) {
+ var key = keys[i];
+
+ if (!equal(a[key], b[key])) return false;
+ }
+
+ return true;
+ }
+
+ // true if both NaN, false otherwise
+ return a!==a && b!==b;
+};
diff --git a/node_modules/fast-deep-equal/es6/react.d.ts b/node_modules/fast-deep-equal/es6/react.d.ts
new file mode 100644
index 0000000..c7eb9c7
--- /dev/null
+++ b/node_modules/fast-deep-equal/es6/react.d.ts
@@ -0,0 +1,2 @@
+declare const equal: (a: any, b: any) => boolean;
+export = equal;
diff --git a/node_modules/fast-deep-equal/es6/react.js b/node_modules/fast-deep-equal/es6/react.js
new file mode 100644
index 0000000..98e2f9b
--- /dev/null
+++ b/node_modules/fast-deep-equal/es6/react.js
@@ -0,0 +1,79 @@
+'use strict';
+
+// do not edit .js files directly - edit src/index.jst
+
+
+ var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';
+
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
+ if (a.constructor !== b.constructor) return false;
+
+ var length, i, keys;
+ if (Array.isArray(a)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+
+ if ((a instanceof Map) && (b instanceof Map)) {
+ if (a.size !== b.size) return false;
+ for (i of a.entries())
+ if (!b.has(i[0])) return false;
+ for (i of a.entries())
+ if (!equal(i[1], b.get(i[0]))) return false;
+ return true;
+ }
+
+ if ((a instanceof Set) && (b instanceof Set)) {
+ if (a.size !== b.size) return false;
+ for (i of a.entries())
+ if (!b.has(i[0])) return false;
+ return true;
+ }
+
+ if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (a[i] !== b[i]) return false;
+ return true;
+ }
+
+
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
+
+ keys = Object.keys(a);
+ length = keys.length;
+ if (length !== Object.keys(b).length) return false;
+
+ for (i = length; i-- !== 0;)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
+
+ for (i = length; i-- !== 0;) {
+ var key = keys[i];
+
+ if (key === '_owner' && a.$$typeof) {
+ // React-specific: avoid traversing React elements' _owner.
+ // _owner contains circular references
+ // and is not needed when comparing the actual elements (and not their owners)
+ continue;
+ }
+
+ if (!equal(a[key], b[key])) return false;
+ }
+
+ return true;
+ }
+
+ // true if both NaN, false otherwise
+ return a!==a && b!==b;
+};
diff --git a/node_modules/fast-deep-equal/index.d.ts b/node_modules/fast-deep-equal/index.d.ts
new file mode 100644
index 0000000..3c042ca
--- /dev/null
+++ b/node_modules/fast-deep-equal/index.d.ts
@@ -0,0 +1,4 @@
+declare module 'fast-deep-equal' {
+ const equal: (a: any, b: any) => boolean;
+ export = equal;
+}
diff --git a/node_modules/fast-deep-equal/index.js b/node_modules/fast-deep-equal/index.js
new file mode 100644
index 0000000..30dd1ba
--- /dev/null
+++ b/node_modules/fast-deep-equal/index.js
@@ -0,0 +1,46 @@
+'use strict';
+
+// do not edit .js files directly - edit src/index.jst
+
+
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
+ if (a.constructor !== b.constructor) return false;
+
+ var length, i, keys;
+ if (Array.isArray(a)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+
+
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
+
+ keys = Object.keys(a);
+ length = keys.length;
+ if (length !== Object.keys(b).length) return false;
+
+ for (i = length; i-- !== 0;)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
+
+ for (i = length; i-- !== 0;) {
+ var key = keys[i];
+
+ if (!equal(a[key], b[key])) return false;
+ }
+
+ return true;
+ }
+
+ // true if both NaN, false otherwise
+ return a!==a && b!==b;
+};
diff --git a/node_modules/fast-deep-equal/package.json b/node_modules/fast-deep-equal/package.json
new file mode 100644
index 0000000..3cfe66c
--- /dev/null
+++ b/node_modules/fast-deep-equal/package.json
@@ -0,0 +1,61 @@
+{
+ "name": "fast-deep-equal",
+ "version": "3.1.3",
+ "description": "Fast deep equal",
+ "main": "index.js",
+ "scripts": {
+ "eslint": "eslint *.js benchmark/*.js spec/*.js",
+ "build": "node build",
+ "benchmark": "npm i && npm run build && cd ./benchmark && npm i && node ./",
+ "test-spec": "mocha spec/*.spec.js -R spec",
+ "test-cov": "nyc npm run test-spec",
+ "test-ts": "tsc --target ES5 --noImplicitAny index.d.ts",
+ "test": "npm run build && npm run eslint && npm run test-ts && npm run test-cov",
+ "prepublish": "npm run build"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/epoberezkin/fast-deep-equal.git"
+ },
+ "keywords": [
+ "fast",
+ "equal",
+ "deep-equal"
+ ],
+ "author": "Evgeny Poberezkin",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/epoberezkin/fast-deep-equal/issues"
+ },
+ "homepage": "https://github.com/epoberezkin/fast-deep-equal#readme",
+ "devDependencies": {
+ "coveralls": "^3.1.0",
+ "dot": "^1.1.2",
+ "eslint": "^7.2.0",
+ "mocha": "^7.2.0",
+ "nyc": "^15.1.0",
+ "pre-commit": "^1.2.2",
+ "react": "^16.12.0",
+ "react-test-renderer": "^16.12.0",
+ "sinon": "^9.0.2",
+ "typescript": "^3.9.5"
+ },
+ "nyc": {
+ "exclude": [
+ "**/spec/**",
+ "node_modules"
+ ],
+ "reporter": [
+ "lcov",
+ "text-summary"
+ ]
+ },
+ "files": [
+ "index.js",
+ "index.d.ts",
+ "react.js",
+ "react.d.ts",
+ "es6/"
+ ],
+ "types": "index.d.ts"
+}
diff --git a/node_modules/fast-deep-equal/react.d.ts b/node_modules/fast-deep-equal/react.d.ts
new file mode 100644
index 0000000..c7eb9c7
--- /dev/null
+++ b/node_modules/fast-deep-equal/react.d.ts
@@ -0,0 +1,2 @@
+declare const equal: (a: any, b: any) => boolean;
+export = equal;
diff --git a/node_modules/fast-deep-equal/react.js b/node_modules/fast-deep-equal/react.js
new file mode 100644
index 0000000..3489b98
--- /dev/null
+++ b/node_modules/fast-deep-equal/react.js
@@ -0,0 +1,53 @@
+'use strict';
+
+// do not edit .js files directly - edit src/index.jst
+
+
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
+ if (a.constructor !== b.constructor) return false;
+
+ var length, i, keys;
+ if (Array.isArray(a)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+
+
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
+
+ keys = Object.keys(a);
+ length = keys.length;
+ if (length !== Object.keys(b).length) return false;
+
+ for (i = length; i-- !== 0;)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
+
+ for (i = length; i-- !== 0;) {
+ var key = keys[i];
+
+ if (key === '_owner' && a.$$typeof) {
+ // React-specific: avoid traversing React elements' _owner.
+ // _owner contains circular references
+ // and is not needed when comparing the actual elements (and not their owners)
+ continue;
+ }
+
+ if (!equal(a[key], b[key])) return false;
+ }
+
+ return true;
+ }
+
+ // true if both NaN, false otherwise
+ return a!==a && b!==b;
+};
diff --git a/node_modules/lodash.snakecase/LICENSE b/node_modules/lodash.snakecase/LICENSE
new file mode 100644
index 0000000..e0c69d5
--- /dev/null
+++ b/node_modules/lodash.snakecase/LICENSE
@@ -0,0 +1,47 @@
+Copyright jQuery Foundation and other contributors <https://jquery.org/>
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/node_modules/lodash.snakecase/README.md b/node_modules/lodash.snakecase/README.md
new file mode 100644
index 0000000..4b233d0
--- /dev/null
+++ b/node_modules/lodash.snakecase/README.md
@@ -0,0 +1,18 @@
+# lodash.snakecase v4.1.1
+
+The [lodash](https://lodash.com/) method `_.snakeCase` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.snakecase
+```
+
+In Node.js:
+```js
+var snakeCase = require('lodash.snakecase');
+```
+
+See the [documentation](https://lodash.com/docs#snakeCase) or [package source](https://github.com/lodash/lodash/blob/4.1.1-npm-packages/lodash.snakecase) for more details.
diff --git a/node_modules/lodash.snakecase/index.js b/node_modules/lodash.snakecase/index.js
new file mode 100644
index 0000000..f9817f0
--- /dev/null
+++ b/node_modules/lodash.snakecase/index.js
@@ -0,0 +1,435 @@
+/**
+ * lodash (Custom Build) <https://lodash.com/>
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
+
+/** Used to match words composed of alphanumeric characters. */
+var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
+
+/** Used to match Latin Unicode letters (excluding mathematical operators). */
+var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
+
+/** Used to compose unicode character classes. */
+var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
+ rsComboSymbolsRange = '\\u20d0-\\u20f0',
+ rsDingbatRange = '\\u2700-\\u27bf',
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
+ rsPunctuationRange = '\\u2000-\\u206f',
+ rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
+ rsVarRange = '\\ufe0e\\ufe0f',
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
+
+/** Used to compose unicode capture groups. */
+var rsApos = "['\u2019]",
+ rsBreak = '[' + rsBreakRange + ']',
+ rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
+ rsDigits = '\\d+',
+ rsDingbat = '[' + rsDingbatRange + ']',
+ rsLower = '[' + rsLowerRange + ']',
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsUpper = '[' + rsUpperRange + ']',
+ rsZWJ = '\\u200d';
+
+/** Used to compose unicode regexes. */
+var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')',
+ rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')',
+ rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
+ rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
+ reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
+
+/** Used to match apostrophes. */
+var reApos = RegExp(rsApos, 'g');
+
+/**
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
+ */
+var reComboMark = RegExp(rsCombo, 'g');
+
+/** Used to match complex or compound words. */
+var reUnicodeWord = RegExp([
+ rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
+ rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',
+ rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr,
+ rsUpper + '+' + rsOptUpperContr,
+ rsDigits,
+ rsEmoji
+].join('|'), 'g');
+
+/** Used to detect strings that need a more robust regexp to match words. */
+var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
+
+/** Used to map Latin Unicode letters to basic Latin letters. */
+var deburredLetters = {
+ // Latin-1 Supplement block.
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
+ '\xc7': 'C', '\xe7': 'c',
+ '\xd0': 'D', '\xf0': 'd',
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
+ '\xd1': 'N', '\xf1': 'n',
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
+ '\xc6': 'Ae', '\xe6': 'ae',
+ '\xde': 'Th', '\xfe': 'th',
+ '\xdf': 'ss',
+ // Latin Extended-A block.
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
+ '\u0134': 'J', '\u0135': 'j',
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
+ '\u0174': 'W', '\u0175': 'w',
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
+ '\u0132': 'IJ', '\u0133': 'ij',
+ '\u0152': 'Oe', '\u0153': 'oe',
+ '\u0149': "'n", '\u017f': 'ss'
+};
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+/** Detect free variable `self`. */
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+/** Used as a reference to the global object. */
+var root = freeGlobal || freeSelf || Function('return this')();
+
+/**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+function arrayReduce(array, iteratee, accumulator, initAccum) {
+ var index = -1,
+ length = array ? array.length : 0;
+
+ if (initAccum && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+}
+
+/**
+ * Splits an ASCII `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+function asciiWords(string) {
+ return string.match(reAsciiWord) || [];
+}
+
+/**
+ * The base implementation of `_.propertyOf` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ */
+function basePropertyOf(object) {
+ return function(key) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
+ * letters to basic Latin letters.
+ *
+ * @private
+ * @param {string} letter The matched letter to deburr.
+ * @returns {string} Returns the deburred letter.
+ */
+var deburrLetter = basePropertyOf(deburredLetters);
+
+/**
+ * Checks if `string` contains a word composed of Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
+ */
+function hasUnicodeWord(string) {
+ return reHasUnicodeWord.test(string);
+}
+
+/**
+ * Splits a Unicode `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+function unicodeWords(string) {
+ return string.match(reUnicodeWord) || [];
+}
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/** Built-in value references. */
+var Symbol = root.Symbol;
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+/**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
+/**
+ * Creates a function like `_.camelCase`.
+ *
+ * @private
+ * @param {Function} callback The function to combine each word.
+ * @returns {Function} Returns the new compounder function.
+ */
+function createCompounder(callback) {
+ return function(string) {
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
+ };
+}
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString(value) {
+ return value == null ? '' : baseToString(value);
+}
+
+/**
+ * Deburrs `string` by converting
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
+ * letters to basic Latin letters and removing
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to deburr.
+ * @returns {string} Returns the deburred string.
+ * @example
+ *
+ * _.deburr('déjà vu');
+ * // => 'deja vu'
+ */
+function deburr(string) {
+ string = toString(string);
+ return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
+}
+
+/**
+ * Converts `string` to
+ * [snake case](https://en.wikipedia.org/wiki/Snake_case).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the snake cased string.
+ * @example
+ *
+ * _.snakeCase('Foo Bar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('fooBar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('--FOO-BAR--');
+ * // => 'foo_bar'
+ */
+var snakeCase = createCompounder(function(result, word, index) {
+ return result + (index ? '_' : '') + word.toLowerCase();
+});
+
+/**
+ * Splits `string` into an array of its words.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {RegExp|string} [pattern] The pattern to match words.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the words of `string`.
+ * @example
+ *
+ * _.words('fred, barney, & pebbles');
+ * // => ['fred', 'barney', 'pebbles']
+ *
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
+ * // => ['fred', 'barney', '&', 'pebbles']
+ */
+function words(string, pattern, guard) {
+ string = toString(string);
+ pattern = guard ? undefined : pattern;
+
+ if (pattern === undefined) {
+ return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
+ }
+ return string.match(pattern) || [];
+}
+
+module.exports = snakeCase;
diff --git a/node_modules/lodash.snakecase/package.json b/node_modules/lodash.snakecase/package.json
new file mode 100644
index 0000000..ba3a743
--- /dev/null
+++ b/node_modules/lodash.snakecase/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash.snakecase",
+ "version": "4.1.1",
+ "description": "The lodash method `_.snakeCase` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": "lodash-modularized, snakecase",
+ "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
+ "Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
+ "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+}
diff --git a/node_modules/lodash/LICENSE b/node_modules/lodash/LICENSE
new file mode 100644
index 0000000..77c42f1
--- /dev/null
+++ b/node_modules/lodash/LICENSE
@@ -0,0 +1,47 @@
+Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/node_modules/lodash/README.md b/node_modules/lodash/README.md
new file mode 100644
index 0000000..3ab1a05
--- /dev/null
+++ b/node_modules/lodash/README.md
@@ -0,0 +1,39 @@
+# lodash v4.17.21
+
+The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.
+
+## Installation
+
+Using npm:
+```shell
+$ npm i -g npm
+$ npm i --save lodash
+```
+
+In Node.js:
+```js
+// Load the full build.
+var _ = require('lodash');
+// Load the core build.
+var _ = require('lodash/core');
+// Load the FP build for immutable auto-curried iteratee-first data-last methods.
+var fp = require('lodash/fp');
+
+// Load method categories.
+var array = require('lodash/array');
+var object = require('lodash/fp/object');
+
+// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
+var at = require('lodash/at');
+var curryN = require('lodash/fp/curryN');
+```
+
+See the [package source](https://github.com/lodash/lodash/tree/4.17.21-npm) for more details.
+
+**Note:**<br>
+Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL.
+
+## Support
+
+Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.<br>
+Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available.
diff --git a/node_modules/lodash/_DataView.js b/node_modules/lodash/_DataView.js
new file mode 100644
index 0000000..ac2d57c
--- /dev/null
+++ b/node_modules/lodash/_DataView.js
@@ -0,0 +1,7 @@
+var getNative = require('./_getNative'),
+ root = require('./_root');
+
+/* Built-in method references that are verified to be native. */
+var DataView = getNative(root, 'DataView');
+
+module.exports = DataView;
diff --git a/node_modules/lodash/_Hash.js b/node_modules/lodash/_Hash.js
new file mode 100644
index 0000000..b504fe3
--- /dev/null
+++ b/node_modules/lodash/_Hash.js
@@ -0,0 +1,32 @@
+var hashClear = require('./_hashClear'),
+ hashDelete = require('./_hashDelete'),
+ hashGet = require('./_hashGet'),
+ hashHas = require('./_hashHas'),
+ hashSet = require('./_hashSet');
+
+/**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function Hash(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+// Add methods to `Hash`.
+Hash.prototype.clear = hashClear;
+Hash.prototype['delete'] = hashDelete;
+Hash.prototype.get = hashGet;
+Hash.prototype.has = hashHas;
+Hash.prototype.set = hashSet;
+
+module.exports = Hash;
diff --git a/node_modules/lodash/_LazyWrapper.js b/node_modules/lodash/_LazyWrapper.js
new file mode 100644
index 0000000..81786c7
--- /dev/null
+++ b/node_modules/lodash/_LazyWrapper.js
@@ -0,0 +1,28 @@
+var baseCreate = require('./_baseCreate'),
+ baseLodash = require('./_baseLodash');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295;
+
+/**
+ * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
+ *
+ * @private
+ * @constructor
+ * @param {*} value The value to wrap.
+ */
+function LazyWrapper(value) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__dir__ = 1;
+ this.__filtered__ = false;
+ this.__iteratees__ = [];
+ this.__takeCount__ = MAX_ARRAY_LENGTH;
+ this.__views__ = [];
+}
+
+// Ensure `LazyWrapper` is an instance of `baseLodash`.
+LazyWrapper.prototype = baseCreate(baseLodash.prototype);
+LazyWrapper.prototype.constructor = LazyWrapper;
+
+module.exports = LazyWrapper;
diff --git a/node_modules/lodash/_ListCache.js b/node_modules/lodash/_ListCache.js
new file mode 100644
index 0000000..26895c3
--- /dev/null
+++ b/node_modules/lodash/_ListCache.js
@@ -0,0 +1,32 @@
+var listCacheClear = require('./_listCacheClear'),
+ listCacheDelete = require('./_listCacheDelete'),
+ listCacheGet = require('./_listCacheGet'),
+ listCacheHas = require('./_listCacheHas'),
+ listCacheSet = require('./_listCacheSet');
+
+/**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function ListCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+// Add methods to `ListCache`.
+ListCache.prototype.clear = listCacheClear;
+ListCache.prototype['delete'] = listCacheDelete;
+ListCache.prototype.get = listCacheGet;
+ListCache.prototype.has = listCacheHas;
+ListCache.prototype.set = listCacheSet;
+
+module.exports = ListCache;
diff --git a/node_modules/lodash/_LodashWrapper.js b/node_modules/lodash/_LodashWrapper.js
new file mode 100644
index 0000000..c1e4d9d
--- /dev/null
+++ b/node_modules/lodash/_LodashWrapper.js
@@ -0,0 +1,22 @@
+var baseCreate = require('./_baseCreate'),
+ baseLodash = require('./_baseLodash');
+
+/**
+ * The base constructor for creating `lodash` wrapper objects.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
+ */
+function LodashWrapper(value, chainAll) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__chain__ = !!chainAll;
+ this.__index__ = 0;
+ this.__values__ = undefined;
+}
+
+LodashWrapper.prototype = baseCreate(baseLodash.prototype);
+LodashWrapper.prototype.constructor = LodashWrapper;
+
+module.exports = LodashWrapper;
diff --git a/node_modules/lodash/_Map.js b/node_modules/lodash/_Map.js
new file mode 100644
index 0000000..b73f29a
--- /dev/null
+++ b/node_modules/lodash/_Map.js
@@ -0,0 +1,7 @@
+var getNative = require('./_getNative'),
+ root = require('./_root');
+
+/* Built-in method references that are verified to be native. */
+var Map = getNative(root, 'Map');
+
+module.exports = Map;
diff --git a/node_modules/lodash/_MapCache.js b/node_modules/lodash/_MapCache.js
new file mode 100644
index 0000000..4a4eea7
--- /dev/null
+++ b/node_modules/lodash/_MapCache.js
@@ -0,0 +1,32 @@
+var mapCacheClear = require('./_mapCacheClear'),
+ mapCacheDelete = require('./_mapCacheDelete'),
+ mapCacheGet = require('./_mapCacheGet'),
+ mapCacheHas = require('./_mapCacheHas'),
+ mapCacheSet = require('./_mapCacheSet');
+
+/**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function MapCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+// Add methods to `MapCache`.
+MapCache.prototype.clear = mapCacheClear;
+MapCache.prototype['delete'] = mapCacheDelete;
+MapCache.prototype.get = mapCacheGet;
+MapCache.prototype.has = mapCacheHas;
+MapCache.prototype.set = mapCacheSet;
+
+module.exports = MapCache;
diff --git a/node_modules/lodash/_Promise.js b/node_modules/lodash/_Promise.js
new file mode 100644
index 0000000..247b9e1
--- /dev/null
+++ b/node_modules/lodash/_Promise.js
@@ -0,0 +1,7 @@
+var getNative = require('./_getNative'),
+ root = require('./_root');
+
+/* Built-in method references that are verified to be native. */
+var Promise = getNative(root, 'Promise');
+
+module.exports = Promise;
diff --git a/node_modules/lodash/_Set.js b/node_modules/lodash/_Set.js
new file mode 100644
index 0000000..b3c8dcb
--- /dev/null
+++ b/node_modules/lodash/_Set.js
@@ -0,0 +1,7 @@
+var getNative = require('./_getNative'),
+ root = require('./_root');
+
+/* Built-in method references that are verified to be native. */
+var Set = getNative(root, 'Set');
+
+module.exports = Set;
diff --git a/node_modules/lodash/_SetCache.js b/node_modules/lodash/_SetCache.js
new file mode 100644
index 0000000..6468b06
--- /dev/null
+++ b/node_modules/lodash/_SetCache.js
@@ -0,0 +1,27 @@
+var MapCache = require('./_MapCache'),
+ setCacheAdd = require('./_setCacheAdd'),
+ setCacheHas = require('./_setCacheHas');
+
+/**
+ *
+ * Creates an array cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+function SetCache(values) {
+ var index = -1,
+ length = values == null ? 0 : values.length;
+
+ this.__data__ = new MapCache;
+ while (++index < length) {
+ this.add(values[index]);
+ }
+}
+
+// Add methods to `SetCache`.
+SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+SetCache.prototype.has = setCacheHas;
+
+module.exports = SetCache;
diff --git a/node_modules/lodash/_Stack.js b/node_modules/lodash/_Stack.js
new file mode 100644
index 0000000..80b2cf1
--- /dev/null
+++ b/node_modules/lodash/_Stack.js
@@ -0,0 +1,27 @@
+var ListCache = require('./_ListCache'),
+ stackClear = require('./_stackClear'),
+ stackDelete = require('./_stackDelete'),
+ stackGet = require('./_stackGet'),
+ stackHas = require('./_stackHas'),
+ stackSet = require('./_stackSet');
+
+/**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function Stack(entries) {
+ var data = this.__data__ = new ListCache(entries);
+ this.size = data.size;
+}
+
+// Add methods to `Stack`.
+Stack.prototype.clear = stackClear;
+Stack.prototype['delete'] = stackDelete;
+Stack.prototype.get = stackGet;
+Stack.prototype.has = stackHas;
+Stack.prototype.set = stackSet;
+
+module.exports = Stack;
diff --git a/node_modules/lodash/_Symbol.js b/node_modules/lodash/_Symbol.js
new file mode 100644
index 0000000..a013f7c
--- /dev/null
+++ b/node_modules/lodash/_Symbol.js
@@ -0,0 +1,6 @@
+var root = require('./_root');
+
+/** Built-in value references. */
+var Symbol = root.Symbol;
+
+module.exports = Symbol;
diff --git a/node_modules/lodash/_Uint8Array.js b/node_modules/lodash/_Uint8Array.js
new file mode 100644
index 0000000..2fb30e1
--- /dev/null
+++ b/node_modules/lodash/_Uint8Array.js
@@ -0,0 +1,6 @@
+var root = require('./_root');
+
+/** Built-in value references. */
+var Uint8Array = root.Uint8Array;
+
+module.exports = Uint8Array;
diff --git a/node_modules/lodash/_WeakMap.js b/node_modules/lodash/_WeakMap.js
new file mode 100644
index 0000000..567f86c
--- /dev/null
+++ b/node_modules/lodash/_WeakMap.js
@@ -0,0 +1,7 @@
+var getNative = require('./_getNative'),
+ root = require('./_root');
+
+/* Built-in method references that are verified to be native. */
+var WeakMap = getNative(root, 'WeakMap');
+
+module.exports = WeakMap;
diff --git a/node_modules/lodash/_apply.js b/node_modules/lodash/_apply.js
new file mode 100644
index 0000000..36436dd
--- /dev/null
+++ b/node_modules/lodash/_apply.js
@@ -0,0 +1,21 @@
+/**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+function apply(func, thisArg, args) {
+ switch (args.length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
+ }
+ return func.apply(thisArg, args);
+}
+
+module.exports = apply;
diff --git a/node_modules/lodash/_arrayAggregator.js b/node_modules/lodash/_arrayAggregator.js
new file mode 100644
index 0000000..d96c3ca
--- /dev/null
+++ b/node_modules/lodash/_arrayAggregator.js
@@ -0,0 +1,22 @@
+/**
+ * A specialized version of `baseAggregator` for arrays.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+function arrayAggregator(array, setter, iteratee, accumulator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ var value = array[index];
+ setter(accumulator, value, iteratee(value), array);
+ }
+ return accumulator;
+}
+
+module.exports = arrayAggregator;
diff --git a/node_modules/lodash/_arrayEach.js b/node_modules/lodash/_arrayEach.js
new file mode 100644
index 0000000..2c5f579
--- /dev/null
+++ b/node_modules/lodash/_arrayEach.js
@@ -0,0 +1,22 @@
+/**
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+}
+
+module.exports = arrayEach;
diff --git a/node_modules/lodash/_arrayEachRight.js b/node_modules/lodash/_arrayEachRight.js
new file mode 100644
index 0000000..976ca5c
--- /dev/null
+++ b/node_modules/lodash/_arrayEachRight.js
@@ -0,0 +1,21 @@
+/**
+ * A specialized version of `_.forEachRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+function arrayEachRight(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+
+ while (length--) {
+ if (iteratee(array[length], length, array) === false) {
+ break;
+ }
+ }
+ return array;
+}
+
+module.exports = arrayEachRight;
diff --git a/node_modules/lodash/_arrayEvery.js b/node_modules/lodash/_arrayEvery.js
new file mode 100644
index 0000000..e26a918
--- /dev/null
+++ b/node_modules/lodash/_arrayEvery.js
@@ -0,0 +1,23 @@
+/**
+ * A specialized version of `_.every` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ */
+function arrayEvery(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (!predicate(array[index], index, array)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+module.exports = arrayEvery;
diff --git a/node_modules/lodash/_arrayFilter.js b/node_modules/lodash/_arrayFilter.js
new file mode 100644
index 0000000..75ea254
--- /dev/null
+++ b/node_modules/lodash/_arrayFilter.js
@@ -0,0 +1,25 @@
+/**
+ * A specialized version of `_.filter` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+function arrayFilter(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+}
+
+module.exports = arrayFilter;
diff --git a/node_modules/lodash/_arrayIncludes.js b/node_modules/lodash/_arrayIncludes.js
new file mode 100644
index 0000000..3737a6d
--- /dev/null
+++ b/node_modules/lodash/_arrayIncludes.js
@@ -0,0 +1,17 @@
+var baseIndexOf = require('./_baseIndexOf');
+
+/**
+ * A specialized version of `_.includes` for arrays without support for
+ * specifying an index to search from.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+function arrayIncludes(array, value) {
+ var length = array == null ? 0 : array.length;
+ return !!length && baseIndexOf(array, value, 0) > -1;
+}
+
+module.exports = arrayIncludes;
diff --git a/node_modules/lodash/_arrayIncludesWith.js b/node_modules/lodash/_arrayIncludesWith.js
new file mode 100644
index 0000000..235fd97
--- /dev/null
+++ b/node_modules/lodash/_arrayIncludesWith.js
@@ -0,0 +1,22 @@
+/**
+ * This function is like `arrayIncludes` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+function arrayIncludesWith(array, value, comparator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (comparator(value, array[index])) {
+ return true;
+ }
+ }
+ return false;
+}
+
+module.exports = arrayIncludesWith;
diff --git a/node_modules/lodash/_arrayLikeKeys.js b/node_modules/lodash/_arrayLikeKeys.js
new file mode 100644
index 0000000..b2ec9ce
--- /dev/null
+++ b/node_modules/lodash/_arrayLikeKeys.js
@@ -0,0 +1,49 @@
+var baseTimes = require('./_baseTimes'),
+ isArguments = require('./isArguments'),
+ isArray = require('./isArray'),
+ isBuffer = require('./isBuffer'),
+ isIndex = require('./_isIndex'),
+ isTypedArray = require('./isTypedArray');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates an array of the enumerable property names of the array-like `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @param {boolean} inherited Specify returning inherited property names.
+ * @returns {Array} Returns the array of property names.
+ */
+function arrayLikeKeys(value, inherited) {
+ var isArr = isArray(value),
+ isArg = !isArr && isArguments(value),
+ isBuff = !isArr && !isArg && isBuffer(value),
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
+ skipIndexes = isArr || isArg || isBuff || isType,
+ result = skipIndexes ? baseTimes(value.length, String) : [],
+ length = result.length;
+
+ for (var key in value) {
+ if ((inherited || hasOwnProperty.call(value, key)) &&
+ !(skipIndexes && (
+ // Safari 9 has enumerable `arguments.length` in strict mode.
+ key == 'length' ||
+ // Node.js 0.10 has enumerable non-index properties on buffers.
+ (isBuff && (key == 'offset' || key == 'parent')) ||
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
+ // Skip index properties.
+ isIndex(key, length)
+ ))) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+module.exports = arrayLikeKeys;
diff --git a/node_modules/lodash/_arrayMap.js b/node_modules/lodash/_arrayMap.js
new file mode 100644
index 0000000..22b2246
--- /dev/null
+++ b/node_modules/lodash/_arrayMap.js
@@ -0,0 +1,21 @@
+/**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+}
+
+module.exports = arrayMap;
diff --git a/node_modules/lodash/_arrayPush.js b/node_modules/lodash/_arrayPush.js
new file mode 100644
index 0000000..7d742b3
--- /dev/null
+++ b/node_modules/lodash/_arrayPush.js
@@ -0,0 +1,20 @@
+/**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
+
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+}
+
+module.exports = arrayPush;
diff --git a/node_modules/lodash/_arrayReduce.js b/node_modules/lodash/_arrayReduce.js
new file mode 100644
index 0000000..de8b79b
--- /dev/null
+++ b/node_modules/lodash/_arrayReduce.js
@@ -0,0 +1,26 @@
+/**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+function arrayReduce(array, iteratee, accumulator, initAccum) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ if (initAccum && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+}
+
+module.exports = arrayReduce;
diff --git a/node_modules/lodash/_arrayReduceRight.js b/node_modules/lodash/_arrayReduceRight.js
new file mode 100644
index 0000000..22d8976
--- /dev/null
+++ b/node_modules/lodash/_arrayReduceRight.js
@@ -0,0 +1,24 @@
+/**
+ * A specialized version of `_.reduceRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the last element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+function arrayReduceRight(array, iteratee, accumulator, initAccum) {
+ var length = array == null ? 0 : array.length;
+ if (initAccum && length) {
+ accumulator = array[--length];
+ }
+ while (length--) {
+ accumulator = iteratee(accumulator, array[length], length, array);
+ }
+ return accumulator;
+}
+
+module.exports = arrayReduceRight;
diff --git a/node_modules/lodash/_arraySample.js b/node_modules/lodash/_arraySample.js
new file mode 100644
index 0000000..fcab010
--- /dev/null
+++ b/node_modules/lodash/_arraySample.js
@@ -0,0 +1,15 @@
+var baseRandom = require('./_baseRandom');
+
+/**
+ * A specialized version of `_.sample` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @returns {*} Returns the random element.
+ */
+function arraySample(array) {
+ var length = array.length;
+ return length ? array[baseRandom(0, length - 1)] : undefined;
+}
+
+module.exports = arraySample;
diff --git a/node_modules/lodash/_arraySampleSize.js b/node_modules/lodash/_arraySampleSize.js
new file mode 100644
index 0000000..8c7e364
--- /dev/null
+++ b/node_modules/lodash/_arraySampleSize.js
@@ -0,0 +1,17 @@
+var baseClamp = require('./_baseClamp'),
+ copyArray = require('./_copyArray'),
+ shuffleSelf = require('./_shuffleSelf');
+
+/**
+ * A specialized version of `_.sampleSize` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+function arraySampleSize(array, n) {
+ return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
+}
+
+module.exports = arraySampleSize;
diff --git a/node_modules/lodash/_arrayShuffle.js b/node_modules/lodash/_arrayShuffle.js
new file mode 100644
index 0000000..46313a3
--- /dev/null
+++ b/node_modules/lodash/_arrayShuffle.js
@@ -0,0 +1,15 @@
+var copyArray = require('./_copyArray'),
+ shuffleSelf = require('./_shuffleSelf');
+
+/**
+ * A specialized version of `_.shuffle` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+function arrayShuffle(array) {
+ return shuffleSelf(copyArray(array));
+}
+
+module.exports = arrayShuffle;
diff --git a/node_modules/lodash/_arraySome.js b/node_modules/lodash/_arraySome.js
new file mode 100644
index 0000000..6fd02fd
--- /dev/null
+++ b/node_modules/lodash/_arraySome.js
@@ -0,0 +1,23 @@
+/**
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+function arraySome(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+module.exports = arraySome;
diff --git a/node_modules/lodash/_asciiSize.js b/node_modules/lodash/_asciiSize.js
new file mode 100644
index 0000000..11d29c3
--- /dev/null
+++ b/node_modules/lodash/_asciiSize.js
@@ -0,0 +1,12 @@
+var baseProperty = require('./_baseProperty');
+
+/**
+ * Gets the size of an ASCII `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+var asciiSize = baseProperty('length');
+
+module.exports = asciiSize;
diff --git a/node_modules/lodash/_asciiToArray.js b/node_modules/lodash/_asciiToArray.js
new file mode 100644
index 0000000..8e3dd5b
--- /dev/null
+++ b/node_modules/lodash/_asciiToArray.js
@@ -0,0 +1,12 @@
+/**
+ * Converts an ASCII `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+function asciiToArray(string) {
+ return string.split('');
+}
+
+module.exports = asciiToArray;
diff --git a/node_modules/lodash/_asciiWords.js b/node_modules/lodash/_asciiWords.js
new file mode 100644
index 0000000..d765f0f
--- /dev/null
+++ b/node_modules/lodash/_asciiWords.js
@@ -0,0 +1,15 @@
+/** Used to match words composed of alphanumeric characters. */
+var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
+
+/**
+ * Splits an ASCII `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+function asciiWords(string) {
+ return string.match(reAsciiWord) || [];
+}
+
+module.exports = asciiWords;
diff --git a/node_modules/lodash/_assignMergeValue.js b/node_modules/lodash/_assignMergeValue.js
new file mode 100644
index 0000000..cb1185e
--- /dev/null
+++ b/node_modules/lodash/_assignMergeValue.js
@@ -0,0 +1,20 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ eq = require('./eq');
+
+/**
+ * This function is like `assignValue` except that it doesn't assign
+ * `undefined` values.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+function assignMergeValue(object, key, value) {
+ if ((value !== undefined && !eq(object[key], value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+}
+
+module.exports = assignMergeValue;
diff --git a/node_modules/lodash/_assignValue.js b/node_modules/lodash/_assignValue.js
new file mode 100644
index 0000000..4083957
--- /dev/null
+++ b/node_modules/lodash/_assignValue.js
@@ -0,0 +1,28 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ eq = require('./eq');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+}
+
+module.exports = assignValue;
diff --git a/node_modules/lodash/_assocIndexOf.js b/node_modules/lodash/_assocIndexOf.js
new file mode 100644
index 0000000..5b77a2b
--- /dev/null
+++ b/node_modules/lodash/_assocIndexOf.js
@@ -0,0 +1,21 @@
+var eq = require('./eq');
+
+/**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+}
+
+module.exports = assocIndexOf;
diff --git a/node_modules/lodash/_baseAggregator.js b/node_modules/lodash/_baseAggregator.js
new file mode 100644
index 0000000..4bc9e91
--- /dev/null
+++ b/node_modules/lodash/_baseAggregator.js
@@ -0,0 +1,21 @@
+var baseEach = require('./_baseEach');
+
+/**
+ * Aggregates elements of `collection` on `accumulator` with keys transformed
+ * by `iteratee` and values set by `setter`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+function baseAggregator(collection, setter, iteratee, accumulator) {
+ baseEach(collection, function(value, key, collection) {
+ setter(accumulator, value, iteratee(value), collection);
+ });
+ return accumulator;
+}
+
+module.exports = baseAggregator;
diff --git a/node_modules/lodash/_baseAssign.js b/node_modules/lodash/_baseAssign.js
new file mode 100644
index 0000000..e5c4a1a
--- /dev/null
+++ b/node_modules/lodash/_baseAssign.js
@@ -0,0 +1,17 @@
+var copyObject = require('./_copyObject'),
+ keys = require('./keys');
+
+/**
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+function baseAssign(object, source) {
+ return object && copyObject(source, keys(source), object);
+}
+
+module.exports = baseAssign;
diff --git a/node_modules/lodash/_baseAssignIn.js b/node_modules/lodash/_baseAssignIn.js
new file mode 100644
index 0000000..6624f90
--- /dev/null
+++ b/node_modules/lodash/_baseAssignIn.js
@@ -0,0 +1,17 @@
+var copyObject = require('./_copyObject'),
+ keysIn = require('./keysIn');
+
+/**
+ * The base implementation of `_.assignIn` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+function baseAssignIn(object, source) {
+ return object && copyObject(source, keysIn(source), object);
+}
+
+module.exports = baseAssignIn;
diff --git a/node_modules/lodash/_baseAssignValue.js b/node_modules/lodash/_baseAssignValue.js
new file mode 100644
index 0000000..d6f66ef
--- /dev/null
+++ b/node_modules/lodash/_baseAssignValue.js
@@ -0,0 +1,25 @@
+var defineProperty = require('./_defineProperty');
+
+/**
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+function baseAssignValue(object, key, value) {
+ if (key == '__proto__' && defineProperty) {
+ defineProperty(object, key, {
+ 'configurable': true,
+ 'enumerable': true,
+ 'value': value,
+ 'writable': true
+ });
+ } else {
+ object[key] = value;
+ }
+}
+
+module.exports = baseAssignValue;
diff --git a/node_modules/lodash/_baseAt.js b/node_modules/lodash/_baseAt.js
new file mode 100644
index 0000000..90e4237
--- /dev/null
+++ b/node_modules/lodash/_baseAt.js
@@ -0,0 +1,23 @@
+var get = require('./get');
+
+/**
+ * The base implementation of `_.at` without support for individual paths.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Array} Returns the picked elements.
+ */
+function baseAt(object, paths) {
+ var index = -1,
+ length = paths.length,
+ result = Array(length),
+ skip = object == null;
+
+ while (++index < length) {
+ result[index] = skip ? undefined : get(object, paths[index]);
+ }
+ return result;
+}
+
+module.exports = baseAt;
diff --git a/node_modules/lodash/_baseClamp.js b/node_modules/lodash/_baseClamp.js
new file mode 100644
index 0000000..a1c5692
--- /dev/null
+++ b/node_modules/lodash/_baseClamp.js
@@ -0,0 +1,22 @@
+/**
+ * The base implementation of `_.clamp` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ */
+function baseClamp(number, lower, upper) {
+ if (number === number) {
+ if (upper !== undefined) {
+ number = number <= upper ? number : upper;
+ }
+ if (lower !== undefined) {
+ number = number >= lower ? number : lower;
+ }
+ }
+ return number;
+}
+
+module.exports = baseClamp;
diff --git a/node_modules/lodash/_baseClone.js b/node_modules/lodash/_baseClone.js
new file mode 100644
index 0000000..69f8705
--- /dev/null
+++ b/node_modules/lodash/_baseClone.js
@@ -0,0 +1,166 @@
+var Stack = require('./_Stack'),
+ arrayEach = require('./_arrayEach'),
+ assignValue = require('./_assignValue'),
+ baseAssign = require('./_baseAssign'),
+ baseAssignIn = require('./_baseAssignIn'),
+ cloneBuffer = require('./_cloneBuffer'),
+ copyArray = require('./_copyArray'),
+ copySymbols = require('./_copySymbols'),
+ copySymbolsIn = require('./_copySymbolsIn'),
+ getAllKeys = require('./_getAllKeys'),
+ getAllKeysIn = require('./_getAllKeysIn'),
+ getTag = require('./_getTag'),
+ initCloneArray = require('./_initCloneArray'),
+ initCloneByTag = require('./_initCloneByTag'),
+ initCloneObject = require('./_initCloneObject'),
+ isArray = require('./isArray'),
+ isBuffer = require('./isBuffer'),
+ isMap = require('./isMap'),
+ isObject = require('./isObject'),
+ isSet = require('./isSet'),
+ keys = require('./keys'),
+ keysIn = require('./keysIn');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1,
+ CLONE_FLAT_FLAG = 2,
+ CLONE_SYMBOLS_FLAG = 4;
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ weakMapTag = '[object WeakMap]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+/** Used to identify `toStringTag` values supported by `_.clone`. */
+var cloneableTags = {};
+cloneableTags[argsTag] = cloneableTags[arrayTag] =
+cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
+cloneableTags[boolTag] = cloneableTags[dateTag] =
+cloneableTags[float32Tag] = cloneableTags[float64Tag] =
+cloneableTags[int8Tag] = cloneableTags[int16Tag] =
+cloneableTags[int32Tag] = cloneableTags[mapTag] =
+cloneableTags[numberTag] = cloneableTags[objectTag] =
+cloneableTags[regexpTag] = cloneableTags[setTag] =
+cloneableTags[stringTag] = cloneableTags[symbolTag] =
+cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+cloneableTags[errorTag] = cloneableTags[funcTag] =
+cloneableTags[weakMapTag] = false;
+
+/**
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Deep clone
+ * 2 - Flatten inherited properties
+ * 4 - Clone symbols
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+function baseClone(value, bitmask, customizer, key, object, stack) {
+ var result,
+ isDeep = bitmask & CLONE_DEEP_FLAG,
+ isFlat = bitmask & CLONE_FLAT_FLAG,
+ isFull = bitmask & CLONE_SYMBOLS_FLAG;
+
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return copyArray(value, result);
+ }
+ } else {
+ var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;
+
+ if (isBuffer(value)) {
+ return cloneBuffer(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ result = (isFlat || isFunc) ? {} : initCloneObject(value);
+ if (!isDeep) {
+ return isFlat
+ ? copySymbolsIn(value, baseAssignIn(result, value))
+ : copySymbols(value, baseAssign(result, value));
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = initCloneByTag(value, tag, isDeep);
+ }
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
+ }
+ stack.set(value, result);
+
+ if (isSet(value)) {
+ value.forEach(function(subValue) {
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
+ });
+ } else if (isMap(value)) {
+ value.forEach(function(subValue, key) {
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ }
+
+ var keysFunc = isFull
+ ? (isFlat ? getAllKeysIn : getAllKeys)
+ : (isFlat ? keysIn : keys);
+
+ var props = isArr ? undefined : keysFunc(value);
+ arrayEach(props || value, function(subValue, key) {
+ if (props) {
+ key = subValue;
+ subValue = value[key];
+ }
+ // Recursively populate clone (susceptible to call stack limits).
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ return result;
+}
+
+module.exports = baseClone;
diff --git a/node_modules/lodash/_baseConforms.js b/node_modules/lodash/_baseConforms.js
new file mode 100644
index 0000000..947e20d
--- /dev/null
+++ b/node_modules/lodash/_baseConforms.js
@@ -0,0 +1,18 @@
+var baseConformsTo = require('./_baseConformsTo'),
+ keys = require('./keys');
+
+/**
+ * The base implementation of `_.conforms` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new spec function.
+ */
+function baseConforms(source) {
+ var props = keys(source);
+ return function(object) {
+ return baseConformsTo(object, source, props);
+ };
+}
+
+module.exports = baseConforms;
diff --git a/node_modules/lodash/_baseConformsTo.js b/node_modules/lodash/_baseConformsTo.js
new file mode 100644
index 0000000..e449cb8
--- /dev/null
+++ b/node_modules/lodash/_baseConformsTo.js
@@ -0,0 +1,27 @@
+/**
+ * The base implementation of `_.conformsTo` which accepts `props` to check.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+ */
+function baseConformsTo(object, source, props) {
+ var length = props.length;
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (length--) {
+ var key = props[length],
+ predicate = source[key],
+ value = object[key];
+
+ if ((value === undefined && !(key in object)) || !predicate(value)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+module.exports = baseConformsTo;
diff --git a/node_modules/lodash/_baseCreate.js b/node_modules/lodash/_baseCreate.js
new file mode 100644
index 0000000..ffa6a52
--- /dev/null
+++ b/node_modules/lodash/_baseCreate.js
@@ -0,0 +1,30 @@
+var isObject = require('./isObject');
+
+/** Built-in value references. */
+var objectCreate = Object.create;
+
+/**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!isObject(proto)) {
+ return {};
+ }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+}());
+
+module.exports = baseCreate;
diff --git a/node_modules/lodash/_baseDelay.js b/node_modules/lodash/_baseDelay.js
new file mode 100644
index 0000000..1486d69
--- /dev/null
+++ b/node_modules/lodash/_baseDelay.js
@@ -0,0 +1,21 @@
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * The base implementation of `_.delay` and `_.defer` which accepts `args`
+ * to provide to `func`.
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {Array} args The arguments to provide to `func`.
+ * @returns {number|Object} Returns the timer id or timeout object.
+ */
+function baseDelay(func, wait, args) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
+}
+
+module.exports = baseDelay;
diff --git a/node_modules/lodash/_baseDifference.js b/node_modules/lodash/_baseDifference.js
new file mode 100644
index 0000000..343ac19
--- /dev/null
+++ b/node_modules/lodash/_baseDifference.js
@@ -0,0 +1,67 @@
+var SetCache = require('./_SetCache'),
+ arrayIncludes = require('./_arrayIncludes'),
+ arrayIncludesWith = require('./_arrayIncludesWith'),
+ arrayMap = require('./_arrayMap'),
+ baseUnary = require('./_baseUnary'),
+ cacheHas = require('./_cacheHas');
+
+/** Used as the size to enable large array optimizations. */
+var LARGE_ARRAY_SIZE = 200;
+
+/**
+ * The base implementation of methods like `_.difference` without support
+ * for excluding multiple arrays or iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Array} values The values to exclude.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ */
+function baseDifference(array, values, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ isCommon = true,
+ length = array.length,
+ result = [],
+ valuesLength = values.length;
+
+ if (!length) {
+ return result;
+ }
+ if (iteratee) {
+ values = arrayMap(values, baseUnary(iteratee));
+ }
+ if (comparator) {
+ includes = arrayIncludesWith;
+ isCommon = false;
+ }
+ else if (values.length >= LARGE_ARRAY_SIZE) {
+ includes = cacheHas;
+ isCommon = false;
+ values = new SetCache(values);
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee == null ? value : iteratee(value);
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var valuesIndex = valuesLength;
+ while (valuesIndex--) {
+ if (values[valuesIndex] === computed) {
+ continue outer;
+ }
+ }
+ result.push(value);
+ }
+ else if (!includes(values, computed, comparator)) {
+ result.push(value);
+ }
+ }
+ return result;
+}
+
+module.exports = baseDifference;
diff --git a/node_modules/lodash/_baseEach.js b/node_modules/lodash/_baseEach.js
new file mode 100644
index 0000000..512c067
--- /dev/null
+++ b/node_modules/lodash/_baseEach.js
@@ -0,0 +1,14 @@
+var baseForOwn = require('./_baseForOwn'),
+ createBaseEach = require('./_createBaseEach');
+
+/**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+var baseEach = createBaseEach(baseForOwn);
+
+module.exports = baseEach;
diff --git a/node_modules/lodash/_baseEachRight.js b/node_modules/lodash/_baseEachRight.js
new file mode 100644
index 0000000..0a8feec
--- /dev/null
+++ b/node_modules/lodash/_baseEachRight.js
@@ -0,0 +1,14 @@
+var baseForOwnRight = require('./_baseForOwnRight'),
+ createBaseEach = require('./_createBaseEach');
+
+/**
+ * The base implementation of `_.forEachRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+var baseEachRight = createBaseEach(baseForOwnRight, true);
+
+module.exports = baseEachRight;
diff --git a/node_modules/lodash/_baseEvery.js b/node_modules/lodash/_baseEvery.js
new file mode 100644
index 0000000..fa52f7b
--- /dev/null
+++ b/node_modules/lodash/_baseEvery.js
@@ -0,0 +1,21 @@
+var baseEach = require('./_baseEach');
+
+/**
+ * The base implementation of `_.every` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`
+ */
+function baseEvery(collection, predicate) {
+ var result = true;
+ baseEach(collection, function(value, index, collection) {
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
+}
+
+module.exports = baseEvery;
diff --git a/node_modules/lodash/_baseExtremum.js b/node_modules/lodash/_baseExtremum.js
new file mode 100644
index 0000000..9d6aa77
--- /dev/null
+++ b/node_modules/lodash/_baseExtremum.js
@@ -0,0 +1,32 @@
+var isSymbol = require('./isSymbol');
+
+/**
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
+ * `comparator` to determine the extremum value.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The iteratee invoked per iteration.
+ * @param {Function} comparator The comparator used to compare values.
+ * @returns {*} Returns the extremum value.
+ */
+function baseExtremum(array, iteratee, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index],
+ current = iteratee(value);
+
+ if (current != null && (computed === undefined
+ ? (current === current && !isSymbol(current))
+ : comparator(current, computed)
+ )) {
+ var computed = current,
+ result = value;
+ }
+ }
+ return result;
+}
+
+module.exports = baseExtremum;
diff --git a/node_modules/lodash/_baseFill.js b/node_modules/lodash/_baseFill.js
new file mode 100644
index 0000000..46ef9c7
--- /dev/null
+++ b/node_modules/lodash/_baseFill.js
@@ -0,0 +1,32 @@
+var toInteger = require('./toInteger'),
+ toLength = require('./toLength');
+
+/**
+ * The base implementation of `_.fill` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ */
+function baseFill(array, value, start, end) {
+ var length = array.length;
+
+ start = toInteger(start);
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = (end === undefined || end > length) ? length : toInteger(end);
+ if (end < 0) {
+ end += length;
+ }
+ end = start > end ? 0 : toLength(end);
+ while (start < end) {
+ array[start++] = value;
+ }
+ return array;
+}
+
+module.exports = baseFill;
diff --git a/node_modules/lodash/_baseFilter.js b/node_modules/lodash/_baseFilter.js
new file mode 100644
index 0000000..4678477
--- /dev/null
+++ b/node_modules/lodash/_baseFilter.js
@@ -0,0 +1,21 @@
+var baseEach = require('./_baseEach');
+
+/**
+ * The base implementation of `_.filter` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+}
+
+module.exports = baseFilter;
diff --git a/node_modules/lodash/_baseFindIndex.js b/node_modules/lodash/_baseFindIndex.js
new file mode 100644
index 0000000..e3f5d8a
--- /dev/null
+++ b/node_modules/lodash/_baseFindIndex.js
@@ -0,0 +1,24 @@
+/**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 1 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+module.exports = baseFindIndex;
diff --git a/node_modules/lodash/_baseFindKey.js b/node_modules/lodash/_baseFindKey.js
new file mode 100644
index 0000000..2e430f3
--- /dev/null
+++ b/node_modules/lodash/_baseFindKey.js
@@ -0,0 +1,23 @@
+/**
+ * The base implementation of methods like `_.findKey` and `_.findLastKey`,
+ * without support for iteratee shorthands, which iterates over `collection`
+ * using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the found element or its key, else `undefined`.
+ */
+function baseFindKey(collection, predicate, eachFunc) {
+ var result;
+ eachFunc(collection, function(value, key, collection) {
+ if (predicate(value, key, collection)) {
+ result = key;
+ return false;
+ }
+ });
+ return result;
+}
+
+module.exports = baseFindKey;
diff --git a/node_modules/lodash/_baseFlatten.js b/node_modules/lodash/_baseFlatten.js
new file mode 100644
index 0000000..4b1e009
--- /dev/null
+++ b/node_modules/lodash/_baseFlatten.js
@@ -0,0 +1,38 @@
+var arrayPush = require('./_arrayPush'),
+ isFlattenable = require('./_isFlattenable');
+
+/**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+function baseFlatten(array, depth, predicate, isStrict, result) {
+ var index = -1,
+ length = array.length;
+
+ predicate || (predicate = isFlattenable);
+ result || (result = []);
+
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && predicate(value)) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+}
+
+module.exports = baseFlatten;
diff --git a/node_modules/lodash/_baseFor.js b/node_modules/lodash/_baseFor.js
new file mode 100644
index 0000000..d946590
--- /dev/null
+++ b/node_modules/lodash/_baseFor.js
@@ -0,0 +1,16 @@
+var createBaseFor = require('./_createBaseFor');
+
+/**
+ * The base implementation of `baseForOwn` which iterates over `object`
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+var baseFor = createBaseFor();
+
+module.exports = baseFor;
diff --git a/node_modules/lodash/_baseForOwn.js b/node_modules/lodash/_baseForOwn.js
new file mode 100644
index 0000000..503d523
--- /dev/null
+++ b/node_modules/lodash/_baseForOwn.js
@@ -0,0 +1,16 @@
+var baseFor = require('./_baseFor'),
+ keys = require('./keys');
+
+/**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+function baseForOwn(object, iteratee) {
+ return object && baseFor(object, iteratee, keys);
+}
+
+module.exports = baseForOwn;
diff --git a/node_modules/lodash/_baseForOwnRight.js b/node_modules/lodash/_baseForOwnRight.js
new file mode 100644
index 0000000..a4b10e6
--- /dev/null
+++ b/node_modules/lodash/_baseForOwnRight.js
@@ -0,0 +1,16 @@
+var baseForRight = require('./_baseForRight'),
+ keys = require('./keys');
+
+/**
+ * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+function baseForOwnRight(object, iteratee) {
+ return object && baseForRight(object, iteratee, keys);
+}
+
+module.exports = baseForOwnRight;
diff --git a/node_modules/lodash/_baseForRight.js b/node_modules/lodash/_baseForRight.js
new file mode 100644
index 0000000..32842cd
--- /dev/null
+++ b/node_modules/lodash/_baseForRight.js
@@ -0,0 +1,15 @@
+var createBaseFor = require('./_createBaseFor');
+
+/**
+ * This function is like `baseFor` except that it iterates over properties
+ * in the opposite order.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+var baseForRight = createBaseFor(true);
+
+module.exports = baseForRight;
diff --git a/node_modules/lodash/_baseFunctions.js b/node_modules/lodash/_baseFunctions.js
new file mode 100644
index 0000000..d23bc9b
--- /dev/null
+++ b/node_modules/lodash/_baseFunctions.js
@@ -0,0 +1,19 @@
+var arrayFilter = require('./_arrayFilter'),
+ isFunction = require('./isFunction');
+
+/**
+ * The base implementation of `_.functions` which creates an array of
+ * `object` function property names filtered from `props`.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} props The property names to filter.
+ * @returns {Array} Returns the function names.
+ */
+function baseFunctions(object, props) {
+ return arrayFilter(props, function(key) {
+ return isFunction(object[key]);
+ });
+}
+
+module.exports = baseFunctions;
diff --git a/node_modules/lodash/_baseGet.js b/node_modules/lodash/_baseGet.js
new file mode 100644
index 0000000..a194913
--- /dev/null
+++ b/node_modules/lodash/_baseGet.js
@@ -0,0 +1,24 @@
+var castPath = require('./_castPath'),
+ toKey = require('./_toKey');
+
+/**
+ * The base implementation of `_.get` without support for default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {*} Returns the resolved value.
+ */
+function baseGet(object, path) {
+ path = castPath(path, object);
+
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[toKey(path[index++])];
+ }
+ return (index && index == length) ? object : undefined;
+}
+
+module.exports = baseGet;
diff --git a/node_modules/lodash/_baseGetAllKeys.js b/node_modules/lodash/_baseGetAllKeys.js
new file mode 100644
index 0000000..8ad204e
--- /dev/null
+++ b/node_modules/lodash/_baseGetAllKeys.js
@@ -0,0 +1,20 @@
+var arrayPush = require('./_arrayPush'),
+ isArray = require('./isArray');
+
+/**
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+ var result = keysFunc(object);
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
+}
+
+module.exports = baseGetAllKeys;
diff --git a/node_modules/lodash/_baseGetTag.js b/node_modules/lodash/_baseGetTag.js
new file mode 100644
index 0000000..b927ccc
--- /dev/null
+++ b/node_modules/lodash/_baseGetTag.js
@@ -0,0 +1,28 @@
+var Symbol = require('./_Symbol'),
+ getRawTag = require('./_getRawTag'),
+ objectToString = require('./_objectToString');
+
+/** `Object#toString` result references. */
+var nullTag = '[object Null]',
+ undefinedTag = '[object Undefined]';
+
+/** Built-in value references. */
+var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+/**
+ * The base implementation of `getTag` without fallbacks for buggy environments.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+function baseGetTag(value) {
+ if (value == null) {
+ return value === undefined ? undefinedTag : nullTag;
+ }
+ return (symToStringTag && symToStringTag in Object(value))
+ ? getRawTag(value)
+ : objectToString(value);
+}
+
+module.exports = baseGetTag;
diff --git a/node_modules/lodash/_baseGt.js b/node_modules/lodash/_baseGt.js
new file mode 100644
index 0000000..502d273
--- /dev/null
+++ b/node_modules/lodash/_baseGt.js
@@ -0,0 +1,14 @@
+/**
+ * The base implementation of `_.gt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ */
+function baseGt(value, other) {
+ return value > other;
+}
+
+module.exports = baseGt;
diff --git a/node_modules/lodash/_baseHas.js b/node_modules/lodash/_baseHas.js
new file mode 100644
index 0000000..1b73032
--- /dev/null
+++ b/node_modules/lodash/_baseHas.js
@@ -0,0 +1,19 @@
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * The base implementation of `_.has` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+function baseHas(object, key) {
+ return object != null && hasOwnProperty.call(object, key);
+}
+
+module.exports = baseHas;
diff --git a/node_modules/lodash/_baseHasIn.js b/node_modules/lodash/_baseHasIn.js
new file mode 100644
index 0000000..2e0d042
--- /dev/null
+++ b/node_modules/lodash/_baseHasIn.js
@@ -0,0 +1,13 @@
+/**
+ * The base implementation of `_.hasIn` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+function baseHasIn(object, key) {
+ return object != null && key in Object(object);
+}
+
+module.exports = baseHasIn;
diff --git a/node_modules/lodash/_baseInRange.js b/node_modules/lodash/_baseInRange.js
new file mode 100644
index 0000000..ec95666
--- /dev/null
+++ b/node_modules/lodash/_baseInRange.js
@@ -0,0 +1,18 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max,
+ nativeMin = Math.min;
+
+/**
+ * The base implementation of `_.inRange` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {number} number The number to check.
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ */
+function baseInRange(number, start, end) {
+ return number >= nativeMin(start, end) && number < nativeMax(start, end);
+}
+
+module.exports = baseInRange;
diff --git a/node_modules/lodash/_baseIndexOf.js b/node_modules/lodash/_baseIndexOf.js
new file mode 100644
index 0000000..167e706
--- /dev/null
+++ b/node_modules/lodash/_baseIndexOf.js
@@ -0,0 +1,20 @@
+var baseFindIndex = require('./_baseFindIndex'),
+ baseIsNaN = require('./_baseIsNaN'),
+ strictIndexOf = require('./_strictIndexOf');
+
+/**
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseIndexOf(array, value, fromIndex) {
+ return value === value
+ ? strictIndexOf(array, value, fromIndex)
+ : baseFindIndex(array, baseIsNaN, fromIndex);
+}
+
+module.exports = baseIndexOf;
diff --git a/node_modules/lodash/_baseIndexOfWith.js b/node_modules/lodash/_baseIndexOfWith.js
new file mode 100644
index 0000000..f815fe0
--- /dev/null
+++ b/node_modules/lodash/_baseIndexOfWith.js
@@ -0,0 +1,23 @@
+/**
+ * This function is like `baseIndexOf` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseIndexOfWith(array, value, fromIndex, comparator) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (comparator(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+module.exports = baseIndexOfWith;
diff --git a/node_modules/lodash/_baseIntersection.js b/node_modules/lodash/_baseIntersection.js
new file mode 100644
index 0000000..c1d250c
--- /dev/null
+++ b/node_modules/lodash/_baseIntersection.js
@@ -0,0 +1,74 @@
+var SetCache = require('./_SetCache'),
+ arrayIncludes = require('./_arrayIncludes'),
+ arrayIncludesWith = require('./_arrayIncludesWith'),
+ arrayMap = require('./_arrayMap'),
+ baseUnary = require('./_baseUnary'),
+ cacheHas = require('./_cacheHas');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * The base implementation of methods like `_.intersection`, without support
+ * for iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of shared values.
+ */
+function baseIntersection(arrays, iteratee, comparator) {
+ var includes = comparator ? arrayIncludesWith : arrayIncludes,
+ length = arrays[0].length,
+ othLength = arrays.length,
+ othIndex = othLength,
+ caches = Array(othLength),
+ maxLength = Infinity,
+ result = [];
+
+ while (othIndex--) {
+ var array = arrays[othIndex];
+ if (othIndex && iteratee) {
+ array = arrayMap(array, baseUnary(iteratee));
+ }
+ maxLength = nativeMin(array.length, maxLength);
+ caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
+ ? new SetCache(othIndex && array)
+ : undefined;
+ }
+ array = arrays[0];
+
+ var index = -1,
+ seen = caches[0];
+
+ outer:
+ while (++index < length && result.length < maxLength) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (!(seen
+ ? cacheHas(seen, computed)
+ : includes(result, computed, comparator)
+ )) {
+ othIndex = othLength;
+ while (--othIndex) {
+ var cache = caches[othIndex];
+ if (!(cache
+ ? cacheHas(cache, computed)
+ : includes(arrays[othIndex], computed, comparator))
+ ) {
+ continue outer;
+ }
+ }
+ if (seen) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+}
+
+module.exports = baseIntersection;
diff --git a/node_modules/lodash/_baseInverter.js b/node_modules/lodash/_baseInverter.js
new file mode 100644
index 0000000..fbc337f
--- /dev/null
+++ b/node_modules/lodash/_baseInverter.js
@@ -0,0 +1,21 @@
+var baseForOwn = require('./_baseForOwn');
+
+/**
+ * The base implementation of `_.invert` and `_.invertBy` which inverts
+ * `object` with values transformed by `iteratee` and set by `setter`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform values.
+ * @param {Object} accumulator The initial inverted object.
+ * @returns {Function} Returns `accumulator`.
+ */
+function baseInverter(object, setter, iteratee, accumulator) {
+ baseForOwn(object, function(value, key, object) {
+ setter(accumulator, iteratee(value), key, object);
+ });
+ return accumulator;
+}
+
+module.exports = baseInverter;
diff --git a/node_modules/lodash/_baseInvoke.js b/node_modules/lodash/_baseInvoke.js
new file mode 100644
index 0000000..49bcf3c
--- /dev/null
+++ b/node_modules/lodash/_baseInvoke.js
@@ -0,0 +1,24 @@
+var apply = require('./_apply'),
+ castPath = require('./_castPath'),
+ last = require('./last'),
+ parent = require('./_parent'),
+ toKey = require('./_toKey');
+
+/**
+ * The base implementation of `_.invoke` without support for individual
+ * method arguments.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {Array} args The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ */
+function baseInvoke(object, path, args) {
+ path = castPath(path, object);
+ object = parent(object, path);
+ var func = object == null ? object : object[toKey(last(path))];
+ return func == null ? undefined : apply(func, object, args);
+}
+
+module.exports = baseInvoke;
diff --git a/node_modules/lodash/_baseIsArguments.js b/node_modules/lodash/_baseIsArguments.js
new file mode 100644
index 0000000..b3562cc
--- /dev/null
+++ b/node_modules/lodash/_baseIsArguments.js
@@ -0,0 +1,18 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]';
+
+/**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+function baseIsArguments(value) {
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
+}
+
+module.exports = baseIsArguments;
diff --git a/node_modules/lodash/_baseIsArrayBuffer.js b/node_modules/lodash/_baseIsArrayBuffer.js
new file mode 100644
index 0000000..a2c4f30
--- /dev/null
+++ b/node_modules/lodash/_baseIsArrayBuffer.js
@@ -0,0 +1,17 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+var arrayBufferTag = '[object ArrayBuffer]';
+
+/**
+ * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+ */
+function baseIsArrayBuffer(value) {
+ return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
+}
+
+module.exports = baseIsArrayBuffer;
diff --git a/node_modules/lodash/_baseIsDate.js b/node_modules/lodash/_baseIsDate.js
new file mode 100644
index 0000000..ba67c78
--- /dev/null
+++ b/node_modules/lodash/_baseIsDate.js
@@ -0,0 +1,18 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var dateTag = '[object Date]';
+
+/**
+ * The base implementation of `_.isDate` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ */
+function baseIsDate(value) {
+ return isObjectLike(value) && baseGetTag(value) == dateTag;
+}
+
+module.exports = baseIsDate;
diff --git a/node_modules/lodash/_baseIsEqual.js b/node_modules/lodash/_baseIsEqual.js
new file mode 100644
index 0000000..00a68a4
--- /dev/null
+++ b/node_modules/lodash/_baseIsEqual.js
@@ -0,0 +1,28 @@
+var baseIsEqualDeep = require('./_baseIsEqualDeep'),
+ isObjectLike = require('./isObjectLike');
+
+/**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+function baseIsEqual(value, other, bitmask, customizer, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
+}
+
+module.exports = baseIsEqual;
diff --git a/node_modules/lodash/_baseIsEqualDeep.js b/node_modules/lodash/_baseIsEqualDeep.js
new file mode 100644
index 0000000..e3cfd6a
--- /dev/null
+++ b/node_modules/lodash/_baseIsEqualDeep.js
@@ -0,0 +1,83 @@
+var Stack = require('./_Stack'),
+ equalArrays = require('./_equalArrays'),
+ equalByTag = require('./_equalByTag'),
+ equalObjects = require('./_equalObjects'),
+ getTag = require('./_getTag'),
+ isArray = require('./isArray'),
+ isBuffer = require('./isBuffer'),
+ isTypedArray = require('./isTypedArray');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1;
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ objectTag = '[object Object]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = objIsArr ? arrayTag : getTag(object),
+ othTag = othIsArr ? arrayTag : getTag(other);
+
+ objTag = objTag == argsTag ? objectTag : objTag;
+ othTag = othTag == argsTag ? objectTag : othTag;
+
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && isBuffer(object)) {
+ if (!isBuffer(other)) {
+ return false;
+ }
+ objIsArr = true;
+ objIsObj = false;
+ }
+ if (isSameTag && !objIsObj) {
+ stack || (stack = new Stack);
+ return (objIsArr || isTypedArray(object))
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
+ }
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ stack || (stack = new Stack);
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stack || (stack = new Stack);
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
+}
+
+module.exports = baseIsEqualDeep;
diff --git a/node_modules/lodash/_baseIsMap.js b/node_modules/lodash/_baseIsMap.js
new file mode 100644
index 0000000..02a4021
--- /dev/null
+++ b/node_modules/lodash/_baseIsMap.js
@@ -0,0 +1,18 @@
+var getTag = require('./_getTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]';
+
+/**
+ * The base implementation of `_.isMap` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ */
+function baseIsMap(value) {
+ return isObjectLike(value) && getTag(value) == mapTag;
+}
+
+module.exports = baseIsMap;
diff --git a/node_modules/lodash/_baseIsMatch.js b/node_modules/lodash/_baseIsMatch.js
new file mode 100644
index 0000000..72494be
--- /dev/null
+++ b/node_modules/lodash/_baseIsMatch.js
@@ -0,0 +1,62 @@
+var Stack = require('./_Stack'),
+ baseIsEqual = require('./_baseIsEqual');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+/**
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Array} matchData The property names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+function baseIsMatch(object, source, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
+
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
+
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var stack = new Stack;
+ if (customizer) {
+ var result = customizer(objValue, srcValue, key, object, source, stack);
+ }
+ if (!(result === undefined
+ ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
+ : result
+ )) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+module.exports = baseIsMatch;
diff --git a/node_modules/lodash/_baseIsNaN.js b/node_modules/lodash/_baseIsNaN.js
new file mode 100644
index 0000000..316f1eb
--- /dev/null
+++ b/node_modules/lodash/_baseIsNaN.js
@@ -0,0 +1,12 @@
+/**
+ * The base implementation of `_.isNaN` without support for number objects.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ */
+function baseIsNaN(value) {
+ return value !== value;
+}
+
+module.exports = baseIsNaN;
diff --git a/node_modules/lodash/_baseIsNative.js b/node_modules/lodash/_baseIsNative.js
new file mode 100644
index 0000000..8702330
--- /dev/null
+++ b/node_modules/lodash/_baseIsNative.js
@@ -0,0 +1,47 @@
+var isFunction = require('./isFunction'),
+ isMasked = require('./_isMasked'),
+ isObject = require('./isObject'),
+ toSource = require('./_toSource');
+
+/**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+
+/** Used to detect host constructors (Safari). */
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+/** Used for built-in method references. */
+var funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/** Used to detect if a method is native. */
+var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+);
+
+/**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ */
+function baseIsNative(value) {
+ if (!isObject(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+}
+
+module.exports = baseIsNative;
diff --git a/node_modules/lodash/_baseIsRegExp.js b/node_modules/lodash/_baseIsRegExp.js
new file mode 100644
index 0000000..6cd7c1a
--- /dev/null
+++ b/node_modules/lodash/_baseIsRegExp.js
@@ -0,0 +1,18 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var regexpTag = '[object RegExp]';
+
+/**
+ * The base implementation of `_.isRegExp` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ */
+function baseIsRegExp(value) {
+ return isObjectLike(value) && baseGetTag(value) == regexpTag;
+}
+
+module.exports = baseIsRegExp;
diff --git a/node_modules/lodash/_baseIsSet.js b/node_modules/lodash/_baseIsSet.js
new file mode 100644
index 0000000..6dee367
--- /dev/null
+++ b/node_modules/lodash/_baseIsSet.js
@@ -0,0 +1,18 @@
+var getTag = require('./_getTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var setTag = '[object Set]';
+
+/**
+ * The base implementation of `_.isSet` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ */
+function baseIsSet(value) {
+ return isObjectLike(value) && getTag(value) == setTag;
+}
+
+module.exports = baseIsSet;
diff --git a/node_modules/lodash/_baseIsTypedArray.js b/node_modules/lodash/_baseIsTypedArray.js
new file mode 100644
index 0000000..1edb32f
--- /dev/null
+++ b/node_modules/lodash/_baseIsTypedArray.js
@@ -0,0 +1,60 @@
+var baseGetTag = require('./_baseGetTag'),
+ isLength = require('./isLength'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ weakMapTag = '[object WeakMap]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+/** Used to identify `toStringTag` values of typed arrays. */
+var typedArrayTags = {};
+typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+typedArrayTags[uint32Tag] = true;
+typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+typedArrayTags[setTag] = typedArrayTags[stringTag] =
+typedArrayTags[weakMapTag] = false;
+
+/**
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ */
+function baseIsTypedArray(value) {
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
+}
+
+module.exports = baseIsTypedArray;
diff --git a/node_modules/lodash/_baseIteratee.js b/node_modules/lodash/_baseIteratee.js
new file mode 100644
index 0000000..995c257
--- /dev/null
+++ b/node_modules/lodash/_baseIteratee.js
@@ -0,0 +1,31 @@
+var baseMatches = require('./_baseMatches'),
+ baseMatchesProperty = require('./_baseMatchesProperty'),
+ identity = require('./identity'),
+ isArray = require('./isArray'),
+ property = require('./property');
+
+/**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+function baseIteratee(value) {
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
+ if (typeof value == 'function') {
+ return value;
+ }
+ if (value == null) {
+ return identity;
+ }
+ if (typeof value == 'object') {
+ return isArray(value)
+ ? baseMatchesProperty(value[0], value[1])
+ : baseMatches(value);
+ }
+ return property(value);
+}
+
+module.exports = baseIteratee;
diff --git a/node_modules/lodash/_baseKeys.js b/node_modules/lodash/_baseKeys.js
new file mode 100644
index 0000000..45e9e6f
--- /dev/null
+++ b/node_modules/lodash/_baseKeys.js
@@ -0,0 +1,30 @@
+var isPrototype = require('./_isPrototype'),
+ nativeKeys = require('./_nativeKeys');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function baseKeys(object) {
+ if (!isPrototype(object)) {
+ return nativeKeys(object);
+ }
+ var result = [];
+ for (var key in Object(object)) {
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+module.exports = baseKeys;
diff --git a/node_modules/lodash/_baseKeysIn.js b/node_modules/lodash/_baseKeysIn.js
new file mode 100644
index 0000000..ea8a0a1
--- /dev/null
+++ b/node_modules/lodash/_baseKeysIn.js
@@ -0,0 +1,33 @@
+var isObject = require('./isObject'),
+ isPrototype = require('./_isPrototype'),
+ nativeKeysIn = require('./_nativeKeysIn');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function baseKeysIn(object) {
+ if (!isObject(object)) {
+ return nativeKeysIn(object);
+ }
+ var isProto = isPrototype(object),
+ result = [];
+
+ for (var key in object) {
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+module.exports = baseKeysIn;
diff --git a/node_modules/lodash/_baseLodash.js b/node_modules/lodash/_baseLodash.js
new file mode 100644
index 0000000..f76c790
--- /dev/null
+++ b/node_modules/lodash/_baseLodash.js
@@ -0,0 +1,10 @@
+/**
+ * The function whose prototype chain sequence wrappers inherit from.
+ *
+ * @private
+ */
+function baseLodash() {
+ // No operation performed.
+}
+
+module.exports = baseLodash;
diff --git a/node_modules/lodash/_baseLt.js b/node_modules/lodash/_baseLt.js
new file mode 100644
index 0000000..8674d29
--- /dev/null
+++ b/node_modules/lodash/_baseLt.js
@@ -0,0 +1,14 @@
+/**
+ * The base implementation of `_.lt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ */
+function baseLt(value, other) {
+ return value < other;
+}
+
+module.exports = baseLt;
diff --git a/node_modules/lodash/_baseMap.js b/node_modules/lodash/_baseMap.js
new file mode 100644
index 0000000..0bf5cea
--- /dev/null
+++ b/node_modules/lodash/_baseMap.js
@@ -0,0 +1,22 @@
+var baseEach = require('./_baseEach'),
+ isArrayLike = require('./isArrayLike');
+
+/**
+ * The base implementation of `_.map` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+}
+
+module.exports = baseMap;
diff --git a/node_modules/lodash/_baseMatches.js b/node_modules/lodash/_baseMatches.js
new file mode 100644
index 0000000..e56582a
--- /dev/null
+++ b/node_modules/lodash/_baseMatches.js
@@ -0,0 +1,22 @@
+var baseIsMatch = require('./_baseIsMatch'),
+ getMatchData = require('./_getMatchData'),
+ matchesStrictComparable = require('./_matchesStrictComparable');
+
+/**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function baseMatches(source) {
+ var matchData = getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
+ }
+ return function(object) {
+ return object === source || baseIsMatch(object, source, matchData);
+ };
+}
+
+module.exports = baseMatches;
diff --git a/node_modules/lodash/_baseMatchesProperty.js b/node_modules/lodash/_baseMatchesProperty.js
new file mode 100644
index 0000000..24afd89
--- /dev/null
+++ b/node_modules/lodash/_baseMatchesProperty.js
@@ -0,0 +1,33 @@
+var baseIsEqual = require('./_baseIsEqual'),
+ get = require('./get'),
+ hasIn = require('./hasIn'),
+ isKey = require('./_isKey'),
+ isStrictComparable = require('./_isStrictComparable'),
+ matchesStrictComparable = require('./_matchesStrictComparable'),
+ toKey = require('./_toKey');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+/**
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function baseMatchesProperty(path, srcValue) {
+ if (isKey(path) && isStrictComparable(srcValue)) {
+ return matchesStrictComparable(toKey(path), srcValue);
+ }
+ return function(object) {
+ var objValue = get(object, path);
+ return (objValue === undefined && objValue === srcValue)
+ ? hasIn(object, path)
+ : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
+ };
+}
+
+module.exports = baseMatchesProperty;
diff --git a/node_modules/lodash/_baseMean.js b/node_modules/lodash/_baseMean.js
new file mode 100644
index 0000000..fa9e00a
--- /dev/null
+++ b/node_modules/lodash/_baseMean.js
@@ -0,0 +1,20 @@
+var baseSum = require('./_baseSum');
+
+/** Used as references for various `Number` constants. */
+var NAN = 0 / 0;
+
+/**
+ * The base implementation of `_.mean` and `_.meanBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the mean.
+ */
+function baseMean(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+ return length ? (baseSum(array, iteratee) / length) : NAN;
+}
+
+module.exports = baseMean;
diff --git a/node_modules/lodash/_baseMerge.js b/node_modules/lodash/_baseMerge.js
new file mode 100644
index 0000000..c98b5eb
--- /dev/null
+++ b/node_modules/lodash/_baseMerge.js
@@ -0,0 +1,42 @@
+var Stack = require('./_Stack'),
+ assignMergeValue = require('./_assignMergeValue'),
+ baseFor = require('./_baseFor'),
+ baseMergeDeep = require('./_baseMergeDeep'),
+ isObject = require('./isObject'),
+ keysIn = require('./keysIn'),
+ safeGet = require('./_safeGet');
+
+/**
+ * The base implementation of `_.merge` without support for multiple sources.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} [customizer] The function to customize merged values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+function baseMerge(object, source, srcIndex, customizer, stack) {
+ if (object === source) {
+ return;
+ }
+ baseFor(source, function(srcValue, key) {
+ stack || (stack = new Stack);
+ if (isObject(srcValue)) {
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
+ }
+ else {
+ var newValue = customizer
+ ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = srcValue;
+ }
+ assignMergeValue(object, key, newValue);
+ }
+ }, keysIn);
+}
+
+module.exports = baseMerge;
diff --git a/node_modules/lodash/_baseMergeDeep.js b/node_modules/lodash/_baseMergeDeep.js
new file mode 100644
index 0000000..4679e8d
--- /dev/null
+++ b/node_modules/lodash/_baseMergeDeep.js
@@ -0,0 +1,94 @@
+var assignMergeValue = require('./_assignMergeValue'),
+ cloneBuffer = require('./_cloneBuffer'),
+ cloneTypedArray = require('./_cloneTypedArray'),
+ copyArray = require('./_copyArray'),
+ initCloneObject = require('./_initCloneObject'),
+ isArguments = require('./isArguments'),
+ isArray = require('./isArray'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ isBuffer = require('./isBuffer'),
+ isFunction = require('./isFunction'),
+ isObject = require('./isObject'),
+ isPlainObject = require('./isPlainObject'),
+ isTypedArray = require('./isTypedArray'),
+ safeGet = require('./_safeGet'),
+ toPlainObject = require('./toPlainObject');
+
+/**
+ * A specialized version of `baseMerge` for arrays and objects which performs
+ * deep merges and tracks traversed objects enabling objects with circular
+ * references to be merged.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {string} key The key of the value to merge.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} mergeFunc The function to merge values.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
+ var objValue = safeGet(object, key),
+ srcValue = safeGet(source, key),
+ stacked = stack.get(srcValue);
+
+ if (stacked) {
+ assignMergeValue(object, key, stacked);
+ return;
+ }
+ var newValue = customizer
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ var isCommon = newValue === undefined;
+
+ if (isCommon) {
+ var isArr = isArray(srcValue),
+ isBuff = !isArr && isBuffer(srcValue),
+ isTyped = !isArr && !isBuff && isTypedArray(srcValue);
+
+ newValue = srcValue;
+ if (isArr || isBuff || isTyped) {
+ if (isArray(objValue)) {
+ newValue = objValue;
+ }
+ else if (isArrayLikeObject(objValue)) {
+ newValue = copyArray(objValue);
+ }
+ else if (isBuff) {
+ isCommon = false;
+ newValue = cloneBuffer(srcValue, true);
+ }
+ else if (isTyped) {
+ isCommon = false;
+ newValue = cloneTypedArray(srcValue, true);
+ }
+ else {
+ newValue = [];
+ }
+ }
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ newValue = objValue;
+ if (isArguments(objValue)) {
+ newValue = toPlainObject(objValue);
+ }
+ else if (!isObject(objValue) || isFunction(objValue)) {
+ newValue = initCloneObject(srcValue);
+ }
+ }
+ else {
+ isCommon = false;
+ }
+ }
+ if (isCommon) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, newValue);
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
+ stack['delete'](srcValue);
+ }
+ assignMergeValue(object, key, newValue);
+}
+
+module.exports = baseMergeDeep;
diff --git a/node_modules/lodash/_baseNth.js b/node_modules/lodash/_baseNth.js
new file mode 100644
index 0000000..0403c2a
--- /dev/null
+++ b/node_modules/lodash/_baseNth.js
@@ -0,0 +1,20 @@
+var isIndex = require('./_isIndex');
+
+/**
+ * The base implementation of `_.nth` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {number} n The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ */
+function baseNth(array, n) {
+ var length = array.length;
+ if (!length) {
+ return;
+ }
+ n += n < 0 ? length : 0;
+ return isIndex(n, length) ? array[n] : undefined;
+}
+
+module.exports = baseNth;
diff --git a/node_modules/lodash/_baseOrderBy.js b/node_modules/lodash/_baseOrderBy.js
new file mode 100644
index 0000000..775a017
--- /dev/null
+++ b/node_modules/lodash/_baseOrderBy.js
@@ -0,0 +1,49 @@
+var arrayMap = require('./_arrayMap'),
+ baseGet = require('./_baseGet'),
+ baseIteratee = require('./_baseIteratee'),
+ baseMap = require('./_baseMap'),
+ baseSortBy = require('./_baseSortBy'),
+ baseUnary = require('./_baseUnary'),
+ compareMultiple = require('./_compareMultiple'),
+ identity = require('./identity'),
+ isArray = require('./isArray');
+
+/**
+ * The base implementation of `_.orderBy` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+ * @param {string[]} orders The sort orders of `iteratees`.
+ * @returns {Array} Returns the new sorted array.
+ */
+function baseOrderBy(collection, iteratees, orders) {
+ if (iteratees.length) {
+ iteratees = arrayMap(iteratees, function(iteratee) {
+ if (isArray(iteratee)) {
+ return function(value) {
+ return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
+ }
+ }
+ return iteratee;
+ });
+ } else {
+ iteratees = [identity];
+ }
+
+ var index = -1;
+ iteratees = arrayMap(iteratees, baseUnary(baseIteratee));
+
+ var result = baseMap(collection, function(value, key, collection) {
+ var criteria = arrayMap(iteratees, function(iteratee) {
+ return iteratee(value);
+ });
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
+ });
+
+ return baseSortBy(result, function(object, other) {
+ return compareMultiple(object, other, orders);
+ });
+}
+
+module.exports = baseOrderBy;
diff --git a/node_modules/lodash/_basePick.js b/node_modules/lodash/_basePick.js
new file mode 100644
index 0000000..09b458a
--- /dev/null
+++ b/node_modules/lodash/_basePick.js
@@ -0,0 +1,19 @@
+var basePickBy = require('./_basePickBy'),
+ hasIn = require('./hasIn');
+
+/**
+ * The base implementation of `_.pick` without support for individual
+ * property identifiers.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Object} Returns the new object.
+ */
+function basePick(object, paths) {
+ return basePickBy(object, paths, function(value, path) {
+ return hasIn(object, path);
+ });
+}
+
+module.exports = basePick;
diff --git a/node_modules/lodash/_basePickBy.js b/node_modules/lodash/_basePickBy.js
new file mode 100644
index 0000000..85be68c
--- /dev/null
+++ b/node_modules/lodash/_basePickBy.js
@@ -0,0 +1,30 @@
+var baseGet = require('./_baseGet'),
+ baseSet = require('./_baseSet'),
+ castPath = require('./_castPath');
+
+/**
+ * The base implementation of `_.pickBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @param {Function} predicate The function invoked per property.
+ * @returns {Object} Returns the new object.
+ */
+function basePickBy(object, paths, predicate) {
+ var index = -1,
+ length = paths.length,
+ result = {};
+
+ while (++index < length) {
+ var path = paths[index],
+ value = baseGet(object, path);
+
+ if (predicate(value, path)) {
+ baseSet(result, castPath(path, object), value);
+ }
+ }
+ return result;
+}
+
+module.exports = basePickBy;
diff --git a/node_modules/lodash/_baseProperty.js b/node_modules/lodash/_baseProperty.js
new file mode 100644
index 0000000..496281e
--- /dev/null
+++ b/node_modules/lodash/_baseProperty.js
@@ -0,0 +1,14 @@
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+module.exports = baseProperty;
diff --git a/node_modules/lodash/_basePropertyDeep.js b/node_modules/lodash/_basePropertyDeep.js
new file mode 100644
index 0000000..1e5aae5
--- /dev/null
+++ b/node_modules/lodash/_basePropertyDeep.js
@@ -0,0 +1,16 @@
+var baseGet = require('./_baseGet');
+
+/**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+function basePropertyDeep(path) {
+ return function(object) {
+ return baseGet(object, path);
+ };
+}
+
+module.exports = basePropertyDeep;
diff --git a/node_modules/lodash/_basePropertyOf.js b/node_modules/lodash/_basePropertyOf.js
new file mode 100644
index 0000000..4617399
--- /dev/null
+++ b/node_modules/lodash/_basePropertyOf.js
@@ -0,0 +1,14 @@
+/**
+ * The base implementation of `_.propertyOf` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ */
+function basePropertyOf(object) {
+ return function(key) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+module.exports = basePropertyOf;
diff --git a/node_modules/lodash/_basePullAll.js b/node_modules/lodash/_basePullAll.js
new file mode 100644
index 0000000..305720e
--- /dev/null
+++ b/node_modules/lodash/_basePullAll.js
@@ -0,0 +1,51 @@
+var arrayMap = require('./_arrayMap'),
+ baseIndexOf = require('./_baseIndexOf'),
+ baseIndexOfWith = require('./_baseIndexOfWith'),
+ baseUnary = require('./_baseUnary'),
+ copyArray = require('./_copyArray');
+
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/** Built-in value references. */
+var splice = arrayProto.splice;
+
+/**
+ * The base implementation of `_.pullAllBy` without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ */
+function basePullAll(array, values, iteratee, comparator) {
+ var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
+ index = -1,
+ length = values.length,
+ seen = array;
+
+ if (array === values) {
+ values = copyArray(values);
+ }
+ if (iteratee) {
+ seen = arrayMap(array, baseUnary(iteratee));
+ }
+ while (++index < length) {
+ var fromIndex = 0,
+ value = values[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
+ if (seen !== array) {
+ splice.call(seen, fromIndex, 1);
+ }
+ splice.call(array, fromIndex, 1);
+ }
+ }
+ return array;
+}
+
+module.exports = basePullAll;
diff --git a/node_modules/lodash/_basePullAt.js b/node_modules/lodash/_basePullAt.js
new file mode 100644
index 0000000..c3e9e71
--- /dev/null
+++ b/node_modules/lodash/_basePullAt.js
@@ -0,0 +1,37 @@
+var baseUnset = require('./_baseUnset'),
+ isIndex = require('./_isIndex');
+
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/** Built-in value references. */
+var splice = arrayProto.splice;
+
+/**
+ * The base implementation of `_.pullAt` without support for individual
+ * indexes or capturing the removed elements.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {number[]} indexes The indexes of elements to remove.
+ * @returns {Array} Returns `array`.
+ */
+function basePullAt(array, indexes) {
+ var length = array ? indexes.length : 0,
+ lastIndex = length - 1;
+
+ while (length--) {
+ var index = indexes[length];
+ if (length == lastIndex || index !== previous) {
+ var previous = index;
+ if (isIndex(index)) {
+ splice.call(array, index, 1);
+ } else {
+ baseUnset(array, index);
+ }
+ }
+ }
+ return array;
+}
+
+module.exports = basePullAt;
diff --git a/node_modules/lodash/_baseRandom.js b/node_modules/lodash/_baseRandom.js
new file mode 100644
index 0000000..94f76a7
--- /dev/null
+++ b/node_modules/lodash/_baseRandom.js
@@ -0,0 +1,18 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeFloor = Math.floor,
+ nativeRandom = Math.random;
+
+/**
+ * The base implementation of `_.random` without support for returning
+ * floating-point numbers.
+ *
+ * @private
+ * @param {number} lower The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the random number.
+ */
+function baseRandom(lower, upper) {
+ return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
+}
+
+module.exports = baseRandom;
diff --git a/node_modules/lodash/_baseRange.js b/node_modules/lodash/_baseRange.js
new file mode 100644
index 0000000..0fb8e41
--- /dev/null
+++ b/node_modules/lodash/_baseRange.js
@@ -0,0 +1,28 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeCeil = Math.ceil,
+ nativeMax = Math.max;
+
+/**
+ * The base implementation of `_.range` and `_.rangeRight` which doesn't
+ * coerce arguments.
+ *
+ * @private
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} step The value to increment or decrement by.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the range of numbers.
+ */
+function baseRange(start, end, step, fromRight) {
+ var index = -1,
+ length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
+ result = Array(length);
+
+ while (length--) {
+ result[fromRight ? length : ++index] = start;
+ start += step;
+ }
+ return result;
+}
+
+module.exports = baseRange;
diff --git a/node_modules/lodash/_baseReduce.js b/node_modules/lodash/_baseReduce.js
new file mode 100644
index 0000000..5a1f8b5
--- /dev/null
+++ b/node_modules/lodash/_baseReduce.js
@@ -0,0 +1,23 @@
+/**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+}
+
+module.exports = baseReduce;
diff --git a/node_modules/lodash/_baseRepeat.js b/node_modules/lodash/_baseRepeat.js
new file mode 100644
index 0000000..ee44c31
--- /dev/null
+++ b/node_modules/lodash/_baseRepeat.js
@@ -0,0 +1,35 @@
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeFloor = Math.floor;
+
+/**
+ * The base implementation of `_.repeat` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {string} string The string to repeat.
+ * @param {number} n The number of times to repeat the string.
+ * @returns {string} Returns the repeated string.
+ */
+function baseRepeat(string, n) {
+ var result = '';
+ if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
+ return result;
+ }
+ // Leverage the exponentiation by squaring algorithm for a faster repeat.
+ // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
+ do {
+ if (n % 2) {
+ result += string;
+ }
+ n = nativeFloor(n / 2);
+ if (n) {
+ string += string;
+ }
+ } while (n);
+
+ return result;
+}
+
+module.exports = baseRepeat;
diff --git a/node_modules/lodash/_baseRest.js b/node_modules/lodash/_baseRest.js
new file mode 100644
index 0000000..d0dc4bd
--- /dev/null
+++ b/node_modules/lodash/_baseRest.js
@@ -0,0 +1,17 @@
+var identity = require('./identity'),
+ overRest = require('./_overRest'),
+ setToString = require('./_setToString');
+
+/**
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ */
+function baseRest(func, start) {
+ return setToString(overRest(func, start, identity), func + '');
+}
+
+module.exports = baseRest;
diff --git a/node_modules/lodash/_baseSample.js b/node_modules/lodash/_baseSample.js
new file mode 100644
index 0000000..58582b9
--- /dev/null
+++ b/node_modules/lodash/_baseSample.js
@@ -0,0 +1,15 @@
+var arraySample = require('./_arraySample'),
+ values = require('./values');
+
+/**
+ * The base implementation of `_.sample`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ */
+function baseSample(collection) {
+ return arraySample(values(collection));
+}
+
+module.exports = baseSample;
diff --git a/node_modules/lodash/_baseSampleSize.js b/node_modules/lodash/_baseSampleSize.js
new file mode 100644
index 0000000..5c90ec5
--- /dev/null
+++ b/node_modules/lodash/_baseSampleSize.js
@@ -0,0 +1,18 @@
+var baseClamp = require('./_baseClamp'),
+ shuffleSelf = require('./_shuffleSelf'),
+ values = require('./values');
+
+/**
+ * The base implementation of `_.sampleSize` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+function baseSampleSize(collection, n) {
+ var array = values(collection);
+ return shuffleSelf(array, baseClamp(n, 0, array.length));
+}
+
+module.exports = baseSampleSize;
diff --git a/node_modules/lodash/_baseSet.js b/node_modules/lodash/_baseSet.js
new file mode 100644
index 0000000..99f4fbf
--- /dev/null
+++ b/node_modules/lodash/_baseSet.js
@@ -0,0 +1,51 @@
+var assignValue = require('./_assignValue'),
+ castPath = require('./_castPath'),
+ isIndex = require('./_isIndex'),
+ isObject = require('./isObject'),
+ toKey = require('./_toKey');
+
+/**
+ * The base implementation of `_.set`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+function baseSet(object, path, value, customizer) {
+ if (!isObject(object)) {
+ return object;
+ }
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ nested = object;
+
+ while (nested != null && ++index < length) {
+ var key = toKey(path[index]),
+ newValue = value;
+
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
+ return object;
+ }
+
+ if (index != lastIndex) {
+ var objValue = nested[key];
+ newValue = customizer ? customizer(objValue, key, nested) : undefined;
+ if (newValue === undefined) {
+ newValue = isObject(objValue)
+ ? objValue
+ : (isIndex(path[index + 1]) ? [] : {});
+ }
+ }
+ assignValue(nested, key, newValue);
+ nested = nested[key];
+ }
+ return object;
+}
+
+module.exports = baseSet;
diff --git a/node_modules/lodash/_baseSetData.js b/node_modules/lodash/_baseSetData.js
new file mode 100644
index 0000000..c409947
--- /dev/null
+++ b/node_modules/lodash/_baseSetData.js
@@ -0,0 +1,17 @@
+var identity = require('./identity'),
+ metaMap = require('./_metaMap');
+
+/**
+ * The base implementation of `setData` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+var baseSetData = !metaMap ? identity : function(func, data) {
+ metaMap.set(func, data);
+ return func;
+};
+
+module.exports = baseSetData;
diff --git a/node_modules/lodash/_baseSetToString.js b/node_modules/lodash/_baseSetToString.js
new file mode 100644
index 0000000..89eaca3
--- /dev/null
+++ b/node_modules/lodash/_baseSetToString.js
@@ -0,0 +1,22 @@
+var constant = require('./constant'),
+ defineProperty = require('./_defineProperty'),
+ identity = require('./identity');
+
+/**
+ * The base implementation of `setToString` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+var baseSetToString = !defineProperty ? identity : function(func, string) {
+ return defineProperty(func, 'toString', {
+ 'configurable': true,
+ 'enumerable': false,
+ 'value': constant(string),
+ 'writable': true
+ });
+};
+
+module.exports = baseSetToString;
diff --git a/node_modules/lodash/_baseShuffle.js b/node_modules/lodash/_baseShuffle.js
new file mode 100644
index 0000000..023077a
--- /dev/null
+++ b/node_modules/lodash/_baseShuffle.js
@@ -0,0 +1,15 @@
+var shuffleSelf = require('./_shuffleSelf'),
+ values = require('./values');
+
+/**
+ * The base implementation of `_.shuffle`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+function baseShuffle(collection) {
+ return shuffleSelf(values(collection));
+}
+
+module.exports = baseShuffle;
diff --git a/node_modules/lodash/_baseSlice.js b/node_modules/lodash/_baseSlice.js
new file mode 100644
index 0000000..786f6c9
--- /dev/null
+++ b/node_modules/lodash/_baseSlice.js
@@ -0,0 +1,31 @@
+/**
+ * The base implementation of `_.slice` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = end > length ? length : end;
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+}
+
+module.exports = baseSlice;
diff --git a/node_modules/lodash/_baseSome.js b/node_modules/lodash/_baseSome.js
new file mode 100644
index 0000000..58f3f44
--- /dev/null
+++ b/node_modules/lodash/_baseSome.js
@@ -0,0 +1,22 @@
+var baseEach = require('./_baseEach');
+
+/**
+ * The base implementation of `_.some` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+}
+
+module.exports = baseSome;
diff --git a/node_modules/lodash/_baseSortBy.js b/node_modules/lodash/_baseSortBy.js
new file mode 100644
index 0000000..a25c92e
--- /dev/null
+++ b/node_modules/lodash/_baseSortBy.js
@@ -0,0 +1,21 @@
+/**
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
+ * sort order of `array` and replaces criteria objects with their corresponding
+ * values.
+ *
+ * @private
+ * @param {Array} array The array to sort.
+ * @param {Function} comparer The function to define sort order.
+ * @returns {Array} Returns `array`.
+ */
+function baseSortBy(array, comparer) {
+ var length = array.length;
+
+ array.sort(comparer);
+ while (length--) {
+ array[length] = array[length].value;
+ }
+ return array;
+}
+
+module.exports = baseSortBy;
diff --git a/node_modules/lodash/_baseSortedIndex.js b/node_modules/lodash/_baseSortedIndex.js
new file mode 100644
index 0000000..638c366
--- /dev/null
+++ b/node_modules/lodash/_baseSortedIndex.js
@@ -0,0 +1,42 @@
+var baseSortedIndexBy = require('./_baseSortedIndexBy'),
+ identity = require('./identity'),
+ isSymbol = require('./isSymbol');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295,
+ HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+
+/**
+ * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
+ * performs a binary search of `array` to determine the index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+function baseSortedIndex(array, value, retHighest) {
+ var low = 0,
+ high = array == null ? low : array.length;
+
+ if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
+ while (low < high) {
+ var mid = (low + high) >>> 1,
+ computed = array[mid];
+
+ if (computed !== null && !isSymbol(computed) &&
+ (retHighest ? (computed <= value) : (computed < value))) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return high;
+ }
+ return baseSortedIndexBy(array, value, identity, retHighest);
+}
+
+module.exports = baseSortedIndex;
diff --git a/node_modules/lodash/_baseSortedIndexBy.js b/node_modules/lodash/_baseSortedIndexBy.js
new file mode 100644
index 0000000..c247b37
--- /dev/null
+++ b/node_modules/lodash/_baseSortedIndexBy.js
@@ -0,0 +1,67 @@
+var isSymbol = require('./isSymbol');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295,
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeFloor = Math.floor,
+ nativeMin = Math.min;
+
+/**
+ * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
+ * which invokes `iteratee` for `value` and each element of `array` to compute
+ * their sort ranking. The iteratee is invoked with one argument; (value).
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} iteratee The iteratee invoked per element.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+function baseSortedIndexBy(array, value, iteratee, retHighest) {
+ var low = 0,
+ high = array == null ? 0 : array.length;
+ if (high === 0) {
+ return 0;
+ }
+
+ value = iteratee(value);
+ var valIsNaN = value !== value,
+ valIsNull = value === null,
+ valIsSymbol = isSymbol(value),
+ valIsUndefined = value === undefined;
+
+ while (low < high) {
+ var mid = nativeFloor((low + high) / 2),
+ computed = iteratee(array[mid]),
+ othIsDefined = computed !== undefined,
+ othIsNull = computed === null,
+ othIsReflexive = computed === computed,
+ othIsSymbol = isSymbol(computed);
+
+ if (valIsNaN) {
+ var setLow = retHighest || othIsReflexive;
+ } else if (valIsUndefined) {
+ setLow = othIsReflexive && (retHighest || othIsDefined);
+ } else if (valIsNull) {
+ setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
+ } else if (valIsSymbol) {
+ setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
+ } else if (othIsNull || othIsSymbol) {
+ setLow = false;
+ } else {
+ setLow = retHighest ? (computed <= value) : (computed < value);
+ }
+ if (setLow) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return nativeMin(high, MAX_ARRAY_INDEX);
+}
+
+module.exports = baseSortedIndexBy;
diff --git a/node_modules/lodash/_baseSortedUniq.js b/node_modules/lodash/_baseSortedUniq.js
new file mode 100644
index 0000000..802159a
--- /dev/null
+++ b/node_modules/lodash/_baseSortedUniq.js
@@ -0,0 +1,30 @@
+var eq = require('./eq');
+
+/**
+ * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+function baseSortedUniq(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ if (!index || !eq(computed, seen)) {
+ var seen = computed;
+ result[resIndex++] = value === 0 ? 0 : value;
+ }
+ }
+ return result;
+}
+
+module.exports = baseSortedUniq;
diff --git a/node_modules/lodash/_baseSum.js b/node_modules/lodash/_baseSum.js
new file mode 100644
index 0000000..a9e84c1
--- /dev/null
+++ b/node_modules/lodash/_baseSum.js
@@ -0,0 +1,24 @@
+/**
+ * The base implementation of `_.sum` and `_.sumBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the sum.
+ */
+function baseSum(array, iteratee) {
+ var result,
+ index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var current = iteratee(array[index]);
+ if (current !== undefined) {
+ result = result === undefined ? current : (result + current);
+ }
+ }
+ return result;
+}
+
+module.exports = baseSum;
diff --git a/node_modules/lodash/_baseTimes.js b/node_modules/lodash/_baseTimes.js
new file mode 100644
index 0000000..0603fc3
--- /dev/null
+++ b/node_modules/lodash/_baseTimes.js
@@ -0,0 +1,20 @@
+/**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+}
+
+module.exports = baseTimes;
diff --git a/node_modules/lodash/_baseToNumber.js b/node_modules/lodash/_baseToNumber.js
new file mode 100644
index 0000000..04859f3
--- /dev/null
+++ b/node_modules/lodash/_baseToNumber.js
@@ -0,0 +1,24 @@
+var isSymbol = require('./isSymbol');
+
+/** Used as references for various `Number` constants. */
+var NAN = 0 / 0;
+
+/**
+ * The base implementation of `_.toNumber` which doesn't ensure correct
+ * conversions of binary, hexadecimal, or octal string values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ */
+function baseToNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ return +value;
+}
+
+module.exports = baseToNumber;
diff --git a/node_modules/lodash/_baseToPairs.js b/node_modules/lodash/_baseToPairs.js
new file mode 100644
index 0000000..bff1991
--- /dev/null
+++ b/node_modules/lodash/_baseToPairs.js
@@ -0,0 +1,18 @@
+var arrayMap = require('./_arrayMap');
+
+/**
+ * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
+ * of key-value pairs for `object` corresponding to the property names of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the key-value pairs.
+ */
+function baseToPairs(object, props) {
+ return arrayMap(props, function(key) {
+ return [key, object[key]];
+ });
+}
+
+module.exports = baseToPairs;
diff --git a/node_modules/lodash/_baseToString.js b/node_modules/lodash/_baseToString.js
new file mode 100644
index 0000000..ada6ad2
--- /dev/null
+++ b/node_modules/lodash/_baseToString.js
@@ -0,0 +1,37 @@
+var Symbol = require('./_Symbol'),
+ arrayMap = require('./_arrayMap'),
+ isArray = require('./isArray'),
+ isSymbol = require('./isSymbol');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+/**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (isArray(value)) {
+ // Recursively convert values (susceptible to call stack limits).
+ return arrayMap(value, baseToString) + '';
+ }
+ if (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
+module.exports = baseToString;
diff --git a/node_modules/lodash/_baseTrim.js b/node_modules/lodash/_baseTrim.js
new file mode 100644
index 0000000..3e2797d
--- /dev/null
+++ b/node_modules/lodash/_baseTrim.js
@@ -0,0 +1,19 @@
+var trimmedEndIndex = require('./_trimmedEndIndex');
+
+/** Used to match leading whitespace. */
+var reTrimStart = /^\s+/;
+
+/**
+ * The base implementation of `_.trim`.
+ *
+ * @private
+ * @param {string} string The string to trim.
+ * @returns {string} Returns the trimmed string.
+ */
+function baseTrim(string) {
+ return string
+ ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
+ : string;
+}
+
+module.exports = baseTrim;
diff --git a/node_modules/lodash/_baseUnary.js b/node_modules/lodash/_baseUnary.js
new file mode 100644
index 0000000..98639e9
--- /dev/null
+++ b/node_modules/lodash/_baseUnary.js
@@ -0,0 +1,14 @@
+/**
+ * The base implementation of `_.unary` without support for storing metadata.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ */
+function baseUnary(func) {
+ return function(value) {
+ return func(value);
+ };
+}
+
+module.exports = baseUnary;
diff --git a/node_modules/lodash/_baseUniq.js b/node_modules/lodash/_baseUniq.js
new file mode 100644
index 0000000..aea459d
--- /dev/null
+++ b/node_modules/lodash/_baseUniq.js
@@ -0,0 +1,72 @@
+var SetCache = require('./_SetCache'),
+ arrayIncludes = require('./_arrayIncludes'),
+ arrayIncludesWith = require('./_arrayIncludesWith'),
+ cacheHas = require('./_cacheHas'),
+ createSet = require('./_createSet'),
+ setToArray = require('./_setToArray');
+
+/** Used as the size to enable large array optimizations. */
+var LARGE_ARRAY_SIZE = 200;
+
+/**
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+function baseUniq(array, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ length = array.length,
+ isCommon = true,
+ result = [],
+ seen = result;
+
+ if (comparator) {
+ isCommon = false;
+ includes = arrayIncludesWith;
+ }
+ else if (length >= LARGE_ARRAY_SIZE) {
+ var set = iteratee ? null : createSet(array);
+ if (set) {
+ return setToArray(set);
+ }
+ isCommon = false;
+ includes = cacheHas;
+ seen = new SetCache;
+ }
+ else {
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var seenIndex = seen.length;
+ while (seenIndex--) {
+ if (seen[seenIndex] === computed) {
+ continue outer;
+ }
+ }
+ if (iteratee) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ else if (!includes(seen, computed, comparator)) {
+ if (seen !== result) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+}
+
+module.exports = baseUniq;
diff --git a/node_modules/lodash/_baseUnset.js b/node_modules/lodash/_baseUnset.js
new file mode 100644
index 0000000..eefc6e3
--- /dev/null
+++ b/node_modules/lodash/_baseUnset.js
@@ -0,0 +1,20 @@
+var castPath = require('./_castPath'),
+ last = require('./last'),
+ parent = require('./_parent'),
+ toKey = require('./_toKey');
+
+/**
+ * The base implementation of `_.unset`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The property path to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ */
+function baseUnset(object, path) {
+ path = castPath(path, object);
+ object = parent(object, path);
+ return object == null || delete object[toKey(last(path))];
+}
+
+module.exports = baseUnset;
diff --git a/node_modules/lodash/_baseUpdate.js b/node_modules/lodash/_baseUpdate.js
new file mode 100644
index 0000000..92a6237
--- /dev/null
+++ b/node_modules/lodash/_baseUpdate.js
@@ -0,0 +1,18 @@
+var baseGet = require('./_baseGet'),
+ baseSet = require('./_baseSet');
+
+/**
+ * The base implementation of `_.update`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to update.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+function baseUpdate(object, path, updater, customizer) {
+ return baseSet(object, path, updater(baseGet(object, path)), customizer);
+}
+
+module.exports = baseUpdate;
diff --git a/node_modules/lodash/_baseValues.js b/node_modules/lodash/_baseValues.js
new file mode 100644
index 0000000..b95faad
--- /dev/null
+++ b/node_modules/lodash/_baseValues.js
@@ -0,0 +1,19 @@
+var arrayMap = require('./_arrayMap');
+
+/**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+function baseValues(object, props) {
+ return arrayMap(props, function(key) {
+ return object[key];
+ });
+}
+
+module.exports = baseValues;
diff --git a/node_modules/lodash/_baseWhile.js b/node_modules/lodash/_baseWhile.js
new file mode 100644
index 0000000..07eac61
--- /dev/null
+++ b/node_modules/lodash/_baseWhile.js
@@ -0,0 +1,26 @@
+var baseSlice = require('./_baseSlice');
+
+/**
+ * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
+ * without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the slice of `array`.
+ */
+function baseWhile(array, predicate, isDrop, fromRight) {
+ var length = array.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length) &&
+ predicate(array[index], index, array)) {}
+
+ return isDrop
+ ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
+ : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
+}
+
+module.exports = baseWhile;
diff --git a/node_modules/lodash/_baseWrapperValue.js b/node_modules/lodash/_baseWrapperValue.js
new file mode 100644
index 0000000..443e0df
--- /dev/null
+++ b/node_modules/lodash/_baseWrapperValue.js
@@ -0,0 +1,25 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ arrayPush = require('./_arrayPush'),
+ arrayReduce = require('./_arrayReduce');
+
+/**
+ * The base implementation of `wrapperValue` which returns the result of
+ * performing a sequence of actions on the unwrapped `value`, where each
+ * successive action is supplied the return value of the previous.
+ *
+ * @private
+ * @param {*} value The unwrapped value.
+ * @param {Array} actions Actions to perform to resolve the unwrapped value.
+ * @returns {*} Returns the resolved value.
+ */
+function baseWrapperValue(value, actions) {
+ var result = value;
+ if (result instanceof LazyWrapper) {
+ result = result.value();
+ }
+ return arrayReduce(actions, function(result, action) {
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }, result);
+}
+
+module.exports = baseWrapperValue;
diff --git a/node_modules/lodash/_baseXor.js b/node_modules/lodash/_baseXor.js
new file mode 100644
index 0000000..8e69338
--- /dev/null
+++ b/node_modules/lodash/_baseXor.js
@@ -0,0 +1,36 @@
+var baseDifference = require('./_baseDifference'),
+ baseFlatten = require('./_baseFlatten'),
+ baseUniq = require('./_baseUniq');
+
+/**
+ * The base implementation of methods like `_.xor`, without support for
+ * iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of values.
+ */
+function baseXor(arrays, iteratee, comparator) {
+ var length = arrays.length;
+ if (length < 2) {
+ return length ? baseUniq(arrays[0]) : [];
+ }
+ var index = -1,
+ result = Array(length);
+
+ while (++index < length) {
+ var array = arrays[index],
+ othIndex = -1;
+
+ while (++othIndex < length) {
+ if (othIndex != index) {
+ result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
+ }
+ }
+ }
+ return baseUniq(baseFlatten(result, 1), iteratee, comparator);
+}
+
+module.exports = baseXor;
diff --git a/node_modules/lodash/_baseZipObject.js b/node_modules/lodash/_baseZipObject.js
new file mode 100644
index 0000000..401f85b
--- /dev/null
+++ b/node_modules/lodash/_baseZipObject.js
@@ -0,0 +1,23 @@
+/**
+ * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
+ *
+ * @private
+ * @param {Array} props The property identifiers.
+ * @param {Array} values The property values.
+ * @param {Function} assignFunc The function to assign values.
+ * @returns {Object} Returns the new object.
+ */
+function baseZipObject(props, values, assignFunc) {
+ var index = -1,
+ length = props.length,
+ valsLength = values.length,
+ result = {};
+
+ while (++index < length) {
+ var value = index < valsLength ? values[index] : undefined;
+ assignFunc(result, props[index], value);
+ }
+ return result;
+}
+
+module.exports = baseZipObject;
diff --git a/node_modules/lodash/_cacheHas.js b/node_modules/lodash/_cacheHas.js
new file mode 100644
index 0000000..2dec892
--- /dev/null
+++ b/node_modules/lodash/_cacheHas.js
@@ -0,0 +1,13 @@
+/**
+ * Checks if a `cache` value for `key` exists.
+ *
+ * @private
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function cacheHas(cache, key) {
+ return cache.has(key);
+}
+
+module.exports = cacheHas;
diff --git a/node_modules/lodash/_castArrayLikeObject.js b/node_modules/lodash/_castArrayLikeObject.js
new file mode 100644
index 0000000..92c75fa
--- /dev/null
+++ b/node_modules/lodash/_castArrayLikeObject.js
@@ -0,0 +1,14 @@
+var isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * Casts `value` to an empty array if it's not an array like object.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Array|Object} Returns the cast array-like object.
+ */
+function castArrayLikeObject(value) {
+ return isArrayLikeObject(value) ? value : [];
+}
+
+module.exports = castArrayLikeObject;
diff --git a/node_modules/lodash/_castFunction.js b/node_modules/lodash/_castFunction.js
new file mode 100644
index 0000000..98c91ae
--- /dev/null
+++ b/node_modules/lodash/_castFunction.js
@@ -0,0 +1,14 @@
+var identity = require('./identity');
+
+/**
+ * Casts `value` to `identity` if it's not a function.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Function} Returns cast function.
+ */
+function castFunction(value) {
+ return typeof value == 'function' ? value : identity;
+}
+
+module.exports = castFunction;
diff --git a/node_modules/lodash/_castPath.js b/node_modules/lodash/_castPath.js
new file mode 100644
index 0000000..017e4c1
--- /dev/null
+++ b/node_modules/lodash/_castPath.js
@@ -0,0 +1,21 @@
+var isArray = require('./isArray'),
+ isKey = require('./_isKey'),
+ stringToPath = require('./_stringToPath'),
+ toString = require('./toString');
+
+/**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {Array} Returns the cast property path array.
+ */
+function castPath(value, object) {
+ if (isArray(value)) {
+ return value;
+ }
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
+}
+
+module.exports = castPath;
diff --git a/node_modules/lodash/_castRest.js b/node_modules/lodash/_castRest.js
new file mode 100644
index 0000000..213c66f
--- /dev/null
+++ b/node_modules/lodash/_castRest.js
@@ -0,0 +1,14 @@
+var baseRest = require('./_baseRest');
+
+/**
+ * A `baseRest` alias which can be replaced with `identity` by module
+ * replacement plugins.
+ *
+ * @private
+ * @type {Function}
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+var castRest = baseRest;
+
+module.exports = castRest;
diff --git a/node_modules/lodash/_castSlice.js b/node_modules/lodash/_castSlice.js
new file mode 100644
index 0000000..071faeb
--- /dev/null
+++ b/node_modules/lodash/_castSlice.js
@@ -0,0 +1,18 @@
+var baseSlice = require('./_baseSlice');
+
+/**
+ * Casts `array` to a slice if it's needed.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {number} start The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the cast slice.
+ */
+function castSlice(array, start, end) {
+ var length = array.length;
+ end = end === undefined ? length : end;
+ return (!start && end >= length) ? array : baseSlice(array, start, end);
+}
+
+module.exports = castSlice;
diff --git a/node_modules/lodash/_charsEndIndex.js b/node_modules/lodash/_charsEndIndex.js
new file mode 100644
index 0000000..07908ff
--- /dev/null
+++ b/node_modules/lodash/_charsEndIndex.js
@@ -0,0 +1,19 @@
+var baseIndexOf = require('./_baseIndexOf');
+
+/**
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the last unmatched string symbol.
+ */
+function charsEndIndex(strSymbols, chrSymbols) {
+ var index = strSymbols.length;
+
+ while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+}
+
+module.exports = charsEndIndex;
diff --git a/node_modules/lodash/_charsStartIndex.js b/node_modules/lodash/_charsStartIndex.js
new file mode 100644
index 0000000..b17afd2
--- /dev/null
+++ b/node_modules/lodash/_charsStartIndex.js
@@ -0,0 +1,20 @@
+var baseIndexOf = require('./_baseIndexOf');
+
+/**
+ * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the first unmatched string symbol.
+ */
+function charsStartIndex(strSymbols, chrSymbols) {
+ var index = -1,
+ length = strSymbols.length;
+
+ while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+}
+
+module.exports = charsStartIndex;
diff --git a/node_modules/lodash/_cloneArrayBuffer.js b/node_modules/lodash/_cloneArrayBuffer.js
new file mode 100644
index 0000000..c3d8f6e
--- /dev/null
+++ b/node_modules/lodash/_cloneArrayBuffer.js
@@ -0,0 +1,16 @@
+var Uint8Array = require('./_Uint8Array');
+
+/**
+ * Creates a clone of `arrayBuffer`.
+ *
+ * @private
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
+ */
+function cloneArrayBuffer(arrayBuffer) {
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+ return result;
+}
+
+module.exports = cloneArrayBuffer;
diff --git a/node_modules/lodash/_cloneBuffer.js b/node_modules/lodash/_cloneBuffer.js
new file mode 100644
index 0000000..27c4810
--- /dev/null
+++ b/node_modules/lodash/_cloneBuffer.js
@@ -0,0 +1,35 @@
+var root = require('./_root');
+
+/** Detect free variable `exports`. */
+var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+/** Detect free variable `module`. */
+var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+/** Detect the popular CommonJS extension `module.exports`. */
+var moduleExports = freeModule && freeModule.exports === freeExports;
+
+/** Built-in value references. */
+var Buffer = moduleExports ? root.Buffer : undefined,
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
+
+/**
+ * Creates a clone of `buffer`.
+ *
+ * @private
+ * @param {Buffer} buffer The buffer to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Buffer} Returns the cloned buffer.
+ */
+function cloneBuffer(buffer, isDeep) {
+ if (isDeep) {
+ return buffer.slice();
+ }
+ var length = buffer.length,
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
+
+ buffer.copy(result);
+ return result;
+}
+
+module.exports = cloneBuffer;
diff --git a/node_modules/lodash/_cloneDataView.js b/node_modules/lodash/_cloneDataView.js
new file mode 100644
index 0000000..9c9b7b0
--- /dev/null
+++ b/node_modules/lodash/_cloneDataView.js
@@ -0,0 +1,16 @@
+var cloneArrayBuffer = require('./_cloneArrayBuffer');
+
+/**
+ * Creates a clone of `dataView`.
+ *
+ * @private
+ * @param {Object} dataView The data view to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned data view.
+ */
+function cloneDataView(dataView, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
+}
+
+module.exports = cloneDataView;
diff --git a/node_modules/lodash/_cloneRegExp.js b/node_modules/lodash/_cloneRegExp.js
new file mode 100644
index 0000000..64a30df
--- /dev/null
+++ b/node_modules/lodash/_cloneRegExp.js
@@ -0,0 +1,17 @@
+/** Used to match `RegExp` flags from their coerced string values. */
+var reFlags = /\w*$/;
+
+/**
+ * Creates a clone of `regexp`.
+ *
+ * @private
+ * @param {Object} regexp The regexp to clone.
+ * @returns {Object} Returns the cloned regexp.
+ */
+function cloneRegExp(regexp) {
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
+ result.lastIndex = regexp.lastIndex;
+ return result;
+}
+
+module.exports = cloneRegExp;
diff --git a/node_modules/lodash/_cloneSymbol.js b/node_modules/lodash/_cloneSymbol.js
new file mode 100644
index 0000000..bede39f
--- /dev/null
+++ b/node_modules/lodash/_cloneSymbol.js
@@ -0,0 +1,18 @@
+var Symbol = require('./_Symbol');
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
+
+/**
+ * Creates a clone of the `symbol` object.
+ *
+ * @private
+ * @param {Object} symbol The symbol object to clone.
+ * @returns {Object} Returns the cloned symbol object.
+ */
+function cloneSymbol(symbol) {
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
+}
+
+module.exports = cloneSymbol;
diff --git a/node_modules/lodash/_cloneTypedArray.js b/node_modules/lodash/_cloneTypedArray.js
new file mode 100644
index 0000000..7aad84d
--- /dev/null
+++ b/node_modules/lodash/_cloneTypedArray.js
@@ -0,0 +1,16 @@
+var cloneArrayBuffer = require('./_cloneArrayBuffer');
+
+/**
+ * Creates a clone of `typedArray`.
+ *
+ * @private
+ * @param {Object} typedArray The typed array to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned typed array.
+ */
+function cloneTypedArray(typedArray, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
+}
+
+module.exports = cloneTypedArray;
diff --git a/node_modules/lodash/_compareAscending.js b/node_modules/lodash/_compareAscending.js
new file mode 100644
index 0000000..8dc2791
--- /dev/null
+++ b/node_modules/lodash/_compareAscending.js
@@ -0,0 +1,41 @@
+var isSymbol = require('./isSymbol');
+
+/**
+ * Compares values to sort them in ascending order.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {number} Returns the sort order indicator for `value`.
+ */
+function compareAscending(value, other) {
+ if (value !== other) {
+ var valIsDefined = value !== undefined,
+ valIsNull = value === null,
+ valIsReflexive = value === value,
+ valIsSymbol = isSymbol(value);
+
+ var othIsDefined = other !== undefined,
+ othIsNull = other === null,
+ othIsReflexive = other === other,
+ othIsSymbol = isSymbol(other);
+
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+ (valIsNull && othIsDefined && othIsReflexive) ||
+ (!valIsDefined && othIsReflexive) ||
+ !valIsReflexive) {
+ return 1;
+ }
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+ (othIsNull && valIsDefined && valIsReflexive) ||
+ (!othIsDefined && valIsReflexive) ||
+ !othIsReflexive) {
+ return -1;
+ }
+ }
+ return 0;
+}
+
+module.exports = compareAscending;
diff --git a/node_modules/lodash/_compareMultiple.js b/node_modules/lodash/_compareMultiple.js
new file mode 100644
index 0000000..ad61f0f
--- /dev/null
+++ b/node_modules/lodash/_compareMultiple.js
@@ -0,0 +1,44 @@
+var compareAscending = require('./_compareAscending');
+
+/**
+ * Used by `_.orderBy` to compare multiple properties of a value to another
+ * and stable sort them.
+ *
+ * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
+ * specify an order of "desc" for descending or "asc" for ascending sort order
+ * of corresponding values.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {boolean[]|string[]} orders The order to sort by for each property.
+ * @returns {number} Returns the sort order indicator for `object`.
+ */
+function compareMultiple(object, other, orders) {
+ var index = -1,
+ objCriteria = object.criteria,
+ othCriteria = other.criteria,
+ length = objCriteria.length,
+ ordersLength = orders.length;
+
+ while (++index < length) {
+ var result = compareAscending(objCriteria[index], othCriteria[index]);
+ if (result) {
+ if (index >= ordersLength) {
+ return result;
+ }
+ var order = orders[index];
+ return result * (order == 'desc' ? -1 : 1);
+ }
+ }
+ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
+ // that causes it, under certain circumstances, to provide the same value for
+ // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
+ // for more details.
+ //
+ // This also ensures a stable sort in V8 and other engines.
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
+ return object.index - other.index;
+}
+
+module.exports = compareMultiple;
diff --git a/node_modules/lodash/_composeArgs.js b/node_modules/lodash/_composeArgs.js
new file mode 100644
index 0000000..1ce40f4
--- /dev/null
+++ b/node_modules/lodash/_composeArgs.js
@@ -0,0 +1,39 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Creates an array that is the composition of partially applied arguments,
+ * placeholders, and provided arguments into a single array of arguments.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to prepend to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+function composeArgs(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersLength = holders.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(leftLength + rangeLength),
+ isUncurried = !isCurried;
+
+ while (++leftIndex < leftLength) {
+ result[leftIndex] = partials[leftIndex];
+ }
+ while (++argsIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[holders[argsIndex]] = args[argsIndex];
+ }
+ }
+ while (rangeLength--) {
+ result[leftIndex++] = args[argsIndex++];
+ }
+ return result;
+}
+
+module.exports = composeArgs;
diff --git a/node_modules/lodash/_composeArgsRight.js b/node_modules/lodash/_composeArgsRight.js
new file mode 100644
index 0000000..8dc588d
--- /dev/null
+++ b/node_modules/lodash/_composeArgsRight.js
@@ -0,0 +1,41 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * This function is like `composeArgs` except that the arguments composition
+ * is tailored for `_.partialRight`.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to append to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+function composeArgsRight(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersIndex = -1,
+ holdersLength = holders.length,
+ rightIndex = -1,
+ rightLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(rangeLength + rightLength),
+ isUncurried = !isCurried;
+
+ while (++argsIndex < rangeLength) {
+ result[argsIndex] = args[argsIndex];
+ }
+ var offset = argsIndex;
+ while (++rightIndex < rightLength) {
+ result[offset + rightIndex] = partials[rightIndex];
+ }
+ while (++holdersIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[offset + holders[holdersIndex]] = args[argsIndex++];
+ }
+ }
+ return result;
+}
+
+module.exports = composeArgsRight;
diff --git a/node_modules/lodash/_copyArray.js b/node_modules/lodash/_copyArray.js
new file mode 100644
index 0000000..cd94d5d
--- /dev/null
+++ b/node_modules/lodash/_copyArray.js
@@ -0,0 +1,20 @@
+/**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+function copyArray(source, array) {
+ var index = -1,
+ length = source.length;
+
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+}
+
+module.exports = copyArray;
diff --git a/node_modules/lodash/_copyObject.js b/node_modules/lodash/_copyObject.js
new file mode 100644
index 0000000..2f2a5c2
--- /dev/null
+++ b/node_modules/lodash/_copyObject.js
@@ -0,0 +1,40 @@
+var assignValue = require('./_assignValue'),
+ baseAssignValue = require('./_baseAssignValue');
+
+/**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+function copyObject(source, props, object, customizer) {
+ var isNew = !object;
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ baseAssignValue(object, key, newValue);
+ } else {
+ assignValue(object, key, newValue);
+ }
+ }
+ return object;
+}
+
+module.exports = copyObject;
diff --git a/node_modules/lodash/_copySymbols.js b/node_modules/lodash/_copySymbols.js
new file mode 100644
index 0000000..c35944a
--- /dev/null
+++ b/node_modules/lodash/_copySymbols.js
@@ -0,0 +1,16 @@
+var copyObject = require('./_copyObject'),
+ getSymbols = require('./_getSymbols');
+
+/**
+ * Copies own symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+function copySymbols(source, object) {
+ return copyObject(source, getSymbols(source), object);
+}
+
+module.exports = copySymbols;
diff --git a/node_modules/lodash/_copySymbolsIn.js b/node_modules/lodash/_copySymbolsIn.js
new file mode 100644
index 0000000..fdf20a7
--- /dev/null
+++ b/node_modules/lodash/_copySymbolsIn.js
@@ -0,0 +1,16 @@
+var copyObject = require('./_copyObject'),
+ getSymbolsIn = require('./_getSymbolsIn');
+
+/**
+ * Copies own and inherited symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+function copySymbolsIn(source, object) {
+ return copyObject(source, getSymbolsIn(source), object);
+}
+
+module.exports = copySymbolsIn;
diff --git a/node_modules/lodash/_coreJsData.js b/node_modules/lodash/_coreJsData.js
new file mode 100644
index 0000000..f8e5b4e
--- /dev/null
+++ b/node_modules/lodash/_coreJsData.js
@@ -0,0 +1,6 @@
+var root = require('./_root');
+
+/** Used to detect overreaching core-js shims. */
+var coreJsData = root['__core-js_shared__'];
+
+module.exports = coreJsData;
diff --git a/node_modules/lodash/_countHolders.js b/node_modules/lodash/_countHolders.js
new file mode 100644
index 0000000..718fcda
--- /dev/null
+++ b/node_modules/lodash/_countHolders.js
@@ -0,0 +1,21 @@
+/**
+ * Gets the number of `placeholder` occurrences in `array`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} placeholder The placeholder to search for.
+ * @returns {number} Returns the placeholder count.
+ */
+function countHolders(array, placeholder) {
+ var length = array.length,
+ result = 0;
+
+ while (length--) {
+ if (array[length] === placeholder) {
+ ++result;
+ }
+ }
+ return result;
+}
+
+module.exports = countHolders;
diff --git a/node_modules/lodash/_createAggregator.js b/node_modules/lodash/_createAggregator.js
new file mode 100644
index 0000000..0be42c4
--- /dev/null
+++ b/node_modules/lodash/_createAggregator.js
@@ -0,0 +1,23 @@
+var arrayAggregator = require('./_arrayAggregator'),
+ baseAggregator = require('./_baseAggregator'),
+ baseIteratee = require('./_baseIteratee'),
+ isArray = require('./isArray');
+
+/**
+ * Creates a function like `_.groupBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} [initializer] The accumulator object initializer.
+ * @returns {Function} Returns the new aggregator function.
+ */
+function createAggregator(setter, initializer) {
+ return function(collection, iteratee) {
+ var func = isArray(collection) ? arrayAggregator : baseAggregator,
+ accumulator = initializer ? initializer() : {};
+
+ return func(collection, setter, baseIteratee(iteratee, 2), accumulator);
+ };
+}
+
+module.exports = createAggregator;
diff --git a/node_modules/lodash/_createAssigner.js b/node_modules/lodash/_createAssigner.js
new file mode 100644
index 0000000..1f904c5
--- /dev/null
+++ b/node_modules/lodash/_createAssigner.js
@@ -0,0 +1,37 @@
+var baseRest = require('./_baseRest'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+function createAssigner(assigner) {
+ return baseRest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined,
+ guard = length > 2 ? sources[2] : undefined;
+
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
+ ? (length--, customizer)
+ : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
+}
+
+module.exports = createAssigner;
diff --git a/node_modules/lodash/_createBaseEach.js b/node_modules/lodash/_createBaseEach.js
new file mode 100644
index 0000000..d24fdd1
--- /dev/null
+++ b/node_modules/lodash/_createBaseEach.js
@@ -0,0 +1,32 @@
+var isArrayLike = require('./isArrayLike');
+
+/**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
+ }
+ if (!isArrayLike(collection)) {
+ return eachFunc(collection, iteratee);
+ }
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+}
+
+module.exports = createBaseEach;
diff --git a/node_modules/lodash/_createBaseFor.js b/node_modules/lodash/_createBaseFor.js
new file mode 100644
index 0000000..94cbf29
--- /dev/null
+++ b/node_modules/lodash/_createBaseFor.js
@@ -0,0 +1,25 @@
+/**
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
+
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+}
+
+module.exports = createBaseFor;
diff --git a/node_modules/lodash/_createBind.js b/node_modules/lodash/_createBind.js
new file mode 100644
index 0000000..07cb99f
--- /dev/null
+++ b/node_modules/lodash/_createBind.js
@@ -0,0 +1,28 @@
+var createCtor = require('./_createCtor'),
+ root = require('./_root');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1;
+
+/**
+ * Creates a function that wraps `func` to invoke it with the optional `this`
+ * binding of `thisArg`.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createBind(func, bitmask, thisArg) {
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return fn.apply(isBind ? thisArg : this, arguments);
+ }
+ return wrapper;
+}
+
+module.exports = createBind;
diff --git a/node_modules/lodash/_createCaseFirst.js b/node_modules/lodash/_createCaseFirst.js
new file mode 100644
index 0000000..fe8ea48
--- /dev/null
+++ b/node_modules/lodash/_createCaseFirst.js
@@ -0,0 +1,33 @@
+var castSlice = require('./_castSlice'),
+ hasUnicode = require('./_hasUnicode'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString');
+
+/**
+ * Creates a function like `_.lowerFirst`.
+ *
+ * @private
+ * @param {string} methodName The name of the `String` case method to use.
+ * @returns {Function} Returns the new case function.
+ */
+function createCaseFirst(methodName) {
+ return function(string) {
+ string = toString(string);
+
+ var strSymbols = hasUnicode(string)
+ ? stringToArray(string)
+ : undefined;
+
+ var chr = strSymbols
+ ? strSymbols[0]
+ : string.charAt(0);
+
+ var trailing = strSymbols
+ ? castSlice(strSymbols, 1).join('')
+ : string.slice(1);
+
+ return chr[methodName]() + trailing;
+ };
+}
+
+module.exports = createCaseFirst;
diff --git a/node_modules/lodash/_createCompounder.js b/node_modules/lodash/_createCompounder.js
new file mode 100644
index 0000000..8d4cee2
--- /dev/null
+++ b/node_modules/lodash/_createCompounder.js
@@ -0,0 +1,24 @@
+var arrayReduce = require('./_arrayReduce'),
+ deburr = require('./deburr'),
+ words = require('./words');
+
+/** Used to compose unicode capture groups. */
+var rsApos = "['\u2019]";
+
+/** Used to match apostrophes. */
+var reApos = RegExp(rsApos, 'g');
+
+/**
+ * Creates a function like `_.camelCase`.
+ *
+ * @private
+ * @param {Function} callback The function to combine each word.
+ * @returns {Function} Returns the new compounder function.
+ */
+function createCompounder(callback) {
+ return function(string) {
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
+ };
+}
+
+module.exports = createCompounder;
diff --git a/node_modules/lodash/_createCtor.js b/node_modules/lodash/_createCtor.js
new file mode 100644
index 0000000..9047aa5
--- /dev/null
+++ b/node_modules/lodash/_createCtor.js
@@ -0,0 +1,37 @@
+var baseCreate = require('./_baseCreate'),
+ isObject = require('./isObject');
+
+/**
+ * Creates a function that produces an instance of `Ctor` regardless of
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+ *
+ * @private
+ * @param {Function} Ctor The constructor to wrap.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createCtor(Ctor) {
+ return function() {
+ // Use a `switch` statement to work with class constructors. See
+ // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+ // for more details.
+ var args = arguments;
+ switch (args.length) {
+ case 0: return new Ctor;
+ case 1: return new Ctor(args[0]);
+ case 2: return new Ctor(args[0], args[1]);
+ case 3: return new Ctor(args[0], args[1], args[2]);
+ case 4: return new Ctor(args[0], args[1], args[2], args[3]);
+ case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
+ case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
+ case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
+ }
+ var thisBinding = baseCreate(Ctor.prototype),
+ result = Ctor.apply(thisBinding, args);
+
+ // Mimic the constructor's `return` behavior.
+ // See https://es5.github.io/#x13.2.2 for more details.
+ return isObject(result) ? result : thisBinding;
+ };
+}
+
+module.exports = createCtor;
diff --git a/node_modules/lodash/_createCurry.js b/node_modules/lodash/_createCurry.js
new file mode 100644
index 0000000..f06c2cd
--- /dev/null
+++ b/node_modules/lodash/_createCurry.js
@@ -0,0 +1,46 @@
+var apply = require('./_apply'),
+ createCtor = require('./_createCtor'),
+ createHybrid = require('./_createHybrid'),
+ createRecurry = require('./_createRecurry'),
+ getHolder = require('./_getHolder'),
+ replaceHolders = require('./_replaceHolders'),
+ root = require('./_root');
+
+/**
+ * Creates a function that wraps `func` to enable currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {number} arity The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createCurry(func, bitmask, arity) {
+ var Ctor = createCtor(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length,
+ placeholder = getHolder(wrapper);
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
+ ? []
+ : replaceHolders(args, placeholder);
+
+ length -= holders.length;
+ if (length < arity) {
+ return createRecurry(
+ func, bitmask, createHybrid, wrapper.placeholder, undefined,
+ args, holders, undefined, undefined, arity - length);
+ }
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return apply(fn, this, args);
+ }
+ return wrapper;
+}
+
+module.exports = createCurry;
diff --git a/node_modules/lodash/_createFind.js b/node_modules/lodash/_createFind.js
new file mode 100644
index 0000000..8859ff8
--- /dev/null
+++ b/node_modules/lodash/_createFind.js
@@ -0,0 +1,25 @@
+var baseIteratee = require('./_baseIteratee'),
+ isArrayLike = require('./isArrayLike'),
+ keys = require('./keys');
+
+/**
+ * Creates a `_.find` or `_.findLast` function.
+ *
+ * @private
+ * @param {Function} findIndexFunc The function to find the collection index.
+ * @returns {Function} Returns the new find function.
+ */
+function createFind(findIndexFunc) {
+ return function(collection, predicate, fromIndex) {
+ var iterable = Object(collection);
+ if (!isArrayLike(collection)) {
+ var iteratee = baseIteratee(predicate, 3);
+ collection = keys(collection);
+ predicate = function(key) { return iteratee(iterable[key], key, iterable); };
+ }
+ var index = findIndexFunc(collection, predicate, fromIndex);
+ return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
+ };
+}
+
+module.exports = createFind;
diff --git a/node_modules/lodash/_createFlow.js b/node_modules/lodash/_createFlow.js
new file mode 100644
index 0000000..baaddbf
--- /dev/null
+++ b/node_modules/lodash/_createFlow.js
@@ -0,0 +1,78 @@
+var LodashWrapper = require('./_LodashWrapper'),
+ flatRest = require('./_flatRest'),
+ getData = require('./_getData'),
+ getFuncName = require('./_getFuncName'),
+ isArray = require('./isArray'),
+ isLaziable = require('./_isLaziable');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_CURRY_FLAG = 8,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_ARY_FLAG = 128,
+ WRAP_REARG_FLAG = 256;
+
+/**
+ * Creates a `_.flow` or `_.flowRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new flow function.
+ */
+function createFlow(fromRight) {
+ return flatRest(function(funcs) {
+ var length = funcs.length,
+ index = length,
+ prereq = LodashWrapper.prototype.thru;
+
+ if (fromRight) {
+ funcs.reverse();
+ }
+ while (index--) {
+ var func = funcs[index];
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
+ var wrapper = new LodashWrapper([], true);
+ }
+ }
+ index = wrapper ? index : length;
+ while (++index < length) {
+ func = funcs[index];
+
+ var funcName = getFuncName(func),
+ data = funcName == 'wrapper' ? getData(func) : undefined;
+
+ if (data && isLaziable(data[0]) &&
+ data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
+ !data[4].length && data[9] == 1
+ ) {
+ wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
+ } else {
+ wrapper = (func.length == 1 && isLaziable(func))
+ ? wrapper[funcName]()
+ : wrapper.thru(func);
+ }
+ }
+ return function() {
+ var args = arguments,
+ value = args[0];
+
+ if (wrapper && args.length == 1 && isArray(value)) {
+ return wrapper.plant(value).value();
+ }
+ var index = 0,
+ result = length ? funcs[index].apply(this, args) : value;
+
+ while (++index < length) {
+ result = funcs[index].call(this, result);
+ }
+ return result;
+ };
+ });
+}
+
+module.exports = createFlow;
diff --git a/node_modules/lodash/_createHybrid.js b/node_modules/lodash/_createHybrid.js
new file mode 100644
index 0000000..b671bd1
--- /dev/null
+++ b/node_modules/lodash/_createHybrid.js
@@ -0,0 +1,92 @@
+var composeArgs = require('./_composeArgs'),
+ composeArgsRight = require('./_composeArgsRight'),
+ countHolders = require('./_countHolders'),
+ createCtor = require('./_createCtor'),
+ createRecurry = require('./_createRecurry'),
+ getHolder = require('./_getHolder'),
+ reorder = require('./_reorder'),
+ replaceHolders = require('./_replaceHolders'),
+ root = require('./_root');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_CURRY_RIGHT_FLAG = 16,
+ WRAP_ARY_FLAG = 128,
+ WRAP_FLIP_FLAG = 512;
+
+/**
+ * Creates a function that wraps `func` to invoke it with optional `this`
+ * binding of `thisArg`, partial application, and currying.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [partialsRight] The arguments to append to those provided
+ * to the new function.
+ * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
+ var isAry = bitmask & WRAP_ARY_FLAG,
+ isBind = bitmask & WRAP_BIND_FLAG,
+ isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
+ isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
+ isFlip = bitmask & WRAP_FLIP_FLAG,
+ Ctor = isBindKey ? undefined : createCtor(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length;
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ if (isCurried) {
+ var placeholder = getHolder(wrapper),
+ holdersCount = countHolders(args, placeholder);
+ }
+ if (partials) {
+ args = composeArgs(args, partials, holders, isCurried);
+ }
+ if (partialsRight) {
+ args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
+ }
+ length -= holdersCount;
+ if (isCurried && length < arity) {
+ var newHolders = replaceHolders(args, placeholder);
+ return createRecurry(
+ func, bitmask, createHybrid, wrapper.placeholder, thisArg,
+ args, newHolders, argPos, ary, arity - length
+ );
+ }
+ var thisBinding = isBind ? thisArg : this,
+ fn = isBindKey ? thisBinding[func] : func;
+
+ length = args.length;
+ if (argPos) {
+ args = reorder(args, argPos);
+ } else if (isFlip && length > 1) {
+ args.reverse();
+ }
+ if (isAry && ary < length) {
+ args.length = ary;
+ }
+ if (this && this !== root && this instanceof wrapper) {
+ fn = Ctor || createCtor(fn);
+ }
+ return fn.apply(thisBinding, args);
+ }
+ return wrapper;
+}
+
+module.exports = createHybrid;
diff --git a/node_modules/lodash/_createInverter.js b/node_modules/lodash/_createInverter.js
new file mode 100644
index 0000000..6c0c562
--- /dev/null
+++ b/node_modules/lodash/_createInverter.js
@@ -0,0 +1,17 @@
+var baseInverter = require('./_baseInverter');
+
+/**
+ * Creates a function like `_.invertBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} toIteratee The function to resolve iteratees.
+ * @returns {Function} Returns the new inverter function.
+ */
+function createInverter(setter, toIteratee) {
+ return function(object, iteratee) {
+ return baseInverter(object, setter, toIteratee(iteratee), {});
+ };
+}
+
+module.exports = createInverter;
diff --git a/node_modules/lodash/_createMathOperation.js b/node_modules/lodash/_createMathOperation.js
new file mode 100644
index 0000000..f1e238a
--- /dev/null
+++ b/node_modules/lodash/_createMathOperation.js
@@ -0,0 +1,38 @@
+var baseToNumber = require('./_baseToNumber'),
+ baseToString = require('./_baseToString');
+
+/**
+ * Creates a function that performs a mathematical operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @param {number} [defaultValue] The value used for `undefined` arguments.
+ * @returns {Function} Returns the new mathematical operation function.
+ */
+function createMathOperation(operator, defaultValue) {
+ return function(value, other) {
+ var result;
+ if (value === undefined && other === undefined) {
+ return defaultValue;
+ }
+ if (value !== undefined) {
+ result = value;
+ }
+ if (other !== undefined) {
+ if (result === undefined) {
+ return other;
+ }
+ if (typeof value == 'string' || typeof other == 'string') {
+ value = baseToString(value);
+ other = baseToString(other);
+ } else {
+ value = baseToNumber(value);
+ other = baseToNumber(other);
+ }
+ result = operator(value, other);
+ }
+ return result;
+ };
+}
+
+module.exports = createMathOperation;
diff --git a/node_modules/lodash/_createOver.js b/node_modules/lodash/_createOver.js
new file mode 100644
index 0000000..3b94551
--- /dev/null
+++ b/node_modules/lodash/_createOver.js
@@ -0,0 +1,27 @@
+var apply = require('./_apply'),
+ arrayMap = require('./_arrayMap'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ baseUnary = require('./_baseUnary'),
+ flatRest = require('./_flatRest');
+
+/**
+ * Creates a function like `_.over`.
+ *
+ * @private
+ * @param {Function} arrayFunc The function to iterate over iteratees.
+ * @returns {Function} Returns the new over function.
+ */
+function createOver(arrayFunc) {
+ return flatRest(function(iteratees) {
+ iteratees = arrayMap(iteratees, baseUnary(baseIteratee));
+ return baseRest(function(args) {
+ var thisArg = this;
+ return arrayFunc(iteratees, function(iteratee) {
+ return apply(iteratee, thisArg, args);
+ });
+ });
+ });
+}
+
+module.exports = createOver;
diff --git a/node_modules/lodash/_createPadding.js b/node_modules/lodash/_createPadding.js
new file mode 100644
index 0000000..2124612
--- /dev/null
+++ b/node_modules/lodash/_createPadding.js
@@ -0,0 +1,33 @@
+var baseRepeat = require('./_baseRepeat'),
+ baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ hasUnicode = require('./_hasUnicode'),
+ stringSize = require('./_stringSize'),
+ stringToArray = require('./_stringToArray');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeCeil = Math.ceil;
+
+/**
+ * Creates the padding for `string` based on `length`. The `chars` string
+ * is truncated if the number of characters exceeds `length`.
+ *
+ * @private
+ * @param {number} length The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padding for `string`.
+ */
+function createPadding(length, chars) {
+ chars = chars === undefined ? ' ' : baseToString(chars);
+
+ var charsLength = chars.length;
+ if (charsLength < 2) {
+ return charsLength ? baseRepeat(chars, length) : chars;
+ }
+ var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
+ return hasUnicode(chars)
+ ? castSlice(stringToArray(result), 0, length).join('')
+ : result.slice(0, length);
+}
+
+module.exports = createPadding;
diff --git a/node_modules/lodash/_createPartial.js b/node_modules/lodash/_createPartial.js
new file mode 100644
index 0000000..e16c248
--- /dev/null
+++ b/node_modules/lodash/_createPartial.js
@@ -0,0 +1,43 @@
+var apply = require('./_apply'),
+ createCtor = require('./_createCtor'),
+ root = require('./_root');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1;
+
+/**
+ * Creates a function that wraps `func` to invoke it with the `this` binding
+ * of `thisArg` and `partials` prepended to the arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} partials The arguments to prepend to those provided to
+ * the new function.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createPartial(func, bitmask, thisArg, partials) {
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var argsIndex = -1,
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength),
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+
+ while (++leftIndex < leftLength) {
+ args[leftIndex] = partials[leftIndex];
+ }
+ while (argsLength--) {
+ args[leftIndex++] = arguments[++argsIndex];
+ }
+ return apply(fn, isBind ? thisArg : this, args);
+ }
+ return wrapper;
+}
+
+module.exports = createPartial;
diff --git a/node_modules/lodash/_createRange.js b/node_modules/lodash/_createRange.js
new file mode 100644
index 0000000..9f52c77
--- /dev/null
+++ b/node_modules/lodash/_createRange.js
@@ -0,0 +1,30 @@
+var baseRange = require('./_baseRange'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toFinite = require('./toFinite');
+
+/**
+ * Creates a `_.range` or `_.rangeRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new range function.
+ */
+function createRange(fromRight) {
+ return function(start, end, step) {
+ if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
+ end = step = undefined;
+ }
+ // Ensure the sign of `-0` is preserved.
+ start = toFinite(start);
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toFinite(end);
+ }
+ step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
+ return baseRange(start, end, step, fromRight);
+ };
+}
+
+module.exports = createRange;
diff --git a/node_modules/lodash/_createRecurry.js b/node_modules/lodash/_createRecurry.js
new file mode 100644
index 0000000..eb29fb2
--- /dev/null
+++ b/node_modules/lodash/_createRecurry.js
@@ -0,0 +1,56 @@
+var isLaziable = require('./_isLaziable'),
+ setData = require('./_setData'),
+ setWrapToString = require('./_setWrapToString');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_BOUND_FLAG = 4,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_PARTIAL_RIGHT_FLAG = 64;
+
+/**
+ * Creates a function that wraps `func` to continue currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {Function} wrapFunc The function to create the `func` wrapper.
+ * @param {*} placeholder The placeholder value.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
+ var isCurry = bitmask & WRAP_CURRY_FLAG,
+ newHolders = isCurry ? holders : undefined,
+ newHoldersRight = isCurry ? undefined : holders,
+ newPartials = isCurry ? partials : undefined,
+ newPartialsRight = isCurry ? undefined : partials;
+
+ bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
+ bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
+
+ if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
+ bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
+ }
+ var newData = [
+ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
+ newHoldersRight, argPos, ary, arity
+ ];
+
+ var result = wrapFunc.apply(undefined, newData);
+ if (isLaziable(func)) {
+ setData(result, newData);
+ }
+ result.placeholder = placeholder;
+ return setWrapToString(result, func, bitmask);
+}
+
+module.exports = createRecurry;
diff --git a/node_modules/lodash/_createRelationalOperation.js b/node_modules/lodash/_createRelationalOperation.js
new file mode 100644
index 0000000..a17c6b5
--- /dev/null
+++ b/node_modules/lodash/_createRelationalOperation.js
@@ -0,0 +1,20 @@
+var toNumber = require('./toNumber');
+
+/**
+ * Creates a function that performs a relational operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @returns {Function} Returns the new relational operation function.
+ */
+function createRelationalOperation(operator) {
+ return function(value, other) {
+ if (!(typeof value == 'string' && typeof other == 'string')) {
+ value = toNumber(value);
+ other = toNumber(other);
+ }
+ return operator(value, other);
+ };
+}
+
+module.exports = createRelationalOperation;
diff --git a/node_modules/lodash/_createRound.js b/node_modules/lodash/_createRound.js
new file mode 100644
index 0000000..88be5df
--- /dev/null
+++ b/node_modules/lodash/_createRound.js
@@ -0,0 +1,35 @@
+var root = require('./_root'),
+ toInteger = require('./toInteger'),
+ toNumber = require('./toNumber'),
+ toString = require('./toString');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeIsFinite = root.isFinite,
+ nativeMin = Math.min;
+
+/**
+ * Creates a function like `_.round`.
+ *
+ * @private
+ * @param {string} methodName The name of the `Math` method to use when rounding.
+ * @returns {Function} Returns the new round function.
+ */
+function createRound(methodName) {
+ var func = Math[methodName];
+ return function(number, precision) {
+ number = toNumber(number);
+ precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
+ if (precision && nativeIsFinite(number)) {
+ // Shift with exponential notation to avoid floating-point issues.
+ // See [MDN](https://mdn.io/round#Examples) for more details.
+ var pair = (toString(number) + 'e').split('e'),
+ value = func(pair[0] + 'e' + (+pair[1] + precision));
+
+ pair = (toString(value) + 'e').split('e');
+ return +(pair[0] + 'e' + (+pair[1] - precision));
+ }
+ return func(number);
+ };
+}
+
+module.exports = createRound;
diff --git a/node_modules/lodash/_createSet.js b/node_modules/lodash/_createSet.js
new file mode 100644
index 0000000..0f644ee
--- /dev/null
+++ b/node_modules/lodash/_createSet.js
@@ -0,0 +1,19 @@
+var Set = require('./_Set'),
+ noop = require('./noop'),
+ setToArray = require('./_setToArray');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/**
+ * Creates a set object of `values`.
+ *
+ * @private
+ * @param {Array} values The values to add to the set.
+ * @returns {Object} Returns the new set.
+ */
+var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
+ return new Set(values);
+};
+
+module.exports = createSet;
diff --git a/node_modules/lodash/_createToPairs.js b/node_modules/lodash/_createToPairs.js
new file mode 100644
index 0000000..568417a
--- /dev/null
+++ b/node_modules/lodash/_createToPairs.js
@@ -0,0 +1,30 @@
+var baseToPairs = require('./_baseToPairs'),
+ getTag = require('./_getTag'),
+ mapToArray = require('./_mapToArray'),
+ setToPairs = require('./_setToPairs');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ setTag = '[object Set]';
+
+/**
+ * Creates a `_.toPairs` or `_.toPairsIn` function.
+ *
+ * @private
+ * @param {Function} keysFunc The function to get the keys of a given object.
+ * @returns {Function} Returns the new pairs function.
+ */
+function createToPairs(keysFunc) {
+ return function(object) {
+ var tag = getTag(object);
+ if (tag == mapTag) {
+ return mapToArray(object);
+ }
+ if (tag == setTag) {
+ return setToPairs(object);
+ }
+ return baseToPairs(object, keysFunc(object));
+ };
+}
+
+module.exports = createToPairs;
diff --git a/node_modules/lodash/_createWrap.js b/node_modules/lodash/_createWrap.js
new file mode 100644
index 0000000..33f0633
--- /dev/null
+++ b/node_modules/lodash/_createWrap.js
@@ -0,0 +1,106 @@
+var baseSetData = require('./_baseSetData'),
+ createBind = require('./_createBind'),
+ createCurry = require('./_createCurry'),
+ createHybrid = require('./_createHybrid'),
+ createPartial = require('./_createPartial'),
+ getData = require('./_getData'),
+ mergeData = require('./_mergeData'),
+ setData = require('./_setData'),
+ setWrapToString = require('./_setWrapToString'),
+ toInteger = require('./toInteger');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_CURRY_RIGHT_FLAG = 16,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_PARTIAL_RIGHT_FLAG = 64;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Creates a function that either curries or invokes `func` with optional
+ * `this` binding and partially applied arguments.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags.
+ * 1 - `_.bind`
+ * 2 - `_.bindKey`
+ * 4 - `_.curry` or `_.curryRight` of a bound function
+ * 8 - `_.curry`
+ * 16 - `_.curryRight`
+ * 32 - `_.partial`
+ * 64 - `_.partialRight`
+ * 128 - `_.rearg`
+ * 256 - `_.ary`
+ * 512 - `_.flip`
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to be partially applied.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
+ var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
+ if (!isBindKey && typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var length = partials ? partials.length : 0;
+ if (!length) {
+ bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
+ partials = holders = undefined;
+ }
+ ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
+ arity = arity === undefined ? arity : toInteger(arity);
+ length -= holders ? holders.length : 0;
+
+ if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
+ var partialsRight = partials,
+ holdersRight = holders;
+
+ partials = holders = undefined;
+ }
+ var data = isBindKey ? undefined : getData(func);
+
+ var newData = [
+ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
+ argPos, ary, arity
+ ];
+
+ if (data) {
+ mergeData(newData, data);
+ }
+ func = newData[0];
+ bitmask = newData[1];
+ thisArg = newData[2];
+ partials = newData[3];
+ holders = newData[4];
+ arity = newData[9] = newData[9] === undefined
+ ? (isBindKey ? 0 : func.length)
+ : nativeMax(newData[9] - length, 0);
+
+ if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
+ bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
+ }
+ if (!bitmask || bitmask == WRAP_BIND_FLAG) {
+ var result = createBind(func, bitmask, thisArg);
+ } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
+ result = createCurry(func, bitmask, arity);
+ } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
+ result = createPartial(func, bitmask, thisArg, partials);
+ } else {
+ result = createHybrid.apply(undefined, newData);
+ }
+ var setter = data ? baseSetData : setData;
+ return setWrapToString(setter(result, newData), func, bitmask);
+}
+
+module.exports = createWrap;
diff --git a/node_modules/lodash/_customDefaultsAssignIn.js b/node_modules/lodash/_customDefaultsAssignIn.js
new file mode 100644
index 0000000..1f49e6f
--- /dev/null
+++ b/node_modules/lodash/_customDefaultsAssignIn.js
@@ -0,0 +1,29 @@
+var eq = require('./eq');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
+ * of source objects to the destination object for all destination properties
+ * that resolve to `undefined`.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to assign.
+ * @param {Object} object The parent object of `objValue`.
+ * @returns {*} Returns the value to assign.
+ */
+function customDefaultsAssignIn(objValue, srcValue, key, object) {
+ if (objValue === undefined ||
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ return srcValue;
+ }
+ return objValue;
+}
+
+module.exports = customDefaultsAssignIn;
diff --git a/node_modules/lodash/_customDefaultsMerge.js b/node_modules/lodash/_customDefaultsMerge.js
new file mode 100644
index 0000000..4cab317
--- /dev/null
+++ b/node_modules/lodash/_customDefaultsMerge.js
@@ -0,0 +1,28 @@
+var baseMerge = require('./_baseMerge'),
+ isObject = require('./isObject');
+
+/**
+ * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
+ * objects into destination objects that are passed thru.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to merge.
+ * @param {Object} object The parent object of `objValue`.
+ * @param {Object} source The parent object of `srcValue`.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ * @returns {*} Returns the value to assign.
+ */
+function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
+ if (isObject(objValue) && isObject(srcValue)) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, objValue);
+ baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
+ stack['delete'](srcValue);
+ }
+ return objValue;
+}
+
+module.exports = customDefaultsMerge;
diff --git a/node_modules/lodash/_customOmitClone.js b/node_modules/lodash/_customOmitClone.js
new file mode 100644
index 0000000..968db2e
--- /dev/null
+++ b/node_modules/lodash/_customOmitClone.js
@@ -0,0 +1,16 @@
+var isPlainObject = require('./isPlainObject');
+
+/**
+ * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
+ * objects.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {string} key The key of the property to inspect.
+ * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
+ */
+function customOmitClone(value) {
+ return isPlainObject(value) ? undefined : value;
+}
+
+module.exports = customOmitClone;
diff --git a/node_modules/lodash/_deburrLetter.js b/node_modules/lodash/_deburrLetter.js
new file mode 100644
index 0000000..3e531ed
--- /dev/null
+++ b/node_modules/lodash/_deburrLetter.js
@@ -0,0 +1,71 @@
+var basePropertyOf = require('./_basePropertyOf');
+
+/** Used to map Latin Unicode letters to basic Latin letters. */
+var deburredLetters = {
+ // Latin-1 Supplement block.
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
+ '\xc7': 'C', '\xe7': 'c',
+ '\xd0': 'D', '\xf0': 'd',
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
+ '\xd1': 'N', '\xf1': 'n',
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
+ '\xc6': 'Ae', '\xe6': 'ae',
+ '\xde': 'Th', '\xfe': 'th',
+ '\xdf': 'ss',
+ // Latin Extended-A block.
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
+ '\u0134': 'J', '\u0135': 'j',
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
+ '\u0174': 'W', '\u0175': 'w',
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
+ '\u0132': 'IJ', '\u0133': 'ij',
+ '\u0152': 'Oe', '\u0153': 'oe',
+ '\u0149': "'n", '\u017f': 's'
+};
+
+/**
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
+ * letters to basic Latin letters.
+ *
+ * @private
+ * @param {string} letter The matched letter to deburr.
+ * @returns {string} Returns the deburred letter.
+ */
+var deburrLetter = basePropertyOf(deburredLetters);
+
+module.exports = deburrLetter;
diff --git a/node_modules/lodash/_defineProperty.js b/node_modules/lodash/_defineProperty.js
new file mode 100644
index 0000000..b6116d9
--- /dev/null
+++ b/node_modules/lodash/_defineProperty.js
@@ -0,0 +1,11 @@
+var getNative = require('./_getNative');
+
+var defineProperty = (function() {
+ try {
+ var func = getNative(Object, 'defineProperty');
+ func({}, '', {});
+ return func;
+ } catch (e) {}
+}());
+
+module.exports = defineProperty;
diff --git a/node_modules/lodash/_equalArrays.js b/node_modules/lodash/_equalArrays.js
new file mode 100644
index 0000000..824228c
--- /dev/null
+++ b/node_modules/lodash/_equalArrays.js
@@ -0,0 +1,84 @@
+var SetCache = require('./_SetCache'),
+ arraySome = require('./_arraySome'),
+ cacheHas = require('./_cacheHas');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Check that cyclic values are equal.
+ var arrStacked = stack.get(array);
+ var othStacked = stack.get(other);
+ if (arrStacked && othStacked) {
+ return arrStacked == other && othStacked == array;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
+
+ stack.set(array, other);
+ stack.set(other, array);
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!arraySome(other, function(othValue, othIndex) {
+ if (!cacheHas(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ stack['delete'](array);
+ stack['delete'](other);
+ return result;
+}
+
+module.exports = equalArrays;
diff --git a/node_modules/lodash/_equalByTag.js b/node_modules/lodash/_equalByTag.js
new file mode 100644
index 0000000..71919e8
--- /dev/null
+++ b/node_modules/lodash/_equalByTag.js
@@ -0,0 +1,112 @@
+var Symbol = require('./_Symbol'),
+ Uint8Array = require('./_Uint8Array'),
+ eq = require('./eq'),
+ equalArrays = require('./_equalArrays'),
+ mapToArray = require('./_mapToArray'),
+ setToArray = require('./_setToArray');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+/** `Object#toString` result references. */
+var boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]';
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
+ switch (tag) {
+ case dataViewTag:
+ if ((object.byteLength != other.byteLength) ||
+ (object.byteOffset != other.byteOffset)) {
+ return false;
+ }
+ object = object.buffer;
+ other = other.buffer;
+
+ case arrayBufferTag:
+ if ((object.byteLength != other.byteLength) ||
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+ return false;
+ }
+ return true;
+
+ case boolTag:
+ case dateTag:
+ case numberTag:
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
+ // Invalid dates are coerced to `NaN`.
+ return eq(+object, +other);
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ case mapTag:
+ var convert = mapToArray;
+
+ case setTag:
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
+ convert || (convert = setToArray);
+
+ if (object.size != other.size && !isPartial) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ bitmask |= COMPARE_UNORDERED_FLAG;
+
+ // Recursively compare objects (susceptible to call stack limits).
+ stack.set(object, other);
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
+ stack['delete'](object);
+ return result;
+
+ case symbolTag:
+ if (symbolValueOf) {
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
+ }
+ }
+ return false;
+}
+
+module.exports = equalByTag;
diff --git a/node_modules/lodash/_equalObjects.js b/node_modules/lodash/_equalObjects.js
new file mode 100644
index 0000000..cdaacd2
--- /dev/null
+++ b/node_modules/lodash/_equalObjects.js
@@ -0,0 +1,90 @@
+var getAllKeys = require('./_getAllKeys');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1;
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ objProps = getAllKeys(object),
+ objLength = objProps.length,
+ othProps = getAllKeys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Check that cyclic values are equal.
+ var objStacked = stack.get(object);
+ var othStacked = stack.get(other);
+ if (objStacked && othStacked) {
+ return objStacked == other && othStacked == object;
+ }
+ var result = true;
+ stack.set(object, other);
+ stack.set(other, object);
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
+ }
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ stack['delete'](object);
+ stack['delete'](other);
+ return result;
+}
+
+module.exports = equalObjects;
diff --git a/node_modules/lodash/_escapeHtmlChar.js b/node_modules/lodash/_escapeHtmlChar.js
new file mode 100644
index 0000000..7ca68ee
--- /dev/null
+++ b/node_modules/lodash/_escapeHtmlChar.js
@@ -0,0 +1,21 @@
+var basePropertyOf = require('./_basePropertyOf');
+
+/** Used to map characters to HTML entities. */
+var htmlEscapes = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;'
+};
+
+/**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+var escapeHtmlChar = basePropertyOf(htmlEscapes);
+
+module.exports = escapeHtmlChar;
diff --git a/node_modules/lodash/_escapeStringChar.js b/node_modules/lodash/_escapeStringChar.js
new file mode 100644
index 0000000..44eca96
--- /dev/null
+++ b/node_modules/lodash/_escapeStringChar.js
@@ -0,0 +1,22 @@
+/** Used to escape characters for inclusion in compiled string literals. */
+var stringEscapes = {
+ '\\': '\\',
+ "'": "'",
+ '\n': 'n',
+ '\r': 'r',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+};
+
+/**
+ * Used by `_.template` to escape characters for inclusion in compiled string literals.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+function escapeStringChar(chr) {
+ return '\\' + stringEscapes[chr];
+}
+
+module.exports = escapeStringChar;
diff --git a/node_modules/lodash/_flatRest.js b/node_modules/lodash/_flatRest.js
new file mode 100644
index 0000000..94ab6cc
--- /dev/null
+++ b/node_modules/lodash/_flatRest.js
@@ -0,0 +1,16 @@
+var flatten = require('./flatten'),
+ overRest = require('./_overRest'),
+ setToString = require('./_setToString');
+
+/**
+ * A specialized version of `baseRest` which flattens the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+function flatRest(func) {
+ return setToString(overRest(func, undefined, flatten), func + '');
+}
+
+module.exports = flatRest;
diff --git a/node_modules/lodash/_freeGlobal.js b/node_modules/lodash/_freeGlobal.js
new file mode 100644
index 0000000..bbec998
--- /dev/null
+++ b/node_modules/lodash/_freeGlobal.js
@@ -0,0 +1,4 @@
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+module.exports = freeGlobal;
diff --git a/node_modules/lodash/_getAllKeys.js b/node_modules/lodash/_getAllKeys.js
new file mode 100644
index 0000000..a9ce699
--- /dev/null
+++ b/node_modules/lodash/_getAllKeys.js
@@ -0,0 +1,16 @@
+var baseGetAllKeys = require('./_baseGetAllKeys'),
+ getSymbols = require('./_getSymbols'),
+ keys = require('./keys');
+
+/**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function getAllKeys(object) {
+ return baseGetAllKeys(object, keys, getSymbols);
+}
+
+module.exports = getAllKeys;
diff --git a/node_modules/lodash/_getAllKeysIn.js b/node_modules/lodash/_getAllKeysIn.js
new file mode 100644
index 0000000..1b46678
--- /dev/null
+++ b/node_modules/lodash/_getAllKeysIn.js
@@ -0,0 +1,17 @@
+var baseGetAllKeys = require('./_baseGetAllKeys'),
+ getSymbolsIn = require('./_getSymbolsIn'),
+ keysIn = require('./keysIn');
+
+/**
+ * Creates an array of own and inherited enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function getAllKeysIn(object) {
+ return baseGetAllKeys(object, keysIn, getSymbolsIn);
+}
+
+module.exports = getAllKeysIn;
diff --git a/node_modules/lodash/_getData.js b/node_modules/lodash/_getData.js
new file mode 100644
index 0000000..a1fe7b7
--- /dev/null
+++ b/node_modules/lodash/_getData.js
@@ -0,0 +1,15 @@
+var metaMap = require('./_metaMap'),
+ noop = require('./noop');
+
+/**
+ * Gets metadata for `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {*} Returns the metadata for `func`.
+ */
+var getData = !metaMap ? noop : function(func) {
+ return metaMap.get(func);
+};
+
+module.exports = getData;
diff --git a/node_modules/lodash/_getFuncName.js b/node_modules/lodash/_getFuncName.js
new file mode 100644
index 0000000..21e15b3
--- /dev/null
+++ b/node_modules/lodash/_getFuncName.js
@@ -0,0 +1,31 @@
+var realNames = require('./_realNames');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Gets the name of `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {string} Returns the function name.
+ */
+function getFuncName(func) {
+ var result = (func.name + ''),
+ array = realNames[result],
+ length = hasOwnProperty.call(realNames, result) ? array.length : 0;
+
+ while (length--) {
+ var data = array[length],
+ otherFunc = data.func;
+ if (otherFunc == null || otherFunc == func) {
+ return data.name;
+ }
+ }
+ return result;
+}
+
+module.exports = getFuncName;
diff --git a/node_modules/lodash/_getHolder.js b/node_modules/lodash/_getHolder.js
new file mode 100644
index 0000000..65e94b5
--- /dev/null
+++ b/node_modules/lodash/_getHolder.js
@@ -0,0 +1,13 @@
+/**
+ * Gets the argument placeholder value for `func`.
+ *
+ * @private
+ * @param {Function} func The function to inspect.
+ * @returns {*} Returns the placeholder value.
+ */
+function getHolder(func) {
+ var object = func;
+ return object.placeholder;
+}
+
+module.exports = getHolder;
diff --git a/node_modules/lodash/_getMapData.js b/node_modules/lodash/_getMapData.js
new file mode 100644
index 0000000..17f6303
--- /dev/null
+++ b/node_modules/lodash/_getMapData.js
@@ -0,0 +1,18 @@
+var isKeyable = require('./_isKeyable');
+
+/**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+}
+
+module.exports = getMapData;
diff --git a/node_modules/lodash/_getMatchData.js b/node_modules/lodash/_getMatchData.js
new file mode 100644
index 0000000..2cc70f9
--- /dev/null
+++ b/node_modules/lodash/_getMatchData.js
@@ -0,0 +1,24 @@
+var isStrictComparable = require('./_isStrictComparable'),
+ keys = require('./keys');
+
+/**
+ * Gets the property names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+function getMatchData(object) {
+ var result = keys(object),
+ length = result.length;
+
+ while (length--) {
+ var key = result[length],
+ value = object[key];
+
+ result[length] = [key, value, isStrictComparable(value)];
+ }
+ return result;
+}
+
+module.exports = getMatchData;
diff --git a/node_modules/lodash/_getNative.js b/node_modules/lodash/_getNative.js
new file mode 100644
index 0000000..97a622b
--- /dev/null
+++ b/node_modules/lodash/_getNative.js
@@ -0,0 +1,17 @@
+var baseIsNative = require('./_baseIsNative'),
+ getValue = require('./_getValue');
+
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+}
+
+module.exports = getNative;
diff --git a/node_modules/lodash/_getPrototype.js b/node_modules/lodash/_getPrototype.js
new file mode 100644
index 0000000..e808612
--- /dev/null
+++ b/node_modules/lodash/_getPrototype.js
@@ -0,0 +1,6 @@
+var overArg = require('./_overArg');
+
+/** Built-in value references. */
+var getPrototype = overArg(Object.getPrototypeOf, Object);
+
+module.exports = getPrototype;
diff --git a/node_modules/lodash/_getRawTag.js b/node_modules/lodash/_getRawTag.js
new file mode 100644
index 0000000..49a95c9
--- /dev/null
+++ b/node_modules/lodash/_getRawTag.js
@@ -0,0 +1,46 @@
+var Symbol = require('./_Symbol');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.toString;
+
+/** Built-in value references. */
+var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+/**
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the raw `toStringTag`.
+ */
+function getRawTag(value) {
+ var isOwn = hasOwnProperty.call(value, symToStringTag),
+ tag = value[symToStringTag];
+
+ try {
+ value[symToStringTag] = undefined;
+ var unmasked = true;
+ } catch (e) {}
+
+ var result = nativeObjectToString.call(value);
+ if (unmasked) {
+ if (isOwn) {
+ value[symToStringTag] = tag;
+ } else {
+ delete value[symToStringTag];
+ }
+ }
+ return result;
+}
+
+module.exports = getRawTag;
diff --git a/node_modules/lodash/_getSymbols.js b/node_modules/lodash/_getSymbols.js
new file mode 100644
index 0000000..7d6eafe
--- /dev/null
+++ b/node_modules/lodash/_getSymbols.js
@@ -0,0 +1,30 @@
+var arrayFilter = require('./_arrayFilter'),
+ stubArray = require('./stubArray');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeGetSymbols = Object.getOwnPropertySymbols;
+
+/**
+ * Creates an array of the own enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
+ if (object == null) {
+ return [];
+ }
+ object = Object(object);
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
+ return propertyIsEnumerable.call(object, symbol);
+ });
+};
+
+module.exports = getSymbols;
diff --git a/node_modules/lodash/_getSymbolsIn.js b/node_modules/lodash/_getSymbolsIn.js
new file mode 100644
index 0000000..cec0855
--- /dev/null
+++ b/node_modules/lodash/_getSymbolsIn.js
@@ -0,0 +1,25 @@
+var arrayPush = require('./_arrayPush'),
+ getPrototype = require('./_getPrototype'),
+ getSymbols = require('./_getSymbols'),
+ stubArray = require('./stubArray');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeGetSymbols = Object.getOwnPropertySymbols;
+
+/**
+ * Creates an array of the own and inherited enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
+ var result = [];
+ while (object) {
+ arrayPush(result, getSymbols(object));
+ object = getPrototype(object);
+ }
+ return result;
+};
+
+module.exports = getSymbolsIn;
diff --git a/node_modules/lodash/_getTag.js b/node_modules/lodash/_getTag.js
new file mode 100644
index 0000000..deaf89d
--- /dev/null
+++ b/node_modules/lodash/_getTag.js
@@ -0,0 +1,58 @@
+var DataView = require('./_DataView'),
+ Map = require('./_Map'),
+ Promise = require('./_Promise'),
+ Set = require('./_Set'),
+ WeakMap = require('./_WeakMap'),
+ baseGetTag = require('./_baseGetTag'),
+ toSource = require('./_toSource');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ setTag = '[object Set]',
+ weakMapTag = '[object WeakMap]';
+
+var dataViewTag = '[object DataView]';
+
+/** Used to detect maps, sets, and weakmaps. */
+var dataViewCtorString = toSource(DataView),
+ mapCtorString = toSource(Map),
+ promiseCtorString = toSource(Promise),
+ setCtorString = toSource(Set),
+ weakMapCtorString = toSource(WeakMap);
+
+/**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+var getTag = baseGetTag;
+
+// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
+if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+ (Map && getTag(new Map) != mapTag) ||
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = baseGetTag(value),
+ Ctor = result == objectTag ? value.constructor : undefined,
+ ctorString = Ctor ? toSource(Ctor) : '';
+
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
+ }
+ return result;
+ };
+}
+
+module.exports = getTag;
diff --git a/node_modules/lodash/_getValue.js b/node_modules/lodash/_getValue.js
new file mode 100644
index 0000000..5f7d773
--- /dev/null
+++ b/node_modules/lodash/_getValue.js
@@ -0,0 +1,13 @@
+/**
+ * Gets the value at `key` of `object`.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+function getValue(object, key) {
+ return object == null ? undefined : object[key];
+}
+
+module.exports = getValue;
diff --git a/node_modules/lodash/_getView.js b/node_modules/lodash/_getView.js
new file mode 100644
index 0000000..df1e5d4
--- /dev/null
+++ b/node_modules/lodash/_getView.js
@@ -0,0 +1,33 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max,
+ nativeMin = Math.min;
+
+/**
+ * Gets the view, applying any `transforms` to the `start` and `end` positions.
+ *
+ * @private
+ * @param {number} start The start of the view.
+ * @param {number} end The end of the view.
+ * @param {Array} transforms The transformations to apply to the view.
+ * @returns {Object} Returns an object containing the `start` and `end`
+ * positions of the view.
+ */
+function getView(start, end, transforms) {
+ var index = -1,
+ length = transforms.length;
+
+ while (++index < length) {
+ var data = transforms[index],
+ size = data.size;
+
+ switch (data.type) {
+ case 'drop': start += size; break;
+ case 'dropRight': end -= size; break;
+ case 'take': end = nativeMin(end, start + size); break;
+ case 'takeRight': start = nativeMax(start, end - size); break;
+ }
+ }
+ return { 'start': start, 'end': end };
+}
+
+module.exports = getView;
diff --git a/node_modules/lodash/_getWrapDetails.js b/node_modules/lodash/_getWrapDetails.js
new file mode 100644
index 0000000..3bcc6e4
--- /dev/null
+++ b/node_modules/lodash/_getWrapDetails.js
@@ -0,0 +1,17 @@
+/** Used to match wrap detail comments. */
+var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
+ reSplitDetails = /,? & /;
+
+/**
+ * Extracts wrapper details from the `source` body comment.
+ *
+ * @private
+ * @param {string} source The source to inspect.
+ * @returns {Array} Returns the wrapper details.
+ */
+function getWrapDetails(source) {
+ var match = source.match(reWrapDetails);
+ return match ? match[1].split(reSplitDetails) : [];
+}
+
+module.exports = getWrapDetails;
diff --git a/node_modules/lodash/_hasPath.js b/node_modules/lodash/_hasPath.js
new file mode 100644
index 0000000..93dbde1
--- /dev/null
+++ b/node_modules/lodash/_hasPath.js
@@ -0,0 +1,39 @@
+var castPath = require('./_castPath'),
+ isArguments = require('./isArguments'),
+ isArray = require('./isArray'),
+ isIndex = require('./_isIndex'),
+ isLength = require('./isLength'),
+ toKey = require('./_toKey');
+
+/**
+ * Checks if `path` exists on `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @param {Function} hasFunc The function to check properties.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ */
+function hasPath(object, path, hasFunc) {
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ result = false;
+
+ while (++index < length) {
+ var key = toKey(path[index]);
+ if (!(result = object != null && hasFunc(object, key))) {
+ break;
+ }
+ object = object[key];
+ }
+ if (result || ++index != length) {
+ return result;
+ }
+ length = object == null ? 0 : object.length;
+ return !!length && isLength(length) && isIndex(key, length) &&
+ (isArray(object) || isArguments(object));
+}
+
+module.exports = hasPath;
diff --git a/node_modules/lodash/_hasUnicode.js b/node_modules/lodash/_hasUnicode.js
new file mode 100644
index 0000000..cb6ca15
--- /dev/null
+++ b/node_modules/lodash/_hasUnicode.js
@@ -0,0 +1,26 @@
+/** Used to compose unicode character classes. */
+var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsVarRange = '\\ufe0e\\ufe0f';
+
+/** Used to compose unicode capture groups. */
+var rsZWJ = '\\u200d';
+
+/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
+var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
+
+/**
+ * Checks if `string` contains Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a symbol is found, else `false`.
+ */
+function hasUnicode(string) {
+ return reHasUnicode.test(string);
+}
+
+module.exports = hasUnicode;
diff --git a/node_modules/lodash/_hasUnicodeWord.js b/node_modules/lodash/_hasUnicodeWord.js
new file mode 100644
index 0000000..95d52c4
--- /dev/null
+++ b/node_modules/lodash/_hasUnicodeWord.js
@@ -0,0 +1,15 @@
+/** Used to detect strings that need a more robust regexp to match words. */
+var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
+
+/**
+ * Checks if `string` contains a word composed of Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
+ */
+function hasUnicodeWord(string) {
+ return reHasUnicodeWord.test(string);
+}
+
+module.exports = hasUnicodeWord;
diff --git a/node_modules/lodash/_hashClear.js b/node_modules/lodash/_hashClear.js
new file mode 100644
index 0000000..5d4b70c
--- /dev/null
+++ b/node_modules/lodash/_hashClear.js
@@ -0,0 +1,15 @@
+var nativeCreate = require('./_nativeCreate');
+
+/**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ this.size = 0;
+}
+
+module.exports = hashClear;
diff --git a/node_modules/lodash/_hashDelete.js b/node_modules/lodash/_hashDelete.js
new file mode 100644
index 0000000..ea9dabf
--- /dev/null
+++ b/node_modules/lodash/_hashDelete.js
@@ -0,0 +1,17 @@
+/**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function hashDelete(key) {
+ var result = this.has(key) && delete this.__data__[key];
+ this.size -= result ? 1 : 0;
+ return result;
+}
+
+module.exports = hashDelete;
diff --git a/node_modules/lodash/_hashGet.js b/node_modules/lodash/_hashGet.js
new file mode 100644
index 0000000..1fc2f34
--- /dev/null
+++ b/node_modules/lodash/_hashGet.js
@@ -0,0 +1,30 @@
+var nativeCreate = require('./_nativeCreate');
+
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+}
+
+module.exports = hashGet;
diff --git a/node_modules/lodash/_hashHas.js b/node_modules/lodash/_hashHas.js
new file mode 100644
index 0000000..281a551
--- /dev/null
+++ b/node_modules/lodash/_hashHas.js
@@ -0,0 +1,23 @@
+var nativeCreate = require('./_nativeCreate');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
+}
+
+module.exports = hashHas;
diff --git a/node_modules/lodash/_hashSet.js b/node_modules/lodash/_hashSet.js
new file mode 100644
index 0000000..e105528
--- /dev/null
+++ b/node_modules/lodash/_hashSet.js
@@ -0,0 +1,23 @@
+var nativeCreate = require('./_nativeCreate');
+
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+function hashSet(key, value) {
+ var data = this.__data__;
+ this.size += this.has(key) ? 0 : 1;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+}
+
+module.exports = hashSet;
diff --git a/node_modules/lodash/_initCloneArray.js b/node_modules/lodash/_initCloneArray.js
new file mode 100644
index 0000000..078c15a
--- /dev/null
+++ b/node_modules/lodash/_initCloneArray.js
@@ -0,0 +1,26 @@
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Initializes an array clone.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the initialized clone.
+ */
+function initCloneArray(array) {
+ var length = array.length,
+ result = new array.constructor(length);
+
+ // Add properties assigned by `RegExp#exec`.
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
+}
+
+module.exports = initCloneArray;
diff --git a/node_modules/lodash/_initCloneByTag.js b/node_modules/lodash/_initCloneByTag.js
new file mode 100644
index 0000000..f69a008
--- /dev/null
+++ b/node_modules/lodash/_initCloneByTag.js
@@ -0,0 +1,77 @@
+var cloneArrayBuffer = require('./_cloneArrayBuffer'),
+ cloneDataView = require('./_cloneDataView'),
+ cloneRegExp = require('./_cloneRegExp'),
+ cloneSymbol = require('./_cloneSymbol'),
+ cloneTypedArray = require('./_cloneTypedArray');
+
+/** `Object#toString` result references. */
+var boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+/**
+ * Initializes an object clone based on its `toStringTag`.
+ *
+ * **Note:** This function only supports cloning values with tags of
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {string} tag The `toStringTag` of the object to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+function initCloneByTag(object, tag, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return cloneArrayBuffer(object);
+
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
+
+ case dataViewTag:
+ return cloneDataView(object, isDeep);
+
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ return cloneTypedArray(object, isDeep);
+
+ case mapTag:
+ return new Ctor;
+
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
+
+ case regexpTag:
+ return cloneRegExp(object);
+
+ case setTag:
+ return new Ctor;
+
+ case symbolTag:
+ return cloneSymbol(object);
+ }
+}
+
+module.exports = initCloneByTag;
diff --git a/node_modules/lodash/_initCloneObject.js b/node_modules/lodash/_initCloneObject.js
new file mode 100644
index 0000000..5a13e64
--- /dev/null
+++ b/node_modules/lodash/_initCloneObject.js
@@ -0,0 +1,18 @@
+var baseCreate = require('./_baseCreate'),
+ getPrototype = require('./_getPrototype'),
+ isPrototype = require('./_isPrototype');
+
+/**
+ * Initializes an object clone.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+function initCloneObject(object) {
+ return (typeof object.constructor == 'function' && !isPrototype(object))
+ ? baseCreate(getPrototype(object))
+ : {};
+}
+
+module.exports = initCloneObject;
diff --git a/node_modules/lodash/_insertWrapDetails.js b/node_modules/lodash/_insertWrapDetails.js
new file mode 100644
index 0000000..e790808
--- /dev/null
+++ b/node_modules/lodash/_insertWrapDetails.js
@@ -0,0 +1,23 @@
+/** Used to match wrap detail comments. */
+var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;
+
+/**
+ * Inserts wrapper `details` in a comment at the top of the `source` body.
+ *
+ * @private
+ * @param {string} source The source to modify.
+ * @returns {Array} details The details to insert.
+ * @returns {string} Returns the modified source.
+ */
+function insertWrapDetails(source, details) {
+ var length = details.length;
+ if (!length) {
+ return source;
+ }
+ var lastIndex = length - 1;
+ details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
+ details = details.join(length > 2 ? ', ' : ' ');
+ return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
+}
+
+module.exports = insertWrapDetails;
diff --git a/node_modules/lodash/_isFlattenable.js b/node_modules/lodash/_isFlattenable.js
new file mode 100644
index 0000000..4cc2c24
--- /dev/null
+++ b/node_modules/lodash/_isFlattenable.js
@@ -0,0 +1,20 @@
+var Symbol = require('./_Symbol'),
+ isArguments = require('./isArguments'),
+ isArray = require('./isArray');
+
+/** Built-in value references. */
+var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
+
+/**
+ * Checks if `value` is a flattenable `arguments` object or array.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+function isFlattenable(value) {
+ return isArray(value) || isArguments(value) ||
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
+}
+
+module.exports = isFlattenable;
diff --git a/node_modules/lodash/_isIndex.js b/node_modules/lodash/_isIndex.js
new file mode 100644
index 0000000..061cd39
--- /dev/null
+++ b/node_modules/lodash/_isIndex.js
@@ -0,0 +1,25 @@
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/** Used to detect unsigned integer values. */
+var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+ var type = typeof value;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+
+ return !!length &&
+ (type == 'number' ||
+ (type != 'symbol' && reIsUint.test(value))) &&
+ (value > -1 && value % 1 == 0 && value < length);
+}
+
+module.exports = isIndex;
diff --git a/node_modules/lodash/_isIterateeCall.js b/node_modules/lodash/_isIterateeCall.js
new file mode 100644
index 0000000..a0bb5a9
--- /dev/null
+++ b/node_modules/lodash/_isIterateeCall.js
@@ -0,0 +1,30 @@
+var eq = require('./eq'),
+ isArrayLike = require('./isArrayLike'),
+ isIndex = require('./_isIndex'),
+ isObject = require('./isObject');
+
+/**
+ * Checks if the given arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ * else `false`.
+ */
+function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)
+ ) {
+ return eq(object[index], value);
+ }
+ return false;
+}
+
+module.exports = isIterateeCall;
diff --git a/node_modules/lodash/_isKey.js b/node_modules/lodash/_isKey.js
new file mode 100644
index 0000000..ff08b06
--- /dev/null
+++ b/node_modules/lodash/_isKey.js
@@ -0,0 +1,29 @@
+var isArray = require('./isArray'),
+ isSymbol = require('./isSymbol');
+
+/** Used to match property names within property paths. */
+var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/;
+
+/**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+function isKey(value, object) {
+ if (isArray(value)) {
+ return false;
+ }
+ var type = typeof value;
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+ value == null || isSymbol(value)) {
+ return true;
+ }
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+ (object != null && value in Object(object));
+}
+
+module.exports = isKey;
diff --git a/node_modules/lodash/_isKeyable.js b/node_modules/lodash/_isKeyable.js
new file mode 100644
index 0000000..39f1828
--- /dev/null
+++ b/node_modules/lodash/_isKeyable.js
@@ -0,0 +1,15 @@
+/**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+}
+
+module.exports = isKeyable;
diff --git a/node_modules/lodash/_isLaziable.js b/node_modules/lodash/_isLaziable.js
new file mode 100644
index 0000000..a57c4f2
--- /dev/null
+++ b/node_modules/lodash/_isLaziable.js
@@ -0,0 +1,28 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ getData = require('./_getData'),
+ getFuncName = require('./_getFuncName'),
+ lodash = require('./wrapperLodash');
+
+/**
+ * Checks if `func` has a lazy counterpart.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
+ * else `false`.
+ */
+function isLaziable(func) {
+ var funcName = getFuncName(func),
+ other = lodash[funcName];
+
+ if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
+ return false;
+ }
+ if (func === other) {
+ return true;
+ }
+ var data = getData(other);
+ return !!data && func === data[0];
+}
+
+module.exports = isLaziable;
diff --git a/node_modules/lodash/_isMaskable.js b/node_modules/lodash/_isMaskable.js
new file mode 100644
index 0000000..eb98d09
--- /dev/null
+++ b/node_modules/lodash/_isMaskable.js
@@ -0,0 +1,14 @@
+var coreJsData = require('./_coreJsData'),
+ isFunction = require('./isFunction'),
+ stubFalse = require('./stubFalse');
+
+/**
+ * Checks if `func` is capable of being masked.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
+ */
+var isMaskable = coreJsData ? isFunction : stubFalse;
+
+module.exports = isMaskable;
diff --git a/node_modules/lodash/_isMasked.js b/node_modules/lodash/_isMasked.js
new file mode 100644
index 0000000..4b0f21b
--- /dev/null
+++ b/node_modules/lodash/_isMasked.js
@@ -0,0 +1,20 @@
+var coreJsData = require('./_coreJsData');
+
+/** Used to detect methods masquerading as native. */
+var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+}());
+
+/**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+function isMasked(func) {
+ return !!maskSrcKey && (maskSrcKey in func);
+}
+
+module.exports = isMasked;
diff --git a/node_modules/lodash/_isPrototype.js b/node_modules/lodash/_isPrototype.js
new file mode 100644
index 0000000..0f29498
--- /dev/null
+++ b/node_modules/lodash/_isPrototype.js
@@ -0,0 +1,18 @@
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+}
+
+module.exports = isPrototype;
diff --git a/node_modules/lodash/_isStrictComparable.js b/node_modules/lodash/_isStrictComparable.js
new file mode 100644
index 0000000..b59f40b
--- /dev/null
+++ b/node_modules/lodash/_isStrictComparable.js
@@ -0,0 +1,15 @@
+var isObject = require('./isObject');
+
+/**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+function isStrictComparable(value) {
+ return value === value && !isObject(value);
+}
+
+module.exports = isStrictComparable;
diff --git a/node_modules/lodash/_iteratorToArray.js b/node_modules/lodash/_iteratorToArray.js
new file mode 100644
index 0000000..4768566
--- /dev/null
+++ b/node_modules/lodash/_iteratorToArray.js
@@ -0,0 +1,18 @@
+/**
+ * Converts `iterator` to an array.
+ *
+ * @private
+ * @param {Object} iterator The iterator to convert.
+ * @returns {Array} Returns the converted array.
+ */
+function iteratorToArray(iterator) {
+ var data,
+ result = [];
+
+ while (!(data = iterator.next()).done) {
+ result.push(data.value);
+ }
+ return result;
+}
+
+module.exports = iteratorToArray;
diff --git a/node_modules/lodash/_lazyClone.js b/node_modules/lodash/_lazyClone.js
new file mode 100644
index 0000000..d8a51f8
--- /dev/null
+++ b/node_modules/lodash/_lazyClone.js
@@ -0,0 +1,23 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ copyArray = require('./_copyArray');
+
+/**
+ * Creates a clone of the lazy wrapper object.
+ *
+ * @private
+ * @name clone
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the cloned `LazyWrapper` object.
+ */
+function lazyClone() {
+ var result = new LazyWrapper(this.__wrapped__);
+ result.__actions__ = copyArray(this.__actions__);
+ result.__dir__ = this.__dir__;
+ result.__filtered__ = this.__filtered__;
+ result.__iteratees__ = copyArray(this.__iteratees__);
+ result.__takeCount__ = this.__takeCount__;
+ result.__views__ = copyArray(this.__views__);
+ return result;
+}
+
+module.exports = lazyClone;
diff --git a/node_modules/lodash/_lazyReverse.js b/node_modules/lodash/_lazyReverse.js
new file mode 100644
index 0000000..c5b5219
--- /dev/null
+++ b/node_modules/lodash/_lazyReverse.js
@@ -0,0 +1,23 @@
+var LazyWrapper = require('./_LazyWrapper');
+
+/**
+ * Reverses the direction of lazy iteration.
+ *
+ * @private
+ * @name reverse
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the new reversed `LazyWrapper` object.
+ */
+function lazyReverse() {
+ if (this.__filtered__) {
+ var result = new LazyWrapper(this);
+ result.__dir__ = -1;
+ result.__filtered__ = true;
+ } else {
+ result = this.clone();
+ result.__dir__ *= -1;
+ }
+ return result;
+}
+
+module.exports = lazyReverse;
diff --git a/node_modules/lodash/_lazyValue.js b/node_modules/lodash/_lazyValue.js
new file mode 100644
index 0000000..371ca8d
--- /dev/null
+++ b/node_modules/lodash/_lazyValue.js
@@ -0,0 +1,69 @@
+var baseWrapperValue = require('./_baseWrapperValue'),
+ getView = require('./_getView'),
+ isArray = require('./isArray');
+
+/** Used to indicate the type of lazy iteratees. */
+var LAZY_FILTER_FLAG = 1,
+ LAZY_MAP_FLAG = 2;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Extracts the unwrapped value from its lazy wrapper.
+ *
+ * @private
+ * @name value
+ * @memberOf LazyWrapper
+ * @returns {*} Returns the unwrapped value.
+ */
+function lazyValue() {
+ var array = this.__wrapped__.value(),
+ dir = this.__dir__,
+ isArr = isArray(array),
+ isRight = dir < 0,
+ arrLength = isArr ? array.length : 0,
+ view = getView(0, arrLength, this.__views__),
+ start = view.start,
+ end = view.end,
+ length = end - start,
+ index = isRight ? end : (start - 1),
+ iteratees = this.__iteratees__,
+ iterLength = iteratees.length,
+ resIndex = 0,
+ takeCount = nativeMin(length, this.__takeCount__);
+
+ if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
+ return baseWrapperValue(array, this.__actions__);
+ }
+ var result = [];
+
+ outer:
+ while (length-- && resIndex < takeCount) {
+ index += dir;
+
+ var iterIndex = -1,
+ value = array[index];
+
+ while (++iterIndex < iterLength) {
+ var data = iteratees[iterIndex],
+ iteratee = data.iteratee,
+ type = data.type,
+ computed = iteratee(value);
+
+ if (type == LAZY_MAP_FLAG) {
+ value = computed;
+ } else if (!computed) {
+ if (type == LAZY_FILTER_FLAG) {
+ continue outer;
+ } else {
+ break outer;
+ }
+ }
+ }
+ result[resIndex++] = value;
+ }
+ return result;
+}
+
+module.exports = lazyValue;
diff --git a/node_modules/lodash/_listCacheClear.js b/node_modules/lodash/_listCacheClear.js
new file mode 100644
index 0000000..acbe39a
--- /dev/null
+++ b/node_modules/lodash/_listCacheClear.js
@@ -0,0 +1,13 @@
+/**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+function listCacheClear() {
+ this.__data__ = [];
+ this.size = 0;
+}
+
+module.exports = listCacheClear;
diff --git a/node_modules/lodash/_listCacheDelete.js b/node_modules/lodash/_listCacheDelete.js
new file mode 100644
index 0000000..b1384ad
--- /dev/null
+++ b/node_modules/lodash/_listCacheDelete.js
@@ -0,0 +1,35 @@
+var assocIndexOf = require('./_assocIndexOf');
+
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/** Built-in value references. */
+var splice = arrayProto.splice;
+
+/**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ --this.size;
+ return true;
+}
+
+module.exports = listCacheDelete;
diff --git a/node_modules/lodash/_listCacheGet.js b/node_modules/lodash/_listCacheGet.js
new file mode 100644
index 0000000..f8192fc
--- /dev/null
+++ b/node_modules/lodash/_listCacheGet.js
@@ -0,0 +1,19 @@
+var assocIndexOf = require('./_assocIndexOf');
+
+/**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ return index < 0 ? undefined : data[index][1];
+}
+
+module.exports = listCacheGet;
diff --git a/node_modules/lodash/_listCacheHas.js b/node_modules/lodash/_listCacheHas.js
new file mode 100644
index 0000000..2adf671
--- /dev/null
+++ b/node_modules/lodash/_listCacheHas.js
@@ -0,0 +1,16 @@
+var assocIndexOf = require('./_assocIndexOf');
+
+/**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+}
+
+module.exports = listCacheHas;
diff --git a/node_modules/lodash/_listCacheSet.js b/node_modules/lodash/_listCacheSet.js
new file mode 100644
index 0000000..5855c95
--- /dev/null
+++ b/node_modules/lodash/_listCacheSet.js
@@ -0,0 +1,26 @@
+var assocIndexOf = require('./_assocIndexOf');
+
+/**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ ++this.size;
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+}
+
+module.exports = listCacheSet;
diff --git a/node_modules/lodash/_mapCacheClear.js b/node_modules/lodash/_mapCacheClear.js
new file mode 100644
index 0000000..bc9ca20
--- /dev/null
+++ b/node_modules/lodash/_mapCacheClear.js
@@ -0,0 +1,21 @@
+var Hash = require('./_Hash'),
+ ListCache = require('./_ListCache'),
+ Map = require('./_Map');
+
+/**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+function mapCacheClear() {
+ this.size = 0;
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
+}
+
+module.exports = mapCacheClear;
diff --git a/node_modules/lodash/_mapCacheDelete.js b/node_modules/lodash/_mapCacheDelete.js
new file mode 100644
index 0000000..946ca3c
--- /dev/null
+++ b/node_modules/lodash/_mapCacheDelete.js
@@ -0,0 +1,18 @@
+var getMapData = require('./_getMapData');
+
+/**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function mapCacheDelete(key) {
+ var result = getMapData(this, key)['delete'](key);
+ this.size -= result ? 1 : 0;
+ return result;
+}
+
+module.exports = mapCacheDelete;
diff --git a/node_modules/lodash/_mapCacheGet.js b/node_modules/lodash/_mapCacheGet.js
new file mode 100644
index 0000000..f29f55c
--- /dev/null
+++ b/node_modules/lodash/_mapCacheGet.js
@@ -0,0 +1,16 @@
+var getMapData = require('./_getMapData');
+
+/**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+}
+
+module.exports = mapCacheGet;
diff --git a/node_modules/lodash/_mapCacheHas.js b/node_modules/lodash/_mapCacheHas.js
new file mode 100644
index 0000000..a1214c0
--- /dev/null
+++ b/node_modules/lodash/_mapCacheHas.js
@@ -0,0 +1,16 @@
+var getMapData = require('./_getMapData');
+
+/**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+}
+
+module.exports = mapCacheHas;
diff --git a/node_modules/lodash/_mapCacheSet.js b/node_modules/lodash/_mapCacheSet.js
new file mode 100644
index 0000000..7346849
--- /dev/null
+++ b/node_modules/lodash/_mapCacheSet.js
@@ -0,0 +1,22 @@
+var getMapData = require('./_getMapData');
+
+/**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+function mapCacheSet(key, value) {
+ var data = getMapData(this, key),
+ size = data.size;
+
+ data.set(key, value);
+ this.size += data.size == size ? 0 : 1;
+ return this;
+}
+
+module.exports = mapCacheSet;
diff --git a/node_modules/lodash/_mapToArray.js b/node_modules/lodash/_mapToArray.js
new file mode 100644
index 0000000..fe3dd53
--- /dev/null
+++ b/node_modules/lodash/_mapToArray.js
@@ -0,0 +1,18 @@
+/**
+ * Converts `map` to its key-value pairs.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the key-value pairs.
+ */
+function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
+
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+}
+
+module.exports = mapToArray;
diff --git a/node_modules/lodash/_matchesStrictComparable.js b/node_modules/lodash/_matchesStrictComparable.js
new file mode 100644
index 0000000..f608af9
--- /dev/null
+++ b/node_modules/lodash/_matchesStrictComparable.js
@@ -0,0 +1,20 @@
+/**
+ * A specialized version of `matchesProperty` for source values suitable
+ * for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function matchesStrictComparable(key, srcValue) {
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === srcValue &&
+ (srcValue !== undefined || (key in Object(object)));
+ };
+}
+
+module.exports = matchesStrictComparable;
diff --git a/node_modules/lodash/_memoizeCapped.js b/node_modules/lodash/_memoizeCapped.js
new file mode 100644
index 0000000..7f71c8f
--- /dev/null
+++ b/node_modules/lodash/_memoizeCapped.js
@@ -0,0 +1,26 @@
+var memoize = require('./memoize');
+
+/** Used as the maximum memoize cache size. */
+var MAX_MEMOIZE_SIZE = 500;
+
+/**
+ * A specialized version of `_.memoize` which clears the memoized function's
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
+ *
+ * @private
+ * @param {Function} func The function to have its output memoized.
+ * @returns {Function} Returns the new memoized function.
+ */
+function memoizeCapped(func) {
+ var result = memoize(func, function(key) {
+ if (cache.size === MAX_MEMOIZE_SIZE) {
+ cache.clear();
+ }
+ return key;
+ });
+
+ var cache = result.cache;
+ return result;
+}
+
+module.exports = memoizeCapped;
diff --git a/node_modules/lodash/_mergeData.js b/node_modules/lodash/_mergeData.js
new file mode 100644
index 0000000..cb570f9
--- /dev/null
+++ b/node_modules/lodash/_mergeData.js
@@ -0,0 +1,90 @@
+var composeArgs = require('./_composeArgs'),
+ composeArgsRight = require('./_composeArgsRight'),
+ replaceHolders = require('./_replaceHolders');
+
+/** Used as the internal argument placeholder. */
+var PLACEHOLDER = '__lodash_placeholder__';
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_BOUND_FLAG = 4,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_ARY_FLAG = 128,
+ WRAP_REARG_FLAG = 256;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Merges the function metadata of `source` into `data`.
+ *
+ * Merging metadata reduces the number of wrappers used to invoke a function.
+ * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
+ * may be applied regardless of execution order. Methods like `_.ary` and
+ * `_.rearg` modify function arguments, making the order in which they are
+ * executed important, preventing the merging of metadata. However, we make
+ * an exception for a safe combined case where curried functions have `_.ary`
+ * and or `_.rearg` applied.
+ *
+ * @private
+ * @param {Array} data The destination metadata.
+ * @param {Array} source The source metadata.
+ * @returns {Array} Returns `data`.
+ */
+function mergeData(data, source) {
+ var bitmask = data[1],
+ srcBitmask = source[1],
+ newBitmask = bitmask | srcBitmask,
+ isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
+
+ var isCombo =
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
+ ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
+
+ // Exit early if metadata can't be merged.
+ if (!(isCommon || isCombo)) {
+ return data;
+ }
+ // Use source `thisArg` if available.
+ if (srcBitmask & WRAP_BIND_FLAG) {
+ data[2] = source[2];
+ // Set when currying a bound function.
+ newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
+ }
+ // Compose partial arguments.
+ var value = source[3];
+ if (value) {
+ var partials = data[3];
+ data[3] = partials ? composeArgs(partials, value, source[4]) : value;
+ data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
+ }
+ // Compose partial right arguments.
+ value = source[5];
+ if (value) {
+ partials = data[5];
+ data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
+ data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
+ }
+ // Use source `argPos` if available.
+ value = source[7];
+ if (value) {
+ data[7] = value;
+ }
+ // Use source `ary` if it's smaller.
+ if (srcBitmask & WRAP_ARY_FLAG) {
+ data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
+ }
+ // Use source `arity` if one is not provided.
+ if (data[9] == null) {
+ data[9] = source[9];
+ }
+ // Use source `func` and merge bitmasks.
+ data[0] = source[0];
+ data[1] = newBitmask;
+
+ return data;
+}
+
+module.exports = mergeData;
diff --git a/node_modules/lodash/_metaMap.js b/node_modules/lodash/_metaMap.js
new file mode 100644
index 0000000..0157a0b
--- /dev/null
+++ b/node_modules/lodash/_metaMap.js
@@ -0,0 +1,6 @@
+var WeakMap = require('./_WeakMap');
+
+/** Used to store function metadata. */
+var metaMap = WeakMap && new WeakMap;
+
+module.exports = metaMap;
diff --git a/node_modules/lodash/_nativeCreate.js b/node_modules/lodash/_nativeCreate.js
new file mode 100644
index 0000000..c7aede8
--- /dev/null
+++ b/node_modules/lodash/_nativeCreate.js
@@ -0,0 +1,6 @@
+var getNative = require('./_getNative');
+
+/* Built-in method references that are verified to be native. */
+var nativeCreate = getNative(Object, 'create');
+
+module.exports = nativeCreate;
diff --git a/node_modules/lodash/_nativeKeys.js b/node_modules/lodash/_nativeKeys.js
new file mode 100644
index 0000000..479a104
--- /dev/null
+++ b/node_modules/lodash/_nativeKeys.js
@@ -0,0 +1,6 @@
+var overArg = require('./_overArg');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeKeys = overArg(Object.keys, Object);
+
+module.exports = nativeKeys;
diff --git a/node_modules/lodash/_nativeKeysIn.js b/node_modules/lodash/_nativeKeysIn.js
new file mode 100644
index 0000000..00ee505
--- /dev/null
+++ b/node_modules/lodash/_nativeKeysIn.js
@@ -0,0 +1,20 @@
+/**
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function nativeKeysIn(object) {
+ var result = [];
+ if (object != null) {
+ for (var key in Object(object)) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+module.exports = nativeKeysIn;
diff --git a/node_modules/lodash/_nodeUtil.js b/node_modules/lodash/_nodeUtil.js
new file mode 100644
index 0000000..983d78f
--- /dev/null
+++ b/node_modules/lodash/_nodeUtil.js
@@ -0,0 +1,30 @@
+var freeGlobal = require('./_freeGlobal');
+
+/** Detect free variable `exports`. */
+var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+/** Detect free variable `module`. */
+var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+/** Detect the popular CommonJS extension `module.exports`. */
+var moduleExports = freeModule && freeModule.exports === freeExports;
+
+/** Detect free variable `process` from Node.js. */
+var freeProcess = moduleExports && freeGlobal.process;
+
+/** Used to access faster Node.js helpers. */
+var nodeUtil = (function() {
+ try {
+ // Use `util.types` for Node.js 10+.
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
+
+ if (types) {
+ return types;
+ }
+
+ // Legacy `process.binding('util')` for Node.js < 10.
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
+ } catch (e) {}
+}());
+
+module.exports = nodeUtil;
diff --git a/node_modules/lodash/_objectToString.js b/node_modules/lodash/_objectToString.js
new file mode 100644
index 0000000..c614ec0
--- /dev/null
+++ b/node_modules/lodash/_objectToString.js
@@ -0,0 +1,22 @@
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.toString;
+
+/**
+ * Converts `value` to a string using `Object.prototype.toString`.
+ *
+ * @private
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ */
+function objectToString(value) {
+ return nativeObjectToString.call(value);
+}
+
+module.exports = objectToString;
diff --git a/node_modules/lodash/_overArg.js b/node_modules/lodash/_overArg.js
new file mode 100644
index 0000000..651c5c5
--- /dev/null
+++ b/node_modules/lodash/_overArg.js
@@ -0,0 +1,15 @@
+/**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+}
+
+module.exports = overArg;
diff --git a/node_modules/lodash/_overRest.js b/node_modules/lodash/_overRest.js
new file mode 100644
index 0000000..c7cdef3
--- /dev/null
+++ b/node_modules/lodash/_overRest.js
@@ -0,0 +1,36 @@
+var apply = require('./_apply');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return apply(func, this, otherArgs);
+ };
+}
+
+module.exports = overRest;
diff --git a/node_modules/lodash/_parent.js b/node_modules/lodash/_parent.js
new file mode 100644
index 0000000..f174328
--- /dev/null
+++ b/node_modules/lodash/_parent.js
@@ -0,0 +1,16 @@
+var baseGet = require('./_baseGet'),
+ baseSlice = require('./_baseSlice');
+
+/**
+ * Gets the parent value at `path` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} path The path to get the parent value of.
+ * @returns {*} Returns the parent value.
+ */
+function parent(object, path) {
+ return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
+}
+
+module.exports = parent;
diff --git a/node_modules/lodash/_reEscape.js b/node_modules/lodash/_reEscape.js
new file mode 100644
index 0000000..7f47eda
--- /dev/null
+++ b/node_modules/lodash/_reEscape.js
@@ -0,0 +1,4 @@
+/** Used to match template delimiters. */
+var reEscape = /<%-([\s\S]+?)%>/g;
+
+module.exports = reEscape;
diff --git a/node_modules/lodash/_reEvaluate.js b/node_modules/lodash/_reEvaluate.js
new file mode 100644
index 0000000..6adfc31
--- /dev/null
+++ b/node_modules/lodash/_reEvaluate.js
@@ -0,0 +1,4 @@
+/** Used to match template delimiters. */
+var reEvaluate = /<%([\s\S]+?)%>/g;
+
+module.exports = reEvaluate;
diff --git a/node_modules/lodash/_reInterpolate.js b/node_modules/lodash/_reInterpolate.js
new file mode 100644
index 0000000..d02ff0b
--- /dev/null
+++ b/node_modules/lodash/_reInterpolate.js
@@ -0,0 +1,4 @@
+/** Used to match template delimiters. */
+var reInterpolate = /<%=([\s\S]+?)%>/g;
+
+module.exports = reInterpolate;
diff --git a/node_modules/lodash/_realNames.js b/node_modules/lodash/_realNames.js
new file mode 100644
index 0000000..aa0d529
--- /dev/null
+++ b/node_modules/lodash/_realNames.js
@@ -0,0 +1,4 @@
+/** Used to lookup unminified function names. */
+var realNames = {};
+
+module.exports = realNames;
diff --git a/node_modules/lodash/_reorder.js b/node_modules/lodash/_reorder.js
new file mode 100644
index 0000000..a3502b0
--- /dev/null
+++ b/node_modules/lodash/_reorder.js
@@ -0,0 +1,29 @@
+var copyArray = require('./_copyArray'),
+ isIndex = require('./_isIndex');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Reorder `array` according to the specified indexes where the element at
+ * the first index is assigned as the first element, the element at
+ * the second index is assigned as the second element, and so on.
+ *
+ * @private
+ * @param {Array} array The array to reorder.
+ * @param {Array} indexes The arranged array indexes.
+ * @returns {Array} Returns `array`.
+ */
+function reorder(array, indexes) {
+ var arrLength = array.length,
+ length = nativeMin(indexes.length, arrLength),
+ oldArray = copyArray(array);
+
+ while (length--) {
+ var index = indexes[length];
+ array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
+ }
+ return array;
+}
+
+module.exports = reorder;
diff --git a/node_modules/lodash/_replaceHolders.js b/node_modules/lodash/_replaceHolders.js
new file mode 100644
index 0000000..74360ec
--- /dev/null
+++ b/node_modules/lodash/_replaceHolders.js
@@ -0,0 +1,29 @@
+/** Used as the internal argument placeholder. */
+var PLACEHOLDER = '__lodash_placeholder__';
+
+/**
+ * Replaces all `placeholder` elements in `array` with an internal placeholder
+ * and returns an array of their indexes.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {*} placeholder The placeholder to replace.
+ * @returns {Array} Returns the new array of placeholder indexes.
+ */
+function replaceHolders(array, placeholder) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value === placeholder || value === PLACEHOLDER) {
+ array[index] = PLACEHOLDER;
+ result[resIndex++] = index;
+ }
+ }
+ return result;
+}
+
+module.exports = replaceHolders;
diff --git a/node_modules/lodash/_root.js b/node_modules/lodash/_root.js
new file mode 100644
index 0000000..d2852be
--- /dev/null
+++ b/node_modules/lodash/_root.js
@@ -0,0 +1,9 @@
+var freeGlobal = require('./_freeGlobal');
+
+/** Detect free variable `self`. */
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+/** Used as a reference to the global object. */
+var root = freeGlobal || freeSelf || Function('return this')();
+
+module.exports = root;
diff --git a/node_modules/lodash/_safeGet.js b/node_modules/lodash/_safeGet.js
new file mode 100644
index 0000000..b070897
--- /dev/null
+++ b/node_modules/lodash/_safeGet.js
@@ -0,0 +1,21 @@
+/**
+ * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+function safeGet(object, key) {
+ if (key === 'constructor' && typeof object[key] === 'function') {
+ return;
+ }
+
+ if (key == '__proto__') {
+ return;
+ }
+
+ return object[key];
+}
+
+module.exports = safeGet;
diff --git a/node_modules/lodash/_setCacheAdd.js b/node_modules/lodash/_setCacheAdd.js
new file mode 100644
index 0000000..1081a74
--- /dev/null
+++ b/node_modules/lodash/_setCacheAdd.js
@@ -0,0 +1,19 @@
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/**
+ * Adds `value` to the array cache.
+ *
+ * @private
+ * @name add
+ * @memberOf SetCache
+ * @alias push
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache instance.
+ */
+function setCacheAdd(value) {
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
+}
+
+module.exports = setCacheAdd;
diff --git a/node_modules/lodash/_setCacheHas.js b/node_modules/lodash/_setCacheHas.js
new file mode 100644
index 0000000..9a49255
--- /dev/null
+++ b/node_modules/lodash/_setCacheHas.js
@@ -0,0 +1,14 @@
+/**
+ * Checks if `value` is in the array cache.
+ *
+ * @private
+ * @name has
+ * @memberOf SetCache
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `true` if `value` is found, else `false`.
+ */
+function setCacheHas(value) {
+ return this.__data__.has(value);
+}
+
+module.exports = setCacheHas;
diff --git a/node_modules/lodash/_setData.js b/node_modules/lodash/_setData.js
new file mode 100644
index 0000000..e5cf3eb
--- /dev/null
+++ b/node_modules/lodash/_setData.js
@@ -0,0 +1,20 @@
+var baseSetData = require('./_baseSetData'),
+ shortOut = require('./_shortOut');
+
+/**
+ * Sets metadata for `func`.
+ *
+ * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
+ * period of time, it will trip its breaker and transition to an identity
+ * function to avoid garbage collection pauses in V8. See
+ * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
+ * for more details.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+var setData = shortOut(baseSetData);
+
+module.exports = setData;
diff --git a/node_modules/lodash/_setToArray.js b/node_modules/lodash/_setToArray.js
new file mode 100644
index 0000000..b87f074
--- /dev/null
+++ b/node_modules/lodash/_setToArray.js
@@ -0,0 +1,18 @@
+/**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+}
+
+module.exports = setToArray;
diff --git a/node_modules/lodash/_setToPairs.js b/node_modules/lodash/_setToPairs.js
new file mode 100644
index 0000000..36ad37a
--- /dev/null
+++ b/node_modules/lodash/_setToPairs.js
@@ -0,0 +1,18 @@
+/**
+ * Converts `set` to its value-value pairs.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the value-value pairs.
+ */
+function setToPairs(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = [value, value];
+ });
+ return result;
+}
+
+module.exports = setToPairs;
diff --git a/node_modules/lodash/_setToString.js b/node_modules/lodash/_setToString.js
new file mode 100644
index 0000000..6ca8419
--- /dev/null
+++ b/node_modules/lodash/_setToString.js
@@ -0,0 +1,14 @@
+var baseSetToString = require('./_baseSetToString'),
+ shortOut = require('./_shortOut');
+
+/**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+var setToString = shortOut(baseSetToString);
+
+module.exports = setToString;
diff --git a/node_modules/lodash/_setWrapToString.js b/node_modules/lodash/_setWrapToString.js
new file mode 100644
index 0000000..decdc44
--- /dev/null
+++ b/node_modules/lodash/_setWrapToString.js
@@ -0,0 +1,21 @@
+var getWrapDetails = require('./_getWrapDetails'),
+ insertWrapDetails = require('./_insertWrapDetails'),
+ setToString = require('./_setToString'),
+ updateWrapDetails = require('./_updateWrapDetails');
+
+/**
+ * Sets the `toString` method of `wrapper` to mimic the source of `reference`
+ * with wrapper details in a comment at the top of the source body.
+ *
+ * @private
+ * @param {Function} wrapper The function to modify.
+ * @param {Function} reference The reference function.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Function} Returns `wrapper`.
+ */
+function setWrapToString(wrapper, reference, bitmask) {
+ var source = (reference + '');
+ return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
+}
+
+module.exports = setWrapToString;
diff --git a/node_modules/lodash/_shortOut.js b/node_modules/lodash/_shortOut.js
new file mode 100644
index 0000000..3300a07
--- /dev/null
+++ b/node_modules/lodash/_shortOut.js
@@ -0,0 +1,37 @@
+/** Used to detect hot functions by number of calls within a span of milliseconds. */
+var HOT_COUNT = 800,
+ HOT_SPAN = 16;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeNow = Date.now;
+
+/**
+ * Creates a function that'll short out and invoke `identity` instead
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
+ * milliseconds.
+ *
+ * @private
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new shortable function.
+ */
+function shortOut(func) {
+ var count = 0,
+ lastCalled = 0;
+
+ return function() {
+ var stamp = nativeNow(),
+ remaining = HOT_SPAN - (stamp - lastCalled);
+
+ lastCalled = stamp;
+ if (remaining > 0) {
+ if (++count >= HOT_COUNT) {
+ return arguments[0];
+ }
+ } else {
+ count = 0;
+ }
+ return func.apply(undefined, arguments);
+ };
+}
+
+module.exports = shortOut;
diff --git a/node_modules/lodash/_shuffleSelf.js b/node_modules/lodash/_shuffleSelf.js
new file mode 100644
index 0000000..8bcc4f5
--- /dev/null
+++ b/node_modules/lodash/_shuffleSelf.js
@@ -0,0 +1,28 @@
+var baseRandom = require('./_baseRandom');
+
+/**
+ * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @param {number} [size=array.length] The size of `array`.
+ * @returns {Array} Returns `array`.
+ */
+function shuffleSelf(array, size) {
+ var index = -1,
+ length = array.length,
+ lastIndex = length - 1;
+
+ size = size === undefined ? length : size;
+ while (++index < size) {
+ var rand = baseRandom(index, lastIndex),
+ value = array[rand];
+
+ array[rand] = array[index];
+ array[index] = value;
+ }
+ array.length = size;
+ return array;
+}
+
+module.exports = shuffleSelf;
diff --git a/node_modules/lodash/_stackClear.js b/node_modules/lodash/_stackClear.js
new file mode 100644
index 0000000..ce8e5a9
--- /dev/null
+++ b/node_modules/lodash/_stackClear.js
@@ -0,0 +1,15 @@
+var ListCache = require('./_ListCache');
+
+/**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+function stackClear() {
+ this.__data__ = new ListCache;
+ this.size = 0;
+}
+
+module.exports = stackClear;
diff --git a/node_modules/lodash/_stackDelete.js b/node_modules/lodash/_stackDelete.js
new file mode 100644
index 0000000..ff9887a
--- /dev/null
+++ b/node_modules/lodash/_stackDelete.js
@@ -0,0 +1,18 @@
+/**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function stackDelete(key) {
+ var data = this.__data__,
+ result = data['delete'](key);
+
+ this.size = data.size;
+ return result;
+}
+
+module.exports = stackDelete;
diff --git a/node_modules/lodash/_stackGet.js b/node_modules/lodash/_stackGet.js
new file mode 100644
index 0000000..1cdf004
--- /dev/null
+++ b/node_modules/lodash/_stackGet.js
@@ -0,0 +1,14 @@
+/**
+ * Gets the stack value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function stackGet(key) {
+ return this.__data__.get(key);
+}
+
+module.exports = stackGet;
diff --git a/node_modules/lodash/_stackHas.js b/node_modules/lodash/_stackHas.js
new file mode 100644
index 0000000..16a3ad1
--- /dev/null
+++ b/node_modules/lodash/_stackHas.js
@@ -0,0 +1,14 @@
+/**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function stackHas(key) {
+ return this.__data__.has(key);
+}
+
+module.exports = stackHas;
diff --git a/node_modules/lodash/_stackSet.js b/node_modules/lodash/_stackSet.js
new file mode 100644
index 0000000..b790ac5
--- /dev/null
+++ b/node_modules/lodash/_stackSet.js
@@ -0,0 +1,34 @@
+var ListCache = require('./_ListCache'),
+ Map = require('./_Map'),
+ MapCache = require('./_MapCache');
+
+/** Used as the size to enable large array optimizations. */
+var LARGE_ARRAY_SIZE = 200;
+
+/**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache instance.
+ */
+function stackSet(key, value) {
+ var data = this.__data__;
+ if (data instanceof ListCache) {
+ var pairs = data.__data__;
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
+ pairs.push([key, value]);
+ this.size = ++data.size;
+ return this;
+ }
+ data = this.__data__ = new MapCache(pairs);
+ }
+ data.set(key, value);
+ this.size = data.size;
+ return this;
+}
+
+module.exports = stackSet;
diff --git a/node_modules/lodash/_strictIndexOf.js b/node_modules/lodash/_strictIndexOf.js
new file mode 100644
index 0000000..0486a49
--- /dev/null
+++ b/node_modules/lodash/_strictIndexOf.js
@@ -0,0 +1,23 @@
+/**
+ * A specialized version of `_.indexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function strictIndexOf(array, value, fromIndex) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+module.exports = strictIndexOf;
diff --git a/node_modules/lodash/_strictLastIndexOf.js b/node_modules/lodash/_strictLastIndexOf.js
new file mode 100644
index 0000000..d7310dc
--- /dev/null
+++ b/node_modules/lodash/_strictLastIndexOf.js
@@ -0,0 +1,21 @@
+/**
+ * A specialized version of `_.lastIndexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function strictLastIndexOf(array, value, fromIndex) {
+ var index = fromIndex + 1;
+ while (index--) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return index;
+}
+
+module.exports = strictLastIndexOf;
diff --git a/node_modules/lodash/_stringSize.js b/node_modules/lodash/_stringSize.js
new file mode 100644
index 0000000..17ef462
--- /dev/null
+++ b/node_modules/lodash/_stringSize.js
@@ -0,0 +1,18 @@
+var asciiSize = require('./_asciiSize'),
+ hasUnicode = require('./_hasUnicode'),
+ unicodeSize = require('./_unicodeSize');
+
+/**
+ * Gets the number of symbols in `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the string size.
+ */
+function stringSize(string) {
+ return hasUnicode(string)
+ ? unicodeSize(string)
+ : asciiSize(string);
+}
+
+module.exports = stringSize;
diff --git a/node_modules/lodash/_stringToArray.js b/node_modules/lodash/_stringToArray.js
new file mode 100644
index 0000000..d161158
--- /dev/null
+++ b/node_modules/lodash/_stringToArray.js
@@ -0,0 +1,18 @@
+var asciiToArray = require('./_asciiToArray'),
+ hasUnicode = require('./_hasUnicode'),
+ unicodeToArray = require('./_unicodeToArray');
+
+/**
+ * Converts `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+function stringToArray(string) {
+ return hasUnicode(string)
+ ? unicodeToArray(string)
+ : asciiToArray(string);
+}
+
+module.exports = stringToArray;
diff --git a/node_modules/lodash/_stringToPath.js b/node_modules/lodash/_stringToPath.js
new file mode 100644
index 0000000..8f39f8a
--- /dev/null
+++ b/node_modules/lodash/_stringToPath.js
@@ -0,0 +1,27 @@
+var memoizeCapped = require('./_memoizeCapped');
+
+/** Used to match property names within property paths. */
+var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+
+/** Used to match backslashes in property paths. */
+var reEscapeChar = /\\(\\)?/g;
+
+/**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+var stringToPath = memoizeCapped(function(string) {
+ var result = [];
+ if (string.charCodeAt(0) === 46 /* . */) {
+ result.push('');
+ }
+ string.replace(rePropName, function(match, number, quote, subString) {
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+});
+
+module.exports = stringToPath;
diff --git a/node_modules/lodash/_toKey.js b/node_modules/lodash/_toKey.js
new file mode 100644
index 0000000..c6d645c
--- /dev/null
+++ b/node_modules/lodash/_toKey.js
@@ -0,0 +1,21 @@
+var isSymbol = require('./isSymbol');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+function toKey(value) {
+ if (typeof value == 'string' || isSymbol(value)) {
+ return value;
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
+module.exports = toKey;
diff --git a/node_modules/lodash/_toSource.js b/node_modules/lodash/_toSource.js
new file mode 100644
index 0000000..a020b38
--- /dev/null
+++ b/node_modules/lodash/_toSource.js
@@ -0,0 +1,26 @@
+/** Used for built-in method references. */
+var funcProto = Function.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
+
+/**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to convert.
+ * @returns {string} Returns the source code.
+ */
+function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+}
+
+module.exports = toSource;
diff --git a/node_modules/lodash/_trimmedEndIndex.js b/node_modules/lodash/_trimmedEndIndex.js
new file mode 100644
index 0000000..139439a
--- /dev/null
+++ b/node_modules/lodash/_trimmedEndIndex.js
@@ -0,0 +1,19 @@
+/** Used to match a single whitespace character. */
+var reWhitespace = /\s/;
+
+/**
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
+ * character of `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the index of the last non-whitespace character.
+ */
+function trimmedEndIndex(string) {
+ var index = string.length;
+
+ while (index-- && reWhitespace.test(string.charAt(index))) {}
+ return index;
+}
+
+module.exports = trimmedEndIndex;
diff --git a/node_modules/lodash/_unescapeHtmlChar.js b/node_modules/lodash/_unescapeHtmlChar.js
new file mode 100644
index 0000000..a71fecb
--- /dev/null
+++ b/node_modules/lodash/_unescapeHtmlChar.js
@@ -0,0 +1,21 @@
+var basePropertyOf = require('./_basePropertyOf');
+
+/** Used to map HTML entities to characters. */
+var htmlUnescapes = {
+ '&amp;': '&',
+ '&lt;': '<',
+ '&gt;': '>',
+ '&quot;': '"',
+ '&#39;': "'"
+};
+
+/**
+ * Used by `_.unescape` to convert HTML entities to characters.
+ *
+ * @private
+ * @param {string} chr The matched character to unescape.
+ * @returns {string} Returns the unescaped character.
+ */
+var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
+
+module.exports = unescapeHtmlChar;
diff --git a/node_modules/lodash/_unicodeSize.js b/node_modules/lodash/_unicodeSize.js
new file mode 100644
index 0000000..68137ec
--- /dev/null
+++ b/node_modules/lodash/_unicodeSize.js
@@ -0,0 +1,44 @@
+/** Used to compose unicode character classes. */
+var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsVarRange = '\\ufe0e\\ufe0f';
+
+/** Used to compose unicode capture groups. */
+var rsAstral = '[' + rsAstralRange + ']',
+ rsCombo = '[' + rsComboRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsZWJ = '\\u200d';
+
+/** Used to compose unicode regexes. */
+var reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
+
+/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
+var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
+
+/**
+ * Gets the size of a Unicode `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+function unicodeSize(string) {
+ var result = reUnicode.lastIndex = 0;
+ while (reUnicode.test(string)) {
+ ++result;
+ }
+ return result;
+}
+
+module.exports = unicodeSize;
diff --git a/node_modules/lodash/_unicodeToArray.js b/node_modules/lodash/_unicodeToArray.js
new file mode 100644
index 0000000..2a725c0
--- /dev/null
+++ b/node_modules/lodash/_unicodeToArray.js
@@ -0,0 +1,40 @@
+/** Used to compose unicode character classes. */
+var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsVarRange = '\\ufe0e\\ufe0f';
+
+/** Used to compose unicode capture groups. */
+var rsAstral = '[' + rsAstralRange + ']',
+ rsCombo = '[' + rsComboRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsZWJ = '\\u200d';
+
+/** Used to compose unicode regexes. */
+var reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
+
+/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
+var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
+
+/**
+ * Converts a Unicode `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+function unicodeToArray(string) {
+ return string.match(reUnicode) || [];
+}
+
+module.exports = unicodeToArray;
diff --git a/node_modules/lodash/_unicodeWords.js b/node_modules/lodash/_unicodeWords.js
new file mode 100644
index 0000000..e72e6e0
--- /dev/null
+++ b/node_modules/lodash/_unicodeWords.js
@@ -0,0 +1,69 @@
+/** Used to compose unicode character classes. */
+var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsDingbatRange = '\\u2700-\\u27bf',
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
+ rsPunctuationRange = '\\u2000-\\u206f',
+ rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
+ rsVarRange = '\\ufe0e\\ufe0f',
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
+
+/** Used to compose unicode capture groups. */
+var rsApos = "['\u2019]",
+ rsBreak = '[' + rsBreakRange + ']',
+ rsCombo = '[' + rsComboRange + ']',
+ rsDigits = '\\d+',
+ rsDingbat = '[' + rsDingbatRange + ']',
+ rsLower = '[' + rsLowerRange + ']',
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsUpper = '[' + rsUpperRange + ']',
+ rsZWJ = '\\u200d';
+
+/** Used to compose unicode regexes. */
+var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
+ rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
+ rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
+ rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
+ reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
+ rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
+
+/** Used to match complex or compound words. */
+var reUnicodeWord = RegExp([
+ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
+ rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
+ rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
+ rsUpper + '+' + rsOptContrUpper,
+ rsOrdUpper,
+ rsOrdLower,
+ rsDigits,
+ rsEmoji
+].join('|'), 'g');
+
+/**
+ * Splits a Unicode `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+function unicodeWords(string) {
+ return string.match(reUnicodeWord) || [];
+}
+
+module.exports = unicodeWords;
diff --git a/node_modules/lodash/_updateWrapDetails.js b/node_modules/lodash/_updateWrapDetails.js
new file mode 100644
index 0000000..8759fbd
--- /dev/null
+++ b/node_modules/lodash/_updateWrapDetails.js
@@ -0,0 +1,46 @@
+var arrayEach = require('./_arrayEach'),
+ arrayIncludes = require('./_arrayIncludes');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_CURRY_RIGHT_FLAG = 16,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_PARTIAL_RIGHT_FLAG = 64,
+ WRAP_ARY_FLAG = 128,
+ WRAP_REARG_FLAG = 256,
+ WRAP_FLIP_FLAG = 512;
+
+/** Used to associate wrap methods with their bit flags. */
+var wrapFlags = [
+ ['ary', WRAP_ARY_FLAG],
+ ['bind', WRAP_BIND_FLAG],
+ ['bindKey', WRAP_BIND_KEY_FLAG],
+ ['curry', WRAP_CURRY_FLAG],
+ ['curryRight', WRAP_CURRY_RIGHT_FLAG],
+ ['flip', WRAP_FLIP_FLAG],
+ ['partial', WRAP_PARTIAL_FLAG],
+ ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
+ ['rearg', WRAP_REARG_FLAG]
+];
+
+/**
+ * Updates wrapper `details` based on `bitmask` flags.
+ *
+ * @private
+ * @returns {Array} details The details to modify.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Array} Returns `details`.
+ */
+function updateWrapDetails(details, bitmask) {
+ arrayEach(wrapFlags, function(pair) {
+ var value = '_.' + pair[0];
+ if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
+ details.push(value);
+ }
+ });
+ return details.sort();
+}
+
+module.exports = updateWrapDetails;
diff --git a/node_modules/lodash/_wrapperClone.js b/node_modules/lodash/_wrapperClone.js
new file mode 100644
index 0000000..7bb58a2
--- /dev/null
+++ b/node_modules/lodash/_wrapperClone.js
@@ -0,0 +1,23 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ LodashWrapper = require('./_LodashWrapper'),
+ copyArray = require('./_copyArray');
+
+/**
+ * Creates a clone of `wrapper`.
+ *
+ * @private
+ * @param {Object} wrapper The wrapper to clone.
+ * @returns {Object} Returns the cloned wrapper.
+ */
+function wrapperClone(wrapper) {
+ if (wrapper instanceof LazyWrapper) {
+ return wrapper.clone();
+ }
+ var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
+ result.__actions__ = copyArray(wrapper.__actions__);
+ result.__index__ = wrapper.__index__;
+ result.__values__ = wrapper.__values__;
+ return result;
+}
+
+module.exports = wrapperClone;
diff --git a/node_modules/lodash/add.js b/node_modules/lodash/add.js
new file mode 100644
index 0000000..f069515
--- /dev/null
+++ b/node_modules/lodash/add.js
@@ -0,0 +1,22 @@
+var createMathOperation = require('./_createMathOperation');
+
+/**
+ * Adds two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {number} augend The first number in an addition.
+ * @param {number} addend The second number in an addition.
+ * @returns {number} Returns the total.
+ * @example
+ *
+ * _.add(6, 4);
+ * // => 10
+ */
+var add = createMathOperation(function(augend, addend) {
+ return augend + addend;
+}, 0);
+
+module.exports = add;
diff --git a/node_modules/lodash/after.js b/node_modules/lodash/after.js
new file mode 100644
index 0000000..3900c97
--- /dev/null
+++ b/node_modules/lodash/after.js
@@ -0,0 +1,42 @@
+var toInteger = require('./toInteger');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * The opposite of `_.before`; this method creates a function that invokes
+ * `func` once it's called `n` or more times.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {number} n The number of calls before `func` is invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var saves = ['profile', 'settings'];
+ *
+ * var done = _.after(saves.length, function() {
+ * console.log('done saving!');
+ * });
+ *
+ * _.forEach(saves, function(type) {
+ * asyncSave({ 'type': type, 'complete': done });
+ * });
+ * // => Logs 'done saving!' after the two async saves have completed.
+ */
+function after(n, func) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+}
+
+module.exports = after;
diff --git a/node_modules/lodash/array.js b/node_modules/lodash/array.js
new file mode 100644
index 0000000..af688d3
--- /dev/null
+++ b/node_modules/lodash/array.js
@@ -0,0 +1,67 @@
+module.exports = {
+ 'chunk': require('./chunk'),
+ 'compact': require('./compact'),
+ 'concat': require('./concat'),
+ 'difference': require('./difference'),
+ 'differenceBy': require('./differenceBy'),
+ 'differenceWith': require('./differenceWith'),
+ 'drop': require('./drop'),
+ 'dropRight': require('./dropRight'),
+ 'dropRightWhile': require('./dropRightWhile'),
+ 'dropWhile': require('./dropWhile'),
+ 'fill': require('./fill'),
+ 'findIndex': require('./findIndex'),
+ 'findLastIndex': require('./findLastIndex'),
+ 'first': require('./first'),
+ 'flatten': require('./flatten'),
+ 'flattenDeep': require('./flattenDeep'),
+ 'flattenDepth': require('./flattenDepth'),
+ 'fromPairs': require('./fromPairs'),
+ 'head': require('./head'),
+ 'indexOf': require('./indexOf'),
+ 'initial': require('./initial'),
+ 'intersection': require('./intersection'),
+ 'intersectionBy': require('./intersectionBy'),
+ 'intersectionWith': require('./intersectionWith'),
+ 'join': require('./join'),
+ 'last': require('./last'),
+ 'lastIndexOf': require('./lastIndexOf'),
+ 'nth': require('./nth'),
+ 'pull': require('./pull'),
+ 'pullAll': require('./pullAll'),
+ 'pullAllBy': require('./pullAllBy'),
+ 'pullAllWith': require('./pullAllWith'),
+ 'pullAt': require('./pullAt'),
+ 'remove': require('./remove'),
+ 'reverse': require('./reverse'),
+ 'slice': require('./slice'),
+ 'sortedIndex': require('./sortedIndex'),
+ 'sortedIndexBy': require('./sortedIndexBy'),
+ 'sortedIndexOf': require('./sortedIndexOf'),
+ 'sortedLastIndex': require('./sortedLastIndex'),
+ 'sortedLastIndexBy': require('./sortedLastIndexBy'),
+ 'sortedLastIndexOf': require('./sortedLastIndexOf'),
+ 'sortedUniq': require('./sortedUniq'),
+ 'sortedUniqBy': require('./sortedUniqBy'),
+ 'tail': require('./tail'),
+ 'take': require('./take'),
+ 'takeRight': require('./takeRight'),
+ 'takeRightWhile': require('./takeRightWhile'),
+ 'takeWhile': require('./takeWhile'),
+ 'union': require('./union'),
+ 'unionBy': require('./unionBy'),
+ 'unionWith': require('./unionWith'),
+ 'uniq': require('./uniq'),
+ 'uniqBy': require('./uniqBy'),
+ 'uniqWith': require('./uniqWith'),
+ 'unzip': require('./unzip'),
+ 'unzipWith': require('./unzipWith'),
+ 'without': require('./without'),
+ 'xor': require('./xor'),
+ 'xorBy': require('./xorBy'),
+ 'xorWith': require('./xorWith'),
+ 'zip': require('./zip'),
+ 'zipObject': require('./zipObject'),
+ 'zipObjectDeep': require('./zipObjectDeep'),
+ 'zipWith': require('./zipWith')
+};
diff --git a/node_modules/lodash/ary.js b/node_modules/lodash/ary.js
new file mode 100644
index 0000000..70c87d0
--- /dev/null
+++ b/node_modules/lodash/ary.js
@@ -0,0 +1,29 @@
+var createWrap = require('./_createWrap');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_ARY_FLAG = 128;
+
+/**
+ * Creates a function that invokes `func`, with up to `n` arguments,
+ * ignoring any additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} [n=func.length] The arity cap.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new capped function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.ary(parseInt, 1));
+ * // => [6, 8, 10]
+ */
+function ary(func, n, guard) {
+ n = guard ? undefined : n;
+ n = (func && n == null) ? func.length : n;
+ return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
+}
+
+module.exports = ary;
diff --git a/node_modules/lodash/assign.js b/node_modules/lodash/assign.js
new file mode 100644
index 0000000..909db26
--- /dev/null
+++ b/node_modules/lodash/assign.js
@@ -0,0 +1,58 @@
+var assignValue = require('./_assignValue'),
+ copyObject = require('./_copyObject'),
+ createAssigner = require('./_createAssigner'),
+ isArrayLike = require('./isArrayLike'),
+ isPrototype = require('./_isPrototype'),
+ keys = require('./keys');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Assigns own enumerable string keyed properties of source objects to the
+ * destination object. Source objects are applied from left to right.
+ * Subsequent sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object` and is loosely based on
+ * [`Object.assign`](https://mdn.io/Object/assign).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assignIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assign({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'c': 3 }
+ */
+var assign = createAssigner(function(object, source) {
+ if (isPrototype(source) || isArrayLike(source)) {
+ copyObject(source, keys(source), object);
+ return;
+ }
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ assignValue(object, key, source[key]);
+ }
+ }
+});
+
+module.exports = assign;
diff --git a/node_modules/lodash/assignIn.js b/node_modules/lodash/assignIn.js
new file mode 100644
index 0000000..e663473
--- /dev/null
+++ b/node_modules/lodash/assignIn.js
@@ -0,0 +1,40 @@
+var copyObject = require('./_copyObject'),
+ createAssigner = require('./_createAssigner'),
+ keysIn = require('./keysIn');
+
+/**
+ * This method is like `_.assign` except that it iterates over own and
+ * inherited source properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assign
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assignIn({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
+ */
+var assignIn = createAssigner(function(object, source) {
+ copyObject(source, keysIn(source), object);
+});
+
+module.exports = assignIn;
diff --git a/node_modules/lodash/assignInWith.js b/node_modules/lodash/assignInWith.js
new file mode 100644
index 0000000..68fcc0b
--- /dev/null
+++ b/node_modules/lodash/assignInWith.js
@@ -0,0 +1,38 @@
+var copyObject = require('./_copyObject'),
+ createAssigner = require('./_createAssigner'),
+ keysIn = require('./keysIn');
+
+/**
+ * This method is like `_.assignIn` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extendWith
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignInWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keysIn(source), object, customizer);
+});
+
+module.exports = assignInWith;
diff --git a/node_modules/lodash/assignWith.js b/node_modules/lodash/assignWith.js
new file mode 100644
index 0000000..7dc6c76
--- /dev/null
+++ b/node_modules/lodash/assignWith.js
@@ -0,0 +1,37 @@
+var copyObject = require('./_copyObject'),
+ createAssigner = require('./_createAssigner'),
+ keys = require('./keys');
+
+/**
+ * This method is like `_.assign` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignInWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keys(source), object, customizer);
+});
+
+module.exports = assignWith;
diff --git a/node_modules/lodash/at.js b/node_modules/lodash/at.js
new file mode 100644
index 0000000..781ee9e
--- /dev/null
+++ b/node_modules/lodash/at.js
@@ -0,0 +1,23 @@
+var baseAt = require('./_baseAt'),
+ flatRest = require('./_flatRest');
+
+/**
+ * Creates an array of values corresponding to `paths` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Array} Returns the picked values.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _.at(object, ['a[0].b.c', 'a[1]']);
+ * // => [3, 4]
+ */
+var at = flatRest(baseAt);
+
+module.exports = at;
diff --git a/node_modules/lodash/attempt.js b/node_modules/lodash/attempt.js
new file mode 100644
index 0000000..624d015
--- /dev/null
+++ b/node_modules/lodash/attempt.js
@@ -0,0 +1,35 @@
+var apply = require('./_apply'),
+ baseRest = require('./_baseRest'),
+ isError = require('./isError');
+
+/**
+ * Attempts to invoke `func`, returning either the result or the caught error
+ * object. Any additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Function} func The function to attempt.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {*} Returns the `func` result or error object.
+ * @example
+ *
+ * // Avoid throwing errors for invalid selectors.
+ * var elements = _.attempt(function(selector) {
+ * return document.querySelectorAll(selector);
+ * }, '>_>');
+ *
+ * if (_.isError(elements)) {
+ * elements = [];
+ * }
+ */
+var attempt = baseRest(function(func, args) {
+ try {
+ return apply(func, undefined, args);
+ } catch (e) {
+ return isError(e) ? e : new Error(e);
+ }
+});
+
+module.exports = attempt;
diff --git a/node_modules/lodash/before.js b/node_modules/lodash/before.js
new file mode 100644
index 0000000..a3e0a16
--- /dev/null
+++ b/node_modules/lodash/before.js
@@ -0,0 +1,40 @@
+var toInteger = require('./toInteger');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => Allows adding up to 4 contacts to the list.
+ */
+function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+}
+
+module.exports = before;
diff --git a/node_modules/lodash/bind.js b/node_modules/lodash/bind.js
new file mode 100644
index 0000000..b1076e9
--- /dev/null
+++ b/node_modules/lodash/bind.js
@@ -0,0 +1,57 @@
+var baseRest = require('./_baseRest'),
+ createWrap = require('./_createWrap'),
+ getHolder = require('./_getHolder'),
+ replaceHolders = require('./_replaceHolders');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_PARTIAL_FLAG = 32;
+
+/**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and `partials` prepended to the arguments it receives.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
+ * property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * function greet(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
+ */
+var bind = baseRest(function(func, thisArg, partials) {
+ var bitmask = WRAP_BIND_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getHolder(bind));
+ bitmask |= WRAP_PARTIAL_FLAG;
+ }
+ return createWrap(func, bitmask, thisArg, partials, holders);
+});
+
+// Assign default placeholders.
+bind.placeholder = {};
+
+module.exports = bind;
diff --git a/node_modules/lodash/bindAll.js b/node_modules/lodash/bindAll.js
new file mode 100644
index 0000000..a35706d
--- /dev/null
+++ b/node_modules/lodash/bindAll.js
@@ -0,0 +1,41 @@
+var arrayEach = require('./_arrayEach'),
+ baseAssignValue = require('./_baseAssignValue'),
+ bind = require('./bind'),
+ flatRest = require('./_flatRest'),
+ toKey = require('./_toKey');
+
+/**
+ * Binds methods of an object to the object itself, overwriting the existing
+ * method.
+ *
+ * **Note:** This method doesn't set the "length" property of bound functions.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Object} object The object to bind and assign the bound methods to.
+ * @param {...(string|string[])} methodNames The object method names to bind.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var view = {
+ * 'label': 'docs',
+ * 'click': function() {
+ * console.log('clicked ' + this.label);
+ * }
+ * };
+ *
+ * _.bindAll(view, ['click']);
+ * jQuery(element).on('click', view.click);
+ * // => Logs 'clicked docs' when clicked.
+ */
+var bindAll = flatRest(function(object, methodNames) {
+ arrayEach(methodNames, function(key) {
+ key = toKey(key);
+ baseAssignValue(object, key, bind(object[key], object));
+ });
+ return object;
+});
+
+module.exports = bindAll;
diff --git a/node_modules/lodash/bindKey.js b/node_modules/lodash/bindKey.js
new file mode 100644
index 0000000..f7fd64c
--- /dev/null
+++ b/node_modules/lodash/bindKey.js
@@ -0,0 +1,68 @@
+var baseRest = require('./_baseRest'),
+ createWrap = require('./_createWrap'),
+ getHolder = require('./_getHolder'),
+ replaceHolders = require('./_replaceHolders');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_PARTIAL_FLAG = 32;
+
+/**
+ * Creates a function that invokes the method at `object[key]` with `partials`
+ * prepended to the arguments it receives.
+ *
+ * This method differs from `_.bind` by allowing bound functions to reference
+ * methods that may be redefined or don't yet exist. See
+ * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
+ * for more details.
+ *
+ * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Function
+ * @param {Object} object The object to invoke the method on.
+ * @param {string} key The key of the method.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * var object = {
+ * 'user': 'fred',
+ * 'greet': function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ * };
+ *
+ * var bound = _.bindKey(object, 'greet', 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * object.greet = function(greeting, punctuation) {
+ * return greeting + 'ya ' + this.user + punctuation;
+ * };
+ *
+ * bound('!');
+ * // => 'hiya fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bindKey(object, 'greet', _, '!');
+ * bound('hi');
+ * // => 'hiya fred!'
+ */
+var bindKey = baseRest(function(object, key, partials) {
+ var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getHolder(bindKey));
+ bitmask |= WRAP_PARTIAL_FLAG;
+ }
+ return createWrap(key, bitmask, object, partials, holders);
+});
+
+// Assign default placeholders.
+bindKey.placeholder = {};
+
+module.exports = bindKey;
diff --git a/node_modules/lodash/camelCase.js b/node_modules/lodash/camelCase.js
new file mode 100644
index 0000000..d7390de
--- /dev/null
+++ b/node_modules/lodash/camelCase.js
@@ -0,0 +1,29 @@
+var capitalize = require('./capitalize'),
+ createCompounder = require('./_createCompounder');
+
+/**
+ * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the camel cased string.
+ * @example
+ *
+ * _.camelCase('Foo Bar');
+ * // => 'fooBar'
+ *
+ * _.camelCase('--foo-bar--');
+ * // => 'fooBar'
+ *
+ * _.camelCase('__FOO_BAR__');
+ * // => 'fooBar'
+ */
+var camelCase = createCompounder(function(result, word, index) {
+ word = word.toLowerCase();
+ return result + (index ? capitalize(word) : word);
+});
+
+module.exports = camelCase;
diff --git a/node_modules/lodash/capitalize.js b/node_modules/lodash/capitalize.js
new file mode 100644
index 0000000..3e1600e
--- /dev/null
+++ b/node_modules/lodash/capitalize.js
@@ -0,0 +1,23 @@
+var toString = require('./toString'),
+ upperFirst = require('./upperFirst');
+
+/**
+ * Converts the first character of `string` to upper case and the remaining
+ * to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to capitalize.
+ * @returns {string} Returns the capitalized string.
+ * @example
+ *
+ * _.capitalize('FRED');
+ * // => 'Fred'
+ */
+function capitalize(string) {
+ return upperFirst(toString(string).toLowerCase());
+}
+
+module.exports = capitalize;
diff --git a/node_modules/lodash/castArray.js b/node_modules/lodash/castArray.js
new file mode 100644
index 0000000..e470bdb
--- /dev/null
+++ b/node_modules/lodash/castArray.js
@@ -0,0 +1,44 @@
+var isArray = require('./isArray');
+
+/**
+ * Casts `value` as an array if it's not one.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Lang
+ * @param {*} value The value to inspect.
+ * @returns {Array} Returns the cast array.
+ * @example
+ *
+ * _.castArray(1);
+ * // => [1]
+ *
+ * _.castArray({ 'a': 1 });
+ * // => [{ 'a': 1 }]
+ *
+ * _.castArray('abc');
+ * // => ['abc']
+ *
+ * _.castArray(null);
+ * // => [null]
+ *
+ * _.castArray(undefined);
+ * // => [undefined]
+ *
+ * _.castArray();
+ * // => []
+ *
+ * var array = [1, 2, 3];
+ * console.log(_.castArray(array) === array);
+ * // => true
+ */
+function castArray() {
+ if (!arguments.length) {
+ return [];
+ }
+ var value = arguments[0];
+ return isArray(value) ? value : [value];
+}
+
+module.exports = castArray;
diff --git a/node_modules/lodash/ceil.js b/node_modules/lodash/ceil.js
new file mode 100644
index 0000000..56c8722
--- /dev/null
+++ b/node_modules/lodash/ceil.js
@@ -0,0 +1,26 @@
+var createRound = require('./_createRound');
+
+/**
+ * Computes `number` rounded up to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round up.
+ * @param {number} [precision=0] The precision to round up to.
+ * @returns {number} Returns the rounded up number.
+ * @example
+ *
+ * _.ceil(4.006);
+ * // => 5
+ *
+ * _.ceil(6.004, 2);
+ * // => 6.01
+ *
+ * _.ceil(6040, -2);
+ * // => 6100
+ */
+var ceil = createRound('ceil');
+
+module.exports = ceil;
diff --git a/node_modules/lodash/chain.js b/node_modules/lodash/chain.js
new file mode 100644
index 0000000..f6cd647
--- /dev/null
+++ b/node_modules/lodash/chain.js
@@ -0,0 +1,38 @@
+var lodash = require('./wrapperLodash');
+
+/**
+ * Creates a `lodash` wrapper instance that wraps `value` with explicit method
+ * chain sequences enabled. The result of such sequences must be unwrapped
+ * with `_#value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Seq
+ * @param {*} value The value to wrap.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'pebbles', 'age': 1 }
+ * ];
+ *
+ * var youngest = _
+ * .chain(users)
+ * .sortBy('age')
+ * .map(function(o) {
+ * return o.user + ' is ' + o.age;
+ * })
+ * .head()
+ * .value();
+ * // => 'pebbles is 1'
+ */
+function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+}
+
+module.exports = chain;
diff --git a/node_modules/lodash/chunk.js b/node_modules/lodash/chunk.js
new file mode 100644
index 0000000..5b562fe
--- /dev/null
+++ b/node_modules/lodash/chunk.js
@@ -0,0 +1,50 @@
+var baseSlice = require('./_baseSlice'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toInteger = require('./toInteger');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeCeil = Math.ceil,
+ nativeMax = Math.max;
+
+/**
+ * Creates an array of elements split into groups the length of `size`.
+ * If `array` can't be split evenly, the final chunk will be the remaining
+ * elements.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to process.
+ * @param {number} [size=1] The length of each chunk
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the new array of chunks.
+ * @example
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 2);
+ * // => [['a', 'b'], ['c', 'd']]
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 3);
+ * // => [['a', 'b', 'c'], ['d']]
+ */
+function chunk(array, size, guard) {
+ if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
+ size = 1;
+ } else {
+ size = nativeMax(toInteger(size), 0);
+ }
+ var length = array == null ? 0 : array.length;
+ if (!length || size < 1) {
+ return [];
+ }
+ var index = 0,
+ resIndex = 0,
+ result = Array(nativeCeil(length / size));
+
+ while (index < length) {
+ result[resIndex++] = baseSlice(array, index, (index += size));
+ }
+ return result;
+}
+
+module.exports = chunk;
diff --git a/node_modules/lodash/clamp.js b/node_modules/lodash/clamp.js
new file mode 100644
index 0000000..91a72c9
--- /dev/null
+++ b/node_modules/lodash/clamp.js
@@ -0,0 +1,39 @@
+var baseClamp = require('./_baseClamp'),
+ toNumber = require('./toNumber');
+
+/**
+ * Clamps `number` within the inclusive `lower` and `upper` bounds.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Number
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ * @example
+ *
+ * _.clamp(-10, -5, 5);
+ * // => -5
+ *
+ * _.clamp(10, -5, 5);
+ * // => 5
+ */
+function clamp(number, lower, upper) {
+ if (upper === undefined) {
+ upper = lower;
+ lower = undefined;
+ }
+ if (upper !== undefined) {
+ upper = toNumber(upper);
+ upper = upper === upper ? upper : 0;
+ }
+ if (lower !== undefined) {
+ lower = toNumber(lower);
+ lower = lower === lower ? lower : 0;
+ }
+ return baseClamp(toNumber(number), lower, upper);
+}
+
+module.exports = clamp;
diff --git a/node_modules/lodash/clone.js b/node_modules/lodash/clone.js
new file mode 100644
index 0000000..dd439d6
--- /dev/null
+++ b/node_modules/lodash/clone.js
@@ -0,0 +1,36 @@
+var baseClone = require('./_baseClone');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+function clone(value) {
+ return baseClone(value, CLONE_SYMBOLS_FLAG);
+}
+
+module.exports = clone;
diff --git a/node_modules/lodash/cloneDeep.js b/node_modules/lodash/cloneDeep.js
new file mode 100644
index 0000000..4425fbe
--- /dev/null
+++ b/node_modules/lodash/cloneDeep.js
@@ -0,0 +1,29 @@
+var baseClone = require('./_baseClone');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1,
+ CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * This method is like `_.clone` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.clone
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var deep = _.cloneDeep(objects);
+ * console.log(deep[0] === objects[0]);
+ * // => false
+ */
+function cloneDeep(value) {
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
+}
+
+module.exports = cloneDeep;
diff --git a/node_modules/lodash/cloneDeepWith.js b/node_modules/lodash/cloneDeepWith.js
new file mode 100644
index 0000000..fd9c6c0
--- /dev/null
+++ b/node_modules/lodash/cloneDeepWith.js
@@ -0,0 +1,40 @@
+var baseClone = require('./_baseClone');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1,
+ CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * This method is like `_.cloneWith` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.cloneWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(true);
+ * }
+ * }
+ *
+ * var el = _.cloneDeepWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 20
+ */
+function cloneDeepWith(value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
+}
+
+module.exports = cloneDeepWith;
diff --git a/node_modules/lodash/cloneWith.js b/node_modules/lodash/cloneWith.js
new file mode 100644
index 0000000..d2f4e75
--- /dev/null
+++ b/node_modules/lodash/cloneWith.js
@@ -0,0 +1,42 @@
+var baseClone = require('./_baseClone');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * This method is like `_.clone` except that it accepts `customizer` which
+ * is invoked to produce the cloned value. If `customizer` returns `undefined`,
+ * cloning is handled by the method instead. The `customizer` is invoked with
+ * up to four arguments; (value [, index|key, object, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeepWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(false);
+ * }
+ * }
+ *
+ * var el = _.cloneWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 0
+ */
+function cloneWith(value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
+}
+
+module.exports = cloneWith;
diff --git a/node_modules/lodash/collection.js b/node_modules/lodash/collection.js
new file mode 100644
index 0000000..77fe837
--- /dev/null
+++ b/node_modules/lodash/collection.js
@@ -0,0 +1,30 @@
+module.exports = {
+ 'countBy': require('./countBy'),
+ 'each': require('./each'),
+ 'eachRight': require('./eachRight'),
+ 'every': require('./every'),
+ 'filter': require('./filter'),
+ 'find': require('./find'),
+ 'findLast': require('./findLast'),
+ 'flatMap': require('./flatMap'),
+ 'flatMapDeep': require('./flatMapDeep'),
+ 'flatMapDepth': require('./flatMapDepth'),
+ 'forEach': require('./forEach'),
+ 'forEachRight': require('./forEachRight'),
+ 'groupBy': require('./groupBy'),
+ 'includes': require('./includes'),
+ 'invokeMap': require('./invokeMap'),
+ 'keyBy': require('./keyBy'),
+ 'map': require('./map'),
+ 'orderBy': require('./orderBy'),
+ 'partition': require('./partition'),
+ 'reduce': require('./reduce'),
+ 'reduceRight': require('./reduceRight'),
+ 'reject': require('./reject'),
+ 'sample': require('./sample'),
+ 'sampleSize': require('./sampleSize'),
+ 'shuffle': require('./shuffle'),
+ 'size': require('./size'),
+ 'some': require('./some'),
+ 'sortBy': require('./sortBy')
+};
diff --git a/node_modules/lodash/commit.js b/node_modules/lodash/commit.js
new file mode 100644
index 0000000..fe4db71
--- /dev/null
+++ b/node_modules/lodash/commit.js
@@ -0,0 +1,33 @@
+var LodashWrapper = require('./_LodashWrapper');
+
+/**
+ * Executes the chain sequence and returns the wrapped result.
+ *
+ * @name commit
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2];
+ * var wrapped = _(array).push(3);
+ *
+ * console.log(array);
+ * // => [1, 2]
+ *
+ * wrapped = wrapped.commit();
+ * console.log(array);
+ * // => [1, 2, 3]
+ *
+ * wrapped.last();
+ * // => 3
+ *
+ * console.log(array);
+ * // => [1, 2, 3]
+ */
+function wrapperCommit() {
+ return new LodashWrapper(this.value(), this.__chain__);
+}
+
+module.exports = wrapperCommit;
diff --git a/node_modules/lodash/compact.js b/node_modules/lodash/compact.js
new file mode 100644
index 0000000..031fab4
--- /dev/null
+++ b/node_modules/lodash/compact.js
@@ -0,0 +1,31 @@
+/**
+ * Creates an array with all falsey values removed. The values `false`, `null`,
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to compact.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.compact([0, 1, false, 2, '', 3]);
+ * // => [1, 2, 3]
+ */
+function compact(array) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+}
+
+module.exports = compact;
diff --git a/node_modules/lodash/concat.js b/node_modules/lodash/concat.js
new file mode 100644
index 0000000..1da48a4
--- /dev/null
+++ b/node_modules/lodash/concat.js
@@ -0,0 +1,43 @@
+var arrayPush = require('./_arrayPush'),
+ baseFlatten = require('./_baseFlatten'),
+ copyArray = require('./_copyArray'),
+ isArray = require('./isArray');
+
+/**
+ * Creates a new array concatenating `array` with any additional arrays
+ * and/or values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to concatenate.
+ * @param {...*} [values] The values to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ * @example
+ *
+ * var array = [1];
+ * var other = _.concat(array, 2, [3], [[4]]);
+ *
+ * console.log(other);
+ * // => [1, 2, 3, [4]]
+ *
+ * console.log(array);
+ * // => [1]
+ */
+function concat() {
+ var length = arguments.length;
+ if (!length) {
+ return [];
+ }
+ var args = Array(length - 1),
+ array = arguments[0],
+ index = length;
+
+ while (index--) {
+ args[index - 1] = arguments[index];
+ }
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
+}
+
+module.exports = concat;
diff --git a/node_modules/lodash/cond.js b/node_modules/lodash/cond.js
new file mode 100644
index 0000000..6455598
--- /dev/null
+++ b/node_modules/lodash/cond.js
@@ -0,0 +1,60 @@
+var apply = require('./_apply'),
+ arrayMap = require('./_arrayMap'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that iterates over `pairs` and invokes the corresponding
+ * function of the first predicate to return truthy. The predicate-function
+ * pairs are invoked with the `this` binding and arguments of the created
+ * function.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Array} pairs The predicate-function pairs.
+ * @returns {Function} Returns the new composite function.
+ * @example
+ *
+ * var func = _.cond([
+ * [_.matches({ 'a': 1 }), _.constant('matches A')],
+ * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
+ * [_.stubTrue, _.constant('no match')]
+ * ]);
+ *
+ * func({ 'a': 1, 'b': 2 });
+ * // => 'matches A'
+ *
+ * func({ 'a': 0, 'b': 1 });
+ * // => 'matches B'
+ *
+ * func({ 'a': '1', 'b': '2' });
+ * // => 'no match'
+ */
+function cond(pairs) {
+ var length = pairs == null ? 0 : pairs.length,
+ toIteratee = baseIteratee;
+
+ pairs = !length ? [] : arrayMap(pairs, function(pair) {
+ if (typeof pair[1] != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return [toIteratee(pair[0]), pair[1]];
+ });
+
+ return baseRest(function(args) {
+ var index = -1;
+ while (++index < length) {
+ var pair = pairs[index];
+ if (apply(pair[0], this, args)) {
+ return apply(pair[1], this, args);
+ }
+ }
+ });
+}
+
+module.exports = cond;
diff --git a/node_modules/lodash/conforms.js b/node_modules/lodash/conforms.js
new file mode 100644
index 0000000..5501a94
--- /dev/null
+++ b/node_modules/lodash/conforms.js
@@ -0,0 +1,35 @@
+var baseClone = require('./_baseClone'),
+ baseConforms = require('./_baseConforms');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * Creates a function that invokes the predicate properties of `source` with
+ * the corresponding property values of a given object, returning `true` if
+ * all predicates return truthy, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.conformsTo` with
+ * `source` partially applied.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 2, 'b': 1 },
+ * { 'a': 1, 'b': 2 }
+ * ];
+ *
+ * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
+ * // => [{ 'a': 1, 'b': 2 }]
+ */
+function conforms(source) {
+ return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
+}
+
+module.exports = conforms;
diff --git a/node_modules/lodash/conformsTo.js b/node_modules/lodash/conformsTo.js
new file mode 100644
index 0000000..b8a93eb
--- /dev/null
+++ b/node_modules/lodash/conformsTo.js
@@ -0,0 +1,32 @@
+var baseConformsTo = require('./_baseConformsTo'),
+ keys = require('./keys');
+
+/**
+ * Checks if `object` conforms to `source` by invoking the predicate
+ * properties of `source` with the corresponding property values of `object`.
+ *
+ * **Note:** This method is equivalent to `_.conforms` when `source` is
+ * partially applied.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.14.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ *
+ * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
+ * // => true
+ *
+ * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
+ * // => false
+ */
+function conformsTo(object, source) {
+ return source == null || baseConformsTo(object, source, keys(source));
+}
+
+module.exports = conformsTo;
diff --git a/node_modules/lodash/constant.js b/node_modules/lodash/constant.js
new file mode 100644
index 0000000..655ece3
--- /dev/null
+++ b/node_modules/lodash/constant.js
@@ -0,0 +1,26 @@
+/**
+ * Creates a function that returns `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new constant function.
+ * @example
+ *
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
+ *
+ * console.log(objects);
+ * // => [{ 'a': 1 }, { 'a': 1 }]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => true
+ */
+function constant(value) {
+ return function() {
+ return value;
+ };
+}
+
+module.exports = constant;
diff --git a/node_modules/lodash/core.js b/node_modules/lodash/core.js
new file mode 100644
index 0000000..be1d567
--- /dev/null
+++ b/node_modules/lodash/core.js
@@ -0,0 +1,3877 @@
+/**
+ * @license
+ * Lodash (Custom Build) <https://lodash.com/>
+ * Build: `lodash core -o ./dist/lodash.core.js`
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+;(function() {
+
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
+ var undefined;
+
+ /** Used as the semantic version number. */
+ var VERSION = '4.17.21';
+
+ /** Error message constants. */
+ var FUNC_ERROR_TEXT = 'Expected a function';
+
+ /** Used to compose bitmasks for value comparisons. */
+ var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+ /** Used to compose bitmasks for function metadata. */
+ var WRAP_BIND_FLAG = 1,
+ WRAP_PARTIAL_FLAG = 32;
+
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0,
+ MAX_SAFE_INTEGER = 9007199254740991;
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ asyncTag = '[object AsyncFunction]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ proxyTag = '[object Proxy]',
+ regexpTag = '[object RegExp]',
+ stringTag = '[object String]';
+
+ /** Used to match HTML entities and HTML characters. */
+ var reUnescapedHtml = /[&<>"']/g,
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+ /** Used to map characters to HTML entities. */
+ var htmlEscapes = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;'
+ };
+
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+ /** Detect free variable `self`. */
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+ /** Used as a reference to the global object. */
+ var root = freeGlobal || freeSelf || Function('return this')();
+
+ /** Detect free variable `exports`. */
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+ /** Detect free variable `module`. */
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayPush(array, values) {
+ array.push.apply(array, values);
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 1 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.propertyOf` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function basePropertyOf(object) {
+ return function(key) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+ function baseValues(object, props) {
+ return baseMap(props, function(key) {
+ return object[key];
+ });
+ }
+
+ /**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ var escapeHtmlChar = basePropertyOf(htmlEscapes);
+
+ /**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /** Used for built-in method references. */
+ var arrayProto = Array.prototype,
+ objectProto = Object.prototype;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to generate unique IDs. */
+ var idCounter = 0;
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var nativeObjectToString = objectProto.toString;
+
+ /** Used to restore the original `_` reference in `_.noConflict`. */
+ var oldDash = root._;
+
+ /** Built-in value references. */
+ var objectCreate = Object.create,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeIsFinite = root.isFinite,
+ nativeKeys = overArg(Object.keys, Object),
+ nativeMax = Math.max;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` object which wraps `value` to enable implicit method
+ * chain sequences. Methods that operate on and return arrays, collections,
+ * and functions can be chained together. Methods that retrieve a single value
+ * or may return a primitive value will automatically end the chain sequence
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
+ * with `_#value`.
+ *
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
+ * enabled using `_.chain`.
+ *
+ * The execution of chained methods is lazy, that is, it's deferred until
+ * `_#value` is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion.
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
+ * the creation of intermediate arrays and can greatly reduce the number of
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
+ * fusion if the section is applied to an array and iteratees accept only
+ * one argument. The heuristic for whether a section qualifies for shortcut
+ * fusion is subject to change.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
+ * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
+ * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
+ * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
+ * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
+ * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
+ * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
+ * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
+ * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
+ * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
+ * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
+ * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
+ * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
+ * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
+ * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
+ * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
+ * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
+ * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
+ * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
+ * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
+ * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
+ * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
+ * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
+ * `upperFirst`, `value`, and `words`
+ *
+ * @name _
+ * @constructor
+ * @category Seq
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // Returns an unwrapped value.
+ * wrapped.reduce(_.add);
+ * // => 6
+ *
+ * // Returns a wrapped value.
+ * var squares = wrapped.map(square);
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+ function lodash(value) {
+ return value instanceof LodashWrapper
+ ? value
+ : new LodashWrapper(value);
+ }
+
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!isObject(proto)) {
+ return {};
+ }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+ }());
+
+ /**
+ * The base constructor for creating `lodash` wrapper objects.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
+ */
+ function LodashWrapper(value, chainAll) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__chain__ = !!chainAll;
+ }
+
+ LodashWrapper.prototype = baseCreate(lodash.prototype);
+ LodashWrapper.prototype.constructor = LodashWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+ }
+
+ /**
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function baseAssignValue(object, key, value) {
+ object[key] = value;
+ }
+
+ /**
+ * The base implementation of `_.delay` and `_.defer` which accepts `args`
+ * to provide to `func`.
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {Array} args The arguments to provide to `func`.
+ * @returns {number|Object} Returns the timer id or timeout object.
+ */
+ function baseDelay(func, wait, args) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
+ }
+
+ /**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEach = createBaseEach(baseForOwn);
+
+ /**
+ * The base implementation of `_.every` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`
+ */
+ function baseEvery(collection, predicate) {
+ var result = true;
+ baseEach(collection, function(value, index, collection) {
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
+ * `comparator` to determine the extremum value.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The iteratee invoked per iteration.
+ * @param {Function} comparator The comparator used to compare values.
+ * @returns {*} Returns the extremum value.
+ */
+ function baseExtremum(array, iteratee, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index],
+ current = iteratee(value);
+
+ if (current != null && (computed === undefined
+ ? (current === current && !false)
+ : comparator(current, computed)
+ )) {
+ var computed = current,
+ result = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.filter` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+ function baseFlatten(array, depth, predicate, isStrict, result) {
+ var index = -1,
+ length = array.length;
+
+ predicate || (predicate = isFlattenable);
+ result || (result = []);
+
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && predicate(value)) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `baseForOwn` which iterates over `object`
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseFor = createBaseFor();
+
+ /**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwn(object, iteratee) {
+ return object && baseFor(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.functions` which creates an array of
+ * `object` function property names filtered from `props`.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} props The property names to filter.
+ * @returns {Array} Returns the function names.
+ */
+ function baseFunctions(object, props) {
+ return baseFilter(props, function(key) {
+ return isFunction(object[key]);
+ });
+ }
+
+ /**
+ * The base implementation of `getTag` without fallbacks for buggy environments.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ function baseGetTag(value) {
+ return objectToString(value);
+ }
+
+ /**
+ * The base implementation of `_.gt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ */
+ function baseGt(value, other) {
+ return value > other;
+ }
+
+ /**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+ var baseIsArguments = noop;
+
+ /**
+ * The base implementation of `_.isDate` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ */
+ function baseIsDate(value) {
+ return isObjectLike(value) && baseGetTag(value) == dateTag;
+ }
+
+ /**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
+ }
+
+ /**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = objIsArr ? arrayTag : baseGetTag(object),
+ othTag = othIsArr ? arrayTag : baseGetTag(other);
+
+ objTag = objTag == argsTag ? objectTag : objTag;
+ othTag = othTag == argsTag ? objectTag : othTag;
+
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ stack || (stack = []);
+ var objStack = find(stack, function(entry) {
+ return entry[0] == object;
+ });
+ var othStack = find(stack, function(entry) {
+ return entry[0] == other;
+ });
+ if (objStack && othStack) {
+ return objStack[1] == other;
+ }
+ stack.push([object, other]);
+ stack.push([other, object]);
+ if (isSameTag && !objIsObj) {
+ var result = (objIsArr)
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
+ stack.pop();
+ return result;
+ }
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ var result = equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+ stack.pop();
+ return result;
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ var result = equalObjects(object, other, bitmask, customizer, equalFunc, stack);
+ stack.pop();
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.isRegExp` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ */
+ function baseIsRegExp(value) {
+ return isObjectLike(value) && baseGetTag(value) == regexpTag;
+ }
+
+ /**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+ function baseIteratee(func) {
+ if (typeof func == 'function') {
+ return func;
+ }
+ if (func == null) {
+ return identity;
+ }
+ return (typeof func == 'object' ? baseMatches : baseProperty)(func);
+ }
+
+ /**
+ * The base implementation of `_.lt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ */
+ function baseLt(value, other) {
+ return value < other;
+ }
+
+ /**
+ * The base implementation of `_.map` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatches(source) {
+ var props = nativeKeys(source);
+ return function(object) {
+ var length = props.length;
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (length--) {
+ var key = props[length];
+ if (!(key in object &&
+ baseIsEqual(source[key], object[key], COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG)
+ )) {
+ return false;
+ }
+ }
+ return true;
+ };
+ }
+
+ /**
+ * The base implementation of `_.pick` without support for individual
+ * property identifiers.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Object} Returns the new object.
+ */
+ function basePick(object, props) {
+ object = Object(object);
+ return reduce(props, function(result, key) {
+ if (key in object) {
+ result[key] = object[key];
+ }
+ return result;
+ }, {});
+ }
+
+ /**
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ */
+ function baseRest(func, start) {
+ return setToString(overRest(func, start, identity), func + '');
+ }
+
+ /**
+ * The base implementation of `_.slice` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = end > length ? length : end;
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+ }
+
+ /**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+ function copyArray(source) {
+ return baseSlice(source, 0, source.length);
+ }
+
+ /**
+ * The base implementation of `_.some` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+ }
+
+ /**
+ * The base implementation of `wrapperValue` which returns the result of
+ * performing a sequence of actions on the unwrapped `value`, where each
+ * successive action is supplied the return value of the previous.
+ *
+ * @private
+ * @param {*} value The unwrapped value.
+ * @param {Array} actions Actions to perform to resolve the unwrapped value.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseWrapperValue(value, actions) {
+ var result = value;
+ return reduce(actions, function(result, action) {
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }, result);
+ }
+
+ /**
+ * Compares values to sort them in ascending order.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {number} Returns the sort order indicator for `value`.
+ */
+ function compareAscending(value, other) {
+ if (value !== other) {
+ var valIsDefined = value !== undefined,
+ valIsNull = value === null,
+ valIsReflexive = value === value,
+ valIsSymbol = false;
+
+ var othIsDefined = other !== undefined,
+ othIsNull = other === null,
+ othIsReflexive = other === other,
+ othIsSymbol = false;
+
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+ (valIsNull && othIsDefined && othIsReflexive) ||
+ (!valIsDefined && othIsReflexive) ||
+ !valIsReflexive) {
+ return 1;
+ }
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+ (othIsNull && valIsDefined && valIsReflexive) ||
+ (!othIsDefined && valIsReflexive) ||
+ !othIsReflexive) {
+ return -1;
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+ function copyObject(source, props, object, customizer) {
+ var isNew = !object;
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ baseAssignValue(object, key, newValue);
+ } else {
+ assignValue(object, key, newValue);
+ }
+ }
+ return object;
+ }
+
+ /**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+ function createAssigner(assigner) {
+ return baseRest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined;
+
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
+ ? (length--, customizer)
+ : undefined;
+
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
+ }
+
+ /**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
+ }
+ if (!isArrayLike(collection)) {
+ return eachFunc(collection, iteratee);
+ }
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+ }
+
+ /**
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
+
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+ }
+
+ /**
+ * Creates a function that produces an instance of `Ctor` regardless of
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+ *
+ * @private
+ * @param {Function} Ctor The constructor to wrap.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCtor(Ctor) {
+ return function() {
+ // Use a `switch` statement to work with class constructors. See
+ // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+ // for more details.
+ var args = arguments;
+ var thisBinding = baseCreate(Ctor.prototype),
+ result = Ctor.apply(thisBinding, args);
+
+ // Mimic the constructor's `return` behavior.
+ // See https://es5.github.io/#x13.2.2 for more details.
+ return isObject(result) ? result : thisBinding;
+ };
+ }
+
+ /**
+ * Creates a `_.find` or `_.findLast` function.
+ *
+ * @private
+ * @param {Function} findIndexFunc The function to find the collection index.
+ * @returns {Function} Returns the new find function.
+ */
+ function createFind(findIndexFunc) {
+ return function(collection, predicate, fromIndex) {
+ var iterable = Object(collection);
+ if (!isArrayLike(collection)) {
+ var iteratee = baseIteratee(predicate, 3);
+ collection = keys(collection);
+ predicate = function(key) { return iteratee(iterable[key], key, iterable); };
+ }
+ var index = findIndexFunc(collection, predicate, fromIndex);
+ return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the `this` binding
+ * of `thisArg` and `partials` prepended to the arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} partials The arguments to prepend to those provided to
+ * the new function.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createPartial(func, bitmask, thisArg, partials) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var argsIndex = -1,
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength),
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+
+ while (++leftIndex < leftLength) {
+ args[leftIndex] = partials[leftIndex];
+ }
+ while (argsLength--) {
+ args[leftIndex++] = arguments[++argsIndex];
+ }
+ return fn.apply(isBind ? thisArg : this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Check that cyclic values are equal.
+ var arrStacked = stack.get(array);
+ var othStacked = stack.get(other);
+ if (arrStacked && othStacked) {
+ return arrStacked == other && othStacked == array;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined;
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ var compared;
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!baseSome(other, function(othValue, othIndex) {
+ if (!indexOf(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
+ switch (tag) {
+
+ case boolTag:
+ case dateTag:
+ case numberTag:
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
+ // Invalid dates are coerced to `NaN`.
+ return eq(+object, +other);
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Check that cyclic values are equal.
+ var objStacked = stack.get(object);
+ var othStacked = stack.get(other);
+ if (objStacked && othStacked) {
+ return objStacked == other && othStacked == object;
+ }
+ var result = true;
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ var compared;
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseRest` which flattens the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+ function flatRest(func) {
+ return setToString(overRest(func, undefined, flatten), func + '');
+ }
+
+ /**
+ * Checks if `value` is a flattenable `arguments` object or array.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+ function isFlattenable(value) {
+ return isArray(value) || isArguments(value);
+ }
+
+ /**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+ function isIndex(value, length) {
+ var type = typeof value;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+
+ return !!length &&
+ (type == 'number' ||
+ (type != 'symbol' && reIsUint.test(value))) &&
+ (value > -1 && value % 1 == 0 && value < length);
+ }
+
+ /**
+ * Checks if the given arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ * else `false`.
+ */
+ function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)
+ ) {
+ return eq(object[index], value);
+ }
+ return false;
+ }
+
+ /**
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function nativeKeysIn(object) {
+ var result = [];
+ if (object != null) {
+ for (var key in Object(object)) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts `value` to a string using `Object.prototype.toString`.
+ *
+ * @private
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ */
+ function objectToString(value) {
+ return nativeObjectToString.call(value);
+ }
+
+ /**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return func.apply(this, otherArgs);
+ };
+ }
+
+ /**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+ var setToString = identity;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array with all falsey values removed. The values `false`, `null`,
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to compact.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.compact([0, 1, false, 2, '', 3]);
+ * // => [1, 2, 3]
+ */
+ function compact(array) {
+ return baseFilter(array, Boolean);
+ }
+
+ /**
+ * Creates a new array concatenating `array` with any additional arrays
+ * and/or values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to concatenate.
+ * @param {...*} [values] The values to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ * @example
+ *
+ * var array = [1];
+ * var other = _.concat(array, 2, [3], [[4]]);
+ *
+ * console.log(other);
+ * // => [1, 2, 3, [4]]
+ *
+ * console.log(array);
+ * // => [1]
+ */
+ function concat() {
+ var length = arguments.length;
+ if (!length) {
+ return [];
+ }
+ var args = Array(length - 1),
+ array = arguments[0],
+ index = length;
+
+ while (index--) {
+ args[index - 1] = arguments[index];
+ }
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
+ }
+
+ /**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
+ * // => 0
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findIndex(users, ['active', false]);
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+ function findIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseFindIndex(array, baseIteratee(predicate, 3), index);
+ }
+
+ /**
+ * Flattens `array` a single level deep.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, [3, [4]], 5]
+ */
+ function flatten(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, 1) : [];
+ }
+
+ /**
+ * Recursively flattens `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, 3, 4, 5]
+ */
+ function flattenDeep(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, INFINITY) : [];
+ }
+
+ /**
+ * Gets the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias first
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the first element of `array`.
+ * @example
+ *
+ * _.head([1, 2, 3]);
+ * // => 1
+ *
+ * _.head([]);
+ * // => undefined
+ */
+ function head(array) {
+ return (array && array.length) ? array[0] : undefined;
+ }
+
+ /**
+ * Gets the index at which the first occurrence of `value` is found in `array`
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it's used as the
+ * offset from the end of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.indexOf([1, 2, 1, 2], 2);
+ * // => 1
+ *
+ * // Search from the `fromIndex`.
+ * _.indexOf([1, 2, 1, 2], 2, 2);
+ * // => 3
+ */
+ function indexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (typeof fromIndex == 'number') {
+ fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;
+ } else {
+ fromIndex = 0;
+ }
+ var index = (fromIndex || 0) - 1,
+ isReflexive = value === value;
+
+ while (++index < length) {
+ var other = array[index];
+ if ((isReflexive ? other === value : other !== other)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+ function last(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? array[length - 1] : undefined;
+ }
+
+ /**
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
+ *
+ * **Note:** This method is used instead of
+ * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
+ * returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function slice(array, start, end) {
+ var length = array == null ? 0 : array.length;
+ start = start == null ? 0 : +start;
+ end = end === undefined ? length : +end;
+ return length ? baseSlice(array, start, end) : [];
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` wrapper instance that wraps `value` with explicit method
+ * chain sequences enabled. The result of such sequences must be unwrapped
+ * with `_#value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Seq
+ * @param {*} value The value to wrap.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'pebbles', 'age': 1 }
+ * ];
+ *
+ * var youngest = _
+ * .chain(users)
+ * .sortBy('age')
+ * .map(function(o) {
+ * return o.user + ' is ' + o.age;
+ * })
+ * .head()
+ * .value();
+ * // => 'pebbles is 1'
+ */
+ function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+ }
+
+ /**
+ * This method invokes `interceptor` and returns `value`. The interceptor
+ * is invoked with one argument; (value). The purpose of this method is to
+ * "tap into" a method chain sequence in order to modify intermediate results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * _([1, 2, 3])
+ * .tap(function(array) {
+ * // Mutate input array.
+ * array.pop();
+ * })
+ * .reverse()
+ * .value();
+ * // => [2, 1]
+ */
+ function tap(value, interceptor) {
+ interceptor(value);
+ return value;
+ }
+
+ /**
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
+ * The purpose of this method is to "pass thru" values replacing intermediate
+ * results in a method chain sequence.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns the result of `interceptor`.
+ * @example
+ *
+ * _(' abc ')
+ * .chain()
+ * .trim()
+ * .thru(function(value) {
+ * return [value];
+ * })
+ * .value();
+ * // => ['abc']
+ */
+ function thru(value, interceptor) {
+ return interceptor(value);
+ }
+
+ /**
+ * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
+ *
+ * @name chain
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * // A sequence without explicit chaining.
+ * _(users).head();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // A sequence with explicit chaining.
+ * _(users)
+ * .chain()
+ * .head()
+ * .pick('user')
+ * .value();
+ * // => { 'user': 'barney' }
+ */
+ function wrapperChain() {
+ return chain(this);
+ }
+
+ /**
+ * Executes the chain sequence to resolve the unwrapped value.
+ *
+ * @name value
+ * @memberOf _
+ * @since 0.1.0
+ * @alias toJSON, valueOf
+ * @category Seq
+ * @returns {*} Returns the resolved unwrapped value.
+ * @example
+ *
+ * _([1, 2, 3]).value();
+ * // => [1, 2, 3]
+ */
+ function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
+ * Iteration is stopped once `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * **Note:** This method returns `true` for
+ * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
+ * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
+ * elements of empty collections.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.every([true, 1, null, 'yes'], Boolean);
+ * // => false
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.every(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.every(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.every(users, 'active');
+ * // => false
+ */
+ function every(collection, predicate, guard) {
+ predicate = guard ? undefined : predicate;
+ return baseEvery(collection, baseIteratee(predicate));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * **Note:** Unlike `_.remove`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
+ *
+ * // Combining several predicates using `_.overEvery` or `_.overSome`.
+ * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
+ * // => objects for ['fred', 'barney']
+ */
+ function filter(collection, predicate) {
+ return baseFilter(collection, baseIteratee(predicate));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.find(users, function(o) { return o.age < 40; });
+ * // => object for 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.find(users, { 'age': 1, 'active': true });
+ * // => object for 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.find(users, ['active', false]);
+ * // => object for 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.find(users, 'active');
+ * // => object for 'barney'
+ */
+ var find = createFind(findIndex);
+
+ /**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _.forEach([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forEach(collection, iteratee) {
+ return baseEach(collection, baseIteratee(iteratee));
+ }
+
+ /**
+ * Creates an array of values by running each element in `collection` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * _.map([4, 8], square);
+ * // => [16, 64]
+ *
+ * _.map({ 'a': 4, 'b': 8 }, square);
+ * // => [16, 64] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+ function map(collection, iteratee) {
+ return baseMap(collection, baseIteratee(iteratee));
+ }
+
+ /**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` thru `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not given, the first element of `collection` is used as the initial
+ * value. The iteratee is invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+ * and `sortBy`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduceRight
+ * @example
+ *
+ * _.reduce([1, 2], function(sum, n) {
+ * return sum + n;
+ * }, 0);
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * return result;
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+ */
+ function reduce(collection, iteratee, accumulator) {
+ return baseReduce(collection, baseIteratee(iteratee), accumulator, arguments.length < 3, baseEach);
+ }
+
+ /**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable string keyed properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @returns {number} Returns the collection size.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+ function size(collection) {
+ if (collection == null) {
+ return 0;
+ }
+ collection = isArrayLike(collection) ? collection : nativeKeys(collection);
+ return collection.length;
+ }
+
+ /**
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
+ * Iteration is stopped once `predicate` returns truthy. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.some([null, 0, 'yes', false], Boolean);
+ * // => true
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.some(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.some(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.some(users, 'active');
+ * // => true
+ */
+ function some(collection, predicate, guard) {
+ predicate = guard ? undefined : predicate;
+ return baseSome(collection, baseIteratee(predicate));
+ }
+
+ /**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection thru each iteratee. This method
+ * performs a stable sort, that is, it preserves the original sort order of
+ * equal elements. The iteratees are invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 30 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.sortBy(users, [function(o) { return o.user; }]);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
+ *
+ * _.sortBy(users, ['user', 'age']);
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
+ */
+ function sortBy(collection, iteratee) {
+ var index = 0;
+ iteratee = baseIteratee(iteratee);
+
+ return baseMap(baseMap(collection, function(value, key, collection) {
+ return { 'value': value, 'index': index++, 'criteria': iteratee(value, key, collection) };
+ }).sort(function(object, other) {
+ return compareAscending(object.criteria, other.criteria) || (object.index - other.index);
+ }), baseProperty('value'));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => Allows adding up to 4 contacts to the list.
+ */
+ function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and `partials` prepended to the arguments it receives.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
+ * property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * function greet(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
+ */
+ var bind = baseRest(function(func, thisArg, partials) {
+ return createPartial(func, WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG, thisArg, partials);
+ });
+
+ /**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // => Logs 'deferred' after one millisecond.
+ */
+ var defer = baseRest(function(func, args) {
+ return baseDelay(func, 1, args);
+ });
+
+ /**
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
+ * provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.delay(function(text) {
+ * console.log(text);
+ * }, 1000, 'later');
+ * // => Logs 'later' after one second.
+ */
+ var delay = baseRest(function(func, wait, args) {
+ return baseDelay(func, toNumber(wait) || 0, args);
+ });
+
+ /**
+ * Creates a function that negates the result of the predicate `func`. The
+ * `func` predicate is invoked with the `this` binding and arguments of the
+ * created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} predicate The predicate to negate.
+ * @returns {Function} Returns the new negated function.
+ * @example
+ *
+ * function isEven(n) {
+ * return n % 2 == 0;
+ * }
+ *
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+ * // => [1, 3, 5]
+ */
+ function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ var args = arguments;
+ return !predicate.apply(this, args);
+ };
+ }
+
+ /**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // => `createApplication` is invoked once
+ */
+ function once(func) {
+ return before(2, func);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+ function clone(value) {
+ if (!isObject(value)) {
+ return value;
+ }
+ return isArray(value) ? copyArray(value) : copyObject(value, nativeKeys(value));
+ }
+
+ /**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
+
+ /**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+ };
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+ var isArray = Array.isArray;
+
+ /**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+ function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+ function isBoolean(value) {
+ return value === true || value === false ||
+ (isObjectLike(value) && baseGetTag(value) == boolTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Date` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ * @example
+ *
+ * _.isDate(new Date);
+ * // => true
+ *
+ * _.isDate('Mon April 23 2012');
+ * // => false
+ */
+ var isDate = baseIsDate;
+
+ /**
+ * Checks if `value` is an empty object, collection, map, or set.
+ *
+ * Objects are considered empty if they have no own enumerable string keyed
+ * properties.
+ *
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+ * @example
+ *
+ * _.isEmpty(null);
+ * // => true
+ *
+ * _.isEmpty(true);
+ * // => true
+ *
+ * _.isEmpty(1);
+ * // => true
+ *
+ * _.isEmpty([1, 2, 3]);
+ * // => false
+ *
+ * _.isEmpty({ 'a': 1 });
+ * // => false
+ */
+ function isEmpty(value) {
+ if (isArrayLike(value) &&
+ (isArray(value) || isString(value) ||
+ isFunction(value.splice) || isArguments(value))) {
+ return !value.length;
+ }
+ return !nativeKeys(value).length;
+ }
+
+ /**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are compared by strict equality, i.e. `===`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+ function isEqual(value, other) {
+ return baseIsEqual(value, other);
+ }
+
+ /**
+ * Checks if `value` is a finite primitive number.
+ *
+ * **Note:** This method is based on
+ * [`Number.isFinite`](https://mdn.io/Number/isFinite).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
+ * @example
+ *
+ * _.isFinite(3);
+ * // => true
+ *
+ * _.isFinite(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isFinite(Infinity);
+ * // => false
+ *
+ * _.isFinite('3');
+ * // => false
+ */
+ function isFinite(value) {
+ return typeof value == 'number' && nativeIsFinite(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+ function isFunction(value) {
+ if (!isObject(value)) {
+ return false;
+ }
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
+ var tag = baseGetTag(value);
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
+ }
+
+ /**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+ function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return value != null && (type == 'object' || type == 'function');
+ }
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return value != null && typeof value == 'object';
+ }
+
+ /**
+ * Checks if `value` is `NaN`.
+ *
+ * **Note:** This method is based on
+ * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
+ * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
+ * `undefined` and other non-number values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ * @example
+ *
+ * _.isNaN(NaN);
+ * // => true
+ *
+ * _.isNaN(new Number(NaN));
+ * // => true
+ *
+ * isNaN(undefined);
+ * // => true
+ *
+ * _.isNaN(undefined);
+ * // => false
+ */
+ function isNaN(value) {
+ // An `NaN` primitive is the only value that is not equal to itself.
+ // Perform the `toStringTag` check first to avoid errors with some
+ // ActiveX objects in IE.
+ return isNumber(value) && value != +value;
+ }
+
+ /**
+ * Checks if `value` is `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
+ * @example
+ *
+ * _.isNull(null);
+ * // => true
+ *
+ * _.isNull(void 0);
+ * // => false
+ */
+ function isNull(value) {
+ return value === null;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+ * classified as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+ function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && baseGetTag(value) == numberTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a `RegExp` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ * @example
+ *
+ * _.isRegExp(/abc/);
+ * // => true
+ *
+ * _.isRegExp('/abc/');
+ * // => false
+ */
+ var isRegExp = baseIsRegExp;
+
+ /**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+ function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
+ }
+
+ /**
+ * Checks if `value` is `undefined`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ * @example
+ *
+ * _.isUndefined(void 0);
+ * // => true
+ *
+ * _.isUndefined(null);
+ * // => false
+ */
+ function isUndefined(value) {
+ return value === undefined;
+ }
+
+ /**
+ * Converts `value` to an array.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the converted array.
+ * @example
+ *
+ * _.toArray({ 'a': 1, 'b': 2 });
+ * // => [1, 2]
+ *
+ * _.toArray('abc');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toArray(1);
+ * // => []
+ *
+ * _.toArray(null);
+ * // => []
+ */
+ function toArray(value) {
+ if (!isArrayLike(value)) {
+ return values(value);
+ }
+ return value.length ? copyArray(value) : [];
+ }
+
+ /**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+ var toInteger = Number;
+
+ /**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+ var toNumber = Number;
+
+ /**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+ function toString(value) {
+ if (typeof value == 'string') {
+ return value;
+ }
+ return value == null ? '' : (value + '');
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Assigns own enumerable string keyed properties of source objects to the
+ * destination object. Source objects are applied from left to right.
+ * Subsequent sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object` and is loosely based on
+ * [`Object.assign`](https://mdn.io/Object/assign).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assignIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assign({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var assign = createAssigner(function(object, source) {
+ copyObject(source, nativeKeys(source), object);
+ });
+
+ /**
+ * This method is like `_.assign` except that it iterates over own and
+ * inherited source properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assign
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assignIn({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
+ */
+ var assignIn = createAssigner(function(object, source) {
+ copyObject(source, nativeKeysIn(source), object);
+ });
+
+ /**
+ * Creates an object that inherits from the `prototype` object. If a
+ * `properties` object is given, its own enumerable string keyed properties
+ * are assigned to the created object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Object
+ * @param {Object} prototype The object to inherit from.
+ * @param {Object} [properties] The properties to assign to the object.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * function Shape() {
+ * this.x = 0;
+ * this.y = 0;
+ * }
+ *
+ * function Circle() {
+ * Shape.call(this);
+ * }
+ *
+ * Circle.prototype = _.create(Shape.prototype, {
+ * 'constructor': Circle
+ * });
+ *
+ * var circle = new Circle;
+ * circle instanceof Circle;
+ * // => true
+ *
+ * circle instanceof Shape;
+ * // => true
+ */
+ function create(prototype, properties) {
+ var result = baseCreate(prototype);
+ return properties == null ? result : assign(result, properties);
+ }
+
+ /**
+ * Assigns own and inherited enumerable string keyed properties of source
+ * objects to the destination object for all destination properties that
+ * resolve to `undefined`. Source objects are applied from left to right.
+ * Once a property is set, additional values of the same property are ignored.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaultsDeep
+ * @example
+ *
+ * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var defaults = baseRest(function(object, sources) {
+ object = Object(object);
+
+ var index = -1;
+ var length = sources.length;
+ var guard = length > 2 ? sources[2] : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ length = 1;
+ }
+
+ while (++index < length) {
+ var source = sources[index];
+ var props = keysIn(source);
+ var propsIndex = -1;
+ var propsLength = props.length;
+
+ while (++propsIndex < propsLength) {
+ var key = props[propsIndex];
+ var value = object[key];
+
+ if (value === undefined ||
+ (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ object[key] = source[key];
+ }
+ }
+ }
+
+ return object;
+ });
+
+ /**
+ * Checks if `path` is a direct property of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': 2 } };
+ * var other = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b');
+ * // => true
+ *
+ * _.has(object, ['a', 'b']);
+ * // => true
+ *
+ * _.has(other, 'a');
+ * // => false
+ */
+ function has(object, path) {
+ return object != null && hasOwnProperty.call(object, path);
+ }
+
+ /**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+ var keys = nativeKeys;
+
+ /**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+ var keysIn = nativeKeysIn;
+
+ /**
+ * Creates an object composed of the picked `object` properties.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var pick = flatRest(function(object, paths) {
+ return object == null ? {} : basePick(object, paths);
+ });
+
+ /**
+ * This method is like `_.get` except that if the resolved value is a
+ * function it's invoked with the `this` binding of its parent object and
+ * its result is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+ *
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
+ *
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
+ *
+ * _.result(object, 'a[0].b.c3', 'default');
+ * // => 'default'
+ *
+ * _.result(object, 'a[0].b.c3', _.constant('default'));
+ * // => 'default'
+ */
+ function result(object, path, defaultValue) {
+ var value = object == null ? undefined : object[path];
+ if (value === undefined) {
+ value = defaultValue;
+ }
+ return isFunction(value) ? value.call(object) : value;
+ }
+
+ /**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+ function values(object) {
+ return object == null ? [] : baseValues(object, keys(object));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
+ * corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value. See
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * When working with HTML you should always
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
+ * XSS vectors.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, &amp; pebbles'
+ */
+ function escape(string) {
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+ function identity(value) {
+ return value;
+ }
+
+ /**
+ * Creates a function that invokes `func` with the arguments of the created
+ * function. If `func` is a property name, the created function returns the
+ * property value for a given element. If `func` is an array or object, the
+ * created function returns `true` for elements that contain the equivalent
+ * source properties, otherwise it returns `false`.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Util
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @returns {Function} Returns the callback.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
+ * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, _.iteratee(['user', 'fred']));
+ * // => [{ 'user': 'fred', 'age': 40 }]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, _.iteratee('user'));
+ * // => ['barney', 'fred']
+ *
+ * // Create custom iteratee shorthands.
+ * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
+ * return !_.isRegExp(func) ? iteratee(func) : function(string) {
+ * return func.test(string);
+ * };
+ * });
+ *
+ * _.filter(['abc', 'def'], /ef/);
+ * // => ['def']
+ */
+ var iteratee = baseIteratee;
+
+ /**
+ * Creates a function that performs a partial deep comparison between a given
+ * object and `source`, returning `true` if the given object has equivalent
+ * property values, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.isMatch` with `source`
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * **Note:** Multiple values can be checked by combining several matchers
+ * using `_.overSome`
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
+ * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
+ *
+ * // Checking for several possible values
+ * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
+ * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
+ */
+ function matches(source) {
+ return baseMatches(assign({}, source));
+ }
+
+ /**
+ * Adds all own enumerable string keyed function properties of a source
+ * object to the destination object. If `object` is a function, then methods
+ * are added to its prototype as well.
+ *
+ * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
+ * avoid conflicts caused by modifying the original.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Function|Object} [object=lodash] The destination object.
+ * @param {Object} source The object of functions to add.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
+ * @returns {Function|Object} Returns `object`.
+ * @example
+ *
+ * function vowels(string) {
+ * return _.filter(string, function(v) {
+ * return /[aeiou]/i.test(v);
+ * });
+ * }
+ *
+ * _.mixin({ 'vowels': vowels });
+ * _.vowels('fred');
+ * // => ['e']
+ *
+ * _('fred').vowels().value();
+ * // => ['e']
+ *
+ * _.mixin({ 'vowels': vowels }, { 'chain': false });
+ * _('fred').vowels();
+ * // => ['e']
+ */
+ function mixin(object, source, options) {
+ var props = keys(source),
+ methodNames = baseFunctions(source, props);
+
+ if (options == null &&
+ !(isObject(source) && (methodNames.length || !props.length))) {
+ options = source;
+ source = object;
+ object = this;
+ methodNames = baseFunctions(source, keys(source));
+ }
+ var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
+ isFunc = isFunction(object);
+
+ baseEach(methodNames, function(methodName) {
+ var func = source[methodName];
+ object[methodName] = func;
+ if (isFunc) {
+ object.prototype[methodName] = function() {
+ var chainAll = this.__chain__;
+ if (chain || chainAll) {
+ var result = object(this.__wrapped__),
+ actions = result.__actions__ = copyArray(this.__actions__);
+
+ actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+ result.__chain__ = chainAll;
+ return result;
+ }
+ return func.apply(object, arrayPush([this.value()], arguments));
+ };
+ }
+ });
+
+ return object;
+ }
+
+ /**
+ * Reverts the `_` variable to its previous value and returns a reference to
+ * the `lodash` function.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @returns {Function} Returns the `lodash` function.
+ * @example
+ *
+ * var lodash = _.noConflict();
+ */
+ function noConflict() {
+ if (root._ === this) {
+ root._ = oldDash;
+ }
+ return this;
+ }
+
+ /**
+ * This method returns `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * _.times(2, _.noop);
+ * // => [undefined, undefined]
+ */
+ function noop() {
+ // No operation performed.
+ }
+
+ /**
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {string} [prefix=''] The value to prefix the ID with.
+ * @returns {string} Returns the unique ID.
+ * @example
+ *
+ * _.uniqueId('contact_');
+ * // => 'contact_104'
+ *
+ * _.uniqueId();
+ * // => '105'
+ */
+ function uniqueId(prefix) {
+ var id = ++idCounter;
+ return toString(prefix) + id;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Computes the maximum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * _.max([4, 2, 8, 6]);
+ * // => 8
+ *
+ * _.max([]);
+ * // => undefined
+ */
+ function max(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseGt)
+ : undefined;
+ }
+
+ /**
+ * Computes the minimum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * _.min([4, 2, 8, 6]);
+ * // => 2
+ *
+ * _.min([]);
+ * // => undefined
+ */
+ function min(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseLt)
+ : undefined;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return wrapped values in chain sequences.
+ lodash.assignIn = assignIn;
+ lodash.before = before;
+ lodash.bind = bind;
+ lodash.chain = chain;
+ lodash.compact = compact;
+ lodash.concat = concat;
+ lodash.create = create;
+ lodash.defaults = defaults;
+ lodash.defer = defer;
+ lodash.delay = delay;
+ lodash.filter = filter;
+ lodash.flatten = flatten;
+ lodash.flattenDeep = flattenDeep;
+ lodash.iteratee = iteratee;
+ lodash.keys = keys;
+ lodash.map = map;
+ lodash.matches = matches;
+ lodash.mixin = mixin;
+ lodash.negate = negate;
+ lodash.once = once;
+ lodash.pick = pick;
+ lodash.slice = slice;
+ lodash.sortBy = sortBy;
+ lodash.tap = tap;
+ lodash.thru = thru;
+ lodash.toArray = toArray;
+ lodash.values = values;
+
+ // Add aliases.
+ lodash.extend = assignIn;
+
+ // Add methods to `lodash.prototype`.
+ mixin(lodash, lodash);
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return unwrapped values in chain sequences.
+ lodash.clone = clone;
+ lodash.escape = escape;
+ lodash.every = every;
+ lodash.find = find;
+ lodash.forEach = forEach;
+ lodash.has = has;
+ lodash.head = head;
+ lodash.identity = identity;
+ lodash.indexOf = indexOf;
+ lodash.isArguments = isArguments;
+ lodash.isArray = isArray;
+ lodash.isBoolean = isBoolean;
+ lodash.isDate = isDate;
+ lodash.isEmpty = isEmpty;
+ lodash.isEqual = isEqual;
+ lodash.isFinite = isFinite;
+ lodash.isFunction = isFunction;
+ lodash.isNaN = isNaN;
+ lodash.isNull = isNull;
+ lodash.isNumber = isNumber;
+ lodash.isObject = isObject;
+ lodash.isRegExp = isRegExp;
+ lodash.isString = isString;
+ lodash.isUndefined = isUndefined;
+ lodash.last = last;
+ lodash.max = max;
+ lodash.min = min;
+ lodash.noConflict = noConflict;
+ lodash.noop = noop;
+ lodash.reduce = reduce;
+ lodash.result = result;
+ lodash.size = size;
+ lodash.some = some;
+ lodash.uniqueId = uniqueId;
+
+ // Add aliases.
+ lodash.each = forEach;
+ lodash.first = head;
+
+ mixin(lodash, (function() {
+ var source = {};
+ baseForOwn(lodash, function(func, methodName) {
+ if (!hasOwnProperty.call(lodash.prototype, methodName)) {
+ source[methodName] = func;
+ }
+ });
+ return source;
+ }()), { 'chain': false });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The semantic version number.
+ *
+ * @static
+ * @memberOf _
+ * @type {string}
+ */
+ lodash.VERSION = VERSION;
+
+ // Add `Array` methods to `lodash.prototype`.
+ baseEach(['pop', 'join', 'replace', 'reverse', 'split', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
+ var func = (/^(?:replace|split)$/.test(methodName) ? String.prototype : arrayProto)[methodName],
+ chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
+ retUnwrapped = /^(?:pop|join|replace|shift)$/.test(methodName);
+
+ lodash.prototype[methodName] = function() {
+ var args = arguments;
+ if (retUnwrapped && !this.__chain__) {
+ var value = this.value();
+ return func.apply(isArray(value) ? value : [], args);
+ }
+ return this[chainName](function(value) {
+ return func.apply(isArray(value) ? value : [], args);
+ });
+ };
+ });
+
+ // Add chain sequence methods to the `lodash` wrapper.
+ lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
+
+ /*--------------------------------------------------------------------------*/
+
+ // Some AMD build optimizers, like r.js, check for condition patterns like:
+ if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
+ // Expose Lodash on the global object to prevent errors when Lodash is
+ // loaded by a script tag in the presence of an AMD loader.
+ // See http://requirejs.org/docs/errors.html#mismatch for more details.
+ // Use `_.noConflict` to remove Lodash from the global object.
+ root._ = lodash;
+
+ // Define as an anonymous module so, through path mapping, it can be
+ // referenced as the "underscore" module.
+ define(function() {
+ return lodash;
+ });
+ }
+ // Check for `exports` after `define` in case a build optimizer adds it.
+ else if (freeModule) {
+ // Export for Node.js.
+ (freeModule.exports = lodash)._ = lodash;
+ // Export for CommonJS support.
+ freeExports._ = lodash;
+ }
+ else {
+ // Export to the global object.
+ root._ = lodash;
+ }
+}.call(this));
diff --git a/node_modules/lodash/core.min.js b/node_modules/lodash/core.min.js
new file mode 100644
index 0000000..e425e4d
--- /dev/null
+++ b/node_modules/lodash/core.min.js
@@ -0,0 +1,29 @@
+/**
+ * @license
+ * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
+ * Build: `lodash core -o ./dist/lodash.core.js`
+ */
+;(function(){function n(n){return H(n)&&pn.call(n,"callee")&&!yn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?Z:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return j(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");
+return setTimeout(function(){n.apply(Z,r)},t)}function f(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function a(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===Z?i===i:r(i,c)))var c=i,f=o}return f}function l(n,t){var r=[];return mn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function p(n,r,e,u,o){var i=-1,c=n.length;for(e||(e=R),o||(o=[]);++i<c;){var f=n[i];0<r&&e(f)?1<r?p(f,r-1,e,u,o):t(o,f):u||(o[o.length]=f)}return o}function s(n,t){return n&&On(n,t,Dn);
+}function h(n,t){return l(t,function(t){return U(n[t])})}function v(n,t){return n>t}function b(n,t,r,e,u){return n===t||(null==n||null==t||!H(n)&&!H(t)?n!==n&&t!==t:y(n,t,r,e,b,u))}function y(n,t,r,e,u,o){var i=Nn(n),c=Nn(t),f=i?"[object Array]":hn.call(n),a=c?"[object Array]":hn.call(t),f="[object Arguments]"==f?"[object Object]":f,a="[object Arguments]"==a?"[object Object]":a,l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){
+return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=T(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=J(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=B(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n,f=f?t.value():t,
+r=u(i,f,r,e,o),o.pop(),r)}function g(n){return typeof n=="function"?n:null==n?X:(typeof n=="object"?d:r)(n)}function _(n,t){return n<t}function j(n,t){var r=-1,e=M(n)?Array(n.length):[];return mn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function d(n){var t=_n(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&b(n[u],r[u],3)))return false}return true}}function m(n,t){return n=Object(n),C(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function O(n){return xn(I(n,void 0,X),n+"");
+}function x(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function A(n){return x(n,0,n.length)}function E(n,t){var r;return mn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function w(n,r){return C(r,function(n,r){return r.func.apply(r.thisArg,t([n],r.args))},n)}function k(n,t,r){var e=!r;r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],c=Z;if(c===Z&&(c=n[i]),e)r[i]=c;else{var f=r,a=f[i];pn.call(f,i)&&J(a,c)&&(c!==Z||i in f)||(f[i]=c);
+}}return r}function N(n){return O(function(t,r){var e=-1,u=r.length,o=1<u?r[u-1]:Z,o=3<n.length&&typeof o=="function"?(u--,o):Z;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function F(n){return function(){var t=arguments,r=dn(n.prototype),t=n.apply(r,t);return V(t)?t:r}}function S(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==on&&this instanceof e?u:n;++c<f;)a[c]=r[c];for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");
+var u=F(n);return e}function T(n,t,r,e,u,o){var i=n.length,c=t.length;if(i!=c&&!(1&r&&c>i))return false;var c=o.get(n),f=o.get(t);if(c&&f)return c==t&&f==n;for(var c=-1,f=true,a=2&r?[]:Z;++c<i;){var l=n[c],p=t[c];if(void 0!==Z){f=false;break}if(a){if(!E(t,function(n,t){if(!P(a,t)&&(l===n||u(l,n,r,e,o)))return a.push(t)})){f=false;break}}else if(l!==p&&!u(l,p,r,e,o)){f=false;break}}return f}function B(n,t,r,e,u,o){var i=1&r,c=Dn(n),f=c.length,a=Dn(t).length;if(f!=a&&!i)return false;for(a=f;a--;){var l=c[a];if(!(i?l in t:pn.call(t,l)))return false;
+}var p=o.get(n),l=o.get(t);if(p&&l)return p==t&&l==n;for(p=true;++a<f;){var l=c[a],s=n[l],h=t[l];if(void 0!==Z||s!==h&&!u(s,h,r,e,o)){p=false;break}i||(i="constructor"==l)}return p&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(p=false)),p}function R(t){return Nn(t)||n(t)}function D(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);return t}function I(n,t,r){return t=jn(t===Z?n.length-1:t,0),
+function(){for(var e=arguments,u=-1,o=jn(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];for(u=-1,o=Array(t+1);++u<t;)o[u]=e[u];return o[t]=r(i),n.apply(this,o)}}function $(n){return(null==n?0:n.length)?p(n,1):[]}function q(n){return n&&n.length?n[0]:Z}function P(n,t,r){var e=null==n?0:n.length;r=typeof r=="number"?0>r?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1}function z(n,t){return mn(n,g(t))}function C(n,t,r){return e(n,g(t),r,3>arguments.length,mn);
+}function G(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function J(n,t){return n===t||n!==n&&t!==t}function M(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t),t&&!U(n)}function U(n){return!!V(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function V(n){var t=typeof n;
+return null!=n&&("object"==t||"function"==t)}function H(n){return null!=n&&typeof n=="object"}function K(n){return typeof n=="number"||H(n)&&"[object Number]"==hn.call(n)}function L(n){return typeof n=="string"||!Nn(n)&&H(n)&&"[object String]"==hn.call(n)}function Q(n){return typeof n=="string"?n:null==n?"":n+""}function W(n){return null==n?[]:u(n,Dn(n))}function X(n){return n}function Y(n,r,e){var u=Dn(r),o=h(r,u);null!=e||V(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=h(r,Dn(r)));var i=!(V(e)&&"chain"in e&&!e.chain),c=U(n);
+return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=A(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var Z,nn=1/0,tn=/[&<>"']/g,rn=RegExp(tn.source),en=/^(?:0|[1-9]\d*)$/,un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){
+return function(t){return null==n?Z:n[t]}}({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,bn=Object.create,yn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return V(t)?bn?bn(t):(n.prototype=t,t=new n,n.prototype=Z,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i;
+var mn=function(n,t){return function(r,e){if(null==r)return r;if(!M(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(s),On=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}(),xn=X,An=function(n){return function(t,r,e){var u=Object(t);if(!M(t)){var o=g(r);t=Dn(t),r=function(n){return o(u[n],n,u)}}return r=n(t,r,e),-1<r?u[o?t[r]:r]:Z}}(function(n,t,r){var e=null==n?0:n.length;
+if(!e)return-1;r=null==r?0:Fn(r),0>r&&(r=jn(e+r,0));n:{for(t=g(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),En=O(function(n,t,r){return S(n,t,r)}),wn=O(function(n,t){return c(n,1,t)}),kn=O(function(n,t,r){return c(n,Sn(t)||0,r)}),Nn=Array.isArray,Fn=Number,Sn=Number,Tn=N(function(n,t){k(t,_n(t),n)}),Bn=N(function(n,t){k(t,D(t),n)}),Rn=O(function(n,t){n=Object(n);var r,e=-1,u=t.length,o=2<u?t[2]:Z;if(r=o){r=t[0];var i=t[1];if(V(o)){var c=typeof i;if("number"==c){if(c=M(o))var c=o.length,f=typeof i,c=null==c?9007199254740991:c,c=!!c&&("number"==f||"symbol"!=f&&en.test(i))&&-1<i&&0==i%1&&i<c;
+}else c="string"==c&&i in o;r=!!c&&J(o[i],r)}else r=false}for(r&&(u=1);++e<u;)for(o=t[e],r=In(o),i=-1,c=r.length;++i<c;){var f=r[i],a=n[f];(a===Z||J(a,ln[f])&&!pn.call(n,f))&&(n[f]=o[f])}return n}),Dn=_n,In=D,$n=function(n){return xn(I(n,Z,$),n+"")}(function(n,t){return null==n?{}:m(n,t)});o.assignIn=Bn,o.before=G,o.bind=En,o.chain=function(n){return n=o(n),n.__chain__=true,n},o.compact=function(n){return l(n,Boolean)},o.concat=function(){var n=arguments.length;if(!n)return[];for(var r=Array(n-1),e=arguments[0];n--;)r[n-1]=arguments[n];
+return t(Nn(e)?A(e):[e],p(r,1))},o.create=function(n,t){var r=dn(n);return null==t?r:Tn(r,t)},o.defaults=Rn,o.defer=wn,o.delay=kn,o.filter=function(n,t){return l(n,g(t))},o.flatten=$,o.flattenDeep=function(n){return(null==n?0:n.length)?p(n,nn):[]},o.iteratee=g,o.keys=Dn,o.map=function(n,t){return j(n,g(t))},o.matches=function(n){return d(Tn({},n))},o.mixin=Y,o.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},o.once=function(n){
+return G(2,n)},o.pick=$n,o.slice=function(n,t,r){var e=null==n?0:n.length;return r=r===Z?e:+r,e?x(n,null==t?0:+t,r):[]},o.sortBy=function(n,t){var e=0;return t=g(t),j(j(n,function(n,r,u){return{value:n,index:e++,criteria:t(n,r,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==Z,o=null===r,i=r===r,c=e!==Z,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r<e||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),r("value"))},o.tap=function(n,t){
+return t(n),n},o.thru=function(n,t){return t(n)},o.toArray=function(n){return M(n)?n.length?A(n):[]:W(n)},o.values=W,o.extend=Bn,Y(o,o),o.clone=function(n){return V(n)?Nn(n)?A(n):k(n,_n(n)):n},o.escape=function(n){return(n=Q(n))&&rn.test(n)?n.replace(tn,fn):n},o.every=function(n,t,r){return t=r?Z:t,f(n,g(t))},o.find=An,o.forEach=z,o.has=function(n,t){return null!=n&&pn.call(n,t)},o.head=q,o.identity=X,o.indexOf=P,o.isArguments=n,o.isArray=Nn,o.isBoolean=function(n){return true===n||false===n||H(n)&&"[object Boolean]"==hn.call(n);
+},o.isDate=function(n){return H(n)&&"[object Date]"==hn.call(n)},o.isEmpty=function(t){return M(t)&&(Nn(t)||L(t)||U(t.splice)||n(t))?!t.length:!_n(t).length},o.isEqual=function(n,t){return b(n,t)},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=U,o.isNaN=function(n){return K(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=K,o.isObject=V,o.isRegExp=function(n){return H(n)&&"[object RegExp]"==hn.call(n)},o.isString=L,o.isUndefined=function(n){return n===Z},o.last=function(n){
+var t=null==n?0:n.length;return t?n[t-1]:Z},o.max=function(n){return n&&n.length?a(n,X,v):Z},o.min=function(n){return n&&n.length?a(n,X,_):Z},o.noConflict=function(){return on._===this&&(on._=vn),this},o.noop=function(){},o.reduce=C,o.result=function(n,t,r){return t=null==n?Z:n[t],t===Z&&(t=r),U(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=M(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?Z:t,E(n,g(t))},o.uniqueId=function(n){var t=++sn;return Q(n)+t},o.each=z,o.first=q,Y(o,function(){
+var n={};return s(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.21",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n);
+})}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return w(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(on._=o, define(function(){return o})):cn?((cn.exports=o)._=o,un._=o):on._=o}).call(this); \ No newline at end of file
diff --git a/node_modules/lodash/countBy.js b/node_modules/lodash/countBy.js
new file mode 100644
index 0000000..0e88abc
--- /dev/null
+++ b/node_modules/lodash/countBy.js
@@ -0,0 +1,40 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ createAggregator = require('./_createAggregator');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the number of times the key was returned by `iteratee`. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.countBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': 1, '6': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.countBy(['one', 'two', 'three'], 'length');
+ * // => { '3': 2, '5': 1 }
+ */
+var countBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ ++result[key];
+ } else {
+ baseAssignValue(result, key, 1);
+ }
+});
+
+module.exports = countBy;
diff --git a/node_modules/lodash/create.js b/node_modules/lodash/create.js
new file mode 100644
index 0000000..919edb8
--- /dev/null
+++ b/node_modules/lodash/create.js
@@ -0,0 +1,43 @@
+var baseAssign = require('./_baseAssign'),
+ baseCreate = require('./_baseCreate');
+
+/**
+ * Creates an object that inherits from the `prototype` object. If a
+ * `properties` object is given, its own enumerable string keyed properties
+ * are assigned to the created object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Object
+ * @param {Object} prototype The object to inherit from.
+ * @param {Object} [properties] The properties to assign to the object.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * function Shape() {
+ * this.x = 0;
+ * this.y = 0;
+ * }
+ *
+ * function Circle() {
+ * Shape.call(this);
+ * }
+ *
+ * Circle.prototype = _.create(Shape.prototype, {
+ * 'constructor': Circle
+ * });
+ *
+ * var circle = new Circle;
+ * circle instanceof Circle;
+ * // => true
+ *
+ * circle instanceof Shape;
+ * // => true
+ */
+function create(prototype, properties) {
+ var result = baseCreate(prototype);
+ return properties == null ? result : baseAssign(result, properties);
+}
+
+module.exports = create;
diff --git a/node_modules/lodash/curry.js b/node_modules/lodash/curry.js
new file mode 100644
index 0000000..918db1a
--- /dev/null
+++ b/node_modules/lodash/curry.js
@@ -0,0 +1,57 @@
+var createWrap = require('./_createWrap');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_CURRY_FLAG = 8;
+
+/**
+ * Creates a function that accepts arguments of `func` and either invokes
+ * `func` returning its result, if at least `arity` number of arguments have
+ * been provided, or returns a function that accepts the remaining `func`
+ * arguments, and so on. The arity of `func` may be specified if `func.length`
+ * is not sufficient.
+ *
+ * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curry(abc);
+ *
+ * curried(1)(2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(1)(_, 3)(2);
+ * // => [1, 2, 3]
+ */
+function curry(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curry.placeholder;
+ return result;
+}
+
+// Assign default placeholders.
+curry.placeholder = {};
+
+module.exports = curry;
diff --git a/node_modules/lodash/curryRight.js b/node_modules/lodash/curryRight.js
new file mode 100644
index 0000000..c85b6f3
--- /dev/null
+++ b/node_modules/lodash/curryRight.js
@@ -0,0 +1,54 @@
+var createWrap = require('./_createWrap');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_CURRY_RIGHT_FLAG = 16;
+
+/**
+ * This method is like `_.curry` except that arguments are applied to `func`
+ * in the manner of `_.partialRight` instead of `_.partial`.
+ *
+ * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curryRight(abc);
+ *
+ * curried(3)(2)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(2, 3)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(3)(1, _)(2);
+ * // => [1, 2, 3]
+ */
+function curryRight(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curryRight.placeholder;
+ return result;
+}
+
+// Assign default placeholders.
+curryRight.placeholder = {};
+
+module.exports = curryRight;
diff --git a/node_modules/lodash/date.js b/node_modules/lodash/date.js
new file mode 100644
index 0000000..cbf5b41
--- /dev/null
+++ b/node_modules/lodash/date.js
@@ -0,0 +1,3 @@
+module.exports = {
+ 'now': require('./now')
+};
diff --git a/node_modules/lodash/debounce.js b/node_modules/lodash/debounce.js
new file mode 100644
index 0000000..8f751d5
--- /dev/null
+++ b/node_modules/lodash/debounce.js
@@ -0,0 +1,191 @@
+var isObject = require('./isObject'),
+ now = require('./now'),
+ toNumber = require('./toNumber');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max,
+ nativeMin = Math.min;
+
+/**
+ * Creates a debounced function that delays invoking `func` until after `wait`
+ * milliseconds have elapsed since the last time the debounced function was
+ * invoked. The debounced function comes with a `cancel` method to cancel
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
+ * Provide `options` to indicate whether `func` should be invoked on the
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
+ * with the last arguments provided to the debounced function. Subsequent
+ * calls to the debounced function return the result of the last `func`
+ * invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the debounced function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.debounce` and `_.throttle`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to debounce.
+ * @param {number} [wait=0] The number of milliseconds to delay.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=false]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {number} [options.maxWait]
+ * The maximum time `func` is allowed to be delayed before it's invoked.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new debounced function.
+ * @example
+ *
+ * // Avoid costly calculations while the window size is in flux.
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
+ *
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
+ * 'leading': true,
+ * 'trailing': false
+ * }));
+ *
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
+ * var source = new EventSource('/stream');
+ * jQuery(source).on('message', debounced);
+ *
+ * // Cancel the trailing debounced invocation.
+ * jQuery(window).on('popstate', debounced.cancel);
+ */
+function debounce(func, wait, options) {
+ var lastArgs,
+ lastThis,
+ maxWait,
+ result,
+ timerId,
+ lastCallTime,
+ lastInvokeTime = 0,
+ leading = false,
+ maxing = false,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ wait = toNumber(wait) || 0;
+ if (isObject(options)) {
+ leading = !!options.leading;
+ maxing = 'maxWait' in options;
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+
+ function invokeFunc(time) {
+ var args = lastArgs,
+ thisArg = lastThis;
+
+ lastArgs = lastThis = undefined;
+ lastInvokeTime = time;
+ result = func.apply(thisArg, args);
+ return result;
+ }
+
+ function leadingEdge(time) {
+ // Reset any `maxWait` timer.
+ lastInvokeTime = time;
+ // Start the timer for the trailing edge.
+ timerId = setTimeout(timerExpired, wait);
+ // Invoke the leading edge.
+ return leading ? invokeFunc(time) : result;
+ }
+
+ function remainingWait(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime,
+ timeWaiting = wait - timeSinceLastCall;
+
+ return maxing
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
+ : timeWaiting;
+ }
+
+ function shouldInvoke(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime;
+
+ // Either this is the first call, activity has stopped and we're at the
+ // trailing edge, the system time has gone backwards and we're treating
+ // it as the trailing edge, or we've hit the `maxWait` limit.
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
+ }
+
+ function timerExpired() {
+ var time = now();
+ if (shouldInvoke(time)) {
+ return trailingEdge(time);
+ }
+ // Restart the timer.
+ timerId = setTimeout(timerExpired, remainingWait(time));
+ }
+
+ function trailingEdge(time) {
+ timerId = undefined;
+
+ // Only invoke if we have `lastArgs` which means `func` has been
+ // debounced at least once.
+ if (trailing && lastArgs) {
+ return invokeFunc(time);
+ }
+ lastArgs = lastThis = undefined;
+ return result;
+ }
+
+ function cancel() {
+ if (timerId !== undefined) {
+ clearTimeout(timerId);
+ }
+ lastInvokeTime = 0;
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
+ }
+
+ function flush() {
+ return timerId === undefined ? result : trailingEdge(now());
+ }
+
+ function debounced() {
+ var time = now(),
+ isInvoking = shouldInvoke(time);
+
+ lastArgs = arguments;
+ lastThis = this;
+ lastCallTime = time;
+
+ if (isInvoking) {
+ if (timerId === undefined) {
+ return leadingEdge(lastCallTime);
+ }
+ if (maxing) {
+ // Handle invocations in a tight loop.
+ clearTimeout(timerId);
+ timerId = setTimeout(timerExpired, wait);
+ return invokeFunc(lastCallTime);
+ }
+ }
+ if (timerId === undefined) {
+ timerId = setTimeout(timerExpired, wait);
+ }
+ return result;
+ }
+ debounced.cancel = cancel;
+ debounced.flush = flush;
+ return debounced;
+}
+
+module.exports = debounce;
diff --git a/node_modules/lodash/deburr.js b/node_modules/lodash/deburr.js
new file mode 100644
index 0000000..f85e314
--- /dev/null
+++ b/node_modules/lodash/deburr.js
@@ -0,0 +1,45 @@
+var deburrLetter = require('./_deburrLetter'),
+ toString = require('./toString');
+
+/** Used to match Latin Unicode letters (excluding mathematical operators). */
+var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
+
+/** Used to compose unicode character classes. */
+var rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
+
+/** Used to compose unicode capture groups. */
+var rsCombo = '[' + rsComboRange + ']';
+
+/**
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
+ */
+var reComboMark = RegExp(rsCombo, 'g');
+
+/**
+ * Deburrs `string` by converting
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
+ * letters to basic Latin letters and removing
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to deburr.
+ * @returns {string} Returns the deburred string.
+ * @example
+ *
+ * _.deburr('déjà vu');
+ * // => 'deja vu'
+ */
+function deburr(string) {
+ string = toString(string);
+ return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
+}
+
+module.exports = deburr;
diff --git a/node_modules/lodash/defaultTo.js b/node_modules/lodash/defaultTo.js
new file mode 100644
index 0000000..5b33359
--- /dev/null
+++ b/node_modules/lodash/defaultTo.js
@@ -0,0 +1,25 @@
+/**
+ * Checks `value` to determine whether a default value should be returned in
+ * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
+ * or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.14.0
+ * @category Util
+ * @param {*} value The value to check.
+ * @param {*} defaultValue The default value.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * _.defaultTo(1, 10);
+ * // => 1
+ *
+ * _.defaultTo(undefined, 10);
+ * // => 10
+ */
+function defaultTo(value, defaultValue) {
+ return (value == null || value !== value) ? defaultValue : value;
+}
+
+module.exports = defaultTo;
diff --git a/node_modules/lodash/defaults.js b/node_modules/lodash/defaults.js
new file mode 100644
index 0000000..c74df04
--- /dev/null
+++ b/node_modules/lodash/defaults.js
@@ -0,0 +1,64 @@
+var baseRest = require('./_baseRest'),
+ eq = require('./eq'),
+ isIterateeCall = require('./_isIterateeCall'),
+ keysIn = require('./keysIn');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Assigns own and inherited enumerable string keyed properties of source
+ * objects to the destination object for all destination properties that
+ * resolve to `undefined`. Source objects are applied from left to right.
+ * Once a property is set, additional values of the same property are ignored.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaultsDeep
+ * @example
+ *
+ * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+var defaults = baseRest(function(object, sources) {
+ object = Object(object);
+
+ var index = -1;
+ var length = sources.length;
+ var guard = length > 2 ? sources[2] : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ length = 1;
+ }
+
+ while (++index < length) {
+ var source = sources[index];
+ var props = keysIn(source);
+ var propsIndex = -1;
+ var propsLength = props.length;
+
+ while (++propsIndex < propsLength) {
+ var key = props[propsIndex];
+ var value = object[key];
+
+ if (value === undefined ||
+ (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ object[key] = source[key];
+ }
+ }
+ }
+
+ return object;
+});
+
+module.exports = defaults;
diff --git a/node_modules/lodash/defaultsDeep.js b/node_modules/lodash/defaultsDeep.js
new file mode 100644
index 0000000..9b5fa3e
--- /dev/null
+++ b/node_modules/lodash/defaultsDeep.js
@@ -0,0 +1,30 @@
+var apply = require('./_apply'),
+ baseRest = require('./_baseRest'),
+ customDefaultsMerge = require('./_customDefaultsMerge'),
+ mergeWith = require('./mergeWith');
+
+/**
+ * This method is like `_.defaults` except that it recursively assigns
+ * default properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaults
+ * @example
+ *
+ * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
+ * // => { 'a': { 'b': 2, 'c': 3 } }
+ */
+var defaultsDeep = baseRest(function(args) {
+ args.push(undefined, customDefaultsMerge);
+ return apply(mergeWith, undefined, args);
+});
+
+module.exports = defaultsDeep;
diff --git a/node_modules/lodash/defer.js b/node_modules/lodash/defer.js
new file mode 100644
index 0000000..f6d6c6f
--- /dev/null
+++ b/node_modules/lodash/defer.js
@@ -0,0 +1,26 @@
+var baseDelay = require('./_baseDelay'),
+ baseRest = require('./_baseRest');
+
+/**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // => Logs 'deferred' after one millisecond.
+ */
+var defer = baseRest(function(func, args) {
+ return baseDelay(func, 1, args);
+});
+
+module.exports = defer;
diff --git a/node_modules/lodash/delay.js b/node_modules/lodash/delay.js
new file mode 100644
index 0000000..bd55479
--- /dev/null
+++ b/node_modules/lodash/delay.js
@@ -0,0 +1,28 @@
+var baseDelay = require('./_baseDelay'),
+ baseRest = require('./_baseRest'),
+ toNumber = require('./toNumber');
+
+/**
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
+ * provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.delay(function(text) {
+ * console.log(text);
+ * }, 1000, 'later');
+ * // => Logs 'later' after one second.
+ */
+var delay = baseRest(function(func, wait, args) {
+ return baseDelay(func, toNumber(wait) || 0, args);
+});
+
+module.exports = delay;
diff --git a/node_modules/lodash/difference.js b/node_modules/lodash/difference.js
new file mode 100644
index 0000000..fa28bb3
--- /dev/null
+++ b/node_modules/lodash/difference.js
@@ -0,0 +1,33 @@
+var baseDifference = require('./_baseDifference'),
+ baseFlatten = require('./_baseFlatten'),
+ baseRest = require('./_baseRest'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * Creates an array of `array` values not included in the other given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
+ *
+ * **Note:** Unlike `_.pullAll`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.without, _.xor
+ * @example
+ *
+ * _.difference([2, 1], [2, 3]);
+ * // => [1]
+ */
+var difference = baseRest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
+ : [];
+});
+
+module.exports = difference;
diff --git a/node_modules/lodash/differenceBy.js b/node_modules/lodash/differenceBy.js
new file mode 100644
index 0000000..2cd63e7
--- /dev/null
+++ b/node_modules/lodash/differenceBy.js
@@ -0,0 +1,44 @@
+var baseDifference = require('./_baseDifference'),
+ baseFlatten = require('./_baseFlatten'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.difference` except that it accepts `iteratee` which
+ * is invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+var differenceBy = baseRest(function(array, values) {
+ var iteratee = last(values);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2))
+ : [];
+});
+
+module.exports = differenceBy;
diff --git a/node_modules/lodash/differenceWith.js b/node_modules/lodash/differenceWith.js
new file mode 100644
index 0000000..c0233f4
--- /dev/null
+++ b/node_modules/lodash/differenceWith.js
@@ -0,0 +1,40 @@
+var baseDifference = require('./_baseDifference'),
+ baseFlatten = require('./_baseFlatten'),
+ baseRest = require('./_baseRest'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.difference` except that it accepts `comparator`
+ * which is invoked to compare elements of `array` to `values`. The order and
+ * references of result values are determined by the first array. The comparator
+ * is invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ *
+ * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }]
+ */
+var differenceWith = baseRest(function(array, values) {
+ var comparator = last(values);
+ if (isArrayLikeObject(comparator)) {
+ comparator = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
+ : [];
+});
+
+module.exports = differenceWith;
diff --git a/node_modules/lodash/divide.js b/node_modules/lodash/divide.js
new file mode 100644
index 0000000..8cae0cd
--- /dev/null
+++ b/node_modules/lodash/divide.js
@@ -0,0 +1,22 @@
+var createMathOperation = require('./_createMathOperation');
+
+/**
+ * Divide two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} dividend The first number in a division.
+ * @param {number} divisor The second number in a division.
+ * @returns {number} Returns the quotient.
+ * @example
+ *
+ * _.divide(6, 4);
+ * // => 1.5
+ */
+var divide = createMathOperation(function(dividend, divisor) {
+ return dividend / divisor;
+}, 1);
+
+module.exports = divide;
diff --git a/node_modules/lodash/drop.js b/node_modules/lodash/drop.js
new file mode 100644
index 0000000..d5c3cba
--- /dev/null
+++ b/node_modules/lodash/drop.js
@@ -0,0 +1,38 @@
+var baseSlice = require('./_baseSlice'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a slice of `array` with `n` elements dropped from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.drop([1, 2, 3]);
+ * // => [2, 3]
+ *
+ * _.drop([1, 2, 3], 2);
+ * // => [3]
+ *
+ * _.drop([1, 2, 3], 5);
+ * // => []
+ *
+ * _.drop([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+function drop(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, n < 0 ? 0 : n, length);
+}
+
+module.exports = drop;
diff --git a/node_modules/lodash/dropRight.js b/node_modules/lodash/dropRight.js
new file mode 100644
index 0000000..441fe99
--- /dev/null
+++ b/node_modules/lodash/dropRight.js
@@ -0,0 +1,39 @@
+var baseSlice = require('./_baseSlice'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a slice of `array` with `n` elements dropped from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.dropRight([1, 2, 3]);
+ * // => [1, 2]
+ *
+ * _.dropRight([1, 2, 3], 2);
+ * // => [1]
+ *
+ * _.dropRight([1, 2, 3], 5);
+ * // => []
+ *
+ * _.dropRight([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+function dropRight(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+}
+
+module.exports = dropRight;
diff --git a/node_modules/lodash/dropRightWhile.js b/node_modules/lodash/dropRightWhile.js
new file mode 100644
index 0000000..9ad36a0
--- /dev/null
+++ b/node_modules/lodash/dropRightWhile.js
@@ -0,0 +1,45 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseWhile = require('./_baseWhile');
+
+/**
+ * Creates a slice of `array` excluding elements dropped from the end.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.dropRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropRightWhile(users, ['active', false]);
+ * // => objects for ['barney']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropRightWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+function dropRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, baseIteratee(predicate, 3), true, true)
+ : [];
+}
+
+module.exports = dropRightWhile;
diff --git a/node_modules/lodash/dropWhile.js b/node_modules/lodash/dropWhile.js
new file mode 100644
index 0000000..903ef56
--- /dev/null
+++ b/node_modules/lodash/dropWhile.js
@@ -0,0 +1,45 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseWhile = require('./_baseWhile');
+
+/**
+ * Creates a slice of `array` excluding elements dropped from the beginning.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.dropWhile(users, function(o) { return !o.active; });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropWhile(users, ['active', false]);
+ * // => objects for ['pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+function dropWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, baseIteratee(predicate, 3), true)
+ : [];
+}
+
+module.exports = dropWhile;
diff --git a/node_modules/lodash/each.js b/node_modules/lodash/each.js
new file mode 100644
index 0000000..8800f42
--- /dev/null
+++ b/node_modules/lodash/each.js
@@ -0,0 +1 @@
+module.exports = require('./forEach');
diff --git a/node_modules/lodash/eachRight.js b/node_modules/lodash/eachRight.js
new file mode 100644
index 0000000..3252b2a
--- /dev/null
+++ b/node_modules/lodash/eachRight.js
@@ -0,0 +1 @@
+module.exports = require('./forEachRight');
diff --git a/node_modules/lodash/endsWith.js b/node_modules/lodash/endsWith.js
new file mode 100644
index 0000000..76fc866
--- /dev/null
+++ b/node_modules/lodash/endsWith.js
@@ -0,0 +1,43 @@
+var baseClamp = require('./_baseClamp'),
+ baseToString = require('./_baseToString'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * Checks if `string` ends with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=string.length] The position to search up to.
+ * @returns {boolean} Returns `true` if `string` ends with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.endsWith('abc', 'c');
+ * // => true
+ *
+ * _.endsWith('abc', 'b');
+ * // => false
+ *
+ * _.endsWith('abc', 'b', 2);
+ * // => true
+ */
+function endsWith(string, target, position) {
+ string = toString(string);
+ target = baseToString(target);
+
+ var length = string.length;
+ position = position === undefined
+ ? length
+ : baseClamp(toInteger(position), 0, length);
+
+ var end = position;
+ position -= target.length;
+ return position >= 0 && string.slice(position, end) == target;
+}
+
+module.exports = endsWith;
diff --git a/node_modules/lodash/entries.js b/node_modules/lodash/entries.js
new file mode 100644
index 0000000..7a88df2
--- /dev/null
+++ b/node_modules/lodash/entries.js
@@ -0,0 +1 @@
+module.exports = require('./toPairs');
diff --git a/node_modules/lodash/entriesIn.js b/node_modules/lodash/entriesIn.js
new file mode 100644
index 0000000..f6c6331
--- /dev/null
+++ b/node_modules/lodash/entriesIn.js
@@ -0,0 +1 @@
+module.exports = require('./toPairsIn');
diff --git a/node_modules/lodash/eq.js b/node_modules/lodash/eq.js
new file mode 100644
index 0000000..a940688
--- /dev/null
+++ b/node_modules/lodash/eq.js
@@ -0,0 +1,37 @@
+/**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+}
+
+module.exports = eq;
diff --git a/node_modules/lodash/escape.js b/node_modules/lodash/escape.js
new file mode 100644
index 0000000..9247e00
--- /dev/null
+++ b/node_modules/lodash/escape.js
@@ -0,0 +1,43 @@
+var escapeHtmlChar = require('./_escapeHtmlChar'),
+ toString = require('./toString');
+
+/** Used to match HTML entities and HTML characters. */
+var reUnescapedHtml = /[&<>"']/g,
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+/**
+ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
+ * corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value. See
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * When working with HTML you should always
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
+ * XSS vectors.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, &amp; pebbles'
+ */
+function escape(string) {
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+}
+
+module.exports = escape;
diff --git a/node_modules/lodash/escapeRegExp.js b/node_modules/lodash/escapeRegExp.js
new file mode 100644
index 0000000..0a58c69
--- /dev/null
+++ b/node_modules/lodash/escapeRegExp.js
@@ -0,0 +1,32 @@
+var toString = require('./toString');
+
+/**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
+ reHasRegExpChar = RegExp(reRegExpChar.source);
+
+/**
+ * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
+ * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
+ * // => '\[lodash\]\(https://lodash\.com/\)'
+ */
+function escapeRegExp(string) {
+ string = toString(string);
+ return (string && reHasRegExpChar.test(string))
+ ? string.replace(reRegExpChar, '\\$&')
+ : string;
+}
+
+module.exports = escapeRegExp;
diff --git a/node_modules/lodash/every.js b/node_modules/lodash/every.js
new file mode 100644
index 0000000..25080da
--- /dev/null
+++ b/node_modules/lodash/every.js
@@ -0,0 +1,56 @@
+var arrayEvery = require('./_arrayEvery'),
+ baseEvery = require('./_baseEvery'),
+ baseIteratee = require('./_baseIteratee'),
+ isArray = require('./isArray'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
+ * Iteration is stopped once `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * **Note:** This method returns `true` for
+ * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
+ * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
+ * elements of empty collections.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.every([true, 1, null, 'yes'], Boolean);
+ * // => false
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.every(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.every(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.every(users, 'active');
+ * // => false
+ */
+function every(collection, predicate, guard) {
+ var func = isArray(collection) ? arrayEvery : baseEvery;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, baseIteratee(predicate, 3));
+}
+
+module.exports = every;
diff --git a/node_modules/lodash/extend.js b/node_modules/lodash/extend.js
new file mode 100644
index 0000000..e00166c
--- /dev/null
+++ b/node_modules/lodash/extend.js
@@ -0,0 +1 @@
+module.exports = require('./assignIn');
diff --git a/node_modules/lodash/extendWith.js b/node_modules/lodash/extendWith.js
new file mode 100644
index 0000000..dbdcb3b
--- /dev/null
+++ b/node_modules/lodash/extendWith.js
@@ -0,0 +1 @@
+module.exports = require('./assignInWith');
diff --git a/node_modules/lodash/fill.js b/node_modules/lodash/fill.js
new file mode 100644
index 0000000..ae13aa1
--- /dev/null
+++ b/node_modules/lodash/fill.js
@@ -0,0 +1,45 @@
+var baseFill = require('./_baseFill'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * Fills elements of `array` with `value` from `start` up to, but not
+ * including, `end`.
+ *
+ * **Note:** This method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Array
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.fill(array, 'a');
+ * console.log(array);
+ * // => ['a', 'a', 'a']
+ *
+ * _.fill(Array(3), 2);
+ * // => [2, 2, 2]
+ *
+ * _.fill([4, 6, 8, 10], '*', 1, 3);
+ * // => [4, '*', '*', 10]
+ */
+function fill(array, value, start, end) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
+ start = 0;
+ end = length;
+ }
+ return baseFill(array, value, start, end);
+}
+
+module.exports = fill;
diff --git a/node_modules/lodash/filter.js b/node_modules/lodash/filter.js
new file mode 100644
index 0000000..89e0c8c
--- /dev/null
+++ b/node_modules/lodash/filter.js
@@ -0,0 +1,52 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseFilter = require('./_baseFilter'),
+ baseIteratee = require('./_baseIteratee'),
+ isArray = require('./isArray');
+
+/**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * **Note:** Unlike `_.remove`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
+ *
+ * // Combining several predicates using `_.overEvery` or `_.overSome`.
+ * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
+ * // => objects for ['fred', 'barney']
+ */
+function filter(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, baseIteratee(predicate, 3));
+}
+
+module.exports = filter;
diff --git a/node_modules/lodash/find.js b/node_modules/lodash/find.js
new file mode 100644
index 0000000..de732cc
--- /dev/null
+++ b/node_modules/lodash/find.js
@@ -0,0 +1,42 @@
+var createFind = require('./_createFind'),
+ findIndex = require('./findIndex');
+
+/**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.find(users, function(o) { return o.age < 40; });
+ * // => object for 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.find(users, { 'age': 1, 'active': true });
+ * // => object for 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.find(users, ['active', false]);
+ * // => object for 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.find(users, 'active');
+ * // => object for 'barney'
+ */
+var find = createFind(findIndex);
+
+module.exports = find;
diff --git a/node_modules/lodash/findIndex.js b/node_modules/lodash/findIndex.js
new file mode 100644
index 0000000..4689069
--- /dev/null
+++ b/node_modules/lodash/findIndex.js
@@ -0,0 +1,55 @@
+var baseFindIndex = require('./_baseFindIndex'),
+ baseIteratee = require('./_baseIteratee'),
+ toInteger = require('./toInteger');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
+ * // => 0
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findIndex(users, ['active', false]);
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+function findIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseFindIndex(array, baseIteratee(predicate, 3), index);
+}
+
+module.exports = findIndex;
diff --git a/node_modules/lodash/findKey.js b/node_modules/lodash/findKey.js
new file mode 100644
index 0000000..cac0248
--- /dev/null
+++ b/node_modules/lodash/findKey.js
@@ -0,0 +1,44 @@
+var baseFindKey = require('./_baseFindKey'),
+ baseForOwn = require('./_baseForOwn'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * This method is like `_.find` except that it returns the key of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findKey(users, function(o) { return o.age < 40; });
+ * // => 'barney' (iteration order is not guaranteed)
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findKey(users, { 'age': 1, 'active': true });
+ * // => 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findKey(users, 'active');
+ * // => 'barney'
+ */
+function findKey(object, predicate) {
+ return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn);
+}
+
+module.exports = findKey;
diff --git a/node_modules/lodash/findLast.js b/node_modules/lodash/findLast.js
new file mode 100644
index 0000000..70b4271
--- /dev/null
+++ b/node_modules/lodash/findLast.js
@@ -0,0 +1,25 @@
+var createFind = require('./_createFind'),
+ findLastIndex = require('./findLastIndex');
+
+/**
+ * This method is like `_.find` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=collection.length-1] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * _.findLast([1, 2, 3, 4], function(n) {
+ * return n % 2 == 1;
+ * });
+ * // => 3
+ */
+var findLast = createFind(findLastIndex);
+
+module.exports = findLast;
diff --git a/node_modules/lodash/findLastIndex.js b/node_modules/lodash/findLastIndex.js
new file mode 100644
index 0000000..7da3431
--- /dev/null
+++ b/node_modules/lodash/findLastIndex.js
@@ -0,0 +1,59 @@
+var baseFindIndex = require('./_baseFindIndex'),
+ baseIteratee = require('./_baseIteratee'),
+ toInteger = require('./toInteger');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max,
+ nativeMin = Math.min;
+
+/**
+ * This method is like `_.findIndex` except that it iterates over elements
+ * of `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
+ * // => 2
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastIndex(users, { 'user': 'barney', 'active': true });
+ * // => 0
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastIndex(users, ['active', false]);
+ * // => 2
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastIndex(users, 'active');
+ * // => 0
+ */
+function findLastIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = length - 1;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = fromIndex < 0
+ ? nativeMax(length + index, 0)
+ : nativeMin(index, length - 1);
+ }
+ return baseFindIndex(array, baseIteratee(predicate, 3), index, true);
+}
+
+module.exports = findLastIndex;
diff --git a/node_modules/lodash/findLastKey.js b/node_modules/lodash/findLastKey.js
new file mode 100644
index 0000000..66fb9fb
--- /dev/null
+++ b/node_modules/lodash/findLastKey.js
@@ -0,0 +1,44 @@
+var baseFindKey = require('./_baseFindKey'),
+ baseForOwnRight = require('./_baseForOwnRight'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * This method is like `_.findKey` except that it iterates over elements of
+ * a collection in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findLastKey(users, function(o) { return o.age < 40; });
+ * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastKey(users, { 'age': 36, 'active': true });
+ * // => 'barney'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastKey(users, 'active');
+ * // => 'pebbles'
+ */
+function findLastKey(object, predicate) {
+ return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight);
+}
+
+module.exports = findLastKey;
diff --git a/node_modules/lodash/first.js b/node_modules/lodash/first.js
new file mode 100644
index 0000000..53f4ad1
--- /dev/null
+++ b/node_modules/lodash/first.js
@@ -0,0 +1 @@
+module.exports = require('./head');
diff --git a/node_modules/lodash/flake.lock b/node_modules/lodash/flake.lock
new file mode 100644
index 0000000..dd03252
--- /dev/null
+++ b/node_modules/lodash/flake.lock
@@ -0,0 +1,40 @@
+{
+ "nodes": {
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1613582597,
+ "narHash": "sha256-6LvipIvFuhyorHpUqK3HjySC5Y6gshXHFBhU9EJ4DoM=",
+ "path": "/nix/store/srvplqq673sqd9vyfhyc5w1p88y1gfm4-source",
+ "rev": "6b1057b452c55bb3b463f0d7055bc4ec3fd1f381",
+ "type": "path"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "type": "indirect"
+ }
+ },
+ "root": {
+ "inputs": {
+ "nixpkgs": "nixpkgs",
+ "utils": "utils"
+ }
+ },
+ "utils": {
+ "locked": {
+ "lastModified": 1610051610,
+ "narHash": "sha256-U9rPz/usA1/Aohhk7Cmc2gBrEEKRzcW4nwPWMPwja4Y=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "3982c9903e93927c2164caa727cd3f6a0e6d14cc",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/node_modules/lodash/flake.nix b/node_modules/lodash/flake.nix
new file mode 100644
index 0000000..15a451c
--- /dev/null
+++ b/node_modules/lodash/flake.nix
@@ -0,0 +1,20 @@
+{
+ inputs = {
+ utils.url = "github:numtide/flake-utils";
+ };
+
+ outputs = { self, nixpkgs, utils }:
+ utils.lib.eachDefaultSystem (system:
+ let
+ pkgs = nixpkgs.legacyPackages."${system}";
+ in rec {
+ devShell = pkgs.mkShell {
+ nativeBuildInputs = with pkgs; [
+ yarn
+ nodejs-14_x
+ nodePackages.typescript-language-server
+ nodePackages.eslint
+ ];
+ };
+ });
+}
diff --git a/node_modules/lodash/flatMap.js b/node_modules/lodash/flatMap.js
new file mode 100644
index 0000000..e668506
--- /dev/null
+++ b/node_modules/lodash/flatMap.js
@@ -0,0 +1,29 @@
+var baseFlatten = require('./_baseFlatten'),
+ map = require('./map');
+
+/**
+ * Creates a flattened array of values by running each element in `collection`
+ * thru `iteratee` and flattening the mapped results. The iteratee is invoked
+ * with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [n, n];
+ * }
+ *
+ * _.flatMap([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+function flatMap(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), 1);
+}
+
+module.exports = flatMap;
diff --git a/node_modules/lodash/flatMapDeep.js b/node_modules/lodash/flatMapDeep.js
new file mode 100644
index 0000000..4653d60
--- /dev/null
+++ b/node_modules/lodash/flatMapDeep.js
@@ -0,0 +1,31 @@
+var baseFlatten = require('./_baseFlatten'),
+ map = require('./map');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDeep([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+function flatMapDeep(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), INFINITY);
+}
+
+module.exports = flatMapDeep;
diff --git a/node_modules/lodash/flatMapDepth.js b/node_modules/lodash/flatMapDepth.js
new file mode 100644
index 0000000..6d72005
--- /dev/null
+++ b/node_modules/lodash/flatMapDepth.js
@@ -0,0 +1,31 @@
+var baseFlatten = require('./_baseFlatten'),
+ map = require('./map'),
+ toInteger = require('./toInteger');
+
+/**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDepth([1, 2], duplicate, 2);
+ * // => [[1, 1], [2, 2]]
+ */
+function flatMapDepth(collection, iteratee, depth) {
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(map(collection, iteratee), depth);
+}
+
+module.exports = flatMapDepth;
diff --git a/node_modules/lodash/flatten.js b/node_modules/lodash/flatten.js
new file mode 100644
index 0000000..3f09f7f
--- /dev/null
+++ b/node_modules/lodash/flatten.js
@@ -0,0 +1,22 @@
+var baseFlatten = require('./_baseFlatten');
+
+/**
+ * Flattens `array` a single level deep.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, [3, [4]], 5]
+ */
+function flatten(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, 1) : [];
+}
+
+module.exports = flatten;
diff --git a/node_modules/lodash/flattenDeep.js b/node_modules/lodash/flattenDeep.js
new file mode 100644
index 0000000..8ad585c
--- /dev/null
+++ b/node_modules/lodash/flattenDeep.js
@@ -0,0 +1,25 @@
+var baseFlatten = require('./_baseFlatten');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/**
+ * Recursively flattens `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, 3, 4, 5]
+ */
+function flattenDeep(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, INFINITY) : [];
+}
+
+module.exports = flattenDeep;
diff --git a/node_modules/lodash/flattenDepth.js b/node_modules/lodash/flattenDepth.js
new file mode 100644
index 0000000..441fdcc
--- /dev/null
+++ b/node_modules/lodash/flattenDepth.js
@@ -0,0 +1,33 @@
+var baseFlatten = require('./_baseFlatten'),
+ toInteger = require('./toInteger');
+
+/**
+ * Recursively flatten `array` up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * var array = [1, [2, [3, [4]], 5]];
+ *
+ * _.flattenDepth(array, 1);
+ * // => [1, 2, [3, [4]], 5]
+ *
+ * _.flattenDepth(array, 2);
+ * // => [1, 2, 3, [4], 5]
+ */
+function flattenDepth(array, depth) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(array, depth);
+}
+
+module.exports = flattenDepth;
diff --git a/node_modules/lodash/flip.js b/node_modules/lodash/flip.js
new file mode 100644
index 0000000..c28dd78
--- /dev/null
+++ b/node_modules/lodash/flip.js
@@ -0,0 +1,28 @@
+var createWrap = require('./_createWrap');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_FLIP_FLAG = 512;
+
+/**
+ * Creates a function that invokes `func` with arguments reversed.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to flip arguments for.
+ * @returns {Function} Returns the new flipped function.
+ * @example
+ *
+ * var flipped = _.flip(function() {
+ * return _.toArray(arguments);
+ * });
+ *
+ * flipped('a', 'b', 'c', 'd');
+ * // => ['d', 'c', 'b', 'a']
+ */
+function flip(func) {
+ return createWrap(func, WRAP_FLIP_FLAG);
+}
+
+module.exports = flip;
diff --git a/node_modules/lodash/floor.js b/node_modules/lodash/floor.js
new file mode 100644
index 0000000..ab6dfa2
--- /dev/null
+++ b/node_modules/lodash/floor.js
@@ -0,0 +1,26 @@
+var createRound = require('./_createRound');
+
+/**
+ * Computes `number` rounded down to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round down.
+ * @param {number} [precision=0] The precision to round down to.
+ * @returns {number} Returns the rounded down number.
+ * @example
+ *
+ * _.floor(4.006);
+ * // => 4
+ *
+ * _.floor(0.046, 2);
+ * // => 0.04
+ *
+ * _.floor(4060, -2);
+ * // => 4000
+ */
+var floor = createRound('floor');
+
+module.exports = floor;
diff --git a/node_modules/lodash/flow.js b/node_modules/lodash/flow.js
new file mode 100644
index 0000000..74b6b62
--- /dev/null
+++ b/node_modules/lodash/flow.js
@@ -0,0 +1,27 @@
+var createFlow = require('./_createFlow');
+
+/**
+ * Creates a function that returns the result of invoking the given functions
+ * with the `this` binding of the created function, where each successive
+ * invocation is supplied the return value of the previous.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] The functions to invoke.
+ * @returns {Function} Returns the new composite function.
+ * @see _.flowRight
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flow([_.add, square]);
+ * addSquare(1, 2);
+ * // => 9
+ */
+var flow = createFlow();
+
+module.exports = flow;
diff --git a/node_modules/lodash/flowRight.js b/node_modules/lodash/flowRight.js
new file mode 100644
index 0000000..1146141
--- /dev/null
+++ b/node_modules/lodash/flowRight.js
@@ -0,0 +1,26 @@
+var createFlow = require('./_createFlow');
+
+/**
+ * This method is like `_.flow` except that it creates a function that
+ * invokes the given functions from right to left.
+ *
+ * @static
+ * @since 3.0.0
+ * @memberOf _
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] The functions to invoke.
+ * @returns {Function} Returns the new composite function.
+ * @see _.flow
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flowRight([square, _.add]);
+ * addSquare(1, 2);
+ * // => 9
+ */
+var flowRight = createFlow(true);
+
+module.exports = flowRight;
diff --git a/node_modules/lodash/forEach.js b/node_modules/lodash/forEach.js
new file mode 100644
index 0000000..c64eaa7
--- /dev/null
+++ b/node_modules/lodash/forEach.js
@@ -0,0 +1,41 @@
+var arrayEach = require('./_arrayEach'),
+ baseEach = require('./_baseEach'),
+ castFunction = require('./_castFunction'),
+ isArray = require('./isArray');
+
+/**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _.forEach([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+function forEach(collection, iteratee) {
+ var func = isArray(collection) ? arrayEach : baseEach;
+ return func(collection, castFunction(iteratee));
+}
+
+module.exports = forEach;
diff --git a/node_modules/lodash/forEachRight.js b/node_modules/lodash/forEachRight.js
new file mode 100644
index 0000000..7390eba
--- /dev/null
+++ b/node_modules/lodash/forEachRight.js
@@ -0,0 +1,31 @@
+var arrayEachRight = require('./_arrayEachRight'),
+ baseEachRight = require('./_baseEachRight'),
+ castFunction = require('./_castFunction'),
+ isArray = require('./isArray');
+
+/**
+ * This method is like `_.forEach` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @alias eachRight
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEach
+ * @example
+ *
+ * _.forEachRight([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `2` then `1`.
+ */
+function forEachRight(collection, iteratee) {
+ var func = isArray(collection) ? arrayEachRight : baseEachRight;
+ return func(collection, castFunction(iteratee));
+}
+
+module.exports = forEachRight;
diff --git a/node_modules/lodash/forIn.js b/node_modules/lodash/forIn.js
new file mode 100644
index 0000000..583a596
--- /dev/null
+++ b/node_modules/lodash/forIn.js
@@ -0,0 +1,39 @@
+var baseFor = require('./_baseFor'),
+ castFunction = require('./_castFunction'),
+ keysIn = require('./keysIn');
+
+/**
+ * Iterates over own and inherited enumerable string keyed properties of an
+ * object and invokes `iteratee` for each property. The iteratee is invoked
+ * with three arguments: (value, key, object). Iteratee functions may exit
+ * iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forInRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forIn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
+ */
+function forIn(object, iteratee) {
+ return object == null
+ ? object
+ : baseFor(object, castFunction(iteratee), keysIn);
+}
+
+module.exports = forIn;
diff --git a/node_modules/lodash/forInRight.js b/node_modules/lodash/forInRight.js
new file mode 100644
index 0000000..4aedf58
--- /dev/null
+++ b/node_modules/lodash/forInRight.js
@@ -0,0 +1,37 @@
+var baseForRight = require('./_baseForRight'),
+ castFunction = require('./_castFunction'),
+ keysIn = require('./keysIn');
+
+/**
+ * This method is like `_.forIn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forInRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
+ */
+function forInRight(object, iteratee) {
+ return object == null
+ ? object
+ : baseForRight(object, castFunction(iteratee), keysIn);
+}
+
+module.exports = forInRight;
diff --git a/node_modules/lodash/forOwn.js b/node_modules/lodash/forOwn.js
new file mode 100644
index 0000000..94eed84
--- /dev/null
+++ b/node_modules/lodash/forOwn.js
@@ -0,0 +1,36 @@
+var baseForOwn = require('./_baseForOwn'),
+ castFunction = require('./_castFunction');
+
+/**
+ * Iterates over own enumerable string keyed properties of an object and
+ * invokes `iteratee` for each property. The iteratee is invoked with three
+ * arguments: (value, key, object). Iteratee functions may exit iteration
+ * early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwnRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+function forOwn(object, iteratee) {
+ return object && baseForOwn(object, castFunction(iteratee));
+}
+
+module.exports = forOwn;
diff --git a/node_modules/lodash/forOwnRight.js b/node_modules/lodash/forOwnRight.js
new file mode 100644
index 0000000..86f338f
--- /dev/null
+++ b/node_modules/lodash/forOwnRight.js
@@ -0,0 +1,34 @@
+var baseForOwnRight = require('./_baseForOwnRight'),
+ castFunction = require('./_castFunction');
+
+/**
+ * This method is like `_.forOwn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwnRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
+ */
+function forOwnRight(object, iteratee) {
+ return object && baseForOwnRight(object, castFunction(iteratee));
+}
+
+module.exports = forOwnRight;
diff --git a/node_modules/lodash/fp.js b/node_modules/lodash/fp.js
new file mode 100644
index 0000000..e372dbb
--- /dev/null
+++ b/node_modules/lodash/fp.js
@@ -0,0 +1,2 @@
+var _ = require('./lodash.min').runInContext();
+module.exports = require('./fp/_baseConvert')(_, _);
diff --git a/node_modules/lodash/fp/F.js b/node_modules/lodash/fp/F.js
new file mode 100644
index 0000000..a05a63a
--- /dev/null
+++ b/node_modules/lodash/fp/F.js
@@ -0,0 +1 @@
+module.exports = require('./stubFalse');
diff --git a/node_modules/lodash/fp/T.js b/node_modules/lodash/fp/T.js
new file mode 100644
index 0000000..e2ba8ea
--- /dev/null
+++ b/node_modules/lodash/fp/T.js
@@ -0,0 +1 @@
+module.exports = require('./stubTrue');
diff --git a/node_modules/lodash/fp/__.js b/node_modules/lodash/fp/__.js
new file mode 100644
index 0000000..4af98de
--- /dev/null
+++ b/node_modules/lodash/fp/__.js
@@ -0,0 +1 @@
+module.exports = require('./placeholder');
diff --git a/node_modules/lodash/fp/_baseConvert.js b/node_modules/lodash/fp/_baseConvert.js
new file mode 100644
index 0000000..9baf8e1
--- /dev/null
+++ b/node_modules/lodash/fp/_baseConvert.js
@@ -0,0 +1,569 @@
+var mapping = require('./_mapping'),
+ fallbackHolder = require('./placeholder');
+
+/** Built-in value reference. */
+var push = Array.prototype.push;
+
+/**
+ * Creates a function, with an arity of `n`, that invokes `func` with the
+ * arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} n The arity of the new function.
+ * @returns {Function} Returns the new function.
+ */
+function baseArity(func, n) {
+ return n == 2
+ ? function(a, b) { return func.apply(undefined, arguments); }
+ : function(a) { return func.apply(undefined, arguments); };
+}
+
+/**
+ * Creates a function that invokes `func`, with up to `n` arguments, ignoring
+ * any additional arguments.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} n The arity cap.
+ * @returns {Function} Returns the new function.
+ */
+function baseAry(func, n) {
+ return n == 2
+ ? function(a, b) { return func(a, b); }
+ : function(a) { return func(a); };
+}
+
+/**
+ * Creates a clone of `array`.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the cloned array.
+ */
+function cloneArray(array) {
+ var length = array ? array.length : 0,
+ result = Array(length);
+
+ while (length--) {
+ result[length] = array[length];
+ }
+ return result;
+}
+
+/**
+ * Creates a function that clones a given object using the assignment `func`.
+ *
+ * @private
+ * @param {Function} func The assignment function.
+ * @returns {Function} Returns the new cloner function.
+ */
+function createCloner(func) {
+ return function(object) {
+ return func({}, object);
+ };
+}
+
+/**
+ * A specialized version of `_.spread` which flattens the spread array into
+ * the arguments of the invoked `func`.
+ *
+ * @private
+ * @param {Function} func The function to spread arguments over.
+ * @param {number} start The start position of the spread.
+ * @returns {Function} Returns the new function.
+ */
+function flatSpread(func, start) {
+ return function() {
+ var length = arguments.length,
+ lastIndex = length - 1,
+ args = Array(length);
+
+ while (length--) {
+ args[length] = arguments[length];
+ }
+ var array = args[start],
+ otherArgs = args.slice(0, start);
+
+ if (array) {
+ push.apply(otherArgs, array);
+ }
+ if (start != lastIndex) {
+ push.apply(otherArgs, args.slice(start + 1));
+ }
+ return func.apply(this, otherArgs);
+ };
+}
+
+/**
+ * Creates a function that wraps `func` and uses `cloner` to clone the first
+ * argument it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} cloner The function to clone arguments.
+ * @returns {Function} Returns the new immutable function.
+ */
+function wrapImmutable(func, cloner) {
+ return function() {
+ var length = arguments.length;
+ if (!length) {
+ return;
+ }
+ var args = Array(length);
+ while (length--) {
+ args[length] = arguments[length];
+ }
+ var result = args[0] = cloner.apply(undefined, args);
+ func.apply(undefined, args);
+ return result;
+ };
+}
+
+/**
+ * The base implementation of `convert` which accepts a `util` object of methods
+ * required to perform conversions.
+ *
+ * @param {Object} util The util object.
+ * @param {string} name The name of the function to convert.
+ * @param {Function} func The function to convert.
+ * @param {Object} [options] The options object.
+ * @param {boolean} [options.cap=true] Specify capping iteratee arguments.
+ * @param {boolean} [options.curry=true] Specify currying.
+ * @param {boolean} [options.fixed=true] Specify fixed arity.
+ * @param {boolean} [options.immutable=true] Specify immutable operations.
+ * @param {boolean} [options.rearg=true] Specify rearranging arguments.
+ * @returns {Function|Object} Returns the converted function or object.
+ */
+function baseConvert(util, name, func, options) {
+ var isLib = typeof name == 'function',
+ isObj = name === Object(name);
+
+ if (isObj) {
+ options = func;
+ func = name;
+ name = undefined;
+ }
+ if (func == null) {
+ throw new TypeError;
+ }
+ options || (options = {});
+
+ var config = {
+ 'cap': 'cap' in options ? options.cap : true,
+ 'curry': 'curry' in options ? options.curry : true,
+ 'fixed': 'fixed' in options ? options.fixed : true,
+ 'immutable': 'immutable' in options ? options.immutable : true,
+ 'rearg': 'rearg' in options ? options.rearg : true
+ };
+
+ var defaultHolder = isLib ? func : fallbackHolder,
+ forceCurry = ('curry' in options) && options.curry,
+ forceFixed = ('fixed' in options) && options.fixed,
+ forceRearg = ('rearg' in options) && options.rearg,
+ pristine = isLib ? func.runInContext() : undefined;
+
+ var helpers = isLib ? func : {
+ 'ary': util.ary,
+ 'assign': util.assign,
+ 'clone': util.clone,
+ 'curry': util.curry,
+ 'forEach': util.forEach,
+ 'isArray': util.isArray,
+ 'isError': util.isError,
+ 'isFunction': util.isFunction,
+ 'isWeakMap': util.isWeakMap,
+ 'iteratee': util.iteratee,
+ 'keys': util.keys,
+ 'rearg': util.rearg,
+ 'toInteger': util.toInteger,
+ 'toPath': util.toPath
+ };
+
+ var ary = helpers.ary,
+ assign = helpers.assign,
+ clone = helpers.clone,
+ curry = helpers.curry,
+ each = helpers.forEach,
+ isArray = helpers.isArray,
+ isError = helpers.isError,
+ isFunction = helpers.isFunction,
+ isWeakMap = helpers.isWeakMap,
+ keys = helpers.keys,
+ rearg = helpers.rearg,
+ toInteger = helpers.toInteger,
+ toPath = helpers.toPath;
+
+ var aryMethodKeys = keys(mapping.aryMethod);
+
+ var wrappers = {
+ 'castArray': function(castArray) {
+ return function() {
+ var value = arguments[0];
+ return isArray(value)
+ ? castArray(cloneArray(value))
+ : castArray.apply(undefined, arguments);
+ };
+ },
+ 'iteratee': function(iteratee) {
+ return function() {
+ var func = arguments[0],
+ arity = arguments[1],
+ result = iteratee(func, arity),
+ length = result.length;
+
+ if (config.cap && typeof arity == 'number') {
+ arity = arity > 2 ? (arity - 2) : 1;
+ return (length && length <= arity) ? result : baseAry(result, arity);
+ }
+ return result;
+ };
+ },
+ 'mixin': function(mixin) {
+ return function(source) {
+ var func = this;
+ if (!isFunction(func)) {
+ return mixin(func, Object(source));
+ }
+ var pairs = [];
+ each(keys(source), function(key) {
+ if (isFunction(source[key])) {
+ pairs.push([key, func.prototype[key]]);
+ }
+ });
+
+ mixin(func, Object(source));
+
+ each(pairs, function(pair) {
+ var value = pair[1];
+ if (isFunction(value)) {
+ func.prototype[pair[0]] = value;
+ } else {
+ delete func.prototype[pair[0]];
+ }
+ });
+ return func;
+ };
+ },
+ 'nthArg': function(nthArg) {
+ return function(n) {
+ var arity = n < 0 ? 1 : (toInteger(n) + 1);
+ return curry(nthArg(n), arity);
+ };
+ },
+ 'rearg': function(rearg) {
+ return function(func, indexes) {
+ var arity = indexes ? indexes.length : 0;
+ return curry(rearg(func, indexes), arity);
+ };
+ },
+ 'runInContext': function(runInContext) {
+ return function(context) {
+ return baseConvert(util, runInContext(context), options);
+ };
+ }
+ };
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Casts `func` to a function with an arity capped iteratee if needed.
+ *
+ * @private
+ * @param {string} name The name of the function to inspect.
+ * @param {Function} func The function to inspect.
+ * @returns {Function} Returns the cast function.
+ */
+ function castCap(name, func) {
+ if (config.cap) {
+ var indexes = mapping.iterateeRearg[name];
+ if (indexes) {
+ return iterateeRearg(func, indexes);
+ }
+ var n = !isLib && mapping.iterateeAry[name];
+ if (n) {
+ return iterateeAry(func, n);
+ }
+ }
+ return func;
+ }
+
+ /**
+ * Casts `func` to a curried function if needed.
+ *
+ * @private
+ * @param {string} name The name of the function to inspect.
+ * @param {Function} func The function to inspect.
+ * @param {number} n The arity of `func`.
+ * @returns {Function} Returns the cast function.
+ */
+ function castCurry(name, func, n) {
+ return (forceCurry || (config.curry && n > 1))
+ ? curry(func, n)
+ : func;
+ }
+
+ /**
+ * Casts `func` to a fixed arity function if needed.
+ *
+ * @private
+ * @param {string} name The name of the function to inspect.
+ * @param {Function} func The function to inspect.
+ * @param {number} n The arity cap.
+ * @returns {Function} Returns the cast function.
+ */
+ function castFixed(name, func, n) {
+ if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
+ var data = mapping.methodSpread[name],
+ start = data && data.start;
+
+ return start === undefined ? ary(func, n) : flatSpread(func, start);
+ }
+ return func;
+ }
+
+ /**
+ * Casts `func` to an rearged function if needed.
+ *
+ * @private
+ * @param {string} name The name of the function to inspect.
+ * @param {Function} func The function to inspect.
+ * @param {number} n The arity of `func`.
+ * @returns {Function} Returns the cast function.
+ */
+ function castRearg(name, func, n) {
+ return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]))
+ ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n])
+ : func;
+ }
+
+ /**
+ * Creates a clone of `object` by `path`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {Array|string} path The path to clone by.
+ * @returns {Object} Returns the cloned object.
+ */
+ function cloneByPath(object, path) {
+ path = toPath(path);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ result = clone(Object(object)),
+ nested = result;
+
+ while (nested != null && ++index < length) {
+ var key = path[index],
+ value = nested[key];
+
+ if (value != null &&
+ !(isFunction(value) || isError(value) || isWeakMap(value))) {
+ nested[key] = clone(index == lastIndex ? value : Object(value));
+ }
+ nested = nested[key];
+ }
+ return result;
+ }
+
+ /**
+ * Converts `lodash` to an immutable auto-curried iteratee-first data-last
+ * version with conversion `options` applied.
+ *
+ * @param {Object} [options] The options object. See `baseConvert` for more details.
+ * @returns {Function} Returns the converted `lodash`.
+ */
+ function convertLib(options) {
+ return _.runInContext.convert(options)(undefined);
+ }
+
+ /**
+ * Create a converter function for `func` of `name`.
+ *
+ * @param {string} name The name of the function to convert.
+ * @param {Function} func The function to convert.
+ * @returns {Function} Returns the new converter function.
+ */
+ function createConverter(name, func) {
+ var realName = mapping.aliasToReal[name] || name,
+ methodName = mapping.remap[realName] || realName,
+ oldOptions = options;
+
+ return function(options) {
+ var newUtil = isLib ? pristine : helpers,
+ newFunc = isLib ? pristine[methodName] : func,
+ newOptions = assign(assign({}, oldOptions), options);
+
+ return baseConvert(newUtil, realName, newFunc, newOptions);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke its iteratee, with up to `n`
+ * arguments, ignoring any additional arguments.
+ *
+ * @private
+ * @param {Function} func The function to cap iteratee arguments for.
+ * @param {number} n The arity cap.
+ * @returns {Function} Returns the new function.
+ */
+ function iterateeAry(func, n) {
+ return overArg(func, function(func) {
+ return typeof func == 'function' ? baseAry(func, n) : func;
+ });
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke its iteratee with arguments
+ * arranged according to the specified `indexes` where the argument value at
+ * the first index is provided as the first argument, the argument value at
+ * the second index is provided as the second argument, and so on.
+ *
+ * @private
+ * @param {Function} func The function to rearrange iteratee arguments for.
+ * @param {number[]} indexes The arranged argument indexes.
+ * @returns {Function} Returns the new function.
+ */
+ function iterateeRearg(func, indexes) {
+ return overArg(func, function(func) {
+ var n = indexes.length;
+ return baseArity(rearg(baseAry(func, n), indexes), n);
+ });
+ }
+
+ /**
+ * Creates a function that invokes `func` with its first argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overArg(func, transform) {
+ return function() {
+ var length = arguments.length;
+ if (!length) {
+ return func();
+ }
+ var args = Array(length);
+ while (length--) {
+ args[length] = arguments[length];
+ }
+ var index = config.rearg ? 0 : (length - 1);
+ args[index] = transform(args[index]);
+ return func.apply(undefined, args);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` and applys the conversions
+ * rules by `name`.
+ *
+ * @private
+ * @param {string} name The name of the function to wrap.
+ * @param {Function} func The function to wrap.
+ * @returns {Function} Returns the converted function.
+ */
+ function wrap(name, func, placeholder) {
+ var result,
+ realName = mapping.aliasToReal[name] || name,
+ wrapped = func,
+ wrapper = wrappers[realName];
+
+ if (wrapper) {
+ wrapped = wrapper(func);
+ }
+ else if (config.immutable) {
+ if (mapping.mutate.array[realName]) {
+ wrapped = wrapImmutable(func, cloneArray);
+ }
+ else if (mapping.mutate.object[realName]) {
+ wrapped = wrapImmutable(func, createCloner(func));
+ }
+ else if (mapping.mutate.set[realName]) {
+ wrapped = wrapImmutable(func, cloneByPath);
+ }
+ }
+ each(aryMethodKeys, function(aryKey) {
+ each(mapping.aryMethod[aryKey], function(otherName) {
+ if (realName == otherName) {
+ var data = mapping.methodSpread[realName],
+ afterRearg = data && data.afterRearg;
+
+ result = afterRearg
+ ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey)
+ : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey);
+
+ result = castCap(realName, result);
+ result = castCurry(realName, result, aryKey);
+ return false;
+ }
+ });
+ return !result;
+ });
+
+ result || (result = wrapped);
+ if (result == func) {
+ result = forceCurry ? curry(result, 1) : function() {
+ return func.apply(this, arguments);
+ };
+ }
+ result.convert = createConverter(realName, func);
+ result.placeholder = func.placeholder = placeholder;
+
+ return result;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ if (!isObj) {
+ return wrap(name, func, defaultHolder);
+ }
+ var _ = func;
+
+ // Convert methods by ary cap.
+ var pairs = [];
+ each(aryMethodKeys, function(aryKey) {
+ each(mapping.aryMethod[aryKey], function(key) {
+ var func = _[mapping.remap[key] || key];
+ if (func) {
+ pairs.push([key, wrap(key, func, _)]);
+ }
+ });
+ });
+
+ // Convert remaining methods.
+ each(keys(_), function(key) {
+ var func = _[key];
+ if (typeof func == 'function') {
+ var length = pairs.length;
+ while (length--) {
+ if (pairs[length][0] == key) {
+ return;
+ }
+ }
+ func.convert = createConverter(key, func);
+ pairs.push([key, func]);
+ }
+ });
+
+ // Assign to `_` leaving `_.prototype` unchanged to allow chaining.
+ each(pairs, function(pair) {
+ _[pair[0]] = pair[1];
+ });
+
+ _.convert = convertLib;
+ _.placeholder = _;
+
+ // Assign aliases.
+ each(keys(_), function(key) {
+ each(mapping.realToAlias[key] || [], function(alias) {
+ _[alias] = _[key];
+ });
+ });
+
+ return _;
+}
+
+module.exports = baseConvert;
diff --git a/node_modules/lodash/fp/_convertBrowser.js b/node_modules/lodash/fp/_convertBrowser.js
new file mode 100644
index 0000000..bde030d
--- /dev/null
+++ b/node_modules/lodash/fp/_convertBrowser.js
@@ -0,0 +1,18 @@
+var baseConvert = require('./_baseConvert');
+
+/**
+ * Converts `lodash` to an immutable auto-curried iteratee-first data-last
+ * version with conversion `options` applied.
+ *
+ * @param {Function} lodash The lodash function to convert.
+ * @param {Object} [options] The options object. See `baseConvert` for more details.
+ * @returns {Function} Returns the converted `lodash`.
+ */
+function browserConvert(lodash, options) {
+ return baseConvert(lodash, lodash, options);
+}
+
+if (typeof _ == 'function' && typeof _.runInContext == 'function') {
+ _ = browserConvert(_.runInContext());
+}
+module.exports = browserConvert;
diff --git a/node_modules/lodash/fp/_falseOptions.js b/node_modules/lodash/fp/_falseOptions.js
new file mode 100644
index 0000000..773235e
--- /dev/null
+++ b/node_modules/lodash/fp/_falseOptions.js
@@ -0,0 +1,7 @@
+module.exports = {
+ 'cap': false,
+ 'curry': false,
+ 'fixed': false,
+ 'immutable': false,
+ 'rearg': false
+};
diff --git a/node_modules/lodash/fp/_mapping.js b/node_modules/lodash/fp/_mapping.js
new file mode 100644
index 0000000..a642ec0
--- /dev/null
+++ b/node_modules/lodash/fp/_mapping.js
@@ -0,0 +1,358 @@
+/** Used to map aliases to their real names. */
+exports.aliasToReal = {
+
+ // Lodash aliases.
+ 'each': 'forEach',
+ 'eachRight': 'forEachRight',
+ 'entries': 'toPairs',
+ 'entriesIn': 'toPairsIn',
+ 'extend': 'assignIn',
+ 'extendAll': 'assignInAll',
+ 'extendAllWith': 'assignInAllWith',
+ 'extendWith': 'assignInWith',
+ 'first': 'head',
+
+ // Methods that are curried variants of others.
+ 'conforms': 'conformsTo',
+ 'matches': 'isMatch',
+ 'property': 'get',
+
+ // Ramda aliases.
+ '__': 'placeholder',
+ 'F': 'stubFalse',
+ 'T': 'stubTrue',
+ 'all': 'every',
+ 'allPass': 'overEvery',
+ 'always': 'constant',
+ 'any': 'some',
+ 'anyPass': 'overSome',
+ 'apply': 'spread',
+ 'assoc': 'set',
+ 'assocPath': 'set',
+ 'complement': 'negate',
+ 'compose': 'flowRight',
+ 'contains': 'includes',
+ 'dissoc': 'unset',
+ 'dissocPath': 'unset',
+ 'dropLast': 'dropRight',
+ 'dropLastWhile': 'dropRightWhile',
+ 'equals': 'isEqual',
+ 'identical': 'eq',
+ 'indexBy': 'keyBy',
+ 'init': 'initial',
+ 'invertObj': 'invert',
+ 'juxt': 'over',
+ 'omitAll': 'omit',
+ 'nAry': 'ary',
+ 'path': 'get',
+ 'pathEq': 'matchesProperty',
+ 'pathOr': 'getOr',
+ 'paths': 'at',
+ 'pickAll': 'pick',
+ 'pipe': 'flow',
+ 'pluck': 'map',
+ 'prop': 'get',
+ 'propEq': 'matchesProperty',
+ 'propOr': 'getOr',
+ 'props': 'at',
+ 'symmetricDifference': 'xor',
+ 'symmetricDifferenceBy': 'xorBy',
+ 'symmetricDifferenceWith': 'xorWith',
+ 'takeLast': 'takeRight',
+ 'takeLastWhile': 'takeRightWhile',
+ 'unapply': 'rest',
+ 'unnest': 'flatten',
+ 'useWith': 'overArgs',
+ 'where': 'conformsTo',
+ 'whereEq': 'isMatch',
+ 'zipObj': 'zipObject'
+};
+
+/** Used to map ary to method names. */
+exports.aryMethod = {
+ '1': [
+ 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create',
+ 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow',
+ 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll',
+ 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse',
+ 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
+ 'uniqueId', 'words', 'zipAll'
+ ],
+ '2': [
+ 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith',
+ 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith',
+ 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN',
+ 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference',
+ 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',
+ 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',
+ 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach',
+ 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get',
+ 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection',
+ 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy',
+ 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty',
+ 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit',
+ 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',
+ 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll',
+ 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
+ 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
+ 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
+ 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
+ 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
+ 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
+ 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
+ 'zipObjectDeep'
+ ],
+ '3': [
+ 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
+ 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
+ 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
+ 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
+ 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
+ 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight',
+ 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy',
+ 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy',
+ 'xorWith', 'zipWith'
+ ],
+ '4': [
+ 'fill', 'setWith', 'updateWith'
+ ]
+};
+
+/** Used to map ary to rearg configs. */
+exports.aryRearg = {
+ '2': [1, 0],
+ '3': [2, 0, 1],
+ '4': [3, 2, 0, 1]
+};
+
+/** Used to map method names to their iteratee ary. */
+exports.iterateeAry = {
+ 'dropRightWhile': 1,
+ 'dropWhile': 1,
+ 'every': 1,
+ 'filter': 1,
+ 'find': 1,
+ 'findFrom': 1,
+ 'findIndex': 1,
+ 'findIndexFrom': 1,
+ 'findKey': 1,
+ 'findLast': 1,
+ 'findLastFrom': 1,
+ 'findLastIndex': 1,
+ 'findLastIndexFrom': 1,
+ 'findLastKey': 1,
+ 'flatMap': 1,
+ 'flatMapDeep': 1,
+ 'flatMapDepth': 1,
+ 'forEach': 1,
+ 'forEachRight': 1,
+ 'forIn': 1,
+ 'forInRight': 1,
+ 'forOwn': 1,
+ 'forOwnRight': 1,
+ 'map': 1,
+ 'mapKeys': 1,
+ 'mapValues': 1,
+ 'partition': 1,
+ 'reduce': 2,
+ 'reduceRight': 2,
+ 'reject': 1,
+ 'remove': 1,
+ 'some': 1,
+ 'takeRightWhile': 1,
+ 'takeWhile': 1,
+ 'times': 1,
+ 'transform': 2
+};
+
+/** Used to map method names to iteratee rearg configs. */
+exports.iterateeRearg = {
+ 'mapKeys': [1],
+ 'reduceRight': [1, 0]
+};
+
+/** Used to map method names to rearg configs. */
+exports.methodRearg = {
+ 'assignInAllWith': [1, 0],
+ 'assignInWith': [1, 2, 0],
+ 'assignAllWith': [1, 0],
+ 'assignWith': [1, 2, 0],
+ 'differenceBy': [1, 2, 0],
+ 'differenceWith': [1, 2, 0],
+ 'getOr': [2, 1, 0],
+ 'intersectionBy': [1, 2, 0],
+ 'intersectionWith': [1, 2, 0],
+ 'isEqualWith': [1, 2, 0],
+ 'isMatchWith': [2, 1, 0],
+ 'mergeAllWith': [1, 0],
+ 'mergeWith': [1, 2, 0],
+ 'padChars': [2, 1, 0],
+ 'padCharsEnd': [2, 1, 0],
+ 'padCharsStart': [2, 1, 0],
+ 'pullAllBy': [2, 1, 0],
+ 'pullAllWith': [2, 1, 0],
+ 'rangeStep': [1, 2, 0],
+ 'rangeStepRight': [1, 2, 0],
+ 'setWith': [3, 1, 2, 0],
+ 'sortedIndexBy': [2, 1, 0],
+ 'sortedLastIndexBy': [2, 1, 0],
+ 'unionBy': [1, 2, 0],
+ 'unionWith': [1, 2, 0],
+ 'updateWith': [3, 1, 2, 0],
+ 'xorBy': [1, 2, 0],
+ 'xorWith': [1, 2, 0],
+ 'zipWith': [1, 2, 0]
+};
+
+/** Used to map method names to spread configs. */
+exports.methodSpread = {
+ 'assignAll': { 'start': 0 },
+ 'assignAllWith': { 'start': 0 },
+ 'assignInAll': { 'start': 0 },
+ 'assignInAllWith': { 'start': 0 },
+ 'defaultsAll': { 'start': 0 },
+ 'defaultsDeepAll': { 'start': 0 },
+ 'invokeArgs': { 'start': 2 },
+ 'invokeArgsMap': { 'start': 2 },
+ 'mergeAll': { 'start': 0 },
+ 'mergeAllWith': { 'start': 0 },
+ 'partial': { 'start': 1 },
+ 'partialRight': { 'start': 1 },
+ 'without': { 'start': 1 },
+ 'zipAll': { 'start': 0 }
+};
+
+/** Used to identify methods which mutate arrays or objects. */
+exports.mutate = {
+ 'array': {
+ 'fill': true,
+ 'pull': true,
+ 'pullAll': true,
+ 'pullAllBy': true,
+ 'pullAllWith': true,
+ 'pullAt': true,
+ 'remove': true,
+ 'reverse': true
+ },
+ 'object': {
+ 'assign': true,
+ 'assignAll': true,
+ 'assignAllWith': true,
+ 'assignIn': true,
+ 'assignInAll': true,
+ 'assignInAllWith': true,
+ 'assignInWith': true,
+ 'assignWith': true,
+ 'defaults': true,
+ 'defaultsAll': true,
+ 'defaultsDeep': true,
+ 'defaultsDeepAll': true,
+ 'merge': true,
+ 'mergeAll': true,
+ 'mergeAllWith': true,
+ 'mergeWith': true,
+ },
+ 'set': {
+ 'set': true,
+ 'setWith': true,
+ 'unset': true,
+ 'update': true,
+ 'updateWith': true
+ }
+};
+
+/** Used to map real names to their aliases. */
+exports.realToAlias = (function() {
+ var hasOwnProperty = Object.prototype.hasOwnProperty,
+ object = exports.aliasToReal,
+ result = {};
+
+ for (var key in object) {
+ var value = object[key];
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+ }
+ return result;
+}());
+
+/** Used to map method names to other names. */
+exports.remap = {
+ 'assignAll': 'assign',
+ 'assignAllWith': 'assignWith',
+ 'assignInAll': 'assignIn',
+ 'assignInAllWith': 'assignInWith',
+ 'curryN': 'curry',
+ 'curryRightN': 'curryRight',
+ 'defaultsAll': 'defaults',
+ 'defaultsDeepAll': 'defaultsDeep',
+ 'findFrom': 'find',
+ 'findIndexFrom': 'findIndex',
+ 'findLastFrom': 'findLast',
+ 'findLastIndexFrom': 'findLastIndex',
+ 'getOr': 'get',
+ 'includesFrom': 'includes',
+ 'indexOfFrom': 'indexOf',
+ 'invokeArgs': 'invoke',
+ 'invokeArgsMap': 'invokeMap',
+ 'lastIndexOfFrom': 'lastIndexOf',
+ 'mergeAll': 'merge',
+ 'mergeAllWith': 'mergeWith',
+ 'padChars': 'pad',
+ 'padCharsEnd': 'padEnd',
+ 'padCharsStart': 'padStart',
+ 'propertyOf': 'get',
+ 'rangeStep': 'range',
+ 'rangeStepRight': 'rangeRight',
+ 'restFrom': 'rest',
+ 'spreadFrom': 'spread',
+ 'trimChars': 'trim',
+ 'trimCharsEnd': 'trimEnd',
+ 'trimCharsStart': 'trimStart',
+ 'zipAll': 'zip'
+};
+
+/** Used to track methods that skip fixing their arity. */
+exports.skipFixed = {
+ 'castArray': true,
+ 'flow': true,
+ 'flowRight': true,
+ 'iteratee': true,
+ 'mixin': true,
+ 'rearg': true,
+ 'runInContext': true
+};
+
+/** Used to track methods that skip rearranging arguments. */
+exports.skipRearg = {
+ 'add': true,
+ 'assign': true,
+ 'assignIn': true,
+ 'bind': true,
+ 'bindKey': true,
+ 'concat': true,
+ 'difference': true,
+ 'divide': true,
+ 'eq': true,
+ 'gt': true,
+ 'gte': true,
+ 'isEqual': true,
+ 'lt': true,
+ 'lte': true,
+ 'matchesProperty': true,
+ 'merge': true,
+ 'multiply': true,
+ 'overArgs': true,
+ 'partial': true,
+ 'partialRight': true,
+ 'propertyOf': true,
+ 'random': true,
+ 'range': true,
+ 'rangeRight': true,
+ 'subtract': true,
+ 'zip': true,
+ 'zipObject': true,
+ 'zipObjectDeep': true
+};
diff --git a/node_modules/lodash/fp/_util.js b/node_modules/lodash/fp/_util.js
new file mode 100644
index 0000000..1dbf36f
--- /dev/null
+++ b/node_modules/lodash/fp/_util.js
@@ -0,0 +1,16 @@
+module.exports = {
+ 'ary': require('../ary'),
+ 'assign': require('../_baseAssign'),
+ 'clone': require('../clone'),
+ 'curry': require('../curry'),
+ 'forEach': require('../_arrayEach'),
+ 'isArray': require('../isArray'),
+ 'isError': require('../isError'),
+ 'isFunction': require('../isFunction'),
+ 'isWeakMap': require('../isWeakMap'),
+ 'iteratee': require('../iteratee'),
+ 'keys': require('../_baseKeys'),
+ 'rearg': require('../rearg'),
+ 'toInteger': require('../toInteger'),
+ 'toPath': require('../toPath')
+};
diff --git a/node_modules/lodash/fp/add.js b/node_modules/lodash/fp/add.js
new file mode 100644
index 0000000..816eeec
--- /dev/null
+++ b/node_modules/lodash/fp/add.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('add', require('../add'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/after.js b/node_modules/lodash/fp/after.js
new file mode 100644
index 0000000..21a0167
--- /dev/null
+++ b/node_modules/lodash/fp/after.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('after', require('../after'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/all.js b/node_modules/lodash/fp/all.js
new file mode 100644
index 0000000..d0839f7
--- /dev/null
+++ b/node_modules/lodash/fp/all.js
@@ -0,0 +1 @@
+module.exports = require('./every');
diff --git a/node_modules/lodash/fp/allPass.js b/node_modules/lodash/fp/allPass.js
new file mode 100644
index 0000000..79b73ef
--- /dev/null
+++ b/node_modules/lodash/fp/allPass.js
@@ -0,0 +1 @@
+module.exports = require('./overEvery');
diff --git a/node_modules/lodash/fp/always.js b/node_modules/lodash/fp/always.js
new file mode 100644
index 0000000..9887703
--- /dev/null
+++ b/node_modules/lodash/fp/always.js
@@ -0,0 +1 @@
+module.exports = require('./constant');
diff --git a/node_modules/lodash/fp/any.js b/node_modules/lodash/fp/any.js
new file mode 100644
index 0000000..900ac25
--- /dev/null
+++ b/node_modules/lodash/fp/any.js
@@ -0,0 +1 @@
+module.exports = require('./some');
diff --git a/node_modules/lodash/fp/anyPass.js b/node_modules/lodash/fp/anyPass.js
new file mode 100644
index 0000000..2774ab3
--- /dev/null
+++ b/node_modules/lodash/fp/anyPass.js
@@ -0,0 +1 @@
+module.exports = require('./overSome');
diff --git a/node_modules/lodash/fp/apply.js b/node_modules/lodash/fp/apply.js
new file mode 100644
index 0000000..2b75712
--- /dev/null
+++ b/node_modules/lodash/fp/apply.js
@@ -0,0 +1 @@
+module.exports = require('./spread');
diff --git a/node_modules/lodash/fp/array.js b/node_modules/lodash/fp/array.js
new file mode 100644
index 0000000..fe939c2
--- /dev/null
+++ b/node_modules/lodash/fp/array.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../array'));
diff --git a/node_modules/lodash/fp/ary.js b/node_modules/lodash/fp/ary.js
new file mode 100644
index 0000000..8edf187
--- /dev/null
+++ b/node_modules/lodash/fp/ary.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('ary', require('../ary'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assign.js b/node_modules/lodash/fp/assign.js
new file mode 100644
index 0000000..23f47af
--- /dev/null
+++ b/node_modules/lodash/fp/assign.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assign', require('../assign'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assignAll.js b/node_modules/lodash/fp/assignAll.js
new file mode 100644
index 0000000..b1d36c7
--- /dev/null
+++ b/node_modules/lodash/fp/assignAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignAll', require('../assign'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assignAllWith.js b/node_modules/lodash/fp/assignAllWith.js
new file mode 100644
index 0000000..21e836e
--- /dev/null
+++ b/node_modules/lodash/fp/assignAllWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignAllWith', require('../assignWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assignIn.js b/node_modules/lodash/fp/assignIn.js
new file mode 100644
index 0000000..6e7c65f
--- /dev/null
+++ b/node_modules/lodash/fp/assignIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignIn', require('../assignIn'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assignInAll.js b/node_modules/lodash/fp/assignInAll.js
new file mode 100644
index 0000000..7ba75db
--- /dev/null
+++ b/node_modules/lodash/fp/assignInAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignInAll', require('../assignIn'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assignInAllWith.js b/node_modules/lodash/fp/assignInAllWith.js
new file mode 100644
index 0000000..e766903
--- /dev/null
+++ b/node_modules/lodash/fp/assignInAllWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignInAllWith', require('../assignInWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assignInWith.js b/node_modules/lodash/fp/assignInWith.js
new file mode 100644
index 0000000..acb5923
--- /dev/null
+++ b/node_modules/lodash/fp/assignInWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignInWith', require('../assignInWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assignWith.js b/node_modules/lodash/fp/assignWith.js
new file mode 100644
index 0000000..eb92521
--- /dev/null
+++ b/node_modules/lodash/fp/assignWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignWith', require('../assignWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assoc.js b/node_modules/lodash/fp/assoc.js
new file mode 100644
index 0000000..7648820
--- /dev/null
+++ b/node_modules/lodash/fp/assoc.js
@@ -0,0 +1 @@
+module.exports = require('./set');
diff --git a/node_modules/lodash/fp/assocPath.js b/node_modules/lodash/fp/assocPath.js
new file mode 100644
index 0000000..7648820
--- /dev/null
+++ b/node_modules/lodash/fp/assocPath.js
@@ -0,0 +1 @@
+module.exports = require('./set');
diff --git a/node_modules/lodash/fp/at.js b/node_modules/lodash/fp/at.js
new file mode 100644
index 0000000..cc39d25
--- /dev/null
+++ b/node_modules/lodash/fp/at.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('at', require('../at'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/attempt.js b/node_modules/lodash/fp/attempt.js
new file mode 100644
index 0000000..26ca42e
--- /dev/null
+++ b/node_modules/lodash/fp/attempt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('attempt', require('../attempt'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/before.js b/node_modules/lodash/fp/before.js
new file mode 100644
index 0000000..7a2de65
--- /dev/null
+++ b/node_modules/lodash/fp/before.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('before', require('../before'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/bind.js b/node_modules/lodash/fp/bind.js
new file mode 100644
index 0000000..5cbe4f3
--- /dev/null
+++ b/node_modules/lodash/fp/bind.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('bind', require('../bind'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/bindAll.js b/node_modules/lodash/fp/bindAll.js
new file mode 100644
index 0000000..6b4a4a0
--- /dev/null
+++ b/node_modules/lodash/fp/bindAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('bindAll', require('../bindAll'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/bindKey.js b/node_modules/lodash/fp/bindKey.js
new file mode 100644
index 0000000..6a46c6b
--- /dev/null
+++ b/node_modules/lodash/fp/bindKey.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('bindKey', require('../bindKey'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/camelCase.js b/node_modules/lodash/fp/camelCase.js
new file mode 100644
index 0000000..87b77b4
--- /dev/null
+++ b/node_modules/lodash/fp/camelCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('camelCase', require('../camelCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/capitalize.js b/node_modules/lodash/fp/capitalize.js
new file mode 100644
index 0000000..cac74e1
--- /dev/null
+++ b/node_modules/lodash/fp/capitalize.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('capitalize', require('../capitalize'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/castArray.js b/node_modules/lodash/fp/castArray.js
new file mode 100644
index 0000000..8681c09
--- /dev/null
+++ b/node_modules/lodash/fp/castArray.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('castArray', require('../castArray'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/ceil.js b/node_modules/lodash/fp/ceil.js
new file mode 100644
index 0000000..f416b72
--- /dev/null
+++ b/node_modules/lodash/fp/ceil.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('ceil', require('../ceil'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/chain.js b/node_modules/lodash/fp/chain.js
new file mode 100644
index 0000000..604fe39
--- /dev/null
+++ b/node_modules/lodash/fp/chain.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('chain', require('../chain'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/chunk.js b/node_modules/lodash/fp/chunk.js
new file mode 100644
index 0000000..871ab08
--- /dev/null
+++ b/node_modules/lodash/fp/chunk.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('chunk', require('../chunk'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/clamp.js b/node_modules/lodash/fp/clamp.js
new file mode 100644
index 0000000..3b06c01
--- /dev/null
+++ b/node_modules/lodash/fp/clamp.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('clamp', require('../clamp'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/clone.js b/node_modules/lodash/fp/clone.js
new file mode 100644
index 0000000..cadb59c
--- /dev/null
+++ b/node_modules/lodash/fp/clone.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('clone', require('../clone'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/cloneDeep.js b/node_modules/lodash/fp/cloneDeep.js
new file mode 100644
index 0000000..a6107aa
--- /dev/null
+++ b/node_modules/lodash/fp/cloneDeep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('cloneDeep', require('../cloneDeep'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/cloneDeepWith.js b/node_modules/lodash/fp/cloneDeepWith.js
new file mode 100644
index 0000000..6f01e44
--- /dev/null
+++ b/node_modules/lodash/fp/cloneDeepWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('cloneDeepWith', require('../cloneDeepWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/cloneWith.js b/node_modules/lodash/fp/cloneWith.js
new file mode 100644
index 0000000..aa88578
--- /dev/null
+++ b/node_modules/lodash/fp/cloneWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('cloneWith', require('../cloneWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/collection.js b/node_modules/lodash/fp/collection.js
new file mode 100644
index 0000000..fc8b328
--- /dev/null
+++ b/node_modules/lodash/fp/collection.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../collection'));
diff --git a/node_modules/lodash/fp/commit.js b/node_modules/lodash/fp/commit.js
new file mode 100644
index 0000000..130a894
--- /dev/null
+++ b/node_modules/lodash/fp/commit.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('commit', require('../commit'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/compact.js b/node_modules/lodash/fp/compact.js
new file mode 100644
index 0000000..ce8f7a1
--- /dev/null
+++ b/node_modules/lodash/fp/compact.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('compact', require('../compact'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/complement.js b/node_modules/lodash/fp/complement.js
new file mode 100644
index 0000000..93eb462
--- /dev/null
+++ b/node_modules/lodash/fp/complement.js
@@ -0,0 +1 @@
+module.exports = require('./negate');
diff --git a/node_modules/lodash/fp/compose.js b/node_modules/lodash/fp/compose.js
new file mode 100644
index 0000000..1954e94
--- /dev/null
+++ b/node_modules/lodash/fp/compose.js
@@ -0,0 +1 @@
+module.exports = require('./flowRight');
diff --git a/node_modules/lodash/fp/concat.js b/node_modules/lodash/fp/concat.js
new file mode 100644
index 0000000..e59346a
--- /dev/null
+++ b/node_modules/lodash/fp/concat.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('concat', require('../concat'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/cond.js b/node_modules/lodash/fp/cond.js
new file mode 100644
index 0000000..6a0120e
--- /dev/null
+++ b/node_modules/lodash/fp/cond.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('cond', require('../cond'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/conforms.js b/node_modules/lodash/fp/conforms.js
new file mode 100644
index 0000000..3247f64
--- /dev/null
+++ b/node_modules/lodash/fp/conforms.js
@@ -0,0 +1 @@
+module.exports = require('./conformsTo');
diff --git a/node_modules/lodash/fp/conformsTo.js b/node_modules/lodash/fp/conformsTo.js
new file mode 100644
index 0000000..aa7f41e
--- /dev/null
+++ b/node_modules/lodash/fp/conformsTo.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('conformsTo', require('../conformsTo'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/constant.js b/node_modules/lodash/fp/constant.js
new file mode 100644
index 0000000..9e406fc
--- /dev/null
+++ b/node_modules/lodash/fp/constant.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('constant', require('../constant'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/contains.js b/node_modules/lodash/fp/contains.js
new file mode 100644
index 0000000..594722a
--- /dev/null
+++ b/node_modules/lodash/fp/contains.js
@@ -0,0 +1 @@
+module.exports = require('./includes');
diff --git a/node_modules/lodash/fp/convert.js b/node_modules/lodash/fp/convert.js
new file mode 100644
index 0000000..4795dc4
--- /dev/null
+++ b/node_modules/lodash/fp/convert.js
@@ -0,0 +1,18 @@
+var baseConvert = require('./_baseConvert'),
+ util = require('./_util');
+
+/**
+ * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last
+ * version with conversion `options` applied. If `name` is an object its methods
+ * will be converted.
+ *
+ * @param {string} name The name of the function to wrap.
+ * @param {Function} [func] The function to wrap.
+ * @param {Object} [options] The options object. See `baseConvert` for more details.
+ * @returns {Function|Object} Returns the converted function or object.
+ */
+function convert(name, func, options) {
+ return baseConvert(util, name, func, options);
+}
+
+module.exports = convert;
diff --git a/node_modules/lodash/fp/countBy.js b/node_modules/lodash/fp/countBy.js
new file mode 100644
index 0000000..dfa4643
--- /dev/null
+++ b/node_modules/lodash/fp/countBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('countBy', require('../countBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/create.js b/node_modules/lodash/fp/create.js
new file mode 100644
index 0000000..752025f
--- /dev/null
+++ b/node_modules/lodash/fp/create.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('create', require('../create'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/curry.js b/node_modules/lodash/fp/curry.js
new file mode 100644
index 0000000..b0b4168
--- /dev/null
+++ b/node_modules/lodash/fp/curry.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('curry', require('../curry'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/curryN.js b/node_modules/lodash/fp/curryN.js
new file mode 100644
index 0000000..2ae7d00
--- /dev/null
+++ b/node_modules/lodash/fp/curryN.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('curryN', require('../curry'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/curryRight.js b/node_modules/lodash/fp/curryRight.js
new file mode 100644
index 0000000..cb619eb
--- /dev/null
+++ b/node_modules/lodash/fp/curryRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('curryRight', require('../curryRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/curryRightN.js b/node_modules/lodash/fp/curryRightN.js
new file mode 100644
index 0000000..2495afc
--- /dev/null
+++ b/node_modules/lodash/fp/curryRightN.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('curryRightN', require('../curryRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/date.js b/node_modules/lodash/fp/date.js
new file mode 100644
index 0000000..82cb952
--- /dev/null
+++ b/node_modules/lodash/fp/date.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../date'));
diff --git a/node_modules/lodash/fp/debounce.js b/node_modules/lodash/fp/debounce.js
new file mode 100644
index 0000000..2612229
--- /dev/null
+++ b/node_modules/lodash/fp/debounce.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('debounce', require('../debounce'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/deburr.js b/node_modules/lodash/fp/deburr.js
new file mode 100644
index 0000000..96463ab
--- /dev/null
+++ b/node_modules/lodash/fp/deburr.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('deburr', require('../deburr'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/defaultTo.js b/node_modules/lodash/fp/defaultTo.js
new file mode 100644
index 0000000..d6b52a4
--- /dev/null
+++ b/node_modules/lodash/fp/defaultTo.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defaultTo', require('../defaultTo'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/defaults.js b/node_modules/lodash/fp/defaults.js
new file mode 100644
index 0000000..e1a8e6e
--- /dev/null
+++ b/node_modules/lodash/fp/defaults.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defaults', require('../defaults'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/defaultsAll.js b/node_modules/lodash/fp/defaultsAll.js
new file mode 100644
index 0000000..238fcc3
--- /dev/null
+++ b/node_modules/lodash/fp/defaultsAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defaultsAll', require('../defaults'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/defaultsDeep.js b/node_modules/lodash/fp/defaultsDeep.js
new file mode 100644
index 0000000..1f172ff
--- /dev/null
+++ b/node_modules/lodash/fp/defaultsDeep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defaultsDeep', require('../defaultsDeep'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/defaultsDeepAll.js b/node_modules/lodash/fp/defaultsDeepAll.js
new file mode 100644
index 0000000..6835f2f
--- /dev/null
+++ b/node_modules/lodash/fp/defaultsDeepAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defaultsDeepAll', require('../defaultsDeep'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/defer.js b/node_modules/lodash/fp/defer.js
new file mode 100644
index 0000000..ec7990f
--- /dev/null
+++ b/node_modules/lodash/fp/defer.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defer', require('../defer'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/delay.js b/node_modules/lodash/fp/delay.js
new file mode 100644
index 0000000..556dbd5
--- /dev/null
+++ b/node_modules/lodash/fp/delay.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('delay', require('../delay'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/difference.js b/node_modules/lodash/fp/difference.js
new file mode 100644
index 0000000..2d03765
--- /dev/null
+++ b/node_modules/lodash/fp/difference.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('difference', require('../difference'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/differenceBy.js b/node_modules/lodash/fp/differenceBy.js
new file mode 100644
index 0000000..2f91491
--- /dev/null
+++ b/node_modules/lodash/fp/differenceBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('differenceBy', require('../differenceBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/differenceWith.js b/node_modules/lodash/fp/differenceWith.js
new file mode 100644
index 0000000..bcf5ad2
--- /dev/null
+++ b/node_modules/lodash/fp/differenceWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('differenceWith', require('../differenceWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/dissoc.js b/node_modules/lodash/fp/dissoc.js
new file mode 100644
index 0000000..7ec7be1
--- /dev/null
+++ b/node_modules/lodash/fp/dissoc.js
@@ -0,0 +1 @@
+module.exports = require('./unset');
diff --git a/node_modules/lodash/fp/dissocPath.js b/node_modules/lodash/fp/dissocPath.js
new file mode 100644
index 0000000..7ec7be1
--- /dev/null
+++ b/node_modules/lodash/fp/dissocPath.js
@@ -0,0 +1 @@
+module.exports = require('./unset');
diff --git a/node_modules/lodash/fp/divide.js b/node_modules/lodash/fp/divide.js
new file mode 100644
index 0000000..82048c5
--- /dev/null
+++ b/node_modules/lodash/fp/divide.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('divide', require('../divide'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/drop.js b/node_modules/lodash/fp/drop.js
new file mode 100644
index 0000000..2fa9b4f
--- /dev/null
+++ b/node_modules/lodash/fp/drop.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('drop', require('../drop'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/dropLast.js b/node_modules/lodash/fp/dropLast.js
new file mode 100644
index 0000000..174e525
--- /dev/null
+++ b/node_modules/lodash/fp/dropLast.js
@@ -0,0 +1 @@
+module.exports = require('./dropRight');
diff --git a/node_modules/lodash/fp/dropLastWhile.js b/node_modules/lodash/fp/dropLastWhile.js
new file mode 100644
index 0000000..be2a9d2
--- /dev/null
+++ b/node_modules/lodash/fp/dropLastWhile.js
@@ -0,0 +1 @@
+module.exports = require('./dropRightWhile');
diff --git a/node_modules/lodash/fp/dropRight.js b/node_modules/lodash/fp/dropRight.js
new file mode 100644
index 0000000..e98881f
--- /dev/null
+++ b/node_modules/lodash/fp/dropRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('dropRight', require('../dropRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/dropRightWhile.js b/node_modules/lodash/fp/dropRightWhile.js
new file mode 100644
index 0000000..cacaa70
--- /dev/null
+++ b/node_modules/lodash/fp/dropRightWhile.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('dropRightWhile', require('../dropRightWhile'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/dropWhile.js b/node_modules/lodash/fp/dropWhile.js
new file mode 100644
index 0000000..285f864
--- /dev/null
+++ b/node_modules/lodash/fp/dropWhile.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('dropWhile', require('../dropWhile'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/each.js b/node_modules/lodash/fp/each.js
new file mode 100644
index 0000000..8800f42
--- /dev/null
+++ b/node_modules/lodash/fp/each.js
@@ -0,0 +1 @@
+module.exports = require('./forEach');
diff --git a/node_modules/lodash/fp/eachRight.js b/node_modules/lodash/fp/eachRight.js
new file mode 100644
index 0000000..3252b2a
--- /dev/null
+++ b/node_modules/lodash/fp/eachRight.js
@@ -0,0 +1 @@
+module.exports = require('./forEachRight');
diff --git a/node_modules/lodash/fp/endsWith.js b/node_modules/lodash/fp/endsWith.js
new file mode 100644
index 0000000..17dc2a4
--- /dev/null
+++ b/node_modules/lodash/fp/endsWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('endsWith', require('../endsWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/entries.js b/node_modules/lodash/fp/entries.js
new file mode 100644
index 0000000..7a88df2
--- /dev/null
+++ b/node_modules/lodash/fp/entries.js
@@ -0,0 +1 @@
+module.exports = require('./toPairs');
diff --git a/node_modules/lodash/fp/entriesIn.js b/node_modules/lodash/fp/entriesIn.js
new file mode 100644
index 0000000..f6c6331
--- /dev/null
+++ b/node_modules/lodash/fp/entriesIn.js
@@ -0,0 +1 @@
+module.exports = require('./toPairsIn');
diff --git a/node_modules/lodash/fp/eq.js b/node_modules/lodash/fp/eq.js
new file mode 100644
index 0000000..9a3d21b
--- /dev/null
+++ b/node_modules/lodash/fp/eq.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('eq', require('../eq'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/equals.js b/node_modules/lodash/fp/equals.js
new file mode 100644
index 0000000..e6a5ce0
--- /dev/null
+++ b/node_modules/lodash/fp/equals.js
@@ -0,0 +1 @@
+module.exports = require('./isEqual');
diff --git a/node_modules/lodash/fp/escape.js b/node_modules/lodash/fp/escape.js
new file mode 100644
index 0000000..52c1fbb
--- /dev/null
+++ b/node_modules/lodash/fp/escape.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('escape', require('../escape'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/escapeRegExp.js b/node_modules/lodash/fp/escapeRegExp.js
new file mode 100644
index 0000000..369b2ef
--- /dev/null
+++ b/node_modules/lodash/fp/escapeRegExp.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('escapeRegExp', require('../escapeRegExp'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/every.js b/node_modules/lodash/fp/every.js
new file mode 100644
index 0000000..95c2776
--- /dev/null
+++ b/node_modules/lodash/fp/every.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('every', require('../every'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/extend.js b/node_modules/lodash/fp/extend.js
new file mode 100644
index 0000000..e00166c
--- /dev/null
+++ b/node_modules/lodash/fp/extend.js
@@ -0,0 +1 @@
+module.exports = require('./assignIn');
diff --git a/node_modules/lodash/fp/extendAll.js b/node_modules/lodash/fp/extendAll.js
new file mode 100644
index 0000000..cc55b64
--- /dev/null
+++ b/node_modules/lodash/fp/extendAll.js
@@ -0,0 +1 @@
+module.exports = require('./assignInAll');
diff --git a/node_modules/lodash/fp/extendAllWith.js b/node_modules/lodash/fp/extendAllWith.js
new file mode 100644
index 0000000..6679d20
--- /dev/null
+++ b/node_modules/lodash/fp/extendAllWith.js
@@ -0,0 +1 @@
+module.exports = require('./assignInAllWith');
diff --git a/node_modules/lodash/fp/extendWith.js b/node_modules/lodash/fp/extendWith.js
new file mode 100644
index 0000000..dbdcb3b
--- /dev/null
+++ b/node_modules/lodash/fp/extendWith.js
@@ -0,0 +1 @@
+module.exports = require('./assignInWith');
diff --git a/node_modules/lodash/fp/fill.js b/node_modules/lodash/fp/fill.js
new file mode 100644
index 0000000..b2d47e8
--- /dev/null
+++ b/node_modules/lodash/fp/fill.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('fill', require('../fill'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/filter.js b/node_modules/lodash/fp/filter.js
new file mode 100644
index 0000000..796d501
--- /dev/null
+++ b/node_modules/lodash/fp/filter.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('filter', require('../filter'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/find.js b/node_modules/lodash/fp/find.js
new file mode 100644
index 0000000..f805d33
--- /dev/null
+++ b/node_modules/lodash/fp/find.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('find', require('../find'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findFrom.js b/node_modules/lodash/fp/findFrom.js
new file mode 100644
index 0000000..da8275e
--- /dev/null
+++ b/node_modules/lodash/fp/findFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findFrom', require('../find'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findIndex.js b/node_modules/lodash/fp/findIndex.js
new file mode 100644
index 0000000..8c15fd1
--- /dev/null
+++ b/node_modules/lodash/fp/findIndex.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findIndex', require('../findIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findIndexFrom.js b/node_modules/lodash/fp/findIndexFrom.js
new file mode 100644
index 0000000..32e98cb
--- /dev/null
+++ b/node_modules/lodash/fp/findIndexFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findIndexFrom', require('../findIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findKey.js b/node_modules/lodash/fp/findKey.js
new file mode 100644
index 0000000..475bcfa
--- /dev/null
+++ b/node_modules/lodash/fp/findKey.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findKey', require('../findKey'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findLast.js b/node_modules/lodash/fp/findLast.js
new file mode 100644
index 0000000..093fe94
--- /dev/null
+++ b/node_modules/lodash/fp/findLast.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findLast', require('../findLast'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findLastFrom.js b/node_modules/lodash/fp/findLastFrom.js
new file mode 100644
index 0000000..76c38fb
--- /dev/null
+++ b/node_modules/lodash/fp/findLastFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findLastFrom', require('../findLast'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findLastIndex.js b/node_modules/lodash/fp/findLastIndex.js
new file mode 100644
index 0000000..36986df
--- /dev/null
+++ b/node_modules/lodash/fp/findLastIndex.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findLastIndex', require('../findLastIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findLastIndexFrom.js b/node_modules/lodash/fp/findLastIndexFrom.js
new file mode 100644
index 0000000..34c8176
--- /dev/null
+++ b/node_modules/lodash/fp/findLastIndexFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findLastIndexFrom', require('../findLastIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findLastKey.js b/node_modules/lodash/fp/findLastKey.js
new file mode 100644
index 0000000..5f81b60
--- /dev/null
+++ b/node_modules/lodash/fp/findLastKey.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findLastKey', require('../findLastKey'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/first.js b/node_modules/lodash/fp/first.js
new file mode 100644
index 0000000..53f4ad1
--- /dev/null
+++ b/node_modules/lodash/fp/first.js
@@ -0,0 +1 @@
+module.exports = require('./head');
diff --git a/node_modules/lodash/fp/flatMap.js b/node_modules/lodash/fp/flatMap.js
new file mode 100644
index 0000000..d01dc4d
--- /dev/null
+++ b/node_modules/lodash/fp/flatMap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flatMap', require('../flatMap'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/flatMapDeep.js b/node_modules/lodash/fp/flatMapDeep.js
new file mode 100644
index 0000000..569c42e
--- /dev/null
+++ b/node_modules/lodash/fp/flatMapDeep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flatMapDeep', require('../flatMapDeep'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/flatMapDepth.js b/node_modules/lodash/fp/flatMapDepth.js
new file mode 100644
index 0000000..6eb68fd
--- /dev/null
+++ b/node_modules/lodash/fp/flatMapDepth.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flatMapDepth', require('../flatMapDepth'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/flatten.js b/node_modules/lodash/fp/flatten.js
new file mode 100644
index 0000000..30425d8
--- /dev/null
+++ b/node_modules/lodash/fp/flatten.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flatten', require('../flatten'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/flattenDeep.js b/node_modules/lodash/fp/flattenDeep.js
new file mode 100644
index 0000000..aed5db2
--- /dev/null
+++ b/node_modules/lodash/fp/flattenDeep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flattenDeep', require('../flattenDeep'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/flattenDepth.js b/node_modules/lodash/fp/flattenDepth.js
new file mode 100644
index 0000000..ad65e37
--- /dev/null
+++ b/node_modules/lodash/fp/flattenDepth.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flattenDepth', require('../flattenDepth'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/flip.js b/node_modules/lodash/fp/flip.js
new file mode 100644
index 0000000..0547e7b
--- /dev/null
+++ b/node_modules/lodash/fp/flip.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flip', require('../flip'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/floor.js b/node_modules/lodash/fp/floor.js
new file mode 100644
index 0000000..a6cf335
--- /dev/null
+++ b/node_modules/lodash/fp/floor.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('floor', require('../floor'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/flow.js b/node_modules/lodash/fp/flow.js
new file mode 100644
index 0000000..cd83677
--- /dev/null
+++ b/node_modules/lodash/fp/flow.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flow', require('../flow'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/flowRight.js b/node_modules/lodash/fp/flowRight.js
new file mode 100644
index 0000000..972a5b9
--- /dev/null
+++ b/node_modules/lodash/fp/flowRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flowRight', require('../flowRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/forEach.js b/node_modules/lodash/fp/forEach.js
new file mode 100644
index 0000000..2f49452
--- /dev/null
+++ b/node_modules/lodash/fp/forEach.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forEach', require('../forEach'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/forEachRight.js b/node_modules/lodash/fp/forEachRight.js
new file mode 100644
index 0000000..3ff9733
--- /dev/null
+++ b/node_modules/lodash/fp/forEachRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forEachRight', require('../forEachRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/forIn.js b/node_modules/lodash/fp/forIn.js
new file mode 100644
index 0000000..9341749
--- /dev/null
+++ b/node_modules/lodash/fp/forIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forIn', require('../forIn'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/forInRight.js b/node_modules/lodash/fp/forInRight.js
new file mode 100644
index 0000000..cecf8bb
--- /dev/null
+++ b/node_modules/lodash/fp/forInRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forInRight', require('../forInRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/forOwn.js b/node_modules/lodash/fp/forOwn.js
new file mode 100644
index 0000000..246449e
--- /dev/null
+++ b/node_modules/lodash/fp/forOwn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forOwn', require('../forOwn'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/forOwnRight.js b/node_modules/lodash/fp/forOwnRight.js
new file mode 100644
index 0000000..c5e826e
--- /dev/null
+++ b/node_modules/lodash/fp/forOwnRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forOwnRight', require('../forOwnRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/fromPairs.js b/node_modules/lodash/fp/fromPairs.js
new file mode 100644
index 0000000..f8cc596
--- /dev/null
+++ b/node_modules/lodash/fp/fromPairs.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('fromPairs', require('../fromPairs'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/function.js b/node_modules/lodash/fp/function.js
new file mode 100644
index 0000000..dfe69b1
--- /dev/null
+++ b/node_modules/lodash/fp/function.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../function'));
diff --git a/node_modules/lodash/fp/functions.js b/node_modules/lodash/fp/functions.js
new file mode 100644
index 0000000..09d1bb1
--- /dev/null
+++ b/node_modules/lodash/fp/functions.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('functions', require('../functions'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/functionsIn.js b/node_modules/lodash/fp/functionsIn.js
new file mode 100644
index 0000000..2cfeb83
--- /dev/null
+++ b/node_modules/lodash/fp/functionsIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('functionsIn', require('../functionsIn'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/get.js b/node_modules/lodash/fp/get.js
new file mode 100644
index 0000000..6d3a328
--- /dev/null
+++ b/node_modules/lodash/fp/get.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('get', require('../get'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/getOr.js b/node_modules/lodash/fp/getOr.js
new file mode 100644
index 0000000..7dbf771
--- /dev/null
+++ b/node_modules/lodash/fp/getOr.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('getOr', require('../get'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/groupBy.js b/node_modules/lodash/fp/groupBy.js
new file mode 100644
index 0000000..fc0bc78
--- /dev/null
+++ b/node_modules/lodash/fp/groupBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('groupBy', require('../groupBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/gt.js b/node_modules/lodash/fp/gt.js
new file mode 100644
index 0000000..9e57c80
--- /dev/null
+++ b/node_modules/lodash/fp/gt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('gt', require('../gt'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/gte.js b/node_modules/lodash/fp/gte.js
new file mode 100644
index 0000000..4584786
--- /dev/null
+++ b/node_modules/lodash/fp/gte.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('gte', require('../gte'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/has.js b/node_modules/lodash/fp/has.js
new file mode 100644
index 0000000..b901298
--- /dev/null
+++ b/node_modules/lodash/fp/has.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('has', require('../has'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/hasIn.js b/node_modules/lodash/fp/hasIn.js
new file mode 100644
index 0000000..b3c3d1a
--- /dev/null
+++ b/node_modules/lodash/fp/hasIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('hasIn', require('../hasIn'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/head.js b/node_modules/lodash/fp/head.js
new file mode 100644
index 0000000..2694f0a
--- /dev/null
+++ b/node_modules/lodash/fp/head.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('head', require('../head'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/identical.js b/node_modules/lodash/fp/identical.js
new file mode 100644
index 0000000..85563f4
--- /dev/null
+++ b/node_modules/lodash/fp/identical.js
@@ -0,0 +1 @@
+module.exports = require('./eq');
diff --git a/node_modules/lodash/fp/identity.js b/node_modules/lodash/fp/identity.js
new file mode 100644
index 0000000..096415a
--- /dev/null
+++ b/node_modules/lodash/fp/identity.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('identity', require('../identity'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/inRange.js b/node_modules/lodash/fp/inRange.js
new file mode 100644
index 0000000..202d940
--- /dev/null
+++ b/node_modules/lodash/fp/inRange.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('inRange', require('../inRange'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/includes.js b/node_modules/lodash/fp/includes.js
new file mode 100644
index 0000000..1146780
--- /dev/null
+++ b/node_modules/lodash/fp/includes.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('includes', require('../includes'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/includesFrom.js b/node_modules/lodash/fp/includesFrom.js
new file mode 100644
index 0000000..683afdb
--- /dev/null
+++ b/node_modules/lodash/fp/includesFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('includesFrom', require('../includes'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/indexBy.js b/node_modules/lodash/fp/indexBy.js
new file mode 100644
index 0000000..7e64bc0
--- /dev/null
+++ b/node_modules/lodash/fp/indexBy.js
@@ -0,0 +1 @@
+module.exports = require('./keyBy');
diff --git a/node_modules/lodash/fp/indexOf.js b/node_modules/lodash/fp/indexOf.js
new file mode 100644
index 0000000..524658e
--- /dev/null
+++ b/node_modules/lodash/fp/indexOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('indexOf', require('../indexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/indexOfFrom.js b/node_modules/lodash/fp/indexOfFrom.js
new file mode 100644
index 0000000..d99c822
--- /dev/null
+++ b/node_modules/lodash/fp/indexOfFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('indexOfFrom', require('../indexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/init.js b/node_modules/lodash/fp/init.js
new file mode 100644
index 0000000..2f88d8b
--- /dev/null
+++ b/node_modules/lodash/fp/init.js
@@ -0,0 +1 @@
+module.exports = require('./initial');
diff --git a/node_modules/lodash/fp/initial.js b/node_modules/lodash/fp/initial.js
new file mode 100644
index 0000000..b732ba0
--- /dev/null
+++ b/node_modules/lodash/fp/initial.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('initial', require('../initial'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/intersection.js b/node_modules/lodash/fp/intersection.js
new file mode 100644
index 0000000..52936d5
--- /dev/null
+++ b/node_modules/lodash/fp/intersection.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('intersection', require('../intersection'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/intersectionBy.js b/node_modules/lodash/fp/intersectionBy.js
new file mode 100644
index 0000000..72629f2
--- /dev/null
+++ b/node_modules/lodash/fp/intersectionBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('intersectionBy', require('../intersectionBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/intersectionWith.js b/node_modules/lodash/fp/intersectionWith.js
new file mode 100644
index 0000000..e064f40
--- /dev/null
+++ b/node_modules/lodash/fp/intersectionWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('intersectionWith', require('../intersectionWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/invert.js b/node_modules/lodash/fp/invert.js
new file mode 100644
index 0000000..2d5d1f0
--- /dev/null
+++ b/node_modules/lodash/fp/invert.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invert', require('../invert'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/invertBy.js b/node_modules/lodash/fp/invertBy.js
new file mode 100644
index 0000000..63ca97e
--- /dev/null
+++ b/node_modules/lodash/fp/invertBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invertBy', require('../invertBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/invertObj.js b/node_modules/lodash/fp/invertObj.js
new file mode 100644
index 0000000..f1d842e
--- /dev/null
+++ b/node_modules/lodash/fp/invertObj.js
@@ -0,0 +1 @@
+module.exports = require('./invert');
diff --git a/node_modules/lodash/fp/invoke.js b/node_modules/lodash/fp/invoke.js
new file mode 100644
index 0000000..fcf17f0
--- /dev/null
+++ b/node_modules/lodash/fp/invoke.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invoke', require('../invoke'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/invokeArgs.js b/node_modules/lodash/fp/invokeArgs.js
new file mode 100644
index 0000000..d3f2953
--- /dev/null
+++ b/node_modules/lodash/fp/invokeArgs.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invokeArgs', require('../invoke'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/invokeArgsMap.js b/node_modules/lodash/fp/invokeArgsMap.js
new file mode 100644
index 0000000..eaa9f84
--- /dev/null
+++ b/node_modules/lodash/fp/invokeArgsMap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invokeArgsMap', require('../invokeMap'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/invokeMap.js b/node_modules/lodash/fp/invokeMap.js
new file mode 100644
index 0000000..6515fd7
--- /dev/null
+++ b/node_modules/lodash/fp/invokeMap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invokeMap', require('../invokeMap'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isArguments.js b/node_modules/lodash/fp/isArguments.js
new file mode 100644
index 0000000..1d93c9e
--- /dev/null
+++ b/node_modules/lodash/fp/isArguments.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isArguments', require('../isArguments'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isArray.js b/node_modules/lodash/fp/isArray.js
new file mode 100644
index 0000000..ba7ade8
--- /dev/null
+++ b/node_modules/lodash/fp/isArray.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isArray', require('../isArray'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isArrayBuffer.js b/node_modules/lodash/fp/isArrayBuffer.js
new file mode 100644
index 0000000..5088513
--- /dev/null
+++ b/node_modules/lodash/fp/isArrayBuffer.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isArrayBuffer', require('../isArrayBuffer'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isArrayLike.js b/node_modules/lodash/fp/isArrayLike.js
new file mode 100644
index 0000000..8f1856b
--- /dev/null
+++ b/node_modules/lodash/fp/isArrayLike.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isArrayLike', require('../isArrayLike'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isArrayLikeObject.js b/node_modules/lodash/fp/isArrayLikeObject.js
new file mode 100644
index 0000000..2108498
--- /dev/null
+++ b/node_modules/lodash/fp/isArrayLikeObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isArrayLikeObject', require('../isArrayLikeObject'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isBoolean.js b/node_modules/lodash/fp/isBoolean.js
new file mode 100644
index 0000000..9339f75
--- /dev/null
+++ b/node_modules/lodash/fp/isBoolean.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isBoolean', require('../isBoolean'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isBuffer.js b/node_modules/lodash/fp/isBuffer.js
new file mode 100644
index 0000000..e60b123
--- /dev/null
+++ b/node_modules/lodash/fp/isBuffer.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isBuffer', require('../isBuffer'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isDate.js b/node_modules/lodash/fp/isDate.js
new file mode 100644
index 0000000..dc41d08
--- /dev/null
+++ b/node_modules/lodash/fp/isDate.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isDate', require('../isDate'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isElement.js b/node_modules/lodash/fp/isElement.js
new file mode 100644
index 0000000..18ee039
--- /dev/null
+++ b/node_modules/lodash/fp/isElement.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isElement', require('../isElement'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isEmpty.js b/node_modules/lodash/fp/isEmpty.js
new file mode 100644
index 0000000..0f4ae84
--- /dev/null
+++ b/node_modules/lodash/fp/isEmpty.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isEmpty', require('../isEmpty'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isEqual.js b/node_modules/lodash/fp/isEqual.js
new file mode 100644
index 0000000..4138386
--- /dev/null
+++ b/node_modules/lodash/fp/isEqual.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isEqual', require('../isEqual'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isEqualWith.js b/node_modules/lodash/fp/isEqualWith.js
new file mode 100644
index 0000000..029ff5c
--- /dev/null
+++ b/node_modules/lodash/fp/isEqualWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isEqualWith', require('../isEqualWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isError.js b/node_modules/lodash/fp/isError.js
new file mode 100644
index 0000000..3dfd81c
--- /dev/null
+++ b/node_modules/lodash/fp/isError.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isError', require('../isError'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isFinite.js b/node_modules/lodash/fp/isFinite.js
new file mode 100644
index 0000000..0b647b8
--- /dev/null
+++ b/node_modules/lodash/fp/isFinite.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isFinite', require('../isFinite'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isFunction.js b/node_modules/lodash/fp/isFunction.js
new file mode 100644
index 0000000..ff8e5c4
--- /dev/null
+++ b/node_modules/lodash/fp/isFunction.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isFunction', require('../isFunction'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isInteger.js b/node_modules/lodash/fp/isInteger.js
new file mode 100644
index 0000000..67af4ff
--- /dev/null
+++ b/node_modules/lodash/fp/isInteger.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isInteger', require('../isInteger'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isLength.js b/node_modules/lodash/fp/isLength.js
new file mode 100644
index 0000000..fc101c5
--- /dev/null
+++ b/node_modules/lodash/fp/isLength.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isLength', require('../isLength'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isMap.js b/node_modules/lodash/fp/isMap.js
new file mode 100644
index 0000000..a209aa6
--- /dev/null
+++ b/node_modules/lodash/fp/isMap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isMap', require('../isMap'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isMatch.js b/node_modules/lodash/fp/isMatch.js
new file mode 100644
index 0000000..6264ca1
--- /dev/null
+++ b/node_modules/lodash/fp/isMatch.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isMatch', require('../isMatch'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isMatchWith.js b/node_modules/lodash/fp/isMatchWith.js
new file mode 100644
index 0000000..d95f319
--- /dev/null
+++ b/node_modules/lodash/fp/isMatchWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isMatchWith', require('../isMatchWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isNaN.js b/node_modules/lodash/fp/isNaN.js
new file mode 100644
index 0000000..66a978f
--- /dev/null
+++ b/node_modules/lodash/fp/isNaN.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isNaN', require('../isNaN'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isNative.js b/node_modules/lodash/fp/isNative.js
new file mode 100644
index 0000000..3d775ba
--- /dev/null
+++ b/node_modules/lodash/fp/isNative.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isNative', require('../isNative'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isNil.js b/node_modules/lodash/fp/isNil.js
new file mode 100644
index 0000000..5952c02
--- /dev/null
+++ b/node_modules/lodash/fp/isNil.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isNil', require('../isNil'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isNull.js b/node_modules/lodash/fp/isNull.js
new file mode 100644
index 0000000..f201a35
--- /dev/null
+++ b/node_modules/lodash/fp/isNull.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isNull', require('../isNull'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isNumber.js b/node_modules/lodash/fp/isNumber.js
new file mode 100644
index 0000000..a2b5fa0
--- /dev/null
+++ b/node_modules/lodash/fp/isNumber.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isNumber', require('../isNumber'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isObject.js b/node_modules/lodash/fp/isObject.js
new file mode 100644
index 0000000..231ace0
--- /dev/null
+++ b/node_modules/lodash/fp/isObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isObject', require('../isObject'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isObjectLike.js b/node_modules/lodash/fp/isObjectLike.js
new file mode 100644
index 0000000..f16082e
--- /dev/null
+++ b/node_modules/lodash/fp/isObjectLike.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isObjectLike', require('../isObjectLike'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isPlainObject.js b/node_modules/lodash/fp/isPlainObject.js
new file mode 100644
index 0000000..b5bea90
--- /dev/null
+++ b/node_modules/lodash/fp/isPlainObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isPlainObject', require('../isPlainObject'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isRegExp.js b/node_modules/lodash/fp/isRegExp.js
new file mode 100644
index 0000000..12a1a3d
--- /dev/null
+++ b/node_modules/lodash/fp/isRegExp.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isRegExp', require('../isRegExp'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isSafeInteger.js b/node_modules/lodash/fp/isSafeInteger.js
new file mode 100644
index 0000000..7230f55
--- /dev/null
+++ b/node_modules/lodash/fp/isSafeInteger.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isSafeInteger', require('../isSafeInteger'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isSet.js b/node_modules/lodash/fp/isSet.js
new file mode 100644
index 0000000..35c01f6
--- /dev/null
+++ b/node_modules/lodash/fp/isSet.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isSet', require('../isSet'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isString.js b/node_modules/lodash/fp/isString.js
new file mode 100644
index 0000000..1fd0679
--- /dev/null
+++ b/node_modules/lodash/fp/isString.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isString', require('../isString'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isSymbol.js b/node_modules/lodash/fp/isSymbol.js
new file mode 100644
index 0000000..3867695
--- /dev/null
+++ b/node_modules/lodash/fp/isSymbol.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isSymbol', require('../isSymbol'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isTypedArray.js b/node_modules/lodash/fp/isTypedArray.js
new file mode 100644
index 0000000..8567953
--- /dev/null
+++ b/node_modules/lodash/fp/isTypedArray.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isTypedArray', require('../isTypedArray'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isUndefined.js b/node_modules/lodash/fp/isUndefined.js
new file mode 100644
index 0000000..ddbca31
--- /dev/null
+++ b/node_modules/lodash/fp/isUndefined.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isUndefined', require('../isUndefined'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isWeakMap.js b/node_modules/lodash/fp/isWeakMap.js
new file mode 100644
index 0000000..ef60c61
--- /dev/null
+++ b/node_modules/lodash/fp/isWeakMap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isWeakMap', require('../isWeakMap'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isWeakSet.js b/node_modules/lodash/fp/isWeakSet.js
new file mode 100644
index 0000000..c99bfaa
--- /dev/null
+++ b/node_modules/lodash/fp/isWeakSet.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isWeakSet', require('../isWeakSet'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/iteratee.js b/node_modules/lodash/fp/iteratee.js
new file mode 100644
index 0000000..9f0f717
--- /dev/null
+++ b/node_modules/lodash/fp/iteratee.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('iteratee', require('../iteratee'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/join.js b/node_modules/lodash/fp/join.js
new file mode 100644
index 0000000..a220e00
--- /dev/null
+++ b/node_modules/lodash/fp/join.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('join', require('../join'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/juxt.js b/node_modules/lodash/fp/juxt.js
new file mode 100644
index 0000000..f71e04e
--- /dev/null
+++ b/node_modules/lodash/fp/juxt.js
@@ -0,0 +1 @@
+module.exports = require('./over');
diff --git a/node_modules/lodash/fp/kebabCase.js b/node_modules/lodash/fp/kebabCase.js
new file mode 100644
index 0000000..60737f1
--- /dev/null
+++ b/node_modules/lodash/fp/kebabCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('kebabCase', require('../kebabCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/keyBy.js b/node_modules/lodash/fp/keyBy.js
new file mode 100644
index 0000000..9a6a85d
--- /dev/null
+++ b/node_modules/lodash/fp/keyBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('keyBy', require('../keyBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/keys.js b/node_modules/lodash/fp/keys.js
new file mode 100644
index 0000000..e12bb07
--- /dev/null
+++ b/node_modules/lodash/fp/keys.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('keys', require('../keys'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/keysIn.js b/node_modules/lodash/fp/keysIn.js
new file mode 100644
index 0000000..f3eb36a
--- /dev/null
+++ b/node_modules/lodash/fp/keysIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('keysIn', require('../keysIn'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/lang.js b/node_modules/lodash/fp/lang.js
new file mode 100644
index 0000000..08cc9c1
--- /dev/null
+++ b/node_modules/lodash/fp/lang.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../lang'));
diff --git a/node_modules/lodash/fp/last.js b/node_modules/lodash/fp/last.js
new file mode 100644
index 0000000..0f71699
--- /dev/null
+++ b/node_modules/lodash/fp/last.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('last', require('../last'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/lastIndexOf.js b/node_modules/lodash/fp/lastIndexOf.js
new file mode 100644
index 0000000..ddf39c3
--- /dev/null
+++ b/node_modules/lodash/fp/lastIndexOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lastIndexOf', require('../lastIndexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/lastIndexOfFrom.js b/node_modules/lodash/fp/lastIndexOfFrom.js
new file mode 100644
index 0000000..1ff6a0b
--- /dev/null
+++ b/node_modules/lodash/fp/lastIndexOfFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lastIndexOfFrom', require('../lastIndexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/lowerCase.js b/node_modules/lodash/fp/lowerCase.js
new file mode 100644
index 0000000..ea64bc1
--- /dev/null
+++ b/node_modules/lodash/fp/lowerCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lowerCase', require('../lowerCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/lowerFirst.js b/node_modules/lodash/fp/lowerFirst.js
new file mode 100644
index 0000000..539720a
--- /dev/null
+++ b/node_modules/lodash/fp/lowerFirst.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lowerFirst', require('../lowerFirst'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/lt.js b/node_modules/lodash/fp/lt.js
new file mode 100644
index 0000000..a31d21e
--- /dev/null
+++ b/node_modules/lodash/fp/lt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lt', require('../lt'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/lte.js b/node_modules/lodash/fp/lte.js
new file mode 100644
index 0000000..d795d10
--- /dev/null
+++ b/node_modules/lodash/fp/lte.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lte', require('../lte'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/map.js b/node_modules/lodash/fp/map.js
new file mode 100644
index 0000000..cf98794
--- /dev/null
+++ b/node_modules/lodash/fp/map.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('map', require('../map'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/mapKeys.js b/node_modules/lodash/fp/mapKeys.js
new file mode 100644
index 0000000..1684587
--- /dev/null
+++ b/node_modules/lodash/fp/mapKeys.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mapKeys', require('../mapKeys'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/mapValues.js b/node_modules/lodash/fp/mapValues.js
new file mode 100644
index 0000000..4004972
--- /dev/null
+++ b/node_modules/lodash/fp/mapValues.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mapValues', require('../mapValues'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/matches.js b/node_modules/lodash/fp/matches.js
new file mode 100644
index 0000000..29d1e1e
--- /dev/null
+++ b/node_modules/lodash/fp/matches.js
@@ -0,0 +1 @@
+module.exports = require('./isMatch');
diff --git a/node_modules/lodash/fp/matchesProperty.js b/node_modules/lodash/fp/matchesProperty.js
new file mode 100644
index 0000000..4575bd2
--- /dev/null
+++ b/node_modules/lodash/fp/matchesProperty.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('matchesProperty', require('../matchesProperty'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/math.js b/node_modules/lodash/fp/math.js
new file mode 100644
index 0000000..e8f50f7
--- /dev/null
+++ b/node_modules/lodash/fp/math.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../math'));
diff --git a/node_modules/lodash/fp/max.js b/node_modules/lodash/fp/max.js
new file mode 100644
index 0000000..a66acac
--- /dev/null
+++ b/node_modules/lodash/fp/max.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('max', require('../max'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/maxBy.js b/node_modules/lodash/fp/maxBy.js
new file mode 100644
index 0000000..d083fd6
--- /dev/null
+++ b/node_modules/lodash/fp/maxBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('maxBy', require('../maxBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/mean.js b/node_modules/lodash/fp/mean.js
new file mode 100644
index 0000000..3117246
--- /dev/null
+++ b/node_modules/lodash/fp/mean.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mean', require('../mean'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/meanBy.js b/node_modules/lodash/fp/meanBy.js
new file mode 100644
index 0000000..556f25e
--- /dev/null
+++ b/node_modules/lodash/fp/meanBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('meanBy', require('../meanBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/memoize.js b/node_modules/lodash/fp/memoize.js
new file mode 100644
index 0000000..638eec6
--- /dev/null
+++ b/node_modules/lodash/fp/memoize.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('memoize', require('../memoize'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/merge.js b/node_modules/lodash/fp/merge.js
new file mode 100644
index 0000000..ac66add
--- /dev/null
+++ b/node_modules/lodash/fp/merge.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('merge', require('../merge'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/mergeAll.js b/node_modules/lodash/fp/mergeAll.js
new file mode 100644
index 0000000..a3674d6
--- /dev/null
+++ b/node_modules/lodash/fp/mergeAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mergeAll', require('../merge'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/mergeAllWith.js b/node_modules/lodash/fp/mergeAllWith.js
new file mode 100644
index 0000000..4bd4206
--- /dev/null
+++ b/node_modules/lodash/fp/mergeAllWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mergeAllWith', require('../mergeWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/mergeWith.js b/node_modules/lodash/fp/mergeWith.js
new file mode 100644
index 0000000..00d44d5
--- /dev/null
+++ b/node_modules/lodash/fp/mergeWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mergeWith', require('../mergeWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/method.js b/node_modules/lodash/fp/method.js
new file mode 100644
index 0000000..f4060c6
--- /dev/null
+++ b/node_modules/lodash/fp/method.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('method', require('../method'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/methodOf.js b/node_modules/lodash/fp/methodOf.js
new file mode 100644
index 0000000..6139905
--- /dev/null
+++ b/node_modules/lodash/fp/methodOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('methodOf', require('../methodOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/min.js b/node_modules/lodash/fp/min.js
new file mode 100644
index 0000000..d12c6b4
--- /dev/null
+++ b/node_modules/lodash/fp/min.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('min', require('../min'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/minBy.js b/node_modules/lodash/fp/minBy.js
new file mode 100644
index 0000000..fdb9e24
--- /dev/null
+++ b/node_modules/lodash/fp/minBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('minBy', require('../minBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/mixin.js b/node_modules/lodash/fp/mixin.js
new file mode 100644
index 0000000..332e6fb
--- /dev/null
+++ b/node_modules/lodash/fp/mixin.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mixin', require('../mixin'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/multiply.js b/node_modules/lodash/fp/multiply.js
new file mode 100644
index 0000000..4dcf0b0
--- /dev/null
+++ b/node_modules/lodash/fp/multiply.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('multiply', require('../multiply'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/nAry.js b/node_modules/lodash/fp/nAry.js
new file mode 100644
index 0000000..f262a76
--- /dev/null
+++ b/node_modules/lodash/fp/nAry.js
@@ -0,0 +1 @@
+module.exports = require('./ary');
diff --git a/node_modules/lodash/fp/negate.js b/node_modules/lodash/fp/negate.js
new file mode 100644
index 0000000..8b6dc7c
--- /dev/null
+++ b/node_modules/lodash/fp/negate.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('negate', require('../negate'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/next.js b/node_modules/lodash/fp/next.js
new file mode 100644
index 0000000..140155e
--- /dev/null
+++ b/node_modules/lodash/fp/next.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('next', require('../next'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/noop.js b/node_modules/lodash/fp/noop.js
new file mode 100644
index 0000000..b9e32cc
--- /dev/null
+++ b/node_modules/lodash/fp/noop.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('noop', require('../noop'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/now.js b/node_modules/lodash/fp/now.js
new file mode 100644
index 0000000..6de2068
--- /dev/null
+++ b/node_modules/lodash/fp/now.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('now', require('../now'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/nth.js b/node_modules/lodash/fp/nth.js
new file mode 100644
index 0000000..da4fda7
--- /dev/null
+++ b/node_modules/lodash/fp/nth.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('nth', require('../nth'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/nthArg.js b/node_modules/lodash/fp/nthArg.js
new file mode 100644
index 0000000..fce3165
--- /dev/null
+++ b/node_modules/lodash/fp/nthArg.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('nthArg', require('../nthArg'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/number.js b/node_modules/lodash/fp/number.js
new file mode 100644
index 0000000..5c10b88
--- /dev/null
+++ b/node_modules/lodash/fp/number.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../number'));
diff --git a/node_modules/lodash/fp/object.js b/node_modules/lodash/fp/object.js
new file mode 100644
index 0000000..ae39a13
--- /dev/null
+++ b/node_modules/lodash/fp/object.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../object'));
diff --git a/node_modules/lodash/fp/omit.js b/node_modules/lodash/fp/omit.js
new file mode 100644
index 0000000..fd68529
--- /dev/null
+++ b/node_modules/lodash/fp/omit.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('omit', require('../omit'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/omitAll.js b/node_modules/lodash/fp/omitAll.js
new file mode 100644
index 0000000..144cf4b
--- /dev/null
+++ b/node_modules/lodash/fp/omitAll.js
@@ -0,0 +1 @@
+module.exports = require('./omit');
diff --git a/node_modules/lodash/fp/omitBy.js b/node_modules/lodash/fp/omitBy.js
new file mode 100644
index 0000000..90df738
--- /dev/null
+++ b/node_modules/lodash/fp/omitBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('omitBy', require('../omitBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/once.js b/node_modules/lodash/fp/once.js
new file mode 100644
index 0000000..f8f0a5c
--- /dev/null
+++ b/node_modules/lodash/fp/once.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('once', require('../once'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/orderBy.js b/node_modules/lodash/fp/orderBy.js
new file mode 100644
index 0000000..848e210
--- /dev/null
+++ b/node_modules/lodash/fp/orderBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('orderBy', require('../orderBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/over.js b/node_modules/lodash/fp/over.js
new file mode 100644
index 0000000..01eba7b
--- /dev/null
+++ b/node_modules/lodash/fp/over.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('over', require('../over'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/overArgs.js b/node_modules/lodash/fp/overArgs.js
new file mode 100644
index 0000000..738556f
--- /dev/null
+++ b/node_modules/lodash/fp/overArgs.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('overArgs', require('../overArgs'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/overEvery.js b/node_modules/lodash/fp/overEvery.js
new file mode 100644
index 0000000..9f5a032
--- /dev/null
+++ b/node_modules/lodash/fp/overEvery.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('overEvery', require('../overEvery'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/overSome.js b/node_modules/lodash/fp/overSome.js
new file mode 100644
index 0000000..15939d5
--- /dev/null
+++ b/node_modules/lodash/fp/overSome.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('overSome', require('../overSome'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/pad.js b/node_modules/lodash/fp/pad.js
new file mode 100644
index 0000000..f1dea4a
--- /dev/null
+++ b/node_modules/lodash/fp/pad.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pad', require('../pad'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/padChars.js b/node_modules/lodash/fp/padChars.js
new file mode 100644
index 0000000..d6e0804
--- /dev/null
+++ b/node_modules/lodash/fp/padChars.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('padChars', require('../pad'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/padCharsEnd.js b/node_modules/lodash/fp/padCharsEnd.js
new file mode 100644
index 0000000..d4ab79a
--- /dev/null
+++ b/node_modules/lodash/fp/padCharsEnd.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('padCharsEnd', require('../padEnd'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/padCharsStart.js b/node_modules/lodash/fp/padCharsStart.js
new file mode 100644
index 0000000..a08a300
--- /dev/null
+++ b/node_modules/lodash/fp/padCharsStart.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('padCharsStart', require('../padStart'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/padEnd.js b/node_modules/lodash/fp/padEnd.js
new file mode 100644
index 0000000..a8522ec
--- /dev/null
+++ b/node_modules/lodash/fp/padEnd.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('padEnd', require('../padEnd'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/padStart.js b/node_modules/lodash/fp/padStart.js
new file mode 100644
index 0000000..f4ca79d
--- /dev/null
+++ b/node_modules/lodash/fp/padStart.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('padStart', require('../padStart'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/parseInt.js b/node_modules/lodash/fp/parseInt.js
new file mode 100644
index 0000000..27314cc
--- /dev/null
+++ b/node_modules/lodash/fp/parseInt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('parseInt', require('../parseInt'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/partial.js b/node_modules/lodash/fp/partial.js
new file mode 100644
index 0000000..5d46015
--- /dev/null
+++ b/node_modules/lodash/fp/partial.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('partial', require('../partial'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/partialRight.js b/node_modules/lodash/fp/partialRight.js
new file mode 100644
index 0000000..7f05fed
--- /dev/null
+++ b/node_modules/lodash/fp/partialRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('partialRight', require('../partialRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/partition.js b/node_modules/lodash/fp/partition.js
new file mode 100644
index 0000000..2ebcacc
--- /dev/null
+++ b/node_modules/lodash/fp/partition.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('partition', require('../partition'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/path.js b/node_modules/lodash/fp/path.js
new file mode 100644
index 0000000..b29cfb2
--- /dev/null
+++ b/node_modules/lodash/fp/path.js
@@ -0,0 +1 @@
+module.exports = require('./get');
diff --git a/node_modules/lodash/fp/pathEq.js b/node_modules/lodash/fp/pathEq.js
new file mode 100644
index 0000000..36c027a
--- /dev/null
+++ b/node_modules/lodash/fp/pathEq.js
@@ -0,0 +1 @@
+module.exports = require('./matchesProperty');
diff --git a/node_modules/lodash/fp/pathOr.js b/node_modules/lodash/fp/pathOr.js
new file mode 100644
index 0000000..4ab5820
--- /dev/null
+++ b/node_modules/lodash/fp/pathOr.js
@@ -0,0 +1 @@
+module.exports = require('./getOr');
diff --git a/node_modules/lodash/fp/paths.js b/node_modules/lodash/fp/paths.js
new file mode 100644
index 0000000..1eb7950
--- /dev/null
+++ b/node_modules/lodash/fp/paths.js
@@ -0,0 +1 @@
+module.exports = require('./at');
diff --git a/node_modules/lodash/fp/pick.js b/node_modules/lodash/fp/pick.js
new file mode 100644
index 0000000..197393d
--- /dev/null
+++ b/node_modules/lodash/fp/pick.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pick', require('../pick'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/pickAll.js b/node_modules/lodash/fp/pickAll.js
new file mode 100644
index 0000000..a8ecd46
--- /dev/null
+++ b/node_modules/lodash/fp/pickAll.js
@@ -0,0 +1 @@
+module.exports = require('./pick');
diff --git a/node_modules/lodash/fp/pickBy.js b/node_modules/lodash/fp/pickBy.js
new file mode 100644
index 0000000..d832d16
--- /dev/null
+++ b/node_modules/lodash/fp/pickBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pickBy', require('../pickBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/pipe.js b/node_modules/lodash/fp/pipe.js
new file mode 100644
index 0000000..b2e1e2c
--- /dev/null
+++ b/node_modules/lodash/fp/pipe.js
@@ -0,0 +1 @@
+module.exports = require('./flow');
diff --git a/node_modules/lodash/fp/placeholder.js b/node_modules/lodash/fp/placeholder.js
new file mode 100644
index 0000000..1ce1739
--- /dev/null
+++ b/node_modules/lodash/fp/placeholder.js
@@ -0,0 +1,6 @@
+/**
+ * The default argument placeholder value for methods.
+ *
+ * @type {Object}
+ */
+module.exports = {};
diff --git a/node_modules/lodash/fp/plant.js b/node_modules/lodash/fp/plant.js
new file mode 100644
index 0000000..eca8f32
--- /dev/null
+++ b/node_modules/lodash/fp/plant.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('plant', require('../plant'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/pluck.js b/node_modules/lodash/fp/pluck.js
new file mode 100644
index 0000000..0d1e1ab
--- /dev/null
+++ b/node_modules/lodash/fp/pluck.js
@@ -0,0 +1 @@
+module.exports = require('./map');
diff --git a/node_modules/lodash/fp/prop.js b/node_modules/lodash/fp/prop.js
new file mode 100644
index 0000000..b29cfb2
--- /dev/null
+++ b/node_modules/lodash/fp/prop.js
@@ -0,0 +1 @@
+module.exports = require('./get');
diff --git a/node_modules/lodash/fp/propEq.js b/node_modules/lodash/fp/propEq.js
new file mode 100644
index 0000000..36c027a
--- /dev/null
+++ b/node_modules/lodash/fp/propEq.js
@@ -0,0 +1 @@
+module.exports = require('./matchesProperty');
diff --git a/node_modules/lodash/fp/propOr.js b/node_modules/lodash/fp/propOr.js
new file mode 100644
index 0000000..4ab5820
--- /dev/null
+++ b/node_modules/lodash/fp/propOr.js
@@ -0,0 +1 @@
+module.exports = require('./getOr');
diff --git a/node_modules/lodash/fp/property.js b/node_modules/lodash/fp/property.js
new file mode 100644
index 0000000..b29cfb2
--- /dev/null
+++ b/node_modules/lodash/fp/property.js
@@ -0,0 +1 @@
+module.exports = require('./get');
diff --git a/node_modules/lodash/fp/propertyOf.js b/node_modules/lodash/fp/propertyOf.js
new file mode 100644
index 0000000..f6273ee
--- /dev/null
+++ b/node_modules/lodash/fp/propertyOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('propertyOf', require('../get'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/props.js b/node_modules/lodash/fp/props.js
new file mode 100644
index 0000000..1eb7950
--- /dev/null
+++ b/node_modules/lodash/fp/props.js
@@ -0,0 +1 @@
+module.exports = require('./at');
diff --git a/node_modules/lodash/fp/pull.js b/node_modules/lodash/fp/pull.js
new file mode 100644
index 0000000..8d7084f
--- /dev/null
+++ b/node_modules/lodash/fp/pull.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pull', require('../pull'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/pullAll.js b/node_modules/lodash/fp/pullAll.js
new file mode 100644
index 0000000..98d5c9a
--- /dev/null
+++ b/node_modules/lodash/fp/pullAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pullAll', require('../pullAll'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/pullAllBy.js b/node_modules/lodash/fp/pullAllBy.js
new file mode 100644
index 0000000..876bc3b
--- /dev/null
+++ b/node_modules/lodash/fp/pullAllBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pullAllBy', require('../pullAllBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/pullAllWith.js b/node_modules/lodash/fp/pullAllWith.js
new file mode 100644
index 0000000..f71ba4d
--- /dev/null
+++ b/node_modules/lodash/fp/pullAllWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pullAllWith', require('../pullAllWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/pullAt.js b/node_modules/lodash/fp/pullAt.js
new file mode 100644
index 0000000..e8b3bb6
--- /dev/null
+++ b/node_modules/lodash/fp/pullAt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pullAt', require('../pullAt'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/random.js b/node_modules/lodash/fp/random.js
new file mode 100644
index 0000000..99d852e
--- /dev/null
+++ b/node_modules/lodash/fp/random.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('random', require('../random'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/range.js b/node_modules/lodash/fp/range.js
new file mode 100644
index 0000000..a6bb591
--- /dev/null
+++ b/node_modules/lodash/fp/range.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('range', require('../range'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/rangeRight.js b/node_modules/lodash/fp/rangeRight.js
new file mode 100644
index 0000000..fdb712f
--- /dev/null
+++ b/node_modules/lodash/fp/rangeRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('rangeRight', require('../rangeRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/rangeStep.js b/node_modules/lodash/fp/rangeStep.js
new file mode 100644
index 0000000..d72dfc2
--- /dev/null
+++ b/node_modules/lodash/fp/rangeStep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('rangeStep', require('../range'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/rangeStepRight.js b/node_modules/lodash/fp/rangeStepRight.js
new file mode 100644
index 0000000..8b2a67b
--- /dev/null
+++ b/node_modules/lodash/fp/rangeStepRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('rangeStepRight', require('../rangeRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/rearg.js b/node_modules/lodash/fp/rearg.js
new file mode 100644
index 0000000..678e02a
--- /dev/null
+++ b/node_modules/lodash/fp/rearg.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('rearg', require('../rearg'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/reduce.js b/node_modules/lodash/fp/reduce.js
new file mode 100644
index 0000000..4cef0a0
--- /dev/null
+++ b/node_modules/lodash/fp/reduce.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('reduce', require('../reduce'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/reduceRight.js b/node_modules/lodash/fp/reduceRight.js
new file mode 100644
index 0000000..caf5bb5
--- /dev/null
+++ b/node_modules/lodash/fp/reduceRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('reduceRight', require('../reduceRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/reject.js b/node_modules/lodash/fp/reject.js
new file mode 100644
index 0000000..c163273
--- /dev/null
+++ b/node_modules/lodash/fp/reject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('reject', require('../reject'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/remove.js b/node_modules/lodash/fp/remove.js
new file mode 100644
index 0000000..e9d1327
--- /dev/null
+++ b/node_modules/lodash/fp/remove.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('remove', require('../remove'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/repeat.js b/node_modules/lodash/fp/repeat.js
new file mode 100644
index 0000000..08470f2
--- /dev/null
+++ b/node_modules/lodash/fp/repeat.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('repeat', require('../repeat'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/replace.js b/node_modules/lodash/fp/replace.js
new file mode 100644
index 0000000..2227db6
--- /dev/null
+++ b/node_modules/lodash/fp/replace.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('replace', require('../replace'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/rest.js b/node_modules/lodash/fp/rest.js
new file mode 100644
index 0000000..c1f3d64
--- /dev/null
+++ b/node_modules/lodash/fp/rest.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('rest', require('../rest'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/restFrom.js b/node_modules/lodash/fp/restFrom.js
new file mode 100644
index 0000000..714e42b
--- /dev/null
+++ b/node_modules/lodash/fp/restFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('restFrom', require('../rest'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/result.js b/node_modules/lodash/fp/result.js
new file mode 100644
index 0000000..f86ce07
--- /dev/null
+++ b/node_modules/lodash/fp/result.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('result', require('../result'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/reverse.js b/node_modules/lodash/fp/reverse.js
new file mode 100644
index 0000000..07c9f5e
--- /dev/null
+++ b/node_modules/lodash/fp/reverse.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('reverse', require('../reverse'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/round.js b/node_modules/lodash/fp/round.js
new file mode 100644
index 0000000..4c0e5c8
--- /dev/null
+++ b/node_modules/lodash/fp/round.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('round', require('../round'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sample.js b/node_modules/lodash/fp/sample.js
new file mode 100644
index 0000000..6bea125
--- /dev/null
+++ b/node_modules/lodash/fp/sample.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sample', require('../sample'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sampleSize.js b/node_modules/lodash/fp/sampleSize.js
new file mode 100644
index 0000000..359ed6f
--- /dev/null
+++ b/node_modules/lodash/fp/sampleSize.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sampleSize', require('../sampleSize'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/seq.js b/node_modules/lodash/fp/seq.js
new file mode 100644
index 0000000..d8f42b0
--- /dev/null
+++ b/node_modules/lodash/fp/seq.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../seq'));
diff --git a/node_modules/lodash/fp/set.js b/node_modules/lodash/fp/set.js
new file mode 100644
index 0000000..0b56a56
--- /dev/null
+++ b/node_modules/lodash/fp/set.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('set', require('../set'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/setWith.js b/node_modules/lodash/fp/setWith.js
new file mode 100644
index 0000000..0b58495
--- /dev/null
+++ b/node_modules/lodash/fp/setWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('setWith', require('../setWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/shuffle.js b/node_modules/lodash/fp/shuffle.js
new file mode 100644
index 0000000..aa3a1ca
--- /dev/null
+++ b/node_modules/lodash/fp/shuffle.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('shuffle', require('../shuffle'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/size.js b/node_modules/lodash/fp/size.js
new file mode 100644
index 0000000..7490136
--- /dev/null
+++ b/node_modules/lodash/fp/size.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('size', require('../size'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/slice.js b/node_modules/lodash/fp/slice.js
new file mode 100644
index 0000000..15945d3
--- /dev/null
+++ b/node_modules/lodash/fp/slice.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('slice', require('../slice'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/snakeCase.js b/node_modules/lodash/fp/snakeCase.js
new file mode 100644
index 0000000..a0ff780
--- /dev/null
+++ b/node_modules/lodash/fp/snakeCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('snakeCase', require('../snakeCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/some.js b/node_modules/lodash/fp/some.js
new file mode 100644
index 0000000..a4fa2d0
--- /dev/null
+++ b/node_modules/lodash/fp/some.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('some', require('../some'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortBy.js b/node_modules/lodash/fp/sortBy.js
new file mode 100644
index 0000000..e0790ad
--- /dev/null
+++ b/node_modules/lodash/fp/sortBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortBy', require('../sortBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortedIndex.js b/node_modules/lodash/fp/sortedIndex.js
new file mode 100644
index 0000000..364a054
--- /dev/null
+++ b/node_modules/lodash/fp/sortedIndex.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedIndex', require('../sortedIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortedIndexBy.js b/node_modules/lodash/fp/sortedIndexBy.js
new file mode 100644
index 0000000..9593dbd
--- /dev/null
+++ b/node_modules/lodash/fp/sortedIndexBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedIndexBy', require('../sortedIndexBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortedIndexOf.js b/node_modules/lodash/fp/sortedIndexOf.js
new file mode 100644
index 0000000..c9084ca
--- /dev/null
+++ b/node_modules/lodash/fp/sortedIndexOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedIndexOf', require('../sortedIndexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortedLastIndex.js b/node_modules/lodash/fp/sortedLastIndex.js
new file mode 100644
index 0000000..47fe241
--- /dev/null
+++ b/node_modules/lodash/fp/sortedLastIndex.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedLastIndex', require('../sortedLastIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortedLastIndexBy.js b/node_modules/lodash/fp/sortedLastIndexBy.js
new file mode 100644
index 0000000..0f9a347
--- /dev/null
+++ b/node_modules/lodash/fp/sortedLastIndexBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedLastIndexBy', require('../sortedLastIndexBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortedLastIndexOf.js b/node_modules/lodash/fp/sortedLastIndexOf.js
new file mode 100644
index 0000000..0d4d932
--- /dev/null
+++ b/node_modules/lodash/fp/sortedLastIndexOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedLastIndexOf', require('../sortedLastIndexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortedUniq.js b/node_modules/lodash/fp/sortedUniq.js
new file mode 100644
index 0000000..882d283
--- /dev/null
+++ b/node_modules/lodash/fp/sortedUniq.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedUniq', require('../sortedUniq'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortedUniqBy.js b/node_modules/lodash/fp/sortedUniqBy.js
new file mode 100644
index 0000000..033db91
--- /dev/null
+++ b/node_modules/lodash/fp/sortedUniqBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedUniqBy', require('../sortedUniqBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/split.js b/node_modules/lodash/fp/split.js
new file mode 100644
index 0000000..14de1a7
--- /dev/null
+++ b/node_modules/lodash/fp/split.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('split', require('../split'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/spread.js b/node_modules/lodash/fp/spread.js
new file mode 100644
index 0000000..2d11b70
--- /dev/null
+++ b/node_modules/lodash/fp/spread.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('spread', require('../spread'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/spreadFrom.js b/node_modules/lodash/fp/spreadFrom.js
new file mode 100644
index 0000000..0b630df
--- /dev/null
+++ b/node_modules/lodash/fp/spreadFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('spreadFrom', require('../spread'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/startCase.js b/node_modules/lodash/fp/startCase.js
new file mode 100644
index 0000000..ada98c9
--- /dev/null
+++ b/node_modules/lodash/fp/startCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('startCase', require('../startCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/startsWith.js b/node_modules/lodash/fp/startsWith.js
new file mode 100644
index 0000000..985e2f2
--- /dev/null
+++ b/node_modules/lodash/fp/startsWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('startsWith', require('../startsWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/string.js b/node_modules/lodash/fp/string.js
new file mode 100644
index 0000000..773b037
--- /dev/null
+++ b/node_modules/lodash/fp/string.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../string'));
diff --git a/node_modules/lodash/fp/stubArray.js b/node_modules/lodash/fp/stubArray.js
new file mode 100644
index 0000000..cd604cb
--- /dev/null
+++ b/node_modules/lodash/fp/stubArray.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('stubArray', require('../stubArray'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/stubFalse.js b/node_modules/lodash/fp/stubFalse.js
new file mode 100644
index 0000000..3296664
--- /dev/null
+++ b/node_modules/lodash/fp/stubFalse.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('stubFalse', require('../stubFalse'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/stubObject.js b/node_modules/lodash/fp/stubObject.js
new file mode 100644
index 0000000..c6c8ec4
--- /dev/null
+++ b/node_modules/lodash/fp/stubObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('stubObject', require('../stubObject'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/stubString.js b/node_modules/lodash/fp/stubString.js
new file mode 100644
index 0000000..701051e
--- /dev/null
+++ b/node_modules/lodash/fp/stubString.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('stubString', require('../stubString'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/stubTrue.js b/node_modules/lodash/fp/stubTrue.js
new file mode 100644
index 0000000..9249082
--- /dev/null
+++ b/node_modules/lodash/fp/stubTrue.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('stubTrue', require('../stubTrue'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/subtract.js b/node_modules/lodash/fp/subtract.js
new file mode 100644
index 0000000..d32b16d
--- /dev/null
+++ b/node_modules/lodash/fp/subtract.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('subtract', require('../subtract'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sum.js b/node_modules/lodash/fp/sum.js
new file mode 100644
index 0000000..5cce12b
--- /dev/null
+++ b/node_modules/lodash/fp/sum.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sum', require('../sum'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sumBy.js b/node_modules/lodash/fp/sumBy.js
new file mode 100644
index 0000000..c882656
--- /dev/null
+++ b/node_modules/lodash/fp/sumBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sumBy', require('../sumBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/symmetricDifference.js b/node_modules/lodash/fp/symmetricDifference.js
new file mode 100644
index 0000000..78c16ad
--- /dev/null
+++ b/node_modules/lodash/fp/symmetricDifference.js
@@ -0,0 +1 @@
+module.exports = require('./xor');
diff --git a/node_modules/lodash/fp/symmetricDifferenceBy.js b/node_modules/lodash/fp/symmetricDifferenceBy.js
new file mode 100644
index 0000000..298fc7f
--- /dev/null
+++ b/node_modules/lodash/fp/symmetricDifferenceBy.js
@@ -0,0 +1 @@
+module.exports = require('./xorBy');
diff --git a/node_modules/lodash/fp/symmetricDifferenceWith.js b/node_modules/lodash/fp/symmetricDifferenceWith.js
new file mode 100644
index 0000000..70bc6fa
--- /dev/null
+++ b/node_modules/lodash/fp/symmetricDifferenceWith.js
@@ -0,0 +1 @@
+module.exports = require('./xorWith');
diff --git a/node_modules/lodash/fp/tail.js b/node_modules/lodash/fp/tail.js
new file mode 100644
index 0000000..f122f0a
--- /dev/null
+++ b/node_modules/lodash/fp/tail.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('tail', require('../tail'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/take.js b/node_modules/lodash/fp/take.js
new file mode 100644
index 0000000..9af98a7
--- /dev/null
+++ b/node_modules/lodash/fp/take.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('take', require('../take'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/takeLast.js b/node_modules/lodash/fp/takeLast.js
new file mode 100644
index 0000000..e98c84a
--- /dev/null
+++ b/node_modules/lodash/fp/takeLast.js
@@ -0,0 +1 @@
+module.exports = require('./takeRight');
diff --git a/node_modules/lodash/fp/takeLastWhile.js b/node_modules/lodash/fp/takeLastWhile.js
new file mode 100644
index 0000000..5367968
--- /dev/null
+++ b/node_modules/lodash/fp/takeLastWhile.js
@@ -0,0 +1 @@
+module.exports = require('./takeRightWhile');
diff --git a/node_modules/lodash/fp/takeRight.js b/node_modules/lodash/fp/takeRight.js
new file mode 100644
index 0000000..b82950a
--- /dev/null
+++ b/node_modules/lodash/fp/takeRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('takeRight', require('../takeRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/takeRightWhile.js b/node_modules/lodash/fp/takeRightWhile.js
new file mode 100644
index 0000000..8ffb0a2
--- /dev/null
+++ b/node_modules/lodash/fp/takeRightWhile.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('takeRightWhile', require('../takeRightWhile'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/takeWhile.js b/node_modules/lodash/fp/takeWhile.js
new file mode 100644
index 0000000..2813664
--- /dev/null
+++ b/node_modules/lodash/fp/takeWhile.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('takeWhile', require('../takeWhile'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/tap.js b/node_modules/lodash/fp/tap.js
new file mode 100644
index 0000000..d33ad6e
--- /dev/null
+++ b/node_modules/lodash/fp/tap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('tap', require('../tap'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/template.js b/node_modules/lodash/fp/template.js
new file mode 100644
index 0000000..74857e1
--- /dev/null
+++ b/node_modules/lodash/fp/template.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('template', require('../template'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/templateSettings.js b/node_modules/lodash/fp/templateSettings.js
new file mode 100644
index 0000000..7bcc0a8
--- /dev/null
+++ b/node_modules/lodash/fp/templateSettings.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('templateSettings', require('../templateSettings'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/throttle.js b/node_modules/lodash/fp/throttle.js
new file mode 100644
index 0000000..77fff14
--- /dev/null
+++ b/node_modules/lodash/fp/throttle.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('throttle', require('../throttle'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/thru.js b/node_modules/lodash/fp/thru.js
new file mode 100644
index 0000000..d42b3b1
--- /dev/null
+++ b/node_modules/lodash/fp/thru.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('thru', require('../thru'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/times.js b/node_modules/lodash/fp/times.js
new file mode 100644
index 0000000..0dab06d
--- /dev/null
+++ b/node_modules/lodash/fp/times.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('times', require('../times'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toArray.js b/node_modules/lodash/fp/toArray.js
new file mode 100644
index 0000000..f0c360a
--- /dev/null
+++ b/node_modules/lodash/fp/toArray.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toArray', require('../toArray'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toFinite.js b/node_modules/lodash/fp/toFinite.js
new file mode 100644
index 0000000..3a47687
--- /dev/null
+++ b/node_modules/lodash/fp/toFinite.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toFinite', require('../toFinite'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toInteger.js b/node_modules/lodash/fp/toInteger.js
new file mode 100644
index 0000000..e0af6a7
--- /dev/null
+++ b/node_modules/lodash/fp/toInteger.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toInteger', require('../toInteger'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toIterator.js b/node_modules/lodash/fp/toIterator.js
new file mode 100644
index 0000000..65e6baa
--- /dev/null
+++ b/node_modules/lodash/fp/toIterator.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toIterator', require('../toIterator'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toJSON.js b/node_modules/lodash/fp/toJSON.js
new file mode 100644
index 0000000..2d718d0
--- /dev/null
+++ b/node_modules/lodash/fp/toJSON.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toJSON', require('../toJSON'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toLength.js b/node_modules/lodash/fp/toLength.js
new file mode 100644
index 0000000..b97cdd9
--- /dev/null
+++ b/node_modules/lodash/fp/toLength.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toLength', require('../toLength'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toLower.js b/node_modules/lodash/fp/toLower.js
new file mode 100644
index 0000000..616ef36
--- /dev/null
+++ b/node_modules/lodash/fp/toLower.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toLower', require('../toLower'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toNumber.js b/node_modules/lodash/fp/toNumber.js
new file mode 100644
index 0000000..d0c6f4d
--- /dev/null
+++ b/node_modules/lodash/fp/toNumber.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toNumber', require('../toNumber'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toPairs.js b/node_modules/lodash/fp/toPairs.js
new file mode 100644
index 0000000..af78378
--- /dev/null
+++ b/node_modules/lodash/fp/toPairs.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toPairs', require('../toPairs'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toPairsIn.js b/node_modules/lodash/fp/toPairsIn.js
new file mode 100644
index 0000000..66504ab
--- /dev/null
+++ b/node_modules/lodash/fp/toPairsIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toPairsIn', require('../toPairsIn'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toPath.js b/node_modules/lodash/fp/toPath.js
new file mode 100644
index 0000000..b4d5e50
--- /dev/null
+++ b/node_modules/lodash/fp/toPath.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toPath', require('../toPath'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toPlainObject.js b/node_modules/lodash/fp/toPlainObject.js
new file mode 100644
index 0000000..278bb86
--- /dev/null
+++ b/node_modules/lodash/fp/toPlainObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toPlainObject', require('../toPlainObject'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toSafeInteger.js b/node_modules/lodash/fp/toSafeInteger.js
new file mode 100644
index 0000000..367a26f
--- /dev/null
+++ b/node_modules/lodash/fp/toSafeInteger.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toSafeInteger', require('../toSafeInteger'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toString.js b/node_modules/lodash/fp/toString.js
new file mode 100644
index 0000000..cec4f8e
--- /dev/null
+++ b/node_modules/lodash/fp/toString.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toString', require('../toString'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toUpper.js b/node_modules/lodash/fp/toUpper.js
new file mode 100644
index 0000000..54f9a56
--- /dev/null
+++ b/node_modules/lodash/fp/toUpper.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toUpper', require('../toUpper'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/transform.js b/node_modules/lodash/fp/transform.js
new file mode 100644
index 0000000..759d088
--- /dev/null
+++ b/node_modules/lodash/fp/transform.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('transform', require('../transform'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/trim.js b/node_modules/lodash/fp/trim.js
new file mode 100644
index 0000000..e6319a7
--- /dev/null
+++ b/node_modules/lodash/fp/trim.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trim', require('../trim'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/trimChars.js b/node_modules/lodash/fp/trimChars.js
new file mode 100644
index 0000000..c9294de
--- /dev/null
+++ b/node_modules/lodash/fp/trimChars.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trimChars', require('../trim'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/trimCharsEnd.js b/node_modules/lodash/fp/trimCharsEnd.js
new file mode 100644
index 0000000..284bc2f
--- /dev/null
+++ b/node_modules/lodash/fp/trimCharsEnd.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trimCharsEnd', require('../trimEnd'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/trimCharsStart.js b/node_modules/lodash/fp/trimCharsStart.js
new file mode 100644
index 0000000..ff0ee65
--- /dev/null
+++ b/node_modules/lodash/fp/trimCharsStart.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trimCharsStart', require('../trimStart'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/trimEnd.js b/node_modules/lodash/fp/trimEnd.js
new file mode 100644
index 0000000..7190880
--- /dev/null
+++ b/node_modules/lodash/fp/trimEnd.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trimEnd', require('../trimEnd'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/trimStart.js b/node_modules/lodash/fp/trimStart.js
new file mode 100644
index 0000000..fda902c
--- /dev/null
+++ b/node_modules/lodash/fp/trimStart.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trimStart', require('../trimStart'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/truncate.js b/node_modules/lodash/fp/truncate.js
new file mode 100644
index 0000000..d265c1d
--- /dev/null
+++ b/node_modules/lodash/fp/truncate.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('truncate', require('../truncate'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/unapply.js b/node_modules/lodash/fp/unapply.js
new file mode 100644
index 0000000..c5dfe77
--- /dev/null
+++ b/node_modules/lodash/fp/unapply.js
@@ -0,0 +1 @@
+module.exports = require('./rest');
diff --git a/node_modules/lodash/fp/unary.js b/node_modules/lodash/fp/unary.js
new file mode 100644
index 0000000..286c945
--- /dev/null
+++ b/node_modules/lodash/fp/unary.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unary', require('../unary'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/unescape.js b/node_modules/lodash/fp/unescape.js
new file mode 100644
index 0000000..fddcb46
--- /dev/null
+++ b/node_modules/lodash/fp/unescape.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unescape', require('../unescape'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/union.js b/node_modules/lodash/fp/union.js
new file mode 100644
index 0000000..ef8228d
--- /dev/null
+++ b/node_modules/lodash/fp/union.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('union', require('../union'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/unionBy.js b/node_modules/lodash/fp/unionBy.js
new file mode 100644
index 0000000..603687a
--- /dev/null
+++ b/node_modules/lodash/fp/unionBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unionBy', require('../unionBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/unionWith.js b/node_modules/lodash/fp/unionWith.js
new file mode 100644
index 0000000..65bb3a7
--- /dev/null
+++ b/node_modules/lodash/fp/unionWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unionWith', require('../unionWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/uniq.js b/node_modules/lodash/fp/uniq.js
new file mode 100644
index 0000000..bc18524
--- /dev/null
+++ b/node_modules/lodash/fp/uniq.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('uniq', require('../uniq'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/uniqBy.js b/node_modules/lodash/fp/uniqBy.js
new file mode 100644
index 0000000..634c6a8
--- /dev/null
+++ b/node_modules/lodash/fp/uniqBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('uniqBy', require('../uniqBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/uniqWith.js b/node_modules/lodash/fp/uniqWith.js
new file mode 100644
index 0000000..0ec601a
--- /dev/null
+++ b/node_modules/lodash/fp/uniqWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('uniqWith', require('../uniqWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/uniqueId.js b/node_modules/lodash/fp/uniqueId.js
new file mode 100644
index 0000000..aa8fc2f
--- /dev/null
+++ b/node_modules/lodash/fp/uniqueId.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('uniqueId', require('../uniqueId'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/unnest.js b/node_modules/lodash/fp/unnest.js
new file mode 100644
index 0000000..5d34060
--- /dev/null
+++ b/node_modules/lodash/fp/unnest.js
@@ -0,0 +1 @@
+module.exports = require('./flatten');
diff --git a/node_modules/lodash/fp/unset.js b/node_modules/lodash/fp/unset.js
new file mode 100644
index 0000000..ea203a0
--- /dev/null
+++ b/node_modules/lodash/fp/unset.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unset', require('../unset'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/unzip.js b/node_modules/lodash/fp/unzip.js
new file mode 100644
index 0000000..cc364b3
--- /dev/null
+++ b/node_modules/lodash/fp/unzip.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unzip', require('../unzip'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/unzipWith.js b/node_modules/lodash/fp/unzipWith.js
new file mode 100644
index 0000000..182eaa1
--- /dev/null
+++ b/node_modules/lodash/fp/unzipWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unzipWith', require('../unzipWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/update.js b/node_modules/lodash/fp/update.js
new file mode 100644
index 0000000..b8ce2cc
--- /dev/null
+++ b/node_modules/lodash/fp/update.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('update', require('../update'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/updateWith.js b/node_modules/lodash/fp/updateWith.js
new file mode 100644
index 0000000..d5e8282
--- /dev/null
+++ b/node_modules/lodash/fp/updateWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('updateWith', require('../updateWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/upperCase.js b/node_modules/lodash/fp/upperCase.js
new file mode 100644
index 0000000..c886f20
--- /dev/null
+++ b/node_modules/lodash/fp/upperCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('upperCase', require('../upperCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/upperFirst.js b/node_modules/lodash/fp/upperFirst.js
new file mode 100644
index 0000000..d8c04df
--- /dev/null
+++ b/node_modules/lodash/fp/upperFirst.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('upperFirst', require('../upperFirst'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/useWith.js b/node_modules/lodash/fp/useWith.js
new file mode 100644
index 0000000..d8b3df5
--- /dev/null
+++ b/node_modules/lodash/fp/useWith.js
@@ -0,0 +1 @@
+module.exports = require('./overArgs');
diff --git a/node_modules/lodash/fp/util.js b/node_modules/lodash/fp/util.js
new file mode 100644
index 0000000..18c00ba
--- /dev/null
+++ b/node_modules/lodash/fp/util.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../util'));
diff --git a/node_modules/lodash/fp/value.js b/node_modules/lodash/fp/value.js
new file mode 100644
index 0000000..555eec7
--- /dev/null
+++ b/node_modules/lodash/fp/value.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('value', require('../value'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/valueOf.js b/node_modules/lodash/fp/valueOf.js
new file mode 100644
index 0000000..f968807
--- /dev/null
+++ b/node_modules/lodash/fp/valueOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('valueOf', require('../valueOf'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/values.js b/node_modules/lodash/fp/values.js
new file mode 100644
index 0000000..2dfc561
--- /dev/null
+++ b/node_modules/lodash/fp/values.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('values', require('../values'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/valuesIn.js b/node_modules/lodash/fp/valuesIn.js
new file mode 100644
index 0000000..a1b2bb8
--- /dev/null
+++ b/node_modules/lodash/fp/valuesIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('valuesIn', require('../valuesIn'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/where.js b/node_modules/lodash/fp/where.js
new file mode 100644
index 0000000..3247f64
--- /dev/null
+++ b/node_modules/lodash/fp/where.js
@@ -0,0 +1 @@
+module.exports = require('./conformsTo');
diff --git a/node_modules/lodash/fp/whereEq.js b/node_modules/lodash/fp/whereEq.js
new file mode 100644
index 0000000..29d1e1e
--- /dev/null
+++ b/node_modules/lodash/fp/whereEq.js
@@ -0,0 +1 @@
+module.exports = require('./isMatch');
diff --git a/node_modules/lodash/fp/without.js b/node_modules/lodash/fp/without.js
new file mode 100644
index 0000000..bad9e12
--- /dev/null
+++ b/node_modules/lodash/fp/without.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('without', require('../without'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/words.js b/node_modules/lodash/fp/words.js
new file mode 100644
index 0000000..4a90141
--- /dev/null
+++ b/node_modules/lodash/fp/words.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('words', require('../words'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/wrap.js b/node_modules/lodash/fp/wrap.js
new file mode 100644
index 0000000..e93bd8a
--- /dev/null
+++ b/node_modules/lodash/fp/wrap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrap', require('../wrap'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/wrapperAt.js b/node_modules/lodash/fp/wrapperAt.js
new file mode 100644
index 0000000..8f0a310
--- /dev/null
+++ b/node_modules/lodash/fp/wrapperAt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrapperAt', require('../wrapperAt'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/wrapperChain.js b/node_modules/lodash/fp/wrapperChain.js
new file mode 100644
index 0000000..2a48ea2
--- /dev/null
+++ b/node_modules/lodash/fp/wrapperChain.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrapperChain', require('../wrapperChain'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/wrapperLodash.js b/node_modules/lodash/fp/wrapperLodash.js
new file mode 100644
index 0000000..a7162d0
--- /dev/null
+++ b/node_modules/lodash/fp/wrapperLodash.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrapperLodash', require('../wrapperLodash'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/wrapperReverse.js b/node_modules/lodash/fp/wrapperReverse.js
new file mode 100644
index 0000000..e1481aa
--- /dev/null
+++ b/node_modules/lodash/fp/wrapperReverse.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrapperReverse', require('../wrapperReverse'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/wrapperValue.js b/node_modules/lodash/fp/wrapperValue.js
new file mode 100644
index 0000000..8eb9112
--- /dev/null
+++ b/node_modules/lodash/fp/wrapperValue.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrapperValue', require('../wrapperValue'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/xor.js b/node_modules/lodash/fp/xor.js
new file mode 100644
index 0000000..29e2819
--- /dev/null
+++ b/node_modules/lodash/fp/xor.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('xor', require('../xor'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/xorBy.js b/node_modules/lodash/fp/xorBy.js
new file mode 100644
index 0000000..b355686
--- /dev/null
+++ b/node_modules/lodash/fp/xorBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('xorBy', require('../xorBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/xorWith.js b/node_modules/lodash/fp/xorWith.js
new file mode 100644
index 0000000..8e05739
--- /dev/null
+++ b/node_modules/lodash/fp/xorWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('xorWith', require('../xorWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/zip.js b/node_modules/lodash/fp/zip.js
new file mode 100644
index 0000000..69e147a
--- /dev/null
+++ b/node_modules/lodash/fp/zip.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('zip', require('../zip'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/zipAll.js b/node_modules/lodash/fp/zipAll.js
new file mode 100644
index 0000000..efa8ccb
--- /dev/null
+++ b/node_modules/lodash/fp/zipAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('zipAll', require('../zip'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/zipObj.js b/node_modules/lodash/fp/zipObj.js
new file mode 100644
index 0000000..f4a3453
--- /dev/null
+++ b/node_modules/lodash/fp/zipObj.js
@@ -0,0 +1 @@
+module.exports = require('./zipObject');
diff --git a/node_modules/lodash/fp/zipObject.js b/node_modules/lodash/fp/zipObject.js
new file mode 100644
index 0000000..462dbb6
--- /dev/null
+++ b/node_modules/lodash/fp/zipObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('zipObject', require('../zipObject'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/zipObjectDeep.js b/node_modules/lodash/fp/zipObjectDeep.js
new file mode 100644
index 0000000..53a5d33
--- /dev/null
+++ b/node_modules/lodash/fp/zipObjectDeep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('zipObjectDeep', require('../zipObjectDeep'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/zipWith.js b/node_modules/lodash/fp/zipWith.js
new file mode 100644
index 0000000..c5cf9e2
--- /dev/null
+++ b/node_modules/lodash/fp/zipWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('zipWith', require('../zipWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fromPairs.js b/node_modules/lodash/fromPairs.js
new file mode 100644
index 0000000..ee7940d
--- /dev/null
+++ b/node_modules/lodash/fromPairs.js
@@ -0,0 +1,28 @@
+/**
+ * The inverse of `_.toPairs`; this method returns an object composed
+ * from key-value `pairs`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} pairs The key-value pairs.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.fromPairs([['a', 1], ['b', 2]]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+function fromPairs(pairs) {
+ var index = -1,
+ length = pairs == null ? 0 : pairs.length,
+ result = {};
+
+ while (++index < length) {
+ var pair = pairs[index];
+ result[pair[0]] = pair[1];
+ }
+ return result;
+}
+
+module.exports = fromPairs;
diff --git a/node_modules/lodash/function.js b/node_modules/lodash/function.js
new file mode 100644
index 0000000..b0fc6d9
--- /dev/null
+++ b/node_modules/lodash/function.js
@@ -0,0 +1,25 @@
+module.exports = {
+ 'after': require('./after'),
+ 'ary': require('./ary'),
+ 'before': require('./before'),
+ 'bind': require('./bind'),
+ 'bindKey': require('./bindKey'),
+ 'curry': require('./curry'),
+ 'curryRight': require('./curryRight'),
+ 'debounce': require('./debounce'),
+ 'defer': require('./defer'),
+ 'delay': require('./delay'),
+ 'flip': require('./flip'),
+ 'memoize': require('./memoize'),
+ 'negate': require('./negate'),
+ 'once': require('./once'),
+ 'overArgs': require('./overArgs'),
+ 'partial': require('./partial'),
+ 'partialRight': require('./partialRight'),
+ 'rearg': require('./rearg'),
+ 'rest': require('./rest'),
+ 'spread': require('./spread'),
+ 'throttle': require('./throttle'),
+ 'unary': require('./unary'),
+ 'wrap': require('./wrap')
+};
diff --git a/node_modules/lodash/functions.js b/node_modules/lodash/functions.js
new file mode 100644
index 0000000..9722928
--- /dev/null
+++ b/node_modules/lodash/functions.js
@@ -0,0 +1,31 @@
+var baseFunctions = require('./_baseFunctions'),
+ keys = require('./keys');
+
+/**
+ * Creates an array of function property names from own enumerable properties
+ * of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the function names.
+ * @see _.functionsIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functions(new Foo);
+ * // => ['a', 'b']
+ */
+function functions(object) {
+ return object == null ? [] : baseFunctions(object, keys(object));
+}
+
+module.exports = functions;
diff --git a/node_modules/lodash/functionsIn.js b/node_modules/lodash/functionsIn.js
new file mode 100644
index 0000000..f00345d
--- /dev/null
+++ b/node_modules/lodash/functionsIn.js
@@ -0,0 +1,31 @@
+var baseFunctions = require('./_baseFunctions'),
+ keysIn = require('./keysIn');
+
+/**
+ * Creates an array of function property names from own and inherited
+ * enumerable properties of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the function names.
+ * @see _.functions
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functionsIn(new Foo);
+ * // => ['a', 'b', 'c']
+ */
+function functionsIn(object) {
+ return object == null ? [] : baseFunctions(object, keysIn(object));
+}
+
+module.exports = functionsIn;
diff --git a/node_modules/lodash/get.js b/node_modules/lodash/get.js
new file mode 100644
index 0000000..8805ff9
--- /dev/null
+++ b/node_modules/lodash/get.js
@@ -0,0 +1,33 @@
+var baseGet = require('./_baseGet');
+
+/**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is returned in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, path);
+ return result === undefined ? defaultValue : result;
+}
+
+module.exports = get;
diff --git a/node_modules/lodash/groupBy.js b/node_modules/lodash/groupBy.js
new file mode 100644
index 0000000..babf4f6
--- /dev/null
+++ b/node_modules/lodash/groupBy.js
@@ -0,0 +1,41 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ createAggregator = require('./_createAggregator');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The order of grouped values
+ * is determined by the order they occur in `collection`. The corresponding
+ * value of each key is an array of elements responsible for generating the
+ * key. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.groupBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': [4.2], '6': [6.1, 6.3] }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.groupBy(['one', 'two', 'three'], 'length');
+ * // => { '3': ['one', 'two'], '5': ['three'] }
+ */
+var groupBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ result[key].push(value);
+ } else {
+ baseAssignValue(result, key, [value]);
+ }
+});
+
+module.exports = groupBy;
diff --git a/node_modules/lodash/gt.js b/node_modules/lodash/gt.js
new file mode 100644
index 0000000..3a66282
--- /dev/null
+++ b/node_modules/lodash/gt.js
@@ -0,0 +1,29 @@
+var baseGt = require('./_baseGt'),
+ createRelationalOperation = require('./_createRelationalOperation');
+
+/**
+ * Checks if `value` is greater than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ * @see _.lt
+ * @example
+ *
+ * _.gt(3, 1);
+ * // => true
+ *
+ * _.gt(3, 3);
+ * // => false
+ *
+ * _.gt(1, 3);
+ * // => false
+ */
+var gt = createRelationalOperation(baseGt);
+
+module.exports = gt;
diff --git a/node_modules/lodash/gte.js b/node_modules/lodash/gte.js
new file mode 100644
index 0000000..4180a68
--- /dev/null
+++ b/node_modules/lodash/gte.js
@@ -0,0 +1,30 @@
+var createRelationalOperation = require('./_createRelationalOperation');
+
+/**
+ * Checks if `value` is greater than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than or equal to
+ * `other`, else `false`.
+ * @see _.lte
+ * @example
+ *
+ * _.gte(3, 1);
+ * // => true
+ *
+ * _.gte(3, 3);
+ * // => true
+ *
+ * _.gte(1, 3);
+ * // => false
+ */
+var gte = createRelationalOperation(function(value, other) {
+ return value >= other;
+});
+
+module.exports = gte;
diff --git a/node_modules/lodash/has.js b/node_modules/lodash/has.js
new file mode 100644
index 0000000..34df55e
--- /dev/null
+++ b/node_modules/lodash/has.js
@@ -0,0 +1,35 @@
+var baseHas = require('./_baseHas'),
+ hasPath = require('./_hasPath');
+
+/**
+ * Checks if `path` is a direct property of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': 2 } };
+ * var other = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b');
+ * // => true
+ *
+ * _.has(object, ['a', 'b']);
+ * // => true
+ *
+ * _.has(other, 'a');
+ * // => false
+ */
+function has(object, path) {
+ return object != null && hasPath(object, path, baseHas);
+}
+
+module.exports = has;
diff --git a/node_modules/lodash/hasIn.js b/node_modules/lodash/hasIn.js
new file mode 100644
index 0000000..06a3686
--- /dev/null
+++ b/node_modules/lodash/hasIn.js
@@ -0,0 +1,34 @@
+var baseHasIn = require('./_baseHasIn'),
+ hasPath = require('./_hasPath');
+
+/**
+ * Checks if `path` is a direct or inherited property of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.hasIn(object, 'a');
+ * // => true
+ *
+ * _.hasIn(object, 'a.b');
+ * // => true
+ *
+ * _.hasIn(object, ['a', 'b']);
+ * // => true
+ *
+ * _.hasIn(object, 'b');
+ * // => false
+ */
+function hasIn(object, path) {
+ return object != null && hasPath(object, path, baseHasIn);
+}
+
+module.exports = hasIn;
diff --git a/node_modules/lodash/head.js b/node_modules/lodash/head.js
new file mode 100644
index 0000000..dee9d1f
--- /dev/null
+++ b/node_modules/lodash/head.js
@@ -0,0 +1,23 @@
+/**
+ * Gets the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias first
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the first element of `array`.
+ * @example
+ *
+ * _.head([1, 2, 3]);
+ * // => 1
+ *
+ * _.head([]);
+ * // => undefined
+ */
+function head(array) {
+ return (array && array.length) ? array[0] : undefined;
+}
+
+module.exports = head;
diff --git a/node_modules/lodash/identity.js b/node_modules/lodash/identity.js
new file mode 100644
index 0000000..2d5d963
--- /dev/null
+++ b/node_modules/lodash/identity.js
@@ -0,0 +1,21 @@
+/**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+function identity(value) {
+ return value;
+}
+
+module.exports = identity;
diff --git a/node_modules/lodash/inRange.js b/node_modules/lodash/inRange.js
new file mode 100644
index 0000000..f20728d
--- /dev/null
+++ b/node_modules/lodash/inRange.js
@@ -0,0 +1,55 @@
+var baseInRange = require('./_baseInRange'),
+ toFinite = require('./toFinite'),
+ toNumber = require('./toNumber');
+
+/**
+ * Checks if `n` is between `start` and up to, but not including, `end`. If
+ * `end` is not specified, it's set to `start` with `start` then set to `0`.
+ * If `start` is greater than `end` the params are swapped to support
+ * negative ranges.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.3.0
+ * @category Number
+ * @param {number} number The number to check.
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ * @see _.range, _.rangeRight
+ * @example
+ *
+ * _.inRange(3, 2, 4);
+ * // => true
+ *
+ * _.inRange(4, 8);
+ * // => true
+ *
+ * _.inRange(4, 2);
+ * // => false
+ *
+ * _.inRange(2, 2);
+ * // => false
+ *
+ * _.inRange(1.2, 2);
+ * // => true
+ *
+ * _.inRange(5.2, 4);
+ * // => false
+ *
+ * _.inRange(-3, -2, -6);
+ * // => true
+ */
+function inRange(number, start, end) {
+ start = toFinite(start);
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toFinite(end);
+ }
+ number = toNumber(number);
+ return baseInRange(number, start, end);
+}
+
+module.exports = inRange;
diff --git a/node_modules/lodash/includes.js b/node_modules/lodash/includes.js
new file mode 100644
index 0000000..ae0deed
--- /dev/null
+++ b/node_modules/lodash/includes.js
@@ -0,0 +1,53 @@
+var baseIndexOf = require('./_baseIndexOf'),
+ isArrayLike = require('./isArrayLike'),
+ isString = require('./isString'),
+ toInteger = require('./toInteger'),
+ values = require('./values');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Checks if `value` is in `collection`. If `collection` is a string, it's
+ * checked for a substring of `value`, otherwise
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * is used for equality comparisons. If `fromIndex` is negative, it's used as
+ * the offset from the end of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
+ * @example
+ *
+ * _.includes([1, 2, 3], 1);
+ * // => true
+ *
+ * _.includes([1, 2, 3], 1, 2);
+ * // => false
+ *
+ * _.includes({ 'a': 1, 'b': 2 }, 1);
+ * // => true
+ *
+ * _.includes('abcd', 'bc');
+ * // => true
+ */
+function includes(collection, value, fromIndex, guard) {
+ collection = isArrayLike(collection) ? collection : values(collection);
+ fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
+
+ var length = collection.length;
+ if (fromIndex < 0) {
+ fromIndex = nativeMax(length + fromIndex, 0);
+ }
+ return isString(collection)
+ ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
+ : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
+}
+
+module.exports = includes;
diff --git a/node_modules/lodash/index.js b/node_modules/lodash/index.js
new file mode 100644
index 0000000..5d063e2
--- /dev/null
+++ b/node_modules/lodash/index.js
@@ -0,0 +1 @@
+module.exports = require('./lodash'); \ No newline at end of file
diff --git a/node_modules/lodash/indexOf.js b/node_modules/lodash/indexOf.js
new file mode 100644
index 0000000..3c644af
--- /dev/null
+++ b/node_modules/lodash/indexOf.js
@@ -0,0 +1,42 @@
+var baseIndexOf = require('./_baseIndexOf'),
+ toInteger = require('./toInteger');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Gets the index at which the first occurrence of `value` is found in `array`
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it's used as the
+ * offset from the end of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.indexOf([1, 2, 1, 2], 2);
+ * // => 1
+ *
+ * // Search from the `fromIndex`.
+ * _.indexOf([1, 2, 1, 2], 2, 2);
+ * // => 3
+ */
+function indexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseIndexOf(array, value, index);
+}
+
+module.exports = indexOf;
diff --git a/node_modules/lodash/initial.js b/node_modules/lodash/initial.js
new file mode 100644
index 0000000..f47fc50
--- /dev/null
+++ b/node_modules/lodash/initial.js
@@ -0,0 +1,22 @@
+var baseSlice = require('./_baseSlice');
+
+/**
+ * Gets all but the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.initial([1, 2, 3]);
+ * // => [1, 2]
+ */
+function initial(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 0, -1) : [];
+}
+
+module.exports = initial;
diff --git a/node_modules/lodash/intersection.js b/node_modules/lodash/intersection.js
new file mode 100644
index 0000000..a94c135
--- /dev/null
+++ b/node_modules/lodash/intersection.js
@@ -0,0 +1,30 @@
+var arrayMap = require('./_arrayMap'),
+ baseIntersection = require('./_baseIntersection'),
+ baseRest = require('./_baseRest'),
+ castArrayLikeObject = require('./_castArrayLikeObject');
+
+/**
+ * Creates an array of unique values that are included in all given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersection([2, 1], [2, 3]);
+ * // => [2]
+ */
+var intersection = baseRest(function(arrays) {
+ var mapped = arrayMap(arrays, castArrayLikeObject);
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped)
+ : [];
+});
+
+module.exports = intersection;
diff --git a/node_modules/lodash/intersectionBy.js b/node_modules/lodash/intersectionBy.js
new file mode 100644
index 0000000..31461aa
--- /dev/null
+++ b/node_modules/lodash/intersectionBy.js
@@ -0,0 +1,45 @@
+var arrayMap = require('./_arrayMap'),
+ baseIntersection = require('./_baseIntersection'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ castArrayLikeObject = require('./_castArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.intersection` except that it accepts `iteratee`
+ * which is invoked for each element of each `arrays` to generate the criterion
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [2.1]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }]
+ */
+var intersectionBy = baseRest(function(arrays) {
+ var iteratee = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ if (iteratee === last(mapped)) {
+ iteratee = undefined;
+ } else {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, baseIteratee(iteratee, 2))
+ : [];
+});
+
+module.exports = intersectionBy;
diff --git a/node_modules/lodash/intersectionWith.js b/node_modules/lodash/intersectionWith.js
new file mode 100644
index 0000000..63cabfa
--- /dev/null
+++ b/node_modules/lodash/intersectionWith.js
@@ -0,0 +1,41 @@
+var arrayMap = require('./_arrayMap'),
+ baseIntersection = require('./_baseIntersection'),
+ baseRest = require('./_baseRest'),
+ castArrayLikeObject = require('./_castArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.intersection` except that it accepts `comparator`
+ * which is invoked to compare elements of `arrays`. The order and references
+ * of result values are determined by the first array. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.intersectionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }]
+ */
+var intersectionWith = baseRest(function(arrays) {
+ var comparator = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ if (comparator) {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, undefined, comparator)
+ : [];
+});
+
+module.exports = intersectionWith;
diff --git a/node_modules/lodash/invert.js b/node_modules/lodash/invert.js
new file mode 100644
index 0000000..8c47950
--- /dev/null
+++ b/node_modules/lodash/invert.js
@@ -0,0 +1,42 @@
+var constant = require('./constant'),
+ createInverter = require('./_createInverter'),
+ identity = require('./identity');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.toString;
+
+/**
+ * Creates an object composed of the inverted keys and values of `object`.
+ * If `object` contains duplicate values, subsequent values overwrite
+ * property assignments of previous values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invert(object);
+ * // => { '1': 'c', '2': 'b' }
+ */
+var invert = createInverter(function(result, value, key) {
+ if (value != null &&
+ typeof value.toString != 'function') {
+ value = nativeObjectToString.call(value);
+ }
+
+ result[value] = key;
+}, constant(identity));
+
+module.exports = invert;
diff --git a/node_modules/lodash/invertBy.js b/node_modules/lodash/invertBy.js
new file mode 100644
index 0000000..3f4f7e5
--- /dev/null
+++ b/node_modules/lodash/invertBy.js
@@ -0,0 +1,56 @@
+var baseIteratee = require('./_baseIteratee'),
+ createInverter = require('./_createInverter');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.toString;
+
+/**
+ * This method is like `_.invert` except that the inverted object is generated
+ * from the results of running each element of `object` thru `iteratee`. The
+ * corresponding inverted value of each inverted key is an array of keys
+ * responsible for generating the inverted value. The iteratee is invoked
+ * with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invertBy(object);
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ *
+ * _.invertBy(object, function(value) {
+ * return 'group' + value;
+ * });
+ * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
+ */
+var invertBy = createInverter(function(result, value, key) {
+ if (value != null &&
+ typeof value.toString != 'function') {
+ value = nativeObjectToString.call(value);
+ }
+
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+}, baseIteratee);
+
+module.exports = invertBy;
diff --git a/node_modules/lodash/invoke.js b/node_modules/lodash/invoke.js
new file mode 100644
index 0000000..97d51eb
--- /dev/null
+++ b/node_modules/lodash/invoke.js
@@ -0,0 +1,24 @@
+var baseInvoke = require('./_baseInvoke'),
+ baseRest = require('./_baseRest');
+
+/**
+ * Invokes the method at `path` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
+ *
+ * _.invoke(object, 'a[0].b.c.slice', 1, 3);
+ * // => [2, 3]
+ */
+var invoke = baseRest(baseInvoke);
+
+module.exports = invoke;
diff --git a/node_modules/lodash/invokeMap.js b/node_modules/lodash/invokeMap.js
new file mode 100644
index 0000000..8da5126
--- /dev/null
+++ b/node_modules/lodash/invokeMap.js
@@ -0,0 +1,41 @@
+var apply = require('./_apply'),
+ baseEach = require('./_baseEach'),
+ baseInvoke = require('./_baseInvoke'),
+ baseRest = require('./_baseRest'),
+ isArrayLike = require('./isArrayLike');
+
+/**
+ * Invokes the method at `path` of each element in `collection`, returning
+ * an array of the results of each invoked method. Any additional arguments
+ * are provided to each invoked method. If `path` is a function, it's invoked
+ * for, and `this` bound to, each element in `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|string} path The path of the method to invoke or
+ * the function invoked per iteration.
+ * @param {...*} [args] The arguments to invoke each method with.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
+ * // => [[1, 5, 7], [1, 2, 3]]
+ *
+ * _.invokeMap([123, 456], String.prototype.split, '');
+ * // => [['1', '2', '3'], ['4', '5', '6']]
+ */
+var invokeMap = baseRest(function(collection, path, args) {
+ var index = -1,
+ isFunc = typeof path == 'function',
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value) {
+ result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
+ });
+ return result;
+});
+
+module.exports = invokeMap;
diff --git a/node_modules/lodash/isArguments.js b/node_modules/lodash/isArguments.js
new file mode 100644
index 0000000..8b9ed66
--- /dev/null
+++ b/node_modules/lodash/isArguments.js
@@ -0,0 +1,36 @@
+var baseIsArguments = require('./_baseIsArguments'),
+ isObjectLike = require('./isObjectLike');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+/**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+};
+
+module.exports = isArguments;
diff --git a/node_modules/lodash/isArray.js b/node_modules/lodash/isArray.js
new file mode 100644
index 0000000..88ab55f
--- /dev/null
+++ b/node_modules/lodash/isArray.js
@@ -0,0 +1,26 @@
+/**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+var isArray = Array.isArray;
+
+module.exports = isArray;
diff --git a/node_modules/lodash/isArrayBuffer.js b/node_modules/lodash/isArrayBuffer.js
new file mode 100644
index 0000000..12904a6
--- /dev/null
+++ b/node_modules/lodash/isArrayBuffer.js
@@ -0,0 +1,27 @@
+var baseIsArrayBuffer = require('./_baseIsArrayBuffer'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* Node.js helper references. */
+var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer;
+
+/**
+ * Checks if `value` is classified as an `ArrayBuffer` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+ * @example
+ *
+ * _.isArrayBuffer(new ArrayBuffer(2));
+ * // => true
+ *
+ * _.isArrayBuffer(new Array(2));
+ * // => false
+ */
+var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
+
+module.exports = isArrayBuffer;
diff --git a/node_modules/lodash/isArrayLike.js b/node_modules/lodash/isArrayLike.js
new file mode 100644
index 0000000..0f96680
--- /dev/null
+++ b/node_modules/lodash/isArrayLike.js
@@ -0,0 +1,33 @@
+var isFunction = require('./isFunction'),
+ isLength = require('./isLength');
+
+/**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+}
+
+module.exports = isArrayLike;
diff --git a/node_modules/lodash/isArrayLikeObject.js b/node_modules/lodash/isArrayLikeObject.js
new file mode 100644
index 0000000..6c4812a
--- /dev/null
+++ b/node_modules/lodash/isArrayLikeObject.js
@@ -0,0 +1,33 @@
+var isArrayLike = require('./isArrayLike'),
+ isObjectLike = require('./isObjectLike');
+
+/**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+}
+
+module.exports = isArrayLikeObject;
diff --git a/node_modules/lodash/isBoolean.js b/node_modules/lodash/isBoolean.js
new file mode 100644
index 0000000..a43ed4b
--- /dev/null
+++ b/node_modules/lodash/isBoolean.js
@@ -0,0 +1,29 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var boolTag = '[object Boolean]';
+
+/**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+function isBoolean(value) {
+ return value === true || value === false ||
+ (isObjectLike(value) && baseGetTag(value) == boolTag);
+}
+
+module.exports = isBoolean;
diff --git a/node_modules/lodash/isBuffer.js b/node_modules/lodash/isBuffer.js
new file mode 100644
index 0000000..c103cc7
--- /dev/null
+++ b/node_modules/lodash/isBuffer.js
@@ -0,0 +1,38 @@
+var root = require('./_root'),
+ stubFalse = require('./stubFalse');
+
+/** Detect free variable `exports`. */
+var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+/** Detect free variable `module`. */
+var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+/** Detect the popular CommonJS extension `module.exports`. */
+var moduleExports = freeModule && freeModule.exports === freeExports;
+
+/** Built-in value references. */
+var Buffer = moduleExports ? root.Buffer : undefined;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
+
+/**
+ * Checks if `value` is a buffer.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
+ * @example
+ *
+ * _.isBuffer(new Buffer(2));
+ * // => true
+ *
+ * _.isBuffer(new Uint8Array(2));
+ * // => false
+ */
+var isBuffer = nativeIsBuffer || stubFalse;
+
+module.exports = isBuffer;
diff --git a/node_modules/lodash/isDate.js b/node_modules/lodash/isDate.js
new file mode 100644
index 0000000..7f0209f
--- /dev/null
+++ b/node_modules/lodash/isDate.js
@@ -0,0 +1,27 @@
+var baseIsDate = require('./_baseIsDate'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* Node.js helper references. */
+var nodeIsDate = nodeUtil && nodeUtil.isDate;
+
+/**
+ * Checks if `value` is classified as a `Date` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ * @example
+ *
+ * _.isDate(new Date);
+ * // => true
+ *
+ * _.isDate('Mon April 23 2012');
+ * // => false
+ */
+var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
+
+module.exports = isDate;
diff --git a/node_modules/lodash/isElement.js b/node_modules/lodash/isElement.js
new file mode 100644
index 0000000..76ae29c
--- /dev/null
+++ b/node_modules/lodash/isElement.js
@@ -0,0 +1,25 @@
+var isObjectLike = require('./isObjectLike'),
+ isPlainObject = require('./isPlainObject');
+
+/**
+ * Checks if `value` is likely a DOM element.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
+ * @example
+ *
+ * _.isElement(document.body);
+ * // => true
+ *
+ * _.isElement('<body>');
+ * // => false
+ */
+function isElement(value) {
+ return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
+}
+
+module.exports = isElement;
diff --git a/node_modules/lodash/isEmpty.js b/node_modules/lodash/isEmpty.js
new file mode 100644
index 0000000..3597294
--- /dev/null
+++ b/node_modules/lodash/isEmpty.js
@@ -0,0 +1,77 @@
+var baseKeys = require('./_baseKeys'),
+ getTag = require('./_getTag'),
+ isArguments = require('./isArguments'),
+ isArray = require('./isArray'),
+ isArrayLike = require('./isArrayLike'),
+ isBuffer = require('./isBuffer'),
+ isPrototype = require('./_isPrototype'),
+ isTypedArray = require('./isTypedArray');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ setTag = '[object Set]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Checks if `value` is an empty object, collection, map, or set.
+ *
+ * Objects are considered empty if they have no own enumerable string keyed
+ * properties.
+ *
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+ * @example
+ *
+ * _.isEmpty(null);
+ * // => true
+ *
+ * _.isEmpty(true);
+ * // => true
+ *
+ * _.isEmpty(1);
+ * // => true
+ *
+ * _.isEmpty([1, 2, 3]);
+ * // => false
+ *
+ * _.isEmpty({ 'a': 1 });
+ * // => false
+ */
+function isEmpty(value) {
+ if (value == null) {
+ return true;
+ }
+ if (isArrayLike(value) &&
+ (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
+ isBuffer(value) || isTypedArray(value) || isArguments(value))) {
+ return !value.length;
+ }
+ var tag = getTag(value);
+ if (tag == mapTag || tag == setTag) {
+ return !value.size;
+ }
+ if (isPrototype(value)) {
+ return !baseKeys(value).length;
+ }
+ for (var key in value) {
+ if (hasOwnProperty.call(value, key)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+module.exports = isEmpty;
diff --git a/node_modules/lodash/isEqual.js b/node_modules/lodash/isEqual.js
new file mode 100644
index 0000000..5e23e76
--- /dev/null
+++ b/node_modules/lodash/isEqual.js
@@ -0,0 +1,35 @@
+var baseIsEqual = require('./_baseIsEqual');
+
+/**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are compared by strict equality, i.e. `===`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+function isEqual(value, other) {
+ return baseIsEqual(value, other);
+}
+
+module.exports = isEqual;
diff --git a/node_modules/lodash/isEqualWith.js b/node_modules/lodash/isEqualWith.js
new file mode 100644
index 0000000..21bdc7f
--- /dev/null
+++ b/node_modules/lodash/isEqualWith.js
@@ -0,0 +1,41 @@
+var baseIsEqual = require('./_baseIsEqual');
+
+/**
+ * This method is like `_.isEqual` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with up to
+ * six arguments: (objValue, othValue [, index|key, object, other, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, othValue) {
+ * if (isGreeting(objValue) && isGreeting(othValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var array = ['hello', 'goodbye'];
+ * var other = ['hi', 'goodbye'];
+ *
+ * _.isEqualWith(array, other, customizer);
+ * // => true
+ */
+function isEqualWith(value, other, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ var result = customizer ? customizer(value, other) : undefined;
+ return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
+}
+
+module.exports = isEqualWith;
diff --git a/node_modules/lodash/isError.js b/node_modules/lodash/isError.js
new file mode 100644
index 0000000..b4f41e0
--- /dev/null
+++ b/node_modules/lodash/isError.js
@@ -0,0 +1,36 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike'),
+ isPlainObject = require('./isPlainObject');
+
+/** `Object#toString` result references. */
+var domExcTag = '[object DOMException]',
+ errorTag = '[object Error]';
+
+/**
+ * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
+ * `SyntaxError`, `TypeError`, or `URIError` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
+ * @example
+ *
+ * _.isError(new Error);
+ * // => true
+ *
+ * _.isError(Error);
+ * // => false
+ */
+function isError(value) {
+ if (!isObjectLike(value)) {
+ return false;
+ }
+ var tag = baseGetTag(value);
+ return tag == errorTag || tag == domExcTag ||
+ (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
+}
+
+module.exports = isError;
diff --git a/node_modules/lodash/isFinite.js b/node_modules/lodash/isFinite.js
new file mode 100644
index 0000000..601842b
--- /dev/null
+++ b/node_modules/lodash/isFinite.js
@@ -0,0 +1,36 @@
+var root = require('./_root');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeIsFinite = root.isFinite;
+
+/**
+ * Checks if `value` is a finite primitive number.
+ *
+ * **Note:** This method is based on
+ * [`Number.isFinite`](https://mdn.io/Number/isFinite).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
+ * @example
+ *
+ * _.isFinite(3);
+ * // => true
+ *
+ * _.isFinite(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isFinite(Infinity);
+ * // => false
+ *
+ * _.isFinite('3');
+ * // => false
+ */
+function isFinite(value) {
+ return typeof value == 'number' && nativeIsFinite(value);
+}
+
+module.exports = isFinite;
diff --git a/node_modules/lodash/isFunction.js b/node_modules/lodash/isFunction.js
new file mode 100644
index 0000000..907a8cd
--- /dev/null
+++ b/node_modules/lodash/isFunction.js
@@ -0,0 +1,37 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObject = require('./isObject');
+
+/** `Object#toString` result references. */
+var asyncTag = '[object AsyncFunction]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ proxyTag = '[object Proxy]';
+
+/**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+function isFunction(value) {
+ if (!isObject(value)) {
+ return false;
+ }
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
+ var tag = baseGetTag(value);
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
+}
+
+module.exports = isFunction;
diff --git a/node_modules/lodash/isInteger.js b/node_modules/lodash/isInteger.js
new file mode 100644
index 0000000..66aa87d
--- /dev/null
+++ b/node_modules/lodash/isInteger.js
@@ -0,0 +1,33 @@
+var toInteger = require('./toInteger');
+
+/**
+ * Checks if `value` is an integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isInteger`](https://mdn.io/Number/isInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
+ * @example
+ *
+ * _.isInteger(3);
+ * // => true
+ *
+ * _.isInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isInteger(Infinity);
+ * // => false
+ *
+ * _.isInteger('3');
+ * // => false
+ */
+function isInteger(value) {
+ return typeof value == 'number' && value == toInteger(value);
+}
+
+module.exports = isInteger;
diff --git a/node_modules/lodash/isLength.js b/node_modules/lodash/isLength.js
new file mode 100644
index 0000000..3a95caa
--- /dev/null
+++ b/node_modules/lodash/isLength.js
@@ -0,0 +1,35 @@
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+module.exports = isLength;
diff --git a/node_modules/lodash/isMap.js b/node_modules/lodash/isMap.js
new file mode 100644
index 0000000..44f8517
--- /dev/null
+++ b/node_modules/lodash/isMap.js
@@ -0,0 +1,27 @@
+var baseIsMap = require('./_baseIsMap'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* Node.js helper references. */
+var nodeIsMap = nodeUtil && nodeUtil.isMap;
+
+/**
+ * Checks if `value` is classified as a `Map` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ * @example
+ *
+ * _.isMap(new Map);
+ * // => true
+ *
+ * _.isMap(new WeakMap);
+ * // => false
+ */
+var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
+
+module.exports = isMap;
diff --git a/node_modules/lodash/isMatch.js b/node_modules/lodash/isMatch.js
new file mode 100644
index 0000000..9773a18
--- /dev/null
+++ b/node_modules/lodash/isMatch.js
@@ -0,0 +1,36 @@
+var baseIsMatch = require('./_baseIsMatch'),
+ getMatchData = require('./_getMatchData');
+
+/**
+ * Performs a partial deep comparison between `object` and `source` to
+ * determine if `object` contains equivalent property values.
+ *
+ * **Note:** This method is equivalent to `_.matches` when `source` is
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ *
+ * _.isMatch(object, { 'b': 2 });
+ * // => true
+ *
+ * _.isMatch(object, { 'b': 1 });
+ * // => false
+ */
+function isMatch(object, source) {
+ return object === source || baseIsMatch(object, source, getMatchData(source));
+}
+
+module.exports = isMatch;
diff --git a/node_modules/lodash/isMatchWith.js b/node_modules/lodash/isMatchWith.js
new file mode 100644
index 0000000..187b6a6
--- /dev/null
+++ b/node_modules/lodash/isMatchWith.js
@@ -0,0 +1,41 @@
+var baseIsMatch = require('./_baseIsMatch'),
+ getMatchData = require('./_getMatchData');
+
+/**
+ * This method is like `_.isMatch` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with five
+ * arguments: (objValue, srcValue, index|key, object, source).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, srcValue) {
+ * if (isGreeting(objValue) && isGreeting(srcValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var object = { 'greeting': 'hello' };
+ * var source = { 'greeting': 'hi' };
+ *
+ * _.isMatchWith(object, source, customizer);
+ * // => true
+ */
+function isMatchWith(object, source, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseIsMatch(object, source, getMatchData(source), customizer);
+}
+
+module.exports = isMatchWith;
diff --git a/node_modules/lodash/isNaN.js b/node_modules/lodash/isNaN.js
new file mode 100644
index 0000000..7d0d783
--- /dev/null
+++ b/node_modules/lodash/isNaN.js
@@ -0,0 +1,38 @@
+var isNumber = require('./isNumber');
+
+/**
+ * Checks if `value` is `NaN`.
+ *
+ * **Note:** This method is based on
+ * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
+ * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
+ * `undefined` and other non-number values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ * @example
+ *
+ * _.isNaN(NaN);
+ * // => true
+ *
+ * _.isNaN(new Number(NaN));
+ * // => true
+ *
+ * isNaN(undefined);
+ * // => true
+ *
+ * _.isNaN(undefined);
+ * // => false
+ */
+function isNaN(value) {
+ // An `NaN` primitive is the only value that is not equal to itself.
+ // Perform the `toStringTag` check first to avoid errors with some
+ // ActiveX objects in IE.
+ return isNumber(value) && value != +value;
+}
+
+module.exports = isNaN;
diff --git a/node_modules/lodash/isNative.js b/node_modules/lodash/isNative.js
new file mode 100644
index 0000000..f0cb8d5
--- /dev/null
+++ b/node_modules/lodash/isNative.js
@@ -0,0 +1,40 @@
+var baseIsNative = require('./_baseIsNative'),
+ isMaskable = require('./_isMaskable');
+
+/** Error message constants. */
+var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.';
+
+/**
+ * Checks if `value` is a pristine native function.
+ *
+ * **Note:** This method can't reliably detect native functions in the presence
+ * of the core-js package because core-js circumvents this kind of detection.
+ * Despite multiple requests, the core-js maintainer has made it clear: any
+ * attempt to fix the detection will be obstructed. As a result, we're left
+ * with little choice but to throw an error. Unfortunately, this also affects
+ * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
+ * which rely on core-js.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+function isNative(value) {
+ if (isMaskable(value)) {
+ throw new Error(CORE_ERROR_TEXT);
+ }
+ return baseIsNative(value);
+}
+
+module.exports = isNative;
diff --git a/node_modules/lodash/isNil.js b/node_modules/lodash/isNil.js
new file mode 100644
index 0000000..79f0505
--- /dev/null
+++ b/node_modules/lodash/isNil.js
@@ -0,0 +1,25 @@
+/**
+ * Checks if `value` is `null` or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
+ * @example
+ *
+ * _.isNil(null);
+ * // => true
+ *
+ * _.isNil(void 0);
+ * // => true
+ *
+ * _.isNil(NaN);
+ * // => false
+ */
+function isNil(value) {
+ return value == null;
+}
+
+module.exports = isNil;
diff --git a/node_modules/lodash/isNull.js b/node_modules/lodash/isNull.js
new file mode 100644
index 0000000..c0a374d
--- /dev/null
+++ b/node_modules/lodash/isNull.js
@@ -0,0 +1,22 @@
+/**
+ * Checks if `value` is `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
+ * @example
+ *
+ * _.isNull(null);
+ * // => true
+ *
+ * _.isNull(void 0);
+ * // => false
+ */
+function isNull(value) {
+ return value === null;
+}
+
+module.exports = isNull;
diff --git a/node_modules/lodash/isNumber.js b/node_modules/lodash/isNumber.js
new file mode 100644
index 0000000..cd34ee4
--- /dev/null
+++ b/node_modules/lodash/isNumber.js
@@ -0,0 +1,38 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var numberTag = '[object Number]';
+
+/**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+ * classified as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && baseGetTag(value) == numberTag);
+}
+
+module.exports = isNumber;
diff --git a/node_modules/lodash/isObject.js b/node_modules/lodash/isObject.js
new file mode 100644
index 0000000..1dc8939
--- /dev/null
+++ b/node_modules/lodash/isObject.js
@@ -0,0 +1,31 @@
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ var type = typeof value;
+ return value != null && (type == 'object' || type == 'function');
+}
+
+module.exports = isObject;
diff --git a/node_modules/lodash/isObjectLike.js b/node_modules/lodash/isObjectLike.js
new file mode 100644
index 0000000..301716b
--- /dev/null
+++ b/node_modules/lodash/isObjectLike.js
@@ -0,0 +1,29 @@
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return value != null && typeof value == 'object';
+}
+
+module.exports = isObjectLike;
diff --git a/node_modules/lodash/isPlainObject.js b/node_modules/lodash/isPlainObject.js
new file mode 100644
index 0000000..2387373
--- /dev/null
+++ b/node_modules/lodash/isPlainObject.js
@@ -0,0 +1,62 @@
+var baseGetTag = require('./_baseGetTag'),
+ getPrototype = require('./_getPrototype'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var objectTag = '[object Object]';
+
+/** Used for built-in method references. */
+var funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/** Used to infer the `Object` constructor. */
+var objectCtorString = funcToString.call(Object);
+
+/**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.8.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+function isPlainObject(value) {
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
+ return false;
+ }
+ var proto = getPrototype(value);
+ if (proto === null) {
+ return true;
+ }
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
+ funcToString.call(Ctor) == objectCtorString;
+}
+
+module.exports = isPlainObject;
diff --git a/node_modules/lodash/isRegExp.js b/node_modules/lodash/isRegExp.js
new file mode 100644
index 0000000..76c9b6e
--- /dev/null
+++ b/node_modules/lodash/isRegExp.js
@@ -0,0 +1,27 @@
+var baseIsRegExp = require('./_baseIsRegExp'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* Node.js helper references. */
+var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp;
+
+/**
+ * Checks if `value` is classified as a `RegExp` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ * @example
+ *
+ * _.isRegExp(/abc/);
+ * // => true
+ *
+ * _.isRegExp('/abc/');
+ * // => false
+ */
+var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
+
+module.exports = isRegExp;
diff --git a/node_modules/lodash/isSafeInteger.js b/node_modules/lodash/isSafeInteger.js
new file mode 100644
index 0000000..2a48526
--- /dev/null
+++ b/node_modules/lodash/isSafeInteger.js
@@ -0,0 +1,37 @@
+var isInteger = require('./isInteger');
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
+ * double precision number which isn't the result of a rounded unsafe integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
+ * @example
+ *
+ * _.isSafeInteger(3);
+ * // => true
+ *
+ * _.isSafeInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isSafeInteger(Infinity);
+ * // => false
+ *
+ * _.isSafeInteger('3');
+ * // => false
+ */
+function isSafeInteger(value) {
+ return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
+}
+
+module.exports = isSafeInteger;
diff --git a/node_modules/lodash/isSet.js b/node_modules/lodash/isSet.js
new file mode 100644
index 0000000..ab88bdf
--- /dev/null
+++ b/node_modules/lodash/isSet.js
@@ -0,0 +1,27 @@
+var baseIsSet = require('./_baseIsSet'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* Node.js helper references. */
+var nodeIsSet = nodeUtil && nodeUtil.isSet;
+
+/**
+ * Checks if `value` is classified as a `Set` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ * @example
+ *
+ * _.isSet(new Set);
+ * // => true
+ *
+ * _.isSet(new WeakSet);
+ * // => false
+ */
+var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
+
+module.exports = isSet;
diff --git a/node_modules/lodash/isString.js b/node_modules/lodash/isString.js
new file mode 100644
index 0000000..627eb9c
--- /dev/null
+++ b/node_modules/lodash/isString.js
@@ -0,0 +1,30 @@
+var baseGetTag = require('./_baseGetTag'),
+ isArray = require('./isArray'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var stringTag = '[object String]';
+
+/**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
+}
+
+module.exports = isString;
diff --git a/node_modules/lodash/isSymbol.js b/node_modules/lodash/isSymbol.js
new file mode 100644
index 0000000..dfb60b9
--- /dev/null
+++ b/node_modules/lodash/isSymbol.js
@@ -0,0 +1,29 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
+}
+
+module.exports = isSymbol;
diff --git a/node_modules/lodash/isTypedArray.js b/node_modules/lodash/isTypedArray.js
new file mode 100644
index 0000000..da3f8dd
--- /dev/null
+++ b/node_modules/lodash/isTypedArray.js
@@ -0,0 +1,27 @@
+var baseIsTypedArray = require('./_baseIsTypedArray'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* Node.js helper references. */
+var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
+
+/**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
+
+module.exports = isTypedArray;
diff --git a/node_modules/lodash/isUndefined.js b/node_modules/lodash/isUndefined.js
new file mode 100644
index 0000000..377d121
--- /dev/null
+++ b/node_modules/lodash/isUndefined.js
@@ -0,0 +1,22 @@
+/**
+ * Checks if `value` is `undefined`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ * @example
+ *
+ * _.isUndefined(void 0);
+ * // => true
+ *
+ * _.isUndefined(null);
+ * // => false
+ */
+function isUndefined(value) {
+ return value === undefined;
+}
+
+module.exports = isUndefined;
diff --git a/node_modules/lodash/isWeakMap.js b/node_modules/lodash/isWeakMap.js
new file mode 100644
index 0000000..8d36f66
--- /dev/null
+++ b/node_modules/lodash/isWeakMap.js
@@ -0,0 +1,28 @@
+var getTag = require('./_getTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var weakMapTag = '[object WeakMap]';
+
+/**
+ * Checks if `value` is classified as a `WeakMap` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
+ * @example
+ *
+ * _.isWeakMap(new WeakMap);
+ * // => true
+ *
+ * _.isWeakMap(new Map);
+ * // => false
+ */
+function isWeakMap(value) {
+ return isObjectLike(value) && getTag(value) == weakMapTag;
+}
+
+module.exports = isWeakMap;
diff --git a/node_modules/lodash/isWeakSet.js b/node_modules/lodash/isWeakSet.js
new file mode 100644
index 0000000..e628b26
--- /dev/null
+++ b/node_modules/lodash/isWeakSet.js
@@ -0,0 +1,28 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var weakSetTag = '[object WeakSet]';
+
+/**
+ * Checks if `value` is classified as a `WeakSet` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
+ * @example
+ *
+ * _.isWeakSet(new WeakSet);
+ * // => true
+ *
+ * _.isWeakSet(new Set);
+ * // => false
+ */
+function isWeakSet(value) {
+ return isObjectLike(value) && baseGetTag(value) == weakSetTag;
+}
+
+module.exports = isWeakSet;
diff --git a/node_modules/lodash/iteratee.js b/node_modules/lodash/iteratee.js
new file mode 100644
index 0000000..61b73a8
--- /dev/null
+++ b/node_modules/lodash/iteratee.js
@@ -0,0 +1,53 @@
+var baseClone = require('./_baseClone'),
+ baseIteratee = require('./_baseIteratee');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * Creates a function that invokes `func` with the arguments of the created
+ * function. If `func` is a property name, the created function returns the
+ * property value for a given element. If `func` is an array or object, the
+ * created function returns `true` for elements that contain the equivalent
+ * source properties, otherwise it returns `false`.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Util
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @returns {Function} Returns the callback.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
+ * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, _.iteratee(['user', 'fred']));
+ * // => [{ 'user': 'fred', 'age': 40 }]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, _.iteratee('user'));
+ * // => ['barney', 'fred']
+ *
+ * // Create custom iteratee shorthands.
+ * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
+ * return !_.isRegExp(func) ? iteratee(func) : function(string) {
+ * return func.test(string);
+ * };
+ * });
+ *
+ * _.filter(['abc', 'def'], /ef/);
+ * // => ['def']
+ */
+function iteratee(func) {
+ return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
+}
+
+module.exports = iteratee;
diff --git a/node_modules/lodash/join.js b/node_modules/lodash/join.js
new file mode 100644
index 0000000..45de079
--- /dev/null
+++ b/node_modules/lodash/join.js
@@ -0,0 +1,26 @@
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeJoin = arrayProto.join;
+
+/**
+ * Converts all elements in `array` into a string separated by `separator`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to convert.
+ * @param {string} [separator=','] The element separator.
+ * @returns {string} Returns the joined string.
+ * @example
+ *
+ * _.join(['a', 'b', 'c'], '~');
+ * // => 'a~b~c'
+ */
+function join(array, separator) {
+ return array == null ? '' : nativeJoin.call(array, separator);
+}
+
+module.exports = join;
diff --git a/node_modules/lodash/kebabCase.js b/node_modules/lodash/kebabCase.js
new file mode 100644
index 0000000..8a52be6
--- /dev/null
+++ b/node_modules/lodash/kebabCase.js
@@ -0,0 +1,28 @@
+var createCompounder = require('./_createCompounder');
+
+/**
+ * Converts `string` to
+ * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the kebab cased string.
+ * @example
+ *
+ * _.kebabCase('Foo Bar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('fooBar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('__FOO_BAR__');
+ * // => 'foo-bar'
+ */
+var kebabCase = createCompounder(function(result, word, index) {
+ return result + (index ? '-' : '') + word.toLowerCase();
+});
+
+module.exports = kebabCase;
diff --git a/node_modules/lodash/keyBy.js b/node_modules/lodash/keyBy.js
new file mode 100644
index 0000000..acc007a
--- /dev/null
+++ b/node_modules/lodash/keyBy.js
@@ -0,0 +1,36 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ createAggregator = require('./_createAggregator');
+
+/**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the last element responsible for generating the key. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * var array = [
+ * { 'dir': 'left', 'code': 97 },
+ * { 'dir': 'right', 'code': 100 }
+ * ];
+ *
+ * _.keyBy(array, function(o) {
+ * return String.fromCharCode(o.code);
+ * });
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
+ *
+ * _.keyBy(array, 'dir');
+ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
+ */
+var keyBy = createAggregator(function(result, value, key) {
+ baseAssignValue(result, key, value);
+});
+
+module.exports = keyBy;
diff --git a/node_modules/lodash/keys.js b/node_modules/lodash/keys.js
new file mode 100644
index 0000000..d143c71
--- /dev/null
+++ b/node_modules/lodash/keys.js
@@ -0,0 +1,37 @@
+var arrayLikeKeys = require('./_arrayLikeKeys'),
+ baseKeys = require('./_baseKeys'),
+ isArrayLike = require('./isArrayLike');
+
+/**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+function keys(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
+}
+
+module.exports = keys;
diff --git a/node_modules/lodash/keysIn.js b/node_modules/lodash/keysIn.js
new file mode 100644
index 0000000..a62308f
--- /dev/null
+++ b/node_modules/lodash/keysIn.js
@@ -0,0 +1,32 @@
+var arrayLikeKeys = require('./_arrayLikeKeys'),
+ baseKeysIn = require('./_baseKeysIn'),
+ isArrayLike = require('./isArrayLike');
+
+/**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+function keysIn(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
+}
+
+module.exports = keysIn;
diff --git a/node_modules/lodash/lang.js b/node_modules/lodash/lang.js
new file mode 100644
index 0000000..a396216
--- /dev/null
+++ b/node_modules/lodash/lang.js
@@ -0,0 +1,58 @@
+module.exports = {
+ 'castArray': require('./castArray'),
+ 'clone': require('./clone'),
+ 'cloneDeep': require('./cloneDeep'),
+ 'cloneDeepWith': require('./cloneDeepWith'),
+ 'cloneWith': require('./cloneWith'),
+ 'conformsTo': require('./conformsTo'),
+ 'eq': require('./eq'),
+ 'gt': require('./gt'),
+ 'gte': require('./gte'),
+ 'isArguments': require('./isArguments'),
+ 'isArray': require('./isArray'),
+ 'isArrayBuffer': require('./isArrayBuffer'),
+ 'isArrayLike': require('./isArrayLike'),
+ 'isArrayLikeObject': require('./isArrayLikeObject'),
+ 'isBoolean': require('./isBoolean'),
+ 'isBuffer': require('./isBuffer'),
+ 'isDate': require('./isDate'),
+ 'isElement': require('./isElement'),
+ 'isEmpty': require('./isEmpty'),
+ 'isEqual': require('./isEqual'),
+ 'isEqualWith': require('./isEqualWith'),
+ 'isError': require('./isError'),
+ 'isFinite': require('./isFinite'),
+ 'isFunction': require('./isFunction'),
+ 'isInteger': require('./isInteger'),
+ 'isLength': require('./isLength'),
+ 'isMap': require('./isMap'),
+ 'isMatch': require('./isMatch'),
+ 'isMatchWith': require('./isMatchWith'),
+ 'isNaN': require('./isNaN'),
+ 'isNative': require('./isNative'),
+ 'isNil': require('./isNil'),
+ 'isNull': require('./isNull'),
+ 'isNumber': require('./isNumber'),
+ 'isObject': require('./isObject'),
+ 'isObjectLike': require('./isObjectLike'),
+ 'isPlainObject': require('./isPlainObject'),
+ 'isRegExp': require('./isRegExp'),
+ 'isSafeInteger': require('./isSafeInteger'),
+ 'isSet': require('./isSet'),
+ 'isString': require('./isString'),
+ 'isSymbol': require('./isSymbol'),
+ 'isTypedArray': require('./isTypedArray'),
+ 'isUndefined': require('./isUndefined'),
+ 'isWeakMap': require('./isWeakMap'),
+ 'isWeakSet': require('./isWeakSet'),
+ 'lt': require('./lt'),
+ 'lte': require('./lte'),
+ 'toArray': require('./toArray'),
+ 'toFinite': require('./toFinite'),
+ 'toInteger': require('./toInteger'),
+ 'toLength': require('./toLength'),
+ 'toNumber': require('./toNumber'),
+ 'toPlainObject': require('./toPlainObject'),
+ 'toSafeInteger': require('./toSafeInteger'),
+ 'toString': require('./toString')
+};
diff --git a/node_modules/lodash/last.js b/node_modules/lodash/last.js
new file mode 100644
index 0000000..cad1eaf
--- /dev/null
+++ b/node_modules/lodash/last.js
@@ -0,0 +1,20 @@
+/**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+function last(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? array[length - 1] : undefined;
+}
+
+module.exports = last;
diff --git a/node_modules/lodash/lastIndexOf.js b/node_modules/lodash/lastIndexOf.js
new file mode 100644
index 0000000..dabfb61
--- /dev/null
+++ b/node_modules/lodash/lastIndexOf.js
@@ -0,0 +1,46 @@
+var baseFindIndex = require('./_baseFindIndex'),
+ baseIsNaN = require('./_baseIsNaN'),
+ strictLastIndexOf = require('./_strictLastIndexOf'),
+ toInteger = require('./toInteger');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max,
+ nativeMin = Math.min;
+
+/**
+ * This method is like `_.indexOf` except that it iterates over elements of
+ * `array` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.lastIndexOf([1, 2, 1, 2], 2);
+ * // => 3
+ *
+ * // Search from the `fromIndex`.
+ * _.lastIndexOf([1, 2, 1, 2], 2, 2);
+ * // => 1
+ */
+function lastIndexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = length;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
+ }
+ return value === value
+ ? strictLastIndexOf(array, value, index)
+ : baseFindIndex(array, baseIsNaN, index, true);
+}
+
+module.exports = lastIndexOf;
diff --git a/node_modules/lodash/lodash.js b/node_modules/lodash/lodash.js
new file mode 100644
index 0000000..4131e93
--- /dev/null
+++ b/node_modules/lodash/lodash.js
@@ -0,0 +1,17209 @@
+/**
+ * @license
+ * Lodash <https://lodash.com/>
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+;(function() {
+
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
+ var undefined;
+
+ /** Used as the semantic version number. */
+ var VERSION = '4.17.21';
+
+ /** Used as the size to enable large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
+
+ /** Error message constants. */
+ var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
+ FUNC_ERROR_TEXT = 'Expected a function',
+ INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
+
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+ /** Used as the maximum memoize cache size. */
+ var MAX_MEMOIZE_SIZE = 500;
+
+ /** Used as the internal argument placeholder. */
+ var PLACEHOLDER = '__lodash_placeholder__';
+
+ /** Used to compose bitmasks for cloning. */
+ var CLONE_DEEP_FLAG = 1,
+ CLONE_FLAT_FLAG = 2,
+ CLONE_SYMBOLS_FLAG = 4;
+
+ /** Used to compose bitmasks for value comparisons. */
+ var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+ /** Used to compose bitmasks for function metadata. */
+ var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_BOUND_FLAG = 4,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_CURRY_RIGHT_FLAG = 16,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_PARTIAL_RIGHT_FLAG = 64,
+ WRAP_ARY_FLAG = 128,
+ WRAP_REARG_FLAG = 256,
+ WRAP_FLIP_FLAG = 512;
+
+ /** Used as default options for `_.truncate`. */
+ var DEFAULT_TRUNC_LENGTH = 30,
+ DEFAULT_TRUNC_OMISSION = '...';
+
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
+ var HOT_COUNT = 800,
+ HOT_SPAN = 16;
+
+ /** Used to indicate the type of lazy iteratees. */
+ var LAZY_FILTER_FLAG = 1,
+ LAZY_MAP_FLAG = 2,
+ LAZY_WHILE_FLAG = 3;
+
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0,
+ MAX_SAFE_INTEGER = 9007199254740991,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
+
+ /** Used as references for the maximum length and index of an array. */
+ var MAX_ARRAY_LENGTH = 4294967295,
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
+ HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+
+ /** Used to associate wrap methods with their bit flags. */
+ var wrapFlags = [
+ ['ary', WRAP_ARY_FLAG],
+ ['bind', WRAP_BIND_FLAG],
+ ['bindKey', WRAP_BIND_KEY_FLAG],
+ ['curry', WRAP_CURRY_FLAG],
+ ['curryRight', WRAP_CURRY_RIGHT_FLAG],
+ ['flip', WRAP_FLIP_FLAG],
+ ['partial', WRAP_PARTIAL_FLAG],
+ ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
+ ['rearg', WRAP_REARG_FLAG]
+ ];
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ asyncTag = '[object AsyncFunction]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ domExcTag = '[object DOMException]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ nullTag = '[object Null]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ proxyTag = '[object Proxy]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ undefinedTag = '[object Undefined]',
+ weakMapTag = '[object WeakMap]',
+ weakSetTag = '[object WeakSet]';
+
+ var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+ /** Used to match empty string literals in compiled template source. */
+ var reEmptyStringLeading = /\b__p \+= '';/g,
+ reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
+ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
+
+ /** Used to match HTML entities and HTML characters. */
+ var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
+ reUnescapedHtml = /[&<>"']/g,
+ reHasEscapedHtml = RegExp(reEscapedHtml.source),
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+ /** Used to match template delimiters. */
+ var reEscape = /<%-([\s\S]+?)%>/g,
+ reEvaluate = /<%([\s\S]+?)%>/g,
+ reInterpolate = /<%=([\s\S]+?)%>/g;
+
+ /** Used to match property names within property paths. */
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+
+ /**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
+ reHasRegExpChar = RegExp(reRegExpChar.source);
+
+ /** Used to match leading whitespace. */
+ var reTrimStart = /^\s+/;
+
+ /** Used to match a single whitespace character. */
+ var reWhitespace = /\s/;
+
+ /** Used to match wrap detail comments. */
+ var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
+ reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
+ reSplitDetails = /,? & /;
+
+ /** Used to match words composed of alphanumeric characters. */
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
+
+ /**
+ * Used to validate the `validate` option in `_.template` variable.
+ *
+ * Forbids characters which could potentially change the meaning of the function argument definition:
+ * - "()," (modification of function parameters)
+ * - "=" (default value)
+ * - "[]{}" (destructuring of function parameters)
+ * - "/" (beginning of a comment)
+ * - whitespace
+ */
+ var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
+
+ /** Used to match backslashes in property paths. */
+ var reEscapeChar = /\\(\\)?/g;
+
+ /**
+ * Used to match
+ * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
+ */
+ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
+
+ /** Used to match `RegExp` flags from their coerced string values. */
+ var reFlags = /\w*$/;
+
+ /** Used to detect bad signed hexadecimal string values. */
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+ /** Used to detect binary string values. */
+ var reIsBinary = /^0b[01]+$/i;
+
+ /** Used to detect host constructors (Safari). */
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+ /** Used to detect octal string values. */
+ var reIsOctal = /^0o[0-7]+$/i;
+
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
+
+ /** Used to ensure capturing order of template delimiters. */
+ var reNoMatch = /($^)/;
+
+ /** Used to match unescaped characters in compiled string literals. */
+ var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
+
+ /** Used to compose unicode character classes. */
+ var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsDingbatRange = '\\u2700-\\u27bf',
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
+ rsPunctuationRange = '\\u2000-\\u206f',
+ rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
+ rsVarRange = '\\ufe0e\\ufe0f',
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
+
+ /** Used to compose unicode capture groups. */
+ var rsApos = "['\u2019]",
+ rsAstral = '[' + rsAstralRange + ']',
+ rsBreak = '[' + rsBreakRange + ']',
+ rsCombo = '[' + rsComboRange + ']',
+ rsDigits = '\\d+',
+ rsDingbat = '[' + rsDingbatRange + ']',
+ rsLower = '[' + rsLowerRange + ']',
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsUpper = '[' + rsUpperRange + ']',
+ rsZWJ = '\\u200d';
+
+ /** Used to compose unicode regexes. */
+ var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
+ rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
+ rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
+ rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
+ reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
+ rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
+
+ /** Used to match apostrophes. */
+ var reApos = RegExp(rsApos, 'g');
+
+ /**
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
+ */
+ var reComboMark = RegExp(rsCombo, 'g');
+
+ /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
+ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
+
+ /** Used to match complex or compound words. */
+ var reUnicodeWord = RegExp([
+ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
+ rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
+ rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
+ rsUpper + '+' + rsOptContrUpper,
+ rsOrdUpper,
+ rsOrdLower,
+ rsDigits,
+ rsEmoji
+ ].join('|'), 'g');
+
+ /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
+ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
+
+ /** Used to detect strings that need a more robust regexp to match words. */
+ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
+
+ /** Used to assign default `context` object properties. */
+ var contextProps = [
+ 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
+ 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
+ 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
+ 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
+ '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
+ ];
+
+ /** Used to make template sourceURLs easier to identify. */
+ var templateCounter = -1;
+
+ /** Used to identify `toStringTag` values of typed arrays. */
+ var typedArrayTags = {};
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+ typedArrayTags[uint32Tag] = true;
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
+ typedArrayTags[weakMapTag] = false;
+
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
+ var cloneableTags = {};
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
+ cloneableTags[weakMapTag] = false;
+
+ /** Used to map Latin Unicode letters to basic Latin letters. */
+ var deburredLetters = {
+ // Latin-1 Supplement block.
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
+ '\xc7': 'C', '\xe7': 'c',
+ '\xd0': 'D', '\xf0': 'd',
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
+ '\xd1': 'N', '\xf1': 'n',
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
+ '\xc6': 'Ae', '\xe6': 'ae',
+ '\xde': 'Th', '\xfe': 'th',
+ '\xdf': 'ss',
+ // Latin Extended-A block.
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
+ '\u0134': 'J', '\u0135': 'j',
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
+ '\u0174': 'W', '\u0175': 'w',
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
+ '\u0132': 'IJ', '\u0133': 'ij',
+ '\u0152': 'Oe', '\u0153': 'oe',
+ '\u0149': "'n", '\u017f': 's'
+ };
+
+ /** Used to map characters to HTML entities. */
+ var htmlEscapes = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;'
+ };
+
+ /** Used to map HTML entities to characters. */
+ var htmlUnescapes = {
+ '&amp;': '&',
+ '&lt;': '<',
+ '&gt;': '>',
+ '&quot;': '"',
+ '&#39;': "'"
+ };
+
+ /** Used to escape characters for inclusion in compiled string literals. */
+ var stringEscapes = {
+ '\\': '\\',
+ "'": "'",
+ '\n': 'n',
+ '\r': 'r',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ /** Built-in method references without a dependency on `root`. */
+ var freeParseFloat = parseFloat,
+ freeParseInt = parseInt;
+
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+ /** Detect free variable `self`. */
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+ /** Used as a reference to the global object. */
+ var root = freeGlobal || freeSelf || Function('return this')();
+
+ /** Detect free variable `exports`. */
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+ /** Detect free variable `module`. */
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+ /** Detect the popular CommonJS extension `module.exports`. */
+ var moduleExports = freeModule && freeModule.exports === freeExports;
+
+ /** Detect free variable `process` from Node.js. */
+ var freeProcess = moduleExports && freeGlobal.process;
+
+ /** Used to access faster Node.js helpers. */
+ var nodeUtil = (function() {
+ try {
+ // Use `util.types` for Node.js 10+.
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
+
+ if (types) {
+ return types;
+ }
+
+ // Legacy `process.binding('util')` for Node.js < 10.
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
+ } catch (e) {}
+ }());
+
+ /* Node.js helper references. */
+ var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
+ nodeIsDate = nodeUtil && nodeUtil.isDate,
+ nodeIsMap = nodeUtil && nodeUtil.isMap,
+ nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
+ nodeIsSet = nodeUtil && nodeUtil.isSet,
+ nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+ function apply(func, thisArg, args) {
+ switch (args.length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
+ }
+ return func.apply(thisArg, args);
+ }
+
+ /**
+ * A specialized version of `baseAggregator` for arrays.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function arrayAggregator(array, setter, iteratee, accumulator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ var value = array[index];
+ setter(accumulator, value, iteratee(value), array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.forEachRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEachRight(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+
+ while (length--) {
+ if (iteratee(array[length], length, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.every` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ */
+ function arrayEvery(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (!predicate(array[index], index, array)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * A specialized version of `_.filter` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function arrayFilter(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.includes` for arrays without support for
+ * specifying an index to search from.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludes(array, value) {
+ var length = array == null ? 0 : array.length;
+ return !!length && baseIndexOf(array, value, 0) > -1;
+ }
+
+ /**
+ * This function is like `arrayIncludes` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludesWith(array, value, comparator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (comparator(value, array[index])) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+ }
+
+ /**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
+
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ if (initAccum && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.reduceRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the last element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduceRight(array, iteratee, accumulator, initAccum) {
+ var length = array == null ? 0 : array.length;
+ if (initAccum && length) {
+ accumulator = array[--length];
+ }
+ while (length--) {
+ accumulator = iteratee(accumulator, array[length], length, array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function arraySome(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Gets the size of an ASCII `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+ var asciiSize = baseProperty('length');
+
+ /**
+ * Converts an ASCII `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function asciiToArray(string) {
+ return string.split('');
+ }
+
+ /**
+ * Splits an ASCII `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+ function asciiWords(string) {
+ return string.match(reAsciiWord) || [];
+ }
+
+ /**
+ * The base implementation of methods like `_.findKey` and `_.findLastKey`,
+ * without support for iteratee shorthands, which iterates over `collection`
+ * using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the found element or its key, else `undefined`.
+ */
+ function baseFindKey(collection, predicate, eachFunc) {
+ var result;
+ eachFunc(collection, function(value, key, collection) {
+ if (predicate(value, key, collection)) {
+ result = key;
+ return false;
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 1 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseIndexOf(array, value, fromIndex) {
+ return value === value
+ ? strictIndexOf(array, value, fromIndex)
+ : baseFindIndex(array, baseIsNaN, fromIndex);
+ }
+
+ /**
+ * This function is like `baseIndexOf` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseIndexOfWith(array, value, fromIndex, comparator) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (comparator(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.isNaN` without support for number objects.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ */
+ function baseIsNaN(value) {
+ return value !== value;
+ }
+
+ /**
+ * The base implementation of `_.mean` and `_.meanBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the mean.
+ */
+ function baseMean(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+ return length ? (baseSum(array, iteratee) / length) : NAN;
+ }
+
+ /**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.propertyOf` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function basePropertyOf(object) {
+ return function(key) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
+ * sort order of `array` and replaces criteria objects with their corresponding
+ * values.
+ *
+ * @private
+ * @param {Array} array The array to sort.
+ * @param {Function} comparer The function to define sort order.
+ * @returns {Array} Returns `array`.
+ */
+ function baseSortBy(array, comparer) {
+ var length = array.length;
+
+ array.sort(comparer);
+ while (length--) {
+ array[length] = array[length].value;
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.sum` and `_.sumBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the sum.
+ */
+ function baseSum(array, iteratee) {
+ var result,
+ index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var current = iteratee(array[index]);
+ if (current !== undefined) {
+ result = result === undefined ? current : (result + current);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+ function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
+ * of key-value pairs for `object` corresponding to the property names of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the key-value pairs.
+ */
+ function baseToPairs(object, props) {
+ return arrayMap(props, function(key) {
+ return [key, object[key]];
+ });
+ }
+
+ /**
+ * The base implementation of `_.trim`.
+ *
+ * @private
+ * @param {string} string The string to trim.
+ * @returns {string} Returns the trimmed string.
+ */
+ function baseTrim(string) {
+ return string
+ ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
+ : string;
+ }
+
+ /**
+ * The base implementation of `_.unary` without support for storing metadata.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ */
+ function baseUnary(func) {
+ return function(value) {
+ return func(value);
+ };
+ }
+
+ /**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+ function baseValues(object, props) {
+ return arrayMap(props, function(key) {
+ return object[key];
+ });
+ }
+
+ /**
+ * Checks if a `cache` value for `key` exists.
+ *
+ * @private
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function cacheHas(cache, key) {
+ return cache.has(key);
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the first unmatched string symbol.
+ */
+ function charsStartIndex(strSymbols, chrSymbols) {
+ var index = -1,
+ length = strSymbols.length;
+
+ while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the last unmatched string symbol.
+ */
+ function charsEndIndex(strSymbols, chrSymbols) {
+ var index = strSymbols.length;
+
+ while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+ }
+
+ /**
+ * Gets the number of `placeholder` occurrences in `array`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} placeholder The placeholder to search for.
+ * @returns {number} Returns the placeholder count.
+ */
+ function countHolders(array, placeholder) {
+ var length = array.length,
+ result = 0;
+
+ while (length--) {
+ if (array[length] === placeholder) {
+ ++result;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
+ * letters to basic Latin letters.
+ *
+ * @private
+ * @param {string} letter The matched letter to deburr.
+ * @returns {string} Returns the deburred letter.
+ */
+ var deburrLetter = basePropertyOf(deburredLetters);
+
+ /**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ var escapeHtmlChar = basePropertyOf(htmlEscapes);
+
+ /**
+ * Used by `_.template` to escape characters for inclusion in compiled string literals.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ function escapeStringChar(chr) {
+ return '\\' + stringEscapes[chr];
+ }
+
+ /**
+ * Gets the value at `key` of `object`.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+ function getValue(object, key) {
+ return object == null ? undefined : object[key];
+ }
+
+ /**
+ * Checks if `string` contains Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a symbol is found, else `false`.
+ */
+ function hasUnicode(string) {
+ return reHasUnicode.test(string);
+ }
+
+ /**
+ * Checks if `string` contains a word composed of Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
+ */
+ function hasUnicodeWord(string) {
+ return reHasUnicodeWord.test(string);
+ }
+
+ /**
+ * Converts `iterator` to an array.
+ *
+ * @private
+ * @param {Object} iterator The iterator to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function iteratorToArray(iterator) {
+ var data,
+ result = [];
+
+ while (!(data = iterator.next()).done) {
+ result.push(data.value);
+ }
+ return result;
+ }
+
+ /**
+ * Converts `map` to its key-value pairs.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the key-value pairs.
+ */
+ function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
+
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+ }
+
+ /**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+ }
+
+ /**
+ * Replaces all `placeholder` elements in `array` with an internal placeholder
+ * and returns an array of their indexes.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {*} placeholder The placeholder to replace.
+ * @returns {Array} Returns the new array of placeholder indexes.
+ */
+ function replaceHolders(array, placeholder) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value === placeholder || value === PLACEHOLDER) {
+ array[index] = PLACEHOLDER;
+ result[resIndex++] = index;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+ function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+ }
+
+ /**
+ * Converts `set` to its value-value pairs.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the value-value pairs.
+ */
+ function setToPairs(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = [value, value];
+ });
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.indexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function strictIndexOf(array, value, fromIndex) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * A specialized version of `_.lastIndexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function strictLastIndexOf(array, value, fromIndex) {
+ var index = fromIndex + 1;
+ while (index--) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return index;
+ }
+
+ /**
+ * Gets the number of symbols in `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the string size.
+ */
+ function stringSize(string) {
+ return hasUnicode(string)
+ ? unicodeSize(string)
+ : asciiSize(string);
+ }
+
+ /**
+ * Converts `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function stringToArray(string) {
+ return hasUnicode(string)
+ ? unicodeToArray(string)
+ : asciiToArray(string);
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
+ * character of `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the index of the last non-whitespace character.
+ */
+ function trimmedEndIndex(string) {
+ var index = string.length;
+
+ while (index-- && reWhitespace.test(string.charAt(index))) {}
+ return index;
+ }
+
+ /**
+ * Used by `_.unescape` to convert HTML entities to characters.
+ *
+ * @private
+ * @param {string} chr The matched character to unescape.
+ * @returns {string} Returns the unescaped character.
+ */
+ var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
+
+ /**
+ * Gets the size of a Unicode `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+ function unicodeSize(string) {
+ var result = reUnicode.lastIndex = 0;
+ while (reUnicode.test(string)) {
+ ++result;
+ }
+ return result;
+ }
+
+ /**
+ * Converts a Unicode `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function unicodeToArray(string) {
+ return string.match(reUnicode) || [];
+ }
+
+ /**
+ * Splits a Unicode `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+ function unicodeWords(string) {
+ return string.match(reUnicodeWord) || [];
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Create a new pristine `lodash` function using the `context` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Util
+ * @param {Object} [context=root] The context object.
+ * @returns {Function} Returns a new `lodash` function.
+ * @example
+ *
+ * _.mixin({ 'foo': _.constant('foo') });
+ *
+ * var lodash = _.runInContext();
+ * lodash.mixin({ 'bar': lodash.constant('bar') });
+ *
+ * _.isFunction(_.foo);
+ * // => true
+ * _.isFunction(_.bar);
+ * // => false
+ *
+ * lodash.isFunction(lodash.foo);
+ * // => false
+ * lodash.isFunction(lodash.bar);
+ * // => true
+ *
+ * // Create a suped-up `defer` in Node.js.
+ * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
+ */
+ var runInContext = (function runInContext(context) {
+ context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
+
+ /** Built-in constructor references. */
+ var Array = context.Array,
+ Date = context.Date,
+ Error = context.Error,
+ Function = context.Function,
+ Math = context.Math,
+ Object = context.Object,
+ RegExp = context.RegExp,
+ String = context.String,
+ TypeError = context.TypeError;
+
+ /** Used for built-in method references. */
+ var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+ /** Used to detect overreaching core-js shims. */
+ var coreJsData = context['__core-js_shared__'];
+
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = funcProto.toString;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to generate unique IDs. */
+ var idCounter = 0;
+
+ /** Used to detect methods masquerading as native. */
+ var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+ }());
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var nativeObjectToString = objectProto.toString;
+
+ /** Used to infer the `Object` constructor. */
+ var objectCtorString = funcToString.call(Object);
+
+ /** Used to restore the original `_` reference in `_.noConflict`. */
+ var oldDash = root._;
+
+ /** Used to detect if a method is native. */
+ var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
+
+ /** Built-in value references. */
+ var Buffer = moduleExports ? context.Buffer : undefined,
+ Symbol = context.Symbol,
+ Uint8Array = context.Uint8Array,
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
+ getPrototype = overArg(Object.getPrototypeOf, Object),
+ objectCreate = Object.create,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
+ splice = arrayProto.splice,
+ spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
+ symIterator = Symbol ? Symbol.iterator : undefined,
+ symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+ var defineProperty = (function() {
+ try {
+ var func = getNative(Object, 'defineProperty');
+ func({}, '', {});
+ return func;
+ } catch (e) {}
+ }());
+
+ /** Mocked built-ins. */
+ var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
+ ctxNow = Date && Date.now !== root.Date.now && Date.now,
+ ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
+
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeCeil = Math.ceil,
+ nativeFloor = Math.floor,
+ nativeGetSymbols = Object.getOwnPropertySymbols,
+ nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
+ nativeIsFinite = context.isFinite,
+ nativeJoin = arrayProto.join,
+ nativeKeys = overArg(Object.keys, Object),
+ nativeMax = Math.max,
+ nativeMin = Math.min,
+ nativeNow = Date.now,
+ nativeParseInt = context.parseInt,
+ nativeRandom = Math.random,
+ nativeReverse = arrayProto.reverse;
+
+ /* Built-in method references that are verified to be native. */
+ var DataView = getNative(context, 'DataView'),
+ Map = getNative(context, 'Map'),
+ Promise = getNative(context, 'Promise'),
+ Set = getNative(context, 'Set'),
+ WeakMap = getNative(context, 'WeakMap'),
+ nativeCreate = getNative(Object, 'create');
+
+ /** Used to store function metadata. */
+ var metaMap = WeakMap && new WeakMap;
+
+ /** Used to lookup unminified function names. */
+ var realNames = {};
+
+ /** Used to detect maps, sets, and weakmaps. */
+ var dataViewCtorString = toSource(DataView),
+ mapCtorString = toSource(Map),
+ promiseCtorString = toSource(Promise),
+ setCtorString = toSource(Set),
+ weakMapCtorString = toSource(WeakMap);
+
+ /** Used to convert symbols to primitives and strings. */
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` object which wraps `value` to enable implicit method
+ * chain sequences. Methods that operate on and return arrays, collections,
+ * and functions can be chained together. Methods that retrieve a single value
+ * or may return a primitive value will automatically end the chain sequence
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
+ * with `_#value`.
+ *
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
+ * enabled using `_.chain`.
+ *
+ * The execution of chained methods is lazy, that is, it's deferred until
+ * `_#value` is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion.
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
+ * the creation of intermediate arrays and can greatly reduce the number of
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
+ * fusion if the section is applied to an array and iteratees accept only
+ * one argument. The heuristic for whether a section qualifies for shortcut
+ * fusion is subject to change.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
+ * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
+ * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
+ * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
+ * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
+ * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
+ * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
+ * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
+ * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
+ * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
+ * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
+ * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
+ * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
+ * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
+ * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
+ * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
+ * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
+ * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
+ * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
+ * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
+ * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
+ * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
+ * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
+ * `upperFirst`, `value`, and `words`
+ *
+ * @name _
+ * @constructor
+ * @category Seq
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // Returns an unwrapped value.
+ * wrapped.reduce(_.add);
+ * // => 6
+ *
+ * // Returns a wrapped value.
+ * var squares = wrapped.map(square);
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+ function lodash(value) {
+ if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
+ if (value instanceof LodashWrapper) {
+ return value;
+ }
+ if (hasOwnProperty.call(value, '__wrapped__')) {
+ return wrapperClone(value);
+ }
+ }
+ return new LodashWrapper(value);
+ }
+
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!isObject(proto)) {
+ return {};
+ }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+ }());
+
+ /**
+ * The function whose prototype chain sequence wrappers inherit from.
+ *
+ * @private
+ */
+ function baseLodash() {
+ // No operation performed.
+ }
+
+ /**
+ * The base constructor for creating `lodash` wrapper objects.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
+ */
+ function LodashWrapper(value, chainAll) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__chain__ = !!chainAll;
+ this.__index__ = 0;
+ this.__values__ = undefined;
+ }
+
+ /**
+ * By default, the template delimiters used by lodash are like those in
+ * embedded Ruby (ERB) as well as ES2015 template strings. Change the
+ * following template settings to use alternative delimiters.
+ *
+ * @static
+ * @memberOf _
+ * @type {Object}
+ */
+ lodash.templateSettings = {
+
+ /**
+ * Used to detect `data` property values to be HTML-escaped.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'escape': reEscape,
+
+ /**
+ * Used to detect code to be evaluated.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'evaluate': reEvaluate,
+
+ /**
+ * Used to detect `data` property values to inject.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'interpolate': reInterpolate,
+
+ /**
+ * Used to reference the data object in the template text.
+ *
+ * @memberOf _.templateSettings
+ * @type {string}
+ */
+ 'variable': '',
+
+ /**
+ * Used to import variables into the compiled template.
+ *
+ * @memberOf _.templateSettings
+ * @type {Object}
+ */
+ 'imports': {
+
+ /**
+ * A reference to the `lodash` function.
+ *
+ * @memberOf _.templateSettings.imports
+ * @type {Function}
+ */
+ '_': lodash
+ }
+ };
+
+ // Ensure wrappers are instances of `baseLodash`.
+ lodash.prototype = baseLodash.prototype;
+ lodash.prototype.constructor = lodash;
+
+ LodashWrapper.prototype = baseCreate(baseLodash.prototype);
+ LodashWrapper.prototype.constructor = LodashWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
+ *
+ * @private
+ * @constructor
+ * @param {*} value The value to wrap.
+ */
+ function LazyWrapper(value) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__dir__ = 1;
+ this.__filtered__ = false;
+ this.__iteratees__ = [];
+ this.__takeCount__ = MAX_ARRAY_LENGTH;
+ this.__views__ = [];
+ }
+
+ /**
+ * Creates a clone of the lazy wrapper object.
+ *
+ * @private
+ * @name clone
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the cloned `LazyWrapper` object.
+ */
+ function lazyClone() {
+ var result = new LazyWrapper(this.__wrapped__);
+ result.__actions__ = copyArray(this.__actions__);
+ result.__dir__ = this.__dir__;
+ result.__filtered__ = this.__filtered__;
+ result.__iteratees__ = copyArray(this.__iteratees__);
+ result.__takeCount__ = this.__takeCount__;
+ result.__views__ = copyArray(this.__views__);
+ return result;
+ }
+
+ /**
+ * Reverses the direction of lazy iteration.
+ *
+ * @private
+ * @name reverse
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the new reversed `LazyWrapper` object.
+ */
+ function lazyReverse() {
+ if (this.__filtered__) {
+ var result = new LazyWrapper(this);
+ result.__dir__ = -1;
+ result.__filtered__ = true;
+ } else {
+ result = this.clone();
+ result.__dir__ *= -1;
+ }
+ return result;
+ }
+
+ /**
+ * Extracts the unwrapped value from its lazy wrapper.
+ *
+ * @private
+ * @name value
+ * @memberOf LazyWrapper
+ * @returns {*} Returns the unwrapped value.
+ */
+ function lazyValue() {
+ var array = this.__wrapped__.value(),
+ dir = this.__dir__,
+ isArr = isArray(array),
+ isRight = dir < 0,
+ arrLength = isArr ? array.length : 0,
+ view = getView(0, arrLength, this.__views__),
+ start = view.start,
+ end = view.end,
+ length = end - start,
+ index = isRight ? end : (start - 1),
+ iteratees = this.__iteratees__,
+ iterLength = iteratees.length,
+ resIndex = 0,
+ takeCount = nativeMin(length, this.__takeCount__);
+
+ if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
+ return baseWrapperValue(array, this.__actions__);
+ }
+ var result = [];
+
+ outer:
+ while (length-- && resIndex < takeCount) {
+ index += dir;
+
+ var iterIndex = -1,
+ value = array[index];
+
+ while (++iterIndex < iterLength) {
+ var data = iteratees[iterIndex],
+ iteratee = data.iteratee,
+ type = data.type,
+ computed = iteratee(value);
+
+ if (type == LAZY_MAP_FLAG) {
+ value = computed;
+ } else if (!computed) {
+ if (type == LAZY_FILTER_FLAG) {
+ continue outer;
+ } else {
+ break outer;
+ }
+ }
+ }
+ result[resIndex++] = value;
+ }
+ return result;
+ }
+
+ // Ensure `LazyWrapper` is an instance of `baseLodash`.
+ LazyWrapper.prototype = baseCreate(baseLodash.prototype);
+ LazyWrapper.prototype.constructor = LazyWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Hash(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+ function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ this.size = 0;
+ }
+
+ /**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function hashDelete(key) {
+ var result = this.has(key) && delete this.__data__[key];
+ this.size -= result ? 1 : 0;
+ return result;
+ }
+
+ /**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+ }
+
+ /**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
+ }
+
+ /**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+ function hashSet(key, value) {
+ var data = this.__data__;
+ this.size += this.has(key) ? 0 : 1;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+ }
+
+ // Add methods to `Hash`.
+ Hash.prototype.clear = hashClear;
+ Hash.prototype['delete'] = hashDelete;
+ Hash.prototype.get = hashGet;
+ Hash.prototype.has = hashHas;
+ Hash.prototype.set = hashSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function ListCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+ function listCacheClear() {
+ this.__data__ = [];
+ this.size = 0;
+ }
+
+ /**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ --this.size;
+ return true;
+ }
+
+ /**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ return index < 0 ? undefined : data[index][1];
+ }
+
+ /**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+ }
+
+ /**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+ function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ ++this.size;
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+ }
+
+ // Add methods to `ListCache`.
+ ListCache.prototype.clear = listCacheClear;
+ ListCache.prototype['delete'] = listCacheDelete;
+ ListCache.prototype.get = listCacheGet;
+ ListCache.prototype.has = listCacheHas;
+ ListCache.prototype.set = listCacheSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function MapCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+ function mapCacheClear() {
+ this.size = 0;
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
+ }
+
+ /**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function mapCacheDelete(key) {
+ var result = getMapData(this, key)['delete'](key);
+ this.size -= result ? 1 : 0;
+ return result;
+ }
+
+ /**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+ }
+
+ /**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+ }
+
+ /**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+ function mapCacheSet(key, value) {
+ var data = getMapData(this, key),
+ size = data.size;
+
+ data.set(key, value);
+ this.size += data.size == size ? 0 : 1;
+ return this;
+ }
+
+ // Add methods to `MapCache`.
+ MapCache.prototype.clear = mapCacheClear;
+ MapCache.prototype['delete'] = mapCacheDelete;
+ MapCache.prototype.get = mapCacheGet;
+ MapCache.prototype.has = mapCacheHas;
+ MapCache.prototype.set = mapCacheSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ *
+ * Creates an array cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+ function SetCache(values) {
+ var index = -1,
+ length = values == null ? 0 : values.length;
+
+ this.__data__ = new MapCache;
+ while (++index < length) {
+ this.add(values[index]);
+ }
+ }
+
+ /**
+ * Adds `value` to the array cache.
+ *
+ * @private
+ * @name add
+ * @memberOf SetCache
+ * @alias push
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache instance.
+ */
+ function setCacheAdd(value) {
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
+ }
+
+ /**
+ * Checks if `value` is in the array cache.
+ *
+ * @private
+ * @name has
+ * @memberOf SetCache
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `true` if `value` is found, else `false`.
+ */
+ function setCacheHas(value) {
+ return this.__data__.has(value);
+ }
+
+ // Add methods to `SetCache`.
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+ SetCache.prototype.has = setCacheHas;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Stack(entries) {
+ var data = this.__data__ = new ListCache(entries);
+ this.size = data.size;
+ }
+
+ /**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+ function stackClear() {
+ this.__data__ = new ListCache;
+ this.size = 0;
+ }
+
+ /**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function stackDelete(key) {
+ var data = this.__data__,
+ result = data['delete'](key);
+
+ this.size = data.size;
+ return result;
+ }
+
+ /**
+ * Gets the stack value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function stackGet(key) {
+ return this.__data__.get(key);
+ }
+
+ /**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function stackHas(key) {
+ return this.__data__.has(key);
+ }
+
+ /**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache instance.
+ */
+ function stackSet(key, value) {
+ var data = this.__data__;
+ if (data instanceof ListCache) {
+ var pairs = data.__data__;
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
+ pairs.push([key, value]);
+ this.size = ++data.size;
+ return this;
+ }
+ data = this.__data__ = new MapCache(pairs);
+ }
+ data.set(key, value);
+ this.size = data.size;
+ return this;
+ }
+
+ // Add methods to `Stack`.
+ Stack.prototype.clear = stackClear;
+ Stack.prototype['delete'] = stackDelete;
+ Stack.prototype.get = stackGet;
+ Stack.prototype.has = stackHas;
+ Stack.prototype.set = stackSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array of the enumerable property names of the array-like `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @param {boolean} inherited Specify returning inherited property names.
+ * @returns {Array} Returns the array of property names.
+ */
+ function arrayLikeKeys(value, inherited) {
+ var isArr = isArray(value),
+ isArg = !isArr && isArguments(value),
+ isBuff = !isArr && !isArg && isBuffer(value),
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
+ skipIndexes = isArr || isArg || isBuff || isType,
+ result = skipIndexes ? baseTimes(value.length, String) : [],
+ length = result.length;
+
+ for (var key in value) {
+ if ((inherited || hasOwnProperty.call(value, key)) &&
+ !(skipIndexes && (
+ // Safari 9 has enumerable `arguments.length` in strict mode.
+ key == 'length' ||
+ // Node.js 0.10 has enumerable non-index properties on buffers.
+ (isBuff && (key == 'offset' || key == 'parent')) ||
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
+ // Skip index properties.
+ isIndex(key, length)
+ ))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.sample` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @returns {*} Returns the random element.
+ */
+ function arraySample(array) {
+ var length = array.length;
+ return length ? array[baseRandom(0, length - 1)] : undefined;
+ }
+
+ /**
+ * A specialized version of `_.sampleSize` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+ function arraySampleSize(array, n) {
+ return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
+ }
+
+ /**
+ * A specialized version of `_.shuffle` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+ function arrayShuffle(array) {
+ return shuffleSelf(copyArray(array));
+ }
+
+ /**
+ * This function is like `assignValue` except that it doesn't assign
+ * `undefined` values.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignMergeValue(object, key, value) {
+ if ((value !== undefined && !eq(object[key], value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+ }
+
+ /**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+ }
+
+ /**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Aggregates elements of `collection` on `accumulator` with keys transformed
+ * by `iteratee` and values set by `setter`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function baseAggregator(collection, setter, iteratee, accumulator) {
+ baseEach(collection, function(value, key, collection) {
+ setter(accumulator, value, iteratee(value), collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssign(object, source) {
+ return object && copyObject(source, keys(source), object);
+ }
+
+ /**
+ * The base implementation of `_.assignIn` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssignIn(object, source) {
+ return object && copyObject(source, keysIn(source), object);
+ }
+
+ /**
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function baseAssignValue(object, key, value) {
+ if (key == '__proto__' && defineProperty) {
+ defineProperty(object, key, {
+ 'configurable': true,
+ 'enumerable': true,
+ 'value': value,
+ 'writable': true
+ });
+ } else {
+ object[key] = value;
+ }
+ }
+
+ /**
+ * The base implementation of `_.at` without support for individual paths.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Array} Returns the picked elements.
+ */
+ function baseAt(object, paths) {
+ var index = -1,
+ length = paths.length,
+ result = Array(length),
+ skip = object == null;
+
+ while (++index < length) {
+ result[index] = skip ? undefined : get(object, paths[index]);
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.clamp` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ */
+ function baseClamp(number, lower, upper) {
+ if (number === number) {
+ if (upper !== undefined) {
+ number = number <= upper ? number : upper;
+ }
+ if (lower !== undefined) {
+ number = number >= lower ? number : lower;
+ }
+ }
+ return number;
+ }
+
+ /**
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Deep clone
+ * 2 - Flatten inherited properties
+ * 4 - Clone symbols
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+ function baseClone(value, bitmask, customizer, key, object, stack) {
+ var result,
+ isDeep = bitmask & CLONE_DEEP_FLAG,
+ isFlat = bitmask & CLONE_FLAT_FLAG,
+ isFull = bitmask & CLONE_SYMBOLS_FLAG;
+
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return copyArray(value, result);
+ }
+ } else {
+ var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;
+
+ if (isBuffer(value)) {
+ return cloneBuffer(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ result = (isFlat || isFunc) ? {} : initCloneObject(value);
+ if (!isDeep) {
+ return isFlat
+ ? copySymbolsIn(value, baseAssignIn(result, value))
+ : copySymbols(value, baseAssign(result, value));
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = initCloneByTag(value, tag, isDeep);
+ }
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
+ }
+ stack.set(value, result);
+
+ if (isSet(value)) {
+ value.forEach(function(subValue) {
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
+ });
+ } else if (isMap(value)) {
+ value.forEach(function(subValue, key) {
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ }
+
+ var keysFunc = isFull
+ ? (isFlat ? getAllKeysIn : getAllKeys)
+ : (isFlat ? keysIn : keys);
+
+ var props = isArr ? undefined : keysFunc(value);
+ arrayEach(props || value, function(subValue, key) {
+ if (props) {
+ key = subValue;
+ subValue = value[key];
+ }
+ // Recursively populate clone (susceptible to call stack limits).
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.conforms` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseConforms(source) {
+ var props = keys(source);
+ return function(object) {
+ return baseConformsTo(object, source, props);
+ };
+ }
+
+ /**
+ * The base implementation of `_.conformsTo` which accepts `props` to check.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+ */
+ function baseConformsTo(object, source, props) {
+ var length = props.length;
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (length--) {
+ var key = props[length],
+ predicate = source[key],
+ value = object[key];
+
+ if ((value === undefined && !(key in object)) || !predicate(value)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The base implementation of `_.delay` and `_.defer` which accepts `args`
+ * to provide to `func`.
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {Array} args The arguments to provide to `func`.
+ * @returns {number|Object} Returns the timer id or timeout object.
+ */
+ function baseDelay(func, wait, args) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
+ }
+
+ /**
+ * The base implementation of methods like `_.difference` without support
+ * for excluding multiple arrays or iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Array} values The values to exclude.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ */
+ function baseDifference(array, values, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ isCommon = true,
+ length = array.length,
+ result = [],
+ valuesLength = values.length;
+
+ if (!length) {
+ return result;
+ }
+ if (iteratee) {
+ values = arrayMap(values, baseUnary(iteratee));
+ }
+ if (comparator) {
+ includes = arrayIncludesWith;
+ isCommon = false;
+ }
+ else if (values.length >= LARGE_ARRAY_SIZE) {
+ includes = cacheHas;
+ isCommon = false;
+ values = new SetCache(values);
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee == null ? value : iteratee(value);
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var valuesIndex = valuesLength;
+ while (valuesIndex--) {
+ if (values[valuesIndex] === computed) {
+ continue outer;
+ }
+ }
+ result.push(value);
+ }
+ else if (!includes(values, computed, comparator)) {
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEach = createBaseEach(baseForOwn);
+
+ /**
+ * The base implementation of `_.forEachRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEachRight = createBaseEach(baseForOwnRight, true);
+
+ /**
+ * The base implementation of `_.every` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`
+ */
+ function baseEvery(collection, predicate) {
+ var result = true;
+ baseEach(collection, function(value, index, collection) {
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
+ * `comparator` to determine the extremum value.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The iteratee invoked per iteration.
+ * @param {Function} comparator The comparator used to compare values.
+ * @returns {*} Returns the extremum value.
+ */
+ function baseExtremum(array, iteratee, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index],
+ current = iteratee(value);
+
+ if (current != null && (computed === undefined
+ ? (current === current && !isSymbol(current))
+ : comparator(current, computed)
+ )) {
+ var computed = current,
+ result = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.fill` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ */
+ function baseFill(array, value, start, end) {
+ var length = array.length;
+
+ start = toInteger(start);
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = (end === undefined || end > length) ? length : toInteger(end);
+ if (end < 0) {
+ end += length;
+ }
+ end = start > end ? 0 : toLength(end);
+ while (start < end) {
+ array[start++] = value;
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.filter` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+ function baseFlatten(array, depth, predicate, isStrict, result) {
+ var index = -1,
+ length = array.length;
+
+ predicate || (predicate = isFlattenable);
+ result || (result = []);
+
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && predicate(value)) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `baseForOwn` which iterates over `object`
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseFor = createBaseFor();
+
+ /**
+ * This function is like `baseFor` except that it iterates over properties
+ * in the opposite order.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseForRight = createBaseFor(true);
+
+ /**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwn(object, iteratee) {
+ return object && baseFor(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwnRight(object, iteratee) {
+ return object && baseForRight(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.functions` which creates an array of
+ * `object` function property names filtered from `props`.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} props The property names to filter.
+ * @returns {Array} Returns the function names.
+ */
+ function baseFunctions(object, props) {
+ return arrayFilter(props, function(key) {
+ return isFunction(object[key]);
+ });
+ }
+
+ /**
+ * The base implementation of `_.get` without support for default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseGet(object, path) {
+ path = castPath(path, object);
+
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[toKey(path[index++])];
+ }
+ return (index && index == length) ? object : undefined;
+ }
+
+ /**
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+ var result = keysFunc(object);
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
+ }
+
+ /**
+ * The base implementation of `getTag` without fallbacks for buggy environments.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ function baseGetTag(value) {
+ if (value == null) {
+ return value === undefined ? undefinedTag : nullTag;
+ }
+ return (symToStringTag && symToStringTag in Object(value))
+ ? getRawTag(value)
+ : objectToString(value);
+ }
+
+ /**
+ * The base implementation of `_.gt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ */
+ function baseGt(value, other) {
+ return value > other;
+ }
+
+ /**
+ * The base implementation of `_.has` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+ function baseHas(object, key) {
+ return object != null && hasOwnProperty.call(object, key);
+ }
+
+ /**
+ * The base implementation of `_.hasIn` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+ function baseHasIn(object, key) {
+ return object != null && key in Object(object);
+ }
+
+ /**
+ * The base implementation of `_.inRange` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {number} number The number to check.
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ */
+ function baseInRange(number, start, end) {
+ return number >= nativeMin(start, end) && number < nativeMax(start, end);
+ }
+
+ /**
+ * The base implementation of methods like `_.intersection`, without support
+ * for iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of shared values.
+ */
+ function baseIntersection(arrays, iteratee, comparator) {
+ var includes = comparator ? arrayIncludesWith : arrayIncludes,
+ length = arrays[0].length,
+ othLength = arrays.length,
+ othIndex = othLength,
+ caches = Array(othLength),
+ maxLength = Infinity,
+ result = [];
+
+ while (othIndex--) {
+ var array = arrays[othIndex];
+ if (othIndex && iteratee) {
+ array = arrayMap(array, baseUnary(iteratee));
+ }
+ maxLength = nativeMin(array.length, maxLength);
+ caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
+ ? new SetCache(othIndex && array)
+ : undefined;
+ }
+ array = arrays[0];
+
+ var index = -1,
+ seen = caches[0];
+
+ outer:
+ while (++index < length && result.length < maxLength) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (!(seen
+ ? cacheHas(seen, computed)
+ : includes(result, computed, comparator)
+ )) {
+ othIndex = othLength;
+ while (--othIndex) {
+ var cache = caches[othIndex];
+ if (!(cache
+ ? cacheHas(cache, computed)
+ : includes(arrays[othIndex], computed, comparator))
+ ) {
+ continue outer;
+ }
+ }
+ if (seen) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.invert` and `_.invertBy` which inverts
+ * `object` with values transformed by `iteratee` and set by `setter`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform values.
+ * @param {Object} accumulator The initial inverted object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function baseInverter(object, setter, iteratee, accumulator) {
+ baseForOwn(object, function(value, key, object) {
+ setter(accumulator, iteratee(value), key, object);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.invoke` without support for individual
+ * method arguments.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {Array} args The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ */
+ function baseInvoke(object, path, args) {
+ path = castPath(path, object);
+ object = parent(object, path);
+ var func = object == null ? object : object[toKey(last(path))];
+ return func == null ? undefined : apply(func, object, args);
+ }
+
+ /**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+ function baseIsArguments(value) {
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
+ }
+
+ /**
+ * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+ */
+ function baseIsArrayBuffer(value) {
+ return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
+ }
+
+ /**
+ * The base implementation of `_.isDate` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ */
+ function baseIsDate(value) {
+ return isObjectLike(value) && baseGetTag(value) == dateTag;
+ }
+
+ /**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
+ }
+
+ /**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = objIsArr ? arrayTag : getTag(object),
+ othTag = othIsArr ? arrayTag : getTag(other);
+
+ objTag = objTag == argsTag ? objectTag : objTag;
+ othTag = othTag == argsTag ? objectTag : othTag;
+
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && isBuffer(object)) {
+ if (!isBuffer(other)) {
+ return false;
+ }
+ objIsArr = true;
+ objIsObj = false;
+ }
+ if (isSameTag && !objIsObj) {
+ stack || (stack = new Stack);
+ return (objIsArr || isTypedArray(object))
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
+ }
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ stack || (stack = new Stack);
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stack || (stack = new Stack);
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
+ }
+
+ /**
+ * The base implementation of `_.isMap` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ */
+ function baseIsMap(value) {
+ return isObjectLike(value) && getTag(value) == mapTag;
+ }
+
+ /**
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Array} matchData The property names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+ function baseIsMatch(object, source, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
+
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
+
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var stack = new Stack;
+ if (customizer) {
+ var result = customizer(objValue, srcValue, key, object, source, stack);
+ }
+ if (!(result === undefined
+ ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
+ : result
+ )) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ */
+ function baseIsNative(value) {
+ if (!isObject(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+ }
+
+ /**
+ * The base implementation of `_.isRegExp` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ */
+ function baseIsRegExp(value) {
+ return isObjectLike(value) && baseGetTag(value) == regexpTag;
+ }
+
+ /**
+ * The base implementation of `_.isSet` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ */
+ function baseIsSet(value) {
+ return isObjectLike(value) && getTag(value) == setTag;
+ }
+
+ /**
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ */
+ function baseIsTypedArray(value) {
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
+ }
+
+ /**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+ function baseIteratee(value) {
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
+ if (typeof value == 'function') {
+ return value;
+ }
+ if (value == null) {
+ return identity;
+ }
+ if (typeof value == 'object') {
+ return isArray(value)
+ ? baseMatchesProperty(value[0], value[1])
+ : baseMatches(value);
+ }
+ return property(value);
+ }
+
+ /**
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeys(object) {
+ if (!isPrototype(object)) {
+ return nativeKeys(object);
+ }
+ var result = [];
+ for (var key in Object(object)) {
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeysIn(object) {
+ if (!isObject(object)) {
+ return nativeKeysIn(object);
+ }
+ var isProto = isPrototype(object),
+ result = [];
+
+ for (var key in object) {
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.lt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ */
+ function baseLt(value, other) {
+ return value < other;
+ }
+
+ /**
+ * The base implementation of `_.map` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatches(source) {
+ var matchData = getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
+ }
+ return function(object) {
+ return object === source || baseIsMatch(object, source, matchData);
+ };
+ }
+
+ /**
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatchesProperty(path, srcValue) {
+ if (isKey(path) && isStrictComparable(srcValue)) {
+ return matchesStrictComparable(toKey(path), srcValue);
+ }
+ return function(object) {
+ var objValue = get(object, path);
+ return (objValue === undefined && objValue === srcValue)
+ ? hasIn(object, path)
+ : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
+ };
+ }
+
+ /**
+ * The base implementation of `_.merge` without support for multiple sources.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} [customizer] The function to customize merged values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+ function baseMerge(object, source, srcIndex, customizer, stack) {
+ if (object === source) {
+ return;
+ }
+ baseFor(source, function(srcValue, key) {
+ stack || (stack = new Stack);
+ if (isObject(srcValue)) {
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
+ }
+ else {
+ var newValue = customizer
+ ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = srcValue;
+ }
+ assignMergeValue(object, key, newValue);
+ }
+ }, keysIn);
+ }
+
+ /**
+ * A specialized version of `baseMerge` for arrays and objects which performs
+ * deep merges and tracks traversed objects enabling objects with circular
+ * references to be merged.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {string} key The key of the value to merge.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} mergeFunc The function to merge values.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
+ var objValue = safeGet(object, key),
+ srcValue = safeGet(source, key),
+ stacked = stack.get(srcValue);
+
+ if (stacked) {
+ assignMergeValue(object, key, stacked);
+ return;
+ }
+ var newValue = customizer
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ var isCommon = newValue === undefined;
+
+ if (isCommon) {
+ var isArr = isArray(srcValue),
+ isBuff = !isArr && isBuffer(srcValue),
+ isTyped = !isArr && !isBuff && isTypedArray(srcValue);
+
+ newValue = srcValue;
+ if (isArr || isBuff || isTyped) {
+ if (isArray(objValue)) {
+ newValue = objValue;
+ }
+ else if (isArrayLikeObject(objValue)) {
+ newValue = copyArray(objValue);
+ }
+ else if (isBuff) {
+ isCommon = false;
+ newValue = cloneBuffer(srcValue, true);
+ }
+ else if (isTyped) {
+ isCommon = false;
+ newValue = cloneTypedArray(srcValue, true);
+ }
+ else {
+ newValue = [];
+ }
+ }
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ newValue = objValue;
+ if (isArguments(objValue)) {
+ newValue = toPlainObject(objValue);
+ }
+ else if (!isObject(objValue) || isFunction(objValue)) {
+ newValue = initCloneObject(srcValue);
+ }
+ }
+ else {
+ isCommon = false;
+ }
+ }
+ if (isCommon) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, newValue);
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
+ stack['delete'](srcValue);
+ }
+ assignMergeValue(object, key, newValue);
+ }
+
+ /**
+ * The base implementation of `_.nth` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {number} n The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ */
+ function baseNth(array, n) {
+ var length = array.length;
+ if (!length) {
+ return;
+ }
+ n += n < 0 ? length : 0;
+ return isIndex(n, length) ? array[n] : undefined;
+ }
+
+ /**
+ * The base implementation of `_.orderBy` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+ * @param {string[]} orders The sort orders of `iteratees`.
+ * @returns {Array} Returns the new sorted array.
+ */
+ function baseOrderBy(collection, iteratees, orders) {
+ if (iteratees.length) {
+ iteratees = arrayMap(iteratees, function(iteratee) {
+ if (isArray(iteratee)) {
+ return function(value) {
+ return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
+ }
+ }
+ return iteratee;
+ });
+ } else {
+ iteratees = [identity];
+ }
+
+ var index = -1;
+ iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
+
+ var result = baseMap(collection, function(value, key, collection) {
+ var criteria = arrayMap(iteratees, function(iteratee) {
+ return iteratee(value);
+ });
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
+ });
+
+ return baseSortBy(result, function(object, other) {
+ return compareMultiple(object, other, orders);
+ });
+ }
+
+ /**
+ * The base implementation of `_.pick` without support for individual
+ * property identifiers.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Object} Returns the new object.
+ */
+ function basePick(object, paths) {
+ return basePickBy(object, paths, function(value, path) {
+ return hasIn(object, path);
+ });
+ }
+
+ /**
+ * The base implementation of `_.pickBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @param {Function} predicate The function invoked per property.
+ * @returns {Object} Returns the new object.
+ */
+ function basePickBy(object, paths, predicate) {
+ var index = -1,
+ length = paths.length,
+ result = {};
+
+ while (++index < length) {
+ var path = paths[index],
+ value = baseGet(object, path);
+
+ if (predicate(value, path)) {
+ baseSet(result, castPath(path, object), value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function basePropertyDeep(path) {
+ return function(object) {
+ return baseGet(object, path);
+ };
+ }
+
+ /**
+ * The base implementation of `_.pullAllBy` without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ */
+ function basePullAll(array, values, iteratee, comparator) {
+ var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
+ index = -1,
+ length = values.length,
+ seen = array;
+
+ if (array === values) {
+ values = copyArray(values);
+ }
+ if (iteratee) {
+ seen = arrayMap(array, baseUnary(iteratee));
+ }
+ while (++index < length) {
+ var fromIndex = 0,
+ value = values[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
+ if (seen !== array) {
+ splice.call(seen, fromIndex, 1);
+ }
+ splice.call(array, fromIndex, 1);
+ }
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.pullAt` without support for individual
+ * indexes or capturing the removed elements.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {number[]} indexes The indexes of elements to remove.
+ * @returns {Array} Returns `array`.
+ */
+ function basePullAt(array, indexes) {
+ var length = array ? indexes.length : 0,
+ lastIndex = length - 1;
+
+ while (length--) {
+ var index = indexes[length];
+ if (length == lastIndex || index !== previous) {
+ var previous = index;
+ if (isIndex(index)) {
+ splice.call(array, index, 1);
+ } else {
+ baseUnset(array, index);
+ }
+ }
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.random` without support for returning
+ * floating-point numbers.
+ *
+ * @private
+ * @param {number} lower The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the random number.
+ */
+ function baseRandom(lower, upper) {
+ return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
+ }
+
+ /**
+ * The base implementation of `_.range` and `_.rangeRight` which doesn't
+ * coerce arguments.
+ *
+ * @private
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} step The value to increment or decrement by.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the range of numbers.
+ */
+ function baseRange(start, end, step, fromRight) {
+ var index = -1,
+ length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
+ result = Array(length);
+
+ while (length--) {
+ result[fromRight ? length : ++index] = start;
+ start += step;
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.repeat` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {string} string The string to repeat.
+ * @param {number} n The number of times to repeat the string.
+ * @returns {string} Returns the repeated string.
+ */
+ function baseRepeat(string, n) {
+ var result = '';
+ if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
+ return result;
+ }
+ // Leverage the exponentiation by squaring algorithm for a faster repeat.
+ // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
+ do {
+ if (n % 2) {
+ result += string;
+ }
+ n = nativeFloor(n / 2);
+ if (n) {
+ string += string;
+ }
+ } while (n);
+
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ */
+ function baseRest(func, start) {
+ return setToString(overRest(func, start, identity), func + '');
+ }
+
+ /**
+ * The base implementation of `_.sample`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ */
+ function baseSample(collection) {
+ return arraySample(values(collection));
+ }
+
+ /**
+ * The base implementation of `_.sampleSize` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+ function baseSampleSize(collection, n) {
+ var array = values(collection);
+ return shuffleSelf(array, baseClamp(n, 0, array.length));
+ }
+
+ /**
+ * The base implementation of `_.set`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+ function baseSet(object, path, value, customizer) {
+ if (!isObject(object)) {
+ return object;
+ }
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ nested = object;
+
+ while (nested != null && ++index < length) {
+ var key = toKey(path[index]),
+ newValue = value;
+
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
+ return object;
+ }
+
+ if (index != lastIndex) {
+ var objValue = nested[key];
+ newValue = customizer ? customizer(objValue, key, nested) : undefined;
+ if (newValue === undefined) {
+ newValue = isObject(objValue)
+ ? objValue
+ : (isIndex(path[index + 1]) ? [] : {});
+ }
+ }
+ assignValue(nested, key, newValue);
+ nested = nested[key];
+ }
+ return object;
+ }
+
+ /**
+ * The base implementation of `setData` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+ var baseSetData = !metaMap ? identity : function(func, data) {
+ metaMap.set(func, data);
+ return func;
+ };
+
+ /**
+ * The base implementation of `setToString` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+ var baseSetToString = !defineProperty ? identity : function(func, string) {
+ return defineProperty(func, 'toString', {
+ 'configurable': true,
+ 'enumerable': false,
+ 'value': constant(string),
+ 'writable': true
+ });
+ };
+
+ /**
+ * The base implementation of `_.shuffle`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+ function baseShuffle(collection) {
+ return shuffleSelf(values(collection));
+ }
+
+ /**
+ * The base implementation of `_.slice` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = end > length ? length : end;
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.some` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+ }
+
+ /**
+ * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
+ * performs a binary search of `array` to determine the index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+ function baseSortedIndex(array, value, retHighest) {
+ var low = 0,
+ high = array == null ? low : array.length;
+
+ if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
+ while (low < high) {
+ var mid = (low + high) >>> 1,
+ computed = array[mid];
+
+ if (computed !== null && !isSymbol(computed) &&
+ (retHighest ? (computed <= value) : (computed < value))) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return high;
+ }
+ return baseSortedIndexBy(array, value, identity, retHighest);
+ }
+
+ /**
+ * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
+ * which invokes `iteratee` for `value` and each element of `array` to compute
+ * their sort ranking. The iteratee is invoked with one argument; (value).
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} iteratee The iteratee invoked per element.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+ function baseSortedIndexBy(array, value, iteratee, retHighest) {
+ var low = 0,
+ high = array == null ? 0 : array.length;
+ if (high === 0) {
+ return 0;
+ }
+
+ value = iteratee(value);
+ var valIsNaN = value !== value,
+ valIsNull = value === null,
+ valIsSymbol = isSymbol(value),
+ valIsUndefined = value === undefined;
+
+ while (low < high) {
+ var mid = nativeFloor((low + high) / 2),
+ computed = iteratee(array[mid]),
+ othIsDefined = computed !== undefined,
+ othIsNull = computed === null,
+ othIsReflexive = computed === computed,
+ othIsSymbol = isSymbol(computed);
+
+ if (valIsNaN) {
+ var setLow = retHighest || othIsReflexive;
+ } else if (valIsUndefined) {
+ setLow = othIsReflexive && (retHighest || othIsDefined);
+ } else if (valIsNull) {
+ setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
+ } else if (valIsSymbol) {
+ setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
+ } else if (othIsNull || othIsSymbol) {
+ setLow = false;
+ } else {
+ setLow = retHighest ? (computed <= value) : (computed < value);
+ }
+ if (setLow) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return nativeMin(high, MAX_ARRAY_INDEX);
+ }
+
+ /**
+ * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+ function baseSortedUniq(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ if (!index || !eq(computed, seen)) {
+ var seen = computed;
+ result[resIndex++] = value === 0 ? 0 : value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.toNumber` which doesn't ensure correct
+ * conversions of binary, hexadecimal, or octal string values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ */
+ function baseToNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ return +value;
+ }
+
+ /**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+ function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (isArray(value)) {
+ // Recursively convert values (susceptible to call stack limits).
+ return arrayMap(value, baseToString) + '';
+ }
+ if (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ /**
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+ function baseUniq(array, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ length = array.length,
+ isCommon = true,
+ result = [],
+ seen = result;
+
+ if (comparator) {
+ isCommon = false;
+ includes = arrayIncludesWith;
+ }
+ else if (length >= LARGE_ARRAY_SIZE) {
+ var set = iteratee ? null : createSet(array);
+ if (set) {
+ return setToArray(set);
+ }
+ isCommon = false;
+ includes = cacheHas;
+ seen = new SetCache;
+ }
+ else {
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var seenIndex = seen.length;
+ while (seenIndex--) {
+ if (seen[seenIndex] === computed) {
+ continue outer;
+ }
+ }
+ if (iteratee) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ else if (!includes(seen, computed, comparator)) {
+ if (seen !== result) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.unset`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The property path to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ */
+ function baseUnset(object, path) {
+ path = castPath(path, object);
+ object = parent(object, path);
+ return object == null || delete object[toKey(last(path))];
+ }
+
+ /**
+ * The base implementation of `_.update`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to update.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+ function baseUpdate(object, path, updater, customizer) {
+ return baseSet(object, path, updater(baseGet(object, path)), customizer);
+ }
+
+ /**
+ * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
+ * without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseWhile(array, predicate, isDrop, fromRight) {
+ var length = array.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length) &&
+ predicate(array[index], index, array)) {}
+
+ return isDrop
+ ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
+ : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
+ }
+
+ /**
+ * The base implementation of `wrapperValue` which returns the result of
+ * performing a sequence of actions on the unwrapped `value`, where each
+ * successive action is supplied the return value of the previous.
+ *
+ * @private
+ * @param {*} value The unwrapped value.
+ * @param {Array} actions Actions to perform to resolve the unwrapped value.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseWrapperValue(value, actions) {
+ var result = value;
+ if (result instanceof LazyWrapper) {
+ result = result.value();
+ }
+ return arrayReduce(actions, function(result, action) {
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }, result);
+ }
+
+ /**
+ * The base implementation of methods like `_.xor`, without support for
+ * iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of values.
+ */
+ function baseXor(arrays, iteratee, comparator) {
+ var length = arrays.length;
+ if (length < 2) {
+ return length ? baseUniq(arrays[0]) : [];
+ }
+ var index = -1,
+ result = Array(length);
+
+ while (++index < length) {
+ var array = arrays[index],
+ othIndex = -1;
+
+ while (++othIndex < length) {
+ if (othIndex != index) {
+ result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
+ }
+ }
+ }
+ return baseUniq(baseFlatten(result, 1), iteratee, comparator);
+ }
+
+ /**
+ * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
+ *
+ * @private
+ * @param {Array} props The property identifiers.
+ * @param {Array} values The property values.
+ * @param {Function} assignFunc The function to assign values.
+ * @returns {Object} Returns the new object.
+ */
+ function baseZipObject(props, values, assignFunc) {
+ var index = -1,
+ length = props.length,
+ valsLength = values.length,
+ result = {};
+
+ while (++index < length) {
+ var value = index < valsLength ? values[index] : undefined;
+ assignFunc(result, props[index], value);
+ }
+ return result;
+ }
+
+ /**
+ * Casts `value` to an empty array if it's not an array like object.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Array|Object} Returns the cast array-like object.
+ */
+ function castArrayLikeObject(value) {
+ return isArrayLikeObject(value) ? value : [];
+ }
+
+ /**
+ * Casts `value` to `identity` if it's not a function.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Function} Returns cast function.
+ */
+ function castFunction(value) {
+ return typeof value == 'function' ? value : identity;
+ }
+
+ /**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {Array} Returns the cast property path array.
+ */
+ function castPath(value, object) {
+ if (isArray(value)) {
+ return value;
+ }
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
+ }
+
+ /**
+ * A `baseRest` alias which can be replaced with `identity` by module
+ * replacement plugins.
+ *
+ * @private
+ * @type {Function}
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+ var castRest = baseRest;
+
+ /**
+ * Casts `array` to a slice if it's needed.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {number} start The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the cast slice.
+ */
+ function castSlice(array, start, end) {
+ var length = array.length;
+ end = end === undefined ? length : end;
+ return (!start && end >= length) ? array : baseSlice(array, start, end);
+ }
+
+ /**
+ * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
+ *
+ * @private
+ * @param {number|Object} id The timer id or timeout object of the timer to clear.
+ */
+ var clearTimeout = ctxClearTimeout || function(id) {
+ return root.clearTimeout(id);
+ };
+
+ /**
+ * Creates a clone of `buffer`.
+ *
+ * @private
+ * @param {Buffer} buffer The buffer to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Buffer} Returns the cloned buffer.
+ */
+ function cloneBuffer(buffer, isDeep) {
+ if (isDeep) {
+ return buffer.slice();
+ }
+ var length = buffer.length,
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
+
+ buffer.copy(result);
+ return result;
+ }
+
+ /**
+ * Creates a clone of `arrayBuffer`.
+ *
+ * @private
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
+ */
+ function cloneArrayBuffer(arrayBuffer) {
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+ return result;
+ }
+
+ /**
+ * Creates a clone of `dataView`.
+ *
+ * @private
+ * @param {Object} dataView The data view to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned data view.
+ */
+ function cloneDataView(dataView, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
+ }
+
+ /**
+ * Creates a clone of `regexp`.
+ *
+ * @private
+ * @param {Object} regexp The regexp to clone.
+ * @returns {Object} Returns the cloned regexp.
+ */
+ function cloneRegExp(regexp) {
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
+ result.lastIndex = regexp.lastIndex;
+ return result;
+ }
+
+ /**
+ * Creates a clone of the `symbol` object.
+ *
+ * @private
+ * @param {Object} symbol The symbol object to clone.
+ * @returns {Object} Returns the cloned symbol object.
+ */
+ function cloneSymbol(symbol) {
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
+ }
+
+ /**
+ * Creates a clone of `typedArray`.
+ *
+ * @private
+ * @param {Object} typedArray The typed array to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned typed array.
+ */
+ function cloneTypedArray(typedArray, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
+ }
+
+ /**
+ * Compares values to sort them in ascending order.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {number} Returns the sort order indicator for `value`.
+ */
+ function compareAscending(value, other) {
+ if (value !== other) {
+ var valIsDefined = value !== undefined,
+ valIsNull = value === null,
+ valIsReflexive = value === value,
+ valIsSymbol = isSymbol(value);
+
+ var othIsDefined = other !== undefined,
+ othIsNull = other === null,
+ othIsReflexive = other === other,
+ othIsSymbol = isSymbol(other);
+
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+ (valIsNull && othIsDefined && othIsReflexive) ||
+ (!valIsDefined && othIsReflexive) ||
+ !valIsReflexive) {
+ return 1;
+ }
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+ (othIsNull && valIsDefined && valIsReflexive) ||
+ (!othIsDefined && valIsReflexive) ||
+ !othIsReflexive) {
+ return -1;
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * Used by `_.orderBy` to compare multiple properties of a value to another
+ * and stable sort them.
+ *
+ * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
+ * specify an order of "desc" for descending or "asc" for ascending sort order
+ * of corresponding values.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {boolean[]|string[]} orders The order to sort by for each property.
+ * @returns {number} Returns the sort order indicator for `object`.
+ */
+ function compareMultiple(object, other, orders) {
+ var index = -1,
+ objCriteria = object.criteria,
+ othCriteria = other.criteria,
+ length = objCriteria.length,
+ ordersLength = orders.length;
+
+ while (++index < length) {
+ var result = compareAscending(objCriteria[index], othCriteria[index]);
+ if (result) {
+ if (index >= ordersLength) {
+ return result;
+ }
+ var order = orders[index];
+ return result * (order == 'desc' ? -1 : 1);
+ }
+ }
+ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
+ // that causes it, under certain circumstances, to provide the same value for
+ // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
+ // for more details.
+ //
+ // This also ensures a stable sort in V8 and other engines.
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
+ return object.index - other.index;
+ }
+
+ /**
+ * Creates an array that is the composition of partially applied arguments,
+ * placeholders, and provided arguments into a single array of arguments.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to prepend to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+ function composeArgs(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersLength = holders.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(leftLength + rangeLength),
+ isUncurried = !isCurried;
+
+ while (++leftIndex < leftLength) {
+ result[leftIndex] = partials[leftIndex];
+ }
+ while (++argsIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[holders[argsIndex]] = args[argsIndex];
+ }
+ }
+ while (rangeLength--) {
+ result[leftIndex++] = args[argsIndex++];
+ }
+ return result;
+ }
+
+ /**
+ * This function is like `composeArgs` except that the arguments composition
+ * is tailored for `_.partialRight`.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to append to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+ function composeArgsRight(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersIndex = -1,
+ holdersLength = holders.length,
+ rightIndex = -1,
+ rightLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(rangeLength + rightLength),
+ isUncurried = !isCurried;
+
+ while (++argsIndex < rangeLength) {
+ result[argsIndex] = args[argsIndex];
+ }
+ var offset = argsIndex;
+ while (++rightIndex < rightLength) {
+ result[offset + rightIndex] = partials[rightIndex];
+ }
+ while (++holdersIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[offset + holders[holdersIndex]] = args[argsIndex++];
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+ function copyArray(source, array) {
+ var index = -1,
+ length = source.length;
+
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+ }
+
+ /**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+ function copyObject(source, props, object, customizer) {
+ var isNew = !object;
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ baseAssignValue(object, key, newValue);
+ } else {
+ assignValue(object, key, newValue);
+ }
+ }
+ return object;
+ }
+
+ /**
+ * Copies own symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+ function copySymbols(source, object) {
+ return copyObject(source, getSymbols(source), object);
+ }
+
+ /**
+ * Copies own and inherited symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+ function copySymbolsIn(source, object) {
+ return copyObject(source, getSymbolsIn(source), object);
+ }
+
+ /**
+ * Creates a function like `_.groupBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} [initializer] The accumulator object initializer.
+ * @returns {Function} Returns the new aggregator function.
+ */
+ function createAggregator(setter, initializer) {
+ return function(collection, iteratee) {
+ var func = isArray(collection) ? arrayAggregator : baseAggregator,
+ accumulator = initializer ? initializer() : {};
+
+ return func(collection, setter, getIteratee(iteratee, 2), accumulator);
+ };
+ }
+
+ /**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+ function createAssigner(assigner) {
+ return baseRest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined,
+ guard = length > 2 ? sources[2] : undefined;
+
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
+ ? (length--, customizer)
+ : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
+ }
+
+ /**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
+ }
+ if (!isArrayLike(collection)) {
+ return eachFunc(collection, iteratee);
+ }
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+ }
+
+ /**
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
+
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the optional `this`
+ * binding of `thisArg`.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createBind(func, bitmask, thisArg) {
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return fn.apply(isBind ? thisArg : this, arguments);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a function like `_.lowerFirst`.
+ *
+ * @private
+ * @param {string} methodName The name of the `String` case method to use.
+ * @returns {Function} Returns the new case function.
+ */
+ function createCaseFirst(methodName) {
+ return function(string) {
+ string = toString(string);
+
+ var strSymbols = hasUnicode(string)
+ ? stringToArray(string)
+ : undefined;
+
+ var chr = strSymbols
+ ? strSymbols[0]
+ : string.charAt(0);
+
+ var trailing = strSymbols
+ ? castSlice(strSymbols, 1).join('')
+ : string.slice(1);
+
+ return chr[methodName]() + trailing;
+ };
+ }
+
+ /**
+ * Creates a function like `_.camelCase`.
+ *
+ * @private
+ * @param {Function} callback The function to combine each word.
+ * @returns {Function} Returns the new compounder function.
+ */
+ function createCompounder(callback) {
+ return function(string) {
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
+ };
+ }
+
+ /**
+ * Creates a function that produces an instance of `Ctor` regardless of
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+ *
+ * @private
+ * @param {Function} Ctor The constructor to wrap.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCtor(Ctor) {
+ return function() {
+ // Use a `switch` statement to work with class constructors. See
+ // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+ // for more details.
+ var args = arguments;
+ switch (args.length) {
+ case 0: return new Ctor;
+ case 1: return new Ctor(args[0]);
+ case 2: return new Ctor(args[0], args[1]);
+ case 3: return new Ctor(args[0], args[1], args[2]);
+ case 4: return new Ctor(args[0], args[1], args[2], args[3]);
+ case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
+ case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
+ case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
+ }
+ var thisBinding = baseCreate(Ctor.prototype),
+ result = Ctor.apply(thisBinding, args);
+
+ // Mimic the constructor's `return` behavior.
+ // See https://es5.github.io/#x13.2.2 for more details.
+ return isObject(result) ? result : thisBinding;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to enable currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {number} arity The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCurry(func, bitmask, arity) {
+ var Ctor = createCtor(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length,
+ placeholder = getHolder(wrapper);
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
+ ? []
+ : replaceHolders(args, placeholder);
+
+ length -= holders.length;
+ if (length < arity) {
+ return createRecurry(
+ func, bitmask, createHybrid, wrapper.placeholder, undefined,
+ args, holders, undefined, undefined, arity - length);
+ }
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return apply(fn, this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a `_.find` or `_.findLast` function.
+ *
+ * @private
+ * @param {Function} findIndexFunc The function to find the collection index.
+ * @returns {Function} Returns the new find function.
+ */
+ function createFind(findIndexFunc) {
+ return function(collection, predicate, fromIndex) {
+ var iterable = Object(collection);
+ if (!isArrayLike(collection)) {
+ var iteratee = getIteratee(predicate, 3);
+ collection = keys(collection);
+ predicate = function(key) { return iteratee(iterable[key], key, iterable); };
+ }
+ var index = findIndexFunc(collection, predicate, fromIndex);
+ return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
+ };
+ }
+
+ /**
+ * Creates a `_.flow` or `_.flowRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new flow function.
+ */
+ function createFlow(fromRight) {
+ return flatRest(function(funcs) {
+ var length = funcs.length,
+ index = length,
+ prereq = LodashWrapper.prototype.thru;
+
+ if (fromRight) {
+ funcs.reverse();
+ }
+ while (index--) {
+ var func = funcs[index];
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
+ var wrapper = new LodashWrapper([], true);
+ }
+ }
+ index = wrapper ? index : length;
+ while (++index < length) {
+ func = funcs[index];
+
+ var funcName = getFuncName(func),
+ data = funcName == 'wrapper' ? getData(func) : undefined;
+
+ if (data && isLaziable(data[0]) &&
+ data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
+ !data[4].length && data[9] == 1
+ ) {
+ wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
+ } else {
+ wrapper = (func.length == 1 && isLaziable(func))
+ ? wrapper[funcName]()
+ : wrapper.thru(func);
+ }
+ }
+ return function() {
+ var args = arguments,
+ value = args[0];
+
+ if (wrapper && args.length == 1 && isArray(value)) {
+ return wrapper.plant(value).value();
+ }
+ var index = 0,
+ result = length ? funcs[index].apply(this, args) : value;
+
+ while (++index < length) {
+ result = funcs[index].call(this, result);
+ }
+ return result;
+ };
+ });
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with optional `this`
+ * binding of `thisArg`, partial application, and currying.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [partialsRight] The arguments to append to those provided
+ * to the new function.
+ * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
+ var isAry = bitmask & WRAP_ARY_FLAG,
+ isBind = bitmask & WRAP_BIND_FLAG,
+ isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
+ isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
+ isFlip = bitmask & WRAP_FLIP_FLAG,
+ Ctor = isBindKey ? undefined : createCtor(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length;
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ if (isCurried) {
+ var placeholder = getHolder(wrapper),
+ holdersCount = countHolders(args, placeholder);
+ }
+ if (partials) {
+ args = composeArgs(args, partials, holders, isCurried);
+ }
+ if (partialsRight) {
+ args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
+ }
+ length -= holdersCount;
+ if (isCurried && length < arity) {
+ var newHolders = replaceHolders(args, placeholder);
+ return createRecurry(
+ func, bitmask, createHybrid, wrapper.placeholder, thisArg,
+ args, newHolders, argPos, ary, arity - length
+ );
+ }
+ var thisBinding = isBind ? thisArg : this,
+ fn = isBindKey ? thisBinding[func] : func;
+
+ length = args.length;
+ if (argPos) {
+ args = reorder(args, argPos);
+ } else if (isFlip && length > 1) {
+ args.reverse();
+ }
+ if (isAry && ary < length) {
+ args.length = ary;
+ }
+ if (this && this !== root && this instanceof wrapper) {
+ fn = Ctor || createCtor(fn);
+ }
+ return fn.apply(thisBinding, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a function like `_.invertBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} toIteratee The function to resolve iteratees.
+ * @returns {Function} Returns the new inverter function.
+ */
+ function createInverter(setter, toIteratee) {
+ return function(object, iteratee) {
+ return baseInverter(object, setter, toIteratee(iteratee), {});
+ };
+ }
+
+ /**
+ * Creates a function that performs a mathematical operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @param {number} [defaultValue] The value used for `undefined` arguments.
+ * @returns {Function} Returns the new mathematical operation function.
+ */
+ function createMathOperation(operator, defaultValue) {
+ return function(value, other) {
+ var result;
+ if (value === undefined && other === undefined) {
+ return defaultValue;
+ }
+ if (value !== undefined) {
+ result = value;
+ }
+ if (other !== undefined) {
+ if (result === undefined) {
+ return other;
+ }
+ if (typeof value == 'string' || typeof other == 'string') {
+ value = baseToString(value);
+ other = baseToString(other);
+ } else {
+ value = baseToNumber(value);
+ other = baseToNumber(other);
+ }
+ result = operator(value, other);
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function like `_.over`.
+ *
+ * @private
+ * @param {Function} arrayFunc The function to iterate over iteratees.
+ * @returns {Function} Returns the new over function.
+ */
+ function createOver(arrayFunc) {
+ return flatRest(function(iteratees) {
+ iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
+ return baseRest(function(args) {
+ var thisArg = this;
+ return arrayFunc(iteratees, function(iteratee) {
+ return apply(iteratee, thisArg, args);
+ });
+ });
+ });
+ }
+
+ /**
+ * Creates the padding for `string` based on `length`. The `chars` string
+ * is truncated if the number of characters exceeds `length`.
+ *
+ * @private
+ * @param {number} length The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padding for `string`.
+ */
+ function createPadding(length, chars) {
+ chars = chars === undefined ? ' ' : baseToString(chars);
+
+ var charsLength = chars.length;
+ if (charsLength < 2) {
+ return charsLength ? baseRepeat(chars, length) : chars;
+ }
+ var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
+ return hasUnicode(chars)
+ ? castSlice(stringToArray(result), 0, length).join('')
+ : result.slice(0, length);
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the `this` binding
+ * of `thisArg` and `partials` prepended to the arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} partials The arguments to prepend to those provided to
+ * the new function.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createPartial(func, bitmask, thisArg, partials) {
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var argsIndex = -1,
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength),
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+
+ while (++leftIndex < leftLength) {
+ args[leftIndex] = partials[leftIndex];
+ }
+ while (argsLength--) {
+ args[leftIndex++] = arguments[++argsIndex];
+ }
+ return apply(fn, isBind ? thisArg : this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a `_.range` or `_.rangeRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new range function.
+ */
+ function createRange(fromRight) {
+ return function(start, end, step) {
+ if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
+ end = step = undefined;
+ }
+ // Ensure the sign of `-0` is preserved.
+ start = toFinite(start);
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toFinite(end);
+ }
+ step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
+ return baseRange(start, end, step, fromRight);
+ };
+ }
+
+ /**
+ * Creates a function that performs a relational operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @returns {Function} Returns the new relational operation function.
+ */
+ function createRelationalOperation(operator) {
+ return function(value, other) {
+ if (!(typeof value == 'string' && typeof other == 'string')) {
+ value = toNumber(value);
+ other = toNumber(other);
+ }
+ return operator(value, other);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to continue currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {Function} wrapFunc The function to create the `func` wrapper.
+ * @param {*} placeholder The placeholder value.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
+ var isCurry = bitmask & WRAP_CURRY_FLAG,
+ newHolders = isCurry ? holders : undefined,
+ newHoldersRight = isCurry ? undefined : holders,
+ newPartials = isCurry ? partials : undefined,
+ newPartialsRight = isCurry ? undefined : partials;
+
+ bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
+ bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
+
+ if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
+ bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
+ }
+ var newData = [
+ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
+ newHoldersRight, argPos, ary, arity
+ ];
+
+ var result = wrapFunc.apply(undefined, newData);
+ if (isLaziable(func)) {
+ setData(result, newData);
+ }
+ result.placeholder = placeholder;
+ return setWrapToString(result, func, bitmask);
+ }
+
+ /**
+ * Creates a function like `_.round`.
+ *
+ * @private
+ * @param {string} methodName The name of the `Math` method to use when rounding.
+ * @returns {Function} Returns the new round function.
+ */
+ function createRound(methodName) {
+ var func = Math[methodName];
+ return function(number, precision) {
+ number = toNumber(number);
+ precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
+ if (precision && nativeIsFinite(number)) {
+ // Shift with exponential notation to avoid floating-point issues.
+ // See [MDN](https://mdn.io/round#Examples) for more details.
+ var pair = (toString(number) + 'e').split('e'),
+ value = func(pair[0] + 'e' + (+pair[1] + precision));
+
+ pair = (toString(value) + 'e').split('e');
+ return +(pair[0] + 'e' + (+pair[1] - precision));
+ }
+ return func(number);
+ };
+ }
+
+ /**
+ * Creates a set object of `values`.
+ *
+ * @private
+ * @param {Array} values The values to add to the set.
+ * @returns {Object} Returns the new set.
+ */
+ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
+ return new Set(values);
+ };
+
+ /**
+ * Creates a `_.toPairs` or `_.toPairsIn` function.
+ *
+ * @private
+ * @param {Function} keysFunc The function to get the keys of a given object.
+ * @returns {Function} Returns the new pairs function.
+ */
+ function createToPairs(keysFunc) {
+ return function(object) {
+ var tag = getTag(object);
+ if (tag == mapTag) {
+ return mapToArray(object);
+ }
+ if (tag == setTag) {
+ return setToPairs(object);
+ }
+ return baseToPairs(object, keysFunc(object));
+ };
+ }
+
+ /**
+ * Creates a function that either curries or invokes `func` with optional
+ * `this` binding and partially applied arguments.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags.
+ * 1 - `_.bind`
+ * 2 - `_.bindKey`
+ * 4 - `_.curry` or `_.curryRight` of a bound function
+ * 8 - `_.curry`
+ * 16 - `_.curryRight`
+ * 32 - `_.partial`
+ * 64 - `_.partialRight`
+ * 128 - `_.rearg`
+ * 256 - `_.ary`
+ * 512 - `_.flip`
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to be partially applied.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
+ var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
+ if (!isBindKey && typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var length = partials ? partials.length : 0;
+ if (!length) {
+ bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
+ partials = holders = undefined;
+ }
+ ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
+ arity = arity === undefined ? arity : toInteger(arity);
+ length -= holders ? holders.length : 0;
+
+ if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
+ var partialsRight = partials,
+ holdersRight = holders;
+
+ partials = holders = undefined;
+ }
+ var data = isBindKey ? undefined : getData(func);
+
+ var newData = [
+ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
+ argPos, ary, arity
+ ];
+
+ if (data) {
+ mergeData(newData, data);
+ }
+ func = newData[0];
+ bitmask = newData[1];
+ thisArg = newData[2];
+ partials = newData[3];
+ holders = newData[4];
+ arity = newData[9] = newData[9] === undefined
+ ? (isBindKey ? 0 : func.length)
+ : nativeMax(newData[9] - length, 0);
+
+ if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
+ bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
+ }
+ if (!bitmask || bitmask == WRAP_BIND_FLAG) {
+ var result = createBind(func, bitmask, thisArg);
+ } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
+ result = createCurry(func, bitmask, arity);
+ } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
+ result = createPartial(func, bitmask, thisArg, partials);
+ } else {
+ result = createHybrid.apply(undefined, newData);
+ }
+ var setter = data ? baseSetData : setData;
+ return setWrapToString(setter(result, newData), func, bitmask);
+ }
+
+ /**
+ * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
+ * of source objects to the destination object for all destination properties
+ * that resolve to `undefined`.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to assign.
+ * @param {Object} object The parent object of `objValue`.
+ * @returns {*} Returns the value to assign.
+ */
+ function customDefaultsAssignIn(objValue, srcValue, key, object) {
+ if (objValue === undefined ||
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ return srcValue;
+ }
+ return objValue;
+ }
+
+ /**
+ * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
+ * objects into destination objects that are passed thru.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to merge.
+ * @param {Object} object The parent object of `objValue`.
+ * @param {Object} source The parent object of `srcValue`.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ * @returns {*} Returns the value to assign.
+ */
+ function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
+ if (isObject(objValue) && isObject(srcValue)) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, objValue);
+ baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
+ stack['delete'](srcValue);
+ }
+ return objValue;
+ }
+
+ /**
+ * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
+ * objects.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {string} key The key of the property to inspect.
+ * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
+ */
+ function customOmitClone(value) {
+ return isPlainObject(value) ? undefined : value;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Check that cyclic values are equal.
+ var arrStacked = stack.get(array);
+ var othStacked = stack.get(other);
+ if (arrStacked && othStacked) {
+ return arrStacked == other && othStacked == array;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
+
+ stack.set(array, other);
+ stack.set(other, array);
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!arraySome(other, function(othValue, othIndex) {
+ if (!cacheHas(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ stack['delete'](array);
+ stack['delete'](other);
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
+ switch (tag) {
+ case dataViewTag:
+ if ((object.byteLength != other.byteLength) ||
+ (object.byteOffset != other.byteOffset)) {
+ return false;
+ }
+ object = object.buffer;
+ other = other.buffer;
+
+ case arrayBufferTag:
+ if ((object.byteLength != other.byteLength) ||
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+ return false;
+ }
+ return true;
+
+ case boolTag:
+ case dateTag:
+ case numberTag:
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
+ // Invalid dates are coerced to `NaN`.
+ return eq(+object, +other);
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ case mapTag:
+ var convert = mapToArray;
+
+ case setTag:
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
+ convert || (convert = setToArray);
+
+ if (object.size != other.size && !isPartial) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ bitmask |= COMPARE_UNORDERED_FLAG;
+
+ // Recursively compare objects (susceptible to call stack limits).
+ stack.set(object, other);
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
+ stack['delete'](object);
+ return result;
+
+ case symbolTag:
+ if (symbolValueOf) {
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ objProps = getAllKeys(object),
+ objLength = objProps.length,
+ othProps = getAllKeys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Check that cyclic values are equal.
+ var objStacked = stack.get(object);
+ var othStacked = stack.get(other);
+ if (objStacked && othStacked) {
+ return objStacked == other && othStacked == object;
+ }
+ var result = true;
+ stack.set(object, other);
+ stack.set(other, object);
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
+ }
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ stack['delete'](object);
+ stack['delete'](other);
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseRest` which flattens the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+ function flatRest(func) {
+ return setToString(overRest(func, undefined, flatten), func + '');
+ }
+
+ /**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function getAllKeys(object) {
+ return baseGetAllKeys(object, keys, getSymbols);
+ }
+
+ /**
+ * Creates an array of own and inherited enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function getAllKeysIn(object) {
+ return baseGetAllKeys(object, keysIn, getSymbolsIn);
+ }
+
+ /**
+ * Gets metadata for `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {*} Returns the metadata for `func`.
+ */
+ var getData = !metaMap ? noop : function(func) {
+ return metaMap.get(func);
+ };
+
+ /**
+ * Gets the name of `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {string} Returns the function name.
+ */
+ function getFuncName(func) {
+ var result = (func.name + ''),
+ array = realNames[result],
+ length = hasOwnProperty.call(realNames, result) ? array.length : 0;
+
+ while (length--) {
+ var data = array[length],
+ otherFunc = data.func;
+ if (otherFunc == null || otherFunc == func) {
+ return data.name;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Gets the argument placeholder value for `func`.
+ *
+ * @private
+ * @param {Function} func The function to inspect.
+ * @returns {*} Returns the placeholder value.
+ */
+ function getHolder(func) {
+ var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
+ return object.placeholder;
+ }
+
+ /**
+ * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
+ * this function returns the custom method, otherwise it returns `baseIteratee`.
+ * If arguments are provided, the chosen function is invoked with them and
+ * its result is returned.
+ *
+ * @private
+ * @param {*} [value] The value to convert to an iteratee.
+ * @param {number} [arity] The arity of the created iteratee.
+ * @returns {Function} Returns the chosen function or its result.
+ */
+ function getIteratee() {
+ var result = lodash.iteratee || iteratee;
+ result = result === iteratee ? baseIteratee : result;
+ return arguments.length ? result(arguments[0], arguments[1]) : result;
+ }
+
+ /**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+ function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+ }
+
+ /**
+ * Gets the property names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+ function getMatchData(object) {
+ var result = keys(object),
+ length = result.length;
+
+ while (length--) {
+ var key = result[length],
+ value = object[key];
+
+ result[length] = [key, value, isStrictComparable(value)];
+ }
+ return result;
+ }
+
+ /**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+ function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+ }
+
+ /**
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the raw `toStringTag`.
+ */
+ function getRawTag(value) {
+ var isOwn = hasOwnProperty.call(value, symToStringTag),
+ tag = value[symToStringTag];
+
+ try {
+ value[symToStringTag] = undefined;
+ var unmasked = true;
+ } catch (e) {}
+
+ var result = nativeObjectToString.call(value);
+ if (unmasked) {
+ if (isOwn) {
+ value[symToStringTag] = tag;
+ } else {
+ delete value[symToStringTag];
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array of the own enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
+ if (object == null) {
+ return [];
+ }
+ object = Object(object);
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
+ return propertyIsEnumerable.call(object, symbol);
+ });
+ };
+
+ /**
+ * Creates an array of the own and inherited enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
+ var result = [];
+ while (object) {
+ arrayPush(result, getSymbols(object));
+ object = getPrototype(object);
+ }
+ return result;
+ };
+
+ /**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ var getTag = baseGetTag;
+
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+ (Map && getTag(new Map) != mapTag) ||
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = baseGetTag(value),
+ Ctor = result == objectTag ? value.constructor : undefined,
+ ctorString = Ctor ? toSource(Ctor) : '';
+
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Gets the view, applying any `transforms` to the `start` and `end` positions.
+ *
+ * @private
+ * @param {number} start The start of the view.
+ * @param {number} end The end of the view.
+ * @param {Array} transforms The transformations to apply to the view.
+ * @returns {Object} Returns an object containing the `start` and `end`
+ * positions of the view.
+ */
+ function getView(start, end, transforms) {
+ var index = -1,
+ length = transforms.length;
+
+ while (++index < length) {
+ var data = transforms[index],
+ size = data.size;
+
+ switch (data.type) {
+ case 'drop': start += size; break;
+ case 'dropRight': end -= size; break;
+ case 'take': end = nativeMin(end, start + size); break;
+ case 'takeRight': start = nativeMax(start, end - size); break;
+ }
+ }
+ return { 'start': start, 'end': end };
+ }
+
+ /**
+ * Extracts wrapper details from the `source` body comment.
+ *
+ * @private
+ * @param {string} source The source to inspect.
+ * @returns {Array} Returns the wrapper details.
+ */
+ function getWrapDetails(source) {
+ var match = source.match(reWrapDetails);
+ return match ? match[1].split(reSplitDetails) : [];
+ }
+
+ /**
+ * Checks if `path` exists on `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @param {Function} hasFunc The function to check properties.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ */
+ function hasPath(object, path, hasFunc) {
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ result = false;
+
+ while (++index < length) {
+ var key = toKey(path[index]);
+ if (!(result = object != null && hasFunc(object, key))) {
+ break;
+ }
+ object = object[key];
+ }
+ if (result || ++index != length) {
+ return result;
+ }
+ length = object == null ? 0 : object.length;
+ return !!length && isLength(length) && isIndex(key, length) &&
+ (isArray(object) || isArguments(object));
+ }
+
+ /**
+ * Initializes an array clone.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the initialized clone.
+ */
+ function initCloneArray(array) {
+ var length = array.length,
+ result = new array.constructor(length);
+
+ // Add properties assigned by `RegExp#exec`.
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
+ }
+
+ /**
+ * Initializes an object clone.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneObject(object) {
+ return (typeof object.constructor == 'function' && !isPrototype(object))
+ ? baseCreate(getPrototype(object))
+ : {};
+ }
+
+ /**
+ * Initializes an object clone based on its `toStringTag`.
+ *
+ * **Note:** This function only supports cloning values with tags of
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {string} tag The `toStringTag` of the object to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneByTag(object, tag, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return cloneArrayBuffer(object);
+
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
+
+ case dataViewTag:
+ return cloneDataView(object, isDeep);
+
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ return cloneTypedArray(object, isDeep);
+
+ case mapTag:
+ return new Ctor;
+
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
+
+ case regexpTag:
+ return cloneRegExp(object);
+
+ case setTag:
+ return new Ctor;
+
+ case symbolTag:
+ return cloneSymbol(object);
+ }
+ }
+
+ /**
+ * Inserts wrapper `details` in a comment at the top of the `source` body.
+ *
+ * @private
+ * @param {string} source The source to modify.
+ * @returns {Array} details The details to insert.
+ * @returns {string} Returns the modified source.
+ */
+ function insertWrapDetails(source, details) {
+ var length = details.length;
+ if (!length) {
+ return source;
+ }
+ var lastIndex = length - 1;
+ details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
+ details = details.join(length > 2 ? ', ' : ' ');
+ return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
+ }
+
+ /**
+ * Checks if `value` is a flattenable `arguments` object or array.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+ function isFlattenable(value) {
+ return isArray(value) || isArguments(value) ||
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
+ }
+
+ /**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+ function isIndex(value, length) {
+ var type = typeof value;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+
+ return !!length &&
+ (type == 'number' ||
+ (type != 'symbol' && reIsUint.test(value))) &&
+ (value > -1 && value % 1 == 0 && value < length);
+ }
+
+ /**
+ * Checks if the given arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ * else `false`.
+ */
+ function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)
+ ) {
+ return eq(object[index], value);
+ }
+ return false;
+ }
+
+ /**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+ function isKey(value, object) {
+ if (isArray(value)) {
+ return false;
+ }
+ var type = typeof value;
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+ value == null || isSymbol(value)) {
+ return true;
+ }
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+ (object != null && value in Object(object));
+ }
+
+ /**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+ function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+ }
+
+ /**
+ * Checks if `func` has a lazy counterpart.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
+ * else `false`.
+ */
+ function isLaziable(func) {
+ var funcName = getFuncName(func),
+ other = lodash[funcName];
+
+ if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
+ return false;
+ }
+ if (func === other) {
+ return true;
+ }
+ var data = getData(other);
+ return !!data && func === data[0];
+ }
+
+ /**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+ function isMasked(func) {
+ return !!maskSrcKey && (maskSrcKey in func);
+ }
+
+ /**
+ * Checks if `func` is capable of being masked.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
+ */
+ var isMaskable = coreJsData ? isFunction : stubFalse;
+
+ /**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+ function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+ }
+
+ /**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+ function isStrictComparable(value) {
+ return value === value && !isObject(value);
+ }
+
+ /**
+ * A specialized version of `matchesProperty` for source values suitable
+ * for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function matchesStrictComparable(key, srcValue) {
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === srcValue &&
+ (srcValue !== undefined || (key in Object(object)));
+ };
+ }
+
+ /**
+ * A specialized version of `_.memoize` which clears the memoized function's
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
+ *
+ * @private
+ * @param {Function} func The function to have its output memoized.
+ * @returns {Function} Returns the new memoized function.
+ */
+ function memoizeCapped(func) {
+ var result = memoize(func, function(key) {
+ if (cache.size === MAX_MEMOIZE_SIZE) {
+ cache.clear();
+ }
+ return key;
+ });
+
+ var cache = result.cache;
+ return result;
+ }
+
+ /**
+ * Merges the function metadata of `source` into `data`.
+ *
+ * Merging metadata reduces the number of wrappers used to invoke a function.
+ * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
+ * may be applied regardless of execution order. Methods like `_.ary` and
+ * `_.rearg` modify function arguments, making the order in which they are
+ * executed important, preventing the merging of metadata. However, we make
+ * an exception for a safe combined case where curried functions have `_.ary`
+ * and or `_.rearg` applied.
+ *
+ * @private
+ * @param {Array} data The destination metadata.
+ * @param {Array} source The source metadata.
+ * @returns {Array} Returns `data`.
+ */
+ function mergeData(data, source) {
+ var bitmask = data[1],
+ srcBitmask = source[1],
+ newBitmask = bitmask | srcBitmask,
+ isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
+
+ var isCombo =
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
+ ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
+
+ // Exit early if metadata can't be merged.
+ if (!(isCommon || isCombo)) {
+ return data;
+ }
+ // Use source `thisArg` if available.
+ if (srcBitmask & WRAP_BIND_FLAG) {
+ data[2] = source[2];
+ // Set when currying a bound function.
+ newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
+ }
+ // Compose partial arguments.
+ var value = source[3];
+ if (value) {
+ var partials = data[3];
+ data[3] = partials ? composeArgs(partials, value, source[4]) : value;
+ data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
+ }
+ // Compose partial right arguments.
+ value = source[5];
+ if (value) {
+ partials = data[5];
+ data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
+ data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
+ }
+ // Use source `argPos` if available.
+ value = source[7];
+ if (value) {
+ data[7] = value;
+ }
+ // Use source `ary` if it's smaller.
+ if (srcBitmask & WRAP_ARY_FLAG) {
+ data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
+ }
+ // Use source `arity` if one is not provided.
+ if (data[9] == null) {
+ data[9] = source[9];
+ }
+ // Use source `func` and merge bitmasks.
+ data[0] = source[0];
+ data[1] = newBitmask;
+
+ return data;
+ }
+
+ /**
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function nativeKeysIn(object) {
+ var result = [];
+ if (object != null) {
+ for (var key in Object(object)) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts `value` to a string using `Object.prototype.toString`.
+ *
+ * @private
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ */
+ function objectToString(value) {
+ return nativeObjectToString.call(value);
+ }
+
+ /**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return apply(func, this, otherArgs);
+ };
+ }
+
+ /**
+ * Gets the parent value at `path` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} path The path to get the parent value of.
+ * @returns {*} Returns the parent value.
+ */
+ function parent(object, path) {
+ return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
+ }
+
+ /**
+ * Reorder `array` according to the specified indexes where the element at
+ * the first index is assigned as the first element, the element at
+ * the second index is assigned as the second element, and so on.
+ *
+ * @private
+ * @param {Array} array The array to reorder.
+ * @param {Array} indexes The arranged array indexes.
+ * @returns {Array} Returns `array`.
+ */
+ function reorder(array, indexes) {
+ var arrLength = array.length,
+ length = nativeMin(indexes.length, arrLength),
+ oldArray = copyArray(array);
+
+ while (length--) {
+ var index = indexes[length];
+ array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
+ }
+ return array;
+ }
+
+ /**
+ * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+ function safeGet(object, key) {
+ if (key === 'constructor' && typeof object[key] === 'function') {
+ return;
+ }
+
+ if (key == '__proto__') {
+ return;
+ }
+
+ return object[key];
+ }
+
+ /**
+ * Sets metadata for `func`.
+ *
+ * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
+ * period of time, it will trip its breaker and transition to an identity
+ * function to avoid garbage collection pauses in V8. See
+ * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
+ * for more details.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+ var setData = shortOut(baseSetData);
+
+ /**
+ * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @returns {number|Object} Returns the timer id or timeout object.
+ */
+ var setTimeout = ctxSetTimeout || function(func, wait) {
+ return root.setTimeout(func, wait);
+ };
+
+ /**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+ var setToString = shortOut(baseSetToString);
+
+ /**
+ * Sets the `toString` method of `wrapper` to mimic the source of `reference`
+ * with wrapper details in a comment at the top of the source body.
+ *
+ * @private
+ * @param {Function} wrapper The function to modify.
+ * @param {Function} reference The reference function.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Function} Returns `wrapper`.
+ */
+ function setWrapToString(wrapper, reference, bitmask) {
+ var source = (reference + '');
+ return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
+ }
+
+ /**
+ * Creates a function that'll short out and invoke `identity` instead
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
+ * milliseconds.
+ *
+ * @private
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new shortable function.
+ */
+ function shortOut(func) {
+ var count = 0,
+ lastCalled = 0;
+
+ return function() {
+ var stamp = nativeNow(),
+ remaining = HOT_SPAN - (stamp - lastCalled);
+
+ lastCalled = stamp;
+ if (remaining > 0) {
+ if (++count >= HOT_COUNT) {
+ return arguments[0];
+ }
+ } else {
+ count = 0;
+ }
+ return func.apply(undefined, arguments);
+ };
+ }
+
+ /**
+ * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @param {number} [size=array.length] The size of `array`.
+ * @returns {Array} Returns `array`.
+ */
+ function shuffleSelf(array, size) {
+ var index = -1,
+ length = array.length,
+ lastIndex = length - 1;
+
+ size = size === undefined ? length : size;
+ while (++index < size) {
+ var rand = baseRandom(index, lastIndex),
+ value = array[rand];
+
+ array[rand] = array[index];
+ array[index] = value;
+ }
+ array.length = size;
+ return array;
+ }
+
+ /**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+ var stringToPath = memoizeCapped(function(string) {
+ var result = [];
+ if (string.charCodeAt(0) === 46 /* . */) {
+ result.push('');
+ }
+ string.replace(rePropName, function(match, number, quote, subString) {
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+ });
+
+ /**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+ function toKey(value) {
+ if (typeof value == 'string' || isSymbol(value)) {
+ return value;
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ /**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to convert.
+ * @returns {string} Returns the source code.
+ */
+ function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+ }
+
+ /**
+ * Updates wrapper `details` based on `bitmask` flags.
+ *
+ * @private
+ * @returns {Array} details The details to modify.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Array} Returns `details`.
+ */
+ function updateWrapDetails(details, bitmask) {
+ arrayEach(wrapFlags, function(pair) {
+ var value = '_.' + pair[0];
+ if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
+ details.push(value);
+ }
+ });
+ return details.sort();
+ }
+
+ /**
+ * Creates a clone of `wrapper`.
+ *
+ * @private
+ * @param {Object} wrapper The wrapper to clone.
+ * @returns {Object} Returns the cloned wrapper.
+ */
+ function wrapperClone(wrapper) {
+ if (wrapper instanceof LazyWrapper) {
+ return wrapper.clone();
+ }
+ var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
+ result.__actions__ = copyArray(wrapper.__actions__);
+ result.__index__ = wrapper.__index__;
+ result.__values__ = wrapper.__values__;
+ return result;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array of elements split into groups the length of `size`.
+ * If `array` can't be split evenly, the final chunk will be the remaining
+ * elements.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to process.
+ * @param {number} [size=1] The length of each chunk
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the new array of chunks.
+ * @example
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 2);
+ * // => [['a', 'b'], ['c', 'd']]
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 3);
+ * // => [['a', 'b', 'c'], ['d']]
+ */
+ function chunk(array, size, guard) {
+ if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
+ size = 1;
+ } else {
+ size = nativeMax(toInteger(size), 0);
+ }
+ var length = array == null ? 0 : array.length;
+ if (!length || size < 1) {
+ return [];
+ }
+ var index = 0,
+ resIndex = 0,
+ result = Array(nativeCeil(length / size));
+
+ while (index < length) {
+ result[resIndex++] = baseSlice(array, index, (index += size));
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array with all falsey values removed. The values `false`, `null`,
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to compact.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.compact([0, 1, false, 2, '', 3]);
+ * // => [1, 2, 3]
+ */
+ function compact(array) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates a new array concatenating `array` with any additional arrays
+ * and/or values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to concatenate.
+ * @param {...*} [values] The values to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ * @example
+ *
+ * var array = [1];
+ * var other = _.concat(array, 2, [3], [[4]]);
+ *
+ * console.log(other);
+ * // => [1, 2, 3, [4]]
+ *
+ * console.log(array);
+ * // => [1]
+ */
+ function concat() {
+ var length = arguments.length;
+ if (!length) {
+ return [];
+ }
+ var args = Array(length - 1),
+ array = arguments[0],
+ index = length;
+
+ while (index--) {
+ args[index - 1] = arguments[index];
+ }
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
+ }
+
+ /**
+ * Creates an array of `array` values not included in the other given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
+ *
+ * **Note:** Unlike `_.pullAll`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.without, _.xor
+ * @example
+ *
+ * _.difference([2, 1], [2, 3]);
+ * // => [1]
+ */
+ var difference = baseRest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
+ : [];
+ });
+
+ /**
+ * This method is like `_.difference` except that it accepts `iteratee` which
+ * is invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+ var differenceBy = baseRest(function(array, values) {
+ var iteratee = last(values);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
+ : [];
+ });
+
+ /**
+ * This method is like `_.difference` except that it accepts `comparator`
+ * which is invoked to compare elements of `array` to `values`. The order and
+ * references of result values are determined by the first array. The comparator
+ * is invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ *
+ * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }]
+ */
+ var differenceWith = baseRest(function(array, values) {
+ var comparator = last(values);
+ if (isArrayLikeObject(comparator)) {
+ comparator = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
+ : [];
+ });
+
+ /**
+ * Creates a slice of `array` with `n` elements dropped from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.drop([1, 2, 3]);
+ * // => [2, 3]
+ *
+ * _.drop([1, 2, 3], 2);
+ * // => [3]
+ *
+ * _.drop([1, 2, 3], 5);
+ * // => []
+ *
+ * _.drop([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+ function drop(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, n < 0 ? 0 : n, length);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements dropped from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.dropRight([1, 2, 3]);
+ * // => [1, 2]
+ *
+ * _.dropRight([1, 2, 3], 2);
+ * // => [1]
+ *
+ * _.dropRight([1, 2, 3], 5);
+ * // => []
+ *
+ * _.dropRight([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+ function dropRight(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` excluding elements dropped from the end.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.dropRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropRightWhile(users, ['active', false]);
+ * // => objects for ['barney']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropRightWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+ function dropRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), true, true)
+ : [];
+ }
+
+ /**
+ * Creates a slice of `array` excluding elements dropped from the beginning.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.dropWhile(users, function(o) { return !o.active; });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropWhile(users, ['active', false]);
+ * // => objects for ['pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+ function dropWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), true)
+ : [];
+ }
+
+ /**
+ * Fills elements of `array` with `value` from `start` up to, but not
+ * including, `end`.
+ *
+ * **Note:** This method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Array
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.fill(array, 'a');
+ * console.log(array);
+ * // => ['a', 'a', 'a']
+ *
+ * _.fill(Array(3), 2);
+ * // => [2, 2, 2]
+ *
+ * _.fill([4, 6, 8, 10], '*', 1, 3);
+ * // => [4, '*', '*', 10]
+ */
+ function fill(array, value, start, end) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
+ start = 0;
+ end = length;
+ }
+ return baseFill(array, value, start, end);
+ }
+
+ /**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
+ * // => 0
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findIndex(users, ['active', false]);
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+ function findIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseFindIndex(array, getIteratee(predicate, 3), index);
+ }
+
+ /**
+ * This method is like `_.findIndex` except that it iterates over elements
+ * of `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
+ * // => 2
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastIndex(users, { 'user': 'barney', 'active': true });
+ * // => 0
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastIndex(users, ['active', false]);
+ * // => 2
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastIndex(users, 'active');
+ * // => 0
+ */
+ function findLastIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = length - 1;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = fromIndex < 0
+ ? nativeMax(length + index, 0)
+ : nativeMin(index, length - 1);
+ }
+ return baseFindIndex(array, getIteratee(predicate, 3), index, true);
+ }
+
+ /**
+ * Flattens `array` a single level deep.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, [3, [4]], 5]
+ */
+ function flatten(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, 1) : [];
+ }
+
+ /**
+ * Recursively flattens `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, 3, 4, 5]
+ */
+ function flattenDeep(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, INFINITY) : [];
+ }
+
+ /**
+ * Recursively flatten `array` up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * var array = [1, [2, [3, [4]], 5]];
+ *
+ * _.flattenDepth(array, 1);
+ * // => [1, 2, [3, [4]], 5]
+ *
+ * _.flattenDepth(array, 2);
+ * // => [1, 2, 3, [4], 5]
+ */
+ function flattenDepth(array, depth) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(array, depth);
+ }
+
+ /**
+ * The inverse of `_.toPairs`; this method returns an object composed
+ * from key-value `pairs`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} pairs The key-value pairs.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.fromPairs([['a', 1], ['b', 2]]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+ function fromPairs(pairs) {
+ var index = -1,
+ length = pairs == null ? 0 : pairs.length,
+ result = {};
+
+ while (++index < length) {
+ var pair = pairs[index];
+ result[pair[0]] = pair[1];
+ }
+ return result;
+ }
+
+ /**
+ * Gets the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias first
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the first element of `array`.
+ * @example
+ *
+ * _.head([1, 2, 3]);
+ * // => 1
+ *
+ * _.head([]);
+ * // => undefined
+ */
+ function head(array) {
+ return (array && array.length) ? array[0] : undefined;
+ }
+
+ /**
+ * Gets the index at which the first occurrence of `value` is found in `array`
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it's used as the
+ * offset from the end of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.indexOf([1, 2, 1, 2], 2);
+ * // => 1
+ *
+ * // Search from the `fromIndex`.
+ * _.indexOf([1, 2, 1, 2], 2, 2);
+ * // => 3
+ */
+ function indexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseIndexOf(array, value, index);
+ }
+
+ /**
+ * Gets all but the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.initial([1, 2, 3]);
+ * // => [1, 2]
+ */
+ function initial(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 0, -1) : [];
+ }
+
+ /**
+ * Creates an array of unique values that are included in all given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersection([2, 1], [2, 3]);
+ * // => [2]
+ */
+ var intersection = baseRest(function(arrays) {
+ var mapped = arrayMap(arrays, castArrayLikeObject);
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped)
+ : [];
+ });
+
+ /**
+ * This method is like `_.intersection` except that it accepts `iteratee`
+ * which is invoked for each element of each `arrays` to generate the criterion
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [2.1]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }]
+ */
+ var intersectionBy = baseRest(function(arrays) {
+ var iteratee = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ if (iteratee === last(mapped)) {
+ iteratee = undefined;
+ } else {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, getIteratee(iteratee, 2))
+ : [];
+ });
+
+ /**
+ * This method is like `_.intersection` except that it accepts `comparator`
+ * which is invoked to compare elements of `arrays`. The order and references
+ * of result values are determined by the first array. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.intersectionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }]
+ */
+ var intersectionWith = baseRest(function(arrays) {
+ var comparator = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ if (comparator) {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, undefined, comparator)
+ : [];
+ });
+
+ /**
+ * Converts all elements in `array` into a string separated by `separator`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to convert.
+ * @param {string} [separator=','] The element separator.
+ * @returns {string} Returns the joined string.
+ * @example
+ *
+ * _.join(['a', 'b', 'c'], '~');
+ * // => 'a~b~c'
+ */
+ function join(array, separator) {
+ return array == null ? '' : nativeJoin.call(array, separator);
+ }
+
+ /**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+ function last(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? array[length - 1] : undefined;
+ }
+
+ /**
+ * This method is like `_.indexOf` except that it iterates over elements of
+ * `array` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.lastIndexOf([1, 2, 1, 2], 2);
+ * // => 3
+ *
+ * // Search from the `fromIndex`.
+ * _.lastIndexOf([1, 2, 1, 2], 2, 2);
+ * // => 1
+ */
+ function lastIndexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = length;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
+ }
+ return value === value
+ ? strictLastIndexOf(array, value, index)
+ : baseFindIndex(array, baseIsNaN, index, true);
+ }
+
+ /**
+ * Gets the element at index `n` of `array`. If `n` is negative, the nth
+ * element from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.11.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=0] The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ *
+ * _.nth(array, 1);
+ * // => 'b'
+ *
+ * _.nth(array, -2);
+ * // => 'c';
+ */
+ function nth(array, n) {
+ return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
+ }
+
+ /**
+ * Removes all given values from `array` using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
+ * to remove elements from an array by predicate.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...*} [values] The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+ *
+ * _.pull(array, 'a', 'c');
+ * console.log(array);
+ * // => ['b', 'b']
+ */
+ var pull = baseRest(pullAll);
+
+ /**
+ * This method is like `_.pull` except that it accepts an array of values to remove.
+ *
+ * **Note:** Unlike `_.difference`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+ *
+ * _.pullAll(array, ['a', 'c']);
+ * console.log(array);
+ * // => ['b', 'b']
+ */
+ function pullAll(array, values) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values)
+ : array;
+ }
+
+ /**
+ * This method is like `_.pullAll` except that it accepts `iteratee` which is
+ * invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The iteratee is invoked with one argument: (value).
+ *
+ * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
+ *
+ * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
+ * console.log(array);
+ * // => [{ 'x': 2 }]
+ */
+ function pullAllBy(array, values, iteratee) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, getIteratee(iteratee, 2))
+ : array;
+ }
+
+ /**
+ * This method is like `_.pullAll` except that it accepts `comparator` which
+ * is invoked to compare elements of `array` to `values`. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
+ *
+ * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
+ * console.log(array);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
+ */
+ function pullAllWith(array, values, comparator) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, undefined, comparator)
+ : array;
+ }
+
+ /**
+ * Removes elements from `array` corresponding to `indexes` and returns an
+ * array of removed elements.
+ *
+ * **Note:** Unlike `_.at`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...(number|number[])} [indexes] The indexes of elements to remove.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ * var pulled = _.pullAt(array, [1, 3]);
+ *
+ * console.log(array);
+ * // => ['a', 'c']
+ *
+ * console.log(pulled);
+ * // => ['b', 'd']
+ */
+ var pullAt = flatRest(function(array, indexes) {
+ var length = array == null ? 0 : array.length,
+ result = baseAt(array, indexes);
+
+ basePullAt(array, arrayMap(indexes, function(index) {
+ return isIndex(index, length) ? +index : index;
+ }).sort(compareAscending));
+
+ return result;
+ });
+
+ /**
+ * Removes all elements from `array` that `predicate` returns truthy for
+ * and returns an array of the removed elements. The predicate is invoked
+ * with three arguments: (value, index, array).
+ *
+ * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
+ * to pull elements from an array by value.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = [1, 2, 3, 4];
+ * var evens = _.remove(array, function(n) {
+ * return n % 2 == 0;
+ * });
+ *
+ * console.log(array);
+ * // => [1, 3]
+ *
+ * console.log(evens);
+ * // => [2, 4]
+ */
+ function remove(array, predicate) {
+ var result = [];
+ if (!(array && array.length)) {
+ return result;
+ }
+ var index = -1,
+ indexes = [],
+ length = array.length;
+
+ predicate = getIteratee(predicate, 3);
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result.push(value);
+ indexes.push(index);
+ }
+ }
+ basePullAt(array, indexes);
+ return result;
+ }
+
+ /**
+ * Reverses `array` so that the first element becomes the last, the second
+ * element becomes the second to last, and so on.
+ *
+ * **Note:** This method mutates `array` and is based on
+ * [`Array#reverse`](https://mdn.io/Array/reverse).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.reverse(array);
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+ function reverse(array) {
+ return array == null ? array : nativeReverse.call(array);
+ }
+
+ /**
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
+ *
+ * **Note:** This method is used instead of
+ * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
+ * returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function slice(array, start, end) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
+ start = 0;
+ end = length;
+ }
+ else {
+ start = start == null ? 0 : toInteger(start);
+ end = end === undefined ? length : toInteger(end);
+ }
+ return baseSlice(array, start, end);
+ }
+
+ /**
+ * Uses a binary search to determine the lowest index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedIndex([30, 50], 40);
+ * // => 1
+ */
+ function sortedIndex(array, value) {
+ return baseSortedIndex(array, value);
+ }
+
+ /**
+ * This method is like `_.sortedIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
+ *
+ * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
+ * // => 0
+ */
+ function sortedIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
+ }
+
+ /**
+ * This method is like `_.indexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
+ * // => 1
+ */
+ function sortedIndexOf(array, value) {
+ var length = array == null ? 0 : array.length;
+ if (length) {
+ var index = baseSortedIndex(array, value);
+ if (index < length && eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * This method is like `_.sortedIndex` except that it returns the highest
+ * index at which `value` should be inserted into `array` in order to
+ * maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
+ * // => 4
+ */
+ function sortedLastIndex(array, value) {
+ return baseSortedIndex(array, value, true);
+ }
+
+ /**
+ * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
+ *
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+ * // => 1
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
+ * // => 1
+ */
+ function sortedLastIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
+ }
+
+ /**
+ * This method is like `_.lastIndexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
+ * // => 3
+ */
+ function sortedLastIndexOf(array, value) {
+ var length = array == null ? 0 : array.length;
+ if (length) {
+ var index = baseSortedIndex(array, value, true) - 1;
+ if (eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * This method is like `_.uniq` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniq([1, 1, 2]);
+ * // => [1, 2]
+ */
+ function sortedUniq(array) {
+ return (array && array.length)
+ ? baseSortedUniq(array)
+ : [];
+ }
+
+ /**
+ * This method is like `_.uniqBy` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
+ * // => [1.1, 2.3]
+ */
+ function sortedUniqBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSortedUniq(array, getIteratee(iteratee, 2))
+ : [];
+ }
+
+ /**
+ * Gets all but the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.tail([1, 2, 3]);
+ * // => [2, 3]
+ */
+ function tail(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 1, length) : [];
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements taken from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.take([1, 2, 3]);
+ * // => [1]
+ *
+ * _.take([1, 2, 3], 2);
+ * // => [1, 2]
+ *
+ * _.take([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.take([1, 2, 3], 0);
+ * // => []
+ */
+ function take(array, n, guard) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements taken from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.takeRight([1, 2, 3]);
+ * // => [3]
+ *
+ * _.takeRight([1, 2, 3], 2);
+ * // => [2, 3]
+ *
+ * _.takeRight([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.takeRight([1, 2, 3], 0);
+ * // => []
+ */
+ function takeRight(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, n < 0 ? 0 : n, length);
+ }
+
+ /**
+ * Creates a slice of `array` with elements taken from the end. Elements are
+ * taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.takeRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeRightWhile(users, ['active', false]);
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeRightWhile(users, 'active');
+ * // => []
+ */
+ function takeRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), false, true)
+ : [];
+ }
+
+ /**
+ * Creates a slice of `array` with elements taken from the beginning. Elements
+ * are taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.takeWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeWhile(users, ['active', false]);
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeWhile(users, 'active');
+ * // => []
+ */
+ function takeWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3))
+ : [];
+ }
+
+ /**
+ * Creates an array of unique values, in order, from all given arrays using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.union([2], [1, 2]);
+ * // => [2, 1]
+ */
+ var union = baseRest(function(arrays) {
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
+ });
+
+ /**
+ * This method is like `_.union` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which uniqueness is computed. Result values are chosen from the first
+ * array in which the value occurs. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.unionBy([2.1], [1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+ var unionBy = baseRest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
+ });
+
+ /**
+ * This method is like `_.union` except that it accepts `comparator` which
+ * is invoked to compare elements of `arrays`. Result values are chosen from
+ * the first array in which the value occurs. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.unionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+ var unionWith = baseRest(function(arrays) {
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
+ });
+
+ /**
+ * Creates a duplicate-free version of an array, using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons, in which only the first occurrence of each element
+ * is kept. The order of result values is determined by the order they occur
+ * in the array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniq([2, 1, 2]);
+ * // => [2, 1]
+ */
+ function uniq(array) {
+ return (array && array.length) ? baseUniq(array) : [];
+ }
+
+ /**
+ * This method is like `_.uniq` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * uniqueness is computed. The order of result values is determined by the
+ * order they occur in the array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+ function uniqBy(array, iteratee) {
+ return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
+ }
+
+ /**
+ * This method is like `_.uniq` except that it accepts `comparator` which
+ * is invoked to compare elements of `array`. The order of result values is
+ * determined by the order they occur in the array.The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.uniqWith(objects, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
+ */
+ function uniqWith(array, comparator) {
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
+ }
+
+ /**
+ * This method is like `_.zip` except that it accepts an array of grouped
+ * elements and creates an array regrouping the elements to their pre-zip
+ * configuration.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.2.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
+ * // => [['a', 1, true], ['b', 2, false]]
+ *
+ * _.unzip(zipped);
+ * // => [['a', 'b'], [1, 2], [true, false]]
+ */
+ function unzip(array) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var length = 0;
+ array = arrayFilter(array, function(group) {
+ if (isArrayLikeObject(group)) {
+ length = nativeMax(group.length, length);
+ return true;
+ }
+ });
+ return baseTimes(length, function(index) {
+ return arrayMap(array, baseProperty(index));
+ });
+ }
+
+ /**
+ * This method is like `_.unzip` except that it accepts `iteratee` to specify
+ * how regrouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * regrouped values.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
+ * // => [[1, 10, 100], [2, 20, 200]]
+ *
+ * _.unzipWith(zipped, _.add);
+ * // => [3, 30, 300]
+ */
+ function unzipWith(array, iteratee) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var result = unzip(array);
+ if (iteratee == null) {
+ return result;
+ }
+ return arrayMap(result, function(group) {
+ return apply(iteratee, undefined, group);
+ });
+ }
+
+ /**
+ * Creates an array excluding all given values using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.pull`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...*} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.xor
+ * @example
+ *
+ * _.without([2, 1, 2, 3], 1, 2);
+ * // => [3]
+ */
+ var without = baseRest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, values)
+ : [];
+ });
+
+ /**
+ * Creates an array of unique values that is the
+ * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
+ * of the given arrays. The order of result values is determined by the order
+ * they occur in the arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.without
+ * @example
+ *
+ * _.xor([2, 1], [2, 3]);
+ * // => [1, 3]
+ */
+ var xor = baseRest(function(arrays) {
+ return baseXor(arrayFilter(arrays, isArrayLikeObject));
+ });
+
+ /**
+ * This method is like `_.xor` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which by which they're compared. The order of result values is determined
+ * by the order they occur in the arrays. The iteratee is invoked with one
+ * argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [1.2, 3.4]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+ var xorBy = baseRest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
+ });
+
+ /**
+ * This method is like `_.xor` except that it accepts `comparator` which is
+ * invoked to compare elements of `arrays`. The order of result values is
+ * determined by the order they occur in the arrays. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.xorWith(objects, others, _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+ var xorWith = baseRest(function(arrays) {
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
+ });
+
+ /**
+ * Creates an array of grouped elements, the first of which contains the
+ * first elements of the given arrays, the second of which contains the
+ * second elements of the given arrays, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zip(['a', 'b'], [1, 2], [true, false]);
+ * // => [['a', 1, true], ['b', 2, false]]
+ */
+ var zip = baseRest(unzip);
+
+ /**
+ * This method is like `_.fromPairs` except that it accepts two arrays,
+ * one of property identifiers and one of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.4.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObject(['a', 'b'], [1, 2]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+ function zipObject(props, values) {
+ return baseZipObject(props || [], values || [], assignValue);
+ }
+
+ /**
+ * This method is like `_.zipObject` except that it supports property paths.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
+ * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
+ */
+ function zipObjectDeep(props, values) {
+ return baseZipObject(props || [], values || [], baseSet);
+ }
+
+ /**
+ * This method is like `_.zip` except that it accepts `iteratee` to specify
+ * how grouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * grouped values.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
+ * return a + b + c;
+ * });
+ * // => [111, 222]
+ */
+ var zipWith = baseRest(function(arrays) {
+ var length = arrays.length,
+ iteratee = length > 1 ? arrays[length - 1] : undefined;
+
+ iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
+ return unzipWith(arrays, iteratee);
+ });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` wrapper instance that wraps `value` with explicit method
+ * chain sequences enabled. The result of such sequences must be unwrapped
+ * with `_#value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Seq
+ * @param {*} value The value to wrap.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'pebbles', 'age': 1 }
+ * ];
+ *
+ * var youngest = _
+ * .chain(users)
+ * .sortBy('age')
+ * .map(function(o) {
+ * return o.user + ' is ' + o.age;
+ * })
+ * .head()
+ * .value();
+ * // => 'pebbles is 1'
+ */
+ function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+ }
+
+ /**
+ * This method invokes `interceptor` and returns `value`. The interceptor
+ * is invoked with one argument; (value). The purpose of this method is to
+ * "tap into" a method chain sequence in order to modify intermediate results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * _([1, 2, 3])
+ * .tap(function(array) {
+ * // Mutate input array.
+ * array.pop();
+ * })
+ * .reverse()
+ * .value();
+ * // => [2, 1]
+ */
+ function tap(value, interceptor) {
+ interceptor(value);
+ return value;
+ }
+
+ /**
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
+ * The purpose of this method is to "pass thru" values replacing intermediate
+ * results in a method chain sequence.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns the result of `interceptor`.
+ * @example
+ *
+ * _(' abc ')
+ * .chain()
+ * .trim()
+ * .thru(function(value) {
+ * return [value];
+ * })
+ * .value();
+ * // => ['abc']
+ */
+ function thru(value, interceptor) {
+ return interceptor(value);
+ }
+
+ /**
+ * This method is the wrapper version of `_.at`.
+ *
+ * @name at
+ * @memberOf _
+ * @since 1.0.0
+ * @category Seq
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _(object).at(['a[0].b.c', 'a[1]']).value();
+ * // => [3, 4]
+ */
+ var wrapperAt = flatRest(function(paths) {
+ var length = paths.length,
+ start = length ? paths[0] : 0,
+ value = this.__wrapped__,
+ interceptor = function(object) { return baseAt(object, paths); };
+
+ if (length > 1 || this.__actions__.length ||
+ !(value instanceof LazyWrapper) || !isIndex(start)) {
+ return this.thru(interceptor);
+ }
+ value = value.slice(start, +start + (length ? 1 : 0));
+ value.__actions__.push({
+ 'func': thru,
+ 'args': [interceptor],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(value, this.__chain__).thru(function(array) {
+ if (length && !array.length) {
+ array.push(undefined);
+ }
+ return array;
+ });
+ });
+
+ /**
+ * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
+ *
+ * @name chain
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * // A sequence without explicit chaining.
+ * _(users).head();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // A sequence with explicit chaining.
+ * _(users)
+ * .chain()
+ * .head()
+ * .pick('user')
+ * .value();
+ * // => { 'user': 'barney' }
+ */
+ function wrapperChain() {
+ return chain(this);
+ }
+
+ /**
+ * Executes the chain sequence and returns the wrapped result.
+ *
+ * @name commit
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2];
+ * var wrapped = _(array).push(3);
+ *
+ * console.log(array);
+ * // => [1, 2]
+ *
+ * wrapped = wrapped.commit();
+ * console.log(array);
+ * // => [1, 2, 3]
+ *
+ * wrapped.last();
+ * // => 3
+ *
+ * console.log(array);
+ * // => [1, 2, 3]
+ */
+ function wrapperCommit() {
+ return new LodashWrapper(this.value(), this.__chain__);
+ }
+
+ /**
+ * Gets the next value on a wrapped object following the
+ * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
+ *
+ * @name next
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the next iterator value.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 1 }
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 2 }
+ *
+ * wrapped.next();
+ * // => { 'done': true, 'value': undefined }
+ */
+ function wrapperNext() {
+ if (this.__values__ === undefined) {
+ this.__values__ = toArray(this.value());
+ }
+ var done = this.__index__ >= this.__values__.length,
+ value = done ? undefined : this.__values__[this.__index__++];
+
+ return { 'done': done, 'value': value };
+ }
+
+ /**
+ * Enables the wrapper to be iterable.
+ *
+ * @name Symbol.iterator
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the wrapper object.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped[Symbol.iterator]() === wrapped;
+ * // => true
+ *
+ * Array.from(wrapped);
+ * // => [1, 2]
+ */
+ function wrapperToIterator() {
+ return this;
+ }
+
+ /**
+ * Creates a clone of the chain sequence planting `value` as the wrapped value.
+ *
+ * @name plant
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @param {*} value The value to plant.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2]).map(square);
+ * var other = wrapped.plant([3, 4]);
+ *
+ * other.value();
+ * // => [9, 16]
+ *
+ * wrapped.value();
+ * // => [1, 4]
+ */
+ function wrapperPlant(value) {
+ var result,
+ parent = this;
+
+ while (parent instanceof baseLodash) {
+ var clone = wrapperClone(parent);
+ clone.__index__ = 0;
+ clone.__values__ = undefined;
+ if (result) {
+ previous.__wrapped__ = clone;
+ } else {
+ result = clone;
+ }
+ var previous = clone;
+ parent = parent.__wrapped__;
+ }
+ previous.__wrapped__ = value;
+ return result;
+ }
+
+ /**
+ * This method is the wrapper version of `_.reverse`.
+ *
+ * **Note:** This method mutates the wrapped array.
+ *
+ * @name reverse
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _(array).reverse().value()
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+ function wrapperReverse() {
+ var value = this.__wrapped__;
+ if (value instanceof LazyWrapper) {
+ var wrapped = value;
+ if (this.__actions__.length) {
+ wrapped = new LazyWrapper(this);
+ }
+ wrapped = wrapped.reverse();
+ wrapped.__actions__.push({
+ 'func': thru,
+ 'args': [reverse],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(wrapped, this.__chain__);
+ }
+ return this.thru(reverse);
+ }
+
+ /**
+ * Executes the chain sequence to resolve the unwrapped value.
+ *
+ * @name value
+ * @memberOf _
+ * @since 0.1.0
+ * @alias toJSON, valueOf
+ * @category Seq
+ * @returns {*} Returns the resolved unwrapped value.
+ * @example
+ *
+ * _([1, 2, 3]).value();
+ * // => [1, 2, 3]
+ */
+ function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the number of times the key was returned by `iteratee`. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.countBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': 1, '6': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.countBy(['one', 'two', 'three'], 'length');
+ * // => { '3': 2, '5': 1 }
+ */
+ var countBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ ++result[key];
+ } else {
+ baseAssignValue(result, key, 1);
+ }
+ });
+
+ /**
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
+ * Iteration is stopped once `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * **Note:** This method returns `true` for
+ * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
+ * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
+ * elements of empty collections.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.every([true, 1, null, 'yes'], Boolean);
+ * // => false
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.every(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.every(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.every(users, 'active');
+ * // => false
+ */
+ function every(collection, predicate, guard) {
+ var func = isArray(collection) ? arrayEvery : baseEvery;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * **Note:** Unlike `_.remove`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
+ *
+ * // Combining several predicates using `_.overEvery` or `_.overSome`.
+ * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
+ * // => objects for ['fred', 'barney']
+ */
+ function filter(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.find(users, function(o) { return o.age < 40; });
+ * // => object for 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.find(users, { 'age': 1, 'active': true });
+ * // => object for 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.find(users, ['active', false]);
+ * // => object for 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.find(users, 'active');
+ * // => object for 'barney'
+ */
+ var find = createFind(findIndex);
+
+ /**
+ * This method is like `_.find` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=collection.length-1] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * _.findLast([1, 2, 3, 4], function(n) {
+ * return n % 2 == 1;
+ * });
+ * // => 3
+ */
+ var findLast = createFind(findLastIndex);
+
+ /**
+ * Creates a flattened array of values by running each element in `collection`
+ * thru `iteratee` and flattening the mapped results. The iteratee is invoked
+ * with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [n, n];
+ * }
+ *
+ * _.flatMap([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+ function flatMap(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), 1);
+ }
+
+ /**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDeep([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+ function flatMapDeep(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), INFINITY);
+ }
+
+ /**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDepth([1, 2], duplicate, 2);
+ * // => [[1, 1], [2, 2]]
+ */
+ function flatMapDepth(collection, iteratee, depth) {
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(map(collection, iteratee), depth);
+ }
+
+ /**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _.forEach([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forEach(collection, iteratee) {
+ var func = isArray(collection) ? arrayEach : baseEach;
+ return func(collection, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * This method is like `_.forEach` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @alias eachRight
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEach
+ * @example
+ *
+ * _.forEachRight([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `2` then `1`.
+ */
+ function forEachRight(collection, iteratee) {
+ var func = isArray(collection) ? arrayEachRight : baseEachRight;
+ return func(collection, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The order of grouped values
+ * is determined by the order they occur in `collection`. The corresponding
+ * value of each key is an array of elements responsible for generating the
+ * key. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.groupBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': [4.2], '6': [6.1, 6.3] }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.groupBy(['one', 'two', 'three'], 'length');
+ * // => { '3': ['one', 'two'], '5': ['three'] }
+ */
+ var groupBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ result[key].push(value);
+ } else {
+ baseAssignValue(result, key, [value]);
+ }
+ });
+
+ /**
+ * Checks if `value` is in `collection`. If `collection` is a string, it's
+ * checked for a substring of `value`, otherwise
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * is used for equality comparisons. If `fromIndex` is negative, it's used as
+ * the offset from the end of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
+ * @example
+ *
+ * _.includes([1, 2, 3], 1);
+ * // => true
+ *
+ * _.includes([1, 2, 3], 1, 2);
+ * // => false
+ *
+ * _.includes({ 'a': 1, 'b': 2 }, 1);
+ * // => true
+ *
+ * _.includes('abcd', 'bc');
+ * // => true
+ */
+ function includes(collection, value, fromIndex, guard) {
+ collection = isArrayLike(collection) ? collection : values(collection);
+ fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
+
+ var length = collection.length;
+ if (fromIndex < 0) {
+ fromIndex = nativeMax(length + fromIndex, 0);
+ }
+ return isString(collection)
+ ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
+ : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
+ }
+
+ /**
+ * Invokes the method at `path` of each element in `collection`, returning
+ * an array of the results of each invoked method. Any additional arguments
+ * are provided to each invoked method. If `path` is a function, it's invoked
+ * for, and `this` bound to, each element in `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|string} path The path of the method to invoke or
+ * the function invoked per iteration.
+ * @param {...*} [args] The arguments to invoke each method with.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
+ * // => [[1, 5, 7], [1, 2, 3]]
+ *
+ * _.invokeMap([123, 456], String.prototype.split, '');
+ * // => [['1', '2', '3'], ['4', '5', '6']]
+ */
+ var invokeMap = baseRest(function(collection, path, args) {
+ var index = -1,
+ isFunc = typeof path == 'function',
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value) {
+ result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
+ });
+ return result;
+ });
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the last element responsible for generating the key. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * var array = [
+ * { 'dir': 'left', 'code': 97 },
+ * { 'dir': 'right', 'code': 100 }
+ * ];
+ *
+ * _.keyBy(array, function(o) {
+ * return String.fromCharCode(o.code);
+ * });
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
+ *
+ * _.keyBy(array, 'dir');
+ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
+ */
+ var keyBy = createAggregator(function(result, value, key) {
+ baseAssignValue(result, key, value);
+ });
+
+ /**
+ * Creates an array of values by running each element in `collection` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * _.map([4, 8], square);
+ * // => [16, 64]
+ *
+ * _.map({ 'a': 4, 'b': 8 }, square);
+ * // => [16, 64] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+ function map(collection, iteratee) {
+ var func = isArray(collection) ? arrayMap : baseMap;
+ return func(collection, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * This method is like `_.sortBy` except that it allows specifying the sort
+ * orders of the iteratees to sort by. If `orders` is unspecified, all values
+ * are sorted in ascending order. Otherwise, specify an order of "desc" for
+ * descending or "asc" for ascending sort order of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @param {string[]} [orders] The sort orders of `iteratees`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 34 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'barney', 'age': 36 }
+ * ];
+ *
+ * // Sort by `user` in ascending order and by `age` in descending order.
+ * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ */
+ function orderBy(collection, iteratees, orders, guard) {
+ if (collection == null) {
+ return [];
+ }
+ if (!isArray(iteratees)) {
+ iteratees = iteratees == null ? [] : [iteratees];
+ }
+ orders = guard ? undefined : orders;
+ if (!isArray(orders)) {
+ orders = orders == null ? [] : [orders];
+ }
+ return baseOrderBy(collection, iteratees, orders);
+ }
+
+ /**
+ * Creates an array of elements split into two groups, the first of which
+ * contains elements `predicate` returns truthy for, the second of which
+ * contains elements `predicate` returns falsey for. The predicate is
+ * invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of grouped elements.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true },
+ * { 'user': 'pebbles', 'age': 1, 'active': false }
+ * ];
+ *
+ * _.partition(users, function(o) { return o.active; });
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.partition(users, { 'age': 1, 'active': false });
+ * // => objects for [['pebbles'], ['barney', 'fred']]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.partition(users, ['active', false]);
+ * // => objects for [['barney', 'pebbles'], ['fred']]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.partition(users, 'active');
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ */
+ var partition = createAggregator(function(result, value, key) {
+ result[key ? 0 : 1].push(value);
+ }, function() { return [[], []]; });
+
+ /**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` thru `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not given, the first element of `collection` is used as the initial
+ * value. The iteratee is invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+ * and `sortBy`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduceRight
+ * @example
+ *
+ * _.reduce([1, 2], function(sum, n) {
+ * return sum + n;
+ * }, 0);
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * return result;
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+ */
+ function reduce(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduce : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
+ }
+
+ /**
+ * This method is like `_.reduce` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduce
+ * @example
+ *
+ * var array = [[0, 1], [2, 3], [4, 5]];
+ *
+ * _.reduceRight(array, function(flattened, other) {
+ * return flattened.concat(other);
+ * }, []);
+ * // => [4, 5, 2, 3, 0, 1]
+ */
+ function reduceRight(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduceRight : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
+ }
+
+ /**
+ * The opposite of `_.filter`; this method returns the elements of `collection`
+ * that `predicate` does **not** return truthy for.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.filter
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true }
+ * ];
+ *
+ * _.reject(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.reject(users, { 'age': 40, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.reject(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.reject(users, 'active');
+ * // => objects for ['barney']
+ */
+ function reject(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, negate(getIteratee(predicate, 3)));
+ }
+
+ /**
+ * Gets a random element from `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ * @example
+ *
+ * _.sample([1, 2, 3, 4]);
+ * // => 2
+ */
+ function sample(collection) {
+ var func = isArray(collection) ? arraySample : baseSample;
+ return func(collection);
+ }
+
+ /**
+ * Gets `n` random elements at unique keys from `collection` up to the
+ * size of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} [n=1] The number of elements to sample.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the random elements.
+ * @example
+ *
+ * _.sampleSize([1, 2, 3], 2);
+ * // => [3, 1]
+ *
+ * _.sampleSize([1, 2, 3], 4);
+ * // => [2, 3, 1]
+ */
+ function sampleSize(collection, n, guard) {
+ if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ var func = isArray(collection) ? arraySampleSize : baseSampleSize;
+ return func(collection, n);
+ }
+
+ /**
+ * Creates an array of shuffled values, using a version of the
+ * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ * @example
+ *
+ * _.shuffle([1, 2, 3, 4]);
+ * // => [4, 1, 3, 2]
+ */
+ function shuffle(collection) {
+ var func = isArray(collection) ? arrayShuffle : baseShuffle;
+ return func(collection);
+ }
+
+ /**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable string keyed properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @returns {number} Returns the collection size.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+ function size(collection) {
+ if (collection == null) {
+ return 0;
+ }
+ if (isArrayLike(collection)) {
+ return isString(collection) ? stringSize(collection) : collection.length;
+ }
+ var tag = getTag(collection);
+ if (tag == mapTag || tag == setTag) {
+ return collection.size;
+ }
+ return baseKeys(collection).length;
+ }
+
+ /**
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
+ * Iteration is stopped once `predicate` returns truthy. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.some([null, 0, 'yes', false], Boolean);
+ * // => true
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.some(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.some(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.some(users, 'active');
+ * // => true
+ */
+ function some(collection, predicate, guard) {
+ var func = isArray(collection) ? arraySome : baseSome;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection thru each iteratee. This method
+ * performs a stable sort, that is, it preserves the original sort order of
+ * equal elements. The iteratees are invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 30 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.sortBy(users, [function(o) { return o.user; }]);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
+ *
+ * _.sortBy(users, ['user', 'age']);
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
+ */
+ var sortBy = baseRest(function(collection, iteratees) {
+ if (collection == null) {
+ return [];
+ }
+ var length = iteratees.length;
+ if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
+ iteratees = [];
+ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
+ iteratees = [iteratees[0]];
+ }
+ return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
+ });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Gets the timestamp of the number of milliseconds that have elapsed since
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Date
+ * @returns {number} Returns the timestamp.
+ * @example
+ *
+ * _.defer(function(stamp) {
+ * console.log(_.now() - stamp);
+ * }, _.now());
+ * // => Logs the number of milliseconds it took for the deferred invocation.
+ */
+ var now = ctxNow || function() {
+ return root.Date.now();
+ };
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The opposite of `_.before`; this method creates a function that invokes
+ * `func` once it's called `n` or more times.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {number} n The number of calls before `func` is invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var saves = ['profile', 'settings'];
+ *
+ * var done = _.after(saves.length, function() {
+ * console.log('done saving!');
+ * });
+ *
+ * _.forEach(saves, function(type) {
+ * asyncSave({ 'type': type, 'complete': done });
+ * });
+ * // => Logs 'done saving!' after the two async saves have completed.
+ */
+ function after(n, func) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func`, with up to `n` arguments,
+ * ignoring any additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} [n=func.length] The arity cap.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new capped function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.ary(parseInt, 1));
+ * // => [6, 8, 10]
+ */
+ function ary(func, n, guard) {
+ n = guard ? undefined : n;
+ n = (func && n == null) ? func.length : n;
+ return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
+ }
+
+ /**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => Allows adding up to 4 contacts to the list.
+ */
+ function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and `partials` prepended to the arguments it receives.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
+ * property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * function greet(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
+ */
+ var bind = baseRest(function(func, thisArg, partials) {
+ var bitmask = WRAP_BIND_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getHolder(bind));
+ bitmask |= WRAP_PARTIAL_FLAG;
+ }
+ return createWrap(func, bitmask, thisArg, partials, holders);
+ });
+
+ /**
+ * Creates a function that invokes the method at `object[key]` with `partials`
+ * prepended to the arguments it receives.
+ *
+ * This method differs from `_.bind` by allowing bound functions to reference
+ * methods that may be redefined or don't yet exist. See
+ * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
+ * for more details.
+ *
+ * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Function
+ * @param {Object} object The object to invoke the method on.
+ * @param {string} key The key of the method.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * var object = {
+ * 'user': 'fred',
+ * 'greet': function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ * };
+ *
+ * var bound = _.bindKey(object, 'greet', 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * object.greet = function(greeting, punctuation) {
+ * return greeting + 'ya ' + this.user + punctuation;
+ * };
+ *
+ * bound('!');
+ * // => 'hiya fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bindKey(object, 'greet', _, '!');
+ * bound('hi');
+ * // => 'hiya fred!'
+ */
+ var bindKey = baseRest(function(object, key, partials) {
+ var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getHolder(bindKey));
+ bitmask |= WRAP_PARTIAL_FLAG;
+ }
+ return createWrap(key, bitmask, object, partials, holders);
+ });
+
+ /**
+ * Creates a function that accepts arguments of `func` and either invokes
+ * `func` returning its result, if at least `arity` number of arguments have
+ * been provided, or returns a function that accepts the remaining `func`
+ * arguments, and so on. The arity of `func` may be specified if `func.length`
+ * is not sufficient.
+ *
+ * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curry(abc);
+ *
+ * curried(1)(2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(1)(_, 3)(2);
+ * // => [1, 2, 3]
+ */
+ function curry(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curry.placeholder;
+ return result;
+ }
+
+ /**
+ * This method is like `_.curry` except that arguments are applied to `func`
+ * in the manner of `_.partialRight` instead of `_.partial`.
+ *
+ * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curryRight(abc);
+ *
+ * curried(3)(2)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(2, 3)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(3)(1, _)(2);
+ * // => [1, 2, 3]
+ */
+ function curryRight(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curryRight.placeholder;
+ return result;
+ }
+
+ /**
+ * Creates a debounced function that delays invoking `func` until after `wait`
+ * milliseconds have elapsed since the last time the debounced function was
+ * invoked. The debounced function comes with a `cancel` method to cancel
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
+ * Provide `options` to indicate whether `func` should be invoked on the
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
+ * with the last arguments provided to the debounced function. Subsequent
+ * calls to the debounced function return the result of the last `func`
+ * invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the debounced function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.debounce` and `_.throttle`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to debounce.
+ * @param {number} [wait=0] The number of milliseconds to delay.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=false]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {number} [options.maxWait]
+ * The maximum time `func` is allowed to be delayed before it's invoked.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new debounced function.
+ * @example
+ *
+ * // Avoid costly calculations while the window size is in flux.
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
+ *
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
+ * 'leading': true,
+ * 'trailing': false
+ * }));
+ *
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
+ * var source = new EventSource('/stream');
+ * jQuery(source).on('message', debounced);
+ *
+ * // Cancel the trailing debounced invocation.
+ * jQuery(window).on('popstate', debounced.cancel);
+ */
+ function debounce(func, wait, options) {
+ var lastArgs,
+ lastThis,
+ maxWait,
+ result,
+ timerId,
+ lastCallTime,
+ lastInvokeTime = 0,
+ leading = false,
+ maxing = false,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ wait = toNumber(wait) || 0;
+ if (isObject(options)) {
+ leading = !!options.leading;
+ maxing = 'maxWait' in options;
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+
+ function invokeFunc(time) {
+ var args = lastArgs,
+ thisArg = lastThis;
+
+ lastArgs = lastThis = undefined;
+ lastInvokeTime = time;
+ result = func.apply(thisArg, args);
+ return result;
+ }
+
+ function leadingEdge(time) {
+ // Reset any `maxWait` timer.
+ lastInvokeTime = time;
+ // Start the timer for the trailing edge.
+ timerId = setTimeout(timerExpired, wait);
+ // Invoke the leading edge.
+ return leading ? invokeFunc(time) : result;
+ }
+
+ function remainingWait(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime,
+ timeWaiting = wait - timeSinceLastCall;
+
+ return maxing
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
+ : timeWaiting;
+ }
+
+ function shouldInvoke(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime;
+
+ // Either this is the first call, activity has stopped and we're at the
+ // trailing edge, the system time has gone backwards and we're treating
+ // it as the trailing edge, or we've hit the `maxWait` limit.
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
+ }
+
+ function timerExpired() {
+ var time = now();
+ if (shouldInvoke(time)) {
+ return trailingEdge(time);
+ }
+ // Restart the timer.
+ timerId = setTimeout(timerExpired, remainingWait(time));
+ }
+
+ function trailingEdge(time) {
+ timerId = undefined;
+
+ // Only invoke if we have `lastArgs` which means `func` has been
+ // debounced at least once.
+ if (trailing && lastArgs) {
+ return invokeFunc(time);
+ }
+ lastArgs = lastThis = undefined;
+ return result;
+ }
+
+ function cancel() {
+ if (timerId !== undefined) {
+ clearTimeout(timerId);
+ }
+ lastInvokeTime = 0;
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
+ }
+
+ function flush() {
+ return timerId === undefined ? result : trailingEdge(now());
+ }
+
+ function debounced() {
+ var time = now(),
+ isInvoking = shouldInvoke(time);
+
+ lastArgs = arguments;
+ lastThis = this;
+ lastCallTime = time;
+
+ if (isInvoking) {
+ if (timerId === undefined) {
+ return leadingEdge(lastCallTime);
+ }
+ if (maxing) {
+ // Handle invocations in a tight loop.
+ clearTimeout(timerId);
+ timerId = setTimeout(timerExpired, wait);
+ return invokeFunc(lastCallTime);
+ }
+ }
+ if (timerId === undefined) {
+ timerId = setTimeout(timerExpired, wait);
+ }
+ return result;
+ }
+ debounced.cancel = cancel;
+ debounced.flush = flush;
+ return debounced;
+ }
+
+ /**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // => Logs 'deferred' after one millisecond.
+ */
+ var defer = baseRest(function(func, args) {
+ return baseDelay(func, 1, args);
+ });
+
+ /**
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
+ * provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.delay(function(text) {
+ * console.log(text);
+ * }, 1000, 'later');
+ * // => Logs 'later' after one second.
+ */
+ var delay = baseRest(function(func, wait, args) {
+ return baseDelay(func, toNumber(wait) || 0, args);
+ });
+
+ /**
+ * Creates a function that invokes `func` with arguments reversed.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to flip arguments for.
+ * @returns {Function} Returns the new flipped function.
+ * @example
+ *
+ * var flipped = _.flip(function() {
+ * return _.toArray(arguments);
+ * });
+ *
+ * flipped('a', 'b', 'c', 'd');
+ * // => ['d', 'c', 'b', 'a']
+ */
+ function flip(func) {
+ return createWrap(func, WRAP_FLIP_FLAG);
+ }
+
+ /**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided, it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is used as the map cache key. The `func`
+ * is invoked with the `this` binding of the memoized function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoized function.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
+ *
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
+ *
+ * // Modify the result cache.
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
+ *
+ * // Replace `_.memoize.Cache`.
+ * _.memoize.Cache = WeakMap;
+ */
+ function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result) || cache;
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache);
+ return memoized;
+ }
+
+ // Expose `MapCache`.
+ memoize.Cache = MapCache;
+
+ /**
+ * Creates a function that negates the result of the predicate `func`. The
+ * `func` predicate is invoked with the `this` binding and arguments of the
+ * created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} predicate The predicate to negate.
+ * @returns {Function} Returns the new negated function.
+ * @example
+ *
+ * function isEven(n) {
+ * return n % 2 == 0;
+ * }
+ *
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+ * // => [1, 3, 5]
+ */
+ function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ var args = arguments;
+ switch (args.length) {
+ case 0: return !predicate.call(this);
+ case 1: return !predicate.call(this, args[0]);
+ case 2: return !predicate.call(this, args[0], args[1]);
+ case 3: return !predicate.call(this, args[0], args[1], args[2]);
+ }
+ return !predicate.apply(this, args);
+ };
+ }
+
+ /**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // => `createApplication` is invoked once
+ */
+ function once(func) {
+ return before(2, func);
+ }
+
+ /**
+ * Creates a function that invokes `func` with its arguments transformed.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to wrap.
+ * @param {...(Function|Function[])} [transforms=[_.identity]]
+ * The argument transforms.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function doubled(n) {
+ * return n * 2;
+ * }
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var func = _.overArgs(function(x, y) {
+ * return [x, y];
+ * }, [square, doubled]);
+ *
+ * func(9, 3);
+ * // => [81, 6]
+ *
+ * func(10, 5);
+ * // => [100, 10]
+ */
+ var overArgs = castRest(function(func, transforms) {
+ transforms = (transforms.length == 1 && isArray(transforms[0]))
+ ? arrayMap(transforms[0], baseUnary(getIteratee()))
+ : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
+
+ var funcsLength = transforms.length;
+ return baseRest(function(args) {
+ var index = -1,
+ length = nativeMin(args.length, funcsLength);
+
+ while (++index < length) {
+ args[index] = transforms[index].call(this, args[index]);
+ }
+ return apply(func, this, args);
+ });
+ });
+
+ /**
+ * Creates a function that invokes `func` with `partials` prepended to the
+ * arguments it receives. This method is like `_.bind` except it does **not**
+ * alter the `this` binding.
+ *
+ * The `_.partial.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.2.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * function greet(greeting, name) {
+ * return greeting + ' ' + name;
+ * }
+ *
+ * var sayHelloTo = _.partial(greet, 'hello');
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ *
+ * // Partially applied with placeholders.
+ * var greetFred = _.partial(greet, _, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ */
+ var partial = baseRest(function(func, partials) {
+ var holders = replaceHolders(partials, getHolder(partial));
+ return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
+ });
+
+ /**
+ * This method is like `_.partial` except that partially applied arguments
+ * are appended to the arguments it receives.
+ *
+ * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * function greet(greeting, name) {
+ * return greeting + ' ' + name;
+ * }
+ *
+ * var greetFred = _.partialRight(greet, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ *
+ * // Partially applied with placeholders.
+ * var sayHelloTo = _.partialRight(greet, 'hello', _);
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ */
+ var partialRight = baseRest(function(func, partials) {
+ var holders = replaceHolders(partials, getHolder(partialRight));
+ return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
+ });
+
+ /**
+ * Creates a function that invokes `func` with arguments arranged according
+ * to the specified `indexes` where the argument value at the first index is
+ * provided as the first argument, the argument value at the second index is
+ * provided as the second argument, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to rearrange arguments for.
+ * @param {...(number|number[])} indexes The arranged argument indexes.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var rearged = _.rearg(function(a, b, c) {
+ * return [a, b, c];
+ * }, [2, 0, 1]);
+ *
+ * rearged('b', 'c', 'a')
+ * // => ['a', 'b', 'c']
+ */
+ var rearg = flatRest(function(func, indexes) {
+ return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
+ });
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * created function and arguments from `start` and beyond provided as
+ * an array.
+ *
+ * **Note:** This method is based on the
+ * [rest parameter](https://mdn.io/rest_parameters).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.rest(function(what, names) {
+ * return what + ' ' + _.initial(names).join(', ') +
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+ * });
+ *
+ * say('hello', 'fred', 'barney', 'pebbles');
+ * // => 'hello fred, barney, & pebbles'
+ */
+ function rest(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start === undefined ? start : toInteger(start);
+ return baseRest(func, start);
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * create function and an array of arguments much like
+ * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
+ *
+ * **Note:** This method is based on the
+ * [spread operator](https://mdn.io/spread_operator).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Function
+ * @param {Function} func The function to spread arguments over.
+ * @param {number} [start=0] The start position of the spread.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.spread(function(who, what) {
+ * return who + ' says ' + what;
+ * });
+ *
+ * say(['fred', 'hello']);
+ * // => 'fred says hello'
+ *
+ * var numbers = Promise.all([
+ * Promise.resolve(40),
+ * Promise.resolve(36)
+ * ]);
+ *
+ * numbers.then(_.spread(function(x, y) {
+ * return x + y;
+ * }));
+ * // => a Promise of 76
+ */
+ function spread(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start == null ? 0 : nativeMax(toInteger(start), 0);
+ return baseRest(function(args) {
+ var array = args[start],
+ otherArgs = castSlice(args, 0, start);
+
+ if (array) {
+ arrayPush(otherArgs, array);
+ }
+ return apply(func, this, otherArgs);
+ });
+ }
+
+ /**
+ * Creates a throttled function that only invokes `func` at most once per
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
+ * method to cancel delayed `func` invocations and a `flush` method to
+ * immediately invoke them. Provide `options` to indicate whether `func`
+ * should be invoked on the leading and/or trailing edge of the `wait`
+ * timeout. The `func` is invoked with the last arguments provided to the
+ * throttled function. Subsequent calls to the throttled function return the
+ * result of the last `func` invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the throttled function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.throttle` and `_.debounce`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to throttle.
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=true]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new throttled function.
+ * @example
+ *
+ * // Avoid excessively updating the position while scrolling.
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
+ *
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
+ * jQuery(element).on('click', throttled);
+ *
+ * // Cancel the trailing throttled invocation.
+ * jQuery(window).on('popstate', throttled.cancel);
+ */
+ function throttle(func, wait, options) {
+ var leading = true,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (isObject(options)) {
+ leading = 'leading' in options ? !!options.leading : leading;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+ return debounce(func, wait, {
+ 'leading': leading,
+ 'maxWait': wait,
+ 'trailing': trailing
+ });
+ }
+
+ /**
+ * Creates a function that accepts up to one argument, ignoring any
+ * additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.unary(parseInt));
+ * // => [6, 8, 10]
+ */
+ function unary(func) {
+ return ary(func, 1);
+ }
+
+ /**
+ * Creates a function that provides `value` to `wrapper` as its first
+ * argument. Any additional arguments provided to the function are appended
+ * to those provided to the `wrapper`. The wrapper is invoked with the `this`
+ * binding of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {*} value The value to wrap.
+ * @param {Function} [wrapper=identity] The wrapper function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var p = _.wrap(_.escape, function(func, text) {
+ * return '<p>' + func(text) + '</p>';
+ * });
+ *
+ * p('fred, barney, & pebbles');
+ * // => '<p>fred, barney, &amp; pebbles</p>'
+ */
+ function wrap(value, wrapper) {
+ return partial(castFunction(wrapper), value);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Casts `value` as an array if it's not one.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Lang
+ * @param {*} value The value to inspect.
+ * @returns {Array} Returns the cast array.
+ * @example
+ *
+ * _.castArray(1);
+ * // => [1]
+ *
+ * _.castArray({ 'a': 1 });
+ * // => [{ 'a': 1 }]
+ *
+ * _.castArray('abc');
+ * // => ['abc']
+ *
+ * _.castArray(null);
+ * // => [null]
+ *
+ * _.castArray(undefined);
+ * // => [undefined]
+ *
+ * _.castArray();
+ * // => []
+ *
+ * var array = [1, 2, 3];
+ * console.log(_.castArray(array) === array);
+ * // => true
+ */
+ function castArray() {
+ if (!arguments.length) {
+ return [];
+ }
+ var value = arguments[0];
+ return isArray(value) ? value : [value];
+ }
+
+ /**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+ function clone(value) {
+ return baseClone(value, CLONE_SYMBOLS_FLAG);
+ }
+
+ /**
+ * This method is like `_.clone` except that it accepts `customizer` which
+ * is invoked to produce the cloned value. If `customizer` returns `undefined`,
+ * cloning is handled by the method instead. The `customizer` is invoked with
+ * up to four arguments; (value [, index|key, object, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeepWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(false);
+ * }
+ * }
+ *
+ * var el = _.cloneWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 0
+ */
+ function cloneWith(value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
+ }
+
+ /**
+ * This method is like `_.clone` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.clone
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var deep = _.cloneDeep(objects);
+ * console.log(deep[0] === objects[0]);
+ * // => false
+ */
+ function cloneDeep(value) {
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
+ }
+
+ /**
+ * This method is like `_.cloneWith` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.cloneWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(true);
+ * }
+ * }
+ *
+ * var el = _.cloneDeepWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 20
+ */
+ function cloneDeepWith(value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
+ }
+
+ /**
+ * Checks if `object` conforms to `source` by invoking the predicate
+ * properties of `source` with the corresponding property values of `object`.
+ *
+ * **Note:** This method is equivalent to `_.conforms` when `source` is
+ * partially applied.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.14.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ *
+ * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
+ * // => true
+ *
+ * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
+ * // => false
+ */
+ function conformsTo(object, source) {
+ return source == null || baseConformsTo(object, source, keys(source));
+ }
+
+ /**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
+
+ /**
+ * Checks if `value` is greater than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ * @see _.lt
+ * @example
+ *
+ * _.gt(3, 1);
+ * // => true
+ *
+ * _.gt(3, 3);
+ * // => false
+ *
+ * _.gt(1, 3);
+ * // => false
+ */
+ var gt = createRelationalOperation(baseGt);
+
+ /**
+ * Checks if `value` is greater than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than or equal to
+ * `other`, else `false`.
+ * @see _.lte
+ * @example
+ *
+ * _.gte(3, 1);
+ * // => true
+ *
+ * _.gte(3, 3);
+ * // => true
+ *
+ * _.gte(1, 3);
+ * // => false
+ */
+ var gte = createRelationalOperation(function(value, other) {
+ return value >= other;
+ });
+
+ /**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+ };
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+ var isArray = Array.isArray;
+
+ /**
+ * Checks if `value` is classified as an `ArrayBuffer` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+ * @example
+ *
+ * _.isArrayBuffer(new ArrayBuffer(2));
+ * // => true
+ *
+ * _.isArrayBuffer(new Array(2));
+ * // => false
+ */
+ var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
+
+ /**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+ function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+ }
+
+ /**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+ function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+ function isBoolean(value) {
+ return value === true || value === false ||
+ (isObjectLike(value) && baseGetTag(value) == boolTag);
+ }
+
+ /**
+ * Checks if `value` is a buffer.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
+ * @example
+ *
+ * _.isBuffer(new Buffer(2));
+ * // => true
+ *
+ * _.isBuffer(new Uint8Array(2));
+ * // => false
+ */
+ var isBuffer = nativeIsBuffer || stubFalse;
+
+ /**
+ * Checks if `value` is classified as a `Date` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ * @example
+ *
+ * _.isDate(new Date);
+ * // => true
+ *
+ * _.isDate('Mon April 23 2012');
+ * // => false
+ */
+ var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
+
+ /**
+ * Checks if `value` is likely a DOM element.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
+ * @example
+ *
+ * _.isElement(document.body);
+ * // => true
+ *
+ * _.isElement('<body>');
+ * // => false
+ */
+ function isElement(value) {
+ return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
+ }
+
+ /**
+ * Checks if `value` is an empty object, collection, map, or set.
+ *
+ * Objects are considered empty if they have no own enumerable string keyed
+ * properties.
+ *
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+ * @example
+ *
+ * _.isEmpty(null);
+ * // => true
+ *
+ * _.isEmpty(true);
+ * // => true
+ *
+ * _.isEmpty(1);
+ * // => true
+ *
+ * _.isEmpty([1, 2, 3]);
+ * // => false
+ *
+ * _.isEmpty({ 'a': 1 });
+ * // => false
+ */
+ function isEmpty(value) {
+ if (value == null) {
+ return true;
+ }
+ if (isArrayLike(value) &&
+ (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
+ isBuffer(value) || isTypedArray(value) || isArguments(value))) {
+ return !value.length;
+ }
+ var tag = getTag(value);
+ if (tag == mapTag || tag == setTag) {
+ return !value.size;
+ }
+ if (isPrototype(value)) {
+ return !baseKeys(value).length;
+ }
+ for (var key in value) {
+ if (hasOwnProperty.call(value, key)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are compared by strict equality, i.e. `===`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+ function isEqual(value, other) {
+ return baseIsEqual(value, other);
+ }
+
+ /**
+ * This method is like `_.isEqual` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with up to
+ * six arguments: (objValue, othValue [, index|key, object, other, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, othValue) {
+ * if (isGreeting(objValue) && isGreeting(othValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var array = ['hello', 'goodbye'];
+ * var other = ['hi', 'goodbye'];
+ *
+ * _.isEqualWith(array, other, customizer);
+ * // => true
+ */
+ function isEqualWith(value, other, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ var result = customizer ? customizer(value, other) : undefined;
+ return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
+ }
+
+ /**
+ * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
+ * `SyntaxError`, `TypeError`, or `URIError` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
+ * @example
+ *
+ * _.isError(new Error);
+ * // => true
+ *
+ * _.isError(Error);
+ * // => false
+ */
+ function isError(value) {
+ if (!isObjectLike(value)) {
+ return false;
+ }
+ var tag = baseGetTag(value);
+ return tag == errorTag || tag == domExcTag ||
+ (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
+ }
+
+ /**
+ * Checks if `value` is a finite primitive number.
+ *
+ * **Note:** This method is based on
+ * [`Number.isFinite`](https://mdn.io/Number/isFinite).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
+ * @example
+ *
+ * _.isFinite(3);
+ * // => true
+ *
+ * _.isFinite(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isFinite(Infinity);
+ * // => false
+ *
+ * _.isFinite('3');
+ * // => false
+ */
+ function isFinite(value) {
+ return typeof value == 'number' && nativeIsFinite(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+ function isFunction(value) {
+ if (!isObject(value)) {
+ return false;
+ }
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
+ var tag = baseGetTag(value);
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
+ }
+
+ /**
+ * Checks if `value` is an integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isInteger`](https://mdn.io/Number/isInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
+ * @example
+ *
+ * _.isInteger(3);
+ * // => true
+ *
+ * _.isInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isInteger(Infinity);
+ * // => false
+ *
+ * _.isInteger('3');
+ * // => false
+ */
+ function isInteger(value) {
+ return typeof value == 'number' && value == toInteger(value);
+ }
+
+ /**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+ function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return value != null && (type == 'object' || type == 'function');
+ }
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return value != null && typeof value == 'object';
+ }
+
+ /**
+ * Checks if `value` is classified as a `Map` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ * @example
+ *
+ * _.isMap(new Map);
+ * // => true
+ *
+ * _.isMap(new WeakMap);
+ * // => false
+ */
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
+
+ /**
+ * Performs a partial deep comparison between `object` and `source` to
+ * determine if `object` contains equivalent property values.
+ *
+ * **Note:** This method is equivalent to `_.matches` when `source` is
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ *
+ * _.isMatch(object, { 'b': 2 });
+ * // => true
+ *
+ * _.isMatch(object, { 'b': 1 });
+ * // => false
+ */
+ function isMatch(object, source) {
+ return object === source || baseIsMatch(object, source, getMatchData(source));
+ }
+
+ /**
+ * This method is like `_.isMatch` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with five
+ * arguments: (objValue, srcValue, index|key, object, source).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, srcValue) {
+ * if (isGreeting(objValue) && isGreeting(srcValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var object = { 'greeting': 'hello' };
+ * var source = { 'greeting': 'hi' };
+ *
+ * _.isMatchWith(object, source, customizer);
+ * // => true
+ */
+ function isMatchWith(object, source, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseIsMatch(object, source, getMatchData(source), customizer);
+ }
+
+ /**
+ * Checks if `value` is `NaN`.
+ *
+ * **Note:** This method is based on
+ * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
+ * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
+ * `undefined` and other non-number values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ * @example
+ *
+ * _.isNaN(NaN);
+ * // => true
+ *
+ * _.isNaN(new Number(NaN));
+ * // => true
+ *
+ * isNaN(undefined);
+ * // => true
+ *
+ * _.isNaN(undefined);
+ * // => false
+ */
+ function isNaN(value) {
+ // An `NaN` primitive is the only value that is not equal to itself.
+ // Perform the `toStringTag` check first to avoid errors with some
+ // ActiveX objects in IE.
+ return isNumber(value) && value != +value;
+ }
+
+ /**
+ * Checks if `value` is a pristine native function.
+ *
+ * **Note:** This method can't reliably detect native functions in the presence
+ * of the core-js package because core-js circumvents this kind of detection.
+ * Despite multiple requests, the core-js maintainer has made it clear: any
+ * attempt to fix the detection will be obstructed. As a result, we're left
+ * with little choice but to throw an error. Unfortunately, this also affects
+ * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
+ * which rely on core-js.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+ function isNative(value) {
+ if (isMaskable(value)) {
+ throw new Error(CORE_ERROR_TEXT);
+ }
+ return baseIsNative(value);
+ }
+
+ /**
+ * Checks if `value` is `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
+ * @example
+ *
+ * _.isNull(null);
+ * // => true
+ *
+ * _.isNull(void 0);
+ * // => false
+ */
+ function isNull(value) {
+ return value === null;
+ }
+
+ /**
+ * Checks if `value` is `null` or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
+ * @example
+ *
+ * _.isNil(null);
+ * // => true
+ *
+ * _.isNil(void 0);
+ * // => true
+ *
+ * _.isNil(NaN);
+ * // => false
+ */
+ function isNil(value) {
+ return value == null;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+ * classified as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+ function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && baseGetTag(value) == numberTag);
+ }
+
+ /**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.8.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+ function isPlainObject(value) {
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
+ return false;
+ }
+ var proto = getPrototype(value);
+ if (proto === null) {
+ return true;
+ }
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
+ funcToString.call(Ctor) == objectCtorString;
+ }
+
+ /**
+ * Checks if `value` is classified as a `RegExp` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ * @example
+ *
+ * _.isRegExp(/abc/);
+ * // => true
+ *
+ * _.isRegExp('/abc/');
+ * // => false
+ */
+ var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
+
+ /**
+ * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
+ * double precision number which isn't the result of a rounded unsafe integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
+ * @example
+ *
+ * _.isSafeInteger(3);
+ * // => true
+ *
+ * _.isSafeInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isSafeInteger(Infinity);
+ * // => false
+ *
+ * _.isSafeInteger('3');
+ * // => false
+ */
+ function isSafeInteger(value) {
+ return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Set` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ * @example
+ *
+ * _.isSet(new Set);
+ * // => true
+ *
+ * _.isSet(new WeakSet);
+ * // => false
+ */
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
+
+ /**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+ function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+ function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
+
+ /**
+ * Checks if `value` is `undefined`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ * @example
+ *
+ * _.isUndefined(void 0);
+ * // => true
+ *
+ * _.isUndefined(null);
+ * // => false
+ */
+ function isUndefined(value) {
+ return value === undefined;
+ }
+
+ /**
+ * Checks if `value` is classified as a `WeakMap` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
+ * @example
+ *
+ * _.isWeakMap(new WeakMap);
+ * // => true
+ *
+ * _.isWeakMap(new Map);
+ * // => false
+ */
+ function isWeakMap(value) {
+ return isObjectLike(value) && getTag(value) == weakMapTag;
+ }
+
+ /**
+ * Checks if `value` is classified as a `WeakSet` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
+ * @example
+ *
+ * _.isWeakSet(new WeakSet);
+ * // => true
+ *
+ * _.isWeakSet(new Set);
+ * // => false
+ */
+ function isWeakSet(value) {
+ return isObjectLike(value) && baseGetTag(value) == weakSetTag;
+ }
+
+ /**
+ * Checks if `value` is less than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ * @see _.gt
+ * @example
+ *
+ * _.lt(1, 3);
+ * // => true
+ *
+ * _.lt(3, 3);
+ * // => false
+ *
+ * _.lt(3, 1);
+ * // => false
+ */
+ var lt = createRelationalOperation(baseLt);
+
+ /**
+ * Checks if `value` is less than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than or equal to
+ * `other`, else `false`.
+ * @see _.gte
+ * @example
+ *
+ * _.lte(1, 3);
+ * // => true
+ *
+ * _.lte(3, 3);
+ * // => true
+ *
+ * _.lte(3, 1);
+ * // => false
+ */
+ var lte = createRelationalOperation(function(value, other) {
+ return value <= other;
+ });
+
+ /**
+ * Converts `value` to an array.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the converted array.
+ * @example
+ *
+ * _.toArray({ 'a': 1, 'b': 2 });
+ * // => [1, 2]
+ *
+ * _.toArray('abc');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toArray(1);
+ * // => []
+ *
+ * _.toArray(null);
+ * // => []
+ */
+ function toArray(value) {
+ if (!value) {
+ return [];
+ }
+ if (isArrayLike(value)) {
+ return isString(value) ? stringToArray(value) : copyArray(value);
+ }
+ if (symIterator && value[symIterator]) {
+ return iteratorToArray(value[symIterator]());
+ }
+ var tag = getTag(value),
+ func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
+
+ return func(value);
+ }
+
+ /**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+ function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+ }
+
+ /**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+ function toInteger(value) {
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
+ }
+
+ /**
+ * Converts `value` to an integer suitable for use as the length of an
+ * array-like object.
+ *
+ * **Note:** This method is based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toLength(3.2);
+ * // => 3
+ *
+ * _.toLength(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toLength(Infinity);
+ * // => 4294967295
+ *
+ * _.toLength('3.2');
+ * // => 3
+ */
+ function toLength(value) {
+ return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
+ }
+
+ /**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+ function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = baseTrim(value);
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+ }
+
+ /**
+ * Converts `value` to a plain object flattening inherited enumerable string
+ * keyed properties of `value` to own properties of the plain object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Object} Returns the converted plain object.
+ * @example
+ *
+ * function Foo() {
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.assign({ 'a': 1 }, new Foo);
+ * // => { 'a': 1, 'b': 2 }
+ *
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
+ */
+ function toPlainObject(value) {
+ return copyObject(value, keysIn(value));
+ }
+
+ /**
+ * Converts `value` to a safe integer. A safe integer can be compared and
+ * represented correctly.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toSafeInteger(3.2);
+ * // => 3
+ *
+ * _.toSafeInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toSafeInteger(Infinity);
+ * // => 9007199254740991
+ *
+ * _.toSafeInteger('3.2');
+ * // => 3
+ */
+ function toSafeInteger(value) {
+ return value
+ ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
+ : (value === 0 ? value : 0);
+ }
+
+ /**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+ function toString(value) {
+ return value == null ? '' : baseToString(value);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Assigns own enumerable string keyed properties of source objects to the
+ * destination object. Source objects are applied from left to right.
+ * Subsequent sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object` and is loosely based on
+ * [`Object.assign`](https://mdn.io/Object/assign).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assignIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assign({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var assign = createAssigner(function(object, source) {
+ if (isPrototype(source) || isArrayLike(source)) {
+ copyObject(source, keys(source), object);
+ return;
+ }
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ assignValue(object, key, source[key]);
+ }
+ }
+ });
+
+ /**
+ * This method is like `_.assign` except that it iterates over own and
+ * inherited source properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assign
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assignIn({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
+ */
+ var assignIn = createAssigner(function(object, source) {
+ copyObject(source, keysIn(source), object);
+ });
+
+ /**
+ * This method is like `_.assignIn` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extendWith
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignInWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keysIn(source), object, customizer);
+ });
+
+ /**
+ * This method is like `_.assign` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignInWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keys(source), object, customizer);
+ });
+
+ /**
+ * Creates an array of values corresponding to `paths` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Array} Returns the picked values.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _.at(object, ['a[0].b.c', 'a[1]']);
+ * // => [3, 4]
+ */
+ var at = flatRest(baseAt);
+
+ /**
+ * Creates an object that inherits from the `prototype` object. If a
+ * `properties` object is given, its own enumerable string keyed properties
+ * are assigned to the created object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Object
+ * @param {Object} prototype The object to inherit from.
+ * @param {Object} [properties] The properties to assign to the object.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * function Shape() {
+ * this.x = 0;
+ * this.y = 0;
+ * }
+ *
+ * function Circle() {
+ * Shape.call(this);
+ * }
+ *
+ * Circle.prototype = _.create(Shape.prototype, {
+ * 'constructor': Circle
+ * });
+ *
+ * var circle = new Circle;
+ * circle instanceof Circle;
+ * // => true
+ *
+ * circle instanceof Shape;
+ * // => true
+ */
+ function create(prototype, properties) {
+ var result = baseCreate(prototype);
+ return properties == null ? result : baseAssign(result, properties);
+ }
+
+ /**
+ * Assigns own and inherited enumerable string keyed properties of source
+ * objects to the destination object for all destination properties that
+ * resolve to `undefined`. Source objects are applied from left to right.
+ * Once a property is set, additional values of the same property are ignored.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaultsDeep
+ * @example
+ *
+ * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var defaults = baseRest(function(object, sources) {
+ object = Object(object);
+
+ var index = -1;
+ var length = sources.length;
+ var guard = length > 2 ? sources[2] : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ length = 1;
+ }
+
+ while (++index < length) {
+ var source = sources[index];
+ var props = keysIn(source);
+ var propsIndex = -1;
+ var propsLength = props.length;
+
+ while (++propsIndex < propsLength) {
+ var key = props[propsIndex];
+ var value = object[key];
+
+ if (value === undefined ||
+ (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ object[key] = source[key];
+ }
+ }
+ }
+
+ return object;
+ });
+
+ /**
+ * This method is like `_.defaults` except that it recursively assigns
+ * default properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaults
+ * @example
+ *
+ * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
+ * // => { 'a': { 'b': 2, 'c': 3 } }
+ */
+ var defaultsDeep = baseRest(function(args) {
+ args.push(undefined, customDefaultsMerge);
+ return apply(mergeWith, undefined, args);
+ });
+
+ /**
+ * This method is like `_.find` except that it returns the key of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findKey(users, function(o) { return o.age < 40; });
+ * // => 'barney' (iteration order is not guaranteed)
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findKey(users, { 'age': 1, 'active': true });
+ * // => 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findKey(users, 'active');
+ * // => 'barney'
+ */
+ function findKey(object, predicate) {
+ return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
+ }
+
+ /**
+ * This method is like `_.findKey` except that it iterates over elements of
+ * a collection in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findLastKey(users, function(o) { return o.age < 40; });
+ * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastKey(users, { 'age': 36, 'active': true });
+ * // => 'barney'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastKey(users, 'active');
+ * // => 'pebbles'
+ */
+ function findLastKey(object, predicate) {
+ return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
+ }
+
+ /**
+ * Iterates over own and inherited enumerable string keyed properties of an
+ * object and invokes `iteratee` for each property. The iteratee is invoked
+ * with three arguments: (value, key, object). Iteratee functions may exit
+ * iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forInRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forIn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
+ */
+ function forIn(object, iteratee) {
+ return object == null
+ ? object
+ : baseFor(object, getIteratee(iteratee, 3), keysIn);
+ }
+
+ /**
+ * This method is like `_.forIn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forInRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
+ */
+ function forInRight(object, iteratee) {
+ return object == null
+ ? object
+ : baseForRight(object, getIteratee(iteratee, 3), keysIn);
+ }
+
+ /**
+ * Iterates over own enumerable string keyed properties of an object and
+ * invokes `iteratee` for each property. The iteratee is invoked with three
+ * arguments: (value, key, object). Iteratee functions may exit iteration
+ * early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwnRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forOwn(object, iteratee) {
+ return object && baseForOwn(object, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * This method is like `_.forOwn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwnRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
+ */
+ function forOwnRight(object, iteratee) {
+ return object && baseForOwnRight(object, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * Creates an array of function property names from own enumerable properties
+ * of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the function names.
+ * @see _.functionsIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functions(new Foo);
+ * // => ['a', 'b']
+ */
+ function functions(object) {
+ return object == null ? [] : baseFunctions(object, keys(object));
+ }
+
+ /**
+ * Creates an array of function property names from own and inherited
+ * enumerable properties of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the function names.
+ * @see _.functions
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functionsIn(new Foo);
+ * // => ['a', 'b', 'c']
+ */
+ function functionsIn(object) {
+ return object == null ? [] : baseFunctions(object, keysIn(object));
+ }
+
+ /**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is returned in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+ function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, path);
+ return result === undefined ? defaultValue : result;
+ }
+
+ /**
+ * Checks if `path` is a direct property of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': 2 } };
+ * var other = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b');
+ * // => true
+ *
+ * _.has(object, ['a', 'b']);
+ * // => true
+ *
+ * _.has(other, 'a');
+ * // => false
+ */
+ function has(object, path) {
+ return object != null && hasPath(object, path, baseHas);
+ }
+
+ /**
+ * Checks if `path` is a direct or inherited property of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.hasIn(object, 'a');
+ * // => true
+ *
+ * _.hasIn(object, 'a.b');
+ * // => true
+ *
+ * _.hasIn(object, ['a', 'b']);
+ * // => true
+ *
+ * _.hasIn(object, 'b');
+ * // => false
+ */
+ function hasIn(object, path) {
+ return object != null && hasPath(object, path, baseHasIn);
+ }
+
+ /**
+ * Creates an object composed of the inverted keys and values of `object`.
+ * If `object` contains duplicate values, subsequent values overwrite
+ * property assignments of previous values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invert(object);
+ * // => { '1': 'c', '2': 'b' }
+ */
+ var invert = createInverter(function(result, value, key) {
+ if (value != null &&
+ typeof value.toString != 'function') {
+ value = nativeObjectToString.call(value);
+ }
+
+ result[value] = key;
+ }, constant(identity));
+
+ /**
+ * This method is like `_.invert` except that the inverted object is generated
+ * from the results of running each element of `object` thru `iteratee`. The
+ * corresponding inverted value of each inverted key is an array of keys
+ * responsible for generating the inverted value. The iteratee is invoked
+ * with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invertBy(object);
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ *
+ * _.invertBy(object, function(value) {
+ * return 'group' + value;
+ * });
+ * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
+ */
+ var invertBy = createInverter(function(result, value, key) {
+ if (value != null &&
+ typeof value.toString != 'function') {
+ value = nativeObjectToString.call(value);
+ }
+
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+ }, getIteratee);
+
+ /**
+ * Invokes the method at `path` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
+ *
+ * _.invoke(object, 'a[0].b.c.slice', 1, 3);
+ * // => [2, 3]
+ */
+ var invoke = baseRest(baseInvoke);
+
+ /**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+ function keys(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+ function keysIn(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
+ }
+
+ /**
+ * The opposite of `_.mapValues`; this method creates an object with the
+ * same values as `object` and keys generated by running each own enumerable
+ * string keyed property of `object` thru `iteratee`. The iteratee is invoked
+ * with three arguments: (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapValues
+ * @example
+ *
+ * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
+ * return key + value;
+ * });
+ * // => { 'a1': 1, 'b2': 2 }
+ */
+ function mapKeys(object, iteratee) {
+ var result = {};
+ iteratee = getIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ baseAssignValue(result, iteratee(value, key, object), value);
+ });
+ return result;
+ }
+
+ /**
+ * Creates an object with the same keys as `object` and values generated
+ * by running each own enumerable string keyed property of `object` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapKeys
+ * @example
+ *
+ * var users = {
+ * 'fred': { 'user': 'fred', 'age': 40 },
+ * 'pebbles': { 'user': 'pebbles', 'age': 1 }
+ * };
+ *
+ * _.mapValues(users, function(o) { return o.age; });
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.mapValues(users, 'age');
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ */
+ function mapValues(object, iteratee) {
+ var result = {};
+ iteratee = getIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ baseAssignValue(result, key, iteratee(value, key, object));
+ });
+ return result;
+ }
+
+ /**
+ * This method is like `_.assign` except that it recursively merges own and
+ * inherited enumerable string keyed properties of source objects into the
+ * destination object. Source properties that resolve to `undefined` are
+ * skipped if a destination value exists. Array and plain object properties
+ * are merged recursively. Other objects and value types are overridden by
+ * assignment. Source objects are applied from left to right. Subsequent
+ * sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {
+ * 'a': [{ 'b': 2 }, { 'd': 4 }]
+ * };
+ *
+ * var other = {
+ * 'a': [{ 'c': 3 }, { 'e': 5 }]
+ * };
+ *
+ * _.merge(object, other);
+ * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
+ */
+ var merge = createAssigner(function(object, source, srcIndex) {
+ baseMerge(object, source, srcIndex);
+ });
+
+ /**
+ * This method is like `_.merge` except that it accepts `customizer` which
+ * is invoked to produce the merged values of the destination and source
+ * properties. If `customizer` returns `undefined`, merging is handled by the
+ * method instead. The `customizer` is invoked with six arguments:
+ * (objValue, srcValue, key, object, source, stack).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * if (_.isArray(objValue)) {
+ * return objValue.concat(srcValue);
+ * }
+ * }
+ *
+ * var object = { 'a': [1], 'b': [2] };
+ * var other = { 'a': [3], 'b': [4] };
+ *
+ * _.mergeWith(object, other, customizer);
+ * // => { 'a': [1, 3], 'b': [2, 4] }
+ */
+ var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
+ baseMerge(object, source, srcIndex, customizer);
+ });
+
+ /**
+ * The opposite of `_.pick`; this method creates an object composed of the
+ * own and inherited enumerable property paths of `object` that are not omitted.
+ *
+ * **Note:** This method is considerably slower than `_.pick`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to omit.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omit(object, ['a', 'c']);
+ * // => { 'b': '2' }
+ */
+ var omit = flatRest(function(object, paths) {
+ var result = {};
+ if (object == null) {
+ return result;
+ }
+ var isDeep = false;
+ paths = arrayMap(paths, function(path) {
+ path = castPath(path, object);
+ isDeep || (isDeep = path.length > 1);
+ return path;
+ });
+ copyObject(object, getAllKeysIn(object), result);
+ if (isDeep) {
+ result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
+ }
+ var length = paths.length;
+ while (length--) {
+ baseUnset(result, paths[length]);
+ }
+ return result;
+ });
+
+ /**
+ * The opposite of `_.pickBy`; this method creates an object composed of
+ * the own and inherited enumerable string keyed properties of `object` that
+ * `predicate` doesn't return truthy for. The predicate is invoked with two
+ * arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function} [predicate=_.identity] The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omitBy(object, _.isNumber);
+ * // => { 'b': '2' }
+ */
+ function omitBy(object, predicate) {
+ return pickBy(object, negate(getIteratee(predicate)));
+ }
+
+ /**
+ * Creates an object composed of the picked `object` properties.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var pick = flatRest(function(object, paths) {
+ return object == null ? {} : basePick(object, paths);
+ });
+
+ /**
+ * Creates an object composed of the `object` properties `predicate` returns
+ * truthy for. The predicate is invoked with two arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function} [predicate=_.identity] The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pickBy(object, _.isNumber);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ function pickBy(object, predicate) {
+ if (object == null) {
+ return {};
+ }
+ var props = arrayMap(getAllKeysIn(object), function(prop) {
+ return [prop];
+ });
+ predicate = getIteratee(predicate);
+ return basePickBy(object, props, function(value, path) {
+ return predicate(value, path[0]);
+ });
+ }
+
+ /**
+ * This method is like `_.get` except that if the resolved value is a
+ * function it's invoked with the `this` binding of its parent object and
+ * its result is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+ *
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
+ *
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
+ *
+ * _.result(object, 'a[0].b.c3', 'default');
+ * // => 'default'
+ *
+ * _.result(object, 'a[0].b.c3', _.constant('default'));
+ * // => 'default'
+ */
+ function result(object, path, defaultValue) {
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length;
+
+ // Ensure the loop is entered when path is empty.
+ if (!length) {
+ length = 1;
+ object = undefined;
+ }
+ while (++index < length) {
+ var value = object == null ? undefined : object[toKey(path[index])];
+ if (value === undefined) {
+ index = length;
+ value = defaultValue;
+ }
+ object = isFunction(value) ? value.call(object) : value;
+ }
+ return object;
+ }
+
+ /**
+ * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
+ * it's created. Arrays are created for missing index properties while objects
+ * are created for all other missing properties. Use `_.setWith` to customize
+ * `path` creation.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.set(object, 'a[0].b.c', 4);
+ * console.log(object.a[0].b.c);
+ * // => 4
+ *
+ * _.set(object, ['x', '0', 'y', 'z'], 5);
+ * console.log(object.x[0].y.z);
+ * // => 5
+ */
+ function set(object, path, value) {
+ return object == null ? object : baseSet(object, path, value);
+ }
+
+ /**
+ * This method is like `_.set` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.setWith(object, '[0][1]', 'a', Object);
+ * // => { '0': { '1': 'a' } }
+ */
+ function setWith(object, path, value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseSet(object, path, value, customizer);
+ }
+
+ /**
+ * Creates an array of own enumerable string keyed-value pairs for `object`
+ * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
+ * entries are returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entries
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairs(new Foo);
+ * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
+ */
+ var toPairs = createToPairs(keys);
+
+ /**
+ * Creates an array of own and inherited enumerable string keyed-value pairs
+ * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
+ * or set, its entries are returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entriesIn
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairsIn(new Foo);
+ * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
+ */
+ var toPairsIn = createToPairs(keysIn);
+
+ /**
+ * An alternative to `_.reduce`; this method transforms `object` to a new
+ * `accumulator` object which is the result of running each of its own
+ * enumerable string keyed properties thru `iteratee`, with each invocation
+ * potentially mutating the `accumulator` object. If `accumulator` is not
+ * provided, a new object with the same `[[Prototype]]` will be used. The
+ * iteratee is invoked with four arguments: (accumulator, value, key, object).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The custom accumulator value.
+ * @returns {*} Returns the accumulated value.
+ * @example
+ *
+ * _.transform([2, 3, 4], function(result, n) {
+ * result.push(n *= n);
+ * return n % 2 == 0;
+ * }, []);
+ * // => [4, 9]
+ *
+ * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ */
+ function transform(object, iteratee, accumulator) {
+ var isArr = isArray(object),
+ isArrLike = isArr || isBuffer(object) || isTypedArray(object);
+
+ iteratee = getIteratee(iteratee, 4);
+ if (accumulator == null) {
+ var Ctor = object && object.constructor;
+ if (isArrLike) {
+ accumulator = isArr ? new Ctor : [];
+ }
+ else if (isObject(object)) {
+ accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
+ }
+ else {
+ accumulator = {};
+ }
+ }
+ (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
+ return iteratee(accumulator, value, index, object);
+ });
+ return accumulator;
+ }
+
+ /**
+ * Removes the property at `path` of `object`.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 7 } }] };
+ * _.unset(object, 'a[0].b.c');
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ *
+ * _.unset(object, ['a', '0', 'b', 'c']);
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ */
+ function unset(object, path) {
+ return object == null ? true : baseUnset(object, path);
+ }
+
+ /**
+ * This method is like `_.set` except that accepts `updater` to produce the
+ * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
+ * is invoked with one argument: (value).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.update(object, 'a[0].b.c', function(n) { return n * n; });
+ * console.log(object.a[0].b.c);
+ * // => 9
+ *
+ * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
+ * console.log(object.x[0].y.z);
+ * // => 0
+ */
+ function update(object, path, updater) {
+ return object == null ? object : baseUpdate(object, path, castFunction(updater));
+ }
+
+ /**
+ * This method is like `_.update` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.updateWith(object, '[0][1]', _.constant('a'), Object);
+ * // => { '0': { '1': 'a' } }
+ */
+ function updateWith(object, path, updater, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
+ }
+
+ /**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+ function values(object) {
+ return object == null ? [] : baseValues(object, keys(object));
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable string keyed property
+ * values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.valuesIn(new Foo);
+ * // => [1, 2, 3] (iteration order is not guaranteed)
+ */
+ function valuesIn(object) {
+ return object == null ? [] : baseValues(object, keysIn(object));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Clamps `number` within the inclusive `lower` and `upper` bounds.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Number
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ * @example
+ *
+ * _.clamp(-10, -5, 5);
+ * // => -5
+ *
+ * _.clamp(10, -5, 5);
+ * // => 5
+ */
+ function clamp(number, lower, upper) {
+ if (upper === undefined) {
+ upper = lower;
+ lower = undefined;
+ }
+ if (upper !== undefined) {
+ upper = toNumber(upper);
+ upper = upper === upper ? upper : 0;
+ }
+ if (lower !== undefined) {
+ lower = toNumber(lower);
+ lower = lower === lower ? lower : 0;
+ }
+ return baseClamp(toNumber(number), lower, upper);
+ }
+
+ /**
+ * Checks if `n` is between `start` and up to, but not including, `end`. If
+ * `end` is not specified, it's set to `start` with `start` then set to `0`.
+ * If `start` is greater than `end` the params are swapped to support
+ * negative ranges.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.3.0
+ * @category Number
+ * @param {number} number The number to check.
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ * @see _.range, _.rangeRight
+ * @example
+ *
+ * _.inRange(3, 2, 4);
+ * // => true
+ *
+ * _.inRange(4, 8);
+ * // => true
+ *
+ * _.inRange(4, 2);
+ * // => false
+ *
+ * _.inRange(2, 2);
+ * // => false
+ *
+ * _.inRange(1.2, 2);
+ * // => true
+ *
+ * _.inRange(5.2, 4);
+ * // => false
+ *
+ * _.inRange(-3, -2, -6);
+ * // => true
+ */
+ function inRange(number, start, end) {
+ start = toFinite(start);
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toFinite(end);
+ }
+ number = toNumber(number);
+ return baseInRange(number, start, end);
+ }
+
+ /**
+ * Produces a random number between the inclusive `lower` and `upper` bounds.
+ * If only one argument is provided a number between `0` and the given number
+ * is returned. If `floating` is `true`, or either `lower` or `upper` are
+ * floats, a floating-point number is returned instead of an integer.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Number
+ * @param {number} [lower=0] The lower bound.
+ * @param {number} [upper=1] The upper bound.
+ * @param {boolean} [floating] Specify returning a floating-point number.
+ * @returns {number} Returns the random number.
+ * @example
+ *
+ * _.random(0, 5);
+ * // => an integer between 0 and 5
+ *
+ * _.random(5);
+ * // => also an integer between 0 and 5
+ *
+ * _.random(5, true);
+ * // => a floating-point number between 0 and 5
+ *
+ * _.random(1.2, 5.2);
+ * // => a floating-point number between 1.2 and 5.2
+ */
+ function random(lower, upper, floating) {
+ if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
+ upper = floating = undefined;
+ }
+ if (floating === undefined) {
+ if (typeof upper == 'boolean') {
+ floating = upper;
+ upper = undefined;
+ }
+ else if (typeof lower == 'boolean') {
+ floating = lower;
+ lower = undefined;
+ }
+ }
+ if (lower === undefined && upper === undefined) {
+ lower = 0;
+ upper = 1;
+ }
+ else {
+ lower = toFinite(lower);
+ if (upper === undefined) {
+ upper = lower;
+ lower = 0;
+ } else {
+ upper = toFinite(upper);
+ }
+ }
+ if (lower > upper) {
+ var temp = lower;
+ lower = upper;
+ upper = temp;
+ }
+ if (floating || lower % 1 || upper % 1) {
+ var rand = nativeRandom();
+ return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
+ }
+ return baseRandom(lower, upper);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the camel cased string.
+ * @example
+ *
+ * _.camelCase('Foo Bar');
+ * // => 'fooBar'
+ *
+ * _.camelCase('--foo-bar--');
+ * // => 'fooBar'
+ *
+ * _.camelCase('__FOO_BAR__');
+ * // => 'fooBar'
+ */
+ var camelCase = createCompounder(function(result, word, index) {
+ word = word.toLowerCase();
+ return result + (index ? capitalize(word) : word);
+ });
+
+ /**
+ * Converts the first character of `string` to upper case and the remaining
+ * to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to capitalize.
+ * @returns {string} Returns the capitalized string.
+ * @example
+ *
+ * _.capitalize('FRED');
+ * // => 'Fred'
+ */
+ function capitalize(string) {
+ return upperFirst(toString(string).toLowerCase());
+ }
+
+ /**
+ * Deburrs `string` by converting
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
+ * letters to basic Latin letters and removing
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to deburr.
+ * @returns {string} Returns the deburred string.
+ * @example
+ *
+ * _.deburr('déjà vu');
+ * // => 'deja vu'
+ */
+ function deburr(string) {
+ string = toString(string);
+ return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
+ }
+
+ /**
+ * Checks if `string` ends with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=string.length] The position to search up to.
+ * @returns {boolean} Returns `true` if `string` ends with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.endsWith('abc', 'c');
+ * // => true
+ *
+ * _.endsWith('abc', 'b');
+ * // => false
+ *
+ * _.endsWith('abc', 'b', 2);
+ * // => true
+ */
+ function endsWith(string, target, position) {
+ string = toString(string);
+ target = baseToString(target);
+
+ var length = string.length;
+ position = position === undefined
+ ? length
+ : baseClamp(toInteger(position), 0, length);
+
+ var end = position;
+ position -= target.length;
+ return position >= 0 && string.slice(position, end) == target;
+ }
+
+ /**
+ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
+ * corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value. See
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * When working with HTML you should always
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
+ * XSS vectors.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, &amp; pebbles'
+ */
+ function escape(string) {
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+ }
+
+ /**
+ * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
+ * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
+ * // => '\[lodash\]\(https://lodash\.com/\)'
+ */
+ function escapeRegExp(string) {
+ string = toString(string);
+ return (string && reHasRegExpChar.test(string))
+ ? string.replace(reRegExpChar, '\\$&')
+ : string;
+ }
+
+ /**
+ * Converts `string` to
+ * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the kebab cased string.
+ * @example
+ *
+ * _.kebabCase('Foo Bar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('fooBar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('__FOO_BAR__');
+ * // => 'foo-bar'
+ */
+ var kebabCase = createCompounder(function(result, word, index) {
+ return result + (index ? '-' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Converts `string`, as space separated words, to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.lowerCase('--Foo-Bar--');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('fooBar');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('__FOO_BAR__');
+ * // => 'foo bar'
+ */
+ var lowerCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Converts the first character of `string` to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.lowerFirst('Fred');
+ * // => 'fred'
+ *
+ * _.lowerFirst('FRED');
+ * // => 'fRED'
+ */
+ var lowerFirst = createCaseFirst('toLowerCase');
+
+ /**
+ * Pads `string` on the left and right sides if it's shorter than `length`.
+ * Padding characters are truncated if they can't be evenly divided by `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.pad('abc', 8);
+ * // => ' abc '
+ *
+ * _.pad('abc', 8, '_-');
+ * // => '_-abc_-_'
+ *
+ * _.pad('abc', 3);
+ * // => 'abc'
+ */
+ function pad(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ if (!length || strLength >= length) {
+ return string;
+ }
+ var mid = (length - strLength) / 2;
+ return (
+ createPadding(nativeFloor(mid), chars) +
+ string +
+ createPadding(nativeCeil(mid), chars)
+ );
+ }
+
+ /**
+ * Pads `string` on the right side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padEnd('abc', 6);
+ * // => 'abc '
+ *
+ * _.padEnd('abc', 6, '_-');
+ * // => 'abc_-_'
+ *
+ * _.padEnd('abc', 3);
+ * // => 'abc'
+ */
+ function padEnd(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (string + createPadding(length - strLength, chars))
+ : string;
+ }
+
+ /**
+ * Pads `string` on the left side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padStart('abc', 6);
+ * // => ' abc'
+ *
+ * _.padStart('abc', 6, '_-');
+ * // => '_-_abc'
+ *
+ * _.padStart('abc', 3);
+ * // => 'abc'
+ */
+ function padStart(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (createPadding(length - strLength, chars) + string)
+ : string;
+ }
+
+ /**
+ * Converts `string` to an integer of the specified radix. If `radix` is
+ * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
+ * hexadecimal, in which case a `radix` of `16` is used.
+ *
+ * **Note:** This method aligns with the
+ * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category String
+ * @param {string} string The string to convert.
+ * @param {number} [radix=10] The radix to interpret `value` by.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.parseInt('08');
+ * // => 8
+ *
+ * _.map(['6', '08', '10'], _.parseInt);
+ * // => [6, 8, 10]
+ */
+ function parseInt(string, radix, guard) {
+ if (guard || radix == null) {
+ radix = 0;
+ } else if (radix) {
+ radix = +radix;
+ }
+ return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
+ }
+
+ /**
+ * Repeats the given string `n` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to repeat.
+ * @param {number} [n=1] The number of times to repeat the string.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the repeated string.
+ * @example
+ *
+ * _.repeat('*', 3);
+ * // => '***'
+ *
+ * _.repeat('abc', 2);
+ * // => 'abcabc'
+ *
+ * _.repeat('abc', 0);
+ * // => ''
+ */
+ function repeat(string, n, guard) {
+ if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ return baseRepeat(toString(string), n);
+ }
+
+ /**
+ * Replaces matches for `pattern` in `string` with `replacement`.
+ *
+ * **Note:** This method is based on
+ * [`String#replace`](https://mdn.io/String/replace).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to modify.
+ * @param {RegExp|string} pattern The pattern to replace.
+ * @param {Function|string} replacement The match replacement.
+ * @returns {string} Returns the modified string.
+ * @example
+ *
+ * _.replace('Hi Fred', 'Fred', 'Barney');
+ * // => 'Hi Barney'
+ */
+ function replace() {
+ var args = arguments,
+ string = toString(args[0]);
+
+ return args.length < 3 ? string : string.replace(args[1], args[2]);
+ }
+
+ /**
+ * Converts `string` to
+ * [snake case](https://en.wikipedia.org/wiki/Snake_case).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the snake cased string.
+ * @example
+ *
+ * _.snakeCase('Foo Bar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('fooBar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('--FOO-BAR--');
+ * // => 'foo_bar'
+ */
+ var snakeCase = createCompounder(function(result, word, index) {
+ return result + (index ? '_' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Splits `string` by `separator`.
+ *
+ * **Note:** This method is based on
+ * [`String#split`](https://mdn.io/String/split).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to split.
+ * @param {RegExp|string} separator The separator pattern to split by.
+ * @param {number} [limit] The length to truncate results to.
+ * @returns {Array} Returns the string segments.
+ * @example
+ *
+ * _.split('a-b-c', '-', 2);
+ * // => ['a', 'b']
+ */
+ function split(string, separator, limit) {
+ if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
+ separator = limit = undefined;
+ }
+ limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
+ if (!limit) {
+ return [];
+ }
+ string = toString(string);
+ if (string && (
+ typeof separator == 'string' ||
+ (separator != null && !isRegExp(separator))
+ )) {
+ separator = baseToString(separator);
+ if (!separator && hasUnicode(string)) {
+ return castSlice(stringToArray(string), 0, limit);
+ }
+ }
+ return string.split(separator, limit);
+ }
+
+ /**
+ * Converts `string` to
+ * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.1.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the start cased string.
+ * @example
+ *
+ * _.startCase('--foo-bar--');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('fooBar');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('__FOO_BAR__');
+ * // => 'FOO BAR'
+ */
+ var startCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + upperFirst(word);
+ });
+
+ /**
+ * Checks if `string` starts with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=0] The position to search from.
+ * @returns {boolean} Returns `true` if `string` starts with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.startsWith('abc', 'a');
+ * // => true
+ *
+ * _.startsWith('abc', 'b');
+ * // => false
+ *
+ * _.startsWith('abc', 'b', 1);
+ * // => true
+ */
+ function startsWith(string, target, position) {
+ string = toString(string);
+ position = position == null
+ ? 0
+ : baseClamp(toInteger(position), 0, string.length);
+
+ target = baseToString(target);
+ return string.slice(position, position + target.length) == target;
+ }
+
+ /**
+ * Creates a compiled template function that can interpolate data properties
+ * in "interpolate" delimiters, HTML-escape interpolated data properties in
+ * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
+ * properties may be accessed as free variables in the template. If a setting
+ * object is given, it takes precedence over `_.templateSettings` values.
+ *
+ * **Note:** In the development build `_.template` utilizes
+ * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
+ * for easier debugging.
+ *
+ * For more information on precompiling templates see
+ * [lodash's custom builds documentation](https://lodash.com/custom-builds).
+ *
+ * For more information on Chrome extension sandboxes see
+ * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The template string.
+ * @param {Object} [options={}] The options object.
+ * @param {RegExp} [options.escape=_.templateSettings.escape]
+ * The HTML "escape" delimiter.
+ * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
+ * The "evaluate" delimiter.
+ * @param {Object} [options.imports=_.templateSettings.imports]
+ * An object to import into the template as free variables.
+ * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
+ * The "interpolate" delimiter.
+ * @param {string} [options.sourceURL='lodash.templateSources[n]']
+ * The sourceURL of the compiled template.
+ * @param {string} [options.variable='obj']
+ * The data object variable name.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the compiled template function.
+ * @example
+ *
+ * // Use the "interpolate" delimiter to create a compiled template.
+ * var compiled = _.template('hello <%= user %>!');
+ * compiled({ 'user': 'fred' });
+ * // => 'hello fred!'
+ *
+ * // Use the HTML "escape" delimiter to escape data property values.
+ * var compiled = _.template('<b><%- value %></b>');
+ * compiled({ 'value': '<script>' });
+ * // => '<b>&lt;script&gt;</b>'
+ *
+ * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
+ * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the internal `print` function in "evaluate" delimiters.
+ * var compiled = _.template('<% print("hello " + user); %>!');
+ * compiled({ 'user': 'barney' });
+ * // => 'hello barney!'
+ *
+ * // Use the ES template literal delimiter as an "interpolate" delimiter.
+ * // Disable support by replacing the "interpolate" delimiter.
+ * var compiled = _.template('hello ${ user }!');
+ * compiled({ 'user': 'pebbles' });
+ * // => 'hello pebbles!'
+ *
+ * // Use backslashes to treat delimiters as plain text.
+ * var compiled = _.template('<%= "\\<%- value %\\>" %>');
+ * compiled({ 'value': 'ignored' });
+ * // => '<%- value %>'
+ *
+ * // Use the `imports` option to import `jQuery` as `jq`.
+ * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
+ * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the `sourceURL` option to specify a custom sourceURL for the template.
+ * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
+ * compiled(data);
+ * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
+ *
+ * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
+ * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
+ * compiled.source;
+ * // => function(data) {
+ * // var __t, __p = '';
+ * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
+ * // return __p;
+ * // }
+ *
+ * // Use custom template delimiters.
+ * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
+ * var compiled = _.template('hello {{ user }}!');
+ * compiled({ 'user': 'mustache' });
+ * // => 'hello mustache!'
+ *
+ * // Use the `source` property to inline compiled templates for meaningful
+ * // line numbers in error messages and stack traces.
+ * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
+ * var JST = {\
+ * "main": ' + _.template(mainText).source + '\
+ * };\
+ * ');
+ */
+ function template(string, options, guard) {
+ // Based on John Resig's `tmpl` implementation
+ // (http://ejohn.org/blog/javascript-micro-templating/)
+ // and Laura Doktorova's doT.js (https://github.com/olado/doT).
+ var settings = lodash.templateSettings;
+
+ if (guard && isIterateeCall(string, options, guard)) {
+ options = undefined;
+ }
+ string = toString(string);
+ options = assignInWith({}, options, settings, customDefaultsAssignIn);
+
+ var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
+ importsKeys = keys(imports),
+ importsValues = baseValues(imports, importsKeys);
+
+ var isEscaping,
+ isEvaluating,
+ index = 0,
+ interpolate = options.interpolate || reNoMatch,
+ source = "__p += '";
+
+ // Compile the regexp to match each delimiter.
+ var reDelimiters = RegExp(
+ (options.escape || reNoMatch).source + '|' +
+ interpolate.source + '|' +
+ (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
+ (options.evaluate || reNoMatch).source + '|$'
+ , 'g');
+
+ // Use a sourceURL for easier debugging.
+ // The sourceURL gets injected into the source that's eval-ed, so be careful
+ // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
+ // and escape the comment, thus injecting code that gets evaled.
+ var sourceURL = '//# sourceURL=' +
+ (hasOwnProperty.call(options, 'sourceURL')
+ ? (options.sourceURL + '').replace(/\s/g, ' ')
+ : ('lodash.templateSources[' + (++templateCounter) + ']')
+ ) + '\n';
+
+ string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
+ interpolateValue || (interpolateValue = esTemplateValue);
+
+ // Escape characters that can't be included in string literals.
+ source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
+
+ // Replace delimiters with snippets.
+ if (escapeValue) {
+ isEscaping = true;
+ source += "' +\n__e(" + escapeValue + ") +\n'";
+ }
+ if (evaluateValue) {
+ isEvaluating = true;
+ source += "';\n" + evaluateValue + ";\n__p += '";
+ }
+ if (interpolateValue) {
+ source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
+ }
+ index = offset + match.length;
+
+ // The JS engine embedded in Adobe products needs `match` returned in
+ // order to produce the correct `offset` value.
+ return match;
+ });
+
+ source += "';\n";
+
+ // If `variable` is not specified wrap a with-statement around the generated
+ // code to add the data object to the top of the scope chain.
+ var variable = hasOwnProperty.call(options, 'variable') && options.variable;
+ if (!variable) {
+ source = 'with (obj) {\n' + source + '\n}\n';
+ }
+ // Throw an error if a forbidden character was found in `variable`, to prevent
+ // potential command injection attacks.
+ else if (reForbiddenIdentifierChars.test(variable)) {
+ throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
+ }
+
+ // Cleanup code by stripping empty strings.
+ source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
+ .replace(reEmptyStringMiddle, '$1')
+ .replace(reEmptyStringTrailing, '$1;');
+
+ // Frame code as the function body.
+ source = 'function(' + (variable || 'obj') + ') {\n' +
+ (variable
+ ? ''
+ : 'obj || (obj = {});\n'
+ ) +
+ "var __t, __p = ''" +
+ (isEscaping
+ ? ', __e = _.escape'
+ : ''
+ ) +
+ (isEvaluating
+ ? ', __j = Array.prototype.join;\n' +
+ "function print() { __p += __j.call(arguments, '') }\n"
+ : ';\n'
+ ) +
+ source +
+ 'return __p\n}';
+
+ var result = attempt(function() {
+ return Function(importsKeys, sourceURL + 'return ' + source)
+ .apply(undefined, importsValues);
+ });
+
+ // Provide the compiled function's source by its `toString` method or
+ // the `source` property as a convenience for inlining compiled templates.
+ result.source = source;
+ if (isError(result)) {
+ throw result;
+ }
+ return result;
+ }
+
+ /**
+ * Converts `string`, as a whole, to lower case just like
+ * [String#toLowerCase](https://mdn.io/toLowerCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.toLower('--Foo-Bar--');
+ * // => '--foo-bar--'
+ *
+ * _.toLower('fooBar');
+ * // => 'foobar'
+ *
+ * _.toLower('__FOO_BAR__');
+ * // => '__foo_bar__'
+ */
+ function toLower(value) {
+ return toString(value).toLowerCase();
+ }
+
+ /**
+ * Converts `string`, as a whole, to upper case just like
+ * [String#toUpperCase](https://mdn.io/toUpperCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.toUpper('--foo-bar--');
+ * // => '--FOO-BAR--'
+ *
+ * _.toUpper('fooBar');
+ * // => 'FOOBAR'
+ *
+ * _.toUpper('__foo_bar__');
+ * // => '__FOO_BAR__'
+ */
+ function toUpper(value) {
+ return toString(value).toUpperCase();
+ }
+
+ /**
+ * Removes leading and trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trim(' abc ');
+ * // => 'abc'
+ *
+ * _.trim('-_-abc-_-', '_-');
+ * // => 'abc'
+ *
+ * _.map([' foo ', ' bar '], _.trim);
+ * // => ['foo', 'bar']
+ */
+ function trim(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return baseTrim(string);
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ chrSymbols = stringToArray(chars),
+ start = charsStartIndex(strSymbols, chrSymbols),
+ end = charsEndIndex(strSymbols, chrSymbols) + 1;
+
+ return castSlice(strSymbols, start, end).join('');
+ }
+
+ /**
+ * Removes trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimEnd(' abc ');
+ * // => ' abc'
+ *
+ * _.trimEnd('-_-abc-_-', '_-');
+ * // => '-_-abc'
+ */
+ function trimEnd(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.slice(0, trimmedEndIndex(string) + 1);
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
+
+ return castSlice(strSymbols, 0, end).join('');
+ }
+
+ /**
+ * Removes leading whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimStart(' abc ');
+ * // => 'abc '
+ *
+ * _.trimStart('-_-abc-_-', '_-');
+ * // => 'abc-_-'
+ */
+ function trimStart(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimStart, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ start = charsStartIndex(strSymbols, stringToArray(chars));
+
+ return castSlice(strSymbols, start).join('');
+ }
+
+ /**
+ * Truncates `string` if it's longer than the given maximum string length.
+ * The last characters of the truncated string are replaced with the omission
+ * string which defaults to "...".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to truncate.
+ * @param {Object} [options={}] The options object.
+ * @param {number} [options.length=30] The maximum string length.
+ * @param {string} [options.omission='...'] The string to indicate text is omitted.
+ * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
+ * @returns {string} Returns the truncated string.
+ * @example
+ *
+ * _.truncate('hi-diddly-ho there, neighborino');
+ * // => 'hi-diddly-ho there, neighbo...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': ' '
+ * });
+ * // => 'hi-diddly-ho there,...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': /,? +/
+ * });
+ * // => 'hi-diddly-ho there...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'omission': ' [...]'
+ * });
+ * // => 'hi-diddly-ho there, neig [...]'
+ */
+ function truncate(string, options) {
+ var length = DEFAULT_TRUNC_LENGTH,
+ omission = DEFAULT_TRUNC_OMISSION;
+
+ if (isObject(options)) {
+ var separator = 'separator' in options ? options.separator : separator;
+ length = 'length' in options ? toInteger(options.length) : length;
+ omission = 'omission' in options ? baseToString(options.omission) : omission;
+ }
+ string = toString(string);
+
+ var strLength = string.length;
+ if (hasUnicode(string)) {
+ var strSymbols = stringToArray(string);
+ strLength = strSymbols.length;
+ }
+ if (length >= strLength) {
+ return string;
+ }
+ var end = length - stringSize(omission);
+ if (end < 1) {
+ return omission;
+ }
+ var result = strSymbols
+ ? castSlice(strSymbols, 0, end).join('')
+ : string.slice(0, end);
+
+ if (separator === undefined) {
+ return result + omission;
+ }
+ if (strSymbols) {
+ end += (result.length - end);
+ }
+ if (isRegExp(separator)) {
+ if (string.slice(end).search(separator)) {
+ var match,
+ substring = result;
+
+ if (!separator.global) {
+ separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
+ }
+ separator.lastIndex = 0;
+ while ((match = separator.exec(substring))) {
+ var newEnd = match.index;
+ }
+ result = result.slice(0, newEnd === undefined ? end : newEnd);
+ }
+ } else if (string.indexOf(baseToString(separator), end) != end) {
+ var index = result.lastIndexOf(separator);
+ if (index > -1) {
+ result = result.slice(0, index);
+ }
+ }
+ return result + omission;
+ }
+
+ /**
+ * The inverse of `_.escape`; this method converts the HTML entities
+ * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
+ * their corresponding characters.
+ *
+ * **Note:** No other HTML entities are unescaped. To unescape additional
+ * HTML entities use a third-party library like [_he_](https://mths.be/he).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.6.0
+ * @category String
+ * @param {string} [string=''] The string to unescape.
+ * @returns {string} Returns the unescaped string.
+ * @example
+ *
+ * _.unescape('fred, barney, &amp; pebbles');
+ * // => 'fred, barney, & pebbles'
+ */
+ function unescape(string) {
+ string = toString(string);
+ return (string && reHasEscapedHtml.test(string))
+ ? string.replace(reEscapedHtml, unescapeHtmlChar)
+ : string;
+ }
+
+ /**
+ * Converts `string`, as space separated words, to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.upperCase('--foo-bar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('fooBar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('__foo_bar__');
+ * // => 'FOO BAR'
+ */
+ var upperCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toUpperCase();
+ });
+
+ /**
+ * Converts the first character of `string` to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.upperFirst('fred');
+ * // => 'Fred'
+ *
+ * _.upperFirst('FRED');
+ * // => 'FRED'
+ */
+ var upperFirst = createCaseFirst('toUpperCase');
+
+ /**
+ * Splits `string` into an array of its words.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {RegExp|string} [pattern] The pattern to match words.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the words of `string`.
+ * @example
+ *
+ * _.words('fred, barney, & pebbles');
+ * // => ['fred', 'barney', 'pebbles']
+ *
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
+ * // => ['fred', 'barney', '&', 'pebbles']
+ */
+ function words(string, pattern, guard) {
+ string = toString(string);
+ pattern = guard ? undefined : pattern;
+
+ if (pattern === undefined) {
+ return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
+ }
+ return string.match(pattern) || [];
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Attempts to invoke `func`, returning either the result or the caught error
+ * object. Any additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Function} func The function to attempt.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {*} Returns the `func` result or error object.
+ * @example
+ *
+ * // Avoid throwing errors for invalid selectors.
+ * var elements = _.attempt(function(selector) {
+ * return document.querySelectorAll(selector);
+ * }, '>_>');
+ *
+ * if (_.isError(elements)) {
+ * elements = [];
+ * }
+ */
+ var attempt = baseRest(function(func, args) {
+ try {
+ return apply(func, undefined, args);
+ } catch (e) {
+ return isError(e) ? e : new Error(e);
+ }
+ });
+
+ /**
+ * Binds methods of an object to the object itself, overwriting the existing
+ * method.
+ *
+ * **Note:** This method doesn't set the "length" property of bound functions.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Object} object The object to bind and assign the bound methods to.
+ * @param {...(string|string[])} methodNames The object method names to bind.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var view = {
+ * 'label': 'docs',
+ * 'click': function() {
+ * console.log('clicked ' + this.label);
+ * }
+ * };
+ *
+ * _.bindAll(view, ['click']);
+ * jQuery(element).on('click', view.click);
+ * // => Logs 'clicked docs' when clicked.
+ */
+ var bindAll = flatRest(function(object, methodNames) {
+ arrayEach(methodNames, function(key) {
+ key = toKey(key);
+ baseAssignValue(object, key, bind(object[key], object));
+ });
+ return object;
+ });
+
+ /**
+ * Creates a function that iterates over `pairs` and invokes the corresponding
+ * function of the first predicate to return truthy. The predicate-function
+ * pairs are invoked with the `this` binding and arguments of the created
+ * function.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Array} pairs The predicate-function pairs.
+ * @returns {Function} Returns the new composite function.
+ * @example
+ *
+ * var func = _.cond([
+ * [_.matches({ 'a': 1 }), _.constant('matches A')],
+ * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
+ * [_.stubTrue, _.constant('no match')]
+ * ]);
+ *
+ * func({ 'a': 1, 'b': 2 });
+ * // => 'matches A'
+ *
+ * func({ 'a': 0, 'b': 1 });
+ * // => 'matches B'
+ *
+ * func({ 'a': '1', 'b': '2' });
+ * // => 'no match'
+ */
+ function cond(pairs) {
+ var length = pairs == null ? 0 : pairs.length,
+ toIteratee = getIteratee();
+
+ pairs = !length ? [] : arrayMap(pairs, function(pair) {
+ if (typeof pair[1] != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return [toIteratee(pair[0]), pair[1]];
+ });
+
+ return baseRest(function(args) {
+ var index = -1;
+ while (++index < length) {
+ var pair = pairs[index];
+ if (apply(pair[0], this, args)) {
+ return apply(pair[1], this, args);
+ }
+ }
+ });
+ }
+
+ /**
+ * Creates a function that invokes the predicate properties of `source` with
+ * the corresponding property values of a given object, returning `true` if
+ * all predicates return truthy, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.conformsTo` with
+ * `source` partially applied.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 2, 'b': 1 },
+ * { 'a': 1, 'b': 2 }
+ * ];
+ *
+ * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
+ * // => [{ 'a': 1, 'b': 2 }]
+ */
+ function conforms(source) {
+ return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * Creates a function that returns `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new constant function.
+ * @example
+ *
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
+ *
+ * console.log(objects);
+ * // => [{ 'a': 1 }, { 'a': 1 }]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => true
+ */
+ function constant(value) {
+ return function() {
+ return value;
+ };
+ }
+
+ /**
+ * Checks `value` to determine whether a default value should be returned in
+ * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
+ * or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.14.0
+ * @category Util
+ * @param {*} value The value to check.
+ * @param {*} defaultValue The default value.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * _.defaultTo(1, 10);
+ * // => 1
+ *
+ * _.defaultTo(undefined, 10);
+ * // => 10
+ */
+ function defaultTo(value, defaultValue) {
+ return (value == null || value !== value) ? defaultValue : value;
+ }
+
+ /**
+ * Creates a function that returns the result of invoking the given functions
+ * with the `this` binding of the created function, where each successive
+ * invocation is supplied the return value of the previous.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] The functions to invoke.
+ * @returns {Function} Returns the new composite function.
+ * @see _.flowRight
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flow([_.add, square]);
+ * addSquare(1, 2);
+ * // => 9
+ */
+ var flow = createFlow();
+
+ /**
+ * This method is like `_.flow` except that it creates a function that
+ * invokes the given functions from right to left.
+ *
+ * @static
+ * @since 3.0.0
+ * @memberOf _
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] The functions to invoke.
+ * @returns {Function} Returns the new composite function.
+ * @see _.flow
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flowRight([square, _.add]);
+ * addSquare(1, 2);
+ * // => 9
+ */
+ var flowRight = createFlow(true);
+
+ /**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+ function identity(value) {
+ return value;
+ }
+
+ /**
+ * Creates a function that invokes `func` with the arguments of the created
+ * function. If `func` is a property name, the created function returns the
+ * property value for a given element. If `func` is an array or object, the
+ * created function returns `true` for elements that contain the equivalent
+ * source properties, otherwise it returns `false`.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Util
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @returns {Function} Returns the callback.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
+ * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, _.iteratee(['user', 'fred']));
+ * // => [{ 'user': 'fred', 'age': 40 }]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, _.iteratee('user'));
+ * // => ['barney', 'fred']
+ *
+ * // Create custom iteratee shorthands.
+ * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
+ * return !_.isRegExp(func) ? iteratee(func) : function(string) {
+ * return func.test(string);
+ * };
+ * });
+ *
+ * _.filter(['abc', 'def'], /ef/);
+ * // => ['def']
+ */
+ function iteratee(func) {
+ return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * Creates a function that performs a partial deep comparison between a given
+ * object and `source`, returning `true` if the given object has equivalent
+ * property values, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.isMatch` with `source`
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * **Note:** Multiple values can be checked by combining several matchers
+ * using `_.overSome`
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
+ * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
+ *
+ * // Checking for several possible values
+ * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
+ * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
+ */
+ function matches(source) {
+ return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * Creates a function that performs a partial deep comparison between the
+ * value at `path` of a given object to `srcValue`, returning `true` if the
+ * object value is equivalent, else `false`.
+ *
+ * **Note:** Partial comparisons will match empty array and empty object
+ * `srcValue` values against any array or object value, respectively. See
+ * `_.isEqual` for a list of supported value comparisons.
+ *
+ * **Note:** Multiple values can be checked by combining several matchers
+ * using `_.overSome`
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.find(objects, _.matchesProperty('a', 4));
+ * // => { 'a': 4, 'b': 5, 'c': 6 }
+ *
+ * // Checking for several possible values
+ * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
+ * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
+ */
+ function matchesProperty(path, srcValue) {
+ return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * Creates a function that invokes the method at `path` of a given object.
+ * Any additional arguments are provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': _.constant(2) } },
+ * { 'a': { 'b': _.constant(1) } }
+ * ];
+ *
+ * _.map(objects, _.method('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(objects, _.method(['a', 'b']));
+ * // => [2, 1]
+ */
+ var method = baseRest(function(path, args) {
+ return function(object) {
+ return baseInvoke(object, path, args);
+ };
+ });
+
+ /**
+ * The opposite of `_.method`; this method creates a function that invokes
+ * the method at a given path of `object`. Any additional arguments are
+ * provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var array = _.times(3, _.constant),
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.methodOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
+ * // => [2, 0]
+ */
+ var methodOf = baseRest(function(object, args) {
+ return function(path) {
+ return baseInvoke(object, path, args);
+ };
+ });
+
+ /**
+ * Adds all own enumerable string keyed function properties of a source
+ * object to the destination object. If `object` is a function, then methods
+ * are added to its prototype as well.
+ *
+ * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
+ * avoid conflicts caused by modifying the original.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Function|Object} [object=lodash] The destination object.
+ * @param {Object} source The object of functions to add.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
+ * @returns {Function|Object} Returns `object`.
+ * @example
+ *
+ * function vowels(string) {
+ * return _.filter(string, function(v) {
+ * return /[aeiou]/i.test(v);
+ * });
+ * }
+ *
+ * _.mixin({ 'vowels': vowels });
+ * _.vowels('fred');
+ * // => ['e']
+ *
+ * _('fred').vowels().value();
+ * // => ['e']
+ *
+ * _.mixin({ 'vowels': vowels }, { 'chain': false });
+ * _('fred').vowels();
+ * // => ['e']
+ */
+ function mixin(object, source, options) {
+ var props = keys(source),
+ methodNames = baseFunctions(source, props);
+
+ if (options == null &&
+ !(isObject(source) && (methodNames.length || !props.length))) {
+ options = source;
+ source = object;
+ object = this;
+ methodNames = baseFunctions(source, keys(source));
+ }
+ var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
+ isFunc = isFunction(object);
+
+ arrayEach(methodNames, function(methodName) {
+ var func = source[methodName];
+ object[methodName] = func;
+ if (isFunc) {
+ object.prototype[methodName] = function() {
+ var chainAll = this.__chain__;
+ if (chain || chainAll) {
+ var result = object(this.__wrapped__),
+ actions = result.__actions__ = copyArray(this.__actions__);
+
+ actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+ result.__chain__ = chainAll;
+ return result;
+ }
+ return func.apply(object, arrayPush([this.value()], arguments));
+ };
+ }
+ });
+
+ return object;
+ }
+
+ /**
+ * Reverts the `_` variable to its previous value and returns a reference to
+ * the `lodash` function.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @returns {Function} Returns the `lodash` function.
+ * @example
+ *
+ * var lodash = _.noConflict();
+ */
+ function noConflict() {
+ if (root._ === this) {
+ root._ = oldDash;
+ }
+ return this;
+ }
+
+ /**
+ * This method returns `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * _.times(2, _.noop);
+ * // => [undefined, undefined]
+ */
+ function noop() {
+ // No operation performed.
+ }
+
+ /**
+ * Creates a function that gets the argument at index `n`. If `n` is negative,
+ * the nth argument from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [n=0] The index of the argument to return.
+ * @returns {Function} Returns the new pass-thru function.
+ * @example
+ *
+ * var func = _.nthArg(1);
+ * func('a', 'b', 'c', 'd');
+ * // => 'b'
+ *
+ * var func = _.nthArg(-2);
+ * func('a', 'b', 'c', 'd');
+ * // => 'c'
+ */
+ function nthArg(n) {
+ n = toInteger(n);
+ return baseRest(function(args) {
+ return baseNth(args, n);
+ });
+ }
+
+ /**
+ * Creates a function that invokes `iteratees` with the arguments it receives
+ * and returns their results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to invoke.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.over([Math.max, Math.min]);
+ *
+ * func(1, 2, 3, 4);
+ * // => [4, 1]
+ */
+ var over = createOver(arrayMap);
+
+ /**
+ * Creates a function that checks if **all** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * Following shorthands are possible for providing predicates.
+ * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
+ * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overEvery([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => false
+ *
+ * func(NaN);
+ * // => false
+ */
+ var overEvery = createOver(arrayEvery);
+
+ /**
+ * Creates a function that checks if **any** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * Following shorthands are possible for providing predicates.
+ * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
+ * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overSome([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => true
+ *
+ * func(NaN);
+ * // => false
+ *
+ * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
+ * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
+ */
+ var overSome = createOver(arraySome);
+
+ /**
+ * Creates a function that returns the value at `path` of a given object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': 2 } },
+ * { 'a': { 'b': 1 } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
+ * // => [1, 2]
+ */
+ function property(path) {
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
+ }
+
+ /**
+ * The opposite of `_.property`; this method creates a function that returns
+ * the value at a given path of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var array = [0, 1, 2],
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
+ * // => [2, 0]
+ */
+ function propertyOf(object) {
+ return function(path) {
+ return object == null ? undefined : baseGet(object, path);
+ };
+ }
+
+ /**
+ * Creates an array of numbers (positive and/or negative) progressing from
+ * `start` up to, but not including, `end`. A step of `-1` is used if a negative
+ * `start` is specified without an `end` or `step`. If `end` is not specified,
+ * it's set to `start` with `start` then set to `0`.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.rangeRight
+ * @example
+ *
+ * _.range(4);
+ * // => [0, 1, 2, 3]
+ *
+ * _.range(-4);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 5);
+ * // => [1, 2, 3, 4]
+ *
+ * _.range(0, 20, 5);
+ * // => [0, 5, 10, 15]
+ *
+ * _.range(0, -4, -1);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.range(0);
+ * // => []
+ */
+ var range = createRange();
+
+ /**
+ * This method is like `_.range` except that it populates values in
+ * descending order.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.range
+ * @example
+ *
+ * _.rangeRight(4);
+ * // => [3, 2, 1, 0]
+ *
+ * _.rangeRight(-4);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 5);
+ * // => [4, 3, 2, 1]
+ *
+ * _.rangeRight(0, 20, 5);
+ * // => [15, 10, 5, 0]
+ *
+ * _.rangeRight(0, -4, -1);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.rangeRight(0);
+ * // => []
+ */
+ var rangeRight = createRange(true);
+
+ /**
+ * This method returns a new empty array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
+ */
+ function stubArray() {
+ return [];
+ }
+
+ /**
+ * This method returns `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `false`.
+ * @example
+ *
+ * _.times(2, _.stubFalse);
+ * // => [false, false]
+ */
+ function stubFalse() {
+ return false;
+ }
+
+ /**
+ * This method returns a new empty object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Object} Returns the new empty object.
+ * @example
+ *
+ * var objects = _.times(2, _.stubObject);
+ *
+ * console.log(objects);
+ * // => [{}, {}]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => false
+ */
+ function stubObject() {
+ return {};
+ }
+
+ /**
+ * This method returns an empty string.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {string} Returns the empty string.
+ * @example
+ *
+ * _.times(2, _.stubString);
+ * // => ['', '']
+ */
+ function stubString() {
+ return '';
+ }
+
+ /**
+ * This method returns `true`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `true`.
+ * @example
+ *
+ * _.times(2, _.stubTrue);
+ * // => [true, true]
+ */
+ function stubTrue() {
+ return true;
+ }
+
+ /**
+ * Invokes the iteratee `n` times, returning an array of the results of
+ * each invocation. The iteratee is invoked with one argument; (index).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.times(3, String);
+ * // => ['0', '1', '2']
+ *
+ * _.times(4, _.constant(0));
+ * // => [0, 0, 0, 0]
+ */
+ function times(n, iteratee) {
+ n = toInteger(n);
+ if (n < 1 || n > MAX_SAFE_INTEGER) {
+ return [];
+ }
+ var index = MAX_ARRAY_LENGTH,
+ length = nativeMin(n, MAX_ARRAY_LENGTH);
+
+ iteratee = getIteratee(iteratee);
+ n -= MAX_ARRAY_LENGTH;
+
+ var result = baseTimes(length, iteratee);
+ while (++index < n) {
+ iteratee(index);
+ }
+ return result;
+ }
+
+ /**
+ * Converts `value` to a property path array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the new property path array.
+ * @example
+ *
+ * _.toPath('a.b.c');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toPath('a[0].b.c');
+ * // => ['a', '0', 'b', 'c']
+ */
+ function toPath(value) {
+ if (isArray(value)) {
+ return arrayMap(value, toKey);
+ }
+ return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
+ }
+
+ /**
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {string} [prefix=''] The value to prefix the ID with.
+ * @returns {string} Returns the unique ID.
+ * @example
+ *
+ * _.uniqueId('contact_');
+ * // => 'contact_104'
+ *
+ * _.uniqueId();
+ * // => '105'
+ */
+ function uniqueId(prefix) {
+ var id = ++idCounter;
+ return toString(prefix) + id;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Adds two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {number} augend The first number in an addition.
+ * @param {number} addend The second number in an addition.
+ * @returns {number} Returns the total.
+ * @example
+ *
+ * _.add(6, 4);
+ * // => 10
+ */
+ var add = createMathOperation(function(augend, addend) {
+ return augend + addend;
+ }, 0);
+
+ /**
+ * Computes `number` rounded up to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round up.
+ * @param {number} [precision=0] The precision to round up to.
+ * @returns {number} Returns the rounded up number.
+ * @example
+ *
+ * _.ceil(4.006);
+ * // => 5
+ *
+ * _.ceil(6.004, 2);
+ * // => 6.01
+ *
+ * _.ceil(6040, -2);
+ * // => 6100
+ */
+ var ceil = createRound('ceil');
+
+ /**
+ * Divide two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} dividend The first number in a division.
+ * @param {number} divisor The second number in a division.
+ * @returns {number} Returns the quotient.
+ * @example
+ *
+ * _.divide(6, 4);
+ * // => 1.5
+ */
+ var divide = createMathOperation(function(dividend, divisor) {
+ return dividend / divisor;
+ }, 1);
+
+ /**
+ * Computes `number` rounded down to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round down.
+ * @param {number} [precision=0] The precision to round down to.
+ * @returns {number} Returns the rounded down number.
+ * @example
+ *
+ * _.floor(4.006);
+ * // => 4
+ *
+ * _.floor(0.046, 2);
+ * // => 0.04
+ *
+ * _.floor(4060, -2);
+ * // => 4000
+ */
+ var floor = createRound('floor');
+
+ /**
+ * Computes the maximum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * _.max([4, 2, 8, 6]);
+ * // => 8
+ *
+ * _.max([]);
+ * // => undefined
+ */
+ function max(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseGt)
+ : undefined;
+ }
+
+ /**
+ * This method is like `_.max` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.maxBy(objects, function(o) { return o.n; });
+ * // => { 'n': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.maxBy(objects, 'n');
+ * // => { 'n': 2 }
+ */
+ function maxBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
+ : undefined;
+ }
+
+ /**
+ * Computes the mean of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * _.mean([4, 2, 8, 6]);
+ * // => 5
+ */
+ function mean(array) {
+ return baseMean(array, identity);
+ }
+
+ /**
+ * This method is like `_.mean` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be averaged.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.meanBy(objects, function(o) { return o.n; });
+ * // => 5
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.meanBy(objects, 'n');
+ * // => 5
+ */
+ function meanBy(array, iteratee) {
+ return baseMean(array, getIteratee(iteratee, 2));
+ }
+
+ /**
+ * Computes the minimum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * _.min([4, 2, 8, 6]);
+ * // => 2
+ *
+ * _.min([]);
+ * // => undefined
+ */
+ function min(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseLt)
+ : undefined;
+ }
+
+ /**
+ * This method is like `_.min` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.minBy(objects, function(o) { return o.n; });
+ * // => { 'n': 1 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.minBy(objects, 'n');
+ * // => { 'n': 1 }
+ */
+ function minBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
+ : undefined;
+ }
+
+ /**
+ * Multiply two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} multiplier The first number in a multiplication.
+ * @param {number} multiplicand The second number in a multiplication.
+ * @returns {number} Returns the product.
+ * @example
+ *
+ * _.multiply(6, 4);
+ * // => 24
+ */
+ var multiply = createMathOperation(function(multiplier, multiplicand) {
+ return multiplier * multiplicand;
+ }, 1);
+
+ /**
+ * Computes `number` rounded to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round.
+ * @param {number} [precision=0] The precision to round to.
+ * @returns {number} Returns the rounded number.
+ * @example
+ *
+ * _.round(4.006);
+ * // => 4
+ *
+ * _.round(4.006, 2);
+ * // => 4.01
+ *
+ * _.round(4060, -2);
+ * // => 4100
+ */
+ var round = createRound('round');
+
+ /**
+ * Subtract two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {number} minuend The first number in a subtraction.
+ * @param {number} subtrahend The second number in a subtraction.
+ * @returns {number} Returns the difference.
+ * @example
+ *
+ * _.subtract(6, 4);
+ * // => 2
+ */
+ var subtract = createMathOperation(function(minuend, subtrahend) {
+ return minuend - subtrahend;
+ }, 0);
+
+ /**
+ * Computes the sum of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * _.sum([4, 2, 8, 6]);
+ * // => 20
+ */
+ function sum(array) {
+ return (array && array.length)
+ ? baseSum(array, identity)
+ : 0;
+ }
+
+ /**
+ * This method is like `_.sum` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be summed.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.sumBy(objects, function(o) { return o.n; });
+ * // => 20
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sumBy(objects, 'n');
+ * // => 20
+ */
+ function sumBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSum(array, getIteratee(iteratee, 2))
+ : 0;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return wrapped values in chain sequences.
+ lodash.after = after;
+ lodash.ary = ary;
+ lodash.assign = assign;
+ lodash.assignIn = assignIn;
+ lodash.assignInWith = assignInWith;
+ lodash.assignWith = assignWith;
+ lodash.at = at;
+ lodash.before = before;
+ lodash.bind = bind;
+ lodash.bindAll = bindAll;
+ lodash.bindKey = bindKey;
+ lodash.castArray = castArray;
+ lodash.chain = chain;
+ lodash.chunk = chunk;
+ lodash.compact = compact;
+ lodash.concat = concat;
+ lodash.cond = cond;
+ lodash.conforms = conforms;
+ lodash.constant = constant;
+ lodash.countBy = countBy;
+ lodash.create = create;
+ lodash.curry = curry;
+ lodash.curryRight = curryRight;
+ lodash.debounce = debounce;
+ lodash.defaults = defaults;
+ lodash.defaultsDeep = defaultsDeep;
+ lodash.defer = defer;
+ lodash.delay = delay;
+ lodash.difference = difference;
+ lodash.differenceBy = differenceBy;
+ lodash.differenceWith = differenceWith;
+ lodash.drop = drop;
+ lodash.dropRight = dropRight;
+ lodash.dropRightWhile = dropRightWhile;
+ lodash.dropWhile = dropWhile;
+ lodash.fill = fill;
+ lodash.filter = filter;
+ lodash.flatMap = flatMap;
+ lodash.flatMapDeep = flatMapDeep;
+ lodash.flatMapDepth = flatMapDepth;
+ lodash.flatten = flatten;
+ lodash.flattenDeep = flattenDeep;
+ lodash.flattenDepth = flattenDepth;
+ lodash.flip = flip;
+ lodash.flow = flow;
+ lodash.flowRight = flowRight;
+ lodash.fromPairs = fromPairs;
+ lodash.functions = functions;
+ lodash.functionsIn = functionsIn;
+ lodash.groupBy = groupBy;
+ lodash.initial = initial;
+ lodash.intersection = intersection;
+ lodash.intersectionBy = intersectionBy;
+ lodash.intersectionWith = intersectionWith;
+ lodash.invert = invert;
+ lodash.invertBy = invertBy;
+ lodash.invokeMap = invokeMap;
+ lodash.iteratee = iteratee;
+ lodash.keyBy = keyBy;
+ lodash.keys = keys;
+ lodash.keysIn = keysIn;
+ lodash.map = map;
+ lodash.mapKeys = mapKeys;
+ lodash.mapValues = mapValues;
+ lodash.matches = matches;
+ lodash.matchesProperty = matchesProperty;
+ lodash.memoize = memoize;
+ lodash.merge = merge;
+ lodash.mergeWith = mergeWith;
+ lodash.method = method;
+ lodash.methodOf = methodOf;
+ lodash.mixin = mixin;
+ lodash.negate = negate;
+ lodash.nthArg = nthArg;
+ lodash.omit = omit;
+ lodash.omitBy = omitBy;
+ lodash.once = once;
+ lodash.orderBy = orderBy;
+ lodash.over = over;
+ lodash.overArgs = overArgs;
+ lodash.overEvery = overEvery;
+ lodash.overSome = overSome;
+ lodash.partial = partial;
+ lodash.partialRight = partialRight;
+ lodash.partition = partition;
+ lodash.pick = pick;
+ lodash.pickBy = pickBy;
+ lodash.property = property;
+ lodash.propertyOf = propertyOf;
+ lodash.pull = pull;
+ lodash.pullAll = pullAll;
+ lodash.pullAllBy = pullAllBy;
+ lodash.pullAllWith = pullAllWith;
+ lodash.pullAt = pullAt;
+ lodash.range = range;
+ lodash.rangeRight = rangeRight;
+ lodash.rearg = rearg;
+ lodash.reject = reject;
+ lodash.remove = remove;
+ lodash.rest = rest;
+ lodash.reverse = reverse;
+ lodash.sampleSize = sampleSize;
+ lodash.set = set;
+ lodash.setWith = setWith;
+ lodash.shuffle = shuffle;
+ lodash.slice = slice;
+ lodash.sortBy = sortBy;
+ lodash.sortedUniq = sortedUniq;
+ lodash.sortedUniqBy = sortedUniqBy;
+ lodash.split = split;
+ lodash.spread = spread;
+ lodash.tail = tail;
+ lodash.take = take;
+ lodash.takeRight = takeRight;
+ lodash.takeRightWhile = takeRightWhile;
+ lodash.takeWhile = takeWhile;
+ lodash.tap = tap;
+ lodash.throttle = throttle;
+ lodash.thru = thru;
+ lodash.toArray = toArray;
+ lodash.toPairs = toPairs;
+ lodash.toPairsIn = toPairsIn;
+ lodash.toPath = toPath;
+ lodash.toPlainObject = toPlainObject;
+ lodash.transform = transform;
+ lodash.unary = unary;
+ lodash.union = union;
+ lodash.unionBy = unionBy;
+ lodash.unionWith = unionWith;
+ lodash.uniq = uniq;
+ lodash.uniqBy = uniqBy;
+ lodash.uniqWith = uniqWith;
+ lodash.unset = unset;
+ lodash.unzip = unzip;
+ lodash.unzipWith = unzipWith;
+ lodash.update = update;
+ lodash.updateWith = updateWith;
+ lodash.values = values;
+ lodash.valuesIn = valuesIn;
+ lodash.without = without;
+ lodash.words = words;
+ lodash.wrap = wrap;
+ lodash.xor = xor;
+ lodash.xorBy = xorBy;
+ lodash.xorWith = xorWith;
+ lodash.zip = zip;
+ lodash.zipObject = zipObject;
+ lodash.zipObjectDeep = zipObjectDeep;
+ lodash.zipWith = zipWith;
+
+ // Add aliases.
+ lodash.entries = toPairs;
+ lodash.entriesIn = toPairsIn;
+ lodash.extend = assignIn;
+ lodash.extendWith = assignInWith;
+
+ // Add methods to `lodash.prototype`.
+ mixin(lodash, lodash);
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return unwrapped values in chain sequences.
+ lodash.add = add;
+ lodash.attempt = attempt;
+ lodash.camelCase = camelCase;
+ lodash.capitalize = capitalize;
+ lodash.ceil = ceil;
+ lodash.clamp = clamp;
+ lodash.clone = clone;
+ lodash.cloneDeep = cloneDeep;
+ lodash.cloneDeepWith = cloneDeepWith;
+ lodash.cloneWith = cloneWith;
+ lodash.conformsTo = conformsTo;
+ lodash.deburr = deburr;
+ lodash.defaultTo = defaultTo;
+ lodash.divide = divide;
+ lodash.endsWith = endsWith;
+ lodash.eq = eq;
+ lodash.escape = escape;
+ lodash.escapeRegExp = escapeRegExp;
+ lodash.every = every;
+ lodash.find = find;
+ lodash.findIndex = findIndex;
+ lodash.findKey = findKey;
+ lodash.findLast = findLast;
+ lodash.findLastIndex = findLastIndex;
+ lodash.findLastKey = findLastKey;
+ lodash.floor = floor;
+ lodash.forEach = forEach;
+ lodash.forEachRight = forEachRight;
+ lodash.forIn = forIn;
+ lodash.forInRight = forInRight;
+ lodash.forOwn = forOwn;
+ lodash.forOwnRight = forOwnRight;
+ lodash.get = get;
+ lodash.gt = gt;
+ lodash.gte = gte;
+ lodash.has = has;
+ lodash.hasIn = hasIn;
+ lodash.head = head;
+ lodash.identity = identity;
+ lodash.includes = includes;
+ lodash.indexOf = indexOf;
+ lodash.inRange = inRange;
+ lodash.invoke = invoke;
+ lodash.isArguments = isArguments;
+ lodash.isArray = isArray;
+ lodash.isArrayBuffer = isArrayBuffer;
+ lodash.isArrayLike = isArrayLike;
+ lodash.isArrayLikeObject = isArrayLikeObject;
+ lodash.isBoolean = isBoolean;
+ lodash.isBuffer = isBuffer;
+ lodash.isDate = isDate;
+ lodash.isElement = isElement;
+ lodash.isEmpty = isEmpty;
+ lodash.isEqual = isEqual;
+ lodash.isEqualWith = isEqualWith;
+ lodash.isError = isError;
+ lodash.isFinite = isFinite;
+ lodash.isFunction = isFunction;
+ lodash.isInteger = isInteger;
+ lodash.isLength = isLength;
+ lodash.isMap = isMap;
+ lodash.isMatch = isMatch;
+ lodash.isMatchWith = isMatchWith;
+ lodash.isNaN = isNaN;
+ lodash.isNative = isNative;
+ lodash.isNil = isNil;
+ lodash.isNull = isNull;
+ lodash.isNumber = isNumber;
+ lodash.isObject = isObject;
+ lodash.isObjectLike = isObjectLike;
+ lodash.isPlainObject = isPlainObject;
+ lodash.isRegExp = isRegExp;
+ lodash.isSafeInteger = isSafeInteger;
+ lodash.isSet = isSet;
+ lodash.isString = isString;
+ lodash.isSymbol = isSymbol;
+ lodash.isTypedArray = isTypedArray;
+ lodash.isUndefined = isUndefined;
+ lodash.isWeakMap = isWeakMap;
+ lodash.isWeakSet = isWeakSet;
+ lodash.join = join;
+ lodash.kebabCase = kebabCase;
+ lodash.last = last;
+ lodash.lastIndexOf = lastIndexOf;
+ lodash.lowerCase = lowerCase;
+ lodash.lowerFirst = lowerFirst;
+ lodash.lt = lt;
+ lodash.lte = lte;
+ lodash.max = max;
+ lodash.maxBy = maxBy;
+ lodash.mean = mean;
+ lodash.meanBy = meanBy;
+ lodash.min = min;
+ lodash.minBy = minBy;
+ lodash.stubArray = stubArray;
+ lodash.stubFalse = stubFalse;
+ lodash.stubObject = stubObject;
+ lodash.stubString = stubString;
+ lodash.stubTrue = stubTrue;
+ lodash.multiply = multiply;
+ lodash.nth = nth;
+ lodash.noConflict = noConflict;
+ lodash.noop = noop;
+ lodash.now = now;
+ lodash.pad = pad;
+ lodash.padEnd = padEnd;
+ lodash.padStart = padStart;
+ lodash.parseInt = parseInt;
+ lodash.random = random;
+ lodash.reduce = reduce;
+ lodash.reduceRight = reduceRight;
+ lodash.repeat = repeat;
+ lodash.replace = replace;
+ lodash.result = result;
+ lodash.round = round;
+ lodash.runInContext = runInContext;
+ lodash.sample = sample;
+ lodash.size = size;
+ lodash.snakeCase = snakeCase;
+ lodash.some = some;
+ lodash.sortedIndex = sortedIndex;
+ lodash.sortedIndexBy = sortedIndexBy;
+ lodash.sortedIndexOf = sortedIndexOf;
+ lodash.sortedLastIndex = sortedLastIndex;
+ lodash.sortedLastIndexBy = sortedLastIndexBy;
+ lodash.sortedLastIndexOf = sortedLastIndexOf;
+ lodash.startCase = startCase;
+ lodash.startsWith = startsWith;
+ lodash.subtract = subtract;
+ lodash.sum = sum;
+ lodash.sumBy = sumBy;
+ lodash.template = template;
+ lodash.times = times;
+ lodash.toFinite = toFinite;
+ lodash.toInteger = toInteger;
+ lodash.toLength = toLength;
+ lodash.toLower = toLower;
+ lodash.toNumber = toNumber;
+ lodash.toSafeInteger = toSafeInteger;
+ lodash.toString = toString;
+ lodash.toUpper = toUpper;
+ lodash.trim = trim;
+ lodash.trimEnd = trimEnd;
+ lodash.trimStart = trimStart;
+ lodash.truncate = truncate;
+ lodash.unescape = unescape;
+ lodash.uniqueId = uniqueId;
+ lodash.upperCase = upperCase;
+ lodash.upperFirst = upperFirst;
+
+ // Add aliases.
+ lodash.each = forEach;
+ lodash.eachRight = forEachRight;
+ lodash.first = head;
+
+ mixin(lodash, (function() {
+ var source = {};
+ baseForOwn(lodash, function(func, methodName) {
+ if (!hasOwnProperty.call(lodash.prototype, methodName)) {
+ source[methodName] = func;
+ }
+ });
+ return source;
+ }()), { 'chain': false });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The semantic version number.
+ *
+ * @static
+ * @memberOf _
+ * @type {string}
+ */
+ lodash.VERSION = VERSION;
+
+ // Assign default placeholders.
+ arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
+ lodash[methodName].placeholder = lodash;
+ });
+
+ // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
+ arrayEach(['drop', 'take'], function(methodName, index) {
+ LazyWrapper.prototype[methodName] = function(n) {
+ n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
+
+ var result = (this.__filtered__ && !index)
+ ? new LazyWrapper(this)
+ : this.clone();
+
+ if (result.__filtered__) {
+ result.__takeCount__ = nativeMin(n, result.__takeCount__);
+ } else {
+ result.__views__.push({
+ 'size': nativeMin(n, MAX_ARRAY_LENGTH),
+ 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
+ });
+ }
+ return result;
+ };
+
+ LazyWrapper.prototype[methodName + 'Right'] = function(n) {
+ return this.reverse()[methodName](n).reverse();
+ };
+ });
+
+ // Add `LazyWrapper` methods that accept an `iteratee` value.
+ arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
+ var type = index + 1,
+ isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
+
+ LazyWrapper.prototype[methodName] = function(iteratee) {
+ var result = this.clone();
+ result.__iteratees__.push({
+ 'iteratee': getIteratee(iteratee, 3),
+ 'type': type
+ });
+ result.__filtered__ = result.__filtered__ || isFilter;
+ return result;
+ };
+ });
+
+ // Add `LazyWrapper` methods for `_.head` and `_.last`.
+ arrayEach(['head', 'last'], function(methodName, index) {
+ var takeName = 'take' + (index ? 'Right' : '');
+
+ LazyWrapper.prototype[methodName] = function() {
+ return this[takeName](1).value()[0];
+ };
+ });
+
+ // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
+ arrayEach(['initial', 'tail'], function(methodName, index) {
+ var dropName = 'drop' + (index ? '' : 'Right');
+
+ LazyWrapper.prototype[methodName] = function() {
+ return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
+ };
+ });
+
+ LazyWrapper.prototype.compact = function() {
+ return this.filter(identity);
+ };
+
+ LazyWrapper.prototype.find = function(predicate) {
+ return this.filter(predicate).head();
+ };
+
+ LazyWrapper.prototype.findLast = function(predicate) {
+ return this.reverse().find(predicate);
+ };
+
+ LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
+ if (typeof path == 'function') {
+ return new LazyWrapper(this);
+ }
+ return this.map(function(value) {
+ return baseInvoke(value, path, args);
+ });
+ });
+
+ LazyWrapper.prototype.reject = function(predicate) {
+ return this.filter(negate(getIteratee(predicate)));
+ };
+
+ LazyWrapper.prototype.slice = function(start, end) {
+ start = toInteger(start);
+
+ var result = this;
+ if (result.__filtered__ && (start > 0 || end < 0)) {
+ return new LazyWrapper(result);
+ }
+ if (start < 0) {
+ result = result.takeRight(-start);
+ } else if (start) {
+ result = result.drop(start);
+ }
+ if (end !== undefined) {
+ end = toInteger(end);
+ result = end < 0 ? result.dropRight(-end) : result.take(end - start);
+ }
+ return result;
+ };
+
+ LazyWrapper.prototype.takeRightWhile = function(predicate) {
+ return this.reverse().takeWhile(predicate).reverse();
+ };
+
+ LazyWrapper.prototype.toArray = function() {
+ return this.take(MAX_ARRAY_LENGTH);
+ };
+
+ // Add `LazyWrapper` methods to `lodash.prototype`.
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+ var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
+ isTaker = /^(?:head|last)$/.test(methodName),
+ lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
+ retUnwrapped = isTaker || /^find/.test(methodName);
+
+ if (!lodashFunc) {
+ return;
+ }
+ lodash.prototype[methodName] = function() {
+ var value = this.__wrapped__,
+ args = isTaker ? [1] : arguments,
+ isLazy = value instanceof LazyWrapper,
+ iteratee = args[0],
+ useLazy = isLazy || isArray(value);
+
+ var interceptor = function(value) {
+ var result = lodashFunc.apply(lodash, arrayPush([value], args));
+ return (isTaker && chainAll) ? result[0] : result;
+ };
+
+ if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
+ // Avoid lazy use if the iteratee has a "length" value other than `1`.
+ isLazy = useLazy = false;
+ }
+ var chainAll = this.__chain__,
+ isHybrid = !!this.__actions__.length,
+ isUnwrapped = retUnwrapped && !chainAll,
+ onlyLazy = isLazy && !isHybrid;
+
+ if (!retUnwrapped && useLazy) {
+ value = onlyLazy ? value : new LazyWrapper(this);
+ var result = func.apply(value, args);
+ result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
+ return new LodashWrapper(result, chainAll);
+ }
+ if (isUnwrapped && onlyLazy) {
+ return func.apply(this, args);
+ }
+ result = this.thru(interceptor);
+ return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
+ };
+ });
+
+ // Add `Array` methods to `lodash.prototype`.
+ arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
+ var func = arrayProto[methodName],
+ chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
+ retUnwrapped = /^(?:pop|shift)$/.test(methodName);
+
+ lodash.prototype[methodName] = function() {
+ var args = arguments;
+ if (retUnwrapped && !this.__chain__) {
+ var value = this.value();
+ return func.apply(isArray(value) ? value : [], args);
+ }
+ return this[chainName](function(value) {
+ return func.apply(isArray(value) ? value : [], args);
+ });
+ };
+ });
+
+ // Map minified method names to their real names.
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+ var lodashFunc = lodash[methodName];
+ if (lodashFunc) {
+ var key = lodashFunc.name + '';
+ if (!hasOwnProperty.call(realNames, key)) {
+ realNames[key] = [];
+ }
+ realNames[key].push({ 'name': methodName, 'func': lodashFunc });
+ }
+ });
+
+ realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
+ 'name': 'wrapper',
+ 'func': undefined
+ }];
+
+ // Add methods to `LazyWrapper`.
+ LazyWrapper.prototype.clone = lazyClone;
+ LazyWrapper.prototype.reverse = lazyReverse;
+ LazyWrapper.prototype.value = lazyValue;
+
+ // Add chain sequence methods to the `lodash` wrapper.
+ lodash.prototype.at = wrapperAt;
+ lodash.prototype.chain = wrapperChain;
+ lodash.prototype.commit = wrapperCommit;
+ lodash.prototype.next = wrapperNext;
+ lodash.prototype.plant = wrapperPlant;
+ lodash.prototype.reverse = wrapperReverse;
+ lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
+
+ // Add lazy aliases.
+ lodash.prototype.first = lodash.prototype.head;
+
+ if (symIterator) {
+ lodash.prototype[symIterator] = wrapperToIterator;
+ }
+ return lodash;
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ // Export lodash.
+ var _ = runInContext();
+
+ // Some AMD build optimizers, like r.js, check for condition patterns like:
+ if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
+ // Expose Lodash on the global object to prevent errors when Lodash is
+ // loaded by a script tag in the presence of an AMD loader.
+ // See http://requirejs.org/docs/errors.html#mismatch for more details.
+ // Use `_.noConflict` to remove Lodash from the global object.
+ root._ = _;
+
+ // Define as an anonymous module so, through path mapping, it can be
+ // referenced as the "underscore" module.
+ define(function() {
+ return _;
+ });
+ }
+ // Check for `exports` after `define` in case a build optimizer adds it.
+ else if (freeModule) {
+ // Export for Node.js.
+ (freeModule.exports = _)._ = _;
+ // Export for CommonJS support.
+ freeExports._ = _;
+ }
+ else {
+ // Export to the global object.
+ root._ = _;
+ }
+}.call(this));
diff --git a/node_modules/lodash/lodash.min.js b/node_modules/lodash/lodash.min.js
new file mode 100644
index 0000000..4219da7
--- /dev/null
+++ b/node_modules/lodash/lodash.min.js
@@ -0,0 +1,140 @@
+/**
+ * @license
+ * Lodash <https://lodash.com/>
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function r(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&t(n[r],r,n)!==!1;);return n}function e(n,t){for(var r=null==n?0:n.length;r--&&t(n[r],r,n)!==!1;);return n}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return!1;
+return!0}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function o(n,t){return!!(null==n?0:n.length)&&y(n,t,0)>-1}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return!0;return!1}function c(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);
+return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function h(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function p(n){return n.split("")}function _(n){return n.match($t)||[]}function v(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,!1}),e}function g(n,t,r,e){for(var u=n.length,i=r+(e?1:-1);e?i--:++i<u;)if(t(n[i],i,n))return i;return-1}function y(n,t,r){return t===t?Z(n,t,r):g(n,b,r)}function d(n,t,r,e){
+for(var u=r-1,i=n.length;++u<i;)if(e(n[u],t))return u;return-1}function b(n){return n!==n}function w(n,t){var r=null==n?0:n.length;return r?k(n,t)/r:Cn}function m(n){return function(t){return null==t?X:t[n]}}function x(n){return function(t){return null==n?X:n[t]}}function j(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=!1,n):t(r,n,u,i)}),r}function A(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].value;return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==X&&(r=r===X?i:r+i);
+}return r}function O(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function I(n,t){return c(t,function(t){return[t,n[t]]})}function R(n){return n?n.slice(0,H(n)+1).replace(Lt,""):n}function z(n){return function(t){return n(t)}}function E(n,t){return c(t,function(t){return n[t]})}function S(n,t){return n.has(t)}function W(n,t){for(var r=-1,e=n.length;++r<e&&y(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function C(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;
+return e}function U(n){return"\\"+Yr[n]}function B(n,t){return null==n?X:n[t]}function T(n){return Nr.test(n)}function $(n){return Pr.test(n)}function D(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function F(n,t){return function(r){return n(t(r))}}function N(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&o!==cn||(n[r]=cn,i[u++]=r)}return i}function P(n){var t=-1,r=Array(n.size);
+return n.forEach(function(n){r[++t]=n}),r}function q(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function Z(n,t,r){for(var e=r-1,u=n.length;++e<u;)if(n[e]===t)return e;return-1}function K(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}function V(n){return T(n)?J(n):_e(n)}function G(n){return T(n)?Y(n):p(n)}function H(n){for(var t=n.length;t--&&Ct.test(n.charAt(t)););return t}function J(n){for(var t=Mr.lastIndex=0;Mr.test(n);)++t;return t}function Y(n){return n.match(Mr)||[];
+}function Q(n){return n.match(Fr)||[]}var X,nn="4.17.21",tn=200,rn="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",en="Expected a function",un="Invalid `variable` option passed into `_.template`",on="__lodash_hash_undefined__",fn=500,cn="__lodash_placeholder__",an=1,ln=2,sn=4,hn=1,pn=2,_n=1,vn=2,gn=4,yn=8,dn=16,bn=32,wn=64,mn=128,xn=256,jn=512,An=30,kn="...",On=800,In=16,Rn=1,zn=2,En=3,Sn=1/0,Wn=9007199254740991,Ln=1.7976931348623157e308,Cn=NaN,Un=4294967295,Bn=Un-1,Tn=Un>>>1,$n=[["ary",mn],["bind",_n],["bindKey",vn],["curry",yn],["curryRight",dn],["flip",jn],["partial",bn],["partialRight",wn],["rearg",xn]],Dn="[object Arguments]",Mn="[object Array]",Fn="[object AsyncFunction]",Nn="[object Boolean]",Pn="[object Date]",qn="[object DOMException]",Zn="[object Error]",Kn="[object Function]",Vn="[object GeneratorFunction]",Gn="[object Map]",Hn="[object Number]",Jn="[object Null]",Yn="[object Object]",Qn="[object Promise]",Xn="[object Proxy]",nt="[object RegExp]",tt="[object Set]",rt="[object String]",et="[object Symbol]",ut="[object Undefined]",it="[object WeakMap]",ot="[object WeakSet]",ft="[object ArrayBuffer]",ct="[object DataView]",at="[object Float32Array]",lt="[object Float64Array]",st="[object Int8Array]",ht="[object Int16Array]",pt="[object Int32Array]",_t="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",dt=/\b__p \+= '';/g,bt=/\b(__p \+=) '' \+/g,wt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mt=/&(?:amp|lt|gt|quot|#39);/g,xt=/[&<>"']/g,jt=RegExp(mt.source),At=RegExp(xt.source),kt=/<%-([\s\S]+?)%>/g,Ot=/<%([\s\S]+?)%>/g,It=/<%=([\s\S]+?)%>/g,Rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zt=/^\w*$/,Et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,St=/[\\^$.*+?()[\]{}|]/g,Wt=RegExp(St.source),Lt=/^\s+/,Ct=/\s/,Ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Bt=/\{\n\/\* \[wrapped with (.+)\] \*/,Tt=/,? & /,$t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Dt=/[()=,{}\[\]\/\s]/,Mt=/\\(\\)?/g,Ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nt=/\w*$/,Pt=/^[-+]0x[0-9a-f]+$/i,qt=/^0b[01]+$/i,Zt=/^\[object .+?Constructor\]$/,Kt=/^0o[0-7]+$/i,Vt=/^(?:0|[1-9]\d*)$/,Gt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ht=/($^)/,Jt=/['\n\r\u2028\u2029\\]/g,Yt="\\ud800-\\udfff",Qt="\\u0300-\\u036f",Xt="\\ufe20-\\ufe2f",nr="\\u20d0-\\u20ff",tr=Qt+Xt+nr,rr="\\u2700-\\u27bf",er="a-z\\xdf-\\xf6\\xf8-\\xff",ur="\\xac\\xb1\\xd7\\xf7",ir="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",or="\\u2000-\\u206f",fr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",cr="A-Z\\xc0-\\xd6\\xd8-\\xde",ar="\\ufe0e\\ufe0f",lr=ur+ir+or+fr,sr="['\u2019]",hr="["+Yt+"]",pr="["+lr+"]",_r="["+tr+"]",vr="\\d+",gr="["+rr+"]",yr="["+er+"]",dr="[^"+Yt+lr+vr+rr+er+cr+"]",br="\\ud83c[\\udffb-\\udfff]",wr="(?:"+_r+"|"+br+")",mr="[^"+Yt+"]",xr="(?:\\ud83c[\\udde6-\\uddff]){2}",jr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ar="["+cr+"]",kr="\\u200d",Or="(?:"+yr+"|"+dr+")",Ir="(?:"+Ar+"|"+dr+")",Rr="(?:"+sr+"(?:d|ll|m|re|s|t|ve))?",zr="(?:"+sr+"(?:D|LL|M|RE|S|T|VE))?",Er=wr+"?",Sr="["+ar+"]?",Wr="(?:"+kr+"(?:"+[mr,xr,jr].join("|")+")"+Sr+Er+")*",Lr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Cr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ur=Sr+Er+Wr,Br="(?:"+[gr,xr,jr].join("|")+")"+Ur,Tr="(?:"+[mr+_r+"?",_r,xr,jr,hr].join("|")+")",$r=RegExp(sr,"g"),Dr=RegExp(_r,"g"),Mr=RegExp(br+"(?="+br+")|"+Tr+Ur,"g"),Fr=RegExp([Ar+"?"+yr+"+"+Rr+"(?="+[pr,Ar,"$"].join("|")+")",Ir+"+"+zr+"(?="+[pr,Ar+Or,"$"].join("|")+")",Ar+"?"+Or+"+"+Rr,Ar+"+"+zr,Cr,Lr,vr,Br].join("|"),"g"),Nr=RegExp("["+kr+Yt+tr+ar+"]"),Pr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Zr=-1,Kr={};
+Kr[at]=Kr[lt]=Kr[st]=Kr[ht]=Kr[pt]=Kr[_t]=Kr[vt]=Kr[gt]=Kr[yt]=!0,Kr[Dn]=Kr[Mn]=Kr[ft]=Kr[Nn]=Kr[ct]=Kr[Pn]=Kr[Zn]=Kr[Kn]=Kr[Gn]=Kr[Hn]=Kr[Yn]=Kr[nt]=Kr[tt]=Kr[rt]=Kr[it]=!1;var Vr={};Vr[Dn]=Vr[Mn]=Vr[ft]=Vr[ct]=Vr[Nn]=Vr[Pn]=Vr[at]=Vr[lt]=Vr[st]=Vr[ht]=Vr[pt]=Vr[Gn]=Vr[Hn]=Vr[Yn]=Vr[nt]=Vr[tt]=Vr[rt]=Vr[et]=Vr[_t]=Vr[vt]=Vr[gt]=Vr[yt]=!0,Vr[Zn]=Vr[Kn]=Vr[it]=!1;var Gr={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a",
+"\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae",
+"\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g",
+"\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O",
+"\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w",
+"\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},Hr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Jr={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Yr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qr=parseFloat,Xr=parseInt,ne="object"==typeof global&&global&&global.Object===Object&&global,te="object"==typeof self&&self&&self.Object===Object&&self,re=ne||te||Function("return this")(),ee="object"==typeof exports&&exports&&!exports.nodeType&&exports,ue=ee&&"object"==typeof module&&module&&!module.nodeType&&module,ie=ue&&ue.exports===ee,oe=ie&&ne.process,fe=function(){
+try{var n=ue&&ue.require&&ue.require("util").types;return n?n:oe&&oe.binding&&oe.binding("util")}catch(n){}}(),ce=fe&&fe.isArrayBuffer,ae=fe&&fe.isDate,le=fe&&fe.isMap,se=fe&&fe.isRegExp,he=fe&&fe.isSet,pe=fe&&fe.isTypedArray,_e=m("length"),ve=x(Gr),ge=x(Hr),ye=x(Jr),de=function p(x){function Z(n){if(cc(n)&&!bh(n)&&!(n instanceof Ct)){if(n instanceof Y)return n;if(bl.call(n,"__wrapped__"))return eo(n)}return new Y(n)}function J(){}function Y(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,
+this.__index__=0,this.__values__=X}function Ct(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Un,this.__views__=[]}function $t(){var n=new Ct(this.__wrapped__);return n.__actions__=Tu(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Tu(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Tu(this.__views__),n}function Yt(){if(this.__filtered__){var n=new Ct(this);n.__dir__=-1,
+n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Qt(){var n=this.__wrapped__.value(),t=this.__dir__,r=bh(n),e=t<0,u=r?n.length:0,i=Oi(0,u,this.__views__),o=i.start,f=i.end,c=f-o,a=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=Hl(c,this.__takeCount__);if(!r||!e&&u==c&&p==c)return wu(n,this.__actions__);var _=[];n:for(;c--&&h<p;){a+=t;for(var v=-1,g=n[a];++v<s;){var y=l[v],d=y.iteratee,b=y.type,w=d(g);if(b==zn)g=w;else if(!w){if(b==Rn)continue n;break n}}_[h++]=g}return _}function Xt(n){
+var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function nr(){this.__data__=is?is(null):{},this.size=0}function tr(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}function rr(n){var t=this.__data__;if(is){var r=t[n];return r===on?X:r}return bl.call(t,n)?t[n]:X}function er(n){var t=this.__data__;return is?t[n]!==X:bl.call(t,n)}function ur(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=is&&t===X?on:t,this}function ir(n){
+var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function or(){this.__data__=[],this.size=0}function fr(n){var t=this.__data__,r=Wr(t,n);return!(r<0)&&(r==t.length-1?t.pop():Ll.call(t,r,1),--this.size,!0)}function cr(n){var t=this.__data__,r=Wr(t,n);return r<0?X:t[r][1]}function ar(n){return Wr(this.__data__,n)>-1}function lr(n,t){var r=this.__data__,e=Wr(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this}function sr(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){
+var e=n[t];this.set(e[0],e[1])}}function hr(){this.size=0,this.__data__={hash:new Xt,map:new(ts||ir),string:new Xt}}function pr(n){var t=xi(this,n).delete(n);return this.size-=t?1:0,t}function _r(n){return xi(this,n).get(n)}function vr(n){return xi(this,n).has(n)}function gr(n,t){var r=xi(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this}function yr(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new sr;++t<r;)this.add(n[t])}function dr(n){return this.__data__.set(n,on),this}function br(n){
+return this.__data__.has(n)}function wr(n){this.size=(this.__data__=new ir(n)).size}function mr(){this.__data__=new ir,this.size=0}function xr(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r}function jr(n){return this.__data__.get(n)}function Ar(n){return this.__data__.has(n)}function kr(n,t){var r=this.__data__;if(r instanceof ir){var e=r.__data__;if(!ts||e.length<tn-1)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new sr(e)}return r.set(n,t),this.size=r.size,this}function Or(n,t){
+var r=bh(n),e=!r&&dh(n),u=!r&&!e&&mh(n),i=!r&&!e&&!u&&Oh(n),o=r||e||u||i,f=o?O(n.length,hl):[],c=f.length;for(var a in n)!t&&!bl.call(n,a)||o&&("length"==a||u&&("offset"==a||"parent"==a)||i&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||Ci(a,c))||f.push(a);return f}function Ir(n){var t=n.length;return t?n[tu(0,t-1)]:X}function Rr(n,t){return Xi(Tu(n),Mr(t,0,n.length))}function zr(n){return Xi(Tu(n))}function Er(n,t,r){(r===X||Gf(n[t],r))&&(r!==X||t in n)||Br(n,t,r)}function Sr(n,t,r){var e=n[t];
+bl.call(n,t)&&Gf(e,r)&&(r!==X||t in n)||Br(n,t,r)}function Wr(n,t){for(var r=n.length;r--;)if(Gf(n[r][0],t))return r;return-1}function Lr(n,t,r,e){return ys(n,function(n,u,i){t(e,n,r(n),i)}),e}function Cr(n,t){return n&&$u(t,Pc(t),n)}function Ur(n,t){return n&&$u(t,qc(t),n)}function Br(n,t,r){"__proto__"==t&&Tl?Tl(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r}function Tr(n,t){for(var r=-1,e=t.length,u=il(e),i=null==n;++r<e;)u[r]=i?X:Mc(n,t[r]);return u}function Mr(n,t,r){return n===n&&(r!==X&&(n=n<=r?n:r),
+t!==X&&(n=n>=t?n:t)),n}function Fr(n,t,e,u,i,o){var f,c=t&an,a=t&ln,l=t&sn;if(e&&(f=i?e(n,u,i,o):e(n)),f!==X)return f;if(!fc(n))return n;var s=bh(n);if(s){if(f=zi(n),!c)return Tu(n,f)}else{var h=zs(n),p=h==Kn||h==Vn;if(mh(n))return Iu(n,c);if(h==Yn||h==Dn||p&&!i){if(f=a||p?{}:Ei(n),!c)return a?Mu(n,Ur(f,n)):Du(n,Cr(f,n))}else{if(!Vr[h])return i?n:{};f=Si(n,h,c)}}o||(o=new wr);var _=o.get(n);if(_)return _;o.set(n,f),kh(n)?n.forEach(function(r){f.add(Fr(r,t,e,r,n,o))}):jh(n)&&n.forEach(function(r,u){
+f.set(u,Fr(r,t,e,u,n,o))});var v=l?a?di:yi:a?qc:Pc,g=s?X:v(n);return r(g||n,function(r,u){g&&(u=r,r=n[u]),Sr(f,u,Fr(r,t,e,u,n,o))}),f}function Nr(n){var t=Pc(n);return function(r){return Pr(r,n,t)}}function Pr(n,t,r){var e=r.length;if(null==n)return!e;for(n=ll(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===X&&!(u in n)||!i(o))return!1}return!0}function Gr(n,t,r){if("function"!=typeof n)throw new pl(en);return Ws(function(){n.apply(X,r)},t)}function Hr(n,t,r,e){var u=-1,i=o,a=!0,l=n.length,s=[],h=t.length;
+if(!l)return s;r&&(t=c(t,z(r))),e?(i=f,a=!1):t.length>=tn&&(i=S,a=!1,t=new yr(t));n:for(;++u<l;){var p=n[u],_=null==r?p:r(p);if(p=e||0!==p?p:0,a&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function Jr(n,t){var r=!0;return ys(n,function(n,e,u){return r=!!t(n,e,u)}),r}function Yr(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===X?o===o&&!bc(o):r(o,f)))var f=o,c=i}return c}function ne(n,t,r,e){var u=n.length;for(r=kc(r),r<0&&(r=-r>u?0:u+r),
+e=e===X||e>u?u:kc(e),e<0&&(e+=u),e=r>e?0:Oc(e);r<e;)n[r++]=t;return n}function te(n,t){var r=[];return ys(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function ee(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Li),u||(u=[]);++i<o;){var f=n[i];t>0&&r(f)?t>1?ee(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function ue(n,t){return n&&bs(n,t,Pc)}function oe(n,t){return n&&ws(n,t,Pc)}function fe(n,t){return i(t,function(t){return uc(n[t])})}function _e(n,t){t=ku(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[no(t[r++])];
+return r&&r==e?n:X}function de(n,t,r){var e=t(n);return bh(n)?e:a(e,r(n))}function we(n){return null==n?n===X?ut:Jn:Bl&&Bl in ll(n)?ki(n):Ki(n)}function me(n,t){return n>t}function xe(n,t){return null!=n&&bl.call(n,t)}function je(n,t){return null!=n&&t in ll(n)}function Ae(n,t,r){return n>=Hl(t,r)&&n<Gl(t,r)}function ke(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=il(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,z(t))),s=Hl(p.length,s),l[a]=!r&&(t||u>=120&&p.length>=120)?new yr(a&&p):X}p=n[0];
+var _=-1,v=l[0];n:for(;++_<u&&h.length<s;){var g=p[_],y=t?t(g):g;if(g=r||0!==g?g:0,!(v?S(v,y):e(h,y,r))){for(a=i;--a;){var d=l[a];if(!(d?S(d,y):e(n[a],y,r)))continue n}v&&v.push(y),h.push(g)}}return h}function Oe(n,t,r,e){return ue(n,function(n,u,i){t(e,r(n),u,i)}),e}function Ie(t,r,e){r=ku(r,t),t=Gi(t,r);var u=null==t?t:t[no(jo(r))];return null==u?X:n(u,t,e)}function Re(n){return cc(n)&&we(n)==Dn}function ze(n){return cc(n)&&we(n)==ft}function Ee(n){return cc(n)&&we(n)==Pn}function Se(n,t,r,e,u){
+return n===t||(null==n||null==t||!cc(n)&&!cc(t)?n!==n&&t!==t:We(n,t,r,e,Se,u))}function We(n,t,r,e,u,i){var o=bh(n),f=bh(t),c=o?Mn:zs(n),a=f?Mn:zs(t);c=c==Dn?Yn:c,a=a==Dn?Yn:a;var l=c==Yn,s=a==Yn,h=c==a;if(h&&mh(n)){if(!mh(t))return!1;o=!0,l=!1}if(h&&!l)return i||(i=new wr),o||Oh(n)?pi(n,t,r,e,u,i):_i(n,t,c,r,e,u,i);if(!(r&hn)){var p=l&&bl.call(n,"__wrapped__"),_=s&&bl.call(t,"__wrapped__");if(p||_){var v=p?n.value():n,g=_?t.value():t;return i||(i=new wr),u(v,g,r,e,i)}}return!!h&&(i||(i=new wr),vi(n,t,r,e,u,i));
+}function Le(n){return cc(n)&&zs(n)==Gn}function Ce(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=ll(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return!1}for(;++u<i;){f=r[u];var c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===X&&!(c in n))return!1}else{var s=new wr;if(e)var h=e(a,l,c,n,t,s);if(!(h===X?Se(l,a,hn|pn,e,s):h))return!1}}return!0}function Ue(n){return!(!fc(n)||Di(n))&&(uc(n)?kl:Zt).test(to(n))}function Be(n){return cc(n)&&we(n)==nt}function Te(n){return cc(n)&&zs(n)==tt;
+}function $e(n){return cc(n)&&oc(n.length)&&!!Kr[we(n)]}function De(n){return"function"==typeof n?n:null==n?La:"object"==typeof n?bh(n)?Ze(n[0],n[1]):qe(n):Fa(n)}function Me(n){if(!Mi(n))return Vl(n);var t=[];for(var r in ll(n))bl.call(n,r)&&"constructor"!=r&&t.push(r);return t}function Fe(n){if(!fc(n))return Zi(n);var t=Mi(n),r=[];for(var e in n)("constructor"!=e||!t&&bl.call(n,e))&&r.push(e);return r}function Ne(n,t){return n<t}function Pe(n,t){var r=-1,e=Hf(n)?il(n.length):[];return ys(n,function(n,u,i){
+e[++r]=t(n,u,i)}),e}function qe(n){var t=ji(n);return 1==t.length&&t[0][2]?Ni(t[0][0],t[0][1]):function(r){return r===n||Ce(r,n,t)}}function Ze(n,t){return Bi(n)&&Fi(t)?Ni(no(n),t):function(r){var e=Mc(r,n);return e===X&&e===t?Nc(r,n):Se(t,e,hn|pn)}}function Ke(n,t,r,e,u){n!==t&&bs(t,function(i,o){if(u||(u=new wr),fc(i))Ve(n,t,o,r,Ke,e,u);else{var f=e?e(Ji(n,o),i,o+"",n,t,u):X;f===X&&(f=i),Er(n,o,f)}},qc)}function Ve(n,t,r,e,u,i,o){var f=Ji(n,r),c=Ji(t,r),a=o.get(c);if(a)return Er(n,r,a),X;var l=i?i(f,c,r+"",n,t,o):X,s=l===X;
+if(s){var h=bh(c),p=!h&&mh(c),_=!h&&!p&&Oh(c);l=c,h||p||_?bh(f)?l=f:Jf(f)?l=Tu(f):p?(s=!1,l=Iu(c,!0)):_?(s=!1,l=Wu(c,!0)):l=[]:gc(c)||dh(c)?(l=f,dh(f)?l=Rc(f):fc(f)&&!uc(f)||(l=Ei(c))):s=!1}s&&(o.set(c,l),u(l,c,e,i,o),o.delete(c)),Er(n,r,l)}function Ge(n,t){var r=n.length;if(r)return t+=t<0?r:0,Ci(t,r)?n[t]:X}function He(n,t,r){t=t.length?c(t,function(n){return bh(n)?function(t){return _e(t,1===n.length?n[0]:n)}:n}):[La];var e=-1;return t=c(t,z(mi())),A(Pe(n,function(n,r,u){return{criteria:c(t,function(t){
+return t(n)}),index:++e,value:n}}),function(n,t){return Cu(n,t,r)})}function Je(n,t){return Ye(n,t,function(t,r){return Nc(n,r)})}function Ye(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=_e(n,o);r(f,o)&&fu(i,ku(o,n),f)}return i}function Qe(n){return function(t){return _e(t,n)}}function Xe(n,t,r,e){var u=e?d:y,i=-1,o=t.length,f=n;for(n===t&&(t=Tu(t)),r&&(f=c(n,z(r)));++i<o;)for(var a=0,l=t[i],s=r?r(l):l;(a=u(f,s,a,e))>-1;)f!==n&&Ll.call(f,a,1),Ll.call(n,a,1);return n}function nu(n,t){for(var r=n?t.length:0,e=r-1;r--;){
+var u=t[r];if(r==e||u!==i){var i=u;Ci(u)?Ll.call(n,u,1):yu(n,u)}}return n}function tu(n,t){return n+Nl(Ql()*(t-n+1))}function ru(n,t,r,e){for(var u=-1,i=Gl(Fl((t-n)/(r||1)),0),o=il(i);i--;)o[e?i:++u]=n,n+=r;return o}function eu(n,t){var r="";if(!n||t<1||t>Wn)return r;do t%2&&(r+=n),t=Nl(t/2),t&&(n+=n);while(t);return r}function uu(n,t){return Ls(Vi(n,t,La),n+"")}function iu(n){return Ir(ra(n))}function ou(n,t){var r=ra(n);return Xi(r,Mr(t,0,r.length))}function fu(n,t,r,e){if(!fc(n))return n;t=ku(t,n);
+for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=no(t[u]),a=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return n;if(u!=o){var l=f[c];a=e?e(l,c,f):X,a===X&&(a=fc(l)?l:Ci(t[u+1])?[]:{})}Sr(f,c,a),f=f[c]}return n}function cu(n){return Xi(ra(n))}function au(n,t,r){var e=-1,u=n.length;t<0&&(t=-t>u?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=il(u);++e<u;)i[e]=n[e+t];return i}function lu(n,t){var r;return ys(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function su(n,t,r){
+var e=0,u=null==n?e:n.length;if("number"==typeof t&&t===t&&u<=Tn){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!bc(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return hu(n,t,La,r)}function hu(n,t,r,e){var u=0,i=null==n?0:n.length;if(0===i)return 0;t=r(t);for(var o=t!==t,f=null===t,c=bc(t),a=t===X;u<i;){var l=Nl((u+i)/2),s=r(n[l]),h=s!==X,p=null===s,_=s===s,v=bc(s);if(o)var g=e||_;else g=a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):!p&&!v&&(e?s<=t:s<t);g?u=l+1:i=l}return Hl(i,Bn)}function pu(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){
+var o=n[r],f=t?t(o):o;if(!r||!Gf(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function _u(n){return"number"==typeof n?n:bc(n)?Cn:+n}function vu(n){if("string"==typeof n)return n;if(bh(n))return c(n,vu)+"";if(bc(n))return vs?vs.call(n):"";var t=n+"";return"0"==t&&1/n==-Sn?"-0":t}function gu(n,t,r){var e=-1,u=o,i=n.length,c=!0,a=[],l=a;if(r)c=!1,u=f;else if(i>=tn){var s=t?null:ks(n);if(s)return P(s);c=!1,u=S,l=new yr}else l=t?[]:a;n:for(;++e<i;){var h=n[e],p=t?t(h):h;if(h=r||0!==h?h:0,c&&p===p){for(var _=l.length;_--;)if(l[_]===p)continue n;
+t&&l.push(p),a.push(h)}else u(l,p,r)||(l!==a&&l.push(p),a.push(h))}return a}function yu(n,t){return t=ku(t,n),n=Gi(n,t),null==n||delete n[no(jo(t))]}function du(n,t,r,e){return fu(n,t,r(_e(n,t)),e)}function bu(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?au(n,e?0:i,e?i+1:u):au(n,e?i+1:0,e?u:i)}function wu(n,t){var r=n;return r instanceof Ct&&(r=r.value()),l(t,function(n,t){return t.func.apply(t.thisArg,a([n],t.args))},r)}function mu(n,t,r){var e=n.length;if(e<2)return e?gu(n[0]):[];
+for(var u=-1,i=il(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=Hr(i[u]||o,n[f],t,r));return gu(ee(i,1),t,r)}function xu(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;){r(o,n[e],e<i?t[e]:X)}return o}function ju(n){return Jf(n)?n:[]}function Au(n){return"function"==typeof n?n:La}function ku(n,t){return bh(n)?n:Bi(n,t)?[n]:Cs(Ec(n))}function Ou(n,t,r){var e=n.length;return r=r===X?e:r,!t&&r>=e?n:au(n,t,r)}function Iu(n,t){if(t)return n.slice();var r=n.length,e=zl?zl(r):new n.constructor(r);
+return n.copy(e),e}function Ru(n){var t=new n.constructor(n.byteLength);return new Rl(t).set(new Rl(n)),t}function zu(n,t){return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.byteLength)}function Eu(n){var t=new n.constructor(n.source,Nt.exec(n));return t.lastIndex=n.lastIndex,t}function Su(n){return _s?ll(_s.call(n)):{}}function Wu(n,t){return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.length)}function Lu(n,t){if(n!==t){var r=n!==X,e=null===n,u=n===n,i=bc(n),o=t!==X,f=null===t,c=t===t,a=bc(t);
+if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Cu(n,t,r){for(var e=-1,u=n.criteria,i=t.criteria,o=u.length,f=r.length;++e<o;){var c=Lu(u[e],i[e]);if(c){if(e>=f)return c;return c*("desc"==r[e]?-1:1)}}return n.index-t.index}function Uu(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Gl(i-o,0),l=il(c+a),s=!e;++f<c;)l[f]=t[f];for(;++u<o;)(s||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l;
+}function Bu(n,t,r,e){for(var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Gl(i-f,0),s=il(l+a),h=!e;++u<l;)s[u]=n[u];for(var p=u;++c<a;)s[p+c]=t[c];for(;++o<f;)(h||u<i)&&(s[p+r[o]]=n[u++]);return s}function Tu(n,t){var r=-1,e=n.length;for(t||(t=il(e));++r<e;)t[r]=n[r];return t}function $u(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):X;c===X&&(c=n[f]),u?Br(r,f,c):Sr(r,f,c)}return r}function Du(n,t){return $u(n,Is(n),t)}function Mu(n,t){return $u(n,Rs(n),t);
+}function Fu(n,r){return function(e,u){var i=bh(e)?t:Lr,o=r?r():{};return i(e,n,mi(u,2),o)}}function Nu(n){return uu(function(t,r){var e=-1,u=r.length,i=u>1?r[u-1]:X,o=u>2?r[2]:X;for(i=n.length>3&&"function"==typeof i?(u--,i):X,o&&Ui(r[0],r[1],o)&&(i=u<3?X:i,u=1),t=ll(t);++e<u;){var f=r[e];f&&n(t,f,e,i)}return t})}function Pu(n,t){return function(r,e){if(null==r)return r;if(!Hf(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=ll(r);(t?i--:++i<u)&&e(o[i],i,o)!==!1;);return r}}function qu(n){return function(t,r,e){
+for(var u=-1,i=ll(t),o=e(t),f=o.length;f--;){var c=o[n?f:++u];if(r(i[c],c,i)===!1)break}return t}}function Zu(n,t,r){function e(){return(this&&this!==re&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=t&_n,i=Gu(n);return e}function Ku(n){return function(t){t=Ec(t);var r=T(t)?G(t):X,e=r?r[0]:t.charAt(0),u=r?Ou(r,1).join(""):t.slice(1);return e[n]()+u}}function Vu(n){return function(t){return l(Ra(ca(t).replace($r,"")),n,"")}}function Gu(n){return function(){var t=arguments;switch(t.length){
+case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=gs(n.prototype),e=n.apply(r,t);return fc(e)?e:r}}function Hu(t,r,e){function u(){for(var o=arguments.length,f=il(o),c=o,a=wi(u);c--;)f[c]=arguments[c];var l=o<3&&f[0]!==a&&f[o-1]!==a?[]:N(f,a);
+return o-=l.length,o<e?oi(t,r,Qu,u.placeholder,X,f,l,X,X,e-o):n(this&&this!==re&&this instanceof u?i:t,this,f)}var i=Gu(t);return u}function Ju(n){return function(t,r,e){var u=ll(t);if(!Hf(t)){var i=mi(r,3);t=Pc(t),r=function(n){return i(u[n],n,u)}}var o=n(t,r,e);return o>-1?u[i?t[o]:o]:X}}function Yu(n){return gi(function(t){var r=t.length,e=r,u=Y.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if("function"!=typeof i)throw new pl(en);if(u&&!o&&"wrapper"==bi(i))var o=new Y([],!0)}for(e=o?e:r;++e<r;){
+i=t[e];var f=bi(i),c="wrapper"==f?Os(i):X;o=c&&$i(c[0])&&c[1]==(mn|yn|bn|xn)&&!c[4].length&&1==c[9]?o[bi(c[0])].apply(o,c[3]):1==i.length&&$i(i)?o[f]():o.thru(i)}return function(){var n=arguments,e=n[0];if(o&&1==n.length&&bh(e))return o.plant(e).value();for(var u=0,i=r?t[u].apply(this,n):e;++u<r;)i=t[u].call(this,i);return i}})}function Qu(n,t,r,e,u,i,o,f,c,a){function l(){for(var y=arguments.length,d=il(y),b=y;b--;)d[b]=arguments[b];if(_)var w=wi(l),m=C(d,w);if(e&&(d=Uu(d,e,u,_)),i&&(d=Bu(d,i,o,_)),
+y-=m,_&&y<a){return oi(n,t,Qu,l.placeholder,r,d,N(d,w),f,c,a-y)}var x=h?r:this,j=p?x[n]:n;return y=d.length,f?d=Hi(d,f):v&&y>1&&d.reverse(),s&&c<y&&(d.length=c),this&&this!==re&&this instanceof l&&(j=g||Gu(j)),j.apply(x,d)}var s=t&mn,h=t&_n,p=t&vn,_=t&(yn|dn),v=t&jn,g=p?X:Gu(n);return l}function Xu(n,t){return function(r,e){return Oe(r,n,t(e),{})}}function ni(n,t){return function(r,e){var u;if(r===X&&e===X)return t;if(r!==X&&(u=r),e!==X){if(u===X)return e;"string"==typeof r||"string"==typeof e?(r=vu(r),
+e=vu(e)):(r=_u(r),e=_u(e)),u=n(r,e)}return u}}function ti(t){return gi(function(r){return r=c(r,z(mi())),uu(function(e){var u=this;return t(r,function(t){return n(t,u,e)})})})}function ri(n,t){t=t===X?" ":vu(t);var r=t.length;if(r<2)return r?eu(t,n):t;var e=eu(t,Fl(n/V(t)));return T(t)?Ou(G(e),0,n).join(""):e.slice(0,n)}function ei(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=il(l+c),h=this&&this!==re&&this instanceof i?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++r];
+return n(h,o?e:this,s)}var o=r&_n,f=Gu(t);return i}function ui(n){return function(t,r,e){return e&&"number"!=typeof e&&Ui(t,r,e)&&(r=e=X),t=Ac(t),r===X?(r=t,t=0):r=Ac(r),e=e===X?t<r?1:-1:Ac(e),ru(t,r,e,n)}}function ii(n){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=Ic(t),r=Ic(r)),n(t,r)}}function oi(n,t,r,e,u,i,o,f,c,a){var l=t&yn,s=l?o:X,h=l?X:o,p=l?i:X,_=l?X:i;t|=l?bn:wn,t&=~(l?wn:bn),t&gn||(t&=~(_n|vn));var v=[n,t,u,p,s,_,h,f,c,a],g=r.apply(X,v);return $i(n)&&Ss(g,v),g.placeholder=e,
+Yi(g,n,t)}function fi(n){var t=al[n];return function(n,r){if(n=Ic(n),r=null==r?0:Hl(kc(r),292),r&&Zl(n)){var e=(Ec(n)+"e").split("e");return e=(Ec(t(e[0]+"e"+(+e[1]+r)))+"e").split("e"),+(e[0]+"e"+(+e[1]-r))}return t(n)}}function ci(n){return function(t){var r=zs(t);return r==Gn?M(t):r==tt?q(t):I(t,n(t))}}function ai(n,t,r,e,u,i,o,f){var c=t&vn;if(!c&&"function"!=typeof n)throw new pl(en);var a=e?e.length:0;if(a||(t&=~(bn|wn),e=u=X),o=o===X?o:Gl(kc(o),0),f=f===X?f:kc(f),a-=u?u.length:0,t&wn){var l=e,s=u;
+e=u=X}var h=c?X:Os(n),p=[n,t,r,e,u,l,s,i,o,f];if(h&&qi(p,h),n=p[0],t=p[1],r=p[2],e=p[3],u=p[4],f=p[9]=p[9]===X?c?0:n.length:Gl(p[9]-a,0),!f&&t&(yn|dn)&&(t&=~(yn|dn)),t&&t!=_n)_=t==yn||t==dn?Hu(n,t,f):t!=bn&&t!=(_n|bn)||u.length?Qu.apply(X,p):ei(n,t,r,e);else var _=Zu(n,t,r);return Yi((h?ms:Ss)(_,p),n,t)}function li(n,t,r,e){return n===X||Gf(n,gl[r])&&!bl.call(e,r)?t:n}function si(n,t,r,e,u,i){return fc(n)&&fc(t)&&(i.set(t,n),Ke(n,t,X,si,i),i.delete(t)),n}function hi(n){return gc(n)?X:n}function pi(n,t,r,e,u,i){
+var o=r&hn,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return!1;var a=i.get(n),l=i.get(t);if(a&&l)return a==t&&l==n;var s=-1,p=!0,_=r&pn?new yr:X;for(i.set(n,t),i.set(t,n);++s<f;){var v=n[s],g=t[s];if(e)var y=o?e(g,v,s,t,n,i):e(v,g,s,n,t,i);if(y!==X){if(y)continue;p=!1;break}if(_){if(!h(t,function(n,t){if(!S(_,t)&&(v===n||u(v,n,r,e,i)))return _.push(t)})){p=!1;break}}else if(v!==g&&!u(v,g,r,e,i)){p=!1;break}}return i.delete(n),i.delete(t),p}function _i(n,t,r,e,u,i,o){switch(r){case ct:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;
+n=n.buffer,t=t.buffer;case ft:return!(n.byteLength!=t.byteLength||!i(new Rl(n),new Rl(t)));case Nn:case Pn:case Hn:return Gf(+n,+t);case Zn:return n.name==t.name&&n.message==t.message;case nt:case rt:return n==t+"";case Gn:var f=M;case tt:var c=e&hn;if(f||(f=P),n.size!=t.size&&!c)return!1;var a=o.get(n);if(a)return a==t;e|=pn,o.set(n,t);var l=pi(f(n),f(t),e,u,i,o);return o.delete(n),l;case et:if(_s)return _s.call(n)==_s.call(t)}return!1}function vi(n,t,r,e,u,i){var o=r&hn,f=yi(n),c=f.length;if(c!=yi(t).length&&!o)return!1;
+for(var a=c;a--;){var l=f[a];if(!(o?l in t:bl.call(t,l)))return!1}var s=i.get(n),h=i.get(t);if(s&&h)return s==t&&h==n;var p=!0;i.set(n,t),i.set(t,n);for(var _=o;++a<c;){l=f[a];var v=n[l],g=t[l];if(e)var y=o?e(g,v,l,t,n,i):e(v,g,l,n,t,i);if(!(y===X?v===g||u(v,g,r,e,i):y)){p=!1;break}_||(_="constructor"==l)}if(p&&!_){var d=n.constructor,b=t.constructor;d!=b&&"constructor"in n&&"constructor"in t&&!("function"==typeof d&&d instanceof d&&"function"==typeof b&&b instanceof b)&&(p=!1)}return i.delete(n),
+i.delete(t),p}function gi(n){return Ls(Vi(n,X,_o),n+"")}function yi(n){return de(n,Pc,Is)}function di(n){return de(n,qc,Rs)}function bi(n){for(var t=n.name+"",r=fs[t],e=bl.call(fs,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function wi(n){return(bl.call(Z,"placeholder")?Z:n).placeholder}function mi(){var n=Z.iteratee||Ca;return n=n===Ca?De:n,arguments.length?n(arguments[0],arguments[1]):n}function xi(n,t){var r=n.__data__;return Ti(t)?r["string"==typeof t?"string":"hash"]:r.map;
+}function ji(n){for(var t=Pc(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,Fi(u)]}return t}function Ai(n,t){var r=B(n,t);return Ue(r)?r:X}function ki(n){var t=bl.call(n,Bl),r=n[Bl];try{n[Bl]=X;var e=!0}catch(n){}var u=xl.call(n);return e&&(t?n[Bl]=r:delete n[Bl]),u}function Oi(n,t,r){for(var e=-1,u=r.length;++e<u;){var i=r[e],o=i.size;switch(i.type){case"drop":n+=o;break;case"dropRight":t-=o;break;case"take":t=Hl(t,n+o);break;case"takeRight":n=Gl(n,t-o)}}return{start:n,end:t}}function Ii(n){var t=n.match(Bt);
+return t?t[1].split(Tt):[]}function Ri(n,t,r){t=ku(t,n);for(var e=-1,u=t.length,i=!1;++e<u;){var o=no(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&oc(u)&&Ci(o,u)&&(bh(n)||dh(n)))}function zi(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&bl.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Ei(n){return"function"!=typeof n.constructor||Mi(n)?{}:gs(El(n))}function Si(n,t,r){var e=n.constructor;switch(t){case ft:return Ru(n);
+case Nn:case Pn:return new e(+n);case ct:return zu(n,r);case at:case lt:case st:case ht:case pt:case _t:case vt:case gt:case yt:return Wu(n,r);case Gn:return new e;case Hn:case rt:return new e(n);case nt:return Eu(n);case tt:return new e;case et:return Su(n)}}function Wi(n,t){var r=t.length;if(!r)return n;var e=r-1;return t[e]=(r>1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Ut,"{\n/* [wrapped with "+t+"] */\n")}function Li(n){return bh(n)||dh(n)||!!(Cl&&n&&n[Cl])}function Ci(n,t){var r=typeof n;
+return t=null==t?Wn:t,!!t&&("number"==r||"symbol"!=r&&Vt.test(n))&&n>-1&&n%1==0&&n<t}function Ui(n,t,r){if(!fc(r))return!1;var e=typeof t;return!!("number"==e?Hf(r)&&Ci(t,r.length):"string"==e&&t in r)&&Gf(r[t],n)}function Bi(n,t){if(bh(n))return!1;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!bc(n))||(zt.test(n)||!Rt.test(n)||null!=t&&n in ll(t))}function Ti(n){var t=typeof n;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==n:null===n}function $i(n){
+var t=bi(n),r=Z[t];if("function"!=typeof r||!(t in Ct.prototype))return!1;if(n===r)return!0;var e=Os(r);return!!e&&n===e[0]}function Di(n){return!!ml&&ml in n}function Mi(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||gl)}function Fi(n){return n===n&&!fc(n)}function Ni(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==X||n in ll(r)))}}function Pi(n){var t=Cf(n,function(n){return r.size===fn&&r.clear(),n}),r=t.cache;return t}function qi(n,t){var r=n[1],e=t[1],u=r|e,i=u<(_n|vn|mn),o=e==mn&&r==yn||e==mn&&r==xn&&n[7].length<=t[8]||e==(mn|xn)&&t[7].length<=t[8]&&r==yn;
+if(!i&&!o)return n;e&_n&&(n[2]=t[2],u|=r&_n?0:gn);var f=t[3];if(f){var c=n[3];n[3]=c?Uu(c,f,t[4]):f,n[4]=c?N(n[3],cn):t[4]}return f=t[5],f&&(c=n[5],n[5]=c?Bu(c,f,t[6]):f,n[6]=c?N(n[5],cn):t[6]),f=t[7],f&&(n[7]=f),e&mn&&(n[8]=null==n[8]?t[8]:Hl(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=u,n}function Zi(n){var t=[];if(null!=n)for(var r in ll(n))t.push(r);return t}function Ki(n){return xl.call(n)}function Vi(t,r,e){return r=Gl(r===X?t.length-1:r,0),function(){for(var u=arguments,i=-1,o=Gl(u.length-r,0),f=il(o);++i<o;)f[i]=u[r+i];
+i=-1;for(var c=il(r+1);++i<r;)c[i]=u[i];return c[r]=e(f),n(t,this,c)}}function Gi(n,t){return t.length<2?n:_e(n,au(t,0,-1))}function Hi(n,t){for(var r=n.length,e=Hl(t.length,r),u=Tu(n);e--;){var i=t[e];n[e]=Ci(i,r)?u[i]:X}return n}function Ji(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}function Yi(n,t,r){var e=t+"";return Ls(n,Wi(e,ro(Ii(e),r)))}function Qi(n){var t=0,r=0;return function(){var e=Jl(),u=In-(e-r);if(r=e,u>0){if(++t>=On)return arguments[0]}else t=0;
+return n.apply(X,arguments)}}function Xi(n,t){var r=-1,e=n.length,u=e-1;for(t=t===X?e:t;++r<t;){var i=tu(r,u),o=n[i];n[i]=n[r],n[r]=o}return n.length=t,n}function no(n){if("string"==typeof n||bc(n))return n;var t=n+"";return"0"==t&&1/n==-Sn?"-0":t}function to(n){if(null!=n){try{return dl.call(n)}catch(n){}try{return n+""}catch(n){}}return""}function ro(n,t){return r($n,function(r){var e="_."+r[0];t&r[1]&&!o(n,e)&&n.push(e)}),n.sort()}function eo(n){if(n instanceof Ct)return n.clone();var t=new Y(n.__wrapped__,n.__chain__);
+return t.__actions__=Tu(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function uo(n,t,r){t=(r?Ui(n,t,r):t===X)?1:Gl(kc(t),0);var e=null==n?0:n.length;if(!e||t<1)return[];for(var u=0,i=0,o=il(Fl(e/t));u<e;)o[i++]=au(n,u,u+=t);return o}function io(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u}function oo(){var n=arguments.length;if(!n)return[];for(var t=il(n-1),r=arguments[0],e=n;e--;)t[e-1]=arguments[e];return a(bh(r)?Tu(r):[r],ee(t,1));
+}function fo(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),au(n,t<0?0:t,e)):[]}function co(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),t=e-t,au(n,0,t<0?0:t)):[]}function ao(n,t){return n&&n.length?bu(n,mi(t,3),!0,!0):[]}function lo(n,t){return n&&n.length?bu(n,mi(t,3),!0):[]}function so(n,t,r,e){var u=null==n?0:n.length;return u?(r&&"number"!=typeof r&&Ui(n,t,r)&&(r=0,e=u),ne(n,t,r,e)):[]}function ho(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:kc(r);
+return u<0&&(u=Gl(e+u,0)),g(n,mi(t,3),u)}function po(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==X&&(u=kc(r),u=r<0?Gl(e+u,0):Hl(u,e-1)),g(n,mi(t,3),u,!0)}function _o(n){return(null==n?0:n.length)?ee(n,1):[]}function vo(n){return(null==n?0:n.length)?ee(n,Sn):[]}function go(n,t){return(null==n?0:n.length)?(t=t===X?1:kc(t),ee(n,t)):[]}function yo(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e}function bo(n){return n&&n.length?n[0]:X}function wo(n,t,r){
+var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:kc(r);return u<0&&(u=Gl(e+u,0)),y(n,t,u)}function mo(n){return(null==n?0:n.length)?au(n,0,-1):[]}function xo(n,t){return null==n?"":Kl.call(n,t)}function jo(n){var t=null==n?0:n.length;return t?n[t-1]:X}function Ao(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;return r!==X&&(u=kc(r),u=u<0?Gl(e+u,0):Hl(u,e-1)),t===t?K(n,t,u):g(n,b,u,!0)}function ko(n,t){return n&&n.length?Ge(n,kc(t)):X}function Oo(n,t){return n&&n.length&&t&&t.length?Xe(n,t):n;
+}function Io(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,mi(r,2)):n}function Ro(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,X,r):n}function zo(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=mi(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return nu(n,u),r}function Eo(n){return null==n?n:Xl.call(n)}function So(n,t,r){var e=null==n?0:n.length;return e?(r&&"number"!=typeof r&&Ui(n,t,r)?(t=0,r=e):(t=null==t?0:kc(t),r=r===X?e:kc(r)),au(n,t,r)):[]}function Wo(n,t){
+return su(n,t)}function Lo(n,t,r){return hu(n,t,mi(r,2))}function Co(n,t){var r=null==n?0:n.length;if(r){var e=su(n,t);if(e<r&&Gf(n[e],t))return e}return-1}function Uo(n,t){return su(n,t,!0)}function Bo(n,t,r){return hu(n,t,mi(r,2),!0)}function To(n,t){if(null==n?0:n.length){var r=su(n,t,!0)-1;if(Gf(n[r],t))return r}return-1}function $o(n){return n&&n.length?pu(n):[]}function Do(n,t){return n&&n.length?pu(n,mi(t,2)):[]}function Mo(n){var t=null==n?0:n.length;return t?au(n,1,t):[]}function Fo(n,t,r){
+return n&&n.length?(t=r||t===X?1:kc(t),au(n,0,t<0?0:t)):[]}function No(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),t=e-t,au(n,t<0?0:t,e)):[]}function Po(n,t){return n&&n.length?bu(n,mi(t,3),!1,!0):[]}function qo(n,t){return n&&n.length?bu(n,mi(t,3)):[]}function Zo(n){return n&&n.length?gu(n):[]}function Ko(n,t){return n&&n.length?gu(n,mi(t,2)):[]}function Vo(n,t){return t="function"==typeof t?t:X,n&&n.length?gu(n,X,t):[]}function Go(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){
+if(Jf(n))return t=Gl(n.length,t),!0}),O(t,function(t){return c(n,m(t))})}function Ho(t,r){if(!t||!t.length)return[];var e=Go(t);return null==r?e:c(e,function(t){return n(r,X,t)})}function Jo(n,t){return xu(n||[],t||[],Sr)}function Yo(n,t){return xu(n||[],t||[],fu)}function Qo(n){var t=Z(n);return t.__chain__=!0,t}function Xo(n,t){return t(n),n}function nf(n,t){return t(n)}function tf(){return Qo(this)}function rf(){return new Y(this.value(),this.__chain__)}function ef(){this.__values__===X&&(this.__values__=jc(this.value()));
+var n=this.__index__>=this.__values__.length;return{done:n,value:n?X:this.__values__[this.__index__++]}}function uf(){return this}function of(n){for(var t,r=this;r instanceof J;){var e=eo(r);e.__index__=0,e.__values__=X,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t}function ff(){var n=this.__wrapped__;if(n instanceof Ct){var t=n;return this.__actions__.length&&(t=new Ct(this)),t=t.reverse(),t.__actions__.push({func:nf,args:[Eo],thisArg:X}),new Y(t,this.__chain__)}return this.thru(Eo);
+}function cf(){return wu(this.__wrapped__,this.__actions__)}function af(n,t,r){var e=bh(n)?u:Jr;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function lf(n,t){return(bh(n)?i:te)(n,mi(t,3))}function sf(n,t){return ee(yf(n,t),1)}function hf(n,t){return ee(yf(n,t),Sn)}function pf(n,t,r){return r=r===X?1:kc(r),ee(yf(n,t),r)}function _f(n,t){return(bh(n)?r:ys)(n,mi(t,3))}function vf(n,t){return(bh(n)?e:ds)(n,mi(t,3))}function gf(n,t,r,e){n=Hf(n)?n:ra(n),r=r&&!e?kc(r):0;var u=n.length;return r<0&&(r=Gl(u+r,0)),
+dc(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&y(n,t,r)>-1}function yf(n,t){return(bh(n)?c:Pe)(n,mi(t,3))}function df(n,t,r,e){return null==n?[]:(bh(t)||(t=null==t?[]:[t]),r=e?X:r,bh(r)||(r=null==r?[]:[r]),He(n,t,r))}function bf(n,t,r){var e=bh(n)?l:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ys)}function wf(n,t,r){var e=bh(n)?s:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ds)}function mf(n,t){return(bh(n)?i:te)(n,Uf(mi(t,3)))}function xf(n){return(bh(n)?Ir:iu)(n)}function jf(n,t,r){return t=(r?Ui(n,t,r):t===X)?1:kc(t),
+(bh(n)?Rr:ou)(n,t)}function Af(n){return(bh(n)?zr:cu)(n)}function kf(n){if(null==n)return 0;if(Hf(n))return dc(n)?V(n):n.length;var t=zs(n);return t==Gn||t==tt?n.size:Me(n).length}function Of(n,t,r){var e=bh(n)?h:lu;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function If(n,t){if("function"!=typeof t)throw new pl(en);return n=kc(n),function(){if(--n<1)return t.apply(this,arguments)}}function Rf(n,t,r){return t=r?X:t,t=n&&null==t?n.length:t,ai(n,mn,X,X,X,X,t)}function zf(n,t){var r;if("function"!=typeof t)throw new pl(en);
+return n=kc(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=X),r}}function Ef(n,t,r){t=r?X:t;var e=ai(n,yn,X,X,X,X,X,t);return e.placeholder=Ef.placeholder,e}function Sf(n,t,r){t=r?X:t;var e=ai(n,dn,X,X,X,X,X,t);return e.placeholder=Sf.placeholder,e}function Wf(n,t,r){function e(t){var r=h,e=p;return h=p=X,d=t,v=n.apply(e,r)}function u(n){return d=n,g=Ws(f,t),b?e(n):v}function i(n){var r=n-y,e=n-d,u=t-r;return w?Hl(u,_-e):u}function o(n){var r=n-y,e=n-d;return y===X||r>=t||r<0||w&&e>=_;
+}function f(){var n=fh();return o(n)?c(n):(g=Ws(f,i(n)),X)}function c(n){return g=X,m&&h?e(n):(h=p=X,v)}function a(){g!==X&&As(g),d=0,h=y=p=g=X}function l(){return g===X?v:c(fh())}function s(){var n=fh(),r=o(n);if(h=arguments,p=this,y=n,r){if(g===X)return u(y);if(w)return As(g),g=Ws(f,t),e(y)}return g===X&&(g=Ws(f,t)),v}var h,p,_,v,g,y,d=0,b=!1,w=!1,m=!0;if("function"!=typeof n)throw new pl(en);return t=Ic(t)||0,fc(r)&&(b=!!r.leading,w="maxWait"in r,_=w?Gl(Ic(r.maxWait)||0,t):_,m="trailing"in r?!!r.trailing:m),
+s.cancel=a,s.flush=l,s}function Lf(n){return ai(n,jn)}function Cf(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new pl(en);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Cf.Cache||sr),r}function Uf(n){if("function"!=typeof n)throw new pl(en);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:
+return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Bf(n){return zf(2,n)}function Tf(n,t){if("function"!=typeof n)throw new pl(en);return t=t===X?t:kc(t),uu(n,t)}function $f(t,r){if("function"!=typeof t)throw new pl(en);return r=null==r?0:Gl(kc(r),0),uu(function(e){var u=e[r],i=Ou(e,0,r);return u&&a(i,u),n(t,this,i)})}function Df(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new pl(en);return fc(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),
+Wf(n,t,{leading:e,maxWait:t,trailing:u})}function Mf(n){return Rf(n,1)}function Ff(n,t){return ph(Au(t),n)}function Nf(){if(!arguments.length)return[];var n=arguments[0];return bh(n)?n:[n]}function Pf(n){return Fr(n,sn)}function qf(n,t){return t="function"==typeof t?t:X,Fr(n,sn,t)}function Zf(n){return Fr(n,an|sn)}function Kf(n,t){return t="function"==typeof t?t:X,Fr(n,an|sn,t)}function Vf(n,t){return null==t||Pr(n,t,Pc(t))}function Gf(n,t){return n===t||n!==n&&t!==t}function Hf(n){return null!=n&&oc(n.length)&&!uc(n);
+}function Jf(n){return cc(n)&&Hf(n)}function Yf(n){return n===!0||n===!1||cc(n)&&we(n)==Nn}function Qf(n){return cc(n)&&1===n.nodeType&&!gc(n)}function Xf(n){if(null==n)return!0;if(Hf(n)&&(bh(n)||"string"==typeof n||"function"==typeof n.splice||mh(n)||Oh(n)||dh(n)))return!n.length;var t=zs(n);if(t==Gn||t==tt)return!n.size;if(Mi(n))return!Me(n).length;for(var r in n)if(bl.call(n,r))return!1;return!0}function nc(n,t){return Se(n,t)}function tc(n,t,r){r="function"==typeof r?r:X;var e=r?r(n,t):X;return e===X?Se(n,t,X,r):!!e;
+}function rc(n){if(!cc(n))return!1;var t=we(n);return t==Zn||t==qn||"string"==typeof n.message&&"string"==typeof n.name&&!gc(n)}function ec(n){return"number"==typeof n&&Zl(n)}function uc(n){if(!fc(n))return!1;var t=we(n);return t==Kn||t==Vn||t==Fn||t==Xn}function ic(n){return"number"==typeof n&&n==kc(n)}function oc(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=Wn}function fc(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function cc(n){return null!=n&&"object"==typeof n}function ac(n,t){
+return n===t||Ce(n,t,ji(t))}function lc(n,t,r){return r="function"==typeof r?r:X,Ce(n,t,ji(t),r)}function sc(n){return vc(n)&&n!=+n}function hc(n){if(Es(n))throw new fl(rn);return Ue(n)}function pc(n){return null===n}function _c(n){return null==n}function vc(n){return"number"==typeof n||cc(n)&&we(n)==Hn}function gc(n){if(!cc(n)||we(n)!=Yn)return!1;var t=El(n);if(null===t)return!0;var r=bl.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&dl.call(r)==jl}function yc(n){
+return ic(n)&&n>=-Wn&&n<=Wn}function dc(n){return"string"==typeof n||!bh(n)&&cc(n)&&we(n)==rt}function bc(n){return"symbol"==typeof n||cc(n)&&we(n)==et}function wc(n){return n===X}function mc(n){return cc(n)&&zs(n)==it}function xc(n){return cc(n)&&we(n)==ot}function jc(n){if(!n)return[];if(Hf(n))return dc(n)?G(n):Tu(n);if(Ul&&n[Ul])return D(n[Ul]());var t=zs(n);return(t==Gn?M:t==tt?P:ra)(n)}function Ac(n){if(!n)return 0===n?n:0;if(n=Ic(n),n===Sn||n===-Sn){return(n<0?-1:1)*Ln}return n===n?n:0}function kc(n){
+var t=Ac(n),r=t%1;return t===t?r?t-r:t:0}function Oc(n){return n?Mr(kc(n),0,Un):0}function Ic(n){if("number"==typeof n)return n;if(bc(n))return Cn;if(fc(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=fc(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=R(n);var r=qt.test(n);return r||Kt.test(n)?Xr(n.slice(2),r?2:8):Pt.test(n)?Cn:+n}function Rc(n){return $u(n,qc(n))}function zc(n){return n?Mr(kc(n),-Wn,Wn):0===n?n:0}function Ec(n){return null==n?"":vu(n)}function Sc(n,t){var r=gs(n);return null==t?r:Cr(r,t);
+}function Wc(n,t){return v(n,mi(t,3),ue)}function Lc(n,t){return v(n,mi(t,3),oe)}function Cc(n,t){return null==n?n:bs(n,mi(t,3),qc)}function Uc(n,t){return null==n?n:ws(n,mi(t,3),qc)}function Bc(n,t){return n&&ue(n,mi(t,3))}function Tc(n,t){return n&&oe(n,mi(t,3))}function $c(n){return null==n?[]:fe(n,Pc(n))}function Dc(n){return null==n?[]:fe(n,qc(n))}function Mc(n,t,r){var e=null==n?X:_e(n,t);return e===X?r:e}function Fc(n,t){return null!=n&&Ri(n,t,xe)}function Nc(n,t){return null!=n&&Ri(n,t,je);
+}function Pc(n){return Hf(n)?Or(n):Me(n)}function qc(n){return Hf(n)?Or(n,!0):Fe(n)}function Zc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Br(r,t(n,e,u),n)}),r}function Kc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Br(r,e,t(n,e,u))}),r}function Vc(n,t){return Gc(n,Uf(mi(t)))}function Gc(n,t){if(null==n)return{};var r=c(di(n),function(n){return[n]});return t=mi(t),Ye(n,r,function(n,r){return t(n,r[0])})}function Hc(n,t,r){t=ku(t,n);var e=-1,u=t.length;for(u||(u=1,n=X);++e<u;){var i=null==n?X:n[no(t[e])];
+i===X&&(e=u,i=r),n=uc(i)?i.call(n):i}return n}function Jc(n,t,r){return null==n?n:fu(n,t,r)}function Yc(n,t,r,e){return e="function"==typeof e?e:X,null==n?n:fu(n,t,r,e)}function Qc(n,t,e){var u=bh(n),i=u||mh(n)||Oh(n);if(t=mi(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:fc(n)&&uc(o)?gs(El(n)):{}}return(i?r:ue)(n,function(n,r,u){return t(e,n,r,u)}),e}function Xc(n,t){return null==n||yu(n,t)}function na(n,t,r){return null==n?n:du(n,t,Au(r))}function ta(n,t,r,e){return e="function"==typeof e?e:X,
+null==n?n:du(n,t,Au(r),e)}function ra(n){return null==n?[]:E(n,Pc(n))}function ea(n){return null==n?[]:E(n,qc(n))}function ua(n,t,r){return r===X&&(r=t,t=X),r!==X&&(r=Ic(r),r=r===r?r:0),t!==X&&(t=Ic(t),t=t===t?t:0),Mr(Ic(n),t,r)}function ia(n,t,r){return t=Ac(t),r===X?(r=t,t=0):r=Ac(r),n=Ic(n),Ae(n,t,r)}function oa(n,t,r){if(r&&"boolean"!=typeof r&&Ui(n,t,r)&&(t=r=X),r===X&&("boolean"==typeof t?(r=t,t=X):"boolean"==typeof n&&(r=n,n=X)),n===X&&t===X?(n=0,t=1):(n=Ac(n),t===X?(t=n,n=0):t=Ac(t)),n>t){
+var e=n;n=t,t=e}if(r||n%1||t%1){var u=Ql();return Hl(n+u*(t-n+Qr("1e-"+((u+"").length-1))),t)}return tu(n,t)}function fa(n){return Qh(Ec(n).toLowerCase())}function ca(n){return n=Ec(n),n&&n.replace(Gt,ve).replace(Dr,"")}function aa(n,t,r){n=Ec(n),t=vu(t);var e=n.length;r=r===X?e:Mr(kc(r),0,e);var u=r;return r-=t.length,r>=0&&n.slice(r,u)==t}function la(n){return n=Ec(n),n&&At.test(n)?n.replace(xt,ge):n}function sa(n){return n=Ec(n),n&&Wt.test(n)?n.replace(St,"\\$&"):n}function ha(n,t,r){n=Ec(n),t=kc(t);
+var e=t?V(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return ri(Nl(u),r)+n+ri(Fl(u),r)}function pa(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;return t&&e<t?n+ri(t-e,r):n}function _a(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;return t&&e<t?ri(t-e,r)+n:n}function va(n,t,r){return r||null==t?t=0:t&&(t=+t),Yl(Ec(n).replace(Lt,""),t||0)}function ga(n,t,r){return t=(r?Ui(n,t,r):t===X)?1:kc(t),eu(Ec(n),t)}function ya(){var n=arguments,t=Ec(n[0]);return n.length<3?t:t.replace(n[1],n[2])}function da(n,t,r){return r&&"number"!=typeof r&&Ui(n,t,r)&&(t=r=X),
+(r=r===X?Un:r>>>0)?(n=Ec(n),n&&("string"==typeof t||null!=t&&!Ah(t))&&(t=vu(t),!t&&T(n))?Ou(G(n),0,r):n.split(t,r)):[]}function ba(n,t,r){return n=Ec(n),r=null==r?0:Mr(kc(r),0,n.length),t=vu(t),n.slice(r,r+t.length)==t}function wa(n,t,r){var e=Z.templateSettings;r&&Ui(n,t,r)&&(t=X),n=Ec(n),t=Sh({},t,e,li);var u,i,o=Sh({},t.imports,e.imports,li),f=Pc(o),c=E(o,f),a=0,l=t.interpolate||Ht,s="__p += '",h=sl((t.escape||Ht).source+"|"+l.source+"|"+(l===It?Ft:Ht).source+"|"+(t.evaluate||Ht).source+"|$","g"),p="//# sourceURL="+(bl.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zr+"]")+"\n";
+n.replace(h,function(t,r,e,o,f,c){return e||(e=o),s+=n.slice(a,c).replace(Jt,U),r&&(u=!0,s+="' +\n__e("+r+") +\n'"),f&&(i=!0,s+="';\n"+f+";\n__p += '"),e&&(s+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),a=c+t.length,t}),s+="';\n";var _=bl.call(t,"variable")&&t.variable;if(_){if(Dt.test(_))throw new fl(un)}else s="with (obj) {\n"+s+"\n}\n";s=(i?s.replace(dt,""):s).replace(bt,"$1").replace(wt,"$1;"),s="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+s+"return __p\n}";
+var v=Xh(function(){return cl(f,p+"return "+s).apply(X,c)});if(v.source=s,rc(v))throw v;return v}function ma(n){return Ec(n).toLowerCase()}function xa(n){return Ec(n).toUpperCase()}function ja(n,t,r){if(n=Ec(n),n&&(r||t===X))return R(n);if(!n||!(t=vu(t)))return n;var e=G(n),u=G(t);return Ou(e,W(e,u),L(e,u)+1).join("")}function Aa(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.slice(0,H(n)+1);if(!n||!(t=vu(t)))return n;var e=G(n);return Ou(e,0,L(e,G(t))+1).join("")}function ka(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.replace(Lt,"");
+if(!n||!(t=vu(t)))return n;var e=G(n);return Ou(e,W(e,G(t))).join("")}function Oa(n,t){var r=An,e=kn;if(fc(t)){var u="separator"in t?t.separator:u;r="length"in t?kc(t.length):r,e="omission"in t?vu(t.omission):e}n=Ec(n);var i=n.length;if(T(n)){var o=G(n);i=o.length}if(r>=i)return n;var f=r-V(e);if(f<1)return e;var c=o?Ou(o,0,f).join(""):n.slice(0,f);if(u===X)return c+e;if(o&&(f+=c.length-f),Ah(u)){if(n.slice(f).search(u)){var a,l=c;for(u.global||(u=sl(u.source,Ec(Nt.exec(u))+"g")),u.lastIndex=0;a=u.exec(l);)var s=a.index;
+c=c.slice(0,s===X?f:s)}}else if(n.indexOf(vu(u),f)!=f){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+e}function Ia(n){return n=Ec(n),n&&jt.test(n)?n.replace(mt,ye):n}function Ra(n,t,r){return n=Ec(n),t=r?X:t,t===X?$(n)?Q(n):_(n):n.match(t)||[]}function za(t){var r=null==t?0:t.length,e=mi();return t=r?c(t,function(n){if("function"!=typeof n[1])throw new pl(en);return[e(n[0]),n[1]]}):[],uu(function(e){for(var u=-1;++u<r;){var i=t[u];if(n(i[0],this,e))return n(i[1],this,e)}})}function Ea(n){
+return Nr(Fr(n,an))}function Sa(n){return function(){return n}}function Wa(n,t){return null==n||n!==n?t:n}function La(n){return n}function Ca(n){return De("function"==typeof n?n:Fr(n,an))}function Ua(n){return qe(Fr(n,an))}function Ba(n,t){return Ze(n,Fr(t,an))}function Ta(n,t,e){var u=Pc(t),i=fe(t,u);null!=e||fc(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=fe(t,Pc(t)));var o=!(fc(e)&&"chain"in e&&!e.chain),f=uc(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;
+if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Tu(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function $a(){return re._===this&&(re._=Al),this}function Da(){}function Ma(n){return n=kc(n),uu(function(t){return Ge(t,n)})}function Fa(n){return Bi(n)?m(no(n)):Qe(n)}function Na(n){return function(t){return null==n?X:_e(n,t)}}function Pa(){return[]}function qa(){return!1}function Za(){return{}}function Ka(){return"";
+}function Va(){return!0}function Ga(n,t){if(n=kc(n),n<1||n>Wn)return[];var r=Un,e=Hl(n,Un);t=mi(t),n-=Un;for(var u=O(e,t);++r<n;)t(r);return u}function Ha(n){return bh(n)?c(n,no):bc(n)?[n]:Tu(Cs(Ec(n)))}function Ja(n){var t=++wl;return Ec(n)+t}function Ya(n){return n&&n.length?Yr(n,La,me):X}function Qa(n,t){return n&&n.length?Yr(n,mi(t,2),me):X}function Xa(n){return w(n,La)}function nl(n,t){return w(n,mi(t,2))}function tl(n){return n&&n.length?Yr(n,La,Ne):X}function rl(n,t){return n&&n.length?Yr(n,mi(t,2),Ne):X;
+}function el(n){return n&&n.length?k(n,La):0}function ul(n,t){return n&&n.length?k(n,mi(t,2)):0}x=null==x?re:be.defaults(re.Object(),x,be.pick(re,qr));var il=x.Array,ol=x.Date,fl=x.Error,cl=x.Function,al=x.Math,ll=x.Object,sl=x.RegExp,hl=x.String,pl=x.TypeError,_l=il.prototype,vl=cl.prototype,gl=ll.prototype,yl=x["__core-js_shared__"],dl=vl.toString,bl=gl.hasOwnProperty,wl=0,ml=function(){var n=/[^.]+$/.exec(yl&&yl.keys&&yl.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),xl=gl.toString,jl=dl.call(ll),Al=re._,kl=sl("^"+dl.call(bl).replace(St,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ol=ie?x.Buffer:X,Il=x.Symbol,Rl=x.Uint8Array,zl=Ol?Ol.allocUnsafe:X,El=F(ll.getPrototypeOf,ll),Sl=ll.create,Wl=gl.propertyIsEnumerable,Ll=_l.splice,Cl=Il?Il.isConcatSpreadable:X,Ul=Il?Il.iterator:X,Bl=Il?Il.toStringTag:X,Tl=function(){
+try{var n=Ai(ll,"defineProperty");return n({},"",{}),n}catch(n){}}(),$l=x.clearTimeout!==re.clearTimeout&&x.clearTimeout,Dl=ol&&ol.now!==re.Date.now&&ol.now,Ml=x.setTimeout!==re.setTimeout&&x.setTimeout,Fl=al.ceil,Nl=al.floor,Pl=ll.getOwnPropertySymbols,ql=Ol?Ol.isBuffer:X,Zl=x.isFinite,Kl=_l.join,Vl=F(ll.keys,ll),Gl=al.max,Hl=al.min,Jl=ol.now,Yl=x.parseInt,Ql=al.random,Xl=_l.reverse,ns=Ai(x,"DataView"),ts=Ai(x,"Map"),rs=Ai(x,"Promise"),es=Ai(x,"Set"),us=Ai(x,"WeakMap"),is=Ai(ll,"create"),os=us&&new us,fs={},cs=to(ns),as=to(ts),ls=to(rs),ss=to(es),hs=to(us),ps=Il?Il.prototype:X,_s=ps?ps.valueOf:X,vs=ps?ps.toString:X,gs=function(){
+function n(){}return function(t){if(!fc(t))return{};if(Sl)return Sl(t);n.prototype=t;var r=new n;return n.prototype=X,r}}();Z.templateSettings={escape:kt,evaluate:Ot,interpolate:It,variable:"",imports:{_:Z}},Z.prototype=J.prototype,Z.prototype.constructor=Z,Y.prototype=gs(J.prototype),Y.prototype.constructor=Y,Ct.prototype=gs(J.prototype),Ct.prototype.constructor=Ct,Xt.prototype.clear=nr,Xt.prototype.delete=tr,Xt.prototype.get=rr,Xt.prototype.has=er,Xt.prototype.set=ur,ir.prototype.clear=or,ir.prototype.delete=fr,
+ir.prototype.get=cr,ir.prototype.has=ar,ir.prototype.set=lr,sr.prototype.clear=hr,sr.prototype.delete=pr,sr.prototype.get=_r,sr.prototype.has=vr,sr.prototype.set=gr,yr.prototype.add=yr.prototype.push=dr,yr.prototype.has=br,wr.prototype.clear=mr,wr.prototype.delete=xr,wr.prototype.get=jr,wr.prototype.has=Ar,wr.prototype.set=kr;var ys=Pu(ue),ds=Pu(oe,!0),bs=qu(),ws=qu(!0),ms=os?function(n,t){return os.set(n,t),n}:La,xs=Tl?function(n,t){return Tl(n,"toString",{configurable:!0,enumerable:!1,value:Sa(t),
+writable:!0})}:La,js=uu,As=$l||function(n){return re.clearTimeout(n)},ks=es&&1/P(new es([,-0]))[1]==Sn?function(n){return new es(n)}:Da,Os=os?function(n){return os.get(n)}:Da,Is=Pl?function(n){return null==n?[]:(n=ll(n),i(Pl(n),function(t){return Wl.call(n,t)}))}:Pa,Rs=Pl?function(n){for(var t=[];n;)a(t,Is(n)),n=El(n);return t}:Pa,zs=we;(ns&&zs(new ns(new ArrayBuffer(1)))!=ct||ts&&zs(new ts)!=Gn||rs&&zs(rs.resolve())!=Qn||es&&zs(new es)!=tt||us&&zs(new us)!=it)&&(zs=function(n){var t=we(n),r=t==Yn?n.constructor:X,e=r?to(r):"";
+if(e)switch(e){case cs:return ct;case as:return Gn;case ls:return Qn;case ss:return tt;case hs:return it}return t});var Es=yl?uc:qa,Ss=Qi(ms),Ws=Ml||function(n,t){return re.setTimeout(n,t)},Ls=Qi(xs),Cs=Pi(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(Et,function(n,r,e,u){t.push(e?u.replace(Mt,"$1"):r||n)}),t}),Us=uu(function(n,t){return Jf(n)?Hr(n,ee(t,1,Jf,!0)):[]}),Bs=uu(function(n,t){var r=jo(t);return Jf(r)&&(r=X),Jf(n)?Hr(n,ee(t,1,Jf,!0),mi(r,2)):[]}),Ts=uu(function(n,t){
+var r=jo(t);return Jf(r)&&(r=X),Jf(n)?Hr(n,ee(t,1,Jf,!0),X,r):[]}),$s=uu(function(n){var t=c(n,ju);return t.length&&t[0]===n[0]?ke(t):[]}),Ds=uu(function(n){var t=jo(n),r=c(n,ju);return t===jo(r)?t=X:r.pop(),r.length&&r[0]===n[0]?ke(r,mi(t,2)):[]}),Ms=uu(function(n){var t=jo(n),r=c(n,ju);return t="function"==typeof t?t:X,t&&r.pop(),r.length&&r[0]===n[0]?ke(r,X,t):[]}),Fs=uu(Oo),Ns=gi(function(n,t){var r=null==n?0:n.length,e=Tr(n,t);return nu(n,c(t,function(n){return Ci(n,r)?+n:n}).sort(Lu)),e}),Ps=uu(function(n){
+return gu(ee(n,1,Jf,!0))}),qs=uu(function(n){var t=jo(n);return Jf(t)&&(t=X),gu(ee(n,1,Jf,!0),mi(t,2))}),Zs=uu(function(n){var t=jo(n);return t="function"==typeof t?t:X,gu(ee(n,1,Jf,!0),X,t)}),Ks=uu(function(n,t){return Jf(n)?Hr(n,t):[]}),Vs=uu(function(n){return mu(i(n,Jf))}),Gs=uu(function(n){var t=jo(n);return Jf(t)&&(t=X),mu(i(n,Jf),mi(t,2))}),Hs=uu(function(n){var t=jo(n);return t="function"==typeof t?t:X,mu(i(n,Jf),X,t)}),Js=uu(Go),Ys=uu(function(n){var t=n.length,r=t>1?n[t-1]:X;return r="function"==typeof r?(n.pop(),
+r):X,Ho(n,r)}),Qs=gi(function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Tr(t,n)};return!(t>1||this.__actions__.length)&&e instanceof Ct&&Ci(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:nf,args:[u],thisArg:X}),new Y(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(X),n})):this.thru(u)}),Xs=Fu(function(n,t,r){bl.call(n,r)?++n[r]:Br(n,r,1)}),nh=Ju(ho),th=Ju(po),rh=Fu(function(n,t,r){bl.call(n,r)?n[r].push(t):Br(n,r,[t])}),eh=uu(function(t,r,e){var u=-1,i="function"==typeof r,o=Hf(t)?il(t.length):[];
+return ys(t,function(t){o[++u]=i?n(r,t,e):Ie(t,r,e)}),o}),uh=Fu(function(n,t,r){Br(n,r,t)}),ih=Fu(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),oh=uu(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Ui(n,t[0],t[1])?t=[]:r>2&&Ui(t[0],t[1],t[2])&&(t=[t[0]]),He(n,ee(t,1),[])}),fh=Dl||function(){return re.Date.now()},ch=uu(function(n,t,r){var e=_n;if(r.length){var u=N(r,wi(ch));e|=bn}return ai(n,e,t,r,u)}),ah=uu(function(n,t,r){var e=_n|vn;if(r.length){var u=N(r,wi(ah));e|=bn;
+}return ai(t,e,n,r,u)}),lh=uu(function(n,t){return Gr(n,1,t)}),sh=uu(function(n,t,r){return Gr(n,Ic(t)||0,r)});Cf.Cache=sr;var hh=js(function(t,r){r=1==r.length&&bh(r[0])?c(r[0],z(mi())):c(ee(r,1),z(mi()));var e=r.length;return uu(function(u){for(var i=-1,o=Hl(u.length,e);++i<o;)u[i]=r[i].call(this,u[i]);return n(t,this,u)})}),ph=uu(function(n,t){return ai(n,bn,X,t,N(t,wi(ph)))}),_h=uu(function(n,t){return ai(n,wn,X,t,N(t,wi(_h)))}),vh=gi(function(n,t){return ai(n,xn,X,X,X,t)}),gh=ii(me),yh=ii(function(n,t){
+return n>=t}),dh=Re(function(){return arguments}())?Re:function(n){return cc(n)&&bl.call(n,"callee")&&!Wl.call(n,"callee")},bh=il.isArray,wh=ce?z(ce):ze,mh=ql||qa,xh=ae?z(ae):Ee,jh=le?z(le):Le,Ah=se?z(se):Be,kh=he?z(he):Te,Oh=pe?z(pe):$e,Ih=ii(Ne),Rh=ii(function(n,t){return n<=t}),zh=Nu(function(n,t){if(Mi(t)||Hf(t))return $u(t,Pc(t),n),X;for(var r in t)bl.call(t,r)&&Sr(n,r,t[r])}),Eh=Nu(function(n,t){$u(t,qc(t),n)}),Sh=Nu(function(n,t,r,e){$u(t,qc(t),n,e)}),Wh=Nu(function(n,t,r,e){$u(t,Pc(t),n,e);
+}),Lh=gi(Tr),Ch=uu(function(n,t){n=ll(n);var r=-1,e=t.length,u=e>2?t[2]:X;for(u&&Ui(t[0],t[1],u)&&(e=1);++r<e;)for(var i=t[r],o=qc(i),f=-1,c=o.length;++f<c;){var a=o[f],l=n[a];(l===X||Gf(l,gl[a])&&!bl.call(n,a))&&(n[a]=i[a])}return n}),Uh=uu(function(t){return t.push(X,si),n(Mh,X,t)}),Bh=Xu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=xl.call(t)),n[t]=r},Sa(La)),Th=Xu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=xl.call(t)),bl.call(n,t)?n[t].push(r):n[t]=[r]},mi),$h=uu(Ie),Dh=Nu(function(n,t,r){
+Ke(n,t,r)}),Mh=Nu(function(n,t,r,e){Ke(n,t,r,e)}),Fh=gi(function(n,t){var r={};if(null==n)return r;var e=!1;t=c(t,function(t){return t=ku(t,n),e||(e=t.length>1),t}),$u(n,di(n),r),e&&(r=Fr(r,an|ln|sn,hi));for(var u=t.length;u--;)yu(r,t[u]);return r}),Nh=gi(function(n,t){return null==n?{}:Je(n,t)}),Ph=ci(Pc),qh=ci(qc),Zh=Vu(function(n,t,r){return t=t.toLowerCase(),n+(r?fa(t):t)}),Kh=Vu(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Vh=Vu(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Gh=Ku("toLowerCase"),Hh=Vu(function(n,t,r){
+return n+(r?"_":"")+t.toLowerCase()}),Jh=Vu(function(n,t,r){return n+(r?" ":"")+Qh(t)}),Yh=Vu(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Qh=Ku("toUpperCase"),Xh=uu(function(t,r){try{return n(t,X,r)}catch(n){return rc(n)?n:new fl(n)}}),np=gi(function(n,t){return r(t,function(t){t=no(t),Br(n,t,ch(n[t],n))}),n}),tp=Yu(),rp=Yu(!0),ep=uu(function(n,t){return function(r){return Ie(r,n,t)}}),up=uu(function(n,t){return function(r){return Ie(n,r,t)}}),ip=ti(c),op=ti(u),fp=ti(h),cp=ui(),ap=ui(!0),lp=ni(function(n,t){
+return n+t},0),sp=fi("ceil"),hp=ni(function(n,t){return n/t},1),pp=fi("floor"),_p=ni(function(n,t){return n*t},1),vp=fi("round"),gp=ni(function(n,t){return n-t},0);return Z.after=If,Z.ary=Rf,Z.assign=zh,Z.assignIn=Eh,Z.assignInWith=Sh,Z.assignWith=Wh,Z.at=Lh,Z.before=zf,Z.bind=ch,Z.bindAll=np,Z.bindKey=ah,Z.castArray=Nf,Z.chain=Qo,Z.chunk=uo,Z.compact=io,Z.concat=oo,Z.cond=za,Z.conforms=Ea,Z.constant=Sa,Z.countBy=Xs,Z.create=Sc,Z.curry=Ef,Z.curryRight=Sf,Z.debounce=Wf,Z.defaults=Ch,Z.defaultsDeep=Uh,
+Z.defer=lh,Z.delay=sh,Z.difference=Us,Z.differenceBy=Bs,Z.differenceWith=Ts,Z.drop=fo,Z.dropRight=co,Z.dropRightWhile=ao,Z.dropWhile=lo,Z.fill=so,Z.filter=lf,Z.flatMap=sf,Z.flatMapDeep=hf,Z.flatMapDepth=pf,Z.flatten=_o,Z.flattenDeep=vo,Z.flattenDepth=go,Z.flip=Lf,Z.flow=tp,Z.flowRight=rp,Z.fromPairs=yo,Z.functions=$c,Z.functionsIn=Dc,Z.groupBy=rh,Z.initial=mo,Z.intersection=$s,Z.intersectionBy=Ds,Z.intersectionWith=Ms,Z.invert=Bh,Z.invertBy=Th,Z.invokeMap=eh,Z.iteratee=Ca,Z.keyBy=uh,Z.keys=Pc,Z.keysIn=qc,
+Z.map=yf,Z.mapKeys=Zc,Z.mapValues=Kc,Z.matches=Ua,Z.matchesProperty=Ba,Z.memoize=Cf,Z.merge=Dh,Z.mergeWith=Mh,Z.method=ep,Z.methodOf=up,Z.mixin=Ta,Z.negate=Uf,Z.nthArg=Ma,Z.omit=Fh,Z.omitBy=Vc,Z.once=Bf,Z.orderBy=df,Z.over=ip,Z.overArgs=hh,Z.overEvery=op,Z.overSome=fp,Z.partial=ph,Z.partialRight=_h,Z.partition=ih,Z.pick=Nh,Z.pickBy=Gc,Z.property=Fa,Z.propertyOf=Na,Z.pull=Fs,Z.pullAll=Oo,Z.pullAllBy=Io,Z.pullAllWith=Ro,Z.pullAt=Ns,Z.range=cp,Z.rangeRight=ap,Z.rearg=vh,Z.reject=mf,Z.remove=zo,Z.rest=Tf,
+Z.reverse=Eo,Z.sampleSize=jf,Z.set=Jc,Z.setWith=Yc,Z.shuffle=Af,Z.slice=So,Z.sortBy=oh,Z.sortedUniq=$o,Z.sortedUniqBy=Do,Z.split=da,Z.spread=$f,Z.tail=Mo,Z.take=Fo,Z.takeRight=No,Z.takeRightWhile=Po,Z.takeWhile=qo,Z.tap=Xo,Z.throttle=Df,Z.thru=nf,Z.toArray=jc,Z.toPairs=Ph,Z.toPairsIn=qh,Z.toPath=Ha,Z.toPlainObject=Rc,Z.transform=Qc,Z.unary=Mf,Z.union=Ps,Z.unionBy=qs,Z.unionWith=Zs,Z.uniq=Zo,Z.uniqBy=Ko,Z.uniqWith=Vo,Z.unset=Xc,Z.unzip=Go,Z.unzipWith=Ho,Z.update=na,Z.updateWith=ta,Z.values=ra,Z.valuesIn=ea,
+Z.without=Ks,Z.words=Ra,Z.wrap=Ff,Z.xor=Vs,Z.xorBy=Gs,Z.xorWith=Hs,Z.zip=Js,Z.zipObject=Jo,Z.zipObjectDeep=Yo,Z.zipWith=Ys,Z.entries=Ph,Z.entriesIn=qh,Z.extend=Eh,Z.extendWith=Sh,Ta(Z,Z),Z.add=lp,Z.attempt=Xh,Z.camelCase=Zh,Z.capitalize=fa,Z.ceil=sp,Z.clamp=ua,Z.clone=Pf,Z.cloneDeep=Zf,Z.cloneDeepWith=Kf,Z.cloneWith=qf,Z.conformsTo=Vf,Z.deburr=ca,Z.defaultTo=Wa,Z.divide=hp,Z.endsWith=aa,Z.eq=Gf,Z.escape=la,Z.escapeRegExp=sa,Z.every=af,Z.find=nh,Z.findIndex=ho,Z.findKey=Wc,Z.findLast=th,Z.findLastIndex=po,
+Z.findLastKey=Lc,Z.floor=pp,Z.forEach=_f,Z.forEachRight=vf,Z.forIn=Cc,Z.forInRight=Uc,Z.forOwn=Bc,Z.forOwnRight=Tc,Z.get=Mc,Z.gt=gh,Z.gte=yh,Z.has=Fc,Z.hasIn=Nc,Z.head=bo,Z.identity=La,Z.includes=gf,Z.indexOf=wo,Z.inRange=ia,Z.invoke=$h,Z.isArguments=dh,Z.isArray=bh,Z.isArrayBuffer=wh,Z.isArrayLike=Hf,Z.isArrayLikeObject=Jf,Z.isBoolean=Yf,Z.isBuffer=mh,Z.isDate=xh,Z.isElement=Qf,Z.isEmpty=Xf,Z.isEqual=nc,Z.isEqualWith=tc,Z.isError=rc,Z.isFinite=ec,Z.isFunction=uc,Z.isInteger=ic,Z.isLength=oc,Z.isMap=jh,
+Z.isMatch=ac,Z.isMatchWith=lc,Z.isNaN=sc,Z.isNative=hc,Z.isNil=_c,Z.isNull=pc,Z.isNumber=vc,Z.isObject=fc,Z.isObjectLike=cc,Z.isPlainObject=gc,Z.isRegExp=Ah,Z.isSafeInteger=yc,Z.isSet=kh,Z.isString=dc,Z.isSymbol=bc,Z.isTypedArray=Oh,Z.isUndefined=wc,Z.isWeakMap=mc,Z.isWeakSet=xc,Z.join=xo,Z.kebabCase=Kh,Z.last=jo,Z.lastIndexOf=Ao,Z.lowerCase=Vh,Z.lowerFirst=Gh,Z.lt=Ih,Z.lte=Rh,Z.max=Ya,Z.maxBy=Qa,Z.mean=Xa,Z.meanBy=nl,Z.min=tl,Z.minBy=rl,Z.stubArray=Pa,Z.stubFalse=qa,Z.stubObject=Za,Z.stubString=Ka,
+Z.stubTrue=Va,Z.multiply=_p,Z.nth=ko,Z.noConflict=$a,Z.noop=Da,Z.now=fh,Z.pad=ha,Z.padEnd=pa,Z.padStart=_a,Z.parseInt=va,Z.random=oa,Z.reduce=bf,Z.reduceRight=wf,Z.repeat=ga,Z.replace=ya,Z.result=Hc,Z.round=vp,Z.runInContext=p,Z.sample=xf,Z.size=kf,Z.snakeCase=Hh,Z.some=Of,Z.sortedIndex=Wo,Z.sortedIndexBy=Lo,Z.sortedIndexOf=Co,Z.sortedLastIndex=Uo,Z.sortedLastIndexBy=Bo,Z.sortedLastIndexOf=To,Z.startCase=Jh,Z.startsWith=ba,Z.subtract=gp,Z.sum=el,Z.sumBy=ul,Z.template=wa,Z.times=Ga,Z.toFinite=Ac,Z.toInteger=kc,
+Z.toLength=Oc,Z.toLower=ma,Z.toNumber=Ic,Z.toSafeInteger=zc,Z.toString=Ec,Z.toUpper=xa,Z.trim=ja,Z.trimEnd=Aa,Z.trimStart=ka,Z.truncate=Oa,Z.unescape=Ia,Z.uniqueId=Ja,Z.upperCase=Yh,Z.upperFirst=Qh,Z.each=_f,Z.eachRight=vf,Z.first=bo,Ta(Z,function(){var n={};return ue(Z,function(t,r){bl.call(Z.prototype,r)||(n[r]=t)}),n}(),{chain:!1}),Z.VERSION=nn,r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){Z[n].placeholder=Z}),r(["drop","take"],function(n,t){Ct.prototype[n]=function(r){
+r=r===X?1:Gl(kc(r),0);var e=this.__filtered__&&!t?new Ct(this):this.clone();return e.__filtered__?e.__takeCount__=Hl(r,e.__takeCount__):e.__views__.push({size:Hl(r,Un),type:n+(e.__dir__<0?"Right":"")}),e},Ct.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==Rn||r==En;Ct.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:mi(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){
+var r="take"+(t?"Right":"");Ct.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Ct.prototype[n]=function(){return this.__filtered__?new Ct(this):this[r](1)}}),Ct.prototype.compact=function(){return this.filter(La)},Ct.prototype.find=function(n){return this.filter(n).head()},Ct.prototype.findLast=function(n){return this.reverse().find(n)},Ct.prototype.invokeMap=uu(function(n,t){return"function"==typeof n?new Ct(this):this.map(function(r){
+return Ie(r,n,t)})}),Ct.prototype.reject=function(n){return this.filter(Uf(mi(n)))},Ct.prototype.slice=function(n,t){n=kc(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Ct(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==X&&(t=kc(t),r=t<0?r.dropRight(-t):r.take(t-n)),r)},Ct.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ct.prototype.toArray=function(){return this.take(Un)},ue(Ct.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=Z[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);
+u&&(Z.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Ct,c=o[0],l=f||bh(t),s=function(n){var t=u.apply(Z,a([n],o));return e&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(f=l=!1);var h=this.__chain__,p=!!this.__actions__.length,_=i&&!h,v=f&&!p;if(!i&&l){t=v?t:new Ct(this);var g=n.apply(t,o);return g.__actions__.push({func:nf,args:[s],thisArg:X}),new Y(g,h)}return _&&v?n.apply(this,o):(g=this.thru(s),_?e?g.value()[0]:g.value():g)})}),r(["pop","push","shift","sort","splice","unshift"],function(n){
+var t=_l[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);Z.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(bh(u)?u:[],n)}return this[r](function(r){return t.apply(bh(r)?r:[],n)})}}),ue(Ct.prototype,function(n,t){var r=Z[t];if(r){var e=r.name+"";bl.call(fs,e)||(fs[e]=[]),fs[e].push({name:t,func:r})}}),fs[Qu(X,vn).name]=[{name:"wrapper",func:X}],Ct.prototype.clone=$t,Ct.prototype.reverse=Yt,Ct.prototype.value=Qt,Z.prototype.at=Qs,
+Z.prototype.chain=tf,Z.prototype.commit=rf,Z.prototype.next=ef,Z.prototype.plant=of,Z.prototype.reverse=ff,Z.prototype.toJSON=Z.prototype.valueOf=Z.prototype.value=cf,Z.prototype.first=Z.prototype.head,Ul&&(Z.prototype[Ul]=uf),Z},be=de();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(re._=be,define(function(){return be})):ue?((ue.exports=be)._=be,ee._=be):re._=be}).call(this); \ No newline at end of file
diff --git a/node_modules/lodash/lowerCase.js b/node_modules/lodash/lowerCase.js
new file mode 100644
index 0000000..66c1f49
--- /dev/null
+++ b/node_modules/lodash/lowerCase.js
@@ -0,0 +1,27 @@
+var createCompounder = require('./_createCompounder');
+
+/**
+ * Converts `string`, as space separated words, to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.lowerCase('--Foo-Bar--');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('fooBar');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('__FOO_BAR__');
+ * // => 'foo bar'
+ */
+var lowerCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toLowerCase();
+});
+
+module.exports = lowerCase;
diff --git a/node_modules/lodash/lowerFirst.js b/node_modules/lodash/lowerFirst.js
new file mode 100644
index 0000000..c08f082
--- /dev/null
+++ b/node_modules/lodash/lowerFirst.js
@@ -0,0 +1,22 @@
+var createCaseFirst = require('./_createCaseFirst');
+
+/**
+ * Converts the first character of `string` to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.lowerFirst('Fred');
+ * // => 'fred'
+ *
+ * _.lowerFirst('FRED');
+ * // => 'fRED'
+ */
+var lowerFirst = createCaseFirst('toLowerCase');
+
+module.exports = lowerFirst;
diff --git a/node_modules/lodash/lt.js b/node_modules/lodash/lt.js
new file mode 100644
index 0000000..813866e
--- /dev/null
+++ b/node_modules/lodash/lt.js
@@ -0,0 +1,29 @@
+var baseLt = require('./_baseLt'),
+ createRelationalOperation = require('./_createRelationalOperation');
+
+/**
+ * Checks if `value` is less than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ * @see _.gt
+ * @example
+ *
+ * _.lt(1, 3);
+ * // => true
+ *
+ * _.lt(3, 3);
+ * // => false
+ *
+ * _.lt(3, 1);
+ * // => false
+ */
+var lt = createRelationalOperation(baseLt);
+
+module.exports = lt;
diff --git a/node_modules/lodash/lte.js b/node_modules/lodash/lte.js
new file mode 100644
index 0000000..382f661
--- /dev/null
+++ b/node_modules/lodash/lte.js
@@ -0,0 +1,30 @@
+var createRelationalOperation = require('./_createRelationalOperation');
+
+/**
+ * Checks if `value` is less than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than or equal to
+ * `other`, else `false`.
+ * @see _.gte
+ * @example
+ *
+ * _.lte(1, 3);
+ * // => true
+ *
+ * _.lte(3, 3);
+ * // => true
+ *
+ * _.lte(3, 1);
+ * // => false
+ */
+var lte = createRelationalOperation(function(value, other) {
+ return value <= other;
+});
+
+module.exports = lte;
diff --git a/node_modules/lodash/map.js b/node_modules/lodash/map.js
new file mode 100644
index 0000000..22efee7
--- /dev/null
+++ b/node_modules/lodash/map.js
@@ -0,0 +1,53 @@
+var arrayMap = require('./_arrayMap'),
+ baseIteratee = require('./_baseIteratee'),
+ baseMap = require('./_baseMap'),
+ isArray = require('./isArray');
+
+/**
+ * Creates an array of values by running each element in `collection` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * _.map([4, 8], square);
+ * // => [16, 64]
+ *
+ * _.map({ 'a': 4, 'b': 8 }, square);
+ * // => [16, 64] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+function map(collection, iteratee) {
+ var func = isArray(collection) ? arrayMap : baseMap;
+ return func(collection, baseIteratee(iteratee, 3));
+}
+
+module.exports = map;
diff --git a/node_modules/lodash/mapKeys.js b/node_modules/lodash/mapKeys.js
new file mode 100644
index 0000000..3b68797
--- /dev/null
+++ b/node_modules/lodash/mapKeys.js
@@ -0,0 +1,36 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ baseForOwn = require('./_baseForOwn'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * The opposite of `_.mapValues`; this method creates an object with the
+ * same values as `object` and keys generated by running each own enumerable
+ * string keyed property of `object` thru `iteratee`. The iteratee is invoked
+ * with three arguments: (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapValues
+ * @example
+ *
+ * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
+ * return key + value;
+ * });
+ * // => { 'a1': 1, 'b2': 2 }
+ */
+function mapKeys(object, iteratee) {
+ var result = {};
+ iteratee = baseIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ baseAssignValue(result, iteratee(value, key, object), value);
+ });
+ return result;
+}
+
+module.exports = mapKeys;
diff --git a/node_modules/lodash/mapValues.js b/node_modules/lodash/mapValues.js
new file mode 100644
index 0000000..4ec0825
--- /dev/null
+++ b/node_modules/lodash/mapValues.js
@@ -0,0 +1,43 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ baseForOwn = require('./_baseForOwn'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * Creates an object with the same keys as `object` and values generated
+ * by running each own enumerable string keyed property of `object` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapKeys
+ * @example
+ *
+ * var users = {
+ * 'fred': { 'user': 'fred', 'age': 40 },
+ * 'pebbles': { 'user': 'pebbles', 'age': 1 }
+ * };
+ *
+ * _.mapValues(users, function(o) { return o.age; });
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.mapValues(users, 'age');
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ */
+function mapValues(object, iteratee) {
+ var result = {};
+ iteratee = baseIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ baseAssignValue(result, key, iteratee(value, key, object));
+ });
+ return result;
+}
+
+module.exports = mapValues;
diff --git a/node_modules/lodash/matches.js b/node_modules/lodash/matches.js
new file mode 100644
index 0000000..e10b351
--- /dev/null
+++ b/node_modules/lodash/matches.js
@@ -0,0 +1,46 @@
+var baseClone = require('./_baseClone'),
+ baseMatches = require('./_baseMatches');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * Creates a function that performs a partial deep comparison between a given
+ * object and `source`, returning `true` if the given object has equivalent
+ * property values, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.isMatch` with `source`
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * **Note:** Multiple values can be checked by combining several matchers
+ * using `_.overSome`
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
+ * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
+ *
+ * // Checking for several possible values
+ * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
+ * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
+ */
+function matches(source) {
+ return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
+}
+
+module.exports = matches;
diff --git a/node_modules/lodash/matchesProperty.js b/node_modules/lodash/matchesProperty.js
new file mode 100644
index 0000000..e6f1a88
--- /dev/null
+++ b/node_modules/lodash/matchesProperty.js
@@ -0,0 +1,44 @@
+var baseClone = require('./_baseClone'),
+ baseMatchesProperty = require('./_baseMatchesProperty');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * Creates a function that performs a partial deep comparison between the
+ * value at `path` of a given object to `srcValue`, returning `true` if the
+ * object value is equivalent, else `false`.
+ *
+ * **Note:** Partial comparisons will match empty array and empty object
+ * `srcValue` values against any array or object value, respectively. See
+ * `_.isEqual` for a list of supported value comparisons.
+ *
+ * **Note:** Multiple values can be checked by combining several matchers
+ * using `_.overSome`
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.find(objects, _.matchesProperty('a', 4));
+ * // => { 'a': 4, 'b': 5, 'c': 6 }
+ *
+ * // Checking for several possible values
+ * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
+ * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
+ */
+function matchesProperty(path, srcValue) {
+ return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
+}
+
+module.exports = matchesProperty;
diff --git a/node_modules/lodash/math.js b/node_modules/lodash/math.js
new file mode 100644
index 0000000..5966887
--- /dev/null
+++ b/node_modules/lodash/math.js
@@ -0,0 +1,17 @@
+module.exports = {
+ 'add': require('./add'),
+ 'ceil': require('./ceil'),
+ 'divide': require('./divide'),
+ 'floor': require('./floor'),
+ 'max': require('./max'),
+ 'maxBy': require('./maxBy'),
+ 'mean': require('./mean'),
+ 'meanBy': require('./meanBy'),
+ 'min': require('./min'),
+ 'minBy': require('./minBy'),
+ 'multiply': require('./multiply'),
+ 'round': require('./round'),
+ 'subtract': require('./subtract'),
+ 'sum': require('./sum'),
+ 'sumBy': require('./sumBy')
+};
diff --git a/node_modules/lodash/max.js b/node_modules/lodash/max.js
new file mode 100644
index 0000000..142ad8c
--- /dev/null
+++ b/node_modules/lodash/max.js
@@ -0,0 +1,29 @@
+var baseExtremum = require('./_baseExtremum'),
+ baseGt = require('./_baseGt'),
+ identity = require('./identity');
+
+/**
+ * Computes the maximum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * _.max([4, 2, 8, 6]);
+ * // => 8
+ *
+ * _.max([]);
+ * // => undefined
+ */
+function max(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseGt)
+ : undefined;
+}
+
+module.exports = max;
diff --git a/node_modules/lodash/maxBy.js b/node_modules/lodash/maxBy.js
new file mode 100644
index 0000000..2eba9c0
--- /dev/null
+++ b/node_modules/lodash/maxBy.js
@@ -0,0 +1,34 @@
+var baseExtremum = require('./_baseExtremum'),
+ baseGt = require('./_baseGt'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * This method is like `_.max` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.maxBy(objects, function(o) { return o.n; });
+ * // => { 'n': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.maxBy(objects, 'n');
+ * // => { 'n': 2 }
+ */
+function maxBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, baseIteratee(iteratee, 2), baseGt)
+ : undefined;
+}
+
+module.exports = maxBy;
diff --git a/node_modules/lodash/mean.js b/node_modules/lodash/mean.js
new file mode 100644
index 0000000..e3ffff6
--- /dev/null
+++ b/node_modules/lodash/mean.js
@@ -0,0 +1,22 @@
+var baseMean = require('./_baseMean'),
+ identity = require('./identity');
+
+/**
+ * Computes the mean of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * _.mean([4, 2, 8, 6]);
+ * // => 5
+ */
+function mean(array) {
+ return baseMean(array, identity);
+}
+
+module.exports = mean;
diff --git a/node_modules/lodash/meanBy.js b/node_modules/lodash/meanBy.js
new file mode 100644
index 0000000..b031671
--- /dev/null
+++ b/node_modules/lodash/meanBy.js
@@ -0,0 +1,31 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseMean = require('./_baseMean');
+
+/**
+ * This method is like `_.mean` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be averaged.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.meanBy(objects, function(o) { return o.n; });
+ * // => 5
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.meanBy(objects, 'n');
+ * // => 5
+ */
+function meanBy(array, iteratee) {
+ return baseMean(array, baseIteratee(iteratee, 2));
+}
+
+module.exports = meanBy;
diff --git a/node_modules/lodash/memoize.js b/node_modules/lodash/memoize.js
new file mode 100644
index 0000000..d6035af
--- /dev/null
+++ b/node_modules/lodash/memoize.js
@@ -0,0 +1,73 @@
+var MapCache = require('./_MapCache');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided, it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is used as the map cache key. The `func`
+ * is invoked with the `this` binding of the memoized function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoized function.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
+ *
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
+ *
+ * // Modify the result cache.
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
+ *
+ * // Replace `_.memoize.Cache`.
+ * _.memoize.Cache = WeakMap;
+ */
+function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result) || cache;
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache);
+ return memoized;
+}
+
+// Expose `MapCache`.
+memoize.Cache = MapCache;
+
+module.exports = memoize;
diff --git a/node_modules/lodash/merge.js b/node_modules/lodash/merge.js
new file mode 100644
index 0000000..4bbc3a1
--- /dev/null
+++ b/node_modules/lodash/merge.js
@@ -0,0 +1,39 @@
+var baseMerge = require('./_baseMerge'),
+ createAssigner = require('./_createAssigner');
+
+/**
+ * This method is like `_.assign` except that it recursively merges own and
+ * inherited enumerable string keyed properties of source objects into the
+ * destination object. Source properties that resolve to `undefined` are
+ * skipped if a destination value exists. Array and plain object properties
+ * are merged recursively. Other objects and value types are overridden by
+ * assignment. Source objects are applied from left to right. Subsequent
+ * sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {
+ * 'a': [{ 'b': 2 }, { 'd': 4 }]
+ * };
+ *
+ * var other = {
+ * 'a': [{ 'c': 3 }, { 'e': 5 }]
+ * };
+ *
+ * _.merge(object, other);
+ * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
+ */
+var merge = createAssigner(function(object, source, srcIndex) {
+ baseMerge(object, source, srcIndex);
+});
+
+module.exports = merge;
diff --git a/node_modules/lodash/mergeWith.js b/node_modules/lodash/mergeWith.js
new file mode 100644
index 0000000..1b43a2c
--- /dev/null
+++ b/node_modules/lodash/mergeWith.js
@@ -0,0 +1,39 @@
+var baseMerge = require('./_baseMerge'),
+ createAssigner = require('./_createAssigner');
+
+/**
+ * This method is like `_.merge` except that it accepts `customizer` which
+ * is invoked to produce the merged values of the destination and source
+ * properties. If `customizer` returns `undefined`, merging is handled by the
+ * method instead. The `customizer` is invoked with six arguments:
+ * (objValue, srcValue, key, object, source, stack).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * if (_.isArray(objValue)) {
+ * return objValue.concat(srcValue);
+ * }
+ * }
+ *
+ * var object = { 'a': [1], 'b': [2] };
+ * var other = { 'a': [3], 'b': [4] };
+ *
+ * _.mergeWith(object, other, customizer);
+ * // => { 'a': [1, 3], 'b': [2, 4] }
+ */
+var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
+ baseMerge(object, source, srcIndex, customizer);
+});
+
+module.exports = mergeWith;
diff --git a/node_modules/lodash/method.js b/node_modules/lodash/method.js
new file mode 100644
index 0000000..23ec32d
--- /dev/null
+++ b/node_modules/lodash/method.js
@@ -0,0 +1,34 @@
+var baseInvoke = require('./_baseInvoke'),
+ baseRest = require('./_baseRest');
+
+/**
+ * Creates a function that invokes the method at `path` of a given object.
+ * Any additional arguments are provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': _.constant(2) } },
+ * { 'a': { 'b': _.constant(1) } }
+ * ];
+ *
+ * _.map(objects, _.method('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(objects, _.method(['a', 'b']));
+ * // => [2, 1]
+ */
+var method = baseRest(function(path, args) {
+ return function(object) {
+ return baseInvoke(object, path, args);
+ };
+});
+
+module.exports = method;
diff --git a/node_modules/lodash/methodOf.js b/node_modules/lodash/methodOf.js
new file mode 100644
index 0000000..df59b57
--- /dev/null
+++ b/node_modules/lodash/methodOf.js
@@ -0,0 +1,33 @@
+var baseInvoke = require('./_baseInvoke'),
+ baseRest = require('./_baseRest');
+
+/**
+ * The opposite of `_.method`; this method creates a function that invokes
+ * the method at a given path of `object`. Any additional arguments are
+ * provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var array = _.times(3, _.constant),
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.methodOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
+ * // => [2, 0]
+ */
+var methodOf = baseRest(function(object, args) {
+ return function(path) {
+ return baseInvoke(object, path, args);
+ };
+});
+
+module.exports = methodOf;
diff --git a/node_modules/lodash/min.js b/node_modules/lodash/min.js
new file mode 100644
index 0000000..428f571
--- /dev/null
+++ b/node_modules/lodash/min.js
@@ -0,0 +1,29 @@
+var baseExtremum = require('./_baseExtremum'),
+ baseLt = require('./_baseLt'),
+ identity = require('./identity');
+
+/**
+ * Computes the minimum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * _.min([4, 2, 8, 6]);
+ * // => 2
+ *
+ * _.min([]);
+ * // => undefined
+ */
+function min(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseLt)
+ : undefined;
+}
+
+module.exports = min;
diff --git a/node_modules/lodash/minBy.js b/node_modules/lodash/minBy.js
new file mode 100644
index 0000000..b2697e4
--- /dev/null
+++ b/node_modules/lodash/minBy.js
@@ -0,0 +1,34 @@
+var baseExtremum = require('./_baseExtremum'),
+ baseIteratee = require('./_baseIteratee'),
+ baseLt = require('./_baseLt');
+
+/**
+ * This method is like `_.min` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.minBy(objects, function(o) { return o.n; });
+ * // => { 'n': 1 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.minBy(objects, 'n');
+ * // => { 'n': 1 }
+ */
+function minBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt)
+ : undefined;
+}
+
+module.exports = minBy;
diff --git a/node_modules/lodash/mixin.js b/node_modules/lodash/mixin.js
new file mode 100644
index 0000000..6dc9674
--- /dev/null
+++ b/node_modules/lodash/mixin.js
@@ -0,0 +1,74 @@
+var arrayEach = require('./_arrayEach'),
+ arrayPush = require('./_arrayPush'),
+ baseFunctions = require('./_baseFunctions'),
+ copyArray = require('./_copyArray'),
+ isFunction = require('./isFunction'),
+ isObject = require('./isObject'),
+ keys = require('./keys');
+
+/**
+ * Adds all own enumerable string keyed function properties of a source
+ * object to the destination object. If `object` is a function, then methods
+ * are added to its prototype as well.
+ *
+ * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
+ * avoid conflicts caused by modifying the original.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Function|Object} [object=lodash] The destination object.
+ * @param {Object} source The object of functions to add.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
+ * @returns {Function|Object} Returns `object`.
+ * @example
+ *
+ * function vowels(string) {
+ * return _.filter(string, function(v) {
+ * return /[aeiou]/i.test(v);
+ * });
+ * }
+ *
+ * _.mixin({ 'vowels': vowels });
+ * _.vowels('fred');
+ * // => ['e']
+ *
+ * _('fred').vowels().value();
+ * // => ['e']
+ *
+ * _.mixin({ 'vowels': vowels }, { 'chain': false });
+ * _('fred').vowels();
+ * // => ['e']
+ */
+function mixin(object, source, options) {
+ var props = keys(source),
+ methodNames = baseFunctions(source, props);
+
+ var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
+ isFunc = isFunction(object);
+
+ arrayEach(methodNames, function(methodName) {
+ var func = source[methodName];
+ object[methodName] = func;
+ if (isFunc) {
+ object.prototype[methodName] = function() {
+ var chainAll = this.__chain__;
+ if (chain || chainAll) {
+ var result = object(this.__wrapped__),
+ actions = result.__actions__ = copyArray(this.__actions__);
+
+ actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+ result.__chain__ = chainAll;
+ return result;
+ }
+ return func.apply(object, arrayPush([this.value()], arguments));
+ };
+ }
+ });
+
+ return object;
+}
+
+module.exports = mixin;
diff --git a/node_modules/lodash/multiply.js b/node_modules/lodash/multiply.js
new file mode 100644
index 0000000..d7876e1
--- /dev/null
+++ b/node_modules/lodash/multiply.js
@@ -0,0 +1,22 @@
+var createMathOperation = require('./_createMathOperation');
+
+/**
+ * Multiply two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} multiplier The first number in a multiplication.
+ * @param {number} multiplicand The second number in a multiplication.
+ * @returns {number} Returns the product.
+ * @example
+ *
+ * _.multiply(6, 4);
+ * // => 24
+ */
+var multiply = createMathOperation(function(multiplier, multiplicand) {
+ return multiplier * multiplicand;
+}, 1);
+
+module.exports = multiply;
diff --git a/node_modules/lodash/negate.js b/node_modules/lodash/negate.js
new file mode 100644
index 0000000..5a65cd1
--- /dev/null
+++ b/node_modules/lodash/negate.js
@@ -0,0 +1,40 @@
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that negates the result of the predicate `func`. The
+ * `func` predicate is invoked with the `this` binding and arguments of the
+ * created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} predicate The predicate to negate.
+ * @returns {Function} Returns the new negated function.
+ * @example
+ *
+ * function isEven(n) {
+ * return n % 2 == 0;
+ * }
+ *
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+ * // => [1, 3, 5]
+ */
+function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ var args = arguments;
+ switch (args.length) {
+ case 0: return !predicate.call(this);
+ case 1: return !predicate.call(this, args[0]);
+ case 2: return !predicate.call(this, args[0], args[1]);
+ case 3: return !predicate.call(this, args[0], args[1], args[2]);
+ }
+ return !predicate.apply(this, args);
+ };
+}
+
+module.exports = negate;
diff --git a/node_modules/lodash/next.js b/node_modules/lodash/next.js
new file mode 100644
index 0000000..55f949c
--- /dev/null
+++ b/node_modules/lodash/next.js
@@ -0,0 +1,35 @@
+var toArray = require('./toArray');
+
+/**
+ * Gets the next value on a wrapped object following the
+ * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
+ *
+ * @name next
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the next iterator value.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 1 }
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 2 }
+ *
+ * wrapped.next();
+ * // => { 'done': true, 'value': undefined }
+ */
+function wrapperNext() {
+ if (this.__values__ === undefined) {
+ this.__values__ = toArray(this.value());
+ }
+ var done = this.__index__ >= this.__values__.length,
+ value = done ? undefined : this.__values__[this.__index__++];
+
+ return { 'done': done, 'value': value };
+}
+
+module.exports = wrapperNext;
diff --git a/node_modules/lodash/noop.js b/node_modules/lodash/noop.js
new file mode 100644
index 0000000..3c0862e
--- /dev/null
+++ b/node_modules/lodash/noop.js
@@ -0,0 +1,17 @@
+/**
+ * This method returns `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * _.times(2, _.noop);
+ * // => [undefined, undefined]
+ */
+function noop() {
+ // No operation performed.
+}
+
+module.exports = noop;
diff --git a/node_modules/lodash/now.js b/node_modules/lodash/now.js
new file mode 100644
index 0000000..44a0562
--- /dev/null
+++ b/node_modules/lodash/now.js
@@ -0,0 +1,23 @@
+var root = require('./_root');
+
+/**
+ * Gets the timestamp of the number of milliseconds that have elapsed since
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Date
+ * @returns {number} Returns the timestamp.
+ * @example
+ *
+ * _.defer(function(stamp) {
+ * console.log(_.now() - stamp);
+ * }, _.now());
+ * // => Logs the number of milliseconds it took for the deferred invocation.
+ */
+var now = function() {
+ return root.Date.now();
+};
+
+module.exports = now;
diff --git a/node_modules/lodash/nth.js b/node_modules/lodash/nth.js
new file mode 100644
index 0000000..8a344de
--- /dev/null
+++ b/node_modules/lodash/nth.js
@@ -0,0 +1,29 @@
+var baseNth = require('./_baseNth'),
+ toInteger = require('./toInteger');
+
+/**
+ * Gets the element at index `n` of `array`. If `n` is negative, the nth
+ * element from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.11.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=0] The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ *
+ * _.nth(array, 1);
+ * // => 'b'
+ *
+ * _.nth(array, -2);
+ * // => 'c';
+ */
+function nth(array, n) {
+ return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
+}
+
+module.exports = nth;
diff --git a/node_modules/lodash/nthArg.js b/node_modules/lodash/nthArg.js
new file mode 100644
index 0000000..09406dd
--- /dev/null
+++ b/node_modules/lodash/nthArg.js
@@ -0,0 +1,32 @@
+var baseNth = require('./_baseNth'),
+ baseRest = require('./_baseRest'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a function that gets the argument at index `n`. If `n` is negative,
+ * the nth argument from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [n=0] The index of the argument to return.
+ * @returns {Function} Returns the new pass-thru function.
+ * @example
+ *
+ * var func = _.nthArg(1);
+ * func('a', 'b', 'c', 'd');
+ * // => 'b'
+ *
+ * var func = _.nthArg(-2);
+ * func('a', 'b', 'c', 'd');
+ * // => 'c'
+ */
+function nthArg(n) {
+ n = toInteger(n);
+ return baseRest(function(args) {
+ return baseNth(args, n);
+ });
+}
+
+module.exports = nthArg;
diff --git a/node_modules/lodash/number.js b/node_modules/lodash/number.js
new file mode 100644
index 0000000..c3b0100
--- /dev/null
+++ b/node_modules/lodash/number.js
@@ -0,0 +1,5 @@
+module.exports = {
+ 'clamp': require('./clamp'),
+ 'inRange': require('./inRange'),
+ 'random': require('./random')
+};
diff --git a/node_modules/lodash/object.js b/node_modules/lodash/object.js
new file mode 100644
index 0000000..f046b05
--- /dev/null
+++ b/node_modules/lodash/object.js
@@ -0,0 +1,49 @@
+module.exports = {
+ 'assign': require('./assign'),
+ 'assignIn': require('./assignIn'),
+ 'assignInWith': require('./assignInWith'),
+ 'assignWith': require('./assignWith'),
+ 'at': require('./at'),
+ 'create': require('./create'),
+ 'defaults': require('./defaults'),
+ 'defaultsDeep': require('./defaultsDeep'),
+ 'entries': require('./entries'),
+ 'entriesIn': require('./entriesIn'),
+ 'extend': require('./extend'),
+ 'extendWith': require('./extendWith'),
+ 'findKey': require('./findKey'),
+ 'findLastKey': require('./findLastKey'),
+ 'forIn': require('./forIn'),
+ 'forInRight': require('./forInRight'),
+ 'forOwn': require('./forOwn'),
+ 'forOwnRight': require('./forOwnRight'),
+ 'functions': require('./functions'),
+ 'functionsIn': require('./functionsIn'),
+ 'get': require('./get'),
+ 'has': require('./has'),
+ 'hasIn': require('./hasIn'),
+ 'invert': require('./invert'),
+ 'invertBy': require('./invertBy'),
+ 'invoke': require('./invoke'),
+ 'keys': require('./keys'),
+ 'keysIn': require('./keysIn'),
+ 'mapKeys': require('./mapKeys'),
+ 'mapValues': require('./mapValues'),
+ 'merge': require('./merge'),
+ 'mergeWith': require('./mergeWith'),
+ 'omit': require('./omit'),
+ 'omitBy': require('./omitBy'),
+ 'pick': require('./pick'),
+ 'pickBy': require('./pickBy'),
+ 'result': require('./result'),
+ 'set': require('./set'),
+ 'setWith': require('./setWith'),
+ 'toPairs': require('./toPairs'),
+ 'toPairsIn': require('./toPairsIn'),
+ 'transform': require('./transform'),
+ 'unset': require('./unset'),
+ 'update': require('./update'),
+ 'updateWith': require('./updateWith'),
+ 'values': require('./values'),
+ 'valuesIn': require('./valuesIn')
+};
diff --git a/node_modules/lodash/omit.js b/node_modules/lodash/omit.js
new file mode 100644
index 0000000..97f5f54
--- /dev/null
+++ b/node_modules/lodash/omit.js
@@ -0,0 +1,57 @@
+var arrayMap = require('./_arrayMap'),
+ baseClone = require('./_baseClone'),
+ baseUnset = require('./_baseUnset'),
+ castPath = require('./_castPath'),
+ copyObject = require('./_copyObject'),
+ customOmitClone = require('./_customOmitClone'),
+ flatRest = require('./_flatRest'),
+ getAllKeysIn = require('./_getAllKeysIn');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1,
+ CLONE_FLAT_FLAG = 2,
+ CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * The opposite of `_.pick`; this method creates an object composed of the
+ * own and inherited enumerable property paths of `object` that are not omitted.
+ *
+ * **Note:** This method is considerably slower than `_.pick`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to omit.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omit(object, ['a', 'c']);
+ * // => { 'b': '2' }
+ */
+var omit = flatRest(function(object, paths) {
+ var result = {};
+ if (object == null) {
+ return result;
+ }
+ var isDeep = false;
+ paths = arrayMap(paths, function(path) {
+ path = castPath(path, object);
+ isDeep || (isDeep = path.length > 1);
+ return path;
+ });
+ copyObject(object, getAllKeysIn(object), result);
+ if (isDeep) {
+ result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
+ }
+ var length = paths.length;
+ while (length--) {
+ baseUnset(result, paths[length]);
+ }
+ return result;
+});
+
+module.exports = omit;
diff --git a/node_modules/lodash/omitBy.js b/node_modules/lodash/omitBy.js
new file mode 100644
index 0000000..a064036
--- /dev/null
+++ b/node_modules/lodash/omitBy.js
@@ -0,0 +1,29 @@
+var baseIteratee = require('./_baseIteratee'),
+ negate = require('./negate'),
+ pickBy = require('./pickBy');
+
+/**
+ * The opposite of `_.pickBy`; this method creates an object composed of
+ * the own and inherited enumerable string keyed properties of `object` that
+ * `predicate` doesn't return truthy for. The predicate is invoked with two
+ * arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function} [predicate=_.identity] The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omitBy(object, _.isNumber);
+ * // => { 'b': '2' }
+ */
+function omitBy(object, predicate) {
+ return pickBy(object, negate(baseIteratee(predicate)));
+}
+
+module.exports = omitBy;
diff --git a/node_modules/lodash/once.js b/node_modules/lodash/once.js
new file mode 100644
index 0000000..0706fc3
--- /dev/null
+++ b/node_modules/lodash/once.js
@@ -0,0 +1,25 @@
+var before = require('./before');
+
+/**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // => `createApplication` is invoked once
+ */
+function once(func) {
+ return before(2, func);
+}
+
+module.exports = once;
diff --git a/node_modules/lodash/orderBy.js b/node_modules/lodash/orderBy.js
new file mode 100644
index 0000000..7195c8c
--- /dev/null
+++ b/node_modules/lodash/orderBy.js
@@ -0,0 +1,47 @@
+var baseOrderBy = require('./_baseOrderBy'),
+ isArray = require('./isArray');
+
+/**
+ * This method is like `_.sortBy` except that it allows specifying the sort
+ * orders of the iteratees to sort by. If `orders` is unspecified, all values
+ * are sorted in ascending order. Otherwise, specify an order of "desc" for
+ * descending or "asc" for ascending sort order of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @param {string[]} [orders] The sort orders of `iteratees`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 34 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'barney', 'age': 36 }
+ * ];
+ *
+ * // Sort by `user` in ascending order and by `age` in descending order.
+ * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ */
+function orderBy(collection, iteratees, orders, guard) {
+ if (collection == null) {
+ return [];
+ }
+ if (!isArray(iteratees)) {
+ iteratees = iteratees == null ? [] : [iteratees];
+ }
+ orders = guard ? undefined : orders;
+ if (!isArray(orders)) {
+ orders = orders == null ? [] : [orders];
+ }
+ return baseOrderBy(collection, iteratees, orders);
+}
+
+module.exports = orderBy;
diff --git a/node_modules/lodash/over.js b/node_modules/lodash/over.js
new file mode 100644
index 0000000..bea2f91
--- /dev/null
+++ b/node_modules/lodash/over.js
@@ -0,0 +1,24 @@
+var arrayMap = require('./_arrayMap'),
+ createOver = require('./_createOver');
+
+/**
+ * Creates a function that invokes `iteratees` with the arguments it receives
+ * and returns their results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to invoke.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.over([Math.max, Math.min]);
+ *
+ * func(1, 2, 3, 4);
+ * // => [4, 1]
+ */
+var over = createOver(arrayMap);
+
+module.exports = over;
diff --git a/node_modules/lodash/overArgs.js b/node_modules/lodash/overArgs.js
new file mode 100644
index 0000000..f0067db
--- /dev/null
+++ b/node_modules/lodash/overArgs.js
@@ -0,0 +1,61 @@
+var apply = require('./_apply'),
+ arrayMap = require('./_arrayMap'),
+ baseFlatten = require('./_baseFlatten'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ baseUnary = require('./_baseUnary'),
+ castRest = require('./_castRest'),
+ isArray = require('./isArray');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Creates a function that invokes `func` with its arguments transformed.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to wrap.
+ * @param {...(Function|Function[])} [transforms=[_.identity]]
+ * The argument transforms.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function doubled(n) {
+ * return n * 2;
+ * }
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var func = _.overArgs(function(x, y) {
+ * return [x, y];
+ * }, [square, doubled]);
+ *
+ * func(9, 3);
+ * // => [81, 6]
+ *
+ * func(10, 5);
+ * // => [100, 10]
+ */
+var overArgs = castRest(function(func, transforms) {
+ transforms = (transforms.length == 1 && isArray(transforms[0]))
+ ? arrayMap(transforms[0], baseUnary(baseIteratee))
+ : arrayMap(baseFlatten(transforms, 1), baseUnary(baseIteratee));
+
+ var funcsLength = transforms.length;
+ return baseRest(function(args) {
+ var index = -1,
+ length = nativeMin(args.length, funcsLength);
+
+ while (++index < length) {
+ args[index] = transforms[index].call(this, args[index]);
+ }
+ return apply(func, this, args);
+ });
+});
+
+module.exports = overArgs;
diff --git a/node_modules/lodash/overEvery.js b/node_modules/lodash/overEvery.js
new file mode 100644
index 0000000..fb19d13
--- /dev/null
+++ b/node_modules/lodash/overEvery.js
@@ -0,0 +1,34 @@
+var arrayEvery = require('./_arrayEvery'),
+ createOver = require('./_createOver');
+
+/**
+ * Creates a function that checks if **all** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * Following shorthands are possible for providing predicates.
+ * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
+ * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overEvery([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => false
+ *
+ * func(NaN);
+ * // => false
+ */
+var overEvery = createOver(arrayEvery);
+
+module.exports = overEvery;
diff --git a/node_modules/lodash/overSome.js b/node_modules/lodash/overSome.js
new file mode 100644
index 0000000..414ab66
--- /dev/null
+++ b/node_modules/lodash/overSome.js
@@ -0,0 +1,37 @@
+var arraySome = require('./_arraySome'),
+ createOver = require('./_createOver');
+
+/**
+ * Creates a function that checks if **any** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * Following shorthands are possible for providing predicates.
+ * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
+ * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overSome([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => true
+ *
+ * func(NaN);
+ * // => false
+ *
+ * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
+ * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
+ */
+var overSome = createOver(arraySome);
+
+module.exports = overSome;
diff --git a/node_modules/lodash/package.json b/node_modules/lodash/package.json
new file mode 100644
index 0000000..b35fd95
--- /dev/null
+++ b/node_modules/lodash/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash",
+ "version": "4.17.21",
+ "description": "Lodash modular utilities.",
+ "keywords": "modules, stdlib, util",
+ "homepage": "https://lodash.com/",
+ "repository": "lodash/lodash",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "main": "lodash.js",
+ "author": "John-David Dalton <john.david.dalton@gmail.com>",
+ "contributors": [
+ "John-David Dalton <john.david.dalton@gmail.com>",
+ "Mathias Bynens <mathias@qiwi.be>"
+ ],
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\"" }
+}
diff --git a/node_modules/lodash/pad.js b/node_modules/lodash/pad.js
new file mode 100644
index 0000000..77e1f1c
--- /dev/null
+++ b/node_modules/lodash/pad.js
@@ -0,0 +1,49 @@
+var createPadding = require('./_createPadding'),
+ stringSize = require('./_stringSize'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeCeil = Math.ceil,
+ nativeFloor = Math.floor;
+
+/**
+ * Pads `string` on the left and right sides if it's shorter than `length`.
+ * Padding characters are truncated if they can't be evenly divided by `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.pad('abc', 8);
+ * // => ' abc '
+ *
+ * _.pad('abc', 8, '_-');
+ * // => '_-abc_-_'
+ *
+ * _.pad('abc', 3);
+ * // => 'abc'
+ */
+function pad(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ if (!length || strLength >= length) {
+ return string;
+ }
+ var mid = (length - strLength) / 2;
+ return (
+ createPadding(nativeFloor(mid), chars) +
+ string +
+ createPadding(nativeCeil(mid), chars)
+ );
+}
+
+module.exports = pad;
diff --git a/node_modules/lodash/padEnd.js b/node_modules/lodash/padEnd.js
new file mode 100644
index 0000000..224eb80
--- /dev/null
+++ b/node_modules/lodash/padEnd.js
@@ -0,0 +1,39 @@
+var createPadding = require('./_createPadding'),
+ stringSize = require('./_stringSize'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * Pads `string` on the right side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padEnd('abc', 6);
+ * // => 'abc '
+ *
+ * _.padEnd('abc', 6, '_-');
+ * // => 'abc_-_'
+ *
+ * _.padEnd('abc', 3);
+ * // => 'abc'
+ */
+function padEnd(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (string + createPadding(length - strLength, chars))
+ : string;
+}
+
+module.exports = padEnd;
diff --git a/node_modules/lodash/padStart.js b/node_modules/lodash/padStart.js
new file mode 100644
index 0000000..f991866
--- /dev/null
+++ b/node_modules/lodash/padStart.js
@@ -0,0 +1,39 @@
+var createPadding = require('./_createPadding'),
+ stringSize = require('./_stringSize'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * Pads `string` on the left side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padStart('abc', 6);
+ * // => ' abc'
+ *
+ * _.padStart('abc', 6, '_-');
+ * // => '_-_abc'
+ *
+ * _.padStart('abc', 3);
+ * // => 'abc'
+ */
+function padStart(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (createPadding(length - strLength, chars) + string)
+ : string;
+}
+
+module.exports = padStart;
diff --git a/node_modules/lodash/parseInt.js b/node_modules/lodash/parseInt.js
new file mode 100644
index 0000000..b89ac63
--- /dev/null
+++ b/node_modules/lodash/parseInt.js
@@ -0,0 +1,43 @@
+var root = require('./_root'),
+ toString = require('./toString');
+
+/** Used to match leading whitespace. */
+var reTrimStart = /^\s+/;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeParseInt = root.parseInt;
+
+/**
+ * Converts `string` to an integer of the specified radix. If `radix` is
+ * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
+ * hexadecimal, in which case a `radix` of `16` is used.
+ *
+ * **Note:** This method aligns with the
+ * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category String
+ * @param {string} string The string to convert.
+ * @param {number} [radix=10] The radix to interpret `value` by.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.parseInt('08');
+ * // => 8
+ *
+ * _.map(['6', '08', '10'], _.parseInt);
+ * // => [6, 8, 10]
+ */
+function parseInt(string, radix, guard) {
+ if (guard || radix == null) {
+ radix = 0;
+ } else if (radix) {
+ radix = +radix;
+ }
+ return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
+}
+
+module.exports = parseInt;
diff --git a/node_modules/lodash/partial.js b/node_modules/lodash/partial.js
new file mode 100644
index 0000000..05fe8d3
--- /dev/null
+++ b/node_modules/lodash/partial.js
@@ -0,0 +1,50 @@
+var baseRest = require('./_baseRest'),
+ createWrap = require('./_createWrap'),
+ getHolder = require('./_getHolder'),
+ replaceHolders = require('./_replaceHolders');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_PARTIAL_FLAG = 32;
+
+/**
+ * Creates a function that invokes `func` with `partials` prepended to the
+ * arguments it receives. This method is like `_.bind` except it does **not**
+ * alter the `this` binding.
+ *
+ * The `_.partial.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.2.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * function greet(greeting, name) {
+ * return greeting + ' ' + name;
+ * }
+ *
+ * var sayHelloTo = _.partial(greet, 'hello');
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ *
+ * // Partially applied with placeholders.
+ * var greetFred = _.partial(greet, _, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ */
+var partial = baseRest(function(func, partials) {
+ var holders = replaceHolders(partials, getHolder(partial));
+ return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
+});
+
+// Assign default placeholders.
+partial.placeholder = {};
+
+module.exports = partial;
diff --git a/node_modules/lodash/partialRight.js b/node_modules/lodash/partialRight.js
new file mode 100644
index 0000000..eee031f
--- /dev/null
+++ b/node_modules/lodash/partialRight.js
@@ -0,0 +1,49 @@
+var baseRest = require('./_baseRest'),
+ createWrap = require('./_createWrap'),
+ getHolder = require('./_getHolder'),
+ replaceHolders = require('./_replaceHolders');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_PARTIAL_RIGHT_FLAG = 64;
+
+/**
+ * This method is like `_.partial` except that partially applied arguments
+ * are appended to the arguments it receives.
+ *
+ * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * function greet(greeting, name) {
+ * return greeting + ' ' + name;
+ * }
+ *
+ * var greetFred = _.partialRight(greet, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ *
+ * // Partially applied with placeholders.
+ * var sayHelloTo = _.partialRight(greet, 'hello', _);
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ */
+var partialRight = baseRest(function(func, partials) {
+ var holders = replaceHolders(partials, getHolder(partialRight));
+ return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
+});
+
+// Assign default placeholders.
+partialRight.placeholder = {};
+
+module.exports = partialRight;
diff --git a/node_modules/lodash/partition.js b/node_modules/lodash/partition.js
new file mode 100644
index 0000000..6b814a9
--- /dev/null
+++ b/node_modules/lodash/partition.js
@@ -0,0 +1,43 @@
+var createAggregator = require('./_createAggregator');
+
+/**
+ * Creates an array of elements split into two groups, the first of which
+ * contains elements `predicate` returns truthy for, the second of which
+ * contains elements `predicate` returns falsey for. The predicate is
+ * invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of grouped elements.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true },
+ * { 'user': 'pebbles', 'age': 1, 'active': false }
+ * ];
+ *
+ * _.partition(users, function(o) { return o.active; });
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.partition(users, { 'age': 1, 'active': false });
+ * // => objects for [['pebbles'], ['barney', 'fred']]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.partition(users, ['active', false]);
+ * // => objects for [['barney', 'pebbles'], ['fred']]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.partition(users, 'active');
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ */
+var partition = createAggregator(function(result, value, key) {
+ result[key ? 0 : 1].push(value);
+}, function() { return [[], []]; });
+
+module.exports = partition;
diff --git a/node_modules/lodash/pick.js b/node_modules/lodash/pick.js
new file mode 100644
index 0000000..3160199
--- /dev/null
+++ b/node_modules/lodash/pick.js
@@ -0,0 +1,25 @@
+var basePick = require('./_basePick'),
+ flatRest = require('./_flatRest');
+
+/**
+ * Creates an object composed of the picked `object` properties.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
+ */
+var pick = flatRest(function(object, paths) {
+ return object == null ? {} : basePick(object, paths);
+});
+
+module.exports = pick;
diff --git a/node_modules/lodash/pickBy.js b/node_modules/lodash/pickBy.js
new file mode 100644
index 0000000..ae7c271
--- /dev/null
+++ b/node_modules/lodash/pickBy.js
@@ -0,0 +1,37 @@
+var arrayMap = require('./_arrayMap'),
+ baseIteratee = require('./_baseIteratee'),
+ basePickBy = require('./_basePickBy'),
+ getAllKeysIn = require('./_getAllKeysIn');
+
+/**
+ * Creates an object composed of the `object` properties `predicate` returns
+ * truthy for. The predicate is invoked with two arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function} [predicate=_.identity] The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pickBy(object, _.isNumber);
+ * // => { 'a': 1, 'c': 3 }
+ */
+function pickBy(object, predicate) {
+ if (object == null) {
+ return {};
+ }
+ var props = arrayMap(getAllKeysIn(object), function(prop) {
+ return [prop];
+ });
+ predicate = baseIteratee(predicate);
+ return basePickBy(object, props, function(value, path) {
+ return predicate(value, path[0]);
+ });
+}
+
+module.exports = pickBy;
diff --git a/node_modules/lodash/plant.js b/node_modules/lodash/plant.js
new file mode 100644
index 0000000..23776f3
--- /dev/null
+++ b/node_modules/lodash/plant.js
@@ -0,0 +1,48 @@
+var baseLodash = require('./_baseLodash'),
+ wrapperClone = require('./_wrapperClone');
+
+/**
+ * Creates a clone of the chain sequence planting `value` as the wrapped value.
+ *
+ * @name plant
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @param {*} value The value to plant.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2]).map(square);
+ * var other = wrapped.plant([3, 4]);
+ *
+ * other.value();
+ * // => [9, 16]
+ *
+ * wrapped.value();
+ * // => [1, 4]
+ */
+function wrapperPlant(value) {
+ var result,
+ parent = this;
+
+ while (parent instanceof baseLodash) {
+ var clone = wrapperClone(parent);
+ clone.__index__ = 0;
+ clone.__values__ = undefined;
+ if (result) {
+ previous.__wrapped__ = clone;
+ } else {
+ result = clone;
+ }
+ var previous = clone;
+ parent = parent.__wrapped__;
+ }
+ previous.__wrapped__ = value;
+ return result;
+}
+
+module.exports = wrapperPlant;
diff --git a/node_modules/lodash/property.js b/node_modules/lodash/property.js
new file mode 100644
index 0000000..ca8202f
--- /dev/null
+++ b/node_modules/lodash/property.js
@@ -0,0 +1,32 @@
+var baseProperty = require('./_baseProperty'),
+ basePropertyDeep = require('./_basePropertyDeep'),
+ isKey = require('./_isKey'),
+ toKey = require('./_toKey');
+
+/**
+ * Creates a function that returns the value at `path` of a given object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': 2 } },
+ * { 'a': { 'b': 1 } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
+ * // => [1, 2]
+ */
+function property(path) {
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
+}
+
+module.exports = property;
diff --git a/node_modules/lodash/propertyOf.js b/node_modules/lodash/propertyOf.js
new file mode 100644
index 0000000..384044d
--- /dev/null
+++ b/node_modules/lodash/propertyOf.js
@@ -0,0 +1,30 @@
+var baseGet = require('./_baseGet');
+
+/**
+ * The opposite of `_.property`; this method creates a function that returns
+ * the value at a given path of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var array = [0, 1, 2],
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
+ * // => [2, 0]
+ */
+function propertyOf(object) {
+ return function(path) {
+ return object == null ? undefined : baseGet(object, path);
+ };
+}
+
+module.exports = propertyOf;
diff --git a/node_modules/lodash/pull.js b/node_modules/lodash/pull.js
new file mode 100644
index 0000000..a2efcb5
--- /dev/null
+++ b/node_modules/lodash/pull.js
@@ -0,0 +1,29 @@
+var baseRest = require('./_baseRest'),
+ pullAll = require('./pullAll');
+
+/**
+ * Removes all given values from `array` using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
+ * to remove elements from an array by predicate.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...*} [values] The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+ *
+ * _.pull(array, 'a', 'c');
+ * console.log(array);
+ * // => ['b', 'b']
+ */
+var pull = baseRest(pullAll);
+
+module.exports = pull;
diff --git a/node_modules/lodash/pullAll.js b/node_modules/lodash/pullAll.js
new file mode 100644
index 0000000..f4605c2
--- /dev/null
+++ b/node_modules/lodash/pullAll.js
@@ -0,0 +1,29 @@
+var basePullAll = require('./_basePullAll');
+
+/**
+ * This method is like `_.pull` except that it accepts an array of values to remove.
+ *
+ * **Note:** Unlike `_.difference`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+ *
+ * _.pullAll(array, ['a', 'c']);
+ * console.log(array);
+ * // => ['b', 'b']
+ */
+function pullAll(array, values) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values)
+ : array;
+}
+
+module.exports = pullAll;
diff --git a/node_modules/lodash/pullAllBy.js b/node_modules/lodash/pullAllBy.js
new file mode 100644
index 0000000..74025e8
--- /dev/null
+++ b/node_modules/lodash/pullAllBy.js
@@ -0,0 +1,33 @@
+var baseIteratee = require('./_baseIteratee'),
+ basePullAll = require('./_basePullAll');
+
+/**
+ * This method is like `_.pullAll` except that it accepts `iteratee` which is
+ * invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The iteratee is invoked with one argument: (value).
+ *
+ * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
+ *
+ * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
+ * console.log(array);
+ * // => [{ 'x': 2 }]
+ */
+function pullAllBy(array, values, iteratee) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, baseIteratee(iteratee, 2))
+ : array;
+}
+
+module.exports = pullAllBy;
diff --git a/node_modules/lodash/pullAllWith.js b/node_modules/lodash/pullAllWith.js
new file mode 100644
index 0000000..1d2fd9f
--- /dev/null
+++ b/node_modules/lodash/pullAllWith.js
@@ -0,0 +1,32 @@
+var basePullAll = require('./_basePullAll');
+
+/**
+ * This method is like `_.pullAll` except that it accepts `comparator` which
+ * is invoked to compare elements of `array` to `values`. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
+ *
+ * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
+ * console.log(array);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
+ */
+function pullAllWith(array, values, comparator) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, undefined, comparator)
+ : array;
+}
+
+module.exports = pullAllWith;
diff --git a/node_modules/lodash/pullAt.js b/node_modules/lodash/pullAt.js
new file mode 100644
index 0000000..6ed84e0
--- /dev/null
+++ b/node_modules/lodash/pullAt.js
@@ -0,0 +1,43 @@
+var arrayMap = require('./_arrayMap'),
+ baseAt = require('./_baseAt'),
+ basePullAt = require('./_basePullAt'),
+ compareAscending = require('./_compareAscending'),
+ flatRest = require('./_flatRest'),
+ isIndex = require('./_isIndex');
+
+/**
+ * Removes elements from `array` corresponding to `indexes` and returns an
+ * array of removed elements.
+ *
+ * **Note:** Unlike `_.at`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...(number|number[])} [indexes] The indexes of elements to remove.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ * var pulled = _.pullAt(array, [1, 3]);
+ *
+ * console.log(array);
+ * // => ['a', 'c']
+ *
+ * console.log(pulled);
+ * // => ['b', 'd']
+ */
+var pullAt = flatRest(function(array, indexes) {
+ var length = array == null ? 0 : array.length,
+ result = baseAt(array, indexes);
+
+ basePullAt(array, arrayMap(indexes, function(index) {
+ return isIndex(index, length) ? +index : index;
+ }).sort(compareAscending));
+
+ return result;
+});
+
+module.exports = pullAt;
diff --git a/node_modules/lodash/random.js b/node_modules/lodash/random.js
new file mode 100644
index 0000000..8067711
--- /dev/null
+++ b/node_modules/lodash/random.js
@@ -0,0 +1,82 @@
+var baseRandom = require('./_baseRandom'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toFinite = require('./toFinite');
+
+/** Built-in method references without a dependency on `root`. */
+var freeParseFloat = parseFloat;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min,
+ nativeRandom = Math.random;
+
+/**
+ * Produces a random number between the inclusive `lower` and `upper` bounds.
+ * If only one argument is provided a number between `0` and the given number
+ * is returned. If `floating` is `true`, or either `lower` or `upper` are
+ * floats, a floating-point number is returned instead of an integer.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Number
+ * @param {number} [lower=0] The lower bound.
+ * @param {number} [upper=1] The upper bound.
+ * @param {boolean} [floating] Specify returning a floating-point number.
+ * @returns {number} Returns the random number.
+ * @example
+ *
+ * _.random(0, 5);
+ * // => an integer between 0 and 5
+ *
+ * _.random(5);
+ * // => also an integer between 0 and 5
+ *
+ * _.random(5, true);
+ * // => a floating-point number between 0 and 5
+ *
+ * _.random(1.2, 5.2);
+ * // => a floating-point number between 1.2 and 5.2
+ */
+function random(lower, upper, floating) {
+ if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
+ upper = floating = undefined;
+ }
+ if (floating === undefined) {
+ if (typeof upper == 'boolean') {
+ floating = upper;
+ upper = undefined;
+ }
+ else if (typeof lower == 'boolean') {
+ floating = lower;
+ lower = undefined;
+ }
+ }
+ if (lower === undefined && upper === undefined) {
+ lower = 0;
+ upper = 1;
+ }
+ else {
+ lower = toFinite(lower);
+ if (upper === undefined) {
+ upper = lower;
+ lower = 0;
+ } else {
+ upper = toFinite(upper);
+ }
+ }
+ if (lower > upper) {
+ var temp = lower;
+ lower = upper;
+ upper = temp;
+ }
+ if (floating || lower % 1 || upper % 1) {
+ var rand = nativeRandom();
+ return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
+ }
+ return baseRandom(lower, upper);
+}
+
+module.exports = random;
diff --git a/node_modules/lodash/range.js b/node_modules/lodash/range.js
new file mode 100644
index 0000000..fa63b09
--- /dev/null
+++ b/node_modules/lodash/range.js
@@ -0,0 +1,46 @@
+var createRange = require('./_createRange');
+
+/**
+ * Creates an array of numbers (positive and/or negative) progressing from
+ * `start` up to, but not including, `end`. A step of `-1` is used if a negative
+ * `start` is specified without an `end` or `step`. If `end` is not specified,
+ * it's set to `start` with `start` then set to `0`.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.rangeRight
+ * @example
+ *
+ * _.range(4);
+ * // => [0, 1, 2, 3]
+ *
+ * _.range(-4);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 5);
+ * // => [1, 2, 3, 4]
+ *
+ * _.range(0, 20, 5);
+ * // => [0, 5, 10, 15]
+ *
+ * _.range(0, -4, -1);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.range(0);
+ * // => []
+ */
+var range = createRange();
+
+module.exports = range;
diff --git a/node_modules/lodash/rangeRight.js b/node_modules/lodash/rangeRight.js
new file mode 100644
index 0000000..271fafc
--- /dev/null
+++ b/node_modules/lodash/rangeRight.js
@@ -0,0 +1,41 @@
+var createRange = require('./_createRange');
+
+/**
+ * This method is like `_.range` except that it populates values in
+ * descending order.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.range
+ * @example
+ *
+ * _.rangeRight(4);
+ * // => [3, 2, 1, 0]
+ *
+ * _.rangeRight(-4);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 5);
+ * // => [4, 3, 2, 1]
+ *
+ * _.rangeRight(0, 20, 5);
+ * // => [15, 10, 5, 0]
+ *
+ * _.rangeRight(0, -4, -1);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.rangeRight(0);
+ * // => []
+ */
+var rangeRight = createRange(true);
+
+module.exports = rangeRight;
diff --git a/node_modules/lodash/rearg.js b/node_modules/lodash/rearg.js
new file mode 100644
index 0000000..a3e1970
--- /dev/null
+++ b/node_modules/lodash/rearg.js
@@ -0,0 +1,33 @@
+var createWrap = require('./_createWrap'),
+ flatRest = require('./_flatRest');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_REARG_FLAG = 256;
+
+/**
+ * Creates a function that invokes `func` with arguments arranged according
+ * to the specified `indexes` where the argument value at the first index is
+ * provided as the first argument, the argument value at the second index is
+ * provided as the second argument, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to rearrange arguments for.
+ * @param {...(number|number[])} indexes The arranged argument indexes.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var rearged = _.rearg(function(a, b, c) {
+ * return [a, b, c];
+ * }, [2, 0, 1]);
+ *
+ * rearged('b', 'c', 'a')
+ * // => ['a', 'b', 'c']
+ */
+var rearg = flatRest(function(func, indexes) {
+ return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
+});
+
+module.exports = rearg;
diff --git a/node_modules/lodash/reduce.js b/node_modules/lodash/reduce.js
new file mode 100644
index 0000000..5a1df4d
--- /dev/null
+++ b/node_modules/lodash/reduce.js
@@ -0,0 +1,51 @@
+var arrayReduce = require('./_arrayReduce'),
+ baseEach = require('./_baseEach'),
+ baseIteratee = require('./_baseIteratee'),
+ baseReduce = require('./_baseReduce'),
+ isArray = require('./isArray');
+
+/**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` thru `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not given, the first element of `collection` is used as the initial
+ * value. The iteratee is invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+ * and `sortBy`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduceRight
+ * @example
+ *
+ * _.reduce([1, 2], function(sum, n) {
+ * return sum + n;
+ * }, 0);
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * return result;
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+ */
+function reduce(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduce : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);
+}
+
+module.exports = reduce;
diff --git a/node_modules/lodash/reduceRight.js b/node_modules/lodash/reduceRight.js
new file mode 100644
index 0000000..e06a7cb
--- /dev/null
+++ b/node_modules/lodash/reduceRight.js
@@ -0,0 +1,36 @@
+var arrayReduceRight = require('./_arrayReduceRight'),
+ baseEachRight = require('./_baseEachRight'),
+ baseIteratee = require('./_baseIteratee'),
+ baseReduce = require('./_baseReduce'),
+ isArray = require('./isArray');
+
+/**
+ * This method is like `_.reduce` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduce
+ * @example
+ *
+ * var array = [[0, 1], [2, 3], [4, 5]];
+ *
+ * _.reduceRight(array, function(flattened, other) {
+ * return flattened.concat(other);
+ * }, []);
+ * // => [4, 5, 2, 3, 0, 1]
+ */
+function reduceRight(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduceRight : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
+}
+
+module.exports = reduceRight;
diff --git a/node_modules/lodash/reject.js b/node_modules/lodash/reject.js
new file mode 100644
index 0000000..a13e554
--- /dev/null
+++ b/node_modules/lodash/reject.js
@@ -0,0 +1,46 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseFilter = require('./_baseFilter'),
+ baseIteratee = require('./_baseIteratee'),
+ isArray = require('./isArray'),
+ negate = require('./negate');
+
+/**
+ * The opposite of `_.filter`; this method returns the elements of `collection`
+ * that `predicate` does **not** return truthy for.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.filter
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true }
+ * ];
+ *
+ * _.reject(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.reject(users, { 'age': 40, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.reject(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.reject(users, 'active');
+ * // => objects for ['barney']
+ */
+function reject(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, negate(baseIteratee(predicate, 3)));
+}
+
+module.exports = reject;
diff --git a/node_modules/lodash/release.md b/node_modules/lodash/release.md
new file mode 100644
index 0000000..465d8ff
--- /dev/null
+++ b/node_modules/lodash/release.md
@@ -0,0 +1,48 @@
+npm run build
+npm run doc
+npm i
+git clone --depth=10 --branch=master git@github.com:lodash-archive/lodash-cli.git ./node_modules/lodash-cli
+mkdir -p ./node_modules/lodash-cli/node_modules/lodash; cd $_; cp ../../../../lodash.js ./lodash.js; cp ../../../../package.json ./package.json
+cd ../../; npm i --production; cd ../../
+node ./node_modules/lodash-cli/bin/lodash core exports=node -o ./npm-package/core.js
+node ./node_modules/lodash-cli/bin/lodash modularize exports=node -o ./npm-package
+cp lodash.js npm-package/lodash.js
+cp dist/lodash.min.js npm-package/lodash.min.js
+cp LICENSE npm-package/LICENSE
+
+1. Clone two repos
+Bump lodash version in package.json, readme, package=locak, lodash.js
+npm run build
+npm run doc
+
+2. update mappings in ldoash-cli
+3. copy ldoash into lodash-cli node modules and package json.
+
+node ./node_modules/lodash-cli/bin/lodash core exports=node -o ./npm-package/core.js
+node ./node_modules/lodash-cli/bin/lodash modularize exports=node -o ./npm-package
+
+
+
+1. Clone the two repositories:
+```sh
+$ git clone https://github.com/lodash/lodash.git
+$ git clone https://github.com/bnjmnt4n/lodash-cli.git
+```
+2. Update lodash-cli to accomdate changes in lodash source. This can typically involve adding new function dependency mappings in lib/mappings.js. Sometimes, additional changes might be needed for more involved functions.
+3. In the lodash repository, update references to the lodash version in README.md, lodash.js, package.jsona nd package-lock.json
+4. Run:
+```sh
+npm run build
+npm run doc
+node ../lodash-cli/bin/lodash core -o ./dist/lodash.core.js
+```
+5. Add a commit and tag the release
+mkdir ../lodash-temp
+cp lodash.js dist/lodash.min.js dist/lodash.core.js dist/lodash.core.min.js ../lodash-temp/
+node ../lodash-cli/bin/lodash modularize exports=node -o .
+cp ../lodash-temp/lodash.core.js core.js
+cp ../lodash-temp/lodash.core.min.js core.min.js
+cp ../lodash-temp/lodash.js lodash.js
+cp ../lodash-temp/lodash.min.js lodash.min.js
+
+❯ node ../lodash-cli/bin/lodash modularize exports=es -o .
diff --git a/node_modules/lodash/remove.js b/node_modules/lodash/remove.js
new file mode 100644
index 0000000..87b1898
--- /dev/null
+++ b/node_modules/lodash/remove.js
@@ -0,0 +1,53 @@
+var baseIteratee = require('./_baseIteratee'),
+ basePullAt = require('./_basePullAt');
+
+/**
+ * Removes all elements from `array` that `predicate` returns truthy for
+ * and returns an array of the removed elements. The predicate is invoked
+ * with three arguments: (value, index, array).
+ *
+ * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
+ * to pull elements from an array by value.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = [1, 2, 3, 4];
+ * var evens = _.remove(array, function(n) {
+ * return n % 2 == 0;
+ * });
+ *
+ * console.log(array);
+ * // => [1, 3]
+ *
+ * console.log(evens);
+ * // => [2, 4]
+ */
+function remove(array, predicate) {
+ var result = [];
+ if (!(array && array.length)) {
+ return result;
+ }
+ var index = -1,
+ indexes = [],
+ length = array.length;
+
+ predicate = baseIteratee(predicate, 3);
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result.push(value);
+ indexes.push(index);
+ }
+ }
+ basePullAt(array, indexes);
+ return result;
+}
+
+module.exports = remove;
diff --git a/node_modules/lodash/repeat.js b/node_modules/lodash/repeat.js
new file mode 100644
index 0000000..f4d8c69
--- /dev/null
+++ b/node_modules/lodash/repeat.js
@@ -0,0 +1,37 @@
+var baseRepeat = require('./_baseRepeat'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * Repeats the given string `n` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to repeat.
+ * @param {number} [n=1] The number of times to repeat the string.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the repeated string.
+ * @example
+ *
+ * _.repeat('*', 3);
+ * // => '***'
+ *
+ * _.repeat('abc', 2);
+ * // => 'abcabc'
+ *
+ * _.repeat('abc', 0);
+ * // => ''
+ */
+function repeat(string, n, guard) {
+ if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ return baseRepeat(toString(string), n);
+}
+
+module.exports = repeat;
diff --git a/node_modules/lodash/replace.js b/node_modules/lodash/replace.js
new file mode 100644
index 0000000..6e26ecd
--- /dev/null
+++ b/node_modules/lodash/replace.js
@@ -0,0 +1,29 @@
+var toString = require('./toString');
+
+/**
+ * Replaces matches for `pattern` in `string` with `replacement`.
+ *
+ * **Note:** This method is based on
+ * [`String#replace`](https://mdn.io/String/replace).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to modify.
+ * @param {RegExp|string} pattern The pattern to replace.
+ * @param {Function|string} replacement The match replacement.
+ * @returns {string} Returns the modified string.
+ * @example
+ *
+ * _.replace('Hi Fred', 'Fred', 'Barney');
+ * // => 'Hi Barney'
+ */
+function replace() {
+ var args = arguments,
+ string = toString(args[0]);
+
+ return args.length < 3 ? string : string.replace(args[1], args[2]);
+}
+
+module.exports = replace;
diff --git a/node_modules/lodash/rest.js b/node_modules/lodash/rest.js
new file mode 100644
index 0000000..eaaad00
--- /dev/null
+++ b/node_modules/lodash/rest.js
@@ -0,0 +1,40 @@
+var baseRest = require('./_baseRest'),
+ toInteger = require('./toInteger');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * created function and arguments from `start` and beyond provided as
+ * an array.
+ *
+ * **Note:** This method is based on the
+ * [rest parameter](https://mdn.io/rest_parameters).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.rest(function(what, names) {
+ * return what + ' ' + _.initial(names).join(', ') +
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+ * });
+ *
+ * say('hello', 'fred', 'barney', 'pebbles');
+ * // => 'hello fred, barney, & pebbles'
+ */
+function rest(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start === undefined ? start : toInteger(start);
+ return baseRest(func, start);
+}
+
+module.exports = rest;
diff --git a/node_modules/lodash/result.js b/node_modules/lodash/result.js
new file mode 100644
index 0000000..eae1250
--- /dev/null
+++ b/node_modules/lodash/result.js
@@ -0,0 +1,56 @@
+var castPath = require('./_castPath'),
+ isFunction = require('./isFunction'),
+ toKey = require('./_toKey');
+
+/**
+ * This method is like `_.get` except that if the resolved value is a
+ * function it's invoked with the `this` binding of its parent object and
+ * its result is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+ *
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
+ *
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
+ *
+ * _.result(object, 'a[0].b.c3', 'default');
+ * // => 'default'
+ *
+ * _.result(object, 'a[0].b.c3', _.constant('default'));
+ * // => 'default'
+ */
+function result(object, path, defaultValue) {
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length;
+
+ // Ensure the loop is entered when path is empty.
+ if (!length) {
+ length = 1;
+ object = undefined;
+ }
+ while (++index < length) {
+ var value = object == null ? undefined : object[toKey(path[index])];
+ if (value === undefined) {
+ index = length;
+ value = defaultValue;
+ }
+ object = isFunction(value) ? value.call(object) : value;
+ }
+ return object;
+}
+
+module.exports = result;
diff --git a/node_modules/lodash/reverse.js b/node_modules/lodash/reverse.js
new file mode 100644
index 0000000..21764af
--- /dev/null
+++ b/node_modules/lodash/reverse.js
@@ -0,0 +1,34 @@
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeReverse = arrayProto.reverse;
+
+/**
+ * Reverses `array` so that the first element becomes the last, the second
+ * element becomes the second to last, and so on.
+ *
+ * **Note:** This method mutates `array` and is based on
+ * [`Array#reverse`](https://mdn.io/Array/reverse).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.reverse(array);
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+function reverse(array) {
+ return array == null ? array : nativeReverse.call(array);
+}
+
+module.exports = reverse;
diff --git a/node_modules/lodash/round.js b/node_modules/lodash/round.js
new file mode 100644
index 0000000..fccc831
--- /dev/null
+++ b/node_modules/lodash/round.js
@@ -0,0 +1,26 @@
+var createRound = require('./_createRound');
+
+/**
+ * Computes `number` rounded to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round.
+ * @param {number} [precision=0] The precision to round to.
+ * @returns {number} Returns the rounded number.
+ * @example
+ *
+ * _.round(4.006);
+ * // => 4
+ *
+ * _.round(4.006, 2);
+ * // => 4.01
+ *
+ * _.round(4060, -2);
+ * // => 4100
+ */
+var round = createRound('round');
+
+module.exports = round;
diff --git a/node_modules/lodash/sample.js b/node_modules/lodash/sample.js
new file mode 100644
index 0000000..39c3560
--- /dev/null
+++ b/node_modules/lodash/sample.js
@@ -0,0 +1,24 @@
+var arraySample = require('./_arraySample'),
+ baseSample = require('./_baseSample'),
+ isArray = require('./isArray');
+
+/**
+ * Gets a random element from `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ * @example
+ *
+ * _.sample([1, 2, 3, 4]);
+ * // => 2
+ */
+function sample(collection) {
+ var func = isArray(collection) ? arraySample : baseSample;
+ return func(collection);
+}
+
+module.exports = sample;
diff --git a/node_modules/lodash/sampleSize.js b/node_modules/lodash/sampleSize.js
new file mode 100644
index 0000000..a303686
--- /dev/null
+++ b/node_modules/lodash/sampleSize.js
@@ -0,0 +1,37 @@
+var arraySampleSize = require('./_arraySampleSize'),
+ baseSampleSize = require('./_baseSampleSize'),
+ isArray = require('./isArray'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toInteger = require('./toInteger');
+
+/**
+ * Gets `n` random elements at unique keys from `collection` up to the
+ * size of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} [n=1] The number of elements to sample.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the random elements.
+ * @example
+ *
+ * _.sampleSize([1, 2, 3], 2);
+ * // => [3, 1]
+ *
+ * _.sampleSize([1, 2, 3], 4);
+ * // => [2, 3, 1]
+ */
+function sampleSize(collection, n, guard) {
+ if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ var func = isArray(collection) ? arraySampleSize : baseSampleSize;
+ return func(collection, n);
+}
+
+module.exports = sampleSize;
diff --git a/node_modules/lodash/seq.js b/node_modules/lodash/seq.js
new file mode 100644
index 0000000..1570c2d
--- /dev/null
+++ b/node_modules/lodash/seq.js
@@ -0,0 +1,16 @@
+module.exports = {
+ 'at': require('./wrapperAt'),
+ 'chain': require('./chain'),
+ 'commit': require('./commit'),
+ 'lodash': require('./wrapperLodash'),
+ 'next': require('./next'),
+ 'plant': require('./plant'),
+ 'reverse': require('./wrapperReverse'),
+ 'tap': require('./tap'),
+ 'thru': require('./thru'),
+ 'toIterator': require('./toIterator'),
+ 'toJSON': require('./toJSON'),
+ 'value': require('./wrapperValue'),
+ 'valueOf': require('./valueOf'),
+ 'wrapperChain': require('./wrapperChain')
+};
diff --git a/node_modules/lodash/set.js b/node_modules/lodash/set.js
new file mode 100644
index 0000000..d663002
--- /dev/null
+++ b/node_modules/lodash/set.js
@@ -0,0 +1,35 @@
+var baseSet = require('./_baseSet');
+
+/**
+ * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
+ * it's created. Arrays are created for missing index properties while objects
+ * are created for all other missing properties. Use `_.setWith` to customize
+ * `path` creation.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.set(object, 'a[0].b.c', 4);
+ * console.log(object.a[0].b.c);
+ * // => 4
+ *
+ * _.set(object, ['x', '0', 'y', 'z'], 5);
+ * console.log(object.x[0].y.z);
+ * // => 5
+ */
+function set(object, path, value) {
+ return object == null ? object : baseSet(object, path, value);
+}
+
+module.exports = set;
diff --git a/node_modules/lodash/setWith.js b/node_modules/lodash/setWith.js
new file mode 100644
index 0000000..fb3e0f6
--- /dev/null
+++ b/node_modules/lodash/setWith.js
@@ -0,0 +1,32 @@
+var baseSet = require('./_baseSet');
+
+/**
+ * This method is like `_.set` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.setWith(object, '[0][1]', 'a', Object);
+ * // => { '0': { '1': 'a' } }
+ */
+function setWith(object, path, value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseSet(object, path, value, customizer);
+}
+
+module.exports = setWith;
diff --git a/node_modules/lodash/shuffle.js b/node_modules/lodash/shuffle.js
new file mode 100644
index 0000000..2b72da7
--- /dev/null
+++ b/node_modules/lodash/shuffle.js
@@ -0,0 +1,25 @@
+var arrayShuffle = require('./_arrayShuffle'),
+ baseShuffle = require('./_baseShuffle'),
+ isArray = require('./isArray');
+
+/**
+ * Creates an array of shuffled values, using a version of the
+ * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ * @example
+ *
+ * _.shuffle([1, 2, 3, 4]);
+ * // => [4, 1, 3, 2]
+ */
+function shuffle(collection) {
+ var func = isArray(collection) ? arrayShuffle : baseShuffle;
+ return func(collection);
+}
+
+module.exports = shuffle;
diff --git a/node_modules/lodash/size.js b/node_modules/lodash/size.js
new file mode 100644
index 0000000..3561fc1
--- /dev/null
+++ b/node_modules/lodash/size.js
@@ -0,0 +1,46 @@
+var baseKeys = require('./_baseKeys'),
+ getTag = require('./_getTag'),
+ isArrayLike = require('./isArrayLike'),
+ isString = require('./isString'),
+ stringSize = require('./_stringSize');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ setTag = '[object Set]';
+
+/**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable string keyed properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @returns {number} Returns the collection size.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+function size(collection) {
+ if (collection == null) {
+ return 0;
+ }
+ if (isArrayLike(collection)) {
+ return isString(collection) ? stringSize(collection) : collection.length;
+ }
+ var tag = getTag(collection);
+ if (tag == mapTag || tag == setTag) {
+ return collection.size;
+ }
+ return baseKeys(collection).length;
+}
+
+module.exports = size;
diff --git a/node_modules/lodash/slice.js b/node_modules/lodash/slice.js
new file mode 100644
index 0000000..f732442
--- /dev/null
+++ b/node_modules/lodash/slice.js
@@ -0,0 +1,37 @@
+var baseSlice = require('./_baseSlice'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
+ *
+ * **Note:** This method is used instead of
+ * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
+ * returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+function slice(array, start, end) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
+ start = 0;
+ end = length;
+ }
+ else {
+ start = start == null ? 0 : toInteger(start);
+ end = end === undefined ? length : toInteger(end);
+ }
+ return baseSlice(array, start, end);
+}
+
+module.exports = slice;
diff --git a/node_modules/lodash/snakeCase.js b/node_modules/lodash/snakeCase.js
new file mode 100644
index 0000000..27f2a76
--- /dev/null
+++ b/node_modules/lodash/snakeCase.js
@@ -0,0 +1,28 @@
+var createCompounder = require('./_createCompounder');
+
+/**
+ * Converts `string` to
+ * [snake case](https://en.wikipedia.org/wiki/Snake_case).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the snake cased string.
+ * @example
+ *
+ * _.snakeCase('Foo Bar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('fooBar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('--FOO-BAR--');
+ * // => 'foo_bar'
+ */
+var snakeCase = createCompounder(function(result, word, index) {
+ return result + (index ? '_' : '') + word.toLowerCase();
+});
+
+module.exports = snakeCase;
diff --git a/node_modules/lodash/some.js b/node_modules/lodash/some.js
new file mode 100644
index 0000000..9c1d08c
--- /dev/null
+++ b/node_modules/lodash/some.js
@@ -0,0 +1,51 @@
+var arraySome = require('./_arraySome'),
+ baseIteratee = require('./_baseIteratee'),
+ baseSome = require('./_baseSome'),
+ isArray = require('./isArray'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
+ * Iteration is stopped once `predicate` returns truthy. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.some([null, 0, 'yes', false], Boolean);
+ * // => true
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.some(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.some(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.some(users, 'active');
+ * // => true
+ */
+function some(collection, predicate, guard) {
+ var func = isArray(collection) ? arraySome : baseSome;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, baseIteratee(predicate, 3));
+}
+
+module.exports = some;
diff --git a/node_modules/lodash/sortBy.js b/node_modules/lodash/sortBy.js
new file mode 100644
index 0000000..d756aba
--- /dev/null
+++ b/node_modules/lodash/sortBy.js
@@ -0,0 +1,48 @@
+var baseFlatten = require('./_baseFlatten'),
+ baseOrderBy = require('./_baseOrderBy'),
+ baseRest = require('./_baseRest'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection thru each iteratee. This method
+ * performs a stable sort, that is, it preserves the original sort order of
+ * equal elements. The iteratees are invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 30 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.sortBy(users, [function(o) { return o.user; }]);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
+ *
+ * _.sortBy(users, ['user', 'age']);
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
+ */
+var sortBy = baseRest(function(collection, iteratees) {
+ if (collection == null) {
+ return [];
+ }
+ var length = iteratees.length;
+ if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
+ iteratees = [];
+ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
+ iteratees = [iteratees[0]];
+ }
+ return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
+});
+
+module.exports = sortBy;
diff --git a/node_modules/lodash/sortedIndex.js b/node_modules/lodash/sortedIndex.js
new file mode 100644
index 0000000..e763473
--- /dev/null
+++ b/node_modules/lodash/sortedIndex.js
@@ -0,0 +1,24 @@
+var baseSortedIndex = require('./_baseSortedIndex');
+
+/**
+ * Uses a binary search to determine the lowest index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedIndex([30, 50], 40);
+ * // => 1
+ */
+function sortedIndex(array, value) {
+ return baseSortedIndex(array, value);
+}
+
+module.exports = sortedIndex;
diff --git a/node_modules/lodash/sortedIndexBy.js b/node_modules/lodash/sortedIndexBy.js
new file mode 100644
index 0000000..945f23c
--- /dev/null
+++ b/node_modules/lodash/sortedIndexBy.js
@@ -0,0 +1,33 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseSortedIndexBy = require('./_baseSortedIndexBy');
+
+/**
+ * This method is like `_.sortedIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
+ *
+ * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
+ * // => 0
+ */
+function sortedIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2));
+}
+
+module.exports = sortedIndexBy;
diff --git a/node_modules/lodash/sortedIndexOf.js b/node_modules/lodash/sortedIndexOf.js
new file mode 100644
index 0000000..e2d3b7a
--- /dev/null
+++ b/node_modules/lodash/sortedIndexOf.js
@@ -0,0 +1,31 @@
+var baseSortedIndex = require('./_baseSortedIndex'),
+ eq = require('./eq');
+
+/**
+ * This method is like `_.indexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
+ * // => 1
+ */
+function sortedIndexOf(array, value) {
+ var length = array == null ? 0 : array.length;
+ if (length) {
+ var index = baseSortedIndex(array, value);
+ if (index < length && eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+module.exports = sortedIndexOf;
diff --git a/node_modules/lodash/sortedLastIndex.js b/node_modules/lodash/sortedLastIndex.js
new file mode 100644
index 0000000..9380cb9
--- /dev/null
+++ b/node_modules/lodash/sortedLastIndex.js
@@ -0,0 +1,25 @@
+var baseSortedIndex = require('./_baseSortedIndex');
+
+/**
+ * This method is like `_.sortedIndex` except that it returns the highest
+ * index at which `value` should be inserted into `array` in order to
+ * maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
+ * // => 4
+ */
+function sortedLastIndex(array, value) {
+ return baseSortedIndex(array, value, true);
+}
+
+module.exports = sortedLastIndex;
diff --git a/node_modules/lodash/sortedLastIndexBy.js b/node_modules/lodash/sortedLastIndexBy.js
new file mode 100644
index 0000000..9225eeb
--- /dev/null
+++ b/node_modules/lodash/sortedLastIndexBy.js
@@ -0,0 +1,33 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseSortedIndexBy = require('./_baseSortedIndexBy');
+
+/**
+ * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
+ *
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+ * // => 1
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
+ * // => 1
+ */
+function sortedLastIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2), true);
+}
+
+module.exports = sortedLastIndexBy;
diff --git a/node_modules/lodash/sortedLastIndexOf.js b/node_modules/lodash/sortedLastIndexOf.js
new file mode 100644
index 0000000..18bc4c5
--- /dev/null
+++ b/node_modules/lodash/sortedLastIndexOf.js
@@ -0,0 +1,31 @@
+var baseSortedIndex = require('./_baseSortedIndex'),
+ eq = require('./eq');
+
+/**
+ * This method is like `_.lastIndexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
+ * // => 3
+ */
+function sortedLastIndexOf(array, value) {
+ var length = array == null ? 0 : array.length;
+ if (length) {
+ var index = baseSortedIndex(array, value, true) - 1;
+ if (eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+module.exports = sortedLastIndexOf;
diff --git a/node_modules/lodash/sortedUniq.js b/node_modules/lodash/sortedUniq.js
new file mode 100644
index 0000000..866db31
--- /dev/null
+++ b/node_modules/lodash/sortedUniq.js
@@ -0,0 +1,24 @@
+var baseSortedUniq = require('./_baseSortedUniq');
+
+/**
+ * This method is like `_.uniq` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniq([1, 1, 2]);
+ * // => [1, 2]
+ */
+function sortedUniq(array) {
+ return (array && array.length)
+ ? baseSortedUniq(array)
+ : [];
+}
+
+module.exports = sortedUniq;
diff --git a/node_modules/lodash/sortedUniqBy.js b/node_modules/lodash/sortedUniqBy.js
new file mode 100644
index 0000000..4f05ebe
--- /dev/null
+++ b/node_modules/lodash/sortedUniqBy.js
@@ -0,0 +1,26 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseSortedUniq = require('./_baseSortedUniq');
+
+/**
+ * This method is like `_.uniqBy` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
+ * // => [1.1, 2.3]
+ */
+function sortedUniqBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSortedUniq(array, baseIteratee(iteratee, 2))
+ : [];
+}
+
+module.exports = sortedUniqBy;
diff --git a/node_modules/lodash/split.js b/node_modules/lodash/split.js
new file mode 100644
index 0000000..956b48a
--- /dev/null
+++ b/node_modules/lodash/split.js
@@ -0,0 +1,52 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ hasUnicode = require('./_hasUnicode'),
+ isIterateeCall = require('./_isIterateeCall'),
+ isRegExp = require('./isRegExp'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295;
+
+/**
+ * Splits `string` by `separator`.
+ *
+ * **Note:** This method is based on
+ * [`String#split`](https://mdn.io/String/split).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to split.
+ * @param {RegExp|string} separator The separator pattern to split by.
+ * @param {number} [limit] The length to truncate results to.
+ * @returns {Array} Returns the string segments.
+ * @example
+ *
+ * _.split('a-b-c', '-', 2);
+ * // => ['a', 'b']
+ */
+function split(string, separator, limit) {
+ if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
+ separator = limit = undefined;
+ }
+ limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
+ if (!limit) {
+ return [];
+ }
+ string = toString(string);
+ if (string && (
+ typeof separator == 'string' ||
+ (separator != null && !isRegExp(separator))
+ )) {
+ separator = baseToString(separator);
+ if (!separator && hasUnicode(string)) {
+ return castSlice(stringToArray(string), 0, limit);
+ }
+ }
+ return string.split(separator, limit);
+}
+
+module.exports = split;
diff --git a/node_modules/lodash/spread.js b/node_modules/lodash/spread.js
new file mode 100644
index 0000000..60a08e2
--- /dev/null
+++ b/node_modules/lodash/spread.js
@@ -0,0 +1,63 @@
+var apply = require('./_apply'),
+ arrayPush = require('./_arrayPush'),
+ baseRest = require('./_baseRest'),
+ castSlice = require('./_castSlice'),
+ toInteger = require('./toInteger');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * create function and an array of arguments much like
+ * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
+ *
+ * **Note:** This method is based on the
+ * [spread operator](https://mdn.io/spread_operator).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Function
+ * @param {Function} func The function to spread arguments over.
+ * @param {number} [start=0] The start position of the spread.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.spread(function(who, what) {
+ * return who + ' says ' + what;
+ * });
+ *
+ * say(['fred', 'hello']);
+ * // => 'fred says hello'
+ *
+ * var numbers = Promise.all([
+ * Promise.resolve(40),
+ * Promise.resolve(36)
+ * ]);
+ *
+ * numbers.then(_.spread(function(x, y) {
+ * return x + y;
+ * }));
+ * // => a Promise of 76
+ */
+function spread(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start == null ? 0 : nativeMax(toInteger(start), 0);
+ return baseRest(function(args) {
+ var array = args[start],
+ otherArgs = castSlice(args, 0, start);
+
+ if (array) {
+ arrayPush(otherArgs, array);
+ }
+ return apply(func, this, otherArgs);
+ });
+}
+
+module.exports = spread;
diff --git a/node_modules/lodash/startCase.js b/node_modules/lodash/startCase.js
new file mode 100644
index 0000000..a48f21c
--- /dev/null
+++ b/node_modules/lodash/startCase.js
@@ -0,0 +1,29 @@
+var createCompounder = require('./_createCompounder'),
+ upperFirst = require('./upperFirst');
+
+/**
+ * Converts `string` to
+ * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.1.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the start cased string.
+ * @example
+ *
+ * _.startCase('--foo-bar--');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('fooBar');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('__FOO_BAR__');
+ * // => 'FOO BAR'
+ */
+var startCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + upperFirst(word);
+});
+
+module.exports = startCase;
diff --git a/node_modules/lodash/startsWith.js b/node_modules/lodash/startsWith.js
new file mode 100644
index 0000000..956c098
--- /dev/null
+++ b/node_modules/lodash/startsWith.js
@@ -0,0 +1,39 @@
+var baseClamp = require('./_baseClamp'),
+ baseToString = require('./_baseToString'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * Checks if `string` starts with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=0] The position to search from.
+ * @returns {boolean} Returns `true` if `string` starts with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.startsWith('abc', 'a');
+ * // => true
+ *
+ * _.startsWith('abc', 'b');
+ * // => false
+ *
+ * _.startsWith('abc', 'b', 1);
+ * // => true
+ */
+function startsWith(string, target, position) {
+ string = toString(string);
+ position = position == null
+ ? 0
+ : baseClamp(toInteger(position), 0, string.length);
+
+ target = baseToString(target);
+ return string.slice(position, position + target.length) == target;
+}
+
+module.exports = startsWith;
diff --git a/node_modules/lodash/string.js b/node_modules/lodash/string.js
new file mode 100644
index 0000000..2c829c1
--- /dev/null
+++ b/node_modules/lodash/string.js
@@ -0,0 +1,33 @@
+module.exports = {
+ 'camelCase': require('./camelCase'),
+ 'capitalize': require('./capitalize'),
+ 'deburr': require('./deburr'),
+ 'endsWith': require('./endsWith'),
+ 'escape': require('./escape'),
+ 'escapeRegExp': require('./escapeRegExp'),
+ 'kebabCase': require('./kebabCase'),
+ 'lowerCase': require('./lowerCase'),
+ 'lowerFirst': require('./lowerFirst'),
+ 'pad': require('./pad'),
+ 'padEnd': require('./padEnd'),
+ 'padStart': require('./padStart'),
+ 'parseInt': require('./parseInt'),
+ 'repeat': require('./repeat'),
+ 'replace': require('./replace'),
+ 'snakeCase': require('./snakeCase'),
+ 'split': require('./split'),
+ 'startCase': require('./startCase'),
+ 'startsWith': require('./startsWith'),
+ 'template': require('./template'),
+ 'templateSettings': require('./templateSettings'),
+ 'toLower': require('./toLower'),
+ 'toUpper': require('./toUpper'),
+ 'trim': require('./trim'),
+ 'trimEnd': require('./trimEnd'),
+ 'trimStart': require('./trimStart'),
+ 'truncate': require('./truncate'),
+ 'unescape': require('./unescape'),
+ 'upperCase': require('./upperCase'),
+ 'upperFirst': require('./upperFirst'),
+ 'words': require('./words')
+};
diff --git a/node_modules/lodash/stubArray.js b/node_modules/lodash/stubArray.js
new file mode 100644
index 0000000..f460c15
--- /dev/null
+++ b/node_modules/lodash/stubArray.js
@@ -0,0 +1,23 @@
+/**
+ * This method returns a new empty array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
+ */
+function stubArray() {
+ return [];
+}
+
+module.exports = stubArray;
diff --git a/node_modules/lodash/stubFalse.js b/node_modules/lodash/stubFalse.js
new file mode 100644
index 0000000..9b346fc
--- /dev/null
+++ b/node_modules/lodash/stubFalse.js
@@ -0,0 +1,18 @@
+/**
+ * This method returns `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `false`.
+ * @example
+ *
+ * _.times(2, _.stubFalse);
+ * // => [false, false]
+ */
+function stubFalse() {
+ return false;
+}
+
+module.exports = stubFalse;
diff --git a/node_modules/lodash/stubObject.js b/node_modules/lodash/stubObject.js
new file mode 100644
index 0000000..1d190a1
--- /dev/null
+++ b/node_modules/lodash/stubObject.js
@@ -0,0 +1,23 @@
+/**
+ * This method returns a new empty object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Object} Returns the new empty object.
+ * @example
+ *
+ * var objects = _.times(2, _.stubObject);
+ *
+ * console.log(objects);
+ * // => [{}, {}]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => false
+ */
+function stubObject() {
+ return {};
+}
+
+module.exports = stubObject;
diff --git a/node_modules/lodash/stubString.js b/node_modules/lodash/stubString.js
new file mode 100644
index 0000000..2db0bed
--- /dev/null
+++ b/node_modules/lodash/stubString.js
@@ -0,0 +1,18 @@
+/**
+ * This method returns an empty string.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {string} Returns the empty string.
+ * @example
+ *
+ * _.times(2, _.stubString);
+ * // => ['', '']
+ */
+function stubString() {
+ return '';
+}
+
+module.exports = stubString;
diff --git a/node_modules/lodash/stubTrue.js b/node_modules/lodash/stubTrue.js
new file mode 100644
index 0000000..af3cc9e
--- /dev/null
+++ b/node_modules/lodash/stubTrue.js
@@ -0,0 +1,18 @@
+/**
+ * This method returns `true`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `true`.
+ * @example
+ *
+ * _.times(2, _.stubTrue);
+ * // => [true, true]
+ */
+function stubTrue() {
+ return true;
+}
+
+module.exports = stubTrue;
diff --git a/node_modules/lodash/subtract.js b/node_modules/lodash/subtract.js
new file mode 100644
index 0000000..6720778
--- /dev/null
+++ b/node_modules/lodash/subtract.js
@@ -0,0 +1,22 @@
+var createMathOperation = require('./_createMathOperation');
+
+/**
+ * Subtract two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {number} minuend The first number in a subtraction.
+ * @param {number} subtrahend The second number in a subtraction.
+ * @returns {number} Returns the difference.
+ * @example
+ *
+ * _.subtract(6, 4);
+ * // => 2
+ */
+var subtract = createMathOperation(function(minuend, subtrahend) {
+ return minuend - subtrahend;
+}, 0);
+
+module.exports = subtract;
diff --git a/node_modules/lodash/sum.js b/node_modules/lodash/sum.js
new file mode 100644
index 0000000..3b07ee4
--- /dev/null
+++ b/node_modules/lodash/sum.js
@@ -0,0 +1,24 @@
+var baseSum = require('./_baseSum'),
+ identity = require('./identity');
+
+/**
+ * Computes the sum of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * _.sum([4, 2, 8, 6]);
+ * // => 20
+ */
+function sum(array) {
+ return (array && array.length)
+ ? baseSum(array, identity)
+ : 0;
+}
+
+module.exports = sum;
diff --git a/node_modules/lodash/sumBy.js b/node_modules/lodash/sumBy.js
new file mode 100644
index 0000000..00e36d0
--- /dev/null
+++ b/node_modules/lodash/sumBy.js
@@ -0,0 +1,33 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseSum = require('./_baseSum');
+
+/**
+ * This method is like `_.sum` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be summed.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.sumBy(objects, function(o) { return o.n; });
+ * // => 20
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sumBy(objects, 'n');
+ * // => 20
+ */
+function sumBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSum(array, baseIteratee(iteratee, 2))
+ : 0;
+}
+
+module.exports = sumBy;
diff --git a/node_modules/lodash/tail.js b/node_modules/lodash/tail.js
new file mode 100644
index 0000000..001c22d
--- /dev/null
+++ b/node_modules/lodash/tail.js
@@ -0,0 +1,22 @@
+var baseSlice = require('./_baseSlice');
+
+/**
+ * Gets all but the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.tail([1, 2, 3]);
+ * // => [2, 3]
+ */
+function tail(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 1, length) : [];
+}
+
+module.exports = tail;
diff --git a/node_modules/lodash/take.js b/node_modules/lodash/take.js
new file mode 100644
index 0000000..b7da712
--- /dev/null
+++ b/node_modules/lodash/take.js
@@ -0,0 +1,37 @@
+var baseSlice = require('./_baseSlice'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a slice of `array` with `n` elements taken from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.take([1, 2, 3]);
+ * // => [1]
+ *
+ * _.take([1, 2, 3], 2);
+ * // => [1, 2]
+ *
+ * _.take([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.take([1, 2, 3], 0);
+ * // => []
+ */
+function take(array, n, guard) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+}
+
+module.exports = take;
diff --git a/node_modules/lodash/takeRight.js b/node_modules/lodash/takeRight.js
new file mode 100644
index 0000000..6c37506
--- /dev/null
+++ b/node_modules/lodash/takeRight.js
@@ -0,0 +1,39 @@
+var baseSlice = require('./_baseSlice'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a slice of `array` with `n` elements taken from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.takeRight([1, 2, 3]);
+ * // => [3]
+ *
+ * _.takeRight([1, 2, 3], 2);
+ * // => [2, 3]
+ *
+ * _.takeRight([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.takeRight([1, 2, 3], 0);
+ * // => []
+ */
+function takeRight(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, n < 0 ? 0 : n, length);
+}
+
+module.exports = takeRight;
diff --git a/node_modules/lodash/takeRightWhile.js b/node_modules/lodash/takeRightWhile.js
new file mode 100644
index 0000000..94ab783
--- /dev/null
+++ b/node_modules/lodash/takeRightWhile.js
@@ -0,0 +1,45 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseWhile = require('./_baseWhile');
+
+/**
+ * Creates a slice of `array` with elements taken from the end. Elements are
+ * taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.takeRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeRightWhile(users, ['active', false]);
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeRightWhile(users, 'active');
+ * // => []
+ */
+function takeRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, baseIteratee(predicate, 3), false, true)
+ : [];
+}
+
+module.exports = takeRightWhile;
diff --git a/node_modules/lodash/takeWhile.js b/node_modules/lodash/takeWhile.js
new file mode 100644
index 0000000..e88f591
--- /dev/null
+++ b/node_modules/lodash/takeWhile.js
@@ -0,0 +1,45 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseWhile = require('./_baseWhile');
+
+/**
+ * Creates a slice of `array` with elements taken from the beginning. Elements
+ * are taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.takeWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeWhile(users, ['active', false]);
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeWhile(users, 'active');
+ * // => []
+ */
+function takeWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, baseIteratee(predicate, 3))
+ : [];
+}
+
+module.exports = takeWhile;
diff --git a/node_modules/lodash/tap.js b/node_modules/lodash/tap.js
new file mode 100644
index 0000000..d007285
--- /dev/null
+++ b/node_modules/lodash/tap.js
@@ -0,0 +1,29 @@
+/**
+ * This method invokes `interceptor` and returns `value`. The interceptor
+ * is invoked with one argument; (value). The purpose of this method is to
+ * "tap into" a method chain sequence in order to modify intermediate results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * _([1, 2, 3])
+ * .tap(function(array) {
+ * // Mutate input array.
+ * array.pop();
+ * })
+ * .reverse()
+ * .value();
+ * // => [2, 1]
+ */
+function tap(value, interceptor) {
+ interceptor(value);
+ return value;
+}
+
+module.exports = tap;
diff --git a/node_modules/lodash/template.js b/node_modules/lodash/template.js
new file mode 100644
index 0000000..5c6d6f4
--- /dev/null
+++ b/node_modules/lodash/template.js
@@ -0,0 +1,272 @@
+var assignInWith = require('./assignInWith'),
+ attempt = require('./attempt'),
+ baseValues = require('./_baseValues'),
+ customDefaultsAssignIn = require('./_customDefaultsAssignIn'),
+ escapeStringChar = require('./_escapeStringChar'),
+ isError = require('./isError'),
+ isIterateeCall = require('./_isIterateeCall'),
+ keys = require('./keys'),
+ reInterpolate = require('./_reInterpolate'),
+ templateSettings = require('./templateSettings'),
+ toString = require('./toString');
+
+/** Error message constants. */
+var INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
+
+/** Used to match empty string literals in compiled template source. */
+var reEmptyStringLeading = /\b__p \+= '';/g,
+ reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
+ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
+
+/**
+ * Used to validate the `validate` option in `_.template` variable.
+ *
+ * Forbids characters which could potentially change the meaning of the function argument definition:
+ * - "()," (modification of function parameters)
+ * - "=" (default value)
+ * - "[]{}" (destructuring of function parameters)
+ * - "/" (beginning of a comment)
+ * - whitespace
+ */
+var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
+
+/**
+ * Used to match
+ * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
+ */
+var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
+
+/** Used to ensure capturing order of template delimiters. */
+var reNoMatch = /($^)/;
+
+/** Used to match unescaped characters in compiled string literals. */
+var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates a compiled template function that can interpolate data properties
+ * in "interpolate" delimiters, HTML-escape interpolated data properties in
+ * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
+ * properties may be accessed as free variables in the template. If a setting
+ * object is given, it takes precedence over `_.templateSettings` values.
+ *
+ * **Note:** In the development build `_.template` utilizes
+ * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
+ * for easier debugging.
+ *
+ * For more information on precompiling templates see
+ * [lodash's custom builds documentation](https://lodash.com/custom-builds).
+ *
+ * For more information on Chrome extension sandboxes see
+ * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The template string.
+ * @param {Object} [options={}] The options object.
+ * @param {RegExp} [options.escape=_.templateSettings.escape]
+ * The HTML "escape" delimiter.
+ * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
+ * The "evaluate" delimiter.
+ * @param {Object} [options.imports=_.templateSettings.imports]
+ * An object to import into the template as free variables.
+ * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
+ * The "interpolate" delimiter.
+ * @param {string} [options.sourceURL='templateSources[n]']
+ * The sourceURL of the compiled template.
+ * @param {string} [options.variable='obj']
+ * The data object variable name.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the compiled template function.
+ * @example
+ *
+ * // Use the "interpolate" delimiter to create a compiled template.
+ * var compiled = _.template('hello <%= user %>!');
+ * compiled({ 'user': 'fred' });
+ * // => 'hello fred!'
+ *
+ * // Use the HTML "escape" delimiter to escape data property values.
+ * var compiled = _.template('<b><%- value %></b>');
+ * compiled({ 'value': '<script>' });
+ * // => '<b>&lt;script&gt;</b>'
+ *
+ * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
+ * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the internal `print` function in "evaluate" delimiters.
+ * var compiled = _.template('<% print("hello " + user); %>!');
+ * compiled({ 'user': 'barney' });
+ * // => 'hello barney!'
+ *
+ * // Use the ES template literal delimiter as an "interpolate" delimiter.
+ * // Disable support by replacing the "interpolate" delimiter.
+ * var compiled = _.template('hello ${ user }!');
+ * compiled({ 'user': 'pebbles' });
+ * // => 'hello pebbles!'
+ *
+ * // Use backslashes to treat delimiters as plain text.
+ * var compiled = _.template('<%= "\\<%- value %\\>" %>');
+ * compiled({ 'value': 'ignored' });
+ * // => '<%- value %>'
+ *
+ * // Use the `imports` option to import `jQuery` as `jq`.
+ * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
+ * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the `sourceURL` option to specify a custom sourceURL for the template.
+ * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
+ * compiled(data);
+ * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
+ *
+ * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
+ * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
+ * compiled.source;
+ * // => function(data) {
+ * // var __t, __p = '';
+ * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
+ * // return __p;
+ * // }
+ *
+ * // Use custom template delimiters.
+ * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
+ * var compiled = _.template('hello {{ user }}!');
+ * compiled({ 'user': 'mustache' });
+ * // => 'hello mustache!'
+ *
+ * // Use the `source` property to inline compiled templates for meaningful
+ * // line numbers in error messages and stack traces.
+ * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
+ * var JST = {\
+ * "main": ' + _.template(mainText).source + '\
+ * };\
+ * ');
+ */
+function template(string, options, guard) {
+ // Based on John Resig's `tmpl` implementation
+ // (http://ejohn.org/blog/javascript-micro-templating/)
+ // and Laura Doktorova's doT.js (https://github.com/olado/doT).
+ var settings = templateSettings.imports._.templateSettings || templateSettings;
+
+ if (guard && isIterateeCall(string, options, guard)) {
+ options = undefined;
+ }
+ string = toString(string);
+ options = assignInWith({}, options, settings, customDefaultsAssignIn);
+
+ var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
+ importsKeys = keys(imports),
+ importsValues = baseValues(imports, importsKeys);
+
+ var isEscaping,
+ isEvaluating,
+ index = 0,
+ interpolate = options.interpolate || reNoMatch,
+ source = "__p += '";
+
+ // Compile the regexp to match each delimiter.
+ var reDelimiters = RegExp(
+ (options.escape || reNoMatch).source + '|' +
+ interpolate.source + '|' +
+ (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
+ (options.evaluate || reNoMatch).source + '|$'
+ , 'g');
+
+ // Use a sourceURL for easier debugging.
+ // The sourceURL gets injected into the source that's eval-ed, so be careful
+ // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
+ // and escape the comment, thus injecting code that gets evaled.
+ var sourceURL = hasOwnProperty.call(options, 'sourceURL')
+ ? ('//# sourceURL=' +
+ (options.sourceURL + '').replace(/\s/g, ' ') +
+ '\n')
+ : '';
+
+ string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
+ interpolateValue || (interpolateValue = esTemplateValue);
+
+ // Escape characters that can't be included in string literals.
+ source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
+
+ // Replace delimiters with snippets.
+ if (escapeValue) {
+ isEscaping = true;
+ source += "' +\n__e(" + escapeValue + ") +\n'";
+ }
+ if (evaluateValue) {
+ isEvaluating = true;
+ source += "';\n" + evaluateValue + ";\n__p += '";
+ }
+ if (interpolateValue) {
+ source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
+ }
+ index = offset + match.length;
+
+ // The JS engine embedded in Adobe products needs `match` returned in
+ // order to produce the correct `offset` value.
+ return match;
+ });
+
+ source += "';\n";
+
+ // If `variable` is not specified wrap a with-statement around the generated
+ // code to add the data object to the top of the scope chain.
+ var variable = hasOwnProperty.call(options, 'variable') && options.variable;
+ if (!variable) {
+ source = 'with (obj) {\n' + source + '\n}\n';
+ }
+ // Throw an error if a forbidden character was found in `variable`, to prevent
+ // potential command injection attacks.
+ else if (reForbiddenIdentifierChars.test(variable)) {
+ throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
+ }
+
+ // Cleanup code by stripping empty strings.
+ source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
+ .replace(reEmptyStringMiddle, '$1')
+ .replace(reEmptyStringTrailing, '$1;');
+
+ // Frame code as the function body.
+ source = 'function(' + (variable || 'obj') + ') {\n' +
+ (variable
+ ? ''
+ : 'obj || (obj = {});\n'
+ ) +
+ "var __t, __p = ''" +
+ (isEscaping
+ ? ', __e = _.escape'
+ : ''
+ ) +
+ (isEvaluating
+ ? ', __j = Array.prototype.join;\n' +
+ "function print() { __p += __j.call(arguments, '') }\n"
+ : ';\n'
+ ) +
+ source +
+ 'return __p\n}';
+
+ var result = attempt(function() {
+ return Function(importsKeys, sourceURL + 'return ' + source)
+ .apply(undefined, importsValues);
+ });
+
+ // Provide the compiled function's source by its `toString` method or
+ // the `source` property as a convenience for inlining compiled templates.
+ result.source = source;
+ if (isError(result)) {
+ throw result;
+ }
+ return result;
+}
+
+module.exports = template;
diff --git a/node_modules/lodash/templateSettings.js b/node_modules/lodash/templateSettings.js
new file mode 100644
index 0000000..5aa5924
--- /dev/null
+++ b/node_modules/lodash/templateSettings.js
@@ -0,0 +1,67 @@
+var escape = require('./escape'),
+ reEscape = require('./_reEscape'),
+ reEvaluate = require('./_reEvaluate'),
+ reInterpolate = require('./_reInterpolate');
+
+/**
+ * By default, the template delimiters used by lodash are like those in
+ * embedded Ruby (ERB) as well as ES2015 template strings. Change the
+ * following template settings to use alternative delimiters.
+ *
+ * @static
+ * @memberOf _
+ * @type {Object}
+ */
+var templateSettings = {
+
+ /**
+ * Used to detect `data` property values to be HTML-escaped.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'escape': reEscape,
+
+ /**
+ * Used to detect code to be evaluated.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'evaluate': reEvaluate,
+
+ /**
+ * Used to detect `data` property values to inject.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'interpolate': reInterpolate,
+
+ /**
+ * Used to reference the data object in the template text.
+ *
+ * @memberOf _.templateSettings
+ * @type {string}
+ */
+ 'variable': '',
+
+ /**
+ * Used to import variables into the compiled template.
+ *
+ * @memberOf _.templateSettings
+ * @type {Object}
+ */
+ 'imports': {
+
+ /**
+ * A reference to the `lodash` function.
+ *
+ * @memberOf _.templateSettings.imports
+ * @type {Function}
+ */
+ '_': { 'escape': escape }
+ }
+};
+
+module.exports = templateSettings;
diff --git a/node_modules/lodash/throttle.js b/node_modules/lodash/throttle.js
new file mode 100644
index 0000000..e2bb806
--- /dev/null
+++ b/node_modules/lodash/throttle.js
@@ -0,0 +1,69 @@
+var debounce = require('./debounce'),
+ isObject = require('./isObject');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a throttled function that only invokes `func` at most once per
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
+ * method to cancel delayed `func` invocations and a `flush` method to
+ * immediately invoke them. Provide `options` to indicate whether `func`
+ * should be invoked on the leading and/or trailing edge of the `wait`
+ * timeout. The `func` is invoked with the last arguments provided to the
+ * throttled function. Subsequent calls to the throttled function return the
+ * result of the last `func` invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the throttled function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.throttle` and `_.debounce`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to throttle.
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=true]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new throttled function.
+ * @example
+ *
+ * // Avoid excessively updating the position while scrolling.
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
+ *
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
+ * jQuery(element).on('click', throttled);
+ *
+ * // Cancel the trailing throttled invocation.
+ * jQuery(window).on('popstate', throttled.cancel);
+ */
+function throttle(func, wait, options) {
+ var leading = true,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (isObject(options)) {
+ leading = 'leading' in options ? !!options.leading : leading;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+ return debounce(func, wait, {
+ 'leading': leading,
+ 'maxWait': wait,
+ 'trailing': trailing
+ });
+}
+
+module.exports = throttle;
diff --git a/node_modules/lodash/thru.js b/node_modules/lodash/thru.js
new file mode 100644
index 0000000..91e132e
--- /dev/null
+++ b/node_modules/lodash/thru.js
@@ -0,0 +1,28 @@
+/**
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
+ * The purpose of this method is to "pass thru" values replacing intermediate
+ * results in a method chain sequence.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns the result of `interceptor`.
+ * @example
+ *
+ * _(' abc ')
+ * .chain()
+ * .trim()
+ * .thru(function(value) {
+ * return [value];
+ * })
+ * .value();
+ * // => ['abc']
+ */
+function thru(value, interceptor) {
+ return interceptor(value);
+}
+
+module.exports = thru;
diff --git a/node_modules/lodash/times.js b/node_modules/lodash/times.js
new file mode 100644
index 0000000..266c90c
--- /dev/null
+++ b/node_modules/lodash/times.js
@@ -0,0 +1,51 @@
+var baseTimes = require('./_baseTimes'),
+ castFunction = require('./_castFunction'),
+ toInteger = require('./toInteger');
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Invokes the iteratee `n` times, returning an array of the results of
+ * each invocation. The iteratee is invoked with one argument; (index).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.times(3, String);
+ * // => ['0', '1', '2']
+ *
+ * _.times(4, _.constant(0));
+ * // => [0, 0, 0, 0]
+ */
+function times(n, iteratee) {
+ n = toInteger(n);
+ if (n < 1 || n > MAX_SAFE_INTEGER) {
+ return [];
+ }
+ var index = MAX_ARRAY_LENGTH,
+ length = nativeMin(n, MAX_ARRAY_LENGTH);
+
+ iteratee = castFunction(iteratee);
+ n -= MAX_ARRAY_LENGTH;
+
+ var result = baseTimes(length, iteratee);
+ while (++index < n) {
+ iteratee(index);
+ }
+ return result;
+}
+
+module.exports = times;
diff --git a/node_modules/lodash/toArray.js b/node_modules/lodash/toArray.js
new file mode 100644
index 0000000..9809584
--- /dev/null
+++ b/node_modules/lodash/toArray.js
@@ -0,0 +1,58 @@
+var Symbol = require('./_Symbol'),
+ copyArray = require('./_copyArray'),
+ getTag = require('./_getTag'),
+ isArrayLike = require('./isArrayLike'),
+ isString = require('./isString'),
+ iteratorToArray = require('./_iteratorToArray'),
+ mapToArray = require('./_mapToArray'),
+ setToArray = require('./_setToArray'),
+ stringToArray = require('./_stringToArray'),
+ values = require('./values');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ setTag = '[object Set]';
+
+/** Built-in value references. */
+var symIterator = Symbol ? Symbol.iterator : undefined;
+
+/**
+ * Converts `value` to an array.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the converted array.
+ * @example
+ *
+ * _.toArray({ 'a': 1, 'b': 2 });
+ * // => [1, 2]
+ *
+ * _.toArray('abc');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toArray(1);
+ * // => []
+ *
+ * _.toArray(null);
+ * // => []
+ */
+function toArray(value) {
+ if (!value) {
+ return [];
+ }
+ if (isArrayLike(value)) {
+ return isString(value) ? stringToArray(value) : copyArray(value);
+ }
+ if (symIterator && value[symIterator]) {
+ return iteratorToArray(value[symIterator]());
+ }
+ var tag = getTag(value),
+ func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
+
+ return func(value);
+}
+
+module.exports = toArray;
diff --git a/node_modules/lodash/toFinite.js b/node_modules/lodash/toFinite.js
new file mode 100644
index 0000000..3b5bba6
--- /dev/null
+++ b/node_modules/lodash/toFinite.js
@@ -0,0 +1,42 @@
+var toNumber = require('./toNumber');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0,
+ MAX_INTEGER = 1.7976931348623157e+308;
+
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
+module.exports = toFinite;
diff --git a/node_modules/lodash/toInteger.js b/node_modules/lodash/toInteger.js
new file mode 100644
index 0000000..c6aadf8
--- /dev/null
+++ b/node_modules/lodash/toInteger.js
@@ -0,0 +1,36 @@
+var toFinite = require('./toFinite');
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+function toInteger(value) {
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
+}
+
+module.exports = toInteger;
diff --git a/node_modules/lodash/toIterator.js b/node_modules/lodash/toIterator.js
new file mode 100644
index 0000000..beeed5d
--- /dev/null
+++ b/node_modules/lodash/toIterator.js
@@ -0,0 +1,23 @@
+/**
+ * Enables the wrapper to be iterable.
+ *
+ * @name Symbol.iterator
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the wrapper object.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped[Symbol.iterator]() === wrapped;
+ * // => true
+ *
+ * Array.from(wrapped);
+ * // => [1, 2]
+ */
+function wrapperToIterator() {
+ return this;
+}
+
+module.exports = wrapperToIterator;
diff --git a/node_modules/lodash/toJSON.js b/node_modules/lodash/toJSON.js
new file mode 100644
index 0000000..5e751a2
--- /dev/null
+++ b/node_modules/lodash/toJSON.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperValue');
diff --git a/node_modules/lodash/toLength.js b/node_modules/lodash/toLength.js
new file mode 100644
index 0000000..be8f2a7
--- /dev/null
+++ b/node_modules/lodash/toLength.js
@@ -0,0 +1,38 @@
+var baseClamp = require('./_baseClamp'),
+ toInteger = require('./toInteger');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295;
+
+/**
+ * Converts `value` to an integer suitable for use as the length of an
+ * array-like object.
+ *
+ * **Note:** This method is based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toLength(3.2);
+ * // => 3
+ *
+ * _.toLength(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toLength(Infinity);
+ * // => 4294967295
+ *
+ * _.toLength('3.2');
+ * // => 3
+ */
+function toLength(value) {
+ return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
+}
+
+module.exports = toLength;
diff --git a/node_modules/lodash/toLower.js b/node_modules/lodash/toLower.js
new file mode 100644
index 0000000..b4b7858
--- /dev/null
+++ b/node_modules/lodash/toLower.js
@@ -0,0 +1,28 @@
+var toString = require('./toString');
+
+/**
+ * Converts `string`, as a whole, to lower case just like
+ * [String#toLowerCase](https://mdn.io/toLowerCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.toLower('--Foo-Bar--');
+ * // => '--foo-bar--'
+ *
+ * _.toLower('fooBar');
+ * // => 'foobar'
+ *
+ * _.toLower('__FOO_BAR__');
+ * // => '__foo_bar__'
+ */
+function toLower(value) {
+ return toString(value).toLowerCase();
+}
+
+module.exports = toLower;
diff --git a/node_modules/lodash/toNumber.js b/node_modules/lodash/toNumber.js
new file mode 100644
index 0000000..cf46f10
--- /dev/null
+++ b/node_modules/lodash/toNumber.js
@@ -0,0 +1,64 @@
+var baseTrim = require('./_baseTrim'),
+ isObject = require('./isObject'),
+ isSymbol = require('./isSymbol');
+
+/** Used as references for various `Number` constants. */
+var NAN = 0 / 0;
+
+/** Used to detect bad signed hexadecimal string values. */
+var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+/** Used to detect binary string values. */
+var reIsBinary = /^0b[01]+$/i;
+
+/** Used to detect octal string values. */
+var reIsOctal = /^0o[0-7]+$/i;
+
+/** Built-in method references without a dependency on `root`. */
+var freeParseInt = parseInt;
+
+/**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = baseTrim(value);
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+}
+
+module.exports = toNumber;
diff --git a/node_modules/lodash/toPairs.js b/node_modules/lodash/toPairs.js
new file mode 100644
index 0000000..c4f52ae
--- /dev/null
+++ b/node_modules/lodash/toPairs.js
@@ -0,0 +1,30 @@
+var createToPairs = require('./_createToPairs'),
+ keys = require('./keys');
+
+/**
+ * Creates an array of own enumerable string keyed-value pairs for `object`
+ * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
+ * entries are returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entries
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairs(new Foo);
+ * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
+ */
+var toPairs = createToPairs(keys);
+
+module.exports = toPairs;
diff --git a/node_modules/lodash/toPairsIn.js b/node_modules/lodash/toPairsIn.js
new file mode 100644
index 0000000..32c562c
--- /dev/null
+++ b/node_modules/lodash/toPairsIn.js
@@ -0,0 +1,30 @@
+var createToPairs = require('./_createToPairs'),
+ keysIn = require('./keysIn');
+
+/**
+ * Creates an array of own and inherited enumerable string keyed-value pairs
+ * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
+ * or set, its entries are returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entriesIn
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairsIn(new Foo);
+ * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
+ */
+var toPairsIn = createToPairs(keysIn);
+
+module.exports = toPairsIn;
diff --git a/node_modules/lodash/toPath.js b/node_modules/lodash/toPath.js
new file mode 100644
index 0000000..d3e96ee
--- /dev/null
+++ b/node_modules/lodash/toPath.js
@@ -0,0 +1,33 @@
+var arrayMap = require('./_arrayMap'),
+ copyArray = require('./_copyArray'),
+ isArray = require('./isArray'),
+ isSymbol = require('./isSymbol'),
+ stringToPath = require('./_stringToPath'),
+ toKey = require('./_toKey'),
+ toString = require('./toString');
+
+/**
+ * Converts `value` to a property path array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the new property path array.
+ * @example
+ *
+ * _.toPath('a.b.c');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toPath('a[0].b.c');
+ * // => ['a', '0', 'b', 'c']
+ */
+function toPath(value) {
+ if (isArray(value)) {
+ return arrayMap(value, toKey);
+ }
+ return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
+}
+
+module.exports = toPath;
diff --git a/node_modules/lodash/toPlainObject.js b/node_modules/lodash/toPlainObject.js
new file mode 100644
index 0000000..5de79b8
--- /dev/null
+++ b/node_modules/lodash/toPlainObject.js
@@ -0,0 +1,32 @@
+var copyObject = require('./_copyObject'),
+ keysIn = require('./keysIn');
+
+/**
+ * Converts `value` to a plain object flattening inherited enumerable string
+ * keyed properties of `value` to own properties of the plain object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Object} Returns the converted plain object.
+ * @example
+ *
+ * function Foo() {
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.assign({ 'a': 1 }, new Foo);
+ * // => { 'a': 1, 'b': 2 }
+ *
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
+ */
+function toPlainObject(value) {
+ return copyObject(value, keysIn(value));
+}
+
+module.exports = toPlainObject;
diff --git a/node_modules/lodash/toSafeInteger.js b/node_modules/lodash/toSafeInteger.js
new file mode 100644
index 0000000..f564623
--- /dev/null
+++ b/node_modules/lodash/toSafeInteger.js
@@ -0,0 +1,37 @@
+var baseClamp = require('./_baseClamp'),
+ toInteger = require('./toInteger');
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Converts `value` to a safe integer. A safe integer can be compared and
+ * represented correctly.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toSafeInteger(3.2);
+ * // => 3
+ *
+ * _.toSafeInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toSafeInteger(Infinity);
+ * // => 9007199254740991
+ *
+ * _.toSafeInteger('3.2');
+ * // => 3
+ */
+function toSafeInteger(value) {
+ return value
+ ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
+ : (value === 0 ? value : 0);
+}
+
+module.exports = toSafeInteger;
diff --git a/node_modules/lodash/toString.js b/node_modules/lodash/toString.js
new file mode 100644
index 0000000..daaf681
--- /dev/null
+++ b/node_modules/lodash/toString.js
@@ -0,0 +1,28 @@
+var baseToString = require('./_baseToString');
+
+/**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString(value) {
+ return value == null ? '' : baseToString(value);
+}
+
+module.exports = toString;
diff --git a/node_modules/lodash/toUpper.js b/node_modules/lodash/toUpper.js
new file mode 100644
index 0000000..b3648e8
--- /dev/null
+++ b/node_modules/lodash/toUpper.js
@@ -0,0 +1,28 @@
+var toString = require('./toString');
+
+/**
+ * Converts `string`, as a whole, to upper case just like
+ * [String#toUpperCase](https://mdn.io/toUpperCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.toUpper('--foo-bar--');
+ * // => '--FOO-BAR--'
+ *
+ * _.toUpper('fooBar');
+ * // => 'FOOBAR'
+ *
+ * _.toUpper('__foo_bar__');
+ * // => '__FOO_BAR__'
+ */
+function toUpper(value) {
+ return toString(value).toUpperCase();
+}
+
+module.exports = toUpper;
diff --git a/node_modules/lodash/transform.js b/node_modules/lodash/transform.js
new file mode 100644
index 0000000..d755a15
--- /dev/null
+++ b/node_modules/lodash/transform.js
@@ -0,0 +1,65 @@
+var arrayEach = require('./_arrayEach'),
+ baseCreate = require('./_baseCreate'),
+ baseForOwn = require('./_baseForOwn'),
+ baseIteratee = require('./_baseIteratee'),
+ getPrototype = require('./_getPrototype'),
+ isArray = require('./isArray'),
+ isBuffer = require('./isBuffer'),
+ isFunction = require('./isFunction'),
+ isObject = require('./isObject'),
+ isTypedArray = require('./isTypedArray');
+
+/**
+ * An alternative to `_.reduce`; this method transforms `object` to a new
+ * `accumulator` object which is the result of running each of its own
+ * enumerable string keyed properties thru `iteratee`, with each invocation
+ * potentially mutating the `accumulator` object. If `accumulator` is not
+ * provided, a new object with the same `[[Prototype]]` will be used. The
+ * iteratee is invoked with four arguments: (accumulator, value, key, object).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The custom accumulator value.
+ * @returns {*} Returns the accumulated value.
+ * @example
+ *
+ * _.transform([2, 3, 4], function(result, n) {
+ * result.push(n *= n);
+ * return n % 2 == 0;
+ * }, []);
+ * // => [4, 9]
+ *
+ * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ */
+function transform(object, iteratee, accumulator) {
+ var isArr = isArray(object),
+ isArrLike = isArr || isBuffer(object) || isTypedArray(object);
+
+ iteratee = baseIteratee(iteratee, 4);
+ if (accumulator == null) {
+ var Ctor = object && object.constructor;
+ if (isArrLike) {
+ accumulator = isArr ? new Ctor : [];
+ }
+ else if (isObject(object)) {
+ accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
+ }
+ else {
+ accumulator = {};
+ }
+ }
+ (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
+ return iteratee(accumulator, value, index, object);
+ });
+ return accumulator;
+}
+
+module.exports = transform;
diff --git a/node_modules/lodash/trim.js b/node_modules/lodash/trim.js
new file mode 100644
index 0000000..13a6ad7
--- /dev/null
+++ b/node_modules/lodash/trim.js
@@ -0,0 +1,47 @@
+var baseToString = require('./_baseToString'),
+ baseTrim = require('./_baseTrim'),
+ castSlice = require('./_castSlice'),
+ charsEndIndex = require('./_charsEndIndex'),
+ charsStartIndex = require('./_charsStartIndex'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString');
+
+/**
+ * Removes leading and trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trim(' abc ');
+ * // => 'abc'
+ *
+ * _.trim('-_-abc-_-', '_-');
+ * // => 'abc'
+ *
+ * _.map([' foo ', ' bar '], _.trim);
+ * // => ['foo', 'bar']
+ */
+function trim(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return baseTrim(string);
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ chrSymbols = stringToArray(chars),
+ start = charsStartIndex(strSymbols, chrSymbols),
+ end = charsEndIndex(strSymbols, chrSymbols) + 1;
+
+ return castSlice(strSymbols, start, end).join('');
+}
+
+module.exports = trim;
diff --git a/node_modules/lodash/trimEnd.js b/node_modules/lodash/trimEnd.js
new file mode 100644
index 0000000..8dcd493
--- /dev/null
+++ b/node_modules/lodash/trimEnd.js
@@ -0,0 +1,41 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ charsEndIndex = require('./_charsEndIndex'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString'),
+ trimmedEndIndex = require('./_trimmedEndIndex');
+
+/**
+ * Removes trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimEnd(' abc ');
+ * // => ' abc'
+ *
+ * _.trimEnd('-_-abc-_-', '_-');
+ * // => '-_-abc'
+ */
+function trimEnd(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.slice(0, trimmedEndIndex(string) + 1);
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
+
+ return castSlice(strSymbols, 0, end).join('');
+}
+
+module.exports = trimEnd;
diff --git a/node_modules/lodash/trimStart.js b/node_modules/lodash/trimStart.js
new file mode 100644
index 0000000..6cba766
--- /dev/null
+++ b/node_modules/lodash/trimStart.js
@@ -0,0 +1,43 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ charsStartIndex = require('./_charsStartIndex'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString');
+
+/** Used to match leading whitespace. */
+var reTrimStart = /^\s+/;
+
+/**
+ * Removes leading whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimStart(' abc ');
+ * // => 'abc '
+ *
+ * _.trimStart('-_-abc-_-', '_-');
+ * // => 'abc-_-'
+ */
+function trimStart(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimStart, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ start = charsStartIndex(strSymbols, stringToArray(chars));
+
+ return castSlice(strSymbols, start).join('');
+}
+
+module.exports = trimStart;
diff --git a/node_modules/lodash/truncate.js b/node_modules/lodash/truncate.js
new file mode 100644
index 0000000..21fcdfe
--- /dev/null
+++ b/node_modules/lodash/truncate.js
@@ -0,0 +1,111 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ hasUnicode = require('./_hasUnicode'),
+ isObject = require('./isObject'),
+ isRegExp = require('./isRegExp'),
+ stringSize = require('./_stringSize'),
+ stringToArray = require('./_stringToArray'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/** Used as default options for `_.truncate`. */
+var DEFAULT_TRUNC_LENGTH = 30,
+ DEFAULT_TRUNC_OMISSION = '...';
+
+/** Used to match `RegExp` flags from their coerced string values. */
+var reFlags = /\w*$/;
+
+/**
+ * Truncates `string` if it's longer than the given maximum string length.
+ * The last characters of the truncated string are replaced with the omission
+ * string which defaults to "...".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to truncate.
+ * @param {Object} [options={}] The options object.
+ * @param {number} [options.length=30] The maximum string length.
+ * @param {string} [options.omission='...'] The string to indicate text is omitted.
+ * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
+ * @returns {string} Returns the truncated string.
+ * @example
+ *
+ * _.truncate('hi-diddly-ho there, neighborino');
+ * // => 'hi-diddly-ho there, neighbo...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': ' '
+ * });
+ * // => 'hi-diddly-ho there,...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': /,? +/
+ * });
+ * // => 'hi-diddly-ho there...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'omission': ' [...]'
+ * });
+ * // => 'hi-diddly-ho there, neig [...]'
+ */
+function truncate(string, options) {
+ var length = DEFAULT_TRUNC_LENGTH,
+ omission = DEFAULT_TRUNC_OMISSION;
+
+ if (isObject(options)) {
+ var separator = 'separator' in options ? options.separator : separator;
+ length = 'length' in options ? toInteger(options.length) : length;
+ omission = 'omission' in options ? baseToString(options.omission) : omission;
+ }
+ string = toString(string);
+
+ var strLength = string.length;
+ if (hasUnicode(string)) {
+ var strSymbols = stringToArray(string);
+ strLength = strSymbols.length;
+ }
+ if (length >= strLength) {
+ return string;
+ }
+ var end = length - stringSize(omission);
+ if (end < 1) {
+ return omission;
+ }
+ var result = strSymbols
+ ? castSlice(strSymbols, 0, end).join('')
+ : string.slice(0, end);
+
+ if (separator === undefined) {
+ return result + omission;
+ }
+ if (strSymbols) {
+ end += (result.length - end);
+ }
+ if (isRegExp(separator)) {
+ if (string.slice(end).search(separator)) {
+ var match,
+ substring = result;
+
+ if (!separator.global) {
+ separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
+ }
+ separator.lastIndex = 0;
+ while ((match = separator.exec(substring))) {
+ var newEnd = match.index;
+ }
+ result = result.slice(0, newEnd === undefined ? end : newEnd);
+ }
+ } else if (string.indexOf(baseToString(separator), end) != end) {
+ var index = result.lastIndexOf(separator);
+ if (index > -1) {
+ result = result.slice(0, index);
+ }
+ }
+ return result + omission;
+}
+
+module.exports = truncate;
diff --git a/node_modules/lodash/unary.js b/node_modules/lodash/unary.js
new file mode 100644
index 0000000..76f48f6
--- /dev/null
+++ b/node_modules/lodash/unary.js
@@ -0,0 +1,22 @@
+var ary = require('./ary');
+
+/**
+ * Creates a function that accepts up to one argument, ignoring any
+ * additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.unary(parseInt));
+ * // => [6, 8, 10]
+ */
+function unary(func) {
+ return ary(func, 1);
+}
+
+module.exports = unary;
diff --git a/node_modules/lodash/unescape.js b/node_modules/lodash/unescape.js
new file mode 100644
index 0000000..3b6efd5
--- /dev/null
+++ b/node_modules/lodash/unescape.js
@@ -0,0 +1,34 @@
+var toString = require('./toString'),
+ unescapeHtmlChar = require('./_unescapeHtmlChar');
+
+/** Used to match HTML entities and HTML characters. */
+var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
+ reHasEscapedHtml = RegExp(reEscapedHtml.source);
+
+/**
+ * The inverse of `_.escape`; this method converts the HTML entities
+ * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
+ * their corresponding characters.
+ *
+ * **Note:** No other HTML entities are unescaped. To unescape additional
+ * HTML entities use a third-party library like [_he_](https://mths.be/he).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.6.0
+ * @category String
+ * @param {string} [string=''] The string to unescape.
+ * @returns {string} Returns the unescaped string.
+ * @example
+ *
+ * _.unescape('fred, barney, &amp; pebbles');
+ * // => 'fred, barney, & pebbles'
+ */
+function unescape(string) {
+ string = toString(string);
+ return (string && reHasEscapedHtml.test(string))
+ ? string.replace(reEscapedHtml, unescapeHtmlChar)
+ : string;
+}
+
+module.exports = unescape;
diff --git a/node_modules/lodash/union.js b/node_modules/lodash/union.js
new file mode 100644
index 0000000..e676dfe
--- /dev/null
+++ b/node_modules/lodash/union.js
@@ -0,0 +1,26 @@
+var baseFlatten = require('./_baseFlatten'),
+ baseRest = require('./_baseRest'),
+ baseUniq = require('./_baseUniq'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * Creates an array of unique values, in order, from all given arrays using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.union([2], [1, 2]);
+ * // => [2, 1]
+ */
+var union = baseRest(function(arrays) {
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
+});
+
+module.exports = union;
diff --git a/node_modules/lodash/unionBy.js b/node_modules/lodash/unionBy.js
new file mode 100644
index 0000000..6ae8ccd
--- /dev/null
+++ b/node_modules/lodash/unionBy.js
@@ -0,0 +1,39 @@
+var baseFlatten = require('./_baseFlatten'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ baseUniq = require('./_baseUniq'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.union` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which uniqueness is computed. Result values are chosen from the first
+ * array in which the value occurs. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.unionBy([2.1], [1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+var unionBy = baseRest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2));
+});
+
+module.exports = unionBy;
diff --git a/node_modules/lodash/unionWith.js b/node_modules/lodash/unionWith.js
new file mode 100644
index 0000000..78736b2
--- /dev/null
+++ b/node_modules/lodash/unionWith.js
@@ -0,0 +1,34 @@
+var baseFlatten = require('./_baseFlatten'),
+ baseRest = require('./_baseRest'),
+ baseUniq = require('./_baseUniq'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.union` except that it accepts `comparator` which
+ * is invoked to compare elements of `arrays`. Result values are chosen from
+ * the first array in which the value occurs. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.unionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+var unionWith = baseRest(function(arrays) {
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
+});
+
+module.exports = unionWith;
diff --git a/node_modules/lodash/uniq.js b/node_modules/lodash/uniq.js
new file mode 100644
index 0000000..157d1cd
--- /dev/null
+++ b/node_modules/lodash/uniq.js
@@ -0,0 +1,25 @@
+var baseUniq = require('./_baseUniq');
+
+/**
+ * Creates a duplicate-free version of an array, using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons, in which only the first occurrence of each element
+ * is kept. The order of result values is determined by the order they occur
+ * in the array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniq([2, 1, 2]);
+ * // => [2, 1]
+ */
+function uniq(array) {
+ return (array && array.length) ? baseUniq(array) : [];
+}
+
+module.exports = uniq;
diff --git a/node_modules/lodash/uniqBy.js b/node_modules/lodash/uniqBy.js
new file mode 100644
index 0000000..53402a9
--- /dev/null
+++ b/node_modules/lodash/uniqBy.js
@@ -0,0 +1,31 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseUniq = require('./_baseUniq');
+
+/**
+ * This method is like `_.uniq` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * uniqueness is computed. The order of result values is determined by the
+ * order they occur in the array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+function uniqBy(array, iteratee) {
+ return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];
+}
+
+module.exports = uniqBy;
diff --git a/node_modules/lodash/uniqWith.js b/node_modules/lodash/uniqWith.js
new file mode 100644
index 0000000..18d72aa
--- /dev/null
+++ b/node_modules/lodash/uniqWith.js
@@ -0,0 +1,28 @@
+var baseUniq = require('./_baseUniq');
+
+/**
+ * This method is like `_.uniq` except that it accepts `comparator` which
+ * is invoked to compare elements of `array`. The order of result values is
+ * determined by the order they occur in the array.The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.uniqWith(objects, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
+ */
+function uniqWith(array, comparator) {
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
+}
+
+module.exports = uniqWith;
diff --git a/node_modules/lodash/uniqueId.js b/node_modules/lodash/uniqueId.js
new file mode 100644
index 0000000..ffa8c03
--- /dev/null
+++ b/node_modules/lodash/uniqueId.js
@@ -0,0 +1,28 @@
+var toString = require('./toString');
+
+/** Used to generate unique IDs. */
+var idCounter = 0;
+
+/**
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {string} [prefix=''] The value to prefix the ID with.
+ * @returns {string} Returns the unique ID.
+ * @example
+ *
+ * _.uniqueId('contact_');
+ * // => 'contact_104'
+ *
+ * _.uniqueId();
+ * // => '105'
+ */
+function uniqueId(prefix) {
+ var id = ++idCounter;
+ return toString(prefix) + id;
+}
+
+module.exports = uniqueId;
diff --git a/node_modules/lodash/unset.js b/node_modules/lodash/unset.js
new file mode 100644
index 0000000..723c3d4
--- /dev/null
+++ b/node_modules/lodash/unset.js
@@ -0,0 +1,34 @@
+var baseUnset = require('./_baseUnset');
+
+/**
+ * Removes the property at `path` of `object`.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 7 } }] };
+ * _.unset(object, 'a[0].b.c');
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ *
+ * _.unset(object, ['a', '0', 'b', 'c']);
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ */
+function unset(object, path) {
+ return object == null ? true : baseUnset(object, path);
+}
+
+module.exports = unset;
diff --git a/node_modules/lodash/unzip.js b/node_modules/lodash/unzip.js
new file mode 100644
index 0000000..fce0ec7
--- /dev/null
+++ b/node_modules/lodash/unzip.js
@@ -0,0 +1,45 @@
+var arrayFilter = require('./_arrayFilter'),
+ arrayMap = require('./_arrayMap'),
+ baseProperty = require('./_baseProperty'),
+ baseTimes = require('./_baseTimes'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * This method is like `_.zip` except that it accepts an array of grouped
+ * elements and creates an array regrouping the elements to their pre-zip
+ * configuration.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.2.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
+ * // => [['a', 1, true], ['b', 2, false]]
+ *
+ * _.unzip(zipped);
+ * // => [['a', 'b'], [1, 2], [true, false]]
+ */
+function unzip(array) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var length = 0;
+ array = arrayFilter(array, function(group) {
+ if (isArrayLikeObject(group)) {
+ length = nativeMax(group.length, length);
+ return true;
+ }
+ });
+ return baseTimes(length, function(index) {
+ return arrayMap(array, baseProperty(index));
+ });
+}
+
+module.exports = unzip;
diff --git a/node_modules/lodash/unzipWith.js b/node_modules/lodash/unzipWith.js
new file mode 100644
index 0000000..926c899
--- /dev/null
+++ b/node_modules/lodash/unzipWith.js
@@ -0,0 +1,39 @@
+var apply = require('./_apply'),
+ arrayMap = require('./_arrayMap'),
+ unzip = require('./unzip');
+
+/**
+ * This method is like `_.unzip` except that it accepts `iteratee` to specify
+ * how regrouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * regrouped values.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
+ * // => [[1, 10, 100], [2, 20, 200]]
+ *
+ * _.unzipWith(zipped, _.add);
+ * // => [3, 30, 300]
+ */
+function unzipWith(array, iteratee) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var result = unzip(array);
+ if (iteratee == null) {
+ return result;
+ }
+ return arrayMap(result, function(group) {
+ return apply(iteratee, undefined, group);
+ });
+}
+
+module.exports = unzipWith;
diff --git a/node_modules/lodash/update.js b/node_modules/lodash/update.js
new file mode 100644
index 0000000..b90098e
--- /dev/null
+++ b/node_modules/lodash/update.js
@@ -0,0 +1,35 @@
+var baseUpdate = require('./_baseUpdate'),
+ castFunction = require('./_castFunction');
+
+/**
+ * This method is like `_.set` except that accepts `updater` to produce the
+ * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
+ * is invoked with one argument: (value).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.update(object, 'a[0].b.c', function(n) { return n * n; });
+ * console.log(object.a[0].b.c);
+ * // => 9
+ *
+ * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
+ * console.log(object.x[0].y.z);
+ * // => 0
+ */
+function update(object, path, updater) {
+ return object == null ? object : baseUpdate(object, path, castFunction(updater));
+}
+
+module.exports = update;
diff --git a/node_modules/lodash/updateWith.js b/node_modules/lodash/updateWith.js
new file mode 100644
index 0000000..a2f4a2c
--- /dev/null
+++ b/node_modules/lodash/updateWith.js
@@ -0,0 +1,33 @@
+var baseUpdate = require('./_baseUpdate'),
+ castFunction = require('./_castFunction');
+
+/**
+ * This method is like `_.update` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.updateWith(object, '[0][1]', _.constant('a'), Object);
+ * // => { '0': { '1': 'a' } }
+ */
+function updateWith(object, path, updater, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
+}
+
+module.exports = updateWith;
diff --git a/node_modules/lodash/upperCase.js b/node_modules/lodash/upperCase.js
new file mode 100644
index 0000000..efbb8b0
--- /dev/null
+++ b/node_modules/lodash/upperCase.js
@@ -0,0 +1,27 @@
+var createCompounder = require('./_createCompounder');
+
+/**
+ * Converts `string`, as space separated words, to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.upperCase('--foo-bar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('fooBar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('__foo_bar__');
+ * // => 'FOO BAR'
+ */
+var upperCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toUpperCase();
+});
+
+module.exports = upperCase;
diff --git a/node_modules/lodash/upperFirst.js b/node_modules/lodash/upperFirst.js
new file mode 100644
index 0000000..1dd64e1
--- /dev/null
+++ b/node_modules/lodash/upperFirst.js
@@ -0,0 +1,22 @@
+var createCaseFirst = require('./_createCaseFirst');
+
+/**
+ * Converts the first character of `string` to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.upperFirst('fred');
+ * // => 'Fred'
+ *
+ * _.upperFirst('FRED');
+ * // => 'FRED'
+ */
+var upperFirst = createCaseFirst('toUpperCase');
+
+module.exports = upperFirst;
diff --git a/node_modules/lodash/util.js b/node_modules/lodash/util.js
new file mode 100644
index 0000000..d244dc2
--- /dev/null
+++ b/node_modules/lodash/util.js
@@ -0,0 +1,34 @@
+module.exports = {
+ 'attempt': require('./attempt'),
+ 'bindAll': require('./bindAll'),
+ 'cond': require('./cond'),
+ 'conforms': require('./conforms'),
+ 'constant': require('./constant'),
+ 'defaultTo': require('./defaultTo'),
+ 'flow': require('./flow'),
+ 'flowRight': require('./flowRight'),
+ 'identity': require('./identity'),
+ 'iteratee': require('./iteratee'),
+ 'matches': require('./matches'),
+ 'matchesProperty': require('./matchesProperty'),
+ 'method': require('./method'),
+ 'methodOf': require('./methodOf'),
+ 'mixin': require('./mixin'),
+ 'noop': require('./noop'),
+ 'nthArg': require('./nthArg'),
+ 'over': require('./over'),
+ 'overEvery': require('./overEvery'),
+ 'overSome': require('./overSome'),
+ 'property': require('./property'),
+ 'propertyOf': require('./propertyOf'),
+ 'range': require('./range'),
+ 'rangeRight': require('./rangeRight'),
+ 'stubArray': require('./stubArray'),
+ 'stubFalse': require('./stubFalse'),
+ 'stubObject': require('./stubObject'),
+ 'stubString': require('./stubString'),
+ 'stubTrue': require('./stubTrue'),
+ 'times': require('./times'),
+ 'toPath': require('./toPath'),
+ 'uniqueId': require('./uniqueId')
+};
diff --git a/node_modules/lodash/value.js b/node_modules/lodash/value.js
new file mode 100644
index 0000000..5e751a2
--- /dev/null
+++ b/node_modules/lodash/value.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperValue');
diff --git a/node_modules/lodash/valueOf.js b/node_modules/lodash/valueOf.js
new file mode 100644
index 0000000..5e751a2
--- /dev/null
+++ b/node_modules/lodash/valueOf.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperValue');
diff --git a/node_modules/lodash/values.js b/node_modules/lodash/values.js
new file mode 100644
index 0000000..b069654
--- /dev/null
+++ b/node_modules/lodash/values.js
@@ -0,0 +1,34 @@
+var baseValues = require('./_baseValues'),
+ keys = require('./keys');
+
+/**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+function values(object) {
+ return object == null ? [] : baseValues(object, keys(object));
+}
+
+module.exports = values;
diff --git a/node_modules/lodash/valuesIn.js b/node_modules/lodash/valuesIn.js
new file mode 100644
index 0000000..6296094
--- /dev/null
+++ b/node_modules/lodash/valuesIn.js
@@ -0,0 +1,32 @@
+var baseValues = require('./_baseValues'),
+ keysIn = require('./keysIn');
+
+/**
+ * Creates an array of the own and inherited enumerable string keyed property
+ * values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.valuesIn(new Foo);
+ * // => [1, 2, 3] (iteration order is not guaranteed)
+ */
+function valuesIn(object) {
+ return object == null ? [] : baseValues(object, keysIn(object));
+}
+
+module.exports = valuesIn;
diff --git a/node_modules/lodash/without.js b/node_modules/lodash/without.js
new file mode 100644
index 0000000..3a28e8a
--- /dev/null
+++ b/node_modules/lodash/without.js
@@ -0,0 +1,31 @@
+var baseDifference = require('./_baseDifference'),
+ baseRest = require('./_baseRest'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * Creates an array excluding all given values using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.pull`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...*} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.xor
+ * @example
+ *
+ * _.without([2, 1, 2, 3], 1, 2);
+ * // => [3]
+ */
+var without = baseRest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, values)
+ : [];
+});
+
+module.exports = without;
diff --git a/node_modules/lodash/words.js b/node_modules/lodash/words.js
new file mode 100644
index 0000000..6d7cdd1
--- /dev/null
+++ b/node_modules/lodash/words.js
@@ -0,0 +1,35 @@
+var asciiWords = require('./_asciiWords'),
+ hasUnicodeWord = require('./_hasUnicodeWord'),
+ toString = require('./toString'),
+ unicodeWords = require('./_unicodeWords');
+
+/**
+ * Splits `string` into an array of its words.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {RegExp|string} [pattern] The pattern to match words.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the words of `string`.
+ * @example
+ *
+ * _.words('fred, barney, & pebbles');
+ * // => ['fred', 'barney', 'pebbles']
+ *
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
+ * // => ['fred', 'barney', '&', 'pebbles']
+ */
+function words(string, pattern, guard) {
+ string = toString(string);
+ pattern = guard ? undefined : pattern;
+
+ if (pattern === undefined) {
+ return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
+ }
+ return string.match(pattern) || [];
+}
+
+module.exports = words;
diff --git a/node_modules/lodash/wrap.js b/node_modules/lodash/wrap.js
new file mode 100644
index 0000000..cad3c50
--- /dev/null
+++ b/node_modules/lodash/wrap.js
@@ -0,0 +1,30 @@
+var castFunction = require('./_castFunction'),
+ partial = require('./partial');
+
+/**
+ * Creates a function that provides `value` to `wrapper` as its first
+ * argument. Any additional arguments provided to the function are appended
+ * to those provided to the `wrapper`. The wrapper is invoked with the `this`
+ * binding of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {*} value The value to wrap.
+ * @param {Function} [wrapper=identity] The wrapper function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var p = _.wrap(_.escape, function(func, text) {
+ * return '<p>' + func(text) + '</p>';
+ * });
+ *
+ * p('fred, barney, & pebbles');
+ * // => '<p>fred, barney, &amp; pebbles</p>'
+ */
+function wrap(value, wrapper) {
+ return partial(castFunction(wrapper), value);
+}
+
+module.exports = wrap;
diff --git a/node_modules/lodash/wrapperAt.js b/node_modules/lodash/wrapperAt.js
new file mode 100644
index 0000000..6f6a1d0
--- /dev/null
+++ b/node_modules/lodash/wrapperAt.js
@@ -0,0 +1,48 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ LodashWrapper = require('./_LodashWrapper'),
+ baseAt = require('./_baseAt'),
+ flatRest = require('./_flatRest'),
+ isIndex = require('./_isIndex'),
+ thru = require('./thru');
+
+/**
+ * This method is the wrapper version of `_.at`.
+ *
+ * @name at
+ * @memberOf _
+ * @since 1.0.0
+ * @category Seq
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _(object).at(['a[0].b.c', 'a[1]']).value();
+ * // => [3, 4]
+ */
+var wrapperAt = flatRest(function(paths) {
+ var length = paths.length,
+ start = length ? paths[0] : 0,
+ value = this.__wrapped__,
+ interceptor = function(object) { return baseAt(object, paths); };
+
+ if (length > 1 || this.__actions__.length ||
+ !(value instanceof LazyWrapper) || !isIndex(start)) {
+ return this.thru(interceptor);
+ }
+ value = value.slice(start, +start + (length ? 1 : 0));
+ value.__actions__.push({
+ 'func': thru,
+ 'args': [interceptor],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(value, this.__chain__).thru(function(array) {
+ if (length && !array.length) {
+ array.push(undefined);
+ }
+ return array;
+ });
+});
+
+module.exports = wrapperAt;
diff --git a/node_modules/lodash/wrapperChain.js b/node_modules/lodash/wrapperChain.js
new file mode 100644
index 0000000..bda2ce6
--- /dev/null
+++ b/node_modules/lodash/wrapperChain.js
@@ -0,0 +1,34 @@
+var chain = require('./chain');
+
+/**
+ * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
+ *
+ * @name chain
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * // A sequence without explicit chaining.
+ * _(users).head();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // A sequence with explicit chaining.
+ * _(users)
+ * .chain()
+ * .head()
+ * .pick('user')
+ * .value();
+ * // => { 'user': 'barney' }
+ */
+function wrapperChain() {
+ return chain(this);
+}
+
+module.exports = wrapperChain;
diff --git a/node_modules/lodash/wrapperLodash.js b/node_modules/lodash/wrapperLodash.js
new file mode 100644
index 0000000..bd6e8ad
--- /dev/null
+++ b/node_modules/lodash/wrapperLodash.js
@@ -0,0 +1,147 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ LodashWrapper = require('./_LodashWrapper'),
+ baseLodash = require('./_baseLodash'),
+ isArray = require('./isArray'),
+ isObjectLike = require('./isObjectLike'),
+ wrapperClone = require('./_wrapperClone');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates a `lodash` object which wraps `value` to enable implicit method
+ * chain sequences. Methods that operate on and return arrays, collections,
+ * and functions can be chained together. Methods that retrieve a single value
+ * or may return a primitive value will automatically end the chain sequence
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
+ * with `_#value`.
+ *
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
+ * enabled using `_.chain`.
+ *
+ * The execution of chained methods is lazy, that is, it's deferred until
+ * `_#value` is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion.
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
+ * the creation of intermediate arrays and can greatly reduce the number of
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
+ * fusion if the section is applied to an array and iteratees accept only
+ * one argument. The heuristic for whether a section qualifies for shortcut
+ * fusion is subject to change.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
+ * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
+ * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
+ * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
+ * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
+ * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
+ * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
+ * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
+ * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
+ * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
+ * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
+ * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
+ * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
+ * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
+ * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
+ * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
+ * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
+ * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
+ * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
+ * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
+ * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
+ * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
+ * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
+ * `upperFirst`, `value`, and `words`
+ *
+ * @name _
+ * @constructor
+ * @category Seq
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // Returns an unwrapped value.
+ * wrapped.reduce(_.add);
+ * // => 6
+ *
+ * // Returns a wrapped value.
+ * var squares = wrapped.map(square);
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+function lodash(value) {
+ if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
+ if (value instanceof LodashWrapper) {
+ return value;
+ }
+ if (hasOwnProperty.call(value, '__wrapped__')) {
+ return wrapperClone(value);
+ }
+ }
+ return new LodashWrapper(value);
+}
+
+// Ensure wrappers are instances of `baseLodash`.
+lodash.prototype = baseLodash.prototype;
+lodash.prototype.constructor = lodash;
+
+module.exports = lodash;
diff --git a/node_modules/lodash/wrapperReverse.js b/node_modules/lodash/wrapperReverse.js
new file mode 100644
index 0000000..e93112a
--- /dev/null
+++ b/node_modules/lodash/wrapperReverse.js
@@ -0,0 +1,44 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ LodashWrapper = require('./_LodashWrapper'),
+ reverse = require('./reverse'),
+ thru = require('./thru');
+
+/**
+ * This method is the wrapper version of `_.reverse`.
+ *
+ * **Note:** This method mutates the wrapped array.
+ *
+ * @name reverse
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _(array).reverse().value()
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+function wrapperReverse() {
+ var value = this.__wrapped__;
+ if (value instanceof LazyWrapper) {
+ var wrapped = value;
+ if (this.__actions__.length) {
+ wrapped = new LazyWrapper(this);
+ }
+ wrapped = wrapped.reverse();
+ wrapped.__actions__.push({
+ 'func': thru,
+ 'args': [reverse],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(wrapped, this.__chain__);
+ }
+ return this.thru(reverse);
+}
+
+module.exports = wrapperReverse;
diff --git a/node_modules/lodash/wrapperValue.js b/node_modules/lodash/wrapperValue.js
new file mode 100644
index 0000000..f56c2da
--- /dev/null
+++ b/node_modules/lodash/wrapperValue.js
@@ -0,0 +1,21 @@
+var baseWrapperValue = require('./_baseWrapperValue');
+
+/**
+ * Executes the chain sequence to resolve the unwrapped value.
+ *
+ * @name value
+ * @memberOf _
+ * @since 0.1.0
+ * @alias toJSON, valueOf
+ * @category Seq
+ * @returns {*} Returns the resolved unwrapped value.
+ * @example
+ *
+ * _([1, 2, 3]).value();
+ * // => [1, 2, 3]
+ */
+function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+}
+
+module.exports = wrapperValue;
diff --git a/node_modules/lodash/xor.js b/node_modules/lodash/xor.js
new file mode 100644
index 0000000..d4d2860
--- /dev/null
+++ b/node_modules/lodash/xor.js
@@ -0,0 +1,28 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseRest = require('./_baseRest'),
+ baseXor = require('./_baseXor'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * Creates an array of unique values that is the
+ * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
+ * of the given arrays. The order of result values is determined by the order
+ * they occur in the arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.without
+ * @example
+ *
+ * _.xor([2, 1], [2, 3]);
+ * // => [1, 3]
+ */
+var xor = baseRest(function(arrays) {
+ return baseXor(arrayFilter(arrays, isArrayLikeObject));
+});
+
+module.exports = xor;
diff --git a/node_modules/lodash/xorBy.js b/node_modules/lodash/xorBy.js
new file mode 100644
index 0000000..e047895
--- /dev/null
+++ b/node_modules/lodash/xorBy.js
@@ -0,0 +1,39 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ baseXor = require('./_baseXor'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.xor` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which by which they're compared. The order of result values is determined
+ * by the order they occur in the arrays. The iteratee is invoked with one
+ * argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [1.2, 3.4]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+var xorBy = baseRest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), baseIteratee(iteratee, 2));
+});
+
+module.exports = xorBy;
diff --git a/node_modules/lodash/xorWith.js b/node_modules/lodash/xorWith.js
new file mode 100644
index 0000000..e3a8ac6
--- /dev/null
+++ b/node_modules/lodash/xorWith.js
@@ -0,0 +1,34 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseRest = require('./_baseRest'),
+ baseXor = require('./_baseXor'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.xor` except that it accepts `comparator` which is
+ * invoked to compare elements of `arrays`. The order of result values is
+ * determined by the order they occur in the arrays. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.xorWith(objects, others, _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+var xorWith = baseRest(function(arrays) {
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
+});
+
+module.exports = xorWith;
diff --git a/node_modules/lodash/zip.js b/node_modules/lodash/zip.js
new file mode 100644
index 0000000..c800ab3
--- /dev/null
+++ b/node_modules/lodash/zip.js
@@ -0,0 +1,22 @@
+var baseRest = require('./_baseRest'),
+ unzip = require('./unzip');
+
+/**
+ * Creates an array of grouped elements, the first of which contains the
+ * first elements of the given arrays, the second of which contains the
+ * second elements of the given arrays, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zip(['a', 'b'], [1, 2], [true, false]);
+ * // => [['a', 1, true], ['b', 2, false]]
+ */
+var zip = baseRest(unzip);
+
+module.exports = zip;
diff --git a/node_modules/lodash/zipObject.js b/node_modules/lodash/zipObject.js
new file mode 100644
index 0000000..23fdf14
--- /dev/null
+++ b/node_modules/lodash/zipObject.js
@@ -0,0 +1,24 @@
+var assignValue = require('./_assignValue'),
+ baseZipObject = require('./_baseZipObject');
+
+/**
+ * This method is like `_.fromPairs` except that it accepts two arrays,
+ * one of property identifiers and one of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.4.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObject(['a', 'b'], [1, 2]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+function zipObject(props, values) {
+ return baseZipObject(props || [], values || [], assignValue);
+}
+
+module.exports = zipObject;
diff --git a/node_modules/lodash/zipObjectDeep.js b/node_modules/lodash/zipObjectDeep.js
new file mode 100644
index 0000000..7c858f8
--- /dev/null
+++ b/node_modules/lodash/zipObjectDeep.js
@@ -0,0 +1,23 @@
+var baseSet = require('./_baseSet'),
+ baseZipObject = require('./_baseZipObject');
+
+/**
+ * This method is like `_.zipObject` except that it supports property paths.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
+ * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
+ */
+function zipObjectDeep(props, values) {
+ return baseZipObject(props || [], values || [], baseSet);
+}
+
+module.exports = zipObjectDeep;
diff --git a/node_modules/lodash/zipWith.js b/node_modules/lodash/zipWith.js
new file mode 100644
index 0000000..d7a1f91
--- /dev/null
+++ b/node_modules/lodash/zipWith.js
@@ -0,0 +1,32 @@
+var baseRest = require('./_baseRest'),
+ unzipWith = require('./unzipWith');
+
+/**
+ * This method is like `_.zip` except that it accepts `iteratee` to specify
+ * how grouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * grouped values.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
+ * return a + b + c;
+ * });
+ * // => [111, 222]
+ */
+var zipWith = baseRest(function(arrays) {
+ var length = arrays.length,
+ iteratee = length > 1 ? arrays[length - 1] : undefined;
+
+ iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
+ return unzipWith(arrays, iteratee);
+});
+
+module.exports = zipWith;
diff --git a/node_modules/magic-bytes.js/.github/workflows/build-and-test.yml b/node_modules/magic-bytes.js/.github/workflows/build-and-test.yml
new file mode 100644
index 0000000..199d121
--- /dev/null
+++ b/node_modules/magic-bytes.js/.github/workflows/build-and-test.yml
@@ -0,0 +1,29 @@
+
+name: Build and test
+on:
+ push:
+ branches: [master]
+jobs:
+ buildAndTest:
+ name: Build and test (Node.js v${{ matrix.node-version }})
+ timeout-minutes: 15
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ node-version: [14]
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install Node.js
+ uses: actions/setup-node@v2
+ with:
+ node-version: ${{ matrix.node-version }}
+ registry-url: 'https://registry.npmjs.org'
+ - name: Install install dependencies
+ run: npm ci
+ - name: test
+ run: npm test
+ - name: build
+ run: npm run build
+ - run: npm publish
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_SECRET_TOKEN }}
diff --git a/node_modules/magic-bytes.js/.prettierignore b/node_modules/magic-bytes.js/.prettierignore
new file mode 100644
index 0000000..84184c6
--- /dev/null
+++ b/node_modules/magic-bytes.js/.prettierignore
@@ -0,0 +1 @@
+src/pattern-tree.snapshot.ts
diff --git a/node_modules/magic-bytes.js/LICENSE b/node_modules/magic-bytes.js/LICENSE
new file mode 100644
index 0000000..b9455e9
--- /dev/null
+++ b/node_modules/magic-bytes.js/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Lars Kölpin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/magic-bytes.js/README.md b/node_modules/magic-bytes.js/README.md
new file mode 100644
index 0000000..9428b95
--- /dev/null
+++ b/node_modules/magic-bytes.js/README.md
@@ -0,0 +1,92 @@
+# Magic bytes
+
+[![Build Status](https://travis-ci.org/LarsKoelpin/magic-bytes.svg?branch=master)](https://travis-ci.org/LarsKoelpin/magic-bytes)
+
+
+Magic Bytes is a javascript library analyzing the first bytes of a file to tell you its type. The procedure
+is based on https://en.wikipedia.org/wiki/List_of_file_signatures.
+
+# Installation
+Run `npm install magic-bytes.js`
+
+# Usage
+On server:
+```javascript
+import filetype from 'magic-bytes.js'
+
+filetype(fs.readFileSync("myimage.png")) // ["png"]
+```
+
+Using HTML:
+```html
+<input type="file" id="file" />
+
+ <script src="node_modules/magic-bytes.js/dist/browser.js" type="application/javascript"></script>
+<script>
+ document.getElementById("file").addEventListener('change', (event, x) => {
+ const fileReader = new FileReader();
+ fileReader.onloadend = (f) => {
+ const bytes = new Uint8Array(f.target.result);
+ console.log("Possible filetypes: " + filetypeinfo(bytes))
+ }
+ fileReader.readAsArrayBuffer(event.target.files[0])
+ })
+</script>
+```
+
+# API
+The following functions are availble:
+* `filetypeinfo(bytes: number[])` Contains typeinformation like name, extension and mime type: `[{typename: "zip"}, {typename: "jar"}]`
+* `filetypename(bytes: number[])` : Contains type names only: `["zip", "jar"]`
+* `filetypemime(bytes: number[])` : Contains type mime types only: `["application/zip", "application/jar"]`
+* `filetypeextension(bytes: number[])` : Contains type extensions only: `["zip", "jar"]`
+
+Both function return an empty array `[]` otherwise, which means it could not detect the file signature. Keep in mind that
+txt files for example fall in this category.
+
+You don't have to load the whole file in memory. For validating a file uploaded to S3 using Lambda for example, it may be
+enough to load the files first 100 bytes and validate against them. This is especially useful for big files.
+
+see examples for practical usage.
+
+# Tests
+Run `npm test`
+
+# Example
+See examples/
+
+# How does it work
+The `create-snapshot.js` creates a new tree. The tree has a similar shape to the following
+```json
+{
+ "0x47": {
+ "0x49": {
+ "0x46": {
+ "0x38": {
+ "0x37": {
+ "0x61": {
+ "matches": [
+ {
+ "typename": "gif",
+ "mime": "image/gif",
+ "extension": "gif"
+ }
+ ]
+ }
+ },
+ }
+ }
+ }
+ }
+}
+```
+
+It acts as a giant lookup map for the given byte signatures. To check all available entries, have a look at `pattern-tree.js` and its
+generated `pattern-tree.snapshot`, which acts as a static resource.
+
+# Supported types
+Please refer to `src/pattern-tree.js`
+
+# Roadmap
+* Specialize type detection(like zip) using offset-subtrees
+* Add encoding detection
diff --git a/node_modules/magic-bytes.js/dist/create-snapshot.d.ts b/node_modules/magic-bytes.js/dist/create-snapshot.d.ts
new file mode 100644
index 0000000..a73b3f0
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/create-snapshot.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=create-snapshot.d.ts.map \ No newline at end of file
diff --git a/node_modules/magic-bytes.js/dist/create-snapshot.d.ts.map b/node_modules/magic-bytes.js/dist/create-snapshot.d.ts.map
new file mode 100644
index 0000000..a52325c
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/create-snapshot.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"create-snapshot.d.ts","sourceRoot":"","sources":["../src/create-snapshot.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/magic-bytes.js/dist/create-snapshot.js b/node_modules/magic-bytes.js/dist/create-snapshot.js
new file mode 100644
index 0000000..8060000
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/create-snapshot.js
@@ -0,0 +1,11 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const pattern_tree_1 = __importDefault(require("./model/pattern-tree"));
+require("fs")
+ .createWriteStream(__dirname + "/pattern-tree.snapshot.ts")
+ .write("// THIS FILE IS AUTOGENERATED. DO NOT EDIT\nexport default " +
+ JSON.stringify(pattern_tree_1.default()) +
+ "\n");
diff --git a/node_modules/magic-bytes.js/dist/index.d.ts b/node_modules/magic-bytes.js/dist/index.d.ts
new file mode 100644
index 0000000..f910c52
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/index.d.ts
@@ -0,0 +1,7 @@
+import { GuessedFile } from "./model/tree";
+export declare const filetypeinfo: (bytes: number[] | Uint8Array | Uint8ClampedArray) => GuessedFile[];
+export default filetypeinfo;
+export declare const filetypename: (bytes: number[] | Uint8Array | Uint8ClampedArray) => string[];
+export declare const filetypemime: (bytes: number[] | Uint8Array | Uint8ClampedArray) => string[];
+export declare const filetypeextension: (bytes: number[] | Uint8Array | Uint8ClampedArray) => string[];
+//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/magic-bytes.js/dist/index.d.ts.map b/node_modules/magic-bytes.js/dist/index.d.ts.map
new file mode 100644
index 0000000..241c4a1
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAc,MAAM,cAAc,CAAC;AAIvD,eAAO,MAAM,YAAY,UAChB,MAAM,EAAE,GAAG,UAAU,GAAG,iBAAiB,KAC/C,WAAW,EAkBb,CAAC;AA0BF,eAAe,YAAY,CAAC;AAE5B,eAAO,MAAM,YAAY,UAAW,MAAM,EAAE,GAAG,UAAU,GAAG,iBAAiB,KAAG,MAAM,EAC1C,CAAC;AAC7C,eAAO,MAAM,YAAY,UAAW,MAAM,EAAE,GAAG,UAAU,GAAG,iBAAiB,KAAG,MAAM,EAC9B,CAAC;AACzD,eAAO,MAAM,iBAAiB,UAAW,MAAM,EAAE,GAAG,UAAU,GAAG,iBAAiB,KAAG,MAAM,EACzB,CAAC"} \ No newline at end of file
diff --git a/node_modules/magic-bytes.js/dist/index.js b/node_modules/magic-bytes.js/dist/index.js
new file mode 100644
index 0000000..7bfde63
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/index.js
@@ -0,0 +1,56 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.filetypeextension = exports.filetypemime = exports.filetypename = exports.filetypeinfo = void 0;
+const pattern_tree_1 = __importDefault(require("./model/pattern-tree"));
+const toHex_1 = require("./model/toHex");
+const patternTree = pattern_tree_1.default();
+const filetypeinfo = (bytes) => {
+ let tree = patternTree;
+ for (const k of Object.keys(tree.offset)) {
+ const offset = toHex_1.fromHex(k);
+ const offsetExceedsFile = offset >= bytes.length;
+ if (offsetExceedsFile) {
+ continue;
+ }
+ const node = patternTree.offset[k];
+ const guessed = walkTree(offset, bytes, node);
+ if (guessed.length > 0) {
+ return guessed;
+ }
+ }
+ if (tree.noOffset === null) {
+ return [];
+ }
+ return walkTree(0, bytes, tree.noOffset);
+};
+exports.filetypeinfo = filetypeinfo;
+const walkTree = (index, bytes, node) => {
+ let step = node;
+ let guessFile = [];
+ while (true) {
+ const currentByte = toHex_1.toHex(bytes[index]);
+ if (step.bytes["?"] && !step.bytes[currentByte]) {
+ step = step.bytes["?"];
+ }
+ else {
+ step = step.bytes[currentByte];
+ }
+ if (!step) {
+ return guessFile;
+ }
+ if (step && step.matches) {
+ guessFile = step.matches.slice(0);
+ }
+ index += 1;
+ }
+};
+exports.default = exports.filetypeinfo;
+const filetypename = (bytes) => exports.filetypeinfo(bytes).map((e) => e.typename);
+exports.filetypename = filetypename;
+const filetypemime = (bytes) => exports.filetypeinfo(bytes).map((e) => (e.mime ? e.mime : ""));
+exports.filetypemime = filetypemime;
+const filetypeextension = (bytes) => exports.filetypeinfo(bytes).map((e) => (e.extension ? e.extension : ""));
+exports.filetypeextension = filetypeextension;
diff --git a/node_modules/magic-bytes.js/dist/index.spec.d.ts b/node_modules/magic-bytes.js/dist/index.spec.d.ts
new file mode 100644
index 0000000..b37c2d2
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/index.spec.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=index.spec.d.ts.map \ No newline at end of file
diff --git a/node_modules/magic-bytes.js/dist/index.spec.d.ts.map b/node_modules/magic-bytes.js/dist/index.spec.d.ts.map
new file mode 100644
index 0000000..47bd666
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/index.spec.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["../src/index.spec.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/magic-bytes.js/dist/model/pattern-tree.d.ts b/node_modules/magic-bytes.js/dist/model/pattern-tree.d.ts
new file mode 100644
index 0000000..2e36330
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/model/pattern-tree.d.ts
@@ -0,0 +1,4 @@
+import { Tree } from "./tree";
+declare const _default: () => Tree;
+export default _default;
+//# sourceMappingURL=pattern-tree.d.ts.map \ No newline at end of file
diff --git a/node_modules/magic-bytes.js/dist/model/pattern-tree.d.ts.map b/node_modules/magic-bytes.js/dist/model/pattern-tree.d.ts.map
new file mode 100644
index 0000000..f555632
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/model/pattern-tree.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"pattern-tree.d.ts","sourceRoot":"","sources":["../../src/model/pattern-tree.ts"],"names":[],"mappings":"AACA,OAAO,EAA8C,IAAI,EAAE,MAAM,QAAQ,CAAC;8BAq3BvD,IAAI;AAAvB,wBAAwC"} \ No newline at end of file
diff --git a/node_modules/magic-bytes.js/dist/model/pattern-tree.js b/node_modules/magic-bytes.js/dist/model/pattern-tree.js
new file mode 100644
index 0000000..68228fe
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/model/pattern-tree.js
@@ -0,0 +1,764 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const toHex_1 = require("./toHex");
+const tree_1 = require("./tree");
+// https://en.wikipedia.org/wiki/List_of_file_signatures
+let fileType = new Map();
+let tree = {
+ noOffset: null,
+ offset: {},
+};
+const add = (typename, signature, additionalInfo, offset) => {
+ fileType.set(typename, signature);
+ if (offset) {
+ const existing = tree.offset[toHex_1.toHex(offset)];
+ if (!existing) {
+ tree.offset[toHex_1.toHex(offset)] = tree_1.createComplexNode(typename, signature.map((e) => e.toLowerCase()), additionalInfo);
+ }
+ else {
+ const merged = tree_1.merge(tree_1.createNode(typename, signature.map((e) => e.toLowerCase()), additionalInfo), { ...existing });
+ tree.offset[toHex_1.toHex(offset)] = merged;
+ }
+ }
+ else {
+ if (tree.noOffset === null) {
+ tree.noOffset = tree_1.createComplexNode(typename, signature.map((e) => e.toLowerCase()), additionalInfo);
+ }
+ else {
+ tree.noOffset = tree_1.merge(tree_1.createNode(typename, signature.map((e) => e.toLowerCase()), additionalInfo), tree.noOffset);
+ }
+ }
+};
+add("gif", ["0x47", "0x49", "0x46", "0x38", "0x37", "0x61"], {
+ mime: "image/gif",
+ extension: "gif",
+});
+add("gif", ["0x47", "0x49", "0x46", "0x38", "0x39", "0x61"], {
+ mime: "image/gif",
+ extension: "gif",
+});
+add("jpg", ["0xFF", "0xD8", "0xFF", "0xDB"], {
+ mime: "image/jpeg",
+ extension: "jpeg",
+});
+add("jpg", [
+ "0xFF",
+ "0xD8",
+ "0xFF",
+ "0xE0",
+ "?",
+ "?",
+ "0x4A",
+ "0x46",
+ "0x49",
+ "0x46",
+ "0x00",
+ "0x01",
+], { mime: "image/jpeg", extension: "jpeg" });
+add("jpg", [
+ "0xFF",
+ "0xD8",
+ "0xFF",
+ "0xE1",
+ "?",
+ "?",
+ "0x45",
+ "0x78",
+ "0x69",
+ "0x66",
+ "0x00",
+ "0x00",
+], { mime: "image/jpeg", extension: "jpeg" });
+add("webp", [
+ "0x52",
+ "0x49",
+ "0x46",
+ "0x46",
+ "?",
+ "?",
+ "?",
+ "?",
+ "0x57",
+ "0x45",
+ "0x42",
+ "0x50",
+], { mime: "image/webp", extension: "webp" });
+add("heif", ["0x66", "0x74", "0x79", "0x70", "0x6D", "0x69", "0x66", "0x31"], { mime: "image/heif", extension: "heif" }, 4);
+add("heif", ["0x66", "0x74", "0x79", "0x70", "0x68", "0x65", "0x69", "0x63"], { mime: "image/heif", extension: "heic" }, 4);
+add("rpm", ["0xed", "0xab", "0xee", "0xdb"]);
+add("bin", ["0x53", "0x50", "0x30", "0x31"], {
+ mime: "application/octet-stream",
+ extension: "bin",
+});
+add("pic", ["0x00"]);
+add("pif", ["0x00"]);
+add("sea", ["0x00"]);
+add("ytr", ["0x00"]);
+// 66747970
+// 6D703432
+add("mp4", ["0x66", "0x74", "0x79", "0x70"], { mime: "video/mp4", extension: "mp4" }, 0x4);
+add("pdb", [
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+]);
+add("dba", ["0xBE", "0xBA", "0xFE", "0xCA"]);
+add("dba2", ["0x00", "0x01", "0x42", "0x44"]);
+add("tda", ["0x00", "0x01", "0x44", "0x54"]);
+add("tda2", ["0x00", "0x01", "0x00", "0x00"]);
+add("ico", ["0x00", "0x00", "0x01", "0x00"], {
+ mime: "image/x-icon",
+ extension: "ico",
+});
+add("3gp", ["0x66", "0x74", "0x79", "0x70", "0x33", "0x67"]);
+add("z", ["0x1F", "0x9D"]);
+add("tar.z", ["0x1F", "0xA0"]);
+add("bac", [
+ "0x42",
+ "0x41",
+ "0x43",
+ "0x4B",
+ "0x4D",
+ "0x49",
+ "0x4B",
+ "0x45",
+ "0x44",
+ "0x49",
+ "0x53",
+ "0x4B",
+]);
+add("bz2", ["0x42", "0x5A", "0x68"], {
+ mime: "application/x-bzip2",
+ extension: "bz2",
+});
+add("tif", ["0x49", "0x49", "0x2A", "0x00"], {
+ mime: "image/tiff",
+ extension: "tif",
+});
+add("tiff", ["0x4D", "0x4D", "0x00", "0x2A"], {
+ mime: "image/tiff",
+ extension: "tiff",
+});
+add("cr2", [
+ "0x49",
+ "0x49",
+ "0x2A",
+ "0x00",
+ "0x10",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x43",
+ "0x52",
+]);
+add("cin", ["0x80", "0x2A", "0x5F", "0xD7"]);
+add("cin1", ["0x52", "0x4E", "0x43", "0x01"]);
+add("cin2", ["0x52", "0x4E", "0x43", "0x02"]);
+add("dpx", ["0x53", "0x44", "0x50", "0x58"]);
+add("dpx2", ["0x58", "0x50", "0x44", "0x53"]);
+add("exr", ["0x76", "0x2F", "0x31", "0x01"]);
+add("bpg", ["0x42", "0x50", "0x47", "0xFB"]);
+add("ilbm", [
+ "0x46",
+ "0x4F",
+ "0x52",
+ "0x4D",
+ "?",
+ "?",
+ "?",
+ "?",
+ "0x49",
+ "0x4C",
+ "0x42",
+ "0x4D",
+]);
+add("8svx", [
+ "0x46",
+ "0x4F",
+ "0x52",
+ "0x4D",
+ "?",
+ "?",
+ "?",
+ "?",
+ "0x38",
+ "0x53",
+ "0x56",
+ "0x58",
+]);
+add("acbm", [
+ "0x46",
+ "0x4F",
+ "0x52",
+ "0x4D",
+ "?",
+ "?",
+ "?",
+ "?",
+ "0x41",
+ "0x43",
+ "0x42",
+ "0x4D",
+]);
+add("anbm", [
+ "0x46",
+ "0x4F",
+ "0x52",
+ "0x4D",
+ "?",
+ "?",
+ "?",
+ "?",
+ "0x41",
+ "0x4E",
+ "0x42",
+ "0x4D",
+]);
+add("anim", [
+ "0x46",
+ "0x4F",
+ "0x52",
+ "0x4D",
+ "?",
+ "?",
+ "?",
+ "?",
+ "0x41",
+ "0x4E",
+ "0x49",
+ "0x4D",
+]);
+add("faxx", [
+ "0x46",
+ "0x4F",
+ "0x52",
+ "0x4D",
+ "?",
+ "?",
+ "?",
+ "?",
+ "0x46",
+ "0x41",
+ "0x58",
+ "0x58",
+]);
+add("ftxt", [
+ "0x46",
+ "0x4F",
+ "0x52",
+ "0x4D",
+ "?",
+ "?",
+ "?",
+ "?",
+ "0x46",
+ "0x54",
+ "0x58",
+ "0x54",
+]);
+add("smus", [
+ "0x46",
+ "0x4F",
+ "0x52",
+ "0x4D",
+ "?",
+ "?",
+ "?",
+ "?",
+ "0x53",
+ "0x4D",
+ "0x55",
+ "0x53",
+]);
+add("cmus", [
+ "0x46",
+ "0x4F",
+ "0x52",
+ "0x4D",
+ "?",
+ "?",
+ "?",
+ "?",
+ "0x43",
+ "0x4D",
+ "0x55",
+ "0x53",
+]);
+add("yuvn", [
+ "0x46",
+ "0x4F",
+ "0x52",
+ "0x4D",
+ "?",
+ "?",
+ "?",
+ "?",
+ "0x59",
+ "0x55",
+ "0x56",
+ "0x4E",
+]);
+add("iff", [
+ "0x46",
+ "0x4F",
+ "0x52",
+ "0x4D",
+ "?",
+ "?",
+ "?",
+ "?",
+ "0x46",
+ "0x41",
+ "0x4E",
+ "0x54",
+]);
+add("aiff", [
+ "0x46",
+ "0x4F",
+ "0x52",
+ "0x4D",
+ "?",
+ "?",
+ "?",
+ "?",
+ "0x41",
+ "0x49",
+ "0x46",
+ "0x46",
+], { mime: "audio/x-aiff", extension: "aiff" });
+add("idx", ["0x49", "0x4E", "0x44", "0x58"]);
+add("lz", ["0x4C", "0x5A", "0x49", "0x50"]);
+add("exe", ["0x4D", "0x5A"]);
+add("zip", ["0x50", "0x4B", "0x03", "0x04"], {
+ mime: "application/zip",
+ extension: "zip",
+});
+add("zip", ["0x50", "0x4B", "0x05", "0x06"], {
+ mime: "application/zip",
+ extension: "zip",
+});
+add("zip", ["0x50", "0x4B", "0x07", "0x08"], {
+ mime: "application/zip",
+ extension: "zip",
+});
+add("jar", ["0x50", "0x4B", "0x03", "0x04"], {
+ mime: "application/java-archive",
+ extension: "jar",
+});
+add("jar", ["0x50", "0x4B", "0x05", "0x06"], {
+ mime: "application/java-archive",
+ extension: "jar",
+});
+add("jar", ["0x50", "0x4B", "0x07", "0x08"], {
+ mime: "application/java-archive",
+ extension: "jar",
+});
+add("odt", ["0x50", "0x4B", "0x03", "0x04"], {
+ mime: "application/vnd.oasis.opendocument.text",
+ extension: "odt",
+});
+add("odt", ["0x50", "0x4B", "0x05", "0x06"], {
+ mime: "application/vnd.oasis.opendocument.text",
+ extension: "odt",
+});
+add("odt", ["0x50", "0x4B", "0x07", "0x08"], {
+ mime: "application/vnd.oasis.opendocument.text",
+ extension: "odt",
+});
+add("ods", ["0x50", "0x4B", "0x03", "0x04"], {
+ mime: "application/vnd.oasis.opendocument.spreadsheet",
+ extension: "ods",
+});
+add("ods", ["0x50", "0x4B", "0x05", "0x06"], {
+ mime: "application/vnd.oasis.opendocument.spreadsheet",
+ extension: "ods",
+});
+add("ods", ["0x50", "0x4B", "0x07", "0x08"], {
+ mime: "application/vnd.oasis.opendocument.spreadsheet",
+ extension: "ods",
+});
+add("odp", ["0x50", "0x4B", "0x03", "0x04"], {
+ mime: "application/vnd.oasis.opendocument.presentation",
+ extension: "odp",
+});
+add("odp", ["0x50", "0x4B", "0x05", "0x06"], {
+ mime: "application/vnd.oasis.opendocument.presentation",
+ extension: "odp",
+});
+add("odp", ["0x50", "0x4B", "0x07", "0x08"], {
+ mime: "application/vnd.oasis.opendocument.presentation",
+ extension: "odp",
+});
+add("docx", ["0x50", "0x4B", "0x03", "0x04"], {
+ mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+ extension: "docx",
+});
+add("docx", ["0x50", "0x4B", "0x05", "0x06"], {
+ mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+ extension: "docx",
+});
+add("docx", ["0x50", "0x4B", "0x07", "0x08"], {
+ mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+ extension: "docx",
+});
+add("xlsx", ["0x50", "0x4B", "0x03", "0x04"], {
+ mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+ extension: "xlsx",
+});
+add("xlsx", ["0x50", "0x4B", "0x05", "0x06"], {
+ mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+ extension: "xlsx",
+});
+add("xlsx", ["0x50", "0x4B", "0x07", "0x08"], {
+ mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+ extension: "xlsx",
+});
+add("pptx", ["0x50", "0x4B", "0x03", "0x04"], {
+ mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
+ extension: "pptx",
+});
+add("pptx", ["0x50", "0x4B", "0x05", "0x06"], {
+ mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
+ extension: "pptx",
+});
+add("pptx", ["0x50", "0x4B", "0x07", "0x08"], {
+ mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
+ extension: "pptx",
+});
+add("vsdx", ["0x50", "0x4B", "0x03", "0x04"]);
+add("vsdx", ["0x50", "0x4B", "0x05", "0x06"]);
+add("vsdx", ["0x50", "0x4B", "0x07", "0x08"]);
+add("apk", ["0x50", "0x4B", "0x03", "0x04"]);
+add("apk", ["0x50", "0x4B", "0x05", "0x06"]);
+add("apk", ["0x50", "0x4B", "0x07", "0x08"]);
+add("aar", ["0x50", "0x4B", "0x03", "0x04"]);
+add("aar", ["0x50", "0x4B", "0x05", "0x06"]);
+add("aar", ["0x50", "0x4B", "0x07", "0x08"]);
+add("rar", ["0x52", "0x61", "0x72", "0x21", "0x1A", "0x07", "0x00"], {
+ mime: "application/vnd.rar",
+ extension: "rar",
+});
+add("rar", ["0x52", "0x61", "0x72", "0x21", "0x1A", "0x07", "0x01", "0x00"], {
+ mime: "application/vnd.rar",
+ extension: "rar",
+});
+add("rar", ["0x7F", "0x45", "0x4C", "0x46"], {
+ mime: "application/vnd.rar",
+ extension: "rar",
+});
+add("png", ["0x89", "0x50", "0x4E", "0x47", "0x0D", "0x0A", "0x1A", "0x0A"], {
+ mime: "image/png",
+ extension: "png",
+});
+add("apng", ["0x89", "0x50", "0x4E", "0x47", "0x0D", "0x0A", "0x1A", "0x0A"], {
+ mime: "image/apng",
+ extension: "apng",
+});
+add("class", ["0xCA", "0xFE", "0xBA", "0xBE"]);
+add("class", ["0xEF", "0xBB", "0xBF"]);
+add("class", ["0xFE", "0xed", "0xFA", "0xCE"], undefined, 0x1000);
+add("class", ["0xFE", "0xed", "0xFA", "0xCF"], undefined, 0x1000);
+add("class", ["0xCE", "0xFA", "0xed", "0xFE"]);
+add("class", ["0xCF", "0xFA", "0xed", "0xFE"]);
+add("class", ["0xFF", "0xFE"]);
+add("class", ["0xFF", "0xFE"]);
+add("class", ["0xFF", "0xFE", "0x00", "0x00"]);
+add("ps", ["0x25", "0x21", "0x50", "0x53"]);
+add("pdf", ["0x25", "0x50", "0x44", "0x46"], {
+ mime: "application/pdf",
+ extension: "pdf",
+});
+add("asf", [
+ "0x30",
+ "0x26",
+ "0xB2",
+ "0x75",
+ "0x8E",
+ "0x66",
+ "0xCF",
+ "0x11",
+ "0xA6",
+ "0xD9",
+ "0x00",
+ "0xAA",
+ "0x00",
+ "0x62",
+ "0xCE",
+ "0x6C",
+]);
+add("wma", [
+ "0x30",
+ "0x26",
+ "0xB2",
+ "0x75",
+ "0x8E",
+ "0x66",
+ "0xCF",
+ "0x11",
+ "0xA6",
+ "0xD9",
+ "0x00",
+ "0xAA",
+ "0x00",
+ "0x62",
+ "0xCE",
+ "0x6C",
+]);
+add("wmv", [
+ "0x30",
+ "0x26",
+ "0xB2",
+ "0x75",
+ "0x8E",
+ "0x66",
+ "0xCF",
+ "0x11",
+ "0xA6",
+ "0xD9",
+ "0x00",
+ "0xAA",
+ "0x00",
+ "0x62",
+ "0xCE",
+ "0x6C",
+]);
+add("deploymentimage", [
+ "0x24",
+ "0x53",
+ "0x44",
+ "0x49",
+ "0x30",
+ "0x30",
+ "0x30",
+ "0x31",
+]);
+add("ogg", ["0x4F", "0x67", "0x67", "0x53"], {
+ mime: "audio/ogg",
+ extension: "ogg",
+});
+add("oga", ["0x4F", "0x67", "0x67", "0x53"], {
+ mime: "audio/ogg",
+ extension: "oga",
+});
+add("ogv", ["0x4F", "0x67", "0x67", "0x53"], {
+ mime: "video/ogg",
+ extension: "ogv",
+});
+add("psd", ["0x38", "0x42", "0x50", "0x53"], {
+ mime: "application/x-photoshop",
+ extension: "psd",
+});
+add("clip", ["0x43", "0x53", "0x46", "0x43", "0x48", "0x55", "0x4e", "0x4b"]);
+add("wav", [
+ "0x52",
+ "0x49",
+ "0x46",
+ "0x46",
+ "?",
+ "?",
+ "?",
+ "?",
+ "0x57",
+ "0x41",
+ "0x56",
+ "0x45",
+], { mime: "audio/x-wav", extension: "wav" });
+add("avi", [
+ "0x52",
+ "0x49",
+ "0x46",
+ "0x46",
+ "?",
+ "?",
+ "?",
+ "?",
+ "0x41",
+ "0x56",
+ "0x49",
+ "0x20",
+], { mime: "video/x-msvideo", extension: "avi" });
+add("mp3", ["0xFF", "0xFB"], { mime: "audio/mpeg", extension: "mp3" });
+add("mp3", ["0xFF", "0xF3"], { mime: "audio/mpeg", extension: "mp3" });
+add("mp3", ["0xFF", "0xF2"], { mime: "audio/mpeg", extension: "mp3" });
+add("mp3", ["0x49", "0x44", "0x33"], { mime: "audio/mpeg", extension: "mp3" });
+add("bmp", ["0x42", "0x4D"], { mime: "image/bmp", extension: "bmp" });
+add("iso", ["0x43", "0x44", "0x30", "0x30", "0x31"]);
+add("flac", ["0x66", "0x4C", "0x61", "0x43"]);
+add("mid", ["0x4D", "0x54", "0x68", "0x64"], {
+ mime: "audio/midi",
+ extension: "mid",
+});
+add("midi", ["0x4D", "0x54", "0x68", "0x64"], {
+ mime: "audio/midi",
+ extension: "midi",
+});
+add("doc", ["0xD0", "0xCF", "0x11", "0xE0", "0xA1", "0xB1", "0x1A", "0xE1"], {
+ mime: "application/msword",
+ extension: "doc",
+});
+add("xls", ["0xD0", "0xCF", "0x11", "0xE0", "0xA1", "0xB1", "0x1A", "0xE1"], {
+ mime: "application/vnd.ms-excel",
+ extension: "xls",
+});
+add("ppt", ["0xD0", "0xCF", "0x11", "0xE0", "0xA1", "0xB1", "0x1A", "0xE1"], {
+ mime: "application/vnd.ms-powerpoint",
+ extension: "ppt",
+});
+add("msg", ["0xD0", "0xCF", "0x11", "0xE0", "0xA1", "0xB1", "0x1A", "0xE1"]);
+add("dex", ["0x64", "0x65", "0x78", "0x0A", "0x30", "0x33", "0x35", "0x00"]);
+add("vmdk", ["0x4B", "0x44", "0x4D"]);
+add("crx", ["0x43", "0x72", "0x32", "0x34"]);
+add("fh8", ["0x41", "0x47", "0x44", "0x33"]);
+add("cwk", [
+ "0x05",
+ "0x07",
+ "0x00",
+ "0x00",
+ "0x42",
+ "0x4F",
+ "0x42",
+ "0x4F",
+ "0x05",
+ "0x07",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x01",
+]);
+add("cwk", [
+ "0x06",
+ "0x07",
+ "0xE1",
+ "0x00",
+ "0x42",
+ "0x4F",
+ "0x42",
+ "0x4F",
+ "0x06",
+ "0x07",
+ "0xE1",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x00",
+ "0x01",
+]);
+add("toast", ["0x45", "0x52", "0x02", "0x00", "0x00", "0x00"]);
+add("toast", ["0x8B", "0x45", "0x52", "0x02", "0x00", "0x00", "0x00"]);
+add("dmg", ["0x78", "0x01", "0x73", "0x0D", "0x62", "0x62", "0x60"]);
+add("xar", ["0x78", "0x61", "0x72", "0x21"]);
+add("dat", ["0x50", "0x4D", "0x4F", "0x43", "0x43", "0x4D", "0x4F", "0x43"]);
+add("nes", ["0x4E", "0x45", "0x53", "0x1A"]);
+add("tar", ["0x75", "0x73", "0x74", "0x61", "0x72", "0x00", "0x30", "0x30"], undefined, 0x101);
+add("tar", ["0x75", "0x73", "0x74", "0x61", "0x72", "0x20", "0x20", "0x00"], undefined, 0x101);
+add("tox", ["0x74", "0x6F", "0x78", "0x33"]);
+add("mlv", ["0x4D", "0x4C", "0x56", "0x49"]);
+add("windowsupdate", [
+ "0x44",
+ "0x43",
+ "0x4D",
+ "0x01",
+ "0x50",
+ "0x41",
+ "0x33",
+ "0x30",
+]);
+add("7z", ["0x37", "0x7A", "0xBC", "0xAF", "0x27", "0x1C"], {
+ mime: "application/x-7z-compressed",
+ extension: "7z",
+});
+add("gz", ["0x1F", "0x8B"], { mime: "application/gzip", extension: "gz" });
+add("tar.gz", ["0x1F", "0x8B"], {
+ mime: "application/gzip",
+ extension: "tar.gz",
+});
+add("xz", ["0xFD", "0x37", "0x7A", "0x58", "0x5A", "0x00", "0x00"], {
+ mime: "application/gzip",
+ extension: "xz",
+});
+add("tar.xz", ["0xFD", "0x37", "0x7A", "0x58", "0x5A", "0x00", "0x00"], {
+ mime: "application/gzip",
+ extension: "tar.xz",
+});
+add("lz2", ["0x04", "0x22", "0x4D", "0x18"]);
+add("cab", ["0x4D", "0x53", "0x43", "0x46"]);
+add("mkv", ["0x1A", "0x45", "0xDF", "0xA3"]);
+add("mka", ["0x1A", "0x45", "0xDF", "0xA3"]);
+add("mks", ["0x1A", "0x45", "0xDF", "0xA3"]);
+add("mk3d", ["0x1A", "0x45", "0xDF", "0xA3"]);
+add("webm", ["0x1A", "0x45", "0xDF", "0xA3"], {
+ mime: "audio/webm",
+ extension: "webm",
+});
+add("dcm", ["0x44", "0x49", "0x43", "0x4D"], undefined, 0x80);
+add("xml", ["0x3C", "0x3f", "0x78", "0x6d", "0x6C", "0x20"], {
+ mime: "application/xml",
+ extension: "xml",
+});
+add("wasm", ["0x00", "0x61", "0x73", "0x6d"]);
+add("lep", ["0xCF", "0x84", "0x01"]);
+add("swf", ["0x43", "0x57", "0x53"], {
+ mime: "application/x-shockwave-flash",
+ extension: "swf",
+});
+add("swf", ["0x46", "0x57", "0x53"], {
+ mime: "application/x-shockwave-flash",
+ extension: "swf",
+});
+add("deb", ["0x21", "0x3C", "0x61", "0x72", "0x63", "0x68", "0x3E"]);
+add("rtf", ["0x7B", "0x5C", "0x72", "0x74", "0x66", "0x31"], {
+ mime: "application/rtf",
+ extension: "rtf",
+});
+add("m2p", ["0x00", "0x00", "0x01", "0xBA"]);
+add("vob", ["0x00", "0x00", "0x01", "0xBA"]);
+add("mpg", ["0x00", "0x00", "0x01", "0xBA"], {
+ mime: "video/mpeg",
+ extension: "mpg",
+});
+add("mpeg", ["0x00", "0x00", "0x01", "0xBA"], {
+ mime: "video/mpeg",
+ extension: "mpeg",
+});
+add("mpeg", ["0x47"], { mime: "video/mpeg", extension: "mpeg" });
+add("mpeg", ["0x00", "0x00", "0x01", "0xB3"], {
+ mime: "video/mpeg",
+ extension: "mpeg",
+});
+add("hl2demo", ["48", "4C", "32", "44", "45", "4D", "4F"]);
+exports.default = () => tree;
diff --git a/node_modules/magic-bytes.js/dist/model/toHex.d.ts b/node_modules/magic-bytes.js/dist/model/toHex.d.ts
new file mode 100644
index 0000000..a751029
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/model/toHex.d.ts
@@ -0,0 +1,3 @@
+export declare const toHex: (num: number) => string;
+export declare const fromHex: (hex: string) => number;
+//# sourceMappingURL=toHex.d.ts.map \ No newline at end of file
diff --git a/node_modules/magic-bytes.js/dist/model/toHex.d.ts.map b/node_modules/magic-bytes.js/dist/model/toHex.d.ts.map
new file mode 100644
index 0000000..b8b408a
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/model/toHex.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"toHex.d.ts","sourceRoot":"","sources":["../../src/model/toHex.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,KAAK,QAAS,MAAM,KAAG,MACsB,CAAC;AAC3D,eAAO,MAAM,OAAO,QAAS,MAAM,WAA8B,CAAC"} \ No newline at end of file
diff --git a/node_modules/magic-bytes.js/dist/model/toHex.js b/node_modules/magic-bytes.js/dist/model/toHex.js
new file mode 100644
index 0000000..9e38713
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/model/toHex.js
@@ -0,0 +1,8 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.fromHex = exports.toHex = void 0;
+const hex = (num) => new Number(num).toString(16).toLowerCase();
+const toHex = (num) => `0x${hex(num).length === 1 ? "0" + hex(num) : hex(num)}`;
+exports.toHex = toHex;
+const fromHex = (hex) => new Number(hex);
+exports.fromHex = fromHex;
diff --git a/node_modules/magic-bytes.js/dist/model/tree.d.ts b/node_modules/magic-bytes.js/dist/model/tree.d.ts
new file mode 100644
index 0000000..47f3e14
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/model/tree.d.ts
@@ -0,0 +1,30 @@
+export declare type PathlessNewNode = {
+ info: Info;
+ typename: string;
+};
+export declare type NewNode = PathlessNewNode & {
+ bytes: string[];
+};
+export declare type GuessedFile = Info & {
+ typename: string;
+};
+export declare type Info = {
+ mime?: string;
+ extension?: string;
+};
+export declare type Node = {
+ matches?: GuessedFile[];
+ bytes: {
+ [nextbyte: string]: Node;
+ };
+};
+export declare type Tree = {
+ noOffset: Node | null;
+ offset: {
+ [offsetByte: string]: Node;
+ };
+};
+export declare const merge: (node: NewNode, tree: Node) => Node;
+export declare const createNode: (typename: string, bytes: string[], info?: Info | undefined) => NewNode;
+export declare const createComplexNode: (typename: string, bytes: string[], info?: Info | undefined) => Node;
+//# sourceMappingURL=tree.d.ts.map \ No newline at end of file
diff --git a/node_modules/magic-bytes.js/dist/model/tree.d.ts.map b/node_modules/magic-bytes.js/dist/model/tree.d.ts.map
new file mode 100644
index 0000000..38b2f0f
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/model/tree.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/model/tree.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe,GAAG;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,OAAO,GAAG,eAAe,GAAG;IACtC,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,oBAAY,WAAW,GAAG,IAAI,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,IAAI,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,IAAI,GAAG;IACjB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,KAAK,EAAE;QACL,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;KAC1B,CAAC;CACH,CAAC;AAEF,oBAAY,IAAI,GAAG;IACjB,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE;QAAE,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;CACxC,CAAC;AAcF,eAAO,MAAM,KAAK,SAAU,OAAO,QAAQ,IAAI,KAAG,IAoCjD,CAAC;AAEF,eAAO,MAAM,UAAU,aACX,MAAM,SACT,MAAM,EAAE,8BAEd,OAEF,CAAC;AAEF,eAAO,MAAM,iBAAiB,aAClB,MAAM,SACT,MAAM,EAAE,8BAEd,IAoBF,CAAC"} \ No newline at end of file
diff --git a/node_modules/magic-bytes.js/dist/model/tree.js b/node_modules/magic-bytes.js/dist/model/tree.js
new file mode 100644
index 0000000..22a680c
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/model/tree.js
@@ -0,0 +1,70 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.createComplexNode = exports.createNode = exports.merge = void 0;
+const createMatch = (leaf) => ({
+ typename: leaf.typename,
+ mime: leaf.info.mime,
+ extension: leaf.info.extension,
+});
+const isMatchingNode = (tree, path) => tree && path.length === 0;
+const head = (arr) => arr[0];
+const tail = (arr) => arr.slice(1, arr.length);
+const merge = (node, tree) => {
+ if (node.bytes.length === 0)
+ return tree;
+ const currentByte = head(node.bytes); // 0
+ const path = tail(node.bytes); // [1,2]
+ const currentTree = tree.bytes[currentByte];
+ // traversed to end. Just add key to leaf.
+ if (isMatchingNode(currentTree, path)) {
+ const matchingNode = tree.bytes[currentByte];
+ tree.bytes[currentByte] = {
+ ...matchingNode,
+ matches: [
+ ...(matchingNode.matches ? matchingNode.matches : []),
+ createMatch(node),
+ ],
+ };
+ return tree;
+ }
+ // Path exists already, Merge subtree
+ if (tree.bytes[currentByte]) {
+ tree.bytes[currentByte] = exports.merge(exports.createNode(node.typename, path, node.info), tree.bytes[currentByte]);
+ return tree;
+ }
+ // Tree did not exist before
+ if (!tree.bytes[currentByte]) {
+ tree.bytes[currentByte] = {
+ ...tree.bytes[currentByte],
+ ...exports.createComplexNode(node.typename, path, node.info),
+ };
+ }
+ return tree;
+};
+exports.merge = merge;
+const createNode = (typename, bytes, info) => {
+ return { typename, bytes, info: info ? info : {} };
+};
+exports.createNode = createNode;
+const createComplexNode = (typename, bytes, info) => {
+ let obj = {
+ bytes: {},
+ matches: undefined,
+ };
+ const currentKey = head(bytes); // 0
+ const path = tail(bytes); // [1,2]
+ if (bytes.length === 0) {
+ return {
+ matches: [
+ createMatch({
+ typename: typename,
+ info: info ? { extension: info.extension, mime: info.mime } : {},
+ }),
+ ],
+ bytes: {},
+ };
+ }
+ obj.bytes[currentKey] = exports.createComplexNode(typename, path, info);
+ return obj;
+};
+exports.createComplexNode = createComplexNode;
diff --git a/node_modules/magic-bytes.js/dist/model/tree.spec.d.ts b/node_modules/magic-bytes.js/dist/model/tree.spec.d.ts
new file mode 100644
index 0000000..15bc445
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/model/tree.spec.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=tree.spec.d.ts.map \ No newline at end of file
diff --git a/node_modules/magic-bytes.js/dist/model/tree.spec.d.ts.map b/node_modules/magic-bytes.js/dist/model/tree.spec.d.ts.map
new file mode 100644
index 0000000..799b4a0
--- /dev/null
+++ b/node_modules/magic-bytes.js/dist/model/tree.spec.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"tree.spec.d.ts","sourceRoot":"","sources":["../../src/model/tree.spec.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/magic-bytes.js/jest.config.js b/node_modules/magic-bytes.js/jest.config.js
new file mode 100644
index 0000000..8cbf894
--- /dev/null
+++ b/node_modules/magic-bytes.js/jest.config.js
@@ -0,0 +1,5 @@
+/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
+module.exports = {
+ preset: 'ts-jest',
+ testEnvironment: 'node',
+}; \ No newline at end of file
diff --git a/node_modules/magic-bytes.js/package.json b/node_modules/magic-bytes.js/package.json
new file mode 100644
index 0000000..28c15ed
--- /dev/null
+++ b/node_modules/magic-bytes.js/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "magic-bytes.js",
+ "version": "1.0.15",
+ "main": "./dist/index.js",
+ "module": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "scripts": {
+ "prettier": "prettier --write \"{src,__{tests,mocks}__}/**/*.{tsx,ts}\"",
+ "gen-tree": "ts-node ./src/create-snapshot.ts",
+ "pre-test": "jest --clear-cache",
+ "test": "jest",
+ "build": "tsc"
+ },
+ "repository": {
+ "url": "https://github.com/LarsKoelpin/magic-bytes",
+ "type": "git"
+ },
+ "author": "Lars Kölpin",
+ "license": "MIT",
+ "description": "Detect Filetype by bytes",
+ "keywords": [
+ "magic-bytes",
+ "mime",
+ "filetype",
+ "file",
+ "extension",
+ "magic byte",
+ "magic number",
+ "mime",
+ "mimetype",
+ "validation",
+ "javascript",
+ "upload"
+ ],
+ "devDependencies": {
+ "@babel/preset-typescript": "^7.15.0",
+ "@changesets/cli": "^2.16.0",
+ "@types/jest": "^27.0.1",
+ "@types/node": "^16.6.2",
+ "jest": "^27.0.6",
+ "prettier": "^2.6.1",
+ "regenerator-runtime": "^0.11.1",
+ "ts-jest": "^27.0.5",
+ "ts-node": "^10.2.1",
+ "typescript": "^4.3.5",
+ "prettier-plugin-organize-imports": "^2.3.4"
+ }
+}
diff --git a/node_modules/magic-bytes.js/tsconfig.json b/node_modules/magic-bytes.js/tsconfig.json
new file mode 100644
index 0000000..ddb86d7
--- /dev/null
+++ b/node_modules/magic-bytes.js/tsconfig.json
@@ -0,0 +1,78 @@
+{
+ "compilerOptions": {
+ /* Visit https://aka.ms/tsconfig.json to read more about this file */
+
+ /* Basic Options */
+ // "incremental": true, /* Enable incremental compilation */
+ "target": "ES2020" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */,
+ "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
+ "lib": [
+ "ES2020"
+ ] /* Specify library files to be included in the compilation. */,
+ // "allowJs": true, /* Allow javascript files to be compiled. */
+ // "checkJs": true, /* Report errors in .js files. */
+ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
+ "declaration": true /* Generates corresponding '.d.ts' file. */,
+ "declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */,
+ "sourceMap": false /* Generates corresponding '.map' file. */,
+ // "outFile": "./", /* Concatenate and emit output to single file. */
+ "outDir": "./dist" /* Redirect output structure to the directory. */,
+ "rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
+ // "composite": true, /* Enable project compilation */
+ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
+ // "removeComments": true, /* Do not emit comments to output. */
+ // "noEmit": true, /* Do not emit outputs. */
+ // "importHelpers": true, /* Import emit helpers from 'tslib'. */
+ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
+ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
+
+ /* Strict Type-Checking Options */
+ "strict": true /* Enable all strict type-checking options. */,
+ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
+ // "strictNullChecks": true, /* Enable strict null checks. */
+ // "strictFunctionTypes": true, /* Enable strict checking of function types. */
+ // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
+ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
+ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
+ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
+
+ /* Additional Checks */
+ // "noUnusedLocals": true, /* Report errors on unused locals. */
+ // "noUnusedParameters": true, /* Report errors on unused parameters. */
+ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
+ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
+ // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an 'override' modifier. */
+ // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */
+
+ /* Module Resolution Options */
+ "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
+ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
+ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
+ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
+ // "typeRoots": [], /* List of folders to include type definitions from. */
+ "types": [
+ "node",
+ "jest"
+ ] /* Type declaration files to be included in compilation. */,
+ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
+ "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
+ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
+
+ /* Source Map Options */
+ // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
+ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
+ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
+
+ /* Experimental Options */
+ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
+ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
+
+ /* Advanced Options */
+ "skipLibCheck": true /* Skip type checking of declaration files. */,
+ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
+ },
+ "include": ["src/**/*"]
+}
diff --git a/node_modules/streamsearch/.eslintrc.js b/node_modules/streamsearch/.eslintrc.js
new file mode 100644
index 0000000..be9311d
--- /dev/null
+++ b/node_modules/streamsearch/.eslintrc.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = {
+ extends: '@mscdex/eslint-config',
+};
diff --git a/node_modules/streamsearch/.github/workflows/ci.yml b/node_modules/streamsearch/.github/workflows/ci.yml
new file mode 100644
index 0000000..29d5178
--- /dev/null
+++ b/node_modules/streamsearch/.github/workflows/ci.yml
@@ -0,0 +1,24 @@
+name: CI
+
+on:
+ pull_request:
+ push:
+ branches: [ master ]
+
+jobs:
+ tests-linux:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ node-version: [10.x, 12.x, 14.x, 16.x]
+ steps:
+ - uses: actions/checkout@v2
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+ - name: Install module
+ run: npm install
+ - name: Run tests
+ run: npm test
diff --git a/node_modules/streamsearch/.github/workflows/lint.yml b/node_modules/streamsearch/.github/workflows/lint.yml
new file mode 100644
index 0000000..9f9e1f5
--- /dev/null
+++ b/node_modules/streamsearch/.github/workflows/lint.yml
@@ -0,0 +1,23 @@
+name: lint
+
+on:
+ pull_request:
+ push:
+ branches: [ master ]
+
+env:
+ NODE_VERSION: 16.x
+
+jobs:
+ lint-js:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Use Node.js ${{ env.NODE_VERSION }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ env.NODE_VERSION }}
+ - name: Install ESLint + ESLint configs/plugins
+ run: npm install --only=dev
+ - name: Lint files
+ run: npm run lint
diff --git a/node_modules/streamsearch/LICENSE b/node_modules/streamsearch/LICENSE
new file mode 100644
index 0000000..9ea90e0
--- /dev/null
+++ b/node_modules/streamsearch/LICENSE
@@ -0,0 +1,19 @@
+Copyright Brian White. 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. \ No newline at end of file
diff --git a/node_modules/streamsearch/README.md b/node_modules/streamsearch/README.md
new file mode 100644
index 0000000..c3934d1
--- /dev/null
+++ b/node_modules/streamsearch/README.md
@@ -0,0 +1,95 @@
+Description
+===========
+
+streamsearch is a module for [node.js](http://nodejs.org/) that allows searching a stream using the Boyer-Moore-Horspool algorithm.
+
+This module is based heavily on the Streaming Boyer-Moore-Horspool C++ implementation by Hongli Lai [here](https://github.com/FooBarWidget/boyer-moore-horspool).
+
+
+Requirements
+============
+
+* [node.js](http://nodejs.org/) -- v10.0.0 or newer
+
+
+Installation
+============
+
+ npm install streamsearch
+
+Example
+=======
+
+```js
+ const { inspect } = require('util');
+
+ const StreamSearch = require('streamsearch');
+
+ const needle = Buffer.from('\r\n');
+ const ss = new StreamSearch(needle, (isMatch, data, start, end) => {
+ if (data)
+ console.log('data: ' + inspect(data.toString('latin1', start, end)));
+ if (isMatch)
+ console.log('match!');
+ });
+
+ const chunks = [
+ 'foo',
+ ' bar',
+ '\r',
+ '\n',
+ 'baz, hello\r',
+ '\n world.',
+ '\r\n Node.JS rules!!\r\n\r\n',
+ ];
+ for (const chunk of chunks)
+ ss.push(Buffer.from(chunk));
+
+ // output:
+ //
+ // data: 'foo'
+ // data: ' bar'
+ // match!
+ // data: 'baz, hello'
+ // match!
+ // data: ' world.'
+ // match!
+ // data: ' Node.JS rules!!'
+ // match!
+ // data: ''
+ // match!
+```
+
+
+API
+===
+
+Properties
+----------
+
+* **maxMatches** - < _integer_ > - The maximum number of matches. Defaults to `Infinity`.
+
+* **matches** - < _integer_ > - The current match count.
+
+
+Functions
+---------
+
+* **(constructor)**(< _mixed_ >needle, < _function_ >callback) - Creates and returns a new instance for searching for a _Buffer_ or _string_ `needle`. `callback` is called any time there is non-matching data and/or there is a needle match. `callback` will be called with the following arguments:
+
+ 1. `isMatch` - _boolean_ - Indicates whether a match has been found
+
+ 2. `data` - _mixed_ - If set, this contains data that did not match the needle.
+
+ 3. `start` - _integer_ - The index in `data` where the non-matching data begins (inclusive).
+
+ 4. `end` - _integer_ - The index in `data` where the non-matching data ends (exclusive).
+
+ 5. `isSafeData` - _boolean_ - Indicates if it is safe to store a reference to `data` (e.g. as-is or via `data.slice()`) or not, as in some cases `data` may point to a Buffer whose contents change over time.
+
+* **destroy**() - _(void)_ - Emits any last remaining unmatched data that may still be buffered and then resets internal state.
+
+* **push**(< _Buffer_ >chunk) - _integer_ - Processes `chunk`, searching for a match. The return value is the last processed index in `chunk` + 1.
+
+* **reset**() - _(void)_ - Resets internal state. Useful for when you wish to start searching a new/different stream for example.
+
diff --git a/node_modules/streamsearch/lib/sbmh.js b/node_modules/streamsearch/lib/sbmh.js
new file mode 100644
index 0000000..510cae2
--- /dev/null
+++ b/node_modules/streamsearch/lib/sbmh.js
@@ -0,0 +1,267 @@
+'use strict';
+/*
+ Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation
+ by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool
+*/
+function memcmp(buf1, pos1, buf2, pos2, num) {
+ for (let i = 0; i < num; ++i) {
+ if (buf1[pos1 + i] !== buf2[pos2 + i])
+ return false;
+ }
+ return true;
+}
+
+class SBMH {
+ constructor(needle, cb) {
+ if (typeof cb !== 'function')
+ throw new Error('Missing match callback');
+
+ if (typeof needle === 'string')
+ needle = Buffer.from(needle);
+ else if (!Buffer.isBuffer(needle))
+ throw new Error(`Expected Buffer for needle, got ${typeof needle}`);
+
+ const needleLen = needle.length;
+
+ this.maxMatches = Infinity;
+ this.matches = 0;
+
+ this._cb = cb;
+ this._lookbehindSize = 0;
+ this._needle = needle;
+ this._bufPos = 0;
+
+ this._lookbehind = Buffer.allocUnsafe(needleLen);
+
+ // Initialize occurrence table.
+ this._occ = [
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
+ needleLen, needleLen, needleLen, needleLen
+ ];
+
+ // Populate occurrence table with analysis of the needle, ignoring the last
+ // letter.
+ if (needleLen > 1) {
+ for (let i = 0; i < needleLen - 1; ++i)
+ this._occ[needle[i]] = needleLen - 1 - i;
+ }
+ }
+
+ reset() {
+ this.matches = 0;
+ this._lookbehindSize = 0;
+ this._bufPos = 0;
+ }
+
+ push(chunk, pos) {
+ let result;
+ if (!Buffer.isBuffer(chunk))
+ chunk = Buffer.from(chunk, 'latin1');
+ const chunkLen = chunk.length;
+ this._bufPos = pos || 0;
+ while (result !== chunkLen && this.matches < this.maxMatches)
+ result = feed(this, chunk);
+ return result;
+ }
+
+ destroy() {
+ const lbSize = this._lookbehindSize;
+ if (lbSize)
+ this._cb(false, this._lookbehind, 0, lbSize, false);
+ this.reset();
+ }
+}
+
+function feed(self, data) {
+ const len = data.length;
+ const needle = self._needle;
+ const needleLen = needle.length;
+
+ // Positive: points to a position in `data`
+ // pos == 3 points to data[3]
+ // Negative: points to a position in the lookbehind buffer
+ // pos == -2 points to lookbehind[lookbehindSize - 2]
+ let pos = -self._lookbehindSize;
+ const lastNeedleCharPos = needleLen - 1;
+ const lastNeedleChar = needle[lastNeedleCharPos];
+ const end = len - needleLen;
+ const occ = self._occ;
+ const lookbehind = self._lookbehind;
+
+ if (pos < 0) {
+ // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool
+ // search with character lookup code that considers both the
+ // lookbehind buffer and the current round's haystack data.
+ //
+ // Loop until
+ // there is a match.
+ // or until
+ // we've moved past the position that requires the
+ // lookbehind buffer. In this case we switch to the
+ // optimized loop.
+ // or until
+ // the character to look at lies outside the haystack.
+ while (pos < 0 && pos <= end) {
+ const nextPos = pos + lastNeedleCharPos;
+ const ch = (nextPos < 0
+ ? lookbehind[self._lookbehindSize + nextPos]
+ : data[nextPos]);
+
+ if (ch === lastNeedleChar
+ && matchNeedle(self, data, pos, lastNeedleCharPos)) {
+ self._lookbehindSize = 0;
+ ++self.matches;
+ if (pos > -self._lookbehindSize)
+ self._cb(true, lookbehind, 0, self._lookbehindSize + pos, false);
+ else
+ self._cb(true, undefined, 0, 0, true);
+
+ return (self._bufPos = pos + needleLen);
+ }
+
+ pos += occ[ch];
+ }
+
+ // No match.
+
+ // There's too few data for Boyer-Moore-Horspool to run,
+ // so let's use a different algorithm to skip as much as
+ // we can.
+ // Forward pos until
+ // the trailing part of lookbehind + data
+ // looks like the beginning of the needle
+ // or until
+ // pos == 0
+ while (pos < 0 && !matchNeedle(self, data, pos, len - pos))
+ ++pos;
+
+ if (pos < 0) {
+ // Cut off part of the lookbehind buffer that has
+ // been processed and append the entire haystack
+ // into it.
+ const bytesToCutOff = self._lookbehindSize + pos;
+
+ if (bytesToCutOff > 0) {
+ // The cut off data is guaranteed not to contain the needle.
+ self._cb(false, lookbehind, 0, bytesToCutOff, false);
+ }
+
+ self._lookbehindSize -= bytesToCutOff;
+ lookbehind.copy(lookbehind, 0, bytesToCutOff, self._lookbehindSize);
+ lookbehind.set(data, self._lookbehindSize);
+ self._lookbehindSize += len;
+
+ self._bufPos = len;
+ return len;
+ }
+
+ // Discard lookbehind buffer.
+ self._cb(false, lookbehind, 0, self._lookbehindSize, false);
+ self._lookbehindSize = 0;
+ }
+
+ pos += self._bufPos;
+
+ const firstNeedleChar = needle[0];
+
+ // Lookbehind buffer is now empty. Perform Boyer-Moore-Horspool
+ // search with optimized character lookup code that only considers
+ // the current round's haystack data.
+ while (pos <= end) {
+ const ch = data[pos + lastNeedleCharPos];
+
+ if (ch === lastNeedleChar
+ && data[pos] === firstNeedleChar
+ && memcmp(needle, 0, data, pos, lastNeedleCharPos)) {
+ ++self.matches;
+ if (pos > 0)
+ self._cb(true, data, self._bufPos, pos, true);
+ else
+ self._cb(true, undefined, 0, 0, true);
+
+ return (self._bufPos = pos + needleLen);
+ }
+
+ pos += occ[ch];
+ }
+
+ // There was no match. If there's trailing haystack data that we cannot
+ // match yet using the Boyer-Moore-Horspool algorithm (because the trailing
+ // data is less than the needle size) then match using a modified
+ // algorithm that starts matching from the beginning instead of the end.
+ // Whatever trailing data is left after running this algorithm is added to
+ // the lookbehind buffer.
+ while (pos < len) {
+ if (data[pos] !== firstNeedleChar
+ || !memcmp(data, pos, needle, 0, len - pos)) {
+ ++pos;
+ continue;
+ }
+ data.copy(lookbehind, 0, pos, len);
+ self._lookbehindSize = len - pos;
+ break;
+ }
+
+ // Everything until `pos` is guaranteed not to contain needle data.
+ if (pos > 0)
+ self._cb(false, data, self._bufPos, pos < len ? pos : len, true);
+
+ self._bufPos = len;
+ return len;
+}
+
+function matchNeedle(self, data, pos, len) {
+ const lb = self._lookbehind;
+ const lbSize = self._lookbehindSize;
+ const needle = self._needle;
+
+ for (let i = 0; i < len; ++i, ++pos) {
+ const ch = (pos < 0 ? lb[lbSize + pos] : data[pos]);
+ if (ch !== needle[i])
+ return false;
+ }
+ return true;
+}
+
+module.exports = SBMH;
diff --git a/node_modules/streamsearch/package.json b/node_modules/streamsearch/package.json
new file mode 100644
index 0000000..51df8f9
--- /dev/null
+++ b/node_modules/streamsearch/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "streamsearch",
+ "version": "1.1.0",
+ "author": "Brian White <mscdex@mscdex.net>",
+ "description": "Streaming Boyer-Moore-Horspool searching for node.js",
+ "main": "./lib/sbmh.js",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "devDependencies": {
+ "@mscdex/eslint-config": "^1.1.0",
+ "eslint": "^7.32.0"
+ },
+ "scripts": {
+ "test": "node test/test.js",
+ "lint": "eslint --cache --report-unused-disable-directives --ext=.js .eslintrc.js lib test",
+ "lint:fix": "npm run lint -- --fix"
+ },
+ "keywords": [
+ "stream",
+ "horspool",
+ "boyer-moore-horspool",
+ "boyer-moore",
+ "search"
+ ],
+ "licenses": [{
+ "type": "MIT",
+ "url": "http://github.com/mscdex/streamsearch/raw/master/LICENSE"
+ }],
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/mscdex/streamsearch.git"
+ }
+}
diff --git a/node_modules/streamsearch/test/test.js b/node_modules/streamsearch/test/test.js
new file mode 100644
index 0000000..39a04d7
--- /dev/null
+++ b/node_modules/streamsearch/test/test.js
@@ -0,0 +1,70 @@
+'use strict';
+
+const assert = require('assert');
+
+const StreamSearch = require('../lib/sbmh.js');
+
+[
+ {
+ needle: '\r\n',
+ chunks: [
+ 'foo',
+ ' bar',
+ '\r',
+ '\n',
+ 'baz, hello\r',
+ '\n world.',
+ '\r\n Node.JS rules!!\r\n\r\n',
+ ],
+ expect: [
+ [false, 'foo'],
+ [false, ' bar'],
+ [ true, null],
+ [false, 'baz, hello'],
+ [ true, null],
+ [false, ' world.'],
+ [ true, null],
+ [ true, ' Node.JS rules!!'],
+ [ true, ''],
+ ],
+ },
+ {
+ needle: '---foobarbaz',
+ chunks: [
+ '---foobarbaz',
+ 'asdf',
+ '\r\n',
+ '---foobarba',
+ '---foobar',
+ 'ba',
+ '\r\n---foobarbaz--\r\n',
+ ],
+ expect: [
+ [ true, null],
+ [false, 'asdf'],
+ [false, '\r\n'],
+ [false, '---foobarba'],
+ [false, '---foobarba'],
+ [ true, '\r\n'],
+ [false, '--\r\n'],
+ ],
+ },
+].forEach((test, i) => {
+ console.log(`Running test #${i + 1}`);
+ const { needle, chunks, expect } = test;
+
+ const results = [];
+ const ss = new StreamSearch(Buffer.from(needle),
+ (isMatch, data, start, end) => {
+ if (data)
+ data = data.toString('latin1', start, end);
+ else
+ data = null;
+ results.push([isMatch, data]);
+ });
+
+ for (const chunk of chunks)
+ ss.push(Buffer.from(chunk));
+
+ assert.deepStrictEqual(results, expect);
+});
diff --git a/node_modules/ts-mixer/CHANGELOG.md b/node_modules/ts-mixer/CHANGELOG.md
new file mode 100644
index 0000000..2283377
--- /dev/null
+++ b/node_modules/ts-mixer/CHANGELOG.md
@@ -0,0 +1,113 @@
+# Changelog
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+### [6.0.3](https://github.com/tannerntannern/ts-mixer/compare/v6.0.2...v6.0.3) (2023-02-09)
+
+
+### Bug Fixes
+
+* allow abstract constructor signature for hasMixin ([f82e27b](https://github.com/tannerntannern/ts-mixer/commit/f82e27b96d142cfdec6446930a1db354167e88d2)), closes [tannerntannern/ts-mixer#56](https://github.com/tannerntannern/ts-mixer/issues/56)
+* allow abstract constructor signatures for hasMixin ([8964b59](https://github.com/tannerntannern/ts-mixer/commit/8964b59e062854fde52424497930ca3e8bb98e87)), closes [#57](https://github.com/tannerntannern/ts-mixer/issues/57)
+* simplify signature ([8a79197](https://github.com/tannerntannern/ts-mixer/commit/8a79197cc6bca5757d7c06560d7b26e73491b11f))
+
+### [6.0.2](https://github.com/tannerntannern/ts-mixer/compare/v6.0.1...v6.0.2) (2022-11-10)
+
+
+### Bug Fixes
+
+* **decorators:** support class decorators that don't return anything ([7433cf3](https://github.com/tannerntannern/ts-mixer/commit/7433cf36a43bb18a1dd280aa629ac81ef532c74a))
+
+### [6.0.1](https://github.com/tannerntannern/ts-mixer/compare/v6.0.0...v6.0.1) (2022-03-13)
+
+### Bug Fixes
+
+* fix bug in `directDecoratorSearch` ([51c50b8](https://github.com/tannerntannern/ts-mixer/commit/51c50b8c50a63e85b133bdd61eaad4427a22e515)) (thanks, [@AMcBain](https://github.com/AMcBain)!)
+
+## [6.0.0](https://github.com/tannerntannern/ts-mixer/compare/v6.0.0-beta.0...v6.0.0) (2021-07-07)
+
+## [6.0.0-beta.0](https://github.com/tannerntannern/ts-mixer/compare/v5.4.1...v6.0.0-beta.0) (2021-06-24)
+
+
+### ⚠ BREAKING CHANGES
+
+* drop TS < 4.2 support
+
+### Features
+
+* add abstract mixin support ([1c4b306](https://github.com/tannerntannern/ts-mixer/commit/1c4b306bae62fa6319c74d1f3040c8aba0da2c28))
+
+### [5.4.1](https://github.com/tannerntannern/ts-mixer/compare/v5.4.0...v5.4.1) (2021-04-30)
+
+
+### Bug Fixes
+
+* "publish" workflow ([bd2e4ec](https://github.com/tannerntannern/ts-mixer/commit/bd2e4ec088b19a403bc013926c7f3a2545cc4171))
+* circular dependency ([66f7e2d](https://github.com/tannerntannern/ts-mixer/commit/66f7e2dc929c90e8c15d718415114ceaa31402c2))
+
+## [5.4.0](https://github.com/tannerntannern/ts-mixer/compare/v5.3.0...v5.4.0) (2020-11-18)
+
+
+### Features
+
+* deep decorator inheritance ([6daabc5](https://github.com/tannerntannern/ts-mixer/commit/6daabc5d340d20c8eda4fe96b635a54f6a7e18fb))
+
+## [5.3.0](https://github.com/tannerntannern/ts-mixer/compare/v5.3.0-beta.0...v5.3.0) (2020-06-01)
+
+## [5.3.0-beta.0](https://github.com/tannerntannern/ts-mixer/compare/v5.2.1...v5.3.0-beta.0) (2020-05-31)
+
+
+### Features
+
+* add hasMixin function ([#27](https://github.com/tannerntannern/ts-mixer/issues/27)) ([c8bfc2d](https://github.com/tannerntannern/ts-mixer/commit/c8bfc2d48854808755088332636e8d166007ed9f))
+
+### [5.2.1](https://github.com/tannerntannern/ts-mixer/compare/v5.2.0...v5.2.1) (2020-05-08)
+
+
+### Bug Fixes
+
+* mix decorator not preserving constructor name ([7274fa2](https://github.com/tannerntannern/ts-mixer/commit/7274fa26a68e05cc59cde1108610e6a1ab51b430))
+
+## [5.2.0](https://github.com/tannerntannern/ts-mixer/compare/v5.2.0-beta.1...v5.2.0) (2020-04-29)
+
+## [5.2.0-beta.1](https://github.com/tannerntannern/ts-mixer/compare/v5.2.0-beta.0...v5.2.0-beta.1) (2020-04-23)
+
+
+### Bug Fixes
+
+* wrong this in init functions for Mixin(A, Mixin(B, C)) scenario ([0ba1128](https://github.com/tannerntannern/ts-mixer/commit/0ba11283c63a878271b85c282f75190758101e63))
+
+## [5.2.0-beta.0](https://github.com/tannerntannern/ts-mixer/compare/v5.1.0...v5.2.0-beta.0) (2020-04-13)
+
+
+### Features
+
+* adds init func feature for impure constructors ([99a946b](https://github.com/tannerntannern/ts-mixer/commit/99a946b8e272773f6bafd7a7e8bf8313517dec16))
+
+## [5.1.0](https://github.com/tannerntannern/ts-mixer/compare/v5.1.0-beta.0...v5.1.0) (2020-03-27)
+
+## [5.1.0-beta.0](https://github.com/tannerntannern/ts-mixer/compare/v5.0.0...v5.1.0-beta.0) (2020-03-26)
+
+
+### Features
+
+* decorator support for class-validators, typeORM, etc ([2c14812](https://github.com/tannerntannern/ts-mixer/commit/2c1481237b325916ca95dbb9e33141b3220f8068))
+
+## [5.0.0](https://github.com/tannerntannern/ts-mixer/compare/v5.0.0-beta.0...v5.0.0) (2020-03-01)
+
+## [5.0.0-beta.0](https://github.com/tannerntannern/ts-mixer/compare/v4.0.0...v5.0.0-beta.0) (2020-02-02)
+
+
+### Features
+
+* adds and tests a nearestCommonAncestor function ([b084579](https://github.com/tannerntannern/ts-mixer/commit/b084579d5ac52e0b456be95ff6b776309b436473))
+* initial static inheritance implementation ([8467c40](https://github.com/tannerntannern/ts-mixer/commit/8467c40c9748e769eebf77b45cccad5ce785bac9))
+* initial version of proxyMix ([95a91c7](https://github.com/tannerntannern/ts-mixer/commit/95a91c78e5f05af75cfc95d82a65ce5b3413b9f1))
+* makes mixin constructor argument inference slightly smarter ([b844b5c](https://github.com/tannerntannern/ts-mixer/commit/b844b5c93f5eab0d6f522559ed567f67291fae76))
+
+
+### Bug Fixes
+
+* mixins with shared ancestor when using proxy prototype ([5af189d](https://github.com/tannerntannern/ts-mixer/commit/5af189d9903083f675f65b5039875c4aa97be1a6))
+* resolves indefinite tuple issue with `Longest` type ([68342b0](https://github.com/tannerntannern/ts-mixer/commit/68342b0a3fe224a485f220039af872050aa941fc))
+* static chain inheritance ([0aca8f0](https://github.com/tannerntannern/ts-mixer/commit/0aca8f056a005ccf27cc564d5a84abe1ef999d7b))
diff --git a/node_modules/ts-mixer/LICENSE b/node_modules/ts-mixer/LICENSE
new file mode 100644
index 0000000..c8a6114
--- /dev/null
+++ b/node_modules/ts-mixer/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2023 Tanner 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/ts-mixer/README.md b/node_modules/ts-mixer/README.md
new file mode 100644
index 0000000..b9e66bd
--- /dev/null
+++ b/node_modules/ts-mixer/README.md
@@ -0,0 +1,270 @@
+# ts-mixer
+[version-badge]: https://badgen.net/npm/v/ts-mixer
+[version-link]: https://npmjs.com/package/ts-mixer
+[build-link]: https://github.com/tannerntannern/ts-mixer/actions
+[ts-versions]: https://badgen.net/badge/icon/4.2,4.4,4.6,4.8?icon=typescript&label&list=|
+[node-versions]: https://badgen.net/badge/node/12%2C14%2C16%2C18/blue/?list=|
+[![npm version][version-badge]][version-link]
+[![TS Versions][ts-versions]][build-link]
+[![Node.js Versions][node-versions]][build-link]
+[![Minified Size](https://badgen.net/bundlephobia/min/ts-mixer)](https://bundlephobia.com/result?p=ts-mixer)
+[![Conventional Commits](https://badgen.net/badge/conventional%20commits/1.0.0/yellow)](https://conventionalcommits.org)
+
+## Overview
+`ts-mixer` brings mixins to TypeScript. "Mixins" to `ts-mixer` are just classes, so you already know how to write them, and you can probably mix classes from your favorite library without trouble.
+
+The mixin problem is more nuanced than it appears. I've seen countless code snippets that work for certain situations, but fail in others. `ts-mixer` tries to take the best from all these solutions while accounting for the situations you might not have considered.
+
+[Quick start guide](#quick-start)
+
+### Features
+* mixes plain classes
+* mixes classes that extend other classes
+* mixes classes that were mixed with `ts-mixer`
+* supports static properties
+* supports protected/private properties (the popular function-that-returns-a-class solution does not)
+* mixes abstract classes (requires TypeScript >= 4.2)
+* mixes generic classes (with caveats [[1](#caveats)])
+* supports class, method, and property decorators (with caveats [[2, 5](#caveats)])
+* mostly supports the complexity presented by constructor functions (with caveats [[3](#caveats)])
+* comes with an `instanceof`-like replacement (with caveats [[4, 5](#caveats)])
+* [multiple mixing strategies](#settings) (ES6 proxies vs hard copy)
+
+### Caveats
+1. Mixing generic classes requires a more cumbersome notation, but it's still possible. See [mixing generic classes](#mixing-generic-classes) below.
+2. Using decorators in mixed classes also requires a more cumbersome notation. See [mixing with decorators](#mixing-with-decorators) below.
+3. ES6 made it impossible to use `.apply(...)` on class constructors (or any means of calling them without `new`), which makes it impossible for `ts-mixer` to pass the proper `this` to your constructors. This may or may not be an issue for your code, but there are options to work around it. See [dealing with constructors](#dealing-with-constructors) below.
+4. `ts-mixer` does not support `instanceof` for mixins, but it does offer a replacement. See the [hasMixin function](#hasmixin) for more details.
+5. Certain features (specifically, `@decorator` and `hasMixin`) make use of ES6 `Map`s, which means you must either use ES6+ or polyfill `Map` to use them. If you don't need these features, you should be fine without.
+
+## Quick Start
+### Installation
+```
+$ npm install ts-mixer
+```
+
+or if you prefer [Yarn](https://yarnpkg.com):
+
+```
+$ yarn add ts-mixer
+```
+
+### Basic Example
+```typescript
+import { Mixin } from 'ts-mixer';
+
+class Foo {
+ protected makeFoo() {
+ return 'foo';
+ }
+}
+
+class Bar {
+ protected makeBar() {
+ return 'bar';
+ }
+}
+
+class FooBar extends Mixin(Foo, Bar) {
+ public makeFooBar() {
+ return this.makeFoo() + this.makeBar();
+ }
+}
+
+const fooBar = new FooBar();
+
+console.log(fooBar.makeFooBar()); // "foobar"
+```
+
+## Special Cases
+### Mixing Generic Classes
+Frustratingly, it is _impossible_ for generic parameters to be referenced in base class expressions. No matter what, you will eventually run into `Base class expressions cannot reference class type parameters.`
+
+The way to get around this is to leverage [declaration merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html), and a slightly different mixing function from ts-mixer: `mix`. It works exactly like `Mixin`, except it's a decorator, which means it doesn't affect the type information of the class being decorated. See it in action below:
+
+```typescript
+import { mix } from 'ts-mixer';
+
+class Foo<T> {
+ public fooMethod(input: T): T {
+ return input;
+ }
+}
+
+class Bar<T> {
+ public barMethod(input: T): T {
+ return input;
+ }
+}
+
+interface FooBar<T1, T2> extends Foo<T1>, Bar<T2> { }
+@mix(Foo, Bar)
+class FooBar<T1, T2> {
+ public fooBarMethod(input1: T1, input2: T2) {
+ return [this.fooMethod(input1), this.barMethod(input2)];
+ }
+}
+```
+
+Key takeaways from this example:
+* `interface FooBar<T1, T2> extends Foo<T1>, Bar<T2> { }` makes sure `FooBar` has the typing we want, thanks to declaration merging
+* `@mix(Foo, Bar)` wires things up "on the JavaScript side", since the interface declaration has nothing to do with runtime behavior.
+* The reason we have to use the `mix` decorator is that the typing produced by `Mixin(Foo, Bar)` would conflict with the typing of the interface. `mix` has no effect "on the TypeScript side," thus avoiding type conflicts.
+
+### Mixing with Decorators
+Popular libraries such as [class-validator](https://github.com/typestack/class-validator) and [TypeORM](https://github.com/typeorm/typeorm) use decorators to add functionality. Unfortunately, `ts-mixer` has no way of knowing what these libraries do with the decorators behind the scenes. So if you want these decorators to be "inherited" with classes you plan to mix, you first have to wrap them with a special `decorate` function exported by `ts-mixer`. Here's an example using `class-validator`:
+
+```typescript
+import { IsBoolean, IsIn, validate } from 'class-validator';
+import { Mixin, decorate } from 'ts-mixer';
+
+class Disposable {
+ @decorate(IsBoolean()) // instead of @IsBoolean()
+ isDisposed: boolean = false;
+}
+
+class Statusable {
+ @decorate(IsIn(['red', 'green'])) // instead of @IsIn(['red', 'green'])
+ status: string = 'green';
+}
+
+class ExtendedObject extends Mixin(Disposable, Statusable) {}
+
+const extendedObject = new ExtendedObject();
+extendedObject.status = 'blue';
+
+validate(extendedObject).then(errors => {
+ console.log(errors);
+});
+```
+
+### Dealing with Constructors
+As mentioned in the [caveats section](#caveats), ES6 disallowed calling constructor functions without `new`. This means that the only way for `ts-mixer` to mix instance properties is to instantiate each base class separately, then copy the instance properties into a common object. The consequence of this is that constructors mixed by `ts-mixer` will _not_ receive the proper `this`.
+
+**This very well may not be an issue for you!** It only means that your constructors need to be "mostly pure" in terms of how they handle `this`. Specifically, your constructors cannot produce [side effects](https://en.wikipedia.org/wiki/Side_effect_%28computer_science%29) involving `this`, _other than adding properties to `this`_ (the most common side effect in JavaScript constructors).
+
+If you simply cannot eliminate `this` side effects from your constructor, there is a workaround available: `ts-mixer` will automatically forward constructor parameters to a predesignated init function (`settings.initFunction`) if it's present on the class. Unlike constructors, functions can be called with an arbitrary `this`, so this predesignated init function _will_ have the proper `this`. Here's a basic example:
+
+```typescript
+import { Mixin, settings } from 'ts-mixer';
+
+settings.initFunction = 'init';
+
+class Person {
+ public static allPeople: Set<Person> = new Set();
+
+ protected init() {
+ Person.allPeople.add(this);
+ }
+}
+
+type PartyAffiliation = 'democrat' | 'republican';
+
+class PoliticalParticipant {
+ public static democrats: Set<PoliticalParticipant> = new Set();
+ public static republicans: Set<PoliticalParticipant> = new Set();
+
+ public party: PartyAffiliation;
+
+ // note that these same args will also be passed to init function
+ public constructor(party: PartyAffiliation) {
+ this.party = party;
+ }
+
+ protected init(party: PartyAffiliation) {
+ if (party === 'democrat')
+ PoliticalParticipant.democrats.add(this);
+ else
+ PoliticalParticipant.republicans.add(this);
+ }
+}
+
+class Voter extends Mixin(Person, PoliticalParticipant) {}
+
+const v1 = new Voter('democrat');
+const v2 = new Voter('democrat');
+const v3 = new Voter('republican');
+const v4 = new Voter('republican');
+```
+
+Note the above `.add(this)` statements. These would not work as expected if they were placed in the constructor instead, since `this` is not the same between the constructor and `init`, as explained above.
+
+## Other Features
+### hasMixin
+As mentioned above, `ts-mixer` does not support `instanceof` for mixins. While it is possible to implement [custom `instanceof` behavior](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/hasInstance), this library does not do so because it would require modifying the source classes, which is deliberately avoided.
+
+You can fill this missing functionality with `hasMixin(instance, mixinClass)` instead. See the below example:
+
+```typescript
+import { Mixin, hasMixin } from 'ts-mixer';
+
+class Foo {}
+class Bar {}
+class FooBar extends Mixin(Foo, Bar) {}
+
+const instance = new FooBar();
+
+// doesn't work with instanceof...
+console.log(instance instanceof FooBar) // true
+console.log(instance instanceof Foo) // false
+console.log(instance instanceof Bar) // false
+
+// but everything works nicely with hasMixin!
+console.log(hasMixin(instance, FooBar)) // true
+console.log(hasMixin(instance, Foo)) // true
+console.log(hasMixin(instance, Bar)) // true
+```
+
+`hasMixin(instance, mixinClass)` will work anywhere that `instance instanceof mixinClass` works. Additionally, like `instanceof`, you get the same [type narrowing benefits](https://www.typescriptlang.org/docs/handbook/advanced-types.html#instanceof-type-guards):
+
+```typescript
+if (hasMixin(instance, Foo)) {
+ // inferred type of instance is "Foo"
+}
+
+if (hasMixin(instance, Bar)) {
+ // inferred type of instance of "Bar"
+}
+```
+
+## Settings
+ts-mixer has multiple strategies for mixing classes which can be configured by modifying `settings` from ts-mixer. For example:
+
+```typescript
+import { settings, Mixin } from 'ts-mixer';
+
+settings.prototypeStrategy = 'proxy';
+
+// then use `Mixin` as normal...
+```
+
+### `settings.prototypeStrategy`
+* Determines how ts-mixer will mix class prototypes together
+* Possible values:
+ - `'copy'` (default) - Copies all methods from the classes being mixed into a new prototype object. (This will include all methods up the prototype chains as well.) This is the default for ES5 compatibility, but it has the downside of stale references. For example, if you mix `Foo` and `Bar` to make `FooBar`, then redefine a method on `Foo`, `FooBar` will not have the latest methods from `Foo`. If this is not a concern for you, `'copy'` is the best value for this setting.
+ - `'proxy'` - Uses an ES6 Proxy to "soft mix" prototypes. Unlike `'copy'`, updates to the base classes _will_ be reflected in the mixed class, which may be desirable. The downside is that method access is not as performant, nor is it ES5 compatible.
+
+### `settings.staticsStrategy`
+* Determines how static properties are inherited
+* Possible values:
+ - `'copy'` (default) - Simply copies all properties (minus `prototype`) from the base classes/constructor functions onto the mixed class. Like `settings.prototypeStrategy = 'copy'`, this strategy also suffers from stale references, but shouldn't be a concern if you don't redefine static methods after mixing.
+ - `'proxy'` - Similar to `settings.prototypeStrategy`, proxy's static method access to base classes. Has the same benefits/downsides.
+
+### `settings.initFunction`
+* If set, `ts-mixer` will automatically call the function with this name upon construction
+* Possible values:
+ - `null` (default) - disables the behavior
+ - a string - function name to call upon construction
+* Read more about why you would want this in [dealing with constructors](#dealing-with-constructors)
+
+### `settings.decoratorInheritance`
+* Determines how decorators are inherited from classes passed to `Mixin(...)`
+* Possible values:
+ - `'deep'` (default) - Deeply inherits decorators from all given classes and their ancestors
+ - `'direct'` - Only inherits decorators defined directly on the given classes
+ - `'none'` - Skips decorator inheritance
+
+# Author
+Tanner Nielsen <tannerntannern@gmail.com>
+* Website - [tannernielsen.com](http://tannernielsen.com)
+* Github - [tannerntannern](https://github.com/tannerntannern)
diff --git a/node_modules/ts-mixer/dist/cjs/decorator.js b/node_modules/ts-mixer/dist/cjs/decorator.js
new file mode 100644
index 0000000..45d6dba
--- /dev/null
+++ b/node_modules/ts-mixer/dist/cjs/decorator.js
@@ -0,0 +1,109 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.decorate = exports.getDecoratorsForClass = exports.directDecoratorSearch = exports.deepDecoratorSearch = void 0;
+const util_1 = require("./util");
+const mixin_tracking_1 = require("./mixin-tracking");
+const mergeObjectsOfDecorators = (o1, o2) => {
+ var _a, _b;
+ const allKeys = (0, util_1.unique)([...Object.getOwnPropertyNames(o1), ...Object.getOwnPropertyNames(o2)]);
+ const mergedObject = {};
+ for (let key of allKeys)
+ mergedObject[key] = (0, util_1.unique)([...((_a = o1 === null || o1 === void 0 ? void 0 : o1[key]) !== null && _a !== void 0 ? _a : []), ...((_b = o2 === null || o2 === void 0 ? void 0 : o2[key]) !== null && _b !== void 0 ? _b : [])]);
+ return mergedObject;
+};
+const mergePropertyAndMethodDecorators = (d1, d2) => {
+ var _a, _b, _c, _d;
+ return ({
+ property: mergeObjectsOfDecorators((_a = d1 === null || d1 === void 0 ? void 0 : d1.property) !== null && _a !== void 0 ? _a : {}, (_b = d2 === null || d2 === void 0 ? void 0 : d2.property) !== null && _b !== void 0 ? _b : {}),
+ method: mergeObjectsOfDecorators((_c = d1 === null || d1 === void 0 ? void 0 : d1.method) !== null && _c !== void 0 ? _c : {}, (_d = d2 === null || d2 === void 0 ? void 0 : d2.method) !== null && _d !== void 0 ? _d : {}),
+ });
+};
+const mergeDecorators = (d1, d2) => {
+ var _a, _b, _c, _d, _e, _f;
+ return ({
+ class: (0, util_1.unique)([...(_a = d1 === null || d1 === void 0 ? void 0 : d1.class) !== null && _a !== void 0 ? _a : [], ...(_b = d2 === null || d2 === void 0 ? void 0 : d2.class) !== null && _b !== void 0 ? _b : []]),
+ static: mergePropertyAndMethodDecorators((_c = d1 === null || d1 === void 0 ? void 0 : d1.static) !== null && _c !== void 0 ? _c : {}, (_d = d2 === null || d2 === void 0 ? void 0 : d2.static) !== null && _d !== void 0 ? _d : {}),
+ instance: mergePropertyAndMethodDecorators((_e = d1 === null || d1 === void 0 ? void 0 : d1.instance) !== null && _e !== void 0 ? _e : {}, (_f = d2 === null || d2 === void 0 ? void 0 : d2.instance) !== null && _f !== void 0 ? _f : {}),
+ });
+};
+const decorators = new Map();
+const findAllConstituentClasses = (...classes) => {
+ var _a;
+ const allClasses = new Set();
+ const frontier = new Set([...classes]);
+ while (frontier.size > 0) {
+ for (let clazz of frontier) {
+ const protoChainClasses = (0, util_1.protoChain)(clazz.prototype).map(proto => proto.constructor);
+ const mixinClasses = (_a = (0, mixin_tracking_1.getMixinsForClass)(clazz)) !== null && _a !== void 0 ? _a : [];
+ const potentiallyNewClasses = [...protoChainClasses, ...mixinClasses];
+ const newClasses = potentiallyNewClasses.filter(c => !allClasses.has(c));
+ for (let newClass of newClasses)
+ frontier.add(newClass);
+ allClasses.add(clazz);
+ frontier.delete(clazz);
+ }
+ }
+ return [...allClasses];
+};
+const deepDecoratorSearch = (...classes) => {
+ const decoratorsForClassChain = findAllConstituentClasses(...classes)
+ .map(clazz => decorators.get(clazz))
+ .filter(decorators => !!decorators);
+ if (decoratorsForClassChain.length == 0)
+ return {};
+ if (decoratorsForClassChain.length == 1)
+ return decoratorsForClassChain[0];
+ return decoratorsForClassChain.reduce((d1, d2) => mergeDecorators(d1, d2));
+};
+exports.deepDecoratorSearch = deepDecoratorSearch;
+const directDecoratorSearch = (...classes) => {
+ const classDecorators = classes.map(clazz => (0, exports.getDecoratorsForClass)(clazz));
+ if (classDecorators.length === 0)
+ return {};
+ if (classDecorators.length === 1)
+ return classDecorators[0];
+ return classDecorators.reduce((d1, d2) => mergeDecorators(d1, d2));
+};
+exports.directDecoratorSearch = directDecoratorSearch;
+const getDecoratorsForClass = (clazz) => {
+ let decoratorsForClass = decorators.get(clazz);
+ if (!decoratorsForClass) {
+ decoratorsForClass = {};
+ decorators.set(clazz, decoratorsForClass);
+ }
+ return decoratorsForClass;
+};
+exports.getDecoratorsForClass = getDecoratorsForClass;
+const decorateClass = (decorator) => ((clazz) => {
+ const decoratorsForClass = (0, exports.getDecoratorsForClass)(clazz);
+ let classDecorators = decoratorsForClass.class;
+ if (!classDecorators) {
+ classDecorators = [];
+ decoratorsForClass.class = classDecorators;
+ }
+ classDecorators.push(decorator);
+ return decorator(clazz);
+});
+const decorateMember = (decorator) => ((object, key, ...otherArgs) => {
+ var _a, _b, _c;
+ const decoratorTargetType = typeof object === 'function' ? 'static' : 'instance';
+ const decoratorType = typeof object[key] === 'function' ? 'method' : 'property';
+ const clazz = decoratorTargetType === 'static' ? object : object.constructor;
+ const decoratorsForClass = (0, exports.getDecoratorsForClass)(clazz);
+ const decoratorsForTargetType = (_a = decoratorsForClass === null || decoratorsForClass === void 0 ? void 0 : decoratorsForClass[decoratorTargetType]) !== null && _a !== void 0 ? _a : {};
+ decoratorsForClass[decoratorTargetType] = decoratorsForTargetType;
+ let decoratorsForType = (_b = decoratorsForTargetType === null || decoratorsForTargetType === void 0 ? void 0 : decoratorsForTargetType[decoratorType]) !== null && _b !== void 0 ? _b : {};
+ decoratorsForTargetType[decoratorType] = decoratorsForType;
+ let decoratorsForKey = (_c = decoratorsForType === null || decoratorsForType === void 0 ? void 0 : decoratorsForType[key]) !== null && _c !== void 0 ? _c : [];
+ decoratorsForType[key] = decoratorsForKey;
+ // @ts-ignore: array is type `A[] | B[]` and item is type `A | B`, so technically a type error, but it's fine
+ decoratorsForKey.push(decorator);
+ // @ts-ignore
+ return decorator(object, key, ...otherArgs);
+});
+const decorate = (decorator) => ((...args) => {
+ if (args.length === 1)
+ return decorateClass(decorator)(args[0]);
+ return decorateMember(decorator)(...args);
+});
+exports.decorate = decorate;
diff --git a/node_modules/ts-mixer/dist/cjs/index.js b/node_modules/ts-mixer/dist/cjs/index.js
new file mode 100644
index 0000000..5702401
--- /dev/null
+++ b/node_modules/ts-mixer/dist/cjs/index.js
@@ -0,0 +1,12 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.hasMixin = exports.decorate = exports.settings = exports.mix = exports.Mixin = void 0;
+var mixins_1 = require("./mixins");
+Object.defineProperty(exports, "Mixin", { enumerable: true, get: function () { return mixins_1.Mixin; } });
+Object.defineProperty(exports, "mix", { enumerable: true, get: function () { return mixins_1.mix; } });
+var settings_1 = require("./settings");
+Object.defineProperty(exports, "settings", { enumerable: true, get: function () { return settings_1.settings; } });
+var decorator_1 = require("./decorator");
+Object.defineProperty(exports, "decorate", { enumerable: true, get: function () { return decorator_1.decorate; } });
+var mixin_tracking_1 = require("./mixin-tracking");
+Object.defineProperty(exports, "hasMixin", { enumerable: true, get: function () { return mixin_tracking_1.hasMixin; } });
diff --git a/node_modules/ts-mixer/dist/cjs/mixin-tracking.js b/node_modules/ts-mixer/dist/cjs/mixin-tracking.js
new file mode 100644
index 0000000..33ac2e7
--- /dev/null
+++ b/node_modules/ts-mixer/dist/cjs/mixin-tracking.js
@@ -0,0 +1,40 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.hasMixin = exports.registerMixins = exports.getMixinsForClass = void 0;
+const util_1 = require("./util");
+// Keeps track of constituent classes for every mixin class created by ts-mixer.
+const mixins = new Map();
+const getMixinsForClass = (clazz) => mixins.get(clazz);
+exports.getMixinsForClass = getMixinsForClass;
+const registerMixins = (mixedClass, constituents) => mixins.set(mixedClass, constituents);
+exports.registerMixins = registerMixins;
+const hasMixin = (instance, mixin) => {
+ if (instance instanceof mixin)
+ return true;
+ const constructor = instance.constructor;
+ const visited = new Set();
+ let frontier = new Set();
+ frontier.add(constructor);
+ while (frontier.size > 0) {
+ // check if the frontier has the mixin we're looking for. if not, we can say we visited every item in the frontier
+ if (frontier.has(mixin))
+ return true;
+ frontier.forEach(item => visited.add(item));
+ // build a new frontier based on the associated mixin classes and prototype chains of each frontier item
+ const newFrontier = new Set();
+ frontier.forEach(item => {
+ var _a;
+ const itemConstituents = (_a = mixins.get(item)) !== null && _a !== void 0 ? _a : (0, util_1.protoChain)(item.prototype).map(proto => proto.constructor).filter(item => item !== null);
+ if (itemConstituents)
+ itemConstituents.forEach(constituent => {
+ if (!visited.has(constituent) && !frontier.has(constituent))
+ newFrontier.add(constituent);
+ });
+ });
+ // we have a new frontier, now search again
+ frontier = newFrontier;
+ }
+ // if we get here, we couldn't find the mixin anywhere in the prototype chain or associated mixin classes
+ return false;
+};
+exports.hasMixin = hasMixin;
diff --git a/node_modules/ts-mixer/dist/cjs/mixins.js b/node_modules/ts-mixer/dist/cjs/mixins.js
new file mode 100644
index 0000000..925e90a
--- /dev/null
+++ b/node_modules/ts-mixer/dist/cjs/mixins.js
@@ -0,0 +1,82 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.mix = exports.Mixin = void 0;
+const proxy_1 = require("./proxy");
+const settings_1 = require("./settings");
+const util_1 = require("./util");
+const decorator_1 = require("./decorator");
+const mixin_tracking_1 = require("./mixin-tracking");
+function Mixin(...constructors) {
+ var _a, _b, _c;
+ const prototypes = constructors.map(constructor => constructor.prototype);
+ // Here we gather up the init functions of the ingredient prototypes, combine them into one init function, and
+ // attach it to the mixed class prototype. The reason we do this is because we want the init functions to mix
+ // similarly to constructors -- not methods, which simply override each other.
+ const initFunctionName = settings_1.settings.initFunction;
+ if (initFunctionName !== null) {
+ const initFunctions = prototypes
+ .map(proto => proto[initFunctionName])
+ .filter(func => typeof func === 'function');
+ const combinedInitFunction = function (...args) {
+ for (let initFunction of initFunctions)
+ initFunction.apply(this, args);
+ };
+ const extraProto = { [initFunctionName]: combinedInitFunction };
+ prototypes.push(extraProto);
+ }
+ function MixedClass(...args) {
+ for (const constructor of constructors)
+ // @ts-ignore: potentially abstract class
+ (0, util_1.copyProps)(this, new constructor(...args));
+ if (initFunctionName !== null && typeof this[initFunctionName] === 'function')
+ this[initFunctionName].apply(this, args);
+ }
+ MixedClass.prototype = settings_1.settings.prototypeStrategy === 'copy'
+ ? (0, util_1.hardMixProtos)(prototypes, MixedClass)
+ : (0, proxy_1.softMixProtos)(prototypes, MixedClass);
+ Object.setPrototypeOf(MixedClass, settings_1.settings.staticsStrategy === 'copy'
+ ? (0, util_1.hardMixProtos)(constructors, null, ['prototype'])
+ : (0, proxy_1.proxyMix)(constructors, Function.prototype));
+ let DecoratedMixedClass = MixedClass;
+ if (settings_1.settings.decoratorInheritance !== 'none') {
+ const classDecorators = settings_1.settings.decoratorInheritance === 'deep'
+ ? (0, decorator_1.deepDecoratorSearch)(...constructors)
+ : (0, decorator_1.directDecoratorSearch)(...constructors);
+ for (let decorator of (_a = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.class) !== null && _a !== void 0 ? _a : []) {
+ const result = decorator(DecoratedMixedClass);
+ if (result) {
+ DecoratedMixedClass = result;
+ }
+ }
+ applyPropAndMethodDecorators((_b = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.static) !== null && _b !== void 0 ? _b : {}, DecoratedMixedClass);
+ applyPropAndMethodDecorators((_c = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.instance) !== null && _c !== void 0 ? _c : {}, DecoratedMixedClass.prototype);
+ }
+ (0, mixin_tracking_1.registerMixins)(DecoratedMixedClass, constructors);
+ return DecoratedMixedClass;
+}
+exports.Mixin = Mixin;
+const applyPropAndMethodDecorators = (propAndMethodDecorators, target) => {
+ const propDecorators = propAndMethodDecorators.property;
+ const methodDecorators = propAndMethodDecorators.method;
+ if (propDecorators)
+ for (let key in propDecorators)
+ for (let decorator of propDecorators[key])
+ decorator(target, key);
+ if (methodDecorators)
+ for (let key in methodDecorators)
+ for (let decorator of methodDecorators[key])
+ decorator(target, key, Object.getOwnPropertyDescriptor(target, key));
+};
+/**
+ * A decorator version of the `Mixin` function. You'll want to use this instead of `Mixin` for mixing generic classes.
+ */
+const mix = (...ingredients) => decoratedClass => {
+ // @ts-ignore
+ const mixedClass = Mixin(...ingredients.concat([decoratedClass]));
+ Object.defineProperty(mixedClass, 'name', {
+ value: decoratedClass.name,
+ writable: false,
+ });
+ return mixedClass;
+};
+exports.mix = mix;
diff --git a/node_modules/ts-mixer/dist/cjs/proxy.js b/node_modules/ts-mixer/dist/cjs/proxy.js
new file mode 100644
index 0000000..f7974c3
--- /dev/null
+++ b/node_modules/ts-mixer/dist/cjs/proxy.js
@@ -0,0 +1,82 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.softMixProtos = exports.proxyMix = exports.getIngredientWithProp = void 0;
+const util_1 = require("./util");
+/**
+ * Finds the ingredient with the given prop, searching in reverse order and breadth-first if searching ingredient
+ * prototypes is required.
+ */
+const getIngredientWithProp = (prop, ingredients) => {
+ const protoChains = ingredients.map(ingredient => (0, util_1.protoChain)(ingredient));
+ // since we search breadth-first, we need to keep track of our depth in the prototype chains
+ let protoDepth = 0;
+ // not all prototype chains are the same depth, so this remains true as long as at least one of the ingredients'
+ // prototype chains has an object at this depth
+ let protosAreLeftToSearch = true;
+ while (protosAreLeftToSearch) {
+ // with the start of each horizontal slice, we assume this is the one that's deeper than any of the proto chains
+ protosAreLeftToSearch = false;
+ // scan through the ingredients right to left
+ for (let i = ingredients.length - 1; i >= 0; i--) {
+ const searchTarget = protoChains[i][protoDepth];
+ if (searchTarget !== undefined && searchTarget !== null) {
+ // if we find something, this is proof that this horizontal slice potentially more objects to search
+ protosAreLeftToSearch = true;
+ // eureka, we found it
+ if (Object.getOwnPropertyDescriptor(searchTarget, prop) != undefined) {
+ return protoChains[i][0];
+ }
+ }
+ }
+ protoDepth++;
+ }
+ return undefined;
+};
+exports.getIngredientWithProp = getIngredientWithProp;
+/**
+ * "Mixes" ingredients by wrapping them in a Proxy. The optional prototype argument allows the mixed object to sit
+ * downstream of an existing prototype chain. Note that "properties" cannot be added, deleted, or modified.
+ */
+const proxyMix = (ingredients, prototype = Object.prototype) => new Proxy({}, {
+ getPrototypeOf() {
+ return prototype;
+ },
+ setPrototypeOf() {
+ throw Error('Cannot set prototype of Proxies created by ts-mixer');
+ },
+ getOwnPropertyDescriptor(_, prop) {
+ return Object.getOwnPropertyDescriptor((0, exports.getIngredientWithProp)(prop, ingredients) || {}, prop);
+ },
+ defineProperty() {
+ throw new Error('Cannot define new properties on Proxies created by ts-mixer');
+ },
+ has(_, prop) {
+ return (0, exports.getIngredientWithProp)(prop, ingredients) !== undefined || prototype[prop] !== undefined;
+ },
+ get(_, prop) {
+ return ((0, exports.getIngredientWithProp)(prop, ingredients) || prototype)[prop];
+ },
+ set(_, prop, val) {
+ const ingredientWithProp = (0, exports.getIngredientWithProp)(prop, ingredients);
+ if (ingredientWithProp === undefined)
+ throw new Error('Cannot set new properties on Proxies created by ts-mixer');
+ ingredientWithProp[prop] = val;
+ return true;
+ },
+ deleteProperty() {
+ throw new Error('Cannot delete properties on Proxies created by ts-mixer');
+ },
+ ownKeys() {
+ return ingredients
+ .map(Object.getOwnPropertyNames)
+ .reduce((prev, curr) => curr.concat(prev.filter(key => curr.indexOf(key) < 0)));
+ },
+});
+exports.proxyMix = proxyMix;
+/**
+ * Creates a new proxy-prototype object that is a "soft" mixture of the given prototypes. The mixing is achieved by
+ * proxying all property access to the ingredients. This is not ES5 compatible and less performant. However, any
+ * changes made to the source prototypes will be reflected in the proxy-prototype, which may be desirable.
+ */
+const softMixProtos = (ingredients, constructor) => (0, exports.proxyMix)([...ingredients, { constructor }]);
+exports.softMixProtos = softMixProtos;
diff --git a/node_modules/ts-mixer/dist/cjs/settings.js b/node_modules/ts-mixer/dist/cjs/settings.js
new file mode 100644
index 0000000..dabb6d3
--- /dev/null
+++ b/node_modules/ts-mixer/dist/cjs/settings.js
@@ -0,0 +1,9 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.settings = void 0;
+exports.settings = {
+ initFunction: null,
+ staticsStrategy: 'copy',
+ prototypeStrategy: 'copy',
+ decoratorInheritance: 'deep',
+};
diff --git a/node_modules/ts-mixer/dist/cjs/types.js b/node_modules/ts-mixer/dist/cjs/types.js
new file mode 100644
index 0000000..c8ad2e5
--- /dev/null
+++ b/node_modules/ts-mixer/dist/cjs/types.js
@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/node_modules/ts-mixer/dist/cjs/util.js b/node_modules/ts-mixer/dist/cjs/util.js
new file mode 100644
index 0000000..5151696
--- /dev/null
+++ b/node_modules/ts-mixer/dist/cjs/util.js
@@ -0,0 +1,85 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.flatten = exports.unique = exports.hardMixProtos = exports.nearestCommonProto = exports.protoChain = exports.copyProps = void 0;
+/**
+ * Utility function that works like `Object.apply`, but copies getters and setters properly as well. Additionally gives
+ * the option to exclude properties by name.
+ */
+const copyProps = (dest, src, exclude = []) => {
+ const props = Object.getOwnPropertyDescriptors(src);
+ for (let prop of exclude)
+ delete props[prop];
+ Object.defineProperties(dest, props);
+};
+exports.copyProps = copyProps;
+/**
+ * Returns the full chain of prototypes up until Object.prototype given a starting object. The order of prototypes will
+ * be closest to farthest in the chain.
+ */
+const protoChain = (obj, currentChain = [obj]) => {
+ const proto = Object.getPrototypeOf(obj);
+ if (proto === null)
+ return currentChain;
+ return (0, exports.protoChain)(proto, [...currentChain, proto]);
+};
+exports.protoChain = protoChain;
+/**
+ * Identifies the nearest ancestor common to all the given objects in their prototype chains. For most unrelated
+ * objects, this function should return Object.prototype.
+ */
+const nearestCommonProto = (...objs) => {
+ if (objs.length === 0)
+ return undefined;
+ let commonProto = undefined;
+ const protoChains = objs.map(obj => (0, exports.protoChain)(obj));
+ while (protoChains.every(protoChain => protoChain.length > 0)) {
+ const protos = protoChains.map(protoChain => protoChain.pop());
+ const potentialCommonProto = protos[0];
+ if (protos.every(proto => proto === potentialCommonProto))
+ commonProto = potentialCommonProto;
+ else
+ break;
+ }
+ return commonProto;
+};
+exports.nearestCommonProto = nearestCommonProto;
+/**
+ * Creates a new prototype object that is a mixture of the given prototypes. The mixing is achieved by first
+ * identifying the nearest common ancestor and using it as the prototype for a new object. Then all properties/methods
+ * downstream of this prototype (ONLY downstream) are copied into the new object.
+ *
+ * The resulting prototype is more performant than softMixProtos(...), as well as ES5 compatible. However, it's not as
+ * flexible as updates to the source prototypes aren't captured by the mixed result. See softMixProtos for why you may
+ * want to use that instead.
+ */
+const hardMixProtos = (ingredients, constructor, exclude = []) => {
+ var _a;
+ const base = (_a = (0, exports.nearestCommonProto)(...ingredients)) !== null && _a !== void 0 ? _a : Object.prototype;
+ const mixedProto = Object.create(base);
+ // Keeps track of prototypes we've already visited to avoid copying the same properties multiple times. We init the
+ // list with the proto chain below the nearest common ancestor because we don't want any of those methods mixed in
+ // when they will already be accessible via prototype access.
+ const visitedProtos = (0, exports.protoChain)(base);
+ for (let prototype of ingredients) {
+ let protos = (0, exports.protoChain)(prototype);
+ // Apply the prototype chain in reverse order so that old methods don't override newer ones.
+ for (let i = protos.length - 1; i >= 0; i--) {
+ let newProto = protos[i];
+ if (visitedProtos.indexOf(newProto) === -1) {
+ (0, exports.copyProps)(mixedProto, newProto, ['constructor', ...exclude]);
+ visitedProtos.push(newProto);
+ }
+ }
+ }
+ mixedProto.constructor = constructor;
+ return mixedProto;
+};
+exports.hardMixProtos = hardMixProtos;
+const unique = (arr) => arr.filter((e, i) => arr.indexOf(e) == i);
+exports.unique = unique;
+const flatten = (arr) => arr.length === 0
+ ? []
+ : arr.length === 1
+ ? arr[0]
+ : arr.reduce((a1, a2) => [...a1, ...a2]);
+exports.flatten = flatten;
diff --git a/node_modules/ts-mixer/dist/esm/decorator.d.ts b/node_modules/ts-mixer/dist/esm/decorator.d.ts
new file mode 100644
index 0000000..dde5df2
--- /dev/null
+++ b/node_modules/ts-mixer/dist/esm/decorator.d.ts
@@ -0,0 +1,18 @@
+import { Class } from './types';
+type ObjectOfDecorators<T extends PropertyDecorator | MethodDecorator> = {
+ [key: string]: T[];
+};
+export type PropertyAndMethodDecorators = {
+ property?: ObjectOfDecorators<PropertyDecorator>;
+ method?: ObjectOfDecorators<MethodDecorator>;
+};
+type Decorators = {
+ class?: ClassDecorator[];
+ static?: PropertyAndMethodDecorators;
+ instance?: PropertyAndMethodDecorators;
+};
+export declare const deepDecoratorSearch: (...classes: Class[]) => Decorators;
+export declare const directDecoratorSearch: (...classes: Class[]) => Decorators;
+export declare const getDecoratorsForClass: (clazz: Class) => Decorators;
+export declare const decorate: <T extends PropertyDecorator | MethodDecorator | ClassDecorator>(decorator: T) => T;
+export {};
diff --git a/node_modules/ts-mixer/dist/esm/index.d.ts b/node_modules/ts-mixer/dist/esm/index.d.ts
new file mode 100644
index 0000000..2a16080
--- /dev/null
+++ b/node_modules/ts-mixer/dist/esm/index.d.ts
@@ -0,0 +1,4 @@
+export { Mixin, mix } from './mixins';
+export { settings } from './settings';
+export { decorate } from './decorator';
+export { hasMixin } from './mixin-tracking';
diff --git a/node_modules/ts-mixer/dist/esm/index.js b/node_modules/ts-mixer/dist/esm/index.js
new file mode 100644
index 0000000..991d21b
--- /dev/null
+++ b/node_modules/ts-mixer/dist/esm/index.js
@@ -0,0 +1,364 @@
+/**
+ * Utility function that works like `Object.apply`, but copies getters and setters properly as well. Additionally gives
+ * the option to exclude properties by name.
+ */
+const copyProps = (dest, src, exclude = []) => {
+ const props = Object.getOwnPropertyDescriptors(src);
+ for (let prop of exclude)
+ delete props[prop];
+ Object.defineProperties(dest, props);
+};
+/**
+ * Returns the full chain of prototypes up until Object.prototype given a starting object. The order of prototypes will
+ * be closest to farthest in the chain.
+ */
+const protoChain = (obj, currentChain = [obj]) => {
+ const proto = Object.getPrototypeOf(obj);
+ if (proto === null)
+ return currentChain;
+ return protoChain(proto, [...currentChain, proto]);
+};
+/**
+ * Identifies the nearest ancestor common to all the given objects in their prototype chains. For most unrelated
+ * objects, this function should return Object.prototype.
+ */
+const nearestCommonProto = (...objs) => {
+ if (objs.length === 0)
+ return undefined;
+ let commonProto = undefined;
+ const protoChains = objs.map(obj => protoChain(obj));
+ while (protoChains.every(protoChain => protoChain.length > 0)) {
+ const protos = protoChains.map(protoChain => protoChain.pop());
+ const potentialCommonProto = protos[0];
+ if (protos.every(proto => proto === potentialCommonProto))
+ commonProto = potentialCommonProto;
+ else
+ break;
+ }
+ return commonProto;
+};
+/**
+ * Creates a new prototype object that is a mixture of the given prototypes. The mixing is achieved by first
+ * identifying the nearest common ancestor and using it as the prototype for a new object. Then all properties/methods
+ * downstream of this prototype (ONLY downstream) are copied into the new object.
+ *
+ * The resulting prototype is more performant than softMixProtos(...), as well as ES5 compatible. However, it's not as
+ * flexible as updates to the source prototypes aren't captured by the mixed result. See softMixProtos for why you may
+ * want to use that instead.
+ */
+const hardMixProtos = (ingredients, constructor, exclude = []) => {
+ var _a;
+ const base = (_a = nearestCommonProto(...ingredients)) !== null && _a !== void 0 ? _a : Object.prototype;
+ const mixedProto = Object.create(base);
+ // Keeps track of prototypes we've already visited to avoid copying the same properties multiple times. We init the
+ // list with the proto chain below the nearest common ancestor because we don't want any of those methods mixed in
+ // when they will already be accessible via prototype access.
+ const visitedProtos = protoChain(base);
+ for (let prototype of ingredients) {
+ let protos = protoChain(prototype);
+ // Apply the prototype chain in reverse order so that old methods don't override newer ones.
+ for (let i = protos.length - 1; i >= 0; i--) {
+ let newProto = protos[i];
+ if (visitedProtos.indexOf(newProto) === -1) {
+ copyProps(mixedProto, newProto, ['constructor', ...exclude]);
+ visitedProtos.push(newProto);
+ }
+ }
+ }
+ mixedProto.constructor = constructor;
+ return mixedProto;
+};
+const unique = (arr) => arr.filter((e, i) => arr.indexOf(e) == i);
+
+/**
+ * Finds the ingredient with the given prop, searching in reverse order and breadth-first if searching ingredient
+ * prototypes is required.
+ */
+const getIngredientWithProp = (prop, ingredients) => {
+ const protoChains = ingredients.map(ingredient => protoChain(ingredient));
+ // since we search breadth-first, we need to keep track of our depth in the prototype chains
+ let protoDepth = 0;
+ // not all prototype chains are the same depth, so this remains true as long as at least one of the ingredients'
+ // prototype chains has an object at this depth
+ let protosAreLeftToSearch = true;
+ while (protosAreLeftToSearch) {
+ // with the start of each horizontal slice, we assume this is the one that's deeper than any of the proto chains
+ protosAreLeftToSearch = false;
+ // scan through the ingredients right to left
+ for (let i = ingredients.length - 1; i >= 0; i--) {
+ const searchTarget = protoChains[i][protoDepth];
+ if (searchTarget !== undefined && searchTarget !== null) {
+ // if we find something, this is proof that this horizontal slice potentially more objects to search
+ protosAreLeftToSearch = true;
+ // eureka, we found it
+ if (Object.getOwnPropertyDescriptor(searchTarget, prop) != undefined) {
+ return protoChains[i][0];
+ }
+ }
+ }
+ protoDepth++;
+ }
+ return undefined;
+};
+/**
+ * "Mixes" ingredients by wrapping them in a Proxy. The optional prototype argument allows the mixed object to sit
+ * downstream of an existing prototype chain. Note that "properties" cannot be added, deleted, or modified.
+ */
+const proxyMix = (ingredients, prototype = Object.prototype) => new Proxy({}, {
+ getPrototypeOf() {
+ return prototype;
+ },
+ setPrototypeOf() {
+ throw Error('Cannot set prototype of Proxies created by ts-mixer');
+ },
+ getOwnPropertyDescriptor(_, prop) {
+ return Object.getOwnPropertyDescriptor(getIngredientWithProp(prop, ingredients) || {}, prop);
+ },
+ defineProperty() {
+ throw new Error('Cannot define new properties on Proxies created by ts-mixer');
+ },
+ has(_, prop) {
+ return getIngredientWithProp(prop, ingredients) !== undefined || prototype[prop] !== undefined;
+ },
+ get(_, prop) {
+ return (getIngredientWithProp(prop, ingredients) || prototype)[prop];
+ },
+ set(_, prop, val) {
+ const ingredientWithProp = getIngredientWithProp(prop, ingredients);
+ if (ingredientWithProp === undefined)
+ throw new Error('Cannot set new properties on Proxies created by ts-mixer');
+ ingredientWithProp[prop] = val;
+ return true;
+ },
+ deleteProperty() {
+ throw new Error('Cannot delete properties on Proxies created by ts-mixer');
+ },
+ ownKeys() {
+ return ingredients
+ .map(Object.getOwnPropertyNames)
+ .reduce((prev, curr) => curr.concat(prev.filter(key => curr.indexOf(key) < 0)));
+ },
+});
+/**
+ * Creates a new proxy-prototype object that is a "soft" mixture of the given prototypes. The mixing is achieved by
+ * proxying all property access to the ingredients. This is not ES5 compatible and less performant. However, any
+ * changes made to the source prototypes will be reflected in the proxy-prototype, which may be desirable.
+ */
+const softMixProtos = (ingredients, constructor) => proxyMix([...ingredients, { constructor }]);
+
+const settings = {
+ initFunction: null,
+ staticsStrategy: 'copy',
+ prototypeStrategy: 'copy',
+ decoratorInheritance: 'deep',
+};
+
+// Keeps track of constituent classes for every mixin class created by ts-mixer.
+const mixins = new Map();
+const getMixinsForClass = (clazz) => mixins.get(clazz);
+const registerMixins = (mixedClass, constituents) => mixins.set(mixedClass, constituents);
+const hasMixin = (instance, mixin) => {
+ if (instance instanceof mixin)
+ return true;
+ const constructor = instance.constructor;
+ const visited = new Set();
+ let frontier = new Set();
+ frontier.add(constructor);
+ while (frontier.size > 0) {
+ // check if the frontier has the mixin we're looking for. if not, we can say we visited every item in the frontier
+ if (frontier.has(mixin))
+ return true;
+ frontier.forEach(item => visited.add(item));
+ // build a new frontier based on the associated mixin classes and prototype chains of each frontier item
+ const newFrontier = new Set();
+ frontier.forEach(item => {
+ var _a;
+ const itemConstituents = (_a = mixins.get(item)) !== null && _a !== void 0 ? _a : protoChain(item.prototype).map(proto => proto.constructor).filter(item => item !== null);
+ if (itemConstituents)
+ itemConstituents.forEach(constituent => {
+ if (!visited.has(constituent) && !frontier.has(constituent))
+ newFrontier.add(constituent);
+ });
+ });
+ // we have a new frontier, now search again
+ frontier = newFrontier;
+ }
+ // if we get here, we couldn't find the mixin anywhere in the prototype chain or associated mixin classes
+ return false;
+};
+
+const mergeObjectsOfDecorators = (o1, o2) => {
+ var _a, _b;
+ const allKeys = unique([...Object.getOwnPropertyNames(o1), ...Object.getOwnPropertyNames(o2)]);
+ const mergedObject = {};
+ for (let key of allKeys)
+ mergedObject[key] = unique([...((_a = o1 === null || o1 === void 0 ? void 0 : o1[key]) !== null && _a !== void 0 ? _a : []), ...((_b = o2 === null || o2 === void 0 ? void 0 : o2[key]) !== null && _b !== void 0 ? _b : [])]);
+ return mergedObject;
+};
+const mergePropertyAndMethodDecorators = (d1, d2) => {
+ var _a, _b, _c, _d;
+ return ({
+ property: mergeObjectsOfDecorators((_a = d1 === null || d1 === void 0 ? void 0 : d1.property) !== null && _a !== void 0 ? _a : {}, (_b = d2 === null || d2 === void 0 ? void 0 : d2.property) !== null && _b !== void 0 ? _b : {}),
+ method: mergeObjectsOfDecorators((_c = d1 === null || d1 === void 0 ? void 0 : d1.method) !== null && _c !== void 0 ? _c : {}, (_d = d2 === null || d2 === void 0 ? void 0 : d2.method) !== null && _d !== void 0 ? _d : {}),
+ });
+};
+const mergeDecorators = (d1, d2) => {
+ var _a, _b, _c, _d, _e, _f;
+ return ({
+ class: unique([...(_a = d1 === null || d1 === void 0 ? void 0 : d1.class) !== null && _a !== void 0 ? _a : [], ...(_b = d2 === null || d2 === void 0 ? void 0 : d2.class) !== null && _b !== void 0 ? _b : []]),
+ static: mergePropertyAndMethodDecorators((_c = d1 === null || d1 === void 0 ? void 0 : d1.static) !== null && _c !== void 0 ? _c : {}, (_d = d2 === null || d2 === void 0 ? void 0 : d2.static) !== null && _d !== void 0 ? _d : {}),
+ instance: mergePropertyAndMethodDecorators((_e = d1 === null || d1 === void 0 ? void 0 : d1.instance) !== null && _e !== void 0 ? _e : {}, (_f = d2 === null || d2 === void 0 ? void 0 : d2.instance) !== null && _f !== void 0 ? _f : {}),
+ });
+};
+const decorators = new Map();
+const findAllConstituentClasses = (...classes) => {
+ var _a;
+ const allClasses = new Set();
+ const frontier = new Set([...classes]);
+ while (frontier.size > 0) {
+ for (let clazz of frontier) {
+ const protoChainClasses = protoChain(clazz.prototype).map(proto => proto.constructor);
+ const mixinClasses = (_a = getMixinsForClass(clazz)) !== null && _a !== void 0 ? _a : [];
+ const potentiallyNewClasses = [...protoChainClasses, ...mixinClasses];
+ const newClasses = potentiallyNewClasses.filter(c => !allClasses.has(c));
+ for (let newClass of newClasses)
+ frontier.add(newClass);
+ allClasses.add(clazz);
+ frontier.delete(clazz);
+ }
+ }
+ return [...allClasses];
+};
+const deepDecoratorSearch = (...classes) => {
+ const decoratorsForClassChain = findAllConstituentClasses(...classes)
+ .map(clazz => decorators.get(clazz))
+ .filter(decorators => !!decorators);
+ if (decoratorsForClassChain.length == 0)
+ return {};
+ if (decoratorsForClassChain.length == 1)
+ return decoratorsForClassChain[0];
+ return decoratorsForClassChain.reduce((d1, d2) => mergeDecorators(d1, d2));
+};
+const directDecoratorSearch = (...classes) => {
+ const classDecorators = classes.map(clazz => getDecoratorsForClass(clazz));
+ if (classDecorators.length === 0)
+ return {};
+ if (classDecorators.length === 1)
+ return classDecorators[0];
+ return classDecorators.reduce((d1, d2) => mergeDecorators(d1, d2));
+};
+const getDecoratorsForClass = (clazz) => {
+ let decoratorsForClass = decorators.get(clazz);
+ if (!decoratorsForClass) {
+ decoratorsForClass = {};
+ decorators.set(clazz, decoratorsForClass);
+ }
+ return decoratorsForClass;
+};
+const decorateClass = (decorator) => ((clazz) => {
+ const decoratorsForClass = getDecoratorsForClass(clazz);
+ let classDecorators = decoratorsForClass.class;
+ if (!classDecorators) {
+ classDecorators = [];
+ decoratorsForClass.class = classDecorators;
+ }
+ classDecorators.push(decorator);
+ return decorator(clazz);
+});
+const decorateMember = (decorator) => ((object, key, ...otherArgs) => {
+ var _a, _b, _c;
+ const decoratorTargetType = typeof object === 'function' ? 'static' : 'instance';
+ const decoratorType = typeof object[key] === 'function' ? 'method' : 'property';
+ const clazz = decoratorTargetType === 'static' ? object : object.constructor;
+ const decoratorsForClass = getDecoratorsForClass(clazz);
+ const decoratorsForTargetType = (_a = decoratorsForClass === null || decoratorsForClass === void 0 ? void 0 : decoratorsForClass[decoratorTargetType]) !== null && _a !== void 0 ? _a : {};
+ decoratorsForClass[decoratorTargetType] = decoratorsForTargetType;
+ let decoratorsForType = (_b = decoratorsForTargetType === null || decoratorsForTargetType === void 0 ? void 0 : decoratorsForTargetType[decoratorType]) !== null && _b !== void 0 ? _b : {};
+ decoratorsForTargetType[decoratorType] = decoratorsForType;
+ let decoratorsForKey = (_c = decoratorsForType === null || decoratorsForType === void 0 ? void 0 : decoratorsForType[key]) !== null && _c !== void 0 ? _c : [];
+ decoratorsForType[key] = decoratorsForKey;
+ // @ts-ignore: array is type `A[] | B[]` and item is type `A | B`, so technically a type error, but it's fine
+ decoratorsForKey.push(decorator);
+ // @ts-ignore
+ return decorator(object, key, ...otherArgs);
+});
+const decorate = (decorator) => ((...args) => {
+ if (args.length === 1)
+ return decorateClass(decorator)(args[0]);
+ return decorateMember(decorator)(...args);
+});
+
+function Mixin(...constructors) {
+ var _a, _b, _c;
+ const prototypes = constructors.map(constructor => constructor.prototype);
+ // Here we gather up the init functions of the ingredient prototypes, combine them into one init function, and
+ // attach it to the mixed class prototype. The reason we do this is because we want the init functions to mix
+ // similarly to constructors -- not methods, which simply override each other.
+ const initFunctionName = settings.initFunction;
+ if (initFunctionName !== null) {
+ const initFunctions = prototypes
+ .map(proto => proto[initFunctionName])
+ .filter(func => typeof func === 'function');
+ const combinedInitFunction = function (...args) {
+ for (let initFunction of initFunctions)
+ initFunction.apply(this, args);
+ };
+ const extraProto = { [initFunctionName]: combinedInitFunction };
+ prototypes.push(extraProto);
+ }
+ function MixedClass(...args) {
+ for (const constructor of constructors)
+ // @ts-ignore: potentially abstract class
+ copyProps(this, new constructor(...args));
+ if (initFunctionName !== null && typeof this[initFunctionName] === 'function')
+ this[initFunctionName].apply(this, args);
+ }
+ MixedClass.prototype = settings.prototypeStrategy === 'copy'
+ ? hardMixProtos(prototypes, MixedClass)
+ : softMixProtos(prototypes, MixedClass);
+ Object.setPrototypeOf(MixedClass, settings.staticsStrategy === 'copy'
+ ? hardMixProtos(constructors, null, ['prototype'])
+ : proxyMix(constructors, Function.prototype));
+ let DecoratedMixedClass = MixedClass;
+ if (settings.decoratorInheritance !== 'none') {
+ const classDecorators = settings.decoratorInheritance === 'deep'
+ ? deepDecoratorSearch(...constructors)
+ : directDecoratorSearch(...constructors);
+ for (let decorator of (_a = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.class) !== null && _a !== void 0 ? _a : []) {
+ const result = decorator(DecoratedMixedClass);
+ if (result) {
+ DecoratedMixedClass = result;
+ }
+ }
+ applyPropAndMethodDecorators((_b = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.static) !== null && _b !== void 0 ? _b : {}, DecoratedMixedClass);
+ applyPropAndMethodDecorators((_c = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.instance) !== null && _c !== void 0 ? _c : {}, DecoratedMixedClass.prototype);
+ }
+ registerMixins(DecoratedMixedClass, constructors);
+ return DecoratedMixedClass;
+}
+const applyPropAndMethodDecorators = (propAndMethodDecorators, target) => {
+ const propDecorators = propAndMethodDecorators.property;
+ const methodDecorators = propAndMethodDecorators.method;
+ if (propDecorators)
+ for (let key in propDecorators)
+ for (let decorator of propDecorators[key])
+ decorator(target, key);
+ if (methodDecorators)
+ for (let key in methodDecorators)
+ for (let decorator of methodDecorators[key])
+ decorator(target, key, Object.getOwnPropertyDescriptor(target, key));
+};
+/**
+ * A decorator version of the `Mixin` function. You'll want to use this instead of `Mixin` for mixing generic classes.
+ */
+const mix = (...ingredients) => decoratedClass => {
+ // @ts-ignore
+ const mixedClass = Mixin(...ingredients.concat([decoratedClass]));
+ Object.defineProperty(mixedClass, 'name', {
+ value: decoratedClass.name,
+ writable: false,
+ });
+ return mixedClass;
+};
+
+export { Mixin, decorate, hasMixin, mix, settings };
diff --git a/node_modules/ts-mixer/dist/esm/index.min.js b/node_modules/ts-mixer/dist/esm/index.min.js
new file mode 100644
index 0000000..04ab5ba
--- /dev/null
+++ b/node_modules/ts-mixer/dist/esm/index.min.js
@@ -0,0 +1 @@
+const t=(t,e,o=[])=>{const r=Object.getOwnPropertyDescriptors(e);for(let t of o)delete r[t];Object.defineProperties(t,r)},e=(t,o=[t])=>{const r=Object.getPrototypeOf(t);return null===r?o:e(r,[...o,r])},o=(o,r,n=[])=>{var l;const i=null!==(l=((...t)=>{if(0===t.length)return;let o;const r=t.map((t=>e(t)));for(;r.every((t=>t.length>0));){const t=r.map((t=>t.pop())),e=t[0];if(!t.every((t=>t===e)))break;o=e}return o})(...o))&&void 0!==l?l:Object.prototype,c=Object.create(i),s=e(i);for(let r of o){let o=e(r);for(let e=o.length-1;e>=0;e--){let r=o[e];-1===s.indexOf(r)&&(t(c,r,["constructor",...n]),s.push(r))}}return c.constructor=r,c},r=t=>t.filter(((e,o)=>t.indexOf(e)==o)),n=(t,o)=>{const r=o.map((t=>e(t)));let n=0,l=!0;for(;l;){l=!1;for(let e=o.length-1;e>=0;e--){const o=r[e][n];if(null!=o&&(l=!0,null!=Object.getOwnPropertyDescriptor(o,t)))return r[e][0]}n++}},l=(t,e=Object.prototype)=>new Proxy({},{getPrototypeOf:()=>e,setPrototypeOf(){throw Error("Cannot set prototype of Proxies created by ts-mixer")},getOwnPropertyDescriptor:(e,o)=>Object.getOwnPropertyDescriptor(n(o,t)||{},o),defineProperty(){throw new Error("Cannot define new properties on Proxies created by ts-mixer")},has:(o,r)=>void 0!==n(r,t)||void 0!==e[r],get:(o,r)=>(n(r,t)||e)[r],set(e,o,r){const l=n(o,t);if(void 0===l)throw new Error("Cannot set new properties on Proxies created by ts-mixer");return l[o]=r,!0},deleteProperty(){throw new Error("Cannot delete properties on Proxies created by ts-mixer")},ownKeys:()=>t.map(Object.getOwnPropertyNames).reduce(((t,e)=>e.concat(t.filter((t=>e.indexOf(t)<0)))))}),i={initFunction:null,staticsStrategy:"copy",prototypeStrategy:"copy",decoratorInheritance:"deep"},c=new Map,s=t=>c.get(t),p=(t,o)=>{if(t instanceof o)return!0;const r=t.constructor,n=new Set;let l=new Set;for(l.add(r);l.size>0;){if(l.has(o))return!0;l.forEach((t=>n.add(t)));const t=new Set;l.forEach((o=>{var r;const i=null!==(r=c.get(o))&&void 0!==r?r:e(o.prototype).map((t=>t.constructor)).filter((t=>null!==t));i&&i.forEach((e=>{n.has(e)||l.has(e)||t.add(e)}))})),l=t}return!1},u=(t,e)=>{var o,n;const l=r([...Object.getOwnPropertyNames(t),...Object.getOwnPropertyNames(e)]),i={};for(let c of l)i[c]=r([...null!==(o=null==t?void 0:t[c])&&void 0!==o?o:[],...null!==(n=null==e?void 0:e[c])&&void 0!==n?n:[]]);return i},a=(t,e)=>{var o,r,n,l;return{property:u(null!==(o=null==t?void 0:t.property)&&void 0!==o?o:{},null!==(r=null==e?void 0:e.property)&&void 0!==r?r:{}),method:u(null!==(n=null==t?void 0:t.method)&&void 0!==n?n:{},null!==(l=null==e?void 0:e.method)&&void 0!==l?l:{})}},d=(t,e)=>{var o,n,l,i,c,s;return{class:r([...null!==(o=null==t?void 0:t.class)&&void 0!==o?o:[],...null!==(n=null==e?void 0:e.class)&&void 0!==n?n:[]]),static:a(null!==(l=null==t?void 0:t.static)&&void 0!==l?l:{},null!==(i=null==e?void 0:e.static)&&void 0!==i?i:{}),instance:a(null!==(c=null==t?void 0:t.instance)&&void 0!==c?c:{},null!==(s=null==e?void 0:e.instance)&&void 0!==s?s:{})}},f=new Map,v=(...t)=>{const o=((...t)=>{var o;const r=new Set,n=new Set([...t]);for(;n.size>0;)for(let t of n){const l=[...e(t.prototype).map((t=>t.constructor)),...null!==(o=s(t))&&void 0!==o?o:[]].filter((t=>!r.has(t)));for(let t of l)n.add(t);r.add(t),n.delete(t)}return[...r]})(...t).map((t=>f.get(t))).filter((t=>!!t));return 0==o.length?{}:1==o.length?o[0]:o.reduce(((t,e)=>d(t,e)))},y=t=>{let e=f.get(t);return e||(e={},f.set(t,e)),e},h=t=>(...e)=>1===e.length?(t=>e=>{const o=y(e);let r=o.class;return r||(r=[],o.class=r),r.push(t),t(e)})(t)(e[0]):(t=>(e,o,...r)=>{var n,l,i;const c="function"==typeof e?"static":"instance",s="function"==typeof e[o]?"method":"property",p="static"===c?e:e.constructor,u=y(p),a=null!==(n=null==u?void 0:u[c])&&void 0!==n?n:{};u[c]=a;let d=null!==(l=null==a?void 0:a[s])&&void 0!==l?l:{};a[s]=d;let f=null!==(i=null==d?void 0:d[o])&&void 0!==i?i:[];return d[o]=f,f.push(t),t(e,o,...r)})(t)(...e);function O(...e){var r,n,s;const p=e.map((t=>t.prototype)),u=i.initFunction;if(null!==u){const t=p.map((t=>t[u])).filter((t=>"function"==typeof t)),e={[u]:function(...e){for(let o of t)o.apply(this,e)}};p.push(e)}function a(...o){for(const r of e)t(this,new r(...o));null!==u&&"function"==typeof this[u]&&this[u].apply(this,o)}var f,h;a.prototype="copy"===i.prototypeStrategy?o(p,a):(f=p,h=a,l([...f,{constructor:h}])),Object.setPrototypeOf(a,"copy"===i.staticsStrategy?o(e,null,["prototype"]):l(e,Function.prototype));let O=a;if("none"!==i.decoratorInheritance){const t="deep"===i.decoratorInheritance?v(...e):((...t)=>{const e=t.map((t=>y(t)));return 0===e.length?{}:1===e.length?e[0]:e.reduce(((t,e)=>d(t,e)))})(...e);for(let e of null!==(r=null==t?void 0:t.class)&&void 0!==r?r:[]){const t=e(O);t&&(O=t)}g(null!==(n=null==t?void 0:t.static)&&void 0!==n?n:{},O),g(null!==(s=null==t?void 0:t.instance)&&void 0!==s?s:{},O.prototype)}var w,m;return w=O,m=e,c.set(w,m),O}const g=(t,e)=>{const o=t.property,r=t.method;if(o)for(let t in o)for(let r of o[t])r(e,t);if(r)for(let t in r)for(let o of r[t])o(e,t,Object.getOwnPropertyDescriptor(e,t))},w=(...t)=>e=>{const o=O(...t.concat([e]));return Object.defineProperty(o,"name",{value:e.name,writable:!1}),o};export{O as Mixin,h as decorate,p as hasMixin,w as mix,i as settings};
diff --git a/node_modules/ts-mixer/dist/esm/mixin-tracking.d.ts b/node_modules/ts-mixer/dist/esm/mixin-tracking.d.ts
new file mode 100644
index 0000000..1beaf87
--- /dev/null
+++ b/node_modules/ts-mixer/dist/esm/mixin-tracking.d.ts
@@ -0,0 +1,4 @@
+import { Class } from './types';
+export declare const getMixinsForClass: (clazz: Class) => Function[] | undefined;
+export declare const registerMixins: (mixedClass: any, constituents: Function[]) => Map<any, Function[]>;
+export declare const hasMixin: <M>(instance: any, mixin: abstract new (...args: any[]) => M) => instance is M;
diff --git a/node_modules/ts-mixer/dist/esm/mixins.d.ts b/node_modules/ts-mixer/dist/esm/mixins.d.ts
new file mode 100644
index 0000000..a4f65be
--- /dev/null
+++ b/node_modules/ts-mixer/dist/esm/mixins.d.ts
@@ -0,0 +1,16 @@
+import { Class, Longest } from './types';
+declare function Mixin<A extends any[], I1, S1>(c1: Class<A, I1, S1>): Class<A, I1, S1>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>): Class<Longest<A1, A2>, I1 & I2, S1 & S2>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2, A3 extends any[], I3, S3>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>, c3: Class<A3, I3, S3>): Class<Longest<A1, A2, A3>, I1 & I2 & I3, S1 & S2 & S3>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2, A3 extends any[], I3, S3, A4 extends any[], I4, S4>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>, c3: Class<A3, I3, S3>, c4: Class<A4, I4, S4>): Class<Longest<A1, A2, A3, A4>, I1 & I2 & I3 & I4, S1 & S2 & S3 & S4>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2, A3 extends any[], I3, S3, A4 extends any[], I4, S4, A5 extends any[], I5, S5>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>, c3: Class<A3, I3, S3>, c4: Class<A4, I4, S4>, c5: Class<A5, I5, S5>): Class<Longest<A1, A2, A3, A4, A5>, I1 & I2 & I3 & I4 & I5, S1 & S2 & S3 & S4 & S5>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2, A3 extends any[], I3, S3, A4 extends any[], I4, S4, A5 extends any[], I5, S5, A6 extends any[], I6, S6>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>, c3: Class<A3, I3, S3>, c4: Class<A4, I4, S4>, c5: Class<A5, I5, S5>, c6: Class<A6, I6, S6>): Class<Longest<A1, A2, A3, A4, A5, A6>, I1 & I2 & I3 & I4 & I5 & I6, S1 & S2 & S3 & S4 & S5 & S6>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2, A3 extends any[], I3, S3, A4 extends any[], I4, S4, A5 extends any[], I5, S5, A6 extends any[], I6, S6, A7 extends any[], I7, S7>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>, c3: Class<A3, I3, S3>, c4: Class<A4, I4, S4>, c5: Class<A5, I5, S5>, c6: Class<A6, I6, S6>, c7: Class<A7, I7, S7>): Class<Longest<A1, A2, A3, A4, A5, A6, A7>, I1 & I2 & I3 & I4 & I5 & I6 & I7, S1 & S2 & S3 & S4 & S5 & S6 & S7>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2, A3 extends any[], I3, S3, A4 extends any[], I4, S4, A5 extends any[], I5, S5, A6 extends any[], I6, S6, A7 extends any[], I7, S7, A8 extends any[], I8, S8>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>, c3: Class<A3, I3, S3>, c4: Class<A4, I4, S4>, c5: Class<A5, I5, S5>, c6: Class<A6, I6, S6>, c7: Class<A7, I7, S7>, c8: Class<A8, I8, S8>): Class<Longest<A1, A2, A3, A4, A5, A6, A7, A8>, I1 & I2 & I3 & I4 & I5 & I6 & I7 & I8, S1 & S2 & S3 & S4 & S5 & S6 & S7 & S8>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2, A3 extends any[], I3, S3, A4 extends any[], I4, S4, A5 extends any[], I5, S5, A6 extends any[], I6, S6, A7 extends any[], I7, S7, A8 extends any[], I8, S8, A9 extends any[], I9, S9>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>, c3: Class<A3, I3, S3>, c4: Class<A4, I4, S4>, c5: Class<A5, I5, S5>, c6: Class<A6, I6, S6>, c7: Class<A7, I7, S7>, c8: Class<A8, I8, S8>, c9: Class<A9, I9, S9>): Class<Longest<A1, A2, A3, A4, A5, A6, A7, A8, A9>, I1 & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9, S1 & S2 & S3 & S4 & S5 & S6 & S7 & S8 & S9>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2, A3 extends any[], I3, S3, A4 extends any[], I4, S4, A5 extends any[], I5, S5, A6 extends any[], I6, S6, A7 extends any[], I7, S7, A8 extends any[], I8, S8, A9 extends any[], I9, S9, A10 extends any[], I10, S10>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>, c3: Class<A3, I3, S3>, c4: Class<A4, I4, S4>, c5: Class<A5, I5, S5>, c6: Class<A6, I6, S6>, c7: Class<A7, I7, S7>, c8: Class<A8, I8, S8>, c9: Class<A9, I9, S9>, c10: Class<A10, I10, S10>): Class<Longest<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>, I1 & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9 & I10, S1 & S2 & S3 & S4 & S5 & S6 & S7 & S8 & S9 & S10>;
+/**
+ * A decorator version of the `Mixin` function. You'll want to use this instead of `Mixin` for mixing generic classes.
+ */
+declare const mix: (...ingredients: Class[]) => (decoratedClass: any) => any;
+export { Mixin, mix };
diff --git a/node_modules/ts-mixer/dist/esm/proxy.d.ts b/node_modules/ts-mixer/dist/esm/proxy.d.ts
new file mode 100644
index 0000000..fafe399
--- /dev/null
+++ b/node_modules/ts-mixer/dist/esm/proxy.d.ts
@@ -0,0 +1,16 @@
+/**
+ * Finds the ingredient with the given prop, searching in reverse order and breadth-first if searching ingredient
+ * prototypes is required.
+ */
+export declare const getIngredientWithProp: (prop: string | number | symbol, ingredients: any[]) => object | undefined;
+/**
+ * "Mixes" ingredients by wrapping them in a Proxy. The optional prototype argument allows the mixed object to sit
+ * downstream of an existing prototype chain. Note that "properties" cannot be added, deleted, or modified.
+ */
+export declare const proxyMix: (ingredients: any[], prototype?: Object) => {};
+/**
+ * Creates a new proxy-prototype object that is a "soft" mixture of the given prototypes. The mixing is achieved by
+ * proxying all property access to the ingredients. This is not ES5 compatible and less performant. However, any
+ * changes made to the source prototypes will be reflected in the proxy-prototype, which may be desirable.
+ */
+export declare const softMixProtos: (ingredients: any[], constructor: Function) => object;
diff --git a/node_modules/ts-mixer/dist/esm/settings.d.ts b/node_modules/ts-mixer/dist/esm/settings.d.ts
new file mode 100644
index 0000000..d34d2b4
--- /dev/null
+++ b/node_modules/ts-mixer/dist/esm/settings.d.ts
@@ -0,0 +1,7 @@
+export type Settings = {
+ initFunction: string | null;
+ staticsStrategy: 'copy' | 'proxy';
+ prototypeStrategy: 'copy' | 'proxy';
+ decoratorInheritance: 'deep' | 'direct' | 'none';
+};
+export declare const settings: Settings;
diff --git a/node_modules/ts-mixer/dist/esm/types.d.ts b/node_modules/ts-mixer/dist/esm/types.d.ts
new file mode 100644
index 0000000..cb25fc1
--- /dev/null
+++ b/node_modules/ts-mixer/dist/esm/types.d.ts
@@ -0,0 +1,13 @@
+/**
+ * Returns the longer of the two tuples. Indefinite tuples will always be considered longest.
+ */
+type _Longest<T1 extends any[], T2 extends any[]> = any[] extends T1 ? T1 : any[] extends T2 ? T2 : Exclude<keyof T1, keyof T2> extends never ? T2 : T1;
+/**
+ * Returns the longest of up to 10 different tuples.
+ */
+export type Longest<T1 extends any[], T2 extends any[] = [], T3 extends any[] = [], T4 extends any[] = [], T5 extends any[] = [], T6 extends any[] = [], T7 extends any[] = [], T8 extends any[] = [], T9 extends any[] = [], T10 extends any[] = []> = _Longest<_Longest<_Longest<_Longest<T1, T2>, _Longest<T3, T4>>, _Longest<_Longest<T5, T6>, _Longest<T7, T8>>>, _Longest<T9, T10>>;
+/**
+ * A rigorous type alias for a class.
+ */
+export type Class<CtorArgs extends any[] = any[], InstanceType = {}, StaticType = {}, IsAbstract = false> = (abstract new (...args: any[]) => InstanceType) & StaticType;
+export {};
diff --git a/node_modules/ts-mixer/dist/esm/util.d.ts b/node_modules/ts-mixer/dist/esm/util.d.ts
new file mode 100644
index 0000000..4797ef4
--- /dev/null
+++ b/node_modules/ts-mixer/dist/esm/util.d.ts
@@ -0,0 +1,27 @@
+/**
+ * Utility function that works like `Object.apply`, but copies getters and setters properly as well. Additionally gives
+ * the option to exclude properties by name.
+ */
+export declare const copyProps: (dest: object, src: object, exclude?: string[]) => void;
+/**
+ * Returns the full chain of prototypes up until Object.prototype given a starting object. The order of prototypes will
+ * be closest to farthest in the chain.
+ */
+export declare const protoChain: (obj: object, currentChain?: object[]) => object[];
+/**
+ * Identifies the nearest ancestor common to all the given objects in their prototype chains. For most unrelated
+ * objects, this function should return Object.prototype.
+ */
+export declare const nearestCommonProto: (...objs: object[]) => object | undefined;
+/**
+ * Creates a new prototype object that is a mixture of the given prototypes. The mixing is achieved by first
+ * identifying the nearest common ancestor and using it as the prototype for a new object. Then all properties/methods
+ * downstream of this prototype (ONLY downstream) are copied into the new object.
+ *
+ * The resulting prototype is more performant than softMixProtos(...), as well as ES5 compatible. However, it's not as
+ * flexible as updates to the source prototypes aren't captured by the mixed result. See softMixProtos for why you may
+ * want to use that instead.
+ */
+export declare const hardMixProtos: (ingredients: any[], constructor: Function | null, exclude?: string[]) => object;
+export declare const unique: <T>(arr: T[]) => T[];
+export declare const flatten: <T>(arr: T[][]) => T[];
diff --git a/node_modules/ts-mixer/dist/types/decorator.d.ts b/node_modules/ts-mixer/dist/types/decorator.d.ts
new file mode 100644
index 0000000..dde5df2
--- /dev/null
+++ b/node_modules/ts-mixer/dist/types/decorator.d.ts
@@ -0,0 +1,18 @@
+import { Class } from './types';
+type ObjectOfDecorators<T extends PropertyDecorator | MethodDecorator> = {
+ [key: string]: T[];
+};
+export type PropertyAndMethodDecorators = {
+ property?: ObjectOfDecorators<PropertyDecorator>;
+ method?: ObjectOfDecorators<MethodDecorator>;
+};
+type Decorators = {
+ class?: ClassDecorator[];
+ static?: PropertyAndMethodDecorators;
+ instance?: PropertyAndMethodDecorators;
+};
+export declare const deepDecoratorSearch: (...classes: Class[]) => Decorators;
+export declare const directDecoratorSearch: (...classes: Class[]) => Decorators;
+export declare const getDecoratorsForClass: (clazz: Class) => Decorators;
+export declare const decorate: <T extends PropertyDecorator | MethodDecorator | ClassDecorator>(decorator: T) => T;
+export {};
diff --git a/node_modules/ts-mixer/dist/types/index.d.ts b/node_modules/ts-mixer/dist/types/index.d.ts
new file mode 100644
index 0000000..2a16080
--- /dev/null
+++ b/node_modules/ts-mixer/dist/types/index.d.ts
@@ -0,0 +1,4 @@
+export { Mixin, mix } from './mixins';
+export { settings } from './settings';
+export { decorate } from './decorator';
+export { hasMixin } from './mixin-tracking';
diff --git a/node_modules/ts-mixer/dist/types/mixin-tracking.d.ts b/node_modules/ts-mixer/dist/types/mixin-tracking.d.ts
new file mode 100644
index 0000000..1beaf87
--- /dev/null
+++ b/node_modules/ts-mixer/dist/types/mixin-tracking.d.ts
@@ -0,0 +1,4 @@
+import { Class } from './types';
+export declare const getMixinsForClass: (clazz: Class) => Function[] | undefined;
+export declare const registerMixins: (mixedClass: any, constituents: Function[]) => Map<any, Function[]>;
+export declare const hasMixin: <M>(instance: any, mixin: abstract new (...args: any[]) => M) => instance is M;
diff --git a/node_modules/ts-mixer/dist/types/mixins.d.ts b/node_modules/ts-mixer/dist/types/mixins.d.ts
new file mode 100644
index 0000000..a4f65be
--- /dev/null
+++ b/node_modules/ts-mixer/dist/types/mixins.d.ts
@@ -0,0 +1,16 @@
+import { Class, Longest } from './types';
+declare function Mixin<A extends any[], I1, S1>(c1: Class<A, I1, S1>): Class<A, I1, S1>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>): Class<Longest<A1, A2>, I1 & I2, S1 & S2>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2, A3 extends any[], I3, S3>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>, c3: Class<A3, I3, S3>): Class<Longest<A1, A2, A3>, I1 & I2 & I3, S1 & S2 & S3>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2, A3 extends any[], I3, S3, A4 extends any[], I4, S4>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>, c3: Class<A3, I3, S3>, c4: Class<A4, I4, S4>): Class<Longest<A1, A2, A3, A4>, I1 & I2 & I3 & I4, S1 & S2 & S3 & S4>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2, A3 extends any[], I3, S3, A4 extends any[], I4, S4, A5 extends any[], I5, S5>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>, c3: Class<A3, I3, S3>, c4: Class<A4, I4, S4>, c5: Class<A5, I5, S5>): Class<Longest<A1, A2, A3, A4, A5>, I1 & I2 & I3 & I4 & I5, S1 & S2 & S3 & S4 & S5>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2, A3 extends any[], I3, S3, A4 extends any[], I4, S4, A5 extends any[], I5, S5, A6 extends any[], I6, S6>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>, c3: Class<A3, I3, S3>, c4: Class<A4, I4, S4>, c5: Class<A5, I5, S5>, c6: Class<A6, I6, S6>): Class<Longest<A1, A2, A3, A4, A5, A6>, I1 & I2 & I3 & I4 & I5 & I6, S1 & S2 & S3 & S4 & S5 & S6>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2, A3 extends any[], I3, S3, A4 extends any[], I4, S4, A5 extends any[], I5, S5, A6 extends any[], I6, S6, A7 extends any[], I7, S7>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>, c3: Class<A3, I3, S3>, c4: Class<A4, I4, S4>, c5: Class<A5, I5, S5>, c6: Class<A6, I6, S6>, c7: Class<A7, I7, S7>): Class<Longest<A1, A2, A3, A4, A5, A6, A7>, I1 & I2 & I3 & I4 & I5 & I6 & I7, S1 & S2 & S3 & S4 & S5 & S6 & S7>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2, A3 extends any[], I3, S3, A4 extends any[], I4, S4, A5 extends any[], I5, S5, A6 extends any[], I6, S6, A7 extends any[], I7, S7, A8 extends any[], I8, S8>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>, c3: Class<A3, I3, S3>, c4: Class<A4, I4, S4>, c5: Class<A5, I5, S5>, c6: Class<A6, I6, S6>, c7: Class<A7, I7, S7>, c8: Class<A8, I8, S8>): Class<Longest<A1, A2, A3, A4, A5, A6, A7, A8>, I1 & I2 & I3 & I4 & I5 & I6 & I7 & I8, S1 & S2 & S3 & S4 & S5 & S6 & S7 & S8>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2, A3 extends any[], I3, S3, A4 extends any[], I4, S4, A5 extends any[], I5, S5, A6 extends any[], I6, S6, A7 extends any[], I7, S7, A8 extends any[], I8, S8, A9 extends any[], I9, S9>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>, c3: Class<A3, I3, S3>, c4: Class<A4, I4, S4>, c5: Class<A5, I5, S5>, c6: Class<A6, I6, S6>, c7: Class<A7, I7, S7>, c8: Class<A8, I8, S8>, c9: Class<A9, I9, S9>): Class<Longest<A1, A2, A3, A4, A5, A6, A7, A8, A9>, I1 & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9, S1 & S2 & S3 & S4 & S5 & S6 & S7 & S8 & S9>;
+declare function Mixin<A1 extends any[], I1, S1, A2 extends any[], I2, S2, A3 extends any[], I3, S3, A4 extends any[], I4, S4, A5 extends any[], I5, S5, A6 extends any[], I6, S6, A7 extends any[], I7, S7, A8 extends any[], I8, S8, A9 extends any[], I9, S9, A10 extends any[], I10, S10>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>, c3: Class<A3, I3, S3>, c4: Class<A4, I4, S4>, c5: Class<A5, I5, S5>, c6: Class<A6, I6, S6>, c7: Class<A7, I7, S7>, c8: Class<A8, I8, S8>, c9: Class<A9, I9, S9>, c10: Class<A10, I10, S10>): Class<Longest<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>, I1 & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9 & I10, S1 & S2 & S3 & S4 & S5 & S6 & S7 & S8 & S9 & S10>;
+/**
+ * A decorator version of the `Mixin` function. You'll want to use this instead of `Mixin` for mixing generic classes.
+ */
+declare const mix: (...ingredients: Class[]) => (decoratedClass: any) => any;
+export { Mixin, mix };
diff --git a/node_modules/ts-mixer/dist/types/proxy.d.ts b/node_modules/ts-mixer/dist/types/proxy.d.ts
new file mode 100644
index 0000000..fafe399
--- /dev/null
+++ b/node_modules/ts-mixer/dist/types/proxy.d.ts
@@ -0,0 +1,16 @@
+/**
+ * Finds the ingredient with the given prop, searching in reverse order and breadth-first if searching ingredient
+ * prototypes is required.
+ */
+export declare const getIngredientWithProp: (prop: string | number | symbol, ingredients: any[]) => object | undefined;
+/**
+ * "Mixes" ingredients by wrapping them in a Proxy. The optional prototype argument allows the mixed object to sit
+ * downstream of an existing prototype chain. Note that "properties" cannot be added, deleted, or modified.
+ */
+export declare const proxyMix: (ingredients: any[], prototype?: Object) => {};
+/**
+ * Creates a new proxy-prototype object that is a "soft" mixture of the given prototypes. The mixing is achieved by
+ * proxying all property access to the ingredients. This is not ES5 compatible and less performant. However, any
+ * changes made to the source prototypes will be reflected in the proxy-prototype, which may be desirable.
+ */
+export declare const softMixProtos: (ingredients: any[], constructor: Function) => object;
diff --git a/node_modules/ts-mixer/dist/types/settings.d.ts b/node_modules/ts-mixer/dist/types/settings.d.ts
new file mode 100644
index 0000000..d34d2b4
--- /dev/null
+++ b/node_modules/ts-mixer/dist/types/settings.d.ts
@@ -0,0 +1,7 @@
+export type Settings = {
+ initFunction: string | null;
+ staticsStrategy: 'copy' | 'proxy';
+ prototypeStrategy: 'copy' | 'proxy';
+ decoratorInheritance: 'deep' | 'direct' | 'none';
+};
+export declare const settings: Settings;
diff --git a/node_modules/ts-mixer/dist/types/types.d.ts b/node_modules/ts-mixer/dist/types/types.d.ts
new file mode 100644
index 0000000..cb25fc1
--- /dev/null
+++ b/node_modules/ts-mixer/dist/types/types.d.ts
@@ -0,0 +1,13 @@
+/**
+ * Returns the longer of the two tuples. Indefinite tuples will always be considered longest.
+ */
+type _Longest<T1 extends any[], T2 extends any[]> = any[] extends T1 ? T1 : any[] extends T2 ? T2 : Exclude<keyof T1, keyof T2> extends never ? T2 : T1;
+/**
+ * Returns the longest of up to 10 different tuples.
+ */
+export type Longest<T1 extends any[], T2 extends any[] = [], T3 extends any[] = [], T4 extends any[] = [], T5 extends any[] = [], T6 extends any[] = [], T7 extends any[] = [], T8 extends any[] = [], T9 extends any[] = [], T10 extends any[] = []> = _Longest<_Longest<_Longest<_Longest<T1, T2>, _Longest<T3, T4>>, _Longest<_Longest<T5, T6>, _Longest<T7, T8>>>, _Longest<T9, T10>>;
+/**
+ * A rigorous type alias for a class.
+ */
+export type Class<CtorArgs extends any[] = any[], InstanceType = {}, StaticType = {}, IsAbstract = false> = (abstract new (...args: any[]) => InstanceType) & StaticType;
+export {};
diff --git a/node_modules/ts-mixer/dist/types/util.d.ts b/node_modules/ts-mixer/dist/types/util.d.ts
new file mode 100644
index 0000000..4797ef4
--- /dev/null
+++ b/node_modules/ts-mixer/dist/types/util.d.ts
@@ -0,0 +1,27 @@
+/**
+ * Utility function that works like `Object.apply`, but copies getters and setters properly as well. Additionally gives
+ * the option to exclude properties by name.
+ */
+export declare const copyProps: (dest: object, src: object, exclude?: string[]) => void;
+/**
+ * Returns the full chain of prototypes up until Object.prototype given a starting object. The order of prototypes will
+ * be closest to farthest in the chain.
+ */
+export declare const protoChain: (obj: object, currentChain?: object[]) => object[];
+/**
+ * Identifies the nearest ancestor common to all the given objects in their prototype chains. For most unrelated
+ * objects, this function should return Object.prototype.
+ */
+export declare const nearestCommonProto: (...objs: object[]) => object | undefined;
+/**
+ * Creates a new prototype object that is a mixture of the given prototypes. The mixing is achieved by first
+ * identifying the nearest common ancestor and using it as the prototype for a new object. Then all properties/methods
+ * downstream of this prototype (ONLY downstream) are copied into the new object.
+ *
+ * The resulting prototype is more performant than softMixProtos(...), as well as ES5 compatible. However, it's not as
+ * flexible as updates to the source prototypes aren't captured by the mixed result. See softMixProtos for why you may
+ * want to use that instead.
+ */
+export declare const hardMixProtos: (ingredients: any[], constructor: Function | null, exclude?: string[]) => object;
+export declare const unique: <T>(arr: T[]) => T[];
+export declare const flatten: <T>(arr: T[][]) => T[];
diff --git a/node_modules/ts-mixer/package.json b/node_modules/ts-mixer/package.json
new file mode 100644
index 0000000..ddb92f2
--- /dev/null
+++ b/node_modules/ts-mixer/package.json
@@ -0,0 +1,63 @@
+{
+ "name": "ts-mixer",
+ "version": "6.0.3",
+ "description": "A very small TypeScript library that provides tolerable Mixin functionality.",
+ "main": "dist/cjs/index.js",
+ "module": "dist/esm/index.js",
+ "browser": "dist/esm/index.js",
+ "unpkg": "dist/esm/index.min.js",
+ "types": "dist/types/index.d.ts",
+ "files": [
+ "dist"
+ ],
+ "scripts": {
+ "prebuild": "yarn clean",
+ "build": "rollup -c && tsc",
+ "clean": "rimraf dist",
+ "lint": "eslint src/**/*.ts",
+ "test": "nyc mocha",
+ "codegen": "node ./codegen.js",
+ "release": "standard-version"
+ },
+ "devDependencies": {
+ "@commitlint/cli": "^12.1.4",
+ "@commitlint/config-conventional": "^12.1.4",
+ "@rollup/plugin-typescript": "^8.2.1",
+ "@types/chai": "^4.2.19",
+ "@types/mocha": "^8.2.2",
+ "@types/node": "^15.12.4",
+ "@types/sinon": "^10.0.2",
+ "@typescript-eslint/parser": "^4.27.0",
+ "chai": "^4.3.4",
+ "class-validator": "^0.13.1",
+ "coveralls": "^3.1.0",
+ "eslint": "^7.29.0",
+ "husky": "^4.2.5",
+ "js-yaml": "^4.1.0",
+ "mocha": "^9.0.1",
+ "nyc": "14.1.1",
+ "rimraf": "^3.0.2",
+ "rollup": "^2.52.1",
+ "rollup-plugin-terser": "^7.0.2",
+ "sinon": "^11.1.1",
+ "standard-version": "^9.3.0",
+ "ts-node": "^10.0.0",
+ "tslib": "^2.3.0",
+ "typescript": "^4.3.4",
+ "yarn-add-no-save": "^1.0.3"
+ },
+ "homepage": "https://github.com/tannerntannern/ts-mixer#readme",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/tannerntannern/ts-mixer.git"
+ },
+ "keywords": [
+ "typescript",
+ "mixin",
+ "mixins",
+ "multiple inheritance",
+ "mixin classes"
+ ],
+ "author": "Tanner Nielsen",
+ "license": "MIT"
+}
diff --git a/node_modules/tslib/CopyrightNotice.txt b/node_modules/tslib/CopyrightNotice.txt
new file mode 100644
index 0000000..0e42542
--- /dev/null
+++ b/node_modules/tslib/CopyrightNotice.txt
@@ -0,0 +1,15 @@
+/******************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+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/tslib/LICENSE.txt b/node_modules/tslib/LICENSE.txt
new file mode 100644
index 0000000..bfe6430
--- /dev/null
+++ b/node_modules/tslib/LICENSE.txt
@@ -0,0 +1,12 @@
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+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. \ No newline at end of file
diff --git a/node_modules/tslib/README.md b/node_modules/tslib/README.md
new file mode 100644
index 0000000..290cc61
--- /dev/null
+++ b/node_modules/tslib/README.md
@@ -0,0 +1,164 @@
+# tslib
+
+This is a runtime library for [TypeScript](https://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
+
+This library is primarily used by the `--importHelpers` flag in TypeScript.
+When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:
+
+```ts
+var __assign = (this && this.__assign) || Object.assign || function(t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
+ t[p] = s[p];
+ }
+ return t;
+};
+exports.x = {};
+exports.y = __assign({}, exports.x);
+
+```
+
+will instead be emitted as something like the following:
+
+```ts
+var tslib_1 = require("tslib");
+exports.x = {};
+exports.y = tslib_1.__assign({}, exports.x);
+```
+
+Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.
+For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.
+
+# Installing
+
+For the latest stable version, run:
+
+## npm
+
+```sh
+# TypeScript 3.9.2 or later
+npm install tslib
+
+# TypeScript 3.8.4 or earlier
+npm install tslib@^1
+
+# TypeScript 2.3.2 or earlier
+npm install tslib@1.6.1
+```
+
+## yarn
+
+```sh
+# TypeScript 3.9.2 or later
+yarn add tslib
+
+# TypeScript 3.8.4 or earlier
+yarn add tslib@^1
+
+# TypeScript 2.3.2 or earlier
+yarn add tslib@1.6.1
+```
+
+## bower
+
+```sh
+# TypeScript 3.9.2 or later
+bower install tslib
+
+# TypeScript 3.8.4 or earlier
+bower install tslib@^1
+
+# TypeScript 2.3.2 or earlier
+bower install tslib@1.6.1
+```
+
+## JSPM
+
+```sh
+# TypeScript 3.9.2 or later
+jspm install tslib
+
+# TypeScript 3.8.4 or earlier
+jspm install tslib@^1
+
+# TypeScript 2.3.2 or earlier
+jspm install tslib@1.6.1
+```
+
+# Usage
+
+Set the `importHelpers` compiler option on the command line:
+
+```
+tsc --importHelpers file.ts
+```
+
+or in your tsconfig.json:
+
+```json
+{
+ "compilerOptions": {
+ "importHelpers": true
+ }
+}
+```
+
+#### For bower and JSPM users
+
+You will need to add a `paths` mapping for `tslib`, e.g. For Bower users:
+
+```json
+{
+ "compilerOptions": {
+ "module": "amd",
+ "importHelpers": true,
+ "baseUrl": "./",
+ "paths": {
+ "tslib" : ["bower_components/tslib/tslib.d.ts"]
+ }
+ }
+}
+```
+
+For JSPM users:
+
+```json
+{
+ "compilerOptions": {
+ "module": "system",
+ "importHelpers": true,
+ "baseUrl": "./",
+ "paths": {
+ "tslib" : ["jspm_packages/npm/tslib@2.x.y/tslib.d.ts"]
+ }
+ }
+}
+```
+
+## Deployment
+
+- Choose your new version number
+- Set it in `package.json` and `bower.json`
+- Create a tag: `git tag [version]`
+- Push the tag: `git push --tags`
+- Create a [release in GitHub](https://github.com/microsoft/tslib/releases)
+- Run the [publish to npm](https://github.com/microsoft/tslib/actions?query=workflow%3A%22Publish+to+NPM%22) workflow
+
+Done.
+
+# Contribute
+
+There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
+
+* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
+* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
+* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
+* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
+* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
+
+# Documentation
+
+* [Quick tutorial](http://www.typescriptlang.org/Tutorial)
+* [Programming handbook](http://www.typescriptlang.org/Handbook)
+* [Homepage](http://www.typescriptlang.org/)
diff --git a/node_modules/tslib/SECURITY.md b/node_modules/tslib/SECURITY.md
new file mode 100644
index 0000000..869fdfe
--- /dev/null
+++ b/node_modules/tslib/SECURITY.md
@@ -0,0 +1,41 @@
+<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->
+
+## Security
+
+Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
+
+If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
+
+## Reporting Security Issues
+
+**Please do not report security vulnerabilities through public GitHub issues.**
+
+Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
+
+If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
+
+You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
+
+Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
+
+ * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
+ * Full paths of source file(s) related to the manifestation of the issue
+ * The location of the affected source code (tag/branch/commit or direct URL)
+ * Any special configuration required to reproduce the issue
+ * Step-by-step instructions to reproduce the issue
+ * Proof-of-concept or exploit code (if possible)
+ * Impact of the issue, including how an attacker might exploit the issue
+
+This information will help us triage your report more quickly.
+
+If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
+
+## Preferred Languages
+
+We prefer all communications to be in English.
+
+## Policy
+
+Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
+
+<!-- END MICROSOFT SECURITY.MD BLOCK -->
diff --git a/node_modules/tslib/modules/index.d.ts b/node_modules/tslib/modules/index.d.ts
new file mode 100644
index 0000000..0fedae8
--- /dev/null
+++ b/node_modules/tslib/modules/index.d.ts
@@ -0,0 +1,37 @@
+// Note: named reexports are used instead of `export *` because
+// TypeScript itself doesn't resolve the `export *` when checking
+// if a particular helper exists.
+export {
+ __extends,
+ __assign,
+ __rest,
+ __decorate,
+ __param,
+ __esDecorate,
+ __runInitializers,
+ __propKey,
+ __setFunctionName,
+ __metadata,
+ __awaiter,
+ __generator,
+ __exportStar,
+ __values,
+ __read,
+ __spread,
+ __spreadArrays,
+ __spreadArray,
+ __await,
+ __asyncGenerator,
+ __asyncDelegator,
+ __asyncValues,
+ __makeTemplateObject,
+ __importStar,
+ __importDefault,
+ __classPrivateFieldGet,
+ __classPrivateFieldSet,
+ __classPrivateFieldIn,
+ __createBinding,
+ __addDisposableResource,
+ __disposeResources,
+} from '../tslib.js';
+export * as default from '../tslib.js';
diff --git a/node_modules/tslib/modules/index.js b/node_modules/tslib/modules/index.js
new file mode 100644
index 0000000..af9f5ac
--- /dev/null
+++ b/node_modules/tslib/modules/index.js
@@ -0,0 +1,68 @@
+import tslib from '../tslib.js';
+const {
+ __extends,
+ __assign,
+ __rest,
+ __decorate,
+ __param,
+ __esDecorate,
+ __runInitializers,
+ __propKey,
+ __setFunctionName,
+ __metadata,
+ __awaiter,
+ __generator,
+ __exportStar,
+ __createBinding,
+ __values,
+ __read,
+ __spread,
+ __spreadArrays,
+ __spreadArray,
+ __await,
+ __asyncGenerator,
+ __asyncDelegator,
+ __asyncValues,
+ __makeTemplateObject,
+ __importStar,
+ __importDefault,
+ __classPrivateFieldGet,
+ __classPrivateFieldSet,
+ __classPrivateFieldIn,
+ __addDisposableResource,
+ __disposeResources,
+} = tslib;
+export {
+ __extends,
+ __assign,
+ __rest,
+ __decorate,
+ __param,
+ __esDecorate,
+ __runInitializers,
+ __propKey,
+ __setFunctionName,
+ __metadata,
+ __awaiter,
+ __generator,
+ __exportStar,
+ __createBinding,
+ __values,
+ __read,
+ __spread,
+ __spreadArrays,
+ __spreadArray,
+ __await,
+ __asyncGenerator,
+ __asyncDelegator,
+ __asyncValues,
+ __makeTemplateObject,
+ __importStar,
+ __importDefault,
+ __classPrivateFieldGet,
+ __classPrivateFieldSet,
+ __classPrivateFieldIn,
+ __addDisposableResource,
+ __disposeResources,
+};
+export default tslib;
diff --git a/node_modules/tslib/modules/package.json b/node_modules/tslib/modules/package.json
new file mode 100644
index 0000000..aafa0e4
--- /dev/null
+++ b/node_modules/tslib/modules/package.json
@@ -0,0 +1,3 @@
+{
+ "type": "module"
+} \ No newline at end of file
diff --git a/node_modules/tslib/package.json b/node_modules/tslib/package.json
new file mode 100644
index 0000000..0a1fdec
--- /dev/null
+++ b/node_modules/tslib/package.json
@@ -0,0 +1,47 @@
+{
+ "name": "tslib",
+ "author": "Microsoft Corp.",
+ "homepage": "https://www.typescriptlang.org/",
+ "version": "2.6.2",
+ "license": "0BSD",
+ "description": "Runtime library for TypeScript helper functions",
+ "keywords": [
+ "TypeScript",
+ "Microsoft",
+ "compiler",
+ "language",
+ "javascript",
+ "tslib",
+ "runtime"
+ ],
+ "bugs": {
+ "url": "https://github.com/Microsoft/TypeScript/issues"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Microsoft/tslib.git"
+ },
+ "main": "tslib.js",
+ "module": "tslib.es6.js",
+ "jsnext:main": "tslib.es6.js",
+ "typings": "tslib.d.ts",
+ "sideEffects": false,
+ "exports": {
+ ".": {
+ "module": {
+ "types": "./modules/index.d.ts",
+ "default": "./tslib.es6.mjs"
+ },
+ "import": {
+ "node": "./modules/index.js",
+ "default": {
+ "types": "./modules/index.d.ts",
+ "default": "./tslib.es6.mjs"
+ }
+ },
+ "default": "./tslib.js"
+ },
+ "./*": "./*",
+ "./": "./"
+ }
+}
diff --git a/node_modules/tslib/tslib.d.ts b/node_modules/tslib/tslib.d.ts
new file mode 100644
index 0000000..104369b
--- /dev/null
+++ b/node_modules/tslib/tslib.d.ts
@@ -0,0 +1,453 @@
+/******************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+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.
+***************************************************************************** */
+
+/**
+ * Used to shim class extends.
+ *
+ * @param d The derived class.
+ * @param b The base class.
+ */
+export declare function __extends(d: Function, b: Function): void;
+
+/**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ *
+ * @param t The target object to copy to.
+ * @param sources One or more source objects from which to copy properties
+ */
+export declare function __assign(t: any, ...sources: any[]): any;
+
+/**
+ * Performs a rest spread on an object.
+ *
+ * @param t The source value.
+ * @param propertyNames The property names excluded from the rest spread.
+ */
+export declare function __rest(t: any, propertyNames: (string | symbol)[]): any;
+
+/**
+ * Applies decorators to a target object
+ *
+ * @param decorators The set of decorators to apply.
+ * @param target The target object.
+ * @param key If specified, the own property to apply the decorators to.
+ * @param desc The property descriptor, defaults to fetching the descriptor from the target object.
+ * @experimental
+ */
+export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
+
+/**
+ * Creates an observing function decorator from a parameter decorator.
+ *
+ * @param paramIndex The parameter index to apply the decorator to.
+ * @param decorator The parameter decorator to apply. Note that the return value is ignored.
+ * @experimental
+ */
+export declare function __param(paramIndex: number, decorator: Function): Function;
+
+/**
+ * Applies decorators to a class or class member, following the native ECMAScript decorator specification.
+ * @param ctor For non-field class members, the class constructor. Otherwise, `null`.
+ * @param descriptorIn The `PropertyDescriptor` to use when unable to look up the property from `ctor`.
+ * @param decorators The decorators to apply
+ * @param contextIn The `DecoratorContext` to clone for each decorator application.
+ * @param initializers An array of field initializer mutation functions into which new initializers are written.
+ * @param extraInitializers An array of extra initializer functions into which new initializers are written.
+ */
+export declare function __esDecorate(ctor: Function | null, descriptorIn: object | null, decorators: Function[], contextIn: object, initializers: Function[] | null, extraInitializers: Function[]): void;
+
+/**
+ * Runs field initializers or extra initializers generated by `__esDecorate`.
+ * @param thisArg The `this` argument to use.
+ * @param initializers The array of initializers to evaluate.
+ * @param value The initial value to pass to the initializers.
+ */
+export declare function __runInitializers(thisArg: unknown, initializers: Function[], value?: any): any;
+
+/**
+ * Converts a computed property name into a `string` or `symbol` value.
+ */
+export declare function __propKey(x: any): string | symbol;
+
+/**
+ * Assigns the name of a function derived from the left-hand side of an assignment.
+ * @param f The function to rename.
+ * @param name The new name for the function.
+ * @param prefix A prefix (such as `"get"` or `"set"`) to insert before the name.
+ */
+export declare function __setFunctionName(f: Function, name: string | symbol, prefix?: string): Function;
+
+/**
+ * Creates a decorator that sets metadata.
+ *
+ * @param metadataKey The metadata key
+ * @param metadataValue The metadata value
+ * @experimental
+ */
+export declare function __metadata(metadataKey: any, metadataValue: any): Function;
+
+/**
+ * Converts a generator function into a pseudo-async function, by treating each `yield` as an `await`.
+ *
+ * @param thisArg The reference to use as the `this` value in the generator function
+ * @param _arguments The optional arguments array
+ * @param P The optional promise constructor argument, defaults to the `Promise` property of the global object.
+ * @param generator The generator function
+ */
+export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
+
+/**
+ * Creates an Iterator object using the body as the implementation.
+ *
+ * @param thisArg The reference to use as the `this` value in the function
+ * @param body The generator state-machine based implementation.
+ *
+ * @see [./docs/generator.md]
+ */
+export declare function __generator(thisArg: any, body: Function): any;
+
+/**
+ * Creates bindings for all enumerable properties of `m` on `exports`
+ *
+ * @param m The source object
+ * @param exports The `exports` object.
+ */
+export declare function __exportStar(m: any, o: any): void;
+
+/**
+ * Creates a value iterator from an `Iterable` or `ArrayLike` object.
+ *
+ * @param o The object.
+ * @throws {TypeError} If `o` is neither `Iterable`, nor an `ArrayLike`.
+ */
+export declare function __values(o: any): any;
+
+/**
+ * Reads values from an `Iterable` or `ArrayLike` object and returns the resulting array.
+ *
+ * @param o The object to read from.
+ * @param n The maximum number of arguments to read, defaults to `Infinity`.
+ */
+export declare function __read(o: any, n?: number): any[];
+
+/**
+ * Creates an array from iterable spread.
+ *
+ * @param args The Iterable objects to spread.
+ * @deprecated since TypeScript 4.2 - Use `__spreadArray`
+ */
+export declare function __spread(...args: any[][]): any[];
+
+/**
+ * Creates an array from array spread.
+ *
+ * @param args The ArrayLikes to spread into the resulting array.
+ * @deprecated since TypeScript 4.2 - Use `__spreadArray`
+ */
+export declare function __spreadArrays(...args: any[][]): any[];
+
+/**
+ * Spreads the `from` array into the `to` array.
+ *
+ * @param pack Replace empty elements with `undefined`.
+ */
+export declare function __spreadArray(to: any[], from: any[], pack?: boolean): any[];
+
+/**
+ * Creates an object that signals to `__asyncGenerator` that it shouldn't be yielded,
+ * and instead should be awaited and the resulting value passed back to the generator.
+ *
+ * @param v The value to await.
+ */
+export declare function __await(v: any): any;
+
+/**
+ * Converts a generator function into an async generator function, by using `yield __await`
+ * in place of normal `await`.
+ *
+ * @param thisArg The reference to use as the `this` value in the generator function
+ * @param _arguments The optional arguments array
+ * @param generator The generator function
+ */
+export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any;
+
+/**
+ * Used to wrap a potentially async iterator in such a way so that it wraps the result
+ * of calling iterator methods of `o` in `__await` instances, and then yields the awaited values.
+ *
+ * @param o The potentially async iterator.
+ * @returns A synchronous iterator yielding `__await` instances on every odd invocation
+ * and returning the awaited `IteratorResult` passed to `next` every even invocation.
+ */
+export declare function __asyncDelegator(o: any): any;
+
+/**
+ * Creates a value async iterator from an `AsyncIterable`, `Iterable` or `ArrayLike` object.
+ *
+ * @param o The object.
+ * @throws {TypeError} If `o` is neither `AsyncIterable`, `Iterable`, nor an `ArrayLike`.
+ */
+export declare function __asyncValues(o: any): any;
+
+/**
+ * Creates a `TemplateStringsArray` frozen object from the `cooked` and `raw` arrays.
+ *
+ * @param cooked The cooked possibly-sparse array.
+ * @param raw The raw string content.
+ */
+export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray;
+
+/**
+ * Used to shim default and named imports in ECMAScript Modules transpiled to CommonJS.
+ *
+ * ```js
+ * import Default, { Named, Other } from "mod";
+ * // or
+ * import { default as Default, Named, Other } from "mod";
+ * ```
+ *
+ * @param mod The CommonJS module exports object.
+ */
+export declare function __importStar<T>(mod: T): T;
+
+/**
+ * Used to shim default imports in ECMAScript Modules transpiled to CommonJS.
+ *
+ * ```js
+ * import Default from "mod";
+ * ```
+ *
+ * @param mod The CommonJS module exports object.
+ */
+export declare function __importDefault<T>(mod: T): T | { default: T };
+
+/**
+ * Emulates reading a private instance field.
+ *
+ * @param receiver The instance from which to read the private field.
+ * @param state A WeakMap containing the private field value for an instance.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ *
+ * @throws {TypeError} If `state` doesn't have an entry for `receiver`.
+ */
+export declare function __classPrivateFieldGet<T extends object, V>(
+ receiver: T,
+ state: { has(o: T): boolean, get(o: T): V | undefined },
+ kind?: "f"
+): V;
+
+/**
+ * Emulates reading a private static field.
+ *
+ * @param receiver The object from which to read the private static field.
+ * @param state The class constructor containing the definition of the static field.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ * @param f The descriptor that holds the static field value.
+ *
+ * @throws {TypeError} If `receiver` is not `state`.
+ */
+export declare function __classPrivateFieldGet<T extends new (...args: any[]) => unknown, V>(
+ receiver: T,
+ state: T,
+ kind: "f",
+ f: { value: V }
+): V;
+
+/**
+ * Emulates evaluating a private instance "get" accessor.
+ *
+ * @param receiver The instance on which to evaluate the private "get" accessor.
+ * @param state A WeakSet used to verify an instance supports the private "get" accessor.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ * @param f The "get" accessor function to evaluate.
+ *
+ * @throws {TypeError} If `state` doesn't have an entry for `receiver`.
+ */
+export declare function __classPrivateFieldGet<T extends object, V>(
+ receiver: T,
+ state: { has(o: T): boolean },
+ kind: "a",
+ f: () => V
+): V;
+
+/**
+ * Emulates evaluating a private static "get" accessor.
+ *
+ * @param receiver The object on which to evaluate the private static "get" accessor.
+ * @param state The class constructor containing the definition of the static "get" accessor.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ * @param f The "get" accessor function to evaluate.
+ *
+ * @throws {TypeError} If `receiver` is not `state`.
+ */
+export declare function __classPrivateFieldGet<T extends new (...args: any[]) => unknown, V>(
+ receiver: T,
+ state: T,
+ kind: "a",
+ f: () => V
+): V;
+
+/**
+ * Emulates reading a private instance method.
+ *
+ * @param receiver The instance from which to read a private method.
+ * @param state A WeakSet used to verify an instance supports the private method.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ * @param f The function to return as the private instance method.
+ *
+ * @throws {TypeError} If `state` doesn't have an entry for `receiver`.
+ */
+export declare function __classPrivateFieldGet<T extends object, V extends (...args: any[]) => unknown>(
+ receiver: T,
+ state: { has(o: T): boolean },
+ kind: "m",
+ f: V
+): V;
+
+/**
+ * Emulates reading a private static method.
+ *
+ * @param receiver The object from which to read the private static method.
+ * @param state The class constructor containing the definition of the static method.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ * @param f The function to return as the private static method.
+ *
+ * @throws {TypeError} If `receiver` is not `state`.
+ */
+export declare function __classPrivateFieldGet<T extends new (...args: any[]) => unknown, V extends (...args: any[]) => unknown>(
+ receiver: T,
+ state: T,
+ kind: "m",
+ f: V
+): V;
+
+/**
+ * Emulates writing to a private instance field.
+ *
+ * @param receiver The instance on which to set a private field value.
+ * @param state A WeakMap used to store the private field value for an instance.
+ * @param value The value to store in the private field.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ *
+ * @throws {TypeError} If `state` doesn't have an entry for `receiver`.
+ */
+export declare function __classPrivateFieldSet<T extends object, V>(
+ receiver: T,
+ state: { has(o: T): boolean, set(o: T, value: V): unknown },
+ value: V,
+ kind?: "f"
+): V;
+
+/**
+ * Emulates writing to a private static field.
+ *
+ * @param receiver The object on which to set the private static field.
+ * @param state The class constructor containing the definition of the private static field.
+ * @param value The value to store in the private field.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ * @param f The descriptor that holds the static field value.
+ *
+ * @throws {TypeError} If `receiver` is not `state`.
+ */
+export declare function __classPrivateFieldSet<T extends new (...args: any[]) => unknown, V>(
+ receiver: T,
+ state: T,
+ value: V,
+ kind: "f",
+ f: { value: V }
+): V;
+
+/**
+ * Emulates writing to a private instance "set" accessor.
+ *
+ * @param receiver The instance on which to evaluate the private instance "set" accessor.
+ * @param state A WeakSet used to verify an instance supports the private "set" accessor.
+ * @param value The value to store in the private accessor.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ * @param f The "set" accessor function to evaluate.
+ *
+ * @throws {TypeError} If `state` doesn't have an entry for `receiver`.
+ */
+export declare function __classPrivateFieldSet<T extends object, V>(
+ receiver: T,
+ state: { has(o: T): boolean },
+ value: V,
+ kind: "a",
+ f: (v: V) => void
+): V;
+
+/**
+ * Emulates writing to a private static "set" accessor.
+ *
+ * @param receiver The object on which to evaluate the private static "set" accessor.
+ * @param state The class constructor containing the definition of the static "set" accessor.
+ * @param value The value to store in the private field.
+ * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
+ * @param f The "set" accessor function to evaluate.
+ *
+ * @throws {TypeError} If `receiver` is not `state`.
+ */
+export declare function __classPrivateFieldSet<T extends new (...args: any[]) => unknown, V>(
+ receiver: T,
+ state: T,
+ value: V,
+ kind: "a",
+ f: (v: V) => void
+): V;
+
+/**
+ * Checks for the existence of a private field/method/accessor.
+ *
+ * @param state The class constructor containing the static member, or the WeakMap or WeakSet associated with a private instance member.
+ * @param receiver The object for which to test the presence of the private member.
+ */
+export declare function __classPrivateFieldIn(
+ state: (new (...args: any[]) => unknown) | { has(o: any): boolean },
+ receiver: unknown,
+): boolean;
+
+/**
+ * Creates a re-export binding on `object` with key `objectKey` that references `target[key]`.
+ *
+ * @param object The local `exports` object.
+ * @param target The object to re-export from.
+ * @param key The property key of `target` to re-export.
+ * @param objectKey The property key to re-export as. Defaults to `key`.
+ */
+export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void;
+
+/**
+ * Adds a disposable resource to a resource-tracking environment object.
+ * @param env A resource-tracking environment object.
+ * @param value Either a Disposable or AsyncDisposable object, `null`, or `undefined`.
+ * @param async When `true`, `AsyncDisposable` resources can be added. When `false`, `AsyncDisposable` resources cannot be added.
+ * @returns The {@link value} argument.
+ *
+ * @throws {TypeError} If {@link value} is not an object, or if either `Symbol.dispose` or `Symbol.asyncDispose` are not
+ * defined, or if {@link value} does not have an appropriate `Symbol.dispose` or `Symbol.asyncDispose` method.
+ */
+export declare function __addDisposableResource<T>(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }, value: T, async: boolean): T;
+
+/**
+ * Disposes all resources in a resource-tracking environment object.
+ * @param env A resource-tracking environment object.
+ * @returns A {@link Promise} if any resources in the environment were marked as `async` when added; otherwise, `void`.
+ *
+ * @throws {SuppressedError} if an error thrown during disposal would have suppressed a prior error from disposal or the
+ * error recorded in the resource-tracking environment object.
+ * @seealso {@link __addDisposableResource}
+ */
+export declare function __disposeResources(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }): any;
diff --git a/node_modules/tslib/tslib.es6.html b/node_modules/tslib/tslib.es6.html
new file mode 100644
index 0000000..b122e41
--- /dev/null
+++ b/node_modules/tslib/tslib.es6.html
@@ -0,0 +1 @@
+<script src="tslib.es6.js"></script> \ No newline at end of file
diff --git a/node_modules/tslib/tslib.es6.js b/node_modules/tslib/tslib.es6.js
new file mode 100644
index 0000000..7be1c94
--- /dev/null
+++ b/node_modules/tslib/tslib.es6.js
@@ -0,0 +1,370 @@
+/******************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+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.
+***************************************************************************** */
+/* global Reflect, Promise, SuppressedError, Symbol */
+
+var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+};
+
+export function __extends(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+}
+
+export var __assign = function() {
+ __assign = Object.assign || function __assign(t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ }
+ return __assign.apply(this, arguments);
+}
+
+export function __rest(s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+}
+
+export function __decorate(decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+}
+
+export function __param(paramIndex, decorator) {
+ return function (target, key) { decorator(target, key, paramIndex); }
+}
+
+export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
+ var _, done = false;
+ for (var i = decorators.length - 1; i >= 0; i--) {
+ var context = {};
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
+ if (kind === "accessor") {
+ if (result === void 0) continue;
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
+ if (_ = accept(result.get)) descriptor.get = _;
+ if (_ = accept(result.set)) descriptor.set = _;
+ if (_ = accept(result.init)) initializers.unshift(_);
+ }
+ else if (_ = accept(result)) {
+ if (kind === "field") initializers.unshift(_);
+ else descriptor[key] = _;
+ }
+ }
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
+ done = true;
+};
+
+export function __runInitializers(thisArg, initializers, value) {
+ var useValue = arguments.length > 2;
+ for (var i = 0; i < initializers.length; i++) {
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
+ }
+ return useValue ? value : void 0;
+};
+
+export function __propKey(x) {
+ return typeof x === "symbol" ? x : "".concat(x);
+};
+
+export function __setFunctionName(f, name, prefix) {
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
+};
+
+export function __metadata(metadataKey, metadataValue) {
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
+}
+
+export function __awaiter(thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+}
+
+export function __generator(thisArg, body) {
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+ function verb(n) { return function (v) { return step([n, v]); }; }
+ function step(op) {
+ if (f) throw new TypeError("Generator is already executing.");
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+ if (y = 0, t) op = [op[0] & 2, t.value];
+ switch (op[0]) {
+ case 0: case 1: t = op; break;
+ case 4: _.label++; return { value: op[1], done: false };
+ case 5: _.label++; y = op[1]; op = [0]; continue;
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+ if (t[2]) _.ops.pop();
+ _.trys.pop(); continue;
+ }
+ op = body.call(thisArg, _);
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+ }
+}
+
+export var __createBinding = Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+});
+
+export function __exportStar(m, o) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
+}
+
+export function __values(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+}
+
+export function __read(o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+}
+
+/** @deprecated */
+export function __spread() {
+ for (var ar = [], i = 0; i < arguments.length; i++)
+ ar = ar.concat(__read(arguments[i]));
+ return ar;
+}
+
+/** @deprecated */
+export function __spreadArrays() {
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
+ r[k] = a[j];
+ return r;
+}
+
+export function __spreadArray(to, from, pack) {
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
+ if (ar || !(i in from)) {
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
+ ar[i] = from[i];
+ }
+ }
+ return to.concat(ar || Array.prototype.slice.call(from));
+}
+
+export function __await(v) {
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
+}
+
+export function __asyncGenerator(thisArg, _arguments, generator) {
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
+ function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
+ function fulfill(value) { resume("next", value); }
+ function reject(value) { resume("throw", value); }
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
+}
+
+export function __asyncDelegator(o) {
+ var i, p;
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
+}
+
+export function __asyncValues(o) {
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+ var m = o[Symbol.asyncIterator], i;
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
+}
+
+export function __makeTemplateObject(cooked, raw) {
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
+ return cooked;
+};
+
+var __setModuleDefault = Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+};
+
+export function __importStar(mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+}
+
+export function __importDefault(mod) {
+ return (mod && mod.__esModule) ? mod : { default: mod };
+}
+
+export function __classPrivateFieldGet(receiver, state, kind, f) {
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
+}
+
+export function __classPrivateFieldSet(receiver, state, value, kind, f) {
+ if (kind === "m") throw new TypeError("Private method is not writable");
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
+}
+
+export function __classPrivateFieldIn(state, receiver) {
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
+ return typeof state === "function" ? receiver === state : state.has(receiver);
+}
+
+export function __addDisposableResource(env, value, async) {
+ if (value !== null && value !== void 0) {
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
+ var dispose;
+ if (async) {
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
+ dispose = value[Symbol.asyncDispose];
+ }
+ if (dispose === void 0) {
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
+ dispose = value[Symbol.dispose];
+ }
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
+ env.stack.push({ value: value, dispose: dispose, async: async });
+ }
+ else if (async) {
+ env.stack.push({ async: true });
+ }
+ return value;
+}
+
+var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
+ var e = new Error(message);
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
+};
+
+export function __disposeResources(env) {
+ function fail(e) {
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
+ env.hasError = true;
+ }
+ function next() {
+ while (env.stack.length) {
+ var rec = env.stack.pop();
+ try {
+ var result = rec.dispose && rec.dispose.call(rec.value);
+ if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
+ }
+ catch (e) {
+ fail(e);
+ }
+ }
+ if (env.hasError) throw env.error;
+ }
+ return next();
+}
+
+export default {
+ __extends: __extends,
+ __assign: __assign,
+ __rest: __rest,
+ __decorate: __decorate,
+ __param: __param,
+ __metadata: __metadata,
+ __awaiter: __awaiter,
+ __generator: __generator,
+ __createBinding: __createBinding,
+ __exportStar: __exportStar,
+ __values: __values,
+ __read: __read,
+ __spread: __spread,
+ __spreadArrays: __spreadArrays,
+ __spreadArray: __spreadArray,
+ __await: __await,
+ __asyncGenerator: __asyncGenerator,
+ __asyncDelegator: __asyncDelegator,
+ __asyncValues: __asyncValues,
+ __makeTemplateObject: __makeTemplateObject,
+ __importStar: __importStar,
+ __importDefault: __importDefault,
+ __classPrivateFieldGet: __classPrivateFieldGet,
+ __classPrivateFieldSet: __classPrivateFieldSet,
+ __classPrivateFieldIn: __classPrivateFieldIn,
+ __addDisposableResource: __addDisposableResource,
+ __disposeResources: __disposeResources,
+};
diff --git a/node_modules/tslib/tslib.es6.mjs b/node_modules/tslib/tslib.es6.mjs
new file mode 100644
index 0000000..c8e2999
--- /dev/null
+++ b/node_modules/tslib/tslib.es6.mjs
@@ -0,0 +1,370 @@
+/******************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+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.
+***************************************************************************** */
+/* global Reflect, Promise, SuppressedError, Symbol */
+
+var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+};
+
+export function __extends(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+}
+
+export var __assign = function() {
+ __assign = Object.assign || function __assign(t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ }
+ return __assign.apply(this, arguments);
+}
+
+export function __rest(s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+}
+
+export function __decorate(decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+}
+
+export function __param(paramIndex, decorator) {
+ return function (target, key) { decorator(target, key, paramIndex); }
+}
+
+export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
+ var _, done = false;
+ for (var i = decorators.length - 1; i >= 0; i--) {
+ var context = {};
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
+ if (kind === "accessor") {
+ if (result === void 0) continue;
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
+ if (_ = accept(result.get)) descriptor.get = _;
+ if (_ = accept(result.set)) descriptor.set = _;
+ if (_ = accept(result.init)) initializers.unshift(_);
+ }
+ else if (_ = accept(result)) {
+ if (kind === "field") initializers.unshift(_);
+ else descriptor[key] = _;
+ }
+ }
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
+ done = true;
+};
+
+export function __runInitializers(thisArg, initializers, value) {
+ var useValue = arguments.length > 2;
+ for (var i = 0; i < initializers.length; i++) {
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
+ }
+ return useValue ? value : void 0;
+};
+
+export function __propKey(x) {
+ return typeof x === "symbol" ? x : "".concat(x);
+};
+
+export function __setFunctionName(f, name, prefix) {
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
+};
+
+export function __metadata(metadataKey, metadataValue) {
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
+}
+
+export function __awaiter(thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+}
+
+export function __generator(thisArg, body) {
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+ function verb(n) { return function (v) { return step([n, v]); }; }
+ function step(op) {
+ if (f) throw new TypeError("Generator is already executing.");
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+ if (y = 0, t) op = [op[0] & 2, t.value];
+ switch (op[0]) {
+ case 0: case 1: t = op; break;
+ case 4: _.label++; return { value: op[1], done: false };
+ case 5: _.label++; y = op[1]; op = [0]; continue;
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+ if (t[2]) _.ops.pop();
+ _.trys.pop(); continue;
+ }
+ op = body.call(thisArg, _);
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+ }
+}
+
+export var __createBinding = Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+});
+
+export function __exportStar(m, o) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
+}
+
+export function __values(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+}
+
+export function __read(o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+}
+
+/** @deprecated */
+export function __spread() {
+ for (var ar = [], i = 0; i < arguments.length; i++)
+ ar = ar.concat(__read(arguments[i]));
+ return ar;
+}
+
+/** @deprecated */
+export function __spreadArrays() {
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
+ r[k] = a[j];
+ return r;
+}
+
+export function __spreadArray(to, from, pack) {
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
+ if (ar || !(i in from)) {
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
+ ar[i] = from[i];
+ }
+ }
+ return to.concat(ar || Array.prototype.slice.call(from));
+}
+
+export function __await(v) {
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
+}
+
+export function __asyncGenerator(thisArg, _arguments, generator) {
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
+ function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
+ function fulfill(value) { resume("next", value); }
+ function reject(value) { resume("throw", value); }
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
+}
+
+export function __asyncDelegator(o) {
+ var i, p;
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
+}
+
+export function __asyncValues(o) {
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+ var m = o[Symbol.asyncIterator], i;
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
+}
+
+export function __makeTemplateObject(cooked, raw) {
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
+ return cooked;
+};
+
+var __setModuleDefault = Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+};
+
+export function __importStar(mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+}
+
+export function __importDefault(mod) {
+ return (mod && mod.__esModule) ? mod : { default: mod };
+}
+
+export function __classPrivateFieldGet(receiver, state, kind, f) {
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
+}
+
+export function __classPrivateFieldSet(receiver, state, value, kind, f) {
+ if (kind === "m") throw new TypeError("Private method is not writable");
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
+}
+
+export function __classPrivateFieldIn(state, receiver) {
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
+ return typeof state === "function" ? receiver === state : state.has(receiver);
+}
+
+export function __addDisposableResource(env, value, async) {
+ if (value !== null && value !== void 0) {
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
+ var dispose;
+ if (async) {
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
+ dispose = value[Symbol.asyncDispose];
+ }
+ if (dispose === void 0) {
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
+ dispose = value[Symbol.dispose];
+ }
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
+ env.stack.push({ value: value, dispose: dispose, async: async });
+ }
+ else if (async) {
+ env.stack.push({ async: true });
+ }
+ return value;
+}
+
+var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
+ var e = new Error(message);
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
+};
+
+export function __disposeResources(env) {
+ function fail(e) {
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
+ env.hasError = true;
+ }
+ function next() {
+ while (env.stack.length) {
+ var rec = env.stack.pop();
+ try {
+ var result = rec.dispose && rec.dispose.call(rec.value);
+ if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
+ }
+ catch (e) {
+ fail(e);
+ }
+ }
+ if (env.hasError) throw env.error;
+ }
+ return next();
+}
+
+export default {
+ __extends,
+ __assign,
+ __rest,
+ __decorate,
+ __param,
+ __metadata,
+ __awaiter,
+ __generator,
+ __createBinding,
+ __exportStar,
+ __values,
+ __read,
+ __spread,
+ __spreadArrays,
+ __spreadArray,
+ __await,
+ __asyncGenerator,
+ __asyncDelegator,
+ __asyncValues,
+ __makeTemplateObject,
+ __importStar,
+ __importDefault,
+ __classPrivateFieldGet,
+ __classPrivateFieldSet,
+ __classPrivateFieldIn,
+ __addDisposableResource,
+ __disposeResources,
+};
diff --git a/node_modules/tslib/tslib.html b/node_modules/tslib/tslib.html
new file mode 100644
index 0000000..44c9ba5
--- /dev/null
+++ b/node_modules/tslib/tslib.html
@@ -0,0 +1 @@
+<script src="tslib.js"></script> \ No newline at end of file
diff --git a/node_modules/tslib/tslib.js b/node_modules/tslib/tslib.js
new file mode 100644
index 0000000..343ecde
--- /dev/null
+++ b/node_modules/tslib/tslib.js
@@ -0,0 +1,421 @@
+/******************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+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.
+***************************************************************************** */
+/* global global, define, Symbol, Reflect, Promise, SuppressedError */
+var __extends;
+var __assign;
+var __rest;
+var __decorate;
+var __param;
+var __esDecorate;
+var __runInitializers;
+var __propKey;
+var __setFunctionName;
+var __metadata;
+var __awaiter;
+var __generator;
+var __exportStar;
+var __values;
+var __read;
+var __spread;
+var __spreadArrays;
+var __spreadArray;
+var __await;
+var __asyncGenerator;
+var __asyncDelegator;
+var __asyncValues;
+var __makeTemplateObject;
+var __importStar;
+var __importDefault;
+var __classPrivateFieldGet;
+var __classPrivateFieldSet;
+var __classPrivateFieldIn;
+var __createBinding;
+var __addDisposableResource;
+var __disposeResources;
+(function (factory) {
+ var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
+ if (typeof define === "function" && define.amd) {
+ define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); });
+ }
+ else if (typeof module === "object" && typeof module.exports === "object") {
+ factory(createExporter(root, createExporter(module.exports)));
+ }
+ else {
+ factory(createExporter(root));
+ }
+ function createExporter(exports, previous) {
+ if (exports !== root) {
+ if (typeof Object.create === "function") {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ }
+ else {
+ exports.__esModule = true;
+ }
+ }
+ return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
+ }
+})
+(function (exporter) {
+ var extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+
+ __extends = function (d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+
+ __assign = Object.assign || function (t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+
+ __rest = function (s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+ };
+
+ __decorate = function (decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+ };
+
+ __param = function (paramIndex, decorator) {
+ return function (target, key) { decorator(target, key, paramIndex); }
+ };
+
+ __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
+ var _, done = false;
+ for (var i = decorators.length - 1; i >= 0; i--) {
+ var context = {};
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
+ if (kind === "accessor") {
+ if (result === void 0) continue;
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
+ if (_ = accept(result.get)) descriptor.get = _;
+ if (_ = accept(result.set)) descriptor.set = _;
+ if (_ = accept(result.init)) initializers.unshift(_);
+ }
+ else if (_ = accept(result)) {
+ if (kind === "field") initializers.unshift(_);
+ else descriptor[key] = _;
+ }
+ }
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
+ done = true;
+ };
+
+ __runInitializers = function (thisArg, initializers, value) {
+ var useValue = arguments.length > 2;
+ for (var i = 0; i < initializers.length; i++) {
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
+ }
+ return useValue ? value : void 0;
+ };
+
+ __propKey = function (x) {
+ return typeof x === "symbol" ? x : "".concat(x);
+ };
+
+ __setFunctionName = function (f, name, prefix) {
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
+ };
+
+ __metadata = function (metadataKey, metadataValue) {
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
+ };
+
+ __awaiter = function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+ };
+
+ __generator = function (thisArg, body) {
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+ function verb(n) { return function (v) { return step([n, v]); }; }
+ function step(op) {
+ if (f) throw new TypeError("Generator is already executing.");
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+ if (y = 0, t) op = [op[0] & 2, t.value];
+ switch (op[0]) {
+ case 0: case 1: t = op; break;
+ case 4: _.label++; return { value: op[1], done: false };
+ case 5: _.label++; y = op[1]; op = [0]; continue;
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+ if (t[2]) _.ops.pop();
+ _.trys.pop(); continue;
+ }
+ op = body.call(thisArg, _);
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+ }
+ };
+
+ __exportStar = function(m, o) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
+ };
+
+ __createBinding = Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+ }) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+ });
+
+ __values = function (o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+ };
+
+ __read = function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+ };
+
+ /** @deprecated */
+ __spread = function () {
+ for (var ar = [], i = 0; i < arguments.length; i++)
+ ar = ar.concat(__read(arguments[i]));
+ return ar;
+ };
+
+ /** @deprecated */
+ __spreadArrays = function () {
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
+ r[k] = a[j];
+ return r;
+ };
+
+ __spreadArray = function (to, from, pack) {
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
+ if (ar || !(i in from)) {
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
+ ar[i] = from[i];
+ }
+ }
+ return to.concat(ar || Array.prototype.slice.call(from));
+ };
+
+ __await = function (v) {
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
+ };
+
+ __asyncGenerator = function (thisArg, _arguments, generator) {
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
+ function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
+ function fulfill(value) { resume("next", value); }
+ function reject(value) { resume("throw", value); }
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
+ };
+
+ __asyncDelegator = function (o) {
+ var i, p;
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
+ };
+
+ __asyncValues = function (o) {
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+ var m = o[Symbol.asyncIterator], i;
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
+ };
+
+ __makeTemplateObject = function (cooked, raw) {
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
+ return cooked;
+ };
+
+ var __setModuleDefault = Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+ }) : function(o, v) {
+ o["default"] = v;
+ };
+
+ __importStar = function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+ };
+
+ __importDefault = function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+ };
+
+ __classPrivateFieldGet = function (receiver, state, kind, f) {
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
+ };
+
+ __classPrivateFieldSet = function (receiver, state, value, kind, f) {
+ if (kind === "m") throw new TypeError("Private method is not writable");
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
+ };
+
+ __classPrivateFieldIn = function (state, receiver) {
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
+ return typeof state === "function" ? receiver === state : state.has(receiver);
+ };
+
+ __addDisposableResource = function (env, value, async) {
+ if (value !== null && value !== void 0) {
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
+ var dispose;
+ if (async) {
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
+ dispose = value[Symbol.asyncDispose];
+ }
+ if (dispose === void 0) {
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
+ dispose = value[Symbol.dispose];
+ }
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
+ env.stack.push({ value: value, dispose: dispose, async: async });
+ }
+ else if (async) {
+ env.stack.push({ async: true });
+ }
+ return value;
+ };
+
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
+ var e = new Error(message);
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
+ };
+
+ __disposeResources = function (env) {
+ function fail(e) {
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
+ env.hasError = true;
+ }
+ function next() {
+ while (env.stack.length) {
+ var rec = env.stack.pop();
+ try {
+ var result = rec.dispose && rec.dispose.call(rec.value);
+ if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
+ }
+ catch (e) {
+ fail(e);
+ }
+ }
+ if (env.hasError) throw env.error;
+ }
+ return next();
+ };
+
+ exporter("__extends", __extends);
+ exporter("__assign", __assign);
+ exporter("__rest", __rest);
+ exporter("__decorate", __decorate);
+ exporter("__param", __param);
+ exporter("__esDecorate", __esDecorate);
+ exporter("__runInitializers", __runInitializers);
+ exporter("__propKey", __propKey);
+ exporter("__setFunctionName", __setFunctionName);
+ exporter("__metadata", __metadata);
+ exporter("__awaiter", __awaiter);
+ exporter("__generator", __generator);
+ exporter("__exportStar", __exportStar);
+ exporter("__createBinding", __createBinding);
+ exporter("__values", __values);
+ exporter("__read", __read);
+ exporter("__spread", __spread);
+ exporter("__spreadArrays", __spreadArrays);
+ exporter("__spreadArray", __spreadArray);
+ exporter("__await", __await);
+ exporter("__asyncGenerator", __asyncGenerator);
+ exporter("__asyncDelegator", __asyncDelegator);
+ exporter("__asyncValues", __asyncValues);
+ exporter("__makeTemplateObject", __makeTemplateObject);
+ exporter("__importStar", __importStar);
+ exporter("__importDefault", __importDefault);
+ exporter("__classPrivateFieldGet", __classPrivateFieldGet);
+ exporter("__classPrivateFieldSet", __classPrivateFieldSet);
+ exporter("__classPrivateFieldIn", __classPrivateFieldIn);
+ exporter("__addDisposableResource", __addDisposableResource);
+ exporter("__disposeResources", __disposeResources);
+});
diff --git a/node_modules/undici/LICENSE b/node_modules/undici/LICENSE
new file mode 100644
index 0000000..e7323bb
--- /dev/null
+++ b/node_modules/undici/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) Matteo Collina and Undici 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/undici/README.md b/node_modules/undici/README.md
new file mode 100644
index 0000000..05a5d21
--- /dev/null
+++ b/node_modules/undici/README.md
@@ -0,0 +1,438 @@
+# undici
+
+[![Node CI](https://github.com/nodejs/undici/actions/workflows/nodejs.yml/badge.svg)](https://github.com/nodejs/undici/actions/workflows/nodejs.yml) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) [![npm version](https://badge.fury.io/js/undici.svg)](https://badge.fury.io/js/undici) [![codecov](https://codecov.io/gh/nodejs/undici/branch/main/graph/badge.svg?token=yZL6LtXkOA)](https://codecov.io/gh/nodejs/undici)
+
+An HTTP/1.1 client, written from scratch for Node.js.
+
+> Undici means eleven in Italian. 1.1 -> 11 -> Eleven -> Undici.
+It is also a Stranger Things reference.
+
+Have a question about using Undici? Open a [Q&A Discussion](https://github.com/nodejs/undici/discussions/new) or join our official OpenJS [Slack](https://openjs-foundation.slack.com/archives/C01QF9Q31QD) channel.
+
+## Install
+
+```
+npm i undici
+```
+
+## Benchmarks
+
+The benchmark is a simple `hello world` [example](benchmarks/benchmark.js) using a
+number of unix sockets (connections) with a pipelining depth of 10 running on Node 16.
+The benchmarks below have the [simd](https://github.com/WebAssembly/simd) feature enabled.
+
+### Connections 1
+
+| Tests | Samples | Result | Tolerance | Difference with slowest |
+|---------------------|---------|---------------|-----------|-------------------------|
+| http - no keepalive | 15 | 4.63 req/sec | ± 2.77 % | - |
+| http - keepalive | 10 | 4.81 req/sec | ± 2.16 % | + 3.94 % |
+| undici - stream | 25 | 62.22 req/sec | ± 2.67 % | + 1244.58 % |
+| undici - dispatch | 15 | 64.33 req/sec | ± 2.47 % | + 1290.24 % |
+| undici - request | 15 | 66.08 req/sec | ± 2.48 % | + 1327.88 % |
+| undici - pipeline | 10 | 66.13 req/sec | ± 1.39 % | + 1329.08 % |
+
+### Connections 50
+
+| Tests | Samples | Result | Tolerance | Difference with slowest |
+|---------------------|---------|------------------|-----------|-------------------------|
+| http - no keepalive | 50 | 3546.49 req/sec | ± 2.90 % | - |
+| http - keepalive | 15 | 5692.67 req/sec | ± 2.48 % | + 60.52 % |
+| undici - pipeline | 25 | 8478.71 req/sec | ± 2.62 % | + 139.07 % |
+| undici - request | 20 | 9766.66 req/sec | ± 2.79 % | + 175.39 % |
+| undici - stream | 15 | 10109.74 req/sec | ± 2.94 % | + 185.06 % |
+| undici - dispatch | 25 | 10949.73 req/sec | ± 2.54 % | + 208.75 % |
+
+## Quick Start
+
+```js
+import { request } from 'undici'
+
+const {
+ statusCode,
+ headers,
+ trailers,
+ body
+} = await request('http://localhost:3000/foo')
+
+console.log('response received', statusCode)
+console.log('headers', headers)
+
+for await (const data of body) {
+ console.log('data', data)
+}
+
+console.log('trailers', trailers)
+```
+
+## Body Mixins
+
+The `body` mixins are the most common way to format the request/response body. Mixins include:
+
+- [`.formData()`](https://fetch.spec.whatwg.org/#dom-body-formdata)
+- [`.json()`](https://fetch.spec.whatwg.org/#dom-body-json)
+- [`.text()`](https://fetch.spec.whatwg.org/#dom-body-text)
+
+Example usage:
+
+```js
+import { request } from 'undici'
+
+const {
+ statusCode,
+ headers,
+ trailers,
+ body
+} = await request('http://localhost:3000/foo')
+
+console.log('response received', statusCode)
+console.log('headers', headers)
+console.log('data', await body.json())
+console.log('trailers', trailers)
+```
+
+_Note: Once a mixin has been called then the body cannot be reused, thus calling additional mixins on `.body`, e.g. `.body.json(); .body.text()` will result in an error `TypeError: unusable` being thrown and returned through the `Promise` rejection._
+
+Should you need to access the `body` in plain-text after using a mixin, the best practice is to use the `.text()` mixin first and then manually parse the text to the desired format.
+
+For more information about their behavior, please reference the body mixin from the [Fetch Standard](https://fetch.spec.whatwg.org/#body-mixin).
+
+## Common API Methods
+
+This section documents our most commonly used API methods. Additional APIs are documented in their own files within the [docs](./docs/) folder and are accessible via the navigation list on the left side of the docs site.
+
+### `undici.request([url, options]): Promise`
+
+Arguments:
+
+* **url** `string | URL | UrlObject`
+* **options** [`RequestOptions`](./docs/api/Dispatcher.md#parameter-requestoptions)
+ * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher)
+ * **method** `String` - Default: `PUT` if `options.body`, otherwise `GET`
+ * **maxRedirections** `Integer` - Default: `0`
+
+Returns a promise with the result of the `Dispatcher.request` method.
+
+Calls `options.dispatcher.request(options)`.
+
+See [Dispatcher.request](./docs/api/Dispatcher.md#dispatcherrequestoptions-callback) for more details.
+
+### `undici.stream([url, options, ]factory): Promise`
+
+Arguments:
+
+* **url** `string | URL | UrlObject`
+* **options** [`StreamOptions`](./docs/api/Dispatcher.md#parameter-streamoptions)
+ * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher)
+ * **method** `String` - Default: `PUT` if `options.body`, otherwise `GET`
+ * **maxRedirections** `Integer` - Default: `0`
+* **factory** `Dispatcher.stream.factory`
+
+Returns a promise with the result of the `Dispatcher.stream` method.
+
+Calls `options.dispatcher.stream(options, factory)`.
+
+See [Dispatcher.stream](docs/api/Dispatcher.md#dispatcherstreamoptions-factory-callback) for more details.
+
+### `undici.pipeline([url, options, ]handler): Duplex`
+
+Arguments:
+
+* **url** `string | URL | UrlObject`
+* **options** [`PipelineOptions`](docs/api/Dispatcher.md#parameter-pipelineoptions)
+ * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher)
+ * **method** `String` - Default: `PUT` if `options.body`, otherwise `GET`
+ * **maxRedirections** `Integer` - Default: `0`
+* **handler** `Dispatcher.pipeline.handler`
+
+Returns: `stream.Duplex`
+
+Calls `options.dispatch.pipeline(options, handler)`.
+
+See [Dispatcher.pipeline](docs/api/Dispatcher.md#dispatcherpipelineoptions-handler) for more details.
+
+### `undici.connect([url, options]): Promise`
+
+Starts two-way communications with the requested resource using [HTTP CONNECT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT).
+
+Arguments:
+
+* **url** `string | URL | UrlObject`
+* **options** [`ConnectOptions`](docs/api/Dispatcher.md#parameter-connectoptions)
+ * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher)
+ * **maxRedirections** `Integer` - Default: `0`
+* **callback** `(err: Error | null, data: ConnectData | null) => void` (optional)
+
+Returns a promise with the result of the `Dispatcher.connect` method.
+
+Calls `options.dispatch.connect(options)`.
+
+See [Dispatcher.connect](docs/api/Dispatcher.md#dispatcherconnectoptions-callback) for more details.
+
+### `undici.fetch(input[, init]): Promise`
+
+Implements [fetch](https://fetch.spec.whatwg.org/#fetch-method).
+
+* https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch
+* https://fetch.spec.whatwg.org/#fetch-method
+
+Only supported on Node 16.8+.
+
+Basic usage example:
+
+```js
+import { fetch } from 'undici'
+
+
+const res = await fetch('https://example.com')
+const json = await res.json()
+console.log(json)
+```
+
+You can pass an optional dispatcher to `fetch` as:
+
+```js
+import { fetch, Agent } from 'undici'
+
+const res = await fetch('https://example.com', {
+ // Mocks are also supported
+ dispatcher: new Agent({
+ keepAliveTimeout: 10,
+ keepAliveMaxTimeout: 10
+ })
+})
+const json = await res.json()
+console.log(json)
+```
+
+#### `request.body`
+
+A body can be of the following types:
+
+- ArrayBuffer
+- ArrayBufferView
+- AsyncIterables
+- Blob
+- Iterables
+- String
+- URLSearchParams
+- FormData
+
+In this implementation of fetch, ```request.body``` now accepts ```Async Iterables```. It is not present in the [Fetch Standard.](https://fetch.spec.whatwg.org)
+
+```js
+import { fetch } from 'undici'
+
+const data = {
+ async *[Symbol.asyncIterator]() {
+ yield 'hello'
+ yield 'world'
+ },
+}
+
+await fetch('https://example.com', { body: data, method: 'POST', duplex: 'half' })
+```
+
+#### `request.duplex`
+
+- half
+
+In this implementation of fetch, `request.duplex` must be set if `request.body` is `ReadableStream` or `Async Iterables`. And fetch requests are currently always be full duplex. More detail refer to [Fetch Standard.](https://fetch.spec.whatwg.org/#dom-requestinit-duplex)
+
+#### `response.body`
+
+Nodejs has two kinds of streams: [web streams](https://nodejs.org/dist/latest-v16.x/docs/api/webstreams.html), which follow the API of the WHATWG web standard found in browsers, and an older Node-specific [streams API](https://nodejs.org/api/stream.html). `response.body` returns a readable web stream. If you would prefer to work with a Node stream you can convert a web stream using `.fromWeb()`.
+
+```js
+import { fetch } from 'undici'
+import { Readable } from 'node:stream'
+
+const response = await fetch('https://example.com')
+const readableWebStream = response.body
+const readableNodeStream = Readable.fromWeb(readableWebStream)
+```
+
+#### Specification Compliance
+
+This section documents parts of the [Fetch Standard](https://fetch.spec.whatwg.org) that Undici does
+not support or does not fully implement.
+
+##### Garbage Collection
+
+* https://fetch.spec.whatwg.org/#garbage-collection
+
+The [Fetch Standard](https://fetch.spec.whatwg.org) allows users to skip consuming the response body by relying on
+[garbage collection](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management#garbage_collection) to release connection resources. Undici does not do the same. Therefore, it is important to always either consume or cancel the response body.
+
+Garbage collection in Node is less aggressive and deterministic
+(due to the lack of clear idle periods that browsers have through the rendering refresh rate)
+which means that leaving the release of connection resources to the garbage collector can lead
+to excessive connection usage, reduced performance (due to less connection re-use), and even
+stalls or deadlocks when running out of connections.
+
+```js
+// Do
+const headers = await fetch(url)
+ .then(async res => {
+ for await (const chunk of res.body) {
+ // force consumption of body
+ }
+ return res.headers
+ })
+
+// Do not
+const headers = await fetch(url)
+ .then(res => res.headers)
+```
+
+However, if you want to get only headers, it might be better to use `HEAD` request method. Usage of this method will obviate the need for consumption or cancelling of the response body. See [MDN - HTTP - HTTP request methods - HEAD](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD) for more details.
+
+```js
+const headers = await fetch(url, { method: 'HEAD' })
+ .then(res => res.headers)
+```
+
+##### Forbidden and Safelisted Header Names
+
+* https://fetch.spec.whatwg.org/#cors-safelisted-response-header-name
+* https://fetch.spec.whatwg.org/#forbidden-header-name
+* https://fetch.spec.whatwg.org/#forbidden-response-header-name
+* https://github.com/wintercg/fetch/issues/6
+
+The [Fetch Standard](https://fetch.spec.whatwg.org) requires implementations to exclude certain headers from requests and responses. In browser environments, some headers are forbidden so the user agent remains in full control over them. In Undici, these constraints are removed to give more control to the user.
+
+### `undici.upgrade([url, options]): Promise`
+
+Upgrade to a different protocol. See [MDN - HTTP - Protocol upgrade mechanism](https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism) for more details.
+
+Arguments:
+
+* **url** `string | URL | UrlObject`
+* **options** [`UpgradeOptions`](docs/api/Dispatcher.md#parameter-upgradeoptions)
+ * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher)
+ * **maxRedirections** `Integer` - Default: `0`
+* **callback** `(error: Error | null, data: UpgradeData) => void` (optional)
+
+Returns a promise with the result of the `Dispatcher.upgrade` method.
+
+Calls `options.dispatcher.upgrade(options)`.
+
+See [Dispatcher.upgrade](docs/api/Dispatcher.md#dispatcherupgradeoptions-callback) for more details.
+
+### `undici.setGlobalDispatcher(dispatcher)`
+
+* dispatcher `Dispatcher`
+
+Sets the global dispatcher used by Common API Methods.
+
+### `undici.getGlobalDispatcher()`
+
+Gets the global dispatcher used by Common API Methods.
+
+Returns: `Dispatcher`
+
+### `undici.setGlobalOrigin(origin)`
+
+* origin `string | URL | undefined`
+
+Sets the global origin used in `fetch`.
+
+If `undefined` is passed, the global origin will be reset. This will cause `Response.redirect`, `new Request()`, and `fetch` to throw an error when a relative path is passed.
+
+```js
+setGlobalOrigin('http://localhost:3000')
+
+const response = await fetch('/api/ping')
+
+console.log(response.url) // http://localhost:3000/api/ping
+```
+
+### `undici.getGlobalOrigin()`
+
+Gets the global origin used in `fetch`.
+
+Returns: `URL`
+
+### `UrlObject`
+
+* **port** `string | number` (optional)
+* **path** `string` (optional)
+* **pathname** `string` (optional)
+* **hostname** `string` (optional)
+* **origin** `string` (optional)
+* **protocol** `string` (optional)
+* **search** `string` (optional)
+
+## Specification Compliance
+
+This section documents parts of the HTTP/1.1 specification that Undici does
+not support or does not fully implement.
+
+### Expect
+
+Undici does not support the `Expect` request header field. The request
+body is always immediately sent and the `100 Continue` response will be
+ignored.
+
+Refs: https://tools.ietf.org/html/rfc7231#section-5.1.1
+
+### Pipelining
+
+Undici will only use pipelining if configured with a `pipelining` factor
+greater than `1`.
+
+Undici always assumes that connections are persistent and will immediately
+pipeline requests, without checking whether the connection is persistent.
+Hence, automatic fallback to HTTP/1.0 or HTTP/1.1 without pipelining is
+not supported.
+
+Undici will immediately pipeline when retrying requests after a failed
+connection. However, Undici will not retry the first remaining requests in
+the prior pipeline and instead error the corresponding callback/promise/stream.
+
+Undici will abort all running requests in the pipeline when any of them are
+aborted.
+
+* Refs: https://tools.ietf.org/html/rfc2616#section-8.1.2.2
+* Refs: https://tools.ietf.org/html/rfc7230#section-6.3.2
+
+### Manual Redirect
+
+Since it is not possible to manually follow an HTTP redirect on the server-side,
+Undici returns the actual response instead of an `opaqueredirect` filtered one
+when invoked with a `manual` redirect. This aligns `fetch()` with the other
+implementations in Deno and Cloudflare Workers.
+
+Refs: https://fetch.spec.whatwg.org/#atomic-http-redirect-handling
+
+## Workarounds
+
+### Network address family autoselection.
+
+If you experience problem when connecting to a remote server that is resolved by your DNS servers to a IPv6 (AAAA record)
+first, there are chances that your local router or ISP might have problem connecting to IPv6 networks. In that case
+undici will throw an error with code `UND_ERR_CONNECT_TIMEOUT`.
+
+If the target server resolves to both a IPv6 and IPv4 (A records) address and you are using a compatible Node version
+(18.3.0 and above), you can fix the problem by providing the `autoSelectFamily` option (support by both `undici.request`
+and `undici.Agent`) which will enable the family autoselection algorithm when establishing the connection.
+
+## Collaborators
+
+* [__Daniele Belardi__](https://github.com/dnlup), <https://www.npmjs.com/~dnlup>
+* [__Ethan Arrowood__](https://github.com/ethan-arrowood), <https://www.npmjs.com/~ethan_arrowood>
+* [__Matteo Collina__](https://github.com/mcollina), <https://www.npmjs.com/~matteo.collina>
+* [__Matthew Aitken__](https://github.com/KhafraDev), <https://www.npmjs.com/~khaf>
+* [__Robert Nagy__](https://github.com/ronag), <https://www.npmjs.com/~ronag>
+* [__Szymon Marczak__](https://github.com/szmarczak), <https://www.npmjs.com/~szmarczak>
+* [__Tomas Della Vedova__](https://github.com/delvedor), <https://www.npmjs.com/~delvedor>
+
+### Releasers
+
+* [__Ethan Arrowood__](https://github.com/ethan-arrowood), <https://www.npmjs.com/~ethan_arrowood>
+* [__Matteo Collina__](https://github.com/mcollina), <https://www.npmjs.com/~matteo.collina>
+* [__Robert Nagy__](https://github.com/ronag), <https://www.npmjs.com/~ronag>
+
+## License
+
+MIT
diff --git a/node_modules/undici/docs/api/Agent.md b/node_modules/undici/docs/api/Agent.md
new file mode 100644
index 0000000..dd5d99b
--- /dev/null
+++ b/node_modules/undici/docs/api/Agent.md
@@ -0,0 +1,80 @@
+# Agent
+
+Extends: `undici.Dispatcher`
+
+Agent allow dispatching requests against multiple different origins.
+
+Requests are not guaranteed to be dispatched in order of invocation.
+
+## `new undici.Agent([options])`
+
+Arguments:
+
+* **options** `AgentOptions` (optional)
+
+Returns: `Agent`
+
+### Parameter: `AgentOptions`
+
+Extends: [`PoolOptions`](Pool.md#parameter-pooloptions)
+
+* **factory** `(origin: URL, opts: Object) => Dispatcher` - Default: `(origin, opts) => new Pool(origin, opts)`
+* **maxRedirections** `Integer` - Default: `0`. The number of HTTP redirection to follow unless otherwise specified in `DispatchOptions`.
+* **interceptors** `{ Agent: DispatchInterceptor[] }` - Default: `[RedirectInterceptor]` - A list of interceptors that are applied to the dispatch method. Additional logic can be applied (such as, but not limited to: 302 status code handling, authentication, cookies, compression and caching). Note that the behavior of interceptors is Experimental and might change at any given time.
+
+## Instance Properties
+
+### `Agent.closed`
+
+Implements [Client.closed](Client.md#clientclosed)
+
+### `Agent.destroyed`
+
+Implements [Client.destroyed](Client.md#clientdestroyed)
+
+## Instance Methods
+
+### `Agent.close([callback])`
+
+Implements [`Dispatcher.close([callback])`](Dispatcher.md#dispatcherclosecallback-promise).
+
+### `Agent.destroy([error, callback])`
+
+Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise).
+
+### `Agent.dispatch(options, handler: AgentDispatchOptions)`
+
+Implements [`Dispatcher.dispatch(options, handler)`](Dispatcher.md#dispatcherdispatchoptions-handler).
+
+#### Parameter: `AgentDispatchOptions`
+
+Extends: [`DispatchOptions`](Dispatcher.md#parameter-dispatchoptions)
+
+* **origin** `string | URL`
+* **maxRedirections** `Integer`.
+
+Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise).
+
+### `Agent.connect(options[, callback])`
+
+See [`Dispatcher.connect(options[, callback])`](Dispatcher.md#dispatcherconnectoptions-callback).
+
+### `Agent.dispatch(options, handler)`
+
+Implements [`Dispatcher.dispatch(options, handler)`](Dispatcher.md#dispatcherdispatchoptions-handler).
+
+### `Agent.pipeline(options, handler)`
+
+See [`Dispatcher.pipeline(options, handler)`](Dispatcher.md#dispatcherpipelineoptions-handler).
+
+### `Agent.request(options[, callback])`
+
+See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback).
+
+### `Agent.stream(options, factory[, callback])`
+
+See [`Dispatcher.stream(options, factory[, callback])`](Dispatcher.md#dispatcherstreamoptions-factory-callback).
+
+### `Agent.upgrade(options[, callback])`
+
+See [`Dispatcher.upgrade(options[, callback])`](Dispatcher.md#dispatcherupgradeoptions-callback).
diff --git a/node_modules/undici/docs/api/BalancedPool.md b/node_modules/undici/docs/api/BalancedPool.md
new file mode 100644
index 0000000..290c734
--- /dev/null
+++ b/node_modules/undici/docs/api/BalancedPool.md
@@ -0,0 +1,99 @@
+# Class: BalancedPool
+
+Extends: `undici.Dispatcher`
+
+A pool of [Pool](Pool.md) instances connected to multiple upstreams.
+
+Requests are not guaranteed to be dispatched in order of invocation.
+
+## `new BalancedPool(upstreams [, options])`
+
+Arguments:
+
+* **upstreams** `URL | string | string[]` - It should only include the **protocol, hostname, and port**.
+* **options** `BalancedPoolOptions` (optional)
+
+### Parameter: `BalancedPoolOptions`
+
+Extends: [`PoolOptions`](Pool.md#parameter-pooloptions)
+
+* **factory** `(origin: URL, opts: Object) => Dispatcher` - Default: `(origin, opts) => new Pool(origin, opts)`
+
+The `PoolOptions` are passed to each of the `Pool` instances being created.
+## Instance Properties
+
+### `BalancedPool.upstreams`
+
+Returns an array of upstreams that were previously added.
+
+### `BalancedPool.closed`
+
+Implements [Client.closed](Client.md#clientclosed)
+
+### `BalancedPool.destroyed`
+
+Implements [Client.destroyed](Client.md#clientdestroyed)
+
+### `Pool.stats`
+
+Returns [`PoolStats`](PoolStats.md) instance for this pool.
+
+## Instance Methods
+
+### `BalancedPool.addUpstream(upstream)`
+
+Add an upstream.
+
+Arguments:
+
+* **upstream** `string` - It should only include the **protocol, hostname, and port**.
+
+### `BalancedPool.removeUpstream(upstream)`
+
+Removes an upstream that was previously addded.
+
+### `BalancedPool.close([callback])`
+
+Implements [`Dispatcher.close([callback])`](Dispatcher.md#dispatcherclosecallback-promise).
+
+### `BalancedPool.destroy([error, callback])`
+
+Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise).
+
+### `BalancedPool.connect(options[, callback])`
+
+See [`Dispatcher.connect(options[, callback])`](Dispatcher.md#dispatcherconnectoptions-callback).
+
+### `BalancedPool.dispatch(options, handlers)`
+
+Implements [`Dispatcher.dispatch(options, handlers)`](Dispatcher.md#dispatcherdispatchoptions-handler).
+
+### `BalancedPool.pipeline(options, handler)`
+
+See [`Dispatcher.pipeline(options, handler)`](Dispatcher.md#dispatcherpipelineoptions-handler).
+
+### `BalancedPool.request(options[, callback])`
+
+See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback).
+
+### `BalancedPool.stream(options, factory[, callback])`
+
+See [`Dispatcher.stream(options, factory[, callback])`](Dispatcher.md#dispatcherstreamoptions-factory-callback).
+
+### `BalancedPool.upgrade(options[, callback])`
+
+See [`Dispatcher.upgrade(options[, callback])`](Dispatcher.md#dispatcherupgradeoptions-callback).
+
+## Instance Events
+
+### Event: `'connect'`
+
+See [Dispatcher Event: `'connect'`](Dispatcher.md#event-connect).
+
+### Event: `'disconnect'`
+
+See [Dispatcher Event: `'disconnect'`](Dispatcher.md#event-disconnect).
+
+### Event: `'drain'`
+
+See [Dispatcher Event: `'drain'`](Dispatcher.md#event-drain).
diff --git a/node_modules/undici/docs/api/CacheStorage.md b/node_modules/undici/docs/api/CacheStorage.md
new file mode 100644
index 0000000..08ee99f
--- /dev/null
+++ b/node_modules/undici/docs/api/CacheStorage.md
@@ -0,0 +1,30 @@
+# CacheStorage
+
+Undici exposes a W3C spec-compliant implementation of [CacheStorage](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage) and [Cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache).
+
+## Opening a Cache
+
+Undici exports a top-level CacheStorage instance. You can open a new Cache, or duplicate a Cache with an existing name, by using `CacheStorage.prototype.open`. If you open a Cache with the same name as an already-existing Cache, its list of cached Responses will be shared between both instances.
+
+```mjs
+import { caches } from 'undici'
+
+const cache_1 = await caches.open('v1')
+const cache_2 = await caches.open('v1')
+
+// Although .open() creates a new instance,
+assert(cache_1 !== cache_2)
+// The same Response is matched in both.
+assert.deepStrictEqual(await cache_1.match('/req'), await cache_2.match('/req'))
+```
+
+## Deleting a Cache
+
+If a Cache is deleted, the cached Responses/Requests can still be used.
+
+```mjs
+const response = await cache_1.match('/req')
+await caches.delete('v1')
+
+await response.text() // the Response's body
+```
diff --git a/node_modules/undici/docs/api/Client.md b/node_modules/undici/docs/api/Client.md
new file mode 100644
index 0000000..fc7c5d2
--- /dev/null
+++ b/node_modules/undici/docs/api/Client.md
@@ -0,0 +1,269 @@
+# Class: Client
+
+Extends: `undici.Dispatcher`
+
+A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
+
+Requests are not guaranteed to be dispatched in order of invocation.
+
+## `new Client(url[, options])`
+
+Arguments:
+
+* **url** `URL | string` - Should only include the **protocol, hostname, and port**.
+* **options** `ClientOptions` (optional)
+
+Returns: `Client`
+
+### Parameter: `ClientOptions`
+
+* **bodyTimeout** `number | null` (optional) - Default: `300e3` - The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Defaults to 300 seconds.
+* **headersTimeout** `number | null` (optional) - Default: `300e3` - The amount of time the parser will wait to receive the complete HTTP headers while not sending the request. Defaults to 300 seconds.
+* **keepAliveMaxTimeout** `number | null` (optional) - Default: `600e3` - The maximum allowed `keepAliveTimeout` when overridden by *keep-alive* hints from the server. Defaults to 10 minutes.
+* **keepAliveTimeout** `number | null` (optional) - Default: `4e3` - The timeout after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. See [MDN: HTTP - Headers - Keep-Alive directives](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Keep-Alive#directives) for more details. Defaults to 4 seconds.
+* **keepAliveTimeoutThreshold** `number | null` (optional) - Default: `1e3` - A number subtracted from server *keep-alive* hints when overriding `keepAliveTimeout` to account for timing inaccuracies caused by e.g. transport latency. Defaults to 1 second.
+* **maxHeaderSize** `number | null` (optional) - Default: `16384` - The maximum length of request headers in bytes. Defaults to 16KiB.
+* **maxResponseSize** `number | null` (optional) - Default: `-1` - The maximum length of response body in bytes. Set to `-1` to disable.
+* **pipelining** `number | null` (optional) - Default: `1` - The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Carefully consider your workload and environment before enabling concurrent requests as pipelining may reduce performance if used incorrectly. Pipelining is sensitive to network stack settings as well as head of line blocking caused by e.g. long running requests. Set to `0` to disable keep-alive connections.
+* **connect** `ConnectOptions | Function | null` (optional) - Default: `null`.
+* **strictContentLength** `Boolean` (optional) - Default: `true` - Whether to treat request content length mismatches as errors. If true, an error is thrown when the request content-length header doesn't match the length of the request body.
+* **interceptors** `{ Client: DispatchInterceptor[] }` - Default: `[RedirectInterceptor]` - A list of interceptors that are applied to the dispatch method. Additional logic can be applied (such as, but not limited to: 302 status code handling, authentication, cookies, compression and caching). Note that the behavior of interceptors is Experimental and might change at any given time.
+* **autoSelectFamily**: `boolean` (optional) - Default: depends on local Node version, on Node 18.13.0 and above is `false`. Enables a family autodetection algorithm that loosely implements section 5 of [RFC 8305](https://tools.ietf.org/html/rfc8305#section-5). See [here](https://nodejs.org/api/net.html#socketconnectoptions-connectlistener) for more details. This option is ignored if not supported by the current Node version.
+* **autoSelectFamilyAttemptTimeout**: `number` - Default: depends on local Node version, on Node 18.13.0 and above is `250`. The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. See [here](https://nodejs.org/api/net.html#socketconnectoptions-connectlistener) for more details.
+
+#### Parameter: `ConnectOptions`
+
+Every Tls option, see [here](https://nodejs.org/api/tls.html#tls_tls_connect_options_callback).
+Furthermore, the following options can be passed:
+
+* **socketPath** `string | null` (optional) - Default: `null` - An IPC endpoint, either Unix domain socket or Windows named pipe.
+* **maxCachedSessions** `number | null` (optional) - Default: `100` - Maximum number of TLS cached sessions. Use 0 to disable TLS session caching. Default: 100.
+* **timeout** `number | null` (optional) - Default `10e3`
+* **servername** `string | null` (optional)
+* **keepAlive** `boolean | null` (optional) - Default: `true` - TCP keep-alive enabled
+* **keepAliveInitialDelay** `number | null` (optional) - Default: `60000` - TCP keep-alive interval for the socket in milliseconds
+
+### Example - Basic Client instantiation
+
+This will instantiate the undici Client, but it will not connect to the origin until something is queued. Consider using `client.connect` to prematurely connect to the origin, or just call `client.request`.
+
+```js
+'use strict'
+import { Client } from 'undici'
+
+const client = new Client('http://localhost:3000')
+```
+
+### Example - Custom connector
+
+This will allow you to perform some additional check on the socket that will be used for the next request.
+
+```js
+'use strict'
+import { Client, buildConnector } from 'undici'
+
+const connector = buildConnector({ rejectUnauthorized: false })
+const client = new Client('https://localhost:3000', {
+ connect (opts, cb) {
+ connector(opts, (err, socket) => {
+ if (err) {
+ cb(err)
+ } else if (/* assertion */) {
+ socket.destroy()
+ cb(new Error('kaboom'))
+ } else {
+ cb(null, socket)
+ }
+ })
+ }
+})
+```
+
+## Instance Methods
+
+### `Client.close([callback])`
+
+Implements [`Dispatcher.close([callback])`](Dispatcher.md#dispatcherclosecallback-promise).
+
+### `Client.destroy([error, callback])`
+
+Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise).
+
+Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided).
+
+### `Client.connect(options[, callback])`
+
+See [`Dispatcher.connect(options[, callback])`](Dispatcher.md#dispatcherconnectoptions-callback).
+
+### `Client.dispatch(options, handlers)`
+
+Implements [`Dispatcher.dispatch(options, handlers)`](Dispatcher.md#dispatcherdispatchoptions-handler).
+
+### `Client.pipeline(options, handler)`
+
+See [`Dispatcher.pipeline(options, handler)`](Dispatcher.md#dispatcherpipelineoptions-handler).
+
+### `Client.request(options[, callback])`
+
+See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback).
+
+### `Client.stream(options, factory[, callback])`
+
+See [`Dispatcher.stream(options, factory[, callback])`](Dispatcher.md#dispatcherstreamoptions-factory-callback).
+
+### `Client.upgrade(options[, callback])`
+
+See [`Dispatcher.upgrade(options[, callback])`](Dispatcher.md#dispatcherupgradeoptions-callback).
+
+## Instance Properties
+
+### `Client.closed`
+
+* `boolean`
+
+`true` after `client.close()` has been called.
+
+### `Client.destroyed`
+
+* `boolean`
+
+`true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed.
+
+### `Client.pipelining`
+
+* `number`
+
+Property to get and set the pipelining factor.
+
+## Instance Events
+
+### Event: `'connect'`
+
+See [Dispatcher Event: `'connect'`](Dispatcher.md#event-connect).
+
+Parameters:
+
+* **origin** `URL`
+* **targets** `Array<Dispatcher>`
+
+Emitted when a socket has been created and connected. The client will connect once `client.size > 0`.
+
+#### Example - Client connect event
+
+```js
+import { createServer } from 'http'
+import { Client } from 'undici'
+import { once } from 'events'
+
+const server = createServer((request, response) => {
+ response.end('Hello, World!')
+}).listen()
+
+await once(server, 'listening')
+
+const client = new Client(`http://localhost:${server.address().port}`)
+
+client.on('connect', (origin) => {
+ console.log(`Connected to ${origin}`) // should print before the request body statement
+})
+
+try {
+ const { body } = await client.request({
+ path: '/',
+ method: 'GET'
+ })
+ body.setEncoding('utf-8')
+ body.on('data', console.log)
+ client.close()
+ server.close()
+} catch (error) {
+ console.error(error)
+ client.close()
+ server.close()
+}
+```
+
+### Event: `'disconnect'`
+
+See [Dispatcher Event: `'disconnect'`](Dispatcher.md#event-disconnect).
+
+Parameters:
+
+* **origin** `URL`
+* **targets** `Array<Dispatcher>`
+* **error** `Error`
+
+Emitted when socket has disconnected. The error argument of the event is the error which caused the socket to disconnect. The client will reconnect if or once `client.size > 0`.
+
+#### Example - Client disconnect event
+
+```js
+import { createServer } from 'http'
+import { Client } from 'undici'
+import { once } from 'events'
+
+const server = createServer((request, response) => {
+ response.destroy()
+}).listen()
+
+await once(server, 'listening')
+
+const client = new Client(`http://localhost:${server.address().port}`)
+
+client.on('disconnect', (origin) => {
+ console.log(`Disconnected from ${origin}`)
+})
+
+try {
+ await client.request({
+ path: '/',
+ method: 'GET'
+ })
+} catch (error) {
+ console.error(error.message)
+ client.close()
+ server.close()
+}
+```
+
+### Event: `'drain'`
+
+Emitted when pipeline is no longer busy.
+
+See [Dispatcher Event: `'drain'`](Dispatcher.md#event-drain).
+
+#### Example - Client drain event
+
+```js
+import { createServer } from 'http'
+import { Client } from 'undici'
+import { once } from 'events'
+
+const server = createServer((request, response) => {
+ response.end('Hello, World!')
+}).listen()
+
+await once(server, 'listening')
+
+const client = new Client(`http://localhost:${server.address().port}`)
+
+client.on('drain', () => {
+ console.log('drain event')
+ client.close()
+ server.close()
+})
+
+const requests = [
+ client.request({ path: '/', method: 'GET' }),
+ client.request({ path: '/', method: 'GET' }),
+ client.request({ path: '/', method: 'GET' })
+]
+
+await Promise.all(requests)
+
+console.log('requests completed')
+```
+
+### Event: `'error'`
+
+Invoked for users errors such as throwing in the `onError` handler.
diff --git a/node_modules/undici/docs/api/Connector.md b/node_modules/undici/docs/api/Connector.md
new file mode 100644
index 0000000..7c96650
--- /dev/null
+++ b/node_modules/undici/docs/api/Connector.md
@@ -0,0 +1,115 @@
+# Connector
+
+Undici creates the underlying socket via the connector builder.
+Normally, this happens automatically and you don't need to care about this,
+but if you need to perform some additional check over the currently used socket,
+this is the right place.
+
+If you want to create a custom connector, you must import the `buildConnector` utility.
+
+#### Parameter: `buildConnector.BuildOptions`
+
+Every Tls option, see [here](https://nodejs.org/api/tls.html#tls_tls_connect_options_callback).
+Furthermore, the following options can be passed:
+
+* **socketPath** `string | null` (optional) - Default: `null` - An IPC endpoint, either Unix domain socket or Windows named pipe.
+* **maxCachedSessions** `number | null` (optional) - Default: `100` - Maximum number of TLS cached sessions. Use 0 to disable TLS session caching. Default: 100.
+* **timeout** `number | null` (optional) - Default `10e3`
+* **servername** `string | null` (optional)
+
+Once you call `buildConnector`, it will return a connector function, which takes the following parameters.
+
+#### Parameter: `connector.Options`
+
+* **hostname** `string` (required)
+* **host** `string` (optional)
+* **protocol** `string` (required)
+* **port** `string` (required)
+* **servername** `string` (optional)
+* **localAddress** `string | null` (optional) Local address the socket should connect from.
+* **httpSocket** `Socket` (optional) Establish secure connection on a given socket rather than creating a new socket. It can only be sent on TLS update.
+
+### Basic example
+
+```js
+'use strict'
+
+import { Client, buildConnector } from 'undici'
+
+const connector = buildConnector({ rejectUnauthorized: false })
+const client = new Client('https://localhost:3000', {
+ connect (opts, cb) {
+ connector(opts, (err, socket) => {
+ if (err) {
+ cb(err)
+ } else if (/* assertion */) {
+ socket.destroy()
+ cb(new Error('kaboom'))
+ } else {
+ cb(null, socket)
+ }
+ })
+ }
+})
+```
+
+### Example: validate the CA fingerprint
+
+```js
+'use strict'
+
+import { Client, buildConnector } from 'undici'
+
+const caFingerprint = 'FO:OB:AR'
+const connector = buildConnector({ rejectUnauthorized: false })
+const client = new Client('https://localhost:3000', {
+ connect (opts, cb) {
+ connector(opts, (err, socket) => {
+ if (err) {
+ cb(err)
+ } else if (getIssuerCertificate(socket).fingerprint256 !== caFingerprint) {
+ socket.destroy()
+ cb(new Error('Fingerprint does not match or malformed certificate'))
+ } else {
+ cb(null, socket)
+ }
+ })
+ }
+})
+
+client.request({
+ path: '/',
+ method: 'GET'
+}, (err, data) => {
+ if (err) throw err
+
+ const bufs = []
+ data.body.on('data', (buf) => {
+ bufs.push(buf)
+ })
+ data.body.on('end', () => {
+ console.log(Buffer.concat(bufs).toString('utf8'))
+ client.close()
+ })
+})
+
+function getIssuerCertificate (socket) {
+ let certificate = socket.getPeerCertificate(true)
+ while (certificate && Object.keys(certificate).length > 0) {
+ // invalid certificate
+ if (certificate.issuerCertificate == null) {
+ return null
+ }
+
+ // We have reached the root certificate.
+ // In case of self-signed certificates, `issuerCertificate` may be a circular reference.
+ if (certificate.fingerprint256 === certificate.issuerCertificate.fingerprint256) {
+ break
+ }
+
+ // continue the loop
+ certificate = certificate.issuerCertificate
+ }
+ return certificate
+}
+```
diff --git a/node_modules/undici/docs/api/ContentType.md b/node_modules/undici/docs/api/ContentType.md
new file mode 100644
index 0000000..2bcc9f7
--- /dev/null
+++ b/node_modules/undici/docs/api/ContentType.md
@@ -0,0 +1,57 @@
+# MIME Type Parsing
+
+## `MIMEType` interface
+
+* **type** `string`
+* **subtype** `string`
+* **parameters** `Map<string, string>`
+* **essence** `string`
+
+## `parseMIMEType(input)`
+
+Implements [parse a MIME type](https://mimesniff.spec.whatwg.org/#parse-a-mime-type).
+
+Parses a MIME type, returning its type, subtype, and any associated parameters. If the parser can't parse an input it returns the string literal `'failure'`.
+
+```js
+import { parseMIMEType } from 'undici'
+
+parseMIMEType('text/html; charset=gbk')
+// {
+// type: 'text',
+// subtype: 'html',
+// parameters: Map(1) { 'charset' => 'gbk' },
+// essence: 'text/html'
+// }
+```
+
+Arguments:
+
+* **input** `string`
+
+Returns: `MIMEType|'failure'`
+
+## `serializeAMimeType(input)`
+
+Implements [serialize a MIME type](https://mimesniff.spec.whatwg.org/#serialize-a-mime-type).
+
+Serializes a MIMEType object.
+
+```js
+import { serializeAMimeType } from 'undici'
+
+serializeAMimeType({
+ type: 'text',
+ subtype: 'html',
+ parameters: new Map([['charset', 'gbk']]),
+ essence: 'text/html'
+})
+// text/html;charset=gbk
+
+```
+
+Arguments:
+
+* **mimeType** `MIMEType`
+
+Returns: `string`
diff --git a/node_modules/undici/docs/api/Cookies.md b/node_modules/undici/docs/api/Cookies.md
new file mode 100644
index 0000000..0cad379
--- /dev/null
+++ b/node_modules/undici/docs/api/Cookies.md
@@ -0,0 +1,101 @@
+# Cookie Handling
+
+## `Cookie` interface
+
+* **name** `string`
+* **value** `string`
+* **expires** `Date|number` (optional)
+* **maxAge** `number` (optional)
+* **domain** `string` (optional)
+* **path** `string` (optional)
+* **secure** `boolean` (optional)
+* **httpOnly** `boolean` (optional)
+* **sameSite** `'String'|'Lax'|'None'` (optional)
+* **unparsed** `string[]` (optional) Left over attributes that weren't parsed.
+
+## `deleteCookie(headers, name[, attributes])`
+
+Sets the expiry time of the cookie to the unix epoch, causing browsers to delete it when received.
+
+```js
+import { deleteCookie, Headers } from 'undici'
+
+const headers = new Headers()
+deleteCookie(headers, 'name')
+
+console.log(headers.get('set-cookie')) // name=; Expires=Thu, 01 Jan 1970 00:00:00 GMT
+```
+
+Arguments:
+
+* **headers** `Headers`
+* **name** `string`
+* **attributes** `{ path?: string, domain?: string }` (optional)
+
+Returns: `void`
+
+## `getCookies(headers)`
+
+Parses the `Cookie` header and returns a list of attributes and values.
+
+```js
+import { getCookies, Headers } from 'undici'
+
+const headers = new Headers({
+ cookie: 'get=cookies; and=attributes'
+})
+
+console.log(getCookies(headers)) // { get: 'cookies', and: 'attributes' }
+```
+
+Arguments:
+
+* **headers** `Headers`
+
+Returns: `Record<string, string>`
+
+## `getSetCookies(headers)`
+
+Parses all `Set-Cookie` headers.
+
+```js
+import { getSetCookies, Headers } from 'undici'
+
+const headers = new Headers({ 'set-cookie': 'undici=getSetCookies; Secure' })
+
+console.log(getSetCookies(headers))
+// [
+// {
+// name: 'undici',
+// value: 'getSetCookies',
+// secure: true
+// }
+// ]
+
+```
+
+Arguments:
+
+* **headers** `Headers`
+
+Returns: `Cookie[]`
+
+## `setCookie(headers, cookie)`
+
+Appends a cookie to the `Set-Cookie` header.
+
+```js
+import { setCookie, Headers } from 'undici'
+
+const headers = new Headers()
+setCookie(headers, { name: 'undici', value: 'setCookie' })
+
+console.log(headers.get('Set-Cookie')) // undici=setCookie
+```
+
+Arguments:
+
+* **headers** `Headers`
+* **cookie** `Cookie`
+
+Returns: `void`
diff --git a/node_modules/undici/docs/api/DiagnosticsChannel.md b/node_modules/undici/docs/api/DiagnosticsChannel.md
new file mode 100644
index 0000000..0aa0b9a
--- /dev/null
+++ b/node_modules/undici/docs/api/DiagnosticsChannel.md
@@ -0,0 +1,204 @@
+# Diagnostics Channel Support
+
+Stability: Experimental.
+
+Undici supports the [`diagnostics_channel`](https://nodejs.org/api/diagnostics_channel.html) (currently available only on Node.js v16+).
+It is the preferred way to instrument Undici and retrieve internal information.
+
+The channels available are the following.
+
+## `undici:request:create`
+
+This message is published when a new outgoing request is created.
+
+```js
+import diagnosticsChannel from 'diagnostics_channel'
+
+diagnosticsChannel.channel('undici:request:create').subscribe(({ request }) => {
+ console.log('origin', request.origin)
+ console.log('completed', request.completed)
+ console.log('method', request.method)
+ console.log('path', request.path)
+ console.log('headers') // raw text, e.g: 'bar: bar\r\n'
+ request.addHeader('hello', 'world')
+ console.log('headers', request.headers) // e.g. 'bar: bar\r\nhello: world\r\n'
+})
+```
+
+Note: a request is only loosely completed to a given socket.
+
+
+## `undici:request:bodySent`
+
+```js
+import diagnosticsChannel from 'diagnostics_channel'
+
+diagnosticsChannel.channel('undici:request:bodySent').subscribe(({ request }) => {
+ // request is the same object undici:request:create
+})
+```
+
+## `undici:request:headers`
+
+This message is published after the response headers have been received, i.e. the response has been completed.
+
+```js
+import diagnosticsChannel from 'diagnostics_channel'
+
+diagnosticsChannel.channel('undici:request:headers').subscribe(({ request, response }) => {
+ // request is the same object undici:request:create
+ console.log('statusCode', response.statusCode)
+ console.log(response.statusText)
+ // response.headers are buffers.
+ console.log(response.headers.map((x) => x.toString()))
+})
+```
+
+## `undici:request:trailers`
+
+This message is published after the response body and trailers have been received, i.e. the response has been completed.
+
+```js
+import diagnosticsChannel from 'diagnostics_channel'
+
+diagnosticsChannel.channel('undici:request:trailers').subscribe(({ request, trailers }) => {
+ // request is the same object undici:request:create
+ console.log('completed', request.completed)
+ // trailers are buffers.
+ console.log(trailers.map((x) => x.toString()))
+})
+```
+
+## `undici:request:error`
+
+This message is published if the request is going to error, but it has not errored yet.
+
+```js
+import diagnosticsChannel from 'diagnostics_channel'
+
+diagnosticsChannel.channel('undici:request:error').subscribe(({ request, error }) => {
+ // request is the same object undici:request:create
+})
+```
+
+## `undici:client:sendHeaders`
+
+This message is published right before the first byte of the request is written to the socket.
+
+*Note*: It will publish the exact headers that will be sent to the server in raw format.
+
+```js
+import diagnosticsChannel from 'diagnostics_channel'
+
+diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(({ request, headers, socket }) => {
+ // request is the same object undici:request:create
+ console.log(`Full headers list ${headers.split('\r\n')}`);
+})
+```
+
+## `undici:client:beforeConnect`
+
+This message is published before creating a new connection for **any** request.
+You can not assume that this event is related to any specific request.
+
+```js
+import diagnosticsChannel from 'diagnostics_channel'
+
+diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(({ connectParams, connector }) => {
+ // const { host, hostname, protocol, port, servername } = connectParams
+ // connector is a function that creates the socket
+})
+```
+
+## `undici:client:connected`
+
+This message is published after a connection is established.
+
+```js
+import diagnosticsChannel from 'diagnostics_channel'
+
+diagnosticsChannel.channel('undici:client:connected').subscribe(({ socket, connectParams, connector }) => {
+ // const { host, hostname, protocol, port, servername } = connectParams
+ // connector is a function that creates the socket
+})
+```
+
+## `undici:client:connectError`
+
+This message is published if it did not succeed to create new connection
+
+```js
+import diagnosticsChannel from 'diagnostics_channel'
+
+diagnosticsChannel.channel('undici:client:connectError').subscribe(({ error, socket, connectParams, connector }) => {
+ // const { host, hostname, protocol, port, servername } = connectParams
+ // connector is a function that creates the socket
+ console.log(`Connect failed with ${error.message}`)
+})
+```
+
+## `undici:websocket:open`
+
+This message is published after the client has successfully connected to a server.
+
+```js
+import diagnosticsChannel from 'diagnostics_channel'
+
+diagnosticsChannel.channel('undici:websocket:open').subscribe(({ address, protocol, extensions }) => {
+ console.log(address) // address, family, and port
+ console.log(protocol) // negotiated subprotocols
+ console.log(extensions) // negotiated extensions
+})
+```
+
+## `undici:websocket:close`
+
+This message is published after the connection has closed.
+
+```js
+import diagnosticsChannel from 'diagnostics_channel'
+
+diagnosticsChannel.channel('undici:websocket:close').subscribe(({ websocket, code, reason }) => {
+ console.log(websocket) // the WebSocket object
+ console.log(code) // the closing status code
+ console.log(reason) // the closing reason
+})
+```
+
+## `undici:websocket:socket_error`
+
+This message is published if the socket experiences an error.
+
+```js
+import diagnosticsChannel from 'diagnostics_channel'
+
+diagnosticsChannel.channel('undici:websocket:socket_error').subscribe((error) => {
+ console.log(error)
+})
+```
+
+## `undici:websocket:ping`
+
+This message is published after the client receives a ping frame, if the connection is not closing.
+
+```js
+import diagnosticsChannel from 'diagnostics_channel'
+
+diagnosticsChannel.channel('undici:websocket:ping').subscribe(({ payload }) => {
+ // a Buffer or undefined, containing the optional application data of the frame
+ console.log(payload)
+})
+```
+
+## `undici:websocket:pong`
+
+This message is published after the client receives a pong frame.
+
+```js
+import diagnosticsChannel from 'diagnostics_channel'
+
+diagnosticsChannel.channel('undici:websocket:pong').subscribe(({ payload }) => {
+ // a Buffer or undefined, containing the optional application data of the frame
+ console.log(payload)
+})
+```
diff --git a/node_modules/undici/docs/api/DispatchInterceptor.md b/node_modules/undici/docs/api/DispatchInterceptor.md
new file mode 100644
index 0000000..652b2e8
--- /dev/null
+++ b/node_modules/undici/docs/api/DispatchInterceptor.md
@@ -0,0 +1,60 @@
+#Interface: DispatchInterceptor
+
+Extends: `Function`
+
+A function that can be applied to the `Dispatcher.Dispatch` function before it is invoked with a dispatch request.
+
+This allows one to write logic to intercept both the outgoing request, and the incoming response.
+
+### Parameter: `Dispatcher.Dispatch`
+
+The base dispatch function you are decorating.
+
+### ReturnType: `Dispatcher.Dispatch`
+
+A dispatch function that has been altered to provide additional logic
+
+### Basic Example
+
+Here is an example of an interceptor being used to provide a JWT bearer token
+
+```js
+'use strict'
+
+const insertHeaderInterceptor = dispatch => {
+ return function InterceptedDispatch(opts, handler){
+ opts.headers.push('Authorization', 'Bearer [Some token]')
+ return dispatch(opts, handler)
+ }
+}
+
+const client = new Client('https://localhost:3000', {
+ interceptors: { Client: [insertHeaderInterceptor] }
+})
+
+```
+
+### Basic Example 2
+
+Here is a contrived example of an interceptor stripping the headers from a response.
+
+```js
+'use strict'
+
+const clearHeadersInterceptor = dispatch => {
+ const { DecoratorHandler } = require('undici')
+ class ResultInterceptor extends DecoratorHandler {
+ onHeaders (statusCode, headers, resume) {
+ return super.onHeaders(statusCode, [], resume)
+ }
+ }
+ return function InterceptedDispatch(opts, handler){
+ return dispatch(opts, new ResultInterceptor(handler))
+ }
+}
+
+const client = new Client('https://localhost:3000', {
+ interceptors: { Client: [clearHeadersInterceptor] }
+})
+
+```
diff --git a/node_modules/undici/docs/api/Dispatcher.md b/node_modules/undici/docs/api/Dispatcher.md
new file mode 100644
index 0000000..a506429
--- /dev/null
+++ b/node_modules/undici/docs/api/Dispatcher.md
@@ -0,0 +1,886 @@
+# Dispatcher
+
+Extends: `events.EventEmitter`
+
+Dispatcher is the core API used to dispatch requests.
+
+Requests are not guaranteed to be dispatched in order of invocation.
+
+## Instance Methods
+
+### `Dispatcher.close([callback]): Promise`
+
+Closes the dispatcher and gracefully waits for enqueued requests to complete before resolving.
+
+Arguments:
+
+* **callback** `(error: Error | null, data: null) => void` (optional)
+
+Returns: `void | Promise<null>` - Only returns a `Promise` if no `callback` argument was passed
+
+```js
+dispatcher.close() // -> Promise
+dispatcher.close(() => {}) // -> void
+```
+
+#### Example - Request resolves before Client closes
+
+```js
+import { createServer } from 'http'
+import { Client } from 'undici'
+import { once } from 'events'
+
+const server = createServer((request, response) => {
+ response.end('undici')
+}).listen()
+
+await once(server, 'listening')
+
+const client = new Client(`http://localhost:${server.address().port}`)
+
+try {
+ const { body } = await client.request({
+ path: '/',
+ method: 'GET'
+ })
+ body.setEncoding('utf8')
+ body.on('data', console.log)
+} catch (error) {}
+
+await client.close()
+
+console.log('Client closed')
+server.close()
+```
+
+### `Dispatcher.connect(options[, callback])`
+
+Starts two-way communications with the requested resource using [HTTP CONNECT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT).
+
+Arguments:
+
+* **options** `ConnectOptions`
+* **callback** `(err: Error | null, data: ConnectData | null) => void` (optional)
+
+Returns: `void | Promise<ConnectData>` - Only returns a `Promise` if no `callback` argument was passed
+
+#### Parameter: `ConnectOptions`
+
+* **path** `string`
+* **headers** `UndiciHeaders` (optional) - Default: `null`
+* **signal** `AbortSignal | events.EventEmitter | null` (optional) - Default: `null`
+* **opaque** `unknown` (optional) - This argument parameter is passed through to `ConnectData`
+
+#### Parameter: `ConnectData`
+
+* **statusCode** `number`
+* **headers** `Record<string, string | string[] | undefined>`
+* **socket** `stream.Duplex`
+* **opaque** `unknown`
+
+#### Example - Connect request with echo
+
+```js
+import { createServer } from 'http'
+import { Client } from 'undici'
+import { once } from 'events'
+
+const server = createServer((request, response) => {
+ throw Error('should never get here')
+}).listen()
+
+server.on('connect', (req, socket, head) => {
+ socket.write('HTTP/1.1 200 Connection established\r\n\r\n')
+
+ let data = head.toString()
+ socket.on('data', (buf) => {
+ data += buf.toString()
+ })
+
+ socket.on('end', () => {
+ socket.end(data)
+ })
+})
+
+await once(server, 'listening')
+
+const client = new Client(`http://localhost:${server.address().port}`)
+
+try {
+ const { socket } = await client.connect({
+ path: '/'
+ })
+ const wanted = 'Body'
+ let data = ''
+ socket.on('data', d => { data += d })
+ socket.on('end', () => {
+ console.log(`Data received: ${data.toString()} | Data wanted: ${wanted}`)
+ client.close()
+ server.close()
+ })
+ socket.write(wanted)
+ socket.end()
+} catch (error) { }
+```
+
+### `Dispatcher.destroy([error, callback]): Promise`
+
+Destroy the dispatcher abruptly with the given error. All the pending and running requests will be asynchronously aborted and error. Since this operation is asynchronously dispatched there might still be some progress on dispatched requests.
+
+Both arguments are optional; the method can be called in four different ways:
+
+Arguments:
+
+* **error** `Error | null` (optional)
+* **callback** `(error: Error | null, data: null) => void` (optional)
+
+Returns: `void | Promise<void>` - Only returns a `Promise` if no `callback` argument was passed
+
+```js
+dispatcher.destroy() // -> Promise
+dispatcher.destroy(new Error()) // -> Promise
+dispatcher.destroy(() => {}) // -> void
+dispatcher.destroy(new Error(), () => {}) // -> void
+```
+
+#### Example - Request is aborted when Client is destroyed
+
+```js
+import { createServer } from 'http'
+import { Client } from 'undici'
+import { once } from 'events'
+
+const server = createServer((request, response) => {
+ response.end()
+}).listen()
+
+await once(server, 'listening')
+
+const client = new Client(`http://localhost:${server.address().port}`)
+
+try {
+ const request = client.request({
+ path: '/',
+ method: 'GET'
+ })
+ client.destroy()
+ .then(() => {
+ console.log('Client destroyed')
+ server.close()
+ })
+ await request
+} catch (error) {
+ console.error(error)
+}
+```
+
+### `Dispatcher.dispatch(options, handler)`
+
+This is the low level API which all the preceding APIs are implemented on top of.
+This API is expected to evolve through semver-major versions and is less stable than the preceding higher level APIs.
+It is primarily intended for library developers who implement higher level APIs on top of this.
+
+Arguments:
+
+* **options** `DispatchOptions`
+* **handler** `DispatchHandler`
+
+Returns: `Boolean` - `false` if dispatcher is busy and further dispatch calls won't make any progress until the `'drain'` event has been emitted.
+
+#### Parameter: `DispatchOptions`
+
+* **origin** `string | URL`
+* **path** `string`
+* **method** `string`
+* **reset** `boolean` (optional) - Default: `false` - If `false`, the request will attempt to create a long-living connection by sending the `connection: keep-alive` header,otherwise will attempt to close it immediately after response by sending `connection: close` within the request and closing the socket afterwards.
+* **body** `string | Buffer | Uint8Array | stream.Readable | Iterable | AsyncIterable | null` (optional) - Default: `null`
+* **headers** `UndiciHeaders | string[]` (optional) - Default: `null`.
+* **query** `Record<string, any> | null` (optional) - Default: `null` - Query string params to be embedded in the request URL. Note that both keys and values of query are encoded using `encodeURIComponent`. If for some reason you need to send them unencoded, embed query params into path directly instead.
+* **idempotent** `boolean` (optional) - Default: `true` if `method` is `'HEAD'` or `'GET'` - Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline has completed.
+* **blocking** `boolean` (optional) - Default: `false` - Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received.
+* **upgrade** `string | null` (optional) - Default: `null` - Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`.
+* **bodyTimeout** `number | null` (optional) - The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Defaults to 300 seconds.
+* **headersTimeout** `number | null` (optional) - The amount of time the parser will wait to receive the complete HTTP headers while not sending the request. Defaults to 300 seconds.
+* **throwOnError** `boolean` (optional) - Default: `false` - Whether Undici should throw an error upon receiving a 4xx or 5xx response from the server.
+
+#### Parameter: `DispatchHandler`
+
+* **onConnect** `(abort: () => void, context: object) => void` - Invoked before request is dispatched on socket. May be invoked multiple times when a request is retried when the request at the head of the pipeline fails.
+* **onError** `(error: Error) => void` - Invoked when an error has occurred. May not throw.
+* **onUpgrade** `(statusCode: number, headers: Buffer[], socket: Duplex) => void` (optional) - Invoked when request is upgraded. Required if `DispatchOptions.upgrade` is defined or `DispatchOptions.method === 'CONNECT'`.
+* **onHeaders** `(statusCode: number, headers: Buffer[], resume: () => void, statusText: string) => boolean` - Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. Not required for `upgrade` requests.
+* **onData** `(chunk: Buffer) => boolean` - Invoked when response payload data is received. Not required for `upgrade` requests.
+* **onComplete** `(trailers: Buffer[]) => void` - Invoked when response payload and trailers have been received and the request has completed. Not required for `upgrade` requests.
+* **onBodySent** `(chunk: string | Buffer | Uint8Array) => void` - Invoked when a body chunk is sent to the server. Not required. For a stream or iterable body this will be invoked for every chunk. For other body types, it will be invoked once after the body is sent.
+
+#### Example 1 - Dispatch GET request
+
+```js
+import { createServer } from 'http'
+import { Client } from 'undici'
+import { once } from 'events'
+
+const server = createServer((request, response) => {
+ response.end('Hello, World!')
+}).listen()
+
+await once(server, 'listening')
+
+const client = new Client(`http://localhost:${server.address().port}`)
+
+const data = []
+
+client.dispatch({
+ path: '/',
+ method: 'GET',
+ headers: {
+ 'x-foo': 'bar'
+ }
+}, {
+ onConnect: () => {
+ console.log('Connected!')
+ },
+ onError: (error) => {
+ console.error(error)
+ },
+ onHeaders: (statusCode, headers) => {
+ console.log(`onHeaders | statusCode: ${statusCode} | headers: ${headers}`)
+ },
+ onData: (chunk) => {
+ console.log('onData: chunk received')
+ data.push(chunk)
+ },
+ onComplete: (trailers) => {
+ console.log(`onComplete | trailers: ${trailers}`)
+ const res = Buffer.concat(data).toString('utf8')
+ console.log(`Data: ${res}`)
+ client.close()
+ server.close()
+ }
+})
+```
+
+#### Example 2 - Dispatch Upgrade Request
+
+```js
+import { createServer } from 'http'
+import { Client } from 'undici'
+import { once } from 'events'
+
+const server = createServer((request, response) => {
+ response.end()
+}).listen()
+
+await once(server, 'listening')
+
+server.on('upgrade', (request, socket, head) => {
+ console.log('Node.js Server - upgrade event')
+ socket.write('HTTP/1.1 101 Web Socket Protocol Handshake\r\n')
+ socket.write('Upgrade: WebSocket\r\n')
+ socket.write('Connection: Upgrade\r\n')
+ socket.write('\r\n')
+ socket.end()
+})
+
+const client = new Client(`http://localhost:${server.address().port}`)
+
+client.dispatch({
+ path: '/',
+ method: 'GET',
+ upgrade: 'websocket'
+}, {
+ onConnect: () => {
+ console.log('Undici Client - onConnect')
+ },
+ onError: (error) => {
+ console.log('onError') // shouldn't print
+ },
+ onUpgrade: (statusCode, headers, socket) => {
+ console.log('Undici Client - onUpgrade')
+ console.log(`onUpgrade Headers: ${headers}`)
+ socket.on('data', buffer => {
+ console.log(buffer.toString('utf8'))
+ })
+ socket.on('end', () => {
+ client.close()
+ server.close()
+ })
+ socket.end()
+ }
+})
+```
+
+#### Example 3 - Dispatch POST request
+
+```js
+import { createServer } from 'http'
+import { Client } from 'undici'
+import { once } from 'events'
+
+const server = createServer((request, response) => {
+ request.on('data', (data) => {
+ console.log(`Request Data: ${data.toString('utf8')}`)
+ const body = JSON.parse(data)
+ body.message = 'World'
+ response.end(JSON.stringify(body))
+ })
+}).listen()
+
+await once(server, 'listening')
+
+const client = new Client(`http://localhost:${server.address().port}`)
+
+const data = []
+
+client.dispatch({
+ path: '/',
+ method: 'POST',
+ headers: {
+ 'content-type': 'application/json'
+ },
+ body: JSON.stringify({ message: 'Hello' })
+}, {
+ onConnect: () => {
+ console.log('Connected!')
+ },
+ onError: (error) => {
+ console.error(error)
+ },
+ onHeaders: (statusCode, headers) => {
+ console.log(`onHeaders | statusCode: ${statusCode} | headers: ${headers}`)
+ },
+ onData: (chunk) => {
+ console.log('onData: chunk received')
+ data.push(chunk)
+ },
+ onComplete: (trailers) => {
+ console.log(`onComplete | trailers: ${trailers}`)
+ const res = Buffer.concat(data).toString('utf8')
+ console.log(`Response Data: ${res}`)
+ client.close()
+ server.close()
+ }
+})
+```
+
+### `Dispatcher.pipeline(options, handler)`
+
+For easy use with [stream.pipeline](https://nodejs.org/api/stream.html#stream_stream_pipeline_source_transforms_destination_callback). The `handler` argument should return a `Readable` from which the result will be read. Usually it should just return the `body` argument unless some kind of transformation needs to be performed based on e.g. `headers` or `statusCode`. The `handler` should validate the response and save any required state. If there is an error, it should be thrown. The function returns a `Duplex` which writes to the request and reads from the response.
+
+Arguments:
+
+* **options** `PipelineOptions`
+* **handler** `(data: PipelineHandlerData) => stream.Readable`
+
+Returns: `stream.Duplex`
+
+#### Parameter: PipelineOptions
+
+Extends: [`RequestOptions`](#parameter-requestoptions)
+
+* **objectMode** `boolean` (optional) - Default: `false` - Set to `true` if the `handler` will return an object stream.
+
+#### Parameter: PipelineHandlerData
+
+* **statusCode** `number`
+* **headers** `Record<string, string | string[] | undefined>`
+* **opaque** `unknown`
+* **body** `stream.Readable`
+* **context** `object`
+* **onInfo** `({statusCode: number, headers: Record<string, string | string[]>}) => void | null` (optional) - Default: `null` - Callback collecting all the info headers (HTTP 100-199) received.
+
+#### Example 1 - Pipeline Echo
+
+```js
+import { Readable, Writable, PassThrough, pipeline } from 'stream'
+import { createServer } from 'http'
+import { Client } from 'undici'
+import { once } from 'events'
+
+const server = createServer((request, response) => {
+ request.pipe(response)
+}).listen()
+
+await once(server, 'listening')
+
+const client = new Client(`http://localhost:${server.address().port}`)
+
+let res = ''
+
+pipeline(
+ new Readable({
+ read () {
+ this.push(Buffer.from('undici'))
+ this.push(null)
+ }
+ }),
+ client.pipeline({
+ path: '/',
+ method: 'GET'
+ }, ({ statusCode, headers, body }) => {
+ console.log(`response received ${statusCode}`)
+ console.log('headers', headers)
+ return pipeline(body, new PassThrough(), () => {})
+ }),
+ new Writable({
+ write (chunk, _, callback) {
+ res += chunk.toString()
+ callback()
+ },
+ final (callback) {
+ console.log(`Response pipelined to writable: ${res}`)
+ callback()
+ }
+ }),
+ error => {
+ if (error) {
+ console.error(error)
+ }
+
+ client.close()
+ server.close()
+ }
+)
+```
+
+### `Dispatcher.request(options[, callback])`
+
+Performs a HTTP request.
+
+Non-idempotent requests will not be pipelined in order
+to avoid indirect failures.
+
+Idempotent requests will be automatically retried if
+they fail due to indirect failure from the request
+at the head of the pipeline. This does not apply to
+idempotent requests with a stream request body.
+
+All response bodies must always be fully consumed or destroyed.
+
+Arguments:
+
+* **options** `RequestOptions`
+* **callback** `(error: Error | null, data: ResponseData) => void` (optional)
+
+Returns: `void | Promise<ResponseData>` - Only returns a `Promise` if no `callback` argument was passed.
+
+#### Parameter: `RequestOptions`
+
+Extends: [`DispatchOptions`](#parameter-dispatchoptions)
+
+* **opaque** `unknown` (optional) - Default: `null` - Used for passing through context to `ResponseData`.
+* **signal** `AbortSignal | events.EventEmitter | null` (optional) - Default: `null`.
+* **onInfo** `({statusCode: number, headers: Record<string, string | string[]>}) => void | null` (optional) - Default: `null` - Callback collecting all the info headers (HTTP 100-199) received.
+
+The `RequestOptions.method` property should not be value `'CONNECT'`.
+
+#### Parameter: `ResponseData`
+
+* **statusCode** `number`
+* **headers** `Record<string, string | string[]>` - Note that all header keys are lower-cased, e. g. `content-type`.
+* **body** `stream.Readable` which also implements [the body mixin from the Fetch Standard](https://fetch.spec.whatwg.org/#body-mixin).
+* **trailers** `Record<string, string>` - This object starts out
+ as empty and will be mutated to contain trailers after `body` has emitted `'end'`.
+* **opaque** `unknown`
+* **context** `object`
+
+`body` contains the following additional [body mixin](https://fetch.spec.whatwg.org/#body-mixin) methods and properties:
+
+- `text()`
+- `json()`
+- `arrayBuffer()`
+- `body`
+- `bodyUsed`
+
+`body` can not be consumed twice. For example, calling `text()` after `json()` throws `TypeError`.
+
+`body` contains the following additional extensions:
+
+- `dump({ limit: Integer })`, dump the response by reading up to `limit` bytes without killing the socket (optional) - Default: 262144.
+
+Note that body will still be a `Readable` even if it is empty, but attempting to deserialize it with `json()` will result in an exception. Recommended way to ensure there is a body to deserialize is to check if status code is not 204, and `content-type` header starts with `application/json`.
+
+#### Example 1 - Basic GET Request
+
+```js
+import { createServer } from 'http'
+import { Client } from 'undici'
+import { once } from 'events'
+
+const server = createServer((request, response) => {
+ response.end('Hello, World!')
+}).listen()
+
+await once(server, 'listening')
+
+const client = new Client(`http://localhost:${server.address().port}`)
+
+try {
+ const { body, headers, statusCode, trailers } = await client.request({
+ path: '/',
+ method: 'GET'
+ })
+ console.log(`response received ${statusCode}`)
+ console.log('headers', headers)
+ body.setEncoding('utf8')
+ body.on('data', console.log)
+ body.on('end', () => {
+ console.log('trailers', trailers)
+ })
+
+ client.close()
+ server.close()
+} catch (error) {
+ console.error(error)
+}
+```
+
+#### Example 2 - Aborting a request
+
+> Node.js v15+ is required to run this example
+
+```js
+import { createServer } from 'http'
+import { Client } from 'undici'
+import { once } from 'events'
+
+const server = createServer((request, response) => {
+ response.end('Hello, World!')
+}).listen()
+
+await once(server, 'listening')
+
+const client = new Client(`http://localhost:${server.address().port}`)
+const abortController = new AbortController()
+
+try {
+ client.request({
+ path: '/',
+ method: 'GET',
+ signal: abortController.signal
+ })
+} catch (error) {
+ console.error(error) // should print an RequestAbortedError
+ client.close()
+ server.close()
+}
+
+abortController.abort()
+```
+
+Alternatively, any `EventEmitter` that emits an `'abort'` event may be used as an abort controller:
+
+```js
+import { createServer } from 'http'
+import { Client } from 'undici'
+import EventEmitter, { once } from 'events'
+
+const server = createServer((request, response) => {
+ response.end('Hello, World!')
+}).listen()
+
+await once(server, 'listening')
+
+const client = new Client(`http://localhost:${server.address().port}`)
+const ee = new EventEmitter()
+
+try {
+ client.request({
+ path: '/',
+ method: 'GET',
+ signal: ee
+ })
+} catch (error) {
+ console.error(error) // should print an RequestAbortedError
+ client.close()
+ server.close()
+}
+
+ee.emit('abort')
+```
+
+Destroying the request or response body will have the same effect.
+
+```js
+import { createServer } from 'http'
+import { Client } from 'undici'
+import { once } from 'events'
+
+const server = createServer((request, response) => {
+ response.end('Hello, World!')
+}).listen()
+
+await once(server, 'listening')
+
+const client = new Client(`http://localhost:${server.address().port}`)
+
+try {
+ const { body } = await client.request({
+ path: '/',
+ method: 'GET'
+ })
+ body.destroy()
+} catch (error) {
+ console.error(error) // should print an RequestAbortedError
+ client.close()
+ server.close()
+}
+```
+
+### `Dispatcher.stream(options, factory[, callback])`
+
+A faster version of `Dispatcher.request`. This method expects the second argument `factory` to return a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable) stream which the response will be written to. This improves performance by avoiding creating an intermediate [`stream.Readable`](https://nodejs.org/api/stream.html#stream_readable_streams) stream when the user expects to directly pipe the response body to a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable) stream.
+
+As demonstrated in [Example 1 - Basic GET stream request](#example-1---basic-get-stream-request), it is recommended to use the `option.opaque` property to avoid creating a closure for the `factory` method. This pattern works well with Node.js Web Frameworks such as [Fastify](https://fastify.io). See [Example 2 - Stream to Fastify Response](#example-2---stream-to-fastify-response) for more details.
+
+Arguments:
+
+* **options** `RequestOptions`
+* **factory** `(data: StreamFactoryData) => stream.Writable`
+* **callback** `(error: Error | null, data: StreamData) => void` (optional)
+
+Returns: `void | Promise<StreamData>` - Only returns a `Promise` if no `callback` argument was passed
+
+#### Parameter: `StreamFactoryData`
+
+* **statusCode** `number`
+* **headers** `Record<string, string | string[] | undefined>`
+* **opaque** `unknown`
+* **onInfo** `({statusCode: number, headers: Record<string, string | string[]>}) => void | null` (optional) - Default: `null` - Callback collecting all the info headers (HTTP 100-199) received.
+
+#### Parameter: `StreamData`
+
+* **opaque** `unknown`
+* **trailers** `Record<string, string>`
+* **context** `object`
+
+#### Example 1 - Basic GET stream request
+
+```js
+import { createServer } from 'http'
+import { Client } from 'undici'
+import { once } from 'events'
+import { Writable } from 'stream'
+
+const server = createServer((request, response) => {
+ response.end('Hello, World!')
+}).listen()
+
+await once(server, 'listening')
+
+const client = new Client(`http://localhost:${server.address().port}`)
+
+const bufs = []
+
+try {
+ await client.stream({
+ path: '/',
+ method: 'GET',
+ opaque: { bufs }
+ }, ({ statusCode, headers, opaque: { bufs } }) => {
+ console.log(`response received ${statusCode}`)
+ console.log('headers', headers)
+ return new Writable({
+ write (chunk, encoding, callback) {
+ bufs.push(chunk)
+ callback()
+ }
+ })
+ })
+
+ console.log(Buffer.concat(bufs).toString('utf-8'))
+
+ client.close()
+ server.close()
+} catch (error) {
+ console.error(error)
+}
+```
+
+#### Example 2 - Stream to Fastify Response
+
+In this example, a (fake) request is made to the fastify server using `fastify.inject()`. This request then executes the fastify route handler which makes a subsequent request to the raw Node.js http server using `undici.dispatcher.stream()`. The fastify response is passed to the `opaque` option so that undici can tap into the underlying writable stream using `response.raw`. This methodology demonstrates how one could use undici and fastify together to create fast-as-possible requests from one backend server to another.
+
+```js
+import { createServer } from 'http'
+import { Client } from 'undici'
+import { once } from 'events'
+import fastify from 'fastify'
+
+const nodeServer = createServer((request, response) => {
+ response.end('Hello, World! From Node.js HTTP Server')
+}).listen()
+
+await once(nodeServer, 'listening')
+
+console.log('Node Server listening')
+
+const nodeServerUndiciClient = new Client(`http://localhost:${nodeServer.address().port}`)
+
+const fastifyServer = fastify()
+
+fastifyServer.route({
+ url: '/',
+ method: 'GET',
+ handler: (request, response) => {
+ nodeServerUndiciClient.stream({
+ path: '/',
+ method: 'GET',
+ opaque: response
+ }, ({ opaque }) => opaque.raw)
+ }
+})
+
+await fastifyServer.listen()
+
+console.log('Fastify Server listening')
+
+const fastifyServerUndiciClient = new Client(`http://localhost:${fastifyServer.server.address().port}`)
+
+try {
+ const { statusCode, body } = await fastifyServerUndiciClient.request({
+ path: '/',
+ method: 'GET'
+ })
+
+ console.log(`response received ${statusCode}`)
+ body.setEncoding('utf8')
+ body.on('data', console.log)
+
+ nodeServerUndiciClient.close()
+ fastifyServerUndiciClient.close()
+ fastifyServer.close()
+ nodeServer.close()
+} catch (error) { }
+```
+
+### `Dispatcher.upgrade(options[, callback])`
+
+Upgrade to a different protocol. Visit [MDN - HTTP - Protocol upgrade mechanism](https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism) for more details.
+
+Arguments:
+
+* **options** `UpgradeOptions`
+
+* **callback** `(error: Error | null, data: UpgradeData) => void` (optional)
+
+Returns: `void | Promise<UpgradeData>` - Only returns a `Promise` if no `callback` argument was passed
+
+#### Parameter: `UpgradeOptions`
+
+* **path** `string`
+* **method** `string` (optional) - Default: `'GET'`
+* **headers** `UndiciHeaders` (optional) - Default: `null`
+* **protocol** `string` (optional) - Default: `'Websocket'` - A string of comma separated protocols, in descending preference order.
+* **signal** `AbortSignal | EventEmitter | null` (optional) - Default: `null`
+
+#### Parameter: `UpgradeData`
+
+* **headers** `http.IncomingHeaders`
+* **socket** `stream.Duplex`
+* **opaque** `unknown`
+
+#### Example 1 - Basic Upgrade Request
+
+```js
+import { createServer } from 'http'
+import { Client } from 'undici'
+import { once } from 'events'
+
+const server = createServer((request, response) => {
+ response.statusCode = 101
+ response.setHeader('connection', 'upgrade')
+ response.setHeader('upgrade', request.headers.upgrade)
+ response.end()
+}).listen()
+
+await once(server, 'listening')
+
+const client = new Client(`http://localhost:${server.address().port}`)
+
+try {
+ const { headers, socket } = await client.upgrade({
+ path: '/',
+ })
+ socket.on('end', () => {
+ console.log(`upgrade: ${headers.upgrade}`) // upgrade: Websocket
+ client.close()
+ server.close()
+ })
+ socket.end()
+} catch (error) {
+ console.error(error)
+ client.close()
+ server.close()
+}
+```
+
+## Instance Events
+
+### Event: `'connect'`
+
+Parameters:
+
+* **origin** `URL`
+* **targets** `Array<Dispatcher>`
+
+### Event: `'disconnect'`
+
+Parameters:
+
+* **origin** `URL`
+* **targets** `Array<Dispatcher>`
+* **error** `Error`
+
+### Event: `'connectionError'`
+
+Parameters:
+
+* **origin** `URL`
+* **targets** `Array<Dispatcher>`
+* **error** `Error`
+
+Emitted when dispatcher fails to connect to
+origin.
+
+### Event: `'drain'`
+
+Parameters:
+
+* **origin** `URL`
+
+Emitted when dispatcher is no longer busy.
+
+## Parameter: `UndiciHeaders`
+
+* `Record<string, string | string[] | undefined> | string[] | null`
+
+Header arguments such as `options.headers` in [`Client.dispatch`](Client.md#clientdispatchoptions-handlers) can be specified in two forms; either as an object specified by the `Record<string, string | string[] | undefined>` (`IncomingHttpHeaders`) type, or an array of strings. An array representation of a header list must have an even length or an `InvalidArgumentError` will be thrown.
+
+Keys are lowercase and values are not modified.
+
+Response headers will derive a `host` from the `url` of the [Client](Client.md#class-client) instance if no `host` header was previously specified.
+
+### Example 1 - Object
+
+```js
+{
+ 'content-length': '123',
+ 'content-type': 'text/plain',
+ connection: 'keep-alive',
+ host: 'mysite.com',
+ accept: '*/*'
+}
+```
+
+### Example 2 - Array
+
+```js
+[
+ 'content-length', '123',
+ 'content-type', 'text/plain',
+ 'connection', 'keep-alive',
+ 'host', 'mysite.com',
+ 'accept', '*/*'
+]
+```
diff --git a/node_modules/undici/docs/api/Errors.md b/node_modules/undici/docs/api/Errors.md
new file mode 100644
index 0000000..917e45d
--- /dev/null
+++ b/node_modules/undici/docs/api/Errors.md
@@ -0,0 +1,47 @@
+# Errors
+
+Undici exposes a variety of error objects that you can use to enhance your error handling.
+You can find all the error objects inside the `errors` key.
+
+```js
+import { errors } from 'undici'
+```
+
+| Error | Error Codes | Description |
+| ------------------------------------ | ------------------------------------- | ------------------------------------------------------------------------- |
+| `UndiciError` | `UND_ERR` | all errors below are extended from `UndiciError`. |
+| `ConnectTimeoutError` | `UND_ERR_CONNECT_TIMEOUT` | socket is destroyed due to connect timeout. |
+| `HeadersTimeoutError` | `UND_ERR_HEADERS_TIMEOUT` | socket is destroyed due to headers timeout. |
+| `HeadersOverflowError` | `UND_ERR_HEADERS_OVERFLOW` | socket is destroyed due to headers' max size being exceeded. |
+| `BodyTimeoutError` | `UND_ERR_BODY_TIMEOUT` | socket is destroyed due to body timeout. |
+| `ResponseStatusCodeError` | `UND_ERR_RESPONSE_STATUS_CODE` | an error is thrown when `throwOnError` is `true` for status codes >= 400. |
+| `InvalidArgumentError` | `UND_ERR_INVALID_ARG` | passed an invalid argument. |
+| `InvalidReturnValueError` | `UND_ERR_INVALID_RETURN_VALUE` | returned an invalid value. |
+| `RequestAbortedError` | `UND_ERR_ABORTED` | the request has been aborted by the user |
+| `ClientDestroyedError` | `UND_ERR_DESTROYED` | trying to use a destroyed client. |
+| `ClientClosedError` | `UND_ERR_CLOSED` | trying to use a closed client. |
+| `SocketError` | `UND_ERR_SOCKET` | there is an error with the socket. |
+| `NotSupportedError` | `UND_ERR_NOT_SUPPORTED` | encountered unsupported functionality. |
+| `RequestContentLengthMismatchError` | `UND_ERR_REQ_CONTENT_LENGTH_MISMATCH` | request body does not match content-length header |
+| `ResponseContentLengthMismatchError` | `UND_ERR_RES_CONTENT_LENGTH_MISMATCH` | response body does not match content-length header |
+| `InformationalError` | `UND_ERR_INFO` | expected error with reason |
+| `ResponseExceededMaxSizeError` | `UND_ERR_RES_EXCEEDED_MAX_SIZE` | response body exceed the max size allowed |
+
+### `SocketError`
+
+The `SocketError` has a `.socket` property which holds socket metadata:
+
+```ts
+interface SocketInfo {
+ localAddress?: string
+ localPort?: number
+ remoteAddress?: string
+ remotePort?: number
+ remoteFamily?: string
+ timeout?: number
+ bytesWritten?: number
+ bytesRead?: number
+}
+```
+
+Be aware that in some cases the `.socket` property can be `null`.
diff --git a/node_modules/undici/docs/api/Fetch.md b/node_modules/undici/docs/api/Fetch.md
new file mode 100644
index 0000000..b5a6242
--- /dev/null
+++ b/node_modules/undici/docs/api/Fetch.md
@@ -0,0 +1,27 @@
+# Fetch
+
+Undici exposes a fetch() method starts the process of fetching a resource from the network.
+
+Documentation and examples can be found on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
+
+## File
+
+This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/File)
+
+In Node versions v18.13.0 and above and v19.2.0 and above, undici will default to using Node's [File](https://nodejs.org/api/buffer.html#class-file) class. In versions where it's not available, it will default to the undici one.
+
+## FormData
+
+This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/FormData)
+
+## Response
+
+This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Response)
+
+## Request
+
+This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Request)
+
+## Header
+
+This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Headers)
diff --git a/node_modules/undici/docs/api/MockAgent.md b/node_modules/undici/docs/api/MockAgent.md
new file mode 100644
index 0000000..85ae690
--- /dev/null
+++ b/node_modules/undici/docs/api/MockAgent.md
@@ -0,0 +1,540 @@
+# Class: MockAgent
+
+Extends: `undici.Dispatcher`
+
+A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead.
+
+## `new MockAgent([options])`
+
+Arguments:
+
+* **options** `MockAgentOptions` (optional) - It extends the `Agent` options.
+
+Returns: `MockAgent`
+
+### Parameter: `MockAgentOptions`
+
+Extends: [`AgentOptions`](Agent.md#parameter-agentoptions)
+
+* **agent** `Agent` (optional) - Default: `new Agent([options])` - a custom agent encapsulated by the MockAgent.
+
+### Example - Basic MockAgent instantiation
+
+This will instantiate the MockAgent. It will not do anything until registered as the agent to use with requests and mock interceptions are added.
+
+```js
+import { MockAgent } from 'undici'
+
+const mockAgent = new MockAgent()
+```
+
+### Example - Basic MockAgent instantiation with custom agent
+
+```js
+import { Agent, MockAgent } from 'undici'
+
+const agent = new Agent()
+
+const mockAgent = new MockAgent({ agent })
+```
+
+## Instance Methods
+
+### `MockAgent.get(origin)`
+
+This method creates and retrieves MockPool or MockClient instances which can then be used to intercept HTTP requests. If the number of connections on the mock agent is set to 1, a MockClient instance is returned. Otherwise a MockPool instance is returned.
+
+For subsequent `MockAgent.get` calls on the same origin, the same mock instance will be returned.
+
+Arguments:
+
+* **origin** `string | RegExp | (value) => boolean` - a matcher for the pool origin to be retrieved from the MockAgent.
+
+| Matcher type | Condition to pass |
+|:------------:| -------------------------- |
+| `string` | Exact match against string |
+| `RegExp` | Regex must pass |
+| `Function` | Function must return true |
+
+Returns: `MockClient | MockPool`.
+
+| `MockAgentOptions` | Mock instance returned |
+| -------------------- | ---------------------- |
+| `connections === 1` | `MockClient` |
+| `connections` > `1` | `MockPool` |
+
+#### Example - Basic Mocked Request
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+const mockPool = mockAgent.get('http://localhost:3000')
+mockPool.intercept({ path: '/foo' }).reply(200, 'foo')
+
+const { statusCode, body } = await request('http://localhost:3000/foo')
+
+console.log('response received', statusCode) // response received 200
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')) // data foo
+}
+```
+
+#### Example - Basic Mocked Request with local mock agent dispatcher
+
+```js
+import { MockAgent, request } from 'undici'
+
+const mockAgent = new MockAgent()
+
+const mockPool = mockAgent.get('http://localhost:3000')
+mockPool.intercept({ path: '/foo' }).reply(200, 'foo')
+
+const {
+ statusCode,
+ body
+} = await request('http://localhost:3000/foo', { dispatcher: mockAgent })
+
+console.log('response received', statusCode) // response received 200
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')) // data foo
+}
+```
+
+#### Example - Basic Mocked Request with local mock pool dispatcher
+
+```js
+import { MockAgent, request } from 'undici'
+
+const mockAgent = new MockAgent()
+
+const mockPool = mockAgent.get('http://localhost:3000')
+mockPool.intercept({ path: '/foo' }).reply(200, 'foo')
+
+const {
+ statusCode,
+ body
+} = await request('http://localhost:3000/foo', { dispatcher: mockPool })
+
+console.log('response received', statusCode) // response received 200
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')) // data foo
+}
+```
+
+#### Example - Basic Mocked Request with local mock client dispatcher
+
+```js
+import { MockAgent, request } from 'undici'
+
+const mockAgent = new MockAgent({ connections: 1 })
+
+const mockClient = mockAgent.get('http://localhost:3000')
+mockClient.intercept({ path: '/foo' }).reply(200, 'foo')
+
+const {
+ statusCode,
+ body
+} = await request('http://localhost:3000/foo', { dispatcher: mockClient })
+
+console.log('response received', statusCode) // response received 200
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')) // data foo
+}
+```
+
+#### Example - Basic Mocked requests with multiple intercepts
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+const mockPool = mockAgent.get('http://localhost:3000')
+mockPool.intercept({ path: '/foo' }).reply(200, 'foo')
+mockPool.intercept({ path: '/hello'}).reply(200, 'hello')
+
+const result1 = await request('http://localhost:3000/foo')
+
+console.log('response received', result1.statusCode) // response received 200
+
+for await (const data of result1.body) {
+ console.log('data', data.toString('utf8')) // data foo
+}
+
+const result2 = await request('http://localhost:3000/hello')
+
+console.log('response received', result2.statusCode) // response received 200
+
+for await (const data of result2.body) {
+ console.log('data', data.toString('utf8')) // data hello
+}
+```
+#### Example - Mock different requests within the same file
+```js
+const { MockAgent, setGlobalDispatcher } = require('undici');
+const agent = new MockAgent();
+agent.disableNetConnect();
+setGlobalDispatcher(agent);
+describe('Test', () => {
+ it('200', async () => {
+ const mockAgent = agent.get('http://test.com');
+ // your test
+ });
+ it('200', async () => {
+ const mockAgent = agent.get('http://testing.com');
+ // your test
+ });
+});
+```
+
+#### Example - Mocked request with query body, headers and trailers
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+const mockPool = mockAgent.get('http://localhost:3000')
+
+mockPool.intercept({
+ path: '/foo?hello=there&see=ya',
+ method: 'POST',
+ body: 'form1=data1&form2=data2'
+}).reply(200, { foo: 'bar' }, {
+ headers: { 'content-type': 'application/json' },
+ trailers: { 'Content-MD5': 'test' }
+})
+
+const {
+ statusCode,
+ headers,
+ trailers,
+ body
+} = await request('http://localhost:3000/foo?hello=there&see=ya', {
+ method: 'POST',
+ body: 'form1=data1&form2=data2'
+})
+
+console.log('response received', statusCode) // response received 200
+console.log('headers', headers) // { 'content-type': 'application/json' }
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')) // '{"foo":"bar"}'
+}
+
+console.log('trailers', trailers) // { 'content-md5': 'test' }
+```
+
+#### Example - Mocked request with origin regex
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+const mockPool = mockAgent.get(new RegExp('http://localhost:3000'))
+mockPool.intercept({ path: '/foo' }).reply(200, 'foo')
+
+const {
+ statusCode,
+ body
+} = await request('http://localhost:3000/foo')
+
+console.log('response received', statusCode) // response received 200
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')) // data foo
+}
+```
+
+#### Example - Mocked request with origin function
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+const mockPool = mockAgent.get((origin) => origin === 'http://localhost:3000')
+mockPool.intercept({ path: '/foo' }).reply(200, 'foo')
+
+const {
+ statusCode,
+ body
+} = await request('http://localhost:3000/foo')
+
+console.log('response received', statusCode) // response received 200
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')) // data foo
+}
+```
+
+### `MockAgent.close()`
+
+Closes the mock agent and waits for registered mock pools and clients to also close before resolving.
+
+Returns: `Promise<void>`
+
+#### Example - clean up after tests are complete
+
+```js
+import { MockAgent, setGlobalDispatcher } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+await mockAgent.close()
+```
+
+### `MockAgent.dispatch(options, handlers)`
+
+Implements [`Agent.dispatch(options, handlers)`](Agent.md#parameter-agentdispatchoptions).
+
+### `MockAgent.request(options[, callback])`
+
+See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback).
+
+#### Example - MockAgent request
+
+```js
+import { MockAgent } from 'undici'
+
+const mockAgent = new MockAgent()
+
+const mockPool = mockAgent.get('http://localhost:3000')
+mockPool.intercept({ path: '/foo' }).reply(200, 'foo')
+
+const {
+ statusCode,
+ body
+} = await mockAgent.request({
+ origin: 'http://localhost:3000',
+ path: '/foo',
+ method: 'GET'
+})
+
+console.log('response received', statusCode) // response received 200
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')) // data foo
+}
+```
+
+### `MockAgent.deactivate()`
+
+This method disables mocking in MockAgent.
+
+Returns: `void`
+
+#### Example - Deactivate Mocking
+
+```js
+import { MockAgent, setGlobalDispatcher } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+mockAgent.deactivate()
+```
+
+### `MockAgent.activate()`
+
+This method enables mocking in a MockAgent instance. When instantiated, a MockAgent is automatically activated. Therefore, this method is only effective after `MockAgent.deactivate` has been called.
+
+Returns: `void`
+
+#### Example - Activate Mocking
+
+```js
+import { MockAgent, setGlobalDispatcher } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+mockAgent.deactivate()
+// No mocking will occur
+
+// Later
+mockAgent.activate()
+```
+
+### `MockAgent.enableNetConnect([host])`
+
+When requests are not matched in a MockAgent intercept, a real HTTP request is attempted. We can control this further through the use of `enableNetConnect`. This is achieved by defining host matchers so only matching requests will be attempted.
+
+When using a string, it should only include the **hostname and optionally, the port**. In addition, calling this method multiple times with a string will allow all HTTP requests that match these values.
+
+Arguments:
+
+* **host** `string | RegExp | (value) => boolean` - (optional)
+
+Returns: `void`
+
+#### Example - Allow all non-matching urls to be dispatched in a real HTTP request
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+mockAgent.enableNetConnect()
+
+await request('http://example.com')
+// A real request is made
+```
+
+#### Example - Allow requests matching a host string to make real requests
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+mockAgent.enableNetConnect('example-1.com')
+mockAgent.enableNetConnect('example-2.com:8080')
+
+await request('http://example-1.com')
+// A real request is made
+
+await request('http://example-2.com:8080')
+// A real request is made
+
+await request('http://example-3.com')
+// Will throw
+```
+
+#### Example - Allow requests matching a host regex to make real requests
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+mockAgent.enableNetConnect(new RegExp('example.com'))
+
+await request('http://example.com')
+// A real request is made
+```
+
+#### Example - Allow requests matching a host function to make real requests
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+mockAgent.enableNetConnect((value) => value === 'example.com')
+
+await request('http://example.com')
+// A real request is made
+```
+
+### `MockAgent.disableNetConnect()`
+
+This method causes all requests to throw when requests are not matched in a MockAgent intercept.
+
+Returns: `void`
+
+#### Example - Disable all non-matching requests by throwing an error for each
+
+```js
+import { MockAgent, request } from 'undici'
+
+const mockAgent = new MockAgent()
+
+mockAgent.disableNetConnect()
+
+await request('http://example.com')
+// Will throw
+```
+
+### `MockAgent.pendingInterceptors()`
+
+This method returns any pending interceptors registered on a mock agent. A pending interceptor meets one of the following criteria:
+
+- Is registered with neither `.times(<number>)` nor `.persist()`, and has not been invoked;
+- Is persistent (i.e., registered with `.persist()`) and has not been invoked;
+- Is registered with `.times(<number>)` and has not been invoked `<number>` of times.
+
+Returns: `PendingInterceptor[]` (where `PendingInterceptor` is a `MockDispatch` with an additional `origin: string`)
+
+#### Example - List all pending inteceptors
+
+```js
+const agent = new MockAgent()
+agent.disableNetConnect()
+
+agent
+ .get('https://example.com')
+ .intercept({ method: 'GET', path: '/' })
+ .reply(200)
+
+const pendingInterceptors = agent.pendingInterceptors()
+// Returns [
+// {
+// timesInvoked: 0,
+// times: 1,
+// persist: false,
+// consumed: false,
+// pending: true,
+// path: '/',
+// method: 'GET',
+// body: undefined,
+// headers: undefined,
+// data: {
+// error: null,
+// statusCode: 200,
+// data: '',
+// headers: {},
+// trailers: {}
+// },
+// origin: 'https://example.com'
+// }
+// ]
+```
+
+### `MockAgent.assertNoPendingInterceptors([options])`
+
+This method throws if the mock agent has any pending interceptors. A pending interceptor meets one of the following criteria:
+
+- Is registered with neither `.times(<number>)` nor `.persist()`, and has not been invoked;
+- Is persistent (i.e., registered with `.persist()`) and has not been invoked;
+- Is registered with `.times(<number>)` and has not been invoked `<number>` of times.
+
+#### Example - Check that there are no pending interceptors
+
+```js
+const agent = new MockAgent()
+agent.disableNetConnect()
+
+agent
+ .get('https://example.com')
+ .intercept({ method: 'GET', path: '/' })
+ .reply(200)
+
+agent.assertNoPendingInterceptors()
+// Throws an UndiciError with the following message:
+//
+// 1 interceptor is pending:
+//
+// ┌─────────┬────────┬───────────────────────┬──────┬─────────────┬────────────┬─────────────┬───────────┐
+// │ (index) │ Method │ Origin │ Path │ Status code │ Persistent │ Invocations │ Remaining │
+// ├─────────┼────────┼───────────────────────┼──────┼─────────────┼────────────┼─────────────┼───────────┤
+// │ 0 │ 'GET' │ 'https://example.com' │ '/' │ 200 │ '❌' │ 0 │ 1 │
+// └─────────┴────────┴───────────────────────┴──────┴─────────────┴────────────┴─────────────┴───────────┘
+```
diff --git a/node_modules/undici/docs/api/MockClient.md b/node_modules/undici/docs/api/MockClient.md
new file mode 100644
index 0000000..ac54691
--- /dev/null
+++ b/node_modules/undici/docs/api/MockClient.md
@@ -0,0 +1,77 @@
+# Class: MockClient
+
+Extends: `undici.Client`
+
+A mock client class that implements the same api as [MockPool](MockPool.md).
+
+## `new MockClient(origin, [options])`
+
+Arguments:
+
+* **origin** `string` - It should only include the **protocol, hostname, and port**.
+* **options** `MockClientOptions` - It extends the `Client` options.
+
+Returns: `MockClient`
+
+### Parameter: `MockClientOptions`
+
+Extends: `ClientOptions`
+
+* **agent** `Agent` - the agent to associate this MockClient with.
+
+### Example - Basic MockClient instantiation
+
+We can use MockAgent to instantiate a MockClient ready to be used to intercept specified requests. It will not do anything until registered as the agent to use and any mock request are registered.
+
+```js
+import { MockAgent } from 'undici'
+
+// Connections must be set to 1 to return a MockClient instance
+const mockAgent = new MockAgent({ connections: 1 })
+
+const mockClient = mockAgent.get('http://localhost:3000')
+```
+
+## Instance Methods
+
+### `MockClient.intercept(options)`
+
+Implements: [`MockPool.intercept(options)`](MockPool.md#mockpoolinterceptoptions)
+
+### `MockClient.close()`
+
+Implements: [`MockPool.close()`](MockPool.md#mockpoolclose)
+
+### `MockClient.dispatch(options, handlers)`
+
+Implements [`Dispatcher.dispatch(options, handlers)`](Dispatcher.md#dispatcherdispatchoptions-handler).
+
+### `MockClient.request(options[, callback])`
+
+See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback).
+
+#### Example - MockClient request
+
+```js
+import { MockAgent } from 'undici'
+
+const mockAgent = new MockAgent({ connections: 1 })
+
+const mockClient = mockAgent.get('http://localhost:3000')
+mockClient.intercept({ path: '/foo' }).reply(200, 'foo')
+
+const {
+ statusCode,
+ body
+} = await mockClient.request({
+ origin: 'http://localhost:3000',
+ path: '/foo',
+ method: 'GET'
+})
+
+console.log('response received', statusCode) // response received 200
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')) // data foo
+}
+```
diff --git a/node_modules/undici/docs/api/MockErrors.md b/node_modules/undici/docs/api/MockErrors.md
new file mode 100644
index 0000000..c1aa3db
--- /dev/null
+++ b/node_modules/undici/docs/api/MockErrors.md
@@ -0,0 +1,12 @@
+# MockErrors
+
+Undici exposes a variety of mock error objects that you can use to enhance your mock error handling.
+You can find all the mock error objects inside the `mockErrors` key.
+
+```js
+import { mockErrors } from 'undici'
+```
+
+| Mock Error | Mock Error Codes | Description |
+| --------------------- | ------------------------------- | ---------------------------------------------------------- |
+| `MockNotMatchedError` | `UND_MOCK_ERR_MOCK_NOT_MATCHED` | The request does not match any registered mock dispatches. |
diff --git a/node_modules/undici/docs/api/MockPool.md b/node_modules/undici/docs/api/MockPool.md
new file mode 100644
index 0000000..923c157
--- /dev/null
+++ b/node_modules/undici/docs/api/MockPool.md
@@ -0,0 +1,512 @@
+# Class: MockPool
+
+Extends: `undici.Pool`
+
+A mock Pool class that implements the Pool API and is used by MockAgent to intercept real requests and return mocked responses.
+
+## `new MockPool(origin, [options])`
+
+Arguments:
+
+* **origin** `string` - It should only include the **protocol, hostname, and port**.
+* **options** `MockPoolOptions` - It extends the `Pool` options.
+
+Returns: `MockPool`
+
+### Parameter: `MockPoolOptions`
+
+Extends: `PoolOptions`
+
+* **agent** `Agent` - the agent to associate this MockPool with.
+
+### Example - Basic MockPool instantiation
+
+We can use MockAgent to instantiate a MockPool ready to be used to intercept specified requests. It will not do anything until registered as the agent to use and any mock request are registered.
+
+```js
+import { MockAgent } from 'undici'
+
+const mockAgent = new MockAgent()
+
+const mockPool = mockAgent.get('http://localhost:3000')
+```
+
+## Instance Methods
+
+### `MockPool.intercept(options)`
+
+This method defines the interception rules for matching against requests for a MockPool or MockPool. We can intercept multiple times on a single instance.
+
+When defining interception rules, all the rules must pass for a request to be intercepted. If a request is not intercepted, a real request will be attempted.
+
+| Matcher type | Condition to pass |
+|:------------:| -------------------------- |
+| `string` | Exact match against string |
+| `RegExp` | Regex must pass |
+| `Function` | Function must return true |
+
+Arguments:
+
+* **options** `MockPoolInterceptOptions` - Interception options.
+
+Returns: `MockInterceptor` corresponding to the input options.
+
+### Parameter: `MockPoolInterceptOptions`
+
+* **path** `string | RegExp | (path: string) => boolean` - a matcher for the HTTP request path.
+* **method** `string | RegExp | (method: string) => boolean` - (optional) - a matcher for the HTTP request method. Defaults to `GET`.
+* **body** `string | RegExp | (body: string) => boolean` - (optional) - a matcher for the HTTP request body.
+* **headers** `Record<string, string | RegExp | (body: string) => boolean`> - (optional) - a matcher for the HTTP request headers. To be intercepted, a request must match all defined headers. Extra headers not defined here may (or may not) be included in the request and do not affect the interception in any way.
+* **query** `Record<string, any> | null` - (optional) - a matcher for the HTTP request query string params.
+
+### Return: `MockInterceptor`
+
+We can define the behaviour of an intercepted request with the following options.
+
+* **reply** `(statusCode: number, replyData: string | Buffer | object | MockInterceptor.MockResponseDataHandler, responseOptions?: MockResponseOptions) => MockScope` - define a reply for a matching request. You can define the replyData as a callback to read incoming request data. Default for `responseOptions` is `{}`.
+* **reply** `(callback: MockInterceptor.MockReplyOptionsCallback) => MockScope` - define a reply for a matching request, allowing dynamic mocking of all reply options rather than just the data.
+* **replyWithError** `(error: Error) => MockScope` - define an error for a matching request to throw.
+* **defaultReplyHeaders** `(headers: Record<string, string>) => MockInterceptor` - define default headers to be included in subsequent replies. These are in addition to headers on a specific reply.
+* **defaultReplyTrailers** `(trailers: Record<string, string>) => MockInterceptor` - define default trailers to be included in subsequent replies. These are in addition to trailers on a specific reply.
+* **replyContentLength** `() => MockInterceptor` - define automatically calculated `content-length` headers to be included in subsequent replies.
+
+The reply data of an intercepted request may either be a string, buffer, or JavaScript object. Objects are converted to JSON while strings and buffers are sent as-is.
+
+By default, `reply` and `replyWithError` define the behaviour for the first matching request only. Subsequent requests will not be affected (this can be changed using the returned `MockScope`).
+
+### Parameter: `MockResponseOptions`
+
+* **headers** `Record<string, string>` - headers to be included on the mocked reply.
+* **trailers** `Record<string, string>` - trailers to be included on the mocked reply.
+
+### Return: `MockScope`
+
+A `MockScope` is associated with a single `MockInterceptor`. With this, we can configure the default behaviour of a intercepted reply.
+
+* **delay** `(waitInMs: number) => MockScope` - delay the associated reply by a set amount in ms.
+* **persist** `() => MockScope` - any matching request will always reply with the defined response indefinitely.
+* **times** `(repeatTimes: number) => MockScope` - any matching request will reply with the defined response a fixed amount of times. This is overridden by **persist**.
+
+#### Example - Basic Mocked Request
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+// MockPool
+const mockPool = mockAgent.get('http://localhost:3000')
+mockPool.intercept({ path: '/foo' }).reply(200, 'foo')
+
+const {
+ statusCode,
+ body
+} = await request('http://localhost:3000/foo')
+
+console.log('response received', statusCode) // response received 200
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')) // data foo
+}
+```
+
+#### Example - Mocked request using reply data callbacks
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+const mockPool = mockAgent.get('http://localhost:3000')
+
+mockPool.intercept({
+ path: '/echo',
+ method: 'GET',
+ headers: {
+ 'User-Agent': 'undici',
+ Host: 'example.com'
+ }
+}).reply(200, ({ headers }) => ({ message: headers.get('message') }))
+
+const { statusCode, body, headers } = await request('http://localhost:3000', {
+ headers: {
+ message: 'hello world!'
+ }
+})
+
+console.log('response received', statusCode) // response received 200
+console.log('headers', headers) // { 'content-type': 'application/json' }
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')) // { "message":"hello world!" }
+}
+```
+
+#### Example - Mocked request using reply options callback
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+const mockPool = mockAgent.get('http://localhost:3000')
+
+mockPool.intercept({
+ path: '/echo',
+ method: 'GET',
+ headers: {
+ 'User-Agent': 'undici',
+ Host: 'example.com'
+ }
+}).reply(({ headers }) => ({ statusCode: 200, data: { message: headers.get('message') }})))
+
+const { statusCode, body, headers } = await request('http://localhost:3000', {
+ headers: {
+ message: 'hello world!'
+ }
+})
+
+console.log('response received', statusCode) // response received 200
+console.log('headers', headers) // { 'content-type': 'application/json' }
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')) // { "message":"hello world!" }
+}
+```
+
+#### Example - Basic Mocked requests with multiple intercepts
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+const mockPool = mockAgent.get('http://localhost:3000')
+
+mockPool.intercept({
+ path: '/foo',
+ method: 'GET'
+}).reply(200, 'foo')
+
+mockPool.intercept({
+ path: '/hello',
+ method: 'GET',
+}).reply(200, 'hello')
+
+const result1 = await request('http://localhost:3000/foo')
+
+console.log('response received', result1.statusCode) // response received 200
+
+for await (const data of result1.body) {
+ console.log('data', data.toString('utf8')) // data foo
+}
+
+const result2 = await request('http://localhost:3000/hello')
+
+console.log('response received', result2.statusCode) // response received 200
+
+for await (const data of result2.body) {
+ console.log('data', data.toString('utf8')) // data hello
+}
+```
+
+#### Example - Mocked request with query body, request headers and response headers and trailers
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+const mockPool = mockAgent.get('http://localhost:3000')
+
+mockPool.intercept({
+ path: '/foo?hello=there&see=ya',
+ method: 'POST',
+ body: 'form1=data1&form2=data2',
+ headers: {
+ 'User-Agent': 'undici',
+ Host: 'example.com'
+ }
+}).reply(200, { foo: 'bar' }, {
+ headers: { 'content-type': 'application/json' },
+ trailers: { 'Content-MD5': 'test' }
+})
+
+const {
+ statusCode,
+ headers,
+ trailers,
+ body
+} = await request('http://localhost:3000/foo?hello=there&see=ya', {
+ method: 'POST',
+ body: 'form1=data1&form2=data2',
+ headers: {
+ foo: 'bar',
+ 'User-Agent': 'undici',
+ Host: 'example.com'
+ }
+ })
+
+console.log('response received', statusCode) // response received 200
+console.log('headers', headers) // { 'content-type': 'application/json' }
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')) // '{"foo":"bar"}'
+}
+
+console.log('trailers', trailers) // { 'content-md5': 'test' }
+```
+
+#### Example - Mocked request using different matchers
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+const mockPool = mockAgent.get('http://localhost:3000')
+
+mockPool.intercept({
+ path: '/foo',
+ method: /^GET$/,
+ body: (value) => value === 'form=data',
+ headers: {
+ 'User-Agent': 'undici',
+ Host: /^example.com$/
+ }
+}).reply(200, 'foo')
+
+const {
+ statusCode,
+ body
+} = await request('http://localhost:3000/foo', {
+ method: 'GET',
+ body: 'form=data',
+ headers: {
+ foo: 'bar',
+ 'User-Agent': 'undici',
+ Host: 'example.com'
+ }
+})
+
+console.log('response received', statusCode) // response received 200
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')) // data foo
+}
+```
+
+#### Example - Mocked request with reply with a defined error
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+const mockPool = mockAgent.get('http://localhost:3000')
+
+mockPool.intercept({
+ path: '/foo',
+ method: 'GET'
+}).replyWithError(new Error('kaboom'))
+
+try {
+ await request('http://localhost:3000/foo', {
+ method: 'GET'
+ })
+} catch (error) {
+ console.error(error) // Error: kaboom
+}
+```
+
+#### Example - Mocked request with defaultReplyHeaders
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+const mockPool = mockAgent.get('http://localhost:3000')
+
+mockPool.intercept({
+ path: '/foo',
+ method: 'GET'
+}).defaultReplyHeaders({ foo: 'bar' })
+ .reply(200, 'foo')
+
+const { headers } = await request('http://localhost:3000/foo')
+
+console.log('headers', headers) // headers { foo: 'bar' }
+```
+
+#### Example - Mocked request with defaultReplyTrailers
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+const mockPool = mockAgent.get('http://localhost:3000')
+
+mockPool.intercept({
+ path: '/foo',
+ method: 'GET'
+}).defaultReplyTrailers({ foo: 'bar' })
+ .reply(200, 'foo')
+
+const { trailers } = await request('http://localhost:3000/foo')
+
+console.log('trailers', trailers) // trailers { foo: 'bar' }
+```
+
+#### Example - Mocked request with automatic content-length calculation
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+const mockPool = mockAgent.get('http://localhost:3000')
+
+mockPool.intercept({
+ path: '/foo',
+ method: 'GET'
+}).replyContentLength().reply(200, 'foo')
+
+const { headers } = await request('http://localhost:3000/foo')
+
+console.log('headers', headers) // headers { 'content-length': '3' }
+```
+
+#### Example - Mocked request with automatic content-length calculation on an object
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+const mockPool = mockAgent.get('http://localhost:3000')
+
+mockPool.intercept({
+ path: '/foo',
+ method: 'GET'
+}).replyContentLength().reply(200, { foo: 'bar' })
+
+const { headers } = await request('http://localhost:3000/foo')
+
+console.log('headers', headers) // headers { 'content-length': '13' }
+```
+
+#### Example - Mocked request with persist enabled
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+const mockPool = mockAgent.get('http://localhost:3000')
+
+mockPool.intercept({
+ path: '/foo',
+ method: 'GET'
+}).reply(200, 'foo').persist()
+
+const result1 = await request('http://localhost:3000/foo')
+// Will match and return mocked data
+
+const result2 = await request('http://localhost:3000/foo')
+// Will match and return mocked data
+
+// Etc
+```
+
+#### Example - Mocked request with times enabled
+
+```js
+import { MockAgent, setGlobalDispatcher, request } from 'undici'
+
+const mockAgent = new MockAgent()
+setGlobalDispatcher(mockAgent)
+
+const mockPool = mockAgent.get('http://localhost:3000')
+
+mockPool.intercept({
+ path: '/foo',
+ method: 'GET'
+}).reply(200, 'foo').times(2)
+
+const result1 = await request('http://localhost:3000/foo')
+// Will match and return mocked data
+
+const result2 = await request('http://localhost:3000/foo')
+// Will match and return mocked data
+
+const result3 = await request('http://localhost:3000/foo')
+// Will not match and make attempt a real request
+```
+
+### `MockPool.close()`
+
+Closes the mock pool and de-registers from associated MockAgent.
+
+Returns: `Promise<void>`
+
+#### Example - clean up after tests are complete
+
+```js
+import { MockAgent } from 'undici'
+
+const mockAgent = new MockAgent()
+const mockPool = mockAgent.get('http://localhost:3000')
+
+await mockPool.close()
+```
+
+### `MockPool.dispatch(options, handlers)`
+
+Implements [`Dispatcher.dispatch(options, handlers)`](Dispatcher.md#dispatcherdispatchoptions-handler).
+
+### `MockPool.request(options[, callback])`
+
+See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback).
+
+#### Example - MockPool request
+
+```js
+import { MockAgent } from 'undici'
+
+const mockAgent = new MockAgent()
+
+const mockPool = mockAgent.get('http://localhost:3000')
+mockPool.intercept({
+ path: '/foo',
+ method: 'GET',
+}).reply(200, 'foo')
+
+const {
+ statusCode,
+ body
+} = await mockPool.request({
+ origin: 'http://localhost:3000',
+ path: '/foo',
+ method: 'GET'
+})
+
+console.log('response received', statusCode) // response received 200
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')) // data foo
+}
+```
diff --git a/node_modules/undici/docs/api/Pool.md b/node_modules/undici/docs/api/Pool.md
new file mode 100644
index 0000000..8fcabac
--- /dev/null
+++ b/node_modules/undici/docs/api/Pool.md
@@ -0,0 +1,84 @@
+# Class: Pool
+
+Extends: `undici.Dispatcher`
+
+A pool of [Client](Client.md) instances connected to the same upstream target.
+
+Requests are not guaranteed to be dispatched in order of invocation.
+
+## `new Pool(url[, options])`
+
+Arguments:
+
+* **url** `URL | string` - It should only include the **protocol, hostname, and port**.
+* **options** `PoolOptions` (optional)
+
+### Parameter: `PoolOptions`
+
+Extends: [`ClientOptions`](Client.md#parameter-clientoptions)
+
+* **factory** `(origin: URL, opts: Object) => Dispatcher` - Default: `(origin, opts) => new Client(origin, opts)`
+* **connections** `number | null` (optional) - Default: `null` - The number of `Client` instances to create. When set to `null`, the `Pool` instance will create an unlimited amount of `Client` instances.
+* **interceptors** `{ Pool: DispatchInterceptor[] } }` - Default: `{ Pool: [] }` - A list of interceptors that are applied to the dispatch method. Additional logic can be applied (such as, but not limited to: 302 status code handling, authentication, cookies, compression and caching).
+
+## Instance Properties
+
+### `Pool.closed`
+
+Implements [Client.closed](Client.md#clientclosed)
+
+### `Pool.destroyed`
+
+Implements [Client.destroyed](Client.md#clientdestroyed)
+
+### `Pool.stats`
+
+Returns [`PoolStats`](PoolStats.md) instance for this pool.
+
+## Instance Methods
+
+### `Pool.close([callback])`
+
+Implements [`Dispatcher.close([callback])`](Dispatcher.md#dispatcherclosecallback-promise).
+
+### `Pool.destroy([error, callback])`
+
+Implements [`Dispatcher.destroy([error, callback])`](Dispatcher.md#dispatcherdestroyerror-callback-promise).
+
+### `Pool.connect(options[, callback])`
+
+See [`Dispatcher.connect(options[, callback])`](Dispatcher.md#dispatcherconnectoptions-callback).
+
+### `Pool.dispatch(options, handler)`
+
+Implements [`Dispatcher.dispatch(options, handler)`](Dispatcher.md#dispatcherdispatchoptions-handler).
+
+### `Pool.pipeline(options, handler)`
+
+See [`Dispatcher.pipeline(options, handler)`](Dispatcher.md#dispatcherpipelineoptions-handler).
+
+### `Pool.request(options[, callback])`
+
+See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback).
+
+### `Pool.stream(options, factory[, callback])`
+
+See [`Dispatcher.stream(options, factory[, callback])`](Dispatcher.md#dispatcherstreamoptions-factory-callback).
+
+### `Pool.upgrade(options[, callback])`
+
+See [`Dispatcher.upgrade(options[, callback])`](Dispatcher.md#dispatcherupgradeoptions-callback).
+
+## Instance Events
+
+### Event: `'connect'`
+
+See [Dispatcher Event: `'connect'`](Dispatcher.md#event-connect).
+
+### Event: `'disconnect'`
+
+See [Dispatcher Event: `'disconnect'`](Dispatcher.md#event-disconnect).
+
+### Event: `'drain'`
+
+See [Dispatcher Event: `'drain'`](Dispatcher.md#event-drain).
diff --git a/node_modules/undici/docs/api/PoolStats.md b/node_modules/undici/docs/api/PoolStats.md
new file mode 100644
index 0000000..16b6dc2
--- /dev/null
+++ b/node_modules/undici/docs/api/PoolStats.md
@@ -0,0 +1,35 @@
+# Class: PoolStats
+
+Aggregate stats for a [Pool](Pool.md) or [BalancedPool](BalancedPool.md).
+
+## `new PoolStats(pool)`
+
+Arguments:
+
+* **pool** `Pool` - Pool or BalancedPool from which to return stats.
+
+## Instance Properties
+
+### `PoolStats.connected`
+
+Number of open socket connections in this pool.
+
+### `PoolStats.free`
+
+Number of open socket connections in this pool that do not have an active request.
+
+### `PoolStats.pending`
+
+Number of pending requests across all clients in this pool.
+
+### `PoolStats.queued`
+
+Number of queued requests across all clients in this pool.
+
+### `PoolStats.running`
+
+Number of currently active requests across all clients in this pool.
+
+### `PoolStats.size`
+
+Number of active, pending, or queued requests across all clients in this pool.
diff --git a/node_modules/undici/docs/api/ProxyAgent.md b/node_modules/undici/docs/api/ProxyAgent.md
new file mode 100644
index 0000000..6a8b07f
--- /dev/null
+++ b/node_modules/undici/docs/api/ProxyAgent.md
@@ -0,0 +1,124 @@
+# Class: ProxyAgent
+
+Extends: `undici.Dispatcher`
+
+A Proxy Agent class that implements the Agent API. It allows the connection through proxy in a simple way.
+
+## `new ProxyAgent([options])`
+
+Arguments:
+
+* **options** `ProxyAgentOptions` (required) - It extends the `Agent` options.
+
+Returns: `ProxyAgent`
+
+### Parameter: `ProxyAgentOptions`
+
+Extends: [`AgentOptions`](Agent.md#parameter-agentoptions)
+
+* **uri** `string` (required) - It can be passed either by a string or a object containing `uri` as string.
+* **token** `string` (optional) - It can be passed by a string of token for authentication.
+* **auth** `string` (**deprecated**) - Use token.
+* **clientFactory** `(origin: URL, opts: Object) => Dispatcher` - Default: `(origin, opts) => new Pool(origin, opts)`
+
+Examples:
+
+```js
+import { ProxyAgent } from 'undici'
+
+const proxyAgent = new ProxyAgent('my.proxy.server')
+// or
+const proxyAgent = new ProxyAgent({ uri: 'my.proxy.server' })
+```
+
+#### Example - Basic ProxyAgent instantiation
+
+This will instantiate the ProxyAgent. It will not do anything until registered as the agent to use with requests.
+
+```js
+import { ProxyAgent } from 'undici'
+
+const proxyAgent = new ProxyAgent('my.proxy.server')
+```
+
+#### Example - Basic Proxy Request with global agent dispatcher
+
+```js
+import { setGlobalDispatcher, request, ProxyAgent } from 'undici'
+
+const proxyAgent = new ProxyAgent('my.proxy.server')
+setGlobalDispatcher(proxyAgent)
+
+const { statusCode, body } = await request('http://localhost:3000/foo')
+
+console.log('response received', statusCode) // response received 200
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')) // data foo
+}
+```
+
+#### Example - Basic Proxy Request with local agent dispatcher
+
+```js
+import { ProxyAgent, request } from 'undici'
+
+const proxyAgent = new ProxyAgent('my.proxy.server')
+
+const {
+ statusCode,
+ body
+} = await request('http://localhost:3000/foo', { dispatcher: proxyAgent })
+
+console.log('response received', statusCode) // response received 200
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')) // data foo
+}
+```
+
+#### Example - Basic Proxy Request with authentication
+
+```js
+import { setGlobalDispatcher, request, ProxyAgent } from 'undici';
+
+const proxyAgent = new ProxyAgent({
+ uri: 'my.proxy.server',
+ // token: 'Bearer xxxx'
+ token: `Basic ${Buffer.from('username:password').toString('base64')}`
+});
+setGlobalDispatcher(proxyAgent);
+
+const { statusCode, body } = await request('http://localhost:3000/foo');
+
+console.log('response received', statusCode); // response received 200
+
+for await (const data of body) {
+ console.log('data', data.toString('utf8')); // data foo
+}
+```
+
+### `ProxyAgent.close()`
+
+Closes the proxy agent and waits for registered pools and clients to also close before resolving.
+
+Returns: `Promise<void>`
+
+#### Example - clean up after tests are complete
+
+```js
+import { ProxyAgent, setGlobalDispatcher } from 'undici'
+
+const proxyAgent = new ProxyAgent('my.proxy.server')
+setGlobalDispatcher(proxyAgent)
+
+await proxyAgent.close()
+```
+
+### `ProxyAgent.dispatch(options, handlers)`
+
+Implements [`Agent.dispatch(options, handlers)`](Agent.md#parameter-agentdispatchoptions).
+
+### `ProxyAgent.request(options[, callback])`
+
+See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback).
diff --git a/node_modules/undici/docs/api/WebSocket.md b/node_modules/undici/docs/api/WebSocket.md
new file mode 100644
index 0000000..9d374f4
--- /dev/null
+++ b/node_modules/undici/docs/api/WebSocket.md
@@ -0,0 +1,43 @@
+# Class: WebSocket
+
+> ⚠️ Warning: the WebSocket API is experimental.
+
+Extends: [`EventTarget`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget)
+
+The WebSocket object provides a way to manage a WebSocket connection to a server, allowing bidirectional communication. The API follows the [WebSocket spec](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) and [RFC 6455](https://datatracker.ietf.org/doc/html/rfc6455).
+
+## `new WebSocket(url[, protocol])`
+
+Arguments:
+
+* **url** `URL | string` - The url's protocol *must* be `ws` or `wss`.
+* **protocol** `string | string[] | WebSocketInit` (optional) - Subprotocol(s) to request the server use, or a [`Dispatcher`](./Dispatcher.md).
+
+### Example:
+
+This example will not work in browsers or other platforms that don't allow passing an object.
+
+```mjs
+import { WebSocket, ProxyAgent } from 'undici'
+
+const proxyAgent = new ProxyAgent('my.proxy.server')
+
+const ws = new WebSocket('wss://echo.websocket.events', {
+ dispatcher: proxyAgent,
+ protocols: ['echo', 'chat']
+})
+```
+
+If you do not need a custom Dispatcher, it's recommended to use the following pattern:
+
+```mjs
+import { WebSocket } from 'undici'
+
+const ws = new WebSocket('wss://echo.websocket.events', ['echo', 'chat'])
+```
+
+## Read More
+
+- [MDN - WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket)
+- [The WebSocket Specification](https://www.rfc-editor.org/rfc/rfc6455)
+- [The WHATWG WebSocket Specification](https://websockets.spec.whatwg.org/)
diff --git a/node_modules/undici/docs/api/api-lifecycle.md b/node_modules/undici/docs/api/api-lifecycle.md
new file mode 100644
index 0000000..d158126
--- /dev/null
+++ b/node_modules/undici/docs/api/api-lifecycle.md
@@ -0,0 +1,62 @@
+# Client Lifecycle
+
+An Undici [Client](Client.md) can be best described as a state machine. The following list is a summary of the various state transitions the `Client` will go through in its lifecycle. This document also contains detailed breakdowns of each state.
+
+> This diagram is not a perfect representation of the undici Client. Since the Client class is not actually implemented as a state-machine, actual execution may deviate slightly from what is described below. Consider this as a general resource for understanding the inner workings of the Undici client rather than some kind of formal specification.
+
+## State Transition Overview
+
+* A `Client` begins in the **idle** state with no socket connection and no requests in queue.
+ * The *connect* event transitions the `Client` to the **pending** state where requests can be queued prior to processing.
+ * The *close* and *destroy* events transition the `Client` to the **destroyed** state. Since there are no requests in the queue, the *close* event immediately transitions to the **destroyed** state.
+* The **pending** state indicates the underlying socket connection has been successfully established and requests are queueing.
+ * The *process* event transitions the `Client` to the **processing** state where requests are processed.
+ * If requests are queued, the *close* event transitions to the **processing** state; otherwise, it transitions to the **destroyed** state.
+ * The *destroy* event transitions to the **destroyed** state.
+* The **processing** state initializes to the **processing.running** state.
+ * If the current request requires draining, the *needDrain* event transitions the `Client` into the **processing.busy** state which will return to the **processing.running** state with the *drainComplete* event.
+ * After all queued requests are completed, the *keepalive* event transitions the `Client` back to the **pending** state. If no requests are queued during the timeout, the **close** event transitions the `Client` to the **destroyed** state.
+ * If the *close* event is fired while the `Client` still has queued requests, the `Client` transitions to the **process.closing** state where it will complete all existing requests before firing the *done* event.
+ * The *done* event gracefully transitions the `Client` to the **destroyed** state.
+ * At any point in time, the *destroy* event will transition the `Client` from the **processing** state to the **destroyed** state, destroying any queued requests.
+* The **destroyed** state is a final state and the `Client` is no longer functional.
+
+![A state diagram representing an Undici Client instance](../assets/lifecycle-diagram.png)
+
+> The diagram was generated using Mermaid.js Live Editor. Modify the state diagram [here](https://mermaid-js.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic3RhdGVEaWFncmFtLXYyXG4gICAgWypdIC0tPiBpZGxlXG4gICAgaWRsZSAtLT4gcGVuZGluZyA6IGNvbm5lY3RcbiAgICBpZGxlIC0tPiBkZXN0cm95ZWQgOiBkZXN0cm95L2Nsb3NlXG4gICAgXG4gICAgcGVuZGluZyAtLT4gaWRsZSA6IHRpbWVvdXRcbiAgICBwZW5kaW5nIC0tPiBkZXN0cm95ZWQgOiBkZXN0cm95XG5cbiAgICBzdGF0ZSBjbG9zZV9mb3JrIDw8Zm9yaz4-XG4gICAgcGVuZGluZyAtLT4gY2xvc2VfZm9yayA6IGNsb3NlXG4gICAgY2xvc2VfZm9yayAtLT4gcHJvY2Vzc2luZ1xuICAgIGNsb3NlX2ZvcmsgLS0-IGRlc3Ryb3llZFxuXG4gICAgcGVuZGluZyAtLT4gcHJvY2Vzc2luZyA6IHByb2Nlc3NcblxuICAgIHByb2Nlc3NpbmcgLS0-IHBlbmRpbmcgOiBrZWVwYWxpdmVcbiAgICBwcm9jZXNzaW5nIC0tPiBkZXN0cm95ZWQgOiBkb25lXG4gICAgcHJvY2Vzc2luZyAtLT4gZGVzdHJveWVkIDogZGVzdHJveVxuXG4gICAgc3RhdGUgcHJvY2Vzc2luZyB7XG4gICAgICAgIHJ1bm5pbmcgLS0-IGJ1c3kgOiBuZWVkRHJhaW5cbiAgICAgICAgYnVzeSAtLT4gcnVubmluZyA6IGRyYWluQ29tcGxldGVcbiAgICAgICAgcnVubmluZyAtLT4gWypdIDoga2VlcGFsaXZlXG4gICAgICAgIHJ1bm5pbmcgLS0-IGNsb3NpbmcgOiBjbG9zZVxuICAgICAgICBjbG9zaW5nIC0tPiBbKl0gOiBkb25lXG4gICAgICAgIFsqXSAtLT4gcnVubmluZ1xuICAgIH1cbiAgICAiLCJtZXJtYWlkIjp7InRoZW1lIjoiYmFzZSJ9LCJ1cGRhdGVFZGl0b3IiOmZhbHNlfQ)
+
+## State details
+
+### idle
+
+The **idle** state is the initial state of a `Client` instance. While an `origin` is required for instantiating a `Client` instance, the underlying socket connection will not be established until a request is queued using [`Client.dispatch()`](Client.md#clientdispatchoptions-handlers). By calling `Client.dispatch()` directly or using one of the multiple implementations ([`Client.connect()`](Client.md#clientconnectoptions-callback), [`Client.pipeline()`](Client.md#clientpipelineoptions-handler), [`Client.request()`](Client.md#clientrequestoptions-callback), [`Client.stream()`](Client.md#clientstreamoptions-factory-callback), and [`Client.upgrade()`](Client.md#clientupgradeoptions-callback)), the `Client` instance will transition from **idle** to [**pending**](#pending) and then most likely directly to [**processing**](#processing).
+
+Calling [`Client.close()`](Client.md#clientclosecallback) or [`Client.destroy()`](Client.md#clientdestroyerror-callback) transitions directly to the [**destroyed**](#destroyed) state since the `Client` instance will have no queued requests in this state.
+
+### pending
+
+The **pending** state signifies a non-processing `Client`. Upon entering this state, the `Client` establishes a socket connection and emits the [`'connect'`](Client.md#event-connect) event signalling a connection was successfully established with the `origin` provided during `Client` instantiation. The internal queue is initially empty, and requests can start queueing.
+
+Calling [`Client.close()`](Client.md#clientclosecallback) with queued requests, transitions the `Client` to the [**processing**](#processing) state. Without queued requests, it transitions to the [**destroyed**](#destroyed) state.
+
+Calling [`Client.destroy()`](Client.md#clientdestroyerror-callback) transitions directly to the [**destroyed**](#destroyed) state regardless of existing requests.
+
+### processing
+
+The **processing** state is a state machine within itself. It initializes to the [**processing.running**](#running) state. The [`Client.dispatch()`](Client.md#clientdispatchoptions-handlers), [`Client.close()`](Client.md#clientclosecallback), and [`Client.destroy()`](Client.md#clientdestroyerror-callback) can be called at any time while the `Client` is in this state. `Client.dispatch()` will add more requests to the queue while existing requests continue to be processed. `Client.close()` will transition to the [**processing.closing**](#closing) state. And `Client.destroy()` will transition to [**destroyed**](#destroyed).
+
+#### running
+
+In the **processing.running** sub-state, queued requests are being processed in a FIFO order. If a request body requires draining, the *needDrain* event transitions to the [**processing.busy**](#busy) sub-state. The *close* event transitions the Client to the [**process.closing**](#closing) sub-state. If all queued requests are processed and neither [`Client.close()`](Client.md#clientclosecallback) nor [`Client.destroy()`](Client.md#clientdestroyerror-callback) are called, then the [**processing**](#processing) machine will trigger a *keepalive* event transitioning the `Client` back to the [**pending**](#pending) state. During this time, the `Client` is waiting for the socket connection to timeout, and once it does, it triggers the *timeout* event and transitions to the [**idle**](#idle) state.
+
+#### busy
+
+This sub-state is only entered when a request body is an instance of [Stream](https://nodejs.org/api/stream.html) and requires draining. The `Client` cannot process additional requests while in this state and must wait until the currently processing request body is completely drained before transitioning back to [**processing.running**](#running).
+
+#### closing
+
+This sub-state is only entered when a `Client` instance has queued requests and the [`Client.close()`](Client.md#clientclosecallback) method is called. In this state, the `Client` instance continues to process requests as usual, with the one exception that no additional requests can be queued. Once all of the queued requests are processed, the `Client` will trigger the *done* event gracefully entering the [**destroyed**](#destroyed) state without an error.
+
+### destroyed
+
+The **destroyed** state is a final state for the `Client` instance. Once in this state, a `Client` is nonfunctional. Calling any other `Client` methods will result in an `ClientDestroyedError`.
diff --git a/node_modules/undici/docs/assets/lifecycle-diagram.png b/node_modules/undici/docs/assets/lifecycle-diagram.png
new file mode 100644
index 0000000..4ef17b5
--- /dev/null
+++ b/node_modules/undici/docs/assets/lifecycle-diagram.png
Binary files differ
diff --git a/node_modules/undici/docs/best-practices/client-certificate.md b/node_modules/undici/docs/best-practices/client-certificate.md
new file mode 100644
index 0000000..4fc84ec
--- /dev/null
+++ b/node_modules/undici/docs/best-practices/client-certificate.md
@@ -0,0 +1,64 @@
+# Client certificate
+
+Client certificate authentication can be configured with the `Client`, the required options are passed along through the `connect` option.
+
+The client certificates must be signed by a trusted CA. The Node.js default is to trust the well-known CAs curated by Mozilla.
+
+Setting the server option `requestCert: true` tells the server to request the client certificate.
+
+The server option `rejectUnauthorized: false` allows us to handle any invalid certificate errors in client code. The `authorized` property on the socket of the incoming request will show if the client certificate was valid. The `authorizationError` property will give the reason if the certificate was not valid.
+
+### Client Certificate Authentication
+
+```js
+const { readFileSync } = require('fs')
+const { join } = require('path')
+const { createServer } = require('https')
+const { Client } = require('undici')
+
+const serverOptions = {
+ ca: [
+ readFileSync(join(__dirname, 'client-ca-crt.pem'), 'utf8')
+ ],
+ key: readFileSync(join(__dirname, 'server-key.pem'), 'utf8'),
+ cert: readFileSync(join(__dirname, 'server-crt.pem'), 'utf8'),
+ requestCert: true,
+ rejectUnauthorized: false
+}
+
+const server = createServer(serverOptions, (req, res) => {
+ // true if client cert is valid
+ if(req.client.authorized === true) {
+ console.log('valid')
+ } else {
+ console.error(req.client.authorizationError)
+ }
+ res.end()
+})
+
+server.listen(0, function () {
+ const tls = {
+ ca: [
+ readFileSync(join(__dirname, 'server-ca-crt.pem'), 'utf8')
+ ],
+ key: readFileSync(join(__dirname, 'client-key.pem'), 'utf8'),
+ cert: readFileSync(join(__dirname, 'client-crt.pem'), 'utf8'),
+ rejectUnauthorized: false,
+ servername: 'agent1'
+ }
+ const client = new Client(`https://localhost:${server.address().port}`, {
+ connect: tls
+ })
+
+ client.request({
+ path: '/',
+ method: 'GET'
+ }, (err, { body }) => {
+ body.on('data', (buf) => {})
+ body.on('end', () => {
+ client.close()
+ server.close()
+ })
+ })
+})
+```
diff --git a/node_modules/undici/docs/best-practices/mocking-request.md b/node_modules/undici/docs/best-practices/mocking-request.md
new file mode 100644
index 0000000..6954392
--- /dev/null
+++ b/node_modules/undici/docs/best-practices/mocking-request.md
@@ -0,0 +1,136 @@
+# Mocking Request
+
+Undici has its own mocking [utility](../api/MockAgent.md). It allow us to intercept undici HTTP requests and return mocked values instead. It can be useful for testing purposes.
+
+Example:
+
+```js
+// bank.mjs
+import { request } from 'undici'
+
+export async function bankTransfer(recipient, amount) {
+ const { body } = await request('http://localhost:3000/bank-transfer',
+ {
+ method: 'POST',
+ headers: {
+ 'X-TOKEN-SECRET': 'SuperSecretToken',
+ },
+ body: JSON.stringify({
+ recipient,
+ amount
+ })
+ }
+ )
+ return await body.json()
+}
+```
+
+And this is what the test file looks like:
+
+```js
+// index.test.mjs
+import { strict as assert } from 'assert'
+import { MockAgent, setGlobalDispatcher, } from 'undici'
+import { bankTransfer } from './bank.mjs'
+
+const mockAgent = new MockAgent();
+
+setGlobalDispatcher(mockAgent);
+
+// Provide the base url to the request
+const mockPool = mockAgent.get('http://localhost:3000');
+
+// intercept the request
+mockPool.intercept({
+ path: '/bank-transfer',
+ method: 'POST',
+ headers: {
+ 'X-TOKEN-SECRET': 'SuperSecretToken',
+ },
+ body: JSON.stringify({
+ recipient: '1234567890',
+ amount: '100'
+ })
+}).reply(200, {
+ message: 'transaction processed'
+})
+
+const success = await bankTransfer('1234567890', '100')
+
+assert.deepEqual(success, { message: 'transaction processed' })
+
+// if you dont want to check whether the body or the headers contain the same value
+// just remove it from interceptor
+mockPool.intercept({
+ path: '/bank-transfer',
+ method: 'POST',
+}).reply(400, {
+ message: 'bank account not found'
+})
+
+const badRequest = await bankTransfer('1234567890', '100')
+
+assert.deepEqual(badRequest, { message: 'bank account not found' })
+```
+
+Explore other MockAgent functionality [here](../api/MockAgent.md)
+
+## Debug Mock Value
+
+When the interceptor and the request options are not the same, undici will automatically make a real HTTP request. To prevent real requests from being made, use `mockAgent.disableNetConnect()`:
+
+```js
+const mockAgent = new MockAgent();
+
+setGlobalDispatcher(mockAgent);
+mockAgent.disableNetConnect()
+
+// Provide the base url to the request
+const mockPool = mockAgent.get('http://localhost:3000');
+
+mockPool.intercept({
+ path: '/bank-transfer',
+ method: 'POST',
+}).reply(200, {
+ message: 'transaction processed'
+})
+
+const badRequest = await bankTransfer('1234567890', '100')
+// Will throw an error
+// MockNotMatchedError: Mock dispatch not matched for path '/bank-transfer':
+// subsequent request to origin http://localhost:3000 was not allowed (net.connect disabled)
+```
+
+## Reply with data based on request
+
+If the mocked response needs to be dynamically derived from the request parameters, you can provide a function instead of an object to `reply`:
+
+```js
+mockPool.intercept({
+ path: '/bank-transfer',
+ method: 'POST',
+ headers: {
+ 'X-TOKEN-SECRET': 'SuperSecretToken',
+ },
+ body: JSON.stringify({
+ recipient: '1234567890',
+ amount: '100'
+ })
+}).reply(200, (opts) => {
+ // do something with opts
+
+ return { message: 'transaction processed' }
+})
+```
+
+in this case opts will be
+
+```
+{
+ method: 'POST',
+ headers: { 'X-TOKEN-SECRET': 'SuperSecretToken' },
+ body: '{"recipient":"1234567890","amount":"100"}',
+ origin: 'http://localhost:3000',
+ path: '/bank-transfer'
+}
+```
diff --git a/node_modules/undici/docs/best-practices/proxy.md b/node_modules/undici/docs/best-practices/proxy.md
new file mode 100644
index 0000000..bf10295
--- /dev/null
+++ b/node_modules/undici/docs/best-practices/proxy.md
@@ -0,0 +1,127 @@
+# Connecting through a proxy
+
+Connecting through a proxy is possible by:
+
+- Using [AgentProxy](../api/ProxyAgent.md).
+- Configuring `Client` or `Pool` constructor.
+
+The proxy url should be passed to the `Client` or `Pool` constructor, while the upstream server url
+should be added to every request call in the `path`.
+For instance, if you need to send a request to the `/hello` route of your upstream server,
+the `path` should be `path: 'http://upstream.server:port/hello?foo=bar'`.
+
+If you proxy requires basic authentication, you can send it via the `proxy-authorization` header.
+
+### Connect without authentication
+
+```js
+import { Client } from 'undici'
+import { createServer } from 'http'
+import proxy from 'proxy'
+
+const server = await buildServer()
+const proxyServer = await buildProxy()
+
+const serverUrl = `http://localhost:${server.address().port}`
+const proxyUrl = `http://localhost:${proxyServer.address().port}`
+
+server.on('request', (req, res) => {
+ console.log(req.url) // '/hello?foo=bar'
+ res.setHeader('content-type', 'application/json')
+ res.end(JSON.stringify({ hello: 'world' }))
+})
+
+const client = new Client(proxyUrl)
+
+const response = await client.request({
+ method: 'GET',
+ path: serverUrl + '/hello?foo=bar'
+})
+
+response.body.setEncoding('utf8')
+let data = ''
+for await (const chunk of response.body) {
+ data += chunk
+}
+console.log(response.statusCode) // 200
+console.log(JSON.parse(data)) // { hello: 'world' }
+
+server.close()
+proxyServer.close()
+client.close()
+
+function buildServer () {
+ return new Promise((resolve, reject) => {
+ const server = createServer()
+ server.listen(0, () => resolve(server))
+ })
+}
+
+function buildProxy () {
+ return new Promise((resolve, reject) => {
+ const server = proxy(createServer())
+ server.listen(0, () => resolve(server))
+ })
+}
+```
+
+### Connect with authentication
+
+```js
+import { Client } from 'undici'
+import { createServer } from 'http'
+import proxy from 'proxy'
+
+const server = await buildServer()
+const proxyServer = await buildProxy()
+
+const serverUrl = `http://localhost:${server.address().port}`
+const proxyUrl = `http://localhost:${proxyServer.address().port}`
+
+proxyServer.authenticate = function (req, fn) {
+ fn(null, req.headers['proxy-authorization'] === `Basic ${Buffer.from('user:pass').toString('base64')}`)
+}
+
+server.on('request', (req, res) => {
+ console.log(req.url) // '/hello?foo=bar'
+ res.setHeader('content-type', 'application/json')
+ res.end(JSON.stringify({ hello: 'world' }))
+})
+
+const client = new Client(proxyUrl)
+
+const response = await client.request({
+ method: 'GET',
+ path: serverUrl + '/hello?foo=bar',
+ headers: {
+ 'proxy-authorization': `Basic ${Buffer.from('user:pass').toString('base64')}`
+ }
+})
+
+response.body.setEncoding('utf8')
+let data = ''
+for await (const chunk of response.body) {
+ data += chunk
+}
+console.log(response.statusCode) // 200
+console.log(JSON.parse(data)) // { hello: 'world' }
+
+server.close()
+proxyServer.close()
+client.close()
+
+function buildServer () {
+ return new Promise((resolve, reject) => {
+ const server = createServer()
+ server.listen(0, () => resolve(server))
+ })
+}
+
+function buildProxy () {
+ return new Promise((resolve, reject) => {
+ const server = proxy(createServer())
+ server.listen(0, () => resolve(server))
+ })
+}
+```
+
diff --git a/node_modules/undici/docs/best-practices/writing-tests.md b/node_modules/undici/docs/best-practices/writing-tests.md
new file mode 100644
index 0000000..57549de
--- /dev/null
+++ b/node_modules/undici/docs/best-practices/writing-tests.md
@@ -0,0 +1,20 @@
+# Writing tests
+
+Undici is tuned for a production use case and its default will keep
+a socket open for a few seconds after an HTTP request is completed to
+remove the overhead of opening up a new socket. These settings that makes
+Undici shine in production are not a good fit for using Undici in automated
+tests, as it will result in longer execution times.
+
+The following are good defaults that will keep the socket open for only 10ms:
+
+```js
+import { request, setGlobalDispatcher, Agent } from 'undici'
+
+const agent = new Agent({
+ keepAliveTimeout: 10, // milliseconds
+ keepAliveMaxTimeout: 10 // milliseconds
+})
+
+setGlobalDispatcher(agent)
+```
diff --git a/node_modules/undici/index-fetch.js b/node_modules/undici/index-fetch.js
new file mode 100644
index 0000000..0d59d25
--- /dev/null
+++ b/node_modules/undici/index-fetch.js
@@ -0,0 +1,16 @@
+'use strict'
+
+const fetchImpl = require('./lib/fetch').fetch
+
+module.exports.fetch = async function fetch (resource) {
+ try {
+ return await fetchImpl(...arguments)
+ } catch (err) {
+ Error.captureStackTrace(err, this)
+ throw err
+ }
+}
+module.exports.FormData = require('./lib/fetch/formdata').FormData
+module.exports.Headers = require('./lib/fetch/headers').Headers
+module.exports.Response = require('./lib/fetch/response').Response
+module.exports.Request = require('./lib/fetch/request').Request
diff --git a/node_modules/undici/index.d.ts b/node_modules/undici/index.d.ts
new file mode 100644
index 0000000..0730677
--- /dev/null
+++ b/node_modules/undici/index.d.ts
@@ -0,0 +1,57 @@
+import Dispatcher from'./types/dispatcher'
+import { setGlobalDispatcher, getGlobalDispatcher } from './types/global-dispatcher'
+import { setGlobalOrigin, getGlobalOrigin } from './types/global-origin'
+import Pool from'./types/pool'
+import { RedirectHandler, DecoratorHandler } from './types/handlers'
+
+import BalancedPool from './types/balanced-pool'
+import Client from'./types/client'
+import buildConnector from'./types/connector'
+import errors from'./types/errors'
+import Agent from'./types/agent'
+import MockClient from'./types/mock-client'
+import MockPool from'./types/mock-pool'
+import MockAgent from'./types/mock-agent'
+import mockErrors from'./types/mock-errors'
+import ProxyAgent from'./types/proxy-agent'
+import { request, pipeline, stream, connect, upgrade } from './types/api'
+
+export * from './types/cookies'
+export * from './types/fetch'
+export * from './types/file'
+export * from './types/filereader'
+export * from './types/formdata'
+export * from './types/diagnostics-channel'
+export * from './types/websocket'
+export * from './types/content-type'
+export * from './types/cache'
+export { Interceptable } from './types/mock-interceptor'
+
+export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, MockClient, MockPool, MockAgent, mockErrors, ProxyAgent, RedirectHandler, DecoratorHandler }
+export default Undici
+
+declare namespace Undici {
+ var Dispatcher: typeof import('./types/dispatcher').default
+ var Pool: typeof import('./types/pool').default;
+ var RedirectHandler: typeof import ('./types/handlers').RedirectHandler
+ var DecoratorHandler: typeof import ('./types/handlers').DecoratorHandler
+ var createRedirectInterceptor: typeof import ('./types/interceptors').createRedirectInterceptor
+ var BalancedPool: typeof import('./types/balanced-pool').default;
+ var Client: typeof import('./types/client').default;
+ var buildConnector: typeof import('./types/connector').default;
+ var errors: typeof import('./types/errors').default;
+ var Agent: typeof import('./types/agent').default;
+ var setGlobalDispatcher: typeof import('./types/global-dispatcher').setGlobalDispatcher;
+ var getGlobalDispatcher: typeof import('./types/global-dispatcher').getGlobalDispatcher;
+ var request: typeof import('./types/api').request;
+ var stream: typeof import('./types/api').stream;
+ var pipeline: typeof import('./types/api').pipeline;
+ var connect: typeof import('./types/api').connect;
+ var upgrade: typeof import('./types/api').upgrade;
+ var MockClient: typeof import('./types/mock-client').default;
+ var MockPool: typeof import('./types/mock-pool').default;
+ var MockAgent: typeof import('./types/mock-agent').default;
+ var mockErrors: typeof import('./types/mock-errors').default;
+ var fetch: typeof import('./types/fetch').fetch;
+ var caches: typeof import('./types/cache').caches;
+}
diff --git a/node_modules/undici/index.js b/node_modules/undici/index.js
new file mode 100644
index 0000000..7e8831c
--- /dev/null
+++ b/node_modules/undici/index.js
@@ -0,0 +1,162 @@
+'use strict'
+
+const Client = require('./lib/client')
+const Dispatcher = require('./lib/dispatcher')
+const errors = require('./lib/core/errors')
+const Pool = require('./lib/pool')
+const BalancedPool = require('./lib/balanced-pool')
+const Agent = require('./lib/agent')
+const util = require('./lib/core/util')
+const { InvalidArgumentError } = errors
+const api = require('./lib/api')
+const buildConnector = require('./lib/core/connect')
+const MockClient = require('./lib/mock/mock-client')
+const MockAgent = require('./lib/mock/mock-agent')
+const MockPool = require('./lib/mock/mock-pool')
+const mockErrors = require('./lib/mock/mock-errors')
+const ProxyAgent = require('./lib/proxy-agent')
+const { getGlobalDispatcher, setGlobalDispatcher } = require('./lib/global')
+const DecoratorHandler = require('./lib/handler/DecoratorHandler')
+const RedirectHandler = require('./lib/handler/RedirectHandler')
+const createRedirectInterceptor = require('./lib/interceptor/redirectInterceptor')
+
+let hasCrypto
+try {
+ require('crypto')
+ hasCrypto = true
+} catch {
+ hasCrypto = false
+}
+
+Object.assign(Dispatcher.prototype, api)
+
+module.exports.Dispatcher = Dispatcher
+module.exports.Client = Client
+module.exports.Pool = Pool
+module.exports.BalancedPool = BalancedPool
+module.exports.Agent = Agent
+module.exports.ProxyAgent = ProxyAgent
+
+module.exports.DecoratorHandler = DecoratorHandler
+module.exports.RedirectHandler = RedirectHandler
+module.exports.createRedirectInterceptor = createRedirectInterceptor
+
+module.exports.buildConnector = buildConnector
+module.exports.errors = errors
+
+function makeDispatcher (fn) {
+ return (url, opts, handler) => {
+ if (typeof opts === 'function') {
+ handler = opts
+ opts = null
+ }
+
+ if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) {
+ throw new InvalidArgumentError('invalid url')
+ }
+
+ if (opts != null && typeof opts !== 'object') {
+ throw new InvalidArgumentError('invalid opts')
+ }
+
+ if (opts && opts.path != null) {
+ if (typeof opts.path !== 'string') {
+ throw new InvalidArgumentError('invalid opts.path')
+ }
+
+ let path = opts.path
+ if (!opts.path.startsWith('/')) {
+ path = `/${path}`
+ }
+
+ url = new URL(util.parseOrigin(url).origin + path)
+ } else {
+ if (!opts) {
+ opts = typeof url === 'object' ? url : {}
+ }
+
+ url = util.parseURL(url)
+ }
+
+ const { agent, dispatcher = getGlobalDispatcher() } = opts
+
+ if (agent) {
+ throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?')
+ }
+
+ return fn.call(dispatcher, {
+ ...opts,
+ origin: url.origin,
+ path: url.search ? `${url.pathname}${url.search}` : url.pathname,
+ method: opts.method || (opts.body ? 'PUT' : 'GET')
+ }, handler)
+ }
+}
+
+module.exports.setGlobalDispatcher = setGlobalDispatcher
+module.exports.getGlobalDispatcher = getGlobalDispatcher
+
+if (util.nodeMajor > 16 || (util.nodeMajor === 16 && util.nodeMinor >= 8)) {
+ let fetchImpl = null
+ module.exports.fetch = async function fetch (resource) {
+ if (!fetchImpl) {
+ fetchImpl = require('./lib/fetch').fetch
+ }
+
+ try {
+ return await fetchImpl(...arguments)
+ } catch (err) {
+ Error.captureStackTrace(err, this)
+ throw err
+ }
+ }
+ module.exports.Headers = require('./lib/fetch/headers').Headers
+ module.exports.Response = require('./lib/fetch/response').Response
+ module.exports.Request = require('./lib/fetch/request').Request
+ module.exports.FormData = require('./lib/fetch/formdata').FormData
+ module.exports.File = require('./lib/fetch/file').File
+ module.exports.FileReader = require('./lib/fileapi/filereader').FileReader
+
+ const { setGlobalOrigin, getGlobalOrigin } = require('./lib/fetch/global')
+
+ module.exports.setGlobalOrigin = setGlobalOrigin
+ module.exports.getGlobalOrigin = getGlobalOrigin
+
+ const { CacheStorage } = require('./lib/cache/cachestorage')
+ const { kConstruct } = require('./lib/cache/symbols')
+
+ // Cache & CacheStorage are tightly coupled with fetch. Even if it may run
+ // in an older version of Node, it doesn't have any use without fetch.
+ module.exports.caches = new CacheStorage(kConstruct)
+}
+
+if (util.nodeMajor >= 16) {
+ const { deleteCookie, getCookies, getSetCookies, setCookie } = require('./lib/cookies')
+
+ module.exports.deleteCookie = deleteCookie
+ module.exports.getCookies = getCookies
+ module.exports.getSetCookies = getSetCookies
+ module.exports.setCookie = setCookie
+
+ const { parseMIMEType, serializeAMimeType } = require('./lib/fetch/dataURL')
+
+ module.exports.parseMIMEType = parseMIMEType
+ module.exports.serializeAMimeType = serializeAMimeType
+}
+
+if (util.nodeMajor >= 18 && hasCrypto) {
+ const { WebSocket } = require('./lib/websocket/websocket')
+
+ module.exports.WebSocket = WebSocket
+}
+
+module.exports.request = makeDispatcher(api.request)
+module.exports.stream = makeDispatcher(api.stream)
+module.exports.pipeline = makeDispatcher(api.pipeline)
+module.exports.connect = makeDispatcher(api.connect)
+module.exports.upgrade = makeDispatcher(api.upgrade)
+
+module.exports.MockClient = MockClient
+module.exports.MockPool = MockPool
+module.exports.MockAgent = MockAgent
+module.exports.mockErrors = mockErrors
diff --git a/node_modules/undici/lib/agent.js b/node_modules/undici/lib/agent.js
new file mode 100644
index 0000000..0b18f2a
--- /dev/null
+++ b/node_modules/undici/lib/agent.js
@@ -0,0 +1,148 @@
+'use strict'
+
+const { InvalidArgumentError } = require('./core/errors')
+const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require('./core/symbols')
+const DispatcherBase = require('./dispatcher-base')
+const Pool = require('./pool')
+const Client = require('./client')
+const util = require('./core/util')
+const createRedirectInterceptor = require('./interceptor/redirectInterceptor')
+const { WeakRef, FinalizationRegistry } = require('./compat/dispatcher-weakref')()
+
+const kOnConnect = Symbol('onConnect')
+const kOnDisconnect = Symbol('onDisconnect')
+const kOnConnectionError = Symbol('onConnectionError')
+const kMaxRedirections = Symbol('maxRedirections')
+const kOnDrain = Symbol('onDrain')
+const kFactory = Symbol('factory')
+const kFinalizer = Symbol('finalizer')
+const kOptions = Symbol('options')
+
+function defaultFactory (origin, opts) {
+ return opts && opts.connections === 1
+ ? new Client(origin, opts)
+ : new Pool(origin, opts)
+}
+
+class Agent extends DispatcherBase {
+ constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) {
+ super()
+
+ if (typeof factory !== 'function') {
+ throw new InvalidArgumentError('factory must be a function.')
+ }
+
+ if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {
+ throw new InvalidArgumentError('connect must be a function or an object')
+ }
+
+ if (!Number.isInteger(maxRedirections) || maxRedirections < 0) {
+ throw new InvalidArgumentError('maxRedirections must be a positive number')
+ }
+
+ if (connect && typeof connect !== 'function') {
+ connect = { ...connect }
+ }
+
+ this[kInterceptors] = options.interceptors && options.interceptors.Agent && Array.isArray(options.interceptors.Agent)
+ ? options.interceptors.Agent
+ : [createRedirectInterceptor({ maxRedirections })]
+
+ this[kOptions] = { ...util.deepClone(options), connect }
+ this[kOptions].interceptors = options.interceptors
+ ? { ...options.interceptors }
+ : undefined
+ this[kMaxRedirections] = maxRedirections
+ this[kFactory] = factory
+ this[kClients] = new Map()
+ this[kFinalizer] = new FinalizationRegistry(/* istanbul ignore next: gc is undeterministic */ key => {
+ const ref = this[kClients].get(key)
+ if (ref !== undefined && ref.deref() === undefined) {
+ this[kClients].delete(key)
+ }
+ })
+
+ const agent = this
+
+ this[kOnDrain] = (origin, targets) => {
+ agent.emit('drain', origin, [agent, ...targets])
+ }
+
+ this[kOnConnect] = (origin, targets) => {
+ agent.emit('connect', origin, [agent, ...targets])
+ }
+
+ this[kOnDisconnect] = (origin, targets, err) => {
+ agent.emit('disconnect', origin, [agent, ...targets], err)
+ }
+
+ this[kOnConnectionError] = (origin, targets, err) => {
+ agent.emit('connectionError', origin, [agent, ...targets], err)
+ }
+ }
+
+ get [kRunning] () {
+ let ret = 0
+ for (const ref of this[kClients].values()) {
+ const client = ref.deref()
+ /* istanbul ignore next: gc is undeterministic */
+ if (client) {
+ ret += client[kRunning]
+ }
+ }
+ return ret
+ }
+
+ [kDispatch] (opts, handler) {
+ let key
+ if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) {
+ key = String(opts.origin)
+ } else {
+ throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.')
+ }
+
+ const ref = this[kClients].get(key)
+
+ let dispatcher = ref ? ref.deref() : null
+ if (!dispatcher) {
+ dispatcher = this[kFactory](opts.origin, this[kOptions])
+ .on('drain', this[kOnDrain])
+ .on('connect', this[kOnConnect])
+ .on('disconnect', this[kOnDisconnect])
+ .on('connectionError', this[kOnConnectionError])
+
+ this[kClients].set(key, new WeakRef(dispatcher))
+ this[kFinalizer].register(dispatcher, key)
+ }
+
+ return dispatcher.dispatch(opts, handler)
+ }
+
+ async [kClose] () {
+ const closePromises = []
+ for (const ref of this[kClients].values()) {
+ const client = ref.deref()
+ /* istanbul ignore else: gc is undeterministic */
+ if (client) {
+ closePromises.push(client.close())
+ }
+ }
+
+ await Promise.all(closePromises)
+ }
+
+ async [kDestroy] (err) {
+ const destroyPromises = []
+ for (const ref of this[kClients].values()) {
+ const client = ref.deref()
+ /* istanbul ignore else: gc is undeterministic */
+ if (client) {
+ destroyPromises.push(client.destroy(err))
+ }
+ }
+
+ await Promise.all(destroyPromises)
+ }
+}
+
+module.exports = Agent
diff --git a/node_modules/undici/lib/api/abort-signal.js b/node_modules/undici/lib/api/abort-signal.js
new file mode 100644
index 0000000..895629a
--- /dev/null
+++ b/node_modules/undici/lib/api/abort-signal.js
@@ -0,0 +1,57 @@
+const { RequestAbortedError } = require('../core/errors')
+
+const kListener = Symbol('kListener')
+const kSignal = Symbol('kSignal')
+
+function abort (self) {
+ if (self.abort) {
+ self.abort()
+ } else {
+ self.onError(new RequestAbortedError())
+ }
+}
+
+function addSignal (self, signal) {
+ self[kSignal] = null
+ self[kListener] = null
+
+ if (!signal) {
+ return
+ }
+
+ if (signal.aborted) {
+ abort(self)
+ return
+ }
+
+ self[kSignal] = signal
+ self[kListener] = () => {
+ abort(self)
+ }
+
+ if ('addEventListener' in self[kSignal]) {
+ self[kSignal].addEventListener('abort', self[kListener])
+ } else {
+ self[kSignal].addListener('abort', self[kListener])
+ }
+}
+
+function removeSignal (self) {
+ if (!self[kSignal]) {
+ return
+ }
+
+ if ('removeEventListener' in self[kSignal]) {
+ self[kSignal].removeEventListener('abort', self[kListener])
+ } else {
+ self[kSignal].removeListener('abort', self[kListener])
+ }
+
+ self[kSignal] = null
+ self[kListener] = null
+}
+
+module.exports = {
+ addSignal,
+ removeSignal
+}
diff --git a/node_modules/undici/lib/api/api-connect.js b/node_modules/undici/lib/api/api-connect.js
new file mode 100644
index 0000000..0503b1a
--- /dev/null
+++ b/node_modules/undici/lib/api/api-connect.js
@@ -0,0 +1,98 @@
+'use strict'
+
+const { InvalidArgumentError, RequestAbortedError, SocketError } = require('../core/errors')
+const { AsyncResource } = require('async_hooks')
+const util = require('../core/util')
+const { addSignal, removeSignal } = require('./abort-signal')
+
+class ConnectHandler extends AsyncResource {
+ constructor (opts, callback) {
+ if (!opts || typeof opts !== 'object') {
+ throw new InvalidArgumentError('invalid opts')
+ }
+
+ if (typeof callback !== 'function') {
+ throw new InvalidArgumentError('invalid callback')
+ }
+
+ const { signal, opaque, responseHeaders } = opts
+
+ if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {
+ throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')
+ }
+
+ super('UNDICI_CONNECT')
+
+ this.opaque = opaque || null
+ this.responseHeaders = responseHeaders || null
+ this.callback = callback
+ this.abort = null
+
+ addSignal(this, signal)
+ }
+
+ onConnect (abort, context) {
+ if (!this.callback) {
+ throw new RequestAbortedError()
+ }
+
+ this.abort = abort
+ this.context = context
+ }
+
+ onHeaders () {
+ throw new SocketError('bad connect', null)
+ }
+
+ onUpgrade (statusCode, rawHeaders, socket) {
+ const { callback, opaque, context } = this
+
+ removeSignal(this)
+
+ this.callback = null
+ const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)
+ this.runInAsyncScope(callback, null, null, {
+ statusCode,
+ headers,
+ socket,
+ opaque,
+ context
+ })
+ }
+
+ onError (err) {
+ const { callback, opaque } = this
+
+ removeSignal(this)
+
+ if (callback) {
+ this.callback = null
+ queueMicrotask(() => {
+ this.runInAsyncScope(callback, null, err, { opaque })
+ })
+ }
+ }
+}
+
+function connect (opts, callback) {
+ if (callback === undefined) {
+ return new Promise((resolve, reject) => {
+ connect.call(this, opts, (err, data) => {
+ return err ? reject(err) : resolve(data)
+ })
+ })
+ }
+
+ try {
+ const connectHandler = new ConnectHandler(opts, callback)
+ this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler)
+ } catch (err) {
+ if (typeof callback !== 'function') {
+ throw err
+ }
+ const opaque = opts && opts.opaque
+ queueMicrotask(() => callback(err, { opaque }))
+ }
+}
+
+module.exports = connect
diff --git a/node_modules/undici/lib/api/api-pipeline.js b/node_modules/undici/lib/api/api-pipeline.js
new file mode 100644
index 0000000..af4a180
--- /dev/null
+++ b/node_modules/undici/lib/api/api-pipeline.js
@@ -0,0 +1,249 @@
+'use strict'
+
+const {
+ Readable,
+ Duplex,
+ PassThrough
+} = require('stream')
+const {
+ InvalidArgumentError,
+ InvalidReturnValueError,
+ RequestAbortedError
+} = require('../core/errors')
+const util = require('../core/util')
+const { AsyncResource } = require('async_hooks')
+const { addSignal, removeSignal } = require('./abort-signal')
+const assert = require('assert')
+
+const kResume = Symbol('resume')
+
+class PipelineRequest extends Readable {
+ constructor () {
+ super({ autoDestroy: true })
+
+ this[kResume] = null
+ }
+
+ _read () {
+ const { [kResume]: resume } = this
+
+ if (resume) {
+ this[kResume] = null
+ resume()
+ }
+ }
+
+ _destroy (err, callback) {
+ this._read()
+
+ callback(err)
+ }
+}
+
+class PipelineResponse extends Readable {
+ constructor (resume) {
+ super({ autoDestroy: true })
+ this[kResume] = resume
+ }
+
+ _read () {
+ this[kResume]()
+ }
+
+ _destroy (err, callback) {
+ if (!err && !this._readableState.endEmitted) {
+ err = new RequestAbortedError()
+ }
+
+ callback(err)
+ }
+}
+
+class PipelineHandler extends AsyncResource {
+ constructor (opts, handler) {
+ if (!opts || typeof opts !== 'object') {
+ throw new InvalidArgumentError('invalid opts')
+ }
+
+ if (typeof handler !== 'function') {
+ throw new InvalidArgumentError('invalid handler')
+ }
+
+ const { signal, method, opaque, onInfo, responseHeaders } = opts
+
+ if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {
+ throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')
+ }
+
+ if (method === 'CONNECT') {
+ throw new InvalidArgumentError('invalid method')
+ }
+
+ if (onInfo && typeof onInfo !== 'function') {
+ throw new InvalidArgumentError('invalid onInfo callback')
+ }
+
+ super('UNDICI_PIPELINE')
+
+ this.opaque = opaque || null
+ this.responseHeaders = responseHeaders || null
+ this.handler = handler
+ this.abort = null
+ this.context = null
+ this.onInfo = onInfo || null
+
+ this.req = new PipelineRequest().on('error', util.nop)
+
+ this.ret = new Duplex({
+ readableObjectMode: opts.objectMode,
+ autoDestroy: true,
+ read: () => {
+ const { body } = this
+
+ if (body && body.resume) {
+ body.resume()
+ }
+ },
+ write: (chunk, encoding, callback) => {
+ const { req } = this
+
+ if (req.push(chunk, encoding) || req._readableState.destroyed) {
+ callback()
+ } else {
+ req[kResume] = callback
+ }
+ },
+ destroy: (err, callback) => {
+ const { body, req, res, ret, abort } = this
+
+ if (!err && !ret._readableState.endEmitted) {
+ err = new RequestAbortedError()
+ }
+
+ if (abort && err) {
+ abort()
+ }
+
+ util.destroy(body, err)
+ util.destroy(req, err)
+ util.destroy(res, err)
+
+ removeSignal(this)
+
+ callback(err)
+ }
+ }).on('prefinish', () => {
+ const { req } = this
+
+ // Node < 15 does not call _final in same tick.
+ req.push(null)
+ })
+
+ this.res = null
+
+ addSignal(this, signal)
+ }
+
+ onConnect (abort, context) {
+ const { ret, res } = this
+
+ assert(!res, 'pipeline cannot be retried')
+
+ if (ret.destroyed) {
+ throw new RequestAbortedError()
+ }
+
+ this.abort = abort
+ this.context = context
+ }
+
+ onHeaders (statusCode, rawHeaders, resume) {
+ const { opaque, handler, context } = this
+
+ if (statusCode < 200) {
+ if (this.onInfo) {
+ const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)
+ this.onInfo({ statusCode, headers })
+ }
+ return
+ }
+
+ this.res = new PipelineResponse(resume)
+
+ let body
+ try {
+ this.handler = null
+ const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)
+ body = this.runInAsyncScope(handler, null, {
+ statusCode,
+ headers,
+ opaque,
+ body: this.res,
+ context
+ })
+ } catch (err) {
+ this.res.on('error', util.nop)
+ throw err
+ }
+
+ if (!body || typeof body.on !== 'function') {
+ throw new InvalidReturnValueError('expected Readable')
+ }
+
+ body
+ .on('data', (chunk) => {
+ const { ret, body } = this
+
+ if (!ret.push(chunk) && body.pause) {
+ body.pause()
+ }
+ })
+ .on('error', (err) => {
+ const { ret } = this
+
+ util.destroy(ret, err)
+ })
+ .on('end', () => {
+ const { ret } = this
+
+ ret.push(null)
+ })
+ .on('close', () => {
+ const { ret } = this
+
+ if (!ret._readableState.ended) {
+ util.destroy(ret, new RequestAbortedError())
+ }
+ })
+
+ this.body = body
+ }
+
+ onData (chunk) {
+ const { res } = this
+ return res.push(chunk)
+ }
+
+ onComplete (trailers) {
+ const { res } = this
+ res.push(null)
+ }
+
+ onError (err) {
+ const { ret } = this
+ this.handler = null
+ util.destroy(ret, err)
+ }
+}
+
+function pipeline (opts, handler) {
+ try {
+ const pipelineHandler = new PipelineHandler(opts, handler)
+ this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler)
+ return pipelineHandler.ret
+ } catch (err) {
+ return new PassThrough().destroy(err)
+ }
+}
+
+module.exports = pipeline
diff --git a/node_modules/undici/lib/api/api-request.js b/node_modules/undici/lib/api/api-request.js
new file mode 100644
index 0000000..71d7e92
--- /dev/null
+++ b/node_modules/undici/lib/api/api-request.js
@@ -0,0 +1,180 @@
+'use strict'
+
+const Readable = require('./readable')
+const {
+ InvalidArgumentError,
+ RequestAbortedError
+} = require('../core/errors')
+const util = require('../core/util')
+const { getResolveErrorBodyCallback } = require('./util')
+const { AsyncResource } = require('async_hooks')
+const { addSignal, removeSignal } = require('./abort-signal')
+
+class RequestHandler extends AsyncResource {
+ constructor (opts, callback) {
+ if (!opts || typeof opts !== 'object') {
+ throw new InvalidArgumentError('invalid opts')
+ }
+
+ const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts
+
+ try {
+ if (typeof callback !== 'function') {
+ throw new InvalidArgumentError('invalid callback')
+ }
+
+ if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) {
+ throw new InvalidArgumentError('invalid highWaterMark')
+ }
+
+ if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {
+ throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')
+ }
+
+ if (method === 'CONNECT') {
+ throw new InvalidArgumentError('invalid method')
+ }
+
+ if (onInfo && typeof onInfo !== 'function') {
+ throw new InvalidArgumentError('invalid onInfo callback')
+ }
+
+ super('UNDICI_REQUEST')
+ } catch (err) {
+ if (util.isStream(body)) {
+ util.destroy(body.on('error', util.nop), err)
+ }
+ throw err
+ }
+
+ this.responseHeaders = responseHeaders || null
+ this.opaque = opaque || null
+ this.callback = callback
+ this.res = null
+ this.abort = null
+ this.body = body
+ this.trailers = {}
+ this.context = null
+ this.onInfo = onInfo || null
+ this.throwOnError = throwOnError
+ this.highWaterMark = highWaterMark
+
+ if (util.isStream(body)) {
+ body.on('error', (err) => {
+ this.onError(err)
+ })
+ }
+
+ addSignal(this, signal)
+ }
+
+ onConnect (abort, context) {
+ if (!this.callback) {
+ throw new RequestAbortedError()
+ }
+
+ this.abort = abort
+ this.context = context
+ }
+
+ onHeaders (statusCode, rawHeaders, resume, statusMessage) {
+ const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this
+
+ const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)
+
+ if (statusCode < 200) {
+ if (this.onInfo) {
+ this.onInfo({ statusCode, headers })
+ }
+ return
+ }
+
+ const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers
+ const contentType = parsedHeaders['content-type']
+ const body = new Readable({ resume, abort, contentType, highWaterMark })
+
+ this.callback = null
+ this.res = body
+
+ if (callback !== null) {
+ if (this.throwOnError && statusCode >= 400) {
+ this.runInAsyncScope(getResolveErrorBodyCallback, null,
+ { callback, body, contentType, statusCode, statusMessage, headers }
+ )
+ } else {
+ this.runInAsyncScope(callback, null, null, {
+ statusCode,
+ headers,
+ trailers: this.trailers,
+ opaque,
+ body,
+ context
+ })
+ }
+ }
+ }
+
+ onData (chunk) {
+ const { res } = this
+ return res.push(chunk)
+ }
+
+ onComplete (trailers) {
+ const { res } = this
+
+ removeSignal(this)
+
+ util.parseHeaders(trailers, this.trailers)
+
+ res.push(null)
+ }
+
+ onError (err) {
+ const { res, callback, body, opaque } = this
+
+ removeSignal(this)
+
+ if (callback) {
+ // TODO: Does this need queueMicrotask?
+ this.callback = null
+ queueMicrotask(() => {
+ this.runInAsyncScope(callback, null, err, { opaque })
+ })
+ }
+
+ if (res) {
+ this.res = null
+ // Ensure all queued handlers are invoked before destroying res.
+ queueMicrotask(() => {
+ util.destroy(res, err)
+ })
+ }
+
+ if (body) {
+ this.body = null
+ util.destroy(body, err)
+ }
+ }
+}
+
+function request (opts, callback) {
+ if (callback === undefined) {
+ return new Promise((resolve, reject) => {
+ request.call(this, opts, (err, data) => {
+ return err ? reject(err) : resolve(data)
+ })
+ })
+ }
+
+ try {
+ this.dispatch(opts, new RequestHandler(opts, callback))
+ } catch (err) {
+ if (typeof callback !== 'function') {
+ throw err
+ }
+ const opaque = opts && opts.opaque
+ queueMicrotask(() => callback(err, { opaque }))
+ }
+}
+
+module.exports = request
diff --git a/node_modules/undici/lib/api/api-stream.js b/node_modules/undici/lib/api/api-stream.js
new file mode 100644
index 0000000..3a8e71a
--- /dev/null
+++ b/node_modules/undici/lib/api/api-stream.js
@@ -0,0 +1,212 @@
+'use strict'
+
+const { finished, PassThrough } = require('stream')
+const {
+ InvalidArgumentError,
+ InvalidReturnValueError,
+ RequestAbortedError
+} = require('../core/errors')
+const util = require('../core/util')
+const { getResolveErrorBodyCallback } = require('./util')
+const { AsyncResource } = require('async_hooks')
+const { addSignal, removeSignal } = require('./abort-signal')
+
+class StreamHandler extends AsyncResource {
+ constructor (opts, factory, callback) {
+ if (!opts || typeof opts !== 'object') {
+ throw new InvalidArgumentError('invalid opts')
+ }
+
+ const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts
+
+ try {
+ if (typeof callback !== 'function') {
+ throw new InvalidArgumentError('invalid callback')
+ }
+
+ if (typeof factory !== 'function') {
+ throw new InvalidArgumentError('invalid factory')
+ }
+
+ if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {
+ throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')
+ }
+
+ if (method === 'CONNECT') {
+ throw new InvalidArgumentError('invalid method')
+ }
+
+ if (onInfo && typeof onInfo !== 'function') {
+ throw new InvalidArgumentError('invalid onInfo callback')
+ }
+
+ super('UNDICI_STREAM')
+ } catch (err) {
+ if (util.isStream(body)) {
+ util.destroy(body.on('error', util.nop), err)
+ }
+ throw err
+ }
+
+ this.responseHeaders = responseHeaders || null
+ this.opaque = opaque || null
+ this.factory = factory
+ this.callback = callback
+ this.res = null
+ this.abort = null
+ this.context = null
+ this.trailers = null
+ this.body = body
+ this.onInfo = onInfo || null
+ this.throwOnError = throwOnError || false
+
+ if (util.isStream(body)) {
+ body.on('error', (err) => {
+ this.onError(err)
+ })
+ }
+
+ addSignal(this, signal)
+ }
+
+ onConnect (abort, context) {
+ if (!this.callback) {
+ throw new RequestAbortedError()
+ }
+
+ this.abort = abort
+ this.context = context
+ }
+
+ onHeaders (statusCode, rawHeaders, resume, statusMessage) {
+ const { factory, opaque, context, callback, responseHeaders } = this
+
+ const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)
+
+ if (statusCode < 200) {
+ if (this.onInfo) {
+ this.onInfo({ statusCode, headers })
+ }
+ return
+ }
+
+ this.factory = null
+
+ let res
+
+ if (this.throwOnError && statusCode >= 400) {
+ const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers
+ const contentType = parsedHeaders['content-type']
+ res = new PassThrough()
+
+ this.callback = null
+ this.runInAsyncScope(getResolveErrorBodyCallback, null,
+ { callback, body: res, contentType, statusCode, statusMessage, headers }
+ )
+ } else {
+ res = this.runInAsyncScope(factory, null, {
+ statusCode,
+ headers,
+ opaque,
+ context
+ })
+
+ if (
+ !res ||
+ typeof res.write !== 'function' ||
+ typeof res.end !== 'function' ||
+ typeof res.on !== 'function'
+ ) {
+ throw new InvalidReturnValueError('expected Writable')
+ }
+
+ // TODO: Avoid finished. It registers an unnecessary amount of listeners.
+ finished(res, { readable: false }, (err) => {
+ const { callback, res, opaque, trailers, abort } = this
+
+ this.res = null
+ if (err || !res.readable) {
+ util.destroy(res, err)
+ }
+
+ this.callback = null
+ this.runInAsyncScope(callback, null, err || null, { opaque, trailers })
+
+ if (err) {
+ abort()
+ }
+ })
+ }
+
+ res.on('drain', resume)
+
+ this.res = res
+
+ const needDrain = res.writableNeedDrain !== undefined
+ ? res.writableNeedDrain
+ : res._writableState && res._writableState.needDrain
+
+ return needDrain !== true
+ }
+
+ onData (chunk) {
+ const { res } = this
+
+ return res.write(chunk)
+ }
+
+ onComplete (trailers) {
+ const { res } = this
+
+ removeSignal(this)
+
+ this.trailers = util.parseHeaders(trailers)
+
+ res.end()
+ }
+
+ onError (err) {
+ const { res, callback, opaque, body } = this
+
+ removeSignal(this)
+
+ this.factory = null
+
+ if (res) {
+ this.res = null
+ util.destroy(res, err)
+ } else if (callback) {
+ this.callback = null
+ queueMicrotask(() => {
+ this.runInAsyncScope(callback, null, err, { opaque })
+ })
+ }
+
+ if (body) {
+ this.body = null
+ util.destroy(body, err)
+ }
+ }
+}
+
+function stream (opts, factory, callback) {
+ if (callback === undefined) {
+ return new Promise((resolve, reject) => {
+ stream.call(this, opts, factory, (err, data) => {
+ return err ? reject(err) : resolve(data)
+ })
+ })
+ }
+
+ try {
+ this.dispatch(opts, new StreamHandler(opts, factory, callback))
+ } catch (err) {
+ if (typeof callback !== 'function') {
+ throw err
+ }
+ const opaque = opts && opts.opaque
+ queueMicrotask(() => callback(err, { opaque }))
+ }
+}
+
+module.exports = stream
diff --git a/node_modules/undici/lib/api/api-upgrade.js b/node_modules/undici/lib/api/api-upgrade.js
new file mode 100644
index 0000000..ef783e8
--- /dev/null
+++ b/node_modules/undici/lib/api/api-upgrade.js
@@ -0,0 +1,105 @@
+'use strict'
+
+const { InvalidArgumentError, RequestAbortedError, SocketError } = require('../core/errors')
+const { AsyncResource } = require('async_hooks')
+const util = require('../core/util')
+const { addSignal, removeSignal } = require('./abort-signal')
+const assert = require('assert')
+
+class UpgradeHandler extends AsyncResource {
+ constructor (opts, callback) {
+ if (!opts || typeof opts !== 'object') {
+ throw new InvalidArgumentError('invalid opts')
+ }
+
+ if (typeof callback !== 'function') {
+ throw new InvalidArgumentError('invalid callback')
+ }
+
+ const { signal, opaque, responseHeaders } = opts
+
+ if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {
+ throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')
+ }
+
+ super('UNDICI_UPGRADE')
+
+ this.responseHeaders = responseHeaders || null
+ this.opaque = opaque || null
+ this.callback = callback
+ this.abort = null
+ this.context = null
+
+ addSignal(this, signal)
+ }
+
+ onConnect (abort, context) {
+ if (!this.callback) {
+ throw new RequestAbortedError()
+ }
+
+ this.abort = abort
+ this.context = null
+ }
+
+ onHeaders () {
+ throw new SocketError('bad upgrade', null)
+ }
+
+ onUpgrade (statusCode, rawHeaders, socket) {
+ const { callback, opaque, context } = this
+
+ assert.strictEqual(statusCode, 101)
+
+ removeSignal(this)
+
+ this.callback = null
+ const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)
+ this.runInAsyncScope(callback, null, null, {
+ headers,
+ socket,
+ opaque,
+ context
+ })
+ }
+
+ onError (err) {
+ const { callback, opaque } = this
+
+ removeSignal(this)
+
+ if (callback) {
+ this.callback = null
+ queueMicrotask(() => {
+ this.runInAsyncScope(callback, null, err, { opaque })
+ })
+ }
+ }
+}
+
+function upgrade (opts, callback) {
+ if (callback === undefined) {
+ return new Promise((resolve, reject) => {
+ upgrade.call(this, opts, (err, data) => {
+ return err ? reject(err) : resolve(data)
+ })
+ })
+ }
+
+ try {
+ const upgradeHandler = new UpgradeHandler(opts, callback)
+ this.dispatch({
+ ...opts,
+ method: opts.method || 'GET',
+ upgrade: opts.protocol || 'Websocket'
+ }, upgradeHandler)
+ } catch (err) {
+ if (typeof callback !== 'function') {
+ throw err
+ }
+ const opaque = opts && opts.opaque
+ queueMicrotask(() => callback(err, { opaque }))
+ }
+}
+
+module.exports = upgrade
diff --git a/node_modules/undici/lib/api/index.js b/node_modules/undici/lib/api/index.js
new file mode 100644
index 0000000..8983a5e
--- /dev/null
+++ b/node_modules/undici/lib/api/index.js
@@ -0,0 +1,7 @@
+'use strict'
+
+module.exports.request = require('./api-request')
+module.exports.stream = require('./api-stream')
+module.exports.pipeline = require('./api-pipeline')
+module.exports.upgrade = require('./api-upgrade')
+module.exports.connect = require('./api-connect')
diff --git a/node_modules/undici/lib/api/readable.js b/node_modules/undici/lib/api/readable.js
new file mode 100644
index 0000000..398a75b
--- /dev/null
+++ b/node_modules/undici/lib/api/readable.js
@@ -0,0 +1,304 @@
+// Ported from https://github.com/nodejs/undici/pull/907
+
+'use strict'
+
+const assert = require('assert')
+const { Readable } = require('stream')
+const { RequestAbortedError, NotSupportedError, InvalidArgumentError } = require('../core/errors')
+const util = require('../core/util')
+const { ReadableStreamFrom, toUSVString } = require('../core/util')
+
+let Blob
+
+const kConsume = Symbol('kConsume')
+const kReading = Symbol('kReading')
+const kBody = Symbol('kBody')
+const kAbort = Symbol('abort')
+const kContentType = Symbol('kContentType')
+
+module.exports = class BodyReadable extends Readable {
+ constructor ({
+ resume,
+ abort,
+ contentType = '',
+ highWaterMark = 64 * 1024 // Same as nodejs fs streams.
+ }) {
+ super({
+ autoDestroy: true,
+ read: resume,
+ highWaterMark
+ })
+
+ this._readableState.dataEmitted = false
+
+ this[kAbort] = abort
+ this[kConsume] = null
+ this[kBody] = null
+ this[kContentType] = contentType
+
+ // Is stream being consumed through Readable API?
+ // This is an optimization so that we avoid checking
+ // for 'data' and 'readable' listeners in the hot path
+ // inside push().
+ this[kReading] = false
+ }
+
+ destroy (err) {
+ if (this.destroyed) {
+ // Node < 16
+ return this
+ }
+
+ if (!err && !this._readableState.endEmitted) {
+ err = new RequestAbortedError()
+ }
+
+ if (err) {
+ this[kAbort]()
+ }
+
+ return super.destroy(err)
+ }
+
+ emit (ev, ...args) {
+ if (ev === 'data') {
+ // Node < 16.7
+ this._readableState.dataEmitted = true
+ } else if (ev === 'error') {
+ // Node < 16
+ this._readableState.errorEmitted = true
+ }
+ return super.emit(ev, ...args)
+ }
+
+ on (ev, ...args) {
+ if (ev === 'data' || ev === 'readable') {
+ this[kReading] = true
+ }
+ return super.on(ev, ...args)
+ }
+
+ addListener (ev, ...args) {
+ return this.on(ev, ...args)
+ }
+
+ off (ev, ...args) {
+ const ret = super.off(ev, ...args)
+ if (ev === 'data' || ev === 'readable') {
+ this[kReading] = (
+ this.listenerCount('data') > 0 ||
+ this.listenerCount('readable') > 0
+ )
+ }
+ return ret
+ }
+
+ removeListener (ev, ...args) {
+ return this.off(ev, ...args)
+ }
+
+ push (chunk) {
+ if (this[kConsume] && chunk !== null && this.readableLength === 0) {
+ consumePush(this[kConsume], chunk)
+ return this[kReading] ? super.push(chunk) : true
+ }
+ return super.push(chunk)
+ }
+
+ // https://fetch.spec.whatwg.org/#dom-body-text
+ async text () {
+ return consume(this, 'text')
+ }
+
+ // https://fetch.spec.whatwg.org/#dom-body-json
+ async json () {
+ return consume(this, 'json')
+ }
+
+ // https://fetch.spec.whatwg.org/#dom-body-blob
+ async blob () {
+ return consume(this, 'blob')
+ }
+
+ // https://fetch.spec.whatwg.org/#dom-body-arraybuffer
+ async arrayBuffer () {
+ return consume(this, 'arrayBuffer')
+ }
+
+ // https://fetch.spec.whatwg.org/#dom-body-formdata
+ async formData () {
+ // TODO: Implement.
+ throw new NotSupportedError()
+ }
+
+ // https://fetch.spec.whatwg.org/#dom-body-bodyused
+ get bodyUsed () {
+ return util.isDisturbed(this)
+ }
+
+ // https://fetch.spec.whatwg.org/#dom-body-body
+ get body () {
+ if (!this[kBody]) {
+ this[kBody] = ReadableStreamFrom(this)
+ if (this[kConsume]) {
+ // TODO: Is this the best way to force a lock?
+ this[kBody].getReader() // Ensure stream is locked.
+ assert(this[kBody].locked)
+ }
+ }
+ return this[kBody]
+ }
+
+ async dump (opts) {
+ let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144
+ const signal = opts && opts.signal
+ const abortFn = () => {
+ this.destroy()
+ }
+ if (signal) {
+ if (typeof signal !== 'object' || !('aborted' in signal)) {
+ throw new InvalidArgumentError('signal must be an AbortSignal')
+ }
+ util.throwIfAborted(signal)
+ signal.addEventListener('abort', abortFn, { once: true })
+ }
+ try {
+ for await (const chunk of this) {
+ util.throwIfAborted(signal)
+ limit -= Buffer.byteLength(chunk)
+ if (limit < 0) {
+ return
+ }
+ }
+ } catch {
+ util.throwIfAborted(signal)
+ } finally {
+ if (signal) {
+ signal.removeEventListener('abort', abortFn)
+ }
+ }
+ }
+}
+
+// https://streams.spec.whatwg.org/#readablestream-locked
+function isLocked (self) {
+ // Consume is an implicit lock.
+ return (self[kBody] && self[kBody].locked === true) || self[kConsume]
+}
+
+// https://fetch.spec.whatwg.org/#body-unusable
+function isUnusable (self) {
+ return util.isDisturbed(self) || isLocked(self)
+}
+
+async function consume (stream, type) {
+ if (isUnusable(stream)) {
+ throw new TypeError('unusable')
+ }
+
+ assert(!stream[kConsume])
+
+ return new Promise((resolve, reject) => {
+ stream[kConsume] = {
+ type,
+ stream,
+ resolve,
+ reject,
+ length: 0,
+ body: []
+ }
+
+ stream
+ .on('error', function (err) {
+ consumeFinish(this[kConsume], err)
+ })
+ .on('close', function () {
+ if (this[kConsume].body !== null) {
+ consumeFinish(this[kConsume], new RequestAbortedError())
+ }
+ })
+
+ process.nextTick(consumeStart, stream[kConsume])
+ })
+}
+
+function consumeStart (consume) {
+ if (consume.body === null) {
+ return
+ }
+
+ const { _readableState: state } = consume.stream
+
+ for (const chunk of state.buffer) {
+ consumePush(consume, chunk)
+ }
+
+ if (state.endEmitted) {
+ consumeEnd(this[kConsume])
+ } else {
+ consume.stream.on('end', function () {
+ consumeEnd(this[kConsume])
+ })
+ }
+
+ consume.stream.resume()
+
+ while (consume.stream.read() != null) {
+ // Loop
+ }
+}
+
+function consumeEnd (consume) {
+ const { type, body, resolve, stream, length } = consume
+
+ try {
+ if (type === 'text') {
+ resolve(toUSVString(Buffer.concat(body)))
+ } else if (type === 'json') {
+ resolve(JSON.parse(Buffer.concat(body)))
+ } else if (type === 'arrayBuffer') {
+ const dst = new Uint8Array(length)
+
+ let pos = 0
+ for (const buf of body) {
+ dst.set(buf, pos)
+ pos += buf.byteLength
+ }
+
+ resolve(dst)
+ } else if (type === 'blob') {
+ if (!Blob) {
+ Blob = require('buffer').Blob
+ }
+ resolve(new Blob(body, { type: stream[kContentType] }))
+ }
+
+ consumeFinish(consume)
+ } catch (err) {
+ stream.destroy(err)
+ }
+}
+
+function consumePush (consume, chunk) {
+ consume.length += chunk.length
+ consume.body.push(chunk)
+}
+
+function consumeFinish (consume, err) {
+ if (consume.body === null) {
+ return
+ }
+
+ if (err) {
+ consume.reject(err)
+ } else {
+ consume.resolve()
+ }
+
+ consume.type = null
+ consume.stream = null
+ consume.resolve = null
+ consume.reject = null
+ consume.length = 0
+ consume.body = null
+}
diff --git a/node_modules/undici/lib/api/util.js b/node_modules/undici/lib/api/util.js
new file mode 100644
index 0000000..bffd702
--- /dev/null
+++ b/node_modules/undici/lib/api/util.js
@@ -0,0 +1,46 @@
+const assert = require('assert')
+const {
+ ResponseStatusCodeError
+} = require('../core/errors')
+const { toUSVString } = require('../core/util')
+
+async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) {
+ assert(body)
+
+ let chunks = []
+ let limit = 0
+
+ for await (const chunk of body) {
+ chunks.push(chunk)
+ limit += chunk.length
+ if (limit > 128 * 1024) {
+ chunks = null
+ break
+ }
+ }
+
+ if (statusCode === 204 || !contentType || !chunks) {
+ process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers))
+ return
+ }
+
+ try {
+ if (contentType.startsWith('application/json')) {
+ const payload = JSON.parse(toUSVString(Buffer.concat(chunks)))
+ process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload))
+ return
+ }
+
+ if (contentType.startsWith('text/')) {
+ const payload = toUSVString(Buffer.concat(chunks))
+ process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload))
+ return
+ }
+ } catch (err) {
+ // Process in a fallback if error
+ }
+
+ process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers))
+}
+
+module.exports = { getResolveErrorBodyCallback }
diff --git a/node_modules/undici/lib/balanced-pool.js b/node_modules/undici/lib/balanced-pool.js
new file mode 100644
index 0000000..10bc6a4
--- /dev/null
+++ b/node_modules/undici/lib/balanced-pool.js
@@ -0,0 +1,190 @@
+'use strict'
+
+const {
+ BalancedPoolMissingUpstreamError,
+ InvalidArgumentError
+} = require('./core/errors')
+const {
+ PoolBase,
+ kClients,
+ kNeedDrain,
+ kAddClient,
+ kRemoveClient,
+ kGetDispatcher
+} = require('./pool-base')
+const Pool = require('./pool')
+const { kUrl, kInterceptors } = require('./core/symbols')
+const { parseOrigin } = require('./core/util')
+const kFactory = Symbol('factory')
+
+const kOptions = Symbol('options')
+const kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor')
+const kCurrentWeight = Symbol('kCurrentWeight')
+const kIndex = Symbol('kIndex')
+const kWeight = Symbol('kWeight')
+const kMaxWeightPerServer = Symbol('kMaxWeightPerServer')
+const kErrorPenalty = Symbol('kErrorPenalty')
+
+function getGreatestCommonDivisor (a, b) {
+ if (b === 0) return a
+ return getGreatestCommonDivisor(b, a % b)
+}
+
+function defaultFactory (origin, opts) {
+ return new Pool(origin, opts)
+}
+
+class BalancedPool extends PoolBase {
+ constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) {
+ super()
+
+ this[kOptions] = opts
+ this[kIndex] = -1
+ this[kCurrentWeight] = 0
+
+ this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100
+ this[kErrorPenalty] = this[kOptions].errorPenalty || 15
+
+ if (!Array.isArray(upstreams)) {
+ upstreams = [upstreams]
+ }
+
+ if (typeof factory !== 'function') {
+ throw new InvalidArgumentError('factory must be a function.')
+ }
+
+ this[kInterceptors] = opts.interceptors && opts.interceptors.BalancedPool && Array.isArray(opts.interceptors.BalancedPool)
+ ? opts.interceptors.BalancedPool
+ : []
+ this[kFactory] = factory
+
+ for (const upstream of upstreams) {
+ this.addUpstream(upstream)
+ }
+ this._updateBalancedPoolStats()
+ }
+
+ addUpstream (upstream) {
+ const upstreamOrigin = parseOrigin(upstream).origin
+
+ if (this[kClients].find((pool) => (
+ pool[kUrl].origin === upstreamOrigin &&
+ pool.closed !== true &&
+ pool.destroyed !== true
+ ))) {
+ return this
+ }
+ const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions]))
+
+ this[kAddClient](pool)
+ pool.on('connect', () => {
+ pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty])
+ })
+
+ pool.on('connectionError', () => {
+ pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty])
+ this._updateBalancedPoolStats()
+ })
+
+ pool.on('disconnect', (...args) => {
+ const err = args[2]
+ if (err && err.code === 'UND_ERR_SOCKET') {
+ // decrease the weight of the pool.
+ pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty])
+ this._updateBalancedPoolStats()
+ }
+ })
+
+ for (const client of this[kClients]) {
+ client[kWeight] = this[kMaxWeightPerServer]
+ }
+
+ this._updateBalancedPoolStats()
+
+ return this
+ }
+
+ _updateBalancedPoolStats () {
+ this[kGreatestCommonDivisor] = this[kClients].map(p => p[kWeight]).reduce(getGreatestCommonDivisor, 0)
+ }
+
+ removeUpstream (upstream) {
+ const upstreamOrigin = parseOrigin(upstream).origin
+
+ const pool = this[kClients].find((pool) => (
+ pool[kUrl].origin === upstreamOrigin &&
+ pool.closed !== true &&
+ pool.destroyed !== true
+ ))
+
+ if (pool) {
+ this[kRemoveClient](pool)
+ }
+
+ return this
+ }
+
+ get upstreams () {
+ return this[kClients]
+ .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true)
+ .map((p) => p[kUrl].origin)
+ }
+
+ [kGetDispatcher] () {
+ // We validate that pools is greater than 0,
+ // otherwise we would have to wait until an upstream
+ // is added, which might never happen.
+ if (this[kClients].length === 0) {
+ throw new BalancedPoolMissingUpstreamError()
+ }
+
+ const dispatcher = this[kClients].find(dispatcher => (
+ !dispatcher[kNeedDrain] &&
+ dispatcher.closed !== true &&
+ dispatcher.destroyed !== true
+ ))
+
+ if (!dispatcher) {
+ return
+ }
+
+ const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true)
+
+ if (allClientsBusy) {
+ return
+ }
+
+ let counter = 0
+
+ let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain])
+
+ while (counter++ < this[kClients].length) {
+ this[kIndex] = (this[kIndex] + 1) % this[kClients].length
+ const pool = this[kClients][this[kIndex]]
+
+ // find pool index with the largest weight
+ if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) {
+ maxWeightIndex = this[kIndex]
+ }
+
+ // decrease the current weight every `this[kClients].length`.
+ if (this[kIndex] === 0) {
+ // Set the current weight to the next lower weight.
+ this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]
+
+ if (this[kCurrentWeight] <= 0) {
+ this[kCurrentWeight] = this[kMaxWeightPerServer]
+ }
+ }
+ if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) {
+ return pool
+ }
+ }
+
+ this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]
+ this[kIndex] = maxWeightIndex
+ return this[kClients][maxWeightIndex]
+ }
+}
+
+module.exports = BalancedPool
diff --git a/node_modules/undici/lib/cache/cache.js b/node_modules/undici/lib/cache/cache.js
new file mode 100644
index 0000000..18f06a3
--- /dev/null
+++ b/node_modules/undici/lib/cache/cache.js
@@ -0,0 +1,842 @@
+'use strict'
+
+const { kConstruct } = require('./symbols')
+const { urlEquals, fieldValues: getFieldValues } = require('./util')
+const { kEnumerableProperty, isDisturbed } = require('../core/util')
+const { kHeadersList } = require('../core/symbols')
+const { webidl } = require('../fetch/webidl')
+const { Response, cloneResponse } = require('../fetch/response')
+const { Request } = require('../fetch/request')
+const { kState, kHeaders, kGuard, kRealm } = require('../fetch/symbols')
+const { fetching } = require('../fetch/index')
+const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require('../fetch/util')
+const assert = require('assert')
+const { getGlobalDispatcher } = require('../global')
+
+/**
+ * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation
+ * @typedef {Object} CacheBatchOperation
+ * @property {'delete' | 'put'} type
+ * @property {any} request
+ * @property {any} response
+ * @property {import('../../types/cache').CacheQueryOptions} options
+ */
+
+/**
+ * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list
+ * @typedef {[any, any][]} requestResponseList
+ */
+
+class Cache {
+ /**
+ * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list
+ * @type {requestResponseList}
+ */
+ #relevantRequestResponseList
+
+ constructor () {
+ if (arguments[0] !== kConstruct) {
+ webidl.illegalConstructor()
+ }
+
+ this.#relevantRequestResponseList = arguments[1]
+ }
+
+ async match (request, options = {}) {
+ webidl.brandCheck(this, Cache)
+ webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.match' })
+
+ request = webidl.converters.RequestInfo(request)
+ options = webidl.converters.CacheQueryOptions(options)
+
+ const p = await this.matchAll(request, options)
+
+ if (p.length === 0) {
+ return
+ }
+
+ return p[0]
+ }
+
+ async matchAll (request = undefined, options = {}) {
+ webidl.brandCheck(this, Cache)
+
+ if (request !== undefined) request = webidl.converters.RequestInfo(request)
+ options = webidl.converters.CacheQueryOptions(options)
+
+ // 1.
+ let r = null
+
+ // 2.
+ if (request !== undefined) {
+ if (request instanceof Request) {
+ // 2.1.1
+ r = request[kState]
+
+ // 2.1.2
+ if (r.method !== 'GET' && !options.ignoreMethod) {
+ return []
+ }
+ } else if (typeof request === 'string') {
+ // 2.2.1
+ r = new Request(request)[kState]
+ }
+ }
+
+ // 5.
+ // 5.1
+ const responses = []
+
+ // 5.2
+ if (request === undefined) {
+ // 5.2.1
+ for (const requestResponse of this.#relevantRequestResponseList) {
+ responses.push(requestResponse[1])
+ }
+ } else { // 5.3
+ // 5.3.1
+ const requestResponses = this.#queryCache(r, options)
+
+ // 5.3.2
+ for (const requestResponse of requestResponses) {
+ responses.push(requestResponse[1])
+ }
+ }
+
+ // 5.4
+ // We don't implement CORs so we don't need to loop over the responses, yay!
+
+ // 5.5.1
+ const responseList = []
+
+ // 5.5.2
+ for (const response of responses) {
+ // 5.5.2.1
+ const responseObject = new Response(response.body?.source ?? null)
+ const body = responseObject[kState].body
+ responseObject[kState] = response
+ responseObject[kState].body = body
+ responseObject[kHeaders][kHeadersList] = response.headersList
+ responseObject[kHeaders][kGuard] = 'immutable'
+
+ responseList.push(responseObject)
+ }
+
+ // 6.
+ return Object.freeze(responseList)
+ }
+
+ async add (request) {
+ webidl.brandCheck(this, Cache)
+ webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.add' })
+
+ request = webidl.converters.RequestInfo(request)
+
+ // 1.
+ const requests = [request]
+
+ // 2.
+ const responseArrayPromise = this.addAll(requests)
+
+ // 3.
+ return await responseArrayPromise
+ }
+
+ async addAll (requests) {
+ webidl.brandCheck(this, Cache)
+ webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.addAll' })
+
+ requests = webidl.converters['sequence<RequestInfo>'](requests)
+
+ // 1.
+ const responsePromises = []
+
+ // 2.
+ const requestList = []
+
+ // 3.
+ for (const request of requests) {
+ if (typeof request === 'string') {
+ continue
+ }
+
+ // 3.1
+ const r = request[kState]
+
+ // 3.2
+ if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') {
+ throw webidl.errors.exception({
+ header: 'Cache.addAll',
+ message: 'Expected http/s scheme when method is not GET.'
+ })
+ }
+ }
+
+ // 4.
+ /** @type {ReturnType<typeof fetching>[]} */
+ const fetchControllers = []
+
+ // 5.
+ for (const request of requests) {
+ // 5.1
+ const r = new Request(request)[kState]
+
+ // 5.2
+ if (!urlIsHttpHttpsScheme(r.url)) {
+ throw webidl.errors.exception({
+ header: 'Cache.addAll',
+ message: 'Expected http/s scheme.'
+ })
+ }
+
+ // 5.4
+ r.initiator = 'fetch'
+ r.destination = 'subresource'
+
+ // 5.5
+ requestList.push(r)
+
+ // 5.6
+ const responsePromise = createDeferredPromise()
+
+ // 5.7
+ fetchControllers.push(fetching({
+ request: r,
+ dispatcher: getGlobalDispatcher(),
+ processResponse (response) {
+ // 1.
+ if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) {
+ responsePromise.reject(webidl.errors.exception({
+ header: 'Cache.addAll',
+ message: 'Received an invalid status code or the request failed.'
+ }))
+ } else if (response.headersList.contains('vary')) { // 2.
+ // 2.1
+ const fieldValues = getFieldValues(response.headersList.get('vary'))
+
+ // 2.2
+ for (const fieldValue of fieldValues) {
+ // 2.2.1
+ if (fieldValue === '*') {
+ responsePromise.reject(webidl.errors.exception({
+ header: 'Cache.addAll',
+ message: 'invalid vary field value'
+ }))
+
+ for (const controller of fetchControllers) {
+ controller.abort()
+ }
+
+ return
+ }
+ }
+ }
+ },
+ processResponseEndOfBody (response) {
+ // 1.
+ if (response.aborted) {
+ responsePromise.reject(new DOMException('aborted', 'AbortError'))
+ return
+ }
+
+ // 2.
+ responsePromise.resolve(response)
+ }
+ }))
+
+ // 5.8
+ responsePromises.push(responsePromise.promise)
+ }
+
+ // 6.
+ const p = Promise.all(responsePromises)
+
+ // 7.
+ const responses = await p
+
+ // 7.1
+ const operations = []
+
+ // 7.2
+ let index = 0
+
+ // 7.3
+ for (const response of responses) {
+ // 7.3.1
+ /** @type {CacheBatchOperation} */
+ const operation = {
+ type: 'put', // 7.3.2
+ request: requestList[index], // 7.3.3
+ response // 7.3.4
+ }
+
+ operations.push(operation) // 7.3.5
+
+ index++ // 7.3.6
+ }
+
+ // 7.5
+ const cacheJobPromise = createDeferredPromise()
+
+ // 7.6.1
+ let errorData = null
+
+ // 7.6.2
+ try {
+ this.#batchCacheOperations(operations)
+ } catch (e) {
+ errorData = e
+ }
+
+ // 7.6.3
+ queueMicrotask(() => {
+ // 7.6.3.1
+ if (errorData === null) {
+ cacheJobPromise.resolve(undefined)
+ } else {
+ // 7.6.3.2
+ cacheJobPromise.reject(errorData)
+ }
+ })
+
+ // 7.7
+ return cacheJobPromise.promise
+ }
+
+ async put (request, response) {
+ webidl.brandCheck(this, Cache)
+ webidl.argumentLengthCheck(arguments, 2, { header: 'Cache.put' })
+
+ request = webidl.converters.RequestInfo(request)
+ response = webidl.converters.Response(response)
+
+ // 1.
+ let innerRequest = null
+
+ // 2.
+ if (request instanceof Request) {
+ innerRequest = request[kState]
+ } else { // 3.
+ innerRequest = new Request(request)[kState]
+ }
+
+ // 4.
+ if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') {
+ throw webidl.errors.exception({
+ header: 'Cache.put',
+ message: 'Expected an http/s scheme when method is not GET'
+ })
+ }
+
+ // 5.
+ const innerResponse = response[kState]
+
+ // 6.
+ if (innerResponse.status === 206) {
+ throw webidl.errors.exception({
+ header: 'Cache.put',
+ message: 'Got 206 status'
+ })
+ }
+
+ // 7.
+ if (innerResponse.headersList.contains('vary')) {
+ // 7.1.
+ const fieldValues = getFieldValues(innerResponse.headersList.get('vary'))
+
+ // 7.2.
+ for (const fieldValue of fieldValues) {
+ // 7.2.1
+ if (fieldValue === '*') {
+ throw webidl.errors.exception({
+ header: 'Cache.put',
+ message: 'Got * vary field value'
+ })
+ }
+ }
+ }
+
+ // 8.
+ if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) {
+ throw webidl.errors.exception({
+ header: 'Cache.put',
+ message: 'Response body is locked or disturbed'
+ })
+ }
+
+ // 9.
+ const clonedResponse = cloneResponse(innerResponse)
+
+ // 10.
+ const bodyReadPromise = createDeferredPromise()
+
+ // 11.
+ if (innerResponse.body != null) {
+ // 11.1
+ const stream = innerResponse.body.stream
+
+ // 11.2
+ const reader = stream.getReader()
+
+ // 11.3
+ readAllBytes(
+ reader,
+ (bytes) => bodyReadPromise.resolve(bytes),
+ (error) => bodyReadPromise.reject(error)
+ )
+ } else {
+ bodyReadPromise.resolve(undefined)
+ }
+
+ // 12.
+ /** @type {CacheBatchOperation[]} */
+ const operations = []
+
+ // 13.
+ /** @type {CacheBatchOperation} */
+ const operation = {
+ type: 'put', // 14.
+ request: innerRequest, // 15.
+ response: clonedResponse // 16.
+ }
+
+ // 17.
+ operations.push(operation)
+
+ // 19.
+ const bytes = await bodyReadPromise.promise
+
+ if (clonedResponse.body != null) {
+ clonedResponse.body.source = bytes
+ }
+
+ // 19.1
+ const cacheJobPromise = createDeferredPromise()
+
+ // 19.2.1
+ let errorData = null
+
+ // 19.2.2
+ try {
+ this.#batchCacheOperations(operations)
+ } catch (e) {
+ errorData = e
+ }
+
+ // 19.2.3
+ queueMicrotask(() => {
+ // 19.2.3.1
+ if (errorData === null) {
+ cacheJobPromise.resolve()
+ } else { // 19.2.3.2
+ cacheJobPromise.reject(errorData)
+ }
+ })
+
+ return cacheJobPromise.promise
+ }
+
+ async delete (request, options = {}) {
+ webidl.brandCheck(this, Cache)
+ webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.delete' })
+
+ request = webidl.converters.RequestInfo(request)
+ options = webidl.converters.CacheQueryOptions(options)
+
+ /**
+ * @type {Request}
+ */
+ let r = null
+
+ if (request instanceof Request) {
+ r = request[kState]
+
+ if (r.method !== 'GET' && !options.ignoreMethod) {
+ return false
+ }
+ } else {
+ assert(typeof request === 'string')
+
+ r = new Request(request)[kState]
+ }
+
+ /** @type {CacheBatchOperation[]} */
+ const operations = []
+
+ /** @type {CacheBatchOperation} */
+ const operation = {
+ type: 'delete',
+ request: r,
+ options
+ }
+
+ operations.push(operation)
+
+ const cacheJobPromise = createDeferredPromise()
+
+ let errorData = null
+ let requestResponses
+
+ try {
+ requestResponses = this.#batchCacheOperations(operations)
+ } catch (e) {
+ errorData = e
+ }
+
+ queueMicrotask(() => {
+ if (errorData === null) {
+ cacheJobPromise.resolve(!!requestResponses?.length)
+ } else {
+ cacheJobPromise.reject(errorData)
+ }
+ })
+
+ return cacheJobPromise.promise
+ }
+
+ /**
+ * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys
+ * @param {any} request
+ * @param {import('../../types/cache').CacheQueryOptions} options
+ * @returns {readonly Request[]}
+ */
+ async keys (request = undefined, options = {}) {
+ webidl.brandCheck(this, Cache)
+
+ if (request !== undefined) request = webidl.converters.RequestInfo(request)
+ options = webidl.converters.CacheQueryOptions(options)
+
+ // 1.
+ let r = null
+
+ // 2.
+ if (request !== undefined) {
+ // 2.1
+ if (request instanceof Request) {
+ // 2.1.1
+ r = request[kState]
+
+ // 2.1.2
+ if (r.method !== 'GET' && !options.ignoreMethod) {
+ return []
+ }
+ } else if (typeof request === 'string') { // 2.2
+ r = new Request(request)[kState]
+ }
+ }
+
+ // 4.
+ const promise = createDeferredPromise()
+
+ // 5.
+ // 5.1
+ const requests = []
+
+ // 5.2
+ if (request === undefined) {
+ // 5.2.1
+ for (const requestResponse of this.#relevantRequestResponseList) {
+ // 5.2.1.1
+ requests.push(requestResponse[0])
+ }
+ } else { // 5.3
+ // 5.3.1
+ const requestResponses = this.#queryCache(r, options)
+
+ // 5.3.2
+ for (const requestResponse of requestResponses) {
+ // 5.3.2.1
+ requests.push(requestResponse[0])
+ }
+ }
+
+ // 5.4
+ queueMicrotask(() => {
+ // 5.4.1
+ const requestList = []
+
+ // 5.4.2
+ for (const request of requests) {
+ const requestObject = new Request('https://a')
+ requestObject[kState] = request
+ requestObject[kHeaders][kHeadersList] = request.headersList
+ requestObject[kHeaders][kGuard] = 'immutable'
+ requestObject[kRealm] = request.client
+
+ // 5.4.2.1
+ requestList.push(requestObject)
+ }
+
+ // 5.4.3
+ promise.resolve(Object.freeze(requestList))
+ })
+
+ return promise.promise
+ }
+
+ /**
+ * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm
+ * @param {CacheBatchOperation[]} operations
+ * @returns {requestResponseList}
+ */
+ #batchCacheOperations (operations) {
+ // 1.
+ const cache = this.#relevantRequestResponseList
+
+ // 2.
+ const backupCache = [...cache]
+
+ // 3.
+ const addedItems = []
+
+ // 4.1
+ const resultList = []
+
+ try {
+ // 4.2
+ for (const operation of operations) {
+ // 4.2.1
+ if (operation.type !== 'delete' && operation.type !== 'put') {
+ throw webidl.errors.exception({
+ header: 'Cache.#batchCacheOperations',
+ message: 'operation type does not match "delete" or "put"'
+ })
+ }
+
+ // 4.2.2
+ if (operation.type === 'delete' && operation.response != null) {
+ throw webidl.errors.exception({
+ header: 'Cache.#batchCacheOperations',
+ message: 'delete operation should not have an associated response'
+ })
+ }
+
+ // 4.2.3
+ if (this.#queryCache(operation.request, operation.options, addedItems).length) {
+ throw new DOMException('???', 'InvalidStateError')
+ }
+
+ // 4.2.4
+ let requestResponses
+
+ // 4.2.5
+ if (operation.type === 'delete') {
+ // 4.2.5.1
+ requestResponses = this.#queryCache(operation.request, operation.options)
+
+ // TODO: the spec is wrong, this is needed to pass WPTs
+ if (requestResponses.length === 0) {
+ return []
+ }
+
+ // 4.2.5.2
+ for (const requestResponse of requestResponses) {
+ const idx = cache.indexOf(requestResponse)
+ assert(idx !== -1)
+
+ // 4.2.5.2.1
+ cache.splice(idx, 1)
+ }
+ } else if (operation.type === 'put') { // 4.2.6
+ // 4.2.6.1
+ if (operation.response == null) {
+ throw webidl.errors.exception({
+ header: 'Cache.#batchCacheOperations',
+ message: 'put operation should have an associated response'
+ })
+ }
+
+ // 4.2.6.2
+ const r = operation.request
+
+ // 4.2.6.3
+ if (!urlIsHttpHttpsScheme(r.url)) {
+ throw webidl.errors.exception({
+ header: 'Cache.#batchCacheOperations',
+ message: 'expected http or https scheme'
+ })
+ }
+
+ // 4.2.6.4
+ if (r.method !== 'GET') {
+ throw webidl.errors.exception({
+ header: 'Cache.#batchCacheOperations',
+ message: 'not get method'
+ })
+ }
+
+ // 4.2.6.5
+ if (operation.options != null) {
+ throw webidl.errors.exception({
+ header: 'Cache.#batchCacheOperations',
+ message: 'options must not be defined'
+ })
+ }
+
+ // 4.2.6.6
+ requestResponses = this.#queryCache(operation.request)
+
+ // 4.2.6.7
+ for (const requestResponse of requestResponses) {
+ const idx = cache.indexOf(requestResponse)
+ assert(idx !== -1)
+
+ // 4.2.6.7.1
+ cache.splice(idx, 1)
+ }
+
+ // 4.2.6.8
+ cache.push([operation.request, operation.response])
+
+ // 4.2.6.10
+ addedItems.push([operation.request, operation.response])
+ }
+
+ // 4.2.7
+ resultList.push([operation.request, operation.response])
+ }
+
+ // 4.3
+ return resultList
+ } catch (e) { // 5.
+ // 5.1
+ this.#relevantRequestResponseList.length = 0
+
+ // 5.2
+ this.#relevantRequestResponseList = backupCache
+
+ // 5.3
+ throw e
+ }
+ }
+
+ /**
+ * @see https://w3c.github.io/ServiceWorker/#query-cache
+ * @param {any} requestQuery
+ * @param {import('../../types/cache').CacheQueryOptions} options
+ * @param {requestResponseList} targetStorage
+ * @returns {requestResponseList}
+ */
+ #queryCache (requestQuery, options, targetStorage) {
+ /** @type {requestResponseList} */
+ const resultList = []
+
+ const storage = targetStorage ?? this.#relevantRequestResponseList
+
+ for (const requestResponse of storage) {
+ const [cachedRequest, cachedResponse] = requestResponse
+ if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) {
+ resultList.push(requestResponse)
+ }
+ }
+
+ return resultList
+ }
+
+ /**
+ * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm
+ * @param {any} requestQuery
+ * @param {any} request
+ * @param {any | null} response
+ * @param {import('../../types/cache').CacheQueryOptions | undefined} options
+ * @returns {boolean}
+ */
+ #requestMatchesCachedItem (requestQuery, request, response = null, options) {
+ // if (options?.ignoreMethod === false && request.method === 'GET') {
+ // return false
+ // }
+
+ const queryURL = new URL(requestQuery.url)
+
+ const cachedURL = new URL(request.url)
+
+ if (options?.ignoreSearch) {
+ cachedURL.search = ''
+
+ queryURL.search = ''
+ }
+
+ if (!urlEquals(queryURL, cachedURL, true)) {
+ return false
+ }
+
+ if (
+ response == null ||
+ options?.ignoreVary ||
+ !response.headersList.contains('vary')
+ ) {
+ return true
+ }
+
+ const fieldValues = getFieldValues(response.headersList.get('vary'))
+
+ for (const fieldValue of fieldValues) {
+ if (fieldValue === '*') {
+ return false
+ }
+
+ const requestValue = request.headersList.get(fieldValue)
+ const queryValue = requestQuery.headersList.get(fieldValue)
+
+ // If one has the header and the other doesn't, or one has
+ // a different value than the other, return false
+ if (requestValue !== queryValue) {
+ return false
+ }
+ }
+
+ return true
+ }
+}
+
+Object.defineProperties(Cache.prototype, {
+ [Symbol.toStringTag]: {
+ value: 'Cache',
+ configurable: true
+ },
+ match: kEnumerableProperty,
+ matchAll: kEnumerableProperty,
+ add: kEnumerableProperty,
+ addAll: kEnumerableProperty,
+ put: kEnumerableProperty,
+ delete: kEnumerableProperty,
+ keys: kEnumerableProperty
+})
+
+const cacheQueryOptionConverters = [
+ {
+ key: 'ignoreSearch',
+ converter: webidl.converters.boolean,
+ defaultValue: false
+ },
+ {
+ key: 'ignoreMethod',
+ converter: webidl.converters.boolean,
+ defaultValue: false
+ },
+ {
+ key: 'ignoreVary',
+ converter: webidl.converters.boolean,
+ defaultValue: false
+ }
+]
+
+webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters)
+
+webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([
+ ...cacheQueryOptionConverters,
+ {
+ key: 'cacheName',
+ converter: webidl.converters.DOMString
+ }
+])
+
+webidl.converters.Response = webidl.interfaceConverter(Response)
+
+webidl.converters['sequence<RequestInfo>'] = webidl.sequenceConverter(
+ webidl.converters.RequestInfo
+)
+
+module.exports = {
+ Cache
+}
diff --git a/node_modules/undici/lib/cache/cachestorage.js b/node_modules/undici/lib/cache/cachestorage.js
new file mode 100644
index 0000000..7e7f0cf
--- /dev/null
+++ b/node_modules/undici/lib/cache/cachestorage.js
@@ -0,0 +1,144 @@
+'use strict'
+
+const { kConstruct } = require('./symbols')
+const { Cache } = require('./cache')
+const { webidl } = require('../fetch/webidl')
+const { kEnumerableProperty } = require('../core/util')
+
+class CacheStorage {
+ /**
+ * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map
+ * @type {Map<string, import('./cache').requestResponseList}
+ */
+ #caches = new Map()
+
+ constructor () {
+ if (arguments[0] !== kConstruct) {
+ webidl.illegalConstructor()
+ }
+ }
+
+ async match (request, options = {}) {
+ webidl.brandCheck(this, CacheStorage)
+ webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.match' })
+
+ request = webidl.converters.RequestInfo(request)
+ options = webidl.converters.MultiCacheQueryOptions(options)
+
+ // 1.
+ if (options.cacheName != null) {
+ // 1.1.1.1
+ if (this.#caches.has(options.cacheName)) {
+ // 1.1.1.1.1
+ const cacheList = this.#caches.get(options.cacheName)
+ const cache = new Cache(kConstruct, cacheList)
+
+ return await cache.match(request, options)
+ }
+ } else { // 2.
+ // 2.2
+ for (const cacheList of this.#caches.values()) {
+ const cache = new Cache(kConstruct, cacheList)
+
+ // 2.2.1.2
+ const response = await cache.match(request, options)
+
+ if (response !== undefined) {
+ return response
+ }
+ }
+ }
+ }
+
+ /**
+ * @see https://w3c.github.io/ServiceWorker/#cache-storage-has
+ * @param {string} cacheName
+ * @returns {Promise<boolean>}
+ */
+ async has (cacheName) {
+ webidl.brandCheck(this, CacheStorage)
+ webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.has' })
+
+ cacheName = webidl.converters.DOMString(cacheName)
+
+ // 2.1.1
+ // 2.2
+ return this.#caches.has(cacheName)
+ }
+
+ /**
+ * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open
+ * @param {string} cacheName
+ * @returns {Promise<Cache>}
+ */
+ async open (cacheName) {
+ webidl.brandCheck(this, CacheStorage)
+ webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.open' })
+
+ cacheName = webidl.converters.DOMString(cacheName)
+
+ // 2.1
+ if (this.#caches.has(cacheName)) {
+ // await caches.open('v1') !== await caches.open('v1')
+
+ // 2.1.1
+ const cache = this.#caches.get(cacheName)
+
+ // 2.1.1.1
+ return new Cache(kConstruct, cache)
+ }
+
+ // 2.2
+ const cache = []
+
+ // 2.3
+ this.#caches.set(cacheName, cache)
+
+ // 2.4
+ return new Cache(kConstruct, cache)
+ }
+
+ /**
+ * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete
+ * @param {string} cacheName
+ * @returns {Promise<boolean>}
+ */
+ async delete (cacheName) {
+ webidl.brandCheck(this, CacheStorage)
+ webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.delete' })
+
+ cacheName = webidl.converters.DOMString(cacheName)
+
+ return this.#caches.delete(cacheName)
+ }
+
+ /**
+ * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys
+ * @returns {string[]}
+ */
+ async keys () {
+ webidl.brandCheck(this, CacheStorage)
+
+ // 2.1
+ const keys = this.#caches.keys()
+
+ // 2.2
+ return [...keys]
+ }
+}
+
+Object.defineProperties(CacheStorage.prototype, {
+ [Symbol.toStringTag]: {
+ value: 'CacheStorage',
+ configurable: true
+ },
+ match: kEnumerableProperty,
+ has: kEnumerableProperty,
+ open: kEnumerableProperty,
+ delete: kEnumerableProperty,
+ keys: kEnumerableProperty
+})
+
+module.exports = {
+ CacheStorage
+}
diff --git a/node_modules/undici/lib/cache/symbols.js b/node_modules/undici/lib/cache/symbols.js
new file mode 100644
index 0000000..f9b1974
--- /dev/null
+++ b/node_modules/undici/lib/cache/symbols.js
@@ -0,0 +1,5 @@
+'use strict'
+
+module.exports = {
+ kConstruct: Symbol('constructable')
+}
diff --git a/node_modules/undici/lib/cache/util.js b/node_modules/undici/lib/cache/util.js
new file mode 100644
index 0000000..44d52b7
--- /dev/null
+++ b/node_modules/undici/lib/cache/util.js
@@ -0,0 +1,49 @@
+'use strict'
+
+const assert = require('assert')
+const { URLSerializer } = require('../fetch/dataURL')
+const { isValidHeaderName } = require('../fetch/util')
+
+/**
+ * @see https://url.spec.whatwg.org/#concept-url-equals
+ * @param {URL} A
+ * @param {URL} B
+ * @param {boolean | undefined} excludeFragment
+ * @returns {boolean}
+ */
+function urlEquals (A, B, excludeFragment = false) {
+ const serializedA = URLSerializer(A, excludeFragment)
+
+ const serializedB = URLSerializer(B, excludeFragment)
+
+ return serializedA === serializedB
+}
+
+/**
+ * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262
+ * @param {string} header
+ */
+function fieldValues (header) {
+ assert(header !== null)
+
+ const values = []
+
+ for (let value of header.split(',')) {
+ value = value.trim()
+
+ if (!value.length) {
+ continue
+ } else if (!isValidHeaderName(value)) {
+ continue
+ }
+
+ values.push(value)
+ }
+
+ return values
+}
+
+module.exports = {
+ urlEquals,
+ fieldValues
+}
diff --git a/node_modules/undici/lib/client.js b/node_modules/undici/lib/client.js
new file mode 100644
index 0000000..7d9ec8d
--- /dev/null
+++ b/node_modules/undici/lib/client.js
@@ -0,0 +1,1796 @@
+// @ts-check
+
+'use strict'
+
+/* global WebAssembly */
+
+const assert = require('assert')
+const net = require('net')
+const util = require('./core/util')
+const timers = require('./timers')
+const Request = require('./core/request')
+const DispatcherBase = require('./dispatcher-base')
+const {
+ RequestContentLengthMismatchError,
+ ResponseContentLengthMismatchError,
+ InvalidArgumentError,
+ RequestAbortedError,
+ HeadersTimeoutError,
+ HeadersOverflowError,
+ SocketError,
+ InformationalError,
+ BodyTimeoutError,
+ HTTPParserError,
+ ResponseExceededMaxSizeError,
+ ClientDestroyedError
+} = require('./core/errors')
+const buildConnector = require('./core/connect')
+const {
+ kUrl,
+ kReset,
+ kServerName,
+ kClient,
+ kBusy,
+ kParser,
+ kConnect,
+ kBlocking,
+ kResuming,
+ kRunning,
+ kPending,
+ kSize,
+ kWriting,
+ kQueue,
+ kConnected,
+ kConnecting,
+ kNeedDrain,
+ kNoRef,
+ kKeepAliveDefaultTimeout,
+ kHostHeader,
+ kPendingIdx,
+ kRunningIdx,
+ kError,
+ kPipelining,
+ kSocket,
+ kKeepAliveTimeoutValue,
+ kMaxHeadersSize,
+ kKeepAliveMaxTimeout,
+ kKeepAliveTimeoutThreshold,
+ kHeadersTimeout,
+ kBodyTimeout,
+ kStrictContentLength,
+ kConnector,
+ kMaxRedirections,
+ kMaxRequests,
+ kCounter,
+ kClose,
+ kDestroy,
+ kDispatch,
+ kInterceptors,
+ kLocalAddress,
+ kMaxResponseSize
+} = require('./core/symbols')
+const FastBuffer = Buffer[Symbol.species]
+
+const kClosedResolve = Symbol('kClosedResolve')
+
+const channels = {}
+
+try {
+ const diagnosticsChannel = require('diagnostics_channel')
+ channels.sendHeaders = diagnosticsChannel.channel('undici:client:sendHeaders')
+ channels.beforeConnect = diagnosticsChannel.channel('undici:client:beforeConnect')
+ channels.connectError = diagnosticsChannel.channel('undici:client:connectError')
+ channels.connected = diagnosticsChannel.channel('undici:client:connected')
+} catch {
+ channels.sendHeaders = { hasSubscribers: false }
+ channels.beforeConnect = { hasSubscribers: false }
+ channels.connectError = { hasSubscribers: false }
+ channels.connected = { hasSubscribers: false }
+}
+
+/**
+ * @type {import('../types/client').default}
+ */
+class Client extends DispatcherBase {
+ /**
+ *
+ * @param {string|URL} url
+ * @param {import('../types/client').Client.Options} options
+ */
+ constructor (url, {
+ interceptors,
+ maxHeaderSize,
+ headersTimeout,
+ socketTimeout,
+ requestTimeout,
+ connectTimeout,
+ bodyTimeout,
+ idleTimeout,
+ keepAlive,
+ keepAliveTimeout,
+ maxKeepAliveTimeout,
+ keepAliveMaxTimeout,
+ keepAliveTimeoutThreshold,
+ socketPath,
+ pipelining,
+ tls,
+ strictContentLength,
+ maxCachedSessions,
+ maxRedirections,
+ connect,
+ maxRequestsPerClient,
+ localAddress,
+ maxResponseSize,
+ autoSelectFamily,
+ autoSelectFamilyAttemptTimeout
+ } = {}) {
+ super()
+
+ if (keepAlive !== undefined) {
+ throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')
+ }
+
+ if (socketTimeout !== undefined) {
+ throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead')
+ }
+
+ if (requestTimeout !== undefined) {
+ throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead')
+ }
+
+ if (idleTimeout !== undefined) {
+ throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead')
+ }
+
+ if (maxKeepAliveTimeout !== undefined) {
+ throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead')
+ }
+
+ if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) {
+ throw new InvalidArgumentError('invalid maxHeaderSize')
+ }
+
+ if (socketPath != null && typeof socketPath !== 'string') {
+ throw new InvalidArgumentError('invalid socketPath')
+ }
+
+ if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) {
+ throw new InvalidArgumentError('invalid connectTimeout')
+ }
+
+ if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) {
+ throw new InvalidArgumentError('invalid keepAliveTimeout')
+ }
+
+ if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) {
+ throw new InvalidArgumentError('invalid keepAliveMaxTimeout')
+ }
+
+ if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) {
+ throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold')
+ }
+
+ if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) {
+ throw new InvalidArgumentError('headersTimeout must be a positive integer or zero')
+ }
+
+ if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) {
+ throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero')
+ }
+
+ if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {
+ throw new InvalidArgumentError('connect must be a function or an object')
+ }
+
+ if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) {
+ throw new InvalidArgumentError('maxRedirections must be a positive number')
+ }
+
+ if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) {
+ throw new InvalidArgumentError('maxRequestsPerClient must be a positive number')
+ }
+
+ if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) {
+ throw new InvalidArgumentError('localAddress must be valid string IP address')
+ }
+
+ if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) {
+ throw new InvalidArgumentError('maxResponseSize must be a positive number')
+ }
+
+ if (
+ autoSelectFamilyAttemptTimeout != null &&
+ (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)
+ ) {
+ throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number')
+ }
+
+ if (typeof connect !== 'function') {
+ connect = buildConnector({
+ ...tls,
+ maxCachedSessions,
+ socketPath,
+ timeout: connectTimeout,
+ ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),
+ ...connect
+ })
+ }
+
+ this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client)
+ ? interceptors.Client
+ : [createRedirectInterceptor({ maxRedirections })]
+ this[kUrl] = util.parseOrigin(url)
+ this[kConnector] = connect
+ this[kSocket] = null
+ this[kPipelining] = pipelining != null ? pipelining : 1
+ this[kMaxHeadersSize] = maxHeaderSize || 16384
+ this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout
+ this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout
+ this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold
+ this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]
+ this[kServerName] = null
+ this[kLocalAddress] = localAddress != null ? localAddress : null
+ this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming
+ this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming
+ this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\r\n`
+ this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3
+ this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3
+ this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength
+ this[kMaxRedirections] = maxRedirections
+ this[kMaxRequests] = maxRequestsPerClient
+ this[kClosedResolve] = null
+ this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1
+
+ // kQueue is built up of 3 sections separated by
+ // the kRunningIdx and kPendingIdx indices.
+ // | complete | running | pending |
+ // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length
+ // kRunningIdx points to the first running element.
+ // kPendingIdx points to the first pending element.
+ // This implements a fast queue with an amortized
+ // time of O(1).
+
+ this[kQueue] = []
+ this[kRunningIdx] = 0
+ this[kPendingIdx] = 0
+ }
+
+ get pipelining () {
+ return this[kPipelining]
+ }
+
+ set pipelining (value) {
+ this[kPipelining] = value
+ resume(this, true)
+ }
+
+ get [kPending] () {
+ return this[kQueue].length - this[kPendingIdx]
+ }
+
+ get [kRunning] () {
+ return this[kPendingIdx] - this[kRunningIdx]
+ }
+
+ get [kSize] () {
+ return this[kQueue].length - this[kRunningIdx]
+ }
+
+ get [kConnected] () {
+ return !!this[kSocket] && !this[kConnecting] && !this[kSocket].destroyed
+ }
+
+ get [kBusy] () {
+ const socket = this[kSocket]
+ return (
+ (socket && (socket[kReset] || socket[kWriting] || socket[kBlocking])) ||
+ (this[kSize] >= (this[kPipelining] || 1)) ||
+ this[kPending] > 0
+ )
+ }
+
+ /* istanbul ignore: only used for test */
+ [kConnect] (cb) {
+ connect(this)
+ this.once('connect', cb)
+ }
+
+ [kDispatch] (opts, handler) {
+ const origin = opts.origin || this[kUrl].origin
+
+ const request = new Request(origin, opts, handler)
+
+ this[kQueue].push(request)
+ if (this[kResuming]) {
+ // Do nothing.
+ } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) {
+ // Wait a tick in case stream/iterator is ended in the same tick.
+ this[kResuming] = 1
+ process.nextTick(resume, this)
+ } else {
+ resume(this, true)
+ }
+
+ if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) {
+ this[kNeedDrain] = 2
+ }
+
+ return this[kNeedDrain] < 2
+ }
+
+ async [kClose] () {
+ return new Promise((resolve) => {
+ if (!this[kSize]) {
+ resolve(null)
+ } else {
+ this[kClosedResolve] = resolve
+ }
+ })
+ }
+
+ async [kDestroy] (err) {
+ return new Promise((resolve) => {
+ const requests = this[kQueue].splice(this[kPendingIdx])
+ for (let i = 0; i < requests.length; i++) {
+ const request = requests[i]
+ errorRequest(this, request, err)
+ }
+
+ const callback = () => {
+ if (this[kClosedResolve]) {
+ // TODO (fix): Should we error here with ClientDestroyedError?
+ this[kClosedResolve]()
+ this[kClosedResolve] = null
+ }
+ resolve()
+ }
+
+ if (!this[kSocket]) {
+ queueMicrotask(callback)
+ } else {
+ util.destroy(this[kSocket].on('close', callback), err)
+ }
+
+ resume(this)
+ })
+ }
+}
+
+const constants = require('./llhttp/constants')
+const createRedirectInterceptor = require('./interceptor/redirectInterceptor')
+const EMPTY_BUF = Buffer.alloc(0)
+
+async function lazyllhttp () {
+ const llhttpWasmData = process.env.JEST_WORKER_ID ? require('./llhttp/llhttp-wasm.js') : undefined
+
+ let mod
+ try {
+ mod = await WebAssembly.compile(Buffer.from(require('./llhttp/llhttp_simd-wasm.js'), 'base64'))
+ } catch (e) {
+ /* istanbul ignore next */
+
+ // We could check if the error was caused by the simd option not
+ // being enabled, but the occurring of this other error
+ // * https://github.com/emscripten-core/emscripten/issues/11495
+ // got me to remove that check to avoid breaking Node 12.
+ mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || require('./llhttp/llhttp-wasm.js'), 'base64'))
+ }
+
+ return await WebAssembly.instantiate(mod, {
+ env: {
+ /* eslint-disable camelcase */
+
+ wasm_on_url: (p, at, len) => {
+ /* istanbul ignore next */
+ return 0
+ },
+ wasm_on_status: (p, at, len) => {
+ assert.strictEqual(currentParser.ptr, p)
+ const start = at - currentBufferPtr + currentBufferRef.byteOffset
+ return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0
+ },
+ wasm_on_message_begin: (p) => {
+ assert.strictEqual(currentParser.ptr, p)
+ return currentParser.onMessageBegin() || 0
+ },
+ wasm_on_header_field: (p, at, len) => {
+ assert.strictEqual(currentParser.ptr, p)
+ const start = at - currentBufferPtr + currentBufferRef.byteOffset
+ return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0
+ },
+ wasm_on_header_value: (p, at, len) => {
+ assert.strictEqual(currentParser.ptr, p)
+ const start = at - currentBufferPtr + currentBufferRef.byteOffset
+ return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0
+ },
+ wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => {
+ assert.strictEqual(currentParser.ptr, p)
+ return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0
+ },
+ wasm_on_body: (p, at, len) => {
+ assert.strictEqual(currentParser.ptr, p)
+ const start = at - currentBufferPtr + currentBufferRef.byteOffset
+ return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0
+ },
+ wasm_on_message_complete: (p) => {
+ assert.strictEqual(currentParser.ptr, p)
+ return currentParser.onMessageComplete() || 0
+ }
+
+ /* eslint-enable camelcase */
+ }
+ })
+}
+
+let llhttpInstance = null
+let llhttpPromise = lazyllhttp()
+llhttpPromise.catch()
+
+let currentParser = null
+let currentBufferRef = null
+let currentBufferSize = 0
+let currentBufferPtr = null
+
+const TIMEOUT_HEADERS = 1
+const TIMEOUT_BODY = 2
+const TIMEOUT_IDLE = 3
+
+class Parser {
+ constructor (client, socket, { exports }) {
+ assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0)
+
+ this.llhttp = exports
+ this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE)
+ this.client = client
+ this.socket = socket
+ this.timeout = null
+ this.timeoutValue = null
+ this.timeoutType = null
+ this.statusCode = null
+ this.statusText = ''
+ this.upgrade = false
+ this.headers = []
+ this.headersSize = 0
+ this.headersMaxSize = client[kMaxHeadersSize]
+ this.shouldKeepAlive = false
+ this.paused = false
+ this.resume = this.resume.bind(this)
+
+ this.bytesRead = 0
+
+ this.keepAlive = ''
+ this.contentLength = ''
+ this.connection = ''
+ this.maxResponseSize = client[kMaxResponseSize]
+ }
+
+ setTimeout (value, type) {
+ this.timeoutType = type
+ if (value !== this.timeoutValue) {
+ timers.clearTimeout(this.timeout)
+ if (value) {
+ this.timeout = timers.setTimeout(onParserTimeout, value, this)
+ // istanbul ignore else: only for jest
+ if (this.timeout.unref) {
+ this.timeout.unref()
+ }
+ } else {
+ this.timeout = null
+ }
+ this.timeoutValue = value
+ } else if (this.timeout) {
+ // istanbul ignore else: only for jest
+ if (this.timeout.refresh) {
+ this.timeout.refresh()
+ }
+ }
+ }
+
+ resume () {
+ if (this.socket.destroyed || !this.paused) {
+ return
+ }
+
+ assert(this.ptr != null)
+ assert(currentParser == null)
+
+ this.llhttp.llhttp_resume(this.ptr)
+
+ assert(this.timeoutType === TIMEOUT_BODY)
+ if (this.timeout) {
+ // istanbul ignore else: only for jest
+ if (this.timeout.refresh) {
+ this.timeout.refresh()
+ }
+ }
+
+ this.paused = false
+ this.execute(this.socket.read() || EMPTY_BUF) // Flush parser.
+ this.readMore()
+ }
+
+ readMore () {
+ while (!this.paused && this.ptr) {
+ const chunk = this.socket.read()
+ if (chunk === null) {
+ break
+ }
+ this.execute(chunk)
+ }
+ }
+
+ execute (data) {
+ assert(this.ptr != null)
+ assert(currentParser == null)
+ assert(!this.paused)
+
+ const { socket, llhttp } = this
+
+ if (data.length > currentBufferSize) {
+ if (currentBufferPtr) {
+ llhttp.free(currentBufferPtr)
+ }
+ currentBufferSize = Math.ceil(data.length / 4096) * 4096
+ currentBufferPtr = llhttp.malloc(currentBufferSize)
+ }
+
+ new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data)
+
+ // Call `execute` on the wasm parser.
+ // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data,
+ // and finally the length of bytes to parse.
+ // The return value is an error code or `constants.ERROR.OK`.
+ try {
+ let ret
+
+ try {
+ currentBufferRef = data
+ currentParser = this
+ ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length)
+ /* eslint-disable-next-line no-useless-catch */
+ } catch (err) {
+ /* istanbul ignore next: difficult to make a test case for */
+ throw err
+ } finally {
+ currentParser = null
+ currentBufferRef = null
+ }
+
+ const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr
+
+ if (ret === constants.ERROR.PAUSED_UPGRADE) {
+ this.onUpgrade(data.slice(offset))
+ } else if (ret === constants.ERROR.PAUSED) {
+ this.paused = true
+ socket.unshift(data.slice(offset))
+ } else if (ret !== constants.ERROR.OK) {
+ const ptr = llhttp.llhttp_get_error_reason(this.ptr)
+ let message = ''
+ /* istanbul ignore else: difficult to make a test case for */
+ if (ptr) {
+ const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0)
+ message =
+ 'Response does not match the HTTP/1.1 protocol (' +
+ Buffer.from(llhttp.memory.buffer, ptr, len).toString() +
+ ')'
+ }
+ throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset))
+ }
+ } catch (err) {
+ util.destroy(socket, err)
+ }
+ }
+
+ destroy () {
+ assert(this.ptr != null)
+ assert(currentParser == null)
+
+ this.llhttp.llhttp_free(this.ptr)
+ this.ptr = null
+
+ timers.clearTimeout(this.timeout)
+ this.timeout = null
+ this.timeoutValue = null
+ this.timeoutType = null
+
+ this.paused = false
+ }
+
+ onStatus (buf) {
+ this.statusText = buf.toString()
+ }
+
+ onMessageBegin () {
+ const { socket, client } = this
+
+ /* istanbul ignore next: difficult to make a test case for */
+ if (socket.destroyed) {
+ return -1
+ }
+
+ const request = client[kQueue][client[kRunningIdx]]
+ if (!request) {
+ return -1
+ }
+ }
+
+ onHeaderField (buf) {
+ const len = this.headers.length
+
+ if ((len & 1) === 0) {
+ this.headers.push(buf)
+ } else {
+ this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf])
+ }
+
+ this.trackHeader(buf.length)
+ }
+
+ onHeaderValue (buf) {
+ let len = this.headers.length
+
+ if ((len & 1) === 1) {
+ this.headers.push(buf)
+ len += 1
+ } else {
+ this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf])
+ }
+
+ const key = this.headers[len - 2]
+ if (key.length === 10 && key.toString().toLowerCase() === 'keep-alive') {
+ this.keepAlive += buf.toString()
+ } else if (key.length === 10 && key.toString().toLowerCase() === 'connection') {
+ this.connection += buf.toString()
+ } else if (key.length === 14 && key.toString().toLowerCase() === 'content-length') {
+ this.contentLength += buf.toString()
+ }
+
+ this.trackHeader(buf.length)
+ }
+
+ trackHeader (len) {
+ this.headersSize += len
+ if (this.headersSize >= this.headersMaxSize) {
+ util.destroy(this.socket, new HeadersOverflowError())
+ }
+ }
+
+ onUpgrade (head) {
+ const { upgrade, client, socket, headers, statusCode } = this
+
+ assert(upgrade)
+
+ const request = client[kQueue][client[kRunningIdx]]
+ assert(request)
+
+ assert(!socket.destroyed)
+ assert(socket === client[kSocket])
+ assert(!this.paused)
+ assert(request.upgrade || request.method === 'CONNECT')
+
+ this.statusCode = null
+ this.statusText = ''
+ this.shouldKeepAlive = null
+
+ assert(this.headers.length % 2 === 0)
+ this.headers = []
+ this.headersSize = 0
+
+ socket.unshift(head)
+
+ socket[kParser].destroy()
+ socket[kParser] = null
+
+ socket[kClient] = null
+ socket[kError] = null
+ socket
+ .removeListener('error', onSocketError)
+ .removeListener('readable', onSocketReadable)
+ .removeListener('end', onSocketEnd)
+ .removeListener('close', onSocketClose)
+
+ client[kSocket] = null
+ client[kQueue][client[kRunningIdx]++] = null
+ client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade'))
+
+ try {
+ request.onUpgrade(statusCode, headers, socket)
+ } catch (err) {
+ util.destroy(socket, err)
+ }
+
+ resume(client)
+ }
+
+ onHeadersComplete (statusCode, upgrade, shouldKeepAlive) {
+ const { client, socket, headers, statusText } = this
+
+ /* istanbul ignore next: difficult to make a test case for */
+ if (socket.destroyed) {
+ return -1
+ }
+
+ const request = client[kQueue][client[kRunningIdx]]
+
+ /* istanbul ignore next: difficult to make a test case for */
+ if (!request) {
+ return -1
+ }
+
+ assert(!this.upgrade)
+ assert(this.statusCode < 200)
+
+ if (statusCode === 100) {
+ util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))
+ return -1
+ }
+
+ /* this can only happen if server is misbehaving */
+ if (upgrade && !request.upgrade) {
+ util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket)))
+ return -1
+ }
+
+ assert.strictEqual(this.timeoutType, TIMEOUT_HEADERS)
+
+ this.statusCode = statusCode
+ this.shouldKeepAlive = (
+ shouldKeepAlive ||
+ // Override llhttp value which does not allow keepAlive for HEAD.
+ (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive')
+ )
+
+ if (this.statusCode >= 200) {
+ const bodyTimeout = request.bodyTimeout != null
+ ? request.bodyTimeout
+ : client[kBodyTimeout]
+ this.setTimeout(bodyTimeout, TIMEOUT_BODY)
+ } else if (this.timeout) {
+ // istanbul ignore else: only for jest
+ if (this.timeout.refresh) {
+ this.timeout.refresh()
+ }
+ }
+
+ if (request.method === 'CONNECT') {
+ assert(client[kRunning] === 1)
+ this.upgrade = true
+ return 2
+ }
+
+ if (upgrade) {
+ assert(client[kRunning] === 1)
+ this.upgrade = true
+ return 2
+ }
+
+ assert(this.headers.length % 2 === 0)
+ this.headers = []
+ this.headersSize = 0
+
+ if (this.shouldKeepAlive && client[kPipelining]) {
+ const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null
+
+ if (keepAliveTimeout != null) {
+ const timeout = Math.min(
+ keepAliveTimeout - client[kKeepAliveTimeoutThreshold],
+ client[kKeepAliveMaxTimeout]
+ )
+ if (timeout <= 0) {
+ socket[kReset] = true
+ } else {
+ client[kKeepAliveTimeoutValue] = timeout
+ }
+ } else {
+ client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]
+ }
+ } else {
+ // Stop more requests from being dispatched.
+ socket[kReset] = true
+ }
+
+ let pause
+ try {
+ pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false
+ } catch (err) {
+ util.destroy(socket, err)
+ return -1
+ }
+
+ if (request.method === 'HEAD') {
+ return 1
+ }
+
+ if (statusCode < 200) {
+ return 1
+ }
+
+ if (socket[kBlocking]) {
+ socket[kBlocking] = false
+ resume(client)
+ }
+
+ return pause ? constants.ERROR.PAUSED : 0
+ }
+
+ onBody (buf) {
+ const { client, socket, statusCode, maxResponseSize } = this
+
+ if (socket.destroyed) {
+ return -1
+ }
+
+ const request = client[kQueue][client[kRunningIdx]]
+ assert(request)
+
+ assert.strictEqual(this.timeoutType, TIMEOUT_BODY)
+ if (this.timeout) {
+ // istanbul ignore else: only for jest
+ if (this.timeout.refresh) {
+ this.timeout.refresh()
+ }
+ }
+
+ assert(statusCode >= 200)
+
+ if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) {
+ util.destroy(socket, new ResponseExceededMaxSizeError())
+ return -1
+ }
+
+ this.bytesRead += buf.length
+
+ try {
+ if (request.onData(buf) === false) {
+ return constants.ERROR.PAUSED
+ }
+ } catch (err) {
+ util.destroy(socket, err)
+ return -1
+ }
+ }
+
+ onMessageComplete () {
+ const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this
+
+ if (socket.destroyed && (!statusCode || shouldKeepAlive)) {
+ return -1
+ }
+
+ if (upgrade) {
+ return
+ }
+
+ const request = client[kQueue][client[kRunningIdx]]
+ assert(request)
+
+ assert(statusCode >= 100)
+
+ this.statusCode = null
+ this.statusText = ''
+ this.bytesRead = 0
+ this.contentLength = ''
+ this.keepAlive = ''
+ this.connection = ''
+
+ assert(this.headers.length % 2 === 0)
+ this.headers = []
+ this.headersSize = 0
+
+ if (statusCode < 200) {
+ return
+ }
+
+ /* istanbul ignore next: should be handled by llhttp? */
+ if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) {
+ util.destroy(socket, new ResponseContentLengthMismatchError())
+ return -1
+ }
+
+ try {
+ request.onComplete(headers)
+ } catch (err) {
+ errorRequest(client, request, err)
+ }
+
+ client[kQueue][client[kRunningIdx]++] = null
+
+ if (socket[kWriting]) {
+ assert.strictEqual(client[kRunning], 0)
+ // Response completed before request.
+ util.destroy(socket, new InformationalError('reset'))
+ return constants.ERROR.PAUSED
+ } else if (!shouldKeepAlive) {
+ util.destroy(socket, new InformationalError('reset'))
+ return constants.ERROR.PAUSED
+ } else if (socket[kReset] && client[kRunning] === 0) {
+ // Destroy socket once all requests have completed.
+ // The request at the tail of the pipeline is the one
+ // that requested reset and no further requests should
+ // have been queued since then.
+ util.destroy(socket, new InformationalError('reset'))
+ return constants.ERROR.PAUSED
+ } else if (client[kPipelining] === 1) {
+ // We must wait a full event loop cycle to reuse this socket to make sure
+ // that non-spec compliant servers are not closing the connection even if they
+ // said they won't.
+ setImmediate(resume, client)
+ } else {
+ resume(client)
+ }
+ }
+}
+
+function onParserTimeout (parser) {
+ const { socket, timeoutType, client } = parser
+
+ /* istanbul ignore else */
+ if (timeoutType === TIMEOUT_HEADERS) {
+ if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) {
+ assert(!parser.paused, 'cannot be paused while waiting for headers')
+ util.destroy(socket, new HeadersTimeoutError())
+ }
+ } else if (timeoutType === TIMEOUT_BODY) {
+ if (!parser.paused) {
+ util.destroy(socket, new BodyTimeoutError())
+ }
+ } else if (timeoutType === TIMEOUT_IDLE) {
+ assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue])
+ util.destroy(socket, new InformationalError('socket idle timeout'))
+ }
+}
+
+function onSocketReadable () {
+ const { [kParser]: parser } = this
+ parser.readMore()
+}
+
+function onSocketError (err) {
+ const { [kParser]: parser } = this
+
+ assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')
+
+ // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded
+ // to the user.
+ if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) {
+ // We treat all incoming data so for as a valid response.
+ parser.onMessageComplete()
+ return
+ }
+
+ this[kError] = err
+
+ onError(this[kClient], err)
+}
+
+function onError (client, err) {
+ if (
+ client[kRunning] === 0 &&
+ err.code !== 'UND_ERR_INFO' &&
+ err.code !== 'UND_ERR_SOCKET'
+ ) {
+ // Error is not caused by running request and not a recoverable
+ // socket error.
+
+ assert(client[kPendingIdx] === client[kRunningIdx])
+
+ const requests = client[kQueue].splice(client[kRunningIdx])
+ for (let i = 0; i < requests.length; i++) {
+ const request = requests[i]
+ errorRequest(client, request, err)
+ }
+ assert(client[kSize] === 0)
+ }
+}
+
+function onSocketEnd () {
+ const { [kParser]: parser } = this
+
+ if (parser.statusCode && !parser.shouldKeepAlive) {
+ // We treat all incoming data so far as a valid response.
+ parser.onMessageComplete()
+ return
+ }
+
+ util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this)))
+}
+
+function onSocketClose () {
+ const { [kClient]: client } = this
+
+ if (!this[kError] && this[kParser].statusCode && !this[kParser].shouldKeepAlive) {
+ // We treat all incoming data so far as a valid response.
+ this[kParser].onMessageComplete()
+ }
+
+ this[kParser].destroy()
+ this[kParser] = null
+
+ const err = this[kError] || new SocketError('closed', util.getSocketInfo(this))
+
+ client[kSocket] = null
+
+ if (client.destroyed) {
+ assert(client[kPending] === 0)
+
+ // Fail entire queue.
+ const requests = client[kQueue].splice(client[kRunningIdx])
+ for (let i = 0; i < requests.length; i++) {
+ const request = requests[i]
+ errorRequest(client, request, err)
+ }
+ } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') {
+ // Fail head of pipeline.
+ const request = client[kQueue][client[kRunningIdx]]
+ client[kQueue][client[kRunningIdx]++] = null
+
+ errorRequest(client, request, err)
+ }
+
+ client[kPendingIdx] = client[kRunningIdx]
+
+ assert(client[kRunning] === 0)
+
+ client.emit('disconnect', client[kUrl], [client], err)
+
+ resume(client)
+}
+
+async function connect (client) {
+ assert(!client[kConnecting])
+ assert(!client[kSocket])
+
+ let { host, hostname, protocol, port } = client[kUrl]
+
+ // Resolve ipv6
+ if (hostname[0] === '[') {
+ const idx = hostname.indexOf(']')
+
+ assert(idx !== -1)
+ const ip = hostname.substr(1, idx - 1)
+
+ assert(net.isIP(ip))
+ hostname = ip
+ }
+
+ client[kConnecting] = true
+
+ if (channels.beforeConnect.hasSubscribers) {
+ channels.beforeConnect.publish({
+ connectParams: {
+ host,
+ hostname,
+ protocol,
+ port,
+ servername: client[kServerName],
+ localAddress: client[kLocalAddress]
+ },
+ connector: client[kConnector]
+ })
+ }
+
+ try {
+ const socket = await new Promise((resolve, reject) => {
+ client[kConnector]({
+ host,
+ hostname,
+ protocol,
+ port,
+ servername: client[kServerName],
+ localAddress: client[kLocalAddress]
+ }, (err, socket) => {
+ if (err) {
+ reject(err)
+ } else {
+ resolve(socket)
+ }
+ })
+ })
+
+ if (client.destroyed) {
+ util.destroy(socket.on('error', () => {}), new ClientDestroyedError())
+ return
+ }
+
+ if (!llhttpInstance) {
+ llhttpInstance = await llhttpPromise
+ llhttpPromise = null
+ }
+
+ client[kConnecting] = false
+
+ assert(socket)
+
+ socket[kNoRef] = false
+ socket[kWriting] = false
+ socket[kReset] = false
+ socket[kBlocking] = false
+ socket[kError] = null
+ socket[kParser] = new Parser(client, socket, llhttpInstance)
+ socket[kClient] = client
+ socket[kCounter] = 0
+ socket[kMaxRequests] = client[kMaxRequests]
+ socket
+ .on('error', onSocketError)
+ .on('readable', onSocketReadable)
+ .on('end', onSocketEnd)
+ .on('close', onSocketClose)
+
+ client[kSocket] = socket
+
+ if (channels.connected.hasSubscribers) {
+ channels.connected.publish({
+ connectParams: {
+ host,
+ hostname,
+ protocol,
+ port,
+ servername: client[kServerName],
+ localAddress: client[kLocalAddress]
+ },
+ connector: client[kConnector],
+ socket
+ })
+ }
+ client.emit('connect', client[kUrl], [client])
+ } catch (err) {
+ if (client.destroyed) {
+ return
+ }
+
+ client[kConnecting] = false
+
+ if (channels.connectError.hasSubscribers) {
+ channels.connectError.publish({
+ connectParams: {
+ host,
+ hostname,
+ protocol,
+ port,
+ servername: client[kServerName],
+ localAddress: client[kLocalAddress]
+ },
+ connector: client[kConnector],
+ error: err
+ })
+ }
+
+ if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') {
+ assert(client[kRunning] === 0)
+ while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) {
+ const request = client[kQueue][client[kPendingIdx]++]
+ errorRequest(client, request, err)
+ }
+ } else {
+ onError(client, err)
+ }
+
+ client.emit('connectionError', client[kUrl], [client], err)
+ }
+
+ resume(client)
+}
+
+function emitDrain (client) {
+ client[kNeedDrain] = 0
+ client.emit('drain', client[kUrl], [client])
+}
+
+function resume (client, sync) {
+ if (client[kResuming] === 2) {
+ return
+ }
+
+ client[kResuming] = 2
+
+ _resume(client, sync)
+ client[kResuming] = 0
+
+ if (client[kRunningIdx] > 256) {
+ client[kQueue].splice(0, client[kRunningIdx])
+ client[kPendingIdx] -= client[kRunningIdx]
+ client[kRunningIdx] = 0
+ }
+}
+
+function _resume (client, sync) {
+ while (true) {
+ if (client.destroyed) {
+ assert(client[kPending] === 0)
+ return
+ }
+
+ if (client[kClosedResolve] && !client[kSize]) {
+ client[kClosedResolve]()
+ client[kClosedResolve] = null
+ return
+ }
+
+ const socket = client[kSocket]
+
+ if (socket && !socket.destroyed) {
+ if (client[kSize] === 0) {
+ if (!socket[kNoRef] && socket.unref) {
+ socket.unref()
+ socket[kNoRef] = true
+ }
+ } else if (socket[kNoRef] && socket.ref) {
+ socket.ref()
+ socket[kNoRef] = false
+ }
+
+ if (client[kSize] === 0) {
+ if (socket[kParser].timeoutType !== TIMEOUT_IDLE) {
+ socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE)
+ }
+ } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) {
+ if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) {
+ const request = client[kQueue][client[kRunningIdx]]
+ const headersTimeout = request.headersTimeout != null
+ ? request.headersTimeout
+ : client[kHeadersTimeout]
+ socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS)
+ }
+ }
+ }
+
+ if (client[kBusy]) {
+ client[kNeedDrain] = 2
+ } else if (client[kNeedDrain] === 2) {
+ if (sync) {
+ client[kNeedDrain] = 1
+ process.nextTick(emitDrain, client)
+ } else {
+ emitDrain(client)
+ }
+ continue
+ }
+
+ if (client[kPending] === 0) {
+ return
+ }
+
+ if (client[kRunning] >= (client[kPipelining] || 1)) {
+ return
+ }
+
+ const request = client[kQueue][client[kPendingIdx]]
+
+ if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) {
+ if (client[kRunning] > 0) {
+ return
+ }
+
+ client[kServerName] = request.servername
+
+ if (socket && socket.servername !== request.servername) {
+ util.destroy(socket, new InformationalError('servername changed'))
+ return
+ }
+ }
+
+ if (client[kConnecting]) {
+ return
+ }
+
+ if (!socket) {
+ connect(client)
+ return
+ }
+
+ if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) {
+ return
+ }
+
+ if (client[kRunning] > 0 && !request.idempotent) {
+ // Non-idempotent request cannot be retried.
+ // Ensure that no other requests are inflight and
+ // could cause failure.
+ return
+ }
+
+ if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) {
+ // Don't dispatch an upgrade until all preceding requests have completed.
+ // A misbehaving server might upgrade the connection before all pipelined
+ // request has completed.
+ return
+ }
+
+ if (util.isStream(request.body) && util.bodyLength(request.body) === 0) {
+ request.body
+ .on('data', /* istanbul ignore next */ function () {
+ /* istanbul ignore next */
+ assert(false)
+ })
+ .on('error', function (err) {
+ errorRequest(client, request, err)
+ })
+ .on('end', function () {
+ util.destroy(this)
+ })
+
+ request.body = null
+ }
+
+ if (client[kRunning] > 0 &&
+ (util.isStream(request.body) || util.isAsyncIterable(request.body))) {
+ // Request with stream or iterator body can error while other requests
+ // are inflight and indirectly error those as well.
+ // Ensure this doesn't happen by waiting for inflight
+ // to complete before dispatching.
+
+ // Request with stream or iterator body cannot be retried.
+ // Ensure that no other requests are inflight and
+ // could cause failure.
+ return
+ }
+
+ if (!request.aborted && write(client, request)) {
+ client[kPendingIdx]++
+ } else {
+ client[kQueue].splice(client[kPendingIdx], 1)
+ }
+ }
+}
+
+function write (client, request) {
+ const { body, method, path, host, upgrade, headers, blocking, reset } = request
+
+ // https://tools.ietf.org/html/rfc7231#section-4.3.1
+ // https://tools.ietf.org/html/rfc7231#section-4.3.2
+ // https://tools.ietf.org/html/rfc7231#section-4.3.5
+
+ // Sending a payload body on a request that does not
+ // expect it can cause undefined behavior on some
+ // servers and corrupt connection state. Do not
+ // re-use the connection for further requests.
+
+ const expectsPayload = (
+ method === 'PUT' ||
+ method === 'POST' ||
+ method === 'PATCH'
+ )
+
+ if (body && typeof body.read === 'function') {
+ // Try to read EOF in order to get length.
+ body.read(0)
+ }
+
+ let contentLength = util.bodyLength(body)
+
+ if (contentLength === null) {
+ contentLength = request.contentLength
+ }
+
+ if (contentLength === 0 && !expectsPayload) {
+ // https://tools.ietf.org/html/rfc7230#section-3.3.2
+ // A user agent SHOULD NOT send a Content-Length header field when
+ // the request message does not contain a payload body and the method
+ // semantics do not anticipate such a body.
+
+ contentLength = null
+ }
+
+ if (request.contentLength !== null && request.contentLength !== contentLength) {
+ if (client[kStrictContentLength]) {
+ errorRequest(client, request, new RequestContentLengthMismatchError())
+ return false
+ }
+
+ process.emitWarning(new RequestContentLengthMismatchError())
+ }
+
+ const socket = client[kSocket]
+
+ try {
+ request.onConnect((err) => {
+ if (request.aborted || request.completed) {
+ return
+ }
+
+ errorRequest(client, request, err || new RequestAbortedError())
+
+ util.destroy(socket, new InformationalError('aborted'))
+ })
+ } catch (err) {
+ errorRequest(client, request, err)
+ }
+
+ if (request.aborted) {
+ return false
+ }
+
+ if (method === 'HEAD') {
+ // https://github.com/mcollina/undici/issues/258
+ // Close after a HEAD request to interop with misbehaving servers
+ // that may send a body in the response.
+
+ socket[kReset] = true
+ }
+
+ if (upgrade || method === 'CONNECT') {
+ // On CONNECT or upgrade, block pipeline from dispatching further
+ // requests on this connection.
+
+ socket[kReset] = true
+ }
+
+ if (reset != null) {
+ socket[kReset] = reset
+ }
+
+ if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) {
+ socket[kReset] = true
+ }
+
+ if (blocking) {
+ socket[kBlocking] = true
+ }
+
+ let header = `${method} ${path} HTTP/1.1\r\n`
+
+ if (typeof host === 'string') {
+ header += `host: ${host}\r\n`
+ } else {
+ header += client[kHostHeader]
+ }
+
+ if (upgrade) {
+ header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n`
+ } else if (client[kPipelining] && !socket[kReset]) {
+ header += 'connection: keep-alive\r\n'
+ } else {
+ header += 'connection: close\r\n'
+ }
+
+ if (headers) {
+ header += headers
+ }
+
+ if (channels.sendHeaders.hasSubscribers) {
+ channels.sendHeaders.publish({ request, headers: header, socket })
+ }
+
+ /* istanbul ignore else: assertion */
+ if (!body) {
+ if (contentLength === 0) {
+ socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1')
+ } else {
+ assert(contentLength === null, 'no body must not have content length')
+ socket.write(`${header}\r\n`, 'latin1')
+ }
+ request.onRequestSent()
+ } else if (util.isBuffer(body)) {
+ assert(contentLength === body.byteLength, 'buffer body must have content length')
+
+ socket.cork()
+ socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1')
+ socket.write(body)
+ socket.uncork()
+ request.onBodySent(body)
+ request.onRequestSent()
+ if (!expectsPayload) {
+ socket[kReset] = true
+ }
+ } else if (util.isBlobLike(body)) {
+ if (typeof body.stream === 'function') {
+ writeIterable({ body: body.stream(), client, request, socket, contentLength, header, expectsPayload })
+ } else {
+ writeBlob({ body, client, request, socket, contentLength, header, expectsPayload })
+ }
+ } else if (util.isStream(body)) {
+ writeStream({ body, client, request, socket, contentLength, header, expectsPayload })
+ } else if (util.isIterable(body)) {
+ writeIterable({ body, client, request, socket, contentLength, header, expectsPayload })
+ } else {
+ assert(false)
+ }
+
+ return true
+}
+
+function writeStream ({ body, client, request, socket, contentLength, header, expectsPayload }) {
+ assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined')
+
+ let finished = false
+
+ const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header })
+
+ const onData = function (chunk) {
+ if (finished) {
+ return
+ }
+
+ try {
+ if (!writer.write(chunk) && this.pause) {
+ this.pause()
+ }
+ } catch (err) {
+ util.destroy(this, err)
+ }
+ }
+ const onDrain = function () {
+ if (finished) {
+ return
+ }
+
+ if (body.resume) {
+ body.resume()
+ }
+ }
+ const onAbort = function () {
+ onFinished(new RequestAbortedError())
+ }
+ const onFinished = function (err) {
+ if (finished) {
+ return
+ }
+
+ finished = true
+
+ assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1))
+
+ socket
+ .off('drain', onDrain)
+ .off('error', onFinished)
+
+ body
+ .removeListener('data', onData)
+ .removeListener('end', onFinished)
+ .removeListener('error', onFinished)
+ .removeListener('close', onAbort)
+
+ if (!err) {
+ try {
+ writer.end()
+ } catch (er) {
+ err = er
+ }
+ }
+
+ writer.destroy(err)
+
+ if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) {
+ util.destroy(body, err)
+ } else {
+ util.destroy(body)
+ }
+ }
+
+ body
+ .on('data', onData)
+ .on('end', onFinished)
+ .on('error', onFinished)
+ .on('close', onAbort)
+
+ if (body.resume) {
+ body.resume()
+ }
+
+ socket
+ .on('drain', onDrain)
+ .on('error', onFinished)
+}
+
+async function writeBlob ({ body, client, request, socket, contentLength, header, expectsPayload }) {
+ assert(contentLength === body.size, 'blob body must have content length')
+
+ try {
+ if (contentLength != null && contentLength !== body.size) {
+ throw new RequestContentLengthMismatchError()
+ }
+
+ const buffer = Buffer.from(await body.arrayBuffer())
+
+ socket.cork()
+ socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1')
+ socket.write(buffer)
+ socket.uncork()
+
+ request.onBodySent(buffer)
+ request.onRequestSent()
+
+ if (!expectsPayload) {
+ socket[kReset] = true
+ }
+
+ resume(client)
+ } catch (err) {
+ util.destroy(socket, err)
+ }
+}
+
+async function writeIterable ({ body, client, request, socket, contentLength, header, expectsPayload }) {
+ assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined')
+
+ let callback = null
+ function onDrain () {
+ if (callback) {
+ const cb = callback
+ callback = null
+ cb()
+ }
+ }
+
+ const waitForDrain = () => new Promise((resolve, reject) => {
+ assert(callback === null)
+
+ if (socket[kError]) {
+ reject(socket[kError])
+ } else {
+ callback = resolve
+ }
+ })
+
+ socket
+ .on('close', onDrain)
+ .on('drain', onDrain)
+
+ const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header })
+ try {
+ // It's up to the user to somehow abort the async iterable.
+ for await (const chunk of body) {
+ if (socket[kError]) {
+ throw socket[kError]
+ }
+
+ if (!writer.write(chunk)) {
+ await waitForDrain()
+ }
+ }
+
+ writer.end()
+ } catch (err) {
+ writer.destroy(err)
+ } finally {
+ socket
+ .off('close', onDrain)
+ .off('drain', onDrain)
+ }
+}
+
+class AsyncWriter {
+ constructor ({ socket, request, contentLength, client, expectsPayload, header }) {
+ this.socket = socket
+ this.request = request
+ this.contentLength = contentLength
+ this.client = client
+ this.bytesWritten = 0
+ this.expectsPayload = expectsPayload
+ this.header = header
+
+ socket[kWriting] = true
+ }
+
+ write (chunk) {
+ const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this
+
+ if (socket[kError]) {
+ throw socket[kError]
+ }
+
+ if (socket.destroyed) {
+ return false
+ }
+
+ const len = Buffer.byteLength(chunk)
+ if (!len) {
+ return true
+ }
+
+ // We should defer writing chunks.
+ if (contentLength !== null && bytesWritten + len > contentLength) {
+ if (client[kStrictContentLength]) {
+ throw new RequestContentLengthMismatchError()
+ }
+
+ process.emitWarning(new RequestContentLengthMismatchError())
+ }
+
+ socket.cork()
+
+ if (bytesWritten === 0) {
+ if (!expectsPayload) {
+ socket[kReset] = true
+ }
+
+ if (contentLength === null) {
+ socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1')
+ } else {
+ socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1')
+ }
+ }
+
+ if (contentLength === null) {
+ socket.write(`\r\n${len.toString(16)}\r\n`, 'latin1')
+ }
+
+ this.bytesWritten += len
+
+ const ret = socket.write(chunk)
+
+ socket.uncork()
+
+ request.onBodySent(chunk)
+
+ if (!ret) {
+ if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {
+ // istanbul ignore else: only for jest
+ if (socket[kParser].timeout.refresh) {
+ socket[kParser].timeout.refresh()
+ }
+ }
+ }
+
+ return ret
+ }
+
+ end () {
+ const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this
+ request.onRequestSent()
+
+ socket[kWriting] = false
+
+ if (socket[kError]) {
+ throw socket[kError]
+ }
+
+ if (socket.destroyed) {
+ return
+ }
+
+ if (bytesWritten === 0) {
+ if (expectsPayload) {
+ // https://tools.ietf.org/html/rfc7230#section-3.3.2
+ // A user agent SHOULD send a Content-Length in a request message when
+ // no Transfer-Encoding is sent and the request method defines a meaning
+ // for an enclosed payload body.
+
+ socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1')
+ } else {
+ socket.write(`${header}\r\n`, 'latin1')
+ }
+ } else if (contentLength === null) {
+ socket.write('\r\n0\r\n\r\n', 'latin1')
+ }
+
+ if (contentLength !== null && bytesWritten !== contentLength) {
+ if (client[kStrictContentLength]) {
+ throw new RequestContentLengthMismatchError()
+ } else {
+ process.emitWarning(new RequestContentLengthMismatchError())
+ }
+ }
+
+ if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {
+ // istanbul ignore else: only for jest
+ if (socket[kParser].timeout.refresh) {
+ socket[kParser].timeout.refresh()
+ }
+ }
+
+ resume(client)
+ }
+
+ destroy (err) {
+ const { socket, client } = this
+
+ socket[kWriting] = false
+
+ if (err) {
+ assert(client[kRunning] <= 1, 'pipeline should only contain this request')
+ util.destroy(socket, err)
+ }
+ }
+}
+
+function errorRequest (client, request, err) {
+ try {
+ request.onError(err)
+ assert(request.aborted)
+ } catch (err) {
+ client.emit('error', err)
+ }
+}
+
+module.exports = Client
diff --git a/node_modules/undici/lib/compat/dispatcher-weakref.js b/node_modules/undici/lib/compat/dispatcher-weakref.js
new file mode 100644
index 0000000..dbca858
--- /dev/null
+++ b/node_modules/undici/lib/compat/dispatcher-weakref.js
@@ -0,0 +1,38 @@
+'use strict'
+
+/* istanbul ignore file: only for Node 12 */
+
+const { kConnected, kSize } = require('../core/symbols')
+
+class CompatWeakRef {
+ constructor (value) {
+ this.value = value
+ }
+
+ deref () {
+ return this.value[kConnected] === 0 && this.value[kSize] === 0
+ ? undefined
+ : this.value
+ }
+}
+
+class CompatFinalizer {
+ constructor (finalizer) {
+ this.finalizer = finalizer
+ }
+
+ register (dispatcher, key) {
+ dispatcher.on('disconnect', () => {
+ if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) {
+ this.finalizer(key)
+ }
+ })
+ }
+}
+
+module.exports = function () {
+ return {
+ WeakRef: global.WeakRef || CompatWeakRef,
+ FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer
+ }
+}
diff --git a/node_modules/undici/lib/cookies/constants.js b/node_modules/undici/lib/cookies/constants.js
new file mode 100644
index 0000000..85f1fec
--- /dev/null
+++ b/node_modules/undici/lib/cookies/constants.js
@@ -0,0 +1,12 @@
+'use strict'
+
+// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size
+const maxAttributeValueSize = 1024
+
+// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size
+const maxNameValuePairSize = 4096
+
+module.exports = {
+ maxAttributeValueSize,
+ maxNameValuePairSize
+}
diff --git a/node_modules/undici/lib/cookies/index.js b/node_modules/undici/lib/cookies/index.js
new file mode 100644
index 0000000..c9c1f28
--- /dev/null
+++ b/node_modules/undici/lib/cookies/index.js
@@ -0,0 +1,184 @@
+'use strict'
+
+const { parseSetCookie } = require('./parse')
+const { stringify, getHeadersList } = require('./util')
+const { webidl } = require('../fetch/webidl')
+const { Headers } = require('../fetch/headers')
+
+/**
+ * @typedef {Object} Cookie
+ * @property {string} name
+ * @property {string} value
+ * @property {Date|number|undefined} expires
+ * @property {number|undefined} maxAge
+ * @property {string|undefined} domain
+ * @property {string|undefined} path
+ * @property {boolean|undefined} secure
+ * @property {boolean|undefined} httpOnly
+ * @property {'Strict'|'Lax'|'None'} sameSite
+ * @property {string[]} unparsed
+ */
+
+/**
+ * @param {Headers} headers
+ * @returns {Record<string, string>}
+ */
+function getCookies (headers) {
+ webidl.argumentLengthCheck(arguments, 1, { header: 'getCookies' })
+
+ webidl.brandCheck(headers, Headers, { strict: false })
+
+ const cookie = headers.get('cookie')
+ const out = {}
+
+ if (!cookie) {
+ return out
+ }
+
+ for (const piece of cookie.split(';')) {
+ const [name, ...value] = piece.split('=')
+
+ out[name.trim()] = value.join('=')
+ }
+
+ return out
+}
+
+/**
+ * @param {Headers} headers
+ * @param {string} name
+ * @param {{ path?: string, domain?: string }|undefined} attributes
+ * @returns {void}
+ */
+function deleteCookie (headers, name, attributes) {
+ webidl.argumentLengthCheck(arguments, 2, { header: 'deleteCookie' })
+
+ webidl.brandCheck(headers, Headers, { strict: false })
+
+ name = webidl.converters.DOMString(name)
+ attributes = webidl.converters.DeleteCookieAttributes(attributes)
+
+ // Matches behavior of
+ // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278
+ setCookie(headers, {
+ name,
+ value: '',
+ expires: new Date(0),
+ ...attributes
+ })
+}
+
+/**
+ * @param {Headers} headers
+ * @returns {Cookie[]}
+ */
+function getSetCookies (headers) {
+ webidl.argumentLengthCheck(arguments, 1, { header: 'getSetCookies' })
+
+ webidl.brandCheck(headers, Headers, { strict: false })
+
+ const cookies = getHeadersList(headers).cookies
+
+ if (!cookies) {
+ return []
+ }
+
+ // In older versions of undici, cookies is a list of name:value.
+ return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
+}
+
+/**
+ * @param {Headers} headers
+ * @param {Cookie} cookie
+ * @returns {void}
+ */
+function setCookie (headers, cookie) {
+ webidl.argumentLengthCheck(arguments, 2, { header: 'setCookie' })
+
+ webidl.brandCheck(headers, Headers, { strict: false })
+
+ cookie = webidl.converters.Cookie(cookie)
+
+ const str = stringify(cookie)
+
+ if (str) {
+ headers.append('Set-Cookie', stringify(cookie))
+ }
+}
+
+webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([
+ {
+ converter: webidl.nullableConverter(webidl.converters.DOMString),
+ key: 'path',
+ defaultValue: null
+ },
+ {
+ converter: webidl.nullableConverter(webidl.converters.DOMString),
+ key: 'domain',
+ defaultValue: null
+ }
+])
+
+webidl.converters.Cookie = webidl.dictionaryConverter([
+ {
+ converter: webidl.converters.DOMString,
+ key: 'name'
+ },
+ {
+ converter: webidl.converters.DOMString,
+ key: 'value'
+ },
+ {
+ converter: webidl.nullableConverter((value) => {
+ if (typeof value === 'number') {
+ return webidl.converters['unsigned long long'](value)
+ }
+
+ return new Date(value)
+ }),
+ key: 'expires',
+ defaultValue: null
+ },
+ {
+ converter: webidl.nullableConverter(webidl.converters['long long']),
+ key: 'maxAge',
+ defaultValue: null
+ },
+ {
+ converter: webidl.nullableConverter(webidl.converters.DOMString),
+ key: 'domain',
+ defaultValue: null
+ },
+ {
+ converter: webidl.nullableConverter(webidl.converters.DOMString),
+ key: 'path',
+ defaultValue: null
+ },
+ {
+ converter: webidl.nullableConverter(webidl.converters.boolean),
+ key: 'secure',
+ defaultValue: null
+ },
+ {
+ converter: webidl.nullableConverter(webidl.converters.boolean),
+ key: 'httpOnly',
+ defaultValue: null
+ },
+ {
+ converter: webidl.converters.USVString,
+ key: 'sameSite',
+ allowedValues: ['Strict', 'Lax', 'None']
+ },
+ {
+ converter: webidl.sequenceConverter(webidl.converters.DOMString),
+ key: 'unparsed',
+ defaultValue: []
+ }
+])
+
+module.exports = {
+ getCookies,
+ deleteCookie,
+ getSetCookies,
+ setCookie
+}
diff --git a/node_modules/undici/lib/cookies/parse.js b/node_modules/undici/lib/cookies/parse.js
new file mode 100644
index 0000000..aae2750
--- /dev/null
+++ b/node_modules/undici/lib/cookies/parse.js
@@ -0,0 +1,317 @@
+'use strict'
+
+const { maxNameValuePairSize, maxAttributeValueSize } = require('./constants')
+const { isCTLExcludingHtab } = require('./util')
+const { collectASequenceOfCodePointsFast } = require('../fetch/dataURL')
+const assert = require('assert')
+
+/**
+ * @description Parses the field-value attributes of a set-cookie header string.
+ * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4
+ * @param {string} header
+ * @returns if the header is invalid, null will be returned
+ */
+function parseSetCookie (header) {
+ // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F
+ // character (CTL characters excluding HTAB): Abort these steps and
+ // ignore the set-cookie-string entirely.
+ if (isCTLExcludingHtab(header)) {
+ return null
+ }
+
+ let nameValuePair = ''
+ let unparsedAttributes = ''
+ let name = ''
+ let value = ''
+
+ // 2. If the set-cookie-string contains a %x3B (";") character:
+ if (header.includes(';')) {
+ // 1. The name-value-pair string consists of the characters up to,
+ // but not including, the first %x3B (";"), and the unparsed-
+ // attributes consist of the remainder of the set-cookie-string
+ // (including the %x3B (";") in question).
+ const position = { position: 0 }
+
+ nameValuePair = collectASequenceOfCodePointsFast(';', header, position)
+ unparsedAttributes = header.slice(position.position)
+ } else {
+ // Otherwise:
+
+ // 1. The name-value-pair string consists of all the characters
+ // contained in the set-cookie-string, and the unparsed-
+ // attributes is the empty string.
+ nameValuePair = header
+ }
+
+ // 3. If the name-value-pair string lacks a %x3D ("=") character, then
+ // the name string is empty, and the value string is the value of
+ // name-value-pair.
+ if (!nameValuePair.includes('=')) {
+ value = nameValuePair
+ } else {
+ // Otherwise, the name string consists of the characters up to, but
+ // not including, the first %x3D ("=") character, and the (possibly
+ // empty) value string consists of the characters after the first
+ // %x3D ("=") character.
+ const position = { position: 0 }
+ name = collectASequenceOfCodePointsFast(
+ '=',
+ nameValuePair,
+ position
+ )
+ value = nameValuePair.slice(position.position + 1)
+ }
+
+ // 4. Remove any leading or trailing WSP characters from the name
+ // string and the value string.
+ name = name.trim()
+ value = value.trim()
+
+ // 5. If the sum of the lengths of the name string and the value string
+ // is more than 4096 octets, abort these steps and ignore the set-
+ // cookie-string entirely.
+ if (name.length + value.length > maxNameValuePairSize) {
+ return null
+ }
+
+ // 6. The cookie-name is the name string, and the cookie-value is the
+ // value string.
+ return {
+ name, value, ...parseUnparsedAttributes(unparsedAttributes)
+ }
+}
+
+/**
+ * Parses the remaining attributes of a set-cookie header
+ * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4
+ * @param {string} unparsedAttributes
+ * @param {[Object.<string, unknown>]={}} cookieAttributeList
+ */
+function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) {
+ // 1. If the unparsed-attributes string is empty, skip the rest of
+ // these steps.
+ if (unparsedAttributes.length === 0) {
+ return cookieAttributeList
+ }
+
+ // 2. Discard the first character of the unparsed-attributes (which
+ // will be a %x3B (";") character).
+ assert(unparsedAttributes[0] === ';')
+ unparsedAttributes = unparsedAttributes.slice(1)
+
+ let cookieAv = ''
+
+ // 3. If the remaining unparsed-attributes contains a %x3B (";")
+ // character:
+ if (unparsedAttributes.includes(';')) {
+ // 1. Consume the characters of the unparsed-attributes up to, but
+ // not including, the first %x3B (";") character.
+ cookieAv = collectASequenceOfCodePointsFast(
+ ';',
+ unparsedAttributes,
+ { position: 0 }
+ )
+ unparsedAttributes = unparsedAttributes.slice(cookieAv.length)
+ } else {
+ // Otherwise:
+
+ // 1. Consume the remainder of the unparsed-attributes.
+ cookieAv = unparsedAttributes
+ unparsedAttributes = ''
+ }
+
+ // Let the cookie-av string be the characters consumed in this step.
+
+ let attributeName = ''
+ let attributeValue = ''
+
+ // 4. If the cookie-av string contains a %x3D ("=") character:
+ if (cookieAv.includes('=')) {
+ // 1. The (possibly empty) attribute-name string consists of the
+ // characters up to, but not including, the first %x3D ("=")
+ // character, and the (possibly empty) attribute-value string
+ // consists of the characters after the first %x3D ("=")
+ // character.
+ const position = { position: 0 }
+
+ attributeName = collectASequenceOfCodePointsFast(
+ '=',
+ cookieAv,
+ position
+ )
+ attributeValue = cookieAv.slice(position.position + 1)
+ } else {
+ // Otherwise:
+
+ // 1. The attribute-name string consists of the entire cookie-av
+ // string, and the attribute-value string is empty.
+ attributeName = cookieAv
+ }
+
+ // 5. Remove any leading or trailing WSP characters from the attribute-
+ // name string and the attribute-value string.
+ attributeName = attributeName.trim()
+ attributeValue = attributeValue.trim()
+
+ // 6. If the attribute-value is longer than 1024 octets, ignore the
+ // cookie-av string and return to Step 1 of this algorithm.
+ if (attributeValue.length > maxAttributeValueSize) {
+ return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)
+ }
+
+ // 7. Process the attribute-name and attribute-value according to the
+ // requirements in the following subsections. (Notice that
+ // attributes with unrecognized attribute-names are ignored.)
+ const attributeNameLowercase = attributeName.toLowerCase()
+
+ // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1
+ // If the attribute-name case-insensitively matches the string
+ // "Expires", the user agent MUST process the cookie-av as follows.
+ if (attributeNameLowercase === 'expires') {
+ // 1. Let the expiry-time be the result of parsing the attribute-value
+ // as cookie-date (see Section 5.1.1).
+ const expiryTime = new Date(attributeValue)
+
+ // 2. If the attribute-value failed to parse as a cookie date, ignore
+ // the cookie-av.
+
+ cookieAttributeList.expires = expiryTime
+ } else if (attributeNameLowercase === 'max-age') {
+ // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2
+ // If the attribute-name case-insensitively matches the string "Max-
+ // Age", the user agent MUST process the cookie-av as follows.
+
+ // 1. If the first character of the attribute-value is not a DIGIT or a
+ // "-" character, ignore the cookie-av.
+ const charCode = attributeValue.charCodeAt(0)
+
+ if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') {
+ return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)
+ }
+
+ // 2. If the remainder of attribute-value contains a non-DIGIT
+ // character, ignore the cookie-av.
+ if (!/^\d+$/.test(attributeValue)) {
+ return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)
+ }
+
+ // 3. Let delta-seconds be the attribute-value converted to an integer.
+ const deltaSeconds = Number(attributeValue)
+
+ // 4. Let cookie-age-limit be the maximum age of the cookie (which
+ // SHOULD be 400 days or less, see Section 4.1.2.2).
+
+ // 5. Set delta-seconds to the smaller of its present value and cookie-
+ // age-limit.
+ // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs)
+
+ // 6. If delta-seconds is less than or equal to zero (0), let expiry-
+ // time be the earliest representable date and time. Otherwise, let
+ // the expiry-time be the current date and time plus delta-seconds
+ // seconds.
+ // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds
+
+ // 7. Append an attribute to the cookie-attribute-list with an
+ // attribute-name of Max-Age and an attribute-value of expiry-time.
+ cookieAttributeList.maxAge = deltaSeconds
+ } else if (attributeNameLowercase === 'domain') {
+ // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3
+ // If the attribute-name case-insensitively matches the string "Domain",
+ // the user agent MUST process the cookie-av as follows.
+
+ // 1. Let cookie-domain be the attribute-value.
+ let cookieDomain = attributeValue
+
+ // 2. If cookie-domain starts with %x2E ("."), let cookie-domain be
+ // cookie-domain without its leading %x2E (".").
+ if (cookieDomain[0] === '.') {
+ cookieDomain = cookieDomain.slice(1)
+ }
+
+ // 3. Convert the cookie-domain to lower case.
+ cookieDomain = cookieDomain.toLowerCase()
+
+ // 4. Append an attribute to the cookie-attribute-list with an
+ // attribute-name of Domain and an attribute-value of cookie-domain.
+ cookieAttributeList.domain = cookieDomain
+ } else if (attributeNameLowercase === 'path') {
+ // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4
+ // If the attribute-name case-insensitively matches the string "Path",
+ // the user agent MUST process the cookie-av as follows.
+
+ // 1. If the attribute-value is empty or if the first character of the
+ // attribute-value is not %x2F ("/"):
+ let cookiePath = ''
+ if (attributeValue.length === 0 || attributeValue[0] !== '/') {
+ // 1. Let cookie-path be the default-path.
+ cookiePath = '/'
+ } else {
+ // Otherwise:
+
+ // 1. Let cookie-path be the attribute-value.
+ cookiePath = attributeValue
+ }
+
+ // 2. Append an attribute to the cookie-attribute-list with an
+ // attribute-name of Path and an attribute-value of cookie-path.
+ cookieAttributeList.path = cookiePath
+ } else if (attributeNameLowercase === 'secure') {
+ // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5
+ // If the attribute-name case-insensitively matches the string "Secure",
+ // the user agent MUST append an attribute to the cookie-attribute-list
+ // with an attribute-name of Secure and an empty attribute-value.
+
+ cookieAttributeList.secure = true
+ } else if (attributeNameLowercase === 'httponly') {
+ // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6
+ // If the attribute-name case-insensitively matches the string
+ // "HttpOnly", the user agent MUST append an attribute to the cookie-
+ // attribute-list with an attribute-name of HttpOnly and an empty
+ // attribute-value.
+
+ cookieAttributeList.httpOnly = true
+ } else if (attributeNameLowercase === 'samesite') {
+ // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7
+ // If the attribute-name case-insensitively matches the string
+ // "SameSite", the user agent MUST process the cookie-av as follows:
+
+ // 1. Let enforcement be "Default".
+ let enforcement = 'Default'
+
+ const attributeValueLowercase = attributeValue.toLowerCase()
+ // 2. If cookie-av's attribute-value is a case-insensitive match for
+ // "None", set enforcement to "None".
+ if (attributeValueLowercase.includes('none')) {
+ enforcement = 'None'
+ }
+
+ // 3. If cookie-av's attribute-value is a case-insensitive match for
+ // "Strict", set enforcement to "Strict".
+ if (attributeValueLowercase.includes('strict')) {
+ enforcement = 'Strict'
+ }
+
+ // 4. If cookie-av's attribute-value is a case-insensitive match for
+ // "Lax", set enforcement to "Lax".
+ if (attributeValueLowercase.includes('lax')) {
+ enforcement = 'Lax'
+ }
+
+ // 5. Append an attribute to the cookie-attribute-list with an
+ // attribute-name of "SameSite" and an attribute-value of
+ // enforcement.
+ cookieAttributeList.sameSite = enforcement
+ } else {
+ cookieAttributeList.unparsed ??= []
+
+ cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`)
+ }
+
+ // 8. Return to Step 1 of this algorithm.
+ return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)
+}
+
+module.exports = {
+ parseSetCookie,
+ parseUnparsedAttributes
+}
diff --git a/node_modules/undici/lib/cookies/util.js b/node_modules/undici/lib/cookies/util.js
new file mode 100644
index 0000000..2290329
--- /dev/null
+++ b/node_modules/undici/lib/cookies/util.js
@@ -0,0 +1,291 @@
+'use strict'
+
+const assert = require('assert')
+const { kHeadersList } = require('../core/symbols')
+
+function isCTLExcludingHtab (value) {
+ if (value.length === 0) {
+ return false
+ }
+
+ for (const char of value) {
+ const code = char.charCodeAt(0)
+
+ if (
+ (code >= 0x00 || code <= 0x08) ||
+ (code >= 0x0A || code <= 0x1F) ||
+ code === 0x7F
+ ) {
+ return false
+ }
+ }
+}
+
+/**
+ CHAR = <any US-ASCII character (octets 0 - 127)>
+ token = 1*<any CHAR except CTLs or separators>
+ separators = "(" | ")" | "<" | ">" | "@"
+ | "," | ";" | ":" | "\" | <">
+ | "/" | "[" | "]" | "?" | "="
+ | "{" | "}" | SP | HT
+ * @param {string} name
+ */
+function validateCookieName (name) {
+ for (const char of name) {
+ const code = char.charCodeAt(0)
+
+ if (
+ (code <= 0x20 || code > 0x7F) ||
+ char === '(' ||
+ char === ')' ||
+ char === '>' ||
+ char === '<' ||
+ char === '@' ||
+ char === ',' ||
+ char === ';' ||
+ char === ':' ||
+ char === '\\' ||
+ char === '"' ||
+ char === '/' ||
+ char === '[' ||
+ char === ']' ||
+ char === '?' ||
+ char === '=' ||
+ char === '{' ||
+ char === '}'
+ ) {
+ throw new Error('Invalid cookie name')
+ }
+ }
+}
+
+/**
+ cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
+ cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
+ ; US-ASCII characters excluding CTLs,
+ ; whitespace DQUOTE, comma, semicolon,
+ ; and backslash
+ * @param {string} value
+ */
+function validateCookieValue (value) {
+ for (const char of value) {
+ const code = char.charCodeAt(0)
+
+ if (
+ code < 0x21 || // exclude CTLs (0-31)
+ code === 0x22 ||
+ code === 0x2C ||
+ code === 0x3B ||
+ code === 0x5C ||
+ code > 0x7E // non-ascii
+ ) {
+ throw new Error('Invalid header value')
+ }
+ }
+}
+
+/**
+ * path-value = <any CHAR except CTLs or ";">
+ * @param {string} path
+ */
+function validateCookiePath (path) {
+ for (const char of path) {
+ const code = char.charCodeAt(0)
+
+ if (code < 0x21 || char === ';') {
+ throw new Error('Invalid cookie path')
+ }
+ }
+}
+
+/**
+ * I have no idea why these values aren't allowed to be honest,
+ * but Deno tests these. - Khafra
+ * @param {string} domain
+ */
+function validateCookieDomain (domain) {
+ if (
+ domain.startsWith('-') ||
+ domain.endsWith('.') ||
+ domain.endsWith('-')
+ ) {
+ throw new Error('Invalid cookie domain')
+ }
+}
+
+/**
+ * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1
+ * @param {number|Date} date
+ IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT
+ ; fixed length/zone/capitalization subset of the format
+ ; see Section 3.3 of [RFC5322]
+
+ day-name = %x4D.6F.6E ; "Mon", case-sensitive
+ / %x54.75.65 ; "Tue", case-sensitive
+ / %x57.65.64 ; "Wed", case-sensitive
+ / %x54.68.75 ; "Thu", case-sensitive
+ / %x46.72.69 ; "Fri", case-sensitive
+ / %x53.61.74 ; "Sat", case-sensitive
+ / %x53.75.6E ; "Sun", case-sensitive
+ date1 = day SP month SP year
+ ; e.g., 02 Jun 1982
+
+ day = 2DIGIT
+ month = %x4A.61.6E ; "Jan", case-sensitive
+ / %x46.65.62 ; "Feb", case-sensitive
+ / %x4D.61.72 ; "Mar", case-sensitive
+ / %x41.70.72 ; "Apr", case-sensitive
+ / %x4D.61.79 ; "May", case-sensitive
+ / %x4A.75.6E ; "Jun", case-sensitive
+ / %x4A.75.6C ; "Jul", case-sensitive
+ / %x41.75.67 ; "Aug", case-sensitive
+ / %x53.65.70 ; "Sep", case-sensitive
+ / %x4F.63.74 ; "Oct", case-sensitive
+ / %x4E.6F.76 ; "Nov", case-sensitive
+ / %x44.65.63 ; "Dec", case-sensitive
+ year = 4DIGIT
+
+ GMT = %x47.4D.54 ; "GMT", case-sensitive
+
+ time-of-day = hour ":" minute ":" second
+ ; 00:00:00 - 23:59:60 (leap second)
+
+ hour = 2DIGIT
+ minute = 2DIGIT
+ second = 2DIGIT
+ */
+function toIMFDate (date) {
+ if (typeof date === 'number') {
+ date = new Date(date)
+ }
+
+ const days = [
+ 'Sun', 'Mon', 'Tue', 'Wed',
+ 'Thu', 'Fri', 'Sat'
+ ]
+
+ const months = [
+ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
+ ]
+
+ const dayName = days[date.getUTCDay()]
+ const day = date.getUTCDate().toString().padStart(2, '0')
+ const month = months[date.getUTCMonth()]
+ const year = date.getUTCFullYear()
+ const hour = date.getUTCHours().toString().padStart(2, '0')
+ const minute = date.getUTCMinutes().toString().padStart(2, '0')
+ const second = date.getUTCSeconds().toString().padStart(2, '0')
+
+ return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT`
+}
+
+/**
+ max-age-av = "Max-Age=" non-zero-digit *DIGIT
+ ; In practice, both expires-av and max-age-av
+ ; are limited to dates representable by the
+ ; user agent.
+ * @param {number} maxAge
+ */
+function validateCookieMaxAge (maxAge) {
+ if (maxAge < 0) {
+ throw new Error('Invalid cookie max-age')
+ }
+}
+
+/**
+ * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1
+ * @param {import('./index').Cookie} cookie
+ */
+function stringify (cookie) {
+ if (cookie.name.length === 0) {
+ return null
+ }
+
+ validateCookieName(cookie.name)
+ validateCookieValue(cookie.value)
+
+ const out = [`${cookie.name}=${cookie.value}`]
+
+ // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1
+ // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2
+ if (cookie.name.startsWith('__Secure-')) {
+ cookie.secure = true
+ }
+
+ if (cookie.name.startsWith('__Host-')) {
+ cookie.secure = true
+ cookie.domain = null
+ cookie.path = '/'
+ }
+
+ if (cookie.secure) {
+ out.push('Secure')
+ }
+
+ if (cookie.httpOnly) {
+ out.push('HttpOnly')
+ }
+
+ if (typeof cookie.maxAge === 'number') {
+ validateCookieMaxAge(cookie.maxAge)
+ out.push(`Max-Age=${cookie.maxAge}`)
+ }
+
+ if (cookie.domain) {
+ validateCookieDomain(cookie.domain)
+ out.push(`Domain=${cookie.domain}`)
+ }
+
+ if (cookie.path) {
+ validateCookiePath(cookie.path)
+ out.push(`Path=${cookie.path}`)
+ }
+
+ if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') {
+ out.push(`Expires=${toIMFDate(cookie.expires)}`)
+ }
+
+ if (cookie.sameSite) {
+ out.push(`SameSite=${cookie.sameSite}`)
+ }
+
+ for (const part of cookie.unparsed) {
+ if (!part.includes('=')) {
+ throw new Error('Invalid unparsed')
+ }
+
+ const [key, ...value] = part.split('=')
+
+ out.push(`${key.trim()}=${value.join('=')}`)
+ }
+
+ return out.join('; ')
+}
+
+let kHeadersListNode
+
+function getHeadersList (headers) {
+ if (headers[kHeadersList]) {
+ return headers[kHeadersList]
+ }
+
+ if (!kHeadersListNode) {
+ kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
+ (symbol) => symbol.description === 'headers list'
+ )
+
+ assert(kHeadersListNode, 'Headers cannot be parsed')
+ }
+
+ const headersList = headers[kHeadersListNode]
+ assert(headersList)
+
+ return headersList
+}
+
+module.exports = {
+ isCTLExcludingHtab,
+ stringify,
+ getHeadersList
+}
diff --git a/node_modules/undici/lib/core/connect.js b/node_modules/undici/lib/core/connect.js
new file mode 100644
index 0000000..f3b5cc3
--- /dev/null
+++ b/node_modules/undici/lib/core/connect.js
@@ -0,0 +1,185 @@
+'use strict'
+
+const net = require('net')
+const assert = require('assert')
+const util = require('./util')
+const { InvalidArgumentError, ConnectTimeoutError } = require('./errors')
+
+let tls // include tls conditionally since it is not always available
+
+// TODO: session re-use does not wait for the first
+// connection to resolve the session and might therefore
+// resolve the same servername multiple times even when
+// re-use is enabled.
+
+let SessionCache
+if (global.FinalizationRegistry) {
+ SessionCache = class WeakSessionCache {
+ constructor (maxCachedSessions) {
+ this._maxCachedSessions = maxCachedSessions
+ this._sessionCache = new Map()
+ this._sessionRegistry = new global.FinalizationRegistry((key) => {
+ if (this._sessionCache.size < this._maxCachedSessions) {
+ return
+ }
+
+ const ref = this._sessionCache.get(key)
+ if (ref !== undefined && ref.deref() === undefined) {
+ this._sessionCache.delete(key)
+ }
+ })
+ }
+
+ get (sessionKey) {
+ const ref = this._sessionCache.get(sessionKey)
+ return ref ? ref.deref() : null
+ }
+
+ set (sessionKey, session) {
+ if (this._maxCachedSessions === 0) {
+ return
+ }
+
+ this._sessionCache.set(sessionKey, new WeakRef(session))
+ this._sessionRegistry.register(session, sessionKey)
+ }
+ }
+} else {
+ SessionCache = class SimpleSessionCache {
+ constructor (maxCachedSessions) {
+ this._maxCachedSessions = maxCachedSessions
+ this._sessionCache = new Map()
+ }
+
+ get (sessionKey) {
+ return this._sessionCache.get(sessionKey)
+ }
+
+ set (sessionKey, session) {
+ if (this._maxCachedSessions === 0) {
+ return
+ }
+
+ if (this._sessionCache.size >= this._maxCachedSessions) {
+ // remove the oldest session
+ const { value: oldestKey } = this._sessionCache.keys().next()
+ this._sessionCache.delete(oldestKey)
+ }
+
+ this._sessionCache.set(sessionKey, session)
+ }
+ }
+}
+
+function buildConnector ({ maxCachedSessions, socketPath, timeout, ...opts }) {
+ if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) {
+ throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero')
+ }
+
+ const options = { path: socketPath, ...opts }
+ const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions)
+ timeout = timeout == null ? 10e3 : timeout
+
+ return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) {
+ let socket
+ if (protocol === 'https:') {
+ if (!tls) {
+ tls = require('tls')
+ }
+ servername = servername || options.servername || util.getServerName(host) || null
+
+ const sessionKey = servername || hostname
+ const session = sessionCache.get(sessionKey) || null
+
+ assert(sessionKey)
+
+ socket = tls.connect({
+ highWaterMark: 16384, // TLS in node can't have bigger HWM anyway...
+ ...options,
+ servername,
+ session,
+ localAddress,
+ socket: httpSocket, // upgrade socket connection
+ port: port || 443,
+ host: hostname
+ })
+
+ socket
+ .on('session', function (session) {
+ // TODO (fix): Can a session become invalid once established? Don't think so?
+ sessionCache.set(sessionKey, session)
+ })
+ } else {
+ assert(!httpSocket, 'httpSocket can only be sent on TLS update')
+ socket = net.connect({
+ highWaterMark: 64 * 1024, // Same as nodejs fs streams.
+ ...options,
+ localAddress,
+ port: port || 80,
+ host: hostname
+ })
+ }
+
+ // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket
+ if (options.keepAlive == null || options.keepAlive) {
+ const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay
+ socket.setKeepAlive(true, keepAliveInitialDelay)
+ }
+
+ const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout)
+
+ socket
+ .setNoDelay(true)
+ .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () {
+ cancelTimeout()
+
+ if (callback) {
+ const cb = callback
+ callback = null
+ cb(null, this)
+ }
+ })
+ .on('error', function (err) {
+ cancelTimeout()
+
+ if (callback) {
+ const cb = callback
+ callback = null
+ cb(err)
+ }
+ })
+
+ return socket
+ }
+}
+
+function setupTimeout (onConnectTimeout, timeout) {
+ if (!timeout) {
+ return () => {}
+ }
+
+ let s1 = null
+ let s2 = null
+ const timeoutId = setTimeout(() => {
+ // setImmediate is added to make sure that we priotorise socket error events over timeouts
+ s1 = setImmediate(() => {
+ if (process.platform === 'win32') {
+ // Windows needs an extra setImmediate probably due to implementation differences in the socket logic
+ s2 = setImmediate(() => onConnectTimeout())
+ } else {
+ onConnectTimeout()
+ }
+ })
+ }, timeout)
+ return () => {
+ clearTimeout(timeoutId)
+ clearImmediate(s1)
+ clearImmediate(s2)
+ }
+}
+
+function onConnectTimeout (socket) {
+ util.destroy(socket, new ConnectTimeoutError())
+}
+
+module.exports = buildConnector
diff --git a/node_modules/undici/lib/core/errors.js b/node_modules/undici/lib/core/errors.js
new file mode 100644
index 0000000..653782d
--- /dev/null
+++ b/node_modules/undici/lib/core/errors.js
@@ -0,0 +1,216 @@
+'use strict'
+
+class UndiciError extends Error {
+ constructor (message) {
+ super(message)
+ this.name = 'UndiciError'
+ this.code = 'UND_ERR'
+ }
+}
+
+class ConnectTimeoutError extends UndiciError {
+ constructor (message) {
+ super(message)
+ Error.captureStackTrace(this, ConnectTimeoutError)
+ this.name = 'ConnectTimeoutError'
+ this.message = message || 'Connect Timeout Error'
+ this.code = 'UND_ERR_CONNECT_TIMEOUT'
+ }
+}
+
+class HeadersTimeoutError extends UndiciError {
+ constructor (message) {
+ super(message)
+ Error.captureStackTrace(this, HeadersTimeoutError)
+ this.name = 'HeadersTimeoutError'
+ this.message = message || 'Headers Timeout Error'
+ this.code = 'UND_ERR_HEADERS_TIMEOUT'
+ }
+}
+
+class HeadersOverflowError extends UndiciError {
+ constructor (message) {
+ super(message)
+ Error.captureStackTrace(this, HeadersOverflowError)
+ this.name = 'HeadersOverflowError'
+ this.message = message || 'Headers Overflow Error'
+ this.code = 'UND_ERR_HEADERS_OVERFLOW'
+ }
+}
+
+class BodyTimeoutError extends UndiciError {
+ constructor (message) {
+ super(message)
+ Error.captureStackTrace(this, BodyTimeoutError)
+ this.name = 'BodyTimeoutError'
+ this.message = message || 'Body Timeout Error'
+ this.code = 'UND_ERR_BODY_TIMEOUT'
+ }
+}
+
+class ResponseStatusCodeError extends UndiciError {
+ constructor (message, statusCode, headers, body) {
+ super(message)
+ Error.captureStackTrace(this, ResponseStatusCodeError)
+ this.name = 'ResponseStatusCodeError'
+ this.message = message || 'Response Status Code Error'
+ this.code = 'UND_ERR_RESPONSE_STATUS_CODE'
+ this.body = body
+ this.status = statusCode
+ this.statusCode = statusCode
+ this.headers = headers
+ }
+}
+
+class InvalidArgumentError extends UndiciError {
+ constructor (message) {
+ super(message)
+ Error.captureStackTrace(this, InvalidArgumentError)
+ this.name = 'InvalidArgumentError'
+ this.message = message || 'Invalid Argument Error'
+ this.code = 'UND_ERR_INVALID_ARG'
+ }
+}
+
+class InvalidReturnValueError extends UndiciError {
+ constructor (message) {
+ super(message)
+ Error.captureStackTrace(this, InvalidReturnValueError)
+ this.name = 'InvalidReturnValueError'
+ this.message = message || 'Invalid Return Value Error'
+ this.code = 'UND_ERR_INVALID_RETURN_VALUE'
+ }
+}
+
+class RequestAbortedError extends UndiciError {
+ constructor (message) {
+ super(message)
+ Error.captureStackTrace(this, RequestAbortedError)
+ this.name = 'AbortError'
+ this.message = message || 'Request aborted'
+ this.code = 'UND_ERR_ABORTED'
+ }
+}
+
+class InformationalError extends UndiciError {
+ constructor (message) {
+ super(message)
+ Error.captureStackTrace(this, InformationalError)
+ this.name = 'InformationalError'
+ this.message = message || 'Request information'
+ this.code = 'UND_ERR_INFO'
+ }
+}
+
+class RequestContentLengthMismatchError extends UndiciError {
+ constructor (message) {
+ super(message)
+ Error.captureStackTrace(this, RequestContentLengthMismatchError)
+ this.name = 'RequestContentLengthMismatchError'
+ this.message = message || 'Request body length does not match content-length header'
+ this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'
+ }
+}
+
+class ResponseContentLengthMismatchError extends UndiciError {
+ constructor (message) {
+ super(message)
+ Error.captureStackTrace(this, ResponseContentLengthMismatchError)
+ this.name = 'ResponseContentLengthMismatchError'
+ this.message = message || 'Response body length does not match content-length header'
+ this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'
+ }
+}
+
+class ClientDestroyedError extends UndiciError {
+ constructor (message) {
+ super(message)
+ Error.captureStackTrace(this, ClientDestroyedError)
+ this.name = 'ClientDestroyedError'
+ this.message = message || 'The client is destroyed'
+ this.code = 'UND_ERR_DESTROYED'
+ }
+}
+
+class ClientClosedError extends UndiciError {
+ constructor (message) {
+ super(message)
+ Error.captureStackTrace(this, ClientClosedError)
+ this.name = 'ClientClosedError'
+ this.message = message || 'The client is closed'
+ this.code = 'UND_ERR_CLOSED'
+ }
+}
+
+class SocketError extends UndiciError {
+ constructor (message, socket) {
+ super(message)
+ Error.captureStackTrace(this, SocketError)
+ this.name = 'SocketError'
+ this.message = message || 'Socket error'
+ this.code = 'UND_ERR_SOCKET'
+ this.socket = socket
+ }
+}
+
+class NotSupportedError extends UndiciError {
+ constructor (message) {
+ super(message)
+ Error.captureStackTrace(this, NotSupportedError)
+ this.name = 'NotSupportedError'
+ this.message = message || 'Not supported error'
+ this.code = 'UND_ERR_NOT_SUPPORTED'
+ }
+}
+
+class BalancedPoolMissingUpstreamError extends UndiciError {
+ constructor (message) {
+ super(message)
+ Error.captureStackTrace(this, NotSupportedError)
+ this.name = 'MissingUpstreamError'
+ this.message = message || 'No upstream has been added to the BalancedPool'
+ this.code = 'UND_ERR_BPL_MISSING_UPSTREAM'
+ }
+}
+
+class HTTPParserError extends Error {
+ constructor (message, code, data) {
+ super(message)
+ Error.captureStackTrace(this, HTTPParserError)
+ this.name = 'HTTPParserError'
+ this.code = code ? `HPE_${code}` : undefined
+ this.data = data ? data.toString() : undefined
+ }
+}
+
+class ResponseExceededMaxSizeError extends UndiciError {
+ constructor (message) {
+ super(message)
+ Error.captureStackTrace(this, ResponseExceededMaxSizeError)
+ this.name = 'ResponseExceededMaxSizeError'
+ this.message = message || 'Response content exceeded max size'
+ this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE'
+ }
+}
+
+module.exports = {
+ HTTPParserError,
+ UndiciError,
+ HeadersTimeoutError,
+ HeadersOverflowError,
+ BodyTimeoutError,
+ RequestContentLengthMismatchError,
+ ConnectTimeoutError,
+ ResponseStatusCodeError,
+ InvalidArgumentError,
+ InvalidReturnValueError,
+ RequestAbortedError,
+ ClientDestroyedError,
+ ClientClosedError,
+ InformationalError,
+ SocketError,
+ NotSupportedError,
+ ResponseContentLengthMismatchError,
+ BalancedPoolMissingUpstreamError,
+ ResponseExceededMaxSizeError
+}
diff --git a/node_modules/undici/lib/core/request.js b/node_modules/undici/lib/core/request.js
new file mode 100644
index 0000000..6c9a24d
--- /dev/null
+++ b/node_modules/undici/lib/core/request.js
@@ -0,0 +1,368 @@
+'use strict'
+
+const {
+ InvalidArgumentError,
+ NotSupportedError
+} = require('./errors')
+const assert = require('assert')
+const util = require('./util')
+
+// tokenRegExp and headerCharRegex have been lifted from
+// https://github.com/nodejs/node/blob/main/lib/_http_common.js
+
+/**
+ * Verifies that the given val is a valid HTTP token
+ * per the rules defined in RFC 7230
+ * See https://tools.ietf.org/html/rfc7230#section-3.2.6
+ */
+const tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/
+
+/**
+ * Matches if val contains an invalid field-vchar
+ * field-value = *( field-content / obs-fold )
+ * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
+ * field-vchar = VCHAR / obs-text
+ */
+const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/
+
+// Verifies that a given path is valid does not contain control chars \x00 to \x20
+const invalidPathRegex = /[^\u0021-\u00ff]/
+
+const kHandler = Symbol('handler')
+
+const channels = {}
+
+let extractBody
+
+try {
+ const diagnosticsChannel = require('diagnostics_channel')
+ channels.create = diagnosticsChannel.channel('undici:request:create')
+ channels.bodySent = diagnosticsChannel.channel('undici:request:bodySent')
+ channels.headers = diagnosticsChannel.channel('undici:request:headers')
+ channels.trailers = diagnosticsChannel.channel('undici:request:trailers')
+ channels.error = diagnosticsChannel.channel('undici:request:error')
+} catch {
+ channels.create = { hasSubscribers: false }
+ channels.bodySent = { hasSubscribers: false }
+ channels.headers = { hasSubscribers: false }
+ channels.trailers = { hasSubscribers: false }
+ channels.error = { hasSubscribers: false }
+}
+
+class Request {
+ constructor (origin, {
+ path,
+ method,
+ body,
+ headers,
+ query,
+ idempotent,
+ blocking,
+ upgrade,
+ headersTimeout,
+ bodyTimeout,
+ reset,
+ throwOnError
+ }, handler) {
+ if (typeof path !== 'string') {
+ throw new InvalidArgumentError('path must be a string')
+ } else if (
+ path[0] !== '/' &&
+ !(path.startsWith('http://') || path.startsWith('https://')) &&
+ method !== 'CONNECT'
+ ) {
+ throw new InvalidArgumentError('path must be an absolute URL or start with a slash')
+ } else if (invalidPathRegex.exec(path) !== null) {
+ throw new InvalidArgumentError('invalid request path')
+ }
+
+ if (typeof method !== 'string') {
+ throw new InvalidArgumentError('method must be a string')
+ } else if (tokenRegExp.exec(method) === null) {
+ throw new InvalidArgumentError('invalid request method')
+ }
+
+ if (upgrade && typeof upgrade !== 'string') {
+ throw new InvalidArgumentError('upgrade must be a string')
+ }
+
+ if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) {
+ throw new InvalidArgumentError('invalid headersTimeout')
+ }
+
+ if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) {
+ throw new InvalidArgumentError('invalid bodyTimeout')
+ }
+
+ if (reset != null && typeof reset !== 'boolean') {
+ throw new InvalidArgumentError('invalid reset')
+ }
+
+ this.headersTimeout = headersTimeout
+
+ this.bodyTimeout = bodyTimeout
+
+ this.throwOnError = throwOnError === true
+
+ this.method = method
+
+ if (body == null) {
+ this.body = null
+ } else if (util.isStream(body)) {
+ this.body = body
+ } else if (util.isBuffer(body)) {
+ this.body = body.byteLength ? body : null
+ } else if (ArrayBuffer.isView(body)) {
+ this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null
+ } else if (body instanceof ArrayBuffer) {
+ this.body = body.byteLength ? Buffer.from(body) : null
+ } else if (typeof body === 'string') {
+ this.body = body.length ? Buffer.from(body) : null
+ } else if (util.isFormDataLike(body) || util.isIterable(body) || util.isBlobLike(body)) {
+ this.body = body
+ } else {
+ throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable')
+ }
+
+ this.completed = false
+
+ this.aborted = false
+
+ this.upgrade = upgrade || null
+
+ this.path = query ? util.buildURL(path, query) : path
+
+ this.origin = origin
+
+ this.idempotent = idempotent == null
+ ? method === 'HEAD' || method === 'GET'
+ : idempotent
+
+ this.blocking = blocking == null ? false : blocking
+
+ this.reset = reset == null ? null : reset
+
+ this.host = null
+
+ this.contentLength = null
+
+ this.contentType = null
+
+ this.headers = ''
+
+ if (Array.isArray(headers)) {
+ if (headers.length % 2 !== 0) {
+ throw new InvalidArgumentError('headers array must be even')
+ }
+ for (let i = 0; i < headers.length; i += 2) {
+ processHeader(this, headers[i], headers[i + 1])
+ }
+ } else if (headers && typeof headers === 'object') {
+ const keys = Object.keys(headers)
+ for (let i = 0; i < keys.length; i++) {
+ const key = keys[i]
+ processHeader(this, key, headers[key])
+ }
+ } else if (headers != null) {
+ throw new InvalidArgumentError('headers must be an object or an array')
+ }
+
+ if (util.isFormDataLike(this.body)) {
+ if (util.nodeMajor < 16 || (util.nodeMajor === 16 && util.nodeMinor < 8)) {
+ throw new InvalidArgumentError('Form-Data bodies are only supported in node v16.8 and newer.')
+ }
+
+ if (!extractBody) {
+ extractBody = require('../fetch/body.js').extractBody
+ }
+
+ const [bodyStream, contentType] = extractBody(body)
+ if (this.contentType == null) {
+ this.contentType = contentType
+ this.headers += `content-type: ${contentType}\r\n`
+ }
+ this.body = bodyStream.stream
+ this.contentLength = bodyStream.length
+ } else if (util.isBlobLike(body) && this.contentType == null && body.type) {
+ this.contentType = body.type
+ this.headers += `content-type: ${body.type}\r\n`
+ }
+
+ util.validateHandler(handler, method, upgrade)
+
+ this.servername = util.getServerName(this.host)
+
+ this[kHandler] = handler
+
+ if (channels.create.hasSubscribers) {
+ channels.create.publish({ request: this })
+ }
+ }
+
+ onBodySent (chunk) {
+ if (this[kHandler].onBodySent) {
+ try {
+ this[kHandler].onBodySent(chunk)
+ } catch (err) {
+ this.onError(err)
+ }
+ }
+ }
+
+ onRequestSent () {
+ if (channels.bodySent.hasSubscribers) {
+ channels.bodySent.publish({ request: this })
+ }
+ }
+
+ onConnect (abort) {
+ assert(!this.aborted)
+ assert(!this.completed)
+
+ return this[kHandler].onConnect(abort)
+ }
+
+ onHeaders (statusCode, headers, resume, statusText) {
+ assert(!this.aborted)
+ assert(!this.completed)
+
+ if (channels.headers.hasSubscribers) {
+ channels.headers.publish({ request: this, response: { statusCode, headers, statusText } })
+ }
+
+ return this[kHandler].onHeaders(statusCode, headers, resume, statusText)
+ }
+
+ onData (chunk) {
+ assert(!this.aborted)
+ assert(!this.completed)
+
+ return this[kHandler].onData(chunk)
+ }
+
+ onUpgrade (statusCode, headers, socket) {
+ assert(!this.aborted)
+ assert(!this.completed)
+
+ return this[kHandler].onUpgrade(statusCode, headers, socket)
+ }
+
+ onComplete (trailers) {
+ assert(!this.aborted)
+
+ this.completed = true
+ if (channels.trailers.hasSubscribers) {
+ channels.trailers.publish({ request: this, trailers })
+ }
+ return this[kHandler].onComplete(trailers)
+ }
+
+ onError (error) {
+ if (channels.error.hasSubscribers) {
+ channels.error.publish({ request: this, error })
+ }
+
+ if (this.aborted) {
+ return
+ }
+ this.aborted = true
+ return this[kHandler].onError(error)
+ }
+
+ addHeader (key, value) {
+ processHeader(this, key, value)
+ return this
+ }
+}
+
+function processHeaderValue (key, val) {
+ if (val && typeof val === 'object') {
+ throw new InvalidArgumentError(`invalid ${key} header`)
+ }
+
+ val = val != null ? `${val}` : ''
+
+ if (headerCharRegex.exec(val) !== null) {
+ throw new InvalidArgumentError(`invalid ${key} header`)
+ }
+
+ return `${key}: ${val}\r\n`
+}
+
+function processHeader (request, key, val) {
+ if (val && (typeof val === 'object' && !Array.isArray(val))) {
+ throw new InvalidArgumentError(`invalid ${key} header`)
+ } else if (val === undefined) {
+ return
+ }
+
+ if (
+ request.host === null &&
+ key.length === 4 &&
+ key.toLowerCase() === 'host'
+ ) {
+ if (headerCharRegex.exec(val) !== null) {
+ throw new InvalidArgumentError(`invalid ${key} header`)
+ }
+ // Consumed by Client
+ request.host = val
+ } else if (
+ request.contentLength === null &&
+ key.length === 14 &&
+ key.toLowerCase() === 'content-length'
+ ) {
+ request.contentLength = parseInt(val, 10)
+ if (!Number.isFinite(request.contentLength)) {
+ throw new InvalidArgumentError('invalid content-length header')
+ }
+ } else if (
+ request.contentType === null &&
+ key.length === 12 &&
+ key.toLowerCase() === 'content-type'
+ ) {
+ request.contentType = val
+ request.headers += processHeaderValue(key, val)
+ } else if (
+ key.length === 17 &&
+ key.toLowerCase() === 'transfer-encoding'
+ ) {
+ throw new InvalidArgumentError('invalid transfer-encoding header')
+ } else if (
+ key.length === 10 &&
+ key.toLowerCase() === 'connection'
+ ) {
+ const value = typeof val === 'string' ? val.toLowerCase() : null
+ if (value !== 'close' && value !== 'keep-alive') {
+ throw new InvalidArgumentError('invalid connection header')
+ } else if (value === 'close') {
+ request.reset = true
+ }
+ } else if (
+ key.length === 10 &&
+ key.toLowerCase() === 'keep-alive'
+ ) {
+ throw new InvalidArgumentError('invalid keep-alive header')
+ } else if (
+ key.length === 7 &&
+ key.toLowerCase() === 'upgrade'
+ ) {
+ throw new InvalidArgumentError('invalid upgrade header')
+ } else if (
+ key.length === 6 &&
+ key.toLowerCase() === 'expect'
+ ) {
+ throw new NotSupportedError('expect header not supported')
+ } else if (tokenRegExp.exec(key) === null) {
+ throw new InvalidArgumentError('invalid header key')
+ } else {
+ if (Array.isArray(val)) {
+ for (let i = 0; i < val.length; i++) {
+ request.headers += processHeaderValue(key, val[i])
+ }
+ } else {
+ request.headers += processHeaderValue(key, val)
+ }
+ }
+}
+
+module.exports = Request
diff --git a/node_modules/undici/lib/core/symbols.js b/node_modules/undici/lib/core/symbols.js
new file mode 100644
index 0000000..c852107
--- /dev/null
+++ b/node_modules/undici/lib/core/symbols.js
@@ -0,0 +1,55 @@
+module.exports = {
+ kClose: Symbol('close'),
+ kDestroy: Symbol('destroy'),
+ kDispatch: Symbol('dispatch'),
+ kUrl: Symbol('url'),
+ kWriting: Symbol('writing'),
+ kResuming: Symbol('resuming'),
+ kQueue: Symbol('queue'),
+ kConnect: Symbol('connect'),
+ kConnecting: Symbol('connecting'),
+ kHeadersList: Symbol('headers list'),
+ kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'),
+ kKeepAliveMaxTimeout: Symbol('max keep alive timeout'),
+ kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'),
+ kKeepAliveTimeoutValue: Symbol('keep alive timeout'),
+ kKeepAlive: Symbol('keep alive'),
+ kHeadersTimeout: Symbol('headers timeout'),
+ kBodyTimeout: Symbol('body timeout'),
+ kServerName: Symbol('server name'),
+ kLocalAddress: Symbol('local address'),
+ kHost: Symbol('host'),
+ kNoRef: Symbol('no ref'),
+ kBodyUsed: Symbol('used'),
+ kRunning: Symbol('running'),
+ kBlocking: Symbol('blocking'),
+ kPending: Symbol('pending'),
+ kSize: Symbol('size'),
+ kBusy: Symbol('busy'),
+ kQueued: Symbol('queued'),
+ kFree: Symbol('free'),
+ kConnected: Symbol('connected'),
+ kClosed: Symbol('closed'),
+ kNeedDrain: Symbol('need drain'),
+ kReset: Symbol('reset'),
+ kDestroyed: Symbol.for('nodejs.stream.destroyed'),
+ kMaxHeadersSize: Symbol('max headers size'),
+ kRunningIdx: Symbol('running index'),
+ kPendingIdx: Symbol('pending index'),
+ kError: Symbol('error'),
+ kClients: Symbol('clients'),
+ kClient: Symbol('client'),
+ kParser: Symbol('parser'),
+ kOnDestroyed: Symbol('destroy callbacks'),
+ kPipelining: Symbol('pipelining'),
+ kSocket: Symbol('socket'),
+ kHostHeader: Symbol('host header'),
+ kConnector: Symbol('connector'),
+ kStrictContentLength: Symbol('strict content length'),
+ kMaxRedirections: Symbol('maxRedirections'),
+ kMaxRequests: Symbol('maxRequestsPerClient'),
+ kProxy: Symbol('proxy agent options'),
+ kCounter: Symbol('socket request counter'),
+ kInterceptors: Symbol('dispatch interceptors'),
+ kMaxResponseSize: Symbol('max response size')
+}
diff --git a/node_modules/undici/lib/core/util.js b/node_modules/undici/lib/core/util.js
new file mode 100644
index 0000000..6f247d2
--- /dev/null
+++ b/node_modules/undici/lib/core/util.js
@@ -0,0 +1,475 @@
+'use strict'
+
+const assert = require('assert')
+const { kDestroyed, kBodyUsed } = require('./symbols')
+const { IncomingMessage } = require('http')
+const stream = require('stream')
+const net = require('net')
+const { InvalidArgumentError } = require('./errors')
+const { Blob } = require('buffer')
+const nodeUtil = require('util')
+const { stringify } = require('querystring')
+
+const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v))
+
+function nop () {}
+
+function isStream (obj) {
+ return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function'
+}
+
+// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License)
+function isBlobLike (object) {
+ return (Blob && object instanceof Blob) || (
+ object &&
+ typeof object === 'object' &&
+ (typeof object.stream === 'function' ||
+ typeof object.arrayBuffer === 'function') &&
+ /^(Blob|File)$/.test(object[Symbol.toStringTag])
+ )
+}
+
+function buildURL (url, queryParams) {
+ if (url.includes('?') || url.includes('#')) {
+ throw new Error('Query params cannot be passed when url already contains "?" or "#".')
+ }
+
+ const stringified = stringify(queryParams)
+
+ if (stringified) {
+ url += '?' + stringified
+ }
+
+ return url
+}
+
+function parseURL (url) {
+ if (typeof url === 'string') {
+ url = new URL(url)
+
+ if (!/^https?:/.test(url.origin || url.protocol)) {
+ throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.')
+ }
+
+ return url
+ }
+
+ if (!url || typeof url !== 'object') {
+ throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.')
+ }
+
+ if (url.port != null && url.port !== '' && !Number.isFinite(parseInt(url.port))) {
+ throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.')
+ }
+
+ if (url.path != null && typeof url.path !== 'string') {
+ throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.')
+ }
+
+ if (url.pathname != null && typeof url.pathname !== 'string') {
+ throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.')
+ }
+
+ if (url.hostname != null && typeof url.hostname !== 'string') {
+ throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.')
+ }
+
+ if (url.origin != null && typeof url.origin !== 'string') {
+ throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.')
+ }
+
+ if (!/^https?:/.test(url.origin || url.protocol)) {
+ throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.')
+ }
+
+ if (!(url instanceof URL)) {
+ const port = url.port != null
+ ? url.port
+ : (url.protocol === 'https:' ? 443 : 80)
+ let origin = url.origin != null
+ ? url.origin
+ : `${url.protocol}//${url.hostname}:${port}`
+ let path = url.path != null
+ ? url.path
+ : `${url.pathname || ''}${url.search || ''}`
+
+ if (origin.endsWith('/')) {
+ origin = origin.substring(0, origin.length - 1)
+ }
+
+ if (path && !path.startsWith('/')) {
+ path = `/${path}`
+ }
+ // new URL(path, origin) is unsafe when `path` contains an absolute URL
+ // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL:
+ // If first parameter is a relative URL, second param is required, and will be used as the base URL.
+ // If first parameter is an absolute URL, a given second param will be ignored.
+ url = new URL(origin + path)
+ }
+
+ return url
+}
+
+function parseOrigin (url) {
+ url = parseURL(url)
+
+ if (url.pathname !== '/' || url.search || url.hash) {
+ throw new InvalidArgumentError('invalid url')
+ }
+
+ return url
+}
+
+function getHostname (host) {
+ if (host[0] === '[') {
+ const idx = host.indexOf(']')
+
+ assert(idx !== -1)
+ return host.substr(1, idx - 1)
+ }
+
+ const idx = host.indexOf(':')
+ if (idx === -1) return host
+
+ return host.substr(0, idx)
+}
+
+// IP addresses are not valid server names per RFC6066
+// > Currently, the only server names supported are DNS hostnames
+function getServerName (host) {
+ if (!host) {
+ return null
+ }
+
+ assert.strictEqual(typeof host, 'string')
+
+ const servername = getHostname(host)
+ if (net.isIP(servername)) {
+ return ''
+ }
+
+ return servername
+}
+
+function deepClone (obj) {
+ return JSON.parse(JSON.stringify(obj))
+}
+
+function isAsyncIterable (obj) {
+ return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function')
+}
+
+function isIterable (obj) {
+ return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function'))
+}
+
+function bodyLength (body) {
+ if (body == null) {
+ return 0
+ } else if (isStream(body)) {
+ const state = body._readableState
+ return state && state.ended === true && Number.isFinite(state.length)
+ ? state.length
+ : null
+ } else if (isBlobLike(body)) {
+ return body.size != null ? body.size : null
+ } else if (isBuffer(body)) {
+ return body.byteLength
+ }
+
+ return null
+}
+
+function isDestroyed (stream) {
+ return !stream || !!(stream.destroyed || stream[kDestroyed])
+}
+
+function isReadableAborted (stream) {
+ const state = stream && stream._readableState
+ return isDestroyed(stream) && state && !state.endEmitted
+}
+
+function destroy (stream, err) {
+ if (!isStream(stream) || isDestroyed(stream)) {
+ return
+ }
+
+ if (typeof stream.destroy === 'function') {
+ if (Object.getPrototypeOf(stream).constructor === IncomingMessage) {
+ // See: https://github.com/nodejs/node/pull/38505/files
+ stream.socket = null
+ }
+ stream.destroy(err)
+ } else if (err) {
+ process.nextTick((stream, err) => {
+ stream.emit('error', err)
+ }, stream, err)
+ }
+
+ if (stream.destroyed !== true) {
+ stream[kDestroyed] = true
+ }
+}
+
+const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/
+function parseKeepAliveTimeout (val) {
+ const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR)
+ return m ? parseInt(m[1], 10) * 1000 : null
+}
+
+function parseHeaders (headers, obj = {}) {
+ for (let i = 0; i < headers.length; i += 2) {
+ const key = headers[i].toString().toLowerCase()
+ let val = obj[key]
+
+ if (!val) {
+ if (Array.isArray(headers[i + 1])) {
+ obj[key] = headers[i + 1]
+ } else {
+ obj[key] = headers[i + 1].toString('utf8')
+ }
+ } else {
+ if (!Array.isArray(val)) {
+ val = [val]
+ obj[key] = val
+ }
+ val.push(headers[i + 1].toString('utf8'))
+ }
+ }
+
+ // See https://github.com/nodejs/node/pull/46528
+ if ('content-length' in obj && 'content-disposition' in obj) {
+ obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1')
+ }
+
+ return obj
+}
+
+function parseRawHeaders (headers) {
+ const ret = []
+ let hasContentLength = false
+ let contentDispositionIdx = -1
+
+ for (let n = 0; n < headers.length; n += 2) {
+ const key = headers[n + 0].toString()
+ const val = headers[n + 1].toString('utf8')
+
+ if (key.length === 14 && (key === 'content-length' || key.toLowerCase() === 'content-length')) {
+ ret.push(key, val)
+ hasContentLength = true
+ } else if (key.length === 19 && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) {
+ contentDispositionIdx = ret.push(key, val) - 1
+ } else {
+ ret.push(key, val)
+ }
+ }
+
+ // See https://github.com/nodejs/node/pull/46528
+ if (hasContentLength && contentDispositionIdx !== -1) {
+ ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1')
+ }
+
+ return ret
+}
+
+function isBuffer (buffer) {
+ // See, https://github.com/mcollina/undici/pull/319
+ return buffer instanceof Uint8Array || Buffer.isBuffer(buffer)
+}
+
+function validateHandler (handler, method, upgrade) {
+ if (!handler || typeof handler !== 'object') {
+ throw new InvalidArgumentError('handler must be an object')
+ }
+
+ if (typeof handler.onConnect !== 'function') {
+ throw new InvalidArgumentError('invalid onConnect method')
+ }
+
+ if (typeof handler.onError !== 'function') {
+ throw new InvalidArgumentError('invalid onError method')
+ }
+
+ if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) {
+ throw new InvalidArgumentError('invalid onBodySent method')
+ }
+
+ if (upgrade || method === 'CONNECT') {
+ if (typeof handler.onUpgrade !== 'function') {
+ throw new InvalidArgumentError('invalid onUpgrade method')
+ }
+ } else {
+ if (typeof handler.onHeaders !== 'function') {
+ throw new InvalidArgumentError('invalid onHeaders method')
+ }
+
+ if (typeof handler.onData !== 'function') {
+ throw new InvalidArgumentError('invalid onData method')
+ }
+
+ if (typeof handler.onComplete !== 'function') {
+ throw new InvalidArgumentError('invalid onComplete method')
+ }
+ }
+}
+
+// A body is disturbed if it has been read from and it cannot
+// be re-used without losing state or data.
+function isDisturbed (body) {
+ return !!(body && (
+ stream.isDisturbed
+ ? stream.isDisturbed(body) || body[kBodyUsed] // TODO (fix): Why is body[kBodyUsed] needed?
+ : body[kBodyUsed] ||
+ body.readableDidRead ||
+ (body._readableState && body._readableState.dataEmitted) ||
+ isReadableAborted(body)
+ ))
+}
+
+function isErrored (body) {
+ return !!(body && (
+ stream.isErrored
+ ? stream.isErrored(body)
+ : /state: 'errored'/.test(nodeUtil.inspect(body)
+ )))
+}
+
+function isReadable (body) {
+ return !!(body && (
+ stream.isReadable
+ ? stream.isReadable(body)
+ : /state: 'readable'/.test(nodeUtil.inspect(body)
+ )))
+}
+
+function getSocketInfo (socket) {
+ return {
+ localAddress: socket.localAddress,
+ localPort: socket.localPort,
+ remoteAddress: socket.remoteAddress,
+ remotePort: socket.remotePort,
+ remoteFamily: socket.remoteFamily,
+ timeout: socket.timeout,
+ bytesWritten: socket.bytesWritten,
+ bytesRead: socket.bytesRead
+ }
+}
+
+let ReadableStream
+function ReadableStreamFrom (iterable) {
+ if (!ReadableStream) {
+ ReadableStream = require('stream/web').ReadableStream
+ }
+
+ if (ReadableStream.from) {
+ // https://github.com/whatwg/streams/pull/1083
+ return ReadableStream.from(iterable)
+ }
+
+ let iterator
+ return new ReadableStream(
+ {
+ async start () {
+ iterator = iterable[Symbol.asyncIterator]()
+ },
+ async pull (controller) {
+ const { done, value } = await iterator.next()
+ if (done) {
+ queueMicrotask(() => {
+ controller.close()
+ })
+ } else {
+ const buf = Buffer.isBuffer(value) ? value : Buffer.from(value)
+ controller.enqueue(new Uint8Array(buf))
+ }
+ return controller.desiredSize > 0
+ },
+ async cancel (reason) {
+ await iterator.return()
+ }
+ },
+ 0
+ )
+}
+
+// The chunk should be a FormData instance and contains
+// all the required methods.
+function isFormDataLike (object) {
+ return (
+ object &&
+ typeof object === 'object' &&
+ typeof object.append === 'function' &&
+ typeof object.delete === 'function' &&
+ typeof object.get === 'function' &&
+ typeof object.getAll === 'function' &&
+ typeof object.has === 'function' &&
+ typeof object.set === 'function' &&
+ object[Symbol.toStringTag] === 'FormData'
+ )
+}
+
+function throwIfAborted (signal) {
+ if (!signal) { return }
+ if (typeof signal.throwIfAborted === 'function') {
+ signal.throwIfAborted()
+ } else {
+ if (signal.aborted) {
+ // DOMException not available < v17.0.0
+ const err = new Error('The operation was aborted')
+ err.name = 'AbortError'
+ throw err
+ }
+ }
+}
+
+const hasToWellFormed = !!String.prototype.toWellFormed
+
+/**
+ * @param {string} val
+ */
+function toUSVString (val) {
+ if (hasToWellFormed) {
+ return `${val}`.toWellFormed()
+ } else if (nodeUtil.toUSVString) {
+ return nodeUtil.toUSVString(val)
+ }
+
+ return `${val}`
+}
+
+const kEnumerableProperty = Object.create(null)
+kEnumerableProperty.enumerable = true
+
+module.exports = {
+ kEnumerableProperty,
+ nop,
+ isDisturbed,
+ isErrored,
+ isReadable,
+ toUSVString,
+ isReadableAborted,
+ isBlobLike,
+ parseOrigin,
+ parseURL,
+ getServerName,
+ isStream,
+ isIterable,
+ isAsyncIterable,
+ isDestroyed,
+ parseRawHeaders,
+ parseHeaders,
+ parseKeepAliveTimeout,
+ destroy,
+ bodyLength,
+ deepClone,
+ ReadableStreamFrom,
+ isBuffer,
+ validateHandler,
+ getSocketInfo,
+ isFormDataLike,
+ buildURL,
+ throwIfAborted,
+ nodeMajor,
+ nodeMinor,
+ nodeHasAutoSelectFamily: nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 13)
+}
diff --git a/node_modules/undici/lib/dispatcher-base.js b/node_modules/undici/lib/dispatcher-base.js
new file mode 100644
index 0000000..5c0220b
--- /dev/null
+++ b/node_modules/undici/lib/dispatcher-base.js
@@ -0,0 +1,192 @@
+'use strict'
+
+const Dispatcher = require('./dispatcher')
+const {
+ ClientDestroyedError,
+ ClientClosedError,
+ InvalidArgumentError
+} = require('./core/errors')
+const { kDestroy, kClose, kDispatch, kInterceptors } = require('./core/symbols')
+
+const kDestroyed = Symbol('destroyed')
+const kClosed = Symbol('closed')
+const kOnDestroyed = Symbol('onDestroyed')
+const kOnClosed = Symbol('onClosed')
+const kInterceptedDispatch = Symbol('Intercepted Dispatch')
+
+class DispatcherBase extends Dispatcher {
+ constructor () {
+ super()
+
+ this[kDestroyed] = false
+ this[kOnDestroyed] = null
+ this[kClosed] = false
+ this[kOnClosed] = []
+ }
+
+ get destroyed () {
+ return this[kDestroyed]
+ }
+
+ get closed () {
+ return this[kClosed]
+ }
+
+ get interceptors () {
+ return this[kInterceptors]
+ }
+
+ set interceptors (newInterceptors) {
+ if (newInterceptors) {
+ for (let i = newInterceptors.length - 1; i >= 0; i--) {
+ const interceptor = this[kInterceptors][i]
+ if (typeof interceptor !== 'function') {
+ throw new InvalidArgumentError('interceptor must be an function')
+ }
+ }
+ }
+
+ this[kInterceptors] = newInterceptors
+ }
+
+ close (callback) {
+ if (callback === undefined) {
+ return new Promise((resolve, reject) => {
+ this.close((err, data) => {
+ return err ? reject(err) : resolve(data)
+ })
+ })
+ }
+
+ if (typeof callback !== 'function') {
+ throw new InvalidArgumentError('invalid callback')
+ }
+
+ if (this[kDestroyed]) {
+ queueMicrotask(() => callback(new ClientDestroyedError(), null))
+ return
+ }
+
+ if (this[kClosed]) {
+ if (this[kOnClosed]) {
+ this[kOnClosed].push(callback)
+ } else {
+ queueMicrotask(() => callback(null, null))
+ }
+ return
+ }
+
+ this[kClosed] = true
+ this[kOnClosed].push(callback)
+
+ const onClosed = () => {
+ const callbacks = this[kOnClosed]
+ this[kOnClosed] = null
+ for (let i = 0; i < callbacks.length; i++) {
+ callbacks[i](null, null)
+ }
+ }
+
+ // Should not error.
+ this[kClose]()
+ .then(() => this.destroy())
+ .then(() => {
+ queueMicrotask(onClosed)
+ })
+ }
+
+ destroy (err, callback) {
+ if (typeof err === 'function') {
+ callback = err
+ err = null
+ }
+
+ if (callback === undefined) {
+ return new Promise((resolve, reject) => {
+ this.destroy(err, (err, data) => {
+ return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data)
+ })
+ })
+ }
+
+ if (typeof callback !== 'function') {
+ throw new InvalidArgumentError('invalid callback')
+ }
+
+ if (this[kDestroyed]) {
+ if (this[kOnDestroyed]) {
+ this[kOnDestroyed].push(callback)
+ } else {
+ queueMicrotask(() => callback(null, null))
+ }
+ return
+ }
+
+ if (!err) {
+ err = new ClientDestroyedError()
+ }
+
+ this[kDestroyed] = true
+ this[kOnDestroyed] = this[kOnDestroyed] || []
+ this[kOnDestroyed].push(callback)
+
+ const onDestroyed = () => {
+ const callbacks = this[kOnDestroyed]
+ this[kOnDestroyed] = null
+ for (let i = 0; i < callbacks.length; i++) {
+ callbacks[i](null, null)
+ }
+ }
+
+ // Should not error.
+ this[kDestroy](err).then(() => {
+ queueMicrotask(onDestroyed)
+ })
+ }
+
+ [kInterceptedDispatch] (opts, handler) {
+ if (!this[kInterceptors] || this[kInterceptors].length === 0) {
+ this[kInterceptedDispatch] = this[kDispatch]
+ return this[kDispatch](opts, handler)
+ }
+
+ let dispatch = this[kDispatch].bind(this)
+ for (let i = this[kInterceptors].length - 1; i >= 0; i--) {
+ dispatch = this[kInterceptors][i](dispatch)
+ }
+ this[kInterceptedDispatch] = dispatch
+ return dispatch(opts, handler)
+ }
+
+ dispatch (opts, handler) {
+ if (!handler || typeof handler !== 'object') {
+ throw new InvalidArgumentError('handler must be an object')
+ }
+
+ try {
+ if (!opts || typeof opts !== 'object') {
+ throw new InvalidArgumentError('opts must be an object.')
+ }
+
+ if (this[kDestroyed] || this[kOnDestroyed]) {
+ throw new ClientDestroyedError()
+ }
+
+ if (this[kClosed]) {
+ throw new ClientClosedError()
+ }
+
+ return this[kInterceptedDispatch](opts, handler)
+ } catch (err) {
+ if (typeof handler.onError !== 'function') {
+ throw new InvalidArgumentError('invalid onError method')
+ }
+
+ handler.onError(err)
+
+ return false
+ }
+ }
+}
+
+module.exports = DispatcherBase
diff --git a/node_modules/undici/lib/dispatcher.js b/node_modules/undici/lib/dispatcher.js
new file mode 100644
index 0000000..9b809d8
--- /dev/null
+++ b/node_modules/undici/lib/dispatcher.js
@@ -0,0 +1,19 @@
+'use strict'
+
+const EventEmitter = require('events')
+
+class Dispatcher extends EventEmitter {
+ dispatch () {
+ throw new Error('not implemented')
+ }
+
+ close () {
+ throw new Error('not implemented')
+ }
+
+ destroy () {
+ throw new Error('not implemented')
+ }
+}
+
+module.exports = Dispatcher
diff --git a/node_modules/undici/lib/fetch/LICENSE b/node_modules/undici/lib/fetch/LICENSE
new file mode 100644
index 0000000..2943500
--- /dev/null
+++ b/node_modules/undici/lib/fetch/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Ethan Arrowood
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/undici/lib/fetch/body.js b/node_modules/undici/lib/fetch/body.js
new file mode 100644
index 0000000..db450ee
--- /dev/null
+++ b/node_modules/undici/lib/fetch/body.js
@@ -0,0 +1,603 @@
+'use strict'
+
+const Busboy = require('busboy')
+const util = require('../core/util')
+const {
+ ReadableStreamFrom,
+ isBlobLike,
+ isReadableStreamLike,
+ readableStreamClose,
+ createDeferredPromise,
+ fullyReadBody
+} = require('./util')
+const { FormData } = require('./formdata')
+const { kState } = require('./symbols')
+const { webidl } = require('./webidl')
+const { DOMException, structuredClone } = require('./constants')
+const { Blob, File: NativeFile } = require('buffer')
+const { kBodyUsed } = require('../core/symbols')
+const assert = require('assert')
+const { isErrored } = require('../core/util')
+const { isUint8Array, isArrayBuffer } = require('util/types')
+const { File: UndiciFile } = require('./file')
+const { parseMIMEType, serializeAMimeType } = require('./dataURL')
+
+let ReadableStream = globalThis.ReadableStream
+
+/** @type {globalThis['File']} */
+const File = NativeFile ?? UndiciFile
+
+// https://fetch.spec.whatwg.org/#concept-bodyinit-extract
+function extractBody (object, keepalive = false) {
+ if (!ReadableStream) {
+ ReadableStream = require('stream/web').ReadableStream
+ }
+
+ // 1. Let stream be null.
+ let stream = null
+
+ // 2. If object is a ReadableStream object, then set stream to object.
+ if (object instanceof ReadableStream) {
+ stream = object
+ } else if (isBlobLike(object)) {
+ // 3. Otherwise, if object is a Blob object, set stream to the
+ // result of running object’s get stream.
+ stream = object.stream()
+ } else {
+ // 4. Otherwise, set stream to a new ReadableStream object, and set
+ // up stream.
+ stream = new ReadableStream({
+ async pull (controller) {
+ controller.enqueue(
+ typeof source === 'string' ? new TextEncoder().encode(source) : source
+ )
+ queueMicrotask(() => readableStreamClose(controller))
+ },
+ start () {},
+ type: undefined
+ })
+ }
+
+ // 5. Assert: stream is a ReadableStream object.
+ assert(isReadableStreamLike(stream))
+
+ // 6. Let action be null.
+ let action = null
+
+ // 7. Let source be null.
+ let source = null
+
+ // 8. Let length be null.
+ let length = null
+
+ // 9. Let type be null.
+ let type = null
+
+ // 10. Switch on object:
+ if (typeof object === 'string') {
+ // Set source to the UTF-8 encoding of object.
+ // Note: setting source to a Uint8Array here breaks some mocking assumptions.
+ source = object
+
+ // Set type to `text/plain;charset=UTF-8`.
+ type = 'text/plain;charset=UTF-8'
+ } else if (object instanceof URLSearchParams) {
+ // URLSearchParams
+
+ // spec says to run application/x-www-form-urlencoded on body.list
+ // this is implemented in Node.js as apart of an URLSearchParams instance toString method
+ // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490
+ // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100
+
+ // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list.
+ source = object.toString()
+
+ // Set type to `application/x-www-form-urlencoded;charset=UTF-8`.
+ type = 'application/x-www-form-urlencoded;charset=UTF-8'
+ } else if (isArrayBuffer(object)) {
+ // BufferSource/ArrayBuffer
+
+ // Set source to a copy of the bytes held by object.
+ source = new Uint8Array(object.slice())
+ } else if (ArrayBuffer.isView(object)) {
+ // BufferSource/ArrayBufferView
+
+ // Set source to a copy of the bytes held by object.
+ source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
+ } else if (util.isFormDataLike(object)) {
+ const boundary = `----formdata-undici-${Math.random()}`.replace('.', '').slice(0, 32)
+ const prefix = `--${boundary}\r\nContent-Disposition: form-data`
+
+ /*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
+ const escape = (str) =>
+ str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22')
+ const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, '\r\n')
+
+ // Set action to this step: run the multipart/form-data
+ // encoding algorithm, with object’s entry list and UTF-8.
+ // - This ensures that the body is immutable and can't be changed afterwords
+ // - That the content-length is calculated in advance.
+ // - And that all parts are pre-encoded and ready to be sent.
+
+ const enc = new TextEncoder()
+ const blobParts = []
+ const rn = new Uint8Array([13, 10]) // '\r\n'
+ length = 0
+ let hasUnknownSizeValue = false
+
+ for (const [name, value] of object) {
+ if (typeof value === 'string') {
+ const chunk = enc.encode(prefix +
+ `; name="${escape(normalizeLinefeeds(name))}"` +
+ `\r\n\r\n${normalizeLinefeeds(value)}\r\n`)
+ blobParts.push(chunk)
+ length += chunk.byteLength
+ } else {
+ const chunk = enc.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` +
+ (value.name ? `; filename="${escape(value.name)}"` : '') + '\r\n' +
+ `Content-Type: ${
+ value.type || 'application/octet-stream'
+ }\r\n\r\n`)
+ blobParts.push(chunk, value, rn)
+ if (typeof value.size === 'number') {
+ length += chunk.byteLength + value.size + rn.byteLength
+ } else {
+ hasUnknownSizeValue = true
+ }
+ }
+ }
+
+ const chunk = enc.encode(`--${boundary}--`)
+ blobParts.push(chunk)
+ length += chunk.byteLength
+ if (hasUnknownSizeValue) {
+ length = null
+ }
+
+ // Set source to object.
+ source = object
+
+ action = async function * () {
+ for (const part of blobParts) {
+ if (part.stream) {
+ yield * part.stream()
+ } else {
+ yield part
+ }
+ }
+ }
+
+ // Set type to `multipart/form-data; boundary=`,
+ // followed by the multipart/form-data boundary string generated
+ // by the multipart/form-data encoding algorithm.
+ type = 'multipart/form-data; boundary=' + boundary
+ } else if (isBlobLike(object)) {
+ // Blob
+
+ // Set source to object.
+ source = object
+
+ // Set length to object’s size.
+ length = object.size
+
+ // If object’s type attribute is not the empty byte sequence, set
+ // type to its value.
+ if (object.type) {
+ type = object.type
+ }
+ } else if (typeof object[Symbol.asyncIterator] === 'function') {
+ // If keepalive is true, then throw a TypeError.
+ if (keepalive) {
+ throw new TypeError('keepalive')
+ }
+
+ // If object is disturbed or locked, then throw a TypeError.
+ if (util.isDisturbed(object) || object.locked) {
+ throw new TypeError(
+ 'Response body object should not be disturbed or locked'
+ )
+ }
+
+ stream =
+ object instanceof ReadableStream ? object : ReadableStreamFrom(object)
+ }
+
+ // 11. If source is a byte sequence, then set action to a
+ // step that returns source and length to source’s length.
+ if (typeof source === 'string' || util.isBuffer(source)) {
+ length = Buffer.byteLength(source)
+ }
+
+ // 12. If action is non-null, then run these steps in in parallel:
+ if (action != null) {
+ // Run action.
+ let iterator
+ stream = new ReadableStream({
+ async start () {
+ iterator = action(object)[Symbol.asyncIterator]()
+ },
+ async pull (controller) {
+ const { value, done } = await iterator.next()
+ if (done) {
+ // When running action is done, close stream.
+ queueMicrotask(() => {
+ controller.close()
+ })
+ } else {
+ // Whenever one or more bytes are available and stream is not errored,
+ // enqueue a Uint8Array wrapping an ArrayBuffer containing the available
+ // bytes into stream.
+ if (!isErrored(stream)) {
+ controller.enqueue(new Uint8Array(value))
+ }
+ }
+ return controller.desiredSize > 0
+ },
+ async cancel (reason) {
+ await iterator.return()
+ },
+ type: undefined
+ })
+ }
+
+ // 13. Let body be a body whose stream is stream, source is source,
+ // and length is length.
+ const body = { stream, source, length }
+
+ // 14. Return (body, type).
+ return [body, type]
+}
+
+// https://fetch.spec.whatwg.org/#bodyinit-safely-extract
+function safelyExtractBody (object, keepalive = false) {
+ if (!ReadableStream) {
+ // istanbul ignore next
+ ReadableStream = require('stream/web').ReadableStream
+ }
+
+ // To safely extract a body and a `Content-Type` value from
+ // a byte sequence or BodyInit object object, run these steps:
+
+ // 1. If object is a ReadableStream object, then:
+ if (object instanceof ReadableStream) {
+ // Assert: object is neither disturbed nor locked.
+ // istanbul ignore next
+ assert(!util.isDisturbed(object), 'The body has already been consumed.')
+ // istanbul ignore next
+ assert(!object.locked, 'The stream is locked.')
+ }
+
+ // 2. Return the results of extracting object.
+ return extractBody(object, keepalive)
+}
+
+function cloneBody (body) {
+ // To clone a body body, run these steps:
+
+ // https://fetch.spec.whatwg.org/#concept-body-clone
+
+ // 1. Let « out1, out2 » be the result of teeing body’s stream.
+ const [out1, out2] = body.stream.tee()
+ const out2Clone = structuredClone(out2, { transfer: [out2] })
+ // This, for whatever reasons, unrefs out2Clone which allows
+ // the process to exit by itself.
+ const [, finalClone] = out2Clone.tee()
+
+ // 2. Set body’s stream to out1.
+ body.stream = out1
+
+ // 3. Return a body whose stream is out2 and other members are copied from body.
+ return {
+ stream: finalClone,
+ length: body.length,
+ source: body.source
+ }
+}
+
+async function * consumeBody (body) {
+ if (body) {
+ if (isUint8Array(body)) {
+ yield body
+ } else {
+ const stream = body.stream
+
+ if (util.isDisturbed(stream)) {
+ throw new TypeError('The body has already been consumed.')
+ }
+
+ if (stream.locked) {
+ throw new TypeError('The stream is locked.')
+ }
+
+ // Compat.
+ stream[kBodyUsed] = true
+
+ yield * stream
+ }
+ }
+}
+
+function throwIfAborted (state) {
+ if (state.aborted) {
+ throw new DOMException('The operation was aborted.', 'AbortError')
+ }
+}
+
+function bodyMixinMethods (instance) {
+ const methods = {
+ blob () {
+ // The blob() method steps are to return the result of
+ // running consume body with this and the following step
+ // given a byte sequence bytes: return a Blob whose
+ // contents are bytes and whose type attribute is this’s
+ // MIME type.
+ return specConsumeBody(this, (bytes) => {
+ let mimeType = bodyMimeType(this)
+
+ if (mimeType === 'failure') {
+ mimeType = ''
+ } else if (mimeType) {
+ mimeType = serializeAMimeType(mimeType)
+ }
+
+ // Return a Blob whose contents are bytes and type attribute
+ // is mimeType.
+ return new Blob([bytes], { type: mimeType })
+ }, instance)
+ },
+
+ arrayBuffer () {
+ // The arrayBuffer() method steps are to return the result
+ // of running consume body with this and the following step
+ // given a byte sequence bytes: return a new ArrayBuffer
+ // whose contents are bytes.
+ return specConsumeBody(this, (bytes) => {
+ return new Uint8Array(bytes).buffer
+ }, instance)
+ },
+
+ text () {
+ // The text() method steps are to return the result of running
+ // consume body with this and UTF-8 decode.
+ return specConsumeBody(this, utf8DecodeBytes, instance)
+ },
+
+ json () {
+ // The json() method steps are to return the result of running
+ // consume body with this and parse JSON from bytes.
+ return specConsumeBody(this, parseJSONFromBytes, instance)
+ },
+
+ async formData () {
+ webidl.brandCheck(this, instance)
+
+ throwIfAborted(this[kState])
+
+ const contentType = this.headers.get('Content-Type')
+
+ // If mimeType’s essence is "multipart/form-data", then:
+ if (/multipart\/form-data/.test(contentType)) {
+ const headers = {}
+ for (const [key, value] of this.headers) headers[key.toLowerCase()] = value
+
+ const responseFormData = new FormData()
+
+ let busboy
+
+ try {
+ busboy = Busboy({
+ headers,
+ defParamCharset: 'utf8'
+ })
+ } catch (err) {
+ throw new DOMException(`${err}`, 'AbortError')
+ }
+
+ busboy.on('field', (name, value) => {
+ responseFormData.append(name, value)
+ })
+ busboy.on('file', (name, value, info) => {
+ const { filename, encoding, mimeType } = info
+ const chunks = []
+
+ if (encoding === 'base64' || encoding.toLowerCase() === 'base64') {
+ let base64chunk = ''
+
+ value.on('data', (chunk) => {
+ base64chunk += chunk.toString().replace(/[\r\n]/gm, '')
+
+ const end = base64chunk.length - base64chunk.length % 4
+ chunks.push(Buffer.from(base64chunk.slice(0, end), 'base64'))
+
+ base64chunk = base64chunk.slice(end)
+ })
+ value.on('end', () => {
+ chunks.push(Buffer.from(base64chunk, 'base64'))
+ responseFormData.append(name, new File(chunks, filename, { type: mimeType }))
+ })
+ } else {
+ value.on('data', (chunk) => {
+ chunks.push(chunk)
+ })
+ value.on('end', () => {
+ responseFormData.append(name, new File(chunks, filename, { type: mimeType }))
+ })
+ }
+ })
+
+ const busboyResolve = new Promise((resolve, reject) => {
+ busboy.on('finish', resolve)
+ busboy.on('error', (err) => reject(new TypeError(err)))
+ })
+
+ if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk)
+ busboy.end()
+ await busboyResolve
+
+ return responseFormData
+ } else if (/application\/x-www-form-urlencoded/.test(contentType)) {
+ // Otherwise, if mimeType’s essence is "application/x-www-form-urlencoded", then:
+
+ // 1. Let entries be the result of parsing bytes.
+ let entries
+ try {
+ let text = ''
+ // application/x-www-form-urlencoded parser will keep the BOM.
+ // https://url.spec.whatwg.org/#concept-urlencoded-parser
+ const textDecoder = new TextDecoder('utf-8', { ignoreBOM: true })
+ for await (const chunk of consumeBody(this[kState].body)) {
+ if (!isUint8Array(chunk)) {
+ throw new TypeError('Expected Uint8Array chunk')
+ }
+ text += textDecoder.decode(chunk, { stream: true })
+ }
+ text += textDecoder.decode()
+ entries = new URLSearchParams(text)
+ } catch (err) {
+ // istanbul ignore next: Unclear when new URLSearchParams can fail on a string.
+ // 2. If entries is failure, then throw a TypeError.
+ throw Object.assign(new TypeError(), { cause: err })
+ }
+
+ // 3. Return a new FormData object whose entries are entries.
+ const formData = new FormData()
+ for (const [name, value] of entries) {
+ formData.append(name, value)
+ }
+ return formData
+ } else {
+ // Wait a tick before checking if the request has been aborted.
+ // Otherwise, a TypeError can be thrown when an AbortError should.
+ await Promise.resolve()
+
+ throwIfAborted(this[kState])
+
+ // Otherwise, throw a TypeError.
+ throw webidl.errors.exception({
+ header: `${instance.name}.formData`,
+ message: 'Could not parse content as FormData.'
+ })
+ }
+ }
+ }
+
+ return methods
+}
+
+function mixinBody (prototype) {
+ Object.assign(prototype.prototype, bodyMixinMethods(prototype))
+}
+
+/**
+ * @see https://fetch.spec.whatwg.org/#concept-body-consume-body
+ * @param {Response|Request} object
+ * @param {(value: unknown) => unknown} convertBytesToJSValue
+ * @param {Response|Request} instance
+ */
+async function specConsumeBody (object, convertBytesToJSValue, instance) {
+ webidl.brandCheck(object, instance)
+
+ throwIfAborted(object[kState])
+
+ // 1. If object is unusable, then return a promise rejected
+ // with a TypeError.
+ if (bodyUnusable(object[kState].body)) {
+ throw new TypeError('Body is unusable')
+ }
+
+ // 2. Let promise be a new promise.
+ const promise = createDeferredPromise()
+
+ // 3. Let errorSteps given error be to reject promise with error.
+ const errorSteps = (error) => promise.reject(error)
+
+ // 4. Let successSteps given a byte sequence data be to resolve
+ // promise with the result of running convertBytesToJSValue
+ // with data. If that threw an exception, then run errorSteps
+ // with that exception.
+ const successSteps = (data) => {
+ try {
+ promise.resolve(convertBytesToJSValue(data))
+ } catch (e) {
+ errorSteps(e)
+ }
+ }
+
+ // 5. If object’s body is null, then run successSteps with an
+ // empty byte sequence.
+ if (object[kState].body == null) {
+ successSteps(new Uint8Array())
+ return promise.promise
+ }
+
+ // 6. Otherwise, fully read object’s body given successSteps,
+ // errorSteps, and object’s relevant global object.
+ fullyReadBody(object[kState].body, successSteps, errorSteps)
+
+ // 7. Return promise.
+ return promise.promise
+}
+
+// https://fetch.spec.whatwg.org/#body-unusable
+function bodyUnusable (body) {
+ // An object including the Body interface mixin is
+ // said to be unusable if its body is non-null and
+ // its body’s stream is disturbed or locked.
+ return body != null && (body.stream.locked || util.isDisturbed(body.stream))
+}
+
+/**
+ * @see https://encoding.spec.whatwg.org/#utf-8-decode
+ * @param {Buffer} buffer
+ */
+function utf8DecodeBytes (buffer) {
+ if (buffer.length === 0) {
+ return ''
+ }
+
+ // 1. Let buffer be the result of peeking three bytes from
+ // ioQueue, converted to a byte sequence.
+
+ // 2. If buffer is 0xEF 0xBB 0xBF, then read three
+ // bytes from ioQueue. (Do nothing with those bytes.)
+ if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) {
+ buffer = buffer.subarray(3)
+ }
+
+ // 3. Process a queue with an instance of UTF-8’s
+ // decoder, ioQueue, output, and "replacement".
+ const output = new TextDecoder().decode(buffer)
+
+ // 4. Return output.
+ return output
+}
+
+/**
+ * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value
+ * @param {Uint8Array} bytes
+ */
+function parseJSONFromBytes (bytes) {
+ return JSON.parse(utf8DecodeBytes(bytes))
+}
+
+/**
+ * @see https://fetch.spec.whatwg.org/#concept-body-mime-type
+ * @param {import('./response').Response|import('./request').Request} object
+ */
+function bodyMimeType (object) {
+ const { headersList } = object[kState]
+ const contentType = headersList.get('content-type')
+
+ if (contentType === null) {
+ return 'failure'
+ }
+
+ return parseMIMEType(contentType)
+}
+
+module.exports = {
+ extractBody,
+ safelyExtractBody,
+ cloneBody,
+ mixinBody
+}
diff --git a/node_modules/undici/lib/fetch/constants.js b/node_modules/undici/lib/fetch/constants.js
new file mode 100644
index 0000000..a5294a9
--- /dev/null
+++ b/node_modules/undici/lib/fetch/constants.js
@@ -0,0 +1,136 @@
+'use strict'
+
+const { MessageChannel, receiveMessageOnPort } = require('worker_threads')
+
+const corsSafeListedMethods = ['GET', 'HEAD', 'POST']
+
+const nullBodyStatus = [101, 204, 205, 304]
+
+const redirectStatus = [301, 302, 303, 307, 308]
+
+// https://fetch.spec.whatwg.org/#block-bad-port
+const badPorts = [
+ '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79',
+ '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137',
+ '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532',
+ '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723',
+ '2049', '3659', '4045', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6697',
+ '10080'
+]
+
+// https://w3c.github.io/webappsec-referrer-policy/#referrer-policies
+const referrerPolicy = [
+ '',
+ 'no-referrer',
+ 'no-referrer-when-downgrade',
+ 'same-origin',
+ 'origin',
+ 'strict-origin',
+ 'origin-when-cross-origin',
+ 'strict-origin-when-cross-origin',
+ 'unsafe-url'
+]
+
+const requestRedirect = ['follow', 'manual', 'error']
+
+const safeMethods = ['GET', 'HEAD', 'OPTIONS', 'TRACE']
+
+const requestMode = ['navigate', 'same-origin', 'no-cors', 'cors']
+
+const requestCredentials = ['omit', 'same-origin', 'include']
+
+const requestCache = [
+ 'default',
+ 'no-store',
+ 'reload',
+ 'no-cache',
+ 'force-cache',
+ 'only-if-cached'
+]
+
+// https://fetch.spec.whatwg.org/#request-body-header-name
+const requestBodyHeader = [
+ 'content-encoding',
+ 'content-language',
+ 'content-location',
+ 'content-type',
+ // See https://github.com/nodejs/undici/issues/2021
+ // 'Content-Length' is a forbidden header name, which is typically
+ // removed in the Headers implementation. However, undici doesn't
+ // filter out headers, so we add it here.
+ 'content-length'
+]
+
+// https://fetch.spec.whatwg.org/#enumdef-requestduplex
+const requestDuplex = [
+ 'half'
+]
+
+// http://fetch.spec.whatwg.org/#forbidden-method
+const forbiddenMethods = ['CONNECT', 'TRACE', 'TRACK']
+
+const subresource = [
+ 'audio',
+ 'audioworklet',
+ 'font',
+ 'image',
+ 'manifest',
+ 'paintworklet',
+ 'script',
+ 'style',
+ 'track',
+ 'video',
+ 'xslt',
+ ''
+]
+
+/** @type {globalThis['DOMException']} */
+const DOMException = globalThis.DOMException ?? (() => {
+ // DOMException was only made a global in Node v17.0.0,
+ // but fetch supports >= v16.8.
+ try {
+ atob('~')
+ } catch (err) {
+ return Object.getPrototypeOf(err).constructor
+ }
+})()
+
+let channel
+
+/** @type {globalThis['structuredClone']} */
+const structuredClone =
+ globalThis.structuredClone ??
+ // https://github.com/nodejs/node/blob/b27ae24dcc4251bad726d9d84baf678d1f707fed/lib/internal/structured_clone.js
+ // structuredClone was added in v17.0.0, but fetch supports v16.8
+ function structuredClone (value, options = undefined) {
+ if (arguments.length === 0) {
+ throw new TypeError('missing argument')
+ }
+
+ if (!channel) {
+ channel = new MessageChannel()
+ }
+ channel.port1.unref()
+ channel.port2.unref()
+ channel.port1.postMessage(value, options?.transfer)
+ return receiveMessageOnPort(channel.port2).message
+ }
+
+module.exports = {
+ DOMException,
+ structuredClone,
+ subresource,
+ forbiddenMethods,
+ requestBodyHeader,
+ referrerPolicy,
+ requestRedirect,
+ requestMode,
+ requestCredentials,
+ requestCache,
+ redirectStatus,
+ corsSafeListedMethods,
+ nullBodyStatus,
+ safeMethods,
+ badPorts,
+ requestDuplex
+}
diff --git a/node_modules/undici/lib/fetch/dataURL.js b/node_modules/undici/lib/fetch/dataURL.js
new file mode 100644
index 0000000..6df4fcc
--- /dev/null
+++ b/node_modules/undici/lib/fetch/dataURL.js
@@ -0,0 +1,630 @@
+const assert = require('assert')
+const { atob } = require('buffer')
+const { isomorphicDecode } = require('./util')
+
+const encoder = new TextEncoder()
+
+/**
+ * @see https://mimesniff.spec.whatwg.org/#http-token-code-point
+ */
+const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/
+const HTTP_WHITESPACE_REGEX = /(\u000A|\u000D|\u0009|\u0020)/ // eslint-disable-line
+/**
+ * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point
+ */
+const HTTP_QUOTED_STRING_TOKENS = /[\u0009|\u0020-\u007E|\u0080-\u00FF]/ // eslint-disable-line
+
+// https://fetch.spec.whatwg.org/#data-url-processor
+/** @param {URL} dataURL */
+function dataURLProcessor (dataURL) {
+ // 1. Assert: dataURL’s scheme is "data".
+ assert(dataURL.protocol === 'data:')
+
+ // 2. Let input be the result of running the URL
+ // serializer on dataURL with exclude fragment
+ // set to true.
+ let input = URLSerializer(dataURL, true)
+
+ // 3. Remove the leading "data:" string from input.
+ input = input.slice(5)
+
+ // 4. Let position point at the start of input.
+ const position = { position: 0 }
+
+ // 5. Let mimeType be the result of collecting a
+ // sequence of code points that are not equal
+ // to U+002C (,), given position.
+ let mimeType = collectASequenceOfCodePointsFast(
+ ',',
+ input,
+ position
+ )
+
+ // 6. Strip leading and trailing ASCII whitespace
+ // from mimeType.
+ // Undici implementation note: we need to store the
+ // length because if the mimetype has spaces removed,
+ // the wrong amount will be sliced from the input in
+ // step #9
+ const mimeTypeLength = mimeType.length
+ mimeType = removeASCIIWhitespace(mimeType, true, true)
+
+ // 7. If position is past the end of input, then
+ // return failure
+ if (position.position >= input.length) {
+ return 'failure'
+ }
+
+ // 8. Advance position by 1.
+ position.position++
+
+ // 9. Let encodedBody be the remainder of input.
+ const encodedBody = input.slice(mimeTypeLength + 1)
+
+ // 10. Let body be the percent-decoding of encodedBody.
+ let body = stringPercentDecode(encodedBody)
+
+ // 11. If mimeType ends with U+003B (;), followed by
+ // zero or more U+0020 SPACE, followed by an ASCII
+ // case-insensitive match for "base64", then:
+ if (/;(\u0020){0,}base64$/i.test(mimeType)) {
+ // 1. Let stringBody be the isomorphic decode of body.
+ const stringBody = isomorphicDecode(body)
+
+ // 2. Set body to the forgiving-base64 decode of
+ // stringBody.
+ body = forgivingBase64(stringBody)
+
+ // 3. If body is failure, then return failure.
+ if (body === 'failure') {
+ return 'failure'
+ }
+
+ // 4. Remove the last 6 code points from mimeType.
+ mimeType = mimeType.slice(0, -6)
+
+ // 5. Remove trailing U+0020 SPACE code points from mimeType,
+ // if any.
+ mimeType = mimeType.replace(/(\u0020)+$/, '')
+
+ // 6. Remove the last U+003B (;) code point from mimeType.
+ mimeType = mimeType.slice(0, -1)
+ }
+
+ // 12. If mimeType starts with U+003B (;), then prepend
+ // "text/plain" to mimeType.
+ if (mimeType.startsWith(';')) {
+ mimeType = 'text/plain' + mimeType
+ }
+
+ // 13. Let mimeTypeRecord be the result of parsing
+ // mimeType.
+ let mimeTypeRecord = parseMIMEType(mimeType)
+
+ // 14. If mimeTypeRecord is failure, then set
+ // mimeTypeRecord to text/plain;charset=US-ASCII.
+ if (mimeTypeRecord === 'failure') {
+ mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII')
+ }
+
+ // 15. Return a new data: URL struct whose MIME
+ // type is mimeTypeRecord and body is body.
+ // https://fetch.spec.whatwg.org/#data-url-struct
+ return { mimeType: mimeTypeRecord, body }
+}
+
+// https://url.spec.whatwg.org/#concept-url-serializer
+/**
+ * @param {URL} url
+ * @param {boolean} excludeFragment
+ */
+function URLSerializer (url, excludeFragment = false) {
+ const href = url.href
+
+ if (!excludeFragment) {
+ return href
+ }
+
+ const hash = href.lastIndexOf('#')
+ if (hash === -1) {
+ return href
+ }
+ return href.slice(0, hash)
+}
+
+// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points
+/**
+ * @param {(char: string) => boolean} condition
+ * @param {string} input
+ * @param {{ position: number }} position
+ */
+function collectASequenceOfCodePoints (condition, input, position) {
+ // 1. Let result be the empty string.
+ let result = ''
+
+ // 2. While position doesn’t point past the end of input and the
+ // code point at position within input meets the condition condition:
+ while (position.position < input.length && condition(input[position.position])) {
+ // 1. Append that code point to the end of result.
+ result += input[position.position]
+
+ // 2. Advance position by 1.
+ position.position++
+ }
+
+ // 3. Return result.
+ return result
+}
+
+/**
+ * A faster collectASequenceOfCodePoints that only works when comparing a single character.
+ * @param {string} char
+ * @param {string} input
+ * @param {{ position: number }} position
+ */
+function collectASequenceOfCodePointsFast (char, input, position) {
+ const idx = input.indexOf(char, position.position)
+ const start = position.position
+
+ if (idx === -1) {
+ position.position = input.length
+ return input.slice(start)
+ }
+
+ position.position = idx
+ return input.slice(start, position.position)
+}
+
+// https://url.spec.whatwg.org/#string-percent-decode
+/** @param {string} input */
+function stringPercentDecode (input) {
+ // 1. Let bytes be the UTF-8 encoding of input.
+ const bytes = encoder.encode(input)
+
+ // 2. Return the percent-decoding of bytes.
+ return percentDecode(bytes)
+}
+
+// https://url.spec.whatwg.org/#percent-decode
+/** @param {Uint8Array} input */
+function percentDecode (input) {
+ // 1. Let output be an empty byte sequence.
+ /** @type {number[]} */
+ const output = []
+
+ // 2. For each byte byte in input:
+ for (let i = 0; i < input.length; i++) {
+ const byte = input[i]
+
+ // 1. If byte is not 0x25 (%), then append byte to output.
+ if (byte !== 0x25) {
+ output.push(byte)
+
+ // 2. Otherwise, if byte is 0x25 (%) and the next two bytes
+ // after byte in input are not in the ranges
+ // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F),
+ // and 0x61 (a) to 0x66 (f), all inclusive, append byte
+ // to output.
+ } else if (
+ byte === 0x25 &&
+ !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i + 1], input[i + 2]))
+ ) {
+ output.push(0x25)
+
+ // 3. Otherwise:
+ } else {
+ // 1. Let bytePoint be the two bytes after byte in input,
+ // decoded, and then interpreted as hexadecimal number.
+ const nextTwoBytes = String.fromCharCode(input[i + 1], input[i + 2])
+ const bytePoint = Number.parseInt(nextTwoBytes, 16)
+
+ // 2. Append a byte whose value is bytePoint to output.
+ output.push(bytePoint)
+
+ // 3. Skip the next two bytes in input.
+ i += 2
+ }
+ }
+
+ // 3. Return output.
+ return Uint8Array.from(output)
+}
+
+// https://mimesniff.spec.whatwg.org/#parse-a-mime-type
+/** @param {string} input */
+function parseMIMEType (input) {
+ // 1. Remove any leading and trailing HTTP whitespace
+ // from input.
+ input = removeHTTPWhitespace(input, true, true)
+
+ // 2. Let position be a position variable for input,
+ // initially pointing at the start of input.
+ const position = { position: 0 }
+
+ // 3. Let type be the result of collecting a sequence
+ // of code points that are not U+002F (/) from
+ // input, given position.
+ const type = collectASequenceOfCodePointsFast(
+ '/',
+ input,
+ position
+ )
+
+ // 4. If type is the empty string or does not solely
+ // contain HTTP token code points, then return failure.
+ // https://mimesniff.spec.whatwg.org/#http-token-code-point
+ if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) {
+ return 'failure'
+ }
+
+ // 5. If position is past the end of input, then return
+ // failure
+ if (position.position > input.length) {
+ return 'failure'
+ }
+
+ // 6. Advance position by 1. (This skips past U+002F (/).)
+ position.position++
+
+ // 7. Let subtype be the result of collecting a sequence of
+ // code points that are not U+003B (;) from input, given
+ // position.
+ let subtype = collectASequenceOfCodePointsFast(
+ ';',
+ input,
+ position
+ )
+
+ // 8. Remove any trailing HTTP whitespace from subtype.
+ subtype = removeHTTPWhitespace(subtype, false, true)
+
+ // 9. If subtype is the empty string or does not solely
+ // contain HTTP token code points, then return failure.
+ if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) {
+ return 'failure'
+ }
+
+ const typeLowercase = type.toLowerCase()
+ const subtypeLowercase = subtype.toLowerCase()
+
+ // 10. Let mimeType be a new MIME type record whose type
+ // is type, in ASCII lowercase, and subtype is subtype,
+ // in ASCII lowercase.
+ // https://mimesniff.spec.whatwg.org/#mime-type
+ const mimeType = {
+ type: typeLowercase,
+ subtype: subtypeLowercase,
+ /** @type {Map<string, string>} */
+ parameters: new Map(),
+ // https://mimesniff.spec.whatwg.org/#mime-type-essence
+ essence: `${typeLowercase}/${subtypeLowercase}`
+ }
+
+ // 11. While position is not past the end of input:
+ while (position.position < input.length) {
+ // 1. Advance position by 1. (This skips past U+003B (;).)
+ position.position++
+
+ // 2. Collect a sequence of code points that are HTTP
+ // whitespace from input given position.
+ collectASequenceOfCodePoints(
+ // https://fetch.spec.whatwg.org/#http-whitespace
+ char => HTTP_WHITESPACE_REGEX.test(char),
+ input,
+ position
+ )
+
+ // 3. Let parameterName be the result of collecting a
+ // sequence of code points that are not U+003B (;)
+ // or U+003D (=) from input, given position.
+ let parameterName = collectASequenceOfCodePoints(
+ (char) => char !== ';' && char !== '=',
+ input,
+ position
+ )
+
+ // 4. Set parameterName to parameterName, in ASCII
+ // lowercase.
+ parameterName = parameterName.toLowerCase()
+
+ // 5. If position is not past the end of input, then:
+ if (position.position < input.length) {
+ // 1. If the code point at position within input is
+ // U+003B (;), then continue.
+ if (input[position.position] === ';') {
+ continue
+ }
+
+ // 2. Advance position by 1. (This skips past U+003D (=).)
+ position.position++
+ }
+
+ // 6. If position is past the end of input, then break.
+ if (position.position > input.length) {
+ break
+ }
+
+ // 7. Let parameterValue be null.
+ let parameterValue = null
+
+ // 8. If the code point at position within input is
+ // U+0022 ("), then:
+ if (input[position.position] === '"') {
+ // 1. Set parameterValue to the result of collecting
+ // an HTTP quoted string from input, given position
+ // and the extract-value flag.
+ parameterValue = collectAnHTTPQuotedString(input, position, true)
+
+ // 2. Collect a sequence of code points that are not
+ // U+003B (;) from input, given position.
+ collectASequenceOfCodePointsFast(
+ ';',
+ input,
+ position
+ )
+
+ // 9. Otherwise:
+ } else {
+ // 1. Set parameterValue to the result of collecting
+ // a sequence of code points that are not U+003B (;)
+ // from input, given position.
+ parameterValue = collectASequenceOfCodePointsFast(
+ ';',
+ input,
+ position
+ )
+
+ // 2. Remove any trailing HTTP whitespace from parameterValue.
+ parameterValue = removeHTTPWhitespace(parameterValue, false, true)
+
+ // 3. If parameterValue is the empty string, then continue.
+ if (parameterValue.length === 0) {
+ continue
+ }
+ }
+
+ // 10. If all of the following are true
+ // - parameterName is not the empty string
+ // - parameterName solely contains HTTP token code points
+ // - parameterValue solely contains HTTP quoted-string token code points
+ // - mimeType’s parameters[parameterName] does not exist
+ // then set mimeType’s parameters[parameterName] to parameterValue.
+ if (
+ parameterName.length !== 0 &&
+ HTTP_TOKEN_CODEPOINTS.test(parameterName) &&
+ (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) &&
+ !mimeType.parameters.has(parameterName)
+ ) {
+ mimeType.parameters.set(parameterName, parameterValue)
+ }
+ }
+
+ // 12. Return mimeType.
+ return mimeType
+}
+
+// https://infra.spec.whatwg.org/#forgiving-base64-decode
+/** @param {string} data */
+function forgivingBase64 (data) {
+ // 1. Remove all ASCII whitespace from data.
+ data = data.replace(/[\u0009\u000A\u000C\u000D\u0020]/g, '') // eslint-disable-line
+
+ // 2. If data’s code point length divides by 4 leaving
+ // no remainder, then:
+ if (data.length % 4 === 0) {
+ // 1. If data ends with one or two U+003D (=) code points,
+ // then remove them from data.
+ data = data.replace(/=?=$/, '')
+ }
+
+ // 3. If data’s code point length divides by 4 leaving
+ // a remainder of 1, then return failure.
+ if (data.length % 4 === 1) {
+ return 'failure'
+ }
+
+ // 4. If data contains a code point that is not one of
+ // U+002B (+)
+ // U+002F (/)
+ // ASCII alphanumeric
+ // then return failure.
+ if (/[^+/0-9A-Za-z]/.test(data)) {
+ return 'failure'
+ }
+
+ const binary = atob(data)
+ const bytes = new Uint8Array(binary.length)
+
+ for (let byte = 0; byte < binary.length; byte++) {
+ bytes[byte] = binary.charCodeAt(byte)
+ }
+
+ return bytes
+}
+
+// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string
+// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string
+/**
+ * @param {string} input
+ * @param {{ position: number }} position
+ * @param {boolean?} extractValue
+ */
+function collectAnHTTPQuotedString (input, position, extractValue) {
+ // 1. Let positionStart be position.
+ const positionStart = position.position
+
+ // 2. Let value be the empty string.
+ let value = ''
+
+ // 3. Assert: the code point at position within input
+ // is U+0022 (").
+ assert(input[position.position] === '"')
+
+ // 4. Advance position by 1.
+ position.position++
+
+ // 5. While true:
+ while (true) {
+ // 1. Append the result of collecting a sequence of code points
+ // that are not U+0022 (") or U+005C (\) from input, given
+ // position, to value.
+ value += collectASequenceOfCodePoints(
+ (char) => char !== '"' && char !== '\\',
+ input,
+ position
+ )
+
+ // 2. If position is past the end of input, then break.
+ if (position.position >= input.length) {
+ break
+ }
+
+ // 3. Let quoteOrBackslash be the code point at position within
+ // input.
+ const quoteOrBackslash = input[position.position]
+
+ // 4. Advance position by 1.
+ position.position++
+
+ // 5. If quoteOrBackslash is U+005C (\), then:
+ if (quoteOrBackslash === '\\') {
+ // 1. If position is past the end of input, then append
+ // U+005C (\) to value and break.
+ if (position.position >= input.length) {
+ value += '\\'
+ break
+ }
+
+ // 2. Append the code point at position within input to value.
+ value += input[position.position]
+
+ // 3. Advance position by 1.
+ position.position++
+
+ // 6. Otherwise:
+ } else {
+ // 1. Assert: quoteOrBackslash is U+0022 (").
+ assert(quoteOrBackslash === '"')
+
+ // 2. Break.
+ break
+ }
+ }
+
+ // 6. If the extract-value flag is set, then return value.
+ if (extractValue) {
+ return value
+ }
+
+ // 7. Return the code points from positionStart to position,
+ // inclusive, within input.
+ return input.slice(positionStart, position.position)
+}
+
+/**
+ * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type
+ */
+function serializeAMimeType (mimeType) {
+ assert(mimeType !== 'failure')
+ const { parameters, essence } = mimeType
+
+ // 1. Let serialization be the concatenation of mimeType’s
+ // type, U+002F (/), and mimeType’s subtype.
+ let serialization = essence
+
+ // 2. For each name → value of mimeType’s parameters:
+ for (let [name, value] of parameters.entries()) {
+ // 1. Append U+003B (;) to serialization.
+ serialization += ';'
+
+ // 2. Append name to serialization.
+ serialization += name
+
+ // 3. Append U+003D (=) to serialization.
+ serialization += '='
+
+ // 4. If value does not solely contain HTTP token code
+ // points or value is the empty string, then:
+ if (!HTTP_TOKEN_CODEPOINTS.test(value)) {
+ // 1. Precede each occurence of U+0022 (") or
+ // U+005C (\) in value with U+005C (\).
+ value = value.replace(/(\\|")/g, '\\$1')
+
+ // 2. Prepend U+0022 (") to value.
+ value = '"' + value
+
+ // 3. Append U+0022 (") to value.
+ value += '"'
+ }
+
+ // 5. Append value to serialization.
+ serialization += value
+ }
+
+ // 3. Return serialization.
+ return serialization
+}
+
+/**
+ * @see https://fetch.spec.whatwg.org/#http-whitespace
+ * @param {string} char
+ */
+function isHTTPWhiteSpace (char) {
+ return char === '\r' || char === '\n' || char === '\t' || char === ' '
+}
+
+/**
+ * @see https://fetch.spec.whatwg.org/#http-whitespace
+ * @param {string} str
+ */
+function removeHTTPWhitespace (str, leading = true, trailing = true) {
+ let lead = 0
+ let trail = str.length - 1
+
+ if (leading) {
+ for (; lead < str.length && isHTTPWhiteSpace(str[lead]); lead++);
+ }
+
+ if (trailing) {
+ for (; trail > 0 && isHTTPWhiteSpace(str[trail]); trail--);
+ }
+
+ return str.slice(lead, trail + 1)
+}
+
+/**
+ * @see https://infra.spec.whatwg.org/#ascii-whitespace
+ * @param {string} char
+ */
+function isASCIIWhitespace (char) {
+ return char === '\r' || char === '\n' || char === '\t' || char === '\f' || char === ' '
+}
+
+/**
+ * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace
+ */
+function removeASCIIWhitespace (str, leading = true, trailing = true) {
+ let lead = 0
+ let trail = str.length - 1
+
+ if (leading) {
+ for (; lead < str.length && isASCIIWhitespace(str[lead]); lead++);
+ }
+
+ if (trailing) {
+ for (; trail > 0 && isASCIIWhitespace(str[trail]); trail--);
+ }
+
+ return str.slice(lead, trail + 1)
+}
+
+module.exports = {
+ dataURLProcessor,
+ URLSerializer,
+ collectASequenceOfCodePoints,
+ collectASequenceOfCodePointsFast,
+ stringPercentDecode,
+ parseMIMEType,
+ collectAnHTTPQuotedString,
+ serializeAMimeType
+}
diff --git a/node_modules/undici/lib/fetch/file.js b/node_modules/undici/lib/fetch/file.js
new file mode 100644
index 0000000..81bb7b2
--- /dev/null
+++ b/node_modules/undici/lib/fetch/file.js
@@ -0,0 +1,343 @@
+'use strict'
+
+const { Blob, File: NativeFile } = require('buffer')
+const { types } = require('util')
+const { kState } = require('./symbols')
+const { isBlobLike } = require('./util')
+const { webidl } = require('./webidl')
+const { parseMIMEType, serializeAMimeType } = require('./dataURL')
+const { kEnumerableProperty } = require('../core/util')
+
+class File extends Blob {
+ constructor (fileBits, fileName, options = {}) {
+ // The File constructor is invoked with two or three parameters, depending
+ // on whether the optional dictionary parameter is used. When the File()
+ // constructor is invoked, user agents must run the following steps:
+ webidl.argumentLengthCheck(arguments, 2, { header: 'File constructor' })
+
+ fileBits = webidl.converters['sequence<BlobPart>'](fileBits)
+ fileName = webidl.converters.USVString(fileName)
+ options = webidl.converters.FilePropertyBag(options)
+
+ // 1. Let bytes be the result of processing blob parts given fileBits and
+ // options.
+ // Note: Blob handles this for us
+
+ // 2. Let n be the fileName argument to the constructor.
+ const n = fileName
+
+ // 3. Process FilePropertyBag dictionary argument by running the following
+ // substeps:
+
+ // 1. If the type member is provided and is not the empty string, let t
+ // be set to the type dictionary member. If t contains any characters
+ // outside the range U+0020 to U+007E, then set t to the empty string
+ // and return from these substeps.
+ // 2. Convert every character in t to ASCII lowercase.
+ let t = options.type
+ let d
+
+ // eslint-disable-next-line no-labels
+ substep: {
+ if (t) {
+ t = parseMIMEType(t)
+
+ if (t === 'failure') {
+ t = ''
+ // eslint-disable-next-line no-labels
+ break substep
+ }
+
+ t = serializeAMimeType(t).toLowerCase()
+ }
+
+ // 3. If the lastModified member is provided, let d be set to the
+ // lastModified dictionary member. If it is not provided, set d to the
+ // current date and time represented as the number of milliseconds since
+ // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]).
+ d = options.lastModified
+ }
+
+ // 4. Return a new File object F such that:
+ // F refers to the bytes byte sequence.
+ // F.size is set to the number of total bytes in bytes.
+ // F.name is set to n.
+ // F.type is set to t.
+ // F.lastModified is set to d.
+
+ super(processBlobParts(fileBits, options), { type: t })
+ this[kState] = {
+ name: n,
+ lastModified: d,
+ type: t
+ }
+ }
+
+ get name () {
+ webidl.brandCheck(this, File)
+
+ return this[kState].name
+ }
+
+ get lastModified () {
+ webidl.brandCheck(this, File)
+
+ return this[kState].lastModified
+ }
+
+ get type () {
+ webidl.brandCheck(this, File)
+
+ return this[kState].type
+ }
+}
+
+class FileLike {
+ constructor (blobLike, fileName, options = {}) {
+ // TODO: argument idl type check
+
+ // The File constructor is invoked with two or three parameters, depending
+ // on whether the optional dictionary parameter is used. When the File()
+ // constructor is invoked, user agents must run the following steps:
+
+ // 1. Let bytes be the result of processing blob parts given fileBits and
+ // options.
+
+ // 2. Let n be the fileName argument to the constructor.
+ const n = fileName
+
+ // 3. Process FilePropertyBag dictionary argument by running the following
+ // substeps:
+
+ // 1. If the type member is provided and is not the empty string, let t
+ // be set to the type dictionary member. If t contains any characters
+ // outside the range U+0020 to U+007E, then set t to the empty string
+ // and return from these substeps.
+ // TODO
+ const t = options.type
+
+ // 2. Convert every character in t to ASCII lowercase.
+ // TODO
+
+ // 3. If the lastModified member is provided, let d be set to the
+ // lastModified dictionary member. If it is not provided, set d to the
+ // current date and time represented as the number of milliseconds since
+ // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]).
+ const d = options.lastModified ?? Date.now()
+
+ // 4. Return a new File object F such that:
+ // F refers to the bytes byte sequence.
+ // F.size is set to the number of total bytes in bytes.
+ // F.name is set to n.
+ // F.type is set to t.
+ // F.lastModified is set to d.
+
+ this[kState] = {
+ blobLike,
+ name: n,
+ type: t,
+ lastModified: d
+ }
+ }
+
+ stream (...args) {
+ webidl.brandCheck(this, FileLike)
+
+ return this[kState].blobLike.stream(...args)
+ }
+
+ arrayBuffer (...args) {
+ webidl.brandCheck(this, FileLike)
+
+ return this[kState].blobLike.arrayBuffer(...args)
+ }
+
+ slice (...args) {
+ webidl.brandCheck(this, FileLike)
+
+ return this[kState].blobLike.slice(...args)
+ }
+
+ text (...args) {
+ webidl.brandCheck(this, FileLike)
+
+ return this[kState].blobLike.text(...args)
+ }
+
+ get size () {
+ webidl.brandCheck(this, FileLike)
+
+ return this[kState].blobLike.size
+ }
+
+ get type () {
+ webidl.brandCheck(this, FileLike)
+
+ return this[kState].blobLike.type
+ }
+
+ get name () {
+ webidl.brandCheck(this, FileLike)
+
+ return this[kState].name
+ }
+
+ get lastModified () {
+ webidl.brandCheck(this, FileLike)
+
+ return this[kState].lastModified
+ }
+
+ get [Symbol.toStringTag] () {
+ return 'File'
+ }
+}
+
+Object.defineProperties(File.prototype, {
+ [Symbol.toStringTag]: {
+ value: 'File',
+ configurable: true
+ },
+ name: kEnumerableProperty,
+ lastModified: kEnumerableProperty
+})
+
+webidl.converters.Blob = webidl.interfaceConverter(Blob)
+
+webidl.converters.BlobPart = function (V, opts) {
+ if (webidl.util.Type(V) === 'Object') {
+ if (isBlobLike(V)) {
+ return webidl.converters.Blob(V, { strict: false })
+ }
+
+ if (
+ ArrayBuffer.isView(V) ||
+ types.isAnyArrayBuffer(V)
+ ) {
+ return webidl.converters.BufferSource(V, opts)
+ }
+ }
+
+ return webidl.converters.USVString(V, opts)
+}
+
+webidl.converters['sequence<BlobPart>'] = webidl.sequenceConverter(
+ webidl.converters.BlobPart
+)
+
+// https://www.w3.org/TR/FileAPI/#dfn-FilePropertyBag
+webidl.converters.FilePropertyBag = webidl.dictionaryConverter([
+ {
+ key: 'lastModified',
+ converter: webidl.converters['long long'],
+ get defaultValue () {
+ return Date.now()
+ }
+ },
+ {
+ key: 'type',
+ converter: webidl.converters.DOMString,
+ defaultValue: ''
+ },
+ {
+ key: 'endings',
+ converter: (value) => {
+ value = webidl.converters.DOMString(value)
+ value = value.toLowerCase()
+
+ if (value !== 'native') {
+ value = 'transparent'
+ }
+
+ return value
+ },
+ defaultValue: 'transparent'
+ }
+])
+
+/**
+ * @see https://www.w3.org/TR/FileAPI/#process-blob-parts
+ * @param {(NodeJS.TypedArray|Blob|string)[]} parts
+ * @param {{ type: string, endings: string }} options
+ */
+function processBlobParts (parts, options) {
+ // 1. Let bytes be an empty sequence of bytes.
+ /** @type {NodeJS.TypedArray[]} */
+ const bytes = []
+
+ // 2. For each element in parts:
+ for (const element of parts) {
+ // 1. If element is a USVString, run the following substeps:
+ if (typeof element === 'string') {
+ // 1. Let s be element.
+ let s = element
+
+ // 2. If the endings member of options is "native", set s
+ // to the result of converting line endings to native
+ // of element.
+ if (options.endings === 'native') {
+ s = convertLineEndingsNative(s)
+ }
+
+ // 3. Append the result of UTF-8 encoding s to bytes.
+ bytes.push(new TextEncoder().encode(s))
+ } else if (
+ types.isAnyArrayBuffer(element) ||
+ types.isTypedArray(element)
+ ) {
+ // 2. If element is a BufferSource, get a copy of the
+ // bytes held by the buffer source, and append those
+ // bytes to bytes.
+ if (!element.buffer) { // ArrayBuffer
+ bytes.push(new Uint8Array(element))
+ } else {
+ bytes.push(
+ new Uint8Array(element.buffer, element.byteOffset, element.byteLength)
+ )
+ }
+ } else if (isBlobLike(element)) {
+ // 3. If element is a Blob, append the bytes it represents
+ // to bytes.
+ bytes.push(element)
+ }
+ }
+
+ // 3. Return bytes.
+ return bytes
+}
+
+/**
+ * @see https://www.w3.org/TR/FileAPI/#convert-line-endings-to-native
+ * @param {string} s
+ */
+function convertLineEndingsNative (s) {
+ // 1. Let native line ending be be the code point U+000A LF.
+ let nativeLineEnding = '\n'
+
+ // 2. If the underlying platform’s conventions are to
+ // represent newlines as a carriage return and line feed
+ // sequence, set native line ending to the code point
+ // U+000D CR followed by the code point U+000A LF.
+ if (process.platform === 'win32') {
+ nativeLineEnding = '\r\n'
+ }
+
+ return s.replace(/\r?\n/g, nativeLineEnding)
+}
+
+// If this function is moved to ./util.js, some tools (such as
+// rollup) will warn about circular dependencies. See:
+// https://github.com/nodejs/undici/issues/1629
+function isFileLike (object) {
+ return (
+ (NativeFile && object instanceof NativeFile) ||
+ object instanceof File || (
+ object &&
+ (typeof object.stream === 'function' ||
+ typeof object.arrayBuffer === 'function') &&
+ object[Symbol.toStringTag] === 'File'
+ )
+ )
+}
+
+module.exports = { File, FileLike, isFileLike }
diff --git a/node_modules/undici/lib/fetch/formdata.js b/node_modules/undici/lib/fetch/formdata.js
new file mode 100644
index 0000000..5975e26
--- /dev/null
+++ b/node_modules/undici/lib/fetch/formdata.js
@@ -0,0 +1,265 @@
+'use strict'
+
+const { isBlobLike, toUSVString, makeIterator } = require('./util')
+const { kState } = require('./symbols')
+const { File: UndiciFile, FileLike, isFileLike } = require('./file')
+const { webidl } = require('./webidl')
+const { Blob, File: NativeFile } = require('buffer')
+
+/** @type {globalThis['File']} */
+const File = NativeFile ?? UndiciFile
+
+// https://xhr.spec.whatwg.org/#formdata
+class FormData {
+ constructor (form) {
+ if (form !== undefined) {
+ throw webidl.errors.conversionFailed({
+ prefix: 'FormData constructor',
+ argument: 'Argument 1',
+ types: ['undefined']
+ })
+ }
+
+ this[kState] = []
+ }
+
+ append (name, value, filename = undefined) {
+ webidl.brandCheck(this, FormData)
+
+ webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.append' })
+
+ if (arguments.length === 3 && !isBlobLike(value)) {
+ throw new TypeError(
+ "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'"
+ )
+ }
+
+ // 1. Let value be value if given; otherwise blobValue.
+
+ name = webidl.converters.USVString(name)
+ value = isBlobLike(value)
+ ? webidl.converters.Blob(value, { strict: false })
+ : webidl.converters.USVString(value)
+ filename = arguments.length === 3
+ ? webidl.converters.USVString(filename)
+ : undefined
+
+ // 2. Let entry be the result of creating an entry with
+ // name, value, and filename if given.
+ const entry = makeEntry(name, value, filename)
+
+ // 3. Append entry to this’s entry list.
+ this[kState].push(entry)
+ }
+
+ delete (name) {
+ webidl.brandCheck(this, FormData)
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.delete' })
+
+ name = webidl.converters.USVString(name)
+
+ // The delete(name) method steps are to remove all entries whose name
+ // is name from this’s entry list.
+ this[kState] = this[kState].filter(entry => entry.name !== name)
+ }
+
+ get (name) {
+ webidl.brandCheck(this, FormData)
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.get' })
+
+ name = webidl.converters.USVString(name)
+
+ // 1. If there is no entry whose name is name in this’s entry list,
+ // then return null.
+ const idx = this[kState].findIndex((entry) => entry.name === name)
+ if (idx === -1) {
+ return null
+ }
+
+ // 2. Return the value of the first entry whose name is name from
+ // this’s entry list.
+ return this[kState][idx].value
+ }
+
+ getAll (name) {
+ webidl.brandCheck(this, FormData)
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.getAll' })
+
+ name = webidl.converters.USVString(name)
+
+ // 1. If there is no entry whose name is name in this’s entry list,
+ // then return the empty list.
+ // 2. Return the values of all entries whose name is name, in order,
+ // from this’s entry list.
+ return this[kState]
+ .filter((entry) => entry.name === name)
+ .map((entry) => entry.value)
+ }
+
+ has (name) {
+ webidl.brandCheck(this, FormData)
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.has' })
+
+ name = webidl.converters.USVString(name)
+
+ // The has(name) method steps are to return true if there is an entry
+ // whose name is name in this’s entry list; otherwise false.
+ return this[kState].findIndex((entry) => entry.name === name) !== -1
+ }
+
+ set (name, value, filename = undefined) {
+ webidl.brandCheck(this, FormData)
+
+ webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.set' })
+
+ if (arguments.length === 3 && !isBlobLike(value)) {
+ throw new TypeError(
+ "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'"
+ )
+ }
+
+ // The set(name, value) and set(name, blobValue, filename) method steps
+ // are:
+
+ // 1. Let value be value if given; otherwise blobValue.
+
+ name = webidl.converters.USVString(name)
+ value = isBlobLike(value)
+ ? webidl.converters.Blob(value, { strict: false })
+ : webidl.converters.USVString(value)
+ filename = arguments.length === 3
+ ? toUSVString(filename)
+ : undefined
+
+ // 2. Let entry be the result of creating an entry with name, value, and
+ // filename if given.
+ const entry = makeEntry(name, value, filename)
+
+ // 3. If there are entries in this’s entry list whose name is name, then
+ // replace the first such entry with entry and remove the others.
+ const idx = this[kState].findIndex((entry) => entry.name === name)
+ if (idx !== -1) {
+ this[kState] = [
+ ...this[kState].slice(0, idx),
+ entry,
+ ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name)
+ ]
+ } else {
+ // 4. Otherwise, append entry to this’s entry list.
+ this[kState].push(entry)
+ }
+ }
+
+ entries () {
+ webidl.brandCheck(this, FormData)
+
+ return makeIterator(
+ () => this[kState].map(pair => [pair.name, pair.value]),
+ 'FormData',
+ 'key+value'
+ )
+ }
+
+ keys () {
+ webidl.brandCheck(this, FormData)
+
+ return makeIterator(
+ () => this[kState].map(pair => [pair.name, pair.value]),
+ 'FormData',
+ 'key'
+ )
+ }
+
+ values () {
+ webidl.brandCheck(this, FormData)
+
+ return makeIterator(
+ () => this[kState].map(pair => [pair.name, pair.value]),
+ 'FormData',
+ 'value'
+ )
+ }
+
+ /**
+ * @param {(value: string, key: string, self: FormData) => void} callbackFn
+ * @param {unknown} thisArg
+ */
+ forEach (callbackFn, thisArg = globalThis) {
+ webidl.brandCheck(this, FormData)
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.forEach' })
+
+ if (typeof callbackFn !== 'function') {
+ throw new TypeError(
+ "Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'."
+ )
+ }
+
+ for (const [key, value] of this) {
+ callbackFn.apply(thisArg, [value, key, this])
+ }
+ }
+}
+
+FormData.prototype[Symbol.iterator] = FormData.prototype.entries
+
+Object.defineProperties(FormData.prototype, {
+ [Symbol.toStringTag]: {
+ value: 'FormData',
+ configurable: true
+ }
+})
+
+/**
+ * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry
+ * @param {string} name
+ * @param {string|Blob} value
+ * @param {?string} filename
+ * @returns
+ */
+function makeEntry (name, value, filename) {
+ // 1. Set name to the result of converting name into a scalar value string.
+ // "To convert a string into a scalar value string, replace any surrogates
+ // with U+FFFD."
+ // see: https://nodejs.org/dist/latest-v18.x/docs/api/buffer.html#buftostringencoding-start-end
+ name = Buffer.from(name).toString('utf8')
+
+ // 2. If value is a string, then set value to the result of converting
+ // value into a scalar value string.
+ if (typeof value === 'string') {
+ value = Buffer.from(value).toString('utf8')
+ } else {
+ // 3. Otherwise:
+
+ // 1. If value is not a File object, then set value to a new File object,
+ // representing the same bytes, whose name attribute value is "blob"
+ if (!isFileLike(value)) {
+ value = value instanceof Blob
+ ? new File([value], 'blob', { type: value.type })
+ : new FileLike(value, 'blob', { type: value.type })
+ }
+
+ // 2. If filename is given, then set value to a new File object,
+ // representing the same bytes, whose name attribute is filename.
+ if (filename !== undefined) {
+ /** @type {FilePropertyBag} */
+ const options = {
+ type: value.type,
+ lastModified: value.lastModified
+ }
+
+ value = (NativeFile && value instanceof NativeFile) || value instanceof UndiciFile
+ ? new File([value], filename, options)
+ : new FileLike(value, filename, options)
+ }
+ }
+
+ // 4. Return an entry whose name is name and whose value is value.
+ return { name, value }
+}
+
+module.exports = { FormData }
diff --git a/node_modules/undici/lib/fetch/global.js b/node_modules/undici/lib/fetch/global.js
new file mode 100644
index 0000000..42282ac
--- /dev/null
+++ b/node_modules/undici/lib/fetch/global.js
@@ -0,0 +1,48 @@
+'use strict'
+
+// In case of breaking changes, increase the version
+// number to avoid conflicts.
+const globalOrigin = Symbol.for('undici.globalOrigin.1')
+
+function getGlobalOrigin () {
+ return globalThis[globalOrigin]
+}
+
+function setGlobalOrigin (newOrigin) {
+ if (
+ newOrigin !== undefined &&
+ typeof newOrigin !== 'string' &&
+ !(newOrigin instanceof URL)
+ ) {
+ throw new Error('Invalid base url')
+ }
+
+ if (newOrigin === undefined) {
+ Object.defineProperty(globalThis, globalOrigin, {
+ value: undefined,
+ writable: true,
+ enumerable: false,
+ configurable: false
+ })
+
+ return
+ }
+
+ const parsedURL = new URL(newOrigin)
+
+ if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') {
+ throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`)
+ }
+
+ Object.defineProperty(globalThis, globalOrigin, {
+ value: parsedURL,
+ writable: true,
+ enumerable: false,
+ configurable: false
+ })
+}
+
+module.exports = {
+ getGlobalOrigin,
+ setGlobalOrigin
+}
diff --git a/node_modules/undici/lib/fetch/headers.js b/node_modules/undici/lib/fetch/headers.js
new file mode 100644
index 0000000..aa5e73e
--- /dev/null
+++ b/node_modules/undici/lib/fetch/headers.js
@@ -0,0 +1,552 @@
+// https://github.com/Ethan-Arrowood/undici-fetch
+
+'use strict'
+
+const { kHeadersList } = require('../core/symbols')
+const { kGuard } = require('./symbols')
+const { kEnumerableProperty } = require('../core/util')
+const {
+ makeIterator,
+ isValidHeaderName,
+ isValidHeaderValue
+} = require('./util')
+const { webidl } = require('./webidl')
+const assert = require('assert')
+
+const kHeadersMap = Symbol('headers map')
+const kHeadersSortedMap = Symbol('headers map sorted')
+
+/**
+ * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize
+ * @param {string} potentialValue
+ */
+function headerValueNormalize (potentialValue) {
+ // To normalize a byte sequence potentialValue, remove
+ // any leading and trailing HTTP whitespace bytes from
+ // potentialValue.
+
+ // Trimming the end with `.replace()` and a RegExp is typically subject to
+ // ReDoS. This is safer and faster.
+ let i = potentialValue.length
+ while (/[\r\n\t ]/.test(potentialValue.charAt(--i)));
+ return potentialValue.slice(0, i + 1).replace(/^[\r\n\t ]+/, '')
+}
+
+function fill (headers, object) {
+ // To fill a Headers object headers with a given object object, run these steps:
+
+ // 1. If object is a sequence, then for each header in object:
+ // Note: webidl conversion to array has already been done.
+ if (Array.isArray(object)) {
+ for (const header of object) {
+ // 1. If header does not contain exactly two items, then throw a TypeError.
+ if (header.length !== 2) {
+ throw webidl.errors.exception({
+ header: 'Headers constructor',
+ message: `expected name/value pair to be length 2, found ${header.length}.`
+ })
+ }
+
+ // 2. Append (header’s first item, header’s second item) to headers.
+ headers.append(header[0], header[1])
+ }
+ } else if (typeof object === 'object' && object !== null) {
+ // Note: null should throw
+
+ // 2. Otherwise, object is a record, then for each key → value in object,
+ // append (key, value) to headers
+ for (const [key, value] of Object.entries(object)) {
+ headers.append(key, value)
+ }
+ } else {
+ throw webidl.errors.conversionFailed({
+ prefix: 'Headers constructor',
+ argument: 'Argument 1',
+ types: ['sequence<sequence<ByteString>>', 'record<ByteString, ByteString>']
+ })
+ }
+}
+
+class HeadersList {
+ /** @type {[string, string][]|null} */
+ cookies = null
+
+ constructor (init) {
+ if (init instanceof HeadersList) {
+ this[kHeadersMap] = new Map(init[kHeadersMap])
+ this[kHeadersSortedMap] = init[kHeadersSortedMap]
+ this.cookies = init.cookies
+ } else {
+ this[kHeadersMap] = new Map(init)
+ this[kHeadersSortedMap] = null
+ }
+ }
+
+ // https://fetch.spec.whatwg.org/#header-list-contains
+ contains (name) {
+ // A header list list contains a header name name if list
+ // contains a header whose name is a byte-case-insensitive
+ // match for name.
+ name = name.toLowerCase()
+
+ return this[kHeadersMap].has(name)
+ }
+
+ clear () {
+ this[kHeadersMap].clear()
+ this[kHeadersSortedMap] = null
+ this.cookies = null
+ }
+
+ // https://fetch.spec.whatwg.org/#concept-header-list-append
+ append (name, value) {
+ this[kHeadersSortedMap] = null
+
+ // 1. If list contains name, then set name to the first such
+ // header’s name.
+ const lowercaseName = name.toLowerCase()
+ const exists = this[kHeadersMap].get(lowercaseName)
+
+ // 2. Append (name, value) to list.
+ if (exists) {
+ const delimiter = lowercaseName === 'cookie' ? '; ' : ', '
+ this[kHeadersMap].set(lowercaseName, {
+ name: exists.name,
+ value: `${exists.value}${delimiter}${value}`
+ })
+ } else {
+ this[kHeadersMap].set(lowercaseName, { name, value })
+ }
+
+ if (lowercaseName === 'set-cookie') {
+ this.cookies ??= []
+ this.cookies.push(value)
+ }
+ }
+
+ // https://fetch.spec.whatwg.org/#concept-header-list-set
+ set (name, value) {
+ this[kHeadersSortedMap] = null
+ const lowercaseName = name.toLowerCase()
+
+ if (lowercaseName === 'set-cookie') {
+ this.cookies = [value]
+ }
+
+ // 1. If list contains name, then set the value of
+ // the first such header to value and remove the
+ // others.
+ // 2. Otherwise, append header (name, value) to list.
+ return this[kHeadersMap].set(lowercaseName, { name, value })
+ }
+
+ // https://fetch.spec.whatwg.org/#concept-header-list-delete
+ delete (name) {
+ this[kHeadersSortedMap] = null
+
+ name = name.toLowerCase()
+
+ if (name === 'set-cookie') {
+ this.cookies = null
+ }
+
+ return this[kHeadersMap].delete(name)
+ }
+
+ // https://fetch.spec.whatwg.org/#concept-header-list-get
+ get (name) {
+ // 1. If list does not contain name, then return null.
+ if (!this.contains(name)) {
+ return null
+ }
+
+ // 2. Return the values of all headers in list whose name
+ // is a byte-case-insensitive match for name,
+ // separated from each other by 0x2C 0x20, in order.
+ return this[kHeadersMap].get(name.toLowerCase())?.value ?? null
+ }
+
+ * [Symbol.iterator] () {
+ // use the lowercased name
+ for (const [name, { value }] of this[kHeadersMap]) {
+ yield [name, value]
+ }
+ }
+
+ get entries () {
+ const headers = {}
+
+ if (this[kHeadersMap].size) {
+ for (const { name, value } of this[kHeadersMap].values()) {
+ headers[name] = value
+ }
+ }
+
+ return headers
+ }
+}
+
+// https://fetch.spec.whatwg.org/#headers-class
+class Headers {
+ constructor (init = undefined) {
+ this[kHeadersList] = new HeadersList()
+
+ // The new Headers(init) constructor steps are:
+
+ // 1. Set this’s guard to "none".
+ this[kGuard] = 'none'
+
+ // 2. If init is given, then fill this with init.
+ if (init !== undefined) {
+ init = webidl.converters.HeadersInit(init)
+ fill(this, init)
+ }
+ }
+
+ // https://fetch.spec.whatwg.org/#dom-headers-append
+ append (name, value) {
+ webidl.brandCheck(this, Headers)
+
+ webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.append' })
+
+ name = webidl.converters.ByteString(name)
+ value = webidl.converters.ByteString(value)
+
+ // 1. Normalize value.
+ value = headerValueNormalize(value)
+
+ // 2. If name is not a header name or value is not a
+ // header value, then throw a TypeError.
+ if (!isValidHeaderName(name)) {
+ throw webidl.errors.invalidArgument({
+ prefix: 'Headers.append',
+ value: name,
+ type: 'header name'
+ })
+ } else if (!isValidHeaderValue(value)) {
+ throw webidl.errors.invalidArgument({
+ prefix: 'Headers.append',
+ value,
+ type: 'header value'
+ })
+ }
+
+ // 3. If headers’s guard is "immutable", then throw a TypeError.
+ // 4. Otherwise, if headers’s guard is "request" and name is a
+ // forbidden header name, return.
+ // Note: undici does not implement forbidden header names
+ if (this[kGuard] === 'immutable') {
+ throw new TypeError('immutable')
+ } else if (this[kGuard] === 'request-no-cors') {
+ // 5. Otherwise, if headers’s guard is "request-no-cors":
+ // TODO
+ }
+
+ // 6. Otherwise, if headers’s guard is "response" and name is a
+ // forbidden response-header name, return.
+
+ // 7. Append (name, value) to headers’s header list.
+ // 8. If headers’s guard is "request-no-cors", then remove
+ // privileged no-CORS request headers from headers
+ return this[kHeadersList].append(name, value)
+ }
+
+ // https://fetch.spec.whatwg.org/#dom-headers-delete
+ delete (name) {
+ webidl.brandCheck(this, Headers)
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.delete' })
+
+ name = webidl.converters.ByteString(name)
+
+ // 1. If name is not a header name, then throw a TypeError.
+ if (!isValidHeaderName(name)) {
+ throw webidl.errors.invalidArgument({
+ prefix: 'Headers.delete',
+ value: name,
+ type: 'header name'
+ })
+ }
+
+ // 2. If this’s guard is "immutable", then throw a TypeError.
+ // 3. Otherwise, if this’s guard is "request" and name is a
+ // forbidden header name, return.
+ // 4. Otherwise, if this’s guard is "request-no-cors", name
+ // is not a no-CORS-safelisted request-header name, and
+ // name is not a privileged no-CORS request-header name,
+ // return.
+ // 5. Otherwise, if this’s guard is "response" and name is
+ // a forbidden response-header name, return.
+ // Note: undici does not implement forbidden header names
+ if (this[kGuard] === 'immutable') {
+ throw new TypeError('immutable')
+ } else if (this[kGuard] === 'request-no-cors') {
+ // TODO
+ }
+
+ // 6. If this’s header list does not contain name, then
+ // return.
+ if (!this[kHeadersList].contains(name)) {
+ return
+ }
+
+ // 7. Delete name from this’s header list.
+ // 8. If this’s guard is "request-no-cors", then remove
+ // privileged no-CORS request headers from this.
+ return this[kHeadersList].delete(name)
+ }
+
+ // https://fetch.spec.whatwg.org/#dom-headers-get
+ get (name) {
+ webidl.brandCheck(this, Headers)
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.get' })
+
+ name = webidl.converters.ByteString(name)
+
+ // 1. If name is not a header name, then throw a TypeError.
+ if (!isValidHeaderName(name)) {
+ throw webidl.errors.invalidArgument({
+ prefix: 'Headers.get',
+ value: name,
+ type: 'header name'
+ })
+ }
+
+ // 2. Return the result of getting name from this’s header
+ // list.
+ return this[kHeadersList].get(name)
+ }
+
+ // https://fetch.spec.whatwg.org/#dom-headers-has
+ has (name) {
+ webidl.brandCheck(this, Headers)
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.has' })
+
+ name = webidl.converters.ByteString(name)
+
+ // 1. If name is not a header name, then throw a TypeError.
+ if (!isValidHeaderName(name)) {
+ throw webidl.errors.invalidArgument({
+ prefix: 'Headers.has',
+ value: name,
+ type: 'header name'
+ })
+ }
+
+ // 2. Return true if this’s header list contains name;
+ // otherwise false.
+ return this[kHeadersList].contains(name)
+ }
+
+ // https://fetch.spec.whatwg.org/#dom-headers-set
+ set (name, value) {
+ webidl.brandCheck(this, Headers)
+
+ webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.set' })
+
+ name = webidl.converters.ByteString(name)
+ value = webidl.converters.ByteString(value)
+
+ // 1. Normalize value.
+ value = headerValueNormalize(value)
+
+ // 2. If name is not a header name or value is not a
+ // header value, then throw a TypeError.
+ if (!isValidHeaderName(name)) {
+ throw webidl.errors.invalidArgument({
+ prefix: 'Headers.set',
+ value: name,
+ type: 'header name'
+ })
+ } else if (!isValidHeaderValue(value)) {
+ throw webidl.errors.invalidArgument({
+ prefix: 'Headers.set',
+ value,
+ type: 'header value'
+ })
+ }
+
+ // 3. If this’s guard is "immutable", then throw a TypeError.
+ // 4. Otherwise, if this’s guard is "request" and name is a
+ // forbidden header name, return.
+ // 5. Otherwise, if this’s guard is "request-no-cors" and
+ // name/value is not a no-CORS-safelisted request-header,
+ // return.
+ // 6. Otherwise, if this’s guard is "response" and name is a
+ // forbidden response-header name, return.
+ // Note: undici does not implement forbidden header names
+ if (this[kGuard] === 'immutable') {
+ throw new TypeError('immutable')
+ } else if (this[kGuard] === 'request-no-cors') {
+ // TODO
+ }
+
+ // 7. Set (name, value) in this’s header list.
+ // 8. If this’s guard is "request-no-cors", then remove
+ // privileged no-CORS request headers from this
+ return this[kHeadersList].set(name, value)
+ }
+
+ // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie
+ getSetCookie () {
+ webidl.brandCheck(this, Headers)
+
+ // 1. If this’s header list does not contain `Set-Cookie`, then return « ».
+ // 2. Return the values of all headers in this’s header list whose name is
+ // a byte-case-insensitive match for `Set-Cookie`, in order.
+
+ const list = this[kHeadersList].cookies
+
+ if (list) {
+ return [...list]
+ }
+
+ return []
+ }
+
+ // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine
+ get [kHeadersSortedMap] () {
+ if (this[kHeadersList][kHeadersSortedMap]) {
+ return this[kHeadersList][kHeadersSortedMap]
+ }
+
+ // 1. Let headers be an empty list of headers with the key being the name
+ // and value the value.
+ const headers = []
+
+ // 2. Let names be the result of convert header names to a sorted-lowercase
+ // set with all the names of the headers in list.
+ const names = [...this[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1)
+ const cookies = this[kHeadersList].cookies
+
+ // 3. For each name of names:
+ for (const [name, value] of names) {
+ // 1. If name is `set-cookie`, then:
+ if (name === 'set-cookie') {
+ // 1. Let values be a list of all values of headers in list whose name
+ // is a byte-case-insensitive match for name, in order.
+
+ // 2. For each value of values:
+ // 1. Append (name, value) to headers.
+ for (const value of cookies) {
+ headers.push([name, value])
+ }
+ } else {
+ // 2. Otherwise:
+
+ // 1. Let value be the result of getting name from list.
+
+ // 2. Assert: value is non-null.
+ assert(value !== null)
+
+ // 3. Append (name, value) to headers.
+ headers.push([name, value])
+ }
+ }
+
+ this[kHeadersList][kHeadersSortedMap] = headers
+
+ // 4. Return headers.
+ return headers
+ }
+
+ keys () {
+ webidl.brandCheck(this, Headers)
+
+ return makeIterator(
+ () => [...this[kHeadersSortedMap].values()],
+ 'Headers',
+ 'key'
+ )
+ }
+
+ values () {
+ webidl.brandCheck(this, Headers)
+
+ return makeIterator(
+ () => [...this[kHeadersSortedMap].values()],
+ 'Headers',
+ 'value'
+ )
+ }
+
+ entries () {
+ webidl.brandCheck(this, Headers)
+
+ return makeIterator(
+ () => [...this[kHeadersSortedMap].values()],
+ 'Headers',
+ 'key+value'
+ )
+ }
+
+ /**
+ * @param {(value: string, key: string, self: Headers) => void} callbackFn
+ * @param {unknown} thisArg
+ */
+ forEach (callbackFn, thisArg = globalThis) {
+ webidl.brandCheck(this, Headers)
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.forEach' })
+
+ if (typeof callbackFn !== 'function') {
+ throw new TypeError(
+ "Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'."
+ )
+ }
+
+ for (const [key, value] of this) {
+ callbackFn.apply(thisArg, [value, key, this])
+ }
+ }
+
+ [Symbol.for('nodejs.util.inspect.custom')] () {
+ webidl.brandCheck(this, Headers)
+
+ return this[kHeadersList]
+ }
+}
+
+Headers.prototype[Symbol.iterator] = Headers.prototype.entries
+
+Object.defineProperties(Headers.prototype, {
+ append: kEnumerableProperty,
+ delete: kEnumerableProperty,
+ get: kEnumerableProperty,
+ has: kEnumerableProperty,
+ set: kEnumerableProperty,
+ getSetCookie: kEnumerableProperty,
+ keys: kEnumerableProperty,
+ values: kEnumerableProperty,
+ entries: kEnumerableProperty,
+ forEach: kEnumerableProperty,
+ [Symbol.iterator]: { enumerable: false },
+ [Symbol.toStringTag]: {
+ value: 'Headers',
+ configurable: true
+ }
+})
+
+webidl.converters.HeadersInit = function (V) {
+ if (webidl.util.Type(V) === 'Object') {
+ if (V[Symbol.iterator]) {
+ return webidl.converters['sequence<sequence<ByteString>>'](V)
+ }
+
+ return webidl.converters['record<ByteString, ByteString>'](V)
+ }
+
+ throw webidl.errors.conversionFailed({
+ prefix: 'Headers constructor',
+ argument: 'Argument 1',
+ types: ['sequence<sequence<ByteString>>', 'record<ByteString, ByteString>']
+ })
+}
+
+module.exports = {
+ fill,
+ Headers,
+ HeadersList
+}
diff --git a/node_modules/undici/lib/fetch/index.js b/node_modules/undici/lib/fetch/index.js
new file mode 100644
index 0000000..5199873
--- /dev/null
+++ b/node_modules/undici/lib/fetch/index.js
@@ -0,0 +1,2112 @@
+// https://github.com/Ethan-Arrowood/undici-fetch
+
+'use strict'
+
+const {
+ Response,
+ makeNetworkError,
+ makeAppropriateNetworkError,
+ filterResponse,
+ makeResponse
+} = require('./response')
+const { Headers } = require('./headers')
+const { Request, makeRequest } = require('./request')
+const zlib = require('zlib')
+const {
+ bytesMatch,
+ makePolicyContainer,
+ clonePolicyContainer,
+ requestBadPort,
+ TAOCheck,
+ appendRequestOriginHeader,
+ responseLocationURL,
+ requestCurrentURL,
+ setRequestReferrerPolicyOnRedirect,
+ tryUpgradeRequestToAPotentiallyTrustworthyURL,
+ createOpaqueTimingInfo,
+ appendFetchMetadata,
+ corsCheck,
+ crossOriginResourcePolicyCheck,
+ determineRequestsReferrer,
+ coarsenedSharedCurrentTime,
+ createDeferredPromise,
+ isBlobLike,
+ sameOrigin,
+ isCancelled,
+ isAborted,
+ isErrorLike,
+ fullyReadBody,
+ readableStreamClose,
+ isomorphicEncode,
+ urlIsLocal,
+ urlIsHttpHttpsScheme,
+ urlHasHttpsScheme
+} = require('./util')
+const { kState, kHeaders, kGuard, kRealm } = require('./symbols')
+const assert = require('assert')
+const { safelyExtractBody } = require('./body')
+const {
+ redirectStatus,
+ nullBodyStatus,
+ safeMethods,
+ requestBodyHeader,
+ subresource,
+ DOMException
+} = require('./constants')
+const { kHeadersList } = require('../core/symbols')
+const EE = require('events')
+const { Readable, pipeline } = require('stream')
+const { isErrored, isReadable, nodeMajor, nodeMinor } = require('../core/util')
+const { dataURLProcessor, serializeAMimeType } = require('./dataURL')
+const { TransformStream } = require('stream/web')
+const { getGlobalDispatcher } = require('../global')
+const { webidl } = require('./webidl')
+const { STATUS_CODES } = require('http')
+
+/** @type {import('buffer').resolveObjectURL} */
+let resolveObjectURL
+let ReadableStream = globalThis.ReadableStream
+
+class Fetch extends EE {
+ constructor (dispatcher) {
+ super()
+
+ this.dispatcher = dispatcher
+ this.connection = null
+ this.dump = false
+ this.state = 'ongoing'
+ // 2 terminated listeners get added per request,
+ // but only 1 gets removed. If there are 20 redirects,
+ // 21 listeners will be added.
+ // See https://github.com/nodejs/undici/issues/1711
+ // TODO (fix): Find and fix root cause for leaked listener.
+ this.setMaxListeners(21)
+ }
+
+ terminate (reason) {
+ if (this.state !== 'ongoing') {
+ return
+ }
+
+ this.state = 'terminated'
+ this.connection?.destroy(reason)
+ this.emit('terminated', reason)
+ }
+
+ // https://fetch.spec.whatwg.org/#fetch-controller-abort
+ abort (error) {
+ if (this.state !== 'ongoing') {
+ return
+ }
+
+ // 1. Set controller’s state to "aborted".
+ this.state = 'aborted'
+
+ // 2. Let fallbackError be an "AbortError" DOMException.
+ // 3. Set error to fallbackError if it is not given.
+ if (!error) {
+ error = new DOMException('The operation was aborted.', 'AbortError')
+ }
+
+ // 4. Let serializedError be StructuredSerialize(error).
+ // If that threw an exception, catch it, and let
+ // serializedError be StructuredSerialize(fallbackError).
+
+ // 5. Set controller’s serialized abort reason to serializedError.
+ this.serializedAbortReason = error
+
+ this.connection?.destroy(error)
+ this.emit('terminated', error)
+ }
+}
+
+// https://fetch.spec.whatwg.org/#fetch-method
+async function fetch (input, init = {}) {
+ webidl.argumentLengthCheck(arguments, 1, { header: 'globalThis.fetch' })
+
+ // 1. Let p be a new promise.
+ const p = createDeferredPromise()
+
+ // 2. Let requestObject be the result of invoking the initial value of
+ // Request as constructor with input and init as arguments. If this throws
+ // an exception, reject p with it and return p.
+ let requestObject
+
+ try {
+ requestObject = new Request(input, init)
+ } catch (e) {
+ p.reject(e)
+ return p.promise
+ }
+
+ // 3. Let request be requestObject’s request.
+ const request = requestObject[kState]
+
+ // 4. If requestObject’s signal’s aborted flag is set, then:
+ if (requestObject.signal.aborted) {
+ // 1. Abort the fetch() call with p, request, null, and
+ // requestObject’s signal’s abort reason.
+ abortFetch(p, request, null, requestObject.signal.reason)
+
+ // 2. Return p.
+ return p.promise
+ }
+
+ // 5. Let globalObject be request’s client’s global object.
+ const globalObject = request.client.globalObject
+
+ // 6. If globalObject is a ServiceWorkerGlobalScope object, then set
+ // request’s service-workers mode to "none".
+ if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') {
+ request.serviceWorkers = 'none'
+ }
+
+ // 7. Let responseObject be null.
+ let responseObject = null
+
+ // 8. Let relevantRealm be this’s relevant Realm.
+ const relevantRealm = null
+
+ // 9. Let locallyAborted be false.
+ let locallyAborted = false
+
+ // 10. Let controller be null.
+ let controller = null
+
+ // 11. Add the following abort steps to requestObject’s signal:
+ requestObject.signal.addEventListener(
+ 'abort',
+ () => {
+ // 1. Set locallyAborted to true.
+ locallyAborted = true
+
+ // 2. Abort the fetch() call with p, request, responseObject,
+ // and requestObject’s signal’s abort reason.
+ abortFetch(p, request, responseObject, requestObject.signal.reason)
+
+ // 3. If controller is not null, then abort controller.
+ if (controller != null) {
+ controller.abort()
+ }
+ },
+ { once: true }
+ )
+
+ // 12. Let handleFetchDone given response response be to finalize and
+ // report timing with response, globalObject, and "fetch".
+ const handleFetchDone = (response) =>
+ finalizeAndReportTiming(response, 'fetch')
+
+ // 13. Set controller to the result of calling fetch given request,
+ // with processResponseEndOfBody set to handleFetchDone, and processResponse
+ // given response being these substeps:
+
+ const processResponse = (response) => {
+ // 1. If locallyAborted is true, terminate these substeps.
+ if (locallyAborted) {
+ return
+ }
+
+ // 2. If response’s aborted flag is set, then:
+ if (response.aborted) {
+ // 1. Let deserializedError be the result of deserialize a serialized
+ // abort reason given controller’s serialized abort reason and
+ // relevantRealm.
+
+ // 2. Abort the fetch() call with p, request, responseObject, and
+ // deserializedError.
+
+ abortFetch(p, request, responseObject, controller.serializedAbortReason)
+ return
+ }
+
+ // 3. If response is a network error, then reject p with a TypeError
+ // and terminate these substeps.
+ if (response.type === 'error') {
+ p.reject(
+ Object.assign(new TypeError('fetch failed'), { cause: response.error })
+ )
+ return
+ }
+
+ // 4. Set responseObject to the result of creating a Response object,
+ // given response, "immutable", and relevantRealm.
+ responseObject = new Response()
+ responseObject[kState] = response
+ responseObject[kRealm] = relevantRealm
+ responseObject[kHeaders][kHeadersList] = response.headersList
+ responseObject[kHeaders][kGuard] = 'immutable'
+ responseObject[kHeaders][kRealm] = relevantRealm
+
+ // 5. Resolve p with responseObject.
+ p.resolve(responseObject)
+ }
+
+ controller = fetching({
+ request,
+ processResponseEndOfBody: handleFetchDone,
+ processResponse,
+ dispatcher: init.dispatcher ?? getGlobalDispatcher() // undici
+ })
+
+ // 14. Return p.
+ return p.promise
+}
+
+// https://fetch.spec.whatwg.org/#finalize-and-report-timing
+function finalizeAndReportTiming (response, initiatorType = 'other') {
+ // 1. If response is an aborted network error, then return.
+ if (response.type === 'error' && response.aborted) {
+ return
+ }
+
+ // 2. If response’s URL list is null or empty, then return.
+ if (!response.urlList?.length) {
+ return
+ }
+
+ // 3. Let originalURL be response’s URL list[0].
+ const originalURL = response.urlList[0]
+
+ // 4. Let timingInfo be response’s timing info.
+ let timingInfo = response.timingInfo
+
+ // 5. Let cacheState be response’s cache state.
+ let cacheState = response.cacheState
+
+ // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return.
+ if (!urlIsHttpHttpsScheme(originalURL)) {
+ return
+ }
+
+ // 7. If timingInfo is null, then return.
+ if (timingInfo === null) {
+ return
+ }
+
+ // 8. If response’s timing allow passed flag is not set, then:
+ if (!timingInfo.timingAllowPassed) {
+ // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo.
+ timingInfo = createOpaqueTimingInfo({
+ startTime: timingInfo.startTime
+ })
+
+ // 2. Set cacheState to the empty string.
+ cacheState = ''
+ }
+
+ // 9. Set timingInfo’s end time to the coarsened shared current time
+ // given global’s relevant settings object’s cross-origin isolated
+ // capability.
+ // TODO: given global’s relevant settings object’s cross-origin isolated
+ // capability?
+ timingInfo.endTime = coarsenedSharedCurrentTime()
+
+ // 10. Set response’s timing info to timingInfo.
+ response.timingInfo = timingInfo
+
+ // 11. Mark resource timing for timingInfo, originalURL, initiatorType,
+ // global, and cacheState.
+ markResourceTiming(
+ timingInfo,
+ originalURL,
+ initiatorType,
+ globalThis,
+ cacheState
+ )
+}
+
+// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing
+function markResourceTiming (timingInfo, originalURL, initiatorType, globalThis, cacheState) {
+ if (nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 2)) {
+ performance.markResourceTiming(timingInfo, originalURL, initiatorType, globalThis, cacheState)
+ }
+}
+
+// https://fetch.spec.whatwg.org/#abort-fetch
+function abortFetch (p, request, responseObject, error) {
+ // Note: AbortSignal.reason was added in node v17.2.0
+ // which would give us an undefined error to reject with.
+ // Remove this once node v16 is no longer supported.
+ if (!error) {
+ error = new DOMException('The operation was aborted.', 'AbortError')
+ }
+
+ // 1. Reject promise with error.
+ p.reject(error)
+
+ // 2. If request’s body is not null and is readable, then cancel request’s
+ // body with error.
+ if (request.body != null && isReadable(request.body?.stream)) {
+ request.body.stream.cancel(error).catch((err) => {
+ if (err.code === 'ERR_INVALID_STATE') {
+ // Node bug?
+ return
+ }
+ throw err
+ })
+ }
+
+ // 3. If responseObject is null, then return.
+ if (responseObject == null) {
+ return
+ }
+
+ // 4. Let response be responseObject’s response.
+ const response = responseObject[kState]
+
+ // 5. If response’s body is not null and is readable, then error response’s
+ // body with error.
+ if (response.body != null && isReadable(response.body?.stream)) {
+ response.body.stream.cancel(error).catch((err) => {
+ if (err.code === 'ERR_INVALID_STATE') {
+ // Node bug?
+ return
+ }
+ throw err
+ })
+ }
+}
+
+// https://fetch.spec.whatwg.org/#fetching
+function fetching ({
+ request,
+ processRequestBodyChunkLength,
+ processRequestEndOfBody,
+ processResponse,
+ processResponseEndOfBody,
+ processResponseConsumeBody,
+ useParallelQueue = false,
+ dispatcher // undici
+}) {
+ // 1. Let taskDestination be null.
+ let taskDestination = null
+
+ // 2. Let crossOriginIsolatedCapability be false.
+ let crossOriginIsolatedCapability = false
+
+ // 3. If request’s client is non-null, then:
+ if (request.client != null) {
+ // 1. Set taskDestination to request’s client’s global object.
+ taskDestination = request.client.globalObject
+
+ // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin
+ // isolated capability.
+ crossOriginIsolatedCapability =
+ request.client.crossOriginIsolatedCapability
+ }
+
+ // 4. If useParallelQueue is true, then set taskDestination to the result of
+ // starting a new parallel queue.
+ // TODO
+
+ // 5. Let timingInfo be a new fetch timing info whose start time and
+ // post-redirect start time are the coarsened shared current time given
+ // crossOriginIsolatedCapability.
+ const currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability)
+ const timingInfo = createOpaqueTimingInfo({
+ startTime: currenTime
+ })
+
+ // 6. Let fetchParams be a new fetch params whose
+ // request is request,
+ // timing info is timingInfo,
+ // process request body chunk length is processRequestBodyChunkLength,
+ // process request end-of-body is processRequestEndOfBody,
+ // process response is processResponse,
+ // process response consume body is processResponseConsumeBody,
+ // process response end-of-body is processResponseEndOfBody,
+ // task destination is taskDestination,
+ // and cross-origin isolated capability is crossOriginIsolatedCapability.
+ const fetchParams = {
+ controller: new Fetch(dispatcher),
+ request,
+ timingInfo,
+ processRequestBodyChunkLength,
+ processRequestEndOfBody,
+ processResponse,
+ processResponseConsumeBody,
+ processResponseEndOfBody,
+ taskDestination,
+ crossOriginIsolatedCapability
+ }
+
+ // 7. If request’s body is a byte sequence, then set request’s body to
+ // request’s body as a body.
+ // NOTE: Since fetching is only called from fetch, body should already be
+ // extracted.
+ assert(!request.body || request.body.stream)
+
+ // 8. If request’s window is "client", then set request’s window to request’s
+ // client, if request’s client’s global object is a Window object; otherwise
+ // "no-window".
+ if (request.window === 'client') {
+ // TODO: What if request.client is null?
+ request.window =
+ request.client?.globalObject?.constructor?.name === 'Window'
+ ? request.client
+ : 'no-window'
+ }
+
+ // 9. If request’s origin is "client", then set request’s origin to request’s
+ // client’s origin.
+ if (request.origin === 'client') {
+ // TODO: What if request.client is null?
+ request.origin = request.client?.origin
+ }
+
+ // 10. If all of the following conditions are true:
+ // TODO
+
+ // 11. If request’s policy container is "client", then:
+ if (request.policyContainer === 'client') {
+ // 1. If request’s client is non-null, then set request’s policy
+ // container to a clone of request’s client’s policy container. [HTML]
+ if (request.client != null) {
+ request.policyContainer = clonePolicyContainer(
+ request.client.policyContainer
+ )
+ } else {
+ // 2. Otherwise, set request’s policy container to a new policy
+ // container.
+ request.policyContainer = makePolicyContainer()
+ }
+ }
+
+ // 12. If request’s header list does not contain `Accept`, then:
+ if (!request.headersList.contains('accept')) {
+ // 1. Let value be `*/*`.
+ const value = '*/*'
+
+ // 2. A user agent should set value to the first matching statement, if
+ // any, switching on request’s destination:
+ // "document"
+ // "frame"
+ // "iframe"
+ // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8`
+ // "image"
+ // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5`
+ // "style"
+ // `text/css,*/*;q=0.1`
+ // TODO
+
+ // 3. Append `Accept`/value to request’s header list.
+ request.headersList.append('accept', value)
+ }
+
+ // 13. If request’s header list does not contain `Accept-Language`, then
+ // user agents should append `Accept-Language`/an appropriate value to
+ // request’s header list.
+ if (!request.headersList.contains('accept-language')) {
+ request.headersList.append('accept-language', '*')
+ }
+
+ // 14. If request’s priority is null, then use request’s initiator and
+ // destination appropriately in setting request’s priority to a
+ // user-agent-defined object.
+ if (request.priority === null) {
+ // TODO
+ }
+
+ // 15. If request is a subresource request, then:
+ if (subresource.includes(request.destination)) {
+ // TODO
+ }
+
+ // 16. Run main fetch given fetchParams.
+ mainFetch(fetchParams)
+ .catch(err => {
+ fetchParams.controller.terminate(err)
+ })
+
+ // 17. Return fetchParam's controller
+ return fetchParams.controller
+}
+
+// https://fetch.spec.whatwg.org/#concept-main-fetch
+async function mainFetch (fetchParams, recursive = false) {
+ // 1. Let request be fetchParams’s request.
+ const request = fetchParams.request
+
+ // 2. Let response be null.
+ let response = null
+
+ // 3. If request’s local-URLs-only flag is set and request’s current URL is
+ // not local, then set response to a network error.
+ if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) {
+ response = makeNetworkError('local URLs only')
+ }
+
+ // 4. Run report Content Security Policy violations for request.
+ // TODO
+
+ // 5. Upgrade request to a potentially trustworthy URL, if appropriate.
+ tryUpgradeRequestToAPotentiallyTrustworthyURL(request)
+
+ // 6. If should request be blocked due to a bad port, should fetching request
+ // be blocked as mixed content, or should request be blocked by Content
+ // Security Policy returns blocked, then set response to a network error.
+ if (requestBadPort(request) === 'blocked') {
+ response = makeNetworkError('bad port')
+ }
+ // TODO: should fetching request be blocked as mixed content?
+ // TODO: should request be blocked by Content Security Policy?
+
+ // 7. If request’s referrer policy is the empty string, then set request’s
+ // referrer policy to request’s policy container’s referrer policy.
+ if (request.referrerPolicy === '') {
+ request.referrerPolicy = request.policyContainer.referrerPolicy
+ }
+
+ // 8. If request’s referrer is not "no-referrer", then set request’s
+ // referrer to the result of invoking determine request’s referrer.
+ if (request.referrer !== 'no-referrer') {
+ request.referrer = determineRequestsReferrer(request)
+ }
+
+ // 9. Set request’s current URL’s scheme to "https" if all of the following
+ // conditions are true:
+ // - request’s current URL’s scheme is "http"
+ // - request’s current URL’s host is a domain
+ // - Matching request’s current URL’s host per Known HSTS Host Domain Name
+ // Matching results in either a superdomain match with an asserted
+ // includeSubDomains directive or a congruent match (with or without an
+ // asserted includeSubDomains directive). [HSTS]
+ // TODO
+
+ // 10. If recursive is false, then run the remaining steps in parallel.
+ // TODO
+
+ // 11. If response is null, then set response to the result of running
+ // the steps corresponding to the first matching statement:
+ if (response === null) {
+ response = await (async () => {
+ const currentURL = requestCurrentURL(request)
+
+ if (
+ // - request’s current URL’s origin is same origin with request’s origin,
+ // and request’s response tainting is "basic"
+ (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') ||
+ // request’s current URL’s scheme is "data"
+ (currentURL.protocol === 'data:') ||
+ // - request’s mode is "navigate" or "websocket"
+ (request.mode === 'navigate' || request.mode === 'websocket')
+ ) {
+ // 1. Set request’s response tainting to "basic".
+ request.responseTainting = 'basic'
+
+ // 2. Return the result of running scheme fetch given fetchParams.
+ return await schemeFetch(fetchParams)
+ }
+
+ // request’s mode is "same-origin"
+ if (request.mode === 'same-origin') {
+ // 1. Return a network error.
+ return makeNetworkError('request mode cannot be "same-origin"')
+ }
+
+ // request’s mode is "no-cors"
+ if (request.mode === 'no-cors') {
+ // 1. If request’s redirect mode is not "follow", then return a network
+ // error.
+ if (request.redirect !== 'follow') {
+ return makeNetworkError(
+ 'redirect mode cannot be "follow" for "no-cors" request'
+ )
+ }
+
+ // 2. Set request’s response tainting to "opaque".
+ request.responseTainting = 'opaque'
+
+ // 3. Return the result of running scheme fetch given fetchParams.
+ return await schemeFetch(fetchParams)
+ }
+
+ // request’s current URL’s scheme is not an HTTP(S) scheme
+ if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) {
+ // Return a network error.
+ return makeNetworkError('URL scheme must be a HTTP(S) scheme')
+ }
+
+ // - request’s use-CORS-preflight flag is set
+ // - request’s unsafe-request flag is set and either request’s method is
+ // not a CORS-safelisted method or CORS-unsafe request-header names with
+ // request’s header list is not empty
+ // 1. Set request’s response tainting to "cors".
+ // 2. Let corsWithPreflightResponse be the result of running HTTP fetch
+ // given fetchParams and true.
+ // 3. If corsWithPreflightResponse is a network error, then clear cache
+ // entries using request.
+ // 4. Return corsWithPreflightResponse.
+ // TODO
+
+ // Otherwise
+ // 1. Set request’s response tainting to "cors".
+ request.responseTainting = 'cors'
+
+ // 2. Return the result of running HTTP fetch given fetchParams.
+ return await httpFetch(fetchParams)
+ })()
+ }
+
+ // 12. If recursive is true, then return response.
+ if (recursive) {
+ return response
+ }
+
+ // 13. If response is not a network error and response is not a filtered
+ // response, then:
+ if (response.status !== 0 && !response.internalResponse) {
+ // If request’s response tainting is "cors", then:
+ if (request.responseTainting === 'cors') {
+ // 1. Let headerNames be the result of extracting header list values
+ // given `Access-Control-Expose-Headers` and response’s header list.
+ // TODO
+ // 2. If request’s credentials mode is not "include" and headerNames
+ // contains `*`, then set response’s CORS-exposed header-name list to
+ // all unique header names in response’s header list.
+ // TODO
+ // 3. Otherwise, if headerNames is not null or failure, then set
+ // response’s CORS-exposed header-name list to headerNames.
+ // TODO
+ }
+
+ // Set response to the following filtered response with response as its
+ // internal response, depending on request’s response tainting:
+ if (request.responseTainting === 'basic') {
+ response = filterResponse(response, 'basic')
+ } else if (request.responseTainting === 'cors') {
+ response = filterResponse(response, 'cors')
+ } else if (request.responseTainting === 'opaque') {
+ response = filterResponse(response, 'opaque')
+ } else {
+ assert(false)
+ }
+ }
+
+ // 14. Let internalResponse be response, if response is a network error,
+ // and response’s internal response otherwise.
+ let internalResponse =
+ response.status === 0 ? response : response.internalResponse
+
+ // 15. If internalResponse’s URL list is empty, then set it to a clone of
+ // request’s URL list.
+ if (internalResponse.urlList.length === 0) {
+ internalResponse.urlList.push(...request.urlList)
+ }
+
+ // 16. If request’s timing allow failed flag is unset, then set
+ // internalResponse’s timing allow passed flag.
+ if (!request.timingAllowFailed) {
+ response.timingAllowPassed = true
+ }
+
+ // 17. If response is not a network error and any of the following returns
+ // blocked
+ // - should internalResponse to request be blocked as mixed content
+ // - should internalResponse to request be blocked by Content Security Policy
+ // - should internalResponse to request be blocked due to its MIME type
+ // - should internalResponse to request be blocked due to nosniff
+ // TODO
+
+ // 18. If response’s type is "opaque", internalResponse’s status is 206,
+ // internalResponse’s range-requested flag is set, and request’s header
+ // list does not contain `Range`, then set response and internalResponse
+ // to a network error.
+ if (
+ response.type === 'opaque' &&
+ internalResponse.status === 206 &&
+ internalResponse.rangeRequested &&
+ !request.headers.contains('range')
+ ) {
+ response = internalResponse = makeNetworkError()
+ }
+
+ // 19. If response is not a network error and either request’s method is
+ // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status,
+ // set internalResponse’s body to null and disregard any enqueuing toward
+ // it (if any).
+ if (
+ response.status !== 0 &&
+ (request.method === 'HEAD' ||
+ request.method === 'CONNECT' ||
+ nullBodyStatus.includes(internalResponse.status))
+ ) {
+ internalResponse.body = null
+ fetchParams.controller.dump = true
+ }
+
+ // 20. If request’s integrity metadata is not the empty string, then:
+ if (request.integrity) {
+ // 1. Let processBodyError be this step: run fetch finale given fetchParams
+ // and a network error.
+ const processBodyError = (reason) =>
+ fetchFinale(fetchParams, makeNetworkError(reason))
+
+ // 2. If request’s response tainting is "opaque", or response’s body is null,
+ // then run processBodyError and abort these steps.
+ if (request.responseTainting === 'opaque' || response.body == null) {
+ processBodyError(response.error)
+ return
+ }
+
+ // 3. Let processBody given bytes be these steps:
+ const processBody = (bytes) => {
+ // 1. If bytes do not match request’s integrity metadata,
+ // then run processBodyError and abort these steps. [SRI]
+ if (!bytesMatch(bytes, request.integrity)) {
+ processBodyError('integrity mismatch')
+ return
+ }
+
+ // 2. Set response’s body to bytes as a body.
+ response.body = safelyExtractBody(bytes)[0]
+
+ // 3. Run fetch finale given fetchParams and response.
+ fetchFinale(fetchParams, response)
+ }
+
+ // 4. Fully read response’s body given processBody and processBodyError.
+ await fullyReadBody(response.body, processBody, processBodyError)
+ } else {
+ // 21. Otherwise, run fetch finale given fetchParams and response.
+ fetchFinale(fetchParams, response)
+ }
+}
+
+// https://fetch.spec.whatwg.org/#concept-scheme-fetch
+// given a fetch params fetchParams
+async function schemeFetch (fetchParams) {
+ // Note: since the connection is destroyed on redirect, which sets fetchParams to a
+ // cancelled state, we do not want this condition to trigger *unless* there have been
+ // no redirects. See https://github.com/nodejs/undici/issues/1776
+ // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.
+ if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) {
+ return makeAppropriateNetworkError(fetchParams)
+ }
+
+ // 2. Let request be fetchParams’s request.
+ const { request } = fetchParams
+
+ const { protocol: scheme } = requestCurrentURL(request)
+
+ // 3. Switch on request’s current URL’s scheme and run the associated steps:
+ switch (scheme) {
+ case 'about:': {
+ // If request’s current URL’s path is the string "blank", then return a new response
+ // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) »,
+ // and body is the empty byte sequence as a body.
+
+ // Otherwise, return a network error.
+ return makeNetworkError('about scheme is not supported')
+ }
+ case 'blob:': {
+ if (!resolveObjectURL) {
+ resolveObjectURL = require('buffer').resolveObjectURL
+ }
+
+ // 1. Let blobURLEntry be request’s current URL’s blob URL entry.
+ const blobURLEntry = requestCurrentURL(request)
+
+ // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56
+ // Buffer.resolveObjectURL does not ignore URL queries.
+ if (blobURLEntry.search.length !== 0) {
+ return makeNetworkError('NetworkError when attempting to fetch resource.')
+ }
+
+ const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString())
+
+ // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s
+ // object is not a Blob object, then return a network error.
+ if (request.method !== 'GET' || !isBlobLike(blobURLEntryObject)) {
+ return makeNetworkError('invalid method')
+ }
+
+ // 3. Let bodyWithType be the result of safely extracting blobURLEntry’s object.
+ const bodyWithType = safelyExtractBody(blobURLEntryObject)
+
+ // 4. Let body be bodyWithType’s body.
+ const body = bodyWithType[0]
+
+ // 5. Let length be body’s length, serialized and isomorphic encoded.
+ const length = isomorphicEncode(`${body.length}`)
+
+ // 6. Let type be bodyWithType’s type if it is non-null; otherwise the empty byte sequence.
+ const type = bodyWithType[1] ?? ''
+
+ // 7. Return a new response whose status message is `OK`, header list is
+ // « (`Content-Length`, length), (`Content-Type`, type) », and body is body.
+ const response = makeResponse({
+ statusText: 'OK',
+ headersList: [
+ ['content-length', { name: 'Content-Length', value: length }],
+ ['content-type', { name: 'Content-Type', value: type }]
+ ]
+ })
+
+ response.body = body
+
+ return response
+ }
+ case 'data:': {
+ // 1. Let dataURLStruct be the result of running the
+ // data: URL processor on request’s current URL.
+ const currentURL = requestCurrentURL(request)
+ const dataURLStruct = dataURLProcessor(currentURL)
+
+ // 2. If dataURLStruct is failure, then return a
+ // network error.
+ if (dataURLStruct === 'failure') {
+ return makeNetworkError('failed to fetch the data URL')
+ }
+
+ // 3. Let mimeType be dataURLStruct’s MIME type, serialized.
+ const mimeType = serializeAMimeType(dataURLStruct.mimeType)
+
+ // 4. Return a response whose status message is `OK`,
+ // header list is « (`Content-Type`, mimeType) »,
+ // and body is dataURLStruct’s body as a body.
+ return makeResponse({
+ statusText: 'OK',
+ headersList: [
+ ['content-type', { name: 'Content-Type', value: mimeType }]
+ ],
+ body: safelyExtractBody(dataURLStruct.body)[0]
+ })
+ }
+ case 'file:': {
+ // For now, unfortunate as it is, file URLs are left as an exercise for the reader.
+ // When in doubt, return a network error.
+ return makeNetworkError('not implemented... yet...')
+ }
+ case 'http:':
+ case 'https:': {
+ // Return the result of running HTTP fetch given fetchParams.
+
+ return await httpFetch(fetchParams)
+ .catch((err) => makeNetworkError(err))
+ }
+ default: {
+ return makeNetworkError('unknown scheme')
+ }
+ }
+}
+
+// https://fetch.spec.whatwg.org/#finalize-response
+function finalizeResponse (fetchParams, response) {
+ // 1. Set fetchParams’s request’s done flag.
+ fetchParams.request.done = true
+
+ // 2, If fetchParams’s process response done is not null, then queue a fetch
+ // task to run fetchParams’s process response done given response, with
+ // fetchParams’s task destination.
+ if (fetchParams.processResponseDone != null) {
+ queueMicrotask(() => fetchParams.processResponseDone(response))
+ }
+}
+
+// https://fetch.spec.whatwg.org/#fetch-finale
+async function fetchFinale (fetchParams, response) {
+ // 1. If response is a network error, then:
+ if (response.type === 'error') {
+ // 1. Set response’s URL list to « fetchParams’s request’s URL list[0] ».
+ response.urlList = [fetchParams.request.urlList[0]]
+
+ // 2. Set response’s timing info to the result of creating an opaque timing
+ // info for fetchParams’s timing info.
+ response.timingInfo = createOpaqueTimingInfo({
+ startTime: fetchParams.timingInfo.startTime
+ })
+ }
+
+ // 2. Let processResponseEndOfBody be the following steps:
+ const processResponseEndOfBody = () => {
+ // 1. Set fetchParams’s request’s done flag.
+ fetchParams.request.done = true
+
+ // If fetchParams’s process response end-of-body is not null,
+ // then queue a fetch task to run fetchParams’s process response
+ // end-of-body given response with fetchParams’s task destination.
+ if (fetchParams.processResponseEndOfBody != null) {
+ queueMicrotask(() => fetchParams.processResponseEndOfBody(response))
+ }
+ }
+
+ // 3. If fetchParams’s process response is non-null, then queue a fetch task
+ // to run fetchParams’s process response given response, with fetchParams’s
+ // task destination.
+ if (fetchParams.processResponse != null) {
+ queueMicrotask(() => fetchParams.processResponse(response))
+ }
+
+ // 4. If response’s body is null, then run processResponseEndOfBody.
+ if (response.body == null) {
+ processResponseEndOfBody()
+ } else {
+ // 5. Otherwise:
+
+ // 1. Let transformStream be a new a TransformStream.
+
+ // 2. Let identityTransformAlgorithm be an algorithm which, given chunk,
+ // enqueues chunk in transformStream.
+ const identityTransformAlgorithm = (chunk, controller) => {
+ controller.enqueue(chunk)
+ }
+
+ // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm
+ // and flushAlgorithm set to processResponseEndOfBody.
+ const transformStream = new TransformStream({
+ start () {},
+ transform: identityTransformAlgorithm,
+ flush: processResponseEndOfBody
+ }, {
+ size () {
+ return 1
+ }
+ }, {
+ size () {
+ return 1
+ }
+ })
+
+ // 4. Set response’s body to the result of piping response’s body through transformStream.
+ response.body = { stream: response.body.stream.pipeThrough(transformStream) }
+ }
+
+ // 6. If fetchParams’s process response consume body is non-null, then:
+ if (fetchParams.processResponseConsumeBody != null) {
+ // 1. Let processBody given nullOrBytes be this step: run fetchParams’s
+ // process response consume body given response and nullOrBytes.
+ const processBody = (nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes)
+
+ // 2. Let processBodyError be this step: run fetchParams’s process
+ // response consume body given response and failure.
+ const processBodyError = (failure) => fetchParams.processResponseConsumeBody(response, failure)
+
+ // 3. If response’s body is null, then queue a fetch task to run processBody
+ // given null, with fetchParams’s task destination.
+ if (response.body == null) {
+ queueMicrotask(() => processBody(null))
+ } else {
+ // 4. Otherwise, fully read response’s body given processBody, processBodyError,
+ // and fetchParams’s task destination.
+ await fullyReadBody(response.body, processBody, processBodyError)
+ }
+ }
+}
+
+// https://fetch.spec.whatwg.org/#http-fetch
+async function httpFetch (fetchParams) {
+ // 1. Let request be fetchParams’s request.
+ const request = fetchParams.request
+
+ // 2. Let response be null.
+ let response = null
+
+ // 3. Let actualResponse be null.
+ let actualResponse = null
+
+ // 4. Let timingInfo be fetchParams’s timing info.
+ const timingInfo = fetchParams.timingInfo
+
+ // 5. If request’s service-workers mode is "all", then:
+ if (request.serviceWorkers === 'all') {
+ // TODO
+ }
+
+ // 6. If response is null, then:
+ if (response === null) {
+ // 1. If makeCORSPreflight is true and one of these conditions is true:
+ // TODO
+
+ // 2. If request’s redirect mode is "follow", then set request’s
+ // service-workers mode to "none".
+ if (request.redirect === 'follow') {
+ request.serviceWorkers = 'none'
+ }
+
+ // 3. Set response and actualResponse to the result of running
+ // HTTP-network-or-cache fetch given fetchParams.
+ actualResponse = response = await httpNetworkOrCacheFetch(fetchParams)
+
+ // 4. If request’s response tainting is "cors" and a CORS check
+ // for request and response returns failure, then return a network error.
+ if (
+ request.responseTainting === 'cors' &&
+ corsCheck(request, response) === 'failure'
+ ) {
+ return makeNetworkError('cors failure')
+ }
+
+ // 5. If the TAO check for request and response returns failure, then set
+ // request’s timing allow failed flag.
+ if (TAOCheck(request, response) === 'failure') {
+ request.timingAllowFailed = true
+ }
+ }
+
+ // 7. If either request’s response tainting or response’s type
+ // is "opaque", and the cross-origin resource policy check with
+ // request’s origin, request’s client, request’s destination,
+ // and actualResponse returns blocked, then return a network error.
+ if (
+ (request.responseTainting === 'opaque' || response.type === 'opaque') &&
+ crossOriginResourcePolicyCheck(
+ request.origin,
+ request.client,
+ request.destination,
+ actualResponse
+ ) === 'blocked'
+ ) {
+ return makeNetworkError('blocked')
+ }
+
+ // 8. If actualResponse’s status is a redirect status, then:
+ if (redirectStatus.includes(actualResponse.status)) {
+ // 1. If actualResponse’s status is not 303, request’s body is not null,
+ // and the connection uses HTTP/2, then user agents may, and are even
+ // encouraged to, transmit an RST_STREAM frame.
+ // See, https://github.com/whatwg/fetch/issues/1288
+ if (request.redirect !== 'manual') {
+ fetchParams.controller.connection.destroy()
+ }
+
+ // 2. Switch on request’s redirect mode:
+ if (request.redirect === 'error') {
+ // Set response to a network error.
+ response = makeNetworkError('unexpected redirect')
+ } else if (request.redirect === 'manual') {
+ // Set response to an opaque-redirect filtered response whose internal
+ // response is actualResponse.
+ // NOTE(spec): On the web this would return an `opaqueredirect` response,
+ // but that doesn't make sense server side.
+ // See https://github.com/nodejs/undici/issues/1193.
+ response = actualResponse
+ } else if (request.redirect === 'follow') {
+ // Set response to the result of running HTTP-redirect fetch given
+ // fetchParams and response.
+ response = await httpRedirectFetch(fetchParams, response)
+ } else {
+ assert(false)
+ }
+ }
+
+ // 9. Set response’s timing info to timingInfo.
+ response.timingInfo = timingInfo
+
+ // 10. Return response.
+ return response
+}
+
+// https://fetch.spec.whatwg.org/#http-redirect-fetch
+async function httpRedirectFetch (fetchParams, response) {
+ // 1. Let request be fetchParams’s request.
+ const request = fetchParams.request
+
+ // 2. Let actualResponse be response, if response is not a filtered response,
+ // and response’s internal response otherwise.
+ const actualResponse = response.internalResponse
+ ? response.internalResponse
+ : response
+
+ // 3. Let locationURL be actualResponse’s location URL given request’s current
+ // URL’s fragment.
+ let locationURL
+
+ try {
+ locationURL = responseLocationURL(
+ actualResponse,
+ requestCurrentURL(request).hash
+ )
+
+ // 4. If locationURL is null, then return response.
+ if (locationURL == null) {
+ return response
+ }
+ } catch (err) {
+ // 5. If locationURL is failure, then return a network error.
+ return makeNetworkError(err)
+ }
+
+ // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network
+ // error.
+ if (!urlIsHttpHttpsScheme(locationURL)) {
+ return makeNetworkError('URL scheme must be a HTTP(S) scheme')
+ }
+
+ // 7. If request’s redirect count is 20, then return a network error.
+ if (request.redirectCount === 20) {
+ return makeNetworkError('redirect count exceeded')
+ }
+
+ // 8. Increase request’s redirect count by 1.
+ request.redirectCount += 1
+
+ // 9. If request’s mode is "cors", locationURL includes credentials, and
+ // request’s origin is not same origin with locationURL’s origin, then return
+ // a network error.
+ if (
+ request.mode === 'cors' &&
+ (locationURL.username || locationURL.password) &&
+ !sameOrigin(request, locationURL)
+ ) {
+ return makeNetworkError('cross origin not allowed for request mode "cors"')
+ }
+
+ // 10. If request’s response tainting is "cors" and locationURL includes
+ // credentials, then return a network error.
+ if (
+ request.responseTainting === 'cors' &&
+ (locationURL.username || locationURL.password)
+ ) {
+ return makeNetworkError(
+ 'URL cannot contain credentials for request mode "cors"'
+ )
+ }
+
+ // 11. If actualResponse’s status is not 303, request’s body is non-null,
+ // and request’s body’s source is null, then return a network error.
+ if (
+ actualResponse.status !== 303 &&
+ request.body != null &&
+ request.body.source == null
+ ) {
+ return makeNetworkError()
+ }
+
+ // 12. If one of the following is true
+ // - actualResponse’s status is 301 or 302 and request’s method is `POST`
+ // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD`
+ if (
+ ([301, 302].includes(actualResponse.status) && request.method === 'POST') ||
+ (actualResponse.status === 303 &&
+ !['GET', 'HEAD'].includes(request.method))
+ ) {
+ // then:
+ // 1. Set request’s method to `GET` and request’s body to null.
+ request.method = 'GET'
+ request.body = null
+
+ // 2. For each headerName of request-body-header name, delete headerName from
+ // request’s header list.
+ for (const headerName of requestBodyHeader) {
+ request.headersList.delete(headerName)
+ }
+ }
+
+ // 13. If request’s current URL’s origin is not same origin with locationURL’s
+ // origin, then for each headerName of CORS non-wildcard request-header name,
+ // delete headerName from request’s header list.
+ if (!sameOrigin(requestCurrentURL(request), locationURL)) {
+ // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
+ request.headersList.delete('authorization')
+ }
+
+ // 14. If request’s body is non-null, then set request’s body to the first return
+ // value of safely extracting request’s body’s source.
+ if (request.body != null) {
+ assert(request.body.source != null)
+ request.body = safelyExtractBody(request.body.source)[0]
+ }
+
+ // 15. Let timingInfo be fetchParams’s timing info.
+ const timingInfo = fetchParams.timingInfo
+
+ // 16. Set timingInfo’s redirect end time and post-redirect start time to the
+ // coarsened shared current time given fetchParams’s cross-origin isolated
+ // capability.
+ timingInfo.redirectEndTime = timingInfo.postRedirectStartTime =
+ coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability)
+
+ // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s
+ // redirect start time to timingInfo’s start time.
+ if (timingInfo.redirectStartTime === 0) {
+ timingInfo.redirectStartTime = timingInfo.startTime
+ }
+
+ // 18. Append locationURL to request’s URL list.
+ request.urlList.push(locationURL)
+
+ // 19. Invoke set request’s referrer policy on redirect on request and
+ // actualResponse.
+ setRequestReferrerPolicyOnRedirect(request, actualResponse)
+
+ // 20. Return the result of running main fetch given fetchParams and true.
+ return mainFetch(fetchParams, true)
+}
+
+// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch
+async function httpNetworkOrCacheFetch (
+ fetchParams,
+ isAuthenticationFetch = false,
+ isNewConnectionFetch = false
+) {
+ // 1. Let request be fetchParams’s request.
+ const request = fetchParams.request
+
+ // 2. Let httpFetchParams be null.
+ let httpFetchParams = null
+
+ // 3. Let httpRequest be null.
+ let httpRequest = null
+
+ // 4. Let response be null.
+ let response = null
+
+ // 5. Let storedResponse be null.
+ // TODO: cache
+
+ // 6. Let httpCache be null.
+ const httpCache = null
+
+ // 7. Let the revalidatingFlag be unset.
+ const revalidatingFlag = false
+
+ // 8. Run these steps, but abort when the ongoing fetch is terminated:
+
+ // 1. If request’s window is "no-window" and request’s redirect mode is
+ // "error", then set httpFetchParams to fetchParams and httpRequest to
+ // request.
+ if (request.window === 'no-window' && request.redirect === 'error') {
+ httpFetchParams = fetchParams
+ httpRequest = request
+ } else {
+ // Otherwise:
+
+ // 1. Set httpRequest to a clone of request.
+ httpRequest = makeRequest(request)
+
+ // 2. Set httpFetchParams to a copy of fetchParams.
+ httpFetchParams = { ...fetchParams }
+
+ // 3. Set httpFetchParams’s request to httpRequest.
+ httpFetchParams.request = httpRequest
+ }
+
+ // 3. Let includeCredentials be true if one of
+ const includeCredentials =
+ request.credentials === 'include' ||
+ (request.credentials === 'same-origin' &&
+ request.responseTainting === 'basic')
+
+ // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s
+ // body is non-null; otherwise null.
+ const contentLength = httpRequest.body ? httpRequest.body.length : null
+
+ // 5. Let contentLengthHeaderValue be null.
+ let contentLengthHeaderValue = null
+
+ // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or
+ // `PUT`, then set contentLengthHeaderValue to `0`.
+ if (
+ httpRequest.body == null &&
+ ['POST', 'PUT'].includes(httpRequest.method)
+ ) {
+ contentLengthHeaderValue = '0'
+ }
+
+ // 7. If contentLength is non-null, then set contentLengthHeaderValue to
+ // contentLength, serialized and isomorphic encoded.
+ if (contentLength != null) {
+ contentLengthHeaderValue = isomorphicEncode(`${contentLength}`)
+ }
+
+ // 8. If contentLengthHeaderValue is non-null, then append
+ // `Content-Length`/contentLengthHeaderValue to httpRequest’s header
+ // list.
+ if (contentLengthHeaderValue != null) {
+ httpRequest.headersList.append('content-length', contentLengthHeaderValue)
+ }
+
+ // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`,
+ // contentLengthHeaderValue) to httpRequest’s header list.
+
+ // 10. If contentLength is non-null and httpRequest’s keepalive is true,
+ // then:
+ if (contentLength != null && httpRequest.keepalive) {
+ // NOTE: keepalive is a noop outside of browser context.
+ }
+
+ // 11. If httpRequest’s referrer is a URL, then append
+ // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded,
+ // to httpRequest’s header list.
+ if (httpRequest.referrer instanceof URL) {
+ httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href))
+ }
+
+ // 12. Append a request `Origin` header for httpRequest.
+ appendRequestOriginHeader(httpRequest)
+
+ // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA]
+ appendFetchMetadata(httpRequest)
+
+ // 14. If httpRequest’s header list does not contain `User-Agent`, then
+ // user agents should append `User-Agent`/default `User-Agent` value to
+ // httpRequest’s header list.
+ if (!httpRequest.headersList.contains('user-agent')) {
+ httpRequest.headersList.append('user-agent', 'undici')
+ }
+
+ // 15. If httpRequest’s cache mode is "default" and httpRequest’s header
+ // list contains `If-Modified-Since`, `If-None-Match`,
+ // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set
+ // httpRequest’s cache mode to "no-store".
+ if (
+ httpRequest.cache === 'default' &&
+ (httpRequest.headersList.contains('if-modified-since') ||
+ httpRequest.headersList.contains('if-none-match') ||
+ httpRequest.headersList.contains('if-unmodified-since') ||
+ httpRequest.headersList.contains('if-match') ||
+ httpRequest.headersList.contains('if-range'))
+ ) {
+ httpRequest.cache = 'no-store'
+ }
+
+ // 16. If httpRequest’s cache mode is "no-cache", httpRequest’s prevent
+ // no-cache cache-control header modification flag is unset, and
+ // httpRequest’s header list does not contain `Cache-Control`, then append
+ // `Cache-Control`/`max-age=0` to httpRequest’s header list.
+ if (
+ httpRequest.cache === 'no-cache' &&
+ !httpRequest.preventNoCacheCacheControlHeaderModification &&
+ !httpRequest.headersList.contains('cache-control')
+ ) {
+ httpRequest.headersList.append('cache-control', 'max-age=0')
+ }
+
+ // 17. If httpRequest’s cache mode is "no-store" or "reload", then:
+ if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') {
+ // 1. If httpRequest’s header list does not contain `Pragma`, then append
+ // `Pragma`/`no-cache` to httpRequest’s header list.
+ if (!httpRequest.headersList.contains('pragma')) {
+ httpRequest.headersList.append('pragma', 'no-cache')
+ }
+
+ // 2. If httpRequest’s header list does not contain `Cache-Control`,
+ // then append `Cache-Control`/`no-cache` to httpRequest’s header list.
+ if (!httpRequest.headersList.contains('cache-control')) {
+ httpRequest.headersList.append('cache-control', 'no-cache')
+ }
+ }
+
+ // 18. If httpRequest’s header list contains `Range`, then append
+ // `Accept-Encoding`/`identity` to httpRequest’s header list.
+ if (httpRequest.headersList.contains('range')) {
+ httpRequest.headersList.append('accept-encoding', 'identity')
+ }
+
+ // 19. Modify httpRequest’s header list per HTTP. Do not append a given
+ // header if httpRequest’s header list contains that header’s name.
+ // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129
+ if (!httpRequest.headersList.contains('accept-encoding')) {
+ if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) {
+ httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate')
+ } else {
+ httpRequest.headersList.append('accept-encoding', 'gzip, deflate')
+ }
+ }
+
+ // 20. If includeCredentials is true, then:
+ if (includeCredentials) {
+ // 1. If the user agent is not configured to block cookies for httpRequest
+ // (see section 7 of [COOKIES]), then:
+ // TODO: credentials
+ // 2. If httpRequest’s header list does not contain `Authorization`, then:
+ // TODO: credentials
+ }
+
+ // 21. If there’s a proxy-authentication entry, use it as appropriate.
+ // TODO: proxy-authentication
+
+ // 22. Set httpCache to the result of determining the HTTP cache
+ // partition, given httpRequest.
+ // TODO: cache
+
+ // 23. If httpCache is null, then set httpRequest’s cache mode to
+ // "no-store".
+ if (httpCache == null) {
+ httpRequest.cache = 'no-store'
+ }
+
+ // 24. If httpRequest’s cache mode is neither "no-store" nor "reload",
+ // then:
+ if (httpRequest.mode !== 'no-store' && httpRequest.mode !== 'reload') {
+ // TODO: cache
+ }
+
+ // 9. If aborted, then return the appropriate network error for fetchParams.
+ // TODO
+
+ // 10. If response is null, then:
+ if (response == null) {
+ // 1. If httpRequest’s cache mode is "only-if-cached", then return a
+ // network error.
+ if (httpRequest.mode === 'only-if-cached') {
+ return makeNetworkError('only if cached')
+ }
+
+ // 2. Let forwardResponse be the result of running HTTP-network fetch
+ // given httpFetchParams, includeCredentials, and isNewConnectionFetch.
+ const forwardResponse = await httpNetworkFetch(
+ httpFetchParams,
+ includeCredentials,
+ isNewConnectionFetch
+ )
+
+ // 3. If httpRequest’s method is unsafe and forwardResponse’s status is
+ // in the range 200 to 399, inclusive, invalidate appropriate stored
+ // responses in httpCache, as per the "Invalidation" chapter of HTTP
+ // Caching, and set storedResponse to null. [HTTP-CACHING]
+ if (
+ !safeMethods.includes(httpRequest.method) &&
+ forwardResponse.status >= 200 &&
+ forwardResponse.status <= 399
+ ) {
+ // TODO: cache
+ }
+
+ // 4. If the revalidatingFlag is set and forwardResponse’s status is 304,
+ // then:
+ if (revalidatingFlag && forwardResponse.status === 304) {
+ // TODO: cache
+ }
+
+ // 5. If response is null, then:
+ if (response == null) {
+ // 1. Set response to forwardResponse.
+ response = forwardResponse
+
+ // 2. Store httpRequest and forwardResponse in httpCache, as per the
+ // "Storing Responses in Caches" chapter of HTTP Caching. [HTTP-CACHING]
+ // TODO: cache
+ }
+ }
+
+ // 11. Set response’s URL list to a clone of httpRequest’s URL list.
+ response.urlList = [...httpRequest.urlList]
+
+ // 12. If httpRequest’s header list contains `Range`, then set response’s
+ // range-requested flag.
+ if (httpRequest.headersList.contains('range')) {
+ response.rangeRequested = true
+ }
+
+ // 13. Set response’s request-includes-credentials to includeCredentials.
+ response.requestIncludesCredentials = includeCredentials
+
+ // 14. If response’s status is 401, httpRequest’s response tainting is not
+ // "cors", includeCredentials is true, and request’s window is an environment
+ // settings object, then:
+ // TODO
+
+ // 15. If response’s status is 407, then:
+ if (response.status === 407) {
+ // 1. If request’s window is "no-window", then return a network error.
+ if (request.window === 'no-window') {
+ return makeNetworkError()
+ }
+
+ // 2. ???
+
+ // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams.
+ if (isCancelled(fetchParams)) {
+ return makeAppropriateNetworkError(fetchParams)
+ }
+
+ // 4. Prompt the end user as appropriate in request’s window and store
+ // the result as a proxy-authentication entry. [HTTP-AUTH]
+ // TODO: Invoke some kind of callback?
+
+ // 5. Set response to the result of running HTTP-network-or-cache fetch given
+ // fetchParams.
+ // TODO
+ return makeNetworkError('proxy authentication required')
+ }
+
+ // 16. If all of the following are true
+ if (
+ // response’s status is 421
+ response.status === 421 &&
+ // isNewConnectionFetch is false
+ !isNewConnectionFetch &&
+ // request’s body is null, or request’s body is non-null and request’s body’s source is non-null
+ (request.body == null || request.body.source != null)
+ ) {
+ // then:
+
+ // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.
+ if (isCancelled(fetchParams)) {
+ return makeAppropriateNetworkError(fetchParams)
+ }
+
+ // 2. Set response to the result of running HTTP-network-or-cache
+ // fetch given fetchParams, isAuthenticationFetch, and true.
+
+ // TODO (spec): The spec doesn't specify this but we need to cancel
+ // the active response before we can start a new one.
+ // https://github.com/whatwg/fetch/issues/1293
+ fetchParams.controller.connection.destroy()
+
+ response = await httpNetworkOrCacheFetch(
+ fetchParams,
+ isAuthenticationFetch,
+ true
+ )
+ }
+
+ // 17. If isAuthenticationFetch is true, then create an authentication entry
+ if (isAuthenticationFetch) {
+ // TODO
+ }
+
+ // 18. Return response.
+ return response
+}
+
+// https://fetch.spec.whatwg.org/#http-network-fetch
+async function httpNetworkFetch (
+ fetchParams,
+ includeCredentials = false,
+ forceNewConnection = false
+) {
+ assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed)
+
+ fetchParams.controller.connection = {
+ abort: null,
+ destroyed: false,
+ destroy (err) {
+ if (!this.destroyed) {
+ this.destroyed = true
+ this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError'))
+ }
+ }
+ }
+
+ // 1. Let request be fetchParams’s request.
+ const request = fetchParams.request
+
+ // 2. Let response be null.
+ let response = null
+
+ // 3. Let timingInfo be fetchParams’s timing info.
+ const timingInfo = fetchParams.timingInfo
+
+ // 4. Let httpCache be the result of determining the HTTP cache partition,
+ // given request.
+ // TODO: cache
+ const httpCache = null
+
+ // 5. If httpCache is null, then set request’s cache mode to "no-store".
+ if (httpCache == null) {
+ request.cache = 'no-store'
+ }
+
+ // 6. Let networkPartitionKey be the result of determining the network
+ // partition key given request.
+ // TODO
+
+ // 7. Let newConnection be "yes" if forceNewConnection is true; otherwise
+ // "no".
+ const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars
+
+ // 8. Switch on request’s mode:
+ if (request.mode === 'websocket') {
+ // Let connection be the result of obtaining a WebSocket connection,
+ // given request’s current URL.
+ // TODO
+ } else {
+ // Let connection be the result of obtaining a connection, given
+ // networkPartitionKey, request’s current URL’s origin,
+ // includeCredentials, and forceNewConnection.
+ // TODO
+ }
+
+ // 9. Run these steps, but abort when the ongoing fetch is terminated:
+
+ // 1. If connection is failure, then return a network error.
+
+ // 2. Set timingInfo’s final connection timing info to the result of
+ // calling clamp and coarsen connection timing info with connection’s
+ // timing info, timingInfo’s post-redirect start time, and fetchParams’s
+ // cross-origin isolated capability.
+
+ // 3. If connection is not an HTTP/2 connection, request’s body is non-null,
+ // and request’s body’s source is null, then append (`Transfer-Encoding`,
+ // `chunked`) to request’s header list.
+
+ // 4. Set timingInfo’s final network-request start time to the coarsened
+ // shared current time given fetchParams’s cross-origin isolated
+ // capability.
+
+ // 5. Set response to the result of making an HTTP request over connection
+ // using request with the following caveats:
+
+ // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS]
+ // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH]
+
+ // - If request’s body is non-null, and request’s body’s source is null,
+ // then the user agent may have a buffer of up to 64 kibibytes and store
+ // a part of request’s body in that buffer. If the user agent reads from
+ // request’s body beyond that buffer’s size and the user agent needs to
+ // resend request, then instead return a network error.
+
+ // - Set timingInfo’s final network-response start time to the coarsened
+ // shared current time given fetchParams’s cross-origin isolated capability,
+ // immediately after the user agent’s HTTP parser receives the first byte
+ // of the response (e.g., frame header bytes for HTTP/2 or response status
+ // line for HTTP/1.x).
+
+ // - Wait until all the headers are transmitted.
+
+ // - Any responses whose status is in the range 100 to 199, inclusive,
+ // and is not 101, are to be ignored, except for the purposes of setting
+ // timingInfo’s final network-response start time above.
+
+ // - If request’s header list contains `Transfer-Encoding`/`chunked` and
+ // response is transferred via HTTP/1.0 or older, then return a network
+ // error.
+
+ // - If the HTTP request results in a TLS client certificate dialog, then:
+
+ // 1. If request’s window is an environment settings object, make the
+ // dialog available in request’s window.
+
+ // 2. Otherwise, return a network error.
+
+ // To transmit request’s body body, run these steps:
+ let requestBody = null
+ // 1. If body is null and fetchParams’s process request end-of-body is
+ // non-null, then queue a fetch task given fetchParams’s process request
+ // end-of-body and fetchParams’s task destination.
+ if (request.body == null && fetchParams.processRequestEndOfBody) {
+ queueMicrotask(() => fetchParams.processRequestEndOfBody())
+ } else if (request.body != null) {
+ // 2. Otherwise, if body is non-null:
+
+ // 1. Let processBodyChunk given bytes be these steps:
+ const processBodyChunk = async function * (bytes) {
+ // 1. If the ongoing fetch is terminated, then abort these steps.
+ if (isCancelled(fetchParams)) {
+ return
+ }
+
+ // 2. Run this step in parallel: transmit bytes.
+ yield bytes
+
+ // 3. If fetchParams’s process request body is non-null, then run
+ // fetchParams’s process request body given bytes’s length.
+ fetchParams.processRequestBodyChunkLength?.(bytes.byteLength)
+ }
+
+ // 2. Let processEndOfBody be these steps:
+ const processEndOfBody = () => {
+ // 1. If fetchParams is canceled, then abort these steps.
+ if (isCancelled(fetchParams)) {
+ return
+ }
+
+ // 2. If fetchParams’s process request end-of-body is non-null,
+ // then run fetchParams’s process request end-of-body.
+ if (fetchParams.processRequestEndOfBody) {
+ fetchParams.processRequestEndOfBody()
+ }
+ }
+
+ // 3. Let processBodyError given e be these steps:
+ const processBodyError = (e) => {
+ // 1. If fetchParams is canceled, then abort these steps.
+ if (isCancelled(fetchParams)) {
+ return
+ }
+
+ // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller.
+ if (e.name === 'AbortError') {
+ fetchParams.controller.abort()
+ } else {
+ fetchParams.controller.terminate(e)
+ }
+ }
+
+ // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody,
+ // processBodyError, and fetchParams’s task destination.
+ requestBody = (async function * () {
+ try {
+ for await (const bytes of request.body.stream) {
+ yield * processBodyChunk(bytes)
+ }
+ processEndOfBody()
+ } catch (err) {
+ processBodyError(err)
+ }
+ })()
+ }
+
+ try {
+ // socket is only provided for websockets
+ const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody })
+
+ if (socket) {
+ response = makeResponse({ status, statusText, headersList, socket })
+ } else {
+ const iterator = body[Symbol.asyncIterator]()
+ fetchParams.controller.next = () => iterator.next()
+
+ response = makeResponse({ status, statusText, headersList })
+ }
+ } catch (err) {
+ // 10. If aborted, then:
+ if (err.name === 'AbortError') {
+ // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame.
+ fetchParams.controller.connection.destroy()
+
+ // 2. Return the appropriate network error for fetchParams.
+ return makeAppropriateNetworkError(fetchParams)
+ }
+
+ return makeNetworkError(err)
+ }
+
+ // 11. Let pullAlgorithm be an action that resumes the ongoing fetch
+ // if it is suspended.
+ const pullAlgorithm = () => {
+ fetchParams.controller.resume()
+ }
+
+ // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s
+ // controller with reason, given reason.
+ const cancelAlgorithm = (reason) => {
+ fetchParams.controller.abort(reason)
+ }
+
+ // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by
+ // the user agent.
+ // TODO
+
+ // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object
+ // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent.
+ // TODO
+
+ // 15. Let stream be a new ReadableStream.
+ // 16. Set up stream with pullAlgorithm set to pullAlgorithm,
+ // cancelAlgorithm set to cancelAlgorithm, highWaterMark set to
+ // highWaterMark, and sizeAlgorithm set to sizeAlgorithm.
+ if (!ReadableStream) {
+ ReadableStream = require('stream/web').ReadableStream
+ }
+
+ const stream = new ReadableStream(
+ {
+ async start (controller) {
+ fetchParams.controller.controller = controller
+ },
+ async pull (controller) {
+ await pullAlgorithm(controller)
+ },
+ async cancel (reason) {
+ await cancelAlgorithm(reason)
+ }
+ },
+ {
+ highWaterMark: 0,
+ size () {
+ return 1
+ }
+ }
+ )
+
+ // 17. Run these steps, but abort when the ongoing fetch is terminated:
+
+ // 1. Set response’s body to a new body whose stream is stream.
+ response.body = { stream }
+
+ // 2. If response is not a network error and request’s cache mode is
+ // not "no-store", then update response in httpCache for request.
+ // TODO
+
+ // 3. If includeCredentials is true and the user agent is not configured
+ // to block cookies for request (see section 7 of [COOKIES]), then run the
+ // "set-cookie-string" parsing algorithm (see section 5.2 of [COOKIES]) on
+ // the value of each header whose name is a byte-case-insensitive match for
+ // `Set-Cookie` in response’s header list, if any, and request’s current URL.
+ // TODO
+
+ // 18. If aborted, then:
+ // TODO
+
+ // 19. Run these steps in parallel:
+
+ // 1. Run these steps, but abort when fetchParams is canceled:
+ fetchParams.controller.on('terminated', onAborted)
+ fetchParams.controller.resume = async () => {
+ // 1. While true
+ while (true) {
+ // 1-3. See onData...
+
+ // 4. Set bytes to the result of handling content codings given
+ // codings and bytes.
+ let bytes
+ let isFailure
+ try {
+ const { done, value } = await fetchParams.controller.next()
+
+ if (isAborted(fetchParams)) {
+ break
+ }
+
+ bytes = done ? undefined : value
+ } catch (err) {
+ if (fetchParams.controller.ended && !timingInfo.encodedBodySize) {
+ // zlib doesn't like empty streams.
+ bytes = undefined
+ } else {
+ bytes = err
+
+ // err may be propagated from the result of calling readablestream.cancel,
+ // which might not be an error. https://github.com/nodejs/undici/issues/2009
+ isFailure = true
+ }
+ }
+
+ if (bytes === undefined) {
+ // 2. Otherwise, if the bytes transmission for response’s message
+ // body is done normally and stream is readable, then close
+ // stream, finalize response for fetchParams and response, and
+ // abort these in-parallel steps.
+ readableStreamClose(fetchParams.controller.controller)
+
+ finalizeResponse(fetchParams, response)
+
+ return
+ }
+
+ // 5. Increase timingInfo’s decoded body size by bytes’s length.
+ timingInfo.decodedBodySize += bytes?.byteLength ?? 0
+
+ // 6. If bytes is failure, then terminate fetchParams’s controller.
+ if (isFailure) {
+ fetchParams.controller.terminate(bytes)
+ return
+ }
+
+ // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes
+ // into stream.
+ fetchParams.controller.controller.enqueue(new Uint8Array(bytes))
+
+ // 8. If stream is errored, then terminate the ongoing fetch.
+ if (isErrored(stream)) {
+ fetchParams.controller.terminate()
+ return
+ }
+
+ // 9. If stream doesn’t need more data ask the user agent to suspend
+ // the ongoing fetch.
+ if (!fetchParams.controller.controller.desiredSize) {
+ return
+ }
+ }
+ }
+
+ // 2. If aborted, then:
+ function onAborted (reason) {
+ // 2. If fetchParams is aborted, then:
+ if (isAborted(fetchParams)) {
+ // 1. Set response’s aborted flag.
+ response.aborted = true
+
+ // 2. If stream is readable, then error stream with the result of
+ // deserialize a serialized abort reason given fetchParams’s
+ // controller’s serialized abort reason and an
+ // implementation-defined realm.
+ if (isReadable(stream)) {
+ fetchParams.controller.controller.error(
+ fetchParams.controller.serializedAbortReason
+ )
+ }
+ } else {
+ // 3. Otherwise, if stream is readable, error stream with a TypeError.
+ if (isReadable(stream)) {
+ fetchParams.controller.controller.error(new TypeError('terminated', {
+ cause: isErrorLike(reason) ? reason : undefined
+ }))
+ }
+ }
+
+ // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame.
+ // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so.
+ fetchParams.controller.connection.destroy()
+ }
+
+ // 20. Return response.
+ return response
+
+ async function dispatch ({ body }) {
+ const url = requestCurrentURL(request)
+ /** @type {import('../..').Agent} */
+ const agent = fetchParams.controller.dispatcher
+
+ return new Promise((resolve, reject) => agent.dispatch(
+ {
+ path: url.pathname + url.search,
+ origin: url.origin,
+ method: request.method,
+ body: fetchParams.controller.dispatcher.isMockActive ? request.body && request.body.source : body,
+ headers: request.headersList.entries,
+ maxRedirections: 0,
+ upgrade: request.mode === 'websocket' ? 'websocket' : undefined
+ },
+ {
+ body: null,
+ abort: null,
+
+ onConnect (abort) {
+ // TODO (fix): Do we need connection here?
+ const { connection } = fetchParams.controller
+
+ if (connection.destroyed) {
+ abort(new DOMException('The operation was aborted.', 'AbortError'))
+ } else {
+ fetchParams.controller.on('terminated', abort)
+ this.abort = connection.abort = abort
+ }
+ },
+
+ onHeaders (status, headersList, resume, statusText) {
+ if (status < 200) {
+ return
+ }
+
+ let codings = []
+ let location = ''
+
+ const headers = new Headers()
+ for (let n = 0; n < headersList.length; n += 2) {
+ const key = headersList[n + 0].toString('latin1')
+ const val = headersList[n + 1].toString('latin1')
+
+ if (key.toLowerCase() === 'content-encoding') {
+ // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1
+ // "All content-coding values are case-insensitive..."
+ codings = val.toLowerCase().split(',').map((x) => x.trim())
+ } else if (key.toLowerCase() === 'location') {
+ location = val
+ }
+
+ headers.append(key, val)
+ }
+
+ this.body = new Readable({ read: resume })
+
+ const decoders = []
+
+ const willFollow = request.redirect === 'follow' &&
+ location &&
+ redirectStatus.includes(status)
+
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding
+ if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) {
+ for (const coding of codings) {
+ // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2
+ if (coding === 'x-gzip' || coding === 'gzip') {
+ decoders.push(zlib.createGunzip())
+ } else if (coding === 'deflate') {
+ decoders.push(zlib.createInflate())
+ } else if (coding === 'br') {
+ decoders.push(zlib.createBrotliDecompress())
+ } else {
+ decoders.length = 0
+ break
+ }
+ }
+ }
+
+ resolve({
+ status,
+ statusText,
+ headersList: headers[kHeadersList],
+ body: decoders.length
+ ? pipeline(this.body, ...decoders, () => { })
+ : this.body.on('error', () => {})
+ })
+
+ return true
+ },
+
+ onData (chunk) {
+ if (fetchParams.controller.dump) {
+ return
+ }
+
+ // 1. If one or more bytes have been transmitted from response’s
+ // message body, then:
+
+ // 1. Let bytes be the transmitted bytes.
+ const bytes = chunk
+
+ // 2. Let codings be the result of extracting header list values
+ // given `Content-Encoding` and response’s header list.
+ // See pullAlgorithm.
+
+ // 3. Increase timingInfo’s encoded body size by bytes’s length.
+ timingInfo.encodedBodySize += bytes.byteLength
+
+ // 4. See pullAlgorithm...
+
+ return this.body.push(bytes)
+ },
+
+ onComplete () {
+ if (this.abort) {
+ fetchParams.controller.off('terminated', this.abort)
+ }
+
+ fetchParams.controller.ended = true
+
+ this.body.push(null)
+ },
+
+ onError (error) {
+ if (this.abort) {
+ fetchParams.controller.off('terminated', this.abort)
+ }
+
+ this.body?.destroy(error)
+
+ fetchParams.controller.terminate(error)
+
+ reject(error)
+ },
+
+ onUpgrade (status, headersList, socket) {
+ if (status !== 101) {
+ return
+ }
+
+ const headers = new Headers()
+
+ for (let n = 0; n < headersList.length; n += 2) {
+ const key = headersList[n + 0].toString('latin1')
+ const val = headersList[n + 1].toString('latin1')
+
+ headers.append(key, val)
+ }
+
+ resolve({
+ status,
+ statusText: STATUS_CODES[status],
+ headersList: headers[kHeadersList],
+ socket
+ })
+
+ return true
+ }
+ }
+ ))
+ }
+}
+
+module.exports = {
+ fetch,
+ Fetch,
+ fetching,
+ finalizeAndReportTiming
+}
diff --git a/node_modules/undici/lib/fetch/request.js b/node_modules/undici/lib/fetch/request.js
new file mode 100644
index 0000000..5c836e4
--- /dev/null
+++ b/node_modules/undici/lib/fetch/request.js
@@ -0,0 +1,939 @@
+/* globals AbortController */
+
+'use strict'
+
+const { extractBody, mixinBody, cloneBody } = require('./body')
+const { Headers, fill: fillHeaders, HeadersList } = require('./headers')
+const { FinalizationRegistry } = require('../compat/dispatcher-weakref')()
+const util = require('../core/util')
+const {
+ isValidHTTPToken,
+ sameOrigin,
+ normalizeMethod,
+ makePolicyContainer
+} = require('./util')
+const {
+ forbiddenMethods,
+ corsSafeListedMethods,
+ referrerPolicy,
+ requestRedirect,
+ requestMode,
+ requestCredentials,
+ requestCache,
+ requestDuplex
+} = require('./constants')
+const { kEnumerableProperty } = util
+const { kHeaders, kSignal, kState, kGuard, kRealm } = require('./symbols')
+const { webidl } = require('./webidl')
+const { getGlobalOrigin } = require('./global')
+const { URLSerializer } = require('./dataURL')
+const { kHeadersList } = require('../core/symbols')
+const assert = require('assert')
+const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = require('events')
+
+let TransformStream = globalThis.TransformStream
+
+const kInit = Symbol('init')
+const kAbortController = Symbol('abortController')
+
+const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => {
+ signal.removeEventListener('abort', abort)
+})
+
+// https://fetch.spec.whatwg.org/#request-class
+class Request {
+ // https://fetch.spec.whatwg.org/#dom-request
+ constructor (input, init = {}) {
+ if (input === kInit) {
+ return
+ }
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'Request constructor' })
+
+ input = webidl.converters.RequestInfo(input)
+ init = webidl.converters.RequestInit(init)
+
+ // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object
+ this[kRealm] = {
+ settingsObject: {
+ baseUrl: getGlobalOrigin(),
+ get origin () {
+ return this.baseUrl?.origin
+ },
+ policyContainer: makePolicyContainer()
+ }
+ }
+
+ // 1. Let request be null.
+ let request = null
+
+ // 2. Let fallbackMode be null.
+ let fallbackMode = null
+
+ // 3. Let baseURL be this’s relevant settings object’s API base URL.
+ const baseUrl = this[kRealm].settingsObject.baseUrl
+
+ // 4. Let signal be null.
+ let signal = null
+
+ // 5. If input is a string, then:
+ if (typeof input === 'string') {
+ // 1. Let parsedURL be the result of parsing input with baseURL.
+ // 2. If parsedURL is failure, then throw a TypeError.
+ let parsedURL
+ try {
+ parsedURL = new URL(input, baseUrl)
+ } catch (err) {
+ throw new TypeError('Failed to parse URL from ' + input, { cause: err })
+ }
+
+ // 3. If parsedURL includes credentials, then throw a TypeError.
+ if (parsedURL.username || parsedURL.password) {
+ throw new TypeError(
+ 'Request cannot be constructed from a URL that includes credentials: ' +
+ input
+ )
+ }
+
+ // 4. Set request to a new request whose URL is parsedURL.
+ request = makeRequest({ urlList: [parsedURL] })
+
+ // 5. Set fallbackMode to "cors".
+ fallbackMode = 'cors'
+ } else {
+ // 6. Otherwise:
+
+ // 7. Assert: input is a Request object.
+ assert(input instanceof Request)
+
+ // 8. Set request to input’s request.
+ request = input[kState]
+
+ // 9. Set signal to input’s signal.
+ signal = input[kSignal]
+ }
+
+ // 7. Let origin be this’s relevant settings object’s origin.
+ const origin = this[kRealm].settingsObject.origin
+
+ // 8. Let window be "client".
+ let window = 'client'
+
+ // 9. If request’s window is an environment settings object and its origin
+ // is same origin with origin, then set window to request’s window.
+ if (
+ request.window?.constructor?.name === 'EnvironmentSettingsObject' &&
+ sameOrigin(request.window, origin)
+ ) {
+ window = request.window
+ }
+
+ // 10. If init["window"] exists and is non-null, then throw a TypeError.
+ if (init.window != null) {
+ throw new TypeError(`'window' option '${window}' must be null`)
+ }
+
+ // 11. If init["window"] exists, then set window to "no-window".
+ if ('window' in init) {
+ window = 'no-window'
+ }
+
+ // 12. Set request to a new request with the following properties:
+ request = makeRequest({
+ // URL request’s URL.
+ // undici implementation note: this is set as the first item in request's urlList in makeRequest
+ // method request’s method.
+ method: request.method,
+ // header list A copy of request’s header list.
+ // undici implementation note: headersList is cloned in makeRequest
+ headersList: request.headersList,
+ // unsafe-request flag Set.
+ unsafeRequest: request.unsafeRequest,
+ // client This’s relevant settings object.
+ client: this[kRealm].settingsObject,
+ // window window.
+ window,
+ // priority request’s priority.
+ priority: request.priority,
+ // origin request’s origin. The propagation of the origin is only significant for navigation requests
+ // being handled by a service worker. In this scenario a request can have an origin that is different
+ // from the current client.
+ origin: request.origin,
+ // referrer request’s referrer.
+ referrer: request.referrer,
+ // referrer policy request’s referrer policy.
+ referrerPolicy: request.referrerPolicy,
+ // mode request’s mode.
+ mode: request.mode,
+ // credentials mode request’s credentials mode.
+ credentials: request.credentials,
+ // cache mode request’s cache mode.
+ cache: request.cache,
+ // redirect mode request’s redirect mode.
+ redirect: request.redirect,
+ // integrity metadata request’s integrity metadata.
+ integrity: request.integrity,
+ // keepalive request’s keepalive.
+ keepalive: request.keepalive,
+ // reload-navigation flag request’s reload-navigation flag.
+ reloadNavigation: request.reloadNavigation,
+ // history-navigation flag request’s history-navigation flag.
+ historyNavigation: request.historyNavigation,
+ // URL list A clone of request’s URL list.
+ urlList: [...request.urlList]
+ })
+
+ // 13. If init is not empty, then:
+ if (Object.keys(init).length > 0) {
+ // 1. If request’s mode is "navigate", then set it to "same-origin".
+ if (request.mode === 'navigate') {
+ request.mode = 'same-origin'
+ }
+
+ // 2. Unset request’s reload-navigation flag.
+ request.reloadNavigation = false
+
+ // 3. Unset request’s history-navigation flag.
+ request.historyNavigation = false
+
+ // 4. Set request’s origin to "client".
+ request.origin = 'client'
+
+ // 5. Set request’s referrer to "client"
+ request.referrer = 'client'
+
+ // 6. Set request’s referrer policy to the empty string.
+ request.referrerPolicy = ''
+
+ // 7. Set request’s URL to request’s current URL.
+ request.url = request.urlList[request.urlList.length - 1]
+
+ // 8. Set request’s URL list to « request’s URL ».
+ request.urlList = [request.url]
+ }
+
+ // 14. If init["referrer"] exists, then:
+ if (init.referrer !== undefined) {
+ // 1. Let referrer be init["referrer"].
+ const referrer = init.referrer
+
+ // 2. If referrer is the empty string, then set request’s referrer to "no-referrer".
+ if (referrer === '') {
+ request.referrer = 'no-referrer'
+ } else {
+ // 1. Let parsedReferrer be the result of parsing referrer with
+ // baseURL.
+ // 2. If parsedReferrer is failure, then throw a TypeError.
+ let parsedReferrer
+ try {
+ parsedReferrer = new URL(referrer, baseUrl)
+ } catch (err) {
+ throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err })
+ }
+
+ // 3. If one of the following is true
+ // parsedReferrer’s cannot-be-a-base-URL is true, scheme is "about",
+ // and path contains a single string "client"
+ // parsedReferrer’s origin is not same origin with origin
+ // then set request’s referrer to "client".
+ // TODO
+
+ // 4. Otherwise, set request’s referrer to parsedReferrer.
+ request.referrer = parsedReferrer
+ }
+ }
+
+ // 15. If init["referrerPolicy"] exists, then set request’s referrer policy
+ // to it.
+ if (init.referrerPolicy !== undefined) {
+ request.referrerPolicy = init.referrerPolicy
+ }
+
+ // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise.
+ let mode
+ if (init.mode !== undefined) {
+ mode = init.mode
+ } else {
+ mode = fallbackMode
+ }
+
+ // 17. If mode is "navigate", then throw a TypeError.
+ if (mode === 'navigate') {
+ throw webidl.errors.exception({
+ header: 'Request constructor',
+ message: 'invalid request mode navigate.'
+ })
+ }
+
+ // 18. If mode is non-null, set request’s mode to mode.
+ if (mode != null) {
+ request.mode = mode
+ }
+
+ // 19. If init["credentials"] exists, then set request’s credentials mode
+ // to it.
+ if (init.credentials !== undefined) {
+ request.credentials = init.credentials
+ }
+
+ // 18. If init["cache"] exists, then set request’s cache mode to it.
+ if (init.cache !== undefined) {
+ request.cache = init.cache
+ }
+
+ // 21. If request’s cache mode is "only-if-cached" and request’s mode is
+ // not "same-origin", then throw a TypeError.
+ if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') {
+ throw new TypeError(
+ "'only-if-cached' can be set only with 'same-origin' mode"
+ )
+ }
+
+ // 22. If init["redirect"] exists, then set request’s redirect mode to it.
+ if (init.redirect !== undefined) {
+ request.redirect = init.redirect
+ }
+
+ // 23. If init["integrity"] exists, then set request’s integrity metadata to it.
+ if (init.integrity !== undefined && init.integrity != null) {
+ request.integrity = String(init.integrity)
+ }
+
+ // 24. If init["keepalive"] exists, then set request’s keepalive to it.
+ if (init.keepalive !== undefined) {
+ request.keepalive = Boolean(init.keepalive)
+ }
+
+ // 25. If init["method"] exists, then:
+ if (init.method !== undefined) {
+ // 1. Let method be init["method"].
+ let method = init.method
+
+ // 2. If method is not a method or method is a forbidden method, then
+ // throw a TypeError.
+ if (!isValidHTTPToken(init.method)) {
+ throw TypeError(`'${init.method}' is not a valid HTTP method.`)
+ }
+
+ if (forbiddenMethods.indexOf(method.toUpperCase()) !== -1) {
+ throw TypeError(`'${init.method}' HTTP method is unsupported.`)
+ }
+
+ // 3. Normalize method.
+ method = normalizeMethod(init.method)
+
+ // 4. Set request’s method to method.
+ request.method = method
+ }
+
+ // 26. If init["signal"] exists, then set signal to it.
+ if (init.signal !== undefined) {
+ signal = init.signal
+ }
+
+ // 27. Set this’s request to request.
+ this[kState] = request
+
+ // 28. Set this’s signal to a new AbortSignal object with this’s relevant
+ // Realm.
+ const ac = new AbortController()
+ this[kSignal] = ac.signal
+ this[kSignal][kRealm] = this[kRealm]
+
+ // 29. If signal is not null, then make this’s signal follow signal.
+ if (signal != null) {
+ if (
+ !signal ||
+ typeof signal.aborted !== 'boolean' ||
+ typeof signal.addEventListener !== 'function'
+ ) {
+ throw new TypeError(
+ "Failed to construct 'Request': member signal is not of type AbortSignal."
+ )
+ }
+
+ if (signal.aborted) {
+ ac.abort(signal.reason)
+ } else {
+ // Keep a strong ref to ac while request object
+ // is alive. This is needed to prevent AbortController
+ // from being prematurely garbage collected.
+ // See, https://github.com/nodejs/undici/issues/1926.
+ this[kAbortController] = ac
+
+ const acRef = new WeakRef(ac)
+ const abort = function () {
+ const ac = acRef.deref()
+ if (ac !== undefined) {
+ ac.abort(this.reason)
+ }
+ }
+
+ // Third-party AbortControllers may not work with these.
+ // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619.
+ try {
+ // If the max amount of listeners is equal to the default, increase it
+ // This is only available in node >= v19.9.0
+ if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) {
+ setMaxListeners(100, signal)
+ } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) {
+ setMaxListeners(100, signal)
+ }
+ } catch {}
+
+ signal.addEventListener('abort', abort, { once: true })
+ requestFinalizer.register(ac, { signal, abort })
+ }
+ }
+
+ // 30. Set this’s headers to a new Headers object with this’s relevant
+ // Realm, whose header list is request’s header list and guard is
+ // "request".
+ this[kHeaders] = new Headers()
+ this[kHeaders][kHeadersList] = request.headersList
+ this[kHeaders][kGuard] = 'request'
+ this[kHeaders][kRealm] = this[kRealm]
+
+ // 31. If this’s request’s mode is "no-cors", then:
+ if (mode === 'no-cors') {
+ // 1. If this’s request’s method is not a CORS-safelisted method,
+ // then throw a TypeError.
+ if (!corsSafeListedMethods.includes(request.method)) {
+ throw new TypeError(
+ `'${request.method} is unsupported in no-cors mode.`
+ )
+ }
+
+ // 2. Set this’s headers’s guard to "request-no-cors".
+ this[kHeaders][kGuard] = 'request-no-cors'
+ }
+
+ // 32. If init is not empty, then:
+ if (Object.keys(init).length !== 0) {
+ // 1. Let headers be a copy of this’s headers and its associated header
+ // list.
+ let headers = new Headers(this[kHeaders])
+
+ // 2. If init["headers"] exists, then set headers to init["headers"].
+ if (init.headers !== undefined) {
+ headers = init.headers
+ }
+
+ // 3. Empty this’s headers’s header list.
+ this[kHeaders][kHeadersList].clear()
+
+ // 4. If headers is a Headers object, then for each header in its header
+ // list, append header’s name/header’s value to this’s headers.
+ if (headers.constructor.name === 'Headers') {
+ for (const [key, val] of headers) {
+ this[kHeaders].append(key, val)
+ }
+ } else {
+ // 5. Otherwise, fill this’s headers with headers.
+ fillHeaders(this[kHeaders], headers)
+ }
+ }
+
+ // 33. Let inputBody be input’s request’s body if input is a Request
+ // object; otherwise null.
+ const inputBody = input instanceof Request ? input[kState].body : null
+
+ // 34. If either init["body"] exists and is non-null or inputBody is
+ // non-null, and request’s method is `GET` or `HEAD`, then throw a
+ // TypeError.
+ if (
+ (init.body != null || inputBody != null) &&
+ (request.method === 'GET' || request.method === 'HEAD')
+ ) {
+ throw new TypeError('Request with GET/HEAD method cannot have body.')
+ }
+
+ // 35. Let initBody be null.
+ let initBody = null
+
+ // 36. If init["body"] exists and is non-null, then:
+ if (init.body != null) {
+ // 1. Let Content-Type be null.
+ // 2. Set initBody and Content-Type to the result of extracting
+ // init["body"], with keepalive set to request’s keepalive.
+ const [extractedBody, contentType] = extractBody(
+ init.body,
+ request.keepalive
+ )
+ initBody = extractedBody
+
+ // 3, If Content-Type is non-null and this’s headers’s header list does
+ // not contain `Content-Type`, then append `Content-Type`/Content-Type to
+ // this’s headers.
+ if (contentType && !this[kHeaders][kHeadersList].contains('content-type')) {
+ this[kHeaders].append('content-type', contentType)
+ }
+ }
+
+ // 37. Let inputOrInitBody be initBody if it is non-null; otherwise
+ // inputBody.
+ const inputOrInitBody = initBody ?? inputBody
+
+ // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is
+ // null, then:
+ if (inputOrInitBody != null && inputOrInitBody.source == null) {
+ // 1. If initBody is non-null and init["duplex"] does not exist,
+ // then throw a TypeError.
+ if (initBody != null && init.duplex == null) {
+ throw new TypeError('RequestInit: duplex option is required when sending a body.')
+ }
+
+ // 2. If this’s request’s mode is neither "same-origin" nor "cors",
+ // then throw a TypeError.
+ if (request.mode !== 'same-origin' && request.mode !== 'cors') {
+ throw new TypeError(
+ 'If request is made from ReadableStream, mode should be "same-origin" or "cors"'
+ )
+ }
+
+ // 3. Set this’s request’s use-CORS-preflight flag.
+ request.useCORSPreflightFlag = true
+ }
+
+ // 39. Let finalBody be inputOrInitBody.
+ let finalBody = inputOrInitBody
+
+ // 40. If initBody is null and inputBody is non-null, then:
+ if (initBody == null && inputBody != null) {
+ // 1. If input is unusable, then throw a TypeError.
+ if (util.isDisturbed(inputBody.stream) || inputBody.stream.locked) {
+ throw new TypeError(
+ 'Cannot construct a Request with a Request object that has already been used.'
+ )
+ }
+
+ // 2. Set finalBody to the result of creating a proxy for inputBody.
+ if (!TransformStream) {
+ TransformStream = require('stream/web').TransformStream
+ }
+
+ // https://streams.spec.whatwg.org/#readablestream-create-a-proxy
+ const identityTransform = new TransformStream()
+ inputBody.stream.pipeThrough(identityTransform)
+ finalBody = {
+ source: inputBody.source,
+ length: inputBody.length,
+ stream: identityTransform.readable
+ }
+ }
+
+ // 41. Set this’s request’s body to finalBody.
+ this[kState].body = finalBody
+ }
+
+ // Returns request’s HTTP method, which is "GET" by default.
+ get method () {
+ webidl.brandCheck(this, Request)
+
+ // The method getter steps are to return this’s request’s method.
+ return this[kState].method
+ }
+
+ // Returns the URL of request as a string.
+ get url () {
+ webidl.brandCheck(this, Request)
+
+ // The url getter steps are to return this’s request’s URL, serialized.
+ return URLSerializer(this[kState].url)
+ }
+
+ // Returns a Headers object consisting of the headers associated with request.
+ // Note that headers added in the network layer by the user agent will not
+ // be accounted for in this object, e.g., the "Host" header.
+ get headers () {
+ webidl.brandCheck(this, Request)
+
+ // The headers getter steps are to return this’s headers.
+ return this[kHeaders]
+ }
+
+ // Returns the kind of resource requested by request, e.g., "document"
+ // or "script".
+ get destination () {
+ webidl.brandCheck(this, Request)
+
+ // The destination getter are to return this’s request’s destination.
+ return this[kState].destination
+ }
+
+ // Returns the referrer of request. Its value can be a same-origin URL if
+ // explicitly set in init, the empty string to indicate no referrer, and
+ // "about:client" when defaulting to the global’s default. This is used
+ // during fetching to determine the value of the `Referer` header of the
+ // request being made.
+ get referrer () {
+ webidl.brandCheck(this, Request)
+
+ // 1. If this’s request’s referrer is "no-referrer", then return the
+ // empty string.
+ if (this[kState].referrer === 'no-referrer') {
+ return ''
+ }
+
+ // 2. If this’s request’s referrer is "client", then return
+ // "about:client".
+ if (this[kState].referrer === 'client') {
+ return 'about:client'
+ }
+
+ // Return this’s request’s referrer, serialized.
+ return this[kState].referrer.toString()
+ }
+
+ // Returns the referrer policy associated with request.
+ // This is used during fetching to compute the value of the request’s
+ // referrer.
+ get referrerPolicy () {
+ webidl.brandCheck(this, Request)
+
+ // The referrerPolicy getter steps are to return this’s request’s referrer policy.
+ return this[kState].referrerPolicy
+ }
+
+ // Returns the mode associated with request, which is a string indicating
+ // whether the request will use CORS, or will be restricted to same-origin
+ // URLs.
+ get mode () {
+ webidl.brandCheck(this, Request)
+
+ // The mode getter steps are to return this’s request’s mode.
+ return this[kState].mode
+ }
+
+ // Returns the credentials mode associated with request,
+ // which is a string indicating whether credentials will be sent with the
+ // request always, never, or only when sent to a same-origin URL.
+ get credentials () {
+ // The credentials getter steps are to return this’s request’s credentials mode.
+ return this[kState].credentials
+ }
+
+ // Returns the cache mode associated with request,
+ // which is a string indicating how the request will
+ // interact with the browser’s cache when fetching.
+ get cache () {
+ webidl.brandCheck(this, Request)
+
+ // The cache getter steps are to return this’s request’s cache mode.
+ return this[kState].cache
+ }
+
+ // Returns the redirect mode associated with request,
+ // which is a string indicating how redirects for the
+ // request will be handled during fetching. A request
+ // will follow redirects by default.
+ get redirect () {
+ webidl.brandCheck(this, Request)
+
+ // The redirect getter steps are to return this’s request’s redirect mode.
+ return this[kState].redirect
+ }
+
+ // Returns request’s subresource integrity metadata, which is a
+ // cryptographic hash of the resource being fetched. Its value
+ // consists of multiple hashes separated by whitespace. [SRI]
+ get integrity () {
+ webidl.brandCheck(this, Request)
+
+ // The integrity getter steps are to return this’s request’s integrity
+ // metadata.
+ return this[kState].integrity
+ }
+
+ // Returns a boolean indicating whether or not request can outlive the
+ // global in which it was created.
+ get keepalive () {
+ webidl.brandCheck(this, Request)
+
+ // The keepalive getter steps are to return this’s request’s keepalive.
+ return this[kState].keepalive
+ }
+
+ // Returns a boolean indicating whether or not request is for a reload
+ // navigation.
+ get isReloadNavigation () {
+ webidl.brandCheck(this, Request)
+
+ // The isReloadNavigation getter steps are to return true if this’s
+ // request’s reload-navigation flag is set; otherwise false.
+ return this[kState].reloadNavigation
+ }
+
+ // Returns a boolean indicating whether or not request is for a history
+ // navigation (a.k.a. back-foward navigation).
+ get isHistoryNavigation () {
+ webidl.brandCheck(this, Request)
+
+ // The isHistoryNavigation getter steps are to return true if this’s request’s
+ // history-navigation flag is set; otherwise false.
+ return this[kState].historyNavigation
+ }
+
+ // Returns the signal associated with request, which is an AbortSignal
+ // object indicating whether or not request has been aborted, and its
+ // abort event handler.
+ get signal () {
+ webidl.brandCheck(this, Request)
+
+ // The signal getter steps are to return this’s signal.
+ return this[kSignal]
+ }
+
+ get body () {
+ webidl.brandCheck(this, Request)
+
+ return this[kState].body ? this[kState].body.stream : null
+ }
+
+ get bodyUsed () {
+ webidl.brandCheck(this, Request)
+
+ return !!this[kState].body && util.isDisturbed(this[kState].body.stream)
+ }
+
+ get duplex () {
+ webidl.brandCheck(this, Request)
+
+ return 'half'
+ }
+
+ // Returns a clone of request.
+ clone () {
+ webidl.brandCheck(this, Request)
+
+ // 1. If this is unusable, then throw a TypeError.
+ if (this.bodyUsed || this.body?.locked) {
+ throw new TypeError('unusable')
+ }
+
+ // 2. Let clonedRequest be the result of cloning this’s request.
+ const clonedRequest = cloneRequest(this[kState])
+
+ // 3. Let clonedRequestObject be the result of creating a Request object,
+ // given clonedRequest, this’s headers’s guard, and this’s relevant Realm.
+ const clonedRequestObject = new Request(kInit)
+ clonedRequestObject[kState] = clonedRequest
+ clonedRequestObject[kRealm] = this[kRealm]
+ clonedRequestObject[kHeaders] = new Headers()
+ clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList
+ clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard]
+ clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm]
+
+ // 4. Make clonedRequestObject’s signal follow this’s signal.
+ const ac = new AbortController()
+ if (this.signal.aborted) {
+ ac.abort(this.signal.reason)
+ } else {
+ this.signal.addEventListener(
+ 'abort',
+ () => {
+ ac.abort(this.signal.reason)
+ },
+ { once: true }
+ )
+ }
+ clonedRequestObject[kSignal] = ac.signal
+
+ // 4. Return clonedRequestObject.
+ return clonedRequestObject
+ }
+}
+
+mixinBody(Request)
+
+function makeRequest (init) {
+ // https://fetch.spec.whatwg.org/#requests
+ const request = {
+ method: 'GET',
+ localURLsOnly: false,
+ unsafeRequest: false,
+ body: null,
+ client: null,
+ reservedClient: null,
+ replacesClientId: '',
+ window: 'client',
+ keepalive: false,
+ serviceWorkers: 'all',
+ initiator: '',
+ destination: '',
+ priority: null,
+ origin: 'client',
+ policyContainer: 'client',
+ referrer: 'client',
+ referrerPolicy: '',
+ mode: 'no-cors',
+ useCORSPreflightFlag: false,
+ credentials: 'same-origin',
+ useCredentials: false,
+ cache: 'default',
+ redirect: 'follow',
+ integrity: '',
+ cryptoGraphicsNonceMetadata: '',
+ parserMetadata: '',
+ reloadNavigation: false,
+ historyNavigation: false,
+ userActivation: false,
+ taintedOrigin: false,
+ redirectCount: 0,
+ responseTainting: 'basic',
+ preventNoCacheCacheControlHeaderModification: false,
+ done: false,
+ timingAllowFailed: false,
+ ...init,
+ headersList: init.headersList
+ ? new HeadersList(init.headersList)
+ : new HeadersList()
+ }
+ request.url = request.urlList[0]
+ return request
+}
+
+// https://fetch.spec.whatwg.org/#concept-request-clone
+function cloneRequest (request) {
+ // To clone a request request, run these steps:
+
+ // 1. Let newRequest be a copy of request, except for its body.
+ const newRequest = makeRequest({ ...request, body: null })
+
+ // 2. If request’s body is non-null, set newRequest’s body to the
+ // result of cloning request’s body.
+ if (request.body != null) {
+ newRequest.body = cloneBody(request.body)
+ }
+
+ // 3. Return newRequest.
+ return newRequest
+}
+
+Object.defineProperties(Request.prototype, {
+ method: kEnumerableProperty,
+ url: kEnumerableProperty,
+ headers: kEnumerableProperty,
+ redirect: kEnumerableProperty,
+ clone: kEnumerableProperty,
+ signal: kEnumerableProperty,
+ duplex: kEnumerableProperty,
+ destination: kEnumerableProperty,
+ body: kEnumerableProperty,
+ bodyUsed: kEnumerableProperty,
+ isHistoryNavigation: kEnumerableProperty,
+ isReloadNavigation: kEnumerableProperty,
+ keepalive: kEnumerableProperty,
+ integrity: kEnumerableProperty,
+ cache: kEnumerableProperty,
+ credentials: kEnumerableProperty,
+ attribute: kEnumerableProperty,
+ referrerPolicy: kEnumerableProperty,
+ referrer: kEnumerableProperty,
+ mode: kEnumerableProperty,
+ [Symbol.toStringTag]: {
+ value: 'Request',
+ configurable: true
+ }
+})
+
+webidl.converters.Request = webidl.interfaceConverter(
+ Request
+)
+
+// https://fetch.spec.whatwg.org/#requestinfo
+webidl.converters.RequestInfo = function (V) {
+ if (typeof V === 'string') {
+ return webidl.converters.USVString(V)
+ }
+
+ if (V instanceof Request) {
+ return webidl.converters.Request(V)
+ }
+
+ return webidl.converters.USVString(V)
+}
+
+webidl.converters.AbortSignal = webidl.interfaceConverter(
+ AbortSignal
+)
+
+// https://fetch.spec.whatwg.org/#requestinit
+webidl.converters.RequestInit = webidl.dictionaryConverter([
+ {
+ key: 'method',
+ converter: webidl.converters.ByteString
+ },
+ {
+ key: 'headers',
+ converter: webidl.converters.HeadersInit
+ },
+ {
+ key: 'body',
+ converter: webidl.nullableConverter(
+ webidl.converters.BodyInit
+ )
+ },
+ {
+ key: 'referrer',
+ converter: webidl.converters.USVString
+ },
+ {
+ key: 'referrerPolicy',
+ converter: webidl.converters.DOMString,
+ // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy
+ allowedValues: referrerPolicy
+ },
+ {
+ key: 'mode',
+ converter: webidl.converters.DOMString,
+ // https://fetch.spec.whatwg.org/#concept-request-mode
+ allowedValues: requestMode
+ },
+ {
+ key: 'credentials',
+ converter: webidl.converters.DOMString,
+ // https://fetch.spec.whatwg.org/#requestcredentials
+ allowedValues: requestCredentials
+ },
+ {
+ key: 'cache',
+ converter: webidl.converters.DOMString,
+ // https://fetch.spec.whatwg.org/#requestcache
+ allowedValues: requestCache
+ },
+ {
+ key: 'redirect',
+ converter: webidl.converters.DOMString,
+ // https://fetch.spec.whatwg.org/#requestredirect
+ allowedValues: requestRedirect
+ },
+ {
+ key: 'integrity',
+ converter: webidl.converters.DOMString
+ },
+ {
+ key: 'keepalive',
+ converter: webidl.converters.boolean
+ },
+ {
+ key: 'signal',
+ converter: webidl.nullableConverter(
+ (signal) => webidl.converters.AbortSignal(
+ signal,
+ { strict: false }
+ )
+ )
+ },
+ {
+ key: 'window',
+ converter: webidl.converters.any
+ },
+ {
+ key: 'duplex',
+ converter: webidl.converters.DOMString,
+ allowedValues: requestDuplex
+ }
+])
+
+module.exports = { Request, makeRequest }
diff --git a/node_modules/undici/lib/fetch/response.js b/node_modules/undici/lib/fetch/response.js
new file mode 100644
index 0000000..1029dbe
--- /dev/null
+++ b/node_modules/undici/lib/fetch/response.js
@@ -0,0 +1,574 @@
+'use strict'
+
+const { Headers, HeadersList, fill } = require('./headers')
+const { extractBody, cloneBody, mixinBody } = require('./body')
+const util = require('../core/util')
+const { kEnumerableProperty } = util
+const {
+ isValidReasonPhrase,
+ isCancelled,
+ isAborted,
+ isBlobLike,
+ serializeJavascriptValueToJSONString,
+ isErrorLike,
+ isomorphicEncode
+} = require('./util')
+const {
+ redirectStatus,
+ nullBodyStatus,
+ DOMException
+} = require('./constants')
+const { kState, kHeaders, kGuard, kRealm } = require('./symbols')
+const { webidl } = require('./webidl')
+const { FormData } = require('./formdata')
+const { getGlobalOrigin } = require('./global')
+const { URLSerializer } = require('./dataURL')
+const { kHeadersList } = require('../core/symbols')
+const assert = require('assert')
+const { types } = require('util')
+
+const ReadableStream = globalThis.ReadableStream || require('stream/web').ReadableStream
+
+// https://fetch.spec.whatwg.org/#response-class
+class Response {
+ // Creates network error Response.
+ static error () {
+ // TODO
+ const relevantRealm = { settingsObject: {} }
+
+ // The static error() method steps are to return the result of creating a
+ // Response object, given a new network error, "immutable", and this’s
+ // relevant Realm.
+ const responseObject = new Response()
+ responseObject[kState] = makeNetworkError()
+ responseObject[kRealm] = relevantRealm
+ responseObject[kHeaders][kHeadersList] = responseObject[kState].headersList
+ responseObject[kHeaders][kGuard] = 'immutable'
+ responseObject[kHeaders][kRealm] = relevantRealm
+ return responseObject
+ }
+
+ // https://fetch.spec.whatwg.org/#dom-response-json
+ static json (data = undefined, init = {}) {
+ webidl.argumentLengthCheck(arguments, 1, { header: 'Response.json' })
+
+ if (init !== null) {
+ init = webidl.converters.ResponseInit(init)
+ }
+
+ // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data.
+ const bytes = new TextEncoder('utf-8').encode(
+ serializeJavascriptValueToJSONString(data)
+ )
+
+ // 2. Let body be the result of extracting bytes.
+ const body = extractBody(bytes)
+
+ // 3. Let responseObject be the result of creating a Response object, given a new response,
+ // "response", and this’s relevant Realm.
+ const relevantRealm = { settingsObject: {} }
+ const responseObject = new Response()
+ responseObject[kRealm] = relevantRealm
+ responseObject[kHeaders][kGuard] = 'response'
+ responseObject[kHeaders][kRealm] = relevantRealm
+
+ // 4. Perform initialize a response given responseObject, init, and (body, "application/json").
+ initializeResponse(responseObject, init, { body: body[0], type: 'application/json' })
+
+ // 5. Return responseObject.
+ return responseObject
+ }
+
+ // Creates a redirect Response that redirects to url with status status.
+ static redirect (url, status = 302) {
+ const relevantRealm = { settingsObject: {} }
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'Response.redirect' })
+
+ url = webidl.converters.USVString(url)
+ status = webidl.converters['unsigned short'](status)
+
+ // 1. Let parsedURL be the result of parsing url with current settings
+ // object’s API base URL.
+ // 2. If parsedURL is failure, then throw a TypeError.
+ // TODO: base-URL?
+ let parsedURL
+ try {
+ parsedURL = new URL(url, getGlobalOrigin())
+ } catch (err) {
+ throw Object.assign(new TypeError('Failed to parse URL from ' + url), {
+ cause: err
+ })
+ }
+
+ // 3. If status is not a redirect status, then throw a RangeError.
+ if (!redirectStatus.includes(status)) {
+ throw new RangeError('Invalid status code ' + status)
+ }
+
+ // 4. Let responseObject be the result of creating a Response object,
+ // given a new response, "immutable", and this’s relevant Realm.
+ const responseObject = new Response()
+ responseObject[kRealm] = relevantRealm
+ responseObject[kHeaders][kGuard] = 'immutable'
+ responseObject[kHeaders][kRealm] = relevantRealm
+
+ // 5. Set responseObject’s response’s status to status.
+ responseObject[kState].status = status
+
+ // 6. Let value be parsedURL, serialized and isomorphic encoded.
+ const value = isomorphicEncode(URLSerializer(parsedURL))
+
+ // 7. Append `Location`/value to responseObject’s response’s header list.
+ responseObject[kState].headersList.append('location', value)
+
+ // 8. Return responseObject.
+ return responseObject
+ }
+
+ // https://fetch.spec.whatwg.org/#dom-response
+ constructor (body = null, init = {}) {
+ if (body !== null) {
+ body = webidl.converters.BodyInit(body)
+ }
+
+ init = webidl.converters.ResponseInit(init)
+
+ // TODO
+ this[kRealm] = { settingsObject: {} }
+
+ // 1. Set this’s response to a new response.
+ this[kState] = makeResponse({})
+
+ // 2. Set this’s headers to a new Headers object with this’s relevant
+ // Realm, whose header list is this’s response’s header list and guard
+ // is "response".
+ this[kHeaders] = new Headers()
+ this[kHeaders][kGuard] = 'response'
+ this[kHeaders][kHeadersList] = this[kState].headersList
+ this[kHeaders][kRealm] = this[kRealm]
+
+ // 3. Let bodyWithType be null.
+ let bodyWithType = null
+
+ // 4. If body is non-null, then set bodyWithType to the result of extracting body.
+ if (body != null) {
+ const [extractedBody, type] = extractBody(body)
+ bodyWithType = { body: extractedBody, type }
+ }
+
+ // 5. Perform initialize a response given this, init, and bodyWithType.
+ initializeResponse(this, init, bodyWithType)
+ }
+
+ // Returns response’s type, e.g., "cors".
+ get type () {
+ webidl.brandCheck(this, Response)
+
+ // The type getter steps are to return this’s response’s type.
+ return this[kState].type
+ }
+
+ // Returns response’s URL, if it has one; otherwise the empty string.
+ get url () {
+ webidl.brandCheck(this, Response)
+
+ const urlList = this[kState].urlList
+
+ // The url getter steps are to return the empty string if this’s
+ // response’s URL is null; otherwise this’s response’s URL,
+ // serialized with exclude fragment set to true.
+ const url = urlList[urlList.length - 1] ?? null
+
+ if (url === null) {
+ return ''
+ }
+
+ return URLSerializer(url, true)
+ }
+
+ // Returns whether response was obtained through a redirect.
+ get redirected () {
+ webidl.brandCheck(this, Response)
+
+ // The redirected getter steps are to return true if this’s response’s URL
+ // list has more than one item; otherwise false.
+ return this[kState].urlList.length > 1
+ }
+
+ // Returns response’s status.
+ get status () {
+ webidl.brandCheck(this, Response)
+
+ // The status getter steps are to return this’s response’s status.
+ return this[kState].status
+ }
+
+ // Returns whether response’s status is an ok status.
+ get ok () {
+ webidl.brandCheck(this, Response)
+
+ // The ok getter steps are to return true if this’s response’s status is an
+ // ok status; otherwise false.
+ return this[kState].status >= 200 && this[kState].status <= 299
+ }
+
+ // Returns response’s status message.
+ get statusText () {
+ webidl.brandCheck(this, Response)
+
+ // The statusText getter steps are to return this’s response’s status
+ // message.
+ return this[kState].statusText
+ }
+
+ // Returns response’s headers as Headers.
+ get headers () {
+ webidl.brandCheck(this, Response)
+
+ // The headers getter steps are to return this’s headers.
+ return this[kHeaders]
+ }
+
+ get body () {
+ webidl.brandCheck(this, Response)
+
+ return this[kState].body ? this[kState].body.stream : null
+ }
+
+ get bodyUsed () {
+ webidl.brandCheck(this, Response)
+
+ return !!this[kState].body && util.isDisturbed(this[kState].body.stream)
+ }
+
+ // Returns a clone of response.
+ clone () {
+ webidl.brandCheck(this, Response)
+
+ // 1. If this is unusable, then throw a TypeError.
+ if (this.bodyUsed || (this.body && this.body.locked)) {
+ throw webidl.errors.exception({
+ header: 'Response.clone',
+ message: 'Body has already been consumed.'
+ })
+ }
+
+ // 2. Let clonedResponse be the result of cloning this’s response.
+ const clonedResponse = cloneResponse(this[kState])
+
+ // 3. Return the result of creating a Response object, given
+ // clonedResponse, this’s headers’s guard, and this’s relevant Realm.
+ const clonedResponseObject = new Response()
+ clonedResponseObject[kState] = clonedResponse
+ clonedResponseObject[kRealm] = this[kRealm]
+ clonedResponseObject[kHeaders][kHeadersList] = clonedResponse.headersList
+ clonedResponseObject[kHeaders][kGuard] = this[kHeaders][kGuard]
+ clonedResponseObject[kHeaders][kRealm] = this[kHeaders][kRealm]
+
+ return clonedResponseObject
+ }
+}
+
+mixinBody(Response)
+
+Object.defineProperties(Response.prototype, {
+ type: kEnumerableProperty,
+ url: kEnumerableProperty,
+ status: kEnumerableProperty,
+ ok: kEnumerableProperty,
+ redirected: kEnumerableProperty,
+ statusText: kEnumerableProperty,
+ headers: kEnumerableProperty,
+ clone: kEnumerableProperty,
+ body: kEnumerableProperty,
+ bodyUsed: kEnumerableProperty,
+ [Symbol.toStringTag]: {
+ value: 'Response',
+ configurable: true
+ }
+})
+
+Object.defineProperties(Response, {
+ json: kEnumerableProperty,
+ redirect: kEnumerableProperty,
+ error: kEnumerableProperty
+})
+
+// https://fetch.spec.whatwg.org/#concept-response-clone
+function cloneResponse (response) {
+ // To clone a response response, run these steps:
+
+ // 1. If response is a filtered response, then return a new identical
+ // filtered response whose internal response is a clone of response’s
+ // internal response.
+ if (response.internalResponse) {
+ return filterResponse(
+ cloneResponse(response.internalResponse),
+ response.type
+ )
+ }
+
+ // 2. Let newResponse be a copy of response, except for its body.
+ const newResponse = makeResponse({ ...response, body: null })
+
+ // 3. If response’s body is non-null, then set newResponse’s body to the
+ // result of cloning response’s body.
+ if (response.body != null) {
+ newResponse.body = cloneBody(response.body)
+ }
+
+ // 4. Return newResponse.
+ return newResponse
+}
+
+function makeResponse (init) {
+ return {
+ aborted: false,
+ rangeRequested: false,
+ timingAllowPassed: false,
+ requestIncludesCredentials: false,
+ type: 'default',
+ status: 200,
+ timingInfo: null,
+ cacheState: '',
+ statusText: '',
+ ...init,
+ headersList: init.headersList
+ ? new HeadersList(init.headersList)
+ : new HeadersList(),
+ urlList: init.urlList ? [...init.urlList] : []
+ }
+}
+
+function makeNetworkError (reason) {
+ const isError = isErrorLike(reason)
+ return makeResponse({
+ type: 'error',
+ status: 0,
+ error: isError
+ ? reason
+ : new Error(reason ? String(reason) : reason),
+ aborted: reason && reason.name === 'AbortError'
+ })
+}
+
+function makeFilteredResponse (response, state) {
+ state = {
+ internalResponse: response,
+ ...state
+ }
+
+ return new Proxy(response, {
+ get (target, p) {
+ return p in state ? state[p] : target[p]
+ },
+ set (target, p, value) {
+ assert(!(p in state))
+ target[p] = value
+ return true
+ }
+ })
+}
+
+// https://fetch.spec.whatwg.org/#concept-filtered-response
+function filterResponse (response, type) {
+ // Set response to the following filtered response with response as its
+ // internal response, depending on request’s response tainting:
+ if (type === 'basic') {
+ // A basic filtered response is a filtered response whose type is "basic"
+ // and header list excludes any headers in internal response’s header list
+ // whose name is a forbidden response-header name.
+
+ // Note: undici does not implement forbidden response-header names
+ return makeFilteredResponse(response, {
+ type: 'basic',
+ headersList: response.headersList
+ })
+ } else if (type === 'cors') {
+ // A CORS filtered response is a filtered response whose type is "cors"
+ // and header list excludes any headers in internal response’s header
+ // list whose name is not a CORS-safelisted response-header name, given
+ // internal response’s CORS-exposed header-name list.
+
+ // Note: undici does not implement CORS-safelisted response-header names
+ return makeFilteredResponse(response, {
+ type: 'cors',
+ headersList: response.headersList
+ })
+ } else if (type === 'opaque') {
+ // An opaque filtered response is a filtered response whose type is
+ // "opaque", URL list is the empty list, status is 0, status message
+ // is the empty byte sequence, header list is empty, and body is null.
+
+ return makeFilteredResponse(response, {
+ type: 'opaque',
+ urlList: Object.freeze([]),
+ status: 0,
+ statusText: '',
+ body: null
+ })
+ } else if (type === 'opaqueredirect') {
+ // An opaque-redirect filtered response is a filtered response whose type
+ // is "opaqueredirect", status is 0, status message is the empty byte
+ // sequence, header list is empty, and body is null.
+
+ return makeFilteredResponse(response, {
+ type: 'opaqueredirect',
+ status: 0,
+ statusText: '',
+ headersList: [],
+ body: null
+ })
+ } else {
+ assert(false)
+ }
+}
+
+// https://fetch.spec.whatwg.org/#appropriate-network-error
+function makeAppropriateNetworkError (fetchParams) {
+ // 1. Assert: fetchParams is canceled.
+ assert(isCancelled(fetchParams))
+
+ // 2. Return an aborted network error if fetchParams is aborted;
+ // otherwise return a network error.
+ return isAborted(fetchParams)
+ ? makeNetworkError(new DOMException('The operation was aborted.', 'AbortError'))
+ : makeNetworkError('Request was cancelled.')
+}
+
+// https://whatpr.org/fetch/1392.html#initialize-a-response
+function initializeResponse (response, init, body) {
+ // 1. If init["status"] is not in the range 200 to 599, inclusive, then
+ // throw a RangeError.
+ if (init.status !== null && (init.status < 200 || init.status > 599)) {
+ throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.')
+ }
+
+ // 2. If init["statusText"] does not match the reason-phrase token production,
+ // then throw a TypeError.
+ if ('statusText' in init && init.statusText != null) {
+ // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2:
+ // reason-phrase = *( HTAB / SP / VCHAR / obs-text )
+ if (!isValidReasonPhrase(String(init.statusText))) {
+ throw new TypeError('Invalid statusText')
+ }
+ }
+
+ // 3. Set response’s response’s status to init["status"].
+ if ('status' in init && init.status != null) {
+ response[kState].status = init.status
+ }
+
+ // 4. Set response’s response’s status message to init["statusText"].
+ if ('statusText' in init && init.statusText != null) {
+ response[kState].statusText = init.statusText
+ }
+
+ // 5. If init["headers"] exists, then fill response’s headers with init["headers"].
+ if ('headers' in init && init.headers != null) {
+ fill(response[kHeaders], init.headers)
+ }
+
+ // 6. If body was given, then:
+ if (body) {
+ // 1. If response's status is a null body status, then throw a TypeError.
+ if (nullBodyStatus.includes(response.status)) {
+ throw webidl.errors.exception({
+ header: 'Response constructor',
+ message: 'Invalid response status code ' + response.status
+ })
+ }
+
+ // 2. Set response's body to body's body.
+ response[kState].body = body.body
+
+ // 3. If body's type is non-null and response's header list does not contain
+ // `Content-Type`, then append (`Content-Type`, body's type) to response's header list.
+ if (body.type != null && !response[kState].headersList.contains('Content-Type')) {
+ response[kState].headersList.append('content-type', body.type)
+ }
+ }
+}
+
+webidl.converters.ReadableStream = webidl.interfaceConverter(
+ ReadableStream
+)
+
+webidl.converters.FormData = webidl.interfaceConverter(
+ FormData
+)
+
+webidl.converters.URLSearchParams = webidl.interfaceConverter(
+ URLSearchParams
+)
+
+// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit
+webidl.converters.XMLHttpRequestBodyInit = function (V) {
+ if (typeof V === 'string') {
+ return webidl.converters.USVString(V)
+ }
+
+ if (isBlobLike(V)) {
+ return webidl.converters.Blob(V, { strict: false })
+ }
+
+ if (
+ types.isAnyArrayBuffer(V) ||
+ types.isTypedArray(V) ||
+ types.isDataView(V)
+ ) {
+ return webidl.converters.BufferSource(V)
+ }
+
+ if (util.isFormDataLike(V)) {
+ return webidl.converters.FormData(V, { strict: false })
+ }
+
+ if (V instanceof URLSearchParams) {
+ return webidl.converters.URLSearchParams(V)
+ }
+
+ return webidl.converters.DOMString(V)
+}
+
+// https://fetch.spec.whatwg.org/#bodyinit
+webidl.converters.BodyInit = function (V) {
+ if (V instanceof ReadableStream) {
+ return webidl.converters.ReadableStream(V)
+ }
+
+ // Note: the spec doesn't include async iterables,
+ // this is an undici extension.
+ if (V?.[Symbol.asyncIterator]) {
+ return V
+ }
+
+ return webidl.converters.XMLHttpRequestBodyInit(V)
+}
+
+webidl.converters.ResponseInit = webidl.dictionaryConverter([
+ {
+ key: 'status',
+ converter: webidl.converters['unsigned short'],
+ defaultValue: 200
+ },
+ {
+ key: 'statusText',
+ converter: webidl.converters.ByteString,
+ defaultValue: ''
+ },
+ {
+ key: 'headers',
+ converter: webidl.converters.HeadersInit
+ }
+])
+
+module.exports = {
+ makeNetworkError,
+ makeResponse,
+ makeAppropriateNetworkError,
+ filterResponse,
+ Response,
+ cloneResponse
+}
diff --git a/node_modules/undici/lib/fetch/symbols.js b/node_modules/undici/lib/fetch/symbols.js
new file mode 100644
index 0000000..0b947d5
--- /dev/null
+++ b/node_modules/undici/lib/fetch/symbols.js
@@ -0,0 +1,10 @@
+'use strict'
+
+module.exports = {
+ kUrl: Symbol('url'),
+ kHeaders: Symbol('headers'),
+ kSignal: Symbol('signal'),
+ kState: Symbol('state'),
+ kGuard: Symbol('guard'),
+ kRealm: Symbol('realm')
+}
diff --git a/node_modules/undici/lib/fetch/util.js b/node_modules/undici/lib/fetch/util.js
new file mode 100644
index 0000000..400687b
--- /dev/null
+++ b/node_modules/undici/lib/fetch/util.js
@@ -0,0 +1,1033 @@
+'use strict'
+
+const { redirectStatus, badPorts, referrerPolicy: referrerPolicyTokens } = require('./constants')
+const { getGlobalOrigin } = require('./global')
+const { performance } = require('perf_hooks')
+const { isBlobLike, toUSVString, ReadableStreamFrom } = require('../core/util')
+const assert = require('assert')
+const { isUint8Array } = require('util/types')
+
+// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable
+/** @type {import('crypto')|undefined} */
+let crypto
+
+try {
+ crypto = require('crypto')
+} catch {
+
+}
+
+function responseURL (response) {
+ // https://fetch.spec.whatwg.org/#responses
+ // A response has an associated URL. It is a pointer to the last URL
+ // in response’s URL list and null if response’s URL list is empty.
+ const urlList = response.urlList
+ const length = urlList.length
+ return length === 0 ? null : urlList[length - 1].toString()
+}
+
+// https://fetch.spec.whatwg.org/#concept-response-location-url
+function responseLocationURL (response, requestFragment) {
+ // 1. If response’s status is not a redirect status, then return null.
+ if (!redirectStatus.includes(response.status)) {
+ return null
+ }
+
+ // 2. Let location be the result of extracting header list values given
+ // `Location` and response’s header list.
+ let location = response.headersList.get('location')
+
+ // 3. If location is a header value, then set location to the result of
+ // parsing location with response’s URL.
+ if (location !== null && isValidHeaderValue(location)) {
+ location = new URL(location, responseURL(response))
+ }
+
+ // 4. If location is a URL whose fragment is null, then set location’s
+ // fragment to requestFragment.
+ if (location && !location.hash) {
+ location.hash = requestFragment
+ }
+
+ // 5. Return location.
+ return location
+}
+
+/** @returns {URL} */
+function requestCurrentURL (request) {
+ return request.urlList[request.urlList.length - 1]
+}
+
+function requestBadPort (request) {
+ // 1. Let url be request’s current URL.
+ const url = requestCurrentURL(request)
+
+ // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port,
+ // then return blocked.
+ if (urlIsHttpHttpsScheme(url) && badPorts.includes(url.port)) {
+ return 'blocked'
+ }
+
+ // 3. Return allowed.
+ return 'allowed'
+}
+
+function isErrorLike (object) {
+ return object instanceof Error || (
+ object?.constructor?.name === 'Error' ||
+ object?.constructor?.name === 'DOMException'
+ )
+}
+
+// Check whether |statusText| is a ByteString and
+// matches the Reason-Phrase token production.
+// RFC 2616: https://tools.ietf.org/html/rfc2616
+// RFC 7230: https://tools.ietf.org/html/rfc7230
+// "reason-phrase = *( HTAB / SP / VCHAR / obs-text )"
+// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116
+function isValidReasonPhrase (statusText) {
+ for (let i = 0; i < statusText.length; ++i) {
+ const c = statusText.charCodeAt(i)
+ if (
+ !(
+ (
+ c === 0x09 || // HTAB
+ (c >= 0x20 && c <= 0x7e) || // SP / VCHAR
+ (c >= 0x80 && c <= 0xff)
+ ) // obs-text
+ )
+ ) {
+ return false
+ }
+ }
+ return true
+}
+
+function isTokenChar (c) {
+ return !(
+ c >= 0x7f ||
+ c <= 0x20 ||
+ c === '(' ||
+ c === ')' ||
+ c === '<' ||
+ c === '>' ||
+ c === '@' ||
+ c === ',' ||
+ c === ';' ||
+ c === ':' ||
+ c === '\\' ||
+ c === '"' ||
+ c === '/' ||
+ c === '[' ||
+ c === ']' ||
+ c === '?' ||
+ c === '=' ||
+ c === '{' ||
+ c === '}'
+ )
+}
+
+// See RFC 7230, Section 3.2.6.
+// https://github.com/chromium/chromium/blob/d7da0240cae77824d1eda25745c4022757499131/third_party/blink/renderer/platform/network/http_parsers.cc#L321
+function isValidHTTPToken (characters) {
+ if (!characters || typeof characters !== 'string') {
+ return false
+ }
+ for (let i = 0; i < characters.length; ++i) {
+ const c = characters.charCodeAt(i)
+ if (c > 0x7f || !isTokenChar(c)) {
+ return false
+ }
+ }
+ return true
+}
+
+// https://fetch.spec.whatwg.org/#header-name
+// https://github.com/chromium/chromium/blob/b3d37e6f94f87d59e44662d6078f6a12de845d17/net/http/http_util.cc#L342
+function isValidHeaderName (potentialValue) {
+ if (potentialValue.length === 0) {
+ return false
+ }
+
+ return isValidHTTPToken(potentialValue)
+}
+
+/**
+ * @see https://fetch.spec.whatwg.org/#header-value
+ * @param {string} potentialValue
+ */
+function isValidHeaderValue (potentialValue) {
+ // - Has no leading or trailing HTTP tab or space bytes.
+ // - Contains no 0x00 (NUL) or HTTP newline bytes.
+ if (
+ potentialValue.startsWith('\t') ||
+ potentialValue.startsWith(' ') ||
+ potentialValue.endsWith('\t') ||
+ potentialValue.endsWith(' ')
+ ) {
+ return false
+ }
+
+ if (
+ potentialValue.includes('\0') ||
+ potentialValue.includes('\r') ||
+ potentialValue.includes('\n')
+ ) {
+ return false
+ }
+
+ return true
+}
+
+// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect
+function setRequestReferrerPolicyOnRedirect (request, actualResponse) {
+ // Given a request request and a response actualResponse, this algorithm
+ // updates request’s referrer policy according to the Referrer-Policy
+ // header (if any) in actualResponse.
+
+ // 1. Let policy be the result of executing § 8.1 Parse a referrer policy
+ // from a Referrer-Policy header on actualResponse.
+
+ // 8.1 Parse a referrer policy from a Referrer-Policy header
+ // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list.
+ const { headersList } = actualResponse
+ // 2. Let policy be the empty string.
+ // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token.
+ // 4. Return policy.
+ const policyHeader = (headersList.get('referrer-policy') ?? '').split(',')
+
+ // Note: As the referrer-policy can contain multiple policies
+ // separated by comma, we need to loop through all of them
+ // and pick the first valid one.
+ // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy
+ let policy = ''
+ if (policyHeader.length > 0) {
+ // The right-most policy takes precedence.
+ // The left-most policy is the fallback.
+ for (let i = policyHeader.length; i !== 0; i--) {
+ const token = policyHeader[i - 1].trim()
+ if (referrerPolicyTokens.includes(token)) {
+ policy = token
+ break
+ }
+ }
+ }
+
+ // 2. If policy is not the empty string, then set request’s referrer policy to policy.
+ if (policy !== '') {
+ request.referrerPolicy = policy
+ }
+}
+
+// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check
+function crossOriginResourcePolicyCheck () {
+ // TODO
+ return 'allowed'
+}
+
+// https://fetch.spec.whatwg.org/#concept-cors-check
+function corsCheck () {
+ // TODO
+ return 'success'
+}
+
+// https://fetch.spec.whatwg.org/#concept-tao-check
+function TAOCheck () {
+ // TODO
+ return 'success'
+}
+
+function appendFetchMetadata (httpRequest) {
+ // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header
+ // TODO
+
+ // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header
+
+ // 1. Assert: r’s url is a potentially trustworthy URL.
+ // TODO
+
+ // 2. Let header be a Structured Header whose value is a token.
+ let header = null
+
+ // 3. Set header’s value to r’s mode.
+ header = httpRequest.mode
+
+ // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list.
+ httpRequest.headersList.set('sec-fetch-mode', header)
+
+ // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header
+ // TODO
+
+ // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header
+ // TODO
+}
+
+// https://fetch.spec.whatwg.org/#append-a-request-origin-header
+function appendRequestOriginHeader (request) {
+ // 1. Let serializedOrigin be the result of byte-serializing a request origin with request.
+ let serializedOrigin = request.origin
+
+ // 2. If request’s response tainting is "cors" or request’s mode is "websocket", then append (`Origin`, serializedOrigin) to request’s header list.
+ if (request.responseTainting === 'cors' || request.mode === 'websocket') {
+ if (serializedOrigin) {
+ request.headersList.append('origin', serializedOrigin)
+ }
+
+ // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then:
+ } else if (request.method !== 'GET' && request.method !== 'HEAD') {
+ // 1. Switch on request’s referrer policy:
+ switch (request.referrerPolicy) {
+ case 'no-referrer':
+ // Set serializedOrigin to `null`.
+ serializedOrigin = null
+ break
+ case 'no-referrer-when-downgrade':
+ case 'strict-origin':
+ case 'strict-origin-when-cross-origin':
+ // If request’s origin is a tuple origin, its scheme is "https", and request’s current URL’s scheme is not "https", then set serializedOrigin to `null`.
+ if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) {
+ serializedOrigin = null
+ }
+ break
+ case 'same-origin':
+ // If request’s origin is not same origin with request’s current URL’s origin, then set serializedOrigin to `null`.
+ if (!sameOrigin(request, requestCurrentURL(request))) {
+ serializedOrigin = null
+ }
+ break
+ default:
+ // Do nothing.
+ }
+
+ if (serializedOrigin) {
+ // 2. Append (`Origin`, serializedOrigin) to request’s header list.
+ request.headersList.append('origin', serializedOrigin)
+ }
+ }
+}
+
+function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) {
+ // TODO
+ return performance.now()
+}
+
+// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info
+function createOpaqueTimingInfo (timingInfo) {
+ return {
+ startTime: timingInfo.startTime ?? 0,
+ redirectStartTime: 0,
+ redirectEndTime: 0,
+ postRedirectStartTime: timingInfo.startTime ?? 0,
+ finalServiceWorkerStartTime: 0,
+ finalNetworkResponseStartTime: 0,
+ finalNetworkRequestStartTime: 0,
+ endTime: 0,
+ encodedBodySize: 0,
+ decodedBodySize: 0,
+ finalConnectionTimingInfo: null
+ }
+}
+
+// https://html.spec.whatwg.org/multipage/origin.html#policy-container
+function makePolicyContainer () {
+ // Note: the fetch spec doesn't make use of embedder policy or CSP list
+ return {
+ referrerPolicy: 'strict-origin-when-cross-origin'
+ }
+}
+
+// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container
+function clonePolicyContainer (policyContainer) {
+ return {
+ referrerPolicy: policyContainer.referrerPolicy
+ }
+}
+
+// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer
+function determineRequestsReferrer (request) {
+ // 1. Let policy be request's referrer policy.
+ const policy = request.referrerPolicy
+
+ // Note: policy cannot (shouldn't) be null or an empty string.
+ assert(policy)
+
+ // 2. Let environment be request’s client.
+
+ let referrerSource = null
+
+ // 3. Switch on request’s referrer:
+ if (request.referrer === 'client') {
+ // Note: node isn't a browser and doesn't implement document/iframes,
+ // so we bypass this step and replace it with our own.
+
+ const globalOrigin = getGlobalOrigin()
+
+ if (!globalOrigin || globalOrigin.origin === 'null') {
+ return 'no-referrer'
+ }
+
+ // note: we need to clone it as it's mutated
+ referrerSource = new URL(globalOrigin)
+ } else if (request.referrer instanceof URL) {
+ // Let referrerSource be request’s referrer.
+ referrerSource = request.referrer
+ }
+
+ // 4. Let request’s referrerURL be the result of stripping referrerSource for
+ // use as a referrer.
+ let referrerURL = stripURLForReferrer(referrerSource)
+
+ // 5. Let referrerOrigin be the result of stripping referrerSource for use as
+ // a referrer, with the origin-only flag set to true.
+ const referrerOrigin = stripURLForReferrer(referrerSource, true)
+
+ // 6. If the result of serializing referrerURL is a string whose length is
+ // greater than 4096, set referrerURL to referrerOrigin.
+ if (referrerURL.toString().length > 4096) {
+ referrerURL = referrerOrigin
+ }
+
+ const areSameOrigin = sameOrigin(request, referrerURL)
+ const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) &&
+ !isURLPotentiallyTrustworthy(request.url)
+
+ // 8. Execute the switch statements corresponding to the value of policy:
+ switch (policy) {
+ case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true)
+ case 'unsafe-url': return referrerURL
+ case 'same-origin':
+ return areSameOrigin ? referrerOrigin : 'no-referrer'
+ case 'origin-when-cross-origin':
+ return areSameOrigin ? referrerURL : referrerOrigin
+ case 'strict-origin-when-cross-origin': {
+ const currentURL = requestCurrentURL(request)
+
+ // 1. If the origin of referrerURL and the origin of request’s current
+ // URL are the same, then return referrerURL.
+ if (sameOrigin(referrerURL, currentURL)) {
+ return referrerURL
+ }
+
+ // 2. If referrerURL is a potentially trustworthy URL and request’s
+ // current URL is not a potentially trustworthy URL, then return no
+ // referrer.
+ if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {
+ return 'no-referrer'
+ }
+
+ // 3. Return referrerOrigin.
+ return referrerOrigin
+ }
+ case 'strict-origin': // eslint-disable-line
+ /**
+ * 1. If referrerURL is a potentially trustworthy URL and
+ * request’s current URL is not a potentially trustworthy URL,
+ * then return no referrer.
+ * 2. Return referrerOrigin
+ */
+ case 'no-referrer-when-downgrade': // eslint-disable-line
+ /**
+ * 1. If referrerURL is a potentially trustworthy URL and
+ * request’s current URL is not a potentially trustworthy URL,
+ * then return no referrer.
+ * 2. Return referrerOrigin
+ */
+
+ default: // eslint-disable-line
+ return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin
+ }
+}
+
+/**
+ * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url
+ * @param {URL} url
+ * @param {boolean|undefined} originOnly
+ */
+function stripURLForReferrer (url, originOnly) {
+ // 1. Assert: url is a URL.
+ assert(url instanceof URL)
+
+ // 2. If url’s scheme is a local scheme, then return no referrer.
+ if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') {
+ return 'no-referrer'
+ }
+
+ // 3. Set url’s username to the empty string.
+ url.username = ''
+
+ // 4. Set url’s password to the empty string.
+ url.password = ''
+
+ // 5. Set url’s fragment to null.
+ url.hash = ''
+
+ // 6. If the origin-only flag is true, then:
+ if (originOnly) {
+ // 1. Set url’s path to « the empty string ».
+ url.pathname = ''
+
+ // 2. Set url’s query to null.
+ url.search = ''
+ }
+
+ // 7. Return url.
+ return url
+}
+
+function isURLPotentiallyTrustworthy (url) {
+ if (!(url instanceof URL)) {
+ return false
+ }
+
+ // If child of about, return true
+ if (url.href === 'about:blank' || url.href === 'about:srcdoc') {
+ return true
+ }
+
+ // If scheme is data, return true
+ if (url.protocol === 'data:') return true
+
+ // If file, return true
+ if (url.protocol === 'file:') return true
+
+ return isOriginPotentiallyTrustworthy(url.origin)
+
+ function isOriginPotentiallyTrustworthy (origin) {
+ // If origin is explicitly null, return false
+ if (origin == null || origin === 'null') return false
+
+ const originAsURL = new URL(origin)
+
+ // If secure, return true
+ if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') {
+ return true
+ }
+
+ // If localhost or variants, return true
+ if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) ||
+ (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) ||
+ (originAsURL.hostname.endsWith('.localhost'))) {
+ return true
+ }
+
+ // If any other, return false
+ return false
+ }
+}
+
+/**
+ * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist
+ * @param {Uint8Array} bytes
+ * @param {string} metadataList
+ */
+function bytesMatch (bytes, metadataList) {
+ // If node is not built with OpenSSL support, we cannot check
+ // a request's integrity, so allow it by default (the spec will
+ // allow requests if an invalid hash is given, as precedence).
+ /* istanbul ignore if: only if node is built with --without-ssl */
+ if (crypto === undefined) {
+ return true
+ }
+
+ // 1. Let parsedMetadata be the result of parsing metadataList.
+ const parsedMetadata = parseMetadata(metadataList)
+
+ // 2. If parsedMetadata is no metadata, return true.
+ if (parsedMetadata === 'no metadata') {
+ return true
+ }
+
+ // 3. If parsedMetadata is the empty set, return true.
+ if (parsedMetadata.length === 0) {
+ return true
+ }
+
+ // 4. Let metadata be the result of getting the strongest
+ // metadata from parsedMetadata.
+ const list = parsedMetadata.sort((c, d) => d.algo.localeCompare(c.algo))
+ // get the strongest algorithm
+ const strongest = list[0].algo
+ // get all entries that use the strongest algorithm; ignore weaker
+ const metadata = list.filter((item) => item.algo === strongest)
+
+ // 5. For each item in metadata:
+ for (const item of metadata) {
+ // 1. Let algorithm be the alg component of item.
+ const algorithm = item.algo
+
+ // 2. Let expectedValue be the val component of item.
+ const expectedValue = item.hash
+
+ // 3. Let actualValue be the result of applying algorithm to bytes.
+ const actualValue = crypto.createHash(algorithm).update(bytes).digest('base64')
+
+ // 4. If actualValue is a case-sensitive match for expectedValue,
+ // return true.
+ if (actualValue === expectedValue) {
+ return true
+ }
+ }
+
+ // 6. Return false.
+ return false
+}
+
+// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options
+// https://www.w3.org/TR/CSP2/#source-list-syntax
+// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1
+const parseHashWithOptions = /((?<algo>sha256|sha384|sha512)-(?<hash>[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i
+
+/**
+ * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata
+ * @param {string} metadata
+ */
+function parseMetadata (metadata) {
+ // 1. Let result be the empty set.
+ /** @type {{ algo: string, hash: string }[]} */
+ const result = []
+
+ // 2. Let empty be equal to true.
+ let empty = true
+
+ const supportedHashes = crypto.getHashes()
+
+ // 3. For each token returned by splitting metadata on spaces:
+ for (const token of metadata.split(' ')) {
+ // 1. Set empty to false.
+ empty = false
+
+ // 2. Parse token as a hash-with-options.
+ const parsedToken = parseHashWithOptions.exec(token)
+
+ // 3. If token does not parse, continue to the next token.
+ if (parsedToken === null || parsedToken.groups === undefined) {
+ // Note: Chromium blocks the request at this point, but Firefox
+ // gives a warning that an invalid integrity was given. The
+ // correct behavior is to ignore these, and subsequently not
+ // check the integrity of the resource.
+ continue
+ }
+
+ // 4. Let algorithm be the hash-algo component of token.
+ const algorithm = parsedToken.groups.algo
+
+ // 5. If algorithm is a hash function recognized by the user
+ // agent, add the parsed token to result.
+ if (supportedHashes.includes(algorithm.toLowerCase())) {
+ result.push(parsedToken.groups)
+ }
+ }
+
+ // 4. Return no metadata if empty is true, otherwise return result.
+ if (empty === true) {
+ return 'no metadata'
+ }
+
+ return result
+}
+
+// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request
+function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) {
+ // TODO
+}
+
+/**
+ * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin}
+ * @param {URL} A
+ * @param {URL} B
+ */
+function sameOrigin (A, B) {
+ // 1. If A and B are the same opaque origin, then return true.
+ if (A.origin === B.origin && A.origin === 'null') {
+ return true
+ }
+
+ // 2. If A and B are both tuple origins and their schemes,
+ // hosts, and port are identical, then return true.
+ if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) {
+ return true
+ }
+
+ // 3. Return false.
+ return false
+}
+
+function createDeferredPromise () {
+ let res
+ let rej
+ const promise = new Promise((resolve, reject) => {
+ res = resolve
+ rej = reject
+ })
+
+ return { promise, resolve: res, reject: rej }
+}
+
+function isAborted (fetchParams) {
+ return fetchParams.controller.state === 'aborted'
+}
+
+function isCancelled (fetchParams) {
+ return fetchParams.controller.state === 'aborted' ||
+ fetchParams.controller.state === 'terminated'
+}
+
+// https://fetch.spec.whatwg.org/#concept-method-normalize
+function normalizeMethod (method) {
+ return /^(DELETE|GET|HEAD|OPTIONS|POST|PUT)$/i.test(method)
+ ? method.toUpperCase()
+ : method
+}
+
+// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string
+function serializeJavascriptValueToJSONString (value) {
+ // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »).
+ const result = JSON.stringify(value)
+
+ // 2. If result is undefined, then throw a TypeError.
+ if (result === undefined) {
+ throw new TypeError('Value is not JSON serializable')
+ }
+
+ // 3. Assert: result is a string.
+ assert(typeof result === 'string')
+
+ // 4. Return result.
+ return result
+}
+
+// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object
+const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))
+
+/**
+ * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object
+ * @param {() => unknown[]} iterator
+ * @param {string} name name of the instance
+ * @param {'key'|'value'|'key+value'} kind
+ */
+function makeIterator (iterator, name, kind) {
+ const object = {
+ index: 0,
+ kind,
+ target: iterator
+ }
+
+ const i = {
+ next () {
+ // 1. Let interface be the interface for which the iterator prototype object exists.
+
+ // 2. Let thisValue be the this value.
+
+ // 3. Let object be ? ToObject(thisValue).
+
+ // 4. If object is a platform object, then perform a security
+ // check, passing:
+
+ // 5. If object is not a default iterator object for interface,
+ // then throw a TypeError.
+ if (Object.getPrototypeOf(this) !== i) {
+ throw new TypeError(
+ `'next' called on an object that does not implement interface ${name} Iterator.`
+ )
+ }
+
+ // 6. Let index be object’s index.
+ // 7. Let kind be object’s kind.
+ // 8. Let values be object’s target's value pairs to iterate over.
+ const { index, kind, target } = object
+ const values = target()
+
+ // 9. Let len be the length of values.
+ const len = values.length
+
+ // 10. If index is greater than or equal to len, then return
+ // CreateIterResultObject(undefined, true).
+ if (index >= len) {
+ return { value: undefined, done: true }
+ }
+
+ // 11. Let pair be the entry in values at index index.
+ const pair = values[index]
+
+ // 12. Set object’s index to index + 1.
+ object.index = index + 1
+
+ // 13. Return the iterator result for pair and kind.
+ return iteratorResult(pair, kind)
+ },
+ // The class string of an iterator prototype object for a given interface is the
+ // result of concatenating the identifier of the interface and the string " Iterator".
+ [Symbol.toStringTag]: `${name} Iterator`
+ }
+
+ // The [[Prototype]] internal slot of an iterator prototype object must be %IteratorPrototype%.
+ Object.setPrototypeOf(i, esIteratorPrototype)
+ // esIteratorPrototype needs to be the prototype of i
+ // which is the prototype of an empty object. Yes, it's confusing.
+ return Object.setPrototypeOf({}, i)
+}
+
+// https://webidl.spec.whatwg.org/#iterator-result
+function iteratorResult (pair, kind) {
+ let result
+
+ // 1. Let result be a value determined by the value of kind:
+ switch (kind) {
+ case 'key': {
+ // 1. Let idlKey be pair’s key.
+ // 2. Let key be the result of converting idlKey to an
+ // ECMAScript value.
+ // 3. result is key.
+ result = pair[0]
+ break
+ }
+ case 'value': {
+ // 1. Let idlValue be pair’s value.
+ // 2. Let value be the result of converting idlValue to
+ // an ECMAScript value.
+ // 3. result is value.
+ result = pair[1]
+ break
+ }
+ case 'key+value': {
+ // 1. Let idlKey be pair’s key.
+ // 2. Let idlValue be pair’s value.
+ // 3. Let key be the result of converting idlKey to an
+ // ECMAScript value.
+ // 4. Let value be the result of converting idlValue to
+ // an ECMAScript value.
+ // 5. Let array be ! ArrayCreate(2).
+ // 6. Call ! CreateDataProperty(array, "0", key).
+ // 7. Call ! CreateDataProperty(array, "1", value).
+ // 8. result is array.
+ result = pair
+ break
+ }
+ }
+
+ // 2. Return CreateIterResultObject(result, false).
+ return { value: result, done: false }
+}
+
+/**
+ * @see https://fetch.spec.whatwg.org/#body-fully-read
+ */
+function fullyReadBody (body, processBody, processBodyError) {
+ // 1. If taskDestination is null, then set taskDestination to
+ // the result of starting a new parallel queue.
+
+ // 2. Let successSteps given a byte sequence bytes be to queue a
+ // fetch task to run processBody given bytes, with taskDestination.
+ const successSteps = (bytes) => queueMicrotask(() => processBody(bytes))
+
+ // 3. Let errorSteps be to queue a fetch task to run processBodyError,
+ // with taskDestination.
+ const errorSteps = (error) => queueMicrotask(() => processBodyError(error))
+
+ // 4. Let reader be the result of getting a reader for body’s stream.
+ // If that threw an exception, then run errorSteps with that
+ // exception and return.
+ let reader
+
+ try {
+ reader = body.stream.getReader()
+ } catch (e) {
+ errorSteps(e)
+ return
+ }
+
+ // 5. Read all bytes from reader, given successSteps and errorSteps.
+ readAllBytes(reader, successSteps, errorSteps)
+}
+
+/** @type {ReadableStream} */
+let ReadableStream = globalThis.ReadableStream
+
+function isReadableStreamLike (stream) {
+ if (!ReadableStream) {
+ ReadableStream = require('stream/web').ReadableStream
+ }
+
+ return stream instanceof ReadableStream || (
+ stream[Symbol.toStringTag] === 'ReadableStream' &&
+ typeof stream.tee === 'function'
+ )
+}
+
+const MAXIMUM_ARGUMENT_LENGTH = 65535
+
+/**
+ * @see https://infra.spec.whatwg.org/#isomorphic-decode
+ * @param {number[]|Uint8Array} input
+ */
+function isomorphicDecode (input) {
+ // 1. To isomorphic decode a byte sequence input, return a string whose code point
+ // length is equal to input’s length and whose code points have the same values
+ // as the values of input’s bytes, in the same order.
+
+ if (input.length < MAXIMUM_ARGUMENT_LENGTH) {
+ return String.fromCharCode(...input)
+ }
+
+ return input.reduce((previous, current) => previous + String.fromCharCode(current), '')
+}
+
+/**
+ * @param {ReadableStreamController<Uint8Array>} controller
+ */
+function readableStreamClose (controller) {
+ try {
+ controller.close()
+ } catch (err) {
+ // TODO: add comment explaining why this error occurs.
+ if (!err.message.includes('Controller is already closed')) {
+ throw err
+ }
+ }
+}
+
+/**
+ * @see https://infra.spec.whatwg.org/#isomorphic-encode
+ * @param {string} input
+ */
+function isomorphicEncode (input) {
+ // 1. Assert: input contains no code points greater than U+00FF.
+ for (let i = 0; i < input.length; i++) {
+ assert(input.charCodeAt(i) <= 0xFF)
+ }
+
+ // 2. Return a byte sequence whose length is equal to input’s code
+ // point length and whose bytes have the same values as the
+ // values of input’s code points, in the same order
+ return input
+}
+
+/**
+ * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes
+ * @see https://streams.spec.whatwg.org/#read-loop
+ * @param {ReadableStreamDefaultReader} reader
+ * @param {(bytes: Uint8Array) => void} successSteps
+ * @param {(error: Error) => void} failureSteps
+ */
+async function readAllBytes (reader, successSteps, failureSteps) {
+ const bytes = []
+ let byteLength = 0
+
+ while (true) {
+ let done
+ let chunk
+
+ try {
+ ({ done, value: chunk } = await reader.read())
+ } catch (e) {
+ // 1. Call failureSteps with e.
+ failureSteps(e)
+ return
+ }
+
+ if (done) {
+ // 1. Call successSteps with bytes.
+ successSteps(Buffer.concat(bytes, byteLength))
+ return
+ }
+
+ // 1. If chunk is not a Uint8Array object, call failureSteps
+ // with a TypeError and abort these steps.
+ if (!isUint8Array(chunk)) {
+ failureSteps(new TypeError('Received non-Uint8Array chunk'))
+ return
+ }
+
+ // 2. Append the bytes represented by chunk to bytes.
+ bytes.push(chunk)
+ byteLength += chunk.length
+
+ // 3. Read-loop given reader, bytes, successSteps, and failureSteps.
+ }
+}
+
+/**
+ * @see https://fetch.spec.whatwg.org/#is-local
+ * @param {URL} url
+ */
+function urlIsLocal (url) {
+ assert('protocol' in url) // ensure it's a url object
+
+ const protocol = url.protocol
+
+ return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:'
+}
+
+/**
+ * @param {string|URL} url
+ */
+function urlHasHttpsScheme (url) {
+ if (typeof url === 'string') {
+ return url.startsWith('https:')
+ }
+
+ return url.protocol === 'https:'
+}
+
+/**
+ * @see https://fetch.spec.whatwg.org/#http-scheme
+ * @param {URL} url
+ */
+function urlIsHttpHttpsScheme (url) {
+ assert('protocol' in url) // ensure it's a url object
+
+ const protocol = url.protocol
+
+ return protocol === 'http:' || protocol === 'https:'
+}
+
+/**
+ * Fetch supports node >= 16.8.0, but Object.hasOwn was added in v16.9.0.
+ */
+const hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key))
+
+module.exports = {
+ isAborted,
+ isCancelled,
+ createDeferredPromise,
+ ReadableStreamFrom,
+ toUSVString,
+ tryUpgradeRequestToAPotentiallyTrustworthyURL,
+ coarsenedSharedCurrentTime,
+ determineRequestsReferrer,
+ makePolicyContainer,
+ clonePolicyContainer,
+ appendFetchMetadata,
+ appendRequestOriginHeader,
+ TAOCheck,
+ corsCheck,
+ crossOriginResourcePolicyCheck,
+ createOpaqueTimingInfo,
+ setRequestReferrerPolicyOnRedirect,
+ isValidHTTPToken,
+ requestBadPort,
+ requestCurrentURL,
+ responseURL,
+ responseLocationURL,
+ isBlobLike,
+ isURLPotentiallyTrustworthy,
+ isValidReasonPhrase,
+ sameOrigin,
+ normalizeMethod,
+ serializeJavascriptValueToJSONString,
+ makeIterator,
+ isValidHeaderName,
+ isValidHeaderValue,
+ hasOwn,
+ isErrorLike,
+ fullyReadBody,
+ bytesMatch,
+ isReadableStreamLike,
+ readableStreamClose,
+ isomorphicEncode,
+ isomorphicDecode,
+ urlIsLocal,
+ urlHasHttpsScheme,
+ urlIsHttpHttpsScheme,
+ readAllBytes
+}
diff --git a/node_modules/undici/lib/fetch/webidl.js b/node_modules/undici/lib/fetch/webidl.js
new file mode 100644
index 0000000..38a05e6
--- /dev/null
+++ b/node_modules/undici/lib/fetch/webidl.js
@@ -0,0 +1,648 @@
+'use strict'
+
+const { types } = require('util')
+const { hasOwn, toUSVString } = require('./util')
+
+/** @type {import('../../types/webidl').Webidl} */
+const webidl = {}
+webidl.converters = {}
+webidl.util = {}
+webidl.errors = {}
+
+webidl.errors.exception = function (message) {
+ return new TypeError(`${message.header}: ${message.message}`)
+}
+
+webidl.errors.conversionFailed = function (context) {
+ const plural = context.types.length === 1 ? '' : ' one of'
+ const message =
+ `${context.argument} could not be converted to` +
+ `${plural}: ${context.types.join(', ')}.`
+
+ return webidl.errors.exception({
+ header: context.prefix,
+ message
+ })
+}
+
+webidl.errors.invalidArgument = function (context) {
+ return webidl.errors.exception({
+ header: context.prefix,
+ message: `"${context.value}" is an invalid ${context.type}.`
+ })
+}
+
+// https://webidl.spec.whatwg.org/#implements
+webidl.brandCheck = function (V, I, opts = undefined) {
+ if (opts?.strict !== false && !(V instanceof I)) {
+ throw new TypeError('Illegal invocation')
+ } else {
+ return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag]
+ }
+}
+
+webidl.argumentLengthCheck = function ({ length }, min, ctx) {
+ if (length < min) {
+ throw webidl.errors.exception({
+ message: `${min} argument${min !== 1 ? 's' : ''} required, ` +
+ `but${length ? ' only' : ''} ${length} found.`,
+ ...ctx
+ })
+ }
+}
+
+webidl.illegalConstructor = function () {
+ throw webidl.errors.exception({
+ header: 'TypeError',
+ message: 'Illegal constructor'
+ })
+}
+
+// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values
+webidl.util.Type = function (V) {
+ switch (typeof V) {
+ case 'undefined': return 'Undefined'
+ case 'boolean': return 'Boolean'
+ case 'string': return 'String'
+ case 'symbol': return 'Symbol'
+ case 'number': return 'Number'
+ case 'bigint': return 'BigInt'
+ case 'function':
+ case 'object': {
+ if (V === null) {
+ return 'Null'
+ }
+
+ return 'Object'
+ }
+ }
+}
+
+// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
+webidl.util.ConvertToInt = function (V, bitLength, signedness, opts = {}) {
+ let upperBound
+ let lowerBound
+
+ // 1. If bitLength is 64, then:
+ if (bitLength === 64) {
+ // 1. Let upperBound be 2^53 − 1.
+ upperBound = Math.pow(2, 53) - 1
+
+ // 2. If signedness is "unsigned", then let lowerBound be 0.
+ if (signedness === 'unsigned') {
+ lowerBound = 0
+ } else {
+ // 3. Otherwise let lowerBound be −2^53 + 1.
+ lowerBound = Math.pow(-2, 53) + 1
+ }
+ } else if (signedness === 'unsigned') {
+ // 2. Otherwise, if signedness is "unsigned", then:
+
+ // 1. Let lowerBound be 0.
+ lowerBound = 0
+
+ // 2. Let upperBound be 2^bitLength − 1.
+ upperBound = Math.pow(2, bitLength) - 1
+ } else {
+ // 3. Otherwise:
+
+ // 1. Let lowerBound be -2^bitLength − 1.
+ lowerBound = Math.pow(-2, bitLength) - 1
+
+ // 2. Let upperBound be 2^bitLength − 1 − 1.
+ upperBound = Math.pow(2, bitLength - 1) - 1
+ }
+
+ // 4. Let x be ? ToNumber(V).
+ let x = Number(V)
+
+ // 5. If x is −0, then set x to +0.
+ if (x === 0) {
+ x = 0
+ }
+
+ // 6. If the conversion is to an IDL type associated
+ // with the [EnforceRange] extended attribute, then:
+ if (opts.enforceRange === true) {
+ // 1. If x is NaN, +∞, or −∞, then throw a TypeError.
+ if (
+ Number.isNaN(x) ||
+ x === Number.POSITIVE_INFINITY ||
+ x === Number.NEGATIVE_INFINITY
+ ) {
+ throw webidl.errors.exception({
+ header: 'Integer conversion',
+ message: `Could not convert ${V} to an integer.`
+ })
+ }
+
+ // 2. Set x to IntegerPart(x).
+ x = webidl.util.IntegerPart(x)
+
+ // 3. If x < lowerBound or x > upperBound, then
+ // throw a TypeError.
+ if (x < lowerBound || x > upperBound) {
+ throw webidl.errors.exception({
+ header: 'Integer conversion',
+ message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.`
+ })
+ }
+
+ // 4. Return x.
+ return x
+ }
+
+ // 7. If x is not NaN and the conversion is to an IDL
+ // type associated with the [Clamp] extended
+ // attribute, then:
+ if (!Number.isNaN(x) && opts.clamp === true) {
+ // 1. Set x to min(max(x, lowerBound), upperBound).
+ x = Math.min(Math.max(x, lowerBound), upperBound)
+
+ // 2. Round x to the nearest integer, choosing the
+ // even integer if it lies halfway between two,
+ // and choosing +0 rather than −0.
+ if (Math.floor(x) % 2 === 0) {
+ x = Math.floor(x)
+ } else {
+ x = Math.ceil(x)
+ }
+
+ // 3. Return x.
+ return x
+ }
+
+ // 8. If x is NaN, +0, +∞, or −∞, then return +0.
+ if (
+ Number.isNaN(x) ||
+ (x === 0 && Object.is(0, x)) ||
+ x === Number.POSITIVE_INFINITY ||
+ x === Number.NEGATIVE_INFINITY
+ ) {
+ return 0
+ }
+
+ // 9. Set x to IntegerPart(x).
+ x = webidl.util.IntegerPart(x)
+
+ // 10. Set x to x modulo 2^bitLength.
+ x = x % Math.pow(2, bitLength)
+
+ // 11. If signedness is "signed" and x ≥ 2^bitLength − 1,
+ // then return x − 2^bitLength.
+ if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) {
+ return x - Math.pow(2, bitLength)
+ }
+
+ // 12. Otherwise, return x.
+ return x
+}
+
+// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart
+webidl.util.IntegerPart = function (n) {
+ // 1. Let r be floor(abs(n)).
+ const r = Math.floor(Math.abs(n))
+
+ // 2. If n < 0, then return -1 × r.
+ if (n < 0) {
+ return -1 * r
+ }
+
+ // 3. Otherwise, return r.
+ return r
+}
+
+// https://webidl.spec.whatwg.org/#es-sequence
+webidl.sequenceConverter = function (converter) {
+ return (V) => {
+ // 1. If Type(V) is not Object, throw a TypeError.
+ if (webidl.util.Type(V) !== 'Object') {
+ throw webidl.errors.exception({
+ header: 'Sequence',
+ message: `Value of type ${webidl.util.Type(V)} is not an Object.`
+ })
+ }
+
+ // 2. Let method be ? GetMethod(V, @@iterator).
+ /** @type {Generator} */
+ const method = V?.[Symbol.iterator]?.()
+ const seq = []
+
+ // 3. If method is undefined, throw a TypeError.
+ if (
+ method === undefined ||
+ typeof method.next !== 'function'
+ ) {
+ throw webidl.errors.exception({
+ header: 'Sequence',
+ message: 'Object is not an iterator.'
+ })
+ }
+
+ // https://webidl.spec.whatwg.org/#create-sequence-from-iterable
+ while (true) {
+ const { done, value } = method.next()
+
+ if (done) {
+ break
+ }
+
+ seq.push(converter(value))
+ }
+
+ return seq
+ }
+}
+
+// https://webidl.spec.whatwg.org/#es-to-record
+webidl.recordConverter = function (keyConverter, valueConverter) {
+ return (O) => {
+ // 1. If Type(O) is not Object, throw a TypeError.
+ if (webidl.util.Type(O) !== 'Object') {
+ throw webidl.errors.exception({
+ header: 'Record',
+ message: `Value of type ${webidl.util.Type(O)} is not an Object.`
+ })
+ }
+
+ // 2. Let result be a new empty instance of record<K, V>.
+ const result = {}
+
+ if (!types.isProxy(O)) {
+ // Object.keys only returns enumerable properties
+ const keys = Object.keys(O)
+
+ for (const key of keys) {
+ // 1. Let typedKey be key converted to an IDL value of type K.
+ const typedKey = keyConverter(key)
+
+ // 2. Let value be ? Get(O, key).
+ // 3. Let typedValue be value converted to an IDL value of type V.
+ const typedValue = valueConverter(O[key])
+
+ // 4. Set result[typedKey] to typedValue.
+ result[typedKey] = typedValue
+ }
+
+ // 5. Return result.
+ return result
+ }
+
+ // 3. Let keys be ? O.[[OwnPropertyKeys]]().
+ const keys = Reflect.ownKeys(O)
+
+ // 4. For each key of keys.
+ for (const key of keys) {
+ // 1. Let desc be ? O.[[GetOwnProperty]](key).
+ const desc = Reflect.getOwnPropertyDescriptor(O, key)
+
+ // 2. If desc is not undefined and desc.[[Enumerable]] is true:
+ if (desc?.enumerable) {
+ // 1. Let typedKey be key converted to an IDL value of type K.
+ const typedKey = keyConverter(key)
+
+ // 2. Let value be ? Get(O, key).
+ // 3. Let typedValue be value converted to an IDL value of type V.
+ const typedValue = valueConverter(O[key])
+
+ // 4. Set result[typedKey] to typedValue.
+ result[typedKey] = typedValue
+ }
+ }
+
+ // 5. Return result.
+ return result
+ }
+}
+
+webidl.interfaceConverter = function (i) {
+ return (V, opts = {}) => {
+ if (opts.strict !== false && !(V instanceof i)) {
+ throw webidl.errors.exception({
+ header: i.name,
+ message: `Expected ${V} to be an instance of ${i.name}.`
+ })
+ }
+
+ return V
+ }
+}
+
+webidl.dictionaryConverter = function (converters) {
+ return (dictionary) => {
+ const type = webidl.util.Type(dictionary)
+ const dict = {}
+
+ if (type === 'Null' || type === 'Undefined') {
+ return dict
+ } else if (type !== 'Object') {
+ throw webidl.errors.exception({
+ header: 'Dictionary',
+ message: `Expected ${dictionary} to be one of: Null, Undefined, Object.`
+ })
+ }
+
+ for (const options of converters) {
+ const { key, defaultValue, required, converter } = options
+
+ if (required === true) {
+ if (!hasOwn(dictionary, key)) {
+ throw webidl.errors.exception({
+ header: 'Dictionary',
+ message: `Missing required key "${key}".`
+ })
+ }
+ }
+
+ let value = dictionary[key]
+ const hasDefault = hasOwn(options, 'defaultValue')
+
+ // Only use defaultValue if value is undefined and
+ // a defaultValue options was provided.
+ if (hasDefault && value !== null) {
+ value = value ?? defaultValue
+ }
+
+ // A key can be optional and have no default value.
+ // When this happens, do not perform a conversion,
+ // and do not assign the key a value.
+ if (required || hasDefault || value !== undefined) {
+ value = converter(value)
+
+ if (
+ options.allowedValues &&
+ !options.allowedValues.includes(value)
+ ) {
+ throw webidl.errors.exception({
+ header: 'Dictionary',
+ message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.`
+ })
+ }
+
+ dict[key] = value
+ }
+ }
+
+ return dict
+ }
+}
+
+webidl.nullableConverter = function (converter) {
+ return (V) => {
+ if (V === null) {
+ return V
+ }
+
+ return converter(V)
+ }
+}
+
+// https://webidl.spec.whatwg.org/#es-DOMString
+webidl.converters.DOMString = function (V, opts = {}) {
+ // 1. If V is null and the conversion is to an IDL type
+ // associated with the [LegacyNullToEmptyString]
+ // extended attribute, then return the DOMString value
+ // that represents the empty string.
+ if (V === null && opts.legacyNullToEmptyString) {
+ return ''
+ }
+
+ // 2. Let x be ? ToString(V).
+ if (typeof V === 'symbol') {
+ throw new TypeError('Could not convert argument of type symbol to string.')
+ }
+
+ // 3. Return the IDL DOMString value that represents the
+ // same sequence of code units as the one the
+ // ECMAScript String value x represents.
+ return String(V)
+}
+
+// https://webidl.spec.whatwg.org/#es-ByteString
+webidl.converters.ByteString = function (V) {
+ // 1. Let x be ? ToString(V).
+ // Note: DOMString converter perform ? ToString(V)
+ const x = webidl.converters.DOMString(V)
+
+ // 2. If the value of any element of x is greater than
+ // 255, then throw a TypeError.
+ for (let index = 0; index < x.length; index++) {
+ const charCode = x.charCodeAt(index)
+
+ if (charCode > 255) {
+ throw new TypeError(
+ 'Cannot convert argument to a ByteString because the character at ' +
+ `index ${index} has a value of ${charCode} which is greater than 255.`
+ )
+ }
+ }
+
+ // 3. Return an IDL ByteString value whose length is the
+ // length of x, and where the value of each element is
+ // the value of the corresponding element of x.
+ return x
+}
+
+// https://webidl.spec.whatwg.org/#es-USVString
+webidl.converters.USVString = toUSVString
+
+// https://webidl.spec.whatwg.org/#es-boolean
+webidl.converters.boolean = function (V) {
+ // 1. Let x be the result of computing ToBoolean(V).
+ const x = Boolean(V)
+
+ // 2. Return the IDL boolean value that is the one that represents
+ // the same truth value as the ECMAScript Boolean value x.
+ return x
+}
+
+// https://webidl.spec.whatwg.org/#es-any
+webidl.converters.any = function (V) {
+ return V
+}
+
+// https://webidl.spec.whatwg.org/#es-long-long
+webidl.converters['long long'] = function (V) {
+ // 1. Let x be ? ConvertToInt(V, 64, "signed").
+ const x = webidl.util.ConvertToInt(V, 64, 'signed')
+
+ // 2. Return the IDL long long value that represents
+ // the same numeric value as x.
+ return x
+}
+
+// https://webidl.spec.whatwg.org/#es-unsigned-long-long
+webidl.converters['unsigned long long'] = function (V) {
+ // 1. Let x be ? ConvertToInt(V, 64, "unsigned").
+ const x = webidl.util.ConvertToInt(V, 64, 'unsigned')
+
+ // 2. Return the IDL unsigned long long value that
+ // represents the same numeric value as x.
+ return x
+}
+
+// https://webidl.spec.whatwg.org/#es-unsigned-long
+webidl.converters['unsigned long'] = function (V) {
+ // 1. Let x be ? ConvertToInt(V, 32, "unsigned").
+ const x = webidl.util.ConvertToInt(V, 32, 'unsigned')
+
+ // 2. Return the IDL unsigned long value that
+ // represents the same numeric value as x.
+ return x
+}
+
+// https://webidl.spec.whatwg.org/#es-unsigned-short
+webidl.converters['unsigned short'] = function (V, opts) {
+ // 1. Let x be ? ConvertToInt(V, 16, "unsigned").
+ const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts)
+
+ // 2. Return the IDL unsigned short value that represents
+ // the same numeric value as x.
+ return x
+}
+
+// https://webidl.spec.whatwg.org/#idl-ArrayBuffer
+webidl.converters.ArrayBuffer = function (V, opts = {}) {
+ // 1. If Type(V) is not Object, or V does not have an
+ // [[ArrayBufferData]] internal slot, then throw a
+ // TypeError.
+ // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances
+ // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances
+ if (
+ webidl.util.Type(V) !== 'Object' ||
+ !types.isAnyArrayBuffer(V)
+ ) {
+ throw webidl.errors.conversionFailed({
+ prefix: `${V}`,
+ argument: `${V}`,
+ types: ['ArrayBuffer']
+ })
+ }
+
+ // 2. If the conversion is not to an IDL type associated
+ // with the [AllowShared] extended attribute, and
+ // IsSharedArrayBuffer(V) is true, then throw a
+ // TypeError.
+ if (opts.allowShared === false && types.isSharedArrayBuffer(V)) {
+ throw webidl.errors.exception({
+ header: 'ArrayBuffer',
+ message: 'SharedArrayBuffer is not allowed.'
+ })
+ }
+
+ // 3. If the conversion is not to an IDL type associated
+ // with the [AllowResizable] extended attribute, and
+ // IsResizableArrayBuffer(V) is true, then throw a
+ // TypeError.
+ // Note: resizable ArrayBuffers are currently a proposal.
+
+ // 4. Return the IDL ArrayBuffer value that is a
+ // reference to the same object as V.
+ return V
+}
+
+webidl.converters.TypedArray = function (V, T, opts = {}) {
+ // 1. Let T be the IDL type V is being converted to.
+
+ // 2. If Type(V) is not Object, or V does not have a
+ // [[TypedArrayName]] internal slot with a value
+ // equal to T’s name, then throw a TypeError.
+ if (
+ webidl.util.Type(V) !== 'Object' ||
+ !types.isTypedArray(V) ||
+ V.constructor.name !== T.name
+ ) {
+ throw webidl.errors.conversionFailed({
+ prefix: `${T.name}`,
+ argument: `${V}`,
+ types: [T.name]
+ })
+ }
+
+ // 3. If the conversion is not to an IDL type associated
+ // with the [AllowShared] extended attribute, and
+ // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is
+ // true, then throw a TypeError.
+ if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) {
+ throw webidl.errors.exception({
+ header: 'ArrayBuffer',
+ message: 'SharedArrayBuffer is not allowed.'
+ })
+ }
+
+ // 4. If the conversion is not to an IDL type associated
+ // with the [AllowResizable] extended attribute, and
+ // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is
+ // true, then throw a TypeError.
+ // Note: resizable array buffers are currently a proposal
+
+ // 5. Return the IDL value of type T that is a reference
+ // to the same object as V.
+ return V
+}
+
+webidl.converters.DataView = function (V, opts = {}) {
+ // 1. If Type(V) is not Object, or V does not have a
+ // [[DataView]] internal slot, then throw a TypeError.
+ if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) {
+ throw webidl.errors.exception({
+ header: 'DataView',
+ message: 'Object is not a DataView.'
+ })
+ }
+
+ // 2. If the conversion is not to an IDL type associated
+ // with the [AllowShared] extended attribute, and
+ // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true,
+ // then throw a TypeError.
+ if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) {
+ throw webidl.errors.exception({
+ header: 'ArrayBuffer',
+ message: 'SharedArrayBuffer is not allowed.'
+ })
+ }
+
+ // 3. If the conversion is not to an IDL type associated
+ // with the [AllowResizable] extended attribute, and
+ // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is
+ // true, then throw a TypeError.
+ // Note: resizable ArrayBuffers are currently a proposal
+
+ // 4. Return the IDL DataView value that is a reference
+ // to the same object as V.
+ return V
+}
+
+// https://webidl.spec.whatwg.org/#BufferSource
+webidl.converters.BufferSource = function (V, opts = {}) {
+ if (types.isAnyArrayBuffer(V)) {
+ return webidl.converters.ArrayBuffer(V, opts)
+ }
+
+ if (types.isTypedArray(V)) {
+ return webidl.converters.TypedArray(V, V.constructor)
+ }
+
+ if (types.isDataView(V)) {
+ return webidl.converters.DataView(V, opts)
+ }
+
+ throw new TypeError(`Could not convert ${V} to a BufferSource.`)
+}
+
+webidl.converters['sequence<ByteString>'] = webidl.sequenceConverter(
+ webidl.converters.ByteString
+)
+
+webidl.converters['sequence<sequence<ByteString>>'] = webidl.sequenceConverter(
+ webidl.converters['sequence<ByteString>']
+)
+
+webidl.converters['record<ByteString, ByteString>'] = webidl.recordConverter(
+ webidl.converters.ByteString,
+ webidl.converters.ByteString
+)
+
+module.exports = {
+ webidl
+}
diff --git a/node_modules/undici/lib/fileapi/encoding.js b/node_modules/undici/lib/fileapi/encoding.js
new file mode 100644
index 0000000..1d1d2b6
--- /dev/null
+++ b/node_modules/undici/lib/fileapi/encoding.js
@@ -0,0 +1,290 @@
+'use strict'
+
+/**
+ * @see https://encoding.spec.whatwg.org/#concept-encoding-get
+ * @param {string|undefined} label
+ */
+function getEncoding (label) {
+ if (!label) {
+ return 'failure'
+ }
+
+ // 1. Remove any leading and trailing ASCII whitespace from label.
+ // 2. If label is an ASCII case-insensitive match for any of the
+ // labels listed in the table below, then return the
+ // corresponding encoding; otherwise return failure.
+ switch (label.trim().toLowerCase()) {
+ case 'unicode-1-1-utf-8':
+ case 'unicode11utf8':
+ case 'unicode20utf8':
+ case 'utf-8':
+ case 'utf8':
+ case 'x-unicode20utf8':
+ return 'UTF-8'
+ case '866':
+ case 'cp866':
+ case 'csibm866':
+ case 'ibm866':
+ return 'IBM866'
+ case 'csisolatin2':
+ case 'iso-8859-2':
+ case 'iso-ir-101':
+ case 'iso8859-2':
+ case 'iso88592':
+ case 'iso_8859-2':
+ case 'iso_8859-2:1987':
+ case 'l2':
+ case 'latin2':
+ return 'ISO-8859-2'
+ case 'csisolatin3':
+ case 'iso-8859-3':
+ case 'iso-ir-109':
+ case 'iso8859-3':
+ case 'iso88593':
+ case 'iso_8859-3':
+ case 'iso_8859-3:1988':
+ case 'l3':
+ case 'latin3':
+ return 'ISO-8859-3'
+ case 'csisolatin4':
+ case 'iso-8859-4':
+ case 'iso-ir-110':
+ case 'iso8859-4':
+ case 'iso88594':
+ case 'iso_8859-4':
+ case 'iso_8859-4:1988':
+ case 'l4':
+ case 'latin4':
+ return 'ISO-8859-4'
+ case 'csisolatincyrillic':
+ case 'cyrillic':
+ case 'iso-8859-5':
+ case 'iso-ir-144':
+ case 'iso8859-5':
+ case 'iso88595':
+ case 'iso_8859-5':
+ case 'iso_8859-5:1988':
+ return 'ISO-8859-5'
+ case 'arabic':
+ case 'asmo-708':
+ case 'csiso88596e':
+ case 'csiso88596i':
+ case 'csisolatinarabic':
+ case 'ecma-114':
+ case 'iso-8859-6':
+ case 'iso-8859-6-e':
+ case 'iso-8859-6-i':
+ case 'iso-ir-127':
+ case 'iso8859-6':
+ case 'iso88596':
+ case 'iso_8859-6':
+ case 'iso_8859-6:1987':
+ return 'ISO-8859-6'
+ case 'csisolatingreek':
+ case 'ecma-118':
+ case 'elot_928':
+ case 'greek':
+ case 'greek8':
+ case 'iso-8859-7':
+ case 'iso-ir-126':
+ case 'iso8859-7':
+ case 'iso88597':
+ case 'iso_8859-7':
+ case 'iso_8859-7:1987':
+ case 'sun_eu_greek':
+ return 'ISO-8859-7'
+ case 'csiso88598e':
+ case 'csisolatinhebrew':
+ case 'hebrew':
+ case 'iso-8859-8':
+ case 'iso-8859-8-e':
+ case 'iso-ir-138':
+ case 'iso8859-8':
+ case 'iso88598':
+ case 'iso_8859-8':
+ case 'iso_8859-8:1988':
+ case 'visual':
+ return 'ISO-8859-8'
+ case 'csiso88598i':
+ case 'iso-8859-8-i':
+ case 'logical':
+ return 'ISO-8859-8-I'
+ case 'csisolatin6':
+ case 'iso-8859-10':
+ case 'iso-ir-157':
+ case 'iso8859-10':
+ case 'iso885910':
+ case 'l6':
+ case 'latin6':
+ return 'ISO-8859-10'
+ case 'iso-8859-13':
+ case 'iso8859-13':
+ case 'iso885913':
+ return 'ISO-8859-13'
+ case 'iso-8859-14':
+ case 'iso8859-14':
+ case 'iso885914':
+ return 'ISO-8859-14'
+ case 'csisolatin9':
+ case 'iso-8859-15':
+ case 'iso8859-15':
+ case 'iso885915':
+ case 'iso_8859-15':
+ case 'l9':
+ return 'ISO-8859-15'
+ case 'iso-8859-16':
+ return 'ISO-8859-16'
+ case 'cskoi8r':
+ case 'koi':
+ case 'koi8':
+ case 'koi8-r':
+ case 'koi8_r':
+ return 'KOI8-R'
+ case 'koi8-ru':
+ case 'koi8-u':
+ return 'KOI8-U'
+ case 'csmacintosh':
+ case 'mac':
+ case 'macintosh':
+ case 'x-mac-roman':
+ return 'macintosh'
+ case 'iso-8859-11':
+ case 'iso8859-11':
+ case 'iso885911':
+ case 'tis-620':
+ case 'windows-874':
+ return 'windows-874'
+ case 'cp1250':
+ case 'windows-1250':
+ case 'x-cp1250':
+ return 'windows-1250'
+ case 'cp1251':
+ case 'windows-1251':
+ case 'x-cp1251':
+ return 'windows-1251'
+ case 'ansi_x3.4-1968':
+ case 'ascii':
+ case 'cp1252':
+ case 'cp819':
+ case 'csisolatin1':
+ case 'ibm819':
+ case 'iso-8859-1':
+ case 'iso-ir-100':
+ case 'iso8859-1':
+ case 'iso88591':
+ case 'iso_8859-1':
+ case 'iso_8859-1:1987':
+ case 'l1':
+ case 'latin1':
+ case 'us-ascii':
+ case 'windows-1252':
+ case 'x-cp1252':
+ return 'windows-1252'
+ case 'cp1253':
+ case 'windows-1253':
+ case 'x-cp1253':
+ return 'windows-1253'
+ case 'cp1254':
+ case 'csisolatin5':
+ case 'iso-8859-9':
+ case 'iso-ir-148':
+ case 'iso8859-9':
+ case 'iso88599':
+ case 'iso_8859-9':
+ case 'iso_8859-9:1989':
+ case 'l5':
+ case 'latin5':
+ case 'windows-1254':
+ case 'x-cp1254':
+ return 'windows-1254'
+ case 'cp1255':
+ case 'windows-1255':
+ case 'x-cp1255':
+ return 'windows-1255'
+ case 'cp1256':
+ case 'windows-1256':
+ case 'x-cp1256':
+ return 'windows-1256'
+ case 'cp1257':
+ case 'windows-1257':
+ case 'x-cp1257':
+ return 'windows-1257'
+ case 'cp1258':
+ case 'windows-1258':
+ case 'x-cp1258':
+ return 'windows-1258'
+ case 'x-mac-cyrillic':
+ case 'x-mac-ukrainian':
+ return 'x-mac-cyrillic'
+ case 'chinese':
+ case 'csgb2312':
+ case 'csiso58gb231280':
+ case 'gb2312':
+ case 'gb_2312':
+ case 'gb_2312-80':
+ case 'gbk':
+ case 'iso-ir-58':
+ case 'x-gbk':
+ return 'GBK'
+ case 'gb18030':
+ return 'gb18030'
+ case 'big5':
+ case 'big5-hkscs':
+ case 'cn-big5':
+ case 'csbig5':
+ case 'x-x-big5':
+ return 'Big5'
+ case 'cseucpkdfmtjapanese':
+ case 'euc-jp':
+ case 'x-euc-jp':
+ return 'EUC-JP'
+ case 'csiso2022jp':
+ case 'iso-2022-jp':
+ return 'ISO-2022-JP'
+ case 'csshiftjis':
+ case 'ms932':
+ case 'ms_kanji':
+ case 'shift-jis':
+ case 'shift_jis':
+ case 'sjis':
+ case 'windows-31j':
+ case 'x-sjis':
+ return 'Shift_JIS'
+ case 'cseuckr':
+ case 'csksc56011987':
+ case 'euc-kr':
+ case 'iso-ir-149':
+ case 'korean':
+ case 'ks_c_5601-1987':
+ case 'ks_c_5601-1989':
+ case 'ksc5601':
+ case 'ksc_5601':
+ case 'windows-949':
+ return 'EUC-KR'
+ case 'csiso2022kr':
+ case 'hz-gb-2312':
+ case 'iso-2022-cn':
+ case 'iso-2022-cn-ext':
+ case 'iso-2022-kr':
+ case 'replacement':
+ return 'replacement'
+ case 'unicodefffe':
+ case 'utf-16be':
+ return 'UTF-16BE'
+ case 'csunicode':
+ case 'iso-10646-ucs-2':
+ case 'ucs-2':
+ case 'unicode':
+ case 'unicodefeff':
+ case 'utf-16':
+ case 'utf-16le':
+ return 'UTF-16LE'
+ case 'x-user-defined':
+ return 'x-user-defined'
+ default: return 'failure'
+ }
+}
+
+module.exports = {
+ getEncoding
+}
diff --git a/node_modules/undici/lib/fileapi/filereader.js b/node_modules/undici/lib/fileapi/filereader.js
new file mode 100644
index 0000000..cd36a22
--- /dev/null
+++ b/node_modules/undici/lib/fileapi/filereader.js
@@ -0,0 +1,344 @@
+'use strict'
+
+const {
+ staticPropertyDescriptors,
+ readOperation,
+ fireAProgressEvent
+} = require('./util')
+const {
+ kState,
+ kError,
+ kResult,
+ kEvents,
+ kAborted
+} = require('./symbols')
+const { webidl } = require('../fetch/webidl')
+const { kEnumerableProperty } = require('../core/util')
+
+class FileReader extends EventTarget {
+ constructor () {
+ super()
+
+ this[kState] = 'empty'
+ this[kResult] = null
+ this[kError] = null
+ this[kEvents] = {
+ loadend: null,
+ error: null,
+ abort: null,
+ load: null,
+ progress: null,
+ loadstart: null
+ }
+ }
+
+ /**
+ * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer
+ * @param {import('buffer').Blob} blob
+ */
+ readAsArrayBuffer (blob) {
+ webidl.brandCheck(this, FileReader)
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsArrayBuffer' })
+
+ blob = webidl.converters.Blob(blob, { strict: false })
+
+ // The readAsArrayBuffer(blob) method, when invoked,
+ // must initiate a read operation for blob with ArrayBuffer.
+ readOperation(this, blob, 'ArrayBuffer')
+ }
+
+ /**
+ * @see https://w3c.github.io/FileAPI/#readAsBinaryString
+ * @param {import('buffer').Blob} blob
+ */
+ readAsBinaryString (blob) {
+ webidl.brandCheck(this, FileReader)
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsBinaryString' })
+
+ blob = webidl.converters.Blob(blob, { strict: false })
+
+ // The readAsBinaryString(blob) method, when invoked,
+ // must initiate a read operation for blob with BinaryString.
+ readOperation(this, blob, 'BinaryString')
+ }
+
+ /**
+ * @see https://w3c.github.io/FileAPI/#readAsDataText
+ * @param {import('buffer').Blob} blob
+ * @param {string?} encoding
+ */
+ readAsText (blob, encoding = undefined) {
+ webidl.brandCheck(this, FileReader)
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsText' })
+
+ blob = webidl.converters.Blob(blob, { strict: false })
+
+ if (encoding !== undefined) {
+ encoding = webidl.converters.DOMString(encoding)
+ }
+
+ // The readAsText(blob, encoding) method, when invoked,
+ // must initiate a read operation for blob with Text and encoding.
+ readOperation(this, blob, 'Text', encoding)
+ }
+
+ /**
+ * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL
+ * @param {import('buffer').Blob} blob
+ */
+ readAsDataURL (blob) {
+ webidl.brandCheck(this, FileReader)
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsDataURL' })
+
+ blob = webidl.converters.Blob(blob, { strict: false })
+
+ // The readAsDataURL(blob) method, when invoked, must
+ // initiate a read operation for blob with DataURL.
+ readOperation(this, blob, 'DataURL')
+ }
+
+ /**
+ * @see https://w3c.github.io/FileAPI/#dfn-abort
+ */
+ abort () {
+ // 1. If this's state is "empty" or if this's state is
+ // "done" set this's result to null and terminate
+ // this algorithm.
+ if (this[kState] === 'empty' || this[kState] === 'done') {
+ this[kResult] = null
+ return
+ }
+
+ // 2. If this's state is "loading" set this's state to
+ // "done" and set this's result to null.
+ if (this[kState] === 'loading') {
+ this[kState] = 'done'
+ this[kResult] = null
+ }
+
+ // 3. If there are any tasks from this on the file reading
+ // task source in an affiliated task queue, then remove
+ // those tasks from that task queue.
+ this[kAborted] = true
+
+ // 4. Terminate the algorithm for the read method being processed.
+ // TODO
+
+ // 5. Fire a progress event called abort at this.
+ fireAProgressEvent('abort', this)
+
+ // 6. If this's state is not "loading", fire a progress
+ // event called loadend at this.
+ if (this[kState] !== 'loading') {
+ fireAProgressEvent('loadend', this)
+ }
+ }
+
+ /**
+ * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate
+ */
+ get readyState () {
+ webidl.brandCheck(this, FileReader)
+
+ switch (this[kState]) {
+ case 'empty': return this.EMPTY
+ case 'loading': return this.LOADING
+ case 'done': return this.DONE
+ }
+ }
+
+ /**
+ * @see https://w3c.github.io/FileAPI/#dom-filereader-result
+ */
+ get result () {
+ webidl.brandCheck(this, FileReader)
+
+ // The result attribute’s getter, when invoked, must return
+ // this's result.
+ return this[kResult]
+ }
+
+ /**
+ * @see https://w3c.github.io/FileAPI/#dom-filereader-error
+ */
+ get error () {
+ webidl.brandCheck(this, FileReader)
+
+ // The error attribute’s getter, when invoked, must return
+ // this's error.
+ return this[kError]
+ }
+
+ get onloadend () {
+ webidl.brandCheck(this, FileReader)
+
+ return this[kEvents].loadend
+ }
+
+ set onloadend (fn) {
+ webidl.brandCheck(this, FileReader)
+
+ if (this[kEvents].loadend) {
+ this.removeEventListener('loadend', this[kEvents].loadend)
+ }
+
+ if (typeof fn === 'function') {
+ this[kEvents].loadend = fn
+ this.addEventListener('loadend', fn)
+ } else {
+ this[kEvents].loadend = null
+ }
+ }
+
+ get onerror () {
+ webidl.brandCheck(this, FileReader)
+
+ return this[kEvents].error
+ }
+
+ set onerror (fn) {
+ webidl.brandCheck(this, FileReader)
+
+ if (this[kEvents].error) {
+ this.removeEventListener('error', this[kEvents].error)
+ }
+
+ if (typeof fn === 'function') {
+ this[kEvents].error = fn
+ this.addEventListener('error', fn)
+ } else {
+ this[kEvents].error = null
+ }
+ }
+
+ get onloadstart () {
+ webidl.brandCheck(this, FileReader)
+
+ return this[kEvents].loadstart
+ }
+
+ set onloadstart (fn) {
+ webidl.brandCheck(this, FileReader)
+
+ if (this[kEvents].loadstart) {
+ this.removeEventListener('loadstart', this[kEvents].loadstart)
+ }
+
+ if (typeof fn === 'function') {
+ this[kEvents].loadstart = fn
+ this.addEventListener('loadstart', fn)
+ } else {
+ this[kEvents].loadstart = null
+ }
+ }
+
+ get onprogress () {
+ webidl.brandCheck(this, FileReader)
+
+ return this[kEvents].progress
+ }
+
+ set onprogress (fn) {
+ webidl.brandCheck(this, FileReader)
+
+ if (this[kEvents].progress) {
+ this.removeEventListener('progress', this[kEvents].progress)
+ }
+
+ if (typeof fn === 'function') {
+ this[kEvents].progress = fn
+ this.addEventListener('progress', fn)
+ } else {
+ this[kEvents].progress = null
+ }
+ }
+
+ get onload () {
+ webidl.brandCheck(this, FileReader)
+
+ return this[kEvents].load
+ }
+
+ set onload (fn) {
+ webidl.brandCheck(this, FileReader)
+
+ if (this[kEvents].load) {
+ this.removeEventListener('load', this[kEvents].load)
+ }
+
+ if (typeof fn === 'function') {
+ this[kEvents].load = fn
+ this.addEventListener('load', fn)
+ } else {
+ this[kEvents].load = null
+ }
+ }
+
+ get onabort () {
+ webidl.brandCheck(this, FileReader)
+
+ return this[kEvents].abort
+ }
+
+ set onabort (fn) {
+ webidl.brandCheck(this, FileReader)
+
+ if (this[kEvents].abort) {
+ this.removeEventListener('abort', this[kEvents].abort)
+ }
+
+ if (typeof fn === 'function') {
+ this[kEvents].abort = fn
+ this.addEventListener('abort', fn)
+ } else {
+ this[kEvents].abort = null
+ }
+ }
+}
+
+// https://w3c.github.io/FileAPI/#dom-filereader-empty
+FileReader.EMPTY = FileReader.prototype.EMPTY = 0
+// https://w3c.github.io/FileAPI/#dom-filereader-loading
+FileReader.LOADING = FileReader.prototype.LOADING = 1
+// https://w3c.github.io/FileAPI/#dom-filereader-done
+FileReader.DONE = FileReader.prototype.DONE = 2
+
+Object.defineProperties(FileReader.prototype, {
+ EMPTY: staticPropertyDescriptors,
+ LOADING: staticPropertyDescriptors,
+ DONE: staticPropertyDescriptors,
+ readAsArrayBuffer: kEnumerableProperty,
+ readAsBinaryString: kEnumerableProperty,
+ readAsText: kEnumerableProperty,
+ readAsDataURL: kEnumerableProperty,
+ abort: kEnumerableProperty,
+ readyState: kEnumerableProperty,
+ result: kEnumerableProperty,
+ error: kEnumerableProperty,
+ onloadstart: kEnumerableProperty,
+ onprogress: kEnumerableProperty,
+ onload: kEnumerableProperty,
+ onabort: kEnumerableProperty,
+ onerror: kEnumerableProperty,
+ onloadend: kEnumerableProperty,
+ [Symbol.toStringTag]: {
+ value: 'FileReader',
+ writable: false,
+ enumerable: false,
+ configurable: true
+ }
+})
+
+Object.defineProperties(FileReader, {
+ EMPTY: staticPropertyDescriptors,
+ LOADING: staticPropertyDescriptors,
+ DONE: staticPropertyDescriptors
+})
+
+module.exports = {
+ FileReader
+}
diff --git a/node_modules/undici/lib/fileapi/progressevent.js b/node_modules/undici/lib/fileapi/progressevent.js
new file mode 100644
index 0000000..778cf22
--- /dev/null
+++ b/node_modules/undici/lib/fileapi/progressevent.js
@@ -0,0 +1,78 @@
+'use strict'
+
+const { webidl } = require('../fetch/webidl')
+
+const kState = Symbol('ProgressEvent state')
+
+/**
+ * @see https://xhr.spec.whatwg.org/#progressevent
+ */
+class ProgressEvent extends Event {
+ constructor (type, eventInitDict = {}) {
+ type = webidl.converters.DOMString(type)
+ eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {})
+
+ super(type, eventInitDict)
+
+ this[kState] = {
+ lengthComputable: eventInitDict.lengthComputable,
+ loaded: eventInitDict.loaded,
+ total: eventInitDict.total
+ }
+ }
+
+ get lengthComputable () {
+ webidl.brandCheck(this, ProgressEvent)
+
+ return this[kState].lengthComputable
+ }
+
+ get loaded () {
+ webidl.brandCheck(this, ProgressEvent)
+
+ return this[kState].loaded
+ }
+
+ get total () {
+ webidl.brandCheck(this, ProgressEvent)
+
+ return this[kState].total
+ }
+}
+
+webidl.converters.ProgressEventInit = webidl.dictionaryConverter([
+ {
+ key: 'lengthComputable',
+ converter: webidl.converters.boolean,
+ defaultValue: false
+ },
+ {
+ key: 'loaded',
+ converter: webidl.converters['unsigned long long'],
+ defaultValue: 0
+ },
+ {
+ key: 'total',
+ converter: webidl.converters['unsigned long long'],
+ defaultValue: 0
+ },
+ {
+ key: 'bubbles',
+ converter: webidl.converters.boolean,
+ defaultValue: false
+ },
+ {
+ key: 'cancelable',
+ converter: webidl.converters.boolean,
+ defaultValue: false
+ },
+ {
+ key: 'composed',
+ converter: webidl.converters.boolean,
+ defaultValue: false
+ }
+])
+
+module.exports = {
+ ProgressEvent
+}
diff --git a/node_modules/undici/lib/fileapi/symbols.js b/node_modules/undici/lib/fileapi/symbols.js
new file mode 100644
index 0000000..dd11746
--- /dev/null
+++ b/node_modules/undici/lib/fileapi/symbols.js
@@ -0,0 +1,10 @@
+'use strict'
+
+module.exports = {
+ kState: Symbol('FileReader state'),
+ kResult: Symbol('FileReader result'),
+ kError: Symbol('FileReader error'),
+ kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'),
+ kEvents: Symbol('FileReader events'),
+ kAborted: Symbol('FileReader aborted')
+}
diff --git a/node_modules/undici/lib/fileapi/util.js b/node_modules/undici/lib/fileapi/util.js
new file mode 100644
index 0000000..1d10899
--- /dev/null
+++ b/node_modules/undici/lib/fileapi/util.js
@@ -0,0 +1,392 @@
+'use strict'
+
+const {
+ kState,
+ kError,
+ kResult,
+ kAborted,
+ kLastProgressEventFired
+} = require('./symbols')
+const { ProgressEvent } = require('./progressevent')
+const { getEncoding } = require('./encoding')
+const { DOMException } = require('../fetch/constants')
+const { serializeAMimeType, parseMIMEType } = require('../fetch/dataURL')
+const { types } = require('util')
+const { StringDecoder } = require('string_decoder')
+const { btoa } = require('buffer')
+
+/** @type {PropertyDescriptor} */
+const staticPropertyDescriptors = {
+ enumerable: true,
+ writable: false,
+ configurable: false
+}
+
+/**
+ * @see https://w3c.github.io/FileAPI/#readOperation
+ * @param {import('./filereader').FileReader} fr
+ * @param {import('buffer').Blob} blob
+ * @param {string} type
+ * @param {string?} encodingName
+ */
+function readOperation (fr, blob, type, encodingName) {
+ // 1. If fr’s state is "loading", throw an InvalidStateError
+ // DOMException.
+ if (fr[kState] === 'loading') {
+ throw new DOMException('Invalid state', 'InvalidStateError')
+ }
+
+ // 2. Set fr’s state to "loading".
+ fr[kState] = 'loading'
+
+ // 3. Set fr’s result to null.
+ fr[kResult] = null
+
+ // 4. Set fr’s error to null.
+ fr[kError] = null
+
+ // 5. Let stream be the result of calling get stream on blob.
+ /** @type {import('stream/web').ReadableStream} */
+ const stream = blob.stream()
+
+ // 6. Let reader be the result of getting a reader from stream.
+ const reader = stream.getReader()
+
+ // 7. Let bytes be an empty byte sequence.
+ /** @type {Uint8Array[]} */
+ const bytes = []
+
+ // 8. Let chunkPromise be the result of reading a chunk from
+ // stream with reader.
+ let chunkPromise = reader.read()
+
+ // 9. Let isFirstChunk be true.
+ let isFirstChunk = true
+
+ // 10. In parallel, while true:
+ // Note: "In parallel" just means non-blocking
+ // Note 2: readOperation itself cannot be async as double
+ // reading the body would then reject the promise, instead
+ // of throwing an error.
+ ;(async () => {
+ while (!fr[kAborted]) {
+ // 1. Wait for chunkPromise to be fulfilled or rejected.
+ try {
+ const { done, value } = await chunkPromise
+
+ // 2. If chunkPromise is fulfilled, and isFirstChunk is
+ // true, queue a task to fire a progress event called
+ // loadstart at fr.
+ if (isFirstChunk && !fr[kAborted]) {
+ queueMicrotask(() => {
+ fireAProgressEvent('loadstart', fr)
+ })
+ }
+
+ // 3. Set isFirstChunk to false.
+ isFirstChunk = false
+
+ // 4. If chunkPromise is fulfilled with an object whose
+ // done property is false and whose value property is
+ // a Uint8Array object, run these steps:
+ if (!done && types.isUint8Array(value)) {
+ // 1. Let bs be the byte sequence represented by the
+ // Uint8Array object.
+
+ // 2. Append bs to bytes.
+ bytes.push(value)
+
+ // 3. If roughly 50ms have passed since these steps
+ // were last invoked, queue a task to fire a
+ // progress event called progress at fr.
+ if (
+ (
+ fr[kLastProgressEventFired] === undefined ||
+ Date.now() - fr[kLastProgressEventFired] >= 50
+ ) &&
+ !fr[kAborted]
+ ) {
+ fr[kLastProgressEventFired] = Date.now()
+ queueMicrotask(() => {
+ fireAProgressEvent('progress', fr)
+ })
+ }
+
+ // 4. Set chunkPromise to the result of reading a
+ // chunk from stream with reader.
+ chunkPromise = reader.read()
+ } else if (done) {
+ // 5. Otherwise, if chunkPromise is fulfilled with an
+ // object whose done property is true, queue a task
+ // to run the following steps and abort this algorithm:
+ queueMicrotask(() => {
+ // 1. Set fr’s state to "done".
+ fr[kState] = 'done'
+
+ // 2. Let result be the result of package data given
+ // bytes, type, blob’s type, and encodingName.
+ try {
+ const result = packageData(bytes, type, blob.type, encodingName)
+
+ // 4. Else:
+
+ if (fr[kAborted]) {
+ return
+ }
+
+ // 1. Set fr’s result to result.
+ fr[kResult] = result
+
+ // 2. Fire a progress event called load at the fr.
+ fireAProgressEvent('load', fr)
+ } catch (error) {
+ // 3. If package data threw an exception error:
+
+ // 1. Set fr’s error to error.
+ fr[kError] = error
+
+ // 2. Fire a progress event called error at fr.
+ fireAProgressEvent('error', fr)
+ }
+
+ // 5. If fr’s state is not "loading", fire a progress
+ // event called loadend at the fr.
+ if (fr[kState] !== 'loading') {
+ fireAProgressEvent('loadend', fr)
+ }
+ })
+
+ break
+ }
+ } catch (error) {
+ if (fr[kAborted]) {
+ return
+ }
+
+ // 6. Otherwise, if chunkPromise is rejected with an
+ // error error, queue a task to run the following
+ // steps and abort this algorithm:
+ queueMicrotask(() => {
+ // 1. Set fr’s state to "done".
+ fr[kState] = 'done'
+
+ // 2. Set fr’s error to error.
+ fr[kError] = error
+
+ // 3. Fire a progress event called error at fr.
+ fireAProgressEvent('error', fr)
+
+ // 4. If fr’s state is not "loading", fire a progress
+ // event called loadend at fr.
+ if (fr[kState] !== 'loading') {
+ fireAProgressEvent('loadend', fr)
+ }
+ })
+
+ break
+ }
+ }
+ })()
+}
+
+/**
+ * @see https://w3c.github.io/FileAPI/#fire-a-progress-event
+ * @see https://dom.spec.whatwg.org/#concept-event-fire
+ * @param {string} e The name of the event
+ * @param {import('./filereader').FileReader} reader
+ */
+function fireAProgressEvent (e, reader) {
+ // The progress event e does not bubble. e.bubbles must be false
+ // The progress event e is NOT cancelable. e.cancelable must be false
+ const event = new ProgressEvent(e, {
+ bubbles: false,
+ cancelable: false
+ })
+
+ reader.dispatchEvent(event)
+}
+
+/**
+ * @see https://w3c.github.io/FileAPI/#blob-package-data
+ * @param {Uint8Array[]} bytes
+ * @param {string} type
+ * @param {string?} mimeType
+ * @param {string?} encodingName
+ */
+function packageData (bytes, type, mimeType, encodingName) {
+ // 1. A Blob has an associated package data algorithm, given
+ // bytes, a type, a optional mimeType, and a optional
+ // encodingName, which switches on type and runs the
+ // associated steps:
+
+ switch (type) {
+ case 'DataURL': {
+ // 1. Return bytes as a DataURL [RFC2397] subject to
+ // the considerations below:
+ // * Use mimeType as part of the Data URL if it is
+ // available in keeping with the Data URL
+ // specification [RFC2397].
+ // * If mimeType is not available return a Data URL
+ // without a media-type. [RFC2397].
+
+ // https://datatracker.ietf.org/doc/html/rfc2397#section-3
+ // dataurl := "data:" [ mediatype ] [ ";base64" ] "," data
+ // mediatype := [ type "/" subtype ] *( ";" parameter )
+ // data := *urlchar
+ // parameter := attribute "=" value
+ let dataURL = 'data:'
+
+ const parsed = parseMIMEType(mimeType || 'application/octet-stream')
+
+ if (parsed !== 'failure') {
+ dataURL += serializeAMimeType(parsed)
+ }
+
+ dataURL += ';base64,'
+
+ const decoder = new StringDecoder('latin1')
+
+ for (const chunk of bytes) {
+ dataURL += btoa(decoder.write(chunk))
+ }
+
+ dataURL += btoa(decoder.end())
+
+ return dataURL
+ }
+ case 'Text': {
+ // 1. Let encoding be failure
+ let encoding = 'failure'
+
+ // 2. If the encodingName is present, set encoding to the
+ // result of getting an encoding from encodingName.
+ if (encodingName) {
+ encoding = getEncoding(encodingName)
+ }
+
+ // 3. If encoding is failure, and mimeType is present:
+ if (encoding === 'failure' && mimeType) {
+ // 1. Let type be the result of parse a MIME type
+ // given mimeType.
+ const type = parseMIMEType(mimeType)
+
+ // 2. If type is not failure, set encoding to the result
+ // of getting an encoding from type’s parameters["charset"].
+ if (type !== 'failure') {
+ encoding = getEncoding(type.parameters.get('charset'))
+ }
+ }
+
+ // 4. If encoding is failure, then set encoding to UTF-8.
+ if (encoding === 'failure') {
+ encoding = 'UTF-8'
+ }
+
+ // 5. Decode bytes using fallback encoding encoding, and
+ // return the result.
+ return decode(bytes, encoding)
+ }
+ case 'ArrayBuffer': {
+ // Return a new ArrayBuffer whose contents are bytes.
+ const sequence = combineByteSequences(bytes)
+
+ return sequence.buffer
+ }
+ case 'BinaryString': {
+ // Return bytes as a binary string, in which every byte
+ // is represented by a code unit of equal value [0..255].
+ let binaryString = ''
+
+ const decoder = new StringDecoder('latin1')
+
+ for (const chunk of bytes) {
+ binaryString += decoder.write(chunk)
+ }
+
+ binaryString += decoder.end()
+
+ return binaryString
+ }
+ }
+}
+
+/**
+ * @see https://encoding.spec.whatwg.org/#decode
+ * @param {Uint8Array[]} ioQueue
+ * @param {string} encoding
+ */
+function decode (ioQueue, encoding) {
+ const bytes = combineByteSequences(ioQueue)
+
+ // 1. Let BOMEncoding be the result of BOM sniffing ioQueue.
+ const BOMEncoding = BOMSniffing(bytes)
+
+ let slice = 0
+
+ // 2. If BOMEncoding is non-null:
+ if (BOMEncoding !== null) {
+ // 1. Set encoding to BOMEncoding.
+ encoding = BOMEncoding
+
+ // 2. Read three bytes from ioQueue, if BOMEncoding is
+ // UTF-8; otherwise read two bytes.
+ // (Do nothing with those bytes.)
+ slice = BOMEncoding === 'UTF-8' ? 3 : 2
+ }
+
+ // 3. Process a queue with an instance of encoding’s
+ // decoder, ioQueue, output, and "replacement".
+
+ // 4. Return output.
+
+ const sliced = bytes.slice(slice)
+ return new TextDecoder(encoding).decode(sliced)
+}
+
+/**
+ * @see https://encoding.spec.whatwg.org/#bom-sniff
+ * @param {Uint8Array} ioQueue
+ */
+function BOMSniffing (ioQueue) {
+ // 1. Let BOM be the result of peeking 3 bytes from ioQueue,
+ // converted to a byte sequence.
+ const [a, b, c] = ioQueue
+
+ // 2. For each of the rows in the table below, starting with
+ // the first one and going down, if BOM starts with the
+ // bytes given in the first column, then return the
+ // encoding given in the cell in the second column of that
+ // row. Otherwise, return null.
+ if (a === 0xEF && b === 0xBB && c === 0xBF) {
+ return 'UTF-8'
+ } else if (a === 0xFE && b === 0xFF) {
+ return 'UTF-16BE'
+ } else if (a === 0xFF && b === 0xFE) {
+ return 'UTF-16LE'
+ }
+
+ return null
+}
+
+/**
+ * @param {Uint8Array[]} sequences
+ */
+function combineByteSequences (sequences) {
+ const size = sequences.reduce((a, b) => {
+ return a + b.byteLength
+ }, 0)
+
+ let offset = 0
+
+ return sequences.reduce((a, b) => {
+ a.set(b, offset)
+ offset += b.byteLength
+ return a
+ }, new Uint8Array(size))
+}
+
+module.exports = {
+ staticPropertyDescriptors,
+ readOperation,
+ fireAProgressEvent
+}
diff --git a/node_modules/undici/lib/global.js b/node_modules/undici/lib/global.js
new file mode 100644
index 0000000..18bfd73
--- /dev/null
+++ b/node_modules/undici/lib/global.js
@@ -0,0 +1,32 @@
+'use strict'
+
+// We include a version number for the Dispatcher API. In case of breaking changes,
+// this version number must be increased to avoid conflicts.
+const globalDispatcher = Symbol.for('undici.globalDispatcher.1')
+const { InvalidArgumentError } = require('./core/errors')
+const Agent = require('./agent')
+
+if (getGlobalDispatcher() === undefined) {
+ setGlobalDispatcher(new Agent())
+}
+
+function setGlobalDispatcher (agent) {
+ if (!agent || typeof agent.dispatch !== 'function') {
+ throw new InvalidArgumentError('Argument agent must implement Agent')
+ }
+ Object.defineProperty(globalThis, globalDispatcher, {
+ value: agent,
+ writable: true,
+ enumerable: false,
+ configurable: false
+ })
+}
+
+function getGlobalDispatcher () {
+ return globalThis[globalDispatcher]
+}
+
+module.exports = {
+ setGlobalDispatcher,
+ getGlobalDispatcher
+}
diff --git a/node_modules/undici/lib/handler/DecoratorHandler.js b/node_modules/undici/lib/handler/DecoratorHandler.js
new file mode 100644
index 0000000..9d70a76
--- /dev/null
+++ b/node_modules/undici/lib/handler/DecoratorHandler.js
@@ -0,0 +1,35 @@
+'use strict'
+
+module.exports = class DecoratorHandler {
+ constructor (handler) {
+ this.handler = handler
+ }
+
+ onConnect (...args) {
+ return this.handler.onConnect(...args)
+ }
+
+ onError (...args) {
+ return this.handler.onError(...args)
+ }
+
+ onUpgrade (...args) {
+ return this.handler.onUpgrade(...args)
+ }
+
+ onHeaders (...args) {
+ return this.handler.onHeaders(...args)
+ }
+
+ onData (...args) {
+ return this.handler.onData(...args)
+ }
+
+ onComplete (...args) {
+ return this.handler.onComplete(...args)
+ }
+
+ onBodySent (...args) {
+ return this.handler.onBodySent(...args)
+ }
+}
diff --git a/node_modules/undici/lib/handler/RedirectHandler.js b/node_modules/undici/lib/handler/RedirectHandler.js
new file mode 100644
index 0000000..baca27e
--- /dev/null
+++ b/node_modules/undici/lib/handler/RedirectHandler.js
@@ -0,0 +1,216 @@
+'use strict'
+
+const util = require('../core/util')
+const { kBodyUsed } = require('../core/symbols')
+const assert = require('assert')
+const { InvalidArgumentError } = require('../core/errors')
+const EE = require('events')
+
+const redirectableStatusCodes = [300, 301, 302, 303, 307, 308]
+
+const kBody = Symbol('body')
+
+class BodyAsyncIterable {
+ constructor (body) {
+ this[kBody] = body
+ this[kBodyUsed] = false
+ }
+
+ async * [Symbol.asyncIterator] () {
+ assert(!this[kBodyUsed], 'disturbed')
+ this[kBodyUsed] = true
+ yield * this[kBody]
+ }
+}
+
+class RedirectHandler {
+ constructor (dispatch, maxRedirections, opts, handler) {
+ if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) {
+ throw new InvalidArgumentError('maxRedirections must be a positive number')
+ }
+
+ util.validateHandler(handler, opts.method, opts.upgrade)
+
+ this.dispatch = dispatch
+ this.location = null
+ this.abort = null
+ this.opts = { ...opts, maxRedirections: 0 } // opts must be a copy
+ this.maxRedirections = maxRedirections
+ this.handler = handler
+ this.history = []
+
+ if (util.isStream(this.opts.body)) {
+ // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp
+ // so that it can be dispatched again?
+ // TODO (fix): Do we need 100-expect support to provide a way to do this properly?
+ if (util.bodyLength(this.opts.body) === 0) {
+ this.opts.body
+ .on('data', function () {
+ assert(false)
+ })
+ }
+
+ if (typeof this.opts.body.readableDidRead !== 'boolean') {
+ this.opts.body[kBodyUsed] = false
+ EE.prototype.on.call(this.opts.body, 'data', function () {
+ this[kBodyUsed] = true
+ })
+ }
+ } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') {
+ // TODO (fix): We can't access ReadableStream internal state
+ // to determine whether or not it has been disturbed. This is just
+ // a workaround.
+ this.opts.body = new BodyAsyncIterable(this.opts.body)
+ } else if (
+ this.opts.body &&
+ typeof this.opts.body !== 'string' &&
+ !ArrayBuffer.isView(this.opts.body) &&
+ util.isIterable(this.opts.body)
+ ) {
+ // TODO: Should we allow re-using iterable if !this.opts.idempotent
+ // or through some other flag?
+ this.opts.body = new BodyAsyncIterable(this.opts.body)
+ }
+ }
+
+ onConnect (abort) {
+ this.abort = abort
+ this.handler.onConnect(abort, { history: this.history })
+ }
+
+ onUpgrade (statusCode, headers, socket) {
+ this.handler.onUpgrade(statusCode, headers, socket)
+ }
+
+ onError (error) {
+ this.handler.onError(error)
+ }
+
+ onHeaders (statusCode, headers, resume, statusText) {
+ this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body)
+ ? null
+ : parseLocation(statusCode, headers)
+
+ if (this.opts.origin) {
+ this.history.push(new URL(this.opts.path, this.opts.origin))
+ }
+
+ if (!this.location) {
+ return this.handler.onHeaders(statusCode, headers, resume, statusText)
+ }
+
+ const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)))
+ const path = search ? `${pathname}${search}` : pathname
+
+ // Remove headers referring to the original URL.
+ // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers.
+ // https://tools.ietf.org/html/rfc7231#section-6.4
+ this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin)
+ this.opts.path = path
+ this.opts.origin = origin
+ this.opts.maxRedirections = 0
+ this.opts.query = null
+
+ // https://tools.ietf.org/html/rfc7231#section-6.4.4
+ // In case of HTTP 303, always replace method to be either HEAD or GET
+ if (statusCode === 303 && this.opts.method !== 'HEAD') {
+ this.opts.method = 'GET'
+ this.opts.body = null
+ }
+ }
+
+ onData (chunk) {
+ if (this.location) {
+ /*
+ https://tools.ietf.org/html/rfc7231#section-6.4
+
+ TLDR: undici always ignores 3xx response bodies.
+
+ Redirection is used to serve the requested resource from another URL, so it is assumes that
+ no body is generated (and thus can be ignored). Even though generating a body is not prohibited.
+
+ For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually
+ (which means it's optional and not mandated) contain just an hyperlink to the value of
+ the Location response header, so the body can be ignored safely.
+
+ For status 300, which is "Multiple Choices", the spec mentions both generating a Location
+ response header AND a response body with the other possible location to follow.
+ Since the spec explicitily chooses not to specify a format for such body and leave it to
+ servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it.
+ */
+ } else {
+ return this.handler.onData(chunk)
+ }
+ }
+
+ onComplete (trailers) {
+ if (this.location) {
+ /*
+ https://tools.ietf.org/html/rfc7231#section-6.4
+
+ TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections
+ and neither are useful if present.
+
+ See comment on onData method above for more detailed informations.
+ */
+
+ this.location = null
+ this.abort = null
+
+ this.dispatch(this.opts, this)
+ } else {
+ this.handler.onComplete(trailers)
+ }
+ }
+
+ onBodySent (chunk) {
+ if (this.handler.onBodySent) {
+ this.handler.onBodySent(chunk)
+ }
+ }
+}
+
+function parseLocation (statusCode, headers) {
+ if (redirectableStatusCodes.indexOf(statusCode) === -1) {
+ return null
+ }
+
+ for (let i = 0; i < headers.length; i += 2) {
+ if (headers[i].toString().toLowerCase() === 'location') {
+ return headers[i + 1]
+ }
+ }
+}
+
+// https://tools.ietf.org/html/rfc7231#section-6.4.4
+function shouldRemoveHeader (header, removeContent, unknownOrigin) {
+ return (
+ (header.length === 4 && header.toString().toLowerCase() === 'host') ||
+ (removeContent && header.toString().toLowerCase().indexOf('content-') === 0) ||
+ (unknownOrigin && header.length === 13 && header.toString().toLowerCase() === 'authorization') ||
+ (unknownOrigin && header.length === 6 && header.toString().toLowerCase() === 'cookie')
+ )
+}
+
+// https://tools.ietf.org/html/rfc7231#section-6.4
+function cleanRequestHeaders (headers, removeContent, unknownOrigin) {
+ const ret = []
+ if (Array.isArray(headers)) {
+ for (let i = 0; i < headers.length; i += 2) {
+ if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) {
+ ret.push(headers[i], headers[i + 1])
+ }
+ }
+ } else if (headers && typeof headers === 'object') {
+ for (const key of Object.keys(headers)) {
+ if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) {
+ ret.push(key, headers[key])
+ }
+ }
+ } else {
+ assert(headers == null, 'headers must be an object or an array')
+ }
+ return ret
+}
+
+module.exports = RedirectHandler
diff --git a/node_modules/undici/lib/interceptor/redirectInterceptor.js b/node_modules/undici/lib/interceptor/redirectInterceptor.js
new file mode 100644
index 0000000..7cc035e
--- /dev/null
+++ b/node_modules/undici/lib/interceptor/redirectInterceptor.js
@@ -0,0 +1,21 @@
+'use strict'
+
+const RedirectHandler = require('../handler/RedirectHandler')
+
+function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) {
+ return (dispatch) => {
+ return function Intercept (opts, handler) {
+ const { maxRedirections = defaultMaxRedirections } = opts
+
+ if (!maxRedirections) {
+ return dispatch(opts, handler)
+ }
+
+ const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler)
+ opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting.
+ return dispatch(opts, redirectHandler)
+ }
+ }
+}
+
+module.exports = createRedirectInterceptor
diff --git a/node_modules/undici/lib/llhttp/constants.d.ts b/node_modules/undici/lib/llhttp/constants.d.ts
new file mode 100644
index 0000000..b75ab1b
--- /dev/null
+++ b/node_modules/undici/lib/llhttp/constants.d.ts
@@ -0,0 +1,199 @@
+import { IEnumMap } from './utils';
+export declare type HTTPMode = 'loose' | 'strict';
+export declare enum ERROR {
+ OK = 0,
+ INTERNAL = 1,
+ STRICT = 2,
+ LF_EXPECTED = 3,
+ UNEXPECTED_CONTENT_LENGTH = 4,
+ CLOSED_CONNECTION = 5,
+ INVALID_METHOD = 6,
+ INVALID_URL = 7,
+ INVALID_CONSTANT = 8,
+ INVALID_VERSION = 9,
+ INVALID_HEADER_TOKEN = 10,
+ INVALID_CONTENT_LENGTH = 11,
+ INVALID_CHUNK_SIZE = 12,
+ INVALID_STATUS = 13,
+ INVALID_EOF_STATE = 14,
+ INVALID_TRANSFER_ENCODING = 15,
+ CB_MESSAGE_BEGIN = 16,
+ CB_HEADERS_COMPLETE = 17,
+ CB_MESSAGE_COMPLETE = 18,
+ CB_CHUNK_HEADER = 19,
+ CB_CHUNK_COMPLETE = 20,
+ PAUSED = 21,
+ PAUSED_UPGRADE = 22,
+ PAUSED_H2_UPGRADE = 23,
+ USER = 24
+}
+export declare enum TYPE {
+ BOTH = 0,
+ REQUEST = 1,
+ RESPONSE = 2
+}
+export declare enum FLAGS {
+ CONNECTION_KEEP_ALIVE = 1,
+ CONNECTION_CLOSE = 2,
+ CONNECTION_UPGRADE = 4,
+ CHUNKED = 8,
+ UPGRADE = 16,
+ CONTENT_LENGTH = 32,
+ SKIPBODY = 64,
+ TRAILING = 128,
+ TRANSFER_ENCODING = 512
+}
+export declare enum LENIENT_FLAGS {
+ HEADERS = 1,
+ CHUNKED_LENGTH = 2,
+ KEEP_ALIVE = 4
+}
+export declare enum METHODS {
+ DELETE = 0,
+ GET = 1,
+ HEAD = 2,
+ POST = 3,
+ PUT = 4,
+ CONNECT = 5,
+ OPTIONS = 6,
+ TRACE = 7,
+ COPY = 8,
+ LOCK = 9,
+ MKCOL = 10,
+ MOVE = 11,
+ PROPFIND = 12,
+ PROPPATCH = 13,
+ SEARCH = 14,
+ UNLOCK = 15,
+ BIND = 16,
+ REBIND = 17,
+ UNBIND = 18,
+ ACL = 19,
+ REPORT = 20,
+ MKACTIVITY = 21,
+ CHECKOUT = 22,
+ MERGE = 23,
+ 'M-SEARCH' = 24,
+ NOTIFY = 25,
+ SUBSCRIBE = 26,
+ UNSUBSCRIBE = 27,
+ PATCH = 28,
+ PURGE = 29,
+ MKCALENDAR = 30,
+ LINK = 31,
+ UNLINK = 32,
+ SOURCE = 33,
+ PRI = 34,
+ DESCRIBE = 35,
+ ANNOUNCE = 36,
+ SETUP = 37,
+ PLAY = 38,
+ PAUSE = 39,
+ TEARDOWN = 40,
+ GET_PARAMETER = 41,
+ SET_PARAMETER = 42,
+ REDIRECT = 43,
+ RECORD = 44,
+ FLUSH = 45
+}
+export declare const METHODS_HTTP: METHODS[];
+export declare const METHODS_ICE: METHODS[];
+export declare const METHODS_RTSP: METHODS[];
+export declare const METHOD_MAP: IEnumMap;
+export declare const H_METHOD_MAP: IEnumMap;
+export declare enum FINISH {
+ SAFE = 0,
+ SAFE_WITH_CB = 1,
+ UNSAFE = 2
+}
+export declare type CharList = Array<string | number>;
+export declare const ALPHA: CharList;
+export declare const NUM_MAP: {
+ 0: number;
+ 1: number;
+ 2: number;
+ 3: number;
+ 4: number;
+ 5: number;
+ 6: number;
+ 7: number;
+ 8: number;
+ 9: number;
+};
+export declare const HEX_MAP: {
+ 0: number;
+ 1: number;
+ 2: number;
+ 3: number;
+ 4: number;
+ 5: number;
+ 6: number;
+ 7: number;
+ 8: number;
+ 9: number;
+ A: number;
+ B: number;
+ C: number;
+ D: number;
+ E: number;
+ F: number;
+ a: number;
+ b: number;
+ c: number;
+ d: number;
+ e: number;
+ f: number;
+};
+export declare const NUM: CharList;
+export declare const ALPHANUM: CharList;
+export declare const MARK: CharList;
+export declare const USERINFO_CHARS: CharList;
+export declare const STRICT_URL_CHAR: CharList;
+export declare const URL_CHAR: CharList;
+export declare const HEX: CharList;
+export declare const STRICT_TOKEN: CharList;
+export declare const TOKEN: CharList;
+export declare const HEADER_CHARS: CharList;
+export declare const CONNECTION_TOKEN_CHARS: CharList;
+export declare const MAJOR: {
+ 0: number;
+ 1: number;
+ 2: number;
+ 3: number;
+ 4: number;
+ 5: number;
+ 6: number;
+ 7: number;
+ 8: number;
+ 9: number;
+};
+export declare const MINOR: {
+ 0: number;
+ 1: number;
+ 2: number;
+ 3: number;
+ 4: number;
+ 5: number;
+ 6: number;
+ 7: number;
+ 8: number;
+ 9: number;
+};
+export declare enum HEADER_STATE {
+ GENERAL = 0,
+ CONNECTION = 1,
+ CONTENT_LENGTH = 2,
+ TRANSFER_ENCODING = 3,
+ UPGRADE = 4,
+ CONNECTION_KEEP_ALIVE = 5,
+ CONNECTION_CLOSE = 6,
+ CONNECTION_UPGRADE = 7,
+ TRANSFER_ENCODING_CHUNKED = 8
+}
+export declare const SPECIAL_HEADERS: {
+ connection: HEADER_STATE;
+ 'content-length': HEADER_STATE;
+ 'proxy-connection': HEADER_STATE;
+ 'transfer-encoding': HEADER_STATE;
+ upgrade: HEADER_STATE;
+};
diff --git a/node_modules/undici/lib/llhttp/constants.js b/node_modules/undici/lib/llhttp/constants.js
new file mode 100644
index 0000000..fb0b5a2
--- /dev/null
+++ b/node_modules/undici/lib/llhttp/constants.js
@@ -0,0 +1,278 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0;
+const utils_1 = require("./utils");
+// C headers
+var ERROR;
+(function (ERROR) {
+ ERROR[ERROR["OK"] = 0] = "OK";
+ ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL";
+ ERROR[ERROR["STRICT"] = 2] = "STRICT";
+ ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED";
+ ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH";
+ ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION";
+ ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD";
+ ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL";
+ ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT";
+ ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION";
+ ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN";
+ ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH";
+ ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE";
+ ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS";
+ ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE";
+ ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING";
+ ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN";
+ ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE";
+ ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE";
+ ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER";
+ ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE";
+ ERROR[ERROR["PAUSED"] = 21] = "PAUSED";
+ ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE";
+ ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE";
+ ERROR[ERROR["USER"] = 24] = "USER";
+})(ERROR = exports.ERROR || (exports.ERROR = {}));
+var TYPE;
+(function (TYPE) {
+ TYPE[TYPE["BOTH"] = 0] = "BOTH";
+ TYPE[TYPE["REQUEST"] = 1] = "REQUEST";
+ TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE";
+})(TYPE = exports.TYPE || (exports.TYPE = {}));
+var FLAGS;
+(function (FLAGS) {
+ FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE";
+ FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE";
+ FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE";
+ FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED";
+ FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE";
+ FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH";
+ FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY";
+ FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING";
+ // 1 << 8 is unused
+ FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING";
+})(FLAGS = exports.FLAGS || (exports.FLAGS = {}));
+var LENIENT_FLAGS;
+(function (LENIENT_FLAGS) {
+ LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS";
+ LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH";
+ LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE";
+})(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {}));
+var METHODS;
+(function (METHODS) {
+ METHODS[METHODS["DELETE"] = 0] = "DELETE";
+ METHODS[METHODS["GET"] = 1] = "GET";
+ METHODS[METHODS["HEAD"] = 2] = "HEAD";
+ METHODS[METHODS["POST"] = 3] = "POST";
+ METHODS[METHODS["PUT"] = 4] = "PUT";
+ /* pathological */
+ METHODS[METHODS["CONNECT"] = 5] = "CONNECT";
+ METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS";
+ METHODS[METHODS["TRACE"] = 7] = "TRACE";
+ /* WebDAV */
+ METHODS[METHODS["COPY"] = 8] = "COPY";
+ METHODS[METHODS["LOCK"] = 9] = "LOCK";
+ METHODS[METHODS["MKCOL"] = 10] = "MKCOL";
+ METHODS[METHODS["MOVE"] = 11] = "MOVE";
+ METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND";
+ METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH";
+ METHODS[METHODS["SEARCH"] = 14] = "SEARCH";
+ METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK";
+ METHODS[METHODS["BIND"] = 16] = "BIND";
+ METHODS[METHODS["REBIND"] = 17] = "REBIND";
+ METHODS[METHODS["UNBIND"] = 18] = "UNBIND";
+ METHODS[METHODS["ACL"] = 19] = "ACL";
+ /* subversion */
+ METHODS[METHODS["REPORT"] = 20] = "REPORT";
+ METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY";
+ METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT";
+ METHODS[METHODS["MERGE"] = 23] = "MERGE";
+ /* upnp */
+ METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH";
+ METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY";
+ METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE";
+ METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE";
+ /* RFC-5789 */
+ METHODS[METHODS["PATCH"] = 28] = "PATCH";
+ METHODS[METHODS["PURGE"] = 29] = "PURGE";
+ /* CalDAV */
+ METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR";
+ /* RFC-2068, section 19.6.1.2 */
+ METHODS[METHODS["LINK"] = 31] = "LINK";
+ METHODS[METHODS["UNLINK"] = 32] = "UNLINK";
+ /* icecast */
+ METHODS[METHODS["SOURCE"] = 33] = "SOURCE";
+ /* RFC-7540, section 11.6 */
+ METHODS[METHODS["PRI"] = 34] = "PRI";
+ /* RFC-2326 RTSP */
+ METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE";
+ METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE";
+ METHODS[METHODS["SETUP"] = 37] = "SETUP";
+ METHODS[METHODS["PLAY"] = 38] = "PLAY";
+ METHODS[METHODS["PAUSE"] = 39] = "PAUSE";
+ METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN";
+ METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER";
+ METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER";
+ METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT";
+ METHODS[METHODS["RECORD"] = 44] = "RECORD";
+ /* RAOP */
+ METHODS[METHODS["FLUSH"] = 45] = "FLUSH";
+})(METHODS = exports.METHODS || (exports.METHODS = {}));
+exports.METHODS_HTTP = [
+ METHODS.DELETE,
+ METHODS.GET,
+ METHODS.HEAD,
+ METHODS.POST,
+ METHODS.PUT,
+ METHODS.CONNECT,
+ METHODS.OPTIONS,
+ METHODS.TRACE,
+ METHODS.COPY,
+ METHODS.LOCK,
+ METHODS.MKCOL,
+ METHODS.MOVE,
+ METHODS.PROPFIND,
+ METHODS.PROPPATCH,
+ METHODS.SEARCH,
+ METHODS.UNLOCK,
+ METHODS.BIND,
+ METHODS.REBIND,
+ METHODS.UNBIND,
+ METHODS.ACL,
+ METHODS.REPORT,
+ METHODS.MKACTIVITY,
+ METHODS.CHECKOUT,
+ METHODS.MERGE,
+ METHODS['M-SEARCH'],
+ METHODS.NOTIFY,
+ METHODS.SUBSCRIBE,
+ METHODS.UNSUBSCRIBE,
+ METHODS.PATCH,
+ METHODS.PURGE,
+ METHODS.MKCALENDAR,
+ METHODS.LINK,
+ METHODS.UNLINK,
+ METHODS.PRI,
+ // TODO(indutny): should we allow it with HTTP?
+ METHODS.SOURCE,
+];
+exports.METHODS_ICE = [
+ METHODS.SOURCE,
+];
+exports.METHODS_RTSP = [
+ METHODS.OPTIONS,
+ METHODS.DESCRIBE,
+ METHODS.ANNOUNCE,
+ METHODS.SETUP,
+ METHODS.PLAY,
+ METHODS.PAUSE,
+ METHODS.TEARDOWN,
+ METHODS.GET_PARAMETER,
+ METHODS.SET_PARAMETER,
+ METHODS.REDIRECT,
+ METHODS.RECORD,
+ METHODS.FLUSH,
+ // For AirPlay
+ METHODS.GET,
+ METHODS.POST,
+];
+exports.METHOD_MAP = utils_1.enumToMap(METHODS);
+exports.H_METHOD_MAP = {};
+Object.keys(exports.METHOD_MAP).forEach((key) => {
+ if (/^H/.test(key)) {
+ exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key];
+ }
+});
+var FINISH;
+(function (FINISH) {
+ FINISH[FINISH["SAFE"] = 0] = "SAFE";
+ FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB";
+ FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE";
+})(FINISH = exports.FINISH || (exports.FINISH = {}));
+exports.ALPHA = [];
+for (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) {
+ // Upper case
+ exports.ALPHA.push(String.fromCharCode(i));
+ // Lower case
+ exports.ALPHA.push(String.fromCharCode(i + 0x20));
+}
+exports.NUM_MAP = {
+ 0: 0, 1: 1, 2: 2, 3: 3, 4: 4,
+ 5: 5, 6: 6, 7: 7, 8: 8, 9: 9,
+};
+exports.HEX_MAP = {
+ 0: 0, 1: 1, 2: 2, 3: 3, 4: 4,
+ 5: 5, 6: 6, 7: 7, 8: 8, 9: 9,
+ A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF,
+ a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf,
+};
+exports.NUM = [
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
+];
+exports.ALPHANUM = exports.ALPHA.concat(exports.NUM);
+exports.MARK = ['-', '_', '.', '!', '~', '*', '\'', '(', ')'];
+exports.USERINFO_CHARS = exports.ALPHANUM
+ .concat(exports.MARK)
+ .concat(['%', ';', ':', '&', '=', '+', '$', ',']);
+// TODO(indutny): use RFC
+exports.STRICT_URL_CHAR = [
+ '!', '"', '$', '%', '&', '\'',
+ '(', ')', '*', '+', ',', '-', '.', '/',
+ ':', ';', '<', '=', '>',
+ '@', '[', '\\', ']', '^', '_',
+ '`',
+ '{', '|', '}', '~',
+].concat(exports.ALPHANUM);
+exports.URL_CHAR = exports.STRICT_URL_CHAR
+ .concat(['\t', '\f']);
+// All characters with 0x80 bit set to 1
+for (let i = 0x80; i <= 0xff; i++) {
+ exports.URL_CHAR.push(i);
+}
+exports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']);
+/* Tokens as defined by rfc 2616. Also lowercases them.
+ * token = 1*<any CHAR except CTLs or separators>
+ * separators = "(" | ")" | "<" | ">" | "@"
+ * | "," | ";" | ":" | "\" | <">
+ * | "/" | "[" | "]" | "?" | "="
+ * | "{" | "}" | SP | HT
+ */
+exports.STRICT_TOKEN = [
+ '!', '#', '$', '%', '&', '\'',
+ '*', '+', '-', '.',
+ '^', '_', '`',
+ '|', '~',
+].concat(exports.ALPHANUM);
+exports.TOKEN = exports.STRICT_TOKEN.concat([' ']);
+/*
+ * Verify that a char is a valid visible (printable) US-ASCII
+ * character or %x80-FF
+ */
+exports.HEADER_CHARS = ['\t'];
+for (let i = 32; i <= 255; i++) {
+ if (i !== 127) {
+ exports.HEADER_CHARS.push(i);
+ }
+}
+// ',' = \x44
+exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44);
+exports.MAJOR = exports.NUM_MAP;
+exports.MINOR = exports.MAJOR;
+var HEADER_STATE;
+(function (HEADER_STATE) {
+ HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL";
+ HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION";
+ HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH";
+ HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING";
+ HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE";
+ HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE";
+ HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE";
+ HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE";
+ HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED";
+})(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {}));
+exports.SPECIAL_HEADERS = {
+ 'connection': HEADER_STATE.CONNECTION,
+ 'content-length': HEADER_STATE.CONTENT_LENGTH,
+ 'proxy-connection': HEADER_STATE.CONNECTION,
+ 'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING,
+ 'upgrade': HEADER_STATE.UPGRADE,
+};
+//# sourceMappingURL=constants.js.map \ No newline at end of file
diff --git a/node_modules/undici/lib/llhttp/constants.js.map b/node_modules/undici/lib/llhttp/constants.js.map
new file mode 100644
index 0000000..6ac54bc
--- /dev/null
+++ b/node_modules/undici/lib/llhttp/constants.js.map
@@ -0,0 +1 @@
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BAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACtB;CACF;AAED,aAAa;AACA,QAAA,sBAAsB,GACjC,oBAAY,CAAC,MAAM,CAAC,CAAC,CAAkB,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;AAE3C,QAAA,KAAK,GAAG,eAAO,CAAC;AAChB,QAAA,KAAK,GAAG,aAAK,CAAC;AAE3B,IAAY,YAWX;AAXD,WAAY,YAAY;IACtB,qDAAW,CAAA;IACX,2DAAU,CAAA;IACV,mEAAc,CAAA;IACd,yEAAiB,CAAA;IACjB,qDAAO,CAAA;IAEP,iFAAqB,CAAA;IACrB,uEAAgB,CAAA;IAChB,2EAAkB,CAAA;IAClB,yFAAyB,CAAA;AAC3B,CAAC,EAXW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAWvB;AAEY,QAAA,eAAe,GAAG;IAC7B,YAAY,EAAE,YAAY,CAAC,UAAU;IACrC,gBAAgB,EAAE,YAAY,CAAC,cAAc;IAC7C,kBAAkB,EAAE,YAAY,CAAC,UAAU;IAC3C,mBAAmB,EAAE,YAAY,CAAC,iBAAiB;IACnD,SAAS,EAAE,YAAY,CAAC,OAAO;CAChC,CAAC"} \ No newline at end of file
diff --git a/node_modules/undici/lib/llhttp/llhttp-wasm.js b/node_modules/undici/lib/llhttp/llhttp-wasm.js
new file mode 100644
index 0000000..e176ce2
--- /dev/null
+++ b/node_modules/undici/lib/llhttp/llhttp-wasm.js
@@ -0,0 +1 @@
+module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV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R0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCtnkAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQy4CAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDLgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMuAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ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AIQMgAC8BMCIEQQFxRQ0BC0EBIQMgAC0AKEEBRg0AIAAvATIiBUGcf2pB5ABJDQAgBUHMAUYNACAFQbACRg0AIARBwABxDQBBACEDIARBiARxQYAERg0AIARBKHFBAEchAwsgAEEAOwEwIABBADoALyADC5QBAQJ/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQEgAC8BMCICQQJxRQ0BDAILQQAhASAALwEwIgJBAXFFDQELQQEhASAALQAoQQFGDQAgAC8BMiIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC1kAIABBGGpCADcDACAAQgA3AwAgAEE4akIANwMAIABBMGpCADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvc9wEDKH8DfgV/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8gASEQIAEhESABIRIgASETIAEhFCABIRUgASEWIAEhFyABIRggASEZIAEhGiABIRsgASEcIAEhHSABIR4gASEfIAEhICABISEgASEiIAEhIyABISQgASElIAEhJiABIScgASEoIAEhKQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQA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ALQYUBISoMPwtBhgEhKgw+C0GHASEqDD0LQYgBISoMPAtBiQEhKgw7C0GKASEqDDoLQYsBISoMOQtBjAEhKgw4C0GNASEqDDcLQY4BISoMNgtBjwEhKgw1C0GQASEqDDQLQZEBISoMMwtBkgEhKgwyC0GTASEqDDELQZQBISoMMAtBlQEhKgwvC0GWASEqDC4LQZcBISoMLQtBmAEhKgwsC0GZASEqDCsLQZoBISoMKgtBmwEhKgwpC0GcASEqDCgLQZ0BISoMJwtBngEhKgwmC0GfASEqDCULQaABISoMJAtBoQEhKgwjC0GiASEqDCILQaMBISoMIQtBpAEhKgwgC0GlASEqDB8LQaYBISoMHgtBpwEhKgwdC0GoASEqDBwLQakBISoMGwtBqgEhKgwaC0GrASEqDBkLQawBISoMGAtBrQEhKgwXC0GuASEqDBYLQQEhKgwVC0GvASEqDBQLQbABISoMEwtBsQEhKgwSC0GzASEqDBELQbIBISoMEAtBtAEhKgwPC0G1ASEqDA4LQbYBISoMDQtBtwEhKgwMC0G4ASEqDAsLQbkBISoMCgtBugEhKgwJC0G7ASEqDAgLQcYBISoMBwtBvAEhKgwGC0G9ASEqDAULQb4BISoMBAtBvwEhKgwDC0HAASEqDAILQcIBISoMAQtBwQEhKgsDQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgKg7HAQABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHh8gISMlKD9AQURFRkdISUpLTE1PUFFSU+MDV1lbXF1gYmVmZ2hpamtsbW9wcXJzdHV2d3h5ent8fX6AAYIBhQGGAYcBiQGLAYwBjQGOAY8BkAGRAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4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C0IPISsM2AELQgohKwzXAQtCCyErDNYBC0IMISsM1QELQg0hKwzUAQtCDiErDNMBC0IPISsM0gELQgAhKwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgKi0AAEFQag435QHkAQABAgMEBQYH5gHmAeYB5gHmAeYB5gEICQoLDA3mAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYBDg8QERIT5gELQgIhKwzkAQtCAyErDOMBC0IEISsM4gELQgUhKwzhAQtCBiErDOABC0IHISsM3wELQgghKwzeAQtCCSErDN0BC0IKISsM3AELQgshKwzbAQtCDCErDNoBC0INISsM2QELQg4hKwzYAQtCDyErDNcBC0IKISsM1gELQgshKwzVAQtCDCErDNQBC0INISsM0wELQg4hKwzSAQtCDyErDNEBCyAAQgAgACkDICIrIAIgASIqa60iLH0iLSAtICtWGzcDICArICxWIi5FDdIBQR8hKgzHAwsCQCABIgEgAkYNACAAQYmAgIAANgIIIAAgATYCBCABIQFBJCEqDK4DC0EgISoMxgMLIAAgASIqIAIQvoCAgABBf2oOBbYBAMsCAdEB0gELQREhKgyrAwsgAEEBOgAvICohAQzCAwsgASIBIAJHDdIBQSQhKgzCAwsgASInIAJHDR5BxgAhKgzBAwsgACABIgEgAhCygICAACIqDdQBIAEhAQy1AQsgASIqIAJHDSZB0AAhKgy/AwsCQCABIgEgAkcNAEEoISoMvwMLIABBADYCBCAAQYyAgIAANgIIIAAgASABELGAgIAAIioN0wEgASEBDNgBCwJAIAEiKiACRw0AQSkhKgy+AwsgKi0AACIBQSBGDRQgAUEJRw3TASAqQQFqIQEMFQsCQCABIgEgAkYNACABQQFqIQEMFwtBKiEqDLwDCwJAIAEiKiACRw0AQSshKgy8AwsCQCAqLQAAIgFBCUYNACABQSBHDdUBCyAALQAsQQhGDdMBICohAQyWAwsCQCABIgEgAkcNAEEsISoMuwMLIAEtAABBCkcN1QEgAUEBaiEBDM8CCyABIigg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AKAIAIi5qITIgKiEEIC4hAQJAA0AgBC0AACABQfzOgIAAai0AAEcN0QEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAyNgIAQf8AISoM7AILIABBADYCACAqIC5rQQRqIQFBBSEqDM4BCwJAIAEiBCACRw0AQYABISoM6wILIAQtAABB2QBHDc8BIARBAWohAUEIISoMzQELAkAgASIEIAJHDQBBgQEhKgzqAgsCQAJAIAQtAABBsn9qDgMA0AEB0AELIARBAWohAUHrACEqDNECCyAEQQFqIQFB7AAhKgzQAgsCQCABIgQgAkcNAEGCASEqDOkCCwJAAkAgBC0AAEG4f2oOCADPAc8BzwHPAc8BzwEBzwELIARBAWohAUHqACEqDNACCyAEQQFqIQFB7QAhKgzPAgsCQCABIi4gAkcNAEGDASEqDOgCCyACIC5rIAAoAgAiMmohKiAuIQQgMiEBAkADQCAELQAAIAFBgM+AgABqLQAARw3NASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAICo2AgBBgwEhKgzoAgtBACEqIABBADYCACAuIDJrQQNqIQEMygELAkAgASIqIAJHDQBBhAEhKgznAgsgAiAqayAAKAIAIi5qITIgKiEEIC4hAQJAA0AgBC0AACABQYPPgIAAai0AAEcNzAEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAyNgIAQYQBISoM5wILIABBADYCACAqIC5rQQVqIQFBIyEqDMkBCwJAIAEiBCACRw0AQYUBISoM5gILAkACQCAELQAAQbR/ag4IAMwBzAHMAcwBzAHMAQHMAQsgBEEBaiEBQe8AISoMzQILIARBAWohAUHwACEqDMwCCwJAIAEiBCACRw0AQYYBISoM5QILIAQtAABBxQBHDckBIARBAWohAQyKAgsCQCABIiogAkcNAEGHASEqDOQCCyACICprIAAoAgAiLmohMiAqIQQgLiEBAkADQCAELQAAIAFBiM+AgABqLQAARw3JASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIDI2AgBBhwEhKgzkAgsgAEEANgIAICogLmtBBGohAUEtISoMxgEL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QtAABBrn9qDgMArAEBrAELIARBAWohDkGQASEqDK0CCyAEQQFqIQFBBCEqDKgBCwJAIAQgAkcNAEGmASEqDMUCCwJAAkACQAJAAkAgBC0AAEG/f2oOFQCuAa4BrgGuAa4BrgGuAa4BrgGuAQGuAa4BAq4BrgEDrgGuAQSuAQsgBEEBaiEEQYgBISoMrwILIARBAWohCkGJASEqDK4CCyAEQQFqIQtBigEhKgytAgsgBEEBaiEEQY8BISoMrAILIARBAWohBEGRASEqDKsCCwJAIA8gAkcNAEGnASEqDMQCCyACIA9rIAAoAgAiKmohLiAPIQQgKiEBAkADQCAELQAAIAFB7c+AgABqLQAARw2pASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIC42AgBBpwEhKgzEAgsgAEEANgIAIA8gKmtBA2ohAUERISoMpgELAkAgECACRw0AQagBISoMwwILIAIgEGsgACgCACIqaiEuIBAhBCAqIQECQANAIAQtAAAgAUHCz4CAAGotAABHDagBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgLjYCAEGoASEqDMMCCyAAQQA2AgAgECAqa0EDaiEBQSwhKgylAQsCQCARIAJHDQBBqQEhKgzCAgsgAiARayAAKAIAIipqIS4gESEEICohAQJAA0AgBC0AACABQcXPgIAAai0AAEcNpwEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAuNgIAQakBISoMwgILIABBADYCACARICprQQVqIQFBKyEqDKQBCwJAIBIgAkcNAEGqASEqDMECCyACIBJrIAAoAgAiKmohLiASIQQgKiEBAkADQCAELQAAIAFBys+AgABqLQAARw2mASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIC42AgBBqgEhKgzBAgsgAEEANgIAIBIgKmtBA2ohAUEUISoMowELAkAgBCACRw0AQasBISoMwAILAkACQAJAAkAgBC0AAEG+f2oODwABAqgBqAGoAagBqAGoAagBqAGoAagBqAEDqAELIARBAWohD0GTASEqDKkCCyAEQQFqIRBBlAEhKgyoAgsgBEEBaiERQZUBIS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aiEBIARBAWoiBCACRw0ACyAAIC42AgBBugEhKgyxAgsgAEEANgIAIBsgKmtBAmohAUEPISoMkwELAkAgBCACRw0AQbsBISoMsAILAkACQCAELQAAQbd/ag4HAJYBlgGWAZYBlgEBlgELIARBAWohGkGlASEqDJcCCyAEQQFqIRtBpgEhKgyWAgsCQCAcIAJHDQBBvAEhKgyvAgsgAiAcayAAKAIAIipqIS4gHCEEICohAQJAA0AgBC0AACABQfTPgIAAai0AAEcNlAEgAUEHRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAuNgIAQbwBISoMrwILIABBADYCACAcICprQQhqIQFBGyEqDJEBCwJAIAQgAkcNAEG9ASEqDK4CCwJAAkACQCAELQAAQb5/ag4SAJUBlQGVAZUBlQGVAZUBlQGVAQGVAZUBlQGVAZUBlQEClQELIARBAWohGUGkASEqDJYCCyAEQQFqIQRBpwEhKgyVAgsgBEEBaiEcQagBISoMlAILAkAgBCACRw0AQb4BISoMrQILIAQtAABBzgBHDZEBIARBAWohBAzWAQsCQCAEIAJHDQBBvwEhKgysAgsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAELQAAQb9/ag4VAAECA6ABBAUGoAGgAaABBwgJCgugAQwNDg+gAQsgBEEBaiEBQegAISoMoQILIARBAWohAUHpACEqDKACCyAEQQFqIQFB7gAhKgyfAgsgBEEBaiEBQfIAISoMngILIARBAWohAUHzACEqDJ0CCyAEQQFqIQFB9gAhKgycAgsgBEEBaiEBQfcAISoMmwILIARBAWohAUH6ACEqDJoCCyAEQQFqIQRBgwEhKgyZAgsgBEEBaiEGQYQBISoMmAILIARBAWohB0GFASEqDJcCCyAEQQFqIQRBkgEhKgyWAgsgBEEBaiEEQZgBISoMlQILIARBAWohBEGgASEqDJQCCyAEQQFqIQRBowEhKgyTAgsgBEEBaiEEQaoBISoMkgILAkAgBCACRg0AIABBkICAgAA2AgggACAENgIEQasBISoMkgILQcABISoMqgILIAAgHSACEKqAgIAAIgENjwEgHSEBDF4L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ADYCECAAQRI2AgxBACEqDI8CCwJAIAAgKiACELSAgIAAIgENACAqIQEMiAILAkAgAUEVRw0AIABBAzYCHCAAICo2AhQgAEGwmICAADYCECAAQRU2AgxBACEqDI8CCyAAQQA2AhwgACAqNgIUIABBp46AgAA2AhAgAEESNgIMQQAhKgyOAgsgKkEVRg3eASAAQQA2AhwgACABNgIUIABB2o2AgAA2AhAgAEEUNgIMQQAhKgyNAgsgACgCBCEyIABBADYCBCAqICunaiIvIQEgACAyICogLyAuGyIqELWAgIAAIi5FDZMBIABBBzYCHCAAICo2AhQgACAuNgIMQQAhKgyMAgsgACAALwEwQYABcjsBMCABIQELQSohKgzxAQsgKkEVRg3ZASAAQQA2AhwgACABNgIUIABBg4yAgAA2AhAgAEETNgIMQQAhKgyJAgsgKkEVRg3XASAAQQA2AhwgACABNgIUIABBmo+AgAA2AhAgAEEiNgIMQQAhKgyIAgsgACgCBCEqIABBADYCBAJAIAAgKiABELeAgIAAIioNACABQQFqIQEMkwELIABBDDYCHCAAICo2AgwgACABQQFqNgIUQQAhKgyHAgsgKkEVRg3UASAAQQA2AhwgACABNgIUIABBmo+AgAA2AhAgAEEiNgIMQQAhKgyGAgsgACgCBCEqIABBADYCBAJAIAAgKiABELeAgIAAIioNACABQQFqIQEMkgELIABBDTYCHCAAICo2AgwgACABQQFqNgIUQQAhKgyFAgsgKkEVRg3RASAAQQA2AhwgACABNgIUIABBxoyAgAA2AhAgAEEjNgIMQQAhKgyEAgsgACgCBCEqIABBADYCBAJAIAAgKiABELmAgIAAIioNACABQQFqIQEMkQELIABBDjYCHCAAICo2AgwgACABQQFqNgIUQQAhKgyDAgsgAEEANgIcIAAgATYCFCAAQcCVgIAANgIQIABBAjYCDEEAISoMggILICpBFUYNzQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAISoMgQILIABBEDYCHCAAIAE2AhQgACAqNgIMQQAhKgyAAgsgACgCBCEEIABBADYCBAJAIAAgBCABELmAgIAAIgQNACABQQFqIQEM+AELIABBETYCHCAAIAQ2AgwgACABQQFqNgIUQQAhKgz/AQsgKkEVRg3JASAAQQA2AhwgACABNgIUIABBxoyAgAA2AhAgAEEjNgIMQQAhKgz+AQsgACgCBCEqIABBADYCBAJAIAAgKiABELmAgIAAIioNACABQQFqIQEMjgELIABBEzYCHCAAICo2AgwgACABQQFqNgIUQQAhKgz9AQsgACgCBCEEIABBADYCBAJAIAAgBCABELmAgIAAIgQNACABQQFqIQEM9AELIABBFDYCHCAAIAQ2AgwgACABQQFqNgIUQQAhKgz8AQsgKkEVRg3FASAAQQA2AhwgACABNgIUIABBmo+AgAA2AhAgAEEiNgIMQQAhKgz7AQsgACgCBCEqIABBADYCBAJAIAAgKiABELeAgIAAIioNACABQQFqIQEMjAELIABBFjYCHCAAICo2AgwgACABQQFqNgIUQQAhKgz6AQsgACgCBCEEIABBADYCBAJAIAAgBCABELeAgIAAIgQNACABQQFqIQEM8AELIABBFzYCHCAAIAQ2AgwgACABQQFqNgIUQQAhKgz5AQsgAEEANgIcIAAgATYCFCAAQc2TgIAANgIQIABBDDYCDEEAISoM+AELQgEhKwsgKkEBaiEBAkAgACkDICIsQv//////////D1YNACAAICxCBIYgK4Q3AyAgASEBDIoBCyAAQQA2AhwgACABNgIUIABBrYmAgAA2AhAgAEEMNgIMQQAhKgz2AQsgAEEANgIcIAAgKjYCFCAAQc2TgIAANgIQIABBDDYCDEEAISoM9QELIAAoAgQhMiAAQQA2AgQgKiArp2oiLyEBIAAgMiAqIC8gLhsiKhC1gICAACIuRQ15IABBBTYCHCAAICo2AhQgACAuNgIMQQAhKgz0AQsgAEEANgIcIAAgKjYCFCAAQaqcgIAANgIQIABBDzYCDEEAISoM8wELIAAgKiACELSAgIAAIgENASAqIQELQQ4hKgzYAQsCQCABQRVHDQAgAEECNgIcIAAgKjYCFCAAQbCYgIAANgIQIABBFTYCDEEAISoM8QELIABBADYCHCAAICo2AhQgAEGnjoCAADYCECAAQRI2AgxBACEqDPABCyABQQFqISo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MtgELIAAoAgQhKiAAQQA2AgQCQCAAICogARCngICAACIqDQAgASEBDE8LIABB0gA2AhwgACABNgIUIAAgKjYCDEEAISoMtQELIAAoAgQhKiAAQQA2AgQCQCAAICogARCngICAACIqDQAgASEBDE8LIABB0wA2AhwgACABNgIUIAAgKjYCDEEAISoMtAELIAAoAgQhKiAAQQA2AgQCQCAAICogARCngICAACIqDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgKjYCDEEAISoMswELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEqDLIBCyAAKAIEISogAEEANgIEAkAgACAqIAEQp4CAgAAiKg0AIAEhAQxLCyAAQdIANgIcIAAgATYCFCAAICo2AgxBACEqDLEBCyAAKAIEISogAEEANgIEAkAgACAqIAEQp4CAgAAiKg0AIAEhAQxLCyAAQdMANgIcIAAgATYCFCAAICo2AgxBACEqDLABCyAAKAIEISogAEEANgIEAkAgACAqIAEQp4CAgAAiKg0AIAEhAQxQCyAAQeUANgIcIAAgATYCFCAAICo2AgxBACEqDK8BCyAAQQA2AhwgACABNgIUIABB3IiAgAA2AhAgAEEHNgIMQQAhKgyuAQsgKkE/Rw0BIAFBAWohAQtBBSEqDJMBC0EAISogAEEANgIcIAAgATYCFCAAQf2SgIAANgIQIABBBzYCDAyrAQsgACgCBCEqIABBADYCBAJAIAAgKiABEKeAgIAAIioNACABIQEMRAsgAEHSADYCHCAAIAE2AhQgACAqNgIMQQAhKgyqAQsgACgCBCEqIABBADYCBAJAIAAgKiABEKeAgIAAIioNACABIQEMRAsgAEHTADYCHCAAIAE2AhQgACAqNgIMQQAhKgypAQsgACgCBCEqIABBADYCBAJAIAAgKiABEKeAgIAAIioNACABIQEMSQsgAEHlADYCHCAAIAE2AhQgACAqNgIMQQAhKgyoAQsgACgCBCEBIABBADYCBAJAIAAgASAuEKeAgIAAIgENACAuIQEMQQsgAEHSADYCHCAAIC42AhQgACABNgIMQQAhKgynAQsgACgCBCEBIABBADYCBAJAIAAgASAu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cAAISoMDQsgASEBC0E4ISoMCwsCQCABIikgAkYNAANAAkAgKS0AAEGAvoCAAGotAAAiAUEBRg0AIAFBAkcNAyApQQFqIQEMBAsgKUEBaiIpIAJHDQALQT4hKgwkC0E+ISoMIwsgAEEAOgAsICkhAQwBC0ELISoMCAtBOiEqDAcLIAFBAWohAUEtISoMBgtBKCEqDAULIABBADYCACAvIDBrQQRqIQFBBiEqCyAAICo6ACwgASEBQQwhKgwDCyAAQQA2AgAgMiAva0EHaiEBQQohKgwCCyAAQQA2AgALIABBADoALCAnIQFBCSEqDAALC0EAISogAEEANgIcIAAgIzYCFCAAQc2QgIAANgIQIABBCTYCDAwXC0EAISogAEEANgIcIAAgIjYCFCAAQemKgIAANgIQIABBCTYCDAwWC0EAISogAEEANgIcIAAgITYCFCAAQbeQgIAANgIQIABBCTYCDAwVC0EAISogAEEANgIcIAAgIDYCFCAAQZyRgIAANgIQIABBCTYCDAwUC0EAISogAEEANgIcIAAgATYCFCAAQc2QgIAANgIQIABBCTYCDAwTC0EAISogAEEANgIcIAAgATYCFCAAQemKgIAANgIQIABBCTYCDAwSC0EAISogAEEANgIcIAAgATYCFCAAQbeQgIAANgIQIABBCTYCDAwRC0EAISogAEEANgIcIAAgATYCFCAAQZyRgIAANgIQIABBCTYCDAwQC0EAISogAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwPC0EAISogAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwOC0EAISogAEEANgIcIAAgATYCFCAAQcCSgIAANgIQIABBCzYCDAwNC0EAISogAEEANgIcIAAgATYCFCAAQZWJgIAANgIQIABBCzYCDAwMC0EAISogAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDAwLC0EAISogAEEANgIcIAAgATYCFCAAQfuPgIAANgIQIABBCjYCDAwKC0EAISogAEEANgIcIAAgATYCFCAAQfGZgIAANgIQIABBAjYCDAwJC0EAISogAEEANgIcIAAgATYCFCAAQcSUgIAANgIQIABBA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AAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv'
diff --git a/node_modules/undici/lib/llhttp/llhttp.wasm b/node_modules/undici/lib/llhttp/llhttp.wasm
new file mode 100755
index 0000000..633d00a
--- /dev/null
+++ b/node_modules/undici/lib/llhttp/llhttp.wasm
Binary files differ
diff --git a/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js b/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js
new file mode 100644
index 0000000..0fb8a67
--- /dev/null
+++ b/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js
@@ -0,0 +1 @@
+module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZ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W5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCsnkAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQy4CAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDLgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMuAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAA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Gcf2pB5ABJDQAgBUHMAUYNACAFQbACRg0AIARBwABxDQBBACEDIARBiARxQYAERg0AIARBKHFBAEchAwsgAEEAOwEwIABBADoALyADC5QBAQJ/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQEgAC8BMCICQQJxRQ0BDAILQQAhASAALwEwIgJBAXFFDQELQQEhASAALQAoQQFGDQAgAC8BMiIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC0kBAXsgAEEQav0MAAAAAAAAAAAAAAAAAAAAACIB/QsDACAAIAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC9z3AQMofwN+BX8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDyABIRAgASERIAEhEiABIRMgASEUIAEhFSABIRYgASEXIAEhGCABIRkgASEaIAEhGyABIRwgASEdIAEhHiABIR8gASEgIAEhISABISIgASEjIAEhJCABISUgASEmIAEhJyABISggASEpAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAk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gw5C0GMASEqDDgLQY0BISoMNwtBjgEhKgw2C0GPASEqDDULQZABISoMNAtBkQEhKgwzC0GSASEqDDILQZMBISoMMQtBlAEhKgwwC0GVASEqDC8LQZYBISoMLgtBlwEhKgwtC0GYASEqDCwLQZkBISoMKwtBmgEhKgwqC0GbASEqDCkLQZwBISoMKAtBnQEhKgwnC0GeASEqDCYLQZ8BISoMJQtBoAEhKgwkC0GhASEqDCMLQaIBISoMIgtBowEhKgwhC0GkASEqDCALQaUBISoMHwtBpgEhKgweC0GnASEqDB0LQagBISoMHAtBqQEhKgwbC0GqASEqDBoLQasBISoMGQtBrAEhKgwYC0GtASEqDBcLQa4BISoMFgtBASEqDBULQa8BISoMFAtBsAEhKgwTC0GxASEqDBILQbMBISoMEQtBsgEhKgwQC0G0ASEqDA8LQbUBISoMDgtBtgEhKgwNC0G3ASEqDAwLQbgBISoMCwtBuQEhKgwKC0G6ASEqDAkLQbsBISoMCAtBxgEhKgwHC0G8ASEqDAYLQb0BISoMBQtBvgEhKgwEC0G/ASEqDAMLQcABISoMAgtBwgEhKgwBC0HBASEqCwNAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAqDscBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxweHyAhIyUoP0BBREVGR0hJSktMTU9QUVJT4wNXWVtcXWBiZWZnaGlqa2xtb3BxcnN0dXZ3eHl6e3x9foABggGFAYYBhwGJAYsBjAGNAY4BjwGQAZEBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAckBygHLAcwBzQHOAc8B0AHRAdIB0wHUAdUB1gHXAdgB2QHaAdsB3AHdAd4B4AHhAeIB4wHkAeUB5gHnAegB6QHqAesB7AHtAe4B7wHwAfEB8gHzAZkCpAKyAoQDhAMLIAEiBCACRw3zAUHdASEqDIYECyABIiogAkcN3QFBwwEhKgyFBAsgASIBIAJHDZABQfcAISoMhAQLIAEiASACRw2GAUHvACEqDIMECyABIgEgAkcNf0HqACEqDIIECyABIgEgAkcNe0HoACEqDIEECyABIgEgAkcNeEHmACEqDIAECyABIgEgAkcNGkEYISoM/wMLIAEiASACRw0UQRIhKgz+AwsgASIBIAJHDVlBxQAhKgz9AwsgASIBIAJHDUpBPyEqDPwDCyABIgEgAkcNSEE8ISoM+wMLIAEiASACRw1BQTEhKgz6AwsgAC0ALkEBRg3yAwyHAgsgACABIgEgAhDAgICAAEEBRw3mASAAQgA3AyAM5wELIAAgASIBIAIQtICAgAAiKg3nASABIQEM+wILAkAgASIBIAJHDQBBBiEqDPcDCyAAIAFBAWoiASACELuAgIAAIioN6AEgASEBDDELIABCADcDIEESISoM3AMLIAEiKiACRw0rQR0hKgz0AwsCQCABIgEgAkYNACABQQFqIQFBECEqDNsDC0EHISoM8wMLIABCACAAKQMgIisgAiABIiprrSIsfSItIC0gK1YbNwMgICsgLFYiLkUN5QFBCCEqDPIDCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEUISoM2QMLQQkhKgzxAwsgASEBIAApAyBQDeQBIAEhAQz4AgsCQCABIgEgAkcNAEELISoM8AMLIAAgAUEBaiIBIAIQtoCAgAAiKg3lASABIQEM+AILIAAgASIBIAIQuICAgAAiKg3lASABIQEM+AILIAAgASIBIAIQuICAgAAiKg3mASABIQEMDQsgACABIgEgAhC6gICAACIqDecBIAEhAQz2AgsCQCABIgEgAkcNAEEPISoM7AMLIAEtAAAiKkE7Rg0IICpBDUcN6AEgAUEBaiEBDPUCCyAAIAEiASACELqAgIAAIioN6AEgASEBDPgCCwNAAkAgAS0AAEHwtYCAAGotAAAiKkEBRg0AICpBAkcN6wEg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AAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAqLQAAQVBqDjflAeQBAAECAwQFBgfmAeYB5gHmAeYB5gHmAQgJCgsMDeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gEODxAREhPmAQtCAiErDOQBC0IDISsM4wELQgQhKwziAQtCBSErDOEBC0IGISsM4AELQgchKwzfAQtCCCErDN4BC0IJISsM3QELQgohKwzcAQtCCyErDNsBC0IMISsM2gELQg0hKwzZAQtCDiErDNgBC0IPISsM1wELQgohKwzWAQtCCyErDNUBC0IMISsM1AELQg0hKwzTAQtCDiErDNIBC0IPISsM0QELIABCACAAKQMgIisgAiABIiprrSIsfSItIC0gK1YbNwMgICsgLFYiLkUN0gFBHyEqDMcDCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEkISoMrgMLQSAhKgzGAwsgACABIiogAhC+gICAAEF/ag4FtgEAywIB0QHSAQtBESEqDKsDCyAAQQE6AC8gKiEBDMIDCyABIgEgAkcN0gFBJCEqDMIDCyABIicgAkcNHkHGACEqDMEDCyAAIAEiASACELKAgIAAIioN1AEgASEBDLUBCyABIiogAkcNJkHQACEqDL8DCwJAIAEiASACRw0AQSghKgy/AwsgAEEANgIEIABBjICAgAA2AgggACABIAEQsYCAgAAiKg3TASABIQEM2AELAkAgASIqIAJHDQBBKSEqDL4DCyAqLQAAIgFBIEYNFCABQQlHDdMBICpBAWohAQwVCwJAIAEiASACRg0AIAFBAWohAQwXC0EqISoMvAMLAkAgASIqIAJHDQBBKyEqDLwDCwJAICotAAAiAUEJRg0AIAFBIEcN1QELIAAtACxBCEYN0wEgKiEBDJYDCwJAIAEiASACRw0AQSwhKgy7AwsgAS0AAEEKRw3VASABQQFqIQEMzwILIAEiKCACRw3VAUEvISoMuQMLA0ACQCABLQAAIipBIEYNAAJAICpBdmoOBADcAdwBANoBCyABIQEM4gELIAFBAWoiASACRw0AC0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gzjAgsgAEEANgIAICogLmtBCWohAUEpISoMxQELAkAgASIBIAJHDQBBiQEhKgziAgtBASEqIAEtAABB3wBHDcQBIAFBAWohAQyIAgsCQCABIiogAkcNAEGKASEqDOECCyACICprIAAoAgAiLmohMiAqIQQgLiEBA0AgBC0AACABQYzPgIAAai0AAEcNxQEgAUEBRg23AiABQQFqIQEgBEEBaiIEIAJHDQALIAAgMjYCAEGKASEqDOACCwJAIAEiKiACRw0AQYsBISoM4AILIAIgKmsgACgCACIuaiEyICohBCAuIQECQANAIAQtAAAgAUGOz4CAAGotAABHDcUBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgMjYCAEGLASEqDOACCyAAQQA2AgAgKiAua0EDaiEBQQIhKgzCAQsCQCABIiogAkcNAEGMASEqDN8CCyACICprIAAoAgAiLmohMiAqIQQgLiEBAkADQCAELQAAIAFB8M+AgABqLQAARw3EASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIDI2AgBBjAEhKgzfAgsgAEEANgIAICogLmtBAmohAUEfISoMwQELAkAgASIqIAJHDQBBjQEhKgzeAgsgAiAqayAAKAIAIi5qITIgKiEEIC4hAQJAA0AgBC0AACABQfLPgIAAai0AAEcNwwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAyNgIAQY0BISoM3gILIABBADYCACAqIC5rQQJqIQFBCSEqDMABCwJAIAEiBCACRw0AQY4BISoM3QILAkACQCAELQAAQbd/ag4HAMMBwwHDAcMBwwEBwwELIARBAWohAUH4ACEqDMQCCyAEQQFqIQFB+QAhKgzDAgsCQCABIiogAkcNAEGPASEqDNwCCyACICprIAAoAgAiLmohMiAqIQQgLiEBAkADQCAELQAAIAFBkc+AgABqLQAARw3BASABQQVGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIDI2AgBBjwEhKgzcAgsgAEEANgIAICogLmtBBmohAUEYISoMvgELAkAgASIqIAJHDQBBkAEhKgzbAgsgAiAqayAAKAIAIi5qITIgKiEEI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GuAQOuAa4BBK4BCyAEQQFqIQRBiAEhKgyvAgsgBEEBaiEKQYkBISoMrgILIARBAWohC0GKASEqDK0CCyAEQQFqIQRBjwEhKgysAgsgBEEBaiEEQZEBISoMqwILAkAgDyACRw0AQacBISoMxAILIAIgD2sgACgCACIqaiEuIA8hBCAqIQECQANAIAQtAAAgAUHtz4CAAGotAABHDakBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgLjYCAEGnASEqDMQCCyAAQQA2AgAgDyAqa0EDaiEBQREhKgymAQsCQCAQIAJHDQBBqAEhKgzDAgsgAiAQayAAKAIAIipqIS4gECEEICohAQJAA0AgBC0AACABQcLPgIAAai0AAEcNqAEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAuNgIAQagBISoMwwILIABBADYCACAQICprQQNqIQFBLCEqDKUBCwJAIBEgAkcNAEGpASEqDMICCyACIBFrIAAoAgAiKmohLiARIQQgKiEBAkADQCAELQAAIAFBxc+AgABqLQAARw2nASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIC42AgBBqQEhKgzCAgsgAEEANgIAIBEgKmtBBWohAUErISoMpAELAkAgEiACRw0AQaoBISoMwQILIAIgEmsgACgCACIqaiEuIBIhBCAqIQECQANAIAQtAAAgAUHKz4CAAGotAABHDaYBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgLjYCAEGqASEqDMECCyAAQQA2AgAgEiAqa0EDaiEBQRQhKgyjAQsCQCAEIAJHDQBBqwEhKgzAAgsCQAJAAkACQCAELQAAQb5/ag4PAAECqAGoAagBqAGoAagBqAGoAagBqAGoAQOoAQsgBEEBaiEPQZMBISoMqQILIARBAWohEEGUASEqDKgCCyAEQQFqIRFBlQEhKgynAgsgBEEBaiESQZYBISoMpgILAkAgBCACRw0AQawBISoMvwILIAQtAABBxQBHDaMBIARBAWohBAznAQsCQCATIAJHDQBBrQEhKgy+AgsgAiATayAAKAIAIipqIS4gEyEEICohAQJAA0AgBC0AACABQc3PgIAAai0AAEcNowEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAuNgIAQa0BISoMvgILIABBADYCACATICprQQNqIQFBDiEqDKABCwJAIAQgAkcNAEGuASEqDL0CCyAELQAAQdAARw2hASAEQQFqIQFBJSEqDJ8BCwJAIBQgAkcNAEGvASEqDLwCCyACIBRrIAAoAgAiKmohLiAUIQQgKiEBAkADQCAELQAAIAFB0M+AgABqLQAARw2hASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIC42AgBBrwEhKgy8AgsgAEEANgIAIBQgKmtBCWohAUEqISoMngELAkAgBCACRw0AQbABISoMuwILAkACQCAELQAAQat/ag4LAKEBoQGhAaEBoQGhAaEBoQGhAQGhAQsgBEEBaiEEQZoBISoMogILIARBAWohFEGbASEqDKECCwJAIAQgAkcNAEGxASEqDLoCCwJAAkAgBC0AAEG/f2oOFACgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEBoAELIARBAWohE0GZASEqDKECCyAEQQFqIQRBnAEhKgygAgsCQCAVIAJHDQBBsgEhKgy5AgsgAiAVayAAKAIAIipqIS4gFSEEICohAQJAA0AgBC0AACABQdnPgIAAai0AAEcNngEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAuNgIAQbIBISoMuQILIABBADYCACAVICprQQRqIQFBISEqDJsBCwJAIBYgAkcNAEGzASEqDLgCCyACIBZrIAAoAgAiKmohLiAWIQQgKiEBAkADQCAELQAAIAFB3c+AgABqLQAARw2dASABQQZGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIC42AgBBswEhKgy4AgsgAEEANgIAIBYgKmtBB2ohAUEaISoMmgELAkAgBCACRw0AQbQBISoMtwILAkACQAJAIAQtAABBu39qDhEAngGeAZ4BngGeAZ4BngGeAZ4BAZ4BngGeAZ4BngECngELIARBAWohBEGdASEqDJ8CCyAEQQFqIRVBngEhKgyeAgsgBEEBaiEWQZ8BISoMnQILAkAgFyACRw0AQbU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mXgIAANgIQIABBFTYCDEEAISoM8AELAkAgAUGgBHFBoARHDQAgAC0ALUECcQ0AIABBADYCHCAAICo2AhQgAEGWk4CAADYCECAAQQQ2AgxBACEqDPABCyAAICogAhC9gICAABogKiEBAkACQAJAAkACQCAAICogAhCzgICAAA4WAgEABAQEBAQEBAQEBAQEBAQEBAQEAwQLIABBAToALgsgACAALwEwQcAAcjsBMCAqIQELQSYhKgzYAQsgAEEjNgIcIAAgKjYCFCAAQaWWgIAANgIQIABBFTYCDEEAISoM8AELIABBADYCHCAAICo2AhQgAEHVi4CAADYCECAAQRE2AgxBACEqDO8BCyAALQAtQQFxRQ0BQcMBISoM1QELAkAgJyACRg0AA0ACQCAnLQAAQSBGDQAgJyEBDNEBCyAnQQFqIicgAkcNAAtBJSEqDO4BC0ElISoM7QELIAAoAgQhASAAQQA2AgQgACABICcQr4CAgAAiAUUNtQEgAEEmNgIcIAAgATYCDCAAICdBAWo2AhRBACEqDOwBCyAqQRVGDbMBIABBADYCHCAAIAE2AhQgAEH9jYCAADYCECAAQR02AgxBACEqDOsBCyAAQSc2AhwgACABNgIUIAAgKjYCDEEAISoM6gELICohAUEBIS4CQAJAAkACQAJAAkACQCAALQAsQX5qDgcGBQUDAQIABQsgACAALwEwQQhyOwEwDAMLQQIhLgwBC0EEIS4LIABBAToALCAAIAAvATAgLnI7ATALICohAQtBKyEqDNEBCyAAQQA2AhwgACAqNgIUIABBq5KAgAA2AhAgAEELNgIMQQAhKgzpAQsgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDEEAISoM6AELIABBADoALCAqIQEMwgELICohAUEBIS4CQAJAAkACQAJAIAAtACxBe2oOBAMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEuDAELQQQhLgsgAEEBOgAsIAAgAC8BMCAucjsBMAsgKiEBC0EpISoMzAELIABBADYCHCAAIAE2AhQgAEHwlICAADYCECAAQQM2AgxBACEqDOQBCwJAICgtAABBDUcNACAAKAIEIQEgAEEANgIEAk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g0AIAEhAQxgCyAAQdgANgIcIAAgATYCFCAAICo2AgxBACEqDMMBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQyyAQsgAEHZADYCHCAAIAE2AhQgACAENgIMQQAhKgzCAQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMsAELIABB2gA2AhwgACABNgIUIAAgBDYCDEEAISoMwQELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDK4BCyAAQdwANgIcIAAgATYCFCAAIAQ2AgxBACEqDMABC0EBISoLIAAgKjoAKiABQQFqIQEMXAsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMqgELIABB3gA2AhwgACABNgIUIAAgBDYCDEEAISoMvQELIABBADYCACAyIC9rQQRqIQECQCAALQApQSNPDQAgASEBDFwLIABBADYCHCAAIAE2AhQgAEHTiYCAADYCECAAQQg2AgxBACEqDLwBCyAAQQA2AgALQQAhKiAAQQA2AhwgACABNgIUIABBkLOAgAA2AhAgAEEINgIMDLoBCyAAQQA2AgAgMiAva0EDaiEBAkAgAC0AKUEhRw0AIAEhAQxZCyAAQQA2AhwgACABNgIUIABBm4qAgAA2AhAgAEEINgIMQQAhKgy5AQsgAEEANgIAIDIgL2tBBGohAQJAIAAtACkiKkFdakELTw0AIAEhAQxYCwJAICpBBksNAEEBICp0QcoAcUUNACABIQEMWAtBACEqIABBADYCHCAAIAE2AhQgAEH3iYCAADYCECAAQQg2AgwMuAELICpBFUYNdSAAQQA2AhwgACABNgIUIABBuY2AgAA2AhAgAEEaNgIMQQAhKgy3AQsgACgCBCEqIABBADYCBAJAIAAgKiABEKeAgIAAIioNACABIQEMVwsgAEHlADYCHCAAIAE2AhQgACAqNgIMQQAhKgy2AQsgACgCBCEqIABBADYCBAJAIAAgKiABEKeAgIAAIioNACABIQEMTwsgAEHSADYCHCAAIAE2AhQgACAqNgIMQQAhKgy1AQsgACgCBCEqIABBADYCBAJAIAAgKiABEKeAgIAAIioNACABIQEMTwsgAEHTADYCHCAAIAE2AhQgACAqNgIMQQAhKgy0AQsgACgCBCEqIABBADYCBAJAIAAgKiABEKeAgIAAIioNACABIQEMVAsgAEHlADYCHCAAIAE2AhQgACAqNgIMQQAhKgyzAQsgAEEANgIcIAAgATYCFCAAQcaKgIAANgIQIABBBzYCDEEAISoMsgELIAAoAgQhKiAAQQA2AgQCQCAAICogARCngICAACIqDQAgASEBDEsLIABB0gA2AhwgACABNgIUIAAgKjYCDEEAISoMsQELIAAoAgQhKiAAQQA2AgQCQCAAICogARCngICAACIqDQAgASEBDEsLIABB0wA2AhwgACABNgIUIAAgKjYCDEEAISoMsAELIAAoAgQhKiAAQQA2AgQCQCAAICogARCngICAACIqDQAgASEBDFALIABB5QA2AhwgACABNgIUIAAgKjYCDEEAISoMrwELIABBADYCHCAAIAE2AhQgAEHciICAADYCECAAQQc2AgxBACEqDK4BCyAqQT9HDQEgAUEBaiEBC0EFISoMkwELQQAhKiAAQQA2AhwgACABNgIUIABB/ZKAgAA2AhAgAEEHNgIMDKsBCyAAKAIEISogAEEANgIEAkAgACAqIAEQp4CAgAAiKg0AIAEhAQxECyAAQdIANgIcIAAgATYCFCAAICo2AgxBACEqDKoBCyAAKAIEISogAEEANgIEAkAgACAqIAEQp4CAgAAiKg0AIAEhAQxECyAAQdMANgIcIAAgATYCFCAAICo2AgxBACEqDKkBCyAAKAIEISogAEEANgIEAkAgACAqIAEQp4CAgAAiKg0AIAEhAQxJCyAAQeUANgIcIAAgATYCFCAAICo2AgxBACEqDKgBCyAAKAIEIQEgAEEANgIEAkAgACABIC4Qp4CAgAAiAQ0AIC4hAQxBCyAAQdIANgIcIAAgLjYCFCAAIAE2AgxBACEqDKcBCyAAKAIEIQEgAEEANgIEAkAgACABIC4Qp4CAgAAiAQ0AIC4hAQxBCyAAQdMANgIcIAAgLjYCFCAAIAE2AgxBACEqDKYBCyAAKAIEIQEgAEEANgIEAkAgACABIC4Qp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AAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8='
diff --git a/node_modules/undici/lib/llhttp/llhttp_simd.wasm b/node_modules/undici/lib/llhttp/llhttp_simd.wasm
new file mode 100755
index 0000000..93cdf56
--- /dev/null
+++ b/node_modules/undici/lib/llhttp/llhttp_simd.wasm
Binary files differ
diff --git a/node_modules/undici/lib/llhttp/utils.d.ts b/node_modules/undici/lib/llhttp/utils.d.ts
new file mode 100644
index 0000000..15497f3
--- /dev/null
+++ b/node_modules/undici/lib/llhttp/utils.d.ts
@@ -0,0 +1,4 @@
+export interface IEnumMap {
+ [key: string]: number;
+}
+export declare function enumToMap(obj: any): IEnumMap;
diff --git a/node_modules/undici/lib/llhttp/utils.js b/node_modules/undici/lib/llhttp/utils.js
new file mode 100644
index 0000000..8a32e56
--- /dev/null
+++ b/node_modules/undici/lib/llhttp/utils.js
@@ -0,0 +1,15 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.enumToMap = void 0;
+function enumToMap(obj) {
+ const res = {};
+ Object.keys(obj).forEach((key) => {
+ const value = obj[key];
+ if (typeof value === 'number') {
+ res[key] = value;
+ }
+ });
+ return res;
+}
+exports.enumToMap = enumToMap;
+//# sourceMappingURL=utils.js.map \ No newline at end of file
diff --git a/node_modules/undici/lib/llhttp/utils.js.map b/node_modules/undici/lib/llhttp/utils.js.map
new file mode 100644
index 0000000..2d7c356
--- /dev/null
+++ b/node_modules/undici/lib/llhttp/utils.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/llhttp/utils.ts"],"names":[],"mappings":";;;AAIA,SAAgB,SAAS,CAAC,GAAQ;IAChC,MAAM,GAAG,GAAa,EAAE,CAAC;IAEzB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAC/B,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;SAClB;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACb,CAAC;AAXD,8BAWC"} \ No newline at end of file
diff --git a/node_modules/undici/lib/mock/mock-agent.js b/node_modules/undici/lib/mock/mock-agent.js
new file mode 100644
index 0000000..828e8af
--- /dev/null
+++ b/node_modules/undici/lib/mock/mock-agent.js
@@ -0,0 +1,171 @@
+'use strict'
+
+const { kClients } = require('../core/symbols')
+const Agent = require('../agent')
+const {
+ kAgent,
+ kMockAgentSet,
+ kMockAgentGet,
+ kDispatches,
+ kIsMockActive,
+ kNetConnect,
+ kGetNetConnect,
+ kOptions,
+ kFactory
+} = require('./mock-symbols')
+const MockClient = require('./mock-client')
+const MockPool = require('./mock-pool')
+const { matchValue, buildMockOptions } = require('./mock-utils')
+const { InvalidArgumentError, UndiciError } = require('../core/errors')
+const Dispatcher = require('../dispatcher')
+const Pluralizer = require('./pluralizer')
+const PendingInterceptorsFormatter = require('./pending-interceptors-formatter')
+
+class FakeWeakRef {
+ constructor (value) {
+ this.value = value
+ }
+
+ deref () {
+ return this.value
+ }
+}
+
+class MockAgent extends Dispatcher {
+ constructor (opts) {
+ super(opts)
+
+ this[kNetConnect] = true
+ this[kIsMockActive] = true
+
+ // Instantiate Agent and encapsulate
+ if ((opts && opts.agent && typeof opts.agent.dispatch !== 'function')) {
+ throw new InvalidArgumentError('Argument opts.agent must implement Agent')
+ }
+ const agent = opts && opts.agent ? opts.agent : new Agent(opts)
+ this[kAgent] = agent
+
+ this[kClients] = agent[kClients]
+ this[kOptions] = buildMockOptions(opts)
+ }
+
+ get (origin) {
+ let dispatcher = this[kMockAgentGet](origin)
+
+ if (!dispatcher) {
+ dispatcher = this[kFactory](origin)
+ this[kMockAgentSet](origin, dispatcher)
+ }
+ return dispatcher
+ }
+
+ dispatch (opts, handler) {
+ // Call MockAgent.get to perform additional setup before dispatching as normal
+ this.get(opts.origin)
+ return this[kAgent].dispatch(opts, handler)
+ }
+
+ async close () {
+ await this[kAgent].close()
+ this[kClients].clear()
+ }
+
+ deactivate () {
+ this[kIsMockActive] = false
+ }
+
+ activate () {
+ this[kIsMockActive] = true
+ }
+
+ enableNetConnect (matcher) {
+ if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) {
+ if (Array.isArray(this[kNetConnect])) {
+ this[kNetConnect].push(matcher)
+ } else {
+ this[kNetConnect] = [matcher]
+ }
+ } else if (typeof matcher === 'undefined') {
+ this[kNetConnect] = true
+ } else {
+ throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.')
+ }
+ }
+
+ disableNetConnect () {
+ this[kNetConnect] = false
+ }
+
+ // This is required to bypass issues caused by using global symbols - see:
+ // https://github.com/nodejs/undici/issues/1447
+ get isMockActive () {
+ return this[kIsMockActive]
+ }
+
+ [kMockAgentSet] (origin, dispatcher) {
+ this[kClients].set(origin, new FakeWeakRef(dispatcher))
+ }
+
+ [kFactory] (origin) {
+ const mockOptions = Object.assign({ agent: this }, this[kOptions])
+ return this[kOptions] && this[kOptions].connections === 1
+ ? new MockClient(origin, mockOptions)
+ : new MockPool(origin, mockOptions)
+ }
+
+ [kMockAgentGet] (origin) {
+ // First check if we can immediately find it
+ const ref = this[kClients].get(origin)
+ if (ref) {
+ return ref.deref()
+ }
+
+ // If the origin is not a string create a dummy parent pool and return to user
+ if (typeof origin !== 'string') {
+ const dispatcher = this[kFactory]('http://localhost:9999')
+ this[kMockAgentSet](origin, dispatcher)
+ return dispatcher
+ }
+
+ // If we match, create a pool and assign the same dispatches
+ for (const [keyMatcher, nonExplicitRef] of Array.from(this[kClients])) {
+ const nonExplicitDispatcher = nonExplicitRef.deref()
+ if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) {
+ const dispatcher = this[kFactory](origin)
+ this[kMockAgentSet](origin, dispatcher)
+ dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]
+ return dispatcher
+ }
+ }
+ }
+
+ [kGetNetConnect] () {
+ return this[kNetConnect]
+ }
+
+ pendingInterceptors () {
+ const mockAgentClients = this[kClients]
+
+ return Array.from(mockAgentClients.entries())
+ .flatMap(([origin, scope]) => scope.deref()[kDispatches].map(dispatch => ({ ...dispatch, origin })))
+ .filter(({ pending }) => pending)
+ }
+
+ assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) {
+ const pending = this.pendingInterceptors()
+
+ if (pending.length === 0) {
+ return
+ }
+
+ const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length)
+
+ throw new UndiciError(`
+${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending:
+
+${pendingInterceptorsFormatter.format(pending)}
+`.trim())
+ }
+}
+
+module.exports = MockAgent
diff --git a/node_modules/undici/lib/mock/mock-client.js b/node_modules/undici/lib/mock/mock-client.js
new file mode 100644
index 0000000..5f31215
--- /dev/null
+++ b/node_modules/undici/lib/mock/mock-client.js
@@ -0,0 +1,59 @@
+'use strict'
+
+const { promisify } = require('util')
+const Client = require('../client')
+const { buildMockDispatch } = require('./mock-utils')
+const {
+ kDispatches,
+ kMockAgent,
+ kClose,
+ kOriginalClose,
+ kOrigin,
+ kOriginalDispatch,
+ kConnected
+} = require('./mock-symbols')
+const { MockInterceptor } = require('./mock-interceptor')
+const Symbols = require('../core/symbols')
+const { InvalidArgumentError } = require('../core/errors')
+
+/**
+ * MockClient provides an API that extends the Client to influence the mockDispatches.
+ */
+class MockClient extends Client {
+ constructor (origin, opts) {
+ super(origin, opts)
+
+ if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {
+ throw new InvalidArgumentError('Argument opts.agent must implement Agent')
+ }
+
+ this[kMockAgent] = opts.agent
+ this[kOrigin] = origin
+ this[kDispatches] = []
+ this[kConnected] = 1
+ this[kOriginalDispatch] = this.dispatch
+ this[kOriginalClose] = this.close.bind(this)
+
+ this.dispatch = buildMockDispatch.call(this)
+ this.close = this[kClose]
+ }
+
+ get [Symbols.kConnected] () {
+ return this[kConnected]
+ }
+
+ /**
+ * Sets up the base interceptor for mocking replies from undici.
+ */
+ intercept (opts) {
+ return new MockInterceptor(opts, this[kDispatches])
+ }
+
+ async [kClose] () {
+ await promisify(this[kOriginalClose])()
+ this[kConnected] = 0
+ this[kMockAgent][Symbols.kClients].delete(this[kOrigin])
+ }
+}
+
+module.exports = MockClient
diff --git a/node_modules/undici/lib/mock/mock-errors.js b/node_modules/undici/lib/mock/mock-errors.js
new file mode 100644
index 0000000..5442c0e
--- /dev/null
+++ b/node_modules/undici/lib/mock/mock-errors.js
@@ -0,0 +1,17 @@
+'use strict'
+
+const { UndiciError } = require('../core/errors')
+
+class MockNotMatchedError extends UndiciError {
+ constructor (message) {
+ super(message)
+ Error.captureStackTrace(this, MockNotMatchedError)
+ this.name = 'MockNotMatchedError'
+ this.message = message || 'The request does not match any registered mock dispatches'
+ this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED'
+ }
+}
+
+module.exports = {
+ MockNotMatchedError
+}
diff --git a/node_modules/undici/lib/mock/mock-interceptor.js b/node_modules/undici/lib/mock/mock-interceptor.js
new file mode 100644
index 0000000..781e477
--- /dev/null
+++ b/node_modules/undici/lib/mock/mock-interceptor.js
@@ -0,0 +1,206 @@
+'use strict'
+
+const { getResponseData, buildKey, addMockDispatch } = require('./mock-utils')
+const {
+ kDispatches,
+ kDispatchKey,
+ kDefaultHeaders,
+ kDefaultTrailers,
+ kContentLength,
+ kMockDispatch
+} = require('./mock-symbols')
+const { InvalidArgumentError } = require('../core/errors')
+const { buildURL } = require('../core/util')
+
+/**
+ * Defines the scope API for an interceptor reply
+ */
+class MockScope {
+ constructor (mockDispatch) {
+ this[kMockDispatch] = mockDispatch
+ }
+
+ /**
+ * Delay a reply by a set amount in ms.
+ */
+ delay (waitInMs) {
+ if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) {
+ throw new InvalidArgumentError('waitInMs must be a valid integer > 0')
+ }
+
+ this[kMockDispatch].delay = waitInMs
+ return this
+ }
+
+ /**
+ * For a defined reply, never mark as consumed.
+ */
+ persist () {
+ this[kMockDispatch].persist = true
+ return this
+ }
+
+ /**
+ * Allow one to define a reply for a set amount of matching requests.
+ */
+ times (repeatTimes) {
+ if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) {
+ throw new InvalidArgumentError('repeatTimes must be a valid integer > 0')
+ }
+
+ this[kMockDispatch].times = repeatTimes
+ return this
+ }
+}
+
+/**
+ * Defines an interceptor for a Mock
+ */
+class MockInterceptor {
+ constructor (opts, mockDispatches) {
+ if (typeof opts !== 'object') {
+ throw new InvalidArgumentError('opts must be an object')
+ }
+ if (typeof opts.path === 'undefined') {
+ throw new InvalidArgumentError('opts.path must be defined')
+ }
+ if (typeof opts.method === 'undefined') {
+ opts.method = 'GET'
+ }
+ // See https://github.com/nodejs/undici/issues/1245
+ // As per RFC 3986, clients are not supposed to send URI
+ // fragments to servers when they retrieve a document,
+ if (typeof opts.path === 'string') {
+ if (opts.query) {
+ opts.path = buildURL(opts.path, opts.query)
+ } else {
+ // Matches https://github.com/nodejs/undici/blob/main/lib/fetch/index.js#L1811
+ const parsedURL = new URL(opts.path, 'data://')
+ opts.path = parsedURL.pathname + parsedURL.search
+ }
+ }
+ if (typeof opts.method === 'string') {
+ opts.method = opts.method.toUpperCase()
+ }
+
+ this[kDispatchKey] = buildKey(opts)
+ this[kDispatches] = mockDispatches
+ this[kDefaultHeaders] = {}
+ this[kDefaultTrailers] = {}
+ this[kContentLength] = false
+ }
+
+ createMockScopeDispatchData (statusCode, data, responseOptions = {}) {
+ const responseData = getResponseData(data)
+ const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {}
+ const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers }
+ const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers }
+
+ return { statusCode, data, headers, trailers }
+ }
+
+ validateReplyParameters (statusCode, data, responseOptions) {
+ if (typeof statusCode === 'undefined') {
+ throw new InvalidArgumentError('statusCode must be defined')
+ }
+ if (typeof data === 'undefined') {
+ throw new InvalidArgumentError('data must be defined')
+ }
+ if (typeof responseOptions !== 'object') {
+ throw new InvalidArgumentError('responseOptions must be an object')
+ }
+ }
+
+ /**
+ * Mock an undici request with a defined reply.
+ */
+ reply (replyData) {
+ // Values of reply aren't available right now as they
+ // can only be available when the reply callback is invoked.
+ if (typeof replyData === 'function') {
+ // We'll first wrap the provided callback in another function,
+ // this function will properly resolve the data from the callback
+ // when invoked.
+ const wrappedDefaultsCallback = (opts) => {
+ // Our reply options callback contains the parameter for statusCode, data and options.
+ const resolvedData = replyData(opts)
+
+ // Check if it is in the right format
+ if (typeof resolvedData !== 'object') {
+ throw new InvalidArgumentError('reply options callback must return an object')
+ }
+
+ const { statusCode, data = '', responseOptions = {} } = resolvedData
+ this.validateReplyParameters(statusCode, data, responseOptions)
+ // Since the values can be obtained immediately we return them
+ // from this higher order function that will be resolved later.
+ return {
+ ...this.createMockScopeDispatchData(statusCode, data, responseOptions)
+ }
+ }
+
+ // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data.
+ const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback)
+ return new MockScope(newMockDispatch)
+ }
+
+ // We can have either one or three parameters, if we get here,
+ // we should have 1-3 parameters. So we spread the arguments of
+ // this function to obtain the parameters, since replyData will always
+ // just be the statusCode.
+ const [statusCode, data = '', responseOptions = {}] = [...arguments]
+ this.validateReplyParameters(statusCode, data, responseOptions)
+
+ // Send in-already provided data like usual
+ const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions)
+ const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData)
+ return new MockScope(newMockDispatch)
+ }
+
+ /**
+ * Mock an undici request with a defined error.
+ */
+ replyWithError (error) {
+ if (typeof error === 'undefined') {
+ throw new InvalidArgumentError('error must be defined')
+ }
+
+ const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error })
+ return new MockScope(newMockDispatch)
+ }
+
+ /**
+ * Set default reply headers on the interceptor for subsequent replies
+ */
+ defaultReplyHeaders (headers) {
+ if (typeof headers === 'undefined') {
+ throw new InvalidArgumentError('headers must be defined')
+ }
+
+ this[kDefaultHeaders] = headers
+ return this
+ }
+
+ /**
+ * Set default reply trailers on the interceptor for subsequent replies
+ */
+ defaultReplyTrailers (trailers) {
+ if (typeof trailers === 'undefined') {
+ throw new InvalidArgumentError('trailers must be defined')
+ }
+
+ this[kDefaultTrailers] = trailers
+ return this
+ }
+
+ /**
+ * Set reply content length header for replies on the interceptor
+ */
+ replyContentLength () {
+ this[kContentLength] = true
+ return this
+ }
+}
+
+module.exports.MockInterceptor = MockInterceptor
+module.exports.MockScope = MockScope
diff --git a/node_modules/undici/lib/mock/mock-pool.js b/node_modules/undici/lib/mock/mock-pool.js
new file mode 100644
index 0000000..0a3a7cd
--- /dev/null
+++ b/node_modules/undici/lib/mock/mock-pool.js
@@ -0,0 +1,59 @@
+'use strict'
+
+const { promisify } = require('util')
+const Pool = require('../pool')
+const { buildMockDispatch } = require('./mock-utils')
+const {
+ kDispatches,
+ kMockAgent,
+ kClose,
+ kOriginalClose,
+ kOrigin,
+ kOriginalDispatch,
+ kConnected
+} = require('./mock-symbols')
+const { MockInterceptor } = require('./mock-interceptor')
+const Symbols = require('../core/symbols')
+const { InvalidArgumentError } = require('../core/errors')
+
+/**
+ * MockPool provides an API that extends the Pool to influence the mockDispatches.
+ */
+class MockPool extends Pool {
+ constructor (origin, opts) {
+ super(origin, opts)
+
+ if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {
+ throw new InvalidArgumentError('Argument opts.agent must implement Agent')
+ }
+
+ this[kMockAgent] = opts.agent
+ this[kOrigin] = origin
+ this[kDispatches] = []
+ this[kConnected] = 1
+ this[kOriginalDispatch] = this.dispatch
+ this[kOriginalClose] = this.close.bind(this)
+
+ this.dispatch = buildMockDispatch.call(this)
+ this.close = this[kClose]
+ }
+
+ get [Symbols.kConnected] () {
+ return this[kConnected]
+ }
+
+ /**
+ * Sets up the base interceptor for mocking replies from undici.
+ */
+ intercept (opts) {
+ return new MockInterceptor(opts, this[kDispatches])
+ }
+
+ async [kClose] () {
+ await promisify(this[kOriginalClose])()
+ this[kConnected] = 0
+ this[kMockAgent][Symbols.kClients].delete(this[kOrigin])
+ }
+}
+
+module.exports = MockPool
diff --git a/node_modules/undici/lib/mock/mock-symbols.js b/node_modules/undici/lib/mock/mock-symbols.js
new file mode 100644
index 0000000..8c4cbb6
--- /dev/null
+++ b/node_modules/undici/lib/mock/mock-symbols.js
@@ -0,0 +1,23 @@
+'use strict'
+
+module.exports = {
+ kAgent: Symbol('agent'),
+ kOptions: Symbol('options'),
+ kFactory: Symbol('factory'),
+ kDispatches: Symbol('dispatches'),
+ kDispatchKey: Symbol('dispatch key'),
+ kDefaultHeaders: Symbol('default headers'),
+ kDefaultTrailers: Symbol('default trailers'),
+ kContentLength: Symbol('content length'),
+ kMockAgent: Symbol('mock agent'),
+ kMockAgentSet: Symbol('mock agent set'),
+ kMockAgentGet: Symbol('mock agent get'),
+ kMockDispatch: Symbol('mock dispatch'),
+ kClose: Symbol('close'),
+ kOriginalClose: Symbol('original agent close'),
+ kOrigin: Symbol('origin'),
+ kIsMockActive: Symbol('is mock active'),
+ kNetConnect: Symbol('net connect'),
+ kGetNetConnect: Symbol('get net connect'),
+ kConnected: Symbol('connected')
+}
diff --git a/node_modules/undici/lib/mock/mock-utils.js b/node_modules/undici/lib/mock/mock-utils.js
new file mode 100644
index 0000000..42ea185
--- /dev/null
+++ b/node_modules/undici/lib/mock/mock-utils.js
@@ -0,0 +1,351 @@
+'use strict'
+
+const { MockNotMatchedError } = require('./mock-errors')
+const {
+ kDispatches,
+ kMockAgent,
+ kOriginalDispatch,
+ kOrigin,
+ kGetNetConnect
+} = require('./mock-symbols')
+const { buildURL, nop } = require('../core/util')
+const { STATUS_CODES } = require('http')
+const {
+ types: {
+ isPromise
+ }
+} = require('util')
+
+function matchValue (match, value) {
+ if (typeof match === 'string') {
+ return match === value
+ }
+ if (match instanceof RegExp) {
+ return match.test(value)
+ }
+ if (typeof match === 'function') {
+ return match(value) === true
+ }
+ return false
+}
+
+function lowerCaseEntries (headers) {
+ return Object.fromEntries(
+ Object.entries(headers).map(([headerName, headerValue]) => {
+ return [headerName.toLocaleLowerCase(), headerValue]
+ })
+ )
+}
+
+/**
+ * @param {import('../../index').Headers|string[]|Record<string, string>} headers
+ * @param {string} key
+ */
+function getHeaderByName (headers, key) {
+ if (Array.isArray(headers)) {
+ for (let i = 0; i < headers.length; i += 2) {
+ if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) {
+ return headers[i + 1]
+ }
+ }
+
+ return undefined
+ } else if (typeof headers.get === 'function') {
+ return headers.get(key)
+ } else {
+ return lowerCaseEntries(headers)[key.toLocaleLowerCase()]
+ }
+}
+
+/** @param {string[]} headers */
+function buildHeadersFromArray (headers) { // fetch HeadersList
+ const clone = headers.slice()
+ const entries = []
+ for (let index = 0; index < clone.length; index += 2) {
+ entries.push([clone[index], clone[index + 1]])
+ }
+ return Object.fromEntries(entries)
+}
+
+function matchHeaders (mockDispatch, headers) {
+ if (typeof mockDispatch.headers === 'function') {
+ if (Array.isArray(headers)) { // fetch HeadersList
+ headers = buildHeadersFromArray(headers)
+ }
+ return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {})
+ }
+ if (typeof mockDispatch.headers === 'undefined') {
+ return true
+ }
+ if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') {
+ return false
+ }
+
+ for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) {
+ const headerValue = getHeaderByName(headers, matchHeaderName)
+
+ if (!matchValue(matchHeaderValue, headerValue)) {
+ return false
+ }
+ }
+ return true
+}
+
+function safeUrl (path) {
+ if (typeof path !== 'string') {
+ return path
+ }
+
+ const pathSegments = path.split('?')
+
+ if (pathSegments.length !== 2) {
+ return path
+ }
+
+ const qp = new URLSearchParams(pathSegments.pop())
+ qp.sort()
+ return [...pathSegments, qp.toString()].join('?')
+}
+
+function matchKey (mockDispatch, { path, method, body, headers }) {
+ const pathMatch = matchValue(mockDispatch.path, path)
+ const methodMatch = matchValue(mockDispatch.method, method)
+ const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true
+ const headersMatch = matchHeaders(mockDispatch, headers)
+ return pathMatch && methodMatch && bodyMatch && headersMatch
+}
+
+function getResponseData (data) {
+ if (Buffer.isBuffer(data)) {
+ return data
+ } else if (typeof data === 'object') {
+ return JSON.stringify(data)
+ } else {
+ return data.toString()
+ }
+}
+
+function getMockDispatch (mockDispatches, key) {
+ const basePath = key.query ? buildURL(key.path, key.query) : key.path
+ const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath
+
+ // Match path
+ let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath))
+ if (matchedMockDispatches.length === 0) {
+ throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`)
+ }
+
+ // Match method
+ matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method))
+ if (matchedMockDispatches.length === 0) {
+ throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`)
+ }
+
+ // Match body
+ matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true)
+ if (matchedMockDispatches.length === 0) {
+ throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`)
+ }
+
+ // Match headers
+ matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers))
+ if (matchedMockDispatches.length === 0) {
+ throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers}'`)
+ }
+
+ return matchedMockDispatches[0]
+}
+
+function addMockDispatch (mockDispatches, key, data) {
+ const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false }
+ const replyData = typeof data === 'function' ? { callback: data } : { ...data }
+ const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } }
+ mockDispatches.push(newMockDispatch)
+ return newMockDispatch
+}
+
+function deleteMockDispatch (mockDispatches, key) {
+ const index = mockDispatches.findIndex(dispatch => {
+ if (!dispatch.consumed) {
+ return false
+ }
+ return matchKey(dispatch, key)
+ })
+ if (index !== -1) {
+ mockDispatches.splice(index, 1)
+ }
+}
+
+function buildKey (opts) {
+ const { path, method, body, headers, query } = opts
+ return {
+ path,
+ method,
+ body,
+ headers,
+ query
+ }
+}
+
+function generateKeyValues (data) {
+ return Object.entries(data).reduce((keyValuePairs, [key, value]) => [
+ ...keyValuePairs,
+ Buffer.from(`${key}`),
+ Array.isArray(value) ? value.map(x => Buffer.from(`${x}`)) : Buffer.from(`${value}`)
+ ], [])
+}
+
+/**
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
+ * @param {number} statusCode
+ */
+function getStatusText (statusCode) {
+ return STATUS_CODES[statusCode] || 'unknown'
+}
+
+async function getResponse (body) {
+ const buffers = []
+ for await (const data of body) {
+ buffers.push(data)
+ }
+ return Buffer.concat(buffers).toString('utf8')
+}
+
+/**
+ * Mock dispatch function used to simulate undici dispatches
+ */
+function mockDispatch (opts, handler) {
+ // Get mock dispatch from built key
+ const key = buildKey(opts)
+ const mockDispatch = getMockDispatch(this[kDispatches], key)
+
+ mockDispatch.timesInvoked++
+
+ // Here's where we resolve a callback if a callback is present for the dispatch data.
+ if (mockDispatch.data.callback) {
+ mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) }
+ }
+
+ // Parse mockDispatch data
+ const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch
+ const { timesInvoked, times } = mockDispatch
+
+ // If it's used up and not persistent, mark as consumed
+ mockDispatch.consumed = !persist && timesInvoked >= times
+ mockDispatch.pending = timesInvoked < times
+
+ // If specified, trigger dispatch error
+ if (error !== null) {
+ deleteMockDispatch(this[kDispatches], key)
+ handler.onError(error)
+ return true
+ }
+
+ // Handle the request with a delay if necessary
+ if (typeof delay === 'number' && delay > 0) {
+ setTimeout(() => {
+ handleReply(this[kDispatches])
+ }, delay)
+ } else {
+ handleReply(this[kDispatches])
+ }
+
+ function handleReply (mockDispatches, _data = data) {
+ // fetch's HeadersList is a 1D string array
+ const optsHeaders = Array.isArray(opts.headers)
+ ? buildHeadersFromArray(opts.headers)
+ : opts.headers
+ const body = typeof _data === 'function'
+ ? _data({ ...opts, headers: optsHeaders })
+ : _data
+
+ // util.types.isPromise is likely needed for jest.
+ if (isPromise(body)) {
+ // If handleReply is asynchronous, throwing an error
+ // in the callback will reject the promise, rather than
+ // synchronously throw the error, which breaks some tests.
+ // Rather, we wait for the callback to resolve if it is a
+ // promise, and then re-run handleReply with the new body.
+ body.then((newData) => handleReply(mockDispatches, newData))
+ return
+ }
+
+ const responseData = getResponseData(body)
+ const responseHeaders = generateKeyValues(headers)
+ const responseTrailers = generateKeyValues(trailers)
+
+ handler.abort = nop
+ handler.onHeaders(statusCode, responseHeaders, resume, getStatusText(statusCode))
+ handler.onData(Buffer.from(responseData))
+ handler.onComplete(responseTrailers)
+ deleteMockDispatch(mockDispatches, key)
+ }
+
+ function resume () {}
+
+ return true
+}
+
+function buildMockDispatch () {
+ const agent = this[kMockAgent]
+ const origin = this[kOrigin]
+ const originalDispatch = this[kOriginalDispatch]
+
+ return function dispatch (opts, handler) {
+ if (agent.isMockActive) {
+ try {
+ mockDispatch.call(this, opts, handler)
+ } catch (error) {
+ if (error instanceof MockNotMatchedError) {
+ const netConnect = agent[kGetNetConnect]()
+ if (netConnect === false) {
+ throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`)
+ }
+ if (checkNetConnect(netConnect, origin)) {
+ originalDispatch.call(this, opts, handler)
+ } else {
+ throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`)
+ }
+ } else {
+ throw error
+ }
+ }
+ } else {
+ originalDispatch.call(this, opts, handler)
+ }
+ }
+}
+
+function checkNetConnect (netConnect, origin) {
+ const url = new URL(origin)
+ if (netConnect === true) {
+ return true
+ } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) {
+ return true
+ }
+ return false
+}
+
+function buildMockOptions (opts) {
+ if (opts) {
+ const { agent, ...mockOptions } = opts
+ return mockOptions
+ }
+}
+
+module.exports = {
+ getResponseData,
+ getMockDispatch,
+ addMockDispatch,
+ deleteMockDispatch,
+ buildKey,
+ generateKeyValues,
+ matchValue,
+ getResponse,
+ getStatusText,
+ mockDispatch,
+ buildMockDispatch,
+ checkNetConnect,
+ buildMockOptions,
+ getHeaderByName
+}
diff --git a/node_modules/undici/lib/mock/pending-interceptors-formatter.js b/node_modules/undici/lib/mock/pending-interceptors-formatter.js
new file mode 100644
index 0000000..1bc7539
--- /dev/null
+++ b/node_modules/undici/lib/mock/pending-interceptors-formatter.js
@@ -0,0 +1,40 @@
+'use strict'
+
+const { Transform } = require('stream')
+const { Console } = require('console')
+
+/**
+ * Gets the output of `console.table(…)` as a string.
+ */
+module.exports = class PendingInterceptorsFormatter {
+ constructor ({ disableColors } = {}) {
+ this.transform = new Transform({
+ transform (chunk, _enc, cb) {
+ cb(null, chunk)
+ }
+ })
+
+ this.logger = new Console({
+ stdout: this.transform,
+ inspectOptions: {
+ colors: !disableColors && !process.env.CI
+ }
+ })
+ }
+
+ format (pendingInterceptors) {
+ const withPrettyHeaders = pendingInterceptors.map(
+ ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
+ Method: method,
+ Origin: origin,
+ Path: path,
+ 'Status code': statusCode,
+ Persistent: persist ? '✅' : '❌',
+ Invocations: timesInvoked,
+ Remaining: persist ? Infinity : times - timesInvoked
+ }))
+
+ this.logger.table(withPrettyHeaders)
+ return this.transform.read().toString()
+ }
+}
diff --git a/node_modules/undici/lib/mock/pluralizer.js b/node_modules/undici/lib/mock/pluralizer.js
new file mode 100644
index 0000000..47f150b
--- /dev/null
+++ b/node_modules/undici/lib/mock/pluralizer.js
@@ -0,0 +1,29 @@
+'use strict'
+
+const singulars = {
+ pronoun: 'it',
+ is: 'is',
+ was: 'was',
+ this: 'this'
+}
+
+const plurals = {
+ pronoun: 'they',
+ is: 'are',
+ was: 'were',
+ this: 'these'
+}
+
+module.exports = class Pluralizer {
+ constructor (singular, plural) {
+ this.singular = singular
+ this.plural = plural
+ }
+
+ pluralize (count) {
+ const one = count === 1
+ const keys = one ? singulars : plurals
+ const noun = one ? this.singular : this.plural
+ return { ...keys, count, noun }
+ }
+}
diff --git a/node_modules/undici/lib/node/fixed-queue.js b/node_modules/undici/lib/node/fixed-queue.js
new file mode 100644
index 0000000..3572681
--- /dev/null
+++ b/node_modules/undici/lib/node/fixed-queue.js
@@ -0,0 +1,117 @@
+/* eslint-disable */
+
+'use strict'
+
+// Extracted from node/lib/internal/fixed_queue.js
+
+// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two.
+const kSize = 2048;
+const kMask = kSize - 1;
+
+// The FixedQueue is implemented as a singly-linked list of fixed-size
+// circular buffers. It looks something like this:
+//
+// head tail
+// | |
+// v v
+// +-----------+ <-----\ +-----------+ <------\ +-----------+
+// | [null] | \----- | next | \------- | next |
+// +-----------+ +-----------+ +-----------+
+// | item | <-- bottom | item | <-- bottom | [empty] |
+// | item | | item | | [empty] |
+// | item | | item | | [empty] |
+// | item | | item | | [empty] |
+// | item | | item | bottom --> | item |
+// | item | | item | | item |
+// | ... | | ... | | ... |
+// | item | | item | | item |
+// | item | | item | | item |
+// | [empty] | <-- top | item | | item |
+// | [empty] | | item | | item |
+// | [empty] | | [empty] | <-- top top --> | [empty] |
+// +-----------+ +-----------+ +-----------+
+//
+// Or, if there is only one circular buffer, it looks something
+// like either of these:
+//
+// head tail head tail
+// | | | |
+// v v v v
+// +-----------+ +-----------+
+// | [null] | | [null] |
+// +-----------+ +-----------+
+// | [empty] | | item |
+// | [empty] | | item |
+// | item | <-- bottom top --> | [empty] |
+// | item | | [empty] |
+// | [empty] | <-- top bottom --> | item |
+// | [empty] | | item |
+// +-----------+ +-----------+
+//
+// Adding a value means moving `top` forward by one, removing means
+// moving `bottom` forward by one. After reaching the end, the queue
+// wraps around.
+//
+// When `top === bottom` the current queue is empty and when
+// `top + 1 === bottom` it's full. This wastes a single space of storage
+// but allows much quicker checks.
+
+class FixedCircularBuffer {
+ constructor() {
+ this.bottom = 0;
+ this.top = 0;
+ this.list = new Array(kSize);
+ this.next = null;
+ }
+
+ isEmpty() {
+ return this.top === this.bottom;
+ }
+
+ isFull() {
+ return ((this.top + 1) & kMask) === this.bottom;
+ }
+
+ push(data) {
+ this.list[this.top] = data;
+ this.top = (this.top + 1) & kMask;
+ }
+
+ shift() {
+ const nextItem = this.list[this.bottom];
+ if (nextItem === undefined)
+ return null;
+ this.list[this.bottom] = undefined;
+ this.bottom = (this.bottom + 1) & kMask;
+ return nextItem;
+ }
+}
+
+module.exports = class FixedQueue {
+ constructor() {
+ this.head = this.tail = new FixedCircularBuffer();
+ }
+
+ isEmpty() {
+ return this.head.isEmpty();
+ }
+
+ push(data) {
+ if (this.head.isFull()) {
+ // Head is full: Creates a new queue, sets the old queue's `.next` to it,
+ // and sets it as the new main queue.
+ this.head = this.head.next = new FixedCircularBuffer();
+ }
+ this.head.push(data);
+ }
+
+ shift() {
+ const tail = this.tail;
+ const next = tail.shift();
+ if (tail.isEmpty() && tail.next !== null) {
+ // If there is another queue, it forms the new tail.
+ this.tail = tail.next;
+ }
+ return next;
+ }
+};
diff --git a/node_modules/undici/lib/pool-base.js b/node_modules/undici/lib/pool-base.js
new file mode 100644
index 0000000..2a909ee
--- /dev/null
+++ b/node_modules/undici/lib/pool-base.js
@@ -0,0 +1,194 @@
+'use strict'
+
+const DispatcherBase = require('./dispatcher-base')
+const FixedQueue = require('./node/fixed-queue')
+const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require('./core/symbols')
+const PoolStats = require('./pool-stats')
+
+const kClients = Symbol('clients')
+const kNeedDrain = Symbol('needDrain')
+const kQueue = Symbol('queue')
+const kClosedResolve = Symbol('closed resolve')
+const kOnDrain = Symbol('onDrain')
+const kOnConnect = Symbol('onConnect')
+const kOnDisconnect = Symbol('onDisconnect')
+const kOnConnectionError = Symbol('onConnectionError')
+const kGetDispatcher = Symbol('get dispatcher')
+const kAddClient = Symbol('add client')
+const kRemoveClient = Symbol('remove client')
+const kStats = Symbol('stats')
+
+class PoolBase extends DispatcherBase {
+ constructor () {
+ super()
+
+ this[kQueue] = new FixedQueue()
+ this[kClients] = []
+ this[kQueued] = 0
+
+ const pool = this
+
+ this[kOnDrain] = function onDrain (origin, targets) {
+ const queue = pool[kQueue]
+
+ let needDrain = false
+
+ while (!needDrain) {
+ const item = queue.shift()
+ if (!item) {
+ break
+ }
+ pool[kQueued]--
+ needDrain = !this.dispatch(item.opts, item.handler)
+ }
+
+ this[kNeedDrain] = needDrain
+
+ if (!this[kNeedDrain] && pool[kNeedDrain]) {
+ pool[kNeedDrain] = false
+ pool.emit('drain', origin, [pool, ...targets])
+ }
+
+ if (pool[kClosedResolve] && queue.isEmpty()) {
+ Promise
+ .all(pool[kClients].map(c => c.close()))
+ .then(pool[kClosedResolve])
+ }
+ }
+
+ this[kOnConnect] = (origin, targets) => {
+ pool.emit('connect', origin, [pool, ...targets])
+ }
+
+ this[kOnDisconnect] = (origin, targets, err) => {
+ pool.emit('disconnect', origin, [pool, ...targets], err)
+ }
+
+ this[kOnConnectionError] = (origin, targets, err) => {
+ pool.emit('connectionError', origin, [pool, ...targets], err)
+ }
+
+ this[kStats] = new PoolStats(this)
+ }
+
+ get [kBusy] () {
+ return this[kNeedDrain]
+ }
+
+ get [kConnected] () {
+ return this[kClients].filter(client => client[kConnected]).length
+ }
+
+ get [kFree] () {
+ return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length
+ }
+
+ get [kPending] () {
+ let ret = this[kQueued]
+ for (const { [kPending]: pending } of this[kClients]) {
+ ret += pending
+ }
+ return ret
+ }
+
+ get [kRunning] () {
+ let ret = 0
+ for (const { [kRunning]: running } of this[kClients]) {
+ ret += running
+ }
+ return ret
+ }
+
+ get [kSize] () {
+ let ret = this[kQueued]
+ for (const { [kSize]: size } of this[kClients]) {
+ ret += size
+ }
+ return ret
+ }
+
+ get stats () {
+ return this[kStats]
+ }
+
+ async [kClose] () {
+ if (this[kQueue].isEmpty()) {
+ return Promise.all(this[kClients].map(c => c.close()))
+ } else {
+ return new Promise((resolve) => {
+ this[kClosedResolve] = resolve
+ })
+ }
+ }
+
+ async [kDestroy] (err) {
+ while (true) {
+ const item = this[kQueue].shift()
+ if (!item) {
+ break
+ }
+ item.handler.onError(err)
+ }
+
+ return Promise.all(this[kClients].map(c => c.destroy(err)))
+ }
+
+ [kDispatch] (opts, handler) {
+ const dispatcher = this[kGetDispatcher]()
+
+ if (!dispatcher) {
+ this[kNeedDrain] = true
+ this[kQueue].push({ opts, handler })
+ this[kQueued]++
+ } else if (!dispatcher.dispatch(opts, handler)) {
+ dispatcher[kNeedDrain] = true
+ this[kNeedDrain] = !this[kGetDispatcher]()
+ }
+
+ return !this[kNeedDrain]
+ }
+
+ [kAddClient] (client) {
+ client
+ .on('drain', this[kOnDrain])
+ .on('connect', this[kOnConnect])
+ .on('disconnect', this[kOnDisconnect])
+ .on('connectionError', this[kOnConnectionError])
+
+ this[kClients].push(client)
+
+ if (this[kNeedDrain]) {
+ process.nextTick(() => {
+ if (this[kNeedDrain]) {
+ this[kOnDrain](client[kUrl], [this, client])
+ }
+ })
+ }
+
+ return this
+ }
+
+ [kRemoveClient] (client) {
+ client.close(() => {
+ const idx = this[kClients].indexOf(client)
+ if (idx !== -1) {
+ this[kClients].splice(idx, 1)
+ }
+ })
+
+ this[kNeedDrain] = this[kClients].some(dispatcher => (
+ !dispatcher[kNeedDrain] &&
+ dispatcher.closed !== true &&
+ dispatcher.destroyed !== true
+ ))
+ }
+}
+
+module.exports = {
+ PoolBase,
+ kClients,
+ kNeedDrain,
+ kAddClient,
+ kRemoveClient,
+ kGetDispatcher
+}
diff --git a/node_modules/undici/lib/pool-stats.js b/node_modules/undici/lib/pool-stats.js
new file mode 100644
index 0000000..b4af8ae
--- /dev/null
+++ b/node_modules/undici/lib/pool-stats.js
@@ -0,0 +1,34 @@
+const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require('./core/symbols')
+const kPool = Symbol('pool')
+
+class PoolStats {
+ constructor (pool) {
+ this[kPool] = pool
+ }
+
+ get connected () {
+ return this[kPool][kConnected]
+ }
+
+ get free () {
+ return this[kPool][kFree]
+ }
+
+ get pending () {
+ return this[kPool][kPending]
+ }
+
+ get queued () {
+ return this[kPool][kQueued]
+ }
+
+ get running () {
+ return this[kPool][kRunning]
+ }
+
+ get size () {
+ return this[kPool][kSize]
+ }
+}
+
+module.exports = PoolStats
diff --git a/node_modules/undici/lib/pool.js b/node_modules/undici/lib/pool.js
new file mode 100644
index 0000000..93b3158
--- /dev/null
+++ b/node_modules/undici/lib/pool.js
@@ -0,0 +1,92 @@
+'use strict'
+
+const {
+ PoolBase,
+ kClients,
+ kNeedDrain,
+ kAddClient,
+ kGetDispatcher
+} = require('./pool-base')
+const Client = require('./client')
+const {
+ InvalidArgumentError
+} = require('./core/errors')
+const util = require('./core/util')
+const { kUrl, kInterceptors } = require('./core/symbols')
+const buildConnector = require('./core/connect')
+
+const kOptions = Symbol('options')
+const kConnections = Symbol('connections')
+const kFactory = Symbol('factory')
+
+function defaultFactory (origin, opts) {
+ return new Client(origin, opts)
+}
+
+class Pool extends PoolBase {
+ constructor (origin, {
+ connections,
+ factory = defaultFactory,
+ connect,
+ connectTimeout,
+ tls,
+ maxCachedSessions,
+ socketPath,
+ autoSelectFamily,
+ autoSelectFamilyAttemptTimeout,
+ ...options
+ } = {}) {
+ super()
+
+ if (connections != null && (!Number.isFinite(connections) || connections < 0)) {
+ throw new InvalidArgumentError('invalid connections')
+ }
+
+ if (typeof factory !== 'function') {
+ throw new InvalidArgumentError('factory must be a function.')
+ }
+
+ if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {
+ throw new InvalidArgumentError('connect must be a function or an object')
+ }
+
+ if (typeof connect !== 'function') {
+ connect = buildConnector({
+ ...tls,
+ maxCachedSessions,
+ socketPath,
+ timeout: connectTimeout == null ? 10e3 : connectTimeout,
+ ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),
+ ...connect
+ })
+ }
+
+ this[kInterceptors] = options.interceptors && options.interceptors.Pool && Array.isArray(options.interceptors.Pool)
+ ? options.interceptors.Pool
+ : []
+ this[kConnections] = connections || null
+ this[kUrl] = util.parseOrigin(origin)
+ this[kOptions] = { ...util.deepClone(options), connect }
+ this[kOptions].interceptors = options.interceptors
+ ? { ...options.interceptors }
+ : undefined
+ this[kFactory] = factory
+ }
+
+ [kGetDispatcher] () {
+ let dispatcher = this[kClients].find(dispatcher => !dispatcher[kNeedDrain])
+
+ if (dispatcher) {
+ return dispatcher
+ }
+
+ if (!this[kConnections] || this[kClients].length < this[kConnections]) {
+ dispatcher = this[kFactory](this[kUrl], this[kOptions])
+ this[kAddClient](dispatcher)
+ }
+
+ return dispatcher
+ }
+}
+
+module.exports = Pool
diff --git a/node_modules/undici/lib/proxy-agent.js b/node_modules/undici/lib/proxy-agent.js
new file mode 100644
index 0000000..c710948
--- /dev/null
+++ b/node_modules/undici/lib/proxy-agent.js
@@ -0,0 +1,187 @@
+'use strict'
+
+const { kProxy, kClose, kDestroy, kInterceptors } = require('./core/symbols')
+const { URL } = require('url')
+const Agent = require('./agent')
+const Pool = require('./pool')
+const DispatcherBase = require('./dispatcher-base')
+const { InvalidArgumentError, RequestAbortedError } = require('./core/errors')
+const buildConnector = require('./core/connect')
+
+const kAgent = Symbol('proxy agent')
+const kClient = Symbol('proxy client')
+const kProxyHeaders = Symbol('proxy headers')
+const kRequestTls = Symbol('request tls settings')
+const kProxyTls = Symbol('proxy tls settings')
+const kConnectEndpoint = Symbol('connect endpoint function')
+
+function defaultProtocolPort (protocol) {
+ return protocol === 'https:' ? 443 : 80
+}
+
+function buildProxyOptions (opts) {
+ if (typeof opts === 'string') {
+ opts = { uri: opts }
+ }
+
+ if (!opts || !opts.uri) {
+ throw new InvalidArgumentError('Proxy opts.uri is mandatory')
+ }
+
+ return {
+ uri: opts.uri,
+ protocol: opts.protocol || 'https'
+ }
+}
+
+function defaultFactory (origin, opts) {
+ return new Pool(origin, opts)
+}
+
+class ProxyAgent extends DispatcherBase {
+ constructor (opts) {
+ super(opts)
+ this[kProxy] = buildProxyOptions(opts)
+ this[kAgent] = new Agent(opts)
+ this[kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent)
+ ? opts.interceptors.ProxyAgent
+ : []
+
+ if (typeof opts === 'string') {
+ opts = { uri: opts }
+ }
+
+ if (!opts || !opts.uri) {
+ throw new InvalidArgumentError('Proxy opts.uri is mandatory')
+ }
+
+ const { clientFactory = defaultFactory } = opts
+
+ if (typeof clientFactory !== 'function') {
+ throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.')
+ }
+
+ this[kRequestTls] = opts.requestTls
+ this[kProxyTls] = opts.proxyTls
+ this[kProxyHeaders] = opts.headers || {}
+
+ if (opts.auth && opts.token) {
+ throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token')
+ } else if (opts.auth) {
+ /* @deprecated in favour of opts.token */
+ this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}`
+ } else if (opts.token) {
+ this[kProxyHeaders]['proxy-authorization'] = opts.token
+ }
+
+ const resolvedUrl = new URL(opts.uri)
+ const { origin, port, host } = resolvedUrl
+
+ const connect = buildConnector({ ...opts.proxyTls })
+ this[kConnectEndpoint] = buildConnector({ ...opts.requestTls })
+ this[kClient] = clientFactory(resolvedUrl, { connect })
+ this[kAgent] = new Agent({
+ ...opts,
+ connect: async (opts, callback) => {
+ let requestedHost = opts.host
+ if (!opts.port) {
+ requestedHost += `:${defaultProtocolPort(opts.protocol)}`
+ }
+ try {
+ const { socket, statusCode } = await this[kClient].connect({
+ origin,
+ port,
+ path: requestedHost,
+ signal: opts.signal,
+ headers: {
+ ...this[kProxyHeaders],
+ host
+ }
+ })
+ if (statusCode !== 200) {
+ socket.on('error', () => {}).destroy()
+ callback(new RequestAbortedError('Proxy response !== 200 when HTTP Tunneling'))
+ }
+ if (opts.protocol !== 'https:') {
+ callback(null, socket)
+ return
+ }
+ let servername
+ if (this[kRequestTls]) {
+ servername = this[kRequestTls].servername
+ } else {
+ servername = opts.servername
+ }
+ this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback)
+ } catch (err) {
+ callback(err)
+ }
+ }
+ })
+ }
+
+ dispatch (opts, handler) {
+ const { host } = new URL(opts.origin)
+ const headers = buildHeaders(opts.headers)
+ throwIfProxyAuthIsSent(headers)
+ return this[kAgent].dispatch(
+ {
+ ...opts,
+ headers: {
+ ...headers,
+ host
+ }
+ },
+ handler
+ )
+ }
+
+ async [kClose] () {
+ await this[kAgent].close()
+ await this[kClient].close()
+ }
+
+ async [kDestroy] () {
+ await this[kAgent].destroy()
+ await this[kClient].destroy()
+ }
+}
+
+/**
+ * @param {string[] | Record<string, string>} headers
+ * @returns {Record<string, string>}
+ */
+function buildHeaders (headers) {
+ // When using undici.fetch, the headers list is stored
+ // as an array.
+ if (Array.isArray(headers)) {
+ /** @type {Record<string, string>} */
+ const headersPair = {}
+
+ for (let i = 0; i < headers.length; i += 2) {
+ headersPair[headers[i]] = headers[i + 1]
+ }
+
+ return headersPair
+ }
+
+ return headers
+}
+
+/**
+ * @param {Record<string, string>} headers
+ *
+ * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers
+ * Nevertheless, it was changed and to avoid a security vulnerability by end users
+ * this check was created.
+ * It should be removed in the next major version for performance reasons
+ */
+function throwIfProxyAuthIsSent (headers) {
+ const existProxyAuth = headers && Object.keys(headers)
+ .find((key) => key.toLowerCase() === 'proxy-authorization')
+ if (existProxyAuth) {
+ throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor')
+ }
+}
+
+module.exports = ProxyAgent
diff --git a/node_modules/undici/lib/timers.js b/node_modules/undici/lib/timers.js
new file mode 100644
index 0000000..5782217
--- /dev/null
+++ b/node_modules/undici/lib/timers.js
@@ -0,0 +1,97 @@
+'use strict'
+
+let fastNow = Date.now()
+let fastNowTimeout
+
+const fastTimers = []
+
+function onTimeout () {
+ fastNow = Date.now()
+
+ let len = fastTimers.length
+ let idx = 0
+ while (idx < len) {
+ const timer = fastTimers[idx]
+
+ if (timer.state === 0) {
+ timer.state = fastNow + timer.delay
+ } else if (timer.state > 0 && fastNow >= timer.state) {
+ timer.state = -1
+ timer.callback(timer.opaque)
+ }
+
+ if (timer.state === -1) {
+ timer.state = -2
+ if (idx !== len - 1) {
+ fastTimers[idx] = fastTimers.pop()
+ } else {
+ fastTimers.pop()
+ }
+ len -= 1
+ } else {
+ idx += 1
+ }
+ }
+
+ if (fastTimers.length > 0) {
+ refreshTimeout()
+ }
+}
+
+function refreshTimeout () {
+ if (fastNowTimeout && fastNowTimeout.refresh) {
+ fastNowTimeout.refresh()
+ } else {
+ clearTimeout(fastNowTimeout)
+ fastNowTimeout = setTimeout(onTimeout, 1e3)
+ if (fastNowTimeout.unref) {
+ fastNowTimeout.unref()
+ }
+ }
+}
+
+class Timeout {
+ constructor (callback, delay, opaque) {
+ this.callback = callback
+ this.delay = delay
+ this.opaque = opaque
+
+ // -2 not in timer list
+ // -1 in timer list but inactive
+ // 0 in timer list waiting for time
+ // > 0 in timer list waiting for time to expire
+ this.state = -2
+
+ this.refresh()
+ }
+
+ refresh () {
+ if (this.state === -2) {
+ fastTimers.push(this)
+ if (!fastNowTimeout || fastTimers.length === 1) {
+ refreshTimeout()
+ }
+ }
+
+ this.state = 0
+ }
+
+ clear () {
+ this.state = -1
+ }
+}
+
+module.exports = {
+ setTimeout (callback, delay, opaque) {
+ return delay < 1e3
+ ? setTimeout(callback, delay, opaque)
+ : new Timeout(callback, delay, opaque)
+ },
+ clearTimeout (timeout) {
+ if (timeout instanceof Timeout) {
+ timeout.clear()
+ } else {
+ clearTimeout(timeout)
+ }
+ }
+}
diff --git a/node_modules/undici/lib/websocket/connection.js b/node_modules/undici/lib/websocket/connection.js
new file mode 100644
index 0000000..8c82189
--- /dev/null
+++ b/node_modules/undici/lib/websocket/connection.js
@@ -0,0 +1,284 @@
+'use strict'
+
+const { randomBytes, createHash } = require('crypto')
+const diagnosticsChannel = require('diagnostics_channel')
+const { uid, states } = require('./constants')
+const {
+ kReadyState,
+ kSentClose,
+ kByteParser,
+ kReceivedClose
+} = require('./symbols')
+const { fireEvent, failWebsocketConnection } = require('./util')
+const { CloseEvent } = require('./events')
+const { makeRequest } = require('../fetch/request')
+const { fetching } = require('../fetch/index')
+const { Headers } = require('../fetch/headers')
+const { getGlobalDispatcher } = require('../global')
+const { kHeadersList } = require('../core/symbols')
+
+const channels = {}
+channels.open = diagnosticsChannel.channel('undici:websocket:open')
+channels.close = diagnosticsChannel.channel('undici:websocket:close')
+channels.socketError = diagnosticsChannel.channel('undici:websocket:socket_error')
+
+/**
+ * @see https://websockets.spec.whatwg.org/#concept-websocket-establish
+ * @param {URL} url
+ * @param {string|string[]} protocols
+ * @param {import('./websocket').WebSocket} ws
+ * @param {(response: any) => void} onEstablish
+ * @param {Partial<import('../../types/websocket').WebSocketInit>} options
+ */
+function establishWebSocketConnection (url, protocols, ws, onEstablish, options) {
+ // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s
+ // scheme is "ws", and to "https" otherwise.
+ const requestURL = url
+
+ requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:'
+
+ // 2. Let request be a new request, whose URL is requestURL, client is client,
+ // service-workers mode is "none", referrer is "no-referrer", mode is
+ // "websocket", credentials mode is "include", cache mode is "no-store" ,
+ // and redirect mode is "error".
+ const request = makeRequest({
+ urlList: [requestURL],
+ serviceWorkers: 'none',
+ referrer: 'no-referrer',
+ mode: 'websocket',
+ credentials: 'include',
+ cache: 'no-store',
+ redirect: 'error'
+ })
+
+ // Note: undici extension, allow setting custom headers.
+ if (options.headers) {
+ const headersList = new Headers(options.headers)[kHeadersList]
+
+ request.headersList = headersList
+ }
+
+ // 3. Append (`Upgrade`, `websocket`) to request’s header list.
+ // 4. Append (`Connection`, `Upgrade`) to request’s header list.
+ // Note: both of these are handled by undici currently.
+ // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397
+
+ // 5. Let keyValue be a nonce consisting of a randomly selected
+ // 16-byte value that has been forgiving-base64-encoded and
+ // isomorphic encoded.
+ const keyValue = randomBytes(16).toString('base64')
+
+ // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s
+ // header list.
+ request.headersList.append('sec-websocket-key', keyValue)
+
+ // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s
+ // header list.
+ request.headersList.append('sec-websocket-version', '13')
+
+ // 8. For each protocol in protocols, combine
+ // (`Sec-WebSocket-Protocol`, protocol) in request’s header
+ // list.
+ for (const protocol of protocols) {
+ request.headersList.append('sec-websocket-protocol', protocol)
+ }
+
+ // 9. Let permessageDeflate be a user-agent defined
+ // "permessage-deflate" extension header value.
+ // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673
+ // TODO: enable once permessage-deflate is supported
+ const permessageDeflate = '' // 'permessage-deflate; 15'
+
+ // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to
+ // request’s header list.
+ // request.headersList.append('sec-websocket-extensions', permessageDeflate)
+
+ // 11. Fetch request with useParallelQueue set to true, and
+ // processResponse given response being these steps:
+ const controller = fetching({
+ request,
+ useParallelQueue: true,
+ dispatcher: options.dispatcher ?? getGlobalDispatcher(),
+ processResponse (response) {
+ // 1. If response is a network error or its status is not 101,
+ // fail the WebSocket connection.
+ if (response.type === 'error' || response.status !== 101) {
+ failWebsocketConnection(ws, 'Received network error or non-101 status code.')
+ return
+ }
+
+ // 2. If protocols is not the empty list and extracting header
+ // list values given `Sec-WebSocket-Protocol` and response’s
+ // header list results in null, failure, or the empty byte
+ // sequence, then fail the WebSocket connection.
+ if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) {
+ failWebsocketConnection(ws, 'Server did not respond with sent protocols.')
+ return
+ }
+
+ // 3. Follow the requirements stated step 2 to step 6, inclusive,
+ // of the last set of steps in section 4.1 of The WebSocket
+ // Protocol to validate response. This either results in fail
+ // the WebSocket connection or the WebSocket connection is
+ // established.
+
+ // 2. If the response lacks an |Upgrade| header field or the |Upgrade|
+ // header field contains a value that is not an ASCII case-
+ // insensitive match for the value "websocket", the client MUST
+ // _Fail the WebSocket Connection_.
+ if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') {
+ failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".')
+ return
+ }
+
+ // 3. If the response lacks a |Connection| header field or the
+ // |Connection| header field doesn't contain a token that is an
+ // ASCII case-insensitive match for the value "Upgrade", the client
+ // MUST _Fail the WebSocket Connection_.
+ if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') {
+ failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".')
+ return
+ }
+
+ // 4. If the response lacks a |Sec-WebSocket-Accept| header field or
+ // the |Sec-WebSocket-Accept| contains a value other than the
+ // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket-
+ // Key| (as a string, not base64-decoded) with the string "258EAFA5-
+ // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and
+ // trailing whitespace, the client MUST _Fail the WebSocket
+ // Connection_.
+ const secWSAccept = response.headersList.get('Sec-WebSocket-Accept')
+ const digest = createHash('sha1').update(keyValue + uid).digest('base64')
+ if (secWSAccept !== digest) {
+ failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.')
+ return
+ }
+
+ // 5. If the response includes a |Sec-WebSocket-Extensions| header
+ // field and this header field indicates the use of an extension
+ // that was not present in the client's handshake (the server has
+ // indicated an extension not requested by the client), the client
+ // MUST _Fail the WebSocket Connection_. (The parsing of this
+ // header field to determine which extensions are requested is
+ // discussed in Section 9.1.)
+ const secExtension = response.headersList.get('Sec-WebSocket-Extensions')
+
+ if (secExtension !== null && secExtension !== permessageDeflate) {
+ failWebsocketConnection(ws, 'Received different permessage-deflate than the one set.')
+ return
+ }
+
+ // 6. If the response includes a |Sec-WebSocket-Protocol| header field
+ // and this header field indicates the use of a subprotocol that was
+ // not present in the client's handshake (the server has indicated a
+ // subprotocol not requested by the client), the client MUST _Fail
+ // the WebSocket Connection_.
+ const secProtocol = response.headersList.get('Sec-WebSocket-Protocol')
+
+ if (secProtocol !== null && secProtocol !== request.headersList.get('Sec-WebSocket-Protocol')) {
+ failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.')
+ return
+ }
+
+ response.socket.on('data', onSocketData)
+ response.socket.on('close', onSocketClose)
+ response.socket.on('error', onSocketError)
+
+ if (channels.open.hasSubscribers) {
+ channels.open.publish({
+ address: response.socket.address(),
+ protocol: secProtocol,
+ extensions: secExtension
+ })
+ }
+
+ onEstablish(response)
+ }
+ })
+
+ return controller
+}
+
+/**
+ * @param {Buffer} chunk
+ */
+function onSocketData (chunk) {
+ if (!this.ws[kByteParser].write(chunk)) {
+ this.pause()
+ }
+}
+
+/**
+ * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol
+ * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4
+ */
+function onSocketClose () {
+ const { ws } = this
+
+ // If the TCP connection was closed after the
+ // WebSocket closing handshake was completed, the WebSocket connection
+ // is said to have been closed _cleanly_.
+ const wasClean = ws[kSentClose] && ws[kReceivedClose]
+
+ let code = 1005
+ let reason = ''
+
+ const result = ws[kByteParser].closingInfo
+
+ if (result) {
+ code = result.code ?? 1005
+ reason = result.reason
+ } else if (!ws[kSentClose]) {
+ // If _The WebSocket
+ // Connection is Closed_ and no Close control frame was received by the
+ // endpoint (such as could occur if the underlying transport connection
+ // is lost), _The WebSocket Connection Close Code_ is considered to be
+ // 1006.
+ code = 1006
+ }
+
+ // 1. Change the ready state to CLOSED (3).
+ ws[kReadyState] = states.CLOSED
+
+ // 2. If the user agent was required to fail the WebSocket
+ // connection, or if the WebSocket connection was closed
+ // after being flagged as full, fire an event named error
+ // at the WebSocket object.
+ // TODO
+
+ // 3. Fire an event named close at the WebSocket object,
+ // using CloseEvent, with the wasClean attribute
+ // initialized to true if the connection closed cleanly
+ // and false otherwise, the code attribute initialized to
+ // the WebSocket connection close code, and the reason
+ // attribute initialized to the result of applying UTF-8
+ // decode without BOM to the WebSocket connection close
+ // reason.
+ fireEvent('close', ws, CloseEvent, {
+ wasClean, code, reason
+ })
+
+ if (channels.close.hasSubscribers) {
+ channels.close.publish({
+ websocket: ws,
+ code,
+ reason
+ })
+ }
+}
+
+function onSocketError (error) {
+ const { ws } = this
+
+ ws[kReadyState] = states.CLOSING
+
+ if (channels.socketError.hasSubscribers) {
+ channels.socketError.publish(error)
+ }
+
+ this.destroy()
+}
+
+module.exports = {
+ establishWebSocketConnection
+}
diff --git a/node_modules/undici/lib/websocket/constants.js b/node_modules/undici/lib/websocket/constants.js
new file mode 100644
index 0000000..406b8e3
--- /dev/null
+++ b/node_modules/undici/lib/websocket/constants.js
@@ -0,0 +1,51 @@
+'use strict'
+
+// This is a Globally Unique Identifier unique used
+// to validate that the endpoint accepts websocket
+// connections.
+// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3
+const uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'
+
+/** @type {PropertyDescriptor} */
+const staticPropertyDescriptors = {
+ enumerable: true,
+ writable: false,
+ configurable: false
+}
+
+const states = {
+ CONNECTING: 0,
+ OPEN: 1,
+ CLOSING: 2,
+ CLOSED: 3
+}
+
+const opcodes = {
+ CONTINUATION: 0x0,
+ TEXT: 0x1,
+ BINARY: 0x2,
+ CLOSE: 0x8,
+ PING: 0x9,
+ PONG: 0xA
+}
+
+const maxUnsigned16Bit = 2 ** 16 - 1 // 65535
+
+const parserStates = {
+ INFO: 0,
+ PAYLOADLENGTH_16: 2,
+ PAYLOADLENGTH_64: 3,
+ READ_DATA: 4
+}
+
+const emptyBuffer = Buffer.allocUnsafe(0)
+
+module.exports = {
+ uid,
+ staticPropertyDescriptors,
+ states,
+ opcodes,
+ maxUnsigned16Bit,
+ parserStates,
+ emptyBuffer
+}
diff --git a/node_modules/undici/lib/websocket/events.js b/node_modules/undici/lib/websocket/events.js
new file mode 100644
index 0000000..621a226
--- /dev/null
+++ b/node_modules/undici/lib/websocket/events.js
@@ -0,0 +1,303 @@
+'use strict'
+
+const { webidl } = require('../fetch/webidl')
+const { kEnumerableProperty } = require('../core/util')
+const { MessagePort } = require('worker_threads')
+
+/**
+ * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent
+ */
+class MessageEvent extends Event {
+ #eventInit
+
+ constructor (type, eventInitDict = {}) {
+ webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent constructor' })
+
+ type = webidl.converters.DOMString(type)
+ eventInitDict = webidl.converters.MessageEventInit(eventInitDict)
+
+ super(type, eventInitDict)
+
+ this.#eventInit = eventInitDict
+ }
+
+ get data () {
+ webidl.brandCheck(this, MessageEvent)
+
+ return this.#eventInit.data
+ }
+
+ get origin () {
+ webidl.brandCheck(this, MessageEvent)
+
+ return this.#eventInit.origin
+ }
+
+ get lastEventId () {
+ webidl.brandCheck(this, MessageEvent)
+
+ return this.#eventInit.lastEventId
+ }
+
+ get source () {
+ webidl.brandCheck(this, MessageEvent)
+
+ return this.#eventInit.source
+ }
+
+ get ports () {
+ webidl.brandCheck(this, MessageEvent)
+
+ if (!Object.isFrozen(this.#eventInit.ports)) {
+ Object.freeze(this.#eventInit.ports)
+ }
+
+ return this.#eventInit.ports
+ }
+
+ initMessageEvent (
+ type,
+ bubbles = false,
+ cancelable = false,
+ data = null,
+ origin = '',
+ lastEventId = '',
+ source = null,
+ ports = []
+ ) {
+ webidl.brandCheck(this, MessageEvent)
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent.initMessageEvent' })
+
+ return new MessageEvent(type, {
+ bubbles, cancelable, data, origin, lastEventId, source, ports
+ })
+ }
+}
+
+/**
+ * @see https://websockets.spec.whatwg.org/#the-closeevent-interface
+ */
+class CloseEvent extends Event {
+ #eventInit
+
+ constructor (type, eventInitDict = {}) {
+ webidl.argumentLengthCheck(arguments, 1, { header: 'CloseEvent constructor' })
+
+ type = webidl.converters.DOMString(type)
+ eventInitDict = webidl.converters.CloseEventInit(eventInitDict)
+
+ super(type, eventInitDict)
+
+ this.#eventInit = eventInitDict
+ }
+
+ get wasClean () {
+ webidl.brandCheck(this, CloseEvent)
+
+ return this.#eventInit.wasClean
+ }
+
+ get code () {
+ webidl.brandCheck(this, CloseEvent)
+
+ return this.#eventInit.code
+ }
+
+ get reason () {
+ webidl.brandCheck(this, CloseEvent)
+
+ return this.#eventInit.reason
+ }
+}
+
+// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface
+class ErrorEvent extends Event {
+ #eventInit
+
+ constructor (type, eventInitDict) {
+ webidl.argumentLengthCheck(arguments, 1, { header: 'ErrorEvent constructor' })
+
+ super(type, eventInitDict)
+
+ type = webidl.converters.DOMString(type)
+ eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {})
+
+ this.#eventInit = eventInitDict
+ }
+
+ get message () {
+ webidl.brandCheck(this, ErrorEvent)
+
+ return this.#eventInit.message
+ }
+
+ get filename () {
+ webidl.brandCheck(this, ErrorEvent)
+
+ return this.#eventInit.filename
+ }
+
+ get lineno () {
+ webidl.brandCheck(this, ErrorEvent)
+
+ return this.#eventInit.lineno
+ }
+
+ get colno () {
+ webidl.brandCheck(this, ErrorEvent)
+
+ return this.#eventInit.colno
+ }
+
+ get error () {
+ webidl.brandCheck(this, ErrorEvent)
+
+ return this.#eventInit.error
+ }
+}
+
+Object.defineProperties(MessageEvent.prototype, {
+ [Symbol.toStringTag]: {
+ value: 'MessageEvent',
+ configurable: true
+ },
+ data: kEnumerableProperty,
+ origin: kEnumerableProperty,
+ lastEventId: kEnumerableProperty,
+ source: kEnumerableProperty,
+ ports: kEnumerableProperty,
+ initMessageEvent: kEnumerableProperty
+})
+
+Object.defineProperties(CloseEvent.prototype, {
+ [Symbol.toStringTag]: {
+ value: 'CloseEvent',
+ configurable: true
+ },
+ reason: kEnumerableProperty,
+ code: kEnumerableProperty,
+ wasClean: kEnumerableProperty
+})
+
+Object.defineProperties(ErrorEvent.prototype, {
+ [Symbol.toStringTag]: {
+ value: 'ErrorEvent',
+ configurable: true
+ },
+ message: kEnumerableProperty,
+ filename: kEnumerableProperty,
+ lineno: kEnumerableProperty,
+ colno: kEnumerableProperty,
+ error: kEnumerableProperty
+})
+
+webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort)
+
+webidl.converters['sequence<MessagePort>'] = webidl.sequenceConverter(
+ webidl.converters.MessagePort
+)
+
+const eventInit = [
+ {
+ key: 'bubbles',
+ converter: webidl.converters.boolean,
+ defaultValue: false
+ },
+ {
+ key: 'cancelable',
+ converter: webidl.converters.boolean,
+ defaultValue: false
+ },
+ {
+ key: 'composed',
+ converter: webidl.converters.boolean,
+ defaultValue: false
+ }
+]
+
+webidl.converters.MessageEventInit = webidl.dictionaryConverter([
+ ...eventInit,
+ {
+ key: 'data',
+ converter: webidl.converters.any,
+ defaultValue: null
+ },
+ {
+ key: 'origin',
+ converter: webidl.converters.USVString,
+ defaultValue: ''
+ },
+ {
+ key: 'lastEventId',
+ converter: webidl.converters.DOMString,
+ defaultValue: ''
+ },
+ {
+ key: 'source',
+ // Node doesn't implement WindowProxy or ServiceWorker, so the only
+ // valid value for source is a MessagePort.
+ converter: webidl.nullableConverter(webidl.converters.MessagePort),
+ defaultValue: null
+ },
+ {
+ key: 'ports',
+ converter: webidl.converters['sequence<MessagePort>'],
+ get defaultValue () {
+ return []
+ }
+ }
+])
+
+webidl.converters.CloseEventInit = webidl.dictionaryConverter([
+ ...eventInit,
+ {
+ key: 'wasClean',
+ converter: webidl.converters.boolean,
+ defaultValue: false
+ },
+ {
+ key: 'code',
+ converter: webidl.converters['unsigned short'],
+ defaultValue: 0
+ },
+ {
+ key: 'reason',
+ converter: webidl.converters.USVString,
+ defaultValue: ''
+ }
+])
+
+webidl.converters.ErrorEventInit = webidl.dictionaryConverter([
+ ...eventInit,
+ {
+ key: 'message',
+ converter: webidl.converters.DOMString,
+ defaultValue: ''
+ },
+ {
+ key: 'filename',
+ converter: webidl.converters.USVString,
+ defaultValue: ''
+ },
+ {
+ key: 'lineno',
+ converter: webidl.converters['unsigned long'],
+ defaultValue: 0
+ },
+ {
+ key: 'colno',
+ converter: webidl.converters['unsigned long'],
+ defaultValue: 0
+ },
+ {
+ key: 'error',
+ converter: webidl.converters.any
+ }
+])
+
+module.exports = {
+ MessageEvent,
+ CloseEvent,
+ ErrorEvent
+}
diff --git a/node_modules/undici/lib/websocket/frame.js b/node_modules/undici/lib/websocket/frame.js
new file mode 100644
index 0000000..61bfd39
--- /dev/null
+++ b/node_modules/undici/lib/websocket/frame.js
@@ -0,0 +1,66 @@
+'use strict'
+
+const { randomBytes } = require('crypto')
+const { maxUnsigned16Bit } = require('./constants')
+
+class WebsocketFrameSend {
+ /**
+ * @param {Buffer|undefined} data
+ */
+ constructor (data) {
+ this.frameData = data
+ this.maskKey = randomBytes(4)
+ }
+
+ createFrame (opcode) {
+ const bodyLength = this.frameData?.byteLength ?? 0
+
+ /** @type {number} */
+ let payloadLength = bodyLength // 0-125
+ let offset = 6
+
+ if (bodyLength > maxUnsigned16Bit) {
+ offset += 8 // payload length is next 8 bytes
+ payloadLength = 127
+ } else if (bodyLength > 125) {
+ offset += 2 // payload length is next 2 bytes
+ payloadLength = 126
+ }
+
+ const buffer = Buffer.allocUnsafe(bodyLength + offset)
+
+ // Clear first 2 bytes, everything else is overwritten
+ buffer[0] = buffer[1] = 0
+ buffer[0] |= 0x80 // FIN
+ buffer[0] = (buffer[0] & 0xF0) + opcode // opcode
+
+ /*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */
+ buffer[offset - 4] = this.maskKey[0]
+ buffer[offset - 3] = this.maskKey[1]
+ buffer[offset - 2] = this.maskKey[2]
+ buffer[offset - 1] = this.maskKey[3]
+
+ buffer[1] = payloadLength
+
+ if (payloadLength === 126) {
+ buffer.writeUInt16BE(bodyLength, 2)
+ } else if (payloadLength === 127) {
+ // Clear extended payload length
+ buffer[2] = buffer[3] = 0
+ buffer.writeUIntBE(bodyLength, 4, 6)
+ }
+
+ buffer[1] |= 0x80 // MASK
+
+ // mask body
+ for (let i = 0; i < bodyLength; i++) {
+ buffer[offset + i] = this.frameData[i] ^ this.maskKey[i % 4]
+ }
+
+ return buffer
+ }
+}
+
+module.exports = {
+ WebsocketFrameSend
+}
diff --git a/node_modules/undici/lib/websocket/receiver.js b/node_modules/undici/lib/websocket/receiver.js
new file mode 100644
index 0000000..bdd2031
--- /dev/null
+++ b/node_modules/undici/lib/websocket/receiver.js
@@ -0,0 +1,344 @@
+'use strict'
+
+const { Writable } = require('stream')
+const diagnosticsChannel = require('diagnostics_channel')
+const { parserStates, opcodes, states, emptyBuffer } = require('./constants')
+const { kReadyState, kSentClose, kResponse, kReceivedClose } = require('./symbols')
+const { isValidStatusCode, failWebsocketConnection, websocketMessageReceived } = require('./util')
+const { WebsocketFrameSend } = require('./frame')
+
+// This code was influenced by ws released under the MIT license.
+// Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
+// Copyright (c) 2013 Arnout Kazemier and contributors
+// Copyright (c) 2016 Luigi Pinca and contributors
+
+const channels = {}
+channels.ping = diagnosticsChannel.channel('undici:websocket:ping')
+channels.pong = diagnosticsChannel.channel('undici:websocket:pong')
+
+class ByteParser extends Writable {
+ #buffers = []
+ #byteOffset = 0
+
+ #state = parserStates.INFO
+
+ #info = {}
+ #fragments = []
+
+ constructor (ws) {
+ super()
+
+ this.ws = ws
+ }
+
+ /**
+ * @param {Buffer} chunk
+ * @param {() => void} callback
+ */
+ _write (chunk, _, callback) {
+ this.#buffers.push(chunk)
+ this.#byteOffset += chunk.length
+
+ this.run(callback)
+ }
+
+ /**
+ * Runs whenever a new chunk is received.
+ * Callback is called whenever there are no more chunks buffering,
+ * or not enough bytes are buffered to parse.
+ */
+ run (callback) {
+ while (true) {
+ if (this.#state === parserStates.INFO) {
+ // If there aren't enough bytes to parse the payload length, etc.
+ if (this.#byteOffset < 2) {
+ return callback()
+ }
+
+ const buffer = this.consume(2)
+
+ this.#info.fin = (buffer[0] & 0x80) !== 0
+ this.#info.opcode = buffer[0] & 0x0F
+
+ // If we receive a fragmented message, we use the type of the first
+ // frame to parse the full message as binary/text, when it's terminated
+ this.#info.originalOpcode ??= this.#info.opcode
+
+ this.#info.fragmented = !this.#info.fin && this.#info.opcode !== opcodes.CONTINUATION
+
+ if (this.#info.fragmented && this.#info.opcode !== opcodes.BINARY && this.#info.opcode !== opcodes.TEXT) {
+ // Only text and binary frames can be fragmented
+ failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.')
+ return
+ }
+
+ const payloadLength = buffer[1] & 0x7F
+
+ if (payloadLength <= 125) {
+ this.#info.payloadLength = payloadLength
+ this.#state = parserStates.READ_DATA
+ } else if (payloadLength === 126) {
+ this.#state = parserStates.PAYLOADLENGTH_16
+ } else if (payloadLength === 127) {
+ this.#state = parserStates.PAYLOADLENGTH_64
+ }
+
+ if (this.#info.fragmented && payloadLength > 125) {
+ // A fragmented frame can't be fragmented itself
+ failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.')
+ return
+ } else if (
+ (this.#info.opcode === opcodes.PING ||
+ this.#info.opcode === opcodes.PONG ||
+ this.#info.opcode === opcodes.CLOSE) &&
+ payloadLength > 125
+ ) {
+ // Control frames can have a payload length of 125 bytes MAX
+ failWebsocketConnection(this.ws, 'Payload length for control frame exceeded 125 bytes.')
+ return
+ } else if (this.#info.opcode === opcodes.CLOSE) {
+ if (payloadLength === 1) {
+ failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.')
+ return
+ }
+
+ const body = this.consume(payloadLength)
+
+ this.#info.closeInfo = this.parseCloseBody(false, body)
+
+ if (!this.ws[kSentClose]) {
+ // If an endpoint receives a Close frame and did not previously send a
+ // Close frame, the endpoint MUST send a Close frame in response. (When
+ // sending a Close frame in response, the endpoint typically echos the
+ // status code it received.)
+ const body = Buffer.allocUnsafe(2)
+ body.writeUInt16BE(this.#info.closeInfo.code, 0)
+ const closeFrame = new WebsocketFrameSend(body)
+
+ this.ws[kResponse].socket.write(
+ closeFrame.createFrame(opcodes.CLOSE),
+ (err) => {
+ if (!err) {
+ this.ws[kSentClose] = true
+ }
+ }
+ )
+ }
+
+ // Upon either sending or receiving a Close control frame, it is said
+ // that _The WebSocket Closing Handshake is Started_ and that the
+ // WebSocket connection is in the CLOSING state.
+ this.ws[kReadyState] = states.CLOSING
+ this.ws[kReceivedClose] = true
+
+ this.end()
+
+ return
+ } else if (this.#info.opcode === opcodes.PING) {
+ // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in
+ // response, unless it already received a Close frame.
+ // A Pong frame sent in response to a Ping frame must have identical
+ // "Application data"
+
+ const body = this.consume(payloadLength)
+
+ if (!this.ws[kReceivedClose]) {
+ const frame = new WebsocketFrameSend(body)
+
+ this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG))
+
+ if (channels.ping.hasSubscribers) {
+ channels.ping.publish({
+ payload: body
+ })
+ }
+ }
+
+ this.#state = parserStates.INFO
+
+ if (this.#byteOffset > 0) {
+ continue
+ } else {
+ callback()
+ return
+ }
+ } else if (this.#info.opcode === opcodes.PONG) {
+ // A Pong frame MAY be sent unsolicited. This serves as a
+ // unidirectional heartbeat. A response to an unsolicited Pong frame is
+ // not expected.
+
+ const body = this.consume(payloadLength)
+
+ if (channels.pong.hasSubscribers) {
+ channels.pong.publish({
+ payload: body
+ })
+ }
+
+ if (this.#byteOffset > 0) {
+ continue
+ } else {
+ callback()
+ return
+ }
+ }
+ } else if (this.#state === parserStates.PAYLOADLENGTH_16) {
+ if (this.#byteOffset < 2) {
+ return callback()
+ }
+
+ const buffer = this.consume(2)
+
+ this.#info.payloadLength = buffer.readUInt16BE(0)
+ this.#state = parserStates.READ_DATA
+ } else if (this.#state === parserStates.PAYLOADLENGTH_64) {
+ if (this.#byteOffset < 8) {
+ return callback()
+ }
+
+ const buffer = this.consume(8)
+ const upper = buffer.readUInt32BE(0)
+
+ // 2^31 is the maxinimum bytes an arraybuffer can contain
+ // on 32-bit systems. Although, on 64-bit systems, this is
+ // 2^53-1 bytes.
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length
+ // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275
+ // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e
+ if (upper > 2 ** 31 - 1) {
+ failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.')
+ return
+ }
+
+ const lower = buffer.readUInt32BE(4)
+
+ this.#info.payloadLength = (upper << 8) + lower
+ this.#state = parserStates.READ_DATA
+ } else if (this.#state === parserStates.READ_DATA) {
+ if (this.#byteOffset < this.#info.payloadLength) {
+ // If there is still more data in this chunk that needs to be read
+ return callback()
+ } else if (this.#byteOffset >= this.#info.payloadLength) {
+ // If the server sent multiple frames in a single chunk
+
+ const body = this.consume(this.#info.payloadLength)
+
+ this.#fragments.push(body)
+
+ // If the frame is unfragmented, or a fragmented frame was terminated,
+ // a message was received
+ if (!this.#info.fragmented || (this.#info.fin && this.#info.opcode === opcodes.CONTINUATION)) {
+ const fullMessage = Buffer.concat(this.#fragments)
+
+ websocketMessageReceived(this.ws, this.#info.originalOpcode, fullMessage)
+
+ this.#info = {}
+ this.#fragments.length = 0
+ }
+
+ this.#state = parserStates.INFO
+ }
+ }
+
+ if (this.#byteOffset > 0) {
+ continue
+ } else {
+ callback()
+ break
+ }
+ }
+ }
+
+ /**
+ * Take n bytes from the buffered Buffers
+ * @param {number} n
+ * @returns {Buffer|null}
+ */
+ consume (n) {
+ if (n > this.#byteOffset) {
+ return null
+ } else if (n === 0) {
+ return emptyBuffer
+ }
+
+ if (this.#buffers[0].length === n) {
+ this.#byteOffset -= this.#buffers[0].length
+ return this.#buffers.shift()
+ }
+
+ const buffer = Buffer.allocUnsafe(n)
+ let offset = 0
+
+ while (offset !== n) {
+ const next = this.#buffers[0]
+ const { length } = next
+
+ if (length + offset === n) {
+ buffer.set(this.#buffers.shift(), offset)
+ break
+ } else if (length + offset > n) {
+ buffer.set(next.subarray(0, n - offset), offset)
+ this.#buffers[0] = next.subarray(n - offset)
+ break
+ } else {
+ buffer.set(this.#buffers.shift(), offset)
+ offset += next.length
+ }
+ }
+
+ this.#byteOffset -= n
+
+ return buffer
+ }
+
+ parseCloseBody (onlyCode, data) {
+ // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5
+ /** @type {number|undefined} */
+ let code
+
+ if (data.length >= 2) {
+ // _The WebSocket Connection Close Code_ is
+ // defined as the status code (Section 7.4) contained in the first Close
+ // control frame received by the application
+ code = data.readUInt16BE(0)
+ }
+
+ if (onlyCode) {
+ if (!isValidStatusCode(code)) {
+ return null
+ }
+
+ return { code }
+ }
+
+ // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6
+ /** @type {Buffer} */
+ let reason = data.subarray(2)
+
+ // Remove BOM
+ if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) {
+ reason = reason.subarray(3)
+ }
+
+ if (code !== undefined && !isValidStatusCode(code)) {
+ return null
+ }
+
+ try {
+ // TODO: optimize this
+ reason = new TextDecoder('utf-8', { fatal: true }).decode(reason)
+ } catch {
+ return null
+ }
+
+ return { code, reason }
+ }
+
+ get closingInfo () {
+ return this.#info.closeInfo
+ }
+}
+
+module.exports = {
+ ByteParser
+}
diff --git a/node_modules/undici/lib/websocket/symbols.js b/node_modules/undici/lib/websocket/symbols.js
new file mode 100644
index 0000000..11d03e3
--- /dev/null
+++ b/node_modules/undici/lib/websocket/symbols.js
@@ -0,0 +1,12 @@
+'use strict'
+
+module.exports = {
+ kWebSocketURL: Symbol('url'),
+ kReadyState: Symbol('ready state'),
+ kController: Symbol('controller'),
+ kResponse: Symbol('response'),
+ kBinaryType: Symbol('binary type'),
+ kSentClose: Symbol('sent close'),
+ kReceivedClose: Symbol('received close'),
+ kByteParser: Symbol('byte parser')
+}
diff --git a/node_modules/undici/lib/websocket/util.js b/node_modules/undici/lib/websocket/util.js
new file mode 100644
index 0000000..6c59b2c
--- /dev/null
+++ b/node_modules/undici/lib/websocket/util.js
@@ -0,0 +1,200 @@
+'use strict'
+
+const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require('./symbols')
+const { states, opcodes } = require('./constants')
+const { MessageEvent, ErrorEvent } = require('./events')
+
+/* globals Blob */
+
+/**
+ * @param {import('./websocket').WebSocket} ws
+ */
+function isEstablished (ws) {
+ // If the server's response is validated as provided for above, it is
+ // said that _The WebSocket Connection is Established_ and that the
+ // WebSocket Connection is in the OPEN state.
+ return ws[kReadyState] === states.OPEN
+}
+
+/**
+ * @param {import('./websocket').WebSocket} ws
+ */
+function isClosing (ws) {
+ // Upon either sending or receiving a Close control frame, it is said
+ // that _The WebSocket Closing Handshake is Started_ and that the
+ // WebSocket connection is in the CLOSING state.
+ return ws[kReadyState] === states.CLOSING
+}
+
+/**
+ * @param {import('./websocket').WebSocket} ws
+ */
+function isClosed (ws) {
+ return ws[kReadyState] === states.CLOSED
+}
+
+/**
+ * @see https://dom.spec.whatwg.org/#concept-event-fire
+ * @param {string} e
+ * @param {EventTarget} target
+ * @param {EventInit | undefined} eventInitDict
+ */
+function fireEvent (e, target, eventConstructor = Event, eventInitDict) {
+ // 1. If eventConstructor is not given, then let eventConstructor be Event.
+
+ // 2. Let event be the result of creating an event given eventConstructor,
+ // in the relevant realm of target.
+ // 3. Initialize event’s type attribute to e.
+ const event = new eventConstructor(e, eventInitDict) // eslint-disable-line new-cap
+
+ // 4. Initialize any other IDL attributes of event as described in the
+ // invocation of this algorithm.
+
+ // 5. Return the result of dispatching event at target, with legacy target
+ // override flag set if set.
+ target.dispatchEvent(event)
+}
+
+/**
+ * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol
+ * @param {import('./websocket').WebSocket} ws
+ * @param {number} type Opcode
+ * @param {Buffer} data application data
+ */
+function websocketMessageReceived (ws, type, data) {
+ // 1. If ready state is not OPEN (1), then return.
+ if (ws[kReadyState] !== states.OPEN) {
+ return
+ }
+
+ // 2. Let dataForEvent be determined by switching on type and binary type:
+ let dataForEvent
+
+ if (type === opcodes.TEXT) {
+ // -> type indicates that the data is Text
+ // a new DOMString containing data
+ try {
+ dataForEvent = new TextDecoder('utf-8', { fatal: true }).decode(data)
+ } catch {
+ failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.')
+ return
+ }
+ } else if (type === opcodes.BINARY) {
+ if (ws[kBinaryType] === 'blob') {
+ // -> type indicates that the data is Binary and binary type is "blob"
+ // a new Blob object, created in the relevant Realm of the WebSocket
+ // object, that represents data as its raw data
+ dataForEvent = new Blob([data])
+ } else {
+ // -> type indicates that the data is Binary and binary type is "arraybuffer"
+ // a new ArrayBuffer object, created in the relevant Realm of the
+ // WebSocket object, whose contents are data
+ dataForEvent = new Uint8Array(data).buffer
+ }
+ }
+
+ // 3. Fire an event named message at the WebSocket object, using MessageEvent,
+ // with the origin attribute initialized to the serialization of the WebSocket
+ // object’s url's origin, and the data attribute initialized to dataForEvent.
+ fireEvent('message', ws, MessageEvent, {
+ origin: ws[kWebSocketURL].origin,
+ data: dataForEvent
+ })
+}
+
+/**
+ * @see https://datatracker.ietf.org/doc/html/rfc6455
+ * @see https://datatracker.ietf.org/doc/html/rfc2616
+ * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407
+ * @param {string} protocol
+ */
+function isValidSubprotocol (protocol) {
+ // If present, this value indicates one
+ // or more comma-separated subprotocol the client wishes to speak,
+ // ordered by preference. The elements that comprise this value
+ // MUST be non-empty strings with characters in the range U+0021 to
+ // U+007E not including separator characters as defined in
+ // [RFC2616] and MUST all be unique strings.
+ if (protocol.length === 0) {
+ return false
+ }
+
+ for (const char of protocol) {
+ const code = char.charCodeAt(0)
+
+ if (
+ code < 0x21 ||
+ code > 0x7E ||
+ char === '(' ||
+ char === ')' ||
+ char === '<' ||
+ char === '>' ||
+ char === '@' ||
+ char === ',' ||
+ char === ';' ||
+ char === ':' ||
+ char === '\\' ||
+ char === '"' ||
+ char === '/' ||
+ char === '[' ||
+ char === ']' ||
+ char === '?' ||
+ char === '=' ||
+ char === '{' ||
+ char === '}' ||
+ code === 32 || // SP
+ code === 9 // HT
+ ) {
+ return false
+ }
+ }
+
+ return true
+}
+
+/**
+ * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4
+ * @param {number} code
+ */
+function isValidStatusCode (code) {
+ if (code >= 1000 && code < 1015) {
+ return (
+ code !== 1004 && // reserved
+ code !== 1005 && // "MUST NOT be set as a status code"
+ code !== 1006 // "MUST NOT be set as a status code"
+ )
+ }
+
+ return code >= 3000 && code <= 4999
+}
+
+/**
+ * @param {import('./websocket').WebSocket} ws
+ * @param {string|undefined} reason
+ */
+function failWebsocketConnection (ws, reason) {
+ const { [kController]: controller, [kResponse]: response } = ws
+
+ controller.abort()
+
+ if (response?.socket && !response.socket.destroyed) {
+ response.socket.destroy()
+ }
+
+ if (reason) {
+ fireEvent('error', ws, ErrorEvent, {
+ error: new Error(reason)
+ })
+ }
+}
+
+module.exports = {
+ isEstablished,
+ isClosing,
+ isClosed,
+ fireEvent,
+ isValidSubprotocol,
+ isValidStatusCode,
+ failWebsocketConnection,
+ websocketMessageReceived
+}
diff --git a/node_modules/undici/lib/websocket/websocket.js b/node_modules/undici/lib/websocket/websocket.js
new file mode 100644
index 0000000..22ad2fb
--- /dev/null
+++ b/node_modules/undici/lib/websocket/websocket.js
@@ -0,0 +1,630 @@
+'use strict'
+
+const { webidl } = require('../fetch/webidl')
+const { DOMException } = require('../fetch/constants')
+const { URLSerializer } = require('../fetch/dataURL')
+const { staticPropertyDescriptors, states, opcodes, emptyBuffer } = require('./constants')
+const {
+ kWebSocketURL,
+ kReadyState,
+ kController,
+ kBinaryType,
+ kResponse,
+ kSentClose,
+ kByteParser
+} = require('./symbols')
+const { isEstablished, isClosing, isValidSubprotocol, failWebsocketConnection, fireEvent } = require('./util')
+const { establishWebSocketConnection } = require('./connection')
+const { WebsocketFrameSend } = require('./frame')
+const { ByteParser } = require('./receiver')
+const { kEnumerableProperty, isBlobLike } = require('../core/util')
+const { getGlobalDispatcher } = require('../global')
+const { types } = require('util')
+
+let experimentalWarned = false
+
+// https://websockets.spec.whatwg.org/#interface-definition
+class WebSocket extends EventTarget {
+ #events = {
+ open: null,
+ error: null,
+ close: null,
+ message: null
+ }
+
+ #bufferedAmount = 0
+ #protocol = ''
+ #extensions = ''
+
+ /**
+ * @param {string} url
+ * @param {string|string[]} protocols
+ */
+ constructor (url, protocols = []) {
+ super()
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket constructor' })
+
+ if (!experimentalWarned) {
+ experimentalWarned = true
+ process.emitWarning('WebSockets are experimental, expect them to change at any time.', {
+ code: 'UNDICI-WS'
+ })
+ }
+
+ const options = webidl.converters['DOMString or sequence<DOMString> or WebSocketInit'](protocols)
+
+ url = webidl.converters.USVString(url)
+ protocols = options.protocols
+
+ // 1. Let urlRecord be the result of applying the URL parser to url.
+ let urlRecord
+
+ try {
+ urlRecord = new URL(url)
+ } catch (e) {
+ // 2. If urlRecord is failure, then throw a "SyntaxError" DOMException.
+ throw new DOMException(e, 'SyntaxError')
+ }
+
+ // 3. If urlRecord’s scheme is not "ws" or "wss", then throw a
+ // "SyntaxError" DOMException.
+ if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') {
+ throw new DOMException(
+ `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`,
+ 'SyntaxError'
+ )
+ }
+
+ // 4. If urlRecord’s fragment is non-null, then throw a "SyntaxError"
+ // DOMException.
+ if (urlRecord.hash) {
+ throw new DOMException('Got fragment', 'SyntaxError')
+ }
+
+ // 5. If protocols is a string, set protocols to a sequence consisting
+ // of just that string.
+ if (typeof protocols === 'string') {
+ protocols = [protocols]
+ }
+
+ // 6. If any of the values in protocols occur more than once or otherwise
+ // fail to match the requirements for elements that comprise the value
+ // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket
+ // protocol, then throw a "SyntaxError" DOMException.
+ if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) {
+ throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')
+ }
+
+ if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) {
+ throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')
+ }
+
+ // 7. Set this's url to urlRecord.
+ this[kWebSocketURL] = urlRecord
+
+ // 8. Let client be this's relevant settings object.
+
+ // 9. Run this step in parallel:
+
+ // 1. Establish a WebSocket connection given urlRecord, protocols,
+ // and client.
+ this[kController] = establishWebSocketConnection(
+ urlRecord,
+ protocols,
+ this,
+ (response) => this.#onConnectionEstablished(response),
+ options
+ )
+
+ // Each WebSocket object has an associated ready state, which is a
+ // number representing the state of the connection. Initially it must
+ // be CONNECTING (0).
+ this[kReadyState] = WebSocket.CONNECTING
+
+ // The extensions attribute must initially return the empty string.
+
+ // The protocol attribute must initially return the empty string.
+
+ // Each WebSocket object has an associated binary type, which is a
+ // BinaryType. Initially it must be "blob".
+ this[kBinaryType] = 'blob'
+ }
+
+ /**
+ * @see https://websockets.spec.whatwg.org/#dom-websocket-close
+ * @param {number|undefined} code
+ * @param {string|undefined} reason
+ */
+ close (code = undefined, reason = undefined) {
+ webidl.brandCheck(this, WebSocket)
+
+ if (code !== undefined) {
+ code = webidl.converters['unsigned short'](code, { clamp: true })
+ }
+
+ if (reason !== undefined) {
+ reason = webidl.converters.USVString(reason)
+ }
+
+ // 1. If code is present, but is neither an integer equal to 1000 nor an
+ // integer in the range 3000 to 4999, inclusive, throw an
+ // "InvalidAccessError" DOMException.
+ if (code !== undefined) {
+ if (code !== 1000 && (code < 3000 || code > 4999)) {
+ throw new DOMException('invalid code', 'InvalidAccessError')
+ }
+ }
+
+ let reasonByteLength = 0
+
+ // 2. If reason is present, then run these substeps:
+ if (reason !== undefined) {
+ // 1. Let reasonBytes be the result of encoding reason.
+ // 2. If reasonBytes is longer than 123 bytes, then throw a
+ // "SyntaxError" DOMException.
+ reasonByteLength = Buffer.byteLength(reason)
+
+ if (reasonByteLength > 123) {
+ throw new DOMException(
+ `Reason must be less than 123 bytes; received ${reasonByteLength}`,
+ 'SyntaxError'
+ )
+ }
+ }
+
+ // 3. Run the first matching steps from the following list:
+ if (this[kReadyState] === WebSocket.CLOSING || this[kReadyState] === WebSocket.CLOSED) {
+ // If this's ready state is CLOSING (2) or CLOSED (3)
+ // Do nothing.
+ } else if (!isEstablished(this)) {
+ // If the WebSocket connection is not yet established
+ // Fail the WebSocket connection and set this's ready state
+ // to CLOSING (2).
+ failWebsocketConnection(this, 'Connection was closed before it was established.')
+ this[kReadyState] = WebSocket.CLOSING
+ } else if (!isClosing(this)) {
+ // If the WebSocket closing handshake has not yet been started
+ // Start the WebSocket closing handshake and set this's ready
+ // state to CLOSING (2).
+ // - If neither code nor reason is present, the WebSocket Close
+ // message must not have a body.
+ // - If code is present, then the status code to use in the
+ // WebSocket Close message must be the integer given by code.
+ // - If reason is also present, then reasonBytes must be
+ // provided in the Close message after the status code.
+
+ const frame = new WebsocketFrameSend()
+
+ // If neither code nor reason is present, the WebSocket Close
+ // message must not have a body.
+
+ // If code is present, then the status code to use in the
+ // WebSocket Close message must be the integer given by code.
+ if (code !== undefined && reason === undefined) {
+ frame.frameData = Buffer.allocUnsafe(2)
+ frame.frameData.writeUInt16BE(code, 0)
+ } else if (code !== undefined && reason !== undefined) {
+ // If reason is also present, then reasonBytes must be
+ // provided in the Close message after the status code.
+ frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength)
+ frame.frameData.writeUInt16BE(code, 0)
+ // the body MAY contain UTF-8-encoded data with value /reason/
+ frame.frameData.write(reason, 2, 'utf-8')
+ } else {
+ frame.frameData = emptyBuffer
+ }
+
+ /** @type {import('stream').Duplex} */
+ const socket = this[kResponse].socket
+
+ socket.write(frame.createFrame(opcodes.CLOSE), (err) => {
+ if (!err) {
+ this[kSentClose] = true
+ }
+ })
+
+ // Upon either sending or receiving a Close control frame, it is said
+ // that _The WebSocket Closing Handshake is Started_ and that the
+ // WebSocket connection is in the CLOSING state.
+ this[kReadyState] = states.CLOSING
+ } else {
+ // Otherwise
+ // Set this's ready state to CLOSING (2).
+ this[kReadyState] = WebSocket.CLOSING
+ }
+ }
+
+ /**
+ * @see https://websockets.spec.whatwg.org/#dom-websocket-send
+ * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data
+ */
+ send (data) {
+ webidl.brandCheck(this, WebSocket)
+
+ webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket.send' })
+
+ data = webidl.converters.WebSocketSendData(data)
+
+ // 1. If this's ready state is CONNECTING, then throw an
+ // "InvalidStateError" DOMException.
+ if (this[kReadyState] === WebSocket.CONNECTING) {
+ throw new DOMException('Sent before connected.', 'InvalidStateError')
+ }
+
+ // 2. Run the appropriate set of steps from the following list:
+ // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1
+ // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2
+
+ if (!isEstablished(this) || isClosing(this)) {
+ return
+ }
+
+ /** @type {import('stream').Duplex} */
+ const socket = this[kResponse].socket
+
+ // If data is a string
+ if (typeof data === 'string') {
+ // If the WebSocket connection is established and the WebSocket
+ // closing handshake has not yet started, then the user agent
+ // must send a WebSocket Message comprised of the data argument
+ // using a text frame opcode; if the data cannot be sent, e.g.
+ // because it would need to be buffered but the buffer is full,
+ // the user agent must flag the WebSocket as full and then close
+ // the WebSocket connection. Any invocation of this method with a
+ // string argument that does not throw an exception must increase
+ // the bufferedAmount attribute by the number of bytes needed to
+ // express the argument as UTF-8.
+
+ const value = Buffer.from(data)
+ const frame = new WebsocketFrameSend(value)
+ const buffer = frame.createFrame(opcodes.TEXT)
+
+ this.#bufferedAmount += value.byteLength
+ socket.write(buffer, () => {
+ this.#bufferedAmount -= value.byteLength
+ })
+ } else if (types.isArrayBuffer(data)) {
+ // If the WebSocket connection is established, and the WebSocket
+ // closing handshake has not yet started, then the user agent must
+ // send a WebSocket Message comprised of data using a binary frame
+ // opcode; if the data cannot be sent, e.g. because it would need
+ // to be buffered but the buffer is full, the user agent must flag
+ // the WebSocket as full and then close the WebSocket connection.
+ // The data to be sent is the data stored in the buffer described
+ // by the ArrayBuffer object. Any invocation of this method with an
+ // ArrayBuffer argument that does not throw an exception must
+ // increase the bufferedAmount attribute by the length of the
+ // ArrayBuffer in bytes.
+
+ const value = Buffer.from(data)
+ const frame = new WebsocketFrameSend(value)
+ const buffer = frame.createFrame(opcodes.BINARY)
+
+ this.#bufferedAmount += value.byteLength
+ socket.write(buffer, () => {
+ this.#bufferedAmount -= value.byteLength
+ })
+ } else if (ArrayBuffer.isView(data)) {
+ // If the WebSocket connection is established, and the WebSocket
+ // closing handshake has not yet started, then the user agent must
+ // send a WebSocket Message comprised of data using a binary frame
+ // opcode; if the data cannot be sent, e.g. because it would need to
+ // be buffered but the buffer is full, the user agent must flag the
+ // WebSocket as full and then close the WebSocket connection. The
+ // data to be sent is the data stored in the section of the buffer
+ // described by the ArrayBuffer object that data references. Any
+ // invocation of this method with this kind of argument that does
+ // not throw an exception must increase the bufferedAmount attribute
+ // by the length of data’s buffer in bytes.
+
+ const ab = Buffer.from(data, data.byteOffset, data.byteLength)
+
+ const frame = new WebsocketFrameSend(ab)
+ const buffer = frame.createFrame(opcodes.BINARY)
+
+ this.#bufferedAmount += ab.byteLength
+ socket.write(buffer, () => {
+ this.#bufferedAmount -= ab.byteLength
+ })
+ } else if (isBlobLike(data)) {
+ // If the WebSocket connection is established, and the WebSocket
+ // closing handshake has not yet started, then the user agent must
+ // send a WebSocket Message comprised of data using a binary frame
+ // opcode; if the data cannot be sent, e.g. because it would need to
+ // be buffered but the buffer is full, the user agent must flag the
+ // WebSocket as full and then close the WebSocket connection. The data
+ // to be sent is the raw data represented by the Blob object. Any
+ // invocation of this method with a Blob argument that does not throw
+ // an exception must increase the bufferedAmount attribute by the size
+ // of the Blob object’s raw data, in bytes.
+
+ const frame = new WebsocketFrameSend()
+
+ data.arrayBuffer().then((ab) => {
+ const value = Buffer.from(ab)
+ frame.frameData = value
+ const buffer = frame.createFrame(opcodes.BINARY)
+
+ this.#bufferedAmount += value.byteLength
+ socket.write(buffer, () => {
+ this.#bufferedAmount -= value.byteLength
+ })
+ })
+ }
+ }
+
+ get readyState () {
+ webidl.brandCheck(this, WebSocket)
+
+ // The readyState getter steps are to return this's ready state.
+ return this[kReadyState]
+ }
+
+ get bufferedAmount () {
+ webidl.brandCheck(this, WebSocket)
+
+ return this.#bufferedAmount
+ }
+
+ get url () {
+ webidl.brandCheck(this, WebSocket)
+
+ // The url getter steps are to return this's url, serialized.
+ return URLSerializer(this[kWebSocketURL])
+ }
+
+ get extensions () {
+ webidl.brandCheck(this, WebSocket)
+
+ return this.#extensions
+ }
+
+ get protocol () {
+ webidl.brandCheck(this, WebSocket)
+
+ return this.#protocol
+ }
+
+ get onopen () {
+ webidl.brandCheck(this, WebSocket)
+
+ return this.#events.open
+ }
+
+ set onopen (fn) {
+ webidl.brandCheck(this, WebSocket)
+
+ if (this.#events.open) {
+ this.removeEventListener('open', this.#events.open)
+ }
+
+ if (typeof fn === 'function') {
+ this.#events.open = fn
+ this.addEventListener('open', fn)
+ } else {
+ this.#events.open = null
+ }
+ }
+
+ get onerror () {
+ webidl.brandCheck(this, WebSocket)
+
+ return this.#events.error
+ }
+
+ set onerror (fn) {
+ webidl.brandCheck(this, WebSocket)
+
+ if (this.#events.error) {
+ this.removeEventListener('error', this.#events.error)
+ }
+
+ if (typeof fn === 'function') {
+ this.#events.error = fn
+ this.addEventListener('error', fn)
+ } else {
+ this.#events.error = null
+ }
+ }
+
+ get onclose () {
+ webidl.brandCheck(this, WebSocket)
+
+ return this.#events.close
+ }
+
+ set onclose (fn) {
+ webidl.brandCheck(this, WebSocket)
+
+ if (this.#events.close) {
+ this.removeEventListener('close', this.#events.close)
+ }
+
+ if (typeof fn === 'function') {
+ this.#events.close = fn
+ this.addEventListener('close', fn)
+ } else {
+ this.#events.close = null
+ }
+ }
+
+ get onmessage () {
+ webidl.brandCheck(this, WebSocket)
+
+ return this.#events.message
+ }
+
+ set onmessage (fn) {
+ webidl.brandCheck(this, WebSocket)
+
+ if (this.#events.message) {
+ this.removeEventListener('message', this.#events.message)
+ }
+
+ if (typeof fn === 'function') {
+ this.#events.message = fn
+ this.addEventListener('message', fn)
+ } else {
+ this.#events.message = null
+ }
+ }
+
+ get binaryType () {
+ webidl.brandCheck(this, WebSocket)
+
+ return this[kBinaryType]
+ }
+
+ set binaryType (type) {
+ webidl.brandCheck(this, WebSocket)
+
+ if (type !== 'blob' && type !== 'arraybuffer') {
+ this[kBinaryType] = 'blob'
+ } else {
+ this[kBinaryType] = type
+ }
+ }
+
+ /**
+ * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol
+ */
+ #onConnectionEstablished (response) {
+ // processResponse is called when the "response’s header list has been received and initialized."
+ // once this happens, the connection is open
+ this[kResponse] = response
+
+ const parser = new ByteParser(this)
+ parser.on('drain', function onParserDrain () {
+ this.ws[kResponse].socket.resume()
+ })
+
+ response.socket.ws = this
+ this[kByteParser] = parser
+
+ // 1. Change the ready state to OPEN (1).
+ this[kReadyState] = states.OPEN
+
+ // 2. Change the extensions attribute’s value to the extensions in use, if
+ // it is not the null value.
+ // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1
+ const extensions = response.headersList.get('sec-websocket-extensions')
+
+ if (extensions !== null) {
+ this.#extensions = extensions
+ }
+
+ // 3. Change the protocol attribute’s value to the subprotocol in use, if
+ // it is not the null value.
+ // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9
+ const protocol = response.headersList.get('sec-websocket-protocol')
+
+ if (protocol !== null) {
+ this.#protocol = protocol
+ }
+
+ // 4. Fire an event named open at the WebSocket object.
+ fireEvent('open', this)
+ }
+}
+
+// https://websockets.spec.whatwg.org/#dom-websocket-connecting
+WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING
+// https://websockets.spec.whatwg.org/#dom-websocket-open
+WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN
+// https://websockets.spec.whatwg.org/#dom-websocket-closing
+WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING
+// https://websockets.spec.whatwg.org/#dom-websocket-closed
+WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED
+
+Object.defineProperties(WebSocket.prototype, {
+ CONNECTING: staticPropertyDescriptors,
+ OPEN: staticPropertyDescriptors,
+ CLOSING: staticPropertyDescriptors,
+ CLOSED: staticPropertyDescriptors,
+ url: kEnumerableProperty,
+ readyState: kEnumerableProperty,
+ bufferedAmount: kEnumerableProperty,
+ onopen: kEnumerableProperty,
+ onerror: kEnumerableProperty,
+ onclose: kEnumerableProperty,
+ close: kEnumerableProperty,
+ onmessage: kEnumerableProperty,
+ binaryType: kEnumerableProperty,
+ send: kEnumerableProperty,
+ extensions: kEnumerableProperty,
+ protocol: kEnumerableProperty,
+ [Symbol.toStringTag]: {
+ value: 'WebSocket',
+ writable: false,
+ enumerable: false,
+ configurable: true
+ }
+})
+
+Object.defineProperties(WebSocket, {
+ CONNECTING: staticPropertyDescriptors,
+ OPEN: staticPropertyDescriptors,
+ CLOSING: staticPropertyDescriptors,
+ CLOSED: staticPropertyDescriptors
+})
+
+webidl.converters['sequence<DOMString>'] = webidl.sequenceConverter(
+ webidl.converters.DOMString
+)
+
+webidl.converters['DOMString or sequence<DOMString>'] = function (V) {
+ if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) {
+ return webidl.converters['sequence<DOMString>'](V)
+ }
+
+ return webidl.converters.DOMString(V)
+}
+
+// This implements the propsal made in https://github.com/whatwg/websockets/issues/42
+webidl.converters.WebSocketInit = webidl.dictionaryConverter([
+ {
+ key: 'protocols',
+ converter: webidl.converters['DOMString or sequence<DOMString>'],
+ get defaultValue () {
+ return []
+ }
+ },
+ {
+ key: 'dispatcher',
+ converter: (V) => V,
+ get defaultValue () {
+ return getGlobalDispatcher()
+ }
+ },
+ {
+ key: 'headers',
+ converter: webidl.nullableConverter(webidl.converters.HeadersInit)
+ }
+])
+
+webidl.converters['DOMString or sequence<DOMString> or WebSocketInit'] = function (V) {
+ if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) {
+ return webidl.converters.WebSocketInit(V)
+ }
+
+ return { protocols: webidl.converters['DOMString or sequence<DOMString>'](V) }
+}
+
+webidl.converters.WebSocketSendData = function (V) {
+ if (webidl.util.Type(V) === 'Object') {
+ if (isBlobLike(V)) {
+ return webidl.converters.Blob(V, { strict: false })
+ }
+
+ if (ArrayBuffer.isView(V) || types.isAnyArrayBuffer(V)) {
+ return webidl.converters.BufferSource(V)
+ }
+ }
+
+ return webidl.converters.USVString(V)
+}
+
+module.exports = {
+ WebSocket
+}
diff --git a/node_modules/undici/package.json b/node_modules/undici/package.json
new file mode 100644
index 0000000..49b657f
--- /dev/null
+++ b/node_modules/undici/package.json
@@ -0,0 +1,136 @@
+{
+ "name": "undici",
+ "version": "5.22.1",
+ "description": "An HTTP/1.1 client, written from scratch for Node.js",
+ "homepage": "https://undici.nodejs.org",
+ "bugs": {
+ "url": "https://github.com/nodejs/undici/issues"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/nodejs/undici.git"
+ },
+ "license": "MIT",
+ "author": "Matteo Collina <hello@matteocollina.com>",
+ "contributors": [
+ {
+ "name": "Robert Nagy",
+ "url": "https://github.com/ronag",
+ "author": true
+ }
+ ],
+ "keywords": [
+ "fetch",
+ "http",
+ "https",
+ "promise",
+ "request",
+ "curl",
+ "wget",
+ "xhr",
+ "whatwg"
+ ],
+ "main": "index.js",
+ "types": "index.d.ts",
+ "files": [
+ "*.d.ts",
+ "index.js",
+ "index-fetch.js",
+ "lib",
+ "types",
+ "docs"
+ ],
+ "scripts": {
+ "build:node": "npx esbuild@0.14.38 index-fetch.js --bundle --platform=node --outfile=undici-fetch.js",
+ "prebuild:wasm": "node build/wasm.js --prebuild",
+ "build:wasm": "node build/wasm.js --docker",
+ "lint": "standard | snazzy",
+ "lint:fix": "standard --fix | snazzy",
+ "test": "npm run test:tap && npm run test:node-fetch && npm run test:fetch && npm run test:cookies && npm run test:wpt && npm run test:websocket && npm run test:jest && npm run test:typescript",
+ "test:cookies": "node scripts/verifyVersion 16 || tap test/cookie/*.js",
+ "test:node-fetch": "node scripts/verifyVersion.js 16 || mocha --exit test/node-fetch",
+ "test:fetch": "node scripts/verifyVersion.js 16 || (npm run build:node && tap --expose-gc test/fetch/*.js && tap test/webidl/*.js)",
+ "test:jest": "node scripts/verifyVersion.js 14 || jest",
+ "test:tap": "tap test/*.js test/diagnostics-channel/*.js",
+ "test:tdd": "tap test/*.js test/diagnostics-channel/*.js -w",
+ "test:typescript": "node scripts/verifyVersion.js 14 || tsd && tsc --skipLibCheck test/imports/undici-import.ts",
+ "test:websocket": "node scripts/verifyVersion.js 18 || tap test/websocket/*.js",
+ "test:wpt": "node scripts/verifyVersion 18 || (node test/wpt/start-fetch.mjs && node test/wpt/start-FileAPI.mjs && node test/wpt/start-mimesniff.mjs && node test/wpt/start-xhr.mjs && node --no-warnings test/wpt/start-websockets.mjs)",
+ "coverage": "nyc --reporter=text --reporter=html npm run test",
+ "coverage:ci": "nyc --reporter=lcov npm run test",
+ "bench": "PORT=3042 concurrently -k -s first npm:bench:server npm:bench:run",
+ "bench:server": "node benchmarks/server.js",
+ "prebench:run": "node benchmarks/wait.js",
+ "bench:run": "CONNECTIONS=1 node benchmarks/benchmark.js; CONNECTIONS=50 node benchmarks/benchmark.js",
+ "serve:website": "docsify serve .",
+ "prepare": "husky install",
+ "fuzz": "jsfuzz test/fuzzing/fuzz.js corpus"
+ },
+ "devDependencies": {
+ "@sinonjs/fake-timers": "^10.0.2",
+ "@types/node": "^18.0.3",
+ "abort-controller": "^3.0.0",
+ "atomic-sleep": "^1.0.0",
+ "chai": "^4.3.4",
+ "chai-as-promised": "^7.1.1",
+ "chai-iterator": "^3.0.2",
+ "chai-string": "^1.5.0",
+ "concurrently": "^8.0.1",
+ "cronometro": "^1.0.5",
+ "delay": "^5.0.0",
+ "dns-packet": "^5.4.0",
+ "docsify-cli": "^4.4.3",
+ "form-data": "^4.0.0",
+ "formdata-node": "^4.3.1",
+ "https-pem": "^3.0.0",
+ "husky": "^8.0.1",
+ "import-fresh": "^3.3.0",
+ "jest": "^29.0.2",
+ "jsdom": "^21.1.0",
+ "jsfuzz": "^1.0.15",
+ "mocha": "^10.0.0",
+ "p-timeout": "^3.2.0",
+ "pre-commit": "^1.2.2",
+ "proxy": "^1.0.2",
+ "proxyquire": "^2.1.3",
+ "sinon": "^15.0.0",
+ "snazzy": "^9.0.0",
+ "standard": "^17.0.0",
+ "table": "^6.8.0",
+ "tap": "^16.1.0",
+ "tsd": "^0.28.1",
+ "typescript": "^5.0.2",
+ "wait-on": "^7.0.1",
+ "ws": "^8.11.0"
+ },
+ "engines": {
+ "node": ">=14.0"
+ },
+ "standard": {
+ "env": [
+ "mocha"
+ ],
+ "ignore": [
+ "lib/llhttp/constants.js",
+ "lib/llhttp/utils.js",
+ "test/wpt/tests"
+ ]
+ },
+ "tsd": {
+ "directory": "test/types",
+ "compilerOptions": {
+ "esModuleInterop": true,
+ "lib": [
+ "esnext"
+ ]
+ }
+ },
+ "jest": {
+ "testMatch": [
+ "<rootDir>/test/jest/**"
+ ]
+ },
+ "dependencies": {
+ "busboy": "^1.6.0"
+ }
+}
diff --git a/node_modules/undici/types/agent.d.ts b/node_modules/undici/types/agent.d.ts
new file mode 100644
index 0000000..0813735
--- /dev/null
+++ b/node_modules/undici/types/agent.d.ts
@@ -0,0 +1,31 @@
+import { URL } from 'url'
+import Pool from './pool'
+import Dispatcher from "./dispatcher";
+
+export default Agent
+
+declare class Agent extends Dispatcher{
+ constructor(opts?: Agent.Options)
+ /** `true` after `dispatcher.close()` has been called. */
+ closed: boolean;
+ /** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */
+ destroyed: boolean;
+ /** Dispatches a request. */
+ dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean;
+}
+
+declare namespace Agent {
+ export interface Options extends Pool.Options {
+ /** Default: `(origin, opts) => new Pool(origin, opts)`. */
+ factory?(origin: URL, opts: Object): Dispatcher;
+ /** Integer. Default: `0` */
+ maxRedirections?: number;
+
+ interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options["interceptors"]
+ }
+
+ export interface DispatchOptions extends Dispatcher.DispatchOptions {
+ /** Integer. */
+ maxRedirections?: number;
+ }
+}
diff --git a/node_modules/undici/types/api.d.ts b/node_modules/undici/types/api.d.ts
new file mode 100644
index 0000000..400341d
--- /dev/null
+++ b/node_modules/undici/types/api.d.ts
@@ -0,0 +1,43 @@
+import { URL, UrlObject } from 'url'
+import { Duplex } from 'stream'
+import Dispatcher from './dispatcher'
+
+export {
+ request,
+ stream,
+ pipeline,
+ connect,
+ upgrade,
+}
+
+/** Performs an HTTP request. */
+declare function request(
+ url: string | URL | UrlObject,
+ options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
+): Promise<Dispatcher.ResponseData>;
+
+/** A faster version of `request`. */
+declare function stream(
+ url: string | URL | UrlObject,
+ options: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path'>,
+ factory: Dispatcher.StreamFactory
+): Promise<Dispatcher.StreamData>;
+
+/** For easy use with `stream.pipeline`. */
+declare function pipeline(
+ url: string | URL | UrlObject,
+ options: { dispatcher?: Dispatcher } & Omit<Dispatcher.PipelineOptions, 'origin' | 'path'>,
+ handler: Dispatcher.PipelineHandler
+): Duplex;
+
+/** Starts two-way communications with the requested resource. */
+declare function connect(
+ url: string | URL | UrlObject,
+ options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions, 'origin' | 'path'>
+): Promise<Dispatcher.ConnectData>;
+
+/** Upgrade to a different protocol. */
+declare function upgrade(
+ url: string | URL | UrlObject,
+ options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.UpgradeOptions, 'origin' | 'path'>
+): Promise<Dispatcher.UpgradeData>;
diff --git a/node_modules/undici/types/balanced-pool.d.ts b/node_modules/undici/types/balanced-pool.d.ts
new file mode 100644
index 0000000..d1e9375
--- /dev/null
+++ b/node_modules/undici/types/balanced-pool.d.ts
@@ -0,0 +1,18 @@
+import Pool from './pool'
+import Dispatcher from './dispatcher'
+import { URL } from 'url'
+
+export default BalancedPool
+
+declare class BalancedPool extends Dispatcher {
+ constructor(url: string | string[] | URL | URL[], options?: Pool.Options);
+
+ addUpstream(upstream: string | URL): BalancedPool;
+ removeUpstream(upstream: string | URL): BalancedPool;
+ upstreams: Array<string>;
+
+ /** `true` after `pool.close()` has been called. */
+ closed: boolean;
+ /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
+ destroyed: boolean;
+}
diff --git a/node_modules/undici/types/cache.d.ts b/node_modules/undici/types/cache.d.ts
new file mode 100644
index 0000000..4c33335
--- /dev/null
+++ b/node_modules/undici/types/cache.d.ts
@@ -0,0 +1,36 @@
+import type { RequestInfo, Response, Request } from './fetch'
+
+export interface CacheStorage {
+ match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>,
+ has (cacheName: string): Promise<boolean>,
+ open (cacheName: string): Promise<Cache>,
+ delete (cacheName: string): Promise<boolean>,
+ keys (): Promise<string[]>
+}
+
+declare const CacheStorage: {
+ prototype: CacheStorage
+ new(): CacheStorage
+}
+
+export interface Cache {
+ match (request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>,
+ matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Response[]>,
+ add (request: RequestInfo): Promise<undefined>,
+ addAll (requests: RequestInfo[]): Promise<undefined>,
+ put (request: RequestInfo, response: Response): Promise<undefined>,
+ delete (request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>,
+ keys (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Request[]>
+}
+
+export interface CacheQueryOptions {
+ ignoreSearch?: boolean,
+ ignoreMethod?: boolean,
+ ignoreVary?: boolean
+}
+
+export interface MultiCacheQueryOptions extends CacheQueryOptions {
+ cacheName?: string
+}
+
+export declare const caches: CacheStorage
diff --git a/node_modules/undici/types/client.d.ts b/node_modules/undici/types/client.d.ts
new file mode 100644
index 0000000..56074a1
--- /dev/null
+++ b/node_modules/undici/types/client.d.ts
@@ -0,0 +1,88 @@
+import { URL } from 'url'
+import { TlsOptions } from 'tls'
+import Dispatcher from './dispatcher'
+import DispatchInterceptor from './dispatcher'
+import buildConnector from "./connector";
+
+/**
+ * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
+ */
+export class Client extends Dispatcher {
+ constructor(url: string | URL, options?: Client.Options);
+ /** Property to get and set the pipelining factor. */
+ pipelining: number;
+ /** `true` after `client.close()` has been called. */
+ closed: boolean;
+ /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
+ destroyed: boolean;
+}
+
+export declare namespace Client {
+ export interface OptionsInterceptors {
+ Client: readonly DispatchInterceptor[];
+ }
+ export interface Options {
+ /** TODO */
+ interceptors?: OptionsInterceptors;
+ /** The maximum length of request headers in bytes. Default: `16384` (16KiB). */
+ maxHeaderSize?: number;
+ /** The amount of time the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
+ headersTimeout?: number;
+ /** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */
+ socketTimeout?: never;
+ /** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */
+ requestTimeout?: never;
+ /** TODO */
+ connectTimeout?: number;
+ /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
+ bodyTimeout?: number;
+ /** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */
+ idleTimeout?: never;
+ /** @deprecated unsupported keepAlive, use pipelining=0 instead */
+ keepAlive?: never;
+ /** the timeout after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */
+ keepAliveTimeout?: number;
+ /** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */
+ maxKeepAliveTimeout?: never;
+ /** the maximum allowed `idleTimeout` when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */
+ keepAliveMaxTimeout?: number;
+ /** A number subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
+ keepAliveTimeoutThreshold?: number;
+ /** TODO */
+ socketPath?: string;
+ /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */
+ pipelining?: number;
+ /** @deprecated use the connect option instead */
+ tls?: never;
+ /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
+ strictContentLength?: boolean;
+ /** TODO */
+ maxCachedSessions?: number;
+ /** TODO */
+ maxRedirections?: number;
+ /** TODO */
+ connect?: buildConnector.BuildOptions | buildConnector.connector;
+ /** TODO */
+ maxRequestsPerClient?: number;
+ /** TODO */
+ localAddress?: string;
+ /** Max response body size in bytes, -1 is disabled */
+ maxResponseSize?: number;
+ /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
+ autoSelectFamily?: boolean;
+ /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
+ autoSelectFamilyAttemptTimeout?: number;
+ }
+ export interface SocketInfo {
+ localAddress?: string
+ localPort?: number
+ remoteAddress?: string
+ remotePort?: number
+ remoteFamily?: string
+ timeout?: number
+ bytesWritten?: number
+ bytesRead?: number
+ }
+}
+
+export default Client;
diff --git a/node_modules/undici/types/connector.d.ts b/node_modules/undici/types/connector.d.ts
new file mode 100644
index 0000000..847284a
--- /dev/null
+++ b/node_modules/undici/types/connector.d.ts
@@ -0,0 +1,33 @@
+import { TLSSocket, ConnectionOptions } from 'tls'
+import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from 'net'
+
+export default buildConnector
+declare function buildConnector (options?: buildConnector.BuildOptions): buildConnector.connector
+
+declare namespace buildConnector {
+ export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & {
+ maxCachedSessions?: number | null;
+ socketPath?: string | null;
+ timeout?: number | null;
+ port?: number;
+ keepAlive?: boolean | null;
+ keepAliveInitialDelay?: number | null;
+ }
+
+ export interface Options {
+ hostname: string
+ host?: string
+ protocol: string
+ port: string
+ servername?: string
+ localAddress?: string | null
+ httpSocket?: Socket
+ }
+
+ export type Callback = (...args: CallbackArgs) => void
+ type CallbackArgs = [null, Socket | TLSSocket] | [Error, null]
+
+ export interface connector {
+ (options: buildConnector.Options, callback: buildConnector.Callback): void
+ }
+}
diff --git a/node_modules/undici/types/content-type.d.ts b/node_modules/undici/types/content-type.d.ts
new file mode 100644
index 0000000..f2a87f1
--- /dev/null
+++ b/node_modules/undici/types/content-type.d.ts
@@ -0,0 +1,21 @@
+/// <reference types="node" />
+
+interface MIMEType {
+ type: string
+ subtype: string
+ parameters: Map<string, string>
+ essence: string
+}
+
+/**
+ * Parse a string to a {@link MIMEType} object. Returns `failure` if the string
+ * couldn't be parsed.
+ * @see https://mimesniff.spec.whatwg.org/#parse-a-mime-type
+ */
+export function parseMIMEType (input: string): 'failure' | MIMEType
+
+/**
+ * Convert a MIMEType object to a string.
+ * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type
+ */
+export function serializeAMimeType (mimeType: MIMEType): string
diff --git a/node_modules/undici/types/cookies.d.ts b/node_modules/undici/types/cookies.d.ts
new file mode 100644
index 0000000..aa38cae
--- /dev/null
+++ b/node_modules/undici/types/cookies.d.ts
@@ -0,0 +1,28 @@
+/// <reference types="node" />
+
+import type { Headers } from './fetch'
+
+export interface Cookie {
+ name: string
+ value: string
+ expires?: Date | number
+ maxAge?: number
+ domain?: string
+ path?: string
+ secure?: boolean
+ httpOnly?: boolean
+ sameSite?: 'Strict' | 'Lax' | 'None'
+ unparsed?: string[]
+}
+
+export function deleteCookie (
+ headers: Headers,
+ name: string,
+ attributes?: { name?: string, domain?: string }
+): void
+
+export function getCookies (headers: Headers): Record<string, string>
+
+export function getSetCookies (headers: Headers): Cookie[]
+
+export function setCookie (headers: Headers, cookie: Cookie): void
diff --git a/node_modules/undici/types/diagnostics-channel.d.ts b/node_modules/undici/types/diagnostics-channel.d.ts
new file mode 100644
index 0000000..85d4482
--- /dev/null
+++ b/node_modules/undici/types/diagnostics-channel.d.ts
@@ -0,0 +1,67 @@
+import { Socket } from "net";
+import { URL } from "url";
+import Connector from "./connector";
+import Dispatcher from "./dispatcher";
+
+declare namespace DiagnosticsChannel {
+ interface Request {
+ origin?: string | URL;
+ completed: boolean;
+ method?: Dispatcher.HttpMethod;
+ path: string;
+ headers: string;
+ addHeader(key: string, value: string): Request;
+ }
+ interface Response {
+ statusCode: number;
+ statusText: string;
+ headers: Array<Buffer>;
+ }
+ type Error = unknown;
+ interface ConnectParams {
+ host: URL["host"];
+ hostname: URL["hostname"];
+ protocol: URL["protocol"];
+ port: URL["port"];
+ servername: string | null;
+ }
+ type Connector = Connector.connector;
+ export interface RequestCreateMessage {
+ request: Request;
+ }
+ export interface RequestBodySentMessage {
+ request: Request;
+ }
+ export interface RequestHeadersMessage {
+ request: Request;
+ response: Response;
+ }
+ export interface RequestTrailersMessage {
+ request: Request;
+ trailers: Array<Buffer>;
+ }
+ export interface RequestErrorMessage {
+ request: Request;
+ error: Error;
+ }
+ export interface ClientSendHeadersMessage {
+ request: Request;
+ headers: string;
+ socket: Socket;
+ }
+ export interface ClientBeforeConnectMessage {
+ connectParams: ConnectParams;
+ connector: Connector;
+ }
+ export interface ClientConnectedMessage {
+ socket: Socket;
+ connectParams: ConnectParams;
+ connector: Connector;
+ }
+ export interface ClientConnectErrorMessage {
+ error: Error;
+ socket: Socket;
+ connectParams: ConnectParams;
+ connector: Connector;
+ }
+}
diff --git a/node_modules/undici/types/dispatcher.d.ts b/node_modules/undici/types/dispatcher.d.ts
new file mode 100644
index 0000000..4125203
--- /dev/null
+++ b/node_modules/undici/types/dispatcher.d.ts
@@ -0,0 +1,239 @@
+import { URL } from 'url'
+import { Duplex, Readable, Writable } from 'stream'
+import { EventEmitter } from 'events'
+import { Blob } from 'buffer'
+import { IncomingHttpHeaders } from './header'
+import BodyReadable from './readable'
+import { FormData } from './formdata'
+import Errors from './errors'
+
+type AbortSignal = unknown;
+
+export default Dispatcher
+
+/** Dispatcher is the core API used to dispatch requests. */
+declare class Dispatcher extends EventEmitter {
+ /** Dispatches a request. This API is expected to evolve through semver-major versions and is less stable than the preceding higher level APIs. It is primarily intended for library developers who implement higher level APIs on top of this. */
+ dispatch(options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean;
+ /** Starts two-way communications with the requested resource. */
+ connect(options: Dispatcher.ConnectOptions): Promise<Dispatcher.ConnectData>;
+ connect(options: Dispatcher.ConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void): void;
+ /** Performs an HTTP request. */
+ request(options: Dispatcher.RequestOptions): Promise<Dispatcher.ResponseData>;
+ request(options: Dispatcher.RequestOptions, callback: (err: Error | null, data: Dispatcher.ResponseData) => void): void;
+ /** For easy use with `stream.pipeline`. */
+ pipeline(options: Dispatcher.PipelineOptions, handler: Dispatcher.PipelineHandler): Duplex;
+ /** A faster version of `Dispatcher.request`. */
+ stream(options: Dispatcher.RequestOptions, factory: Dispatcher.StreamFactory): Promise<Dispatcher.StreamData>;
+ stream(options: Dispatcher.RequestOptions, factory: Dispatcher.StreamFactory, callback: (err: Error | null, data: Dispatcher.StreamData) => void): void;
+ /** Upgrade to a different protocol. */
+ upgrade(options: Dispatcher.UpgradeOptions): Promise<Dispatcher.UpgradeData>;
+ upgrade(options: Dispatcher.UpgradeOptions, callback: (err: Error | null, data: Dispatcher.UpgradeData) => void): void;
+ /** Closes the client and gracefully waits for enqueued requests to complete before invoking the callback (or returning a promise if no callback is provided). */
+ close(): Promise<void>;
+ close(callback: () => void): void;
+ /** Destroy the client abruptly with the given err. All the pending and running requests will be asynchronously aborted and error. Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided). Since this operation is asynchronously dispatched there might still be some progress on dispatched requests. */
+ destroy(): Promise<void>;
+ destroy(err: Error | null): Promise<void>;
+ destroy(callback: () => void): void;
+ destroy(err: Error | null, callback: () => void): void;
+
+ on(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
+ on(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
+ on(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
+ on(eventName: 'drain', callback: (origin: URL) => void): this;
+
+
+ once(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
+ once(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
+ once(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
+ once(eventName: 'drain', callback: (origin: URL) => void): this;
+
+
+ off(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
+ off(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
+ off(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
+ off(eventName: 'drain', callback: (origin: URL) => void): this;
+
+
+ addListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
+ addListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
+ addListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
+ addListener(eventName: 'drain', callback: (origin: URL) => void): this;
+
+ removeListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
+ removeListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
+ removeListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
+ removeListener(eventName: 'drain', callback: (origin: URL) => void): this;
+
+ prependListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
+ prependListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
+ prependListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
+ prependListener(eventName: 'drain', callback: (origin: URL) => void): this;
+
+ prependOnceListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
+ prependOnceListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
+ prependOnceListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
+ prependOnceListener(eventName: 'drain', callback: (origin: URL) => void): this;
+
+ listeners(eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[]
+ listeners(eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
+ listeners(eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
+ listeners(eventName: 'drain'): ((origin: URL) => void)[];
+
+ rawListeners(eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[]
+ rawListeners(eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
+ rawListeners(eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
+ rawListeners(eventName: 'drain'): ((origin: URL) => void)[];
+
+ emit(eventName: 'connect', origin: URL, targets: readonly Dispatcher[]): boolean;
+ emit(eventName: 'disconnect', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
+ emit(eventName: 'connectionError', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
+ emit(eventName: 'drain', origin: URL): boolean;
+}
+
+declare namespace Dispatcher {
+ export interface DispatchOptions {
+ origin?: string | URL;
+ path: string;
+ method: HttpMethod;
+ /** Default: `null` */
+ body?: string | Buffer | Uint8Array | Readable | null | FormData;
+ /** Default: `null` */
+ headers?: IncomingHttpHeaders | string[] | null;
+ /** Query string params to be embedded in the request URL. Default: `null` */
+ query?: Record<string, any>;
+ /** Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline have completed. Default: `true` if `method` is `HEAD` or `GET`. */
+ idempotent?: boolean;
+ /** Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. */
+ blocking?: boolean;
+ /** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */
+ upgrade?: boolean | string | null;
+ /** The amount of time the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. */
+ headersTimeout?: number | null;
+ /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 300 seconds. */
+ bodyTimeout?: number | null;
+ /** Whether the request should stablish a keep-alive or not. Default `false` */
+ reset?: boolean;
+ /** Whether Undici should throw an error upon receiving a 4xx or 5xx response from the server. Defaults to false */
+ throwOnError?: boolean;
+ }
+ export interface ConnectOptions {
+ path: string;
+ /** Default: `null` */
+ headers?: IncomingHttpHeaders | string[] | null;
+ /** Default: `null` */
+ signal?: AbortSignal | EventEmitter | null;
+ /** This argument parameter is passed through to `ConnectData` */
+ opaque?: unknown;
+ /** Default: 0 */
+ maxRedirections?: number;
+ /** Default: `null` */
+ responseHeader?: 'raw' | null;
+ }
+ export interface RequestOptions extends DispatchOptions {
+ /** Default: `null` */
+ opaque?: unknown;
+ /** Default: `null` */
+ signal?: AbortSignal | EventEmitter | null;
+ /** Default: 0 */
+ maxRedirections?: number;
+ /** Default: `null` */
+ onInfo?: (info: { statusCode: number, headers: Record<string, string | string[]> }) => void;
+ /** Default: `null` */
+ responseHeader?: 'raw' | null;
+ /** Default: `64 KiB` */
+ highWaterMark?: number;
+ }
+ export interface PipelineOptions extends RequestOptions {
+ /** `true` if the `handler` will return an object stream. Default: `false` */
+ objectMode?: boolean;
+ }
+ export interface UpgradeOptions {
+ path: string;
+ /** Default: `'GET'` */
+ method?: string;
+ /** Default: `null` */
+ headers?: IncomingHttpHeaders | string[] | null;
+ /** A string of comma separated protocols, in descending preference order. Default: `'Websocket'` */
+ protocol?: string;
+ /** Default: `null` */
+ signal?: AbortSignal | EventEmitter | null;
+ /** Default: 0 */
+ maxRedirections?: number;
+ /** Default: `null` */
+ responseHeader?: 'raw' | null;
+ }
+ export interface ConnectData {
+ statusCode: number;
+ headers: IncomingHttpHeaders;
+ socket: Duplex;
+ opaque: unknown;
+ }
+ export interface ResponseData {
+ statusCode: number;
+ headers: IncomingHttpHeaders;
+ body: BodyReadable & BodyMixin;
+ trailers: Record<string, string>;
+ opaque: unknown;
+ context: object;
+ }
+ export interface PipelineHandlerData {
+ statusCode: number;
+ headers: IncomingHttpHeaders;
+ opaque: unknown;
+ body: BodyReadable;
+ context: object;
+ }
+ export interface StreamData {
+ opaque: unknown;
+ trailers: Record<string, string>;
+ }
+ export interface UpgradeData {
+ headers: IncomingHttpHeaders;
+ socket: Duplex;
+ opaque: unknown;
+ }
+ export interface StreamFactoryData {
+ statusCode: number;
+ headers: IncomingHttpHeaders;
+ opaque: unknown;
+ context: object;
+ }
+ export type StreamFactory = (data: StreamFactoryData) => Writable;
+ export interface DispatchHandlers {
+ /** Invoked before request is dispatched on socket. May be invoked multiple times when a request is retried when the request at the head of the pipeline fails. */
+ onConnect?(abort: () => void): void;
+ /** Invoked when an error has occurred. */
+ onError?(err: Error): void;
+ /** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */
+ onUpgrade?(statusCode: number, headers: Buffer[] | string[] | null, socket: Duplex): void;
+ /** Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. */
+ onHeaders?(statusCode: number, headers: Buffer[] | string[] | null, resume: () => void): boolean;
+ /** Invoked when response payload data is received. */
+ onData?(chunk: Buffer): boolean;
+ /** Invoked when response payload and trailers have been received and the request has completed. */
+ onComplete?(trailers: string[] | null): void;
+ /** Invoked when a body chunk is sent to the server. May be invoked multiple times for chunked requests */
+ onBodySent?(chunkSize: number, totalBytesSent: number): void;
+ }
+ export type PipelineHandler = (data: PipelineHandlerData) => Readable;
+ export type HttpMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
+
+ /**
+ * @link https://fetch.spec.whatwg.org/#body-mixin
+ */
+ interface BodyMixin {
+ readonly body?: never; // throws on node v16.6.0
+ readonly bodyUsed: boolean;
+ arrayBuffer(): Promise<ArrayBuffer>;
+ blob(): Promise<Blob>;
+ formData(): Promise<never>;
+ json(): Promise<any>;
+ text(): Promise<string>;
+ }
+
+ export interface DispatchInterceptor {
+ (dispatch: Dispatcher['dispatch']): Dispatcher['dispatch']
+ }
+}
diff --git a/node_modules/undici/types/errors.d.ts b/node_modules/undici/types/errors.d.ts
new file mode 100644
index 0000000..7923ddd
--- /dev/null
+++ b/node_modules/undici/types/errors.d.ts
@@ -0,0 +1,128 @@
+import { IncomingHttpHeaders } from "./header";
+import Client from './client'
+
+export default Errors
+
+declare namespace Errors {
+ export class UndiciError extends Error {
+ name: string;
+ code: string;
+ }
+
+ /** Connect timeout error. */
+ export class ConnectTimeoutError extends UndiciError {
+ name: 'ConnectTimeoutError';
+ code: 'UND_ERR_CONNECT_TIMEOUT';
+ }
+
+ /** A header exceeds the `headersTimeout` option. */
+ export class HeadersTimeoutError extends UndiciError {
+ name: 'HeadersTimeoutError';
+ code: 'UND_ERR_HEADERS_TIMEOUT';
+ }
+
+ /** Headers overflow error. */
+ export class HeadersOverflowError extends UndiciError {
+ name: 'HeadersOverflowError'
+ code: 'UND_ERR_HEADERS_OVERFLOW'
+ }
+
+ /** A body exceeds the `bodyTimeout` option. */
+ export class BodyTimeoutError extends UndiciError {
+ name: 'BodyTimeoutError';
+ code: 'UND_ERR_BODY_TIMEOUT';
+ }
+
+ export class ResponseStatusCodeError extends UndiciError {
+ constructor (
+ message?: string,
+ statusCode?: number,
+ headers?: IncomingHttpHeaders | string[] | null,
+ body?: null | Record<string, any> | string
+ );
+ name: 'ResponseStatusCodeError';
+ code: 'UND_ERR_RESPONSE_STATUS_CODE';
+ body: null | Record<string, any> | string
+ status: number
+ statusCode: number
+ headers: IncomingHttpHeaders | string[] | null;
+ }
+
+ /** Passed an invalid argument. */
+ export class InvalidArgumentError extends UndiciError {
+ name: 'InvalidArgumentError';
+ code: 'UND_ERR_INVALID_ARG';
+ }
+
+ /** Returned an invalid value. */
+ export class InvalidReturnValueError extends UndiciError {
+ name: 'InvalidReturnValueError';
+ code: 'UND_ERR_INVALID_RETURN_VALUE';
+ }
+
+ /** The request has been aborted by the user. */
+ export class RequestAbortedError extends UndiciError {
+ name: 'AbortError';
+ code: 'UND_ERR_ABORTED';
+ }
+
+ /** Expected error with reason. */
+ export class InformationalError extends UndiciError {
+ name: 'InformationalError';
+ code: 'UND_ERR_INFO';
+ }
+
+ /** Request body length does not match content-length header. */
+ export class RequestContentLengthMismatchError extends UndiciError {
+ name: 'RequestContentLengthMismatchError';
+ code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH';
+ }
+
+ /** Response body length does not match content-length header. */
+ export class ResponseContentLengthMismatchError extends UndiciError {
+ name: 'ResponseContentLengthMismatchError';
+ code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH';
+ }
+
+ /** Trying to use a destroyed client. */
+ export class ClientDestroyedError extends UndiciError {
+ name: 'ClientDestroyedError';
+ code: 'UND_ERR_DESTROYED';
+ }
+
+ /** Trying to use a closed client. */
+ export class ClientClosedError extends UndiciError {
+ name: 'ClientClosedError';
+ code: 'UND_ERR_CLOSED';
+ }
+
+ /** There is an error with the socket. */
+ export class SocketError extends UndiciError {
+ name: 'SocketError';
+ code: 'UND_ERR_SOCKET';
+ socket: Client.SocketInfo | null
+ }
+
+ /** Encountered unsupported functionality. */
+ export class NotSupportedError extends UndiciError {
+ name: 'NotSupportedError';
+ code: 'UND_ERR_NOT_SUPPORTED';
+ }
+
+ /** No upstream has been added to the BalancedPool. */
+ export class BalancedPoolMissingUpstreamError extends UndiciError {
+ name: 'MissingUpstreamError';
+ code: 'UND_ERR_BPL_MISSING_UPSTREAM';
+ }
+
+ export class HTTPParserError extends UndiciError {
+ name: 'HTTPParserError';
+ code: string;
+ }
+
+ /** The response exceed the length allowed. */
+ export class ResponseExceededMaxSizeError extends UndiciError {
+ name: 'ResponseExceededMaxSizeError';
+ code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE';
+ }
+}
diff --git a/node_modules/undici/types/fetch.d.ts b/node_modules/undici/types/fetch.d.ts
new file mode 100644
index 0000000..fa4619c
--- /dev/null
+++ b/node_modules/undici/types/fetch.d.ts
@@ -0,0 +1,209 @@
+// based on https://github.com/Ethan-Arrowood/undici-fetch/blob/249269714db874351589d2d364a0645d5160ae71/index.d.ts (MIT license)
+// and https://github.com/node-fetch/node-fetch/blob/914ce6be5ec67a8bab63d68510aabf07cb818b6d/index.d.ts (MIT license)
+/// <reference types="node" />
+
+import { Blob } from 'buffer'
+import { URL, URLSearchParams } from 'url'
+import { ReadableStream } from 'stream/web'
+import { FormData } from './formdata'
+
+import Dispatcher from './dispatcher'
+
+export type RequestInfo = string | URL | Request
+
+export declare function fetch (
+ input: RequestInfo,
+ init?: RequestInit
+): Promise<Response>
+
+export type BodyInit =
+ | ArrayBuffer
+ | AsyncIterable<Uint8Array>
+ | Blob
+ | FormData
+ | Iterable<Uint8Array>
+ | NodeJS.ArrayBufferView
+ | URLSearchParams
+ | null
+ | string
+
+export interface BodyMixin {
+ readonly body: ReadableStream | null
+ readonly bodyUsed: boolean
+
+ readonly arrayBuffer: () => Promise<ArrayBuffer>
+ readonly blob: () => Promise<Blob>
+ readonly formData: () => Promise<FormData>
+ readonly json: () => Promise<unknown>
+ readonly text: () => Promise<string>
+}
+
+export interface SpecIterator<T, TReturn = any, TNext = undefined> {
+ next(...args: [] | [TNext]): IteratorResult<T, TReturn>;
+}
+
+export interface SpecIterableIterator<T> extends SpecIterator<T> {
+ [Symbol.iterator](): SpecIterableIterator<T>;
+}
+
+export interface SpecIterable<T> {
+ [Symbol.iterator](): SpecIterator<T>;
+}
+
+export type HeadersInit = string[][] | Record<string, string | ReadonlyArray<string>> | Headers
+
+export declare class Headers implements SpecIterable<[string, string]> {
+ constructor (init?: HeadersInit)
+ readonly append: (name: string, value: string) => void
+ readonly delete: (name: string) => void
+ readonly get: (name: string) => string | null
+ readonly has: (name: string) => boolean
+ readonly set: (name: string, value: string) => void
+ readonly getSetCookie: () => string[]
+ readonly forEach: (
+ callbackfn: (value: string, key: string, iterable: Headers) => void,
+ thisArg?: unknown
+ ) => void
+
+ readonly keys: () => SpecIterableIterator<string>
+ readonly values: () => SpecIterableIterator<string>
+ readonly entries: () => SpecIterableIterator<[string, string]>
+ readonly [Symbol.iterator]: () => SpecIterator<[string, string]>
+}
+
+export type RequestCache =
+ | 'default'
+ | 'force-cache'
+ | 'no-cache'
+ | 'no-store'
+ | 'only-if-cached'
+ | 'reload'
+
+export type RequestCredentials = 'omit' | 'include' | 'same-origin'
+
+type RequestDestination =
+ | ''
+ | 'audio'
+ | 'audioworklet'
+ | 'document'
+ | 'embed'
+ | 'font'
+ | 'image'
+ | 'manifest'
+ | 'object'
+ | 'paintworklet'
+ | 'report'
+ | 'script'
+ | 'sharedworker'
+ | 'style'
+ | 'track'
+ | 'video'
+ | 'worker'
+ | 'xslt'
+
+export interface RequestInit {
+ method?: string
+ keepalive?: boolean
+ headers?: HeadersInit
+ body?: BodyInit
+ redirect?: RequestRedirect
+ integrity?: string
+ signal?: AbortSignal
+ credentials?: RequestCredentials
+ mode?: RequestMode
+ referrer?: string
+ referrerPolicy?: ReferrerPolicy
+ window?: null
+ dispatcher?: Dispatcher
+ duplex?: RequestDuplex
+}
+
+export type ReferrerPolicy =
+ | ''
+ | 'no-referrer'
+ | 'no-referrer-when-downgrade'
+ | 'origin'
+ | 'origin-when-cross-origin'
+ | 'same-origin'
+ | 'strict-origin'
+ | 'strict-origin-when-cross-origin'
+ | 'unsafe-url';
+
+export type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin'
+
+export type RequestRedirect = 'error' | 'follow' | 'manual'
+
+export type RequestDuplex = 'half'
+
+export declare class Request implements BodyMixin {
+ constructor (input: RequestInfo, init?: RequestInit)
+
+ readonly cache: RequestCache
+ readonly credentials: RequestCredentials
+ readonly destination: RequestDestination
+ readonly headers: Headers
+ readonly integrity: string
+ readonly method: string
+ readonly mode: RequestMode
+ readonly redirect: RequestRedirect
+ readonly referrerPolicy: string
+ readonly url: string
+
+ readonly keepalive: boolean
+ readonly signal: AbortSignal
+ readonly duplex: RequestDuplex
+
+ readonly body: ReadableStream | null
+ readonly bodyUsed: boolean
+
+ readonly arrayBuffer: () => Promise<ArrayBuffer>
+ readonly blob: () => Promise<Blob>
+ readonly formData: () => Promise<FormData>
+ readonly json: () => Promise<unknown>
+ readonly text: () => Promise<string>
+
+ readonly clone: () => Request
+}
+
+export interface ResponseInit {
+ readonly status?: number
+ readonly statusText?: string
+ readonly headers?: HeadersInit
+}
+
+export type ResponseType =
+ | 'basic'
+ | 'cors'
+ | 'default'
+ | 'error'
+ | 'opaque'
+ | 'opaqueredirect'
+
+export type ResponseRedirectStatus = 301 | 302 | 303 | 307 | 308
+
+export declare class Response implements BodyMixin {
+ constructor (body?: BodyInit, init?: ResponseInit)
+
+ readonly headers: Headers
+ readonly ok: boolean
+ readonly status: number
+ readonly statusText: string
+ readonly type: ResponseType
+ readonly url: string
+ readonly redirected: boolean
+
+ readonly body: ReadableStream | null
+ readonly bodyUsed: boolean
+
+ readonly arrayBuffer: () => Promise<ArrayBuffer>
+ readonly blob: () => Promise<Blob>
+ readonly formData: () => Promise<FormData>
+ readonly json: () => Promise<unknown>
+ readonly text: () => Promise<string>
+
+ readonly clone: () => Response
+
+ static error (): Response
+ static json(data: any, init?: ResponseInit): Response
+ static redirect (url: string | URL, status: ResponseRedirectStatus): Response
+}
diff --git a/node_modules/undici/types/file.d.ts b/node_modules/undici/types/file.d.ts
new file mode 100644
index 0000000..c695b7a
--- /dev/null
+++ b/node_modules/undici/types/file.d.ts
@@ -0,0 +1,39 @@
+// Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/File.ts (MIT)
+/// <reference types="node" />
+
+import { Blob } from 'buffer'
+
+export interface BlobPropertyBag {
+ type?: string
+ endings?: 'native' | 'transparent'
+}
+
+export interface FilePropertyBag extends BlobPropertyBag {
+ /**
+ * The last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date.
+ */
+ lastModified?: number
+}
+
+export declare class File extends Blob {
+ /**
+ * Creates a new File instance.
+ *
+ * @param fileBits An `Array` strings, or [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer), [`ArrayBufferView`](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView), [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) objects, or a mix of any of such objects, that will be put inside the [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File).
+ * @param fileName The name of the file.
+ * @param options An options object containing optional attributes for the file.
+ */
+ constructor(fileBits: ReadonlyArray<string | NodeJS.ArrayBufferView | Blob>, fileName: string, options?: FilePropertyBag)
+
+ /**
+ * Name of the file referenced by the File object.
+ */
+ readonly name: string
+
+ /**
+ * The last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date.
+ */
+ readonly lastModified: number
+
+ readonly [Symbol.toStringTag]: string
+}
diff --git a/node_modules/undici/types/filereader.d.ts b/node_modules/undici/types/filereader.d.ts
new file mode 100644
index 0000000..f05d231
--- /dev/null
+++ b/node_modules/undici/types/filereader.d.ts
@@ -0,0 +1,54 @@
+/// <reference types="node" />
+
+import { Blob } from 'buffer'
+import { DOMException, Event, EventInit, EventTarget } from './patch'
+
+export declare class FileReader {
+ __proto__: EventTarget & FileReader
+
+ constructor ()
+
+ readAsArrayBuffer (blob: Blob): void
+ readAsBinaryString (blob: Blob): void
+ readAsText (blob: Blob, encoding?: string): void
+ readAsDataURL (blob: Blob): void
+
+ abort (): void
+
+ static readonly EMPTY = 0
+ static readonly LOADING = 1
+ static readonly DONE = 2
+
+ readonly EMPTY = 0
+ readonly LOADING = 1
+ readonly DONE = 2
+
+ readonly readyState: number
+
+ readonly result: string | ArrayBuffer | null
+
+ readonly error: DOMException | null
+
+ onloadstart: null | ((this: FileReader, event: ProgressEvent) => void)
+ onprogress: null | ((this: FileReader, event: ProgressEvent) => void)
+ onload: null | ((this: FileReader, event: ProgressEvent) => void)
+ onabort: null | ((this: FileReader, event: ProgressEvent) => void)
+ onerror: null | ((this: FileReader, event: ProgressEvent) => void)
+ onloadend: null | ((this: FileReader, event: ProgressEvent) => void)
+}
+
+export interface ProgressEventInit extends EventInit {
+ lengthComputable?: boolean
+ loaded?: number
+ total?: number
+}
+
+export declare class ProgressEvent {
+ __proto__: Event & ProgressEvent
+
+ constructor (type: string, eventInitDict?: ProgressEventInit)
+
+ readonly lengthComputable: boolean
+ readonly loaded: number
+ readonly total: number
+}
diff --git a/node_modules/undici/types/formdata.d.ts b/node_modules/undici/types/formdata.d.ts
new file mode 100644
index 0000000..df29a57
--- /dev/null
+++ b/node_modules/undici/types/formdata.d.ts
@@ -0,0 +1,108 @@
+// Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/FormData.ts (MIT)
+/// <reference types="node" />
+
+import { File } from './file'
+import { SpecIterator, SpecIterableIterator } from './fetch'
+
+/**
+ * A `string` or `File` that represents a single value from a set of `FormData` key-value pairs.
+ */
+declare type FormDataEntryValue = string | File
+
+/**
+ * Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using fetch().
+ */
+export declare class FormData {
+ /**
+ * Appends a new value onto an existing key inside a FormData object,
+ * or adds the key if it does not already exist.
+ *
+ * The difference between `set()` and `append()` is that if the specified key already exists, `set()` will overwrite all existing values with the new one, whereas `append()` will append the new value onto the end of the existing set of values.
+ *
+ * @param name The name of the field whose data is contained in `value`.
+ * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
+ or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string.
+ * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename.
+ */
+ append(name: string, value: unknown, fileName?: string): void
+
+ /**
+ * Set a new value for an existing key inside FormData,
+ * or add the new field if it does not already exist.
+ *
+ * @param name The name of the field whose data is contained in `value`.
+ * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
+ or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string.
+ * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename.
+ *
+ */
+ set(name: string, value: unknown, fileName?: string): void
+
+ /**
+ * Returns the first value associated with a given key from within a `FormData` object.
+ * If you expect multiple values and want all of them, use the `getAll()` method instead.
+ *
+ * @param {string} name A name of the value you want to retrieve.
+ *
+ * @returns A `FormDataEntryValue` containing the value. If the key doesn't exist, the method returns null.
+ */
+ get(name: string): FormDataEntryValue | null
+
+ /**
+ * Returns all the values associated with a given key from within a `FormData` object.
+ *
+ * @param {string} name A name of the value you want to retrieve.
+ *
+ * @returns An array of `FormDataEntryValue` whose key matches the value passed in the `name` parameter. If the key doesn't exist, the method returns an empty list.
+ */
+ getAll(name: string): FormDataEntryValue[]
+
+ /**
+ * Returns a boolean stating whether a `FormData` object contains a certain key.
+ *
+ * @param name A string representing the name of the key you want to test for.
+ *
+ * @return A boolean value.
+ */
+ has(name: string): boolean
+
+ /**
+ * Deletes a key and its value(s) from a `FormData` object.
+ *
+ * @param name The name of the key you want to delete.
+ */
+ delete(name: string): void
+
+ /**
+ * Executes given callback function for each field of the FormData instance
+ */
+ forEach: (
+ callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData) => void,
+ thisArg?: unknown
+ ) => void
+
+ /**
+ * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all keys contained in this `FormData` object.
+ * Each key is a `string`.
+ */
+ keys: () => SpecIterableIterator<string>
+
+ /**
+ * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all values contained in this object `FormData` object.
+ * Each value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue).
+ */
+ values: () => SpecIterableIterator<FormDataEntryValue>
+
+ /**
+ * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through the `FormData` key/value pairs.
+ * The key of each pair is a string; the value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue).
+ */
+ entries: () => SpecIterableIterator<[string, FormDataEntryValue]>
+
+ /**
+ * An alias for FormData#entries()
+ */
+ [Symbol.iterator]: () => SpecIterableIterator<[string, FormDataEntryValue]>
+
+ readonly [Symbol.toStringTag]: string
+}
diff --git a/node_modules/undici/types/global-dispatcher.d.ts b/node_modules/undici/types/global-dispatcher.d.ts
new file mode 100644
index 0000000..728f95c
--- /dev/null
+++ b/node_modules/undici/types/global-dispatcher.d.ts
@@ -0,0 +1,9 @@
+import Dispatcher from "./dispatcher";
+
+export {
+ getGlobalDispatcher,
+ setGlobalDispatcher
+}
+
+declare function setGlobalDispatcher<DispatcherImplementation extends Dispatcher>(dispatcher: DispatcherImplementation): void;
+declare function getGlobalDispatcher(): Dispatcher;
diff --git a/node_modules/undici/types/global-origin.d.ts b/node_modules/undici/types/global-origin.d.ts
new file mode 100644
index 0000000..322542d
--- /dev/null
+++ b/node_modules/undici/types/global-origin.d.ts
@@ -0,0 +1,7 @@
+export {
+ setGlobalOrigin,
+ getGlobalOrigin
+}
+
+declare function setGlobalOrigin(origin: string | URL | undefined): void;
+declare function getGlobalOrigin(): URL | undefined; \ No newline at end of file
diff --git a/node_modules/undici/types/handlers.d.ts b/node_modules/undici/types/handlers.d.ts
new file mode 100644
index 0000000..eb4f5a9
--- /dev/null
+++ b/node_modules/undici/types/handlers.d.ts
@@ -0,0 +1,9 @@
+import Dispatcher from "./dispatcher";
+
+export declare class RedirectHandler implements Dispatcher.DispatchHandlers{
+ constructor (dispatch: Dispatcher, maxRedirections: number, opts: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandlers)
+}
+
+export declare class DecoratorHandler implements Dispatcher.DispatchHandlers{
+ constructor (handler: Dispatcher.DispatchHandlers)
+}
diff --git a/node_modules/undici/types/header.d.ts b/node_modules/undici/types/header.d.ts
new file mode 100644
index 0000000..bfdb329
--- /dev/null
+++ b/node_modules/undici/types/header.d.ts
@@ -0,0 +1,4 @@
+/**
+ * The header type declaration of `undici`.
+ */
+export type IncomingHttpHeaders = Record<string, string | string[] | undefined>;
diff --git a/node_modules/undici/types/interceptors.d.ts b/node_modules/undici/types/interceptors.d.ts
new file mode 100644
index 0000000..047ac17
--- /dev/null
+++ b/node_modules/undici/types/interceptors.d.ts
@@ -0,0 +1,5 @@
+import Dispatcher from "./dispatcher";
+
+type RedirectInterceptorOpts = { maxRedirections?: number }
+
+export declare function createRedirectInterceptor (opts: RedirectInterceptorOpts): Dispatcher.DispatchInterceptor
diff --git a/node_modules/undici/types/mock-agent.d.ts b/node_modules/undici/types/mock-agent.d.ts
new file mode 100644
index 0000000..98cd645
--- /dev/null
+++ b/node_modules/undici/types/mock-agent.d.ts
@@ -0,0 +1,50 @@
+import Agent from './agent'
+import Dispatcher from './dispatcher'
+import { Interceptable, MockInterceptor } from './mock-interceptor'
+import MockDispatch = MockInterceptor.MockDispatch;
+
+export default MockAgent
+
+interface PendingInterceptor extends MockDispatch {
+ origin: string;
+}
+
+/** A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead. */
+declare class MockAgent<TMockAgentOptions extends MockAgent.Options = MockAgent.Options> extends Dispatcher {
+ constructor(options?: MockAgent.Options)
+ /** Creates and retrieves mock Dispatcher instances which can then be used to intercept HTTP requests. If the number of connections on the mock agent is set to 1, a MockClient instance is returned. Otherwise a MockPool instance is returned. */
+ get<TInterceptable extends Interceptable>(origin: string): TInterceptable;
+ get<TInterceptable extends Interceptable>(origin: RegExp): TInterceptable;
+ get<TInterceptable extends Interceptable>(origin: ((origin: string) => boolean)): TInterceptable;
+ /** Dispatches a mocked request. */
+ dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean;
+ /** Closes the mock agent and waits for registered mock pools and clients to also close before resolving. */
+ close(): Promise<void>;
+ /** Disables mocking in MockAgent. */
+ deactivate(): void;
+ /** Enables mocking in a MockAgent instance. When instantiated, a MockAgent is automatically activated. Therefore, this method is only effective after `MockAgent.deactivate` has been called. */
+ activate(): void;
+ /** Define host matchers so only matching requests that aren't intercepted by the mock dispatchers will be attempted. */
+ enableNetConnect(): void;
+ enableNetConnect(host: string): void;
+ enableNetConnect(host: RegExp): void;
+ enableNetConnect(host: ((host: string) => boolean)): void;
+ /** Causes all requests to throw when requests are not matched in a MockAgent intercept. */
+ disableNetConnect(): void;
+ pendingInterceptors(): PendingInterceptor[];
+ assertNoPendingInterceptors(options?: {
+ pendingInterceptorsFormatter?: PendingInterceptorsFormatter;
+ }): void;
+}
+
+interface PendingInterceptorsFormatter {
+ format(pendingInterceptors: readonly PendingInterceptor[]): string;
+}
+
+declare namespace MockAgent {
+ /** MockAgent options. */
+ export interface Options extends Agent.Options {
+ /** A custom agent to be encapsulated by the MockAgent. */
+ agent?: Agent;
+ }
+}
diff --git a/node_modules/undici/types/mock-client.d.ts b/node_modules/undici/types/mock-client.d.ts
new file mode 100644
index 0000000..51d008c
--- /dev/null
+++ b/node_modules/undici/types/mock-client.d.ts
@@ -0,0 +1,25 @@
+import Client from './client'
+import Dispatcher from './dispatcher'
+import MockAgent from './mock-agent'
+import { MockInterceptor, Interceptable } from './mock-interceptor'
+
+export default MockClient
+
+/** MockClient extends the Client API and allows one to mock requests. */
+declare class MockClient extends Client implements Interceptable {
+ constructor(origin: string, options: MockClient.Options);
+ /** Intercepts any matching requests that use the same origin as this mock client. */
+ intercept(options: MockInterceptor.Options): MockInterceptor;
+ /** Dispatches a mocked request. */
+ dispatch(options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandlers): boolean;
+ /** Closes the mock client and gracefully waits for enqueued requests to complete. */
+ close(): Promise<void>;
+}
+
+declare namespace MockClient {
+ /** MockClient options. */
+ export interface Options extends Client.Options {
+ /** The agent to associate this MockClient with. */
+ agent: MockAgent;
+ }
+}
diff --git a/node_modules/undici/types/mock-errors.d.ts b/node_modules/undici/types/mock-errors.d.ts
new file mode 100644
index 0000000..3d9e727
--- /dev/null
+++ b/node_modules/undici/types/mock-errors.d.ts
@@ -0,0 +1,12 @@
+import Errors from './errors'
+
+export default MockErrors
+
+declare namespace MockErrors {
+ /** The request does not match any registered mock dispatches. */
+ export class MockNotMatchedError extends Errors.UndiciError {
+ constructor(message?: string);
+ name: 'MockNotMatchedError';
+ code: 'UND_MOCK_ERR_MOCK_NOT_MATCHED';
+ }
+}
diff --git a/node_modules/undici/types/mock-interceptor.d.ts b/node_modules/undici/types/mock-interceptor.d.ts
new file mode 100644
index 0000000..6b3961c
--- /dev/null
+++ b/node_modules/undici/types/mock-interceptor.d.ts
@@ -0,0 +1,93 @@
+import { IncomingHttpHeaders } from './header'
+import Dispatcher from './dispatcher';
+import { BodyInit, Headers } from './fetch'
+
+export {
+ Interceptable,
+ MockInterceptor,
+ MockScope
+}
+
+/** The scope associated with a mock dispatch. */
+declare class MockScope<TData extends object = object> {
+ constructor(mockDispatch: MockInterceptor.MockDispatch<TData>);
+ /** Delay a reply by a set amount of time in ms. */
+ delay(waitInMs: number): MockScope<TData>;
+ /** Persist the defined mock data for the associated reply. It will return the defined mock data indefinitely. */
+ persist(): MockScope<TData>;
+ /** Define a reply for a set amount of matching requests. */
+ times(repeatTimes: number): MockScope<TData>;
+}
+
+/** The interceptor for a Mock. */
+declare class MockInterceptor {
+ constructor(options: MockInterceptor.Options, mockDispatches: MockInterceptor.MockDispatch[]);
+ /** Mock an undici request with the defined reply. */
+ reply<TData extends object = object>(replyOptionsCallback: MockInterceptor.MockReplyOptionsCallback<TData>): MockScope<TData>;
+ reply<TData extends object = object>(
+ statusCode: number,
+ data?: TData | Buffer | string | MockInterceptor.MockResponseDataHandler<TData>,
+ responseOptions?: MockInterceptor.MockResponseOptions
+ ): MockScope<TData>;
+ /** Mock an undici request by throwing the defined reply error. */
+ replyWithError<TError extends Error = Error>(error: TError): MockScope;
+ /** Set default reply headers on the interceptor for subsequent mocked replies. */
+ defaultReplyHeaders(headers: IncomingHttpHeaders): MockInterceptor;
+ /** Set default reply trailers on the interceptor for subsequent mocked replies. */
+ defaultReplyTrailers(trailers: Record<string, string>): MockInterceptor;
+ /** Set automatically calculated content-length header on subsequent mocked replies. */
+ replyContentLength(): MockInterceptor;
+}
+
+declare namespace MockInterceptor {
+ /** MockInterceptor options. */
+ export interface Options {
+ /** Path to intercept on. */
+ path: string | RegExp | ((path: string) => boolean);
+ /** Method to intercept on. Defaults to GET. */
+ method?: string | RegExp | ((method: string) => boolean);
+ /** Body to intercept on. */
+ body?: string | RegExp | ((body: string) => boolean);
+ /** Headers to intercept on. */
+ headers?: Record<string, string | RegExp | ((body: string) => boolean)> | ((headers: Record<string, string>) => boolean);
+ /** Query params to intercept on */
+ query?: Record<string, any>;
+ }
+ export interface MockDispatch<TData extends object = object, TError extends Error = Error> extends Options {
+ times: number | null;
+ persist: boolean;
+ consumed: boolean;
+ data: MockDispatchData<TData, TError>;
+ }
+ export interface MockDispatchData<TData extends object = object, TError extends Error = Error> extends MockResponseOptions {
+ error: TError | null;
+ statusCode?: number;
+ data?: TData | string;
+ }
+ export interface MockResponseOptions {
+ headers?: IncomingHttpHeaders;
+ trailers?: Record<string, string>;
+ }
+
+ export interface MockResponseCallbackOptions {
+ path: string;
+ origin: string;
+ method: string;
+ body?: BodyInit | Dispatcher.DispatchOptions['body'];
+ headers: Headers | Record<string, string>;
+ maxRedirections: number;
+ }
+
+ export type MockResponseDataHandler<TData extends object = object> = (
+ opts: MockResponseCallbackOptions
+ ) => TData | Buffer | string;
+
+ export type MockReplyOptionsCallback<TData extends object = object> = (
+ opts: MockResponseCallbackOptions
+ ) => { statusCode: number, data?: TData | Buffer | string, responseOptions?: MockResponseOptions }
+}
+
+interface Interceptable extends Dispatcher {
+ /** Intercepts any matching requests that use the same origin as this mock client. */
+ intercept(options: MockInterceptor.Options): MockInterceptor;
+}
diff --git a/node_modules/undici/types/mock-pool.d.ts b/node_modules/undici/types/mock-pool.d.ts
new file mode 100644
index 0000000..39e709a
--- /dev/null
+++ b/node_modules/undici/types/mock-pool.d.ts
@@ -0,0 +1,25 @@
+import Pool from './pool'
+import MockAgent from './mock-agent'
+import { Interceptable, MockInterceptor } from './mock-interceptor'
+import Dispatcher from './dispatcher'
+
+export default MockPool
+
+/** MockPool extends the Pool API and allows one to mock requests. */
+declare class MockPool extends Pool implements Interceptable {
+ constructor(origin: string, options: MockPool.Options);
+ /** Intercepts any matching requests that use the same origin as this mock pool. */
+ intercept(options: MockInterceptor.Options): MockInterceptor;
+ /** Dispatches a mocked request. */
+ dispatch(options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandlers): boolean;
+ /** Closes the mock pool and gracefully waits for enqueued requests to complete. */
+ close(): Promise<void>;
+}
+
+declare namespace MockPool {
+ /** MockPool options. */
+ export interface Options extends Pool.Options {
+ /** The agent to associate this MockPool with. */
+ agent: MockAgent;
+ }
+}
diff --git a/node_modules/undici/types/patch.d.ts b/node_modules/undici/types/patch.d.ts
new file mode 100644
index 0000000..3871acf
--- /dev/null
+++ b/node_modules/undici/types/patch.d.ts
@@ -0,0 +1,71 @@
+/// <reference types="node" />
+
+// See https://github.com/nodejs/undici/issues/1740
+
+export type DOMException = typeof globalThis extends { DOMException: infer T }
+ ? T
+ : any
+
+export type EventTarget = typeof globalThis extends { EventTarget: infer T }
+ ? T
+ : {
+ addEventListener(
+ type: string,
+ listener: any,
+ options?: any,
+ ): void
+ dispatchEvent(event: Event): boolean
+ removeEventListener(
+ type: string,
+ listener: any,
+ options?: any | boolean,
+ ): void
+ }
+
+export type Event = typeof globalThis extends { Event: infer T }
+ ? T
+ : {
+ readonly bubbles: boolean
+ cancelBubble: () => void
+ readonly cancelable: boolean
+ readonly composed: boolean
+ composedPath(): [EventTarget?]
+ readonly currentTarget: EventTarget | null
+ readonly defaultPrevented: boolean
+ readonly eventPhase: 0 | 2
+ readonly isTrusted: boolean
+ preventDefault(): void
+ returnValue: boolean
+ readonly srcElement: EventTarget | null
+ stopImmediatePropagation(): void
+ stopPropagation(): void
+ readonly target: EventTarget | null
+ readonly timeStamp: number
+ readonly type: string
+ }
+
+export interface EventInit {
+ bubbles?: boolean
+ cancelable?: boolean
+ composed?: boolean
+}
+
+export interface EventListenerOptions {
+ capture?: boolean
+}
+
+export interface AddEventListenerOptions extends EventListenerOptions {
+ once?: boolean
+ passive?: boolean
+ signal?: AbortSignal
+}
+
+export type EventListenerOrEventListenerObject = EventListener | EventListenerObject
+
+export interface EventListenerObject {
+ handleEvent (object: Event): void
+}
+
+export interface EventListener {
+ (evt: Event): void
+}
diff --git a/node_modules/undici/types/pool-stats.d.ts b/node_modules/undici/types/pool-stats.d.ts
new file mode 100644
index 0000000..8b6d2bf
--- /dev/null
+++ b/node_modules/undici/types/pool-stats.d.ts
@@ -0,0 +1,19 @@
+import Pool from "./pool"
+
+export default PoolStats
+
+declare class PoolStats {
+ constructor(pool: Pool);
+ /** Number of open socket connections in this pool. */
+ connected: number;
+ /** Number of open socket connections in this pool that do not have an active request. */
+ free: number;
+ /** Number of pending requests across all clients in this pool. */
+ pending: number;
+ /** Number of queued requests across all clients in this pool. */
+ queued: number;
+ /** Number of currently active requests across all clients in this pool. */
+ running: number;
+ /** Number of active, pending, or queued requests across all clients in this pool. */
+ size: number;
+}
diff --git a/node_modules/undici/types/pool.d.ts b/node_modules/undici/types/pool.d.ts
new file mode 100644
index 0000000..7747d48
--- /dev/null
+++ b/node_modules/undici/types/pool.d.ts
@@ -0,0 +1,28 @@
+import Client from './client'
+import TPoolStats from './pool-stats'
+import { URL } from 'url'
+import Dispatcher from "./dispatcher";
+
+export default Pool
+
+declare class Pool extends Dispatcher {
+ constructor(url: string | URL, options?: Pool.Options)
+ /** `true` after `pool.close()` has been called. */
+ closed: boolean;
+ /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
+ destroyed: boolean;
+ /** Aggregate stats for a Pool. */
+ readonly stats: TPoolStats;
+}
+
+declare namespace Pool {
+ export type PoolStats = TPoolStats;
+ export interface Options extends Client.Options {
+ /** Default: `(origin, opts) => new Client(origin, opts)`. */
+ factory?(origin: URL, opts: object): Dispatcher;
+ /** The max number of clients to create. `null` if no limit. Default `null`. */
+ connections?: number | null;
+
+ interceptors?: { Pool?: readonly Dispatcher.DispatchInterceptor[] } & Client.Options["interceptors"]
+ }
+}
diff --git a/node_modules/undici/types/proxy-agent.d.ts b/node_modules/undici/types/proxy-agent.d.ts
new file mode 100644
index 0000000..96b2638
--- /dev/null
+++ b/node_modules/undici/types/proxy-agent.d.ts
@@ -0,0 +1,30 @@
+import Agent from './agent'
+import buildConnector from './connector';
+import Client from './client'
+import Dispatcher from './dispatcher'
+import { IncomingHttpHeaders } from './header'
+import Pool from './pool'
+
+export default ProxyAgent
+
+declare class ProxyAgent extends Dispatcher {
+ constructor(options: ProxyAgent.Options | string)
+
+ dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean;
+ close(): Promise<void>;
+}
+
+declare namespace ProxyAgent {
+ export interface Options extends Agent.Options {
+ uri: string;
+ /**
+ * @deprecated use opts.token
+ */
+ auth?: string;
+ token?: string;
+ headers?: IncomingHttpHeaders;
+ requestTls?: buildConnector.BuildOptions;
+ proxyTls?: buildConnector.BuildOptions;
+ clientFactory?(origin: URL, opts: object): Dispatcher;
+ }
+}
diff --git a/node_modules/undici/types/readable.d.ts b/node_modules/undici/types/readable.d.ts
new file mode 100644
index 0000000..032b53b
--- /dev/null
+++ b/node_modules/undici/types/readable.d.ts
@@ -0,0 +1,61 @@
+import { Readable } from "stream";
+import { Blob } from 'buffer'
+
+export default BodyReadable
+
+declare class BodyReadable extends Readable {
+ constructor(
+ resume?: (this: Readable, size: number) => void | null,
+ abort?: () => void | null,
+ contentType?: string
+ )
+
+ /** Consumes and returns the body as a string
+ * https://fetch.spec.whatwg.org/#dom-body-text
+ */
+ text(): Promise<string>
+
+ /** Consumes and returns the body as a JavaScript Object
+ * https://fetch.spec.whatwg.org/#dom-body-json
+ */
+ json(): Promise<any>
+
+ /** Consumes and returns the body as a Blob
+ * https://fetch.spec.whatwg.org/#dom-body-blob
+ */
+ blob(): Promise<Blob>
+
+ /** Consumes and returns the body as an ArrayBuffer
+ * https://fetch.spec.whatwg.org/#dom-body-arraybuffer
+ */
+ arrayBuffer(): Promise<ArrayBuffer>
+
+ /** Not implemented
+ *
+ * https://fetch.spec.whatwg.org/#dom-body-formdata
+ */
+ formData(): Promise<never>
+
+ /** Returns true if the body is not null and the body has been consumed
+ *
+ * Otherwise, returns false
+ *
+ * https://fetch.spec.whatwg.org/#dom-body-bodyused
+ */
+ readonly bodyUsed: boolean
+
+ /** Throws on node 16.6.0
+ *
+ * If body is null, it should return null as the body
+ *
+ * If body is not null, should return the body as a ReadableStream
+ *
+ * https://fetch.spec.whatwg.org/#dom-body-body
+ */
+ readonly body: never | undefined
+
+ /** Dumps the response body by reading `limit` number of bytes.
+ * @param opts.limit Number of bytes to read (optional) - Default: 262144
+ */
+ dump(opts?: { limit: number }): Promise<void>
+}
diff --git a/node_modules/undici/types/webidl.d.ts b/node_modules/undici/types/webidl.d.ts
new file mode 100644
index 0000000..40cfe06
--- /dev/null
+++ b/node_modules/undici/types/webidl.d.ts
@@ -0,0 +1,220 @@
+// These types are not exported, and are only used internally
+
+/**
+ * Take in an unknown value and return one that is of type T
+ */
+type Converter<T> = (object: unknown) => T
+
+type SequenceConverter<T> = (object: unknown) => T[]
+
+type RecordConverter<K extends string, V> = (object: unknown) => Record<K, V>
+
+interface ConvertToIntOpts {
+ clamp?: boolean
+ enforceRange?: boolean
+}
+
+interface WebidlErrors {
+ exception (opts: { header: string, message: string }): TypeError
+ /**
+ * @description Throw an error when conversion from one type to another has failed
+ */
+ conversionFailed (opts: {
+ prefix: string
+ argument: string
+ types: string[]
+ }): TypeError
+ /**
+ * @description Throw an error when an invalid argument is provided
+ */
+ invalidArgument (opts: {
+ prefix: string
+ value: string
+ type: string
+ }): TypeError
+}
+
+interface WebidlUtil {
+ /**
+ * @see https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values
+ */
+ Type (object: unknown):
+ | 'Undefined'
+ | 'Boolean'
+ | 'String'
+ | 'Symbol'
+ | 'Number'
+ | 'BigInt'
+ | 'Null'
+ | 'Object'
+
+ /**
+ * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
+ */
+ ConvertToInt (
+ V: unknown,
+ bitLength: number,
+ signedness: 'signed' | 'unsigned',
+ opts?: ConvertToIntOpts
+ ): number
+
+ /**
+ * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
+ */
+ IntegerPart (N: number): number
+}
+
+interface WebidlConverters {
+ /**
+ * @see https://webidl.spec.whatwg.org/#es-DOMString
+ */
+ DOMString (V: unknown, opts?: {
+ legacyNullToEmptyString: boolean
+ }): string
+
+ /**
+ * @see https://webidl.spec.whatwg.org/#es-ByteString
+ */
+ ByteString (V: unknown): string
+
+ /**
+ * @see https://webidl.spec.whatwg.org/#es-USVString
+ */
+ USVString (V: unknown): string
+
+ /**
+ * @see https://webidl.spec.whatwg.org/#es-boolean
+ */
+ boolean (V: unknown): boolean
+
+ /**
+ * @see https://webidl.spec.whatwg.org/#es-any
+ */
+ any <Value>(V: Value): Value
+
+ /**
+ * @see https://webidl.spec.whatwg.org/#es-long-long
+ */
+ ['long long'] (V: unknown): number
+
+ /**
+ * @see https://webidl.spec.whatwg.org/#es-unsigned-long-long
+ */
+ ['unsigned long long'] (V: unknown): number
+
+ /**
+ * @see https://webidl.spec.whatwg.org/#es-unsigned-long
+ */
+ ['unsigned long'] (V: unknown): number
+
+ /**
+ * @see https://webidl.spec.whatwg.org/#es-unsigned-short
+ */
+ ['unsigned short'] (V: unknown, opts?: ConvertToIntOpts): number
+
+ /**
+ * @see https://webidl.spec.whatwg.org/#idl-ArrayBuffer
+ */
+ ArrayBuffer (V: unknown): ArrayBufferLike
+ ArrayBuffer (V: unknown, opts: { allowShared: false }): ArrayBuffer
+
+ /**
+ * @see https://webidl.spec.whatwg.org/#es-buffer-source-types
+ */
+ TypedArray (
+ V: unknown,
+ TypedArray: NodeJS.TypedArray | ArrayBufferLike
+ ): NodeJS.TypedArray | ArrayBufferLike
+ TypedArray (
+ V: unknown,
+ TypedArray: NodeJS.TypedArray | ArrayBufferLike,
+ opts?: { allowShared: false }
+ ): NodeJS.TypedArray | ArrayBuffer
+
+ /**
+ * @see https://webidl.spec.whatwg.org/#es-buffer-source-types
+ */
+ DataView (V: unknown, opts?: { allowShared: boolean }): DataView
+
+ /**
+ * @see https://webidl.spec.whatwg.org/#BufferSource
+ */
+ BufferSource (
+ V: unknown,
+ opts?: { allowShared: boolean }
+ ): NodeJS.TypedArray | ArrayBufferLike | DataView
+
+ ['sequence<ByteString>']: SequenceConverter<string>
+
+ ['sequence<sequence<ByteString>>']: SequenceConverter<string[]>
+
+ ['record<ByteString, ByteString>']: RecordConverter<string, string>
+
+ [Key: string]: (...args: any[]) => unknown
+}
+
+export interface Webidl {
+ errors: WebidlErrors
+ util: WebidlUtil
+ converters: WebidlConverters
+
+ /**
+ * @description Performs a brand-check on {@param V} to ensure it is a
+ * {@param cls} object.
+ */
+ brandCheck <Interface>(V: unknown, cls: Interface, opts?: { strict?: boolean }): asserts V is Interface
+
+ /**
+ * @see https://webidl.spec.whatwg.org/#es-sequence
+ * @description Convert a value, V, to a WebIDL sequence type.
+ */
+ sequenceConverter <Type>(C: Converter<Type>): SequenceConverter<Type>
+
+ illegalConstructor (): never
+
+ /**
+ * @see https://webidl.spec.whatwg.org/#es-to-record
+ * @description Convert a value, V, to a WebIDL record type.
+ */
+ recordConverter <K extends string, V>(
+ keyConverter: Converter<K>,
+ valueConverter: Converter<V>
+ ): RecordConverter<K, V>
+
+ /**
+ * Similar to {@link Webidl.brandCheck} but allows skipping the check if third party
+ * interfaces are allowed.
+ */
+ interfaceConverter <Interface>(cls: Interface): (
+ V: unknown,
+ opts?: { strict: boolean }
+ ) => asserts V is typeof cls
+
+ // TODO(@KhafraDev): a type could likely be implemented that can infer the return type
+ // from the converters given?
+ /**
+ * Converts a value, V, to a WebIDL dictionary types. Allows limiting which keys are
+ * allowed, values allowed, optional and required keys. Auto converts the value to
+ * a type given a converter.
+ */
+ dictionaryConverter (converters: {
+ key: string,
+ defaultValue?: unknown,
+ required?: boolean,
+ converter: (...args: unknown[]) => unknown,
+ allowedValues?: unknown[]
+ }[]): (V: unknown) => Record<string, unknown>
+
+ /**
+ * @see https://webidl.spec.whatwg.org/#idl-nullable-type
+ * @description allows a type, V, to be null
+ */
+ nullableConverter <T>(
+ converter: Converter<T>
+ ): (V: unknown) => ReturnType<typeof converter> | null
+
+ argumentLengthCheck (args: { length: number }, min: number, context: {
+ header: string
+ message?: string
+ }): void
+}
diff --git a/node_modules/undici/types/websocket.d.ts b/node_modules/undici/types/websocket.d.ts
new file mode 100644
index 0000000..15a357d
--- /dev/null
+++ b/node_modules/undici/types/websocket.d.ts
@@ -0,0 +1,131 @@
+/// <reference types="node" />
+
+import type { Blob } from 'buffer'
+import type { MessagePort } from 'worker_threads'
+import {
+ EventTarget,
+ Event,
+ EventInit,
+ EventListenerOptions,
+ AddEventListenerOptions,
+ EventListenerOrEventListenerObject
+} from './patch'
+import Dispatcher from './dispatcher'
+import { HeadersInit } from './fetch'
+
+export type BinaryType = 'blob' | 'arraybuffer'
+
+interface WebSocketEventMap {
+ close: CloseEvent
+ error: Event
+ message: MessageEvent
+ open: Event
+}
+
+interface WebSocket extends EventTarget {
+ binaryType: BinaryType
+
+ readonly bufferedAmount: number
+ readonly extensions: string
+
+ onclose: ((this: WebSocket, ev: WebSocketEventMap['close']) => any) | null
+ onerror: ((this: WebSocket, ev: WebSocketEventMap['error']) => any) | null
+ onmessage: ((this: WebSocket, ev: WebSocketEventMap['message']) => any) | null
+ onopen: ((this: WebSocket, ev: WebSocketEventMap['open']) => any) | null
+
+ readonly protocol: string
+ readonly readyState: number
+ readonly url: string
+
+ close(code?: number, reason?: string): void
+ send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void
+
+ readonly CLOSED: number
+ readonly CLOSING: number
+ readonly CONNECTING: number
+ readonly OPEN: number
+
+ addEventListener<K extends keyof WebSocketEventMap>(
+ type: K,
+ listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any,
+ options?: boolean | AddEventListenerOptions
+ ): void
+ addEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | AddEventListenerOptions
+ ): void
+ removeEventListener<K extends keyof WebSocketEventMap>(
+ type: K,
+ listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any,
+ options?: boolean | EventListenerOptions
+ ): void
+ removeEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | EventListenerOptions
+ ): void
+}
+
+export declare const WebSocket: {
+ prototype: WebSocket
+ new (url: string | URL, protocols?: string | string[] | WebSocketInit): WebSocket
+ readonly CLOSED: number
+ readonly CLOSING: number
+ readonly CONNECTING: number
+ readonly OPEN: number
+}
+
+interface CloseEventInit extends EventInit {
+ code?: number
+ reason?: string
+ wasClean?: boolean
+}
+
+interface CloseEvent extends Event {
+ readonly code: number
+ readonly reason: string
+ readonly wasClean: boolean
+}
+
+export declare const CloseEvent: {
+ prototype: CloseEvent
+ new (type: string, eventInitDict?: CloseEventInit): CloseEvent
+}
+
+interface MessageEventInit<T = any> extends EventInit {
+ data?: T
+ lastEventId?: string
+ origin?: string
+ ports?: (typeof MessagePort)[]
+ source?: typeof MessagePort | null
+}
+
+interface MessageEvent<T = any> extends Event {
+ readonly data: T
+ readonly lastEventId: string
+ readonly origin: string
+ readonly ports: ReadonlyArray<typeof MessagePort>
+ readonly source: typeof MessagePort | null
+ initMessageEvent(
+ type: string,
+ bubbles?: boolean,
+ cancelable?: boolean,
+ data?: any,
+ origin?: string,
+ lastEventId?: string,
+ source?: typeof MessagePort | null,
+ ports?: (typeof MessagePort)[]
+ ): void;
+}
+
+export declare const MessageEvent: {
+ prototype: MessageEvent
+ new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>
+}
+
+interface WebSocketInit {
+ protocols?: string | string[],
+ dispatcher?: Dispatcher,
+ headers?: HeadersInit
+}
diff --git a/node_modules/ws/LICENSE b/node_modules/ws/LICENSE
new file mode 100644
index 0000000..1da5b96
--- /dev/null
+++ b/node_modules/ws/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
+Copyright (c) 2013 Arnout Kazemier and contributors
+Copyright (c) 2016 Luigi Pinca and contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/ws/README.md b/node_modules/ws/README.md
new file mode 100644
index 0000000..a550ca1
--- /dev/null
+++ b/node_modules/ws/README.md
@@ -0,0 +1,536 @@
+# ws: a Node.js WebSocket library
+
+[![Version npm](https://img.shields.io/npm/v/ws.svg?logo=npm)](https://www.npmjs.com/package/ws)
+[![CI](https://img.shields.io/github/actions/workflow/status/websockets/ws/ci.yml?branch=master&label=CI&logo=github)](https://github.com/websockets/ws/actions?query=workflow%3ACI+branch%3Amaster)
+[![Coverage Status](https://img.shields.io/coveralls/websockets/ws/master.svg?logo=coveralls)](https://coveralls.io/github/websockets/ws)
+
+ws is a simple to use, blazing fast, and thoroughly tested WebSocket client and
+server implementation.
+
+Passes the quite extensive Autobahn test suite: [server][server-report],
+[client][client-report].
+
+**Note**: This module does not work in the browser. The client in the docs is a
+reference to a back end with the role of a client in the WebSocket
+communication. Browser clients must use the native
+[`WebSocket`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket)
+object. To make the same code work seamlessly on Node.js and the browser, you
+can use one of the many wrappers available on npm, like
+[isomorphic-ws](https://github.com/heineiuo/isomorphic-ws).
+
+## Table of Contents
+
+- [Protocol support](#protocol-support)
+- [Installing](#installing)
+ - [Opt-in for performance](#opt-in-for-performance)
+- [API docs](#api-docs)
+- [WebSocket compression](#websocket-compression)
+- [Usage examples](#usage-examples)
+ - [Sending and receiving text data](#sending-and-receiving-text-data)
+ - [Sending binary data](#sending-binary-data)
+ - [Simple server](#simple-server)
+ - [External HTTP/S server](#external-https-server)
+ - [Multiple servers sharing a single HTTP/S server](#multiple-servers-sharing-a-single-https-server)
+ - [Client authentication](#client-authentication)
+ - [Server broadcast](#server-broadcast)
+ - [Round-trip time](#round-trip-time)
+ - [Use the Node.js streams API](#use-the-nodejs-streams-api)
+ - [Other examples](#other-examples)
+- [FAQ](#faq)
+ - [How to get the IP address of the client?](#how-to-get-the-ip-address-of-the-client)
+ - [How to detect and close broken connections?](#how-to-detect-and-close-broken-connections)
+ - [How to connect via a proxy?](#how-to-connect-via-a-proxy)
+- [Changelog](#changelog)
+- [License](#license)
+
+## Protocol support
+
+- **HyBi drafts 07-12** (Use the option `protocolVersion: 8`)
+- **HyBi drafts 13-17** (Current default, alternatively option
+ `protocolVersion: 13`)
+
+## Installing
+
+```
+npm install ws
+```
+
+### Opt-in for performance
+
+There are 2 optional modules that can be installed along side with the ws
+module. These modules are binary addons that improve the performance of certain
+operations. Prebuilt binaries are available for the most popular platforms so
+you don't necessarily need to have a C++ compiler installed on your machine.
+
+- `npm install --save-optional bufferutil`: Allows to efficiently perform
+ operations such as masking and unmasking the data payload of the WebSocket
+ frames.
+- `npm install --save-optional utf-8-validate`: Allows to efficiently check if a
+ message contains valid UTF-8.
+
+To not even try to require and use these modules, use the
+[`WS_NO_BUFFER_UTIL`](./doc/ws.md#ws_no_buffer_util) and
+[`WS_NO_UTF_8_VALIDATE`](./doc/ws.md#ws_no_utf_8_validate) environment
+variables. These might be useful to enhance security in systems where a user can
+put a package in the package search path of an application of another user, due
+to how the Node.js resolver algorithm works.
+
+The `utf-8-validate` module is not needed and is not required, even if it is
+already installed, regardless of the value of the `WS_NO_UTF_8_VALIDATE`
+environment variable, if [`buffer.isUtf8()`][] is available.
+
+## API docs
+
+See [`/doc/ws.md`](./doc/ws.md) for Node.js-like documentation of ws classes and
+utility functions.
+
+## WebSocket compression
+
+ws supports the [permessage-deflate extension][permessage-deflate] which enables
+the client and server to negotiate a compression algorithm and its parameters,
+and then selectively apply it to the data payloads of each WebSocket message.
+
+The extension is disabled by default on the server and enabled by default on the
+client. It adds a significant overhead in terms of performance and memory
+consumption so we suggest to enable it only if it is really needed.
+
+Note that Node.js has a variety of issues with high-performance compression,
+where increased concurrency, especially on Linux, can lead to [catastrophic
+memory fragmentation][node-zlib-bug] and slow performance. If you intend to use
+permessage-deflate in production, it is worthwhile to set up a test
+representative of your workload and ensure Node.js/zlib will handle it with
+acceptable performance and memory usage.
+
+Tuning of permessage-deflate can be done via the options defined below. You can
+also use `zlibDeflateOptions` and `zlibInflateOptions`, which is passed directly
+into the creation of [raw deflate/inflate streams][node-zlib-deflaterawdocs].
+
+See [the docs][ws-server-options] for more options.
+
+```js
+import WebSocket, { WebSocketServer } from 'ws';
+
+const wss = new WebSocketServer({
+ port: 8080,
+ perMessageDeflate: {
+ zlibDeflateOptions: {
+ // See zlib defaults.
+ chunkSize: 1024,
+ memLevel: 7,
+ level: 3
+ },
+ zlibInflateOptions: {
+ chunkSize: 10 * 1024
+ },
+ // Other options settable:
+ clientNoContextTakeover: true, // Defaults to negotiated value.
+ serverNoContextTakeover: true, // Defaults to negotiated value.
+ serverMaxWindowBits: 10, // Defaults to negotiated value.
+ // Below options specified as default values.
+ concurrencyLimit: 10, // Limits zlib concurrency for perf.
+ threshold: 1024 // Size (in bytes) below which messages
+ // should not be compressed if context takeover is disabled.
+ }
+});
+```
+
+The client will only use the extension if it is supported and enabled on the
+server. To always disable the extension on the client set the
+`perMessageDeflate` option to `false`.
+
+```js
+import WebSocket from 'ws';
+
+const ws = new WebSocket('ws://www.host.com/path', {
+ perMessageDeflate: false
+});
+```
+
+## Usage examples
+
+### Sending and receiving text data
+
+```js
+import WebSocket from 'ws';
+
+const ws = new WebSocket('ws://www.host.com/path');
+
+ws.on('error', console.error);
+
+ws.on('open', function open() {
+ ws.send('something');
+});
+
+ws.on('message', function message(data) {
+ console.log('received: %s', data);
+});
+```
+
+### Sending binary data
+
+```js
+import WebSocket from 'ws';
+
+const ws = new WebSocket('ws://www.host.com/path');
+
+ws.on('error', console.error);
+
+ws.on('open', function open() {
+ const array = new Float32Array(5);
+
+ for (var i = 0; i < array.length; ++i) {
+ array[i] = i / 2;
+ }
+
+ ws.send(array);
+});
+```
+
+### Simple server
+
+```js
+import { WebSocketServer } from 'ws';
+
+const wss = new WebSocketServer({ port: 8080 });
+
+wss.on('connection', function connection(ws) {
+ ws.on('error', console.error);
+
+ ws.on('message', function message(data) {
+ console.log('received: %s', data);
+ });
+
+ ws.send('something');
+});
+```
+
+### External HTTP/S server
+
+```js
+import { createServer } from 'https';
+import { readFileSync } from 'fs';
+import { WebSocketServer } from 'ws';
+
+const server = createServer({
+ cert: readFileSync('/path/to/cert.pem'),
+ key: readFileSync('/path/to/key.pem')
+});
+const wss = new WebSocketServer({ server });
+
+wss.on('connection', function connection(ws) {
+ ws.on('error', console.error);
+
+ ws.on('message', function message(data) {
+ console.log('received: %s', data);
+ });
+
+ ws.send('something');
+});
+
+server.listen(8080);
+```
+
+### Multiple servers sharing a single HTTP/S server
+
+```js
+import { createServer } from 'http';
+import { parse } from 'url';
+import { WebSocketServer } from 'ws';
+
+const server = createServer();
+const wss1 = new WebSocketServer({ noServer: true });
+const wss2 = new WebSocketServer({ noServer: true });
+
+wss1.on('connection', function connection(ws) {
+ ws.on('error', console.error);
+
+ // ...
+});
+
+wss2.on('connection', function connection(ws) {
+ ws.on('error', console.error);
+
+ // ...
+});
+
+server.on('upgrade', function upgrade(request, socket, head) {
+ const { pathname } = parse(request.url);
+
+ if (pathname === '/foo') {
+ wss1.handleUpgrade(request, socket, head, function done(ws) {
+ wss1.emit('connection', ws, request);
+ });
+ } else if (pathname === '/bar') {
+ wss2.handleUpgrade(request, socket, head, function done(ws) {
+ wss2.emit('connection', ws, request);
+ });
+ } else {
+ socket.destroy();
+ }
+});
+
+server.listen(8080);
+```
+
+### Client authentication
+
+```js
+import { createServer } from 'http';
+import { WebSocketServer } from 'ws';
+
+function onSocketError(err) {
+ console.error(err);
+}
+
+const server = createServer();
+const wss = new WebSocketServer({ noServer: true });
+
+wss.on('connection', function connection(ws, request, client) {
+ ws.on('error', console.error);
+
+ ws.on('message', function message(data) {
+ console.log(`Received message ${data} from user ${client}`);
+ });
+});
+
+server.on('upgrade', function upgrade(request, socket, head) {
+ socket.on('error', onSocketError);
+
+ // This function is not defined on purpose. Implement it with your own logic.
+ authenticate(request, function next(err, client) {
+ if (err || !client) {
+ socket.write('HTTP/1.1 401 Unauthorized\r\n\r\n');
+ socket.destroy();
+ return;
+ }
+
+ socket.removeListener('error', onSocketError);
+
+ wss.handleUpgrade(request, socket, head, function done(ws) {
+ wss.emit('connection', ws, request, client);
+ });
+ });
+});
+
+server.listen(8080);
+```
+
+Also see the provided [example][session-parse-example] using `express-session`.
+
+### Server broadcast
+
+A client WebSocket broadcasting to all connected WebSocket clients, including
+itself.
+
+```js
+import WebSocket, { WebSocketServer } from 'ws';
+
+const wss = new WebSocketServer({ port: 8080 });
+
+wss.on('connection', function connection(ws) {
+ ws.on('error', console.error);
+
+ ws.on('message', function message(data, isBinary) {
+ wss.clients.forEach(function each(client) {
+ if (client.readyState === WebSocket.OPEN) {
+ client.send(data, { binary: isBinary });
+ }
+ });
+ });
+});
+```
+
+A client WebSocket broadcasting to every other connected WebSocket clients,
+excluding itself.
+
+```js
+import WebSocket, { WebSocketServer } from 'ws';
+
+const wss = new WebSocketServer({ port: 8080 });
+
+wss.on('connection', function connection(ws) {
+ ws.on('error', console.error);
+
+ ws.on('message', function message(data, isBinary) {
+ wss.clients.forEach(function each(client) {
+ if (client !== ws && client.readyState === WebSocket.OPEN) {
+ client.send(data, { binary: isBinary });
+ }
+ });
+ });
+});
+```
+
+### Round-trip time
+
+```js
+import WebSocket from 'ws';
+
+const ws = new WebSocket('wss://websocket-echo.com/');
+
+ws.on('error', console.error);
+
+ws.on('open', function open() {
+ console.log('connected');
+ ws.send(Date.now());
+});
+
+ws.on('close', function close() {
+ console.log('disconnected');
+});
+
+ws.on('message', function message(data) {
+ console.log(`Round-trip time: ${Date.now() - data} ms`);
+
+ setTimeout(function timeout() {
+ ws.send(Date.now());
+ }, 500);
+});
+```
+
+### Use the Node.js streams API
+
+```js
+import WebSocket, { createWebSocketStream } from 'ws';
+
+const ws = new WebSocket('wss://websocket-echo.com/');
+
+const duplex = createWebSocketStream(ws, { encoding: 'utf8' });
+
+duplex.on('error', console.error);
+
+duplex.pipe(process.stdout);
+process.stdin.pipe(duplex);
+```
+
+### Other examples
+
+For a full example with a browser client communicating with a ws server, see the
+examples folder.
+
+Otherwise, see the test cases.
+
+## FAQ
+
+### How to get the IP address of the client?
+
+The remote IP address can be obtained from the raw socket.
+
+```js
+import { WebSocketServer } from 'ws';
+
+const wss = new WebSocketServer({ port: 8080 });
+
+wss.on('connection', function connection(ws, req) {
+ const ip = req.socket.remoteAddress;
+
+ ws.on('error', console.error);
+});
+```
+
+When the server runs behind a proxy like NGINX, the de-facto standard is to use
+the `X-Forwarded-For` header.
+
+```js
+wss.on('connection', function connection(ws, req) {
+ const ip = req.headers['x-forwarded-for'].split(',')[0].trim();
+
+ ws.on('error', console.error);
+});
+```
+
+### How to detect and close broken connections?
+
+Sometimes the link between the server and the client can be interrupted in a way
+that keeps both the server and the client unaware of the broken state of the
+connection (e.g. when pulling the cord).
+
+In these cases ping messages can be used as a means to verify that the remote
+endpoint is still responsive.
+
+```js
+import { WebSocketServer } from 'ws';
+
+function heartbeat() {
+ this.isAlive = true;
+}
+
+const wss = new WebSocketServer({ port: 8080 });
+
+wss.on('connection', function connection(ws) {
+ ws.isAlive = true;
+ ws.on('error', console.error);
+ ws.on('pong', heartbeat);
+});
+
+const interval = setInterval(function ping() {
+ wss.clients.forEach(function each(ws) {
+ if (ws.isAlive === false) return ws.terminate();
+
+ ws.isAlive = false;
+ ws.ping();
+ });
+}, 30000);
+
+wss.on('close', function close() {
+ clearInterval(interval);
+});
+```
+
+Pong messages are automatically sent in response to ping messages as required by
+the spec.
+
+Just like the server example above your clients might as well lose connection
+without knowing it. You might want to add a ping listener on your clients to
+prevent that. A simple implementation would be:
+
+```js
+import WebSocket from 'ws';
+
+function heartbeat() {
+ clearTimeout(this.pingTimeout);
+
+ // Use `WebSocket#terminate()`, which immediately destroys the connection,
+ // instead of `WebSocket#close()`, which waits for the close timer.
+ // Delay should be equal to the interval at which your server
+ // sends out pings plus a conservative assumption of the latency.
+ this.pingTimeout = setTimeout(() => {
+ this.terminate();
+ }, 30000 + 1000);
+}
+
+const client = new WebSocket('wss://websocket-echo.com/');
+
+client.on('error', console.error);
+client.on('open', heartbeat);
+client.on('ping', heartbeat);
+client.on('close', function clear() {
+ clearTimeout(this.pingTimeout);
+});
+```
+
+### How to connect via a proxy?
+
+Use a custom `http.Agent` implementation like [https-proxy-agent][] or
+[socks-proxy-agent][].
+
+## Changelog
+
+We're using the GitHub [releases][changelog] for changelog entries.
+
+## License
+
+[MIT](LICENSE)
+
+[`buffer.isutf8()`]: https://nodejs.org/api/buffer.html#bufferisutf8input
+[changelog]: https://github.com/websockets/ws/releases
+[client-report]: http://websockets.github.io/ws/autobahn/clients/
+[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent
+[node-zlib-bug]: https://github.com/nodejs/node/issues/8871
+[node-zlib-deflaterawdocs]:
+ https://nodejs.org/api/zlib.html#zlib_zlib_createdeflateraw_options
+[permessage-deflate]: https://tools.ietf.org/html/rfc7692
+[server-report]: http://websockets.github.io/ws/autobahn/servers/
+[session-parse-example]: ./examples/express-session-parse
+[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent
+[ws-server-options]: ./doc/ws.md#new-websocketserveroptions-callback
diff --git a/node_modules/ws/browser.js b/node_modules/ws/browser.js
new file mode 100644
index 0000000..ca4f628
--- /dev/null
+++ b/node_modules/ws/browser.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = function () {
+ throw new Error(
+ 'ws does not work in the browser. Browser clients must use the native ' +
+ 'WebSocket object'
+ );
+};
diff --git a/node_modules/ws/index.js b/node_modules/ws/index.js
new file mode 100644
index 0000000..41edb3b
--- /dev/null
+++ b/node_modules/ws/index.js
@@ -0,0 +1,13 @@
+'use strict';
+
+const WebSocket = require('./lib/websocket');
+
+WebSocket.createWebSocketStream = require('./lib/stream');
+WebSocket.Server = require('./lib/websocket-server');
+WebSocket.Receiver = require('./lib/receiver');
+WebSocket.Sender = require('./lib/sender');
+
+WebSocket.WebSocket = WebSocket;
+WebSocket.WebSocketServer = WebSocket.Server;
+
+module.exports = WebSocket;
diff --git a/node_modules/ws/lib/buffer-util.js b/node_modules/ws/lib/buffer-util.js
new file mode 100644
index 0000000..f7536e2
--- /dev/null
+++ b/node_modules/ws/lib/buffer-util.js
@@ -0,0 +1,131 @@
+'use strict';
+
+const { EMPTY_BUFFER } = require('./constants');
+
+const FastBuffer = Buffer[Symbol.species];
+
+/**
+ * Merges an array of buffers into a new buffer.
+ *
+ * @param {Buffer[]} list The array of buffers to concat
+ * @param {Number} totalLength The total length of buffers in the list
+ * @return {Buffer} The resulting buffer
+ * @public
+ */
+function concat(list, totalLength) {
+ if (list.length === 0) return EMPTY_BUFFER;
+ if (list.length === 1) return list[0];
+
+ const target = Buffer.allocUnsafe(totalLength);
+ let offset = 0;
+
+ for (let i = 0; i < list.length; i++) {
+ const buf = list[i];
+ target.set(buf, offset);
+ offset += buf.length;
+ }
+
+ if (offset < totalLength) {
+ return new FastBuffer(target.buffer, target.byteOffset, offset);
+ }
+
+ return target;
+}
+
+/**
+ * Masks a buffer using the given mask.
+ *
+ * @param {Buffer} source The buffer to mask
+ * @param {Buffer} mask The mask to use
+ * @param {Buffer} output The buffer where to store the result
+ * @param {Number} offset The offset at which to start writing
+ * @param {Number} length The number of bytes to mask.
+ * @public
+ */
+function _mask(source, mask, output, offset, length) {
+ for (let i = 0; i < length; i++) {
+ output[offset + i] = source[i] ^ mask[i & 3];
+ }
+}
+
+/**
+ * Unmasks a buffer using the given mask.
+ *
+ * @param {Buffer} buffer The buffer to unmask
+ * @param {Buffer} mask The mask to use
+ * @public
+ */
+function _unmask(buffer, mask) {
+ for (let i = 0; i < buffer.length; i++) {
+ buffer[i] ^= mask[i & 3];
+ }
+}
+
+/**
+ * Converts a buffer to an `ArrayBuffer`.
+ *
+ * @param {Buffer} buf The buffer to convert
+ * @return {ArrayBuffer} Converted buffer
+ * @public
+ */
+function toArrayBuffer(buf) {
+ if (buf.length === buf.buffer.byteLength) {
+ return buf.buffer;
+ }
+
+ return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length);
+}
+
+/**
+ * Converts `data` to a `Buffer`.
+ *
+ * @param {*} data The data to convert
+ * @return {Buffer} The buffer
+ * @throws {TypeError}
+ * @public
+ */
+function toBuffer(data) {
+ toBuffer.readOnly = true;
+
+ if (Buffer.isBuffer(data)) return data;
+
+ let buf;
+
+ if (data instanceof ArrayBuffer) {
+ buf = new FastBuffer(data);
+ } else if (ArrayBuffer.isView(data)) {
+ buf = new FastBuffer(data.buffer, data.byteOffset, data.byteLength);
+ } else {
+ buf = Buffer.from(data);
+ toBuffer.readOnly = false;
+ }
+
+ return buf;
+}
+
+module.exports = {
+ concat,
+ mask: _mask,
+ toArrayBuffer,
+ toBuffer,
+ unmask: _unmask
+};
+
+/* istanbul ignore else */
+if (!process.env.WS_NO_BUFFER_UTIL) {
+ try {
+ const bufferUtil = require('bufferutil');
+
+ module.exports.mask = function (source, mask, output, offset, length) {
+ if (length < 48) _mask(source, mask, output, offset, length);
+ else bufferUtil.mask(source, mask, output, offset, length);
+ };
+
+ module.exports.unmask = function (buffer, mask) {
+ if (buffer.length < 32) _unmask(buffer, mask);
+ else bufferUtil.unmask(buffer, mask);
+ };
+ } catch (e) {
+ // Continue regardless of the error.
+ }
+}
diff --git a/node_modules/ws/lib/constants.js b/node_modules/ws/lib/constants.js
new file mode 100644
index 0000000..d691b30
--- /dev/null
+++ b/node_modules/ws/lib/constants.js
@@ -0,0 +1,12 @@
+'use strict';
+
+module.exports = {
+ BINARY_TYPES: ['nodebuffer', 'arraybuffer', 'fragments'],
+ EMPTY_BUFFER: Buffer.alloc(0),
+ GUID: '258EAFA5-E914-47DA-95CA-C5AB0DC85B11',
+ kForOnEventAttribute: Symbol('kIsForOnEventAttribute'),
+ kListener: Symbol('kListener'),
+ kStatusCode: Symbol('status-code'),
+ kWebSocket: Symbol('websocket'),
+ NOOP: () => {}
+};
diff --git a/node_modules/ws/lib/event-target.js b/node_modules/ws/lib/event-target.js
new file mode 100644
index 0000000..fea4cbc
--- /dev/null
+++ b/node_modules/ws/lib/event-target.js
@@ -0,0 +1,292 @@
+'use strict';
+
+const { kForOnEventAttribute, kListener } = require('./constants');
+
+const kCode = Symbol('kCode');
+const kData = Symbol('kData');
+const kError = Symbol('kError');
+const kMessage = Symbol('kMessage');
+const kReason = Symbol('kReason');
+const kTarget = Symbol('kTarget');
+const kType = Symbol('kType');
+const kWasClean = Symbol('kWasClean');
+
+/**
+ * Class representing an event.
+ */
+class Event {
+ /**
+ * Create a new `Event`.
+ *
+ * @param {String} type The name of the event
+ * @throws {TypeError} If the `type` argument is not specified
+ */
+ constructor(type) {
+ this[kTarget] = null;
+ this[kType] = type;
+ }
+
+ /**
+ * @type {*}
+ */
+ get target() {
+ return this[kTarget];
+ }
+
+ /**
+ * @type {String}
+ */
+ get type() {
+ return this[kType];
+ }
+}
+
+Object.defineProperty(Event.prototype, 'target', { enumerable: true });
+Object.defineProperty(Event.prototype, 'type', { enumerable: true });
+
+/**
+ * Class representing a close event.
+ *
+ * @extends Event
+ */
+class CloseEvent extends Event {
+ /**
+ * Create a new `CloseEvent`.
+ *
+ * @param {String} type The name of the event
+ * @param {Object} [options] A dictionary object that allows for setting
+ * attributes via object members of the same name
+ * @param {Number} [options.code=0] The status code explaining why the
+ * connection was closed
+ * @param {String} [options.reason=''] A human-readable string explaining why
+ * the connection was closed
+ * @param {Boolean} [options.wasClean=false] Indicates whether or not the
+ * connection was cleanly closed
+ */
+ constructor(type, options = {}) {
+ super(type);
+
+ this[kCode] = options.code === undefined ? 0 : options.code;
+ this[kReason] = options.reason === undefined ? '' : options.reason;
+ this[kWasClean] = options.wasClean === undefined ? false : options.wasClean;
+ }
+
+ /**
+ * @type {Number}
+ */
+ get code() {
+ return this[kCode];
+ }
+
+ /**
+ * @type {String}
+ */
+ get reason() {
+ return this[kReason];
+ }
+
+ /**
+ * @type {Boolean}
+ */
+ get wasClean() {
+ return this[kWasClean];
+ }
+}
+
+Object.defineProperty(CloseEvent.prototype, 'code', { enumerable: true });
+Object.defineProperty(CloseEvent.prototype, 'reason', { enumerable: true });
+Object.defineProperty(CloseEvent.prototype, 'wasClean', { enumerable: true });
+
+/**
+ * Class representing an error event.
+ *
+ * @extends Event
+ */
+class ErrorEvent extends Event {
+ /**
+ * Create a new `ErrorEvent`.
+ *
+ * @param {String} type The name of the event
+ * @param {Object} [options] A dictionary object that allows for setting
+ * attributes via object members of the same name
+ * @param {*} [options.error=null] The error that generated this event
+ * @param {String} [options.message=''] The error message
+ */
+ constructor(type, options = {}) {
+ super(type);
+
+ this[kError] = options.error === undefined ? null : options.error;
+ this[kMessage] = options.message === undefined ? '' : options.message;
+ }
+
+ /**
+ * @type {*}
+ */
+ get error() {
+ return this[kError];
+ }
+
+ /**
+ * @type {String}
+ */
+ get message() {
+ return this[kMessage];
+ }
+}
+
+Object.defineProperty(ErrorEvent.prototype, 'error', { enumerable: true });
+Object.defineProperty(ErrorEvent.prototype, 'message', { enumerable: true });
+
+/**
+ * Class representing a message event.
+ *
+ * @extends Event
+ */
+class MessageEvent extends Event {
+ /**
+ * Create a new `MessageEvent`.
+ *
+ * @param {String} type The name of the event
+ * @param {Object} [options] A dictionary object that allows for setting
+ * attributes via object members of the same name
+ * @param {*} [options.data=null] The message content
+ */
+ constructor(type, options = {}) {
+ super(type);
+
+ this[kData] = options.data === undefined ? null : options.data;
+ }
+
+ /**
+ * @type {*}
+ */
+ get data() {
+ return this[kData];
+ }
+}
+
+Object.defineProperty(MessageEvent.prototype, 'data', { enumerable: true });
+
+/**
+ * This provides methods for emulating the `EventTarget` interface. It's not
+ * meant to be used directly.
+ *
+ * @mixin
+ */
+const EventTarget = {
+ /**
+ * Register an event listener.
+ *
+ * @param {String} type A string representing the event type to listen for
+ * @param {(Function|Object)} handler The listener to add
+ * @param {Object} [options] An options object specifies characteristics about
+ * the event listener
+ * @param {Boolean} [options.once=false] A `Boolean` indicating that the
+ * listener should be invoked at most once after being added. If `true`,
+ * the listener would be automatically removed when invoked.
+ * @public
+ */
+ addEventListener(type, handler, options = {}) {
+ for (const listener of this.listeners(type)) {
+ if (
+ !options[kForOnEventAttribute] &&
+ listener[kListener] === handler &&
+ !listener[kForOnEventAttribute]
+ ) {
+ return;
+ }
+ }
+
+ let wrapper;
+
+ if (type === 'message') {
+ wrapper = function onMessage(data, isBinary) {
+ const event = new MessageEvent('message', {
+ data: isBinary ? data : data.toString()
+ });
+
+ event[kTarget] = this;
+ callListener(handler, this, event);
+ };
+ } else if (type === 'close') {
+ wrapper = function onClose(code, message) {
+ const event = new CloseEvent('close', {
+ code,
+ reason: message.toString(),
+ wasClean: this._closeFrameReceived && this._closeFrameSent
+ });
+
+ event[kTarget] = this;
+ callListener(handler, this, event);
+ };
+ } else if (type === 'error') {
+ wrapper = function onError(error) {
+ const event = new ErrorEvent('error', {
+ error,
+ message: error.message
+ });
+
+ event[kTarget] = this;
+ callListener(handler, this, event);
+ };
+ } else if (type === 'open') {
+ wrapper = function onOpen() {
+ const event = new Event('open');
+
+ event[kTarget] = this;
+ callListener(handler, this, event);
+ };
+ } else {
+ return;
+ }
+
+ wrapper[kForOnEventAttribute] = !!options[kForOnEventAttribute];
+ wrapper[kListener] = handler;
+
+ if (options.once) {
+ this.once(type, wrapper);
+ } else {
+ this.on(type, wrapper);
+ }
+ },
+
+ /**
+ * Remove an event listener.
+ *
+ * @param {String} type A string representing the event type to remove
+ * @param {(Function|Object)} handler The listener to remove
+ * @public
+ */
+ removeEventListener(type, handler) {
+ for (const listener of this.listeners(type)) {
+ if (listener[kListener] === handler && !listener[kForOnEventAttribute]) {
+ this.removeListener(type, listener);
+ break;
+ }
+ }
+ }
+};
+
+module.exports = {
+ CloseEvent,
+ ErrorEvent,
+ Event,
+ EventTarget,
+ MessageEvent
+};
+
+/**
+ * Call an event listener
+ *
+ * @param {(Function|Object)} listener The listener to call
+ * @param {*} thisArg The value to use as `this`` when calling the listener
+ * @param {Event} event The event to pass to the listener
+ * @private
+ */
+function callListener(listener, thisArg, event) {
+ if (typeof listener === 'object' && listener.handleEvent) {
+ listener.handleEvent.call(listener, event);
+ } else {
+ listener.call(thisArg, event);
+ }
+}
diff --git a/node_modules/ws/lib/extension.js b/node_modules/ws/lib/extension.js
new file mode 100644
index 0000000..3d7895c
--- /dev/null
+++ b/node_modules/ws/lib/extension.js
@@ -0,0 +1,203 @@
+'use strict';
+
+const { tokenChars } = require('./validation');
+
+/**
+ * Adds an offer to the map of extension offers or a parameter to the map of
+ * parameters.
+ *
+ * @param {Object} dest The map of extension offers or parameters
+ * @param {String} name The extension or parameter name
+ * @param {(Object|Boolean|String)} elem The extension parameters or the
+ * parameter value
+ * @private
+ */
+function push(dest, name, elem) {
+ if (dest[name] === undefined) dest[name] = [elem];
+ else dest[name].push(elem);
+}
+
+/**
+ * Parses the `Sec-WebSocket-Extensions` header into an object.
+ *
+ * @param {String} header The field value of the header
+ * @return {Object} The parsed object
+ * @public
+ */
+function parse(header) {
+ const offers = Object.create(null);
+ let params = Object.create(null);
+ let mustUnescape = false;
+ let isEscaping = false;
+ let inQuotes = false;
+ let extensionName;
+ let paramName;
+ let start = -1;
+ let code = -1;
+ let end = -1;
+ let i = 0;
+
+ for (; i < header.length; i++) {
+ code = header.charCodeAt(i);
+
+ if (extensionName === undefined) {
+ if (end === -1 && tokenChars[code] === 1) {
+ if (start === -1) start = i;
+ } else if (
+ i !== 0 &&
+ (code === 0x20 /* ' ' */ || code === 0x09) /* '\t' */
+ ) {
+ if (end === -1 && start !== -1) end = i;
+ } else if (code === 0x3b /* ';' */ || code === 0x2c /* ',' */) {
+ if (start === -1) {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+
+ if (end === -1) end = i;
+ const name = header.slice(start, end);
+ if (code === 0x2c) {
+ push(offers, name, params);
+ params = Object.create(null);
+ } else {
+ extensionName = name;
+ }
+
+ start = end = -1;
+ } else {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+ } else if (paramName === undefined) {
+ if (end === -1 && tokenChars[code] === 1) {
+ if (start === -1) start = i;
+ } else if (code === 0x20 || code === 0x09) {
+ if (end === -1 && start !== -1) end = i;
+ } else if (code === 0x3b || code === 0x2c) {
+ if (start === -1) {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+
+ if (end === -1) end = i;
+ push(params, header.slice(start, end), true);
+ if (code === 0x2c) {
+ push(offers, extensionName, params);
+ params = Object.create(null);
+ extensionName = undefined;
+ }
+
+ start = end = -1;
+ } else if (code === 0x3d /* '=' */ && start !== -1 && end === -1) {
+ paramName = header.slice(start, i);
+ start = end = -1;
+ } else {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+ } else {
+ //
+ // The value of a quoted-string after unescaping must conform to the
+ // token ABNF, so only token characters are valid.
+ // Ref: https://tools.ietf.org/html/rfc6455#section-9.1
+ //
+ if (isEscaping) {
+ if (tokenChars[code] !== 1) {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+ if (start === -1) start = i;
+ else if (!mustUnescape) mustUnescape = true;
+ isEscaping = false;
+ } else if (inQuotes) {
+ if (tokenChars[code] === 1) {
+ if (start === -1) start = i;
+ } else if (code === 0x22 /* '"' */ && start !== -1) {
+ inQuotes = false;
+ end = i;
+ } else if (code === 0x5c /* '\' */) {
+ isEscaping = true;
+ } else {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+ } else if (code === 0x22 && header.charCodeAt(i - 1) === 0x3d) {
+ inQuotes = true;
+ } else if (end === -1 && tokenChars[code] === 1) {
+ if (start === -1) start = i;
+ } else if (start !== -1 && (code === 0x20 || code === 0x09)) {
+ if (end === -1) end = i;
+ } else if (code === 0x3b || code === 0x2c) {
+ if (start === -1) {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+
+ if (end === -1) end = i;
+ let value = header.slice(start, end);
+ if (mustUnescape) {
+ value = value.replace(/\\/g, '');
+ mustUnescape = false;
+ }
+ push(params, paramName, value);
+ if (code === 0x2c) {
+ push(offers, extensionName, params);
+ params = Object.create(null);
+ extensionName = undefined;
+ }
+
+ paramName = undefined;
+ start = end = -1;
+ } else {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+ }
+ }
+
+ if (start === -1 || inQuotes || code === 0x20 || code === 0x09) {
+ throw new SyntaxError('Unexpected end of input');
+ }
+
+ if (end === -1) end = i;
+ const token = header.slice(start, end);
+ if (extensionName === undefined) {
+ push(offers, token, params);
+ } else {
+ if (paramName === undefined) {
+ push(params, token, true);
+ } else if (mustUnescape) {
+ push(params, paramName, token.replace(/\\/g, ''));
+ } else {
+ push(params, paramName, token);
+ }
+ push(offers, extensionName, params);
+ }
+
+ return offers;
+}
+
+/**
+ * Builds the `Sec-WebSocket-Extensions` header field value.
+ *
+ * @param {Object} extensions The map of extensions and parameters to format
+ * @return {String} A string representing the given object
+ * @public
+ */
+function format(extensions) {
+ return Object.keys(extensions)
+ .map((extension) => {
+ let configurations = extensions[extension];
+ if (!Array.isArray(configurations)) configurations = [configurations];
+ return configurations
+ .map((params) => {
+ return [extension]
+ .concat(
+ Object.keys(params).map((k) => {
+ let values = params[k];
+ if (!Array.isArray(values)) values = [values];
+ return values
+ .map((v) => (v === true ? k : `${k}=${v}`))
+ .join('; ');
+ })
+ )
+ .join('; ');
+ })
+ .join(', ');
+ })
+ .join(', ');
+}
+
+module.exports = { format, parse };
diff --git a/node_modules/ws/lib/limiter.js b/node_modules/ws/lib/limiter.js
new file mode 100644
index 0000000..3fd3578
--- /dev/null
+++ b/node_modules/ws/lib/limiter.js
@@ -0,0 +1,55 @@
+'use strict';
+
+const kDone = Symbol('kDone');
+const kRun = Symbol('kRun');
+
+/**
+ * A very simple job queue with adjustable concurrency. Adapted from
+ * https://github.com/STRML/async-limiter
+ */
+class Limiter {
+ /**
+ * Creates a new `Limiter`.
+ *
+ * @param {Number} [concurrency=Infinity] The maximum number of jobs allowed
+ * to run concurrently
+ */
+ constructor(concurrency) {
+ this[kDone] = () => {
+ this.pending--;
+ this[kRun]();
+ };
+ this.concurrency = concurrency || Infinity;
+ this.jobs = [];
+ this.pending = 0;
+ }
+
+ /**
+ * Adds a job to the queue.
+ *
+ * @param {Function} job The job to run
+ * @public
+ */
+ add(job) {
+ this.jobs.push(job);
+ this[kRun]();
+ }
+
+ /**
+ * Removes a job from the queue and runs it if possible.
+ *
+ * @private
+ */
+ [kRun]() {
+ if (this.pending === this.concurrency) return;
+
+ if (this.jobs.length) {
+ const job = this.jobs.shift();
+
+ this.pending++;
+ job(this[kDone]);
+ }
+ }
+}
+
+module.exports = Limiter;
diff --git a/node_modules/ws/lib/permessage-deflate.js b/node_modules/ws/lib/permessage-deflate.js
new file mode 100644
index 0000000..77d918b
--- /dev/null
+++ b/node_modules/ws/lib/permessage-deflate.js
@@ -0,0 +1,514 @@
+'use strict';
+
+const zlib = require('zlib');
+
+const bufferUtil = require('./buffer-util');
+const Limiter = require('./limiter');
+const { kStatusCode } = require('./constants');
+
+const FastBuffer = Buffer[Symbol.species];
+const TRAILER = Buffer.from([0x00, 0x00, 0xff, 0xff]);
+const kPerMessageDeflate = Symbol('permessage-deflate');
+const kTotalLength = Symbol('total-length');
+const kCallback = Symbol('callback');
+const kBuffers = Symbol('buffers');
+const kError = Symbol('error');
+
+//
+// We limit zlib concurrency, which prevents severe memory fragmentation
+// as documented in https://github.com/nodejs/node/issues/8871#issuecomment-250915913
+// and https://github.com/websockets/ws/issues/1202
+//
+// Intentionally global; it's the global thread pool that's an issue.
+//
+let zlibLimiter;
+
+/**
+ * permessage-deflate implementation.
+ */
+class PerMessageDeflate {
+ /**
+ * Creates a PerMessageDeflate instance.
+ *
+ * @param {Object} [options] Configuration options
+ * @param {(Boolean|Number)} [options.clientMaxWindowBits] Advertise support
+ * for, or request, a custom client window size
+ * @param {Boolean} [options.clientNoContextTakeover=false] Advertise/
+ * acknowledge disabling of client context takeover
+ * @param {Number} [options.concurrencyLimit=10] The number of concurrent
+ * calls to zlib
+ * @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the
+ * use of a custom server window size
+ * @param {Boolean} [options.serverNoContextTakeover=false] Request/accept
+ * disabling of server context takeover
+ * @param {Number} [options.threshold=1024] Size (in bytes) below which
+ * messages should not be compressed if context takeover is disabled
+ * @param {Object} [options.zlibDeflateOptions] Options to pass to zlib on
+ * deflate
+ * @param {Object} [options.zlibInflateOptions] Options to pass to zlib on
+ * inflate
+ * @param {Boolean} [isServer=false] Create the instance in either server or
+ * client mode
+ * @param {Number} [maxPayload=0] The maximum allowed message length
+ */
+ constructor(options, isServer, maxPayload) {
+ this._maxPayload = maxPayload | 0;
+ this._options = options || {};
+ this._threshold =
+ this._options.threshold !== undefined ? this._options.threshold : 1024;
+ this._isServer = !!isServer;
+ this._deflate = null;
+ this._inflate = null;
+
+ this.params = null;
+
+ if (!zlibLimiter) {
+ const concurrency =
+ this._options.concurrencyLimit !== undefined
+ ? this._options.concurrencyLimit
+ : 10;
+ zlibLimiter = new Limiter(concurrency);
+ }
+ }
+
+ /**
+ * @type {String}
+ */
+ static get extensionName() {
+ return 'permessage-deflate';
+ }
+
+ /**
+ * Create an extension negotiation offer.
+ *
+ * @return {Object} Extension parameters
+ * @public
+ */
+ offer() {
+ const params = {};
+
+ if (this._options.serverNoContextTakeover) {
+ params.server_no_context_takeover = true;
+ }
+ if (this._options.clientNoContextTakeover) {
+ params.client_no_context_takeover = true;
+ }
+ if (this._options.serverMaxWindowBits) {
+ params.server_max_window_bits = this._options.serverMaxWindowBits;
+ }
+ if (this._options.clientMaxWindowBits) {
+ params.client_max_window_bits = this._options.clientMaxWindowBits;
+ } else if (this._options.clientMaxWindowBits == null) {
+ params.client_max_window_bits = true;
+ }
+
+ return params;
+ }
+
+ /**
+ * Accept an extension negotiation offer/response.
+ *
+ * @param {Array} configurations The extension negotiation offers/reponse
+ * @return {Object} Accepted configuration
+ * @public
+ */
+ accept(configurations) {
+ configurations = this.normalizeParams(configurations);
+
+ this.params = this._isServer
+ ? this.acceptAsServer(configurations)
+ : this.acceptAsClient(configurations);
+
+ return this.params;
+ }
+
+ /**
+ * Releases all resources used by the extension.
+ *
+ * @public
+ */
+ cleanup() {
+ if (this._inflate) {
+ this._inflate.close();
+ this._inflate = null;
+ }
+
+ if (this._deflate) {
+ const callback = this._deflate[kCallback];
+
+ this._deflate.close();
+ this._deflate = null;
+
+ if (callback) {
+ callback(
+ new Error(
+ 'The deflate stream was closed while data was being processed'
+ )
+ );
+ }
+ }
+ }
+
+ /**
+ * Accept an extension negotiation offer.
+ *
+ * @param {Array} offers The extension negotiation offers
+ * @return {Object} Accepted configuration
+ * @private
+ */
+ acceptAsServer(offers) {
+ const opts = this._options;
+ const accepted = offers.find((params) => {
+ if (
+ (opts.serverNoContextTakeover === false &&
+ params.server_no_context_takeover) ||
+ (params.server_max_window_bits &&
+ (opts.serverMaxWindowBits === false ||
+ (typeof opts.serverMaxWindowBits === 'number' &&
+ opts.serverMaxWindowBits > params.server_max_window_bits))) ||
+ (typeof opts.clientMaxWindowBits === 'number' &&
+ !params.client_max_window_bits)
+ ) {
+ return false;
+ }
+
+ return true;
+ });
+
+ if (!accepted) {
+ throw new Error('None of the extension offers can be accepted');
+ }
+
+ if (opts.serverNoContextTakeover) {
+ accepted.server_no_context_takeover = true;
+ }
+ if (opts.clientNoContextTakeover) {
+ accepted.client_no_context_takeover = true;
+ }
+ if (typeof opts.serverMaxWindowBits === 'number') {
+ accepted.server_max_window_bits = opts.serverMaxWindowBits;
+ }
+ if (typeof opts.clientMaxWindowBits === 'number') {
+ accepted.client_max_window_bits = opts.clientMaxWindowBits;
+ } else if (
+ accepted.client_max_window_bits === true ||
+ opts.clientMaxWindowBits === false
+ ) {
+ delete accepted.client_max_window_bits;
+ }
+
+ return accepted;
+ }
+
+ /**
+ * Accept the extension negotiation response.
+ *
+ * @param {Array} response The extension negotiation response
+ * @return {Object} Accepted configuration
+ * @private
+ */
+ acceptAsClient(response) {
+ const params = response[0];
+
+ if (
+ this._options.clientNoContextTakeover === false &&
+ params.client_no_context_takeover
+ ) {
+ throw new Error('Unexpected parameter "client_no_context_takeover"');
+ }
+
+ if (!params.client_max_window_bits) {
+ if (typeof this._options.clientMaxWindowBits === 'number') {
+ params.client_max_window_bits = this._options.clientMaxWindowBits;
+ }
+ } else if (
+ this._options.clientMaxWindowBits === false ||
+ (typeof this._options.clientMaxWindowBits === 'number' &&
+ params.client_max_window_bits > this._options.clientMaxWindowBits)
+ ) {
+ throw new Error(
+ 'Unexpected or invalid parameter "client_max_window_bits"'
+ );
+ }
+
+ return params;
+ }
+
+ /**
+ * Normalize parameters.
+ *
+ * @param {Array} configurations The extension negotiation offers/reponse
+ * @return {Array} The offers/response with normalized parameters
+ * @private
+ */
+ normalizeParams(configurations) {
+ configurations.forEach((params) => {
+ Object.keys(params).forEach((key) => {
+ let value = params[key];
+
+ if (value.length > 1) {
+ throw new Error(`Parameter "${key}" must have only a single value`);
+ }
+
+ value = value[0];
+
+ if (key === 'client_max_window_bits') {
+ if (value !== true) {
+ const num = +value;
+ if (!Number.isInteger(num) || num < 8 || num > 15) {
+ throw new TypeError(
+ `Invalid value for parameter "${key}": ${value}`
+ );
+ }
+ value = num;
+ } else if (!this._isServer) {
+ throw new TypeError(
+ `Invalid value for parameter "${key}": ${value}`
+ );
+ }
+ } else if (key === 'server_max_window_bits') {
+ const num = +value;
+ if (!Number.isInteger(num) || num < 8 || num > 15) {
+ throw new TypeError(
+ `Invalid value for parameter "${key}": ${value}`
+ );
+ }
+ value = num;
+ } else if (
+ key === 'client_no_context_takeover' ||
+ key === 'server_no_context_takeover'
+ ) {
+ if (value !== true) {
+ throw new TypeError(
+ `Invalid value for parameter "${key}": ${value}`
+ );
+ }
+ } else {
+ throw new Error(`Unknown parameter "${key}"`);
+ }
+
+ params[key] = value;
+ });
+ });
+
+ return configurations;
+ }
+
+ /**
+ * Decompress data. Concurrency limited.
+ *
+ * @param {Buffer} data Compressed data
+ * @param {Boolean} fin Specifies whether or not this is the last fragment
+ * @param {Function} callback Callback
+ * @public
+ */
+ decompress(data, fin, callback) {
+ zlibLimiter.add((done) => {
+ this._decompress(data, fin, (err, result) => {
+ done();
+ callback(err, result);
+ });
+ });
+ }
+
+ /**
+ * Compress data. Concurrency limited.
+ *
+ * @param {(Buffer|String)} data Data to compress
+ * @param {Boolean} fin Specifies whether or not this is the last fragment
+ * @param {Function} callback Callback
+ * @public
+ */
+ compress(data, fin, callback) {
+ zlibLimiter.add((done) => {
+ this._compress(data, fin, (err, result) => {
+ done();
+ callback(err, result);
+ });
+ });
+ }
+
+ /**
+ * Decompress data.
+ *
+ * @param {Buffer} data Compressed data
+ * @param {Boolean} fin Specifies whether or not this is the last fragment
+ * @param {Function} callback Callback
+ * @private
+ */
+ _decompress(data, fin, callback) {
+ const endpoint = this._isServer ? 'client' : 'server';
+
+ if (!this._inflate) {
+ const key = `${endpoint}_max_window_bits`;
+ const windowBits =
+ typeof this.params[key] !== 'number'
+ ? zlib.Z_DEFAULT_WINDOWBITS
+ : this.params[key];
+
+ this._inflate = zlib.createInflateRaw({
+ ...this._options.zlibInflateOptions,
+ windowBits
+ });
+ this._inflate[kPerMessageDeflate] = this;
+ this._inflate[kTotalLength] = 0;
+ this._inflate[kBuffers] = [];
+ this._inflate.on('error', inflateOnError);
+ this._inflate.on('data', inflateOnData);
+ }
+
+ this._inflate[kCallback] = callback;
+
+ this._inflate.write(data);
+ if (fin) this._inflate.write(TRAILER);
+
+ this._inflate.flush(() => {
+ const err = this._inflate[kError];
+
+ if (err) {
+ this._inflate.close();
+ this._inflate = null;
+ callback(err);
+ return;
+ }
+
+ const data = bufferUtil.concat(
+ this._inflate[kBuffers],
+ this._inflate[kTotalLength]
+ );
+
+ if (this._inflate._readableState.endEmitted) {
+ this._inflate.close();
+ this._inflate = null;
+ } else {
+ this._inflate[kTotalLength] = 0;
+ this._inflate[kBuffers] = [];
+
+ if (fin && this.params[`${endpoint}_no_context_takeover`]) {
+ this._inflate.reset();
+ }
+ }
+
+ callback(null, data);
+ });
+ }
+
+ /**
+ * Compress data.
+ *
+ * @param {(Buffer|String)} data Data to compress
+ * @param {Boolean} fin Specifies whether or not this is the last fragment
+ * @param {Function} callback Callback
+ * @private
+ */
+ _compress(data, fin, callback) {
+ const endpoint = this._isServer ? 'server' : 'client';
+
+ if (!this._deflate) {
+ const key = `${endpoint}_max_window_bits`;
+ const windowBits =
+ typeof this.params[key] !== 'number'
+ ? zlib.Z_DEFAULT_WINDOWBITS
+ : this.params[key];
+
+ this._deflate = zlib.createDeflateRaw({
+ ...this._options.zlibDeflateOptions,
+ windowBits
+ });
+
+ this._deflate[kTotalLength] = 0;
+ this._deflate[kBuffers] = [];
+
+ this._deflate.on('data', deflateOnData);
+ }
+
+ this._deflate[kCallback] = callback;
+
+ this._deflate.write(data);
+ this._deflate.flush(zlib.Z_SYNC_FLUSH, () => {
+ if (!this._deflate) {
+ //
+ // The deflate stream was closed while data was being processed.
+ //
+ return;
+ }
+
+ let data = bufferUtil.concat(
+ this._deflate[kBuffers],
+ this._deflate[kTotalLength]
+ );
+
+ if (fin) {
+ data = new FastBuffer(data.buffer, data.byteOffset, data.length - 4);
+ }
+
+ //
+ // Ensure that the callback will not be called again in
+ // `PerMessageDeflate#cleanup()`.
+ //
+ this._deflate[kCallback] = null;
+
+ this._deflate[kTotalLength] = 0;
+ this._deflate[kBuffers] = [];
+
+ if (fin && this.params[`${endpoint}_no_context_takeover`]) {
+ this._deflate.reset();
+ }
+
+ callback(null, data);
+ });
+ }
+}
+
+module.exports = PerMessageDeflate;
+
+/**
+ * The listener of the `zlib.DeflateRaw` stream `'data'` event.
+ *
+ * @param {Buffer} chunk A chunk of data
+ * @private
+ */
+function deflateOnData(chunk) {
+ this[kBuffers].push(chunk);
+ this[kTotalLength] += chunk.length;
+}
+
+/**
+ * The listener of the `zlib.InflateRaw` stream `'data'` event.
+ *
+ * @param {Buffer} chunk A chunk of data
+ * @private
+ */
+function inflateOnData(chunk) {
+ this[kTotalLength] += chunk.length;
+
+ if (
+ this[kPerMessageDeflate]._maxPayload < 1 ||
+ this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload
+ ) {
+ this[kBuffers].push(chunk);
+ return;
+ }
+
+ this[kError] = new RangeError('Max payload size exceeded');
+ this[kError].code = 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH';
+ this[kError][kStatusCode] = 1009;
+ this.removeListener('data', inflateOnData);
+ this.reset();
+}
+
+/**
+ * The listener of the `zlib.InflateRaw` stream `'error'` event.
+ *
+ * @param {Error} err The emitted error
+ * @private
+ */
+function inflateOnError(err) {
+ //
+ // There is no need to call `Zlib#close()` as the handle is automatically
+ // closed when an error is emitted.
+ //
+ this[kPerMessageDeflate]._inflate = null;
+ err[kStatusCode] = 1007;
+ this[kCallback](err);
+}
diff --git a/node_modules/ws/lib/receiver.js b/node_modules/ws/lib/receiver.js
new file mode 100644
index 0000000..96f572c
--- /dev/null
+++ b/node_modules/ws/lib/receiver.js
@@ -0,0 +1,627 @@
+'use strict';
+
+const { Writable } = require('stream');
+
+const PerMessageDeflate = require('./permessage-deflate');
+const {
+ BINARY_TYPES,
+ EMPTY_BUFFER,
+ kStatusCode,
+ kWebSocket
+} = require('./constants');
+const { concat, toArrayBuffer, unmask } = require('./buffer-util');
+const { isValidStatusCode, isValidUTF8 } = require('./validation');
+
+const FastBuffer = Buffer[Symbol.species];
+const GET_INFO = 0;
+const GET_PAYLOAD_LENGTH_16 = 1;
+const GET_PAYLOAD_LENGTH_64 = 2;
+const GET_MASK = 3;
+const GET_DATA = 4;
+const INFLATING = 5;
+
+/**
+ * HyBi Receiver implementation.
+ *
+ * @extends Writable
+ */
+class Receiver extends Writable {
+ /**
+ * Creates a Receiver instance.
+ *
+ * @param {Object} [options] Options object
+ * @param {String} [options.binaryType=nodebuffer] The type for binary data
+ * @param {Object} [options.extensions] An object containing the negotiated
+ * extensions
+ * @param {Boolean} [options.isServer=false] Specifies whether to operate in
+ * client or server mode
+ * @param {Number} [options.maxPayload=0] The maximum allowed message length
+ * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
+ * not to skip UTF-8 validation for text and close messages
+ */
+ constructor(options = {}) {
+ super();
+
+ this._binaryType = options.binaryType || BINARY_TYPES[0];
+ this._extensions = options.extensions || {};
+ this._isServer = !!options.isServer;
+ this._maxPayload = options.maxPayload | 0;
+ this._skipUTF8Validation = !!options.skipUTF8Validation;
+ this[kWebSocket] = undefined;
+
+ this._bufferedBytes = 0;
+ this._buffers = [];
+
+ this._compressed = false;
+ this._payloadLength = 0;
+ this._mask = undefined;
+ this._fragmented = 0;
+ this._masked = false;
+ this._fin = false;
+ this._opcode = 0;
+
+ this._totalPayloadLength = 0;
+ this._messageLength = 0;
+ this._fragments = [];
+
+ this._state = GET_INFO;
+ this._loop = false;
+ }
+
+ /**
+ * Implements `Writable.prototype._write()`.
+ *
+ * @param {Buffer} chunk The chunk of data to write
+ * @param {String} encoding The character encoding of `chunk`
+ * @param {Function} cb Callback
+ * @private
+ */
+ _write(chunk, encoding, cb) {
+ if (this._opcode === 0x08 && this._state == GET_INFO) return cb();
+
+ this._bufferedBytes += chunk.length;
+ this._buffers.push(chunk);
+ this.startLoop(cb);
+ }
+
+ /**
+ * Consumes `n` bytes from the buffered data.
+ *
+ * @param {Number} n The number of bytes to consume
+ * @return {Buffer} The consumed bytes
+ * @private
+ */
+ consume(n) {
+ this._bufferedBytes -= n;
+
+ if (n === this._buffers[0].length) return this._buffers.shift();
+
+ if (n < this._buffers[0].length) {
+ const buf = this._buffers[0];
+ this._buffers[0] = new FastBuffer(
+ buf.buffer,
+ buf.byteOffset + n,
+ buf.length - n
+ );
+
+ return new FastBuffer(buf.buffer, buf.byteOffset, n);
+ }
+
+ const dst = Buffer.allocUnsafe(n);
+
+ do {
+ const buf = this._buffers[0];
+ const offset = dst.length - n;
+
+ if (n >= buf.length) {
+ dst.set(this._buffers.shift(), offset);
+ } else {
+ dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset);
+ this._buffers[0] = new FastBuffer(
+ buf.buffer,
+ buf.byteOffset + n,
+ buf.length - n
+ );
+ }
+
+ n -= buf.length;
+ } while (n > 0);
+
+ return dst;
+ }
+
+ /**
+ * Starts the parsing loop.
+ *
+ * @param {Function} cb Callback
+ * @private
+ */
+ startLoop(cb) {
+ let err;
+ this._loop = true;
+
+ do {
+ switch (this._state) {
+ case GET_INFO:
+ err = this.getInfo();
+ break;
+ case GET_PAYLOAD_LENGTH_16:
+ err = this.getPayloadLength16();
+ break;
+ case GET_PAYLOAD_LENGTH_64:
+ err = this.getPayloadLength64();
+ break;
+ case GET_MASK:
+ this.getMask();
+ break;
+ case GET_DATA:
+ err = this.getData(cb);
+ break;
+ default:
+ // `INFLATING`
+ this._loop = false;
+ return;
+ }
+ } while (this._loop);
+
+ cb(err);
+ }
+
+ /**
+ * Reads the first two bytes of a frame.
+ *
+ * @return {(RangeError|undefined)} A possible error
+ * @private
+ */
+ getInfo() {
+ if (this._bufferedBytes < 2) {
+ this._loop = false;
+ return;
+ }
+
+ const buf = this.consume(2);
+
+ if ((buf[0] & 0x30) !== 0x00) {
+ this._loop = false;
+ return error(
+ RangeError,
+ 'RSV2 and RSV3 must be clear',
+ true,
+ 1002,
+ 'WS_ERR_UNEXPECTED_RSV_2_3'
+ );
+ }
+
+ const compressed = (buf[0] & 0x40) === 0x40;
+
+ if (compressed && !this._extensions[PerMessageDeflate.extensionName]) {
+ this._loop = false;
+ return error(
+ RangeError,
+ 'RSV1 must be clear',
+ true,
+ 1002,
+ 'WS_ERR_UNEXPECTED_RSV_1'
+ );
+ }
+
+ this._fin = (buf[0] & 0x80) === 0x80;
+ this._opcode = buf[0] & 0x0f;
+ this._payloadLength = buf[1] & 0x7f;
+
+ if (this._opcode === 0x00) {
+ if (compressed) {
+ this._loop = false;
+ return error(
+ RangeError,
+ 'RSV1 must be clear',
+ true,
+ 1002,
+ 'WS_ERR_UNEXPECTED_RSV_1'
+ );
+ }
+
+ if (!this._fragmented) {
+ this._loop = false;
+ return error(
+ RangeError,
+ 'invalid opcode 0',
+ true,
+ 1002,
+ 'WS_ERR_INVALID_OPCODE'
+ );
+ }
+
+ this._opcode = this._fragmented;
+ } else if (this._opcode === 0x01 || this._opcode === 0x02) {
+ if (this._fragmented) {
+ this._loop = false;
+ return error(
+ RangeError,
+ `invalid opcode ${this._opcode}`,
+ true,
+ 1002,
+ 'WS_ERR_INVALID_OPCODE'
+ );
+ }
+
+ this._compressed = compressed;
+ } else if (this._opcode > 0x07 && this._opcode < 0x0b) {
+ if (!this._fin) {
+ this._loop = false;
+ return error(
+ RangeError,
+ 'FIN must be set',
+ true,
+ 1002,
+ 'WS_ERR_EXPECTED_FIN'
+ );
+ }
+
+ if (compressed) {
+ this._loop = false;
+ return error(
+ RangeError,
+ 'RSV1 must be clear',
+ true,
+ 1002,
+ 'WS_ERR_UNEXPECTED_RSV_1'
+ );
+ }
+
+ if (
+ this._payloadLength > 0x7d ||
+ (this._opcode === 0x08 && this._payloadLength === 1)
+ ) {
+ this._loop = false;
+ return error(
+ RangeError,
+ `invalid payload length ${this._payloadLength}`,
+ true,
+ 1002,
+ 'WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH'
+ );
+ }
+ } else {
+ this._loop = false;
+ return error(
+ RangeError,
+ `invalid opcode ${this._opcode}`,
+ true,
+ 1002,
+ 'WS_ERR_INVALID_OPCODE'
+ );
+ }
+
+ if (!this._fin && !this._fragmented) this._fragmented = this._opcode;
+ this._masked = (buf[1] & 0x80) === 0x80;
+
+ if (this._isServer) {
+ if (!this._masked) {
+ this._loop = false;
+ return error(
+ RangeError,
+ 'MASK must be set',
+ true,
+ 1002,
+ 'WS_ERR_EXPECTED_MASK'
+ );
+ }
+ } else if (this._masked) {
+ this._loop = false;
+ return error(
+ RangeError,
+ 'MASK must be clear',
+ true,
+ 1002,
+ 'WS_ERR_UNEXPECTED_MASK'
+ );
+ }
+
+ if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16;
+ else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64;
+ else return this.haveLength();
+ }
+
+ /**
+ * Gets extended payload length (7+16).
+ *
+ * @return {(RangeError|undefined)} A possible error
+ * @private
+ */
+ getPayloadLength16() {
+ if (this._bufferedBytes < 2) {
+ this._loop = false;
+ return;
+ }
+
+ this._payloadLength = this.consume(2).readUInt16BE(0);
+ return this.haveLength();
+ }
+
+ /**
+ * Gets extended payload length (7+64).
+ *
+ * @return {(RangeError|undefined)} A possible error
+ * @private
+ */
+ getPayloadLength64() {
+ if (this._bufferedBytes < 8) {
+ this._loop = false;
+ return;
+ }
+
+ const buf = this.consume(8);
+ const num = buf.readUInt32BE(0);
+
+ //
+ // The maximum safe integer in JavaScript is 2^53 - 1. An error is returned
+ // if payload length is greater than this number.
+ //
+ if (num > Math.pow(2, 53 - 32) - 1) {
+ this._loop = false;
+ return error(
+ RangeError,
+ 'Unsupported WebSocket frame: payload length > 2^53 - 1',
+ false,
+ 1009,
+ 'WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH'
+ );
+ }
+
+ this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4);
+ return this.haveLength();
+ }
+
+ /**
+ * Payload length has been read.
+ *
+ * @return {(RangeError|undefined)} A possible error
+ * @private
+ */
+ haveLength() {
+ if (this._payloadLength && this._opcode < 0x08) {
+ this._totalPayloadLength += this._payloadLength;
+ if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) {
+ this._loop = false;
+ return error(
+ RangeError,
+ 'Max payload size exceeded',
+ false,
+ 1009,
+ 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'
+ );
+ }
+ }
+
+ if (this._masked) this._state = GET_MASK;
+ else this._state = GET_DATA;
+ }
+
+ /**
+ * Reads mask bytes.
+ *
+ * @private
+ */
+ getMask() {
+ if (this._bufferedBytes < 4) {
+ this._loop = false;
+ return;
+ }
+
+ this._mask = this.consume(4);
+ this._state = GET_DATA;
+ }
+
+ /**
+ * Reads data bytes.
+ *
+ * @param {Function} cb Callback
+ * @return {(Error|RangeError|undefined)} A possible error
+ * @private
+ */
+ getData(cb) {
+ let data = EMPTY_BUFFER;
+
+ if (this._payloadLength) {
+ if (this._bufferedBytes < this._payloadLength) {
+ this._loop = false;
+ return;
+ }
+
+ data = this.consume(this._payloadLength);
+
+ if (
+ this._masked &&
+ (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0
+ ) {
+ unmask(data, this._mask);
+ }
+ }
+
+ if (this._opcode > 0x07) return this.controlMessage(data);
+
+ if (this._compressed) {
+ this._state = INFLATING;
+ this.decompress(data, cb);
+ return;
+ }
+
+ if (data.length) {
+ //
+ // This message is not compressed so its length is the sum of the payload
+ // length of all fragments.
+ //
+ this._messageLength = this._totalPayloadLength;
+ this._fragments.push(data);
+ }
+
+ return this.dataMessage();
+ }
+
+ /**
+ * Decompresses data.
+ *
+ * @param {Buffer} data Compressed data
+ * @param {Function} cb Callback
+ * @private
+ */
+ decompress(data, cb) {
+ const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
+
+ perMessageDeflate.decompress(data, this._fin, (err, buf) => {
+ if (err) return cb(err);
+
+ if (buf.length) {
+ this._messageLength += buf.length;
+ if (this._messageLength > this._maxPayload && this._maxPayload > 0) {
+ return cb(
+ error(
+ RangeError,
+ 'Max payload size exceeded',
+ false,
+ 1009,
+ 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'
+ )
+ );
+ }
+
+ this._fragments.push(buf);
+ }
+
+ const er = this.dataMessage();
+ if (er) return cb(er);
+
+ this.startLoop(cb);
+ });
+ }
+
+ /**
+ * Handles a data message.
+ *
+ * @return {(Error|undefined)} A possible error
+ * @private
+ */
+ dataMessage() {
+ if (this._fin) {
+ const messageLength = this._messageLength;
+ const fragments = this._fragments;
+
+ this._totalPayloadLength = 0;
+ this._messageLength = 0;
+ this._fragmented = 0;
+ this._fragments = [];
+
+ if (this._opcode === 2) {
+ let data;
+
+ if (this._binaryType === 'nodebuffer') {
+ data = concat(fragments, messageLength);
+ } else if (this._binaryType === 'arraybuffer') {
+ data = toArrayBuffer(concat(fragments, messageLength));
+ } else {
+ data = fragments;
+ }
+
+ this.emit('message', data, true);
+ } else {
+ const buf = concat(fragments, messageLength);
+
+ if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
+ this._loop = false;
+ return error(
+ Error,
+ 'invalid UTF-8 sequence',
+ true,
+ 1007,
+ 'WS_ERR_INVALID_UTF8'
+ );
+ }
+
+ this.emit('message', buf, false);
+ }
+ }
+
+ this._state = GET_INFO;
+ }
+
+ /**
+ * Handles a control message.
+ *
+ * @param {Buffer} data Data to handle
+ * @return {(Error|RangeError|undefined)} A possible error
+ * @private
+ */
+ controlMessage(data) {
+ if (this._opcode === 0x08) {
+ this._loop = false;
+
+ if (data.length === 0) {
+ this.emit('conclude', 1005, EMPTY_BUFFER);
+ this.end();
+ } else {
+ const code = data.readUInt16BE(0);
+
+ if (!isValidStatusCode(code)) {
+ return error(
+ RangeError,
+ `invalid status code ${code}`,
+ true,
+ 1002,
+ 'WS_ERR_INVALID_CLOSE_CODE'
+ );
+ }
+
+ const buf = new FastBuffer(
+ data.buffer,
+ data.byteOffset + 2,
+ data.length - 2
+ );
+
+ if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
+ return error(
+ Error,
+ 'invalid UTF-8 sequence',
+ true,
+ 1007,
+ 'WS_ERR_INVALID_UTF8'
+ );
+ }
+
+ this.emit('conclude', code, buf);
+ this.end();
+ }
+ } else if (this._opcode === 0x09) {
+ this.emit('ping', data);
+ } else {
+ this.emit('pong', data);
+ }
+
+ this._state = GET_INFO;
+ }
+}
+
+module.exports = Receiver;
+
+/**
+ * Builds an error object.
+ *
+ * @param {function(new:Error|RangeError)} ErrorCtor The error constructor
+ * @param {String} message The error message
+ * @param {Boolean} prefix Specifies whether or not to add a default prefix to
+ * `message`
+ * @param {Number} statusCode The status code
+ * @param {String} errorCode The exposed error code
+ * @return {(Error|RangeError)} The error
+ * @private
+ */
+function error(ErrorCtor, message, prefix, statusCode, errorCode) {
+ const err = new ErrorCtor(
+ prefix ? `Invalid WebSocket frame: ${message}` : message
+ );
+
+ Error.captureStackTrace(err, error);
+ err.code = errorCode;
+ err[kStatusCode] = statusCode;
+ return err;
+}
diff --git a/node_modules/ws/lib/sender.js b/node_modules/ws/lib/sender.js
new file mode 100644
index 0000000..c848853
--- /dev/null
+++ b/node_modules/ws/lib/sender.js
@@ -0,0 +1,478 @@
+/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^net|tls$" }] */
+
+'use strict';
+
+const net = require('net');
+const tls = require('tls');
+const { randomFillSync } = require('crypto');
+
+const PerMessageDeflate = require('./permessage-deflate');
+const { EMPTY_BUFFER } = require('./constants');
+const { isValidStatusCode } = require('./validation');
+const { mask: applyMask, toBuffer } = require('./buffer-util');
+
+const kByteLength = Symbol('kByteLength');
+const maskBuffer = Buffer.alloc(4);
+
+/**
+ * HyBi Sender implementation.
+ */
+class Sender {
+ /**
+ * Creates a Sender instance.
+ *
+ * @param {(net.Socket|tls.Socket)} socket The connection socket
+ * @param {Object} [extensions] An object containing the negotiated extensions
+ * @param {Function} [generateMask] The function used to generate the masking
+ * key
+ */
+ constructor(socket, extensions, generateMask) {
+ this._extensions = extensions || {};
+
+ if (generateMask) {
+ this._generateMask = generateMask;
+ this._maskBuffer = Buffer.alloc(4);
+ }
+
+ this._socket = socket;
+
+ this._firstFragment = true;
+ this._compress = false;
+
+ this._bufferedBytes = 0;
+ this._deflating = false;
+ this._queue = [];
+ }
+
+ /**
+ * Frames a piece of data according to the HyBi WebSocket protocol.
+ *
+ * @param {(Buffer|String)} data The data to frame
+ * @param {Object} options Options object
+ * @param {Boolean} [options.fin=false] Specifies whether or not to set the
+ * FIN bit
+ * @param {Function} [options.generateMask] The function used to generate the
+ * masking key
+ * @param {Boolean} [options.mask=false] Specifies whether or not to mask
+ * `data`
+ * @param {Buffer} [options.maskBuffer] The buffer used to store the masking
+ * key
+ * @param {Number} options.opcode The opcode
+ * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
+ * modified
+ * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
+ * RSV1 bit
+ * @return {(Buffer|String)[]} The framed data
+ * @public
+ */
+ static frame(data, options) {
+ let mask;
+ let merge = false;
+ let offset = 2;
+ let skipMasking = false;
+
+ if (options.mask) {
+ mask = options.maskBuffer || maskBuffer;
+
+ if (options.generateMask) {
+ options.generateMask(mask);
+ } else {
+ randomFillSync(mask, 0, 4);
+ }
+
+ skipMasking = (mask[0] | mask[1] | mask[2] | mask[3]) === 0;
+ offset = 6;
+ }
+
+ let dataLength;
+
+ if (typeof data === 'string') {
+ if (
+ (!options.mask || skipMasking) &&
+ options[kByteLength] !== undefined
+ ) {
+ dataLength = options[kByteLength];
+ } else {
+ data = Buffer.from(data);
+ dataLength = data.length;
+ }
+ } else {
+ dataLength = data.length;
+ merge = options.mask && options.readOnly && !skipMasking;
+ }
+
+ let payloadLength = dataLength;
+
+ if (dataLength >= 65536) {
+ offset += 8;
+ payloadLength = 127;
+ } else if (dataLength > 125) {
+ offset += 2;
+ payloadLength = 126;
+ }
+
+ const target = Buffer.allocUnsafe(merge ? dataLength + offset : offset);
+
+ target[0] = options.fin ? options.opcode | 0x80 : options.opcode;
+ if (options.rsv1) target[0] |= 0x40;
+
+ target[1] = payloadLength;
+
+ if (payloadLength === 126) {
+ target.writeUInt16BE(dataLength, 2);
+ } else if (payloadLength === 127) {
+ target[2] = target[3] = 0;
+ target.writeUIntBE(dataLength, 4, 6);
+ }
+
+ if (!options.mask) return [target, data];
+
+ target[1] |= 0x80;
+ target[offset - 4] = mask[0];
+ target[offset - 3] = mask[1];
+ target[offset - 2] = mask[2];
+ target[offset - 1] = mask[3];
+
+ if (skipMasking) return [target, data];
+
+ if (merge) {
+ applyMask(data, mask, target, offset, dataLength);
+ return [target];
+ }
+
+ applyMask(data, mask, data, 0, dataLength);
+ return [target, data];
+ }
+
+ /**
+ * Sends a close message to the other peer.
+ *
+ * @param {Number} [code] The status code component of the body
+ * @param {(String|Buffer)} [data] The message component of the body
+ * @param {Boolean} [mask=false] Specifies whether or not to mask the message
+ * @param {Function} [cb] Callback
+ * @public
+ */
+ close(code, data, mask, cb) {
+ let buf;
+
+ if (code === undefined) {
+ buf = EMPTY_BUFFER;
+ } else if (typeof code !== 'number' || !isValidStatusCode(code)) {
+ throw new TypeError('First argument must be a valid error code number');
+ } else if (data === undefined || !data.length) {
+ buf = Buffer.allocUnsafe(2);
+ buf.writeUInt16BE(code, 0);
+ } else {
+ const length = Buffer.byteLength(data);
+
+ if (length > 123) {
+ throw new RangeError('The message must not be greater than 123 bytes');
+ }
+
+ buf = Buffer.allocUnsafe(2 + length);
+ buf.writeUInt16BE(code, 0);
+
+ if (typeof data === 'string') {
+ buf.write(data, 2);
+ } else {
+ buf.set(data, 2);
+ }
+ }
+
+ const options = {
+ [kByteLength]: buf.length,
+ fin: true,
+ generateMask: this._generateMask,
+ mask,
+ maskBuffer: this._maskBuffer,
+ opcode: 0x08,
+ readOnly: false,
+ rsv1: false
+ };
+
+ if (this._deflating) {
+ this.enqueue([this.dispatch, buf, false, options, cb]);
+ } else {
+ this.sendFrame(Sender.frame(buf, options), cb);
+ }
+ }
+
+ /**
+ * Sends a ping message to the other peer.
+ *
+ * @param {*} data The message to send
+ * @param {Boolean} [mask=false] Specifies whether or not to mask `data`
+ * @param {Function} [cb] Callback
+ * @public
+ */
+ ping(data, mask, cb) {
+ let byteLength;
+ let readOnly;
+
+ if (typeof data === 'string') {
+ byteLength = Buffer.byteLength(data);
+ readOnly = false;
+ } else {
+ data = toBuffer(data);
+ byteLength = data.length;
+ readOnly = toBuffer.readOnly;
+ }
+
+ if (byteLength > 125) {
+ throw new RangeError('The data size must not be greater than 125 bytes');
+ }
+
+ const options = {
+ [kByteLength]: byteLength,
+ fin: true,
+ generateMask: this._generateMask,
+ mask,
+ maskBuffer: this._maskBuffer,
+ opcode: 0x09,
+ readOnly,
+ rsv1: false
+ };
+
+ if (this._deflating) {
+ this.enqueue([this.dispatch, data, false, options, cb]);
+ } else {
+ this.sendFrame(Sender.frame(data, options), cb);
+ }
+ }
+
+ /**
+ * Sends a pong message to the other peer.
+ *
+ * @param {*} data The message to send
+ * @param {Boolean} [mask=false] Specifies whether or not to mask `data`
+ * @param {Function} [cb] Callback
+ * @public
+ */
+ pong(data, mask, cb) {
+ let byteLength;
+ let readOnly;
+
+ if (typeof data === 'string') {
+ byteLength = Buffer.byteLength(data);
+ readOnly = false;
+ } else {
+ data = toBuffer(data);
+ byteLength = data.length;
+ readOnly = toBuffer.readOnly;
+ }
+
+ if (byteLength > 125) {
+ throw new RangeError('The data size must not be greater than 125 bytes');
+ }
+
+ const options = {
+ [kByteLength]: byteLength,
+ fin: true,
+ generateMask: this._generateMask,
+ mask,
+ maskBuffer: this._maskBuffer,
+ opcode: 0x0a,
+ readOnly,
+ rsv1: false
+ };
+
+ if (this._deflating) {
+ this.enqueue([this.dispatch, data, false, options, cb]);
+ } else {
+ this.sendFrame(Sender.frame(data, options), cb);
+ }
+ }
+
+ /**
+ * Sends a data message to the other peer.
+ *
+ * @param {*} data The message to send
+ * @param {Object} options Options object
+ * @param {Boolean} [options.binary=false] Specifies whether `data` is binary
+ * or text
+ * @param {Boolean} [options.compress=false] Specifies whether or not to
+ * compress `data`
+ * @param {Boolean} [options.fin=false] Specifies whether the fragment is the
+ * last one
+ * @param {Boolean} [options.mask=false] Specifies whether or not to mask
+ * `data`
+ * @param {Function} [cb] Callback
+ * @public
+ */
+ send(data, options, cb) {
+ const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
+ let opcode = options.binary ? 2 : 1;
+ let rsv1 = options.compress;
+
+ let byteLength;
+ let readOnly;
+
+ if (typeof data === 'string') {
+ byteLength = Buffer.byteLength(data);
+ readOnly = false;
+ } else {
+ data = toBuffer(data);
+ byteLength = data.length;
+ readOnly = toBuffer.readOnly;
+ }
+
+ if (this._firstFragment) {
+ this._firstFragment = false;
+ if (
+ rsv1 &&
+ perMessageDeflate &&
+ perMessageDeflate.params[
+ perMessageDeflate._isServer
+ ? 'server_no_context_takeover'
+ : 'client_no_context_takeover'
+ ]
+ ) {
+ rsv1 = byteLength >= perMessageDeflate._threshold;
+ }
+ this._compress = rsv1;
+ } else {
+ rsv1 = false;
+ opcode = 0;
+ }
+
+ if (options.fin) this._firstFragment = true;
+
+ if (perMessageDeflate) {
+ const opts = {
+ [kByteLength]: byteLength,
+ fin: options.fin,
+ generateMask: this._generateMask,
+ mask: options.mask,
+ maskBuffer: this._maskBuffer,
+ opcode,
+ readOnly,
+ rsv1
+ };
+
+ if (this._deflating) {
+ this.enqueue([this.dispatch, data, this._compress, opts, cb]);
+ } else {
+ this.dispatch(data, this._compress, opts, cb);
+ }
+ } else {
+ this.sendFrame(
+ Sender.frame(data, {
+ [kByteLength]: byteLength,
+ fin: options.fin,
+ generateMask: this._generateMask,
+ mask: options.mask,
+ maskBuffer: this._maskBuffer,
+ opcode,
+ readOnly,
+ rsv1: false
+ }),
+ cb
+ );
+ }
+ }
+
+ /**
+ * Dispatches a message.
+ *
+ * @param {(Buffer|String)} data The message to send
+ * @param {Boolean} [compress=false] Specifies whether or not to compress
+ * `data`
+ * @param {Object} options Options object
+ * @param {Boolean} [options.fin=false] Specifies whether or not to set the
+ * FIN bit
+ * @param {Function} [options.generateMask] The function used to generate the
+ * masking key
+ * @param {Boolean} [options.mask=false] Specifies whether or not to mask
+ * `data`
+ * @param {Buffer} [options.maskBuffer] The buffer used to store the masking
+ * key
+ * @param {Number} options.opcode The opcode
+ * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
+ * modified
+ * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
+ * RSV1 bit
+ * @param {Function} [cb] Callback
+ * @private
+ */
+ dispatch(data, compress, options, cb) {
+ if (!compress) {
+ this.sendFrame(Sender.frame(data, options), cb);
+ return;
+ }
+
+ const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
+
+ this._bufferedBytes += options[kByteLength];
+ this._deflating = true;
+ perMessageDeflate.compress(data, options.fin, (_, buf) => {
+ if (this._socket.destroyed) {
+ const err = new Error(
+ 'The socket was closed while data was being compressed'
+ );
+
+ if (typeof cb === 'function') cb(err);
+
+ for (let i = 0; i < this._queue.length; i++) {
+ const params = this._queue[i];
+ const callback = params[params.length - 1];
+
+ if (typeof callback === 'function') callback(err);
+ }
+
+ return;
+ }
+
+ this._bufferedBytes -= options[kByteLength];
+ this._deflating = false;
+ options.readOnly = false;
+ this.sendFrame(Sender.frame(buf, options), cb);
+ this.dequeue();
+ });
+ }
+
+ /**
+ * Executes queued send operations.
+ *
+ * @private
+ */
+ dequeue() {
+ while (!this._deflating && this._queue.length) {
+ const params = this._queue.shift();
+
+ this._bufferedBytes -= params[3][kByteLength];
+ Reflect.apply(params[0], this, params.slice(1));
+ }
+ }
+
+ /**
+ * Enqueues a send operation.
+ *
+ * @param {Array} params Send operation parameters.
+ * @private
+ */
+ enqueue(params) {
+ this._bufferedBytes += params[3][kByteLength];
+ this._queue.push(params);
+ }
+
+ /**
+ * Sends a frame.
+ *
+ * @param {Buffer[]} list The frame to send
+ * @param {Function} [cb] Callback
+ * @private
+ */
+ sendFrame(list, cb) {
+ if (list.length === 2) {
+ this._socket.cork();
+ this._socket.write(list[0]);
+ this._socket.write(list[1], cb);
+ this._socket.uncork();
+ } else {
+ this._socket.write(list[0], cb);
+ }
+ }
+}
+
+module.exports = Sender;
diff --git a/node_modules/ws/lib/stream.js b/node_modules/ws/lib/stream.js
new file mode 100644
index 0000000..230734b
--- /dev/null
+++ b/node_modules/ws/lib/stream.js
@@ -0,0 +1,159 @@
+'use strict';
+
+const { Duplex } = require('stream');
+
+/**
+ * Emits the `'close'` event on a stream.
+ *
+ * @param {Duplex} stream The stream.
+ * @private
+ */
+function emitClose(stream) {
+ stream.emit('close');
+}
+
+/**
+ * The listener of the `'end'` event.
+ *
+ * @private
+ */
+function duplexOnEnd() {
+ if (!this.destroyed && this._writableState.finished) {
+ this.destroy();
+ }
+}
+
+/**
+ * The listener of the `'error'` event.
+ *
+ * @param {Error} err The error
+ * @private
+ */
+function duplexOnError(err) {
+ this.removeListener('error', duplexOnError);
+ this.destroy();
+ if (this.listenerCount('error') === 0) {
+ // Do not suppress the throwing behavior.
+ this.emit('error', err);
+ }
+}
+
+/**
+ * Wraps a `WebSocket` in a duplex stream.
+ *
+ * @param {WebSocket} ws The `WebSocket` to wrap
+ * @param {Object} [options] The options for the `Duplex` constructor
+ * @return {Duplex} The duplex stream
+ * @public
+ */
+function createWebSocketStream(ws, options) {
+ let terminateOnDestroy = true;
+
+ const duplex = new Duplex({
+ ...options,
+ autoDestroy: false,
+ emitClose: false,
+ objectMode: false,
+ writableObjectMode: false
+ });
+
+ ws.on('message', function message(msg, isBinary) {
+ const data =
+ !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;
+
+ if (!duplex.push(data)) ws.pause();
+ });
+
+ ws.once('error', function error(err) {
+ if (duplex.destroyed) return;
+
+ // Prevent `ws.terminate()` from being called by `duplex._destroy()`.
+ //
+ // - If the `'error'` event is emitted before the `'open'` event, then
+ // `ws.terminate()` is a noop as no socket is assigned.
+ // - Otherwise, the error is re-emitted by the listener of the `'error'`
+ // event of the `Receiver` object. The listener already closes the
+ // connection by calling `ws.close()`. This allows a close frame to be
+ // sent to the other peer. If `ws.terminate()` is called right after this,
+ // then the close frame might not be sent.
+ terminateOnDestroy = false;
+ duplex.destroy(err);
+ });
+
+ ws.once('close', function close() {
+ if (duplex.destroyed) return;
+
+ duplex.push(null);
+ });
+
+ duplex._destroy = function (err, callback) {
+ if (ws.readyState === ws.CLOSED) {
+ callback(err);
+ process.nextTick(emitClose, duplex);
+ return;
+ }
+
+ let called = false;
+
+ ws.once('error', function error(err) {
+ called = true;
+ callback(err);
+ });
+
+ ws.once('close', function close() {
+ if (!called) callback(err);
+ process.nextTick(emitClose, duplex);
+ });
+
+ if (terminateOnDestroy) ws.terminate();
+ };
+
+ duplex._final = function (callback) {
+ if (ws.readyState === ws.CONNECTING) {
+ ws.once('open', function open() {
+ duplex._final(callback);
+ });
+ return;
+ }
+
+ // If the value of the `_socket` property is `null` it means that `ws` is a
+ // client websocket and the handshake failed. In fact, when this happens, a
+ // socket is never assigned to the websocket. Wait for the `'error'` event
+ // that will be emitted by the websocket.
+ if (ws._socket === null) return;
+
+ if (ws._socket._writableState.finished) {
+ callback();
+ if (duplex._readableState.endEmitted) duplex.destroy();
+ } else {
+ ws._socket.once('finish', function finish() {
+ // `duplex` is not destroyed here because the `'end'` event will be
+ // emitted on `duplex` after this `'finish'` event. The EOF signaling
+ // `null` chunk is, in fact, pushed when the websocket emits `'close'`.
+ callback();
+ });
+ ws.close();
+ }
+ };
+
+ duplex._read = function () {
+ if (ws.isPaused) ws.resume();
+ };
+
+ duplex._write = function (chunk, encoding, callback) {
+ if (ws.readyState === ws.CONNECTING) {
+ ws.once('open', function open() {
+ duplex._write(chunk, encoding, callback);
+ });
+ return;
+ }
+
+ ws.send(chunk, callback);
+ };
+
+ duplex.on('end', duplexOnEnd);
+ duplex.on('error', duplexOnError);
+ return duplex;
+}
+
+module.exports = createWebSocketStream;
diff --git a/node_modules/ws/lib/subprotocol.js b/node_modules/ws/lib/subprotocol.js
new file mode 100644
index 0000000..d4381e8
--- /dev/null
+++ b/node_modules/ws/lib/subprotocol.js
@@ -0,0 +1,62 @@
+'use strict';
+
+const { tokenChars } = require('./validation');
+
+/**
+ * Parses the `Sec-WebSocket-Protocol` header into a set of subprotocol names.
+ *
+ * @param {String} header The field value of the header
+ * @return {Set} The subprotocol names
+ * @public
+ */
+function parse(header) {
+ const protocols = new Set();
+ let start = -1;
+ let end = -1;
+ let i = 0;
+
+ for (i; i < header.length; i++) {
+ const code = header.charCodeAt(i);
+
+ if (end === -1 && tokenChars[code] === 1) {
+ if (start === -1) start = i;
+ } else if (
+ i !== 0 &&
+ (code === 0x20 /* ' ' */ || code === 0x09) /* '\t' */
+ ) {
+ if (end === -1 && start !== -1) end = i;
+ } else if (code === 0x2c /* ',' */) {
+ if (start === -1) {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+
+ if (end === -1) end = i;
+
+ const protocol = header.slice(start, end);
+
+ if (protocols.has(protocol)) {
+ throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`);
+ }
+
+ protocols.add(protocol);
+ start = end = -1;
+ } else {
+ throw new SyntaxError(`Unexpected character at index ${i}`);
+ }
+ }
+
+ if (start === -1 || end !== -1) {
+ throw new SyntaxError('Unexpected end of input');
+ }
+
+ const protocol = header.slice(start, i);
+
+ if (protocols.has(protocol)) {
+ throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`);
+ }
+
+ protocols.add(protocol);
+ return protocols;
+}
+
+module.exports = { parse };
diff --git a/node_modules/ws/lib/validation.js b/node_modules/ws/lib/validation.js
new file mode 100644
index 0000000..c352e6e
--- /dev/null
+++ b/node_modules/ws/lib/validation.js
@@ -0,0 +1,130 @@
+'use strict';
+
+const { isUtf8 } = require('buffer');
+
+//
+// Allowed token characters:
+//
+// '!', '#', '$', '%', '&', ''', '*', '+', '-',
+// '.', 0-9, A-Z, '^', '_', '`', a-z, '|', '~'
+//
+// tokenChars[32] === 0 // ' '
+// tokenChars[33] === 1 // '!'
+// tokenChars[34] === 0 // '"'
+// ...
+//
+// prettier-ignore
+const tokenChars = [
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 15
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 31
+ 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, // 32 - 47
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 48 - 63
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 64 - 79
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, // 80 - 95
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 96 - 111
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 // 112 - 127
+];
+
+/**
+ * Checks if a status code is allowed in a close frame.
+ *
+ * @param {Number} code The status code
+ * @return {Boolean} `true` if the status code is valid, else `false`
+ * @public
+ */
+function isValidStatusCode(code) {
+ return (
+ (code >= 1000 &&
+ code <= 1014 &&
+ code !== 1004 &&
+ code !== 1005 &&
+ code !== 1006) ||
+ (code >= 3000 && code <= 4999)
+ );
+}
+
+/**
+ * Checks if a given buffer contains only correct UTF-8.
+ * Ported from https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c by
+ * Markus Kuhn.
+ *
+ * @param {Buffer} buf The buffer to check
+ * @return {Boolean} `true` if `buf` contains only correct UTF-8, else `false`
+ * @public
+ */
+function _isValidUTF8(buf) {
+ const len = buf.length;
+ let i = 0;
+
+ while (i < len) {
+ if ((buf[i] & 0x80) === 0) {
+ // 0xxxxxxx
+ i++;
+ } else if ((buf[i] & 0xe0) === 0xc0) {
+ // 110xxxxx 10xxxxxx
+ if (
+ i + 1 === len ||
+ (buf[i + 1] & 0xc0) !== 0x80 ||
+ (buf[i] & 0xfe) === 0xc0 // Overlong
+ ) {
+ return false;
+ }
+
+ i += 2;
+ } else if ((buf[i] & 0xf0) === 0xe0) {
+ // 1110xxxx 10xxxxxx 10xxxxxx
+ if (
+ i + 2 >= len ||
+ (buf[i + 1] & 0xc0) !== 0x80 ||
+ (buf[i + 2] & 0xc0) !== 0x80 ||
+ (buf[i] === 0xe0 && (buf[i + 1] & 0xe0) === 0x80) || // Overlong
+ (buf[i] === 0xed && (buf[i + 1] & 0xe0) === 0xa0) // Surrogate (U+D800 - U+DFFF)
+ ) {
+ return false;
+ }
+
+ i += 3;
+ } else if ((buf[i] & 0xf8) === 0xf0) {
+ // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+ if (
+ i + 3 >= len ||
+ (buf[i + 1] & 0xc0) !== 0x80 ||
+ (buf[i + 2] & 0xc0) !== 0x80 ||
+ (buf[i + 3] & 0xc0) !== 0x80 ||
+ (buf[i] === 0xf0 && (buf[i + 1] & 0xf0) === 0x80) || // Overlong
+ (buf[i] === 0xf4 && buf[i + 1] > 0x8f) ||
+ buf[i] > 0xf4 // > U+10FFFF
+ ) {
+ return false;
+ }
+
+ i += 4;
+ } else {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+module.exports = {
+ isValidStatusCode,
+ isValidUTF8: _isValidUTF8,
+ tokenChars
+};
+
+if (isUtf8) {
+ module.exports.isValidUTF8 = function (buf) {
+ return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
+ };
+} /* istanbul ignore else */ else if (!process.env.WS_NO_UTF_8_VALIDATE) {
+ try {
+ const isValidUTF8 = require('utf-8-validate');
+
+ module.exports.isValidUTF8 = function (buf) {
+ return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
+ };
+ } catch (e) {
+ // Continue regardless of the error.
+ }
+}
diff --git a/node_modules/ws/lib/websocket-server.js b/node_modules/ws/lib/websocket-server.js
new file mode 100644
index 0000000..bac30eb
--- /dev/null
+++ b/node_modules/ws/lib/websocket-server.js
@@ -0,0 +1,535 @@
+/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^net|tls|https$" }] */
+
+'use strict';
+
+const EventEmitter = require('events');
+const http = require('http');
+const https = require('https');
+const net = require('net');
+const tls = require('tls');
+const { createHash } = require('crypto');
+
+const extension = require('./extension');
+const PerMessageDeflate = require('./permessage-deflate');
+const subprotocol = require('./subprotocol');
+const WebSocket = require('./websocket');
+const { GUID, kWebSocket } = require('./constants');
+
+const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
+
+const RUNNING = 0;
+const CLOSING = 1;
+const CLOSED = 2;
+
+/**
+ * Class representing a WebSocket server.
+ *
+ * @extends EventEmitter
+ */
+class WebSocketServer extends EventEmitter {
+ /**
+ * Create a `WebSocketServer` instance.
+ *
+ * @param {Object} options Configuration options
+ * @param {Number} [options.backlog=511] The maximum length of the queue of
+ * pending connections
+ * @param {Boolean} [options.clientTracking=true] Specifies whether or not to
+ * track clients
+ * @param {Function} [options.handleProtocols] A hook to handle protocols
+ * @param {String} [options.host] The hostname where to bind the server
+ * @param {Number} [options.maxPayload=104857600] The maximum allowed message
+ * size
+ * @param {Boolean} [options.noServer=false] Enable no server mode
+ * @param {String} [options.path] Accept only connections matching this path
+ * @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable
+ * permessage-deflate
+ * @param {Number} [options.port] The port where to bind the server
+ * @param {(http.Server|https.Server)} [options.server] A pre-created HTTP/S
+ * server to use
+ * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
+ * not to skip UTF-8 validation for text and close messages
+ * @param {Function} [options.verifyClient] A hook to reject connections
+ * @param {Function} [options.WebSocket=WebSocket] Specifies the `WebSocket`
+ * class to use. It must be the `WebSocket` class or class that extends it
+ * @param {Function} [callback] A listener for the `listening` event
+ */
+ constructor(options, callback) {
+ super();
+
+ options = {
+ maxPayload: 100 * 1024 * 1024,
+ skipUTF8Validation: false,
+ perMessageDeflate: false,
+ handleProtocols: null,
+ clientTracking: true,
+ verifyClient: null,
+ noServer: false,
+ backlog: null, // use default (511 as implemented in net.js)
+ server: null,
+ host: null,
+ path: null,
+ port: null,
+ WebSocket,
+ ...options
+ };
+
+ if (
+ (options.port == null && !options.server && !options.noServer) ||
+ (options.port != null && (options.server || options.noServer)) ||
+ (options.server && options.noServer)
+ ) {
+ throw new TypeError(
+ 'One and only one of the "port", "server", or "noServer" options ' +
+ 'must be specified'
+ );
+ }
+
+ if (options.port != null) {
+ this._server = http.createServer((req, res) => {
+ const body = http.STATUS_CODES[426];
+
+ res.writeHead(426, {
+ 'Content-Length': body.length,
+ 'Content-Type': 'text/plain'
+ });
+ res.end(body);
+ });
+ this._server.listen(
+ options.port,
+ options.host,
+ options.backlog,
+ callback
+ );
+ } else if (options.server) {
+ this._server = options.server;
+ }
+
+ if (this._server) {
+ const emitConnection = this.emit.bind(this, 'connection');
+
+ this._removeListeners = addListeners(this._server, {
+ listening: this.emit.bind(this, 'listening'),
+ error: this.emit.bind(this, 'error'),
+ upgrade: (req, socket, head) => {
+ this.handleUpgrade(req, socket, head, emitConnection);
+ }
+ });
+ }
+
+ if (options.perMessageDeflate === true) options.perMessageDeflate = {};
+ if (options.clientTracking) {
+ this.clients = new Set();
+ this._shouldEmitClose = false;
+ }
+
+ this.options = options;
+ this._state = RUNNING;
+ }
+
+ /**
+ * Returns the bound address, the address family name, and port of the server
+ * as reported by the operating system if listening on an IP socket.
+ * If the server is listening on a pipe or UNIX domain socket, the name is
+ * returned as a string.
+ *
+ * @return {(Object|String|null)} The address of the server
+ * @public
+ */
+ address() {
+ if (this.options.noServer) {
+ throw new Error('The server is operating in "noServer" mode');
+ }
+
+ if (!this._server) return null;
+ return this._server.address();
+ }
+
+ /**
+ * Stop the server from accepting new connections and emit the `'close'` event
+ * when all existing connections are closed.
+ *
+ * @param {Function} [cb] A one-time listener for the `'close'` event
+ * @public
+ */
+ close(cb) {
+ if (this._state === CLOSED) {
+ if (cb) {
+ this.once('close', () => {
+ cb(new Error('The server is not running'));
+ });
+ }
+
+ process.nextTick(emitClose, this);
+ return;
+ }
+
+ if (cb) this.once('close', cb);
+
+ if (this._state === CLOSING) return;
+ this._state = CLOSING;
+
+ if (this.options.noServer || this.options.server) {
+ if (this._server) {
+ this._removeListeners();
+ this._removeListeners = this._server = null;
+ }
+
+ if (this.clients) {
+ if (!this.clients.size) {
+ process.nextTick(emitClose, this);
+ } else {
+ this._shouldEmitClose = true;
+ }
+ } else {
+ process.nextTick(emitClose, this);
+ }
+ } else {
+ const server = this._server;
+
+ this._removeListeners();
+ this._removeListeners = this._server = null;
+
+ //
+ // The HTTP/S server was created internally. Close it, and rely on its
+ // `'close'` event.
+ //
+ server.close(() => {
+ emitClose(this);
+ });
+ }
+ }
+
+ /**
+ * See if a given request should be handled by this server instance.
+ *
+ * @param {http.IncomingMessage} req Request object to inspect
+ * @return {Boolean} `true` if the request is valid, else `false`
+ * @public
+ */
+ shouldHandle(req) {
+ if (this.options.path) {
+ const index = req.url.indexOf('?');
+ const pathname = index !== -1 ? req.url.slice(0, index) : req.url;
+
+ if (pathname !== this.options.path) return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Handle a HTTP Upgrade request.
+ *
+ * @param {http.IncomingMessage} req The request object
+ * @param {(net.Socket|tls.Socket)} socket The network socket between the
+ * server and client
+ * @param {Buffer} head The first packet of the upgraded stream
+ * @param {Function} cb Callback
+ * @public
+ */
+ handleUpgrade(req, socket, head, cb) {
+ socket.on('error', socketOnError);
+
+ const key = req.headers['sec-websocket-key'];
+ const version = +req.headers['sec-websocket-version'];
+
+ if (req.method !== 'GET') {
+ const message = 'Invalid HTTP method';
+ abortHandshakeOrEmitwsClientError(this, req, socket, 405, message);
+ return;
+ }
+
+ if (req.headers.upgrade.toLowerCase() !== 'websocket') {
+ const message = 'Invalid Upgrade header';
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
+ return;
+ }
+
+ if (!key || !keyRegex.test(key)) {
+ const message = 'Missing or invalid Sec-WebSocket-Key header';
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
+ return;
+ }
+
+ if (version !== 8 && version !== 13) {
+ const message = 'Missing or invalid Sec-WebSocket-Version header';
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
+ return;
+ }
+
+ if (!this.shouldHandle(req)) {
+ abortHandshake(socket, 400);
+ return;
+ }
+
+ const secWebSocketProtocol = req.headers['sec-websocket-protocol'];
+ let protocols = new Set();
+
+ if (secWebSocketProtocol !== undefined) {
+ try {
+ protocols = subprotocol.parse(secWebSocketProtocol);
+ } catch (err) {
+ const message = 'Invalid Sec-WebSocket-Protocol header';
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
+ return;
+ }
+ }
+
+ const secWebSocketExtensions = req.headers['sec-websocket-extensions'];
+ const extensions = {};
+
+ if (
+ this.options.perMessageDeflate &&
+ secWebSocketExtensions !== undefined
+ ) {
+ const perMessageDeflate = new PerMessageDeflate(
+ this.options.perMessageDeflate,
+ true,
+ this.options.maxPayload
+ );
+
+ try {
+ const offers = extension.parse(secWebSocketExtensions);
+
+ if (offers[PerMessageDeflate.extensionName]) {
+ perMessageDeflate.accept(offers[PerMessageDeflate.extensionName]);
+ extensions[PerMessageDeflate.extensionName] = perMessageDeflate;
+ }
+ } catch (err) {
+ const message =
+ 'Invalid or unacceptable Sec-WebSocket-Extensions header';
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
+ return;
+ }
+ }
+
+ //
+ // Optionally call external client verification handler.
+ //
+ if (this.options.verifyClient) {
+ const info = {
+ origin:
+ req.headers[`${version === 8 ? 'sec-websocket-origin' : 'origin'}`],
+ secure: !!(req.socket.authorized || req.socket.encrypted),
+ req
+ };
+
+ if (this.options.verifyClient.length === 2) {
+ this.options.verifyClient(info, (verified, code, message, headers) => {
+ if (!verified) {
+ return abortHandshake(socket, code || 401, message, headers);
+ }
+
+ this.completeUpgrade(
+ extensions,
+ key,
+ protocols,
+ req,
+ socket,
+ head,
+ cb
+ );
+ });
+ return;
+ }
+
+ if (!this.options.verifyClient(info)) return abortHandshake(socket, 401);
+ }
+
+ this.completeUpgrade(extensions, key, protocols, req, socket, head, cb);
+ }
+
+ /**
+ * Upgrade the connection to WebSocket.
+ *
+ * @param {Object} extensions The accepted extensions
+ * @param {String} key The value of the `Sec-WebSocket-Key` header
+ * @param {Set} protocols The subprotocols
+ * @param {http.IncomingMessage} req The request object
+ * @param {(net.Socket|tls.Socket)} socket The network socket between the
+ * server and client
+ * @param {Buffer} head The first packet of the upgraded stream
+ * @param {Function} cb Callback
+ * @throws {Error} If called more than once with the same socket
+ * @private
+ */
+ completeUpgrade(extensions, key, protocols, req, socket, head, cb) {
+ //
+ // Destroy the socket if the client has already sent a FIN packet.
+ //
+ if (!socket.readable || !socket.writable) return socket.destroy();
+
+ if (socket[kWebSocket]) {
+ throw new Error(
+ 'server.handleUpgrade() was called more than once with the same ' +
+ 'socket, possibly due to a misconfiguration'
+ );
+ }
+
+ if (this._state > RUNNING) return abortHandshake(socket, 503);
+
+ const digest = createHash('sha1')
+ .update(key + GUID)
+ .digest('base64');
+
+ const headers = [
+ 'HTTP/1.1 101 Switching Protocols',
+ 'Upgrade: websocket',
+ 'Connection: Upgrade',
+ `Sec-WebSocket-Accept: ${digest}`
+ ];
+
+ const ws = new this.options.WebSocket(null);
+
+ if (protocols.size) {
+ //
+ // Optionally call external protocol selection handler.
+ //
+ const protocol = this.options.handleProtocols
+ ? this.options.handleProtocols(protocols, req)
+ : protocols.values().next().value;
+
+ if (protocol) {
+ headers.push(`Sec-WebSocket-Protocol: ${protocol}`);
+ ws._protocol = protocol;
+ }
+ }
+
+ if (extensions[PerMessageDeflate.extensionName]) {
+ const params = extensions[PerMessageDeflate.extensionName].params;
+ const value = extension.format({
+ [PerMessageDeflate.extensionName]: [params]
+ });
+ headers.push(`Sec-WebSocket-Extensions: ${value}`);
+ ws._extensions = extensions;
+ }
+
+ //
+ // Allow external modification/inspection of handshake headers.
+ //
+ this.emit('headers', headers, req);
+
+ socket.write(headers.concat('\r\n').join('\r\n'));
+ socket.removeListener('error', socketOnError);
+
+ ws.setSocket(socket, head, {
+ maxPayload: this.options.maxPayload,
+ skipUTF8Validation: this.options.skipUTF8Validation
+ });
+
+ if (this.clients) {
+ this.clients.add(ws);
+ ws.on('close', () => {
+ this.clients.delete(ws);
+
+ if (this._shouldEmitClose && !this.clients.size) {
+ process.nextTick(emitClose, this);
+ }
+ });
+ }
+
+ cb(ws, req);
+ }
+}
+
+module.exports = WebSocketServer;
+
+/**
+ * Add event listeners on an `EventEmitter` using a map of <event, listener>
+ * pairs.
+ *
+ * @param {EventEmitter} server The event emitter
+ * @param {Object.<String, Function>} map The listeners to add
+ * @return {Function} A function that will remove the added listeners when
+ * called
+ * @private
+ */
+function addListeners(server, map) {
+ for (const event of Object.keys(map)) server.on(event, map[event]);
+
+ return function removeListeners() {
+ for (const event of Object.keys(map)) {
+ server.removeListener(event, map[event]);
+ }
+ };
+}
+
+/**
+ * Emit a `'close'` event on an `EventEmitter`.
+ *
+ * @param {EventEmitter} server The event emitter
+ * @private
+ */
+function emitClose(server) {
+ server._state = CLOSED;
+ server.emit('close');
+}
+
+/**
+ * Handle socket errors.
+ *
+ * @private
+ */
+function socketOnError() {
+ this.destroy();
+}
+
+/**
+ * Close the connection when preconditions are not fulfilled.
+ *
+ * @param {(net.Socket|tls.Socket)} socket The socket of the upgrade request
+ * @param {Number} code The HTTP response status code
+ * @param {String} [message] The HTTP response body
+ * @param {Object} [headers] Additional HTTP response headers
+ * @private
+ */
+function abortHandshake(socket, code, message, headers) {
+ //
+ // The socket is writable unless the user destroyed or ended it before calling
+ // `server.handleUpgrade()` or in the `verifyClient` function, which is a user
+ // error. Handling this does not make much sense as the worst that can happen
+ // is that some of the data written by the user might be discarded due to the
+ // call to `socket.end()` below, which triggers an `'error'` event that in
+ // turn causes the socket to be destroyed.
+ //
+ message = message || http.STATUS_CODES[code];
+ headers = {
+ Connection: 'close',
+ 'Content-Type': 'text/html',
+ 'Content-Length': Buffer.byteLength(message),
+ ...headers
+ };
+
+ socket.once('finish', socket.destroy);
+
+ socket.end(
+ `HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r\n` +
+ Object.keys(headers)
+ .map((h) => `${h}: ${headers[h]}`)
+ .join('\r\n') +
+ '\r\n\r\n' +
+ message
+ );
+}
+
+/**
+ * Emit a `'wsClientError'` event on a `WebSocketServer` if there is at least
+ * one listener for it, otherwise call `abortHandshake()`.
+ *
+ * @param {WebSocketServer} server The WebSocket server
+ * @param {http.IncomingMessage} req The request object
+ * @param {(net.Socket|tls.Socket)} socket The socket of the upgrade request
+ * @param {Number} code The HTTP response status code
+ * @param {String} message The HTTP response body
+ * @private
+ */
+function abortHandshakeOrEmitwsClientError(server, req, socket, code, message) {
+ if (server.listenerCount('wsClientError')) {
+ const err = new Error(message);
+ Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError);
+
+ server.emit('wsClientError', err, socket, req);
+ } else {
+ abortHandshake(socket, code, message);
+ }
+}
diff --git a/node_modules/ws/lib/websocket.js b/node_modules/ws/lib/websocket.js
new file mode 100644
index 0000000..b2b2b09
--- /dev/null
+++ b/node_modules/ws/lib/websocket.js
@@ -0,0 +1,1311 @@
+/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Readable$" }] */
+
+'use strict';
+
+const EventEmitter = require('events');
+const https = require('https');
+const http = require('http');
+const net = require('net');
+const tls = require('tls');
+const { randomBytes, createHash } = require('crypto');
+const { Readable } = require('stream');
+const { URL } = require('url');
+
+const PerMessageDeflate = require('./permessage-deflate');
+const Receiver = require('./receiver');
+const Sender = require('./sender');
+const {
+ BINARY_TYPES,
+ EMPTY_BUFFER,
+ GUID,
+ kForOnEventAttribute,
+ kListener,
+ kStatusCode,
+ kWebSocket,
+ NOOP
+} = require('./constants');
+const {
+ EventTarget: { addEventListener, removeEventListener }
+} = require('./event-target');
+const { format, parse } = require('./extension');
+const { toBuffer } = require('./buffer-util');
+
+const closeTimeout = 30 * 1000;
+const kAborted = Symbol('kAborted');
+const protocolVersions = [8, 13];
+const readyStates = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'];
+const subprotocolRegex = /^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;
+
+/**
+ * Class representing a WebSocket.
+ *
+ * @extends EventEmitter
+ */
+class WebSocket extends EventEmitter {
+ /**
+ * Create a new `WebSocket`.
+ *
+ * @param {(String|URL)} address The URL to which to connect
+ * @param {(String|String[])} [protocols] The subprotocols
+ * @param {Object} [options] Connection options
+ */
+ constructor(address, protocols, options) {
+ super();
+
+ this._binaryType = BINARY_TYPES[0];
+ this._closeCode = 1006;
+ this._closeFrameReceived = false;
+ this._closeFrameSent = false;
+ this._closeMessage = EMPTY_BUFFER;
+ this._closeTimer = null;
+ this._extensions = {};
+ this._paused = false;
+ this._protocol = '';
+ this._readyState = WebSocket.CONNECTING;
+ this._receiver = null;
+ this._sender = null;
+ this._socket = null;
+
+ if (address !== null) {
+ this._bufferedAmount = 0;
+ this._isServer = false;
+ this._redirects = 0;
+
+ if (protocols === undefined) {
+ protocols = [];
+ } else if (!Array.isArray(protocols)) {
+ if (typeof protocols === 'object' && protocols !== null) {
+ options = protocols;
+ protocols = [];
+ } else {
+ protocols = [protocols];
+ }
+ }
+
+ initAsClient(this, address, protocols, options);
+ } else {
+ this._isServer = true;
+ }
+ }
+
+ /**
+ * This deviates from the WHATWG interface since ws doesn't support the
+ * required default "blob" type (instead we define a custom "nodebuffer"
+ * type).
+ *
+ * @type {String}
+ */
+ get binaryType() {
+ return this._binaryType;
+ }
+
+ set binaryType(type) {
+ if (!BINARY_TYPES.includes(type)) return;
+
+ this._binaryType = type;
+
+ //
+ // Allow to change `binaryType` on the fly.
+ //
+ if (this._receiver) this._receiver._binaryType = type;
+ }
+
+ /**
+ * @type {Number}
+ */
+ get bufferedAmount() {
+ if (!this._socket) return this._bufferedAmount;
+
+ return this._socket._writableState.length + this._sender._bufferedBytes;
+ }
+
+ /**
+ * @type {String}
+ */
+ get extensions() {
+ return Object.keys(this._extensions).join();
+ }
+
+ /**
+ * @type {Boolean}
+ */
+ get isPaused() {
+ return this._paused;
+ }
+
+ /**
+ * @type {Function}
+ */
+ /* istanbul ignore next */
+ get onclose() {
+ return null;
+ }
+
+ /**
+ * @type {Function}
+ */
+ /* istanbul ignore next */
+ get onerror() {
+ return null;
+ }
+
+ /**
+ * @type {Function}
+ */
+ /* istanbul ignore next */
+ get onopen() {
+ return null;
+ }
+
+ /**
+ * @type {Function}
+ */
+ /* istanbul ignore next */
+ get onmessage() {
+ return null;
+ }
+
+ /**
+ * @type {String}
+ */
+ get protocol() {
+ return this._protocol;
+ }
+
+ /**
+ * @type {Number}
+ */
+ get readyState() {
+ return this._readyState;
+ }
+
+ /**
+ * @type {String}
+ */
+ get url() {
+ return this._url;
+ }
+
+ /**
+ * Set up the socket and the internal resources.
+ *
+ * @param {(net.Socket|tls.Socket)} socket The network socket between the
+ * server and client
+ * @param {Buffer} head The first packet of the upgraded stream
+ * @param {Object} options Options object
+ * @param {Function} [options.generateMask] The function used to generate the
+ * masking key
+ * @param {Number} [options.maxPayload=0] The maximum allowed message size
+ * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
+ * not to skip UTF-8 validation for text and close messages
+ * @private
+ */
+ setSocket(socket, head, options) {
+ const receiver = new Receiver({
+ binaryType: this.binaryType,
+ extensions: this._extensions,
+ isServer: this._isServer,
+ maxPayload: options.maxPayload,
+ skipUTF8Validation: options.skipUTF8Validation
+ });
+
+ this._sender = new Sender(socket, this._extensions, options.generateMask);
+ this._receiver = receiver;
+ this._socket = socket;
+
+ receiver[kWebSocket] = this;
+ socket[kWebSocket] = this;
+
+ receiver.on('conclude', receiverOnConclude);
+ receiver.on('drain', receiverOnDrain);
+ receiver.on('error', receiverOnError);
+ receiver.on('message', receiverOnMessage);
+ receiver.on('ping', receiverOnPing);
+ receiver.on('pong', receiverOnPong);
+
+ socket.setTimeout(0);
+ socket.setNoDelay();
+
+ if (head.length > 0) socket.unshift(head);
+
+ socket.on('close', socketOnClose);
+ socket.on('data', socketOnData);
+ socket.on('end', socketOnEnd);
+ socket.on('error', socketOnError);
+
+ this._readyState = WebSocket.OPEN;
+ this.emit('open');
+ }
+
+ /**
+ * Emit the `'close'` event.
+ *
+ * @private
+ */
+ emitClose() {
+ if (!this._socket) {
+ this._readyState = WebSocket.CLOSED;
+ this.emit('close', this._closeCode, this._closeMessage);
+ return;
+ }
+
+ if (this._extensions[PerMessageDeflate.extensionName]) {
+ this._extensions[PerMessageDeflate.extensionName].cleanup();
+ }
+
+ this._receiver.removeAllListeners();
+ this._readyState = WebSocket.CLOSED;
+ this.emit('close', this._closeCode, this._closeMessage);
+ }
+
+ /**
+ * Start a closing handshake.
+ *
+ * +----------+ +-----------+ +----------+
+ * - - -|ws.close()|-->|close frame|-->|ws.close()|- - -
+ * | +----------+ +-----------+ +----------+ |
+ * +----------+ +-----------+ |
+ * CLOSING |ws.close()|<--|close frame|<--+-----+ CLOSING
+ * +----------+ +-----------+ |
+ * | | | +---+ |
+ * +------------------------+-->|fin| - - - -
+ * | +---+ | +---+
+ * - - - - -|fin|<---------------------+
+ * +---+
+ *
+ * @param {Number} [code] Status code explaining why the connection is closing
+ * @param {(String|Buffer)} [data] The reason why the connection is
+ * closing
+ * @public
+ */
+ close(code, data) {
+ if (this.readyState === WebSocket.CLOSED) return;
+ if (this.readyState === WebSocket.CONNECTING) {
+ const msg = 'WebSocket was closed before the connection was established';
+ abortHandshake(this, this._req, msg);
+ return;
+ }
+
+ if (this.readyState === WebSocket.CLOSING) {
+ if (
+ this._closeFrameSent &&
+ (this._closeFrameReceived || this._receiver._writableState.errorEmitted)
+ ) {
+ this._socket.end();
+ }
+
+ return;
+ }
+
+ this._readyState = WebSocket.CLOSING;
+ this._sender.close(code, data, !this._isServer, (err) => {
+ //
+ // This error is handled by the `'error'` listener on the socket. We only
+ // want to know if the close frame has been sent here.
+ //
+ if (err) return;
+
+ this._closeFrameSent = true;
+
+ if (
+ this._closeFrameReceived ||
+ this._receiver._writableState.errorEmitted
+ ) {
+ this._socket.end();
+ }
+ });
+
+ //
+ // Specify a timeout for the closing handshake to complete.
+ //
+ this._closeTimer = setTimeout(
+ this._socket.destroy.bind(this._socket),
+ closeTimeout
+ );
+ }
+
+ /**
+ * Pause the socket.
+ *
+ * @public
+ */
+ pause() {
+ if (
+ this.readyState === WebSocket.CONNECTING ||
+ this.readyState === WebSocket.CLOSED
+ ) {
+ return;
+ }
+
+ this._paused = true;
+ this._socket.pause();
+ }
+
+ /**
+ * Send a ping.
+ *
+ * @param {*} [data] The data to send
+ * @param {Boolean} [mask] Indicates whether or not to mask `data`
+ * @param {Function} [cb] Callback which is executed when the ping is sent
+ * @public
+ */
+ ping(data, mask, cb) {
+ if (this.readyState === WebSocket.CONNECTING) {
+ throw new Error('WebSocket is not open: readyState 0 (CONNECTING)');
+ }
+
+ if (typeof data === 'function') {
+ cb = data;
+ data = mask = undefined;
+ } else if (typeof mask === 'function') {
+ cb = mask;
+ mask = undefined;
+ }
+
+ if (typeof data === 'number') data = data.toString();
+
+ if (this.readyState !== WebSocket.OPEN) {
+ sendAfterClose(this, data, cb);
+ return;
+ }
+
+ if (mask === undefined) mask = !this._isServer;
+ this._sender.ping(data || EMPTY_BUFFER, mask, cb);
+ }
+
+ /**
+ * Send a pong.
+ *
+ * @param {*} [data] The data to send
+ * @param {Boolean} [mask] Indicates whether or not to mask `data`
+ * @param {Function} [cb] Callback which is executed when the pong is sent
+ * @public
+ */
+ pong(data, mask, cb) {
+ if (this.readyState === WebSocket.CONNECTING) {
+ throw new Error('WebSocket is not open: readyState 0 (CONNECTING)');
+ }
+
+ if (typeof data === 'function') {
+ cb = data;
+ data = mask = undefined;
+ } else if (typeof mask === 'function') {
+ cb = mask;
+ mask = undefined;
+ }
+
+ if (typeof data === 'number') data = data.toString();
+
+ if (this.readyState !== WebSocket.OPEN) {
+ sendAfterClose(this, data, cb);
+ return;
+ }
+
+ if (mask === undefined) mask = !this._isServer;
+ this._sender.pong(data || EMPTY_BUFFER, mask, cb);
+ }
+
+ /**
+ * Resume the socket.
+ *
+ * @public
+ */
+ resume() {
+ if (
+ this.readyState === WebSocket.CONNECTING ||
+ this.readyState === WebSocket.CLOSED
+ ) {
+ return;
+ }
+
+ this._paused = false;
+ if (!this._receiver._writableState.needDrain) this._socket.resume();
+ }
+
+ /**
+ * Send a data message.
+ *
+ * @param {*} data The message to send
+ * @param {Object} [options] Options object
+ * @param {Boolean} [options.binary] Specifies whether `data` is binary or
+ * text
+ * @param {Boolean} [options.compress] Specifies whether or not to compress
+ * `data`
+ * @param {Boolean} [options.fin=true] Specifies whether the fragment is the
+ * last one
+ * @param {Boolean} [options.mask] Specifies whether or not to mask `data`
+ * @param {Function} [cb] Callback which is executed when data is written out
+ * @public
+ */
+ send(data, options, cb) {
+ if (this.readyState === WebSocket.CONNECTING) {
+ throw new Error('WebSocket is not open: readyState 0 (CONNECTING)');
+ }
+
+ if (typeof options === 'function') {
+ cb = options;
+ options = {};
+ }
+
+ if (typeof data === 'number') data = data.toString();
+
+ if (this.readyState !== WebSocket.OPEN) {
+ sendAfterClose(this, data, cb);
+ return;
+ }
+
+ const opts = {
+ binary: typeof data !== 'string',
+ mask: !this._isServer,
+ compress: true,
+ fin: true,
+ ...options
+ };
+
+ if (!this._extensions[PerMessageDeflate.extensionName]) {
+ opts.compress = false;
+ }
+
+ this._sender.send(data || EMPTY_BUFFER, opts, cb);
+ }
+
+ /**
+ * Forcibly close the connection.
+ *
+ * @public
+ */
+ terminate() {
+ if (this.readyState === WebSocket.CLOSED) return;
+ if (this.readyState === WebSocket.CONNECTING) {
+ const msg = 'WebSocket was closed before the connection was established';
+ abortHandshake(this, this._req, msg);
+ return;
+ }
+
+ if (this._socket) {
+ this._readyState = WebSocket.CLOSING;
+ this._socket.destroy();
+ }
+ }
+}
+
+/**
+ * @constant {Number} CONNECTING
+ * @memberof WebSocket
+ */
+Object.defineProperty(WebSocket, 'CONNECTING', {
+ enumerable: true,
+ value: readyStates.indexOf('CONNECTING')
+});
+
+/**
+ * @constant {Number} CONNECTING
+ * @memberof WebSocket.prototype
+ */
+Object.defineProperty(WebSocket.prototype, 'CONNECTING', {
+ enumerable: true,
+ value: readyStates.indexOf('CONNECTING')
+});
+
+/**
+ * @constant {Number} OPEN
+ * @memberof WebSocket
+ */
+Object.defineProperty(WebSocket, 'OPEN', {
+ enumerable: true,
+ value: readyStates.indexOf('OPEN')
+});
+
+/**
+ * @constant {Number} OPEN
+ * @memberof WebSocket.prototype
+ */
+Object.defineProperty(WebSocket.prototype, 'OPEN', {
+ enumerable: true,
+ value: readyStates.indexOf('OPEN')
+});
+
+/**
+ * @constant {Number} CLOSING
+ * @memberof WebSocket
+ */
+Object.defineProperty(WebSocket, 'CLOSING', {
+ enumerable: true,
+ value: readyStates.indexOf('CLOSING')
+});
+
+/**
+ * @constant {Number} CLOSING
+ * @memberof WebSocket.prototype
+ */
+Object.defineProperty(WebSocket.prototype, 'CLOSING', {
+ enumerable: true,
+ value: readyStates.indexOf('CLOSING')
+});
+
+/**
+ * @constant {Number} CLOSED
+ * @memberof WebSocket
+ */
+Object.defineProperty(WebSocket, 'CLOSED', {
+ enumerable: true,
+ value: readyStates.indexOf('CLOSED')
+});
+
+/**
+ * @constant {Number} CLOSED
+ * @memberof WebSocket.prototype
+ */
+Object.defineProperty(WebSocket.prototype, 'CLOSED', {
+ enumerable: true,
+ value: readyStates.indexOf('CLOSED')
+});
+
+[
+ 'binaryType',
+ 'bufferedAmount',
+ 'extensions',
+ 'isPaused',
+ 'protocol',
+ 'readyState',
+ 'url'
+].forEach((property) => {
+ Object.defineProperty(WebSocket.prototype, property, { enumerable: true });
+});
+
+//
+// Add the `onopen`, `onerror`, `onclose`, and `onmessage` attributes.
+// See https://html.spec.whatwg.org/multipage/comms.html#the-websocket-interface
+//
+['open', 'error', 'close', 'message'].forEach((method) => {
+ Object.defineProperty(WebSocket.prototype, `on${method}`, {
+ enumerable: true,
+ get() {
+ for (const listener of this.listeners(method)) {
+ if (listener[kForOnEventAttribute]) return listener[kListener];
+ }
+
+ return null;
+ },
+ set(handler) {
+ for (const listener of this.listeners(method)) {
+ if (listener[kForOnEventAttribute]) {
+ this.removeListener(method, listener);
+ break;
+ }
+ }
+
+ if (typeof handler !== 'function') return;
+
+ this.addEventListener(method, handler, {
+ [kForOnEventAttribute]: true
+ });
+ }
+ });
+});
+
+WebSocket.prototype.addEventListener = addEventListener;
+WebSocket.prototype.removeEventListener = removeEventListener;
+
+module.exports = WebSocket;
+
+/**
+ * Initialize a WebSocket client.
+ *
+ * @param {WebSocket} websocket The client to initialize
+ * @param {(String|URL)} address The URL to which to connect
+ * @param {Array} protocols The subprotocols
+ * @param {Object} [options] Connection options
+ * @param {Boolean} [options.followRedirects=false] Whether or not to follow
+ * redirects
+ * @param {Function} [options.generateMask] The function used to generate the
+ * masking key
+ * @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the
+ * handshake request
+ * @param {Number} [options.maxPayload=104857600] The maximum allowed message
+ * size
+ * @param {Number} [options.maxRedirects=10] The maximum number of redirects
+ * allowed
+ * @param {String} [options.origin] Value of the `Origin` or
+ * `Sec-WebSocket-Origin` header
+ * @param {(Boolean|Object)} [options.perMessageDeflate=true] Enable/disable
+ * permessage-deflate
+ * @param {Number} [options.protocolVersion=13] Value of the
+ * `Sec-WebSocket-Version` header
+ * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
+ * not to skip UTF-8 validation for text and close messages
+ * @private
+ */
+function initAsClient(websocket, address, protocols, options) {
+ const opts = {
+ protocolVersion: protocolVersions[1],
+ maxPayload: 100 * 1024 * 1024,
+ skipUTF8Validation: false,
+ perMessageDeflate: true,
+ followRedirects: false,
+ maxRedirects: 10,
+ ...options,
+ createConnection: undefined,
+ socketPath: undefined,
+ hostname: undefined,
+ protocol: undefined,
+ timeout: undefined,
+ method: 'GET',
+ host: undefined,
+ path: undefined,
+ port: undefined
+ };
+
+ if (!protocolVersions.includes(opts.protocolVersion)) {
+ throw new RangeError(
+ `Unsupported protocol version: ${opts.protocolVersion} ` +
+ `(supported versions: ${protocolVersions.join(', ')})`
+ );
+ }
+
+ let parsedUrl;
+
+ if (address instanceof URL) {
+ parsedUrl = address;
+ websocket._url = address.href;
+ } else {
+ try {
+ parsedUrl = new URL(address);
+ } catch (e) {
+ throw new SyntaxError(`Invalid URL: ${address}`);
+ }
+
+ websocket._url = address;
+ }
+
+ const isSecure = parsedUrl.protocol === 'wss:';
+ const isIpcUrl = parsedUrl.protocol === 'ws+unix:';
+ let invalidUrlMessage;
+
+ if (parsedUrl.protocol !== 'ws:' && !isSecure && !isIpcUrl) {
+ invalidUrlMessage =
+ 'The URL\'s protocol must be one of "ws:", "wss:", or "ws+unix:"';
+ } else if (isIpcUrl && !parsedUrl.pathname) {
+ invalidUrlMessage = "The URL's pathname is empty";
+ } else if (parsedUrl.hash) {
+ invalidUrlMessage = 'The URL contains a fragment identifier';
+ }
+
+ if (invalidUrlMessage) {
+ const err = new SyntaxError(invalidUrlMessage);
+
+ if (websocket._redirects === 0) {
+ throw err;
+ } else {
+ emitErrorAndClose(websocket, err);
+ return;
+ }
+ }
+
+ const defaultPort = isSecure ? 443 : 80;
+ const key = randomBytes(16).toString('base64');
+ const request = isSecure ? https.request : http.request;
+ const protocolSet = new Set();
+ let perMessageDeflate;
+
+ opts.createConnection = isSecure ? tlsConnect : netConnect;
+ opts.defaultPort = opts.defaultPort || defaultPort;
+ opts.port = parsedUrl.port || defaultPort;
+ opts.host = parsedUrl.hostname.startsWith('[')
+ ? parsedUrl.hostname.slice(1, -1)
+ : parsedUrl.hostname;
+ opts.headers = {
+ ...opts.headers,
+ 'Sec-WebSocket-Version': opts.protocolVersion,
+ 'Sec-WebSocket-Key': key,
+ Connection: 'Upgrade',
+ Upgrade: 'websocket'
+ };
+ opts.path = parsedUrl.pathname + parsedUrl.search;
+ opts.timeout = opts.handshakeTimeout;
+
+ if (opts.perMessageDeflate) {
+ perMessageDeflate = new PerMessageDeflate(
+ opts.perMessageDeflate !== true ? opts.perMessageDeflate : {},
+ false,
+ opts.maxPayload
+ );
+ opts.headers['Sec-WebSocket-Extensions'] = format({
+ [PerMessageDeflate.extensionName]: perMessageDeflate.offer()
+ });
+ }
+ if (protocols.length) {
+ for (const protocol of protocols) {
+ if (
+ typeof protocol !== 'string' ||
+ !subprotocolRegex.test(protocol) ||
+ protocolSet.has(protocol)
+ ) {
+ throw new SyntaxError(
+ 'An invalid or duplicated subprotocol was specified'
+ );
+ }
+
+ protocolSet.add(protocol);
+ }
+
+ opts.headers['Sec-WebSocket-Protocol'] = protocols.join(',');
+ }
+ if (opts.origin) {
+ if (opts.protocolVersion < 13) {
+ opts.headers['Sec-WebSocket-Origin'] = opts.origin;
+ } else {
+ opts.headers.Origin = opts.origin;
+ }
+ }
+ if (parsedUrl.username || parsedUrl.password) {
+ opts.auth = `${parsedUrl.username}:${parsedUrl.password}`;
+ }
+
+ if (isIpcUrl) {
+ const parts = opts.path.split(':');
+
+ opts.socketPath = parts[0];
+ opts.path = parts[1];
+ }
+
+ let req;
+
+ if (opts.followRedirects) {
+ if (websocket._redirects === 0) {
+ websocket._originalIpc = isIpcUrl;
+ websocket._originalSecure = isSecure;
+ websocket._originalHostOrSocketPath = isIpcUrl
+ ? opts.socketPath
+ : parsedUrl.host;
+
+ const headers = options && options.headers;
+
+ //
+ // Shallow copy the user provided options so that headers can be changed
+ // without mutating the original object.
+ //
+ options = { ...options, headers: {} };
+
+ if (headers) {
+ for (const [key, value] of Object.entries(headers)) {
+ options.headers[key.toLowerCase()] = value;
+ }
+ }
+ } else if (websocket.listenerCount('redirect') === 0) {
+ const isSameHost = isIpcUrl
+ ? websocket._originalIpc
+ ? opts.socketPath === websocket._originalHostOrSocketPath
+ : false
+ : websocket._originalIpc
+ ? false
+ : parsedUrl.host === websocket._originalHostOrSocketPath;
+
+ if (!isSameHost || (websocket._originalSecure && !isSecure)) {
+ //
+ // Match curl 7.77.0 behavior and drop the following headers. These
+ // headers are also dropped when following a redirect to a subdomain.
+ //
+ delete opts.headers.authorization;
+ delete opts.headers.cookie;
+
+ if (!isSameHost) delete opts.headers.host;
+
+ opts.auth = undefined;
+ }
+ }
+
+ //
+ // Match curl 7.77.0 behavior and make the first `Authorization` header win.
+ // If the `Authorization` header is set, then there is nothing to do as it
+ // will take precedence.
+ //
+ if (opts.auth && !options.headers.authorization) {
+ options.headers.authorization =
+ 'Basic ' + Buffer.from(opts.auth).toString('base64');
+ }
+
+ req = websocket._req = request(opts);
+
+ if (websocket._redirects) {
+ //
+ // Unlike what is done for the `'upgrade'` event, no early exit is
+ // triggered here if the user calls `websocket.close()` or
+ // `websocket.terminate()` from a listener of the `'redirect'` event. This
+ // is because the user can also call `request.destroy()` with an error
+ // before calling `websocket.close()` or `websocket.terminate()` and this
+ // would result in an error being emitted on the `request` object with no
+ // `'error'` event listeners attached.
+ //
+ websocket.emit('redirect', websocket.url, req);
+ }
+ } else {
+ req = websocket._req = request(opts);
+ }
+
+ if (opts.timeout) {
+ req.on('timeout', () => {
+ abortHandshake(websocket, req, 'Opening handshake has timed out');
+ });
+ }
+
+ req.on('error', (err) => {
+ if (req === null || req[kAborted]) return;
+
+ req = websocket._req = null;
+ emitErrorAndClose(websocket, err);
+ });
+
+ req.on('response', (res) => {
+ const location = res.headers.location;
+ const statusCode = res.statusCode;
+
+ if (
+ location &&
+ opts.followRedirects &&
+ statusCode >= 300 &&
+ statusCode < 400
+ ) {
+ if (++websocket._redirects > opts.maxRedirects) {
+ abortHandshake(websocket, req, 'Maximum redirects exceeded');
+ return;
+ }
+
+ req.abort();
+
+ let addr;
+
+ try {
+ addr = new URL(location, address);
+ } catch (e) {
+ const err = new SyntaxError(`Invalid URL: ${location}`);
+ emitErrorAndClose(websocket, err);
+ return;
+ }
+
+ initAsClient(websocket, addr, protocols, options);
+ } else if (!websocket.emit('unexpected-response', req, res)) {
+ abortHandshake(
+ websocket,
+ req,
+ `Unexpected server response: ${res.statusCode}`
+ );
+ }
+ });
+
+ req.on('upgrade', (res, socket, head) => {
+ websocket.emit('upgrade', res);
+
+ //
+ // The user may have closed the connection from a listener of the
+ // `'upgrade'` event.
+ //
+ if (websocket.readyState !== WebSocket.CONNECTING) return;
+
+ req = websocket._req = null;
+
+ if (res.headers.upgrade.toLowerCase() !== 'websocket') {
+ abortHandshake(websocket, socket, 'Invalid Upgrade header');
+ return;
+ }
+
+ const digest = createHash('sha1')
+ .update(key + GUID)
+ .digest('base64');
+
+ if (res.headers['sec-websocket-accept'] !== digest) {
+ abortHandshake(websocket, socket, 'Invalid Sec-WebSocket-Accept header');
+ return;
+ }
+
+ const serverProt = res.headers['sec-websocket-protocol'];
+ let protError;
+
+ if (serverProt !== undefined) {
+ if (!protocolSet.size) {
+ protError = 'Server sent a subprotocol but none was requested';
+ } else if (!protocolSet.has(serverProt)) {
+ protError = 'Server sent an invalid subprotocol';
+ }
+ } else if (protocolSet.size) {
+ protError = 'Server sent no subprotocol';
+ }
+
+ if (protError) {
+ abortHandshake(websocket, socket, protError);
+ return;
+ }
+
+ if (serverProt) websocket._protocol = serverProt;
+
+ const secWebSocketExtensions = res.headers['sec-websocket-extensions'];
+
+ if (secWebSocketExtensions !== undefined) {
+ if (!perMessageDeflate) {
+ const message =
+ 'Server sent a Sec-WebSocket-Extensions header but no extension ' +
+ 'was requested';
+ abortHandshake(websocket, socket, message);
+ return;
+ }
+
+ let extensions;
+
+ try {
+ extensions = parse(secWebSocketExtensions);
+ } catch (err) {
+ const message = 'Invalid Sec-WebSocket-Extensions header';
+ abortHandshake(websocket, socket, message);
+ return;
+ }
+
+ const extensionNames = Object.keys(extensions);
+
+ if (
+ extensionNames.length !== 1 ||
+ extensionNames[0] !== PerMessageDeflate.extensionName
+ ) {
+ const message = 'Server indicated an extension that was not requested';
+ abortHandshake(websocket, socket, message);
+ return;
+ }
+
+ try {
+ perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]);
+ } catch (err) {
+ const message = 'Invalid Sec-WebSocket-Extensions header';
+ abortHandshake(websocket, socket, message);
+ return;
+ }
+
+ websocket._extensions[PerMessageDeflate.extensionName] =
+ perMessageDeflate;
+ }
+
+ websocket.setSocket(socket, head, {
+ generateMask: opts.generateMask,
+ maxPayload: opts.maxPayload,
+ skipUTF8Validation: opts.skipUTF8Validation
+ });
+ });
+
+ if (opts.finishRequest) {
+ opts.finishRequest(req, websocket);
+ } else {
+ req.end();
+ }
+}
+
+/**
+ * Emit the `'error'` and `'close'` events.
+ *
+ * @param {WebSocket} websocket The WebSocket instance
+ * @param {Error} The error to emit
+ * @private
+ */
+function emitErrorAndClose(websocket, err) {
+ websocket._readyState = WebSocket.CLOSING;
+ websocket.emit('error', err);
+ websocket.emitClose();
+}
+
+/**
+ * Create a `net.Socket` and initiate a connection.
+ *
+ * @param {Object} options Connection options
+ * @return {net.Socket} The newly created socket used to start the connection
+ * @private
+ */
+function netConnect(options) {
+ options.path = options.socketPath;
+ return net.connect(options);
+}
+
+/**
+ * Create a `tls.TLSSocket` and initiate a connection.
+ *
+ * @param {Object} options Connection options
+ * @return {tls.TLSSocket} The newly created socket used to start the connection
+ * @private
+ */
+function tlsConnect(options) {
+ options.path = undefined;
+
+ if (!options.servername && options.servername !== '') {
+ options.servername = net.isIP(options.host) ? '' : options.host;
+ }
+
+ return tls.connect(options);
+}
+
+/**
+ * Abort the handshake and emit an error.
+ *
+ * @param {WebSocket} websocket The WebSocket instance
+ * @param {(http.ClientRequest|net.Socket|tls.Socket)} stream The request to
+ * abort or the socket to destroy
+ * @param {String} message The error message
+ * @private
+ */
+function abortHandshake(websocket, stream, message) {
+ websocket._readyState = WebSocket.CLOSING;
+
+ const err = new Error(message);
+ Error.captureStackTrace(err, abortHandshake);
+
+ if (stream.setHeader) {
+ stream[kAborted] = true;
+ stream.abort();
+
+ if (stream.socket && !stream.socket.destroyed) {
+ //
+ // On Node.js >= 14.3.0 `request.abort()` does not destroy the socket if
+ // called after the request completed. See
+ // https://github.com/websockets/ws/issues/1869.
+ //
+ stream.socket.destroy();
+ }
+
+ process.nextTick(emitErrorAndClose, websocket, err);
+ } else {
+ stream.destroy(err);
+ stream.once('error', websocket.emit.bind(websocket, 'error'));
+ stream.once('close', websocket.emitClose.bind(websocket));
+ }
+}
+
+/**
+ * Handle cases where the `ping()`, `pong()`, or `send()` methods are called
+ * when the `readyState` attribute is `CLOSING` or `CLOSED`.
+ *
+ * @param {WebSocket} websocket The WebSocket instance
+ * @param {*} [data] The data to send
+ * @param {Function} [cb] Callback
+ * @private
+ */
+function sendAfterClose(websocket, data, cb) {
+ if (data) {
+ const length = toBuffer(data).length;
+
+ //
+ // The `_bufferedAmount` property is used only when the peer is a client and
+ // the opening handshake fails. Under these circumstances, in fact, the
+ // `setSocket()` method is not called, so the `_socket` and `_sender`
+ // properties are set to `null`.
+ //
+ if (websocket._socket) websocket._sender._bufferedBytes += length;
+ else websocket._bufferedAmount += length;
+ }
+
+ if (cb) {
+ const err = new Error(
+ `WebSocket is not open: readyState ${websocket.readyState} ` +
+ `(${readyStates[websocket.readyState]})`
+ );
+ process.nextTick(cb, err);
+ }
+}
+
+/**
+ * The listener of the `Receiver` `'conclude'` event.
+ *
+ * @param {Number} code The status code
+ * @param {Buffer} reason The reason for closing
+ * @private
+ */
+function receiverOnConclude(code, reason) {
+ const websocket = this[kWebSocket];
+
+ websocket._closeFrameReceived = true;
+ websocket._closeMessage = reason;
+ websocket._closeCode = code;
+
+ if (websocket._socket[kWebSocket] === undefined) return;
+
+ websocket._socket.removeListener('data', socketOnData);
+ process.nextTick(resume, websocket._socket);
+
+ if (code === 1005) websocket.close();
+ else websocket.close(code, reason);
+}
+
+/**
+ * The listener of the `Receiver` `'drain'` event.
+ *
+ * @private
+ */
+function receiverOnDrain() {
+ const websocket = this[kWebSocket];
+
+ if (!websocket.isPaused) websocket._socket.resume();
+}
+
+/**
+ * The listener of the `Receiver` `'error'` event.
+ *
+ * @param {(RangeError|Error)} err The emitted error
+ * @private
+ */
+function receiverOnError(err) {
+ const websocket = this[kWebSocket];
+
+ if (websocket._socket[kWebSocket] !== undefined) {
+ websocket._socket.removeListener('data', socketOnData);
+
+ //
+ // On Node.js < 14.0.0 the `'error'` event is emitted synchronously. See
+ // https://github.com/websockets/ws/issues/1940.
+ //
+ process.nextTick(resume, websocket._socket);
+
+ websocket.close(err[kStatusCode]);
+ }
+
+ websocket.emit('error', err);
+}
+
+/**
+ * The listener of the `Receiver` `'finish'` event.
+ *
+ * @private
+ */
+function receiverOnFinish() {
+ this[kWebSocket].emitClose();
+}
+
+/**
+ * The listener of the `Receiver` `'message'` event.
+ *
+ * @param {Buffer|ArrayBuffer|Buffer[])} data The message
+ * @param {Boolean} isBinary Specifies whether the message is binary or not
+ * @private
+ */
+function receiverOnMessage(data, isBinary) {
+ this[kWebSocket].emit('message', data, isBinary);
+}
+
+/**
+ * The listener of the `Receiver` `'ping'` event.
+ *
+ * @param {Buffer} data The data included in the ping frame
+ * @private
+ */
+function receiverOnPing(data) {
+ const websocket = this[kWebSocket];
+
+ websocket.pong(data, !websocket._isServer, NOOP);
+ websocket.emit('ping', data);
+}
+
+/**
+ * The listener of the `Receiver` `'pong'` event.
+ *
+ * @param {Buffer} data The data included in the pong frame
+ * @private
+ */
+function receiverOnPong(data) {
+ this[kWebSocket].emit('pong', data);
+}
+
+/**
+ * Resume a readable stream
+ *
+ * @param {Readable} stream The readable stream
+ * @private
+ */
+function resume(stream) {
+ stream.resume();
+}
+
+/**
+ * The listener of the `net.Socket` `'close'` event.
+ *
+ * @private
+ */
+function socketOnClose() {
+ const websocket = this[kWebSocket];
+
+ this.removeListener('close', socketOnClose);
+ this.removeListener('data', socketOnData);
+ this.removeListener('end', socketOnEnd);
+
+ websocket._readyState = WebSocket.CLOSING;
+
+ let chunk;
+
+ //
+ // The close frame might not have been received or the `'end'` event emitted,
+ // for example, if the socket was destroyed due to an error. Ensure that the
+ // `receiver` stream is closed after writing any remaining buffered data to
+ // it. If the readable side of the socket is in flowing mode then there is no
+ // buffered data as everything has been already written and `readable.read()`
+ // will return `null`. If instead, the socket is paused, any possible buffered
+ // data will be read as a single chunk.
+ //
+ if (
+ !this._readableState.endEmitted &&
+ !websocket._closeFrameReceived &&
+ !websocket._receiver._writableState.errorEmitted &&
+ (chunk = websocket._socket.read()) !== null
+ ) {
+ websocket._receiver.write(chunk);
+ }
+
+ websocket._receiver.end();
+
+ this[kWebSocket] = undefined;
+
+ clearTimeout(websocket._closeTimer);
+
+ if (
+ websocket._receiver._writableState.finished ||
+ websocket._receiver._writableState.errorEmitted
+ ) {
+ websocket.emitClose();
+ } else {
+ websocket._receiver.on('error', receiverOnFinish);
+ websocket._receiver.on('finish', receiverOnFinish);
+ }
+}
+
+/**
+ * The listener of the `net.Socket` `'data'` event.
+ *
+ * @param {Buffer} chunk A chunk of data
+ * @private
+ */
+function socketOnData(chunk) {
+ if (!this[kWebSocket]._receiver.write(chunk)) {
+ this.pause();
+ }
+}
+
+/**
+ * The listener of the `net.Socket` `'end'` event.
+ *
+ * @private
+ */
+function socketOnEnd() {
+ const websocket = this[kWebSocket];
+
+ websocket._readyState = WebSocket.CLOSING;
+ websocket._receiver.end();
+ this.end();
+}
+
+/**
+ * The listener of the `net.Socket` `'error'` event.
+ *
+ * @private
+ */
+function socketOnError() {
+ const websocket = this[kWebSocket];
+
+ this.removeListener('error', socketOnError);
+ this.on('error', NOOP);
+
+ if (websocket) {
+ websocket._readyState = WebSocket.CLOSING;
+ this.destroy();
+ }
+}
diff --git a/node_modules/ws/package.json b/node_modules/ws/package.json
new file mode 100644
index 0000000..4b5d92b
--- /dev/null
+++ b/node_modules/ws/package.json
@@ -0,0 +1,65 @@
+{
+ "name": "ws",
+ "version": "8.13.0",
+ "description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js",
+ "keywords": [
+ "HyBi",
+ "Push",
+ "RFC-6455",
+ "WebSocket",
+ "WebSockets",
+ "real-time"
+ ],
+ "homepage": "https://github.com/websockets/ws",
+ "bugs": "https://github.com/websockets/ws/issues",
+ "repository": "websockets/ws",
+ "author": "Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)",
+ "license": "MIT",
+ "main": "index.js",
+ "exports": {
+ ".": {
+ "browser": "./browser.js",
+ "import": "./wrapper.mjs",
+ "require": "./index.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "browser": "browser.js",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "files": [
+ "browser.js",
+ "index.js",
+ "lib/*.js",
+ "wrapper.mjs"
+ ],
+ "scripts": {
+ "test": "nyc --reporter=lcov --reporter=text mocha --throw-deprecation test/*.test.js",
+ "integration": "mocha --throw-deprecation test/*.integration.js",
+ "lint": "eslint --ignore-path .gitignore . && prettier --check --ignore-path .gitignore \"**/*.{json,md,yaml,yml}\""
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ },
+ "devDependencies": {
+ "benchmark": "^2.1.4",
+ "bufferutil": "^4.0.1",
+ "eslint": "^8.0.0",
+ "eslint-config-prettier": "^8.1.0",
+ "eslint-plugin-prettier": "^4.0.0",
+ "mocha": "^8.4.0",
+ "nyc": "^15.0.0",
+ "prettier": "^2.0.5",
+ "utf-8-validate": "^6.0.0"
+ }
+}
diff --git a/node_modules/ws/wrapper.mjs b/node_modules/ws/wrapper.mjs
new file mode 100644
index 0000000..7245ad1
--- /dev/null
+++ b/node_modules/ws/wrapper.mjs
@@ -0,0 +1,8 @@
+import createWebSocketStream from './lib/stream.js';
+import Receiver from './lib/receiver.js';
+import Sender from './lib/sender.js';
+import WebSocket from './lib/websocket.js';
+import WebSocketServer from './lib/websocket-server.js';
+
+export { createWebSocketStream, Receiver, Sender, WebSocket, WebSocketServer };
+export default WebSocket;
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..91a4263
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,256 @@
+{
+ "name": "sowbot3",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "dependencies": {
+ "discord.js": "^14.13.0"
+ }
+ },
+ "node_modules/@discordjs/builders": {
+ "version": "1.6.5",
+ "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.6.5.tgz",
+ "integrity": "sha512-SdweyCs/+mHj+PNhGLLle7RrRFX9ZAhzynHahMCLqp5Zeq7np7XC6/mgzHc79QoVlQ1zZtOkTTiJpOZu5V8Ufg==",
+ "dependencies": {
+ "@discordjs/formatters": "^0.3.2",
+ "@discordjs/util": "^1.0.1",
+ "@sapphire/shapeshift": "^3.9.2",
+ "discord-api-types": "0.37.50",
+ "fast-deep-equal": "^3.1.3",
+ "ts-mixer": "^6.0.3",
+ "tslib": "^2.6.1"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ }
+ },
+ "node_modules/@discordjs/collection": {
+ "version": "1.5.3",
+ "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz",
+ "integrity": "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==",
+ "engines": {
+ "node": ">=16.11.0"
+ }
+ },
+ "node_modules/@discordjs/formatters": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.2.tgz",
+ "integrity": "sha512-lE++JZK8LSSDRM5nLjhuvWhGuKiXqu+JZ/DsOR89DVVia3z9fdCJVcHF2W/1Zxgq0re7kCzmAJlCMMX3tetKpA==",
+ "dependencies": {
+ "discord-api-types": "0.37.50"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ }
+ },
+ "node_modules/@discordjs/rest": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.0.1.tgz",
+ "integrity": "sha512-/eWAdDRvwX/rIE2tuQUmKaxmWeHmGealttIzGzlYfI4+a7y9b6ZoMp8BG/jaohs8D8iEnCNYaZiOFLVFLQb8Zg==",
+ "dependencies": {
+ "@discordjs/collection": "^1.5.3",
+ "@discordjs/util": "^1.0.1",
+ "@sapphire/async-queue": "^1.5.0",
+ "@sapphire/snowflake": "^3.5.1",
+ "@vladfrangu/async_event_emitter": "^2.2.2",
+ "discord-api-types": "0.37.50",
+ "magic-bytes.js": "^1.0.15",
+ "tslib": "^2.6.1",
+ "undici": "5.22.1"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ }
+ },
+ "node_modules/@discordjs/util": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.0.1.tgz",
+ "integrity": "sha512-d0N2yCxB8r4bn00/hvFZwM7goDcUhtViC5un4hPj73Ba4yrChLSJD8fy7Ps5jpTLg1fE9n4K0xBLc1y9WGwSsA==",
+ "engines": {
+ "node": ">=16.11.0"
+ }
+ },
+ "node_modules/@discordjs/ws": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.0.1.tgz",
+ "integrity": "sha512-avvAolBqN3yrSvdBPcJ/0j2g42ABzrv3PEL76e3YTp2WYMGH7cuspkjfSyNWaqYl1J+669dlLp+YFMxSVQyS5g==",
+ "dependencies": {
+ "@discordjs/collection": "^1.5.3",
+ "@discordjs/rest": "^2.0.1",
+ "@discordjs/util": "^1.0.1",
+ "@sapphire/async-queue": "^1.5.0",
+ "@types/ws": "^8.5.5",
+ "@vladfrangu/async_event_emitter": "^2.2.2",
+ "discord-api-types": "0.37.50",
+ "tslib": "^2.6.1",
+ "ws": "^8.13.0"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ }
+ },
+ "node_modules/@sapphire/async-queue": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz",
+ "integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==",
+ "engines": {
+ "node": ">=v14.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/@sapphire/shapeshift": {
+ "version": "3.9.2",
+ "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.2.tgz",
+ "integrity": "sha512-YRbCXWy969oGIdqR/wha62eX8GNHsvyYi0Rfd4rNW6tSVVa8p0ELiMEuOH/k8rgtvRoM+EMV7Csqz77YdwiDpA==",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.3",
+ "lodash": "^4.17.21"
+ },
+ "engines": {
+ "node": ">=v14.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/@sapphire/snowflake": {
+ "version": "3.5.1",
+ "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.1.tgz",
+ "integrity": "sha512-BxcYGzgEsdlG0dKAyOm0ehLGm2CafIrfQTZGWgkfKYbj+pNNsorZ7EotuZukc2MT70E0UbppVbtpBrqpzVzjNA==",
+ "engines": {
+ "node": ">=v14.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "20.5.8",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.8.tgz",
+ "integrity": "sha512-eajsR9aeljqNhK028VG0Wuw+OaY5LLxYmxeoXynIoE6jannr9/Ucd1LL0hSSoafk5LTYG+FfqsyGt81Q6Zkybw=="
+ },
+ "node_modules/@types/ws": {
+ "version": "8.5.5",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.5.tgz",
+ "integrity": "sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@vladfrangu/async_event_emitter": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.2.tgz",
+ "integrity": "sha512-HIzRG7sy88UZjBJamssEczH5q7t5+axva19UbZLO6u0ySbYPrwzWiXBcC0WuHyhKKoeCyneH+FvYzKQq/zTtkQ==",
+ "engines": {
+ "node": ">=v14.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/busboy": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
+ "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
+ "dependencies": {
+ "streamsearch": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=10.16.0"
+ }
+ },
+ "node_modules/discord-api-types": {
+ "version": "0.37.50",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.50.tgz",
+ "integrity": "sha512-X4CDiMnDbA3s3RaUXWXmgAIbY1uxab3fqe3qwzg5XutR3wjqi7M3IkgQbsIBzpqBN2YWr/Qdv7JrFRqSgb4TFg=="
+ },
+ "node_modules/discord.js": {
+ "version": "14.13.0",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.13.0.tgz",
+ "integrity": "sha512-Kufdvg7fpyTEwANGy9x7i4od4yu5c6gVddGi5CKm4Y5a6sF0VBODObI3o0Bh7TGCj0LfNT8Qp8z04wnLFzgnbA==",
+ "dependencies": {
+ "@discordjs/builders": "^1.6.5",
+ "@discordjs/collection": "^1.5.3",
+ "@discordjs/formatters": "^0.3.2",
+ "@discordjs/rest": "^2.0.1",
+ "@discordjs/util": "^1.0.1",
+ "@discordjs/ws": "^1.0.1",
+ "@sapphire/snowflake": "^3.5.1",
+ "@types/ws": "^8.5.5",
+ "discord-api-types": "0.37.50",
+ "fast-deep-equal": "^3.1.3",
+ "lodash.snakecase": "^4.1.1",
+ "tslib": "^2.6.1",
+ "undici": "5.22.1",
+ "ws": "^8.13.0"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ }
+ },
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
+ },
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
+ },
+ "node_modules/lodash.snakecase": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz",
+ "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw=="
+ },
+ "node_modules/magic-bytes.js": {
+ "version": "1.0.15",
+ "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.0.15.tgz",
+ "integrity": "sha512-bpRmwbRHqongRhA+mXzbLWjVy7ylqmfMBYaQkSs6pac0z6hBTvsgrH0r4FBYd/UYVJBmS6Rp/O+oCCQVLzKV1g=="
+ },
+ "node_modules/streamsearch": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
+ "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/ts-mixer": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz",
+ "integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ=="
+ },
+ "node_modules/tslib": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
+ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
+ },
+ "node_modules/undici": {
+ "version": "5.22.1",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-5.22.1.tgz",
+ "integrity": "sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==",
+ "dependencies": {
+ "busboy": "^1.6.0"
+ },
+ "engines": {
+ "node": ">=14.0"
+ }
+ },
+ "node_modules/ws": {
+ "version": "8.13.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz",
+ "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..1f13fd9
--- /dev/null
+++ b/package.json
@@ -0,0 +1,15 @@
+{
+ "dependencies": {
+ "discord.js": "^14.13.0"
+ },
+ "name": "sowbot3",
+ "version": "1.0.0",
+ "main": "index.js",
+ "devDependencies": {},
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": "",
+ "license": "ISC",
+ "description": ""
+}
diff --git a/regcmd.js b/regcmd.js
new file mode 100644
index 0000000..7dd4381
--- /dev/null
+++ b/regcmd.js
@@ -0,0 +1,53 @@
+const { REST, Routes } = require('discord.js');
+const { clientId, token } = require('./config.json');
+const fs = require('node:fs');
+const path = require('node:path');
+global.data = require('./data.js');
+
+const commands = [];
+// Grab all the command files from the commands directory you created earlier
+const foldersPath = path.join(__dirname, 'commands');
+const commandFolders = fs.readdirSync(foldersPath);
+
+// for (const folder of commandFolders) {
+ // Grab all the command files from the commands directory you created earlier
+ // const commandsPath = path.join(foldersPath, folder);
+ const commandsPath = foldersPath;
+ const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js'));
+ // Grab the SlashCommandBuilder#toJSON() output of each command's data for deployment
+ for (const file of commandFiles) {
+ const filePath = path.join(commandsPath, file);
+ const command = require(filePath);
+ if ('data' in command && 'execute' in command) {
+ commands.push(command.data.toJSON());
+ // console.log(command.data.toJSON())
+ } else {
+ console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`);
+ }
+ }
+// }
+
+// Construct and prepare an instance of the REST module
+const rest = new REST().setToken(token);
+
+// and deploy your commands!
+// rest.put(Routes.applicationCommands(clientId), { body: [] })
+// .then(() => console.log('Successfully deleted all application commands.'))
+// .catch(console.error);
+
+(async () => {
+ try {
+ console.log(`Started refreshing ${commands.length} application (/) commands.`);
+
+ // The put method is used to fully refresh all commands in the guild with the current set
+ const data = await rest.put(
+ Routes.applicationCommands(clientId),
+ { body: commands },
+ );
+
+ console.log(`Successfully reloaded ${data.length} application (/) commands.`);
+ } catch (error) {
+ // And of course, make sure you catch and log any errors!
+ console.error(error);
+ }
+})(); \ No newline at end of file